@lalalic/markcut 3.2.54 → 3.2.56
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 +4 -0
- package/examples/shotcraft-recipes/README.md +35 -0
- package/examples/shotcraft-recipes/assets/shotcraft-ten-scenes.mp4 +0 -0
- package/examples/shotcraft-recipes/showcase-10.md +32 -0
- package/examples/shotcraft-recipes/video-10.md +501 -0
- package/package.json +1 -1
- package/skills/markcut/SKILL.md +2 -1
- package/skills/markcut/docs/map-dynamic-camera.md +20 -0
- package/src/descriptive/compiler.ts +4 -1
- package/src/descriptive/dsl.ts +5 -0
- package/src/descriptive/markdown.ts +2 -1
- package/src/mcp/bridge.mjs +12 -6
- package/src/mcp/preview.mjs +5 -1
- package/src/mcp/remotion-app.bundle.js +394 -395
- package/src/mcp/server.mjs +11 -5
- package/src/player/pipeline.mjs +83 -76
- package/src/render/cli.mjs +13 -3
- package/src/render/google-map-health.mjs +10 -0
- package/src/schema/index.ts +6 -1
- package/src/types/Map.tsx +42 -38
- package/src/types/SchematicRouteMap.tsx +61 -0
- package/src/utils/route-legs.ts +47 -8
- package/src/utils/schematic-route.ts +56 -0
- package/tests/google-map-dsl-validity.test.ts +13 -0
- package/tests/map-route-animation-dsl.test.ts +9 -0
- package/tests/mcp-preview-bridge.test.ts +19 -2
- package/tests/mcp-preview.test.ts +6 -0
- package/tests/render-native-google-map.test.ts +39 -0
- package/tests/route-legs.test.ts +34 -0
- package/tests/schematic-route.test.ts +24 -0
|
@@ -326,3 +326,23 @@ layout:parallel
|
|
|
326
326
|
- **Media assets** — photo thumbnails (`waypoint.media`), images, bgm etc. should live in the md file's folder (e.g. `assets/...`). See the asset-path rules in `markdown-descriptive.md` §14 (verify enforces md-folder-relative paths).
|
|
327
327
|
- **Don't set duration from script length** — the resolver computes it from TTS audio.
|
|
328
328
|
- **3D (Map3D)** is experimental and opt-in (`cinematic.fallback:"none"`); the default `fallback:"2d"` gives the safe drone-chase look.
|
|
329
|
+
|
|
330
|
+
## Google Maps four-view production gate (2026-11-11)
|
|
331
|
+
|
|
332
|
+
When working with native Google maps, prefer `view:overview|route|cinematic|streetview` directly in the authoritative `video.md`, rather than replacing them with schematic visuals. Use the source-linked Vlog GPS waypoints; never invent a track. A four-scene tested authoring reference lives in Vlog `templates/google-map-four-scenes.md`. The Google `streetview` node uses Maps JavaScript `StreetViewPanorama`, **not** the separately enabled Street View Static REST API.
|
|
333
|
+
|
|
334
|
+
**Fixed root cause:** Hosted Preview already stamped `GOOGLE_MAPS_API_KEY` during compilation, but `markcut render`'s Markdown pipeline previously called `compileDescriptiveRoot(final)` without options, leaving native maps unkeyed. The CLI now supplies `{googleMapsApiKey:process.env.GOOGLE_MAPS_API_KEY}` and refuses an unkeyed native map or fatal Google/Routes render error. The produced H.264 container alone is not proof that Google tiles, computed route or panorama are visible. Inspect real moving preview frames and confirm each view individually.
|
|
335
|
+
|
|
336
|
+
**Critical differences:** `route` is Google-computed navigational path between observed GPS positions, *not* proof of which road the creator traveled. `cinematic` defaults to 2D Google satellite pan/tilt/heading rather than actual drone/3D terrain. `streetview` needs a covered nearby panorama, otherwise the scene is invalid for that spot. For four-mode Vlog scenes, use `markcut verify /absolute/video.md` then the Neo-hosted `markcut.preview` UI. Its internal MP4 map cache is a playback optimization and must never replace the editable Markdown deliverable. Check Google Maps JavaScript API billing, restrictions, quotas and Routes API permissions before live rendering; preserve provider attribution and content-use terms for any public video.
|
|
337
|
+
|
|
338
|
+
### 9:16 framing and human-paced route animation
|
|
339
|
+
|
|
340
|
+
For native Google `view:route`, the camera auto-fits the **full provider-returned road polyline** when available, with 19% padding for vertical mobile layouts; it falls back to fit filmed GPS stops while waiting for Google Routes. Do not set `zoom`/`center` on this mode unless you intentionally override the fit. Google road detours can extend outside the source stop bounds. Travel marker positions interpolate along polyline **distance**, not vertex indices, to avoid jerky movement. Route duration is **editorial screen time**; Google leg duration merely determines the proportions of time allocated to individual legs.
|
|
341
|
+
|
|
342
|
+
```md
|
|
343
|
+
## Map-Route
|
|
344
|
+
layout:parallel
|
|
345
|
+
- map view:route mapType:roadmap duration:8 routeAnimation:{startHold:0.5,endHold:0.7,easing:easeInOut} waypoints:[45.3,-75.9,"A";45.33,-75.87,"B"]
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
This holds 0.5s at the start, animates the road route with gently eased start/finish, and holds 0.7s at the destination. If a map has children with `at:"Stop"` + timed duration (explicit intermediate dwell), the marker holds at the chosen stop and uses linear travel in the remaining time to keep manual stop times aligned. `fps:24` or `fps:30` produces smoother map footage than 12fps test renders. Cinematic remains a follow camera; consider `headingFollow:false` and a slow heading tween at sharp turns. Always keep original Google Maps branding, legal attribution and required map data notices visible; do not hide them in CSS, crop them out, or place captions over them.
|
|
@@ -158,11 +158,12 @@ export interface DescriptiveMap extends DescriptiveBaseNode {
|
|
|
158
158
|
routeWeight?: number;
|
|
159
159
|
zoom?: number;
|
|
160
160
|
center?: { lat: number; lng: number };
|
|
161
|
-
mapType?: "roadmap" | "satellite" | "hybrid" | "terrain";
|
|
161
|
+
mapType?: "roadmap" | "satellite" | "hybrid" | "terrain" | "schematic";
|
|
162
162
|
language?: string;
|
|
163
163
|
region?: string;
|
|
164
164
|
travelMode?: "DRIVING" | "WALKING" | "BICYCLING" | "TRANSIT";
|
|
165
165
|
routeMarker?: string;
|
|
166
|
+
routeAnimation?: {startHold?: number; endHold?: number; easing?: "linear" | "easeInOut"};
|
|
166
167
|
camera?: {
|
|
167
168
|
zoom?: DescriptiveTweenable;
|
|
168
169
|
center?: { lat: DescriptiveTweenable; lng: DescriptiveTweenable };
|
|
@@ -658,6 +659,7 @@ function compileLeaf(node: Exclude<DescriptiveNode, DescriptiveContainer | Descr
|
|
|
658
659
|
region: node.region,
|
|
659
660
|
travelMode: node.travelMode ?? "DRIVING",
|
|
660
661
|
routeMarker: node.routeMarker ?? "🚗",
|
|
662
|
+
routeAnimation: node.routeAnimation,
|
|
661
663
|
camera: node.camera,
|
|
662
664
|
cinematic: node.cinematic,
|
|
663
665
|
streetView: node.streetView,
|
|
@@ -943,6 +945,7 @@ function compileMap(
|
|
|
943
945
|
region: node.region,
|
|
944
946
|
travelMode: node.travelMode ?? "DRIVING",
|
|
945
947
|
routeMarker: node.routeMarker ?? "🚗",
|
|
948
|
+
routeAnimation: node.routeAnimation,
|
|
946
949
|
camera: node.camera,
|
|
947
950
|
cinematic: node.cinematic,
|
|
948
951
|
streetView: node.streetView,
|
package/src/descriptive/dsl.ts
CHANGED
|
@@ -496,6 +496,11 @@ export function parseKeyValueTokens(
|
|
|
496
496
|
// If the value looks like an inline JSON object/array, parse it as props
|
|
497
497
|
if (strVal.startsWith("{") || strVal.startsWith("[")) {
|
|
498
498
|
val = parseProps(strVal);
|
|
499
|
+
if (["camera", "cinematic", "streetView"].includes(key) &&
|
|
500
|
+
strVal.trim() !== "{}" && typeof val === "object" && val !== null &&
|
|
501
|
+
!Array.isArray(val) && Object.keys(val).length === 0) {
|
|
502
|
+
fail(`invalid structured ${key} value`, { ...ctx, token });
|
|
503
|
+
}
|
|
499
504
|
} else {
|
|
500
505
|
val = parseNumberMaybe(strVal);
|
|
501
506
|
}
|
|
@@ -101,7 +101,7 @@ function preserveVariantAttrs(node: Record<string, unknown>, attrs: Record<strin
|
|
|
101
101
|
"foreground", "visible", "isBackground", "instruction", "style", "effects", "on",
|
|
102
102
|
"spots", "waypoints", "routeColor", "routeWeight", "routeMarker",
|
|
103
103
|
"travelMode", "zoom", "center", "mapType", "data", "prompt",
|
|
104
|
-
"view", "camera", "cinematic", "streetView",
|
|
104
|
+
"view", "camera", "cinematic", "streetView", "routeAnimation",
|
|
105
105
|
"name", "title", "transition", "transitionTime", "layout",
|
|
106
106
|
"componentName", "props", "speaker", "isNarration",
|
|
107
107
|
]);
|
|
@@ -342,6 +342,7 @@ function parseNodeLine(content: string, lineNum?: number): DescriptiveNode {
|
|
|
342
342
|
start: attrs.start as any,
|
|
343
343
|
view: attrs.view as any,
|
|
344
344
|
routeMarker: attrs.routeMarker as any,
|
|
345
|
+
routeAnimation: attrs.routeAnimation as any,
|
|
345
346
|
travelMode: attrs.travelMode as any,
|
|
346
347
|
routeColor: attrs.routeColor as any,
|
|
347
348
|
routeWeight: attrs.routeWeight as any,
|
package/src/mcp/bridge.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export function buildPreviewBridgeScript() {
|
|
2
2
|
return `
|
|
3
3
|
const feedback=document.getElementById('feedback'),status=document.getElementById('status'),pathLabel=document.getElementById('path-label');
|
|
4
|
-
let nextId=0,identity=null,busy=false,expectedPath=null,activePath=null,activeRelay=null,activeReview={delivery:"text"},expectedDelivery="text",submittedRevision=null,submission=null;
|
|
4
|
+
let nextId=0,identity=null,busy=false,expectedPath=null,activePath=null,activeRelay=null,activeReview={delivery:"text"},expectedDelivery="text",expectedReadonly=false,submittedRevision=null,submission=null;
|
|
5
5
|
const comments=[];
|
|
6
6
|
let currentScene={sceneId:null,sceneName:null,sceneStart:0,timeSeconds:0},selectedId=0,nextCommentId=0;
|
|
7
7
|
const mode=document.getElementById('comment-mode');
|
|
8
|
+
const isViewOnly=()=>expectedReadonly||activeReview?.readonly===true;
|
|
8
9
|
const sceneKey=c=>String(c?.sceneName||c?.sceneId||'Overall');
|
|
9
10
|
function updateDeliveryMode(){
|
|
10
11
|
const el=document.getElementById('review-delivery-mode');
|
|
11
12
|
if(!el)return;
|
|
12
|
-
// Never claim a bound Event destination until the authoritative provider
|
|
13
|
-
// result actually supplies the authenticated event template.
|
|
14
13
|
const bound=activeReview?.delivery==='event'&&Boolean(activeReview.eventTemplate);
|
|
14
|
+
if(isViewOnly()){el.textContent='Read-only mode';el.title='Watch without submitting review';return;}
|
|
15
15
|
el.textContent=bound?'Event mode':expectedDelivery==='event'?'Event mode · unavailable':'Text mode';
|
|
16
16
|
el.title=bound?'Review decisions publish via the bound Events provider':
|
|
17
17
|
expectedDelivery==='event'?'Waiting for authenticated event delivery configuration':
|
|
@@ -130,6 +130,7 @@ function applyToolInput(params){
|
|
|
130
130
|
if(typeof input.path!=='string')return;
|
|
131
131
|
expectedPath=input.path;
|
|
132
132
|
expectedDelivery=input.review?.delivery==='event'?'event':'text';
|
|
133
|
+
expectedReadonly=input.readonly===true;
|
|
133
134
|
updateDeliveryMode();
|
|
134
135
|
// The selection has no authority to change delivery; only the compiled
|
|
135
136
|
// operation result supplies the provider-bound review configuration.
|
|
@@ -233,8 +234,13 @@ async function currentRevisionMatches(path,hash){
|
|
|
233
234
|
return latest.contentHash===hash && (!latest.requestId || !identity?.requestId || latest.requestId===identity.requestId);
|
|
234
235
|
}
|
|
235
236
|
function reviewReadonly(readonly,message){
|
|
236
|
-
|
|
237
|
-
|
|
237
|
+
const viewOnly=isViewOnly();
|
|
238
|
+
for(const id of ['approve','changes']){
|
|
239
|
+
const button=document.getElementById(id);
|
|
240
|
+
button.disabled=viewOnly||readonly;
|
|
241
|
+
button.style.display=viewOnly?'none':'';
|
|
242
|
+
}
|
|
243
|
+
document.getElementById('comment-entry').style.display=viewOnly?'none':'';
|
|
238
244
|
if(readonly&&message)status.textContent=message;
|
|
239
245
|
}
|
|
240
246
|
async function renderRevision(data){
|
|
@@ -296,7 +302,7 @@ async function initialize(){
|
|
|
296
302
|
catch(e){status.textContent=e.message||'MCP initialization failed';}
|
|
297
303
|
}
|
|
298
304
|
async function submit(decision){
|
|
299
|
-
if(busy)return;
|
|
305
|
+
if(busy||isViewOnly())return;
|
|
300
306
|
if(document.getElementById(decision==='approved'?'approve':'changes').disabled){
|
|
301
307
|
status.textContent='Review disabled for this revision or delivery configuration.';return;
|
|
302
308
|
}
|
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-v46.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-v45.html",
|
|
16
17
|
"ui://markcut/video-preview-v44.html",
|
|
17
18
|
"ui://markcut/video-preview-v3.html",
|
|
18
19
|
"ui://markcut/video-preview-v4.html",
|
|
@@ -121,6 +122,9 @@ export async function readPreviewAudio(path) {
|
|
|
121
122
|
const markdown = await readFile(path, "utf8");
|
|
122
123
|
const match = markdown.match(/^audio:\s*([^\r\n]+)\s*$/m);
|
|
123
124
|
const filename = match ? match[1].trim() : `${basename(path, ".md")}.wav`;
|
|
125
|
+
// Hidden generated Markdown has no implicit sibling audio; explicit audio
|
|
126
|
+
// declarations still use the normal safe-local-filename validation.
|
|
127
|
+
if (!match && filename.startsWith(".")) return {};
|
|
124
128
|
if (!/^[\w. -]+\.(wav|mp3|m4a|ogg)$/i.test(filename) || filename.startsWith(".")) throw new Error("audio must be a local audio filename in the Markdown directory");
|
|
125
129
|
const file = resolve(dirname(path), filename);
|
|
126
130
|
try { await access(file, fsConstants.R_OK); } catch (e) { if (!match && e.code === "ENOENT") return {}; throw e; }
|