semiotic 3.5.3 → 3.5.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.
- package/CLAUDE.md +2 -2
- package/README.md +5 -5
- package/ai/componentMetadata.cjs +9 -2
- package/ai/dist/mcp-server.js +4 -1
- package/ai/examples.md +27 -0
- package/ai/schema.json +286 -41
- package/ai/system-prompt.md +1 -1
- package/dist/components/charts/index.d.ts +3 -3
- package/dist/components/charts/network/Treemap.d.ts +8 -0
- package/dist/components/charts/ordinal/GaugeChart.d.ts +10 -0
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +22 -0
- package/dist/components/charts/shared/gaugeGradient.d.ts +62 -0
- package/dist/components/charts/shared/hooks.d.ts +2 -2
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +2 -2
- package/dist/components/charts/shared/types.d.ts +11 -2
- package/dist/components/charts/shared/useChartSetup.d.ts +2 -2
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +1 -1
- package/dist/components/charts/xy/AreaChart.d.ts +15 -0
- package/dist/components/semiotic-ai.d.ts +1 -1
- package/dist/components/semiotic-realtime.d.ts +3 -3
- package/dist/components/semiotic-server.d.ts +1 -0
- package/dist/components/semiotic-xy.d.ts +1 -1
- package/dist/components/semiotic.d.ts +5 -4
- package/dist/components/server/renderToStaticSVG.d.ts +2 -0
- package/dist/components/server/staticLegend.d.ts +35 -0
- package/dist/components/store/ThemeStore.d.ts +2 -0
- package/dist/components/stream/NetworkSVGOverlay.d.ts +2 -1
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +2 -1
- package/dist/components/stream/SVGOverlay.d.ts +2 -1
- package/dist/components/stream/SceneToSVG.d.ts +1 -1
- package/dist/components/stream/geoTypes.d.ts +2 -1
- package/dist/components/stream/hoverUtils.d.ts +1 -0
- package/dist/components/stream/legendRenderer.d.ts +2 -1
- package/dist/components/stream/networkTypes.d.ts +2 -1
- package/dist/components/stream/ordinalTypes.d.ts +16 -2
- package/dist/components/stream/renderers/wedgePathBuilder.d.ts +31 -0
- package/dist/components/stream/types.d.ts +2 -1
- package/dist/components/types/legendTypes.d.ts +15 -0
- package/dist/components/types/marginType.d.ts +17 -3
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +1 -1
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-realtime.d.ts +3 -3
- package/dist/semiotic-server.d.ts +1 -0
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +1 -1
- package/dist/semiotic.d.ts +5 -4
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +13 -21
|
@@ -54,3 +54,34 @@ export interface AnnularPathOptions {
|
|
|
54
54
|
* unrounded so the path stays well-formed.
|
|
55
55
|
*/
|
|
56
56
|
export declare function annularSectorPath(opts: AnnularPathOptions): string;
|
|
57
|
+
/**
|
|
58
|
+
* Build the clip outline + slice paths for a gauge gradient band.
|
|
59
|
+
*
|
|
60
|
+
* The band is rendered as one rounded annular sector used as a clip
|
|
61
|
+
* mask, with N unrounded slice sectors painted inside. Each slice
|
|
62
|
+
* extends from its own start angle out to the band's full end angle,
|
|
63
|
+
* so adjacent colors overpaint each other's trailing edge — eliminates
|
|
64
|
+
* subpixel AA gaps between slices without an explicit overlap epsilon
|
|
65
|
+
* and means the staircase reveals one color per `sliceAngle` of arc.
|
|
66
|
+
*
|
|
67
|
+
* Canvas and SVG renderers both consume this: canvas builds Path2D
|
|
68
|
+
* objects from the strings, SVG drops them straight into `<path d="…"/>`.
|
|
69
|
+
*/
|
|
70
|
+
export interface GaugeGradientGeometryOptions {
|
|
71
|
+
innerRadius: number;
|
|
72
|
+
outerRadius: number;
|
|
73
|
+
startAngle: number;
|
|
74
|
+
endAngle: number;
|
|
75
|
+
cornerRadius?: number;
|
|
76
|
+
roundStart?: boolean;
|
|
77
|
+
roundEnd?: boolean;
|
|
78
|
+
colors: string[];
|
|
79
|
+
}
|
|
80
|
+
export interface GaugeGradientGeometry {
|
|
81
|
+
clipPath: string;
|
|
82
|
+
slices: {
|
|
83
|
+
d: string;
|
|
84
|
+
color: string;
|
|
85
|
+
}[];
|
|
86
|
+
}
|
|
87
|
+
export declare function buildGaugeGradientGeometry(opts: GaugeGradientGeometryOptions): GaugeGradientGeometry;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { ScaleLinear } from "d3-scale";
|
|
3
3
|
import type { AnimateProp } from "./pipelineTransitionUtils";
|
|
4
|
-
import type { LegendGroup, GradientLegendConfig } from "../types/legendTypes";
|
|
4
|
+
import type { LegendGroup, GradientLegendConfig, LegendLayout } from "../types/legendTypes";
|
|
5
5
|
import type { ArrowOfTime, WindowMode, LineStyle, BarStyle, WaterfallStyle, SwarmStyle, HoverAnnotationConfig, HoverData, AnnotationContext, AnnotationAnchorMode } from "../realtime/types";
|
|
6
6
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
7
7
|
import type { CoercibleNumber } from "./accessorUtils";
|
|
@@ -651,6 +651,7 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
651
651
|
legendHighlightedCategory?: string | null;
|
|
652
652
|
legendIsolatedCategories?: Set<string>;
|
|
653
653
|
legendPosition?: "right" | "left" | "top" | "bottom";
|
|
654
|
+
legendLayout?: LegendLayout;
|
|
654
655
|
/** Accessor used to report the current legend category domain in push mode. */
|
|
655
656
|
legendCategoryAccessor?: string | ((d: T) => string);
|
|
656
657
|
/** Fires when the current legend category domain changes after scene rebuilds. */
|
|
@@ -31,6 +31,20 @@ export declare function isLegendConfig(value: unknown): value is {
|
|
|
31
31
|
export declare function isGradientLegendConfig(value: unknown): value is {
|
|
32
32
|
gradient: GradientLegendConfig;
|
|
33
33
|
};
|
|
34
|
+
export interface LegendLayout {
|
|
35
|
+
/** Horizontal alignment for top/bottom legends within the plot width */
|
|
36
|
+
align?: "start" | "center" | "end" | "left" | "right";
|
|
37
|
+
/** Width/height of categorical swatches in pixels */
|
|
38
|
+
swatchSize?: number;
|
|
39
|
+
/** Gap between a swatch and its label in pixels */
|
|
40
|
+
labelGap?: number;
|
|
41
|
+
/** Gap between horizontal legend items in pixels */
|
|
42
|
+
itemGap?: number;
|
|
43
|
+
/** Vertical row height for stacked legend items in pixels */
|
|
44
|
+
rowHeight?: number;
|
|
45
|
+
/** Override the alignment width used for top/bottom legends */
|
|
46
|
+
maxWidth?: number;
|
|
47
|
+
}
|
|
34
48
|
export interface LegendProps {
|
|
35
49
|
legendGroups?: LegendGroup[];
|
|
36
50
|
customClickBehavior?: (item: LegendItem) => void;
|
|
@@ -46,4 +60,5 @@ export interface LegendProps {
|
|
|
46
60
|
height?: number;
|
|
47
61
|
orientation?: string;
|
|
48
62
|
position?: "left" | "right";
|
|
63
|
+
legendLayout?: LegendLayout;
|
|
49
64
|
}
|
|
@@ -8,8 +8,22 @@ export interface MarginType {
|
|
|
8
8
|
left: number;
|
|
9
9
|
right: number;
|
|
10
10
|
}
|
|
11
|
+
/** Public margin side value. Numbers pin a side to an exact pixel value.
|
|
12
|
+
* `"auto"` and `null` explicitly leave that side to chart defaults plus
|
|
13
|
+
* auto-reservation such as legends. */
|
|
14
|
+
export type MarginSide = number | "auto" | null | undefined;
|
|
11
15
|
/** Public-API margin shape. Users can pass any subset of sides (`{ left: 120 }`
|
|
12
16
|
* for wide y-axis labels is a common pattern) or a single number as shorthand
|
|
13
|
-
* for "same on all sides".
|
|
14
|
-
*
|
|
15
|
-
|
|
17
|
+
* for "same on all sides". Pass a side as `"auto"` or `null` to explicitly
|
|
18
|
+
* opt back into chart auto-reservation for that side, e.g.
|
|
19
|
+
* `{ right: "auto" }` with a right-side legend. The frame fills missing/auto
|
|
20
|
+
* sides from chart-mode defaults before handing a fully-resolved
|
|
21
|
+
* `MarginType` to the layout code. */
|
|
22
|
+
export type PartialMargin = number | {
|
|
23
|
+
top?: MarginSide;
|
|
24
|
+
right?: MarginSide;
|
|
25
|
+
bottom?: MarginSide;
|
|
26
|
+
left?: MarginSide;
|
|
27
|
+
};
|
|
28
|
+
export declare function resolveMarginSide(value: MarginSide, fallback: number): number;
|
|
29
|
+
export declare function normalizePartialMargin(m: PartialMargin | undefined): Partial<MarginType> | undefined;
|