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,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared ProcessSankey background chrome (time axis, grid, quality readout,
|
|
3
|
+
* optional lane rails). Used by the client HOC and the SSR config so both
|
|
4
|
+
* paths paint identical theme-token chrome.
|
|
5
|
+
*/
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import type { ProcessSankeyLayout } from "./algorithm";
|
|
8
|
+
import type { ProcessSankeyOrientation } from "./orientation";
|
|
9
|
+
import type { ProcessSankeyNormalizedNode } from "./buildScenes";
|
|
10
|
+
export interface ProcessSankeyTickInput {
|
|
11
|
+
date: number | Date | string;
|
|
12
|
+
label?: string | React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export interface BuildProcessSankeyBackgroundGraphicsInput {
|
|
15
|
+
layout: ProcessSankeyLayout;
|
|
16
|
+
nodes: readonly ProcessSankeyNormalizedNode[];
|
|
17
|
+
orientation: ProcessSankeyOrientation;
|
|
18
|
+
plotW: number;
|
|
19
|
+
plotH: number;
|
|
20
|
+
timelineExtent: number;
|
|
21
|
+
axisTicks: readonly ProcessSankeyTickInput[];
|
|
22
|
+
showQualityReadout?: boolean;
|
|
23
|
+
showLaneRails?: boolean;
|
|
24
|
+
/** Non-fatal validation messages for the quality readout (M6). */
|
|
25
|
+
warnings?: readonly string[];
|
|
26
|
+
timeFormat?: (d: Date) => string | React.ReactNode;
|
|
27
|
+
colorOf?: (id: string, idx: number) => string;
|
|
28
|
+
toTime: (value: number | Date | string | undefined | null) => number;
|
|
29
|
+
xScale: (t: number) => number;
|
|
30
|
+
}
|
|
31
|
+
export declare function buildProcessSankeyBackgroundGraphics(input: BuildProcessSankeyBackgroundGraphicsInput): React.ReactElement;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ProcessSankeyAttachment, ProcessSankeyEdge, ProcessSankeyLayout, ProcessSankeySample } from "./processSankeyTypes";
|
|
2
|
+
type Domain = [number, number] | null | undefined;
|
|
3
|
+
export declare function clampTime(t: number, domain: Domain): number;
|
|
4
|
+
export declare function clampSamples(samples: readonly ProcessSankeySample[], domain: Domain): ProcessSankeySample[];
|
|
5
|
+
export declare function attachmentYRange(att: ProcessSankeyAttachment, cl: number, S: number): [number, number];
|
|
6
|
+
export declare function buildBandPath(samples: readonly ProcessSankeySample[], cl: number, S: number, xScale: (t: number) => number, domain: Domain): string | null;
|
|
7
|
+
/**
|
|
8
|
+
* One 20-px gradient stub at an attachment with `systemInTime` /
|
|
9
|
+
* `systemOutTime`. Rendered as its own bezier scene-edge with a
|
|
10
|
+
* horizontal gradient, painted underneath the band. The band
|
|
11
|
+
* paints with `fill: none` whenever any stubs are present, so the
|
|
12
|
+
* stub gradients are the only colored regions inside the band's
|
|
13
|
+
* outline.
|
|
14
|
+
*/
|
|
15
|
+
export interface BandGradientStub {
|
|
16
|
+
/** Rect path (M-L-L-L-Z). */
|
|
17
|
+
pathD: string;
|
|
18
|
+
/** Gradient extent in screen pixels. */
|
|
19
|
+
x0: number;
|
|
20
|
+
x1: number;
|
|
21
|
+
/** Color stops — 0 = transparent end, 1 = band-color end. */
|
|
22
|
+
from: 0 | 1;
|
|
23
|
+
to: 0 | 1;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Build the per-edge 20-px gradient stubs that visualize
|
|
27
|
+
* `systemInTime` / `systemOutTime` on a node band. Each stub is
|
|
28
|
+
* a rect on the edge's attachment slot, painted with a horizontal
|
|
29
|
+
* gradient that fades the band color in (or out) over 20 screen
|
|
30
|
+
* pixels and saturates through the rest of the rect.
|
|
31
|
+
*
|
|
32
|
+
* The rect is clipped to the band's outline bounds (so cutouts don't
|
|
33
|
+
* spill outside the node shape), but the gradient extent stays at
|
|
34
|
+
* its natural range. In-domain entrances use
|
|
35
|
+
* `[xSysIn - FADE_PX, xSysIn]`; entrances known to predate the visible
|
|
36
|
+
* domain use `[domainStart, domainStart + FADE_PX]` so they blur inward
|
|
37
|
+
* rather than completing their fade offscreen. Exits use
|
|
38
|
+
* `[xSysOut, xSysOut + FADE_PX]`. The canvas renderer uses pad-mode
|
|
39
|
+
* clamping for color stops outside the rect.
|
|
40
|
+
*
|
|
41
|
+
* Pure rendering hint — layout/mass-profile unchanged. Returns an
|
|
42
|
+
* empty array when the node has no qualifying edges.
|
|
43
|
+
*/
|
|
44
|
+
export declare function buildBandCutoutsForNode(nodeId: string, edges: ProcessSankeyEdge[], layout: ProcessSankeyLayout, xScale: (t: number) => number, domain: Domain, visualDepartureByEdge?: ReadonlyMap<string, number>): BandGradientStub[];
|
|
45
|
+
export {};
|
|
@@ -2,12 +2,16 @@ import { scaleTime } from "d3-scale";
|
|
|
2
2
|
import { type ProcessSankeyOptions, type ProcessSankeyLayout, type ProcessSankeyIssue } from "./algorithm";
|
|
3
3
|
import type { ProcessSankeyLayoutConfig } from "./streamingLayout";
|
|
4
4
|
import type { Datum } from "../../shared/datumTypes";
|
|
5
|
+
import { type ProcessSankeyOrientation } from "./orientation";
|
|
6
|
+
import { type StyleRule } from "../../shared/styleRules";
|
|
5
7
|
export interface ProcessSankeyNormalizedNode {
|
|
6
8
|
id: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
group?: string;
|
|
7
11
|
xExtent?: [number, number];
|
|
8
12
|
__raw?: Datum;
|
|
9
13
|
}
|
|
10
|
-
export interface ProcessSankeyNormalizedEdge {
|
|
14
|
+
export interface ProcessSankeyNormalizedEdge extends Datum {
|
|
11
15
|
id: string;
|
|
12
16
|
source: string;
|
|
13
17
|
target: string;
|
|
@@ -28,17 +32,51 @@ export interface BuildScenesInput {
|
|
|
28
32
|
domain: [number, number];
|
|
29
33
|
plotW: number;
|
|
30
34
|
plotH: number;
|
|
35
|
+
orientation?: ProcessSankeyOrientation;
|
|
31
36
|
ribbonLane: "source" | "target" | "both";
|
|
32
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Minimum rendered run along the time axis for **source-only feeder**
|
|
39
|
+
* ribbons (not a general minimum ribbon length). A number is a pixel
|
|
40
|
+
* minimum; `"auto"` adapts to lateral lane distance. Only source-only
|
|
41
|
+
* feeders with proven stock/runway are affected.
|
|
42
|
+
*/
|
|
43
|
+
ribbonMinRun?: number | "auto";
|
|
44
|
+
/** A shared opacity, or a raw-edge resolver for confidence-aware flows. */
|
|
45
|
+
edgeOpacity: number | ((edge: Datum) => number);
|
|
33
46
|
/** Resolves a node's color by id+index (lets the caller plug in
|
|
34
47
|
* the same theme/colorScheme/colorBy resolution the HOC uses). */
|
|
35
48
|
colorOf: (id: string, idx: number) => string;
|
|
36
|
-
layoutOpts: Pick<ProcessSankeyOptions, "pairing" | "packing" | "laneOrder" | "lifetimeMode">;
|
|
49
|
+
layoutOpts: Pick<ProcessSankeyOptions, "pairing" | "packing" | "laneOrder" | "lifetimeMode" | "maxValueScale" | "lanePlacement" | "nodeSizing" | "groupPadding">;
|
|
50
|
+
/** Render node labels: true, false, or density-budgeted `"auto"`. */
|
|
51
|
+
showLabels?: boolean | "auto";
|
|
52
|
+
/**
|
|
53
|
+
* Author priority for `showLabels="auto"`. Higher values survive density
|
|
54
|
+
* shedding first. String field name or function over the raw node datum.
|
|
55
|
+
*/
|
|
56
|
+
labelPriorityAccessor?: string | ((d: Datum) => number);
|
|
57
|
+
/** Optional hard cap on visible auto labels (after area budget). */
|
|
58
|
+
maxLabels?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Which datum selection/linkedHover predicates receive.
|
|
61
|
+
* Default `"raw"` unwraps author records from the scene payload.
|
|
62
|
+
*/
|
|
63
|
+
selectionDatum?: "raw" | "scene";
|
|
64
|
+
/** Declarative style rules applied to band fills (raw node datum). */
|
|
65
|
+
styleRules?: StyleRule[];
|
|
66
|
+
colorBy?: string | ((d: Datum) => unknown);
|
|
67
|
+
valueAccessor?: string | ((d: Datum) => unknown);
|
|
68
|
+
/**
|
|
69
|
+
* Validation policy mode (M6). `static`/`mcp` hard-fail duplicate ids;
|
|
70
|
+
* `push` warns and strips invalid system times. Default `static`.
|
|
71
|
+
*/
|
|
72
|
+
usageMode?: import("./validation").ProcessSankeyUsageMode;
|
|
37
73
|
}
|
|
38
74
|
export interface BuildScenesResult {
|
|
39
75
|
layout: ProcessSankeyLayout | null;
|
|
40
76
|
layoutConfig: ProcessSankeyLayoutConfig;
|
|
41
77
|
issues: ProcessSankeyIssue[];
|
|
78
|
+
/** Non-fatal validation issues; layout still runs when only these remain. */
|
|
79
|
+
warnings: ProcessSankeyIssue[];
|
|
42
80
|
/** Used downstream for tooltips (mass-history) and overlays. */
|
|
43
81
|
xScale: ReturnType<typeof scaleTime>;
|
|
44
82
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ProcessSankeyEdge, ProcessSankeyNode } from "./algorithm";
|
|
2
|
+
/** Non-temporal topology expressed as scheduled process events, including a
|
|
3
|
+
* later repartition loop. Exercises chains, merge/fan-out, and a static cycle. */
|
|
4
|
+
export declare const processLineageFixture: {
|
|
5
|
+
nodes: ProcessSankeyNode[];
|
|
6
|
+
edges: ProcessSankeyEdge[];
|
|
7
|
+
};
|
|
8
|
+
/** Wide hospital-flow shape with dense lanes and several long transits. */
|
|
9
|
+
export declare const processHospitalFixture: {
|
|
10
|
+
nodes: ProcessSankeyNode[];
|
|
11
|
+
edges: ProcessSankeyEdge[];
|
|
12
|
+
};
|
|
13
|
+
/** Deterministic 60-node/200-edge stress shape for the ordering budget. */
|
|
14
|
+
export declare function processOrderingStressFixture(): {
|
|
15
|
+
nodes: ProcessSankeyNode[];
|
|
16
|
+
edges: ProcessSankeyEdge[];
|
|
17
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reserve vertical frame space only for chrome that is actually rendered.
|
|
3
|
+
* Eight pixels clear the bare axis rule; telemetry needs its two-line
|
|
4
|
+
* readout, and labeled ticks need their 20px baseline plus font descent.
|
|
5
|
+
*/
|
|
6
|
+
export declare function resolveProcessSankeyMarginDefaults(hasTitle: boolean, showQualityReadout: boolean, hasAxisTicks: boolean, orientation?: "horizontal" | "vertical"): {
|
|
7
|
+
top: number;
|
|
8
|
+
right: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
left: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ProcessSankeyNode, ProcessSankeyNodeData, ProcessSankeySlot } from "./algorithm";
|
|
2
|
+
import type { SlotByNode } from "./layoutGeometry";
|
|
3
|
+
/**
|
|
4
|
+
* Translate same-group bands as a time-aware streamgraph stack.
|
|
5
|
+
*
|
|
6
|
+
* Slot ordering still supplies a stable within-group order and reserves the
|
|
7
|
+
* group's collision-free outer envelope. At every group sample time, active
|
|
8
|
+
* slots are restacked without holes around that envelope's center. Nodes that
|
|
9
|
+
* reuse one slot at an exact handoff share its position instead of being
|
|
10
|
+
* double-counted. The same mass-space delta is copied to every attachment at
|
|
11
|
+
* that time, retaining the node/ribbon partition invariant.
|
|
12
|
+
*/
|
|
13
|
+
export declare function bondProcessSankeyNodeData(nodes: readonly ProcessSankeyNode[], nodeData: Record<string, ProcessSankeyNodeData>, slots: readonly ProcessSankeySlot[], slotByNode: Readonly<SlotByNode>, centerlines: Readonly<Record<string, number>>, valueScale: number, groupPadding?: number): Record<string, ProcessSankeyNodeData>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure inventory ledger for ProcessSankey-style stock-and-flow graphs.
|
|
3
|
+
*
|
|
4
|
+
* Persistent institutions (and other nodes whose stock is only implied by
|
|
5
|
+
* edge events) compute "how much sits in this node at time t" by folding
|
|
6
|
+
* arrivals and departures. Predecessor/source nodes that begin with authored
|
|
7
|
+
* stock rather than an inbound transaction are handled by lifting the running
|
|
8
|
+
* balance so it never goes negative — the same convention the United States
|
|
9
|
+
* history-river example used inline before extraction.
|
|
10
|
+
*/
|
|
11
|
+
export interface InventoryEdge {
|
|
12
|
+
source: string;
|
|
13
|
+
target: string;
|
|
14
|
+
value: number;
|
|
15
|
+
/** Time mass leaves the source (ribbon depart / transfer start). */
|
|
16
|
+
startTime: number;
|
|
17
|
+
/** Time mass arrives at the target (ribbon arrive / transfer end). */
|
|
18
|
+
endTime: number;
|
|
19
|
+
/**
|
|
20
|
+
* Optional lifecycle exit from the target band (e.g. colonial administration
|
|
21
|
+
* ending). When set, counts as a departure from `target` at this time.
|
|
22
|
+
*/
|
|
23
|
+
systemOutTime?: number | null;
|
|
24
|
+
}
|
|
25
|
+
export interface InventoryAtTimeOptions {
|
|
26
|
+
/**
|
|
27
|
+
* When true (default), infer an opening stock so the running balance never
|
|
28
|
+
* dips below zero. When false, report the raw cumulative sum of events at
|
|
29
|
+
* `time` (may be negative for incomplete ledgers).
|
|
30
|
+
*/
|
|
31
|
+
inferOpeningStock?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Inventory of `nodeId` at `time` from an edge ledger.
|
|
35
|
+
*
|
|
36
|
+
* Events:
|
|
37
|
+
* - inbound: `target === nodeId` at `endTime` (+value)
|
|
38
|
+
* - outbound: `source === nodeId` at `startTime` (−value)
|
|
39
|
+
* - lifecycle exit: `target === nodeId` with `systemOutTime` (−value)
|
|
40
|
+
*/
|
|
41
|
+
export declare function inventoryAtTime(nodeId: string, time: number, edges: readonly InventoryEdge[], options?: InventoryAtTimeOptions): number;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ProcessSankeyBandSpec } from "./streamingLayout";
|
|
2
|
+
import type { SlotByNode } from "./layoutGeometry";
|
|
3
|
+
/**
|
|
4
|
+
* Reused rows can contain consecutive node bands whose starts are only a few
|
|
5
|
+
* pixels apart. Their end-anchored labels otherwise paint over one another.
|
|
6
|
+
* Stagger only horizontally-overlapping clusters within the same packed row.
|
|
7
|
+
*/
|
|
8
|
+
export declare function staggerProcessSankeyLabels(bands: readonly ProcessSankeyBandSpec[], slotByNode: SlotByNode, plotH: number): ProcessSankeyBandSpec[];
|
|
9
|
+
/**
|
|
10
|
+
* A vertical river can have many nodes opening on the same historical stage.
|
|
11
|
+
* Place those labels in compact rows within the preceding inter-stage gap.
|
|
12
|
+
* This is intentionally a label-only pass: it never changes band ordering or
|
|
13
|
+
* geometry, and labels at distinct stages cannot push one another downstream.
|
|
14
|
+
*/
|
|
15
|
+
export declare function staggerVerticalProcessSankeyLabels(bands: readonly ProcessSankeyBandSpec[], plotW: number, plotH: number): ProcessSankeyBandSpec[];
|
|
16
|
+
export interface ProcessSankeyLabelDensityOptions {
|
|
17
|
+
/**
|
|
18
|
+
* Explicit author priority per band id (higher keeps first under `"auto"`).
|
|
19
|
+
* When omitted, density falls back to label-width + geometric stand-in.
|
|
20
|
+
*/
|
|
21
|
+
priorityById?: ReadonlyMap<string, number>;
|
|
22
|
+
/**
|
|
23
|
+
* Optional hard cap on visible labels (after the area-based budget). Useful
|
|
24
|
+
* for compact vertical rivers that should never exceed N stage labels.
|
|
25
|
+
*/
|
|
26
|
+
maxLabels?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Density-aware label filter for `showLabels="auto"`. Keeps higher-priority
|
|
30
|
+
* bands until the plot's label budget is exhausted. Shed labels retain their
|
|
31
|
+
* text as `labelFullText` with `labelDeferred: true` so selection/hover can
|
|
32
|
+
* re-surface them without a layout recompute. Deterministic CSR/SSR.
|
|
33
|
+
*/
|
|
34
|
+
export declare function applyProcessSankeyLabelDensity(bands: readonly ProcessSankeyBandSpec[], plotW: number, plotH: number, mode: boolean | "auto", options?: ProcessSankeyLabelDensityOptions): ProcessSankeyBandSpec[];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ProcessSankeyEdge, ProcessSankeyLaneLifetime, ProcessSankeyLayoutQuality, ProcessSankeyNode, ProcessSankeyNodeData, ProcessSankeyRibbonLane, ProcessSankeySlot } from "./algorithm";
|
|
2
|
+
export type { ProcessSankeyRibbonLane };
|
|
3
|
+
export type SlotByNode = Record<string, number>;
|
|
4
|
+
export interface SlotGeometryOptions {
|
|
5
|
+
plotH: number;
|
|
6
|
+
padding: number;
|
|
7
|
+
valueScale: number;
|
|
8
|
+
/** Scale used only to seed/retain legacy stack center spacing. This may be
|
|
9
|
+
* larger than `valueScale` when a band-inflation cap creates slack. */
|
|
10
|
+
stackValueScale?: number;
|
|
11
|
+
lanePlacement?: "stack" | "hug";
|
|
12
|
+
/** Pixels between adjacent slots carrying the same non-empty group. */
|
|
13
|
+
groupPadding?: number;
|
|
14
|
+
/** Precomputed adjacent clearances for hot ordering loops. */
|
|
15
|
+
adjacentClearance?: readonly number[];
|
|
16
|
+
}
|
|
17
|
+
export interface SlotGeometry {
|
|
18
|
+
adjacentClearance: number[];
|
|
19
|
+
centerlines: Record<string, number>;
|
|
20
|
+
slotCenter: number[];
|
|
21
|
+
stackCenter: number[];
|
|
22
|
+
verticalUtilization: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function compareProcessSankeyIds(a: string, b: string): number;
|
|
25
|
+
export declare function slotStableId(slot: ProcessSankeySlot): string;
|
|
26
|
+
export declare function processSankeyGapPaddings(slots: readonly ProcessSankeySlot[], padding: number, groupPadding?: number): number[];
|
|
27
|
+
/** Pair clearance helper used to cache all slot-pair geometries once before
|
|
28
|
+
* an ordering search instead of rebuilding silhouettes per candidate. */
|
|
29
|
+
export declare function computeSlotPairClearance(upper: ProcessSankeySlot, lower: ProcessSankeySlot, nodeData: Record<string, ProcessSankeyNodeData>): number;
|
|
30
|
+
export declare function computeSlotGeometry(nodes: readonly ProcessSankeyNode[], edges: readonly ProcessSankeyEdge[], nodeData: Record<string, ProcessSankeyNodeData>, slots: readonly ProcessSankeySlot[], slotByNode: SlotByNode, options: SlotGeometryOptions): SlotGeometry;
|
|
31
|
+
export declare function totalPixelEdgeLength(centerlines: Record<string, number>, edges: readonly ProcessSankeyEdge[]): number;
|
|
32
|
+
export interface TransitOcclusionOptions {
|
|
33
|
+
valueScale: number;
|
|
34
|
+
ribbonLane?: ProcessSankeyRibbonLane;
|
|
35
|
+
domain?: [number, number];
|
|
36
|
+
/** `score` uses a bounded sample set during ordering; `quality` adds every
|
|
37
|
+
* lane event breakpoint and interval midpoint for the reported metric. */
|
|
38
|
+
mode?: "score" | "quality";
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Value-weighted ribbon coverage of intermediate lane bands over each edge's
|
|
42
|
+
* authored event window. Ribbon y values come from the same cubic used by the
|
|
43
|
+
* renderer; x is inverted by bisection. Optional render-only feeder runway is
|
|
44
|
+
* intentionally absent because it does not alter the edge's event interval.
|
|
45
|
+
*/
|
|
46
|
+
export declare function measureTransitOcclusion(edges: readonly ProcessSankeyEdge[], nodeData: Record<string, ProcessSankeyNodeData>, slots: readonly ProcessSankeySlot[], slotByNode: SlotByNode, centerlines: Record<string, number>, laneLifetime: Record<string, ProcessSankeyLaneLifetime>, options: TransitOcclusionOptions): number;
|
|
47
|
+
export declare function computeLayoutQuality(crossings: number, weightedLength: number, edges: readonly ProcessSankeyEdge[], nodeData: Record<string, ProcessSankeyNodeData>, slots: readonly ProcessSankeySlot[], slotByNode: SlotByNode, centerlines: Record<string, number>, laneLifetime: Record<string, ProcessSankeyLaneLifetime>, valueScale: number, verticalUtilization: number, ribbonLane?: ProcessSankeyRibbonLane, domain?: [number, number]): ProcessSankeyLayoutQuality;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type ProcessSankeyRibbonLane, type SlotByNode } from "./layoutGeometry";
|
|
2
|
+
import { type ProcessSankeyOrderingResult } from "./ordering";
|
|
3
|
+
import type { ProcessSankeyEdge, ProcessSankeyEdgeIndex, ProcessSankeyLaneLifetime, ProcessSankeyLayout, ProcessSankeyNode, ProcessSankeyNodeData, ProcessSankeyOptions, ProcessSankeySlot } from "./processSankeyTypes";
|
|
4
|
+
interface LaneLayoutOptions {
|
|
5
|
+
plotH: number;
|
|
6
|
+
padding: number;
|
|
7
|
+
valueScale: number;
|
|
8
|
+
stackValueScale?: number;
|
|
9
|
+
packing?: "off" | "reuse";
|
|
10
|
+
laneOrder?: "insertion" | "crossing-min" | "inside-out" | "crossing-min+inside-out";
|
|
11
|
+
lifetimeMode?: "full" | "half";
|
|
12
|
+
lanePlacement?: "stack" | "hug";
|
|
13
|
+
groupPadding?: number;
|
|
14
|
+
ribbonLane?: ProcessSankeyRibbonLane;
|
|
15
|
+
domain?: [number, number];
|
|
16
|
+
/** Run search only on the first dry pass. Later passes freeze packing + order. */
|
|
17
|
+
runOrdering?: boolean;
|
|
18
|
+
fixedSlotOrder?: readonly string[];
|
|
19
|
+
/**
|
|
20
|
+
* Frozen packing assignment from an earlier pass. When set, packing search is
|
|
21
|
+
* skipped and peaks/ends are rehydrated onto the same occupant membership.
|
|
22
|
+
*/
|
|
23
|
+
frozenSlots?: readonly ProcessSankeySlot[];
|
|
24
|
+
}
|
|
25
|
+
interface LaneLayoutResult {
|
|
26
|
+
effectiveSlotsHeight: number;
|
|
27
|
+
centerlines: Record<string, number>;
|
|
28
|
+
laneLifetime: Record<string, ProcessSankeyLaneLifetime>;
|
|
29
|
+
slots: ProcessSankeySlot[];
|
|
30
|
+
slotByNode: SlotByNode;
|
|
31
|
+
slotCenter: number[];
|
|
32
|
+
stackCenter: number[];
|
|
33
|
+
verticalUtilization: number;
|
|
34
|
+
selectedSlotOrder: string[];
|
|
35
|
+
initialSlotOrder: string[];
|
|
36
|
+
ordering: ProcessSankeyOrderingResult | null;
|
|
37
|
+
crossingsBefore: number | null;
|
|
38
|
+
crossingsAfter: number | null;
|
|
39
|
+
lengthBefore: number | null;
|
|
40
|
+
lengthAfter: number | null;
|
|
41
|
+
}
|
|
42
|
+
export declare function computeLaneLayout(nodes: ProcessSankeyNode[], edges: ProcessSankeyEdge[], nodeData: Record<string, ProcessSankeyNodeData>, edgeIndex: ProcessSankeyEdgeIndex, opts: LaneLayoutOptions): LaneLayoutResult;
|
|
43
|
+
export declare function computeProcessSankeyLayout(nodes: ProcessSankeyNode[], edges: ProcessSankeyEdge[], opts: ProcessSankeyOptions): ProcessSankeyLayout;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product surface for ProcessSankey layout quality (M10).
|
|
3
|
+
*
|
|
4
|
+
* Pure helpers that turn a finished layout (or raw props) into diagnoses /
|
|
5
|
+
* interrogation-friendly text — shared by diagnoseConfig, MCP, and docs.
|
|
6
|
+
*/
|
|
7
|
+
import type { Diagnosis } from "../../shared/diagnoseTypes";
|
|
8
|
+
import type { ProcessSankeyLayout, ProcessSankeyLayoutQuality } from "./processSankeyTypes";
|
|
9
|
+
/** Soft thresholds for flagship-scale rivers; not hard layout failures. */
|
|
10
|
+
export declare const PROCESS_SANKEY_QUALITY_THRESHOLDS: {
|
|
11
|
+
/** Weighted ribbons crossing dense intermediate mass (layout proxy). */
|
|
12
|
+
readonly highTransitOcclusion: 8;
|
|
13
|
+
/** Fraction of plot height occupied by peaks + gaps. */
|
|
14
|
+
readonly highLaneUtilization: 0.92;
|
|
15
|
+
/** Crossings remaining after ordering (topology-hard cases still warn). */
|
|
16
|
+
readonly residualCrossings: 3;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Diagnose an already-computed layout. Call with `ref.getCustomLayout()?.layout`
|
|
20
|
+
* or the result of `computeProcessSankeyLayout`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function diagnoseProcessSankeyLayout(layout: Pick<ProcessSankeyLayout, "layoutQuality" | "layoutQualityBefore" | "compressedPadding" | "crossingsAfter"> | null | undefined): Diagnosis[];
|
|
23
|
+
/** One-paragraph layout summary for interrogation / agent grounding. */
|
|
24
|
+
export declare function explainProcessSankeyLayout(layout: Pick<ProcessSankeyLayout, "layoutQuality" | "layoutQualityBefore" | "compressedPadding" | "slots" | "crossingsAfter"> | null | undefined): string | null;
|
|
25
|
+
/** Prop-only checks when a layout has not been run yet. */
|
|
26
|
+
export declare function diagnoseProcessSankeyProps(props: Record<string, unknown>): Diagnosis[];
|
|
27
|
+
export type { ProcessSankeyLayoutQuality };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type SlotByNode } from "./layoutGeometry";
|
|
2
|
+
import type { ProcessSankeyEdge, ProcessSankeyEdgeIndex, ProcessSankeyNode, ProcessSankeyNodeData, ProcessSankeyNodeSizing, ProcessSankeySideRecord } from "./processSankeyTypes";
|
|
3
|
+
export declare function buildEdgeIndex(nodes: ProcessSankeyNode[], edges: ProcessSankeyEdge[]): ProcessSankeyEdgeIndex;
|
|
4
|
+
export declare function assignSides(nodes: ProcessSankeyNode[], edges: ProcessSankeyEdge[], edgeIndex: ProcessSankeyEdgeIndex,
|
|
5
|
+
/** Matches the public HOC default (`"temporal"`). */
|
|
6
|
+
pairing?: "value" | "temporal"): Map<string, ProcessSankeySideRecord>;
|
|
7
|
+
export interface ProcessSankeyEndpointPositions {
|
|
8
|
+
source: number;
|
|
9
|
+
target: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function computeNode(node: ProcessSankeyNode, edgeIndex: ProcessSankeyEdgeIndex, sides: Map<string, ProcessSankeySideRecord>, endpointPositions?: ReadonlyMap<string, ProcessSankeyEndpointPositions>, nodeSizing?: ProcessSankeyNodeSizing): ProcessSankeyNodeData;
|
|
12
|
+
export declare function collectEndpointPositions(edges: readonly ProcessSankeyEdge[], nodeData: Readonly<Record<string, ProcessSankeyNodeData>>, centerlines: Readonly<Record<string, number>>, valueScale: number): Map<string, ProcessSankeyEndpointPositions>;
|
|
13
|
+
export declare function hasResolvableAttachmentTies(edgeIndex: ProcessSankeyEdgeIndex, sides: ReadonlyMap<string, ProcessSankeySideRecord>): boolean;
|
|
14
|
+
export declare function assignSameSlotHandoffSides(edges: readonly ProcessSankeyEdge[], sides: Map<string, ProcessSankeySideRecord>, slotByNode: Readonly<SlotByNode>): void;
|
|
15
|
+
/** Per-node side rebalance to keep multi-edge bundles within available per-side mass. */
|
|
16
|
+
export declare function rebalanceOutgoingSides(nodes: readonly ProcessSankeyNode[], edgeIndex: ProcessSankeyEdgeIndex, sides: Map<string, ProcessSankeySideRecord>, sameSlotEdgeIds: ReadonlySet<string>): void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ProcessSankeyEdge, ProcessSankeyLaneLifetime, ProcessSankeyNode, ProcessSankeyNodeData, ProcessSankeySlot } from "./algorithm";
|
|
2
|
+
import { type ProcessSankeyRibbonLane, type SlotByNode } from "./layoutGeometry";
|
|
3
|
+
import { bondProcessSankeySlotGroups } from "./orderingBond";
|
|
4
|
+
export { bondProcessSankeySlotGroups };
|
|
5
|
+
export interface ProcessSankeyOrderMetrics {
|
|
6
|
+
crossings: number;
|
|
7
|
+
weightedLength: number;
|
|
8
|
+
pixelLength: number;
|
|
9
|
+
transitOcclusion: number;
|
|
10
|
+
cost: number;
|
|
11
|
+
}
|
|
12
|
+
export interface ProcessSankeyOrderingResult {
|
|
13
|
+
before: ProcessSankeyOrderMetrics;
|
|
14
|
+
after: ProcessSankeyOrderMetrics;
|
|
15
|
+
/** Stable slot ids before optimization, used by quality baselines. */
|
|
16
|
+
initialOrder: string[];
|
|
17
|
+
/** Candidate counts make the performance budget testable without timers. */
|
|
18
|
+
evaluations: {
|
|
19
|
+
fullCrossing: number;
|
|
20
|
+
localCrossing: number;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface ProcessSankeyOrderingOptions {
|
|
24
|
+
plotH: number;
|
|
25
|
+
padding: number;
|
|
26
|
+
valueScale: number;
|
|
27
|
+
groupPadding?: number;
|
|
28
|
+
laneOrder?: "insertion" | "crossing-min" | "inside-out" | "crossing-min+inside-out";
|
|
29
|
+
ribbonLane?: ProcessSankeyRibbonLane;
|
|
30
|
+
domain?: [number, number];
|
|
31
|
+
/**
|
|
32
|
+
* Placement used when scoring pixel/transit cost. Must match the final
|
|
33
|
+
* layout's `lanePlacement` so a hug + maxValueScale pass can refine order
|
|
34
|
+
* against rendered geometry (M3), not only the dry stack scale=1 proxy.
|
|
35
|
+
*/
|
|
36
|
+
lanePlacement?: "stack" | "hug";
|
|
37
|
+
/**
|
|
38
|
+
* `"full"` runs barycenter + exact search + geometry refine.
|
|
39
|
+
* `"geometry-refine"` only runs the bounded exact-transit adjacent-swap
|
|
40
|
+
* (and unit-aware transpose when multi-slot bonds exist) — used after the
|
|
41
|
+
* final valueScale / hug geometry is known.
|
|
42
|
+
*/
|
|
43
|
+
mode?: "full" | "geometry-refine";
|
|
44
|
+
}
|
|
45
|
+
export declare function countCrossings(slotByNode: SlotByNode, edges: readonly ProcessSankeyEdge[]): number;
|
|
46
|
+
export declare function totalEdgeLength(slotByNode: SlotByNode, edges: readonly ProcessSankeyEdge[]): number;
|
|
47
|
+
/**
|
|
48
|
+
* Optimize one already-packed ProcessSankey slot list. Crossing changes for
|
|
49
|
+
* adjacent swaps are evaluated only for edge pairs incident to the two moved
|
|
50
|
+
* slots; pixel length and transit are O(E·slots), avoiding the old O(E²)
|
|
51
|
+
* rescore at every transpose candidate.
|
|
52
|
+
*/
|
|
53
|
+
export declare function orderProcessSankeySlots(nodes: readonly ProcessSankeyNode[], edges: readonly ProcessSankeyEdge[], nodeData: Record<string, ProcessSankeyNodeData>, _laneLifetime: Record<string, ProcessSankeyLaneLifetime>, slots: ProcessSankeySlot[], slotByNode: SlotByNode, options: ProcessSankeyOrderingOptions): ProcessSankeyOrderingResult;
|
|
54
|
+
/** Reapply a previously selected slot permutation without rerunning search. */
|
|
55
|
+
export declare function applyFixedSlotOrder(slots: ProcessSankeySlot[], slotByNode: SlotByNode, orderedStableIds: readonly string[]): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { WeightedOrderRelation } from "../../../recipes/layout1d";
|
|
2
|
+
import type { ProcessSankeySlot } from "./algorithm";
|
|
3
|
+
import { type SlotByNode } from "./layoutGeometry";
|
|
4
|
+
export interface BondedSlotUnit {
|
|
5
|
+
anchor: number;
|
|
6
|
+
stableId: string;
|
|
7
|
+
slots: ProcessSankeySlot[];
|
|
8
|
+
}
|
|
9
|
+
export declare function mapForOrder(order: readonly ProcessSankeySlot[]): SlotByNode;
|
|
10
|
+
export declare function applyOrder(slots: ProcessSankeySlot[], slotByNode: SlotByNode, order: readonly ProcessSankeySlot[]): void;
|
|
11
|
+
/** Build indivisible ordering units. Ungrouped slots remain independent;
|
|
12
|
+
* every non-empty group becomes one unit whose anchor is the mean position of
|
|
13
|
+
* its members. Sorting by that anchor is a deterministic minimum-disruption
|
|
14
|
+
* projection from any unconstrained ordering into a contiguous group order. */
|
|
15
|
+
export declare function bondedSlotUnits(order: readonly ProcessSankeySlot[]): BondedSlotUnit[];
|
|
16
|
+
export declare function bondedSlotOrder(order: readonly ProcessSankeySlot[]): ProcessSankeySlot[];
|
|
17
|
+
export declare function hasMultiSlotBond(order: readonly ProcessSankeySlot[]): boolean;
|
|
18
|
+
export declare function flattenBondedUnits(units: readonly BondedSlotUnit[]): ProcessSankeySlot[];
|
|
19
|
+
/**
|
|
20
|
+
* Collapse slot-level weighted relations onto bonded units. Multi-slot groups
|
|
21
|
+
* become single supernodes so barycenter / swap search places the whole block
|
|
22
|
+
* next to its dominant partners instead of letting unconstrained slot moves
|
|
23
|
+
* interleave foreign rows through the block and only re-glue afterwards.
|
|
24
|
+
*/
|
|
25
|
+
export declare function unitRelationsFromSlots(units: readonly BondedSlotUnit[], slotRelations: readonly WeightedOrderRelation<ProcessSankeySlot>[]): WeightedOrderRelation<BondedSlotUnit>[];
|
|
26
|
+
/**
|
|
27
|
+
* Reorder slots inside each multi-slot unit toward their external partners.
|
|
28
|
+
* Keeps the unit contiguous while aligning members that hand off to a neighbor
|
|
29
|
+
* toward that neighbor's side of the block (classic compound-node median).
|
|
30
|
+
*/
|
|
31
|
+
export declare function orderWithinBondedUnits(units: readonly BondedSlotUnit[], slotRelations: readonly WeightedOrderRelation<ProcessSankeySlot>[], compareSlots: (a: ProcessSankeySlot, b: ProcessSankeySlot) => number): BondedSlotUnit[];
|
|
32
|
+
/** Apply the node-group contiguity constraint regardless of laneOrder mode. */
|
|
33
|
+
export declare function bondProcessSankeySlotGroups(slots: ProcessSankeySlot[], slotByNode: SlotByNode): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ProcessSankeyBandSpec, ProcessSankeyRibbonSpec } from "./streamingLayout";
|
|
2
|
+
export type ProcessSankeyOrientation = "horizontal" | "vertical";
|
|
3
|
+
export declare function transposeProcessSankeyPath(pathD: string): string;
|
|
4
|
+
export declare function orientProcessSankeyBand(band: ProcessSankeyBandSpec, orientation: ProcessSankeyOrientation): ProcessSankeyBandSpec;
|
|
5
|
+
export declare function orientProcessSankeyRibbon(ribbon: ProcessSankeyRibbonSpec, orientation: ProcessSankeyOrientation): ProcessSankeyRibbonSpec;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProcessSankeyEdge, ProcessSankeyLaneLifetime, ProcessSankeyNode, ProcessSankeyNodeData, ProcessSankeySlot } from "./algorithm";
|
|
2
|
+
import { type SlotByNode } from "./layoutGeometry";
|
|
3
|
+
import { clearProcessSankeyPackingCache, processSankeyPackingSignature, rehydrateProcessSankeySlots } from "./packingCache";
|
|
4
|
+
export { clearProcessSankeyPackingCache, processSankeyPackingSignature, rehydrateProcessSankeySlots, };
|
|
5
|
+
export declare function packProcessSankeySlots(nodes: readonly ProcessSankeyNode[], edges: readonly ProcessSankeyEdge[], nodeData: Readonly<Record<string, ProcessSankeyNodeData>>, laneLifetime: Readonly<Record<string, ProcessSankeyLaneLifetime>>): {
|
|
6
|
+
slots: ProcessSankeySlot[];
|
|
7
|
+
slotByNode: SlotByNode;
|
|
8
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ProcessSankeyEdge, ProcessSankeyLaneLifetime, ProcessSankeyNode, ProcessSankeyNodeData, ProcessSankeySlot } from "./algorithm";
|
|
2
|
+
import type { SlotByNode } from "./layoutGeometry";
|
|
3
|
+
/**
|
|
4
|
+
* Reapply a frozen packing assignment under updated mass/lifetime data.
|
|
5
|
+
* Occupant membership and row identity stay fixed; peaks and end times refresh.
|
|
6
|
+
* Used by multi-pass layout so expensive packing search runs once per topology.
|
|
7
|
+
*/
|
|
8
|
+
export declare function rehydrateProcessSankeySlots(frozenSlots: readonly ProcessSankeySlot[], nodeData: Readonly<Record<string, ProcessSankeyNodeData>>, laneLifetime: Readonly<Record<string, ProcessSankeyLaneLifetime>>): {
|
|
9
|
+
slots: ProcessSankeySlot[];
|
|
10
|
+
slotByNode: SlotByNode;
|
|
11
|
+
};
|
|
12
|
+
/** Topology + mass signature for packing cache (plot size independent). */
|
|
13
|
+
export declare function processSankeyPackingSignature(nodes: readonly ProcessSankeyNode[], edges: readonly ProcessSankeyEdge[], nodeData: Readonly<Record<string, ProcessSankeyNodeData>>, laneLifetime: Readonly<Record<string, ProcessSankeyLaneLifetime>>): string;
|
|
14
|
+
export declare function lookupPackingCache(key: string): {
|
|
15
|
+
slots: ProcessSankeySlot[];
|
|
16
|
+
slotByNode: SlotByNode;
|
|
17
|
+
} | undefined;
|
|
18
|
+
export declare function storePackingCache(key: string, result: {
|
|
19
|
+
slots: ProcessSankeySlot[];
|
|
20
|
+
slotByNode: SlotByNode;
|
|
21
|
+
}): void;
|
|
22
|
+
/** Test helper: clear the packing topology cache. */
|
|
23
|
+
export declare function clearProcessSankeyPackingCache(): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type BuildScenesInput, type BuildScenesResult } from "./buildScenes";
|
|
2
|
+
import { type ProcessSankeyLayoutExecution, type ProcessSankeyWorkerRequest } from "./processSankeyLayoutWorkerClient";
|
|
3
|
+
import type { Datum } from "../../shared/datumTypes";
|
|
4
|
+
export interface ProcessSankeyLayoutAsyncOptions {
|
|
5
|
+
execution?: ProcessSankeyLayoutExecution;
|
|
6
|
+
workerThreshold?: number;
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
/** Precomputed per-node colors (required for worker path). */
|
|
9
|
+
colorById: Record<string, string>;
|
|
10
|
+
fallbackPalette?: string[];
|
|
11
|
+
rawNodeById?: ReadonlyMap<string, Datum>;
|
|
12
|
+
rawEdgeById?: ReadonlyMap<string, Datum>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Clone author datums for the worker boundary. Prefer structuredClone; fall
|
|
16
|
+
* back to JSON so plain records still cross when structuredClone is missing
|
|
17
|
+
* or rejects (e.g. non-cloneable fields).
|
|
18
|
+
*/
|
|
19
|
+
export declare function cloneProcessSankeyWireDatum(value: unknown): Datum | undefined;
|
|
20
|
+
/** Exported for tests — keep worker input observationally equal to sync. */
|
|
21
|
+
export declare function toProcessSankeyWorkerRequest(input: BuildScenesInput, colorById: Record<string, string>, fallbackPalette: string[]): ProcessSankeyWorkerRequest;
|
|
22
|
+
/**
|
|
23
|
+
* Async ProcessSankey scene builder. Large layouts run in a long-lived module
|
|
24
|
+
* worker; small graphs, SSR, non-serializable styleRules/label accessors, or
|
|
25
|
+
* missing Worker fall back to the same synchronous {@link buildProcessSankeyScenes}.
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildProcessSankeyScenesAsync(input: BuildScenesInput, options: ProcessSankeyLayoutAsyncOptions): Promise<BuildScenesResult>;
|