@lalalic/markcut 2.6.0 → 2.7.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.
@@ -41679,11 +41679,11 @@ var JsxParser = class extends import_react125.default.Component {
41679
41679
  constructor() {
41680
41680
  super(...arguments);
41681
41681
  __publicField(this, "ParsedChildren", null);
41682
- __privateAdd(this, _parseJSX, (jsx76) => {
41682
+ __privateAdd(this, _parseJSX, (jsx79) => {
41683
41683
  const parser = Parser.extend(AcornJSX.default({
41684
41684
  autoCloseVoidElements: this.props.autoCloseVoidElements
41685
41685
  }));
41686
- const wrappedJsx = `<root>${jsx76}</root>`;
41686
+ const wrappedJsx = `<root>${jsx79}</root>`;
41687
41687
  let parsed = [];
41688
41688
  try {
41689
41689
  parsed = parser.parse(wrappedJsx, { ecmaVersion: "latest" });
@@ -41981,8 +41981,8 @@ var JsxParser = class extends import_react125.default.Component {
41981
41981
  });
41982
41982
  }
41983
41983
  render() {
41984
- const jsx76 = (this.props.jsx || "").trim().replace(/<!DOCTYPE([^>]*)>/g, "");
41985
- this.ParsedChildren = __privateGet(this, _parseJSX).call(this, jsx76);
41984
+ const jsx79 = (this.props.jsx || "").trim().replace(/<!DOCTYPE([^>]*)>/g, "");
41985
+ this.ParsedChildren = __privateGet(this, _parseJSX).call(this, jsx79);
41986
41986
  const className2 = [.../* @__PURE__ */ new Set(["jsx-parser", ...String(this.props.className).split(" ")])].filter(Boolean).join(" ");
41987
41987
  return this.props.renderInWrapper ? /* @__PURE__ */ import_react125.default.createElement("div", {
41988
41988
  className: className2
@@ -42090,7 +42090,7 @@ function useTweenBindings(action) {
42090
42090
  // src/types/Component.tsx
42091
42091
  var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
42092
42092
  function TweenedJsxParser({
42093
- jsx: jsx76,
42093
+ jsx: jsx79,
42094
42094
  components,
42095
42095
  data: data2,
42096
42096
  action
@@ -42101,7 +42101,7 @@ function TweenedJsxParser({
42101
42101
  {
42102
42102
  components,
42103
42103
  bindings: React30.useMemo(() => ({ ...data2, ...tweenBindings }), [data2, tweenBindings]),
42104
- jsx: jsx76,
42104
+ jsx: jsx79,
42105
42105
  renderInWrapper: false,
42106
42106
  blacklistedAttrs: [],
42107
42107
  disableKeyGeneration: true,
@@ -42152,7 +42152,7 @@ function ComponentLeaf({ stream: stream2 }) {
42152
42152
  );
42153
42153
  }
42154
42154
  function EventAwareComponent({
42155
- jsx: jsx76,
42155
+ jsx: jsx79,
42156
42156
  components,
42157
42157
  data: data2,
42158
42158
  action,
@@ -42163,7 +42163,7 @@ function EventAwareComponent({
42163
42163
  return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
42164
42164
  TweenedJsxParser,
42165
42165
  {
42166
- jsx: jsx76,
42166
+ jsx: jsx79,
42167
42167
  components,
42168
42168
  data: data2,
42169
42169
  action
@@ -45558,8 +45558,8 @@ function FolderLeaf({ stream: stream2 }) {
45558
45558
  style: containerStyle3,
45559
45559
  className: `${orientation} ${stream2.type}`.trim(),
45560
45560
  children: [
45561
- isSeries ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TypedSeries, { children: sequences }) : sequences,
45562
- bgContent
45561
+ bgContent,
45562
+ isSeries ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TypedSeries, { children: sequences }) : sequences
45563
45563
  ]
45564
45564
  }
45565
45565
  ) });
@@ -45959,12 +45959,14 @@ function GroupedCueInner({
45959
45959
  function SubtitleOverlay({ subtitle }) {
45960
45960
  const { fps } = useVideoConfig();
45961
45961
  const [cues, setCues] = React46.useState(null);
45962
+ if (!subtitle.src) return null;
45962
45963
  const CaptionComponent = React46.useMemo(
45963
45964
  () => resolveCaption(subtitle.type),
45964
45965
  [subtitle.type]
45965
45966
  );
45966
45967
  React46.useEffect(() => {
45967
45968
  const { src } = subtitle;
45969
+ if (!src) return;
45968
45970
  if (src.includes("-->")) {
45969
45971
  setCues(parseVTT(src));
45970
45972
  return;
@@ -46014,6 +46016,325 @@ function SubtitleOverlay({ subtitle }) {
46014
46016
  )) });
46015
46017
  }
46016
46018
 
46019
+ // src/components/StoryboardSlot.tsx
46020
+ var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
46021
+ function StoryboardSlot({ kind, prompt }) {
46022
+ const isVideo = kind === "video";
46023
+ const bgGrad = isVideo ? "linear-gradient(135deg,#7c2d12,#b91c1c)" : "linear-gradient(135deg,#1e3a8a,#6d28d9)";
46024
+ const accentColor = isVideo ? "#fbbf24" : "#93c5fd";
46025
+ const label3 = isVideo ? "Video" : "Image";
46026
+ const emoji3 = isVideo ? "\u{1F3AC}" : "\u{1F5BC}\uFE0F";
46027
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
46028
+ "div",
46029
+ {
46030
+ style: {
46031
+ position: "absolute",
46032
+ inset: 0,
46033
+ overflow: "hidden",
46034
+ display: "flex",
46035
+ flexDirection: "column",
46036
+ alignItems: "center",
46037
+ justifyContent: "center",
46038
+ background: bgGrad,
46039
+ color: "#fff",
46040
+ fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
46041
+ padding: "6%",
46042
+ boxSizing: "border-box"
46043
+ },
46044
+ children: [
46045
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
46046
+ "div",
46047
+ {
46048
+ style: {
46049
+ position: "absolute",
46050
+ inset: "4%",
46051
+ border: "3px dashed rgba(255,255,255,0.35)",
46052
+ borderRadius: 24,
46053
+ pointerEvents: "none"
46054
+ }
46055
+ }
46056
+ ),
46057
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
46058
+ "div",
46059
+ {
46060
+ style: {
46061
+ display: "flex",
46062
+ alignItems: "center",
46063
+ gap: "0.5em",
46064
+ background: "rgba(0,0,0,0.35)",
46065
+ border: `2px solid ${accentColor}`,
46066
+ borderRadius: 999,
46067
+ padding: "0.5em 1.1em",
46068
+ fontSize: "2.2vh",
46069
+ fontWeight: 800,
46070
+ letterSpacing: "0.12em",
46071
+ marginBottom: "3vh"
46072
+ },
46073
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { style: { fontSize: "3.4vh", lineHeight: 1 }, children: emoji3 })
46074
+ }
46075
+ ),
46076
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
46077
+ "div",
46078
+ {
46079
+ style: {
46080
+ position: "relative",
46081
+ maxWidth: "88%",
46082
+ textAlign: "center",
46083
+ fontSize: "3.4vh",
46084
+ lineHeight: 1.4,
46085
+ fontWeight: 600,
46086
+ textShadow: "0 2px 8px rgba(0,0,0,0.5)",
46087
+ whiteSpace: "pre-wrap",
46088
+ wordBreak: "break-word"
46089
+ },
46090
+ children: prompt ?? (isVideo ? "(no video prompt)" : "(no image prompt)")
46091
+ }
46092
+ )
46093
+ ]
46094
+ }
46095
+ );
46096
+ }
46097
+
46098
+ // src/components/StoryboardCaption.tsx
46099
+ var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
46100
+ function StoryboardCaption({ script, speaker }) {
46101
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
46102
+ "div",
46103
+ {
46104
+ style: {
46105
+ position: "absolute",
46106
+ bottom: "10%",
46107
+ left: "5%",
46108
+ right: "5%",
46109
+ display: "flex",
46110
+ flexDirection: "column",
46111
+ alignItems: "center",
46112
+ pointerEvents: "none"
46113
+ },
46114
+ children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
46115
+ "div",
46116
+ {
46117
+ style: {
46118
+ maxWidth: "90%",
46119
+ background: "rgba(0,0,0,0.7)",
46120
+ backdropFilter: "blur(4px)",
46121
+ borderRadius: 16,
46122
+ padding: "2.5vh 4vh",
46123
+ textAlign: "center",
46124
+ color: "#fff",
46125
+ fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif"
46126
+ },
46127
+ children: [
46128
+ speaker && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
46129
+ "div",
46130
+ {
46131
+ style: {
46132
+ fontSize: "2vh",
46133
+ fontWeight: 700,
46134
+ color: "#93c5fd",
46135
+ marginBottom: "0.6vh",
46136
+ letterSpacing: "0.04em"
46137
+ },
46138
+ children: speaker
46139
+ }
46140
+ ),
46141
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
46142
+ "div",
46143
+ {
46144
+ style: {
46145
+ fontSize: "2.6vh",
46146
+ lineHeight: 1.5,
46147
+ fontWeight: 500,
46148
+ textShadow: "0 1px 4px rgba(0,0,0,0.4)",
46149
+ whiteSpace: "pre-wrap",
46150
+ wordBreak: "break-word"
46151
+ },
46152
+ children: script
46153
+ }
46154
+ )
46155
+ ]
46156
+ }
46157
+ )
46158
+ }
46159
+ );
46160
+ }
46161
+
46162
+ // src/components/StoryboardInfo.tsx
46163
+ var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
46164
+ function StoryboardInfo({ config: config2, variants, frontmatter }) {
46165
+ const parts = (config2 ?? "").split(" \xB7 ").filter(Boolean);
46166
+ const variantList = (variants ?? "").split(/,\s*/).filter(Boolean);
46167
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
46168
+ "div",
46169
+ {
46170
+ style: {
46171
+ position: "absolute",
46172
+ inset: 0,
46173
+ display: "flex",
46174
+ flexDirection: "column",
46175
+ alignItems: "center",
46176
+ justifyContent: "center",
46177
+ background: "linear-gradient(135deg,#0f172a,#1e293b,#334155)",
46178
+ color: "#fff",
46179
+ fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
46180
+ padding: "8%",
46181
+ boxSizing: "border-box"
46182
+ },
46183
+ children: [
46184
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
46185
+ "div",
46186
+ {
46187
+ style: {
46188
+ position: "absolute",
46189
+ inset: "5%",
46190
+ border: "2px solid rgba(255,255,255,0.08)",
46191
+ borderRadius: "50%"
46192
+ }
46193
+ }
46194
+ ),
46195
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
46196
+ "div",
46197
+ {
46198
+ style: {
46199
+ position: "absolute",
46200
+ inset: "12%",
46201
+ border: "1px solid rgba(255,255,255,0.05)",
46202
+ borderRadius: "50%"
46203
+ }
46204
+ }
46205
+ ),
46206
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { style: { fontSize: "6vh", marginBottom: "2.5vh", opacity: 0.7 }, children: "\u{1F3AC}" }),
46207
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
46208
+ "div",
46209
+ {
46210
+ style: {
46211
+ fontSize: "4.2vh",
46212
+ fontWeight: 800,
46213
+ letterSpacing: "0.02em",
46214
+ marginBottom: "3vh",
46215
+ textAlign: "center",
46216
+ textShadow: "0 2px 12px rgba(0,0,0,0.5)"
46217
+ },
46218
+ children: "Storyboard Preview"
46219
+ }
46220
+ ),
46221
+ parts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
46222
+ "div",
46223
+ {
46224
+ style: {
46225
+ display: "flex",
46226
+ flexWrap: "wrap",
46227
+ justifyContent: "center",
46228
+ gap: "1.2vh",
46229
+ maxWidth: "85%",
46230
+ marginBottom: variantList.length > 0 ? "2.5vh" : 0
46231
+ },
46232
+ children: parts.map((entry) => {
46233
+ const colonIdx = entry.indexOf(":");
46234
+ const label3 = colonIdx > 0 ? entry.slice(0, colonIdx).trim() : "";
46235
+ const value = colonIdx > 0 ? entry.slice(colonIdx + 1).trim() : entry;
46236
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
46237
+ "div",
46238
+ {
46239
+ style: {
46240
+ background: "rgba(255,255,255,0.07)",
46241
+ border: "1px solid rgba(255,255,255,0.12)",
46242
+ borderRadius: 12,
46243
+ padding: "1.2vh 2.2vh",
46244
+ textAlign: "center",
46245
+ minWidth: "16vh"
46246
+ },
46247
+ children: [
46248
+ label3 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
46249
+ "div",
46250
+ {
46251
+ style: {
46252
+ fontSize: "1.6vh",
46253
+ fontWeight: 600,
46254
+ color: "#93c5fd",
46255
+ letterSpacing: "0.08em",
46256
+ textTransform: "uppercase",
46257
+ marginBottom: "0.4vh"
46258
+ },
46259
+ children: label3
46260
+ }
46261
+ ),
46262
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
46263
+ "div",
46264
+ {
46265
+ style: {
46266
+ fontSize: "2.2vh",
46267
+ fontWeight: 700,
46268
+ whiteSpace: "pre-wrap",
46269
+ wordBreak: "break-word",
46270
+ opacity: value.startsWith("http") ? 0.8 : 1
46271
+ },
46272
+ children: value
46273
+ }
46274
+ )
46275
+ ]
46276
+ },
46277
+ label3 || entry
46278
+ );
46279
+ })
46280
+ }
46281
+ ),
46282
+ frontmatter && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
46283
+ "div",
46284
+ {
46285
+ style: {
46286
+ maxWidth: "85%",
46287
+ background: "rgba(255,255,255,0.05)",
46288
+ border: "1px solid rgba(255,255,255,0.1)",
46289
+ borderRadius: 12,
46290
+ padding: "1.5vh 2.5vh",
46291
+ marginBottom: "2.5vh",
46292
+ fontFamily: "monospace",
46293
+ fontSize: "1.8vh",
46294
+ lineHeight: 1.6,
46295
+ color: "rgba(255,255,255,0.8)",
46296
+ whiteSpace: "pre-wrap",
46297
+ wordBreak: "break-word",
46298
+ textAlign: "left",
46299
+ maxHeight: "28vh",
46300
+ overflow: "auto"
46301
+ },
46302
+ children: frontmatter
46303
+ }
46304
+ ),
46305
+ variantList.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
46306
+ "div",
46307
+ {
46308
+ style: {
46309
+ display: "flex",
46310
+ flexWrap: "wrap",
46311
+ justifyContent: "center",
46312
+ gap: "1vh"
46313
+ },
46314
+ children: variantList.map((v2) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
46315
+ "div",
46316
+ {
46317
+ style: {
46318
+ background: "rgba(251,191,36,0.15)",
46319
+ border: "1px solid rgba(251,191,36,0.35)",
46320
+ borderRadius: 999,
46321
+ padding: "0.8vh 2vh",
46322
+ fontSize: "1.8vh",
46323
+ fontWeight: 600,
46324
+ color: "#fbbf24",
46325
+ letterSpacing: "0.04em"
46326
+ },
46327
+ children: v2
46328
+ },
46329
+ v2
46330
+ ))
46331
+ }
46332
+ )
46333
+ ]
46334
+ }
46335
+ );
46336
+ }
46337
+
46017
46338
  // node_modules/zod/v4/classic/external.js
46018
46339
  var external_exports = {};
46019
46340
  __export(external_exports, {
@@ -59812,7 +60133,7 @@ var folder = base.extend({
59812
60133
  children: external_exports.array(external_exports.lazy(() => stream)).default(() => [])
59813
60134
  });
59814
60135
  var subtitleOverlay = external_exports.object({
59815
- src: external_exports.string().describe("path or URL to VTT file covering the full video duration"),
60136
+ src: external_exports.string().optional().describe("path or URL to VTT file covering the full video duration; omitted when no subtitles are available"),
59816
60137
  style: external_exports.string().optional().describe("inline css for the overlay container"),
59817
60138
  fontSize: external_exports.union([external_exports.number(), external_exports.string()]).optional(),
59818
60139
  type: external_exports.string().optional().describe("caption animation type: bounce, fade, typewriter, colorful, glowing, neon, etc."),
@@ -59933,8 +60254,13 @@ var stream = external_exports.discriminatedUnion("type", [
59933
60254
  ]);
59934
60255
 
59935
60256
  // src/entry.tsx
59936
- var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
59937
- var DefaultContainer2 = ({ children, style: style2, className: className2 }) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: className2, style: { position: "absolute", inset: 0, ...style2 }, children });
60257
+ var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
60258
+ var DefaultContainer2 = ({ children, style: style2, className: className2 }) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: className2, style: { position: "absolute", inset: 0, ...style2 }, children });
60259
+ var BUILTIN_COMPONENTS = {
60260
+ StoryboardSlot,
60261
+ StoryboardCaption,
60262
+ StoryboardInfo
60263
+ };
59938
60264
  function useComponentRegistry(imports) {
59939
60265
  const [registry2, setRegistry] = React47.useState(null);
59940
60266
  const handleRef = React47.useRef(null);
@@ -59996,33 +60322,37 @@ function MarkCut({ root: root2, compose, background = "#000" }) {
59996
60322
  const registry2 = useComponentRegistry(parsed.imports);
59997
60323
  React47.useMemo(() => getDurationInSeconds(parsed, true), [parsed]);
59998
60324
  const value = React47.useMemo(
59999
- () => ({
60000
- Container: compose?.Container ?? DefaultContainer2,
60001
- onError: compose?.onError,
60002
- components: registry2 ?? compose?.components
60003
- }),
60325
+ () => {
60326
+ const userComponents = registry2 ?? compose?.components;
60327
+ const components = userComponents ? { ...BUILTIN_COMPONENTS, ...userComponents } : BUILTIN_COMPONENTS;
60328
+ return {
60329
+ Container: compose?.Container ?? DefaultContainer2,
60330
+ onError: compose?.onError,
60331
+ components
60332
+ };
60333
+ },
60004
60334
  [compose, registry2]
60005
60335
  );
60006
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ComposeContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(EventProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(AbsoluteFill, { style: { background }, children: [
60007
- parsed.stylesheet && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("style", { children: parsed.stylesheet }),
60008
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(FolderLeaf, { stream: parsed }),
60009
- parsed.subtitle && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(SubtitleOverlay, { subtitle: parsed.subtitle })
60336
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ComposeContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(EventProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(AbsoluteFill, { style: { background }, children: [
60337
+ parsed.stylesheet && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("style", { children: parsed.stylesheet }),
60338
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(FolderLeaf, { stream: parsed }),
60339
+ parsed.subtitle && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(SubtitleOverlay, { subtitle: parsed.subtitle })
60010
60340
  ] }) }) });
60011
60341
  }
60012
60342
 
60013
60343
  // src/player/components/HeaderBar.tsx
60014
60344
  var React48 = __toESM(require_react(), 1);
60015
- var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
60345
+ var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
60016
60346
  function HeaderBar({ mode, sceneInfo, editStatus, sseConnected }) {
60017
60347
  const handleClose = React48.useCallback(() => {
60018
60348
  navigator.sendBeacon("/api/shutdown", "{}");
60019
60349
  document.body.innerHTML = "<div style='display:flex;align-items:center;justify-content:center;height:100vh;background:#0a0a0a;color:#555;font-family:sans-serif;font-size:16px'>\u2B61 player closed \u2014 return to terminal</div>";
60020
60350
  }, []);
60021
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { id: "header", children: [
60022
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { style: { flex: 1, display: "flex", alignItems: "center", gap: 8 }, children: [
60023
- mode === "label" && sceneInfo && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { id: "scene-info", children: sceneInfo }),
60024
- mode === "edit" && editStatus && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { id: "edit-status", children: editStatus }),
60025
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
60351
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { id: "header", children: [
60352
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { style: { flex: 1, display: "flex", alignItems: "center", gap: 8 }, children: [
60353
+ mode === "label" && sceneInfo && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { id: "scene-info", children: sceneInfo }),
60354
+ mode === "edit" && editStatus && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { id: "edit-status", children: editStatus }),
60355
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
60026
60356
  "span",
60027
60357
  {
60028
60358
  id: "sse-indicator",
@@ -60038,13 +60368,13 @@ function HeaderBar({ mode, sceneInfo, editStatus, sseConnected }) {
60038
60368
  }
60039
60369
  )
60040
60370
  ] }),
60041
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { id: "header-actions", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("button", { id: "close-btn", title: "Close player and return to terminal", onClick: handleClose, children: "\u2715" }) })
60371
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { id: "header-actions", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("button", { id: "close-btn", title: "Close player and return to terminal", onClick: handleClose, children: "\u2715" }) })
60042
60372
  ] });
60043
60373
  }
60044
60374
 
60045
60375
  // src/player/components/EditControls.tsx
60046
60376
  var React49 = __toESM(require_react(), 1);
60047
- var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
60377
+ var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
60048
60378
  function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeScene }) {
60049
60379
  const [busy, setBusy] = React49.useState(false);
60050
60380
  const inputRef = React49.useRef(null);
@@ -60090,8 +60420,8 @@ function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeSc
60090
60420
  },
60091
60421
  [handleApplyEdit]
60092
60422
  );
60093
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { id: "bottom-bar", children: [
60094
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
60423
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { id: "bottom-bar", children: [
60424
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
60095
60425
  "input",
60096
60426
  {
60097
60427
  ref: inputRef,
@@ -60100,7 +60430,7 @@ function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeSc
60100
60430
  onKeyDown: handleKeyDown
60101
60431
  }
60102
60432
  ),
60103
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
60433
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
60104
60434
  "button",
60105
60435
  {
60106
60436
  id: "edit-btn",
@@ -60115,7 +60445,7 @@ function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeSc
60115
60445
 
60116
60446
  // src/player/components/LabelControls.tsx
60117
60447
  var React50 = __toESM(require_react(), 1);
60118
- var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
60448
+ var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
60119
60449
  var VIDEO_EXT = {
60120
60450
  ".mov": 1,
60121
60451
  ".mp4": 1,
@@ -60282,7 +60612,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
60282
60612
  [effectiveIdx]
60283
60613
  );
60284
60614
  const renderThumbnails = () => {
60285
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { id: "thumbnails", children: scenes.map((scene2, i3) => {
60615
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { id: "thumbnails", children: scenes.map((scene2, i3) => {
60286
60616
  const isActive = i3 === effectiveIdx;
60287
60617
  const entry = labelData[i3];
60288
60618
  const hasLabel = entry && (entry.overall || Object.keys(entry.timed).length > 0);
@@ -60290,9 +60620,9 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
60290
60620
  const ext = scene2.src.substring(scene2.src.lastIndexOf(".")).toLowerCase();
60291
60621
  const isVideo = !!VIDEO_EXT[ext];
60292
60622
  if (scene2.src && !isVideo) {
60293
- thumbContent = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("img", { src: scene2.src, alt: "", loading: "lazy" });
60623
+ thumbContent = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("img", { src: scene2.src, alt: "", loading: "lazy" });
60294
60624
  } else if (scene2.src && isVideo) {
60295
- thumbContent = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
60625
+ thumbContent = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
60296
60626
  "video",
60297
60627
  {
60298
60628
  src: scene2.src,
@@ -60302,7 +60632,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
60302
60632
  }
60303
60633
  );
60304
60634
  } else {
60305
- thumbContent = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
60635
+ thumbContent = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
60306
60636
  "div",
60307
60637
  {
60308
60638
  style: {
@@ -60320,7 +60650,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
60320
60650
  }
60321
60651
  );
60322
60652
  }
60323
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
60653
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
60324
60654
  "div",
60325
60655
  {
60326
60656
  className: "thumb-item" + (isActive ? " active" : ""),
@@ -60328,7 +60658,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
60328
60658
  onClick: () => seekToScene(i3),
60329
60659
  children: [
60330
60660
  thumbContent,
60331
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "thumb-badge" + (hasLabel ? " has-label" : "") })
60661
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "thumb-badge" + (hasLabel ? " has-label" : "") })
60332
60662
  ]
60333
60663
  },
60334
60664
  i3
@@ -60339,12 +60669,12 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
60339
60669
  const entry = labelData[effectiveIdx];
60340
60670
  const timed = entry && entry.timed || {};
60341
60671
  const keys = Object.keys(timed).sort();
60342
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { id: "timed-labels", children: keys.map((k2) => {
60672
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { id: "timed-labels", children: keys.map((k2) => {
60343
60673
  const sec = parseInt(k2.replace("at_", "")) / 1e3;
60344
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "timed-label", "data-key": k2, children: [
60345
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "tl-time", children: formatTime2(sec) }),
60346
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "tl-text", dangerouslySetInnerHTML: { __html: escHtml(timed[k2]) } }),
60347
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("button", { className: "tl-del", title: "Remove", onClick: () => deleteTimed(k2), children: "\xD7" })
60674
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "timed-label", "data-key": k2, children: [
60675
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "tl-time", children: formatTime2(sec) }),
60676
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "tl-text", dangerouslySetInnerHTML: { __html: escHtml(timed[k2]) } }),
60677
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", { className: "tl-del", title: "Remove", onClick: () => deleteTimed(k2), children: "\xD7" })
60348
60678
  ] }, k2);
60349
60679
  }) });
60350
60680
  };
@@ -60356,12 +60686,12 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
60356
60686
  sceneInfoText = currentScene.name + " (" + currentTime.toFixed(1) + "s)";
60357
60687
  }
60358
60688
  }
60359
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
60689
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
60360
60690
  renderThumbnails(),
60361
60691
  renderTimedLabels(),
60362
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { id: "saved-toast", children: "\u2713 Label saved" }),
60363
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { id: "bottom-bar", children: [
60364
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
60692
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { id: "saved-toast", children: "\u2713 Label saved" }),
60693
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { id: "bottom-bar", children: [
60694
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
60365
60695
  "input",
60366
60696
  {
60367
60697
  ref: inputRef,
@@ -60377,7 +60707,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
60377
60707
  }
60378
60708
  }
60379
60709
  ),
60380
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
60710
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
60381
60711
  "button",
60382
60712
  {
60383
60713
  id: "label-btn",
@@ -60393,7 +60723,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
60393
60723
 
60394
60724
  // src/player/components/SceneThumbnails.tsx
60395
60725
  var React51 = __toESM(require_react(), 1);
60396
- var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
60726
+ var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
60397
60727
  function SceneThumbnails({ currentTime, onSeek }) {
60398
60728
  const [scenes, setScenes] = React51.useState([]);
60399
60729
  React51.useEffect(() => {
@@ -60412,9 +60742,9 @@ function SceneThumbnails({ currentTime, onSeek }) {
60412
60742
  break;
60413
60743
  }
60414
60744
  }
60415
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { id: "scene-thumbnails", children: scenes.map((scene2, i3) => {
60745
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { id: "scene-thumbnails", children: scenes.map((scene2, i3) => {
60416
60746
  const isActive = i3 === activeIdx;
60417
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
60747
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
60418
60748
  "span",
60419
60749
  {
60420
60750
  className: "scene-pill" + (isActive ? " active" : ""),
@@ -60428,7 +60758,7 @@ function SceneThumbnails({ currentTime, onSeek }) {
60428
60758
 
60429
60759
  // src/player/components/VariantBar.tsx
60430
60760
  var React54 = __toESM(require_react(), 1);
60431
- var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
60761
+ var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
60432
60762
  function VariantBar() {
60433
60763
  const [variants, setVariants] = React54.useState([]);
60434
60764
  const currentVariant = (typeof window !== "undefined" ? window.VARIANT : null) || "default";
@@ -60441,7 +60771,7 @@ function VariantBar() {
60441
60771
  });
60442
60772
  }, []);
60443
60773
  if (variants.length <= 1) return null;
60444
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { id: "variant-bar", children: variants.map((v2) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
60774
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { id: "variant-bar", children: variants.map((v2) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
60445
60775
  "a",
60446
60776
  {
60447
60777
  href: `/${v2 === "default" ? "" : v2}`,
@@ -60453,7 +60783,7 @@ function VariantBar() {
60453
60783
  }
60454
60784
 
60455
60785
  // src/player/browser.tsx
60456
- var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
60786
+ var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
60457
60787
  if (typeof window !== "undefined") {
60458
60788
  globalThis.__remotionShared = {
60459
60789
  "react": React55,
@@ -60757,17 +61087,17 @@ function PlayerApp() {
60757
61087
  };
60758
61088
  }, []);
60759
61089
  if (error49) {
60760
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { style: { color: "red", padding: 40, fontFamily: "sans-serif" }, children: [
61090
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { style: { color: "red", padding: 40, fontFamily: "sans-serif" }, children: [
60761
61091
  "Error: ",
60762
61092
  error49
60763
61093
  ] });
60764
61094
  }
60765
61095
  if (!ready) {
60766
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { style: { color: "#888", padding: 40, fontFamily: "sans-serif" }, children: "Loading..." });
61096
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { style: { color: "#888", padding: 40, fontFamily: "sans-serif" }, children: "Loading..." });
60767
61097
  }
60768
61098
  const width = data2.width || 1080;
60769
61099
  const height = data2.height || 1920;
60770
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
61100
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
60771
61101
  "div",
60772
61102
  {
60773
61103
  style: {
@@ -60779,7 +61109,7 @@ function PlayerApp() {
60779
61109
  alignItems: "center"
60780
61110
  },
60781
61111
  children: [
60782
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
61112
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
60783
61113
  HeaderBar,
60784
61114
  {
60785
61115
  mode,
@@ -60788,8 +61118,8 @@ function PlayerApp() {
60788
61118
  sceneInfo: mode === "label" ? labelSceneInfo : void 0
60789
61119
  }
60790
61120
  ),
60791
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(VariantBar, {}),
60792
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { id: "player-frame", style: { flex: 1, width: "100%", maxWidth: 480, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
61121
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(VariantBar, {}),
61122
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { id: "player-frame", style: { flex: 1, width: "100%", maxWidth: 480, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
60793
61123
  Player,
60794
61124
  {
60795
61125
  ref: playerRef,
@@ -60808,7 +61138,7 @@ function PlayerApp() {
60808
61138
  autoPlay
60809
61139
  }
60810
61140
  ) }),
60811
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
61141
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
60812
61142
  SceneThumbnails,
60813
61143
  {
60814
61144
  currentTime,
@@ -60821,7 +61151,7 @@ function PlayerApp() {
60821
61151
  }
60822
61152
  }
60823
61153
  ),
60824
- mode === "edit" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
61154
+ mode === "edit" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
60825
61155
  EditControls,
60826
61156
  {
60827
61157
  onStatusChange: setEditStatus,
@@ -60830,7 +61160,7 @@ function PlayerApp() {
60830
61160
  activeScene
60831
61161
  }
60832
61162
  ),
60833
- mode === "label" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
61163
+ mode === "label" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
60834
61164
  LabelControls,
60835
61165
  {
60836
61166
  playerRef,