semiotic 3.8.0 → 3.8.1
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 +12 -9
- package/README.md +39 -39
- package/ai/dist/mcp-server.js +98 -17
- package/ai/schema.json +1 -1
- package/ai/surface-manifest.json +3 -2
- package/ai/system-prompt.md +3 -2
- package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +20 -0
- package/dist/components/AccessibleNavTree.d.ts +7 -1
- package/dist/components/ai/chartClinicMetadata.generated.d.ts +15 -0
- package/dist/components/ai/useNavigationSync.d.ts +17 -2
- package/dist/components/chartContainerMobile.d.ts +9 -0
- package/dist/components/charts/geo/ChoroplethMap.d.ts +19 -2
- package/dist/components/charts/geo/DistanceCartogram.d.ts +14 -2
- package/dist/components/charts/geo/FlowMap.d.ts +10 -6
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +14 -2
- package/dist/components/charts/index.d.ts +6 -0
- package/dist/components/charts/network/ChordDiagram.d.ts +9 -1
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +11 -0
- package/dist/components/charts/network/SankeyDiagram.d.ts +9 -1
- package/dist/components/charts/ordinal/BarChart.d.ts +21 -0
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +11 -0
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +11 -0
- package/dist/components/charts/physics/CollisionSwarmChart.d.ts +7 -0
- package/dist/components/charts/physics/EventDropChart.d.ts +7 -0
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +8 -0
- package/dist/components/charts/physics/PhysicsCustomChart.d.ts +4 -25
- package/dist/components/charts/physics/PhysicsPileChart.d.ts +7 -0
- package/dist/components/charts/physics/physicsChartShared.d.ts +17 -1
- package/dist/components/charts/physics/physicsCustomLayout.d.ts +32 -0
- package/dist/components/charts/shared/AnnotationLabel.d.ts +88 -0
- package/dist/components/charts/shared/annotationActivation.d.ts +35 -0
- package/dist/components/charts/shared/annotationLabelLayout.d.ts +5 -0
- package/dist/components/charts/shared/annotationRules.d.ts +2 -1
- package/dist/components/charts/shared/chartSelectionUtils.d.ts +4 -0
- package/dist/components/charts/shared/chartSpecCore.d.ts +3 -3
- package/dist/components/charts/shared/datumTypes.d.ts +2 -0
- package/dist/components/charts/shared/diagnoseAnnotationChecks.d.ts +2 -0
- package/dist/components/charts/shared/formatUtils.d.ts +3 -3
- package/dist/components/charts/shared/hatchFill.d.ts +87 -0
- package/dist/components/charts/shared/hooks.d.ts +7 -6
- package/dist/components/charts/shared/knownChartComponents.d.ts +9 -0
- package/dist/components/charts/shared/leastSquaresRegression.d.ts +16 -0
- package/dist/components/charts/shared/mergeShapeStyle.d.ts +3 -2
- package/dist/components/charts/shared/semanticInteractions.d.ts +42 -0
- package/dist/components/charts/shared/sparseArray.d.ts +1 -1
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +6 -4
- package/dist/components/charts/shared/styleRules.d.ts +205 -0
- package/dist/components/charts/shared/tooltipUtils.d.ts +22 -9
- package/dist/components/charts/shared/types.d.ts +9 -6
- package/dist/components/charts/shared/useAreaSeriesSetup.d.ts +16 -2
- package/dist/components/charts/shared/useChartSetup.d.ts +2 -2
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
- package/dist/components/charts/shared/useFrameImperativeHandle.d.ts +1 -2
- package/dist/components/charts/shared/useLikertAggregation.d.ts +4 -4
- package/dist/components/charts/shared/useOrdinalBrush.d.ts +2 -1
- package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +24 -1
- package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
- package/dist/components/charts/shared/useXYLineStyle.d.ts +10 -0
- package/dist/components/charts/shared/useXYPointStyle.d.ts +19 -1
- package/dist/components/charts/shared/validateChartData.d.ts +7 -5
- package/dist/components/charts/shared/validationMap.d.ts +11 -2
- package/dist/components/charts/shared/validationMap.generated.d.ts +6 -0
- package/dist/components/charts/shared/withChartWrapper.d.ts +4 -3
- package/dist/components/charts/value/targetPresentation.d.ts +22 -0
- package/dist/components/charts/value/types.d.ts +5 -6
- package/dist/components/charts/xy/AreaChart.d.ts +8 -0
- package/dist/components/charts/xy/BubbleChart.d.ts +9 -0
- package/dist/components/charts/xy/ConnectedScatterplot.d.ts +7 -0
- package/dist/components/charts/xy/DifferenceChart.d.ts +1 -52
- package/dist/components/charts/xy/Heatmap.d.ts +2 -2
- package/dist/components/charts/xy/LineChart.d.ts +11 -0
- package/dist/components/charts/xy/QuadrantChart.d.ts +7 -0
- package/dist/components/charts/xy/Scatterplot.d.ts +10 -0
- package/dist/components/charts/xy/StackedAreaChart.d.ts +7 -0
- package/dist/components/charts/xy/differenceSegments.d.ts +49 -0
- package/dist/components/charts/xy/scatterplotMatrixInteractionTypes.d.ts +12 -0
- package/dist/components/controls/SentenceFilter.d.ts +97 -0
- package/dist/components/data/fromVegaLite.d.ts +19 -9
- package/dist/components/rough/createRoughRenderMode.d.ts +46 -0
- package/dist/components/semiotic-ai.d.ts +3 -1
- package/dist/components/semiotic-controls.d.ts +2 -0
- package/dist/components/semiotic-geo.d.ts +4 -0
- package/dist/components/semiotic-network.d.ts +4 -0
- package/dist/components/semiotic-ordinal.d.ts +6 -0
- package/dist/components/semiotic-physics.d.ts +4 -0
- package/dist/components/semiotic-rough.d.ts +4 -0
- package/dist/components/semiotic-utils-core.d.ts +4 -0
- package/dist/components/semiotic-xy.d.ts +4 -0
- package/dist/components/semiotic.d.ts +9 -1
- package/dist/components/server/optionalImageTypes.d.ts +37 -0
- package/dist/components/server/serverChartConfigShared.d.ts +9 -5
- package/dist/components/server/serverChartConfigs.d.ts +4 -4
- package/dist/components/server/staticAnnotations.d.ts +6 -3
- package/dist/components/server/staticLegend.d.ts +1 -1
- package/dist/components/server/staticNetwork.d.ts +4 -4
- package/dist/components/server/staticSVGChrome.d.ts +2 -2
- package/dist/components/store/ObservationStore.d.ts +21 -1
- package/dist/components/stream/AccessibleDataTable.d.ts +4 -10
- package/dist/components/stream/AriaLiveTooltip.d.ts +9 -0
- package/dist/components/stream/CanvasHitTester.d.ts +4 -4
- package/dist/components/stream/DataSourceAdapter.d.ts +1 -1
- package/dist/components/stream/FrameRuntime.d.ts +57 -0
- package/dist/components/stream/GeoParticlePool.d.ts +1 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +43 -12
- package/dist/components/stream/GeoSVGOverlay.d.ts +64 -0
- package/dist/components/stream/NetworkCanvasHitTester.d.ts +2 -1
- package/dist/components/stream/NetworkPipelineStore.d.ts +24 -21
- package/dist/components/stream/NetworkSSRFrame.d.ts +17 -0
- package/dist/components/stream/NetworkSVGOverlay.d.ts +6 -0
- package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -2
- package/dist/components/stream/OrdinalPipelineStore.d.ts +13 -13
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +9 -1
- package/dist/components/stream/OrdinalStyleResolver.d.ts +12 -0
- package/dist/components/stream/ParticlePool.d.ts +1 -1
- package/dist/components/stream/PipelineStore.d.ts +12 -16
- package/dist/components/stream/SVGOverlay.d.ts +6 -0
- package/dist/components/stream/SceneGraph.d.ts +3 -3
- package/dist/components/stream/accessorUtils.d.ts +2 -2
- package/dist/components/stream/annotationAccessorResolver.d.ts +2 -2
- package/dist/components/stream/frameGraphics.d.ts +4 -0
- package/dist/components/stream/frameKeyboardNavigation.d.ts +45 -0
- package/dist/components/stream/geoPipelineHelpers.d.ts +3 -3
- package/dist/components/stream/geoPipelineUpdateResults.d.ts +34 -0
- package/dist/components/stream/geoSceneBuilder.d.ts +16 -0
- package/dist/components/stream/geoTypes.d.ts +48 -15
- package/dist/components/stream/hitTestUtils.d.ts +2 -2
- package/dist/components/stream/hoverUtils.d.ts +4 -2
- package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +1 -0
- package/dist/components/stream/layouts/hierarchyUtils.d.ts +2 -2
- package/dist/components/stream/networkCustomLayoutRunner.d.ts +23 -0
- package/dist/components/stream/networkCustomRestyle.d.ts +15 -0
- package/dist/components/stream/networkFrameAnimation.d.ts +7 -0
- package/dist/components/stream/networkFrameHandleTypes.d.ts +39 -0
- package/dist/components/stream/networkFrameObservations.d.ts +15 -0
- package/dist/components/stream/networkFramePaint.d.ts +11 -2
- package/dist/components/stream/networkInteractionTypes.d.ts +26 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +2 -2
- package/dist/components/stream/networkPipelineUpdateResults.d.ts +38 -0
- package/dist/components/stream/networkTypes.d.ts +37 -56
- package/dist/components/stream/ordinalCanvasRenderers.d.ts +2 -2
- package/dist/components/stream/ordinalPipelineUpdateResults.d.ts +20 -1
- package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -2
- package/dist/components/stream/ordinalTypes.d.ts +30 -3
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +2 -0
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +6 -0
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +21 -6
- package/dist/components/stream/physics/physicsFrameObservations.d.ts +19 -0
- package/dist/components/stream/physics/physicsFrameSetup.d.ts +4 -0
- package/dist/components/stream/physics/physicsPipelineUpdateResults.d.ts +19 -1
- package/dist/components/stream/physics/usePhysicsFrameLifecyclePolicy.d.ts +3 -1
- package/dist/components/stream/pipelineConfig.d.ts +4 -2
- package/dist/components/stream/pipelineDecay.d.ts +2 -2
- package/dist/components/stream/pipelinePulse.d.ts +2 -2
- package/dist/components/stream/pipelineStoreUpdateResults.d.ts +23 -2
- package/dist/components/stream/pipelineTransitions.d.ts +1 -1
- package/dist/components/stream/pipelineUpdateContract.d.ts +7 -0
- package/dist/components/stream/pipelineUpdateStore.d.ts +21 -0
- package/dist/components/stream/renderBackend.d.ts +27 -0
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +15 -1
- package/dist/components/stream/renderers/geoCanvasRenderer.d.ts +3 -2
- package/dist/components/stream/renderers/networkParticleRenderer.d.ts +1 -1
- package/dist/components/stream/sceneRenderBackendTypes.d.ts +28 -0
- package/dist/components/stream/sceneRevisionDiagnostics.d.ts +31 -4
- package/dist/components/stream/streamSemanticTypes.d.ts +16 -0
- package/dist/components/stream/streamThemeTypes.d.ts +14 -0
- package/dist/components/stream/svgOverlayUtils.d.ts +10 -0
- package/dist/components/stream/test-utils/frameScheduler.d.ts +12 -0
- package/dist/components/stream/test-utils/revisionConsumption.d.ts +13 -0
- package/dist/components/stream/titleLayout.d.ts +31 -0
- package/dist/components/stream/types.d.ts +30 -65
- package/dist/components/stream/useCanvasFrameHost.d.ts +71 -0
- package/dist/components/stream/useFrame.d.ts +23 -0
- package/dist/components/stream/useLegendCategoryEmission.d.ts +3 -3
- package/dist/components/stream/useSemanticFrameInteractions.d.ts +22 -0
- package/dist/components/stream/useUpdateResultSnapshot.d.ts +7 -0
- package/dist/components/stream/xyFrameAxisTypes.d.ts +50 -0
- package/dist/components/stream/xySceneBuilders/types.d.ts +6 -5
- package/dist/controls.min.js +1 -1
- package/dist/controls.module.min.js +1 -1
- package/dist/forceLayoutWorker.js +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/physics.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/physicsWorker.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/rough.min.js +1 -0
- package/dist/rough.module.min.js +1 -0
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +3 -1
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-controls.d.ts +2 -0
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental.min.js +1 -1
- package/dist/semiotic-experimental.module.min.js +1 -1
- package/dist/semiotic-geo.d.ts +4 -0
- package/dist/semiotic-network.d.ts +4 -0
- package/dist/semiotic-ordinal.d.ts +6 -0
- package/dist/semiotic-physics.d.ts +4 -0
- package/dist/semiotic-realtime-core.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-realtime-react.min.js +1 -1
- package/dist/semiotic-realtime-react.module.min.js +1 -1
- package/dist/semiotic-rough.d.ts +4 -0
- package/dist/semiotic-server-edge.min.js +1 -1
- package/dist/semiotic-server-edge.module.min.js +1 -1
- package/dist/semiotic-server-node.min.js +1 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-utils-core.d.ts +4 -0
- package/dist/semiotic-utils-core.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-value.min.js +1 -1
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +4 -0
- package/dist/semiotic.d.ts +9 -1
- 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/test-utils/capturedFrameProps.d.ts +67 -0
- package/dist/test-utils/frameMock.d.ts +12 -9
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +26 -7
|
@@ -5,6 +5,7 @@ import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
|
5
5
|
import type { LegendInteractionMode } from "../shared/hooks";
|
|
6
6
|
import type { BaseChartProps, AxisConfig, ChartAccessor } from "../shared/types";
|
|
7
7
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
8
|
+
import { type StyleRule } from "../shared/styleRules";
|
|
8
9
|
import type { AnomalyConfig, ForecastConfig } from "../shared/statisticalOverlays";
|
|
9
10
|
/**
|
|
10
11
|
* LineChart component props
|
|
@@ -74,6 +75,16 @@ export interface LineChartProps<TDatum extends Datum = Datum> extends BaseChartP
|
|
|
74
75
|
* @default "category10"
|
|
75
76
|
*/
|
|
76
77
|
colorScheme?: string | string[] | Record<string, string>;
|
|
78
|
+
/**
|
|
79
|
+
* Declarative, threshold-aware line styling. Ordered `{ when, style }`
|
|
80
|
+
* rules; last applicable rule wins per property. NOTE: line styles resolve
|
|
81
|
+
* per-SERIES against the series' first data point, so a rule's `ctx.x`/`ctx.y`
|
|
82
|
+
* reflect that sample, not every vertex (use it to recolor a whole series by
|
|
83
|
+
* a representative value). `when` accepts a predicate, a threshold
|
|
84
|
+
* (`{ axis: "x"|"y", … }`), or `true`. A rule `stroke`/`fill` may be a color
|
|
85
|
+
* or a HatchFill. Layers over the resolved series color.
|
|
86
|
+
*/
|
|
87
|
+
styleRules?: StyleRule[];
|
|
77
88
|
/**
|
|
78
89
|
* Curve interpolation type
|
|
79
90
|
* @default "linear"
|
|
@@ -5,6 +5,7 @@ import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
|
5
5
|
import type { BaseChartProps, AxisConfig, ChartAccessor } from "../shared/types";
|
|
6
6
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
7
7
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
8
|
+
import { type StyleRule } from "../shared/styleRules";
|
|
8
9
|
/**
|
|
9
10
|
* Quadrant label and color configuration
|
|
10
11
|
*/
|
|
@@ -70,6 +71,12 @@ export interface QuadrantChartProps<TDatum extends Datum = Datum> extends BaseCh
|
|
|
70
71
|
colorBy?: ChartAccessor<TDatum, string>;
|
|
71
72
|
/** Color scheme for categorical data @default "category10" */
|
|
72
73
|
colorScheme?: string | string[] | Record<string, string>;
|
|
74
|
+
/**
|
|
75
|
+
* Declarative, threshold-aware point styling (see Scatterplot). Ordered
|
|
76
|
+
* `{ when, style }` rules; last applicable rule wins. Layers over the
|
|
77
|
+
* quadrant-derived base fill; `frameProps.pointStyle` still overrides.
|
|
78
|
+
*/
|
|
79
|
+
styleRules?: StyleRule[];
|
|
73
80
|
/** Field name or function to determine point size */
|
|
74
81
|
sizeBy?: ChartAccessor<TDatum, number>;
|
|
75
82
|
/** Min and max radius for points @default [3, 15] */
|
|
@@ -6,6 +6,7 @@ import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
|
6
6
|
import type { BaseChartProps, AxisConfig, ChartAccessor } from "../shared/types";
|
|
7
7
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
8
8
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
9
|
+
import { type StyleRule } from "../shared/styleRules";
|
|
9
10
|
import { type RegressionProp } from "../shared/regressionUtils";
|
|
10
11
|
import type { ForecastConfig, AnomalyConfig } from "../shared/statisticalOverlays";
|
|
11
12
|
/**
|
|
@@ -26,6 +27,15 @@ export interface ScatterplotProps<TDatum extends Datum = Datum> extends BaseChar
|
|
|
26
27
|
colorBy?: ChartAccessor<TDatum, string>;
|
|
27
28
|
/** Color scheme for categorical data or custom colors array @default "category10" */
|
|
28
29
|
colorScheme?: string | string[] | Record<string, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Declarative, threshold-aware point styling. Ordered `{ when, style }`
|
|
32
|
+
* rules; the last applicable rule wins per property. `when` accepts a
|
|
33
|
+
* predicate `(datum, ctx) => boolean` (`ctx` = `{ value, x, y, category }`),
|
|
34
|
+
* a declarative threshold (`{ axis: "x"|"y", gt, lte, within, in, … }` —
|
|
35
|
+
* target either axis regardless of accessor field name), or `true`. A rule's
|
|
36
|
+
* `fill` may be a color or a HatchFill. Layers over the resolved base color.
|
|
37
|
+
*/
|
|
38
|
+
styleRules?: StyleRule[];
|
|
29
39
|
/** Field name or function to determine point size */
|
|
30
40
|
sizeBy?: ChartAccessor<TDatum, number>;
|
|
31
41
|
/** Min and max radius for points @default [3, 15] */
|
|
@@ -5,6 +5,7 @@ import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
|
5
5
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
6
6
|
import type { BaseChartProps, AxisConfig, ChartAccessor } from "../shared/types";
|
|
7
7
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
8
|
+
import { type StyleRule } from "../shared/styleRules";
|
|
8
9
|
/**
|
|
9
10
|
* StackedAreaChart component props
|
|
10
11
|
*/
|
|
@@ -56,6 +57,12 @@ export interface StackedAreaChartProps<TDatum extends Datum = Datum> extends Bas
|
|
|
56
57
|
* @default "category10"
|
|
57
58
|
*/
|
|
58
59
|
colorScheme?: string | string[] | Record<string, string>;
|
|
60
|
+
/**
|
|
61
|
+
* Declarative, threshold-aware styling for the stacked series. Ordered
|
|
62
|
+
* `{ when, style }` rules; last applicable rule wins. Per-SERIES. A rule
|
|
63
|
+
* `fill` may be a color or a HatchFill. Layers over the resolved series color.
|
|
64
|
+
*/
|
|
65
|
+
styleRules?: StyleRule[];
|
|
59
66
|
/**
|
|
60
67
|
* Curve interpolation type
|
|
61
68
|
* @default "monotoneX"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
2
|
+
/**
|
|
3
|
+
* Crossover-segmented record used by the area pipeline. One row per
|
|
4
|
+
* vertex along either the upper or lower boundary; `__diffSegment` is a
|
|
5
|
+
* group key per segment so the area scene builder produces one polygon
|
|
6
|
+
* per id with the correct fill color.
|
|
7
|
+
*/
|
|
8
|
+
export interface SegmentRow {
|
|
9
|
+
__x: number;
|
|
10
|
+
/** Upper boundary y value (max of A, B). The area pipeline reads this. */
|
|
11
|
+
__y: number;
|
|
12
|
+
/** Lower boundary y value (min of A, B) — picked up as per-datum y0. */
|
|
13
|
+
__y0: number;
|
|
14
|
+
/** Segment id. Format: `"seg-<index>-<winner>"`. */
|
|
15
|
+
__diffSegment: string;
|
|
16
|
+
/** Which series is on top in this segment ("A" or "B"). Drives fill. */
|
|
17
|
+
__diffWinner: "A" | "B";
|
|
18
|
+
/** Original A value at this x (or interpolated at crossovers). */
|
|
19
|
+
__valA: number;
|
|
20
|
+
/** Original B value at this x (or interpolated at crossovers). */
|
|
21
|
+
__valB: number;
|
|
22
|
+
/** Original datum (for tooltip lookup at non-crossover vertices). */
|
|
23
|
+
__sourceDatum?: Datum;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Walk sorted data, splitting at each A↔B crossover. Inserts an
|
|
27
|
+
* interpolated vertex on BOTH sides of every crossover so adjacent
|
|
28
|
+
* segments meet at a zero-width point (no jagged edges).
|
|
29
|
+
*
|
|
30
|
+
* Non-finite rows are skipped; the algorithm tracks the most recent
|
|
31
|
+
* VALID non-tie row (not the index neighbor) for crossover detection,
|
|
32
|
+
* so a non-finite gap doesn't drop a crossover that straddles it.
|
|
33
|
+
*
|
|
34
|
+
* Tie rows (a === b) are handled distinctly from non-tie rows:
|
|
35
|
+
*
|
|
36
|
+
* - When a tie row sits BETWEEN two non-tie rows with the SAME
|
|
37
|
+
* winner, the tie is emitted in that winner's segment as a
|
|
38
|
+
* zero-width vertex.
|
|
39
|
+
* - When a tie row sits between non-tie rows with DIFFERENT winners,
|
|
40
|
+
* the FIRST tie of the run becomes the crossover vertex. The old
|
|
41
|
+
* segment closes at the tie's x, the new segment opens at the same
|
|
42
|
+
* point, and any subsequent tie rows (multi-tie runs) carry into
|
|
43
|
+
* the new segment as zero-width vertices.
|
|
44
|
+
*
|
|
45
|
+
* This preserves the data's actual zero-difference point: if the user
|
|
46
|
+
* supplied a tie row explicitly, the fill switches color exactly at
|
|
47
|
+
* that x rather than at a linear-interpolated x that ignored the tie.
|
|
48
|
+
*/
|
|
49
|
+
export declare function computeDifferenceSegments<TDatum extends Datum>(raw: TDatum[], getX: (d: TDatum) => number, getA: (d: TDatum) => number, getB: (d: TDatum) => number): SegmentRow[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { D3BrushEvent } from "d3-brush";
|
|
2
|
+
import type { Datum } from "../shared/datumTypes";
|
|
3
|
+
export interface ScatterplotMatrixHoverInfo {
|
|
4
|
+
datum: Datum;
|
|
5
|
+
xField: string;
|
|
6
|
+
yField: string;
|
|
7
|
+
colIndex: number;
|
|
8
|
+
rowIndex: number;
|
|
9
|
+
px: number;
|
|
10
|
+
py: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function isTwoDimensionalBrushSelection(selection: D3BrushEvent<Datum>["selection"]): selection is [[number, number], [number, number]];
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type SentenceFilterPrimitive = string | number | boolean | null;
|
|
3
|
+
export type SentenceFilterValue = SentenceFilterPrimitive | string[] | number[] | [number, number];
|
|
4
|
+
export interface SentenceFilterOption<T = SentenceFilterPrimitive> {
|
|
5
|
+
value: T;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
count?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
keywords?: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface SentenceFilterBaseDefinition<T = SentenceFilterValue> {
|
|
13
|
+
label: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
allowClear?: boolean;
|
|
17
|
+
emptyLabel?: React.ReactNode;
|
|
18
|
+
accent?: string;
|
|
19
|
+
formatValue?: (value: T, filters: Record<string, SentenceFilterValue>) => React.ReactNode;
|
|
20
|
+
getAccessibleValue?: (value: T, filters: Record<string, SentenceFilterValue>) => string;
|
|
21
|
+
}
|
|
22
|
+
export interface SentenceFilterSelectDefinition extends SentenceFilterBaseDefinition {
|
|
23
|
+
type: "select";
|
|
24
|
+
options: SentenceFilterOption[];
|
|
25
|
+
searchable?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface SentenceFilterMultiSelectDefinition extends SentenceFilterBaseDefinition {
|
|
28
|
+
type: "multiselect";
|
|
29
|
+
options: SentenceFilterOption[];
|
|
30
|
+
searchable?: boolean;
|
|
31
|
+
conjunction?: "and" | "or";
|
|
32
|
+
}
|
|
33
|
+
export interface SentenceFilterNumberDefinition extends SentenceFilterBaseDefinition<number> {
|
|
34
|
+
type: "number";
|
|
35
|
+
min?: number;
|
|
36
|
+
max?: number;
|
|
37
|
+
step?: number;
|
|
38
|
+
inputMode?: "input" | "slider" | "both";
|
|
39
|
+
}
|
|
40
|
+
export interface SentenceFilterRangeDefinition extends SentenceFilterBaseDefinition<[number, number]> {
|
|
41
|
+
type: "range";
|
|
42
|
+
min: number;
|
|
43
|
+
max: number;
|
|
44
|
+
step?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface SentenceFilterToggleDefinition extends SentenceFilterBaseDefinition<boolean> {
|
|
47
|
+
type: "toggle";
|
|
48
|
+
trueLabel?: React.ReactNode;
|
|
49
|
+
falseLabel?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
export interface SentenceFilterTextDefinition extends SentenceFilterBaseDefinition<string> {
|
|
52
|
+
type: "text";
|
|
53
|
+
suggestions?: SentenceFilterOption<string>[];
|
|
54
|
+
placeholder?: string;
|
|
55
|
+
}
|
|
56
|
+
export type SentenceFilterDefinition = SentenceFilterSelectDefinition | SentenceFilterMultiSelectDefinition | SentenceFilterNumberDefinition | SentenceFilterRangeDefinition | SentenceFilterToggleDefinition | SentenceFilterTextDefinition;
|
|
57
|
+
export interface SentenceFilterChangeMeta {
|
|
58
|
+
key: string;
|
|
59
|
+
previousValue: SentenceFilterValue;
|
|
60
|
+
value: SentenceFilterValue;
|
|
61
|
+
source: "pointer" | "keyboard" | "input" | "clear" | "programmatic";
|
|
62
|
+
}
|
|
63
|
+
export interface SentenceFilterRenderContext {
|
|
64
|
+
key: string;
|
|
65
|
+
value: SentenceFilterValue;
|
|
66
|
+
filters: Record<string, SentenceFilterValue>;
|
|
67
|
+
definition: SentenceFilterDefinition;
|
|
68
|
+
setValue: (value: SentenceFilterValue, source?: SentenceFilterChangeMeta["source"]) => void;
|
|
69
|
+
close: () => void;
|
|
70
|
+
}
|
|
71
|
+
export interface SentenceFilterProps {
|
|
72
|
+
sentence: string;
|
|
73
|
+
/** Controlled filter values. */
|
|
74
|
+
filters?: Record<string, SentenceFilterValue>;
|
|
75
|
+
/** Initial values for the optional uncontrolled form. */
|
|
76
|
+
defaultFilters?: Record<string, SentenceFilterValue>;
|
|
77
|
+
definitions: Record<string, SentenceFilterDefinition>;
|
|
78
|
+
onChange?: (filters: Record<string, SentenceFilterValue>, meta: SentenceFilterChangeMeta) => void;
|
|
79
|
+
as?: React.ElementType;
|
|
80
|
+
className?: string;
|
|
81
|
+
style?: React.CSSProperties;
|
|
82
|
+
size?: "small" | "medium" | "large" | "inherit";
|
|
83
|
+
align?: "start" | "center" | "end";
|
|
84
|
+
wrap?: boolean;
|
|
85
|
+
disabled?: boolean;
|
|
86
|
+
readOnly?: boolean;
|
|
87
|
+
ariaLabel?: string;
|
|
88
|
+
id?: string;
|
|
89
|
+
renderControl?: (context: SentenceFilterRenderContext) => React.ReactNode;
|
|
90
|
+
onOpenChange?: (key: string | null) => void;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* An editorial, natural-language filter control. Values are native inline
|
|
94
|
+
* buttons and their editors open in an accessible non-modal dialog.
|
|
95
|
+
*/
|
|
96
|
+
export declare function SentenceFilter({ sentence, filters: controlledFilters, defaultFilters, definitions, onChange, as: As, className, style, size, align, wrap, disabled, readOnly, ariaLabel, id, renderControl, onOpenChange, }: SentenceFilterProps): React.ReactElement;
|
|
97
|
+
export default SentenceFilter;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Vega-Lite to Semiotic translator.
|
|
3
4
|
* Converts a Vega-Lite spec into a Semiotic ChartConfig.
|
|
@@ -13,26 +14,25 @@ export interface VegaLiteEncoding {
|
|
|
13
14
|
aggregate?: string;
|
|
14
15
|
scale?: {
|
|
15
16
|
scheme?: string;
|
|
16
|
-
range?:
|
|
17
|
-
domain?:
|
|
17
|
+
range?: Array<string | number>;
|
|
18
|
+
domain?: Array<string | number | boolean | Date>;
|
|
18
19
|
};
|
|
19
20
|
axis?: {
|
|
20
21
|
title?: string;
|
|
21
22
|
labelAngle?: number;
|
|
22
23
|
};
|
|
23
|
-
value?:
|
|
24
|
+
value?: string | number | boolean | null;
|
|
24
25
|
bin?: boolean | {
|
|
25
26
|
maxbins?: number;
|
|
26
27
|
};
|
|
27
28
|
stack?: boolean | string | null;
|
|
28
29
|
}
|
|
29
30
|
export interface VegaLiteSpec {
|
|
30
|
-
mark: string | {
|
|
31
|
+
mark: string | ({
|
|
31
32
|
type: string;
|
|
32
|
-
|
|
33
|
-
};
|
|
33
|
+
} & Datum);
|
|
34
34
|
data?: {
|
|
35
|
-
values?:
|
|
35
|
+
values?: Datum[];
|
|
36
36
|
url?: string;
|
|
37
37
|
};
|
|
38
38
|
encoding?: Record<string, VegaLiteEncoding>;
|
|
@@ -41,8 +41,18 @@ export interface VegaLiteSpec {
|
|
|
41
41
|
title?: string | {
|
|
42
42
|
text: string;
|
|
43
43
|
};
|
|
44
|
-
transform?:
|
|
45
|
-
[
|
|
44
|
+
transform?: Datum[];
|
|
45
|
+
layer?: VegaLiteSpec[];
|
|
46
|
+
hconcat?: VegaLiteSpec[];
|
|
47
|
+
vconcat?: VegaLiteSpec[];
|
|
48
|
+
concat?: VegaLiteSpec[];
|
|
49
|
+
facet?: Datum;
|
|
50
|
+
repeat?: Datum | string[];
|
|
51
|
+
params?: Datum[];
|
|
52
|
+
selection?: Datum;
|
|
53
|
+
usermeta?: Datum & {
|
|
54
|
+
idid?: Datum;
|
|
55
|
+
};
|
|
46
56
|
}
|
|
47
57
|
/** Strictness for the typed, experimental Vega-Lite import result. */
|
|
48
58
|
export interface FromVegaLiteOptions {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { SceneDatum, SceneRenderBackend, Style } from "../stream/types";
|
|
2
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
3
|
+
type RoughSceneNode = Datum & {
|
|
4
|
+
type?: string;
|
|
5
|
+
style?: Style;
|
|
6
|
+
datum?: SceneDatum;
|
|
7
|
+
};
|
|
8
|
+
export interface RoughRenderModeOptions {
|
|
9
|
+
/** Base seed. Each scene identity derives a stable non-zero Rough.js seed. @default 1 */
|
|
10
|
+
seed?: number;
|
|
11
|
+
roughness?: number;
|
|
12
|
+
bowing?: number;
|
|
13
|
+
maxRandomnessOffset?: number;
|
|
14
|
+
curveFitting?: number;
|
|
15
|
+
curveTightness?: number;
|
|
16
|
+
curveStepCount?: number;
|
|
17
|
+
fillStyle?: "hachure" | "solid" | "zigzag" | "cross-hatch" | "dots" | "dashed" | "zigzag-line";
|
|
18
|
+
fillWeight?: number;
|
|
19
|
+
hachureAngle?: number;
|
|
20
|
+
hachureGap?: number;
|
|
21
|
+
dashOffset?: number;
|
|
22
|
+
dashGap?: number;
|
|
23
|
+
zigzagOffset?: number;
|
|
24
|
+
disableMultiStroke?: boolean;
|
|
25
|
+
disableMultiStrokeFill?: boolean;
|
|
26
|
+
preserveVertices?: boolean;
|
|
27
|
+
simplification?: number;
|
|
28
|
+
fixedDecimalPlaceDigits?: number;
|
|
29
|
+
/** Maximum reusable drawables retained by this mode instance. @default 1000 */
|
|
30
|
+
cacheSize?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface RoughRenderMode extends SceneRenderBackend<RoughSceneNode> {
|
|
33
|
+
readonly id: "roughjs";
|
|
34
|
+
readonly seed: number;
|
|
35
|
+
readonly cacheEntries: number;
|
|
36
|
+
clearCache(): void;
|
|
37
|
+
}
|
|
38
|
+
/** Deterministic FNV-1a seed helper suitable for Rough.js's non-zero seed range. */
|
|
39
|
+
export declare function stableRoughSeed(value: unknown): number;
|
|
40
|
+
/**
|
|
41
|
+
* Create an explicit optional Rough.js scene backend. Keep one instance (for
|
|
42
|
+
* example with `useMemo`) so its deterministic drawables can be reused across
|
|
43
|
+
* hover, selection, and Canvas repaints.
|
|
44
|
+
*/
|
|
45
|
+
export declare function createRoughRenderMode(options?: RoughRenderModeOptions): RoughRenderMode;
|
|
46
|
+
export {};
|
|
@@ -172,6 +172,8 @@ export { enableConversationArc, disableConversationArc, getConversationArcStore,
|
|
|
172
172
|
export type { ConversationArcEvent, ConversationArcEventType, ConversationArcEventInput, ConversationArcStore, ConversationArcListener, ConversationArcSink, ConversationArcStorageLike, EnableConversationArcOptions, LoadConversationArcOptions, LocalStorageConversationArcSinkOptions, IndexedDBConversationArcSinkOptions, ConversationArcWebhookFetch, WebhookConversationArcSinkOptions, SuggestionShownEvent, SuggestionChosenEvent, AudienceSetEvent, ChartRenderedEvent, ChartEditedEvent, ChartReplacedEvent, ChartExportedEvent, ChartAbandonedEvent, InterrogationAskedEvent, InterrogationAnsweredEvent, NavNodeFocusedEvent, NavBranchExpandedEvent, AnnotationStatusChangedEvent } from "./ai/conversationArc";
|
|
173
173
|
export { useChartObserver } from "./store/useObservation";
|
|
174
174
|
export type { UseChartObserverOptions, UseChartObserverResult } from "./store/useObservation";
|
|
175
|
-
export type { ChartObservation, OnObservationCallback, HoverObservation, HoverEndObservation, BrushObservation, BrushEndObservation, SelectionObservation, SelectionEndObservation, ClickObservation, ClickEndObservation } from "./store/ObservationStore";
|
|
175
|
+
export type { ChartObservation, OnObservationCallback, HoverObservation, HoverEndObservation, BrushObservation, BrushEndObservation, SelectionObservation, SelectionEndObservation, ClickObservation, ClickEndObservation, ObservationInputType, FocusObservation, ActivateObservation, AnnotationActivateObservation } from "./store/ObservationStore";
|
|
176
|
+
export { annotationStableId } from "./charts/shared/annotationActivation";
|
|
177
|
+
export type { ChartAnnotation, AnnotationActivationEvent, OnAnnotationActivateCallback } from "./charts/shared/annotationActivation";
|
|
176
178
|
export { MobileAnnotationCalloutList } from "./MobileAnnotationCalloutList";
|
|
177
179
|
export type { MobileAnnotationCalloutListProps } from "./MobileAnnotationCalloutList";
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export { DirectManipulationControl, } from "./DirectManipulationControl";
|
|
10
10
|
export type { DirectManipulationControlProps, } from "./DirectManipulationControl";
|
|
11
|
+
export { SentenceFilter } from "./controls/SentenceFilter";
|
|
12
|
+
export type { SentenceFilterBaseDefinition, SentenceFilterChangeMeta, SentenceFilterDefinition, SentenceFilterMultiSelectDefinition, SentenceFilterNumberDefinition, SentenceFilterOption, SentenceFilterPrimitive, SentenceFilterProps, SentenceFilterRangeDefinition, SentenceFilterRenderContext, SentenceFilterSelectDefinition, SentenceFilterTextDefinition, SentenceFilterToggleDefinition, SentenceFilterValue, } from "./controls/SentenceFilter";
|
|
11
13
|
export { createControlObservationAdapter, VISUALIZATION_CONTROL_TYPES, } from "./controls/controlContract";
|
|
12
14
|
export type { ControlInputSource, ControlObservation, ControlObservationAdapterOptions, ControlObservationCallback, ControlObservationPhase, VisualizationControlDefinition, VisualizationControlType, VisualizationControlValue, } from "./controls/controlContract";
|
|
13
15
|
export { auditVisualizationControls } from "./controls/controlAudit";
|
|
@@ -29,3 +29,7 @@ export type { ProportionalSymbolMapProps } from "./charts/geo/ProportionalSymbol
|
|
|
29
29
|
export type { FlowMapProps } from "./charts/geo/FlowMap";
|
|
30
30
|
export type { DistanceCartogramProps } from "./charts/geo/DistanceCartogram";
|
|
31
31
|
export type { GeoCustomChartProps } from "./charts/custom/GeoCustomChart";
|
|
32
|
+
export { resolveStyleRules, matchesThreshold, ruleMatches, makeRuleValueResolver, makeNodeRuleContext, composeStyleRules } from "./charts/shared/styleRules";
|
|
33
|
+
export type { StyleRule, StyleRuleStyle, StyleRuleThreshold, StyleRuleContext, StyleRulePredicate } from "./charts/shared/styleRules";
|
|
34
|
+
export { isHatchFill, hatchPatternDef, resolveSvgFill, hatchFillId } from "./charts/shared/hatchFill";
|
|
35
|
+
export type { HatchFill } from "./charts/shared/hatchFill";
|
|
@@ -39,3 +39,7 @@ export type { NetworkCustomChartProps } from "./charts/custom/NetworkCustomChart
|
|
|
39
39
|
export type { NetworkCustomLayout, NetworkLayoutContext, NetworkLayoutResult, NetworkHtmlMark, } from "./stream/networkCustomLayout";
|
|
40
40
|
export { validateProcessSankey, formatProcessSankeyIssue, } from "./charts/network/processSankey/algorithm";
|
|
41
41
|
export type { ProcessSankeyNode as ProcessSankeyValidatorNode, ProcessSankeyEdge as ProcessSankeyValidatorEdge, ProcessSankeyIssue, } from "./charts/network/processSankey/algorithm";
|
|
42
|
+
export { resolveStyleRules, matchesThreshold, ruleMatches, makeRuleValueResolver, makeNodeRuleContext, composeStyleRules } from "./charts/shared/styleRules";
|
|
43
|
+
export type { StyleRule, StyleRuleStyle, StyleRuleThreshold, StyleRuleContext, StyleRulePredicate } from "./charts/shared/styleRules";
|
|
44
|
+
export { isHatchFill, hatchPatternDef, resolveSvgFill, hatchFillId } from "./charts/shared/hatchFill";
|
|
45
|
+
export type { HatchFill } from "./charts/shared/hatchFill";
|
|
@@ -33,6 +33,12 @@ export type { GlyphDef, GlyphPart } from "./stream/glyphDef";
|
|
|
33
33
|
export type { GlyphSceneNode, SceneAccessibilityMetadata } from "./stream/types";
|
|
34
34
|
export { createHatchPattern } from "./charts/shared/hatchPattern";
|
|
35
35
|
export type { HatchPatternOptions } from "./charts/shared/hatchPattern";
|
|
36
|
+
export { isHatchFill, hatchPatternDef, resolveSvgFill, hatchFillId } from "./charts/shared/hatchFill";
|
|
37
|
+
export type { HatchFill } from "./charts/shared/hatchFill";
|
|
38
|
+
export { resolveStyleRules, matchesThreshold, ruleMatches, makeRuleValueResolver, makeXYRuleContext, makeNodeRuleContext, composeStyleRules, makeStyleRuleStyleFn, } from "./charts/shared/styleRules";
|
|
39
|
+
export type { StyleRule, StyleRuleStyle, StyleRuleThreshold, StyleRuleContext, StyleRulePredicate, } from "./charts/shared/styleRules";
|
|
40
|
+
export { AnnotationLabel, estimateLabelWidth } from "./charts/shared/AnnotationLabel";
|
|
41
|
+
export type { AnnotationLabelBackground, AnnotationLabelBackgroundConfig, AnnotationLabelProps } from "./charts/shared/AnnotationLabel";
|
|
36
42
|
export type { StreamOrdinalFrameProps, StreamOrdinalFrameHandle, OrdinalChartType, OrdinalScales, OrdinalSceneNode } from "./stream/ordinalTypes";
|
|
37
43
|
export type { BarChartProps } from "./charts/ordinal/BarChart";
|
|
38
44
|
export type { StackedBarChartProps } from "./charts/ordinal/StackedBarChart";
|
|
@@ -54,3 +54,7 @@ export { compileDependencyMachine, routeDependencyTracks, createLogicalJoin, rep
|
|
|
54
54
|
export type { DependencyAccessor, DependencyTaskStatus, DependencyMachineAccessors, CompileDependencyMachineOptions, DependencyMachineDiagnosticCode, DependencyMachineDiagnostic, DependencyMachineNode, DependencyMachineEdge, DependencyMachine, DependencyPoint, DependencyTrackDimensions, DependencyTrackOptions, DependencyTaskPlacement, DependencySocketPlacement, DependencyTrackRoute, DependencyTrackLayout, LogicalJoinSnapshot, LogicalJoin, DependencyReplayEvent, DependencyReplayClock, DependencyReplayState, BlockerAmplification, BlockerAmplificationOptions } from "./charts/physics/dependencyMachine";
|
|
55
55
|
export { compileMotionEncoding, resolveMotionAccessor, resolveMotionAge, opacityFromAge, resolveMotionVector, deriveMotionVector } from "./charts/shared/motionEncoding";
|
|
56
56
|
export type { MotionEncodingConstant, MotionEncodingAccessor, MotionTimeBasis, MotionTimeUnit, MotionCoordinateSpace, MotionTimeEncoding, MotionPlacementEncoding, MotionKinematicsEncoding, MotionProcessEncoding, MotionAccessibleEncoding, MotionEncoding, ResolvedMotionEncodingRow, MotionEncodingCompilation, CompileMotionEncodingOptions, ResolveMotionAgeOptions, ResolvedMotionAge, MotionAgeOpacityType, MotionAgeOpacityOptions, MotionPoint, ResolvedMotionVector } from "./charts/shared/motionEncoding";
|
|
57
|
+
export { resolveStyleRules, matchesThreshold, ruleMatches, makeRuleValueResolver, composeStyleRules } from "./charts/shared/styleRules";
|
|
58
|
+
export type { StyleRule, StyleRuleStyle, StyleRuleThreshold, StyleRuleContext, StyleRulePredicate } from "./charts/shared/styleRules";
|
|
59
|
+
export { isHatchFill, hatchPatternDef, resolveSvgFill, hatchFillId } from "./charts/shared/hatchFill";
|
|
60
|
+
export type { HatchFill } from "./charts/shared/hatchFill";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Optional Rough.js rendering adapter. Import from `semiotic/rough`. */
|
|
2
|
+
export { createRoughRenderMode, stableRoughSeed } from "./rough/createRoughRenderMode";
|
|
3
|
+
export type { RoughRenderMode, RoughRenderModeOptions } from "./rough/createRoughRenderMode";
|
|
4
|
+
export type { SceneRenderBackend, SceneRenderMode } from "./stream/types";
|
|
@@ -14,6 +14,10 @@ export { adaptiveTimeTicks, smartTickFormat } from "./charts/shared/formatUtils"
|
|
|
14
14
|
export { darkenColor, lightenColor } from "./charts/shared/colorManipulation";
|
|
15
15
|
export { createHatchPattern } from "./charts/shared/hatchPattern";
|
|
16
16
|
export type { HatchPatternOptions } from "./charts/shared/hatchPattern";
|
|
17
|
+
export { isHatchFill, hatchFillId, hatchFillKey } from "./charts/shared/hatchFill";
|
|
18
|
+
export type { HatchFill } from "./charts/shared/hatchFill";
|
|
19
|
+
export { resolveStyleRules, matchesThreshold, ruleMatches, makeRuleValueResolver, makeXYRuleContext, makeNodeRuleContext, composeStyleRules, makeStyleRuleStyleFn, } from "./charts/shared/styleRules";
|
|
20
|
+
export type { StyleRule, StyleRuleStyle, StyleRuleThreshold, StyleRuleContext, StyleRulePredicate, } from "./charts/shared/styleRules";
|
|
17
21
|
export { validateProps } from "./charts/shared/validateProps";
|
|
18
22
|
export { diagnoseConfig } from "./charts/shared/diagnoseConfig";
|
|
19
23
|
export { auditAccessibility, formatAccessibilityAudit, accessibilityCaveats } from "./charts/shared/auditAccessibility";
|
|
@@ -42,3 +42,7 @@ export type { QuadrantChartProps, QuadrantsConfig, QuadrantsConfigOverride, Quad
|
|
|
42
42
|
export type { MultiAxisLineChartProps } from "./charts/xy/MultiAxisLineChart";
|
|
43
43
|
export type { CandlestickChartProps } from "./charts/xy/CandlestickChart";
|
|
44
44
|
export type { XYCustomChartProps } from "./charts/custom/XYCustomChart";
|
|
45
|
+
export { resolveStyleRules, matchesThreshold, ruleMatches, makeRuleValueResolver, makeXYRuleContext, composeStyleRules } from "./charts/shared/styleRules";
|
|
46
|
+
export type { StyleRule, StyleRuleStyle, StyleRuleThreshold, StyleRuleContext, StyleRulePredicate } from "./charts/shared/styleRules";
|
|
47
|
+
export { isHatchFill, hatchPatternDef, resolveSvgFill, hatchFillId } from "./charts/shared/hatchFill";
|
|
48
|
+
export type { HatchFill } from "./charts/shared/hatchFill";
|
|
@@ -52,7 +52,9 @@ export type { CustomLayoutFailureDiagnostic, CustomLayoutFailureRecovery, Custom
|
|
|
52
52
|
export type { UseSelectionOptions, UseSelectionResult, UseSelectionActionsResult, UseLinkedHoverOptions, UseLinkedHoverResult, UseBrushSelectionOptions, UseBrushSelectionResult } from "./LinkedCharts";
|
|
53
53
|
export { useChartObserver } from "./LinkedCharts";
|
|
54
54
|
export type { UseChartObserverOptions, UseChartObserverResult } from "./LinkedCharts";
|
|
55
|
-
export type { ChartObservation, OnObservationCallback } from "./store/ObservationStore";
|
|
55
|
+
export type { ChartObservation, OnObservationCallback, ObservationInputType, FocusObservation, ActivateObservation, AnnotationActivateObservation } from "./store/ObservationStore";
|
|
56
|
+
export { annotationStableId } from "./charts/shared/annotationActivation";
|
|
57
|
+
export type { ChartAnnotation, AnnotationActivationEvent, OnAnnotationActivateCallback } from "./charts/shared/annotationActivation";
|
|
56
58
|
export type { ResolutionMode, SelectionClause, Selection } from "./store/SelectionStore";
|
|
57
59
|
export type { SemioticTheme } from "./ThemeProvider";
|
|
58
60
|
export { LIGHT_THEME, DARK_THEME, HIGH_CONTRAST_THEME } from "./ThemeProvider";
|
|
@@ -83,6 +85,12 @@ export type { ChartConfig, ToConfigOptions, CopyFormat } from "./export/chartCon
|
|
|
83
85
|
export type { VegaLiteSpec, VegaLiteEncoding } from "./data/fromVegaLite";
|
|
84
86
|
export type { SerializedSelections, SerializedSelection, SerializedFieldSelection } from "./export/selectionSerializer";
|
|
85
87
|
export type { HatchPatternOptions } from "./charts/shared/hatchPattern";
|
|
88
|
+
export { isHatchFill, hatchPatternDef, resolveSvgFill, hatchFillId } from "./charts/shared/hatchFill";
|
|
89
|
+
export type { HatchFill } from "./charts/shared/hatchFill";
|
|
90
|
+
export { resolveStyleRules, matchesThreshold, ruleMatches, makeRuleValueResolver, makeXYRuleContext, makeNodeRuleContext, composeStyleRules, makeStyleRuleStyleFn, styleRulesToPieceStyle, styleRulesToXYStyle, styleRulesToNodeStyle, } from "./charts/shared/styleRules";
|
|
91
|
+
export type { StyleRule, StyleRuleStyle, StyleRuleThreshold, StyleRuleContext, StyleRulePredicate, } from "./charts/shared/styleRules";
|
|
92
|
+
export { AnnotationLabel, estimateLabelWidth } from "./charts/shared/AnnotationLabel";
|
|
93
|
+
export type { AnnotationLabelBackground, AnnotationLabelBackgroundConfig, AnnotationLabelProps } from "./charts/shared/AnnotationLabel";
|
|
86
94
|
export { smartTickFormat, adaptiveTimeTicks } from "./charts/shared/formatUtils";
|
|
87
95
|
export { darkenColor, lightenColor } from "./charts/shared/colorManipulation";
|
|
88
96
|
export type { TooltipProp, TooltipConfig, TooltipField, MultiLineTooltipConfig } from "./Tooltip/Tooltip";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface SharpPipeline {
|
|
2
|
+
resize(width: number, height: number): SharpPipeline;
|
|
3
|
+
ensureAlpha(): SharpPipeline;
|
|
4
|
+
raw(): SharpPipeline;
|
|
5
|
+
jpeg(options: {
|
|
6
|
+
quality: number;
|
|
7
|
+
}): SharpPipeline;
|
|
8
|
+
png(): SharpPipeline;
|
|
9
|
+
toBuffer(): Promise<Buffer>;
|
|
10
|
+
}
|
|
11
|
+
export type SharpFactory = (input: Uint8Array, options?: {
|
|
12
|
+
density: number;
|
|
13
|
+
}) => SharpPipeline;
|
|
14
|
+
export type SharpModule = SharpFactory & {
|
|
15
|
+
default?: SharpFactory;
|
|
16
|
+
};
|
|
17
|
+
export type GifPalette = number[][] | Uint8Array;
|
|
18
|
+
export interface GifEncoder {
|
|
19
|
+
writeFrame(indexedPixels: Uint8Array, width: number, height: number, options: {
|
|
20
|
+
palette: GifPalette;
|
|
21
|
+
delay: number;
|
|
22
|
+
repeat: number;
|
|
23
|
+
}): void;
|
|
24
|
+
finish(): void;
|
|
25
|
+
bytes(): Uint8Array;
|
|
26
|
+
}
|
|
27
|
+
export interface GifencExports {
|
|
28
|
+
GIFEncoder?: () => GifEncoder;
|
|
29
|
+
quantize?: (pixels: Uint8Array, maxColors: number) => GifPalette;
|
|
30
|
+
applyPalette?: (pixels: Uint8Array, palette: GifPalette) => Uint8Array;
|
|
31
|
+
default?: GifencExports;
|
|
32
|
+
}
|
|
33
|
+
export interface GifencRuntimeExports extends GifencExports {
|
|
34
|
+
GIFEncoder: () => GifEncoder;
|
|
35
|
+
quantize: (pixels: Uint8Array, maxColors: number) => GifPalette;
|
|
36
|
+
applyPalette: (pixels: Uint8Array, palette: GifPalette) => Uint8Array;
|
|
37
|
+
}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
2
|
export type FrameType = "xy" | "ordinal" | "network" | "geo" | "physics";
|
|
3
|
+
export type ServerAccessorValue = string | number | boolean | Date | null | undefined;
|
|
4
|
+
export type ServerAccessor = string | ((datum: Datum) => ServerAccessorValue);
|
|
5
|
+
export type ServerColorScheme = string | string[] | Record<string, string> | undefined;
|
|
6
|
+
export type ServerChartData = Datum | Datum[] | null | undefined;
|
|
3
7
|
export interface ChartConfig {
|
|
4
8
|
frameType: FrameType;
|
|
5
9
|
/** Build frame props from HOC-level props */
|
|
6
|
-
buildProps: (data:
|
|
10
|
+
buildProps: (data: ServerChartData, colorBy: ServerAccessor | undefined, colorScheme: ServerColorScheme, common: Datum, rest: Datum) => Datum;
|
|
7
11
|
}
|
|
8
|
-
export declare function accessorValue(accessor:
|
|
9
|
-
export declare function numericValue(value:
|
|
12
|
+
export declare function accessorValue(accessor: ServerAccessor | undefined, fallback: string, d: Datum): ServerAccessorValue;
|
|
13
|
+
export declare function numericValue(value: ServerAccessorValue): number;
|
|
10
14
|
export declare function viridisColor(i: number, n: number): string;
|
|
11
|
-
export declare function prepareConnectedScatterplotData(data:
|
|
12
|
-
data:
|
|
15
|
+
export declare function prepareConnectedScatterplotData(data: ServerChartData, rest: Datum): {
|
|
16
|
+
data: ServerChartData;
|
|
13
17
|
orderMap: WeakMap<Datum, {
|
|
14
18
|
idx: number;
|
|
15
19
|
total: number;
|
|
@@ -14,15 +14,15 @@ export declare const CHART_CONFIGS: {
|
|
|
14
14
|
CandlestickChart: ChartConfig;
|
|
15
15
|
BubbleChart: {
|
|
16
16
|
frameType: "xy";
|
|
17
|
-
buildProps: (data:
|
|
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
18
|
chartType: string;
|
|
19
|
-
data:
|
|
19
|
+
data: import("./serverChartConfigShared").ServerChartData;
|
|
20
20
|
xAccessor: any;
|
|
21
21
|
yAccessor: any;
|
|
22
|
-
colorAccessor:
|
|
22
|
+
colorAccessor: import("./serverChartConfigShared").ServerAccessor | undefined;
|
|
23
23
|
sizeAccessor: any;
|
|
24
24
|
sizeRange: any;
|
|
25
|
-
colorScheme:
|
|
25
|
+
colorScheme: import("./serverChartConfigShared").ServerColorScheme;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
ConnectedScatterplot: ChartConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
|
+
import type { Datum, DatumValue } from "../charts/shared/datumTypes";
|
|
2
2
|
/**
|
|
3
3
|
* Static annotation rendering for server-side SVG.
|
|
4
4
|
*
|
|
@@ -9,8 +9,8 @@ import * as React from "react";
|
|
|
9
9
|
import type { SemioticTheme } from "../store/ThemeStore";
|
|
10
10
|
import { type AutoPlaceAnnotations } from "../recipes/annotationLayout";
|
|
11
11
|
interface AnnotationScales {
|
|
12
|
-
x?:
|
|
13
|
-
y?:
|
|
12
|
+
x?: AnnotationScale;
|
|
13
|
+
y?: AnnotationScale;
|
|
14
14
|
/** For ordinal charts: band scale */
|
|
15
15
|
o?: {
|
|
16
16
|
(v: string): number | undefined;
|
|
@@ -25,6 +25,9 @@ interface AnnotationScales {
|
|
|
25
25
|
*/
|
|
26
26
|
geoProjection?: (coords: [number, number]) => [number, number] | null;
|
|
27
27
|
}
|
|
28
|
+
type AnnotationScale = {
|
|
29
|
+
bivarianceHack(value: DatumValue): number;
|
|
30
|
+
}["bivarianceHack"];
|
|
28
31
|
interface AnnotationLayout {
|
|
29
32
|
width: number;
|
|
30
33
|
height: number;
|
|
@@ -71,5 +71,5 @@ export declare function renderStaticGradientLegend(config: StaticGradientLegendC
|
|
|
71
71
|
/**
|
|
72
72
|
* Extract unique categories from data using an accessor.
|
|
73
73
|
*/
|
|
74
|
-
export declare function extractCategories(data:
|
|
74
|
+
export declare function extractCategories(data: Datum[], accessor: string | ((d: Datum) => string) | undefined): string[];
|
|
75
75
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
|
+
import type { Datum, DatumValue } from "../charts/shared/datumTypes";
|
|
2
2
|
import type { NetworkPipelineConfig, RealtimeNode, RealtimeEdge, StreamNetworkFrameProps } from "../stream/networkTypes";
|
|
3
3
|
import { type EvidenceSink } from "./renderEvidence";
|
|
4
4
|
import type { ThemeAwareProps } from "./staticSVGChrome";
|
|
5
|
-
export declare function resolveAccessor(accessor: string | ((d: Datum) =>
|
|
6
|
-
export declare function buildRealtimeNodes(propsNodes:
|
|
7
|
-
export declare function buildRealtimeEdges(propsEdges:
|
|
5
|
+
export declare function resolveAccessor(accessor: string | ((d: Datum) => DatumValue) | undefined, defaultKey: string): (d: Datum) => DatumValue;
|
|
6
|
+
export declare function buildRealtimeNodes(propsNodes: Datum[], config: NetworkPipelineConfig): RealtimeNode[];
|
|
7
|
+
export declare function buildRealtimeEdges(propsEdges: Datum[], config: NetworkPipelineConfig): RealtimeEdge[];
|
|
8
8
|
export declare function renderNetworkFrame(props: StreamNetworkFrameProps & ThemeAwareProps, sink?: EvidenceSink): string;
|