@lalalic/markcut 3.2.58 → 3.2.59
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 +1 -1
- package/src/mcp/preview-mobile.css +44 -0
- package/src/mcp/preview.mjs +5 -3
- package/src/mcp/remotion-app.bundle.js +82 -82
- package/src/mcp/remotion-app.tsx +10 -3
- package/tests/mcp-preview.test.ts +15 -4
package/package.json
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* ChatGPT MCP iframe on phones: keep scenes, video controls and review actions
|
|
2
|
+
* in separate normal-flow rows. Never position the footer over the player. */
|
|
3
|
+
@media (max-width: 640px), (max-height: 520px) {
|
|
4
|
+
html, body { min-width: 0; width: 100%; overflow-x: hidden; }
|
|
5
|
+
main { box-sizing: border-box; width: 100%; padding: 8px 10px 12px; }
|
|
6
|
+
main > header { flex-wrap: wrap; gap: 4px 8px; min-width: 0; padding-bottom: 4px; }
|
|
7
|
+
main > header h1 { flex: 1 1 145px; min-width: 0; margin: 4px 0; font-size: 15px; line-height: 21px;
|
|
8
|
+
overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
9
|
+
main > header > div { flex: 0 1 auto; margin-left: 0 !important; gap: 7px !important;
|
|
10
|
+
flex-wrap: wrap; justify-content: flex-end; }
|
|
11
|
+
#review-delivery-mode, #player-version { font-size: 11px !important; }
|
|
12
|
+
#remotion-preview { display: flex; flex-direction: column; min-width: 0; }
|
|
13
|
+
/* A vertical 9:16 movie must scale BOTH dimensions together. The original
|
|
14
|
+
width:100% / max-height:65vh combination filled the screen and clipped
|
|
15
|
+
Remotion's bottom transport and the scene selector in mobile chat. */
|
|
16
|
+
#remotion-canvas {
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
width: min(100%, calc(min(58dvh, 440px) * var(--markcut-player-ratio, 0.5625))) !important;
|
|
19
|
+
max-height: min(58dvh, 440px) !important;
|
|
20
|
+
flex: 0 0 auto;
|
|
21
|
+
overflow: visible;
|
|
22
|
+
}
|
|
23
|
+
#scene-thumbnails { order: -1; min-width: 0; max-width: 100%; gap: 6px;
|
|
24
|
+
padding: 4px 0 9px; margin: 0; scroll-snap-type: x proximity; }
|
|
25
|
+
.scene-pill { flex-shrink: 0; max-width: 145px; box-sizing: border-box;
|
|
26
|
+
overflow: hidden; text-overflow: ellipsis; scroll-snap-align: start;
|
|
27
|
+
min-height: 36px; padding: 9px 10px; }
|
|
28
|
+
#comment-entry { margin: 9px 0 6px; }
|
|
29
|
+
#feedback { box-sizing: border-box; height: 76px !important; min-height: 76px !important;
|
|
30
|
+
max-height: 112px !important; font-size: 14px; line-height: 19px; }
|
|
31
|
+
.review-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
|
|
32
|
+
grid-template-areas: 'changes approve' 'status status'; gap: 7px 8px; align-items: center; }
|
|
33
|
+
#approve:disabled, #changes:disabled { opacity: .55; cursor: default; }
|
|
34
|
+
#changes { grid-area: changes; }
|
|
35
|
+
#approve { grid-area: approve; }
|
|
36
|
+
.review-actions button { box-sizing: border-box; min-width: 0; width: 100%; min-height: 42px; font-size: 13px; }
|
|
37
|
+
#status { grid-area: status; width: 100%; min-width: 0; text-align: center;
|
|
38
|
+
font-size: 12px; line-height: 16px; }
|
|
39
|
+
}
|
|
40
|
+
@media (max-width: 360px) {
|
|
41
|
+
main { padding-inline: 7px; }
|
|
42
|
+
main > header h1 { flex-basis: 130px; font-size: 14px; }
|
|
43
|
+
.scene-pill { max-width: 125px; }
|
|
44
|
+
}
|
package/src/mcp/preview.mjs
CHANGED
|
@@ -9,10 +9,11 @@ import { externalizePreviewMedia, publicOrigin, resolveMountedFile, resolvePrevi
|
|
|
9
9
|
import {fingerprintInputs} from "./source-fingerprint.mjs";
|
|
10
10
|
|
|
11
11
|
export const TOOL_NAME = "markcut.preview";
|
|
12
|
-
export const RESOURCE_URI = "ui://markcut/video-preview-
|
|
12
|
+
export const RESOURCE_URI = "ui://markcut/video-preview-v47.html";
|
|
13
13
|
const PREVIEW_VERSION = RESOURCE_URI.match(/video-preview-(v\d+)/)?.[1] ?? "unknown";
|
|
14
14
|
// Legacy entrypoints remain registered, but serve the current implementation.
|
|
15
15
|
export const LEGACY_RESOURCE_URIS = [
|
|
16
|
+
"ui://markcut/video-preview-v46.html",
|
|
16
17
|
"ui://markcut/video-preview-v45.html",
|
|
17
18
|
"ui://markcut/video-preview-v44.html",
|
|
18
19
|
"ui://markcut/video-preview-v3.html",
|
|
@@ -281,10 +282,11 @@ export function buildPreviewHtml() {
|
|
|
281
282
|
// from terminating the embedding script tag or leaking source into the DOM.
|
|
282
283
|
return `<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
283
284
|
<title>Markcut</title>
|
|
284
|
-
<style>body{font:14px system-ui;margin:0;background:#fff;color:#17202a}main{padding:12px;max-width:960px;margin:auto}h1{font-size:17px}.path{font-size:12px;overflow-wrap:anywhere}.transport{display:flex;align-items:center;gap:10px;padding:12px 0}.transport input{flex:1;min-width:50px}button{cursor:pointer;padding:8px;border-radius:6px;border:1px solid #a8a8a8}#approve{background:#198038;color:white}#changes{background:#c72b29;color:white}#comment-entry{display:flex;align-items:center;gap:6px;margin:5px 0}#feedback{flex:1;min-width:0;box-sizing:border-box;height:34px;padding:6px 9px;border:1px solid #b5bdc8;border-radius:6px}#comment-mode{max-width:102px;height:34px;border:1px solid #b5bdc8;border-radius:6px;background:white}#save-spot,#remove-spot{width:34px;height:34px;padding:0;font-size:19px}#comment-entry button:disabled{opacity:.4;cursor:default}.review-actions{display:flex;justify-content:space-between;align-items:center;width:100%;gap:16px}.review-actions button{min-width:110px}#remotion-canvas{background:#090b12}#status{flex:1;min-width:0;font-size:12px;color:#526071;text-align:center;overflow-wrap:anywhere}#status:empty{display:none}#scene-thumbnails{display:flex;gap:7px;overflow-x:auto;padding:12px 2px;scrollbar-width:thin} .scene-pill{flex-shrink:0;padding:7px 11px;border:1px solid #d4dbe4;border-radius:9px;cursor:pointer;background:#f5f7fa;color:#475569;font-size:12px;white-space:nowrap} .scene-pill.active{background:#e7f0ff;color:#125ea2;border-color:#408bd7} .scene-pill.commented{border-color:#cc8b12;background:#fff4d6;color:#764900;font-weight:650} .scene-pill.commented::after{content:' •';color:#ad5b00} #comment-list{display:grid;gap:4px;margin:8px 0} #comment-list>div{display:flex;gap:8px} #comment-list button:first-child{flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis} #comment-target{font-size:12px;color:#526071;margin:8px 0}</style
|
|
285
|
+
<style>body{font:14px system-ui;margin:0;background:#fff;color:#17202a}main{padding:12px;max-width:960px;margin:auto}h1{font-size:17px}.path{font-size:12px;overflow-wrap:anywhere}.transport{display:flex;align-items:center;gap:10px;padding:12px 0}.transport input{flex:1;min-width:50px}button{cursor:pointer;padding:8px;border-radius:6px;border:1px solid #a8a8a8}#approve{background:#198038;color:white}#changes{background:#c72b29;color:white}#comment-entry{display:flex;align-items:center;gap:6px;margin:5px 0}#feedback{flex:1;min-width:0;box-sizing:border-box;height:34px;padding:6px 9px;border:1px solid #b5bdc8;border-radius:6px}#comment-mode{max-width:102px;height:34px;border:1px solid #b5bdc8;border-radius:6px;background:white}#save-spot,#remove-spot{width:34px;height:34px;padding:0;font-size:19px}#comment-entry button:disabled{opacity:.4;cursor:default}.review-actions{display:flex;justify-content:space-between;align-items:center;width:100%;gap:16px}.review-actions button{min-width:110px}#remotion-canvas{background:#090b12}#status{flex:1;min-width:0;font-size:12px;color:#526071;text-align:center;overflow-wrap:anywhere}#status:empty{display:none}#scene-thumbnails{display:flex;gap:7px;overflow-x:auto;padding:12px 2px;scrollbar-width:thin} .scene-pill{flex-shrink:0;padding:7px 11px;border:1px solid #d4dbe4;border-radius:9px;cursor:pointer;background:#f5f7fa;color:#475569;font-size:12px;white-space:nowrap} .scene-pill.active{background:#e7f0ff;color:#125ea2;border-color:#408bd7} .scene-pill.commented{border-color:#cc8b12;background:#fff4d6;color:#764900;font-weight:650} .scene-pill.commented::after{content:' •';color:#ad5b00} #comment-list{display:grid;gap:4px;margin:8px 0} #comment-list>div{display:flex;gap:8px} #comment-list button:first-child{flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis} #comment-target{font-size:12px;color:#526071;margin:8px 0}</style>
|
|
285
286
|
<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>
|
|
286
287
|
<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>
|
|
287
|
-
<
|
|
288
|
+
<style>${readFileSync(resolve(moduleDir,'preview-mobile.css'),'utf8')}</style>
|
|
289
|
+
</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="review-delivery-mode" aria-label="Review delivery mode" style="font-size:12px;color:#526071;white-space:nowrap">Text mode</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>
|
|
288
290
|
<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>
|
|
289
291
|
<div class="review-actions"><button id="changes">Submit feedback</button><span id="status" role="status">Starting preview…</span><button id="approve">Approve</button></div></div></main>
|
|
290
292
|
<script src="${playerScriptUrl}"></script>
|