@honeydeck/honeydeck 0.1.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 (144) hide show
  1. package/AGENTS.md +25 -0
  2. package/DEVELOPMENT.md +522 -0
  3. package/LICENSE +21 -0
  4. package/Readme.md +49 -0
  5. package/SPEC.md +88 -0
  6. package/docs/components.md +63 -0
  7. package/docs/configuration.md +91 -0
  8. package/docs/getting-started.md +116 -0
  9. package/docs/kit-authoring.md +207 -0
  10. package/docs/kits.md +387 -0
  11. package/docs/local-development.md +95 -0
  12. package/docs/mermaid.md +198 -0
  13. package/docs/mobile.md +108 -0
  14. package/docs/navigation.md +93 -0
  15. package/docs/next-steps.md +377 -0
  16. package/docs/pdf-export.md +91 -0
  17. package/docs/presenter-mode.md +104 -0
  18. package/docs/slides.md +130 -0
  19. package/docs/slidev-migration.md +42 -0
  20. package/docs/steps-and-reveals.md +171 -0
  21. package/package.json +134 -0
  22. package/skills/SPEC.md +21 -0
  23. package/skills/honeydeck/SKILL.md +65 -0
  24. package/skills/presentation-writing/SKILL.md +75 -0
  25. package/skills/slidev-migration/SKILL.md +153 -0
  26. package/src/SPEC.md +89 -0
  27. package/src/assets.d.ts +30 -0
  28. package/src/cli/SPEC.md +230 -0
  29. package/src/cli/args.ts +3 -0
  30. package/src/cli/banner.ts +9 -0
  31. package/src/cli/bin.js +5 -0
  32. package/src/cli/build.ts +229 -0
  33. package/src/cli/deck-path.ts +32 -0
  34. package/src/cli/dev.ts +263 -0
  35. package/src/cli/index.ts +126 -0
  36. package/src/cli/init.ts +369 -0
  37. package/src/cli/pdf.ts +923 -0
  38. package/src/cli/skill.ts +75 -0
  39. package/src/cli/templates/SPEC.md +70 -0
  40. package/src/cli/templates/deck-mdx.ts +15 -0
  41. package/src/cli/templates/package-json.ts +36 -0
  42. package/src/cli/templates/sparkle-button.ts +15 -0
  43. package/src/cli/templates/starter/components/SparkleButton.tsx +84 -0
  44. package/src/cli/templates/starter/deck.mdx +153 -0
  45. package/src/cli/templates/starter/styles.css +14 -0
  46. package/src/cli/templates/styles-css.ts +14 -0
  47. package/src/defaults.ts +1 -0
  48. package/src/layouts/ColorModeImage.tsx +55 -0
  49. package/src/layouts/SPEC.md +393 -0
  50. package/src/layouts/SlideFrame.tsx +48 -0
  51. package/src/layouts/bee/Blank.tsx +12 -0
  52. package/src/layouts/bee/Cover.tsx +70 -0
  53. package/src/layouts/bee/Default.tsx +42 -0
  54. package/src/layouts/bee/Image/Image.tsx +151 -0
  55. package/src/layouts/bee/Image/placeholder-dark.webp +0 -0
  56. package/src/layouts/bee/Image/placeholder-vertical-dark.webp +0 -0
  57. package/src/layouts/bee/Image/placeholder-vertical.webp +0 -0
  58. package/src/layouts/bee/Image/placeholder.webp +0 -0
  59. package/src/layouts/bee/ImageLeft.tsx +27 -0
  60. package/src/layouts/bee/ImageRight.tsx +27 -0
  61. package/src/layouts/bee/ImageSide.tsx +107 -0
  62. package/src/layouts/bee/Section.tsx +40 -0
  63. package/src/layouts/bee/TwoCol.tsx +108 -0
  64. package/src/layouts/bee/index.ts +40 -0
  65. package/src/layouts/clean/Blank.tsx +12 -0
  66. package/src/layouts/clean/Cover.tsx +58 -0
  67. package/src/layouts/clean/Default.tsx +33 -0
  68. package/src/layouts/clean/Image/Image.tsx +103 -0
  69. package/src/layouts/clean/ImageLeft.tsx +27 -0
  70. package/src/layouts/clean/ImageRight.tsx +27 -0
  71. package/src/layouts/clean/ImageSide.tsx +113 -0
  72. package/src/layouts/clean/Section.tsx +35 -0
  73. package/src/layouts/clean/TwoCol.tsx +63 -0
  74. package/src/layouts/clean/index.ts +40 -0
  75. package/src/layouts/index.ts +60 -0
  76. package/src/layouts/placeholders.ts +9 -0
  77. package/src/layouts/utils.ts +13 -0
  78. package/src/remark/SPEC.md +49 -0
  79. package/src/remark/h1-extract.ts +124 -0
  80. package/src/remark/index.ts +4 -0
  81. package/src/remark/shiki-code-blocks.ts +325 -0
  82. package/src/remark/step-numbering.ts +412 -0
  83. package/src/runtime/Deck.tsx +533 -0
  84. package/src/runtime/SPEC.md +256 -0
  85. package/src/runtime/SlideCanvas.tsx +95 -0
  86. package/src/runtime/TimelineContext.tsx +122 -0
  87. package/src/runtime/app-shell/index.html +31 -0
  88. package/src/runtime/app-shell/main.tsx +42 -0
  89. package/src/runtime/aspectRatio.ts +34 -0
  90. package/src/runtime/colorMode.ts +23 -0
  91. package/src/runtime/components/BrowserFrame.tsx +233 -0
  92. package/src/runtime/components/Button.tsx +57 -0
  93. package/src/runtime/components/CodeBlock.tsx +210 -0
  94. package/src/runtime/components/ColorModeCycleButton.tsx +59 -0
  95. package/src/runtime/components/ErrorBoundary.tsx +125 -0
  96. package/src/runtime/components/Keyboard.tsx +87 -0
  97. package/src/runtime/components/ListStyle.tsx +203 -0
  98. package/src/runtime/components/NavBar.tsx +223 -0
  99. package/src/runtime/components/NavBarButton.tsx +47 -0
  100. package/src/runtime/components/NavBarDivider.tsx +3 -0
  101. package/src/runtime/components/Notes.tsx +171 -0
  102. package/src/runtime/components/Reveal.tsx +82 -0
  103. package/src/runtime/components/RevealGroup.tsx +193 -0
  104. package/src/runtime/components/SPEC.md +263 -0
  105. package/src/runtime/components/SlideNumberBadge.tsx +11 -0
  106. package/src/runtime/components/TimelineSteps.tsx +115 -0
  107. package/src/runtime/components/index.ts +55 -0
  108. package/src/runtime/index.ts +42 -0
  109. package/src/runtime/inputOwnership.ts +68 -0
  110. package/src/runtime/keyboardTarget.ts +7 -0
  111. package/src/runtime/lastSlideRoute.ts +56 -0
  112. package/src/runtime/navigation.ts +211 -0
  113. package/src/runtime/router.ts +157 -0
  114. package/src/runtime/slideData.ts +137 -0
  115. package/src/runtime/sync.ts +267 -0
  116. package/src/runtime/types.ts +182 -0
  117. package/src/runtime/useKeyboardNav.ts +138 -0
  118. package/src/runtime/useSwipeNav.ts +257 -0
  119. package/src/runtime/views/DocsView.tsx +74 -0
  120. package/src/runtime/views/OverviewView.tsx +386 -0
  121. package/src/runtime/views/PresenterNotesPanel.tsx +76 -0
  122. package/src/runtime/views/PresenterView.tsx +340 -0
  123. package/src/runtime/views/SPEC.md +152 -0
  124. package/src/runtime/views/docs/ComponentsTab.tsx +178 -0
  125. package/src/runtime/views/docs/DocsHeader.tsx +101 -0
  126. package/src/runtime/views/docs/Intro.tsx +20 -0
  127. package/src/runtime/views/docs/LayoutsTab.tsx +324 -0
  128. package/src/runtime/views/docs/ThemeTab.tsx +110 -0
  129. package/src/runtime/views/index.ts +7 -0
  130. package/src/runtime/views/overviewGrid.ts +106 -0
  131. package/src/runtime/views/presenterPreview.ts +27 -0
  132. package/src/runtime/virtual-modules.d.ts +98 -0
  133. package/src/theme/SPEC.md +179 -0
  134. package/src/theme/base.css +623 -0
  135. package/src/theme/bee.css +35 -0
  136. package/src/theme/clean.css +38 -0
  137. package/src/vite-plugin/SPEC.md +114 -0
  138. package/src/vite-plugin/component-doc-crawler.ts +350 -0
  139. package/src/vite-plugin/deck-loader.ts +148 -0
  140. package/src/vite-plugin/index.ts +373 -0
  141. package/src/vite-plugin/layout-demo-crawler.ts +802 -0
  142. package/src/vite-plugin/splitter.ts +353 -0
  143. package/src/vite-plugin/token-manifest.ts +163 -0
  144. package/src/vite-plugin/virtual-modules.ts +587 -0
@@ -0,0 +1,104 @@
1
+ # Presenter Mode
2
+
3
+ ## Overview
4
+
5
+ Presenter mode shows the presenter everything they need while the audience sees only the slides.
6
+
7
+ ## UI Layout
8
+
9
+ ```txt
10
+ ┌──────────────────────────────────────────┐
11
+ │ ┌──────────────────┐ ┌──────────┐ │
12
+ │ │ │ │ │ │
13
+ │ │ Current │ │ Next │ │
14
+ │ │ │ │ │ │
15
+ │ └──────────────────┘ └──────────┘ │
16
+ │ │
17
+ │ Notes: │
18
+ │ - Remember to demo the sparkle button │
19
+ │ - Mention PDF export │
20
+ │ │
21
+ │ Slide 3/12 · Step 2/4 12:34 [Open] │
22
+ └──────────────────────────────────────────┘
23
+ ```
24
+
25
+ Includes:
26
+ - Current slide preview (larger)
27
+ - Next timeline-state preview (smaller): the next step on the current slide when one exists, otherwise the next slide at step 0
28
+ - Speaker notes for current slide
29
+ - Slide number / step counter
30
+ - Wall clock
31
+ - Button to open audience view in a new tab/window
32
+ - Navigation buttons that move through the timeline while staying in presenter mode
33
+
34
+ ## Speaker Notes
35
+
36
+ Use the `Notes` component:
37
+
38
+ ```mdx
39
+ import { Notes } from '@honeydeck/honeydeck'
40
+
41
+ # My Slide
42
+
43
+ Content here.
44
+
45
+ <Notes>
46
+ # Demo cue
47
+
48
+ - Remember to demo the sparkle button
49
+ - Mention PDF export
50
+ </Notes>
51
+ ```
52
+
53
+ `Notes` content is:
54
+ - Hidden from the normal audience slide view.
55
+ - Excluded from PDF output.
56
+ - Visible only in presenter mode.
57
+ - Rendered as compact Markdown prose in the notes panel, including headings, lists, links, code, and quotes.
58
+
59
+ ## Opening Presenter Mode
60
+
61
+ - Keyboard shortcut `p` from normal presentation → opens in a new window/tab.
62
+ - Navigation controls button in normal presentation.
63
+ - Direct URL: `/#/presenter/1/0`
64
+
65
+ Pressing `p` opens presenter mode in a **new window** so the audience view stays on the projector.
66
+
67
+ ## Navigation
68
+
69
+ Presenter mode uses the same timeline keyboard shortcuts as normal slide view:
70
+
71
+ | Shortcut | Action |
72
+ |----------|--------|
73
+ | `→` / `d` | Next step; if no next step remains, next slide at step 0 |
74
+ | `←` / `a` | Previous step; if at step 0, previous slide at final step |
75
+ | `↓` / `s` | Next slide |
76
+ | `↑` / `w` | Previous slide |
77
+
78
+ Keyboard navigation and presenter navigation buttons keep the URL under `/#/presenter/...`. Presenter controls use `lucide-react` icons imported from suffixed `...Icon` exports.
79
+
80
+ The `Next` preview shows the next timeline state, not just the next slide. Reveals and code step-through highlights therefore preview exactly what the audience will see after the next forward navigation.
81
+
82
+ Reveal content from later timeline steps is also shown in the `Next` preview at reduced opacity, so the speaker can see what is still coming on that slide. Future steps remain hidden in audience view and in the presenter `Current` preview.
83
+
84
+ When no next timeline state exists, the `Next` preview shows an end-of-deck placeholder instead of trying to render a missing slide.
85
+
86
+ ## Presenter/Audience Sync
87
+
88
+ Presenter mode and audience view synchronize navigation via `BroadcastChannel` in the same browser/profile.
89
+
90
+ - Presenter mode acts as the controller.
91
+ - Audience view (opened from presenter mode) listens for navigation updates.
92
+ - No server, internet, WebSocket, or device pairing required.
93
+ - If `BroadcastChannel` is unavailable, both views function independently.
94
+
95
+ This supports the common laptop/projector setup.
96
+
97
+ ## Mobile Presenter Mode
98
+
99
+ On mobile, presenter mode shows:
100
+ - Current slide
101
+ - Notes
102
+ - Navigation buttons
103
+
104
+ No next slide preview (space constraint).
package/docs/slides.md ADDED
@@ -0,0 +1,130 @@
1
+ # Slides
2
+
3
+ ## Basics
4
+
5
+ Slides are separated by `---` and may contain YAML frontmatter:
6
+
7
+ ```mdx
8
+ ---
9
+ layout: Section
10
+ ---
11
+
12
+ # Big Idea
13
+
14
+ Content here.
15
+ ```
16
+
17
+ Layout names are PascalCase. If no `layout:` is specified, `Default` is used.
18
+
19
+ Layouts receive a `title` prop extracted from the first `# heading` in the slide, plus any additional frontmatter fields as props.
20
+
21
+ ## Multiple MDX Files
22
+
23
+ The deck entry file defaults to `deck.mdx`, and `--deck <file.mdx>` can select another root document. Additional MDX files are included via standard ESM imports:
24
+
25
+ ```mdx
26
+ import Intro from './slides/intro.mdx'
27
+ import Demo from './slides/demo.mdx'
28
+
29
+ <Intro />
30
+
31
+ <Demo />
32
+ ```
33
+
34
+ ### How Honeydeck Distinguishes MDX from Components
35
+
36
+ - Imports from `.mdx` files → **slide-structural** (creates slide boundaries).
37
+ - Imports from `.tsx`/`.ts`/`.jsx`/`.js` or packages → **normal inline components**.
38
+
39
+ ```mdx
40
+ import DemoSlides from './demo.mdx' // slide group
41
+ import Chart from './Chart' // normal inline component
42
+ ```
43
+
44
+ ### Slide Expansion
45
+
46
+ If an imported `.mdx` file contains `---` separators, those slides are expanded at the location where the component is rendered. Rendering an imported MDX component always creates slide boundaries around it.
47
+
48
+ ### Frontmatter in Imported Files
49
+
50
+ - The first frontmatter block of the deck entry file defines **deck-level** settings and first-slide settings.
51
+ - Frontmatter in imported MDX files is **slide-level only** — they cannot define deck settings.
52
+
53
+ ## Default Layouts
54
+
55
+ Honeydeck's built-in defaults are clean and minimal. They provide:
56
+
57
+ | Layout | Description |
58
+ |--------|-------------|
59
+ | `Blank` | Empty slide with only children |
60
+ | `Default` | Title top-left, body flows below |
61
+ | `Section` | Big centered heading for section breaks |
62
+ | `Cover` | Opening/closing slide (title, body, author) |
63
+ | `TwoCol` | Two equal columns |
64
+ | `Image` | Prominent image with optional title and children |
65
+ | `ImageLeft` | Prominent left image with title and body on the right |
66
+ | `ImageRight` | Prominent right image with title and body on the left |
67
+
68
+ ### Two-Column Layout
69
+
70
+ Uses explicit slot components:
71
+
72
+ ```mdx
73
+ ---
74
+ layout: TwoCol
75
+ ---
76
+
77
+ import { Left, Right } from '@honeydeck/honeydeck/layouts/TwoCol'
78
+
79
+ <Left>
80
+ ## Pros
81
+ - Fast
82
+ - Simple
83
+ </Left>
84
+
85
+ <Right>
86
+ ## Cons
87
+ - Limited
88
+ </Right>
89
+ ```
90
+
91
+ ### Image Layout
92
+
93
+ Displays a specified image prominently (not as background):
94
+
95
+ ```yaml
96
+ ---
97
+ layout: Image
98
+ image: /diagrams/architecture.png
99
+ darkImage: /diagrams/architecture-dark.png
100
+ ---
101
+
102
+ # System Architecture
103
+
104
+ Caption below the image.
105
+ ```
106
+
107
+ ### Side Image Layouts
108
+
109
+ Use `ImageLeft` or `ImageRight` when the image should sit beside the slide content:
110
+
111
+ ```yaml
112
+ ---
113
+ layout: ImageLeft
114
+ image: /photos/product.jpg
115
+ darkImage: /photos/product-dark.jpg
116
+ alt: Product detail
117
+ ---
118
+
119
+ # Product Detail
120
+
121
+ Short supporting copy beside the image.
122
+ ```
123
+
124
+ ## Assets
125
+
126
+ Static files live in `/public`. Reference them with `/public/…`:
127
+
128
+ ```mdx
129
+ <img src="/public/cover.jpg" />
130
+ ```
@@ -0,0 +1,42 @@
1
+ # Slidev migration
2
+
3
+ Coming from [Slidev](https://sli.dev)? Honeydeck ships an optional `slidev-migration` agent skill that can help an AI coding agent initialize a Honeydeck project and migrate a Slidev deck.
4
+
5
+ ## Install the skill
6
+
7
+ During a new project init, choose the agent skills installer:
8
+
9
+ ```bash
10
+ npx @honeydeck/honeydeck init --name my-talk --install-skill
11
+ ```
12
+
13
+ For an existing project, run:
14
+
15
+ ```bash
16
+ honeydeck skill
17
+ ```
18
+
19
+ Or install from the Honeydeck repository when the repository URL is finalized:
20
+
21
+ ```bash
22
+ npx skills add <honeydeck-repo-url> --copy --skill slidev-migration
23
+ ```
24
+
25
+ The same `skills` flow lets you choose project or global installation.
26
+
27
+ ## What it migrates
28
+
29
+ The skill guides an agent through the common Slidev-to-Honeydeck mapping:
30
+
31
+ | Slidev | Honeydeck |
32
+ | --- | --- |
33
+ | `slides.md` | `deck.mdx` |
34
+ | `pages/*.md` with `src:` includes | imported `.mdx` slide groups |
35
+ | `public/**` | `public/**` |
36
+ | `components/*.vue` | React `components/*.tsx` |
37
+ | `layouts/*.vue` or Slidev themes | Honeydeck layouts, layout maps, or kits |
38
+ | `<v-click>` / `<v-clicks>` | `<Reveal>` / `<RevealGroup>` |
39
+ | trailing note comments | `<Notes>` |
40
+ | `slidev`, `slidev build`, `slidev export` | `honeydeck dev`, `honeydeck build`, `honeydeck pdf` |
41
+
42
+ Advanced Slidev features such as Vue directives, `$clicks`, custom theme internals, Monaco/live-code blocks, and complex click positioning may need React-specific follow-up after the first migration pass.
@@ -0,0 +1,171 @@
1
+ # Steps & Reveals
2
+
3
+ Honeydeck has a first-class step concept. Each slide has a timeline built from `Reveal`/`RevealGroup` components, custom component step blocks, and code highlight ranges, counted in document order.
4
+
5
+ ## Timeline Model
6
+
7
+ - Slides start at **step 0** — no reveals or custom component steps active.
8
+ - Stepped code blocks show their first highlight group immediately whenever the block is visible.
9
+ - Each `Reveal`, `RevealGroup` child, `TimelineSteps` block, or code highlight group after the first adds a step.
10
+ - All step-producing elements share one slide-local timeline.
11
+ - Nested step-producing elements are flattened into that same timeline. A parent
12
+ reveal target appears first; nested reveals, reveal groups, and code highlight
13
+ ranges appear after the parent and before the next sibling target.
14
+
15
+ ## Reveal
16
+
17
+ ```mdx
18
+ import { Reveal } from '@honeydeck/honeydeck'
19
+
20
+ # Why Honeydeck?
21
+
22
+ <Reveal>Start with Markdown</Reveal>
23
+
24
+ <Reveal>
25
+ Add <strong>interactive React</strong> when needed
26
+ </Reveal>
27
+
28
+ <Reveal>Export to PDF</Reveal>
29
+ ```
30
+
31
+ ### Behavior
32
+
33
+ - **Cumulative** — once visible, content stays visible for the rest of the slide.
34
+ - **Layout-stable** — hidden content reserves space (`opacity: 0` / `visibility: hidden`, not `display: none`).
35
+ - **Default effect** — fade-in. Customize with `className` and Tailwind/CSS.
36
+
37
+ ## RevealGroup
38
+
39
+ Reveals each direct child as its own step. If a direct child is a list, each
40
+ list item is revealed as its own step:
41
+
42
+ ```mdx
43
+ import { RevealGroup } from '@honeydeck/honeydeck'
44
+
45
+ <RevealGroup>
46
+ - Markdown-first
47
+ - React-powered
48
+ - PDF-ready
49
+ </RevealGroup>
50
+ ```
51
+
52
+ To reveal multiple elements together, wrap them in a single `Reveal` instead.
53
+
54
+ Nested reveals and code walkthroughs work inside group items:
55
+
56
+ ````mdx
57
+ <RevealGroup>
58
+ <div>
59
+ Parent item
60
+ <Reveal>Nested detail</Reveal>
61
+ </div>
62
+ <div>
63
+ Code item
64
+ ```ts {1|2}
65
+ const a = 1
66
+ const b = 2
67
+ ```
68
+ </div>
69
+ </RevealGroup>
70
+ ````
71
+
72
+ Timeline:
73
+
74
+ 1. Parent item appears
75
+ 2. Nested detail appears
76
+ 3. Code item appears with line 1 highlighted
77
+ 4. Code highlights line 2
78
+
79
+ ## Custom Component Steps
80
+
81
+ Use `TimelineSteps` when an imported React component should control part of
82
+ the slide timeline, such as an accordion, tab set, or diagram walkthrough:
83
+
84
+ ```mdx
85
+ import { Reveal, TimelineSteps } from '@honeydeck/honeydeck'
86
+ import { AccordionDemo } from './AccordionDemo'
87
+
88
+ <Reveal>Before the custom component</Reveal>
89
+
90
+ <TimelineSteps steps={3}>
91
+ <AccordionDemo />
92
+ </TimelineSteps>
93
+
94
+ <Reveal>After the custom component</Reveal>
95
+ ```
96
+
97
+ Inside the custom component:
98
+
99
+ ```tsx
100
+ import { useTimelineSteps } from '@honeydeck/honeydeck'
101
+
102
+ export function AccordionDemo() {
103
+ const { phase, stepIndex, stepCount, isPdfFinalRender } = useTimelineSteps()
104
+ // Open section stepIndex - 1 when phase is "active".
105
+ // Open all sections when isPdfFinalRender is true.
106
+ }
107
+ ```
108
+
109
+ `TimelineSteps` must be written in slide MDX with a literal positive integer
110
+ `steps` value. Rendering it only inside an imported TSX component does not
111
+ register steps, because Honeydeck counts the timeline at build time.
112
+
113
+ When PDF export renders one final-state page per slide (`pdfSteps: final`),
114
+ `useTimelineSteps()` exposes `isPdfFinalRender: true`. Step-driven custom
115
+ components can use that to render a PDF-specific final composition, such as an
116
+ accordion with every section open. In `pdfSteps: all`, the flag stays false
117
+ because each step is captured as its own page.
118
+
119
+ ## Code Step-Through
120
+
121
+ Code blocks support highlight ranges that participate in the same timeline:
122
+
123
+ ````mdx
124
+ ```ts {2-3|5|all}
125
+ const a = 1
126
+ const b = 2
127
+ const c = 3
128
+ console.log(a + b)
129
+ console.log(c)
130
+ ```
131
+ ````
132
+
133
+ - `{2-3|5|all}` — starts with lines 2-3 active, then steps to line 5, then all lines.
134
+ - Index starts at 1.
135
+ - The first group is the baseline highlight and adds 0 timeline steps; every later group adds 1 timeline step.
136
+
137
+ ### Code Step Behavior
138
+
139
+ - **Baseline:** The first metadata group is active immediately, including at slide step 0 when the block is visible.
140
+ - **Non-cumulative:** Only the lines specified for the active group are highlighted; previous highlights don't persist.
141
+ - **Dim approach:** Non-highlighted lines are dimmed (controlled by `--honeydeck-code-line-dim-opacity: 0.4`).
142
+ - **Shiki at build time:** No runtime JS cost for syntax highlighting.
143
+
144
+ ## Mixed Timeline Example
145
+
146
+ ````mdx
147
+ # Demo
148
+
149
+ ```ts {2|4|all}
150
+ const a = 1
151
+ const b = 2
152
+ console.log(a + b)
153
+ ```
154
+
155
+ <Reveal>Now notice the output</Reveal>
156
+ ````
157
+
158
+ Timeline:
159
+ 1. Slide starts with code line 2 highlighted
160
+ 2. Code highlights line 4
161
+ 3. Code highlights all lines
162
+ 4. Reveal appears
163
+
164
+ ## PDF Export of Steps
165
+
166
+ Controlled by deck-level `pdfSteps` setting:
167
+
168
+ | Value | Behavior |
169
+ |-------|----------|
170
+ | `final` (default) | Each slide appears once with all reveals visible, code at final highlight |
171
+ | `all` | Each step state becomes a separate PDF page |
package/package.json ADDED
@@ -0,0 +1,134 @@
1
+ {
2
+ "name": "@honeydeck/honeydeck",
3
+ "version": "0.1.0",
4
+ "description": "MDX and React-based presentation framework for AI-friendly slide decks.",
5
+ "license": "MIT",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/honeydeck/honeydeck.git"
12
+ },
13
+ "homepage": "https://honeydeck.dev",
14
+ "bugs": {
15
+ "url": "https://github.com/honeydeck/honeydeck/issues"
16
+ },
17
+ "keywords": [
18
+ "presentations",
19
+ "slides",
20
+ "mdx",
21
+ "react",
22
+ "vite",
23
+ "tailwindcss"
24
+ ],
25
+ "type": "module",
26
+ "bin": {
27
+ "honeydeck": "src/cli/bin.js"
28
+ },
29
+ "engines": {
30
+ "node": ">=22.18.0"
31
+ },
32
+ "files": [
33
+ "src",
34
+ "!src/**/*.test.ts",
35
+ "!src/**/*.test.tsx",
36
+ "!src/**/fixtures",
37
+ "!src/**/fixtures/**",
38
+ "docs",
39
+ "skills",
40
+ "Readme.md",
41
+ "SPEC.md",
42
+ "DEVELOPMENT.md",
43
+ "AGENTS.md"
44
+ ],
45
+ "exports": {
46
+ ".": "./src/runtime/index.ts",
47
+ "./types": "./src/runtime/types.ts",
48
+ "./layouts": "./src/layouts/index.ts",
49
+ "./layouts/ColorModeImage": "./src/layouts/ColorModeImage.tsx",
50
+ "./layouts/Blank": "./src/layouts/clean/Blank.tsx",
51
+ "./layouts/Default": "./src/layouts/clean/Default.tsx",
52
+ "./layouts/Cover": "./src/layouts/clean/Cover.tsx",
53
+ "./layouts/Section": "./src/layouts/clean/Section.tsx",
54
+ "./layouts/TwoCol": "./src/layouts/clean/TwoCol.tsx",
55
+ "./layouts/Image": "./src/layouts/clean/Image/Image.tsx",
56
+ "./layouts/ImageLeft": "./src/layouts/clean/ImageLeft.tsx",
57
+ "./layouts/ImageRight": "./src/layouts/clean/ImageRight.tsx",
58
+ "./layouts/placeholders": "./src/layouts/placeholders.ts",
59
+ "./layouts/bee": "./src/layouts/bee/index.ts",
60
+ "./layouts/bee/Blank": "./src/layouts/bee/Blank.tsx",
61
+ "./layouts/bee/Default": "./src/layouts/bee/Default.tsx",
62
+ "./layouts/bee/Cover": "./src/layouts/bee/Cover.tsx",
63
+ "./layouts/bee/Section": "./src/layouts/bee/Section.tsx",
64
+ "./layouts/bee/TwoCol": "./src/layouts/bee/TwoCol.tsx",
65
+ "./layouts/bee/Image": "./src/layouts/bee/Image/Image.tsx",
66
+ "./layouts/bee/ImageLeft": "./src/layouts/bee/ImageLeft.tsx",
67
+ "./layouts/bee/ImageRight": "./src/layouts/bee/ImageRight.tsx",
68
+ "./layouts/clean": "./src/layouts/clean/index.ts",
69
+ "./layouts/clean/Blank": "./src/layouts/clean/Blank.tsx",
70
+ "./layouts/clean/Default": "./src/layouts/clean/Default.tsx",
71
+ "./layouts/clean/Cover": "./src/layouts/clean/Cover.tsx",
72
+ "./layouts/clean/Section": "./src/layouts/clean/Section.tsx",
73
+ "./layouts/clean/TwoCol": "./src/layouts/clean/TwoCol.tsx",
74
+ "./layouts/clean/Image": "./src/layouts/clean/Image/Image.tsx",
75
+ "./layouts/clean/ImageLeft": "./src/layouts/clean/ImageLeft.tsx",
76
+ "./layouts/clean/ImageRight": "./src/layouts/clean/ImageRight.tsx",
77
+ "./theme.css": "./src/theme/base.css",
78
+ "./themes/base.css": "./src/theme/base.css",
79
+ "./themes/clean.css": "./src/theme/clean.css",
80
+ "./themes/bee.css": "./src/theme/bee.css",
81
+ "./components": "./src/runtime/components/index.ts",
82
+ "./components/code-block": "./src/runtime/components/CodeBlock.tsx",
83
+ "./remark/shiki-code-blocks": "./src/remark/shiki-code-blocks.ts"
84
+ },
85
+ "imports": {
86
+ "#cli/*": "./src/cli/*",
87
+ "#runtime/*": "./src/runtime/*",
88
+ "#remark/*": "./src/remark/*",
89
+ "#vite-plugin/*": "./src/vite-plugin/*"
90
+ },
91
+ "scripts": {
92
+ "build": "npm run typecheck",
93
+ "dev": "node --import tsx ./src/cli/index.ts dev --deck src/cli/templates/starter/deck.mdx",
94
+ "dev:init": "node --import tsx ./src/cli/index.ts dev --deck src/cli/templates/starter/deck.mdx",
95
+ "format": "biome check --write",
96
+ "lint": "biome check",
97
+ "pack:dry-run": "npm pack --dry-run",
98
+ "pack:smoke": "node ./scripts/packed-smoke.mjs",
99
+ "release:plan": "node ./scripts/release-plan.mjs",
100
+ "test": "node --test --import tsx \"src/**/*.test.ts\" \"src/**/*.test.tsx\"",
101
+ "typecheck": "tsc --noEmit"
102
+ },
103
+ "dependencies": {
104
+ "@clack/prompts": "^1.3.0",
105
+ "@mdx-js/mdx": "^3.1.1",
106
+ "@mdx-js/rollup": "^3.1.1",
107
+ "@tailwindcss/vite": "^4.3.0",
108
+ "lucide-react": "^1.16.0",
109
+ "pdf-lib": "^1.17.1",
110
+ "playwright": "^1.59.1",
111
+ "remark-frontmatter": "^5.0.0",
112
+ "remark-gfm": "^4.0.1",
113
+ "shiki": "^4.0.2",
114
+ "tsx": "^4.21.0",
115
+ "typescript": "^6.0.3",
116
+ "unified": "^11.0.5",
117
+ "unist-util-visit": "^5.1.0",
118
+ "vite": "^8.0.11"
119
+ },
120
+ "peerDependencies": {
121
+ "react": "^19.0.0",
122
+ "react-dom": "^19.0.0",
123
+ "tailwindcss": "^4.0.0"
124
+ },
125
+ "devDependencies": {
126
+ "@biomejs/biome": "2.4.15",
127
+ "@types/node": "^25.6.2",
128
+ "@types/react": "^19.2.14",
129
+ "@types/react-dom": "^19.2.3",
130
+ "react": "^19.2.6",
131
+ "react-dom": "^19.2.6",
132
+ "tailwindcss": "^4.3.0"
133
+ }
134
+ }
package/skills/SPEC.md ADDED
@@ -0,0 +1,21 @@
1
+ # Honeydeck Agent Skills Specification
2
+
3
+ > Observable behavior for bundled installable agent skills.
4
+
5
+ ## Agent Skills
6
+
7
+ Honeydeck ships installable agent skills:
8
+
9
+ - `skills/honeydeck/SKILL.md` (`honeydeck`) helps AI agents use Honeydeck correctly: MDX entrypoint, deck frontmatter, exact `---` slide separators, slide frontmatter, built-in layouts, explicit theme/CSS imports, presenter notes, steps/reveals, code blocks, PDF export, custom React components, kits, canonical package docs, and runtime reference pages.
10
+ - `skills/presentation-writing/SKILL.md` (`presentation-writing`) gives opinionated guidance for writing great slides and delivering good presentations: audience/goal/duration discovery, storyline, one idea per slide, strong headlines, sparse visuals, speaker notes, timing, narrative flow, progressive disclosure, and review heuristics.
11
+ - `skills/slidev-migration/SKILL.md` (`slidev-migration`) helps AI agents migrate presentations from Slidev/sli.dev to Honeydeck: initialize a Honeydeck project when needed, convert `slides.md` to `deck.mdx`, map Slidev frontmatter/layouts/assets/notes/reveals/scripts to Honeydeck equivalents, and flag Vue/theme features that need manual React follow-up.
12
+
13
+ Expected behavior:
14
+
15
+ - All skills are discoverable by the `skills` CLI when users run `npx skills add <honeydeck-repo-url> --copy` or explicit `npx skills add <honeydeck-repo-url> --copy --skill honeydeck` / `--skill presentation-writing` / `--skill slidev-migration`.
16
+ - The `honeydeck` skill instructs agents to use Honeydeck documentation (`Readme.md` for package overview, `docs/getting-started.md` for first-run guidance, package/root `SPEC.md`, linked colocated `SPEC.md` files, `docs/next-steps.md`, `docs/slides.md`, `docs/steps-and-reveals.md`, `docs/kits.md`, `docs/configuration.md`, and related docs) as the source of truth when available.
17
+ - The `honeydeck` skill documents a local docs discovery order: current project's `node_modules/@honeydeck/honeydeck`, monorepo checkout `packages/honeydeck`, package-root checkout docs, then the public docs URL.
18
+ - The `presentation-writing` skill is framework-agnostic enough to help with presentation quality, while still working well alongside the Honeydeck skill.
19
+ - The `slidev-migration` skill instructs agents to inspect existing Slidev projects, preserve source files until the user approves cleanup, initialize or merge Honeydeck starter files, migrate common Slidev syntax to Honeydeck MDX/React, and document unsupported or approximated features.
20
+ - `honeydeck init` should offer to open the interactive skills installer for the generated project and make clear that accepting runs `npx skills add`.
21
+ - `honeydeck init` and `honeydeck skill` should delegate bundled skill selection, scope selection, and agent selection to the same `npx skills add <honeydeck-package-source> --copy` flow.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: honeydeck
3
+ description: Help users create, edit, debug, and export Honeydeck MDX presentations. Use for Honeydeck syntax, deck.mdx structure, layouts, frontmatter, steps/reveals, presenter notes, code blocks, custom React components, kits/themes, CLI commands, dev preview, build, or PDF export.
4
+ ---
5
+
6
+ # Honeydeck
7
+
8
+ You help the user work with Honeydeck presentations. Honeydeck decks are MDX files powered by React, Vite, Tailwind v4, and Honeydeck layouts/components.
9
+
10
+ ## Source of truth
11
+
12
+ Before giving Honeydeck-specific syntax or changing a deck, prefer repository/package docs when available.
13
+
14
+ Docs discovery order:
15
+
16
+ 1. Current project dependency docs: `node_modules/@honeydeck/honeydeck/Readme.md`, `node_modules/@honeydeck/honeydeck/SPEC.md`, and `node_modules/@honeydeck/honeydeck/docs/*.md`.
17
+ 2. Monorepo checkout docs: `packages/honeydeck/Readme.md`, `packages/honeydeck/SPEC.md`, and `packages/honeydeck/docs/*.md`.
18
+ 3. Fresh app or package-root docs: `Readme.md`, `SPEC.md`, and `docs/*.md`.
19
+ 4. Public docs URL when local docs are unavailable: `/docs` on the Honeydeck marketing site.
20
+
21
+ Important docs:
22
+
23
+ - `Readme.md` for the compact package overview and documentation index
24
+ - `docs/getting-started.md` for quick start and first-run orientation
25
+ - `docs/next-steps.md` for CLI details, feature overview, architecture, exports, and agent skills
26
+ - root/package `SPEC.md` and linked colocated `SPEC.md` files for expected behavior
27
+ - `docs/slides.md` for deck structure, slide separators, and multi-file decks
28
+ - `docs/steps-and-reveals.md` for step-by-step reveals and code steps
29
+ - `docs/kits.md` and `docs/kit-authoring.md` for themes, layouts, and reusable kits
30
+ - `docs/configuration.md` for frontmatter options
31
+ - `docs/navigation.md`, `docs/mobile.md`, `docs/presenter-mode.md`, and `docs/pdf-export.md` for presenting/exporting
32
+
33
+ If the user is inside a generated Honeydeck project and package docs are not nearby, tell them they can use the public docs site for prose docs and run `npx honeydeck dev` to open runtime reference pages for active theme tokens, layouts, and built-in components.
34
+
35
+ ## Honeydeck basics to remember
36
+
37
+ - The conventional entrypoint is `deck.mdx`.
38
+ - The first `---` block is deck-level frontmatter.
39
+ - Slides are separated by a line that is exactly `---`.
40
+ - A slide can start with frontmatter to choose a layout, title, notes, or other options. Frontmatter is closed with another `---` block, and then content follows.
41
+ - If frontmatter is invalid or incomplete, notify the user and provide correct syntax.
42
+ - Frontmatter may provide additional properties for the selected layout. Check layout source or docs for available properties.
43
+ - Built-in layouts include `Blank`, `Cover`, `Default`, `Section`, `TwoCol`, `Image`, `ImageLeft`, and `ImageRight`.
44
+ - Built-in styling is explicit: generated decks import `./styles.css`, and that file imports Honeydeck/Tailwind theme CSS.
45
+ - MDX can mix Markdown, JSX, imported React components, Honeydeck components, and code blocks.
46
+ - Presenter notes belong in slide frontmatter when useful for narrative, timing, and delivery cues.
47
+ - Use reveals/steps for progressive disclosure, not for every bullet by default.
48
+ - PDF export is available with `npx honeydeck pdf`; use `--steps all` when revealed states matter.
49
+ - Use sections to group related slides and provide visual breaks.
50
+
51
+ ## How to help
52
+
53
+ 1. Read existing deck imports, frontmatter, separators, and local style before editing.
54
+ 2. Preserve valid MDX and Honeydeck separators exactly.
55
+ 3. Prefer Honeydeck layouts and components over custom CSS when they fit.
56
+ 4. Keep examples small unless the user asks for a full deck.
57
+ 5. Explain Honeydeck-specific syntax briefly.
58
+ 6. Recommend `npx honeydeck dev` for preview and `npx honeydeck pdf` for export.
59
+ 7. If unsure about exact syntax, read the docs first instead of guessing.
60
+
61
+ ## Output style
62
+
63
+ - When generating Honeydeck slides, output valid MDX that can be pasted into `deck.mdx`.
64
+ - Include necessary imports and frontmatter.
65
+ - Keep non-Honeydeck presentation advice brief unless the user also wants slide-writing guidance.