@glissade/scene 0.61.0-pre.0 → 0.61.0-pre.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/describe.js +1 -1
- package/dist/diagnostics.js +13 -0
- package/package.json +2 -2
package/dist/describe.js
CHANGED
|
@@ -23,7 +23,7 @@ import { easings, listValueTypes } from "@glissade/core";
|
|
|
23
23
|
* never pulled onto the base embed path — a scene that never calls `describe()`
|
|
24
24
|
* pays zero bytes for it.
|
|
25
25
|
*/
|
|
26
|
-
const RAW_VERSION = "0.61.0-pre.
|
|
26
|
+
const RAW_VERSION = "0.61.0-pre.1";
|
|
27
27
|
const PACKAGE_VERSION = RAW_VERSION.includes("GLISSADE_".concat("VERSION")) ? "0.0.0-dev" : RAW_VERSION;
|
|
28
28
|
/**
|
|
29
29
|
* Parse the documented positional-arg count from a helper `usage` string — the
|
package/dist/diagnostics.js
CHANGED
|
@@ -923,6 +923,17 @@ function sortDiagnostics(diags) {
|
|
|
923
923
|
}
|
|
924
924
|
//#endregion
|
|
925
925
|
//#region src/diff.ts
|
|
926
|
+
/**
|
|
927
|
+
* `diff` takes two `{ scene, timeline }` STATE PAIRS, not two `(scene, timeline)`
|
|
928
|
+
* args like its sibling diagnostics (critique/exportFidelity) — a plausible misuse.
|
|
929
|
+
* Passing a raw `Scene` would fall through to `evaluate` and throw the cryptic
|
|
930
|
+
* "Invalid value used as weak map key"; catch it here with an actionable message.
|
|
931
|
+
*/
|
|
932
|
+
function assertDiffInput(x, which) {
|
|
933
|
+
if (x !== null && typeof x === "object" && typeof x.scene === "object" && x.scene !== null) return;
|
|
934
|
+
const looksLikeScene = x !== null && typeof x === "object" && "nodes" in x && "root" in x && typeof x.resolveTarget === "function";
|
|
935
|
+
throw new TypeError(looksLikeScene ? `diff expects { scene, timeline } state objects (got a Scene) — did you mean diff({ scene, timeline }, { scene, timeline })? (unlike critique/exportFidelity, diff takes two STATE PAIRS, not scene+timeline args)` : `diff's ${which} argument must be a { scene, timeline } state object`);
|
|
936
|
+
}
|
|
926
937
|
/** Stable JSON of any value — object keys sorted so key ORDER never reads as a
|
|
927
938
|
* change. NaN/Infinity/undefined are normalized to stable sentinels. */
|
|
928
939
|
function canonical(v) {
|
|
@@ -992,6 +1003,8 @@ function trackSignature(track) {
|
|
|
992
1003
|
* to also diff the DisplayList at `at`. Pure read; `diff(a, a)` is EMPTY.
|
|
993
1004
|
*/
|
|
994
1005
|
function diff(a, b, opts = {}) {
|
|
1006
|
+
assertDiffInput(a, "first");
|
|
1007
|
+
assertDiffInput(b, "second");
|
|
995
1008
|
const added = [];
|
|
996
1009
|
const removed = [];
|
|
997
1010
|
const changed = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glissade/scene",
|
|
3
|
-
"version": "0.61.0-pre.
|
|
3
|
+
"version": "0.61.0-pre.1",
|
|
4
4
|
"description": "glissade scene graph: nodes, transforms, DisplayList emission. Renderer-agnostic; zero DOM/Node dependencies.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"engines": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
],
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"yoga-layout": "^3.2.1",
|
|
84
|
-
"@glissade/core": "0.61.0-pre.
|
|
84
|
+
"@glissade/core": "0.61.0-pre.1"
|
|
85
85
|
},
|
|
86
86
|
"repository": {
|
|
87
87
|
"type": "git",
|