alpha2 0.5.2 → 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 (91) hide show
  1. package/README.md +71 -5
  2. package/THIRD_PARTY_NOTICES.md +191 -1
  3. package/dist/apply-edit.d.ts +124 -0
  4. package/dist/apply-edit.js +15 -0
  5. package/dist/assets.d.ts +12 -0
  6. package/dist/audio-layout.js +6 -3
  7. package/dist/audio-worklet-processor.js +27 -33
  8. package/dist/audio.d.ts +5 -4
  9. package/dist/audio.js +8 -6
  10. package/dist/compose.d.ts +105 -0
  11. package/dist/compose.js +63 -0
  12. package/dist/decoder-fallback.d.ts +3 -2
  13. package/dist/decoder-fallback.js +11 -3
  14. package/dist/decoder-stall.d.ts +15 -0
  15. package/dist/decoder-stall.js +52 -0
  16. package/dist/edit-data.d.ts +24 -0
  17. package/dist/edit-data.js +224 -0
  18. package/dist/edit-keys.d.ts +16 -0
  19. package/dist/edit-keys.js +233 -0
  20. package/dist/edit.d.ts +41 -8
  21. package/dist/edit.js +123 -30
  22. package/dist/export-failure.d.ts +10 -2
  23. package/dist/export-failure.js +55 -4
  24. package/dist/export-retry.d.ts +6 -1
  25. package/dist/export-retry.js +12 -1
  26. package/dist/exporter.d.ts +11 -7
  27. package/dist/exporter.js +10 -9
  28. package/dist/extensions.d.ts +86 -28
  29. package/dist/extensions.js +204 -61
  30. package/dist/extract.d.ts +65 -0
  31. package/dist/extract.js +291 -0
  32. package/dist/extractor.d.ts +151 -0
  33. package/dist/extractor.js +141 -0
  34. package/dist/float32.d.ts +2 -0
  35. package/dist/float32.js +10 -0
  36. package/dist/frame-intake.d.ts +5 -0
  37. package/dist/frame-intake.js +10 -3
  38. package/dist/generated/builtin-effects.d.ts +3 -0
  39. package/dist/generated/builtin-effects.js +1804 -0
  40. package/dist/generated/project-schema.d.ts +696 -41
  41. package/dist/generated/project-schema.js +67 -0
  42. package/dist/generated/project-shape.js +986 -383
  43. package/dist/index.d.ts +1 -0
  44. package/dist/index.js +1 -0
  45. package/dist/json-text.js +14 -2
  46. package/dist/layout-values.js +7 -1
  47. package/dist/layout.d.ts +12 -4
  48. package/dist/media.d.ts +44 -11
  49. package/dist/media.js +256 -67
  50. package/dist/mediabunny.d.ts +32 -12
  51. package/dist/mediabunny.js +276 -90
  52. package/dist/player.d.ts +9 -3
  53. package/dist/player.js +114 -18
  54. package/dist/plugins.d.ts +62 -0
  55. package/dist/plugins.js +506 -0
  56. package/dist/project-data.d.ts +56 -0
  57. package/dist/project-data.js +765 -0
  58. package/dist/project.d.ts +36 -1
  59. package/dist/project.js +515 -42
  60. package/dist/robustness.d.ts +6 -33
  61. package/dist/robustness.js +2 -63
  62. package/dist/sha256.d.ts +3 -2
  63. package/dist/sha256.js +14 -6
  64. package/dist/wasm-module.d.ts +37 -0
  65. package/dist/wasm-module.js +47 -0
  66. package/dist/worker-error.d.ts +3 -2
  67. package/dist/worker-error.js +3 -1
  68. package/dist/worker.d.ts +13 -3
  69. package/dist/worker.js +36 -9
  70. package/package.json +36 -2
  71. package/wasm/alpha2_compose.d.ts +92 -0
  72. package/wasm/alpha2_compose.js +445 -0
  73. package/wasm/alpha2_compose_bg.wasm +0 -0
  74. package/wasm/alpha2_compose_bg.wasm.d.ts +17 -0
  75. package/wasm/alpha2_extensions.d.ts +4 -4
  76. package/wasm/alpha2_extensions.js +16 -4
  77. package/wasm/alpha2_extensions_bg.wasm +0 -0
  78. package/wasm/alpha2_extensions_pdf.d.ts +227 -0
  79. package/wasm/alpha2_extensions_pdf.js +841 -0
  80. package/wasm/alpha2_extensions_pdf_bg.wasm +0 -0
  81. package/wasm/alpha2_extensions_pdf_bg.wasm.d.ts +38 -0
  82. package/wasm/alpha2_wasm.d.ts +151 -18
  83. package/wasm/alpha2_wasm.js +403 -59
  84. package/wasm/alpha2_wasm_bg.wasm +0 -0
  85. package/wasm/alpha2_wasm_bg.wasm.d.ts +21 -6
  86. package/wasm/rust-crate-licenses.md +493 -54
  87. package/wasm/snippets/alpha2-wasm-1b02e9f302d283ba/inline3.js +7 -0
  88. /package/wasm/snippets/{alpha2-wasm-a21734ffde826659/inline1.js → alpha2-wasm-1b02e9f302d283ba/inline0.js} +0 -0
  89. /package/wasm/snippets/{alpha2-wasm-a21734ffde826659/inline2.js → alpha2-wasm-1b02e9f302d283ba/inline1.js} +0 -0
  90. /package/wasm/snippets/{alpha2-wasm-a21734ffde826659/inline3.js → alpha2-wasm-1b02e9f302d283ba/inline2.js} +0 -0
  91. /package/wasm/snippets/{alpha2-wasm-a21734ffde826659/inline0.js → alpha2-wasm-1b02e9f302d283ba/inline4.js} +0 -0
package/dist/project.d.ts CHANGED
@@ -8,6 +8,7 @@
8
8
  * Timeline values are integer ticks at {@link TICKS_PER_SECOND}. Ranges are half-open.
9
9
  */
10
10
  import type { Animated, Easing, FrameRate, Insets, Interpolation, LayoutOffset, LayoutSize, MediaTime, Paint, Project, Rgba, TextContent, VisualProperties } from "./generated/project-schema.js";
11
+ export { dataReferences, describeDataReference, type DataOwner, type DataReference, } from "./project-data.js";
11
12
  import { MAX_JSON_DEPTH } from "./json-text.js";
12
13
  export * from "./generated/project-schema.js";
13
14
  /** The deepest nesting of arrays and objects the engine reads in a project (serde_json's limit). */
@@ -115,7 +116,7 @@ type Same<A, B> = (<G>() => G extends A ? 1 : 2) extends <G>() => G extends B ?
115
116
  * values keep their CSS spelling.
116
117
  */
117
118
  export type Canonical<T> = CanonicalValue<Exclude<T, null | undefined>> | Extract<T, null | undefined>;
118
- type CanonicalValue<T> = [T] extends [never] ? never : Same<T, Rgba> extends true ? RgbaObject : Same<T, Paint> extends true ? CanonicalPaint : Same<T, Insets> extends true ? CanonicalInsets : Same<T, LayoutOffset> extends true ? CanonicalOffset : Same<T, VisualProperties> extends true ? CanonicalPart<Required<VisualProperties>> : CanonicalPart<T>;
119
+ type CanonicalValue<T> = [T] extends [never] ? never : Same<T, Rgba> extends true ? RgbaObject : Same<T, Paint> extends true ? CanonicalPaint : Same<T, Insets> extends true ? CanonicalInsets : Same<T, LayoutOffset> extends true ? CanonicalOffset : Same<T, VisualProperties> extends true ? CanonicalPart<Required<Omit<VisualProperties, "correction">> & Pick<VisualProperties, "correction">> : CanonicalPart<T>;
119
120
  type CanonicalPart<T> = T extends string | number | boolean | bigint ? T : {
120
121
  readonly [K in keyof T]: Canonical<T[K]>;
121
122
  };
@@ -143,6 +144,40 @@ export declare function canonicalPaint(paint: Paint): CanonicalPaint;
143
144
  * parts seen before are not walked again.
144
145
  */
145
146
  export declare function canonicalProject(project: Project): CanonicalProject;
147
+ /**
148
+ * `next` with every part that equals the matching part of `previous` replaced by that part, so
149
+ * a project an engine edit wrote keeps the objects of the project it was computed from wherever
150
+ * the edit changed nothing. A field one side omits counts as its schema default, as the engine
151
+ * reads it; arrays match items by string `id` when they have one, else by position. Both projects
152
+ * must be valid. The result reads as `next` does, though parts taken from `previous` keep its
153
+ * spelling of defaults.
154
+ */
155
+ export declare function shareUnchangedParts<T extends Project>(previous: Project, next: T): T;
156
+ /** What validation reads of a built-in effect or transition, generated from its definition. */
157
+ export interface BuiltinEffectRules {
158
+ readonly version: number;
159
+ readonly kind: "effect" | "transition";
160
+ readonly inputs: readonly string[];
161
+ readonly resources: readonly string[];
162
+ readonly params: Readonly<Record<string, {
163
+ readonly type: string;
164
+ readonly min?: number;
165
+ readonly max?: number;
166
+ readonly choices?: number;
167
+ }>>;
168
+ }
169
+ /**
170
+ * Whether a provider reads a file of the source's own. One that does not, such as LaTeX, holds its
171
+ * content in its settings, so its source has an empty locator and no fingerprint. Mirrors
172
+ * `ProviderSource::reads_file`.
173
+ */
174
+ export declare function providerReadsFile(provider: {
175
+ readonly format: string;
176
+ }): boolean;
177
+ /** The kind of source a provider's media is. Mirrors `ProviderSource::kind`. */
178
+ export declare function providerKind(provider: {
179
+ readonly format: string;
180
+ }): "image" | "video";
146
181
  /** What a {@link LintIssue} is about. */
147
182
  export type LintOwner = {
148
183
  readonly type: "clip";