@honeydeck/honeydeck 0.1.2 → 0.2.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/docs/kits.md DELETED
@@ -1,387 +0,0 @@
1
- # Customization - Kits
2
-
3
- Honeydeck works out of the box with sensible defaults. Customize progressively — override a color, swap a layout, or adopt a full kit from npm.
4
-
5
- ## Zero Config
6
-
7
- A plain deck needs no imports or configuration:
8
-
9
- ```mdx
10
- # Hello world
11
-
12
- This just works with built-in styling.
13
- ```
14
-
15
- Honeydeck automatically loads base CSS with default design tokens and the built-in layout set.
16
-
17
- ## Customizing Colors & Typography
18
-
19
- Import a CSS file to override design tokens. The cascade does the rest:
20
-
21
- ```mdx
22
- import './my-theme.css'
23
-
24
- # Now with my brand colors
25
- ```
26
-
27
- ```css
28
- /* my-theme.css */
29
- :root {
30
- --honeydeck-primary: oklch(55% 0.25 280);
31
- --honeydeck-font-heading: 'Playfair Display', serif;
32
- --honeydeck-border-radius: 1rem;
33
- }
34
- ```
35
-
36
- You only override what you want — everything else keeps its default. Both light and dark modes can be targeted:
37
-
38
- ```css
39
- [data-honeydeck-color-mode="light"] {
40
- --honeydeck-primary: oklch(50% 0.2 250);
41
- }
42
-
43
- [data-honeydeck-color-mode="dark"] {
44
- --honeydeck-primary: oklch(70% 0.2 250);
45
- }
46
- ```
47
-
48
- ### Available Tokens
49
-
50
- | Token | Purpose |
51
- |-------|---------|
52
- | `--honeydeck-primary` | Brand color (per mode) |
53
- | `--honeydeck-background` | Slide background |
54
- | `--honeydeck-foreground` | Main text color |
55
- | `--honeydeck-surface` | Cards, code blocks, callouts |
56
- | `--honeydeck-border` | Border/divider color |
57
- | `--honeydeck-accent` | Accent, computed as complementary by default |
58
- | `--honeydeck-font-heading` | Heading font family |
59
- | `--honeydeck-font-body` | Body font family |
60
- | `--honeydeck-font-mono` | Monospace font family |
61
- | `--honeydeck-font-base` | Base font size (default: 16px) |
62
- | `--honeydeck-font-scale` | Heading scale factor (default: 1.25) |
63
- | `--honeydeck-border-radius` | Default border radius |
64
- | `--honeydeck-code-line-dim-opacity` | Dim for non-highlighted code lines |
65
-
66
- → Full token reference in [Kit Authoring](kit-authoring.md#design-tokens)
67
-
68
- ### Bundled Themes
69
-
70
- Honeydeck defaults to a clean black, white, and grey theme:
71
-
72
- ```css
73
- @import "tailwindcss";
74
- @import "@honeydeck/honeydeck/theme.css";
75
- ```
76
-
77
- `@honeydeck/honeydeck/themes/clean.css` is available as an optional clean theme layer when you want to name that layer directly.
78
-
79
- Honeydeck also includes a Bee theme that can be layered on top of the base theme:
80
-
81
- ```css
82
- @import "tailwindcss";
83
- @import "@honeydeck/honeydeck/theme.css";
84
- @import "@honeydeck/honeydeck/themes/bee.css";
85
- ```
86
-
87
- ### Bundled Layout Sets
88
-
89
- The default layout set is clean and minimal:
90
-
91
- ```yaml
92
- ---
93
- layouts: "@honeydeck/honeydeck/layouts"
94
- ---
95
- ```
96
-
97
- The same clean set is also available through the named clean kit import path `@honeydeck/honeydeck/layouts/clean`.
98
-
99
- Use the Bee layout set with the Bee theme when you want the original playful Bee look:
100
-
101
- ```yaml
102
- ---
103
- layouts: "@honeydeck/honeydeck/layouts/bee"
104
- ---
105
- ```
106
-
107
- For two-column slides, import slots from the matching layout set:
108
-
109
- ```mdx
110
- // Clean default
111
- import { Left, Right } from '@honeydeck/honeydeck/layouts/TwoCol'
112
- ```
113
-
114
- ```mdx
115
- // Bee layout set
116
- import { Left, Right } from '@honeydeck/honeydeck/layouts/bee/TwoCol'
117
- ```
118
-
119
- ### Using Tailwind
120
-
121
- Tokens are mapped to Tailwind utilities, so you can use them inline:
122
-
123
- ```mdx
124
- <div className="bg-surface text-surface-foreground border border-border rounded-honeydeck">
125
- Styled with theme tokens
126
- </div>
127
- ```
128
-
129
- ## Using Layouts
130
-
131
- in your decks frontmatter, configure which layouts to use:
132
-
133
- ```yaml
134
- ---
135
- layouts: "awsome-kit/layouts"
136
- ---
137
- ```
138
-
139
- Select a layout in slide frontmatter:
140
-
141
- ```yaml
142
- ---
143
- layout: Section
144
- ---
145
-
146
- # Big Idea
147
- ```
148
-
149
- If no `layout:` is specified, `Default` is used. Layout names are PascalCase.
150
-
151
- ### Built-in Layouts
152
-
153
- | Layout | Description |
154
- |--------|-------------|
155
- | `Blank` | Empty slide with only children |
156
- | `Default` | Title top-left, body flows below |
157
- | `Section` | Big centered heading for section breaks |
158
- | `Cover` | Opening/closing slide (title, body, author) |
159
- | `TwoCol` | Two equal columns |
160
- | `Image` | Prominent image with optional title and children |
161
- | `ImageLeft` | Prominent left image with title and body on the right |
162
- | `ImageRight` | Prominent right image with title and body on the left |
163
-
164
- ### Passing Props to Layouts
165
-
166
- Layouts receive extra frontmatter fields as props; Cover body copy belongs in the slide content:
167
-
168
- ```mdx
169
- ---
170
- layout: Cover
171
- author: You_Name_Here
172
- ---
173
-
174
- # Honeydeck
175
-
176
- A modern slide framework.
177
- ```
178
-
179
- ### Two-Column Layout
180
-
181
- `TwoCol` uses slot components you import:
182
-
183
- ```mdx
184
- ---
185
- layout: TwoCol
186
- ---
187
-
188
- import { Left, Right } from '@honeydeck/honeydeck/layouts/TwoCol'
189
-
190
- <Left>
191
- ## Benefits
192
- - Fast iteration
193
- - Live reload
194
- </Left>
195
-
196
- <Right>
197
- ## Trade-offs
198
- - Requires Node.js
199
- </Right>
200
- ```
201
-
202
- ### Image Layout
203
-
204
- Displays a specified image large and prominent:
205
-
206
- ```yaml
207
- ---
208
- layout: Image
209
- image: /diagrams/architecture.png
210
- darkImage: /diagrams/architecture-dark.png
211
- ---
212
-
213
- # System Architecture
214
-
215
- Our distributed system.
216
- ```
217
-
218
- ### Side Image Layouts
219
-
220
- `ImageLeft` and `ImageRight` place the image beside the content while using the same `image`, `darkImage`, and `alt` frontmatter as `Image`:
221
-
222
- ```yaml
223
- ---
224
- layout: ImageRight
225
- image: /photos/launch.jpg
226
- darkImage: /photos/launch-dark.jpg
227
- alt: Launch moment
228
- ---
229
-
230
- # Launch Moment
231
-
232
- Supporting context sits beside the image.
233
- ```
234
-
235
- ## Creating Custom Layouts
236
-
237
- Custom layouts are React components you import and wrap content with:
238
-
239
- ```tsx
240
- // components/GradientLayout.tsx
241
- import type { ReactNode } from 'react'
242
-
243
- export function GradientLayout({ children }: { children: ReactNode }) {
244
- return (
245
- <div className="grid place-items-center h-full bg-gradient-to-br from-purple-900 to-indigo-900 text-white p-12">
246
- {children}
247
- </div>
248
- )
249
- }
250
- ```
251
-
252
- Use it in MDX:
253
-
254
- ```mdx
255
- ---
256
-
257
- import { GradientLayout } from './components/GradientLayout'
258
-
259
- <GradientLayout>
260
- # Special Slide
261
-
262
- With a custom gradient background.
263
- </GradientLayout>
264
-
265
- ---
266
- ```
267
-
268
- Built-in placeholder images are available as URL exports for custom image layouts:
269
-
270
- ```ts
271
- import {
272
- imagePlaceholder,
273
- imagePlaceholderDark,
274
- verticalImagePlaceholder,
275
- verticalImagePlaceholderDark,
276
- } from '@honeydeck/honeydeck/layouts/placeholders'
277
- ```
278
-
279
- Use `ColorModeImage` when a custom layout accepts separate light and dark image URLs:
280
-
281
- ```tsx
282
- import { ColorModeImage } from '@honeydeck/honeydeck'
283
-
284
- <ColorModeImage src={image} darkSrc={darkImage} alt={alt} />
285
- ```
286
-
287
- ### Creating a Reusable Layout Set
288
-
289
- For a set of layouts you want to reuse across slides or decks, create a layout map:
290
-
291
- ```ts
292
- // layouts/index.ts
293
- import defaultLayouts from '@honeydeck/honeydeck/layouts'
294
- import HeroLayout from './Hero'
295
-
296
- export default {
297
- ...defaultLayouts,
298
- Hero: HeroLayout,
299
- }
300
- ```
301
-
302
- Layouts can export a colocated demo for `/#/layouts`:
303
-
304
- ```tsx
305
- // layouts/Hero.tsx
306
- import type { LayoutDemo, LayoutProps } from '@honeydeck/honeydeck/types'
307
-
308
- export default function HeroLayout({ title, children }: LayoutProps) {
309
- return (/* ... */)
310
- }
311
-
312
- export const demo: LayoutDemo = {
313
- mdx: `---
314
- layout: Hero
315
- ---
316
-
317
- # Hero Moment
318
-
319
- This snippet and preview come from the same demo.`,
320
- }
321
- ```
322
-
323
- Reference it in deck frontmatter:
324
-
325
- ```yaml
326
- ---
327
- layouts: "./layouts"
328
- ---
329
- ```
330
-
331
- Now you can use `layout: Hero` in any slide. The docs reference lists every layout in the active map, even if no slide currently uses it.
332
-
333
- ## Using Third-Party Kits
334
-
335
- A **kit** is an npm package that bundles theme CSS, layouts, and/or components. You reference each part individually:
336
-
337
- ```yaml
338
- ---
339
- layouts: "@company/honeydeck-kit-brand/layouts"
340
- ---
341
- ```
342
-
343
- ```mdx
344
- import '@company/honeydeck-kit-brand/theme.css'
345
- import { Callout } from '@company/honeydeck-kit-brand/components'
346
-
347
- # Hello
348
-
349
- <Callout>Important!</Callout>
350
- ```
351
-
352
- ### Mix and Match
353
-
354
- Since each concern is an explicit reference, mix freely:
355
-
356
- ```yaml
357
- ---
358
- layouts: "@company/honeydeck-kit-brand/layouts"
359
- ---
360
- ```
361
-
362
- ```mdx
363
- import '@other/honeydeck-kit-minimal/theme.css'
364
- import { Callout } from '@company/honeydeck-kit-brand/components'
365
- ```
366
-
367
- Use layouts from one kit, colors from another, components from a third.
368
-
369
- ### Extending a Kit's Theme
370
-
371
- Layer your overrides on top of a kit's CSS:
372
-
373
- ```css
374
- /* my-overrides.css */
375
- @import '@company/honeydeck-kit-brand/theme.css';
376
-
377
- :root {
378
- --honeydeck-primary: oklch(50% 0.2 300);
379
- --honeydeck-font-heading: 'My Font', sans-serif;
380
- }
381
- ```
382
-
383
- ```mdx
384
- import './my-overrides.css'
385
- ```
386
-
387
- → Building your own kit? See [Kit Authoring](kit-authoring.md)