@motionscript/sdk 0.1.0-alpha.6 → 0.1.0-alpha.8

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @motionscript/sdk
2
2
 
3
+ ## 0.1.0-alpha.8
4
+
5
+ ## 0.1.0-alpha.7
6
+
7
+ ### Minor Changes
8
+
9
+ - 737f7d0: What was left of the class authoring system is gone. Each piece existed to write or extend a node class, and a node type is a component now; no built-in, kit or host used them.
10
+
11
+ Removed from `@motionscript/core`:
12
+
13
+ - the registration functions `property`, `node`, `command` and `withdraw`, and the thirteen typed property helpers (`fillProperty`, `strokeProperty`, `shadowProperty`, `effectsProperty`, `colorProperty`, `cornerRadiusProperty`, `cornerStyleProperty`, `pathProperty`, `insetsProperty`, `alignmentProperty`, `vector2Property`, `sizeProperty`, `textProperty`) with their `AttributePropOptions` type. A component declares its entries with `Types`. `getPropertyMeta`, `getNodeDescriptor`, `getCommandMeta` and the metadata types stay;
14
+ - `TextSelection`, `TextSelectionHost`, `TextSelectionProps`, `TextRange`, `SelectionOverrides` and `normalizeRanges`: the component `Text` has no selection API, so nothing could make one. Style a range with `runs`;
15
+ - `AudioScope` and the `declareAudio` hook on `Node`: sound plays from commands (`timeline.sound`). `busPathOf` and `busPathTo` take a function answering a node's span instead of an `AudioScope`;
16
+ - the `Node.tick` hook and the `Node2D` hooks `beforeRender`, `afterRender`, `renderStroke`, `clipPathSelf`, `resolveSizeInput` and `constraints`, which only a subclass could reach;
17
+ - `NodeTypeRecord.withdrawn` and `CommandMeta.withdrawn`. `PropertyMeta.withdrawn` stays, deprecated: nothing sets it.
18
+
19
+ Removed from `@motionscript/core/component`, and so from `@motionscript/sdk/component` and `@motionscript/charts/kit`, which re-export it: the seekable composition `at`, `hold`, `sequence` and `together`, with the `Seekable` and `Placed` types. A component command returns timeline pieces.
20
+
21
+ Removed from `@motionscript/sdk`: `TextSelection`, `TextSelectionProps`, `TextRange`, `SelectionOverrides`, `AudioScope` and `AudioClip`.
22
+
3
23
  ## 0.1.0-alpha.6
4
24
 
5
25
  ### Minor Changes
package/NOTICE CHANGED
@@ -4,24 +4,25 @@ Copyright 2026 Motionscript LLC
4
4
  This product includes the third-party code below, each part under the MIT
5
5
  License reproduced at the end of this file.
6
6
 
7
- - packages/skia-render/src/fills/fractal-noise.ts: `hash2` is "Hash without
8
- Sine" by David Hoskins (https://www.shadertoy.com/view/4djSRW).
7
+ - packages/renderer/crates/renderer/src/shaders/prim.wgsl (`fn_hash2`):
8
+ "Hash without Sine" by David Hoskins (https://www.shadertoy.com/view/4djSRW).
9
9
  Copyright (c) 2014 David Hoskins.
10
10
 
11
- - packages/skia-render/src/fills/fractal-noise.ts: `simplexNoise` follows
12
- "Noise - simplex - 2D" by Inigo Quilez (https://www.shadertoy.com/view/Msf3WH).
13
- Copyright (c) 2013 Inigo Quilez.
11
+ - packages/renderer/crates/renderer/src/shaders/prim.wgsl (`simplex_noise`): "Noise - simplex - 2D" by Inigo Quilez
12
+ (https://www.shadertoy.com/view/Msf3WH). Copyright (c) 2013 Inigo Quilez.
14
13
 
15
- The project website, which is in the source repository only and in no npm
16
- package, also includes MIT code: its landing-page background
17
- (packages/site/components/landing/GradientBackground.tsx) uses 3D simplex
18
- noise from webgl-noise by Ian McEwan, Ashima Arts
19
- (https://github.com/ashima/webgl-noise). Copyright (C) 2011 by Ashima Arts.
14
+ - packages/renderer/crates/render3d (in @motionscript/renderer's WebAssembly):
15
+ its shaders (src/shaders/mesh.wgsl) port three.js r185's mesh programs and
16
+ src/geometry.rs its primitive generators (https://threejs.org).
17
+ Copyright (c) 2010-2026 three.js authors.
20
18
 
21
- @motionscript/canvaskit is a build of Skia's CanvasKit (BSD-3-Clause,
22
- Copyright (c) 2011 Google Inc.) and carries FreeType, HarfBuzz, ICU, zlib,
23
- libpng, Brotli, WOFF2, Emscripten and musl; their notices are in
24
- packages/canvaskit/THIRD_PARTY_NOTICES.txt.
19
+ @motionscript/renderer's WebAssembly (dist/ms_renderer_bg.wasm) compiles in
20
+ Rust crates under MIT, Apache-2.0, Zlib and Unicode-3.0 terms (wgpu, naga,
21
+ harfrust, read-fonts, kurbo, wasm-bindgen and others); their notices are in
22
+ packages/renderer/THIRD_PARTY_NOTICES.txt.
23
+
24
+ MP3 export loads @mediabunny/mp3-encoder (MPL-2.0), a WebAssembly build of
25
+ the LAME MP3 encoder (LGPL, https://lame.sourceforge.io), on first use.
25
26
 
26
27
  The browser builds under dist/browser/ bundle each package's npm dependencies;
27
28
  dist/browser/THIRD_PARTY_LICENSES.txt in each package lists them with their
package/README.md CHANGED
@@ -15,7 +15,7 @@ Install it with a rendering backend such as
15
15
  [`@motionscript/browser`](https://github.com/motionscript-dev/motionscript/tree/main/packages/browser):
16
16
 
17
17
  ```bash
18
- npm install @motionscript/sdk @motionscript/core @motionscript/browser @motionscript/canvaskit
18
+ npm install @motionscript/sdk @motionscript/core @motionscript/browser
19
19
  ```
20
20
 
21
21
  `@motionscript/core` is a peer dependency rather than a bundled one: the
@@ -44,8 +44,7 @@ const doc: CompositionDocument = {
44
44
  ],
45
45
  };
46
46
 
47
- // Serve canvaskit.wasm from @motionscript/canvaskit as a static file.
48
- const engine = await createBrowserEngine({ wasmUrl: '/canvaskit.wasm' });
47
+ const engine = await createBrowserEngine();
49
48
  const session = engine.open({ document: doc, target: document.querySelector('canvas')! });
50
49
  session.playback!.play();
51
50
  ```
@@ -54,7 +53,7 @@ A scene is data: nodes, and commands placed at times, so any frame can be asked
54
53
  for directly and a seek costs the same in either direction. Custom drawing, and
55
54
  anything JSON cannot express, belongs in a component registered with the engine
56
55
  and named by key (see [Writing a node type](#writing-a-node-type)). Flow layout,
57
- fills, gradients, filters, SkSL shader effects, paths, text, audio and 3D are
56
+ fills, gradients, filters, WGSL shader effects, paths, text, audio and 3D are
58
57
  all supported. See the
59
58
  [docs](https://motionscript.dev/docs) for the full feature set.
60
59
 
@@ -62,7 +61,9 @@ all supported. See the
62
61
 
63
62
  - **Documents & projects**: the `ProjectDocument`, `StillDocument`,
64
63
  `CompositionDocument` and `AudioDocument` types, `asProjectDocument`,
65
- `validateDocument`, and the `Registry` a document compiles against.
64
+ `validateDocument`, `migrateDocument` (and `DOCUMENT_FORMAT_VERSION`,
65
+ `DocumentTooNewError`, `migrateNodeProps`) for documents saved by older
66
+ releases, and the `Registry` a document compiles against.
66
67
  - **Nodes**: geometry (`Rect`, `Ellipse`, `Path`, `Polygon`,
67
68
  `Polygram`, `MaskGroup`, `BooleanGroup`), text (`Text`,
68
69
  `RichText`, `NumberNode`), structure (`Canvas2D`, `Canvas3D`, `Camera`), and
@@ -78,10 +79,11 @@ all supported. See the
78
79
  type's own), each placed at a time, easing (`linear`, `easeIn`,
79
80
  `easeOut`, `easeInOut`), and interpolation (`lerpNumber`).
80
81
  - **Styling & effects**: `Fills`, `Effects`, `Adjustments`, `VideoAdjustments`,
81
- `AudioFilters`, plus the `Stroke`/`Shadow`/`Corners` attribute types.
82
+ `AudioEffects`, plus the `Stroke`/`Shadow`/`Corners` attribute types.
82
83
  `ImageFilters` and `VideoFilters` remain as `@deprecated` aliases until the
83
84
  next major.
84
- - **Audio**: the `SoundNode` and `AudioBus` nodes.
85
+ - **Audio**: the `SoundNode` and `AudioBus` nodes, and `ramp`/`hold` for
86
+ JSON automation of their levels, speed and effects.
85
87
  - **Utilities**: `createRef`, `clamp`, `generateList`, `createContext`,
86
88
  `Random`.
87
89
  - **Component machinery**: `@motionscript/sdk/component`, what a component
@@ -111,8 +113,8 @@ lists live in core, in `src/sdk/index.ts` (named exports, no wildcards) and
111
113
  `src/component.ts` (eight `export *` lines), so there is one list rather than two
112
114
  that drift. A name an author would reasonably reach for is added to core's
113
115
  `src/sdk/index.ts`; rebuilding core adds it here with no edit in this package.
114
- One that only a host or a test needs stays in core. `Curve` and `FillChain` are
115
- classes in core but exported as types here: named, never constructed.
116
+ One that only a host or a test needs stays in core. `FillChain` is a class in
117
+ core but exported as a type here: named, never constructed.
116
118
 
117
119
  The types and values resolve through core's built `dist/`, so nothing imports
118
120
  until core has been built. `src/tests/sdk-parity.test.ts` in core compares this
@@ -138,7 +140,7 @@ export const Gauge = component2d({
138
140
  })),
139
141
  });
140
142
 
141
- const engine = await createBrowserEngine({ wasmUrl: '/canvaskit.wasm', nodes: [Gauge] });
143
+ const engine = await createBrowserEngine({ nodes: [Gauge] });
142
144
  ```
143
145
 
144
146
  The factory generates the node class, declares its key and writes its entries
@@ -157,7 +159,7 @@ export to its file and lists core under `peers`. An import map names
157
159
  subpaths) once, and every kit loaded beside them shares both.
158
160
 
159
161
  This package has no rendering backend of its own. Pair it with
160
- [`@motionscript/browser`](https://github.com/motionscript-dev/motionscript/tree/main/packages/browser) (Skia/CanvasKit), and use
162
+ [`@motionscript/browser`](https://github.com/motionscript-dev/motionscript/tree/main/packages/browser) (WebGPU), and use
161
163
  [`@motionscript/react`](https://github.com/motionscript-dev/motionscript/tree/main/packages/react) to mount a player in a React app. See the
162
164
  [docs](https://motionscript.dev/docs) for the full API reference.
163
165
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/component.ts"],
4
- "sourcesContent": ["/**\r\n * `@motionscript/sdk/component` — what a component package needs beyond the\r\n * authoring barrel: seekable entrances (`at`, `sequence`, `together`, `hold`,\r\n * `compose`, `drive`, and `asCommand` to return one from a `@command()` method),\r\n * `declarePaints`, number formatting and the orbit-camera lerps.\r\n *\r\n * A subpath, not part of `.`, because a scene author never reaches for it and\r\n * one name collides: `hold` here is a seekable pause, where the barrel's `hold`\r\n * is an audio curve. The curation is `@motionscript/core/component`'s, for the\r\n * same reason `index.ts` passes through `@motionscript/core/sdk`.\r\n */\r\nexport * from \"@motionscript/core/component\";\r\n"],
5
- "mappings": "AAWA,WAAc",
4
+ "sourcesContent": ["/**\r\n * `@motionscript/sdk/component` — what a component package needs beyond the\r\n * authoring barrel: number formatting, text defaults, the named shape outlines\r\n * and the orbit-camera lerps.\r\n *\r\n * A subpath, not part of `.`, because a scene author never reaches for it. The\r\n * curation is `@motionscript/core/component`'s, for the same reason\r\n * `index.ts` passes through `@motionscript/core/sdk`.\r\n */\r\nexport * from \"@motionscript/core/component\";\r\n"],
5
+ "mappings": "AASA,WAAc",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/sdk",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.8",
4
4
  "exports": {
5
5
  ".": "dist/browser/index.js",
6
6
  "./component": "dist/browser/component.js"
@@ -1,13 +1,11 @@
1
1
  /**
2
2
  * `@motionscript/sdk/component` — what a component package needs beyond the
3
- * authoring barrel: seekable entrances (`at`, `sequence`, `together`, `hold`,
4
- * `compose`, `drive`, and `asCommand` to return one from a `@command()` method),
5
- * `declarePaints`, number formatting and the orbit-camera lerps.
3
+ * authoring barrel: number formatting, text defaults, the named shape outlines
4
+ * and the orbit-camera lerps.
6
5
  *
7
- * A subpath, not part of `.`, because a scene author never reaches for it and
8
- * one name collides: `hold` here is a seekable pause, where the barrel's `hold`
9
- * is an audio curve. The curation is `@motionscript/core/component`'s, for the
10
- * same reason `index.ts` passes through `@motionscript/core/sdk`.
6
+ * A subpath, not part of `.`, because a scene author never reaches for it. The
7
+ * curation is `@motionscript/core/component`'s, for the same reason
8
+ * `index.ts` passes through `@motionscript/core/sdk`.
11
9
  */
12
10
  export * from "@motionscript/core/component";
13
11
  //# sourceMappingURL=component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAc,8BAA8B,CAAC"}
package/dist/component.js CHANGED
@@ -1,13 +1,11 @@
1
1
  /**
2
2
  * `@motionscript/sdk/component` — what a component package needs beyond the
3
- * authoring barrel: seekable entrances (`at`, `sequence`, `together`, `hold`,
4
- * `compose`, `drive`, and `asCommand` to return one from a `@command()` method),
5
- * `declarePaints`, number formatting and the orbit-camera lerps.
3
+ * authoring barrel: number formatting, text defaults, the named shape outlines
4
+ * and the orbit-camera lerps.
6
5
  *
7
- * A subpath, not part of `.`, because a scene author never reaches for it and
8
- * one name collides: `hold` here is a seekable pause, where the barrel's `hold`
9
- * is an audio curve. The curation is `@motionscript/core/component`'s, for the
10
- * same reason `index.ts` passes through `@motionscript/core/sdk`.
6
+ * A subpath, not part of `.`, because a scene author never reaches for it. The
7
+ * curation is `@motionscript/core/component`'s, for the same reason
8
+ * `index.ts` passes through `@motionscript/core/sdk`.
11
9
  */
12
10
  export * from "@motionscript/core/component";
13
11
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,8BAA8B,CAAC","sourcesContent":["/**\r\n * `@motionscript/sdk/component` — what a component package needs beyond the\r\n * authoring barrel: seekable entrances (`at`, `sequence`, `together`, `hold`,\r\n * `compose`, `drive`, and `asCommand` to return one from a `@command()` method),\r\n * `declarePaints`, number formatting and the orbit-camera lerps.\r\n *\r\n * A subpath, not part of `.`, because a scene author never reaches for it and\r\n * one name collides: `hold` here is a seekable pause, where the barrel's `hold`\r\n * is an audio curve. The curation is `@motionscript/core/component`'s, for the\r\n * same reason `index.ts` passes through `@motionscript/core/sdk`.\r\n */\r\nexport * from \"@motionscript/core/component\";\r\n"]}
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAc,8BAA8B,CAAC","sourcesContent":["/**\r\n * `@motionscript/sdk/component` — what a component package needs beyond the\r\n * authoring barrel: number formatting, text defaults, the named shape outlines\r\n * and the orbit-camera lerps.\r\n *\r\n * A subpath, not part of `.`, because a scene author never reaches for it. The\r\n * curation is `@motionscript/core/component`'s, for the same reason\r\n * `index.ts` passes through `@motionscript/core/sdk`.\r\n */\r\nexport * from \"@motionscript/core/component\";\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/sdk",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.8",
4
4
  "type": "module",
5
5
  "description": "The Motion Script authoring surface behind one import: document types, components and their modules, commands, styling, and the machinery component kits build on.",
6
6
  "repository": {
@@ -18,6 +18,7 @@
18
18
  "animation"
19
19
  ],
20
20
  "license": "Apache-2.0",
21
+ "author": "Motionscript",
21
22
  "publishConfig": {
22
23
  "access": "public"
23
24
  },
@@ -41,7 +42,7 @@
41
42
  }
42
43
  },
43
44
  "peerDependencies": {
44
- "@motionscript/core": "^0.1.0-alpha.6"
45
+ "@motionscript/core": "^0.1.0-alpha.8"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@types/node": "^25.6.2",
@@ -53,7 +54,7 @@
53
54
  "typescript": "^6.0.3",
54
55
  "typescript-eslint": "^8.48.0",
55
56
  "vitest": "^4.1.5",
56
- "@motionscript/core": "0.1.0-alpha.6"
57
+ "@motionscript/core": "0.1.0-alpha.8"
57
58
  },
58
59
  "scripts": {
59
60
  "build": "eslint . && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node ../../scripts/build-browser.mjs",