@treasure-ai/treasure-deck 2026.11.5 → 2026.11.7

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.
Files changed (55) hide show
  1. package/dist/build.d.ts +10 -4
  2. package/dist/build.js +27 -8
  3. package/dist/build.js.map +1 -1
  4. package/dist/charts.d.ts +17 -0
  5. package/dist/charts.js +454 -0
  6. package/dist/charts.js.map +1 -0
  7. package/dist/check.d.ts +6 -0
  8. package/dist/check.js +47 -1
  9. package/dist/check.js.map +1 -1
  10. package/dist/chrome.js +2 -0
  11. package/dist/chrome.js.map +1 -1
  12. package/dist/cli.js +4 -4
  13. package/dist/cli.js.map +1 -1
  14. package/dist/components.d.ts +13 -0
  15. package/dist/components.js +46 -0
  16. package/dist/components.js.map +1 -0
  17. package/dist/deckindex.js +2 -2
  18. package/dist/deckindex.js.map +1 -1
  19. package/dist/deckstyle.js +1 -1
  20. package/dist/dev.js +15 -11
  21. package/dist/dev.js.map +1 -1
  22. package/dist/diagrams.d.ts +15 -8
  23. package/dist/diagrams.js +60 -26
  24. package/dist/diagrams.js.map +1 -1
  25. package/dist/render.d.ts +21 -1
  26. package/dist/render.js +111 -1
  27. package/dist/render.js.map +1 -1
  28. package/dist/scaffold.d.ts +2 -0
  29. package/dist/scaffold.js +4 -2
  30. package/dist/scaffold.js.map +1 -1
  31. package/dist/slides.js +8 -4
  32. package/dist/slides.js.map +1 -1
  33. package/dist/slidesexport.js +2 -2
  34. package/dist/slidesexport.js.map +1 -1
  35. package/dist/themecheck.d.ts +2 -2
  36. package/dist/themecheck.js +5 -5
  37. package/dist/themecheck.js.map +1 -1
  38. package/dist/vendor.d.ts +10 -1
  39. package/dist/vendor.js +32 -2
  40. package/dist/vendor.js.map +1 -1
  41. package/docs/commands.md +5 -2
  42. package/docs/syntax.md +102 -2
  43. package/docs/themes.md +1 -1
  44. package/package.json +8 -1
  45. package/runtime/base.css +73 -0
  46. package/runtime/embed.js +9 -6
  47. package/runtime/runtime.js +321 -10
  48. package/skills/treasure-deck/SKILL.md +53 -2
  49. package/vendor/echarts/LICENSE +222 -0
  50. package/vendor/echarts/echarts.min.js +45 -0
  51. package/vendor/react/LICENSE-react +21 -0
  52. package/vendor/react/LICENSE-react-dom +21 -0
  53. package/vendor/react/LICENSE-recharts +22 -0
  54. package/vendor/react/LICENSE-tailwindcss +21 -0
  55. package/vendor/react/deck-react.js +78 -0
package/dist/vendor.js CHANGED
@@ -1,4 +1,5 @@
1
- import { copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
1
+ import { execFileSync } from 'node:child_process';
2
+ import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from 'node:fs';
2
3
  import { createRequire } from 'node:module';
3
4
  import * as path from 'node:path';
4
5
  import { fileURLToPath } from 'node:url';
@@ -7,6 +8,8 @@ import { fileURLToPath } from 'node:url';
7
8
  * Node-only dependencies, every Lucide icon in five formats), while deck loads one Mermaid browser bundle, the
8
9
  * editor's toolbar icons, and Lucide's icon outlines (one JSON file) for `:name:` icons on slides. `pnpm build` copies
9
10
  * those files into vendor/, which the package ships; a checkout that hasn't been built reads them from node_modules.
11
+ * ECharts (```chart) is copied the same way. React, ReactDOM, Recharts, and the Tailwind subset React components get are
12
+ * bundled into one script (scripts/react-bundle) by `pnpm build`, and by `reactBundle` on first use in a checkout.
10
13
  * (The package root is found here rather than imported from build.ts, which imports render.ts, which imports this.)
11
14
  */
12
15
  export const VENDOR_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'vendor');
@@ -23,6 +26,8 @@ function sources() {
23
26
  return [
24
27
  ['mermaid/mermaid.min.js', 'mermaid/dist/mermaid.min.js'],
25
28
  ['mermaid/LICENSE', 'mermaid/LICENSE'],
29
+ ['echarts/echarts.min.js', 'echarts/dist/echarts.min.js'],
30
+ ['echarts/LICENSE', 'echarts/LICENSE'],
26
31
  ['lucide/LICENSE', 'lucide-static/LICENSE'],
27
32
  ['lucide/icon-nodes.json', 'lucide-static/icon-nodes.json'],
28
33
  ...ICONS.map((name) => [`lucide/${name}.svg`, `lucide-static/icons/${name}.svg`]),
@@ -35,7 +40,29 @@ export function vendorFile(file) {
35
40
  return own;
36
41
  return createRequire(import.meta.url).resolve(sources().find(([to]) => to === file)[1]);
37
42
  }
38
- /** Copy the vendored files from node_modules into vendor/ (run by `pnpm build`). */
43
+ /** The bundled ECharts build (UMD, sets window.echarts). */
44
+ export const ECHARTS_JS = () => vendorFile('echarts/echarts.min.js');
45
+ const REACT_BUNDLE = 'react/deck-react.js';
46
+ const BUNDLE_SOURCES = path.resolve(VENDOR_DIR, '..', 'scripts', 'react-bundle');
47
+ /**
48
+ * The React bundle (sets window.__DECK_REACT__): vendor/'s, or in a checkout that hasn't been built, one bundled into
49
+ * node_modules/.cache when missing or older than its sources.
50
+ */
51
+ export function reactBundle() {
52
+ const own = path.join(VENDOR_DIR, REACT_BUNDLE);
53
+ if (existsSync(own))
54
+ return own;
55
+ const cached = path.resolve(VENDOR_DIR, '..', 'node_modules', '.cache', 'treasure-deck', 'deck-react.js');
56
+ const newest = Math.max(...readdirSync(BUNDLE_SOURCES).map((f) => statSync(path.join(BUNDLE_SOURCES, f)).mtimeMs));
57
+ if (!existsSync(cached) || statSync(cached).mtimeMs < newest)
58
+ bundleReact(cached);
59
+ return cached;
60
+ }
61
+ function bundleReact(out) {
62
+ mkdirSync(path.dirname(out), { recursive: true });
63
+ execFileSync(process.execPath, [path.join(BUNDLE_SOURCES, 'build.mjs'), out], { stdio: ['ignore', 'ignore', 'inherit'] });
64
+ }
65
+ /** Copy the vendored files from node_modules into vendor/, and bundle React (run by `pnpm build`). */
39
66
  export function writeVendor() {
40
67
  rmSync(VENDOR_DIR, { recursive: true, force: true });
41
68
  const require = createRequire(import.meta.url);
@@ -48,5 +75,8 @@ export function writeVendor() {
48
75
  else
49
76
  copyFileSync(require.resolve(from), dest);
50
77
  }
78
+ bundleReact(path.join(VENDOR_DIR, REACT_BUNDLE));
79
+ for (const pkg of ['react', 'react-dom', 'recharts', 'tailwindcss'])
80
+ copyFileSync(path.resolve(VENDOR_DIR, '..', 'node_modules', pkg, 'LICENSE'), path.join(VENDOR_DIR, 'react', `LICENSE-${pkg}`));
51
81
  }
52
82
  //# sourceMappingURL=vendor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vendor.js","sourceRoot":"","sources":["../src/vendor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AAErG,kDAAkD;AAClD,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW;IAClH,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS;IAC9F,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,qBAAqB,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU;IAC/H,cAAc,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS;I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
@@ -35,7 +35,7 @@ talk.md:57: error: slide 9 "The query": code is cut off at the right even at 12p
35
35
  talk.md:80: warning: slide 12 "Setup": code shrank to 13px to fit (shorten its longest line, or give it more width)
36
36
  ```
37
37
 
38
- It flags content past any edge of the slide body (into the footer, for example), text wider than its column (a long URL), code panels that are still clipped after the runtime shrinks them, and broken Mermaid diagrams. Warnings cover code shrunk below 14px, diagram labels scaled below 13px (a wide diagram in a narrow column), fitted slides below 16px text, and slides with a title and nothing else. It exits 1 on errors, so it fits in CI.
38
+ It flags content past any edge of the slide body (into the footer, for example), text wider than its column (a long URL), code panels that are still clipped after the runtime shrinks them, and broken Mermaid diagrams. Warnings cover code shrunk below 14px, diagram labels scaled below 13px (a wide diagram in a narrow column), fitted slides below 16px text, and slides with a title and nothing else. It also warns, on slide 1, when the frontmatter has no `author:` or `date:` (or still has the starter's `Your Name`), or when the first slide doesn't show the author's name and the date's year: once the deck is published, they tell readers who to contact. It exits 1 on errors, so it fits in CI.
39
39
 
40
40
  - `--toc` also checks every slide with the table of contents column shown. (The column no longer changes a slide's layout, so this finds the same problems; it is kept for scripts that pass it.)
41
41
  - `--snapshots dir` writes one PNG per slide (`dir/slide-NN.png`), to look at what a clean check can't tell you: a mostly empty slide, uneven cards, a diagram that reads poorly.
@@ -172,12 +172,15 @@ The built page, `deck dev`, and the editor's `/present` all present the same way
172
172
  | `d` | Light / dark (slides with their own `{mode=…}` keep it) |
173
173
  | `l` | Laser pointer |
174
174
  | `s` | Share panel |
175
+ | `i` | About this deck: title, author, date, and description |
175
176
  | `?` | Shortcut help |
176
177
 
177
178
  Touch: swipe to navigate, pinch out for the overview. On portrait phones the deck becomes a vertical scroll of slides. `#/12` links to slide 12; under Apps Script this goes through `google.script.history`.
178
179
 
179
180
  **Presenter window:** `P` (or the share panel) opens the deck in a second window for your screen: the current slide, the next one, the speaker notes, the elapsed time (`k` or Pause stops it and Resume goes on; `r` or Reset restarts it), and the clock. Put the first window on the projector. The windows follow each other: navigating, `b` (black screen), `d` (light/dark), and `t` in either one updates both.
180
181
 
182
+ **About this deck (`i`):** the deck's title and its frontmatter `author`, `date`, and `description`, which the built page also carries as `<meta>` tags. A reader of a published or embedded copy finds who to contact here.
183
+
181
184
  **Share panel (`s`):** copy the deck link or a link to the current slide, show a QR code full screen (for the audience to follow on their phones), print or save as PDF, copy an `<iframe>` embed snippet (see below), and download the deck's source as a `.zip` of its folder (see [`deck import`](#importing-a-shared-deck-deck-import)).
182
185
 
183
186
  **Embedding in a web page:** add `?embed=1` to a published deck's URL and put it in an `<iframe>`, as Speaker Deck embeds work. Share panel ▸ Copy embed snippet gives one that fills its column at 16:9 and starts at the current slide (`#/<n>`):
@@ -186,7 +189,7 @@ Touch: swipe to navigate, pinch out for the overview. On portrait phones the dec
186
189
  <iframe src="https://script.google.com/macros/s/…/exec?embed=1" style="width:100%;aspect-ratio:16/9;border:0" allow="fullscreen" allowfullscreen></iframe>
187
190
  ```
188
191
 
189
- In embed mode the deck shows a control bar on hover (always on touch screens): ‹ ›, the slide number, full screen, and Open ↗ for the whole deck in a new tab. It doesn't take the keyboard until the reader clicks in, and only the reader's keys work (navigation, `f`, `o`, `s`, `?`). Where the browser refuses full screen inside the frame, the deck opens in a new tab instead. Readers on other sites can load the frame only when the deck is published for anyone: an organization-only page needs a Google sign-in, which browsers don't send to a frame on another site.
192
+ In embed mode the deck shows a control bar on hover (always on touch screens): ‹ ›, the slide number, full screen, and Open ↗ for the whole deck in a new tab. It doesn't take the keyboard until the reader clicks in, and only the reader's keys work (navigation, `f`, `o`, `s`, `i`, `?`). Where the browser refuses full screen inside the frame, the deck opens in a new tab instead. Readers on other sites can load the frame only when the deck is published for anyone: an organization-only page needs a Google sign-in, which browsers don't send to a frame on another site.
190
193
 
191
194
  ## Updating: `deck update`
192
195
 
package/docs/syntax.md CHANGED
@@ -28,7 +28,7 @@ slides: https://docs.google.com/presentation/d/…/edit # the presentation `de
28
28
  ---
29
29
  ```
30
30
 
31
- `deck: true` is what marks a Markdown file as a deck. `parts:` splits a long deck across files: the parts follow in order, each continuing the slide stream and starting a new slide. Each part is parsed as its own file, so errors, `deck check` findings, and the editor's source lines point into the part.
31
+ `deck: true` is what marks a Markdown file as a deck. `author` and `date` go into the built page's `<meta>` tags (with `description`) and the `i` panel, so a published copy still says who to contact; write them on the title slide too, as `deck new` does, and `deck check` warns when either is missing. `parts:` splits a long deck across files: the parts follow in order, each continuing the slide stream and starting a new slide. Each part is parsed as its own file, so errors, `deck check` findings, and the editor's source lines point into the part.
32
32
 
33
33
  Everything else has one built-in behavior, with no setting: page numbers show on every slide except title and section slides, slides switch instantly with no transition, and slides containing Japanese get `lang="ja"` (Japanese line breaking and a Japanese fallback font), so a mixed Japanese/English deck needs nothing.
34
34
 
@@ -147,7 +147,7 @@ Local videos are inlined into the built page like images, so the deck stays one
147
147
  Attributes on headings, paragraphs, lists, and spans take a fixed vocabulary of classes that every theme styles, so switching themes needs no edits:
148
148
 
149
149
  - Blocks: `{.lead}` `{.small}` `{.muted}` `{.center}` `{.right}` `{.subtitle}` `{.meta}` `{.callout}` `{.note}` `{.warn}`
150
- - Lists: `{.steps}` (below)
150
+ - Lists: `{.steps}`, `{.stats}`, `{.grid}`, `{.timeline}` (below)
151
151
  - Spans: `[key insight]{.hl}`, `[new]{.badge}`, `[old]{.del}`
152
152
  - Inside headings, `*emphasis*` renders in the theme's accent style.
153
153
 
@@ -180,6 +180,35 @@ A list item that opens with an icon shows the icon in place of its bullet. The n
180
180
 
181
181
  `{.steps}` on a bulleted list is a build error.
182
182
 
183
+ ### Stats, grids, and timelines
184
+
185
+ Three more list classes turn a plain list into a designed block, styled by every theme. In each, an item's first **bold** is its headline (the number, title, or date), an `:icon:` before it sits on top (not in a timeline), and the rest of the item is the caption.
186
+
187
+ ```markdown
188
+ - **3.2×** faster builds
189
+ - **126** weekly users
190
+ - **0.4 s** to rebuild a deck
191
+ {.stats}
192
+
193
+ - :lock: **Private** Stays on your machine
194
+ - :zap: **Fast** No round trips
195
+ - :globe: **Shareable** One link
196
+ {.grid}
197
+
198
+ 1. **Oct 2026** First deck
199
+ 2. **Nov 2026** Charts
200
+ 3. **Next** Visual blocks
201
+ {.timeline}
202
+ ```
203
+
204
+ | Class | Draws |
205
+ |---|---|
206
+ | `{.stats}` | One row of tiles, each a big number in the accent over its caption |
207
+ | `{.grid}` | Cards, three across (one for one item, two for two or four, four for seven or more) |
208
+ | `{.timeline}` | The items along a line, each with a dot: the date above the line, the caption below |
209
+
210
+ They go on either kind of list; on anything else they are a build error.
211
+
183
212
  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)).
184
213
 
185
214
  ## Tables
@@ -216,3 +245,74 @@ Fenced code is highlighted at build time for every [highlight.js](https://highli
216
245
  ` ```mermaid ` blocks render as diagrams colored by the theme, and follow light and dark mode. `deck build` draws them ahead of time in headless Chrome with a bundled Mermaid and inlines the SVG, so the page needs no network and a diagram with a syntax error fails the build (without Chrome, they render in the browser from jsDelivr). Nodes are bold, gradient-filled, and shadowed; give one a palette role with `A[Label]:::accent`, `:::dark`, `:::muted`, or `:::light` (the default is the primary gradient).
217
246
 
218
247
  A diagram is as wide as Mermaid draws it, up to its column. ` ```mermaid {w=60%} ` scales it to that width (canvas px or % of the column, larger as well as smaller), centered, and `{h=300}` to that height.
248
+
249
+ ## Charts
250
+
251
+ A ` ```chart ` block draws a chart in the theme's colors (`--deck-series-1` to `6`, with the theme's text, lines, and font), and follows light and dark mode. Like diagrams, `deck build` draws charts ahead of time in headless Chrome with a bundled [ECharts](https://echarts.apache.org/) and inlines the SVG, so the page needs no network (without Chrome, they draw in the browser from jsDelivr). A chart is static on the page: no hover tooltips.
252
+
253
+ ````md
254
+ ```chart
255
+ type: bar
256
+ x: [Q1, Q2, Q3, Q4]
257
+ series:
258
+ Revenue: [12, 18, 25, 35]
259
+ Cost: [8, 9, 11, 12]
260
+ ```
261
+ ````
262
+
263
+ | Key | Meaning |
264
+ |---|---|
265
+ | `type` | `bar`, `line`, `area`, `pie`, `donut`, `scatter`, `funnel`, `gauge`, `radar`, `sankey`, or `treemap`; also `horizontal-bar` and `stacked-bar` (a bar with `horizontal` or `stack`) |
266
+ | `x` | The categories, in order |
267
+ | `series` | Each series by name, with one value per category (`Revenue: [12, 18]`), or one unnamed list (`[12, 18]`). For `scatter`, a list of `[x, y]` points. A `pie`, `donut`, `funnel`, or `treemap` takes one series |
268
+ | `links` | A `sankey`'s flows, each `[from, to, value]` (or `{source, target, value}`) by node name; the nodes are the names it uses |
269
+ | `data` | Instead of `x` and `series`: a `.csv` or `.json` file beside the deck, or a list of rows (`- {month: Jan, revenue: 12}`). The first column is the categories, each other column a series named by its header |
270
+ | `stack` | `true` stacks the series |
271
+ | `horizontal` | `true` lays bars on their side |
272
+ | `labels` | `true` writes each value on its bar or point (pies show labels unless `false`) |
273
+ | `highlight` | One category drawn in the accent, the others muted: the bar the slide is about |
274
+ | `unit`, `prefix` | Around every value on the axis and labels: `prefix: "$"`, `unit: M` reads `$35M` |
275
+ | `min`, `max` | The value axis's range (a gauge's too, 0–100 by default) |
276
+ | `value`, `name` | A `gauge`'s number and its caption |
277
+ | `title`, `legend`, `smooth` | A title above the chart, the legend on or off (shown for more than one series), and straight lines with `smooth: false` |
278
+ | `x_axis_title`, `y_axis_title` | Names under the bottom axis and beside the left one, whichever way the bars lie (`y` is short for `y_axis_title`) |
279
+
280
+ Treasure Work's `render_chart` arguments work as written, in JSON or YAML: `type` (any of its 11 types), `title`, `labels`, `datasets` (`[{label, data, x_data}]`, with `x_data` for scatter), `x_axis_title`, `y_axis_title`, `nodes` and `links` (by node index) for a sankey, and `treemap_data` (`[{name, value}]`) for a treemap. As in Treasure Work, a pie or funnel draws the first dataset. So a chart made in chat goes onto a slide by pasting its arguments into a ` ```chart ` block:
281
+
282
+ ````md
283
+ ```chart
284
+ {"type": "stacked-bar", "title": "Revenue by segment", "labels": ["Q1", "Q2", "Q3"],
285
+ "datasets": [{"label": "Enterprise", "data": [8, 11, 15]}, {"label": "Self-serve", "data": [4, 5, 7]}]}
286
+ ```
287
+ ````
288
+
289
+ A block without `type:`, or with its option under `option:`, is an [ECharts option](https://echarts.apache.org/en/option.html) as is, in YAML or JSON. The theme still colors what the option leaves to it, and any color in it can be a theme token, such as `color: var(--deck-accent)`. An option with a series type ECharts doesn't have fails the build.
290
+
291
+ A chart is its column's width at 16:9, at most 440px tall. ` ```chart {h=300} ` sets its height and `{w=60%}` its width (canvas px or % of the column), centered.
292
+
293
+ ## React components
294
+
295
+ A slide can hold a React component, written the way Treasure Work's `render_react` takes one, so a dashboard made in chat moves onto a slide unchanged: `![Q3 KPIs](kpi.jsx){data=kpi.json}` for a `.jsx` or `.tsx` file beside the deck, or the code itself in a ` ```react ` block.
296
+
297
+ ```jsx
298
+ export default function KPIs({ data }) {
299
+ return (
300
+ <div className="grid grid-cols-3 gap-4">
301
+ {data.kpis.map((k) => (
302
+ <div key={k.label} className="p-4 rounded-lg border border-gray-200 dark:border-gray-700">
303
+ <div className="text-sm text-gray-500">{k.label}</div>
304
+ <div className="text-3xl font-bold" style={{ color: palette.accent }}>{k.value}</div>
305
+ </div>
306
+ ))}
307
+ </div>
308
+ );
309
+ }
310
+ ```
311
+
312
+ - **One component**, `export default function Name({ data }) { ... }`, in JSX or TSX. Imports are dropped: React's hooks (`useState`, `useEffect`, `useMemo`, …), `React`, and every [Recharts](https://recharts.org/) component (`ResponsiveContainer`, `LineChart`, `Bar`, …) are already in scope.
313
+ - **`data`** is the JSON file named by `data=`. `isDark` and `theme` (`"light"` or `"dark"`) follow the slide's background, and `palette` holds the slide's resolved theme colors: `series` (six), `accent`, `accent2`, `fg`, `muted`, `line`, `card`, `bg`, `ok`, `warn`, and `font`. Use them to match the deck's theme. They are props as well.
314
+ - **Tailwind**: the same subset of utility classes `render_react` ships, with `dark:` variants following the slide. Each component draws in its own shadow root, so these styles never reach the rest of the slide, and the slide's font and text color carry into it.
315
+ - **Size**: the component is as wide as its column (`w=` narrower) and as tall as it draws itself. `h=` fixes its height. `scale=0.8` draws it at 80%, for a dashboard designed for a larger screen. `deck check` reports a component wider than its column or taller than its `h=`.
316
+ - On the page it is live: tooltips and buttons work while presenting, and its charts animate in each time its slide is shown. `deck pdf`, `deck check`, deck index thumbnails, and Google Slides export capture it as drawn, without the animation. A component that doesn't compile fails the build at its slide; one that throws shows its error on the slide, and `deck check` and `deck build` report it.
317
+ - A page with components carries React, Recharts, and the Tailwind classes (about 1.1 MB). A page without any doesn't.
318
+ - The component's file and its data travel in the built page's source, so `deck import` writes them back out.
package/docs/themes.md CHANGED
@@ -58,7 +58,7 @@ A theme sets a few **seed** colors on `.slide` (and again for dark slides): `--d
58
58
  | `--deck-text-scale` (set by the build) | The deck's `text_size:` as a factor (default 1); multiply a text size a theme sets in px by it, as base.css does for each `--deck-scale-*`, so the text follows |
59
59
  | `--deck-col-rule` | Opt-in divider between columns |
60
60
 
61
- A theme must style the four layouts, every semantic class, and the standard Markdown elements (lists, tables, blockquotes, code, images). `:name:` icons and `{.steps}` lists are already styled by base.css from the theme's tokens (accent, chip, on-accent), so a theme only restyles them if it wants to. Beyond that it can do anything CSS allows: generated backgrounds, decorations per layout. Creativity lives in how a theme renders the same four layouts, not in extra layouts, so every deck works under every theme.
61
+ A theme must style the four layouts, every semantic class, and the standard Markdown elements (lists, tables, blockquotes, code, images). `:name:` icons and the list classes (`{.steps}`, `{.stats}`, `{.grid}`, `{.timeline}`) are already styled by base.css from the theme's tokens (accent, chip, card, line, on-accent), so a theme only restyles them if it wants to. Beyond that it can do anything CSS allows: generated backgrounds, decorations per layout. Creativity lives in how a theme renders the same four layouts, not in extra layouts, so every deck works under every theme.
62
62
 
63
63
  ### Slide anatomy (shared by every theme)
64
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treasure-ai/treasure-deck",
3
- "version": "2026.11.5",
3
+ "version": "2026.11.7",
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",
@@ -56,13 +56,20 @@
56
56
  "markdown-it": "^15.0.3",
57
57
  "markdown-it-attrs": "^5.0.1",
58
58
  "markdown-it-bracketed-spans": "^1.0.3",
59
+ "sucrase": "^3.35.1",
59
60
  "vite": "^8.3.3",
60
61
  "yaml": "^2.9.1"
61
62
  },
62
63
  "devDependencies": {
64
+ "@tailwindcss/vite": "^4.3.5",
63
65
  "@types/node": "^26.6.4",
66
+ "echarts": "^6.1.0",
64
67
  "lucide-static": "^1.52.0",
65
68
  "mermaid": "^12.2.0",
69
+ "react": "^19.3.1",
70
+ "react-dom": "^19.3.1",
71
+ "recharts": "^3.10.1",
72
+ "tailwindcss": "^4.3.5",
66
73
  "tsx": "^4.23.15",
67
74
  "typescript": "^7.0.2",
68
75
  "vitest": "^5.0.3"
package/runtime/base.css CHANGED
@@ -151,6 +151,17 @@ body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
151
151
  .slide .diagram svg .node, .slide .diagram svg rect.actor, .slide .diagram svg .note { filter: drop-shadow(0 6px 10px var(--deck-diagram-shadow, rgba(0, 0, 0, .16))) drop-shadow(0 1px 2px var(--deck-diagram-shadow, rgba(0, 0, 0, .16))); }
152
152
  .slide .diagram foreignObject * { font-size: 19px; line-height: 1.5; letter-spacing: normal; margin: 0; padding: 0; text-transform: none; }
153
153
 
154
+ /* ```chart: the column's width (w= narrower) at 16:9, at most 440px tall (h= sets the height); the SVG scales to it. */
155
+ .slide .chart { display: block; width: min(var(--box-w, 100%), 100%); margin: 0 auto .5em; }
156
+ .slide .chart > .chart-plot { width: 100%; aspect-ratio: 16 / 9; max-height: 440px; }
157
+ .slide .chart[style*="--box-h"] > .chart-plot { height: var(--box-h); aspect-ratio: auto; max-height: none; }
158
+ .slide .chart > .chart-plot > svg { display: block; width: 100%; height: 100%; overflow: visible; }
159
+ .slide .chart > .chart-plot[data-error] { aspect-ratio: auto; padding: 12px; border: 1px dashed var(--deck-warn); color: var(--deck-warn); font-size: 16px; }
160
+ /* React components (![](kpi.jsx), ```react): the column's width (w=), their own height (h= fixes it), drawn at scale=. */
161
+ .slide .component { display: block; position: relative; width: min(var(--box-w, 100%), 100%); margin: 0 auto .5em; zoom: var(--box-scale, 1); }
162
+ .slide .component[style*="--box-h"] { height: var(--box-h); }
163
+ .slide .component > script { display: none; }
164
+
154
165
  /* Text over a background image: light with a soft shadow in every theme (overrides theme colors and gradient text). */
155
166
  .slide.has-bg .slide-body :is(h1, h2, h3, h4, p, li, td, th, strong, em, a, blockquote, .eyebrow, .eyebrow-num, .eyebrow-title, .hl) {
156
167
  color: #fff !important; -webkit-text-fill-color: #fff; background-image: none !important; text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
@@ -207,6 +218,63 @@ body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
207
218
  /* .deck outranks a theme's `.slide strong` color, so the label keeps the step's on-accent color. */
208
219
  .deck .slide ol.steps > li > strong { color: inherit; }
209
220
 
221
+ /* Visual blocks: `{.stats}`, `{.grid}`, `{.timeline}` on a list. An item's first `**bold**` is its headline (the number,
222
+ title, or date), a leading `:icon:` its icon, and the rest its caption. `.deck .slide .slide-body` outranks the
223
+ themes' bullet and strong rules, so every theme gets the same structure in its own colors and fonts. A loose list
224
+ (blank lines between items) wraps each item in a <p>, so the rules match the item and its first paragraph. */
225
+ /* [class] outranks the icon-list rule's padding (`ul:has(> li > .icon:first-child)`). */
226
+ .deck .slide .slide-body :is(ul, ol):is(.stats, .grid, .timeline)[class] { list-style: none; padding: 0; margin: .3em 0 .7em; }
227
+ .deck .slide .slide-body :is(.stats, .grid, .timeline) > li { position: relative; margin: 0; list-style: none; }
228
+ /* [class] on the list outranks the themes' and the icon list's `li::before` bullets, here and for the timeline's dot. */
229
+ .deck .slide .slide-body :is(.stats, .grid)[class] > li::before { content: none; }
230
+ .deck .slide .slide-body :is(.stats, .grid, .timeline) > li > p { margin: 0; }
231
+ .deck .slide .slide-body :is(.stats, .grid, .timeline) > li > p + p { margin-top: .35em; }
232
+ .deck .slide .slide-body :is(.stats, .grid) > li :is(ul, ol) { margin: .3em 0 0; padding-left: 1.1em; font-size: .95em; }
233
+ .deck .slide .slide-body :is(:is(.stats, .grid, .timeline) > li, :is(.stats, .grid, .timeline) > li > p:first-child) > .icon:first-child { position: static; display: block; color: var(--deck-accent); }
234
+
235
+ /* Stats: one row of big-number tiles. */
236
+ .deck .slide .slide-body .stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 20px; }
237
+ .deck .slide .slide-body .stats > li {
238
+ padding: .7em .9em .8em; border-top: 4px solid var(--deck-accent); border-radius: 0 0 var(--deck-radius) var(--deck-radius);
239
+ background: var(--deck-card); color: var(--deck-fg-muted); font-size: .85em; line-height: 1.3;
240
+ }
241
+ .deck .slide .slide-body :is(.stats > li, .stats > li > p:first-child) > .icon:first-child { width: 1.4em; height: 1.4em; margin-bottom: .3em; }
242
+ .deck .slide .slide-body :is(.stats > li, .stats > li > p:first-child) > strong:first-of-type {
243
+ display: block; margin-bottom: .1em; font-family: var(--deck-font-display); font-size: 2.6em; font-weight: 700; line-height: 1.05;
244
+ letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--deck-accent); white-space: nowrap;
245
+ }
246
+
247
+ /* Grid: cards in rows of three (one for one item, two for two or four, four for seven or more). */
248
+ .deck .slide .slide-body .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
249
+ .deck .slide .slide-body .grid:has(> li:only-child) { grid-template-columns: 1fr; }
250
+ .deck .slide .slide-body .grid:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(4):last-child)) { grid-template-columns: repeat(2, 1fr); }
251
+ .deck .slide .slide-body .grid:has(> li:nth-child(7)) { grid-template-columns: repeat(4, 1fr); }
252
+ .deck .slide .slide-body .grid > li {
253
+ padding: .75em .9em; border: 1px solid var(--deck-line); border-radius: var(--deck-radius); background: var(--deck-card);
254
+ color: var(--deck-fg-muted); font-size: .8em; line-height: 1.35;
255
+ }
256
+ .deck .slide .slide-body :is(.grid > li, .grid > li > p:first-child) > .icon:first-child { width: 1.5em; height: 1.5em; margin-bottom: .45em; }
257
+ .deck .slide .slide-body :is(.grid > li, .grid > li > p:first-child) > strong:first-of-type {
258
+ display: block; margin-bottom: .2em; font-family: var(--deck-font-display); font-size: 1.15em; font-weight: 700; color: var(--deck-strong);
259
+ }
260
+
261
+ /* Timeline: a line across the column with a dot per item; the date (bold) above the line, the caption below. */
262
+ .deck .slide .slide-body .timeline { display: flex; --tl-line: 2.6em; }
263
+ .deck .slide .slide-body .timeline > li { flex: 1; min-width: 0; padding: 0 1em 0 0; color: var(--deck-fg-muted); font-size: .8em; line-height: 1.35; }
264
+ .deck .slide .slide-body :is(.timeline > li, .timeline > li > p:first-child) > strong:first-of-type {
265
+ display: block; height: 1.3em; margin-bottom: 1.9em; font-family: var(--deck-font-display); font-size: 1.25em; font-weight: 700;
266
+ line-height: 1.3; color: var(--deck-accent); white-space: nowrap;
267
+ }
268
+ .deck .slide .slide-body :is(.timeline > li, .timeline > li > p:first-child) > .icon:first-child { display: none; }
269
+ /* The line, through every item's dot, fading out after the last. */
270
+ .deck .slide .slide-body .timeline > li::after { content: ''; position: absolute; left: 0; right: 0; top: var(--tl-line); height: 2px; margin-top: -1px; background: var(--deck-line); }
271
+ .deck .slide .slide-body .timeline > li:last-child::after { background: linear-gradient(90deg, var(--deck-line), transparent); }
272
+ /* The dot: an accent disc ringed in the background color, over the line. Every property a theme's bullet sets is reset. */
273
+ .deck .slide .slide-body .timeline[class] > li::before {
274
+ content: ''; position: absolute; z-index: 1; left: 0; top: var(--tl-line); width: .8em; height: .8em; margin: -.4em 0 0; border: 0;
275
+ border-radius: 50%; background: var(--deck-accent); box-shadow: 0 0 0 .25em var(--deck-bg); transform: none; clip-path: none; mask: none;
276
+ }
277
+
210
278
  /* Image placement */
211
279
  .slide :is(img, video).img-fit, .slide :is(img, video).img-cover { width: 100%; height: 100%; }
212
280
  .slide :is(img, video).img-fit { object-fit: contain; }
@@ -299,6 +367,11 @@ body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
299
367
  .deck-help table { border-collapse: collapse; }
300
368
  .deck-help td { padding: 3px 14px 3px 0; }
301
369
  .deck-help kbd { font: 13px ui-monospace, monospace; background: rgba(255, 255, 255, .14); border-radius: 5px; padding: 1px 6px; }
370
+ .deck-about { left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 24px 28px; min-width: 380px; max-width: 560px; }
371
+ .deck-about table { border-collapse: collapse; }
372
+ .deck-about td { padding: 3px 14px 3px 0; vertical-align: top; line-height: 1.45; }
373
+ .deck-about td:first-child { opacity: .65; white-space: nowrap; }
374
+ .deck-about .deck-about-none { margin: 0; opacity: .75; }
302
375
  .deck-share { right: 20px; bottom: 20px; padding: 20px; width: 320px; display: grid; gap: 8px; }
303
376
  .deck-share .deck-status { min-height: 1.5em; opacity: .75; font-size: 13px; }
304
377
  .deck-notes-panel { left: 20px; right: 20px; bottom: 20px; max-height: 38vh; overflow: auto; padding: 18px 22px; font-size: 18px; }
package/runtime/embed.js CHANGED
@@ -695,7 +695,7 @@
695
695
  // several lines, joined by \n). `html` puts it back as it was shown.
696
696
  function rawTarget(el, given) {
697
697
  if (!/^(P|H[1-6]|LI|TD|TH)$/.test(el.tagName) || el.classList.contains('slide-error-box') ||
698
- el.querySelector('img, video, ul, ol, pre, table, p, .mermaid')) return null;
698
+ el.querySelector('img, video, ul, ol, pre, table, p, .mermaid, .component')) return null;
699
699
  var cell = /^T[DH]$/.test(el.tagName) && el.closest('tr[data-src]');
700
700
  var src = parseSrc((cell || el).getAttribute('data-src'));
701
701
  if (!src) return null;
@@ -1655,11 +1655,12 @@
1655
1655
  // (outermost) list, table, or quote, on the {…} line after it. `reason` says why the menu is off, when it is.
1656
1656
  // What each class does, shown beside it in the Style menu.
1657
1657
  var CLASS_WHAT = { lead: 'Larger, the key point', center: 'Centered', right: 'Right-aligned', muted: 'Quieter color', small: 'Smaller, for sources',
1658
- subtitle: 'Under a title', meta: 'Date or byline', callout: 'Boxed aside', note: 'Side-ruled note', warn: 'Warning box', steps: 'Numbered chevrons' };
1658
+ subtitle: 'Under a title', meta: 'Date or byline', callout: 'Boxed aside', note: 'Side-ruled note', warn: 'Warning box', steps: 'Numbered chevrons',
1659
+ stats: 'Big-number tiles', grid: 'Card grid', timeline: 'Timeline' };
1659
1660
  var STYLE_KINDS = {
1660
1661
  text: { label: 'Style', classes: STYLE_CLASSES },
1661
- UL: { label: 'List style', classes: ['lead', 'small', 'muted', 'callout', 'note', 'warn'] },
1662
- OL: { label: 'List style', classes: ['lead', 'small', 'muted', 'callout', 'note', 'warn', 'steps'] },
1662
+ UL: { label: 'List style', classes: ['lead', 'small', 'muted', 'callout', 'note', 'warn', 'stats', 'grid', 'timeline'] },
1663
+ OL: { label: 'List style', classes: ['lead', 'small', 'muted', 'callout', 'note', 'warn', 'steps', 'stats', 'grid', 'timeline'] },
1663
1664
  BLOCKQUOTE: { label: 'Quote style', classes: ['lead', 'small', 'muted', 'center', 'right'] },
1664
1665
  TABLE: { label: 'Table style', classes: ['lead', 'small', 'muted'] },
1665
1666
  };
@@ -2739,6 +2740,8 @@
2739
2740
  i++;
2740
2741
  } else return;
2741
2742
  thumbs.appendChild(b);
2743
+ // A copy has no shadow roots: its components mount again (the runtime's, with the copy's colors).
2744
+ if (window.deckMountComponents && b.querySelector('.component')) window.deckMountComponents(b);
2742
2745
  });
2743
2746
  thumbs.scrollLeft = keep;
2744
2747
  markThumb();
@@ -3157,7 +3160,7 @@
3157
3160
  // Classes show as chips, columns as dividers, notes after each slide's content, and a numbered rule before each
3158
3161
  // slide. Scrolling it picks the slide being read, as in the Markdown view. It is drawn again on each rebuild, but not
3159
3162
  // during an edit.
3160
- var STYLE_CHIPS = ['lead', 'center', 'right', 'muted', 'small', 'subtitle', 'meta', 'callout', 'note', 'warn', 'steps', 'hl', 'badge', 'del'];
3163
+ var STYLE_CHIPS = ['lead', 'center', 'right', 'muted', 'small', 'subtitle', 'meta', 'callout', 'note', 'warn', 'steps', 'stats', 'grid', 'timeline', 'hl', 'badge', 'del'];
3161
3164
  var docSlide = -1, docSettle = 0;
3162
3165
  // A slide's `=== col`, `=== row`, and `=== notes` lines (not those inside fenced code), in order.
3163
3166
  var SEPARATOR = /^===\s+([A-Za-z]\w*)(?:\s+\d+(?::\d+)+)?\s*(?:\{.*\})?\s*$/;
@@ -4052,7 +4055,7 @@
4052
4055
  // A block of text, as textLines takes it (paragraphs and list items of several lines too).
4053
4056
  function cuttable(el) {
4054
4057
  var src = parseSrc(el.getAttribute('data-src'));
4055
- return !!src && /^(P|H[1-6]|LI)$/.test(el.tagName) && !el.querySelector('img, video, ul, ol, p, pre, table, .mermaid') &&
4058
+ return !!src && /^(P|H[1-6]|LI)$/.test(el.tagName) && !el.querySelector('img, video, ul, ol, p, pre, table, .mermaid, .component') &&
4056
4059
  (src.start === src.end ? !el.querySelector('br') : /^(P|LI)$/.test(el.tagName));
4057
4060
  }
4058
4061
  function deleteRange(r) {