@atom63/slides 0.3.0 → 0.4.1

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/README.md CHANGED
@@ -1,13 +1,33 @@
1
1
  # @atom63/slides
2
2
 
3
- A host-agnostic **MDX slide presentation engine**write decks in MDX against an opinionated **template grammar**, and re-theme them with CSS custom-property **tokens**. The same engine powers the Slides app in [OS63](https://os.atom63.io) and runs standalone anywhere React + Vite + Tailwind v4 do.
3
+ **Write presentations as MDXand let a coding agent draft them.**
4
+
5
+ A deck is a `.mdx` file: `---`-separated slides built from ~20 templates. Describe your talk to your coding agent; it writes the MDX. Then steer it in the browser — edit any slide as a form, switch its template, restyle with a one-line theme. The MDX stays the source of truth the whole way.
6
+
7
+ The same host-agnostic engine powers the Slides app in [OS63](https://os.atom63.io) and runs standalone anywhere React + Vite + Tailwind v4 do.
8
+
9
+ ### The workflow
10
+
11
+ 1. **Scaffold** — `npm create @atom63/deck my-talk` lays down a standalone deck project.
12
+ 2. **Author with your agent** — point your coding agent at `src/deck.mdx` and the [deck-authoring skill](#author-with-a-coding-agent), describe the talk; it writes the MDX.
13
+ 3. **Steer in the browser** — `npm run dev`, then Edit mode: tune any slide as a Form, switch its template.
14
+ 4. **Theme in one line** — set `theme:` in frontmatter or pick one from the picker.
15
+ 5. **Present** — keyboard nav, grid overview, presenter PiP.
16
+
17
+ Because a deck is just code, the parts machines are good at — layout, alignment, template choice — are an agent's job; the parts you care about — the argument, the words — stay yours.
4
18
 
5
19
  - **Templates, not div soup** — ~20 composable slide templates (`CoverSlide`, `StatBento`, `HeroBento`, `SplitHalf`, `QuoteSlide`, `FullBleedSlide`, …) plus low-level primitives.
6
20
  - **Token theming** — every surface reads `--theme-slide-*` (and base) custom properties; swap a token set to restyle a whole deck.
7
21
  - **Batteries-included player** — keyboard nav, grid overview, presenter PiP, mobile layout, optional source view and password gate.
8
- - **Introspectable** — a machine-readable `templateRegistry` describes every template's content slots (for tooling, editors, and agents).
22
+ - **Introspectable** — a machine-readable `templateRegistry` describes every template's content slots, so coding agents, editors, and tooling know exactly what each slide accepts.
23
+
24
+ > Status: `0.4.x`, extracted from a monorepo. The API may shift before `1.0`.
25
+
26
+ ## Author with a coding agent
27
+
28
+ Step 2 of the workflow is the point of the whole toolchain: **you don't hand-write JSX, you describe the talk.** A deck is plain MDX — `---`-separated slides importing templates from `@atom63/slides` — which is exactly the shape a coding agent (Claude Code, Cursor, …) writes well.
9
29
 
10
- > Status: `0.1.x`, extracted from a monorepo. The API may shift before `1.0`.
30
+ The **[deck-authoring skill](https://github.com/atom63/slides/tree/main/skill)** ([`skill/SKILL.md`](https://github.com/atom63/slides/tree/main/skill/SKILL.md)) packages everything the agent needs: the deck-file anatomy, the full template catalog with every prop and slot, the Swiss-design voice, and the anti-patterns to avoid. Point your agent at it (copy `SKILL.md` + `TEMPLATES.md` into your skills folder, or reference it directly), describe your talk, and it drafts `src/deck.mdx`. Then open the dev server and steer the result — every slide is editable as a Form, every template is swappable, every theme is one line.
11
31
 
12
32
  ## Install
13
33
 
@@ -166,6 +186,40 @@ Key tokens: **base palette** — `--background`, `--foreground`, `--card`, `--mu
166
186
 
167
187
  > Runtime light/dark toggle: import `themes/dark` is a hard swap. For a toggle, copy `dark.css` and re-scope its `:root` to e.g. `[data-slides-theme="dark"]`, then set that attribute on a wrapper.
168
188
 
189
+ ### GUI theme picker and `theme:` frontmatter
190
+
191
+ The `DeckEditor` / `DeckSurface` editor chrome includes a **Theme picker** (Edit → Theme). Selecting a theme writes a `theme:` line into the deck frontmatter; selecting "Default" removes it. The field accepts any of the five built-in names:
192
+
193
+ ```mdx
194
+ ---
195
+ title: "My Talk"
196
+ theme: terminal
197
+ ---
198
+ ```
199
+
200
+ Load the runtime presets once, with a CSS **`@import`** in your Tailwind entry (the same place you import `theme-defaults` and `styles` — a JS import will **not** deliver it):
201
+
202
+ ```css
203
+ @import "tailwindcss";
204
+ @import "@atom63/slides/theme-defaults";
205
+ @import "@atom63/slides/themes"; /* all presets, switched at runtime */
206
+ @import "@atom63/slides/styles";
207
+ ```
208
+
209
+ `DeckSurface` then reads `meta.theme` at runtime and sets `data-slides-theme="<name>"` on the surface wrapper, so the matching `[data-slides-theme]` rule activates — **no build step required**; the deck restyles live as you pick themes in the editor.
210
+
211
+ **Present-only consumer path** — if you embed a bare `<SlidesPlayer>` without `DeckSurface`, keep the same `@import "@atom63/slides/themes"` above and set the attribute on a wrapper around the player yourself:
212
+
213
+ ```tsx
214
+ import { resolveTheme } from "@atom63/slides"
215
+
216
+ <div data-slides-theme={resolveTheme(deck.meta)}>
217
+ <SlidesPlayer deck={deck} onBack={onBack} />
218
+ </div>
219
+ ```
220
+
221
+ The per-theme `:root` imports (`@atom63/slides/themes/dark`, etc.) remain available for a static **build-time hard-swap** where you want a single theme locked in at compile time, without the runtime bundle.
222
+
169
223
  ## Authoring
170
224
 
171
225
  See the reference deck for the full template catalog and slot APIs, and inspect templates programmatically: