semiotic 3.8.6 → 3.8.7
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 +33 -7
- package/README.md +82 -55
- package/ai/behaviorContracts.cjs +86 -1
- package/ai/componentMetadata.cjs +4 -9
- package/ai/dist/mcp-server.js +97 -10
- package/ai/examples.md +154 -7
- package/ai/schema.json +1611 -145
- package/ai/surface-manifest.json +12 -10
- package/ai/system-prompt.md +9 -3
- package/dist/{chunk-chartContainerDataAudit-FEOD5GTQ.module.min.js → chunk-chartContainerDataAudit-JDSVSKGM.module.min.js} +1 -1
- package/dist/chunk-chunk-2YAZHXL4.module.min.js +2 -0
- package/dist/{chunk-chunk-G7WFWHAD.module.min.js → chunk-chunk-4ITOQRXM.module.min.js} +1 -1
- package/dist/chunk-chunk-5SD6BHVW.module.min.js +2 -0
- package/dist/chunk-chunk-6V5VQVCT.module.min.js +2 -0
- package/dist/chunk-chunk-7TTBHSAG.module.min.js +2 -0
- package/dist/chunk-chunk-7ZDJSYKI.module.min.js +2 -0
- package/dist/chunk-chunk-BGHPD3RA.module.min.js +1 -0
- package/dist/chunk-chunk-BMRZ2SPU.module.min.js +2 -0
- package/dist/chunk-chunk-BNGBEY7N.module.min.js +2 -0
- package/dist/chunk-chunk-C7APLVQD.module.min.js +2 -0
- package/dist/chunk-chunk-DGWFBOGB.module.min.js +1 -0
- package/dist/{chunk-chunk-Q2BS46W2.module.min.js → chunk-chunk-DIVE2DRA.module.min.js} +1 -1
- package/dist/chunk-chunk-FBUNUIPV.module.min.js +2 -0
- package/dist/chunk-chunk-FQPKOAIH.module.min.js +2 -0
- package/dist/chunk-chunk-FRO4TRXK.module.min.js +2 -0
- package/dist/chunk-chunk-G7QVPZUD.module.min.js +2 -0
- package/dist/chunk-chunk-GBPYV4FP.module.min.js +2 -0
- package/dist/chunk-chunk-GU2EJIDJ.module.min.js +2 -0
- package/dist/chunk-chunk-J5QD4RAM.module.min.js +2 -0
- package/dist/{chunk-chunk-RA7JCG7D.module.min.js → chunk-chunk-JWXLNZSM.module.min.js} +1 -1
- package/dist/chunk-chunk-KXAFCCDB.module.min.js +2 -0
- package/dist/chunk-chunk-LG7YKJAK.module.min.js +2 -0
- package/dist/{chunk-chunk-XP3OHHFX.module.min.js → chunk-chunk-LVHDZAT3.module.min.js} +1 -1
- package/dist/chunk-chunk-LWITSR2O.module.min.js +2 -0
- package/dist/{chunk-chunk-SMVD3EQJ.module.min.js → chunk-chunk-MX35T6RX.module.min.js} +1 -1
- package/dist/chunk-chunk-NH4MEAKP.module.min.js +2 -0
- package/dist/chunk-chunk-NJETWX42.module.min.js +2 -0
- package/dist/chunk-chunk-NW25WGLS.module.min.js +2 -0
- package/dist/{chunk-chunk-GFTVACTO.module.min.js → chunk-chunk-OI7R7EJB.module.min.js} +1 -1
- package/dist/{chunk-chunk-OM6NWS4H.module.min.js → chunk-chunk-ONMLEXHR.module.min.js} +1 -1
- package/dist/chunk-chunk-OY66GCE6.module.min.js +1 -0
- package/dist/chunk-chunk-PZFT457G.module.min.js +1 -0
- package/dist/chunk-chunk-Q3WW6JGR.module.min.js +1 -0
- package/dist/chunk-chunk-Q6XKQTOQ.module.min.js +1 -0
- package/dist/chunk-chunk-RJRM2E6P.module.min.js +1 -0
- package/dist/chunk-chunk-RPL7WYXI.module.min.js +1 -0
- package/dist/chunk-chunk-SV4XAZ3Q.module.min.js +1 -0
- package/dist/chunk-chunk-TSCFL235.module.min.js +1 -0
- package/dist/chunk-chunk-UOQRPGPK.module.min.js +2 -0
- package/dist/chunk-chunk-V3OAKG32.module.min.js +1 -0
- package/dist/chunk-chunk-WLOIUMWG.module.min.js +2 -0
- package/dist/chunk-chunk-XEGXX4F7.module.min.js +1 -0
- package/dist/chunk-chunk-XFRBLXYM.module.min.js +1 -0
- package/dist/chunk-chunk-Z2AJERX5.module.min.js +2 -0
- package/dist/chunk-chunk-ZXYDYAB7.module.min.js +2 -0
- package/dist/components/ai/SemioticVACPBridge.d.ts +22 -0
- package/dist/components/ai/chartCapabilities.d.ts +4 -3
- package/dist/components/ai/conversationArc.d.ts +2 -176
- package/dist/components/ai/conversationArcTypes.d.ts +202 -0
- package/dist/components/ai/readerGrounding.d.ts +12 -0
- package/dist/components/ai/vacpAdapter.d.ts +13 -0
- package/dist/components/ai/vacpAdapterActions.d.ts +2 -0
- package/dist/components/ai/vacpAdapterModel.d.ts +7 -0
- package/dist/components/ai/vacpAdapterRuntime.d.ts +26 -0
- package/dist/components/ai/vacpAdapterState.d.ts +3 -0
- package/dist/components/ai/vacpAdapterTypes.d.ts +169 -0
- package/dist/components/ai/vacpTypes.d.ts +160 -0
- package/dist/components/charts/index.d.ts +4 -4
- package/dist/components/charts/physics/ChainReactionChart.capability.d.ts +9 -0
- package/dist/components/charts/physics/ChainReactionChart.d.ts +29 -0
- package/dist/components/charts/physics/CollisionSwarmChart.d.ts +1 -1
- package/dist/components/charts/physics/EventDropChart.d.ts +7 -2
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +1 -1
- package/dist/components/charts/physics/{PhysicsPileChart.capability.d.ts → PacketFlowChart.capability.d.ts} +1 -1
- package/dist/components/charts/physics/{PhysicalFlowChart.d.ts → PacketFlowChart.d.ts} +22 -6
- package/dist/components/charts/physics/PhysicsCustomChart.d.ts +1 -1
- package/dist/components/charts/physics/ProcessFlowChart.d.ts +7 -4
- package/dist/components/charts/physics/{PhysicalFlowChart.capability.d.ts → UnitPileChart.capability.d.ts} +1 -1
- package/dist/components/charts/physics/{PhysicsPileChart.d.ts → UnitPileChart.d.ts} +19 -6
- package/dist/components/charts/physics/crucibleChartProps.d.ts +1 -1
- package/dist/components/charts/physics/crucibleChartUtils.d.ts +9 -0
- package/dist/components/charts/physics/gauntletChartProps.d.ts +6 -1
- package/dist/components/charts/physics/gauntletTerminal.d.ts +61 -0
- package/dist/components/charts/physics/packetFlowSemantics.d.ts +6 -0
- package/dist/components/charts/physics/physicsHocUtils.d.ts +45 -2
- package/dist/components/charts/shared/auditAccessibilityStyles.d.ts +9 -0
- package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
- package/dist/components/charts/shared/useChartLegend.d.ts +8 -1
- package/dist/components/charts/shared/useChartSetup.d.ts +7 -0
- package/dist/components/data/portability/capabilityBinding.d.ts +41 -0
- package/dist/components/data/portability/index.d.ts +2 -0
- package/dist/components/legendLayout.d.ts +56 -0
- package/dist/components/recipes/geographicDotGrid.d.ts +82 -0
- package/dist/components/recipes/geographicGrid.d.ts +100 -0
- package/dist/components/recipes/physics.d.ts +2 -0
- package/dist/components/recipes/physicsStageGeography.d.ts +137 -0
- package/dist/components/semiotic-ai.d.ts +4 -3
- package/dist/components/semiotic-experimental-vacp.d.ts +11 -0
- package/dist/components/semiotic-experimental.d.ts +6 -3
- package/dist/components/semiotic-geo.d.ts +4 -0
- package/dist/components/semiotic-physics.d.ts +9 -6
- package/dist/components/semiotic-recipes-core.d.ts +6 -1
- package/dist/components/server/renderEvidence.d.ts +1 -1
- package/dist/components/server/renderToStaticSVG.d.ts +2 -1
- package/dist/components/server/serverChartConfigHeatmap.d.ts +6 -0
- package/dist/components/server/serverChartConfigNetworkStyles.d.ts +12 -0
- package/dist/components/server/serverChartConfigShared.d.ts +16 -0
- package/dist/components/server/serverChartConfigs.d.ts +2 -2
- package/dist/components/server/serverChartConfigsPhysics.d.ts +2 -2
- package/dist/components/server/serverChartConfigsXY.d.ts +0 -1
- package/dist/components/server/staticLegend.d.ts +6 -0
- package/dist/components/server/staticSVGChrome.d.ts +10 -2
- package/dist/components/server/staticValue.d.ts +8 -0
- package/dist/components/stream/geoPipelineConfig.d.ts +10 -0
- package/dist/components/stream/legendRenderer.d.ts +8 -0
- package/dist/components/stream/physics/PhysicsEvidence.d.ts +37 -0
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +9 -0
- package/dist/components/stream/physics/PhysicsSettledScene.d.ts +5 -0
- package/dist/components/stream/physics/physicsFramePipelineConfig.d.ts +19 -0
- package/dist/components/stream/physics/physicsPipelineSettle.d.ts +52 -0
- package/dist/components/stream/physics/physicsRegionRuntime.d.ts +23 -0
- package/dist/components/stream/types.d.ts +2 -0
- package/dist/components/types/legendTypes.d.ts +17 -1
- package/dist/controls.min.js +1 -1
- package/dist/controls.module.min.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/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +4 -3
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental-vacp.d.ts +11 -0
- package/dist/semiotic-experimental-vacp.min.js +1 -0
- package/dist/semiotic-experimental-vacp.module.min.js +1 -0
- package/dist/semiotic-experimental.d.ts +6 -3
- package/dist/semiotic-experimental.min.js +2 -1
- package/dist/semiotic-experimental.module.min.js +2 -1
- package/dist/semiotic-geo.d.ts +4 -0
- package/dist/semiotic-physics.d.ts +9 -6
- 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 -1
- 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.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 +18 -2
- package/spec/README.md +94 -2
- package/spec/bindings/README.md +14 -3
- package/spec/v0.1/examples/annotation-provenance-reviewed-revision.json +27 -0
- package/spec/v0.1/examples/annotation-provenance-watcher-threshold.json +21 -0
- package/spec/v0.1/examples/audience-profile-executive-review.json +24 -0
- package/spec/v0.1/examples/audience-profile-incident-operators.json +42 -0
- package/spec/v0.1/examples/chart-capability-bar-comparison.json +48 -0
- package/spec/v0.1/examples/chart-capability-service-flow.json +54 -0
- package/dist/chunk-chunk-2CHN2TA3.module.min.js +0 -1
- package/dist/chunk-chunk-3SHB24AG.module.min.js +0 -1
- package/dist/chunk-chunk-4MMOOYTX.module.min.js +0 -2
- package/dist/chunk-chunk-5RKXZQ2P.module.min.js +0 -1
- package/dist/chunk-chunk-75OTQSXS.module.min.js +0 -1
- package/dist/chunk-chunk-7ALTGHK6.module.min.js +0 -1
- package/dist/chunk-chunk-A5GRQUOF.module.min.js +0 -1
- package/dist/chunk-chunk-AAF5LZAU.module.min.js +0 -2
- package/dist/chunk-chunk-ARZGA4LJ.module.min.js +0 -2
- package/dist/chunk-chunk-C4YA6TDR.module.min.js +0 -1
- package/dist/chunk-chunk-CAFLML4L.module.min.js +0 -2
- package/dist/chunk-chunk-CO5KQMGH.module.min.js +0 -1
- package/dist/chunk-chunk-FHBN7OEB.module.min.js +0 -2
- package/dist/chunk-chunk-GMQ5AYTD.module.min.js +0 -1
- package/dist/chunk-chunk-IP2UE74X.module.min.js +0 -1
- package/dist/chunk-chunk-ITDWLZXV.module.min.js +0 -2
- package/dist/chunk-chunk-JCG72SGW.module.min.js +0 -2
- package/dist/chunk-chunk-LPSPATPC.module.min.js +0 -1
- package/dist/chunk-chunk-PX5YQGDP.module.min.js +0 -2
- package/dist/chunk-chunk-QSQVBIJA.module.min.js +0 -1
- package/dist/chunk-chunk-RCF52Z42.module.min.js +0 -2
- package/dist/chunk-chunk-RNUHEXZA.module.min.js +0 -2
- package/dist/chunk-chunk-ROZWKEUG.module.min.js +0 -1
- package/dist/chunk-chunk-T2FKJD4O.module.min.js +0 -2
- package/dist/chunk-chunk-UDREYOLV.module.min.js +0 -1
- package/dist/chunk-chunk-VOWE3SAP.module.min.js +0 -2
- package/dist/chunk-chunk-VQPNBUSW.module.min.js +0 -2
- package/dist/chunk-chunk-WAWCIHFJ.module.min.js +0 -1
- package/dist/chunk-chunk-WYARAXHR.module.min.js +0 -2
- package/dist/chunk-chunk-XV3KGYTR.module.min.js +0 -2
- package/dist/chunk-chunk-YC2IVEPX.module.min.js +0 -1
- package/dist/chunk-chunk-ZOAQDIJO.module.min.js +0 -1
- package/dist/chunk-chunk-ZXIXAPRE.module.min.js +0 -2
|
@@ -9,7 +9,7 @@ import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
|
9
9
|
import type { PhysicsProcessBodyGroup } from "./physicsProcessPrimitives";
|
|
10
10
|
import type { PhysicsHocFrameProps, PhysicsRerunMS, PhysicsSharedChartProps, TooltipProp } from "./physicsHocUtils";
|
|
11
11
|
import type { GauntletEvent, GauntletGate, GauntletLayout, GauntletProjectPlacement, GauntletProjectState, GauntletPropertyDefinition } from "./gauntletTypes";
|
|
12
|
-
export interface GauntletChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin">, PhysicsSharedChartProps {
|
|
12
|
+
export interface GauntletChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "selection">, PhysicsSharedChartProps {
|
|
13
13
|
data?: TDatum[];
|
|
14
14
|
size?: [number, number];
|
|
15
15
|
idAccessor?: ChartAccessor<TDatum, string>;
|
|
@@ -43,6 +43,11 @@ 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
|
+
* Deterministic seed, matching every other physics HOC. An explicit
|
|
48
|
+
* `frameProps.config.kernel.seed` still wins so existing snapshots hold.
|
|
49
|
+
*/
|
|
50
|
+
seed?: number;
|
|
46
51
|
/**
|
|
47
52
|
* Replay the full compound simulation this many milliseconds after it
|
|
48
53
|
* settles. Omit or pass `null` for a single run; `0` replays on the next
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gauntlet terminal state — the end of the authored tape, computed without
|
|
3
|
+
* running the simulation.
|
|
4
|
+
*
|
|
5
|
+
* ## Why this exists
|
|
6
|
+
*
|
|
7
|
+
* Every event-tape physics chart owes the same contract: **its end state must be
|
|
8
|
+
* computable from the authored inputs alone.** If the outcome only exists as the
|
|
9
|
+
* residue of a simulation, then reduced motion, SSR, snapshot export, and
|
|
10
|
+
* `describeChart` cannot state it, and the chart is a movie rather than a
|
|
11
|
+
* reading. `CrucibleChart` satisfies this by compiling `terminalState` /
|
|
12
|
+
* `terminalSpawns`; `ChainReactionChart` satisfies it by deriving task state from
|
|
13
|
+
* the data at `currentTime`. Gauntlet had no such function — this is it.
|
|
14
|
+
*
|
|
15
|
+
* The fold below mirrors the live `runGauntletTick` state path exactly (same
|
|
16
|
+
* `applyGauntletEffect` / `recordGauntletEvent` / viability / final-outcome
|
|
17
|
+
* order), so the pure answer and the simulated answer agree. Terminal means the
|
|
18
|
+
* tape has fully run: every authored event is due, including capacity-gated
|
|
19
|
+
* ones, because at terminal every gate visit has been processed.
|
|
20
|
+
*
|
|
21
|
+
* ## The one thing this cannot predict
|
|
22
|
+
*
|
|
23
|
+
* `GauntletChart` has a **second outcome source that is not in the tape**: with
|
|
24
|
+
* `crashDetection` enabled (the default), a core whose simulated trajectory
|
|
25
|
+
* touches the crash line is killed and its outcome is overridden to
|
|
26
|
+
* `"bad_design_crash"`. That is a genuine physics-derived finding, and no pure
|
|
27
|
+
* function can compute it — it depends on the trajectory.
|
|
28
|
+
*
|
|
29
|
+
* So this resolver returns the **authored-tape terminal state**. It equals the
|
|
30
|
+
* simulated settled state whenever the run does not crash (notably with
|
|
31
|
+
* `crashDetection={false}`, where the tape is the whole story). When crash
|
|
32
|
+
* detection is armed, treat the pure result as "the outcome the plan earns on
|
|
33
|
+
* paper" and the simulated `killed` / `crashX` fields as the physical override.
|
|
34
|
+
* Charts that need a fully authored reading should disable crash detection.
|
|
35
|
+
*/
|
|
36
|
+
import type { Datum } from "../shared/datumTypes";
|
|
37
|
+
import type { GauntletEvent, GauntletLayout, GauntletProjectState, GauntletPropertyDefinition, GauntletViabilityFn } from "./gauntletTypes";
|
|
38
|
+
export interface GauntletTerminalOptions<TDatum extends Datum = Datum> {
|
|
39
|
+
/** Initial project states, as `createInitialState` produces them. */
|
|
40
|
+
projects: readonly GauntletProjectState<TDatum>[];
|
|
41
|
+
/** Authored tape, or the per-project function form. */
|
|
42
|
+
events?: readonly GauntletEvent[] | ((project: GauntletProjectState<TDatum>, layout: GauntletLayout) => readonly GauntletEvent[]);
|
|
43
|
+
layout: GauntletLayout;
|
|
44
|
+
positiveProperties: Map<string, GauntletPropertyDefinition>;
|
|
45
|
+
negativeProperties: Map<string, GauntletPropertyDefinition>;
|
|
46
|
+
viability?: GauntletViabilityFn<TDatum>;
|
|
47
|
+
outcome?: (project: GauntletProjectState<TDatum>, context: {
|
|
48
|
+
layout: GauntletLayout;
|
|
49
|
+
negativeProperties: Map<string, GauntletPropertyDefinition>;
|
|
50
|
+
positiveProperties: Map<string, GauntletPropertyDefinition>;
|
|
51
|
+
}) => string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Fold one project's whole authored tape into its terminal state.
|
|
55
|
+
*
|
|
56
|
+
* Pure: no store, no kernel, no clock. Given the same inputs it returns the
|
|
57
|
+
* same state, which is what makes it usable for SSR and snapshot export.
|
|
58
|
+
*/
|
|
59
|
+
export declare function resolveGauntletTerminalState<TDatum extends Datum = Datum>(project: GauntletProjectState<TDatum>, options: GauntletTerminalOptions<TDatum>): GauntletProjectState<TDatum>;
|
|
60
|
+
/** Terminal state for every project in a run. */
|
|
61
|
+
export declare function resolveGauntletTerminalStates<TDatum extends Datum = Datum>(options: GauntletTerminalOptions<TDatum>): GauntletProjectState<TDatum>[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PhysicsSemanticItem } from "../../stream/physics/StreamPhysicsFrame";
|
|
2
|
+
import type { PhysicalFlowProjectionMetadata } from "./physicsChartUtils";
|
|
3
|
+
export declare function formatPhysicalFlowThroughput(value: number): string;
|
|
4
|
+
export declare function physicalFlowPathD(points: PhysicalFlowProjectionMetadata["links"][number]["path"]): string;
|
|
5
|
+
/** Build keyboard/reader targets from the authored throughput routes. */
|
|
6
|
+
export declare function physicalFlowSemanticItems(metadata: PhysicalFlowProjectionMetadata | undefined): PhysicsSemanticItem[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { FrameGraphicsProp } from "../../stream/useFrame";
|
|
3
|
-
import type { PhysicsSemanticItem, StreamPhysicsFrameProps } from "../../stream/physics/StreamPhysicsFrame";
|
|
3
|
+
import type { PhysicsBodySelection, PhysicsSemanticItem, StreamPhysicsFrameProps } from "../../stream/physics/StreamPhysicsFrame";
|
|
4
4
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
5
5
|
import type { Datum } from "../shared/datumTypes";
|
|
6
|
-
import type { BaseChartProps, ChartMode } from "../shared/types";
|
|
6
|
+
import type { BaseChartProps, ChartMode, LinkedHoverProp, SelectionConfig } from "../shared/types";
|
|
7
7
|
import { type ChartModeResult } from "../shared/hooks";
|
|
8
8
|
export type PhysicsHocFrameProps<TOmitted extends keyof StreamPhysicsFrameProps = never> = Partial<Omit<StreamPhysicsFrameProps, "initialSpawns" | "initialSpawnPacing" | "size" | TOmitted>>;
|
|
9
9
|
/**
|
|
@@ -18,7 +18,48 @@ export type PhysicsSharedChartProps = {
|
|
|
18
18
|
legendPosition?: StreamPhysicsFrameProps["legendPosition"];
|
|
19
19
|
legendLayout?: StreamPhysicsFrameProps["legendLayout"];
|
|
20
20
|
svgAnnotationRules?: StreamPhysicsFrameProps["svgAnnotationRules"];
|
|
21
|
+
/**
|
|
22
|
+
* Shared selection. Pass a `{ name }` config to join the selection store
|
|
23
|
+
* (cross-highlight inside `LinkedCharts`), or a resolved
|
|
24
|
+
* `{ isActive, predicate }` body predicate directly.
|
|
25
|
+
*/
|
|
26
|
+
selection?: PhysicsChartSelection;
|
|
27
|
+
/** Emit hover into the shared selection store for cross-chart highlighting. */
|
|
28
|
+
linkedHover?: LinkedHoverProp;
|
|
21
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* What a physics HOC's `selection` prop accepts.
|
|
32
|
+
*
|
|
33
|
+
* `SelectionConfig` (`{ name }`) joins the shared selection store, so physics
|
|
34
|
+
* bodies cross-highlight inside `LinkedCharts` like every other family.
|
|
35
|
+
* `PhysicsBodySelection` (`{ isActive, predicate }`) stays available as the
|
|
36
|
+
* direct escape hatch for hosts that resolve a body predicate themselves.
|
|
37
|
+
*/
|
|
38
|
+
export type PhysicsChartSelection = SelectionConfig | PhysicsBodySelection | null;
|
|
39
|
+
export interface PhysicsSelectionOptions {
|
|
40
|
+
selection?: PhysicsChartSelection;
|
|
41
|
+
linkedHover?: LinkedHoverProp;
|
|
42
|
+
colorBy?: unknown;
|
|
43
|
+
chartType: string;
|
|
44
|
+
chartId?: string;
|
|
45
|
+
onObservation?: BaseChartProps["onObservation"];
|
|
46
|
+
onClick?: BaseChartProps["onClick"];
|
|
47
|
+
onBodyHover?: StreamPhysicsFrameProps["onBodyHover"];
|
|
48
|
+
fallbackFields?: string[];
|
|
49
|
+
unwrapSourceDatum?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface PhysicsSelectionResult {
|
|
52
|
+
selection: PhysicsBodySelection | null;
|
|
53
|
+
onBodyHover?: StreamPhysicsFrameProps["onBodyHover"];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Wire a physics HOC into the shared selection store.
|
|
57
|
+
*
|
|
58
|
+
* The store resolves a predicate over *data*, while the frame wants a predicate
|
|
59
|
+
* over *bodies*, so the resolved predicate is lifted through `body.datum`.
|
|
60
|
+
* Bodies with no datum (walls, pegs, chrome) never match a data selection.
|
|
61
|
+
*/
|
|
62
|
+
export declare function usePhysicsSelection(options: PhysicsSelectionOptions): PhysicsSelectionResult;
|
|
22
63
|
/** Galton / pile sampling mode (orthogonal to ChartMode display modes). */
|
|
23
64
|
export type PhysicsSimulationMode = "sample" | "mechanical";
|
|
24
65
|
/** Delay between a settled physics run and a fresh seeded replay. */
|
|
@@ -128,6 +169,8 @@ export declare function resolvePhysicsFrameSharedProps(props: Pick<BaseChartProp
|
|
|
128
169
|
legendLayout?: StreamPhysicsFrameProps["legendLayout"];
|
|
129
170
|
svgAnnotationRules?: StreamPhysicsFrameProps["svgAnnotationRules"];
|
|
130
171
|
}, frameProps: Partial<StreamPhysicsFrameProps> | undefined, semanticItems?: PhysicsSemanticItem[], modeExtras?: {
|
|
172
|
+
/** Resolved body predicate from {@link usePhysicsSelection}. */
|
|
173
|
+
selection?: PhysicsBodySelection | null;
|
|
131
174
|
chartMode?: ChartMode;
|
|
132
175
|
className?: string;
|
|
133
176
|
title?: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Datum } from "./datumTypes";
|
|
2
|
+
/**
|
|
3
|
+
* Statically detect the serializable HatchFill form styleRules can carry.
|
|
4
|
+
* Function-valued rule styles may also return hatches at runtime, but the
|
|
5
|
+
* config-only audit cannot inspect those honestly.
|
|
6
|
+
*/
|
|
7
|
+
export declare function hasDeclaredHatchFill(props: Datum): boolean;
|
|
8
|
+
/** True only when every declared hex color belongs to the safe palette. */
|
|
9
|
+
export declare function usesCvdSafePalette(colorScheme: unknown): boolean;
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* This compact registry is intentionally separate from validation metadata:
|
|
6
6
|
* config serialization only needs chart-name membership.
|
|
7
7
|
*/
|
|
8
|
-
export declare const KNOWN_CHART_COMPONENTS: readonly ["BarChart", "StackedBarChart", "GroupedBarChart", "SwarmPlot", "BoxPlot", "Histogram", "ViolinPlot", "RidgelinePlot", "DotPlot", "PieChart", "DonutChart", "GaugeChart", "FunnelChart", "SwimlaneChart", "LikertChart", "LineChart", "BumpChart", "AreaChart", "DifferenceChart", "StackedAreaChart", "Scatterplot", "BubbleChart", "Heatmap", "QuadrantChart", "MultiAxisLineChart", "CandlestickChart", "ConnectedScatterplot", "ScatterplotMatrix", "MinimapChart", "ForceDirectedGraph", "SankeyDiagram", "ProcessSankey", "ChordDiagram", "TreeDiagram", "Treemap", "CirclePack", "OrbitDiagram", "ChoroplethMap", "ProportionalSymbolMap", "FlowMap", "DistanceCartogram", "RealtimeLineChart", "RealtimeHistogram", "TemporalHistogram", "RealtimeSwarmChart", "RealtimeWaterfallChart", "RealtimeHeatmap", "GaltonBoardChart", "EventDropChart", "
|
|
8
|
+
export declare const KNOWN_CHART_COMPONENTS: readonly ["BarChart", "StackedBarChart", "GroupedBarChart", "SwarmPlot", "BoxPlot", "Histogram", "ViolinPlot", "RidgelinePlot", "DotPlot", "PieChart", "DonutChart", "GaugeChart", "FunnelChart", "SwimlaneChart", "LikertChart", "LineChart", "BumpChart", "AreaChart", "DifferenceChart", "StackedAreaChart", "Scatterplot", "BubbleChart", "Heatmap", "QuadrantChart", "MultiAxisLineChart", "CandlestickChart", "ConnectedScatterplot", "ScatterplotMatrix", "MinimapChart", "ForceDirectedGraph", "SankeyDiagram", "ProcessSankey", "ChordDiagram", "TreeDiagram", "Treemap", "CirclePack", "OrbitDiagram", "ChoroplethMap", "ProportionalSymbolMap", "FlowMap", "DistanceCartogram", "RealtimeLineChart", "RealtimeHistogram", "TemporalHistogram", "RealtimeSwarmChart", "RealtimeWaterfallChart", "RealtimeHeatmap", "GaltonBoardChart", "EventDropChart", "UnitPileChart", "CollisionSwarmChart", "GauntletChart", "CrucibleChart", "ProcessFlowChart", "PacketFlowChart", "ChainReactionChart", "BigNumber"];
|
|
9
9
|
export declare function isKnownChartComponent(componentName: string): boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Accessor } from "./types";
|
|
2
2
|
import type { MarginType, PartialMargin } from "../../types/marginType";
|
|
3
3
|
import type { LegendLayout, LegendValue } from "../../types/legendTypes";
|
|
4
|
+
import { type AxisChromeInput } from "../../legendLayout";
|
|
4
5
|
import type { Datum } from "./datumTypes";
|
|
5
6
|
/**
|
|
6
7
|
* Hook to create a legend and compute margins with legend-aware adjustment.
|
|
@@ -8,7 +9,7 @@ import type { Datum } from "./datumTypes";
|
|
|
8
9
|
* expansion pattern that every chart with color encoding repeats.
|
|
9
10
|
*/
|
|
10
11
|
export type LegendPosition = "right" | "left" | "top" | "bottom";
|
|
11
|
-
export declare function useChartLegendAndMargin({ data, colorBy, colorScale, showLegend, legendPosition, userMargin, defaults, categories, additionalLegend, chartWidth, legendLayout, hasTitle, }: {
|
|
12
|
+
export declare function useChartLegendAndMargin({ data, colorBy, colorScale, showLegend, legendPosition, userMargin, defaults, categories, additionalLegend, chartWidth, legendLayout, hasTitle, axisChrome, }: {
|
|
12
13
|
data: Array<Datum>;
|
|
13
14
|
colorBy: Accessor<string> | undefined;
|
|
14
15
|
colorScale: ((v: string) => string) | undefined;
|
|
@@ -25,6 +26,12 @@ export declare function useChartLegendAndMargin({ data, colorBy, colorScale, sho
|
|
|
25
26
|
legendLayout?: LegendLayout;
|
|
26
27
|
/** Reserve the chart-title band above a top legend. */
|
|
27
28
|
hasTitle?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Axis chrome on the legend's side. A top/bottom legend is placed outside
|
|
31
|
+
* this band, so the reserved margin has to include it or the legend lands
|
|
32
|
+
* past the canvas edge.
|
|
33
|
+
*/
|
|
34
|
+
axisChrome?: AxisChromeInput;
|
|
28
35
|
}): {
|
|
29
36
|
legend: LegendValue | undefined;
|
|
30
37
|
margin: MarginType;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Datum } from "./datumTypes";
|
|
2
|
+
import type { AxisChromeInput } from "../../legendLayout";
|
|
2
3
|
import { useChartLegendAndMargin, useLegendInteraction, DEFAULT_COLOR } from "./hooks";
|
|
3
4
|
import type { LegendInteractionMode, LegendPosition } from "./hooks";
|
|
4
5
|
import type { Accessor, SelectionConfig, LinkedHoverProp, HoverHighlightMode, MobileInteractionProp, ResolvedMobileInteractionConfig } from "./types";
|
|
@@ -81,6 +82,12 @@ export interface ChartSetupInput {
|
|
|
81
82
|
height: number;
|
|
82
83
|
/** Whether the resolved chart mode includes a title. */
|
|
83
84
|
hasTitle?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Bottom-axis chrome, so a bottom legend reserves space outside the tick
|
|
87
|
+
* labels rather than only being drawn past them. Omit for charts with no
|
|
88
|
+
* horizontal axis (pie/donut/radial) — the gutter resolves to 0.
|
|
89
|
+
*/
|
|
90
|
+
axisChrome?: AxisChromeInput;
|
|
84
91
|
}
|
|
85
92
|
/**
|
|
86
93
|
* Output from useChartSetup.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bind a library-neutral IDID capability descriptor to a Semiotic runtime
|
|
3
|
+
* capability. A portable `intentScores` field is authoritative when present;
|
|
4
|
+
* omission retains the host's ranking policy.
|
|
5
|
+
*
|
|
6
|
+
* The portable descriptor intentionally cannot contain executable `fits` or
|
|
7
|
+
* `buildProps` functions. Treating it as a complete runtime capability would
|
|
8
|
+
* therefore make every dataset appear to fit, which is precisely the kind of
|
|
9
|
+
* plausible-but-unsafe recommendation the portability layer refuses to make.
|
|
10
|
+
*
|
|
11
|
+
* This binder overlays the descriptor's portable policy (rubric, intent
|
|
12
|
+
* scores, variants, caveats, and mobile contract) onto a host-resolved
|
|
13
|
+
* capability while retaining the host's executable data-fit, prop-building,
|
|
14
|
+
* scale, quality, and numeric-contract logic.
|
|
15
|
+
*/
|
|
16
|
+
import type { ChartCapability } from "../../ai/chartCapabilityTypes";
|
|
17
|
+
import { type PortableChartCapability } from "./spec";
|
|
18
|
+
import type { PortabilityDiagnostic, PortabilityLoss, PortabilityProvenance, PortabilityStatus } from "./result";
|
|
19
|
+
/** Runtime capability plus the exact portable descriptor that shaped it. */
|
|
20
|
+
export interface BoundPortableChartCapability extends ChartCapability {
|
|
21
|
+
readonly portableDescriptor: PortableChartCapability;
|
|
22
|
+
}
|
|
23
|
+
/** Structured activation result; refused results never contain a capability. */
|
|
24
|
+
export interface PortableCapabilityBindingResult {
|
|
25
|
+
status: PortabilityStatus;
|
|
26
|
+
capability?: BoundPortableChartCapability;
|
|
27
|
+
diagnostics: readonly PortabilityDiagnostic[];
|
|
28
|
+
lossReport: readonly PortabilityLoss[];
|
|
29
|
+
provenance: PortabilityProvenance;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Activate a portable descriptor against an explicitly resolved host
|
|
33
|
+
* capability.
|
|
34
|
+
*
|
|
35
|
+
* The component ids must match. The portable rubric/intent scores are
|
|
36
|
+
* authoritative for ranking; portable variants replace host variants when the
|
|
37
|
+
* field is present (an omitted variants field means no carried variants).
|
|
38
|
+
* Host `fits`, `buildProps`, numeric contracts, scale/quality gates, and
|
|
39
|
+
* dynamic caveats remain in force.
|
|
40
|
+
*/
|
|
41
|
+
export declare function bindPortableCapability(descriptor: unknown, host: ChartCapability | undefined): PortableCapabilityBindingResult;
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export { IDID_SPEC_VERSION, BUILTIN_INTENT_IDS, validatePortableCapability, validatePortableAudienceProfile, validatePortableAnnotation, } from "./spec";
|
|
12
12
|
export type { BuiltInIntentId, PortableIntentId, PortableChartRubric, PortableChartVariant, PortableMobileInteractionCapability, PortableMobileLabelCapability, PortableMobileCustomCapability, PortableMobileCapability, PortableChartCapability, PortableReceptionModality, PortableAudienceTarget, PortableAudienceProfile, PortableAnnotationActorKind, PortableAnnotationSource, PortableAnnotationBasis, PortableAnnotationProvenance, PortableAnnotationFreshness, PortableAnnotationStatus, PortableAnnotationAnchor, PortableAnnotationLifecycle, PortableAnnotated, ValidationResult, } from "./spec";
|
|
13
|
+
export { bindPortableCapability } from "./capabilityBinding";
|
|
14
|
+
export type { BoundPortableChartCapability, PortableCapabilityBindingResult, } from "./capabilityBinding";
|
|
13
15
|
export { toVegaLite, toVegaLiteResult, attachIDID, readIDID, attachIDIDAnnotations, readIDIDAnnotations, } from "./vegaLite";
|
|
14
16
|
export type { IDIDVegaLiteMeta, ToVegaLiteOptions, VegaLiteExportResult, } from "./vegaLite";
|
|
15
17
|
export { fromVegaLiteResult, unwrapIDIDEnrichedVegaLiteSpec, } from "../fromVegaLite";
|
|
@@ -17,6 +17,62 @@ export declare function resolveSideLegendWidth(legend: LegendValue | null | unde
|
|
|
17
17
|
export declare function resolveLegendDistance(legend: LegendValue | null | undefined): number;
|
|
18
18
|
/** Resolve plot-adjacent chrome reserved before a left/right legend. */
|
|
19
19
|
export declare function resolveLegendSideGutter(layout?: LegendLayout): number;
|
|
20
|
+
/**
|
|
21
|
+
* Height of the chrome a horizontal axis draws *outside* the plot rect, which
|
|
22
|
+
* a top/bottom legend has to clear.
|
|
23
|
+
*
|
|
24
|
+
* The axis renderers place tick labels on a baseline 18px past the axis line
|
|
25
|
+
* and an axis title at 40px (58px when ticks are rotated); each needs a few
|
|
26
|
+
* more pixels for descenders. A bottom legend anchored at `plotBottom +
|
|
27
|
+
* legendDistance` lands in exactly that band, so without this reservation the
|
|
28
|
+
* legend and the tick labels draw at the same y.
|
|
29
|
+
*/
|
|
30
|
+
export declare const AXIS_TICK_CHROME = 22;
|
|
31
|
+
export declare const AXIS_TITLE_CHROME = 46;
|
|
32
|
+
export declare const ROTATED_AXIS_TITLE_CHROME = 64;
|
|
33
|
+
export interface AxisChromeInput {
|
|
34
|
+
/** A horizontal axis renders on this side of the plot. */
|
|
35
|
+
hasAxis?: boolean;
|
|
36
|
+
/** An axis title (`xLabel` / `valueLabel` / `categoryLabel`) is present. */
|
|
37
|
+
hasAxisLabel?: boolean;
|
|
38
|
+
/** Tick labels are rotated, which pushes the axis title further out. */
|
|
39
|
+
rotatedTicks?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Space to reserve between the plot edge and a top/bottom legend.
|
|
43
|
+
*
|
|
44
|
+
* `legendLayout.axisGutter` is the explicit override (including `0` to opt out
|
|
45
|
+
* and restore pre-3.8.7 placement); otherwise the band is derived from the
|
|
46
|
+
* axis chrome actually being drawn, and is 0 when there is no axis on that
|
|
47
|
+
* side — so pie/donut and axes-off charts are unaffected.
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveAxisChromeGutter(input?: AxisChromeInput, layout?: LegendLayout): number;
|
|
50
|
+
/**
|
|
51
|
+
* Resolve `axisChrome` for an XY chart HOC's `useChartLegendAndMargin` call.
|
|
52
|
+
* Mirrors `server/staticXY.tsx`'s `renderStreamXYFrame` (`hasAxis:
|
|
53
|
+
* showAxes !== false`, `hasAxisLabel: !!xLabel`) so a bottom-legend chart
|
|
54
|
+
* reserves the same margin on the client as `renderChart` does on the
|
|
55
|
+
* server — leaving either side to guess (the pre-3.8.8 default) makes the
|
|
56
|
+
* client over- or under-reserve relative to the SSR output whenever a
|
|
57
|
+
* wrapped legend pushes the reservation past the 80px floor.
|
|
58
|
+
*/
|
|
59
|
+
export declare function resolveXYAxisChrome(input: {
|
|
60
|
+
showAxes?: boolean;
|
|
61
|
+
xLabel?: unknown;
|
|
62
|
+
}): AxisChromeInput;
|
|
63
|
+
/**
|
|
64
|
+
* Resolve `axisChrome` for an ordinal chart HOC's `useChartLegendAndMargin`
|
|
65
|
+
* call. Mirrors `server/staticOrdinal.tsx`'s `renderOrdinalFrame`: the
|
|
66
|
+
* bottom axis is the value axis for `"horizontal"` projection, the category
|
|
67
|
+
* axis otherwise, and radial projections draw no axis at all. See
|
|
68
|
+
* `resolveXYAxisChrome` for why this must track the server computation.
|
|
69
|
+
*/
|
|
70
|
+
export declare function resolveOrdinalAxisChrome(input: {
|
|
71
|
+
showAxes?: boolean;
|
|
72
|
+
projection?: "horizontal" | "vertical" | "radial";
|
|
73
|
+
hasCategoryLabel: boolean;
|
|
74
|
+
hasValueLabel: boolean;
|
|
75
|
+
}): AxisChromeInput;
|
|
20
76
|
/** Estimate the layout-box height used to place a top/bottom legend. */
|
|
21
77
|
export declare function resolveHorizontalLegendHeight(legend: LegendValue | null | undefined, availableWidth: number, layout?: LegendLayout): number;
|
|
22
78
|
/** Margin required to fit a side legend and its plot-edge gap. */
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import type { GeoCustomLayout } from "../stream/geoCustomLayout";
|
|
3
|
+
import type { GeoScales } from "../stream/geoTypes";
|
|
4
|
+
import type { Style } from "../stream/types";
|
|
5
|
+
export type GeographicDotGridShape = "circle" | "square" | "hexagon";
|
|
6
|
+
export type GeographicDotGridAccessor = string | ((datum: GeographicDotGridDatum, index: number) => unknown);
|
|
7
|
+
export interface GeographicDotGridDatum extends Datum {
|
|
8
|
+
/** Stable source feature identity. */
|
|
9
|
+
featureId: string;
|
|
10
|
+
/** Source feature position in the filtered areas array. */
|
|
11
|
+
featureIndex: number;
|
|
12
|
+
/** Grid position in the chart-wide lattice. */
|
|
13
|
+
gridRow: number;
|
|
14
|
+
gridColumn: number;
|
|
15
|
+
/** Geographic location obtained by inverting the sampled cell center. */
|
|
16
|
+
longitude: number;
|
|
17
|
+
latitude: number;
|
|
18
|
+
/** Stable index among the retained, in-mask dots. */
|
|
19
|
+
dotIndex: number;
|
|
20
|
+
}
|
|
21
|
+
export interface GeographicDotGridSampleOptions {
|
|
22
|
+
/** Approximate pixel width/height of one lattice cell. @default 10 */
|
|
23
|
+
cellSize?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Alternative density control: number of lattice columns across the
|
|
26
|
+
* projected geographic bounds. Takes precedence over cellSize.
|
|
27
|
+
*/
|
|
28
|
+
columns?: number;
|
|
29
|
+
/** Pixel inset applied to the geographic sampling bounds. @default 0 */
|
|
30
|
+
layoutPadding?: number;
|
|
31
|
+
/** Chart-space lattice origin. Stable origins make resize transitions predictable. */
|
|
32
|
+
gridOrigin?: [number, number];
|
|
33
|
+
/**
|
|
34
|
+
* Maximum candidate cells tested. Coarser spacing is chosen automatically
|
|
35
|
+
* when the requested lattice would exceed this guard. @default 25000
|
|
36
|
+
*/
|
|
37
|
+
maxSamples?: number;
|
|
38
|
+
/** Exclude source features before their projected bounds are sampled. */
|
|
39
|
+
featureFilter?: (feature: GeoJSON.Feature, index: number) => boolean;
|
|
40
|
+
/** Exclude retained dots after feature attribution. */
|
|
41
|
+
dotFilter?: (datum: GeographicDotGridDatum, index: number) => boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface GeographicDotGridConfig extends GeographicDotGridSampleOptions {
|
|
44
|
+
/** Geometry emitted for each occupied lattice cell. @default "circle" */
|
|
45
|
+
shape?: GeographicDotGridShape;
|
|
46
|
+
/** Radius in pixels. Overrides radiusRatio. */
|
|
47
|
+
dotRadius?: number;
|
|
48
|
+
/** Radius as a fraction of cellSize. @default 0.24 */
|
|
49
|
+
radiusRatio?: number;
|
|
50
|
+
/** Direct fill field/function. categoryAccessor + the chart palette is used otherwise. */
|
|
51
|
+
fillAccessor?: GeographicDotGridAccessor;
|
|
52
|
+
categoryAccessor?: GeographicDotGridAccessor;
|
|
53
|
+
/** Additional per-dot style. */
|
|
54
|
+
markStyle?: Style | ((datum: GeographicDotGridDatum, index: number) => Style);
|
|
55
|
+
/** Draw faint source boundaries over the dot field. @default false */
|
|
56
|
+
showOutline?: boolean;
|
|
57
|
+
outlineStyle?: Style;
|
|
58
|
+
}
|
|
59
|
+
interface GeographicDotGridSampleResult {
|
|
60
|
+
dots: GeographicDotGridDatum[];
|
|
61
|
+
cellSize: number;
|
|
62
|
+
features: GeoJSON.Feature[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Sample fitted geographic polygons onto a chart-space lattice.
|
|
66
|
+
*
|
|
67
|
+
* Each candidate cell center is inverted through the active projection and
|
|
68
|
+
* retained only when it falls inside a source feature. The result is useful
|
|
69
|
+
* independently of React for inspecting density or composing custom layouts.
|
|
70
|
+
*/
|
|
71
|
+
export declare function sampleGeographicDotGrid(areas: GeoJSON.Feature[], scales: Pick<GeoScales, "geoPath" | "invertedPoint">, dimensions: {
|
|
72
|
+
width: number;
|
|
73
|
+
height: number;
|
|
74
|
+
}, options?: GeographicDotGridSampleOptions): GeographicDotGridSampleResult;
|
|
75
|
+
/**
|
|
76
|
+
* Polygon-to-lattice mask for `GeoCustomChart`.
|
|
77
|
+
*
|
|
78
|
+
* Unlike a tile cartogram, this retains the projected land silhouette: every
|
|
79
|
+
* occupied screen-space grid cell becomes a small circle, square, or hexagon.
|
|
80
|
+
*/
|
|
81
|
+
export declare const geographicDotGridLayout: GeoCustomLayout<GeographicDotGridConfig>;
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import type { GeoCustomLayout } from "../stream/geoCustomLayout";
|
|
3
|
+
import type { Style } from "../stream/types";
|
|
4
|
+
export type GeographicGridShape = "circle" | "square" | "hexagon";
|
|
5
|
+
export type GeographicGridSource = "auto" | "areas" | "points";
|
|
6
|
+
export interface GeographicGridInput<T = Datum> {
|
|
7
|
+
datum: T;
|
|
8
|
+
/** Source-space x coordinate. Longitude or projected x both work. */
|
|
9
|
+
x: number;
|
|
10
|
+
/** Source-space y coordinate. Latitude or projected y both work. */
|
|
11
|
+
y: number;
|
|
12
|
+
}
|
|
13
|
+
export interface GridifiedGeographicPoint<T = Datum> extends GeographicGridInput<T> {
|
|
14
|
+
row: number;
|
|
15
|
+
column: number;
|
|
16
|
+
}
|
|
17
|
+
export interface GridifyGeographicPointsOptions {
|
|
18
|
+
/** Number of grid columns. Inferred from count and aspect ratio by default. */
|
|
19
|
+
columns?: number;
|
|
20
|
+
/** Number of grid rows. Inferred from count and occupancy by default. */
|
|
21
|
+
rows?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Target fraction of grid cells occupied when rows are inferred.
|
|
24
|
+
* Extra cells preserve coastline/continental whitespace. @default 0.72
|
|
25
|
+
*/
|
|
26
|
+
occupancy?: number;
|
|
27
|
+
/** Width / height of the intended display. @default 1.8 */
|
|
28
|
+
aspectRatio?: number;
|
|
29
|
+
}
|
|
30
|
+
type GridAccessor<T> = string | ((datum: T) => unknown);
|
|
31
|
+
export interface GeographicGridConfig {
|
|
32
|
+
/** Prefer area features, point rows, or whichever source is populated. @default "auto" */
|
|
33
|
+
source?: GeographicGridSource;
|
|
34
|
+
/**
|
|
35
|
+
* Explicit grid placement. When both accessors return finite values, the
|
|
36
|
+
* authored table is used instead of automatic geographic gridification.
|
|
37
|
+
*/
|
|
38
|
+
rowAccessor?: GridAccessor<Datum>;
|
|
39
|
+
columnAccessor?: GridAccessor<Datum>;
|
|
40
|
+
/** Geographic point accessors used by automatic point gridification. */
|
|
41
|
+
longitudeAccessor?: GridAccessor<Datum>;
|
|
42
|
+
latitudeAccessor?: GridAccessor<Datum>;
|
|
43
|
+
idAccessor?: GridAccessor<Datum>;
|
|
44
|
+
labelAccessor?: GridAccessor<Datum>;
|
|
45
|
+
categoryAccessor?: GridAccessor<Datum>;
|
|
46
|
+
/**
|
|
47
|
+
* Optional quantitative size encoding. Mark area is proportional to this
|
|
48
|
+
* value; omit it for equal-area geographic units.
|
|
49
|
+
*/
|
|
50
|
+
sizeAccessor?: GridAccessor<Datum>;
|
|
51
|
+
/** Explicit size domain. Inferred from finite values by default. */
|
|
52
|
+
sizeDomain?: [number, number];
|
|
53
|
+
/**
|
|
54
|
+
* Minimum/maximum mark radius as fractions of the available cell radius.
|
|
55
|
+
* @default [0.36, 1]
|
|
56
|
+
*/
|
|
57
|
+
sizeRange?: [number, number];
|
|
58
|
+
/** Direct fill field/function. categoryAccessor + the chart palette is used otherwise. */
|
|
59
|
+
fillAccessor?: GridAccessor<Datum>;
|
|
60
|
+
/** Additional per-mark style. */
|
|
61
|
+
markStyle?: Style | ((datum: Datum, index: number) => Style);
|
|
62
|
+
/** Mark geometry. @default "circle" */
|
|
63
|
+
shape?: GeographicGridShape;
|
|
64
|
+
/** Grid columns for automatic placement. */
|
|
65
|
+
columns?: number;
|
|
66
|
+
/** Grid rows for automatic placement. */
|
|
67
|
+
rows?: number;
|
|
68
|
+
/** Target automatic-grid occupancy. @default 0.72 */
|
|
69
|
+
occupancy?: number;
|
|
70
|
+
/** Fraction of each cell reserved between marks. @default 0.12 */
|
|
71
|
+
cellPadding?: number;
|
|
72
|
+
/** Pixel inset around the complete grid. @default 8 */
|
|
73
|
+
layoutPadding?: number;
|
|
74
|
+
/** Render labels over marks. @default true */
|
|
75
|
+
showLabels?: boolean;
|
|
76
|
+
labelColor?: string;
|
|
77
|
+
labelFontSize?: number;
|
|
78
|
+
labelFontFamily?: string;
|
|
79
|
+
labelFontWeight?: number | string;
|
|
80
|
+
/** Maximum visible label length. @default 4 */
|
|
81
|
+
maxLabelLength?: number;
|
|
82
|
+
/** Exclude records before placement. */
|
|
83
|
+
filter?: (datum: Datum, index: number) => boolean;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Snap geographic/projected points to unique cells while preserving their
|
|
87
|
+
* coarse relative position. Edge points claim cells first, leaving central
|
|
88
|
+
* clusters to absorb most of the unavoidable displacement.
|
|
89
|
+
*/
|
|
90
|
+
export declare function gridifyGeographicPoints<T>(input: GeographicGridInput<T>[], options?: GridifyGeographicPointsOptions): GridifiedGeographicPoint<T>[];
|
|
91
|
+
/**
|
|
92
|
+
* Geographic table/cartogram layout for `GeoCustomChart`.
|
|
93
|
+
*
|
|
94
|
+
* It accepts either authored row/column positions (state tile grids and other
|
|
95
|
+
* known cartograms) or automatically gridifies projected point/area centroids.
|
|
96
|
+
* Every result remains a native Geo scene node, retaining canvas rendering,
|
|
97
|
+
* SSR, hit testing, keyboard navigation, tooltips, and shared selection.
|
|
98
|
+
*/
|
|
99
|
+
export declare const geographicGridLayout: GeoCustomLayout<GeographicGridConfig>;
|
|
100
|
+
export {};
|
|
@@ -120,3 +120,5 @@ export type { BodyGroupSpec, BodyGroupSpecOptions, ProcessMembraneDef, ProcessRe
|
|
|
120
120
|
export type { RegionCountBucket, RegionCountMap } from "./processAggregates";
|
|
121
121
|
export type { ProcessVolumePoint, ProcessVolumePolygon, ProcessVolumePolygonRole } from "./processVolumeGeometry";
|
|
122
122
|
export type { ProcessJourneyEntityState, ProcessJourneyLedger, ProcessJourneyRow, ProcessJourneyStage, ProcessJourneyUpdateOptions } from "./processJourney";
|
|
123
|
+
export { describePhysicsStageGeography, physicsChargePoint, physicsDestination, physicsStageColliders, physicsStageGeography } from "./physicsStageGeography";
|
|
124
|
+
export type { PhysicsDestinationZone, PhysicsStageColliderOptions, PhysicsStageGeography, PhysicsStageGeographyOptions, PhysicsZone } from "./physicsStageGeography";
|