@pixerate/editor 0.231.1 → 0.232.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/index.cjs +25 -25
- 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-OPSK22DL.cjs → chunk-2K5TELHV.cjs} +19 -2
- package/dist/{chunk-CSM5T6SE.js → chunk-6QLTUGMO.js} +1 -1
- package/dist/{chunk-5T3H7CGG.cjs → chunk-A653N65Q.cjs} +7 -7
- package/dist/{chunk-SBPGIZQN.js → chunk-MUSZYMBX.js} +1 -1
- package/dist/{chunk-TCZ2J7PR.js → chunk-PQYDJ2AV.js} +18 -1
- package/dist/{chunk-C73U5UI3.cjs → chunk-RG4O6K2A.cjs} +14 -14
- package/dist/effects/conformance.d.cts +4 -1
- package/dist/effects/conformance.d.ts +4 -1
- package/dist/effects/errors.d.cts +6 -1
- package/dist/effects/errors.d.ts +6 -1
- package/dist/effects/fake-templates.d.cts +17 -0
- package/dist/effects/fake-templates.d.ts +17 -0
- package/dist/effects/fake.d.cts +6 -1
- package/dist/effects/fake.d.ts +6 -1
- package/dist/effects/index.cjs +537 -74
- package/dist/effects/index.d.cts +1 -0
- package/dist/effects/index.d.ts +1 -0
- package/dist/effects/index.js +466 -3
- package/dist/effects/templates.d.cts +56 -0
- package/dist/effects/templates.d.ts +56 -0
- package/dist/effects/types.d.cts +212 -0
- package/dist/effects/types.d.ts +212 -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/index.cjs +329 -329
- package/dist/video-editor/index.js +3 -3
- package/package.json +1 -1
- package/skills/pixerate-animation-editor/SKILL.md +37 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkA653N65Qcjs = require('../chunk-A653N65Q.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -137,7 +137,7 @@ require('../chunk-NM3G4VQT.cjs');
|
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
|
|
140
|
-
var
|
|
140
|
+
var _chunk2K5TELHVcjs = require('../chunk-2K5TELHV.cjs');
|
|
141
141
|
require('../chunk-WOFXZ3XU.cjs');
|
|
142
142
|
|
|
143
143
|
|
|
@@ -3213,7 +3213,7 @@ function timeLapseVideo(frameCount, width, height, fps, holdMs, name = "Time-lap
|
|
|
3213
3213
|
}
|
|
3214
3214
|
const video = { version: 1, name, width: w, height: h, fps, background: "#000000", assets, tracks: [{ id: "v1", kind: "video", clips }] };
|
|
3215
3215
|
const durationMs = frameCount ? clips[clips.length - 1].start + clips[clips.length - 1].duration : 0;
|
|
3216
|
-
return { video, ffmpeg:
|
|
3216
|
+
return { video, ffmpeg: _chunkA653N65Qcjs.toVideoFfmpeg.call(void 0, video, { output: "timelapse.mp4" }), durationMs };
|
|
3217
3217
|
}
|
|
3218
3218
|
async function buildTimeLapse(source, target, options = {}) {
|
|
3219
3219
|
const maxSide = Math.max(32, Math.min(4096, Math.round(_nullishCoalesce(options.maxSide, () => ( 720)))));
|
|
@@ -3296,7 +3296,7 @@ function checkPaintEffectPlace(d, place) {
|
|
|
3296
3296
|
else if (d.uses.includes("filter") && place !== "light") instead = "; run it on a layer's dried paint with apply_effect instead";
|
|
3297
3297
|
else if (place === "light" && d.uses.some((u) => PAINT_EFFECT_PLACES.layer.includes(u))) instead = "; add it as an effect layer (add_effect_layer) or fill a layer with it (fill_layer_with_effect) instead";
|
|
3298
3298
|
else if (place === "paper" && d.uses.some((u) => u === "overlay" || u === "title")) instead = "; add it as an effect layer with add_effect_layer instead";
|
|
3299
|
-
throw new (0,
|
|
3299
|
+
throw new (0, _chunk2K5TELHVcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.uses.join(" / ") || d.kind} effect, and ${PLACE_WORDS[place]}${instead}.`, d.id);
|
|
3300
3300
|
}
|
|
3301
3301
|
var PAPER_EFFECT_BLENDS = ["multiply", "normal", "overlay", "soft-light", "screen", "color"];
|
|
3302
3302
|
var paperVersion = 1;
|
|
@@ -3479,7 +3479,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3479
3479
|
/** Set while an operation that changes wet paint runs: the simulation before it (for undo). */
|
|
3480
3480
|
__init106() {this.wetOp = null}
|
|
3481
3481
|
/** The effects provider slot (see `setEffectsProvider`). */
|
|
3482
|
-
__init107() {this.effects = new (0,
|
|
3482
|
+
__init107() {this.effects = new (0, _chunk2K5TELHVcjs.EffectsSlot)()}
|
|
3483
3483
|
__init108() {this.effectsRenderer = new PaintEffectsRenderer()}
|
|
3484
3484
|
__init109() {this.paperEffectNodeCache = null}
|
|
3485
3485
|
constructor(options = {}) {;_class10.prototype.__init72.call(this);_class10.prototype.__init73.call(this);_class10.prototype.__init74.call(this);_class10.prototype.__init75.call(this);_class10.prototype.__init76.call(this);_class10.prototype.__init77.call(this);_class10.prototype.__init78.call(this);_class10.prototype.__init79.call(this);_class10.prototype.__init80.call(this);_class10.prototype.__init81.call(this);_class10.prototype.__init82.call(this);_class10.prototype.__init83.call(this);_class10.prototype.__init84.call(this);_class10.prototype.__init85.call(this);_class10.prototype.__init86.call(this);_class10.prototype.__init87.call(this);_class10.prototype.__init88.call(this);_class10.prototype.__init89.call(this);_class10.prototype.__init90.call(this);_class10.prototype.__init91.call(this);_class10.prototype.__init92.call(this);_class10.prototype.__init93.call(this);_class10.prototype.__init94.call(this);_class10.prototype.__init95.call(this);_class10.prototype.__init96.call(this);_class10.prototype.__init97.call(this);_class10.prototype.__init98.call(this);_class10.prototype.__init99.call(this);_class10.prototype.__init100.call(this);_class10.prototype.__init101.call(this);_class10.prototype.__init102.call(this);_class10.prototype.__init103.call(this);_class10.prototype.__init104.call(this);_class10.prototype.__init105.call(this);_class10.prototype.__init106.call(this);_class10.prototype.__init107.call(this);_class10.prototype.__init108.call(this);_class10.prototype.__init109.call(this);_class10.prototype.__init110.call(this);_class10.prototype.__init111.call(this);_class10.prototype.__init112.call(this);_class10.prototype.__init113.call(this);
|
|
@@ -4154,7 +4154,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4154
4154
|
if (v === null) merged[k] = d.defaults[k];
|
|
4155
4155
|
else given[k] = v;
|
|
4156
4156
|
}
|
|
4157
|
-
return { ...merged, ...
|
|
4157
|
+
return { ...merged, ..._chunk2K5TELHVcjs.resolveEffectValues.call(void 0, { ...d, defaults: merged }, given) };
|
|
4158
4158
|
}
|
|
4159
4159
|
/** Renders a generator, overlay or title effect at the canvas size. */
|
|
4160
4160
|
renderEffectCanvas(d, values, time = 0) {
|
|
@@ -8917,7 +8917,7 @@ function createPaintEffectsToolProvider(controller, options = {}) {
|
|
|
8917
8917
|
if (changes.enabled !== void 0) throw new Error("enabled does not apply here: hide an effect layer with update_layer visible false, or remove the effect paper.");
|
|
8918
8918
|
};
|
|
8919
8919
|
const values = (v) => v;
|
|
8920
|
-
return withPaintPlayback(
|
|
8920
|
+
return withPaintPlayback(_chunk2K5TELHVcjs.createEffectToolProvider.call(void 0, {
|
|
8921
8921
|
id: _nullishCoalesce(options.id, () => ( "paint-effects")),
|
|
8922
8922
|
namespace: options.namespace,
|
|
8923
8923
|
title: "Paint effects",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toVideoFfmpeg
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-6QLTUGMO.js";
|
|
4
4
|
import {
|
|
5
5
|
deserializeLayers,
|
|
6
6
|
exportPsd,
|
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
EffectsSlot,
|
|
138
138
|
createEffectToolProvider,
|
|
139
139
|
resolveEffectValues
|
|
140
|
-
} from "../chunk-
|
|
140
|
+
} from "../chunk-PQYDJ2AV.js";
|
|
141
141
|
import "../chunk-V2ZCJRDM.js";
|
|
142
142
|
import {
|
|
143
143
|
CoverageMap,
|
package/dist/vector/index.cjs
CHANGED
|
@@ -558,7 +558,7 @@ var _chunkNM3G4VQTcjs = require('../chunk-NM3G4VQT.cjs');
|
|
|
558
558
|
|
|
559
559
|
|
|
560
560
|
|
|
561
|
-
var
|
|
561
|
+
var _chunk2K5TELHVcjs = require('../chunk-2K5TELHV.cjs');
|
|
562
562
|
require('../chunk-WOFXZ3XU.cjs');
|
|
563
563
|
|
|
564
564
|
|
|
@@ -7328,7 +7328,7 @@ var VectorEditorController = (_class7 = class _VectorEditorController {
|
|
|
7328
7328
|
}
|
|
7329
7329
|
// --- Provider effects ---
|
|
7330
7330
|
/** The effects provider slot (see `setEffectsProvider`). */
|
|
7331
|
-
__init59() {this.effects = new (0,
|
|
7331
|
+
__init59() {this.effects = new (0, _chunk2K5TELHVcjs.EffectsSlot)()}
|
|
7332
7332
|
/** The registered effects provider, or `null`. */
|
|
7333
7333
|
get effectsProvider() {
|
|
7334
7334
|
return this.effects.provider;
|
|
@@ -7352,10 +7352,10 @@ var VectorEditorController = (_class7 = class _VectorEditorController {
|
|
|
7352
7352
|
/** The effect's picture as group children, scaled into `box` (an affine fit). */
|
|
7353
7353
|
async vectorEffectPicture(effect, values) {
|
|
7354
7354
|
const provider = this.effects.require();
|
|
7355
|
-
if (!provider.applyVectorEffect) throw new (0,
|
|
7355
|
+
if (!provider.applyVectorEffect) throw new (0, _chunk2K5TELHVcjs.EffectUnsupportedError)(`${provider.name} has no vector effects.`);
|
|
7356
7356
|
const d = await provider.describe(effect);
|
|
7357
|
-
if (d.kind !== "vector") throw new (0,
|
|
7358
|
-
const resolved =
|
|
7357
|
+
if (d.kind !== "vector") throw new (0, _chunk2K5TELHVcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.kind} effect; the vector editor adds vector effects, which bring their own picture${d.kind === "motion" ? " (apply motion in the animation editor)" : ""}.`, d.id);
|
|
7358
|
+
const resolved = _chunk2K5TELHVcjs.resolveEffectValues.call(void 0, d, values);
|
|
7359
7359
|
const motion = await provider.applyVectorEffect(d.id, this.toSvg(), resolved);
|
|
7360
7360
|
const parsed = _chunkBQE3Y6ZOcjs.parseVectorSvg.call(void 0, motion.svg);
|
|
7361
7361
|
if (!parsed.nodes.length) throw new Error(`"${d.name}" drew no shapes the editor can read.`);
|
|
@@ -18172,7 +18172,7 @@ function createVectorEffectsToolProvider(controller, options = {}) {
|
|
|
18172
18172
|
const effects = _optionalChain([g, 'optionalAccess', _765 => _765.providerEffect]) ? [info(g)] : [];
|
|
18173
18173
|
return { target: id, effect: _nullishCoalesce(removed, () => ( effects[0])), effects };
|
|
18174
18174
|
};
|
|
18175
|
-
return
|
|
18175
|
+
return _chunk2K5TELHVcjs.createEffectToolProvider.call(void 0, {
|
|
18176
18176
|
id: _nullishCoalesce(options.id, () => ( "vector-effects")),
|
|
18177
18177
|
namespace: options.namespace,
|
|
18178
18178
|
title: "Vector effects",
|
package/dist/vector/index.js
CHANGED