@treasure-ai/treasure-deck 2026.10.4 → 2026.10.5

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/runtime/embed.js CHANGED
@@ -608,7 +608,8 @@
608
608
  function liveRevert(ls) { liveSave(ls, ls.original, true); }
609
609
 
610
610
  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.
611
+ // Cell spans of a table row: between unescaped pipes outside code spans, without the outer pipes, and without a
612
+ // trailing {…} (a column's or cell's options), which stays in the row around the text like a block's braces.
612
613
  function rowCells(line) {
613
614
  var cuts = [-1], code = false;
614
615
  for (var i = 0; i < line.length; i++) {
@@ -626,7 +627,9 @@
626
627
  return cells.map(function (cell) {
627
628
  var text = line.slice(cell.start, cell.end);
628
629
  var lead = text.length - text.replace(/^\s+/, '').length;
629
- var trimmed = text.trim();
630
+ var trimmed = text.trim(), braces = /\s*\{([^{}]*)\}$/.exec(trimmed);
631
+ // Not an escaped \{…\} or an empty {}, which are the cell's text.
632
+ if (braces && braces[1].trim() && trimmed[trimmed.lastIndexOf('{') - 1] !== '\\') trimmed = trimmed.slice(0, braces.index);
630
633
  return { start: cell.start + lead, end: cell.start + lead + trimmed.length };
631
634
  });
632
635
  }
@@ -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; }
@@ -89,7 +89,7 @@
89
89
  /* Tables: booktabs — heavy top and bottom rules, a hairline under the header, no fills. */
90
90
  .deck[data-theme="editorial"] .slide table { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
91
91
  .deck[data-theme="editorial"] .slide th {
92
- font-size: .72em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--deck-strong); border-bottom: 1px solid var(--ink);
92
+ font-size: .82em; font-weight: 700; color: var(--deck-strong); border-bottom: 1px solid var(--ink);
93
93
  }
94
94
  .deck[data-theme="editorial"] .slide td { border-bottom: 1px solid var(--deck-line); font-variant-numeric: oldstyle-nums tabular-nums; }
95
95
  .deck[data-theme="editorial"] .slide tr:last-child td { border-bottom: 0; }
@@ -167,7 +167,7 @@
167
167
  .deck[data-theme="gold"] .slide[data-mode="dark"] thead { background: hsl(220 12% 25%); }
168
168
  .deck[data-theme="gold"][data-mode="dark"] .slide:not([data-mode="light"]) th,
169
169
  .deck[data-theme="gold"] .slide[data-mode="dark"] th { color: hsl(var(--primary)); text-shadow: none; border-bottom: 1px solid var(--deck-line); }
170
- .deck[data-theme="gold"] .slide th { padding: 10px 16px 10px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #fffaf0; text-shadow: 0 1px 2px hsl(28 70% 25% / .45); }
170
+ .deck[data-theme="gold"] .slide th { padding: 10px 16px 10px; font-size: 14px; font-weight: 700; color: #fffaf0; text-shadow: 0 1px 2px hsl(28 70% 25% / .45); }
171
171
  .deck[data-theme="gold"] .slide td { padding-left: 16px; padding-right: 16px; border-bottom: 1px solid var(--deck-line); }
172
172
  .deck[data-theme="gold"] .slide tr:last-child td { border-bottom: 0; }
173
173
  .deck[data-theme="gold"] .slide td:first-child { font-weight: 650; color: var(--heading); }
@@ -117,7 +117,7 @@
117
117
 
118
118
  .deck[data-theme="treasure-ai"] .slide table { border-collapse: separate; border-spacing: 0; overflow: hidden; border-radius: 10px; background: var(--deck-card); box-shadow: 0 10px 28px -16px var(--ta-shadow), 0 0 0 1px var(--deck-line); }
119
119
  .deck[data-theme="treasure-ai"] .slide thead { background: linear-gradient(90deg, var(--ta-deep), var(--ta-indigo) 70%, #4a4fc0); }
120
- .deck[data-theme="treasure-ai"] .slide th { padding: 10px 16px 9px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: none; }
120
+ .deck[data-theme="treasure-ai"] .slide th { padding: 10px 16px 9px; font-size: 14px; font-weight: 700; color: #fff; background: none; }
121
121
  .deck[data-theme="treasure-ai"] .slide td { padding-left: 16px; padding-right: 16px; }
122
122
  .deck[data-theme="treasure-ai"] .slide td { border-bottom: 1px solid var(--deck-line); }
123
123
  .deck[data-theme="treasure-ai"] .slide tr:last-child td { border-bottom: 0; }
@@ -0,0 +1,25 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 122">
2
+ <!-- The Treasure AI gem, traced from the logo: a large violet→blue facet, a lighter top band,
3
+ a cyan highlight at the top-right corner, and a deeper right facet. -->
4
+ <defs>
5
+ <clipPath id="o"><path d="M33 1H141Q147 1 151 5L175 27Q179 31 176 35L94 118Q90 122 86 118L4 35Q0 31 4 26L23 5Q27 1 33 1Z"/></clipPath>
6
+ <linearGradient id="main" gradientUnits="userSpaceOnUse" x1="14" y1="96" x2="128" y2="20">
7
+ <stop offset="0" stop-color="#e48bc8"/><stop offset=".22" stop-color="#bd74ea"/><stop offset=".42" stop-color="#975cff"/><stop offset=".72" stop-color="#6487ff"/><stop offset="1" stop-color="#2ca9ff"/>
8
+ </linearGradient>
9
+ <linearGradient id="top" gradientUnits="userSpaceOnUse" x1="30" y1="0" x2="145" y2="20">
10
+ <stop offset="0" stop-color="#8f86ff" stop-opacity=".55"/><stop offset=".5" stop-color="#4fa6ff" stop-opacity=".85"/><stop offset="1" stop-color="#1fc6ff"/>
11
+ </linearGradient>
12
+ <linearGradient id="shine" gradientUnits="userSpaceOnUse" x1="145" y1="2" x2="176" y2="30">
13
+ <stop offset="0" stop-color="#7fdcff"/><stop offset="1" stop-color="#c9f2ff"/>
14
+ </linearGradient>
15
+ <linearGradient id="right" gradientUnits="userSpaceOnUse" x1="96" y1="112" x2="176" y2="34">
16
+ <stop offset="0" stop-color="#6a3fd6"/><stop offset=".5" stop-color="#5a74ee"/><stop offset="1" stop-color="#3dcfff"/>
17
+ </linearGradient>
18
+ </defs>
19
+ <g clip-path="url(#o)">
20
+ <path d="M-2 31 30 -2 140 24 90 124Z" fill="url(#main)"/>
21
+ <path d="M30 -2H148L140 24Z" fill="url(#top)"/>
22
+ <path d="M148 -2 182 31 140 24Z" fill="url(#shine)"/>
23
+ <path d="M140 24 182 31 90 124Z" fill="url(#right)"/>
24
+ </g>
25
+ </svg>
@@ -0,0 +1,12 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">
2
+ <!-- Two frosted slabs tilted like oversized gem facets, after the Treasure AI slide background. -->
3
+ <defs>
4
+ <linearGradient id="f" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".55"/><stop offset="1" stop-color="#fff" stop-opacity=".22"/></linearGradient>
5
+ <linearGradient id="b" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".42"/><stop offset="1" stop-color="#fff" stop-opacity=".14"/></linearGradient>
6
+ <filter id="s" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="1.2"/></filter>
7
+ </defs>
8
+ <g filter="url(#s)">
9
+ <rect x="0" y="-205" width="540" height="205" rx="24" transform="translate(784 286) rotate(31.5)" fill="url(#b)" stroke="#fff" stroke-opacity=".45" stroke-width="1.5"/>
10
+ <rect x="0" y="-172" width="580" height="172" rx="24" transform="translate(814 429) rotate(33)" fill="url(#f)" stroke="#fff" stroke-opacity=".6" stroke-width="1.5"/>
11
+ </g>
12
+ </svg>