semiotic 3.8.7 → 3.8.9
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 +6 -5
- package/README.md +58 -48
- package/ai/dist/mcp-server.js +28 -2
- package/ai/schema.json +386 -4
- package/ai/surface-manifest.json +1 -1
- package/ai/system-prompt.md +1 -1
- package/dist/{chunk-chartContainerDataAudit-JDSVSKGM.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-2X3FJCME.module.min.js +1 -0
- package/dist/{chunk-chunk-LVHDZAT3.module.min.js → chunk-chunk-2ZHHWZQM.module.min.js} +1 -1
- package/dist/chunk-chunk-5VVNW5AZ.module.min.js +1 -0
- package/dist/chunk-chunk-5ZON5NMV.module.min.js +2 -0
- package/dist/chunk-chunk-66PCWJUG.module.min.js +1 -0
- package/dist/chunk-chunk-6S3YGYW7.module.min.js +1 -0
- package/dist/chunk-chunk-7C5EDZ3Z.module.min.js +2 -0
- package/dist/chunk-chunk-A3I4HBD5.module.min.js +1 -0
- package/dist/{chunk-chunk-5SD6BHVW.module.min.js → chunk-chunk-AFQHURLO.module.min.js} +1 -1
- package/dist/chunk-chunk-DDB4TLQG.module.min.js +2 -0
- package/dist/{chunk-chunk-OI7R7EJB.module.min.js → chunk-chunk-DTH3SUOU.module.min.js} +1 -1
- package/dist/chunk-chunk-DTSNLGRK.module.min.js +2 -0
- package/dist/{chunk-chunk-NH4MEAKP.module.min.js → chunk-chunk-DVCWU7MT.module.min.js} +1 -1
- package/dist/chunk-chunk-FEPXDKJP.module.min.js +1 -0
- package/dist/chunk-chunk-FJ76HWQZ.module.min.js +1 -0
- package/dist/chunk-chunk-FSIHAW6L.module.min.js +2 -0
- package/dist/chunk-chunk-G2RGVEYY.module.min.js +2 -0
- package/dist/chunk-chunk-G75OPF5N.module.min.js +2 -0
- package/dist/chunk-chunk-HADHLMY5.module.min.js +1 -0
- package/dist/chunk-chunk-HAJVODLO.module.min.js +2 -0
- package/dist/chunk-chunk-HBFA4NN6.module.min.js +1 -0
- package/dist/{chunk-chunk-FRO4TRXK.module.min.js → chunk-chunk-HIV7AW2V.module.min.js} +1 -1
- package/dist/{chunk-chunk-Z2AJERX5.module.min.js → chunk-chunk-JZAMMSQQ.module.min.js} +1 -1
- package/dist/chunk-chunk-LSJUXBMF.module.min.js +1 -0
- package/dist/chunk-chunk-MXMRXSCI.module.min.js +2 -0
- package/dist/chunk-chunk-MXVBXFKW.module.min.js +2 -0
- package/dist/chunk-chunk-NWIGA3UK.module.min.js +1 -0
- package/dist/chunk-chunk-OFAP623Y.module.min.js +2 -0
- package/dist/{chunk-chunk-JWXLNZSM.module.min.js → chunk-chunk-OHLRAEQZ.module.min.js} +1 -1
- 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-PRNXOCYZ.module.min.js +2 -0
- package/dist/chunk-chunk-RLKZVJMQ.module.min.js +2 -0
- package/dist/chunk-chunk-SK2TQMG4.module.min.js +2 -0
- package/dist/chunk-chunk-SKLYXNYW.module.min.js +2 -0
- package/dist/chunk-chunk-TCMHJWFJ.module.min.js +1 -0
- package/dist/chunk-chunk-U4NZCU5T.module.min.js +2 -0
- package/dist/chunk-chunk-VKL6DI43.module.min.js +2 -0
- package/dist/chunk-chunk-W62673ZE.module.min.js +1 -0
- package/dist/chunk-chunk-WFHZHWT7.module.min.js +1 -0
- package/dist/{chunk-chunk-GU2EJIDJ.module.min.js → chunk-chunk-XCC25CZZ.module.min.js} +1 -1
- package/dist/chunk-chunk-XECNOUZY.module.min.js +2 -0
- package/dist/{chunk-chunk-BNGBEY7N.module.min.js → chunk-chunk-XYZDTYAF.module.min.js} +1 -1
- package/dist/chunk-statisticalOverlays-HMYYSGPE.module.min.js +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +54 -1
- package/dist/components/charts/index.d.ts +2 -2
- 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/chainReactionTypes.d.ts +1 -0
- package/dist/components/charts/physics/physicsHocUtils.d.ts +1 -1
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +2 -0
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +2 -0
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +2 -0
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +2 -0
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +2 -0
- package/dist/components/charts/shared/chartFamilySets.d.ts +1 -0
- package/dist/components/charts/shared/formatUtils.d.ts +45 -3
- 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/leastSquaresRegression.d.ts +31 -0
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +1 -0
- package/dist/components/charts/shared/styleRules.d.ts +5 -1
- package/dist/components/charts/shared/types.d.ts +8 -1
- package/dist/components/charts/shared/useChartLegend.d.ts +6 -0
- package/dist/components/charts/shared/useChartSetup.d.ts +1 -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/recipes/layout1d.d.ts +68 -0
- package/dist/components/semiotic-network.d.ts +2 -2
- package/dist/components/semiotic-recipes-core.d.ts +2 -0
- package/dist/components/semiotic-utils-core.d.ts +1 -0
- package/dist/components/semiotic.d.ts +6 -3
- package/dist/components/server/staticSVGChrome.d.ts +2 -1
- package/dist/components/store/createStore.d.ts +2 -0
- package/dist/components/stream/GeoTileRenderer.d.ts +1 -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/canvasSetup.d.ts +15 -4
- package/dist/components/stream/frameKeyboardNavigation.d.ts +3 -2
- package/dist/components/stream/geoTypes.d.ts +2 -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/moduleWorkerSession.d.ts +67 -0
- package/dist/components/stream/networkFramePaint.d.ts +8 -0
- package/dist/components/stream/networkTypes.d.ts +4 -0
- package/dist/components/stream/ordinalSceneBuilders/sceneBuilderMap.d.ts +2 -1
- package/dist/components/stream/ordinalTypes.d.ts +2 -0
- package/dist/components/stream/physics/PhysicsKernel.d.ts +9 -0
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +2 -0
- package/dist/components/stream/pipelineConfig.d.ts +2 -0
- package/dist/components/stream/pipelineDomainResolution.d.ts +1 -1
- 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 +10 -1
- package/dist/components/stream/useCanvasFrameHost.d.ts +15 -0
- package/dist/components/stream/useSemanticFrameInteractions.d.ts +12 -3
- package/dist/components/stream/xyFrameAxisTypes.d.ts +9 -0
- 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.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-experimental-vacp.min.js +1 -1
- package/dist/semiotic-experimental-vacp.module.min.js +1 -1
- package/dist/semiotic-experimental.min.js +1 -1
- package/dist/semiotic-experimental.module.min.js +1 -1
- package/dist/semiotic-network.d.ts +2 -2
- 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 +2 -0
- 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.d.ts +1 -0
- 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 +6 -3
- 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 +4 -3
- package/dist/chunk-chunk-2YAZHXL4.module.min.js +0 -2
- package/dist/chunk-chunk-3NGIKFD6.module.min.js +0 -1
- package/dist/chunk-chunk-7TTBHSAG.module.min.js +0 -2
- package/dist/chunk-chunk-7ZDJSYKI.module.min.js +0 -2
- package/dist/chunk-chunk-BGHPD3RA.module.min.js +0 -1
- package/dist/chunk-chunk-BMRZ2SPU.module.min.js +0 -2
- package/dist/chunk-chunk-C7APLVQD.module.min.js +0 -2
- package/dist/chunk-chunk-DGWFBOGB.module.min.js +0 -1
- package/dist/chunk-chunk-DIVE2DRA.module.min.js +0 -2
- package/dist/chunk-chunk-DSNGDNJY.module.min.js +0 -1
- package/dist/chunk-chunk-FBUNUIPV.module.min.js +0 -2
- package/dist/chunk-chunk-G7QVPZUD.module.min.js +0 -2
- package/dist/chunk-chunk-GBPYV4FP.module.min.js +0 -2
- package/dist/chunk-chunk-KXAFCCDB.module.min.js +0 -2
- package/dist/chunk-chunk-LG7YKJAK.module.min.js +0 -2
- package/dist/chunk-chunk-LWITSR2O.module.min.js +0 -2
- package/dist/chunk-chunk-MX35T6RX.module.min.js +0 -2
- package/dist/chunk-chunk-NJETWX42.module.min.js +0 -2
- package/dist/chunk-chunk-NW25WGLS.module.min.js +0 -2
- package/dist/chunk-chunk-ONMLEXHR.module.min.js +0 -2
- package/dist/chunk-chunk-OY66GCE6.module.min.js +0 -1
- package/dist/chunk-chunk-PRDGLMJT.module.min.js +0 -2
- package/dist/chunk-chunk-PZFT457G.module.min.js +0 -1
- package/dist/chunk-chunk-Q3WW6JGR.module.min.js +0 -1
- package/dist/chunk-chunk-Q6XKQTOQ.module.min.js +0 -1
- package/dist/chunk-chunk-RJRM2E6P.module.min.js +0 -1
- package/dist/chunk-chunk-RPL7WYXI.module.min.js +0 -1
- package/dist/chunk-chunk-V3OAKG32.module.min.js +0 -1
- package/dist/chunk-chunk-WCX6U47H.module.min.js +0 -2
- package/dist/chunk-chunk-WLOIUMWG.module.min.js +0 -2
- package/dist/chunk-chunk-XEGXX4F7.module.min.js +0 -1
- package/dist/chunk-chunk-XFRBLXYM.module.min.js +0 -1
- package/dist/chunk-chunk-ZXYDYAB7.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,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;
|
|
@@ -160,7 +160,7 @@ export declare function resolvePhysicsTooltipProps(tooltip: TooltipProp | undefi
|
|
|
160
160
|
* click, chrome (title/legend/annotations), primitive styling, emphasis.
|
|
161
161
|
* Prefer HOC props; frameProps fill gaps.
|
|
162
162
|
*/
|
|
163
|
-
export declare function resolvePhysicsFrameSharedProps(props: Pick<BaseChartProps, "accessibleTable" | "chartId" | "className" | "color" | "description" | "emphasis" | "hoverRadius" | "onClick" | "onObservation" | "opacity" | "stroke" | "strokeWidth" | "summary" | "title"> & {
|
|
163
|
+
export declare function resolvePhysicsFrameSharedProps(props: Pick<BaseChartProps, "accessibleTable" | "chartId" | "className" | "color" | "description" | "emphasis" | "hoverRadius" | "maxDevicePixelRatio" | "onClick" | "onObservation" | "opacity" | "stroke" | "strokeWidth" | "summary" | "title"> & {
|
|
164
164
|
annotations?: StreamPhysicsFrameProps["annotations"];
|
|
165
165
|
autoPlaceAnnotations?: StreamPhysicsFrameProps["autoPlaceAnnotations"];
|
|
166
166
|
background?: StreamPhysicsFrameProps["background"];
|
|
@@ -24,6 +24,8 @@ export interface RealtimeHeatmapProps<TDatum extends Datum = Datum> {
|
|
|
24
24
|
width?: number;
|
|
25
25
|
/** Chart height (alternative to size) */
|
|
26
26
|
height?: number;
|
|
27
|
+
/** Maximum canvas backing-store DPR; defaults to the environment cap. */
|
|
28
|
+
maxDevicePixelRatio?: number;
|
|
27
29
|
/** Chart margins */
|
|
28
30
|
margin?: {
|
|
29
31
|
top?: number;
|
|
@@ -29,6 +29,8 @@ export interface RealtimeHistogramProps<TDatum extends Datum = Datum> {
|
|
|
29
29
|
width?: number;
|
|
30
30
|
/** Chart height (alternative to size) */
|
|
31
31
|
height?: number;
|
|
32
|
+
/** Maximum canvas backing-store DPR; defaults to the environment cap. */
|
|
33
|
+
maxDevicePixelRatio?: number;
|
|
32
34
|
/** Chart margins */
|
|
33
35
|
margin?: PartialMargin;
|
|
34
36
|
/** CSS class name */
|
|
@@ -26,6 +26,8 @@ export interface RealtimeLineChartProps<TDatum extends Datum = Datum> {
|
|
|
26
26
|
width?: number;
|
|
27
27
|
/** Chart height (alternative to size) */
|
|
28
28
|
height?: number;
|
|
29
|
+
/** Maximum canvas backing-store DPR; defaults to the environment cap. */
|
|
30
|
+
maxDevicePixelRatio?: number;
|
|
29
31
|
/** Chart margins */
|
|
30
32
|
margin?: {
|
|
31
33
|
top?: number;
|
|
@@ -24,6 +24,8 @@ export interface RealtimeSwarmChartProps<TDatum extends Datum = Datum> {
|
|
|
24
24
|
width?: number;
|
|
25
25
|
/** Chart height (alternative to size) */
|
|
26
26
|
height?: number;
|
|
27
|
+
/** Maximum canvas backing-store DPR; defaults to the environment cap. */
|
|
28
|
+
maxDevicePixelRatio?: number;
|
|
27
29
|
/** Chart margins */
|
|
28
30
|
margin?: {
|
|
29
31
|
top?: number;
|
|
@@ -24,6 +24,8 @@ export interface RealtimeWaterfallChartProps<TDatum extends Datum = Datum> {
|
|
|
24
24
|
width?: number;
|
|
25
25
|
/** Chart height (alternative to size) */
|
|
26
26
|
height?: number;
|
|
27
|
+
/** Maximum canvas backing-store DPR; defaults to the environment cap. */
|
|
28
|
+
maxDevicePixelRatio?: number;
|
|
27
29
|
/** Chart margins */
|
|
28
30
|
margin?: {
|
|
29
31
|
top?: number;
|
|
@@ -10,6 +10,7 @@ export declare const PART_TO_WHOLE_CHARTS: Set<string>;
|
|
|
10
10
|
export declare const NORMALIZED_STACK_ACCESSORS: Record<string, string>;
|
|
11
11
|
export declare const VALUE_CHARTS: Set<string>;
|
|
12
12
|
export declare const XY_WITH_AXES_CHARTS: Set<string>;
|
|
13
|
+
export declare const ORDINAL_CHARTS: Set<string>;
|
|
13
14
|
export declare const PHYSICS_MOTION_CHARTS: Set<string>;
|
|
14
15
|
export declare const CONTINUOUS_MOTION_CHARTS: Set<string>;
|
|
15
16
|
export declare const PHYSICS_SETTLED_CHARTS: Set<string>;
|
|
@@ -86,7 +86,41 @@ export declare function formatLargeNumber(value: number, decimals?: number): str
|
|
|
86
86
|
* Used as the default axis tickFormat when no explicit format is provided.
|
|
87
87
|
*/
|
|
88
88
|
export declare function smartTickFormat(value: string | number | Date | null | undefined): string;
|
|
89
|
-
type TimeGranularity = "seconds" | "minutes" | "hours" | "days" | "months" | "years";
|
|
89
|
+
export type TimeGranularity = "seconds" | "minutes" | "hours" | "days" | "months" | "years";
|
|
90
|
+
/**
|
|
91
|
+
* Options for {@link adaptiveTimeTicks}.
|
|
92
|
+
*
|
|
93
|
+
* Timezone resolution (first match wins):
|
|
94
|
+
* 1. `timeZone: "UTC" | "local" | IANA id` (e.g. `"America/Los_Angeles"`)
|
|
95
|
+
* 2. legacy `utc: false` → local wall clock
|
|
96
|
+
* 3. default → UTC (deterministic SSR)
|
|
97
|
+
*/
|
|
98
|
+
export interface AdaptiveTimeTickOptions {
|
|
99
|
+
/**
|
|
100
|
+
* Prefer {@link AdaptiveTimeTickOptions.timeZone}. When `timeZone` is
|
|
101
|
+
* omitted, `utc: false` formats in the runtime's local timezone; the
|
|
102
|
+
* default `utc: true` keeps UTC for deterministic SSR.
|
|
103
|
+
*/
|
|
104
|
+
utc?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Timezone for label formatting and calendar-boundary detection.
|
|
107
|
+
* - `"UTC"` — UTC getters (same as the default)
|
|
108
|
+
* - `"local"` — runtime local zone
|
|
109
|
+
* - IANA id (e.g. `"America/New_York"`, `"Europe/Berlin"`) — via `Intl`
|
|
110
|
+
*/
|
|
111
|
+
timeZone?: "UTC" | "local" | (string & {});
|
|
112
|
+
}
|
|
113
|
+
/** Resolved zone used by the formatter. `"iana"` carries an IANA id. */
|
|
114
|
+
type ZoneMode = {
|
|
115
|
+
kind: "utc";
|
|
116
|
+
} | {
|
|
117
|
+
kind: "local";
|
|
118
|
+
} | {
|
|
119
|
+
kind: "iana";
|
|
120
|
+
id: string;
|
|
121
|
+
};
|
|
122
|
+
/** Resolve timezone options. `timeZone` wins over the legacy `utc` flag. */
|
|
123
|
+
export declare function resolveAdaptiveTimeZone(options?: AdaptiveTimeTickOptions): ZoneMode;
|
|
90
124
|
/**
|
|
91
125
|
* Creates a hierarchical time axis formatter.
|
|
92
126
|
*
|
|
@@ -100,19 +134,27 @@ type TimeGranularity = "seconds" | "minutes" | "hours" | "days" | "months" | "ye
|
|
|
100
134
|
*
|
|
101
135
|
* @param granularity - Optional explicit granularity. If omitted,
|
|
102
136
|
* auto-detected from the tick spacing on first call.
|
|
137
|
+
* @param options - Timezone: `timeZone: "local" | "UTC" | IANA`, or legacy
|
|
138
|
+
* `utc: false` for local. Default is UTC for deterministic SSR.
|
|
103
139
|
*
|
|
104
140
|
* @example
|
|
105
141
|
* ```tsx
|
|
106
142
|
* import { adaptiveTimeTicks } from "semiotic"
|
|
107
143
|
*
|
|
108
|
-
* // Auto-detect granularity from the data
|
|
144
|
+
* // Auto-detect granularity from the data (UTC labels)
|
|
109
145
|
* <LineChart data={ts} xFormat={adaptiveTimeTicks()} />
|
|
110
146
|
*
|
|
111
147
|
* // Explicit granularity
|
|
112
148
|
* <LineChart data={ts} xFormat={adaptiveTimeTicks("minutes")} />
|
|
149
|
+
*
|
|
150
|
+
* // Viewer local wall-clock time
|
|
151
|
+
* <LineChart data={ts} xFormat={adaptiveTimeTicks("minutes", { timeZone: "local" })} />
|
|
152
|
+
*
|
|
153
|
+
* // Explicit IANA zone (dashboard pinned to a product region)
|
|
154
|
+
* <LineChart data={ts} xFormat={adaptiveTimeTicks("minutes", { timeZone: "America/Los_Angeles" })} />
|
|
113
155
|
* ```
|
|
114
156
|
*/
|
|
115
|
-
export declare function adaptiveTimeTicks(granularity?: TimeGranularity): (value: string | number | Date, index?: number, allTicks?: number[]) => string;
|
|
157
|
+
export declare function adaptiveTimeTicks(granularity?: TimeGranularity, options?: AdaptiveTimeTickOptions): (value: string | number | Date, index?: number, allTicks?: number[]) => string;
|
|
116
158
|
/**
|
|
117
159
|
* Truncates text to specified length with ellipsis
|
|
118
160
|
*
|
|
@@ -52,6 +52,8 @@ export declare function isHatchFill(fill: unknown): fill is HatchFill;
|
|
|
52
52
|
export declare function hatchFillKey(h: HatchFill): string;
|
|
53
53
|
/** Deterministic, SVG-id-safe identifier for a hatch descriptor. */
|
|
54
54
|
export declare function hatchFillId(prefix: string, h: HatchFill): string;
|
|
55
|
+
/** Test helper: drop the canvas hatch cache between cases. */
|
|
56
|
+
export declare function clearHatchCanvasPatternCacheForTests(): void;
|
|
55
57
|
/**
|
|
56
58
|
* Resolve a `HatchFill` descriptor to a `CanvasPattern` for the given
|
|
57
59
|
* context. Cached by descriptor content + DPR. Returns `null` only when
|
|
@@ -94,7 +94,7 @@ export declare function getCrosshairProps(linkedHover: unknown, crosshairSourceI
|
|
|
94
94
|
linkedCrosshairName: string;
|
|
95
95
|
linkedCrosshairSourceId: string;
|
|
96
96
|
} | undefined;
|
|
97
|
-
export { useChartLegendAndMargin, useLegendInteraction, } from "./useChartLegend";
|
|
97
|
+
export { useChartLegendAndMargin, useLegendInteraction, distinctCategories, } from "./useChartLegend";
|
|
98
98
|
export type { LegendPosition, LegendInteractionMode, LegendInteractionState, } from "./useChartLegend";
|
|
99
99
|
/**
|
|
100
100
|
* React-facing alias for {@link resolveChartMode}. Mode resolution is kept
|
|
@@ -14,3 +14,34 @@ export declare function linearRegression(data: ReadonlyArray<readonly [number, n
|
|
|
14
14
|
* points use the former dependency's two-decimal rounding and equation order.
|
|
15
15
|
*/
|
|
16
16
|
export declare function polynomialRegression(data: ReadonlyArray<readonly [number, number | null]>, order?: number): LeastSquaresResult;
|
|
17
|
+
/**
|
|
18
|
+
* Full-precision (unrounded) linear fit for forecast prediction-interval
|
|
19
|
+
* math — unlike {@link linearRegression}, which rounds gradient/intercept to
|
|
20
|
+
* two decimals for display. That rounding is fine for a trend-line
|
|
21
|
+
* annotation but would leak into the residual/standard-error/interval math
|
|
22
|
+
* a forecast band computes from `predict`. Returns null when x has zero
|
|
23
|
+
* variance (singular normal equations) rather than falling back to a
|
|
24
|
+
* zero-gradient line, so callers can skip rendering instead of drawing a
|
|
25
|
+
* misleading flat forecast. Shared by the `forecast` annotation rule
|
|
26
|
+
* (`annotationRules.tsx`) and the LineChart forecast-segment overlay
|
|
27
|
+
* (`statisticalOverlays.ts`).
|
|
28
|
+
*/
|
|
29
|
+
export declare function fitLinearForForecast(points: ReadonlyArray<readonly [number, number]>): ((x: number) => number) | null;
|
|
30
|
+
/**
|
|
31
|
+
* Residual standard error plus the mean/sum-of-squared-deviations of x that
|
|
32
|
+
* a forecast prediction-interval formula needs, given training points and an
|
|
33
|
+
* already-fitted `predict` (linear or polynomial — this part doesn't care
|
|
34
|
+
* which). Shared by the same two forecast call sites as
|
|
35
|
+
* {@link fitLinearForForecast}.
|
|
36
|
+
*/
|
|
37
|
+
export declare function forecastIntervalStats(points: ReadonlyArray<readonly [number, number]>, predict: (x: number) => number): {
|
|
38
|
+
se: number;
|
|
39
|
+
meanX: number;
|
|
40
|
+
ssX: number;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Approximate z-score for the common one/two-sided confidence levels a
|
|
44
|
+
* forecast/envelope prediction interval rounds to. Shared by the same two
|
|
45
|
+
* forecast call sites as {@link fitLinearForForecast}.
|
|
46
|
+
*/
|
|
47
|
+
export declare function confidenceZScore(confidence: number): number;
|
|
@@ -44,6 +44,7 @@ export interface BaseMetadataProps {
|
|
|
44
44
|
accessibleTable?: boolean;
|
|
45
45
|
className?: string;
|
|
46
46
|
animate?: AnimateProp;
|
|
47
|
+
maxDevicePixelRatio?: number;
|
|
47
48
|
/** Strictly speaking not "metadata" — but the spread-when-defined
|
|
48
49
|
* pattern is identical, and every XY/ordinal HOC needs to forward
|
|
49
50
|
* this to the frame. Bundling it here avoids a parallel helper
|
|
@@ -199,7 +199,11 @@ export declare function styleRulesToXYStyle(rules: ReadonlyArray<StyleRule> | un
|
|
|
199
199
|
/**
|
|
200
200
|
* Ordinal-flavored {@link makeStyleRuleStyleFn}: the context is
|
|
201
201
|
* `{ value: valueAccessor(d), category }` — the bar/piece value plus the
|
|
202
|
-
* stack/group key.
|
|
202
|
+
* stack/group key. Public API sugar mirroring {@link styleRulesToXYStyle};
|
|
203
|
+
* unlike that XY sibling (used internally by `serverChartConfigsXY.ts`), the
|
|
204
|
+
* ordinal server config (`serverChartConfigsOrdinal.ts`) resolves colorBy
|
|
205
|
+
* and style rules together in its own `buildBarPieceStyle` rather than
|
|
206
|
+
* calling this — kept for external callers building an ordinal `pieceStyle`.
|
|
203
207
|
*/
|
|
204
208
|
export declare function styleRulesToPieceStyle(rules: ReadonlyArray<StyleRule> | undefined, valueAccessor: string | ((d: Datum) => unknown) | undefined, userPieceStyle?: MarkStyleFn): MarkStyleFn | undefined;
|
|
205
209
|
export {};
|