@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/SPEC.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Honeydeck — Application Specification
|
|
2
|
+
|
|
3
|
+
> MDX and React-based presentation framework. Start with plain Markdown, grow to interactive React components.
|
|
4
|
+
|
|
5
|
+
This root spec is the overview and navigation device. Detailed observable behavior lives in colocated `SPEC.md` files near the implementation that owns it.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Honeydeck is the public CLI-first TypeScript package inside the Honeydeck monorepo. It builds slide presentations from MDX files and targets developers who want Markdown simplicity with React power when needed.
|
|
12
|
+
|
|
13
|
+
The Honeydeck specification is distributed:
|
|
14
|
+
|
|
15
|
+
- `SPEC.md` gives package overview, principles, public model, and links.
|
|
16
|
+
- Colocated `SPEC.md` files define detailed observable behavior for each implementation area.
|
|
17
|
+
- `DEVELOPMENT.md` covers implementation workflow, local development, architecture, testing, and release mechanics.
|
|
18
|
+
|
|
19
|
+
### Guiding Principles
|
|
20
|
+
|
|
21
|
+
- **Ease of use** — quick to write slides
|
|
22
|
+
- **Fun to use** — not boilerplate-heavy, playful DX
|
|
23
|
+
- **No magic** — explicit imports, no user-content auto-discovery
|
|
24
|
+
- **Progressive complexity** — `deck.mdx` works with built-in layouts; built-in styling requires an explicit CSS import (scaffolded by `honeydeck init`)
|
|
25
|
+
- **Tooling-ready architecture** — explicit metadata supports editor tooling without impacting runtime
|
|
26
|
+
|
|
27
|
+
### Public Technical Model
|
|
28
|
+
|
|
29
|
+
| Concern | Public contract | Detailed spec |
|
|
30
|
+
|---------|-----------------|---------------|
|
|
31
|
+
| Runtime | Node.js CLI binary from the scoped `@honeydeck/honeydeck` package | [`src/cli/SPEC.md`](src/cli/SPEC.md) |
|
|
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
|
+
| 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) |
|
|
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) |
|
|
37
|
+
| Icons | `lucide-react` suffixed `...Icon` component imports | [`src/SPEC.md`](src/SPEC.md) |
|
|
38
|
+
| Public imports | Explicit import subpaths for components, layouts, themes, and types | [`src/SPEC.md`](src/SPEC.md) |
|
|
39
|
+
|
|
40
|
+
### Dependency Policy
|
|
41
|
+
|
|
42
|
+
- `react`, `react-dom`, and Tailwind are peer dependencies of `honeydeck`.
|
|
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
|
+
- Generated projects use compatible semver ranges for React, Tailwind, TypeScript, and types.
|
|
45
|
+
- Published third-party kits are plain npm packages; supported runtime ranges are managed by package metadata, not by a Honeydeck-specific mechanism.
|
|
46
|
+
- 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
|
+
---
|
|
49
|
+
|
|
50
|
+
## Spec Map
|
|
51
|
+
|
|
52
|
+
| Area | Spec | Owns |
|
|
53
|
+
|------|------|------|
|
|
54
|
+
| CLI | [`src/cli/SPEC.md`](src/cli/SPEC.md) | `honeydeck`, `init`, `skill`, `dev`, `build`, `pdf`, CLI output, PDF export |
|
|
55
|
+
| Starter templates | [`src/cli/templates/SPEC.md`](src/cli/templates/SPEC.md) | generated project tree, starter `deck.mdx`, `styles.css`, demo component |
|
|
56
|
+
| Agent skills | [`skills/SPEC.md`](skills/SPEC.md) | bundled installable skills and installer expectations |
|
|
57
|
+
| 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
|
+
| 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 views | [`src/runtime/views/SPEC.md`](src/runtime/views/SPEC.md) | presenter mode, overview mode, theme/layout/component reference pages |
|
|
62
|
+
| Layouts and kits | [`src/layouts/SPEC.md`](src/layouts/SPEC.md) | kit model, built-in layouts, layout props, demos, layout resolution |
|
|
63
|
+
| Theme | [`src/theme/SPEC.md`](src/theme/SPEC.md) | design tokens, base theme CSS, Tailwind mapping, color mode behavior |
|
|
64
|
+
| Public exports | [`src/SPEC.md`](src/SPEC.md) | import paths and public TypeScript types |
|
|
65
|
+
| Public release governance | Repository root `.github/SPEC.md` | protected branch, CI checks, PR title contract, publishing automation; repository-only, not shipped in the npm package |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Reading Rules
|
|
70
|
+
|
|
71
|
+
- Treat every colocated `SPEC.md` as part of the application specification.
|
|
72
|
+
- If specs disagree, the more specific colocated spec owns behavior for its area; update both the owner spec and this map if ownership changes.
|
|
73
|
+
- Behavior changes must update the owning spec before implementation changes.
|
|
74
|
+
- Implementation-only details belong in `DEVELOPMENT.md`, not in behavior specs.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Summary
|
|
79
|
+
|
|
80
|
+
Honeydeck prioritizes:
|
|
81
|
+
|
|
82
|
+
1. **Zero to presenting** — a plain `deck.mdx` works with built-in layouts, even before CSS is imported.
|
|
83
|
+
2. **Progressive power** — add explicit CSS imports, React, custom layout maps, and kits as needed.
|
|
84
|
+
3. **Explicit composition** — see imports and configuration; no user-content auto-discovery and no automatic theme CSS injection.
|
|
85
|
+
4. **Presentation-native** — timeline, steps, presenter mode, runtime reference pages, and PDF export built in.
|
|
86
|
+
5. **Fun** — starter sparkle button, tasteful CLI output, playful defaults.
|
|
87
|
+
|
|
88
|
+
Architecture keeps editor tooling (language server, schema generation) possible without impacting runtime.
|
|
@@ -0,0 +1,63 @@
|
|
|
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.
|
|
25
|
+
|
|
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
|
+
```
|
|
55
|
+
|
|
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:
|
|
57
|
+
|
|
58
|
+
```mdx
|
|
59
|
+
<Keyboard keys={["⌘", "K"]} />
|
|
60
|
+
<Keyboard keys={["Ctrl", "Alt", "Delete"]} separator=" " />
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The component is inline by default, uses Honeydeck theme styling, supports `className`, and does not add timeline steps.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
All settings live in YAML frontmatter — no separate config file.
|
|
4
|
+
|
|
5
|
+
## Deck-Level Settings
|
|
6
|
+
|
|
7
|
+
Defined in the first frontmatter block of the deck entry file (before any slide content):
|
|
8
|
+
|
|
9
|
+
| Property | Type | Default | Description |
|
|
10
|
+
|----------|------|---------|-------------|
|
|
11
|
+
| `title` | `string` | `""` | Deck title (HTML `<title>`, metadata) |
|
|
12
|
+
| `description` | `string` | `""` | Deck description (metadata) |
|
|
13
|
+
| `aspectRatio` | `"n:n"` | `"16:9"` | Slide canvas aspect ratio |
|
|
14
|
+
| `colorMode` | `"system" \| "light" \| "dark"` | `"system"` | Browser color mode |
|
|
15
|
+
| `pdfColorMode` | `"light" \| "dark"` | unset | Optional PDF color mode; when unset, falls back to pinned `colorMode`, then `light` |
|
|
16
|
+
| `pdfSteps` | `"final" \| "all"` | `"final"` | PDF includes all steps or final state |
|
|
17
|
+
| `transition` | `boolean` | `true` | Enable crossfade between slides |
|
|
18
|
+
| `layouts` | `string` | `""` (built-in) | Layout map module path |
|
|
19
|
+
| `defaultLayout` | `string` | `"Default"` | Layout used when slide has no `layout:` |
|
|
20
|
+
| `showSlideNumbers` | `boolean` | `false` | Show the current slide number in the bottom-right corner of slides |
|
|
21
|
+
|
|
22
|
+
### Aspect Ratio
|
|
23
|
+
|
|
24
|
+
Slides are fixed-ratio canvases, not scrolling pages. Accepted values are `"number:number"` strings:
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
aspectRatio: "16:9"
|
|
28
|
+
aspectRatio: "4:3"
|
|
29
|
+
aspectRatio: "1:1"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Named presets, CSS syntax, and numeric values are not supported.
|
|
33
|
+
|
|
34
|
+
### Color Mode
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
colorMode: system # follow OS preference (default)
|
|
38
|
+
colorMode: light # pin to light
|
|
39
|
+
colorMode: dark # pin to dark
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
When pinned, the viewer cannot switch mode from navigation controls.
|
|
43
|
+
|
|
44
|
+
### Transitions
|
|
45
|
+
|
|
46
|
+
A subtle crossfade (~200ms) is applied between slides by default:
|
|
47
|
+
|
|
48
|
+
```yaml
|
|
49
|
+
transition: true # default
|
|
50
|
+
transition: false # disable
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Slide-Level Settings
|
|
54
|
+
|
|
55
|
+
Per-slide frontmatter (after `---`):
|
|
56
|
+
|
|
57
|
+
| Property | Type | Default | Description |
|
|
58
|
+
|----------|------|---------|-------------|
|
|
59
|
+
| `layout` | `string` | (uses `defaultLayout`) | Layout to use (PascalCase) |
|
|
60
|
+
| ...layout props | varies | — | Additional props the layout accepts |
|
|
61
|
+
|
|
62
|
+
Example:
|
|
63
|
+
|
|
64
|
+
```mdx
|
|
65
|
+
---
|
|
66
|
+
layout: Cover
|
|
67
|
+
author: Hendrik
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
# Welcome
|
|
71
|
+
|
|
72
|
+
A modern slide framework.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For the opening slide, `layout:` and its layout-specific fields may also live
|
|
76
|
+
in the first frontmatter block alongside deck-level settings.
|
|
77
|
+
|
|
78
|
+
## Minimal Generated Deck
|
|
79
|
+
|
|
80
|
+
`honeydeck init` generates frontmatter that keeps the clean defaults explicit and easy to swap:
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
---
|
|
84
|
+
title: "My First Deck"
|
|
85
|
+
colorMode: system
|
|
86
|
+
layouts: "@honeydeck/honeydeck/layouts"
|
|
87
|
+
layout: Cover
|
|
88
|
+
---
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Use `layouts: "./layouts"` for custom layouts or `layouts: "@honeydeck/honeydeck/layouts/bee"` for the playful Bee layouts.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Getting started
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
Create a deck:
|
|
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
|
+
Build or export when you are ready:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm run build
|
|
21
|
+
npm run pdf
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Running `honeydeck` with no subcommand shows CLI help.
|
|
25
|
+
|
|
26
|
+
## Your first deck
|
|
27
|
+
|
|
28
|
+
Decks are MDX files. The first frontmatter block configures the deck and opening slide. Later `---` separators start new slides.
|
|
29
|
+
|
|
30
|
+
```mdx
|
|
31
|
+
---
|
|
32
|
+
title: My Talk
|
|
33
|
+
layout: Cover
|
|
34
|
+
author: Your Name
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# My Talk
|
|
38
|
+
|
|
39
|
+
Start with Markdown.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
layout: TwoCol
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
import { Left, Right } from '@honeydeck/honeydeck/layouts/TwoCol'
|
|
46
|
+
|
|
47
|
+
<Left>
|
|
48
|
+
|
|
49
|
+
## Idea
|
|
50
|
+
|
|
51
|
+
- Plain text
|
|
52
|
+
- Easy to edit
|
|
53
|
+
|
|
54
|
+
</Left>
|
|
55
|
+
|
|
56
|
+
<Right>
|
|
57
|
+
|
|
58
|
+
## Demo
|
|
59
|
+
|
|
60
|
+
Add React when it helps.
|
|
61
|
+
|
|
62
|
+
</Right>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Use `layout:` to choose a slide layout. Built-in layouts include `Blank`, `Default`, `Cover`, `Section`, `TwoCol`, `Image`, `ImageLeft`, and `ImageRight`.
|
|
66
|
+
|
|
67
|
+
## What Honeydeck gives you
|
|
68
|
+
|
|
69
|
+
- MDX slides with GitHub-flavored Markdown
|
|
70
|
+
- Vite dev/build with hot reload
|
|
71
|
+
- Built-in layouts and theme tokens
|
|
72
|
+
- Tailwind v4-friendly styling
|
|
73
|
+
- Reveal steps and code step-through
|
|
74
|
+
- Presenter mode with speaker notes
|
|
75
|
+
- Overview mode, keyboard/touch navigation, and URL state
|
|
76
|
+
- PDF export through headless Chromium
|
|
77
|
+
- Optional Honeydeck agent skills for writing and migration help
|
|
78
|
+
|
|
79
|
+
## Common commands
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
honeydeck dev # start dev server on port 4200
|
|
83
|
+
honeydeck dev --open # start and open the browser
|
|
84
|
+
honeydeck dev --deck talk.mdx # use a custom deck entry file
|
|
85
|
+
|
|
86
|
+
honeydeck build # build a static SPA into dist/
|
|
87
|
+
honeydeck pdf # export deck.pdf
|
|
88
|
+
honeydeck pdf --steps all # export every timeline step
|
|
89
|
+
honeydeck skill # install optional Honeydeck agent skills
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Where to go next
|
|
93
|
+
|
|
94
|
+
- [Next steps](next-steps.md) - CLI options, authoring patterns, imports, themes, architecture, and agent skills in one follow-up guide
|
|
95
|
+
- [Slides](slides.md) - separators, multiple files, layouts, and assets
|
|
96
|
+
- [Configuration](configuration.md) - deck-level and slide-level frontmatter
|
|
97
|
+
- [Steps and reveals](steps-and-reveals.md) - timeline, reveal groups, code steps, and PDF behavior
|
|
98
|
+
- [Components](components.md) - core Honeydeck components such as `BrowserFrame` and `Keyboard`
|
|
99
|
+
- [Kits](kits.md) - themes, layout sets, Tailwind tokens, and third-party kits
|
|
100
|
+
- [Kit authoring](kit-authoring.md) - layout maps, layout props, demos, and design tokens for kit authors
|
|
101
|
+
- [Navigation](navigation.md) - keyboard, touch, overview mode, and URL state
|
|
102
|
+
- [Mobile and touch](mobile.md) - mobile controls, touch gestures, and pinch zoom
|
|
103
|
+
- [Presenter mode](presenter-mode.md) - notes, presenter window, sync, and mobile behavior
|
|
104
|
+
- [PDF export](pdf-export.md) - options, color modes, and step handling
|
|
105
|
+
- [Local development](local-development.md) - running Honeydeck from this repository
|
|
106
|
+
- [Slidev migration](slidev-migration.md) - moving from Slidev with the bundled agent skill
|
|
107
|
+
|
|
108
|
+
## Learn inside a running deck
|
|
109
|
+
|
|
110
|
+
During development, open the runtime reference pages to see:
|
|
111
|
+
|
|
112
|
+
- theme token names and live computed values
|
|
113
|
+
- layout previews with copyable usage snippets
|
|
114
|
+
- built-in component docs
|
|
115
|
+
|
|
116
|
+
Honeydeck is built with MDX, React, Vite, and Tailwind v4.
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Kit Authoring
|
|
2
|
+
|
|
3
|
+
Guide for building reusable Honeydeck kits (themes, layouts, components).
|
|
4
|
+
|
|
5
|
+
## Type Exports
|
|
6
|
+
|
|
7
|
+
All types for kit authors come from the `'honeydeck'` package:
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import type { LayoutProps, LayoutMap, LayoutDemo } from '@honeydeck/honeydeck'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
| Type | Purpose |
|
|
14
|
+
|------|---------|
|
|
15
|
+
| `LayoutProps<F>` | Props passed to layout components (generic for frontmatter) |
|
|
16
|
+
| `LayoutMap` | `Record<string, ComponentType<LayoutProps<any>>>` |
|
|
17
|
+
| `LayoutDemo<F>` | Demo data for the docs reference page |
|
|
18
|
+
|
|
19
|
+
## Layout Map
|
|
20
|
+
|
|
21
|
+
The `layouts:` frontmatter resolves to a module that default-exports a `LayoutMap`:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import type { LayoutMap } from '@honeydeck/honeydeck'
|
|
25
|
+
import { BlankLayout } from './Blank'
|
|
26
|
+
import { DefaultLayout } from './Default'
|
|
27
|
+
import { CoverLayout } from './Cover'
|
|
28
|
+
import { SectionLayout } from './Section'
|
|
29
|
+
import { TwoColLayout } from './TwoCol'
|
|
30
|
+
import { ImageLayout } from './Image'
|
|
31
|
+
import { ImageLeftLayout } from './ImageLeft'
|
|
32
|
+
import { ImageRightLayout } from './ImageRight'
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
Blank: BlankLayout,
|
|
36
|
+
Default: DefaultLayout,
|
|
37
|
+
Cover: CoverLayout,
|
|
38
|
+
Section: SectionLayout,
|
|
39
|
+
TwoCol: TwoColLayout,
|
|
40
|
+
Image: ImageLayout,
|
|
41
|
+
ImageLeft: ImageLeftLayout,
|
|
42
|
+
ImageRight: ImageRightLayout,
|
|
43
|
+
} satisfies LayoutMap
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Layout Props
|
|
47
|
+
|
|
48
|
+
`LayoutProps` is generic so layouts can type their accepted frontmatter:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
type LayoutProps<F extends Record<string, unknown> = Record<string, unknown>> = {
|
|
52
|
+
title: ReactNode | null // extracted first h1 content
|
|
53
|
+
children: ReactNode // remaining content (h1 removed)
|
|
54
|
+
rawChildren: ReactNode // full unmodified content (h1 included)
|
|
55
|
+
frontmatter: F
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Example typed layout:
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
import type { LayoutProps } from '@honeydeck/honeydeck'
|
|
63
|
+
|
|
64
|
+
type CoverFrontmatter = {
|
|
65
|
+
author?: string
|
|
66
|
+
date?: string
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function CoverLayout({ title, children, frontmatter }: LayoutProps<CoverFrontmatter>) {
|
|
70
|
+
const { author, date } = frontmatter
|
|
71
|
+
return (/* ... */)
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
This enables a future language server to extract frontmatter types for autocomplete.
|
|
76
|
+
|
|
77
|
+
## Image Helpers
|
|
78
|
+
|
|
79
|
+
Custom layouts can import `ColorModeImage` from `honeydeck` to render optional light/dark image variants with Honeydeck's Tailwind color-mode utilities:
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
import { ColorModeImage } from '@honeydeck/honeydeck'
|
|
83
|
+
|
|
84
|
+
<ColorModeImage src={image} darkSrc={darkImage} alt={alt} />
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Layout Demos
|
|
88
|
+
|
|
89
|
+
Layouts optionally export a `demo` constant for the docs reference page:
|
|
90
|
+
|
|
91
|
+
```tsx
|
|
92
|
+
import type { LayoutProps, LayoutDemo } from '@honeydeck/honeydeck'
|
|
93
|
+
|
|
94
|
+
type CoverFrontmatter = {
|
|
95
|
+
/** Speaker or organization shown below the title. */
|
|
96
|
+
author?: string
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function CoverLayout({ title, children, frontmatter }: LayoutProps<CoverFrontmatter>) {
|
|
100
|
+
const { author } = frontmatter
|
|
101
|
+
return (/* ... */)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export const demo: LayoutDemo<CoverFrontmatter> = {
|
|
105
|
+
mdx: `---
|
|
106
|
+
layout: Cover
|
|
107
|
+
author: Hendrik
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
# Welcome to My Talk
|
|
111
|
+
|
|
112
|
+
Building the future of presentations.`,
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
`mdx` is the single source for both the live visual preview and the copyable usage snippet. Honeydeck compiles it with the slide MDX pipeline, extracts frontmatter/title/steps, and renders it through the active layout map.
|
|
117
|
+
|
|
118
|
+
If no static `demo.mdx` is exported, the layout still appears in `/#/layouts` with a “No demo MDX provided” hint.
|
|
119
|
+
|
|
120
|
+
## Slot Components
|
|
121
|
+
|
|
122
|
+
Layouts that need content slots (like `TwoCol`) export slot components alongside the layout:
|
|
123
|
+
|
|
124
|
+
```tsx
|
|
125
|
+
// layouts/TwoCol.tsx
|
|
126
|
+
import type { LayoutProps } from '@honeydeck/honeydeck'
|
|
127
|
+
import type { ReactNode } from 'react'
|
|
128
|
+
|
|
129
|
+
export function Left({ children }: { children: ReactNode }) { /* ... */ }
|
|
130
|
+
export function Right({ children }: { children: ReactNode }) { /* ... */ }
|
|
131
|
+
|
|
132
|
+
export default function TwoColLayout({ title, children }: LayoutProps) {
|
|
133
|
+
return (/* ... */)
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Users import slots from the layout path:
|
|
138
|
+
|
|
139
|
+
```mdx
|
|
140
|
+
import { Left, Right } from '@honeydeck/honeydeck/layouts/TwoCol'
|
|
141
|
+
import { Left, Right } from '@company/honeydeck-kit-brand/layouts/TwoCol'
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Runtime Reference
|
|
145
|
+
|
|
146
|
+
Honeydeck includes built-in runtime reference pages in dev and production builds:
|
|
147
|
+
|
|
148
|
+
- **Theme tab (`/#/theme`):** All `--honeydeck-*` CSS tokens with computed values and descriptions.
|
|
149
|
+
- **Layouts tab (`/#/layouts`):** All layouts currently available in the active deck layout map, live visual previews rendered from `demo.mdx`, copyable usage snippets from the same MDX source, and prop docs extracted from `LayoutProps<Frontmatter>` field comments.
|
|
150
|
+
- **Components tab (`/#/components`):** Public built-in components exported from `@honeydeck/honeydeck/components`, generated documentation from exported component JSDoc comments interpreted as Markdown/MDX, side navigation, and params tables extracted from exported props types.
|
|
151
|
+
|
|
152
|
+
Package Markdown guides are published through the Honeydeck docs site rather than rendered as in-deck pages.
|
|
153
|
+
|
|
154
|
+
Token descriptions are extracted from CSS comments preceding `--honeydeck-*` declarations at build time.
|
|
155
|
+
|
|
156
|
+
## Dependency Policy
|
|
157
|
+
|
|
158
|
+
- `honeydeck` and kits declare `react` and `react-dom` as `peerDependencies`.
|
|
159
|
+
- Kits may declare compatible `honeydeck` versions via `peerDependencies`.
|
|
160
|
+
- Kits using Tailwind declare compatible Tailwind versions as peer dependencies.
|
|
161
|
+
- Generated slide projects install concrete dependency versions.
|
|
162
|
+
|
|
163
|
+
## Design Tokens
|
|
164
|
+
|
|
165
|
+
Themes provide CSS custom properties. Colors derive from a primary using `oklch` relative color syntax, with separate values for light and dark modes:
|
|
166
|
+
|
|
167
|
+
```css
|
|
168
|
+
[data-honeydeck-color-mode="light"] {
|
|
169
|
+
--honeydeck-primary: oklch(50% 0.2 250);
|
|
170
|
+
--honeydeck-background: oklch(from var(--honeydeck-primary) 98% 0.01 h);
|
|
171
|
+
--honeydeck-foreground: oklch(from var(--honeydeck-primary) 15% 0.02 h);
|
|
172
|
+
--honeydeck-surface: oklch(from var(--honeydeck-primary) 94% 0.02 h);
|
|
173
|
+
/* ... */
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Full token list:
|
|
178
|
+
|
|
179
|
+
| Token | Purpose |
|
|
180
|
+
|-------|---------|
|
|
181
|
+
| `--honeydeck-primary` | Brand color for this mode |
|
|
182
|
+
| `--honeydeck-primary-foreground` | Text on primary backgrounds |
|
|
183
|
+
| `--honeydeck-background` | Main slide background |
|
|
184
|
+
| `--honeydeck-foreground` | Main text color |
|
|
185
|
+
| `--honeydeck-surface` | Cards, code blocks, callouts |
|
|
186
|
+
| `--honeydeck-surface-foreground` | Text on surfaces |
|
|
187
|
+
| `--honeydeck-border` | Border/divider color |
|
|
188
|
+
| `--honeydeck-accent` | Accent, computed as complementary by default |
|
|
189
|
+
| `--honeydeck-accent-foreground` | Text on accent backgrounds |
|
|
190
|
+
| `--honeydeck-link-color` | Link color (default: inherit) |
|
|
191
|
+
| `--honeydeck-border-radius` | Default border radius |
|
|
192
|
+
| `--honeydeck-font-heading` | Heading font family |
|
|
193
|
+
| `--honeydeck-font-body` | Body font family |
|
|
194
|
+
| `--honeydeck-font-mono` | Monospace font family |
|
|
195
|
+
| `--honeydeck-font-base` | Base font size (default: 16px) |
|
|
196
|
+
| `--honeydeck-font-scale` | Heading scale factor (default: 1.25) |
|
|
197
|
+
| `--honeydeck-code-line-dim-opacity` | Dim opacity for non-highlighted code lines |
|
|
198
|
+
|
|
199
|
+
## Tailwind Mapping
|
|
200
|
+
|
|
201
|
+
All tokens are mapped to Tailwind utilities:
|
|
202
|
+
|
|
203
|
+
```mdx
|
|
204
|
+
<div className="bg-surface text-surface-foreground border border-border rounded-honeydeck">
|
|
205
|
+
Card content
|
|
206
|
+
</div>
|
|
207
|
+
```
|