@pixerate/editor 0.223.9 → 0.224.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/dist/animation-editor/index.cjs +9 -9
- package/dist/animation-editor/index.js +1 -1
- package/dist/canvas/index.cjs +7 -7
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-6DUEV36F.cjs → chunk-7AAS3JO6.cjs} +14 -14
- package/dist/{chunk-6G2NLMVK.js → chunk-HKPLKISO.js} +58 -9
- package/dist/{chunk-Z64NRDEH.cjs → chunk-MDNYYOBZ.cjs} +7 -7
- package/dist/{chunk-A3A5TI6R.cjs → chunk-NTWR5TQB.cjs} +59 -10
- package/dist/{chunk-OZSA5YEJ.js → chunk-RDTCG5MS.js} +1 -1
- package/dist/{chunk-WMVEYSOA.js → chunk-WA4IS2EY.js} +1 -1
- package/dist/effects/fake.d.cts +6 -1
- package/dist/effects/fake.d.ts +6 -1
- package/dist/effects/helpers.d.cts +24 -1
- package/dist/effects/helpers.d.ts +24 -1
- package/dist/effects/index.cjs +257 -62
- package/dist/effects/index.js +202 -7
- package/dist/effects/types.d.cts +121 -4
- package/dist/effects/types.d.ts +121 -4
- package/dist/image-editor/index.cjs +13 -13
- package/dist/image-editor/index.js +1 -1
- package/dist/paint-editor/index.cjs +7 -7
- package/dist/paint-editor/index.js +2 -2
- package/dist/vector/index.cjs +6 -6
- package/dist/vector/index.js +1 -1
- package/dist/video-editor/index.cjs +309 -309
- package/dist/video-editor/index.js +3 -3
- package/package.json +1 -1
- package/skills/pixerate-animation-editor/SKILL.md +1 -1
- package/skills/pixerate-image-portrait-retouch/SKILL.md +9 -5
- package/skills/pixerate-video-editor/SKILL.md +1 -1
package/dist/effects/fake.d.cts
CHANGED
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
* - `crossfade` (transition)
|
|
10
10
|
* - `fade-in` (motion, vector only)
|
|
11
11
|
* - `badge` (a vector effect with its own picture: a disc that fades in; vector only)
|
|
12
|
+
*
|
|
13
|
+
* With `camera: true` it also has camera moves (no pixels): `glide` and `whip` (transitions; the
|
|
14
|
+
* whip cuts halfway) and `drift` (a hold that zooms in slowly).
|
|
12
15
|
*/
|
|
13
16
|
import type { EffectProvider, EffectProviderCapabilities, EffectRenderRequest } from './types.cjs';
|
|
14
17
|
export interface FakeEffectProviderOptions {
|
|
@@ -18,6 +21,8 @@ export interface FakeEffectProviderOptions {
|
|
|
18
21
|
onRender?: (effectId: string, request: EffectRenderRequest) => void;
|
|
19
22
|
/** Whether authoring is supported (default true). */
|
|
20
23
|
authoring?: boolean;
|
|
24
|
+
/** Adds the camera moves and `cameraView` / `sampleCameraMove` (default false). */
|
|
25
|
+
camera?: boolean;
|
|
21
26
|
}
|
|
22
|
-
/** A deterministic CPU effects provider with
|
|
27
|
+
/** A deterministic CPU effects provider with seven effects, and three camera moves on request (see the module comment). */
|
|
23
28
|
export declare function createFakeEffectProvider(options?: FakeEffectProviderOptions): EffectProvider;
|
package/dist/effects/fake.d.ts
CHANGED
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
* - `crossfade` (transition)
|
|
10
10
|
* - `fade-in` (motion, vector only)
|
|
11
11
|
* - `badge` (a vector effect with its own picture: a disc that fades in; vector only)
|
|
12
|
+
*
|
|
13
|
+
* With `camera: true` it also has camera moves (no pixels): `glide` and `whip` (transitions; the
|
|
14
|
+
* whip cuts halfway) and `drift` (a hold that zooms in slowly).
|
|
12
15
|
*/
|
|
13
16
|
import type { EffectProvider, EffectProviderCapabilities, EffectRenderRequest } from './types.js';
|
|
14
17
|
export interface FakeEffectProviderOptions {
|
|
@@ -18,6 +21,8 @@ export interface FakeEffectProviderOptions {
|
|
|
18
21
|
onRender?: (effectId: string, request: EffectRenderRequest) => void;
|
|
19
22
|
/** Whether authoring is supported (default true). */
|
|
20
23
|
authoring?: boolean;
|
|
24
|
+
/** Adds the camera moves and `cameraView` / `sampleCameraMove` (default false). */
|
|
25
|
+
camera?: boolean;
|
|
21
26
|
}
|
|
22
|
-
/** A deterministic CPU effects provider with
|
|
27
|
+
/** A deterministic CPU effects provider with seven effects, and three camera moves on request (see the module comment). */
|
|
23
28
|
export declare function createFakeEffectProvider(options?: FakeEffectProviderOptions): EffectProvider;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* and a provider slot editors hold.
|
|
4
4
|
*/
|
|
5
5
|
import { type SchemaValidationError } from '../tools/schema.cjs';
|
|
6
|
-
import type { EffectDescription, EffectImageSource, EffectPixels, EffectProvider, EffectSearchOptions, EffectSummary, EffectValues } from './types.cjs';
|
|
6
|
+
import type { CameraMoveSample, CameraMoveSampleRequest, CameraView, EffectDescription, EffectImageSource, EffectPixels, EffectProvider, EffectSearchOptions, EffectSummary, EffectUse, EffectValues } from './types.cjs';
|
|
7
7
|
/** Problems with `values` against an effect's control schema (unknown controls, types, ranges). Partial values are fine. */
|
|
8
8
|
export declare function effectValueErrors(description: Pick<EffectDescription, 'controls'>, values: unknown): SchemaValidationError[];
|
|
9
9
|
/**
|
|
@@ -12,6 +12,12 @@ export declare function effectValueErrors(description: Pick<EffectDescription, '
|
|
|
12
12
|
* it before saving values.
|
|
13
13
|
*/
|
|
14
14
|
export declare function resolveEffectValues(description: Pick<EffectDescription, 'id' | 'controls' | 'defaults'>, values?: EffectValues): Record<string, EffectValues[string]>;
|
|
15
|
+
/**
|
|
16
|
+
* Whether an editor offering `uses` should offer `e` (in a picker or an `effect` enum). Motion
|
|
17
|
+
* and camera effects draw no picture of their own, so they are offered only where `uses` names
|
|
18
|
+
* them (`motion`, `camera`); with no `uses`, every other effect is.
|
|
19
|
+
*/
|
|
20
|
+
export declare function effectOffered(e: Pick<EffectSummary, 'kind' | 'uses'>, uses?: readonly EffectUse[]): boolean;
|
|
15
21
|
/** A tag as tags are compared: trimmed, lower case, spaces and underscores as single hyphens (`"Game Boy"` → `game-boy`). */
|
|
16
22
|
export declare function normaliseEffectTag(tag: string): string;
|
|
17
23
|
/** True when the effect carries every one of `tags` (compared with `normaliseEffectTag`). */
|
|
@@ -59,3 +65,20 @@ export declare class EffectsSlot {
|
|
|
59
65
|
require(): EffectProvider;
|
|
60
66
|
subscribe(listener: (provider: EffectProvider | null) => void): () => void;
|
|
61
67
|
}
|
|
68
|
+
/** True for a `CameraView` with a positive zoom and finite numbers throughout. */
|
|
69
|
+
export declare function isCameraView(view: unknown): view is CameraView;
|
|
70
|
+
/**
|
|
71
|
+
* Keys `view` (u 0–1 → view) at `fps` across `ms`, with the two keys of a cut at `cut` (0–1).
|
|
72
|
+
* Providers can implement `sampleCameraMove` with it; `sampleEffectCameraMove` falls back to it.
|
|
73
|
+
*/
|
|
74
|
+
export declare function sampleCameraViews(view: (u: number) => CameraView, options: {
|
|
75
|
+
ms: number;
|
|
76
|
+
fps: number;
|
|
77
|
+
cut?: number;
|
|
78
|
+
}): CameraMoveSample;
|
|
79
|
+
/**
|
|
80
|
+
* A camera move as keyframes: the provider's own `sampleCameraMove` when it has one, else its
|
|
81
|
+
* `cameraView` keyed per frame (with the move's `cut` from `describe`). Throws
|
|
82
|
+
* `EffectUnsupportedError` when the provider has no camera support.
|
|
83
|
+
*/
|
|
84
|
+
export declare function sampleEffectCameraMove(provider: EffectProvider, id: string, request: CameraMoveSampleRequest): Promise<CameraMoveSample>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* and a provider slot editors hold.
|
|
4
4
|
*/
|
|
5
5
|
import { type SchemaValidationError } from '../tools/schema.js';
|
|
6
|
-
import type { EffectDescription, EffectImageSource, EffectPixels, EffectProvider, EffectSearchOptions, EffectSummary, EffectValues } from './types.js';
|
|
6
|
+
import type { CameraMoveSample, CameraMoveSampleRequest, CameraView, EffectDescription, EffectImageSource, EffectPixels, EffectProvider, EffectSearchOptions, EffectSummary, EffectUse, EffectValues } from './types.js';
|
|
7
7
|
/** Problems with `values` against an effect's control schema (unknown controls, types, ranges). Partial values are fine. */
|
|
8
8
|
export declare function effectValueErrors(description: Pick<EffectDescription, 'controls'>, values: unknown): SchemaValidationError[];
|
|
9
9
|
/**
|
|
@@ -12,6 +12,12 @@ export declare function effectValueErrors(description: Pick<EffectDescription, '
|
|
|
12
12
|
* it before saving values.
|
|
13
13
|
*/
|
|
14
14
|
export declare function resolveEffectValues(description: Pick<EffectDescription, 'id' | 'controls' | 'defaults'>, values?: EffectValues): Record<string, EffectValues[string]>;
|
|
15
|
+
/**
|
|
16
|
+
* Whether an editor offering `uses` should offer `e` (in a picker or an `effect` enum). Motion
|
|
17
|
+
* and camera effects draw no picture of their own, so they are offered only where `uses` names
|
|
18
|
+
* them (`motion`, `camera`); with no `uses`, every other effect is.
|
|
19
|
+
*/
|
|
20
|
+
export declare function effectOffered(e: Pick<EffectSummary, 'kind' | 'uses'>, uses?: readonly EffectUse[]): boolean;
|
|
15
21
|
/** A tag as tags are compared: trimmed, lower case, spaces and underscores as single hyphens (`"Game Boy"` → `game-boy`). */
|
|
16
22
|
export declare function normaliseEffectTag(tag: string): string;
|
|
17
23
|
/** True when the effect carries every one of `tags` (compared with `normaliseEffectTag`). */
|
|
@@ -59,3 +65,20 @@ export declare class EffectsSlot {
|
|
|
59
65
|
require(): EffectProvider;
|
|
60
66
|
subscribe(listener: (provider: EffectProvider | null) => void): () => void;
|
|
61
67
|
}
|
|
68
|
+
/** True for a `CameraView` with a positive zoom and finite numbers throughout. */
|
|
69
|
+
export declare function isCameraView(view: unknown): view is CameraView;
|
|
70
|
+
/**
|
|
71
|
+
* Keys `view` (u 0–1 → view) at `fps` across `ms`, with the two keys of a cut at `cut` (0–1).
|
|
72
|
+
* Providers can implement `sampleCameraMove` with it; `sampleEffectCameraMove` falls back to it.
|
|
73
|
+
*/
|
|
74
|
+
export declare function sampleCameraViews(view: (u: number) => CameraView, options: {
|
|
75
|
+
ms: number;
|
|
76
|
+
fps: number;
|
|
77
|
+
cut?: number;
|
|
78
|
+
}): CameraMoveSample;
|
|
79
|
+
/**
|
|
80
|
+
* A camera move as keyframes: the provider's own `sampleCameraMove` when it has one, else its
|
|
81
|
+
* `cameraView` keyed per frame (with the move's `cut` from `describe`). Throws
|
|
82
|
+
* `EffectUnsupportedError` when the provider has no camera support.
|
|
83
|
+
*/
|
|
84
|
+
export declare function sampleEffectCameraMove(provider: EffectProvider, id: string, request: CameraMoveSampleRequest): Promise<CameraMoveSample>;
|