semiotic 3.5.1 → 3.5.2
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 +21 -19
- package/README.md +22 -16
- package/ai/chartSuggestions.cjs +191 -3
- package/ai/componentMetadata.cjs +3 -3
- package/ai/dist/mcp-server.js +266 -48
- package/ai/examples.md +68 -0
- package/ai/schema.json +900 -1
- package/ai/system-prompt.md +4 -1
- package/dist/components/Tooltip/FlippingTooltip.d.ts +16 -1
- package/dist/components/charts/geo/FlowMap.d.ts +13 -4
- package/dist/components/charts/index.d.ts +6 -0
- package/dist/components/charts/network/OrbitDiagram.d.ts +5 -5
- package/dist/components/charts/network/ProcessSankey.d.ts +141 -0
- package/dist/components/charts/network/processSankey/algorithm.d.ts +136 -0
- package/dist/components/charts/network/processSankey/buildScenes.d.ts +45 -0
- package/dist/components/charts/network/processSankey/ribbonInputs.d.ts +32 -0
- package/dist/components/charts/network/processSankey/streamingLayout.d.ts +58 -0
- package/dist/components/charts/network/processSankey/tooltipUtils.d.ts +41 -0
- package/dist/components/charts/ordinal/BarChart.d.ts +12 -0
- package/dist/components/charts/ordinal/DotPlot.d.ts +9 -0
- package/dist/components/charts/ordinal/GaugeChart.d.ts +20 -0
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +5 -0
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +14 -11
- package/dist/components/charts/realtime/defaultRealtimeTooltip.d.ts +19 -0
- package/dist/components/charts/shared/axisExtent.d.ts +59 -0
- package/dist/components/charts/shared/chartSpecs.d.ts +75 -0
- package/dist/components/charts/shared/colorUtils.d.ts +8 -2
- package/dist/components/charts/shared/networkUtils.d.ts +3 -5
- package/dist/components/charts/shared/radialGeometry.d.ts +99 -0
- package/dist/components/charts/shared/regressionUtils.d.ts +59 -0
- package/dist/components/charts/shared/selectionUtils.d.ts +8 -1
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +5 -0
- package/dist/components/charts/shared/types.d.ts +13 -0
- package/dist/components/charts/shared/useAreaSeriesSetup.d.ts +75 -0
- package/dist/components/charts/shared/useEncodingDomain.d.ts +48 -0
- package/dist/components/charts/shared/useFrameImperativeHandle.d.ts +1 -1
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +148 -0
- package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +87 -0
- package/dist/components/charts/shared/useSeriesFeatures.d.ts +57 -0
- package/dist/components/charts/shared/useStreamStatus.d.ts +33 -0
- package/dist/components/charts/shared/useXYLineStyle.d.ts +69 -0
- package/dist/components/charts/shared/useXYPointStyle.d.ts +87 -0
- package/dist/components/charts/xy/AreaChart.d.ts +24 -0
- package/dist/components/charts/xy/BubbleChart.d.ts +9 -0
- package/dist/components/charts/xy/ConnectedScatterplot.d.ts +16 -0
- package/dist/components/charts/xy/DifferenceChart.d.ts +172 -0
- package/dist/components/charts/xy/Scatterplot.d.ts +34 -0
- package/dist/components/geometry/ribbonGeometry.d.ts +76 -0
- package/dist/components/semiotic-ai.d.ts +2 -0
- package/dist/components/semiotic-network.d.ts +4 -0
- package/dist/components/semiotic-realtime.d.ts +2 -0
- package/dist/components/semiotic-utils.d.ts +4 -0
- package/dist/components/semiotic-xy.d.ts +2 -0
- package/dist/components/semiotic.d.ts +3 -3
- package/dist/components/server/serverChartConfigs.d.ts +2 -0
- package/dist/components/stream/GeoPipelineStore.d.ts +21 -0
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +8 -0
- package/dist/components/stream/PipelineStore.d.ts +5 -0
- package/dist/components/stream/SVGOverlay.d.ts +18 -0
- package/dist/components/stream/annotationAccessorResolver.d.ts +39 -0
- package/dist/components/stream/geoTypes.d.ts +12 -0
- package/dist/components/stream/ordinalTypes.d.ts +12 -0
- package/dist/components/stream/renderers/cornerRadii.d.ts +33 -0
- package/dist/components/stream/types.d.ts +23 -0
- package/dist/components/types/legendTypes.d.ts +1 -1
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +2 -0
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-network.d.ts +4 -0
- package/dist/semiotic-realtime.d.ts +2 -0
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-utils.d.ts +4 -0
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +2 -0
- package/dist/semiotic.d.ts +3 -3
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +10 -5
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-corner radius utilities shared between the canvas (`barCanvasRenderer`)
|
|
3
|
+
* and SVG (`SceneToSVG`) paint paths.
|
|
4
|
+
*
|
|
5
|
+
* Both paths previously carried the same `hasAnyCornerRadius` predicate
|
|
6
|
+
* and the same `min(radius, w/2, h/2)` clamp inline. Splitting them by
|
|
7
|
+
* renderer left two near-identical implementations that drifted in
|
|
8
|
+
* comments more than once; centralizing here keeps the swimlane rounding
|
|
9
|
+
* contract — and any future per-corner shape (cards, tab corners,
|
|
10
|
+
* partial-stack rounding) — in one place.
|
|
11
|
+
*
|
|
12
|
+
* The actual path-tracing primitives (canvas `arcTo` vs SVG `A`) stay in
|
|
13
|
+
* each renderer because their output formats differ — this module owns
|
|
14
|
+
* the geometry, the renderers own the drawing language.
|
|
15
|
+
*/
|
|
16
|
+
import type { RectSceneNode } from "../types";
|
|
17
|
+
/** True when at least one corner has a positive radius. */
|
|
18
|
+
export declare function hasAnyCornerRadius(c: NonNullable<RectSceneNode["cornerRadii"]>): boolean;
|
|
19
|
+
export interface ClampedCornerRadii {
|
|
20
|
+
tl: number;
|
|
21
|
+
tr: number;
|
|
22
|
+
br: number;
|
|
23
|
+
bl: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Read each corner's radius and clamp to `[0, min(w, h) / 2]` so a
|
|
27
|
+
* corner never overdraws past the rect's center on thin lanes AND a
|
|
28
|
+
* negative input never leaks into the `moveTo` / `lineTo` math (where
|
|
29
|
+
* a negative radius would offset the start point into invalid space,
|
|
30
|
+
* producing visibly bent or escaping paths even though the `arcTo`
|
|
31
|
+
* is gated on `> 0`). Missing corners collapse to 0 (square).
|
|
32
|
+
*/
|
|
33
|
+
export declare function clampCornerRadii(node: RectSceneNode): ClampedCornerRadii;
|
|
@@ -227,6 +227,19 @@ export interface RectSceneNode {
|
|
|
227
227
|
* bar scene builders unconditionally so gradients resolve without
|
|
228
228
|
* requiring roundedTop. */
|
|
229
229
|
roundedEdge?: "top" | "bottom" | "right" | "left";
|
|
230
|
+
/** Explicit per-corner radii. Overrides the `roundedTop` + `roundedEdge`
|
|
231
|
+
* shortcut when present. Used by swimlanes (and any future chart that
|
|
232
|
+
* needs to round arbitrary subsets of a rect's four corners) — the
|
|
233
|
+
* outermost pieces of a lane round their leading/trailing corners and
|
|
234
|
+
* middle pieces stay square. Keys map to physical corners: `tl`
|
|
235
|
+
* top-left, `tr` top-right, `br` bottom-right, `bl` bottom-left.
|
|
236
|
+
* Missing keys are treated as 0 (square). */
|
|
237
|
+
cornerRadii?: {
|
|
238
|
+
tl?: number;
|
|
239
|
+
tr?: number;
|
|
240
|
+
br?: number;
|
|
241
|
+
bl?: number;
|
|
242
|
+
};
|
|
230
243
|
/** Gradient fill — same shape as the area-scene version. Runs tip → base
|
|
231
244
|
* along the bar axis (inferred from `roundedEdge`). */
|
|
232
245
|
fillGradient?: {
|
|
@@ -479,6 +492,10 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
479
492
|
orient: "left" | "right" | "top" | "bottom";
|
|
480
493
|
label?: string;
|
|
481
494
|
ticks?: number;
|
|
495
|
+
/** Explicit tick values. When provided, bypasses both d3's nice-tick
|
|
496
|
+
* generator and `axisExtent`; pixel-distance filtering still drops
|
|
497
|
+
* overlapping labels. Mirrors the ordinal frame's `rTickValues`. */
|
|
498
|
+
tickValues?: Array<number | Date>;
|
|
482
499
|
tickFormat?: AxisTickFormat;
|
|
483
500
|
baseline?: boolean | "under";
|
|
484
501
|
jaggedBase?: boolean;
|
|
@@ -489,6 +506,12 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
489
506
|
yLabelRight?: string;
|
|
490
507
|
xFormat?: (d: number | Date | string, index?: number, allTicks?: number[]) => string | ReactNode;
|
|
491
508
|
yFormat?: (d: number | Date | string) => string | ReactNode;
|
|
509
|
+
/** Axis extent mode. `"nice"` (default) uses d3-scale's rounded
|
|
510
|
+
* tick generator — round tick labels at the cost of ticks not
|
|
511
|
+
* reaching the exact data min/max. `"exact"` pins the first
|
|
512
|
+
* and last tick to the data domain and spaces intermediate
|
|
513
|
+
* ticks equidistantly. Applies to both x and y axes. */
|
|
514
|
+
axisExtent?: import("../charts/shared/axisExtent").AxisExtentMode;
|
|
492
515
|
tickFormatTime?: (value: number) => string;
|
|
493
516
|
tickFormatValue?: (value: number) => string;
|
|
494
517
|
hoverAnnotation?: boolean | HoverAnnotationConfig;
|
|
@@ -41,7 +41,7 @@ export interface LegendProps {
|
|
|
41
41
|
highlightedCategory?: string | null;
|
|
42
42
|
/** Legend interaction mode — used to set aria-multiselectable on the listbox */
|
|
43
43
|
legendInteraction?: string;
|
|
44
|
-
title?: string;
|
|
44
|
+
title?: string | boolean;
|
|
45
45
|
width?: number;
|
|
46
46
|
height?: number;
|
|
47
47
|
orientation?: string;
|