@alpha2-sh/editor 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +58 -1
  2. package/dist/browser/bridge.js +275 -52
  3. package/dist/browser/jobs.d.ts +17 -0
  4. package/dist/browser/jobs.js +40 -0
  5. package/dist/browser/resources.d.ts +9 -4
  6. package/dist/browser/resources.js +17 -5
  7. package/dist/browser/runtime/assets.d.ts +14 -2
  8. package/dist/browser/runtime/assets.js +37 -27
  9. package/dist/browser/runtime/audio.d.ts +12 -2
  10. package/dist/browser/runtime/audio.js +124 -14
  11. package/dist/browser/runtime/engine.js +8 -1
  12. package/dist/browser/runtime/exporter.d.ts +2 -1
  13. package/dist/browser/runtime/exporter.js +15 -4
  14. package/dist/browser/runtime/preview-utils.d.ts +12 -0
  15. package/dist/browser/runtime/preview-utils.js +45 -0
  16. package/dist/browser/runtime/sources.js +11 -34
  17. package/dist/browser/types.d.ts +105 -19
  18. package/dist/browser/worker.d.ts +4 -2
  19. package/dist/browser/worker.js +73 -24
  20. package/dist/core/commands.d.ts +46 -3
  21. package/dist/core/commands.js +212 -40
  22. package/dist/core/compositions.d.ts +27 -0
  23. package/dist/core/compositions.js +43 -0
  24. package/dist/core/data.d.ts +34 -0
  25. package/dist/core/data.js +69 -0
  26. package/dist/core/document.d.ts +10 -1
  27. package/dist/core/document.js +127 -6
  28. package/dist/core/keyframes.d.ts +3 -2
  29. package/dist/core/keyframes.js +6 -2
  30. package/dist/core/sameness.d.ts +6 -0
  31. package/dist/core/sameness.js +42 -0
  32. package/dist/core/session.d.ts +85 -7
  33. package/dist/core/session.js +124 -13
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.js +1 -0
  36. package/dist/native-client/index.d.ts +2 -2
  37. package/dist/native-client/index.js +2 -2
  38. package/dist/ports/index.d.ts +5 -4
  39. package/package.json +3 -3
@@ -66,8 +66,8 @@ function delay(ms, signal) {
66
66
  });
67
67
  }
68
68
  /**
69
- * A client for the native export service (`@alpha2-sh/node`'s HTTP host). Exports run with the
70
- * editor's retry policy; each job uploads its assets once and reuses them across attempts.
69
+ * A client for an HTTP export service the application runs. Exports run with the editor's retry
70
+ * policy; each job uploads its assets once and reuses them across attempts.
71
71
  */
72
72
  export function createNativeClient(options) {
73
73
  const request = options.fetch ?? fetch;
@@ -3,7 +3,7 @@ import type { ExportFailure } from "alpha2/export-failure";
3
3
  import type { AttemptRenderer, AttemptVideoEncoder, RetryProfile } from "alpha2/export-retry";
4
4
  import type { Project } from "alpha2/project";
5
5
  import type { EditorDocument, AssetDescriptor } from "../core/document.js";
6
- /** Shows a project in a preview surface. Implemented by the browser bridge and native previews. */
6
+ /** Shows a project in a preview surface. */
7
7
  export interface PreviewBridge {
8
8
  /** Replaces the shown project. `revision` increases with every call. */
9
9
  replaceProject(project: Project, revision: number): Promise<void>;
@@ -95,9 +95,10 @@ export type ExportArtifact = ({
95
95
  /**
96
96
  * The exporter's run report: timings, `performance` (with `memory` and `output`), rates. A
97
97
  * browser export adds `videoDecode` (the decode mode used), `videoConversion` (`engine` or
98
- * `browser`), and `decodeFallbacks`. Those list, per source, frames read by element seeks instead
99
- * of decoding (`kind: "element-seek"`, with reason, count and whether permanent), and sources
100
- * that `videoDecode: "software"` could not decode in software (`kind: "software-unavailable"`).
98
+ * `browser`), `silentAudioSources` (ids of sources whose audio was written silent) and
99
+ * `decodeFallbacks`, which lists per source the frames read by element seeks instead of decoding
100
+ * (`kind: "element-seek"`, with reason, count and whether permanent) and sources that
101
+ * `videoDecode: "software"` could not decode in software (`kind: "software-unavailable"`).
101
102
  */
102
103
  readonly report?: Readonly<Record<string, unknown>>;
103
104
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpha2-sh/editor",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "description": "Headless Project-based editing sessions and browser adapters for alpha2.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -60,11 +60,11 @@
60
60
  "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json"
61
61
  },
62
62
  "peerDependencies": {
63
- "alpha2": "0.5.3",
63
+ "alpha2": "0.6.0",
64
64
  "react": "^19.3.0"
65
65
  },
66
66
  "devDependencies": {
67
- "alpha2": "0.5.3",
67
+ "alpha2": "0.6.0",
68
68
  "react": "19.3.0",
69
69
  "react-dom": "19.3.0",
70
70
  "@types/react": "19.3.0",