@pixerate/editor-svelte 0.64.0 → 0.65.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.
@@ -16,7 +16,10 @@
16
16
  VIDEO_TRANSITION_TYPES,
17
17
  VIDEO_WIPE_DIRECTIONS,
18
18
  videoTransitionHasDirection,
19
+ videoFreezeFrameEdit,
19
20
  videoKeyframeRows,
21
+ videoSlowMotionRamp,
22
+ videoSpeedRampEdit,
20
23
  videoTransitionAudioCurve,
21
24
  videoKeyframeToggleEdit,
22
25
  videoKeyframeValueEdit,
@@ -47,6 +50,7 @@
47
50
  // A local error shows until the editor changes; then the editor's own error (if any) shows.
48
51
  const message = $derived((localError && localError.revision === editor.revision ? localError.text : null) ?? editor.error);
49
52
  const rows = $derived(clip ? videoKeyframeRows(editor.project, clip.id, editor.time) : []);
53
+ const btn = 'rounded border border-border px-1.5 py-0.5 text-[10px] disabled:opacity-40';
50
54
  const input = 'w-full min-w-0 rounded border border-border bg-transparent px-1 py-0.5 text-xs disabled:opacity-50';
51
55
 
52
56
  function apply(edit: VideoEdit, label: string) {
@@ -217,7 +221,21 @@
217
221
  {/each}
218
222
  {#if clip.type === 'media'}
219
223
  <span class="text-muted-foreground">Speed</span>
220
- <input class={input} type="number" min="0.05" step="0.05" placeholder="1" aria-label="Speed" {disabled} value={clip.speed ?? ''} onchange={(e) => number('speed', e.currentTarget.value, 'Change speed', { above: 0, what: 'Speed must be a number above 0 (1 = normal speed).' })} data-field="speed" />
224
+ {#if clip.timeRemap}
225
+ <span class="flex items-center gap-1" data-ramped="">
226
+ <span class="text-muted-foreground">ramped</span>
227
+ <button type="button" class={btn} {disabled} onclick={() => clip && apply({ op: 'set_time_remap', clip: clip.id, keys: null, ripple: true }, 'Remove speed ramp')}>Remove ramp</button>
228
+ </span>
229
+ {:else}
230
+ <input class={input} type="number" min="0.05" step="0.05" placeholder="1" aria-label="Speed" {disabled} value={clip.speed ?? ''} onchange={(e) => number('speed', e.currentTarget.value, 'Change speed', { above: 0, what: 'Speed must be a number above 0 (1 = normal speed).' })} data-field="speed" />
231
+ {/if}
232
+ {#if editor.project.assets.find((a) => a.id === clip.asset)?.kind !== 'image'}
233
+ <span class="text-muted-foreground">Retime</span>
234
+ <span class="flex flex-wrap gap-1">
235
+ <button type="button" class={btn} disabled={disabled || editor.time < clip.start || editor.time > clip.start + clip.duration} title="Hold the frame at the playhead for a second, pushing later clips along" onclick={() => clip?.type === 'media' && apply(videoFreezeFrameEdit(clip, editor.time - clip.start, 1000), 'Freeze frame')} data-action="freeze">Freeze 1 s here</button>
236
+ <button type="button" class={btn} {disabled} title="Normal speed, then a glide into 0.3× slow motion" onclick={() => clip?.type === 'media' && apply(videoSpeedRampEdit(clip, videoSlowMotionRamp(clip.duration)), 'Speed ramp')} data-action="slow-mo">Slow-mo ramp</button>
237
+ </span>
238
+ {/if}
221
239
  <span class="text-muted-foreground">Muted</span>
222
240
  <input type="checkbox" class="justify-self-start" aria-label="Muted" {disabled} checked={!!clip.muted} onchange={(e) => set('muted', e.currentTarget.checked || undefined, e.currentTarget.checked ? 'Mute clip' : 'Unmute clip')} data-field="muted" />
223
241
  {#each [{ key: 'fadeInCurve', on: clip.fadeIn, label: 'Fade in sound', aria: 'Fade in curve', change: 'Change fade in curve' }, { key: 'fadeOutCurve', on: clip.fadeOut, label: 'Fade out sound', aria: 'Fade out curve', change: 'Change fade out curve' }] as const as row (row.key)}
@@ -1 +1 @@
1
- {"version":3,"file":"ClipInspector.svelte.d.ts","sourceRoot":"","sources":["../../src/video-editor/ClipInspector.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAsBH,KAAK,qBAAqB,EAO3B,MAAM,+BAA+B,CAAC;AAIvC,UAAU,KAAK;IACb,UAAU,EAAE,qBAAqB,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA4OH,QAAA,MAAM,aAAa,2CAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ClipInspector.svelte.d.ts","sourceRoot":"","sources":["../../src/video-editor/ClipInspector.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAyBH,KAAK,qBAAqB,EAO3B,MAAM,+BAA+B,CAAC;AAIvC,UAAU,KAAK;IACb,UAAU,EAAE,qBAAqB,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA2PH,QAAA,MAAM,aAAa,2CAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-svelte",
3
- "version": "0.64.0",
3
+ "version": "0.65.0",
4
4
  "description": "Svelte bindings and prompt/rich-text components for @pixerate/editor",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -131,7 +131,7 @@
131
131
  "@tiptap/extension-bubble-menu": "^2.11.5",
132
132
  "@tiptap/extension-placeholder": "^2.11.5",
133
133
  "@tiptap/starter-kit": "^2.11.5",
134
- "@pixerate/editor": "0.85.0"
134
+ "@pixerate/editor": "0.86.0"
135
135
  },
136
136
  "peerDependencies": {
137
137
  "@dagrejs/dagre": "^1.1.4",