@serimo/player 0.2.0 → 0.3.1
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/README.md +53 -2
- package/dist/audio/player-audio.d.ts +10 -0
- package/dist/audio/player-audio.d.ts.map +1 -0
- package/dist/audio/prepared-pcm.d.ts +8 -0
- package/dist/audio/prepared-pcm.d.ts.map +1 -0
- package/dist/composition/composition-player.d.ts.map +1 -0
- package/dist/composition/composition-timing.d.ts +2 -0
- package/dist/composition/composition-timing.d.ts.map +1 -0
- package/dist/{player-session.d.ts → composition/player-session.d.ts} +1 -9
- package/dist/composition/player-session.d.ts.map +1 -0
- package/dist/composition/player-status.d.ts.map +1 -0
- package/dist/composition/renderer-bridge.d.ts.map +1 -0
- package/dist/image/image-accessibility.d.ts +6 -0
- package/dist/image/image-accessibility.d.ts.map +1 -0
- package/dist/image/image-asset-types.d.ts +34 -0
- package/dist/image/image-asset-types.d.ts.map +1 -0
- package/dist/image/image-asset.d.ts +3 -0
- package/dist/image/image-asset.d.ts.map +1 -0
- package/dist/image/image-resources.d.ts +7 -0
- package/dist/image/image-resources.d.ts.map +1 -0
- package/dist/image/image-sequence.d.ts +3 -0
- package/dist/image/image-sequence.d.ts.map +1 -0
- package/dist/image/image-svg-animation.d.ts +5 -0
- package/dist/image/image-svg-animation.d.ts.map +1 -0
- package/dist/image/image-svg-validation.d.ts +10 -0
- package/dist/image/image-svg-validation.d.ts.map +1 -0
- package/dist/image/image-svg.d.ts +3 -0
- package/dist/image/image-svg.d.ts.map +1 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +732 -124
- package/dist/styles.css +273 -261
- package/package.json +6 -6
- package/dist/composition-player.d.ts.map +0 -1
- package/dist/player-audio.d.ts +0 -12
- package/dist/player-audio.d.ts.map +0 -1
- package/dist/player-session.d.ts.map +0 -1
- package/dist/player-status.d.ts.map +0 -1
- package/dist/renderer-bridge.d.ts.map +0 -1
- /package/dist/{composition-player.d.ts → composition/composition-player.d.ts} +0 -0
- /package/dist/{player-status.d.ts → composition/player-status.d.ts} +0 -0
- /package/dist/{renderer-bridge.d.ts → composition/renderer-bridge.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Build from the root so workspace dependencies such as `@serimo/core` are built b
|
|
|
25
25
|
npx playwright install chromium
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Pack Player with `npm pack --workspace=@serimo/player --ignore-scripts --pack-destination <existing-absolute-directory>` after building, using an existing directory outside the checkout. Install `serimo-player-0.
|
|
28
|
+
Pack Player with `npm pack --workspace=@serimo/player --ignore-scripts --pack-destination <existing-absolute-directory>` after building, using an existing directory outside the checkout. Install `serimo-player-0.2.0.tgz` alongside the matching Core archive and React. Player has external peers `@serimo/core@0.2.0` and `react@19.3.1`. The browser host supplies `react-dom@19.3.1`, and Core requires `gsap@3.15.0`. The build compiles the required UI JavaScript and styles into the Player archive. [CLI preview setup](../cli/README.md#preview-a-source-composition) · [Migration guide for older projects](../cli/README.md#migrate-private-runtime-consumers)
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
31
31
|
|
|
@@ -99,7 +99,7 @@ To embed a composition **without** a browser global, render `CompositionPlayer`
|
|
|
99
99
|
|
|
100
100
|
## API Reference
|
|
101
101
|
|
|
102
|
-
Player exports
|
|
102
|
+
Player exports React components and their supporting types from the `@serimo/player` entry point. `@serimo/player/styles.css` is a separate precompiled CSS export; the JS entry does not import it automatically. Existing hosts may retain their shared stylesheet setup. Examples below reuse `composition` and `components` from [Usage](#usage).
|
|
103
103
|
|
|
104
104
|
### `@serimo/player`
|
|
105
105
|
|
|
@@ -149,6 +149,41 @@ function RenderScene() {
|
|
|
149
149
|
|
|
150
150
|
While mounted, exposes `window.__serimoRenderer` with the `PlayerHandle` methods below. Only **one** bridge may own a page; mounting another throws, and unmount removes the global. The bridge follows the active Player instance. It is an internal Renderer contract, **not** a published browser SDK.
|
|
151
151
|
|
|
152
|
+
#### `ImageAsset`
|
|
153
|
+
|
|
154
|
+
Renders a prepared image inside a composition adapter and registers its timeline with Core. Acquire the descriptor with the [CLI portable-image workflow](../cli/README.md#freeze-portable-images); raw remote URLs are not accepted as this component's input.
|
|
155
|
+
|
|
156
|
+
```tsx
|
|
157
|
+
import { ImageAsset, type PlayerComponent } from "@serimo/player"
|
|
158
|
+
import heroArt from "serimo:images/hero-art"
|
|
159
|
+
|
|
160
|
+
const imageComponent: PlayerComponent = ({ clip, registry }) => (
|
|
161
|
+
<ImageAsset
|
|
162
|
+
asset={heroArt}
|
|
163
|
+
clipId={clip.id}
|
|
164
|
+
registry={registry}
|
|
165
|
+
alt='Hero illustration'
|
|
166
|
+
style={{ width: 320, height: 180 }}
|
|
167
|
+
/>
|
|
168
|
+
)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
The CLI import requires the wildcard TypeScript declaration in its recipe. Other trusted hosts must supply equivalent validated `FrozenImageAsset` descriptors and same-origin prepared resources; Player does not download originals or run the freeze pipeline.
|
|
172
|
+
|
|
173
|
+
| Prop | Type | Description |
|
|
174
|
+
| -------------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
175
|
+
| `asset` | `FrozenImageAsset` | Required prepared static raster, raster sequence or validated SVG tree. |
|
|
176
|
+
| `clipId` | `string` | Required ID of the composition clip. |
|
|
177
|
+
| `registry` | `Pick<ReturnType<typeof createTimelineRegistry>, "register">` | Required registry supplied to the adapter. |
|
|
178
|
+
| `alt` | `string` | Required accessible description; use `""` for decoration. |
|
|
179
|
+
| `className`, `style` | `string`, `CSSProperties` | Optional presentation on the image root. |
|
|
180
|
+
|
|
181
|
+
Exported types are `ImageAssetProps`, `FrozenImageAsset`, `FrozenImageFrame` and `FrozenSvgNode`. Descriptors have `schemaVersion: 1`, intrinsic `width`/`height`, `kind: "static" | "sequence" | "svg"`, total `plays` and a `frames` array. Each raster frame has `src`, byte length and optional rational `timing: { numerator, denominator }` in seconds. SVG descriptors contain an inert `tree` and prepared-data byte estimate. Treat descriptors as immutable preparation results; changing one remounts its resources.
|
|
182
|
+
|
|
183
|
+
Readiness waits for all image resources before registering the clip. Same-origin prepared PNGs are byte/dimension checked and decoded once per shared URL, with reference-counted leases in the document. Decode is sequential; stale work cannot register or revive an unmounted clip, and final release closes bitmaps. Each raster instance owns its canvas; SVG instances own isolated roots, IDs and paused SMIL/CSS effects. Cleanup unregisters the timeline and releases reservations/resources.
|
|
184
|
+
|
|
185
|
+
Animation uses clip-local composition time and the composition FPS, including reverse and random seek. Source raster frame durations remain exact rational values, with exclusive frame ends; finite plays hold the final raster frame and infinite plays repeat. SVG time-based SMIL and supported CSS keyframes are sampled synchronously, without a wall-clock playback loop. Pause therefore holds the same state during preview and capture. The [CLI recipe](../cli/README.md#freeze-portable-images) specifies supported formats, the safe SVG subset and strict input limits. Player enforces descriptor boundaries and a separate 512 MiB per-document managed-data budget for prepared bytes, decoded surfaces, canvas/tree data and CSS effects. This is not a native process RSS cap or a guarantee of identical pixels across environments.
|
|
186
|
+
|
|
152
187
|
#### `PlayerComponent`
|
|
153
188
|
|
|
154
189
|
Adapter function that maps a validated clip to a locally imported React element with a registered Core timeline.
|
|
@@ -223,6 +258,22 @@ After readiness, invoke `audio.play(frame)` directly in the user's click/keyboar
|
|
|
223
258
|
|
|
224
259
|
Player supplies audio controls; the host owns playback scheduling and terminal behavior. The CLI holds frame N−1 until N/FPS for audio compositions, then pauses, and never seeks frame N. Replacement, failure and unmount fence old handles and dispose audio resources. Silent handles retain their existing three methods without an `audio` member. See the [integration guide](../../docs/guides/composition-player-renderer.md#voiceover-preparation-playback-dan-ekspor) for measured timing and limitations.
|
|
225
260
|
|
|
261
|
+
## Internal architecture
|
|
262
|
+
|
|
263
|
+
### Composition
|
|
264
|
+
|
|
265
|
+
[Composition setup](src/composition/composition-player.tsx) validates the input through Core, assembles the ordered clips, and exposes the active session through a React ref. The [session](src/composition/player-session.ts) owns the readiness deadline, initial seek, and cancellation for each mount. The [browser bridge](src/composition/renderer-bridge.tsx) exposes the active handle to the CLI and Renderer. The CLI can extend readiness with its own font and image checks.
|
|
266
|
+
|
|
267
|
+
### Audio
|
|
268
|
+
|
|
269
|
+
[PCM preparation](src/audio/prepared-pcm.ts) bounds and validates the WAV response. The [audio runtime](src/audio/player-audio.ts) decodes each unique source, owns the Web Audio graph, and schedules tracks on a shared output clock.
|
|
270
|
+
|
|
271
|
+
### Prepared images
|
|
272
|
+
|
|
273
|
+
[`ImageAsset`](src/image/image-asset.tsx) validates the shared declaration and dispatches by asset kind. Its raster implementation registers a canvas and uses the [composition FPS](src/composition/composition-timing.ts) to select [sequence frames](src/image/image-sequence.ts) at exact rational intervals. The [document resource store](src/image/image-resources.ts) owns the decode queue and shared bitmap leases.
|
|
274
|
+
|
|
275
|
+
[SVG validation](src/image/image-svg-validation.ts) checks the prepared tree and CSS before the [SVG component](src/image/image-svg.tsx) constructs the isolated DOM and registers its playhead. The [animation sampler](src/image/image-svg-animation.ts) applies a fixed state at each seek.
|
|
276
|
+
|
|
226
277
|
## Tests and limitations
|
|
227
278
|
|
|
228
279
|
From the repository root, after building dependencies:
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type MotionComposition } from '@serimo/core/composition';
|
|
2
|
+
export declare function createPlayerAudio(composition: MotionComposition, signal: AbortSignal): {
|
|
3
|
+
ready: Promise<void>;
|
|
4
|
+
pause: () => void;
|
|
5
|
+
dispose: () => Promise<void>;
|
|
6
|
+
play(frame: number): Promise<{
|
|
7
|
+
originTimeMs: number;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=player-audio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player-audio.d.ts","sourceRoot":"","sources":["../../src/audio/player-audio.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,iBAAiB,EAGvB,MAAM,0BAA0B,CAAA;AA6BjC,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,iBAAiB,EAC9B,MAAM,EAAE,WAAW;;;;gBA6FL,MAAM,GAAG,OAAO,CAAC;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;EA+EzD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PCM_SAMPLE_RATE = 48000;
|
|
2
|
+
export declare const MAX_PCM_BYTES: number;
|
|
3
|
+
export declare function inspectPreparedPcm(bytes: ArrayBuffer, required: number): {
|
|
4
|
+
channels: number;
|
|
5
|
+
samples: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function readPreparedPcm(src: string, signal: AbortSignal): Promise<ArrayBuffer>;
|
|
8
|
+
//# sourceMappingURL=prepared-pcm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepared-pcm.d.ts","sourceRoot":"","sources":["../../src/audio/prepared-pcm.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,QAAQ,CAAA;AACpC,eAAO,MAAM,aAAa,QAAoB,CAAA;AAE9C,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM;;;EA+CtE;AAED,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,wBAiCrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition-player.d.ts","sourceRoot":"","sources":["../../src/composition/composition-player.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAuB,MAAM,0BAA0B,CAAA;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,GAAG,EAMT,MAAM,OAAO,CAAA;AAGd,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,qBAAqB,CAAA;AAG5E,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAA;IACnD,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,sBAAsB,KAAK,YAAY,CAAA;AAE/E,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC3C,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAA;CACxB;AAyCD,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,UAAU,EACV,GAAG,EACJ,EAAE,sBAAsB,+BA4DxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition-timing.d.ts","sourceRoot":"","sources":["../../src/composition/composition-timing.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,wCAAqC,CAAA"}
|
|
@@ -13,15 +13,7 @@ export interface PlayerHandle {
|
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
export declare function createPlayerSession(composition: MotionComposition, registry: Registry): {
|
|
16
|
-
|
|
17
|
-
seek(frame: number): Promise<void>;
|
|
18
|
-
getComposition(): Pick<MotionComposition, 'id' | 'width' | 'height' | 'fps' | 'durationInFrames' | 'audio'>;
|
|
19
|
-
audio?: {
|
|
20
|
-
play(frame: number): Promise<{
|
|
21
|
-
originTimeMs: number;
|
|
22
|
-
}>;
|
|
23
|
-
pause(): void;
|
|
24
|
-
};
|
|
16
|
+
handle: PlayerHandle;
|
|
25
17
|
start(): Promise<void>;
|
|
26
18
|
stop: () => Promise<void>;
|
|
27
19
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player-session.d.ts","sourceRoot":"","sources":["../../src/composition/player-session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAI5E,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAQzD,MAAM,WAAW,YAAY;IAC3B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClC,cAAc,IAAI,IAAI,CACpB,iBAAiB,EACjB,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,kBAAkB,GAAG,OAAO,CACjE,CAAA;IACD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;YAAE,YAAY,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QACtD,KAAK,IAAI,IAAI,CAAA;KACd,CAAA;CACF;AAED,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,iBAAiB,EAC9B,QAAQ,EAAE,QAAQ;;;;EAiHnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player-status.d.ts","sourceRoot":"","sources":["../../src/composition/player-status.tsx"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,KAAK,EACN,EAAE;IACD,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,sCAWA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer-bridge.d.ts","sourceRoot":"","sources":["../../src/composition/renderer-bridge.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAA;AAKhC,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,KAAK,CAAC,+BAsD3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-accessibility.d.ts","sourceRoot":"","sources":["../../src/image/image-accessibility.ts"],"names":[],"mappings":"AAAA,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM;;;;EAMrD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { createTimelineRegistry } from '@serimo/core/timeline-registry';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
export interface FrozenImageFrame {
|
|
4
|
+
src: string;
|
|
5
|
+
bytes: number;
|
|
6
|
+
timing?: {
|
|
7
|
+
numerator: number;
|
|
8
|
+
denominator: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface FrozenSvgNode {
|
|
12
|
+
tag: string;
|
|
13
|
+
attributes: Readonly<Record<string, string>>;
|
|
14
|
+
children: readonly (FrozenSvgNode | string)[];
|
|
15
|
+
}
|
|
16
|
+
export interface FrozenImageAsset {
|
|
17
|
+
schemaVersion: 1;
|
|
18
|
+
kind: 'static' | 'sequence' | 'svg';
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
plays: number | 'infinite';
|
|
22
|
+
frames: readonly FrozenImageFrame[];
|
|
23
|
+
tree?: FrozenSvgNode;
|
|
24
|
+
bytes?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface ImageAssetProps {
|
|
27
|
+
asset: FrozenImageAsset;
|
|
28
|
+
clipId: string;
|
|
29
|
+
registry: Pick<ReturnType<typeof createTimelineRegistry>, 'register'>;
|
|
30
|
+
alt: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: CSSProperties;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=image-asset-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-asset-types.d.ts","sourceRoot":"","sources":["../../src/image/image-asset-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAA;CACpD;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAC5C,QAAQ,EAAE,SAAS,CAAC,aAAa,GAAG,MAAM,CAAC,EAAE,CAAA;CAC9C;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,CAAC,CAAA;IAChB,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,KAAK,CAAA;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,GAAG,UAAU,CAAA;IAC1B,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACnC,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,gBAAgB,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,EAAE,UAAU,CAAC,CAAA;IACrE,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-asset.d.ts","sourceRoot":"","sources":["../../src/image/image-asset.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAK7D,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAoBhD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FrozenImageFrame } from './image-asset-types.js';
|
|
2
|
+
export declare function reserveImageData(bytes: number, document?: Document): () => void;
|
|
3
|
+
export declare function acquireImageFrame(frame: FrozenImageFrame, width: number, height: number, document?: Document): {
|
|
4
|
+
ready: Promise<ImageBitmap>;
|
|
5
|
+
release(): void;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=image-resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-resources.d.ts","sourceRoot":"","sources":["../../src/image/image-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAkC9D,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,QAA8B,GACvC,MAAM,IAAI,CAgBZ;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,gBAAgB,EACvB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,GAAE,QAA8B,GACvC;IAAE,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAAC,OAAO,IAAI,IAAI,CAAA;CAAE,CAsKlD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-sequence.d.ts","sourceRoot":"","sources":["../../src/image/image-sequence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAO9D,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,gBAAgB,EAAE,EACnC,KAAK,EAAE,MAAM,GAAG,UAAU,EAC1B,GAAG,EAAE,MAAM,GACV,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAuDhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-svg-animation.d.ts","sourceRoot":"","sources":["../../src/image/image-svg-animation.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,aAAa;IAuDpD,IAAI,UAAU,MAAM;IA8BpB,OAAO;EAIV"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FrozenSvgNode } from './image-asset-types.js';
|
|
2
|
+
export declare function rejectPreparedSvg(): never;
|
|
3
|
+
export declare function inspectSvgTree(tree: FrozenSvgNode, bytes: number, width: number, height: number): {
|
|
4
|
+
styles: string[];
|
|
5
|
+
ids: Map<string, FrozenSvgNode>;
|
|
6
|
+
nodes: number;
|
|
7
|
+
masks: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function validateSvgStyles(styles: string[], ids: Map<string, FrozenSvgNode>, nodes: number): number;
|
|
10
|
+
//# sourceMappingURL=image-svg-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-svg-validation.d.ts","sourceRoot":"","sources":["../../src/image/image-svg-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAiC3D,wBAAgB,iBAAiB,IAAI,KAAK,CAEzC;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM;;;;;EAgJf;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EAAE,EAChB,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC/B,KAAK,EAAE,MAAM,UAyEd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-svg.d.ts","sourceRoot":"","sources":["../../src/image/image-svg.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiB,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAS5E,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,MAAM,EACN,QAAQ,EACR,GAAG,EACH,SAAS,EACT,KAAK,EACN,EAAE,eAAe,+BAwHjB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export { CompositionPlayer } from './composition-player.js';
|
|
2
|
-
export type { CompositionPlayerProps, PlayerComponent, PlayerComponentOptions } from './composition-player.js';
|
|
3
|
-
export type { PlayerHandle } from './player-session.js';
|
|
4
|
-
export { CompositionPlayerBridge } from './renderer-bridge.js';
|
|
1
|
+
export { CompositionPlayer } from './composition/composition-player.js';
|
|
2
|
+
export type { CompositionPlayerProps, PlayerComponent, PlayerComponentOptions } from './composition/composition-player.js';
|
|
3
|
+
export type { PlayerHandle } from './composition/player-session.js';
|
|
4
|
+
export { CompositionPlayerBridge } from './composition/renderer-bridge.js';
|
|
5
|
+
export { ImageAsset } from './image/image-asset.js';
|
|
6
|
+
export type { FrozenImageAsset, FrozenImageFrame, FrozenSvgNode, ImageAssetProps } from './image/image-asset-types.js';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AACvE,YAAY,EACV,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACvB,MAAM,qCAAqC,CAAA;AAC5C,YAAY,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,eAAe,EAChB,MAAM,8BAA8B,CAAA"}
|