semiotic 3.8.6 → 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.
- package/CLAUDE.md +34 -8
- package/README.md +93 -56
- package/ai/behaviorContracts.cjs +86 -1
- package/ai/componentMetadata.cjs +4 -9
- package/ai/dist/mcp-server.js +125 -12
- package/ai/examples.md +154 -7
- package/ai/schema.json +1742 -156
- package/ai/surface-manifest.json +12 -10
- package/ai/system-prompt.md +9 -3
- package/dist/{chunk-chartContainerDataAudit-FEOD5GTQ.module.min.js → chunk-chartContainerDataAudit-IQ3NBN3Q.module.min.js} +1 -1
- package/dist/chunk-chunk-2B3AIKUZ.module.min.js +2 -0
- package/dist/chunk-chunk-2NVFEB7P.module.min.js +2 -0
- package/dist/chunk-chunk-3GCILWPB.module.min.js +2 -0
- package/dist/chunk-chunk-46KRGJQP.module.min.js +1 -0
- package/dist/{chunk-chunk-G7WFWHAD.module.min.js → chunk-chunk-4ITOQRXM.module.min.js} +1 -1
- package/dist/chunk-chunk-4MLLQUGW.module.min.js +2 -0
- package/dist/chunk-chunk-57RBPDBQ.module.min.js +2 -0
- package/dist/chunk-chunk-5VVNW5AZ.module.min.js +1 -0
- package/dist/chunk-chunk-66PCWJUG.module.min.js +1 -0
- package/dist/chunk-chunk-6V5VQVCT.module.min.js +2 -0
- package/dist/chunk-chunk-7LE56WAE.module.min.js +2 -0
- package/dist/chunk-chunk-7T25U75Z.module.min.js +2 -0
- package/dist/chunk-chunk-AF53TBSN.module.min.js +2 -0
- package/dist/chunk-chunk-BTZYH2IE.module.min.js +1 -0
- package/dist/chunk-chunk-BWV55BZK.module.min.js +2 -0
- package/dist/chunk-chunk-BZNOAHJV.module.min.js +2 -0
- package/dist/chunk-chunk-CD6PVVS3.module.min.js +2 -0
- package/dist/chunk-chunk-DTSNLGRK.module.min.js +2 -0
- package/dist/chunk-chunk-FC3NZWYR.module.min.js +2 -0
- package/dist/chunk-chunk-FEPXDKJP.module.min.js +1 -0
- package/dist/chunk-chunk-FJ76HWQZ.module.min.js +1 -0
- package/dist/chunk-chunk-FQPKOAIH.module.min.js +2 -0
- package/dist/chunk-chunk-FRGBMTZR.module.min.js +1 -0
- package/dist/chunk-chunk-G75OPF5N.module.min.js +2 -0
- package/dist/chunk-chunk-H5IFO6CU.module.min.js +2 -0
- package/dist/chunk-chunk-HADHLMY5.module.min.js +1 -0
- package/dist/chunk-chunk-HBFA4NN6.module.min.js +1 -0
- package/dist/chunk-chunk-HCNDE26Q.module.min.js +2 -0
- package/dist/chunk-chunk-J5QD4RAM.module.min.js +2 -0
- package/dist/chunk-chunk-JJ4BSUYL.module.min.js +2 -0
- package/dist/chunk-chunk-JRHXQGEV.module.min.js +2 -0
- package/dist/chunk-chunk-L6FFYGYS.module.min.js +1 -0
- package/dist/chunk-chunk-LJDH3WV3.module.min.js +2 -0
- package/dist/chunk-chunk-LSJUXBMF.module.min.js +1 -0
- package/dist/chunk-chunk-N3Q33XCB.module.min.js +2 -0
- package/dist/chunk-chunk-NWIGA3UK.module.min.js +1 -0
- package/dist/chunk-chunk-OG3TTJGJ.module.min.js +2 -0
- package/dist/{chunk-chunk-XEVJDUTH.module.min.js → chunk-chunk-OZK46A5U.module.min.js} +1 -1
- package/dist/chunk-chunk-PMR47KRY.module.min.js +2 -0
- package/dist/chunk-chunk-QQJNG23C.module.min.js +2 -0
- package/dist/chunk-chunk-RGJ6TKAH.module.min.js +2 -0
- package/dist/{chunk-chunk-RA7JCG7D.module.min.js → chunk-chunk-SFLUSZ73.module.min.js} +1 -1
- package/dist/chunk-chunk-SV4XAZ3Q.module.min.js +1 -0
- package/dist/chunk-chunk-TCMHJWFJ.module.min.js +1 -0
- package/dist/chunk-chunk-TSCFL235.module.min.js +1 -0
- package/dist/{chunk-chunk-XP3OHHFX.module.min.js → chunk-chunk-UEZ6SHW5.module.min.js} +1 -1
- package/dist/chunk-chunk-UOQRPGPK.module.min.js +2 -0
- package/dist/chunk-chunk-VUWYT7DY.module.min.js +2 -0
- package/dist/{chunk-chunk-GFTVACTO.module.min.js → chunk-chunk-W5HWGQMD.module.min.js} +1 -1
- package/dist/chunk-chunk-WFHZHWT7.module.min.js +1 -0
- package/dist/chunk-chunk-WGROBM3I.module.min.js +2 -0
- package/dist/chunk-chunk-WSDJFBKX.module.min.js +2 -0
- package/dist/chunk-statisticalOverlays-HMYYSGPE.module.min.js +2 -0
- package/dist/components/ai/SemioticVACPBridge.d.ts +22 -0
- package/dist/components/ai/chartCapabilities.d.ts +4 -3
- package/dist/components/ai/conversationArc.d.ts +2 -176
- package/dist/components/ai/conversationArcTypes.d.ts +202 -0
- package/dist/components/ai/readerGrounding.d.ts +12 -0
- package/dist/components/ai/vacpAdapter.d.ts +13 -0
- package/dist/components/ai/vacpAdapterActions.d.ts +2 -0
- package/dist/components/ai/vacpAdapterModel.d.ts +7 -0
- package/dist/components/ai/vacpAdapterRuntime.d.ts +26 -0
- package/dist/components/ai/vacpAdapterState.d.ts +3 -0
- package/dist/components/ai/vacpAdapterTypes.d.ts +169 -0
- package/dist/components/ai/vacpTypes.d.ts +160 -0
- package/dist/components/charts/index.d.ts +6 -6
- package/dist/components/charts/network/ProcessSankey.d.ts +105 -74
- package/dist/components/charts/network/processSankey/accessors.d.ts +7 -0
- package/dist/components/charts/network/processSankey/algorithm.d.ts +14 -193
- package/dist/components/charts/network/processSankey/axisChrome.d.ts +31 -0
- package/dist/components/charts/network/processSankey/bandPaths.d.ts +45 -0
- package/dist/components/charts/network/processSankey/buildScenes.d.ts +41 -3
- package/dist/components/charts/network/processSankey/fixtures.d.ts +17 -0
- package/dist/components/charts/network/processSankey/frameMargins.d.ts +11 -0
- package/dist/components/charts/network/processSankey/groupBonding.d.ts +13 -0
- package/dist/components/charts/network/processSankey/inventoryAtTime.d.ts +41 -0
- package/dist/components/charts/network/processSankey/labelPlacement.d.ts +34 -0
- package/dist/components/charts/network/processSankey/layoutGeometry.d.ts +47 -0
- package/dist/components/charts/network/processSankey/layoutOrchestrator.d.ts +44 -0
- package/dist/components/charts/network/processSankey/layoutQualityProduct.d.ts +27 -0
- package/dist/components/charts/network/processSankey/massSimulation.d.ts +16 -0
- package/dist/components/charts/network/processSankey/ordering.d.ts +55 -0
- package/dist/components/charts/network/processSankey/orderingBond.d.ts +33 -0
- package/dist/components/charts/network/processSankey/orientation.d.ts +5 -0
- package/dist/components/charts/network/processSankey/packing.d.ts +8 -0
- package/dist/components/charts/network/processSankey/packingCache.d.ts +23 -0
- package/dist/components/charts/network/processSankey/processSankeyLayoutAsync.d.ts +27 -0
- package/dist/components/charts/network/processSankey/processSankeyLayoutWorkerClient.d.ts +72 -0
- package/dist/components/charts/network/processSankey/processSankeyTooltip.d.ts +26 -0
- package/dist/components/charts/network/processSankey/processSankeyTypes.d.ts +163 -0
- package/dist/components/charts/network/processSankey/ribbonInputs.d.ts +26 -2
- package/dist/components/charts/network/processSankey/ribbonRunway.d.ts +45 -0
- package/dist/components/charts/network/processSankey/streamingLayout.d.ts +23 -0
- package/dist/components/charts/network/processSankey/time.d.ts +11 -0
- package/dist/components/charts/network/processSankey/useProcessSankeyPush.d.ts +29 -0
- package/dist/components/charts/network/processSankey/useProcessSankeyScenes.d.ts +26 -0
- package/dist/components/charts/network/processSankey/validation.d.ts +33 -0
- package/dist/components/charts/physics/ChainReactionChart.capability.d.ts +9 -0
- package/dist/components/charts/physics/ChainReactionChart.d.ts +29 -0
- package/dist/components/charts/physics/CollisionSwarmChart.d.ts +1 -1
- package/dist/components/charts/physics/EventDropChart.d.ts +7 -2
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +1 -1
- package/dist/components/charts/physics/{PhysicsPileChart.capability.d.ts → PacketFlowChart.capability.d.ts} +1 -1
- package/dist/components/charts/physics/{PhysicalFlowChart.d.ts → PacketFlowChart.d.ts} +22 -6
- package/dist/components/charts/physics/PhysicsCustomChart.d.ts +1 -1
- package/dist/components/charts/physics/ProcessFlowChart.d.ts +7 -4
- package/dist/components/charts/physics/{PhysicalFlowChart.capability.d.ts → UnitPileChart.capability.d.ts} +1 -1
- package/dist/components/charts/physics/{PhysicsPileChart.d.ts → UnitPileChart.d.ts} +19 -6
- package/dist/components/charts/physics/crucibleChartProps.d.ts +1 -1
- package/dist/components/charts/physics/crucibleChartUtils.d.ts +9 -0
- package/dist/components/charts/physics/gauntletChartProps.d.ts +6 -1
- package/dist/components/charts/physics/gauntletTerminal.d.ts +61 -0
- package/dist/components/charts/physics/packetFlowSemantics.d.ts +6 -0
- package/dist/components/charts/physics/physicsHocUtils.d.ts +45 -2
- package/dist/components/charts/shared/auditAccessibilityStyles.d.ts +9 -0
- package/dist/components/charts/shared/chartFamilySets.d.ts +1 -0
- package/dist/components/charts/shared/formatUtils.d.ts +12 -1
- package/dist/components/charts/shared/hatchFill.d.ts +2 -0
- package/dist/components/charts/shared/hooks.d.ts +1 -1
- package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
- package/dist/components/charts/shared/leastSquaresRegression.d.ts +31 -0
- package/dist/components/charts/shared/styleRules.d.ts +5 -1
- package/dist/components/charts/shared/useChartLegend.d.ts +14 -1
- package/dist/components/charts/shared/useChartSetup.d.ts +8 -1
- package/dist/components/charts/shared/validateProps.d.ts +2 -2
- package/dist/components/charts/shared/withChartWrapper.d.ts +0 -6
- package/dist/components/data/numericFieldProfiler.d.ts +2 -0
- package/dist/components/data/portability/capabilityBinding.d.ts +41 -0
- package/dist/components/data/portability/index.d.ts +2 -0
- package/dist/components/legendLayout.d.ts +56 -0
- package/dist/components/recipes/geographicDotGrid.d.ts +82 -0
- package/dist/components/recipes/geographicGrid.d.ts +100 -0
- package/dist/components/recipes/layout1d.d.ts +68 -0
- package/dist/components/recipes/physics.d.ts +2 -0
- package/dist/components/recipes/physicsStageGeography.d.ts +137 -0
- package/dist/components/semiotic-ai.d.ts +4 -3
- package/dist/components/semiotic-experimental-vacp.d.ts +11 -0
- package/dist/components/semiotic-experimental.d.ts +6 -3
- package/dist/components/semiotic-geo.d.ts +4 -0
- package/dist/components/semiotic-network.d.ts +2 -2
- package/dist/components/semiotic-physics.d.ts +9 -6
- package/dist/components/semiotic-recipes-core.d.ts +8 -1
- package/dist/components/semiotic.d.ts +2 -0
- package/dist/components/server/renderEvidence.d.ts +1 -1
- package/dist/components/server/renderToStaticSVG.d.ts +2 -1
- package/dist/components/server/serverChartConfigHeatmap.d.ts +6 -0
- package/dist/components/server/serverChartConfigNetworkStyles.d.ts +12 -0
- package/dist/components/server/serverChartConfigShared.d.ts +16 -0
- package/dist/components/server/serverChartConfigs.d.ts +2 -2
- package/dist/components/server/serverChartConfigsPhysics.d.ts +2 -2
- package/dist/components/server/serverChartConfigsXY.d.ts +0 -1
- package/dist/components/server/staticLegend.d.ts +6 -0
- package/dist/components/server/staticSVGChrome.d.ts +12 -3
- package/dist/components/server/staticValue.d.ts +8 -0
- package/dist/components/store/createStore.d.ts +2 -0
- package/dist/components/stream/OrdinalPipelineStore.d.ts +3 -0
- package/dist/components/stream/PipelineStore.d.ts +5 -0
- package/dist/components/stream/accessorUtils.d.ts +21 -0
- package/dist/components/stream/frameKeyboardNavigation.d.ts +3 -2
- package/dist/components/stream/geoPipelineConfig.d.ts +10 -0
- package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +3 -8
- package/dist/components/stream/layouts/index.d.ts +1 -1
- package/dist/components/stream/legendRenderer.d.ts +8 -0
- package/dist/components/stream/moduleWorkerSession.d.ts +67 -0
- package/dist/components/stream/networkTypes.d.ts +2 -0
- package/dist/components/stream/ordinalSceneBuilders/sceneBuilderMap.d.ts +2 -1
- package/dist/components/stream/physics/PhysicsEvidence.d.ts +37 -0
- package/dist/components/stream/physics/PhysicsKernel.d.ts +9 -0
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +9 -0
- package/dist/components/stream/physics/PhysicsSettledScene.d.ts +5 -0
- package/dist/components/stream/physics/physicsFramePipelineConfig.d.ts +19 -0
- package/dist/components/stream/physics/physicsPipelineSettle.d.ts +52 -0
- package/dist/components/stream/physics/physicsRegionRuntime.d.ts +23 -0
- package/dist/components/stream/pipelineIntroCancellation.d.ts +6 -0
- package/dist/components/stream/pipelineTransitions.d.ts +15 -1
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +16 -4
- package/dist/components/stream/renderers/symbolCanvasRenderer.d.ts +4 -0
- package/dist/components/stream/symbolPath.d.ts +8 -0
- package/dist/components/stream/types.d.ts +4 -0
- package/dist/components/stream/useCanvasFrameHost.d.ts +6 -0
- package/dist/components/stream/useSemanticFrameInteractions.d.ts +12 -3
- package/dist/components/stream/xyFrameAxisTypes.d.ts +4 -0
- package/dist/components/types/legendTypes.d.ts +17 -1
- package/dist/controls.min.js +1 -1
- package/dist/controls.module.min.js +1 -1
- package/dist/forceLayoutWorker.js +1 -1
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/physicsWorker.js +1 -1
- package/dist/processSankeyLayoutWorker.js +1 -0
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +4 -3
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental-vacp.d.ts +11 -0
- package/dist/semiotic-experimental-vacp.min.js +1 -0
- package/dist/semiotic-experimental-vacp.module.min.js +1 -0
- package/dist/semiotic-experimental.d.ts +6 -3
- package/dist/semiotic-experimental.min.js +2 -1
- package/dist/semiotic-experimental.module.min.js +2 -1
- package/dist/semiotic-geo.d.ts +4 -0
- package/dist/semiotic-network.d.ts +2 -2
- package/dist/semiotic-physics.d.ts +9 -6
- package/dist/semiotic-realtime-core.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-recipes-core.d.ts +8 -1
- package/dist/semiotic-recipes-core.min.js +1 -1
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-server-edge.min.js +1 -1
- package/dist/semiotic-server-edge.module.min.js +1 -1
- package/dist/semiotic-server-node.min.js +1 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-themes-core.module.min.js +1 -1
- package/dist/semiotic-themes-react.module.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils-core.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- package/dist/semiotic-utils-react.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-value.min.js +1 -1
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic.d.ts +2 -0
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +21 -4
- package/spec/README.md +94 -2
- package/spec/bindings/README.md +14 -3
- package/spec/v0.1/examples/annotation-provenance-reviewed-revision.json +27 -0
- package/spec/v0.1/examples/annotation-provenance-watcher-threshold.json +21 -0
- package/spec/v0.1/examples/audience-profile-executive-review.json +24 -0
- package/spec/v0.1/examples/audience-profile-incident-operators.json +42 -0
- package/spec/v0.1/examples/chart-capability-bar-comparison.json +48 -0
- package/spec/v0.1/examples/chart-capability-service-flow.json +54 -0
- package/dist/chunk-chunk-2CHN2TA3.module.min.js +0 -1
- package/dist/chunk-chunk-3NGIKFD6.module.min.js +0 -1
- package/dist/chunk-chunk-3SHB24AG.module.min.js +0 -1
- package/dist/chunk-chunk-4MMOOYTX.module.min.js +0 -2
- package/dist/chunk-chunk-5RKXZQ2P.module.min.js +0 -1
- package/dist/chunk-chunk-75OTQSXS.module.min.js +0 -1
- package/dist/chunk-chunk-7ALTGHK6.module.min.js +0 -1
- package/dist/chunk-chunk-A5GRQUOF.module.min.js +0 -1
- package/dist/chunk-chunk-AAF5LZAU.module.min.js +0 -2
- package/dist/chunk-chunk-ARZGA4LJ.module.min.js +0 -2
- package/dist/chunk-chunk-C4YA6TDR.module.min.js +0 -1
- package/dist/chunk-chunk-CAFLML4L.module.min.js +0 -2
- package/dist/chunk-chunk-CO5KQMGH.module.min.js +0 -1
- package/dist/chunk-chunk-DSNGDNJY.module.min.js +0 -1
- package/dist/chunk-chunk-FHBN7OEB.module.min.js +0 -2
- package/dist/chunk-chunk-GMQ5AYTD.module.min.js +0 -1
- package/dist/chunk-chunk-IP2UE74X.module.min.js +0 -1
- package/dist/chunk-chunk-ITDWLZXV.module.min.js +0 -2
- package/dist/chunk-chunk-JCG72SGW.module.min.js +0 -2
- package/dist/chunk-chunk-LPSPATPC.module.min.js +0 -1
- package/dist/chunk-chunk-OM6NWS4H.module.min.js +0 -2
- package/dist/chunk-chunk-PRDGLMJT.module.min.js +0 -2
- package/dist/chunk-chunk-PX5YQGDP.module.min.js +0 -2
- package/dist/chunk-chunk-Q2BS46W2.module.min.js +0 -2
- package/dist/chunk-chunk-QSQVBIJA.module.min.js +0 -1
- package/dist/chunk-chunk-RCF52Z42.module.min.js +0 -2
- package/dist/chunk-chunk-RNUHEXZA.module.min.js +0 -2
- package/dist/chunk-chunk-ROZWKEUG.module.min.js +0 -1
- package/dist/chunk-chunk-SMVD3EQJ.module.min.js +0 -2
- package/dist/chunk-chunk-T2FKJD4O.module.min.js +0 -2
- package/dist/chunk-chunk-UDREYOLV.module.min.js +0 -1
- package/dist/chunk-chunk-VOWE3SAP.module.min.js +0 -2
- package/dist/chunk-chunk-VQPNBUSW.module.min.js +0 -2
- package/dist/chunk-chunk-WAWCIHFJ.module.min.js +0 -1
- package/dist/chunk-chunk-WCX6U47H.module.min.js +0 -2
- package/dist/chunk-chunk-WYARAXHR.module.min.js +0 -2
- package/dist/chunk-chunk-XV3KGYTR.module.min.js +0 -2
- package/dist/chunk-chunk-YC2IVEPX.module.min.js +0 -1
- package/dist/chunk-chunk-ZOAQDIJO.module.min.js +0 -1
- package/dist/chunk-chunk-ZXIXAPRE.module.min.js +0 -2
- package/dist/chunk-statisticalOverlays-6MVAK5RW.module.min.js +0 -2
- package/dist/components/stream/renderers/networkSymbolRenderer.d.ts +0 -2
|
@@ -4,8 +4,8 @@ import type { StyleRule } from "../shared/styleRules";
|
|
|
4
4
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
5
5
|
import { type PhysicalFlowCoordinateMode, type PhysicalFlowPathConstraint, type PhysicalFlowRawPath } from "./physicsChartUtils";
|
|
6
6
|
import { type PhysicsFrameHandle } from "./physicsHocHandle";
|
|
7
|
-
import { type PhysicsHocFrameProps, type PhysicsSharedChartProps, type TooltipProp } from "./physicsHocUtils";
|
|
8
|
-
export interface
|
|
7
|
+
import { type PhysicsHocFrameProps, type PhysicsRerunMS, type PhysicsSharedChartProps, type TooltipProp } from "./physicsHocUtils";
|
|
8
|
+
export interface PacketFlowChartProps<TNode extends Datum = Datum, TLink extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "selection">, PhysicsSharedChartProps {
|
|
9
9
|
nodes?: TNode[];
|
|
10
10
|
links?: TLink[];
|
|
11
11
|
edges?: TLink[];
|
|
@@ -37,15 +37,22 @@ export interface PhysicalFlowChartProps<TNode extends Datum = Datum, TLink exten
|
|
|
37
37
|
styleRules?: StyleRule[];
|
|
38
38
|
seed?: number;
|
|
39
39
|
tooltip?: TooltipProp;
|
|
40
|
+
/**
|
|
41
|
+
* Replay the seeded simulation this many milliseconds after it settles.
|
|
42
|
+
* Omit or pass `null` for a single run; `0` replays on the next timer turn.
|
|
43
|
+
*/
|
|
44
|
+
rerunMS?: PhysicsRerunMS;
|
|
40
45
|
paused?: boolean;
|
|
41
46
|
frameProps?: PhysicsHocFrameProps<"config">;
|
|
42
47
|
}
|
|
48
|
+
/** @deprecated Renamed to {@link PacketFlowChartProps} in 3.9.0. */
|
|
49
|
+
export type PhysicalFlowChartProps<TNode extends Datum = Datum, TLink extends Datum = Datum> = PacketFlowChartProps<TNode, TLink>;
|
|
43
50
|
/**
|
|
44
51
|
* Physics-backed flow chart that sends packet bodies along authored routes while retaining a static throughput layer.
|
|
45
52
|
*
|
|
46
53
|
* @example
|
|
47
54
|
* ```tsx
|
|
48
|
-
* <
|
|
55
|
+
* <PacketFlowChart
|
|
49
56
|
* nodes={[{ id: "in", x: 0.1, y: 0.5 }, { id: "out", x: 0.9, y: 0.5 }]}
|
|
50
57
|
* links={[{ source: "in", target: "out", value: 40 }]}
|
|
51
58
|
* coordinateMode="normalized"
|
|
@@ -54,7 +61,7 @@ export interface PhysicalFlowChartProps<TNode extends Datum = Datum, TLink exten
|
|
|
54
61
|
*
|
|
55
62
|
* @example
|
|
56
63
|
* ```tsx
|
|
57
|
-
* <
|
|
64
|
+
* <PacketFlowChart
|
|
58
65
|
* nodes={ports}
|
|
59
66
|
* edges={routes}
|
|
60
67
|
* pathAccessor="path"
|
|
@@ -63,8 +70,17 @@ export interface PhysicalFlowChartProps<TNode extends Datum = Datum, TLink exten
|
|
|
63
70
|
* />
|
|
64
71
|
* ```
|
|
65
72
|
*/
|
|
73
|
+
export declare const PacketFlowChart: {
|
|
74
|
+
<TNode extends Datum = Datum, TLink extends Datum = Datum>(props: PacketFlowChartProps<TNode, TLink> & React.RefAttributes<PhysicsFrameHandle>): React.ReactElement | null;
|
|
75
|
+
displayName?: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated Renamed to {@link PacketFlowChart} in 3.9.0. Sends discrete packets along authored routes; "Physical" named the substrate and told a reader nothing about the reading protocol.
|
|
79
|
+
* The alias stays exported indefinitely for existing imports; new code and
|
|
80
|
+
* every registry (schema, capabilities, MCP, server configs) use `PacketFlowChart`.
|
|
81
|
+
*/
|
|
66
82
|
export declare const PhysicalFlowChart: {
|
|
67
|
-
<TNode extends Datum = Datum, TLink extends Datum = Datum>(props:
|
|
83
|
+
<TNode extends Datum = Datum, TLink extends Datum = Datum>(props: PacketFlowChartProps<TNode, TLink> & React.RefAttributes<PhysicsFrameHandle>): React.ReactElement | null;
|
|
68
84
|
displayName?: string;
|
|
69
85
|
};
|
|
70
|
-
export default
|
|
86
|
+
export default PacketFlowChart;
|
|
@@ -62,7 +62,7 @@ export interface PhysicsCustomLayoutResult {
|
|
|
62
62
|
}
|
|
63
63
|
export type PhysicsCustomLayout<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>> = (ctx: PhysicsCustomLayoutContext<TDatum, TConfig>) => PhysicsCustomLayoutResult;
|
|
64
64
|
export type PhysicsCustomSpawnDatumResult = PhysicsDatumSpawnResult | PhysicsQueuedSpawn | PhysicsQueuedSpawn[];
|
|
65
|
-
export interface PhysicsCustomChartProps<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>> extends Omit<BaseChartProps, "margin">, PhysicsSharedChartProps {
|
|
65
|
+
export interface PhysicsCustomChartProps<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>> extends Omit<BaseChartProps, "margin" | "selection">, PhysicsSharedChartProps {
|
|
66
66
|
data?: TDatum[];
|
|
67
67
|
layout: PhysicsCustomLayout<TDatum, TConfig>;
|
|
68
68
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { type
|
|
2
|
+
import { type StreamPhysicsFrameProps } from "../../stream/physics/StreamPhysicsFrame";
|
|
3
3
|
import { type CapacityQueueSnapshot } from "../../stream/physics/PhysicsControllers";
|
|
4
4
|
import { type ProcessChromeOptions } from "../../recipes/processChrome";
|
|
5
5
|
import type { Datum } from "../shared/datumTypes";
|
|
6
6
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
7
7
|
import { type ProcessFlowProjectionMetadata, type ProcessFlowStageDef } from "./physicsChartUtils";
|
|
8
8
|
import { type PhysicsFrameHandle } from "./physicsHocHandle";
|
|
9
|
-
import { type PhysicsHocFrameProps, type PhysicsSharedChartProps, type TooltipProp } from "./physicsHocUtils";
|
|
9
|
+
import { type PhysicsHocFrameProps, type PhysicsRerunMS, type PhysicsSharedChartProps, type TooltipProp } from "./physicsHocUtils";
|
|
10
10
|
export type { ProcessFlowStageDef, ProcessFlowProjectionMetadata };
|
|
11
11
|
export interface ProcessFlowChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "selection">, PhysicsSharedChartProps {
|
|
12
12
|
data?: TDatum[];
|
|
@@ -35,6 +35,11 @@ export interface ProcessFlowChartProps<TDatum extends Datum = Datum> extends Omi
|
|
|
35
35
|
springDamping?: number;
|
|
36
36
|
tooltip?: TooltipProp;
|
|
37
37
|
paused?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Replay the seeded simulation this many milliseconds after it settles.
|
|
40
|
+
* Omit or pass `null` for a single run; `0` replays on the next timer turn.
|
|
41
|
+
*/
|
|
42
|
+
rerunMS?: PhysicsRerunMS;
|
|
38
43
|
initialSpawnPacing?: StreamPhysicsFrameProps["initialSpawnPacing"];
|
|
39
44
|
/**
|
|
40
45
|
* When true (default), stages with `capacity` install live FIFO queue
|
|
@@ -43,8 +48,6 @@ export interface ProcessFlowChartProps<TDatum extends Datum = Datum> extends Omi
|
|
|
43
48
|
liveCapacity?: boolean;
|
|
44
49
|
/** Live capacity metrics callback (queue depth, processed count per region). */
|
|
45
50
|
onCapacityChange?: (stats: CapacityQueueSnapshot[]) => void;
|
|
46
|
-
/** Shared selection (process body restyle without relayout). */
|
|
47
|
-
selection?: PhysicsBodySelection | null;
|
|
48
51
|
/**
|
|
49
52
|
* Soft body budget: caps live bodies via pipeline bodyLimit (evict oldest).
|
|
50
53
|
* Use for infinite/long streams with sediment-style history in the readout.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ChartCapability } from "../../ai/chartCapabilityTypes";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const UnitPileChartCapability: ChartCapability;
|
|
@@ -3,8 +3,8 @@ import type { Datum } from "../shared/datumTypes";
|
|
|
3
3
|
import type { BaseChartProps, ChartAccessor, ChartMode } from "../shared/types";
|
|
4
4
|
import type { StyleRule } from "../shared/styleRules";
|
|
5
5
|
import { type PhysicsFrameHandle } from "./physicsHocHandle";
|
|
6
|
-
import { type PhysicsHocFrameProps, type PhysicsSharedChartProps, type PhysicsSimulationMode, type TooltipProp } from "./physicsHocUtils";
|
|
7
|
-
export interface
|
|
6
|
+
import { type PhysicsHocFrameProps, type PhysicsRerunMS, type PhysicsSharedChartProps, type PhysicsSimulationMode, type TooltipProp } from "./physicsHocUtils";
|
|
7
|
+
export interface UnitPileChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "mode" | "selection">, PhysicsSharedChartProps {
|
|
8
8
|
data?: TDatum[];
|
|
9
9
|
size?: [number, number];
|
|
10
10
|
categoryAccessor?: ChartAccessor<TDatum, string>;
|
|
@@ -30,15 +30,22 @@ export interface PhysicsPileChartProps<TDatum extends Datum = Datum> extends Omi
|
|
|
30
30
|
showProjection?: boolean;
|
|
31
31
|
sediment?: boolean;
|
|
32
32
|
tooltip?: TooltipProp;
|
|
33
|
+
/**
|
|
34
|
+
* Replay the seeded simulation this many milliseconds after it settles.
|
|
35
|
+
* Omit or pass `null` for a single run; `0` replays on the next timer turn.
|
|
36
|
+
*/
|
|
37
|
+
rerunMS?: PhysicsRerunMS;
|
|
33
38
|
paused?: boolean;
|
|
34
39
|
frameProps?: PhysicsHocFrameProps<"config">;
|
|
35
40
|
}
|
|
41
|
+
/** @deprecated Renamed to {@link UnitPileChartProps} in 3.9.0. */
|
|
42
|
+
export type PhysicsPileChartProps<TDatum extends Datum = Datum> = UnitPileChartProps<TDatum>;
|
|
36
43
|
/**
|
|
37
44
|
* Physics-backed unit pile chart that converts category values into repeated bodies and a readable settled projection.
|
|
38
45
|
*
|
|
39
46
|
* @example
|
|
40
47
|
* ```tsx
|
|
41
|
-
* <
|
|
48
|
+
* <UnitPileChart
|
|
42
49
|
* data={[{ category: "A", value: 12 }, { category: "B", value: 8 }]}
|
|
43
50
|
* categoryAccessor="category"
|
|
44
51
|
* valueAccessor="value"
|
|
@@ -48,7 +55,7 @@ export interface PhysicsPileChartProps<TDatum extends Datum = Datum> extends Omi
|
|
|
48
55
|
*
|
|
49
56
|
* @example
|
|
50
57
|
* ```tsx
|
|
51
|
-
* <
|
|
58
|
+
* <UnitPileChart
|
|
52
59
|
* mode="mechanical"
|
|
53
60
|
* mechanicalCategories={["North", "South", "West"]}
|
|
54
61
|
* mechanicalCount={90}
|
|
@@ -56,5 +63,11 @@ export interface PhysicsPileChartProps<TDatum extends Datum = Datum> extends Omi
|
|
|
56
63
|
* />
|
|
57
64
|
* ```
|
|
58
65
|
*/
|
|
59
|
-
export declare const
|
|
60
|
-
|
|
66
|
+
export declare const UnitPileChart: React.ForwardRefExoticComponent<UnitPileChartProps<Datum> & React.RefAttributes<PhysicsFrameHandle>>;
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated Renamed to {@link UnitPileChart} in 3.9.0. Unitizes category values into countable bodies; the substrate is an implementation detail, not the reading.
|
|
69
|
+
* The alias stays exported indefinitely for existing imports; new code and
|
|
70
|
+
* every registry (schema, capabilities, MCP, server configs) use `UnitPileChart`.
|
|
71
|
+
*/
|
|
72
|
+
export declare const PhysicsPileChart: React.ForwardRefExoticComponent<UnitPileChartProps<Datum> & React.RefAttributes<PhysicsFrameHandle>>;
|
|
73
|
+
export default UnitPileChart;
|
|
@@ -32,7 +32,7 @@ export type CrucibleSnapshotAt = number | {
|
|
|
32
32
|
progress?: number;
|
|
33
33
|
};
|
|
34
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 {
|
|
35
|
+
export interface CrucibleChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "onClick" | "selection">, PhysicsSharedChartProps {
|
|
36
36
|
/** Controlled, bounded source charge. CrucibleChart has no live push API. */
|
|
37
37
|
data: TDatum[];
|
|
38
38
|
/** Ordered furnace program. Every phase must have a unique id and duration. */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
2
|
+
import type { CrucibleColorBy, CrucibleControls } from "./crucibleChartProps";
|
|
3
|
+
import type { CrucibleComponentState, CrucibleRunState } from "./crucibleTypes";
|
|
4
|
+
export declare function numericCrucibleSeed(seed: number | string | undefined): number;
|
|
5
|
+
export declare function boundedCruciblePlaybackRate(value: unknown): number;
|
|
6
|
+
export declare function resolveCrucibleControls(controls: boolean | CrucibleControls | undefined): Required<CrucibleControls>;
|
|
7
|
+
export declare function crucibleColorKey<TDatum extends Datum>(component: CrucibleComponentState<TDatum>, colorBy: CrucibleColorBy<TDatum>, index: number): string;
|
|
8
|
+
export declare function crucibleColorForKey(key: string): string;
|
|
9
|
+
export declare function crucibleStateSummary<TDatum extends Datum>(state: CrucibleRunState<TDatum>, amountLabel?: string): string;
|
|
@@ -9,7 +9,7 @@ import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
|
9
9
|
import type { PhysicsProcessBodyGroup } from "./physicsProcessPrimitives";
|
|
10
10
|
import type { PhysicsHocFrameProps, PhysicsRerunMS, PhysicsSharedChartProps, TooltipProp } from "./physicsHocUtils";
|
|
11
11
|
import type { GauntletEvent, GauntletGate, GauntletLayout, GauntletProjectPlacement, GauntletProjectState, GauntletPropertyDefinition } from "./gauntletTypes";
|
|
12
|
-
export interface GauntletChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin">, PhysicsSharedChartProps {
|
|
12
|
+
export interface GauntletChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "selection">, PhysicsSharedChartProps {
|
|
13
13
|
data?: TDatum[];
|
|
14
14
|
size?: [number, number];
|
|
15
15
|
idAccessor?: ChartAccessor<TDatum, string>;
|
|
@@ -43,6 +43,11 @@ export interface GauntletChartProps<TDatum extends Datum = Datum> extends Omit<B
|
|
|
43
43
|
positiveProperties: Map<string, GauntletPropertyDefinition>;
|
|
44
44
|
}) => string;
|
|
45
45
|
paused?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Deterministic seed, matching every other physics HOC. An explicit
|
|
48
|
+
* `frameProps.config.kernel.seed` still wins so existing snapshots hold.
|
|
49
|
+
*/
|
|
50
|
+
seed?: number;
|
|
46
51
|
/**
|
|
47
52
|
* Replay the full compound simulation this many milliseconds after it
|
|
48
53
|
* settles. Omit or pass `null` for a single run; `0` replays on the next
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gauntlet terminal state — the end of the authored tape, computed without
|
|
3
|
+
* running the simulation.
|
|
4
|
+
*
|
|
5
|
+
* ## Why this exists
|
|
6
|
+
*
|
|
7
|
+
* Every event-tape physics chart owes the same contract: **its end state must be
|
|
8
|
+
* computable from the authored inputs alone.** If the outcome only exists as the
|
|
9
|
+
* residue of a simulation, then reduced motion, SSR, snapshot export, and
|
|
10
|
+
* `describeChart` cannot state it, and the chart is a movie rather than a
|
|
11
|
+
* reading. `CrucibleChart` satisfies this by compiling `terminalState` /
|
|
12
|
+
* `terminalSpawns`; `ChainReactionChart` satisfies it by deriving task state from
|
|
13
|
+
* the data at `currentTime`. Gauntlet had no such function — this is it.
|
|
14
|
+
*
|
|
15
|
+
* The fold below mirrors the live `runGauntletTick` state path exactly (same
|
|
16
|
+
* `applyGauntletEffect` / `recordGauntletEvent` / viability / final-outcome
|
|
17
|
+
* order), so the pure answer and the simulated answer agree. Terminal means the
|
|
18
|
+
* tape has fully run: every authored event is due, including capacity-gated
|
|
19
|
+
* ones, because at terminal every gate visit has been processed.
|
|
20
|
+
*
|
|
21
|
+
* ## The one thing this cannot predict
|
|
22
|
+
*
|
|
23
|
+
* `GauntletChart` has a **second outcome source that is not in the tape**: with
|
|
24
|
+
* `crashDetection` enabled (the default), a core whose simulated trajectory
|
|
25
|
+
* touches the crash line is killed and its outcome is overridden to
|
|
26
|
+
* `"bad_design_crash"`. That is a genuine physics-derived finding, and no pure
|
|
27
|
+
* function can compute it — it depends on the trajectory.
|
|
28
|
+
*
|
|
29
|
+
* So this resolver returns the **authored-tape terminal state**. It equals the
|
|
30
|
+
* simulated settled state whenever the run does not crash (notably with
|
|
31
|
+
* `crashDetection={false}`, where the tape is the whole story). When crash
|
|
32
|
+
* detection is armed, treat the pure result as "the outcome the plan earns on
|
|
33
|
+
* paper" and the simulated `killed` / `crashX` fields as the physical override.
|
|
34
|
+
* Charts that need a fully authored reading should disable crash detection.
|
|
35
|
+
*/
|
|
36
|
+
import type { Datum } from "../shared/datumTypes";
|
|
37
|
+
import type { GauntletEvent, GauntletLayout, GauntletProjectState, GauntletPropertyDefinition, GauntletViabilityFn } from "./gauntletTypes";
|
|
38
|
+
export interface GauntletTerminalOptions<TDatum extends Datum = Datum> {
|
|
39
|
+
/** Initial project states, as `createInitialState` produces them. */
|
|
40
|
+
projects: readonly GauntletProjectState<TDatum>[];
|
|
41
|
+
/** Authored tape, or the per-project function form. */
|
|
42
|
+
events?: readonly GauntletEvent[] | ((project: GauntletProjectState<TDatum>, layout: GauntletLayout) => readonly GauntletEvent[]);
|
|
43
|
+
layout: GauntletLayout;
|
|
44
|
+
positiveProperties: Map<string, GauntletPropertyDefinition>;
|
|
45
|
+
negativeProperties: Map<string, GauntletPropertyDefinition>;
|
|
46
|
+
viability?: GauntletViabilityFn<TDatum>;
|
|
47
|
+
outcome?: (project: GauntletProjectState<TDatum>, context: {
|
|
48
|
+
layout: GauntletLayout;
|
|
49
|
+
negativeProperties: Map<string, GauntletPropertyDefinition>;
|
|
50
|
+
positiveProperties: Map<string, GauntletPropertyDefinition>;
|
|
51
|
+
}) => string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Fold one project's whole authored tape into its terminal state.
|
|
55
|
+
*
|
|
56
|
+
* Pure: no store, no kernel, no clock. Given the same inputs it returns the
|
|
57
|
+
* same state, which is what makes it usable for SSR and snapshot export.
|
|
58
|
+
*/
|
|
59
|
+
export declare function resolveGauntletTerminalState<TDatum extends Datum = Datum>(project: GauntletProjectState<TDatum>, options: GauntletTerminalOptions<TDatum>): GauntletProjectState<TDatum>;
|
|
60
|
+
/** Terminal state for every project in a run. */
|
|
61
|
+
export declare function resolveGauntletTerminalStates<TDatum extends Datum = Datum>(options: GauntletTerminalOptions<TDatum>): GauntletProjectState<TDatum>[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PhysicsSemanticItem } from "../../stream/physics/StreamPhysicsFrame";
|
|
2
|
+
import type { PhysicalFlowProjectionMetadata } from "./physicsChartUtils";
|
|
3
|
+
export declare function formatPhysicalFlowThroughput(value: number): string;
|
|
4
|
+
export declare function physicalFlowPathD(points: PhysicalFlowProjectionMetadata["links"][number]["path"]): string;
|
|
5
|
+
/** Build keyboard/reader targets from the authored throughput routes. */
|
|
6
|
+
export declare function physicalFlowSemanticItems(metadata: PhysicalFlowProjectionMetadata | undefined): PhysicsSemanticItem[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { FrameGraphicsProp } from "../../stream/useFrame";
|
|
3
|
-
import type { PhysicsSemanticItem, StreamPhysicsFrameProps } from "../../stream/physics/StreamPhysicsFrame";
|
|
3
|
+
import type { PhysicsBodySelection, PhysicsSemanticItem, StreamPhysicsFrameProps } from "../../stream/physics/StreamPhysicsFrame";
|
|
4
4
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
5
5
|
import type { Datum } from "../shared/datumTypes";
|
|
6
|
-
import type { BaseChartProps, ChartMode } from "../shared/types";
|
|
6
|
+
import type { BaseChartProps, ChartMode, LinkedHoverProp, SelectionConfig } from "../shared/types";
|
|
7
7
|
import { type ChartModeResult } from "../shared/hooks";
|
|
8
8
|
export type PhysicsHocFrameProps<TOmitted extends keyof StreamPhysicsFrameProps = never> = Partial<Omit<StreamPhysicsFrameProps, "initialSpawns" | "initialSpawnPacing" | "size" | TOmitted>>;
|
|
9
9
|
/**
|
|
@@ -18,7 +18,48 @@ export type PhysicsSharedChartProps = {
|
|
|
18
18
|
legendPosition?: StreamPhysicsFrameProps["legendPosition"];
|
|
19
19
|
legendLayout?: StreamPhysicsFrameProps["legendLayout"];
|
|
20
20
|
svgAnnotationRules?: StreamPhysicsFrameProps["svgAnnotationRules"];
|
|
21
|
+
/**
|
|
22
|
+
* Shared selection. Pass a `{ name }` config to join the selection store
|
|
23
|
+
* (cross-highlight inside `LinkedCharts`), or a resolved
|
|
24
|
+
* `{ isActive, predicate }` body predicate directly.
|
|
25
|
+
*/
|
|
26
|
+
selection?: PhysicsChartSelection;
|
|
27
|
+
/** Emit hover into the shared selection store for cross-chart highlighting. */
|
|
28
|
+
linkedHover?: LinkedHoverProp;
|
|
21
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* What a physics HOC's `selection` prop accepts.
|
|
32
|
+
*
|
|
33
|
+
* `SelectionConfig` (`{ name }`) joins the shared selection store, so physics
|
|
34
|
+
* bodies cross-highlight inside `LinkedCharts` like every other family.
|
|
35
|
+
* `PhysicsBodySelection` (`{ isActive, predicate }`) stays available as the
|
|
36
|
+
* direct escape hatch for hosts that resolve a body predicate themselves.
|
|
37
|
+
*/
|
|
38
|
+
export type PhysicsChartSelection = SelectionConfig | PhysicsBodySelection | null;
|
|
39
|
+
export interface PhysicsSelectionOptions {
|
|
40
|
+
selection?: PhysicsChartSelection;
|
|
41
|
+
linkedHover?: LinkedHoverProp;
|
|
42
|
+
colorBy?: unknown;
|
|
43
|
+
chartType: string;
|
|
44
|
+
chartId?: string;
|
|
45
|
+
onObservation?: BaseChartProps["onObservation"];
|
|
46
|
+
onClick?: BaseChartProps["onClick"];
|
|
47
|
+
onBodyHover?: StreamPhysicsFrameProps["onBodyHover"];
|
|
48
|
+
fallbackFields?: string[];
|
|
49
|
+
unwrapSourceDatum?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface PhysicsSelectionResult {
|
|
52
|
+
selection: PhysicsBodySelection | null;
|
|
53
|
+
onBodyHover?: StreamPhysicsFrameProps["onBodyHover"];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Wire a physics HOC into the shared selection store.
|
|
57
|
+
*
|
|
58
|
+
* The store resolves a predicate over *data*, while the frame wants a predicate
|
|
59
|
+
* over *bodies*, so the resolved predicate is lifted through `body.datum`.
|
|
60
|
+
* Bodies with no datum (walls, pegs, chrome) never match a data selection.
|
|
61
|
+
*/
|
|
62
|
+
export declare function usePhysicsSelection(options: PhysicsSelectionOptions): PhysicsSelectionResult;
|
|
22
63
|
/** Galton / pile sampling mode (orthogonal to ChartMode display modes). */
|
|
23
64
|
export type PhysicsSimulationMode = "sample" | "mechanical";
|
|
24
65
|
/** Delay between a settled physics run and a fresh seeded replay. */
|
|
@@ -128,6 +169,8 @@ export declare function resolvePhysicsFrameSharedProps(props: Pick<BaseChartProp
|
|
|
128
169
|
legendLayout?: StreamPhysicsFrameProps["legendLayout"];
|
|
129
170
|
svgAnnotationRules?: StreamPhysicsFrameProps["svgAnnotationRules"];
|
|
130
171
|
}, frameProps: Partial<StreamPhysicsFrameProps> | undefined, semanticItems?: PhysicsSemanticItem[], modeExtras?: {
|
|
172
|
+
/** Resolved body predicate from {@link usePhysicsSelection}. */
|
|
173
|
+
selection?: PhysicsBodySelection | null;
|
|
131
174
|
chartMode?: ChartMode;
|
|
132
175
|
className?: string;
|
|
133
176
|
title?: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Datum } from "./datumTypes";
|
|
2
|
+
/**
|
|
3
|
+
* Statically detect the serializable HatchFill form styleRules can carry.
|
|
4
|
+
* Function-valued rule styles may also return hatches at runtime, but the
|
|
5
|
+
* config-only audit cannot inspect those honestly.
|
|
6
|
+
*/
|
|
7
|
+
export declare function hasDeclaredHatchFill(props: Datum): boolean;
|
|
8
|
+
/** True only when every declared hex color belongs to the safe palette. */
|
|
9
|
+
export declare function usesCvdSafePalette(colorScheme: unknown): boolean;
|
|
@@ -10,6 +10,7 @@ export declare const PART_TO_WHOLE_CHARTS: Set<string>;
|
|
|
10
10
|
export declare const NORMALIZED_STACK_ACCESSORS: Record<string, string>;
|
|
11
11
|
export declare const VALUE_CHARTS: Set<string>;
|
|
12
12
|
export declare const XY_WITH_AXES_CHARTS: Set<string>;
|
|
13
|
+
export declare const ORDINAL_CHARTS: Set<string>;
|
|
13
14
|
export declare const PHYSICS_MOTION_CHARTS: Set<string>;
|
|
14
15
|
export declare const CONTINUOUS_MOTION_CHARTS: Set<string>;
|
|
15
16
|
export declare const PHYSICS_SETTLED_CHARTS: Set<string>;
|
|
@@ -87,6 +87,12 @@ export declare function formatLargeNumber(value: number, decimals?: number): str
|
|
|
87
87
|
*/
|
|
88
88
|
export declare function smartTickFormat(value: string | number | Date | null | undefined): string;
|
|
89
89
|
type TimeGranularity = "seconds" | "minutes" | "hours" | "days" | "months" | "years";
|
|
90
|
+
/** Options for {@link adaptiveTimeTicks}. UTC remains the default so existing
|
|
91
|
+
* server-rendered charts stay deterministic; set `utc: false` to format in
|
|
92
|
+
* the runtime's local timezone. */
|
|
93
|
+
export interface AdaptiveTimeTickOptions {
|
|
94
|
+
utc?: boolean;
|
|
95
|
+
}
|
|
90
96
|
/**
|
|
91
97
|
* Creates a hierarchical time axis formatter.
|
|
92
98
|
*
|
|
@@ -100,6 +106,8 @@ type TimeGranularity = "seconds" | "minutes" | "hours" | "days" | "months" | "ye
|
|
|
100
106
|
*
|
|
101
107
|
* @param granularity - Optional explicit granularity. If omitted,
|
|
102
108
|
* auto-detected from the tick spacing on first call.
|
|
109
|
+
* @param options - Set `utc: false` to format in local time. The default is
|
|
110
|
+
* UTC for backwards-compatible, deterministic SSR output.
|
|
103
111
|
*
|
|
104
112
|
* @example
|
|
105
113
|
* ```tsx
|
|
@@ -110,9 +118,12 @@ type TimeGranularity = "seconds" | "minutes" | "hours" | "days" | "months" | "ye
|
|
|
110
118
|
*
|
|
111
119
|
* // Explicit granularity
|
|
112
120
|
* <LineChart data={ts} xFormat={adaptiveTimeTicks("minutes")} />
|
|
121
|
+
*
|
|
122
|
+
* // Local wall-clock time
|
|
123
|
+
* <LineChart data={ts} xFormat={adaptiveTimeTicks("minutes", { utc: false })} />
|
|
113
124
|
* ```
|
|
114
125
|
*/
|
|
115
|
-
export declare function adaptiveTimeTicks(granularity?: TimeGranularity): (value: string | number | Date, index?: number, allTicks?: number[]) => string;
|
|
126
|
+
export declare function adaptiveTimeTicks(granularity?: TimeGranularity, options?: AdaptiveTimeTickOptions): (value: string | number | Date, index?: number, allTicks?: number[]) => string;
|
|
116
127
|
/**
|
|
117
128
|
* Truncates text to specified length with ellipsis
|
|
118
129
|
*
|
|
@@ -52,6 +52,8 @@ export declare function isHatchFill(fill: unknown): fill is HatchFill;
|
|
|
52
52
|
export declare function hatchFillKey(h: HatchFill): string;
|
|
53
53
|
/** Deterministic, SVG-id-safe identifier for a hatch descriptor. */
|
|
54
54
|
export declare function hatchFillId(prefix: string, h: HatchFill): string;
|
|
55
|
+
/** Test helper: drop the canvas hatch cache between cases. */
|
|
56
|
+
export declare function clearHatchCanvasPatternCacheForTests(): void;
|
|
55
57
|
/**
|
|
56
58
|
* Resolve a `HatchFill` descriptor to a `CanvasPattern` for the given
|
|
57
59
|
* context. Cached by descriptor content + DPR. Returns `null` only when
|
|
@@ -94,7 +94,7 @@ export declare function getCrosshairProps(linkedHover: unknown, crosshairSourceI
|
|
|
94
94
|
linkedCrosshairName: string;
|
|
95
95
|
linkedCrosshairSourceId: string;
|
|
96
96
|
} | undefined;
|
|
97
|
-
export { useChartLegendAndMargin, useLegendInteraction, } from "./useChartLegend";
|
|
97
|
+
export { useChartLegendAndMargin, useLegendInteraction, distinctCategories, } from "./useChartLegend";
|
|
98
98
|
export type { LegendPosition, LegendInteractionMode, LegendInteractionState, } from "./useChartLegend";
|
|
99
99
|
/**
|
|
100
100
|
* React-facing alias for {@link resolveChartMode}. Mode resolution is kept
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* This compact registry is intentionally separate from validation metadata:
|
|
6
6
|
* config serialization only needs chart-name membership.
|
|
7
7
|
*/
|
|
8
|
-
export declare const KNOWN_CHART_COMPONENTS: readonly ["BarChart", "StackedBarChart", "GroupedBarChart", "SwarmPlot", "BoxPlot", "Histogram", "ViolinPlot", "RidgelinePlot", "DotPlot", "PieChart", "DonutChart", "GaugeChart", "FunnelChart", "SwimlaneChart", "LikertChart", "LineChart", "BumpChart", "AreaChart", "DifferenceChart", "StackedAreaChart", "Scatterplot", "BubbleChart", "Heatmap", "QuadrantChart", "MultiAxisLineChart", "CandlestickChart", "ConnectedScatterplot", "ScatterplotMatrix", "MinimapChart", "ForceDirectedGraph", "SankeyDiagram", "ProcessSankey", "ChordDiagram", "TreeDiagram", "Treemap", "CirclePack", "OrbitDiagram", "ChoroplethMap", "ProportionalSymbolMap", "FlowMap", "DistanceCartogram", "RealtimeLineChart", "RealtimeHistogram", "TemporalHistogram", "RealtimeSwarmChart", "RealtimeWaterfallChart", "RealtimeHeatmap", "GaltonBoardChart", "EventDropChart", "
|
|
8
|
+
export declare const KNOWN_CHART_COMPONENTS: readonly ["BarChart", "StackedBarChart", "GroupedBarChart", "SwarmPlot", "BoxPlot", "Histogram", "ViolinPlot", "RidgelinePlot", "DotPlot", "PieChart", "DonutChart", "GaugeChart", "FunnelChart", "SwimlaneChart", "LikertChart", "LineChart", "BumpChart", "AreaChart", "DifferenceChart", "StackedAreaChart", "Scatterplot", "BubbleChart", "Heatmap", "QuadrantChart", "MultiAxisLineChart", "CandlestickChart", "ConnectedScatterplot", "ScatterplotMatrix", "MinimapChart", "ForceDirectedGraph", "SankeyDiagram", "ProcessSankey", "ChordDiagram", "TreeDiagram", "Treemap", "CirclePack", "OrbitDiagram", "ChoroplethMap", "ProportionalSymbolMap", "FlowMap", "DistanceCartogram", "RealtimeLineChart", "RealtimeHistogram", "TemporalHistogram", "RealtimeSwarmChart", "RealtimeWaterfallChart", "RealtimeHeatmap", "GaltonBoardChart", "EventDropChart", "UnitPileChart", "CollisionSwarmChart", "GauntletChart", "CrucibleChart", "ProcessFlowChart", "PacketFlowChart", "ChainReactionChart", "BigNumber"];
|
|
9
9
|
export declare function isKnownChartComponent(componentName: string): boolean;
|
|
@@ -14,3 +14,34 @@ export declare function linearRegression(data: ReadonlyArray<readonly [number, n
|
|
|
14
14
|
* points use the former dependency's two-decimal rounding and equation order.
|
|
15
15
|
*/
|
|
16
16
|
export declare function polynomialRegression(data: ReadonlyArray<readonly [number, number | null]>, order?: number): LeastSquaresResult;
|
|
17
|
+
/**
|
|
18
|
+
* Full-precision (unrounded) linear fit for forecast prediction-interval
|
|
19
|
+
* math — unlike {@link linearRegression}, which rounds gradient/intercept to
|
|
20
|
+
* two decimals for display. That rounding is fine for a trend-line
|
|
21
|
+
* annotation but would leak into the residual/standard-error/interval math
|
|
22
|
+
* a forecast band computes from `predict`. Returns null when x has zero
|
|
23
|
+
* variance (singular normal equations) rather than falling back to a
|
|
24
|
+
* zero-gradient line, so callers can skip rendering instead of drawing a
|
|
25
|
+
* misleading flat forecast. Shared by the `forecast` annotation rule
|
|
26
|
+
* (`annotationRules.tsx`) and the LineChart forecast-segment overlay
|
|
27
|
+
* (`statisticalOverlays.ts`).
|
|
28
|
+
*/
|
|
29
|
+
export declare function fitLinearForForecast(points: ReadonlyArray<readonly [number, number]>): ((x: number) => number) | null;
|
|
30
|
+
/**
|
|
31
|
+
* Residual standard error plus the mean/sum-of-squared-deviations of x that
|
|
32
|
+
* a forecast prediction-interval formula needs, given training points and an
|
|
33
|
+
* already-fitted `predict` (linear or polynomial — this part doesn't care
|
|
34
|
+
* which). Shared by the same two forecast call sites as
|
|
35
|
+
* {@link fitLinearForForecast}.
|
|
36
|
+
*/
|
|
37
|
+
export declare function forecastIntervalStats(points: ReadonlyArray<readonly [number, number]>, predict: (x: number) => number): {
|
|
38
|
+
se: number;
|
|
39
|
+
meanX: number;
|
|
40
|
+
ssX: number;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Approximate z-score for the common one/two-sided confidence levels a
|
|
44
|
+
* forecast/envelope prediction interval rounds to. Shared by the same two
|
|
45
|
+
* forecast call sites as {@link fitLinearForForecast}.
|
|
46
|
+
*/
|
|
47
|
+
export declare function confidenceZScore(confidence: number): number;
|
|
@@ -199,7 +199,11 @@ export declare function styleRulesToXYStyle(rules: ReadonlyArray<StyleRule> | un
|
|
|
199
199
|
/**
|
|
200
200
|
* Ordinal-flavored {@link makeStyleRuleStyleFn}: the context is
|
|
201
201
|
* `{ value: valueAccessor(d), category }` — the bar/piece value plus the
|
|
202
|
-
* stack/group key.
|
|
202
|
+
* stack/group key. Public API sugar mirroring {@link styleRulesToXYStyle};
|
|
203
|
+
* unlike that XY sibling (used internally by `serverChartConfigsXY.ts`), the
|
|
204
|
+
* ordinal server config (`serverChartConfigsOrdinal.ts`) resolves colorBy
|
|
205
|
+
* and style rules together in its own `buildBarPieceStyle` rather than
|
|
206
|
+
* calling this — kept for external callers building an ordinal `pieceStyle`.
|
|
203
207
|
*/
|
|
204
208
|
export declare function styleRulesToPieceStyle(rules: ReadonlyArray<StyleRule> | undefined, valueAccessor: string | ((d: Datum) => unknown) | undefined, userPieceStyle?: MarkStyleFn): MarkStyleFn | undefined;
|
|
205
209
|
export {};
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import type { Accessor } from "./types";
|
|
2
2
|
import type { MarginType, PartialMargin } from "../../types/marginType";
|
|
3
3
|
import type { LegendLayout, LegendValue } from "../../types/legendTypes";
|
|
4
|
+
import { type AxisChromeInput } from "../../legendLayout";
|
|
4
5
|
import type { Datum } from "./datumTypes";
|
|
6
|
+
/**
|
|
7
|
+
* Distinct string-coerced `colorBy` values across `data`, in first-seen order.
|
|
8
|
+
* Shared by chart setup hooks that need the category list for a color scale
|
|
9
|
+
* or legend before any scale/legend object is built.
|
|
10
|
+
*/
|
|
11
|
+
export declare function distinctCategories(data: readonly Datum[], colorBy: Accessor<string | number> | undefined): string[];
|
|
5
12
|
/**
|
|
6
13
|
* Hook to create a legend and compute margins with legend-aware adjustment.
|
|
7
14
|
* Consolidates the shouldShowLegend / createLegend / margin merge / right-margin
|
|
8
15
|
* expansion pattern that every chart with color encoding repeats.
|
|
9
16
|
*/
|
|
10
17
|
export type LegendPosition = "right" | "left" | "top" | "bottom";
|
|
11
|
-
export declare function useChartLegendAndMargin({ data, colorBy, colorScale, showLegend, legendPosition, userMargin, defaults, categories, additionalLegend, chartWidth, legendLayout, hasTitle, }: {
|
|
18
|
+
export declare function useChartLegendAndMargin({ data, colorBy, colorScale, showLegend, legendPosition, userMargin, defaults, categories, additionalLegend, chartWidth, legendLayout, hasTitle, axisChrome, }: {
|
|
12
19
|
data: Array<Datum>;
|
|
13
20
|
colorBy: Accessor<string> | undefined;
|
|
14
21
|
colorScale: ((v: string) => string) | undefined;
|
|
@@ -25,6 +32,12 @@ export declare function useChartLegendAndMargin({ data, colorBy, colorScale, sho
|
|
|
25
32
|
legendLayout?: LegendLayout;
|
|
26
33
|
/** Reserve the chart-title band above a top legend. */
|
|
27
34
|
hasTitle?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Axis chrome on the legend's side. A top/bottom legend is placed outside
|
|
37
|
+
* this band, so the reserved margin has to include it or the legend lands
|
|
38
|
+
* past the canvas edge.
|
|
39
|
+
*/
|
|
40
|
+
axisChrome?: AxisChromeInput;
|
|
28
41
|
}): {
|
|
29
42
|
legend: LegendValue | undefined;
|
|
30
43
|
margin: MarginType;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Datum } from "./datumTypes";
|
|
2
|
+
import type { AxisChromeInput } from "../../legendLayout";
|
|
2
3
|
import { useChartLegendAndMargin, useLegendInteraction, DEFAULT_COLOR } from "./hooks";
|
|
3
4
|
import type { LegendInteractionMode, LegendPosition } from "./hooks";
|
|
4
5
|
import type { Accessor, SelectionConfig, LinkedHoverProp, HoverHighlightMode, MobileInteractionProp, ResolvedMobileInteractionConfig } from "./types";
|
|
@@ -81,6 +82,12 @@ export interface ChartSetupInput {
|
|
|
81
82
|
height: number;
|
|
82
83
|
/** Whether the resolved chart mode includes a title. */
|
|
83
84
|
hasTitle?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Bottom-axis chrome, so a bottom legend reserves space outside the tick
|
|
87
|
+
* labels rather than only being drawn past them. Omit for charts with no
|
|
88
|
+
* horizontal axis (pie/donut/radial) — the gutter resolves to 0.
|
|
89
|
+
*/
|
|
90
|
+
axisChrome?: AxisChromeInput;
|
|
84
91
|
}
|
|
85
92
|
/**
|
|
86
93
|
* Output from useChartSetup.
|
|
@@ -124,7 +131,7 @@ export interface ChartSetupResult {
|
|
|
124
131
|
/** If non-null, the HOC should return this element (loading or empty state) */
|
|
125
132
|
earlyReturn: ReactElement | null;
|
|
126
133
|
/** Props to spread into the stream frame for legend behavior */
|
|
127
|
-
legendBehaviorProps:
|
|
134
|
+
legendBehaviorProps: Record<string, unknown>;
|
|
128
135
|
/** Crosshair props to spread into StreamXYFrame when linkedHover mode is "x-position" */
|
|
129
136
|
crosshairProps: {
|
|
130
137
|
linkedCrosshairName: string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { Datum } from "./datumTypes";
|
|
2
2
|
import { VALIDATION_MAP } from "./validationMap";
|
|
3
|
+
import type { PropType, DataShape } from "./chartSpecCore";
|
|
3
4
|
export { VALIDATION_MAP };
|
|
5
|
+
export type { PropType, DataShape };
|
|
4
6
|
export interface ValidationResult {
|
|
5
7
|
valid: boolean;
|
|
6
8
|
errors: string[];
|
|
7
9
|
}
|
|
8
|
-
export type PropType = "string" | "number" | "boolean" | "array" | "object" | "function" | "null";
|
|
9
10
|
export interface PropDef {
|
|
10
11
|
type: PropType | PropType[];
|
|
11
12
|
enum?: readonly string[];
|
|
12
13
|
}
|
|
13
|
-
type DataShape = "array" | "object" | "network" | "realtime" | "none";
|
|
14
14
|
export interface ComponentSpec {
|
|
15
15
|
/** Props that must be present */
|
|
16
16
|
required: string[];
|
|
@@ -4,10 +4,6 @@ interface SafeRenderProps {
|
|
|
4
4
|
componentName: string;
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
7
|
-
/** @deprecated Retained for back-compat; no longer threaded into the
|
|
8
|
-
* error boundary. Use `npx semiotic-ai --doctor` or import
|
|
9
|
-
* `diagnoseConfig` from `semiotic/utils` for validation diagnostics. */
|
|
10
|
-
chartProps?: Record<string, unknown>;
|
|
11
7
|
children: React.ReactNode;
|
|
12
8
|
}
|
|
13
9
|
/**
|
|
@@ -41,6 +37,4 @@ export declare function renderEmptyState(data: Datum[] | undefined | null, width
|
|
|
41
37
|
export declare function renderLoadingState(loading: boolean | undefined, width: number, height: number, loadingContent?: React.ReactNode | false): React.ReactElement | null;
|
|
42
38
|
/** Warn if a string accessor isn't found in the first data element */
|
|
43
39
|
export declare function warnMissingField(componentName: string, data: Datum[] | undefined, accessorName: string, accessorValue: DatumValue): void;
|
|
44
|
-
/** Warn if data looks like the wrong shape for this chart type */
|
|
45
|
-
export declare function warnDataShape(componentName: string, data: Array<Datum | string | number | boolean | null | undefined> | undefined, expectedKeys: string[], hint: string): void;
|
|
46
40
|
export {};
|
|
@@ -19,5 +19,7 @@ export interface ProfileNumericFieldsOptions {
|
|
|
19
19
|
/** Include exact quartiles. Disable when another profiler already sorts fields. */
|
|
20
20
|
readonly quantiles?: boolean;
|
|
21
21
|
}
|
|
22
|
+
/** Linear-interpolation quantile over a pre-sorted array. */
|
|
23
|
+
export declare function quantile(sorted: ReadonlyArray<number>, p: number): number | undefined;
|
|
22
24
|
/** Profile invalid/missing numeric candidates without silently dropping them. */
|
|
23
25
|
export declare function profileNumericFields(data: ReadonlyArray<Datum> | null | undefined, options?: ProfileNumericFieldsOptions): Readonly<Record<string, NumericFieldProfile>>;
|