semiotic 3.8.2 → 3.8.4

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 (195) hide show
  1. package/CLAUDE.md +9 -9
  2. package/README.md +42 -40
  3. package/ai/examples.md +1 -1
  4. package/ai/schema.json +2726 -300
  5. package/ai/surface-manifest.json +1 -1
  6. package/ai/system-prompt.md +1 -1
  7. package/dist/chunk-chunk-2JGJ5GUG.module.min.js +0 -1
  8. package/dist/chunk-chunk-3ILKBVVQ.module.min.js +1 -0
  9. package/dist/{chunk-chunk-NO4MCQVD.module.min.js → chunk-chunk-5RKXZQ2P.module.min.js} +1 -1
  10. package/dist/{chunk-chunk-CYIML3AV.module.min.js → chunk-chunk-6TPGFL7M.module.min.js} +1 -1
  11. package/dist/{chunk-chunk-VVCA3DB7.module.min.js → chunk-chunk-7ALTGHK6.module.min.js} +1 -1
  12. package/dist/chunk-chunk-7KZJUTKP.module.min.js +2 -0
  13. package/dist/chunk-chunk-7RYBCTK5.module.min.js +1 -0
  14. package/dist/chunk-chunk-ACLDBMRH.module.min.js +2 -0
  15. package/dist/chunk-chunk-ANYDWOZF.module.min.js +1 -0
  16. package/dist/{chunk-chunk-ZLKRTF5N.module.min.js → chunk-chunk-AQPQN2HH.module.min.js} +1 -1
  17. package/dist/chunk-chunk-ASKSE5F5.module.min.js +1 -0
  18. package/dist/chunk-chunk-AVBI6GDT.module.min.js +1 -0
  19. package/dist/chunk-chunk-B3DRZPBK.module.min.js +2 -0
  20. package/dist/chunk-chunk-BFHUYEOS.module.min.js +2 -0
  21. package/dist/chunk-chunk-C4YA6TDR.module.min.js +1 -0
  22. package/dist/chunk-chunk-C57LR3YG.module.min.js +1 -0
  23. package/dist/chunk-chunk-EMO5NUGE.module.min.js +1 -0
  24. package/dist/chunk-chunk-F5V4UIE6.module.min.js +2 -0
  25. package/dist/chunk-chunk-F7WFPD4O.module.min.js +2 -0
  26. package/dist/chunk-chunk-FBGHXL72.module.min.js +2 -0
  27. package/dist/chunk-chunk-FP44FHFO.module.min.js +2 -0
  28. package/dist/chunk-chunk-HKXUAEPJ.module.min.js +2 -0
  29. package/dist/chunk-chunk-ICEXPNDC.module.min.js +2 -0
  30. package/dist/chunk-chunk-IY7RYD4S.module.min.js +1 -0
  31. package/dist/{chunk-chunk-7LHMKRKE.module.min.js → chunk-chunk-JDXT6ORT.module.min.js} +1 -1
  32. package/dist/chunk-chunk-JMVEIZXP.module.min.js +1 -0
  33. package/dist/chunk-chunk-KHCOJMGK.module.min.js +1 -0
  34. package/dist/chunk-chunk-KQ546MKE.module.min.js +2 -0
  35. package/dist/chunk-chunk-LQBSXO7K.module.min.js +2 -0
  36. package/dist/chunk-chunk-LRIFN2HK.module.min.js +1 -0
  37. package/dist/chunk-chunk-MFHF4J2Z.module.min.js +1 -0
  38. package/dist/chunk-chunk-N6VKKF3A.module.min.js +2 -0
  39. package/dist/chunk-chunk-NEVE562N.module.min.js +1 -0
  40. package/dist/chunk-chunk-NKZ75IM5.module.min.js +2 -0
  41. package/dist/chunk-chunk-PLIDPQNG.module.min.js +2 -0
  42. package/dist/{chunk-chunk-FYY2ACNJ.module.min.js → chunk-chunk-PRDGLMJT.module.min.js} +1 -1
  43. package/dist/chunk-chunk-QGZGZI4X.module.min.js +1 -0
  44. package/dist/chunk-chunk-RP7WTID5.module.min.js +1 -0
  45. package/dist/chunk-chunk-S7KLNUO6.module.min.js +1 -0
  46. package/dist/chunk-chunk-SR4ZXOWR.module.min.js +2 -0
  47. package/dist/chunk-chunk-ZOAQDIJO.module.min.js +1 -0
  48. package/dist/chunk-minimapBrushOverlay-JU57U7NM.module.min.js +2 -0
  49. package/dist/chunk-scatterplotMatrixBrushOverlay-SDIZSN66.module.min.js +2 -0
  50. package/dist/chunk-statisticalOverlays-QGDLRUHX.module.min.js +1 -0
  51. package/dist/chunk-statisticalOverlays-T77OKLDY.module.min.js +1 -0
  52. package/dist/components/ChartContainer.d.ts +2 -2
  53. package/dist/components/ai/chartCapabilityTypes.d.ts +5 -0
  54. package/dist/components/charts/custom/XYCustomChart.d.ts +3 -0
  55. package/dist/components/charts/geo/ChoroplethMap.d.ts +2 -0
  56. package/dist/components/charts/geo/DistanceCartogram.d.ts +7 -3
  57. package/dist/components/charts/geo/FlowMap.d.ts +4 -0
  58. package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +3 -1
  59. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +6 -1
  60. package/dist/components/charts/physics/GaltonBoardChart.d.ts +6 -1
  61. package/dist/components/charts/physics/gauntletChartProps.d.ts +7 -1
  62. package/dist/components/charts/physics/gauntletChrome.d.ts +2 -1
  63. package/dist/components/charts/physics/gauntletPhysics.d.ts +19 -4
  64. package/dist/components/charts/physics/gauntletRuntime.d.ts +3 -0
  65. package/dist/components/charts/physics/physicsHocUtils.d.ts +12 -0
  66. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +5 -6
  67. package/dist/components/charts/realtime/temporalHistogramConfig.d.ts +11 -0
  68. package/dist/components/charts/shared/areaSeriesData.d.ts +15 -0
  69. package/dist/components/charts/shared/chartMode.d.ts +75 -0
  70. package/dist/components/charts/shared/chartSpecCore.d.ts +2 -2
  71. package/dist/components/charts/shared/colorUtils.d.ts +8 -0
  72. package/dist/components/charts/shared/geoStyleDefaults.d.ts +3 -0
  73. package/dist/components/charts/shared/hatchPattern.d.ts +8 -3
  74. package/dist/components/charts/shared/hooks.d.ts +13 -80
  75. package/dist/components/charts/shared/lineSeriesSsr.d.ts +55 -0
  76. package/dist/components/charts/shared/types.d.ts +2 -2
  77. package/dist/components/charts/shared/useChartSetup.d.ts +3 -0
  78. package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
  79. package/dist/components/charts/shared/useXYLineStyle.d.ts +3 -2
  80. package/dist/components/charts/shared/validateProps.d.ts +1 -1
  81. package/dist/components/charts/shared/xyLineStyle.d.ts +21 -0
  82. package/dist/components/charts/xy/AreaChart.d.ts +10 -0
  83. package/dist/components/charts/xy/LineChart.d.ts +3 -0
  84. package/dist/components/charts/xy/minimapBrushOverlay.d.ts +17 -0
  85. package/dist/components/charts/xy/minimapBrushOverlayLazy.d.ts +4 -0
  86. package/dist/components/charts/xy/scatterplotMatrixBrushOverlay.d.ts +8 -0
  87. package/dist/components/charts/xy/scatterplotMatrixBrushOverlayLazy.d.ts +3 -0
  88. package/dist/components/legendLayout.d.ts +31 -0
  89. package/dist/components/realtime/types.d.ts +5 -0
  90. package/dist/components/recipes/gridObservatory.d.ts +176 -0
  91. package/dist/components/recipes/recipeChrome.d.ts +24 -0
  92. package/dist/components/recipes/sequenceLayout.d.ts +139 -0
  93. package/dist/components/semiotic-recipes-core.d.ts +6 -2
  94. package/dist/components/server/serverChartConfigShared.d.ts +29 -0
  95. package/dist/components/server/serverChartConfigs.d.ts +2 -13
  96. package/dist/components/server/serverChartConfigsXY.d.ts +3 -0
  97. package/dist/components/server/serverGaugeOverlay.d.ts +28 -0
  98. package/dist/components/server/staticAnnotations.d.ts +3 -1
  99. package/dist/components/server/staticLegend.d.ts +7 -1
  100. package/dist/components/server/staticSVGChrome.d.ts +57 -0
  101. package/dist/components/stream/GeoPipelineStore.d.ts +2 -0
  102. package/dist/components/stream/GeoSVGOverlay.d.ts +2 -0
  103. package/dist/components/stream/SceneToSVG.d.ts +10 -8
  104. package/dist/components/stream/SceneToSVGGeo.d.ts +10 -0
  105. package/dist/components/stream/SceneToSVGNetwork.d.ts +12 -0
  106. package/dist/components/stream/SceneToSVGOrdinal.d.ts +12 -0
  107. package/dist/components/stream/canvasBackground.d.ts +7 -0
  108. package/dist/components/stream/networkFramePaint.d.ts +2 -0
  109. package/dist/components/stream/networkTypes.d.ts +2 -4
  110. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +18 -2
  111. package/dist/components/stream/physics/physicsBodyCanvas.d.ts +7 -0
  112. package/dist/components/stream/physics/physicsPipelineEviction.d.ts +15 -0
  113. package/dist/components/stream/physics/physicsPipelineObservations.d.ts +1 -1
  114. package/dist/components/stream/physics/physicsPipelineQuiescence.d.ts +20 -0
  115. package/dist/components/stream/renderBackend.d.ts +14 -0
  116. package/dist/components/stream/sceneToSVGShared.d.ts +80 -0
  117. package/dist/components/stream/types.d.ts +4 -0
  118. package/dist/components/stream/useHydration.d.ts +7 -1
  119. package/dist/components/stream/xySceneBuilders/candlestickScene.d.ts +1 -1
  120. package/dist/components/types/legendTypes.d.ts +16 -3
  121. package/dist/forceLayoutWorker.js +1 -1
  122. package/dist/geo.min.js +1 -1
  123. package/dist/geo.module.min.js +1 -1
  124. package/dist/network.min.js +1 -1
  125. package/dist/network.module.min.js +1 -1
  126. package/dist/ordinal.min.js +1 -1
  127. package/dist/ordinal.module.min.js +1 -1
  128. package/dist/physics.min.js +1 -1
  129. package/dist/physics.module.min.js +1 -1
  130. package/dist/physicsWorker.js +1 -1
  131. package/dist/realtime.min.js +1 -1
  132. package/dist/realtime.module.min.js +1 -1
  133. package/dist/rough.min.js +1 -1
  134. package/dist/rough.module.min.js +1 -1
  135. package/dist/semiotic-ai-core.min.js +1 -1
  136. package/dist/semiotic-ai-core.module.min.js +1 -1
  137. package/dist/semiotic-ai.min.js +1 -1
  138. package/dist/semiotic-ai.module.min.js +1 -1
  139. package/dist/semiotic-experimental.min.js +1 -1
  140. package/dist/semiotic-experimental.module.min.js +1 -1
  141. package/dist/semiotic-realtime-core.min.js +1 -1
  142. package/dist/semiotic-realtime-core.module.min.js +1 -1
  143. package/dist/semiotic-recipes-core.d.ts +6 -2
  144. package/dist/semiotic-recipes-core.min.js +1 -1
  145. package/dist/semiotic-recipes-core.module.min.js +1 -1
  146. package/dist/semiotic-recipes.min.js +1 -1
  147. package/dist/semiotic-recipes.module.min.js +1 -1
  148. package/dist/semiotic-server-edge.min.js +1 -1
  149. package/dist/semiotic-server-edge.module.min.js +1 -1
  150. package/dist/semiotic-server-node.min.js +1 -1
  151. package/dist/semiotic-server-node.module.min.js +1 -1
  152. package/dist/semiotic-utils-core.min.js +1 -1
  153. package/dist/semiotic-utils-core.module.min.js +1 -1
  154. package/dist/semiotic-utils.min.js +1 -1
  155. package/dist/semiotic-utils.module.min.js +1 -1
  156. package/dist/semiotic-value.module.min.js +1 -1
  157. package/dist/semiotic.min.js +1 -1
  158. package/dist/semiotic.module.min.js +1 -1
  159. package/dist/server.min.js +1 -1
  160. package/dist/server.module.min.js +1 -1
  161. package/dist/xy.min.js +1 -1
  162. package/dist/xy.module.min.js +1 -1
  163. package/package.json +3 -2
  164. package/dist/chunk-chunk-255KDHW5.module.min.js +0 -1
  165. package/dist/chunk-chunk-27HVVXS6.module.min.js +0 -1
  166. package/dist/chunk-chunk-2UN3ANRN.module.min.js +0 -2
  167. package/dist/chunk-chunk-2VUEY5TH.module.min.js +0 -1
  168. package/dist/chunk-chunk-2WVCH4PL.module.min.js +0 -1
  169. package/dist/chunk-chunk-5WEFWNUW.module.min.js +0 -2
  170. package/dist/chunk-chunk-6F6GEAQU.module.min.js +0 -1
  171. package/dist/chunk-chunk-BHYTYMY2.module.min.js +0 -2
  172. package/dist/chunk-chunk-C6EJ4IOD.module.min.js +0 -2
  173. package/dist/chunk-chunk-CP3EN6KZ.module.min.js +0 -1
  174. package/dist/chunk-chunk-DNY43POY.module.min.js +0 -1
  175. package/dist/chunk-chunk-E7MIQX7D.module.min.js +0 -2
  176. package/dist/chunk-chunk-ES4DCG3L.module.min.js +0 -1
  177. package/dist/chunk-chunk-FAKO3RGQ.module.min.js +0 -2
  178. package/dist/chunk-chunk-H4PPRW6N.module.min.js +0 -1
  179. package/dist/chunk-chunk-IFYPMWKY.module.min.js +0 -1
  180. package/dist/chunk-chunk-J3ELI22J.module.min.js +0 -1
  181. package/dist/chunk-chunk-L6D3I3V7.module.min.js +0 -2
  182. package/dist/chunk-chunk-M337NY6L.module.min.js +0 -1
  183. package/dist/chunk-chunk-ODUZEEBH.module.min.js +0 -2
  184. package/dist/chunk-chunk-P6UBCMSQ.module.min.js +0 -2
  185. package/dist/chunk-chunk-QRIBHZYW.module.min.js +0 -1
  186. package/dist/chunk-chunk-RH5TSQPH.module.min.js +0 -1
  187. package/dist/chunk-chunk-STZFFTAN.module.min.js +0 -2
  188. package/dist/chunk-chunk-T27ZEV6A.module.min.js +0 -1
  189. package/dist/chunk-chunk-U3AGQ5EF.module.min.js +0 -2
  190. package/dist/chunk-chunk-W3DB2MN4.module.min.js +0 -2
  191. package/dist/chunk-chunk-WDIN4LRC.module.min.js +0 -1
  192. package/dist/chunk-chunk-XOYX77KF.module.min.js +0 -2
  193. package/dist/chunk-chunk-Z5KXAVQD.module.min.js +0 -2
  194. package/dist/chunk-chunk-ZCNBUZPL.module.min.js +0 -2
  195. package/dist/chunk-chunk-ZTNVDWAK.module.min.js +0 -2
@@ -14,6 +14,16 @@ export interface SemanticGradientStop {
14
14
  /** Optional opacity applied to this stop. */
15
15
  opacity?: number;
16
16
  }
17
+ /**
18
+ * Convert value-anchored `semanticGradient` stops (`{ at, color }` on the value
19
+ * scale, 0–100) into the frame's `gradientFill.colorStops` (offset 0 = top).
20
+ * Exported so the server (`renderChart`) config resolves it identically to this
21
+ * HOC — otherwise SSR silently drops `semanticGradient` and paints a flat area.
22
+ */
23
+ export declare function semanticGradientToColorStops(stops: SemanticGradientStop[]): Array<{
24
+ offset: number;
25
+ color: string;
26
+ }>;
17
27
  /**
18
28
  * AreaChart component props
19
29
  */
@@ -7,6 +7,7 @@ import type { BaseChartProps, AxisConfig, ChartAccessor } from "../shared/types"
7
7
  import { type TooltipProp } from "../../Tooltip/Tooltip";
8
8
  import { type StyleRule } from "../shared/styleRules";
9
9
  import type { AnomalyConfig, ForecastConfig } from "../shared/statisticalOverlays";
10
+ import type { LegendValue } from "../../types/legendTypes";
10
11
  /**
11
12
  * LineChart component props
12
13
  */
@@ -153,6 +154,8 @@ export interface LineChartProps<TDatum extends Datum = Datum> extends BaseChartP
153
154
  * @default "right"
154
155
  */
155
156
  legendPosition?: "right" | "left" | "top" | "bottom";
157
+ /** Additional legend content. Categorical groups follow the inferred series legend. */
158
+ legend?: LegendValue;
156
159
  /**
157
160
  * Tooltip configuration
158
161
  */
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import type { StreamScales } from "../../stream/types";
3
+ export interface MinimapBrushOverlayProps {
4
+ width: number;
5
+ height: number;
6
+ margin: {
7
+ top: number;
8
+ right: number;
9
+ bottom: number;
10
+ left: number;
11
+ };
12
+ scales: StreamScales | null;
13
+ brushDirection: "x" | "y";
14
+ extent: [number, number] | null;
15
+ onBrush: (extent: [number, number] | null) => void;
16
+ }
17
+ export declare function MinimapBrushOverlay({ width, height, margin, scales, brushDirection, extent, onBrush, }: MinimapBrushOverlayProps): React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { MinimapBrushOverlayProps } from "./minimapBrushOverlay";
3
+ /** Renders nothing until d3-brush module resolves, then mounts the brush. */
4
+ export declare function MinimapBrushOverlayLazy(props: MinimapBrushOverlayProps): React.JSX.Element | null;
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import type { StreamXYFrameHandle } from "../../stream/types";
3
+ export interface ScatterplotMatrixBrushOverlayProps {
4
+ frameRef: React.RefObject<StreamXYFrameHandle | null>;
5
+ cellSize: number;
6
+ onBrush: (extent: [number, number][] | null) => void;
7
+ }
8
+ export declare function ScatterplotMatrixBrushOverlay({ frameRef, cellSize, onBrush, }: ScatterplotMatrixBrushOverlayProps): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ import type { ScatterplotMatrixBrushOverlayProps } from "./scatterplotMatrixBrushOverlay";
3
+ export declare function ScatterplotMatrixBrushOverlayLazy(props: ScatterplotMatrixBrushOverlayProps): React.JSX.Element | null;
@@ -0,0 +1,31 @@
1
+ import type { LegendLayout } from "./types/legendTypes";
2
+ export declare const DEFAULT_LEGEND_SWATCH_SIZE = 16;
3
+ export declare const DEFAULT_LEGEND_LABEL_GAP = 6;
4
+ export declare const DEFAULT_LEGEND_ITEM_GAP = 10;
5
+ export declare const DEFAULT_LEGEND_ROW_HEIGHT = 22;
6
+ export interface LegendMetrics {
7
+ swatchSize: number;
8
+ labelGap: number;
9
+ itemGap: number;
10
+ rowHeight: number;
11
+ align: "start" | "center" | "end";
12
+ maxWidth?: number;
13
+ }
14
+ export interface VerticalLegendGroupInput {
15
+ hasLabel: boolean;
16
+ itemCount: number;
17
+ }
18
+ export interface VerticalLegendGroupLayout {
19
+ lineY: number;
20
+ labelY?: number;
21
+ itemsY: number;
22
+ endY: number;
23
+ }
24
+ /** Resolve the dimensions used by both the interactive and static legends. */
25
+ export declare function resolveLegendMetrics(layout?: LegendLayout): LegendMetrics;
26
+ /**
27
+ * Lay out vertical legend groups using the long-standing Legend.tsx geometry.
28
+ * Keeping this calculation renderer-neutral prevents SSR and CSR from drifting
29
+ * when labels, multiple groups, or custom row heights are used.
30
+ */
31
+ export declare function layoutVerticalLegendGroups(groups: VerticalLegendGroupInput[], rowHeight: number): VerticalLegendGroupLayout[];
@@ -191,6 +191,11 @@ export interface RealtimeFrameHandle {
191
191
  remove(id: string | string[]): Datum[];
192
192
  /** Update data by ID in place. Requires an ID accessor. Returns previous values. */
193
193
  update(id: string | string[], updater: (d: Datum) => Datum): Datum[];
194
+ /**
195
+ * Ordinal-only bounded ingest: replace the buffer while preserving category
196
+ * order and enter/move/exit transitions. XY/network/geo typically omit this.
197
+ */
198
+ replace?(data: Datum[]): void;
194
199
  clear(): void;
195
200
  getData(): Datum[];
196
201
  /** Returns the frame's resolved scales, or null if unavailable.
@@ -0,0 +1,176 @@
1
+ /**
2
+ * Pure grid-operations helpers for multi-series power observatories.
3
+ *
4
+ * These turn balancing-authority hourly rows into the chart-ready series used by
5
+ * StackedAreaChart, DifferenceChart, BigNumber, styleRules factories, and
6
+ * provenanced event annotations. They are domain math — not a React kit — so
7
+ * agents and pages can share the same pipeline.
8
+ *
9
+ * Honesty: {@link reserveMarginPct} is a **readability proxy** from public
10
+ * demand / net-generation (+ optional interchange) series. It is *not* an ISO
11
+ * contingency-reserve product. Label it as such in UI and `describeChart` copy.
12
+ */
13
+ import type { StyleRule } from "../charts/shared/styleRules";
14
+ import type { HatchFill } from "../charts/shared/hatchFill";
15
+ /** Stable fuel keys used across regions when present. */
16
+ export declare const GRID_FUEL_KEYS: readonly ["naturalGas", "coal", "nuclear", "hydro", "wind", "solar", "other"];
17
+ export type GridFuelKey = (typeof GRID_FUEL_KEYS)[number];
18
+ /** Human labels for fuel keys (legend / tooltips). */
19
+ export declare const GRID_FUEL_LABELS: Record<GridFuelKey, string>;
20
+ /**
21
+ * One hour (or finest grain) in one balancing authority.
22
+ * Compatible with the strategy schema in docs/strategy/examples-thegrid.md.
23
+ */
24
+ export type GridHour = {
25
+ t: number;
26
+ ba: string;
27
+ demandMw: number;
28
+ forecastMw?: number;
29
+ netGenMw: number;
30
+ interchangeMw?: number;
31
+ fuels: Partial<Record<GridFuelKey, number>>;
32
+ };
33
+ export type ReserveSnapshot = {
34
+ t: number;
35
+ ba: string;
36
+ /** Rough operational headroom proxy — never claim ISO-grade contingency reserve. */
37
+ reserveMarginPct: number;
38
+ netLoadMw: number;
39
+ demandMw: number;
40
+ netGenMw: number;
41
+ };
42
+ export type ReserveLevels = {
43
+ /** Margin below this % is "tight" / danger. Default 5. */
44
+ tight?: number;
45
+ /** Margin below this % is "watch" / warning. Default 12. */
46
+ watch?: number;
47
+ /** Margin at or above this % is comfortable / success. Default 20. */
48
+ comfortable?: number;
49
+ };
50
+ export type FuelStackRow = {
51
+ t: number;
52
+ fuel: GridFuelKey;
53
+ fuelLabel: string;
54
+ mw: number;
55
+ ba: string;
56
+ };
57
+ export type DemandForecastRow = {
58
+ t: number;
59
+ a: number;
60
+ b: number;
61
+ demandMw: number;
62
+ forecastMw: number;
63
+ errorMw: number;
64
+ ba: string;
65
+ };
66
+ export type OperatingPointSummary = {
67
+ t: number;
68
+ ba: string;
69
+ demandMw: number;
70
+ forecastMw: number | null;
71
+ forecastErrorMw: number | null;
72
+ netGenMw: number;
73
+ reserveMarginPct: number;
74
+ topFuel: GridFuelKey | null;
75
+ topFuelShare: number;
76
+ topFuelMw: number;
77
+ fuelShares: Partial<Record<GridFuelKey, number>>;
78
+ };
79
+ export type GridEventWindow = {
80
+ id: string;
81
+ /** Inclusive start epoch ms. */
82
+ start: number;
83
+ /** Inclusive end epoch ms. */
84
+ end: number;
85
+ label: string;
86
+ /** Optional longer note for callouts. */
87
+ note?: string;
88
+ /** "heat-wave" | "outage" | "demand-spike" | open string. */
89
+ kind?: string;
90
+ /** ISO 8601 duration or ms; default "P7D". */
91
+ ttlHint?: string | number;
92
+ y?: number;
93
+ /** Data y for y-threshold style notes. */
94
+ value?: number;
95
+ };
96
+ /**
97
+ * Stackable long-form fuel series for StackedAreaChart (`areaBy: "fuel"`).
98
+ * Zero / missing fuels are omitted so empty keys do not invent area layers.
99
+ */
100
+ export declare function stackFuelSeries(hours: readonly GridHour[], options?: {
101
+ fuels?: readonly GridFuelKey[];
102
+ includeZero?: boolean;
103
+ }): FuelStackRow[];
104
+ /**
105
+ * DifferenceChart rows: series A = demand, series B = forecast.
106
+ * Hours without a finite forecast are skipped.
107
+ */
108
+ export declare function demandForecastRows(hours: readonly GridHour[]): DemandForecastRow[];
109
+ /**
110
+ * Readability proxy for operational headroom.
111
+ *
112
+ * ```
113
+ * reserveMarginPct = ((supply - demand) / demand) * 100
114
+ * supply = capacityOrNetGen + max(0, -interchange) // imports add supply
115
+ * ```
116
+ *
117
+ * When demand is 0, returns 0. Negative values mean demand exceeds supply.
118
+ *
119
+ * **Not** ISO contingency reserve (spinning + non-spinning + regulation).
120
+ * Document that distinction wherever this number is shown.
121
+ */
122
+ export declare function reserveMarginPct(input: {
123
+ demand: number;
124
+ capacityOrNetGen: number;
125
+ interchange?: number;
126
+ }): number;
127
+ /** Per-hour reserve snapshots derived from {@link GridHour} rows. */
128
+ export declare function reserveSeries(hours: readonly GridHour[]): ReserveSnapshot[];
129
+ /**
130
+ * Declarative `styleRules` for marks whose primary value is reserve margin %.
131
+ * Hatch on the tight band so color is not the only encoding.
132
+ *
133
+ * Works on BarChart / DotPlot (ordinal) and LineChart / Scatterplot when the
134
+ * mark value (or `field: "reserveMarginPct"`) is the margin percent.
135
+ */
136
+ export declare function thresholdBandsForReserve(levels?: ReserveLevels, options?: {
137
+ field?: string;
138
+ /** Override hatch for the tight band. */
139
+ tightHatch?: HatchFill;
140
+ tightFill?: string;
141
+ watchFill?: string;
142
+ comfortableFill?: string;
143
+ }): StyleRule[];
144
+ /**
145
+ * Annotation band descriptors for reserve threshold strips (y-band style).
146
+ * Pair with chart `annotations` — not the same object as styleRules.
147
+ */
148
+ export declare function reserveAnnotationBands(levels?: ReserveLevels): Array<{
149
+ type: "band";
150
+ y0: number;
151
+ y1: number;
152
+ label: string;
153
+ color: string;
154
+ fillOpacity: number;
155
+ emphasis: "secondary";
156
+ }>;
157
+ /** Summarize the operating point at `now` (or the last hour ≤ now). */
158
+ export declare function summarizeOperatingPoint(hours: readonly GridHour[], now?: number): OperatingPointSummary | null;
159
+ /**
160
+ * Convert authored event windows into annotation objects with provenance + lifecycle
161
+ * fields suitable for `applyAnnotationLifecycle`.
162
+ *
163
+ * Returns plain annotation dicts (not React nodes). Callers may pass the array to
164
+ * chart `annotations` after lifecycle treatment.
165
+ */
166
+ export declare function gridEventAnnotations(events: readonly GridEventWindow[], options?: {
167
+ now?: number;
168
+ author?: string;
169
+ source?: string;
170
+ }): Array<Record<string, unknown>>;
171
+ /** Pick the top N tightest-margin hours for a ranked risk strip. */
172
+ export declare function tightestHours(reserves: readonly ReserveSnapshot[], n?: number): ReserveSnapshot[];
173
+ /** Format MW with locale grouping; returns "—" for non-finite. */
174
+ export declare function formatMw(value: number, digits?: number): string;
175
+ /** Format reserve margin percent with sign awareness. */
176
+ export declare function formatReservePct(value: number, digits?: number): string;
@@ -44,6 +44,30 @@ export declare function boundsOf(points: ReadonlyArray<{
44
44
  width: number;
45
45
  height: number;
46
46
  } | null;
47
+ /** Axis-aligned box with a top-left origin (chip, card, scene rect). */
48
+ export interface HullBox {
49
+ x: number;
50
+ y: number;
51
+ width: number;
52
+ height: number;
53
+ }
54
+ export type HullPadding = number | {
55
+ x?: number;
56
+ y?: number;
57
+ };
58
+ /**
59
+ * Axis-aligned hull of discrete mark boxes, with optional padding. Use this when
60
+ * marks are chips/cards with known extents (not just points): the result fully
61
+ * surrounds the marks so a stroke drawn *after* the marks reads as a true
62
+ * enclosure (fill under, stroke over). Returns null for an empty set.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * const hull = hullFromBoxes(chips, { x: 12, y: 10 })
67
+ * // overlays: fill rect (under) then marks then stroke-only rect (over)
68
+ * ```
69
+ */
70
+ export declare function hullFromBoxes(boxes: ReadonlyArray<HullBox>, padding?: HullPadding): HullBox | null;
47
71
  export interface BandLabelProps {
48
72
  text: string;
49
73
  x: number;
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Sequence diagram kit — linear spines, span-arc packing, and shared-edge
3
+ * partition helpers for custom charts that treat a row of marks as a baseline
4
+ * (dependency arcs, co-reference, genomic links, alternate-hypothesis overlays).
5
+ *
6
+ * Pure / SSR-safe. Complements {@link packIntervals} (time tracks) and the
7
+ * edge-router kit (network S-curves): here the domain is an ordered index on a
8
+ * baseline and the mark is a vertical-band arc between two anchors.
9
+ */
10
+ export interface SequenceItem {
11
+ /** Stable identity used as the position map key. */
12
+ id: string;
13
+ }
14
+ export interface SequencePosition {
15
+ id: string;
16
+ x: number;
17
+ y: number;
18
+ /** Zero-based order on the baseline. */
19
+ index: number;
20
+ }
21
+ export interface LayoutSequenceOptions {
22
+ width: number;
23
+ y: number;
24
+ /** @default min(74, max(34, width * 0.08)) */
25
+ paddingLeft?: number;
26
+ /** @default min(74, max(34, width * 0.08)) */
27
+ paddingRight?: number;
28
+ }
29
+ /**
30
+ * Place ordered items evenly along a horizontal baseline. Returns a Map keyed
31
+ * by `id` so callers can look up either end of a span arc in O(1).
32
+ */
33
+ export declare function layoutSequence(items: readonly SequenceItem[], options: LayoutSequenceOptions): Map<string, SequencePosition>;
34
+ export interface ChipStripItem extends SequenceItem {
35
+ /** Optional label used by the default width estimator. */
36
+ label?: string;
37
+ }
38
+ export interface LayoutChipStripOptions extends LayoutSequenceOptions {
39
+ /** Gap between chips when packing by content width. @default 8 */
40
+ gap?: number;
41
+ /**
42
+ * When true (default), distribute free horizontal space evenly between chips
43
+ * so the strip still spans the baseline. When false, pack left-to-right.
44
+ */
45
+ distribute?: boolean;
46
+ /** Override per-chip width. Defaults to {@link estimateLabelWidth} of `label`/`id`. */
47
+ estimateWidth?: (item: ChipStripItem, index: number) => number;
48
+ }
49
+ export interface ChipStripPosition extends SequencePosition {
50
+ /** Chip width in px (for hulls / hit targets). */
51
+ width: number;
52
+ }
53
+ /**
54
+ * Place ordered chips along a baseline, sizing each by estimated label width.
55
+ * Prefer {@link layoutSequence} when marks are equal-spaced points rather than
56
+ * variable-width chips.
57
+ */
58
+ export declare function layoutChipStrip(items: readonly ChipStripItem[], options: LayoutChipStripOptions): Map<string, ChipStripPosition>;
59
+ /**
60
+ * Rough text width for chip / arc labels. Matches the heuristic used by the
61
+ * sentence-structure stage and is good enough for layout before paint.
62
+ */
63
+ export declare function estimateLabelWidth(text: unknown, minimum?: number, charWidth?: number, pad?: number): number;
64
+ export interface SpanInterval {
65
+ /** Stable identity for the packed result. */
66
+ id: string;
67
+ /** Inclusive left index on the sequence baseline. */
68
+ a: number;
69
+ /** Inclusive right index on the sequence baseline. */
70
+ b: number;
71
+ }
72
+ export interface PackedSpanLevel<T extends SpanInterval = SpanInterval> {
73
+ span: T;
74
+ /** Zero-based height level (0 = closest to the baseline). */
75
+ level: number;
76
+ }
77
+ export interface PackSpanLevelsResult<T extends SpanInterval = SpanInterval> {
78
+ packed: PackedSpanLevel<T>[];
79
+ /** Number of distinct levels used (`maxLevel + 1`, at least 1). */
80
+ levelCount: number;
81
+ maxLevel: number;
82
+ }
83
+ /**
84
+ * Greedy span packing: assign each interval to the lowest level whose last
85
+ * right edge is already left of this span's left edge. Short spans are packed
86
+ * first so long arcs stack above them — the classic dependency-arc layout.
87
+ *
88
+ * Indices are treated as inclusive; a span with `a === b` is a zero-width hop.
89
+ */
90
+ export declare function packSpanLevels<T extends SpanInterval>(spans: readonly T[]): PackSpanLevelsResult<T>;
91
+ export interface ScaleArcBandOptions {
92
+ /** Y of the sequence baseline (token line). */
93
+ baselineY: number;
94
+ /** Top of the free vertical band arcs may occupy. */
95
+ ceilingY: number;
96
+ /** From {@link packSpanLevels}. */
97
+ levelCount: number;
98
+ /** Vertical room reserved under each peak for a mid-arc label. @default 18 */
99
+ labelRoom?: number;
100
+ }
101
+ export interface ScaleArcBandResult {
102
+ /** Height of the shortest (level 0) arc above the baseline foot. */
103
+ arcLift: number;
104
+ /** Vertical spacing between successive levels. */
105
+ levelStep: number;
106
+ }
107
+ /**
108
+ * Stretch packed arc levels across the free band between `ceilingY` and the
109
+ * baseline so short plots are not a cramped nest under a blank canvas.
110
+ */
111
+ export declare function scaleArcBand(options: ScaleArcBandOptions): ScaleArcBandResult;
112
+ export interface SpanArcPathOptions {
113
+ /**
114
+ * How far above `baselineY` the arc feet attach (keeps arcs off token chips).
115
+ * @default 26
116
+ */
117
+ footLift?: number;
118
+ }
119
+ /**
120
+ * Quadratic span arc between two x-positions on a baseline. Pure path `d`
121
+ * string for SVG overlays / scene edge emission.
122
+ */
123
+ export declare function spanArcPath(x0: number, x1: number, baselineY: number, peakY: number, options?: SpanArcPathOptions): string;
124
+ /**
125
+ * Peak y for a packed span level given band metrics from {@link scaleArcBand}.
126
+ */
127
+ export declare function spanArcPeakY(baselineY: number, level: number, metrics: ScaleArcBandResult): number;
128
+ export type EdgeKeyFn<T> = (edge: T) => string;
129
+ /**
130
+ * Partition several edge lists into the shared intersection (present in every
131
+ * set under `keyOf`) and the per-set exclusive remainder. Used by compare views
132
+ * that paint common topology once and disputed links per hypothesis.
133
+ *
134
+ * Shared edges are taken from the first set (stable identity for paint keys).
135
+ */
136
+ export declare function partitionSharedEdges<T>(edgeSets: readonly (readonly T[])[], keyOf?: EdgeKeyFn<T>): {
137
+ shared: T[];
138
+ exclusive: T[][];
139
+ };
@@ -39,6 +39,8 @@ export { annotationLayout } from "./recipes/annotationLayout";
39
39
  export type { AnnotationLayoutConfig, AnnotationLayoutOptions, AutoPlaceAnnotations, AutoPlaceAnnotationsConfig, AnnotationCohesion, AnnotationAudience, AnnotationMobileConfig, } from "./recipes/annotationLayout";
40
40
  export { annotationDensity, annotationBudget, DEFAULT_AREA_PER_ANNOTATION } from "./recipes/annotationDensity";
41
41
  export type { AnnotationDensityConfig, AnnotationDensityOptions, AnnotationDensityResult, } from "./recipes/annotationDensity";
42
+ export { GRID_FUEL_KEYS, GRID_FUEL_LABELS, stackFuelSeries, demandForecastRows, reserveMarginPct, reserveSeries, thresholdBandsForReserve, reserveAnnotationBands, summarizeOperatingPoint, gridEventAnnotations, tightestHours, formatMw, formatReservePct, } from "./recipes/gridObservatory";
43
+ export type { GridFuelKey, GridHour, ReserveSnapshot, ReserveLevels, FuelStackRow, DemandForecastRow, OperatingPointSummary, GridEventWindow, } from "./recipes/gridObservatory";
42
44
  export { intervalLanesLayout } from "./recipes/intervalLanes";
43
45
  export type { IntervalLanesConfig } from "./recipes/intervalLanes";
44
46
  export { axisFixedForceLayout, axisFixedForcePositions, rectCollide } from "./recipes/axisFixedForce";
@@ -50,6 +52,8 @@ export type { Run, RunOptions } from "./recipes/runs";
50
52
  export { wrapValue, shortestArcDelta, cyclicRangeContains, selectCyclicRange } from "./recipes/cyclical";
51
53
  export { packIntervals, activeCountOverDomain } from "./recipes/intervals";
52
54
  export type { PackedInterval, PackIntervalsResult, PackIntervalsOptions, ActiveCount, ActiveCountOptions, } from "./recipes/intervals";
55
+ export { layoutSequence, layoutChipStrip, estimateLabelWidth, packSpanLevels, scaleArcBand, spanArcPath, spanArcPeakY, partitionSharedEdges, } from "./recipes/sequenceLayout";
56
+ export type { SequenceItem, SequencePosition, LayoutSequenceOptions, ChipStripItem, LayoutChipStripOptions, ChipStripPosition, SpanInterval, PackedSpanLevel, PackSpanLevelsResult, ScaleArcBandOptions, ScaleArcBandResult, SpanArcPathOptions, EdgeKeyFn, } from "./recipes/sequenceLayout";
53
57
  export { polarToXY, xyToAngle, angleScale, radiusScale, ringArcPath, TAU } from "./recipes/radialCoords";
54
58
  export type { Point, PolarOptions, AngleScaleOptions, RingArcOptions } from "./recipes/radialCoords";
55
59
  export { curvedEdgePath, orthogonalEdgePath, boxEdgeAnchors, fanOutBend, cubicPoint, cubicTangent, cubicPath, } from "./recipes/edgeRouter";
@@ -69,8 +73,8 @@ export type { NetworkSymbolName } from "./stream/symbolPath";
69
73
  export { glyphPlacement, glyphExtent, glyphFractionClipRect, DEFAULT_GLYPH_VIEWBOX, DEFAULT_GLYPH_ANCHOR, } from "./stream/glyphDef";
70
74
  export type { GlyphDef, GlyphPart, GlyphPlacement } from "./stream/glyphDef";
71
75
  export { isotypeInk, isotypePaper, isotypeGhost, isotypeServerGlyph, isotypeChipGlyph, isotypeBoltGlyph, isotypeBusGlyph, isotypePersonPath, isotypePersonGlyph, isotypeNetworkGlyphs, } from "./recipes/isotypeGlyphs";
72
- export { roundedEnclosure, boundsOf, bandLabel, markCallout, linearAxis, hatchFill } from "./recipes/recipeChrome";
73
- export type { RoundedEnclosureProps, BandLabelProps, MarkCalloutProps, CalloutConnector, LinearAxisProps, AxisOrient, HatchFillOptions, } from "./recipes/recipeChrome";
76
+ export { roundedEnclosure, boundsOf, hullFromBoxes, bandLabel, markCallout, linearAxis, hatchFill, } from "./recipes/recipeChrome";
77
+ export type { RoundedEnclosureProps, HullBox, HullPadding, BandLabelProps, MarkCalloutProps, CalloutConnector, LinearAxisProps, AxisOrient, HatchFillOptions, } from "./recipes/recipeChrome";
74
78
  export { legendGroupsFrom, legendSwatches } from "./recipes/recipeLegend";
75
79
  export type { LegendGroupsInput, LegendSwatch, LegendSwatchesProps } from "./recipes/recipeLegend";
76
80
  export { buildTooltipEntries, extractTooltipDatum, formatTooltipValue, } from "./recipes/customTooltip";
@@ -1,13 +1,42 @@
1
1
  import type { Datum } from "../charts/shared/datumTypes";
2
+ import type { ChartMode } from "../charts/shared/types";
3
+ import type { ChartModeInput, ChartModeResult } from "../charts/shared/chartMode";
4
+ import type { SemioticTheme } from "../store/ThemeStore";
5
+ import type { ReactNode } from "react";
2
6
  export type FrameType = "xy" | "ordinal" | "network" | "geo" | "physics";
3
7
  export type ServerAccessorValue = string | number | boolean | Date | null | undefined;
4
8
  export type ServerAccessor = string | ((datum: Datum) => ServerAccessorValue);
5
9
  export type ServerColorScheme = string | string[] | Record<string, string> | undefined;
6
10
  export type ServerChartData = Datum | Datum[] | null | undefined;
11
+ export type ServerMargin = {
12
+ top: number;
13
+ right: number;
14
+ bottom: number;
15
+ left: number;
16
+ };
17
+ export interface ServerChartLayoutDefaults {
18
+ /** Force a semantic mode for aliases such as the server-only Sparkline. */
19
+ mode?: ChartMode;
20
+ /** HOC-specific primary dimensions. Compact/mobile modes retain shared defaults. */
21
+ primarySize?: {
22
+ width: number;
23
+ height: number;
24
+ };
25
+ /** Chart-specific margin contract when the HOC does not use mode margins. */
26
+ margin?: ServerMargin | ((props: Datum, resolved: ChartModeResult) => ServerMargin);
27
+ /** HOC defaults applied before explicit props and semantic mode resolution. */
28
+ modeDefaults?: Partial<ChartModeInput>;
29
+ }
30
+ export interface ServerChartOverlayContext {
31
+ theme: SemioticTheme;
32
+ }
7
33
  export interface ChartConfig {
8
34
  frameType: FrameType;
35
+ layout?: ServerChartLayoutDefaults;
9
36
  /** Build frame props from HOC-level props */
10
37
  buildProps: (data: ServerChartData, colorBy: ServerAccessor | undefined, colorScheme: ServerColorScheme, common: Datum, rest: Datum) => Datum;
38
+ /** Optional chart-owned SVG overlay rendered after the shared frame. */
39
+ renderOverlay?: (frameProps: Datum, context: ServerChartOverlayContext) => ReactNode;
11
40
  }
12
41
  export declare function accessorValue(accessor: ServerAccessor | undefined, fallback: string, d: Datum): ServerAccessorValue;
13
42
  export declare function numericValue(value: ServerAccessorValue): number;
@@ -12,22 +12,11 @@ export declare const CHART_CONFIGS: {
12
12
  StackedAreaChart: ChartConfig;
13
13
  Scatterplot: ChartConfig;
14
14
  CandlestickChart: ChartConfig;
15
- BubbleChart: {
16
- frameType: "xy";
17
- buildProps: (data: import("./serverChartConfigShared").ServerChartData, colorBy: import("./serverChartConfigShared").ServerAccessor | undefined, colorScheme: import("./serverChartConfigShared").ServerColorScheme, common: import("../stream/networkColorAccessors").Datum, rest: import("../stream/networkColorAccessors").Datum) => {
18
- chartType: string;
19
- data: import("./serverChartConfigShared").ServerChartData;
20
- xAccessor: any;
21
- yAccessor: any;
22
- colorAccessor: import("./serverChartConfigShared").ServerAccessor | undefined;
23
- sizeAccessor: any;
24
- sizeRange: any;
25
- colorScheme: import("./serverChartConfigShared").ServerColorScheme;
26
- };
27
- };
15
+ BubbleChart: ChartConfig;
28
16
  ConnectedScatterplot: ChartConfig;
29
17
  QuadrantChart: ChartConfig;
30
18
  Heatmap: ChartConfig;
19
+ TemporalHistogram: ChartConfig;
31
20
  XYCustomChart: ChartConfig;
32
21
  BarChart: ChartConfig;
33
22
  StackedBarChart: ChartConfig;
@@ -1,6 +1,9 @@
1
1
  import { type ChartConfig } from "./serverChartConfigShared";
2
+ export declare const bubbleChart: ChartConfig;
2
3
  export declare const sparkline: ChartConfig;
3
4
  export declare const lineChart: ChartConfig;
5
+ /** Static-data TemporalHistogram mapped onto the shared time-binned XY pipeline. */
6
+ export declare const temporalHistogram: ChartConfig;
4
7
  export declare const areaChart: ChartConfig;
5
8
  export declare const differenceChart: ChartConfig;
6
9
  export declare const stackedAreaChart: ChartConfig;
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ import type { Datum } from "../charts/shared/datumTypes";
3
+ import type { ServerChartOverlayContext } from "./serverChartConfigShared";
4
+ export interface ServerGaugeDescriptor {
5
+ gMin: number;
6
+ gMax: number;
7
+ sweep: number;
8
+ value?: number;
9
+ startAngleDeg: number;
10
+ thresholds?: Array<{
11
+ value: number;
12
+ color: string;
13
+ label?: string;
14
+ }>;
15
+ centerX: number;
16
+ centerY: number;
17
+ radius: number;
18
+ innerRadius: number;
19
+ showScaleLabels: boolean;
20
+ needleLength: number;
21
+ showNeedle: boolean;
22
+ needleColor?: string;
23
+ contextValue?: string;
24
+ contextValueY?: number;
25
+ valueFontSize?: number;
26
+ }
27
+ /** Gauge-owned chrome rendered outside the ordinal scene (needle/readout/ticks). */
28
+ export declare function renderServerGaugeOverlay(frameProps: Datum, { theme }: ServerChartOverlayContext): React.ReactNode;
@@ -27,7 +27,9 @@ interface AnnotationScales {
27
27
  }
28
28
  type AnnotationScale = {
29
29
  bivarianceHack(value: DatumValue): number;
30
- }["bivarianceHack"];
30
+ }["bivarianceHack"] & {
31
+ domain?: () => DatumValue[];
32
+ };
31
33
  interface AnnotationLayout {
32
34
  width: number;
33
35
  height: number;
@@ -7,7 +7,7 @@
7
7
  import * as React from "react";
8
8
  import type { SemioticTheme } from "../store/ThemeStore";
9
9
  import type { Datum } from "../charts/shared/datumTypes";
10
- import type { GradientLegendConfig, LegendGroup, LegendLayout } from "../types/legendTypes";
10
+ import type { CategoricalLegendConfig, GradientLegendConfig, LegendGroup, LegendLayout } from "../types/legendTypes";
11
11
  interface LegendItemLayout {
12
12
  category: string;
13
13
  width: number;
@@ -45,15 +45,21 @@ export interface StaticLegendConfig {
45
45
  hasTitle?: boolean;
46
46
  /** SSR legend layout controls */
47
47
  legendLayout?: LegendLayout;
48
+ /** Client <Legend> uses a stable 100px vertical placement box. */
49
+ reservedWidth?: number;
48
50
  /** Optional id namespace used for generated SVG ids */
49
51
  idPrefix?: string;
50
52
  }
51
53
  export interface StaticLegendGroupsConfig extends Omit<StaticLegendConfig, "categories" | "colorScheme"> {
52
54
  legendGroups: LegendGroup[];
55
+ /** Client <Legend> uses a stable 100px vertical placement box. */
56
+ reservedWidth?: number;
53
57
  }
54
58
  export interface StaticGradientLegendConfig extends Omit<StaticLegendConfig, "categories" | "colorScheme"> {
55
59
  gradient: GradientLegendConfig;
56
60
  }
61
+ /** Build the same categorical config shape consumed by the live Legend. */
62
+ export declare function buildStaticCategoricalLegendConfig(categories: string[], colorScheme: string | string[] | Record<string, string> | undefined, theme: SemioticTheme): CategoricalLegendConfig | undefined;
57
63
  export declare function measureStaticLegend(config: StaticLegendConfig): Omit<StaticLegendMetrics, "items" | "labelOffset" | "swatchRadius">;
58
64
  export declare function measureStaticLegendGroups(config: StaticLegendGroupsConfig): Omit<StaticLegendMetrics, "items" | "labelOffset" | "swatchRadius">;
59
65
  export declare function measureStaticGradientLegend(config: StaticGradientLegendConfig): {