@glissade/player 0.58.1-pre.0 → 0.59.0-pre.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/index.d.ts +11 -0
- package/dist/index.js +6 -2
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -84,6 +84,17 @@ interface PlayerOptions {
|
|
|
84
84
|
strictFonts?: boolean;
|
|
85
85
|
/** OS-installed families to treat as registered for strict mode. */
|
|
86
86
|
osFonts?: ReadonlySet<string>;
|
|
87
|
+
/**
|
|
88
|
+
* 0.59 "fail-loud ground floor" prod escape hatch. By DEFAULT an unresolvable
|
|
89
|
+
* track target (a typo'd `<id>/<prop>`) HARD-THROWS `UnboundTargetError` at
|
|
90
|
+
* bind — the loud dev behavior. Set `production: true` on a SHIPPED embed to
|
|
91
|
+
* DOWNGRADE that to a one-line dev-warning and skip the dead track, so an
|
|
92
|
+
* external/unaudited scene degrades instead of failing the whole render. The
|
|
93
|
+
* burden-to-remember moves to the shipping step (React dev/prod-invariant
|
|
94
|
+
* polarity); authoring stays loud. Byte-neutral for every valid scene — only
|
|
95
|
+
* an INVALID scene's behavior differs (throw vs warn).
|
|
96
|
+
*/
|
|
97
|
+
production?: boolean;
|
|
87
98
|
/**
|
|
88
99
|
* Backend-injection seam (dom-backend memo, Seam 2 — the S3 foundation). A
|
|
89
100
|
* factory that builds the `RenderBackend` mount() drives, given the render
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { buildFontRegistry, compileTimeline, signal } from "@glissade/core";
|
|
2
|
-
import { evaluate } from "@glissade/scene";
|
|
2
|
+
import { bindScene, evaluate } from "@glissade/scene";
|
|
3
3
|
import { validateSceneFonts } from "@glissade/scene/diagnostics";
|
|
4
4
|
import { Canvas2DBackend } from "@glissade/backend-canvas2d";
|
|
5
5
|
//#region src/driver.ts
|
|
@@ -298,7 +298,11 @@ function mount(initialScene, initialDoc, canvas, opts = {}) {
|
|
|
298
298
|
markers: compiled.markers,
|
|
299
299
|
targets: compiled.tracks.keys()
|
|
300
300
|
}, opts);
|
|
301
|
-
const
|
|
301
|
+
const unboundMode = opts.production ? "warn" : "throw";
|
|
302
|
+
const renderNow = () => {
|
|
303
|
+
bindScene(scene, doc, { onUnbound: unboundMode });
|
|
304
|
+
backend.render(evaluate(scene, doc, playhead.peek()));
|
|
305
|
+
};
|
|
302
306
|
let scheduled = false;
|
|
303
307
|
const schedule = () => {
|
|
304
308
|
if (scheduled) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glissade/player",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0-pre.0",
|
|
4
4
|
"description": "glissade embed runtime: Player, Drivers (clock, scroll), mount().",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"engines": {
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@glissade/backend-canvas2d": "0.
|
|
22
|
-
"@glissade/core": "0.
|
|
23
|
-
"@glissade/scene": "0.
|
|
21
|
+
"@glissade/backend-canvas2d": "0.59.0-pre.0",
|
|
22
|
+
"@glissade/core": "0.59.0-pre.0",
|
|
23
|
+
"@glissade/scene": "0.59.0-pre.0"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|