@geometra/core 1.7.0 → 1.8.1
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/app.d.ts.map +1 -1
- package/dist/app.js +1 -7
- package/dist/app.js.map +1 -1
- package/dist/direction.d.ts +12 -0
- package/dist/direction.d.ts.map +1 -1
- package/dist/direction.js +17 -0
- package/dist/direction.js.map +1 -1
- package/dist/focus-trap.d.ts +4 -2
- package/dist/focus-trap.d.ts.map +1 -1
- package/dist/focus-trap.js +12 -5
- package/dist/focus-trap.js.map +1 -1
- package/dist/focus.d.ts +2 -0
- package/dist/focus.d.ts.map +1 -1
- package/dist/focus.js +6 -2
- package/dist/focus.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/layout-bounds.d.ts +5 -2
- package/dist/layout-bounds.d.ts.map +1 -1
- package/dist/layout-bounds.js +5 -2
- package/dist/layout-bounds.js.map +1 -1
- package/dist/tree.d.ts +3 -2
- package/dist/tree.d.ts.map +1 -1
- package/dist/tree.js +3 -2
- package/dist/tree.js.map +1 -1
- package/package.json +2 -2
package/dist/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,SAAS,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,SAAS,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CA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B,QAAQ,EAAE,QAAQ,EAClB,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,GAAG,CAAC,CA6Ed"}
|
package/dist/app.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { init, computeLayout } from 'textura';
|
|
2
2
|
import { toLayoutTree } from './tree.js';
|
|
3
|
-
import {
|
|
3
|
+
import { resolveComputeLayoutDirection } from './direction.js';
|
|
4
4
|
import { dispatchHit } from './hit-test.js';
|
|
5
5
|
import { effect } from './signals.js';
|
|
6
6
|
import { focusedElement, setFocus } from './focus.js';
|
|
7
7
|
import { collectFontFamiliesFromTree, resolveFontLoadTimeoutMs, waitForFonts } from './fonts.js';
|
|
8
8
|
import { dispatchKeyboardEvent, dispatchCompositionEvent } from './keyboard.js';
|
|
9
|
-
function resolveComputeLayoutDirection(layoutDirection, root) {
|
|
10
|
-
if (layoutDirection === 'ltr' || layoutDirection === 'rtl') {
|
|
11
|
-
return layoutDirection;
|
|
12
|
-
}
|
|
13
|
-
return resolveElementDirection(root, 'ltr');
|
|
14
|
-
}
|
|
15
9
|
/** Only finite, non-negative numbers become Textura root constraints; otherwise the key is omitted (unconstrained). */
|
|
16
10
|
function finiteRootExtent(value) {
|
|
17
11
|
if (typeof value !== 'number' || !Number.isFinite(value))
|
package/dist/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,6B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I,WAAW,EAAE,CAAC;gBAC3C,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;YACnD,CAAC;YACD,OAAO,OAAO,CAAA;QAChB,CAAC;QACD,WAAW,CAAC,SAAS,EAAE,YAAY;YACjC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM;gBAAE,OAAO,KAAK,CAAA;YAC1C,OAAO,qBAAqB,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,CAAC,CAAA;QAC7E,CAAC;QACD,mBAAmB,CAAC,SAAS,EAAE,YAAY;YACzC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM;gBAAE,OAAO,KAAK,CAAA;YAC1C,OAAO,wBAAwB,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,CAAC,CAAA;QAChF,CAAC;QACD,OAAO;YACL,OAAO,EAAE,CAAA;YACT,QAAQ,CAAC,OAAO,EAAE,CAAA;QACpB,CAAC;KACF,CAAA;IAED,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,EAAE;QAC1B,KAAK,cAAc,CAAC,KAAK,CAAA;QACzB,GAAG,CAAC,MAAM,EAAE,CAAA;IACd,CAAC,CAAC,CAAA;IAEF,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
package/dist/direction.d.ts
CHANGED
|
@@ -16,4 +16,16 @@ export declare function resolveDirectionValue(dir: Direction | undefined, parent
|
|
|
16
16
|
* @returns Concrete `ltr` or `rtl` for layout, text, and hit-testing.
|
|
17
17
|
*/
|
|
18
18
|
export declare function resolveElementDirection(element: UIElement, parentDirection?: ResolvedDirection): ResolvedDirection;
|
|
19
|
+
/**
|
|
20
|
+
* Yoga / Textura **owner** direction for the layout-tree root: optional host override plus the live UI root.
|
|
21
|
+
*
|
|
22
|
+
* Only exact primitive `'ltr'` and `'rtl'` on `layoutDirection` win; any other value (omitted,
|
|
23
|
+
* `'auto'`, malformed config, boxed strings, etc.) falls back to {@link resolveElementDirection} on
|
|
24
|
+
* `root` with document default `'ltr'`, matching {@link import('./app.js').createApp} and keeping
|
|
25
|
+
* server-driven layout aligned with local canvas apps.
|
|
26
|
+
*
|
|
27
|
+
* @param layoutDirection — Host override (`createServer` / `createApp` option), or any runtime garbage; only `'ltr'` / `'rtl'` count.
|
|
28
|
+
* @param root — Live view root used when the override is absent or invalid.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveComputeLayoutDirection(layoutDirection: unknown, root: UIElement): ResolvedDirection;
|
|
19
31
|
//# sourceMappingURL=direction.d.ts.map
|
package/dist/direction.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direction.d.ts","sourceRoot":"","sources":["../src/direction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtD,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,KAAK,CAAA;AAM7C;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,SAAS,GAAG,SAAS,EAC1B,eAAe,GAAE,iBAAyB,GACzC,iBAAiB,CAKnB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,SAAS,EAClB,eAAe,GAAE,iBAAyB,GACzC,iBAAiB,CAGnB"}
|
|
1
|
+
{"version":3,"file":"direction.d.ts","sourceRoot":"","sources":["../src/direction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtD,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,KAAK,CAAA;AAM7C;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,SAAS,GAAG,SAAS,EAC1B,eAAe,GAAE,iBAAyB,GACzC,iBAAiB,CAKnB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,SAAS,EAClB,eAAe,GAAE,iBAAyB,GACzC,iBAAiB,CAGnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAC3C,eAAe,EAAE,OAAO,EACxB,IAAI,EAAE,SAAS,GACd,iBAAiB,CAKnB"}
|
package/dist/direction.js
CHANGED
|
@@ -27,4 +27,21 @@ export function resolveElementDirection(element, parentDirection = 'ltr') {
|
|
|
27
27
|
const dir = element.props.dir;
|
|
28
28
|
return resolveDirectionValue(dir, parentDirection);
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Yoga / Textura **owner** direction for the layout-tree root: optional host override plus the live UI root.
|
|
32
|
+
*
|
|
33
|
+
* Only exact primitive `'ltr'` and `'rtl'` on `layoutDirection` win; any other value (omitted,
|
|
34
|
+
* `'auto'`, malformed config, boxed strings, etc.) falls back to {@link resolveElementDirection} on
|
|
35
|
+
* `root` with document default `'ltr'`, matching {@link import('./app.js').createApp} and keeping
|
|
36
|
+
* server-driven layout aligned with local canvas apps.
|
|
37
|
+
*
|
|
38
|
+
* @param layoutDirection — Host override (`createServer` / `createApp` option), or any runtime garbage; only `'ltr'` / `'rtl'` count.
|
|
39
|
+
* @param root — Live view root used when the override is absent or invalid.
|
|
40
|
+
*/
|
|
41
|
+
export function resolveComputeLayoutDirection(layoutDirection, root) {
|
|
42
|
+
if (layoutDirection === 'ltr' || layoutDirection === 'rtl') {
|
|
43
|
+
return layoutDirection;
|
|
44
|
+
}
|
|
45
|
+
return resolveElementDirection(root, 'ltr');
|
|
46
|
+
}
|
|
30
47
|
//# sourceMappingURL=direction.js.map
|
package/dist/direction.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direction.js","sourceRoot":"","sources":["../src/direction.ts"],"names":[],"mappings":"AAIA,SAAS,0BAA0B,CAAC,KAAc;IAChD,OAAO,K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eAAe,CAAC,CAAA;AACpD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,6BAA6B,CAC3C,eAAwB,EACxB,IAAe;IAEf,IAAI,eAAe,KAAK,KAAK,IAAI,eAAe,KAAK,KAAK,EAAE,CAAC;QAC3D,OAAO,eAAe,CAAA;IACxB,CAAC;IACD,OAAO,uBAAuB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AAC7C,CAAC"}
|
package/dist/focus-trap.d.ts
CHANGED
|
@@ -5,14 +5,16 @@ import type { UIElement } from './types.js';
|
|
|
5
5
|
*
|
|
6
6
|
* Focusables are boxes with any of `onClick`, `onKeyDown`, `onKeyUp`,
|
|
7
7
|
* `onCompositionStart`, `onCompositionUpdate`, or `onCompositionEnd`, in tree order (same rule as
|
|
8
|
-
* {@link collectFocusOrder}, including skipping corrupt layout bounds
|
|
8
|
+
* {@link collectFocusOrder}, including skipping corrupt layout bounds and treating non-array
|
|
9
|
+
* `children` as empty).
|
|
9
10
|
*
|
|
10
11
|
* When the current {@link focusedElement} is missing or not inside the trap list, `'next'`
|
|
11
12
|
* jumps to the first focusable and `'prev'` to the last — so focus can enter the trap from
|
|
12
13
|
* outside without clearing focus first.
|
|
13
14
|
*
|
|
14
15
|
* @param scopePath — Indices from the tree root to the trap root box (inclusive). Invalid
|
|
15
|
-
* paths (out-of-range index, non-box node,
|
|
16
|
+
* paths (out-of-range index, non-box node, non-array `children` on a box along the path, or empty
|
|
17
|
+
* focusable list under the subtree) yield `false`.
|
|
16
18
|
* @returns `true` if focus was moved, `false` if the scope is invalid or contains no focusables.
|
|
17
19
|
*/
|
|
18
20
|
export declare function trapFocusStep(tree: UIElement, layout: ComputedLayout, scopePath: number[], direction?: 'next' | 'prev'): boolean;
|
package/dist/focus-trap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus-trap.d.ts","sourceRoot":"","sources":["../src/focus-trap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"focus-trap.d.ts","sourceRoot":"","sources":["../src/focus-trap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,YAAY,CAAA;AA8CvD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,cAAc,EACtB,SAAS,EAAE,MAAM,EAAE,EACnB,SAAS,GAAE,MAAM,GAAG,MAAe,GAClC,OAAO,CAgBT"}
|
package/dist/focus-trap.js
CHANGED
|
@@ -9,8 +9,10 @@ function collectFocusable(element, layout, out) {
|
|
|
9
9
|
if (hasFocusCandidateHandlers(element.handlers)) {
|
|
10
10
|
out.push({ element, layout });
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const kids = element.children;
|
|
13
|
+
const n = Array.isArray(kids) ? kids.length : 0;
|
|
14
|
+
for (let i = 0; i < n; i++) {
|
|
15
|
+
const child = kids[i];
|
|
14
16
|
const childLayout = layout.children[i];
|
|
15
17
|
if (child && childLayout)
|
|
16
18
|
collectFocusable(child, childLayout, out);
|
|
@@ -22,7 +24,10 @@ function resolveSubtree(tree, layout, path) {
|
|
|
22
24
|
for (const idx of path) {
|
|
23
25
|
if (el.kind !== 'box')
|
|
24
26
|
return null;
|
|
25
|
-
const
|
|
27
|
+
const kids = el.children;
|
|
28
|
+
if (!Array.isArray(kids))
|
|
29
|
+
return null;
|
|
30
|
+
const nextEl = kids[idx];
|
|
26
31
|
const nextLo = lo.children[idx];
|
|
27
32
|
if (!nextEl || !nextLo)
|
|
28
33
|
return null;
|
|
@@ -38,14 +43,16 @@ function resolveSubtree(tree, layout, path) {
|
|
|
38
43
|
*
|
|
39
44
|
* Focusables are boxes with any of `onClick`, `onKeyDown`, `onKeyUp`,
|
|
40
45
|
* `onCompositionStart`, `onCompositionUpdate`, or `onCompositionEnd`, in tree order (same rule as
|
|
41
|
-
* {@link collectFocusOrder}, including skipping corrupt layout bounds
|
|
46
|
+
* {@link collectFocusOrder}, including skipping corrupt layout bounds and treating non-array
|
|
47
|
+
* `children` as empty).
|
|
42
48
|
*
|
|
43
49
|
* When the current {@link focusedElement} is missing or not inside the trap list, `'next'`
|
|
44
50
|
* jumps to the first focusable and `'prev'` to the last — so focus can enter the trap from
|
|
45
51
|
* outside without clearing focus first.
|
|
46
52
|
*
|
|
47
53
|
* @param scopePath — Indices from the tree root to the trap root box (inclusive). Invalid
|
|
48
|
-
* paths (out-of-range index, non-box node,
|
|
54
|
+
* paths (out-of-range index, non-box node, non-array `children` on a box along the path, or empty
|
|
55
|
+
* focusable list under the subtree) yield `false`.
|
|
49
56
|
* @returns `true` if focus was moved, `false` if the scope is invalid or contains no focusables.
|
|
50
57
|
*/
|
|
51
58
|
export function trapFocusStep(tree, layout, scopePath, direction = 'next') {
|
package/dist/focus-trap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus-trap.js","sourceRoot":"","sources":["../src/focus-trap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAO1D,SAAS,gBAAgB,CAAC,OAAkB,EAAE,MAAsB,EAAE,GAAkB;IACtF,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC;QAAE,OAAM;IAC1C,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK;QAAE,OAAM;IAClC,IAAI,yBAAyB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAChD,GAAG,CAAC,IAAI,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AS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC9E,IAAI,GAAG,GAAG,CAAC;QAAE,GAAG,GAAG,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAChD,MAAM,OAAO,GAAG,SAAS,KAAK,MAAM;QAClC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM;QAC5B,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAA;IAC/C,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAE,CAAA;IAC9B,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IACnC,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/dist/focus.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export declare function clearFocus(): void;
|
|
|
18
18
|
* A box is focusable when it defines any of `onClick`, `onKeyDown`, `onKeyUp`,
|
|
19
19
|
* `onCompositionStart`, `onCompositionUpdate`, or `onCompositionEnd`.
|
|
20
20
|
* Non-box leaves (`text`, `image`, `scene3d`) are ignored — only `box` nodes participate in this walk.
|
|
21
|
+
* Boxes with a missing or non-array `children` field are treated as leaf boxes (no throw) so bad
|
|
22
|
+
* deserialization cannot take down focus walks.
|
|
21
23
|
* Skips boxes whose layout bounds are non-finite or have negative width/height, and does not walk
|
|
22
24
|
* their subtrees — same rule as hit-testing so corrupt geometry cannot enter focus order.
|
|
23
25
|
*
|
package/dist/focus.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../src/focus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,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,MAAM,EAAE,cAAc,GACrB,WAAW,EAAE,CAIf;AAwDD,uFAAuF;AACvF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,GAAG,WAAW,GAAG,IAAI,CAgBhG;AAED,gDAAgD;AAChD,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAgBvE;AAED,oDAAoD;AACpD,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAiBvE"}
|
package/dist/focus.js
CHANGED
|
@@ -17,6 +17,8 @@ export function clearFocus() {
|
|
|
17
17
|
* A box is focusable when it defines any of `onClick`, `onKeyDown`, `onKeyUp`,
|
|
18
18
|
* `onCompositionStart`, `onCompositionUpdate`, or `onCompositionEnd`.
|
|
19
19
|
* Non-box leaves (`text`, `image`, `scene3d`) are ignored — only `box` nodes participate in this walk.
|
|
20
|
+
* Boxes with a missing or non-array `children` field are treated as leaf boxes (no throw) so bad
|
|
21
|
+
* deserialization cannot take down focus walks.
|
|
20
22
|
* Skips boxes whose layout bounds are non-finite or have negative width/height, and does not walk
|
|
21
23
|
* their subtrees — same rule as hit-testing so corrupt geometry cannot enter focus order.
|
|
22
24
|
*
|
|
@@ -37,10 +39,12 @@ function collectFocusable(element, layout, results) {
|
|
|
37
39
|
if (hasFocusCandidateHandlers(element.handlers)) {
|
|
38
40
|
results.push({ element, layout });
|
|
39
41
|
}
|
|
40
|
-
|
|
42
|
+
const kids = element.children;
|
|
43
|
+
const n = Array.isArray(kids) ? kids.length : 0;
|
|
44
|
+
for (let i = 0; i < n; i++) {
|
|
41
45
|
const childLayout = layout.children[i];
|
|
42
46
|
if (childLayout) {
|
|
43
|
-
collectFocusable(
|
|
47
|
+
collectFocusable(kids[i], childLayout, results);
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
50
|
}
|
package/dist/focus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.js","sourceRoot":"","sources":["../src/focus.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AASrC,qDAAqD;AACrD,MAAM,CAAC,MAAM,cAAc,GAA+B,MAAM,CAAqB,IAAI,CAAC,CAAA;AAE1F,+BAA+B;AAC/B,MAAM,UAAU,QAAQ,CAAC,OAAmB,EAAE,MAAsB;IAClE,cAAc,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;AACzC,CAAC;AAED,+BAA+B;AAC/B,MAAM,UAAU,UAAU;IACxB,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"focus.js","sourceRoot":"","sources":["../src/focus.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AASrC,qDAAqD;AACrD,MAAM,CAAC,MAAM,cAAc,GAA+B,MAAM,CAAqB,IAAI,CAAC,CAAA;AAE1F,+BAA+B;AAC/B,MAAM,UAAU,QAAQ,CAAC,OAAmB,EAAE,MAAsB;IAClE,cAAc,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;AACzC,CAAC;AAED,+BAA+B;AAC/B,MAAM,UAAU,UAAU;IACxB,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,iBAAiB,CAC/B,OAAkB,EAClB,MAAsB;IAEtB,MAAM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ist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { sphere, points, line, ring, ambientLight, directionalLight, group } fro
|
|
|
17
17
|
export { createApp } from './app.js';
|
|
18
18
|
export type { App, AppOptions } from './app.js';
|
|
19
19
|
export { toLayoutTree } from './tree.js';
|
|
20
|
-
export { resolveDirectionValue, resolveElementDirection } from './direction.js';
|
|
20
|
+
export { resolveDirectionValue, resolveElementDirection, resolveComputeLayoutDirection, } from './direction.js';
|
|
21
21
|
export type { ResolvedDirection } from './direction.js';
|
|
22
22
|
export { dispatchHit, getCursorAtPoint, hasInteractiveHitAtPoint, hitPathAtPoint } from './hit-test.js';
|
|
23
23
|
export type { HitDispatchResult } from './hit-test.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAC9D,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAGpD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGzD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAGjG,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAG/C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,MAAM,EAA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Aa,EACb,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,uBAAuB,EACvB,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,aAAa,EACb,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,QAAQ,GACT,MAAM,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ export { sphere, points, line, ring, ambientLight, directionalLight, group } fro
|
|
|
20
20
|
export { createApp } from './app.js';
|
|
21
21
|
// Tree conversion
|
|
22
22
|
export { toLayoutTree } from './tree.js';
|
|
23
|
-
export { resolveDirectionValue, resolveElementDirection } from './direction.js';
|
|
23
|
+
export { resolveDirectionValue, resolveElementDirection, resolveComputeLayoutDirection, } from './direction.js';
|
|
24
24
|
// Hit testing
|
|
25
25
|
export { dispatchHit, getCursorAtPoint, hasInteractiveHitAtPoint, hitPathAtPoint } from './hit-test.js';
|
|
26
26
|
export { finiteNumberOrZero, layoutBoundsAreFinite } from './layout-bounds.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,aAAa;AACb,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAG9D,uBAAuB;AACvB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEzD,yBAAyB;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAEjG,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AA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AAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAE/E,iBAAiB;AACjB,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAG/E,YAAY;AACZ,OAAO,EACL,UAAU,EACV,MAAM,EACN,qBAAqB,EACrB,MAAM,EACN,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,gBAAgB,CAAA;AASvB,yBAAyB;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGvD,MAAM;AACN,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAGzC,wBAAwB;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAG/C,wBAAwB;AACxB,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,4BAA4B,EAC5B,qBAAqB,GACtB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,yBAAyB,CAAA"}
|
package/dist/layout-bounds.d.ts
CHANGED
|
@@ -20,8 +20,11 @@ export declare function finiteNumberOrZero(value: unknown): number;
|
|
|
20
20
|
* @param layout — Bounds from Textura/Yoga {@link ComputedLayout} output.
|
|
21
21
|
* @returns `true` when `x`, `y`, `width`, and `height` are finite and both dimensions are `>= 0`.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* `x` / `y` / `width` / `height` are read with normal property access (destructuring), so inherited
|
|
24
|
+
* **enumerable** values on the prototype chain are observed the same as own fields — typical
|
|
25
|
+
* {@link ComputedLayout} snapshots from Textura use plain objects with own fields only.
|
|
26
|
+
* {@link ComputedLayout.children} is not validated recursively. Callers walking a tree should check
|
|
27
|
+
* each visited layout when needed.
|
|
25
28
|
*/
|
|
26
29
|
export declare function layoutBoundsAreFinite(layout: ComputedLayout): boolean;
|
|
27
30
|
//# sourceMappingURL=layout-bounds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-bounds.d.ts","sourceRoot":"","sources":["../src/layout-bounds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAO7C;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEzD;AAED
|
|
1
|
+
{"version":3,"file":"layout-bounds.d.ts","sourceRoot":"","sources":["../src/layout-bounds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAO7C;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEzD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAUrE"}
|
package/dist/layout-bounds.js
CHANGED
|
@@ -25,8 +25,11 @@ export function finiteNumberOrZero(value) {
|
|
|
25
25
|
* @param layout — Bounds from Textura/Yoga {@link ComputedLayout} output.
|
|
26
26
|
* @returns `true` when `x`, `y`, `width`, and `height` are finite and both dimensions are `>= 0`.
|
|
27
27
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
28
|
+
* `x` / `y` / `width` / `height` are read with normal property access (destructuring), so inherited
|
|
29
|
+
* **enumerable** values on the prototype chain are observed the same as own fields — typical
|
|
30
|
+
* {@link ComputedLayout} snapshots from Textura use plain objects with own fields only.
|
|
31
|
+
* {@link ComputedLayout.children} is not validated recursively. Callers walking a tree should check
|
|
32
|
+
* each visited layout when needed.
|
|
30
33
|
*/
|
|
31
34
|
export function layoutBoundsAreFinite(layout) {
|
|
32
35
|
const { x, y, width, height } = layout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-bounds.js","sourceRoot":"","sources":["../src/layout-bounds.ts"],"names":[],"mappings":"AAEA,8HAA8H;AAC9H,SAAS,oBAAoB,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AACxE,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"layout-bounds.js","sourceRoot":"","sources":["../src/layout-bounds.ts"],"names":[],"mappings":"AAEA,8HAA8H;AAC9H,SAAS,oBAAoB,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AACxE,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAsB;IAC1D,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IACtC,OAAO,CACL,oBAAoB,CAAC,CAAC,CAAC;QACvB,oBAAoB,CAAC,CAAC,CAAC;QACvB,oBAAoB,CAAC,KAAK,CAAC;QAC3B,oBAAoB,CAAC,MAAM,CAAC;QAC5B,KAAK,IAAI,CAAC;QACV,MAAM,IAAI,CAAC,CACZ,CAAA;AACH,CAAC"}
|
package/dist/tree.d.ts
CHANGED
|
@@ -12,8 +12,9 @@ import type { UIElement } from './types.js';
|
|
|
12
12
|
* The layout **root** omits `dir` so {@link import('./app.js').createApp}'s
|
|
13
13
|
* {@link import('./app.js').AppOptions.layoutDirection} (or the root element’s resolved `dir` when that
|
|
14
14
|
* option is omitted) stays the single source of truth for the Yoga owner direction passed to Textura.
|
|
15
|
-
* Descendant nodes forward `dir` (`ltr` | `rtl` | `auto
|
|
16
|
-
*
|
|
15
|
+
* Descendant nodes forward `dir` (`ltr` | `rtl` | `auto`, or malformed strings from bad serialization) into Textura
|
|
16
|
+
* for per-subtree flex direction; Textura maps non-`ltr` / non-`rtl` values to Yoga **Inherit** (same as `auto`).
|
|
17
|
+
* Interaction helpers still resolve direction with {@link import('./direction.js').resolveElementDirection}.
|
|
17
18
|
*
|
|
18
19
|
* Does not mutate the source element or its `props` (strip list is applied to a shallow copy).
|
|
19
20
|
*
|
package/dist/tree.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../src/tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AA0C3C
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../src/tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AA0C3C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,YAAY,UAAO,GAAG,UAAU,CAchF"}
|
package/dist/tree.js
CHANGED
|
@@ -49,8 +49,9 @@ function stripStyleProps(props) {
|
|
|
49
49
|
* The layout **root** omits `dir` so {@link import('./app.js').createApp}'s
|
|
50
50
|
* {@link import('./app.js').AppOptions.layoutDirection} (or the root element’s resolved `dir` when that
|
|
51
51
|
* option is omitted) stays the single source of truth for the Yoga owner direction passed to Textura.
|
|
52
|
-
* Descendant nodes forward `dir` (`ltr` | `rtl` | `auto
|
|
53
|
-
*
|
|
52
|
+
* Descendant nodes forward `dir` (`ltr` | `rtl` | `auto`, or malformed strings from bad serialization) into Textura
|
|
53
|
+
* for per-subtree flex direction; Textura maps non-`ltr` / non-`rtl` values to Yoga **Inherit** (same as `auto`).
|
|
54
|
+
* Interaction helpers still resolve direction with {@link import('./direction.js').resolveElementDirection}.
|
|
54
55
|
*
|
|
55
56
|
* Does not mutate the source element or its `props` (strip list is applied to a shallow copy).
|
|
56
57
|
*
|
package/dist/tree.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.js","sourceRoot":"","sources":["../src/tree.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,SAAS,eAAe,CAAC,KAA8B;IACrD,MAAM,WAAW,GAAG,EAAE,GAAG,KAAK,EAAE,CAAA;IAChC,OAAO,WAAW,CAAC,eAAe,CAAA;IAClC,OAAO,WAAW,CAAC,KAAK,CAAA;IACxB,OAAO,WAAW,CAAC,WAAW,CAAA;IAC9B,OAAO,WAAW,CAAC,YAAY,CAAA;IAC/B,OAAO,WAAW,CAAC,WAAW,CAAA;IAC9B,OAAO,WAAW,CAAC,OAAO,CAAA;IAC1B,OAAO,WAAW,CAAC,MAAM,CAAA;IACzB,OAAO,WAAW,CAAC,aAAa,CAAA;IAChC,OAAO,WAAW,CAAC,MAAM,CAAA;IACzB,OAAO,WAAW,CAAC,QAAQ,CAAA;IAC3B,OAAO,WAAW,CAAC,OAAO,CAAA;IAC1B,OAAO,WAAW,CAAC,OAAO,CAAA;IAC1B,OAAO,WAAW,CAAC,SAAS,CAAA;IAC5B,OAAO,WAAW,CAAC,QAAQ,CAAA;IAC3B,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
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "DOM-free UI framework core: components, signals, reconciler",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"check": "tsc --noEmit"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"textura": "^1.
|
|
42
|
+
"textura": "^1.8.1"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
45
|
"@napi-rs/canvas": "^0.1.65"
|