semiotic 3.8.4 → 3.8.6

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 (222) hide show
  1. package/CLAUDE.md +9 -5
  2. package/README.md +52 -46
  3. package/ai/behaviorContracts.cjs +2 -2
  4. package/ai/componentMetadata.cjs +2 -2
  5. package/ai/dist/mcp-server.js +6 -2
  6. package/ai/examples.md +211 -2
  7. package/ai/schema.json +1388 -14
  8. package/ai/surface-manifest.json +8 -4
  9. package/ai/system-prompt.md +1 -1
  10. package/dist/chunk-chartContainerDataAudit-FEOD5GTQ.module.min.js +2 -0
  11. package/dist/chunk-chunk-2CHN2TA3.module.min.js +1 -0
  12. package/dist/chunk-chunk-2JGJ5GUG.module.min.js +1 -0
  13. package/dist/chunk-chunk-3NGIKFD6.module.min.js +1 -0
  14. package/dist/chunk-chunk-3SHB24AG.module.min.js +1 -0
  15. package/dist/chunk-chunk-4MMOOYTX.module.min.js +2 -0
  16. package/dist/chunk-chunk-75OTQSXS.module.min.js +1 -0
  17. package/dist/chunk-chunk-A5GRQUOF.module.min.js +1 -0
  18. package/dist/chunk-chunk-AAF5LZAU.module.min.js +2 -0
  19. package/dist/{chunk-chunk-LQBSXO7K.module.min.js → chunk-chunk-ARZGA4LJ.module.min.js} +1 -1
  20. package/dist/chunk-chunk-CAFLML4L.module.min.js +2 -0
  21. package/dist/chunk-chunk-CO5KQMGH.module.min.js +1 -0
  22. package/dist/chunk-chunk-FHBN7OEB.module.min.js +2 -0
  23. package/dist/{chunk-chunk-KQ546MKE.module.min.js → chunk-chunk-GFTVACTO.module.min.js} +1 -1
  24. package/dist/chunk-chunk-IP2UE74X.module.min.js +1 -0
  25. package/dist/chunk-chunk-ITDWLZXV.module.min.js +2 -0
  26. package/dist/chunk-chunk-LPSPATPC.module.min.js +1 -0
  27. package/dist/chunk-chunk-OM6NWS4H.module.min.js +2 -0
  28. package/dist/chunk-chunk-PX5YQGDP.module.min.js +2 -0
  29. package/dist/chunk-chunk-Q2BS46W2.module.min.js +2 -0
  30. package/dist/{chunk-chunk-FBGHXL72.module.min.js → chunk-chunk-RA7JCG7D.module.min.js} +1 -1
  31. package/dist/chunk-chunk-RNUHEXZA.module.min.js +2 -0
  32. package/dist/chunk-chunk-ROZWKEUG.module.min.js +1 -0
  33. package/dist/chunk-chunk-SMVD3EQJ.module.min.js +2 -0
  34. package/dist/chunk-chunk-T2FKJD4O.module.min.js +2 -0
  35. package/dist/chunk-chunk-UDREYOLV.module.min.js +1 -0
  36. package/dist/chunk-chunk-VOWE3SAP.module.min.js +2 -0
  37. package/dist/chunk-chunk-VQPNBUSW.module.min.js +2 -0
  38. package/dist/{chunk-chunk-7RYBCTK5.module.min.js → chunk-chunk-WAWCIHFJ.module.min.js} +1 -1
  39. package/dist/{chunk-chunk-F7WFPD4O.module.min.js → chunk-chunk-WYARAXHR.module.min.js} +1 -1
  40. package/dist/{chunk-chunk-JDXT6ORT.module.min.js → chunk-chunk-XP3OHHFX.module.min.js} +1 -1
  41. package/dist/chunk-chunk-XV3KGYTR.module.min.js +2 -0
  42. package/dist/chunk-chunk-YC2IVEPX.module.min.js +1 -0
  43. package/dist/chunk-chunk-ZXIXAPRE.module.min.js +2 -0
  44. package/dist/components/ChartContainer.d.ts +10 -0
  45. package/dist/components/ai/chartCapabilities.d.ts +3 -1
  46. package/dist/components/ai/chartCapabilityTypes.d.ts +14 -0
  47. package/dist/components/chartContainerDataAudit.d.ts +10 -0
  48. package/dist/components/charts/custom/XYCustomChart.d.ts +3 -0
  49. package/dist/components/charts/geo/DistanceCartogram.d.ts +30 -4
  50. package/dist/components/charts/index.d.ts +4 -0
  51. package/dist/components/charts/network/ForceDirectedGraph.d.ts +36 -1
  52. package/dist/components/charts/ordinal/BarChart.d.ts +7 -14
  53. package/dist/components/charts/ordinal/GaugeChart.d.ts +3 -0
  54. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +3 -0
  55. package/dist/components/charts/ordinal/StackedBarChart.d.ts +3 -0
  56. package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -14
  57. package/dist/components/charts/physics/CrucibleChart.capability.d.ts +8 -0
  58. package/dist/components/charts/physics/CrucibleChart.d.ts +63 -0
  59. package/dist/components/charts/physics/crucibleBodyRenderers.d.ts +27 -0
  60. package/dist/components/charts/physics/crucibleChartProps.d.ts +90 -0
  61. package/dist/components/charts/physics/crucibleChrome.d.ts +47 -0
  62. package/dist/components/charts/physics/crucibleController.d.ts +59 -0
  63. package/dist/components/charts/physics/crucibleEffects.d.ts +30 -0
  64. package/dist/components/charts/physics/cruciblePhysics.d.ts +54 -0
  65. package/dist/components/charts/physics/crucibleProgram.d.ts +38 -0
  66. package/dist/components/charts/physics/crucibleTypes.d.ts +415 -0
  67. package/dist/components/charts/shared/chartSpecCore.d.ts +10 -4
  68. package/dist/components/charts/shared/crucibleWireSchema.d.ts +5 -0
  69. package/dist/components/charts/shared/diagnoseTypes.d.ts +10 -0
  70. package/dist/components/charts/shared/gaugeGradient.d.ts +4 -8
  71. package/dist/components/charts/shared/gradient.d.ts +35 -0
  72. package/dist/components/charts/shared/hatchFill.d.ts +3 -10
  73. package/dist/components/charts/shared/hooks.d.ts +2 -50
  74. package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
  75. package/dist/components/charts/shared/streamPropsHelpers.d.ts +1 -2
  76. package/dist/components/charts/shared/useChartLegend.d.ts +58 -0
  77. package/dist/components/charts/shared/useChartSetup.d.ts +5 -0
  78. package/dist/components/charts/shared/useCustomChartSetup.d.ts +6 -1
  79. package/dist/components/charts/shared/useNetworkChartSetup.d.ts +1 -0
  80. package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
  81. package/dist/components/charts/xy/AreaChart.d.ts +25 -42
  82. package/dist/components/charts/xy/BumpChart.capability.d.ts +11 -0
  83. package/dist/components/charts/xy/BumpChart.d.ts +161 -0
  84. package/dist/components/charts/xy/DifferenceChart.d.ts +3 -10
  85. package/dist/components/charts/xy/Heatmap.d.ts +3 -0
  86. package/dist/components/charts/xy/LineChart.d.ts +6 -8
  87. package/dist/components/data/auditData.d.ts +51 -0
  88. package/dist/components/data/dataAuditPresentation.d.ts +18 -0
  89. package/dist/components/data/dataAuditSources.d.ts +9 -0
  90. package/dist/components/data/numericContracts.d.ts +59 -0
  91. package/dist/components/data/numericFieldProfiler.d.ts +23 -0
  92. package/dist/components/geometry/bumpRibbonGeometry.d.ts +36 -0
  93. package/dist/components/legendLayout.d.ts +19 -1
  94. package/dist/components/recipes/netEnsembleLayout.d.ts +167 -0
  95. package/dist/components/recipes/netEnsembleOverlays.d.ts +20 -0
  96. package/dist/components/recipes/wordTrails.d.ts +156 -0
  97. package/dist/components/recipes/wordTrailsProgressiveReveal.d.ts +42 -0
  98. package/dist/components/semiotic-ai-core.d.ts +3 -0
  99. package/dist/components/semiotic-ai-data-audit.d.ts +4 -0
  100. package/dist/components/semiotic-ai.d.ts +9 -6
  101. package/dist/components/semiotic-geo.d.ts +1 -0
  102. package/dist/components/semiotic-network.d.ts +1 -0
  103. package/dist/components/semiotic-ordinal.d.ts +2 -0
  104. package/dist/components/semiotic-physics.d.ts +2 -0
  105. package/dist/components/semiotic-realtime-core.d.ts +1 -0
  106. package/dist/components/semiotic-recipes-core.d.ts +4 -0
  107. package/dist/components/semiotic-server-edge.d.ts +1 -1
  108. package/dist/components/semiotic-server.d.ts +1 -1
  109. package/dist/components/semiotic-utils-core.d.ts +3 -0
  110. package/dist/components/semiotic-xy.d.ts +4 -0
  111. package/dist/components/semiotic.d.ts +5 -5
  112. package/dist/components/server/renderEvidence.d.ts +27 -0
  113. package/dist/components/server/serverChartConfigs.d.ts +2 -0
  114. package/dist/components/server/serverChartConfigsPhysics.d.ts +9 -0
  115. package/dist/components/server/serverChartConfigsXY.d.ts +1 -0
  116. package/dist/components/server/staticAnnotations.d.ts +12 -0
  117. package/dist/components/server/staticLegend.d.ts +4 -2
  118. package/dist/components/server/staticSVGChrome.d.ts +4 -4
  119. package/dist/components/stream/GeoPipelineStore.d.ts +1 -0
  120. package/dist/components/stream/GeoSVGOverlay.d.ts +11 -10
  121. package/dist/components/stream/NetworkSVGOverlay.d.ts +2 -6
  122. package/dist/components/stream/OrdinalSVGOverlay.d.ts +2 -6
  123. package/dist/components/stream/SVGOverlay.d.ts +2 -6
  124. package/dist/components/stream/StalenessBadge.d.ts +2 -6
  125. package/dist/components/stream/geoCartogram.d.ts +7 -0
  126. package/dist/components/stream/geoTypes.d.ts +20 -8
  127. package/dist/components/stream/legendRenderer.d.ts +2 -6
  128. package/dist/components/stream/networkFrameHandleTypes.d.ts +4 -0
  129. package/dist/components/stream/ordinalTypes.d.ts +7 -31
  130. package/dist/components/stream/physics/PhysicsKernel.d.ts +1 -0
  131. package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +2 -6
  132. package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +8 -0
  133. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +2 -6
  134. package/dist/components/stream/pipelineConfig.d.ts +7 -15
  135. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +9 -69
  136. package/dist/components/stream/renderers/cornerRadii.d.ts +2 -9
  137. package/dist/components/stream/renderers/thresholdLineSegments.d.ts +12 -0
  138. package/dist/components/stream/sceneToSVGShared.d.ts +3 -5
  139. package/dist/components/stream/types.d.ts +32 -56
  140. package/dist/components/stream/xySceneBuilders/areaGradient.d.ts +4 -20
  141. package/dist/components/stream/xySceneBuilders/types.d.ts +6 -6
  142. package/dist/components/types/legendTypes.d.ts +15 -6
  143. package/dist/components/useChartContainerDataAudit.d.ts +7 -0
  144. package/dist/geo.min.js +1 -1
  145. package/dist/geo.module.min.js +1 -1
  146. package/dist/network.min.js +1 -1
  147. package/dist/network.module.min.js +1 -1
  148. package/dist/ordinal.min.js +1 -1
  149. package/dist/ordinal.module.min.js +1 -1
  150. package/dist/physics.min.js +1 -1
  151. package/dist/physics.module.min.js +1 -1
  152. package/dist/physicsWorker.js +1 -1
  153. package/dist/realtime.min.js +1 -1
  154. package/dist/realtime.module.min.js +1 -1
  155. package/dist/semiotic-ai-core.d.ts +3 -0
  156. package/dist/semiotic-ai-core.min.js +1 -1
  157. package/dist/semiotic-ai-core.module.min.js +1 -1
  158. package/dist/semiotic-ai.d.ts +9 -6
  159. package/dist/semiotic-ai.min.js +1 -1
  160. package/dist/semiotic-ai.module.min.js +1 -1
  161. package/dist/semiotic-experimental.min.js +1 -1
  162. package/dist/semiotic-experimental.module.min.js +1 -1
  163. package/dist/semiotic-geo.d.ts +1 -0
  164. package/dist/semiotic-network.d.ts +1 -0
  165. package/dist/semiotic-ordinal.d.ts +2 -0
  166. package/dist/semiotic-physics.d.ts +2 -0
  167. package/dist/semiotic-realtime-core.d.ts +1 -0
  168. package/dist/semiotic-realtime-core.min.js +1 -1
  169. package/dist/semiotic-realtime-core.module.min.js +1 -1
  170. package/dist/semiotic-recipes-core.d.ts +4 -0
  171. package/dist/semiotic-recipes-core.min.js +1 -1
  172. package/dist/semiotic-recipes-core.module.min.js +1 -1
  173. package/dist/semiotic-recipes.min.js +1 -1
  174. package/dist/semiotic-recipes.module.min.js +1 -1
  175. package/dist/semiotic-server-edge.d.ts +1 -1
  176. package/dist/semiotic-server-edge.min.js +1 -1
  177. package/dist/semiotic-server-edge.module.min.js +1 -1
  178. package/dist/semiotic-server-node.min.js +1 -1
  179. package/dist/semiotic-server-node.module.min.js +1 -1
  180. package/dist/semiotic-server.d.ts +1 -1
  181. package/dist/semiotic-utils-core.d.ts +3 -0
  182. package/dist/semiotic-utils-core.min.js +1 -1
  183. package/dist/semiotic-utils-core.module.min.js +1 -1
  184. package/dist/semiotic-utils.min.js +1 -1
  185. package/dist/semiotic-utils.module.min.js +1 -1
  186. package/dist/semiotic-xy.d.ts +4 -0
  187. package/dist/semiotic.d.ts +5 -5
  188. package/dist/semiotic.min.js +1 -1
  189. package/dist/semiotic.module.min.js +1 -1
  190. package/dist/server.min.js +1 -1
  191. package/dist/server.module.min.js +1 -1
  192. package/dist/xy.min.js +1 -1
  193. package/dist/xy.module.min.js +1 -1
  194. package/package.json +2 -2
  195. package/dist/chunk-chunk-3ILKBVVQ.module.min.js +0 -1
  196. package/dist/chunk-chunk-6TPGFL7M.module.min.js +0 -2
  197. package/dist/chunk-chunk-7KZJUTKP.module.min.js +0 -2
  198. package/dist/chunk-chunk-ANYDWOZF.module.min.js +0 -1
  199. package/dist/chunk-chunk-AQPQN2HH.module.min.js +0 -2
  200. package/dist/chunk-chunk-ASKSE5F5.module.min.js +0 -1
  201. package/dist/chunk-chunk-AVBI6GDT.module.min.js +0 -1
  202. package/dist/chunk-chunk-B3DRZPBK.module.min.js +0 -2
  203. package/dist/chunk-chunk-BFHUYEOS.module.min.js +0 -2
  204. package/dist/chunk-chunk-C57LR3YG.module.min.js +0 -1
  205. package/dist/chunk-chunk-F5V4UIE6.module.min.js +0 -2
  206. package/dist/chunk-chunk-FP44FHFO.module.min.js +0 -2
  207. package/dist/chunk-chunk-HKXUAEPJ.module.min.js +0 -2
  208. package/dist/chunk-chunk-ICEXPNDC.module.min.js +0 -2
  209. package/dist/chunk-chunk-JMVEIZXP.module.min.js +0 -1
  210. package/dist/chunk-chunk-KHCOJMGK.module.min.js +0 -1
  211. package/dist/chunk-chunk-LRIFN2HK.module.min.js +0 -1
  212. package/dist/chunk-chunk-MFHF4J2Z.module.min.js +0 -1
  213. package/dist/chunk-chunk-N6VKKF3A.module.min.js +0 -2
  214. package/dist/chunk-chunk-NEVE562N.module.min.js +0 -1
  215. package/dist/chunk-chunk-NKZ75IM5.module.min.js +0 -2
  216. package/dist/chunk-chunk-PLIDPQNG.module.min.js +0 -2
  217. package/dist/chunk-chunk-QGZGZI4X.module.min.js +0 -1
  218. package/dist/chunk-chunk-RP7WTID5.module.min.js +0 -1
  219. package/dist/chunk-chunk-S7KLNUO6.module.min.js +0 -1
  220. package/dist/chunk-chunk-SR4ZXOWR.module.min.js +0 -2
  221. package/dist/chunk-statisticalOverlays-QGDLRUHX.module.min.js +0 -1
  222. package/dist/chunk-statisticalOverlays-T77OKLDY.module.min.js +0 -1
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ var t=/^\d{4}-\d{1,2}$/;function e(e){const n=e.trim();if(!n||!Number.isNaN(Number(n)))return NaN;const r=t.test(n)?n+"-01":n;if(r===n&&10>n.length)return NaN;const i=Date.parse(r);return Number.isFinite(i)?i:NaN}function n(t){return t instanceof Date?t.getTime():"string"==typeof t?e(t):+t}export{e as parseDateLikeString,n as coerceDateLikeValue};
@@ -4,6 +4,8 @@ import { type DescribeLevel } from "./ai/describeChart";
4
4
  import type { ChartMode, MobileInteractionProp } from "./charts/shared/types";
5
5
  import { type MobileStandardControlRequest, type MobileStandardControlsProps } from "./MobileStandardControls";
6
6
  import { type MobileVisualizationContract } from "./charts/shared/auditMobileVisualization";
7
+ import type { ChartContainerDataAudit } from "./chartContainerDataAudit";
8
+ export type { ChartContainerDataAudit, ChartContainerDataAuditOptions } from "./chartContainerDataAudit";
7
9
  export type ChartNotificationLevel = "info" | "success" | "warning" | "error" | "neutral";
8
10
  /**
9
11
  * One entry in a ChartContainer's notification stack — chart-level context
@@ -131,6 +133,14 @@ export interface ChartContainerProps {
131
133
  * so notifications that arrive while streaming are announced.
132
134
  */
133
135
  notifications?: ChartNotification[];
136
+ /**
137
+ * Run Semiotic's numeric input audit over `chartConfig.props` and merge its
138
+ * findings into the notification bell. Re-evaluates when the config/data
139
+ * identity changes. Ref-only push mutations are intentionally not observable
140
+ * here; audit a bounded stream snapshot and pass its notifications instead.
141
+ * Requires `chartConfig`.
142
+ */
143
+ dataAudit?: ChartContainerDataAudit;
134
144
  /**
135
145
  * Called when a notification's dismiss button is clicked. Dismissal state
136
146
  * is tracked internally (keyed by `notification.id`, falling back to array
@@ -1,6 +1,7 @@
1
1
  import type { ChartCapability } from "./chartCapabilityTypes";
2
2
  import { LineChartCapability } from "../charts/xy/LineChart.capability";
3
3
  import { AreaChartCapability } from "../charts/xy/AreaChart.capability";
4
+ import { BumpChartCapability } from "../charts/xy/BumpChart.capability";
4
5
  import { StackedAreaChartCapability } from "../charts/xy/StackedAreaChart.capability";
5
6
  import { ScatterplotCapability } from "../charts/xy/Scatterplot.capability";
6
7
  import { ConnectedScatterplotCapability } from "../charts/xy/ConnectedScatterplot.capability";
@@ -45,6 +46,7 @@ import { CollisionSwarmChartCapability } from "../charts/physics/CollisionSwarmC
45
46
  import { PhysicalFlowChartCapability } from "../charts/physics/PhysicalFlowChart.capability";
46
47
  import { ProcessFlowChartCapability } from "../charts/physics/ProcessFlowChart.capability";
47
48
  import { GauntletChartCapability } from "../charts/physics/GauntletChart.capability";
49
+ import { CrucibleChartCapability } from "../charts/physics/CrucibleChart.capability";
48
50
  /**
49
51
  * Register a capability for a chart (built-in or third-party). Re-registering by
50
52
  * component name replaces the previous descriptor — useful for overriding defaults.
@@ -59,4 +61,4 @@ export declare function unregisterChartCapability(component: string): void;
59
61
  export declare function getCapabilities(): ReadonlyArray<ChartCapability>;
60
62
  /** Look up a capability by component name. */
61
63
  export declare function getCapability(component: string): ChartCapability | undefined;
62
- export { LineChartCapability, AreaChartCapability, StackedAreaChartCapability, ScatterplotCapability, ConnectedScatterplotCapability, BubbleChartCapability, QuadrantChartCapability, MultiAxisLineChartCapability, MinimapChartCapability, DifferenceChartCapability, CandlestickChartCapability, HeatmapCapability, BarChartCapability, GroupedBarChartCapability, StackedBarChartCapability, DotPlotCapability, PieChartCapability, DonutChartCapability, FunnelChartCapability, GaugeChartCapability, LikertChartCapability, SwimlaneChartCapability, HistogramCapability, BoxPlotCapability, SwarmPlotCapability, ViolinPlotCapability, RidgelinePlotCapability, ForceDirectedGraphCapability, SankeyDiagramCapability, ChordDiagramCapability, ProcessSankeyCapability, TreeDiagramCapability, TreemapCapability, CirclePackCapability, OrbitDiagramCapability, ChoroplethMapCapability, ProportionalSymbolMapCapability, FlowMapCapability, DistanceCartogramCapability, GaltonBoardChartCapability, EventDropChartCapability, PhysicsPileChartCapability, CollisionSwarmChartCapability, PhysicalFlowChartCapability, ProcessFlowChartCapability, GauntletChartCapability, };
64
+ export { LineChartCapability, AreaChartCapability, BumpChartCapability, StackedAreaChartCapability, ScatterplotCapability, ConnectedScatterplotCapability, BubbleChartCapability, QuadrantChartCapability, MultiAxisLineChartCapability, MinimapChartCapability, DifferenceChartCapability, CandlestickChartCapability, HeatmapCapability, BarChartCapability, GroupedBarChartCapability, StackedBarChartCapability, DotPlotCapability, PieChartCapability, DonutChartCapability, FunnelChartCapability, GaugeChartCapability, LikertChartCapability, SwimlaneChartCapability, HistogramCapability, BoxPlotCapability, SwarmPlotCapability, ViolinPlotCapability, RidgelinePlotCapability, ForceDirectedGraphCapability, SankeyDiagramCapability, ChordDiagramCapability, ProcessSankeyCapability, TreeDiagramCapability, TreemapCapability, CirclePackCapability, OrbitDiagramCapability, ChoroplethMapCapability, ProportionalSymbolMapCapability, FlowMapCapability, DistanceCartogramCapability, GaltonBoardChartCapability, EventDropChartCapability, PhysicsPileChartCapability, CollisionSwarmChartCapability, PhysicalFlowChartCapability, ProcessFlowChartCapability, GauntletChartCapability, CrucibleChartCapability };
@@ -1,5 +1,7 @@
1
1
  import type { Datum } from "../charts/shared/datumTypes";
2
2
  import type { DataSummary } from "../data/DataSummarizer";
3
+ import type { NumericContracts } from "../data/numericContracts";
4
+ import type { NumericFieldProfile } from "../data/auditData";
3
5
  import type { IntentId } from "./intents";
4
6
  import type { ChartRecipe, ChartRecipeFrameFamily, MobileDesignDefinition } from "./chartRecipes";
5
7
  import type { ScaleFitFn, QualityFitFn, ScaleBand, CardinalityBand, EffectiveScale } from "./dataScaleProfile";
@@ -52,6 +54,12 @@ export interface FieldCandidate {
52
54
  export interface ChartDataProfile extends DataSummary {
53
55
  /** Original rows (read-only); used by capabilities to compute their own stats. */
54
56
  data: ReadonlyArray<Datum>;
57
+ /**
58
+ * Per-field numeric health, including invalid/missing counts and extrema.
59
+ * Unlike `fields`, categorical values assigned to a numeric role remain
60
+ * visible here as `nonNumericCount` rather than being silently discarded.
61
+ */
62
+ numericFields?: Readonly<Record<string, NumericFieldProfile>>;
55
63
  /** Candidate fields per role, sorted best-first. */
56
64
  candidates: {
57
65
  x: FieldCandidate[];
@@ -183,6 +191,12 @@ export interface ChartCapability {
183
191
  importPath: ChartImportPath;
184
192
  /** Base rubric, before variant/profile adjustments. */
185
193
  rubric: ChartRubric;
194
+ /**
195
+ * JSON-safe Semiotic runtime declaration of the numeric assumptions this
196
+ * chart makes about accessor-bound data. Consumed by `auditData` and
197
+ * `diagnoseConfig`; not part of the library-neutral IDID v0.1 subset.
198
+ */
199
+ numericContracts?: NumericContracts;
186
200
  /**
187
201
  * Hard requirements gate. Return null if the chart can render this profile,
188
202
  * or a human-readable string explaining why not (e.g. "no numeric y candidate").
@@ -0,0 +1,10 @@
1
+ import type { ChartNotification } from "./ChartContainer";
2
+ import type { ChartConfig } from "./export/chartConfig";
3
+ import { type DataAuditNotificationOptions } from "./data/dataAuditPresentation";
4
+ import type { AuditDataOptions } from "./data/auditData";
5
+ export interface ChartContainerDataAuditOptions extends Pick<AuditDataOptions, "checkOutliers">, DataAuditNotificationOptions {
6
+ }
7
+ export type ChartContainerDataAudit = boolean | ChartContainerDataAuditOptions;
8
+ type AuditableChartConfig = Pick<ChartConfig, "component" | "props">;
9
+ export declare function buildChartDataAuditNotifications(chartConfig: AuditableChartConfig | undefined, dataAudit: ChartContainerDataAudit | undefined): ChartNotification[];
10
+ export {};
@@ -7,6 +7,7 @@ import type { BaseChartProps, AxisConfig, ChartAccessor } from "../shared/types"
7
7
  import type { TooltipProp } from "../../Tooltip/Tooltip";
8
8
  import type { ChartRecipe } from "../../ai/chartRecipes";
9
9
  import type { LegendValue } from "../../types/legendTypes";
10
+ import type { LegendInteractionMode, LegendPosition } from "../shared/useChartLegend";
10
11
  export interface XYCustomChartProps<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>> extends BaseChartProps, AxisConfig {
11
12
  /** Data passed through to LayoutContext.data. */
12
13
  data?: TDatum[];
@@ -34,6 +35,8 @@ export interface XYCustomChartProps<TDatum extends Datum = Datum, TConfig extend
34
35
  showLegend?: boolean;
35
36
  /** Additional legend content. Categorical groups follow the inferred colorBy legend. */
36
37
  legend?: LegendValue;
38
+ legendInteraction?: LegendInteractionMode;
39
+ legendPosition?: LegendPosition;
37
40
  annotations?: Datum[];
38
41
  /** Field or function that declares the semantic category used for custom-layout color. */
39
42
  colorBy?: ChartAccessor<TDatum, string>;
@@ -25,7 +25,7 @@ export interface DistanceCartogramProps<TDatum extends Datum = Datum> extends Ba
25
25
  center: string;
26
26
  /** Cost/distance accessor — numeric field or function */
27
27
  costAccessor: string | ((d: Datum) => number);
28
- /** Interpolation between geographic (0) and cartogram (1) @default 1 */
28
+ /** Interpolation between geographic (0) and cartogram (1), clamped to [0, 1]. @default 1 */
29
29
  strength?: number;
30
30
  /** Line rendering mode @default "straight" */
31
31
  lineMode?: "straight" | "fractional";
@@ -79,11 +79,16 @@ export interface DistanceCartogramProps<TDatum extends Datum = Datum> extends Ba
79
79
  tileAttribution?: string;
80
80
  /** Max cached tiles @default 256 */
81
81
  tileCacheSize?: number;
82
- /** Show concentric distance rings around center. @default true */
82
+ /**
83
+ * Cost reference marks.
84
+ * - Radial layout: concentric rings around center.
85
+ * - Strip (sparkline) layout: baseline tick marks on the cost axis.
86
+ * @default true (radial); true as axis ticks in sparkline
87
+ */
83
88
  showRings?: boolean | number | number[];
84
89
  /** Show numeric labels on distance rings. Defaults to false in context and sparkline modes. */
85
90
  showRingLabels?: boolean;
86
- /** Ring style overrides */
91
+ /** Ring / strip-tick style overrides */
87
92
  ringStyle?: {
88
93
  stroke?: string;
89
94
  strokeWidth?: number;
@@ -95,6 +100,11 @@ export interface DistanceCartogramProps<TDatum extends Datum = Datum> extends Ba
95
100
  showNorth?: boolean;
96
101
  /** Label for cost units shown on rings (e.g. "hrs", "km") */
97
102
  costLabel?: string;
103
+ /**
104
+ * Cartogram layout encoding. Defaults to `"strip"` (1D Langren cost axis)
105
+ * in sparkline mode and `"radial"` otherwise.
106
+ */
107
+ cartogramLayout?: "radial" | "strip";
98
108
  /** Annotations */
99
109
  annotations?: Datum[];
100
110
  /** Passthrough */
@@ -107,7 +117,10 @@ export interface DistanceCartogramProps<TDatum extends Datum = Datum> extends Ba
107
117
  * proportional to `costAccessor` (commute time, fare, hops, etc.) rather
108
118
  * than great-circle distance. `strength` interpolates between the
109
119
  * geographic positions (0) and the fully-distorted cartogram (1).
110
- * Concentric rings show iso-cost contours by default.
120
+ * Concentric rings show iso-cost contours by default. In `mode="sparkline"`
121
+ * the chart collapses to a Langren-style 1D cost strip (origin at left,
122
+ * cost growing right) so dense estimates of the same distance stay legible
123
+ * without map chrome.
111
124
  *
112
125
  * @example
113
126
  * ```tsx
@@ -147,6 +160,19 @@ export interface DistanceCartogramProps<TDatum extends Datum = Datum> extends Ba
147
160
  * lineMode="fractional"
148
161
  * />
149
162
  * ```
163
+ *
164
+ * @example
165
+ * ```tsx
166
+ * // Sparkline: Langren-style 1D cost strip (origin left, cost right)
167
+ * <DistanceCartogram
168
+ * points={estimates}
169
+ * center="Toledo"
170
+ * costAccessor="degrees"
171
+ * mode="sparkline"
172
+ * width={160}
173
+ * height={28}
174
+ * />
175
+ * ```
150
176
  */
151
177
  export declare const DistanceCartogram: {
152
178
  <TDatum extends Datum = Datum>(props: DistanceCartogramProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
@@ -12,8 +12,11 @@ export { ConnectedScatterplot } from "./xy/ConnectedScatterplot";
12
12
  export type { ConnectedScatterplotProps } from "./xy/ConnectedScatterplot";
13
13
  export { LineChart } from "./xy/LineChart";
14
14
  export type { LineChartProps } from "./xy/LineChart";
15
+ export { BumpChart, rankBumpData } from "./xy/BumpChart";
16
+ export type { BumpChartProps, RankedBumpData, RankedBumpDatum, RankBumpDataOptions, } from "./xy/BumpChart";
15
17
  export { AreaChart } from "./xy/AreaChart";
16
18
  export type { AreaChartProps, SemanticGradientStop } from "./xy/AreaChart";
19
+ export type { GradientConfig, GradientStop, SemanticGradientInput, } from "./shared/gradient";
17
20
  export { DifferenceChart } from "./xy/DifferenceChart";
18
21
  export type { DifferenceChartProps } from "./xy/DifferenceChart";
19
22
  export { StackedAreaChart } from "./xy/StackedAreaChart";
@@ -104,6 +107,7 @@ export { PhysicsPileChart } from "./physics/PhysicsPileChart";
104
107
  export type { PhysicsPileChartProps } from "./physics/PhysicsPileChart";
105
108
  export { CollisionSwarmChart } from "./physics/CollisionSwarmChart";
106
109
  export type { CollisionSwarmChartProps } from "./physics/CollisionSwarmChart";
110
+ export * from "./physics/CrucibleChart";
107
111
  export { GauntletChart, GuantletChart, planGauntletPropertyWork, replaceGauntletNegative } from "./physics/GauntletChart";
108
112
  export type { GauntletChartProps, GauntletEffect, GauntletEvent, GauntletEventContext, GauntletEventLogItem, GauntletGate, GauntletLayout, GauntletNegativeReplacementOptions, GauntletPopSpec, GauntletProjectPlacement, GauntletProjectState, GauntletPropertyForceContext, GauntletPropertyDefinition, GauntletPropertyWorkPlan, GauntletPropertyWorkPlanOptions } from "./physics/GauntletChart";
109
113
  export { physicsProcessBoundaryColliders, physicsProcessGroupSemanticItems, physicsProcessRegionSemanticItem, physicsProcessStageSemanticItems } from "./physics/physicsProcessPrimitives";
@@ -90,13 +90,48 @@ export interface ForceDirectedGraphProps<TNode extends Datum = Datum, TEdge exte
90
90
  * @default [5, 20]
91
91
  */
92
92
  nodeSizeRange?: [number, number];
93
+ /**
94
+ * Outline color for **node** marks only, leaving edges untouched — the
95
+ * node half of independent node/edge stroking (the edge half is
96
+ * {@link ForceDirectedGraphProps.edgeColor}). Overrides the generic
97
+ * {@link BaseChartProps.stroke} for nodes; pass `"none"` to remove the
98
+ * default node outline. Precedence per property: `nodeStroke` > `stroke`
99
+ * > the built-in node outline.
100
+ * @example
101
+ * ```tsx
102
+ * // Ringless nodes, blue edges — styled separately
103
+ * <ForceDirectedGraph nodeStroke="none" edgeColor="#4c78a8" />
104
+ * // White node ring, unchanged edges
105
+ * <ForceDirectedGraph nodeStroke="#fff" nodeStrokeWidth={1.5} />
106
+ * ```
107
+ */
108
+ nodeStroke?: string;
109
+ /**
110
+ * Outline width for **node** marks only. Overrides the generic
111
+ * {@link BaseChartProps.strokeWidth} for nodes.
112
+ * @default the generic `strokeWidth`
113
+ */
114
+ nodeStrokeWidth?: number;
93
115
  /**
94
116
  * Constant pixel width, or a function/field returning a numeric value
95
- * scaled to a default width range.
117
+ * scaled to a default width range. The **edge** stroke width; overrides
118
+ * the generic `strokeWidth` for edges.
96
119
  * @default 1
97
120
  */
98
121
  edgeWidth?: number | ChartAccessor<TEdge, number>;
122
+ /**
123
+ * Stroke color for **edge** marks only, leaving nodes untouched — the edge
124
+ * half of independent node/edge stroking (the node half is
125
+ * {@link ForceDirectedGraphProps.nodeStroke}). Overrides the generic
126
+ * {@link BaseChartProps.stroke} for edges. Precedence per property:
127
+ * `edgeColor` > `stroke` > the built-in `#999`.
128
+ * @default "#999"
129
+ */
99
130
  edgeColor?: string;
131
+ /**
132
+ * Opacity for **edge** marks only. Overrides the generic `opacity` for edges.
133
+ * @default 0.6
134
+ */
100
135
  edgeOpacity?: number;
101
136
  /**
102
137
  * Number of force-simulation ticks before the layout settles.
@@ -7,6 +7,7 @@ import { type TooltipProp } from "../../Tooltip/Tooltip";
7
7
  import type { RealtimeFrameHandle } from "../../realtime/types";
8
8
  import { type StyleRule } from "../shared/styleRules";
9
9
  import { type RegressionProp } from "../shared/regressionUtils";
10
+ import { type GradientInput } from "../shared/gradient";
10
11
  /**
11
12
  * BarChart component props
12
13
  */
@@ -64,24 +65,16 @@ export interface BarChartProps<TDatum extends Datum = Datum> extends BaseChartPr
64
65
  /** Rounded top corner radius in pixels. Only the end away from the baseline is rounded. */
65
66
  roundedTop?: number;
66
67
  /**
67
- * Gradient fill from the bar's tip (opposite the baseline) toward its base.
68
- * - `true` default opacity fade (80% 5% of the resolved fill color).
69
- * - `{ topOpacity, bottomOpacity }` — explicit opacity stops on the resolved fill.
70
- * - `{ colorStops: [{offset, color}, ...] }` — arbitrary multi-color gradient.
71
- *
68
+ * Gradient fill from the bar's tip (offset 0) toward its base (offset 1).
69
+ * Stops can set `color`, `opacity`, or both. Omit a stop color to inherit
70
+ * the resolved bar color.
71
+ * @example
72
+ * `{ stops: [{ offset: 0, opacity: 0.8 }, { offset: 1, opacity: 0.05 }] }`
72
73
  * Direction follows the bar's orientation (vertical/horizontal) and sign
73
74
  * (positive/negative bars). Same API as `AreaChart.gradientFill`.
74
75
  * @default false
75
76
  */
76
- gradientFill?: boolean | {
77
- topOpacity: number;
78
- bottomOpacity: number;
79
- } | {
80
- colorStops: Array<{
81
- offset: number;
82
- color: string;
83
- }>;
84
- };
77
+ gradientFill?: GradientInput;
85
78
  /**
86
79
  * Declarative, threshold-aware bar styling. An ordered list of
87
80
  * `{ when, style }` rules; every rule whose condition matches a bar
@@ -25,6 +25,9 @@ export interface GaugeChartProps extends BaseChartProps {
25
25
  /**
26
26
  * Arc-length gradient for the gauge band.
27
27
  *
28
+ * Offset 0 is the sweep start and offset 1 is the sweep end. Stops can set
29
+ * `color`, `opacity`, or both.
30
+ *
28
31
  * The gradient is sampled along the visible filled arc from sweep start
29
32
  * toward the current value. If `fillZones` is false, the entire arc uses
30
33
  * the gradient. If `fillZones` is true, the unfilled remainder stays on
@@ -6,6 +6,7 @@ import type { BaseChartProps, ChartAccessor, CategoryFormatFn } from "../shared/
6
6
  import { type TooltipProp } from "../../Tooltip/Tooltip";
7
7
  import { type StyleRule } from "../shared/styleRules";
8
8
  import type { RealtimeFrameHandle } from "../../realtime/types";
9
+ import { type GradientInput } from "../shared/gradient";
9
10
  export interface GroupedBarChartProps<TDatum extends Datum = Datum> extends BaseChartProps {
10
11
  data?: TDatum[];
11
12
  categoryAccessor?: ChartAccessor<TDatum, string>;
@@ -22,6 +23,8 @@ export interface GroupedBarChartProps<TDatum extends Datum = Datum> extends Base
22
23
  barPadding?: number;
23
24
  /** Rounded corner radius on bar ends (away from baseline). */
24
25
  roundedTop?: number;
26
+ /** Tip-to-base bar gradient using `{ stops: [{ offset, color?, opacity? }] }`. */
27
+ gradientFill?: GradientInput;
25
28
  /**
26
29
  * Declarative, threshold-aware bar styling. Ordered `{ when, style }`
27
30
  * rules; the last applicable rule wins per property. `when` accepts a
@@ -6,6 +6,7 @@ import type { BaseChartProps, ChartAccessor, CategoryFormatFn } from "../shared/
6
6
  import { type TooltipProp } from "../../Tooltip/Tooltip";
7
7
  import type { RealtimeFrameHandle } from "../../realtime/types";
8
8
  import { type StyleRule } from "../shared/styleRules";
9
+ import { type GradientInput } from "../shared/gradient";
9
10
  export interface StackedBarChartProps<TDatum extends Datum = Datum> extends BaseChartProps {
10
11
  data?: TDatum[];
11
12
  categoryAccessor?: ChartAccessor<TDatum, string>;
@@ -23,6 +24,8 @@ export interface StackedBarChartProps<TDatum extends Datum = Datum> extends Base
23
24
  barPadding?: number;
24
25
  /** Rounded top corner radius. Only the topmost stacked segment gets rounded. */
25
26
  roundedTop?: number;
27
+ /** Tip-to-base segment gradient using `{ stops: [{ offset, color?, opacity? }] }`. */
28
+ gradientFill?: GradientInput;
26
29
  /**
27
30
  * Declarative, threshold-aware segment styling. Ordered `{ when, style }`
28
31
  * rules; the last applicable rule wins per property. `when` accepts a
@@ -5,6 +5,7 @@ import type { LegendInteractionMode } from "../shared/hooks";
5
5
  import type { BaseChartProps, ChartAccessor, CategoryFormatFn } from "../shared/types";
6
6
  import { type TooltipProp } from "../../Tooltip/Tooltip";
7
7
  import type { RealtimeFrameHandle } from "../../realtime/types";
8
+ import { type GradientInput } from "../shared/gradient";
8
9
  export interface SwimlaneChartProps<TDatum extends Datum = Datum> extends BaseChartProps {
9
10
  /** Data array. Omit for push API mode. */
10
11
  data?: TDatum[];
@@ -61,20 +62,9 @@ export interface SwimlaneChartProps<TDatum extends Datum = Datum> extends BaseCh
61
62
  rTickValues?: number[];
62
63
  /** Align first value tick label to start, last to end. Prevents clipping at chart edges. */
63
64
  tickLabelEdgeAlign?: boolean;
64
- /** Gradient fill for swimlane segments. `true` uses tip→base opacity ramp;
65
- * pass `{ topOpacity, bottomOpacity }` for a uniform alpha gradient or
66
- * `{ colorStops }` for a multi-stop color ramp. Same shape as
67
- * BarChart.gradientFill / AreaChart.gradientFill. The gradient runs along
68
- * the lane's growth direction (left→right horizontal, bottom→top vertical). */
69
- gradientFill?: boolean | {
70
- topOpacity: number;
71
- bottomOpacity: number;
72
- } | {
73
- colorStops: Array<{
74
- offset: number;
75
- color: string;
76
- }>;
77
- };
65
+ /** Gradient fill along the lane's growth direction. Offset 0 is the tip
66
+ * and offset 1 is the base. Stops can set `color`, `opacity`, or both. */
67
+ gradientFill?: GradientInput;
78
68
  /** Lane "track" fill — a rect drawn behind each lane spanning the full
79
69
  * value-axis range, sized to the lane's bandwidth. Lets budget/progress
80
70
  * lanes read as filled vs. empty. Pass a color string (CSS vars
@@ -0,0 +1,8 @@
1
+ import type { ChartCapability } from "../../ai/chartCapabilityTypes";
2
+ /**
3
+ * CrucibleChart is intentionally known to the AI surface but never selected
4
+ * from a flat data profile. A valid chart needs an authored treatment program,
5
+ * declared products, and explicit destinations that dataset profiling cannot
6
+ * responsibly invent.
7
+ */
8
+ export declare const CrucibleChartCapability: ChartCapability;
@@ -0,0 +1,63 @@
1
+ import * as React from "react";
2
+ import type { Datum } from "../shared/datumTypes";
3
+ import type { CrucibleChartHandle, CrucibleChartProps } from "./crucibleChartProps";
4
+ export * from "./crucibleTypes";
5
+ export * from "./crucibleProgram";
6
+ export { applyCrucibleEvent, buildCrucibleEvidence, buildCrucibleProjection, cloneCrucibleState, crucibleProjectionRows, evaluateCrucibleConservation, resolveCrucibleSelector } from "./crucibleEffects";
7
+ export { DEFAULT_CRUCIBLE_HEIGHT, DEFAULT_CRUCIBLE_OUTLETS, DEFAULT_CRUCIBLE_SIZE, DEFAULT_CRUCIBLE_WIDTH, buildCrucibleInitialSpawns, buildCrucibleLayout, buildCruciblePhysicsConfig, buildCrucibleStateSpawns, buildCrucibleTerminalSpawns, compileCruciblePlan, createInitialCrucibleState, crucibleBoundaryColliders, crucibleBondId, crucibleComponentBodyId, crucibleProductBodyId, crucibleSemanticKey, replayCruciblePlan, resolveCrucibleSnapshotAt, resolveCrucibleTime } from "./cruciblePhysics";
8
+ export type { CrucibleSelectorResult } from "./crucibleEffects";
9
+ export type { CrucibleInitialStateResult, CrucibleResolvedTime, CrucibleSpawnOptions } from "./cruciblePhysics";
10
+ export type { CrucibleChartHandle, CrucibleChartProps, CrucibleColorBy, CrucibleControls, CrucibleSnapshotAt } from "./crucibleChartProps";
11
+ /**
12
+ * A bounded, deterministic treatment tape for peer components. Authored
13
+ * events own every semantic transition; physics only explains co-presence,
14
+ * agitation, binding, separation, and settling.
15
+ *
16
+ * @example One authored event forms and completes a declared product.
17
+ * ```tsx
18
+ * <CrucibleChart
19
+ * data={[{ id: "crm", amount: 1 }, { id: "billing", amount: 1 }]}
20
+ * phases={[{ id: "resolve", duration: 2, motion: "bind" }]}
21
+ * products={[{ id: "golden-record", outletId: "published" }]}
22
+ * outlets={[{ id: "published", side: "bottom" }]}
23
+ * events={[{
24
+ * id: "publish-record",
25
+ * at: { phaseId: "resolve", progress: 0.7 },
26
+ * effects: [{
27
+ * type: "combine",
28
+ * sourceIds: ["crm", "billing"],
29
+ * productId: "golden-record",
30
+ * complete: true
31
+ * }]
32
+ * }]}
33
+ * idAccessor="id"
34
+ * amountAccessor="amount"
35
+ * />
36
+ * ```
37
+ *
38
+ * @example Build an explicit lifecycle and replay it without remount state.
39
+ * ```tsx
40
+ * const chartRef = React.createRef<CrucibleChartHandle>()
41
+ * const events = buildCrucibleProductEvents({
42
+ * productId: "finding",
43
+ * form: { at: { time: 0.5 }, sourceIds: ["trace", "metric"] },
44
+ * contributions: [{ at: { time: 1 }, sourceIds: ["experiment"] }],
45
+ * complete: { at: { time: 1.5 }, outletId: "supported" }
46
+ * })
47
+ *
48
+ * <button onClick={() => chartRef.current?.replay()}>Replay</button>
49
+ * <CrucibleChart
50
+ * ref={chartRef}
51
+ * data={evidence}
52
+ * phases={[{ id: "assay", duration: 2, motion: "mix" }]}
53
+ * products={[{ id: "finding", outletId: "supported" }]}
54
+ * outlets={[{ id: "supported", side: "bottom" }]}
55
+ * events={events}
56
+ * />
57
+ * ```
58
+ */
59
+ export declare const CrucibleChart: {
60
+ <TDatum extends Datum = Datum>(props: CrucibleChartProps<TDatum> & React.RefAttributes<CrucibleChartHandle<TDatum>>): React.ReactElement | null;
61
+ displayName?: string;
62
+ };
63
+ export default CrucibleChart;
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import type { Style } from "../../stream/types";
3
+ import type { PhysicsBodyState } from "../../stream/physics/PhysicsKernel";
4
+ import type { PhysicsSemanticItem } from "../../stream/physics/StreamPhysicsFrame";
5
+ import type { Datum } from "../shared/datumTypes";
6
+ import type { CrucibleComponentState, CrucibleProductState, CrucibleRunState } from "./crucibleTypes";
7
+ export declare function displayNumber(value: number): string;
8
+ export declare function componentDescription(component: CrucibleComponentState): string;
9
+ export declare function productDescription(product: CrucibleProductState): string;
10
+ /** Default accessible description for each live crucible body. */
11
+ export declare function crucibleBodySemanticItem<TDatum extends Datum>(body: PhysicsBodyState, state: CrucibleRunState<TDatum>): false | Partial<PhysicsSemanticItem>;
12
+ /** Canvas mark used when callers do not supply frameProps.renderBody. */
13
+ export declare function drawCrucibleBody(ctx: CanvasRenderingContext2D, body: PhysicsBodyState, style: Style): void;
14
+ /**
15
+ * SSR sibling of `drawCrucibleBody` — the same shadowed hexagon + inner ring
16
+ * for settled products, and highlight dot for source components, as an SVG
17
+ * fragment instead of canvas draw calls. Returns `undefined` for non-crucible
18
+ * bodies so the SVG renderer falls back to its default circle mark.
19
+ *
20
+ * `idPrefix` is the sanitized prefix the owning `PhysicsSettledSVG` document
21
+ * uses for its own ids — folded into this body's `<filter>` id so multiple
22
+ * settled Crucible SVGs on one page (SVG ids are document-global) can't
23
+ * collide and mis-apply each other's glow filter.
24
+ */
25
+ export declare function drawCrucibleBodySVG(body: PhysicsBodyState, style: Style, index: number, idPrefix?: string): React.ReactNode | undefined;
26
+ /** Draw supplied relations and committed source-to-product lineage. */
27
+ export declare function drawCrucibleBonds<TDatum extends Datum>(ctx: CanvasRenderingContext2D, bodies: readonly PhysicsBodyState[], state: CrucibleRunState<TDatum>): void;
@@ -0,0 +1,90 @@
1
+ /** Public, bounded CrucibleChart prop and imperative-handle contracts. */
2
+ import type { StreamPhysicsFrameProps } from "../../stream/physics/StreamPhysicsFrame";
3
+ import type { Datum } from "../shared/datumTypes";
4
+ import type { BaseChartProps, ChartAccessor } from "../shared/types";
5
+ import type { PhysicsHocFrameProps, PhysicsRerunMS, PhysicsSharedChartProps, TooltipProp } from "./physicsHocUtils";
6
+ import type { CrucibleComponentStatus, CrucibleConservationResult, CrucibleConservationSpec, CrucibleDiagnostic, CrucibleEvent, CrucibleMetricMap, CrucibleObservation, CrucibleOutlet, CruciblePhase, CrucibleProductDefinition, CrucibleProjectionSpec, CrucibleRunState } from "./crucibleTypes";
7
+ export interface CrucibleChartHandle<TDatum extends Datum = Datum> {
8
+ play(): void;
9
+ pause(): void;
10
+ reset(): void;
11
+ /**
12
+ * Atomically restart the deterministic tape and play from its origin.
13
+ * Snapshot and reduced-motion renderers remain static at their configured
14
+ * snapshot instead of animating.
15
+ */
16
+ replay(): void;
17
+ /** Advance to and apply the next authored phase boundary. */
18
+ stepPhase(): void;
19
+ /** Resolve the complete bounded tape without animating intermediate time. */
20
+ settle(): void;
21
+ getCrucibleState(): CrucibleRunState<TDatum>;
22
+ }
23
+ export interface CrucibleControls {
24
+ playPause?: boolean;
25
+ reset?: boolean;
26
+ stepPhase?: boolean;
27
+ timeline?: boolean;
28
+ speed?: boolean;
29
+ }
30
+ export type CrucibleSnapshotAt = number | {
31
+ phaseId: string;
32
+ progress?: number;
33
+ };
34
+ export type CrucibleColorBy<TDatum extends Datum = Datum> = "category" | "status" | "outlet" | "product" | ChartAccessor<TDatum, string>;
35
+ export interface CrucibleChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "onClick">, PhysicsSharedChartProps {
36
+ /** Controlled, bounded source charge. CrucibleChart has no live push API. */
37
+ data: TDatum[];
38
+ /** Ordered furnace program. Every phase must have a unique id and duration. */
39
+ phases: readonly CruciblePhase[];
40
+ products?: readonly CrucibleProductDefinition[];
41
+ outlets?: readonly CrucibleOutlet[];
42
+ events?: readonly CrucibleEvent[];
43
+ idAccessor?: ChartAccessor<TDatum, string>;
44
+ labelAccessor?: ChartAccessor<TDatum, string>;
45
+ categoryAccessor?: ChartAccessor<TDatum, string>;
46
+ amountAccessor?: ChartAccessor<TDatum, number>;
47
+ metricsAccessor?: ChartAccessor<TDatum, CrucibleMetricMap>;
48
+ initialStateAccessor?: ChartAccessor<TDatum, CrucibleComponentStatus>;
49
+ metrics?: CrucibleMetricMap;
50
+ amountLabel?: string;
51
+ conservation?: boolean | CrucibleConservationSpec;
52
+ projection?: CrucibleProjectionSpec;
53
+ /**
54
+ * Replay animates the tape; snapshot renders one deterministic instant.
55
+ * Reduced-motion renderers should use snapshot mode and default to the
56
+ * terminal state when `snapshotAt` is omitted.
57
+ */
58
+ playback?: "replay" | "snapshot";
59
+ snapshotAt?: CrucibleSnapshotAt;
60
+ controls?: boolean | CrucibleControls;
61
+ paused?: boolean;
62
+ /** Semantic program speed. 0.25 is quarter-speed; 2 is double-speed. */
63
+ playbackRate?: number;
64
+ /**
65
+ * Delay after settling before a fresh deterministic replay. `null` or an
66
+ * omitted value runs once; `0` schedules the reset on the next timer turn.
67
+ * Snapshot/reduced-motion rendering does not auto-rerun.
68
+ */
69
+ rerunMS?: PhysicsRerunMS;
70
+ size?: [number, number];
71
+ seed?: number | string;
72
+ /** Fixed source-body radius. Per-row radius accessors are outside bounded V1. */
73
+ bodyRadius?: number;
74
+ radiusRange?: [number, number];
75
+ colorBy?: CrucibleColorBy<TDatum>;
76
+ showBonds?: boolean;
77
+ showChrome?: boolean;
78
+ showProjection?: boolean;
79
+ frameProps?: PhysicsHocFrameProps<"bodyForces">;
80
+ initialSpawnPacing?: StreamPhysicsFrameProps["initialSpawnPacing"];
81
+ tooltip?: TooltipProp;
82
+ emptyContent?: BaseChartProps["emptyContent"];
83
+ loading?: BaseChartProps["loading"];
84
+ loadingContent?: BaseChartProps["loadingContent"];
85
+ onStateChange?: (state: CrucibleRunState<TDatum>) => void;
86
+ onCrucibleObservation?: (observation: CrucibleObservation) => void;
87
+ onDiagnostic?: (diagnostic: CrucibleDiagnostic) => void;
88
+ onConservation?: (result: CrucibleConservationResult) => void;
89
+ onClick?: (item: CrucibleRunState<TDatum>["components"][string] | CrucibleRunState<TDatum>["products"][string]) => void;
90
+ }
@@ -0,0 +1,47 @@
1
+ import * as React from "react";
2
+ import type { Style } from "../../stream/types";
3
+ import type { PhysicsBodyState } from "../../stream/physics/PhysicsKernel";
4
+ import type { PhysicsBodyStyleContext, PhysicsHoverData, PhysicsSemanticItem } from "../../stream/physics/StreamPhysicsFrame";
5
+ import type { Datum } from "../shared/datumTypes";
6
+ import type { CrucibleLayout, CruciblePhase, CrucibleProjectionRow, CrucibleProjectionSpec, CrucibleRunState } from "./crucibleTypes";
7
+ /** Default tooltip preserves the distinction between source and product. */
8
+ export declare function defaultCrucibleTooltipContent<TDatum extends Datum>(hover: PhysicsHoverData, state: CrucibleRunState<TDatum>): React.ReactNode;
9
+ /** Static vessel, program rail, and named exception/product outlets. */
10
+ export declare function CrucibleChrome<TDatum extends Datum>({ layout, phases, state, compact }: {
11
+ layout: CrucibleLayout;
12
+ phases: readonly CruciblePhase[];
13
+ state: CrucibleRunState<TDatum>;
14
+ compact?: boolean;
15
+ }): React.JSX.Element;
16
+ export declare function crucibleProjectionSemanticItems(rows: readonly CrucibleProjectionRow[], layout: CrucibleLayout, projection: CrucibleProjectionSpec, amountLabel?: string): PhysicsSemanticItem[];
17
+ /** Compact settled histogram; the ledger values, not body positions, set bars. */
18
+ export declare function CrucibleProjectionOverlay({ rows, layout, projection, amountLabel }: {
19
+ rows: readonly CrucibleProjectionRow[];
20
+ layout: CrucibleLayout;
21
+ projection: CrucibleProjectionSpec;
22
+ amountLabel?: string;
23
+ }): React.JSX.Element | null;
24
+ export interface CrucibleReplayControlsProps {
25
+ controls: {
26
+ playPause: boolean;
27
+ reset: boolean;
28
+ stepPhase: boolean;
29
+ timeline: boolean;
30
+ speed: boolean;
31
+ };
32
+ duration: number;
33
+ elapsed: number;
34
+ phaseLabel: string;
35
+ playing: boolean;
36
+ complete: boolean;
37
+ playbackRate: number;
38
+ disabled?: boolean;
39
+ onPlayPause: () => void;
40
+ onReset: () => void;
41
+ onStepPhase: () => void;
42
+ onPlaybackRateChange: (rate: number) => void;
43
+ }
44
+ /** Optional in-chart replay controls; external controls can use the ref API. */
45
+ export declare function CrucibleReplayControls({ controls, duration, elapsed, phaseLabel, playing, complete, playbackRate, disabled, onPlayPause, onReset, onStepPhase, onPlaybackRateChange }: CrucibleReplayControlsProps): React.JSX.Element;
46
+ /** Merge default semantic styling with a caller's frame bodyStyle. */
47
+ export declare function resolveCrucibleBodyStyle(defaultFill: string, body: PhysicsBodyState, context: PhysicsBodyStyleContext, bodyStyle: Style | ((body: PhysicsBodyState, context: PhysicsBodyStyleContext) => Style) | undefined): Style;