semiotic 3.8.3 → 3.8.5
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 +13 -10
- package/README.md +52 -45
- package/ai/componentMetadata.cjs +1 -1
- package/ai/dist/mcp-server.js +4 -2
- package/ai/examples.md +168 -1
- package/ai/schema.json +3756 -327
- package/ai/surface-manifest.json +6 -4
- package/ai/system-prompt.md +1 -1
- package/dist/chunk-chartContainerDataAudit-74TLKIP6.module.min.js +2 -0
- package/dist/chunk-chunk-2JGJ5GUG.module.min.js +0 -1
- package/dist/chunk-chunk-4AANPFOX.module.min.js +2 -0
- package/dist/{chunk-chunk-JNCHKRIR.module.min.js → chunk-chunk-5I3UZV4Q.module.min.js} +1 -1
- package/dist/chunk-chunk-74CCPVXB.module.min.js +1 -0
- package/dist/{chunk-chunk-VVCA3DB7.module.min.js → chunk-chunk-7ALTGHK6.module.min.js} +1 -1
- package/dist/chunk-chunk-ACLDBMRH.module.min.js +2 -0
- package/dist/chunk-chunk-AVBI6GDT.module.min.js +1 -0
- package/dist/{chunk-chunk-XQYVEKEJ.module.min.js → chunk-chunk-BANTPINB.module.min.js} +1 -1
- package/dist/chunk-chunk-C4YA6TDR.module.min.js +1 -0
- package/dist/chunk-chunk-C57LR3YG.module.min.js +1 -0
- package/dist/chunk-chunk-CKMD5NV3.module.min.js +2 -0
- package/dist/chunk-chunk-CO5KQMGH.module.min.js +1 -0
- package/dist/chunk-chunk-CWQ5YIHX.module.min.js +2 -0
- package/dist/chunk-chunk-E6TXX6MI.module.min.js +1 -0
- package/dist/{chunk-chunk-7FW6EGLP.module.min.js → chunk-chunk-I36PJ4OC.module.min.js} +1 -1
- package/dist/chunk-chunk-IY7RYD4S.module.min.js +1 -0
- package/dist/chunk-chunk-K3DMEW22.module.min.js +1 -0
- package/dist/chunk-chunk-KT2VAZMZ.module.min.js +1 -0
- package/dist/{chunk-chunk-AZJUDQRM.module.min.js → chunk-chunk-L6EA5V3G.module.min.js} +1 -1
- package/dist/{chunk-chunk-SANERMIZ.module.min.js → chunk-chunk-LJLS6DY7.module.min.js} +1 -1
- package/dist/chunk-chunk-LJPCLYSC.module.min.js +2 -0
- package/dist/chunk-chunk-LRIFN2HK.module.min.js +1 -0
- package/dist/chunk-chunk-N5DDKCCF.module.min.js +1 -0
- package/dist/chunk-chunk-NEVE562N.module.min.js +1 -0
- package/dist/chunk-chunk-NLO44TOS.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-PZJ2SBLL.module.min.js +2 -0
- package/dist/chunk-chunk-QUJ6TTLY.module.min.js +1 -0
- package/dist/chunk-chunk-RBIDBUT4.module.min.js +2 -0
- package/dist/chunk-chunk-RFLAG356.module.min.js +1 -0
- package/dist/chunk-chunk-RPU4IZAV.module.min.js +2 -0
- package/dist/chunk-chunk-SKMBCFIL.module.min.js +2 -0
- package/dist/chunk-chunk-TAE7W424.module.min.js +2 -0
- package/dist/{chunk-chunk-OQTLSTGI.module.min.js → chunk-chunk-TMWIZL3K.module.min.js} +1 -1
- package/dist/chunk-chunk-TUBMTZMU.module.min.js +2 -0
- package/dist/chunk-chunk-UFFEXJQY.module.min.js +1 -0
- package/dist/chunk-chunk-XSCHTS4D.module.min.js +2 -0
- package/dist/chunk-chunk-XXWSHGPL.module.min.js +2 -0
- package/dist/chunk-chunk-ZOAQDIJO.module.min.js +1 -0
- package/dist/chunk-chunk-ZXIXAPRE.module.min.js +2 -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 +12 -2
- package/dist/components/ai/chartCapabilities.d.ts +2 -1
- package/dist/components/ai/chartCapabilityTypes.d.ts +19 -0
- package/dist/components/chartContainerDataAudit.d.ts +10 -0
- package/dist/components/charts/geo/ChoroplethMap.d.ts +2 -0
- package/dist/components/charts/geo/DistanceCartogram.d.ts +35 -5
- package/dist/components/charts/geo/FlowMap.d.ts +4 -0
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +3 -1
- package/dist/components/charts/index.d.ts +1 -0
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +36 -1
- package/dist/components/charts/physics/CollisionSwarmChart.d.ts +6 -1
- package/dist/components/charts/physics/CrucibleChart.capability.d.ts +8 -0
- package/dist/components/charts/physics/CrucibleChart.d.ts +63 -0
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +6 -1
- package/dist/components/charts/physics/crucibleBodyRenderers.d.ts +27 -0
- package/dist/components/charts/physics/crucibleChartProps.d.ts +90 -0
- package/dist/components/charts/physics/crucibleChrome.d.ts +47 -0
- package/dist/components/charts/physics/crucibleController.d.ts +59 -0
- package/dist/components/charts/physics/crucibleEffects.d.ts +30 -0
- package/dist/components/charts/physics/cruciblePhysics.d.ts +54 -0
- package/dist/components/charts/physics/crucibleProgram.d.ts +38 -0
- package/dist/components/charts/physics/crucibleTypes.d.ts +415 -0
- 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/shared/chartMode.d.ts +8 -0
- package/dist/components/charts/shared/chartSpecCore.d.ts +10 -2
- package/dist/components/charts/shared/crucibleWireSchema.d.ts +5 -0
- package/dist/components/charts/shared/diagnoseTypes.d.ts +10 -0
- package/dist/components/charts/shared/hatchPattern.d.ts +8 -3
- package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
- 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/validateProps.d.ts +1 -1
- package/dist/components/charts/xy/AreaChart.d.ts +10 -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/data/auditData.d.ts +51 -0
- package/dist/components/data/dataAuditPresentation.d.ts +18 -0
- package/dist/components/data/dataAuditSources.d.ts +9 -0
- package/dist/components/data/numericContracts.d.ts +59 -0
- package/dist/components/data/numericFieldProfiler.d.ts +23 -0
- package/dist/components/realtime/types.d.ts +5 -0
- package/dist/components/recipes/gridObservatory.d.ts +176 -0
- package/dist/components/recipes/netEnsembleLayout.d.ts +167 -0
- package/dist/components/recipes/netEnsembleOverlays.d.ts +20 -0
- package/dist/components/recipes/recipeChrome.d.ts +24 -0
- package/dist/components/recipes/sequenceLayout.d.ts +139 -0
- package/dist/components/recipes/wordTrails.d.ts +156 -0
- package/dist/components/recipes/wordTrailsProgressiveReveal.d.ts +42 -0
- package/dist/components/semiotic-ai-core.d.ts +3 -0
- package/dist/components/semiotic-ai-data-audit.d.ts +4 -0
- package/dist/components/semiotic-ai.d.ts +7 -5
- package/dist/components/semiotic-physics.d.ts +1 -0
- package/dist/components/semiotic-recipes-core.d.ts +10 -2
- package/dist/components/semiotic-utils-core.d.ts +3 -0
- package/dist/components/semiotic.d.ts +1 -1
- package/dist/components/server/renderEvidence.d.ts +27 -0
- package/dist/components/server/serverChartConfigs.d.ts +1 -0
- package/dist/components/server/serverChartConfigsPhysics.d.ts +9 -0
- package/dist/components/server/staticAnnotations.d.ts +15 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +1 -0
- package/dist/components/stream/GeoSVGOverlay.d.ts +7 -0
- package/dist/components/stream/SceneToSVG.d.ts +6 -6
- package/dist/components/stream/SceneToSVGOrdinal.d.ts +12 -0
- package/dist/components/stream/geoCartogram.d.ts +7 -0
- package/dist/components/stream/geoTypes.d.ts +17 -2
- package/dist/components/stream/networkFrameHandleTypes.d.ts +4 -0
- package/dist/components/stream/networkFramePaint.d.ts +2 -0
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +18 -2
- package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +8 -0
- 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/sceneToSVGShared.d.ts +30 -1
- 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/useChartContainerDataAudit.d.ts +7 -0
- 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.d.ts +3 -0
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +7 -5
- 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-physics.d.ts +1 -0
- 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 +10 -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.d.ts +3 -0
- package/dist/semiotic-utils-core.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic.d.ts +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 +4 -3
- package/dist/chunk-chunk-255KDHW5.module.min.js +0 -1
- package/dist/chunk-chunk-2CCFBTQC.module.min.js +0 -2
- package/dist/chunk-chunk-2RXP3FS3.module.min.js +0 -1
- package/dist/chunk-chunk-2WVCH4PL.module.min.js +0 -1
- package/dist/chunk-chunk-4TMZXLCR.module.min.js +0 -1
- package/dist/chunk-chunk-5APBQXZA.module.min.js +0 -1
- package/dist/chunk-chunk-6HSGDMTA.module.min.js +0 -2
- package/dist/chunk-chunk-7OEOSCBP.module.min.js +0 -1
- package/dist/chunk-chunk-A63CTACR.module.min.js +0 -2
- package/dist/chunk-chunk-B6V35LMY.module.min.js +0 -2
- package/dist/chunk-chunk-BOSVL645.module.min.js +0 -2
- package/dist/chunk-chunk-CP3EN6KZ.module.min.js +0 -1
- package/dist/chunk-chunk-F25UA5HT.module.min.js +0 -1
- package/dist/chunk-chunk-FRIO6MCV.module.min.js +0 -1
- package/dist/chunk-chunk-GWSWSPXN.module.min.js +0 -1
- package/dist/chunk-chunk-I6C3KR5H.module.min.js +0 -2
- package/dist/chunk-chunk-IP2UE74X.module.min.js +0 -1
- package/dist/chunk-chunk-J3ELI22J.module.min.js +0 -1
- package/dist/chunk-chunk-J5RL6GXU.module.min.js +0 -2
- package/dist/chunk-chunk-L3H6DQCR.module.min.js +0 -2
- package/dist/chunk-chunk-M337NY6L.module.min.js +0 -1
- package/dist/chunk-chunk-M7VYYHCE.module.min.js +0 -2
- package/dist/chunk-chunk-MC35ILYP.module.min.js +0 -2
- package/dist/chunk-chunk-N72SWNBV.module.min.js +0 -1
- package/dist/chunk-chunk-OBQRFTIL.module.min.js +0 -2
- package/dist/chunk-chunk-QRIBHZYW.module.min.js +0 -1
- package/dist/chunk-chunk-SA3D43RA.module.min.js +0 -2
- package/dist/chunk-chunk-UHSZEB74.module.min.js +0 -1
- package/dist/chunk-chunk-Y6AXCRVO.module.min.js +0 -1
- package/dist/chunk-chunk-ZCNBUZPL.module.min.js +0 -2
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/** Public, bounded CrucibleChart prop and imperative-handle contracts. */
|
|
2
|
+
import type { StreamPhysicsFrameProps } from "../../stream/physics/StreamPhysicsFrame";
|
|
3
|
+
import type { Datum } from "../shared/datumTypes";
|
|
4
|
+
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
5
|
+
import type { PhysicsHocFrameProps, PhysicsRerunMS, PhysicsSharedChartProps, TooltipProp } from "./physicsHocUtils";
|
|
6
|
+
import type { CrucibleComponentStatus, CrucibleConservationResult, CrucibleConservationSpec, CrucibleDiagnostic, CrucibleEvent, CrucibleMetricMap, CrucibleObservation, CrucibleOutlet, CruciblePhase, CrucibleProductDefinition, CrucibleProjectionSpec, CrucibleRunState } from "./crucibleTypes";
|
|
7
|
+
export interface CrucibleChartHandle<TDatum extends Datum = Datum> {
|
|
8
|
+
play(): void;
|
|
9
|
+
pause(): void;
|
|
10
|
+
reset(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Atomically restart the deterministic tape and play from its origin.
|
|
13
|
+
* Snapshot and reduced-motion renderers remain static at their configured
|
|
14
|
+
* snapshot instead of animating.
|
|
15
|
+
*/
|
|
16
|
+
replay(): void;
|
|
17
|
+
/** Advance to and apply the next authored phase boundary. */
|
|
18
|
+
stepPhase(): void;
|
|
19
|
+
/** Resolve the complete bounded tape without animating intermediate time. */
|
|
20
|
+
settle(): void;
|
|
21
|
+
getCrucibleState(): CrucibleRunState<TDatum>;
|
|
22
|
+
}
|
|
23
|
+
export interface CrucibleControls {
|
|
24
|
+
playPause?: boolean;
|
|
25
|
+
reset?: boolean;
|
|
26
|
+
stepPhase?: boolean;
|
|
27
|
+
timeline?: boolean;
|
|
28
|
+
speed?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export type CrucibleSnapshotAt = number | {
|
|
31
|
+
phaseId: string;
|
|
32
|
+
progress?: number;
|
|
33
|
+
};
|
|
34
|
+
export type CrucibleColorBy<TDatum extends Datum = Datum> = "category" | "status" | "outlet" | "product" | ChartAccessor<TDatum, string>;
|
|
35
|
+
export interface CrucibleChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "margin" | "onClick">, PhysicsSharedChartProps {
|
|
36
|
+
/** Controlled, bounded source charge. CrucibleChart has no live push API. */
|
|
37
|
+
data: TDatum[];
|
|
38
|
+
/** Ordered furnace program. Every phase must have a unique id and duration. */
|
|
39
|
+
phases: readonly CruciblePhase[];
|
|
40
|
+
products?: readonly CrucibleProductDefinition[];
|
|
41
|
+
outlets?: readonly CrucibleOutlet[];
|
|
42
|
+
events?: readonly CrucibleEvent[];
|
|
43
|
+
idAccessor?: ChartAccessor<TDatum, string>;
|
|
44
|
+
labelAccessor?: ChartAccessor<TDatum, string>;
|
|
45
|
+
categoryAccessor?: ChartAccessor<TDatum, string>;
|
|
46
|
+
amountAccessor?: ChartAccessor<TDatum, number>;
|
|
47
|
+
metricsAccessor?: ChartAccessor<TDatum, CrucibleMetricMap>;
|
|
48
|
+
initialStateAccessor?: ChartAccessor<TDatum, CrucibleComponentStatus>;
|
|
49
|
+
metrics?: CrucibleMetricMap;
|
|
50
|
+
amountLabel?: string;
|
|
51
|
+
conservation?: boolean | CrucibleConservationSpec;
|
|
52
|
+
projection?: CrucibleProjectionSpec;
|
|
53
|
+
/**
|
|
54
|
+
* Replay animates the tape; snapshot renders one deterministic instant.
|
|
55
|
+
* Reduced-motion renderers should use snapshot mode and default to the
|
|
56
|
+
* terminal state when `snapshotAt` is omitted.
|
|
57
|
+
*/
|
|
58
|
+
playback?: "replay" | "snapshot";
|
|
59
|
+
snapshotAt?: CrucibleSnapshotAt;
|
|
60
|
+
controls?: boolean | CrucibleControls;
|
|
61
|
+
paused?: boolean;
|
|
62
|
+
/** Semantic program speed. 0.25 is quarter-speed; 2 is double-speed. */
|
|
63
|
+
playbackRate?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Delay after settling before a fresh deterministic replay. `null` or an
|
|
66
|
+
* omitted value runs once; `0` schedules the reset on the next timer turn.
|
|
67
|
+
* Snapshot/reduced-motion rendering does not auto-rerun.
|
|
68
|
+
*/
|
|
69
|
+
rerunMS?: PhysicsRerunMS;
|
|
70
|
+
size?: [number, number];
|
|
71
|
+
seed?: number | string;
|
|
72
|
+
/** Fixed source-body radius. Per-row radius accessors are outside bounded V1. */
|
|
73
|
+
bodyRadius?: number;
|
|
74
|
+
radiusRange?: [number, number];
|
|
75
|
+
colorBy?: CrucibleColorBy<TDatum>;
|
|
76
|
+
showBonds?: boolean;
|
|
77
|
+
showChrome?: boolean;
|
|
78
|
+
showProjection?: boolean;
|
|
79
|
+
frameProps?: PhysicsHocFrameProps<"bodyForces">;
|
|
80
|
+
initialSpawnPacing?: StreamPhysicsFrameProps["initialSpawnPacing"];
|
|
81
|
+
tooltip?: TooltipProp;
|
|
82
|
+
emptyContent?: BaseChartProps["emptyContent"];
|
|
83
|
+
loading?: BaseChartProps["loading"];
|
|
84
|
+
loadingContent?: BaseChartProps["loadingContent"];
|
|
85
|
+
onStateChange?: (state: CrucibleRunState<TDatum>) => void;
|
|
86
|
+
onCrucibleObservation?: (observation: CrucibleObservation) => void;
|
|
87
|
+
onDiagnostic?: (diagnostic: CrucibleDiagnostic) => void;
|
|
88
|
+
onConservation?: (result: CrucibleConservationResult) => void;
|
|
89
|
+
onClick?: (item: CrucibleRunState<TDatum>["components"][string] | CrucibleRunState<TDatum>["products"][string]) => void;
|
|
90
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { Style } from "../../stream/types";
|
|
3
|
+
import type { PhysicsBodyState } from "../../stream/physics/PhysicsKernel";
|
|
4
|
+
import type { PhysicsBodyStyleContext, PhysicsHoverData, PhysicsSemanticItem } from "../../stream/physics/StreamPhysicsFrame";
|
|
5
|
+
import type { Datum } from "../shared/datumTypes";
|
|
6
|
+
import type { CrucibleLayout, CruciblePhase, CrucibleProjectionRow, CrucibleProjectionSpec, CrucibleRunState } from "./crucibleTypes";
|
|
7
|
+
/** Default tooltip preserves the distinction between source and product. */
|
|
8
|
+
export declare function defaultCrucibleTooltipContent<TDatum extends Datum>(hover: PhysicsHoverData, state: CrucibleRunState<TDatum>): React.ReactNode;
|
|
9
|
+
/** Static vessel, program rail, and named exception/product outlets. */
|
|
10
|
+
export declare function CrucibleChrome<TDatum extends Datum>({ layout, phases, state, compact }: {
|
|
11
|
+
layout: CrucibleLayout;
|
|
12
|
+
phases: readonly CruciblePhase[];
|
|
13
|
+
state: CrucibleRunState<TDatum>;
|
|
14
|
+
compact?: boolean;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
export declare function crucibleProjectionSemanticItems(rows: readonly CrucibleProjectionRow[], layout: CrucibleLayout, projection: CrucibleProjectionSpec, amountLabel?: string): PhysicsSemanticItem[];
|
|
17
|
+
/** Compact settled histogram; the ledger values, not body positions, set bars. */
|
|
18
|
+
export declare function CrucibleProjectionOverlay({ rows, layout, projection, amountLabel }: {
|
|
19
|
+
rows: readonly CrucibleProjectionRow[];
|
|
20
|
+
layout: CrucibleLayout;
|
|
21
|
+
projection: CrucibleProjectionSpec;
|
|
22
|
+
amountLabel?: string;
|
|
23
|
+
}): React.JSX.Element | null;
|
|
24
|
+
export interface CrucibleReplayControlsProps {
|
|
25
|
+
controls: {
|
|
26
|
+
playPause: boolean;
|
|
27
|
+
reset: boolean;
|
|
28
|
+
stepPhase: boolean;
|
|
29
|
+
timeline: boolean;
|
|
30
|
+
speed: boolean;
|
|
31
|
+
};
|
|
32
|
+
duration: number;
|
|
33
|
+
elapsed: number;
|
|
34
|
+
phaseLabel: string;
|
|
35
|
+
playing: boolean;
|
|
36
|
+
complete: boolean;
|
|
37
|
+
playbackRate: number;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
onPlayPause: () => void;
|
|
40
|
+
onReset: () => void;
|
|
41
|
+
onStepPhase: () => void;
|
|
42
|
+
onPlaybackRateChange: (rate: number) => void;
|
|
43
|
+
}
|
|
44
|
+
/** Optional in-chart replay controls; external controls can use the ref API. */
|
|
45
|
+
export declare function CrucibleReplayControls({ controls, duration, elapsed, phaseLabel, playing, complete, playbackRate, disabled, onPlayPause, onReset, onStepPhase, onPlaybackRateChange }: CrucibleReplayControlsProps): React.JSX.Element;
|
|
46
|
+
/** Merge default semantic styling with a caller's frame bodyStyle. */
|
|
47
|
+
export declare function resolveCrucibleBodyStyle(defaultFill: string, body: PhysicsBodyState, context: PhysicsBodyStyleContext, bodyStyle: Style | ((body: PhysicsBodyState, context: PhysicsBodyStyleContext) => Style) | undefined): Style;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React-facing replay and motion helpers for CrucibleChart.
|
|
3
|
+
*
|
|
4
|
+
* The reducer tape remains authoritative. These helpers only advance that
|
|
5
|
+
* tape, reconcile its bounded body set, and steer marks toward ledger-derived
|
|
6
|
+
* targets. No collision or body position can create a semantic transition.
|
|
7
|
+
*/
|
|
8
|
+
import type { Datum } from "../shared/datumTypes";
|
|
9
|
+
import type { PhysicsBodyState } from "../../stream/physics/PhysicsKernel";
|
|
10
|
+
import type { PhysicsPipelineControlSurface, PhysicsQueuedSpawn } from "../../stream/physics/PhysicsPipelineStore";
|
|
11
|
+
import type { StreamPhysicsRegionVector } from "../../stream/physics/StreamPhysicsFrame";
|
|
12
|
+
import { type CrucibleSpawnOptions } from "./cruciblePhysics";
|
|
13
|
+
import type { CrucibleCompiledPlan, CrucibleDiagnostic, CrucibleMaterialization, CrucibleObservation, CrucibleRunState } from "./crucibleTypes";
|
|
14
|
+
import type { CrucibleSnapshotAt } from "./crucibleChartProps";
|
|
15
|
+
export interface CrucibleRuntime<TDatum extends Datum = Datum> {
|
|
16
|
+
state: CrucibleRunState<TDatum>;
|
|
17
|
+
diagnostics: CrucibleDiagnostic[];
|
|
18
|
+
materializations: CrucibleMaterialization[];
|
|
19
|
+
observations: CrucibleObservation[];
|
|
20
|
+
}
|
|
21
|
+
/** Resolve a deterministic instant, defaulting snapshots to the terminal ledger. */
|
|
22
|
+
export declare function crucibleSnapshotTime<TDatum extends Datum>(plan: CrucibleCompiledPlan<TDatum>, snapshotAt?: CrucibleSnapshotAt): number;
|
|
23
|
+
/** Replay from origin. Used for reset, phase stepping, snapshots, and live ticks. */
|
|
24
|
+
export declare function replayCrucibleRuntime<TDatum extends Datum>(plan: CrucibleCompiledPlan<TDatum>, throughTime: number, playing?: boolean): CrucibleRuntime<TDatum>;
|
|
25
|
+
/**
|
|
26
|
+
* Return only observations/materializations that became newly visible between
|
|
27
|
+
* two instants. Replaying from origin stays deterministic without re-emitting
|
|
28
|
+
* earlier domain observations.
|
|
29
|
+
*/
|
|
30
|
+
export declare function advanceCrucibleRuntime<TDatum extends Datum>(plan: CrucibleCompiledPlan<TDatum>, previous: CrucibleRunState<TDatum>, throughTime: number, playing?: boolean): CrucibleRuntime<TDatum>;
|
|
31
|
+
/** Inclusive end of the current authored phase, or the tape end. */
|
|
32
|
+
export declare function nextCruciblePhaseBoundary<TDatum extends Datum>(plan: CrucibleCompiledPlan<TDatum>, elapsed: number): number;
|
|
33
|
+
/** Canonical state marks for snapshots and newly materialized product cores. */
|
|
34
|
+
export declare function crucibleStateSpawns<TDatum extends Datum>(plan: CrucibleCompiledPlan<TDatum>, state: CrucibleRunState<TDatum>, options?: CrucibleSpawnOptions): PhysicsQueuedSpawn[];
|
|
35
|
+
/** Add only missing marks. Source component bodies are never deleted. */
|
|
36
|
+
export declare function reconcileCrucibleBodies(controls: PhysicsPipelineControlSurface, desired: readonly PhysicsQueuedSpawn[]): string[];
|
|
37
|
+
export interface CrucibleBodyTarget {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
}
|
|
41
|
+
/** Map the pure state-spawn layout into semantic-id targets. */
|
|
42
|
+
export declare function crucibleStateTargets<TDatum extends Datum>(plan: CrucibleCompiledPlan<TDatum>, state: CrucibleRunState<TDatum>, options?: CrucibleSpawnOptions): Map<string, CrucibleBodyTarget>;
|
|
43
|
+
/**
|
|
44
|
+
* Ledger-derived target with phase motion layered on top. Motion may explain
|
|
45
|
+
* agitation/separation, but cannot alter the target state.
|
|
46
|
+
*/
|
|
47
|
+
export declare function targetForCrucibleBody<TDatum extends Datum>(options: {
|
|
48
|
+
body: PhysicsBodyState;
|
|
49
|
+
plan: CrucibleCompiledPlan<TDatum>;
|
|
50
|
+
state: CrucibleRunState<TDatum>;
|
|
51
|
+
targets: ReadonlyMap<string, CrucibleBodyTarget>;
|
|
52
|
+
}): CrucibleBodyTarget | null;
|
|
53
|
+
/** Damped attraction to a semantic target; deliberately no semantic side effects. */
|
|
54
|
+
export declare function computeCrucibleBodyForce<TDatum extends Datum>(options: {
|
|
55
|
+
body: PhysicsBodyState;
|
|
56
|
+
plan: CrucibleCompiledPlan<TDatum>;
|
|
57
|
+
state: CrucibleRunState<TDatum>;
|
|
58
|
+
targets: ReadonlyMap<string, CrucibleBodyTarget>;
|
|
59
|
+
}): StreamPhysicsRegionVector | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Transactional, pure reducers and summaries for a bounded Crucible tape. */
|
|
2
|
+
import type { Datum } from "../shared/datumTypes";
|
|
3
|
+
import type { CrucibleApplyContext, CrucibleApplyResult, CrucibleConservationResult, CrucibleConservationSpec, CrucibleDiagnostic, CrucibleEvent, CrucibleHistoryItem, CrucibleProjectionRow, CrucibleProjectionSpec, CrucibleRunState, CrucibleSelector } from "./crucibleTypes";
|
|
4
|
+
/** Clone mutable run structures while intentionally retaining source datum references. */
|
|
5
|
+
export declare function cloneCrucibleState<TDatum extends Datum>(state: CrucibleRunState<TDatum>): CrucibleRunState<TDatum>;
|
|
6
|
+
export interface CrucibleSelectorResult {
|
|
7
|
+
ids: string[];
|
|
8
|
+
diagnostics: CrucibleDiagnostic[];
|
|
9
|
+
}
|
|
10
|
+
/** Resolve a source selector with deterministic intersection semantics. */
|
|
11
|
+
export declare function resolveCrucibleSelector<TDatum extends Datum>(state: CrucibleRunState<TDatum>, selector: CrucibleSelector, path?: string): CrucibleSelectorResult;
|
|
12
|
+
/**
|
|
13
|
+
* Apply one event atomically. Any error rolls back all state,
|
|
14
|
+
* materializations, and observations produced by that event.
|
|
15
|
+
*/
|
|
16
|
+
export declare function applyCrucibleEvent<TDatum extends Datum>(state: CrucibleRunState<TDatum>, event: CrucibleEvent, context: CrucibleApplyContext): CrucibleApplyResult<TDatum>;
|
|
17
|
+
/** Settled semantic rows; consumed source bodies are represented by products only. */
|
|
18
|
+
export declare function buildCrucibleProjection<TDatum extends Datum>(state: CrucibleRunState<TDatum>, spec?: CrucibleProjectionSpec): CrucibleProjectionRow[];
|
|
19
|
+
/** Normative projection-name alias used by server and AI chart builders. */
|
|
20
|
+
export declare const crucibleProjectionRows: typeof buildCrucibleProjection;
|
|
21
|
+
/** Products + still-independent components + declared loss must equal input. */
|
|
22
|
+
export declare function evaluateCrucibleConservation<TDatum extends Datum>(state: CrucibleRunState<TDatum>, spec?: CrucibleConservationSpec): CrucibleConservationResult;
|
|
23
|
+
export declare function buildCrucibleEvidence<TDatum extends Datum>(state: CrucibleRunState<TDatum>, options?: {
|
|
24
|
+
projection?: CrucibleProjectionSpec;
|
|
25
|
+
conservation?: CrucibleConservationSpec;
|
|
26
|
+
}): {
|
|
27
|
+
history: CrucibleHistoryItem[];
|
|
28
|
+
projection: CrucibleProjectionRow[];
|
|
29
|
+
conservation: CrucibleConservationResult;
|
|
30
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Deterministic compilation, replay, geometry, and bodies for CrucibleChart. */
|
|
2
|
+
import type { Datum } from "../shared/datumTypes";
|
|
3
|
+
import type { PhysicsPipelineConfig, PhysicsQueuedSpawn } from "../../stream/physics/PhysicsPipelineStore";
|
|
4
|
+
import type { PhysicsColliderSpec } from "../../stream/physics/PhysicsKernel";
|
|
5
|
+
import type { CrucibleCompileOptions, CrucibleCompiledPlan, CrucibleDiagnostic, CrucibleLayout, CrucibleOutlet, CrucibleReplayResult, CrucibleRunState } from "./crucibleTypes";
|
|
6
|
+
export declare const DEFAULT_CRUCIBLE_WIDTH = 900;
|
|
7
|
+
export declare const DEFAULT_CRUCIBLE_HEIGHT = 520;
|
|
8
|
+
export declare const DEFAULT_CRUCIBLE_SIZE: [number, number];
|
|
9
|
+
export declare const DEFAULT_CRUCIBLE_OUTLETS: readonly CrucibleOutlet[];
|
|
10
|
+
export interface CrucibleInitialStateResult<TDatum extends Datum = Datum> {
|
|
11
|
+
state: CrucibleRunState<TDatum>;
|
|
12
|
+
diagnostics: CrucibleDiagnostic[];
|
|
13
|
+
}
|
|
14
|
+
/** Evaluate accessors once and create the immutable replay origin. */
|
|
15
|
+
export declare function createInitialCrucibleState<TDatum extends Datum>(options: CrucibleCompileOptions<TDatum>): CrucibleInitialStateResult<TDatum>;
|
|
16
|
+
/** Responsive authored regions shared by the live chart and snapshot renderer. */
|
|
17
|
+
export declare function buildCrucibleLayout(size?: [number, number], outlets?: readonly CrucibleOutlet[]): CrucibleLayout;
|
|
18
|
+
/** Chamber walls with outlet apertures, plus non-blocking outlet sensors. */
|
|
19
|
+
export declare function crucibleBoundaryColliders(layout: CrucibleLayout): PhysicsColliderSpec[];
|
|
20
|
+
export declare function buildCruciblePhysicsConfig(seed: number | string | undefined, colliders: readonly PhysicsColliderSpec[]): PhysicsPipelineConfig;
|
|
21
|
+
export declare function crucibleComponentBodyId(componentId: string): string;
|
|
22
|
+
export declare function crucibleProductBodyId(productId: string): string;
|
|
23
|
+
export declare function crucibleBondId(productId: string, sourceId: string): string;
|
|
24
|
+
export interface CrucibleSpawnOptions {
|
|
25
|
+
seed?: number | string;
|
|
26
|
+
bodyRadius?: number;
|
|
27
|
+
radiusRange?: [number, number];
|
|
28
|
+
}
|
|
29
|
+
/** Stable component bodies at the chamber charge point. */
|
|
30
|
+
export declare function buildCrucibleInitialSpawns<TDatum extends Datum>(state: CrucibleRunState<TDatum>, layout: CrucibleLayout, options?: CrucibleSpawnOptions): PhysicsQueuedSpawn[];
|
|
31
|
+
/**
|
|
32
|
+
* Stable terminal body set. Source body ids persist; product cores are added.
|
|
33
|
+
* Split sources target the centroid of their products.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildCrucibleStateSpawns<TDatum extends Datum>(state: CrucibleRunState<TDatum>, layout: CrucibleLayout, options?: CrucibleSpawnOptions): PhysicsQueuedSpawn[];
|
|
36
|
+
/** Terminal-name alias retained for callers explicitly rendering the outcome. */
|
|
37
|
+
export declare const buildCrucibleTerminalSpawns: typeof buildCrucibleStateSpawns;
|
|
38
|
+
export declare function crucibleSemanticKey(value: unknown): string;
|
|
39
|
+
export interface CrucibleResolvedTime {
|
|
40
|
+
elapsed: number;
|
|
41
|
+
phaseId: string;
|
|
42
|
+
phaseIndex: number;
|
|
43
|
+
phaseElapsed: number;
|
|
44
|
+
complete: boolean;
|
|
45
|
+
}
|
|
46
|
+
export declare function resolveCrucibleTime<TDatum extends Datum>(plan: Pick<CrucibleCompiledPlan<TDatum>, "phases" | "duration">, elapsed: number): CrucibleResolvedTime;
|
|
47
|
+
export declare function resolveCrucibleSnapshotAt<TDatum extends Datum>(plan: Pick<CrucibleCompiledPlan<TDatum>, "phases" | "duration">, snapshotAt: number | {
|
|
48
|
+
phaseId: string;
|
|
49
|
+
progress?: number;
|
|
50
|
+
} | undefined): number;
|
|
51
|
+
/** Replay from the immutable origin through an inclusive authored time. */
|
|
52
|
+
export declare function replayCruciblePlan<TDatum extends Datum>(plan: Pick<CrucibleCompiledPlan<TDatum>, "initialState" | "events" | "products" | "outlets" | "phases" | "duration">, throughTime?: number): CrucibleReplayResult<TDatum>;
|
|
53
|
+
/** Compile and validate the full controlled tape, including a terminal dry run. */
|
|
54
|
+
export declare function compileCruciblePlan<TDatum extends Datum>(options: CrucibleCompileOptions<TDatum>): CrucibleCompiledPlan<TDatum>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Pure authoring helpers for explicit Crucible event tapes. */
|
|
2
|
+
import type { CrucibleEvent, CrucibleLoss } from "./crucibleTypes";
|
|
3
|
+
/** Event metadata that remains wholly authored by the caller. */
|
|
4
|
+
export type CrucibleEventStep = Pick<CrucibleEvent, "at" | "label" | "description" | "summary"> & {
|
|
5
|
+
/** Optional stable event id; a deterministic id is generated when omitted. */
|
|
6
|
+
id?: string;
|
|
7
|
+
};
|
|
8
|
+
/** Explicit sources admitted while a product is forming. */
|
|
9
|
+
export interface CrucibleProductSourceStep extends CrucibleEventStep {
|
|
10
|
+
sourceIds: readonly string[];
|
|
11
|
+
basisRelationIds?: readonly string[];
|
|
12
|
+
loss?: CrucibleLoss;
|
|
13
|
+
}
|
|
14
|
+
/** Explicit completion and routing of an already-formed product. */
|
|
15
|
+
export interface CrucibleProductCompletionStep extends CrucibleEventStep {
|
|
16
|
+
outletId?: string;
|
|
17
|
+
reason?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface BuildCrucibleProductEventsOptions {
|
|
20
|
+
productId: string;
|
|
21
|
+
/** Prefix for generated event ids. Defaults to `productId`. */
|
|
22
|
+
idPrefix?: string;
|
|
23
|
+
/** Opens a forming product with a `combine` effect. */
|
|
24
|
+
form: CrucibleProductSourceStep;
|
|
25
|
+
/** Ordered later admissions, each represented by one `contribute` effect. */
|
|
26
|
+
contributions?: readonly CrucibleProductSourceStep[];
|
|
27
|
+
/** Required explicit completion; the helper never guesses when to pour. */
|
|
28
|
+
complete: CrucibleProductCompletionStep;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Build the canonical form -> contribute* -> complete lifecycle for one
|
|
32
|
+
* declared product.
|
|
33
|
+
*
|
|
34
|
+
* This is authoring sugar only. The caller supplies every source id,
|
|
35
|
+
* relation id, event position, product id, and outlet. The helper performs no
|
|
36
|
+
* grouping, inference, thresholding, or collision-derived classification.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildCrucibleProductEvents(options: BuildCrucibleProductEventsOptions): CrucibleEvent[];
|