@treasure-ai/treasure-deck 2026.11.6 → 2026.11.8
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/dist/build.d.ts +3 -1
- package/dist/build.js +10 -1
- package/dist/build.js.map +1 -1
- package/dist/check.d.ts +6 -0
- package/dist/check.js +33 -0
- package/dist/check.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/render.d.ts +3 -1
- package/dist/render.js +9 -2
- package/dist/render.js.map +1 -1
- package/dist/scaffold.d.ts +2 -0
- package/dist/scaffold.js +4 -2
- package/dist/scaffold.js.map +1 -1
- package/dist/themecheck.d.ts +2 -2
- package/dist/themecheck.js +3 -3
- package/dist/themecheck.js.map +1 -1
- package/docs/commands.md +5 -2
- package/docs/editor.md +1 -1
- package/docs/syntax.md +42 -3
- package/docs/themes.md +12 -9
- package/package.json +1 -1
- package/runtime/base.css +95 -1
- package/runtime/embed.js +7 -6
- package/runtime/runtime.js +29 -7
- package/skills/treasure-deck/SKILL.md +10 -6
- package/templates/specimen/specimen.md +2 -0
- package/templates/theme/theme.css +0 -1
- package/themes/default/theme.css +68 -31
- package/themes/default/theme.yaml +1 -1
- package/themes/editorial/theme.css +79 -31
- package/themes/editorial/theme.yaml +1 -1
- package/themes/gold/theme.css +0 -1
- package/themes/pastel/theme.css +0 -1
- package/themes/treasure-ai/theme.css +0 -1
- package/themes/treasure-ai-2026/theme.css +0 -1
- package/themes/wvlet/theme.css +1 -1
package/dist/scaffold.js
CHANGED
|
@@ -48,6 +48,8 @@ export function deckSource(target) {
|
|
|
48
48
|
throw new DeckError(`${target} has no ${path.basename(file)}: pass the deck's .md file`);
|
|
49
49
|
return file;
|
|
50
50
|
}
|
|
51
|
+
/** The author `deck new` writes when it has none (no `--author` and no git `user.name`); `deck check` flags it. */
|
|
52
|
+
export const PLACEHOLDER_AUTHOR = 'Your Name';
|
|
51
53
|
/**
|
|
52
54
|
* Scaffold a deck: `talk.md` writes that file; a folder (`talks/q3-review`, or a path without .md) gets
|
|
53
55
|
* `<folder>/<folder>.md`. Either way an `images/` folder sits next to it. The starter deck shows the house
|
|
@@ -69,8 +71,8 @@ export function newDeck(target, options = {}) {
|
|
|
69
71
|
__TITLE__: title,
|
|
70
72
|
// Frontmatter values are quoted as JSON strings, which YAML reads as is.
|
|
71
73
|
__TITLE_YAML__: JSON.stringify(title),
|
|
72
|
-
__AUTHOR__: options.author ??
|
|
73
|
-
__AUTHOR_YAML__: JSON.stringify(options.author ??
|
|
74
|
+
__AUTHOR__: options.author ?? PLACEHOLDER_AUTHOR,
|
|
75
|
+
__AUTHOR_YAML__: JSON.stringify(options.author ?? PLACEHOLDER_AUTHOR),
|
|
74
76
|
__DATE__: iso,
|
|
75
77
|
__DATE_LONG__: long,
|
|
76
78
|
__THEME__: options.theme ?? 'default',
|
package/dist/scaffold.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../src/scaffold.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACpH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,SAAS,WAAW,CAAC,GAAW;IAC9B,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,GAAG,GAAG,kCAAkC,CAAC,CAAC;AACpH,CAAC;AAED,SAAS,OAAO,CAAC,IAAY,EAAE,IAA8B;IAC3D,aAAa,CAAC,IAA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AAU,YAAY,CAAC,SAAiB;IAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IACnD,MAAM,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/C,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1E,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/themecheck.d.ts
CHANGED
|
@@ -16,9 +16,9 @@ export declare const REQUIRED_TOKENS: string[];
|
|
|
16
16
|
/** Tokens base.css derives on .slide; a theme that sets one on .deck instead is silently overridden. */
|
|
17
17
|
export declare const DERIVED_TOKENS: string[];
|
|
18
18
|
/** Semantic classes every theme styles. Block classes are compared with a plain paragraph, inline ones with their parent;
|
|
19
|
-
* `steps`
|
|
19
|
+
* list classes (`steps`, `stats`, `grid`, `timeline`) are styled by base.css for every theme. */
|
|
20
20
|
export declare const INLINE_CLASSES: readonly string[];
|
|
21
|
-
export declare const BLOCK_CLASSES: ("badge" | "callout" | "center" | "del" | "hl" | "lead" | "meta" | "muted" | "note" | "right" | "small" | "steps" | "subtitle" | "warn")[];
|
|
21
|
+
export declare const BLOCK_CLASSES: ("badge" | "callout" | "center" | "del" | "grid" | "hl" | "lead" | "meta" | "muted" | "note" | "right" | "small" | "stats" | "steps" | "subtitle" | "takeaway" | "timeline" | "warn")[];
|
|
22
22
|
/** WCAG AA: 4.5:1 for text, 3:1 for large text (24px, or 18.66px bold). */
|
|
23
23
|
export declare const AA_TEXT = 4.5;
|
|
24
24
|
export declare const AA_LARGE = 3;
|
package/dist/themecheck.js
CHANGED
|
@@ -4,7 +4,7 @@ import { buildDeck, TEMPLATES_DIR } from './build.js';
|
|
|
4
4
|
import { titleOf } from './check.js';
|
|
5
5
|
import { evaluate, withDeckPage } from './chrome.js';
|
|
6
6
|
import { withRenderers } from './diagrams.js';
|
|
7
|
-
import { SEMANTIC_CLASSES } from './render.js';
|
|
7
|
+
import { LIST_CLASSES, SEMANTIC_CLASSES } from './render.js';
|
|
8
8
|
/** The deck `deck theme check` renders: every layout, semantic class, and standard element. */
|
|
9
9
|
export const SPECIMEN = path.join(TEMPLATES_DIR, 'specimen', 'specimen.md');
|
|
10
10
|
/** Tokens a theme must set: the seed colors (base.css derives the rest), fonts, and the corner radius. */
|
|
@@ -17,9 +17,9 @@ export const DERIVED_TOKENS = [
|
|
|
17
17
|
'--deck-diagram-node-text', '--deck-diagram-line', '--deck-diagram-text', '--deck-diagram-alt', '--deck-diagram-shadow',
|
|
18
18
|
];
|
|
19
19
|
/** Semantic classes every theme styles. Block classes are compared with a plain paragraph, inline ones with their parent;
|
|
20
|
-
* `steps`
|
|
20
|
+
* list classes (`steps`, `stats`, `grid`, `timeline`) are styled by base.css for every theme. */
|
|
21
21
|
export const INLINE_CLASSES = ['hl', 'badge', 'del'];
|
|
22
|
-
export const BLOCK_CLASSES = SEMANTIC_CLASSES.filter((c) => !INLINE_CLASSES.includes(c) && c
|
|
22
|
+
export const BLOCK_CLASSES = SEMANTIC_CLASSES.filter((c) => !INLINE_CLASSES.includes(c) && !LIST_CLASSES.includes(c));
|
|
23
23
|
/** WCAG AA: 4.5:1 for text, 3:1 for large text (24px, or 18.66px bold). */
|
|
24
24
|
export const AA_TEXT = 4.5;
|
|
25
25
|
export const AA_LARGE = 3;
|
package/dist/themecheck.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themecheck.js","sourceRoot":"","sources":["../src/themecheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACtD,O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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/editor.md
CHANGED
|
@@ -78,7 +78,7 @@ Click text to type into it. There is no edit box: you type where the text is. Th
|
|
|
78
78
|
|
|
79
79
|
| Typing in | Styles | Classes | Written as |
|
|
80
80
|
|---|---|---|---|
|
|
81
|
-
| A heading or paragraph | That block | `lead` `center` `right` `muted` `small` `subtitle` `meta` `callout` `note` `warn` | `{.lead}` at the end of its (last) line |
|
|
81
|
+
| A heading or paragraph | That block | `lead` `takeaway` `center` `right` `muted` `small` `subtitle` `meta` `callout` `note` `warn` | `{.lead}` at the end of its (last) line |
|
|
82
82
|
| A list item | The whole list | `lead` `small` `muted` `callout` `note` `warn`, and `steps` on a numbered list | A `{.small}` line right after the list |
|
|
83
83
|
| A paragraph in a quote | The whole quote | `lead` `small` `muted` `center` `right` | A `{.small}` line right under the quote |
|
|
84
84
|
| A table cell | The whole table | `lead` `small` `muted` | A `{.small}` line right after the table |
|
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
|
|
|
@@ -146,11 +146,21 @@ Local videos are inlined into the built page like images, so the deck stays one
|
|
|
146
146
|
|
|
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
|
-
- Blocks: `{.lead}` `{.small}` `{.muted}` `{.center}` `{.right}` `{.subtitle}` `{.meta}` `{.callout}` `{.note}` `{.warn}`
|
|
150
|
-
- Lists: `{.steps}` (below)
|
|
149
|
+
- Blocks: `{.lead}` `{.takeaway}` `{.small}` `{.muted}` `{.center}` `{.right}` `{.subtitle}` `{.meta}` `{.callout}` `{.note}` `{.warn}`
|
|
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
|
|
|
154
|
+
`{.lead}` is the casual sentence that frames a slide, usually right under the title: larger than body text, in an accent-tinted ink on light slides and a soft grey on dark ones, with its `**bold**` words at full contrast. A lead alone on a slide is a statement and is set larger. `{.takeaway}` is the slide's "so what": an outlined box with an arrow, its `**bold**` words in the accent. It stays where you write it (usually after the evidence), at most one per slide or card.
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
Median triage fell from **42 to 19 minutes**.{.lead}
|
|
158
|
+
|
|
159
|
+
- Pilot ran 6 weeks across 3 queues
|
|
160
|
+
|
|
161
|
+
Roll it out to every queue in Q1 — the risk is **measured**.{.takeaway}
|
|
162
|
+
```
|
|
163
|
+
|
|
154
164
|
On a `columns` slide, a `{.subtitle}` paragraph right under the heading joins the slide header, so it spans all the columns (and a first column that opens with `###` is still a card). A trailing `\` breaks a line inside a paragraph or heading; raw HTML such as `<br>` is not allowed.
|
|
155
165
|
|
|
156
166
|
### Icons
|
|
@@ -180,6 +190,35 @@ A list item that opens with an icon shows the icon in place of its bullet. The n
|
|
|
180
190
|
|
|
181
191
|
`{.steps}` on a bulleted list is a build error.
|
|
182
192
|
|
|
193
|
+
### Stats, grids, and timelines
|
|
194
|
+
|
|
195
|
+
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.
|
|
196
|
+
|
|
197
|
+
```markdown
|
|
198
|
+
- **3.2×** faster builds
|
|
199
|
+
- **126** weekly users
|
|
200
|
+
- **0.4 s** to rebuild a deck
|
|
201
|
+
{.stats}
|
|
202
|
+
|
|
203
|
+
- :lock: **Private** Stays on your machine
|
|
204
|
+
- :zap: **Fast** No round trips
|
|
205
|
+
- :globe: **Shareable** One link
|
|
206
|
+
{.grid}
|
|
207
|
+
|
|
208
|
+
1. **Oct 2026** First deck
|
|
209
|
+
2. **Nov 2026** Charts
|
|
210
|
+
3. **Next** Visual blocks
|
|
211
|
+
{.timeline}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
| Class | Draws |
|
|
215
|
+
|---|---|
|
|
216
|
+
| `{.stats}` | One row of tiles, each a big number in the accent over its caption |
|
|
217
|
+
| `{.grid}` | Cards, three across (one for one item, two for two or four, four for seven or more) |
|
|
218
|
+
| `{.timeline}` | The items along a line, each with a dot: the date above the line, the caption below |
|
|
219
|
+
|
|
220
|
+
They go on either kind of list; on anything else they are a build error.
|
|
221
|
+
|
|
183
222
|
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
223
|
|
|
185
224
|
## Tables
|
package/docs/themes.md
CHANGED
|
@@ -50,6 +50,7 @@ A theme sets a few **seed** colors on `.slide` (and again for dark slides): `--d
|
|
|
50
50
|
| Tokens | For |
|
|
51
51
|
|---|---|
|
|
52
52
|
| `--deck-fg-muted`, `--deck-strong`, `--deck-line`, `--deck-card`, `--deck-on-accent`, `--deck-hl`, `--deck-chip` | Derived text, rule, card, and highlight colors |
|
|
53
|
+
| `--deck-lead-color`, `--deck-takeaway-icon` | The `.lead` color (accent ink on light slides, soft grey on dark) and the takeaway's mark (an SVG `url()` used as a mask, or `none`) |
|
|
53
54
|
| `--deck-series-1` … `-6` | Chart series |
|
|
54
55
|
| `--deck-diagram-fill/-fill-2/-node-text/-stroke/-line/-text/-alt/-shadow` | Mermaid diagrams |
|
|
55
56
|
| `--deck-diagram-<role>-fill/-fill-2/-text` for `accent`, `dark`, `muted`, `light` | Diagram nodes with `:::role` |
|
|
@@ -58,7 +59,7 @@ A theme sets a few **seed** colors on `.slide` (and again for dark slides): `--d
|
|
|
58
59
|
| `--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
60
|
| `--deck-col-rule` | Opt-in divider between columns |
|
|
60
61
|
|
|
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}`
|
|
62
|
+
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
63
|
|
|
63
64
|
### Slide anatomy (shared by every theme)
|
|
64
65
|
|
|
@@ -81,21 +82,23 @@ Contrast is measured against the rendered pixels, so gradients, grain, and frost
|
|
|
81
82
|
|
|
82
83
|
**`default` — unbranded** (the theme a deck gets when it names none)
|
|
83
84
|
|
|
84
|
-
-
|
|
85
|
+
- Neutral and bright, lit by an "aurora" of soft accent glows. Light: white `#ffffff` / ink `#1d2129`, soft indigo `#5e6ad2` as the accent and violet `#7654dd` as the second; the two make the accent gradient. Dark: blue-black `#0a0b14` / `#e4e7ed`, with `#8e97f0` and `#b4a6f7`. Everything follows the seeds, so `accent:` recolors the whole deck, gradients and section slides included.
|
|
85
86
|
- 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.
|
|
86
|
-
- Content slides: white with
|
|
87
|
+
- Content slides: white with soft accent glows in the top-right and bottom-left corners. The header is the section in a small chip, the title, and 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 under a gradient header row. Callouts are gradient washes; notes and warnings keep a side rule.
|
|
88
|
+
- Blocks: `{.stats}` tiles are frosted raised panels with big gradient numerals, `{.grid}` cards are raised with each icon in a tinted rounded square, `{.timeline}` runs a gradient line through glowing dots, and the current `{.steps}` step is filled with the gradient.
|
|
87
89
|
- Code: a dark panel on every slide, with GitHub-dark token colors, line numbers, and the language in the corner.
|
|
88
|
-
- Title: big 800-weight type at left, a gradient bar above it, and
|
|
90
|
+
- Title: big 800-weight type at left, a gradient bar above it, and an aurora of glows (the accent, the second color, and two hues beside them) with a dot grid fading in from the right. Section: a full-bleed accent color block lit by glows (its lightness capped so white type always reads) with a large number and the dot grid.
|
|
89
91
|
- Banner: no logo; the footer shows only the deck's `footer:` text and the page number.
|
|
90
92
|
|
|
91
|
-
**`editorial` — unbranded,
|
|
93
|
+
**`editorial` — unbranded, broadsheet-inspired**
|
|
92
94
|
|
|
93
|
-
-
|
|
95
|
+
- Grained paper `#f7f7f4`, black ink, one muted oxblood accent `#8a2b36`, and navy `#1f3a5f` as the second color. Highlights are a yellow marker. Dark: near-black `#121212` with a soft rose `#d98a92`.
|
|
94
96
|
- Playfair Display for headings (`*accent*` words in its italic, in oxblood) over a Source Sans 3 body at 23px, and IBM Plex Mono for code.
|
|
95
|
-
- Rules instead of boxes: a small-caps kicker with an italic section number, and a double rule (heavy over hairline) under each header. Lists use em dashes. Cards sit under a heavy rule like newspaper columns, and tables use booktabs rules with no fills. Blockquotes are italic pull quotes behind a large oxblood quotation mark.
|
|
97
|
+
- Rules instead of boxes: a small-caps kicker with an italic section number, and a double rule (heavy over hairline) under each header. Lists use em dashes. Cards sit under a heavy rule like newspaper columns, and tables use booktabs rules with no fills. Callouts sit between oxblood rules, and a takeaway is a square ink box set in Playfair. Blockquotes are italic pull quotes behind a large oxblood quotation mark.
|
|
98
|
+
- Blocks: `{.stats}` are big numerals between ink rules, divided by hairlines; `{.grid}` items sit under heavy rules like columns; `{.timeline}` runs an ink line through oxblood diamonds with italic dates; `{.steps}` are ruled small-caps tabs, with the current one reversed out of ink.
|
|
96
99
|
- Code: a white sheet with a hairline and an oxblood left edge (a deep sheet on dark slides).
|
|
97
|
-
-
|
|
98
|
-
- Title:
|
|
100
|
+
- Engraving: fine crosshatching fades in from one corner of each slide, and the corner moves from slide to slide (bottom right, top right, bottom left), so consecutive slides read as different pages.
|
|
101
|
+
- Title: a masthead, with a huge 900-weight Playfair headline under a heavy rule band, an italic subtitle under a hairline, and small-caps meta lines. A guilloche rosette (as on a banknote) sits at the right. Section: the page inverts (black on a light deck, paper on a dark one), with a large oxblood italic numeral over a heavy rule and the rosette.
|
|
99
102
|
- Banner: no logo; a small-caps footer and italic page numbers.
|
|
100
103
|
|
|
101
104
|
**`pastel` — unbranded, friendly and warm**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treasure-ai/treasure-deck",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.8",
|
|
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",
|
package/runtime/base.css
CHANGED
|
@@ -193,7 +193,39 @@ body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
|
|
|
193
193
|
/* Semantic classes: structure only; themes add color and type. */
|
|
194
194
|
.slide .center { text-align: center; }
|
|
195
195
|
.slide .right { text-align: right; }
|
|
196
|
-
|
|
196
|
+
/* The lead: a standfirst, the casual sentence that frames a slide. Larger than body but a step down in contrast and
|
|
197
|
+
regular weight, at a reading measure, so it reads as an intro paragraph rather than a second title; its **bold**
|
|
198
|
+
words keep full contrast. Its color (--deck-lead-color) is an accent ink on light slides, and a soft grey on dark
|
|
199
|
+
ones, where the accent ink is too loud. A lead alone on a slide (a statement) or centered keeps full contrast and
|
|
200
|
+
is centered as a block. */
|
|
201
|
+
.slide { --deck-lead-color: color-mix(in oklab, var(--deck-accent) 60%, var(--deck-fg)); }
|
|
202
|
+
.deck[data-mode="dark"] .slide:not([data-mode="light"]), .deck .slide[data-mode="dark"] {
|
|
203
|
+
--deck-lead-color: color-mix(in oklab, var(--deck-fg) 72%, var(--deck-bg));
|
|
204
|
+
}
|
|
205
|
+
.slide .lead {
|
|
206
|
+
font-size: 1.2em; font-weight: 400; line-height: 1.45; letter-spacing: 0; text-wrap: balance; max-width: 52ch;
|
|
207
|
+
color: var(--deck-lead-color);
|
|
208
|
+
}
|
|
209
|
+
.deck .slide .slide-body .lead strong { color: var(--deck-fg); font-weight: 600; }
|
|
210
|
+
.slide .slide-content > .lead:only-child { font-size: 1.6em; line-height: 1.3; max-width: 32ch; color: var(--deck-strong); }
|
|
211
|
+
.slide .lead.center { margin-inline: auto; }
|
|
212
|
+
/* The takeaway: the slide's "so what", in the flow (not pinned). An accent-outlined box with a stroked arrow, unlike a
|
|
213
|
+
callout's side rule or fill, and its **bold** words (the claim) in the accent. A lead stays plain: it is the casual
|
|
214
|
+
sentence under a title. --deck-takeaway-icon (an SVG mask, `none` to drop it) sets the mark; a theme restyles the
|
|
215
|
+
box with `.deck[data-theme="…"] .slide .slide-body .takeaway`, which outranks these. */
|
|
216
|
+
.slide { --deck-takeaway-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E"); }
|
|
217
|
+
.deck .slide .slide-body .takeaway {
|
|
218
|
+
position: relative; margin: .9em 0 .3em; padding: .6em 1em .6em 2.35em; border-radius: 12px;
|
|
219
|
+
border: 1.5px solid color-mix(in oklab, var(--deck-accent) 45%, transparent);
|
|
220
|
+
background: color-mix(in oklab, var(--deck-accent) 6%, transparent);
|
|
221
|
+
color: var(--deck-strong); font-size: 1.15em; font-weight: 600; line-height: 1.35; text-wrap: balance;
|
|
222
|
+
}
|
|
223
|
+
.deck .slide .slide-body .takeaway::before {
|
|
224
|
+
content: ''; position: absolute; left: .85em; top: 50%; width: 1.05em; height: 1.05em; margin-top: -.525em; background: var(--deck-accent);
|
|
225
|
+
-webkit-mask: var(--deck-takeaway-icon) center / contain no-repeat; mask: var(--deck-takeaway-icon) center / contain no-repeat;
|
|
226
|
+
}
|
|
227
|
+
/* `.deck .slide .slide-body` outranks the themes' `.slide strong` color. */
|
|
228
|
+
.deck .slide .slide-body .takeaway strong { color: var(--deck-accent); }
|
|
197
229
|
.slide .small { font-size: .75em; }
|
|
198
230
|
.slide .del { text-decoration: line-through; }
|
|
199
231
|
|
|
@@ -218,6 +250,63 @@ body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
|
|
|
218
250
|
/* .deck outranks a theme's `.slide strong` color, so the label keeps the step's on-accent color. */
|
|
219
251
|
.deck .slide ol.steps > li > strong { color: inherit; }
|
|
220
252
|
|
|
253
|
+
/* Visual blocks: `{.stats}`, `{.grid}`, `{.timeline}` on a list. An item's first `**bold**` is its headline (the number,
|
|
254
|
+
title, or date), a leading `:icon:` its icon, and the rest its caption. `.deck .slide .slide-body` outranks the
|
|
255
|
+
themes' bullet and strong rules, so every theme gets the same structure in its own colors and fonts. A loose list
|
|
256
|
+
(blank lines between items) wraps each item in a <p>, so the rules match the item and its first paragraph. */
|
|
257
|
+
/* [class] outranks the icon-list rule's padding (`ul:has(> li > .icon:first-child)`). */
|
|
258
|
+
.deck .slide .slide-body :is(ul, ol):is(.stats, .grid, .timeline)[class] { list-style: none; padding: 0; margin: .3em 0 .7em; }
|
|
259
|
+
.deck .slide .slide-body :is(.stats, .grid, .timeline) > li { position: relative; margin: 0; list-style: none; }
|
|
260
|
+
/* [class] on the list outranks the themes' and the icon list's `li::before` bullets, here and for the timeline's dot. */
|
|
261
|
+
.deck .slide .slide-body :is(.stats, .grid)[class] > li::before { content: none; }
|
|
262
|
+
.deck .slide .slide-body :is(.stats, .grid, .timeline) > li > p { margin: 0; }
|
|
263
|
+
.deck .slide .slide-body :is(.stats, .grid, .timeline) > li > p + p { margin-top: .35em; }
|
|
264
|
+
.deck .slide .slide-body :is(.stats, .grid) > li :is(ul, ol) { margin: .3em 0 0; padding-left: 1.1em; font-size: .95em; }
|
|
265
|
+
.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); }
|
|
266
|
+
|
|
267
|
+
/* Stats: one row of big-number tiles. */
|
|
268
|
+
.deck .slide .slide-body .stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 20px; }
|
|
269
|
+
.deck .slide .slide-body .stats > li {
|
|
270
|
+
padding: .7em .9em .8em; border-top: 4px solid var(--deck-accent); border-radius: 0 0 var(--deck-radius) var(--deck-radius);
|
|
271
|
+
background: var(--deck-card); color: var(--deck-fg-muted); font-size: .85em; line-height: 1.3;
|
|
272
|
+
}
|
|
273
|
+
.deck .slide .slide-body :is(.stats > li, .stats > li > p:first-child) > .icon:first-child { width: 1.4em; height: 1.4em; margin-bottom: .3em; }
|
|
274
|
+
.deck .slide .slide-body :is(.stats > li, .stats > li > p:first-child) > strong:first-of-type {
|
|
275
|
+
display: block; margin-bottom: .1em; font-family: var(--deck-font-display); font-size: 2.6em; font-weight: 700; line-height: 1.05;
|
|
276
|
+
letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--deck-accent); white-space: nowrap;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* Grid: cards in rows of three (one for one item, two for two or four, four for seven or more). */
|
|
280
|
+
.deck .slide .slide-body .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
|
|
281
|
+
.deck .slide .slide-body .grid:has(> li:only-child) { grid-template-columns: 1fr; }
|
|
282
|
+
.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); }
|
|
283
|
+
.deck .slide .slide-body .grid:has(> li:nth-child(7)) { grid-template-columns: repeat(4, 1fr); }
|
|
284
|
+
.deck .slide .slide-body .grid > li {
|
|
285
|
+
padding: .75em .9em; border: 1px solid var(--deck-line); border-radius: var(--deck-radius); background: var(--deck-card);
|
|
286
|
+
color: var(--deck-fg-muted); font-size: .8em; line-height: 1.35;
|
|
287
|
+
}
|
|
288
|
+
.deck .slide .slide-body :is(.grid > li, .grid > li > p:first-child) > .icon:first-child { width: 1.5em; height: 1.5em; margin-bottom: .45em; }
|
|
289
|
+
.deck .slide .slide-body :is(.grid > li, .grid > li > p:first-child) > strong:first-of-type {
|
|
290
|
+
display: block; margin-bottom: .2em; font-family: var(--deck-font-display); font-size: 1.15em; font-weight: 700; color: var(--deck-strong);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* Timeline: a line across the column with a dot per item; the date (bold) above the line, the caption below. */
|
|
294
|
+
.deck .slide .slide-body .timeline { display: flex; --tl-line: 2.6em; }
|
|
295
|
+
.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; }
|
|
296
|
+
.deck .slide .slide-body :is(.timeline > li, .timeline > li > p:first-child) > strong:first-of-type {
|
|
297
|
+
display: block; height: 1.3em; margin-bottom: 1.9em; font-family: var(--deck-font-display); font-size: 1.25em; font-weight: 700;
|
|
298
|
+
line-height: 1.3; color: var(--deck-accent); white-space: nowrap;
|
|
299
|
+
}
|
|
300
|
+
.deck .slide .slide-body :is(.timeline > li, .timeline > li > p:first-child) > .icon:first-child { display: none; }
|
|
301
|
+
/* The line, through every item's dot, fading out after the last. */
|
|
302
|
+
.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); }
|
|
303
|
+
.deck .slide .slide-body .timeline > li:last-child::after { background: linear-gradient(90deg, var(--deck-line), transparent); }
|
|
304
|
+
/* The dot: an accent disc ringed in the background color, over the line. Every property a theme's bullet sets is reset. */
|
|
305
|
+
.deck .slide .slide-body .timeline[class] > li::before {
|
|
306
|
+
content: ''; position: absolute; z-index: 1; left: 0; top: var(--tl-line); width: .8em; height: .8em; margin: -.4em 0 0; border: 0;
|
|
307
|
+
border-radius: 50%; background: var(--deck-accent); box-shadow: 0 0 0 .25em var(--deck-bg); transform: none; clip-path: none; mask: none;
|
|
308
|
+
}
|
|
309
|
+
|
|
221
310
|
/* Image placement */
|
|
222
311
|
.slide :is(img, video).img-fit, .slide :is(img, video).img-cover { width: 100%; height: 100%; }
|
|
223
312
|
.slide :is(img, video).img-fit { object-fit: contain; }
|
|
@@ -310,6 +399,11 @@ body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
|
|
|
310
399
|
.deck-help table { border-collapse: collapse; }
|
|
311
400
|
.deck-help td { padding: 3px 14px 3px 0; }
|
|
312
401
|
.deck-help kbd { font: 13px ui-monospace, monospace; background: rgba(255, 255, 255, .14); border-radius: 5px; padding: 1px 6px; }
|
|
402
|
+
.deck-about { left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 24px 28px; min-width: 380px; max-width: 560px; }
|
|
403
|
+
.deck-about table { border-collapse: collapse; }
|
|
404
|
+
.deck-about td { padding: 3px 14px 3px 0; vertical-align: top; line-height: 1.45; }
|
|
405
|
+
.deck-about td:first-child { opacity: .65; white-space: nowrap; }
|
|
406
|
+
.deck-about .deck-about-none { margin: 0; opacity: .75; }
|
|
313
407
|
.deck-share { right: 20px; bottom: 20px; padding: 20px; width: 320px; display: grid; gap: 8px; }
|
|
314
408
|
.deck-share .deck-status { min-height: 1.5em; opacity: .75; font-size: 13px; }
|
|
315
409
|
.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
|
@@ -1604,7 +1604,7 @@
|
|
|
1604
1604
|
// to preset widths (25-100% of the column, with a guide) and otherwise writes canvas pixels rounded to 10; an
|
|
1605
1605
|
// image sized by h= alone resizes by h=, snapping to 50px steps. Dragging the image itself pins it where it is
|
|
1606
1606
|
// dropped (at=), and In flow takes it back out.
|
|
1607
|
-
var STYLE_CLASSES = ['lead', 'center', 'right', 'muted', 'small', 'subtitle', 'meta', 'callout', 'note', 'warn'];
|
|
1607
|
+
var STYLE_CLASSES = ['lead', 'takeaway', 'center', 'right', 'muted', 'small', 'subtitle', 'meta', 'callout', 'note', 'warn'];
|
|
1608
1608
|
var ctx = bar.querySelector('.dsb-context');
|
|
1609
1609
|
function showContext(node) {
|
|
1610
1610
|
ctx.innerHTML = '';
|
|
@@ -1654,12 +1654,13 @@
|
|
|
1654
1654
|
// classes in its last line's trailing {…}; a list item, table cell, or a paragraph in a quote styles the whole
|
|
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
|
-
var CLASS_WHAT = { lead: 'Larger, the
|
|
1658
|
-
subtitle: 'Under a title', meta: 'Date or byline', callout: 'Boxed aside', note: 'Side-ruled note', warn: 'Warning box', steps: 'Numbered chevrons'
|
|
1657
|
+
var CLASS_WHAT = { lead: 'Larger, under the title', takeaway: 'Boxed so-what', 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',
|
|
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
|
};
|
|
@@ -3159,7 +3160,7 @@
|
|
|
3159
3160
|
// Classes show as chips, columns as dividers, notes after each slide's content, and a numbered rule before each
|
|
3160
3161
|
// slide. Scrolling it picks the slide being read, as in the Markdown view. It is drawn again on each rebuild, but not
|
|
3161
3162
|
// during an edit.
|
|
3162
|
-
var STYLE_CHIPS = ['lead', 'center', 'right', 'muted', 'small', 'subtitle', 'meta', 'callout', 'note', 'warn', 'steps', 'hl', 'badge', 'del'];
|
|
3163
|
+
var STYLE_CHIPS = ['lead', 'takeaway', 'center', 'right', 'muted', 'small', 'subtitle', 'meta', 'callout', 'note', 'warn', 'steps', 'stats', 'grid', 'timeline', 'hl', 'badge', 'del'];
|
|
3163
3164
|
var docSlide = -1, docSettle = 0;
|
|
3164
3165
|
// A slide's `=== col`, `=== row`, and `=== notes` lines (not those inside fenced code), in order.
|
|
3165
3166
|
var SEPARATOR = /^===\s+([A-Za-z]\w*)(?:\s+\d+(?::\d+)+)?\s*(?:\{.*\})?\s*$/;
|
package/runtime/runtime.js
CHANGED
|
@@ -59,10 +59,30 @@
|
|
|
59
59
|
'<h2>Keyboard shortcuts</h2><table>' +
|
|
60
60
|
[['→ Space PgDn', 'Next slide'], ['← PgUp', 'Previous slide'], ['Home / End', 'First / last'],
|
|
61
61
|
['1 2 … Enter', 'Go to slide'], ['f', 'Full screen'], ['o / Esc', 'Overview'], ['t', 'Table of contents', 1], ['p', 'Speaker notes + timer', 1], ['P', 'Presenter window', 1], ['k / r', 'Pause / reset the timer', 1],
|
|
62
|
-
['b / .', 'Black screen', 1], ['d', 'Light / dark', 1], ['l', 'Laser pointer', 1], ['s', 'Share'], ['?', 'This help']]
|
|
62
|
+
['b / .', 'Black screen', 1], ['d', 'Light / dark', 1], ['l', 'Laser pointer', 1], ['s', 'Share'], ['i', 'About this deck'], ['?', 'This help']]
|
|
63
63
|
.map(function (r) { return '<tr' + (r[2] ? ' class="deck-not-embed"' : '') + '><td><kbd>' + r[0] + '</kbd></td><td>' + r[1] + '</td></tr>'; }).join('') +
|
|
64
64
|
'</table>');
|
|
65
65
|
help.hidden = true;
|
|
66
|
+
// Who wrote the deck and when, from the page's <meta> tags (the frontmatter's author, date, and description), so
|
|
67
|
+
// a reader of a published or embedded copy can find its contact.
|
|
68
|
+
var about = el('div', 'deck-panel deck-about');
|
|
69
|
+
about.hidden = true;
|
|
70
|
+
function renderAbout() {
|
|
71
|
+
var field = function (name) { var m = document.querySelector('meta[name="' + name + '"]'); return m && m.content.trim(); };
|
|
72
|
+
var rows = [['Author', field('author')], ['Date', field('date')], ['About', field('description')]].filter(function (r) { return r[1]; });
|
|
73
|
+
about.textContent = '';
|
|
74
|
+
about.appendChild(el('h2')).textContent = document.title || 'About this deck';
|
|
75
|
+
if (!rows.length) {
|
|
76
|
+
about.appendChild(el('p', 'deck-about-none')).textContent = 'This deck names no author or date. Add author: and date: to its frontmatter.';
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
var table = about.appendChild(el('table'));
|
|
80
|
+
rows.forEach(function (r) {
|
|
81
|
+
var tr = table.appendChild(el('tr'));
|
|
82
|
+
tr.appendChild(el('td')).textContent = r[0];
|
|
83
|
+
tr.appendChild(el('td')).textContent = r[1];
|
|
84
|
+
});
|
|
85
|
+
}
|
|
66
86
|
var share = el('div', 'deck-panel deck-share',
|
|
67
87
|
'<h2>Share</h2>' +
|
|
68
88
|
'<button data-act="link">Copy link to deck</button>' +
|
|
@@ -89,7 +109,7 @@
|
|
|
89
109
|
'<button data-act="fullscreen" aria-label="Full screen">⛶</button>' +
|
|
90
110
|
'<a data-act="open" target="_blank" rel="noopener">Open ↗</a>');
|
|
91
111
|
embedBar.hidden = true;
|
|
92
|
-
[progress, black, laser, gotoBox, help, share, notesPanel, embedBar].forEach(function (e) { deck.appendChild(e); });
|
|
112
|
+
[progress, black, laser, gotoBox, help, about, share, notesPanel, embedBar].forEach(function (e) { deck.appendChild(e); });
|
|
93
113
|
|
|
94
114
|
function fit() {
|
|
95
115
|
if (presenter) { layoutPresenter(); return; }
|
|
@@ -229,10 +249,11 @@
|
|
|
229
249
|
|
|
230
250
|
function toggle(panel) {
|
|
231
251
|
var open = panel.hidden;
|
|
232
|
-
[help, share].forEach(function (p) { if (p !== panel) p.hidden = true; });
|
|
252
|
+
[help, about, share].forEach(function (p) { if (p !== panel) p.hidden = true; });
|
|
233
253
|
panel.hidden = !open;
|
|
234
254
|
if (panel === share) offerOpen();
|
|
235
|
-
if (open) used(panel === share ? 'share' : panel === help ? 'help' : 'notes');
|
|
255
|
+
if (open) used(panel === share ? 'share' : panel === help ? 'help' : panel === about ? 'about' : 'notes');
|
|
256
|
+
if (panel === about) renderAbout();
|
|
236
257
|
if (panel === notesPanel) renderNotes();
|
|
237
258
|
}
|
|
238
259
|
|
|
@@ -241,7 +262,7 @@
|
|
|
241
262
|
var pressed = null;
|
|
242
263
|
document.addEventListener('pointerdown', function (e) { pressed = e.target; }, true);
|
|
243
264
|
document.addEventListener('click', function (e) {
|
|
244
|
-
var open = [help, share].filter(function (p) { return !p.hidden; });
|
|
265
|
+
var open = [help, about, share].filter(function (p) { return !p.hidden; });
|
|
245
266
|
var inside = function (p) { return p.contains(e.target) || (pressed && p.contains(pressed)); };
|
|
246
267
|
if (!open.length || open.some(inside)) return;
|
|
247
268
|
open.forEach(function (p) { p.hidden = true; });
|
|
@@ -410,7 +431,7 @@
|
|
|
410
431
|
document.addEventListener('keydown', function (e) {
|
|
411
432
|
if (e.metaKey || e.ctrlKey || e.altKey) return;
|
|
412
433
|
var k = e.key;
|
|
413
|
-
if (embedded && !/^([0-9]|Enter|Arrow(Left|Right|Up|Down)|Page(Up|Down)|Backspace|Home|End| |f|o|Escape|s|\?)$/.test(k)) return;
|
|
434
|
+
if (embedded && !/^([0-9]|Enter|Arrow(Left|Right|Up|Down)|Page(Up|Down)|Backspace|Home|End| |f|o|Escape|s|i|\?)$/.test(k)) return;
|
|
414
435
|
if (/^[0-9]$/.test(k)) { typeDigit(k); return; }
|
|
415
436
|
if (k === 'Enter' && typed) { show(parseInt(typed, 10) - 1); typed = ''; gotoBox.hidden = true; return; }
|
|
416
437
|
if (deck.classList.contains('is-black') && k !== 'b' && k !== '.') { deck.classList.remove('is-black'); sync({ black: false }); renderPresenter(); return; }
|
|
@@ -422,7 +443,7 @@
|
|
|
422
443
|
case 'f': fullscreen(); break;
|
|
423
444
|
case 'o': deck.classList.toggle('is-overview'); show(current); break;
|
|
424
445
|
case 'Escape':
|
|
425
|
-
if (!help.hidden || !share.hidden) { help.hidden = share.hidden = true; }
|
|
446
|
+
if (!help.hidden || !about.hidden || !share.hidden) { help.hidden = about.hidden = share.hidden = true; }
|
|
426
447
|
else { deck.classList.toggle('is-overview'); show(current); }
|
|
427
448
|
break;
|
|
428
449
|
case 't': deck.classList.toggle('show-toc'); sync({ toc: deck.classList.contains('show-toc') }); if (deck.classList.contains('show-toc')) used('toc'); break;
|
|
@@ -434,6 +455,7 @@
|
|
|
434
455
|
case 'd': setMode(deck.getAttribute('data-mode') === 'dark' ? 'light' : 'dark'); used('mode'); break;
|
|
435
456
|
case 'l': deck.classList.toggle('is-laser'); if (deck.classList.contains('is-laser')) used('laser'); break;
|
|
436
457
|
case 's': toggle(share); break;
|
|
458
|
+
case 'i': toggle(about); break;
|
|
437
459
|
case '?': toggle(help); break;
|
|
438
460
|
default: return;
|
|
439
461
|
}
|
|
@@ -32,7 +32,7 @@ Open the editor as soon as the starter exists, then write the deck while the use
|
|
|
32
32
|
1. **Create the file.** `deck new deck/YYYY-MM-DD-<slug>` writes a starter deck that already builds. Options: `--title`, `--theme` (`default`, `editorial`, `pastel`, `gold`, `treasure-ai`, `treasure-ai-2026`, `wvlet`), `--author` (defaults to git's `user.name`). For an existing deck, read the whole file first and match its style.
|
|
33
33
|
2. **Open the editor immediately.** In Treasure Work, call the `work` server's `deck_editor` with `action: "open"` and the absolute path. Elsewhere, run `deck editor <folder>` in the background. Open it once: it reloads on each save and never overwrites the user's edits.
|
|
34
34
|
3. **Plan the story.** Write the sections and one sentence per slide saying what it proves. Plan one content slide per 1.5–2 minutes of talk, and 3–5 sections for 20 minutes or more.
|
|
35
|
-
4. **Write in small steps.** Replace the starter's slides with the title slide and `--- section` lines first, then add a section or a few slides per edit. Keep the file building after every edit.
|
|
35
|
+
4. **Write in small steps.** Replace the starter's slides with the title slide and `--- section` lines first (keep the author and date lines on the title slide), then add a section or a few slides per edit. Keep the file building after every edit.
|
|
36
36
|
5. **Check.** Run `deck check <folder>` and fix every finding: shorten, split the slide, or switch to columns. Rerun until clean.
|
|
37
37
|
6. **Hand over.** Name anything you were unsure of, such as inferred numbers or images still to supply. Don't call the deck done before the check is clean.
|
|
38
38
|
|
|
@@ -53,7 +53,7 @@ A deck is CommonMark + GFM with the additions below. Anything unknown is a build
|
|
|
53
53
|
|---|---|
|
|
54
54
|
| `deck: true` | Marks the file as a deck (required) |
|
|
55
55
|
| `title` | The page title, or the first heading when unset |
|
|
56
|
-
| `author`, `date` |
|
|
56
|
+
| `author`, `date` | Who to contact and when, after the deck is published: in the page's `<meta>` tags and the `i` panel. Write them on the title slide too, as `deck new` does (the slides don't show them on their own) |
|
|
57
57
|
| `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) |
|
|
58
58
|
| `mode` | `light` or `dark` |
|
|
59
59
|
| `accent` | `"#hex"`, recolors the accent everywhere |
|
|
@@ -140,9 +140,13 @@ Reach for `nowrap` on short label, number, and unit columns that break awkwardly
|
|
|
140
140
|
|
|
141
141
|
### Classes
|
|
142
142
|
|
|
143
|
-
- Blocks: `{.lead}` (the
|
|
143
|
+
- Blocks: `{.lead}` (the casual sentence framing a slide, under its title; alone on a slide it is a statement), `{.takeaway}` (the slide's "so what": an outlined box with an arrow, in place where written), `{.muted}`, `{.small}` (sources, footnotes), `{.center}` and `{.right}` (horizontal alignment only), `{.subtitle}` and `{.meta}` (title slides; under a columns slide's heading, a `{.subtitle}` spans all columns), `{.callout}`, `{.note}`, `{.warn}` (boxed asides).
|
|
144
144
|
- Spans: `[text]{.hl}`, `[new]{.badge}`, `[old]{.del}`.
|
|
145
145
|
- `{.steps}` under a numbered list draws it as a row of chevrons, a progress bar for a procedure; bold the current step (`3. **Folder**`). Repeat it on each step's slide with the next step bold.
|
|
146
|
+
- Three list classes turn a list into a designed block; in each, an item's first `**bold**` is its headline and the rest its caption. Reach for them before a component or a wall of bullets:
|
|
147
|
+
- `{.stats}`: big-number tiles in one row (`- **3.2×** faster builds`). Use it for 2–4 numbers the slide is about.
|
|
148
|
+
- `{.grid}`: cards, three across (two for 2 or 4 items, four for 7+), with an optional leading icon (`- :lock: **Private** Stays on your machine`). Use it for features, principles, or options in place of one `=== col` per card.
|
|
149
|
+
- `{.timeline}`: dates along a line (`1. **Q3 2026** Beta`). Use it for 3–6 milestones; keep each date short.
|
|
146
150
|
- `:name:` is a [Lucide](https://lucide.dev/icons/) icon in the text's color, e.g. `### :shield-check: Read-only`. A card heading or a list item that opens with an icon reads best (in a list it replaces the bullet). Put a space or punctuation before it; a name Lucide doesn't have stays as text, so check the slide.
|
|
147
151
|
- A trailing `\` breaks a line inside a paragraph or heading (raw HTML such as `<br>` is off).
|
|
148
152
|
- Any other class needs a `theme.css` next to the deck, or it is a build error.
|
|
@@ -189,10 +193,10 @@ October 16, 2026{.meta}
|
|
|
189
193
|
- **Strict** — typos fail the build
|
|
190
194
|
- Inline [highlight]{.hl}, [new]{.badge}, and [old]{.del}
|
|
191
195
|
|
|
192
|
-
Key takeaway in one sentence.{.lead}
|
|
193
|
-
|
|
194
196
|
Context the speaker says aloud.{.muted}
|
|
195
197
|
|
|
198
|
+
The so-what, with its **key words** in bold.{.takeaway}
|
|
199
|
+
|
|
196
200
|
=== notes
|
|
197
201
|
Speaker notes run to the end of the slide.
|
|
198
202
|
|
|
@@ -345,7 +349,7 @@ The canvas is 1280×720 with 21–22px body text, so slides hold real content
|
|
|
345
349
|
- **Show the number.** A claim about data ("Q4 revenue grew 40%") gets a chart beside it, not a bullet restating it: the title says the point, the chart is the evidence, and `highlight:` marks the bar the slide is about. A slide of three or four headline numbers is a KPI row (a small component, or `### $42M` cards in columns).
|
|
346
350
|
- **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.
|
|
347
351
|
- **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`.
|
|
348
|
-
-
|
|
352
|
+
- **`.lead` frames, `.takeaway` concludes.** A `.lead` under the title sets up the slide; a `.takeaway` after the evidence says what it means, with the two or three words that carry the claim in `**bold**`. At most one of each per slide (one takeaway per card), and not on every slide: the title already carries the message. `.muted` is for context the speaker will say aloud anyway.
|
|
349
353
|
- **Put the talk track in `=== notes`**, not on the slide: the slide carries the evidence, the notes carry the narration.
|
|
350
354
|
- **Open with a title slide and end with one** (`# *Thank* you`, or the call to action).
|
|
351
355
|
- **Don't add agenda or section-divider slides** unless asked: sections already label every slide, and `t` shows a table of contents.
|