@motionscript/core 0.1.0-alpha.5 → 0.1.0-alpha.6
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/CHANGELOG.md +27 -0
- package/dist/browser/chunks/chunk-2RIYH36X.js +3 -0
- package/dist/browser/chunks/{chunk-QG6C23IJ.js.map → chunk-2RIYH36X.js.map} +4 -4
- package/dist/browser/chunks/chunk-DDJN3QII.js +15 -0
- package/dist/browser/chunks/chunk-DDJN3QII.js.map +7 -0
- package/dist/browser/chunks/chunk-DHB4COFY.js +2 -0
- package/dist/browser/chunks/chunk-DHB4COFY.js.map +7 -0
- package/dist/browser/chunks/chunk-EJDPYDQI.js +5 -0
- package/dist/browser/chunks/chunk-EJDPYDQI.js.map +7 -0
- package/dist/browser/chunks/chunk-XAWE4EAK.js +2 -0
- package/dist/browser/chunks/chunk-XAWE4EAK.js.map +7 -0
- package/dist/browser/component.js +1 -1
- package/dist/browser/component.js.map +4 -4
- package/dist/browser/experimental.js +2 -0
- package/dist/browser/experimental.js.map +7 -0
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/jsx-jsx-dev-runtime.js +1 -1
- package/dist/browser/jsx-jsx-runtime.js +1 -1
- package/dist/browser/manifest.json +2 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/component/api.d.ts +508 -0
- package/dist/component/api.d.ts.map +1 -0
- package/dist/component/api.js +4 -0
- package/dist/component/api.js.map +1 -0
- package/dist/component/builtins/audio.d.ts +26 -0
- package/dist/component/builtins/audio.d.ts.map +1 -0
- package/dist/component/builtins/audio.js +41 -0
- package/dist/component/builtins/audio.js.map +1 -0
- package/dist/component/builtins/canvas3d.d.ts +98 -0
- package/dist/component/builtins/canvas3d.d.ts.map +1 -0
- package/dist/component/builtins/canvas3d.js +21 -0
- package/dist/component/builtins/canvas3d.js.map +1 -0
- package/dist/component/builtins/composite.d.ts +56 -0
- package/dist/component/builtins/composite.d.ts.map +1 -0
- package/dist/component/builtins/composite.js +25 -0
- package/dist/component/builtins/composite.js.map +1 -0
- package/dist/component/builtins/geometry.d.ts +505 -0
- package/dist/component/builtins/geometry.d.ts.map +1 -0
- package/dist/component/builtins/geometry.js +107 -0
- package/dist/component/builtins/geometry.js.map +1 -0
- package/dist/component/builtins/layout.d.ts +88 -0
- package/dist/component/builtins/layout.d.ts.map +1 -0
- package/dist/component/builtins/layout.js +84 -0
- package/dist/component/builtins/layout.js.map +1 -0
- package/dist/component/builtins/media.d.ts +95 -0
- package/dist/component/builtins/media.d.ts.map +1 -0
- package/dist/component/builtins/media.js +149 -0
- package/dist/component/builtins/media.js.map +1 -0
- package/dist/component/builtins/providers.d.ts +23 -0
- package/dist/component/builtins/providers.d.ts.map +1 -0
- package/dist/component/builtins/providers.js +30 -0
- package/dist/component/builtins/providers.js.map +1 -0
- package/dist/component/builtins/text.d.ts +193 -0
- package/dist/component/builtins/text.d.ts.map +1 -0
- package/dist/component/builtins/text.js +113 -0
- package/dist/component/builtins/text.js.map +1 -0
- package/dist/component/builtins/three.d.ts +1085 -0
- package/dist/component/builtins/three.d.ts.map +1 -0
- package/dist/component/builtins/three.js +265 -0
- package/dist/component/builtins/three.js.map +1 -0
- package/dist/component/clip-of.d.ts +5 -0
- package/dist/component/clip-of.d.ts.map +1 -0
- package/dist/component/clip-of.js +33 -0
- package/dist/component/clip-of.js.map +1 -0
- package/dist/component/commands-for.d.ts +19 -0
- package/dist/component/commands-for.d.ts.map +1 -0
- package/dist/component/commands-for.js +5 -0
- package/dist/component/commands-for.js.map +1 -0
- package/dist/component/component-audio.d.ts +9 -0
- package/dist/component/component-audio.d.ts.map +1 -0
- package/dist/component/component-audio.js +18 -0
- package/dist/component/component-audio.js.map +1 -0
- package/dist/component/component2d.d.ts +9 -0
- package/dist/component/component2d.d.ts.map +1 -0
- package/dist/component/component2d.js +239 -0
- package/dist/component/component2d.js.map +1 -0
- package/dist/component/component3d.d.ts +9 -0
- package/dist/component/component3d.d.ts.map +1 -0
- package/dist/component/component3d.js +99 -0
- package/dist/component/component3d.js.map +1 -0
- package/dist/component/factory.d.ts +63 -0
- package/dist/component/factory.d.ts.map +1 -0
- package/dist/component/factory.js +313 -0
- package/dist/component/factory.js.map +1 -0
- package/dist/component/modules/aim.d.ts +30 -0
- package/dist/component/modules/aim.d.ts.map +1 -0
- package/dist/component/modules/aim.js +39 -0
- package/dist/component/modules/aim.js.map +1 -0
- package/dist/component/modules/corners.d.ts +13 -0
- package/dist/component/modules/corners.d.ts.map +1 -0
- package/dist/component/modules/corners.js +12 -0
- package/dist/component/modules/corners.js.map +1 -0
- package/dist/component/modules/flow.d.ts +26 -0
- package/dist/component/modules/flow.d.ts.map +1 -0
- package/dist/component/modules/flow.js +55 -0
- package/dist/component/modules/flow.js.map +1 -0
- package/dist/component/modules/material.d.ts +40 -0
- package/dist/component/modules/material.d.ts.map +1 -0
- package/dist/component/modules/material.js +75 -0
- package/dist/component/modules/material.js.map +1 -0
- package/dist/component/modules/paint.d.ts +71 -0
- package/dist/component/modules/paint.d.ts.map +1 -0
- package/dist/component/modules/paint.js +106 -0
- package/dist/component/modules/paint.js.map +1 -0
- package/dist/component/modules/shapes.d.ts +31 -0
- package/dist/component/modules/shapes.d.ts.map +1 -0
- package/dist/component/modules/shapes.js +43 -0
- package/dist/component/modules/shapes.js.map +1 -0
- package/dist/component/modules/text-layout.d.ts +26 -0
- package/dist/component/modules/text-layout.d.ts.map +1 -0
- package/dist/component/modules/text-layout.js +57 -0
- package/dist/component/modules/text-layout.js.map +1 -0
- package/dist/component/modules/text-style.d.ts +48 -0
- package/dist/component/modules/text-style.d.ts.map +1 -0
- package/dist/component/modules/text-style.js +63 -0
- package/dist/component/modules/text-style.js.map +1 -0
- package/dist/component/modules/three-entries.d.ts +23 -0
- package/dist/component/modules/three-entries.d.ts.map +1 -0
- package/dist/component/modules/three-entries.js +41 -0
- package/dist/component/modules/three-entries.js.map +1 -0
- package/dist/component/modules/view3d.d.ts +55 -0
- package/dist/component/modules/view3d.d.ts.map +1 -0
- package/dist/component/modules/view3d.js +160 -0
- package/dist/component/modules/view3d.js.map +1 -0
- package/dist/component/timeline.d.ts +22 -0
- package/dist/component/timeline.d.ts.map +1 -0
- package/dist/component/timeline.js +128 -0
- package/dist/component/timeline.js.map +1 -0
- package/dist/component/type-def.d.ts +26 -0
- package/dist/component/type-def.d.ts.map +1 -0
- package/dist/component/type-def.js +16 -0
- package/dist/component/type-def.js.map +1 -0
- package/dist/component/types.d.ts +91 -0
- package/dist/component/types.d.ts.map +1 -0
- package/dist/component/types.js +88 -0
- package/dist/component/types.js.map +1 -0
- package/dist/component/views.d.ts +121 -0
- package/dist/component/views.d.ts.map +1 -0
- package/dist/component/views.js +413 -0
- package/dist/component/views.js.map +1 -0
- package/dist/component.d.ts +4 -5
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +3 -5
- package/dist/component.js.map +1 -1
- package/dist/document/audio.d.ts +9 -1
- package/dist/document/audio.d.ts.map +1 -1
- package/dist/document/audio.js +41 -0
- package/dist/document/audio.js.map +1 -1
- package/dist/document/builtins.d.ts.map +1 -1
- package/dist/document/builtins.js +9 -27
- package/dist/document/builtins.js.map +1 -1
- package/dist/document/command-traits.js +3 -0
- package/dist/document/command-traits.js.map +1 -1
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +3 -3
- package/dist/document/diff.js.map +1 -1
- package/dist/document/doc-index.d.ts.map +1 -1
- package/dist/document/doc-index.js +3 -3
- package/dist/document/doc-index.js.map +1 -1
- package/dist/document/node-descriptor.d.ts +6 -0
- package/dist/document/node-descriptor.d.ts.map +1 -1
- package/dist/document/node-descriptor.js.map +1 -1
- package/dist/document/placement.js +2 -2
- package/dist/document/placement.js.map +1 -1
- package/dist/document/registry.d.ts +6 -11
- package/dist/document/registry.d.ts.map +1 -1
- package/dist/document/registry.js +17 -17
- package/dist/document/registry.js.map +1 -1
- package/dist/document/settled-index.d.ts +49 -0
- package/dist/document/settled-index.d.ts.map +1 -0
- package/dist/document/settled-index.js +247 -0
- package/dist/document/settled-index.js.map +1 -0
- package/dist/document/timeline.d.ts +27 -1
- package/dist/document/timeline.d.ts.map +1 -1
- package/dist/document/timeline.js +98 -2
- package/dist/document/timeline.js.map +1 -1
- package/dist/experimental.d.ts +22 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +20 -0
- package/dist/experimental.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/nodes/audio/index.d.ts +2 -2
- package/dist/nodes/audio/index.d.ts.map +1 -1
- package/dist/nodes/audio/index.js +0 -2
- package/dist/nodes/audio/index.js.map +1 -1
- package/dist/nodes/audio/sound-node.d.ts +2 -1
- package/dist/nodes/audio/sound-node.d.ts.map +1 -1
- package/dist/nodes/audio/sound-node.js +3 -0
- package/dist/nodes/audio/sound-node.js.map +1 -1
- package/dist/nodes/index.d.ts +39 -27
- package/dist/nodes/index.d.ts.map +1 -1
- package/dist/nodes/index.js +16 -30
- package/dist/nodes/index.js.map +1 -1
- package/dist/nodes/node/node.d.ts +7 -1
- package/dist/nodes/node/node.d.ts.map +1 -1
- package/dist/nodes/node/node.js +23 -8
- package/dist/nodes/node/node.js.map +1 -1
- package/dist/nodes/root/canvas2d-node.d.ts +2 -1
- package/dist/nodes/root/canvas2d-node.d.ts.map +1 -1
- package/dist/nodes/root/canvas2d-node.js +3 -0
- package/dist/nodes/root/canvas2d-node.js.map +1 -1
- package/dist/nodes/text/richtext-node.d.ts +0 -5
- package/dist/nodes/text/richtext-node.d.ts.map +1 -1
- package/dist/nodes/text/richtext-node.js +5 -71
- package/dist/nodes/text/richtext-node.js.map +1 -1
- package/dist/nodes/text/text-base.d.ts +5 -22
- package/dist/nodes/text/text-base.d.ts.map +1 -1
- package/dist/nodes/text/text-base.js +12 -363
- package/dist/nodes/text/text-base.js.map +1 -1
- package/dist/nodes/text/text-layout.d.ts +87 -0
- package/dist/nodes/text/text-layout.d.ts.map +1 -0
- package/dist/nodes/text/text-layout.js +368 -0
- package/dist/nodes/text/text-layout.js.map +1 -0
- package/dist/nodes/three/canvas3d-node.d.ts +3 -1
- package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
- package/dist/nodes/three/canvas3d-node.js +6 -0
- package/dist/nodes/three/canvas3d-node.js.map +1 -1
- package/dist/runtime/clip-instance.d.ts +4 -1
- package/dist/runtime/clip-instance.d.ts.map +1 -1
- package/dist/runtime/clip-instance.js +17 -3
- package/dist/runtime/clip-instance.js.map +1 -1
- package/dist/runtime/clip-store.d.ts +9 -0
- package/dist/runtime/clip-store.d.ts.map +1 -1
- package/dist/runtime/clip-store.js +78 -0
- package/dist/runtime/clip-store.js.map +1 -1
- package/dist/runtime/node-picking.d.ts.map +1 -1
- package/dist/runtime/node-picking.js +6 -7
- package/dist/runtime/node-picking.js.map +1 -1
- package/dist/runtime/node-picking3d.d.ts +11 -4
- package/dist/runtime/node-picking3d.d.ts.map +1 -1
- package/dist/runtime/node-picking3d.js +5 -0
- package/dist/runtime/node-picking3d.js.map +1 -1
- package/dist/runtime/text-geometry.d.ts.map +1 -1
- package/dist/runtime/text-geometry.js +7 -3
- package/dist/runtime/text-geometry.js.map +1 -1
- package/dist/sdk/index.d.ts +35 -14
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +47 -42
- package/dist/sdk/index.js.map +1 -1
- package/dist/tween/command.d.ts +12 -0
- package/dist/tween/command.d.ts.map +1 -1
- package/dist/tween/command.js +14 -0
- package/dist/tween/command.js.map +1 -1
- package/package.json +6 -1
- package/dist/browser/chunks/chunk-FUZVFT3W.js +0 -18
- package/dist/browser/chunks/chunk-FUZVFT3W.js.map +0 -7
- package/dist/browser/chunks/chunk-QG6C23IJ.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-geometry.js","sourceRoot":"","sources":["../../src/runtime/text-geometry.ts"],"names":[],"mappings":"AAC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IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IACjF,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import { Node2D } from \"@/nodes/2d/node2d\";\r\nimport { Text } from \"@/nodes/text/text-node\";\r\nimport { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport { applyToPoint } from \"@/attributes/layout/matrix2d\";\r\nimport { caretCount, type TextBlockSource } from \"@/render/text-layout\";\r\nimport { renderMatrix } from \"./node-picking\";\r\n\r\n/**\r\n * Where a Text node's caret slots landed on screen — the measurement a host\r\n * needs to draw its own text cursor and selection over the rendered glyphs.\r\n *\r\n * **Space.** Viewport space, exactly as {@link NodeBox}: origin at the viewport\r\n * centre, y-up, viewport units, camera folded in. A caret and the selection box\r\n * around it therefore come out of the same walk and cannot disagree.\r\n *\r\n * **Why the host draws it.** Anything approximating glyph positions outside the\r\n * shaper — a DOM input laid over the canvas, say — drifts from the render the\r\n * moment the font, the line height or the wrapping does, and CSS `line-height`\r\n * and Skia's height multiplier are not the same quantity to begin with. Handing\r\n * over the real slots means the rendered text stays the thing being edited.\r\n */\r\nexport interface NodeTextLayout {\r\n /** Structural path of the node measured, as {@link NodeBox.path}. */\r\n path: string;\r\n /** The string the slots describe. */\r\n text: string;\r\n /**\r\n * Every caret slot, in offset order: `carets[i]` sits before character `i`,\r\n * and the last sits after the final character — so there are `text.length + 1`\r\n * of them, and a caret offset is always a valid index.\r\n *\r\n * Each is a *segment*, not a point, because a rotated node's cursor is a\r\n * rotated line: draw from `top` to `bottom`.\r\n */\r\n carets: TextCaret[];\r\n /**\r\n * Line ranges over caret offsets, for Home/End and vertical arrow keys. A\r\n * hard line break belongs to neither line, so `lines[n].end` and\r\n * `lines[n + 1].start` differ by one where the break is.\r\n */\r\n lines: { start: number; end: number }[];\r\n}\r\n\r\n/** One caret slot: the line an editor would draw for a cursor at this offset. */\r\nexport interface TextCaret {\r\n /** Character offset this slot sits before. */\r\n offset: number;\r\n /** Top and bottom of the cursor, viewport space. */\r\n top: Vector2;\r\n bottom: Vector2;\r\n}\r\n\r\n/** One line's worth of a selected range, as a quad in viewport space. */\r\nexport interface TextRangeQuad {\r\n topLeft: Vector2;\r\n topRight: Vector2;\r\n bottomRight: Vector2;\r\n bottomLeft: Vector2;\r\n}\r\n\r\n/**\r\n * Measure `node`'s caret slots in viewport space, or `null` when it has none to\r\n * report — not a {@link Text}, nothing shaped yet, or a shape the caret model\r\n * doesn't cover (see {@link RenderContext2D.layoutTextBlock}).\r\n *\r\n * The block-local layout comes from the backend, because that is where glyphs\r\n * are actually positioned; everything below is the same mapping\r\n * {@link nodeBox} applies to a node's corners.\r\n */\r\nexport function nodeTextLayout(\r\n node: Node2D,\r\n path: string,\r\n source: TextBlockSource,\r\n): NodeTextLayout | null {\r\n if (!(node instanceof Text)) return null;\r\n const block = source.layoutTextBlock(node._textState());\r\n if (!block) return null;\r\n\r\n const m = renderMatrix(node);\r\n // The block is laid out about the node's own origin — which is also where\r\n // `_localBounds` centres the box, and what `verticalAlign` offsets it from —\r\n // so a block-local offset is a node-local one, unshifted. Block coordinates are already canvas (y-down), which is\r\n // the space the matrix works in, so unlike `worldAnchors` (which takes y-up\r\n // corner offsets) only the *result* is flipped back to y-up viewport space.\r\n const at = (x: number, y: number): Vector2 => {\r\n const p = applyToPoint(m, { x, y });\r\n return { x: p.x, y: -p.y };\r\n };\r\n\r\n const carets: TextCaret[] = new Array(caretCount(block));\r\n const lines: { start: number; end: number }[] = [];\r\n for (const line of block.lines) {\r\n lines.push({ start: line.start, end: line.end });\r\n for (let i = 0; i < line.carets.length; i++) {\r\n const x = line.carets[i];\r\n carets[line.start + i] = {\r\n offset: line.start + i,\r\n top: at(x, line.top),\r\n bottom: at(x, line.bottom),\r\n };\r\n }\r\n }\r\n\r\n return { path, text: node.text, carets, lines };\r\n}\r\n\r\n/**\r\n * The caret offset nearest `point` (viewport space) — what a click or a drag\r\n * over the rendered text should place the cursor at.\r\n *\r\n * Nearest *slot*, by distance to the caret segment rather than to its midpoint:\r\n * a click below a short first line should land on that line's nearest slot, and\r\n * midpoints would pull it toward whichever line's centre happened to be closer.\r\n * Segment distance also keeps this correct for rotated and scaled text without\r\n * needing a separate case, since the slots arrive already transformed.\r\n */\r\nexport function caretOffsetAt(layout: NodeTextLayout, point: Vector2): number {\r\n let best = 0;\r\n let bestDistance = Infinity;\r\n for (const caret of layout.carets) {\r\n const d = distanceToSegment(point, caret.top, caret.bottom);\r\n if (d < bestDistance) {\r\n bestDistance = d;\r\n best = caret.offset;\r\n }\r\n }\r\n return best;\r\n}\r\n\r\n/**\r\n * The quads covering `[start, end)`, one per line the range touches — what a\r\n * host fills to draw a selection highlight.\r\n *\r\n * Per line rather than one box for the whole range, because a range spanning a\r\n * line break covers two disjoint areas and a single enclosing box would paint\r\n * over the gap between them.\r\n */\r\nexport function caretRangeQuads(\r\n layout: NodeTextLayout,\r\n start: number,\r\n end: number,\r\n): TextRangeQuad[] {\r\n const from = Math.max(0, Math.min(start, end));\r\n const to = Math.min(layout.carets.length - 1, Math.max(start, end));\r\n const quads: TextRangeQuad[] = [];\r\n for (const line of layout.lines) {\r\n const a = Math.max(from, line.start);\r\n const b = Math.min(to, line.end);\r\n if (a >= b) continue; // empty on this line\r\n const left = layout.carets[a];\r\n const right = layout.carets[b];\r\n quads.push({\r\n topLeft: left.top,\r\n topRight: right.top,\r\n bottomRight: right.bottom,\r\n bottomLeft: left.bottom,\r\n });\r\n }\r\n return quads;\r\n}\r\n\r\n/** Distance from `p` to the segment `a`–`b`. */\r\nfunction distanceToSegment(p: Vector2, a: Vector2, b: Vector2): number {\r\n const dx = b.x - a.x;\r\n const dy = b.y - a.y;\r\n const lengthSq = dx * dx + dy * dy;\r\n // A degenerate segment (a zero-height line box) is just a point.\r\n const t = lengthSq === 0\r\n ? 0\r\n : Math.max(0, Math.min(1, ((p.x - a.x) * dx + (p.y - a.y) * dy) / lengthSq));\r\n return Math.hypot(p.x - (a.x + t * dx), p.y - (a.y + t * dy));\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"text-geometry.js","sourceRoot":"","sources":["../../src/runtime/text-geometry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAwB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAuD9C;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAC1B,IAAY,EACZ,IAAY,EACZ,MAAuB;IAEvB,iFAAiF;IACjF,MAAM,KAAK,GAAG,IAAI,YAAY,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI,YAAY,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9G,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,IAAI,CAAC,KA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;AAClE,CAAC","sourcesContent":["import { Node2D } from \"@/nodes/2d/node2d\";\r\nimport { Text as TextClass } from \"@/nodes/text/text-node\";\r\nimport { Text } from \"@/component/builtins/text\";\r\nimport { textStateOf } from \"@/component/modules/text-layout\";\r\nimport { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport { applyToPoint } from \"@/attributes/layout/matrix2d\";\r\nimport { caretCount, type TextBlockSource } from \"@/render/text-layout\";\r\nimport { renderMatrix } from \"./node-picking\";\r\n\r\n/**\r\n * Where a Text node's caret slots landed on screen — the measurement a host\r\n * needs to draw its own text cursor and selection over the rendered glyphs.\r\n *\r\n * **Space.** Viewport space, exactly as {@link NodeBox}: origin at the viewport\r\n * centre, y-up, viewport units, camera folded in. A caret and the selection box\r\n * around it therefore come out of the same walk and cannot disagree.\r\n *\r\n * **Why the host draws it.** Anything approximating glyph positions outside the\r\n * shaper — a DOM input laid over the canvas, say — drifts from the render the\r\n * moment the font, the line height or the wrapping does, and CSS `line-height`\r\n * and Skia's height multiplier are not the same quantity to begin with. Handing\r\n * over the real slots means the rendered text stays the thing being edited.\r\n */\r\nexport interface NodeTextLayout {\r\n /** Structural path of the node measured, as {@link NodeBox.path}. */\r\n path: string;\r\n /** The string the slots describe. */\r\n text: string;\r\n /**\r\n * Every caret slot, in offset order: `carets[i]` sits before character `i`,\r\n * and the last sits after the final character — so there are `text.length + 1`\r\n * of them, and a caret offset is always a valid index.\r\n *\r\n * Each is a *segment*, not a point, because a rotated node's cursor is a\r\n * rotated line: draw from `top` to `bottom`.\r\n */\r\n carets: TextCaret[];\r\n /**\r\n * Line ranges over caret offsets, for Home/End and vertical arrow keys. A\r\n * hard line break belongs to neither line, so `lines[n].end` and\r\n * `lines[n + 1].start` differ by one where the break is.\r\n */\r\n lines: { start: number; end: number }[];\r\n}\r\n\r\n/** One caret slot: the line an editor would draw for a cursor at this offset. */\r\nexport interface TextCaret {\r\n /** Character offset this slot sits before. */\r\n offset: number;\r\n /** Top and bottom of the cursor, viewport space. */\r\n top: Vector2;\r\n bottom: Vector2;\r\n}\r\n\r\n/** One line's worth of a selected range, as a quad in viewport space. */\r\nexport interface TextRangeQuad {\r\n topLeft: Vector2;\r\n topRight: Vector2;\r\n bottomRight: Vector2;\r\n bottomLeft: Vector2;\r\n}\r\n\r\n/**\r\n * Measure `node`'s caret slots in viewport space, or `null` when it has none to\r\n * report — not a {@link Text}, nothing shaped yet, or a shape the caret model\r\n * doesn't cover (see {@link RenderContext2D.layoutTextBlock}).\r\n *\r\n * The block-local layout comes from the backend, because that is where glyphs\r\n * are actually positioned; everything below is the same mapping\r\n * {@link nodeBox} applies to a node's corners.\r\n */\r\nexport function nodeTextLayout(\r\n node: Node2D,\r\n path: string,\r\n source: TextBlockSource,\r\n): NodeTextLayout | null {\r\n // The class until the seal, and the component, whose state is what it last drew.\r\n const state = node instanceof TextClass ? node._textState() : node instanceof Text ? textStateOf(node) : null;\r\n if (!state) return null;\r\n const block = source.layoutTextBlock(state);\r\n if (!block) return null;\r\n\r\n const m = renderMatrix(node);\r\n // The block is laid out about the node's own origin — which is also where\r\n // `_localBounds` centres the box, and what `verticalAlign` offsets it from —\r\n // so a block-local offset is a node-local one, unshifted. Block coordinates are already canvas (y-down), which is\r\n // the space the matrix works in, so unlike `worldAnchors` (which takes y-up\r\n // corner offsets) only the *result* is flipped back to y-up viewport space.\r\n const at = (x: number, y: number): Vector2 => {\r\n const p = applyToPoint(m, { x, y });\r\n return { x: p.x, y: -p.y };\r\n };\r\n\r\n const carets: TextCaret[] = new Array(caretCount(block));\r\n const lines: { start: number; end: number }[] = [];\r\n for (const line of block.lines) {\r\n lines.push({ start: line.start, end: line.end });\r\n for (let i = 0; i < line.carets.length; i++) {\r\n const x = line.carets[i];\r\n carets[line.start + i] = {\r\n offset: line.start + i,\r\n top: at(x, line.top),\r\n bottom: at(x, line.bottom),\r\n };\r\n }\r\n }\r\n\r\n return { path, text: (node as unknown as { text: string }).text, carets, lines };\r\n}\r\n\r\n/**\r\n * The caret offset nearest `point` (viewport space) — what a click or a drag\r\n * over the rendered text should place the cursor at.\r\n *\r\n * Nearest *slot*, by distance to the caret segment rather than to its midpoint:\r\n * a click below a short first line should land on that line's nearest slot, and\r\n * midpoints would pull it toward whichever line's centre happened to be closer.\r\n * Segment distance also keeps this correct for rotated and scaled text without\r\n * needing a separate case, since the slots arrive already transformed.\r\n */\r\nexport function caretOffsetAt(layout: NodeTextLayout, point: Vector2): number {\r\n let best = 0;\r\n let bestDistance = Infinity;\r\n for (const caret of layout.carets) {\r\n const d = distanceToSegment(point, caret.top, caret.bottom);\r\n if (d < bestDistance) {\r\n bestDistance = d;\r\n best = caret.offset;\r\n }\r\n }\r\n return best;\r\n}\r\n\r\n/**\r\n * The quads covering `[start, end)`, one per line the range touches — what a\r\n * host fills to draw a selection highlight.\r\n *\r\n * Per line rather than one box for the whole range, because a range spanning a\r\n * line break covers two disjoint areas and a single enclosing box would paint\r\n * over the gap between them.\r\n */\r\nexport function caretRangeQuads(\r\n layout: NodeTextLayout,\r\n start: number,\r\n end: number,\r\n): TextRangeQuad[] {\r\n const from = Math.max(0, Math.min(start, end));\r\n const to = Math.min(layout.carets.length - 1, Math.max(start, end));\r\n const quads: TextRangeQuad[] = [];\r\n for (const line of layout.lines) {\r\n const a = Math.max(from, line.start);\r\n const b = Math.min(to, line.end);\r\n if (a >= b) continue; // empty on this line\r\n const left = layout.carets[a];\r\n const right = layout.carets[b];\r\n quads.push({\r\n topLeft: left.top,\r\n topRight: right.top,\r\n bottomRight: right.bottom,\r\n bottomLeft: left.bottom,\r\n });\r\n }\r\n return quads;\r\n}\r\n\r\n/** Distance from `p` to the segment `a`–`b`. */\r\nfunction distanceToSegment(p: Vector2, a: Vector2, b: Vector2): number {\r\n const dx = b.x - a.x;\r\n const dy = b.y - a.y;\r\n const lengthSq = dx * dx + dy * dy;\r\n // A degenerate segment (a zero-height line box) is just a point.\r\n const t = lengthSq === 0\r\n ? 0\r\n : Math.max(0, Math.min(1, ((p.x - a.x) * dx + (p.y - a.y) * dy) / lengthSq));\r\n return Math.hypot(p.x - (a.x + t * dx), p.y - (a.y + t * dy));\r\n}\r\n"]}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -7,30 +7,53 @@ export type { Theme, ColorTokens, Typography, TypographyPreset, } from '../proje
|
|
|
7
7
|
export type { NodeTime, AttachScope } from '../nodes/index.js';
|
|
8
8
|
export type { BoxBounds, Extents } from '../layout/index.js';
|
|
9
9
|
export type { ImageMeta, VideoMeta, AudioMeta, FontMeta, AssetMeta, AssetManifest, } from '../assets/index.js';
|
|
10
|
-
export { validateDocument, assertValidDocument, Registry,
|
|
10
|
+
export { validateDocument, assertValidDocument, Registry, } from '../document/index.js';
|
|
11
11
|
export { normalizeShaderPack, resolveShaderProperties, isKnownShaderProperty, } from '../attributes/index.js';
|
|
12
12
|
export type { RegistryOptions, NodeTypeMap, ShaderPackMap, NodeTypeRecord, NodeCommandEntry, VisualDocument, ClipDocument, StillDocument, CompositionDocument, AudioDocument, NodeSpec, TimedNodeSpec, NodeSpan, CommandSpec, EaseSpec, LoopSpec, LoopDirection, VariableSpec, ValidationIssue, ValidationResult, NodeConstructor, CommandFactory, CommandTypeEntry, VariableCommandFactory, VariableLerp, VariableTarget, } from '../document/index.js';
|
|
13
13
|
export type { Shader, FillShader, EffectShader, ShaderProperty, KnownShaderProperty, ShaderPropertyValues, } from '../attributes/index.js';
|
|
14
14
|
export { expressionOps, ExpressionError } from '../document/index.js';
|
|
15
15
|
export type { ParsedExpression, ExpressionNode, ExpressionDialect, VariableResolver, } from '../document/index.js';
|
|
16
|
-
export {
|
|
16
|
+
export { component2d } from '../component/component2d.js';
|
|
17
|
+
export { componentAudio } from '../component/component-audio.js';
|
|
18
|
+
export { component3d } from '../component/component3d.js';
|
|
19
|
+
export { commandsFor } from '../component/commands-for.js';
|
|
20
|
+
export { Types } from '../component/types.js';
|
|
21
|
+
export { provides } from '../component/api.js';
|
|
22
|
+
export * as Paint from '../component/modules/paint.js';
|
|
23
|
+
export * as Flow from '../component/modules/flow.js';
|
|
24
|
+
export * as Shapes from '../component/modules/shapes.js';
|
|
25
|
+
export * as Aim from '../component/modules/aim.js';
|
|
26
|
+
export * as Typeface from '../component/modules/text-style.js';
|
|
27
|
+
export * as TextLayout from '../component/modules/text-layout.js';
|
|
28
|
+
export * as Material from '../component/modules/material.js';
|
|
29
|
+
export * as View3D from '../component/modules/view3d.js';
|
|
30
|
+
export type { Attribute, EntryOptions, NumberOptions, TextOptions } from '../component/types.js';
|
|
31
|
+
export type { Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader, Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, SoundOptions, StateSpec, Timeline, Type, Values, Writes, Merge, RenderContext2D as RenderContext, CallProps3D, Placement3DProps, Transform3DState, Handle, LayoutBox, NodeFrame, RenderContext3D as SceneContext, } from '../component/api.js';
|
|
32
|
+
export type { Node, Node2D } from '../nodes/index.js';
|
|
33
|
+
export { Canvas2D, findNode2D, frameIn, } from '../nodes/index.js';
|
|
34
|
+
export { Provider, ThemeProvider } from '../component/builtins/providers.js';
|
|
17
35
|
export type { NodeProps, Node2DProps, ChildPlacement, ChildPlane, NodeHandle, Canvas2DProps, NodeConfig, NodeChildren, NodeDimension, ProviderProps, ThemeProviderProps, } from '../nodes/index.js';
|
|
18
|
-
export {
|
|
36
|
+
export { Rect, Ellipse, Path, PathShape, Polygon, Polygram, Triangle, RightTriangle, Pentagon, Hexagon, Octagon, Star, } from '../component/builtins/geometry.js';
|
|
37
|
+
export { BooleanGroup, MaskGroup } from '../component/builtins/composite.js';
|
|
19
38
|
export type { PaintProps, ShapeProps, RectProps, FlexSize, EllipseProps, PathProps, PathShapeProps, PolygonProps, PolygramProps, BooleanGroupProps, MaskGroupProps, } from '../nodes/index.js';
|
|
20
39
|
export type { BooleanOperation, MaskMode, MaskOptions, } from '../attributes/index.js';
|
|
21
|
-
export { Camera, OrbitCamera, RotatedBox, } from '../
|
|
40
|
+
export { Camera, OrbitCamera, RotatedBox, } from '../component/builtins/layout.js';
|
|
22
41
|
export type { CameraProps, OrbitCameraProps, } from '../nodes/index.js';
|
|
23
|
-
export {
|
|
24
|
-
export
|
|
42
|
+
export { Text, RichText, NumberNode, DefaultTextStyle } from '../component/builtins/text.js';
|
|
43
|
+
export { TextSelection } from '../nodes/index.js';
|
|
44
|
+
export type { TextProps, RichTextProps, NumberProps, NumberFormat, DefaultTextStyleProps, TextSelectionProps, TextRange, SelectionOverrides, } from '../nodes/index.js';
|
|
25
45
|
export { textOps } from '../attributes/index.js';
|
|
26
46
|
export type { TextStyle, TextAlign, VerticalAlign, TextDecoration, TextCase, TextSpan, TextRun, FontStyle, } from '../attributes/index.js';
|
|
27
|
-
export { Video
|
|
28
|
-
export type { VideoProps, } from '../nodes/index.js';
|
|
29
|
-
export { NodeAudio
|
|
47
|
+
export { Video } from '../component/builtins/media.js';
|
|
48
|
+
export type { VideoProps, VideoSegment, } from '../nodes/index.js';
|
|
49
|
+
export type { NodeAudio } from '../nodes/index.js';
|
|
50
|
+
export { AudioBus, SoundNode } from '../component/builtins/audio.js';
|
|
30
51
|
export { Sound, AudioFilters, ramp, hold, fadeIn, fadeOut, isCurve, } from '../attributes/index.js';
|
|
31
52
|
export type { NodeAudioProps, AudioBusProps, SoundNodeProps, } from '../nodes/index.js';
|
|
32
53
|
export type { SoundProps, AudioRequest, AudioScope, AudioClip, AudioBusStop, AudioFilter, Param, Curve, } from '../attributes/index.js';
|
|
33
|
-
export { Canvas3D
|
|
54
|
+
export { Canvas3D } from '../component/builtins/canvas3d.js';
|
|
55
|
+
export type { Node3D } from '../nodes/index.js';
|
|
56
|
+
export { Group3D, Mesh3D, Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D, Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D, Instances3D, Points3D, Line3D, Sprite3D, Model3D, AmbientLight3D, HemisphereLight3D, DirectionalLight3D, PointLight3D, SpotLight3D, AreaLight3D, Camera3D, Fog3D, Environment3D, } from '../component/builtins/three.js';
|
|
34
57
|
export { Graphics3D, Scene3D, RenderContext3D, Geo, Mat, Tex, lerpVector3, lerpEuler3, slerpQuaternion, quaternionFromEuler, normalizeQuaternion, resolveVector3, evaluateParametric, evaluateRoundedBox, resolveSurfaceSource, resolveFill3D, segmentsOf, resolveCameraPlacement, resolveShadows3D, shadowCasts, shadowReceives, } from '../render3d/index.js';
|
|
35
58
|
export type { Canvas3DProps, ChildSpace3D, Node3DProps, Group3DProps, Mesh3DProps, Material3DProps, Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps, Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps, Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps, Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps, AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps, PointLight3DProps, SpotLight3DProps, AreaLight3DProps, Camera3DProps, Fog3DProps, Environment3DProps, } from '../nodes/index.js';
|
|
36
59
|
export type { Node3DRenderState, Graphics3DOp, Scene3DOp, Vector3, Vector3Input, Euler3, EulerOrder, Quaternion, Transform3D, Shadow3D, ShadowOptions3D, Faces3D, Blend3D, Shading3D, Segments3D, Sweep3D, Bevel3D, Fill3D, Geometry3D, BufferGeometry3D, Material3D, MaterialCommon3D, MeshShorthand3D, MaterialShorthand3D, Uniform3D, Texture3D, TextureOptions3D, SurfaceTexture3D, SurfaceSource3D, ResolvedSurfaceSource, LightData3D, CameraData3D, FogData3D, EnvironmentData3D, Shadows3D, ShadowSettings3D, ToneMapping3D, ToneSettings3D, PostEffect3D, LineMode3D, LineStroke3D, ModelAnimation3D, } from '../render3d/index.js';
|
|
@@ -40,7 +63,7 @@ export type { AssetScope, LoaderFn } from '../assets/index.js';
|
|
|
40
63
|
export { Fills, parseColor, resolveFill, fillOps, colorOps, } from '../attributes/index.js';
|
|
41
64
|
export type { Fill, FillChain, FillOptions, VideoFillOptions, MediaPlacementOptions, ImageFit, ImageCrop, ImageMatrix, FillResolved, ShaderFillProp, ShaderFillResolved, ShaderFillCoords, ShaderTexture, SkSLUniformRecord, FractalNoiseBasis, Color, NormalizedColor, BlendMode, FillSpace, } from '../attributes/index.js';
|
|
42
65
|
export { resolveStroke, strokeOps, resolveShadow, shadowOps, resolveCorners, cornerRadiusOps, cornerStyleOps, pathOps, } from '../attributes/index.js';
|
|
43
|
-
export type { PathSampler, PathAnchor, PathSubpath, VectorPath, Stroke, StrokeProp, StrokeAlign, StrokeCap, StrokeMarker, StrokeEnd, StrokeJoin, StrokeResolved, Shadow, ShadowProp, ShadowResolved, Corners, CornerStyle, CornerStyleResolved, CornerRadiusResolved, NodeEffect, } from '../attributes/index.js';
|
|
66
|
+
export type { PathSampler, PathAnchor, PathSubpath, VectorPath, Stroke, StrokeProp, StrokeAlign, StrokeCap, StrokeMarker, StrokeEnd, StrokeJoin, StrokeResolved, Shadow, ShadowProp, ShadowResolved, Corners, CornerStyle, CornerStyleResolved, CornerRadiusResolved, RectCornerRadius, RectCornerStyle, NodeEffect, } from '../attributes/index.js';
|
|
44
67
|
export { lerpVector2, sizeInputOps, insetsOps, alignmentOps, } from '../attributes/index.js';
|
|
45
68
|
export { flowOps } from '../layout/index.js';
|
|
46
69
|
export type { Vector2, Size2D, Insets, InsetsProps, InsetsResolved, AlignmentKey, Alignment, } from '../attributes/index.js';
|
|
@@ -75,12 +98,10 @@ export type { BlurFilterOptions, GrayscaleFilterOptions, AlphaFilterOptions, Exp
|
|
|
75
98
|
export type { BlurEffect, DirectionalBlurEffect, GrayscaleEffect, PixelateEffect, BulgeEffect, MagnifyEffect, BloomEffect, VintageEffect, ChromaticAberrationEffect, InvertEffect, InvertChannel, ScatterEffect, PosterizeEffect, MotionBlurEffect, MotionBlurAlignment, ShaderEffect, SkSLUniform, SkSLUniformValue, OutlineEffect, OutlinePosition, VignetteEffect, GrainEffect, SharpenEffect, EdgesEffect, EdgeKernel, ThresholdEffect, RadialBlurEffect, RadialBlurStyle, HalftoneEffect, HalftoneShape, HalftoneSeparation, DitherEffect, DitherMatrix, DuotoneEffect, CurvesEffect, ColorAdjustmentEffect, RgbShiftEffect, ScanlinesEffect, BlockDisplaceEffect, BitCrushEffect, BitCrushPalette, AsciiEffect, AsciiCharset, StreakEffect, GlowEffect, GlowChannel, GlowLoopStyle, GlowOriginal, GlowTint, OilPaintEffect, WaveEffect, WaveShape, TwirlEffect, ProgressiveBlurEffect, ProgressiveBlurShape, KaleidoscopeEffect, GlassEffect, LutEffect, } from '../attributes/index.js';
|
|
76
99
|
export { lerpNumber, } from '../tween/index.js';
|
|
77
100
|
export type { AnimationTarget, Steppable, TweenStepper, LerpFunction, TweenOptions, } from '../tween/index.js';
|
|
78
|
-
export {
|
|
101
|
+
export { getCommandMeta, isCommand, makeCommand, commandSequence, commandParallel, loopCommand, } from '../tween/index.js';
|
|
79
102
|
export type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween/index.js';
|
|
80
103
|
export { linear, easeIn, easeOut, easeInOut } from '../tween/index.js';
|
|
81
104
|
export type { EasingFunction, EaseParams, StandardEase } from '../tween/index.js';
|
|
82
|
-
export { property, fillProperty, strokeProperty, shadowProperty, effectsProperty, colorProperty, cornerRadiusProperty, cornerStyleProperty, pathProperty, insetsProperty, alignmentProperty, vector2Property, sizeProperty, textProperty, } from '../attributes/index.js';
|
|
83
|
-
export type { PropOptions, AttributePropOptions, } from '../attributes/index.js';
|
|
84
105
|
export { createRef, clamp, generateList, createContext, ContextMap, Random, SeedGenerator, parseCSV, parseData, } from '../util/index.js';
|
|
85
106
|
export type { Reference, RefTarget, Context, DataRecord, ParseCSVOptions, } from '../util/index.js';
|
|
86
107
|
export { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement.js';
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACR,eAAe,EACf,KAAK,GACR,MAAM,aAAa,CAAC;AAKrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EACR,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,GACnB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACtD,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpD,YAAY,EACR,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,aAAa,GAChB,MAAM,WAAW,CAAC;AAUnB,OAAO,EACH,gBAAgB,EAChB,mBAAmB,EAInB,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACR,eAAe,EACf,KAAK,GACR,MAAM,aAAa,CAAC;AAKrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY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B,YAAY,EACR,cAAc,EACd,UAAU,EACV,YAAY,EACf,MAAM,UAAU,CAAC;AAKlB,OAAO,EACH,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AACjB,YAAY,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,UAAU,EACV,eAAe,GAClB,MAAM,SAAS,CAAC;AAejB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChG,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,OAAO,EACP,iBAAiB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,YAAY,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACR,SAAS,GACZ,MAAM,YAAY,CAAC;AACpB,gEAAgE;AAChE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/sdk/index.js
CHANGED
|
@@ -24,18 +24,16 @@ export { placeTracks } from '../runtime/placement.js';
|
|
|
24
24
|
// =============================================================
|
|
25
25
|
// The clip document
|
|
26
26
|
//
|
|
27
|
-
// The data half of the model.
|
|
28
|
-
// which is also where a custom node joins the system — and
|
|
29
|
-
// plain JSON: which nodes exist, what props they carry, and
|
|
30
|
-
// over time.
|
|
27
|
+
// The data half of the model. Node types are code — a component registered
|
|
28
|
+
// under its key, which is also where a custom node joins the system — and
|
|
29
|
+
// everything else is plain JSON: which nodes exist, what props they carry, and
|
|
30
|
+
// what happens to them over time.
|
|
31
31
|
// =============================================================
|
|
32
32
|
export { validateDocument, assertValidDocument,
|
|
33
33
|
// The code half of the model, as one object an engine owns. Not a
|
|
34
34
|
// singleton: what a document can name is a property of the registry
|
|
35
35
|
// compiling it, so two engines in one process disagree freely.
|
|
36
|
-
Registry,
|
|
37
|
-
// A node built on a general one drops what it inherits and has no use for.
|
|
38
|
-
withdraw, } from '../document/index.js';
|
|
36
|
+
Registry, } from '../document/index.js';
|
|
39
37
|
// The shader-pack vocabulary lives beside the rest of the fill/shader attribute
|
|
40
38
|
// machinery, not in `../document`.
|
|
41
39
|
export { normalizeShaderPack, resolveShaderProperties, isKnownShaderProperty, } from '../attributes/index.js';
|
|
@@ -44,48 +42,63 @@ export { normalizeShaderPack, resolveShaderProperties, isKnownShaderProperty, }
|
|
|
44
42
|
// complete or rewrite one without reimplementing the grammar.
|
|
45
43
|
export { expressionOps, ExpressionError } from '../document/index.js';
|
|
46
44
|
// =============================================================
|
|
47
|
-
//
|
|
45
|
+
// Components — the factories a node type is written with
|
|
48
46
|
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
|
|
47
|
+
// A component is one object literal: `key`, `state`, `commands`, `children`
|
|
48
|
+
// and its tree's own fields (`measure`/`layout`/`render` for 2D). Behaviour is
|
|
49
|
+
// spread in from modules (`...Paint.state`, `...Paint.commands`) and their
|
|
50
|
+
// helpers called (`Paint.draw`, `Flow.measure`). See
|
|
51
|
+
// `experiments/component-syntax/README.md`.
|
|
52
|
+
// =============================================================
|
|
53
|
+
export { component2d } from '../component/component2d.js';
|
|
54
|
+
export { componentAudio } from '../component/component-audio.js';
|
|
55
|
+
export { component3d } from '../component/component3d.js';
|
|
56
|
+
export { commandsFor } from '../component/commands-for.js';
|
|
57
|
+
export { Types } from '../component/types.js';
|
|
58
|
+
export { provides } from '../component/api.js';
|
|
59
|
+
export * as Paint from '../component/modules/paint.js';
|
|
60
|
+
export * as Flow from '../component/modules/flow.js';
|
|
61
|
+
export * as Shapes from '../component/modules/shapes.js';
|
|
62
|
+
export * as Aim from '../component/modules/aim.js';
|
|
63
|
+
// The face text is set in: its entries inherit from the nearest provider.
|
|
64
|
+
export * as Typeface from '../component/modules/text-style.js';
|
|
65
|
+
export * as TextLayout from '../component/modules/text-layout.js';
|
|
66
|
+
// A mesh's surface: the material entries, and the mesh drawn with them.
|
|
67
|
+
export * as Material from '../component/modules/material.js';
|
|
68
|
+
// A viewport onto 3D children: the default camera and lights, the grid, the render settings.
|
|
69
|
+
export * as View3D from '../component/modules/view3d.js';
|
|
70
|
+
export {
|
|
54
71
|
// A clip's root container: layout frame, background paint and camera in
|
|
55
72
|
// one node. Every track builds into one sized to the viewport.
|
|
56
|
-
Canvas2D,
|
|
73
|
+
Canvas2D,
|
|
57
74
|
// Reaching another node by the id a `nodeRef` prop holds, and reading where it sits.
|
|
58
75
|
findNode2D, frameIn, } from '../nodes/index.js';
|
|
76
|
+
export { Provider, ThemeProvider } from '../component/builtins/providers.js';
|
|
59
77
|
// =============================================================
|
|
60
78
|
// Nodes — Geometry
|
|
61
79
|
// =============================================================
|
|
62
|
-
export {
|
|
80
|
+
export { Rect, Ellipse, Path,
|
|
63
81
|
// The document's `"path"`: its `data` is in the unit space of its own box,
|
|
64
82
|
// where `Path` draws its `d` at face value.
|
|
65
|
-
PathShape, Polygon, Polygram,
|
|
83
|
+
PathShape, Polygon, Polygram, Triangle, RightTriangle, Pentagon, Hexagon, Octagon, Star, } from '../component/builtins/geometry.js';
|
|
84
|
+
export { BooleanGroup, MaskGroup } from '../component/builtins/composite.js';
|
|
66
85
|
// =============================================================
|
|
67
86
|
// Nodes — Layout
|
|
68
87
|
// =============================================================
|
|
69
88
|
export { Camera,
|
|
70
89
|
// The stage's 2.5D camera for one subtree: its children orbited in depth.
|
|
71
|
-
OrbitCamera, RotatedBox, } from '../
|
|
90
|
+
OrbitCamera, RotatedBox, } from '../component/builtins/layout.js';
|
|
72
91
|
// =============================================================
|
|
73
92
|
// Nodes — Text
|
|
74
93
|
// =============================================================
|
|
75
|
-
export {
|
|
94
|
+
export { Text, RichText, NumberNode, DefaultTextStyle } from '../component/builtins/text.js';
|
|
95
|
+
export { TextSelection } from '../nodes/index.js';
|
|
76
96
|
export { textOps } from '../attributes/index.js';
|
|
77
97
|
// =============================================================
|
|
78
98
|
// Nodes — Media
|
|
79
99
|
// =============================================================
|
|
80
|
-
export { Video
|
|
81
|
-
|
|
82
|
-
// Nodes — Audio
|
|
83
|
-
// =============================================================
|
|
84
|
-
// `SoundNode` plays a clip and `AudioBus` groups what feeds it — the third
|
|
85
|
-
// scene graph, beside `Node2D` and `Node3D`. Levels are `Param`, so a fade is a
|
|
86
|
-
// curve (`fadeIn`/`fadeOut`/`ramp`/`hold`) rather than a `to()`: sound is
|
|
87
|
-
// scheduled once, ahead of time, not written once per frame.
|
|
88
|
-
export { NodeAudio, AudioBus, SoundNode, } from '../nodes/index.js';
|
|
100
|
+
export { Video } from '../component/builtins/media.js';
|
|
101
|
+
export { AudioBus, SoundNode } from '../component/builtins/audio.js';
|
|
89
102
|
export { Sound, AudioFilters, ramp, hold, fadeIn, fadeOut, isCurve, } from '../attributes/index.js';
|
|
90
103
|
// =============================================================
|
|
91
104
|
// 3D — the Canvas3D node and the Graphics3D API
|
|
@@ -95,9 +108,9 @@ export { Sound, AudioFilters, ramp, hold, fadeIn, fadeOut, isCurve, } from '../a
|
|
|
95
108
|
// are what make a Vector3/Euler/Quaternion prop interpolate rather than snap.
|
|
96
109
|
// `Surface2D` is the 2D→3D bridge: a child of `Canvas3D` whose 2D content is
|
|
97
110
|
// rasterized offscreen and bound to a material by `Tex.surface(name)`.
|
|
98
|
-
export { Canvas3D
|
|
99
|
-
// The 3D scene graph
|
|
100
|
-
|
|
111
|
+
export { Canvas3D } from '../component/builtins/canvas3d.js';
|
|
112
|
+
// The 3D scene graph: components, each placed by its transform.
|
|
113
|
+
export { Group3D, Mesh3D, Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D, Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D, Instances3D, Points3D, Line3D, Sprite3D, Model3D, AmbientLight3D, HemisphereLight3D, DirectionalLight3D, PointLight3D, SpotLight3D, AreaLight3D, Camera3D, Fog3D, Environment3D, } from '../component/builtins/three.js';
|
|
101
114
|
export { Graphics3D, Scene3D, RenderContext3D, Geo, Mat, Tex, lerpVector3, lerpEuler3, slerpQuaternion, quaternionFromEuler, normalizeQuaternion, resolveVector3, evaluateParametric, evaluateRoundedBox, resolveSurfaceSource, resolveFill3D, segmentsOf, resolveCameraPlacement, resolveShadows3D, shadowCasts, shadowReceives, } from '../render3d/index.js';
|
|
102
115
|
// =============================================================
|
|
103
116
|
// Rendering — Graphics2D builder, RenderContext2D & asset declaration
|
|
@@ -152,28 +165,20 @@ export { lerpNumber, } from '../tween/index.js';
|
|
|
152
165
|
// An animation as a **value** rather than as control flow: a declared duration
|
|
153
166
|
// plus `at(t)`, so a host can ask what it looks like at a time instead of
|
|
154
167
|
// running it to one. That is what lets a host place one on a timeline, and what
|
|
155
|
-
// makes a scene scrub in constant time rather than replay.
|
|
156
|
-
//
|
|
157
|
-
//
|
|
168
|
+
// makes a scene scrub in constant time rather than replay. A component's
|
|
169
|
+
// `commands` return one, and the command registry — and a host listing what a
|
|
170
|
+
// node can do — reads them.
|
|
158
171
|
//
|
|
159
172
|
// One command shape, always: `node.to(a, 1)` is a single command, not a builder
|
|
160
173
|
// you can append to. Two of them are sequenced by where they sit on the
|
|
161
174
|
// timeline, which is what makes a scene's shape editable rather than implied by
|
|
162
175
|
// the order of calls in a function body.
|
|
163
|
-
export {
|
|
176
|
+
export { getCommandMeta, isCommand, makeCommand, commandSequence, commandParallel, loopCommand, } from '../tween/index.js';
|
|
164
177
|
// =============================================================
|
|
165
178
|
// Animation — Easing
|
|
166
179
|
// =============================================================
|
|
167
180
|
export { linear, easeIn, easeOut, easeInOut } from '../tween/index.js';
|
|
168
181
|
// =============================================================
|
|
169
|
-
// Node Property Decorators
|
|
170
|
-
// =============================================================
|
|
171
|
-
export { property,
|
|
172
|
-
// Attribute-typed variants: `@property` with the mapper/tween pair for a
|
|
173
|
-
// known attribute already filled in, so a custom node declares a paint or
|
|
174
|
-
// layout prop without importing the resolver/lerp pair behind it.
|
|
175
|
-
fillProperty, strokeProperty, shadowProperty, effectsProperty, colorProperty, cornerRadiusProperty, cornerStyleProperty, pathProperty, insetsProperty, alignmentProperty, vector2Property, sizeProperty, textProperty, } from '../attributes/index.js';
|
|
176
|
-
// =============================================================
|
|
177
182
|
// Utilities
|
|
178
183
|
// =============================================================
|
|
179
184
|
export { createRef, clamp, generateList, createContext, ContextMap, Random, SeedGenerator, parseCSV, parseData, } from '../util/index.js';
|
package/dist/sdk/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,gFAAgF;AAChF,wEAAwE;AACxE,gFAAgF;AAChF,+EAA+E;AAC/E,6EAA6E;AAC7E,oCAAoC;AAEpC,gEAAgE;AAChE,UAAU;AACV,EAAE;AACF,4EAA4E;AAC5E,yEAAyE;AACzE,iFAAiF;AACjF,iFAAiF;AACjF,sDAAsD;AACtD,gEAAgE;AAChE,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AAKrB,iFAAiF;AACjF,4EAA4E;AAC5E,0EAA0E;AAC1E,0DAA0D;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA2BnD,gEAAgE;AAChE,oBAAoB;AACpB,EAAE;AACF,+EAA+E;AAC/E,8EAA8E;AAC9E,iFAAiF;AACjF,aAAa;AACb,gEAAgE;AAChE,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C","sourcesContent":["// The curated public surface published as `@motionscript/sdk` (packages/sdk) and,\r\n// via this file, as `@motionscript/core/sdk`. A deliberate SUBSET of core's own\r\n// root barrel (`../index.ts`): no `Engine`/`Session`/platform seams, no\r\n// `@internal`-tagged descriptor plumbing. Every export here is named, traced to\r\n// its real declaring sub-barrel — never a wildcard — so nothing internal leaks\r\n// by accident. Keep this in lockstep with `packages/sdk/src/index.ts`, which\r\n// mirrors this exact named surface.\r\n\r\n// =============================================================\r\n// Project\r\n//\r\n// A clip is **data**: a still is nodes and props, a composition is the same\r\n// nodes placed in time plus the commands that animate them, and an audio\r\n// document is that one tree over. A **project** is one list of tracks over those\r\n// clips, and it is what the runtime plays — a lone still or composition is sugar\r\n// for a project with one track (`asProjectDocument`).\r\n// =============================================================\r\nexport {\r\n isProjectDocument,\r\n asProjectDocument,\r\n documentDuration,\r\n commandSpan,\r\n hasTimeline,\r\n nodeSpan,\r\n effectiveSpan,\r\n untimed,\r\n ROOT_NODE_ID,\r\n} from '../document';\r\nexport type {\r\n ProjectDocument,\r\n Track,\r\n} from '../document';\r\n// `resolveProjectDocument`/`placeTracks` genuinely live in `../runtime` (session\r\n// resolution and track placement are runtime concerns) — deep-imported from\r\n// their concrete files rather than the runtime barrel, which also carries\r\n// `Engine`/`Session` and is never a source for this file.\r\nexport { resolveProjectDocument } from '../runtime/session';\r\nexport { placeTracks } from '../runtime/placement';\r\nexport type { TrackSpan } from '../runtime/placement';\r\nexport type {\r\n Theme,\r\n ColorTokens,\r\n Typography,\r\n TypographyPreset,\r\n} from '../project';\r\nexport type { NodeTime, AttachScope } from '../nodes';\r\nexport type { BoxBounds, Extents } from '../layout';\r\n\r\n// =============================================================\r\n// Assets\r\n//\r\n// The manifest a host builds a scene against — what images, video, audio and\r\n// fonts it references, resolved before render. An `Engine`'s manifest and\r\n// `@motionscript/headless`'s asset options both take this shape.\r\n// =============================================================\r\nexport type {\r\n ImageMeta,\r\n VideoMeta,\r\n AudioMeta,\r\n FontMeta,\r\n AssetMeta,\r\n AssetManifest,\r\n} from '../assets';\r\n\r\n// =============================================================\r\n// The clip document\r\n//\r\n// The data half of the model. Nodes are code — a class registered under a key,\r\n// which is also where a custom node joins the system — and everything else is\r\n// plain JSON: which nodes exist, what props they carry, and what happens to them\r\n// over time.\r\n// =============================================================\r\nexport {\r\n validateDocument,\r\n assertValidDocument,\r\n // The code half of the model, as one object an engine owns. Not a\r\n // singleton: what a document can name is a property of the registry\r\n // compiling it, so two engines in one process disagree freely.\r\n Registry,\r\n node,\r\n // A node built on a general one drops what it inherits and has no use for.\r\n withdraw,\r\n} from '../document';\r\n// The shader-pack vocabulary lives beside the rest of the fill/shader attribute\r\n// machinery, not in `../document`.\r\nexport {\r\n normalizeShaderPack,\r\n resolveShaderProperties,\r\n isKnownShaderProperty,\r\n} from '../attributes';\r\nexport type {\r\n RegistryOptions,\r\n NodeTypeMap,\r\n ShaderPackMap,\r\n NodeTypeRecord,\r\n NodeCommandEntry,\r\n VisualDocument,\r\n ClipDocument,\r\n StillDocument,\r\n CompositionDocument,\r\n AudioDocument,\r\n NodeSpec,\r\n TimedNodeSpec,\r\n NodeSpan,\r\n CommandSpec,\r\n EaseSpec,\r\n LoopSpec,\r\n LoopDirection,\r\n VariableSpec,\r\n ValidationIssue,\r\n ValidationResult,\r\n NodeConstructor,\r\n CommandFactory,\r\n CommandTypeEntry,\r\n VariableCommandFactory,\r\n VariableLerp,\r\n VariableTarget,\r\n} from '../document';\r\nexport type {\r\n Shader,\r\n FillShader,\r\n EffectShader,\r\n ShaderProperty,\r\n KnownShaderProperty,\r\n ShaderPropertyValues,\r\n} from '../attributes';\r\n\r\n// Expressions: the string form of a prop that follows a variable — `\"=4[g]+3\"`.\r\n// `expressionOps` carries recognition, parsing and compiling, so a host can lint,\r\n// complete or rewrite one without reimplementing the grammar.\r\nexport { expressionOps, ExpressionError } from '../document';\r\nexport type {\r\n ParsedExpression,\r\n ExpressionNode,\r\n ExpressionDialect,\r\n VariableResolver,\r\n} from '../document';\r\n\r\n// =============================================================\r\n// Node & Provider — the base scene-graph primitives\r\n//\r\n// `Node` is dimension-agnostic (tree, props, tweens, context, clock); `Node2D`\r\n// adds layout and 2D drawing, and is what a custom 2D node extends. `Node3D` and\r\n// its subclasses live in the 3D section below.\r\n// =============================================================\r\nexport {\r\n Node,\r\n Node2D,\r\n // A clip's root container: layout frame, background paint and camera in\r\n // one node. Every track builds into one sized to the viewport.\r\n Canvas2D,\r\n Provider,\r\n ThemeProvider,\r\n // Reaching another node by the id a `nodeRef` prop holds, and reading where it sits.\r\n findNode2D,\r\n frameIn,\r\n} from '../nodes';\r\nexport type {\r\n NodeProps,\r\n Node2DProps,\r\n // A slot a layout puts each child in beyond its box — see `Node2D._placementOf`.\r\n ChildPlacement,\r\n // A parent's own coordinates for its children's `x`/`y` — see `Node2D._planeOf`.\r\n ChildPlane,\r\n // A point an editor can drag to set a `Vector2` prop — see `Node2D._handles`.\r\n NodeHandle,\r\n Canvas2DProps,\r\n NodeConfig,\r\n NodeChildren,\r\n NodeDimension,\r\n ProviderProps,\r\n ThemeProviderProps,\r\n} from '../nodes';\r\n\r\n// =============================================================\r\n// Nodes — Geometry\r\n// =============================================================\r\nexport {\r\n PaintNode,\r\n ShapeNode,\r\n Rect,\r\n Ellipse,\r\n Path,\r\n // The document's `\"path\"`: its `data` is in the unit space of its own box,\r\n // where `Path` draws its `d` at face value.\r\n PathShape,\r\n Polygon,\r\n Polygram,\r\n BooleanGroup,\r\n MaskGroup,\r\n} from '../nodes';\r\nexport type {\r\n PaintProps,\r\n ShapeProps,\r\n RectProps,\r\n FlexSize,\r\n EllipseProps,\r\n PathProps,\r\n PathShapeProps,\r\n PolygonProps,\r\n PolygramProps,\r\n BooleanGroupProps,\r\n MaskGroupProps,\r\n} from '../nodes';\r\n// The operation/mode vocabularies behind `Boolean`/`Mask` are attribute types,\r\n// not node-prop types.\r\nexport type {\r\n BooleanOperation,\r\n MaskMode,\r\n MaskOptions,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Nodes — Layout\r\n// =============================================================\r\nexport {\r\n Camera,\r\n // The stage's 2.5D camera for one subtree: its children orbited in depth.\r\n OrbitCamera,\r\n RotatedBox,\r\n} from '../nodes';\r\nexport type {\r\n CameraProps,\r\n OrbitCameraProps,\r\n} from '../nodes';\r\n\r\n// =============================================================\r\n// Nodes — Text\r\n// =============================================================\r\nexport {\r\n TextBase,\r\n Text,\r\n RichText,\r\n NumberNode,\r\n DefaultTextStyle,\r\n TextSelection,\r\n} from '../nodes';\r\nexport type {\r\n TextBaseProps,\r\n TextProps,\r\n RichTextProps,\r\n NumberProps,\r\n NumberFormat,\r\n DefaultTextStyleProps,\r\n TextSelectionProps,\r\n TextRange,\r\n SelectionOverrides,\r\n} from '../nodes';\r\nexport { textOps } from '../attributes';\r\nexport type {\r\n TextStyle,\r\n TextAlign,\r\n VerticalAlign,\r\n TextDecoration,\r\n TextCase,\r\n TextSpan,\r\n TextRun,\r\n FontStyle,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Nodes — Media\r\n// =============================================================\r\nexport {\r\n Video,\r\n} from '../nodes';\r\nexport type {\r\n VideoProps,\r\n} from '../nodes';\r\n\r\n// =============================================================\r\n// Nodes — Audio\r\n// =============================================================\r\n// `SoundNode` plays a clip and `AudioBus` groups what feeds it — the third\r\n// scene graph, beside `Node2D` and `Node3D`. Levels are `Param`, so a fade is a\r\n// curve (`fadeIn`/`fadeOut`/`ramp`/`hold`) rather than a `to()`: sound is\r\n// scheduled once, ahead of time, not written once per frame.\r\nexport {\r\n NodeAudio,\r\n AudioBus,\r\n SoundNode,\r\n} from '../nodes';\r\nexport {\r\n Sound,\r\n AudioFilters,\r\n ramp,\r\n hold,\r\n fadeIn,\r\n fadeOut,\r\n isCurve,\r\n} from '../attributes';\r\nexport type {\r\n NodeAudioProps,\r\n AudioBusProps,\r\n SoundNodeProps,\r\n} from '../nodes';\r\nexport type {\r\n SoundProps,\r\n AudioRequest,\r\n // What a node's `declareAudio` is handed, and the clip it declares into it.\r\n AudioScope,\r\n AudioClip,\r\n AudioBusStop,\r\n AudioFilter,\r\n Param,\r\n Curve,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// 3D — the Canvas3D node and the Graphics3D API\r\n// =============================================================\r\n// There is one 3D node; everything inside it is described with `Graphics3D`.\r\n// `Geo`/`Mat`/`Tex` build the geometry/material/texture descriptors, and the lerps\r\n// are what make a Vector3/Euler/Quaternion prop interpolate rather than snap.\r\n// `Surface2D` is the 2D→3D bridge: a child of `Canvas3D` whose 2D content is\r\n// rasterized offscreen and bound to a material by `Tex.surface(name)`.\r\nexport {\r\n Canvas3D,\r\n // The 3D scene graph. `Node3D` is the base; the rest are what you write.\r\n Node3D,\r\n Group3D,\r\n Mesh3D,\r\n Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D,\r\n Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D,\r\n Instances3D, Points3D, Line3D, Sprite3D, Model3D,\r\n AmbientLight3D, HemisphereLight3D, DirectionalLight3D,\r\n PointLight3D, SpotLight3D, AreaLight3D,\r\n Camera3D,\r\n Fog3D, Environment3D,\r\n} from '../nodes';\r\nexport {\r\n Graphics3D,\r\n Scene3D,\r\n RenderContext3D,\r\n Geo,\r\n Mat,\r\n Tex,\r\n lerpVector3,\r\n lerpEuler3,\r\n slerpQuaternion,\r\n quaternionFromEuler,\r\n normalizeQuaternion,\r\n resolveVector3,\r\n evaluateParametric,\r\n evaluateRoundedBox,\r\n resolveSurfaceSource,\r\n resolveFill3D,\r\n segmentsOf,\r\n resolveCameraPlacement,\r\n resolveShadows3D,\r\n shadowCasts,\r\n shadowReceives,\r\n} from '../render3d';\r\nexport type {\r\n Canvas3DProps,\r\n // A 3D parent's own coordinates for its children's position: see `Node3D._spaceOf`.\r\n ChildSpace3D,\r\n Node3DProps, Group3DProps, Mesh3DProps, Material3DProps,\r\n Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps,\r\n Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps,\r\n Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps,\r\n Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps,\r\n AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps,\r\n PointLight3DProps, SpotLight3DProps, AreaLight3DProps,\r\n Camera3DProps,\r\n Fog3DProps, Environment3DProps,\r\n} from '../nodes';\r\nexport type {\r\n Node3DRenderState,\r\n Graphics3DOp,\r\n Scene3DOp,\r\n Vector3,\r\n Vector3Input,\r\n Euler3,\r\n EulerOrder,\r\n Quaternion,\r\n Transform3D,\r\n Shadow3D,\r\n ShadowOptions3D,\r\n Faces3D,\r\n Blend3D,\r\n Shading3D,\r\n Segments3D,\r\n Sweep3D,\r\n Bevel3D,\r\n Fill3D,\r\n Geometry3D,\r\n BufferGeometry3D,\r\n Material3D,\r\n MaterialCommon3D,\r\n MeshShorthand3D,\r\n // What `Mesh3D.materialShorthand()` returns: a mesh node of your own overrides it.\r\n MaterialShorthand3D,\r\n Uniform3D,\r\n Texture3D,\r\n TextureOptions3D,\r\n SurfaceTexture3D,\r\n SurfaceSource3D,\r\n ResolvedSurfaceSource,\r\n LightData3D,\r\n CameraData3D,\r\n FogData3D,\r\n EnvironmentData3D,\r\n Shadows3D,\r\n ShadowSettings3D,\r\n ToneMapping3D,\r\n ToneSettings3D,\r\n PostEffect3D,\r\n LineMode3D,\r\n LineStroke3D,\r\n ModelAnimation3D,\r\n} from '../render3d';\r\n\r\n// =============================================================\r\n// Rendering — Graphics2D builder, RenderContext2D & asset declaration\r\n// =============================================================\r\nexport {\r\n Graphics2D,\r\n PathBuilder,\r\n Clip,\r\n toPathString,\r\n} from '../render';\r\nexport type {\r\n RenderContext2D,\r\n RenderPass2D,\r\n MeasureContext2D,\r\n TextBlockSource,\r\n // One recorded entry of `Graphics2D.ops()`.\r\n GraphicsOp,\r\n PathData,\r\n PathCommand,\r\n PathBounds,\r\n EllipseArc,\r\n} from '../render';\r\n// What a node's `declareAssets` declares into, and the async load a `loader` takes.\r\nexport type { AssetScope, LoaderFn } from '../assets';\r\n\r\n// =============================================================\r\n// Fill & Color\r\n// =============================================================\r\nexport {\r\n Fills,\r\n parseColor,\r\n resolveFill,\r\n fillOps,\r\n colorOps,\r\n} from '../attributes';\r\nexport type {\r\n Fill,\r\n FillChain,\r\n FillOptions,\r\n VideoFillOptions,\r\n // Placement of an image/video source inside the shape it paints:\r\n // `crop` -> `fit` -> `zoom` -> `anchor`, plus the raw-matrix escape hatch.\r\n MediaPlacementOptions,\r\n ImageFit,\r\n ImageCrop,\r\n ImageMatrix,\r\n FillResolved,\r\n // A custom SkSL shader as a fill. `coords` picks what `fragCoord` means;\r\n // uniforms are keyed by their declared name, and a `ShaderTexture` binds an\r\n // image to a `uniform shader` declaration.\r\n ShaderFillProp,\r\n ShaderFillResolved,\r\n ShaderFillCoords,\r\n ShaderTexture,\r\n SkSLUniformRecord,\r\n FractalNoiseBasis,\r\n // The colour type every fill, stroke, shadow and 3D material accepts —\r\n // a CSS string (incl. `oklch()`, theme tokens, `\"white/10\"`) or a\r\n // pre-normalized RGBA tuple.\r\n Color,\r\n NormalizedColor,\r\n BlendMode,\r\n FillSpace,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Shape Attributes — Stroke, Shadow, Corners\r\n// =============================================================\r\nexport {\r\n resolveStroke,\r\n strokeOps,\r\n resolveShadow,\r\n shadowOps,\r\n resolveCorners,\r\n cornerRadiusOps,\r\n cornerStyleOps,\r\n // Parsing, measuring, sampling, trimming and morphing a path, and the\r\n // anchor model (`VectorPath`) a pen tool edits.\r\n pathOps,\r\n} from '../attributes';\r\nexport type {\r\n PathSampler,\r\n PathAnchor,\r\n PathSubpath,\r\n VectorPath,\r\n Stroke,\r\n StrokeProp,\r\n StrokeAlign,\r\n StrokeCap,\r\n StrokeMarker,\r\n StrokeEnd,\r\n StrokeJoin,\r\n StrokeResolved,\r\n Shadow,\r\n ShadowProp,\r\n ShadowResolved,\r\n Corners,\r\n CornerStyle,\r\n CornerStyleResolved,\r\n CornerRadiusResolved,\r\n NodeEffect,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Layout Attributes — Vector2, Size, Insets, Alignment, Flow\r\n//\r\n// `flowOps` is the layout a container runs on its children, as plain data in\r\n// and boxes out — so a custom node can lay out what it draws the same way.\r\n// =============================================================\r\nexport {\r\n lerpVector2,\r\n sizeInputOps,\r\n insetsOps,\r\n alignmentOps,\r\n} from '../attributes';\r\n// `flowOps` itself is the layout package's, not the attribute layer's —\r\n// `../attributes`'s own `./layout` only carries Vector2/Size2D/Insets/Alignment.\r\nexport { flowOps } from '../layout';\r\nexport type {\r\n Vector2,\r\n Size2D,\r\n Insets,\r\n // What a `padding`-style prop accepts, before `insetsOps` resolves it.\r\n InsetsProps,\r\n InsetsResolved,\r\n AlignmentKey,\r\n Alignment,\r\n} from '../attributes';\r\nexport type {\r\n FlowMode,\r\n GapSize,\r\n FlowResolved,\r\n FlowProps,\r\n FlowSettings,\r\n LayoutItem,\r\n FlowSpace,\r\n FlowMeasure,\r\n FlowLine,\r\n // What an overriding `measure(constraints, scope)` is handed.\r\n SizeConstraints,\r\n} from '../layout';\r\n\r\n// =============================================================\r\n// 2.5D space — the stage's `space3D` camera\r\n//\r\n// `space3dOps` is the camera's own projection, for a host drawing over the\r\n// picture (a gizmo aiming the camera) rather than keeping a copy of it.\r\n// `SpaceCamera` is what a node returns from `_spaceCamera()` to open a 2.5D\r\n// space of its own.\r\n// =============================================================\r\nexport { space3dOps } from '../attributes/layout/space3d';\r\nexport type { LookAt, SpaceCamera, SpaceCameraProps, SpacePoint } from '../attributes/layout/space3d';\r\n\r\n// =============================================================\r\n// Effects & Media Adjustments\r\n// =============================================================\r\nexport {\r\n Effects,\r\n EffectChain,\r\n Adjustments,\r\n VideoAdjustments,\r\n AdjustmentChain,\r\n VideoAdjustmentChain,\r\n /** @deprecated Renamed to {@link Adjustments}. Removed in the next major. */\r\n ImageFilters,\r\n /** @deprecated Renamed to {@link VideoAdjustments}. Removed in the next major. */\r\n VideoFilters,\r\n} from '../attributes';\r\n\r\nexport type {\r\n /** The `effects` prop type — what a node actually accepts. */\r\n Effect,\r\n EffectMode,\r\n EffectAxis,\r\n EffectSurface,\r\n EffectOptions,\r\n /** What an image fill's `preset.adjustments` accepts — one, a list, or a chain. */\r\n ImageAdjustment,\r\n VideoAdjustment,\r\n /** The node effects that also work as a media adjustment — see {@link Adjustments}. */\r\n EffectAdjustment,\r\n MediaAdjustment,\r\n VideoOnlyAdjustment,\r\n} from '../attributes';\r\n\r\n/**\r\n * Per-builder options. Every effect builder takes exactly one argument: one of\r\n * these, or the dominant scalar it wraps.\r\n */\r\nexport type {\r\n BlurOptions,\r\n DirectionalBlurOptions,\r\n GrayscaleOptions,\r\n PixelateOptions,\r\n BulgeOptions,\r\n MagnifyOptions,\r\n BloomOptions,\r\n VintageOptions,\r\n ChromaticAberrationOptions,\r\n InvertOptions,\r\n ScatterOptions,\r\n PosterizeOptions,\r\n MotionBlurOptions,\r\n ShaderEffectOptions,\r\n OutlineOptions,\r\n VignetteOptions,\r\n GrainOptions,\r\n SharpenOptions,\r\n EdgesOptions,\r\n ThresholdOptions,\r\n RadialBlurOptions,\r\n HalftoneOptions,\r\n DitherOptions,\r\n DuotoneOptions,\r\n CurvesOptions,\r\n ColorAdjustmentOptions,\r\n RgbShiftOptions,\r\n ScanlinesOptions,\r\n BlockDisplaceOptions,\r\n BitCrushOptions,\r\n AsciiOptions,\r\n StreakOptions,\r\n GlowOptions,\r\n OilPaintOptions,\r\n WaveOptions,\r\n TwirlOptions,\r\n ProgressiveBlurOptions,\r\n KaleidoscopeOptions,\r\n GlassOptions,\r\n LutOptions,\r\n} from '../attributes';\r\n\r\n/**\r\n * Per-builder options for the filters that exist only as filters. Everything\r\n * else on {@link Adjustments} takes the matching effect options above, minus\r\n * `mode` — a filter is on the fill's own pixels, so there is no backdrop to\r\n * point it at.\r\n */\r\nexport type {\r\n BlurFilterOptions,\r\n GrayscaleFilterOptions,\r\n AlphaFilterOptions,\r\n ExposureFilterOptions,\r\n ColorMatrixFilterOptions,\r\n CurvesFilterOptions,\r\n ColorAdjustmentFilterOptions,\r\n PosterizeTimeFilterOptions,\r\n VideoEchoFilterOptions,\r\n} from '../attributes';\r\n\r\n/** Effect data types, for naming an effect value or building one by hand. */\r\nexport type {\r\n BlurEffect,\r\n DirectionalBlurEffect,\r\n GrayscaleEffect,\r\n PixelateEffect,\r\n BulgeEffect,\r\n MagnifyEffect,\r\n BloomEffect,\r\n VintageEffect,\r\n ChromaticAberrationEffect,\r\n InvertEffect,\r\n InvertChannel,\r\n ScatterEffect,\r\n PosterizeEffect,\r\n MotionBlurEffect,\r\n MotionBlurAlignment,\r\n ShaderEffect,\r\n SkSLUniform,\r\n SkSLUniformValue,\r\n OutlineEffect,\r\n OutlinePosition,\r\n VignetteEffect,\r\n GrainEffect,\r\n SharpenEffect,\r\n EdgesEffect,\r\n EdgeKernel,\r\n ThresholdEffect,\r\n RadialBlurEffect,\r\n RadialBlurStyle,\r\n HalftoneEffect,\r\n HalftoneShape,\r\n HalftoneSeparation,\r\n DitherEffect,\r\n DitherMatrix,\r\n DuotoneEffect,\r\n CurvesEffect,\r\n ColorAdjustmentEffect,\r\n RgbShiftEffect,\r\n ScanlinesEffect,\r\n BlockDisplaceEffect,\r\n BitCrushEffect,\r\n BitCrushPalette,\r\n AsciiEffect,\r\n AsciiCharset,\r\n StreakEffect,\r\n GlowEffect,\r\n GlowChannel,\r\n GlowLoopStyle,\r\n GlowOriginal,\r\n GlowTint,\r\n OilPaintEffect,\r\n WaveEffect,\r\n WaveShape,\r\n TwirlEffect,\r\n ProgressiveBlurEffect,\r\n ProgressiveBlurShape,\r\n KaleidoscopeEffect,\r\n GlassEffect,\r\n LutEffect,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Animation — interpolation\r\n//\r\n// There are no `sequence`/`parallel`/`wait` primitives: a command carries its\r\n// own placement, so sequencing is `at + duration`, running two together is a\r\n// shared `at`, and a wait is a gap between them.\r\n// =============================================================\r\nexport {\r\n lerpNumber,\r\n} from '../tween';\r\nexport type {\r\n AnimationTarget,\r\n Steppable,\r\n TweenStepper,\r\n LerpFunction,\r\n TweenOptions,\r\n} from '../tween';\r\n\r\n// An animation as a **value** rather than as control flow: a declared duration\r\n// plus `at(t)`, so a host can ask what it looks like at a time instead of\r\n// running it to one. That is what lets a host place one on a timeline, and what\r\n// makes a scene scrub in constant time rather than replay. `@command` marks the\r\n// methods on a node that return one, and is what the command registry — and a\r\n// host listing what a node can do — reads.\r\n//\r\n// One command shape, always: `node.to(a, 1)` is a single command, not a builder\r\n// you can append to. Two of them are sequenced by where they sit on the\r\n// timeline, which is what makes a scene's shape editable rather than implied by\r\n// the order of calls in a function body.\r\nexport {\r\n command,\r\n driveCommand,\r\n getCommandMeta,\r\n isCommand,\r\n makeCommand,\r\n commandSequence,\r\n commandParallel,\r\n loopCommand,\r\n} from '../tween';\r\nexport type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween';\r\n\r\n// =============================================================\r\n// Animation — Easing\r\n// =============================================================\r\nexport {\r\n linear,\r\n easeIn,\r\n easeOut,\r\n easeInOut\r\n} from '../tween';\r\nexport type {\r\n EasingFunction,\r\n EaseParams,\r\n StandardEase\r\n} from '../tween';\r\n\r\n// =============================================================\r\n// Node Property Decorators\r\n// =============================================================\r\nexport {\r\n property,\r\n // Attribute-typed variants: `@property` with the mapper/tween pair for a\r\n // known attribute already filled in, so a custom node declares a paint or\r\n // layout prop without importing the resolver/lerp pair behind it.\r\n fillProperty,\r\n strokeProperty,\r\n shadowProperty,\r\n effectsProperty,\r\n colorProperty,\r\n cornerRadiusProperty,\r\n cornerStyleProperty,\r\n pathProperty,\r\n insetsProperty,\r\n alignmentProperty,\r\n vector2Property,\r\n sizeProperty,\r\n textProperty,\r\n} from '../attributes';\r\nexport type {\r\n PropOptions,\r\n AttributePropOptions,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Utilities\r\n// =============================================================\r\nexport {\r\n createRef,\r\n clamp,\r\n generateList,\r\n createContext,\r\n ContextMap,\r\n Random,\r\n SeedGenerator,\r\n parseCSV,\r\n parseData,\r\n} from '../util';\r\nexport type {\r\n Reference,\r\n RefTarget,\r\n Context,\r\n DataRecord,\r\n ParseCSVOptions,\r\n} from '../util';\r\n\r\n// =============================================================\r\n// Editor selection — node boxes, hit testing, transient overrides\r\n// =============================================================\r\n// The geometry an editor needs to lay a selection gizmo over the canvas: where a\r\n// node's pixels landed, and which node is under a point. Both are pure functions\r\n// over a scene's node tree, so a host can use them directly; a player embedding\r\n// reaches the same thing through `useMotionPlayer` (`getNodeBox`, `pickNode`,\r\n// `setNodeOverride`). Points and boxes are in viewport space — origin at the\r\n// viewport centre, y-up.\r\n//\r\n// These genuinely live in `../runtime` (node hit-testing and the transient\r\n// override store are runtime concerns) — deep-imported from their concrete\r\n// files, never the runtime barrel itself.\r\nexport { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement';\r\nexport type { PlacementIssue, PlacementOptions } from '../document/placement';\r\n\r\nexport {\r\n nodeBox,\r\n pickNode,\r\n collectBoxes,\r\n parentPlanePointAt,\r\n childPlanePointAt,\r\n reparentPlacementAt,\r\n nodeHandlesAt,\r\n handleValueAt,\r\n} from '../runtime/node-picking';\r\nexport type {\r\n NodeBox,\r\n ReparentPlacement,\r\n} from '../runtime/node-picking';\r\nexport type {\r\n NodeOverride,\r\n} from '../runtime/playback-controller';\r\nexport type {\r\n TreeState,\r\n} from '../project';\r\n/** @deprecated Kept until 1.0; see `../renamed-scene-names`. */\r\nexport type { SceneDocument, SceneEffect } from '../renamed-scene-names';\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,gFAAgF;AAChF,wEAAwE;A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ACF,8EAA8E;AAC9E,6EAA6E;AAC7E,iDAAiD;AACjD,gEAAgE;AAChE,OAAO,EACH,UAAU,GACb,MAAM,UAAU,CAAC;AASlB,+EAA+E;AAC/E,0EAA0E;AAC1E,gFAAgF;AAChF,yEAAyE;AACzE,8EAA8E;AAC9E,4BAA4B;AAC5B,EAAE;AACF,gFAAgF;AAChF,wEAAwE;AACxE,gFAAgF;AAChF,yCAAyC;AACzC,OAAO,EACH,cAAc,EACd,SAAS,EACT,WAAW,EACX,eAAe,EACf,eAAe,EACf,WAAW,GACd,MAAM,UAAU,CAAC;AAGlB,gEAAgE;AAChE,qBAAqB;AACrB,gEAAgE;AAChE,OAAO,EACH,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACZ,MAAM,UAAU,CAAC;AAOlB,gEAAgE;AAChE,YAAY;AACZ,gEAAgE;AAChE,OAAO,EACH,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AASjB,gEAAgE;AAChE,kEAAkE;AAClE,gEAAgE;AAChE,iFAAiF;AACjF,iFAAiF;AACjF,gFAAgF;AAChF,8EAA8E;AAC9E,6EAA6E;AAC7E,yBAAyB;AACzB,EAAE;AACF,2EAA2E;AAC3E,2EAA2E;AAC3E,0CAA0C;AAC1C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGhG,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC","sourcesContent":["// The curated public surface published as `@motionscript/sdk` (packages/sdk) and,\r\n// via this file, as `@motionscript/core/sdk`. A deliberate SUBSET of core's own\r\n// root barrel (`../index.ts`): no `Engine`/`Session`/platform seams, no\r\n// `@internal`-tagged descriptor plumbing. Every export here is named, traced to\r\n// its real declaring sub-barrel — never a wildcard — so nothing internal leaks\r\n// by accident. Keep this in lockstep with `packages/sdk/src/index.ts`, which\r\n// mirrors this exact named surface.\r\n\r\n// =============================================================\r\n// Project\r\n//\r\n// A clip is **data**: a still is nodes and props, a composition is the same\r\n// nodes placed in time plus the commands that animate them, and an audio\r\n// document is that one tree over. A **project** is one list of tracks over those\r\n// clips, and it is what the runtime plays — a lone still or composition is sugar\r\n// for a project with one track (`asProjectDocument`).\r\n// =============================================================\r\nexport {\r\n isProjectDocument,\r\n asProjectDocument,\r\n documentDuration,\r\n commandSpan,\r\n hasTimeline,\r\n nodeSpan,\r\n effectiveSpan,\r\n untimed,\r\n ROOT_NODE_ID,\r\n} from '../document';\r\nexport type {\r\n ProjectDocument,\r\n Track,\r\n} from '../document';\r\n// `resolveProjectDocument`/`placeTracks` genuinely live in `../runtime` (session\r\n// resolution and track placement are runtime concerns) — deep-imported from\r\n// their concrete files rather than the runtime barrel, which also carries\r\n// `Engine`/`Session` and is never a source for this file.\r\nexport { resolveProjectDocument } from '../runtime/session';\r\nexport { placeTracks } from '../runtime/placement';\r\nexport type { TrackSpan } from '../runtime/placement';\r\nexport type {\r\n Theme,\r\n ColorTokens,\r\n Typography,\r\n TypographyPreset,\r\n} from '../project';\r\nexport type { NodeTime, AttachScope } from '../nodes';\r\nexport type { BoxBounds, Extents } from '../layout';\r\n\r\n// =============================================================\r\n// Assets\r\n//\r\n// The manifest a host builds a scene against — what images, video, audio and\r\n// fonts it references, resolved before render. An `Engine`'s manifest and\r\n// `@motionscript/headless`'s asset options both take this shape.\r\n// =============================================================\r\nexport type {\r\n ImageMeta,\r\n VideoMeta,\r\n AudioMeta,\r\n FontMeta,\r\n AssetMeta,\r\n AssetManifest,\r\n} from '../assets';\r\n\r\n// =============================================================\r\n// The clip document\r\n//\r\n// The data half of the model. Node types are code — a component registered\r\n// under its key, which is also where a custom node joins the system — and\r\n// everything else is plain JSON: which nodes exist, what props they carry, and\r\n// what happens to them over time.\r\n// =============================================================\r\nexport {\r\n validateDocument,\r\n assertValidDocument,\r\n // The code half of the model, as one object an engine owns. Not a\r\n // singleton: what a document can name is a property of the registry\r\n // compiling it, so two engines in one process disagree freely.\r\n Registry,\r\n} from '../document';\r\n// The shader-pack vocabulary lives beside the rest of the fill/shader attribute\r\n// machinery, not in `../document`.\r\nexport {\r\n normalizeShaderPack,\r\n resolveShaderProperties,\r\n isKnownShaderProperty,\r\n} from '../attributes';\r\nexport type {\r\n RegistryOptions,\r\n NodeTypeMap,\r\n ShaderPackMap,\r\n NodeTypeRecord,\r\n NodeCommandEntry,\r\n VisualDocument,\r\n ClipDocument,\r\n StillDocument,\r\n CompositionDocument,\r\n AudioDocument,\r\n NodeSpec,\r\n TimedNodeSpec,\r\n NodeSpan,\r\n CommandSpec,\r\n EaseSpec,\r\n LoopSpec,\r\n LoopDirection,\r\n VariableSpec,\r\n ValidationIssue,\r\n ValidationResult,\r\n NodeConstructor,\r\n CommandFactory,\r\n CommandTypeEntry,\r\n VariableCommandFactory,\r\n VariableLerp,\r\n VariableTarget,\r\n} from '../document';\r\nexport type {\r\n Shader,\r\n FillShader,\r\n EffectShader,\r\n ShaderProperty,\r\n KnownShaderProperty,\r\n ShaderPropertyValues,\r\n} from '../attributes';\r\n\r\n// Expressions: the string form of a prop that follows a variable — `\"=4[g]+3\"`.\r\n// `expressionOps` carries recognition, parsing and compiling, so a host can lint,\r\n// complete or rewrite one without reimplementing the grammar.\r\nexport { expressionOps, ExpressionError } from '../document';\r\nexport type {\r\n ParsedExpression,\r\n ExpressionNode,\r\n ExpressionDialect,\r\n VariableResolver,\r\n} from '../document';\r\n\r\n// =============================================================\r\n// Components — the factories a node type is written with\r\n//\r\n// A component is one object literal: `key`, `state`, `commands`, `children`\r\n// and its tree's own fields (`measure`/`layout`/`render` for 2D). Behaviour is\r\n// spread in from modules (`...Paint.state`, `...Paint.commands`) and their\r\n// helpers called (`Paint.draw`, `Flow.measure`). See\r\n// `experiments/component-syntax/README.md`.\r\n// =============================================================\r\nexport { component2d } from '../component/component2d';\r\nexport { componentAudio } from '../component/component-audio';\r\nexport { component3d } from '../component/component3d';\r\nexport { commandsFor } from '../component/commands-for';\r\nexport { Types } from '../component/types';\r\nexport { provides } from '../component/api';\r\nexport * as Paint from '../component/modules/paint';\r\nexport * as Flow from '../component/modules/flow';\r\nexport * as Shapes from '../component/modules/shapes';\r\nexport * as Aim from '../component/modules/aim';\r\n// The face text is set in: its entries inherit from the nearest provider.\r\nexport * as Typeface from '../component/modules/text-style';\r\nexport * as TextLayout from '../component/modules/text-layout';\r\n// A mesh's surface: the material entries, and the mesh drawn with them.\r\nexport * as Material from '../component/modules/material';\r\n// A viewport onto 3D children: the default camera and lights, the grid, the render settings.\r\nexport * as View3D from '../component/modules/view3d';\r\nexport type { Attribute, EntryOptions, NumberOptions, TextOptions } from '../component/types';\r\nexport type {\r\n Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader,\r\n Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, SoundOptions, StateSpec,\r\n Timeline, Type, Values, Writes,\r\n // Named in every component's type, so a package exporting one can declare it.\r\n Merge,\r\n // What `render` is handed; `RenderContext2D` is the renderer's.\r\n RenderContext2D as RenderContext,\r\n CallProps3D, Placement3DProps, Transform3DState, Handle, LayoutBox, NodeFrame,\r\n // What a 3D `render` is handed; `RenderContext3D` is the renderer's.\r\n RenderContext3D as SceneContext,\r\n} from '../component/api';\r\n\r\n// =============================================================\r\n// Nodes — what code holding a built node names it as\r\n//\r\n// `Node` is dimension-agnostic (tree, props, tweens, context, clock); `Node2D`\r\n// adds layout and 2D drawing; `Node3D` and `NodeAudio` are the other trees.\r\n// Types only: a node type is a component, never a subclass.\r\n// =============================================================\r\nexport type { Node, Node2D } from '../nodes';\r\nexport {\r\n // A clip's root container: layout frame, background paint and camera in\r\n // one node. Every track builds into one sized to the viewport.\r\n Canvas2D,\r\n // Reaching another node by the id a `nodeRef` prop holds, and reading where it sits.\r\n findNode2D,\r\n frameIn,\r\n} from '../nodes';\r\nexport { Provider, ThemeProvider } from '../component/builtins/providers';\r\nexport type {\r\n NodeProps,\r\n Node2DProps,\r\n // A slot a layout puts each child in beyond its box — see `Node2D._placementOf`.\r\n ChildPlacement,\r\n // A parent's own coordinates for its children's `x`/`y` — see `Node2D._planeOf`.\r\n ChildPlane,\r\n // A point an editor can drag to set a `Vector2` prop — see `Node2D._handles`.\r\n NodeHandle,\r\n Canvas2DProps,\r\n NodeConfig,\r\n NodeChildren,\r\n NodeDimension,\r\n ProviderProps,\r\n ThemeProviderProps,\r\n} from '../nodes';\r\n\r\n// =============================================================\r\n// Nodes — Geometry\r\n// =============================================================\r\nexport {\r\n Rect,\r\n Ellipse,\r\n Path,\r\n // The document's `\"path\"`: its `data` is in the unit space of its own box,\r\n // where `Path` draws its `d` at face value.\r\n PathShape,\r\n Polygon,\r\n Polygram,\r\n Triangle,\r\n RightTriangle,\r\n Pentagon,\r\n Hexagon,\r\n Octagon,\r\n Star,\r\n} from '../component/builtins/geometry';\r\nexport { BooleanGroup, MaskGroup } from '../component/builtins/composite';\r\nexport type {\r\n PaintProps,\r\n ShapeProps,\r\n RectProps,\r\n FlexSize,\r\n EllipseProps,\r\n PathProps,\r\n PathShapeProps,\r\n PolygonProps,\r\n PolygramProps,\r\n BooleanGroupProps,\r\n MaskGroupProps,\r\n} from '../nodes';\r\n// The operation/mode vocabularies behind `Boolean`/`Mask` are attribute types,\r\n// not node-prop types.\r\nexport type {\r\n BooleanOperation,\r\n MaskMode,\r\n MaskOptions,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Nodes — Layout\r\n// =============================================================\r\nexport {\r\n Camera,\r\n // The stage's 2.5D camera for one subtree: its children orbited in depth.\r\n OrbitCamera,\r\n RotatedBox,\r\n} from '../component/builtins/layout';\r\nexport type {\r\n CameraProps,\r\n OrbitCameraProps,\r\n} from '../nodes';\r\n\r\n// =============================================================\r\n// Nodes — Text\r\n// =============================================================\r\nexport { Text, RichText, NumberNode, DefaultTextStyle } from '../component/builtins/text';\r\nexport { TextSelection } from '../nodes';\r\nexport type {\r\n TextProps,\r\n RichTextProps,\r\n NumberProps,\r\n NumberFormat,\r\n DefaultTextStyleProps,\r\n TextSelectionProps,\r\n TextRange,\r\n SelectionOverrides,\r\n} from '../nodes';\r\nexport { textOps } from '../attributes';\r\nexport type {\r\n TextStyle,\r\n TextAlign,\r\n VerticalAlign,\r\n TextDecoration,\r\n TextCase,\r\n TextSpan,\r\n TextRun,\r\n FontStyle,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Nodes — Media\r\n// =============================================================\r\nexport { Video } from '../component/builtins/media';\r\nexport type {\r\n VideoProps,\r\n VideoSegment,\r\n} from '../nodes';\r\n\r\n// =============================================================\r\n// Nodes — Audio\r\n// =============================================================\r\n// `SoundNode` plays a clip and `AudioBus` groups what feeds it — the third\r\n// scene graph, beside `Node2D` and `Node3D`. Levels are `Param`, so a fade is a\r\n// curve (`fadeIn`/`fadeOut`/`ramp`/`hold`) rather than a `to()`: sound is\r\n// scheduled once, ahead of time, not written once per frame.\r\nexport type { NodeAudio } from '../nodes';\r\nexport { AudioBus, SoundNode } from '../component/builtins/audio';\r\nexport {\r\n Sound,\r\n AudioFilters,\r\n ramp,\r\n hold,\r\n fadeIn,\r\n fadeOut,\r\n isCurve,\r\n} from '../attributes';\r\nexport type {\r\n NodeAudioProps,\r\n AudioBusProps,\r\n SoundNodeProps,\r\n} from '../nodes';\r\nexport type {\r\n SoundProps,\r\n AudioRequest,\r\n // What a node's `declareAudio` is handed, and the clip it declares into it.\r\n AudioScope,\r\n AudioClip,\r\n AudioBusStop,\r\n AudioFilter,\r\n Param,\r\n Curve,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// 3D — the Canvas3D node and the Graphics3D API\r\n// =============================================================\r\n// There is one 3D node; everything inside it is described with `Graphics3D`.\r\n// `Geo`/`Mat`/`Tex` build the geometry/material/texture descriptors, and the lerps\r\n// are what make a Vector3/Euler/Quaternion prop interpolate rather than snap.\r\n// `Surface2D` is the 2D→3D bridge: a child of `Canvas3D` whose 2D content is\r\n// rasterized offscreen and bound to a material by `Tex.surface(name)`.\r\nexport { Canvas3D } from '../component/builtins/canvas3d';\r\nexport type { Node3D } from '../nodes';\r\n// The 3D scene graph: components, each placed by its transform.\r\nexport {\r\n Group3D,\r\n Mesh3D,\r\n Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D,\r\n Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D,\r\n Instances3D, Points3D, Line3D, Sprite3D, Model3D,\r\n AmbientLight3D, HemisphereLight3D, DirectionalLight3D,\r\n PointLight3D, SpotLight3D, AreaLight3D,\r\n Camera3D,\r\n Fog3D, Environment3D,\r\n} from '../component/builtins/three';\r\nexport {\r\n Graphics3D,\r\n Scene3D,\r\n RenderContext3D,\r\n Geo,\r\n Mat,\r\n Tex,\r\n lerpVector3,\r\n lerpEuler3,\r\n slerpQuaternion,\r\n quaternionFromEuler,\r\n normalizeQuaternion,\r\n resolveVector3,\r\n evaluateParametric,\r\n evaluateRoundedBox,\r\n resolveSurfaceSource,\r\n resolveFill3D,\r\n segmentsOf,\r\n resolveCameraPlacement,\r\n resolveShadows3D,\r\n shadowCasts,\r\n shadowReceives,\r\n} from '../render3d';\r\nexport type {\r\n Canvas3DProps,\r\n // A 3D parent's own coordinates for its children's position: see `Node3D._spaceOf`.\r\n ChildSpace3D,\r\n Node3DProps, Group3DProps, Mesh3DProps, Material3DProps,\r\n Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps,\r\n Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps,\r\n Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps,\r\n Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps,\r\n AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps,\r\n PointLight3DProps, SpotLight3DProps, AreaLight3DProps,\r\n Camera3DProps,\r\n Fog3DProps, Environment3DProps,\r\n} from '../nodes';\r\nexport type {\r\n Node3DRenderState,\r\n Graphics3DOp,\r\n Scene3DOp,\r\n Vector3,\r\n Vector3Input,\r\n Euler3,\r\n EulerOrder,\r\n Quaternion,\r\n Transform3D,\r\n Shadow3D,\r\n ShadowOptions3D,\r\n Faces3D,\r\n Blend3D,\r\n Shading3D,\r\n Segments3D,\r\n Sweep3D,\r\n Bevel3D,\r\n Fill3D,\r\n Geometry3D,\r\n BufferGeometry3D,\r\n Material3D,\r\n MaterialCommon3D,\r\n MeshShorthand3D,\r\n // What `Mesh3D.materialShorthand()` returns: a mesh node of your own overrides it.\r\n MaterialShorthand3D,\r\n Uniform3D,\r\n Texture3D,\r\n TextureOptions3D,\r\n SurfaceTexture3D,\r\n SurfaceSource3D,\r\n ResolvedSurfaceSource,\r\n LightData3D,\r\n CameraData3D,\r\n FogData3D,\r\n EnvironmentData3D,\r\n Shadows3D,\r\n ShadowSettings3D,\r\n ToneMapping3D,\r\n ToneSettings3D,\r\n PostEffect3D,\r\n LineMode3D,\r\n LineStroke3D,\r\n ModelAnimation3D,\r\n} from '../render3d';\r\n\r\n// =============================================================\r\n// Rendering — Graphics2D builder, RenderContext2D & asset declaration\r\n// =============================================================\r\nexport {\r\n Graphics2D,\r\n PathBuilder,\r\n Clip,\r\n toPathString,\r\n} from '../render';\r\nexport type {\r\n RenderContext2D,\r\n RenderPass2D,\r\n MeasureContext2D,\r\n TextBlockSource,\r\n // One recorded entry of `Graphics2D.ops()`.\r\n GraphicsOp,\r\n PathData,\r\n PathCommand,\r\n PathBounds,\r\n EllipseArc,\r\n} from '../render';\r\n// What a node's `declareAssets` declares into, and the async load a `loader` takes.\r\nexport type { AssetScope, LoaderFn } from '../assets';\r\n\r\n// =============================================================\r\n// Fill & Color\r\n// =============================================================\r\nexport {\r\n Fills,\r\n parseColor,\r\n resolveFill,\r\n fillOps,\r\n colorOps,\r\n} from '../attributes';\r\nexport type {\r\n Fill,\r\n FillChain,\r\n FillOptions,\r\n VideoFillOptions,\r\n // Placement of an image/video source inside the shape it paints:\r\n // `crop` -> `fit` -> `zoom` -> `anchor`, plus the raw-matrix escape hatch.\r\n MediaPlacementOptions,\r\n ImageFit,\r\n ImageCrop,\r\n ImageMatrix,\r\n FillResolved,\r\n // A custom SkSL shader as a fill. `coords` picks what `fragCoord` means;\r\n // uniforms are keyed by their declared name, and a `ShaderTexture` binds an\r\n // image to a `uniform shader` declaration.\r\n ShaderFillProp,\r\n ShaderFillResolved,\r\n ShaderFillCoords,\r\n ShaderTexture,\r\n SkSLUniformRecord,\r\n FractalNoiseBasis,\r\n // The colour type every fill, stroke, shadow and 3D material accepts —\r\n // a CSS string (incl. `oklch()`, theme tokens, `\"white/10\"`) or a\r\n // pre-normalized RGBA tuple.\r\n Color,\r\n NormalizedColor,\r\n BlendMode,\r\n FillSpace,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Shape Attributes — Stroke, Shadow, Corners\r\n// =============================================================\r\nexport {\r\n resolveStroke,\r\n strokeOps,\r\n resolveShadow,\r\n shadowOps,\r\n resolveCorners,\r\n cornerRadiusOps,\r\n cornerStyleOps,\r\n // Parsing, measuring, sampling, trimming and morphing a path, and the\r\n // anchor model (`VectorPath`) a pen tool edits.\r\n pathOps,\r\n} from '../attributes';\r\nexport type {\r\n PathSampler,\r\n PathAnchor,\r\n PathSubpath,\r\n VectorPath,\r\n Stroke,\r\n StrokeProp,\r\n StrokeAlign,\r\n StrokeCap,\r\n StrokeMarker,\r\n StrokeEnd,\r\n StrokeJoin,\r\n StrokeResolved,\r\n Shadow,\r\n ShadowProp,\r\n ShadowResolved,\r\n Corners,\r\n CornerStyle,\r\n CornerStyleResolved,\r\n CornerRadiusResolved,\r\n // What a rect's `cornerRadius` and `cornerStyle` take, before they resolve.\r\n RectCornerRadius,\r\n RectCornerStyle,\r\n NodeEffect,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Layout Attributes — Vector2, Size, Insets, Alignment, Flow\r\n//\r\n// `flowOps` is the layout a container runs on its children, as plain data in\r\n// and boxes out — so a custom node can lay out what it draws the same way.\r\n// =============================================================\r\nexport {\r\n lerpVector2,\r\n sizeInputOps,\r\n insetsOps,\r\n alignmentOps,\r\n} from '../attributes';\r\n// `flowOps` itself is the layout package's, not the attribute layer's —\r\n// `../attributes`'s own `./layout` only carries Vector2/Size2D/Insets/Alignment.\r\nexport { flowOps } from '../layout';\r\nexport type {\r\n Vector2,\r\n Size2D,\r\n Insets,\r\n // What a `padding`-style prop accepts, before `insetsOps` resolves it.\r\n InsetsProps,\r\n InsetsResolved,\r\n AlignmentKey,\r\n Alignment,\r\n} from '../attributes';\r\nexport type {\r\n FlowMode,\r\n GapSize,\r\n FlowResolved,\r\n FlowProps,\r\n FlowSettings,\r\n LayoutItem,\r\n FlowSpace,\r\n FlowMeasure,\r\n FlowLine,\r\n // What an overriding `measure(constraints, scope)` is handed.\r\n SizeConstraints,\r\n} from '../layout';\r\n\r\n// =============================================================\r\n// 2.5D space — the stage's `space3D` camera\r\n//\r\n// `space3dOps` is the camera's own projection, for a host drawing over the\r\n// picture (a gizmo aiming the camera) rather than keeping a copy of it.\r\n// `SpaceCamera` is what a node returns from `_spaceCamera()` to open a 2.5D\r\n// space of its own.\r\n// =============================================================\r\nexport { space3dOps } from '../attributes/layout/space3d';\r\nexport type { LookAt, SpaceCamera, SpaceCameraProps, SpacePoint } from '../attributes/layout/space3d';\r\n\r\n// =============================================================\r\n// Effects & Media Adjustments\r\n// =============================================================\r\nexport {\r\n Effects,\r\n EffectChain,\r\n Adjustments,\r\n VideoAdjustments,\r\n AdjustmentChain,\r\n VideoAdjustmentChain,\r\n /** @deprecated Renamed to {@link Adjustments}. Removed in the next major. */\r\n ImageFilters,\r\n /** @deprecated Renamed to {@link VideoAdjustments}. Removed in the next major. */\r\n VideoFilters,\r\n} from '../attributes';\r\n\r\nexport type {\r\n /** The `effects` prop type — what a node actually accepts. */\r\n Effect,\r\n EffectMode,\r\n EffectAxis,\r\n EffectSurface,\r\n EffectOptions,\r\n /** What an image fill's `preset.adjustments` accepts — one, a list, or a chain. */\r\n ImageAdjustment,\r\n VideoAdjustment,\r\n /** The node effects that also work as a media adjustment — see {@link Adjustments}. */\r\n EffectAdjustment,\r\n MediaAdjustment,\r\n VideoOnlyAdjustment,\r\n} from '../attributes';\r\n\r\n/**\r\n * Per-builder options. Every effect builder takes exactly one argument: one of\r\n * these, or the dominant scalar it wraps.\r\n */\r\nexport type {\r\n BlurOptions,\r\n DirectionalBlurOptions,\r\n GrayscaleOptions,\r\n PixelateOptions,\r\n BulgeOptions,\r\n MagnifyOptions,\r\n BloomOptions,\r\n VintageOptions,\r\n ChromaticAberrationOptions,\r\n InvertOptions,\r\n ScatterOptions,\r\n PosterizeOptions,\r\n MotionBlurOptions,\r\n ShaderEffectOptions,\r\n OutlineOptions,\r\n VignetteOptions,\r\n GrainOptions,\r\n SharpenOptions,\r\n EdgesOptions,\r\n ThresholdOptions,\r\n RadialBlurOptions,\r\n HalftoneOptions,\r\n DitherOptions,\r\n DuotoneOptions,\r\n CurvesOptions,\r\n ColorAdjustmentOptions,\r\n RgbShiftOptions,\r\n ScanlinesOptions,\r\n BlockDisplaceOptions,\r\n BitCrushOptions,\r\n AsciiOptions,\r\n StreakOptions,\r\n GlowOptions,\r\n OilPaintOptions,\r\n WaveOptions,\r\n TwirlOptions,\r\n ProgressiveBlurOptions,\r\n KaleidoscopeOptions,\r\n GlassOptions,\r\n LutOptions,\r\n} from '../attributes';\r\n\r\n/**\r\n * Per-builder options for the filters that exist only as filters. Everything\r\n * else on {@link Adjustments} takes the matching effect options above, minus\r\n * `mode` — a filter is on the fill's own pixels, so there is no backdrop to\r\n * point it at.\r\n */\r\nexport type {\r\n BlurFilterOptions,\r\n GrayscaleFilterOptions,\r\n AlphaFilterOptions,\r\n ExposureFilterOptions,\r\n ColorMatrixFilterOptions,\r\n CurvesFilterOptions,\r\n ColorAdjustmentFilterOptions,\r\n PosterizeTimeFilterOptions,\r\n VideoEchoFilterOptions,\r\n} from '../attributes';\r\n\r\n/** Effect data types, for naming an effect value or building one by hand. */\r\nexport type {\r\n BlurEffect,\r\n DirectionalBlurEffect,\r\n GrayscaleEffect,\r\n PixelateEffect,\r\n BulgeEffect,\r\n MagnifyEffect,\r\n BloomEffect,\r\n VintageEffect,\r\n ChromaticAberrationEffect,\r\n InvertEffect,\r\n InvertChannel,\r\n ScatterEffect,\r\n PosterizeEffect,\r\n MotionBlurEffect,\r\n MotionBlurAlignment,\r\n ShaderEffect,\r\n SkSLUniform,\r\n SkSLUniformValue,\r\n OutlineEffect,\r\n OutlinePosition,\r\n VignetteEffect,\r\n GrainEffect,\r\n SharpenEffect,\r\n EdgesEffect,\r\n EdgeKernel,\r\n ThresholdEffect,\r\n RadialBlurEffect,\r\n RadialBlurStyle,\r\n HalftoneEffect,\r\n HalftoneShape,\r\n HalftoneSeparation,\r\n DitherEffect,\r\n DitherMatrix,\r\n DuotoneEffect,\r\n CurvesEffect,\r\n ColorAdjustmentEffect,\r\n RgbShiftEffect,\r\n ScanlinesEffect,\r\n BlockDisplaceEffect,\r\n BitCrushEffect,\r\n BitCrushPalette,\r\n AsciiEffect,\r\n AsciiCharset,\r\n StreakEffect,\r\n GlowEffect,\r\n GlowChannel,\r\n GlowLoopStyle,\r\n GlowOriginal,\r\n GlowTint,\r\n OilPaintEffect,\r\n WaveEffect,\r\n WaveShape,\r\n TwirlEffect,\r\n ProgressiveBlurEffect,\r\n ProgressiveBlurShape,\r\n KaleidoscopeEffect,\r\n GlassEffect,\r\n LutEffect,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Animation — interpolation\r\n//\r\n// There are no `sequence`/`parallel`/`wait` primitives: a command carries its\r\n// own placement, so sequencing is `at + duration`, running two together is a\r\n// shared `at`, and a wait is a gap between them.\r\n// =============================================================\r\nexport {\r\n lerpNumber,\r\n} from '../tween';\r\nexport type {\r\n AnimationTarget,\r\n Steppable,\r\n TweenStepper,\r\n LerpFunction,\r\n TweenOptions,\r\n} from '../tween';\r\n\r\n// An animation as a **value** rather than as control flow: a declared duration\r\n// plus `at(t)`, so a host can ask what it looks like at a time instead of\r\n// running it to one. That is what lets a host place one on a timeline, and what\r\n// makes a scene scrub in constant time rather than replay. A component's\r\n// `commands` return one, and the command registry — and a host listing what a\r\n// node can do — reads them.\r\n//\r\n// One command shape, always: `node.to(a, 1)` is a single command, not a builder\r\n// you can append to. Two of them are sequenced by where they sit on the\r\n// timeline, which is what makes a scene's shape editable rather than implied by\r\n// the order of calls in a function body.\r\nexport {\r\n getCommandMeta,\r\n isCommand,\r\n makeCommand,\r\n commandSequence,\r\n commandParallel,\r\n loopCommand,\r\n} from '../tween';\r\nexport type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween';\r\n\r\n// =============================================================\r\n// Animation — Easing\r\n// =============================================================\r\nexport {\r\n linear,\r\n easeIn,\r\n easeOut,\r\n easeInOut\r\n} from '../tween';\r\nexport type {\r\n EasingFunction,\r\n EaseParams,\r\n StandardEase\r\n} from '../tween';\r\n\r\n// =============================================================\r\n// Utilities\r\n// =============================================================\r\nexport {\r\n createRef,\r\n clamp,\r\n generateList,\r\n createContext,\r\n ContextMap,\r\n Random,\r\n SeedGenerator,\r\n parseCSV,\r\n parseData,\r\n} from '../util';\r\nexport type {\r\n Reference,\r\n RefTarget,\r\n Context,\r\n DataRecord,\r\n ParseCSVOptions,\r\n} from '../util';\r\n\r\n// =============================================================\r\n// Editor selection — node boxes, hit testing, transient overrides\r\n// =============================================================\r\n// The geometry an editor needs to lay a selection gizmo over the canvas: where a\r\n// node's pixels landed, and which node is under a point. Both are pure functions\r\n// over a scene's node tree, so a host can use them directly; a player embedding\r\n// reaches the same thing through `useMotionPlayer` (`getNodeBox`, `pickNode`,\r\n// `setNodeOverride`). Points and boxes are in viewport space — origin at the\r\n// viewport centre, y-up.\r\n//\r\n// These genuinely live in `../runtime` (node hit-testing and the transient\r\n// override store are runtime concerns) — deep-imported from their concrete\r\n// files, never the runtime barrel itself.\r\nexport { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement';\r\nexport type { PlacementIssue, PlacementOptions } from '../document/placement';\r\n\r\nexport {\r\n nodeBox,\r\n pickNode,\r\n collectBoxes,\r\n parentPlanePointAt,\r\n childPlanePointAt,\r\n reparentPlacementAt,\r\n nodeHandlesAt,\r\n handleValueAt,\r\n} from '../runtime/node-picking';\r\nexport type {\r\n NodeBox,\r\n ReparentPlacement,\r\n} from '../runtime/node-picking';\r\nexport type {\r\n NodeOverride,\r\n} from '../runtime/playback-controller';\r\nexport type {\r\n TreeState,\r\n} from '../project';\r\n/** @deprecated Kept until 1.0; see `../renamed-scene-names`. */\r\nexport type { SceneDocument, SceneEffect } from '../renamed-scene-names';\r\n"]}
|
package/dist/tween/command.d.ts
CHANGED
|
@@ -31,6 +31,18 @@ export interface CommandArgs<T = Record<string, unknown>, R = T> {
|
|
|
31
31
|
easing?: EasingFunction;
|
|
32
32
|
lerp?: LerpFunction<R>;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Mark a command whose `at` reads nothing but what it captured when it was built
|
|
36
|
+
* and does nothing but write prop slots, its end values all at `at(1)`. A
|
|
37
|
+
* timeline may then hold it finished by writing those end values instead of
|
|
38
|
+
* running it — see `document/settled-index`.
|
|
39
|
+
*/
|
|
40
|
+
export declare function settling<C extends {
|
|
41
|
+
at(t: number): unknown;
|
|
42
|
+
}>(command: C): C;
|
|
43
|
+
export declare function settles(command: {
|
|
44
|
+
at(t: number): unknown;
|
|
45
|
+
}): boolean;
|
|
34
46
|
/** True when `x` is a {@link Command} rather than a plain object. */
|
|
35
47
|
export declare function isCommand(x: unknown): x is Command;
|
|
36
48
|
/** What a {@link Command} writes its evaluated props onto. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.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EAAE,MAAM,KAAK,IAAI,EAC1B,MAAM,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAMhC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAyB7F;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC7B,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EACxB,GAAG,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAC1B,OAAO,CAAC,CAAC,CAAC,CAeZ;AAED,yHAAyH;AACzH,wBAAgB,eAAe,CAAC,CAAC,EAC7B,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EACxB,GAAG,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAC1B,OAAO,CAAC,CAAC,CAAC,CAYZ"}
|
package/dist/tween/command.js
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { clamp01 } from "../util/clamp.js";
|
|
2
2
|
import { loopPasses, loopPhase, loopSpan } from "./loop.js";
|
|
3
|
+
const SETTLES = Symbol("settles");
|
|
4
|
+
/**
|
|
5
|
+
* Mark a command whose `at` reads nothing but what it captured when it was built
|
|
6
|
+
* and does nothing but write prop slots, its end values all at `at(1)`. A
|
|
7
|
+
* timeline may then hold it finished by writing those end values instead of
|
|
8
|
+
* running it — see `document/settled-index`.
|
|
9
|
+
*/
|
|
10
|
+
export function settling(command) {
|
|
11
|
+
command[SETTLES] = true;
|
|
12
|
+
return command;
|
|
13
|
+
}
|
|
14
|
+
export function settles(command) {
|
|
15
|
+
return command[SETTLES] === true;
|
|
16
|
+
}
|
|
3
17
|
/** True when `x` is a {@link Command} rather than a plain object. */
|
|
4
18
|
export function isCommand(x) {
|
|
5
19
|
return typeof x?.at === "function"
|