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.
- package/CLAUDE.md +9 -9
- package/README.md +42 -40
- package/ai/examples.md +1 -1
- package/ai/schema.json +2726 -300
- package/ai/surface-manifest.json +1 -1
- package/ai/system-prompt.md +1 -1
- package/dist/chunk-chunk-2JGJ5GUG.module.min.js +0 -1
- package/dist/chunk-chunk-3ILKBVVQ.module.min.js +1 -0
- package/dist/{chunk-chunk-NO4MCQVD.module.min.js → chunk-chunk-5RKXZQ2P.module.min.js} +1 -1
- package/dist/{chunk-chunk-CYIML3AV.module.min.js → chunk-chunk-6TPGFL7M.module.min.js} +1 -1
- package/dist/{chunk-chunk-VVCA3DB7.module.min.js → chunk-chunk-7ALTGHK6.module.min.js} +1 -1
- package/dist/chunk-chunk-7KZJUTKP.module.min.js +2 -0
- package/dist/chunk-chunk-7RYBCTK5.module.min.js +1 -0
- package/dist/chunk-chunk-ACLDBMRH.module.min.js +2 -0
- package/dist/chunk-chunk-ANYDWOZF.module.min.js +1 -0
- package/dist/{chunk-chunk-ZLKRTF5N.module.min.js → chunk-chunk-AQPQN2HH.module.min.js} +1 -1
- package/dist/chunk-chunk-ASKSE5F5.module.min.js +1 -0
- package/dist/chunk-chunk-AVBI6GDT.module.min.js +1 -0
- package/dist/chunk-chunk-B3DRZPBK.module.min.js +2 -0
- package/dist/chunk-chunk-BFHUYEOS.module.min.js +2 -0
- package/dist/chunk-chunk-C4YA6TDR.module.min.js +1 -0
- package/dist/chunk-chunk-C57LR3YG.module.min.js +1 -0
- package/dist/chunk-chunk-EMO5NUGE.module.min.js +1 -0
- package/dist/chunk-chunk-F5V4UIE6.module.min.js +2 -0
- package/dist/chunk-chunk-F7WFPD4O.module.min.js +2 -0
- package/dist/chunk-chunk-FBGHXL72.module.min.js +2 -0
- package/dist/chunk-chunk-FP44FHFO.module.min.js +2 -0
- package/dist/chunk-chunk-HKXUAEPJ.module.min.js +2 -0
- package/dist/chunk-chunk-ICEXPNDC.module.min.js +2 -0
- package/dist/chunk-chunk-IY7RYD4S.module.min.js +1 -0
- package/dist/{chunk-chunk-7LHMKRKE.module.min.js → chunk-chunk-JDXT6ORT.module.min.js} +1 -1
- package/dist/chunk-chunk-JMVEIZXP.module.min.js +1 -0
- package/dist/chunk-chunk-KHCOJMGK.module.min.js +1 -0
- package/dist/chunk-chunk-KQ546MKE.module.min.js +2 -0
- package/dist/chunk-chunk-LQBSXO7K.module.min.js +2 -0
- package/dist/chunk-chunk-LRIFN2HK.module.min.js +1 -0
- package/dist/chunk-chunk-MFHF4J2Z.module.min.js +1 -0
- package/dist/chunk-chunk-N6VKKF3A.module.min.js +2 -0
- package/dist/chunk-chunk-NEVE562N.module.min.js +1 -0
- package/dist/chunk-chunk-NKZ75IM5.module.min.js +2 -0
- package/dist/chunk-chunk-PLIDPQNG.module.min.js +2 -0
- package/dist/{chunk-chunk-FYY2ACNJ.module.min.js → chunk-chunk-PRDGLMJT.module.min.js} +1 -1
- package/dist/chunk-chunk-QGZGZI4X.module.min.js +1 -0
- package/dist/chunk-chunk-RP7WTID5.module.min.js +1 -0
- package/dist/chunk-chunk-S7KLNUO6.module.min.js +1 -0
- package/dist/chunk-chunk-SR4ZXOWR.module.min.js +2 -0
- package/dist/chunk-chunk-ZOAQDIJO.module.min.js +1 -0
- package/dist/chunk-minimapBrushOverlay-JU57U7NM.module.min.js +2 -0
- package/dist/chunk-scatterplotMatrixBrushOverlay-SDIZSN66.module.min.js +2 -0
- package/dist/chunk-statisticalOverlays-QGDLRUHX.module.min.js +1 -0
- package/dist/chunk-statisticalOverlays-T77OKLDY.module.min.js +1 -0
- package/dist/components/ChartContainer.d.ts +2 -2
- package/dist/components/ai/chartCapabilityTypes.d.ts +5 -0
- package/dist/components/charts/custom/XYCustomChart.d.ts +3 -0
- package/dist/components/charts/geo/ChoroplethMap.d.ts +2 -0
- package/dist/components/charts/geo/DistanceCartogram.d.ts +7 -3
- package/dist/components/charts/geo/FlowMap.d.ts +4 -0
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +3 -1
- package/dist/components/charts/physics/CollisionSwarmChart.d.ts +6 -1
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +6 -1
- package/dist/components/charts/physics/gauntletChartProps.d.ts +7 -1
- package/dist/components/charts/physics/gauntletChrome.d.ts +2 -1
- package/dist/components/charts/physics/gauntletPhysics.d.ts +19 -4
- package/dist/components/charts/physics/gauntletRuntime.d.ts +3 -0
- package/dist/components/charts/physics/physicsHocUtils.d.ts +12 -0
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +5 -6
- package/dist/components/charts/realtime/temporalHistogramConfig.d.ts +11 -0
- package/dist/components/charts/shared/areaSeriesData.d.ts +15 -0
- package/dist/components/charts/shared/chartMode.d.ts +75 -0
- package/dist/components/charts/shared/chartSpecCore.d.ts +2 -2
- package/dist/components/charts/shared/colorUtils.d.ts +8 -0
- package/dist/components/charts/shared/geoStyleDefaults.d.ts +3 -0
- package/dist/components/charts/shared/hatchPattern.d.ts +8 -3
- package/dist/components/charts/shared/hooks.d.ts +13 -80
- package/dist/components/charts/shared/lineSeriesSsr.d.ts +55 -0
- package/dist/components/charts/shared/types.d.ts +2 -2
- package/dist/components/charts/shared/useChartSetup.d.ts +3 -0
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
- package/dist/components/charts/shared/useXYLineStyle.d.ts +3 -2
- package/dist/components/charts/shared/validateProps.d.ts +1 -1
- package/dist/components/charts/shared/xyLineStyle.d.ts +21 -0
- package/dist/components/charts/xy/AreaChart.d.ts +10 -0
- package/dist/components/charts/xy/LineChart.d.ts +3 -0
- package/dist/components/charts/xy/minimapBrushOverlay.d.ts +17 -0
- package/dist/components/charts/xy/minimapBrushOverlayLazy.d.ts +4 -0
- package/dist/components/charts/xy/scatterplotMatrixBrushOverlay.d.ts +8 -0
- package/dist/components/charts/xy/scatterplotMatrixBrushOverlayLazy.d.ts +3 -0
- package/dist/components/legendLayout.d.ts +31 -0
- package/dist/components/realtime/types.d.ts +5 -0
- package/dist/components/recipes/gridObservatory.d.ts +176 -0
- package/dist/components/recipes/recipeChrome.d.ts +24 -0
- package/dist/components/recipes/sequenceLayout.d.ts +139 -0
- package/dist/components/semiotic-recipes-core.d.ts +6 -2
- package/dist/components/server/serverChartConfigShared.d.ts +29 -0
- package/dist/components/server/serverChartConfigs.d.ts +2 -13
- package/dist/components/server/serverChartConfigsXY.d.ts +3 -0
- package/dist/components/server/serverGaugeOverlay.d.ts +28 -0
- package/dist/components/server/staticAnnotations.d.ts +3 -1
- package/dist/components/server/staticLegend.d.ts +7 -1
- package/dist/components/server/staticSVGChrome.d.ts +57 -0
- package/dist/components/stream/GeoPipelineStore.d.ts +2 -0
- package/dist/components/stream/GeoSVGOverlay.d.ts +2 -0
- package/dist/components/stream/SceneToSVG.d.ts +10 -8
- package/dist/components/stream/SceneToSVGGeo.d.ts +10 -0
- package/dist/components/stream/SceneToSVGNetwork.d.ts +12 -0
- package/dist/components/stream/SceneToSVGOrdinal.d.ts +12 -0
- package/dist/components/stream/canvasBackground.d.ts +7 -0
- package/dist/components/stream/networkFramePaint.d.ts +2 -0
- package/dist/components/stream/networkTypes.d.ts +2 -4
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +18 -2
- package/dist/components/stream/physics/physicsBodyCanvas.d.ts +7 -0
- package/dist/components/stream/physics/physicsPipelineEviction.d.ts +15 -0
- package/dist/components/stream/physics/physicsPipelineObservations.d.ts +1 -1
- package/dist/components/stream/physics/physicsPipelineQuiescence.d.ts +20 -0
- package/dist/components/stream/renderBackend.d.ts +14 -0
- package/dist/components/stream/sceneToSVGShared.d.ts +80 -0
- package/dist/components/stream/types.d.ts +4 -0
- package/dist/components/stream/useHydration.d.ts +7 -1
- package/dist/components/stream/xySceneBuilders/candlestickScene.d.ts +1 -1
- package/dist/components/types/legendTypes.d.ts +16 -3
- 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 -1
- package/dist/rough.module.min.js +1 -1
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.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-realtime-core.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-recipes-core.d.ts +6 -2
- package/dist/semiotic-recipes-core.min.js +1 -1
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- 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.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.module.min.js +1 -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/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +3 -2
- package/dist/chunk-chunk-255KDHW5.module.min.js +0 -1
- package/dist/chunk-chunk-27HVVXS6.module.min.js +0 -1
- package/dist/chunk-chunk-2UN3ANRN.module.min.js +0 -2
- package/dist/chunk-chunk-2VUEY5TH.module.min.js +0 -1
- package/dist/chunk-chunk-2WVCH4PL.module.min.js +0 -1
- package/dist/chunk-chunk-5WEFWNUW.module.min.js +0 -2
- package/dist/chunk-chunk-6F6GEAQU.module.min.js +0 -1
- package/dist/chunk-chunk-BHYTYMY2.module.min.js +0 -2
- package/dist/chunk-chunk-C6EJ4IOD.module.min.js +0 -2
- package/dist/chunk-chunk-CP3EN6KZ.module.min.js +0 -1
- package/dist/chunk-chunk-DNY43POY.module.min.js +0 -1
- package/dist/chunk-chunk-E7MIQX7D.module.min.js +0 -2
- package/dist/chunk-chunk-ES4DCG3L.module.min.js +0 -1
- package/dist/chunk-chunk-FAKO3RGQ.module.min.js +0 -2
- package/dist/chunk-chunk-H4PPRW6N.module.min.js +0 -1
- package/dist/chunk-chunk-IFYPMWKY.module.min.js +0 -1
- package/dist/chunk-chunk-J3ELI22J.module.min.js +0 -1
- package/dist/chunk-chunk-L6D3I3V7.module.min.js +0 -2
- package/dist/chunk-chunk-M337NY6L.module.min.js +0 -1
- package/dist/chunk-chunk-ODUZEEBH.module.min.js +0 -2
- package/dist/chunk-chunk-P6UBCMSQ.module.min.js +0 -2
- package/dist/chunk-chunk-QRIBHZYW.module.min.js +0 -1
- package/dist/chunk-chunk-RH5TSQPH.module.min.js +0 -1
- package/dist/chunk-chunk-STZFFTAN.module.min.js +0 -2
- package/dist/chunk-chunk-T27ZEV6A.module.min.js +0 -1
- package/dist/chunk-chunk-U3AGQ5EF.module.min.js +0 -2
- package/dist/chunk-chunk-W3DB2MN4.module.min.js +0 -2
- package/dist/chunk-chunk-WDIN4LRC.module.min.js +0 -1
- package/dist/chunk-chunk-XOYX77KF.module.min.js +0 -2
- package/dist/chunk-chunk-Z5KXAVQD.module.min.js +0 -2
- package/dist/chunk-chunk-ZCNBUZPL.module.min.js +0 -2
- package/dist/chunk-chunk-ZTNVDWAK.module.min.js +0 -2
|
@@ -3,7 +3,7 @@ import type { Datum } from "../shared/datumTypes";
|
|
|
3
3
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
4
4
|
import type { StyleRule } from "../shared/styleRules";
|
|
5
5
|
import { type PhysicsFrameHandle } from "./physicsHocHandle";
|
|
6
|
-
import { type PhysicsHocFrameProps, type PhysicsSharedChartProps, type PhysicsSimulationMode, type TooltipProp } from "./physicsHocUtils";
|
|
6
|
+
import { type PhysicsHocFrameProps, type PhysicsRerunMS, type PhysicsSharedChartProps, type PhysicsSimulationMode, type TooltipProp } from "./physicsHocUtils";
|
|
7
7
|
import type { ChartMode } from "../shared/types";
|
|
8
8
|
export interface GaltonBoardReferenceLine {
|
|
9
9
|
value: number;
|
|
@@ -42,6 +42,11 @@ export interface GaltonBoardChartProps<TDatum extends Datum = Datum> extends Omi
|
|
|
42
42
|
styleRules?: StyleRule[];
|
|
43
43
|
referenceLines?: GaltonBoardReferenceLine | GaltonBoardReferenceLine[];
|
|
44
44
|
seed?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Replay the seeded simulation this many milliseconds after it settles.
|
|
47
|
+
* Omit or pass `null` for a single run; `0` replays on the next timer turn.
|
|
48
|
+
*/
|
|
49
|
+
rerunMS?: PhysicsRerunMS;
|
|
45
50
|
showProjection?: boolean;
|
|
46
51
|
tooltip?: TooltipProp;
|
|
47
52
|
paused?: boolean;
|
|
@@ -7,7 +7,7 @@ import type { PhysicsQueuedSpawn } from "../../stream/physics/PhysicsPipelineSto
|
|
|
7
7
|
import type { Datum } from "../shared/datumTypes";
|
|
8
8
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
9
9
|
import type { PhysicsProcessBodyGroup } from "./physicsProcessPrimitives";
|
|
10
|
-
import type { PhysicsHocFrameProps, PhysicsSharedChartProps, TooltipProp } from "./physicsHocUtils";
|
|
10
|
+
import type { PhysicsHocFrameProps, PhysicsRerunMS, PhysicsSharedChartProps, TooltipProp } from "./physicsHocUtils";
|
|
11
11
|
import type { GauntletEvent, GauntletGate, GauntletLayout, GauntletProjectPlacement, GauntletProjectState, GauntletPropertyDefinition } from "./gauntletTypes";
|
|
12
12
|
export interface GauntletChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin">, PhysicsSharedChartProps {
|
|
13
13
|
data?: TDatum[];
|
|
@@ -43,6 +43,12 @@ export interface GauntletChartProps<TDatum extends Datum = Datum> extends Omit<B
|
|
|
43
43
|
positiveProperties: Map<string, GauntletPropertyDefinition>;
|
|
44
44
|
}) => string;
|
|
45
45
|
paused?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Replay the full compound simulation this many milliseconds after it
|
|
48
|
+
* settles. Omit or pass `null` for a single run; `0` replays on the next
|
|
49
|
+
* timer turn.
|
|
50
|
+
*/
|
|
51
|
+
rerunMS?: PhysicsRerunMS;
|
|
46
52
|
projectPlacement?: (project: GauntletProjectState<TDatum>, index: number, layout: GauntletLayout) => Partial<GauntletProjectPlacement>;
|
|
47
53
|
showChrome?: boolean;
|
|
48
54
|
/**
|
|
@@ -12,9 +12,10 @@ export declare function defaultGauntletTooltipContent(hover: PhysicsHoverData):
|
|
|
12
12
|
export declare function drawGauntletBody(ctx: CanvasRenderingContext2D, body: PhysicsBodyState, style: Style): void;
|
|
13
13
|
export declare function resolveCanvasColor(ctx: CanvasRenderingContext2D, value: Style[keyof Style] | undefined, fallback: string): string;
|
|
14
14
|
export declare function drawTethers(ctx: CanvasRenderingContext2D, bodies: PhysicsBodyState[]): void;
|
|
15
|
-
export declare function GauntletChrome({ layout, states }: {
|
|
15
|
+
export declare function GauntletChrome({ layout, states, compact }: {
|
|
16
16
|
layout: GauntletLayout;
|
|
17
17
|
states: readonly GauntletProjectState[];
|
|
18
|
+
compact?: boolean;
|
|
18
19
|
}): React.JSX.Element;
|
|
19
20
|
export declare function gauntletSemanticItem(body: PhysicsBodyState): false | {
|
|
20
21
|
label: string;
|
|
@@ -10,7 +10,7 @@ export { CORE_KIND, POSITIVE_KIND, NEGATIVE_KIND } from "./gauntletTypes";
|
|
|
10
10
|
export type { GauntletAccessors, GauntletBodyDatum, GauntletCoreBodyFn, GauntletEffect, GauntletEvent, GauntletEventContext, GauntletEventLogItem, GauntletGate, GauntletLayout, GauntletNegativeReplacementOptions, GauntletPopSpec, GauntletProjectPlacement, GauntletProjectPlacementFn, GauntletProjectState, GauntletPropertyDefinition, GauntletPropertyForceContext, GauntletPropertyWorkPlan, GauntletPropertyWorkPlanOptions, GauntletViabilityFn } from "./gauntletTypes";
|
|
11
11
|
export declare const DEFAULT_WIDTH = 900;
|
|
12
12
|
export declare const DEFAULT_HEIGHT = 520;
|
|
13
|
-
export declare function gauntletWallColliders(layout: Pick<GauntletLayout, "width" | "floorY">): NonNullable<PhysicsPipelineConfig["colliders"]>;
|
|
13
|
+
export declare function gauntletWallColliders(layout: Pick<GauntletLayout, "width" | "floorY"> & Partial<Pick<GauntletLayout, "height">>): NonNullable<PhysicsPipelineConfig["colliders"]>;
|
|
14
14
|
export declare function readAccessor<TDatum extends Datum, TValue>(datum: TDatum, index: number, accessor: ChartAccessor<TDatum, TValue> | undefined, fallback: TValue): TValue;
|
|
15
15
|
export declare function propertyLabel(property: GauntletPropertyDefinition | undefined): string;
|
|
16
16
|
export declare function projectCoreId(projectId: string): string;
|
|
@@ -23,19 +23,34 @@ export declare const GAUNTLET_WALL: {
|
|
|
23
23
|
readonly rightInset: 30;
|
|
24
24
|
readonly thickness: 8;
|
|
25
25
|
};
|
|
26
|
+
type GauntletWallLayout = Pick<GauntletLayout, "width" | "floorY"> & Partial<Pick<GauntletLayout, "height">>;
|
|
27
|
+
/** Scale the authored gauntlet corridor into context and sparkline boxes. */
|
|
28
|
+
export declare function resolveGauntletWall(layout: GauntletWallLayout): {
|
|
29
|
+
readonly left: 28;
|
|
30
|
+
readonly top: 76;
|
|
31
|
+
readonly rightInset: 30;
|
|
32
|
+
readonly thickness: 8;
|
|
33
|
+
} | {
|
|
34
|
+
left: number;
|
|
35
|
+
top: number;
|
|
36
|
+
rightInset: number;
|
|
37
|
+
thickness: number;
|
|
38
|
+
};
|
|
39
|
+
/** Scale default body/orbit geometry while preserving authored full-size values. */
|
|
40
|
+
export declare function gauntletSpatialScale(layout: GauntletWallLayout): number;
|
|
26
41
|
/**
|
|
27
42
|
* Keep body centers inside the playable gauntlet corridor so satellite
|
|
28
43
|
* property particles never spawn or settle outside the left/right walls
|
|
29
44
|
* (the "stuck on the left" regression for Homes on Main Street).
|
|
30
45
|
*/
|
|
31
|
-
export declare function clampGauntletPoint(x: number, y: number, radius: number, layout:
|
|
46
|
+
export declare function clampGauntletPoint(x: number, y: number, radius: number, layout: GauntletWallLayout): {
|
|
32
47
|
x: number;
|
|
33
48
|
y: number;
|
|
34
49
|
};
|
|
35
50
|
export declare function buildLayout(size: [number, number], gates: readonly GauntletGate[] | undefined, crashOffset: number): GauntletLayout;
|
|
36
51
|
export declare function defaultPlacement(layout: GauntletLayout): Required<GauntletProjectPlacement>;
|
|
37
52
|
export declare function resolvePlacement<TDatum extends Datum>(project: GauntletProjectState<TDatum>, index: number, layout: GauntletLayout, projectPlacement: GauntletProjectPlacementFn<TDatum> | undefined): Required<GauntletProjectPlacement>;
|
|
38
|
-
export declare function featureSlot(ids: readonly string[], id: string): {
|
|
53
|
+
export declare function featureSlot(ids: readonly string[], id: string, spatialScale?: number): {
|
|
39
54
|
angle: number;
|
|
40
55
|
index: number;
|
|
41
56
|
radius: number;
|
|
@@ -68,4 +83,4 @@ export declare function buildGauntletPhysics<TDatum extends Datum = Datum>(optio
|
|
|
68
83
|
initialSpawns: PhysicsQueuedSpawn[];
|
|
69
84
|
layout: GauntletLayout;
|
|
70
85
|
};
|
|
71
|
-
export declare function buildNegativeSpawn<TDatum extends Datum>(project: GauntletProjectState<TDatum>, property: GauntletPropertyDefinition, index: number, x: number, y: number, layout:
|
|
86
|
+
export declare function buildNegativeSpawn<TDatum extends Datum>(project: GauntletProjectState<TDatum>, property: GauntletPropertyDefinition, index: number, x: number, y: number, layout: GauntletWallLayout, spawnAt?: number): PhysicsQueuedSpawn;
|
|
@@ -34,7 +34,10 @@ export declare function spawnBodiesForGauntletEffect<TDatum extends Datum>(optio
|
|
|
34
34
|
color?: string;
|
|
35
35
|
durationMs?: number;
|
|
36
36
|
radius?: number;
|
|
37
|
+
scale?: number;
|
|
37
38
|
}) => unknown;
|
|
39
|
+
/** Uniform pop-burst scale (see StreamPhysicsPopOptions.scale). */
|
|
40
|
+
popScale?: number;
|
|
38
41
|
}): void;
|
|
39
42
|
export declare function projectRouteTarget<TDatum extends Datum>(elapsed: number, project: GauntletProjectState<TDatum>, layout: GauntletLayout, placement: Required<GauntletProjectPlacement>, events: readonly GauntletEvent[], gateById: Map<string, GauntletLayout["gates"][number]>, terminalBehavior: "outcome" | "hold-last"): {
|
|
40
43
|
x: number;
|
|
@@ -21,6 +21,18 @@ export type PhysicsSharedChartProps = {
|
|
|
21
21
|
};
|
|
22
22
|
/** Galton / pile sampling mode (orthogonal to ChartMode display modes). */
|
|
23
23
|
export type PhysicsSimulationMode = "sample" | "mechanical";
|
|
24
|
+
/** Delay between a settled physics run and a fresh seeded replay. */
|
|
25
|
+
export type PhysicsRerunMS = number | null;
|
|
26
|
+
/**
|
|
27
|
+
* Add an optional settle -> delay -> remount loop to a physics HOC.
|
|
28
|
+
*
|
|
29
|
+
* Remounting is intentional: it replays the chart's deterministic seed,
|
|
30
|
+
* initial bodies, and spawn pacing instead of trying to reverse a live store.
|
|
31
|
+
*/
|
|
32
|
+
export declare function usePhysicsRerun(config: StreamPhysicsFrameProps["config"], rerunMS: PhysicsRerunMS | undefined, paused: boolean | undefined, onRerun?: () => void): {
|
|
33
|
+
config: StreamPhysicsFrameProps["config"];
|
|
34
|
+
rerunKey: number;
|
|
35
|
+
};
|
|
24
36
|
/**
|
|
25
37
|
* Split ChartMode (`primary`/`context`/`sparkline`/`mobile`) from the
|
|
26
38
|
* Galton/pile `sample`/`mechanical` simulation mode. Accepts legacy
|
|
@@ -9,6 +9,8 @@ import type { Datum } from "../shared/datumTypes";
|
|
|
9
9
|
import type { AutoPlaceAnnotations } from "../../recipes/annotationLayout";
|
|
10
10
|
import type { MobileVisualizationContract } from "../shared/auditMobileVisualization";
|
|
11
11
|
import type { ResponsiveRule } from "../shared/responsiveRules";
|
|
12
|
+
import type { LegendValue } from "../../types/legendTypes";
|
|
13
|
+
import type { PartialMargin } from "../../types/marginType";
|
|
12
14
|
export type RealtimeHistogramDirection = "up" | "down";
|
|
13
15
|
export interface RealtimeHistogramProps<TDatum extends Datum = Datum> {
|
|
14
16
|
/** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
|
|
@@ -28,12 +30,7 @@ export interface RealtimeHistogramProps<TDatum extends Datum = Datum> {
|
|
|
28
30
|
/** Chart height (alternative to size) */
|
|
29
31
|
height?: number;
|
|
30
32
|
/** Chart margins */
|
|
31
|
-
margin?:
|
|
32
|
-
top?: number;
|
|
33
|
-
right?: number;
|
|
34
|
-
bottom?: number;
|
|
35
|
-
left?: number;
|
|
36
|
-
};
|
|
33
|
+
margin?: PartialMargin;
|
|
37
34
|
/** CSS class name */
|
|
38
35
|
className?: string;
|
|
39
36
|
onObservation?: OnObservationCallback;
|
|
@@ -151,6 +148,8 @@ export interface RealtimeHistogramProps<TDatum extends Datum = Datum> {
|
|
|
151
148
|
emphasis?: "primary" | "secondary";
|
|
152
149
|
/** Show a legend */
|
|
153
150
|
showLegend?: boolean;
|
|
151
|
+
/** Additional legend content. Categorical groups follow the inferred category legend. */
|
|
152
|
+
legend?: LegendValue;
|
|
154
153
|
/** Legend position */
|
|
155
154
|
legendPosition?: LegendPosition;
|
|
156
155
|
/** Legend interaction mode */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
2
|
+
import type { ChartAccessor } from "../shared/types";
|
|
3
|
+
/** Resolve the reversed value domain used by downward temporal histograms. */
|
|
4
|
+
export declare function resolveDownwardHistogramExtent<TDatum extends Datum>({ data, valueAccessor, timeAccessor, binSize, valueExtent, extentPadding, }: {
|
|
5
|
+
data: readonly TDatum[] | undefined;
|
|
6
|
+
valueAccessor: ChartAccessor<TDatum, number> | undefined;
|
|
7
|
+
timeAccessor: ChartAccessor<TDatum, number> | undefined;
|
|
8
|
+
binSize: number;
|
|
9
|
+
valueExtent: [number, number] | undefined;
|
|
10
|
+
extentPadding: number | undefined;
|
|
11
|
+
}): [number, number] | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Datum } from "./datumTypes";
|
|
2
|
+
export interface PrepareAreaSeriesDataOptions<TDatum extends Datum = Datum> {
|
|
3
|
+
/** Original prop value; null/undefined means the chart has no bounded data. */
|
|
4
|
+
data: unknown;
|
|
5
|
+
/** Sparse-filtered rows used by the chart setup pipeline. */
|
|
6
|
+
safeData: TDatum[];
|
|
7
|
+
areaBy?: string | ((datum: TDatum) => unknown);
|
|
8
|
+
lineDataAccessor: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Normalize AreaChart's two public data shapes into frame-ready point rows.
|
|
12
|
+
* Kept independent of React so the HOC and synchronous server renderer use
|
|
13
|
+
* exactly the same grouping/flattening semantics.
|
|
14
|
+
*/
|
|
15
|
+
export declare function prepareAreaSeriesData<TDatum extends Datum = Datum>({ data, safeData, areaBy, lineDataAccessor, }: PrepareAreaSeriesDataOptions<TDatum>): TDatum[];
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ChartMode, LinkedHoverProp, MobileInteractionProp, ResolvedMobileInteractionConfig } from "./types";
|
|
2
|
+
import type { MobileVisualizationContract } from "./auditMobileVisualization";
|
|
3
|
+
import type { ResponsiveRule } from "./responsiveRules";
|
|
4
|
+
export declare const MOBILE_INTERACTION_TARGET_SIZE = 44;
|
|
5
|
+
export declare const MOBILE_INTERACTION_MIN_HIT_RADIUS = 24;
|
|
6
|
+
export declare const MOBILE_INTERACTION_DEFAULTS: ResolvedMobileInteractionConfig;
|
|
7
|
+
export declare const DISABLED_MOBILE_INTERACTION: ResolvedMobileInteractionConfig;
|
|
8
|
+
export declare function resolveMobileInteraction(input: MobileInteractionProp | undefined, context?: {
|
|
9
|
+
mode?: ChartMode;
|
|
10
|
+
width?: number;
|
|
11
|
+
mobileSemantics?: MobileVisualizationContract;
|
|
12
|
+
}): ResolvedMobileInteractionConfig;
|
|
13
|
+
/** Runtime guard for public prop bags where `mode` may be chart-specific. */
|
|
14
|
+
export declare function isChartMode(value: unknown): value is ChartMode;
|
|
15
|
+
export interface ChartModeInput {
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
showAxes?: boolean;
|
|
19
|
+
showGrid?: boolean;
|
|
20
|
+
enableHover?: boolean;
|
|
21
|
+
showLegend?: boolean;
|
|
22
|
+
showLabels?: boolean;
|
|
23
|
+
showCategoryTicks?: boolean;
|
|
24
|
+
orientation?: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
summary?: string;
|
|
28
|
+
accessibleTable?: boolean;
|
|
29
|
+
xLabel?: string;
|
|
30
|
+
yLabel?: string;
|
|
31
|
+
categoryLabel?: string;
|
|
32
|
+
valueLabel?: string;
|
|
33
|
+
linkedHover?: LinkedHoverProp;
|
|
34
|
+
mobileInteraction?: MobileInteractionProp;
|
|
35
|
+
mobileSemantics?: MobileVisualizationContract;
|
|
36
|
+
responsiveRules?: ResponsiveRule[];
|
|
37
|
+
}
|
|
38
|
+
export interface ChartModeResult {
|
|
39
|
+
/** Effective mode after responsive rules have been applied. */
|
|
40
|
+
mode: ChartMode;
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
showAxes: boolean;
|
|
44
|
+
showGrid: boolean;
|
|
45
|
+
enableHover: boolean;
|
|
46
|
+
showLegend: boolean | undefined;
|
|
47
|
+
showLabels: boolean | undefined;
|
|
48
|
+
title: string | undefined;
|
|
49
|
+
description: string | undefined;
|
|
50
|
+
summary: string | undefined;
|
|
51
|
+
accessibleTable: boolean | undefined;
|
|
52
|
+
xLabel: string | undefined;
|
|
53
|
+
yLabel: string | undefined;
|
|
54
|
+
categoryLabel: string | undefined;
|
|
55
|
+
valueLabel: string | undefined;
|
|
56
|
+
marginDefaults: {
|
|
57
|
+
top: number;
|
|
58
|
+
bottom: number;
|
|
59
|
+
left: number;
|
|
60
|
+
right: number;
|
|
61
|
+
};
|
|
62
|
+
compactMode: boolean;
|
|
63
|
+
mobileInteraction: ResolvedMobileInteractionConfig;
|
|
64
|
+
mobileSemantics: MobileVisualizationContract | undefined;
|
|
65
|
+
}
|
|
66
|
+
export declare function resolveChartMode(mode: ChartMode | undefined, userProps: ChartModeInput, primaryDefaults?: {
|
|
67
|
+
width?: number;
|
|
68
|
+
height?: number;
|
|
69
|
+
}): ChartModeResult;
|
|
70
|
+
/**
|
|
71
|
+
* Axis-free charts keep their established 10px regular-mode inset while
|
|
72
|
+
* adopting the shared context/sparkline margins. Reading `resolved` here is
|
|
73
|
+
* important: responsive rules may have changed the effective chart mode.
|
|
74
|
+
*/
|
|
75
|
+
export declare function resolveAxisFreeMarginDefaults(resolved: Pick<ChartModeResult, "compactMode" | "marginDefaults">): ChartModeResult["marginDefaults"];
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* schema.json (and MCP responses) but are dropped from validationMap
|
|
33
33
|
* (which only reads `type` and `enum`).
|
|
34
34
|
*/
|
|
35
|
-
export type PropType = "string" | "number" | "boolean" | "array" | "object" | "function";
|
|
35
|
+
export type PropType = "string" | "number" | "boolean" | "array" | "object" | "function" | "null";
|
|
36
36
|
export type DataShape = "array" | "object" | "network" | "realtime" | "none";
|
|
37
37
|
export type ChartCategory = "xy" | "ordinal" | "network" | "geo" | "realtime" | "physics" | "value";
|
|
38
38
|
/**
|
|
@@ -157,7 +157,7 @@ export declare const ORIENTATION_ENUM: readonly ["vertical", "horizontal"];
|
|
|
157
157
|
export declare const HORIZONTAL_VERTICAL_ENUM: readonly ["horizontal", "vertical"];
|
|
158
158
|
export declare const LEGEND_POSITION_ENUM: readonly ["right", "left", "top", "bottom"];
|
|
159
159
|
export declare const CURVE_ENUM: readonly ["linear", "monotoneX", "monotoneY", "step", "stepAfter", "stepBefore", "basis", "cardinal", "catmullRom"];
|
|
160
|
-
export declare const CHART_MODE_ENUM: readonly ["primary", "context", "sparkline"];
|
|
160
|
+
export declare const CHART_MODE_ENUM: readonly ["primary", "context", "sparkline", "mobile"];
|
|
161
161
|
/**
|
|
162
162
|
* Compose a chart's full prop set (bags + ownProps) in deterministic order.
|
|
163
163
|
* ownProps wins on key collision so a chart can override a shared default.
|
|
@@ -7,6 +7,14 @@ export declare const COLOR_SCHEMES: Record<string, readonly string[] | ((t: numb
|
|
|
7
7
|
* Default colors for charts
|
|
8
8
|
*/
|
|
9
9
|
export declare const DEFAULT_COLORS: readonly string[];
|
|
10
|
+
/** Uniform mark color when no categorical encoding or theme is active. */
|
|
11
|
+
export declare const DEFAULT_COLOR = "#007bff";
|
|
12
|
+
/**
|
|
13
|
+
* Resolve a categorical palette with one precedence contract for React HOCs,
|
|
14
|
+
* streaming/custom layouts, and server rendering. Explicit settings always
|
|
15
|
+
* win; the ambient theme is the default, not an override.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveCategoricalPalette(colorScheme: string | string[] | Record<string, string> | undefined, themeCategorical: readonly string[] | undefined, fallback?: readonly string[]): readonly string[];
|
|
10
18
|
/**
|
|
11
19
|
* Pastel palette for depth-based hierarchy coloring (Treemap, CirclePack, TreeDiagram).
|
|
12
20
|
* Index corresponds to hierarchy depth, wraps via modulo.
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* />
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
+
import type { HatchFill } from "./hatchFill";
|
|
15
16
|
export interface HatchPatternOptions {
|
|
16
17
|
/** Background color of the pattern tile */
|
|
17
18
|
background?: string;
|
|
@@ -27,9 +28,13 @@ export interface HatchPatternOptions {
|
|
|
27
28
|
/**
|
|
28
29
|
* Create a repeating diagonal-line hatch pattern for canvas fills.
|
|
29
30
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
31
|
+
* In a browser (canvas available) returns a `CanvasPattern`. In server/test
|
|
32
|
+
* environments — where canvas is unavailable — returns the equivalent
|
|
33
|
+
* serializable {@link HatchFill} descriptor instead of `null`, so the same
|
|
34
|
+
* `pieceStyle`/`nodeStyle` renders a hatch through the SVG path rather than
|
|
35
|
+
* collapsing to the solid fallback. Use {@link isHatchFill} to distinguish the
|
|
36
|
+
* two forms; both are valid as a `style.fill`.
|
|
32
37
|
*/
|
|
33
38
|
export declare function createHatchPattern(options?: HatchPatternOptions,
|
|
34
39
|
/** Optional target canvas to create the pattern on (for correct DPR scaling) */
|
|
35
|
-
targetCtx?: CanvasRenderingContext2D): CanvasPattern | null;
|
|
40
|
+
targetCtx?: CanvasRenderingContext2D): CanvasPattern | HatchFill | null;
|
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
export { DEFAULT_COLOR } from "./colorUtils";
|
|
2
2
|
import type { SelectionHookResult } from "./selectionUtils";
|
|
3
3
|
import type { OnObservationCallback } from "../../store/ObservationStore";
|
|
4
|
-
import type { Accessor, SelectionConfig, LinkedHoverProp, ChartMode, HoverHighlightMode,
|
|
4
|
+
import type { Accessor, SelectionConfig, LinkedHoverProp, ChartMode, HoverHighlightMode, ResolvedMobileInteractionConfig } from "./types";
|
|
5
5
|
import type { MarginType, PartialMargin } from "../../types/marginType";
|
|
6
6
|
import type { TransitionConfig } from "../../stream/types";
|
|
7
|
+
import type { LegendValue } from "../../types/legendTypes";
|
|
7
8
|
import type { Datum } from "./datumTypes";
|
|
8
|
-
import type {
|
|
9
|
-
|
|
9
|
+
import type { ChartModeInput, ChartModeResult } from "./chartMode";
|
|
10
|
+
export { DISABLED_MOBILE_INTERACTION, MOBILE_INTERACTION_DEFAULTS, MOBILE_INTERACTION_MIN_HIT_RADIUS, MOBILE_INTERACTION_TARGET_SIZE, isChartMode, resolveChartMode, resolveMobileInteraction, } from "./chartMode";
|
|
11
|
+
export type { ChartModeInput, ChartModeResult } from "./chartMode";
|
|
10
12
|
import type { SemanticClickBehavior, SemanticHoverBehavior } from "./semanticInteractions";
|
|
11
|
-
/**
|
|
12
|
-
* Default fill color used when no colorBy is specified
|
|
13
|
-
*/
|
|
14
|
-
export declare const DEFAULT_COLOR = "#007bff";
|
|
15
|
-
export declare const MOBILE_INTERACTION_TARGET_SIZE = 44;
|
|
16
|
-
export declare const MOBILE_INTERACTION_MIN_HIT_RADIUS = 24;
|
|
17
|
-
export declare const MOBILE_INTERACTION_DEFAULTS: ResolvedMobileInteractionConfig;
|
|
18
|
-
export declare const DISABLED_MOBILE_INTERACTION: ResolvedMobileInteractionConfig;
|
|
19
|
-
export declare function resolveMobileInteraction(input: MobileInteractionProp | undefined, context?: {
|
|
20
|
-
mode?: ChartMode;
|
|
21
|
-
width?: number;
|
|
22
|
-
mobileSemantics?: MobileVisualizationContract;
|
|
23
|
-
}): ResolvedMobileInteractionConfig;
|
|
24
13
|
/**
|
|
25
14
|
* Returns the theme's categorical palette, or undefined if no ThemeProvider or
|
|
26
15
|
* the palette is empty. Safe to call outside a ThemeProvider (returns undefined).
|
|
@@ -113,7 +102,7 @@ export declare function getCrosshairProps(linkedHover: unknown, crosshairSourceI
|
|
|
113
102
|
* expansion pattern that every chart with color encoding repeats.
|
|
114
103
|
*/
|
|
115
104
|
export type LegendPosition = "right" | "left" | "top" | "bottom";
|
|
116
|
-
export declare function useChartLegendAndMargin({ data, colorBy, colorScale, showLegend, legendPosition, userMargin, defaults, categories, }: {
|
|
105
|
+
export declare function useChartLegendAndMargin({ data, colorBy, colorScale, showLegend, legendPosition, userMargin, defaults, categories, additionalLegend, }: {
|
|
117
106
|
data: Array<Datum>;
|
|
118
107
|
colorBy: Accessor<string> | undefined;
|
|
119
108
|
colorScale: ((v: string) => string) | undefined;
|
|
@@ -122,8 +111,10 @@ export declare function useChartLegendAndMargin({ data, colorBy, colorScale, sho
|
|
|
122
111
|
userMargin: PartialMargin | undefined;
|
|
123
112
|
defaults?: MarginType;
|
|
124
113
|
categories?: string[];
|
|
114
|
+
/** Caller legend composed after the chart's inferred categorical groups. */
|
|
115
|
+
additionalLegend?: LegendValue;
|
|
125
116
|
}): {
|
|
126
|
-
legend:
|
|
117
|
+
legend: LegendValue | undefined;
|
|
127
118
|
margin: MarginType;
|
|
128
119
|
legendPosition: LegendPosition;
|
|
129
120
|
};
|
|
@@ -153,67 +144,10 @@ export interface LegendInteractionState {
|
|
|
153
144
|
* - "isolate": click toggles category visibility; click all to reset
|
|
154
145
|
*/
|
|
155
146
|
export declare function useLegendInteraction(mode: LegendInteractionMode | undefined, colorBy: string | ((d: Datum) => string) | undefined, allCategories: string[]): LegendInteractionState;
|
|
156
|
-
interface ChartModeInput {
|
|
157
|
-
width?: number;
|
|
158
|
-
height?: number;
|
|
159
|
-
showAxes?: boolean;
|
|
160
|
-
showGrid?: boolean;
|
|
161
|
-
enableHover?: boolean;
|
|
162
|
-
showLegend?: boolean;
|
|
163
|
-
showLabels?: boolean;
|
|
164
|
-
showCategoryTicks?: boolean;
|
|
165
|
-
/** "vertical" | "horizontal" — used to shrink the category-axis margin when showCategoryTicks is false */
|
|
166
|
-
orientation?: string;
|
|
167
|
-
title?: string;
|
|
168
|
-
description?: string;
|
|
169
|
-
summary?: string;
|
|
170
|
-
accessibleTable?: boolean;
|
|
171
|
-
xLabel?: string;
|
|
172
|
-
yLabel?: string;
|
|
173
|
-
categoryLabel?: string;
|
|
174
|
-
valueLabel?: string;
|
|
175
|
-
/** When truthy, enableHover is forced true regardless of mode (LinkedCharts needs hover) */
|
|
176
|
-
linkedHover?: LinkedHoverProp;
|
|
177
|
-
/** Optional mobile interaction policy surfaced through useChartMode for custom wrappers. */
|
|
178
|
-
mobileInteraction?: MobileInteractionProp;
|
|
179
|
-
/** Optional mobile semantic contract surfaced through useChartMode for custom wrappers. */
|
|
180
|
-
mobileSemantics?: MobileVisualizationContract;
|
|
181
|
-
/** Semantic responsive transformations resolved before mode defaults. */
|
|
182
|
-
responsiveRules?: ResponsiveRule[];
|
|
183
|
-
}
|
|
184
|
-
/** Result of {@link useChartMode} — exported so declaration emit can name it. */
|
|
185
|
-
export interface ChartModeResult {
|
|
186
|
-
width: number;
|
|
187
|
-
height: number;
|
|
188
|
-
showAxes: boolean;
|
|
189
|
-
showGrid: boolean;
|
|
190
|
-
enableHover: boolean;
|
|
191
|
-
showLegend: boolean | undefined;
|
|
192
|
-
showLabels: boolean | undefined;
|
|
193
|
-
title: string | undefined;
|
|
194
|
-
description: string | undefined;
|
|
195
|
-
summary: string | undefined;
|
|
196
|
-
accessibleTable: boolean | undefined;
|
|
197
|
-
xLabel: string | undefined;
|
|
198
|
-
yLabel: string | undefined;
|
|
199
|
-
categoryLabel: string | undefined;
|
|
200
|
-
valueLabel: string | undefined;
|
|
201
|
-
marginDefaults: {
|
|
202
|
-
top: number;
|
|
203
|
-
bottom: number;
|
|
204
|
-
left: number;
|
|
205
|
-
right: number;
|
|
206
|
-
};
|
|
207
|
-
/** True when mode is context or sparkline — the "hide interactive chrome" union. */
|
|
208
|
-
compactMode: boolean;
|
|
209
|
-
/** Resolved touch-first behavior for mobile-capable wrappers. */
|
|
210
|
-
mobileInteraction: ResolvedMobileInteractionConfig;
|
|
211
|
-
/** Mobile semantic contract after matching responsive rules are applied. */
|
|
212
|
-
mobileSemantics: MobileVisualizationContract | undefined;
|
|
213
|
-
}
|
|
214
147
|
/**
|
|
215
|
-
*
|
|
216
|
-
*
|
|
148
|
+
* React-facing alias for {@link resolveChartMode}. Mode resolution is kept
|
|
149
|
+
* pure so non-React renderers (notably semiotic/server) consume the exact same
|
|
150
|
+
* defaults and responsive-rule contract as chart HOCs.
|
|
217
151
|
*/
|
|
218
152
|
export declare function useChartMode(mode: ChartMode | undefined, userProps: ChartModeInput, primaryDefaults?: {
|
|
219
153
|
width?: number;
|
|
@@ -227,4 +161,3 @@ export declare function resolveAnimateConfig(animate: boolean | {
|
|
|
227
161
|
duration?: number;
|
|
228
162
|
easing?: "linear" | "ease-out";
|
|
229
163
|
} | undefined): TransitionConfig | undefined;
|
|
230
|
-
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure LineChart series-feature prep for the SSR / renderChart path.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the client HOC orchestration of:
|
|
5
|
+
* - `useSeriesFeatures` (forecast / anomaly via `buildForecast`)
|
|
6
|
+
* - gapStrategy (break / interpolate / zero)
|
|
7
|
+
* - directLabel endpoint annotations
|
|
8
|
+
* - segment-aware lineStyle (createSegmentLineStyle)
|
|
9
|
+
*
|
|
10
|
+
* Client uses lazy dynamic import + React state for these; SSR can call
|
|
11
|
+
* the pure statisticalOverlays entry points synchronously.
|
|
12
|
+
*/
|
|
13
|
+
import type { Datum } from "./datumTypes";
|
|
14
|
+
import { type AnomalyConfig, type ForecastConfig } from "./statisticalOverlays";
|
|
15
|
+
export interface LineSeriesSsrInput {
|
|
16
|
+
data: unknown;
|
|
17
|
+
xAccessor?: string | ((d: Datum) => unknown);
|
|
18
|
+
yAccessor?: string | ((d: Datum) => unknown);
|
|
19
|
+
lineBy?: string | ((d: Datum) => unknown);
|
|
20
|
+
colorBy?: string | ((d: Datum) => unknown);
|
|
21
|
+
colorScheme?: unknown;
|
|
22
|
+
color?: string;
|
|
23
|
+
forecast?: ForecastConfig;
|
|
24
|
+
anomaly?: AnomalyConfig;
|
|
25
|
+
gapStrategy?: "break" | "interpolate" | "zero";
|
|
26
|
+
directLabel?: boolean | {
|
|
27
|
+
position?: "start" | "end";
|
|
28
|
+
fontSize?: number;
|
|
29
|
+
};
|
|
30
|
+
/** Existing annotations to merge with statistical + direct-label ones. */
|
|
31
|
+
annotations?: Datum[];
|
|
32
|
+
themeCategorical?: string[];
|
|
33
|
+
/** Base lineStyle from buildLineStyle — wrapped with segment styling when forecast is set. */
|
|
34
|
+
baseLineStyle?: (d: Datum, group?: string) => Datum;
|
|
35
|
+
}
|
|
36
|
+
export interface LineSeriesSsrResult {
|
|
37
|
+
data: Datum[];
|
|
38
|
+
xAccessor: string | ((d: Datum) => unknown);
|
|
39
|
+
yAccessor: string | ((d: Datum) => unknown);
|
|
40
|
+
groupAccessor: string | ((d: Datum) => unknown) | undefined;
|
|
41
|
+
colorAccessor: string | ((d: Datum) => unknown) | undefined;
|
|
42
|
+
annotations: Datum[];
|
|
43
|
+
lineStyle?: (d: Datum, group?: string) => Datum;
|
|
44
|
+
yExtent?: [number, number];
|
|
45
|
+
/** Extra right/left margin for direct labels. */
|
|
46
|
+
marginExtra?: {
|
|
47
|
+
left?: number;
|
|
48
|
+
right?: number;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Prepare LineChart props for static SSR: forecast/anomaly data + annotations,
|
|
53
|
+
* gap handling, direct labels, segment lineStyle.
|
|
54
|
+
*/
|
|
55
|
+
export declare function prepareLineSeriesForSsr(input: LineSeriesSsrInput): LineSeriesSsrResult;
|
|
@@ -43,7 +43,7 @@ export type LinkedBrushProp = string | {
|
|
|
43
43
|
yField?: string;
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
|
-
* Chart display mode — controls default
|
|
46
|
+
* Chart display mode — controls default decoration, size, and interaction.
|
|
47
47
|
* User-provided props always override mode defaults.
|
|
48
48
|
*/
|
|
49
49
|
export type ChartMode = "primary" | "context" | "sparkline" | "mobile";
|
|
@@ -98,7 +98,7 @@ export interface ResolvedMobileInteractionConfig {
|
|
|
98
98
|
* Base props shared across all chart components
|
|
99
99
|
*/
|
|
100
100
|
export interface BaseChartProps {
|
|
101
|
-
/** Display mode: "primary" (full
|
|
101
|
+
/** Display mode: "primary" (full decoration), "context" (compact), "sparkline" (inline), or "mobile" (touch-first) */
|
|
102
102
|
mode?: ChartMode;
|
|
103
103
|
/** Chart width in pixels. Default: 600 */
|
|
104
104
|
width?: number;
|
|
@@ -7,6 +7,7 @@ import type { OnObservationCallback } from "../../store/ObservationStore";
|
|
|
7
7
|
import type { PartialMargin } from "../../types/marginType";
|
|
8
8
|
import type { SelectionHookResult } from "./selectionUtils";
|
|
9
9
|
import type { ReactElement, ReactNode } from "react";
|
|
10
|
+
import type { LegendValue } from "../../types/legendTypes";
|
|
10
11
|
/**
|
|
11
12
|
* Input parameters for useChartSetup.
|
|
12
13
|
*
|
|
@@ -43,6 +44,8 @@ export interface ChartSetupInput {
|
|
|
43
44
|
chartId: string | undefined;
|
|
44
45
|
/** Show legend override */
|
|
45
46
|
showLegend: boolean | undefined;
|
|
47
|
+
/** Caller legend appended to inferred categorical legend groups. */
|
|
48
|
+
legend?: LegendValue;
|
|
46
49
|
/** User-provided margin */
|
|
47
50
|
userMargin: PartialMargin | undefined;
|
|
48
51
|
/** Mode-resolved margin defaults */
|
|
@@ -8,6 +8,7 @@ import type { OnObservationCallback } from "../../store/ObservationStore";
|
|
|
8
8
|
import { type PartialMargin, type MarginType } from "../../types/marginType";
|
|
9
9
|
import type { Datum } from "./datumTypes";
|
|
10
10
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
11
|
+
import type { LegendValue } from "../../types/legendTypes";
|
|
11
12
|
/**
|
|
12
13
|
* Margin shorthand → sided form. The Stream*Frame margin props only
|
|
13
14
|
* accept the sided object form, so HOCs that expose the user-friendly
|
|
@@ -64,6 +65,8 @@ interface DataSetupOptions extends ScaffoldOptions {
|
|
|
64
65
|
colorScheme?: string | string[] | Record<string, string>;
|
|
65
66
|
/** Semantic color accessor for legend, linked-hover series mode, and frame color config. */
|
|
66
67
|
colorBy?: Accessor<string>;
|
|
68
|
+
/** Caller legend appended to the inferred colorBy legend. */
|
|
69
|
+
legend?: LegendValue;
|
|
67
70
|
/** Pass-through chart-setup inputs. */
|
|
68
71
|
selection?: SelectionConfig;
|
|
69
72
|
linkedHover?: LinkedHoverProp;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Datum } from "./datumTypes";
|
|
2
2
|
import type { Accessor, ChartAccessor } from "./types";
|
|
3
3
|
import type { SelectionHookResult, SelectionStyleConfig } from "./selectionUtils";
|
|
4
|
-
import
|
|
5
|
-
|
|
4
|
+
import type { XYLineBaseStyleOptions } from "./xyLineStyle";
|
|
5
|
+
import type { StyleRule, StyleRuleContext } from "./styleRules";
|
|
6
|
+
export interface XYLineStyleOptions extends XYLineBaseStyleOptions {
|
|
6
7
|
/**
|
|
7
8
|
* Base stroke width. The top-level `strokeWidth` override below
|
|
8
9
|
* wins via `mergeShapeStyle` when both are supplied.
|
|
@@ -5,7 +5,7 @@ export interface ValidationResult {
|
|
|
5
5
|
valid: boolean;
|
|
6
6
|
errors: string[];
|
|
7
7
|
}
|
|
8
|
-
export type PropType = "string" | "number" | "boolean" | "array" | "object" | "function";
|
|
8
|
+
export type PropType = "string" | "number" | "boolean" | "array" | "object" | "function" | "null";
|
|
9
9
|
export interface PropDef {
|
|
10
10
|
type: PropType | PropType[];
|
|
11
11
|
enum?: readonly string[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Datum } from "./datumTypes";
|
|
2
|
+
import type { Accessor, ChartAccessor } from "./types";
|
|
3
|
+
import { type StyleRule, type StyleRuleContext } from "./styleRules";
|
|
4
|
+
/** Pure portion of the LineChart style contract, shared by CSR and SSR. */
|
|
5
|
+
export interface XYLineBaseStyleOptions {
|
|
6
|
+
lineWidth?: number;
|
|
7
|
+
colorBy?: Accessor<string> | ChartAccessor<Datum, string>;
|
|
8
|
+
colorScale?: (value: string) => string;
|
|
9
|
+
color?: string;
|
|
10
|
+
resolveStroke?: (datum: Datum, group?: string) => string;
|
|
11
|
+
fillArea?: boolean | string[];
|
|
12
|
+
areaOpacity?: number;
|
|
13
|
+
styleRules?: ReadonlyArray<StyleRule>;
|
|
14
|
+
ruleContext?: (datum: Datum, group?: string) => StyleRuleContext;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Build the deterministic data-to-style callback used before primitive and
|
|
18
|
+
* selection overlays. Keeping this free of React lets renderChart() apply the
|
|
19
|
+
* same default/color/fill/rule precedence as the client HOC.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildXYLineBaseStyle(options: XYLineBaseStyleOptions): (datum: Datum, group?: string) => Datum;
|