From 44f61284e9448d94d864871b01f4d93d0cf3f438 Mon Sep 17 00:00:00 2001 From: inkko44 Date: Tue, 29 Sep 2026 10:31:17 -0400 Subject: [PATCH 01/14] feat(bolt-slides): remove starter layouts; free-form responsive slides (BOU-2910) Slides are now React components authored per deck in src/slides/ and referenced from deck.json by filename (import.meta.glob registry in src/slide/registry.tsx). The 30-layout catalog (src/layouts, src/components, src/data/layoutProps.ts) and its ~2,400 lines of layout-only CSS are gone. The studio, dock, rail, grid, notes, Present, speaker view, PDF/JSON download and deck.json persistence are unchanged and render component slides through the same SlideView path. SKILL.md, .bolt/prompt and README now describe the deck.json <-> component contract and the shell; the layout menu and styling rules are dropped. The single design constraint is that every slide must be responsive. Co-Authored-By: Claude Fable 5.1 --- bolt-slides/.bolt/prompt | 4 +- bolt-slides/.bolt/skills/slides/SKILL.md | 328 +- bolt-slides/README.md | 57 +- bolt-slides/deck.json | 113 +- bolt-slides/eslint.config.js | 6 +- bolt-slides/src/components/Accordion.tsx | 63 - bolt-slides/src/components/Agenda.tsx | 73 - bolt-slides/src/components/Bento.tsx | 129 - bolt-slides/src/components/BigNumber.tsx | 41 - bolt-slides/src/components/Charts.tsx | 389 -- bolt-slides/src/components/Chat.tsx | 60 - bolt-slides/src/components/CodeWindow.tsx | 100 - bolt-slides/src/components/Comparison.tsx | 93 - bolt-slides/src/components/Contrast.tsx | 111 - bolt-slides/src/components/CountUp.tsx | 84 - bolt-slides/src/components/Cover.tsx | 56 - bolt-slides/src/components/Marquee.tsx | 34 - bolt-slides/src/components/Pricing.tsx | 108 - bolt-slides/src/components/Quote.tsx | 78 - bolt-slides/src/components/Section.tsx | 46 - bolt-slides/src/components/StatGrid.tsx | 71 - bolt-slides/src/components/Steps.tsx | 87 - bolt-slides/src/components/Table.tsx | 104 - bolt-slides/src/components/Tabs.tsx | 83 - bolt-slides/src/components/Team.tsx | 96 - bolt-slides/src/components/Timeline.tsx | 45 - bolt-slides/src/data/layoutProps.ts | 344 -- bolt-slides/src/data/types.ts | 4 +- bolt-slides/src/layouts/blocks.tsx | 385 -- bolt-slides/src/layouts/core.tsx | 218 - bolt-slides/src/layouts/grids.tsx | 499 --- bolt-slides/src/layouts/media.tsx | 525 --- bolt-slides/src/layouts/registry.tsx | 68 - bolt-slides/src/layouts/shared.tsx | 133 - bolt-slides/src/present/PresentApp.tsx | 4 +- bolt-slides/src/slide/SlideView.tsx | 4 +- bolt-slides/src/slide/registry.tsx | 52 + bolt-slides/src/slides/welcome.tsx | 23 + bolt-slides/src/styles/base.css | 4523 +++++---------------- 39 files changed, 1331 insertions(+), 7910 deletions(-) delete mode 100644 bolt-slides/src/components/Accordion.tsx delete mode 100644 bolt-slides/src/components/Agenda.tsx delete mode 100644 bolt-slides/src/components/Bento.tsx delete mode 100644 bolt-slides/src/components/BigNumber.tsx delete mode 100644 bolt-slides/src/components/Charts.tsx delete mode 100644 bolt-slides/src/components/Chat.tsx delete mode 100644 bolt-slides/src/components/CodeWindow.tsx delete mode 100644 bolt-slides/src/components/Comparison.tsx delete mode 100644 bolt-slides/src/components/Contrast.tsx delete mode 100644 bolt-slides/src/components/CountUp.tsx delete mode 100644 bolt-slides/src/components/Cover.tsx delete mode 100644 bolt-slides/src/components/Marquee.tsx delete mode 100644 bolt-slides/src/components/Pricing.tsx delete mode 100644 bolt-slides/src/components/Quote.tsx delete mode 100644 bolt-slides/src/components/Section.tsx delete mode 100644 bolt-slides/src/components/StatGrid.tsx delete mode 100644 bolt-slides/src/components/Steps.tsx delete mode 100644 bolt-slides/src/components/Table.tsx delete mode 100644 bolt-slides/src/components/Tabs.tsx delete mode 100644 bolt-slides/src/components/Team.tsx delete mode 100644 bolt-slides/src/components/Timeline.tsx delete mode 100644 bolt-slides/src/data/layoutProps.ts delete mode 100644 bolt-slides/src/layouts/blocks.tsx delete mode 100644 bolt-slides/src/layouts/core.tsx delete mode 100644 bolt-slides/src/layouts/grids.tsx delete mode 100644 bolt-slides/src/layouts/media.tsx delete mode 100644 bolt-slides/src/layouts/registry.tsx delete mode 100644 bolt-slides/src/layouts/shared.tsx create mode 100644 bolt-slides/src/slide/registry.tsx create mode 100644 bolt-slides/src/slides/welcome.tsx diff --git a/bolt-slides/.bolt/prompt b/bolt-slides/.bolt/prompt index 4772365..7548f03 100644 --- a/bolt-slides/.bolt/prompt +++ b/bolt-slides/.bolt/prompt @@ -1,5 +1,5 @@ -Import project modules with the `@/` path alias, which maps to `src/` (e.g. `@/components/Foo` == `src/components/Foo`), instead of deep relative paths like `../../components/Foo`. +Import project modules with the `@/` path alias, which maps to `src/` (e.g. `@/deck/Slide` == `src/deck/Slide`), instead of deep relative paths like `../../deck/Slide`. This template uses Vite 8. `resolve.tsconfigPaths: true` is a valid built-in Vite option. Preserve it for the `@/` alias; do not claim it is invalid or add the `vite-tsconfig-paths` plugin. -Author decks by writing `deck.json` and `src/styles/tokens.css`. Follow `.bolt/skills/slides/SKILL.md`. Layout `props` match `src/data/layoutProps.ts`. +Author decks by writing one React component per slide in `src/slides/` and listing them in `deck.json` (theme in `src/styles/tokens.css`). Follow `.bolt/skills/slides/SKILL.md`. Every slide must be responsive. diff --git a/bolt-slides/.bolt/skills/slides/SKILL.md b/bolt-slides/.bolt/skills/slides/SKILL.md index 3d1f645..49ab215 100644 --- a/bolt-slides/.bolt/skills/slides/SKILL.md +++ b/bolt-slides/.bolt/skills/slides/SKILL.md @@ -1,82 +1,116 @@ --- name: slides description: >- - Author a premium slide deck in Bolt Slides. Slides live in repo-root - deck.json; the studio lets the user reorder, duplicate, delete, - edit speaker notes, Present, and download PDF/JSON. Use this whenever - the user asks for a deck, a pitch, slides, or a presentation in this - project. + Author a slide deck in Bolt Slides. Each slide is a React component you + write in src/slides/, listed in repo-root deck.json; the studio handles + reorder, duplicate, delete, speaker notes, Present, speaker view and + PDF / JSON download. Use this whenever the user asks for a deck, a + pitch, slides, or a presentation in this project. --- -# Slides — prompt decks into a presentable app - -This repo is a complete slide **studio**. Author content into it. - -- `/` — in the Bolt preview iframe (and local Vite): studio. Side panel - (S) and grid (G) reorder / duplicate / delete; the dock holds notes, - Download (PDF or JSON), Speaker view, and Present. Present opens a new - tab (`/?present=1`); the studio stays put. Grid selection is the - start slide. The published site at `/` is the audience deck (notes - stripped). **P** opens speaker view in a new tab. -- `/?presenter=1` — speaker view (current slide, up next, notes - read-only, timer, note text size). `/present` is the same route. - -**Your job is CONTENT.** A deck is `deck.json`. Write that file (and -`src/styles/tokens.css` when theming). Layout `props` follow -`src/data/layoutProps.ts`. - -## Hard rules - -1. **Write `deck.json` and `src/styles/tokens.css`.** Those are the - authoring files. Colors, fonts, sizes, spacing in a deck request mean - deck `accent` / `font` or `tokens.css` `:root` values. If they want a - studio or engine change, say so and wait. -2. **Author from the user's REAL input.** Topic, brand, facts, numbers. - Never invent a placeholder company for a real subject. Brand given → - derive theme colors/fonts from it (fetch the site or use its known - palette) and say what you used. -3. **One solid accent.** `--accent` is a hex, never a gradient. Use it - sparingly. -4. **`layout` is an exact `LayoutName`.** Pick a camelCase key from - `LAYOUT_NAMES` in `src/data/layoutProps.ts` (`cover`, `bigNumber`, - `statGrid`, …) and put it on the `layout` field. -5. **Homonym keys follow that layout's `*Props` type.** Chart - `kind: "line"` `points` is a pipe string of numbers - (`"12 | 18 | 26"`). Insight takeaways `points` are - `{label, body}[]`. Insight line series is `points_line`. Contrast - bullets are `string[]` on `left.points` / `right.points`. Logos - `items` is one pipe string (`"Acme | Globex"`); every other - layout's `items` is an object array. - -## Step 0 · bootstrap (mandatory, first) - -Read `deck.json`. If `boltSlidesId` is missing or null, set it to a new -uuid (`crypto.randomUUID()` or equivalent) and write the file. Keep -`boltSlidesVersion` at `1`. Then patch content. - -## Workflow - -1. Theme only if needed: `:root` values in `src/styles/tokens.css`. -2. Read `deck.json` so you keep studio-side reorder / duplicate / delete. -3. Patch when they already have slides; replace `slides` only for a new - deck. Keep `boltSlidesId` once it exists. - -`props` follow **Layout props** below; other slide fields follow **Deck JSON**. -`position` is 0-based. Always set `background` on every slide (never omit). -Default: `background` `{"type":"color","color":"var(--bg)"}`, -`animation` `cascade`, `status` `none`, `transition` `null`, `nav` -`null`, `notes` `""`. - -4. Ask the user to look at the studio to see the result: side panel - or grid to reorder / duplicate / delete, notes, Present, Download. - -Read first. Replacing all of `props` drops keys you omit; change one -field by patching that key. Empty `notes` erases what was there. Replace -the `slides` array only when replacing the whole deck. - -## Deck JSON +# Slides — write the slides, the studio does the rest + +This repo is a complete slide **studio**. You author the slides into it. + +- `/` — in the Bolt preview iframe (and local Vite): the studio. Side panel + (S) and grid (G) reorder / duplicate / delete and pick the start slide; + the dock holds speaker notes, Download (PDF or JSON), Speaker view (P) + and Present. Present opens a new tab (`/?present=1`); the studio stays + put. The published site at `/` is the audience deck (notes stripped). +- `/?presenter=1` — speaker view: current slide, up next, notes, timer. + +**Your job is the slides.** Three files matter: + +1. `src/slides/.tsx` — one React component per slide (default + export). Free-form: any markup, inline styles, a `