@vosjs/cli 0.59.0 → 0.59.1
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-67L7FPJR.js → chunk-CYU7LVPB.js} +43 -2
- package/dist/chunk-CYU7LVPB.js.map +1 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +1 -1
- package/dist/{run-RJEBQFID.js → run-TVTM3QJW.js} +2 -2
- package/package.json +3 -3
- package/schema/doc.schema.json +28 -1
- package/dist/chunk-67L7FPJR.js.map +0 -1
- /package/dist/{run-RJEBQFID.js.map → run-TVTM3QJW.js.map} +0 -0
|
@@ -176,6 +176,7 @@ import {
|
|
|
176
176
|
pinCandidates,
|
|
177
177
|
pinRectOnScreen,
|
|
178
178
|
pinReferent,
|
|
179
|
+
parseEmphasis,
|
|
179
180
|
ratedSegments,
|
|
180
181
|
recommendedExportResolution,
|
|
181
182
|
resolvePins,
|
|
@@ -479,6 +480,23 @@ function lintDoc(docIn) {
|
|
|
479
480
|
if (z.focusMode !== void 0 && z.focusMode !== "manual" && z.focusMode !== "auto") {
|
|
480
481
|
problems.push(`${name}: focusMode must be 'manual' or 'auto'`);
|
|
481
482
|
}
|
|
483
|
+
if (z.screen !== void 0) {
|
|
484
|
+
const sp = z.screen;
|
|
485
|
+
const ok = !!sp && typeof sp === "object" && isNum(sp.x) && isNum(sp.y) && sp.x >= 0 && sp.x <= 1 && sp.y >= 0 && sp.y <= 1;
|
|
486
|
+
if (!ok) {
|
|
487
|
+
problems.push(
|
|
488
|
+
`${name}: screen must be { x, y } in 0..1 \u2014 where the target lands as FRACTIONS of the frame (0.35, 0.5 = a third across, centred), not pixels`
|
|
489
|
+
);
|
|
490
|
+
} else if (z.focusMode === "auto") {
|
|
491
|
+
warnings.push(
|
|
492
|
+
`${name}: screen is ignored on a span that follows the cursor (focusMode 'auto'); drop one or the other`
|
|
493
|
+
);
|
|
494
|
+
} else if (cameraModel(doc.frame) !== "stage") {
|
|
495
|
+
warnings.push(
|
|
496
|
+
`${name}: screen places the target under the stage camera only (frame.camera: 'stage'); the magnifier keeps the target where it is`
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
482
500
|
if (z.source !== void 0 && z.source !== "manual" && z.source !== "auto") {
|
|
483
501
|
problems.push(`${name}: source must be 'manual' or 'auto'`);
|
|
484
502
|
}
|
|
@@ -1000,6 +1018,23 @@ function lintDoc(docIn) {
|
|
|
1000
1018
|
`${name}.preset "${String(o.preset)}" is not a known preset (${PRESETS.join("|")}) \u2014 falls back to "title"`
|
|
1001
1019
|
);
|
|
1002
1020
|
}
|
|
1021
|
+
if (o.emphasis !== void 0) {
|
|
1022
|
+
const em = o.emphasis;
|
|
1023
|
+
if (!em || typeof em !== "object" || Array.isArray(em)) {
|
|
1024
|
+
problems.push(
|
|
1025
|
+
`${name}.emphasis must be { weight?, color? } ({} turns *markers* on)`
|
|
1026
|
+
);
|
|
1027
|
+
} else {
|
|
1028
|
+
if (em.weight !== void 0 && (!isNum(em.weight) || em.weight < 100 || em.weight > 900))
|
|
1029
|
+
problems.push(`${name}.emphasis.weight must be 100..900`);
|
|
1030
|
+
if (em.color !== void 0 && typeof em.color !== "string")
|
|
1031
|
+
problems.push(`${name}.emphasis.color must be a CSS colour`);
|
|
1032
|
+
}
|
|
1033
|
+
} else if (typeof o.text === "string" && parseEmphasis(o.text) !== null) {
|
|
1034
|
+
warnings.push(
|
|
1035
|
+
`${name}.text has *marked* words but no emphasis, so the asterisks show as typed; add emphasis: {} to set them bold (\\* keeps one literal)`
|
|
1036
|
+
);
|
|
1037
|
+
}
|
|
1003
1038
|
if (o.size !== void 0 && (!isNum(o.size) || o.size < 12 || o.size > 200)) {
|
|
1004
1039
|
problems.push(`${name}.size must be design px in 12..200`);
|
|
1005
1040
|
}
|
|
@@ -1632,7 +1667,13 @@ function framingWarnings(docIn, doc, zoom, overlays, warnings) {
|
|
|
1632
1667
|
}
|
|
1633
1668
|
const rect = { x: x0, y: y0, w: x1 - x0, h: y1 - y0 };
|
|
1634
1669
|
if (!zoomCoversRect(
|
|
1635
|
-
{
|
|
1670
|
+
{
|
|
1671
|
+
level: z.level,
|
|
1672
|
+
cx: z.cx,
|
|
1673
|
+
cy: z.cy,
|
|
1674
|
+
screen: z.screen,
|
|
1675
|
+
focusMode: z.focusMode
|
|
1676
|
+
},
|
|
1636
1677
|
rect,
|
|
1637
1678
|
layout,
|
|
1638
1679
|
0.02,
|
|
@@ -15070,4 +15111,4 @@ export {
|
|
|
15070
15111
|
verbHelp,
|
|
15071
15112
|
run
|
|
15072
15113
|
};
|
|
15073
|
-
//# sourceMappingURL=chunk-
|
|
15114
|
+
//# sourceMappingURL=chunk-CYU7LVPB.js.map
|