@vivix-labs/media-tools 1.0.0-beta.2 → 1.0.0-beta.3
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/client.bundle.js +24 -25
- package/dist/client.css +21 -19
- package/package.json +3 -3
- package/dist/assets/player-cover-shade-LLH6KOCQ.png +0 -0
package/dist/client.bundle.js
CHANGED
|
@@ -1250,6 +1250,23 @@ function VideoEditor({ input, mode, onApply, onClose }) {
|
|
|
1250
1250
|
const [ratio, setRatio] = React4.useState("Freeform");
|
|
1251
1251
|
const [error, setError] = React4.useState("");
|
|
1252
1252
|
const [saving, setSaving] = React4.useState(false);
|
|
1253
|
+
const focusCancel = React4.useCallback((button) => {
|
|
1254
|
+
if (!button) return;
|
|
1255
|
+
let opener;
|
|
1256
|
+
queueMicrotask(() => {
|
|
1257
|
+
const frame = button.ownerDocument.activeElement;
|
|
1258
|
+
if (button.closest("dialog")?.open && frame?.tagName === "IFRAME") {
|
|
1259
|
+
opener = frame.contentDocument?.activeElement;
|
|
1260
|
+
button.focus({ preventScroll: true });
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1263
|
+
return () => {
|
|
1264
|
+
const target = opener;
|
|
1265
|
+
target?.ownerDocument.defaultView?.requestAnimationFrame(() => {
|
|
1266
|
+
if (target.isConnected) target.focus({ preventScroll: true });
|
|
1267
|
+
});
|
|
1268
|
+
};
|
|
1269
|
+
}, []);
|
|
1253
1270
|
const [reload, setReload] = React4.useState(0);
|
|
1254
1271
|
const generation = React4.useRef(0);
|
|
1255
1272
|
const edit = React4.useRef(null);
|
|
@@ -1383,6 +1400,7 @@ function VideoEditor({ input, mode, onApply, onClose }) {
|
|
|
1383
1400
|
), /* @__PURE__ */ React4.createElement("div", { className: "mt-editor-confirm" }, /* @__PURE__ */ React4.createElement(
|
|
1384
1401
|
Button,
|
|
1385
1402
|
{
|
|
1403
|
+
ref: focusCancel,
|
|
1386
1404
|
label: "Cancel",
|
|
1387
1405
|
variant: "text-tonal-md",
|
|
1388
1406
|
width: "hug",
|
|
@@ -1401,7 +1419,7 @@ function VideoEditor({ input, mode, onApply, onClose }) {
|
|
|
1401
1419
|
}
|
|
1402
1420
|
)))
|
|
1403
1421
|
},
|
|
1404
|
-
video && draft ? /* @__PURE__ */ React4.createElement("div", {
|
|
1422
|
+
video && draft ? /* @__PURE__ */ React4.createElement("div", { className: "mt-editor-content", inert: saving, "aria-busy": saving }, /* @__PURE__ */ React4.createElement(
|
|
1405
1423
|
RecipePlayer,
|
|
1406
1424
|
{
|
|
1407
1425
|
video,
|
|
@@ -1434,27 +1452,7 @@ function VideoEditor({ input, mode, onApply, onClose }) {
|
|
|
1434
1452
|
}
|
|
1435
1453
|
})
|
|
1436
1454
|
}
|
|
1437
|
-
), filmstrip?.error && /* @__PURE__ */ React4.createElement("p", { className: "mt-help", role: "status" }, filmstrip.error), /* @__PURE__ */ React4.createElement("
|
|
1438
|
-
"input",
|
|
1439
|
-
{
|
|
1440
|
-
type: "number",
|
|
1441
|
-
min: "0",
|
|
1442
|
-
max: video.durationMs / 1e3,
|
|
1443
|
-
step: "0.001",
|
|
1444
|
-
value: draft.trim[edge] / 1e3,
|
|
1445
|
-
disabled: saving,
|
|
1446
|
-
onChange: (event) => {
|
|
1447
|
-
if (Number.isFinite(event.currentTarget.valueAsNumber))
|
|
1448
|
-
change({
|
|
1449
|
-
...draft,
|
|
1450
|
-
trim: {
|
|
1451
|
-
...draft.trim,
|
|
1452
|
-
[edge]: Math.round(event.currentTarget.valueAsNumber * 1e3)
|
|
1453
|
-
}
|
|
1454
|
-
});
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
)))))) : /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement("div", { className: "mt-editor-hint" }, /* @__PURE__ */ React4.createElement("span", null, "Drag the frame to move. Drag a corner to resize."), /* @__PURE__ */ React4.createElement("span", { role: "status" }, rect?.width, " \xD7 ", rect?.height)), /* @__PURE__ */ React4.createElement(
|
|
1455
|
+
), filmstrip?.error && /* @__PURE__ */ React4.createElement("p", { className: "mt-help", role: "status" }, filmstrip.error)) : /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement("div", { className: "mt-editor-hint" }, /* @__PURE__ */ React4.createElement("span", null, "Drag the frame to move. Drag a corner to resize."), /* @__PURE__ */ React4.createElement("span", { role: "status" }, rect?.width, " \xD7 ", rect?.height)), /* @__PURE__ */ React4.createElement(
|
|
1458
1456
|
SegmentedControl,
|
|
1459
1457
|
{
|
|
1460
1458
|
label: "Aspect ratio",
|
|
@@ -1464,7 +1462,7 @@ function VideoEditor({ input, mode, onApply, onClose }) {
|
|
|
1464
1462
|
size: "large",
|
|
1465
1463
|
width: "full"
|
|
1466
1464
|
}
|
|
1467
|
-
))) : !error && /* @__PURE__ */ React4.createElement("p", { role: "status" }, "Loading fixed video\u2026"),
|
|
1465
|
+
)), video.colorInterpretation === "assumed-bt709" && /* @__PURE__ */ React4.createElement("p", { className: "mt-help", role: "status" }, "Color information is missing. Standard SDR colors are assumed; export may differ slightly.")) : !error && /* @__PURE__ */ React4.createElement("p", { role: "status" }, "Loading fixed video\u2026"),
|
|
1468
1466
|
error && /* @__PURE__ */ React4.createElement("div", { role: "alert", className: "mt-error" }, error, !video && /* @__PURE__ */ React4.createElement(
|
|
1469
1467
|
Button,
|
|
1470
1468
|
{
|
|
@@ -1499,6 +1497,7 @@ function Candidate({
|
|
|
1499
1497
|
const [video, setVideo] = React5.useState(null);
|
|
1500
1498
|
const [error, setError] = React5.useState("");
|
|
1501
1499
|
const [revision, setRevision] = React5.useState(0);
|
|
1500
|
+
const title = slot.context?.shotName?.trim() || video?.name || "Video";
|
|
1502
1501
|
const identity = JSON.stringify(slot.input);
|
|
1503
1502
|
React5.useEffect(() => {
|
|
1504
1503
|
let active = true;
|
|
@@ -1534,11 +1533,11 @@ function Candidate({
|
|
|
1534
1533
|
VideoPlayer,
|
|
1535
1534
|
{
|
|
1536
1535
|
src: video.previewUrl,
|
|
1537
|
-
title
|
|
1536
|
+
title,
|
|
1538
1537
|
controlsPlacement: "overlay",
|
|
1539
1538
|
onError: () => setError("This video could not be played. Reload its fixed preview.")
|
|
1540
1539
|
}
|
|
1541
|
-
)), /* @__PURE__ */ React5.createElement("div", { className: "mt-candidate-caption" }, /* @__PURE__ */ React5.createElement("div", { className: "mt-candidate-heading" }, /* @__PURE__ */ React5.createElement("div", null, /* @__PURE__ */ React5.createElement("strong", null, slot.input ?
|
|
1540
|
+
)), /* @__PURE__ */ React5.createElement("div", { className: "mt-candidate-caption" }, /* @__PURE__ */ React5.createElement("div", { className: "mt-candidate-heading" }, /* @__PURE__ */ React5.createElement("div", null, /* @__PURE__ */ React5.createElement("strong", null, slot.input ? title : "Candidate"), video && /* @__PURE__ */ React5.createElement("span", null, "Variant ", video.versionNumber, video.edited ? " \xB7 Edited" : "")), menu), video?.colorInterpretation === "assumed-bt709" && /* @__PURE__ */ React5.createElement("span", null, "Color information is missing. Standard SDR colors are assumed; export may differ slightly.")), /* @__PURE__ */ React5.createElement("div", { className: "mt-candidate-context" }, slot.input && (video || slot.context?.spokenLine || slot.context?.hook || slot.context?.cta) && /* @__PURE__ */ React5.createElement("dl", null, slot.context?.spokenLine && /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement("dt", null, "Spoken line"), /* @__PURE__ */ React5.createElement("dd", null, slot.context.spokenLine)), slot.context?.hook && /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement("dt", null, "Opening Hook"), /* @__PURE__ */ React5.createElement("dd", null, slot.context.hook)), slot.context && /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement("dt", null, "CTA"), /* @__PURE__ */ React5.createElement("dd", null, slot.context.cta || "None")), video && /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement("dt", null, "Format"), /* @__PURE__ */ React5.createElement("dd", null, formatLabel(video.geometry.pixelRect.width, video.geometry.pixelRect.height)), /* @__PURE__ */ React5.createElement("dt", null, "Duration"), /* @__PURE__ */ React5.createElement("dd", null, Number((video.effectiveDurationMs / 1e3).toFixed(2)), "s")))));
|
|
1542
1541
|
}
|
|
1543
1542
|
function VideoCompare(props) {
|
|
1544
1543
|
const [generation, setGeneration] = React5.useState(0);
|
package/dist/client.css
CHANGED
|
@@ -1396,7 +1396,11 @@
|
|
|
1396
1396
|
.vx-video-cover::before {
|
|
1397
1397
|
position: absolute;
|
|
1398
1398
|
inset: 0;
|
|
1399
|
-
background:
|
|
1399
|
+
background:
|
|
1400
|
+
linear-gradient(
|
|
1401
|
+
180deg,
|
|
1402
|
+
rgb(0 0 0 / 0%) 0%,
|
|
1403
|
+
rgb(0 0 0 / 60%) 100%);
|
|
1400
1404
|
content: "";
|
|
1401
1405
|
pointer-events: none;
|
|
1402
1406
|
}
|
|
@@ -2020,19 +2024,28 @@
|
|
|
2020
2024
|
.mt-editor .vx-dialog > footer {
|
|
2021
2025
|
padding: 32px 24px 24px;
|
|
2022
2026
|
}
|
|
2023
|
-
.mt-editor
|
|
2027
|
+
.mt-editor .vx-dialog[open] {
|
|
2024
2028
|
display: flex;
|
|
2025
2029
|
flex-direction: column;
|
|
2026
2030
|
overflow: hidden;
|
|
2027
2031
|
}
|
|
2028
|
-
.mt-editor
|
|
2032
|
+
.mt-editor .vx-dialog > :is(header, footer) {
|
|
2029
2033
|
flex-shrink: 0;
|
|
2030
2034
|
}
|
|
2031
|
-
.mt-editor
|
|
2035
|
+
.mt-editor .vx-dialog-body {
|
|
2032
2036
|
min-height: 0;
|
|
2033
2037
|
overflow: auto;
|
|
2034
|
-
|
|
2035
|
-
|
|
2038
|
+
}
|
|
2039
|
+
.mt-editor-content {
|
|
2040
|
+
display: flex;
|
|
2041
|
+
flex-direction: column;
|
|
2042
|
+
gap: var(--vx-space-16);
|
|
2043
|
+
}
|
|
2044
|
+
.mt-editor-content > * {
|
|
2045
|
+
flex-shrink: 0;
|
|
2046
|
+
}
|
|
2047
|
+
.mt-editor-content > p {
|
|
2048
|
+
margin: 0;
|
|
2036
2049
|
}
|
|
2037
2050
|
.mt-editor-actions {
|
|
2038
2051
|
display: flex;
|
|
@@ -2057,7 +2070,8 @@
|
|
|
2057
2070
|
gap: 8px;
|
|
2058
2071
|
color: var(--vx-text-secondary);
|
|
2059
2072
|
font-size: 14px;
|
|
2060
|
-
margin:
|
|
2073
|
+
margin: 0;
|
|
2074
|
+
flex-wrap: wrap;
|
|
2061
2075
|
}
|
|
2062
2076
|
.mt-editor-hint > [role=status] {
|
|
2063
2077
|
white-space: nowrap;
|
|
@@ -2148,18 +2162,6 @@
|
|
|
2148
2162
|
border-radius: 0.911px;
|
|
2149
2163
|
background: var(--vx-text-on-content-primary);
|
|
2150
2164
|
}
|
|
2151
|
-
.mt-precision {
|
|
2152
|
-
margin-top: 12px;
|
|
2153
|
-
color: var(--vx-text-secondary);
|
|
2154
|
-
font-size: 12px;
|
|
2155
|
-
}
|
|
2156
|
-
.mt-precision > summary {
|
|
2157
|
-
cursor: pointer;
|
|
2158
|
-
width: fit-content;
|
|
2159
|
-
}
|
|
2160
|
-
.mt-precision .mt-fields {
|
|
2161
|
-
color: var(--vx-text-primary);
|
|
2162
|
-
}
|
|
2163
2165
|
.mt-player {
|
|
2164
2166
|
position: relative;
|
|
2165
2167
|
background: #000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vivix-labs/media-tools",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"react-dom": "^19.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@vivix-labs/ui-system": "
|
|
40
|
+
"@vivix-labs/ui-system": "workspace:*"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "node ../../scripts/build-product-packages.mjs media-tools"
|
|
44
44
|
}
|
|
45
|
-
}
|
|
45
|
+
}
|
|
Binary file
|