@pixerate/editor-svelte 0.70.0 → 0.71.1
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,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import {
|
|
3
3
|
findVideoClip,
|
|
4
|
+
formatVideoSeconds,
|
|
4
5
|
formatVideoTimecode,
|
|
5
6
|
VIDEO_CLIP_ANIMATION_EFFECTS,
|
|
6
7
|
VIDEO_CLIP_ANIMATION_LABELS,
|
|
@@ -311,6 +312,12 @@
|
|
|
311
312
|
<input class={input} type="number" min="1" step="1" placeholder="64" aria-label="Font size" {disabled} value={clip.fontSize ?? ''} onchange={(e) => number('fontSize', e.currentTarget.value, 'Change font size', { above: 0, what: 'Font size must be a number of pixels above 0.' })} data-field="fontSize" />
|
|
312
313
|
<span class="text-muted-foreground">Background</span>
|
|
313
314
|
<input class={input} placeholder="none" aria-label="Text background" {disabled} value={clip.background ?? ''} onchange={(e) => text('background', e.currentTarget.value, 'Change text background')} data-field="background" />
|
|
315
|
+
{:else if clip.type === 'sequence'}
|
|
316
|
+
{@const sequence = editor.project.sequences?.find((q) => q.id === clip.sequence)}
|
|
317
|
+
<span class="text-muted-foreground">Sequence</span>
|
|
318
|
+
<span class="truncate" title="A compound clip plays its sequence as one picture and sound; its clips cannot be edited here yet" data-field="sequence">{sequence?.name ?? clip.sequence} · from {formatVideoSeconds(clip.in ?? 0)}</span>
|
|
319
|
+
<span class="text-muted-foreground">Muted</span>
|
|
320
|
+
<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" />
|
|
314
321
|
{:else}
|
|
315
322
|
<span class="text-muted-foreground">Colour</span>
|
|
316
323
|
<input class={input} aria-label="Clip colour" {disabled} value={clip.color} onchange={(e) => text('color', e.currentTarget.value, 'Change colour', true)} data-field="color" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClipInspector.svelte.d.ts","sourceRoot":"","sources":["../../src/video-editor/ClipInspector.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"ClipInspector.svelte.d.ts","sourceRoot":"","sources":["../../src/video-editor/ClipInspector.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EA2BH,KAAK,qBAAqB,EAQ3B,MAAM,+BAA+B,CAAC;AAIvC,UAAU,KAAK;IACb,UAAU,EAAE,qBAAqB,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAqTH,QAAA,MAAM,aAAa,2CAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
planVideoClipDrag,
|
|
6
6
|
videoDragLabel,
|
|
7
7
|
videoAssetMap,
|
|
8
|
+
videoSequenceMap,
|
|
8
9
|
videoClipLabel,
|
|
9
10
|
videoClipShowsWaveform,
|
|
10
11
|
videoClipWaveformPath,
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
const editor = $derived(view.current);
|
|
52
53
|
const project = $derived(editor.project);
|
|
53
54
|
const assets = $derived(videoAssetMap(project));
|
|
55
|
+
const sequences = $derived(videoSequenceMap(project));
|
|
54
56
|
const px = $derived(Math.max(1, pxPerSecond));
|
|
55
57
|
const x = (ms: number) => (ms * px) / 1000;
|
|
56
58
|
/** Room after the last clip to drop and drag into. */
|
|
@@ -351,6 +353,7 @@
|
|
|
351
353
|
{#each row.items as item (item.clip.id)}
|
|
352
354
|
{@const clip = item.clip}
|
|
353
355
|
{@const asset = clip.type === 'media' ? assets.get(clip.asset) : undefined}
|
|
356
|
+
{@const label = videoClipLabel(clip, asset, clip.type === 'sequence' ? sequences.get(clip.sequence) : undefined)}
|
|
354
357
|
{@const selected = editor.selection.includes(clip.id)}
|
|
355
358
|
<div
|
|
356
359
|
class="absolute inset-y-1 flex select-none touch-none items-center gap-1 overflow-hidden rounded px-1.5 text-[11px] text-white {selected ? 'outline outline-2 outline-offset-1 outline-rose-500' : ''} {item.dragging ? 'opacity-80 shadow-lg' : ''} {canEdit && !track.locked ? 'cursor-grab' : 'cursor-pointer'}"
|
|
@@ -358,8 +361,9 @@
|
|
|
358
361
|
role="button"
|
|
359
362
|
tabindex="-1"
|
|
360
363
|
aria-pressed={selected}
|
|
361
|
-
title="{
|
|
364
|
+
title="{label} · {formatVideoTimecode(item.start, project.fps)}–{formatVideoTimecode(item.start + item.duration, project.fps)}"
|
|
362
365
|
data-clip={clip.id}
|
|
366
|
+
data-compound={clip.type === 'sequence' ? clip.sequence : undefined}
|
|
363
367
|
data-selected={selected ? '' : undefined}
|
|
364
368
|
data-dragging={item.dragging ? '' : undefined}
|
|
365
369
|
onpointerdown={(e) => onclipdown(e, clip, track)}
|
|
@@ -374,7 +378,7 @@
|
|
|
374
378
|
{#if clip.transition}
|
|
375
379
|
<span class="relative shrink-0 rounded bg-black/40 px-1 text-[9px]" title="{clip.transition.type} {clip.transition.duration} ms" data-transition={clip.transition.type}>⋈</span>
|
|
376
380
|
{/if}
|
|
377
|
-
<span class="relative truncate drop-shadow">{
|
|
381
|
+
<span class="relative truncate drop-shadow">{label}</span>
|
|
378
382
|
{#if canEdit && !track.locked}
|
|
379
383
|
<div class="absolute inset-y-0 left-0 w-1.5 cursor-ew-resize bg-white/0 hover:bg-white/40" data-edge="start" aria-hidden="true"></div>
|
|
380
384
|
<div class="absolute inset-y-0 right-0 w-1.5 cursor-ew-resize bg-white/0 hover:bg-white/40" data-edge="end" aria-hidden="true"></div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoTimeline.svelte.d.ts","sourceRoot":"","sources":["../../src/video-editor/VideoTimeline.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"VideoTimeline.svelte.d.ts","sourceRoot":"","sources":["../../src/video-editor/VideoTimeline.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAiBH,KAAK,qBAAqB,EAG1B,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AAKvC,UAAU,KAAK;IACb,UAAU,EAAE,qBAAqB,CAAC;IAClC,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,kIAAkI;IAClI,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iKAAiK;IACjK,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAwTH,QAAA,MAAM,aAAa,sDAAwC,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.
|
|
3
|
+
"version": "0.71.1",
|
|
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.
|
|
134
|
+
"@pixerate/editor": "0.93.0"
|
|
135
135
|
},
|
|
136
136
|
"peerDependencies": {
|
|
137
137
|
"@dagrejs/dagre": "^1.1.4",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"svelte": "^5.57.2",
|
|
160
160
|
"svelte-check": "^4.7.6",
|
|
161
161
|
"typescript": "^5.7.3",
|
|
162
|
-
"vitest": "^
|
|
162
|
+
"vitest": "^5.0.5"
|
|
163
163
|
},
|
|
164
164
|
"scripts": {
|
|
165
165
|
"build": "svelte-package -i src -o dist",
|