@lalalic/markcut 3.2.61 → 3.2.62
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 +28 -1
- package/bin/markcut +5 -0
- package/package.json +1 -1
- package/skills/markcut/SKILL.md +4 -3
- package/src/mcp/bridge.mjs +46 -3
- package/src/mcp/design-cli.mjs +126 -0
- package/src/mcp/preview.mjs +3 -1
- package/src/mcp/remotion-app.bundle.js +89 -89
- package/src/mcp/remotion-app.tsx +16 -1
- package/src/render/cli.mjs +2 -0
- package/tests/mcp-design-mode.test.ts +100 -0
- package/tests/mcp-preview.test.ts +5 -3
package/README.md
CHANGED
|
@@ -135,7 +135,34 @@ Two override mechanisms:
|
|
|
135
135
|
- **Variant-prefixed keys**: `zh-src` → `src`, `zh-jsx` → `jsx`, `zh-script` → `script`
|
|
136
136
|
- **Bare variant keys**: `zh:"<h1>你好</h1>"` replaces the node's primary content key (`jsx` for components, `src` for images/video, `script` for audio)
|
|
137
137
|
|
|
138
|
-
###
|
|
138
|
+
### Interactive NeoY Design Mode (before formal Review)
|
|
139
|
+
|
|
140
|
+
Open the **existing Markcut Previewer** directly on NeoY with a mounted `video.md`:
|
|
141
|
+
|
|
142
|
+
```sh
|
|
143
|
+
markcut preview /absolute/path/to/video.md --design
|
|
144
|
+
# or only publish/watch the standalone viewer:
|
|
145
|
+
markcut preview /absolute/path/to/video.md --design --no-split
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The command compiles the source, publishes the original Markcut player as
|
|
149
|
+
`https://neoy.qili2.com/files/_neoy/markcut/design.html?path=/files/<mount>/.../video.md`
|
|
150
|
+
(the actual URL is printed with its path encoded), and watches source/asset
|
|
151
|
+
changes. The *same browser page* polls the current preview pointer; it retains
|
|
152
|
+
the existing top **Original / named variants / Editor Decisions** selector and
|
|
153
|
+
tries to keep the current seek position. No Review, approval, or immutable
|
|
154
|
+
revision identifier is part of this URL. If `--no-split` is omitted, the
|
|
155
|
+
command also starts WebHelm's native Split View with the currently active
|
|
156
|
+
ChatGPT conversation. Keep the command running while designing; SIGINT/SIGTERM
|
|
157
|
+
ends its WebHelm-owned Session. Comments are drafts in the viewer, readable by
|
|
158
|
+
an Agent via `window.__markcutDesignNotes()`, not formal decisions.
|
|
159
|
+
|
|
160
|
+
The source must be under an **already configured NeoY file mount**. This mode
|
|
161
|
+
uses the existing read-only public `/files/` transport: do not mount private
|
|
162
|
+
files that should not be accessible from that URL. Formal Review remains the
|
|
163
|
+
existing `markcut.preview` / `--delivery event` workflow.
|
|
164
|
+
|
|
165
|
+
## Multi-Variant Preview Server
|
|
139
166
|
|
|
140
167
|
The `preview` command accepts multiple `--variant` flags, each defining a separate compilation target. Variants are compiled **sequentially** (not in parallel) to avoid resource contention from CLI tools like whisper and ffprobe.
|
|
141
168
|
|
package/bin/markcut
CHANGED
|
@@ -6,6 +6,11 @@ import { fileURLToPath } from "node:url";
|
|
|
6
6
|
const __filename = fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = dirname(__filename);
|
|
8
8
|
const root = resolve(__dirname, "..");
|
|
9
|
+
if (process.argv[2] === "preview" && process.argv.includes("--design")) {
|
|
10
|
+
const result=spawnSync(process.execPath,[resolve(root,"src","mcp","design-cli.mjs"),...process.argv.slice(2)],{stdio:'inherit'});
|
|
11
|
+
if(result.error)console.error(result.error.message);
|
|
12
|
+
process.exit(result.status??1);
|
|
13
|
+
}
|
|
9
14
|
if (process.argv[2] === "preview") {
|
|
10
15
|
const argv=process.argv.slice(2);
|
|
11
16
|
const optionIndex=argv.indexOf("--delivery");
|
package/package.json
CHANGED
package/skills/markcut/SKILL.md
CHANGED
|
@@ -59,9 +59,10 @@ Asset paths are relative to the Markdown document. A `prompt` without `src` asks
|
|
|
59
59
|
## Preview, review, and finish
|
|
60
60
|
|
|
61
61
|
1. **Structure gate:** `npx @lalalic/markcut verify video.md`, then `npx @lalalic/markcut preview video.md --storyboard` when rapid scene review is useful. Storyboard placeholders do not verify generated media or final audio.
|
|
62
|
-
2. **
|
|
63
|
-
3. **
|
|
64
|
-
4. **
|
|
62
|
+
2. **Design iteration (before Review):** Run `markcut preview /absolute/video.md --design` on Neo Master for an already mounted `video.md` and an active WebHelm ChatGPT thread. This reuses the Markcut Previewer, watches source edits, and starts native Split View. `--no-split` opens NeoY without pairing. End the process to unsplit. Never treat design notes as formal approval.
|
|
63
|
+
3. **Playback gate:** `npx @lalalic/markcut preview video.md`. Play and seek representative scenes; check black tails, media loading, narration, BGM, subtitles, route movement, and timing. For browser failures, load [Preview Troubleshooting](references/preview-troubleshooting.md) on demand.
|
|
64
|
+
4. **Human review gate:** Use Neo's `markcut.preview({path: "/absolute/path/video.md"})` when the user wants to review the hosted ChatGPT video player. For playback only, use `readonly:true` instead; do not supply `review`. This is **not** the CLI preview. Managed requests correlate through `review.relay`, not a top-level `relay` field. The tool compiles/publishes a revision for playback; it does not rewrite the source. Comments with `decision: changes_requested` require editing that Markdown and calling `markcut.preview` again. `decision: approved` applies **only** to the identified revision/content hash; never apply an old approval to changed content. Follow [Review Contract](review.md) for actual video assessment.
|
|
65
|
+
5. **Codex / terminal human-review gate:** `npx @lalalic/markcut preview /absolute/video.md --delivery event --event-template /absolute/relay-event.json` on Neo Master. The Event Template must match Relay's canonical `task.interactive_decision` Contract (`type`, `source`, `data.interactive.{jobId,taskId,executionId}` only, without review-result fields). The CLI reuses the MCP compiler, publishes immutable preview assets, persists the review request on Neo Master and dispatches an APNs notification through the existing Neo Mobile provider. Exit receipt `review_requested` confirms only **durable wrapper delivery storage**, not that the phone has acquired it; human decisions arrive asynchronously on Events Bus. The phone need not be online. APNs delivery is best-effort; Neo Mobile synchronizes persisted requests on foreground. There is no automatic text fallback. Do not claim approval or Relay worker continuation from the receipt. For retries with an uncertain phone acknowledgment, pass a stable `--request-id UUID`. See [Codex/mobile review CLI](references/mobile-event-preview-cli.md).
|
|
65
66
|
5. **Delivery gate:** `npx @lalalic/markcut render video.md --output out/video.mp4`. Confirm the MP4 exists and examine playback, including the final audio and subtitles. A valid Markdown file, compile success, or hosted-player resource alone is not proof of a finished video.
|
|
66
67
|
|
|
67
68
|
If the user asks only for a script or structure, stop at the requested stage. Do not trigger expensive generation or claim final video delivery without a requested rendered artifact. A project-specific agent owns its own editorial or approval decisions; Markcut supplies authoring, playback and revision capabilities.
|
package/src/mcp/bridge.mjs
CHANGED
|
@@ -2,6 +2,9 @@ export function buildPreviewBridgeScript() {
|
|
|
2
2
|
return `
|
|
3
3
|
const feedback=document.getElementById('feedback'),status=document.getElementById('status'),pathLabel=document.getElementById('path-label');
|
|
4
4
|
let nextId=0,identity=null,busy=false,expectedPath=null,activePath=null,activeReview={delivery:"text"},expectedDelivery="text",expectedReadonly=false,submittedRevision=null,submission=null;
|
|
5
|
+
const standaloneDesign=typeof location!=='undefined' && location.pathname.endsWith('/_neoy/markcut/design.html');
|
|
6
|
+
if(standaloneDesign){window.__markcutDesignMode=true;document.body.classList.add('markcut-design-mode');}
|
|
7
|
+
|
|
5
8
|
const comments=[];
|
|
6
9
|
let questions=[],questionAnswers={};
|
|
7
10
|
const isQuestionMode=()=>activeReview?.mode==='questions';
|
|
@@ -257,7 +260,7 @@ function reviewReadonly(readonly,message){
|
|
|
257
260
|
}
|
|
258
261
|
async function renderRevision(data){
|
|
259
262
|
const generation=++renderGeneration;
|
|
260
|
-
if(identity?.revisionId&&identity.revisionId!==data.revisionId)clearComments();
|
|
263
|
+
if(!standaloneDesign&&identity?.revisionId&&identity.revisionId!==data.revisionId)clearComments();
|
|
261
264
|
if(data.path){pathLabel.textContent=data.path;showVideoName(data.path,data.title||data.videoTitle);}
|
|
262
265
|
if(!data.compiled&&!data.compiledUrl){status.textContent='Compiled scenes unavailable';return;}
|
|
263
266
|
identity={requestId:data.requestId||data.operationId||data.revisionId,previewId:data.id,revisionId:data.revisionId,contentHash:data.contentHash};
|
|
@@ -336,7 +339,7 @@ async function initialize(){
|
|
|
336
339
|
catch(e){status.textContent=e.message||'MCP initialization failed';}
|
|
337
340
|
}
|
|
338
341
|
async function submit(decision){
|
|
339
|
-
if(busy||isViewOnly())return;
|
|
342
|
+
if(standaloneDesign||busy||isViewOnly())return;
|
|
340
343
|
if(document.getElementById(isQuestionMode()?'questions-submit':(decision==='approved'?'approve':'changes')).disabled){
|
|
341
344
|
status.textContent='Review disabled for this revision or delivery configuration.';return;
|
|
342
345
|
}
|
|
@@ -386,6 +389,46 @@ document.getElementById('approve').onclick=()=>submit('approved');
|
|
|
386
389
|
document.getElementById('changes').onclick=()=>submit('changes_requested');
|
|
387
390
|
redrawComments();
|
|
388
391
|
updateDeliveryMode();
|
|
389
|
-
|
|
392
|
+
if(standaloneDesign){
|
|
393
|
+
// Agent reads draft notes via WebHelm in the shared tab; design notes are
|
|
394
|
+
// never published as a review or sent to an MCP host.
|
|
395
|
+
window.__markcutDesignNotes=()=>allComments();
|
|
396
|
+
const rawPath=new URLSearchParams(location.search).get('path');
|
|
397
|
+
// The browser can only address a public, mounted Markdown file. Never
|
|
398
|
+
// expose a local absolute path, accept another origin, or query _neoy assets.
|
|
399
|
+
if(!rawPath || !/^\\/files\\/(?!_neoy\\/)[A-Za-z0-9_-]+\\/(?:[^/?#]+\\/)*[^/?#]+\\.md$/i.test(rawPath) ||
|
|
400
|
+
rawPath.split('/').some(part=>part==='.'||part==='..'||part.startsWith('.'))){
|
|
401
|
+
status.textContent='Invalid design path: use a mounted /files/<mount>/video.md URL.';
|
|
402
|
+
} else {
|
|
403
|
+
expectedPath=rawPath;
|
|
404
|
+
showVideoName(rawPath);
|
|
405
|
+
status.textContent='Waiting for Markcut compilation…';
|
|
406
|
+
const digestPromise=crypto.subtle.digest('SHA-256',new TextEncoder().encode(rawPath))
|
|
407
|
+
.then(bytes=>Array.from(new Uint8Array(bytes),x=>x.toString(16).padStart(2,'0')).join(''));
|
|
408
|
+
let loading=false;
|
|
409
|
+
async function refreshDesign(){
|
|
410
|
+
if(loading)return;
|
|
411
|
+
loading=true;
|
|
412
|
+
try{
|
|
413
|
+
const hash=await digestPromise;
|
|
414
|
+
const url=__MARKCUT_ORIGIN__+'/files/_neoy/markcut/revisions/'+hash+'.json?time='+Date.now();
|
|
415
|
+
const response=await fetch(url,{cache:'no-store'});
|
|
416
|
+
if(!response.ok){if(!identity)status.textContent='Waiting for Markcut compilation…';return;}
|
|
417
|
+
const data=await response.json();
|
|
418
|
+
if(data.requestedPath!==rawPath || !data.compiledUrl || typeof data.contentHash!=='string')return;
|
|
419
|
+
const changed=!identity || identity.contentHash!==data.contentHash ||
|
|
420
|
+
window.__markcutRevision?.edlCompiledUrl!==data.edlCompiledUrl;
|
|
421
|
+
if(changed){
|
|
422
|
+
// Preserve player context while React's existing player reloads its tree.
|
|
423
|
+
window.__markcutDesignRestoreTime=Number(window.__markcutPlaybackContext?.timeSeconds)||0;
|
|
424
|
+
await renderRevision({...data,review:{delivery:'text',readonly:true}});
|
|
425
|
+
}
|
|
426
|
+
}catch(error){status.textContent='Preview refresh failed: '+String(error?.message||error);}
|
|
427
|
+
finally{loading=false;}
|
|
428
|
+
}
|
|
429
|
+
refreshDesign();
|
|
430
|
+
window.setInterval(refreshDesign,2500);
|
|
431
|
+
}
|
|
432
|
+
} else initialize();
|
|
390
433
|
`;
|
|
391
434
|
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Standalone NeoY design view: the source video.md, not a review or browser
|
|
3
|
+
// Session, is the stable identity. Compilation remains Markcut's concern.
|
|
4
|
+
import {createHash} from 'node:crypto';
|
|
5
|
+
import {execFileSync} from 'node:child_process';
|
|
6
|
+
import {readFileSync,writeFileSync,mkdirSync,renameSync,statSync} from 'node:fs';
|
|
7
|
+
import {resolve,dirname,join,basename} from 'node:path';
|
|
8
|
+
import {pathToFileURL} from 'node:url';
|
|
9
|
+
import {EXPORT_ROOT,publicOrigin,resolveMountedFile} from './remote-assets.mjs';
|
|
10
|
+
import {buildPreviewHtml} from './preview.mjs';
|
|
11
|
+
import {startCompileOperation} from './compile-operation.mjs';
|
|
12
|
+
|
|
13
|
+
const delay=ms=>new Promise(ok=>setTimeout(ok,ms));
|
|
14
|
+
|
|
15
|
+
export function parseDesignArgs(argv){
|
|
16
|
+
if(argv[0]!=='preview'||typeof argv[1]!=='string'||!argv[1].endsWith('.md'))
|
|
17
|
+
throw Error('Usage: markcut preview <video.md> --design [--no-split]');
|
|
18
|
+
const flags=argv.slice(2);
|
|
19
|
+
if(!flags.includes('--design')||flags.some(f=>!['--design','--no-split'].includes(f))||
|
|
20
|
+
new Set(flags).size!==flags.length)
|
|
21
|
+
throw Error('Design preview supports only --design and --no-split');
|
|
22
|
+
return {file:resolve(argv[1]),split:!flags.includes('--no-split')};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function designSourceUrl(file,origin=publicOrigin(),resolveSource=resolveMountedFile){
|
|
26
|
+
const mounted=resolveSource(file,origin);
|
|
27
|
+
if(!mounted)throw Error('Design video.md must be inside an existing NeoY file mount');
|
|
28
|
+
const url=new URL(mounted);
|
|
29
|
+
if(url.origin!==origin||!/^\/files\/(?!_neoy\/)[A-Za-z0-9_-]+\/.+\.md$/i.test(url.pathname))
|
|
30
|
+
throw Error('Design source must be a mounted Markdown file');
|
|
31
|
+
return url.pathname;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function designViewerUrl(sourcePath,origin=publicOrigin()){
|
|
35
|
+
if(!/^\/files\/(?!_neoy\/)[A-Za-z0-9_-]+\/.+\.md$/i.test(sourcePath))
|
|
36
|
+
throw Error('Invalid design source URL');
|
|
37
|
+
return origin+'/files/_neoy/markcut/design.html?path='+encodeURIComponent(sourcePath);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// The shared MCP player is published *unchanged* as the standalone page.
|
|
41
|
+
export function publishDesignViewer({root=EXPORT_ROOT,html=buildPreviewHtml()}={}){
|
|
42
|
+
mkdirSync(root,{recursive:true});
|
|
43
|
+
const target=join(root,'design.html');
|
|
44
|
+
try{if(readFileSync(target,'utf8')===html)return target;}catch{}
|
|
45
|
+
const temp=target+'.'+process.pid+'.tmp';
|
|
46
|
+
writeFileSync(temp,html,{mode:0o644});renameSync(temp,target);
|
|
47
|
+
return target;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Cheap watcher stamp: avoid hashing large videos every few seconds. The actual
|
|
51
|
+
// compiler fingerprints media content when this metadata stamp changes.
|
|
52
|
+
export function designInputStamp(file){
|
|
53
|
+
const source=readFileSync(file,'utf8');
|
|
54
|
+
const base=dirname(file),candidates=new Set([file,join(base,basename(file,'.md')+'.wav')]);
|
|
55
|
+
for(const match of source.matchAll(/\b(?:src|audio|edl)\s*:\s*["']?([^"'\s;]+\.(?:png|jpe?g|webp|svg|gif|mp4|mov|webm|wav|mp3|m4a|ogg|vtt|srt|json))/gi)){
|
|
56
|
+
if(match[1].includes('://')||match[1].startsWith('/'))continue;
|
|
57
|
+
candidates.add(resolve(base,match[1]));
|
|
58
|
+
}
|
|
59
|
+
const stamp=[createHash('sha256').update(source).digest('hex')];
|
|
60
|
+
for(const path of [...candidates].sort())try{
|
|
61
|
+
const s=statSync(path);stamp.push(path,s.size,s.mtimeMs,s.ctimeMs);
|
|
62
|
+
}catch{}
|
|
63
|
+
return JSON.stringify(stamp);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export async function compileDesign(file,source,{start=startCompileOperation,root=EXPORT_ROOT,limitMs=300000}={}){
|
|
67
|
+
const op=start(source,{delivery:'text'});
|
|
68
|
+
const statusFile=join(root,'operations',op.operationId+'.json');
|
|
69
|
+
const until=Date.now()+limitMs;
|
|
70
|
+
while(Date.now()<until){
|
|
71
|
+
let state;try{state=JSON.parse(readFileSync(statusFile,'utf8'));}catch{}
|
|
72
|
+
if(state?.state==='ready')return state.result;
|
|
73
|
+
if(state?.state==='failed')throw Error('Design compilation failed: '+state.error);
|
|
74
|
+
await delay(300);
|
|
75
|
+
}
|
|
76
|
+
throw Error('Design compilation timed out');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export async function runDesignPreview(argv,{run=execFileSync,compile=compileDesign,
|
|
80
|
+
publish=publishDesignViewer,stamp=designInputStamp,onReady=()=>{}}={}){
|
|
81
|
+
const {file,split}=parseDesignArgs(argv);
|
|
82
|
+
const source=designSourceUrl(file),url=designViewerUrl(source);
|
|
83
|
+
const initialStamp=stamp(file);
|
|
84
|
+
publish();
|
|
85
|
+
await compile(file,source);
|
|
86
|
+
let sessionId=null;
|
|
87
|
+
if(split){
|
|
88
|
+
const receipt=JSON.parse(run('webhelm',['design','start','--url',url],
|
|
89
|
+
{encoding:'utf8',timeout:60000,stdio:['ignore','pipe','pipe']}));
|
|
90
|
+
if(receipt.design_mode!==true||!receipt.session_id)throw Error('WebHelm Design Mode did not start');
|
|
91
|
+
sessionId=receipt.session_id;
|
|
92
|
+
}
|
|
93
|
+
console.log(JSON.stringify({status:'design_ready',file,url,watching:true,split}));
|
|
94
|
+
onReady({file,url,source});
|
|
95
|
+
let running=true,stopping=false,previous=initialStamp,compileBusy=false;
|
|
96
|
+
async function stop(){
|
|
97
|
+
if(stopping)return;stopping=true;running=false;
|
|
98
|
+
if(sessionId){
|
|
99
|
+
try{run('webhelm',['design','stop',sessionId],{encoding:'utf8',timeout:90000,stdio:['ignore','pipe','pipe']});}
|
|
100
|
+
catch(error){console.error('WebHelm Design Mode cleanup failed: '+String(error.message||error));}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const sigint=()=>void stop(),sigterm=()=>void stop();
|
|
104
|
+
process.once('SIGINT',sigint);process.once('SIGTERM',sigterm);
|
|
105
|
+
try{
|
|
106
|
+
while(running){
|
|
107
|
+
await delay(1800);
|
|
108
|
+
if(!running||compileBusy)continue;
|
|
109
|
+
let next;try{next=stamp(file);}catch(error){console.error('Design source unavailable: '+error.message);continue;}
|
|
110
|
+
if(next===previous)continue;
|
|
111
|
+
previous=next;compileBusy=true;
|
|
112
|
+
try{await compile(file,source);console.log(JSON.stringify({status:'design_refreshed',file,url}));}
|
|
113
|
+
catch(error){console.error('Design recompile failed: '+String(error.message||error));}
|
|
114
|
+
finally{compileBusy=false;}
|
|
115
|
+
}
|
|
116
|
+
}finally{
|
|
117
|
+
process.removeListener('SIGINT',sigint);process.removeListener('SIGTERM',sigterm);
|
|
118
|
+
await stop();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if(process.argv[1]&&import.meta.url===pathToFileURL(resolve(process.argv[1])).href){
|
|
123
|
+
runDesignPreview(process.argv.slice(2)).catch(error=>{
|
|
124
|
+
console.error('Markcut Design Mode failed: '+String(error.message||error));process.exitCode=1;
|
|
125
|
+
});
|
|
126
|
+
}
|
package/src/mcp/preview.mjs
CHANGED
|
@@ -13,7 +13,7 @@ export const TOOL_NAME = "markcut.preview";
|
|
|
13
13
|
// One source of truth for preview resources. Every historical version (and
|
|
14
14
|
// the versionless alias) serves the same current UI and player bundle.
|
|
15
15
|
// Increment the version only to bypass clients that cache an already-open UI.
|
|
16
|
-
export const PREVIEW_VERSION_NUMBER =
|
|
16
|
+
export const PREVIEW_VERSION_NUMBER = 56;
|
|
17
17
|
export const RESOURCE_URI = `ui://markcut/video-preview-v${PREVIEW_VERSION_NUMBER}.html`;
|
|
18
18
|
export const STABLE_RESOURCE_URI = "ui://markcut/video-preview.html";
|
|
19
19
|
const PREVIEW_VERSION = `v${PREVIEW_VERSION_NUMBER}`;
|
|
@@ -325,6 +325,8 @@ export function buildPreviewHtml() {
|
|
|
325
325
|
<style>.comment-marker{position:absolute;top:50%;transform:translate(-50%,-50%);width:20px;height:20px;min-width:20px;padding:0;border:0;border-radius:50%;background:transparent;z-index:10;cursor:pointer;touch-action:none}.comment-marker::after{content:'';display:block;width:14px;height:14px;border-radius:50%;margin:auto;background:#f59e0b;border:2px solid white;box-sizing:border-box}.comment-marker.scope-scene::after{background:#3b82f6}.comment-marker.scope-overall{left:-28px!important}.comment-marker.scope-overall::after{background:#8b5cf6}.comment-marker.scope-overall.placeholder::after{background:transparent;border-color:#8b5cf6}.comment-marker.selected::after,.comment-marker:focus-visible::after{outline:2px solid #2563eb;outline-offset:2px}.comment-marker:hover::after{transform:scale(1.2)}</style>
|
|
326
326
|
<style>#comment-entry{position:relative;display:block}#feedback{display:block;width:100%;height:auto;min-height:76px;max-height:240px;field-sizing:content;resize:none;padding:9px 112px 32px 9px;font:inherit}#comment-tools{position:absolute;bottom:6px;right:8px;display:flex;align-items:center;gap:2px;background:white}#comment-tools>*{width:30px;height:28px;padding:0;border:0;background:transparent;color:#526071;font:inherit;text-align:center}#comment-tools button{font-size:20px}#comment-tools>*:focus-visible{outline:2px solid #408bd7;outline-offset:-2px}#comment-mode{width:70px;max-width:none;font-size:12px;font-weight:650;text-align:center;text-align-last:center;line-height:28px}#comment-mode:has(option[value=spot]:checked){color:#b45309}#comment-mode:has(option[value=scene]:checked){color:#2563eb}#overall-mode{width:70px;height:28px;line-height:28px;text-align:center;font-size:12px;font-weight:650;color:#7c3aed}</style>
|
|
327
327
|
<style>${readFileSync(resolve(moduleDir,'preview-mobile.css'),'utf8').replace(/\/\*[\s\S]*?\*\//g,'')}</style>
|
|
328
|
+
<style>body.markcut-design-mode #approve,body.markcut-design-mode #changes,body.markcut-design-mode #questions-submit{display:none!important}
|
|
329
|
+
body.markcut-design-mode .review-actions{justify-content:center}body.markcut-design-mode #status{font-weight:500}</style>
|
|
328
330
|
</head><body><main><header style="display:flex;justify-content:space-between;align-items:center"><h1>Markcut · <span id="video-md-version">video</span></h1><div style="display:flex;align-items:center;gap:14px;margin-left:auto"><span id="header-tts"></span><span id="markcut-video-selector-slot"></span><span id="player-version" style="font-size:12px;color:#667">${PREVIEW_VERSION}</span></div></header><div class="path" id="path-label" hidden></div><div id="interactive-ui" hidden><div id="remotion-root"></div>
|
|
329
331
|
<div id="comment-entry"><textarea id="feedback" rows="3" aria-label="Feedback" placeholder="Add a comment…"></textarea><div id="comment-tools"><select id="comment-mode" aria-label="Comment scope" title="Comment scope"><option value="spot" style="color:#b45309">Spot</option><option value="scene" style="color:#2563eb">Scene</option></select><span id="overall-mode" hidden>Overall</span><button id="save-spot" type="button" title="Add or update comment" aria-label="Add or update comment">+</button><button id="remove-spot" type="button" title="Remove selected comment" aria-label="Remove selected comment" disabled>−</button></div></div>
|
|
330
332
|
<div class="review-actions"><button id="questions-submit" type="button" hidden>Submit</button><button id="changes">Submit feedback</button><span id="status" role="status">Starting preview…</span><button id="approve">Approve</button></div></div></main>
|