@pixerate/editor-react 0.61.0 → 0.63.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/{chunk-OSOGA2OJ.js → chunk-QJSMW4CM.js} +59 -3
- package/dist/{chunk-OSOGA2OJ.js.map → chunk-QJSMW4CM.js.map} +1 -1
- package/dist/image-editor/index.cjs +57 -1
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +5 -3
- package/dist/image-editor/index.d.ts +5 -3
- package/dist/image-editor/index.js +1 -1
- package/dist/index.cjs +57 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/video-editor/index.cjs +12 -2
- package/dist/video-editor/index.cjs.map +1 -1
- package/dist/video-editor/index.js +13 -2
- package/dist/video-editor/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -297,6 +297,7 @@ function VideoTimeline({ controller, pxPerSecond, onPxPerSecondChange, editable
|
|
|
297
297
|
const rows = (0, import_react4.useRef)(/* @__PURE__ */ new Map());
|
|
298
298
|
const ruler = (0, import_react4.useRef)(null);
|
|
299
299
|
const assets = (0, import_video_editor5.videoAssetMap)(project);
|
|
300
|
+
const sequences = (0, import_video_editor5.videoSequenceMap)(project);
|
|
300
301
|
const msToPx = (ms) => ms * px / 1e3;
|
|
301
302
|
const span = Math.max(duration + 5e3, 1e4);
|
|
302
303
|
const width = msToPx(span);
|
|
@@ -506,7 +507,7 @@ function VideoTimeline({ controller, pxPerSecond, onPxPerSecondChange, editable
|
|
|
506
507
|
children: clips.map(({ clip, home, start, duration: length, dragging }) => {
|
|
507
508
|
const asset = clip.type === "media" ? assets.get(clip.asset) : void 0;
|
|
508
509
|
const selected = selection.includes(clip.id);
|
|
509
|
-
const label = (0, import_video_editor5.videoClipLabel)(clip, asset);
|
|
510
|
+
const label = (0, import_video_editor5.videoClipLabel)(clip, asset, clip.type === "sequence" ? sequences.get(clip.sequence) : void 0);
|
|
510
511
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
511
512
|
"div",
|
|
512
513
|
{
|
|
@@ -521,6 +522,7 @@ function VideoTimeline({ controller, pxPerSecond, onPxPerSecondChange, editable
|
|
|
521
522
|
},
|
|
522
523
|
title: `${label} \xB7 ${(0, import_video_editor5.formatVideoSeconds)(start)}\u2013${(0, import_video_editor5.formatVideoSeconds)(start + length)}`,
|
|
523
524
|
"data-clip": clip.id,
|
|
525
|
+
"data-compound": clip.type === "sequence" ? clip.sequence : void 0,
|
|
524
526
|
"data-selected": selected ? "" : void 0,
|
|
525
527
|
"data-dragging": dragging ? "" : void 0,
|
|
526
528
|
"aria-selected": selected,
|
|
@@ -672,7 +674,7 @@ function ClipInspector({ controller, className = "" }) {
|
|
|
672
674
|
const transition = clip.transition;
|
|
673
675
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: `flex flex-col gap-1.5 ${className}`, "data-clip-inspector": "", "data-clip-id": clip.id, children: [
|
|
674
676
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-2 text-xs", children: [
|
|
675
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-medium", children: clip.type === "media" ? "Media clip" : clip.type === "text" ? "Title" : "Colour clip" }),
|
|
677
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-medium", children: clip.type === "media" ? "Media clip" : clip.type === "text" ? "Title" : clip.type === "sequence" ? "Compound clip" : "Colour clip" }),
|
|
676
678
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("code", { className: "text-muted-foreground", children: clip.id }),
|
|
677
679
|
at.track.locked && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-amber-500", children: "locked track" })
|
|
678
680
|
] }),
|
|
@@ -820,6 +822,14 @@ function ClipInspector({ controller, className = "" }) {
|
|
|
820
822
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Row, { label: "Font size", name: "fontSize", children: number("fontSize", "Font size", { min: 1, step: 2 }) }),
|
|
821
823
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Row, { label: "Background", name: "background", children: text("background", "Background") })
|
|
822
824
|
] }),
|
|
825
|
+
clip.type === "sequence" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Row, { label: "Sequence", name: "sequence", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "truncate", title: "A compound clip plays its sequence as one picture and sound; its clips cannot be edited here yet", children: [
|
|
827
|
+
project.sequences?.find((q) => q.id === clip.sequence)?.name ?? clip.sequence,
|
|
828
|
+
" \xB7 from ",
|
|
829
|
+
(0, import_video_editor6.formatVideoSeconds)(clip.in ?? 0)
|
|
830
|
+
] }) }),
|
|
831
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Row, { label: "Muted", name: "muted", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("input", { type: "checkbox", className: "justify-self-start", checked: !!clip.muted, disabled, "aria-label": "Muted", onChange: (e) => set("muted", e.target.checked || void 0, e.target.checked ? "Mute clip" : "Unmute clip") }) })
|
|
832
|
+
] }),
|
|
823
833
|
clip.type === "color" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Row, { label: "Colour", name: "color", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Commit, { value: clip.color, "aria-label": "Colour", disabled, onCommit: (raw) => raw.trim() && set("color", raw.trim(), "Change colour") }) }),
|
|
824
834
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Row, { label: "Transition in", name: "transition", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
825
835
|
"select",
|