@pixerate/editor 0.125.0 → 0.126.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 +9 -11
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.js +2 -4
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/{chunk-G6WXWS4Y.js → chunk-FICSDDDF.js} +2 -2
- package/dist/{chunk-QDJKUBWE.cjs → chunk-JODTP4DP.cjs} +176 -5
- package/dist/chunk-JODTP4DP.cjs.map +1 -0
- package/dist/{chunk-XZWOLXWA.js → chunk-QFSTQHZY.js} +174 -3
- package/dist/chunk-QFSTQHZY.js.map +1 -0
- package/dist/{chunk-UXFI3CDZ.cjs → chunk-SFCPGMCT.cjs} +8 -8
- package/dist/{chunk-UXFI3CDZ.cjs.map → chunk-SFCPGMCT.cjs.map} +1 -1
- package/dist/effects/index.cjs +32 -34
- package/dist/effects/index.cjs.map +1 -1
- package/dist/effects/index.js +3 -5
- package/dist/effects/index.js.map +1 -1
- package/dist/image-editor/index.cjs +13 -15
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.js +2 -4
- package/dist/image-editor/index.js.map +1 -1
- package/dist/paint-editor/index.cjs +728 -108
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +246 -9
- package/dist/paint-editor/index.d.ts +246 -9
- package/dist/paint-editor/index.js +631 -11
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/vector/index.cjs +6 -8
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.js +2 -4
- package/dist/vector/index.js.map +1 -1
- package/dist/video-editor/index.cjs +269 -271
- package/dist/video-editor/index.cjs.map +1 -1
- package/dist/video-editor/index.js +3 -5
- package/dist/video-editor/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +40 -1
- package/dist/chunk-IOXKXQNW.cjs +0 -178
- package/dist/chunk-IOXKXQNW.cjs.map +0 -1
- package/dist/chunk-QDJKUBWE.cjs.map +0 -1
- package/dist/chunk-TGKT5QAB.js +0 -178
- package/dist/chunk-TGKT5QAB.js.map +0 -1
- package/dist/chunk-XZWOLXWA.js.map +0 -1
- /package/dist/{chunk-G6WXWS4Y.js.map → chunk-FICSDDDF.js.map} +0 -0
|
@@ -34,13 +34,11 @@ var _chunkWAJQKWQUcjs = require('../chunk-WAJQKWQU.cjs');
|
|
|
34
34
|
var _chunkQQKTOA4Ucjs = require('../chunk-QQKTOA4U.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var _chunkQDJKUBWEcjs = require('../chunk-QDJKUBWE.cjs');
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
var _chunkIOXKXQNWcjs = require('../chunk-IOXKXQNW.cjs');
|
|
41
|
+
var _chunkJODTP4DPcjs = require('../chunk-JODTP4DP.cjs');
|
|
44
42
|
|
|
45
43
|
|
|
46
44
|
|
|
@@ -3595,7 +3593,7 @@ var AnimationEditorController = (_class = class {
|
|
|
3595
3593
|
|
|
3596
3594
|
|
|
3597
3595
|
/** The effects provider slot (see `setEffectsProvider`). */
|
|
3598
|
-
__init() {this.effects = new (0,
|
|
3596
|
+
__init() {this.effects = new (0, _chunkJODTP4DPcjs.EffectsSlot)()}
|
|
3599
3597
|
|
|
3600
3598
|
|
|
3601
3599
|
__init2() {this.selection = null}
|
|
@@ -3770,7 +3768,7 @@ var AnimationEditorController = (_class = class {
|
|
|
3770
3768
|
try {
|
|
3771
3769
|
plan = await work();
|
|
3772
3770
|
} catch (error) {
|
|
3773
|
-
if (
|
|
3771
|
+
if (_chunkJODTP4DPcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refuse(error.message);
|
|
3774
3772
|
throw error;
|
|
3775
3773
|
}
|
|
3776
3774
|
const r = this.apply({ op: "replace_scene", scene: plan.scene }, plan.label, { merge });
|
|
@@ -3781,11 +3779,11 @@ var AnimationEditorController = (_class = class {
|
|
|
3781
3779
|
}
|
|
3782
3780
|
async describeFor(effect, kinds) {
|
|
3783
3781
|
const provider = this.effects.require();
|
|
3784
|
-
if (!provider.applyVectorEffect) throw new (0,
|
|
3782
|
+
if (!provider.applyVectorEffect) throw new (0, _chunkJODTP4DPcjs.EffectUnsupportedError)(`${provider.name} has no vector or motion effects.`);
|
|
3785
3783
|
const d = await provider.describe(effect);
|
|
3786
3784
|
if (!kinds.includes(d.kind)) {
|
|
3787
3785
|
const hint = d.kind === "motion" ? "apply it to nodes with apply_effect" : d.kind === "vector" ? "add it with add_vector_effect" : "it draws pixels, which scenes cannot hold";
|
|
3788
|
-
throw new (0,
|
|
3786
|
+
throw new (0, _chunkJODTP4DPcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.kind} effect: ${hint}.`, d.id);
|
|
3789
3787
|
}
|
|
3790
3788
|
return d;
|
|
3791
3789
|
}
|
|
@@ -3806,7 +3804,7 @@ var AnimationEditorController = (_class = class {
|
|
|
3806
3804
|
return this.effectEdit(async () => {
|
|
3807
3805
|
this.knownNodes(targets);
|
|
3808
3806
|
const d = await this.describeFor(effect, ["motion"]);
|
|
3809
|
-
const values =
|
|
3807
|
+
const values = _chunkJODTP4DPcjs.resolveEffectValues.call(void 0, d, options.values);
|
|
3810
3808
|
const instance = _nullishCoalesce(options.instance, () => ( nextMotionEffectInstance(this.scene)));
|
|
3811
3809
|
const motion = await this.effects.require().applyVectorEffect(d.id, { svg: motionArtworkSvg(this.scene.artwork), nodeIds: [...targets] }, values);
|
|
3812
3810
|
const source = { instance, effect: d.id, provider: this.effects.require().id, name: d.name, values };
|
|
@@ -3828,7 +3826,7 @@ var AnimationEditorController = (_class = class {
|
|
|
3828
3826
|
addVectorEffect(effect, options = {}) {
|
|
3829
3827
|
return this.effectEdit(async () => {
|
|
3830
3828
|
const d = await this.describeFor(effect, ["vector"]);
|
|
3831
|
-
const values =
|
|
3829
|
+
const values = _chunkJODTP4DPcjs.resolveEffectValues.call(void 0, d, options.values);
|
|
3832
3830
|
const instance = _nullishCoalesce(options.instance, () => ( nextMotionEffectInstance(this.scene)));
|
|
3833
3831
|
const motion = await this.effects.require().applyVectorEffect(d.id, motionArtworkSvg(this.scene.artwork), values);
|
|
3834
3832
|
const source = { instance, effect: d.id, provider: this.effects.require().id, name: d.name, values };
|
|
@@ -3852,7 +3850,7 @@ var AnimationEditorController = (_class = class {
|
|
|
3852
3850
|
else if (k in d.controls.properties) base[k] = d.defaults[k];
|
|
3853
3851
|
else throw new Error(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
|
|
3854
3852
|
}
|
|
3855
|
-
const merged = { ...base, ...
|
|
3853
|
+
const merged = { ...base, ..._chunkJODTP4DPcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
|
|
3856
3854
|
const { scene: bare, place } = withoutMotionEffect(this.scene, instance);
|
|
3857
3855
|
const provider = this.effects.require();
|
|
3858
3856
|
const source = { instance, effect: d.id, provider: provider.id, name: d.name, values: merged };
|
|
@@ -5236,7 +5234,7 @@ function createAnimationEffectsToolProvider(controller, options = {}) {
|
|
|
5236
5234
|
if (!r.ok) throw new Error(r.error);
|
|
5237
5235
|
return { target, effect: info(r.effect), effects: controller.appliedEffects().filter((e) => e.targets.includes(target)).map(info), ...r.notes.length ? { notes: r.notes } : {} };
|
|
5238
5236
|
};
|
|
5239
|
-
return
|
|
5237
|
+
return _chunkJODTP4DPcjs.createEffectToolProvider.call(void 0, {
|
|
5240
5238
|
id: _nullishCoalesce(options.id, () => ( "animation-effects")),
|
|
5241
5239
|
namespace: options.namespace,
|
|
5242
5240
|
target: { noun: "node", id: "A node id of the artwork from get_animation (a group animates as one)." },
|