Bone Flow #002 - Bone Joint Guide
Runtime 1.1.40 / Package 1.0.28. A complete guide to the connection layer that safely moves meaning from Source to Target.
1. Bone Flow and Joint
#001 Bone Core creates the smallest unit of meaning. #002 Joint resolves endpoints and fields, checks compatibility, manages connection state and delivery, and exposes the result as a visible route.
2. Joint anatomy
Source, Target, Endpoint, Field, Compatibility and State are separate diagnostic layers. A missing Bone is not the same as a missing Endpoint or Field.
3. Port / RETURN
Normal flow is OUT → IN. RETURN is reserved for return routing. Port roles rotate with TB/BT/LR/RL.
4. Compatibility
Exact types connect normally. Numeric Source → STRING Target is a warning but allowed. Other implicit mismatches are errors. NULL can be allowed by rule.
5. Connection states
connected
Connected and deliverable.
waiting
Target busy; connection retained and payload queued.
blocked
Connection retained; delivery denied.
disconnected
Disconnected.
reconnecting
Retrying connection.
error
Bone/Endpoint/Field/Compatibility error.
6. WAIT / FIFO / BLOCKED
createDeliveryChannel() implements real queue and delivery behavior. WAIT means deliver later; BLOCKED means do not deliver.
7. Straight / Curve / Orthogonal
The connection route can be declared directly on the HTML Functional Class. These are live bf-joint examples, not images.
Straight
Curve
Orthogonal
8. Display settings
Markers, line style, animation, orthogonal clearance, corner radius, lane separation, shape avoidance, intersections and labels affect rendering only; they must not rewrite connection semantics.
9. Abnormal connections and formal markers
bf-joint owns no independent abnormal icon. WAIT, BLOCKED, Error, and Compatibility visuals are drawn by the formal BoneJoint 1.1.40 marker functions.
WAIT / formal spinner
BLOCKED / formal ban
Missing Target Field
Compatibility Warning
Compatibility Error
10. Public API (Runtime 1.1.40)
evaluate()Evaluate Source/Target/Endpoint/Field/Compatibility/State.disconnect()Create disconnected state.reconnect()Create reconnecting state.wait()Create waiting state.block()Create blocked state.createDeliveryChannel()Real WAIT/FIFO/BLOCKED delivery channel.resolvePortRoles()Resolve IN/OUT/RETURN for TB/BT/LR/RL.resolvePortRole()Resolve one port role.validatePortConnection()Validate port-role connection.drawLine()Draw a formal Joint line.drawError()Draw missing-endpoint/error marker.drawCompatibilityMarker()Draw compatibility marker.setMarkerOptions()Set marker options.getMarkerOptions()Get marker options.resolveRoute()Resolve Straight/Curve/Orthogonal route.setDisplayOptions()Set display options.getDisplayOptions()Get display options.setDefaultStyle()Set renderer default style.getDefaultStyle()Get renderer default style.resolveStyle()Resolve default + per-line style.renderIntersections()Render crossing/bridge representation.renderLabel()Render Joint label/callout.getLabelState()Get label position state.resetLabelPositions()Reset labels to automatic placement.11. HTML Functional Class: bf-joint
bf-joint is a thin HTML adapter to the formal BoneJoint API, not another Joint implementation.
<div class="bf-joint" data-route="orthogonal" data-state="blocked">
<div class="bf-joint-source">OUT</div>
<div class="bf-joint-target">Target</div>
</div>bf-joint-in and bf-joint-out are semantic role modifiers on the existing bf-joint host. Formal drawing remains owned by BoneJoint Runtime; the host exposes data-bf-joint-role and the formal path exposes data-joint-role as in / out. The direction triangle tip is aligned to the real Target endpoint and has no black outline. Its fill uses the same SVG paint as the Joint line, and Animation ON/OFF plus speed are synchronized with the line.
<div class="bf-joint bf-joint-in" ...>...</div>
<div class="bf-joint bf-joint-out" ...>...</div>| Attribute | Values | Formal mapping |
|---|---|---|
| data-route | straight / curve / orthogonal | BoneJoint.drawLine routeStyle |
| data-state | connected / waiting / blocked / disconnected / reconnecting / error | Formal BoneJoint state |
| data-source / data-target | JSON Endpoint | BoneJoint.evaluate definition.source / target |
| data-bones | JSON bone dictionary | BoneJoint.evaluate bones |
| data-source-port / data-target-port | TOP / RIGHT / BOTTOM / LEFT | Formal port position |
| data-source-id / data-target-id | element id inside host | DOM geometry lookup only |
Abnormal meanings, marker shapes, and animations are not redefined by HTML; formal Runtime results are used.
11. Smoke / Validation / 000 cumulative regression
Smoke and Validation are #002-local checks. 000 validates the cumulative boneflow.js / boneflow.css bundle after #001 + #002 integration.
13. Completion
- Smoke ALL PASS
- Validation ALL PASS
- Visual WAIT queue/FIFO check
- Visual BLOCKED zero-delivery check
- No double completion
- Completion state survives reload
- Only user confirmation makes it formally Completed/Frozen
14. Examples
const result = BoneJoint.evaluate(definition, bones);
const channel = BoneJoint.createDeliveryChannel({ targetReady:false, deliver(payload){ target.receive(payload); } });14. Verification checklist
- Separate Source/Target/Bone/Endpoint/Field diagnostics
- Correct OUT/IN/RETURN rules
- Correct compatibility direction
- Real WAIT/FIFO queue behavior
- BLOCKED delivers zero payloads
- Correct route geometry and missing-side drawing rule
- JP/EN/search/print/TOC work in the Guide modal
Foreground abnormal-state icon
Formal abnormal, WAIT, BLOCKED, disconnected and reconnecting markers/icons are painted after the Joint path, so they remain in front of the Joint line only; nodes are not promoted behind the SVG layer. The comment remains in the diagnostic badge while the state icon is placed at the connection midpoint or abnormal endpoint.