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,415 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure domain contracts for CrucibleChart.
|
|
3
|
+
*
|
|
4
|
+
* A Crucible run is a bounded, controlled event tape. Source components are
|
|
5
|
+
* assigned to at most one product, while products may remain `forming` across
|
|
6
|
+
* several events before being completed and poured to an outlet.
|
|
7
|
+
*/
|
|
8
|
+
import type { Datum } from "../shared/datumTypes";
|
|
9
|
+
import type { ChartAccessor } from "../shared/types";
|
|
10
|
+
import type { PhysicsPipelineConfig, PhysicsQueuedSpawn } from "../../stream/physics/PhysicsPipelineStore";
|
|
11
|
+
import type { PhysicsColliderSpec } from "../../stream/physics/PhysicsKernel";
|
|
12
|
+
export type CrucibleComponentStatus = "queued" | "active" | "transformed" | "consumed" | "retained" | "ejected" | "failed" | "recovered";
|
|
13
|
+
export type CrucibleProductStatus = "forming" | "complete";
|
|
14
|
+
export type CrucibleMotion = "charge" | "mix" | "hold" | "press" | "bind" | "separate" | "pour" | "quench";
|
|
15
|
+
export type CrucibleMetricMap = Record<string, number>;
|
|
16
|
+
export interface CruciblePhase {
|
|
17
|
+
id: string;
|
|
18
|
+
duration: number;
|
|
19
|
+
label?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
intensity?: number;
|
|
22
|
+
motion?: CrucibleMotion;
|
|
23
|
+
color?: string;
|
|
24
|
+
metrics?: Record<string, string | number>;
|
|
25
|
+
}
|
|
26
|
+
export interface CrucibleOutlet {
|
|
27
|
+
id: string;
|
|
28
|
+
label?: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
side?: "left" | "right" | "bottom";
|
|
31
|
+
color?: string;
|
|
32
|
+
order?: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Source-component selector. Supplied fields intersect; ids are resolved in
|
|
36
|
+
* lexical order before `count` is applied so fresh arrays replay identically.
|
|
37
|
+
*/
|
|
38
|
+
export interface CrucibleSelector {
|
|
39
|
+
ids?: readonly string[];
|
|
40
|
+
categories?: readonly string[];
|
|
41
|
+
statuses?: readonly CrucibleComponentStatus[];
|
|
42
|
+
outletIds?: readonly string[];
|
|
43
|
+
count?: number;
|
|
44
|
+
}
|
|
45
|
+
/** A declared mold. State is created only when an effect forms the product. */
|
|
46
|
+
export interface CrucibleProductDefinition {
|
|
47
|
+
id: string;
|
|
48
|
+
label?: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
category?: string;
|
|
51
|
+
/** Optional declared final amount, applied when the product completes. */
|
|
52
|
+
amount?: number;
|
|
53
|
+
color?: string;
|
|
54
|
+
metrics?: CrucibleMetricMap;
|
|
55
|
+
outletId?: string;
|
|
56
|
+
order?: number;
|
|
57
|
+
}
|
|
58
|
+
export interface CrucibleLoss {
|
|
59
|
+
amount?: number;
|
|
60
|
+
metrics?: CrucibleMetricMap;
|
|
61
|
+
label?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface CrucibleRelationDefinition {
|
|
64
|
+
id: string;
|
|
65
|
+
sourceIds: readonly string[];
|
|
66
|
+
label?: string;
|
|
67
|
+
category?: string;
|
|
68
|
+
strength?: number;
|
|
69
|
+
metrics?: CrucibleMetricMap;
|
|
70
|
+
}
|
|
71
|
+
export type CrucibleRelationResolution = "combined" | "rejected" | "expired";
|
|
72
|
+
export interface CrucibleRelationState extends CrucibleRelationDefinition {
|
|
73
|
+
status: "active" | "resolved";
|
|
74
|
+
createdByEventId: string;
|
|
75
|
+
createdAt: number;
|
|
76
|
+
resolution?: CrucibleRelationResolution;
|
|
77
|
+
resolvedByEventId?: string;
|
|
78
|
+
resolvedAt?: number;
|
|
79
|
+
reason?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface CrucibleSetStateEffect {
|
|
82
|
+
type: "set-state";
|
|
83
|
+
select: CrucibleSelector;
|
|
84
|
+
state: Exclude<CrucibleComponentStatus, "consumed">;
|
|
85
|
+
outletId?: string;
|
|
86
|
+
reason?: string;
|
|
87
|
+
metricsDelta?: CrucibleMetricMap;
|
|
88
|
+
}
|
|
89
|
+
export interface CrucibleSetRelationEffect {
|
|
90
|
+
type: "set-relation";
|
|
91
|
+
relation: CrucibleRelationDefinition;
|
|
92
|
+
}
|
|
93
|
+
export interface CrucibleResolveRelationEffect {
|
|
94
|
+
type: "resolve-relation";
|
|
95
|
+
relationIds: readonly string[];
|
|
96
|
+
resolution: CrucibleRelationResolution;
|
|
97
|
+
reason?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface CrucibleCombineEffect {
|
|
100
|
+
type: "combine";
|
|
101
|
+
sourceIds: readonly string[];
|
|
102
|
+
productId: string;
|
|
103
|
+
basisRelationIds?: readonly string[];
|
|
104
|
+
loss?: CrucibleLoss;
|
|
105
|
+
/** Defaults to true. Set false to admit later `contribute` effects. */
|
|
106
|
+
complete?: boolean;
|
|
107
|
+
}
|
|
108
|
+
export interface CrucibleContributeEffect {
|
|
109
|
+
type: "contribute";
|
|
110
|
+
sourceIds: readonly string[];
|
|
111
|
+
productId: string;
|
|
112
|
+
basisRelationIds?: readonly string[];
|
|
113
|
+
loss?: CrucibleLoss;
|
|
114
|
+
}
|
|
115
|
+
export interface CrucibleCompleteProductEffect {
|
|
116
|
+
type: "complete-product";
|
|
117
|
+
productId: string;
|
|
118
|
+
outletId?: string;
|
|
119
|
+
reason?: string;
|
|
120
|
+
}
|
|
121
|
+
export interface CrucibleProductAllocation {
|
|
122
|
+
productId: string;
|
|
123
|
+
amount?: number;
|
|
124
|
+
metrics?: CrucibleMetricMap;
|
|
125
|
+
}
|
|
126
|
+
export interface CrucibleSplitEffect {
|
|
127
|
+
type: "split";
|
|
128
|
+
sourceId: string;
|
|
129
|
+
products: readonly CrucibleProductAllocation[];
|
|
130
|
+
loss?: CrucibleLoss;
|
|
131
|
+
}
|
|
132
|
+
export interface CrucibleEjectEffect {
|
|
133
|
+
type: "eject";
|
|
134
|
+
select: CrucibleSelector;
|
|
135
|
+
outletId: string;
|
|
136
|
+
state?: "ejected" | "failed" | "retained" | "recovered";
|
|
137
|
+
reason?: string;
|
|
138
|
+
}
|
|
139
|
+
export type CrucibleMetricTarget = "run" | {
|
|
140
|
+
components: CrucibleSelector;
|
|
141
|
+
} | {
|
|
142
|
+
productIds: readonly string[];
|
|
143
|
+
};
|
|
144
|
+
export interface CrucibleSetMetricEffect {
|
|
145
|
+
type: "set-metric";
|
|
146
|
+
target: CrucibleMetricTarget;
|
|
147
|
+
metricsDelta: CrucibleMetricMap;
|
|
148
|
+
}
|
|
149
|
+
export interface CrucibleSetOutcomeEffect {
|
|
150
|
+
type: "set-outcome";
|
|
151
|
+
outcome: string;
|
|
152
|
+
summary?: string;
|
|
153
|
+
}
|
|
154
|
+
export type CrucibleEffect = CrucibleSetStateEffect | CrucibleSetRelationEffect | CrucibleResolveRelationEffect | CrucibleCombineEffect | CrucibleContributeEffect | CrucibleCompleteProductEffect | CrucibleSplitEffect | CrucibleEjectEffect | CrucibleSetMetricEffect | CrucibleSetOutcomeEffect;
|
|
155
|
+
export type CrucibleEventAt = {
|
|
156
|
+
time: number;
|
|
157
|
+
phaseId?: never;
|
|
158
|
+
progress?: never;
|
|
159
|
+
} | {
|
|
160
|
+
time?: never;
|
|
161
|
+
phaseId: string;
|
|
162
|
+
progress?: number;
|
|
163
|
+
};
|
|
164
|
+
export interface CrucibleEvent {
|
|
165
|
+
id: string;
|
|
166
|
+
at: CrucibleEventAt;
|
|
167
|
+
effects: readonly CrucibleEffect[];
|
|
168
|
+
label?: string;
|
|
169
|
+
description?: string;
|
|
170
|
+
summary?: string;
|
|
171
|
+
}
|
|
172
|
+
export interface CrucibleHistoryItem {
|
|
173
|
+
eventId: string;
|
|
174
|
+
effectType: CrucibleEffect["type"];
|
|
175
|
+
phaseId: string;
|
|
176
|
+
authoredAt: number;
|
|
177
|
+
appliedAt: number;
|
|
178
|
+
label?: string;
|
|
179
|
+
summary?: string;
|
|
180
|
+
sourceIds?: string[];
|
|
181
|
+
productIds?: string[];
|
|
182
|
+
relationIds?: string[];
|
|
183
|
+
outletIds?: string[];
|
|
184
|
+
}
|
|
185
|
+
export interface CrucibleComponentState<TDatum extends Datum = Datum> {
|
|
186
|
+
id: string;
|
|
187
|
+
label: string;
|
|
188
|
+
category: string;
|
|
189
|
+
datum: TDatum;
|
|
190
|
+
status: CrucibleComponentStatus;
|
|
191
|
+
initialAmount: number;
|
|
192
|
+
amount: number;
|
|
193
|
+
initialMetrics: CrucibleMetricMap;
|
|
194
|
+
metrics: CrucibleMetricMap;
|
|
195
|
+
productIds: string[];
|
|
196
|
+
outletId?: string;
|
|
197
|
+
reason?: string;
|
|
198
|
+
history: CrucibleHistoryItem[];
|
|
199
|
+
}
|
|
200
|
+
export interface CrucibleProductState {
|
|
201
|
+
id: string;
|
|
202
|
+
label: string;
|
|
203
|
+
description?: string;
|
|
204
|
+
category: string;
|
|
205
|
+
color?: string;
|
|
206
|
+
order?: number;
|
|
207
|
+
declaredAmount?: number;
|
|
208
|
+
amount: number;
|
|
209
|
+
metrics: CrucibleMetricMap;
|
|
210
|
+
status: CrucibleProductStatus;
|
|
211
|
+
sourceIds: string[];
|
|
212
|
+
outletId?: string;
|
|
213
|
+
createdByEventId: string;
|
|
214
|
+
createdAt: number;
|
|
215
|
+
completedByEventId?: string;
|
|
216
|
+
completedAt?: number;
|
|
217
|
+
reason?: string;
|
|
218
|
+
history: CrucibleHistoryItem[];
|
|
219
|
+
}
|
|
220
|
+
export interface CrucibleRunState<TDatum extends Datum = Datum> {
|
|
221
|
+
elapsed: number;
|
|
222
|
+
phaseElapsed: number;
|
|
223
|
+
phaseId: string;
|
|
224
|
+
phaseIndex: number;
|
|
225
|
+
playing: boolean;
|
|
226
|
+
complete: boolean;
|
|
227
|
+
outcome?: string;
|
|
228
|
+
summary?: string;
|
|
229
|
+
eventsApplied: string[];
|
|
230
|
+
components: Record<string, CrucibleComponentState<TDatum>>;
|
|
231
|
+
products: Record<string, CrucibleProductState>;
|
|
232
|
+
relations: Record<string, CrucibleRelationState>;
|
|
233
|
+
input: {
|
|
234
|
+
amount: number;
|
|
235
|
+
metrics: CrucibleMetricMap;
|
|
236
|
+
};
|
|
237
|
+
metrics: CrucibleMetricMap;
|
|
238
|
+
loss: {
|
|
239
|
+
amount: number;
|
|
240
|
+
metrics: CrucibleMetricMap;
|
|
241
|
+
};
|
|
242
|
+
history: CrucibleHistoryItem[];
|
|
243
|
+
}
|
|
244
|
+
export type CrucibleMaterializationType = "activate-relation" | "resolve-relation" | "form-product" | "update-product" | "complete-product" | "split-source" | "retarget-component" | "retarget-product";
|
|
245
|
+
export interface CrucibleMaterialization {
|
|
246
|
+
type: CrucibleMaterializationType;
|
|
247
|
+
eventId: string;
|
|
248
|
+
sourceIds?: string[];
|
|
249
|
+
productIds?: string[];
|
|
250
|
+
relationIds?: string[];
|
|
251
|
+
outletIds?: string[];
|
|
252
|
+
}
|
|
253
|
+
export interface CrucibleObservation {
|
|
254
|
+
type: "crucible-event" | CrucibleMaterializationType | "crucible-outcome";
|
|
255
|
+
eventId: string;
|
|
256
|
+
phaseId: string;
|
|
257
|
+
authoredAt: number;
|
|
258
|
+
appliedAt: number;
|
|
259
|
+
sourceIds?: string[];
|
|
260
|
+
productIds?: string[];
|
|
261
|
+
relationIds?: string[];
|
|
262
|
+
outletIds?: string[];
|
|
263
|
+
outcome?: string;
|
|
264
|
+
}
|
|
265
|
+
export interface CrucibleDiagnostic {
|
|
266
|
+
severity: "warning" | "error";
|
|
267
|
+
code: string;
|
|
268
|
+
message: string;
|
|
269
|
+
path?: string;
|
|
270
|
+
ids?: string[];
|
|
271
|
+
}
|
|
272
|
+
export interface CrucibleApplyResult<TDatum extends Datum = Datum> {
|
|
273
|
+
applied: boolean;
|
|
274
|
+
state: CrucibleRunState<TDatum>;
|
|
275
|
+
materializations: CrucibleMaterialization[];
|
|
276
|
+
observations: CrucibleObservation[];
|
|
277
|
+
diagnostics: CrucibleDiagnostic[];
|
|
278
|
+
}
|
|
279
|
+
export interface CrucibleApplyContext {
|
|
280
|
+
phaseId: string;
|
|
281
|
+
authoredAt: number;
|
|
282
|
+
appliedAt: number;
|
|
283
|
+
products: readonly CrucibleProductDefinition[];
|
|
284
|
+
outlets: readonly CrucibleOutlet[];
|
|
285
|
+
}
|
|
286
|
+
export interface CrucibleCompiledPhase extends CruciblePhase {
|
|
287
|
+
index: number;
|
|
288
|
+
start: number;
|
|
289
|
+
end: number;
|
|
290
|
+
}
|
|
291
|
+
/** `boundaryRank` encodes phase-end (0), then next phase-start (1). */
|
|
292
|
+
export interface CrucibleCompiledEvent extends CrucibleEvent {
|
|
293
|
+
index: number;
|
|
294
|
+
authoredAt: number;
|
|
295
|
+
phaseId: string;
|
|
296
|
+
phaseIndex: number;
|
|
297
|
+
boundaryRank: 0 | 1;
|
|
298
|
+
}
|
|
299
|
+
export interface CrucibleAccessors<TDatum extends Datum = Datum> {
|
|
300
|
+
idAccessor?: ChartAccessor<TDatum, string>;
|
|
301
|
+
labelAccessor?: ChartAccessor<TDatum, string>;
|
|
302
|
+
categoryAccessor?: ChartAccessor<TDatum, string>;
|
|
303
|
+
amountAccessor?: ChartAccessor<TDatum, number>;
|
|
304
|
+
metricsAccessor?: ChartAccessor<TDatum, CrucibleMetricMap>;
|
|
305
|
+
initialStateAccessor?: ChartAccessor<TDatum, CrucibleComponentStatus>;
|
|
306
|
+
}
|
|
307
|
+
export interface CrucibleCompileOptions<TDatum extends Datum = Datum> extends CrucibleAccessors<TDatum> {
|
|
308
|
+
data: readonly TDatum[];
|
|
309
|
+
phases: readonly CruciblePhase[];
|
|
310
|
+
products?: readonly CrucibleProductDefinition[];
|
|
311
|
+
outlets?: readonly CrucibleOutlet[];
|
|
312
|
+
events?: readonly CrucibleEvent[];
|
|
313
|
+
size?: [number, number];
|
|
314
|
+
seed?: number | string;
|
|
315
|
+
bodyRadius?: number;
|
|
316
|
+
radiusRange?: [number, number];
|
|
317
|
+
metrics?: CrucibleMetricMap;
|
|
318
|
+
}
|
|
319
|
+
export interface CrucibleLayoutOutlet extends CrucibleOutlet {
|
|
320
|
+
x: number;
|
|
321
|
+
y: number;
|
|
322
|
+
width: number;
|
|
323
|
+
height: number;
|
|
324
|
+
}
|
|
325
|
+
export interface CrucibleLayout {
|
|
326
|
+
width: number;
|
|
327
|
+
height: number;
|
|
328
|
+
phaseRail: {
|
|
329
|
+
x: number;
|
|
330
|
+
y: number;
|
|
331
|
+
width: number;
|
|
332
|
+
height: number;
|
|
333
|
+
};
|
|
334
|
+
chamber: {
|
|
335
|
+
x: number;
|
|
336
|
+
y: number;
|
|
337
|
+
width: number;
|
|
338
|
+
height: number;
|
|
339
|
+
};
|
|
340
|
+
mouth: {
|
|
341
|
+
x: number;
|
|
342
|
+
y: number;
|
|
343
|
+
width: number;
|
|
344
|
+
height: number;
|
|
345
|
+
};
|
|
346
|
+
projection: {
|
|
347
|
+
x: number;
|
|
348
|
+
y: number;
|
|
349
|
+
width: number;
|
|
350
|
+
height: number;
|
|
351
|
+
};
|
|
352
|
+
outlets: CrucibleLayoutOutlet[];
|
|
353
|
+
}
|
|
354
|
+
export interface CrucibleBodyDatum<TDatum extends Datum = Datum> {
|
|
355
|
+
__crucible: true;
|
|
356
|
+
kind: "component" | "product";
|
|
357
|
+
semanticId: string;
|
|
358
|
+
sourceDatum?: TDatum;
|
|
359
|
+
product?: CrucibleProductState;
|
|
360
|
+
}
|
|
361
|
+
export interface CrucibleCompiledPlan<TDatum extends Datum = Datum> {
|
|
362
|
+
phases: CrucibleCompiledPhase[];
|
|
363
|
+
events: CrucibleCompiledEvent[];
|
|
364
|
+
products: CrucibleProductDefinition[];
|
|
365
|
+
outlets: CrucibleOutlet[];
|
|
366
|
+
duration: number;
|
|
367
|
+
initialState: CrucibleRunState<TDatum>;
|
|
368
|
+
terminalState: CrucibleRunState<TDatum>;
|
|
369
|
+
layout: CrucibleLayout;
|
|
370
|
+
colliders: PhysicsColliderSpec[];
|
|
371
|
+
config: PhysicsPipelineConfig;
|
|
372
|
+
initialSpawns: PhysicsQueuedSpawn[];
|
|
373
|
+
terminalSpawns: PhysicsQueuedSpawn[];
|
|
374
|
+
semanticKey: string;
|
|
375
|
+
diagnostics: CrucibleDiagnostic[];
|
|
376
|
+
}
|
|
377
|
+
export interface CrucibleReplayResult<TDatum extends Datum = Datum> {
|
|
378
|
+
state: CrucibleRunState<TDatum>;
|
|
379
|
+
materializations: CrucibleMaterialization[];
|
|
380
|
+
observations: CrucibleObservation[];
|
|
381
|
+
diagnostics: CrucibleDiagnostic[];
|
|
382
|
+
}
|
|
383
|
+
export type CrucibleProjectionGroupBy = "status" | "outlet" | "category" | "product";
|
|
384
|
+
export interface CrucibleProjectionSpec {
|
|
385
|
+
groupBy?: CrucibleProjectionGroupBy;
|
|
386
|
+
measure?: "count" | "amount" | string;
|
|
387
|
+
order?: readonly string[];
|
|
388
|
+
showInputBaseline?: boolean;
|
|
389
|
+
showDelta?: boolean;
|
|
390
|
+
}
|
|
391
|
+
export interface CrucibleProjectionRow {
|
|
392
|
+
key: string;
|
|
393
|
+
label: string;
|
|
394
|
+
count: number;
|
|
395
|
+
amount: number;
|
|
396
|
+
metrics: CrucibleMetricMap;
|
|
397
|
+
status?: CrucibleComponentStatus | CrucibleProductStatus;
|
|
398
|
+
outletId?: string;
|
|
399
|
+
category?: string;
|
|
400
|
+
productId?: string;
|
|
401
|
+
}
|
|
402
|
+
export interface CrucibleConservationSpec {
|
|
403
|
+
field?: "amount" | string;
|
|
404
|
+
tolerance?: number;
|
|
405
|
+
}
|
|
406
|
+
export interface CrucibleConservationResult {
|
|
407
|
+
field: string;
|
|
408
|
+
input: number;
|
|
409
|
+
products: number;
|
|
410
|
+
unassigned: number;
|
|
411
|
+
loss: number;
|
|
412
|
+
output: number;
|
|
413
|
+
delta: number;
|
|
414
|
+
conserved: boolean;
|
|
415
|
+
}
|
|
@@ -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
|
|
@@ -36,6 +36,8 @@ export interface ChartModeInput {
|
|
|
36
36
|
responsiveRules?: ResponsiveRule[];
|
|
37
37
|
}
|
|
38
38
|
export interface ChartModeResult {
|
|
39
|
+
/** Effective mode after responsive rules have been applied. */
|
|
40
|
+
mode: ChartMode;
|
|
39
41
|
width: number;
|
|
40
42
|
height: number;
|
|
41
43
|
showAxes: boolean;
|
|
@@ -65,3 +67,9 @@ export declare function resolveChartMode(mode: ChartMode | undefined, userProps:
|
|
|
65
67
|
width?: number;
|
|
66
68
|
height?: number;
|
|
67
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
|
/**
|
|
@@ -110,6 +110,14 @@ export interface ChartPropSpec {
|
|
|
110
110
|
default?: unknown;
|
|
111
111
|
/** Schema-side description; surfaces in LLM tool definitions. */
|
|
112
112
|
description?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Additional JSON Schema keywords for this prop. Use this for nested wire
|
|
115
|
+
* contracts (`items`, `properties`, `oneOf`, numeric bounds, and similar)
|
|
116
|
+
* that cannot be expressed by the shallow runtime validation map. These
|
|
117
|
+
* keywords are copied only to the AI/MCP schema; runtime validation still
|
|
118
|
+
* consumes the top-level `type` and `enum` above.
|
|
119
|
+
*/
|
|
120
|
+
schema?: Readonly<Record<string, unknown>>;
|
|
113
121
|
/**
|
|
114
122
|
* When true, the prop is included in validationMap but omitted from
|
|
115
123
|
* schema.json. Use for handler/callback props (`onClick`, `tooltip`)
|
|
@@ -157,7 +165,7 @@ export declare const ORIENTATION_ENUM: readonly ["vertical", "horizontal"];
|
|
|
157
165
|
export declare const HORIZONTAL_VERTICAL_ENUM: readonly ["horizontal", "vertical"];
|
|
158
166
|
export declare const LEGEND_POSITION_ENUM: readonly ["right", "left", "top", "bottom"];
|
|
159
167
|
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"];
|
|
168
|
+
export declare const CHART_MODE_ENUM: readonly ["primary", "context", "sparkline", "mobile"];
|
|
161
169
|
/**
|
|
162
170
|
* Compose a chart's full prop set (bags + ownProps) in deterministic order.
|
|
163
171
|
* ownProps wins on key collision so a chart can override a shared default.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Nested JSON Schema fragments for CrucibleChart's serializable program. */
|
|
2
|
+
export declare const CRUCIBLE_PHASES_SCHEMA: Readonly<Record<string, unknown>>;
|
|
3
|
+
export declare const CRUCIBLE_PRODUCTS_SCHEMA: Readonly<Record<string, unknown>>;
|
|
4
|
+
export declare const CRUCIBLE_OUTLETS_SCHEMA: Readonly<Record<string, unknown>>;
|
|
5
|
+
export declare const CRUCIBLE_EVENTS_SCHEMA: Readonly<Record<string, unknown>>;
|
|
@@ -3,6 +3,16 @@ export interface Diagnosis {
|
|
|
3
3
|
code: string;
|
|
4
4
|
message: string;
|
|
5
5
|
fix: string;
|
|
6
|
+
/** Optional evaluator domain; omitted by legacy configuration checks. */
|
|
7
|
+
domain?: "data" | "configuration" | "accessibility" | "render";
|
|
8
|
+
/** Numeric/data checks attach the resolved accessor label. */
|
|
9
|
+
field?: string;
|
|
10
|
+
/** Numeric/data checks attach the semantic encoding role. */
|
|
11
|
+
role?: string;
|
|
12
|
+
/** Bounded zero-based row indices for actionable data findings. */
|
|
13
|
+
rows?: ReadonlyArray<number>;
|
|
14
|
+
/** Full affected-row/group count when `rows` is truncated. */
|
|
15
|
+
count?: number;
|
|
6
16
|
}
|
|
7
17
|
export interface DiagnosisResult {
|
|
8
18
|
ok: boolean;
|
|
@@ -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;
|
|
@@ -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", "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", "PhysicsPileChart", "CollisionSwarmChart", "GauntletChart", "ProcessFlowChart", "PhysicalFlowChart", "BigNumber"];
|
|
8
|
+
export declare const KNOWN_CHART_COMPONENTS: readonly ["BarChart", "StackedBarChart", "GroupedBarChart", "SwarmPlot", "BoxPlot", "Histogram", "ViolinPlot", "RidgelinePlot", "DotPlot", "PieChart", "DonutChart", "GaugeChart", "FunnelChart", "SwimlaneChart", "LikertChart", "LineChart", "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", "PhysicsPileChart", "CollisionSwarmChart", "GauntletChart", "CrucibleChart", "ProcessFlowChart", "PhysicalFlowChart", "BigNumber"];
|
|
9
9
|
export declare function isKnownChartComponent(componentName: string): boolean;
|