@jokerized/decksmith 0.9.1 → 0.9.2

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 CHANGED
@@ -1112,7 +1112,8 @@ itself, and at the end at least two subjects are named that way), `data_over_pic
1112
1112
  camera, or a viewBox, not home at the settled frame). Content
1113
1113
  outside a clipping `<svg>` — a camera zoomed in — is neither off the frame nor crossing
1114
1114
  anything. Overlap and crossing findings carry the labels' boxes in the body box's px.
1115
- `seek_order` also runs on every other scene of a v2 deck, as a warning; it is what found
1115
+ `seek_order` also runs on every other scene of a v2 deck, as a warning, under
1116
+ `decksmith verify <dir>` (`build` skips it: +21s on a 16-beat deck for a warning); it is what found
1116
1117
  the equation-walk bug fixed alongside this (22,037px before, 0 after). Below the tolerance
1117
1118
  and not traced: v2's equation-walk on the narrated demo differs by 529px on one KaTeX
1118
1119
  glyph when reached from past the scene's end.
package/dist/cli.js CHANGED
@@ -21423,7 +21423,7 @@ async function verify(dir, opts = {}, storyboard, kept, source) {
21423
21423
  // silence `scanNarrationLead` keeps when its manifest is missing.
21424
21424
  ...source ? scanUnusedFigures(storyboard, source) : []
21425
21425
  ] : [];
21426
- const motion = opts.scenes === false || opts.fidelity === false ? [] : await sceneGates(dir, timing, opts.probed);
21426
+ const motion = opts.scenes === false || opts.fidelity === false ? [] : await sceneGates(dir, timing, opts.probed, opts.seekRest !== false);
21427
21427
  const seen = [...ours, ...frames2?.findings ?? [], ...motion, ...storyboardFindings];
21428
21428
  const checked = verdict.findings.map(
21429
21429
  (f) => f.severity === "error" && f.rule === "console_error" && ENVIRONMENT_ERRORS.some((re) => re.test(f.message)) ? {
@@ -21447,7 +21447,7 @@ async function verify(dir, opts = {}, storyboard, kept, source) {
21447
21447
  ]
21448
21448
  };
21449
21449
  }
21450
- async function sceneGates(dir, timing, probed2 = /* @__PURE__ */ new Set()) {
21450
+ async function sceneGates(dir, timing, probed2 = /* @__PURE__ */ new Set(), seekRest = true) {
21451
21451
  if (!timing) return [];
21452
21452
  const v2 = await stat4(join18(dir, FIT_FILE)).then(
21453
21453
  () => true,
@@ -21464,13 +21464,13 @@ async function sceneGates(dir, timing, probed2 = /* @__PURE__ */ new Set()) {
21464
21464
  const mine = all.filter((w) => generated.has(w.sid));
21465
21465
  const rest = all.filter((w) => !generated.has(w.sid));
21466
21466
  const strict = mine.length ? await probeScenes(mine, { open: () => openDeck(dir, { watch: errors }), errors }) : { findings: [] };
21467
- const loose = await probeScenes(rest, {
21467
+ const loose = seekRest && rest.length ? await probeScenes(rest, {
21468
21468
  open: () => openDeck(dir),
21469
21469
  gates: ["seek"],
21470
21470
  seekSeverity: "warning",
21471
21471
  cold: false,
21472
21472
  sparse: true
21473
- });
21473
+ }) : { findings: [] };
21474
21474
  return [...strict.findings, ...loose.findings];
21475
21475
  } catch (err) {
21476
21476
  return [
@@ -23184,7 +23184,7 @@ bespokeFlags(
23184
23184
  (bespoke?.report.scenes ?? []).filter((sc) => sc.status === "bespoke" && sc.gatedAt !== void 0).filter((sc) => sc.gatedAt === `s${cut.kept.findIndex((b) => b.id === sc.beat) + 1}`).map((sc) => sc.gatedAt)
23185
23185
  );
23186
23186
  const t0 = Date.now();
23187
- await gate(out, false, storyboard, cut.kept, o.fidelity !== false, source, probed2);
23187
+ await gate(out, false, storyboard, cut.kept, o.fidelity !== false, source, probed2, false);
23188
23188
  step(`build: verify in ${Math.round((Date.now() - t0) / 1e3)}s`);
23189
23189
  }
23190
23190
  );
@@ -23373,13 +23373,13 @@ function reportCut(cut) {
23373
23373
  }
23374
23374
  for (const d of cut.dangling) step(`build: check the wording \u2014 ${d.reason}`);
23375
23375
  }
23376
- async function gate(dir, snapshots = false, storyboard, kept, fidelity2 = true, source, probed2) {
23376
+ async function gate(dir, snapshots = false, storyboard, kept, fidelity2 = true, source, probed2, seekRest = true) {
23377
23377
  step(
23378
- `verify: running the hyperframes gates${fidelity2 ? " and opening a frame at every stop" : ""}, about a minute${probed2?.size ? ` (${probed2.size} generated scene(s) the bespoke pass gated in full are seeked, not re-probed)` : ""}`
23378
+ `verify: running the hyperframes gates${fidelity2 ? " and opening a frame at every stop" : ""}, about a minute${probed2?.size ? ` (${probed2.size} generated scene(s) the bespoke pass gated in full are not re-probed)` : ""}`
23379
23379
  );
23380
23380
  const verdict = await verify(
23381
23381
  dir,
23382
- { snapshots, fidelity: fidelity2, ...probed2?.size ? { probed: probed2 } : {} },
23382
+ { snapshots, fidelity: fidelity2, seekRest, ...probed2?.size ? { probed: probed2 } : {} },
23383
23383
  storyboard,
23384
23384
  kept,
23385
23385
  source
package/dist/index.js CHANGED
@@ -18488,7 +18488,7 @@ async function verify(dir, opts = {}, storyboard, kept, source) {
18488
18488
  // silence `scanNarrationLead` keeps when its manifest is missing.
18489
18489
  ...source ? scanUnusedFigures(storyboard, source) : []
18490
18490
  ] : [];
18491
- const motion = opts.scenes === false || opts.fidelity === false ? [] : await sceneGates(dir, timing, opts.probed);
18491
+ const motion = opts.scenes === false || opts.fidelity === false ? [] : await sceneGates(dir, timing, opts.probed, opts.seekRest !== false);
18492
18492
  const seen = [...ours, ...frames2?.findings ?? [], ...motion, ...storyboardFindings];
18493
18493
  const checked = verdict.findings.map(
18494
18494
  (f) => f.severity === "error" && f.rule === "console_error" && ENVIRONMENT_ERRORS.some((re) => re.test(f.message)) ? {
@@ -18512,7 +18512,7 @@ async function verify(dir, opts = {}, storyboard, kept, source) {
18512
18512
  ]
18513
18513
  };
18514
18514
  }
18515
- async function sceneGates(dir, timing, probed2 = /* @__PURE__ */ new Set()) {
18515
+ async function sceneGates(dir, timing, probed2 = /* @__PURE__ */ new Set(), seekRest = true) {
18516
18516
  if (!timing) return [];
18517
18517
  const v2 = await stat4(join16(dir, FIT_FILE)).then(
18518
18518
  () => true,
@@ -18529,13 +18529,13 @@ async function sceneGates(dir, timing, probed2 = /* @__PURE__ */ new Set()) {
18529
18529
  const mine = all.filter((w) => generated.has(w.sid));
18530
18530
  const rest = all.filter((w) => !generated.has(w.sid));
18531
18531
  const strict = mine.length ? await probeScenes(mine, { open: () => openDeck(dir, { watch: errors }), errors }) : { findings: [] };
18532
- const loose = await probeScenes(rest, {
18532
+ const loose = seekRest && rest.length ? await probeScenes(rest, {
18533
18533
  open: () => openDeck(dir),
18534
18534
  gates: ["seek"],
18535
18535
  seekSeverity: "warning",
18536
18536
  cold: false,
18537
18537
  sparse: true
18538
- });
18538
+ }) : { findings: [] };
18539
18539
  return [...strict.findings, ...loose.findings];
18540
18540
  } catch (err) {
18541
18541
  return [
@@ -48,14 +48,22 @@ export interface VerifyOptions extends CheckOptions {
48
48
  * Default true. The motion gates in ./scenes.ts: all three, as errors, on the
49
49
  * scenes `bespoke.json` says were generated; `seek_order` alone, as a
50
50
  * warning, on every other scene of a v2 deck. A classic deck runs none.
51
+ * `seekRest: false` drops the warning pass.
51
52
  * The bespoke pass turns this off on its probe decks, which it gates itself.
52
53
  */
53
54
  scenes?: boolean;
55
+ /**
56
+ * Default true. The warning-only `seek_order` pass on the scenes nobody
57
+ * generated. `build` turns it off: about 250 screenshots after the other
58
+ * gates for a warning, measured +21s on a 16-beat deck (19s → 40s) and
59
+ * minutes under HypePaper's worker, where it never returned a finding.
60
+ * `decksmith verify <dir>` keeps it.
61
+ */
62
+ seekRest?: boolean;
54
63
  /**
55
64
  * Generated scenes whose motion gates the bespoke pass already ran on these
56
65
  * exact bytes at this same scene id (`bespoke.json`'s `gatedAt`): `build`
57
- * seeks them like any other scene instead of repeating the full probe (~16s
58
- * a scene). `decksmith verify <dir>` never passes it.
66
+ * skips them instead of repeating the full probe (~16s a scene). `decksmith verify <dir>` never passes it.
59
67
  */
60
68
  probed?: ReadonlySet<string>;
61
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jokerized/decksmith",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Turn a source document into an animated explanation deck.",
5
5
  "type": "module",
6
6
  "license": "MIT",