semiotic 3.8.2 → 3.8.3

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 (113) hide show
  1. package/CLAUDE.md +1 -1
  2. package/README.md +34 -33
  3. package/ai/schema.json +1 -1
  4. package/ai/surface-manifest.json +1 -1
  5. package/ai/system-prompt.md +1 -1
  6. package/dist/{chunk-chunk-C6EJ4IOD.module.min.js → chunk-chunk-2CCFBTQC.module.min.js} +1 -1
  7. package/dist/chunk-chunk-2RXP3FS3.module.min.js +1 -0
  8. package/dist/chunk-chunk-4TMZXLCR.module.min.js +1 -0
  9. package/dist/{chunk-chunk-H4PPRW6N.module.min.js → chunk-chunk-5APBQXZA.module.min.js} +1 -1
  10. package/dist/{chunk-chunk-NO4MCQVD.module.min.js → chunk-chunk-5RKXZQ2P.module.min.js} +1 -1
  11. package/dist/chunk-chunk-6HSGDMTA.module.min.js +2 -0
  12. package/dist/{chunk-chunk-7LHMKRKE.module.min.js → chunk-chunk-7FW6EGLP.module.min.js} +1 -1
  13. package/dist/{chunk-chunk-RH5TSQPH.module.min.js → chunk-chunk-7OEOSCBP.module.min.js} +1 -1
  14. package/dist/{chunk-chunk-FAKO3RGQ.module.min.js → chunk-chunk-A63CTACR.module.min.js} +1 -1
  15. package/dist/chunk-chunk-ANYDWOZF.module.min.js +1 -0
  16. package/dist/{chunk-chunk-ZLKRTF5N.module.min.js → chunk-chunk-AZJUDQRM.module.min.js} +1 -1
  17. package/dist/{chunk-chunk-W3DB2MN4.module.min.js → chunk-chunk-B6V35LMY.module.min.js} +1 -1
  18. package/dist/chunk-chunk-BOSVL645.module.min.js +2 -0
  19. package/dist/chunk-chunk-EMO5NUGE.module.min.js +1 -0
  20. package/dist/chunk-chunk-F25UA5HT.module.min.js +1 -0
  21. package/dist/chunk-chunk-FRIO6MCV.module.min.js +1 -0
  22. package/dist/{chunk-chunk-T27ZEV6A.module.min.js → chunk-chunk-GWSWSPXN.module.min.js} +1 -1
  23. package/dist/chunk-chunk-I6C3KR5H.module.min.js +2 -0
  24. package/dist/chunk-chunk-IP2UE74X.module.min.js +1 -0
  25. package/dist/chunk-chunk-J5RL6GXU.module.min.js +2 -0
  26. package/dist/chunk-chunk-JNCHKRIR.module.min.js +2 -0
  27. package/dist/{chunk-chunk-Z5KXAVQD.module.min.js → chunk-chunk-L3H6DQCR.module.min.js} +1 -1
  28. package/dist/{chunk-chunk-5WEFWNUW.module.min.js → chunk-chunk-M7VYYHCE.module.min.js} +1 -1
  29. package/dist/chunk-chunk-MC35ILYP.module.min.js +2 -0
  30. package/dist/{chunk-chunk-2VUEY5TH.module.min.js → chunk-chunk-N72SWNBV.module.min.js} +1 -1
  31. package/dist/chunk-chunk-OBQRFTIL.module.min.js +2 -0
  32. package/dist/chunk-chunk-OQTLSTGI.module.min.js +2 -0
  33. package/dist/{chunk-chunk-2UN3ANRN.module.min.js → chunk-chunk-SA3D43RA.module.min.js} +1 -1
  34. package/dist/chunk-chunk-SANERMIZ.module.min.js +2 -0
  35. package/dist/{chunk-chunk-DNY43POY.module.min.js → chunk-chunk-UHSZEB74.module.min.js} +1 -1
  36. package/dist/{chunk-chunk-CYIML3AV.module.min.js → chunk-chunk-XQYVEKEJ.module.min.js} +1 -1
  37. package/dist/{chunk-chunk-27HVVXS6.module.min.js → chunk-chunk-Y6AXCRVO.module.min.js} +1 -1
  38. package/dist/components/charts/custom/XYCustomChart.d.ts +3 -0
  39. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +5 -6
  40. package/dist/components/charts/realtime/temporalHistogramConfig.d.ts +11 -0
  41. package/dist/components/charts/shared/areaSeriesData.d.ts +15 -0
  42. package/dist/components/charts/shared/chartMode.d.ts +67 -0
  43. package/dist/components/charts/shared/colorUtils.d.ts +8 -0
  44. package/dist/components/charts/shared/geoStyleDefaults.d.ts +3 -0
  45. package/dist/components/charts/shared/hooks.d.ts +13 -80
  46. package/dist/components/charts/shared/useChartSetup.d.ts +3 -0
  47. package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
  48. package/dist/components/charts/shared/useXYLineStyle.d.ts +3 -2
  49. package/dist/components/charts/shared/xyLineStyle.d.ts +21 -0
  50. package/dist/components/charts/xy/LineChart.d.ts +3 -0
  51. package/dist/components/legendLayout.d.ts +31 -0
  52. package/dist/components/server/serverChartConfigShared.d.ts +29 -0
  53. package/dist/components/server/serverChartConfigs.d.ts +2 -13
  54. package/dist/components/server/serverChartConfigsXY.d.ts +3 -0
  55. package/dist/components/server/serverGaugeOverlay.d.ts +28 -0
  56. package/dist/components/server/staticLegend.d.ts +7 -1
  57. package/dist/components/server/staticSVGChrome.d.ts +57 -0
  58. package/dist/components/stream/GeoPipelineStore.d.ts +2 -0
  59. package/dist/components/stream/GeoSVGOverlay.d.ts +2 -0
  60. package/dist/components/stream/SceneToSVG.d.ts +8 -6
  61. package/dist/components/stream/SceneToSVGGeo.d.ts +10 -0
  62. package/dist/components/stream/SceneToSVGNetwork.d.ts +12 -0
  63. package/dist/components/stream/canvasBackground.d.ts +7 -0
  64. package/dist/components/stream/networkTypes.d.ts +2 -4
  65. package/dist/components/stream/renderBackend.d.ts +14 -0
  66. package/dist/components/stream/sceneToSVGShared.d.ts +51 -0
  67. package/dist/components/types/legendTypes.d.ts +16 -3
  68. package/dist/geo.min.js +1 -1
  69. package/dist/geo.module.min.js +1 -1
  70. package/dist/network.min.js +1 -1
  71. package/dist/network.module.min.js +1 -1
  72. package/dist/ordinal.min.js +1 -1
  73. package/dist/ordinal.module.min.js +1 -1
  74. package/dist/physics.min.js +1 -1
  75. package/dist/physics.module.min.js +1 -1
  76. package/dist/realtime.min.js +1 -1
  77. package/dist/realtime.module.min.js +1 -1
  78. package/dist/semiotic-ai-core.min.js +1 -1
  79. package/dist/semiotic-ai-core.module.min.js +1 -1
  80. package/dist/semiotic-ai.min.js +1 -1
  81. package/dist/semiotic-ai.module.min.js +1 -1
  82. package/dist/semiotic-experimental.min.js +1 -1
  83. package/dist/semiotic-experimental.module.min.js +1 -1
  84. package/dist/semiotic-realtime-core.min.js +1 -1
  85. package/dist/semiotic-realtime-core.module.min.js +1 -1
  86. package/dist/semiotic-recipes-core.module.min.js +1 -1
  87. package/dist/semiotic-recipes.module.min.js +1 -1
  88. package/dist/semiotic-server-edge.min.js +1 -1
  89. package/dist/semiotic-server-edge.module.min.js +1 -1
  90. package/dist/semiotic-server-node.min.js +1 -1
  91. package/dist/semiotic-server-node.module.min.js +1 -1
  92. package/dist/semiotic-utils-core.module.min.js +1 -1
  93. package/dist/semiotic-utils.module.min.js +1 -1
  94. package/dist/semiotic.min.js +1 -1
  95. package/dist/semiotic.module.min.js +1 -1
  96. package/dist/server.min.js +1 -1
  97. package/dist/server.module.min.js +1 -1
  98. package/dist/xy.min.js +1 -1
  99. package/dist/xy.module.min.js +1 -1
  100. package/package.json +1 -1
  101. package/dist/chunk-chunk-6F6GEAQU.module.min.js +0 -1
  102. package/dist/chunk-chunk-BHYTYMY2.module.min.js +0 -2
  103. package/dist/chunk-chunk-E7MIQX7D.module.min.js +0 -2
  104. package/dist/chunk-chunk-ES4DCG3L.module.min.js +0 -1
  105. package/dist/chunk-chunk-IFYPMWKY.module.min.js +0 -1
  106. package/dist/chunk-chunk-L6D3I3V7.module.min.js +0 -2
  107. package/dist/chunk-chunk-ODUZEEBH.module.min.js +0 -2
  108. package/dist/chunk-chunk-P6UBCMSQ.module.min.js +0 -2
  109. package/dist/chunk-chunk-STZFFTAN.module.min.js +0 -2
  110. package/dist/chunk-chunk-U3AGQ5EF.module.min.js +0 -2
  111. package/dist/chunk-chunk-WDIN4LRC.module.min.js +0 -1
  112. package/dist/chunk-chunk-XOYX77KF.module.min.js +0 -2
  113. package/dist/chunk-chunk-ZTNVDWAK.module.min.js +0 -2
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Scene graph → SVG element converters for the network family.
3
+ *
4
+ * Split out of SceneToSVG.tsx (see scripts/file-size-policy.json) to keep
5
+ * that module under the file-size ratchet ceiling. Re-exported from
6
+ * SceneToSVG.tsx so existing imports are unaffected.
7
+ */
8
+ import * as React from "react";
9
+ import type { NetworkSceneNode, NetworkSceneEdge, NetworkLabel } from "./networkTypes";
10
+ export declare function networkSceneNodeToSVG(node: NetworkSceneNode, i: number): React.ReactNode;
11
+ export declare function networkSceneEdgeToSVG(edge: NetworkSceneEdge, i: number): React.ReactNode;
12
+ export declare function networkLabelToSVG(label: NetworkLabel, i: number): React.ReactNode;
@@ -17,6 +17,13 @@ export interface PaintCanvasBackgroundOptions {
17
17
  width: number;
18
18
  height: number;
19
19
  }
20
+ export type CanvasBackgroundOptions = Pick<PaintCanvasBackgroundOptions, "background" | "hasBackgroundGraphics" | "themeBackground">;
21
+ /**
22
+ * Select the background token a canvas will attempt to paint. This is kept
23
+ * separate from the drawing operation so SVG layer composition can use the
24
+ * exact same visibility decision as the canvas renderer.
25
+ */
26
+ export declare function resolveCanvasBackground(options: CanvasBackgroundOptions): string | null;
20
27
  /**
21
28
  * Paint an opaque chart background when appropriate.
22
29
  * Returns true if a fill was applied.
@@ -5,7 +5,7 @@ type NetworkDatumComparator = {
5
5
  bivarianceHack(a: Datum, b: Datum): number;
6
6
  }["bivarianceHack"];
7
7
  type NetworkGroupComparator = (a: number, b: number) => number;
8
- import type { LegendGroup, LegendLayout } from "../types/legendTypes";
8
+ import type { LegendLayout, LegendValue } from "../types/legendTypes";
9
9
  import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors, SceneDatum, SceneAccessibilityMetadata, SceneRenderMode } from "./types";
10
10
  import type { AnimateProp } from "./pipelineTransitionUtils";
11
11
  import type { NetworkSymbolName } from "./symbolPath";
@@ -616,9 +616,7 @@ export interface StreamNetworkFrameProps<T = Datum> extends StreamNetworkInterac
616
616
  };
617
617
  className?: string;
618
618
  background?: string;
619
- legend?: ReactNode | {
620
- legendGroups: LegendGroup[];
621
- };
619
+ legend?: LegendValue;
622
620
  legendPosition?: "right" | "left" | "top" | "bottom";
623
621
  legendLayout?: LegendLayout;
624
622
  legendHoverBehavior?: (item: {
@@ -23,5 +23,19 @@ export declare function renderSceneWithBackend<Node extends SceneLike>(args: {
23
23
  renderMode: SceneRenderMode<Node> | undefined;
24
24
  fallback: () => React.ReactNode;
25
25
  }): React.ReactNode;
26
+ export interface RenderedSceneEntry<Node> {
27
+ node: Node;
28
+ element: React.ReactNode;
29
+ }
30
+ /**
31
+ * Render a scene once and retain only nodes that produced static output.
32
+ * Static evidence and SVG markup consume the same entries, preventing an
33
+ * unpaintable node from being reported as a successful rendered mark.
34
+ */
35
+ export declare function renderSceneListWithBackend<Node extends SceneLike>(args: {
36
+ nodes: Node[];
37
+ renderMode: SceneRenderMode<Node> | undefined;
38
+ fallback: (node: Node, index: number) => React.ReactNode;
39
+ }): RenderedSceneEntry<Node>[];
26
40
  export declare function resetRenderBackendWarningsForTests(): void;
27
41
  export {};
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Low-level SVG serialization helpers shared across SceneToSVG.tsx,
3
+ * SceneToSVGNetwork.tsx, and SceneToSVGGeo.tsx. Split out so the three
4
+ * scene-family serializers can import a common base without a circular
5
+ * dependency between them.
6
+ */
7
+ import * as React from "react";
8
+ import type { DefaultArcObject } from "d3-shape";
9
+ import { type HatchFill } from "../charts/shared/hatchFill";
10
+ import type { GlyphDef } from "./glyphDef";
11
+ import type { Style } from "./types";
12
+ /**
13
+ * Sentinel arg for d3-shape arc generators that have all four
14
+ * accessors set to constants. The generator's call signature requires
15
+ * a `DefaultArcObject` even though it never reads the argument when
16
+ * accessors are non-functional. Typing this once avoids local unsafe casts at
17
+ * the arc-emit sites in the network/ordinal serializers.
18
+ */
19
+ export declare const ARC_NOOP: DefaultArcObject;
20
+ export declare function svgFill(fill: string | HatchFill | CanvasPattern | undefined, fallback?: string): string;
21
+ /**
22
+ * Coerce a candidate SVG `id` value to the strict `[A-Za-z0-9_-]` charset.
23
+ * Scene-node keys embed user-provided category/group strings, which can
24
+ * contain spaces, colons, parentheses, or other characters that are either
25
+ * invalid in an SVG id or break a `url(#id)` reference. Non-matching
26
+ * characters are replaced with underscores; an empty/leading-digit result
27
+ * is prefixed so the final id is a legal SVG identifier.
28
+ */
29
+ export declare function safeSvgId(candidate: string): string;
30
+ /**
31
+ * Shared SVG serializer for glyph nodes across all four pipelines — the
32
+ * composite-pictogram sibling of `symbolSceneNodeToSVG`. Callers pass the
33
+ * node's position explicitly (`x`/`y` for XY/ordinal/geo, `cx`/`cy` for
34
+ * network) so one implementation matches `glyphCanvasRenderer` exactly:
35
+ * anchor + scale transform, role-token paints, optional ghost silhouette,
36
+ * and a deterministic `clipPath` for partial fills.
37
+ */
38
+ export declare function glyphNodeToSVG(g: {
39
+ size: number;
40
+ glyph: GlyphDef;
41
+ color?: string;
42
+ accent?: string;
43
+ fraction?: number;
44
+ fractionStart?: number;
45
+ fractionDirection?: "horizontal" | "vertical";
46
+ ghostColor?: string;
47
+ rotation?: number;
48
+ style: Style;
49
+ pointId?: string;
50
+ _decayOpacity?: number;
51
+ }, x: number, y: number, key: string): React.ReactNode;
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ReactElement } from "react";
1
+ import type { CSSProperties, ReactElement, ReactNode } from "react";
2
2
  export type SupportedLegendGlyphs = "fill" | "line";
3
3
  export type ItemType = SupportedLegendGlyphs | ((item: LegendItem) => ReactElement);
4
4
  export interface LegendItem {
@@ -23,10 +23,23 @@ export interface GradientLegendConfig {
23
23
  /** Optional format function for tick labels */
24
24
  format?: (v: number) => string;
25
25
  }
26
- /** Type guard: categorical legend config */
27
- export declare function isLegendConfig(value: unknown): value is {
26
+ export interface CategoricalLegendConfig {
28
27
  legendGroups: LegendGroup[];
28
+ }
29
+ /** Public legend slot accepted by stream frames and legend-aware chart HOCs. */
30
+ export type LegendValue = ReactNode | CategoricalLegendConfig | {
31
+ gradient: GradientLegendConfig;
29
32
  };
33
+ /**
34
+ * Compose inferred and caller-supplied legends without discarding either
35
+ * categorical domain. Configured groups are appended in argument order, so
36
+ * the chart's inferred series remain first and caller context follows.
37
+ * Gradient/custom-node legends remain exclusive slots; the last explicit
38
+ * value wins because those forms cannot be laid out as categorical groups.
39
+ */
40
+ export declare function composeLegendConfigs(...values: Array<LegendValue | null | undefined | false>): LegendValue | undefined;
41
+ /** Type guard: categorical legend config */
42
+ export declare function isLegendConfig(value: unknown): value is CategoricalLegendConfig;
30
43
  /** Type guard: gradient legend config */
31
44
  export declare function isGradientLegendConfig(value: unknown): value is {
32
45
  gradient: GradientLegendConfig;