@honeydeck/honeydeck 0.4.0 → 0.6.0

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 (71) hide show
  1. package/AGENTS.md +4 -4
  2. package/DEVELOPMENT.md +6 -4
  3. package/Readme.md +15 -15
  4. package/SPEC.md +5 -4
  5. package/docs/browser-frame.md +38 -0
  6. package/docs/components.md +16 -57
  7. package/docs/configuration.md +13 -0
  8. package/docs/customization.md +2 -0
  9. package/docs/deeper-dive.md +32 -7
  10. package/docs/getting-started.md +4 -2
  11. package/docs/index.json +258 -0
  12. package/docs/keyboard.md +35 -0
  13. package/docs/list-style.md +53 -0
  14. package/docs/local-development.md +3 -1
  15. package/docs/mermaid.md +2 -0
  16. package/docs/mobile.md +2 -0
  17. package/docs/navigation.md +3 -1
  18. package/docs/notes.md +40 -0
  19. package/docs/pdf-export.md +6 -2
  20. package/docs/presenter-mode.md +8 -3
  21. package/docs/reveal-group.md +60 -0
  22. package/docs/reveal-with.md +39 -0
  23. package/docs/reveal.md +35 -0
  24. package/docs/skills.md +5 -3
  25. package/docs/slides.md +2 -0
  26. package/docs/slidev-migration.md +5 -0
  27. package/docs/steps-and-reveals.md +145 -8
  28. package/docs/timeline-steps.md +50 -0
  29. package/package.json +6 -2
  30. package/skills/SPEC.md +6 -6
  31. package/skills/honeydeck/SKILL.md +9 -9
  32. package/skills/slidev-migration/SKILL.md +7 -6
  33. package/src/SPEC.md +8 -3
  34. package/src/cli/SPEC.md +3 -2
  35. package/src/cli/pdf.ts +11 -4
  36. package/src/remark/SPEC.md +102 -2
  37. package/src/remark/code-utils.ts +151 -0
  38. package/src/remark/shiki-code-blocks.ts +329 -136
  39. package/src/remark/step-numbering.ts +408 -103
  40. package/src/runtime/Deck.tsx +133 -116
  41. package/src/runtime/EffectiveColorModeContext.tsx +37 -0
  42. package/src/runtime/SPEC.md +21 -8
  43. package/src/runtime/SlideCanvas.tsx +19 -16
  44. package/src/runtime/SlideScaleContext.tsx +23 -0
  45. package/src/runtime/components/CodeBlock.tsx +19 -202
  46. package/src/runtime/components/CodeBlockCopyButton.tsx +64 -0
  47. package/src/runtime/components/CodeBlockShared.ts +17 -0
  48. package/src/runtime/components/Fade.tsx +51 -0
  49. package/src/runtime/components/FadeGroup.tsx +175 -0
  50. package/src/runtime/components/FadeWith.tsx +54 -0
  51. package/src/runtime/components/MagicCodeBlock.tsx +223 -0
  52. package/src/runtime/components/NavBar.tsx +1 -1
  53. package/src/runtime/components/NormalCodeBlock.tsx +128 -0
  54. package/src/runtime/components/Reveal.tsx +27 -27
  55. package/src/runtime/components/RevealGroup.tsx +143 -41
  56. package/src/runtime/components/RevealWith.tsx +63 -0
  57. package/src/runtime/components/SPEC.md +115 -10
  58. package/src/runtime/components/TimelineReveal.tsx +81 -0
  59. package/src/runtime/components/index.ts +13 -5
  60. package/src/runtime/components/timelineVisibility.ts +45 -0
  61. package/src/runtime/index.ts +9 -1
  62. package/src/runtime/navigation.ts +6 -4
  63. package/src/runtime/presentationApi.ts +449 -0
  64. package/src/runtime/views/PresenterCastButton.tsx +39 -0
  65. package/src/runtime/views/PresenterView.tsx +21 -4
  66. package/src/runtime/views/SPEC.md +7 -5
  67. package/src/theme/base.css +67 -2
  68. package/src/vite-plugin/SPEC.md +20 -2
  69. package/src/vite-plugin/index.ts +16 -2
  70. package/src/vite-plugin/splitter.ts +1 -0
  71. package/src/vite-plugin/virtual-modules.ts +16 -6
package/AGENTS.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # Honeydeck package guide
2
2
 
3
- This package publishes the scoped public `@honeydeck/honeydeck` npm package. It owns the CLI, runtime, Vite plugin, layouts, themes, bundled skills, canonical package docs, and runtime reference pages.
3
+ This package publishes the scoped public `@honeydeck/honeydeck` npm package. It owns the CLI, runtime, Vite plugin, layouts, themes, bundled skills, and runtime reference pages.
4
4
 
5
5
  ## Rules
6
6
 
7
7
  - Keep public import paths as `@honeydeck/honeydeck/...`.
8
- - `Readme.md` is the compact package README. `docs/getting-started.md` is the canonical first-run guide. Other canonical prose docs live in `docs/*.md`; keep links in MDX form unless referring to user/Slidev source files.
9
- - Built-in runtime reference pages cover project-specific theme tokens, active layouts, and built-in component docs. They do not render package Markdown docs in-deck.
10
- - Package docs, specs, `DEVELOPMENT.md`, and skills must remain included in npm package contents.
8
+ - `Readme.md` is the compact package README and links to the public docs site. Reader-facing docs live in `packages/docs/content/docs`.
9
+ - Built-in runtime reference pages cover project-specific theme tokens, active layouts, and built-in component docs. They do not render public docs in-deck.
10
+ - Specs, `DEVELOPMENT.md`, and skills must remain included in npm package contents.
11
11
  - Use suffixed `lucide-react` icon exports.
12
12
 
13
13
  ## Commands
package/DEVELOPMENT.md CHANGED
@@ -166,12 +166,12 @@ Important implications:
166
166
  - CLI bin points at `./src/cli/index.ts`.
167
167
  - Vite resolves Honeydeck runtime/layout/theme/component exports from source.
168
168
  - Local development and tests use `tsx` to execute TypeScript directly.
169
- - `package.json#files` must include all runtime, docs, spec, development, and skill files needed by installed users and AI agents.
169
+ - `package.json#files` must include all runtime, spec, development, and skill files needed by installed users and AI agents.
170
170
 
171
171
  Published package contents must include:
172
172
 
173
173
  - `src/` for CLI, runtime, layouts, themes, Vite plugin, and assets
174
- - `Readme.md` as the compact package README, `docs/getting-started.md` as the first-run guide, and `docs/*.md` for package docs and marketing-site sync
174
+ - `Readme.md` as the compact package README with links to the public docs site
175
175
  - Root `SPEC.md` plus colocated `SPEC.md` files so AI agents and maintainers can inspect expected behavior from an installed package
176
176
  - `DEVELOPMENT.md` so maintainers can inspect development workflow, internal architecture, testing, and release expectations from an installed package
177
177
  - `skills/` so `honeydeck skill`, `npx skills add <honeydeck-repo-url> --copy`, and explicit `npx skills add <honeydeck-repo-url> --copy --skill <skill-name>` can install Honeydeck agent skills
@@ -211,7 +211,10 @@ honeydeck
211
211
  │ └── bee/ → src/layouts/bee/*
212
212
  └── ./components/
213
213
  ├── . → src/runtime/components/index.ts
214
- └── code-block → src/runtime/components/CodeBlock.tsx
214
+ ├── code-block → src/runtime/components/CodeBlock.tsx
215
+ └── code-block/
216
+ ├── normal → src/runtime/components/NormalCodeBlock.tsx
217
+ └── magic → src/runtime/components/MagicCodeBlock.tsx
215
218
  ```
216
219
 
217
220
  ---
@@ -495,7 +498,6 @@ honeydeck/
495
498
  theme/ Base, clean, and bee CSS theme layers and colocated theme tests
496
499
  defaults.ts Shared defaults such as default deck entry
497
500
  assets.d.ts Static asset type declarations
498
- docs/ Canonical Markdown docs synced into the marketing docs site
499
501
  skills/ Bundled installable agent skills
500
502
  Readme.md Compact package README and documentation index
501
503
  SPEC.md Overview and navigation map for behavior specs
package/Readme.md CHANGED
@@ -14,24 +14,24 @@ npm run dev
14
14
 
15
15
  Open the local URL printed by the dev server, edit `deck.mdx`, and your slides update instantly.
16
16
 
17
- Decks are plain MDX files separated into slides with `---`; see the first deck example in [Getting started](docs/getting-started.md).
17
+ Decks are plain MDX files separated into slides with `---`; see the first deck example in [Getting started](https://honeydeck.dev/docs/getting-started).
18
18
 
19
19
  ## Documentation
20
20
 
21
- - [Getting started](docs/getting-started.md) - first deck, first commands, and the shortest path to presenting
22
- - [Deeper dive](docs/deeper-dive.md) - CLI options, authoring patterns, imports, themes, architecture, and agent skills
23
- - [Slides](docs/slides.md) - separators, multiple files, layouts, and assets
24
- - [Configuration](docs/configuration.md) - deck-level and slide-level frontmatter
25
- - [Steps and reveals](docs/steps-and-reveals.md) - timeline, reveal groups, code steps, and PDF behavior
26
- - [Components](docs/components.md) - core Honeydeck components such as `BrowserFrame` and `Keyboard`
27
- - [Customization](docs/customization.md) - themes, layout sets, Tailwind tokens, custom layouts, and layout demos
28
- - [Navigation](docs/navigation.md) - keyboard, touch, overview mode, and URL state
29
- - [Mobile and touch](docs/mobile.md) - mobile controls, touch gestures, and pinch zoom
30
- - [Presenter mode](docs/presenter-mode.md) - notes, presenter window, sync, and mobile behavior
31
- - [PDF export](docs/pdf-export.md) - options, color modes, and step handling
32
- - [Local development](docs/local-development.md) - running Honeydeck from this repository
33
- - [Skills](docs/skills.md) - optional agent skills for authoring, writing, and migration help
34
- - [Slidev migration](docs/slidev-migration.md) - moving from Slidev with the bundled agent skill
21
+ - [Getting started](https://honeydeck.dev/docs/getting-started) - first deck, first commands, and the shortest path to presenting
22
+ - [Deeper dive](https://honeydeck.dev/docs/deeper-dive) - CLI options, authoring patterns, imports, themes, architecture, and agent skills
23
+ - [Slides](https://honeydeck.dev/docs/slides) - separators, multiple files, layouts, and assets
24
+ - [Configuration](https://honeydeck.dev/docs/configuration) - deck-level and slide-level frontmatter
25
+ - [Steps and reveals](https://honeydeck.dev/docs/steps-and-reveals) - timeline, reveal groups, code steps, Magic Code, and PDF behavior
26
+ - [Components](https://honeydeck.dev/docs/components) - core Honeydeck components such as `Reveal`, `RevealWith`, `BrowserFrame`, and `Keyboard`
27
+ - [Customization](https://honeydeck.dev/docs/customization) - themes, layout sets, Tailwind tokens, custom layouts, and layout demos
28
+ - [Navigation](https://honeydeck.dev/docs/navigation) - keyboard, touch, overview mode, and URL state
29
+ - [Mobile and touch](https://honeydeck.dev/docs/mobile) - mobile controls, touch gestures, and pinch zoom
30
+ - [Presenter mode](https://honeydeck.dev/docs/presenter-mode) - notes, presenter window, sync, and mobile behavior
31
+ - [PDF export](https://honeydeck.dev/docs/pdf-export) - options, color modes, and step handling
32
+ - [Local development](https://honeydeck.dev/docs/local-development) - running Honeydeck from this repository
33
+ - [Skills](https://honeydeck.dev/docs/skills) - optional agent skills for authoring, writing, and migration help
34
+ - [Slidev migration](https://honeydeck.dev/docs/slidev-migration) - moving from Slidev with the bundled agent skill
35
35
 
36
36
  ## Common commands
37
37
 
package/SPEC.md CHANGED
@@ -31,9 +31,9 @@ The Honeydeck specification is distributed:
31
31
  | Runtime | Node.js CLI binary from the scoped `@honeydeck/honeydeck` package | [`src/cli/SPEC.md`](src/cli/SPEC.md) |
32
32
  | Build setup | Honeydeck-managed dev/build setup; no user `vite.config.ts` required | [`src/runtime/SPEC.md`](src/runtime/SPEC.md), [`src/vite-plugin/SPEC.md`](src/vite-plugin/SPEC.md) |
33
33
  | Styling | Explicit CSS imports, Tailwind-compatible utilities, and CSS custom properties | [`src/theme/SPEC.md`](src/theme/SPEC.md) |
34
- | Markdown | MDX with GitHub-flavored Markdown tables; canonical docs use `docs/*.md` | [`src/vite-plugin/SPEC.md`](src/vite-plugin/SPEC.md), [`src/remark/SPEC.md`](src/remark/SPEC.md) |
34
+ | Markdown | MDX with GitHub-flavored Markdown tables; reader-facing docs are authored in `packages/docs/content/docs` and exported into package-local `docs/*.md` files during npm packaging | [`src/vite-plugin/SPEC.md`](src/vite-plugin/SPEC.md), [`src/remark/SPEC.md`](src/remark/SPEC.md) |
35
35
  | PDF | Rasterized slide pages matching browser rendering | [`src/cli/SPEC.md`](src/cli/SPEC.md) |
36
- | Syntax highlighting | Built-in code highlighting with runtime step dimming | [`src/remark/SPEC.md`](src/remark/SPEC.md) |
36
+ | Syntax highlighting | Built-in code highlighting, runtime step dimming, and Magic Code transitions | [`src/remark/SPEC.md`](src/remark/SPEC.md) |
37
37
  | Icons | `lucide-react` suffixed `...Icon` component imports | [`src/SPEC.md`](src/SPEC.md) |
38
38
  | Public imports | Explicit import subpaths for components, layouts, themes, and types | [`src/SPEC.md`](src/SPEC.md) |
39
39
 
@@ -43,6 +43,7 @@ The Honeydeck specification is distributed:
43
43
  - Honeydeck wires the Tailwind Vite plugin internally, but Tailwind/theme CSS is only loaded when user-authored CSS imports it; generated projects install `tailwindcss` and import `./styles.css` from `deck.mdx`.
44
44
  - Generated projects use compatible semver ranges for React, Tailwind, TypeScript, and types.
45
45
  - Custom themes, layouts, and components are plain CSS/TypeScript modules; installed-package usage is handled by standard package metadata rather than by a Honeydeck-specific mechanism.
46
+ - Published packages include generated package-local docs under `docs/*.md` plus `docs/index.json` so bundled agent skills can read version-aligned documentation from `node_modules/@honeydeck/honeydeck/docs`.
46
47
  - Icons come from `lucide-react` and must use suffixed `...Icon` component exports (for example `ChevronLeftIcon`), not inline SVG path helpers, emoji glyphs, or unsuffixed aliases.
47
48
 
48
49
  ---
@@ -55,9 +56,9 @@ The Honeydeck specification is distributed:
55
56
  | Starter templates | [`src/cli/templates/SPEC.md`](src/cli/templates/SPEC.md) | generated project tree, starter `deck.mdx`, `styles.css`, demo component |
56
57
  | Agent skills | [`skills/SPEC.md`](skills/SPEC.md) | bundled installable skills and installer expectations |
57
58
  | Deck loading / frontmatter | [`src/vite-plugin/SPEC.md`](src/vite-plugin/SPEC.md) | deck entry, slide separators, MDX imports, assets, Markdown features, frontmatter |
58
- | Remark transforms | [`src/remark/SPEC.md`](src/remark/SPEC.md) | code highlighting and step-through code metadata |
59
+ | Remark transforms | [`src/remark/SPEC.md`](src/remark/SPEC.md) | timeline annotation, code highlighting, step-through code metadata, and Magic Code syntax |
59
60
  | Runtime | [`src/runtime/SPEC.md`](src/runtime/SPEC.md) | timeline semantics, keyboard/touch navigation, SPA/build behavior, runtime errors |
60
- | Runtime components | [`src/runtime/components/SPEC.md`](src/runtime/components/SPEC.md) | `Reveal`, `RevealGroup`, `TimelineSteps`, `ListStyle`, `Keyboard`, `BrowserFrame`, `Notes` |
61
+ | Runtime components | [`src/runtime/components/SPEC.md`](src/runtime/components/SPEC.md) | `Reveal`, `RevealWith`, `RevealGroup`, `Fade`, `FadeWith`, `FadeGroup`, `TimelineSteps`, `ListStyle`, `Keyboard`, `BrowserFrame`, `Notes` |
61
62
  | Runtime views | [`src/runtime/views/SPEC.md`](src/runtime/views/SPEC.md) | presenter mode, overview mode, theme/layout/component reference pages |
62
63
  | Layouts and customization | [`src/layouts/SPEC.md`](src/layouts/SPEC.md) | custom theme/layout/component model, built-in layouts, layout props, demos, layout resolution |
63
64
  | Theme | [`src/theme/SPEC.md`](src/theme/SPEC.md) | design tokens, base theme CSS, Tailwind mapping, color mode behavior |
@@ -0,0 +1,38 @@
1
+ <!-- Generated from packages/docs/content/docs/(components)/browser-frame.mdx. Do not edit by hand. -->
2
+
3
+ # BrowserFrame
4
+
5
+ Use `<BrowserFrame>` to show a live iframe inside a macOS-style browser window.
6
+
7
+ <BrowserFramePlayground />
8
+
9
+ ```mdx
10
+ import { BrowserFrame } from '@honeydeck/honeydeck'
11
+
12
+ <BrowserFrame
13
+ src="https://example.com"
14
+ addressBar="example.com"
15
+ fallbackImage="/example-fallback-light.png"
16
+ fallbackDarkImage="/example-fallback-dark.png"
17
+ />
18
+ ```
19
+
20
+ The component renders browser chrome with macOS traffic-light controls and an optional address bar. It can show a light or dark fallback screenshot when the iframe cannot be loaded. It uses Honeydeck theme tokens for the frame, border, typography, and iframe surface.
21
+
22
+ ## Props
23
+
24
+ | Prop | Type | Default | Description |
25
+ | --- | --- | --- | --- |
26
+ | `src` | `string` | Required | URL loaded by the iframe. Use an external `https://` URL or a local Vite-served route like `/demo.html`. |
27
+ | `addressBar` | `ReactNode` | — | Optional content shown in the address-bar field. Omit it to hide the input-like address field. |
28
+ | `fallbackImage` | `string` | — | Light/default screenshot shown when iframe loading fails or fallback mode is toggled on. |
29
+ | `fallbackDarkImage` | `string` | — | Dark-mode screenshot shown when fallback mode is active. Falls back to `fallbackImage` when omitted. |
30
+ | `fallbackAlt` | `string` | `Fallback preview` | Accessible alt text for fallback images. |
31
+ | `defaultFallback` | `boolean` | `false` | Starts in fallback mode instead of loading the iframe. Useful for deterministic demos, final-state screenshots, and PDF-friendly decks. |
32
+ | `aspectRatio` | `CSSProperties["aspectRatio"]` | `16 / 9` | Aspect ratio for the full browser window, including chrome. Accepts values such as `16 / 9`, `"4 / 3"`, or `1.6`. |
33
+ | `className` | `string` | — | Additional CSS class for the outer browser frame. |
34
+ | `iframeClassName` | `string` | — | Additional CSS class for the iframe element. Only applies while live iframe content is rendered. |
35
+
36
+ Standard iframe attributes such as `allow`, `sandbox`, `loading`, and `referrerPolicy` are forwarded.
37
+
38
+ When fallback mode is active, the browser frame shows a badge in the top chrome, visually aligned with the address bar. A fourth round control sits beside the macOS traffic-light controls and only becomes visible when the control itself is hovered or keyboard-focused; it toggles fallback mode.
@@ -1,63 +1,22 @@
1
- # Components
2
-
3
- Honeydeck core components are explicit imports from `@honeydeck/honeydeck`. They are also exported from `@honeydeck/honeydeck/components`.
4
-
5
- ```mdx
6
- import { Keyboard } from '@honeydeck/honeydeck'
7
- ```
8
-
9
- ## BrowserFrame
10
-
11
- Use `<BrowserFrame>` to show a live iframe inside a macOS-style browser window.
12
-
13
- ```mdx
14
- import { BrowserFrame } from '@honeydeck/honeydeck'
15
-
16
- <BrowserFrame
17
- src="https://example.com"
18
- addressBar="example.com"
19
- fallbackImage="/example-fallback-light.png"
20
- fallbackDarkImage="/example-fallback-dark.png"
21
- />
22
- ```
23
-
24
- The component renders browser chrome with macOS traffic-light controls and an optional address bar. It can show a light or dark fallback screenshot when the iframe cannot be loaded. It uses Honeydeck theme tokens for the frame, border, typography, and iframe surface.
1
+ <!-- Generated from packages/docs/content/docs/(components)/components.mdx. Do not edit by hand. -->
25
2
 
26
- Props:
27
-
28
- | Prop | Type | Default | Description |
29
- | --- | --- | --- | --- |
30
- | `src` | `string` | Required | URL loaded by the iframe. Use an external `https://` URL or a local Vite-served route like `/demo.html`. |
31
- | `addressBar` | `ReactNode` | — | Optional content shown in the address-bar field. Omit it to hide the input-like address field. |
32
- | `fallbackImage` | `string` | — | Light/default screenshot shown when iframe loading fails or fallback mode is toggled on. |
33
- | `fallbackDarkImage` | `string` | — | Dark-mode screenshot shown when fallback mode is active. Falls back to `fallbackImage` when omitted. |
34
- | `fallbackAlt` | `string` | `Fallback preview` | Accessible alt text for fallback images. |
35
- | `defaultFallback` | `boolean` | `false` | Starts in fallback mode instead of loading the iframe. Useful for deterministic demos, final-state screenshots, and PDF-friendly decks. |
36
- | `aspectRatio` | `CSSProperties["aspectRatio"]` | `16 / 9` | Aspect ratio for the full browser window, including chrome. Accepts values such as `16 / 9`, `"4 / 3"`, or `1.6`. |
37
- | `className` | `string` | — | Additional CSS class for the outer browser frame. |
38
- | `iframeClassName` | `string` | — | Additional CSS class for the iframe element. Only applies while live iframe content is rendered. |
39
-
40
- Standard iframe attributes such as `allow`, `sandbox`, `loading`, and `referrerPolicy` are forwarded.
41
-
42
- When fallback mode is active, the browser frame shows a badge in the top chrome, visually aligned with the address bar. A fourth round control sits beside the macOS traffic-light controls and only becomes visible when the control itself is hovered or keyboard-focused; it toggles fallback mode.
43
-
44
- ## Keyboard
45
-
46
- Use `<Keyboard>` to show one key or a shortcut in slide prose.
47
-
48
- ```mdx
49
- Press <Keyboard>Esc</Keyboard> to close overview.
50
-
51
- Advance with <Keyboard keys="Space" />.
52
-
53
- Open command palette with <Keyboard keys={["Ctrl", "Shift", "P"]} />.
54
- ```
3
+ # Components
55
4
 
56
- `keys` accepts a single value or an ordered array. When `keys` is omitted, `children` is rendered as one key. Array values render one `<kbd>` per key, separated by `+` by default:
5
+ Honeydeck components are explicit MDX imports from `@honeydeck/honeydeck`. Use them when plain Markdown is not enough for timeline control, speaker notes, rich previews, or inline UI.
57
6
 
58
7
  ```mdx
59
- <Keyboard keys={["⌘", "K"]} />
60
- <Keyboard keys={["Ctrl", "Alt", "Delete"]} separator=" " />
8
+ import { Reveal, RevealWith, RevealGroup, TimelineSteps, ListStyle, Keyboard, BrowserFrame, Notes } from '@honeydeck/honeydeck'
61
9
  ```
62
10
 
63
- The component is inline by default, uses Honeydeck theme styling, supports `className`, and does not add timeline steps.
11
+ | Component | Use it for |
12
+ | --- | --- |
13
+ | [`Reveal`](reveal.md) | Show content at a specific slide timeline step. |
14
+ | [`RevealWith`](reveal-with.md) | Show content with an existing reveal or numeric slide step without adding another step. |
15
+ | [`RevealGroup`](reveal-group.md) | Reveal each direct child or list item one after another, with optional nested-list reveals. |
16
+ | [`TimelineSteps`](timeline-steps.md) | Reserve timeline steps for an imported custom React component. |
17
+ | [`ListStyle`](list-style.md) | Style Markdown, HTML, or JSX lists with no markers or custom markers. |
18
+ | [`Keyboard`](keyboard.md) | Render semantic inline keyboard keys and shortcuts. |
19
+ | [`BrowserFrame`](browser-frame.md) | Show a live iframe or fallback screenshot inside browser chrome. |
20
+ | [`Notes`](notes.md) | Add formatted speaker notes for presenter mode. |
21
+
22
+ For timeline behavior in context, also see [Steps and reveals](steps-and-reveals.md).
@@ -1,3 +1,5 @@
1
+ <!-- Generated from packages/docs/content/docs/(core)/configuration.mdx. Do not edit by hand. -->
2
+
1
3
  # Configuration
2
4
 
3
5
  All settings live in YAML frontmatter — no separate config file.
@@ -15,6 +17,7 @@ Defined in the first frontmatter block of the deck entry file (before any slide
15
17
  | `pdfColorMode` | `"light" \| "dark"` | unset | Optional PDF color mode; when unset, falls back to pinned `colorMode`, then `light` |
16
18
  | `pdfSteps` | `"final" \| "all"` | `"final"` | PDF includes all steps or final state |
17
19
  | `transition` | `boolean` | `true` | Enable crossfade between slides |
20
+ | `magicCodeDuration` | `number` | `800` | Default Magic Code animation duration in milliseconds |
18
21
  | `layouts` | `string` | `""` (built-in) | Layout map module path |
19
22
  | `defaultLayout` | `string` | `"Default"` | Layout used when slide has no `layout:` |
20
23
  | `showSlideNumbers` | `boolean` | `false` | Show the current slide number in the bottom-right corner of slides |
@@ -50,6 +53,16 @@ transition: true # default
50
53
  transition: false # disable
51
54
  ```
52
55
 
56
+ ### Magic Code Duration
57
+
58
+ Magic Code animations default to 800ms. Set a deck-wide default with `magicCodeDuration`:
59
+
60
+ ```yaml
61
+ magicCodeDuration: 500
62
+ ```
63
+
64
+ A Magic Code block can override this locally with `{duration:500}`. Slide-level frontmatter does not configure Magic Code; the same key in slide frontmatter is treated as a layout prop.
65
+
53
66
  ## Slide-Level Settings
54
67
 
55
68
  Per-slide frontmatter (after `---`):
@@ -1,3 +1,5 @@
1
+ <!-- Generated from packages/docs/content/docs/(core)/customization.mdx. Do not edit by hand. -->
2
+
1
3
  # Customization
2
4
 
3
5
  Honeydeck starts with built-in layouts and a small base theme. Customize only what you need: CSS tokens, React components, or a layout map.
@@ -1,3 +1,5 @@
1
+ <!-- Generated from packages/docs/content/docs/(start)/deeper-dive.mdx. Do not edit by hand. -->
2
+
1
3
  # Diving deeper
2
4
 
3
5
  Use this guide after the quick start when you want to understand the main Honeydeck workflows without jumping straight into every reference page.
@@ -128,7 +130,7 @@ For the full reference, see [Configuration](configuration.md).
128
130
  Core runtime components are explicit imports from `honeydeck`.
129
131
 
130
132
  ```mdx
131
- import { Reveal, RevealGroup, TimelineSteps, BrowserFrame, Notes } from '@honeydeck/honeydeck'
133
+ import { Reveal, RevealWith, RevealGroup, TimelineSteps, BrowserFrame, Notes } from '@honeydeck/honeydeck'
132
134
  ```
133
135
 
134
136
  ### Reveal steps
@@ -136,11 +138,18 @@ import { Reveal, RevealGroup, TimelineSteps, BrowserFrame, Notes } from '@honeyd
136
138
  `<Reveal>` reveals content at the next timeline step. Hidden content keeps its layout space so the slide does not jump.
137
139
 
138
140
  ```mdx
139
- <Reveal>Appears at step 1</Reveal>
141
+ <Reveal name="first">Appears at step 1</Reveal>
140
142
  <Reveal>Appears at step 2</Reveal>
141
143
  ```
142
144
 
143
- `<RevealGroup>` wraps each direct child in a reveal step. Markdown and HTML lists are special: each list item reveals one after another.
145
+ `<RevealWith>` syncs extra content to an existing step without adding a step:
146
+
147
+ ```mdx
148
+ <RevealWith target="first">Appears with step 1</RevealWith>
149
+ <RevealWith at={2}>Appears with step 2</RevealWith>
150
+ ```
151
+
152
+ `<RevealGroup>` wraps each direct child in a reveal step. Markdown and HTML lists are special: each top-level list item reveals one after another. Use `listRevealMode="nested"` to reveal nested list items depth-first.
144
153
 
145
154
  ```mdx
146
155
  <RevealGroup>
@@ -202,6 +211,22 @@ console.log(b)
202
211
  - `{2-3|5|all}` starts with lines 2-3 active, then steps to line 5, then all lines.
203
212
  - Highlight groups after the first interleave with `<Reveal>` in document order.
204
213
 
214
+ Magic Code animates between multiple code states. It builds on Shiki Magic Code / Shiki Magic Move while keeping Honeydeck's build-time highlighting and timeline behavior:
215
+
216
+ `````mdx
217
+ ````md magic-code {duration:500}
218
+ ```ts
219
+ const count = 1
220
+ ```
221
+
222
+ ```ts
223
+ const count = 2
224
+ ```
225
+ ````
226
+ `````
227
+
228
+ Each inner code fence is a state. Inner code fence line metadata still works, so Honeydeck advances through a state's highlight groups before morphing to the next code state. Content inside a Magic Code block that is not a fenced code block is ignored. `md magic-move` is accepted as a Slidev compatibility alias, but Honeydeck docs and examples use `md magic-code`.
229
+
205
230
  ## Navigation, presenting, and PDF
206
231
 
207
232
  Keyboard shortcuts:
@@ -213,7 +238,7 @@ Keyboard shortcuts:
213
238
  | `down` / `s` | Next slide |
214
239
  | `up` / `w` | Previous slide |
215
240
  | `o` | Toggle overview mode |
216
- | `p` | Open presenter mode |
241
+ | `p` | Open presenter mode in the current tab |
217
242
  | `f` | Toggle fullscreen |
218
243
  | `Escape` | Exit overview or fullscreen |
219
244
 
@@ -236,7 +261,7 @@ Presenter mode opens with `p` and includes:
236
261
  - speaker notes from `<Notes>`
237
262
  - slide/step counter and wall clock
238
263
  - an "Open audience view" button
239
- - audience sync through `BroadcastChannel`
264
+ - audience sync through `BroadcastChannel`, with Presentation API casting when supported
240
265
 
241
266
  See [Navigation](navigation.md), [Mobile and touch](mobile.md), [Presenter mode](presenter-mode.md), and [PDF export](pdf-export.md).
242
267
 
@@ -328,7 +353,7 @@ Package Markdown guides live on the Honeydeck docs site and in the package `docs
328
353
  | Layouts | Runtime dynamic import of the layout map |
329
354
  | Tailwind | v4 CSS-first; Honeydeck adds the Vite plugin internally |
330
355
  | Shiki | Dual-theme CSS variables with build-time highlighting |
331
- | Presenter sync | `BroadcastChannel`, unidirectional, no server needed |
356
+ | Presenter sync | `BroadcastChannel` fallback + Presentation API casting, no server needed |
332
357
  | Scaling | `transform: scale()` from the configured aspect ratio |
333
358
  | Build | `tsc` only, ESM, no bundler |
334
359
  | Testing | `node:test` plus fixture files |
@@ -336,7 +361,7 @@ Package Markdown guides live on the Honeydeck docs site and in the package `docs
336
361
  ## Types and exports
337
362
 
338
363
  ```ts
339
- import { Reveal, RevealGroup, Notes } from '@honeydeck/honeydeck'
364
+ import { Reveal, RevealWith, RevealGroup, Notes } from '@honeydeck/honeydeck'
340
365
  import type { LayoutProps, LayoutMap, LayoutDemo } from '@honeydeck/honeydeck/types'
341
366
 
342
367
  import defaultLayouts from '@honeydeck/honeydeck/layouts'
@@ -1,3 +1,5 @@
1
+ <!-- Generated from packages/docs/content/docs/(start)/getting-started.mdx. Do not edit by hand. -->
2
+
1
3
  # Getting started
2
4
 
3
5
  Honeydeck helps you create polished, interactive presentations using MDX. Write slides in Markdown, use different Layout, add React components when you need them, present using presenter mode, and export to PDF for easy sharing.
@@ -70,7 +72,7 @@ Use `layout:` to choose a slide layout. Built-in layouts include `Blank`, `Defau
70
72
  - Vite dev/build with hot reload
71
73
  - Built-in layouts and theme tokens
72
74
  - Tailwind v4-friendly styling
73
- - Reveal steps and code step-through
75
+ - Reveal steps, code step-through, and Magic Code transitions
74
76
  - Presenter mode with speaker notes
75
77
  - Overview mode, keyboard/touch navigation, and URL state
76
78
  - PDF export through headless Chromium
@@ -102,7 +104,7 @@ honeydeck skill # install optional Honeydeck agent skills
102
104
  - [Slides](slides.md) - separators, multiple files, layouts, and assets
103
105
  - [Configuration](configuration.md) - deck-level and slide-level frontmatter
104
106
  - [Steps and reveals](steps-and-reveals.md) - timeline, reveal groups, code steps, and PDF behavior
105
- - [Components](components.md) - core Honeydeck components such as `BrowserFrame` and `Keyboard`
107
+ - [Components](components.md) - core Honeydeck components such as `Reveal`, `RevealWith`, `TimelineSteps`, `BrowserFrame`, and `Keyboard`
106
108
  - [Customization](customization.md) - themes, layout sets, Tailwind tokens, custom layouts, and layout demos
107
109
  - [Navigation](navigation.md) - keyboard, touch, overview mode, and URL state
108
110
  - [Mobile and touch](mobile.md) - mobile controls, touch gestures, and pinch zoom