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.
Files changed (227) hide show
  1. package/CLAUDE.md +6 -5
  2. package/README.md +58 -48
  3. package/ai/dist/mcp-server.js +28 -2
  4. package/ai/schema.json +386 -4
  5. package/ai/surface-manifest.json +1 -1
  6. package/ai/system-prompt.md +1 -1
  7. package/dist/{chunk-chartContainerDataAudit-JDSVSKGM.module.min.js → chunk-chartContainerDataAudit-IQ3NBN3Q.module.min.js} +1 -1
  8. package/dist/chunk-chunk-2B3AIKUZ.module.min.js +2 -0
  9. package/dist/chunk-chunk-2NVFEB7P.module.min.js +2 -0
  10. package/dist/chunk-chunk-2X3FJCME.module.min.js +1 -0
  11. package/dist/{chunk-chunk-LVHDZAT3.module.min.js → chunk-chunk-2ZHHWZQM.module.min.js} +1 -1
  12. package/dist/chunk-chunk-5VVNW5AZ.module.min.js +1 -0
  13. package/dist/chunk-chunk-5ZON5NMV.module.min.js +2 -0
  14. package/dist/chunk-chunk-66PCWJUG.module.min.js +1 -0
  15. package/dist/chunk-chunk-6S3YGYW7.module.min.js +1 -0
  16. package/dist/chunk-chunk-7C5EDZ3Z.module.min.js +2 -0
  17. package/dist/chunk-chunk-A3I4HBD5.module.min.js +1 -0
  18. package/dist/{chunk-chunk-5SD6BHVW.module.min.js → chunk-chunk-AFQHURLO.module.min.js} +1 -1
  19. package/dist/chunk-chunk-DDB4TLQG.module.min.js +2 -0
  20. package/dist/{chunk-chunk-OI7R7EJB.module.min.js → chunk-chunk-DTH3SUOU.module.min.js} +1 -1
  21. package/dist/chunk-chunk-DTSNLGRK.module.min.js +2 -0
  22. package/dist/{chunk-chunk-NH4MEAKP.module.min.js → chunk-chunk-DVCWU7MT.module.min.js} +1 -1
  23. package/dist/chunk-chunk-FEPXDKJP.module.min.js +1 -0
  24. package/dist/chunk-chunk-FJ76HWQZ.module.min.js +1 -0
  25. package/dist/chunk-chunk-FSIHAW6L.module.min.js +2 -0
  26. package/dist/chunk-chunk-G2RGVEYY.module.min.js +2 -0
  27. package/dist/chunk-chunk-G75OPF5N.module.min.js +2 -0
  28. package/dist/chunk-chunk-HADHLMY5.module.min.js +1 -0
  29. package/dist/chunk-chunk-HAJVODLO.module.min.js +2 -0
  30. package/dist/chunk-chunk-HBFA4NN6.module.min.js +1 -0
  31. package/dist/{chunk-chunk-FRO4TRXK.module.min.js → chunk-chunk-HIV7AW2V.module.min.js} +1 -1
  32. package/dist/{chunk-chunk-Z2AJERX5.module.min.js → chunk-chunk-JZAMMSQQ.module.min.js} +1 -1
  33. package/dist/chunk-chunk-LSJUXBMF.module.min.js +1 -0
  34. package/dist/chunk-chunk-MXMRXSCI.module.min.js +2 -0
  35. package/dist/chunk-chunk-MXVBXFKW.module.min.js +2 -0
  36. package/dist/chunk-chunk-NWIGA3UK.module.min.js +1 -0
  37. package/dist/chunk-chunk-OFAP623Y.module.min.js +2 -0
  38. package/dist/{chunk-chunk-JWXLNZSM.module.min.js → chunk-chunk-OHLRAEQZ.module.min.js} +1 -1
  39. package/dist/{chunk-chunk-XEVJDUTH.module.min.js → chunk-chunk-OZK46A5U.module.min.js} +1 -1
  40. package/dist/chunk-chunk-PMR47KRY.module.min.js +2 -0
  41. package/dist/chunk-chunk-PRNXOCYZ.module.min.js +2 -0
  42. package/dist/chunk-chunk-RLKZVJMQ.module.min.js +2 -0
  43. package/dist/chunk-chunk-SK2TQMG4.module.min.js +2 -0
  44. package/dist/chunk-chunk-SKLYXNYW.module.min.js +2 -0
  45. package/dist/chunk-chunk-TCMHJWFJ.module.min.js +1 -0
  46. package/dist/chunk-chunk-U4NZCU5T.module.min.js +2 -0
  47. package/dist/chunk-chunk-VKL6DI43.module.min.js +2 -0
  48. package/dist/chunk-chunk-W62673ZE.module.min.js +1 -0
  49. package/dist/chunk-chunk-WFHZHWT7.module.min.js +1 -0
  50. package/dist/{chunk-chunk-GU2EJIDJ.module.min.js → chunk-chunk-XCC25CZZ.module.min.js} +1 -1
  51. package/dist/chunk-chunk-XECNOUZY.module.min.js +2 -0
  52. package/dist/{chunk-chunk-BNGBEY7N.module.min.js → chunk-chunk-XYZDTYAF.module.min.js} +1 -1
  53. package/dist/chunk-statisticalOverlays-HMYYSGPE.module.min.js +2 -0
  54. package/dist/components/Tooltip/Tooltip.d.ts +54 -1
  55. package/dist/components/charts/index.d.ts +2 -2
  56. package/dist/components/charts/network/ProcessSankey.d.ts +105 -74
  57. package/dist/components/charts/network/processSankey/accessors.d.ts +7 -0
  58. package/dist/components/charts/network/processSankey/algorithm.d.ts +14 -193
  59. package/dist/components/charts/network/processSankey/axisChrome.d.ts +31 -0
  60. package/dist/components/charts/network/processSankey/bandPaths.d.ts +45 -0
  61. package/dist/components/charts/network/processSankey/buildScenes.d.ts +41 -3
  62. package/dist/components/charts/network/processSankey/fixtures.d.ts +17 -0
  63. package/dist/components/charts/network/processSankey/frameMargins.d.ts +11 -0
  64. package/dist/components/charts/network/processSankey/groupBonding.d.ts +13 -0
  65. package/dist/components/charts/network/processSankey/inventoryAtTime.d.ts +41 -0
  66. package/dist/components/charts/network/processSankey/labelPlacement.d.ts +34 -0
  67. package/dist/components/charts/network/processSankey/layoutGeometry.d.ts +47 -0
  68. package/dist/components/charts/network/processSankey/layoutOrchestrator.d.ts +44 -0
  69. package/dist/components/charts/network/processSankey/layoutQualityProduct.d.ts +27 -0
  70. package/dist/components/charts/network/processSankey/massSimulation.d.ts +16 -0
  71. package/dist/components/charts/network/processSankey/ordering.d.ts +55 -0
  72. package/dist/components/charts/network/processSankey/orderingBond.d.ts +33 -0
  73. package/dist/components/charts/network/processSankey/orientation.d.ts +5 -0
  74. package/dist/components/charts/network/processSankey/packing.d.ts +8 -0
  75. package/dist/components/charts/network/processSankey/packingCache.d.ts +23 -0
  76. package/dist/components/charts/network/processSankey/processSankeyLayoutAsync.d.ts +27 -0
  77. package/dist/components/charts/network/processSankey/processSankeyLayoutWorkerClient.d.ts +72 -0
  78. package/dist/components/charts/network/processSankey/processSankeyTooltip.d.ts +26 -0
  79. package/dist/components/charts/network/processSankey/processSankeyTypes.d.ts +163 -0
  80. package/dist/components/charts/network/processSankey/ribbonInputs.d.ts +26 -2
  81. package/dist/components/charts/network/processSankey/ribbonRunway.d.ts +45 -0
  82. package/dist/components/charts/network/processSankey/streamingLayout.d.ts +23 -0
  83. package/dist/components/charts/network/processSankey/time.d.ts +11 -0
  84. package/dist/components/charts/network/processSankey/useProcessSankeyPush.d.ts +29 -0
  85. package/dist/components/charts/network/processSankey/useProcessSankeyScenes.d.ts +26 -0
  86. package/dist/components/charts/network/processSankey/validation.d.ts +33 -0
  87. package/dist/components/charts/physics/chainReactionTypes.d.ts +1 -0
  88. package/dist/components/charts/physics/physicsHocUtils.d.ts +1 -1
  89. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +2 -0
  90. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +2 -0
  91. package/dist/components/charts/realtime/RealtimeLineChart.d.ts +2 -0
  92. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +2 -0
  93. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +2 -0
  94. package/dist/components/charts/shared/chartFamilySets.d.ts +1 -0
  95. package/dist/components/charts/shared/formatUtils.d.ts +45 -3
  96. package/dist/components/charts/shared/hatchFill.d.ts +2 -0
  97. package/dist/components/charts/shared/hooks.d.ts +1 -1
  98. package/dist/components/charts/shared/leastSquaresRegression.d.ts +31 -0
  99. package/dist/components/charts/shared/streamPropsHelpers.d.ts +1 -0
  100. package/dist/components/charts/shared/styleRules.d.ts +5 -1
  101. package/dist/components/charts/shared/types.d.ts +8 -1
  102. package/dist/components/charts/shared/useChartLegend.d.ts +6 -0
  103. package/dist/components/charts/shared/useChartSetup.d.ts +1 -1
  104. package/dist/components/charts/shared/validateProps.d.ts +2 -2
  105. package/dist/components/charts/shared/withChartWrapper.d.ts +0 -6
  106. package/dist/components/data/numericFieldProfiler.d.ts +2 -0
  107. package/dist/components/recipes/layout1d.d.ts +68 -0
  108. package/dist/components/semiotic-network.d.ts +2 -2
  109. package/dist/components/semiotic-recipes-core.d.ts +2 -0
  110. package/dist/components/semiotic-utils-core.d.ts +1 -0
  111. package/dist/components/semiotic.d.ts +6 -3
  112. package/dist/components/server/staticSVGChrome.d.ts +2 -1
  113. package/dist/components/store/createStore.d.ts +2 -0
  114. package/dist/components/stream/GeoTileRenderer.d.ts +1 -0
  115. package/dist/components/stream/OrdinalPipelineStore.d.ts +3 -0
  116. package/dist/components/stream/PipelineStore.d.ts +5 -0
  117. package/dist/components/stream/accessorUtils.d.ts +21 -0
  118. package/dist/components/stream/canvasSetup.d.ts +15 -4
  119. package/dist/components/stream/frameKeyboardNavigation.d.ts +3 -2
  120. package/dist/components/stream/geoTypes.d.ts +2 -0
  121. package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +3 -8
  122. package/dist/components/stream/layouts/index.d.ts +1 -1
  123. package/dist/components/stream/moduleWorkerSession.d.ts +67 -0
  124. package/dist/components/stream/networkFramePaint.d.ts +8 -0
  125. package/dist/components/stream/networkTypes.d.ts +4 -0
  126. package/dist/components/stream/ordinalSceneBuilders/sceneBuilderMap.d.ts +2 -1
  127. package/dist/components/stream/ordinalTypes.d.ts +2 -0
  128. package/dist/components/stream/physics/PhysicsKernel.d.ts +9 -0
  129. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +2 -0
  130. package/dist/components/stream/pipelineConfig.d.ts +2 -0
  131. package/dist/components/stream/pipelineDomainResolution.d.ts +1 -1
  132. package/dist/components/stream/pipelineIntroCancellation.d.ts +6 -0
  133. package/dist/components/stream/pipelineTransitions.d.ts +15 -1
  134. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +16 -4
  135. package/dist/components/stream/renderers/symbolCanvasRenderer.d.ts +4 -0
  136. package/dist/components/stream/symbolPath.d.ts +8 -0
  137. package/dist/components/stream/types.d.ts +10 -1
  138. package/dist/components/stream/useCanvasFrameHost.d.ts +15 -0
  139. package/dist/components/stream/useSemanticFrameInteractions.d.ts +12 -3
  140. package/dist/components/stream/xyFrameAxisTypes.d.ts +9 -0
  141. package/dist/forceLayoutWorker.js +1 -1
  142. package/dist/geo.min.js +1 -1
  143. package/dist/geo.module.min.js +1 -1
  144. package/dist/network.min.js +1 -1
  145. package/dist/network.module.min.js +1 -1
  146. package/dist/ordinal.min.js +1 -1
  147. package/dist/ordinal.module.min.js +1 -1
  148. package/dist/physics.min.js +1 -1
  149. package/dist/physics.module.min.js +1 -1
  150. package/dist/physicsWorker.js +1 -1
  151. package/dist/processSankeyLayoutWorker.js +1 -0
  152. package/dist/realtime.min.js +1 -1
  153. package/dist/realtime.module.min.js +1 -1
  154. package/dist/semiotic-ai-core.min.js +1 -1
  155. package/dist/semiotic-ai-core.module.min.js +1 -1
  156. package/dist/semiotic-ai.min.js +1 -1
  157. package/dist/semiotic-ai.module.min.js +1 -1
  158. package/dist/semiotic-experimental-vacp.min.js +1 -1
  159. package/dist/semiotic-experimental-vacp.module.min.js +1 -1
  160. package/dist/semiotic-experimental.min.js +1 -1
  161. package/dist/semiotic-experimental.module.min.js +1 -1
  162. package/dist/semiotic-network.d.ts +2 -2
  163. package/dist/semiotic-realtime-core.min.js +1 -1
  164. package/dist/semiotic-realtime-core.module.min.js +1 -1
  165. package/dist/semiotic-recipes-core.d.ts +2 -0
  166. package/dist/semiotic-recipes-core.min.js +1 -1
  167. package/dist/semiotic-recipes-core.module.min.js +1 -1
  168. package/dist/semiotic-recipes.min.js +1 -1
  169. package/dist/semiotic-recipes.module.min.js +1 -1
  170. package/dist/semiotic-server-edge.min.js +1 -1
  171. package/dist/semiotic-server-edge.module.min.js +1 -1
  172. package/dist/semiotic-server-node.min.js +1 -1
  173. package/dist/semiotic-server-node.module.min.js +1 -1
  174. package/dist/semiotic-themes-core.module.min.js +1 -1
  175. package/dist/semiotic-themes-react.module.min.js +1 -1
  176. package/dist/semiotic-themes.module.min.js +1 -1
  177. package/dist/semiotic-utils-core.d.ts +1 -0
  178. package/dist/semiotic-utils-core.min.js +1 -1
  179. package/dist/semiotic-utils-core.module.min.js +1 -1
  180. package/dist/semiotic-utils-react.module.min.js +1 -1
  181. package/dist/semiotic-utils.min.js +1 -1
  182. package/dist/semiotic-utils.module.min.js +1 -1
  183. package/dist/semiotic-value.min.js +1 -1
  184. package/dist/semiotic-value.module.min.js +1 -1
  185. package/dist/semiotic.d.ts +6 -3
  186. package/dist/semiotic.min.js +1 -1
  187. package/dist/semiotic.module.min.js +1 -1
  188. package/dist/server.min.js +1 -1
  189. package/dist/server.module.min.js +1 -1
  190. package/dist/xy.min.js +1 -1
  191. package/dist/xy.module.min.js +1 -1
  192. package/package.json +4 -3
  193. package/dist/chunk-chunk-2YAZHXL4.module.min.js +0 -2
  194. package/dist/chunk-chunk-3NGIKFD6.module.min.js +0 -1
  195. package/dist/chunk-chunk-7TTBHSAG.module.min.js +0 -2
  196. package/dist/chunk-chunk-7ZDJSYKI.module.min.js +0 -2
  197. package/dist/chunk-chunk-BGHPD3RA.module.min.js +0 -1
  198. package/dist/chunk-chunk-BMRZ2SPU.module.min.js +0 -2
  199. package/dist/chunk-chunk-C7APLVQD.module.min.js +0 -2
  200. package/dist/chunk-chunk-DGWFBOGB.module.min.js +0 -1
  201. package/dist/chunk-chunk-DIVE2DRA.module.min.js +0 -2
  202. package/dist/chunk-chunk-DSNGDNJY.module.min.js +0 -1
  203. package/dist/chunk-chunk-FBUNUIPV.module.min.js +0 -2
  204. package/dist/chunk-chunk-G7QVPZUD.module.min.js +0 -2
  205. package/dist/chunk-chunk-GBPYV4FP.module.min.js +0 -2
  206. package/dist/chunk-chunk-KXAFCCDB.module.min.js +0 -2
  207. package/dist/chunk-chunk-LG7YKJAK.module.min.js +0 -2
  208. package/dist/chunk-chunk-LWITSR2O.module.min.js +0 -2
  209. package/dist/chunk-chunk-MX35T6RX.module.min.js +0 -2
  210. package/dist/chunk-chunk-NJETWX42.module.min.js +0 -2
  211. package/dist/chunk-chunk-NW25WGLS.module.min.js +0 -2
  212. package/dist/chunk-chunk-ONMLEXHR.module.min.js +0 -2
  213. package/dist/chunk-chunk-OY66GCE6.module.min.js +0 -1
  214. package/dist/chunk-chunk-PRDGLMJT.module.min.js +0 -2
  215. package/dist/chunk-chunk-PZFT457G.module.min.js +0 -1
  216. package/dist/chunk-chunk-Q3WW6JGR.module.min.js +0 -1
  217. package/dist/chunk-chunk-Q6XKQTOQ.module.min.js +0 -1
  218. package/dist/chunk-chunk-RJRM2E6P.module.min.js +0 -1
  219. package/dist/chunk-chunk-RPL7WYXI.module.min.js +0 -1
  220. package/dist/chunk-chunk-V3OAKG32.module.min.js +0 -1
  221. package/dist/chunk-chunk-WCX6U47H.module.min.js +0 -2
  222. package/dist/chunk-chunk-WLOIUMWG.module.min.js +0 -2
  223. package/dist/chunk-chunk-XEGXX4F7.module.min.js +0 -1
  224. package/dist/chunk-chunk-XFRBLXYM.module.min.js +0 -1
  225. package/dist/chunk-chunk-ZXYDYAB7.module.min.js +0 -2
  226. package/dist/chunk-statisticalOverlays-6MVAK5RW.module.min.js +0 -2
  227. package/dist/components/stream/renderers/networkSymbolRenderer.d.ts +0 -2
@@ -114,6 +114,12 @@ export interface BaseChartProps {
114
114
  responsiveWidth?: boolean;
115
115
  /** Auto-match height to parent container (requires parent with explicit height). Default: false */
116
116
  responsiveHeight?: boolean;
117
+ /**
118
+ * Maximum canvas backing-store pixel ratio. Defaults to 3 on desktop and 2
119
+ * on coarse-pointer/small-screen devices. Canvas chart families repaint
120
+ * automatically when browser zoom or display density changes.
121
+ */
122
+ maxDevicePixelRatio?: number;
117
123
  /** Semantic responsive transformations keyed by measured chart slot, not CSS alone. */
118
124
  responsiveRules?: ResponsiveRule[];
119
125
  /** Phone/mobile contract consumed by audits, recipes, adapters, and agents. */
@@ -188,7 +194,8 @@ export interface BaseChartProps {
188
194
  * Useful when a fixed scale (gauge, score band, KPI dial) needs
189
195
  * endpoints to read as the actual boundaries.
190
196
  *
191
- * Applies to:
197
+ * `frameProps.axes[i].extent` can override this independently for an XY
198
+ * axis. Applies to:
192
199
  * - XY charts: both x and y axes (linear, time, log).
193
200
  * - Ordinal charts: the value (r) axis only — the categorical
194
201
  * axis is a band scale and doesn't have a numeric tick set.
@@ -3,6 +3,12 @@ import type { MarginType, PartialMargin } from "../../types/marginType";
3
3
  import type { LegendLayout, LegendValue } from "../../types/legendTypes";
4
4
  import { type AxisChromeInput } from "../../legendLayout";
5
5
  import type { Datum } from "./datumTypes";
6
+ /**
7
+ * Distinct string-coerced `colorBy` values across `data`, in first-seen order.
8
+ * Shared by chart setup hooks that need the category list for a color scale
9
+ * or legend before any scale/legend object is built.
10
+ */
11
+ export declare function distinctCategories(data: readonly Datum[], colorBy: Accessor<string | number> | undefined): string[];
6
12
  /**
7
13
  * Hook to create a legend and compute margins with legend-aware adjustment.
8
14
  * Consolidates the shouldShowLegend / createLegend / margin merge / right-margin
@@ -131,7 +131,7 @@ export interface ChartSetupResult {
131
131
  /** If non-null, the HOC should return this element (loading or empty state) */
132
132
  earlyReturn: ReactElement | null;
133
133
  /** Props to spread into the stream frame for legend behavior */
134
- legendBehaviorProps: Datum;
134
+ legendBehaviorProps: Record<string, unknown>;
135
135
  /** Crosshair props to spread into StreamXYFrame when linkedHover mode is "x-position" */
136
136
  crosshairProps: {
137
137
  linkedCrosshairName: string;
@@ -1,16 +1,16 @@
1
1
  import type { Datum } from "./datumTypes";
2
2
  import { VALIDATION_MAP } from "./validationMap";
3
+ import type { PropType, DataShape } from "./chartSpecCore";
3
4
  export { VALIDATION_MAP };
5
+ export type { PropType, DataShape };
4
6
  export interface ValidationResult {
5
7
  valid: boolean;
6
8
  errors: string[];
7
9
  }
8
- export type PropType = "string" | "number" | "boolean" | "array" | "object" | "function" | "null";
9
10
  export interface PropDef {
10
11
  type: PropType | PropType[];
11
12
  enum?: readonly string[];
12
13
  }
13
- type DataShape = "array" | "object" | "network" | "realtime" | "none";
14
14
  export interface ComponentSpec {
15
15
  /** Props that must be present */
16
16
  required: string[];
@@ -4,10 +4,6 @@ interface SafeRenderProps {
4
4
  componentName: string;
5
5
  width: number;
6
6
  height: number;
7
- /** @deprecated Retained for back-compat; no longer threaded into the
8
- * error boundary. Use `npx semiotic-ai --doctor` or import
9
- * `diagnoseConfig` from `semiotic/utils` for validation diagnostics. */
10
- chartProps?: Record<string, unknown>;
11
7
  children: React.ReactNode;
12
8
  }
13
9
  /**
@@ -41,6 +37,4 @@ export declare function renderEmptyState(data: Datum[] | undefined | null, width
41
37
  export declare function renderLoadingState(loading: boolean | undefined, width: number, height: number, loadingContent?: React.ReactNode | false): React.ReactElement | null;
42
38
  /** Warn if a string accessor isn't found in the first data element */
43
39
  export declare function warnMissingField(componentName: string, data: Datum[] | undefined, accessorName: string, accessorValue: DatumValue): void;
44
- /** Warn if data looks like the wrong shape for this chart type */
45
- export declare function warnDataShape(componentName: string, data: Array<Datum | string | number | boolean | null | undefined> | undefined, expectedKeys: string[], hint: string): void;
46
40
  export {};
@@ -19,5 +19,7 @@ export interface ProfileNumericFieldsOptions {
19
19
  /** Include exact quartiles. Disable when another profiler already sorts fields. */
20
20
  readonly quantiles?: boolean;
21
21
  }
22
+ /** Linear-interpolation quantile over a pre-sorted array. */
23
+ export declare function quantile(sorted: ReadonlyArray<number>, p: number): number | undefined;
22
24
  /** Profile invalid/missing numeric candidates without silently dropping them. */
23
25
  export declare function profileNumericFields(data: ReadonlyArray<Datum> | null | undefined, options?: ProfileNumericFieldsOptions): Readonly<Record<string, NumericFieldProfile>>;
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Deterministic one-dimensional layout primitives shared by ordered bands,
3
+ * lanes, and layered graphs. The helpers are deliberately geometry-agnostic:
4
+ * callers provide relations, silhouettes, and cost functions while the kit
5
+ * owns the guarded search and separation invariants.
6
+ */
7
+ export interface MinGapPlacementOptions {
8
+ /** Preferred coordinate for each item, in order. */
9
+ desired: readonly number[];
10
+ /** Minimum distance between item i and i + 1. */
11
+ minGaps: readonly number[];
12
+ /** Optional least-squares weight per desired coordinate. */
13
+ weights?: readonly number[];
14
+ /** Optional lower bound for the first coordinate. */
15
+ min?: number;
16
+ /** Optional upper bound for the last coordinate. */
17
+ max?: number;
18
+ }
19
+ /**
20
+ * Least-squares placement with fixed order and per-pair minimum gaps.
21
+ *
22
+ * The gap constraints are removed with cumulative offsets, then weighted
23
+ * isotonic regression (pool-adjacent-violators) solves the remaining
24
+ * non-decreasing placement. Bounds apply to the whole ordered sequence.
25
+ */
26
+ export declare function placeWithMinGap(options: MinGapPlacementOptions): number[];
27
+ export interface SilhouetteSample {
28
+ /** Position along the independent axis (time, layer, or another index). */
29
+ at: number;
30
+ /** Extent before the band's centerline (top for a vertical lane). */
31
+ before: number;
32
+ /** Extent after the band's centerline (bottom for a vertical lane). */
33
+ after: number;
34
+ }
35
+ export interface PackedBands {
36
+ /** Minimum silhouette clearance between each adjacent pair. */
37
+ adjacentClearance: number[];
38
+ /** Center coordinates starting at zero, including `gap`. */
39
+ positions: number[];
40
+ }
41
+ /**
42
+ * Pack ordered bands using their sampled silhouettes. Adjacent clearance is
43
+ * the worst simultaneous `lower.after + upper.before` extent, so peaks that
44
+ * occur at different positions can nest without overlap.
45
+ */
46
+ export declare function packBandsBySilhouette(bands: readonly (readonly SilhouetteSample[])[], gap?: number): PackedBands;
47
+ export interface WeightedOrderRelation<T> {
48
+ source: T;
49
+ target: T;
50
+ weight?: number;
51
+ }
52
+ export interface GuardedOrderOptions<T> {
53
+ passes?: number;
54
+ /** Stable, locale-independent tie-break supplied by the caller. */
55
+ compare?: (a: T, b: T) => number;
56
+ /** Hard cap on evaluated candidates; deterministic unlike a wall-clock cap. */
57
+ maxEvaluations?: number;
58
+ }
59
+ /** Guarded weighted-barycenter sweeps that retain the best observed order. */
60
+ export declare function orderByBarycenter<T>(input: readonly T[], relations: readonly WeightedOrderRelation<T>[], cost: (order: readonly T[]) => number, options?: GuardedOrderOptions<T>): T[];
61
+ /** Guarded adjacent-transpose refinement under a caller-provided cost. */
62
+ export declare function refineByAdjacentSwaps<T>(input: readonly T[], cost: (order: readonly T[]) => number, options?: GuardedOrderOptions<T>): T[];
63
+ /** Exhaustive Heap-permutation ordering for small item sets. */
64
+ export declare function orderExactSmall<T>(input: readonly T[], cost: (order: readonly T[]) => number, options?: Pick<GuardedOrderOptions<T>, "maxEvaluations"> & {
65
+ maxItems?: number;
66
+ }): T[];
67
+ /** Count endpoint-order inversions, optionally filtering candidate pairs. */
68
+ export declare function countPairwiseCrossings<T>(items: readonly T[], endpoints: (item: T) => readonly [number, number], comparePair?: (a: T, b: T) => boolean): number;
@@ -38,8 +38,8 @@ export type { CirclePackProps } from "./charts/network/CirclePack";
38
38
  export type { OrbitDiagramProps } from "./charts/network/OrbitDiagram";
39
39
  export type { NetworkCustomChartProps } from "./charts/custom/NetworkCustomChart";
40
40
  export type { NetworkCustomLayout, NetworkLayoutContext, NetworkLayoutResult, NetworkHtmlMark, } from "./stream/networkCustomLayout";
41
- export { validateProcessSankey, formatProcessSankeyIssue, } from "./charts/network/processSankey/algorithm";
42
- export type { ProcessSankeyNode as ProcessSankeyValidatorNode, ProcessSankeyEdge as ProcessSankeyValidatorEdge, ProcessSankeyIssue, } from "./charts/network/processSankey/algorithm";
41
+ export { validateProcessSankey, formatProcessSankeyIssue, diagnoseProcessSankeyLayout, diagnoseProcessSankeyProps, explainProcessSankeyLayout, inventoryAtTime, toProcessSankeyTime, } from "./charts/network/processSankey/algorithm";
42
+ export type { ProcessSankeyNode as ProcessSankeyValidatorNode, ProcessSankeyEdge as ProcessSankeyValidatorEdge, ProcessSankeyIssue, InventoryEdge, InventoryAtTimeOptions, ProcessSankeyTimeLike, } from "./charts/network/processSankey/algorithm";
43
43
  export { resolveStyleRules, matchesThreshold, ruleMatches, makeRuleValueResolver, makeNodeRuleContext, composeStyleRules } from "./charts/shared/styleRules";
44
44
  export type { StyleRule, StyleRuleStyle, StyleRuleThreshold, StyleRuleContext, StyleRulePredicate } from "./charts/shared/styleRules";
45
45
  export { isHatchFill, hatchPatternDef, resolveSvgFill, hatchFillId } from "./charts/shared/hatchFill";
@@ -59,6 +59,8 @@ export type { GeoAreaHitTargetProps, HitTargetPointProps, HitTargetRectProps, Ne
59
59
  export { runs, runLengthEncode } from "./recipes/runs";
60
60
  export type { Run, RunOptions } from "./recipes/runs";
61
61
  export { wrapValue, shortestArcDelta, cyclicRangeContains, selectCyclicRange } from "./recipes/cyclical";
62
+ export { placeWithMinGap, packBandsBySilhouette, orderByBarycenter, refineByAdjacentSwaps, orderExactSmall, countPairwiseCrossings, } from "./recipes/layout1d";
63
+ export type { MinGapPlacementOptions, SilhouetteSample, PackedBands, WeightedOrderRelation, GuardedOrderOptions, } from "./recipes/layout1d";
62
64
  export { packIntervals, activeCountOverDomain } from "./recipes/intervals";
63
65
  export type { PackedInterval, PackIntervalsResult, PackIntervalsOptions, ActiveCount, ActiveCountOptions, } from "./recipes/intervals";
64
66
  export { layoutSequence, layoutChipStrip, estimateLabelWidth, packSpanLevels, scaleArcBand, spanArcPath, spanArcPeakY, partitionSharedEdges, } from "./recipes/sequenceLayout";
@@ -11,6 +11,7 @@ export { LIGHT_THEME, DARK_THEME, HIGH_CONTRAST_THEME, COLOR_BLIND_SAFE_CATEGORI
11
11
  export { themeToCSS, themeToTokens, resolveThemePreset, THEME_PRESETS, CARBON_CATEGORICAL_14, CARBON_ALERT, } from "./semiotic-themes";
12
12
  export type { ThemePresetName } from "./semiotic-themes";
13
13
  export { adaptiveTimeTicks, smartTickFormat } from "./charts/shared/formatUtils";
14
+ export type { AdaptiveTimeTickOptions, TimeGranularity } from "./charts/shared/formatUtils";
14
15
  export { darkenColor, lightenColor } from "./charts/shared/colorManipulation";
15
16
  export { createHatchPattern } from "./charts/shared/hatchPattern";
16
17
  export type { HatchPatternOptions } from "./charts/shared/hatchPattern";
@@ -20,7 +20,7 @@ import { ContextLayout } from "./ContextLayout";
20
20
  import { CircularBrush } from "./CircularBrush";
21
21
  import { DirectManipulationControl, VISUALIZATION_CONTROL_TYPES } from "./DirectManipulationControl";
22
22
  import { DetailsPanel } from "./DetailsPanel";
23
- import { Tooltip, MultiLineTooltip, normalizeTooltip } from "./Tooltip/Tooltip";
23
+ import { Tooltip, MultiLineTooltip, MultiPointTooltip, normalizeTooltip, resolveMultiCapableTooltip, isMultiTooltip } from "./Tooltip/Tooltip";
24
24
  import { RingBuffer } from "./realtime/RingBuffer";
25
25
  import { IncrementalExtent } from "./realtime/IncrementalExtent";
26
26
  import { RealtimeLineChart } from "./charts/realtime/RealtimeLineChart";
@@ -28,7 +28,7 @@ import { RealtimeTemporalHistogram, RealtimeHistogram, TemporalHistogram } from
28
28
  import { RealtimeSwarmChart } from "./charts/realtime/RealtimeSwarmChart";
29
29
  import { RealtimeWaterfallChart } from "./charts/realtime/RealtimeWaterfallChart";
30
30
  import { RealtimeHeatmap } from "./charts/realtime/RealtimeHeatmap";
31
- export { StreamXYFrame, StreamOrdinalFrame, StreamNetworkFrame, Scatterplot, ConnectedScatterplot, LineChart, BumpChart, rankBumpData, AreaChart, DifferenceChart, StackedAreaChart, Heatmap, BubbleChart, BarChart, StackedBarChart, LikertChart, SwarmPlot, BoxPlot, Histogram, ViolinPlot, RidgelinePlot, DotPlot, ForceDirectedGraph, ChordDiagram, SankeyDiagram, ProcessSankey, TreeDiagram, PieChart, DonutChart, GaugeChart, FunnelChart, GroupedBarChart, SwimlaneChart, Treemap, CirclePack, OrbitDiagram, ScatterplotMatrix, MinimapChart, QuadrantChart, MultiAxisLineChart, CandlestickChart, XYCustomChart, NetworkCustomChart, OrdinalCustomChart, LinkedCharts, ThemeProvider, useTheme, exportChart, toConfig, fromConfig, toURL, fromURL, copyConfig, configToJSX, serializeSelections, deserializeSelections, fromVegaLite, ChartErrorBoundary, ChartContainer, MobileChartContainer, SmallMultipleChart, MobileStandardControls, clampMobileRange, useMobileRangeControls, zoomMobileRange, ChartGrid, CategoryColorProvider, useCategoryColors, ContextLayout, CircularBrush, DirectManipulationControl, VISUALIZATION_CONTROL_TYPES, DetailsPanel, Tooltip, MultiLineTooltip, normalizeTooltip, RingBuffer, IncrementalExtent, RealtimeLineChart, RealtimeTemporalHistogram, RealtimeHistogram, TemporalHistogram, RealtimeSwarmChart, RealtimeWaterfallChart, RealtimeHeatmap, createHatchPattern, responsiveRuleMatches, resolveResponsiveRules };
31
+ export { StreamXYFrame, StreamOrdinalFrame, StreamNetworkFrame, Scatterplot, ConnectedScatterplot, LineChart, BumpChart, rankBumpData, AreaChart, DifferenceChart, StackedAreaChart, Heatmap, BubbleChart, BarChart, StackedBarChart, LikertChart, SwarmPlot, BoxPlot, Histogram, ViolinPlot, RidgelinePlot, DotPlot, ForceDirectedGraph, ChordDiagram, SankeyDiagram, ProcessSankey, TreeDiagram, PieChart, DonutChart, GaugeChart, FunnelChart, GroupedBarChart, SwimlaneChart, Treemap, CirclePack, OrbitDiagram, ScatterplotMatrix, MinimapChart, QuadrantChart, MultiAxisLineChart, CandlestickChart, XYCustomChart, NetworkCustomChart, OrdinalCustomChart, LinkedCharts, ThemeProvider, useTheme, exportChart, toConfig, fromConfig, toURL, fromURL, copyConfig, configToJSX, serializeSelections, deserializeSelections, fromVegaLite, ChartErrorBoundary, ChartContainer, MobileChartContainer, SmallMultipleChart, MobileStandardControls, clampMobileRange, useMobileRangeControls, zoomMobileRange, ChartGrid, CategoryColorProvider, useCategoryColors, ContextLayout, CircularBrush, DirectManipulationControl, VISUALIZATION_CONTROL_TYPES, DetailsPanel, Tooltip, MultiLineTooltip, MultiPointTooltip, normalizeTooltip, resolveMultiCapableTooltip, isMultiTooltip, RingBuffer, IncrementalExtent, RealtimeLineChart, RealtimeTemporalHistogram, RealtimeHistogram, TemporalHistogram, RealtimeSwarmChart, RealtimeWaterfallChart, RealtimeHeatmap, createHatchPattern, responsiveRuleMatches, resolveResponsiveRules };
32
32
  export type { CategoricalLegendConfig, GradientLegendConfig, GradientLegendValue, LegendGroup, LegendItem, LegendLayout, LegendValue, } from "./types/legendTypes";
33
33
  export type { DirectManipulationControlProps, VisualizationControlType } from "./DirectManipulationControl";
34
34
  export { createControlObservationAdapter, } from "./controls/controlContract";
@@ -47,6 +47,8 @@ export { useSelection, useSelectionActions, useLinkedHover, useBrushSelection, u
47
47
  export { useCustomLayoutSelection } from "./stream/customLayoutSelection";
48
48
  export { useForceLayout } from "./charts/network/useForceLayout";
49
49
  export type { ForceLayoutStatus, UseForceLayoutResult } from "./charts/network/useForceLayout";
50
+ export { inventoryAtTime, toProcessSankeyTime, validateProcessSankey, formatProcessSankeyIssue, diagnoseProcessSankeyLayout, diagnoseProcessSankeyProps, explainProcessSankeyLayout, } from "./charts/network/processSankey/algorithm";
51
+ export type { InventoryEdge, InventoryAtTimeOptions, ProcessSankeyTimeLike, ProcessSankeyIssue, } from "./charts/network/processSankey/algorithm";
50
52
  export type { CustomLayoutSelection } from "./stream/customLayoutSelection";
51
53
  export type { CustomLayoutFailureDiagnostic, CustomLayoutFailureRecovery, CustomLayoutFamily } from "./stream/customLayoutFailure";
52
54
  export type { UseSelectionOptions, UseSelectionResult, UseSelectionActionsResult, UseLinkedHoverOptions, UseLinkedHoverResult, UseBrushSelectionOptions, UseBrushSelectionResult } from "./LinkedCharts";
@@ -92,8 +94,9 @@ export type { StyleRule, StyleRuleStyle, StyleRuleThreshold, StyleRuleContext, S
92
94
  export { AnnotationLabel, estimateLabelWidth } from "./charts/shared/AnnotationLabel";
93
95
  export type { AnnotationLabelBackground, AnnotationLabelBackgroundConfig, AnnotationLabelProps } from "./charts/shared/AnnotationLabel";
94
96
  export { smartTickFormat, adaptiveTimeTicks } from "./charts/shared/formatUtils";
97
+ export type { AdaptiveTimeTickOptions, TimeGranularity, } from "./charts/shared/formatUtils";
95
98
  export { darkenColor, lightenColor } from "./charts/shared/colorManipulation";
96
- export type { TooltipProp, TooltipConfig, TooltipField, MultiLineTooltipConfig } from "./Tooltip/Tooltip";
99
+ export type { TooltipProp, TooltipConfig, TooltipField, MultiLineTooltipConfig, MultiTooltipConfig, } from "./Tooltip/Tooltip";
97
100
  export { smartTooltipEntries } from "./charts/shared/tooltipUtils";
98
101
  export type { SmartTooltipEntry, SmartTooltipResult } from "./charts/shared/tooltipUtils";
99
102
  export type { ArrowOfTime, WindowMode, ThresholdType, LineStyle, BarStyle, WaterfallStyle, SwarmStyle, AnnotationContext, AnnotationAnchorMode, CrosshairStyle, HoverAnnotationConfig, HoverData } from "./realtime/types";
@@ -1,6 +1,7 @@
1
1
  import type { Datum } from "../charts/shared/datumTypes";
2
2
  import type { LegendLayout } from "../types/legendTypes";
3
3
  import type { StreamXYFrameProps, StreamScales, StreamLayout } from "../stream/types";
4
+ import type { XYFrameAxisConfig } from "../stream/xyFrameAxisTypes";
4
5
  import type { StreamNetworkFrameProps, RealtimeEdge } from "../stream/networkTypes";
5
6
  import type { StreamOrdinalFrameProps } from "../stream/ordinalTypes";
6
7
  import type { StreamGeoFrameProps } from "../stream/geoTypes";
@@ -148,7 +149,7 @@ export declare function renderFrameLegend(options: {
148
149
  }): React.ReactNode;
149
150
  export declare function defaultTickFormat(v: number): string;
150
151
  /** Render grid lines for XY charts */
151
- export declare function renderGridSVG(scales: StreamScales, layout: StreamLayout, theme: SemioticTheme, idPrefix?: string, axisExtent?: AxisExtentMode): React.ReactNode;
152
+ export declare function renderGridSVG(scales: StreamScales, layout: StreamLayout, theme: SemioticTheme, idPrefix?: string, axisExtent?: AxisExtentMode, axes?: XYFrameAxisConfig[]): React.ReactNode;
152
153
  /** Render grid lines for ordinal charts */
153
154
  export declare function renderOrdinalGridSVG(store: OrdinalPipelineStore, layout: {
154
155
  width: number;
@@ -4,3 +4,5 @@ export interface StoreProviderProps<T> {
4
4
  initialState?: Partial<T>;
5
5
  }
6
6
  export declare function createStore<T>(fn: (set: (updater: (current: T) => Partial<T>) => void) => T): [React.FC<StoreProviderProps<T>>, <R>(selector: (state: T) => R, equalityFn?: (a: R, b: R) => boolean) => R];
7
+ /** True if `value` has at least one of its own enumerable keys. */
8
+ export declare function hasOwnEnumerableKey(value: object): boolean;
@@ -36,6 +36,7 @@ export interface TileRenderOptions {
36
36
  height: number;
37
37
  tileCache: TileCache;
38
38
  onTileLoad?: () => void;
39
+ maxDevicePixelRatio?: number;
39
40
  }
40
41
  /**
41
42
  * Render visible tiles onto a canvas context.
@@ -166,6 +166,9 @@ export declare class OrdinalPipelineStore implements UpdateResultStore {
166
166
  * for the full rationale — Stream Frames call this when they detect
167
167
  * SSR hydration so the canvas takeover doesn't re-animate from blank
168
168
  * after the server already painted the chart.
169
+ *
170
+ * Snaps point/rect/wedge geometry + opacity targets so a mid-intro
171
+ * cancel cannot leave marks at partial lerp opacity.
169
172
  */
170
173
  cancelIntroAnimation(): void;
171
174
  /**
@@ -216,6 +216,11 @@ export declare class PipelineStore implements UpdateResultStore {
216
216
  * sets it to 0. Without the clear, line / area charts would paint
217
217
  * blank on the first canvas frame after hydration.
218
218
  *
219
+ * Fill-based marks (point/glyph/rect/heatcell/candlestick) also snap
220
+ * geometry + opacity targets so a mid-intro cancel cannot leave
221
+ * `style.opacity` stuck at a partial lerp value (visible as faded
222
+ * circles after tab-away / SSR swap).
223
+ *
219
224
  * Idempotent — a second call is a no-op since the maps are already
220
225
  * empty and the per-node flags are already undefined.
221
226
  */
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../charts/shared/datumTypes";
1
2
  /**
2
3
  * Compare two accessor specs for equivalence, using **identity** semantics.
3
4
  * - String accessors: compared by value (`"value" === "value"`).
@@ -29,3 +30,23 @@ export type CoercibleNumber = number | Date | string;
29
30
  export declare function resolveAccessor<T extends Record<string, unknown>>(accessor: string | ((d: T) => CoercibleNumber) | undefined, fallback: string): (d: T) => number;
30
31
  export declare function resolveRawAccessor<T extends Record<string, unknown>, TResult>(accessor: string | ((d: T) => TResult) | undefined, fallback: string): (d: T) => TResult;
31
32
  export declare function resolveStringAccessor<T extends Record<string, unknown>>(accessor: string | ((d: T) => string) | undefined, fallback?: string): ((d: T) => string) | undefined;
33
+ /**
34
+ * Resolve a `nodeLabel` accessor (string key or function) into a label
35
+ * function, or `null` when unset — the network layout plugins' shared
36
+ * convention for "no label configured" (as opposed to `resolveStringAccessor`'s
37
+ * `undefined`). A string accessor falls back to `d.id` when the field is
38
+ * missing/empty. Shared by the chord/force/sankey layout plugins; hierarchy
39
+ * layouts use their own `resolveLabelFn` in `layouts/hierarchyUtils.ts`
40
+ * instead, since a hierarchy scene node nests the original datum under
41
+ * `.data` and must unwrap it before calling a user accessor.
42
+ */
43
+ export declare function resolveLabelFn(nodeLabel: string | ((d: Datum) => string) | undefined): ((d: Datum) => string) | null;
44
+ /**
45
+ * Resolve a d3-force-style edge endpoint (`source`/`target`) to its node id.
46
+ * Before a force/sankey/chord simulation resolves string ids into node
47
+ * object references, an edge endpoint is `string | { id: string }`; this
48
+ * reads the id either way. Shared by the chord/force/sankey layout plugins.
49
+ */
50
+ export declare function resolveNodeRefId(ref: string | {
51
+ id: string;
52
+ }): string;
@@ -22,8 +22,19 @@ export interface CanvasMargin {
22
22
  export declare function prepareCanvas(canvas: HTMLCanvasElement, size: [number, number], margin: CanvasMargin, dpr: number): CanvasRenderingContext2D | null;
23
23
  /**
24
24
  * Get the effective canvas devicePixelRatio, defaulting to 1 in non-browser
25
- * environments. Mobile/coarse-pointer screens are capped at 2x to avoid
26
- * allocating very large backing stores on high-density phones; desktop stays
27
- * crisper but still caps pathological DPR values at 3x.
25
+ * environments. By default, mobile/coarse-pointer screens are capped at 2x to
26
+ * avoid allocating very large backing stores on high-density phones and
27
+ * desktop is capped at 3x. `maxDevicePixelRatio` overrides that ceiling.
28
28
  */
29
- export declare function getDevicePixelRatio(): number;
29
+ export declare function getDevicePixelRatio(maxDevicePixelRatio?: number): number;
30
+ /**
31
+ * Subscribe to browser pixel-density changes (page zoom, display migration,
32
+ * or OS display-scale changes). A normal ResizeObserver is insufficient:
33
+ * browsers can update `devicePixelRatio` without changing an element's CSS
34
+ * dimensions.
35
+ *
36
+ * The media query is re-created after every change because it watches the
37
+ * *current* resolution. Once that query stops matching, the next query must
38
+ * be armed for the browser's new DPR.
39
+ */
40
+ export declare function subscribeToDevicePixelRatioChange(listener: () => void): () => void;
@@ -18,8 +18,9 @@ interface KeyboardInteractionParams<Store, Node = unknown> {
18
18
  hoverRef: RefValue<HoverData | null>;
19
19
  hoveredNodeRef?: RefValue<Node | null>;
20
20
  setHoverPoint: SetHoverPoint;
21
- customHoverBehavior: SemanticHoverBehavior<HoverData>;
22
- customClickBehavior: SemanticClickBehavior<HoverData>;
21
+ /** Optional — absent when neither a user callback nor onObservation is wired. */
22
+ customHoverBehavior?: SemanticHoverBehavior<HoverData>;
23
+ customClickBehavior?: SemanticClickBehavior<HoverData>;
23
24
  scheduleRender: () => void;
24
25
  }
25
26
  export declare function useXYKeyboardNavigation(params: KeyboardInteractionParams<PipelineStore, SceneNode>): {
@@ -205,6 +205,8 @@ export interface StreamGeoFrameProps<T = Datum> {
205
205
  };
206
206
  className?: string;
207
207
  background?: string;
208
+ /** Maximum canvas backing-store DPR; defaults to the environment cap. */
209
+ maxDevicePixelRatio?: number;
208
210
  runtimeMode?: "bounded" | "streaming";
209
211
  /** Maximum retained points and lines after imperative streaming begins. @default 500 */
210
212
  windowSize?: number;
@@ -34,20 +34,15 @@ export declare function createFrameForceWorkerRequest(nodes: RealtimeNode[], edg
34
34
  y: number;
35
35
  }> | null): FrameForceWorkerRequest;
36
36
  /**
37
- * Long-lived force-layout worker session. Mirrors PhysicsWorkerSession:
38
- * one Worker is reused across layouts so module parse + startup cost is
39
- * paid once per page, not once per graph re-layout.
37
+ * Long-lived force-layout worker session. Built on {@link ModuleWorkerSession}
38
+ * so request-id / abort / terminate plumbing is shared with ProcessSankey.
40
39
  */
41
40
  export declare class ForceLayoutWorkerSession {
42
- private nextRequestId;
43
- private pending;
44
- private worker;
45
- private dead;
41
+ private readonly session;
46
42
  constructor(worker?: Worker);
47
43
  get isDead(): boolean;
48
44
  request(request: ForceWorkerRequest, signal?: AbortSignal): Promise<ForceWorkerResponse>;
49
45
  terminate(): void;
50
- private rejectAll;
51
46
  }
52
47
  /** Test helper: drop the shared session so the next call creates a fresh Worker. */
53
48
  export declare function _resetSharedForceLayoutSessionForTest(): void;
@@ -7,6 +7,6 @@ import { orbitLayoutPlugin } from "./orbitLayoutPlugin";
7
7
  /**
8
8
  * Registry mapping network chart types to their layout plugins.
9
9
  */
10
- export declare const networkLayoutRegistry: Record<string, NetworkLayoutPlugin>;
10
+ export declare const networkLayoutRegistry: Record<NetworkChartType, NetworkLayoutPlugin>;
11
11
  export declare function getLayoutPlugin(chartType: NetworkChartType): NetworkLayoutPlugin | undefined;
12
12
  export { sankeyLayoutPlugin, forceLayoutPlugin, chordLayoutPlugin, hierarchyLayoutPlugin, orbitLayoutPlugin };
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Shared long-lived module-worker session for layout offload (force, ProcessSankey).
3
+ *
4
+ * One Worker is reused across requests so module parse + startup is paid once
5
+ * per page. Callers supply wire parse / createWorker; this owns request ids,
6
+ * abort wiring, and terminate/reject-all lifecycle.
7
+ */
8
+ export interface ModuleWorkerErrorPayload {
9
+ message: string;
10
+ name?: string;
11
+ stack?: string;
12
+ }
13
+ export type ParsedModuleWorkerMessage<TResponse> = {
14
+ requestId?: number;
15
+ ok: true;
16
+ payload: TResponse;
17
+ } | {
18
+ requestId?: number;
19
+ ok: false;
20
+ error: Error;
21
+ };
22
+ export interface ModuleWorkerSessionOptions<TRequest, TResponse> {
23
+ /** Human-readable worker name (AbortError / terminate messages). */
24
+ name: string;
25
+ createWorker: () => Worker;
26
+ /**
27
+ * Map an `onmessage` payload into a success/error result.
28
+ * `requestId` may be omitted for one-shot workers (oldest pending wins).
29
+ */
30
+ parseMessage: (data: unknown) => ParsedModuleWorkerMessage<TResponse>;
31
+ /**
32
+ * Wrap a domain request for `postMessage`. Default: `{ requestId, request }`.
33
+ */
34
+ encodeRequest?: (requestId: number, request: TRequest) => unknown;
35
+ }
36
+ declare function errorFromPayload(payload: ModuleWorkerErrorPayload): Error;
37
+ /**
38
+ * Build a standard `{ requestId?, ok, error|payload }` parser for wire
39
+ * responses that carry an optional `error` object and free-form success fields.
40
+ */
41
+ export declare function parseModuleWorkerErrorField(data: unknown): {
42
+ requestId?: number;
43
+ error?: ModuleWorkerErrorPayload;
44
+ };
45
+ export { errorFromPayload as moduleWorkerErrorFromPayload };
46
+ export declare class ModuleWorkerSession<TRequest, TResponse> {
47
+ private nextRequestId;
48
+ private pending;
49
+ private worker;
50
+ private dead;
51
+ private readonly options;
52
+ constructor(options: ModuleWorkerSessionOptions<TRequest, TResponse>);
53
+ get isDead(): boolean;
54
+ request(request: TRequest, signal?: AbortSignal): Promise<TResponse>;
55
+ terminate(): void;
56
+ private rejectAll;
57
+ }
58
+ /**
59
+ * Lazy singleton holder for a session class that exposes `isDead` + `terminate`.
60
+ */
61
+ export declare function createSharedWorkerSessionHolder<TSession extends {
62
+ isDead: boolean;
63
+ terminate(): void;
64
+ }>(create: () => TSession): {
65
+ get: () => TSession;
66
+ resetForTest: () => void;
67
+ };
@@ -12,12 +12,20 @@ export interface NetworkFramePaintContext {
12
12
  adjustedWidth: number;
13
13
  adjustedHeight: number;
14
14
  background?: string;
15
+ maxDevicePixelRatio?: number;
15
16
  renderMode?: SceneRenderMode<NetworkSceneNode | NetworkSceneEdge>;
16
17
  /** Skip opaque canvas fill when an SVG backgroundGraphics layer is present. */
17
18
  hasBackgroundGraphics?: boolean;
18
19
  dirtyRef: {
19
20
  current: boolean;
20
21
  };
22
+ /**
23
+ * Browser zoom / maxDevicePixelRatio — re-rasterize only, do not rebuild
24
+ * the network scene. Cleared by this paint function after consumption.
25
+ */
26
+ resolutionDirtyRef?: {
27
+ current: boolean;
28
+ };
21
29
  lastFrameTimeRef: {
22
30
  current: number;
23
31
  };
@@ -358,6 +358,8 @@ export interface NetworkBezierEdge {
358
358
  _gradient?: {
359
359
  x0: number;
360
360
  x1: number;
361
+ y0?: number;
362
+ y1?: number;
361
363
  from: number;
362
364
  to: number;
363
365
  };
@@ -616,6 +618,8 @@ export interface StreamNetworkFrameProps<T = Datum> extends StreamNetworkInterac
616
618
  };
617
619
  className?: string;
618
620
  background?: string;
621
+ /** Maximum canvas backing-store DPR; defaults to the environment cap. */
622
+ maxDevicePixelRatio?: number;
619
623
  legend?: LegendValue;
620
624
  legendPosition?: "right" | "left" | "top" | "bottom";
621
625
  legendLayout?: LegendLayout;
@@ -2,4 +2,5 @@
2
2
  * chartType → pure scene builder dispatch for OrdinalPipelineStore.
3
3
  */
4
4
  import type { SceneBuilderFn } from "./types";
5
- export declare const ORDINAL_SCENE_BUILDERS: Record<string, SceneBuilderFn>;
5
+ import type { OrdinalChartType } from "../ordinalTypes";
6
+ export declare const ORDINAL_SCENE_BUILDERS: Partial<Record<OrdinalChartType, SceneBuilderFn>>;
@@ -326,6 +326,8 @@ export interface StreamOrdinalFrameProps<T = Datum> {
326
326
  bottom?: number;
327
327
  left?: number;
328
328
  };
329
+ /** Maximum canvas backing-store DPR; defaults to the environment cap. */
330
+ maxDevicePixelRatio?: number;
329
331
  barPadding?: number;
330
332
  roundedTop?: number;
331
333
  /** Gradient fill for bar rects. Offset 0 is the tip; offset 1 is the base. */
@@ -153,6 +153,15 @@ export interface PhysicsKernelSnapshot {
153
153
  springs: PhysicsKernelSnapshotSpring[];
154
154
  activeSensors: string[];
155
155
  }
156
+ /** Read a dot-separated property path off an arbitrary value. Shared across physics controllers. */
157
+ export declare function valueAtPath(source: unknown, path: string): unknown;
158
+ /**
159
+ * Test whether a body matches a `PhysicsColliderBodyFilter` — a predicate
160
+ * function or a declarative equals/notEquals/oneOf/notOneOf spec. Shared by
161
+ * collider/sensor permeability here and by the capacity-queue and
162
+ * service-operations controllers' own `bodyFilter` options.
163
+ */
164
+ export declare function matchesPhysicsBodyFilter(body: PhysicsBodyState, filter: PhysicsColliderBodyFilter | undefined): boolean;
156
165
  export declare class PhysicsKernelWorld {
157
166
  readonly capabilities: {
158
167
  determinism: "strict";
@@ -171,6 +171,8 @@ export interface StreamPhysicsFrameProps {
171
171
  * to composite over siblings (same contract as StreamXYFrame).
172
172
  */
173
173
  background?: string;
174
+ /** Maximum canvas backing-store DPR; defaults to the environment cap. */
175
+ maxDevicePixelRatio?: number;
174
176
  backgroundGraphics?: FrameGraphicsProp;
175
177
  /**
176
178
  * Optional rAF seam for deterministic frame-loop scheduling in tests.
@@ -25,6 +25,8 @@ export interface PipelineConfig {
25
25
  * read as the actual data bounds. Default `"nice"` keeps the existing
26
26
  * padded domain so glyphs at the extremes don't clip the plot edge. */
27
27
  axisExtent?: import("../charts/shared/axisExtent").AxisExtentMode;
28
+ /** Resolved y-axis mode. Falls back to `axisExtent` when omitted. */
29
+ yAxisExtent?: import("../charts/shared/axisExtent").AxisExtentMode;
28
30
  /**
29
31
  * Hard cap for `windowMode: "growing"`. Defaults to
30
32
  * {@link DEFAULT_GROWING_MAX_CAPACITY} (100_000). Canvas scene graphs
@@ -20,7 +20,7 @@ export declare function isFullySpecifiedExtent(extent: [number | undefined, numb
20
20
  * normalized). Mirrors buildStackedAreaNodes order for wiggle offsets.
21
21
  */
22
22
  export declare function resolveStackedAreaYDomain(options: {
23
- config: Pick<PipelineConfig, "normalize" | "baseline" | "stackOrder" | "extentPadding" | "axisExtent">;
23
+ config: Pick<PipelineConfig, "normalize" | "baseline" | "stackOrder" | "extentPadding" | "axisExtent" | "yAxisExtent">;
24
24
  groups: {
25
25
  key: string;
26
26
  data: Datum[];
@@ -0,0 +1,6 @@
1
+ import type { OrdinalSceneNode } from "./ordinalTypes";
2
+ import type { SceneNode } from "./types";
3
+ /** Restore XY marks to their authored target state after an intro is cancelled. */
4
+ export declare function snapXYIntroTargets(scene: SceneNode[]): void;
5
+ /** Restore ordinal marks to their authored target state after an intro is cancelled. */
6
+ export declare function snapOrdinalIntroTargets(scene: OrdinalSceneNode[]): void;
@@ -10,7 +10,7 @@
10
10
  * Dependencies: pipelineTransitionUtils (lerp, easing, ActiveTransition)
11
11
  * Consumed by: PipelineStore.computeScene (after decay/pulse)
12
12
  */
13
- import type { SceneNode, TransitionConfig } from "./types";
13
+ import type { SceneNode, TransitionConfig, Style } from "./types";
14
14
  import type { GlyphDef } from "./glyphDef";
15
15
  import type { ActiveTransition } from "./pipelineTransitionUtils";
16
16
  import type { Datum } from "../charts/shared/datumTypes";
@@ -51,6 +51,20 @@ export interface TransitionContext {
51
51
  * `_transitionKey` keeps exits stable across overlapping transitions.
52
52
  */
53
53
  export declare function getNodeIdentity(ctx: TransitionContext, node: SceneNode, index: number): string | null;
54
+ /**
55
+ * Effective paint alpha for fill-based marks.
56
+ *
57
+ * Matches the canvas renderer convention (`style.opacity ?? style.fillOpacity ?? 1`)
58
+ * used by points, glyphs, rects, heatcells, and candlesticks. Intro/update
59
+ * transitions must target this same value — otherwise a mark authored with
60
+ * only `fillOpacity: 0.7` animates toward 1, bakes `style.opacity = 1` on
61
+ * completion, and then "fades" back to 0.7 on the next dirty rebuild
62
+ * (e.g. tab-away → tab-back via FrameRuntime visibility resume).
63
+ *
64
+ * Line/area marks keep stroke alpha on `style.opacity` alone; their under-
65
+ * path fill uses `fillOpacity` independently and is not covered here.
66
+ */
67
+ export declare function resolveMarkOpacity(style?: Style | null): number;
54
68
  /**
55
69
  * Snapshot current scene node positions before rebuild.
56
70
  */