semiotic 3.8.7 → 3.8.8

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 (206) hide show
  1. package/CLAUDE.md +2 -2
  2. package/README.md +56 -46
  3. package/ai/dist/mcp-server.js +28 -2
  4. package/ai/schema.json +124 -4
  5. package/ai/surface-manifest.json +1 -1
  6. package/ai/system-prompt.md +1 -1
  7. package/dist/{chunk-chartContainerDataAudit-JDSVSKGM.module.min.js → chunk-chartContainerDataAudit-IQ3NBN3Q.module.min.js} +1 -1
  8. package/dist/chunk-chunk-2B3AIKUZ.module.min.js +2 -0
  9. package/dist/chunk-chunk-2NVFEB7P.module.min.js +2 -0
  10. package/dist/chunk-chunk-3GCILWPB.module.min.js +2 -0
  11. package/dist/chunk-chunk-46KRGJQP.module.min.js +1 -0
  12. package/dist/{chunk-chunk-5SD6BHVW.module.min.js → chunk-chunk-4MLLQUGW.module.min.js} +1 -1
  13. package/dist/chunk-chunk-57RBPDBQ.module.min.js +2 -0
  14. package/dist/chunk-chunk-5VVNW5AZ.module.min.js +1 -0
  15. package/dist/chunk-chunk-66PCWJUG.module.min.js +1 -0
  16. package/dist/chunk-chunk-7LE56WAE.module.min.js +2 -0
  17. package/dist/chunk-chunk-7T25U75Z.module.min.js +2 -0
  18. package/dist/chunk-chunk-AF53TBSN.module.min.js +2 -0
  19. package/dist/chunk-chunk-BTZYH2IE.module.min.js +1 -0
  20. package/dist/chunk-chunk-BWV55BZK.module.min.js +2 -0
  21. package/dist/{chunk-chunk-FRO4TRXK.module.min.js → chunk-chunk-BZNOAHJV.module.min.js} +1 -1
  22. package/dist/chunk-chunk-CD6PVVS3.module.min.js +2 -0
  23. package/dist/chunk-chunk-DTSNLGRK.module.min.js +2 -0
  24. package/dist/{chunk-chunk-BNGBEY7N.module.min.js → chunk-chunk-FC3NZWYR.module.min.js} +1 -1
  25. package/dist/chunk-chunk-FEPXDKJP.module.min.js +1 -0
  26. package/dist/chunk-chunk-FJ76HWQZ.module.min.js +1 -0
  27. package/dist/chunk-chunk-FRGBMTZR.module.min.js +1 -0
  28. package/dist/chunk-chunk-G75OPF5N.module.min.js +2 -0
  29. package/dist/{chunk-chunk-NH4MEAKP.module.min.js → chunk-chunk-H5IFO6CU.module.min.js} +1 -1
  30. package/dist/chunk-chunk-HADHLMY5.module.min.js +1 -0
  31. package/dist/chunk-chunk-HBFA4NN6.module.min.js +1 -0
  32. package/dist/chunk-chunk-HCNDE26Q.module.min.js +2 -0
  33. package/dist/chunk-chunk-JJ4BSUYL.module.min.js +2 -0
  34. package/dist/chunk-chunk-JRHXQGEV.module.min.js +2 -0
  35. package/dist/chunk-chunk-L6FFYGYS.module.min.js +1 -0
  36. package/dist/{chunk-chunk-Z2AJERX5.module.min.js → chunk-chunk-LJDH3WV3.module.min.js} +1 -1
  37. package/dist/chunk-chunk-LSJUXBMF.module.min.js +1 -0
  38. package/dist/chunk-chunk-N3Q33XCB.module.min.js +2 -0
  39. package/dist/chunk-chunk-NWIGA3UK.module.min.js +1 -0
  40. package/dist/chunk-chunk-OG3TTJGJ.module.min.js +2 -0
  41. package/dist/{chunk-chunk-XEVJDUTH.module.min.js → chunk-chunk-OZK46A5U.module.min.js} +1 -1
  42. package/dist/chunk-chunk-PMR47KRY.module.min.js +2 -0
  43. package/dist/chunk-chunk-QQJNG23C.module.min.js +2 -0
  44. package/dist/{chunk-chunk-LG7YKJAK.module.min.js → chunk-chunk-RGJ6TKAH.module.min.js} +1 -1
  45. package/dist/{chunk-chunk-JWXLNZSM.module.min.js → chunk-chunk-SFLUSZ73.module.min.js} +1 -1
  46. package/dist/chunk-chunk-TCMHJWFJ.module.min.js +1 -0
  47. package/dist/{chunk-chunk-LVHDZAT3.module.min.js → chunk-chunk-UEZ6SHW5.module.min.js} +1 -1
  48. package/dist/chunk-chunk-VUWYT7DY.module.min.js +2 -0
  49. package/dist/{chunk-chunk-OI7R7EJB.module.min.js → chunk-chunk-W5HWGQMD.module.min.js} +1 -1
  50. package/dist/chunk-chunk-WFHZHWT7.module.min.js +1 -0
  51. package/dist/chunk-chunk-WGROBM3I.module.min.js +2 -0
  52. package/dist/{chunk-chunk-GU2EJIDJ.module.min.js → chunk-chunk-WSDJFBKX.module.min.js} +1 -1
  53. package/dist/chunk-statisticalOverlays-HMYYSGPE.module.min.js +2 -0
  54. package/dist/components/charts/index.d.ts +2 -2
  55. package/dist/components/charts/network/ProcessSankey.d.ts +105 -74
  56. package/dist/components/charts/network/processSankey/accessors.d.ts +7 -0
  57. package/dist/components/charts/network/processSankey/algorithm.d.ts +14 -193
  58. package/dist/components/charts/network/processSankey/axisChrome.d.ts +31 -0
  59. package/dist/components/charts/network/processSankey/bandPaths.d.ts +45 -0
  60. package/dist/components/charts/network/processSankey/buildScenes.d.ts +41 -3
  61. package/dist/components/charts/network/processSankey/fixtures.d.ts +17 -0
  62. package/dist/components/charts/network/processSankey/frameMargins.d.ts +11 -0
  63. package/dist/components/charts/network/processSankey/groupBonding.d.ts +13 -0
  64. package/dist/components/charts/network/processSankey/inventoryAtTime.d.ts +41 -0
  65. package/dist/components/charts/network/processSankey/labelPlacement.d.ts +34 -0
  66. package/dist/components/charts/network/processSankey/layoutGeometry.d.ts +47 -0
  67. package/dist/components/charts/network/processSankey/layoutOrchestrator.d.ts +44 -0
  68. package/dist/components/charts/network/processSankey/layoutQualityProduct.d.ts +27 -0
  69. package/dist/components/charts/network/processSankey/massSimulation.d.ts +16 -0
  70. package/dist/components/charts/network/processSankey/ordering.d.ts +55 -0
  71. package/dist/components/charts/network/processSankey/orderingBond.d.ts +33 -0
  72. package/dist/components/charts/network/processSankey/orientation.d.ts +5 -0
  73. package/dist/components/charts/network/processSankey/packing.d.ts +8 -0
  74. package/dist/components/charts/network/processSankey/packingCache.d.ts +23 -0
  75. package/dist/components/charts/network/processSankey/processSankeyLayoutAsync.d.ts +27 -0
  76. package/dist/components/charts/network/processSankey/processSankeyLayoutWorkerClient.d.ts +72 -0
  77. package/dist/components/charts/network/processSankey/processSankeyTooltip.d.ts +26 -0
  78. package/dist/components/charts/network/processSankey/processSankeyTypes.d.ts +163 -0
  79. package/dist/components/charts/network/processSankey/ribbonInputs.d.ts +26 -2
  80. package/dist/components/charts/network/processSankey/ribbonRunway.d.ts +45 -0
  81. package/dist/components/charts/network/processSankey/streamingLayout.d.ts +23 -0
  82. package/dist/components/charts/network/processSankey/time.d.ts +11 -0
  83. package/dist/components/charts/network/processSankey/useProcessSankeyPush.d.ts +29 -0
  84. package/dist/components/charts/network/processSankey/useProcessSankeyScenes.d.ts +26 -0
  85. package/dist/components/charts/network/processSankey/validation.d.ts +33 -0
  86. package/dist/components/charts/shared/chartFamilySets.d.ts +1 -0
  87. package/dist/components/charts/shared/formatUtils.d.ts +12 -1
  88. package/dist/components/charts/shared/hatchFill.d.ts +2 -0
  89. package/dist/components/charts/shared/hooks.d.ts +1 -1
  90. package/dist/components/charts/shared/leastSquaresRegression.d.ts +31 -0
  91. package/dist/components/charts/shared/styleRules.d.ts +5 -1
  92. package/dist/components/charts/shared/useChartLegend.d.ts +6 -0
  93. package/dist/components/charts/shared/useChartSetup.d.ts +1 -1
  94. package/dist/components/charts/shared/validateProps.d.ts +2 -2
  95. package/dist/components/charts/shared/withChartWrapper.d.ts +0 -6
  96. package/dist/components/data/numericFieldProfiler.d.ts +2 -0
  97. package/dist/components/recipes/layout1d.d.ts +68 -0
  98. package/dist/components/semiotic-network.d.ts +2 -2
  99. package/dist/components/semiotic-recipes-core.d.ts +2 -0
  100. package/dist/components/semiotic.d.ts +2 -0
  101. package/dist/components/server/staticSVGChrome.d.ts +2 -1
  102. package/dist/components/store/createStore.d.ts +2 -0
  103. package/dist/components/stream/OrdinalPipelineStore.d.ts +3 -0
  104. package/dist/components/stream/PipelineStore.d.ts +5 -0
  105. package/dist/components/stream/accessorUtils.d.ts +21 -0
  106. package/dist/components/stream/frameKeyboardNavigation.d.ts +3 -2
  107. package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +3 -8
  108. package/dist/components/stream/layouts/index.d.ts +1 -1
  109. package/dist/components/stream/moduleWorkerSession.d.ts +67 -0
  110. package/dist/components/stream/networkTypes.d.ts +2 -0
  111. package/dist/components/stream/ordinalSceneBuilders/sceneBuilderMap.d.ts +2 -1
  112. package/dist/components/stream/physics/PhysicsKernel.d.ts +9 -0
  113. package/dist/components/stream/pipelineIntroCancellation.d.ts +6 -0
  114. package/dist/components/stream/pipelineTransitions.d.ts +15 -1
  115. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +16 -4
  116. package/dist/components/stream/renderers/symbolCanvasRenderer.d.ts +4 -0
  117. package/dist/components/stream/symbolPath.d.ts +8 -0
  118. package/dist/components/stream/types.d.ts +2 -0
  119. package/dist/components/stream/useCanvasFrameHost.d.ts +6 -0
  120. package/dist/components/stream/useSemanticFrameInteractions.d.ts +12 -3
  121. package/dist/components/stream/xyFrameAxisTypes.d.ts +4 -0
  122. package/dist/forceLayoutWorker.js +1 -1
  123. package/dist/geo.min.js +1 -1
  124. package/dist/geo.module.min.js +1 -1
  125. package/dist/network.min.js +1 -1
  126. package/dist/network.module.min.js +1 -1
  127. package/dist/ordinal.min.js +1 -1
  128. package/dist/ordinal.module.min.js +1 -1
  129. package/dist/physics.min.js +1 -1
  130. package/dist/physics.module.min.js +1 -1
  131. package/dist/physicsWorker.js +1 -1
  132. package/dist/processSankeyLayoutWorker.js +1 -0
  133. package/dist/realtime.min.js +1 -1
  134. package/dist/realtime.module.min.js +1 -1
  135. package/dist/semiotic-ai-core.min.js +1 -1
  136. package/dist/semiotic-ai-core.module.min.js +1 -1
  137. package/dist/semiotic-ai.min.js +1 -1
  138. package/dist/semiotic-ai.module.min.js +1 -1
  139. package/dist/semiotic-experimental-vacp.min.js +1 -1
  140. package/dist/semiotic-experimental-vacp.module.min.js +1 -1
  141. package/dist/semiotic-experimental.min.js +1 -1
  142. package/dist/semiotic-experimental.module.min.js +1 -1
  143. package/dist/semiotic-network.d.ts +2 -2
  144. package/dist/semiotic-realtime-core.min.js +1 -1
  145. package/dist/semiotic-realtime-core.module.min.js +1 -1
  146. package/dist/semiotic-recipes-core.d.ts +2 -0
  147. package/dist/semiotic-recipes-core.min.js +1 -1
  148. package/dist/semiotic-recipes-core.module.min.js +1 -1
  149. package/dist/semiotic-recipes.min.js +1 -1
  150. package/dist/semiotic-recipes.module.min.js +1 -1
  151. package/dist/semiotic-server-edge.min.js +1 -1
  152. package/dist/semiotic-server-edge.module.min.js +1 -1
  153. package/dist/semiotic-server-node.min.js +1 -1
  154. package/dist/semiotic-server-node.module.min.js +1 -1
  155. package/dist/semiotic-themes-core.module.min.js +1 -1
  156. package/dist/semiotic-themes-react.module.min.js +1 -1
  157. package/dist/semiotic-themes.module.min.js +1 -1
  158. package/dist/semiotic-utils-core.min.js +1 -1
  159. package/dist/semiotic-utils-core.module.min.js +1 -1
  160. package/dist/semiotic-utils-react.module.min.js +1 -1
  161. package/dist/semiotic-utils.min.js +1 -1
  162. package/dist/semiotic-utils.module.min.js +1 -1
  163. package/dist/semiotic-value.min.js +1 -1
  164. package/dist/semiotic-value.module.min.js +1 -1
  165. package/dist/semiotic.d.ts +2 -0
  166. package/dist/semiotic.min.js +1 -1
  167. package/dist/semiotic.module.min.js +1 -1
  168. package/dist/server.min.js +1 -1
  169. package/dist/server.module.min.js +1 -1
  170. package/dist/xy.min.js +1 -1
  171. package/dist/xy.module.min.js +1 -1
  172. package/package.json +4 -3
  173. package/dist/chunk-chunk-2YAZHXL4.module.min.js +0 -2
  174. package/dist/chunk-chunk-3NGIKFD6.module.min.js +0 -1
  175. package/dist/chunk-chunk-7TTBHSAG.module.min.js +0 -2
  176. package/dist/chunk-chunk-7ZDJSYKI.module.min.js +0 -2
  177. package/dist/chunk-chunk-BGHPD3RA.module.min.js +0 -1
  178. package/dist/chunk-chunk-BMRZ2SPU.module.min.js +0 -2
  179. package/dist/chunk-chunk-C7APLVQD.module.min.js +0 -2
  180. package/dist/chunk-chunk-DGWFBOGB.module.min.js +0 -1
  181. package/dist/chunk-chunk-DIVE2DRA.module.min.js +0 -2
  182. package/dist/chunk-chunk-DSNGDNJY.module.min.js +0 -1
  183. package/dist/chunk-chunk-FBUNUIPV.module.min.js +0 -2
  184. package/dist/chunk-chunk-G7QVPZUD.module.min.js +0 -2
  185. package/dist/chunk-chunk-GBPYV4FP.module.min.js +0 -2
  186. package/dist/chunk-chunk-KXAFCCDB.module.min.js +0 -2
  187. package/dist/chunk-chunk-LWITSR2O.module.min.js +0 -2
  188. package/dist/chunk-chunk-MX35T6RX.module.min.js +0 -2
  189. package/dist/chunk-chunk-NJETWX42.module.min.js +0 -2
  190. package/dist/chunk-chunk-NW25WGLS.module.min.js +0 -2
  191. package/dist/chunk-chunk-ONMLEXHR.module.min.js +0 -2
  192. package/dist/chunk-chunk-OY66GCE6.module.min.js +0 -1
  193. package/dist/chunk-chunk-PRDGLMJT.module.min.js +0 -2
  194. package/dist/chunk-chunk-PZFT457G.module.min.js +0 -1
  195. package/dist/chunk-chunk-Q3WW6JGR.module.min.js +0 -1
  196. package/dist/chunk-chunk-Q6XKQTOQ.module.min.js +0 -1
  197. package/dist/chunk-chunk-RJRM2E6P.module.min.js +0 -1
  198. package/dist/chunk-chunk-RPL7WYXI.module.min.js +0 -1
  199. package/dist/chunk-chunk-V3OAKG32.module.min.js +0 -1
  200. package/dist/chunk-chunk-WCX6U47H.module.min.js +0 -2
  201. package/dist/chunk-chunk-WLOIUMWG.module.min.js +0 -2
  202. package/dist/chunk-chunk-XEGXX4F7.module.min.js +0 -1
  203. package/dist/chunk-chunk-XFRBLXYM.module.min.js +0 -1
  204. package/dist/chunk-chunk-ZXYDYAB7.module.min.js +0 -2
  205. package/dist/chunk-statisticalOverlays-6MVAK5RW.module.min.js +0 -2
  206. package/dist/components/stream/renderers/networkSymbolRenderer.d.ts +0 -2
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` (145KB gz), `semiotic/ordinal` (120KB gz), `semiotic/network` (126KB gz), `semiotic/geo` (103KB gz), `semiotic/realtime` (153KB gz), `semiotic/realtime/core` (144KB gz), `semiotic/realtime/react` (1KB gz), `semiotic/server` (210KB gz), `semiotic/server/node` (210KB gz), `semiotic/server/edge` (224KB gz), `semiotic/utils` (83KB gz), `semiotic/utils/core` (82KB gz), `semiotic/utils/react` (6KB gz), `semiotic/recipes` (88KB gz), `semiotic/recipes/core` (87KB 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` (160KB gz), `semiotic/physics/matter` (1KB gz), `semiotic/physics/rapier` (1KB gz), `semiotic/ai` (486KB gz), `semiotic/ai/core` (80KB gz), `semiotic/controls` (12KB gz), `semiotic/rough` (4KB gz). Full `semiotic` is 389KB gz.
7
+ - **Use sub-path imports** — `semiotic/xy` (145KB gz), `semiotic/ordinal` (121KB gz), `semiotic/network` (145KB gz), `semiotic/geo` (104KB gz), `semiotic/realtime` (154KB gz), `semiotic/realtime/core` (144KB gz), `semiotic/realtime/react` (1KB gz), `semiotic/server` (224KB gz), `semiotic/server/node` (224KB gz), `semiotic/server/edge` (240KB gz), `semiotic/utils` (85KB gz), `semiotic/utils/core` (84KB gz), `semiotic/utils/react` (6KB gz), `semiotic/recipes` (89KB gz), `semiotic/recipes/core` (89KB 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` (161KB gz), `semiotic/physics/matter` (1KB gz), `semiotic/physics/rapier` (1KB gz), `semiotic/ai` (505KB gz), `semiotic/ai/core` (81KB gz), `semiotic/controls` (12KB gz), `semiotic/rough` (4KB gz). Full `semiotic` is 407KB 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
 
@@ -65,7 +65,7 @@ All ordinal: `colorBy`, `colorScheme`, `categoryFormat` (string|ReactNode), `sho
65
65
 
66
66
  **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.
67
67
  **SankeyDiagram** — `edges`, `nodes`, `valueAccessor`, `nodeIdAccessor`, `colorBy`, `edgeColorBy`, `orientation`, `nodeAlign`, `nodeWidth`, `nodePaddingRatio`, `showLabels`
68
- **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.
68
+ **ProcessSankey** — temporal sankey with real time x-axis. `nodes`, `edges` (each with `startTime`/`endTime`; zero-duration OK), `domain` (req `[t0, t1]`), `axisTicks?`, `xExtentAccessor` (optional `[start, end]` lifetime per node), `nodeLabel` (visible lane-label accessor), `colorBy`/`colorScheme`/`showLegend`/`legendPosition`, `styleRules` (band fills; `fill` may be a color or **HatchFill** — canvas + SSR), `selection`/`linkedHover`, `selectionDatum` ("raw" default | "scene" — what selection predicates see), `pairing` ("value"|"temporal", default temporal), `packing` ("off"|"reuse"), `laneOrder` ("crossing-min"|"inside-out"|"crossing-min+inside-out"|"insertion"), `maxValueScale` (pixels-per-unit cap), `lanePlacement` ("stack"|"hug" — hug/binding maxValueScale also post-scale geometry-refines order), `lifetimeMode` ("full"|"half", default half), `ribbonLane` ("source"|"target"|"both"), `ribbonMinRun` (0 exact | pixel minimum | "auto" — **source-only feeder** runway + source-band handoff; not a general min-edge length), `showLaneRails`, `showLabels` (true|false|"auto" density budget; auto sheds keep deferred text for selection reveal), `labelPriorityAccessor` / `maxLabels` (auto priority + hard cap), `showQualityReadout` (crossings/pixel + non-fatal validation warnings), `layoutExecution` ("auto"|"worker"|"sync" — auto offloads packing/ordering to a module worker by cost; SSR always sync), `layoutWorkerThreshold`, `layoutLoadingContent`, `onLayoutStateChange` (`"pending"|"ready"|"error"`), `showParticles` + `particleStyle`, `timeFormat`/`valueFormat`, push API via ref (`getScales` → time + centerlines; `getCustomLayout` → `{ layout, bands, ribbons, warnings, … }` with `layout.layoutQuality`). Pure quality helpers from `semiotic/network`: `diagnoseProcessSankeyLayout` / `diagnoseProcessSankeyProps` / `explainProcessSankeyLayout` (also fed into `diagnoseConfig("ProcessSankey", props)`). **Validation policy**: static/MCP hard-fail duplicate ids; React push warns on duplicates and strips non-finite systemIn/Out times. Static-graph cycles OK as long as edges move forward in time. Use ProcessSankey for time-stamped events; SankeyDiagram for static snapshots.
69
69
  **ChordDiagram** — `edges`, `nodes`, `valueAccessor`, `edgeColorBy`, `padAngle`, `showLabels`
70
70
  **TreeDiagram** — `data` (root), `layout`, `orientation`, `childrenAccessor`, `colorBy`, `colorByDepth`
71
71
  **Treemap** — `data` (root), `childrenAccessor`, `valueAccessor`, `colorBy`, `colorByDepth`, `showLabels`
package/README.md CHANGED
@@ -17,22 +17,32 @@ AI coding assistants generate correct chart code on the first try.
17
17
  <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%">
18
18
  <!-- semiotic-readme-dashboard:end -->
19
19
 
20
- ## What's New in 3.8.7
21
-
22
- 3.8.7 hardens the physics, server-rendering, and agent-evaluation paths exercised after the 3.8.6
23
- release:
24
-
25
- - Physics reduced-motion settling now admits paced spawns and completes time-driven event tapes;
26
- runtime preference changes no longer accumulate a giant animation delta. Chain-reaction tiles
27
- and lane labels no longer overlap, and physics chrome follows the active theme.
28
- - BigNumber now has native static render evidence, exact source facts flow through reader
29
- grounding, and agent guidance keeps value-component props separate from chart-HOC props.
30
- - Static SVG preserves chart-level primitive styling and heatmap cell borders, while
31
- horizontal legends clear axis ticks and titles consistently in browser and server renders.
32
- - Physics charts participate in shared linked hover, while the clearer `UnitPileChart` and
33
- `PacketFlowChart` names ship with permanent aliases for their previous names.
34
- - The public model-evaluation reading room preserves the complete baseline and three targeted
35
- follow-up trials, including the unresolved Luna gauge result rather than smoothing it away.
20
+ ## What's New in 3.8.8
21
+
22
+ 3.8.8 centers on **ProcessSankey** — temporal process flow with a real time axis — plus the
23
+ history-river docs that exercise it hard:
24
+
25
+ - Packing, bonded lane groups, crossing-aware ordering, hug placement, quality metrics, feeder
26
+ runway, lifecycle cutouts, worker layout, push, and selection/linkedHover are all first-class.
27
+ - Vertical history rivers for Germany and the United States ship as docs examples (sync layout
28
+ for deterministic paint; compact checked-in data projections).
29
+ - Agent/docs gates (capabilities, API surface, JSDoc examples, llms, visual baselines) track
30
+ ProcessSankey; network entry-graph budgets absorb the new surface.
31
+
32
+ ```jsx
33
+ import { ProcessSankey } from "semiotic/network"
34
+
35
+ <ProcessSankey
36
+ nodes={nodes}
37
+ edges={timedEdges}
38
+ domain={[t0, t1]}
39
+ packing="reuse"
40
+ laneOrder="crossing-min+inside-out"
41
+ lanePlacement="hug"
42
+ />
43
+ ```
44
+
45
+ Simple charts stay five lines:
36
46
 
37
47
  ```jsx
38
48
  import { LineChart } from "semiotic/xy"
@@ -395,34 +405,34 @@ The numbers below are **first-party artifact cost**: the gzip size of Semiotic's
395
405
  | Entry Point | gzip | What's inside |
396
406
  |---|---|---|
397
407
  | `semiotic/xy` | **145 KB** | LineChart, AreaChart, Scatterplot, Heatmap, + 8 more XY charts |
398
- | `semiotic/ordinal` | **120 KB** | BarChart, PieChart, BoxPlot, Histogram, + 11 more categorical charts |
399
- | `semiotic/network` | **126 KB** | ForceDirectedGraph, SankeyDiagram, ProcessSankey, Treemap, + 4 more |
400
- | `semiotic/geo` | **103 KB** | ChoroplethMap, FlowMap, DistanceCartogram, ProportionalSymbolMap |
401
- | `semiotic/realtime` | **153 KB** | RealtimeLineChart, RealtimeHistogram, + 4 streaming charts |
408
+ | `semiotic/ordinal` | **121 KB** | BarChart, PieChart, BoxPlot, Histogram, + 11 more categorical charts |
409
+ | `semiotic/network` | **145 KB** | ForceDirectedGraph, SankeyDiagram, ProcessSankey, Treemap, + 4 more |
410
+ | `semiotic/geo` | **104 KB** | ChoroplethMap, FlowMap, DistanceCartogram, ProportionalSymbolMap |
411
+ | `semiotic/realtime` | **154 KB** | RealtimeLineChart, RealtimeHistogram, + 4 streaming charts |
402
412
  | `semiotic/realtime/core` | **144 KB** | Streaming chart types, HOCs, and buffer helpers |
403
413
  | `semiotic/realtime/react` | **1 KB** | Stream status and synced push hooks |
404
- | `semiotic/server` | **210 KB** | renderChart, renderDashboard, renderToImage, renderToAnimatedGif |
405
- | `semiotic/server/node` | **210 KB** | renderChart, renderDashboard, renderToImage, renderToAnimatedGif |
406
- | `semiotic/server/edge` | **224 KB** | renderChart, renderChartWithEvidence, renderToStaticSVG, renderDashboard |
407
- | `semiotic/utils` | **83 KB** | ThemeProvider, numeric/accessibility audits, serialization — no chart components |
408
- | `semiotic/utils/core` | **82 KB** | Pure theme helpers, numeric/accessibility audits, and serialization |
414
+ | `semiotic/server` | **224 KB** | renderChart, renderDashboard, renderToImage, renderToAnimatedGif |
415
+ | `semiotic/server/node` | **224 KB** | renderChart, renderDashboard, renderToImage, renderToAnimatedGif |
416
+ | `semiotic/server/edge` | **240 KB** | renderChart, renderChartWithEvidence, renderToStaticSVG, renderDashboard |
417
+ | `semiotic/utils` | **85 KB** | ThemeProvider, numeric/accessibility audits, serialization — no chart components |
418
+ | `semiotic/utils/core` | **84 KB** | Pure theme helpers, numeric/accessibility audits, and serialization |
409
419
  | `semiotic/utils/react` | **6 KB** | ThemeProvider, useTheme, useReducedMotion, useHighContrast, useStreamStatus |
410
- | `semiotic/recipes` | **88 KB** | Pure layout functions (waffle, marimekko, flextree, dagre, …) |
411
- | `semiotic/recipes/core` | **87 KB** | Pure layout functions (waffle, marimekko, flextree, dagre, …) |
420
+ | `semiotic/recipes` | **89 KB** | Pure layout functions (waffle, marimekko, flextree, dagre, …) |
421
+ | `semiotic/recipes/core` | **89 KB** | Pure layout functions (waffle, marimekko, flextree, dagre, …) |
412
422
  | `semiotic/recipes/react` | **2 KB** | Glyph and React layout-selection helpers |
413
423
  | `semiotic/themes` | **7 KB** | Theme presets only (tufte, carbon, etc.) |
414
424
  | `semiotic/themes/core` | **7 KB** | Theme presets and token helpers |
415
425
  | `semiotic/themes/react` | **6 KB** | ThemeProvider/useTheme and hooks |
416
426
  | `semiotic/data` | **4 KB** | bin, rollup, groupBy, pivot, fromVegaLite |
417
427
  | `semiotic/value` | **8 KB** | BigNumber — focal-value KPI / scorecard (SingleValueFrame POC) |
418
- | `semiotic/physics` | **160 KB** | GaltonBoardChart, EventDropChart, UnitPileChart, CollisionSwarmChart, PacketFlowChart, PhysicsCustomChart |
428
+ | `semiotic/physics` | **161 KB** | GaltonBoardChart, EventDropChart, UnitPileChart, CollisionSwarmChart, PacketFlowChart, PhysicsCustomChart |
419
429
  | `semiotic/physics/matter` | **1 KB** | Matter.js migration helpers + optional peer guard (no chart components) |
420
430
  | `semiotic/physics/rapier` | **1 KB** | Rapier peer guard + adapter decision metadata (no chart components) |
421
- | `semiotic/ai` | **486 KB** | All schema-backed charts + validation — optimized for LLM code generation |
422
- | `semiotic/ai/core` | **80 KB** | suggestCharts, auditData, describeChart, repairChartConfig, tool adapters — no chart components |
431
+ | `semiotic/ai` | **505 KB** | All schema-backed charts + validation — optimized for LLM code generation |
432
+ | `semiotic/ai/core` | **81 KB** | suggestCharts, auditData, describeChart, repairChartConfig, tool adapters — no chart components |
423
433
  | `semiotic/controls` | **12 KB** | DirectManipulationControl, CircularBrush, MobileStandardControls, auditVisualizationControls — no frame renderer |
424
434
  | `semiotic/rough` | **4 KB** | Optional deterministic Rough.js paint backend — exact Semiotic geometry remains authoritative |
425
- | `semiotic` | **389 KB** | Everything below (full bundle) |
435
+ | `semiotic` | **407 KB** | Everything below (full bundle) |
426
436
 
427
437
  <!-- semiotic-bundle-sizes:end -->
428
438
 
@@ -443,29 +453,29 @@ Method: fresh `npm pack --ignore-scripts` tarball → temporary consumer → min
443
453
 
444
454
  | Public named import | Runtime | gzip cold-consumer bundle |
445
455
  |---|---:|---:|
446
- | `import { LineChart } from "semiotic"` | browser | **153.1 KiB** |
447
- | `import { LineChart } from "semiotic/xy"` | browser | **153.3 KiB** |
448
- | `import { BarChart } from "semiotic/ordinal"` | browser | **123.5 KiB** |
449
- | `import { SankeyDiagram } from "semiotic/network"` | browser | **128.1 KiB** |
450
- | `import { RealtimeLineChart } from "semiotic/realtime"` | browser | **122.8 KiB** |
451
- | `import { RingBuffer } from "semiotic/realtime/core"` | browser | **170.6 KiB** |
456
+ | `import { LineChart } from "semiotic"` | browser | **153.6 KiB** |
457
+ | `import { LineChart } from "semiotic/xy"` | browser | **153.8 KiB** |
458
+ | `import { BarChart } from "semiotic/ordinal"` | browser | **123.9 KiB** |
459
+ | `import { SankeyDiagram } from "semiotic/network"` | browser | **146.3 KiB** |
460
+ | `import { RealtimeLineChart } from "semiotic/realtime"` | browser | **123.5 KiB** |
461
+ | `import { RingBuffer } from "semiotic/realtime/core"` | browser | **171.0 KiB** |
452
462
  | `import { useStreamStatus } from "semiotic/realtime/react"` | browser | **0.6 KiB** |
453
- | `import { GaltonBoardChart } from "semiotic/physics"` | browser | **134.2 KiB** |
463
+ | `import { GaltonBoardChart } from "semiotic/physics"` | browser | **134.3 KiB** |
454
464
  | `import { MATTER_PHYSICS_CAPABILITIES } from "semiotic/physics/matter"` | browser | **0.2 KiB** |
455
465
  | `import { RAPIER_PHYSICS_CAPABILITIES } from "semiotic/physics/rapier"` | browser | **0.2 KiB** |
456
- | `import { renderChart } from "semiotic/server"` | node | **269.8 KiB** |
457
- | `import { generateFrameSVGs } from "semiotic/server/edge"` | node | **164.5 KiB** |
458
- | `import { renderToImage } from "semiotic/server/node"` | node | **270.2 KiB** |
459
- | `import { suggestCharts } from "semiotic/ai"` | browser | **193.1 KiB** |
460
- | `import { suggestCharts } from "semiotic/ai/core"` | browser | **36.3 KiB** |
466
+ | `import { renderChart } from "semiotic/server"` | node | **286.2 KiB** |
467
+ | `import { generateFrameSVGs } from "semiotic/server/edge"` | node | **165.3 KiB** |
468
+ | `import { renderToImage } from "semiotic/server/node"` | node | **286.7 KiB** |
469
+ | `import { suggestCharts } from "semiotic/ai"` | browser | **193.4 KiB** |
470
+ | `import { suggestCharts } from "semiotic/ai/core"` | browser | **36.4 KiB** |
461
471
  | `import { bin } from "semiotic/data"` | browser | **0.4 KiB** |
462
- | `import { ChoroplethMap } from "semiotic/geo"` | browser | **108.5 KiB** |
472
+ | `import { ChoroplethMap } from "semiotic/geo"` | browser | **108.7 KiB** |
463
473
  | `import { createRoughRenderMode } from "semiotic/rough"` | browser | **3.4 KiB** |
464
474
  | `import { resolveThemePreset } from "semiotic/themes"` | browser | **3.4 KiB** |
465
475
  | `import { resolveThemePreset } from "semiotic/themes/core"` | browser | **3.4 KiB** |
466
476
  | `import { ThemeProvider } from "semiotic/themes/react"` | browser | **4.4 KiB** |
467
- | `import { validateProps } from "semiotic/utils"` | browser | **8.2 KiB** |
468
- | `import { smartTickFormat } from "semiotic/utils/core"` | browser | **0.7 KiB** |
477
+ | `import { validateProps } from "semiotic/utils"` | browser | **8.5 KiB** |
478
+ | `import { smartTickFormat } from "semiotic/utils/core"` | browser | **0.9 KiB** |
469
479
  | `import { useReducedMotion } from "semiotic/utils/react"` | browser | **0.3 KiB** |
470
480
  | `import { waffleLayout } from "semiotic/recipes"` | browser | **2.5 KiB** |
471
481
  | `import { waffleLayout } from "semiotic/recipes/core"` | browser | **2.5 KiB** |
@@ -3645,7 +3645,12 @@ var require_fast_uri = __commonJS({
3645
3645
  }
3646
3646
  function resolve2(baseURI, relativeURI, options) {
3647
3647
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3648
- const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
3648
+ const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
3649
+ const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
3650
+ if (baseMalformed || relativeMalformed) {
3651
+ throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
3652
+ }
3653
+ const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
3649
3654
  schemelessOptions.skipEscape = true;
3650
3655
  return serialize(resolved, schemelessOptions);
3651
3656
  }
@@ -3770,6 +3775,8 @@ var require_fast_uri = __commonJS({
3770
3775
  return uriTokens.join("");
3771
3776
  }
3772
3777
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3778
+ var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
3779
+ var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
3773
3780
  function getParseError(parsed, matches) {
3774
3781
  if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
3775
3782
  return 'URI path must start with "/" when authority is present.';
@@ -3799,6 +3806,25 @@ var require_fast_uri = __commonJS({
3799
3806
  uri = "//" + uri;
3800
3807
  }
3801
3808
  }
3809
+ const authorityMatch = uri.match(AUTHORITY_PREFIX);
3810
+ if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
3811
+ parsed.error = "URI authority must not contain a literal backslash.";
3812
+ malformedAuthorityOrPort = true;
3813
+ }
3814
+ const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
3815
+ if (introducerMatch !== null) {
3816
+ const region = introducerMatch[1];
3817
+ const normalizedRegion = region.replace(/[\t\n\r]/g, "");
3818
+ if (normalizedRegion.length >= 2) {
3819
+ if (normalizedRegion.slice(0, 2) !== "//") {
3820
+ parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
3821
+ malformedAuthorityOrPort = true;
3822
+ } else if (region.length !== normalizedRegion.length) {
3823
+ parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
3824
+ malformedAuthorityOrPort = true;
3825
+ }
3826
+ }
3827
+ }
3802
3828
  const matches = uri.match(URI_PARSE);
3803
3829
  if (matches) {
3804
3830
  parsed.scheme = matches[1];
@@ -3842,7 +3868,7 @@ var require_fast_uri = __commonJS({
3842
3868
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
3843
3869
  if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
3844
3870
  try {
3845
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
3871
+ parsed.host = new URL("http://" + parsed.host).hostname;
3846
3872
  } catch (e) {
3847
3873
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
3848
3874
  }
package/ai/schema.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "name": "semiotic",
4
- "version": "3.8.7",
4
+ "version": "3.8.8",
5
5
  "description": "React data visualization library for charts, networks, and beyond",
6
6
  "tools": [
7
7
  {
@@ -12222,7 +12222,7 @@
12222
12222
  "type": "function",
12223
12223
  "function": {
12224
12224
  "name": "ProcessSankey",
12225
- "description": "Temporal sankey with a real time x-axis. Edges carry startTime/endTime; nodes can declare an explicit xExtent lifetime. Use for timestamped flow events (PR commits, campaign-finance contributions, supply-chain shipments).",
12225
+ "description": "Temporal sankey with a real time axis. Edges carry startTime/endTime; nodes can declare an explicit xExtent lifetime. Use horizontal flow for operational timelines or vertical flow for history-river and lineage views.",
12226
12226
  "parameters": {
12227
12227
  "type": "object",
12228
12228
  "properties": {
@@ -12448,7 +12448,7 @@
12448
12448
  },
12449
12449
  "domain": {
12450
12450
  "type": "array",
12451
- "description": "[tStart, tEnd] of the chart's x-axis (required)."
12451
+ "description": "[tStart, tEnd] of the chart's time axis (required)."
12452
12452
  },
12453
12453
  "axisTicks": {
12454
12454
  "type": "array",
@@ -12486,6 +12486,14 @@
12486
12486
  "function"
12487
12487
  ]
12488
12488
  },
12489
+ "nodeLabel": {
12490
+ "type": "string",
12491
+ "description": "Key or accessor for visible lane labels; defaults to nodeIdAccessor.",
12492
+ "x-semiotic-runtime-types": [
12493
+ "string",
12494
+ "function"
12495
+ ]
12496
+ },
12489
12497
  "startTimeAccessor": {
12490
12498
  "type": "string",
12491
12499
  "default": "startTime",
@@ -12502,6 +12510,22 @@
12502
12510
  "function"
12503
12511
  ]
12504
12512
  },
12513
+ "systemInTimeAccessor": {
12514
+ "type": "string",
12515
+ "description": "Optional source-side inventory arrival time, before the ribbon departs. Values before the visible domain fade inward from its opening boundary.",
12516
+ "x-semiotic-runtime-types": [
12517
+ "string",
12518
+ "function"
12519
+ ]
12520
+ },
12521
+ "systemOutTimeAccessor": {
12522
+ "type": "string",
12523
+ "description": "Optional target-side inventory departure time, after the ribbon arrives.",
12524
+ "x-semiotic-runtime-types": [
12525
+ "string",
12526
+ "function"
12527
+ ]
12528
+ },
12505
12529
  "xExtentAccessor": {
12506
12530
  "type": "string",
12507
12531
  "default": "xExtent",
@@ -12510,6 +12534,14 @@
12510
12534
  "function"
12511
12535
  ]
12512
12536
  },
12537
+ "groupBy": {
12538
+ "type": "string",
12539
+ "description": "Optional node key/accessor. Equal non-empty values form contiguous, stream-like lane blocks with a zero-pixel internal gutter by default.",
12540
+ "x-semiotic-runtime-types": [
12541
+ "string",
12542
+ "function"
12543
+ ]
12544
+ },
12513
12545
  "edgeIdAccessor": {
12514
12546
  "type": "string",
12515
12547
  "default": "id",
@@ -12518,6 +12550,15 @@
12518
12550
  "function"
12519
12551
  ]
12520
12552
  },
12553
+ "orientation": {
12554
+ "type": "string",
12555
+ "enum": [
12556
+ "horizontal",
12557
+ "vertical"
12558
+ ],
12559
+ "description": "Direction of time: left-to-right or top-to-bottom.",
12560
+ "default": "horizontal"
12561
+ },
12521
12562
  "pairing": {
12522
12563
  "type": "string",
12523
12564
  "enum": [
@@ -12533,7 +12574,7 @@
12533
12574
  "off",
12534
12575
  "reuse"
12535
12576
  ],
12536
- "description": "Lane reuse — pack lifetime-disjoint nodes into the same row.",
12577
+ "description": "Pack nodes with disjoint occupied-band windows into shared rows, favoring straight handoffs, matching process roles, and destination-coherent source feeders.",
12537
12578
  "default": "reuse"
12538
12579
  },
12539
12580
  "laneOrder": {
@@ -12546,6 +12587,52 @@
12546
12587
  ],
12547
12588
  "default": "crossing-min"
12548
12589
  },
12590
+ "maxValueScale": {
12591
+ "type": "number",
12592
+ "description": "Optional pixels-per-value cap that prevents sparse bands from inflating to fill the plot."
12593
+ },
12594
+ "lanePlacement": {
12595
+ "type": "string",
12596
+ "enum": [
12597
+ "stack",
12598
+ "hug"
12599
+ ],
12600
+ "description": "Use capped-scale slack to pull connected lanes together while preserving order and clearance. When hug (or a binding maxValueScale) is active, a bounded post-scale geometry refine re-scores adjacent lane order under rendered pixel/transit cost without raising crossings or exclusive-handoff span.",
12601
+ "default": "stack"
12602
+ },
12603
+ "showLabels": {
12604
+ "type": [
12605
+ "boolean",
12606
+ "string"
12607
+ ],
12608
+ "enum": [
12609
+ "auto"
12610
+ ],
12611
+ "description": "Node labels: true, false, or density-budgeted auto. With auto, shed labels reappear under selection.",
12612
+ "default": true
12613
+ },
12614
+ "labelPriorityAccessor": {
12615
+ "type": "string",
12616
+ "description": "Field (or React fn) for auto-label priority — higher values survive density shedding first."
12617
+ },
12618
+ "maxLabels": {
12619
+ "type": "number",
12620
+ "description": "Optional hard cap on visible auto labels after the area budget."
12621
+ },
12622
+ "selectionDatum": {
12623
+ "type": "string",
12624
+ "enum": [
12625
+ "raw",
12626
+ "scene"
12627
+ ],
12628
+ "description": "Datum shape for selection/linkedHover predicates: raw author records (default) or full scene payload with __kind.",
12629
+ "default": "raw"
12630
+ },
12631
+ "groupPadding": {
12632
+ "type": "number",
12633
+ "description": "Pixel gutter between adjacent slots in the same groupBy block.",
12634
+ "default": 0
12635
+ },
12549
12636
  "ribbonLane": {
12550
12637
  "type": "string",
12551
12638
  "enum": [
@@ -12555,6 +12642,14 @@
12555
12642
  ],
12556
12643
  "default": "both"
12557
12644
  },
12645
+ "ribbonMinRun": {
12646
+ "type": [
12647
+ "number",
12648
+ "string"
12649
+ ],
12650
+ "description": "Minimum rendered time-axis runway in pixels for **source-only feeder** ribbons (not a general minimum ribbon length). Use `auto` to adapt to lane distance. Only source-only feeders with proven stock/runway are affected; authored times and inventory remain unchanged.",
12651
+ "default": 0
12652
+ },
12558
12653
  "lifetimeMode": {
12559
12654
  "type": "string",
12560
12655
  "enum": [
@@ -12575,6 +12670,31 @@
12575
12670
  "type": "number",
12576
12671
  "default": 0.35
12577
12672
  },
12673
+ "styleRules": {
12674
+ "type": "array",
12675
+ "description": "Declarative StyleRule[] applied to node bands (raw node datum; fill may be a solid color or HatchFill — canvas pattern + SSR SVG pattern)."
12676
+ },
12677
+ "layoutExecution": {
12678
+ "type": "string",
12679
+ "enum": [
12680
+ "auto",
12681
+ "worker",
12682
+ "sync"
12683
+ ],
12684
+ "description": "Layout execution: auto (cost threshold), worker, or sync. SSR always sync.",
12685
+ "default": "auto"
12686
+ },
12687
+ "layoutWorkerThreshold": {
12688
+ "type": "number",
12689
+ "description": "Override auto worker cost threshold for ProcessSankey packing/ordering."
12690
+ },
12691
+ "layoutLoadingContent": {
12692
+ "type": [
12693
+ "boolean",
12694
+ "object"
12695
+ ],
12696
+ "description": "Content while worker layout is pending. false suppresses."
12697
+ },
12578
12698
  "showParticles": {
12579
12699
  "type": "boolean",
12580
12700
  "default": false
@@ -7,7 +7,7 @@
7
7
  "src/components/semiotic-ai.ts",
8
8
  "ai/mcp-server.ts"
9
9
  ],
10
- "version": "3.8.7",
10
+ "version": "3.8.8",
11
11
  "components": {
12
12
  "schema": 57,
13
13
  "aiChartExports": 54,
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!-- semiotic-bundle-sizes:start -->
4
4
  <!-- Auto-generated by scripts/sync-bundle-sizes.mjs — do not edit by hand. -->
5
- **Use sub-path imports** — `semiotic/xy` (145KB gz), `semiotic/ordinal` (120KB gz), `semiotic/network` (126KB gz), `semiotic/geo` (103KB gz), `semiotic/realtime` (153KB gz), `semiotic/realtime/core` (144KB gz), `semiotic/realtime/react` (1KB gz), `semiotic/server` (210KB gz), `semiotic/server/node` (210KB gz), `semiotic/server/edge` (224KB gz), `semiotic/utils` (83KB gz), `semiotic/utils/core` (82KB gz), `semiotic/utils/react` (6KB gz), `semiotic/recipes` (88KB gz), `semiotic/recipes/core` (87KB 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` (160KB gz), `semiotic/physics/matter` (1KB gz), `semiotic/physics/rapier` (1KB gz), `semiotic/ai` (486KB gz), `semiotic/ai/core` (80KB gz), `semiotic/controls` (12KB gz), `semiotic/rough` (4KB gz). Full `semiotic` is 389KB gz.
5
+ **Use sub-path imports** — `semiotic/xy` (145KB gz), `semiotic/ordinal` (121KB gz), `semiotic/network` (145KB gz), `semiotic/geo` (104KB gz), `semiotic/realtime` (154KB gz), `semiotic/realtime/core` (144KB gz), `semiotic/realtime/react` (1KB gz), `semiotic/server` (224KB gz), `semiotic/server/node` (224KB gz), `semiotic/server/edge` (240KB gz), `semiotic/utils` (85KB gz), `semiotic/utils/core` (84KB gz), `semiotic/utils/react` (6KB gz), `semiotic/recipes` (89KB gz), `semiotic/recipes/core` (89KB 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` (161KB gz), `semiotic/physics/matter` (1KB gz), `semiotic/physics/rapier` (1KB gz), `semiotic/ai` (505KB gz), `semiotic/ai/core` (81KB gz), `semiotic/controls` (12KB gz), `semiotic/rough` (4KB gz). Full `semiotic` is 407KB gz.
6
6
  <!-- semiotic-bundle-sizes:end -->
7
7
 
8
8
  ## Flat Array Data (`data: object[]`)
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{auditData as r,toDataAuditNotifications as o}from"./chunk-chunk-DIVE2DRA.module.min.js";import"./chunk-chunk-6V5VQVCT.module.min.js";function n(n,t){if(!t||!n?.component||!n.props)return[];const c="object"==typeof t?t:{};try{const t=r(n.component,n.props,void 0,{checkOutliers:c.checkOutliers});return o(t,{max:c.max,errorsOnly:c.errorsOnly})}catch{return[]}}export{n as buildChartDataAuditNotifications};
2
+ import{auditData as r,toDataAuditNotifications as o}from"./chunk-chunk-2B3AIKUZ.module.min.js";import"./chunk-chunk-6V5VQVCT.module.min.js";function n(n,t){if(!t||!n?.component||!n.props)return[];const c="object"==typeof t?t:{};try{const t=r(n.component,n.props,void 0,{checkOutliers:c.checkOutliers});return o(t,{max:c.max,errorsOnly:c.errorsOnly})}catch{return[]}}export{n as buildChartDataAuditNotifications};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{parseDateLikeString as e}from"./chunk-chunk-6V5VQVCT.module.min.js";function o(e,o){const s={numbers:[],missing:0,nonFinite:0,nonNumeric:0,zero:0,negative:0,fractional:0};for(const n of e){const e=n?.[o];if(null==e||""===e){s.missing++;continue}let t;if("number"==typeof e)t=e;else if("string"==typeof e){const o=e.trim();if(""===o){s.missing++;continue}const n=Number(o);Number.isNaN(n)?/^[+-]?nan$/i.test(o)&&(t=n):t=n}void 0!==t?Number.isFinite(t)?(s.numbers.push(t),0===t&&s.zero++,0>t&&s.negative++,Number.isInteger(t)||s.fractional++):s.nonFinite++:s.nonNumeric++}return s}function s(e,o){if(0===e.length)return;const s=(e.length-1)*o,n=Math.floor(s),t=Math.ceil(s);if(n===t)return e[n];const r=s-n;return e[n]*(1-r)+e[t]*r}function n(e,n={}){if(!Array.isArray(e)||0===e.length)return{};const t=new Set;for(const o of e)if(o&&"object"==typeof o)for(const e of Object.keys(o))t.add(e);const r={};for(const i of t){const t=o(e,i);let a=1/0,c=-1/0;for(const e of t.numbers)a>e&&(a=e),e>c&&(c=e);const l=!1===n.quantiles?void 0:[...t.numbers].sort((e,o)=>e-o);r[i]={field:i,observedCount:e.length-t.missing,finiteCount:t.numbers.length,missingCount:t.missing,nonFiniteCount:t.nonFinite,nonNumericCount:t.nonNumeric,zeroCount:t.zero,negativeCount:t.negative,fractionalCount:t.fractional,...t.numbers.length>0?{min:a,...l?{q1:s(l,.25),median:s(l,.5),q3:s(l,.75)}:{},max:c}:{}}}return r}function t(e){const o=[`${e.component}: ${e.ok?"✓ numerically safe":"✗ numeric hazards found"}`,`${e.rowCount} rows · ${e.summary.fieldsChecked} numeric fields · ${e.summary.errors} errors · ${e.summary.warnings} warnings`];for(const s of e.diagnoses)o.push(`${"error"===s.severity?"ERROR":"WARN"} ${s.code}${s.field?` [${s.field}]`:""}: ${s.message}`),s.fix&&o.push(" Fix: "+s.fix);return o.join("\n")}function r(e){return e.code.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function i(e,o={}){const s=Number.isFinite(o.max)?Math.max(0,Math.floor(o.max)):6,n=e.diagnoses.map((e,o)=>({item:e,diagnosisIndex:o})).filter(({item:e})=>!o.errorsOnly||"error"===e.severity),t=n.slice(0,s).map(({item:e,diagnosisIndex:o})=>({id:`data-audit:${e.code}:${e.role??"chart"}:${e.field??"chart"}:${o}`,level:e.severity,title:e.field?`${r(e)} · ${e.field}`:r(e),message:e.fix?`${e.message} ${e.fix}`:e.message,source:"Semiotic data audit",dismissible:!0}));return n.length>s&&t.push({id:"data-audit:overflow:chart",level:n.slice(s).some(({item:e})=>"error"===e.severity)?"error":"warning",title:`${n.length-s} more numeric finding${n.length-s===1?"":"s"}`,message:"Run auditData() or diagnoseConfig() to inspect the complete report.",source:"Semiotic data audit",dismissible:!0}),t}function a(e,o){const s=e.nestedDataAccessorProp?o[e.nestedDataAccessorProp]:void 0;return"string"==typeof s?s:e.defaultNestedDataAccessor}function c(e,o,s){const n=e.dataProp??"data",t=o[n],r=s??(Array.isArray(t)?t:[]),i=a(e,o);if(!i)return{dataProp:n,rows:r};const c=[];let l=!1;for(const e of r){const o=e?.[i];if(Array.isArray(o)){l=!0;for(const e of o)e&&"object"==typeof e&&c.push(e)}}return{dataProp:n,rows:l?c:r}}var l=[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"y",accessor:"yAccessor",defaultAccessor:"y",domain:!0}],u={fields:l},f=[{...l[0],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates"},{...l[1],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates",allowMissing:!0}],g={fields:f},d={role:"value",accessor:"valueAccessor",defaultAccessor:"value"},m={...d,domain:!0},h={fields:[{...d,requirements:["finite","non-negative"]}],aggregates:[{kind:"positive-total",role:"value"}]},p={fields:[d],aggregates:[{kind:"normalized-total",role:"value",groupAccessor:"categoryAccessor",defaultGroupAccessor:"category",whenProp:"normalize"}]},v={fields:f,aggregates:[{kind:"normalized-total",role:"y",groupAccessor:"xAccessor",defaultGroupAccessor:"x",whenProp:"normalize"}]},w={fields:[...l,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},y={fields:[...l,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},A={fields:[d]},b={fields:[{...d,dataProp:"edges",requirements:["finite","non-negative"],missingValue:1}]},$={LineChart:g,AreaChart:g,BumpChart:g,Scatterplot:y,ConnectedScatterplot:u,QuadrantChart:y,MinimapChart:g,BubbleChart:w,StackedAreaChart:v,DifferenceChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date",domain:!0},{role:"value",accessor:"seriesAAccessor",defaultAccessor:"a"},{role:"value",accessor:"seriesBAccessor",defaultAccessor:"b"}]},CandlestickChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"high",accessor:"highAccessor",defaultAccessor:"high",requirements:["finite"]},{role:"low",accessor:"lowAccessor",defaultAccessor:"low",requirements:["finite"]},{role:"open",accessor:"openAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]},{role:"close",accessor:"closeAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]}]},Heatmap:A,BarChart:{fields:[d]},GroupedBarChart:{fields:[d]},StackedBarChart:p,DotPlot:{fields:[m]},Histogram:{fields:[m]},BoxPlot:{fields:[m]},SwarmPlot:{fields:[m,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},ViolinPlot:{fields:[m]},RidgelinePlot:{fields:[m]},PieChart:h,DonutChart:h,FunnelChart:h,SankeyDiagram:b,ChordDiagram:b,ProportionalSymbolMap:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"lon",dataProp:"points",requirements:["finite"]},{role:"y",accessor:"yAccessor",defaultAccessor:"lat",dataProp:"points",requirements:["finite"]},{role:"size",accessor:"sizeBy",dataProp:"points",requirements:["finite","non-negative"]}]}},R=Symbol.for("semiotic.numericContractRegistry");function N(){const e=globalThis;return e[R]??(e[R]={contracts:new Map}),e[R]}function x(e,o){o?N().contracts.set(e,o):N().contracts.delete(e)}function z(e){N().contracts.delete(e)}var E={xAccessor:"x",yAccessor:"y",valueAccessor:"value",sizeBy:"size",sizeAccessor:"size",radiusAccessor:"size",countAccessor:"count",amountAccessor:"value",highAccessor:"high",lowAccessor:"low",openAccessor:"open",closeAccessor:"close",lowerAccessor:"lower",upperAccessor:"upper",positiveAccessor:"value",negativeAccessor:"value",progressAccessor:"value",confidenceAccessor:"value",costAccessor:"value",throughputAccessor:"value"};function P(e,o,s){return"function"==typeof e?e(o,s):o[e]}function I(o,s){if("number"==typeof o)return Number.isFinite(o)?o:null;if(o instanceof Date){const e=o.getTime();return s&&Number.isFinite(e)?e:null}if("string"==typeof o){const n=o.trim(),t=Number(n);if(n&&Number.isFinite(t))return t;if("date-like"===s){const o=e(n);return Number.isFinite(o)?o:null}}return null}function C(e){return"number"==typeof e&&!Number.isFinite(e)}function _(e,o,s,n,t){const r={field:s,numbers:[],finiteRows:[],missingRows:[],nonFiniteRows:[],nonNumericRows:[],accessorErrorRows:[],zeroRows:[],negativeRows:[],fractionalRows:[]};for(let s=0;e.length>s;s++){let i;try{i=P(o,e[s],s)}catch{r.accessorErrorRows.push(s);continue}if(null==i||""===i){if(void 0!==t){r.numbers.push(t),r.finiteRows.push(s),0===t&&r.zeroRows.push(s),0>t&&r.negativeRows.push(s),Number.isInteger(t)||r.fractionalRows.push(s);continue}r.missingRows.push(s);continue}const a=I(i,n);null!=a?(r.numbers.push(a),r.finiteRows.push(s),0===a&&r.zeroRows.push(s),0>a&&r.negativeRows.push(s),Number.isInteger(a)||r.fractionalRows.push(s)):C(i)?r.nonFiniteRows.push(s):r.nonNumericRows.push(s)}return r}function S(e,o){const s=new Set(e.requirements??["finite"]);return s.add("finite"),("x"===e.role&&"log"===o.xScaleType||"y"===e.role&&"log"===o.yScaleType)&&s.add("positive"),[...s]}function T(e){return e.slice(0,5)}function M(e){return{domain:"data",...e}}function O(e,o){const n=[],{observation:t,contract:r,accessorLabel:i,requirements:a}=e,c={field:i,role:r.role},l=[...t.nonFiniteRows,...t.nonNumericRows,...t.accessorErrorRows].sort((e,o)=>e-o);if(0===t.numbers.length)return n.push(M({severity:"error",code:"DEGENERATE_EXTENT",message:`${r.accessor}="${i}" produces no finite numeric values; the chart cannot resolve its ${r.role} input.`,fix:`Ensure ${i} contains finite numbers${"x"===r.role?" (or valid dates for a time scale)":""}.`,...c,...l.length>0?{rows:T(l),count:l.length}:{}})),n;t.nonFiniteRows.length>0&&n.push(M({severity:"error",code:"NON_FINITE_VALUE",message:`${i} contains ${t.nonFiniteRows.length} NaN or infinite value${1===t.nonFiniteRows.length?"":"s"}; scale and layout math require finite numbers.`,fix:`Filter or replace NaN/Infinity in ${i} before rendering.`,...c,rows:T(t.nonFiniteRows),count:t.nonFiniteRows.length})),!r.allowMissing&&t.missingRows.length>0&&n.push(M({severity:"error",code:"MISSING_NUMERIC_VALUE",message:`${i} is missing for ${t.missingRows.length} row${1===t.missingRows.length?"":"s"}; the ${r.role} role requires an explicit numeric value.`,fix:`Fill or filter missing ${i} values before rendering.`,...c,rows:T(t.missingRows),count:t.missingRows.length}));const u=[...t.nonNumericRows,...t.accessorErrorRows].sort((e,o)=>e-o);if(u.length>0&&n.push(M({severity:"error",code:"NON_NUMERIC_VALUE",message:`${i} produces ${u.length} non-numeric value${1===u.length?"":"s"} for the ${r.role} role.`,fix:`Bind ${r.accessor} to a numeric field or return finite numbers from the accessor.`,...c,rows:T(u),count:u.length})),r.domain&&t.numbers.length>=2){const[e,o]=function(e){let o=1/0,s=-1/0;for(const n of e)o>n&&(o=n),n>s&&(s=n);return[o,s]}(t.numbers);e===o&&n.push(M({severity:"warning",code:"ZERO_SPAN_DOMAIN",message:`${i} is constant at ${e}; its ${r.role} scale has a zero-span data domain.`,fix:`Provide varying ${r.role} values, set an explicit extent around ${e}, or use a single-value display.`,...c,rows:T(t.finiteRows),count:t.finiteRows.length}))}if(a.includes("positive")){const o=t.numbers.map((e,o)=>({number:e,row:t.finiteRows[o]})).filter(({number:e})=>0>=e).map(({row:e})=>e);if(o.length>0){const s=e.logScale;n.push(M({severity:"error",code:s?"LOG_NON_POSITIVE":"NON_POSITIVE_VALUE",message:`${i} contains ${o.length} non-positive value${1===o.length?"":"s"}, which ${s?"cannot be represented on a log scale":"violate the positive-value contract"}.`,fix:s?"Remove or transform values ≤ 0, or use a linear/symlog scale.":"Provide values greater than zero.",...c,rows:T(o),count:o.length}))}}if(a.includes("non-negative")&&t.negativeRows.length>0&&n.push(M({severity:"error",code:"size"===r.role?"NEGATIVE_SIZE":"NEGATIVE_VALUE",message:`${i} contains ${t.negativeRows.length} negative ${r.role} value${1===t.negativeRows.length?"":"s"}; the chart maps this role to non-negative geometry.`,fix:"Use a non-negative measure, clamp intentionally, or encode sign with position/color instead.",...c,rows:T(t.negativeRows),count:t.negativeRows.length})),a.includes("integer")){const e=[...new Set([...t.negativeRows,...t.zeroRows,...t.fractionalRows])].sort((e,o)=>e-o);e.length>0&&n.push(M({severity:"error",code:"INVALID_COUNT",message:`${i} contains ${e.length} value${1===e.length?"":"s"} that are not positive integers.`,fix:"Counts must be integers ≥ 1; aggregate, round intentionally, or use a continuous-value encoding.",...c,rows:T(e),count:e.length}))}if(a.includes("unit-interval")){const e=t.numbers.map((e,o)=>({number:e,row:t.finiteRows[o]})).filter(({number:e})=>0>e||e>1).map(({row:e})=>e);e.length>0&&n.push(M({severity:"error",code:"OUTSIDE_UNIT_INTERVAL",message:`${i} contains ${e.length} value${1===e.length?"":"s"} outside [0, 1].`,fix:`Normalize ${i} to [0, 1] before using it as ${r.role}.`,...c,rows:T(e),count:e.length}))}if(o&&r.domain){const o=function(e){const o=e.observation.numbers.map((o,s)=>({value:o,row:e.observation.finiteRows[s]})).sort((e,o)=>e.value-o.value);if(8>o.length)return[];const n=o.map(e=>e.value),t=s(n,.25),r=s(n,.75),i=s(n,.5),a=r-t;if(a>0){const e=t-10*a,s=r+10*a;return o.filter(o=>e>o.value||o.value>s).map(e=>e.row)}const c=100*Math.max(1,Math.abs(i));return o.filter(e=>Math.abs(e.value-i)>c).map(e=>e.row)}(e);o.length>0&&n.push(M({severity:"warning",code:"OUTLIER_DOMINATED_DOMAIN",message:`${i} has ${o.length} extreme value${1===o.length?"":"s"} beyond the 10×IQR guardrail; the main distribution may collapse visually.`,fix:"Verify the extreme values, then consider a log scale, robust extent, inset, or explicit annotation rather than silently clipping them.",...c,rows:T(o),count:o.length}))}return n}function k(e,o,s){if(!e)return"__all__";try{return P(e,o,s)+""}catch{return"__accessor_error__"}}function D(e,o,s){if(e.whenProp&&!0!==s[e.whenProp])return[];const n=o.find(o=>o.contract.role===e.role);if(!n||0===n.observation.numbers.length)return[];const t=e.groupAccessor?s[e.groupAccessor]:void 0,r="string"==typeof t||"function"==typeof t?t:e.defaultGroupAccessor,i=new Map;for(let e=0;n.rows.length>e;e++){let o;try{o=P(n.accessor,n.rows[e],e)}catch{continue}const s=I(o,void 0);if(null==s)continue;const t=k(r,n.rows[e],e),a=i.get(t)??{sum:0,magnitude:0,positive:!1,negative:!1,rows:[],negativeRows:[]};a.sum+=s,a.magnitude+=Math.abs(s),a.positive||(a.positive=s>0),a.negative||(a.negative=0>s),a.rows.push(e),0>s&&a.negativeRows.push(e),i.set(t,a)}const a=[],c=[],l=[],u=[],f=[],g=[];for(const[o,s]of i)("positive-total"===e.kind&&0>=s.sum||"normalized-total"===e.kind&&Number.EPSILON*Math.max(1,s.magnitude)*10>=Math.abs(s.sum))&&(a.push(o),u.push(...s.rows)),"normalized-total"===e.kind&&s.positive&&s.negative&&(c.push(o),f.push(...s.rows)),"normalized-total"===e.kind&&s.negative&&(l.push(o),g.push(...s.negativeRows));const d=[];return a.length>0&&d.push(M({severity:"error",code:"normalized-total"===e.kind?"ZERO_NORMALIZED_TOTAL":"NON_POSITIVE_TOTAL",message:"normalized-total"===e.kind?`${a.length} normalization group${1===a.length?" has":"s have"} a zero total, so division would be undefined.`:"The part-to-whole total is not positive, so meaningful shares cannot be computed.",fix:"normalized-total"===e.kind?"Remove empty/zero-sum groups or disable normalization.":"Provide at least one positive value and ensure the total is greater than zero.",field:n.accessorLabel,role:e.role,rows:T([...new Set(u)].sort((e,o)=>e-o)),count:a.length})),l.length>0&&d.push(M({severity:"error",code:"NEGATIVE_NORMALIZED_VALUE",message:`${l.length} normalization group${1===l.length?" contains":"s contain"} negative contributions, so conventional percentage shares are not defined.`,fix:"Use non-negative contributions, a diverging stack, or disable normalization.",field:n.accessorLabel,role:e.role,rows:T([...new Set(g)].sort((e,o)=>e-o)),count:g.length})),c.length>0&&d.push(M({severity:"warning",code:"MIXED_SIGN_NORMALIZATION",message:`${c.length} normalization group${1===c.length?" mixes":"s mix"} positive and negative contributions; percentage shares may be unstable or misleading.`,fix:"Separate positive and negative contributions, use diverging stacks, or disable normalization.",field:n.accessorLabel,role:e.role,rows:T([...new Set(f)].sort((e,o)=>e-o)),count:c.length})),d}function V(e,o,s,n={}){const t=n.contracts??function(e){return N().contracts.get(e)??$[e]}(e)??function(e){const o=[];for(const[s,n]of Object.entries(E))"string"!=typeof e[s]&&"function"!=typeof e[s]||o.push({role:n,accessor:s,..."size"===n?{requirements:["finite","non-negative"]}:{},..."x"===n||"y"===n?{domain:!0}:{}});return o.length>0?{fields:o}:void 0}(o);if(!t)return{component:e,ok:!0,rowCount:s?.length??(Array.isArray(o.data)?o.data.length:0),summary:{fieldsChecked:0,errors:0,warnings:0},contracts:[],diagnoses:[]};const r=function(e,o,s){const n=[],t=new Set;for(const r of e.fields){if(r.whenProps?.some(e=>null==o[e]))continue;const e=o[r.accessor],i="string"==typeof e||"function"==typeof e?e:r.defaultAccessor;if("string"!=typeof i&&"function"!=typeof i)continue;const{dataProp:a,rows:l}=c(r,o,s);if(0===l.length)continue;const u="string"==typeof i?i:r.accessor+"()",f=`${a}:${r.role}:${u}`;if(t.has(f))continue;t.add(f);const g=r.temporalValues??("time"===r.role||"x"===r.role&&"time"===o.xScaleType?"date-like":void 0),d="x"===r.role&&"log"===o.xScaleType||"y"===r.role&&"log"===o.yScaleType,m=S(r,o);n.push({contract:r,accessor:i,accessorLabel:u,dataProp:a,rows:l,requirements:m,logScale:d,observation:_(l,i,u,g,r.missingValue)})}return n}(t,o,s),i=[],l=!1!==n.checkOutliers;for(const e of function(e,o,s){const n=new Set;for(const t of e.fields){const e=t.dataProp??"data",r=s??o[e];if(!Array.isArray(r))continue;if(0===r.length){n.add(e);continue}const i=a(t,o);if(!i)continue;const c=r.map(e=>e?.[i]).filter(Array.isArray);c.length>0&&c.every(e=>0===e.length)&&n.add(`${e}.${i}`)}return[...n]}(t,o,s))i.push(M({severity:"error",code:"EMPTY_DATA",message:e+" is an explicitly empty array; there are no numeric inputs to render.",fix:`Provide at least one valid row, render an intentional empty state, or omit ${e} when using the ref push API.`,count:0,rows:[]}));const u=new Set(r.filter(e=>e.contract.domain&&1===e.rows.length).map(e=>e.dataProp));for(const e of u)i.push(M({severity:"warning",code:"SINGLE_ROW_DOMAIN",message:e+" has one row; a quantitative scale cannot establish variation from a single observation.",fix:"Provide at least two observations or use a single-value display such as BigNumber.",count:1,rows:[0]}));for(const e of r)i.push(...O(e,l));for(const e of t.aggregates??[])i.push(...D(e,r,o));const f=i.filter(e=>"error"===e.severity).length,g=i.length-f;return{component:e,ok:0===f,rowCount:r.reduce((e,o)=>Math.max(e,o.rows.length),s?.length??(Array.isArray(o.data)?o.data.length:0)),summary:{fieldsChecked:r.length,errors:f,warnings:g},contracts:r.map(e=>({role:e.contract.role,accessor:e.accessorLabel,dataProp:e.dataProp,requirements:e.requirements,allowMissing:!0===e.contract.allowMissing,...void 0!==e.contract.missingValue?{missingValue:e.contract.missingValue}:{},domain:!0===e.contract.domain})),diagnoses:i}}export{$ as BUILT_IN_NUMERIC_CONTRACTS,x as registerNumericContracts,z as unregisterNumericContracts,n as profileNumericFields,t as formatDataAudit,i as toDataAuditNotifications,V as auditData};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ function t(t){let n=1/0,o=-1/0;for(const e of t)n>e&&(n=e),e>o&&(o=e);return[n,o]}function n(t,n=1/0){let o=n;for(const n of t)o>n&&(o=n);return o}function o(t,n=-1/0){let o=n;for(const n of t)n>o&&(o=n);return o}function e(t){return Math.round(100*t)/100}function r(t){const n=[0,0,0,0];let o=0;for(const[e,r]of t)null!==r&&(o++,n[0]+=e,n[1]+=r,n[2]+=e*e,n[3]+=e*r);const r=o*n[2]-n[0]*n[0],u=0===r?0:e((o*n[3]-n[0]*n[1])/r),f=e(n[1]/o-u*n[0]/o);return{points:t.map(([t])=>[e(t),e(u*t+f)]),equation:[u,f]}}function u(t,n=2){const o=[],r=[],u=n+1;for(let n=0;u>n;n++){let e=0;for(const[o,r]of t)null!==r&&(e+=o**n*r);o.push(e);const f=[];for(let o=0;u>o;o++){let e=0;for(const[r,u]of t)null!==u&&(e+=r**(n+o));f.push(e)}r.push(f)}r.push(o);const f=function(t,n){const o=t,e=t.length-1,r=[n];for(let t=0;e>t;t++){let n=t;for(let r=t+1;e>r;r++)Math.abs(o[t][r])>Math.abs(o[t][n])&&(n=r);for(let r=t;e+1>r;r++){const e=o[r][t];o[r][t]=o[r][n],o[r][n]=e}for(let n=t+1;e>n;n++)for(let r=e;r>=t;r--)o[r][n]-=o[r][t]*o[t][n]/o[t][t]}for(let t=e-1;t>=0;t--){let n=0;for(let u=t+1;e>u;u++)n+=o[u][t]*r[u];r[t]=(o[e][t]-n)/o[t][t]}return r}(r,u).map(e);return{points:t.map(([t])=>[e(t),e(f.reduce((n,o,e)=>n+o*t**e,0))]),equation:[...f].reverse()}}function f(t){const n=t.length;let o=0,e=0,r=0,u=0;for(const[n,f]of t)o+=n,e+=f,r+=n*n,u+=n*f;const f=n*r-o*o;if(1e-12>Math.abs(f))return null;const c=(n*u-o*e)/f,s=(e-c*o)/n;return t=>s+c*t}function c(t,n){const o=t.length,e=t.map(([t,o])=>o-n(t)).reduce((t,n)=>t+n*n,0),r=Math.sqrt(e/Math.max(o-2,1)),u=t.reduce((t,n)=>t+n[0],0)/o,f=t.reduce((t,n)=>t+(n[0]-u)**2,0);return{se:r,meanX:u,ssX:f}}function s(t){return.99>t?.95>t?.9>t?1:1.645:1.96:2.576}export{t as getMinMax,n as getMin,o as getMax,r as linearRegression,u as polynomialRegression,f as fitLinearForForecast,c as forecastIntervalStats,s as confidenceZScore};