@glissade/scene 0.10.1 → 0.11.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/index.d.ts +20 -2
- package/dist/index.js +27 -2
- package/dist/layout.d.ts +1 -1
- package/dist/layout.js +1 -1
- package/dist/layoutEngine.d.ts +9 -1
- package/dist/layoutEngine.js +9 -1
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as breakLines, A as Polyline, B as validateHachure, C as Video, Ct as IDENTITY, D as revealSchedule, Dt as invert, E as pathFromSegs, Et as fromTRS, F as flatten, G as HitArea, H as AnchorSpec, I as hachureLines, J as PropInit, K as Node, L as resolveSketch, M as SketchStyle, N as SketchValidationError, O as roundedRectSegs, Ot as matEquals, P as arcLength, Q as TextMetricsLite, R as roughen, S as TextProps, St as validateFilters, T as WordBox, Tt as applyToPoint, U as BindablePropTarget, V as validateSketch, W as EvalContext, X as MEASURE_QUANTUM_PX, Y as resolveAnchor, Z as TextMeasurer, _ as PathProps, _t as ShaderRef, a as LayoutEngineMissingError, at as BlendMode, b as ShapeProps, bt as filtersToCanvasFilter, c as requireLayoutEngine, ct as DrawCommand, d as Custom, dt as FontSpec, et as estimatingMeasurer, f as Group, ft as Paint, g as Path, gt as ResourceId, h as LineBox, ht as Resource, i as LayoutEngine, it as setDefaultMeasurer, j as ResolvedSketch, k as HachureSpec, kt as multiply, l as setLayoutEngine, lt as FilterSpec, m as ImageProps, mt as Rect$1, n as LayoutChildSpec, nt as segmentGraphemes, ot as DisplayList, p as ImageNode, pt as PathSeg, q as NodeProps, r as LayoutContainerSpec, rt as segmentWords, s as getLayoutEngine, st as DisplayListBuilder, t as LayoutBox, tt as quantize, u as Circle, ut as FilterValidationError, v as Rect, vt as StrokeStyle, w as VideoProps, wt as Mat2x3, x as Text, xt as glow, y as RevealMark, yt as createDisplayListBuilder, z as sketchStrokes } from "./layoutEngine.js";
|
|
2
2
|
import { BindableSignal, BoundTimeline, CompiledTimeline, CoverageReport, EaseSpec, FontMode, FontUsage, PathValue, Playhead, Timeline, Track, Vec2 } from "@glissade/core";
|
|
3
3
|
|
|
4
|
+
//#region src/taxonomy.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The CLOSED node taxonomy (DESIGN.md §3.1): exactly nine built-in node TYPES.
|
|
8
|
+
* This frozen tuple is the lock — the enumerated, testable form of the "small,
|
|
9
|
+
* closed set" guarantee. Adding a tenth name is an intentional, reviewed spec
|
|
10
|
+
* change, not an accident.
|
|
11
|
+
*
|
|
12
|
+
* Most names map to an exported scene-node class from the base index
|
|
13
|
+
* (Group/Rect/Circle/Path/Text/Image/Video/Custom). 'Layout' is the lone
|
|
14
|
+
* exception: the Layout node lives in the separately-budgeted './layout' entry
|
|
15
|
+
* (§3.2, Yoga), so the NAME is in the taxonomy but the class is not pulled into
|
|
16
|
+
* the base index — keeping the base scene bundle free of Yoga.
|
|
17
|
+
*/
|
|
18
|
+
declare const NODE_TAXONOMY: readonly ["Group", "Rect", "Circle", "Path", "Text", "Image", "Video", "Layout", "Custom"];
|
|
19
|
+
/** The name of one of the nine taxonomy node types (§3.1). */
|
|
20
|
+
type NodeTypeName = (typeof NODE_TAXONOMY)[number];
|
|
21
|
+
//#endregion
|
|
4
22
|
//#region src/highlight.d.ts
|
|
5
23
|
|
|
6
24
|
interface HighlightProps extends NodeProps {
|
|
@@ -564,4 +582,4 @@ declare class Raster2D<TCanvas extends CanvasLike, TPath extends PathLike, TDraw
|
|
|
564
582
|
render(target: TCanvas, list: DisplayList): void;
|
|
565
583
|
}
|
|
566
584
|
//#endregion
|
|
567
|
-
export { ALL_FILTER_KINDS, type AnchorSpec, type BackendCaps, type BindablePropTarget, type BlendMode, type CacheColdResult, type CanvasLike, Circle, ColdAssetError, type Ctx2DLike, DeterminismViolationError, type DisplayList, type DisplayListBuilder, type DrawCommand, type DrawOnEachOptions, type DrawOnOptions, DuplicateNodeIdError, type EditMark, type EvalContext, type FilterKind, type FilterSpec, FilterValidationError, FollowPath, type FollowPathProps, type FontByteLoader, type FontSpec, Group, type GuardMode, type HachureSpec, Highlight, type HighlightProps, type HitArea, IDENTITY,
|
|
585
|
+
export { ALL_FILTER_KINDS, type AnchorSpec, type BackendCaps, type BindablePropTarget, type BlendMode, type CacheColdResult, type CanvasLike, Circle, ColdAssetError, type Ctx2DLike, Custom, DeterminismViolationError, type DisplayList, type DisplayListBuilder, type DrawCommand, type DrawOnEachOptions, type DrawOnOptions, DuplicateNodeIdError, type EditMark, type EvalContext, type FilterKind, type FilterSpec, FilterValidationError, FollowPath, type FollowPathProps, type FontByteLoader, type FontSpec, Group, type GuardMode, type HachureSpec, Highlight, type HighlightProps, type HitArea, IDENTITY, ImageNode as Image, ImageNode, type ImageHandle, type ImageProps, type LayoutBox, type LayoutChildSpec, type LayoutContainerSpec, type LayoutEngine, LayoutEngineMissingError, type LineBox, MEASURE_QUANTUM_PX, type Mat2x3, NODE_TAXONOMY, Node, type NodeProps, type NodeTypeName, type Paint, Path, type PathLike, type PathProps, type PathSampler, type PathSeg, type Polyline, type PropInit, Raster2D, type Raster2DHost, Rect, type Rect$1 as RectShape, type RenderBackend, ReservedNodeIdError, type ResolvedSketch, type Resource, type ResourceId, type RevealMark, type Scene, type SceneInit, type SceneModule, type ShaderCaps, ShaderEffect, type ShaderEffectProps, type ShaderRef, type ShapeProps, type SketchStyle, SketchValidationError, type StepMark, type StrokeStyle, Text, TextCursor, type TextCursorProps, type TextMeasurer, type TextMetricsLite, type TextProps, TokenHighlight, type TokenHighlightProps, TokenMatchError, type TokenRange, type TypeEdit, type TypewriterResult, type ValidateSceneFontsOptions, Video, type VideoFrameSource, type VideoProps, type WordBox, applyToPoint, arcLength, auditCacheCold, bindScene, breakLines, collectTextUsages, createDisplayListBuilder, createScene, drawOn, drawOnEach, estimatingMeasurer, evaluate, filtersToCanvasFilter, flatten, followPath, fontString, fromTRS, getLayoutEngine, glow, hachureLines, highlight, invert, matEquals, matchTokenRun, motionPath, multiply, pathFromSegs, pathLength, pointAtLength, quantize, requireLayoutEngine, resolveAnchor, resolveSketch, revealSchedule, roughen, roundedRectSegs, segmentGraphemes, segmentWords, setDefaultMeasurer, setLayoutEngine, sketchStrokes, textCursor, tokenHighlight, typewriter, validateFilters, validateHachure, validateSceneFonts, validateSketch, withDeterminismGuards };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as fallbackMeasurer, B as IDENTITY, C as validateHachure, D as MEASURE_QUANTUM_PX, E as resolveAnchor, F as FilterValidationError, G as multiply, H as fromTRS, I as createDisplayListBuilder, L as filtersToCanvasFilter, M as segmentGraphemes, N as segmentWords, O as breakLines, P as setDefaultMeasurer, R as glow, S as sketchStrokes, T as Node, U as invert, V as applyToPoint, W as matEquals, _ as arcLength, a as Circle, b as resolveSketch, c as ImageNode, d as Text, f as Video, g as SketchValidationError, h as roundedRectSegs, i as setLayoutEngine, j as quantize, k as estimatingMeasurer, l as Path, m as revealSchedule, n as getLayoutEngine, o as Custom, p as pathFromSegs, r as requireLayoutEngine, s as Group, t as LayoutEngineMissingError, u as Rect, v as flatten, w as validateSketch, x as roughen, y as hachureLines, z as validateFilters } from "./layoutEngine.js";
|
|
2
2
|
import { bindTimeline, buildFontRegistry, compileTimeline, createPlayhead, emitDevWarning, evaluateAt, key, lerpColor, parseCmap, signal, stagger, track, validateFonts, vec2Signal } from "@glissade/core";
|
|
3
|
+
//#region src/taxonomy.ts
|
|
4
|
+
/**
|
|
5
|
+
* The CLOSED node taxonomy (DESIGN.md §3.1): exactly nine built-in node TYPES.
|
|
6
|
+
* This frozen tuple is the lock — the enumerated, testable form of the "small,
|
|
7
|
+
* closed set" guarantee. Adding a tenth name is an intentional, reviewed spec
|
|
8
|
+
* change, not an accident.
|
|
9
|
+
*
|
|
10
|
+
* Most names map to an exported scene-node class from the base index
|
|
11
|
+
* (Group/Rect/Circle/Path/Text/Image/Video/Custom). 'Layout' is the lone
|
|
12
|
+
* exception: the Layout node lives in the separately-budgeted './layout' entry
|
|
13
|
+
* (§3.2, Yoga), so the NAME is in the taxonomy but the class is not pulled into
|
|
14
|
+
* the base index — keeping the base scene bundle free of Yoga.
|
|
15
|
+
*/
|
|
16
|
+
const NODE_TAXONOMY = [
|
|
17
|
+
"Group",
|
|
18
|
+
"Rect",
|
|
19
|
+
"Circle",
|
|
20
|
+
"Path",
|
|
21
|
+
"Text",
|
|
22
|
+
"Image",
|
|
23
|
+
"Video",
|
|
24
|
+
"Layout",
|
|
25
|
+
"Custom"
|
|
26
|
+
];
|
|
27
|
+
//#endregion
|
|
3
28
|
//#region src/highlight.ts
|
|
4
29
|
/**
|
|
5
30
|
* Marker-style text highlight: per-line rounded rects behind a Text node's
|
|
@@ -1443,4 +1468,4 @@ var Raster2D = class {
|
|
|
1443
1468
|
}
|
|
1444
1469
|
};
|
|
1445
1470
|
//#endregion
|
|
1446
|
-
export { ALL_FILTER_KINDS, Circle, ColdAssetError, DeterminismViolationError, DuplicateNodeIdError, FilterValidationError, FollowPath, Group, Highlight, IDENTITY, ImageNode, LayoutEngineMissingError, MEASURE_QUANTUM_PX, Node, Path, Raster2D, Rect, ReservedNodeIdError, ShaderEffect, SketchValidationError, Text, TextCursor, TokenHighlight, TokenMatchError, Video, applyToPoint, arcLength, auditCacheCold, bindScene, breakLines, collectTextUsages, createDisplayListBuilder, createScene, drawOn, drawOnEach, estimatingMeasurer, evaluate, filtersToCanvasFilter, flatten, followPath, fontString, fromTRS, getLayoutEngine, glow, hachureLines, highlight, invert, matEquals, matchTokenRun, motionPath, multiply, pathFromSegs, pathLength, pointAtLength, quantize, requireLayoutEngine, resolveAnchor, resolveSketch, revealSchedule, roughen, roundedRectSegs, segmentGraphemes, segmentWords, setDefaultMeasurer, setLayoutEngine, sketchStrokes, textCursor, tokenHighlight, typewriter, validateFilters, validateHachure, validateSceneFonts, validateSketch, withDeterminismGuards };
|
|
1471
|
+
export { ALL_FILTER_KINDS, Circle, ColdAssetError, Custom, DeterminismViolationError, DuplicateNodeIdError, FilterValidationError, FollowPath, Group, Highlight, IDENTITY, ImageNode as Image, ImageNode, LayoutEngineMissingError, MEASURE_QUANTUM_PX, NODE_TAXONOMY, Node, Path, Raster2D, Rect, ReservedNodeIdError, ShaderEffect, SketchValidationError, Text, TextCursor, TokenHighlight, TokenMatchError, Video, applyToPoint, arcLength, auditCacheCold, bindScene, breakLines, collectTextUsages, createDisplayListBuilder, createScene, drawOn, drawOnEach, estimatingMeasurer, evaluate, filtersToCanvasFilter, flatten, followPath, fontString, fromTRS, getLayoutEngine, glow, hachureLines, highlight, invert, matEquals, matchTokenRun, motionPath, multiply, pathFromSegs, pathLength, pointAtLength, quantize, requireLayoutEngine, resolveAnchor, resolveSketch, revealSchedule, roughen, roundedRectSegs, segmentGraphemes, segmentWords, setDefaultMeasurer, setLayoutEngine, sketchStrokes, textCursor, tokenHighlight, typewriter, validateFilters, validateHachure, validateSceneFonts, validateSketch, withDeterminismGuards };
|
package/dist/layout.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as PropInit, K as Node, W as EvalContext, Z as TextMeasurer, a as LayoutEngineMissingError, f as Group, i as LayoutEngine, l as setLayoutEngine, n as LayoutChildSpec, o as LayoutResult, q as NodeProps, r as LayoutContainerSpec, s as getLayoutEngine, st as DisplayListBuilder, t as LayoutBox } from "./layoutEngine.js";
|
|
2
2
|
import { BindableSignal } from "@glissade/core";
|
|
3
3
|
|
|
4
4
|
//#region src/layout.d.ts
|
package/dist/layout.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as fallbackMeasurer, i as setLayoutEngine, n as getLayoutEngine, r as requireLayoutEngine, s as Group, t as LayoutEngineMissingError } from "./layoutEngine.js";
|
|
2
2
|
import { computed, signal } from "@glissade/core";
|
|
3
3
|
//#region src/layout.ts
|
|
4
4
|
/**
|
package/dist/layoutEngine.d.ts
CHANGED
|
@@ -477,6 +477,14 @@ declare function roughen(segs: readonly PathSeg[], style: SketchStyle, rng: Rng)
|
|
|
477
477
|
declare function sketchStrokes(segs: readonly PathSeg[], style: SketchStyle, seed: number): PathSeg[][];
|
|
478
478
|
//#endregion
|
|
479
479
|
//#region src/nodes.d.ts
|
|
480
|
+
/**
|
|
481
|
+
* The NAMED extension point of the closed §3.1 taxonomy: the documented base
|
|
482
|
+
* an author subclasses to emit IR commands (never canvas calls). It adds
|
|
483
|
+
* nothing to `Node` — it exists so "custom-via-subclassing" is a real,
|
|
484
|
+
* exported surface (the ninth taxonomy member) rather than an unnamed
|
|
485
|
+
* convention. Subclasses implement the abstract `draw()` from `Node`.
|
|
486
|
+
*/
|
|
487
|
+
declare abstract class Custom extends Node {}
|
|
480
488
|
/** Rounded-rect path segments — Rect's outline, shared with Highlight. */
|
|
481
489
|
declare function roundedRectSegs(x: number, y: number, w: number, h: number, r: number): PathSeg[];
|
|
482
490
|
declare class Group extends Node {
|
|
@@ -838,4 +846,4 @@ declare function setLayoutEngine(e: LayoutEngine): void;
|
|
|
838
846
|
declare function getLayoutEngine(): LayoutEngine | null;
|
|
839
847
|
declare function requireLayoutEngine(): LayoutEngine;
|
|
840
848
|
//#endregion
|
|
841
|
-
export {
|
|
849
|
+
export { breakLines as $, Polyline as A, validateHachure as B, Video as C, IDENTITY as Ct, revealSchedule as D, invert as Dt, pathFromSegs as E, fromTRS as Et, flatten as F, HitArea as G, AnchorSpec as H, hachureLines as I, PropInit as J, Node as K, resolveSketch as L, SketchStyle as M, SketchValidationError as N, roundedRectSegs as O, matEquals as Ot, arcLength as P, TextMetricsLite as Q, roughen as R, TextProps as S, validateFilters as St, WordBox as T, applyToPoint as Tt, BindablePropTarget as U, validateSketch as V, EvalContext as W, MEASURE_QUANTUM_PX as X, resolveAnchor as Y, TextMeasurer as Z, PathProps as _, ShaderRef as _t, LayoutEngineMissingError as a, BlendMode as at, ShapeProps as b, filtersToCanvasFilter as bt, requireLayoutEngine as c, DrawCommand as ct, Custom as d, FontSpec as dt, estimatingMeasurer as et, Group as f, Paint as ft, Path as g, ResourceId as gt, LineBox as h, Resource as ht, LayoutEngine as i, setDefaultMeasurer as it, ResolvedSketch as j, HachureSpec as k, multiply as kt, setLayoutEngine as l, FilterSpec as lt, ImageProps as m, Rect$1 as mt, LayoutChildSpec as n, segmentGraphemes as nt, LayoutResult as o, DisplayList as ot, ImageNode as p, PathSeg as pt, NodeProps as q, LayoutContainerSpec as r, segmentWords as rt, getLayoutEngine as s, DisplayListBuilder as st, LayoutBox as t, quantize as tt, Circle as u, FilterValidationError as ut, Rect as v, StrokeStyle as vt, VideoProps as w, Mat2x3 as wt, Text as x, glow as xt, RevealMark as y, createDisplayListBuilder as yt, sketchStrokes as z };
|
package/dist/layoutEngine.js
CHANGED
|
@@ -813,6 +813,14 @@ function sketchStrokes(segs, style, seed) {
|
|
|
813
813
|
* Built-in nodes for M1 (DESIGN.md §3.1): Group, Rect, Circle, Text.
|
|
814
814
|
* Path/Image/Video/Layout arrive with their milestones.
|
|
815
815
|
*/
|
|
816
|
+
/**
|
|
817
|
+
* The NAMED extension point of the closed §3.1 taxonomy: the documented base
|
|
818
|
+
* an author subclasses to emit IR commands (never canvas calls). It adds
|
|
819
|
+
* nothing to `Node` — it exists so "custom-via-subclassing" is a real,
|
|
820
|
+
* exported surface (the ninth taxonomy member) rather than an unnamed
|
|
821
|
+
* convention. Subclasses implement the abstract `draw()` from `Node`.
|
|
822
|
+
*/
|
|
823
|
+
var Custom = class extends Node {};
|
|
816
824
|
/** Rounded-rect path segments — Rect's outline, shared with Highlight. */
|
|
817
825
|
function roundedRectSegs(x, y, w, h, r) {
|
|
818
826
|
if (r <= 0) return [
|
|
@@ -1845,4 +1853,4 @@ function requireLayoutEngine() {
|
|
|
1845
1853
|
return engine;
|
|
1846
1854
|
}
|
|
1847
1855
|
//#endregion
|
|
1848
|
-
export {
|
|
1856
|
+
export { fallbackMeasurer as A, IDENTITY as B, validateHachure as C, MEASURE_QUANTUM_PX as D, resolveAnchor as E, FilterValidationError as F, multiply as G, fromTRS as H, createDisplayListBuilder as I, filtersToCanvasFilter as L, segmentGraphemes as M, segmentWords as N, breakLines as O, setDefaultMeasurer as P, glow as R, sketchStrokes as S, Node as T, invert as U, applyToPoint as V, matEquals as W, arcLength as _, Circle as a, resolveSketch as b, ImageNode as c, Text as d, Video as f, SketchValidationError as g, roundedRectSegs as h, setLayoutEngine as i, quantize as j, estimatingMeasurer as k, Path as l, revealSchedule as m, getLayoutEngine as n, Custom as o, pathFromSegs as p, requireLayoutEngine as r, Group as s, LayoutEngineMissingError as t, Rect as u, flatten as v, validateSketch as w, roughen as x, hachureLines as y, validateFilters as z };
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glissade/scene",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.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
|
+
"engines": {
|
|
7
|
+
"node": ">=20.19"
|
|
8
|
+
},
|
|
6
9
|
"type": "module",
|
|
7
10
|
"sideEffects": false,
|
|
8
11
|
"exports": {
|
|
@@ -20,7 +23,7 @@
|
|
|
20
23
|
],
|
|
21
24
|
"dependencies": {
|
|
22
25
|
"yoga-layout": "^3.2.1",
|
|
23
|
-
"@glissade/core": "0.
|
|
26
|
+
"@glissade/core": "0.11.0-pre.1"
|
|
24
27
|
},
|
|
25
28
|
"repository": {
|
|
26
29
|
"type": "git",
|