@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.
- package/AGENTS.md +25 -0
- package/DEVELOPMENT.md +522 -0
- package/LICENSE +21 -0
- package/Readme.md +49 -0
- package/SPEC.md +88 -0
- package/docs/components.md +63 -0
- package/docs/configuration.md +91 -0
- package/docs/getting-started.md +116 -0
- package/docs/kit-authoring.md +207 -0
- package/docs/kits.md +387 -0
- package/docs/local-development.md +95 -0
- package/docs/mermaid.md +198 -0
- package/docs/mobile.md +108 -0
- package/docs/navigation.md +93 -0
- package/docs/next-steps.md +377 -0
- package/docs/pdf-export.md +91 -0
- package/docs/presenter-mode.md +104 -0
- package/docs/slides.md +130 -0
- package/docs/slidev-migration.md +42 -0
- package/docs/steps-and-reveals.md +171 -0
- package/package.json +134 -0
- package/skills/SPEC.md +21 -0
- package/skills/honeydeck/SKILL.md +65 -0
- package/skills/presentation-writing/SKILL.md +75 -0
- package/skills/slidev-migration/SKILL.md +153 -0
- package/src/SPEC.md +89 -0
- package/src/assets.d.ts +30 -0
- package/src/cli/SPEC.md +230 -0
- package/src/cli/args.ts +3 -0
- package/src/cli/banner.ts +9 -0
- package/src/cli/bin.js +5 -0
- package/src/cli/build.ts +229 -0
- package/src/cli/deck-path.ts +32 -0
- package/src/cli/dev.ts +263 -0
- package/src/cli/index.ts +126 -0
- package/src/cli/init.ts +369 -0
- package/src/cli/pdf.ts +923 -0
- package/src/cli/skill.ts +75 -0
- package/src/cli/templates/SPEC.md +70 -0
- package/src/cli/templates/deck-mdx.ts +15 -0
- package/src/cli/templates/package-json.ts +36 -0
- package/src/cli/templates/sparkle-button.ts +15 -0
- package/src/cli/templates/starter/components/SparkleButton.tsx +84 -0
- package/src/cli/templates/starter/deck.mdx +153 -0
- package/src/cli/templates/starter/styles.css +14 -0
- package/src/cli/templates/styles-css.ts +14 -0
- package/src/defaults.ts +1 -0
- package/src/layouts/ColorModeImage.tsx +55 -0
- package/src/layouts/SPEC.md +393 -0
- package/src/layouts/SlideFrame.tsx +48 -0
- package/src/layouts/bee/Blank.tsx +12 -0
- package/src/layouts/bee/Cover.tsx +70 -0
- package/src/layouts/bee/Default.tsx +42 -0
- package/src/layouts/bee/Image/Image.tsx +151 -0
- package/src/layouts/bee/Image/placeholder-dark.webp +0 -0
- package/src/layouts/bee/Image/placeholder-vertical-dark.webp +0 -0
- package/src/layouts/bee/Image/placeholder-vertical.webp +0 -0
- package/src/layouts/bee/Image/placeholder.webp +0 -0
- package/src/layouts/bee/ImageLeft.tsx +27 -0
- package/src/layouts/bee/ImageRight.tsx +27 -0
- package/src/layouts/bee/ImageSide.tsx +107 -0
- package/src/layouts/bee/Section.tsx +40 -0
- package/src/layouts/bee/TwoCol.tsx +108 -0
- package/src/layouts/bee/index.ts +40 -0
- package/src/layouts/clean/Blank.tsx +12 -0
- package/src/layouts/clean/Cover.tsx +58 -0
- package/src/layouts/clean/Default.tsx +33 -0
- package/src/layouts/clean/Image/Image.tsx +103 -0
- package/src/layouts/clean/ImageLeft.tsx +27 -0
- package/src/layouts/clean/ImageRight.tsx +27 -0
- package/src/layouts/clean/ImageSide.tsx +113 -0
- package/src/layouts/clean/Section.tsx +35 -0
- package/src/layouts/clean/TwoCol.tsx +63 -0
- package/src/layouts/clean/index.ts +40 -0
- package/src/layouts/index.ts +60 -0
- package/src/layouts/placeholders.ts +9 -0
- package/src/layouts/utils.ts +13 -0
- package/src/remark/SPEC.md +49 -0
- package/src/remark/h1-extract.ts +124 -0
- package/src/remark/index.ts +4 -0
- package/src/remark/shiki-code-blocks.ts +325 -0
- package/src/remark/step-numbering.ts +412 -0
- package/src/runtime/Deck.tsx +533 -0
- package/src/runtime/SPEC.md +256 -0
- package/src/runtime/SlideCanvas.tsx +95 -0
- package/src/runtime/TimelineContext.tsx +122 -0
- package/src/runtime/app-shell/index.html +31 -0
- package/src/runtime/app-shell/main.tsx +42 -0
- package/src/runtime/aspectRatio.ts +34 -0
- package/src/runtime/colorMode.ts +23 -0
- package/src/runtime/components/BrowserFrame.tsx +233 -0
- package/src/runtime/components/Button.tsx +57 -0
- package/src/runtime/components/CodeBlock.tsx +210 -0
- package/src/runtime/components/ColorModeCycleButton.tsx +59 -0
- package/src/runtime/components/ErrorBoundary.tsx +125 -0
- package/src/runtime/components/Keyboard.tsx +87 -0
- package/src/runtime/components/ListStyle.tsx +203 -0
- package/src/runtime/components/NavBar.tsx +223 -0
- package/src/runtime/components/NavBarButton.tsx +47 -0
- package/src/runtime/components/NavBarDivider.tsx +3 -0
- package/src/runtime/components/Notes.tsx +171 -0
- package/src/runtime/components/Reveal.tsx +82 -0
- package/src/runtime/components/RevealGroup.tsx +193 -0
- package/src/runtime/components/SPEC.md +263 -0
- package/src/runtime/components/SlideNumberBadge.tsx +11 -0
- package/src/runtime/components/TimelineSteps.tsx +115 -0
- package/src/runtime/components/index.ts +55 -0
- package/src/runtime/index.ts +42 -0
- package/src/runtime/inputOwnership.ts +68 -0
- package/src/runtime/keyboardTarget.ts +7 -0
- package/src/runtime/lastSlideRoute.ts +56 -0
- package/src/runtime/navigation.ts +211 -0
- package/src/runtime/router.ts +157 -0
- package/src/runtime/slideData.ts +137 -0
- package/src/runtime/sync.ts +267 -0
- package/src/runtime/types.ts +182 -0
- package/src/runtime/useKeyboardNav.ts +138 -0
- package/src/runtime/useSwipeNav.ts +257 -0
- package/src/runtime/views/DocsView.tsx +74 -0
- package/src/runtime/views/OverviewView.tsx +386 -0
- package/src/runtime/views/PresenterNotesPanel.tsx +76 -0
- package/src/runtime/views/PresenterView.tsx +340 -0
- package/src/runtime/views/SPEC.md +152 -0
- package/src/runtime/views/docs/ComponentsTab.tsx +178 -0
- package/src/runtime/views/docs/DocsHeader.tsx +101 -0
- package/src/runtime/views/docs/Intro.tsx +20 -0
- package/src/runtime/views/docs/LayoutsTab.tsx +324 -0
- package/src/runtime/views/docs/ThemeTab.tsx +110 -0
- package/src/runtime/views/index.ts +7 -0
- package/src/runtime/views/overviewGrid.ts +106 -0
- package/src/runtime/views/presenterPreview.ts +27 -0
- package/src/runtime/virtual-modules.d.ts +98 -0
- package/src/theme/SPEC.md +179 -0
- package/src/theme/base.css +623 -0
- package/src/theme/bee.css +35 -0
- package/src/theme/clean.css +38 -0
- package/src/vite-plugin/SPEC.md +114 -0
- package/src/vite-plugin/component-doc-crawler.ts +350 -0
- package/src/vite-plugin/deck-loader.ts +148 -0
- package/src/vite-plugin/index.ts +373 -0
- package/src/vite-plugin/layout-demo-crawler.ts +802 -0
- package/src/vite-plugin/splitter.ts +353 -0
- package/src/vite-plugin/token-manifest.ts +163 -0
- package/src/vite-plugin/virtual-modules.ts +587 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Honeydeck package guide
|
|
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.
|
|
4
|
+
|
|
5
|
+
## Rules
|
|
6
|
+
|
|
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.
|
|
11
|
+
- Use suffixed `lucide-react` icon exports.
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
From repo root:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm -w @honeydeck/honeydeck run dev
|
|
19
|
+
npm -w @honeydeck/honeydeck run test
|
|
20
|
+
npm -w @honeydeck/honeydeck run typecheck
|
|
21
|
+
npm -w @honeydeck/honeydeck run build
|
|
22
|
+
npm -w @honeydeck/honeydeck run pack:dry-run
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
For full monorepo gates use root workspace scripts: `npm run lint`, `npm run typecheck`, `npm test`, `npm run build`, and `npm run pack:dry-run`.
|
package/DEVELOPMENT.md
ADDED
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
# Honeydeck — Development Guide
|
|
2
|
+
|
|
3
|
+
> Companion to the distributed Honeydeck specs. Root `SPEC.md` is the overview/navigation device; colocated `SPEC.md` files define detailed observable behavior. This document explains how to develop, test, package, and reason about the implementation.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Scope
|
|
8
|
+
|
|
9
|
+
Use this document for implementation workflow and architecture details:
|
|
10
|
+
|
|
11
|
+
- local setup
|
|
12
|
+
- repository scripts
|
|
13
|
+
- repository folder structure
|
|
14
|
+
- quality gates
|
|
15
|
+
- compiler pipeline
|
|
16
|
+
- virtual modules
|
|
17
|
+
- Vite/app-shell wiring
|
|
18
|
+
- Tailwind integration details
|
|
19
|
+
- PDF export internals
|
|
20
|
+
- package/publish expectations
|
|
21
|
+
|
|
22
|
+
Do not use this document to override the distributed specs. If behavior changes, update the owning colocated `SPEC.md` first and keep the root spec map current.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Implementation Stack
|
|
27
|
+
|
|
28
|
+
| Concern | Implementation |
|
|
29
|
+
|---------|----------------|
|
|
30
|
+
| Language | TypeScript |
|
|
31
|
+
| Runtime | Node.js |
|
|
32
|
+
| Build tool | Vite |
|
|
33
|
+
| Styling | Tailwind CSS + CSS custom properties |
|
|
34
|
+
| Markdown | MDX + remark plugins |
|
|
35
|
+
| PDF | Playwright/Chromium screenshots + `pdf-lib` assembly |
|
|
36
|
+
| Syntax highlighting | Shiki at MDX transform time |
|
|
37
|
+
| Icons | `lucide-react` |
|
|
38
|
+
| CLI prompts | clack |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Development Process
|
|
43
|
+
|
|
44
|
+
Honeydeck uses spec-driven development:
|
|
45
|
+
|
|
46
|
+
1. Research existing code and docs.
|
|
47
|
+
2. Propose the observable behavior change in the owning colocated `SPEC.md`.
|
|
48
|
+
3. Agree on the spec change.
|
|
49
|
+
4. Implement code and tests.
|
|
50
|
+
5. Review implementation against the root spec map and owning colocated spec.
|
|
51
|
+
6. Keep this document updated when workflow or architecture changes.
|
|
52
|
+
|
|
53
|
+
Keep behavior specs focused on observable behavior. Put implementation-only details here.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Prerequisites
|
|
58
|
+
|
|
59
|
+
Honeydeck is currently developed and tested with:
|
|
60
|
+
|
|
61
|
+
- Node.js 26+
|
|
62
|
+
- npm
|
|
63
|
+
- Playwright Chromium for PDF export
|
|
64
|
+
|
|
65
|
+
Check runtime:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
node --version
|
|
69
|
+
npm --version
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Install dependencies:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npm install
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Install Playwright Chromium when PDF export is used locally:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npx playwright install chromium
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Repository Scripts
|
|
87
|
+
|
|
88
|
+
| Script | Purpose |
|
|
89
|
+
|--------|---------|
|
|
90
|
+
| `npm run build` | Run the package TypeScript build gate |
|
|
91
|
+
| `npm run dev` | Run source CLI against starter template deck |
|
|
92
|
+
| `npm run dev:init` | Run source CLI against starter template deck |
|
|
93
|
+
| `npm run format` | Format/lint with Biome and write fixes |
|
|
94
|
+
| `npm run lint` | Validate Biome formatting/lint rules without writing fixes |
|
|
95
|
+
| `npm run pack:dry-run` | Validate the npm package contents without publishing |
|
|
96
|
+
| `npm run release:plan` | Inspect the next Conventional Commit release plan |
|
|
97
|
+
| `npm test` | Run Node test suite through `tsx` |
|
|
98
|
+
| `npm run typecheck` | Run strict TypeScript checks without emitting files |
|
|
99
|
+
|
|
100
|
+
The source CLI is run directly with `tsx`, for example:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
node --import tsx ./src/cli/index.ts dev --deck src/cli/templates/starter/deck.mdx
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Quality Gates
|
|
109
|
+
|
|
110
|
+
Before considering a change complete, run:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npm run format
|
|
114
|
+
npm run lint
|
|
115
|
+
npm run typecheck
|
|
116
|
+
npm test
|
|
117
|
+
npm run build
|
|
118
|
+
npm run pack:dry-run
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
For UI/runtime changes, also run at least one manual deck session:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npm run dev
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
For PDF-related changes, run the showcase package PDF smoke tests from the repository root:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npm -w @honeydeck/showcase run pdf
|
|
131
|
+
npm -w @honeydeck/showcase run pdf:steps
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Test coverage should match the changed layer and live next to the implementation by default:
|
|
135
|
+
|
|
136
|
+
- parser/splitter changes → colocated unit tests such as `src/vite-plugin/splitter.test.ts`
|
|
137
|
+
- remark compiler changes → colocated MDX compile tests beside the changed remark transform
|
|
138
|
+
- runtime navigation changes → colocated router/keyboard/preview tests where possible
|
|
139
|
+
- CLI changes → colocated CLI argument/help/init tests beside the changed CLI module
|
|
140
|
+
- CSS/theme changes → colocated theme CSS tests plus manual visual check
|
|
141
|
+
- PDF changes → colocated option/server/path tests plus manual PDF smoke test
|
|
142
|
+
|
|
143
|
+
Test fixtures should also be colocated with their owning test and implementation, for example under `src/vite-plugin/fixtures/` or `src/remark/fixtures/`. Do not add a top-level `tests/` folder.
|
|
144
|
+
|
|
145
|
+
### Good test patterns
|
|
146
|
+
|
|
147
|
+
Tests should protect observable behavior: when the user or caller does X, Honeydeck produces Y. Prefer rendered output, CLI results, parsed routes, generated public virtual module output, or thrown user-facing errors over private helper calls or implementation details.
|
|
148
|
+
|
|
149
|
+
Use these "instead of / do" patterns to keep tests useful:
|
|
150
|
+
|
|
151
|
+
- Instead of asserting internal representation, assert public behavior. For example, render MDX output or assert returned metadata instead of matching generated JS details.
|
|
152
|
+
- Instead of asserting styling implementation, assert user-visible or accessibility behavior. Only assert CSS classes when the class is itself the public contract.
|
|
153
|
+
- Instead of inspecting source text, exercise the public surface. Import public exports, call public functions, or render components instead of scanning files for strings.
|
|
154
|
+
- Instead of depending on ambient state, make inputs explicit and isolated. Pass explicit roots, isolate globals, and avoid `process.cwd()`, generated `dist/`, clocks, randomness, or environment-specific paths.
|
|
155
|
+
- Instead of snapshot-like broad equality, assert the intent. Check key substitutions, important structure, and compile success rather than exact full-file template output.
|
|
156
|
+
- Instead of duplicating coverage, protect each promise once. Keep the clearest test for a rule and remove repeats that fail for the same reason.
|
|
157
|
+
|
|
158
|
+
Prefer small Arrange/Act/Assert tests with meaningful edge cases: invalid input, empty state, missing files, unavailable browser globals, malformed stored data, encoded route values, and failure paths at integration boundaries.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Package Execution Model
|
|
163
|
+
|
|
164
|
+
Honeydeck currently ships TypeScript/TSX source files in the npm package. The package entrypoints and subpath exports point directly at files under `src/`.
|
|
165
|
+
|
|
166
|
+
Important implications:
|
|
167
|
+
|
|
168
|
+
- CLI bin points at `./src/cli/index.ts`.
|
|
169
|
+
- Vite resolves Honeydeck runtime/layout/theme/component exports from source.
|
|
170
|
+
- Local development and tests use `tsx` to execute TypeScript directly.
|
|
171
|
+
- `package.json#files` must include all runtime, docs, spec, development, and skill files needed by installed users and AI agents.
|
|
172
|
+
|
|
173
|
+
Published package contents must include:
|
|
174
|
+
|
|
175
|
+
- `src/` for CLI, runtime, layouts, themes, Vite plugin, and assets
|
|
176
|
+
- `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
|
|
177
|
+
- Root `SPEC.md` plus colocated `SPEC.md` files so AI agents and maintainers can inspect expected behavior from an installed package
|
|
178
|
+
- `DEVELOPMENT.md` so maintainers can inspect development workflow, internal architecture, testing, and release expectations from an installed package
|
|
179
|
+
- `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
|
|
180
|
+
|
|
181
|
+
Repository release governance lives in the monorepo root `.github/SPEC.md`. It is not shipped in the npm package because it describes repository automation rather than installed Honeydeck behavior.
|
|
182
|
+
|
|
183
|
+
Development-only folders and files should not be published:
|
|
184
|
+
|
|
185
|
+
- `agentwork/`
|
|
186
|
+
- colocated test files under `src/` such as `*.test.ts` and `*.test.tsx`
|
|
187
|
+
- colocated test fixtures under `src/` such as `fixtures/`
|
|
188
|
+
|
|
189
|
+
### Package Export Map
|
|
190
|
+
|
|
191
|
+
`package.json#exports` must stay aligned with public import patterns in `src/SPEC.md` and the root spec map.
|
|
192
|
+
|
|
193
|
+
```txt
|
|
194
|
+
honeydeck
|
|
195
|
+
├── . → src/runtime/index.ts
|
|
196
|
+
├── ./types → src/runtime/types.ts
|
|
197
|
+
├── ./theme.css → src/theme/base.css
|
|
198
|
+
├── ./themes/
|
|
199
|
+
│ ├── base.css → src/theme/base.css
|
|
200
|
+
│ ├── clean.css → src/theme/clean.css
|
|
201
|
+
│ └── bee.css → src/theme/bee.css
|
|
202
|
+
├── ./layouts/
|
|
203
|
+
│ ├── . → src/layouts/index.ts
|
|
204
|
+
│ ├── Blank → src/layouts/clean/Blank.tsx
|
|
205
|
+
│ ├── Default → src/layouts/clean/Default.tsx
|
|
206
|
+
│ ├── TwoCol → src/layouts/clean/TwoCol.tsx
|
|
207
|
+
│ ├── Cover → src/layouts/clean/Cover.tsx
|
|
208
|
+
│ ├── Section → src/layouts/clean/Section.tsx
|
|
209
|
+
│ ├── Image → src/layouts/clean/Image/Image.tsx
|
|
210
|
+
│ ├── ImageLeft → src/layouts/clean/ImageLeft.tsx
|
|
211
|
+
│ ├── ImageRight → src/layouts/clean/ImageRight.tsx
|
|
212
|
+
│ ├── clean/ → src/layouts/clean/*
|
|
213
|
+
│ └── bee/ → src/layouts/bee/*
|
|
214
|
+
└── ./components/
|
|
215
|
+
├── . → src/runtime/components/index.ts
|
|
216
|
+
└── code-block → src/runtime/components/CodeBlock.tsx
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Vite/App-Shell Architecture
|
|
222
|
+
|
|
223
|
+
Honeydeck owns Vite config programmatically. Users do not provide `index.html` or `vite.config.ts`.
|
|
224
|
+
|
|
225
|
+
### Development server
|
|
226
|
+
|
|
227
|
+
- Vite root is the user project root.
|
|
228
|
+
- The dev server binds to `0.0.0.0` so the printed Network URL is reachable from other devices on the same LAN.
|
|
229
|
+
- Honeydeck serves its internal app shell from `src/runtime/app-shell/index.html`.
|
|
230
|
+
- The app shell entry script points at `src/runtime/app-shell/main.tsx` via Vite `/@fs/` absolute-file serving.
|
|
231
|
+
- `server.fs.allow` includes the Honeydeck package root so package source can be served even when outside the user root.
|
|
232
|
+
- HMR is provided by Vite plus Honeydeck virtual module invalidation.
|
|
233
|
+
|
|
234
|
+
### Production build
|
|
235
|
+
|
|
236
|
+
- Vite root is the internal app shell directory.
|
|
237
|
+
- Build output goes to the user project `dist/` unless overridden internally by PDF export.
|
|
238
|
+
- A Honeydeck HTML plugin rewrites the app-shell script placeholder before Vite bundles.
|
|
239
|
+
- The user project `public/` directory is copied to the build root.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Vite Plugin Stack
|
|
244
|
+
|
|
245
|
+
`honeydeckPlugin()` returns an ordered plugin array. Ordering is significant:
|
|
246
|
+
|
|
247
|
+
1. `honeydeck:aliases`
|
|
248
|
+
- Maps public `honeydeck` imports and subpaths to local source files.
|
|
249
|
+
2. `honeydeck:tailwind-user-source`
|
|
250
|
+
- Injects Tailwind `@source` for user project scanning.
|
|
251
|
+
3. `honeydeck:token-manifest`
|
|
252
|
+
- Parses `src/theme/base.css` into `virtual:honeydeck/token-manifest`.
|
|
253
|
+
4. `honeydeck:virtual-modules`
|
|
254
|
+
- Splits deck MDX, serves virtual modules, watches imported MDX/docs/layout files, and handles HMR invalidation.
|
|
255
|
+
5. `@mdx-js/rollup`
|
|
256
|
+
- Compiles real and virtual MDX to React JSX.
|
|
257
|
+
6. `@tailwindcss/vite`
|
|
258
|
+
- Runs Tailwind v4 scan/generate plugins.
|
|
259
|
+
|
|
260
|
+
Virtual module handling must run before MDX compilation so virtual slide modules can provide raw `.mdx` source to `@mdx-js/rollup`.
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## MDX Compiler Pipeline
|
|
265
|
+
|
|
266
|
+
Honeydeck MDX compilation uses this remark plugin order:
|
|
267
|
+
|
|
268
|
+
1. `remarkFrontmatter`
|
|
269
|
+
2. `remarkGfm`
|
|
270
|
+
3. `remarkH1Extract`
|
|
271
|
+
4. `remarkStepNumbering`
|
|
272
|
+
5. `remarkShikiCodeBlocks`
|
|
273
|
+
|
|
274
|
+
Why order matters:
|
|
275
|
+
|
|
276
|
+
- Frontmatter must be parsed/removed before rendered output.
|
|
277
|
+
- GFM tables must exist before final MDX output.
|
|
278
|
+
- H1/frontmatter metadata must be extracted before runtime slide metadata is emitted.
|
|
279
|
+
- Step numbering must annotate reveals/code before Shiki code block replacement.
|
|
280
|
+
- Shiki replacement must run after step metadata exists.
|
|
281
|
+
|
|
282
|
+
Keep PDF step-count compilation in sync with this pipeline.
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Code Highlighting Internals
|
|
287
|
+
|
|
288
|
+
Honeydeck uses Shiki during MDX compilation.
|
|
289
|
+
|
|
290
|
+
Implementation contract:
|
|
291
|
+
|
|
292
|
+
- Syntax highlighting happens at build/dev transform time.
|
|
293
|
+
- Runtime JavaScript does not run a syntax highlighter.
|
|
294
|
+
- Runtime JavaScript only applies timeline dimming for step-through code blocks.
|
|
295
|
+
- Shiki is an internal Honeydeck dependency.
|
|
296
|
+
- Code highlighting colors come from Honeydeck's selected built-in Shiki themes (`github-light` and `github-dark`).
|
|
297
|
+
- Honeydeck does not expose Shiki theme configuration.
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## Slide Loading and MDX Imports
|
|
302
|
+
|
|
303
|
+
Deck loading starts from the selected deck entry path.
|
|
304
|
+
|
|
305
|
+
Implementation contracts:
|
|
306
|
+
|
|
307
|
+
- Default imports from relative `.mdx` files are structural slide imports.
|
|
308
|
+
- Imported MDX files are recursively expanded before final deck splitting.
|
|
309
|
+
- Circular MDX imports throw a clear error.
|
|
310
|
+
- Imported MDX frontmatter is slide-level only.
|
|
311
|
+
- Only standalone usage of an imported MDX component expands slides, e.g. `<DemoSlides />`.
|
|
312
|
+
- Relative non-MDX imports inside imported MDX files are rewritten to `/@fs/<absolute-path>` so Vite resolves them from their original file location.
|
|
313
|
+
- Code fences protect `---` from becoming slide separators.
|
|
314
|
+
|
|
315
|
+
Extensionless relative import resolution supports:
|
|
316
|
+
|
|
317
|
+
- `.tsx`
|
|
318
|
+
- `.ts`
|
|
319
|
+
- `.jsx`
|
|
320
|
+
- `.js`
|
|
321
|
+
- `.mdx`
|
|
322
|
+
- `.md`
|
|
323
|
+
- `.css`
|
|
324
|
+
- `index` files with those extensions
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Virtual Modules
|
|
329
|
+
|
|
330
|
+
Honeydeck runtime consumes virtual modules generated by the Vite plugin:
|
|
331
|
+
|
|
332
|
+
| Module | Purpose |
|
|
333
|
+
|--------|---------|
|
|
334
|
+
| `virtual:honeydeck/slide/N.mdx` | 0-based standalone compiled slide source |
|
|
335
|
+
| `virtual:honeydeck/slides` | Barrel of all slides plus slide count |
|
|
336
|
+
| `virtual:honeydeck/config` | Parsed deck-level frontmatter/config |
|
|
337
|
+
| `virtual:honeydeck/layouts` | Active layout map, layout names, discovered demos |
|
|
338
|
+
| `virtual:honeydeck/token-manifest` | Theme token manifest parsed from base CSS |
|
|
339
|
+
|
|
340
|
+
Virtual IDs use Vite's `\0` internal prefix after resolution so other plugins do not treat them as filesystem paths.
|
|
341
|
+
|
|
342
|
+
HMR strategy:
|
|
343
|
+
|
|
344
|
+
- Honeydeck caches split slide segments.
|
|
345
|
+
- On watched MDX changes, it re-splits the deck.
|
|
346
|
+
- Only changed virtual slide modules are invalidated when possible.
|
|
347
|
+
- Structural changes may force broader invalidation/full reload.
|
|
348
|
+
- Imported MDX, active layout files, and docs files are added to Vite's watcher.
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## Tailwind Integration
|
|
353
|
+
|
|
354
|
+
Honeydeck uses Tailwind v4 through `@tailwindcss/vite`.
|
|
355
|
+
|
|
356
|
+
User styling is explicit:
|
|
357
|
+
|
|
358
|
+
- Honeydeck does not auto-import Tailwind or theme CSS.
|
|
359
|
+
- Starter decks import `./styles.css` from `deck.mdx`.
|
|
360
|
+
- `styles.css` imports Tailwind and Honeydeck theme CSS.
|
|
361
|
+
|
|
362
|
+
Source scanning detail:
|
|
363
|
+
|
|
364
|
+
- During build/PDF, Vite root differs from the user project root.
|
|
365
|
+
- Tailwind could miss project-local MDX/TSX classes.
|
|
366
|
+
- Honeydeck injects `@source "<userRoot>";` into CSS files that import Tailwind.
|
|
367
|
+
- Injection is idempotent via a `honeydeck:tailwind-user-source` marker.
|
|
368
|
+
- Paths are normalized to forward slashes for cross-platform behavior.
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Theme Token Manifest
|
|
373
|
+
|
|
374
|
+
The reference pages' theme tab is backed by a token manifest generated from `src/theme/base.css`.
|
|
375
|
+
|
|
376
|
+
Implementation contract:
|
|
377
|
+
|
|
378
|
+
- Honeydeck parses `--honeydeck-*` declarations.
|
|
379
|
+
- Token descriptions come from preceding CSS comments when available.
|
|
380
|
+
- If duplicate token declarations exist, the first parsed declaration wins.
|
|
381
|
+
- The manifest is exposed through `virtual:honeydeck/token-manifest`.
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## Layout Demo Discovery
|
|
386
|
+
|
|
387
|
+
Reference pages show layout demos discovered at build/dev time.
|
|
388
|
+
|
|
389
|
+
Discovery rules:
|
|
390
|
+
|
|
391
|
+
- Honeydeck statically crawls analyzable active layout maps.
|
|
392
|
+
- It discovers colocated `demo` exports from layout modules.
|
|
393
|
+
- Dynamic maps, computed entries, or non-static imports may be skipped with warnings.
|
|
394
|
+
- Missing demos do not break layouts; reference pages show fallback hints.
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## PDF Export Internals
|
|
399
|
+
|
|
400
|
+
`honeydeck pdf` follows this internal workflow:
|
|
401
|
+
|
|
402
|
+
1. Parse CLI args.
|
|
403
|
+
2. Resolve deck entry path.
|
|
404
|
+
3. Load/split deck and parse deck frontmatter.
|
|
405
|
+
4. Resolve effective PDF options.
|
|
406
|
+
5. Build the presentation into a temporary directory.
|
|
407
|
+
6. Start a temporary local static server for that build.
|
|
408
|
+
7. Launch headless Chromium via Playwright.
|
|
409
|
+
8. Build an ordered slide/step capture plan.
|
|
410
|
+
9. Capture PNG screenshots with a bounded pool of Playwright pages.
|
|
411
|
+
10. Wait for React rendering before each screenshot.
|
|
412
|
+
11. Assemble pages into a PDF using `pdf-lib` in capture-plan order.
|
|
413
|
+
12. Close browser, stop server, and remove temp directory.
|
|
414
|
+
|
|
415
|
+
Implementation notes:
|
|
416
|
+
|
|
417
|
+
- PDF export must not pollute normal `dist/`.
|
|
418
|
+
- Static file serving must reject path traversal.
|
|
419
|
+
- Hash-only navigation is used after each worker page's first load where possible.
|
|
420
|
+
- Parallel screenshot capture must not change the final PDF page order.
|
|
421
|
+
- Browser page errors should fail the export with useful context.
|
|
422
|
+
- `--steps all` must use the same step-count semantics as runtime compilation.
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Local Package Testing
|
|
427
|
+
|
|
428
|
+
Link local CLI globally:
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
npm link
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
Then run from another folder:
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
honeydeck --help
|
|
438
|
+
honeydeck init --name demo-deck --skip-install
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Before Honeydeck is published, generated projects may need a local file dependency:
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
cd /path/to/generated-project
|
|
445
|
+
npm pkg set dependencies.honeydeck="file:/absolute/path/to/honeydeck"
|
|
446
|
+
rm -rf node_modules package-lock.json
|
|
447
|
+
npm install
|
|
448
|
+
npm run dev
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
---
|
|
452
|
+
|
|
453
|
+
## Release and Publish Checklist
|
|
454
|
+
|
|
455
|
+
Honeydeck releases are published from GitHub Actions after changes land on `main`.
|
|
456
|
+
Every merge to `main` must publish a new npm version. The release workflow
|
|
457
|
+
uses Conventional Commit subjects to derive the semantic version bump:
|
|
458
|
+
|
|
459
|
+
- breaking changes (`feat!:`, `fix!:`, or a `BREAKING CHANGE:` footer) bump major
|
|
460
|
+
- `feat:` bumps minor
|
|
461
|
+
- all other accepted Conventional Commit types bump patch
|
|
462
|
+
|
|
463
|
+
The release workflow does not use a long-lived npm token. It uses npm trusted
|
|
464
|
+
publishing through GitHub Actions OIDC:
|
|
465
|
+
|
|
466
|
+
The release workflow sets `package.json#repository` to the current
|
|
467
|
+
`github.repository` before publishing so npm trusted publishing can match the
|
|
468
|
+
package metadata to the authorized GitHub repository.
|
|
469
|
+
|
|
470
|
+
GitHub branch protection or rulesets must require the `Pull request title`,
|
|
471
|
+
`Lint`, `Typecheck`, `Test`, `Build`, and `Package` checks before merging to
|
|
472
|
+
`main`.
|
|
473
|
+
|
|
474
|
+
Before publishing or enabling automation:
|
|
475
|
+
|
|
476
|
+
1. Confirm the root spec map and colocated behavior specs match observable behavior.
|
|
477
|
+
2. Confirm `DEVELOPMENT.md` matches development workflow/architecture.
|
|
478
|
+
3. Run quality gates.
|
|
479
|
+
4. Confirm generated starter project works.
|
|
480
|
+
5. Confirm PDF export works if PDF-related code changed.
|
|
481
|
+
6. Check `package.json#files` includes required public docs/skills/spec/development files.
|
|
482
|
+
7. Check `package.json#exports` matches supported public imports.
|
|
483
|
+
8. Ensure no secrets, generated PDFs, tests, or local-only files are published.
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
## Repository Folder Structure
|
|
488
|
+
|
|
489
|
+
```txt
|
|
490
|
+
honeydeck/
|
|
491
|
+
src/
|
|
492
|
+
cli/ CLI commands, starter templates, and colocated CLI tests
|
|
493
|
+
runtime/ React app shell, router, slide runtime, views, components, and colocated runtime tests
|
|
494
|
+
vite-plugin/ Deck loading, virtual modules, layout demo crawl, token manifest, and colocated plugin tests
|
|
495
|
+
remark/ MDX/remark transforms for metadata, steps, code blocks, and colocated remark tests
|
|
496
|
+
layouts/ Built-in clean and bee layout maps/components and colocated layout tests
|
|
497
|
+
theme/ Base, clean, and bee CSS theme layers and colocated theme tests
|
|
498
|
+
defaults.ts Shared defaults such as default deck entry
|
|
499
|
+
assets.d.ts Static asset type declarations
|
|
500
|
+
docs/ Canonical Markdown docs synced into the marketing docs site
|
|
501
|
+
skills/ Bundled installable agent skills
|
|
502
|
+
Readme.md Compact package README and documentation index
|
|
503
|
+
SPEC.md Overview and navigation map for behavior specs
|
|
504
|
+
DEVELOPMENT.md Maintainer workflow and implementation architecture
|
|
505
|
+
package.json Package metadata, exports, scripts, dependencies
|
|
506
|
+
biome.json Formatter/linter config
|
|
507
|
+
tsconfig.json TypeScript config
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
Key source areas:
|
|
511
|
+
|
|
512
|
+
| Area | Files |
|
|
513
|
+
|------|-------|
|
|
514
|
+
| CLI | `src/cli/` |
|
|
515
|
+
| Vite plugin | `src/vite-plugin/` |
|
|
516
|
+
| Remark transforms | `src/remark/` |
|
|
517
|
+
| Runtime app | `src/runtime/` |
|
|
518
|
+
| Built-in layouts | `src/layouts/` |
|
|
519
|
+
| Theme CSS | `src/theme/` |
|
|
520
|
+
| Starter templates | `src/cli/templates/starter/` |
|
|
521
|
+
| Agent skills | `skills/` |
|
|
522
|
+
| Tests | Colocated `*.test.ts` / `*.test.tsx` and fixtures beside implementations |
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hendrik Wallbaum
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/Readme.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Honeydeck
|
|
2
|
+
|
|
3
|
+
> MDX and React-based presentation framework. Start with plain Markdown, grow to interactive React components.
|
|
4
|
+
|
|
5
|
+
Honeydeck helps you create polished, interactive presentations from plain-text MDX. Write slides in Markdown, add React components when you need them, and present with built-in layouts, speaker notes, presenter mode, and PDF export.
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @honeydeck/honeydeck init --name awesome-talk
|
|
11
|
+
cd awesome-talk
|
|
12
|
+
npm run dev
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Open the local URL printed by the dev server, edit `deck.mdx`, and your slides update instantly.
|
|
16
|
+
|
|
17
|
+
Decks are plain MDX files separated into slides with `---`; see the first deck example in [Getting started](docs/getting-started.md).
|
|
18
|
+
|
|
19
|
+
## Documentation
|
|
20
|
+
|
|
21
|
+
- [Getting started](docs/getting-started.md) - first deck, first commands, and the shortest path to presenting
|
|
22
|
+
- [Next steps](docs/next-steps.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
|
+
- [Kits](docs/kits.md) - themes, layout sets, Tailwind tokens, and third-party kits
|
|
28
|
+
- [Kit authoring](docs/kit-authoring.md) - layout maps, layout props, demos, and design tokens for kit authors
|
|
29
|
+
- [Navigation](docs/navigation.md) - keyboard, touch, overview mode, and URL state
|
|
30
|
+
- [Mobile and touch](docs/mobile.md) - mobile controls, touch gestures, and pinch zoom
|
|
31
|
+
- [Presenter mode](docs/presenter-mode.md) - notes, presenter window, sync, and mobile behavior
|
|
32
|
+
- [PDF export](docs/pdf-export.md) - options, color modes, and step handling
|
|
33
|
+
- [Local development](docs/local-development.md) - running Honeydeck from this repository
|
|
34
|
+
- [Slidev migration](docs/slidev-migration.md) - moving from Slidev with the bundled agent skill
|
|
35
|
+
|
|
36
|
+
## Common commands
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
honeydeck dev # start dev server on port 4200
|
|
40
|
+
honeydeck dev --open # start and open the browser
|
|
41
|
+
honeydeck dev --deck talk.mdx # use a custom deck entry file
|
|
42
|
+
|
|
43
|
+
honeydeck build # build a static SPA into dist/
|
|
44
|
+
honeydeck pdf # export deck.pdf
|
|
45
|
+
honeydeck pdf --steps all # export every timeline step
|
|
46
|
+
honeydeck skill # install optional Honeydeck agent skills
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Honeydeck is built with MDX, React, Vite, and Tailwind v4.
|