@lalalic/markcut 3.2.60 → 3.2.61
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/README.md +20 -4
- package/bin/markcut +10 -0
- package/docs/developer-reference.md +41 -1
- package/package.json +8 -2
- package/recipes/markcut/map-cinematic-follow.json +17 -0
- package/recipes/markcut/map-location-reveal.json +17 -0
- package/recipes/markcut/map-route-journey.json +18 -0
- package/recipes/markcut/map-streetview-explore.json +17 -0
- package/skills/markcut/SKILL.md +5 -1
- package/skills/markcut/docs/markdown-descriptive.md +68 -1
- package/skills/markcut/docs/recipes.md +45 -0
- package/skills/markcut/references/mobile-event-preview-cli.md +9 -5
- package/src/descriptive/compiler.ts +38 -2
- package/src/descriptive/markdown.ts +30 -0
- package/src/descriptive/model3d.test.ts +38 -0
- package/src/editor-decision/cli.mjs +21 -0
- package/src/editor-decision/editor-decision.schema.json +41 -0
- package/src/editor-decision/index.mjs +115 -0
- package/src/editor-decision/index.test.mjs +63 -0
- package/src/mcp/bridge.mjs +46 -9
- package/src/mcp/compile-worker.mjs +2 -2
- package/src/mcp/mobile-review-cli.mjs +40 -33
- package/src/mcp/preview-mobile.css +21 -8
- package/src/mcp/preview.mjs +95 -57
- package/src/mcp/remote-assets.mjs +85 -7
- package/src/mcp/remotion-app.bundle.js +5013 -1117
- package/src/mcp/remotion-app.tsx +117 -10
- package/src/mcp/server.mjs +4 -2
- package/src/player/browser.tsx +1 -3
- package/src/player/bundle/player.js +73054 -17357
- package/src/player/components/HeaderBar.tsx +3 -1
- package/src/player/components/VariantBar.tsx +20 -21
- package/src/player/pipeline.mjs +133 -77
- package/src/player/server.mjs +43 -23
- package/src/recipes/catalog.mjs +115 -0
- package/src/recipes/cli.mjs +87 -0
- package/src/render/cli.mjs +38 -1
- package/src/schema/index.ts +21 -0
- package/src/types/Folder.tsx +2 -0
- package/src/types/Model3D.tsx +91 -0
- package/src/vision/cli.mjs +63 -50
- package/tests/mcp-editor-decisions-mobile.test.ts +35 -0
- package/tests/mcp-preview-bridge.test.ts +44 -3
- package/tests/mcp-preview-proxy-version.test.mjs +80 -0
- package/tests/mcp-preview.test.ts +41 -8
- package/tests/mcp-remote-assets.test.ts +17 -0
- package/tests/mcp-static-preview.test.ts +1 -1
- package/tests/mcp-video-selector.test.ts +55 -0
- package/tests/mobile-preview-cli.test.ts +10 -15
- package/tests/recipes-catalog.test.ts +141 -0
- package/tests/vision-generic-vtt-hooks.test.ts +7 -7
- package/tests/vision-normalized-metadata.test.ts +23 -0
|
@@ -16,9 +16,10 @@ interface HeaderBarProps {
|
|
|
16
16
|
sseConnected?: boolean;
|
|
17
17
|
/** UI locale */
|
|
18
18
|
locale?: "en" | "zh";
|
|
19
|
+
selector?: React.ReactNode;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
export function HeaderBar({ mode, sceneInfo, sseConnected, locale = "en" }: HeaderBarProps) {
|
|
22
|
+
export function HeaderBar({ mode, sceneInfo, sseConnected, locale = "en", selector }: HeaderBarProps) {
|
|
22
23
|
const isZh = locale === "zh";
|
|
23
24
|
const handleClose = React.useCallback(() => {
|
|
24
25
|
navigator.sendBeacon("/api/shutdown", "{}");
|
|
@@ -49,6 +50,7 @@ export function HeaderBar({ mode, sceneInfo, sseConnected, locale = "en" }: Head
|
|
|
49
50
|
</span>
|
|
50
51
|
{/* Right: close button */}
|
|
51
52
|
<div id="header-actions">
|
|
53
|
+
{selector}
|
|
52
54
|
<button id="close-btn" title={isZh ? "关闭播放器并返回终端" : "Close player and return to terminal"} onClick={handleClose}>
|
|
53
55
|
✕
|
|
54
56
|
</button>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Reads available variants from /api/video-info and renders clickable links.
|
|
5
|
-
* Highlights the current variant based on window.VARIANT.
|
|
2
|
+
* Native preview video selector. All compiled outputs live under one control:
|
|
3
|
+
* original film, named Markdown variants and the optional Editor Decisions.
|
|
6
4
|
*/
|
|
7
5
|
import * as React from "react";
|
|
8
6
|
|
|
@@ -12,28 +10,29 @@ export function VariantBar() {
|
|
|
12
10
|
|
|
13
11
|
React.useEffect(() => {
|
|
14
12
|
fetch("/api/video-info")
|
|
15
|
-
.then((
|
|
13
|
+
.then((response) => response.json())
|
|
16
14
|
.then((info) => {
|
|
17
|
-
if (info.variants && info.variants.length > 1)
|
|
18
|
-
setVariants(info.variants);
|
|
19
|
-
}
|
|
15
|
+
if (Array.isArray(info.variants) && info.variants.length > 1) setVariants(info.variants);
|
|
20
16
|
})
|
|
21
17
|
.catch(() => {});
|
|
22
18
|
}, []);
|
|
23
19
|
|
|
24
20
|
if (variants.length <= 1) return null;
|
|
25
21
|
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
22
|
+
return <select
|
|
23
|
+
id="video-selector"
|
|
24
|
+
aria-label="Video selector"
|
|
25
|
+
title="Select video"
|
|
26
|
+
value={currentVariant}
|
|
27
|
+
onChange={event => {
|
|
28
|
+
const variant=event.currentTarget.value;
|
|
29
|
+
window.location.assign(variant==="default"?"/":"/"+encodeURIComponent(variant));
|
|
30
|
+
}}
|
|
31
|
+
style={{maxWidth:190,minWidth:110,padding:"6px 28px 6px 10px",background:"#20252e",color:"#eee",
|
|
32
|
+
border:"1px solid #414955",borderRadius:8,fontSize:12,cursor:"pointer",textOverflow:"ellipsis"}}
|
|
33
|
+
>
|
|
34
|
+
{variants.map(variant =>
|
|
35
|
+
<option value={variant} key={variant}>{variant==="default"?"Original":variant==="editor-decisions"?"Editor Decisions":variant}</option>
|
|
36
|
+
)}
|
|
37
|
+
</select>;
|
|
39
38
|
}
|