@treasure-ai/treasure-deck 2026.10.4 → 2026.10.6

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.
@@ -11,7 +11,7 @@ treasure-deck releases several times a week, much more often than Treasure Work.
11
11
 
12
12
  ## Decision
13
13
 
14
- - State is kept per copy, in `~/.treasure-deck/<hash of the package folder>/`. Every command except `version` and `update` records itself there in `sessions/<pid>`. At most once an hour, it spawns a detached `deck __update` and doesn't wait for it.
14
+ - State is kept per copy, in `~/.treasure-deck/<hash of the package folder>/`. Every command except `version` and `update`, run from a global install, records itself there in `sessions/<pid>`, whether or not background updates are on. At most once an hour, it spawns a detached `deck __update` and doesn't wait for it.
15
15
  - The child takes `update.lock` and checks that this copy is a global install, either npm's or pnpm's. It reads the `latest` dist-tag, or `next` when `DECK_UPDATE_CHANNEL=next`. When that's newer, it waits until no session of this copy is alive, then installs with the same manager. The next start prints the change.
16
16
  - npm's global install is recognized by its layout, `<prefix>/lib/node_modules/<package>` with `<prefix>/bin/deck` linking to it, and updated with `--prefix <prefix>`. `npm root -g` isn't used: npm masks path segments that look like tokens, such as UUIDs, in its output. The layout also finds a copy under a prefix no environment variable names.
17
17
  - `deck update` installs at once, in the foreground. `DECK_DISABLE_AUTOUPDATE=1` and `CI` turn off the background updates.
package/docs/commands.md CHANGED
@@ -124,4 +124,4 @@ Settings, as environment variables:
124
124
  - `DECK_UPDATE_CHANNEL=next` follows `next` instead of `latest`.
125
125
  - `npm_config_registry` points the check at another registry.
126
126
 
127
- The updater keeps its state in a folder per install, `~/.treasure-deck/<hash of the install's path>/`. In it, `update.json` holds the last check and any result to report, `update.lock` and `install.lock` mark a running check and install, and `sessions/` lists the running `deck` processes. So a global install and another copy, such as one an app installs under its own prefix, each update on their own. See [ADR: updates install after deck exits](adrs/2026-10-16-updates-install-after-exit.md).
127
+ The updater keeps its state in a folder per install, `~/.treasure-deck/<hash of the install's path>/`. In it, `update.json` holds the last check and any result to report, `update.lock` and `install.lock` mark a running check and install, and `sessions/` lists the running `deck` processes of a global install. So a global install and another copy, such as one an app installs under its own prefix, each update on their own. See [ADR: updates install after deck exits](adrs/2026-10-16-updates-install-after-exit.md).
package/docs/editor.md CHANGED
@@ -5,11 +5,11 @@ pnpm deck editor talk.md # opens http://127.0.0.1:4300
5
5
  pnpm deck editor talk.md --no-open --port 4301 # serve it without opening a browser
6
6
  ```
7
7
 
8
- `deck editor` opens the deck for editing in your browser. Like `deck dev`, it takes port 4300 or the next free one unless `--port` names one. Treasure Work shows the same page in its right dock (it starts it as `deck dev --embed`, the same server without opening a browser). It listens on 127.0.0.1 only. `examples/playground/playground.md` is a deck for trying it; copy it somewhere first, since edits save to the file.
8
+ `deck editor` opens the deck for editing in your browser. Like `deck dev`, it takes port 4300 or the next free one unless `--port` names one. Treasure Work shows the same page in its right dock (it starts it as `deck dev --embed`, the same server without opening a browser). It listens on 127.0.0.1 only, and it answers only requests (and live-reload WebSocket connections) addressed to `127.0.0.1:<port>` or `localhost:<port>`, so a web page that points its own hostname at 127.0.0.1 (DNS rebinding) can't read the deck through it. `deck dev` without `--embed` still answers any host, so a phone on the LAN can open the preview. `examples/playground/playground.md` is a deck for trying it; copy it somewhere first, since edits save to the file.
9
9
 
10
10
  Edits save on their own as you type, after a short pause, and each one changes only the lines it touched: the rest of the file stays exactly as written, and a change made elsewhere meanwhile (Claude, another editor) is never overwritten. See [ADR: edits are line-range patches](adrs/2026-10-04-edits-are-line-range-patches.md).
11
11
 
12
- The page, top to bottom:
12
+ The page, top to bottom, in edit mode (in a host app, the app turns it on; on its own it starts on, and `e` toggles it). Out of edit mode, the page shows the slide alone, as large as the window allows.
13
13
 
14
14
  ## Thumbnails
15
15
 
@@ -50,7 +50,7 @@ A Mermaid diagram is picked and resized the same way, written as `{w=…}` on it
50
50
 
51
51
  ## The editor
52
52
 
53
- Below the slide, in edit mode (in a host app, the app turns it on; on its own it starts on, and `e` toggles it). Drag its top edge to resize it.
53
+ Below the slide. Drag its top edge to resize it.
54
54
 
55
55
  ### Toolbar
56
56
 
package/docs/syntax.md CHANGED
@@ -12,7 +12,7 @@ deck: true
12
12
  title: "Wvlet: A Flow-Style Query Language"
13
13
  author: Taro L. Saito
14
14
  date: 2026-10-15
15
- theme: wvlet # default | editorial | pastel | gold | treasure-ai | wvlet | ./my-theme (a theme folder, relative to the deck)
15
+ theme: wvlet # default | editorial | pastel | gold | treasure-ai | treasure-ai-2026 | wvlet | ./my-theme (a theme folder, relative to the deck)
16
16
  mode: dark # light | dark (each theme has both)
17
17
  accent: "#25a7c1" # recolors the accent, and everything derived from it, on every slide
18
18
  footer: "Treasure AI · DB Study Group"
@@ -46,7 +46,7 @@ Header and separator lines count only on a line of their own, outside fenced cod
46
46
  | `content` (default) | | Heading + body |
47
47
  | `title` | | Centered title slide: H1 title, `{.subtitle}` and `{.meta}` paragraphs |
48
48
  | `section` | | Starts a section (see below) |
49
- | `columns` | ratio, e.g. `3:2`, `1:1:1` (default: equal) | Columns separated by `=== col`; a leading `#`/`##` heading spans all of them. A column that opens with `###` becomes a card. |
49
+ | `columns` | ratio, e.g. `3:2`, `1:1:1` (default: equal) | Columns separated by `=== col`; a leading `#`/`##` heading spans all of them. A column that opens with `###` becomes a card; cards side by side share one height. |
50
50
 
51
51
  Other kinds of slides come from attributes rather than more layouts: `{side=right w=40%}` on an image makes a split slide, `{bg}` a full-bleed image slide, and `{.center}` or `{.lead}` a statement slide.
52
52
 
@@ -146,6 +146,30 @@ Attributes on headings, paragraphs, lists, and spans take a fixed vocabulary of
146
146
 
147
147
  A block's braces go right after its text (`Plain text{.center}`); after an inline element such as `**bold**`, braces belong to that element, so a block's braces then need a space before them (`Some **bold** {.muted}`). Define more classes in a deck-local `theme.css` ([Themes](themes.md)).
148
148
 
149
+ ## Tables
150
+
151
+ Tables are GFM tables, styled by the theme. Braces at the end of a header cell apply to its column, and braces on the line after the table (right under it, or after a blank line) apply to the table:
152
+
153
+ ```markdown
154
+ | Metric {w=200} | Q2 {nowrap} | Q3 {nowrap} | Notes |
155
+ |---|--:|--:|---|
156
+ | Weekly users | 84 | 126 | Driven by the editor launch |
157
+ | Build time | 1.9 s | 0.4 s | Prerendered diagrams |
158
+ {.small}
159
+ ```
160
+
161
+ | Where | Attribute | Effect |
162
+ |---|---|---|
163
+ | Header cell | `w=` | The column's width, in canvas px or `%` of the table |
164
+ | Header cell | `nowrap` | The column's cells stay on one line |
165
+ | Header cell | `wrap` | The column wraps even in a `nowrap` table |
166
+ | Body cell | `nowrap`, `wrap` | Just that cell |
167
+ | Table | `nowrap` | No cell wraps, except in `wrap` columns |
168
+ | Table | `w=` | The table's width, in canvas px or `%` of the column (`w=100%` spans it) |
169
+ | Table | `.class` | A class on the table, such as `.small` |
170
+
171
+ Without widths, the browser sizes columns by their content. A table with a `%` column and no `w=` of its own spans its column, so the percentages have something to be a share of. A column that can't wrap can push the table past the slide's edge, which `deck check` reports. Other attributes on a table or a cell fail the build. The editor leaves a cell's braces in place when you edit its text.
172
+
149
173
  ## Code
150
174
 
151
175
  Fenced code is highlighted at build time for every [highlight.js](https://highlightjs.org/) language plus [Wvlet](https://wvlet.org/wvlet/docs/development/syntax-highlighting/) (` ```wvlet ` or ` ```wv `), colored by the theme. ` ```sql {2-3} ` highlights lines 2–3. A slide holding only a code block gets a larger code font, and a block whose longest line is wider than its panel shrinks just enough to fit, down to 12px, instead of clipping (`deck check` reports code still clipped, and warns below 14px).
package/docs/themes.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Themes
2
2
 
3
- Six themes are built in: three unbranded ones, `default` (used when a deck names no theme), `editorial`, and `pastel`, and three branded ones, `gold` (Treasure Work), `treasure-ai`, and `wvlet` (`deck themes` lists them). Every theme styles the same four layouts, every class, and every Markdown element, so switching themes is one line of frontmatter:
3
+ Seven themes are built in: three unbranded ones, `default` (used when a deck names no theme), `editorial`, and `pastel`, and four branded ones, `gold` (Treasure Work), `treasure-ai`, `treasure-ai-2026`, and `wvlet` (`deck themes` lists them). Every theme styles the same four layouts, every class, and every Markdown element, so switching themes is one line of frontmatter:
4
4
 
5
5
  ```yaml
6
- theme: default # or editorial, pastel, gold, treasure-ai, wvlet, or ./my-theme (a folder, relative to the deck)
6
+ theme: default # or editorial, pastel, gold, treasure-ai, treasure-ai-2026, wvlet, or ./my-theme (a folder, relative to the deck)
7
7
  mode: dark # light | dark
8
8
  accent: "#25a7c1" # recolors the accent, and everything derived from it
9
9
  ```
@@ -65,7 +65,7 @@ A theme must style the four layouts, every semantic class, and the standard Mark
65
65
  - **Header band:** a leading `#`/`##` on a content or columns slide becomes the slide header, with an **eyebrow** naming the current section (`01 · THE SYNTAX`).
66
66
  - **Section numbers:** a shown section divider has a large `.section-num`.
67
67
  - **Footer banner:** every slide has a `.footer-brand` slot at bottom left that the theme fills with its logo and wordmark; the deck's `footer:` text and the page number follow it.
68
- - **Columns:** a divider when the theme sets `--deck-col-rule`; a column that opens with `###` is a card.
68
+ - **Columns:** a divider when the theme sets `--deck-col-rule`; a column that opens with `###` is a card, and cards side by side share one height (the tallest card's).
69
69
 
70
70
  ### `deck theme check`
71
71
 
@@ -82,7 +82,7 @@ Contrast is measured against the rendered pixels, so gradients, grain, and frost
82
82
 
83
83
  - Plain at heart, with some polish. Light: white `#ffffff` / ink `#1d2129`, soft indigo `#5e6ad2` as the accent and violet `#7654dd` as the second; the two make the accent gradient. Dark: near-black `#0c0e13` / `#e4e7ed`, with `#8e97f0` and `#b4a6f7`. Everything follows the seeds, so `accent:` recolors the whole deck, gradients and section slides included.
84
84
  - Inter throughout (700 headings with tight tracking, 800 on title and section slides); `*accent*` words in headings carry the accent gradient. JetBrains Mono for code and page numbers.
85
- - Content slides: white with a faint accent glow in the top-right and bottom-right corners. The header is the section in a small chip, the title, and a hairline that starts with a short gradient stroke. Bullets are small gradient squares, with hollow rings on nested levels. Cards are raised white panels with a gradient top edge. Tables are raised panels with a tinted, small-caps header row. Callouts are tinted panels with a side rule.
85
+ - Content slides: white with a faint accent glow in the top-right and bottom-right corners. The header is the section in a small chip, the title, and a hairline that starts with a short gradient stroke. Bullets are small gradient squares, with hollow rings on nested levels. Cards are raised white panels with a gradient top edge. Tables are raised panels with a tinted header row. Callouts are tinted panels with a side rule.
86
86
  - Code: a dark panel on every slide, with GitHub-dark token colors, line numbers, and the language in the corner.
87
87
  - Title: big 800-weight type at left, a gradient bar above it, and a soft indigo and violet glow with a dot grid fading in from the right. Section: a full-bleed accent color block (its lightness capped so white type always reads) with a large number and the dot grid.
88
88
  - Banner: no logo; the footer shows only the deck's `footer:` text and the page number.
@@ -110,7 +110,7 @@ Contrast is measured against the rendered pixels, so gradients, grain, and frost
110
110
 
111
111
  - Light: cream `#fbf8f2` / ink `hsl(25 35% 10%)`, primary `hsl(30 62% 32%)`. Dark: slate gray `hsl(224 11% 19%)` as in the Treasure Work app / ink `hsl(210 15% 91%)`, primary `hsl(42 85% 64%)`. Series colors are the six "ray" hues.
112
112
  - Inter Tight 700 headings with tight tracking, and 21px body text (a touch below the 22px default). `*Accent*` words in headings stay in Inter Tight, set in its 700 italic with an animated gold shimmer. Serif italics (Instrument Serif, then Fraunces and Source Serif) were tried and dropped: inside a bold sans title the mix never sat well, however the weight was matched. Source Serif 4 italic remains for blockquotes, where it sets a quote apart from body text. JetBrains Mono for code and page numbers.
113
- - Paper feel: content slides carry a softer version of the title aurora around the right and bottom edges, with a fine grain texture. The top left stays flat cream so titles read cleanly. Under the title, a long gold bar (deep amber → bright gold) fades out over a hairline. Bullets are gold diamonds (the gem motif), and nested levels hang off a thin gold guide line. Tables use small-caps headers on a gradient that runs from deep amber at the left to bright gold at the right. Cards are cream with a shine edge. `.muted` text uses its own lighter warm grey, so it stands clearly apart from body text.
113
+ - Paper feel: content slides carry a softer version of the title aurora around the right and bottom edges, with a fine grain texture. The top left stays flat cream so titles read cleanly. Under the title, a long gold bar (deep amber → bright gold) fades out over a hairline. Bullets are gold diamonds (the gem motif), and nested levels hang off a thin gold guide line. Tables use bold headers on a gradient that runs from deep amber at the left to bright gold at the right. Cards are cream with a shine edge. `.muted` text uses its own lighter warm grey, so it stands clearly apart from body text.
114
114
  - Code: flat charcoal panels above the grain, with line numbers, the language in the top-right corner, Rosé Pine token colors (iris keywords, gold strings, rose numbers, foam types), and highlighted lines on a neutral lifted band with a gold left edge. Inline code is a gold-tinted chip.
115
115
  - Title: a full aurora with the 3D gem floating at right. Section: a giant gold-gradient number above the title.
116
116
  - Banner: the gem and the "Treasure Work" wordmark at bottom left.
@@ -125,6 +125,17 @@ Contrast is measured against the rendered pixels, so gradients, grain, and frost
125
125
  - **Night mode** (`mode: dark`): a deep-indigo canvas (`#0b0d29`) with stronger glows, white titles, and cyan accents.
126
126
  - Banner: the Treasure AI logo at bottom left, with a white wordmark on gradient and night slides.
127
127
 
128
+ **`treasure-ai-2026` — the 2026 Treasure AI brand** (palette and type from the Treasure AI brand hub; layouts and gradients from the 2026 Google Slides template)
129
+
130
+ - Palette: primary `#494FFF`, secondary `#8753FF` and `#C466D4`, and the official accents (salmon, lime, coral) for chart series. As the brand asks, a slide uses at most two brand colors plus black and white: titles are black, the blue and purple carry everything else.
131
+ - Manrope Bold headlines (800 on title and section slides), Inter body at 21px, all flush left. `*Accent*` words in headings take the template's purple → magenta gradient, as in "The *Agentic Experience* Platform".
132
+ - Content slides are white, as in the template, with a faint lavender wash at the lower right and a thin full-height rule near the left edge. Titles carry no bar; the eyebrow is a small purple label. Bullets are purple dots, nested levels purple arrows, and third levels hollow rings. Subtitles are purple.
133
+ - Cards are the template's boxed columns: white, a thin purple rounded border, and a small uppercase purple title. Tables have a purple → blue header row in white. Callouts are lavender with a purple side rule, and quotes are large Manrope behind a purple quotation mark.
134
+ - Code: a deep-indigo panel with token colors from the brand palette.
135
+ - Title: the full logo at top left over the brand's pastel sweep (peach → pink → violet → blue) rising from the lower right, with the frosted gem-facet slabs. Section: the template's named gradients with black type and a large blue number, cycling **Rainbow → Dusk → Lavender → Sunset** from one section to the next (through section 16; later sections are Lavender).
136
+ - Banner: only the small gem, in the strip left of the edge rule, since the template drops the footer band; the deck's `footer:` text and the page number follow in gray.
137
+ - `mode: dark` is the brand hub's deep indigo (`hsl(238 100% 8%)`) with the washes as soft glows and white type.
138
+
128
139
  **`wvlet` — Wvlet** (after the Trino Summit 2024 Wvlet deck; icon from `wvlet/logos/wvlet-icon.svg`)
129
140
 
130
141
  - Light by default: an icy blue-white gradient with soft bokeh highlights. Titles are Roboto Bold in deep teal `#246570` with a soft lift shadow; `*accent*` words carry a slow teal → cyan shimmer (lighter cyans on section terminals and dark slides, where titles turn white). Top-level bullets are teal statements and nested levels are gray details with hollow ○ markers. Links are coral.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treasure-ai/treasure-deck",
3
- "version": "2026.10.4",
3
+ "version": "2026.10.6",
4
4
  "description": "Markdown presentations without <div> markup: four layouts, themes, and a single-file HTML output that publishes to Apps Script",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://www.npmjs.com/package/@treasure-ai/treasure-deck",
@@ -40,8 +40,8 @@
40
40
  "deck": "tsx src/cli.ts",
41
41
  "test": "vitest run",
42
42
  "typecheck": "tsc --noEmit",
43
- "demo": "for t in default editorial pastel gold treasure-ai wvlet; do tsx src/cli.ts build examples/tour/tour.md --theme $t -o examples/tour/tour-$t.html; done",
44
- "demo:pdf": "for t in default editorial pastel gold treasure-ai wvlet; do tsx src/cli.ts pdf examples/tour/tour.md --theme $t -o examples/tour/tour-$t.pdf; done",
43
+ "demo": "for t in default editorial pastel gold treasure-ai treasure-ai-2026 wvlet; do tsx src/cli.ts build examples/tour/tour.md --theme $t -o examples/tour/tour-$t.html; done",
44
+ "demo:pdf": "for t in default editorial pastel gold treasure-ai treasure-ai-2026 wvlet; do tsx src/cli.ts pdf examples/tour/tour.md --theme $t -o examples/tour/tour-$t.pdf; done",
45
45
  "release": "scripts/release.sh",
46
46
  "promote": "scripts/promote.sh"
47
47
  },
package/runtime/base.css CHANGED
@@ -101,6 +101,9 @@ body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
101
101
  .slide table { border-collapse: collapse; font-size: .9em; margin: 0 0 .5em; }
102
102
  .slide th, .slide td { padding: .32em .75em; text-align: left; vertical-align: top; }
103
103
  .slide th { padding-top: .5em; padding-bottom: .5em; }
104
+ /* Table options: `{nowrap}` on the table or a header cell (its column) keeps cells on one line; `{wrap}` undoes it for a column or cell. */
105
+ .slide :is(table.nowrap :is(th, td), th.nowrap, td.nowrap) { white-space: nowrap; }
106
+ .slide table :is(th, td).wrap { white-space: normal; }
104
107
  /* Lines are blocks carrying the horizontal padding, so a highlighted band and its edge bar span the panel with no seams. */
105
108
  .slide pre.code { margin: 0 0 .6em; padding: 14px 0; overflow: hidden; font-family: var(--deck-font-mono); font-size: var(--deck-scale-code); line-height: 1.45; }
106
109
  .slide pre.code .line { display: block; padding: 0 18px; }
@@ -167,6 +170,8 @@ body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
167
170
  .layout-columns .cols:not(:has(> .col > h3:first-child)) { column-gap: calc(var(--deck-col-gap) / 2); }
168
171
  .layout-columns .cols:not(:has(> .col > h3:first-child)) > .col + .col { padding-left: calc(var(--deck-col-gap) / 2); border-left: 1px solid var(--deck-col-rule, transparent); }
169
172
  .layout-columns .col > :first-child { margin-top: 0; }
173
+ /* Cards side by side share one height, the tallest card's: the band's row fits its content, and its columns fill the row. */
174
+ .layout-columns .cols:has(> .col > h3:first-child) { align-items: stretch; align-content: start; }
170
175
 
171
176
  /* Extra blank lines between blocks: each one more than the first adds this much space. */
172
177
  .slide .gap { flex: none; height: calc(var(--gap) * var(--deck-gap, .6em)); }
package/runtime/embed.js CHANGED
@@ -37,14 +37,16 @@
37
37
  '@media (prefers-color-scheme:light){:root{--ed-bg:#fff;--ed-bg-2:#f3f4fb;--ed-input:#f8f9fd;--ed-line:#e3e4f2;--ed-line-2:#cfd2ea;' +
38
38
  '--ed-fg:#1c1d33;--ed-fg-2:#3a3c5a;--ed-muted:#61637e;--ed-accent:#3240a4;--ed-accent-text:#3240a4;--ed-on-accent:#fff;' +
39
39
  '--ed-danger:#c2415a;--ed-shadow:rgba(30,36,110,.18);--ed-backdrop:#eceef8;--ed-stub-line:rgba(50,64,164,.35);--ed-stub-bg:rgba(50,64,164,.04);--ed-thumb:rgba(50,64,164,.4)}}' +
40
- // Top to bottom: the thumbnail strip, the current slide (fit to the box between them), and the editor (edit mode).
40
+ // Top to bottom: the thumbnail strip, the current slide (fit to the box between them), and the editor. Out of edit
41
+ // mode, the slide alone.
41
42
  ':root{--thumbs-h:92px;--editor-h:45vh}html,body{background:var(--ed-backdrop)}' +
42
- '.deck.is-embed{top:var(--thumbs-h);bottom:0;background:var(--ed-backdrop)}.deck.is-embed.is-edit{bottom:var(--editor-h)}' +
43
+ '.deck.is-embed{top:0;bottom:0;background:var(--ed-backdrop)}.deck.is-embed.is-edit{top:var(--thumbs-h);bottom:var(--editor-h)}' +
43
44
  '.deck.is-edit .slide [data-src]:not(.slide):hover{outline:2px dashed var(--deck-accent,var(--ed-accent));outline-offset:4px;cursor:pointer}' +
44
45
  // The block being edited below, marked on the slide.
45
46
  '.deck .deck-doc-focus{outline:2px solid var(--deck-accent,var(--ed-accent));outline-offset:4px}' +
46
47
  '.deck.deck-thumbs{position:fixed;inset:0 0 auto 0;height:var(--thumbs-h);z-index:5;display:flex;align-items:center;gap:10px;padding:0 12px;' +
47
48
  'overflow-x:auto;overflow-y:hidden;background:var(--ed-bg);border-bottom:1px solid var(--ed-line);scrollbar-width:thin;scrollbar-color:var(--ed-thumb) transparent}' +
49
+ '.deck.deck-thumbs:not(.is-edit){display:none}' +
48
50
  '.deck-thumbs .thumb{flex:none;position:relative;width:128px;height:72px;padding:0;border:1px solid var(--ed-line);border-radius:4px;overflow:hidden;cursor:pointer;background:var(--ed-bg-2)}' +
49
51
  '.deck-thumbs .thumb.is-current{outline:2px solid var(--ed-accent);outline-offset:2px}' +
50
52
  '.deck-thumbs .thumb .slide{position:absolute;left:0;top:0;visibility:visible;opacity:1;transform:scale(.1);transform-origin:0 0;pointer-events:none}' +
@@ -194,7 +196,7 @@
194
196
  'border-radius:4px;background:color-mix(in srgb,var(--ed-accent) 14%,transparent);display:flex;align-items:center;justify-content:center;' +
195
197
  'color:var(--ed-accent-text);font:600 11px/1.2 ui-sans-serif,system-ui,sans-serif;pointer-events:none}' +
196
198
  '.deck-thumbs .thumb-unhide{position:absolute;right:3px;bottom:3px;z-index:2;font:600 10px/14px ui-sans-serif,system-ui,sans-serif;color:var(--ed-fg);' +
197
- 'background:var(--ed-bg-2);border:1px solid var(--ed-line-2);border-radius:4px;padding:0 5px;cursor:pointer}.deck-thumbs:not(.is-edit) .thumb-unhide{display:none}' +
199
+ 'background:var(--ed-bg-2);border:1px solid var(--ed-line-2);border-radius:4px;padding:0 5px;cursor:pointer}' +
198
200
  '.deck-doc .doc-slide.is-hidden > .doc-sep span::after{content:" \\00b7 hidden"}.deck-slide-bar .dsb-hidden{color:var(--ed-muted);font-weight:500}' +
199
201
  '.deck.is-stale .slide{opacity:.6;transition:opacity .2s}' +
200
202
  '.deck .deck-img-picked{outline:3px solid var(--deck-accent,var(--ed-accent));outline-offset:3px}.deck-stage .deck-img-picked:is(img,video){cursor:move;touch-action:none}' +
@@ -608,7 +610,8 @@
608
610
  function liveRevert(ls) { liveSave(ls, ls.original, true); }
609
611
 
610
612
  var LINE = /^(\s*(?:>\s*)*(?:(?:[-*+]|\d+[.)])\s+)?(?:#{1,6}\s+)?)(.*?)((?:\s*\{[^{}]*\})?\s*)$/;
611
- // Cell spans of a table row: between unescaped pipes outside code spans, without the outer pipes.
613
+ // Cell spans of a table row: between unescaped pipes outside code spans, without the outer pipes, and without a
614
+ // trailing {…} (a column's or cell's options), which stays in the row around the text like a block's braces.
612
615
  function rowCells(line) {
613
616
  var cuts = [-1], code = false;
614
617
  for (var i = 0; i < line.length; i++) {
@@ -626,7 +629,9 @@
626
629
  return cells.map(function (cell) {
627
630
  var text = line.slice(cell.start, cell.end);
628
631
  var lead = text.length - text.replace(/^\s+/, '').length;
629
- var trimmed = text.trim();
632
+ var trimmed = text.trim(), braces = /\s*\{([^{}]*)\}$/.exec(trimmed);
633
+ // Not an escaped \{…\} or an empty {}, which are the cell's text.
634
+ if (braces && braces[1].trim() && trimmed[trimmed.lastIndexOf('{') - 1] !== '\\') trimmed = trimmed.slice(0, braces.index);
630
635
  return { start: cell.start + lead, end: cell.start + lead + trimmed.length };
631
636
  });
632
637
  }
@@ -4,110 +4,266 @@ description: >-
4
4
  Write and edit slide decks in treasure-deck Markdown (a .md file with `deck: true` frontmatter, built to one
5
5
  HTML page by `deck build`). Use this skill whenever the user wants a presentation, talk, slides, deck, pitch,
6
6
  or lightning talk drafted, turned from an outline or notes or a document into slides, restyled, shortened, or
7
- fixed — and whenever you edit a Markdown file whose frontmatter has `deck: true`, even if the user just says
8
- "update my talk". It covers the syntax, the house style for dense, readable slides, and the `deck check` loop
9
- that catches overflowing slides before anyone sees them.
7
+ fixed, or published as a web page — and whenever you edit a Markdown file whose frontmatter has `deck: true`,
8
+ even if the user just says "update my talk". It covers the syntax, the house style for dense, readable slides,
9
+ the `deck check` loop that catches overflowing slides before anyone sees them, and publishing to Apps Script.
10
10
  ---
11
11
 
12
12
  # Writing treasure-deck slides
13
13
 
14
14
  A deck is one Markdown file (plus an `images/` folder next to it). `deck build talk.md` turns it into a single self-contained HTML page; `deck pdf` prints it. The syntax is CommonMark + GFM with a handful of additions, and the build is strict: a typo in a layout, attribute, or class fails with a line number instead of reaching the audience.
15
15
 
16
- **Running the CLI.** Use `deck` if it is on the PATH (installed with `npm install -g @treasure-ai/treasure-deck`). Otherwise `npx @treasure-ai/treasure-deck …` works, and inside a treasure-deck checkout use `pnpm deck …`. The full reference (`syntax.md`, `commands.md`, `editor.md`, `themes.md`) is in the package's `docs/` folder, at `$(npm root -g)/@treasure-ai/treasure-deck/docs/` for a global install. With `pnpm --dir <checkout> deck …`, pass absolute paths: `--dir` changes the working directory, so relative paths would resolve inside the checkout.
16
+ **Running the CLI.** Use `deck` if it is on the PATH (installed with `npm install -g @treasure-ai/treasure-deck`). Otherwise `npx @treasure-ai/treasure-deck …` works, and inside a treasure-deck checkout use `pnpm deck …`. The syntax is listed below. The long-form docs (`commands.md`, `editor.md`, `themes.md`, `syntax.md`) are in the package's `docs/` folder. With `pnpm --dir <checkout> deck …`, pass absolute paths: `--dir` changes the working directory, so relative paths would resolve inside the checkout.
17
17
 
18
18
  ## Workflow
19
19
 
20
- 1. **Start the file.** For a new deck, run `deck new talks/<slug>` (or `deck new <file>.md --title "…" --theme default|editorial|pastel|gold|treasure-ai|wvlet --author "…"`). It writes a starter deck that already builds, with the frontmatter filled in. The author defaults to git's `user.name`, so pass `--author` when the talk is someone else's. Replace the starter's slides entirely, keeping only the frontmatter, and add `--- section` lines where your plan has sections. For an existing deck, read the whole file first: its sections, tone, and density are the style to match.
20
+ 1. **Start the file.** For a new deck, run `deck new talks/<slug>` (or `deck new <file>.md --title "…" --theme default|editorial|pastel|gold|treasure-ai|treasure-ai-2026|wvlet --author "…"`). It writes a starter deck that already builds, with the frontmatter filled in. The author defaults to git's `user.name`, so pass `--author` when the talk is someone else's. Replace the starter's slides entirely, keeping only the frontmatter, and add `--- section` lines where your plan has sections. For an existing deck, read the whole file first: its sections, tone, and density are the style to match.
21
21
  2. **Plan the story before the slides.** From the user's outline, notes, or document, write down the sections and one sentence per slide saying what that slide proves. A slide without such a sentence usually belongs merged into another. For length, plan about one content slide per 1.5–2 minutes of talk (a 15-minute talk is 8–10 slides plus the title and closing), and 3–5 sections for 20 minutes or more. Use only facts the user gave you. Where a slide needs a number or name you don't have, write the slide without it and leave a `TODO:` in its `=== notes` instead of inventing one, because a plausible made-up figure is easy to miss and embarrassing on stage.
22
22
  3. **Write the slides** with the syntax below and the style guide after it.
23
23
  4. **Verify with `deck check <file>.md --snapshots <dir>`.** It renders every slide in headless Chrome at the real 1280×720 size and reports, with source line numbers, content that runs past the slide's edges, clipped or shrunken code, diagram labels too small to read, and title-only leftovers. Build errors (unknown class, missing image, a broken Mermaid diagram) surface here too. Fix every finding (shorten, split the slide, switch to columns) and run it again until it is clean.
24
- Then **look at the snapshots** (`<dir>/slide-NN.png`), at least every slide with a diagram, columns, or cards. A clean check means nothing overflows; it doesn't mean the slide looks right. The snapshots show what the check can't: a slide that is mostly empty, cards of very different heights, a diagram that reads poorly. Don't report a deck as done before the check passes and you have looked.
25
- 5. **Hand over.** Tell the user how to preview: `deck dev <file>.md` serves it with live reload at http://localhost:4300 (`--port`, `--theme` to compare themes), and `deck editor <file>.md` opens it in the browser to edit on the slides. Mention anything you were unsure about, such as numbers you inferred or images that still need to be supplied.
24
+ Then **look at the snapshots** (`<dir>/slide-NN.png`), at least every slide with a diagram, columns, or cards. A clean check means nothing overflows; it doesn't mean the slide looks right. The snapshots show what the check can't: a slide that is mostly empty, cards side by side whose text differs a lot in length (they share the tallest card's height, so a short one looks empty), a table whose columns wrap awkwardly, a diagram that reads poorly. Don't report a deck as done before the check passes and you have looked.
25
+ 5. **Hand over.** Tell the user how to preview: `deck dev <file>.md` serves it with live reload at http://localhost:4300 (`--port`, `--theme` to compare themes), and `deck editor <file>.md` opens it in the browser to edit on the slides. Mention anything you were unsure about, such as numbers you inferred or images that still need to be supplied. If the user wants a link, see Publishing below.
26
26
 
27
27
  ## Syntax
28
28
 
29
+ A deck is CommonMark + GFM with the additions below. Anything unknown is a build error with its line number.
30
+
31
+ ### Frontmatter
32
+
33
+ | Key | Meaning |
34
+ |---|---|
35
+ | `deck: true` | Marks the file as a deck (required) |
36
+ | `title` | The page title, or the first heading when unset |
37
+ | `author`, `date` | Not used by the slides: write them in the title slide's body, as `deck new` does |
38
+ | `theme` | `default` (unbranded), `editorial`, `pastel`, `gold` (Treasure Work), `treasure-ai`, `treasure-ai-2026` (the 2026 Treasure AI brand), `wvlet`, or `./folder` (a theme folder next to the deck) |
39
+ | `mode` | `light` or `dark` |
40
+ | `accent` | `"#hex"`, recolors the accent everywhere |
41
+ | `footer` | Footer text |
42
+ | `section_slides` | `true` shows section divider slides |
43
+ | `toc` | `sidebar` starts with the table-of-contents column (`t` toggles it) |
44
+ | `parts` | `[a.md, b.md]` continues the deck in more files, each starting a new slide |
45
+
46
+ ### Slides and layouts
47
+
48
+ | Syntax | Meaning |
49
+ |---|---|
50
+ | `---` | Next slide |
51
+ | `--- <layout> {attrs}` | Next slide with a layout and attributes |
52
+ | `--- content` | Heading and body (the default) |
53
+ | `--- title` | Centered title slide: H1, then `{.subtitle}` and `{.meta}` paragraphs |
54
+ | `--- section` + `# Name` | Numbered section; its divider is hidden unless `{show}` |
55
+ | `--- columns 3:2` | Columns separated by `=== col`; the ratio is optional (`1:1:1`, default equal) |
56
+ | `=== col` / `=== col {.class}` | Next column; a slide with one is a columns slide |
57
+ | `=== row` / `=== row 2:1` | Next band of columns, at its own widths, under the ones before |
58
+ | `=== notes` | Speaker notes to the end of the slide |
59
+
60
+ - Header and separator lines count only on a line of their own, outside code fences.
61
+ - A leading `#` heading on a content or columns slide is its title; on a columns slide it spans all the columns.
62
+ - A column whose first line is `### Heading` is a card. Cards suit 2–4 parallel options: the title line comes first, and the first card follows directly, with no `=== col` before it.
63
+ - A `---` header right after the frontmatter sets the first slide's layout without adding an empty slide.
64
+ - One blank line separates blocks; each extra blank line adds a small gap. Blank lines inside a list or code block, and at the start or end of a column, add nothing.
65
+
66
+ ### Slide attributes
67
+
68
+ | Attribute | Effect |
69
+ |---|---|
70
+ | `{mode=dark}` / `{mode=light}` | Mode for this slide |
71
+ | `{bg=photo.jpg dim=0.4 blur=4}` | Full-bleed background image |
72
+ | `{fit}` | Zoom an overflowing body down to fit, not below 14px (for dense reference slides only) |
73
+ | `{hide}` | Draft: leave the slide out of the build. On a section, `--- section {hide}` leaves out the whole section until the next one |
74
+ | `{show}` / `{nonum}` | On a section: show its divider / drop its big number (the section stays numbered) |
75
+ | `{.class}` | A class from the list below |
76
+
77
+ ### Block and image attributes
78
+
79
+ Attributes follow a block, image, or `[span]` in braces: `.class`, `key=value`, or a flag.
80
+
81
+ | Syntax | Effect |
82
+ |---|---|
83
+ | `![alt](images/x.png){h=300 shadow}` | Size with `w=` or `h=` (canvas px or `%` of the column) |
84
+ | `fit` / `cover` | Fill the column (contain / crop) |
85
+ | `left`, `center`, `right` | Horizontal alignment in the flow (centered by default) |
86
+ | `bg`, `bg dim=0.6`, `bg blur=4` | Full-slide background behind the content |
87
+ | `side=left` or `side=right`, with `w=` (default 45%) | Full-height side panel: a split slide without a layout |
88
+ | `at=top-right`, `at=x%,y%` | Pinned out of the flow, at one of nine anchors (`top-left`, `top`, `top-right`, `left`, `center`, `right`, `bottom-left`, `bottom`, `bottom-right`) or at a point |
89
+ | `shadow`, `round`, `circle`, `border` | Decoration |
90
+ | `![alt](x.png "Caption")` | Caption under the image |
91
+
92
+ Several images in one paragraph form an evenly spaced row. Paths are relative to the deck, and a missing file fails the build.
93
+
94
+ A video (`.mp4`, `.webm`, `.mov`, `.m4v`) takes the same syntax and attributes, plus `autoplay` (muted, plays when its slide shows), `loop`, and `nocontrols`. It is inlined into the page, so keep clips short: a page over about 9 MB can't be published as a web page, and `deck build` says so. `deck build --media-dir <dir>` keeps videos as files next to the page instead.
95
+
96
+ ### Tables
97
+
98
+ GFM tables. Braces at the end of a **header cell** apply to its column: `w=` sets its width (canvas px or `%` of the table), `nowrap` keeps it on one line, and `wrap` lets it wrap in a `nowrap` table. Braces on the **line after the table** apply to the whole table: `nowrap`, `w=` (`w=100%` spans the column), or a class.
99
+
29
100
  ```markdown
101
+ | Metric {w=200} | Q2 {nowrap} | Q3 {nowrap} | Notes |
102
+ |---|--:|--:|---|
103
+ | Weekly users | 84 | 126 | Editor launch |
104
+ {.small}
105
+ ```
106
+
107
+ Reach for `nowrap` on short label, number, and unit columns that break awkwardly; `deck check` reports a table that then runs past the edge.
108
+
109
+ ### Code and diagrams
110
+
111
+ - A fenced block with a language is highlighted at build time (any highlight.js language, plus `wvlet` or `wv`). Put line numbers after the language to highlight them: `sql {2-3}` highlights lines 2–3 and dims the rest. A slide holding only a code block gets a larger font.
112
+ - A `mermaid` fence draws a diagram colored by the theme. Give a node a role with `A[Label]:::accent` (also `:::dark`, `:::muted`, `:::light`). Size it on the fence line: `mermaid {w=60%}` (canvas px or % of the column) or `mermaid {h=300}`.
113
+ - A diagram scales to its column's width, so its text shrinks with it. Keep it to about 5–6 nodes with one-to-three-word labels. Use `flowchart TB` in a column, and `LR` only for a short chain (3–4 nodes) or a full-width slide. `deck check` warns when labels render below 13px.
114
+
115
+ ### Classes
116
+
117
+ - Blocks: `{.lead}` (the key sentence, 1.2× body size), `{.muted}`, `{.small}` (sources, footnotes), `{.center}` (horizontal centering only), `{.subtitle}` and `{.meta}` (title slides), `{.callout}`, `{.note}`, `{.warn}` (boxed asides).
118
+ - Spans: `[text]{.hl}`, `[new]{.badge}`, `[old]{.del}`.
119
+ - Any other class needs a `theme.css` next to the deck, or it is a build error.
120
+ - A block's braces go right after its text. After an inline element such as `**bold**`, put a space first: `Some **bold** {.muted}`.
121
+ - `*emphasis*` in a heading becomes the theme's accent style.
122
+
123
+ ### Example
124
+
125
+ This deck uses every construct above. Its images and videos are placeholders: copy the syntax, and put real files at those paths or change the paths.
126
+
127
+ ````markdown
30
128
  ---
31
129
  deck: true
32
- title: "Wvlet: A Flow-Style Query Language"
130
+ title: "Syntax at a glance"
33
131
  author: Taro L. Saito
34
- date: 2026-10-15
35
- theme: default # default | editorial | pastel (unbranded) | gold (Treasure Work) | treasure-ai | wvlet | ./my-theme (a theme folder)
36
- footer: "Treasure AI · DB Study Group"
37
- # optional: mode: dark · accent: "#25a7c1" · section_slides: true · toc: sidebar · parts: [part2.md]
132
+ date: 2026-10-16
133
+ theme: default
134
+ mode: light
135
+ accent: "#25a7c1"
136
+ footer: "Treasure AI"
137
+ section_slides: true
138
+ toc: sidebar
38
139
  ---
39
140
  --- title
40
141
 
41
- # Wvlet: *Flow-Style* Queries
142
+ # *Syntax* at a glance
42
143
 
43
144
  Subtitle line{.subtitle}
44
145
 
45
- **Taro L. Saito** · Treasure AI
146
+ October 16, 2026{.meta}
147
+
148
+ --- section {show}
46
149
 
47
- October 15, 2026{.meta}
150
+ # Layouts
151
+
152
+ --- {hide}
153
+
154
+ # A draft, left out of the build
48
155
 
49
156
  ---
50
157
 
51
- # A content slide (the default layout)
158
+ # Bullets and inline classes
52
159
 
53
- - Bullets, tables, code, images flow in the body
160
+ - **Strict** — typos fail the build
161
+ - Inline [highlight]{.hl}, [new]{.badge}, and [old]{.del}
54
162
 
55
- === notes
56
- Speaker notes: everything after === notes, to the end of the slide.
163
+ Key takeaway in one sentence.{.lead}
57
164
 
58
- --- section
165
+ Context the speaker says aloud.{.muted}
59
166
 
60
- # Part name
167
+ === notes
168
+ Speaker notes run to the end of the slide.
61
169
 
62
170
  --- columns 3:2
63
171
 
64
- # A columns slide
172
+ # Claim beside evidence
65
173
 
66
- Left column (3 parts wide)
174
+ The left column makes the claim.
67
175
 
68
176
  === col
69
177
 
70
- Right column (2 parts wide)
178
+ ```sql {2-3}
179
+ select id
180
+ from events
181
+ where ts > now() - interval '1' day
71
182
  ```
72
183
 
73
- | Syntax | Meaning |
184
+ --- columns
185
+
186
+ # Three cards
187
+
188
+ ### Measure first
189
+ Dependency install was 60% of build time.
190
+
191
+ === col
192
+
193
+ ### Cache by lockfile
194
+ Key the cache on the lockfile hash.
195
+
196
+ === col
197
+
198
+ ### Ship small
199
+ One change per deploy.
200
+
201
+ === row
202
+
203
+ Every layer is replaceable; the contracts are not.{.callout}
204
+
205
+ ---
206
+
207
+ # Rows with their own widths
208
+
209
+ ### Left
210
+ Text under the first row.
211
+
212
+ === col
213
+
214
+ ### Right
215
+ Text beside it.
216
+
217
+ === row 2:1
218
+
219
+ A wide band of text under both.
220
+
221
+ === col
222
+
223
+ A narrow one beside it.
224
+
225
+ --- {fit}
226
+
227
+ # A dense reference
228
+
229
+ | Key | Meaning |
74
230
  |---|---|
75
- | `---` | Next slide |
76
- | `--- <layout> {attrs}` | Next slide with a layout: `content` (default), `title`, `section`, `columns [ratio]` |
77
- | `=== col` / `=== col {.class}` | Next column; a slide containing it is a columns slide |
78
- | `=== row` / `=== row 2:1` | Next row of columns, at its own widths, under the ones before (e.g. three cards over a full-width summary) |
79
- | `=== notes` | Speaker notes until the end of the slide |
80
- | `{…}` after a block, image, or `[span]` | Attributes: `.class`, `key=value`, flags |
231
+ | `mode` | `light` or `dark` |
232
+ | `toc` | `sidebar` starts with the contents column |
81
233
 
82
- - A leading `#` heading on a content or columns slide becomes the slide title (spanning all columns).
83
- - Extra blank lines between blocks add space on the slide: one blank line separates blocks as usual, and each one more adds a small gap. Use them for deliberate breathing room, not by accident.
84
- - `--- section` + `# Name` starts a numbered section. Its divider slide is **hidden** by default; the section's number and name appear above the titles of the slides that follow. `--- section {show}` shows one divider; `--- section {nonum}` drops the big number from that divider slide (the section stays numbered elsewhere).
85
- - `--- {hide}` leaves a slide out of the build (a draft); `--- section {hide}` leaves out a whole section.
86
- - A column whose first line is `### Heading` renders as a card. A row of cards is a columns slide whose columns each open with `###`:
234
+ --- {bg=images/hero.jpg dim=0.4}
87
235
 
88
- ```markdown
89
- --- columns
90
- # Three lessons
236
+ # Full-bleed background
91
237
 
92
- ### Measure first
93
- 60% of the time was dependency install.
238
+ Text over the photo.{.lead}
94
239
 
95
- === col
240
+ ---
96
241
 
97
- ### Caches need discipline
98
- Key on the lockfile hash.
99
- ```
242
+ # Images
100
243
 
101
- The title line comes first and the first card follows directly, with no `=== col` before it (one there is harmless; it is dropped).
102
- - Slide attributes: `{bg=photo.jpg dim=0.4 blur=4}` full-bleed background, `{mode=dark}` one dark slide, `{fit}` shrink an overflowing body to fit (see below), `{.class}`.
244
+ ![Architecture](images/arch.png "Caption"){h=200 shadow}
103
245
 
104
- **Classes** (every theme styles all of them; others are a build error unless defined in a `theme.css` next to the deck): `.lead` (the key sentence, 1.2× body size; it stands out by position and brevity more than size), `.muted` (secondary), `.small` (sources, footnotes), `.subtitle` and `.meta` (title slides), `.callout`, `.note`, `.warn` (boxed asides), `.center` (horizontal centering of a paragraph; there is no vertical centering), `.hl` (inline highlight: `[text]{.hl}`), `.badge` (`[new]{.badge}`), `.del`.
246
+ ![](images/logo.png){at=top-right w=120}
105
247
 
106
- **Images:** `![alt](images/x.png){h=300 shadow}`. Size with `w=` / `h=` (canvas px or `%`); decorate with `shadow round circle border`; place with `left center right`, or `fit` / `cover` to fill the column. `{side=right w=40%}` makes a full-height side panel; `{bg dim=0.4}` a full-bleed background; `{at=top-right w=120}` pins it. `![alt](x.png "Caption")` adds a caption. Several images in one paragraph form a row. Paths are relative to the deck; missing images fail the build. A video (`.mp4`, `.webm`, `.mov`) uses the same syntax and attributes, plus `autoplay` (muted, when the slide shows), `loop`, and `nocontrols`; it is inlined, so keep clips short: a page over about 9 MB can't be published as a web page, and `deck build` says so. `deck build --media-dir <dir>` keeps videos as files next to the page instead.
248
+ ![](images/team.jpg){side=right w=30%}
107
249
 
108
- **Code:** fenced blocks are highlighted at build time (any highlight.js language, plus `wvlet`). ` ```sql {2-3} ` highlights lines 2–3 and dims the rest. A slide holding only a code block gets a larger font.
250
+ ---
251
+
252
+ # Video
109
253
 
110
- **Diagrams:** ` ```mermaid ` draws a diagram colored by the theme; give a node a role with `A[Label]:::accent` (also `:::dark`, `:::muted`, `:::light`). A diagram is scaled to fit its column's width, so its text shrinks with it: a five-node `flowchart LR` in a `1:1` column ends up with 8px labels. Keep diagrams small: at most about 5–6 nodes, labels of one to three words, and few edge labels. Match the direction to the space: `flowchart TB` for a column, `LR` only for a short chain (3–4 nodes) or when the diagram has the full slide width. A diagram alone on a content slide gets the full width, but a tall one can then run off the bottom. Size one on its fence line: ` ```mermaid {w=60%} ` (canvas px or % of the column, enlarging too) or `{h=300}` for a tall one; labels scale with it. `deck check` warns when labels render below 13px.
254
+ ![Demo](media/demo.mp4){w=70% round}
255
+
256
+ ![](media/loop.webm){autoplay loop nocontrols}
257
+
258
+ ---
259
+
260
+ # Diagram
261
+
262
+ ```mermaid {w=60%}
263
+ flowchart LR
264
+ A[Source]:::accent --> B[Build] --> C[Publish]
265
+ ```
266
+ ````
111
267
 
112
268
  ## House style
113
269
 
@@ -117,19 +273,31 @@ The canvas is 1280×720 with 21–22px body text, so slides hold real content
117
273
  - **One idea per slide.** If a slide needs two titles, it's two slides.
118
274
  - **Bullets are short statements**, 5–6 at most, one line each where possible; start with the bolded key phrase (`- **Strict** — typos fail the build`). Nest at most one level.
119
275
  - **Use columns for comparison and for text + evidence** (claim on the left, code/table/image on the right) — `--- columns 3:2` or `1:1`. Cards (`### Heading` columns) suit 2–4 parallel options.
120
- - **Prefer a table** over bullets when items share attributes; prefer a Mermaid diagram over a bullet list describing a flow.
276
+ - **Prefer a table** over bullets when items share attributes; prefer a Mermaid diagram over a bullet list describing a flow. Right-align number columns (`--:`) and keep them, and short labels, on one line with `{nowrap}` on the header cell; give a long text column a `{w=…%}` so it takes the wrapping.
121
277
  - **Fill the slide, or make it a statement.** Two bullets under a title leave most of the canvas empty. Merge the slide with a neighbor, add the evidence (a table, diagram, code, or image beside the text in columns), or make it a deliberate one-line statement with `.lead`.
122
278
  - **One `.lead` sentence** per slide at most, for the takeaway; `.muted` for context the speaker will say aloud anyway.
123
279
  - **Put the talk track in `=== notes`**, not on the slide: the slide carries the evidence, the notes carry the narration.
124
- - **Open with a title slide and end with one** (`# *Thank* you`, or the call to action). `*emphasis*` in a title becomes the theme's accent style.
280
+ - **Open with a title slide and end with one** (`# *Thank* you`, or the call to action).
125
281
  - **Don't add agenda or section-divider slides** unless asked: sections already label every slide, and `t` shows a table of contents.
126
282
  - **Match the language of the source material.** Japanese text is typeset automatically (line breaking and fonts), with no setting.
127
283
 
128
284
  ## Fixing `deck check` findings
129
285
 
130
- - **Overflows the bottom:** cut words first, then split the slide, then move detail to notes. `--- {fit}` (zoom the body down to fit, not below 14px) is for slides that are dense by nature, such as a reference table, an appendix, or a full agenda. It isn't a fix for a talk slide that says too much, and `deck check` warns when it pushes text below 16px. Shrinking text with `.small` is for footnotes, not body content.
286
+ - **Overflows the bottom:** cut words first, then split the slide, then move detail to notes. `--- {fit}` is for slides that are dense by nature, such as a reference table, an appendix, or a full agenda. It isn't a fix for a talk slide that says too much, and `deck check` warns when it pushes text below 16px. Shrinking text with `.small` is for footnotes, not body content.
131
287
  - **Code shrunk:** shorten long lines, drop lines that aren't the point, or give the code its own slide (a slide holding only a code block gets a larger font).
132
- - **Wide table:** abbreviate headers, drop a column, or move the table to its own slide.
288
+ - **Wide table:** abbreviate headers, drop a column, give the long column a `{w=…}` so the others stop wrapping, or move the table to its own slide.
289
+
290
+ ## Publishing to Apps Script
291
+
292
+ Treasure Work publishes a built deck as an Apps Script web page through the `share_artifact` tool. Publish only when the user asks for a link.
293
+
294
+ 1. Get `deck check` clean first, as in the workflow.
295
+ 2. Run `deck build <file>.md -o <name>.html` beside the deck. If the build warns that the page is too large, shorten or trim the videos. Don't use `--media-dir` for a publish: the publish uploads one HTML file, so linked videos would be missing.
296
+ 3. Call `share_artifact` with `target: "file"`, `target_id` set to the absolute path of the HTML, `mechanism: "apps_script"`, and a `title`. It publishes the file as it is. The page is private (only the user) unless you pass `scope`. Use `"organization"` or `"anyone"` only when the user asks, and confirm before `"anyone"`.
297
+ 4. Give the user the URL. Keep the artifact id from the result. To update the same page after edits, rebuild and pass that id as `artifact_id`; without it, the publish creates a second page.
298
+ 5. Publishing needs the user's Google account connected in Settings ▸ Connectors. If the tool reports that it is missing, tell the user to connect it.
299
+
300
+ Don't publish the deck `.md` as a `note`: it would appear as a plain document, not slides. Don't use `mechanism: "drive"` for a deck either, since Drive doesn't serve the HTML as a page. A published page is a snapshot, so rebuild and republish after each edit.
133
301
 
134
302
  ## When the user wants a different look
135
303
 
@@ -100,7 +100,7 @@
100
100
  background: var(--raised); box-shadow: var(--raised-shadow), 0 0 0 1px var(--deck-line);
101
101
  }
102
102
  .deck[data-theme="default"] .slide th {
103
- color: var(--deck-strong); font-weight: 650; font-size: .78em; letter-spacing: .05em; text-transform: uppercase;
103
+ color: var(--deck-strong); font-weight: 650; font-size: .85em;
104
104
  background: color-mix(in oklab, var(--deck-accent) 8%, var(--raised)); border-bottom: 1px solid var(--deck-line);
105
105
  }
106
106
  .deck[data-theme="default"] .slide :is(th, td) { padding-left: 16px; padding-right: 16px; }