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
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { BuildScenesInput, BuildScenesResult } from "./buildScenes";
|
|
2
|
+
import type { ProcessSankeyLayout } from "./algorithm";
|
|
3
|
+
import type { ProcessSankeyLayoutConfig } from "./streamingLayout";
|
|
4
|
+
import type { Datum } from "../../shared/datumTypes";
|
|
5
|
+
export type ProcessSankeyLayoutExecution = "auto" | "worker" | "sync";
|
|
6
|
+
/**
|
|
7
|
+
* Serializable worker request — no functions or React nodes.
|
|
8
|
+
* Author `__raw` datums are included when structured-cloneable so
|
|
9
|
+
* declarative styleRules / label priority resolve identically to sync.
|
|
10
|
+
*/
|
|
11
|
+
export interface ProcessSankeyWorkerRequest {
|
|
12
|
+
input: Omit<BuildScenesInput, "colorOf" | "styleRules" | "labelPriorityAccessor" | "colorBy" | "valueAccessor" | "edgeOpacity"> & {
|
|
13
|
+
/** Numeric form only; opacity resolver functions stay on the main thread. */
|
|
14
|
+
edgeOpacity: number;
|
|
15
|
+
/** Declarative styleRules only. Function when/style force main-thread. */
|
|
16
|
+
styleRules?: BuildScenesInput["styleRules"];
|
|
17
|
+
/** String field form only; functions force main-thread. */
|
|
18
|
+
labelPriorityAccessor?: string;
|
|
19
|
+
colorBy?: string;
|
|
20
|
+
valueAccessor?: string;
|
|
21
|
+
};
|
|
22
|
+
colorById: Record<string, string>;
|
|
23
|
+
fallbackPalette: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface ProcessSankeyWorkerResponse {
|
|
26
|
+
layout: ProcessSankeyLayout | null;
|
|
27
|
+
layoutConfig: ProcessSankeyLayoutConfig;
|
|
28
|
+
issues: BuildScenesResult["issues"];
|
|
29
|
+
warnings: BuildScenesResult["warnings"];
|
|
30
|
+
domain: [number, number];
|
|
31
|
+
timelineExtent: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Default cost threshold for `execution: "auto"`.
|
|
35
|
+
* Dense rivers (≈100 nodes × packing×ordering) sit well above this;
|
|
36
|
+
* small docs demos stay on the main thread.
|
|
37
|
+
*/
|
|
38
|
+
export declare const DEFAULT_PROCESS_SANKEY_WORKER_THRESHOLD = 50000;
|
|
39
|
+
export declare function estimateProcessSankeyLayoutCost(nodeCount: number, edgeCount: number, packing?: "off" | "reuse", laneOrder?: string): number;
|
|
40
|
+
export declare function shouldUseProcessSankeyWorker(execution: ProcessSankeyLayoutExecution, nodeCount: number, edgeCount: number, packing?: "off" | "reuse", laneOrder?: string, threshold?: number): boolean;
|
|
41
|
+
export declare function canUseProcessSankeyWorker(): boolean;
|
|
42
|
+
export declare function createProcessSankeyLayoutWorker(): Worker;
|
|
43
|
+
/**
|
|
44
|
+
* Long-lived ProcessSankey layout worker session. Built on
|
|
45
|
+
* {@link ModuleWorkerSession} (shared with force layout).
|
|
46
|
+
*/
|
|
47
|
+
export declare class ProcessSankeyLayoutWorkerSession {
|
|
48
|
+
private readonly session;
|
|
49
|
+
constructor(worker?: Worker);
|
|
50
|
+
get isDead(): boolean;
|
|
51
|
+
request(request: ProcessSankeyWorkerRequest, signal?: AbortSignal): Promise<ProcessSankeyWorkerResponse>;
|
|
52
|
+
terminate(): void;
|
|
53
|
+
}
|
|
54
|
+
/** Test helper: drop the shared session so the next call creates a fresh Worker. */
|
|
55
|
+
export declare function _resetSharedProcessSankeyLayoutSessionForTest(): void;
|
|
56
|
+
export declare function runProcessSankeyLayoutWorker(request: ProcessSankeyWorkerRequest, signal?: AbortSignal): Promise<ProcessSankeyWorkerResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Re-attach host-side raw datums after a worker layout (workers strip them).
|
|
59
|
+
* Rebuilds the time scale on the main thread.
|
|
60
|
+
*/
|
|
61
|
+
export declare function reattachProcessSankeySceneDatums(response: ProcessSankeyWorkerResponse, rawNodeById: ReadonlyMap<string, Datum>, rawEdgeById: ReadonlyMap<string, Datum>): BuildScenesResult;
|
|
62
|
+
/**
|
|
63
|
+
* True when styleRules contain non-serializable predicate/style functions.
|
|
64
|
+
* Those force the main-thread path. Declarative thresholds are worker-safe
|
|
65
|
+
* when author `__raw` datums are cloned onto the wire request.
|
|
66
|
+
*/
|
|
67
|
+
export declare function processSankeyStyleRulesNeedMainThread(styleRules: BuildScenesInput["styleRules"] | undefined): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* True when any ProcessSankey input cannot cross the worker boundary without
|
|
70
|
+
* changing layout/style/validation semantics. Forces the main-thread path.
|
|
71
|
+
*/
|
|
72
|
+
export declare function processSankeyNeedsMainThread(input: Partial<Pick<BuildScenesInput, "styleRules" | "labelPriorityAccessor" | "colorBy" | "valueAccessor" | "edgeOpacity">>): boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { Datum } from "../../shared/datumTypes";
|
|
3
|
+
import type { ChartAccessor } from "../../shared/types";
|
|
4
|
+
import type { HoverData } from "../../../realtime/types";
|
|
5
|
+
import type { ProcessSankeyLayout } from "./processSankeyTypes";
|
|
6
|
+
import { type TooltipProp } from "../../../Tooltip/Tooltip";
|
|
7
|
+
import { type ProcessSankeyTimeLike } from "./time";
|
|
8
|
+
type TimeLike = ProcessSankeyTimeLike;
|
|
9
|
+
export interface UseProcessSankeyTooltipOptions<_TNode extends Datum, TEdge extends Datum> {
|
|
10
|
+
tooltip: TooltipProp | undefined;
|
|
11
|
+
enableHover: boolean;
|
|
12
|
+
layout: ProcessSankeyLayout | null;
|
|
13
|
+
timeFormat?: (d: number | Date) => string | React.ReactNode;
|
|
14
|
+
valueFormat?: (d: number) => string | React.ReactNode;
|
|
15
|
+
sourceAccessor: ChartAccessor<TEdge, string>;
|
|
16
|
+
targetAccessor: ChartAccessor<TEdge, string>;
|
|
17
|
+
valueAccessor: ChartAccessor<TEdge, number>;
|
|
18
|
+
startTimeAccessor: ChartAccessor<TEdge, TimeLike>;
|
|
19
|
+
endTimeAccessor: ChartAccessor<TEdge, TimeLike>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Default band/ribbon tooltip content for ProcessSankey. Custom `tooltip`
|
|
23
|
+
* fully overrides; false disables.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useProcessSankeyTooltipContent<_TNode extends Datum = Datum, TEdge extends Datum = Datum>(options: UseProcessSankeyTooltipOptions<_TNode, TEdge>): (d: HoverData) => React.ReactNode;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
export interface ProcessSankeyNode {
|
|
2
|
+
id: string;
|
|
3
|
+
/** Optional layout bond. Nodes with the same non-empty group occupy a
|
|
4
|
+
* contiguous, zero-gutter slot block while remaining distinct bands. */
|
|
5
|
+
group?: string;
|
|
6
|
+
/** Optional explicit lifetime bound [start, end]. Lifetime is
|
|
7
|
+
* `min(xExtent[0], earliestEdge)` to `max(xExtent[1], latestEdge)`. */
|
|
8
|
+
xExtent?: [number, number];
|
|
9
|
+
}
|
|
10
|
+
export interface ProcessSankeyEdge {
|
|
11
|
+
id: string;
|
|
12
|
+
source: string;
|
|
13
|
+
target: string;
|
|
14
|
+
value: number;
|
|
15
|
+
startTime: number;
|
|
16
|
+
endTime: number;
|
|
17
|
+
/** Optional: time at which this unit of mass actually "arrived" at
|
|
18
|
+
* the SOURCE node (e.g., the hospital admit time for an ER patient
|
|
19
|
+
* whose transfer to ICU happens later at `startTime`). Purely a
|
|
20
|
+
* rendering hint — the layout/mass profile is unchanged. The
|
|
21
|
+
* renderer cuts a rectangular slot out of the source node's band
|
|
22
|
+
* from the node's left edge up to the scaled `systemInTime`, with
|
|
23
|
+
* height equal to this edge's ribbon thickness. Edges without
|
|
24
|
+
* `systemInTime` are drawn as-is. Result: a staircase profile on
|
|
25
|
+
* the source side as units enter the system one by one.
|
|
26
|
+
* Default: undefined. */
|
|
27
|
+
systemInTime?: number;
|
|
28
|
+
/** Optional: time at which this unit of mass leaves the TARGET node
|
|
29
|
+
* (e.g., the discharge time for a patient who arrived at the ward
|
|
30
|
+
* at `endTime`). Symmetric to `systemInTime`: the renderer cuts a
|
|
31
|
+
* rectangular slot out of the target node's band from the scaled
|
|
32
|
+
* `systemOutTime` to the node's right edge, with height equal to
|
|
33
|
+
* this edge's ribbon thickness. Layout/mass profile unchanged.
|
|
34
|
+
* Default: undefined. */
|
|
35
|
+
systemOutTime?: number;
|
|
36
|
+
}
|
|
37
|
+
export type ProcessSankeyIssueSeverity = "fatal" | "warn";
|
|
38
|
+
export interface ProcessSankeyIssue {
|
|
39
|
+
kind: string;
|
|
40
|
+
/** Fatal issues block layout; warnings still allow rendering. @default inferred by kind */
|
|
41
|
+
severity?: ProcessSankeyIssueSeverity;
|
|
42
|
+
id?: string;
|
|
43
|
+
source?: string;
|
|
44
|
+
target?: string;
|
|
45
|
+
endpoint?: string;
|
|
46
|
+
nodeId?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ProcessSankeySample {
|
|
49
|
+
t: number;
|
|
50
|
+
topMass: number;
|
|
51
|
+
botMass: number;
|
|
52
|
+
/** Mass-space offset of the boundary between the two stacking sides.
|
|
53
|
+
* Synthetic side transfers move this boundary so they can rebalance the
|
|
54
|
+
* bookkeeping without translating the visible node band. */
|
|
55
|
+
boundaryOffset?: number;
|
|
56
|
+
}
|
|
57
|
+
export type AttachmentSide = "top" | "bot";
|
|
58
|
+
export type AttachmentKind = "in" | "out";
|
|
59
|
+
export interface ProcessSankeyAttachment {
|
|
60
|
+
side: AttachmentSide;
|
|
61
|
+
time: number;
|
|
62
|
+
sideMassBefore: number;
|
|
63
|
+
sideMassAfter: number;
|
|
64
|
+
kind: AttachmentKind;
|
|
65
|
+
value: number;
|
|
66
|
+
/** Boundary offset at the instant this ribbon attaches. */
|
|
67
|
+
boundaryOffset?: number;
|
|
68
|
+
}
|
|
69
|
+
export interface ProcessSankeyNodeData {
|
|
70
|
+
samples: ProcessSankeySample[];
|
|
71
|
+
peak: number;
|
|
72
|
+
topPeak: number;
|
|
73
|
+
botPeak: number;
|
|
74
|
+
localAttachments: Map<string, ProcessSankeyAttachment>;
|
|
75
|
+
}
|
|
76
|
+
export interface ProcessSankeySlotPeak {
|
|
77
|
+
topPeak: number;
|
|
78
|
+
botPeak: number;
|
|
79
|
+
}
|
|
80
|
+
export interface ProcessSankeySlotOccupant {
|
|
81
|
+
id: string;
|
|
82
|
+
/** End of the occupied band window used for temporal row reuse. */
|
|
83
|
+
end: number;
|
|
84
|
+
}
|
|
85
|
+
export interface ProcessSankeySlot {
|
|
86
|
+
peak: ProcessSankeySlotPeak;
|
|
87
|
+
occupants: ProcessSankeySlotOccupant[];
|
|
88
|
+
/** Shared node-group key for this reusable row, when bonded. */
|
|
89
|
+
group?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface ProcessSankeyLaneLifetime {
|
|
92
|
+
start: number | null;
|
|
93
|
+
end: number | null;
|
|
94
|
+
}
|
|
95
|
+
export interface ProcessSankeySideRecord {
|
|
96
|
+
sourceSide?: AttachmentSide;
|
|
97
|
+
targetSide?: AttachmentSide;
|
|
98
|
+
}
|
|
99
|
+
export interface ProcessSankeyLayout {
|
|
100
|
+
nodeData: Record<string, ProcessSankeyNodeData>;
|
|
101
|
+
sides: Map<string, ProcessSankeySideRecord>;
|
|
102
|
+
valueScale: number;
|
|
103
|
+
padding: number;
|
|
104
|
+
compressedPadding: boolean;
|
|
105
|
+
centerlines: Record<string, number>;
|
|
106
|
+
laneLifetime: Record<string, ProcessSankeyLaneLifetime>;
|
|
107
|
+
slots: ProcessSankeySlot[];
|
|
108
|
+
slotByNode: Record<string, number>;
|
|
109
|
+
crossingsBefore: number | null;
|
|
110
|
+
crossingsAfter: number | null;
|
|
111
|
+
lengthBefore: number | null;
|
|
112
|
+
lengthAfter: number | null;
|
|
113
|
+
/** Complete quality measurement for the initial packed slot order. */
|
|
114
|
+
layoutQualityBefore: ProcessSankeyLayoutQuality;
|
|
115
|
+
/** Complete quality measurement for the selected order and placement. */
|
|
116
|
+
layoutQuality: ProcessSankeyLayoutQuality;
|
|
117
|
+
}
|
|
118
|
+
export interface ProcessSankeyLayoutQuality {
|
|
119
|
+
crossings: number;
|
|
120
|
+
/** Edge value × slot-index distance. */
|
|
121
|
+
weightedLength: number;
|
|
122
|
+
/** Edge value × rendered centerline distance in pixels. */
|
|
123
|
+
pixelLength: number;
|
|
124
|
+
/** Value-weighted coverage of intermediate lane bands by ribbons. */
|
|
125
|
+
transitOcclusion: number;
|
|
126
|
+
/** Fraction of plot height occupied by the outer band envelope. */
|
|
127
|
+
verticalUtilization: number;
|
|
128
|
+
}
|
|
129
|
+
/** Control-point placement along a ribbon: prefer source, target, or midpoint. */
|
|
130
|
+
export type ProcessSankeyRibbonLane = "source" | "target" | "both";
|
|
131
|
+
/**
|
|
132
|
+
* How a node uses its explicit `xExtent` for the visible band.
|
|
133
|
+
*
|
|
134
|
+
* `"temporal"` preserves the precise mass history. `"max"` holds the
|
|
135
|
+
* largest instantaneous mass across an authored extent, which is useful for
|
|
136
|
+
* fixed-stage Sankeys where same-stage handoffs would otherwise make a node's
|
|
137
|
+
* full value visible only at a zero-width boundary.
|
|
138
|
+
*/
|
|
139
|
+
export type ProcessSankeyNodeSizing = "temporal" | "max";
|
|
140
|
+
export interface ProcessSankeyOptions {
|
|
141
|
+
plotH: number;
|
|
142
|
+
pairing?: "value" | "temporal";
|
|
143
|
+
packing?: "off" | "reuse";
|
|
144
|
+
laneOrder?: "insertion" | "crossing-min" | "inside-out" | "crossing-min+inside-out";
|
|
145
|
+
lifetimeMode?: "full" | "half";
|
|
146
|
+
/** Cap band inflation in pixels per value unit. Unset preserves the legacy
|
|
147
|
+
* fill-the-plot scale. */
|
|
148
|
+
maxValueScale?: number;
|
|
149
|
+
/** Optional slack-aware coordinate assignment. @default "stack" */
|
|
150
|
+
lanePlacement?: "stack" | "hug";
|
|
151
|
+
/** How explicit node `xExtent`s determine the visible band. @default "temporal" */
|
|
152
|
+
nodeSizing?: ProcessSankeyNodeSizing;
|
|
153
|
+
/** Pixels between adjacent slots in the same node group. @default 0 */
|
|
154
|
+
groupPadding?: number;
|
|
155
|
+
/** Renderer control-point placement, used by authored-window transit quality. */
|
|
156
|
+
ribbonLane?: ProcessSankeyRibbonLane;
|
|
157
|
+
/** Visible time extent, used to crop transit quality to rendered ribbons. */
|
|
158
|
+
domain?: [number, number];
|
|
159
|
+
}
|
|
160
|
+
export interface ProcessSankeyEdgeIndex {
|
|
161
|
+
incoming: Record<string, ProcessSankeyEdge[]>;
|
|
162
|
+
outgoing: Record<string, ProcessSankeyEdge[]>;
|
|
163
|
+
}
|
|
@@ -18,9 +18,20 @@ interface AttachmentLike {
|
|
|
18
18
|
sideMassAfter: number;
|
|
19
19
|
kind: Kind;
|
|
20
20
|
value: number;
|
|
21
|
+
boundaryOffset?: number;
|
|
21
22
|
}
|
|
22
|
-
type
|
|
23
|
+
export type ProcessSankeyRibbonLaneInput = "source" | "target" | "both";
|
|
23
24
|
type XScale = (t: number) => number;
|
|
25
|
+
export interface ProcessSankeyRibbonInputOptions {
|
|
26
|
+
/** Desired total ribbon run along the rendered time axis, in pixels.
|
|
27
|
+
* `"auto"` derives the run needed for an 8px minimum endpoint bend
|
|
28
|
+
* radius, capped at 144px. Omit to preserve exact attachment timing. */
|
|
29
|
+
minRun?: number | "auto";
|
|
30
|
+
/** Earliest proven time at which this feeder's source attachment can be
|
|
31
|
+
* rendered. The caller owns feeder detection and stock validation; without
|
|
32
|
+
* this value `minRun` deliberately has no effect. */
|
|
33
|
+
sourceRunwayStart?: number;
|
|
34
|
+
}
|
|
24
35
|
/**
|
|
25
36
|
* Build the geometry inputs for a single ProcessSankey ribbon. The
|
|
26
37
|
* source attachment is assumed to be `kind: "out"` (the value leaves
|
|
@@ -28,5 +39,18 @@ type XScale = (t: number) => number;
|
|
|
28
39
|
* `kind: "in"`. attachmentYRange's formula is inlined here to keep
|
|
29
40
|
* this module pure TS (the `algorithm.js` version is JS-only).
|
|
30
41
|
*/
|
|
31
|
-
export declare function computeProcessSankeyRibbonInputs(srcAtt: AttachmentLike, srcCenterline: number, tgtAtt: AttachmentLike, tgtCenterline: number, valueScale: number, xScale: XScale, lane:
|
|
42
|
+
export declare function computeProcessSankeyRibbonInputs(srcAtt: AttachmentLike, srcCenterline: number, tgtAtt: AttachmentLike, tgtCenterline: number, valueScale: number, xScale: XScale, lane: ProcessSankeyRibbonLaneInput, domain: [number, number] | null, options?: ProcessSankeyRibbonInputOptions): RibbonGeometryInput;
|
|
43
|
+
interface FeederBatchEdge {
|
|
44
|
+
id: string;
|
|
45
|
+
source: string;
|
|
46
|
+
startTime: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Give every ribbon in one source/timestamp departure batch a shared visual
|
|
50
|
+
* source. A band is a single contiguous silhouette, so independently pulling
|
|
51
|
+
* an inner attachment ahead of its neighbors would require holes in that
|
|
52
|
+
* silhouette. The latest runway floor in the batch remains authoritative;
|
|
53
|
+
* an edge without proven runway conservatively keeps the whole batch exact.
|
|
54
|
+
*/
|
|
55
|
+
export declare function synchronizeProcessSankeyFeederBatches(edges: readonly FeederBatchEdge[], inputsByEdge: ReadonlyMap<string, RibbonGeometryInput>, runwayStartByEdge: ReadonlyMap<string, number>, xScale: XScale, lane: ProcessSankeyRibbonLaneInput, sourceGroupByNode?: ReadonlyMap<string, string>): Map<string, RibbonGeometryInput>;
|
|
32
56
|
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
interface RibbonRunwayNode {
|
|
2
|
+
id: string;
|
|
3
|
+
group?: string;
|
|
4
|
+
xExtent?: [number, number];
|
|
5
|
+
}
|
|
6
|
+
interface RibbonRunwayEdge {
|
|
7
|
+
id: string;
|
|
8
|
+
source: string;
|
|
9
|
+
target: string;
|
|
10
|
+
startTime: number;
|
|
11
|
+
systemInTime?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the earliest stable visual departure for each eligible feeder edge.
|
|
15
|
+
*
|
|
16
|
+
* Only source-only nodes qualify: an accumulator with incoming transactions
|
|
17
|
+
* can change its attachment stack before departure, so pulling a later ribbon
|
|
18
|
+
* backward could place its strip outside the band that actually existed then.
|
|
19
|
+
* A feeder must also prove that it existed earlier via xExtent/systemInTime.
|
|
20
|
+
* Later departures from the same feeder cannot borrow across an earlier
|
|
21
|
+
* departure, when the source silhouette changes.
|
|
22
|
+
*/
|
|
23
|
+
export declare function computeFeederRibbonRunwayStarts(nodes: readonly RibbonRunwayNode[], edges: readonly RibbonRunwayEdge[], domain: readonly [number, number]): Map<string, number>;
|
|
24
|
+
/** Convert resolved ribbon source pixels back into a scene-only departure
|
|
25
|
+
* clock. Only proven feeder edges whose source actually moved are included. */
|
|
26
|
+
export declare function computeFeederVisualDepartureTimes(edges: readonly RibbonRunwayEdge[], ribbonInputsByEdge: ReadonlyMap<string, {
|
|
27
|
+
sx: number;
|
|
28
|
+
}>, runwayStartByEdge: ReadonlyMap<string, number>, xScale: (time: number) => number, invertX: (pixel: number) => number): Map<string, number>;
|
|
29
|
+
interface FeederSample {
|
|
30
|
+
t: number;
|
|
31
|
+
topMass: number;
|
|
32
|
+
botMass: number;
|
|
33
|
+
boundaryOffset?: number;
|
|
34
|
+
}
|
|
35
|
+
export type FeederVisualDepartureIndex = Map<string, Map<number, number>>;
|
|
36
|
+
/** Index edge-level visual departures once so band projection stays O(E + S)
|
|
37
|
+
* instead of scanning every edge again for every node. */
|
|
38
|
+
export declare function indexFeederVisualDepartures(edges: readonly RibbonRunwayEdge[], visualDepartureByEdge: ReadonlyMap<string, number>, sourceGroupByNode?: ReadonlyMap<string, string>): FeederVisualDepartureIndex;
|
|
39
|
+
/**
|
|
40
|
+
* Move only the rendered sample states for eligible source departures. The
|
|
41
|
+
* logical nodeData remains untouched and continues to own inventory, packing,
|
|
42
|
+
* quality metrics, tooltips, and authored dates.
|
|
43
|
+
*/
|
|
44
|
+
export declare function projectFeederBandSamples<TSample extends FeederSample>(samples: readonly TSample[], visualByAuthoredTime: ReadonlyMap<number, number> | undefined): readonly TSample[];
|
|
45
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { NetworkCustomLayout } from "../../../stream/networkCustomLayout";
|
|
2
2
|
import type { BezierCache } from "../../../stream/networkTypes";
|
|
3
3
|
import type { Datum } from "../../shared/datumTypes";
|
|
4
|
+
import type { HatchFill } from "../../shared/hatchFill";
|
|
4
5
|
export interface ProcessSankeyBandSpec {
|
|
5
6
|
id: string;
|
|
6
7
|
/** Outer band perimeter — same path used for fill and stroke. */
|
|
@@ -8,6 +9,7 @@ export interface ProcessSankeyBandSpec {
|
|
|
8
9
|
fill: string;
|
|
9
10
|
stroke?: string;
|
|
10
11
|
strokeWidth?: number;
|
|
12
|
+
fillOpacity?: number;
|
|
11
13
|
/** Per-edge 20-px gradient stubs (band-color fade-in for
|
|
12
14
|
* systemInTime, fade-out for systemOutTime). When at least one
|
|
13
15
|
* stub is present, the band paints outline-only and the stubs
|
|
@@ -19,11 +21,24 @@ export interface ProcessSankeyBandSpec {
|
|
|
19
21
|
labelX: number;
|
|
20
22
|
labelY: number;
|
|
21
23
|
labelText: string;
|
|
24
|
+
labelAnchor?: "start" | "middle" | "end";
|
|
25
|
+
labelBaseline?: string;
|
|
26
|
+
/**
|
|
27
|
+
* When `showLabels="auto"` sheds this label for density, the full text is
|
|
28
|
+
* retained here so selection/hover can re-surface it without relayout.
|
|
29
|
+
*/
|
|
30
|
+
labelDeferred?: boolean;
|
|
31
|
+
labelFullText?: string;
|
|
32
|
+
/** Optional hatch fill descriptor for the band (canvas + SSR). */
|
|
33
|
+
hatchFill?: HatchFill;
|
|
22
34
|
}
|
|
23
35
|
export interface BandGradientStub {
|
|
24
36
|
pathD: string;
|
|
25
37
|
x0: number;
|
|
26
38
|
x1: number;
|
|
39
|
+
/** Vertical gradients use y0/y1 and set x0/x1 to a shared lane value. */
|
|
40
|
+
y0?: number;
|
|
41
|
+
y1?: number;
|
|
27
42
|
from: 0 | 1;
|
|
28
43
|
to: 0 | 1;
|
|
29
44
|
}
|
|
@@ -44,11 +59,19 @@ export interface ProcessSankeyRibbonSpec {
|
|
|
44
59
|
*/
|
|
45
60
|
bezier?: BezierCache;
|
|
46
61
|
}
|
|
62
|
+
export type ProcessSankeySelectionDatum = "raw" | "scene";
|
|
47
63
|
export interface ProcessSankeyLayoutConfig {
|
|
48
64
|
bands: ProcessSankeyBandSpec[];
|
|
49
65
|
ribbons: ProcessSankeyRibbonSpec[];
|
|
50
66
|
/** Optional dim opacity for unselected bands/ribbons (linkedHover). */
|
|
51
67
|
showLabels?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Which datum shape selection/linkedHover predicates receive.
|
|
70
|
+
* `"raw"` (default) unwraps author records so field matchers work without
|
|
71
|
+
* knowing ProcessSankey's `{ __kind, data, id }` scene payload.
|
|
72
|
+
* `"scene"` keeps the full payload for tooling that needs `__kind`.
|
|
73
|
+
*/
|
|
74
|
+
selectionDatum?: ProcessSankeySelectionDatum;
|
|
52
75
|
}
|
|
53
76
|
/**
|
|
54
77
|
* Marker attached to scene-edge datums so the HOC's `tooltipContent`
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared time coercion for ProcessSankey domain, accessors, axis ticks, and
|
|
3
|
+
* default tooltips. One implementation keeps NaN/null handling consistent.
|
|
4
|
+
*/
|
|
5
|
+
/** Values accepted on domain, accessors, and axis tick dates. */
|
|
6
|
+
export type ProcessSankeyTimeLike = number | Date | string;
|
|
7
|
+
/**
|
|
8
|
+
* Coerce a time-like to a finite number when possible.
|
|
9
|
+
* `null`/`undefined` → `NaN` so callers can gate with `Number.isFinite`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function toProcessSankeyTime(value: ProcessSankeyTimeLike | null | undefined): number;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Ref, RefObject } from "react";
|
|
2
|
+
import type { Datum } from "../../shared/datumTypes";
|
|
3
|
+
import type { ChartAccessor } from "../../shared/types";
|
|
4
|
+
import type { RealtimeFrameHandle } from "../../../realtime/types";
|
|
5
|
+
import type { StreamNetworkFrameHandle } from "../../../stream/networkTypes";
|
|
6
|
+
export interface UseProcessSankeyPushOptions<TNode extends Datum, TEdge extends Datum> {
|
|
7
|
+
ref: Ref<RealtimeFrameHandle>;
|
|
8
|
+
rawNodesProp: TNode[] | undefined;
|
|
9
|
+
rawEdgesProp: TEdge[] | undefined;
|
|
10
|
+
nodeIdAccessor: ChartAccessor<TNode, string>;
|
|
11
|
+
edgeIdAccessor: ChartAccessor<TEdge, string>;
|
|
12
|
+
sourceAccessor: ChartAccessor<TEdge, string>;
|
|
13
|
+
targetAccessor: ChartAccessor<TEdge, string>;
|
|
14
|
+
scalesRef: RefObject<unknown>;
|
|
15
|
+
layoutSnapshotRef: RefObject<unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface UseProcessSankeyPushResult<TNode extends Datum, TEdge extends Datum> {
|
|
18
|
+
rawNodes: TNode[];
|
|
19
|
+
rawEdges: TEdge[];
|
|
20
|
+
frameRef: RefObject<StreamNetworkFrameHandle | null>;
|
|
21
|
+
getNodeId: (n: TNode) => string;
|
|
22
|
+
getEdgeId: (e: TEdge, i: number) => string;
|
|
23
|
+
isControlled: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Owns ProcessSankey push buffers + the network imperative handle.
|
|
27
|
+
* Controlled `edges` prop freezes the edge list; nodes always merge push + prop.
|
|
28
|
+
*/
|
|
29
|
+
export declare function useProcessSankeyPush<TNode extends Datum = Datum, TEdge extends Datum = Datum>(options: UseProcessSankeyPushOptions<TNode, TEdge>): UseProcessSankeyPushResult<TNode, TEdge>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type BuildScenesInput, type BuildScenesResult } from "./buildScenes";
|
|
2
|
+
import { type ProcessSankeyLayoutExecution } from "./processSankeyLayoutWorkerClient";
|
|
3
|
+
import type { Datum } from "../../shared/datumTypes";
|
|
4
|
+
export type ProcessSankeyLayoutStatus = "pending" | "ready" | "error";
|
|
5
|
+
export interface UseProcessSankeyScenesResult extends BuildScenesResult {
|
|
6
|
+
status: ProcessSankeyLayoutStatus;
|
|
7
|
+
error: Error | null;
|
|
8
|
+
}
|
|
9
|
+
export interface UseProcessSankeyScenesOptions {
|
|
10
|
+
execution?: ProcessSankeyLayoutExecution;
|
|
11
|
+
workerThreshold?: number;
|
|
12
|
+
colorById: Record<string, string>;
|
|
13
|
+
fallbackPalette?: string[];
|
|
14
|
+
rawNodeById?: ReadonlyMap<string, Datum>;
|
|
15
|
+
rawEdgeById?: ReadonlyMap<string, Datum>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* React lifecycle wrapper for ProcessSankey scene construction.
|
|
19
|
+
*
|
|
20
|
+
* - **Sync path** (SSR, cheap graphs, `execution: "sync"`, predicate styleRules):
|
|
21
|
+
* `buildProcessSankeyScenes` runs during render via `useMemo` so prop updates
|
|
22
|
+
* paint immediately — no one-frame lag on the previous scene.
|
|
23
|
+
* - **Worker path** (costly client layouts): previous ready scene stays painted
|
|
24
|
+
* while status is `"pending"`; settles to worker (or sync-fallback) result.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useProcessSankeyScenes(input: BuildScenesInput | null, options: UseProcessSankeyScenesOptions): UseProcessSankeyScenesResult;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ProcessSankeyEdge, ProcessSankeyIssue, ProcessSankeyIssueSeverity, ProcessSankeyNode } from "./processSankeyTypes";
|
|
2
|
+
/**
|
|
3
|
+
* Usage mode for validation policy (M6).
|
|
4
|
+
* - `static` / `mcp`: snapshots for renderChart, SSR, MCP — strict.
|
|
5
|
+
* - `push`: live React ingestion — prefer warn so a bad tick doesn't blank the chart.
|
|
6
|
+
*/
|
|
7
|
+
export type ProcessSankeyUsageMode = "static" | "push" | "mcp";
|
|
8
|
+
export interface ProcessSankeyValidationPolicy {
|
|
9
|
+
/** Duplicate node/edge ids. */
|
|
10
|
+
duplicateIds: "fatal" | "warn";
|
|
11
|
+
/**
|
|
12
|
+
* Non-finite systemInTime / systemOutTime.
|
|
13
|
+
* `warn` keeps the field and reports; `strip` clears invalid fields before layout.
|
|
14
|
+
*/
|
|
15
|
+
invalidSystemTime: "warn" | "strip";
|
|
16
|
+
}
|
|
17
|
+
/** Product policy table — keep Claude.md / strategy in sync with this object. */
|
|
18
|
+
export declare const PROCESS_SANKEY_VALIDATION_POLICY: Record<ProcessSankeyUsageMode, ProcessSankeyValidationPolicy>;
|
|
19
|
+
export declare function resolveProcessSankeyValidationPolicy(usageMode?: ProcessSankeyUsageMode): ProcessSankeyValidationPolicy;
|
|
20
|
+
export declare function processSankeyIssueSeverity(issue: ProcessSankeyIssue): ProcessSankeyIssueSeverity;
|
|
21
|
+
export declare function partitionProcessSankeyIssues(issues: readonly ProcessSankeyIssue[]): {
|
|
22
|
+
fatal: ProcessSankeyIssue[];
|
|
23
|
+
warnings: ProcessSankeyIssue[];
|
|
24
|
+
};
|
|
25
|
+
export declare function validateProcessSankey(nodes: ProcessSankeyNode[], edges: ProcessSankeyEdge[], domain: [number, number], options?: {
|
|
26
|
+
usageMode?: ProcessSankeyUsageMode;
|
|
27
|
+
}): ProcessSankeyIssue[];
|
|
28
|
+
/**
|
|
29
|
+
* Apply non-fatal policy rewrites (e.g. strip bad system times in push mode)
|
|
30
|
+
* so layout can continue with clean fields.
|
|
31
|
+
*/
|
|
32
|
+
export declare function applyProcessSankeyValidationPolicy<T extends ProcessSankeyEdge>(edges: T[], issues: readonly ProcessSankeyIssue[], usageMode?: ProcessSankeyUsageMode): T[];
|
|
33
|
+
export declare function formatProcessSankeyIssue(issue: ProcessSankeyIssue): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChartCapability } from "../../ai/chartCapabilityTypes";
|
|
2
|
+
/**
|
|
3
|
+
* ChainReactionChart is intentionally known to the AI surface but never selected
|
|
4
|
+
* from a flat data profile. The chart's whole claim is about a specific
|
|
5
|
+
* dependency topology — which task waits on which — and a profiler cannot
|
|
6
|
+
* responsibly invent edges. A dependency chart with the wrong edges is worse
|
|
7
|
+
* than no chart, so the graph must be authored.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ChainReactionChartCapability: ChartCapability;
|
|
@@ -2,6 +2,35 @@ import * as React from "react";
|
|
|
2
2
|
import type { Datum } from "../shared/datumTypes";
|
|
3
3
|
import type { ChainReactionChartHandle, ChainReactionChartProps } from "./chainReactionTypes";
|
|
4
4
|
export type * from "./chainReactionTypes";
|
|
5
|
+
/**
|
|
6
|
+
* Physics-backed dependency chart whose settled reading exposes task state and each blocker's downstream reach.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* <ChainReactionChart
|
|
10
|
+
* data={[
|
|
11
|
+
* { id: "brief", label: "Brief", lane: "Product", dependsOn: [], status: "done" },
|
|
12
|
+
* { id: "release", label: "Release", lane: "Product", dependsOn: ["brief"], status: "waiting" }
|
|
13
|
+
* ]}
|
|
14
|
+
* taskIDAccessor="id"
|
|
15
|
+
* labelAccessor="label"
|
|
16
|
+
* laneAccessor="lane"
|
|
17
|
+
* dependencyAccessor="dependsOn"
|
|
18
|
+
* statusAccessor="status"
|
|
19
|
+
* />
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <ChainReactionChart
|
|
23
|
+
* data={releaseTasks}
|
|
24
|
+
* taskIDAccessor="id"
|
|
25
|
+
* labelAccessor="title"
|
|
26
|
+
* laneAccessor="workstream"
|
|
27
|
+
* dependencyAccessor="prerequisites"
|
|
28
|
+
* completionTimeAccessor="completedAt"
|
|
29
|
+
* mode="replay"
|
|
30
|
+
* controls
|
|
31
|
+
* insight="blocker-amplification"
|
|
32
|
+
* />
|
|
33
|
+
*/
|
|
5
34
|
export declare const ChainReactionChart: {
|
|
6
35
|
<TDatum extends Datum = Datum>(props: ChainReactionChartProps<TDatum> & React.RefAttributes<ChainReactionChartHandle>): React.ReactElement | null;
|
|
7
36
|
displayName?: string;
|
|
@@ -4,7 +4,7 @@ import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
|
4
4
|
import type { StyleRule } from "../shared/styleRules";
|
|
5
5
|
import { type PhysicsFrameHandle } from "./physicsHocHandle";
|
|
6
6
|
import { type PhysicsHocFrameProps, type PhysicsRerunMS, type PhysicsSharedChartProps, type TooltipProp } from "./physicsHocUtils";
|
|
7
|
-
export interface CollisionSwarmChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin">, PhysicsSharedChartProps {
|
|
7
|
+
export interface CollisionSwarmChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "selection">, PhysicsSharedChartProps {
|
|
8
8
|
data?: TDatum[];
|
|
9
9
|
size?: [number, number];
|
|
10
10
|
xAccessor?: ChartAccessor<TDatum, number>;
|
|
@@ -4,8 +4,8 @@ import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
|
4
4
|
import { type EventDropWindowOptions } from "./physicsChartUtils";
|
|
5
5
|
import type { StyleRule } from "../shared/styleRules";
|
|
6
6
|
import { type PhysicsFrameHandle } from "./physicsHocHandle";
|
|
7
|
-
import { type PhysicsHocFrameProps, type PhysicsSharedChartProps, type TooltipProp } from "./physicsHocUtils";
|
|
8
|
-
export interface EventDropChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin">, PhysicsSharedChartProps {
|
|
7
|
+
import { type PhysicsHocFrameProps, type PhysicsRerunMS, type PhysicsSharedChartProps, type TooltipProp } from "./physicsHocUtils";
|
|
8
|
+
export interface EventDropChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "selection">, PhysicsSharedChartProps {
|
|
9
9
|
data?: TDatum[];
|
|
10
10
|
size?: [number, number];
|
|
11
11
|
timeAccessor?: ChartAccessor<TDatum, number>;
|
|
@@ -28,6 +28,11 @@ export interface EventDropChartProps<TDatum extends Datum = Datum> extends Omit<
|
|
|
28
28
|
timeScale?: number;
|
|
29
29
|
showProjection?: boolean;
|
|
30
30
|
tooltip?: TooltipProp;
|
|
31
|
+
/**
|
|
32
|
+
* Replay the seeded simulation this many milliseconds after it settles.
|
|
33
|
+
* Omit or pass `null` for a single run; `0` replays on the next timer turn.
|
|
34
|
+
*/
|
|
35
|
+
rerunMS?: PhysicsRerunMS;
|
|
31
36
|
paused?: boolean;
|
|
32
37
|
frameProps?: PhysicsHocFrameProps<"config">;
|
|
33
38
|
}
|
|
@@ -14,7 +14,7 @@ export interface GaltonBoardReferenceLine {
|
|
|
14
14
|
strokeWidth?: number;
|
|
15
15
|
labelPosition?: "top" | "bottom";
|
|
16
16
|
}
|
|
17
|
-
export interface GaltonBoardChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "mode">, PhysicsSharedChartProps {
|
|
17
|
+
export interface GaltonBoardChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "mode" | "selection">, PhysicsSharedChartProps {
|
|
18
18
|
data?: TDatum[];
|
|
19
19
|
size?: [number, number];
|
|
20
20
|
valueAccessor?: ChartAccessor<TDatum, number>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ChartCapability } from "../../ai/chartCapabilityTypes";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const PacketFlowChartCapability: ChartCapability;
|