@geometra/core 1.10.9 → 1.11.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/layout-bounds.d.ts
CHANGED
|
@@ -18,7 +18,9 @@ export declare function finiteNumberOrZero(value: unknown): number;
|
|
|
18
18
|
* `isFinite` would coerce operands and throws on `BigInt`, which would otherwise take down pointer dispatch.
|
|
19
19
|
*
|
|
20
20
|
* @param layout — Bounds from Textura/Yoga {@link ComputedLayout} output.
|
|
21
|
-
* @returns `true` when `x`, `y`, `width`, and `height` are finite
|
|
21
|
+
* @returns `true` when `x`, `y`, `width`, and `height` are finite, both dimensions are `>= 0`, and
|
|
22
|
+
* `children` is a real array (empty is fine). Missing or non-array `children` is rejected so parallel
|
|
23
|
+
* tree walks (hit-test, focus, a11y) never throw on `layout.children[i]` from bad snapshots or transport bugs.
|
|
22
24
|
*
|
|
23
25
|
* `x` / `y` / `width` / `height` are read with normal property access (destructuring uses `[[Get]]`), so
|
|
24
26
|
* inherited values on the prototype chain are observed the same as own fields — including
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAWrE;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAkBT"}
|
package/dist/layout-bounds.js
CHANGED
|
@@ -23,7 +23,9 @@ export function finiteNumberOrZero(value) {
|
|
|
23
23
|
* `isFinite` would coerce operands and throws on `BigInt`, which would otherwise take down pointer dispatch.
|
|
24
24
|
*
|
|
25
25
|
* @param layout — Bounds from Textura/Yoga {@link ComputedLayout} output.
|
|
26
|
-
* @returns `true` when `x`, `y`, `width`, and `height` are finite
|
|
26
|
+
* @returns `true` when `x`, `y`, `width`, and `height` are finite, both dimensions are `>= 0`, and
|
|
27
|
+
* `children` is a real array (empty is fine). Missing or non-array `children` is rejected so parallel
|
|
28
|
+
* tree walks (hit-test, focus, a11y) never throw on `layout.children[i]` from bad snapshots or transport bugs.
|
|
27
29
|
*
|
|
28
30
|
* `x` / `y` / `width` / `height` are read with normal property access (destructuring uses `[[Get]]`), so
|
|
29
31
|
* inherited values on the prototype chain are observed the same as own fields — including
|
|
@@ -33,7 +35,9 @@ export function finiteNumberOrZero(value) {
|
|
|
33
35
|
* each visited layout when needed.
|
|
34
36
|
*/
|
|
35
37
|
export function layoutBoundsAreFinite(layout) {
|
|
36
|
-
const { x, y, width, height } = layout;
|
|
38
|
+
const { x, y, width, height, children } = layout;
|
|
39
|
+
if (!Array.isArray(children))
|
|
40
|
+
return false;
|
|
37
41
|
return (isFiniteLayoutNumber(x) &&
|
|
38
42
|
isFiniteLayoutNumber(y) &&
|
|
39
43
|
isFiniteLayoutNumber(width) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-bounds.js","sourceRoot":"","sources":["../src/layout-bounds.ts"],"names":[],"mappings":"AAEA,8HAA8H;AAC9H,SAAS,oBAAoB,CAAC,KAA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MAAM,UAAU,0BAA0B,CACxC,CAAS,EACT,CAAS,EACT,IAAY,EACZ,IAAY,EACZ,KAAa,EACb,MAAc;IAEd,IACE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtB,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QACvB,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QACxB,KAAK,GAAG,CAAC;QACT,MAAM,GAAG,CAAC,EACV,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IACD,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IACtC,MAAM,KAAK,GAAG,IAAI,GAAG,KAAK,CAAA;IAC1B,MAAM,MAAM,GAAG,IAAI,GAAG,MAAM,CAAA;IAC5B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAA;IACrE,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,MAAM,CAAA;AAClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geometra/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
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.11.0"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
45
|
"@napi-rs/canvas": "^0.1.65"
|