@pixerate/editor 0.241.0 → 0.242.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.
- package/dist/animation-editor/controller.d.cts +10 -0
- package/dist/animation-editor/controller.d.ts +10 -0
- package/dist/animation-editor/effects.d.cts +1 -1
- package/dist/animation-editor/effects.d.ts +1 -1
- package/dist/animation-editor/index.cjs +137 -88
- package/dist/animation-editor/index.js +60 -11
- package/dist/canvas/index.cjs +7 -7
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-A7PQNIBX.cjs → chunk-7V7QMFTI.cjs} +14 -14
- package/dist/{chunk-JAOSL334.cjs → chunk-GHCSC2WP.cjs} +38 -16
- package/dist/{chunk-JWCKJNDR.cjs → chunk-K5DS2JTA.cjs} +6 -6
- package/dist/{chunk-WDDUPWVG.js → chunk-L3JFOTBQ.js} +1 -1
- package/dist/{chunk-SIK3LT6M.js → chunk-OFH6Q67U.js} +28 -6
- package/dist/{chunk-G3RUKJ5C.js → chunk-RXZL4NG5.js} +1 -1
- package/dist/{chunk-TEFQISBY.js → chunk-X3ZINLIP.js} +1 -1
- package/dist/{chunk-ZQIWBJGH.cjs → chunk-XNZFVYC2.cjs} +7 -7
- package/dist/effects/fake.d.cts +4 -0
- package/dist/effects/fake.d.ts +4 -0
- package/dist/effects/helpers.d.cts +6 -0
- package/dist/effects/helpers.d.ts +6 -0
- package/dist/effects/index.cjs +222 -94
- package/dist/effects/index.js +131 -3
- package/dist/effects/types.d.cts +31 -0
- package/dist/effects/types.d.ts +31 -0
- 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/controller.d.cts +49 -1
- package/dist/video-editor/controller.d.ts +49 -1
- package/dist/video-editor/effect-path.d.cts +66 -0
- package/dist/video-editor/effect-path.d.ts +66 -0
- package/dist/video-editor/index.cjs +616 -427
- package/dist/video-editor/index.d.cts +1 -0
- package/dist/video-editor/index.d.ts +1 -0
- package/dist/video-editor/index.js +193 -4
- package/package.json +1 -1
- package/skills/pixerate-animation-editor/SKILL.md +1 -1
- package/skills/pixerate-video-editor/SKILL.md +9 -2
|
@@ -7,7 +7,7 @@ var _chunkPY4GWSE2cjs = require('./chunk-PY4GWSE2.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkGHCSC2WPcjs = require('./chunk-GHCSC2WP.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkWOFXZ3XUcjs = require('./chunk-WOFXZ3XU.cjs');
|
|
@@ -1316,12 +1316,12 @@ function videoEffectLayerKey(layer, width, height) {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
function mixEffectPixels(a, b, k) {
|
|
1318
1318
|
if (k >= 1) return b;
|
|
1319
|
-
const out =
|
|
1319
|
+
const out = _chunkGHCSC2WPcjs.createEffectPixels.call(void 0, a.width, a.height);
|
|
1320
1320
|
for (let i = 0; i < out.data.length; i++) out.data[i] = a.data[i] + (b.data[i] - a.data[i]) * k;
|
|
1321
1321
|
return out;
|
|
1322
1322
|
}
|
|
1323
1323
|
function overEffectPixels(base, top, opacity = 1) {
|
|
1324
|
-
const out =
|
|
1324
|
+
const out = _chunkGHCSC2WPcjs.createEffectPixels.call(void 0, base.width, base.height);
|
|
1325
1325
|
const o = out.data;
|
|
1326
1326
|
const b = base.data;
|
|
1327
1327
|
const t = top.data;
|
|
@@ -1366,7 +1366,7 @@ var VideoEffectsEngine = (_class2 = class {
|
|
|
1366
1366
|
__init10() {this.generation = 0}
|
|
1367
1367
|
|
|
1368
1368
|
constructor(options = {}) {;_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);_class2.prototype.__init8.call(this);_class2.prototype.__init9.call(this);_class2.prototype.__init10.call(this);
|
|
1369
|
-
this.slot = _nullishCoalesce(options.slot, () => ( new (0,
|
|
1369
|
+
this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkGHCSC2WPcjs.EffectsSlot)()));
|
|
1370
1370
|
this.maxEntries = _nullishCoalesce(options.maxEntries, () => ( 120));
|
|
1371
1371
|
this.toImage = _nullishCoalesce(options.toImage, () => ( defaultToImage));
|
|
1372
1372
|
this.pool = new (0, _chunkPY4GWSE2cjs.EffectRendererPool)({ maxRenderers: options.maxRenderers });
|
|
@@ -1508,7 +1508,7 @@ function checkVideoEffectPlace(d, place) {
|
|
|
1508
1508
|
if (d.kind === "motion" || !d.uses.some((u) => allowed.includes(u))) {
|
|
1509
1509
|
const where = place === "clip" ? "on a clip" : place === "transition" ? "as a transition" : "as an effect clip";
|
|
1510
1510
|
const instead = d.uses.includes("transition") ? "set_video_effect_transition" : d.uses.some((u) => VIDEO_EFFECT_PLACES.generator.includes(u)) ? "add_video_effect_clip" : d.uses.some((u) => u === "filter") ? "apply_effect" : null;
|
|
1511
|
-
throw new (0,
|
|
1511
|
+
throw new (0, _chunkGHCSC2WPcjs.EffectUnsupportedError)(
|
|
1512
1512
|
`"${d.id}" (${d.name}) is a ${d.uses.join(" / ")} effect and cannot be used ${where}, which takes ${allowed.join(" or ")} effects${instead ? `; use ${instead} instead` : ""}. search_effects with use "${allowed[0]}" lists ones that fit.`,
|
|
1513
1513
|
d.id
|
|
1514
1514
|
);
|
|
@@ -1529,12 +1529,12 @@ function checkVideoEffectValues(d, values, options = {}) {
|
|
|
1529
1529
|
else if (type !== "number" && type !== "integer") errors.push({ path: `/${k}`, message: "only number controls can be keyframed." });
|
|
1530
1530
|
else for (const [i, key] of v.keys.entries()) for (const e of _chunkWOFXZ3XUcjs.validateJsonSchema.call(void 0, key.v, schema)) errors.push({ path: `/${k}/keys/${i}/v`, message: e.message });
|
|
1531
1531
|
}
|
|
1532
|
-
for (const e of
|
|
1532
|
+
for (const e of _chunkGHCSC2WPcjs.effectValueErrors.call(void 0, d, plain)) {
|
|
1533
1533
|
const name = e.path.split("/")[1];
|
|
1534
1534
|
const about = name && _optionalChain([d, 'access', _46 => _46.controls, 'access', _47 => _47.properties, 'access', _48 => _48[name], 'optionalAccess', _49 => _49.description]);
|
|
1535
1535
|
errors.push(about ? { path: e.path, message: `${e.message} (${about})` } : e);
|
|
1536
1536
|
}
|
|
1537
|
-
if (errors.length) throw new (0,
|
|
1537
|
+
if (errors.length) throw new (0, _chunkGHCSC2WPcjs.EffectControlError)(d.id, errors);
|
|
1538
1538
|
return { ..._nullishCoalesce(options.base, () => ( d.defaults)), ..._nullishCoalesce(values, () => ( {})) };
|
|
1539
1539
|
}
|
|
1540
1540
|
|
package/dist/effects/fake.d.cts
CHANGED
|
@@ -9,6 +9,10 @@
|
|
|
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
|
+
* - `trail` (an overlay that draws a line along its `path` control, transparent)
|
|
13
|
+
* - `route` (a vector effect that draws its `path` control as a line; vector only)
|
|
14
|
+
*
|
|
15
|
+
* It writes words as path data (`pathFromText`): a zig-zag per letter, font `zig`.
|
|
12
16
|
*
|
|
13
17
|
* With `camera: true` it also has camera moves (no pixels): `glide` and `whip` (transitions; the
|
|
14
18
|
* whip cuts halfway) and `drift` (a hold that zooms in slowly).
|
package/dist/effects/fake.d.ts
CHANGED
|
@@ -9,6 +9,10 @@
|
|
|
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
|
+
* - `trail` (an overlay that draws a line along its `path` control, transparent)
|
|
13
|
+
* - `route` (a vector effect that draws its `path` control as a line; vector only)
|
|
14
|
+
*
|
|
15
|
+
* It writes words as path data (`pathFromText`): a zig-zag per letter, font `zig`.
|
|
12
16
|
*
|
|
13
17
|
* With `camera: true` it also has camera moves (no pixels): `glide` and `whip` (transitions; the
|
|
14
18
|
* whip cuts halfway) and `drift` (a hold that zooms in slowly).
|
|
@@ -27,6 +27,12 @@ export declare function countEffectTags(effects: readonly Pick<EffectSummary, 't
|
|
|
27
27
|
tag: string;
|
|
28
28
|
count: number;
|
|
29
29
|
}[];
|
|
30
|
+
/**
|
|
31
|
+
* The controls of an effect that draw along a path given at run time: those whose schema (or one
|
|
32
|
+
* of its `anyOf` / `oneOf` choices) has `format: 'svg-path'`. See `EFFECT_PATH_FORMAT` for the
|
|
33
|
+
* values they take.
|
|
34
|
+
*/
|
|
35
|
+
export declare function pathControlsOf(d: Pick<EffectDescription, 'controls'>): string[];
|
|
30
36
|
/**
|
|
31
37
|
* Filters a catalog (kind, category, use and every tag) and ranks it against `query` (every word
|
|
32
38
|
* must appear in the id, name, category, tags or description; name matches rank first). An empty query keeps catalog order.
|
|
@@ -27,6 +27,12 @@ export declare function countEffectTags(effects: readonly Pick<EffectSummary, 't
|
|
|
27
27
|
tag: string;
|
|
28
28
|
count: number;
|
|
29
29
|
}[];
|
|
30
|
+
/**
|
|
31
|
+
* The controls of an effect that draw along a path given at run time: those whose schema (or one
|
|
32
|
+
* of its `anyOf` / `oneOf` choices) has `format: 'svg-path'`. See `EFFECT_PATH_FORMAT` for the
|
|
33
|
+
* values they take.
|
|
34
|
+
*/
|
|
35
|
+
export declare function pathControlsOf(d: Pick<EffectDescription, 'controls'>): string[];
|
|
30
36
|
/**
|
|
31
37
|
* Filters a catalog (kind, category, use and every tag) and ranks it against `query` (every word
|
|
32
38
|
* must appear in the id, name, category, tags or description; name matches rank first). An empty query keeps catalog order.
|