From b7f88a6177bec8157f2ad0f516b4d02e1d9a4690 Mon Sep 17 00:00:00 2001 From: grunion-ai Date: Sun, 1 Nov 2026 13:00:47 -0500 Subject: [PATCH] Three canvas densities, medium by default A deck can now choose how much page it has, separately from how much a slide carries. canvas: low | medium | high in the model, or --canvas on create and new. low is 720x405 with larger type and margins. high is 1280x720 with smaller type and 32px margins. medium is 960x540 and is the default; a deck that names no canvas builds as it always did. The tier sets the canvas, margin, role sizes, foot band and word caps. Library layouts and templates are cut from the margins inward with a piecewise map, so a full-bleed row stays full bleed and a style kit written for 960 works on all three. --space still wins on size. Low holds less on purpose: 61 of 115 templates fit their sample copy there, against 114 of 115 on medium and high. validate names what to shorten. A viewer that blocks scripts by policy, such as Claude's browser pane on a local file, keeps the noscript still as text, and display:contents painted that text as raw markup. The deck now hides it and says the viewer blocks scripts. With JavaScript fully off the still renders as before. ponytail: - lib/layouts.mjs: role factors and caps are fixed tables per tier; a style kit cannot override them. Upgrade: read a tier block from style.json. - lib/layouts.mjs: low uses Stat at 1.4x so library tiles hold it; a hero slide wants more. Upgrade: a low-only hero layout or template. - template.html: a script-blocked viewer gets a message, not a slide. Upgrade: make the still real markup that render() replaces. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 + SKILL.md | 2 +- bin/create.mjs | 13 ++++--- bin/new.mjs | 22 ++++++----- bin/validate.mjs | 19 ++++++---- deck.html | 2 +- docs/canvas.md | 11 ++++++ lib/layouts.mjs | 44 ++++++++++++++++++++-- lib/templates.mjs | 9 +++-- library.html | 2 +- schemas/build.mjs | 4 +- schemas/model.schema.json | 7 ++++ template.html | 2 +- test/canvas-density.test.mjs | 73 ++++++++++++++++++++++++++++++++++++ 14 files changed, 178 insertions(+), 34 deletions(-) create mode 100644 docs/canvas.md create mode 100644 test/canvas-density.test.mjs diff --git a/CHANGELOG.md b/CHANGELOG.md index ffd0d86..a9caef7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog ## Unreleased +- **Three canvas densities.** `canvas: 'low' | 'medium' | 'high'` in the model, `--canvas` on `create` and `new`. Low is 720×405 with larger type and margins; high is 1280×720 with smaller type and 32px margins. Medium is the default and builds byte-identically. Layouts, templates, the foot band and the word caps all follow the tier. +- **A viewer that blocks scripts no longer shows the deck's markup as text.** With script off by policy the parser keeps the `