@pixerate/editor-svelte 0.88.0 → 0.89.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/AnimationEditor.svelte +12 -1
- package/dist/animation-editor/AnimationEditor.svelte.d.ts +7 -0
- package/dist/animation-editor/AnimationEditor.svelte.d.ts.map +1 -1
- package/dist/animation-editor/AnimationEffectControls.svelte +35 -0
- package/dist/animation-editor/AnimationEffectControls.svelte.d.ts +11 -0
- package/dist/animation-editor/AnimationEffectControls.svelte.d.ts.map +1 -0
- package/dist/animation-editor/AnimationEffectsPanel.svelte +71 -0
- package/dist/animation-editor/AnimationEffectsPanel.svelte.d.ts +11 -0
- package/dist/animation-editor/AnimationEffectsPanel.svelte.d.ts.map +1 -0
- package/dist/animation-editor/createAnimationEditor.svelte.d.ts +7 -1
- package/dist/animation-editor/createAnimationEditor.svelte.d.ts.map +1 -1
- package/dist/animation-editor/createAnimationEditor.svelte.js +14 -1
- package/dist/animation-editor/index.d.ts +1 -0
- package/dist/animation-editor/index.d.ts.map +1 -1
- package/dist/animation-editor/index.js +1 -0
- package/dist/effects/EffectThumbnail.svelte +7 -3
- package/dist/effects/EffectThumbnail.svelte.d.ts.map +1 -1
- package/dist/effects/EffectsBrowser.svelte +6 -4
- package/dist/effects/EffectsBrowser.svelte.d.ts +3 -1
- package/dist/effects/EffectsBrowser.svelte.d.ts.map +1 -1
- package/dist/vector/VectorEditor.svelte +16 -2
- package/dist/vector/VectorEditor.svelte.d.ts +7 -0
- package/dist/vector/VectorEditor.svelte.d.ts.map +1 -1
- package/dist/vector/VectorProviderEffectControls.svelte +37 -0
- package/dist/vector/VectorProviderEffectControls.svelte.d.ts +9 -0
- package/dist/vector/VectorProviderEffectControls.svelte.d.ts.map +1 -0
- package/dist/vector/VectorProviderEffectsPanel.svelte +63 -0
- package/dist/vector/VectorProviderEffectsPanel.svelte.d.ts +9 -0
- package/dist/vector/VectorProviderEffectsPanel.svelte.d.ts.map +1 -0
- package/dist/vector/createVectorEditor.svelte.d.ts +8 -1
- package/dist/vector/createVectorEditor.svelte.d.ts.map +1 -1
- package/dist/vector/createVectorEditor.svelte.js +14 -1
- package/dist/vector/index.d.ts +1 -0
- package/dist/vector/index.d.ts.map +1 -1
- package/dist/vector/index.js +1 -0
- package/package.json +2 -2
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
import SceneSettings from './SceneSettings.svelte';
|
|
8
8
|
import ShotInspector from './ShotInspector.svelte';
|
|
9
9
|
import { animationEditorStateOf } from './createAnimationEditor.svelte.js';
|
|
10
|
+
import type { EffectProvider } from '@pixerate/editor/effects';
|
|
11
|
+
import { useEffects } from '../effects/effects.svelte.js';
|
|
12
|
+
import AnimationEffectsPanel from './AnimationEffectsPanel.svelte';
|
|
10
13
|
|
|
11
14
|
interface Props {
|
|
12
15
|
controller: AnimationEditorController;
|
|
@@ -23,10 +26,17 @@
|
|
|
23
26
|
* scrubber and issues only.
|
|
24
27
|
*/
|
|
25
28
|
editable?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* An effects provider (see `@pixerate/editor/effects`), registered with the controller while
|
|
31
|
+
* mounted: provider motion applied to the picked element and vector effects, with an Effects
|
|
32
|
+
* panel. Optional: without one the editor is as before.
|
|
33
|
+
*/
|
|
34
|
+
effects?: EffectProvider | null;
|
|
26
35
|
class?: string;
|
|
27
36
|
}
|
|
28
37
|
|
|
29
|
-
let { controller, values, onionSkin, motionPaths, showIssues = true, editable = true, class: className = '' }: Props = $props();
|
|
38
|
+
let { controller, values, onionSkin, motionPaths, showIssues = true, editable = true, effects, class: className = '' }: Props = $props();
|
|
39
|
+
useEffects(() => controller, () => effects);
|
|
30
40
|
const view = animationEditorStateOf(() => controller);
|
|
31
41
|
const editor = $derived(view.current);
|
|
32
42
|
const ONION: MotionOnionSkin = { before: 3, after: 1 };
|
|
@@ -115,6 +125,7 @@
|
|
|
115
125
|
</div>
|
|
116
126
|
<div class="flex min-w-0 flex-col gap-3">
|
|
117
127
|
<CommandList {controller} targets={pickedValid ? [pickedValid] : undefined} />
|
|
128
|
+
{#if editor.effectsProvider || controller.appliedEffects().length > 0}<AnimationEffectsPanel {controller} node={pickedValid} class="border-t border-border pt-2" />{/if}
|
|
118
129
|
<CommandInspector {controller} picked={pickedValid} class="border-t border-border pt-2" />
|
|
119
130
|
<details open class="border-t border-border pt-2">
|
|
120
131
|
<summary class="cursor-pointer text-xs font-medium">Shot</summary>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type AnimationEditorController, type MotionFrameOptions, type MotionOnionSkin } from '@pixerate/editor/animation-editor';
|
|
2
|
+
import type { EffectProvider } from '@pixerate/editor/effects';
|
|
2
3
|
interface Props {
|
|
3
4
|
controller: AnimationEditorController;
|
|
4
5
|
values?: MotionFrameOptions['values'];
|
|
@@ -14,6 +15,12 @@ interface Props {
|
|
|
14
15
|
* scrubber and issues only.
|
|
15
16
|
*/
|
|
16
17
|
editable?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* An effects provider (see `@pixerate/editor/effects`), registered with the controller while
|
|
20
|
+
* mounted: provider motion applied to the picked element and vector effects, with an Effects
|
|
21
|
+
* panel. Optional: without one the editor is as before.
|
|
22
|
+
*/
|
|
23
|
+
effects?: EffectProvider | null;
|
|
17
24
|
class?: string;
|
|
18
25
|
}
|
|
19
26
|
declare const AnimationEditor: import("svelte").Component<Props, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/animation-editor/AnimationEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqC,KAAK,yBAAyB,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"AnimationEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/animation-editor/AnimationEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqC,KAAK,yBAAyB,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAQrK,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAK7D,UAAU,KAAK;IACb,UAAU,EAAE,yBAAyB,CAAC;IACtC,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,kHAAkH;IAClH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,oGAAoG;IACpG,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAAC;IAC1C,iEAAiE;IACjE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA0GH,QAAA,MAAM,eAAe,2CAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AnimationEditorController, MotionEffectResult } from '@pixerate/editor/animation-editor';
|
|
3
|
+
import EffectParameters from '../effects/EffectParameters.svelte';
|
|
4
|
+
import { effectDescriptionOf } from '../effects/effects.svelte.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
controller: AnimationEditorController;
|
|
8
|
+
instance: string;
|
|
9
|
+
effect: string;
|
|
10
|
+
values: Readonly<Record<string, unknown>>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { controller, instance, effect, values }: Props = $props();
|
|
14
|
+
const loaded = effectDescriptionOf(() => controller.effectsProvider, () => effect);
|
|
15
|
+
let message = $state<string | null>(null);
|
|
16
|
+
const report = (r: Promise<MotionEffectResult>) => void r.then((x) => (message = x.ok ? null : x.error));
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<!-- One applied effect's controls, loaded from the provider. -->
|
|
20
|
+
{#if !controller.effectsProvider}
|
|
21
|
+
<p class="text-[11px] text-muted-foreground">No effects provider: its commands are kept as they are.</p>
|
|
22
|
+
{:else if loaded.error}
|
|
23
|
+
<p class="text-[11px] text-amber-500">{loaded.error}</p>
|
|
24
|
+
{:else if !loaded.description}
|
|
25
|
+
<p class="text-[11px] text-muted-foreground">Loading…</p>
|
|
26
|
+
{:else}
|
|
27
|
+
<EffectParameters
|
|
28
|
+
description={loaded.description}
|
|
29
|
+
{values}
|
|
30
|
+
onchange={(k, v, g) => report(controller.updateMotionEffect(instance, { [k]: v as never }, { merge: g ?? undefined }))}
|
|
31
|
+
onreset={(k) => report(controller.updateMotionEffect(instance, { [k]: null }))}
|
|
32
|
+
onpreset={(v) => report(controller.updateMotionEffect(instance, v as never))}
|
|
33
|
+
/>
|
|
34
|
+
{#if message}<p role="alert" class="text-[11px] text-destructive">{message}</p>{/if}
|
|
35
|
+
{/if}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AnimationEditorController } from '@pixerate/editor/animation-editor';
|
|
2
|
+
interface Props {
|
|
3
|
+
controller: AnimationEditorController;
|
|
4
|
+
instance: string;
|
|
5
|
+
effect: string;
|
|
6
|
+
values: Readonly<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
declare const AnimationEffectControls: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type AnimationEffectControls = ReturnType<typeof AnimationEffectControls>;
|
|
10
|
+
export default AnimationEffectControls;
|
|
11
|
+
//# sourceMappingURL=AnimationEffectControls.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimationEffectControls.svelte.d.ts","sourceRoot":"","sources":["../../src/animation-editor/AnimationEffectControls.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAsB,MAAM,mCAAmC,CAAC;AAKrG,UAAU,KAAK;IACb,UAAU,EAAE,yBAAyB,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC3C;AA2BH,QAAA,MAAM,uBAAuB,2CAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { indexMotionNodes, type AnimationEditorController, type MotionEffectResult } from '@pixerate/editor/animation-editor';
|
|
3
|
+
import EffectsBrowser from '../effects/EffectsBrowser.svelte';
|
|
4
|
+
import AnimationEffectControls from './AnimationEffectControls.svelte';
|
|
5
|
+
import { animationEditorStateOf } from './createAnimationEditor.svelte.js';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
controller: AnimationEditorController;
|
|
9
|
+
/** The node motion effects are applied to (e.g. the element picked on the stage). */
|
|
10
|
+
node?: string | null;
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let { controller, node = null, class: className = '' }: Props = $props();
|
|
15
|
+
const view = animationEditorStateOf(() => controller);
|
|
16
|
+
const ed = $derived(view.current);
|
|
17
|
+
const provider = $derived(ed.effectsProvider);
|
|
18
|
+
const nodes = $derived([...indexMotionNodes(ed.scene.artwork.nodes).keys()]);
|
|
19
|
+
let chosen = $state('');
|
|
20
|
+
const target = $derived(node && nodes.includes(node) ? node : chosen && nodes.includes(chosen) ? chosen : '');
|
|
21
|
+
let browse = $state<null | 'motion' | 'vector'>(null);
|
|
22
|
+
let open = $state<string | null>(null);
|
|
23
|
+
let message = $state<string | null>(null);
|
|
24
|
+
const applied = $derived.by(() => {
|
|
25
|
+
void ed.scene;
|
|
26
|
+
return controller.appliedEffects();
|
|
27
|
+
});
|
|
28
|
+
const btn = 'rounded border border-border px-1.5 py-0.5 text-[11px] disabled:opacity-40';
|
|
29
|
+
function report(r: MotionEffectResult | Promise<MotionEffectResult>) {
|
|
30
|
+
void Promise.resolve(r).then((x) => (message = x.ok ? (x.notes.length ? x.notes.join(' ') : null) : x.error));
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<!--
|
|
35
|
+
Provider effects in an animation: apply a motion effect to a node (its changes become commands in
|
|
36
|
+
a new shot), add a vector effect with its own picture, and change or remove the effects the scene
|
|
37
|
+
holds. Every change is one undo step (a slider drag is one).
|
|
38
|
+
-->
|
|
39
|
+
<section class="flex flex-col gap-2 text-xs {className}" aria-label="Effects" data-animation-effects="">
|
|
40
|
+
<div class="flex flex-wrap items-center gap-1">
|
|
41
|
+
<span class="flex-1 font-semibold">Effects</span>
|
|
42
|
+
<select class="rounded border border-border bg-transparent px-1 py-0.5 text-[11px]" aria-label="Node to animate" value={target} disabled={!!node} onchange={(e) => (chosen = e.currentTarget.value)}>
|
|
43
|
+
<option value="">Node…</option>
|
|
44
|
+
{#each nodes as id (id)}<option value={id}>{id}</option>{/each}
|
|
45
|
+
</select>
|
|
46
|
+
<button type="button" class={btn} disabled={ed.readOnly || !provider || !target} aria-pressed={browse === 'motion'} onclick={() => (browse = browse === 'motion' ? null : 'motion')}>Animate…</button>
|
|
47
|
+
<button type="button" class={btn} disabled={ed.readOnly || !provider} aria-pressed={browse === 'vector'} onclick={() => (browse = browse === 'vector' ? null : 'vector')}>Vector effect…</button>
|
|
48
|
+
</div>
|
|
49
|
+
{#if !provider}<p class="text-[11px] text-muted-foreground">No effects provider is registered. Commands effects made are kept.</p>{/if}
|
|
50
|
+
{#if browse === 'motion'}
|
|
51
|
+
<EffectsBrowser {provider} uses={['motion']} kinds={['motion']} title="Motion for {target}" onpick={(e) => ((browse = null), report(controller.applyMotionEffect(e.id, [target])))} />
|
|
52
|
+
{/if}
|
|
53
|
+
{#if browse === 'vector'}
|
|
54
|
+
<EffectsBrowser {provider} kinds={['vector']} title="Vector effects" onpick={(e) => ((browse = null), report(controller.addVectorEffect(e.id)))} />
|
|
55
|
+
{/if}
|
|
56
|
+
<ol class="space-y-1">
|
|
57
|
+
{#each applied as e (e.instance)}
|
|
58
|
+
<li class="rounded border border-border p-1" data-motion-effect={e.instance}>
|
|
59
|
+
<div class="flex items-center gap-1">
|
|
60
|
+
<button type="button" class="min-w-0 flex-1 truncate text-left" aria-expanded={open === e.instance} onclick={() => (open = open === e.instance ? null : e.instance)}>
|
|
61
|
+
{e.name ?? e.effect} <span class="text-muted-foreground">· {e.kind === 'vector' ? 'picture' : e.targets.join(', ')}</span>
|
|
62
|
+
</button>
|
|
63
|
+
<button type="button" class={btn} disabled={ed.readOnly} aria-label="Remove {e.name ?? e.effect}" onclick={() => report(controller.removeMotionEffect(e.instance))}>✕</button>
|
|
64
|
+
</div>
|
|
65
|
+
{#if open === e.instance}<div class="mt-1"><AnimationEffectControls {controller} instance={e.instance} effect={e.effect} values={e.values} /></div>{/if}
|
|
66
|
+
</li>
|
|
67
|
+
{/each}
|
|
68
|
+
</ol>
|
|
69
|
+
{#if !applied.length}<p class="text-[11px] text-muted-foreground">No provider effects in this scene.</p>{/if}
|
|
70
|
+
{#if message}<p role="status" class="text-[11px] text-muted-foreground" data-effects-message="">{message}</p>{/if}
|
|
71
|
+
</section>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type AnimationEditorController } from '@pixerate/editor/animation-editor';
|
|
2
|
+
interface Props {
|
|
3
|
+
controller: AnimationEditorController;
|
|
4
|
+
/** The node motion effects are applied to (e.g. the element picked on the stage). */
|
|
5
|
+
node?: string | null;
|
|
6
|
+
class?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const AnimationEffectsPanel: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type AnimationEffectsPanel = ReturnType<typeof AnimationEffectsPanel>;
|
|
10
|
+
export default AnimationEffectsPanel;
|
|
11
|
+
//# sourceMappingURL=AnimationEffectsPanel.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimationEffectsPanel.svelte.d.ts","sourceRoot":"","sources":["../../src/animation-editor/AnimationEffectsPanel.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,yBAAyB,EAA2B,MAAM,mCAAmC,CAAC;AAM5H,UAAU,KAAK;IACb,UAAU,EAAE,yBAAyB,CAAC;IACtC,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAiEH,QAAA,MAAM,qBAAqB,2CAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimationEditorController, type AnimationEditorOptions, type AnimationEditorState, type AnimationEditorToolProviderOptions } from "@pixerate/editor/animation-editor";
|
|
1
|
+
import { AnimationEditorController, type AnimationEffectsToolProviderOptions, type AnimationEditorOptions, type AnimationEditorState, type AnimationEditorToolProviderOptions } from "@pixerate/editor/animation-editor";
|
|
2
2
|
import type { ToolRegistry } from "@pixerate/editor/tools";
|
|
3
3
|
export interface SvelteAnimationEditor {
|
|
4
4
|
readonly controller: AnimationEditorController;
|
|
@@ -30,4 +30,10 @@ export declare function animationEditorStateOf(getController: () => AnimationEdi
|
|
|
30
30
|
* initialisation). Pass a getter to follow a changing registry.
|
|
31
31
|
*/
|
|
32
32
|
export declare function useAnimationEditorTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: AnimationEditorController, options?: AnimationEditorToolProviderOptions): void;
|
|
33
|
+
/**
|
|
34
|
+
* Registers the animation editor's provider-effect tools (`search_effects`, `apply_effect`,
|
|
35
|
+
* `add_vector_effect`, …) for the lifetime of the calling component. They work once an effects
|
|
36
|
+
* provider is registered (see `useEffects`).
|
|
37
|
+
*/
|
|
38
|
+
export declare function useAnimationEffectsTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: AnimationEditorController, options?: AnimationEffectsToolProviderOptions): void;
|
|
33
39
|
//# sourceMappingURL=createAnimationEditor.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAnimationEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/animation-editor/createAnimationEditor.svelte.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,
|
|
1
|
+
{"version":3,"file":"createAnimationEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/animation-editor/createAnimationEditor.svelte.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EAGzB,KAAK,mCAAmC,EACxC,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kCAAkC,EACxC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,UAAU,EAAE,yBAAyB,CAAC;IAC/C,sEAAsE;IACtE,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;IACrC,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;IACd,MAAM,IAAI,IAAI,CAAC;IACf,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,wCAAwC;IACxC,KAAK,IAAI,MAAM,CAAC;IAChB,qFAAqF;IACrF,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,mBAAmB,GAAE,yBAAyB,GAAG,sBAA2B,GAAG,qBAAqB,CAwBzI;AAED,0FAA0F;AAC1F,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,MAAM,yBAAyB,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAgBjI;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC,EACnF,UAAU,EAAE,yBAAyB,EACrC,OAAO,GAAE,kCAAuC,GAC/C,IAAI,CAMN;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC,EACnF,UAAU,EAAE,yBAAyB,EACrC,OAAO,GAAE,mCAAwC,GAChD,IAAI,CAMN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { untrack } from "svelte";
|
|
2
|
-
import { AnimationEditorController, createAnimationEditorToolProvider, } from "@pixerate/editor/animation-editor";
|
|
2
|
+
import { AnimationEditorController, createAnimationEditorToolProvider, createAnimationEffectsToolProvider, } from "@pixerate/editor/animation-editor";
|
|
3
3
|
/**
|
|
4
4
|
* Svelte 5 rune: subscribes to an `AnimationEditorController` (or creates one from options)
|
|
5
5
|
* and exposes its state reactively with bound actions.
|
|
@@ -59,3 +59,16 @@ export function useAnimationEditorTools(registry, controller, options = {}) {
|
|
|
59
59
|
return target.register(createAnimationEditorToolProvider(controller, options));
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Registers the animation editor's provider-effect tools (`search_effects`, `apply_effect`,
|
|
64
|
+
* `add_vector_effect`, …) for the lifetime of the calling component. They work once an effects
|
|
65
|
+
* provider is registered (see `useEffects`).
|
|
66
|
+
*/
|
|
67
|
+
export function useAnimationEffectsTools(registry, controller, options = {}) {
|
|
68
|
+
$effect(() => {
|
|
69
|
+
const target = typeof registry === "function" ? registry() : registry;
|
|
70
|
+
if (!target)
|
|
71
|
+
return;
|
|
72
|
+
return target.register(createAnimationEffectsToolProvider(controller, options));
|
|
73
|
+
});
|
|
74
|
+
}
|
|
@@ -17,6 +17,7 @@ export { default as CommandInspector } from "./CommandInspector.svelte";
|
|
|
17
17
|
export { default as EasePicker } from "./EasePicker.svelte";
|
|
18
18
|
export { default as ShotInspector } from "./ShotInspector.svelte";
|
|
19
19
|
export { default as SceneSettings } from "./SceneSettings.svelte";
|
|
20
|
+
export { default as AnimationEffectsPanel } from "./AnimationEffectsPanel.svelte";
|
|
20
21
|
export * from "./createAnimationEditor.svelte.js";
|
|
21
22
|
export type AnimationEditorProps = ComponentProps<typeof AnimationEditorComponent>;
|
|
22
23
|
export type AnimationStageProps = ComponentProps<typeof AnimationStageComponent>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/animation-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,wBAAwB,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,uBAAuB,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,yBAAyB,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,oBAAoB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,yBAAyB,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,mBAAmB,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,sBAAsB,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,sBAAsB,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAA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M,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC7E,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACrF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAC3E,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACrF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACzE,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC/E,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -7,4 +7,5 @@ export { default as CommandInspector } from "./CommandInspector.svelte";
|
|
|
7
7
|
export { default as EasePicker } from "./EasePicker.svelte";
|
|
8
8
|
export { default as ShotInspector } from "./ShotInspector.svelte";
|
|
9
9
|
export { default as SceneSettings } from "./SceneSettings.svelte";
|
|
10
|
+
export { default as AnimationEffectsPanel } from "./AnimationEffectsPanel.svelte";
|
|
10
11
|
export * from "./createAnimationEditor.svelte.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { untrack } from 'svelte';
|
|
2
3
|
import { renderEffectThumbnail, type EffectProvider, type EffectSummary } from '@pixerate/editor/effects';
|
|
3
4
|
|
|
4
5
|
interface Props {
|
|
@@ -15,10 +16,13 @@
|
|
|
15
16
|
let failed = $state(false);
|
|
16
17
|
|
|
17
18
|
$effect(() => {
|
|
18
|
-
failed
|
|
19
|
-
|
|
19
|
+
// Reads only what picks the picture: setting `failed` below must not run this again.
|
|
20
|
+
const motion = item.kind === 'motion';
|
|
21
|
+
const request = { provider, item, size: { width, height } };
|
|
22
|
+
failed = motion;
|
|
23
|
+
if (motion) return;
|
|
20
24
|
let live = true;
|
|
21
|
-
renderEffectThumbnail(provider, item,
|
|
25
|
+
untrack(() => renderEffectThumbnail(request.provider, request.item, request.size)).then(
|
|
22
26
|
(pixels) => {
|
|
23
27
|
const ctx = live ? canvas?.getContext('2d') : null;
|
|
24
28
|
if (!ctx || typeof ImageData === 'undefined') return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EffectThumbnail.svelte.d.ts","sourceRoot":"","sources":["../../src/effects/EffectThumbnail.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EffectThumbnail.svelte.d.ts","sourceRoot":"","sources":["../../src/effects/EffectThumbnail.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyB,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGxG,UAAU,KAAK;IACb,QAAQ,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,aAAa,CAAC;IACtB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA4CH,QAAA,MAAM,eAAe,2CAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { EFFECT_USE_LABELS, type EffectProvider, type EffectSummary, type EffectUse } from '@pixerate/editor/effects';
|
|
2
|
+
import { EFFECT_USE_LABELS, type EffectKind, type EffectProvider, type EffectSummary, type EffectUse } from '@pixerate/editor/effects';
|
|
3
3
|
import EffectThumbnail from './EffectThumbnail.svelte';
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
provider: EffectProvider | null | undefined;
|
|
8
8
|
/** Only effects with one of these uses (default: all but motion). */
|
|
9
9
|
uses?: readonly EffectUse[];
|
|
10
|
+
/** Only effects of these kinds (default: any). */
|
|
11
|
+
kinds?: readonly EffectKind[];
|
|
10
12
|
/** Called with the effect the user picks. */
|
|
11
13
|
onpick: (effect: EffectSummary) => void;
|
|
12
14
|
/** Draw previews with the provider's renderer (default true). */
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
class?: string;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
let { provider, uses, onpick, thumbnails = true, title = 'Effects', class: className = '' }: Props = $props();
|
|
21
|
+
let { provider, uses, kinds, onpick, thumbnails = true, title = 'Effects', class: className = '' }: Props = $props();
|
|
20
22
|
let all = $state.raw<readonly EffectSummary[]>([]);
|
|
21
23
|
let found = $state.raw<readonly EffectSummary[]>([]);
|
|
22
24
|
let query = $state('');
|
|
@@ -66,7 +68,7 @@
|
|
|
66
68
|
live = false;
|
|
67
69
|
};
|
|
68
70
|
});
|
|
69
|
-
const allowed = (e: EffectSummary) => (uses ? e.kind !== 'motion' || uses.includes('motion') : e.kind !== 'motion') && (!uses || e.uses.some((u) => uses.includes(u)));
|
|
71
|
+
const allowed = (e: EffectSummary) => (!kinds || kinds.includes(e.kind)) && (uses ? e.kind !== 'motion' || uses.includes('motion') : e.kind !== 'motion') && (!uses || e.uses.some((u) => uses.includes(u)));
|
|
70
72
|
const categories = $derived([...new Set(all.filter(allowed).map((e) => e.category))]);
|
|
71
73
|
const shown = $derived(found.filter(allowed));
|
|
72
74
|
</script>
|
|
@@ -96,7 +98,7 @@
|
|
|
96
98
|
{/if}
|
|
97
99
|
</div>
|
|
98
100
|
{#if error}<p role="alert" class="text-[11px] text-destructive">{error}</p>{/if}
|
|
99
|
-
<ul class="grid grid-cols-[repeat(auto-fill,minmax(6.5rem,1fr))] gap-1.5" role="list">
|
|
101
|
+
<ul class="grid max-h-96 grid-cols-[repeat(auto-fill,minmax(6.5rem,1fr))] gap-1.5 overflow-y-auto" role="list">
|
|
100
102
|
{#each shown as e (e.id)}
|
|
101
103
|
<li>
|
|
102
104
|
<button type="button" class="flex w-full flex-col gap-1 rounded border border-transparent p-1 text-left hover:border-border focus-visible:border-border" title={e.description ?? e.name} data-effect-id={e.id} onclick={() => onpick(e)}>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { type EffectProvider, type EffectSummary, type EffectUse } from '@pixerate/editor/effects';
|
|
1
|
+
import { type EffectKind, type EffectProvider, type EffectSummary, type EffectUse } from '@pixerate/editor/effects';
|
|
2
2
|
interface Props {
|
|
3
3
|
/** The editor's provider; without one the browser says effects are unavailable. */
|
|
4
4
|
provider: EffectProvider | null | undefined;
|
|
5
5
|
/** Only effects with one of these uses (default: all but motion). */
|
|
6
6
|
uses?: readonly EffectUse[];
|
|
7
|
+
/** Only effects of these kinds (default: any). */
|
|
8
|
+
kinds?: readonly EffectKind[];
|
|
7
9
|
/** Called with the effect the user picks. */
|
|
8
10
|
onpick: (effect: EffectSummary) => void;
|
|
9
11
|
/** Draw previews with the provider's renderer (default true). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EffectsBrowser.svelte.d.ts","sourceRoot":"","sources":["../../src/effects/EffectsBrowser.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"EffectsBrowser.svelte.d.ts","sourceRoot":"","sources":["../../src/effects/EffectsBrowser.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAIrI,UAAU,KAAK;IACb,mFAAmF;IACnF,QAAQ,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C,qEAAqE;IACrE,IAAI,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAC5B,kDAAkD;IAClD,KAAK,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC9B,6CAA6C;IAC7C,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,iEAAiE;IACjE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAoGH,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
import VectorCanvas from './VectorCanvas.svelte';
|
|
5
5
|
import VectorStylePanel from './VectorStylePanel.svelte';
|
|
6
6
|
import VectorToolbar from './VectorToolbar.svelte';
|
|
7
|
+
import type { EffectProvider } from '@pixerate/editor/effects';
|
|
8
|
+
import { useEffects } from '../effects/effects.svelte.js';
|
|
9
|
+
import VectorProviderEffectsPanel from './VectorProviderEffectsPanel.svelte';
|
|
7
10
|
|
|
8
11
|
interface Props {
|
|
9
12
|
controller: VectorEditorController;
|
|
@@ -14,10 +17,18 @@
|
|
|
14
17
|
/** Canvas height (default 520px). */
|
|
15
18
|
height?: number | string;
|
|
16
19
|
canvasProps?: Omit<ComponentProps<typeof VectorCanvas>, 'controller'>;
|
|
20
|
+
/**
|
|
21
|
+
* An effects provider (see `@pixerate/editor/effects`), registered with the controller while
|
|
22
|
+
* mounted: provider vector effects as groups, with an Effects section under the style panel.
|
|
23
|
+
* Optional: without one the editor is as before.
|
|
24
|
+
*/
|
|
25
|
+
effects?: EffectProvider | null;
|
|
17
26
|
class?: string;
|
|
18
27
|
}
|
|
19
28
|
|
|
20
|
-
let { controller, tools, showStylePanel = true, height = 520, canvasProps = {}, class: className = '' }: Props = $props();
|
|
29
|
+
let { controller, tools, showStylePanel = true, height = 520, canvasProps = {}, effects, class: className = '' }: Props = $props();
|
|
30
|
+
useEffects(() => controller, () => effects);
|
|
31
|
+
const effectsShown = $derived(!!effects || controller.vectorEffectGroups().length > 0);
|
|
21
32
|
</script>
|
|
22
33
|
|
|
23
34
|
<div class="flex flex-col gap-2 {className}" data-vector-editor="">
|
|
@@ -30,7 +41,10 @@
|
|
|
30
41
|
<VectorCanvas {controller} {...canvasProps} />
|
|
31
42
|
</div>
|
|
32
43
|
{#if showStylePanel}
|
|
33
|
-
<
|
|
44
|
+
<div class="flex w-full shrink-0 flex-col gap-2 md:w-56">
|
|
45
|
+
<VectorStylePanel {controller} class="rounded-md border border-border p-3" />
|
|
46
|
+
{#if effectsShown}<VectorProviderEffectsPanel {controller} class="rounded-md border border-border p-3" />{/if}
|
|
47
|
+
</div>
|
|
34
48
|
{/if}
|
|
35
49
|
</div>
|
|
36
50
|
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps } from 'svelte';
|
|
2
2
|
import type { VectorEditorController, VectorTool } from '@pixerate/editor/vector';
|
|
3
3
|
import VectorCanvas from './VectorCanvas.svelte';
|
|
4
|
+
import type { EffectProvider } from '@pixerate/editor/effects';
|
|
4
5
|
interface Props {
|
|
5
6
|
controller: VectorEditorController;
|
|
6
7
|
/** Tools in the toolbar (default: all). */
|
|
@@ -10,6 +11,12 @@ interface Props {
|
|
|
10
11
|
/** Canvas height (default 520px). */
|
|
11
12
|
height?: number | string;
|
|
12
13
|
canvasProps?: Omit<ComponentProps<typeof VectorCanvas>, 'controller'>;
|
|
14
|
+
/**
|
|
15
|
+
* An effects provider (see `@pixerate/editor/effects`), registered with the controller while
|
|
16
|
+
* mounted: provider vector effects as groups, with an Effects section under the style panel.
|
|
17
|
+
* Optional: without one the editor is as before.
|
|
18
|
+
*/
|
|
19
|
+
effects?: EffectProvider | null;
|
|
13
20
|
class?: string;
|
|
14
21
|
}
|
|
15
22
|
declare const VectorEditor: import("svelte").Component<Props, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,YAAY,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"VectorEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAGjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAK7D,UAAU,KAAK;IACb,UAAU,EAAE,sBAAsB,CAAC;IACnC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC9B,0CAA0C;IAC1C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EAAE,YAAY,CAAC,CAAC;IACtE;;;;OAIG;IACH,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAkCH,QAAA,MAAM,YAAY,2CAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { VectorEditorController, VectorGroupNode } from '@pixerate/editor/vector';
|
|
3
|
+
import EffectParameters from '../effects/EffectParameters.svelte';
|
|
4
|
+
import { effectDescriptionOf } from '../effects/effects.svelte.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
controller: VectorEditorController;
|
|
8
|
+
group: VectorGroupNode;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let { controller, group }: Props = $props();
|
|
12
|
+
const loaded = effectDescriptionOf(() => controller.effectsProvider, () => group.providerEffect?.effect);
|
|
13
|
+
let message = $state<string | null>(null);
|
|
14
|
+
const run = (work: Promise<unknown>) =>
|
|
15
|
+
void work.then(
|
|
16
|
+
() => (message = null),
|
|
17
|
+
(e: unknown) => (message = e instanceof Error ? e.message : String(e)),
|
|
18
|
+
);
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<!-- One effect group's controls, loaded from the provider. -->
|
|
22
|
+
{#if !controller.effectsProvider}
|
|
23
|
+
<p class="text-[11px] text-muted-foreground">No effects provider: the shapes are kept as they are.</p>
|
|
24
|
+
{:else if loaded.error}
|
|
25
|
+
<p class="text-[11px] text-amber-500">{loaded.error}</p>
|
|
26
|
+
{:else if !loaded.description}
|
|
27
|
+
<p class="text-[11px] text-muted-foreground">Loading…</p>
|
|
28
|
+
{:else}
|
|
29
|
+
<EffectParameters
|
|
30
|
+
description={loaded.description}
|
|
31
|
+
values={group.providerEffect?.values ?? {}}
|
|
32
|
+
onchange={(k, v) => run(controller.updateVectorEffect(group.id, { [k]: v as never }))}
|
|
33
|
+
onreset={(k) => run(controller.updateVectorEffect(group.id, { [k]: null }))}
|
|
34
|
+
onpreset={(v) => run(controller.updateVectorEffect(group.id, v as never))}
|
|
35
|
+
/>
|
|
36
|
+
{#if message}<p role="alert" class="text-[11px] text-destructive">{message}</p>{/if}
|
|
37
|
+
{/if}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VectorEditorController, VectorGroupNode } from '@pixerate/editor/vector';
|
|
2
|
+
interface Props {
|
|
3
|
+
controller: VectorEditorController;
|
|
4
|
+
group: VectorGroupNode;
|
|
5
|
+
}
|
|
6
|
+
declare const VectorProviderEffectControls: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type VectorProviderEffectControls = ReturnType<typeof VectorProviderEffectControls>;
|
|
8
|
+
export default VectorProviderEffectControls;
|
|
9
|
+
//# sourceMappingURL=VectorProviderEffectControls.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorProviderEffectControls.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorProviderEffectControls.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAKrF,UAAU,KAAK;IACb,UAAU,EAAE,sBAAsB,CAAC;IACnC,KAAK,EAAE,eAAe,CAAC;CACxB;AA+BH,QAAA,MAAM,4BAA4B,2CAAwC,CAAC;AAC3E,KAAK,4BAA4B,GAAG,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC;AACpF,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { untrack } from 'svelte';
|
|
3
|
+
import type { EffectProvider } from '@pixerate/editor/effects';
|
|
4
|
+
import type { VectorEditorController } from '@pixerate/editor/vector';
|
|
5
|
+
import EffectsBrowser from '../effects/EffectsBrowser.svelte';
|
|
6
|
+
import VectorProviderEffectControls from './VectorProviderEffectControls.svelte';
|
|
7
|
+
import { vectorStateOf } from './subscribe.svelte.js';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
controller: VectorEditorController;
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let { controller, class: className = '' }: Props = $props();
|
|
15
|
+
const view = vectorStateOf(() => controller);
|
|
16
|
+
let provider = $state.raw<EffectProvider | null>(untrack(() => controller.effects.provider));
|
|
17
|
+
$effect(() => {
|
|
18
|
+
const c = controller;
|
|
19
|
+
provider = c.effects.provider;
|
|
20
|
+
return untrack(() => c.effects.subscribe((p) => (provider = p)));
|
|
21
|
+
});
|
|
22
|
+
let browse = $state(false);
|
|
23
|
+
let message = $state<string | null>(null);
|
|
24
|
+
const groups = $derived.by(() => {
|
|
25
|
+
void view.current.document;
|
|
26
|
+
return controller.vectorEffectGroups();
|
|
27
|
+
});
|
|
28
|
+
const selected = $derived(groups.filter((g) => view.current.selection.includes(g.id)));
|
|
29
|
+
const btn = 'rounded border border-border px-1.5 py-0.5 text-[11px] disabled:opacity-40';
|
|
30
|
+
function run(work: () => unknown) {
|
|
31
|
+
message = null;
|
|
32
|
+
Promise.resolve()
|
|
33
|
+
.then(work)
|
|
34
|
+
.catch((e: unknown) => (message = e instanceof Error ? e.message : String(e)));
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<!--
|
|
39
|
+
Provider vector effects in a drawing: add one (its picture at rest becomes a selected group of
|
|
40
|
+
editable shapes), draw it again with new values, or detach it to keep the shapes. Motion is
|
|
41
|
+
applied in the animation editor.
|
|
42
|
+
-->
|
|
43
|
+
<section class="flex flex-col gap-2 text-xs {className}" aria-label="Vector effects" data-vector-provider-effects="">
|
|
44
|
+
<div class="flex items-center gap-1">
|
|
45
|
+
<span class="flex-1 font-semibold">Effects</span>
|
|
46
|
+
<button type="button" class={btn} disabled={!provider} aria-pressed={browse} onclick={() => (browse = !browse)}>Add effect…</button>
|
|
47
|
+
</div>
|
|
48
|
+
{#if !provider}<p class="text-[11px] text-muted-foreground">No effects provider is registered. Effect groups are kept as shapes.</p>{/if}
|
|
49
|
+
{#if browse}
|
|
50
|
+
<EffectsBrowser {provider} kinds={['vector']} title="Vector effects" onpick={(e) => ((browse = false), run(() => controller.addVectorEffect(e.id)))} />
|
|
51
|
+
{/if}
|
|
52
|
+
{#each selected as g (g.id)}
|
|
53
|
+
<div class="space-y-1 rounded border border-border p-1" data-vector-effect-group={g.id}>
|
|
54
|
+
<div class="flex items-center gap-1">
|
|
55
|
+
<span class="min-w-0 flex-1 truncate font-medium">{g.providerEffect?.name ?? g.providerEffect?.effect}</span>
|
|
56
|
+
<button type="button" class={btn} title="Keep the shapes as a plain group" onclick={() => run(() => controller.detachVectorEffect(g.id))}>Detach</button>
|
|
57
|
+
</div>
|
|
58
|
+
<VectorProviderEffectControls {controller} group={g} />
|
|
59
|
+
</div>
|
|
60
|
+
{/each}
|
|
61
|
+
{#if groups.length > 0 && !selected.length}<p class="text-[11px] text-muted-foreground">Select an effect group ({groups.length} in the drawing) to change it.</p>{/if}
|
|
62
|
+
{#if message}<p role="alert" class="text-[11px] text-destructive">{message}</p>{/if}
|
|
63
|
+
</section>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VectorEditorController } from '@pixerate/editor/vector';
|
|
2
|
+
interface Props {
|
|
3
|
+
controller: VectorEditorController;
|
|
4
|
+
class?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const VectorProviderEffectsPanel: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type VectorProviderEffectsPanel = ReturnType<typeof VectorProviderEffectsPanel>;
|
|
8
|
+
export default VectorProviderEffectsPanel;
|
|
9
|
+
//# sourceMappingURL=VectorProviderEffectsPanel.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorProviderEffectsPanel.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorProviderEffectsPanel.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAMpE,UAAU,KAAK;IACb,UAAU,EAAE,sBAAsB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA2DH,QAAA,MAAM,0BAA0B,2CAAwC,CAAC;AACzE,KAAK,0BAA0B,GAAG,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAChF,eAAe,0BAA0B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { VectorEditorController, type VectorCommandOptions, type VectorEditorOptions, type VectorEditorState, type VectorTool } from "@pixerate/editor/vector";
|
|
1
|
+
import { VectorEditorController, type VectorEffectsToolProviderOptions, type VectorCommandOptions, type VectorEditorOptions, type VectorEditorState, type VectorTool } from "@pixerate/editor/vector";
|
|
2
|
+
import type { ToolRegistry } from "@pixerate/editor/tools";
|
|
2
3
|
export interface SvelteVectorEditor {
|
|
3
4
|
readonly controller: VectorEditorController;
|
|
4
5
|
/** The controller's state (reactive). */
|
|
@@ -27,4 +28,10 @@ export interface VectorCommandTarget {
|
|
|
27
28
|
* registry.
|
|
28
29
|
*/
|
|
29
30
|
export declare function useVectorCommands(registry: VectorCommandTarget | null | undefined | (() => VectorCommandTarget | null | undefined), controller: VectorEditorController, options?: VectorCommandOptions): void;
|
|
31
|
+
/**
|
|
32
|
+
* Registers the vector editor's provider-effect tools (`search_effects`, `apply_effect`, …) for the
|
|
33
|
+
* lifetime of the calling component. They work once an effects provider is registered (see
|
|
34
|
+
* `useEffects`).
|
|
35
|
+
*/
|
|
36
|
+
export declare function useVectorEffectsTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: VectorEditorController, options?: VectorEffectsToolProviderOptions): void;
|
|
30
37
|
//# sourceMappingURL=createVectorEditor.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createVectorEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/createVectorEditor.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,
|
|
1
|
+
{"version":3,"file":"createVectorEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/createVectorEditor.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAGtB,KAAK,gCAAgC,EACrC,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,EAAE,sBAAsB,CAAC;IAC5C,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IAChC,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,eAAe,IAAI,IAAI,CAAC;IACxB,KAAK,IAAI,MAAM,CAAC;IAChB,qFAAqF;IACrF,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,mBAAmB,GAAE,sBAAsB,GAAG,mBAAwB,GAAG,kBAAkB,CAuB7H;AAED,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,IAAI,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,MAAM,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC,EACjG,UAAU,EAAE,sBAAsB,EAClC,OAAO,GAAE,oBAAyB,GACjC,IAAI,CAMN;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC,EACnF,UAAU,EAAE,sBAAsB,EAClC,OAAO,GAAE,gCAAqC,GAC7C,IAAI,CAMN"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VectorEditorController, createVectorCommands, } from "@pixerate/editor/vector";
|
|
1
|
+
import { VectorEditorController, createVectorCommands, createVectorEffectsToolProvider, } from "@pixerate/editor/vector";
|
|
2
2
|
/**
|
|
3
3
|
* Svelte 5 rune: subscribes to a `VectorEditorController` (or creates one from options) and
|
|
4
4
|
* exposes its state reactively with bound actions.
|
|
@@ -41,3 +41,16 @@ export function useVectorCommands(registry, controller, options = {}) {
|
|
|
41
41
|
return target.register(createVectorCommands(controller, options));
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Registers the vector editor's provider-effect tools (`search_effects`, `apply_effect`, …) for the
|
|
46
|
+
* lifetime of the calling component. They work once an effects provider is registered (see
|
|
47
|
+
* `useEffects`).
|
|
48
|
+
*/
|
|
49
|
+
export function useVectorEffectsTools(registry, controller, options = {}) {
|
|
50
|
+
$effect(() => {
|
|
51
|
+
const target = typeof registry === "function" ? registry() : registry;
|
|
52
|
+
if (!target)
|
|
53
|
+
return;
|
|
54
|
+
return target.register(createVectorEffectsToolProvider(controller, options));
|
|
55
|
+
});
|
|
56
|
+
}
|
package/dist/vector/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export { default as VectorPaintPath } from "./VectorPaintPath.svelte";
|
|
|
26
26
|
export { default as VectorAppearancePanel } from "./VectorAppearancePanel.svelte";
|
|
27
27
|
export { default as VectorGradientAnnotator } from "./VectorGradientAnnotator.svelte";
|
|
28
28
|
export { default as VectorGradientEditor } from "./VectorGradientEditor.svelte";
|
|
29
|
+
export { default as VectorProviderEffectsPanel } from "./VectorProviderEffectsPanel.svelte";
|
|
29
30
|
export * from "./createVectorEditor.svelte.js";
|
|
30
31
|
export { vectorStateOf } from "./subscribe.svelte.js";
|
|
31
32
|
export * from "./styles.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vector/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAE,OAAO,IA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,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAC5F,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,cAAc,aAAa,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC7E,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/vector/index.js
CHANGED
|
@@ -23,6 +23,7 @@ export { default as VectorPaintPath } from "./VectorPaintPath.svelte";
|
|
|
23
23
|
export { default as VectorAppearancePanel } from "./VectorAppearancePanel.svelte";
|
|
24
24
|
export { default as VectorGradientAnnotator } from "./VectorGradientAnnotator.svelte";
|
|
25
25
|
export { default as VectorGradientEditor } from "./VectorGradientEditor.svelte";
|
|
26
|
+
export { default as VectorProviderEffectsPanel } from "./VectorProviderEffectsPanel.svelte";
|
|
26
27
|
export * from "./createVectorEditor.svelte.js";
|
|
27
28
|
export { vectorStateOf } from "./subscribe.svelte.js";
|
|
28
29
|
export * from "./styles.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.0",
|
|
4
4
|
"description": "Svelte bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"@tiptap/extension-bubble-menu": "^2.11.5",
|
|
145
145
|
"@tiptap/extension-placeholder": "^2.11.5",
|
|
146
146
|
"@tiptap/starter-kit": "^2.11.5",
|
|
147
|
-
"@pixerate/editor": "0.
|
|
147
|
+
"@pixerate/editor": "0.125.0"
|
|
148
148
|
},
|
|
149
149
|
"peerDependencies": {
|
|
150
150
|
"@dagrejs/dagre": "^1.1.4",
|