@fundamental-engine/core 0.9.4 → 0.10.0
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/dist/engine/field.d.ts.map +1 -1
- package/dist/engine/field.js +10 -0
- package/dist/engine/field.js.map +1 -1
- package/dist/engine/types.d.ts +29 -0
- package/dist/engine/types.d.ts.map +1 -1
- package/dist/inspect/report.js +2 -2
- package/dist/inspect/report.js.map +1 -1
- package/dist/recipes/catalog.d.ts +14 -9
- package/dist/recipes/catalog.d.ts.map +1 -1
- package/dist/recipes/catalog.js +9 -5
- package/dist/recipes/catalog.js.map +1 -1
- package/dist/recipes/compile.d.ts +26 -16
- package/dist/recipes/compile.d.ts.map +1 -1
- package/dist/recipes/compile.js +14 -10
- package/dist/recipes/compile.js.map +1 -1
- package/dist/recipes/index.d.ts +2 -0
- package/dist/recipes/index.d.ts.map +1 -1
- package/dist/recipes/index.js +5 -3
- package/dist/recipes/index.js.map +1 -1
- package/dist/recipes/schema.d.ts +27 -17
- package/dist/recipes/schema.d.ts.map +1 -1
- package/dist/recipes/schema.js +11 -6
- package/dist/recipes/schema.js.map +1 -1
- package/dist/recipes/wayfinding.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/world/ablation/ablation.d.ts +39 -0
- package/dist/world/ablation/ablation.d.ts.map +1 -0
- package/dist/world/ablation/ablation.js +449 -0
- package/dist/world/ablation/ablation.js.map +1 -0
- package/dist/world/adapters/field-runtime.d.ts +56 -0
- package/dist/world/adapters/field-runtime.d.ts.map +1 -0
- package/dist/world/adapters/field-runtime.js +250 -0
- package/dist/world/adapters/field-runtime.js.map +1 -0
- package/dist/world/adapters/fsm-runtime.d.ts +18 -0
- package/dist/world/adapters/fsm-runtime.d.ts.map +1 -0
- package/dist/world/adapters/fsm-runtime.js +153 -0
- package/dist/world/adapters/fsm-runtime.js.map +1 -0
- package/dist/world/adapters/governor-runtime.d.ts +23 -0
- package/dist/world/adapters/governor-runtime.d.ts.map +1 -0
- package/dist/world/adapters/governor-runtime.js +185 -0
- package/dist/world/adapters/governor-runtime.js.map +1 -0
- package/dist/world/adapters/planner-runtime.d.ts +20 -0
- package/dist/world/adapters/planner-runtime.d.ts.map +1 -0
- package/dist/world/adapters/planner-runtime.js +144 -0
- package/dist/world/adapters/planner-runtime.js.map +1 -0
- package/dist/world/conformance/corpus.d.ts +89 -0
- package/dist/world/conformance/corpus.d.ts.map +1 -0
- package/dist/world/conformance/corpus.js +195 -0
- package/dist/world/conformance/corpus.js.map +1 -0
- package/dist/world/conformance/discoveries.d.ts +50 -0
- package/dist/world/conformance/discoveries.d.ts.map +1 -0
- package/dist/world/conformance/discoveries.js +71 -0
- package/dist/world/conformance/discoveries.js.map +1 -0
- package/dist/world/conformance/evidence.d.ts +37 -0
- package/dist/world/conformance/evidence.d.ts.map +1 -0
- package/dist/world/conformance/evidence.js +53 -0
- package/dist/world/conformance/evidence.js.map +1 -0
- package/dist/world/conformance/negative-results.d.ts +57 -0
- package/dist/world/conformance/negative-results.d.ts.map +1 -0
- package/dist/world/conformance/negative-results.js +73 -0
- package/dist/world/conformance/negative-results.js.map +1 -0
- package/dist/world/conformance/predictions.d.ts +66 -0
- package/dist/world/conformance/predictions.d.ts.map +1 -0
- package/dist/world/conformance/predictions.js +141 -0
- package/dist/world/conformance/predictions.js.map +1 -0
- package/dist/world/cross-substrate.d.ts +19 -0
- package/dist/world/cross-substrate.d.ts.map +1 -0
- package/dist/world/cross-substrate.js +123 -0
- package/dist/world/cross-substrate.js.map +1 -0
- package/dist/world/dynamics.d.ts +166 -0
- package/dist/world/dynamics.d.ts.map +1 -0
- package/dist/world/dynamics.js +30 -0
- package/dist/world/dynamics.js.map +1 -0
- package/dist/world/envelope.d.ts +44 -0
- package/dist/world/envelope.d.ts.map +1 -0
- package/dist/world/envelope.js +77 -0
- package/dist/world/envelope.js.map +1 -0
- package/dist/world/episodes/episodes.d.ts +64 -0
- package/dist/world/episodes/episodes.d.ts.map +1 -0
- package/dist/world/episodes/episodes.js +104 -0
- package/dist/world/episodes/episodes.js.map +1 -0
- package/dist/world/equivalence.d.ts +70 -0
- package/dist/world/equivalence.d.ts.map +1 -0
- package/dist/world/equivalence.js +205 -0
- package/dist/world/equivalence.js.map +1 -0
- package/dist/world/experiments/declarative-dynamics.d.ts +87 -0
- package/dist/world/experiments/declarative-dynamics.d.ts.map +1 -0
- package/dist/world/experiments/declarative-dynamics.js +153 -0
- package/dist/world/experiments/declarative-dynamics.js.map +1 -0
- package/dist/world/governor-equivalence.d.ts +51 -0
- package/dist/world/governor-equivalence.d.ts.map +1 -0
- package/dist/world/governor-equivalence.js +126 -0
- package/dist/world/governor-equivalence.js.map +1 -0
- package/dist/world/kernel.d.ts +49 -0
- package/dist/world/kernel.d.ts.map +1 -0
- package/dist/world/kernel.js +64 -0
- package/dist/world/kernel.js.map +1 -0
- package/dist/world/observatory/capture.d.ts +10 -0
- package/dist/world/observatory/capture.d.ts.map +1 -0
- package/dist/world/observatory/capture.js +371 -0
- package/dist/world/observatory/capture.js.map +1 -0
- package/dist/world/observatory/evidence-log.d.ts +131 -0
- package/dist/world/observatory/evidence-log.d.ts.map +1 -0
- package/dist/world/observatory/evidence-log.js +43 -0
- package/dist/world/observatory/evidence-log.js.map +1 -0
- package/dist/world/opportunity/opportunity.d.ts +85 -0
- package/dist/world/opportunity/opportunity.d.ts.map +1 -0
- package/dist/world/opportunity/opportunity.js +67 -0
- package/dist/world/opportunity/opportunity.js.map +1 -0
- package/dist/world/projection/evidence-profile.d.ts +51 -0
- package/dist/world/projection/evidence-profile.d.ts.map +1 -0
- package/dist/world/projection/evidence-profile.js +93 -0
- package/dist/world/projection/evidence-profile.js.map +1 -0
- package/dist/world/projection/projection.d.ts +162 -0
- package/dist/world/projection/projection.d.ts.map +1 -0
- package/dist/world/projection/projection.js +145 -0
- package/dist/world/projection/projection.js.map +1 -0
- package/dist/world/properties/properties.d.ts +87 -0
- package/dist/world/properties/properties.d.ts.map +1 -0
- package/dist/world/properties/properties.js +172 -0
- package/dist/world/properties/properties.js.map +1 -0
- package/dist/world/substrates/fsm.d.ts +59 -0
- package/dist/world/substrates/fsm.d.ts.map +1 -0
- package/dist/world/substrates/fsm.js +57 -0
- package/dist/world/substrates/fsm.js.map +1 -0
- package/dist/world/substrates/governor.d.ts +53 -0
- package/dist/world/substrates/governor.d.ts.map +1 -0
- package/dist/world/substrates/governor.js +73 -0
- package/dist/world/substrates/governor.js.map +1 -0
- package/dist/world/substrates/planner.d.ts +82 -0
- package/dist/world/substrates/planner.d.ts.map +1 -0
- package/dist/world/substrates/planner.js +114 -0
- package/dist/world/substrates/planner.js.map +1 -0
- package/dist/world/world.d.ts +73 -0
- package/dist/world/world.d.ts.map +1 -0
- package/dist/world/world.js +2 -0
- package/dist/world/world.js.map +1 -0
- package/package.json +1 -1
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
* bindings; diagnostics become inspector/render toggles; conditions become activation gates;
|
|
11
11
|
* accessibility becomes a reduced-motion output plan.
|
|
12
12
|
*/
|
|
13
|
-
import type {
|
|
13
|
+
import type { BodyPattern, FieldRecipe } from './schema.ts';
|
|
14
14
|
/** The CSS feedback variable a metric writes to (`attention` → `--field-attention`). */
|
|
15
15
|
export declare function metricVar(metric: string): string;
|
|
16
16
|
/** The data-* attributes a single recipe body authors onto an element (token lane → behavior). */
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function patternBodyAttributes(b: BodyPattern): Record<string, string>;
|
|
18
18
|
/** The executable form of a recipe's render stack (#370): which Field Surface each declared
|
|
19
19
|
* layer drives. One matter mode owns the underlay; overlay readings stack additively; heatmap
|
|
20
20
|
* is its own toggle. Layers with no executable surface yet are NAMED in `unapplied` — never
|
|
21
21
|
* silently dropped (the no-silent-caps rule). */
|
|
22
|
-
export interface
|
|
22
|
+
export interface PatternRenderPlan {
|
|
23
23
|
/** the underlay matter mode (`setRender`), or null to leave the field's current mode alone. */
|
|
24
24
|
underlay: string | null;
|
|
25
25
|
/** the additive overlay reading stack (`setOverlay`); empty = 'off'. */
|
|
@@ -32,26 +32,26 @@ export interface RecipeRenderPlan {
|
|
|
32
32
|
/** Derive the render plan from a recipe's declared layers (pure; `particles` is the base matter
|
|
33
33
|
* layer and maps to `dots`). `streamlines` prefers the overlay (it reads over content) unless it
|
|
34
34
|
* is the recipe's ONLY layer, where the underlay render mode of the same name serves. */
|
|
35
|
-
export declare function
|
|
35
|
+
export declare function patternRenderPlan(layers: readonly string[]): PatternRenderPlan;
|
|
36
36
|
/** One compiled body: the attribute set + the runtime tokens it carries. */
|
|
37
|
-
export interface
|
|
37
|
+
export interface PatternBodyRegistration {
|
|
38
38
|
attributes: Record<string, string>;
|
|
39
39
|
tokens: string[];
|
|
40
40
|
}
|
|
41
41
|
/** A relationship the recipe declares (from/to are conceptual endpoints, resolved at apply time). */
|
|
42
|
-
export interface
|
|
42
|
+
export interface PatternRelationshipRegistration {
|
|
43
43
|
from: string;
|
|
44
44
|
to: string;
|
|
45
45
|
type: string;
|
|
46
46
|
strength?: number;
|
|
47
47
|
}
|
|
48
48
|
/** A metric → feedback-variable binding (the metric lane becoming measurable state). */
|
|
49
|
-
export interface
|
|
49
|
+
export interface PatternFeedbackBinding {
|
|
50
50
|
metric: string;
|
|
51
51
|
var: string;
|
|
52
52
|
}
|
|
53
53
|
/** The reduced-motion output plan — what the runtime renders when motion is reduced (not just prose). */
|
|
54
|
-
export interface
|
|
54
|
+
export interface PatternReducedMotionPlan {
|
|
55
55
|
reducedMotion: string;
|
|
56
56
|
meaningWithoutMotion: string;
|
|
57
57
|
/** the static surfaces the runtime should render in place of motion. */
|
|
@@ -61,15 +61,15 @@ export interface RecipeReducedMotionPlan {
|
|
|
61
61
|
export interface CompiledPattern {
|
|
62
62
|
id: string;
|
|
63
63
|
recipe: FieldRecipe;
|
|
64
|
-
bodies:
|
|
65
|
-
relationships:
|
|
66
|
-
feedback:
|
|
64
|
+
bodies: PatternBodyRegistration[];
|
|
65
|
+
relationships: PatternRelationshipRegistration[];
|
|
66
|
+
feedback: PatternFeedbackBinding[];
|
|
67
67
|
diagnostics: string[];
|
|
68
68
|
metrics: string[];
|
|
69
69
|
conditions: string[];
|
|
70
70
|
/** the executable render plan (#370) — what applyRecipe drives when given a field target. */
|
|
71
|
-
render:
|
|
72
|
-
reducedMotion:
|
|
71
|
+
render: PatternRenderPlan;
|
|
72
|
+
reducedMotion: PatternReducedMotionPlan;
|
|
73
73
|
}
|
|
74
74
|
/** @deprecated Renamed to {@link CompiledPattern} (recipe → Pattern); removed at 1.0. */
|
|
75
75
|
export type CompiledRecipe = CompiledPattern;
|
|
@@ -85,13 +85,23 @@ export declare function compilePattern(r: FieldRecipe): CompiledPattern;
|
|
|
85
85
|
* Emit the `[data-body]` markup a recipe authors — a `<field-root>` plus one element per body. This is
|
|
86
86
|
* the copy-paste authoring for a recipe; drop it on a page and the field runs the recipe.
|
|
87
87
|
*/
|
|
88
|
-
export declare function
|
|
88
|
+
export declare function patternToMarkup(r: FieldRecipe): string;
|
|
89
89
|
/** A recipe's copy-paste authoring across the three surfaces. */
|
|
90
|
-
export interface
|
|
90
|
+
export interface PatternAuthoring {
|
|
91
91
|
html: string;
|
|
92
92
|
webComponent: string;
|
|
93
93
|
react: string;
|
|
94
94
|
}
|
|
95
95
|
/** Emit a recipe's authoring for native HTML, the web component, and React (pure). */
|
|
96
|
-
export declare function
|
|
96
|
+
export declare function patternAuthoring(r: FieldRecipe): PatternAuthoring;
|
|
97
|
+
/** @deprecated Renamed to {@link PatternRenderPlan}. */ export type RecipeRenderPlan = PatternRenderPlan;
|
|
98
|
+
/** @deprecated Renamed to {@link PatternBodyRegistration}. */ export type RecipeBodyRegistration = PatternBodyRegistration;
|
|
99
|
+
/** @deprecated Renamed to {@link PatternRelationshipRegistration}. */ export type RecipeRelationshipRegistration = PatternRelationshipRegistration;
|
|
100
|
+
/** @deprecated Renamed to {@link PatternFeedbackBinding}. */ export type RecipeFeedbackBinding = PatternFeedbackBinding;
|
|
101
|
+
/** @deprecated Renamed to {@link PatternReducedMotionPlan}. */ export type RecipeReducedMotionPlan = PatternReducedMotionPlan;
|
|
102
|
+
/** @deprecated Renamed to {@link PatternAuthoring}. */ export type RecipeAuthoring = PatternAuthoring;
|
|
103
|
+
/** @deprecated Renamed to {@link patternBodyAttributes}. */ export declare const recipeBodyAttributes: typeof patternBodyAttributes;
|
|
104
|
+
/** @deprecated Renamed to {@link patternRenderPlan}. */ export declare const recipeRenderPlan: typeof patternRenderPlan;
|
|
105
|
+
/** @deprecated Renamed to {@link patternToMarkup}. */ export declare const recipeToMarkup: typeof patternToMarkup;
|
|
106
|
+
/** @deprecated Renamed to {@link patternAuthoring}. */ export declare const recipeAuthoring: typeof patternAuthoring;
|
|
97
107
|
//# sourceMappingURL=compile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/recipes/compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/recipes/compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE5D,wFAAwF;AACxF,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,kGAAkG;AAClG,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAS5E;AAED;;;kDAGkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,+FAA+F;IAC/F,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,wEAAwE;IACxE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,sDAAsD;IACtD,OAAO,EAAE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F,eAAO,MAAM,aAAa,uBAAiB,CAAC;AAe5C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,WAAW,GAAG,eAAe,CAiB9D;AAOD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,WAAW,GAAG,MAAM,CAGtD;AAKD,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,sFAAsF;AACtF,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,WAAW,GAAG,gBAAgB,CAQjE;AAGD,wDAAwD,CAAC,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAC1G,8DAA8D,CAAC,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAC5H,sEAAsE,CAAC,MAAM,MAAM,8BAA8B,GAAG,+BAA+B,CAAC;AACpJ,6DAA6D,CAAC,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AACzH,+DAA+D,CAAC,MAAM,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAC/H,uDAAuD,CAAC,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC;AACvG,4DAA4D,CAAC,eAAO,MAAM,oBAAoB,8BAAwB,CAAC;AACvH,wDAAwD,CAAC,eAAO,MAAM,gBAAgB,0BAAoB,CAAC;AAC3G,sDAAsD,CAAC,eAAO,MAAM,cAAc,wBAAkB,CAAC;AACrG,uDAAuD,CAAC,eAAO,MAAM,eAAe,yBAAmB,CAAC"}
|
package/dist/recipes/compile.js
CHANGED
|
@@ -3,7 +3,7 @@ export function metricVar(metric) {
|
|
|
3
3
|
return `--field-${metric}`;
|
|
4
4
|
}
|
|
5
5
|
/** The data-* attributes a single recipe body authors onto an element (token lane → behavior). */
|
|
6
|
-
export function
|
|
6
|
+
export function patternBodyAttributes(b) {
|
|
7
7
|
const a = { 'data-body': b.body };
|
|
8
8
|
if (b.strength != null)
|
|
9
9
|
a['data-strength'] = String(b.strength);
|
|
@@ -26,7 +26,7 @@ const OVERLAY_READINGS = new Set(['streamlines', 'force-vectors', 'field-lines',
|
|
|
26
26
|
/** Derive the render plan from a recipe's declared layers (pure; `particles` is the base matter
|
|
27
27
|
* layer and maps to `dots`). `streamlines` prefers the overlay (it reads over content) unless it
|
|
28
28
|
* is the recipe's ONLY layer, where the underlay render mode of the same name serves. */
|
|
29
|
-
export function
|
|
29
|
+
export function patternRenderPlan(layers) {
|
|
30
30
|
let underlay = null;
|
|
31
31
|
const overlay = [];
|
|
32
32
|
let heatmap = false;
|
|
@@ -78,13 +78,13 @@ export function compilePattern(r) {
|
|
|
78
78
|
return {
|
|
79
79
|
id: r.id,
|
|
80
80
|
recipe: r,
|
|
81
|
-
bodies: r.bodies.map((b) => ({ attributes:
|
|
81
|
+
bodies: r.bodies.map((b) => ({ attributes: patternBodyAttributes(b), tokens: tokensOf(b.body) })),
|
|
82
82
|
relationships: (r.relationships ?? []).map((rel) => ({ from: rel.from, to: rel.to, type: rel.type, strength: rel.strength })),
|
|
83
83
|
feedback: r.metrics.map((m) => ({ metric: m, var: metricVar(m) })),
|
|
84
84
|
diagnostics: [...r.diagnostics],
|
|
85
85
|
metrics: [...r.metrics],
|
|
86
86
|
conditions: [...(r.conditions ?? [])],
|
|
87
|
-
render:
|
|
87
|
+
render: patternRenderPlan(r.render ?? []),
|
|
88
88
|
reducedMotion: {
|
|
89
89
|
reducedMotion: r.accessibility.reducedMotion,
|
|
90
90
|
meaningWithoutMotion: r.accessibility.meaningWithoutMotion,
|
|
@@ -99,19 +99,23 @@ const attrsToString = (a) => Object.entries(a)
|
|
|
99
99
|
* Emit the `[data-body]` markup a recipe authors — a `<field-root>` plus one element per body. This is
|
|
100
100
|
* the copy-paste authoring for a recipe; drop it on a page and the field runs the recipe.
|
|
101
101
|
*/
|
|
102
|
-
export function
|
|
103
|
-
const bodies = r.bodies.map((b) => ` <div ${attrsToString(
|
|
102
|
+
export function patternToMarkup(r) {
|
|
103
|
+
const bodies = r.bodies.map((b) => ` <div ${attrsToString(patternBodyAttributes(b))}></div>`).join('\n');
|
|
104
104
|
return `<field-root></field-root>\n${bodies}`;
|
|
105
105
|
}
|
|
106
106
|
const pascal = (id) => id.split(/[^a-z0-9]+/i).filter(Boolean).map((s) => s[0].toUpperCase() + s.slice(1)).join('') || 'Field';
|
|
107
107
|
/** Emit a recipe's authoring for native HTML, the web component, and React (pure). */
|
|
108
|
-
export function
|
|
109
|
-
const bodyLines = r.bodies.map((b) => ` <div ${attrsToString(
|
|
110
|
-
const reactBodies = r.bodies.map((b) => ` <div ${attrsToString(
|
|
108
|
+
export function patternAuthoring(r) {
|
|
109
|
+
const bodyLines = r.bodies.map((b) => ` <div ${attrsToString(patternBodyAttributes(b))}></div>`).join('\n');
|
|
110
|
+
const reactBodies = r.bodies.map((b) => ` <div ${attrsToString(patternBodyAttributes(b))} />`).join('\n');
|
|
111
111
|
return {
|
|
112
|
-
html:
|
|
112
|
+
html: patternToMarkup(r),
|
|
113
113
|
webComponent: `<script type="module">\n import '@fundamental-engine/elements';\n</script>\n\n<field-root></field-root>\n${bodyLines}`,
|
|
114
114
|
react: `import { FieldField } from '@fundamental-engine/react';\n\nexport default function ${pascal(r.id)}() {\n return (\n <FieldField>\n${reactBodies}\n </FieldField>\n );\n}`,
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
+
/** @deprecated Renamed to {@link patternBodyAttributes}. */ export const recipeBodyAttributes = patternBodyAttributes;
|
|
118
|
+
/** @deprecated Renamed to {@link patternRenderPlan}. */ export const recipeRenderPlan = patternRenderPlan;
|
|
119
|
+
/** @deprecated Renamed to {@link patternToMarkup}. */ export const recipeToMarkup = patternToMarkup;
|
|
120
|
+
/** @deprecated Renamed to {@link patternAuthoring}. */ export const recipeAuthoring = patternAuthoring;
|
|
117
121
|
//# sourceMappingURL=compile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/recipes/compile.ts"],"names":[],"mappings":"AAcA,wFAAwF;AACxF,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,OAAO,WAAW,MAAM,EAAE,CAAC;AAC7B,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/recipes/compile.ts"],"names":[],"mappings":"AAcA,wFAAwF;AACxF,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,OAAO,WAAW,MAAM,EAAE,CAAC;AAC7B,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,qBAAqB,CAAC,CAAc;IAClD,MAAM,CAAC,GAA2B,EAAE,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1D,IAAI,CAAC,CAAC,QAAQ,IAAI,IAAI;QAAE,CAAC,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAChE,IAAI,CAAC,CAAC,KAAK,IAAI,IAAI;QAAE,CAAC,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACvD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI;QAAE,CAAC,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACpD,IAAI,CAAC,CAAC,KAAK,IAAI,IAAI;QAAE,CAAC,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACvD,IAAI,CAAC,CAAC,QAAQ;QAAE,CAAC,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC;IACxC,IAAI,CAAC,CAAC,IAAI;QAAE,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,uEAAuE;IAC5G,OAAO,CAAC,CAAC;AACX,CAAC;AAiBD,MAAM,YAAY,GAAG,I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AsF,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,uCAAuC,WAAW,8BAA8B;KAC1L,CAAC;AACJ,CAAC;AASD,4DAA4D,CAAC,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;AACvH,wDAAwD,CAAC,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAC3G,sDAAsD,CAAC,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AACrG,uDAAuD,CAAC,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAC"}
|
package/dist/recipes/index.d.ts
CHANGED
|
@@ -15,5 +15,7 @@ export * from './focus.ts';
|
|
|
15
15
|
export * from './explain.ts';
|
|
16
16
|
export * from './compile.ts';
|
|
17
17
|
/** The Recipe / Authoring contracts (system-contracts §13). */
|
|
18
|
+
export declare const PATTERN_CONTRACTS: readonly ContractMeta[];
|
|
19
|
+
/** @deprecated Renamed to {@link PATTERN_CONTRACTS} (recipe → Pattern rename); removed at 1.0. */
|
|
18
20
|
export declare const RECIPE_CONTRACTS: readonly ContractMeta[];
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAE7B,+DAA+D;AAC/D,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAE7B,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB,EAAE,SAAS,YAAY,EAyBpD,CAAC;AAEF,kGAAkG;AAClG,eAAO,MAAM,gBAAgB,yBAAoB,CAAC"}
|
package/dist/recipes/index.js
CHANGED
|
@@ -8,20 +8,20 @@ export * from "./focus.js";
|
|
|
8
8
|
export * from "./explain.js";
|
|
9
9
|
export * from "./compile.js";
|
|
10
10
|
/** The Recipe / Authoring contracts (system-contracts §13). */
|
|
11
|
-
export const
|
|
11
|
+
export const PATTERN_CONTRACTS = [
|
|
12
12
|
{
|
|
13
13
|
name: 'Field Recipe Contract',
|
|
14
14
|
mustExist: 'id, name, intent, primitives, bodies, render, metrics, diagnostics, accessibility (+ optional naturalField, relationships, budget, expected, notes)',
|
|
15
15
|
mayMutate: 'nothing — a recipe is data; applying it builds a scene',
|
|
16
16
|
sideEffectFree: 'serialize / parse / validate are pure',
|
|
17
|
-
testable: '
|
|
17
|
+
testable: 'validatePattern rejects unknown tokens, render layers, diagnostics, and fields; primitives must match the body tokens; round-trips through JSON',
|
|
18
18
|
inspectable: 'the recipe is plain serializable data; explainScene renders it in plain language',
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
name: 'Recipe Runtime Contract',
|
|
22
22
|
mustExist: 'compileRecipe(recipe) → a runtime plan (bodies/relationships/feedback/diagnostics/metrics/conditions/reducedMotion); applyRecipe(root, recipe) registers it and returns an inspectable, destroyable handle (@fundamental-engine/dom)',
|
|
23
23
|
mayMutate: 'applyRecipe mutates the DOM it is given (registers bodies, writes --field-* vars); compileRecipe is pure',
|
|
24
|
-
sideEffectFree: 'compileRecipe /
|
|
24
|
+
sideEffectFree: 'compileRecipe / patternToMarkup are pure; applyRecipe owns its lifecycle and cleans up on destroy()',
|
|
25
25
|
testable: 'compiled bodies carry only real tokens (concepts never become tokens); metrics map to --field-* feedback; every shipped recipe compiles a reduced-motion output path',
|
|
26
26
|
inspectable: 'applied.inspect() returns live measurements, relationships, metric values, and lint',
|
|
27
27
|
},
|
|
@@ -34,4 +34,6 @@ export const RECIPE_CONTRACTS = [
|
|
|
34
34
|
inspectable: 'the compiled data-body / data-render the author can read back',
|
|
35
35
|
},
|
|
36
36
|
];
|
|
37
|
+
/** @deprecated Renamed to {@link PATTERN_CONTRACTS} (recipe → Pattern rename); removed at 1.0. */
|
|
38
|
+
export const RECIPE_CONTRACTS = PATTERN_CONTRACTS;
|
|
37
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAQA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAE7B,+DAA+D;AAC/D,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAQA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAE7B,+DAA+D;AAC/D,MAAM,CAAC,MAAM,iBAAiB,GAA4B;IACxD;QACE,IAAI,EAAE,uBAAuB;QAC7B,SAAS,EAAE,qJAAqJ;QAChK,SAAS,EAAE,wDAAwD;QACnE,cAAc,EAAE,uCAAuC;QACvD,QAAQ,EAAE,iJAAiJ;QAC3J,WAAW,EAAE,kFAAkF;KAChG;IACD;QACE,IAAI,EAAE,yBAAyB;QAC/B,SAAS,EAAE,sOAAsO;QACjP,SAAS,EAAE,0GAA0G;QACrH,cAAc,EAAE,qGAAqG;QACrH,QAAQ,EAAE,sKAAsK;QAChL,WAAW,EAAE,qFAAqF;KACnG;IACD;QACE,IAAI,EAAE,0BAA0B;QAChC,SAAS,EAAE,uEAAuE;QAClF,SAAS,EAAE,6CAA6C;QACxD,cAAc,EAAE,yEAAyE;QACzF,QAAQ,EAAE,wEAAwE;QAClF,WAAW,EAAE,+DAA+D;KAC7E;CACF,CAAC;AAEF,kGAAkG;AAClG,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC"}
|
package/dist/recipes/schema.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type RenderLayer = 'particles' | 'dots' | 'trails' | 'links' | 'streamlin
|
|
|
4
4
|
/** A diagnostic mode that reveals a recipe's behavior (the debug / scalar / graph overlays). */
|
|
5
5
|
export type DiagnosticMode = 'force-vectors' | 'contours' | 'potential' | 'energy' | 'topology' | 'inspector' | 'causality' | 'prediction';
|
|
6
6
|
/** One body in a recipe: a force token (or space-separated tokens) + attributes. */
|
|
7
|
-
export interface
|
|
7
|
+
export interface BodyPattern {
|
|
8
8
|
body: string;
|
|
9
9
|
strength?: number;
|
|
10
10
|
range?: number;
|
|
@@ -13,18 +13,18 @@ export interface BodyRecipe {
|
|
|
13
13
|
feedback?: boolean;
|
|
14
14
|
scope?: 'local' | 'global';
|
|
15
15
|
/** condition gate for this body (`data-when`) — must be a REGISTERED engine condition id
|
|
16
|
-
* (active, fast, slow, hot, cool, scrolling);
|
|
16
|
+
* (active, fast, slow, hot, cool, scrolling); validatePattern rejects unknown ids so a
|
|
17
17
|
* recipe can never declare a gate that silently never passes (#370). Recipe-level
|
|
18
18
|
* `conditions` remain the activation vocabulary; `when` is the executable per-body gate. */
|
|
19
19
|
when?: string;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface RelationshipPattern {
|
|
22
22
|
from: string;
|
|
23
23
|
to: string;
|
|
24
24
|
type: string;
|
|
25
25
|
strength?: number;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface AccessibilityPattern {
|
|
28
28
|
/** what replaces motion under prefers-reduced-motion. */
|
|
29
29
|
reducedMotion: string;
|
|
30
30
|
/** how meaning survives without color/motion. */
|
|
@@ -36,9 +36,9 @@ export interface ExpectedMetrics {
|
|
|
36
36
|
energyDriftMax?: number;
|
|
37
37
|
}
|
|
38
38
|
/** Which catalog tier a recipe belongs to. */
|
|
39
|
-
export type
|
|
39
|
+
export type PatternTier = 'core' | 'applied' | 'systems' | 'operational';
|
|
40
40
|
/** A recipe's implementation status. */
|
|
41
|
-
export type
|
|
41
|
+
export type PatternStatus = 'shipped' | 'experimental' | 'planned' | 'conceptual';
|
|
42
42
|
/**
|
|
43
43
|
* A portable field recipe (authoring §5) — the reusable unit that connects the natural-field model,
|
|
44
44
|
* engine primitives, DOM authoring, platform feedback, diagnostics, and the accessibility fallback.
|
|
@@ -49,7 +49,7 @@ export interface FieldPattern {
|
|
|
49
49
|
name: string;
|
|
50
50
|
intent: string;
|
|
51
51
|
/** which catalog tier the recipe sits in (injected during assembly). */
|
|
52
|
-
tier?:
|
|
52
|
+
tier?: PatternTier;
|
|
53
53
|
/** the fundamental field this recipe translates (gravity / electromagnetic / strong / weak), if one dominates. */
|
|
54
54
|
naturalField?: FundamentalField;
|
|
55
55
|
/** a short natural-field translation phrase (conceptual), e.g. "priority, convergence, hierarchy". */
|
|
@@ -64,12 +64,12 @@ export interface FieldPattern {
|
|
|
64
64
|
diagnostics: string[];
|
|
65
65
|
/** CONDITIONS: activation logic (dwell, threshold, stale, in-view, focused) — not forces. */
|
|
66
66
|
conditions?: string[];
|
|
67
|
-
bodies:
|
|
68
|
-
relationships?:
|
|
67
|
+
bodies: BodyPattern[];
|
|
68
|
+
relationships?: RelationshipPattern[];
|
|
69
69
|
render: RenderLayer[];
|
|
70
70
|
/** the reduced-motion + meaning-without-motion equivalent — required: no recipe is motion-only. */
|
|
71
|
-
accessibility:
|
|
72
|
-
status?:
|
|
71
|
+
accessibility: AccessibilityPattern;
|
|
72
|
+
status?: PatternStatus;
|
|
73
73
|
budget?: Partial<PerformanceBudget>;
|
|
74
74
|
expected?: ExpectedMetrics;
|
|
75
75
|
notes?: string;
|
|
@@ -90,8 +90,8 @@ export interface VisualizationPreset {
|
|
|
90
90
|
/** Every render + diagnostic mode id a recipe may reference (mirrors `RENDER_MODES` + `particles`). */
|
|
91
91
|
export declare const FIELD_MODES: ReadonlySet<string>;
|
|
92
92
|
/** The distinct engine primitives used across a recipe's bodies, in first-seen order. */
|
|
93
|
-
export declare function primitivesOf(bodies: readonly
|
|
94
|
-
export interface
|
|
93
|
+
export declare function primitivesOf(bodies: readonly BodyPattern[]): string[];
|
|
94
|
+
export interface PatternProblem {
|
|
95
95
|
path: string;
|
|
96
96
|
issue: string;
|
|
97
97
|
}
|
|
@@ -100,9 +100,19 @@ export interface RecipeProblem {
|
|
|
100
100
|
* must be a real, passported force; each render layer + diagnostic must be a known mode; the declared
|
|
101
101
|
* primitives must match the body tokens; the natural field must be one of the four.
|
|
102
102
|
*/
|
|
103
|
-
export declare function
|
|
103
|
+
export declare function validatePattern(r: FieldRecipe): PatternProblem[];
|
|
104
104
|
/** Serialize a recipe to canonical JSON. */
|
|
105
|
-
export declare function
|
|
106
|
-
/** Parse + validate a
|
|
107
|
-
export declare function
|
|
105
|
+
export declare function serializePattern(r: FieldRecipe): string;
|
|
106
|
+
/** Parse + validate a Field Pattern from JSON; throws on invalid shape. */
|
|
107
|
+
export declare function parsePattern(json: string): FieldPattern;
|
|
108
|
+
/** @deprecated Renamed to {@link parsePattern}. */
|
|
109
|
+
export declare const parseRecipe: typeof parsePattern;
|
|
110
|
+
/** @deprecated Renamed to {@link BodyPattern}. */ export type BodyRecipe = BodyPattern;
|
|
111
|
+
/** @deprecated Renamed to {@link RelationshipPattern}. */ export type RelationshipRecipe = RelationshipPattern;
|
|
112
|
+
/** @deprecated Renamed to {@link AccessibilityPattern}. */ export type AccessibilityRecipe = AccessibilityPattern;
|
|
113
|
+
/** @deprecated Renamed to {@link PatternTier}. */ export type RecipeTier = PatternTier;
|
|
114
|
+
/** @deprecated Renamed to {@link PatternStatus}. */ export type RecipeStatus = PatternStatus;
|
|
115
|
+
/** @deprecated Renamed to {@link PatternProblem}. */ export type RecipeProblem = PatternProblem;
|
|
116
|
+
/** @deprecated Renamed to {@link validatePattern}. */ export declare const validateRecipe: typeof validatePattern;
|
|
117
|
+
/** @deprecated Renamed to {@link serializePattern}. */ export declare const serializeRecipe: typeof serializePattern;
|
|
108
118
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/recipes/schema.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAS5D,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,MAAM,GACN,QAAQ,GACR,OAAO,GACP,aAAa,GACb,WAAW,GACX,SAAS,GACT,aAAa,GACb,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AAEZ,gGAAgG;AAChG,MAAM,MAAM,cAAc,GACtB,eAAe,GACf,UAAU,GACV,WAAW,GACX,QAAQ,GACR,UAAU,GACV,WAAW,GACX,WAAW,GACX,YAAY,CA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AAmB,CAAC"}
|
package/dist/recipes/schema.js
CHANGED
|
@@ -56,7 +56,7 @@ export function primitivesOf(bodies) {
|
|
|
56
56
|
* must be a real, passported force; each render layer + diagnostic must be a known mode; the declared
|
|
57
57
|
* primitives must match the body tokens; the natural field must be one of the four.
|
|
58
58
|
*/
|
|
59
|
-
export function
|
|
59
|
+
export function validatePattern(r) {
|
|
60
60
|
const problems = [];
|
|
61
61
|
if (!r.id)
|
|
62
62
|
problems.push({ path: 'id', issue: 'required' });
|
|
@@ -110,15 +110,20 @@ export function validateRecipe(r) {
|
|
|
110
110
|
return problems;
|
|
111
111
|
}
|
|
112
112
|
/** Serialize a recipe to canonical JSON. */
|
|
113
|
-
export function
|
|
113
|
+
export function serializePattern(r) {
|
|
114
114
|
return JSON.stringify(r, null, 2);
|
|
115
115
|
}
|
|
116
|
-
/** Parse + validate a
|
|
117
|
-
export function
|
|
116
|
+
/** Parse + validate a Field Pattern from JSON; throws on invalid shape. */
|
|
117
|
+
export function parsePattern(json) {
|
|
118
118
|
const r = JSON.parse(json);
|
|
119
|
-
const problems =
|
|
119
|
+
const problems = validatePattern(r);
|
|
120
120
|
if (problems.length)
|
|
121
|
-
throw new Error(`invalid
|
|
121
|
+
throw new Error(`invalid pattern: ${problems.map((p) => `${p.path} (${p.issue})`).join('; ')}`);
|
|
122
122
|
return r;
|
|
123
123
|
}
|
|
124
|
+
// ── Deprecated aliases (recipe → Pattern rename, phase 4; removed at 1.0) ──────────────────────
|
|
125
|
+
/** @deprecated Renamed to {@link parsePattern}. */
|
|
126
|
+
export const parseRecipe = parsePattern;
|
|
127
|
+
/** @deprecated Renamed to {@link validatePattern}. */ export const validateRecipe = validatePattern;
|
|
128
|
+
/** @deprecated Renamed to {@link serializePattern}. */ export const serializeRecipe = serializePattern;
|
|
124
129
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/recipes/schema.ts"],"names":[],"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W,GAAG,YAAY,CAAC;AAOxC,sDAAsD,CAAC,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AACrG,uDAAuD,CAAC,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAC"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* • Wayfinding Field (gravity) — "where am I, what's adjacent" (present-tense orientation).
|
|
12
12
|
* • Wayfinding Current (electromagnetic) — "where have I been" (the path travelled, the current from home).
|
|
13
13
|
*
|
|
14
|
-
* Both pass `
|
|
14
|
+
* Both pass `validatePattern` (real passported tokens, known render layers + diagnostics, primitives =
|
|
15
15
|
* body tokens, a fundamental field, a reduced-motion equivalent). They are kept OUT of the canonical
|
|
16
16
|
* 64-recipe `FIELD_RECIPES` catalog (a locked 4×16 of shipped recipes, cited as such across the
|
|
17
17
|
* papers) and marked `experimental` — they surface on the /recipes hub as a labelled experimental
|
package/dist/version.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* with `packages/core/package.json` by `version.test.ts` (the build fails if they drift), so the
|
|
5
5
|
* release bump is the single source of truth.
|
|
6
6
|
*/
|
|
7
|
-
export declare const FIELD_VERSION = "0.
|
|
7
|
+
export declare const FIELD_VERSION = "0.10.0";
|
|
8
8
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,aAAa,WAAW,CAAC"}
|
package/dist/version.js
CHANGED
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Transition } from '../episodes/episodes.ts';
|
|
2
|
+
import type { WorldRelation } from '../world.ts';
|
|
3
|
+
export type AblationForm = 'removal' | 'collapse' | 'substitution' | 'reconstruction';
|
|
4
|
+
export type AblationClass = 'necessary-primitive' | 'necessary-component' | 'derived-complete' | 'derived-conditional' | 'collapsible-without-loss' | 'collapsible-with-loss' | 'substitutable' | 'non-substitutable' | 'representation-dependent' | 'execution-boundary-only' | 'unresolved';
|
|
5
|
+
export interface AblationRecord {
|
|
6
|
+
readonly element: string;
|
|
7
|
+
readonly form: AblationForm;
|
|
8
|
+
readonly hypothesis: string;
|
|
9
|
+
readonly transformation: string;
|
|
10
|
+
readonly fixture: string;
|
|
11
|
+
readonly expectedDistinguishingCase: string;
|
|
12
|
+
readonly observed: string;
|
|
13
|
+
readonly failedCapability?: string;
|
|
14
|
+
readonly preservedBehavior?: string;
|
|
15
|
+
readonly evidence: string;
|
|
16
|
+
readonly classification: AblationClass;
|
|
17
|
+
readonly implication: string;
|
|
18
|
+
}
|
|
19
|
+
/** Derive relation edges from observed transitions only (no declared relation structure). */
|
|
20
|
+
export declare function relationsFromTransitions(trace: readonly Transition[]): WorldRelation[];
|
|
21
|
+
/** Derive the operation vocabulary from observed transitions only. */
|
|
22
|
+
export declare function operationsFromTransitions(trace: readonly Transition[]): string[];
|
|
23
|
+
export declare function runAblations(): AblationRecord[];
|
|
24
|
+
export interface KernelComparisonRow {
|
|
25
|
+
readonly element: string;
|
|
26
|
+
readonly roleInK: string;
|
|
27
|
+
readonly ablationResult: AblationClass;
|
|
28
|
+
readonly retainedInK0: boolean;
|
|
29
|
+
readonly reason: string;
|
|
30
|
+
readonly derivationOrCounterexample: string;
|
|
31
|
+
readonly confidence: 'high' | 'medium' | 'low';
|
|
32
|
+
readonly remainingUncertainty: string;
|
|
33
|
+
}
|
|
34
|
+
/** K = ⟨Entities, State, Relations, Operations, Dynamics, Projection, Invariants⟩ */
|
|
35
|
+
export declare const K_ELEMENTS: readonly ["Entities", "State", "Relations", "Operations", "Dynamics", "Projection", "Invariants"];
|
|
36
|
+
/** K₀ = ⟨X, Θ, Π, V⟩ — X carries typed entity/relation/operation structure. */
|
|
37
|
+
export declare const K0_ELEMENTS: readonly ["X (state incl. typed entities/relations/operations)", "Θ (lawful evolution + admissible operations)", "Π (projection)", "V (validity/invariants)"];
|
|
38
|
+
export declare function kernelComparison(): KernelComparisonRow[];
|
|
39
|
+
//# sourceMappingURL=ablation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ablation.d.ts","sourceRoot":"","sources":["../../../src/world/ablation/ablation.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAEtF,MAAM,MAAM,aAAa,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,kBAAkB,GAClB,qBAAqB,GACrB,0BAA0B,GAC1B,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,0BAA0B,GAC1B,yBAAyB,GACzB,YAAY,CAAC;AAEjB,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE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