@pixerate/editor-svelte 0.51.8 → 0.52.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.
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { motionIssueLine, type AnimationEditorController, type MotionFrameOptions } from '@pixerate/editor/animation-editor';
2
+ import { motionIssueLine, type AnimationEditorController, type MotionFrameOptions, type MotionOnionSkin } from '@pixerate/editor/animation-editor';
3
3
  import AnimationStage from './AnimationStage.svelte';
4
4
  import ShotTimeline from './ShotTimeline.svelte';
5
5
  import { animationEditorStateOf } from './createAnimationEditor.svelte.js';
@@ -7,18 +7,22 @@
7
7
  interface Props {
8
8
  controller: AnimationEditorController;
9
9
  values?: MotionFrameOptions['values'];
10
+ /** Faded frames either side of the playhead (see `<AnimationStage onionSkin>`). */
11
+ onionSkin?: MotionOnionSkin;
12
+ /** Draw where nodes travel (see `<AnimationStage motionPaths>`). */
13
+ motionPaths?: boolean | readonly string[];
10
14
  /** List the scene's issues under the timeline (default true). */
11
15
  showIssues?: boolean;
12
16
  class?: string;
13
17
  }
14
18
 
15
- let { controller, values, showIssues = true, class: className = '' }: Props = $props();
19
+ let { controller, values, onionSkin, motionPaths, showIssues = true, class: className = '' }: Props = $props();
16
20
  const view = animationEditorStateOf(() => controller);
17
21
  </script>
18
22
 
19
23
  <!-- Stage, shot timeline and issue list for an AnimationEditorController. -->
20
24
  <div class="flex flex-col gap-2 {className}" data-animation-editor="">
21
- <AnimationStage {controller} {values} class="rounded-md border border-border bg-muted/40" />
25
+ <AnimationStage {controller} {values} {onionSkin} {motionPaths} class="rounded-md border border-border bg-muted/40" />
22
26
  <ShotTimeline {controller} />
23
27
  {#if showIssues && view.current.issues.length > 0}
24
28
  <ul class="space-y-0.5 text-xs" aria-label="Animation issues">
@@ -1,7 +1,11 @@
1
- import { type AnimationEditorController, type MotionFrameOptions } from '@pixerate/editor/animation-editor';
1
+ import { type AnimationEditorController, type MotionFrameOptions, type MotionOnionSkin } from '@pixerate/editor/animation-editor';
2
2
  interface Props {
3
3
  controller: AnimationEditorController;
4
4
  values?: MotionFrameOptions['values'];
5
+ /** Faded frames either side of the playhead (see `<AnimationStage onionSkin>`). */
6
+ onionSkin?: MotionOnionSkin;
7
+ /** Draw where nodes travel (see `<AnimationStage motionPaths>`). */
8
+ motionPaths?: boolean | readonly string[];
5
9
  /** List the scene's issues under the timeline (default true). */
6
10
  showIssues?: boolean;
7
11
  class?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"AnimationEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/animation-editor/AnimationEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,KAAK,yBAAyB,EAAE,KAAK,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAM3H,UAAU,KAAK;IACb,UAAU,EAAE,yBAAyB,CAAC;IACtC,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,iEAAiE;IACjE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA2BH,QAAA,MAAM,eAAe,2CAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"AnimationEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/animation-editor/AnimationEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,KAAK,yBAAyB,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAMjJ,UAAU,KAAK;IACb,UAAU,EAAE,yBAAyB,CAAC;IACtC,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,mFAAmF;IACnF,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,oEAAoE;IACpE,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAAC;IAC1C,iEAAiE;IACjE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA2BH,QAAA,MAAM,eAAe,2CAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
@@ -1,19 +1,23 @@
1
1
  <script lang="ts">
2
- import type { AnimationEditorController, MotionFrameOptions } from '@pixerate/editor/animation-editor';
2
+ import type { AnimationEditorController, MotionFrameOptions, MotionOnionSkin } from '@pixerate/editor/animation-editor';
3
3
  import { animationEditorStateOf } from './createAnimationEditor.svelte.js';
4
4
 
5
5
  interface Props {
6
6
  controller: AnimationEditorController;
7
7
  /** Control values to preview (`{ accent: "#0ea5e9" }`). */
8
8
  values?: MotionFrameOptions['values'];
9
+ /** Faded frames either side of the playhead. */
10
+ onionSkin?: MotionOnionSkin;
11
+ /** Draw where nodes travel: true for every node whose place changes, or a list of ids. */
12
+ motionPaths?: boolean | readonly string[];
9
13
  class?: string;
10
14
  }
11
15
 
12
- let { controller, values, class: className = '' }: Props = $props();
16
+ let { controller, values, onionSkin, motionPaths, class: className = '' }: Props = $props();
13
17
  const view = animationEditorStateOf(() => controller);
14
18
  const svg = $derived(
15
19
  controller
16
- .toSvg(view.current.time, { pretty: false, idPrefix: 'ae-', values })
20
+ .toSvg(view.current.time, { pretty: false, idPrefix: 'ae-', values, onionSkin, motionPaths })
17
21
  .replace(/<svg ([^>]*?)width="[^"]*" height="[^"]*"/, '<svg $1width="100%" height="100%"')
18
22
  );
19
23
  </script>
@@ -1,8 +1,12 @@
1
- import type { AnimationEditorController, MotionFrameOptions } from '@pixerate/editor/animation-editor';
1
+ import type { AnimationEditorController, MotionFrameOptions, MotionOnionSkin } from '@pixerate/editor/animation-editor';
2
2
  interface Props {
3
3
  controller: AnimationEditorController;
4
4
  /** Control values to preview (`{ accent: "#0ea5e9" }`). */
5
5
  values?: MotionFrameOptions['values'];
6
+ /** Faded frames either side of the playhead. */
7
+ onionSkin?: MotionOnionSkin;
8
+ /** Draw where nodes travel: true for every node whose place changes, or a list of ids. */
9
+ motionPaths?: boolean | readonly string[];
6
10
  class?: string;
7
11
  }
8
12
  declare const AnimationStage: import("svelte").Component<Props, {}, "">;
@@ -1 +1 @@
1
- {"version":3,"file":"AnimationStage.svelte.d.ts","sourceRoot":"","sources":["../../src/animation-editor/AnimationStage.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAIrG,UAAU,KAAK;IACb,UAAU,EAAE,yBAAyB,CAAC;IACtC,2DAA2D;IAC3D,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAsBH,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"AnimationStage.svelte.d.ts","sourceRoot":"","sources":["../../src/animation-editor/AnimationStage.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAItH,UAAU,KAAK;IACb,UAAU,EAAE,yBAAyB,CAAC;IACtC,2DAA2D;IAC3D,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,gDAAgD;IAChD,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,0FAA0F;IAC1F,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAsBH,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-svelte",
3
- "version": "0.51.8",
3
+ "version": "0.52.0",
4
4
  "description": "Svelte bindings and prompt/rich-text components for @pixerate/editor",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -123,7 +123,7 @@
123
123
  "@tiptap/extension-bubble-menu": "^2.11.5",
124
124
  "@tiptap/extension-placeholder": "^2.11.5",
125
125
  "@tiptap/starter-kit": "^2.11.5",
126
- "@pixerate/editor": "0.63.0"
126
+ "@pixerate/editor": "0.65.0"
127
127
  },
128
128
  "peerDependencies": {
129
129
  "@dagrejs/dagre": "^1.1.4",