@vosjs/cli 0.9.2 → 0.10.0
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/dist/{chunk-NKUOT5JE.js → chunk-CJPWZVHQ.js} +39 -6
- package/dist/chunk-CJPWZVHQ.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{run-OBJBU7X6.js → run-4LSBJO7N.js} +2 -2
- package/package.json +4 -4
- package/schema/doc.schema.json +52 -0
- package/dist/chunk-NKUOT5JE.js.map +0 -1
- /package/dist/{run-OBJBU7X6.js.map → run-4LSBJO7N.js.map} +0 -0
|
@@ -366,6 +366,24 @@ function lintDoc(docIn) {
|
|
|
366
366
|
`tiltStyle must be "off" | "subtle" | "medium" | "strong" (got ${String(doc.tiltStyle)})`
|
|
367
367
|
);
|
|
368
368
|
}
|
|
369
|
+
if (doc.rejected !== void 0 && !Array.isArray(doc.rejected)) {
|
|
370
|
+
problems.push("rejected must be an array of {id, lane, in, out}");
|
|
371
|
+
}
|
|
372
|
+
for (const r of entries(doc.rejected)) {
|
|
373
|
+
const name = spanName("rejected", r);
|
|
374
|
+
if (!["zoom", "tilt", "speed"].includes(r.lane)) {
|
|
375
|
+
problems.push(
|
|
376
|
+
`${name}: lane must be "zoom" | "tilt" | "speed" (got ${String(r.lane)})`
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
if (!isNum(r.in) || !isNum(r.out) || r.out <= r.in) {
|
|
380
|
+
problems.push(`${name}: needs SOURCE seconds in < out`);
|
|
381
|
+
} else if (r.in >= duration) {
|
|
382
|
+
problems.push(
|
|
383
|
+
`${name}: starts at ${r.in}s, past the footage (${duration.toFixed(2)}s) \u2014 nothing to reject there`
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
369
387
|
if (doc.camMotion !== void 0 && !Array.isArray(doc.camMotion)) {
|
|
370
388
|
problems.push("camMotion must be an array of spans");
|
|
371
389
|
}
|
|
@@ -3657,6 +3675,7 @@ import { join as join9 } from "path";
|
|
|
3657
3675
|
import {
|
|
3658
3676
|
STYLE_FIELDS,
|
|
3659
3677
|
copyStyle,
|
|
3678
|
+
isRejected,
|
|
3660
3679
|
planAutoSpeed,
|
|
3661
3680
|
planAutoZoom,
|
|
3662
3681
|
projectFromArtifact
|
|
@@ -3824,7 +3843,20 @@ function retimeCut(prev, newSteps, newDurationMs) {
|
|
|
3824
3843
|
newDuration,
|
|
3825
3844
|
report
|
|
3826
3845
|
);
|
|
3827
|
-
|
|
3846
|
+
const rejected = [];
|
|
3847
|
+
for (const lane of ["zoom", "tilt", "speed"]) {
|
|
3848
|
+
rejected.push(
|
|
3849
|
+
...retimeSpans(
|
|
3850
|
+
`rejected ${lane}`,
|
|
3851
|
+
(prev.rejected ?? []).filter((r) => r.lane === lane),
|
|
3852
|
+
stepMap,
|
|
3853
|
+
newSteps,
|
|
3854
|
+
newDuration,
|
|
3855
|
+
report
|
|
3856
|
+
)
|
|
3857
|
+
);
|
|
3858
|
+
}
|
|
3859
|
+
return { segments, zoom, speed, tilt, rejected, report };
|
|
3828
3860
|
}
|
|
3829
3861
|
|
|
3830
3862
|
// src/plugin/plan.ts
|
|
@@ -3856,20 +3888,21 @@ async function planTake(dir, opts = {}) {
|
|
|
3856
3888
|
doc = copyStyle(prev, doc);
|
|
3857
3889
|
const rt = retimeCut(prev, meta.steps ?? [], meta.durationMs);
|
|
3858
3890
|
doc.segments = rt.segments;
|
|
3891
|
+
if (rt.rejected.length) doc.rejected = rt.rejected;
|
|
3859
3892
|
const manualZoom = rt.zoom;
|
|
3860
3893
|
const autoZoom = planAutoZoom(doc.source.cursor, {
|
|
3861
3894
|
width: doc.source.meta.width,
|
|
3862
3895
|
height: doc.source.meta.height,
|
|
3863
3896
|
style: doc.zoomStyle,
|
|
3864
3897
|
params: doc.zoomParams
|
|
3865
|
-
}).filter((z) => !manualZoom.some((m) => overlaps(z, m)));
|
|
3898
|
+
}).filter((z) => !manualZoom.some((m) => overlaps(z, m))).filter((z) => !isRejected("zoom", z, doc.rejected));
|
|
3866
3899
|
doc.zoom = [...manualZoom, ...autoZoom].sort((a, b) => a.in - b.in);
|
|
3867
3900
|
const manualSpeed = rt.speed;
|
|
3868
3901
|
const autoSpeed = planAutoSpeed(doc.source.cursor, {
|
|
3869
3902
|
durationMs: doc.source.meta.durationMs,
|
|
3870
3903
|
params: doc.speedParams,
|
|
3871
3904
|
activity
|
|
3872
|
-
}).filter((s) => !manualSpeed.some((m) => s.in < m.out && s.out > m.in));
|
|
3905
|
+
}).filter((s) => !manualSpeed.some((m) => s.in < m.out && s.out > m.in)).filter((s) => !isRejected("speed", s, doc.rejected));
|
|
3873
3906
|
doc.speed = [...manualSpeed, ...autoSpeed].sort((a, b) => a.in - b.in);
|
|
3874
3907
|
if (rt.tilt.length) doc.tilt = rt.tilt;
|
|
3875
3908
|
if (prev.overlays?.length) doc.overlays = prev.overlays;
|
|
@@ -3895,14 +3928,14 @@ async function planTake(dir, opts = {}) {
|
|
|
3895
3928
|
height: doc.source.meta.height,
|
|
3896
3929
|
style: doc.zoomStyle,
|
|
3897
3930
|
params: doc.zoomParams
|
|
3898
|
-
}).filter((z) => !manual.some((m) => overlaps(z, m)));
|
|
3931
|
+
}).filter((z) => !manual.some((m) => overlaps(z, m))).filter((z) => !isRejected("zoom", z, doc.rejected));
|
|
3899
3932
|
doc.zoom = [...manual, ...auto].sort((a, b) => a.in - b.in);
|
|
3900
3933
|
const manualSpeed = (doc.speed ?? []).filter((s) => s.source !== "auto");
|
|
3901
3934
|
const autoSpeed = planAutoSpeed(doc.source.cursor, {
|
|
3902
3935
|
durationMs: doc.source.meta.durationMs,
|
|
3903
3936
|
params: doc.speedParams,
|
|
3904
3937
|
activity
|
|
3905
|
-
}).filter((s) => !manualSpeed.some((m) => s.in < m.out && s.out > m.in));
|
|
3938
|
+
}).filter((s) => !manualSpeed.some((m) => s.in < m.out && s.out > m.in)).filter((s) => !isRejected("speed", s, doc.rejected));
|
|
3906
3939
|
doc.speed = [...manualSpeed, ...autoSpeed].sort((a, b) => a.in - b.in);
|
|
3907
3940
|
} else {
|
|
3908
3941
|
const artifact = {
|
|
@@ -7441,4 +7474,4 @@ export {
|
|
|
7441
7474
|
convertAgentBrowser,
|
|
7442
7475
|
run
|
|
7443
7476
|
};
|
|
7444
|
-
//# sourceMappingURL=chunk-
|
|
7477
|
+
//# sourceMappingURL=chunk-CJPWZVHQ.js.map
|