@pilates/core 1.0.0 → 1.1.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/algorithm/index.d.ts +31 -0
- package/dist/algorithm/index.d.ts.map +1 -1
- package/dist/algorithm/index.js +85 -1
- package/dist/algorithm/index.js.map +1 -1
- package/dist/algorithm/round.d.ts +13 -0
- package/dist/algorithm/round.d.ts.map +1 -1
- package/dist/algorithm/round.js +17 -0
- package/dist/algorithm/round.js.map +1 -1
- package/dist/algorithm/spineless/flex-grammar.d.ts +394 -0
- package/dist/algorithm/spineless/flex-grammar.d.ts.map +1 -0
- package/dist/algorithm/spineless/flex-grammar.js +2373 -0
- package/dist/algorithm/spineless/flex-grammar.js.map +1 -0
- package/dist/algorithm/spineless/grammar.d.ts +150 -0
- package/dist/algorithm/spineless/grammar.d.ts.map +1 -0
- package/dist/algorithm/spineless/grammar.js +144 -0
- package/dist/algorithm/spineless/grammar.js.map +1 -0
- package/dist/algorithm/spineless/layout.d.ts +130 -0
- package/dist/algorithm/spineless/layout.d.ts.map +1 -0
- package/dist/algorithm/spineless/layout.js +755 -0
- package/dist/algorithm/spineless/layout.js.map +1 -0
- package/dist/algorithm/spineless/order-maintenance.bench.d.ts +25 -0
- package/dist/algorithm/spineless/order-maintenance.bench.d.ts.map +1 -0
- package/dist/algorithm/spineless/order-maintenance.bench.js +78 -0
- package/dist/algorithm/spineless/order-maintenance.bench.js.map +1 -0
- package/dist/algorithm/spineless/order-maintenance.d.ts +192 -0
- package/dist/algorithm/spineless/order-maintenance.d.ts.map +1 -0
- package/dist/algorithm/spineless/order-maintenance.js +294 -0
- package/dist/algorithm/spineless/order-maintenance.js.map +1 -0
- package/dist/algorithm/spineless/priority-queue.bench.d.ts +17 -0
- package/dist/algorithm/spineless/priority-queue.bench.d.ts.map +1 -0
- package/dist/algorithm/spineless/priority-queue.bench.js +57 -0
- package/dist/algorithm/spineless/priority-queue.bench.js.map +1 -0
- package/dist/algorithm/spineless/priority-queue.d.ts +73 -0
- package/dist/algorithm/spineless/priority-queue.d.ts.map +1 -0
- package/dist/algorithm/spineless/priority-queue.js +149 -0
- package/dist/algorithm/spineless/priority-queue.js.map +1 -0
- package/dist/algorithm/spineless/runtime.d.ts +239 -0
- package/dist/algorithm/spineless/runtime.d.ts.map +1 -0
- package/dist/algorithm/spineless/runtime.js +458 -0
- package/dist/algorithm/spineless/runtime.js.map +1 -0
- package/dist/algorithm/spineless/style-dirty.d.ts +65 -0
- package/dist/algorithm/spineless/style-dirty.d.ts.map +1 -0
- package/dist/algorithm/spineless/style-dirty.js +75 -0
- package/dist/algorithm/spineless/style-dirty.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/inspect.d.ts +27 -0
- package/dist/inspect.d.ts.map +1 -0
- package/dist/inspect.js +61 -0
- package/dist/inspect.js.map +1 -0
- package/package.json +1 -1
|
@@ -15,5 +15,36 @@
|
|
|
15
15
|
* catch any cache-correctness regression as soon as it lands.
|
|
16
16
|
*/
|
|
17
17
|
import type { Node } from '../node.js';
|
|
18
|
+
import { type LayoutTrace } from './spineless/layout.js';
|
|
19
|
+
export type { LayoutTrace } from './spineless/layout.js';
|
|
20
|
+
/**
|
|
21
|
+
* A profiler callback invoked after every public `calculateLayout`
|
|
22
|
+
* (outside differential mode) with the laid-out root and a
|
|
23
|
+
* `LayoutTrace` describing what the engine did. Register one with
|
|
24
|
+
* `setLayoutProfiler`.
|
|
25
|
+
*/
|
|
26
|
+
export type LayoutProfiler = (root: Node, trace: LayoutTrace) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Register a profiler invoked after every `calculateLayout`, or pass
|
|
29
|
+
* `null` to disable. While no profiler is registered the layout path
|
|
30
|
+
* is unchanged — observability is strictly pay-for-what-you-use.
|
|
31
|
+
*/
|
|
32
|
+
export declare function setLayoutProfiler(listener: LayoutProfiler | null): void;
|
|
33
|
+
/**
|
|
34
|
+
* The engine path `root`'s most recent `calculateLayout` took, or
|
|
35
|
+
* `undefined` if it has never been laid out. Powers `inspectLayout`.
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export declare function lastLayoutPath(root: Node): LayoutTrace['path'] | undefined;
|
|
18
40
|
export declare function calculateLayout(root: Node, availableWidth: number | undefined, availableHeight: number | undefined): void;
|
|
41
|
+
/**
|
|
42
|
+
* Run the imperative algorithm + its per-node layout cache directly,
|
|
43
|
+
* bypassing the Spineless default. The public `calculateLayout`
|
|
44
|
+
* routes through Spineless; this entry point lets the imperative
|
|
45
|
+
* cache's own tests exercise the imperative path.
|
|
46
|
+
*
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export declare function calculateLayoutImperative(root: Node, availableWidth?: number, availableHeight?: number): void;
|
|
19
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/algorithm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/algorithm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAYvC,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,uBAAuB,CAAC;AAE1E,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAKtE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,GAAG,IAAI,CAEvE;AAmBD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAE1E;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,eAAe,EAAE,MAAM,GAAG,SAAS,GAClC,IAAI,CA6DN;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,IAAI,EACV,cAAc,CAAC,EAAE,MAAM,EACvB,eAAe,CAAC,EAAE,MAAM,GACvB,IAAI,CAEN"}
|
package/dist/algorithm/index.js
CHANGED
|
@@ -17,10 +17,83 @@
|
|
|
17
17
|
import { LayoutCache, clearAllCaches, diffLayouts, markDirtyDeep, restoreFromCache, snapshotForCache, snapshotTreeLayouts, } from './cache.js';
|
|
18
18
|
import { layoutChildren, resolveRootAxisSize } from './main-axis.js';
|
|
19
19
|
import { roundLayout } from './round.js';
|
|
20
|
+
import { SpinelessLayout } from './spineless/layout.js';
|
|
20
21
|
const DIFFERENTIAL = process.env.PILATES_DIFFERENTIAL_LAYOUT === '1';
|
|
22
|
+
/** The registered profiler, or `null` while layout tracing is off. */
|
|
23
|
+
let profiler = null;
|
|
24
|
+
/**
|
|
25
|
+
* Register a profiler invoked after every `calculateLayout`, or pass
|
|
26
|
+
* `null` to disable. While no profiler is registered the layout path
|
|
27
|
+
* is unchanged — observability is strictly pay-for-what-you-use.
|
|
28
|
+
*/
|
|
29
|
+
export function setLayoutProfiler(listener) {
|
|
30
|
+
profiler = listener;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Per-root layout-engine state for the public `calculateLayout`.
|
|
34
|
+
* `'cold'` — laid out once, by the imperative path. A `SpinelessLayout`
|
|
35
|
+
* — adopted on the second call onward (see `calculateLayout`). Keyed
|
|
36
|
+
* weakly so a dropped root takes its state with it.
|
|
37
|
+
*/
|
|
38
|
+
const layoutEngines = new WeakMap();
|
|
39
|
+
/**
|
|
40
|
+
* The engine path each root's most recent `calculateLayout` took —
|
|
41
|
+
* read by the `inspectLayout` devtools dump (phase 9). Stored
|
|
42
|
+
* unconditionally (a `WeakMap.set` is negligible beside the O(tree)
|
|
43
|
+
* `spinelessSupports` walk the call already does), so the path is
|
|
44
|
+
* known whether or not a profiler is registered.
|
|
45
|
+
*/
|
|
46
|
+
const lastPaths = new WeakMap();
|
|
47
|
+
/**
|
|
48
|
+
* The engine path `root`'s most recent `calculateLayout` took, or
|
|
49
|
+
* `undefined` if it has never been laid out. Powers `inspectLayout`.
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export function lastLayoutPath(root) {
|
|
54
|
+
return lastPaths.get(root);
|
|
55
|
+
}
|
|
21
56
|
export function calculateLayout(root, availableWidth, availableHeight) {
|
|
22
57
|
if (!DIFFERENTIAL) {
|
|
23
|
-
|
|
58
|
+
// The Spineless grammar covers every tree as of phase 10 (v29
|
|
59
|
+
// `display: 'none'`, v30 a measure function on an absolute node) —
|
|
60
|
+
// there is no longer a grammar-unsupported fallback. The
|
|
61
|
+
// imperative algorithm still serves a root's deliberate cold first
|
|
62
|
+
// layout (no grammar to amortise) and differential mode.
|
|
63
|
+
//
|
|
64
|
+
// `driver` is non-null exactly when the Spineless engine served
|
|
65
|
+
// this call — its `lastTrace` is then the trace to report.
|
|
66
|
+
let driver = null;
|
|
67
|
+
// First layout of a root: the imperative path is faster cold — no
|
|
68
|
+
// grammar to build. A root laid out a SECOND time is probably
|
|
69
|
+
// long-lived, so from then on the validated Spineless incremental
|
|
70
|
+
// engine takes over — build once, relay incrementally.
|
|
71
|
+
const engine = layoutEngines.get(root);
|
|
72
|
+
if (engine === undefined) {
|
|
73
|
+
calculateLayoutImpl(root, availableWidth, availableHeight);
|
|
74
|
+
layoutEngines.set(root, 'cold');
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
driver = engine === 'cold' ? new SpinelessLayout(root) : engine;
|
|
78
|
+
if (engine === 'cold')
|
|
79
|
+
layoutEngines.set(root, driver);
|
|
80
|
+
driver.layout(availableWidth, availableHeight);
|
|
81
|
+
}
|
|
82
|
+
// Record the path for `inspectLayout`. Reading `driver.lastTrace`
|
|
83
|
+
// costs nothing (a field read); the imperative-trace OBJECT below
|
|
84
|
+
// is built only when a profiler is registered.
|
|
85
|
+
lastPaths.set(root, driver !== null ? driver.lastTrace.path : 'imperative');
|
|
86
|
+
if (profiler !== null) {
|
|
87
|
+
profiler(root, driver !== null
|
|
88
|
+
? driver.lastTrace
|
|
89
|
+
: {
|
|
90
|
+
path: 'imperative',
|
|
91
|
+
dirtyNodes: 0,
|
|
92
|
+
fieldsRecomputed: 0,
|
|
93
|
+
fieldsChanged: 0,
|
|
94
|
+
movedSubtrees: 0,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
24
97
|
return;
|
|
25
98
|
}
|
|
26
99
|
// First pass: cached path (normal).
|
|
@@ -36,6 +109,17 @@ export function calculateLayout(root, availableWidth, availableHeight) {
|
|
|
36
109
|
throw new Error(`[pilates differential layout] cache produced different result than fresh recompute:\n ${diff}`);
|
|
37
110
|
}
|
|
38
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Run the imperative algorithm + its per-node layout cache directly,
|
|
114
|
+
* bypassing the Spineless default. The public `calculateLayout`
|
|
115
|
+
* routes through Spineless; this entry point lets the imperative
|
|
116
|
+
* cache's own tests exercise the imperative path.
|
|
117
|
+
*
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
export function calculateLayoutImperative(root, availableWidth, availableHeight) {
|
|
121
|
+
calculateLayoutImpl(root, availableWidth, availableHeight);
|
|
122
|
+
}
|
|
39
123
|
function calculateLayoutImpl(root, availableWidth, availableHeight) {
|
|
40
124
|
const widthMode = availableWidth === undefined ? 'undefined' : 'exactly';
|
|
41
125
|
const heightMode = availableHeight === undefined ? 'undefined' : 'exactly';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/algorithm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/algorithm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAoB,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI1E,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,2BAA2B,KAAK,GAAG,CAAC;AAUrE,sEAAsE;AACtE,IAAI,QAAQ,GAA0B,IAAI,CAAC;AAE3C;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAA+B;IAC/D,QAAQ,GAAG,QAAQ,CAAC;AACtB,CAAC;AAED;;;;;GAKG;AACH,MAAM,aAAa,GAAG,IAAI,OAAO,EAAkC,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,SAAS,GAAG,IAAI,OAAO,EAA6B,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAU;IACvC,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,eAA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E,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC"}
|
|
@@ -34,4 +34,17 @@ export declare function roundLayout(root: Node): void;
|
|
|
34
34
|
* @internal
|
|
35
35
|
*/
|
|
36
36
|
export declare function roundLayoutSubtree(node: Node, parentAbsX: number, parentAbsY: number): void;
|
|
37
|
+
/**
|
|
38
|
+
* Round a subtree INCLUSIVE of `node`, given the float and rounded
|
|
39
|
+
* absolute positions of `node`'s parent. Used by the Spineless
|
|
40
|
+
* incremental relayout path: when only a subtree's float layout
|
|
41
|
+
* moved, its parent's rounding is unchanged, so the subtree can be
|
|
42
|
+
* re-rounded in isolation against the parent's stable corner.
|
|
43
|
+
*
|
|
44
|
+
* `node`'s `_layout` (and its descendants') must hold the FLOAT
|
|
45
|
+
* layout, exactly as after a `layoutChildren` pass.
|
|
46
|
+
*
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export declare function roundLayoutFrom(node: Node, parentAbsX: number, parentAbsY: number, parentRoundedX: number, parentRoundedY: number): void;
|
|
37
50
|
//# sourceMappingURL=round.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"round.d.ts","sourceRoot":"","sources":["../../src/algorithm/round.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AASvC,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAI5C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAqB3F"}
|
|
1
|
+
{"version":3,"file":"round.d.ts","sourceRoot":"","sources":["../../src/algorithm/round.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AASvC,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAI5C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAqB3F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,MAAM,GACrB,IAAI,CAIN"}
|
package/dist/algorithm/round.js
CHANGED
|
@@ -58,6 +58,23 @@ export function roundLayoutSubtree(node, parentAbsX, parentAbsY) {
|
|
|
58
58
|
applyRounding(node.getChild(i), absolutes, roundedNodeX, roundedNodeY);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Round a subtree INCLUSIVE of `node`, given the float and rounded
|
|
63
|
+
* absolute positions of `node`'s parent. Used by the Spineless
|
|
64
|
+
* incremental relayout path: when only a subtree's float layout
|
|
65
|
+
* moved, its parent's rounding is unchanged, so the subtree can be
|
|
66
|
+
* re-rounded in isolation against the parent's stable corner.
|
|
67
|
+
*
|
|
68
|
+
* `node`'s `_layout` (and its descendants') must hold the FLOAT
|
|
69
|
+
* layout, exactly as after a `layoutChildren` pass.
|
|
70
|
+
*
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
export function roundLayoutFrom(node, parentAbsX, parentAbsY, parentRoundedX, parentRoundedY) {
|
|
74
|
+
const absolutes = new Map();
|
|
75
|
+
collectAbsolutes(node, parentAbsX, parentAbsY, absolutes);
|
|
76
|
+
applyRounding(node, absolutes, parentRoundedX, parentRoundedY);
|
|
77
|
+
}
|
|
61
78
|
function collectAbsolutes(node, parentX, parentY, out) {
|
|
62
79
|
const x = parentX + node.layout.left;
|
|
63
80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C,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC;IACtD,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC;IAEvD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flexbox layout expressed as an attribute grammar.
|
|
3
|
+
*
|
|
4
|
+
* Current slice (v16b) covers:
|
|
5
|
+
*
|
|
6
|
+
* - flex-direction: `row`, `column`, `row-reverse`, `column-reverse`
|
|
7
|
+
* - flex-grow / flex-shrink / flex-basis (v3-v4)
|
|
8
|
+
* - padding / margin / gap (v5)
|
|
9
|
+
* - justify-content + align-items / align-self (v6)
|
|
10
|
+
* - flex-wrap (v7) — single-line wrap and multi-line packing,
|
|
11
|
+
* each line independently distributed / justified / aligned
|
|
12
|
+
* - positionType: `'absolute'` (v8) — out-of-flow children
|
|
13
|
+
* positioned against the parent's OUTER box via `style.position`
|
|
14
|
+
* and `style.margin`. Width / height resolve from explicit
|
|
15
|
+
* style, from opposing edges (`left`+`right` or `top`+`bottom`),
|
|
16
|
+
* or fall back to 0. Absolute children are filtered out of every
|
|
17
|
+
* in-flow computation (flex distribution, justify leftover,
|
|
18
|
+
* wrap line packing).
|
|
19
|
+
* - align-content (v9) — for multi-line wrap containers, the cross-
|
|
20
|
+
* axis leftover is distributed among / around the lines per
|
|
21
|
+
* `flex-start` / `flex-end` / `center` / `space-between` /
|
|
22
|
+
* `space-around` / `stretch`
|
|
23
|
+
* - flex-wrap: `wrap-reverse` (v10) — the line stack is mirrored
|
|
24
|
+
* on the cross axis
|
|
25
|
+
* - flex-direction: `row-reverse` / `column-reverse` (v11) — the
|
|
26
|
+
* main axis runs from the container's main END; each in-flow
|
|
27
|
+
* child's main position is reflected across the inner-main box,
|
|
28
|
+
* mirroring the imperative `flipMainAxis`
|
|
29
|
+
* - min / max size clamping (v12) — every node's main size, cross
|
|
30
|
+
* size, and an absolute child's width / height are clamped to
|
|
31
|
+
* the node's own `[minWidth/Height, maxWidth/Height]`. v12a
|
|
32
|
+
* covered the single-shot sites (non-distributed main size,
|
|
33
|
+
* cross size, absolute children); v12b folds min/max into the
|
|
34
|
+
* flex-distribution freeze loop and the wrap line packer — an
|
|
35
|
+
* item whose proportional grow / shrink target breaches a clamp
|
|
36
|
+
* is frozen at its bound and its share redistributed, iterating
|
|
37
|
+
* to a fixpoint, exactly as the imperative `distributeGrow` /
|
|
38
|
+
* `distributeShrink`.
|
|
39
|
+
* - `'auto'` main size (v13) — a non-measured `'auto'` main-axis
|
|
40
|
+
* size resolves to 0 (mirroring `resolveHypotheticalMainSize`);
|
|
41
|
+
* the root's `'auto'` axis resolves from the caller-supplied
|
|
42
|
+
* `available` size, modelled as a root input Field so a terminal
|
|
43
|
+
* resize is incremental.
|
|
44
|
+
* - `'auto'` cross size + `align-items: stretch` (v14) — an
|
|
45
|
+
* `'auto'` cross-axis size is 0 under a non-stretch align, but
|
|
46
|
+
* `stretch` (the default) resizes it to fill the line's inner
|
|
47
|
+
* cross, mirroring the imperative `crossAlignItemsInLine`
|
|
48
|
+
* stretch branch.
|
|
49
|
+
* - `aspectRatio` (v15) — an `'auto'` axis whose perpendicular
|
|
50
|
+
* axis is an explicit number derives `width = height × ratio` /
|
|
51
|
+
* `height = width ÷ ratio`, mirroring `effectivePreferredSize`.
|
|
52
|
+
* A derived axis is definite (not content-sized) — so it is not
|
|
53
|
+
* stretched.
|
|
54
|
+
* - measure-func leaves (v16) — a childless node with a measure
|
|
55
|
+
* function resolves its `'auto'` axes by calling the measurer.
|
|
56
|
+
* v16a covers the MAIN axis (main free, cross constrained,
|
|
57
|
+
* mirroring `resolveHypotheticalMainSize`); v16b the CROSS axis
|
|
58
|
+
* (cross constrained `AtMost` the parent inner cross, main free
|
|
59
|
+
* with a hint, mirroring `naturalCrossSize`). A measured cross
|
|
60
|
+
* feeds the wrap line cross-size aggregation and the non-stretch
|
|
61
|
+
* cross size; `align-items: stretch` still overrides it.
|
|
62
|
+
*
|
|
63
|
+
* With v16 the grammar covers the full imperative `'auto'` /
|
|
64
|
+
* measure / `aspectRatio` resolution: the Spineless engine is a
|
|
65
|
+
* drop-in for `calculateLayout` on real content-sized trees.
|
|
66
|
+
*
|
|
67
|
+
* Fields emitted per node:
|
|
68
|
+
*
|
|
69
|
+
* - `width` — main-axis size when parent is `row`, cross-axis size
|
|
70
|
+
* when parent is `column`. Cross axis reads
|
|
71
|
+
* `style.width` verbatim. Main axis is the result of
|
|
72
|
+
* flex distribution when the parent has any child with
|
|
73
|
+
* grow > 0, shrink > 0, or numeric `flexBasis`;
|
|
74
|
+
* otherwise it equals the basis.
|
|
75
|
+
* - `height` — symmetric to `width`.
|
|
76
|
+
* - `left` — position relative to parent. For row-parent children
|
|
77
|
+
* this is the main-axis cursor: `padLeft + myMarginLeft
|
|
78
|
+
* + sum_priors(marginLeft + width + marginRight) +
|
|
79
|
+
* i*gapColumn`. For column-parent children it's the
|
|
80
|
+
* cross-axis position: `padLeft + myMarginLeft`. Root
|
|
81
|
+
* is at 0.
|
|
82
|
+
* - `top` — symmetric to `left`.
|
|
83
|
+
*
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
import type { Node } from '../../node.js';
|
|
87
|
+
import { type Field, type FieldRule, type Grammar } from './grammar.js';
|
|
88
|
+
/**
|
|
89
|
+
* Per-node input Fields for the style props the grammar reads. Each
|
|
90
|
+
* is present only if the grammar actually reads that prop for the
|
|
91
|
+
* node — every in-flow node has all three sizes; a container that
|
|
92
|
+
* lays children out along an axis has the matching `gap*`; an
|
|
93
|
+
* absolute child has `width` / `height` only when its size is
|
|
94
|
+
* explicit.
|
|
95
|
+
*
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
export interface StyleInputs {
|
|
99
|
+
width?: Field<number>;
|
|
100
|
+
height?: Field<number>;
|
|
101
|
+
flexBasis?: Field<number>;
|
|
102
|
+
flexGrow?: Field<number>;
|
|
103
|
+
flexShrink?: Field<number>;
|
|
104
|
+
gapRow?: Field<number>;
|
|
105
|
+
gapColumn?: Field<number>;
|
|
106
|
+
/**
|
|
107
|
+
* Min / max size clamps. `min*` default to 0; `max*` carry
|
|
108
|
+
* `Infinity` when `style.max{Width,Height}` is `undefined` ("no
|
|
109
|
+
* upper bound"), so a single `clampMinMax` covers both.
|
|
110
|
+
*/
|
|
111
|
+
minWidth?: Field<number>;
|
|
112
|
+
minHeight?: Field<number>;
|
|
113
|
+
maxWidth?: Field<number>;
|
|
114
|
+
maxHeight?: Field<number>;
|
|
115
|
+
/**
|
|
116
|
+
* Per-edge `padding` input Fields, indexed `[top, right, bottom,
|
|
117
|
+
* left]`. Entries are present only for edges the grammar reads
|
|
118
|
+
* (a container reads all four of its own padding edges).
|
|
119
|
+
*/
|
|
120
|
+
padding?: Array<Field<number> | undefined>;
|
|
121
|
+
/**
|
|
122
|
+
* Per-edge `margin` input Fields, indexed `[top, right, bottom,
|
|
123
|
+
* left]`. Present for every non-root in-flow node and every
|
|
124
|
+
* absolute child (the grammar reads all four edges).
|
|
125
|
+
*/
|
|
126
|
+
margin?: Array<Field<number> | undefined>;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Roots used by `buildFlexGrammar` to identify which (Node, name) pair
|
|
130
|
+
* is the canonical entry point. The Spineless runtime / interpreter
|
|
131
|
+
* starts evaluation from this set of fields and walks deps.
|
|
132
|
+
*
|
|
133
|
+
* @internal
|
|
134
|
+
*/
|
|
135
|
+
export interface FlexGrammarOutput {
|
|
136
|
+
grammar: Grammar;
|
|
137
|
+
/** Fields the caller typically wants computed on the root. */
|
|
138
|
+
rootFields: {
|
|
139
|
+
width: Field<number>;
|
|
140
|
+
height: Field<number>;
|
|
141
|
+
left: Field<number>;
|
|
142
|
+
top: Field<number>;
|
|
143
|
+
};
|
|
144
|
+
/** All emitted fields, in pre-order. Useful for differential tests. */
|
|
145
|
+
allFields: Array<{
|
|
146
|
+
node: Node;
|
|
147
|
+
width: Field<number>;
|
|
148
|
+
height: Field<number>;
|
|
149
|
+
left: Field<number>;
|
|
150
|
+
top: Field<number>;
|
|
151
|
+
}>;
|
|
152
|
+
/**
|
|
153
|
+
* Per-node input Fields for the style props the grammar models as
|
|
154
|
+
* graph inputs — currently the SIZE props (`width` / `height` /
|
|
155
|
+
* `flexBasis`), `gap` (`gapRow` / `gapColumn`), `padding` and
|
|
156
|
+
* `margin` (per-edge). Each is a leaf field whose value is the live
|
|
157
|
+
* `node.style` value; every layout field that reads one declares
|
|
158
|
+
* the matching input as a dependency. To drive a precise
|
|
159
|
+
* incremental relayout after a `setWidth` / `setHeight` /
|
|
160
|
+
* `setFlexBasis` / `setFlexGrow` / `setFlexShrink` / `setGap` /
|
|
161
|
+
* `setPadding` / `setMargin`, `markDirty` the input Field for the
|
|
162
|
+
* mutated `(node, prop)` and call `recompute()` — propagation then
|
|
163
|
+
* reaches exactly the affected layout fields, with no
|
|
164
|
+
* `markAllDirty`.
|
|
165
|
+
*
|
|
166
|
+
* Every numeric style prop the grammar reads is now an input
|
|
167
|
+
* field. What still needs a fresh `buildFlexGrammar()` is
|
|
168
|
+
* STRUCTURAL mutation — flex-direction, flex-wrap on/off, the
|
|
169
|
+
* justify / align category, `positionType`, and toggling a flex
|
|
170
|
+
* weight or `flexBasis` across the zero / numeric boundary (which
|
|
171
|
+
* flips whether the parent flex-distributes).
|
|
172
|
+
*/
|
|
173
|
+
styleInputs: Map<Node, StyleInputs>;
|
|
174
|
+
/**
|
|
175
|
+
* Input Fields for the root's caller-supplied `available` size,
|
|
176
|
+
* present only for an axis where the root's style is `'auto'`
|
|
177
|
+
* (v13). `markDirty` one and `recompute()` to re-lay the tree
|
|
178
|
+
* after a terminal resize.
|
|
179
|
+
*/
|
|
180
|
+
availableInputs: {
|
|
181
|
+
width?: Field<number>;
|
|
182
|
+
height?: Field<number>;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Per-parent intermediate Fields for the phase-12 flex-distribution
|
|
186
|
+
* grammar. Keyed by each flex-distributing single-line parent; value
|
|
187
|
+
* is the `mainDistribution` Field emitted for that parent. Fragment
|
|
188
|
+
* builders (append / remove / reorder) consult this to perform
|
|
189
|
+
* precise rebinds without a full grammar rebuild.
|
|
190
|
+
*/
|
|
191
|
+
mainDistributionByParent: Map<Node, Field<MainAxisDistribution>>;
|
|
192
|
+
}
|
|
193
|
+
/** Caller-supplied availability for an `'auto'`-sized root. */
|
|
194
|
+
export interface AvailableSize {
|
|
195
|
+
width?: number;
|
|
196
|
+
height?: number;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Walk the tree rooted at `root` and emit a `Grammar` that computes
|
|
200
|
+
* each node's `{width, height, left, top}`. See the module header
|
|
201
|
+
* for the field rules. A whole-tree build — `boundary` is `null`.
|
|
202
|
+
*
|
|
203
|
+
* `'auto'` width / height are supported (v13): a non-measured
|
|
204
|
+
* `'auto'` axis resolves to 0; the root's `'auto'` axis resolves
|
|
205
|
+
* from `available` (matching `calculateLayout`'s availability args).
|
|
206
|
+
*
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
export declare function buildFlexGrammar(root: Node, available?: AvailableSize): FlexGrammarOutput;
|
|
210
|
+
/**
|
|
211
|
+
* The patch inputs for a fast-pathed child append — see
|
|
212
|
+
* `buildAppendFragment`.
|
|
213
|
+
*
|
|
214
|
+
* @internal
|
|
215
|
+
*/
|
|
216
|
+
export interface AppendFragment {
|
|
217
|
+
/** Rules for the newly-added subtree's fields, for `graft`. */
|
|
218
|
+
additions: Grammar;
|
|
219
|
+
/** The new fields to start `SpinelessRuntime.graft`'s DFS from. */
|
|
220
|
+
newRoots: Array<Field<unknown>>;
|
|
221
|
+
/**
|
|
222
|
+
* Existing fields whose rule the append rewrote, paired with the
|
|
223
|
+
* new rule — for `SpinelessRuntime.rebindRule`. Empty for a
|
|
224
|
+
* simple-regime append (`graft` alone suffices); non-empty when
|
|
225
|
+
* the parent flex-distributes / justifies / wraps, where appending
|
|
226
|
+
* a child also grows every existing sibling's dependency set.
|
|
227
|
+
* Apply these AFTER `graft` (the new rules reference the grafted
|
|
228
|
+
* fields), then call `recompute()`.
|
|
229
|
+
*/
|
|
230
|
+
rebinds: Array<[Field<unknown>, FieldRule<unknown>]>;
|
|
231
|
+
/**
|
|
232
|
+
* A fresh full `FlexGrammarOutput` for the post-append tree. The
|
|
233
|
+
* caller should adopt it for subsequent operations — its
|
|
234
|
+
* `allFields` / `styleInputs` cover the new subtree (the runtime's
|
|
235
|
+
* own grammar is patched in place by `graft` + `rebindRule`).
|
|
236
|
+
*/
|
|
237
|
+
next: FlexGrammarOutput;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Fast-path a child INSERT for the Spineless runtime. If adding
|
|
241
|
+
* `child` under `parent` can be absorbed without a fresh runtime,
|
|
242
|
+
* return the patch inputs; return `null` when a full rebuild is
|
|
243
|
+
* required — `child` is not a child of `parent`, or `parent` uses a
|
|
244
|
+
* reverse `flex-direction` (supported by the grammar since v11, but
|
|
245
|
+
* not by this structural fast-path — reflecting every sibling's
|
|
246
|
+
* position is a whole-subtree rewrite).
|
|
247
|
+
*
|
|
248
|
+
* The new subtree's fields are always topological-tail additions
|
|
249
|
+
* handled by `graft` (`additions` / `newRoots`). When `parent` is in
|
|
250
|
+
* the "simple" regime (no flex distribution, default `flex-start`
|
|
251
|
+
* justify, no wrap) AND `child` is its LAST child — or `child` is
|
|
252
|
+
* absolute — that is the whole patch and `rebinds` is empty, and the
|
|
253
|
+
* fragment is built in **O(subtree)**: `makeEmitter` emits just the
|
|
254
|
+
* appended subtree against the runtime's grammar as a boundary, no
|
|
255
|
+
* whole-tree rebuild. Otherwise the insert also rewrites existing
|
|
256
|
+
* in-flow siblings' rules — a flex-distributing / justified /
|
|
257
|
+
* wrapping parent reads every sibling, and a MID-LIST insert (v32)
|
|
258
|
+
* shifts every later in-flow sibling's main position — so the
|
|
259
|
+
* grammar is rebuilt O(tree) and `rebinds` carries those siblings'
|
|
260
|
+
* rewritten rules.
|
|
261
|
+
*
|
|
262
|
+
* `next.grammar` is always `prev.grammar` — the runtime's own Map,
|
|
263
|
+
* which `graft` / `rebindRule` patch in place; `next.allFields` /
|
|
264
|
+
* `next.styleInputs` are refreshed lookup tables the caller adopts.
|
|
265
|
+
*
|
|
266
|
+
* @internal
|
|
267
|
+
*/
|
|
268
|
+
export declare function buildAppendFragment(prev: FlexGrammarOutput, root: Node, parent: Node, child: Node, available?: AvailableSize): AppendFragment | null;
|
|
269
|
+
/**
|
|
270
|
+
* The patch inputs for a fast-pathed child removal — see
|
|
271
|
+
* `buildRemoveFragment`.
|
|
272
|
+
*
|
|
273
|
+
* @internal
|
|
274
|
+
*/
|
|
275
|
+
export interface RemoveFragment {
|
|
276
|
+
/**
|
|
277
|
+
* Every field belonging to the removed subtree, for
|
|
278
|
+
* `SpinelessRuntime.detach`. Apply this AFTER the `rebinds` — a
|
|
279
|
+
* surviving sibling rebound off the removed child must drop its
|
|
280
|
+
* dependency on the child's fields before they can be detached.
|
|
281
|
+
*/
|
|
282
|
+
removed: Array<Field<unknown>>;
|
|
283
|
+
/**
|
|
284
|
+
* Existing fields whose rule the removal rewrote, paired with the
|
|
285
|
+
* new rule — for `SpinelessRuntime.rebindRule`. Empty when removing
|
|
286
|
+
* a last child from a simple-regime parent (`detach` alone
|
|
287
|
+
* suffices); non-empty when the parent flex-distributes /
|
|
288
|
+
* justifies / wraps, or the child is interior — where removing it
|
|
289
|
+
* shrinks every surviving sibling's dependency set.
|
|
290
|
+
*/
|
|
291
|
+
rebinds: Array<[Field<unknown>, FieldRule<unknown>]>;
|
|
292
|
+
/**
|
|
293
|
+
* A fresh full `FlexGrammarOutput` for the post-removal tree. The
|
|
294
|
+
* caller adopts it for subsequent operations.
|
|
295
|
+
*/
|
|
296
|
+
next: FlexGrammarOutput;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Fast-path a child REMOVAL for the Spineless runtime — the mirror
|
|
300
|
+
* of `buildAppendFragment`. Call this **before** detaching `child`
|
|
301
|
+
* from `parent`: the simple-regime check needs `child` still in
|
|
302
|
+
* place. Returns the patch inputs, or `null` when a full rebuild is
|
|
303
|
+
* required (`child` is not `parent`'s child, or `parent` uses a
|
|
304
|
+
* reverse `flex-direction` — supported by the grammar since v11 but
|
|
305
|
+
* not by this fast-path).
|
|
306
|
+
*
|
|
307
|
+
* In the "simple" regime (no flex distribution, default `flex-start`
|
|
308
|
+
* justify, no wrap — or `child` is absolute) the patch is built in
|
|
309
|
+
* **O(subtree)**: `removed` is collected directly from `prev` by
|
|
310
|
+
* walking the removed subtree, with no whole-tree rebuild, and
|
|
311
|
+
* `rebinds` is empty. `SpinelessRuntime.detach` then drops those
|
|
312
|
+
* fields and auto-cleans any input field they orphaned (e.g. the new
|
|
313
|
+
* last child's now-unread main-end margin). Otherwise the removal
|
|
314
|
+
* shrinks every surviving in-flow sibling's dependency set, so the
|
|
315
|
+
* grammar is rebuilt O(tree) and `rebinds` carries those siblings'
|
|
316
|
+
* rewritten rules. The caller applies `rebindRule` for each rebind
|
|
317
|
+
* FIRST (so survivors stop depending on the removed fields), then
|
|
318
|
+
* `detach`, then `recompute()`.
|
|
319
|
+
*
|
|
320
|
+
* Does not mutate the tree. `next.grammar` is `prev.grammar` — the
|
|
321
|
+
* runtime's own Map, patched in place by `detach` / `rebindRule`.
|
|
322
|
+
*
|
|
323
|
+
* @internal
|
|
324
|
+
*/
|
|
325
|
+
export declare function buildRemoveFragment(prev: FlexGrammarOutput, root: Node, parent: Node, child: Node, available?: AvailableSize): RemoveFragment | null;
|
|
326
|
+
/**
|
|
327
|
+
* The patch inputs for a fast-pathed child reorder — see
|
|
328
|
+
* `buildReorderFragment`.
|
|
329
|
+
*
|
|
330
|
+
* @internal
|
|
331
|
+
*/
|
|
332
|
+
export interface ReorderFragment {
|
|
333
|
+
/**
|
|
334
|
+
* Input fields the reorder newly needs — for `SpinelessRuntime.graft`.
|
|
335
|
+
* A reorder adds no node, but it can give a node a follower (or
|
|
336
|
+
* take one away), and a node's main-END margin is read only when it
|
|
337
|
+
* has a follower. So a node that gained a follower contributes a
|
|
338
|
+
* newly-read margin input.
|
|
339
|
+
*/
|
|
340
|
+
additions: Grammar;
|
|
341
|
+
/** The new fields to start `graft`'s DFS from (every addition). */
|
|
342
|
+
newRoots: Array<Field<unknown>>;
|
|
343
|
+
/**
|
|
344
|
+
* Input fields the reorder no longer needs — for
|
|
345
|
+
* `SpinelessRuntime.detach`. The mirror of `additions`: a node that
|
|
346
|
+
* lost its follower (became the last child) no longer has its
|
|
347
|
+
* main-end margin read.
|
|
348
|
+
*/
|
|
349
|
+
removed: Array<Field<unknown>>;
|
|
350
|
+
/**
|
|
351
|
+
* Existing fields whose rule the reorder rewrote, paired with the
|
|
352
|
+
* new rule — for `SpinelessRuntime.rebindRule`.
|
|
353
|
+
*/
|
|
354
|
+
rebinds: Array<[Field<unknown>, FieldRule<unknown>]>;
|
|
355
|
+
/** A fresh full `FlexGrammarOutput` for the reordered tree. */
|
|
356
|
+
next: FlexGrammarOutput;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Fast-path a child REORDER for the Spineless runtime — `parent`'s
|
|
360
|
+
* children are a permutation of their former order (no node added or
|
|
361
|
+
* removed). The grammar is rebuilt O(tree) and the patch applied to
|
|
362
|
+
* the existing runtime without a fresh `init`.
|
|
363
|
+
*
|
|
364
|
+
* Reordering `parent`'s children can only change the rules of
|
|
365
|
+
* `parent` itself (its `'auto'` / wrap content size now packs the
|
|
366
|
+
* children in a new order) and of its in-flow children (their main
|
|
367
|
+
* positions, and — under wrap — their line-dependent sizes), so the
|
|
368
|
+
* rebind set is `parent` + its in-flow children's
|
|
369
|
+
* `width / height / left / top`. Descendants and ancestors recompute
|
|
370
|
+
* from the changed VALUES; their rules are untouched.
|
|
371
|
+
*
|
|
372
|
+
* A reorder also shifts the "has a follower" boundary, so a node's
|
|
373
|
+
* main-end margin input can become newly read (`additions`) or
|
|
374
|
+
* newly unread (`removed`) — the same diff `buildAppendFragment`'s
|
|
375
|
+
* non-simple branch takes. The caller applies `graft` then
|
|
376
|
+
* `rebindRule` then `detach`.
|
|
377
|
+
*
|
|
378
|
+
* `next.grammar` is `prev.grammar` — the runtime's own Map, patched
|
|
379
|
+
* in place.
|
|
380
|
+
*
|
|
381
|
+
* @internal
|
|
382
|
+
*/
|
|
383
|
+
export declare function buildReorderFragment(prev: FlexGrammarOutput, root: Node, parent: Node, available?: AvailableSize): ReorderFragment;
|
|
384
|
+
/**
|
|
385
|
+
* The materialised result of a flex-distributing parent's main-axis
|
|
386
|
+
* pass — sizes plus folded positions. One per qualifying parent.
|
|
387
|
+
* Cells index into this instead of redoing the distribution each.
|
|
388
|
+
* @internal
|
|
389
|
+
*/
|
|
390
|
+
export interface MainAxisDistribution {
|
|
391
|
+
readonly sizes: readonly number[];
|
|
392
|
+
readonly positions: readonly number[];
|
|
393
|
+
}
|
|
394
|
+
//# sourceMappingURL=flex-grammar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flex-grammar.d.ts","sourceRoot":"","sources":["../../../src/algorithm/spineless/flex-grammar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAsB,MAAM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