alpha2 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/builder.d.ts CHANGED
@@ -96,6 +96,12 @@ export declare class ProjectBuilder {
96
96
  readonly id?: string;
97
97
  readonly hasAudio?: boolean;
98
98
  }): string;
99
+ /**
100
+ * Each media source's id mapped to its locator: the `assets` a native export (`@alpha2-sh/node`)
101
+ * reads, when the locators are file paths. A relative path resolves against the exporting
102
+ * process's working directory. Sources added to the built document by hand are not in it.
103
+ */
104
+ assets(): Record<string, string>;
99
105
  /** Adds a source the engine draws itself; returns its id. */
100
106
  generated(generator: Generator, options?: {
101
107
  readonly id?: string;
package/dist/builder.js CHANGED
@@ -82,6 +82,14 @@ export class ProjectBuilder {
82
82
  });
83
83
  return id;
84
84
  }
85
+ /**
86
+ * Each media source's id mapped to its locator: the `assets` a native export (`@alpha2-sh/node`)
87
+ * reads, when the locators are file paths. A relative path resolves against the exporting
88
+ * process's working directory. Sources added to the built document by hand are not in it.
89
+ */
90
+ assets() {
91
+ return Object.fromEntries(this.#sources.flatMap((source) => source.locator === undefined ? [] : [[source.id, source.locator]]));
92
+ }
85
93
  /** Adds a source the engine draws itself; returns its id. */
86
94
  generated(generator, options = {}) {
87
95
  const id = this.#claim("source", options.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alpha2",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "license": "MIT",
5
5
  "description": "JavaScript bindings for the standalone alpha2 media engine.",
6
6
  "repository": {
Binary file
@@ -1,8 +1,8 @@
1
1
  /* @ts-self-types="./alpha2_wasm.d.ts" */
2
- import { alpha2BitmapUploadsPremultiplied, alpha2FrameBitmap } from './snippets/alpha2-wasm-0797f901b5bd49b8/inline1.js';
3
- import { alpha2CopyExternalImage } from './snippets/alpha2-wasm-0797f901b5bd49b8/inline2.js';
4
- import * as import1 from "./snippets/alpha2-wasm-0797f901b5bd49b8/inline0.js"
5
- import * as import2 from "./snippets/alpha2-wasm-0797f901b5bd49b8/inline0.js"
2
+ import { alpha2BitmapUploadsPremultiplied, alpha2FrameBitmap } from './snippets/alpha2-wasm-6632ebab0576cb8c/inline1.js';
3
+ import { alpha2CopyExternalImage } from './snippets/alpha2-wasm-6632ebab0576cb8c/inline2.js';
4
+ import * as import1 from "./snippets/alpha2-wasm-6632ebab0576cb8c/inline0.js"
5
+ import * as import2 from "./snippets/alpha2-wasm-6632ebab0576cb8c/inline0.js"
6
6
 
7
7
 
8
8
  /**
@@ -2922,14 +2922,14 @@ function __wbg_get_imports() {
2922
2922
  __wbg_addEventListener_9534e2dc12044ee4: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2923
2923
  arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
2924
2924
  }, arguments); },
2925
- __wbg_alpha2BitmapUploadsPremultiplied_2521c3f042d1da6f: function() { return handleError(function () {
2925
+ __wbg_alpha2BitmapUploadsPremultiplied_f4176d1445011ff7: function() { return handleError(function () {
2926
2926
  const ret = alpha2BitmapUploadsPremultiplied();
2927
2927
  return ret;
2928
2928
  }, arguments); },
2929
- __wbg_alpha2CopyExternalImage_b5982c040cc2255b: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2929
+ __wbg_alpha2CopyExternalImage_f2a386448f368df3: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2930
2930
  alpha2CopyExternalImage(arg0, arg1, arg2, arg3 >>> 0, arg4 >>> 0);
2931
2931
  }, arguments); },
2932
- __wbg_alpha2FrameBitmap_a4f434b152445a3c: function() { return handleError(function (arg0, arg1, arg2) {
2932
+ __wbg_alpha2FrameBitmap_a90648b4e169b6dd: function() { return handleError(function (arg0, arg1, arg2) {
2933
2933
  const ret = alpha2FrameBitmap(arg0, arg1 >>> 0, arg2 >>> 0);
2934
2934
  return ret;
2935
2935
  }, arguments); },
@@ -5226,8 +5226,8 @@ function __wbg_get_imports() {
5226
5226
  return {
5227
5227
  __proto__: null,
5228
5228
  "./alpha2_wasm_bg.js": import0,
5229
- "./snippets/alpha2-wasm-0797f901b5bd49b8/inline0.js": import1,
5230
- "./snippets/alpha2-wasm-0797f901b5bd49b8/inline0.js": import2,
5229
+ "./snippets/alpha2-wasm-6632ebab0576cb8c/inline0.js": import1,
5230
+ "./snippets/alpha2-wasm-6632ebab0576cb8c/inline0.js": import2,
5231
5231
  };
5232
5232
  }
5233
5233
 
Binary file