@jokerized/decksmith 0.6.0 → 0.8.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/README.md CHANGED
@@ -13,13 +13,19 @@ source.
13
13
 
14
14
  ## Prerequisites
15
15
 
16
- - Node 22 or later, and nothing else to **generate** a deck. `ingest`, `build`, `pack` and
17
- `unpack` are pure Node: they read files, write files, and never open a browser. Decide
18
- your deployment on that line — a service that turns papers into decks runs in a plain
19
- Node image.
16
+ - Node 22 or later, and nothing else to **generate** a deck. `ingest` of a file, `build`,
17
+ `pack` and `unpack` run in plain Node. `build` also opens each stop in Chrome when it can
18
+ find one, and warns `not_measured` when it cannot. Decide your deployment on that line —
19
+ a service that turns papers into decks runs in a plain Node image.
20
20
  - A Chromium build and ffmpeg to **render or check** one. `verify` drives the HyperFrames
21
21
  gates in a headless browser, and the MP4 encode is ffmpeg's. Both arrive with the
22
22
  hyperframes toolchain during `npm install`; there is nothing to install by hand.
23
+ - On Linux, Chrome's sandbox needs unprivileged user namespaces, and Ubuntu 23.10 and later
24
+ deny them by default. DeckSmith then opens its own pages, the gates' view of a deck and a
25
+ caption band, without the sandbox, as HyperFrames' render always does, and prints a
26
+ `chrome:` line saying so. `ingest` of a URL refuses instead, because that page comes from
27
+ the web. `sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0`, or an AppArmor
28
+ profile for Chrome, gives the sandbox back.
23
29
  - Three commands reach outside for their own reasons: `plan` runs the Codex CLI, `narrate`
24
30
  runs edge-tts over the network, and `illustrate` asks an image backend or that same Codex
25
31
  account for pictures — and draws its own when neither will.
@@ -850,8 +856,8 @@ Three, each a position rather than a hue.
850
856
 
851
857
  `mono`'s four tones are a grey ladder plus one red rather than four hues, because value is
852
858
  what survives a bad projector and hue is not; four hues would have collapsed into one
853
- grey. All three keep the Inter stack — font families auto-resolve from a fixed allowlist,
854
- and a serif naming a family the bundle does not declare falls back silently.
859
+ grey. All three keep the Inter stack — `build` ships Inter beside every deck, and a serif
860
+ naming a family the deck does not declare falls back silently.
855
861
 
856
862
  A theme is a name and a palette, and that is the whole extension point: a new one is a
857
863
  file in `src/emit/themes/` plus a line in `THEMES`. No archetype learns it exists.
@@ -1199,13 +1205,28 @@ mechanically rather than free-hand.
1199
1205
  root timeline holds only a dummy tween spanning the deck.
1200
1206
  - KaTeX renders with `output: "html"`. The default also emits a hidden MathML mirror that
1201
1207
  the layout inspector reads as overlapping text.
1208
+ - No TeX reaches a `katex.render` call that KaTeX has not already parsed in Node, with
1209
+ `throwOnError` and the deck's own options (`src/emit/tex.ts`). A formula that fails gets
1210
+ a repair only where it cannot change what the formula says — a missing `\right.`, an
1211
+ unclosed brace, a dropped `\label`, a paper's undefined macro drawn as its name — and the
1212
+ repair is printed at `plan` and again at `build`. One no repair saves is shown as its
1213
+ source in plain text by `equation-walk`, and costs the beat, by name, in
1214
+ `equation-morph`. Until this existed the first parser a formula met was the browser at
1215
+ `verify`, after the deck had been built and narrated: 26 of 92 failed HypePaper builds
1216
+ in the week to 2026-10-07, 25 of them from `wrapTerms` cutting a `\left`/`\right` pair or
1217
+ a superscript in half.
1218
+ - `equation-walk` measures its display after fonts and fits it to its box: smaller down to
1219
+ the 40px floor, then broken after top-level relations and operators. One that still does
1220
+ not fit fails `fidelity` as `math_unfit`, with the formula in the message.
1202
1221
  - No `Date.now()`, no `Math.random()`, no network at render time *in the composition*.
1203
1222
  Two renders of an image-free deck must be byte-identical. `deck.html` is exempt: it is
1204
1223
  presented, never rendered, and its subtitle loop legitimately reads a clock.
1205
1224
  - `deck.html` never contains the string `data-composition-id`. A root-level HTML file that
1206
1225
  does trips lint's `multiple_root_compositions`, and the deck stops being navigable.
1207
- - Fonts auto-resolve only from a fixed allowlist. Inter is on it, Noto Sans KR is not, so
1208
- every CJK deck ships its own subsetted `@font-face` or the text silently falls back.
1226
+ - Every deck declares the face its stack names. A CJK deck ships a subsetted Noto; every
1227
+ other deck ships Inter from `@fontsource-variable/inter`. HyperFrames resolves Inter from
1228
+ its own allowlist, but only inside a render: the gates' page and `deck.html` never run its
1229
+ compiler, and without the deck's own face they drew SF on a Mac and DejaVu on Linux.
1209
1230
  - Audience text never goes below 40px at 1920x1080, display equations sit at 60–76px. A
1210
1231
  30px equation passes every automated gate and is unreadable from row six.
1211
1232
  - **No archetype declares its own content width.** The box comes from