semiotic 3.8.4 → 3.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/CLAUDE.md +6 -3
  2. package/README.md +44 -38
  3. package/ai/componentMetadata.cjs +1 -1
  4. package/ai/dist/mcp-server.js +4 -2
  5. package/ai/examples.md +167 -0
  6. package/ai/schema.json +1004 -1
  7. package/ai/surface-manifest.json +6 -4
  8. package/ai/system-prompt.md +1 -1
  9. package/dist/chunk-chartContainerDataAudit-74TLKIP6.module.min.js +2 -0
  10. package/dist/{chunk-chunk-LQBSXO7K.module.min.js → chunk-chunk-4AANPFOX.module.min.js} +1 -1
  11. package/dist/{chunk-chunk-N6VKKF3A.module.min.js → chunk-chunk-5I3UZV4Q.module.min.js} +1 -1
  12. package/dist/chunk-chunk-74CCPVXB.module.min.js +1 -0
  13. package/dist/{chunk-chunk-6TPGFL7M.module.min.js → chunk-chunk-BANTPINB.module.min.js} +1 -1
  14. package/dist/chunk-chunk-CKMD5NV3.module.min.js +2 -0
  15. package/dist/chunk-chunk-CO5KQMGH.module.min.js +1 -0
  16. package/dist/{chunk-chunk-BFHUYEOS.module.min.js → chunk-chunk-CWQ5YIHX.module.min.js} +1 -1
  17. package/dist/chunk-chunk-E6TXX6MI.module.min.js +1 -0
  18. package/dist/{chunk-chunk-JDXT6ORT.module.min.js → chunk-chunk-I36PJ4OC.module.min.js} +1 -1
  19. package/dist/chunk-chunk-K3DMEW22.module.min.js +1 -0
  20. package/dist/chunk-chunk-KT2VAZMZ.module.min.js +1 -0
  21. package/dist/{chunk-chunk-AQPQN2HH.module.min.js → chunk-chunk-L6EA5V3G.module.min.js} +1 -1
  22. package/dist/{chunk-chunk-FBGHXL72.module.min.js → chunk-chunk-LJLS6DY7.module.min.js} +1 -1
  23. package/dist/chunk-chunk-LJPCLYSC.module.min.js +2 -0
  24. package/dist/{chunk-chunk-7RYBCTK5.module.min.js → chunk-chunk-N5DDKCCF.module.min.js} +1 -1
  25. package/dist/chunk-chunk-NLO44TOS.module.min.js +2 -0
  26. package/dist/{chunk-chunk-F5V4UIE6.module.min.js → chunk-chunk-PZJ2SBLL.module.min.js} +1 -1
  27. package/dist/chunk-chunk-QUJ6TTLY.module.min.js +1 -0
  28. package/dist/chunk-chunk-RBIDBUT4.module.min.js +2 -0
  29. package/dist/chunk-chunk-RFLAG356.module.min.js +1 -0
  30. package/dist/{chunk-chunk-7KZJUTKP.module.min.js → chunk-chunk-RPU4IZAV.module.min.js} +1 -1
  31. package/dist/{chunk-chunk-PLIDPQNG.module.min.js → chunk-chunk-SKMBCFIL.module.min.js} +1 -1
  32. package/dist/{chunk-chunk-SR4ZXOWR.module.min.js → chunk-chunk-TAE7W424.module.min.js} +1 -1
  33. package/dist/{chunk-chunk-KQ546MKE.module.min.js → chunk-chunk-TMWIZL3K.module.min.js} +1 -1
  34. package/dist/chunk-chunk-TUBMTZMU.module.min.js +2 -0
  35. package/dist/chunk-chunk-UFFEXJQY.module.min.js +1 -0
  36. package/dist/chunk-chunk-XSCHTS4D.module.min.js +2 -0
  37. package/dist/{chunk-chunk-F7WFPD4O.module.min.js → chunk-chunk-XXWSHGPL.module.min.js} +1 -1
  38. package/dist/chunk-chunk-ZXIXAPRE.module.min.js +2 -0
  39. package/dist/components/ChartContainer.d.ts +10 -0
  40. package/dist/components/ai/chartCapabilities.d.ts +2 -1
  41. package/dist/components/ai/chartCapabilityTypes.d.ts +14 -0
  42. package/dist/components/chartContainerDataAudit.d.ts +10 -0
  43. package/dist/components/charts/geo/DistanceCartogram.d.ts +29 -3
  44. package/dist/components/charts/index.d.ts +1 -0
  45. package/dist/components/charts/network/ForceDirectedGraph.d.ts +36 -1
  46. package/dist/components/charts/physics/CrucibleChart.capability.d.ts +8 -0
  47. package/dist/components/charts/physics/CrucibleChart.d.ts +63 -0
  48. package/dist/components/charts/physics/crucibleBodyRenderers.d.ts +27 -0
  49. package/dist/components/charts/physics/crucibleChartProps.d.ts +90 -0
  50. package/dist/components/charts/physics/crucibleChrome.d.ts +47 -0
  51. package/dist/components/charts/physics/crucibleController.d.ts +59 -0
  52. package/dist/components/charts/physics/crucibleEffects.d.ts +30 -0
  53. package/dist/components/charts/physics/cruciblePhysics.d.ts +54 -0
  54. package/dist/components/charts/physics/crucibleProgram.d.ts +38 -0
  55. package/dist/components/charts/physics/crucibleTypes.d.ts +415 -0
  56. package/dist/components/charts/shared/chartSpecCore.d.ts +8 -0
  57. package/dist/components/charts/shared/crucibleWireSchema.d.ts +5 -0
  58. package/dist/components/charts/shared/diagnoseTypes.d.ts +10 -0
  59. package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
  60. package/dist/components/data/auditData.d.ts +51 -0
  61. package/dist/components/data/dataAuditPresentation.d.ts +18 -0
  62. package/dist/components/data/dataAuditSources.d.ts +9 -0
  63. package/dist/components/data/numericContracts.d.ts +59 -0
  64. package/dist/components/data/numericFieldProfiler.d.ts +23 -0
  65. package/dist/components/recipes/netEnsembleLayout.d.ts +167 -0
  66. package/dist/components/recipes/netEnsembleOverlays.d.ts +20 -0
  67. package/dist/components/recipes/wordTrails.d.ts +156 -0
  68. package/dist/components/recipes/wordTrailsProgressiveReveal.d.ts +42 -0
  69. package/dist/components/semiotic-ai-core.d.ts +3 -0
  70. package/dist/components/semiotic-ai-data-audit.d.ts +4 -0
  71. package/dist/components/semiotic-ai.d.ts +7 -5
  72. package/dist/components/semiotic-physics.d.ts +1 -0
  73. package/dist/components/semiotic-recipes-core.d.ts +4 -0
  74. package/dist/components/semiotic-utils-core.d.ts +3 -0
  75. package/dist/components/semiotic.d.ts +1 -1
  76. package/dist/components/server/renderEvidence.d.ts +27 -0
  77. package/dist/components/server/serverChartConfigs.d.ts +1 -0
  78. package/dist/components/server/serverChartConfigsPhysics.d.ts +9 -0
  79. package/dist/components/server/staticAnnotations.d.ts +12 -0
  80. package/dist/components/stream/GeoPipelineStore.d.ts +1 -0
  81. package/dist/components/stream/GeoSVGOverlay.d.ts +7 -0
  82. package/dist/components/stream/geoCartogram.d.ts +7 -0
  83. package/dist/components/stream/geoTypes.d.ts +17 -2
  84. package/dist/components/stream/networkFrameHandleTypes.d.ts +4 -0
  85. package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +8 -0
  86. package/dist/components/useChartContainerDataAudit.d.ts +7 -0
  87. package/dist/geo.min.js +1 -1
  88. package/dist/geo.module.min.js +1 -1
  89. package/dist/network.min.js +1 -1
  90. package/dist/network.module.min.js +1 -1
  91. package/dist/ordinal.module.min.js +1 -1
  92. package/dist/physics.min.js +1 -1
  93. package/dist/physics.module.min.js +1 -1
  94. package/dist/realtime.min.js +1 -1
  95. package/dist/realtime.module.min.js +1 -1
  96. package/dist/semiotic-ai-core.d.ts +3 -0
  97. package/dist/semiotic-ai-core.min.js +1 -1
  98. package/dist/semiotic-ai-core.module.min.js +1 -1
  99. package/dist/semiotic-ai.d.ts +7 -5
  100. package/dist/semiotic-ai.min.js +1 -1
  101. package/dist/semiotic-ai.module.min.js +1 -1
  102. package/dist/semiotic-experimental.min.js +1 -1
  103. package/dist/semiotic-experimental.module.min.js +1 -1
  104. package/dist/semiotic-physics.d.ts +1 -0
  105. package/dist/semiotic-realtime-core.min.js +1 -1
  106. package/dist/semiotic-realtime-core.module.min.js +1 -1
  107. package/dist/semiotic-recipes-core.d.ts +4 -0
  108. package/dist/semiotic-recipes-core.min.js +1 -1
  109. package/dist/semiotic-recipes-core.module.min.js +1 -1
  110. package/dist/semiotic-recipes.min.js +1 -1
  111. package/dist/semiotic-recipes.module.min.js +1 -1
  112. package/dist/semiotic-server-edge.min.js +1 -1
  113. package/dist/semiotic-server-edge.module.min.js +1 -1
  114. package/dist/semiotic-server-node.min.js +1 -1
  115. package/dist/semiotic-server-node.module.min.js +1 -1
  116. package/dist/semiotic-utils-core.d.ts +3 -0
  117. package/dist/semiotic-utils-core.min.js +1 -1
  118. package/dist/semiotic-utils-core.module.min.js +1 -1
  119. package/dist/semiotic-utils.min.js +1 -1
  120. package/dist/semiotic-utils.module.min.js +1 -1
  121. package/dist/semiotic.d.ts +1 -1
  122. package/dist/semiotic.min.js +1 -1
  123. package/dist/semiotic.module.min.js +1 -1
  124. package/dist/server.min.js +1 -1
  125. package/dist/server.module.min.js +1 -1
  126. package/dist/xy.module.min.js +1 -1
  127. package/package.json +2 -2
  128. package/dist/chunk-chunk-3ILKBVVQ.module.min.js +0 -1
  129. package/dist/chunk-chunk-ASKSE5F5.module.min.js +0 -1
  130. package/dist/chunk-chunk-B3DRZPBK.module.min.js +0 -2
  131. package/dist/chunk-chunk-FP44FHFO.module.min.js +0 -2
  132. package/dist/chunk-chunk-HKXUAEPJ.module.min.js +0 -2
  133. package/dist/chunk-chunk-ICEXPNDC.module.min.js +0 -2
  134. package/dist/chunk-chunk-JMVEIZXP.module.min.js +0 -1
  135. package/dist/chunk-chunk-KHCOJMGK.module.min.js +0 -1
  136. package/dist/chunk-chunk-MFHF4J2Z.module.min.js +0 -1
  137. package/dist/chunk-chunk-NKZ75IM5.module.min.js +0 -2
  138. package/dist/chunk-chunk-QGZGZI4X.module.min.js +0 -1
  139. package/dist/chunk-chunk-RP7WTID5.module.min.js +0 -1
  140. package/dist/chunk-chunk-S7KLNUO6.module.min.js +0 -1
package/CLAUDE.md CHANGED
@@ -4,7 +4,7 @@
4
4
  - Install: `npm install semiotic`
5
5
  <!-- semiotic-bundle-sizes:start -->
6
6
  <!-- Auto-generated by scripts/sync-bundle-sizes.mjs — do not edit by hand. -->
7
- - **Use sub-path imports** — `semiotic/xy` (138KB gz), `semiotic/ordinal` (117KB gz), `semiotic/network` (123KB gz), `semiotic/geo` (97KB gz), `semiotic/realtime` (150KB gz), `semiotic/realtime/core` (145KB gz), `semiotic/realtime/react` (1KB gz), `semiotic/server` (190KB gz), `semiotic/server/node` (190KB gz), `semiotic/server/edge` (208KB gz), `semiotic/utils` (76KB gz), `semiotic/utils/core` (74KB gz), `semiotic/utils/react` (6KB gz), `semiotic/recipes` (77KB gz), `semiotic/recipes/core` (77KB gz), `semiotic/recipes/react` (2KB gz), `semiotic/themes` (7KB gz), `semiotic/themes/core` (7KB gz), `semiotic/themes/react` (6KB gz), `semiotic/data` (4KB gz), `semiotic/value` (8KB gz), `semiotic/physics` (133KB gz), `semiotic/physics/matter` (1KB gz), `semiotic/physics/rapier` (1KB gz), `semiotic/ai` (432KB gz), `semiotic/ai/core` (70KB gz), `semiotic/controls` (12KB gz), `semiotic/rough` (4KB gz). Full `semiotic` is 349KB gz.
7
+ - **Use sub-path imports** — `semiotic/xy` (138KB gz), `semiotic/ordinal` (117KB gz), `semiotic/network` (124KB gz), `semiotic/geo` (98KB gz), `semiotic/realtime` (151KB gz), `semiotic/realtime/core` (145KB gz), `semiotic/realtime/react` (1KB gz), `semiotic/server` (205KB gz), `semiotic/server/node` (205KB gz), `semiotic/server/edge` (224KB gz), `semiotic/utils` (83KB gz), `semiotic/utils/core` (81KB gz), `semiotic/utils/react` (6KB gz), `semiotic/recipes` (84KB gz), `semiotic/recipes/core` (83KB gz), `semiotic/recipes/react` (2KB gz), `semiotic/themes` (7KB gz), `semiotic/themes/core` (7KB gz), `semiotic/themes/react` (6KB gz), `semiotic/data` (4KB gz), `semiotic/value` (8KB gz), `semiotic/physics` (153KB gz), `semiotic/physics/matter` (1KB gz), `semiotic/physics/rapier` (1KB gz), `semiotic/ai` (462KB gz), `semiotic/ai/core` (77KB gz), `semiotic/controls` (12KB gz), `semiotic/rough` (4KB gz). Full `semiotic` is 376KB gz.
8
8
  <!-- semiotic-bundle-sizes:end -->
9
9
  - CLI: `npx semiotic-ai [--schema|--compact|--examples|--doctor|--audit-a11y]` · MCP: `npx semiotic-mcp`
10
10
 
@@ -58,7 +58,7 @@ All ordinal: `colorBy`, `colorScheme`, `categoryFormat` (string|ReactNode), `sho
58
58
 
59
59
  ## Network Charts (`semiotic/network`)
60
60
 
61
- **ForceDirectedGraph** — `nodes`, `edges`, `nodeIDAccessor`, `sourceAccessor`, `targetAccessor`, `colorBy`, `nodeSize`, `nodeSizeRange`, `edgeWidth`, `iterations` (300), `forceStrength` (0.1 — link-attraction multiplier), `layoutExecution` ("auto" default | "worker" | "sync" — auto runs big layouts in a Web Worker by estimated cost, sync fallback everywhere), `layoutLoadingContent` (ReactNode while worker layout pends; `false` suppresses), `onLayoutStateChange` (`"pending"|"ready"|"error"`), `showLabels`, `nodeLabel`, `styleRules` (style groups of nodes — rules see the raw node; `ctx.category` = colorBy group)
61
+ **ForceDirectedGraph** — `nodes`, `edges`, `nodeIDAccessor`, `sourceAccessor`, `targetAccessor`, `colorBy`, `nodeSize`, `nodeSizeRange`, `nodeStroke`/`nodeStrokeWidth` (node-only outline), `edgeWidth`, `edgeColor`/`edgeOpacity` (edge-only stroke), `iterations` (300), `forceStrength` (0.1 — link-attraction multiplier), `layoutExecution` ("auto" default | "worker" | "sync" — auto runs big layouts in a Web Worker by estimated cost, sync fallback everywhere), `layoutLoadingContent` (ReactNode while worker layout pends; `false` suppresses), `onLayoutStateChange` (`"pending"|"ready"|"error"`), `showLabels`, `nodeLabel`, `styleRules` (style groups of nodes — rules see the raw node; `ctx.category` = colorBy group). **Node vs edge stroking**: the generic `stroke`/`strokeWidth`/`opacity` style *all* marks uniformly; to stroke nodes and edges separately use node-only `nodeStroke`/`nodeStrokeWidth` (e.g. `nodeStroke="none"` drops the node ring) and edge-only `edgeColor`/`edgeWidth`/`edgeOpacity`. Precedence per property: specific > generic > built-in default (so an explicit `edgeColor` is no longer clobbered by a generic `stroke`).
62
62
  **SankeyDiagram** — `edges`, `nodes`, `valueAccessor`, `nodeIdAccessor`, `colorBy`, `edgeColorBy`, `orientation`, `nodeAlign`, `nodeWidth`, `nodePaddingRatio`, `showLabels`
63
63
  **ProcessSankey** — temporal sankey with real time x-axis. `nodes`, `edges` (each with `startTime`/`endTime`), `domain` (req `[t0, t1]`), `axisTicks?`, `xExtentAccessor` (optional `[start, end]` lifetime per node), `colorBy`/`colorScheme`/`showLegend`/`legendPosition`, `pairing` ("value"|"temporal"), `packing` ("off"|"reuse"), `laneOrder` ("crossing-min"|"inside-out"|"crossing-min+inside-out"|"insertion"), `lifetimeMode` ("full"|"half"), `ribbonLane` ("source"|"target"|"both"), `showLaneRails`, `showLabels` (true), `showQualityReadout`, `showParticles` + `particleStyle`, `timeFormat`/`valueFormat`, push API via ref. Static-graph cycles OK as long as edges move forward in time. Use ProcessSankey for time-stamped events; SankeyDiagram for static snapshots.
64
64
  **ChordDiagram** — `edges`, `nodes`, `valueAccessor`, `edgeColorBy`, `padAngle`, `showLabels`
@@ -92,6 +92,7 @@ Process/arrival/distribution charts backed by `StreamPhysicsFrame`. The settled
92
92
  **ProcessFlowChart** — multi-body workflow lane. `data`, `stages` (required: `[{id, label?, force?, damping?, capacity?, pressure?, portal?, absorb?, share?}]`), `stageAccessor` ("stage"), `idAccessor`, `groupBy` (optional feature key; completion when all members hit an absorb stage), `groupLabelAccessor`, `workAccessor`, `radiusAccessor`, `ballRadius` (6), `colorBy`, `groupCompletion` ("allAbsorbed"|"none"), `groupAnchorAlong` (0.55), `showProjection` (true), `showChrome` (true — processChrome kit), `liveCapacity` (true — FIFO queues at `unitsPerSecond`), `onCapacityChange` (queue depth / processed), `bodyLimit` (soft stream budget + oldest eviction), `bodyMark` ("circle"|"halo"|"faceted"|"pill"|"diamond"|"square" or per-row `datum.__physicsMark`), `selection`, `settle`, `seed`, `size`, `paused`, `frameProps`. Settled projection is stage occupancy + capacity badges; use for review queues / triage / merge pipelines. Prefer **GauntletChart** for one compound plan with timed gate effects.
93
93
  **Physics controllers** (`createCapacityQueueController`, `createPortalController`, `composePhysicsControllers`) — process plugins via `controllers`. Capacity `getSnapshot()` → queueDepth/processedCount; emit `physics-capacity-processed`. **processChrome** (`semiotic/physics` / `semiotic/recipes`) — stage bays, capacity badges, feature sockets (theme: `--semiotic-process-*`). `PhysicsCustomChart`: `layout()` may return `regionEffects`, `controllers`, `bodyForces`; `layoutConfig` hot path without re-enqueue. Guide: `/features/physics-process-guide`. Contracts: `PhysicsContracts.test.tsx`.
94
94
  **GauntletChart** — compound project core + tethered positive/negative property bodies + timed gate events. `positiveProperties`/`negativeProperties` (req), `gates`, `events`, `showChrome` (true), `showProjection` (true — viability/outcome strip), `showTethers` (true), `onStateChange`, `frameProps`. Bodies clamp inside walls (`clampGauntletPoint`). Not for multi-item factory floors (use ProcessFlowChart).
95
+ **CrucibleChart** — bounded peer components undergo authored `phases` and `events`, form declared `products`, and settle into reason-labelled `outlets` with source lineage. The ledger/projection is authoritative; motion never infers classification, timing, membership, loss, or routing. `buildCrucibleProductEvents({productId, form, contributions?, complete})` is pure authoring sugar for `combine → contribute* → complete-product`; every source/relation id, event position, reason, and outlet remains caller-supplied. The ref handle's `replay()` atomically restarts the deterministic tape even mid-run (`reset()` restores-and-pauses; `rerunMS` repeats after settlement). `playbackRate` changes presentation only. No push/live-event API.
95
96
  **Pop (body-removal burst)** — every physics HOC ref is a `PhysicsFrameHandle` (extends the shared push handle) exposing **`popBodies(ids, options?)`** (`StreamPhysicsPopOptions` = `{ color?, durationMs?, radius? }`): removes the bodies and plays a burst — expanding ring + inner glow + radial sparks fading over `durationMs` (`drawPopAnimations`) — returning the removed ids. It reads as a *departure*, the physics/exit-emphasis counterpart to realtime **`pulse`**'s data-*arrival* glow (the same transient-emphasis metaphor on opposite ends of a datum's life). GauntletChart also fires it internally on gate-driven property removal; `/examples/nimby` (civic-value balloons) and `/examples/merge-pressure` (merge-risk traits) drive it that way.
96
97
 
97
98
  ## Value Charts (`semiotic/value`)
@@ -169,7 +170,9 @@ Layout signature differs by family:
169
170
  - **Decoration**: `linearAxis` (tick axis + gridlines from *any* scale — the bespoke-scale escape hatch `showAxes` can't cover), `legendSwatches` (portable SVG legend for `overlays` — fill/line/shape/hatch swatches; sibling to `legendGroupsFrom` which feeds `frameProps.legend`), `hatchFill` (`{def, fill}` SVG `<pattern>` for percentile/uncertainty bands — the SVG analogue of `createHatchPattern`).
170
171
  - **`unwrapDatum`** (`semiotic/recipes` + `semiotic/utils`): collapse the wrapped-vs-raw datum split — always the raw user object (handles both `.data` wrappers and `.datum` nesting). **The** unwrap path for `onObservation` handlers AND `frameProps.tooltipContent` renderers: call it once on the incoming value; never pre-unwrap the argument (`unwrapDatum(x?.data ?? x)` double-unwraps).
171
172
 
172
- `semiotic/recipes` ships pure layout functions (`waffleLayout`, `calendarLayout`, `marimekkoLayout`, `bulletLayout`, `parallelCoordinatesLayout`, `intervalLanesLayout`, `flextreeLayout`, `dagreLayout`, `lineageDagLayout`, `axisFixedForceLayout`, `packedClusterMatrix`, `isometricLandmarkLayout`, `forceLayout`, `arcLayout`, `adjacencyMatrix`, `circularLayout`). **Network-analysis kit** (`semiotic/recipes`, pure graph algorithms): `buildAdjacency`, `bfsDistances`, `shortestPath`, `egoNetwork`, `degree`/`betweenness`(Brandes)/`closeness`/`clustering` (+ `normalizeScores`), and `proximityProblem` — the "spatial problem" layout diagnostic that flags nodes drawn closer than their graph distance warrants. Pair with network charts to size by centrality, highlight an ego network on hover, trace a shortest path, or diagnose a misleading layout. `forceLayout(nodes, edges, {seed})` is a **seeded, deterministic** positioner returning normalized `{id:{x,y}}` for `NetworkCustomChart` (same seed ⇒ same layout; re-seed for a "re-run the layout" interaction); `forceLayoutAsync(nodes, edges, {execution?, workerThreshold?, signal?})` is its Promise sibling that runs large layouts in a short-lived module Web Worker (identical deterministic output; graceful sync fallback), and `useForceLayout(nodes, edges, options)` → `{positions, status, error}` is the React wrapper — SSR and first hydration stay synchronous for markup parity, client graph changes go async while previous positions stay visible, and settled positions are memoized by node/edge array identity + options so remounting the same module-constant graph is "ready" immediately (no loading flash). `arcLayout`/`adjacencyMatrix`/`circularLayout` (+ `orderByGroupDegree`, `arcPath`) are the classic physics-free network forms. `allocateCells` is the largest-remainder grid allocator behind `waffleLayout` (turn `{key, weight}[]` + a cell count into integer cells with no rounding drift; `minPerCategory` keeps small categories visible) — reusable for any feature-mix / proportional waffle. **`unitize(value, {unit, maxUnits?, minFraction?})` / `unitizeRange(value, rangeValue, opts)`** is the counting sibling: the pictogram/tally allocator (value → repeated unit signs with a fractional final sign — ISOTYPE: symbols repeat, they never grow). Returns `{units: [{index, fraction, start, end, value}], total, shown, overflow}` — `maxUnits` caps with an `overflow` flag, `minFraction` drops trailing slivers while `total` vs `shown` keeps the ledger honest; `unitizeRange` extends the tally to a projected/scenario endpoint (`rangeUnits` drawn hatched), sharing a mid-sign boundary exactly via `startFraction`. Feeds `glyph`-node `fraction`s directly (unit charts, sign stacks, arrow bundles; `allocateCells` divides fixed cells, `unitize` counts). **Tokenized reasoning helpers**: `generateTokens(input, tokenEncoding)` wraps `unitize` plus `actual`, `fixed-denominator`, `quantile`, `posterior-sample`/`sample`, and seeded `random-sample` strategies with explicit `tokenType` (`dot`/`icon`/`glyph`), `tokenSemantics` (`observed-unit`, `unitized-measure`, `risk-case`, `possible-outcome`, etc.), and `countStrategy`; `{ value, rangeValue }` yields `rangeTokens` for scenario/projection tallies. `layoutTokenGrid` places the resulting tokens for icon/glyph arrays; `normalizeTokenEncoding` keeps legacy `token`/`unit` aliases working while canonical configs use `icon`/`unitValue`; `diagnoseTokenEncoding`, `suggestTokenEncoding`, and `tokenTaskIntentToCapabilityIntents` expose IDID-style warnings, task-aware defaults, and a bridge to `suggestCharts` intents. Built-in token glyph names include `person`, `server`, `chip`, `bolt`, and `bus`. `intervalLanesLayout` (ordinal) packs concurrent `{start,end,lane}` records into stacked Gantt sub-tracks per lane with period bands + lane labels + a time axis — packing runs in rendered-pixel space and honors `minBarWidth` (2) so zero/short-duration events stay visible without overlapping same-track neighbors; `axisFixedForceLayout` (network) pins one axis from a field and settles the other (rect-aware collision). BYO heavy deps (`d3-flextree`, `dagre`) in user code. `packedClusterMatrix` (network) bins records into a column×row matrix of **densely-packed beeswarm clusters** (deterministic self-contained packing, geometry cached) and emits **multi-channel glyphs** — hue (`colorAccessor`/`colorMap`), size (`sizeAccessor`, area), shade (`shadeAccessor`, CIELAB lightness), plus EITHER shape-encoding (`symbolAccessor`/`symbolMap` — the base mark becomes that shape) OR the **composite-glyph** model (`iconAccessor`/`iconMap` — base is a filled circle, only mapped values get a stroked inner icon). `rowMode:"banded"` (default) gives aligned global orbit-bands (row labels align, one enclosure spans the columns per band, columns vary in height) vs `"stacked"` (per-column cell heights ∝ count). `callouts:[{field,value,label}]` draws leader lines to named marks. `cellSizing:"proportional"` makes area ∝ count. **Recipe decoration kit** (exported from `semiotic/recipes`, for any custom-layout's `overlays`): `roundedEnclosure`/`boundsOf` (group/band borders), `bandLabel` (overflow-aware axis/band labels), `markCallout` (leader-line callout to a mark), `readField` (`node.data`-wrapper reader), `groupBy`, `dimFor` (the highlight/dim opacity rule — `{predicate?, highlight?, baseOpacity?, dimOpacity?, brighten?}`; `matchesHighlight` is its `{field,value}[]` matcher), `signatureKey`/`LayoutCache` (content-signature geometry cache so re-styling never re-runs an expensive layout — key by *content*, never by `ctx.nodes` identity), `legendGroupsFrom` (`{colorMap|keys, symbolMap?, sizeStops?}` → `LegendGroup[]` for `frameProps.legend`), `shade`/`makeShade`, `symbolPathString`/`symbolRadius`/`symbolExtent`/`SYMBOL_SEQUENCE`, and the small numeric/color one-liners every layout re-declares `clamp`, `mean`, `withAlpha`, `nonNegativeFinite` (hex→`rgba()` so a hover-dim can ride a recipe's `resolveColor` callback). (`bandLabel`/`dimFor` are adopted by marimekko/bullet/parallelCoordinates/packedClusterMatrix.) `lineageDagLayout` renders a pre-positioned **layered lineage/DAG** (reads logical layer/row coords, no re-layout) with composite node glyphs (one hit-rect per node + icon/label/store-chip decoration in `overlays`), level-of-detail collapse (full→compact→icon→dot), distinct dashed back-edges, and host-driven reach-dimming (`layoutConfig.reachableIds`) + selection (`layoutConfig.selectedId` / shared `ctx.selection`).
173
+ **Word Trails** (`wordTrailsLayout`) is the quantitatively anchored word-cloud recipe: column = category, segment = ordered vertical position, weight = font size, with overlap-free stable placement. `wordColor`/`wordOpacity` receive `WordTrailsWordInfo`: canonical `word`/`column`/`weight`/`segment` plus the exact source `datum`, `dataIndex`, `columnIndex`, and `resolvedColumnColor`, so derived encodings do not need brittle compound-key lookup maps. Spread `wordTrailsProgressiveReveal({currentSegment, segmentDomain, oldestOpacity?, currentOpacity?, futureOpacity?, combineWeightOpacity?})` into `layoutConfig` for future hiding + linearly faded history without reflow; zero-opacity rows reserve geometry but emit no glyph or hit target. Analysis-derived color/distinctiveness remains a source-data field, not something the layout infers.
174
+
175
+ `semiotic/recipes` ships pure layout functions (`waffleLayout`, `calendarLayout`, `marimekkoLayout`, `bulletLayout`, `parallelCoordinatesLayout`, `intervalLanesLayout`, `flextreeLayout`, `dagreLayout`, `lineageDagLayout`, `netEnsembleLayout`, `axisFixedForceLayout`, `packedClusterMatrix`, `isometricLandmarkLayout`, `forceLayout`, `arcLayout`, `adjacencyMatrix`, `circularLayout`). **Network-analysis kit** (`semiotic/recipes`, pure graph algorithms): `buildAdjacency`, `bfsDistances`, `shortestPath`, `egoNetwork`, `degree`/`betweenness`(Brandes)/`closeness`/`clustering` (+ `normalizeScores`), `analyzeNetEnsemble` (the headless net census — see `netEnsembleLayout` below), and `proximityProblem` — the "spatial problem" layout diagnostic that flags nodes drawn closer than their graph distance warrants. Pair with network charts to size by centrality, highlight an ego network on hover, trace a shortest path, or diagnose a misleading layout. `forceLayout(nodes, edges, {seed})` is a **seeded, deterministic** positioner returning normalized `{id:{x,y}}` for `NetworkCustomChart` (same seed ⇒ same layout; re-seed for a "re-run the layout" interaction); `forceLayoutAsync(nodes, edges, {execution?, workerThreshold?, signal?})` is its Promise sibling that runs large layouts in a short-lived module Web Worker (identical deterministic output; graceful sync fallback), and `useForceLayout(nodes, edges, options)` → `{positions, status, error}` is the React wrapper — SSR and first hydration stay synchronous for markup parity, client graph changes go async while previous positions stay visible, and settled positions are memoized by node/edge array identity + options so remounting the same module-constant graph is "ready" immediately (no loading flash). `arcLayout`/`adjacencyMatrix`/`circularLayout` (+ `orderByGroupDegree`, `arcPath`) are the classic physics-free network forms. `allocateCells` is the largest-remainder grid allocator behind `waffleLayout` (turn `{key, weight}[]` + a cell count into integer cells with no rounding drift; `minPerCategory` keeps small categories visible) — reusable for any feature-mix / proportional waffle. **`unitize(value, {unit, maxUnits?, minFraction?})` / `unitizeRange(value, rangeValue, opts)`** is the counting sibling: the pictogram/tally allocator (value → repeated unit signs with a fractional final sign — ISOTYPE: symbols repeat, they never grow). Returns `{units: [{index, fraction, start, end, value}], total, shown, overflow}` — `maxUnits` caps with an `overflow` flag, `minFraction` drops trailing slivers while `total` vs `shown` keeps the ledger honest; `unitizeRange` extends the tally to a projected/scenario endpoint (`rangeUnits` drawn hatched), sharing a mid-sign boundary exactly via `startFraction`. Feeds `glyph`-node `fraction`s directly (unit charts, sign stacks, arrow bundles; `allocateCells` divides fixed cells, `unitize` counts). **Tokenized reasoning helpers**: `generateTokens(input, tokenEncoding)` wraps `unitize` plus `actual`, `fixed-denominator`, `quantile`, `posterior-sample`/`sample`, and seeded `random-sample` strategies with explicit `tokenType` (`dot`/`icon`/`glyph`), `tokenSemantics` (`observed-unit`, `unitized-measure`, `risk-case`, `possible-outcome`, etc.), and `countStrategy`; `{ value, rangeValue }` yields `rangeTokens` for scenario/projection tallies. `layoutTokenGrid` places the resulting tokens for icon/glyph arrays; `normalizeTokenEncoding` keeps legacy `token`/`unit` aliases working while canonical configs use `icon`/`unitValue`; `diagnoseTokenEncoding`, `suggestTokenEncoding`, and `tokenTaskIntentToCapabilityIntents` expose IDID-style warnings, task-aware defaults, and a bridge to `suggestCharts` intents. Built-in token glyph names include `person`, `server`, `chip`, `bolt`, and `bus`. `intervalLanesLayout` (ordinal) packs concurrent `{start,end,lane}` records into stacked Gantt sub-tracks per lane with period bands + lane labels + a time axis — packing runs in rendered-pixel space and honors `minBarWidth` (2) so zero/short-duration events stay visible without overlapping same-track neighbors; `axisFixedForceLayout` (network) pins one axis from a field and settles the other (rect-aware collision). BYO heavy deps (`d3-flextree`, `dagre`) in user code. `packedClusterMatrix` (network) bins records into a column×row matrix of **densely-packed beeswarm clusters** (deterministic self-contained packing, geometry cached) and emits **multi-channel glyphs** — hue (`colorAccessor`/`colorMap`), size (`sizeAccessor`, area), shade (`shadeAccessor`, CIELAB lightness), plus EITHER shape-encoding (`symbolAccessor`/`symbolMap` — the base mark becomes that shape) OR the **composite-glyph** model (`iconAccessor`/`iconMap` — base is a filled circle, only mapped values get a stroked inner icon). `rowMode:"banded"` (default) gives aligned global orbit-bands (row labels align, one enclosure spans the columns per band, columns vary in height) vs `"stacked"` (per-column cell heights ∝ count). `callouts:[{field,value,label}]` draws leader lines to named marks. `cellSizing:"proportional"` makes area ∝ count. **Recipe decoration kit** (exported from `semiotic/recipes`, for any custom-layout's `overlays`): `roundedEnclosure`/`boundsOf` (group/band borders), `bandLabel` (overflow-aware axis/band labels), `markCallout` (leader-line callout to a mark), `readField` (`node.data`-wrapper reader), `groupBy`, `dimFor` (the highlight/dim opacity rule — `{predicate?, highlight?, baseOpacity?, dimOpacity?, brighten?}`; `matchesHighlight` is its `{field,value}[]` matcher), `signatureKey`/`LayoutCache` (content-signature geometry cache so re-styling never re-runs an expensive layout — key by *content*, never by `ctx.nodes` identity), `legendGroupsFrom` (`{colorMap|keys, symbolMap?, sizeStops?}` → `LegendGroup[]` for `frameProps.legend`), `shade`/`makeShade`, `symbolPathString`/`symbolRadius`/`symbolExtent`/`SYMBOL_SEQUENCE`, and the small numeric/color one-liners every layout re-declares — `clamp`, `mean`, `withAlpha`, `nonNegativeFinite` (hex→`rgba()` so a hover-dim can ride a recipe's `resolveColor` callback). (`bandLabel`/`dimFor` are adopted by marimekko/bullet/parallelCoordinates/packedClusterMatrix.) `lineageDagLayout` renders a pre-positioned **layered lineage/DAG** (reads logical layer/row coords, no re-layout) with composite node glyphs (one hit-rect per node + icon/label/store-chip decoration in `overlays`), level-of-detail collapse (full→compact→icon→dot), distinct dashed back-edges, and host-driven reach-dimming (`layoutConfig.reachableIds`) + selection (`layoutConfig.selectedId` / shared `ctx.selection`). `netEnsembleLayout` (network) is the complement — for **ensembles of disconnected/trivially-connected DAGs** (a "bag of little graphs" force layout scatters and dagre/flextree can't place). It splits into weakly-connected components, tests each for **directedness** (borrowing the mathematical *net*/directed-set idea: for a weakly-connected DAG, a single sink ⟹ everything converges to one limit; ≥2 sinks ⟹ it branches), fingerprints components with Weisfeiler–Leman refinement so **order-isomorphic motifs** group together, lays each out converging toward its sink(s) at the bottom, and arranges the ensemble as small multiples in motif bands (collapsing to one census glyph per component when cells get tiny). Config: `colorMode` (`"directedness"|"motif"|"category"`), `groupByMotif`, `sort`, `fingerprintRounds`, `minCellForFull`. `analyzeNetEnsemble(nodes, edges)` is the pure headless census (per-component `directed`/sink/source counts + motif classes) with no rendering. Demo + lay explanation at `/recipes/net-ensemble`.
173
176
 
174
177
  `tokenLayer({input, encoding, options})` is the high-level tokenized-rendering helper for custom layouts: it runs `generateTokens`, applies row/column/grid/waffle/dotplot/bar-segment/quantile-strip placement (or `positionToken` for scale/map-driven placement), and returns ordinary dot/symbol/glyph scene nodes with `pointId`/transition identity. Use it for ISOTYPE, icon arrays, risk grids, quantile dotplots, strips, and hybrid token overlays; pass `includeRange` to render `rangeTokens`; drop down to `generateTokens` when a bespoke layout only needs records.
175
178
 
package/README.md CHANGED
@@ -16,17 +16,21 @@ AI coding assistants generate correct chart code on the first try.
16
16
  <img src="./docs/public/assets/img/semiotic-release-dashboard.svg" alt="Semiotic release dashboard showing chart count, bundle sizes, capability coverage, chart families, and documentation growth" width="100%">
17
17
  <!-- semiotic-readme-dashboard:end -->
18
18
 
19
- ## What's New in 3.8.4
20
-
21
- 3.8.4 closes the remaining server/browser render gaps and hardens the physics and network runtimes:
22
-
23
- - Static SVG and `renderChart` now match the browser for line+area fills, semantic gradients, line
24
- bands, pie/donut start angles, swimlane extents, treemap `colorBy`, range candlesticks,
25
- streamgraph baselines, and the LineChart series features—each guarded by parity tests.
26
- - Physics simulations settle and rerun reliably via quiescence-based `atRest` detection, and network
27
- frames rebuild scenes without the duplicate builds that could flash during hydration.
28
- - New `layoutSequence` and `gridObservatory` recipes, a report-style Semiotic Standard example, and
29
- lazy-loaded brush overlays that trim the entry graph.
19
+ ## What's New in 3.8.5
20
+
21
+ 3.8.5 adds a new physics chart and two network/word-cloud recipes, then closes another round of
22
+ server/browser render gaps:
23
+
24
+ - New `CrucibleChart` (`semiotic/physics`): bounded peer components undergo authored phases and
25
+ events, form declared products, and settle into reason-labelled outlets with full source lineage.
26
+ - New `wordTrailsLayout` and `netEnsembleLayout` recipes (`semiotic/recipes`) for quantitatively
27
+ anchored word clouds and small-multiple layouts of disconnected graph ensembles, plus a
28
+ Langren-style strip layout for `DistanceCartogram` and separate node/edge stroke controls on
29
+ `ForceDirectedGraph`.
30
+ - `renderChart` now runs a chart's custom `svgAnnotationRules` server-side, honors `frameProps`
31
+ axis/legend/label overrides, and renders ordinal `x-threshold` annotations—closing SSR gaps that
32
+ used to silently drop custom overlays and chrome toggles. `renderChartWithEvidence` also exposes
33
+ the resolved margin and plot rectangle.
30
34
 
31
35
  ```jsx
32
36
  import { LineChart } from "semiotic/xy"
@@ -56,6 +60,7 @@ correct visualizations without trial and error:
56
60
  - **`npx semiotic-mcp`** — an MCP server for tool-based chart rendering in any MCP client
57
61
  - **`npx semiotic-ai --doctor`** — validate component + props JSON from the command line with typo suggestions and anti-pattern detection
58
62
  - **`diagnoseConfig(component, props)`** — programmatic anti-pattern detector with actionable fixes, spanning validation, encoding, accessibility, and misleading-design (deception) checks
63
+ - **`auditData(component, props, data?)`** — chart-aware numeric preflight for inputs that pass schema validation but break the math: non-finite values, zero-span domains, invalid log inputs, negative size geometry, unsafe normalized totals, and scale-dominating outliers. Returns bounded row evidence and flows into `diagnoseConfig`, Chart Clinic, CLI doctor, and opt-in `ChartContainer` notifications
59
64
  - **`CLAUDE.md`** — instruction files auto-synced for Claude, Cursor, Copilot, Windsurf, and Cline
60
65
  - **`llms.txt`** — machine-readable documentation following the emerging standard
61
66
 
@@ -72,8 +77,9 @@ diagrams, tree layouts, treemaps, circle packing, and orbit diagrams — all
72
77
  as React components with the same prop API as LineChart.
73
78
 
74
79
  **Streaming data.** Realtime charts render on canvas at 60fps with a
75
- ref-based push API. Built-in decay, pulse, and staleness encoding for
76
- monitoring dashboards.
80
+ ref-based push API. Rapid network edge pushes coalesce into one layout per
81
+ animation frame, while read/mutation methods preserve synchronous read-after-write
82
+ semantics. Built-in decay, pulse, and staleness encoding for monitoring dashboards.
77
83
 
78
84
  **Coordinated views.** `LinkedCharts` provides hover cross-highlighting,
79
85
  brush cross-filtering, coordinate-based linked crosshairs, and selection
@@ -375,33 +381,33 @@ The numbers below are **first-party artifact cost**: the gzip size of Semiotic's
375
381
  |---|---|---|
376
382
  | `semiotic/xy` | **138 KB** | LineChart, AreaChart, Scatterplot, Heatmap, + 8 more XY charts |
377
383
  | `semiotic/ordinal` | **117 KB** | BarChart, PieChart, BoxPlot, Histogram, + 11 more categorical charts |
378
- | `semiotic/network` | **123 KB** | ForceDirectedGraph, SankeyDiagram, ProcessSankey, Treemap, + 4 more |
379
- | `semiotic/geo` | **97 KB** | ChoroplethMap, FlowMap, DistanceCartogram, ProportionalSymbolMap |
380
- | `semiotic/realtime` | **150 KB** | RealtimeLineChart, RealtimeHistogram, + 4 streaming charts |
384
+ | `semiotic/network` | **124 KB** | ForceDirectedGraph, SankeyDiagram, ProcessSankey, Treemap, + 4 more |
385
+ | `semiotic/geo` | **98 KB** | ChoroplethMap, FlowMap, DistanceCartogram, ProportionalSymbolMap |
386
+ | `semiotic/realtime` | **151 KB** | RealtimeLineChart, RealtimeHistogram, + 4 streaming charts |
381
387
  | `semiotic/realtime/core` | **145 KB** | Streaming chart types, HOCs, and buffer helpers |
382
388
  | `semiotic/realtime/react` | **1 KB** | Stream status and synced push hooks |
383
- | `semiotic/server` | **190 KB** | renderChart, renderDashboard, renderToImage, renderToAnimatedGif |
384
- | `semiotic/server/node` | **190 KB** | renderChart, renderDashboard, renderToImage, renderToAnimatedGif |
385
- | `semiotic/server/edge` | **208 KB** | renderChart, renderChartWithEvidence, renderToStaticSVG, renderDashboard |
386
- | `semiotic/utils` | **76 KB** | ThemeProvider, validators, serialization — no chart components |
387
- | `semiotic/utils/core` | **74 KB** | Theme helpers and serialization utilities |
389
+ | `semiotic/server` | **205 KB** | renderChart, renderDashboard, renderToImage, renderToAnimatedGif |
390
+ | `semiotic/server/node` | **205 KB** | renderChart, renderDashboard, renderToImage, renderToAnimatedGif |
391
+ | `semiotic/server/edge` | **224 KB** | renderChart, renderChartWithEvidence, renderToStaticSVG, renderDashboard |
392
+ | `semiotic/utils` | **83 KB** | ThemeProvider, numeric/accessibility audits, serialization — no chart components |
393
+ | `semiotic/utils/core` | **81 KB** | Pure theme helpers, numeric/accessibility audits, and serialization |
388
394
  | `semiotic/utils/react` | **6 KB** | ThemeProvider, useTheme, useReducedMotion, useHighContrast, useStreamStatus |
389
- | `semiotic/recipes` | **77 KB** | Pure layout functions (waffle, marimekko, flextree, dagre, …) |
390
- | `semiotic/recipes/core` | **77 KB** | Pure layout functions (waffle, marimekko, flextree, dagre, …) |
395
+ | `semiotic/recipes` | **84 KB** | Pure layout functions (waffle, marimekko, flextree, dagre, …) |
396
+ | `semiotic/recipes/core` | **83 KB** | Pure layout functions (waffle, marimekko, flextree, dagre, …) |
391
397
  | `semiotic/recipes/react` | **2 KB** | Glyph and React layout-selection helpers |
392
398
  | `semiotic/themes` | **7 KB** | Theme presets only (tufte, carbon, etc.) |
393
399
  | `semiotic/themes/core` | **7 KB** | Theme presets and token helpers |
394
400
  | `semiotic/themes/react` | **6 KB** | ThemeProvider/useTheme and hooks |
395
401
  | `semiotic/data` | **4 KB** | bin, rollup, groupBy, pivot, fromVegaLite |
396
402
  | `semiotic/value` | **8 KB** | BigNumber — focal-value KPI / scorecard (SingleValueFrame POC) |
397
- | `semiotic/physics` | **133 KB** | GaltonBoardChart, EventDropChart, PhysicsPileChart, CollisionSwarmChart, PhysicalFlowChart, PhysicsCustomChart |
403
+ | `semiotic/physics` | **153 KB** | GaltonBoardChart, EventDropChart, PhysicsPileChart, CollisionSwarmChart, PhysicalFlowChart, PhysicsCustomChart |
398
404
  | `semiotic/physics/matter` | **1 KB** | Matter.js migration helpers + optional peer guard (no chart components) |
399
405
  | `semiotic/physics/rapier` | **1 KB** | Rapier peer guard + adapter decision metadata (no chart components) |
400
- | `semiotic/ai` | **432 KB** | All schema-backed charts + validation — optimized for LLM code generation |
401
- | `semiotic/ai/core` | **70 KB** | suggestCharts, validateProps, describeChart, repairChartConfig, tool adapters — no chart components |
406
+ | `semiotic/ai` | **462 KB** | All schema-backed charts + validation — optimized for LLM code generation |
407
+ | `semiotic/ai/core` | **77 KB** | suggestCharts, auditData, describeChart, repairChartConfig, tool adapters — no chart components |
402
408
  | `semiotic/controls` | **12 KB** | DirectManipulationControl, CircularBrush, MobileStandardControls, auditVisualizationControls — no frame renderer |
403
409
  | `semiotic/rough` | **4 KB** | Optional deterministic Rough.js paint backend — exact Semiotic geometry remains authoritative |
404
- | `semiotic` | **349 KB** | Everything below (full bundle) |
410
+ | `semiotic` | **376 KB** | Everything below (full bundle) |
405
411
 
406
412
  <!-- semiotic-bundle-sizes:end -->
407
413
 
@@ -422,28 +428,28 @@ Method: fresh `npm pack --ignore-scripts` tarball → temporary consumer → min
422
428
 
423
429
  | Public named import | Runtime | gzip cold-consumer bundle |
424
430
  |---|---:|---:|
425
- | `import { LineChart } from "semiotic"` | browser | **147.9 KiB** |
431
+ | `import { LineChart } from "semiotic"` | browser | **148.0 KiB** |
426
432
  | `import { LineChart } from "semiotic/xy"` | browser | **148.0 KiB** |
427
433
  | `import { BarChart } from "semiotic/ordinal"` | browser | **122.1 KiB** |
428
- | `import { SankeyDiagram } from "semiotic/network"` | browser | **127.1 KiB** |
434
+ | `import { SankeyDiagram } from "semiotic/network"` | browser | **127.3 KiB** |
429
435
  | `import { RealtimeLineChart } from "semiotic/realtime"` | browser | **121.3 KiB** |
430
- | `import { RingBuffer } from "semiotic/realtime/core"` | browser | **169.6 KiB** |
436
+ | `import { RingBuffer } from "semiotic/realtime/core"` | browser | **169.7 KiB** |
431
437
  | `import { useStreamStatus } from "semiotic/realtime/react"` | browser | **0.6 KiB** |
432
- | `import { GaltonBoardChart } from "semiotic/physics"` | browser | **118.7 KiB** |
438
+ | `import { GaltonBoardChart } from "semiotic/physics"` | browser | **137.1 KiB** |
433
439
  | `import { MATTER_PHYSICS_CAPABILITIES } from "semiotic/physics/matter"` | browser | **0.2 KiB** |
434
440
  | `import { RAPIER_PHYSICS_CAPABILITIES } from "semiotic/physics/rapier"` | browser | **0.2 KiB** |
435
- | `import { renderChart } from "semiotic/server"` | node | **249.5 KiB** |
436
- | `import { generateFrameSVGs } from "semiotic/server/edge"` | node | **165.3 KiB** |
437
- | `import { renderToImage } from "semiotic/server/node"` | node | **249.9 KiB** |
438
- | `import { suggestCharts } from "semiotic/ai"` | browser | **207.3 KiB** |
439
- | `import { suggestCharts } from "semiotic/ai/core"` | browser | **32.2 KiB** |
441
+ | `import { renderChart } from "semiotic/server"` | node | **263.8 KiB** |
442
+ | `import { generateFrameSVGs } from "semiotic/server/edge"` | node | **165.7 KiB** |
443
+ | `import { renderToImage } from "semiotic/server/node"` | node | **264.3 KiB** |
444
+ | `import { suggestCharts } from "semiotic/ai"` | browser | **214.3 KiB** |
445
+ | `import { suggestCharts } from "semiotic/ai/core"` | browser | **34.1 KiB** |
440
446
  | `import { bin } from "semiotic/data"` | browser | **0.4 KiB** |
441
- | `import { ChoroplethMap } from "semiotic/geo"` | browser | **106.6 KiB** |
447
+ | `import { ChoroplethMap } from "semiotic/geo"` | browser | **107.3 KiB** |
442
448
  | `import { createRoughRenderMode } from "semiotic/rough"` | browser | **3.4 KiB** |
443
449
  | `import { resolveThemePreset } from "semiotic/themes"` | browser | **3.4 KiB** |
444
450
  | `import { resolveThemePreset } from "semiotic/themes/core"` | browser | **3.4 KiB** |
445
451
  | `import { ThemeProvider } from "semiotic/themes/react"` | browser | **4.4 KiB** |
446
- | `import { validateProps } from "semiotic/utils"` | browser | **6.9 KiB** |
452
+ | `import { validateProps } from "semiotic/utils"` | browser | **7.4 KiB** |
447
453
  | `import { smartTickFormat } from "semiotic/utils/core"` | browser | **0.2 KiB** |
448
454
  | `import { useReducedMotion } from "semiotic/utils/react"` | browser | **0.3 KiB** |
449
455
  | `import { waffleLayout } from "semiotic/recipes"` | browser | **2.5 KiB** |
@@ -26,7 +26,7 @@ const COMPONENTS_BY_CATEGORY = {
26
26
  ],
27
27
  physics: [
28
28
  "GaltonBoardChart", "EventDropChart", "PhysicsPileChart", "CollisionSwarmChart",
29
- "PhysicalFlowChart", "ProcessFlowChart", "GauntletChart",
29
+ "PhysicalFlowChart", "ProcessFlowChart", "GauntletChart", "CrucibleChart",
30
30
  ],
31
31
  value: [
32
32
  "BigNumber",
@@ -6959,7 +6959,8 @@ var require_componentMetadata = __commonJS({
6959
6959
  "CollisionSwarmChart",
6960
6960
  "PhysicalFlowChart",
6961
6961
  "ProcessFlowChart",
6962
- "GauntletChart"
6962
+ "GauntletChart",
6963
+ "CrucibleChart"
6963
6964
  ],
6964
6965
  value: [
6965
6966
  "BigNumber"
@@ -33060,7 +33061,8 @@ var COMPONENT_REGISTRY = {
33060
33061
  CollisionSwarmChart: { component: import_ai.CollisionSwarmChart, category: "physics" },
33061
33062
  PhysicalFlowChart: { component: import_ai.PhysicalFlowChart, category: "physics" },
33062
33063
  ProcessFlowChart: { component: import_ai.ProcessFlowChart, category: "physics" },
33063
- GauntletChart: { component: import_ai.GauntletChart, category: "physics" }
33064
+ GauntletChart: { component: import_ai.GauntletChart, category: "physics" },
33065
+ CrucibleChart: { component: import_ai.CrucibleChart, category: "physics" }
33064
33066
  };
33065
33067
 
33066
33068
  // ai/renderHOCToSVG.tsx
package/ai/examples.md CHANGED
@@ -1184,6 +1184,86 @@ Key props: `y-threshold` works on vertical ordinal charts. `category-highlight`
1184
1184
 
1185
1185
  ---
1186
1186
 
1187
+ ## Recipe Layouts — Explicit Semantics Without Bespoke Geometry
1188
+
1189
+ ### Word Trails (source-aware color + progressive reveal)
1190
+
1191
+ ```jsx
1192
+ import { useState } from "react"
1193
+ import { OrdinalCustomChart } from "semiotic/ordinal"
1194
+ import { wordTrailsLayout, wordTrailsProgressiveReveal } from "semiotic/recipes"
1195
+
1196
+ // One source row per topic / word / recorded model iteration.
1197
+ const topicWordRuns = [
1198
+ { topic: "Topic A", word: "archive", iteration: 0, probability: 0.08, distinctiveness: 0.28 },
1199
+ { topic: "Topic A", word: "archive", iteration: 1, probability: 0.14, distinctiveness: 0.56 },
1200
+ { topic: "Topic A", word: "archive", iteration: 2, probability: 0.19, distinctiveness: 0.84 },
1201
+ { topic: "Topic A", word: "document", iteration: 2, probability: 0.13, distinctiveness: 0.62 },
1202
+ { topic: "Topic B", word: "labor", iteration: 0, probability: 0.09, distinctiveness: 0.35 },
1203
+ { topic: "Topic B", word: "labor", iteration: 1, probability: 0.16, distinctiveness: 0.72 },
1204
+ { topic: "Topic B", word: "factory", iteration: 2, probability: 0.18, distinctiveness: 0.91 },
1205
+ ]
1206
+
1207
+ const topicColors = { "Topic A": "#2563eb", "Topic B": "#db2777" }
1208
+
1209
+ function distinctivenessColor({ datum, resolvedColumnColor }) {
1210
+ // The callback receives the exact source row, plus canonical layout fields.
1211
+ const strength =
1212
+ datum.distinctiveness >= 0.75 ? 100 :
1213
+ datum.distinctiveness >= 0.5 ? 50 :
1214
+ datum.distinctiveness >= 0.25 ? 25 : 0
1215
+ return `color-mix(in srgb, ${resolvedColumnColor} ${strength}%, var(--surface-0, white))`
1216
+ }
1217
+
1218
+ export default function ProgressiveTopicTrails() {
1219
+ const [iteration, setIteration] = useState(2)
1220
+
1221
+ return (
1222
+ <>
1223
+ <label>
1224
+ Model iteration {iteration}
1225
+ <input
1226
+ type="range"
1227
+ min={0}
1228
+ max={2}
1229
+ value={iteration}
1230
+ onChange={(event) => setIteration(Number(event.target.value))}
1231
+ />
1232
+ </label>
1233
+ <OrdinalCustomChart
1234
+ data={topicWordRuns}
1235
+ layout={wordTrailsLayout}
1236
+ layoutConfig={{
1237
+ textAccessor: "word",
1238
+ weightAccessor: "probability",
1239
+ columnAccessor: "topic",
1240
+ segmentAccessor: "iteration",
1241
+ segmentDomain: [0, 2],
1242
+ columnOrder: ["Topic A", "Topic B"],
1243
+ repeatWords: true,
1244
+ wordColor: distinctivenessColor,
1245
+ columnColor: (topic) => topicColors[topic],
1246
+ ...wordTrailsProgressiveReveal({
1247
+ currentSegment: iteration,
1248
+ segmentDomain: [0, 2],
1249
+ oldestOpacity: 0.25,
1250
+ }),
1251
+ }}
1252
+ categoryAccessor="topic"
1253
+ valueAccessor="probability"
1254
+ width={760}
1255
+ height={460}
1256
+ tooltip
1257
+ />
1258
+ </>
1259
+ )
1260
+ }
1261
+ ```
1262
+
1263
+ Key APIs: `WordTrailsWordInfo` gives `word`, `column`, `weight`, and `segment` plus the exact `datum`, `dataIndex`, `columnIndex`, and `resolvedColumnColor`. `wordTrailsProgressiveReveal` hides future segments, fades reached history, and reserves every row's layout slot so playback never reflows. Set `combineWeightOpacity: true` only when opacity should also encode word weight.
1264
+
1265
+ ---
1266
+
1187
1267
  ## Physics Charts — Motion With A Settled Projection
1188
1268
 
1189
1269
  ### GaltonBoardChart (distribution drop)
@@ -1356,6 +1436,93 @@ import { GauntletChart } from "semiotic/physics"
1356
1436
 
1357
1437
  Key props: `positiveProperties` / `negativeProperties` define satellite marks on each project core, `gates` place timed obstacles along the route, and the settled projection strip summarizes viability. Prefer GauntletChart for one plan with many attached attributes; use ProcessFlowChart for many independent work items.
1358
1438
 
1439
+ ### CrucibleChart (explicit product lifecycle + immediate replay)
1440
+
1441
+ ```jsx
1442
+ import { useRef } from "react"
1443
+ import { CrucibleChart, buildCrucibleProductEvents } from "semiotic/physics"
1444
+
1445
+ const evidence = [
1446
+ { id: "deploy-log", label: "Deploy log", kind: "record" },
1447
+ { id: "trace", label: "Request trace", kind: "telemetry" },
1448
+ { id: "rollback", label: "Rollback result", kind: "experiment" },
1449
+ { id: "traffic", label: "Traffic spike", kind: "counterclaim" },
1450
+ ]
1451
+
1452
+ const phases = [
1453
+ { id: "charge", label: "Charge", duration: 1, motion: "charge" },
1454
+ { id: "test", label: "Test mechanism", duration: 2.4, motion: "mix" },
1455
+ { id: "publish", label: "Publish", duration: 1.6, motion: "pour" },
1456
+ ]
1457
+
1458
+ const products = [
1459
+ { id: "finding", label: "Deploy caused regression", outletId: "findings" },
1460
+ ]
1461
+
1462
+ const events = [
1463
+ ...buildCrucibleProductEvents({
1464
+ productId: "finding",
1465
+ form: {
1466
+ at: { phaseId: "test", progress: 0.25 },
1467
+ sourceIds: ["deploy-log", "trace"],
1468
+ label: "Chronology and mechanism agree",
1469
+ },
1470
+ contributions: [{
1471
+ at: { phaseId: "test", progress: 0.7 },
1472
+ sourceIds: ["rollback"],
1473
+ label: "Rollback supplies the counterfactual",
1474
+ }],
1475
+ complete: {
1476
+ at: { phaseId: "publish", progress: 0.55 },
1477
+ outletId: "findings",
1478
+ reason: "Three authored observations support the finding",
1479
+ },
1480
+ }),
1481
+ {
1482
+ id: "reject-traffic",
1483
+ at: { phaseId: "test", progress: 0.82 },
1484
+ effects: [{
1485
+ type: "eject",
1486
+ select: { ids: ["traffic"] },
1487
+ outletId: "contradicted",
1488
+ reason: "The regression also occurs at ordinary traffic levels",
1489
+ }],
1490
+ },
1491
+ ]
1492
+
1493
+ export default function IncidentEvidenceCrucible() {
1494
+ const chartRef = useRef(null)
1495
+
1496
+ return (
1497
+ <>
1498
+ <button type="button" onClick={() => chartRef.current?.replay()}>
1499
+ Replay evidence
1500
+ </button>
1501
+ <CrucibleChart
1502
+ ref={chartRef}
1503
+ data={evidence}
1504
+ phases={phases}
1505
+ products={products}
1506
+ events={events}
1507
+ outlets={[
1508
+ { id: "findings", label: "Supported finding", side: "bottom" },
1509
+ { id: "contradicted", label: "Contradicted", side: "right" },
1510
+ ]}
1511
+ idAccessor="id"
1512
+ labelAccessor="label"
1513
+ categoryAccessor="kind"
1514
+ projection={{ groupBy: "outlet", measure: "count" }}
1515
+ playbackRate={0.8}
1516
+ controls={{ playPause: true, reset: true, stepPhase: true, speed: true }}
1517
+ size={[820, 400]}
1518
+ />
1519
+ </>
1520
+ )
1521
+ }
1522
+ ```
1523
+
1524
+ Key APIs: `buildCrucibleProductEvents` emits the explicit `combine → contribute* → complete-product` grammar and deterministic fallback event ids. It never infers analysis, timing, product membership, reasons, or routing. The handle's `replay()` atomically restarts the same bounded tape even during a run; `reset()` restores the origin and pauses, while `rerunMS` schedules repetition after settlement.
1525
+
1359
1526
  ---
1360
1527
 
1361
1528
  ## Value Charts — One Number Is The Visualization