@lalalic/markcut 2.2.6 → 2.2.8
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/package.json
CHANGED
|
@@ -6,7 +6,7 @@ The file you are editing is: ${fileName}
|
|
|
6
6
|
Full path: ${filePath}
|
|
7
7
|
|
|
8
8
|
--- Markdown-Descriptive Format Reference ---
|
|
9
|
-
@{docs/markdown-descriptive.md}
|
|
9
|
+
@{skills/markcut/docs/markdown-descriptive.md}
|
|
10
10
|
|
|
11
11
|
TASKS:
|
|
12
12
|
1. Read the .md file directly using your file tools to see its current content
|
package/src/player/browser.tsx
CHANGED
|
@@ -123,7 +123,9 @@ function PlayerApp() {
|
|
|
123
123
|
|
|
124
124
|
// Fetch scenes for active scene tracking
|
|
125
125
|
React.useEffect(() => {
|
|
126
|
-
|
|
126
|
+
const variant = (window as any).VARIANT || "default";
|
|
127
|
+
const url = variant !== "default" ? `/api/video-info?variant=${variant}` : "/api/video-info";
|
|
128
|
+
fetch(url)
|
|
127
129
|
.then((r) => r.json())
|
|
128
130
|
.then((info) => {
|
|
129
131
|
if (info.scenes) {
|
|
@@ -59780,6 +59780,7 @@ var root = folder.extend({
|
|
|
59780
59780
|
fps: external_exports.number().int().positive().default(30),
|
|
59781
59781
|
instruction: external_exports.string().optional(),
|
|
59782
59782
|
metadata: external_exports.string().optional(),
|
|
59783
|
+
seed: external_exports.number().optional().describe("global seed for TTI/TTV generation; substituted into CLI {seed} placeholder"),
|
|
59783
59784
|
stylesheet: external_exports.string().optional().describe("global css; selectors use .type and .name"),
|
|
59784
59785
|
subtitle: subtitleOverlay.optional().describe("global subtitle overlay; src is a VTT file with absolute timestamps"),
|
|
59785
59786
|
/**
|
|
@@ -60351,7 +60352,9 @@ var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
|
|
|
60351
60352
|
function SceneThumbnails({ currentTime, onSeek }) {
|
|
60352
60353
|
const [scenes, setScenes] = React51.useState([]);
|
|
60353
60354
|
React51.useEffect(() => {
|
|
60354
|
-
|
|
60355
|
+
const variant = window.VARIANT || "default";
|
|
60356
|
+
const url2 = variant !== "default" ? `/api/video-info?variant=${variant}` : "/api/video-info";
|
|
60357
|
+
fetch(url2).then((r) => r.json()).then((info2) => {
|
|
60355
60358
|
if (info2.scenes) setScenes(info2.scenes);
|
|
60356
60359
|
}).catch(() => {
|
|
60357
60360
|
});
|
|
@@ -60482,7 +60485,9 @@ function PlayerApp() {
|
|
|
60482
60485
|
const [currentTime, setCurrentTime] = React55.useState(0);
|
|
60483
60486
|
const [activeScene, setActiveScene] = React55.useState("");
|
|
60484
60487
|
React55.useEffect(() => {
|
|
60485
|
-
|
|
60488
|
+
const variant = window.VARIANT || "default";
|
|
60489
|
+
const url2 = variant !== "default" ? `/api/video-info?variant=${variant}` : "/api/video-info";
|
|
60490
|
+
fetch(url2).then((r) => r.json()).then((info2) => {
|
|
60486
60491
|
if (info2.scenes) {
|
|
60487
60492
|
window.__scenes = info2.scenes;
|
|
60488
60493
|
}
|
|
@@ -23,7 +23,9 @@ export function SceneThumbnails({ currentTime, onSeek }: SceneThumbnailsProps) {
|
|
|
23
23
|
const [scenes, setScenes] = React.useState<Scene[]>([]);
|
|
24
24
|
|
|
25
25
|
React.useEffect(() => {
|
|
26
|
-
|
|
26
|
+
const variant = (window as any).VARIANT || "default";
|
|
27
|
+
const url = variant !== "default" ? `/api/video-info?variant=${variant}` : "/api/video-info";
|
|
28
|
+
fetch(url)
|
|
27
29
|
.then((r) => r.json())
|
|
28
30
|
.then((info) => {
|
|
29
31
|
if (info.scenes) setScenes(info.scenes);
|
package/src/player/server.mjs
CHANGED
|
@@ -181,7 +181,7 @@ function startAgentProcess() {
|
|
|
181
181
|
const cmd = resolvedParts[0];
|
|
182
182
|
const cmdArgs = resolvedParts.slice(1);
|
|
183
183
|
|
|
184
|
-
console.log(` 🎬 starting
|
|
184
|
+
console.log(` 🎬 starting edit agent`);
|
|
185
185
|
|
|
186
186
|
const child = spawn(cmd, cmdArgs, { cwd: ROOT, stdio: ["pipe", "pipe", "pipe"] });
|
|
187
187
|
agentProcess = child;
|
|
@@ -1055,8 +1055,17 @@ Edit request: ${text}`;
|
|
|
1055
1055
|
|
|
1056
1056
|
// Serve the main HTML page (variant-aware)
|
|
1057
1057
|
if (path === "/" || path === "/index.html") {
|
|
1058
|
+
// If the resolved variant isn't compiled, fall back to the first
|
|
1059
|
+
// available variant. This handles the common case where the user
|
|
1060
|
+
// passes only --variant zh (no "default" variant exists) and opens
|
|
1061
|
+
// the root URL — the player will fetch the zh variant data instead
|
|
1062
|
+
// of failing on a non-existent "default" variant.
|
|
1063
|
+
let htmlVariant = variantLabel;
|
|
1064
|
+
if (!compiledRootCache.has(variantLabel) && VARIANT_CONFIGS.length > 0) {
|
|
1065
|
+
htmlVariant = VARIANT_CONFIGS[0].label;
|
|
1066
|
+
}
|
|
1058
1067
|
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
|
|
1059
|
-
res.end(getHtml(
|
|
1068
|
+
res.end(getHtml(htmlVariant));
|
|
1060
1069
|
return;
|
|
1061
1070
|
}
|
|
1062
1071
|
|