CONNECT · ROUTE · STATE · DELIVER · DIAGNOSE

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.

One sentence: Core creates meaning → Joint connects it → UI expresses it → Validation checks it.

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

Source
Target

Curve

Source
Target

Orthogonal

Source
Target

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

OUT
Target

BLOCKED / formal ban

OUT
Target

Missing Target Field

Source.value
Target.caption

Compatibility Warning

INT
STRING

Compatibility Error

STRING
INT
Forbidden: no bf-joint-specific alert icon, spinner, ban, animation, or diagnostic is added.

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>
AttributeValuesFormal mapping
data-routestraight / curve / orthogonalBoneJoint.drawLine routeStyle
data-stateconnected / waiting / blocked / disconnected / reconnecting / errorFormal BoneJoint state
data-source / data-targetJSON EndpointBoneJoint.evaluate definition.source / target
data-bonesJSON bone dictionaryBoneJoint.evaluate bones
data-source-port / data-target-portTOP / RIGHT / BOTTOM / LEFTFormal port position
data-source-id / data-target-idelement id inside hostDOM 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

  1. Smoke ALL PASS
  2. Validation ALL PASS
  3. Visual WAIT queue/FIFO check
  4. Visual BLOCKED zero-delivery check
  5. No double completion
  6. Completion state survives reload
  7. 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

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.