@honeydeck/honeydeck 0.6.0 → 0.8.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 CHANGED
@@ -5,7 +5,7 @@ This package publishes the scoped public `@honeydeck/honeydeck` npm package. It
5
5
  ## Rules
6
6
 
7
7
  - Keep public import paths as `@honeydeck/honeydeck/...`.
8
- - `Readme.md` is the compact package README and links to the public docs site. Reader-facing docs live in `packages/docs/content/docs`.
8
+ - `Readme.md` is the compact package README and links to the public docs site. Reader-facing docs live in `packages/docs/content/docs`; update those canonical docs for user-facing behavior changes.
9
9
  - Built-in runtime reference pages cover project-specific theme tokens, active layouts, and built-in component docs. They do not render public docs in-deck.
10
10
  - Specs, `DEVELOPMENT.md`, and skills must remain included in npm package contents.
11
11
  - Use suffixed `lucide-react` icon exports.
@@ -16,7 +16,9 @@ Defined in the first frontmatter block of the deck entry file (before any slide
16
16
  | `colorMode` | `"system" \| "light" \| "dark"` | `"system"` | Browser color mode |
17
17
  | `pdfColorMode` | `"light" \| "dark"` | unset | Optional PDF color mode; when unset, falls back to pinned `colorMode`, then `light` |
18
18
  | `pdfSteps` | `"final" \| "all"` | `"final"` | PDF includes all steps or final state |
19
- | `transition` | `boolean` | `true` | Enable crossfade between slides |
19
+ | `transition` | `string \| boolean` | `fade` | Default named slide transition (`fade`, `none`, `slide-left`, or custom CSS name) |
20
+ | `transitionDuration` | `number` | `200` | Default slide transition duration in milliseconds |
21
+ | `transitionEasing` | `string` | `ease` | Default slide transition timing function |
20
22
  | `magicCodeDuration` | `number` | `800` | Default Magic Code animation duration in milliseconds |
21
23
  | `layouts` | `string` | `""` (built-in) | Layout map module path |
22
24
  | `defaultLayout` | `string` | `"Default"` | Layout used when slide has no `layout:` |
@@ -46,13 +48,17 @@ When pinned, the viewer cannot switch mode from navigation controls.
46
48
 
47
49
  ### Transitions
48
50
 
49
- A subtle crossfade (~200ms) is applied between slides by default:
51
+ A subtle named `fade` transition is applied between slides by default:
50
52
 
51
53
  ```yaml
52
- transition: true # default
53
- transition: false # disable
54
+ transition: fade # default
55
+ transition: none # disable
54
56
  ```
55
57
 
58
+ Legacy booleans still work: `transition: true` maps to `fade`, and `transition: false` maps to `none`.
59
+
60
+ For built-ins, custom CSS transitions, duration, and easing, see [Transitions](transitions.md).
61
+
56
62
  ### Magic Code Duration
57
63
 
58
64
  Magic Code animations default to 800ms. Set a deck-wide default with `magicCodeDuration`:
@@ -70,6 +76,9 @@ Per-slide frontmatter (after `---`):
70
76
  | Property | Type | Default | Description |
71
77
  |----------|------|---------|-------------|
72
78
  | `layout` | `string` | (uses `defaultLayout`) | Layout to use (PascalCase) |
79
+ | `transition` | `string \| boolean` | deck default | Named transition into this slide |
80
+ | `transitionDuration` | `number` | deck default | Transition duration into this slide in milliseconds |
81
+ | `transitionEasing` | `string` | deck default | Transition easing into this slide |
73
82
  | ...layout props | varies | — | Additional props the layout accepts |
74
83
 
75
84
  Example:
@@ -96,6 +105,9 @@ in the first frontmatter block alongside deck-level settings.
96
105
  ---
97
106
  title: "My First Deck"
98
107
  colorMode: system
108
+ transition: fade
109
+ transitionDuration: 200
110
+ transitionEasing: ease
99
111
  layouts: "@honeydeck/honeydeck/layouts"
100
112
  layout: Cover
101
113
  ---
@@ -111,19 +111,22 @@ Deck-level settings live in the first frontmatter block of the deck entry file.
111
111
  | `colorMode` | `"system" \| "light" \| "dark"` | `"system"` | Color mode |
112
112
  | `pdfColorMode` | `"light" \| "dark"` | unset | Optional PDF color mode; falls back to pinned `colorMode`, then `light` |
113
113
  | `pdfSteps` | `"final" \| "all"` | `"final"` | PDF step handling |
114
- | `transition` | `boolean` | `true` | Crossfade between slides |
114
+ | `transition` | `string \| boolean` | `fade` | Named slide transition |
115
115
  | `layouts` | `string` | `""` (built-in) | Custom layout map path |
116
116
  | `defaultLayout` | `string` | `"Default"` | Fallback layout |
117
117
  | `showSlideNumbers` | `boolean` | `false` | Show slide numbers |
118
118
 
119
- Slide-level frontmatter chooses the slide layout and passes layout-specific props.
119
+ Slide-level frontmatter chooses the slide layout, passes layout-specific props, and can override the transition into that slide.
120
120
 
121
121
  | Property | Type | Description |
122
122
  |----------|------|-------------|
123
123
  | `layout` | `string` | Layout name in PascalCase |
124
+ | `transition` | `string \| boolean` | Named transition into this slide |
125
+ | `transitionDuration` | `number` | Transition duration in milliseconds |
126
+ | `transitionEasing` | `string` | Transition timing function |
124
127
  | layout props | varies | Layout-specific fields |
125
128
 
126
- For the full reference, see [Configuration](configuration.md).
129
+ For the full reference, see [Configuration](configuration.md) and [Transitions](transitions.md).
127
130
 
128
131
  ## Core components
129
132
 
package/docs/index.json CHANGED
@@ -45,6 +45,17 @@
45
45
  "file": "configuration.md",
46
46
  "sourcePath": "packages/docs/content/docs/(core)/configuration.mdx"
47
47
  },
48
+ {
49
+ "slug": "transitions",
50
+ "title": "Transitions",
51
+ "description": "Configure built-in and custom slide transitions in Honeydeck.",
52
+ "breadcrumbs": [
53
+ "Core",
54
+ "Transitions"
55
+ ],
56
+ "file": "transitions.md",
57
+ "sourcePath": "packages/docs/content/docs/(core)/transitions.mdx"
58
+ },
48
59
  {
49
60
  "slug": "steps-and-reveals",
50
61
  "title": "Steps and reveals",
package/docs/mobile.md CHANGED
@@ -13,7 +13,7 @@ Honeydeck works on phones and tablets, but mobile presentation mode behaves diff
13
13
  | Text selection | Slide text can be selected normally | Slide text selection is off by default; use the nav bar toggle when you need it |
14
14
  | Zoom | Browser/page zoom or normal browser controls | Honeydeck-controlled slide zoom with pinch, up to `5x` |
15
15
  | Overview | Keyboard selection and mouse clicks | Responsive fixed two-column grid |
16
- | Presenter mode | Current slide, next preview, notes, clock | Current slide, notes, navigation buttons; no next preview |
16
+ | Presenter mode | Current slide, next preview, notes, clock, timer, actions; no navigation buttons | Current slide, notes, navigation buttons; no next preview |
17
17
 
18
18
  ## Tap zones
19
19
 
@@ -20,7 +20,7 @@ Presenter mode shows the presenter everything they need while the audience sees
20
20
  │ - Remember to demo the sparkle button │
21
21
  │ - Mention PDF export │
22
22
  │ │
23
- │ Slide 3/12 · Step 2/4 12:34 [Open]
23
+ │ Slide 3/12 · Step 2/4 12:34 Timer 1:23 [Open]
24
24
  └──────────────────────────────────────────┘
25
25
  ```
26
26
 
@@ -29,10 +29,12 @@ Includes:
29
29
  - Next timeline-state preview (smaller): the next step on the current slide when one exists, otherwise the next slide at step 0
30
30
  - Speaker notes for current slide
31
31
  - Slide number / step counter
32
- - Wall clock
32
+ - Wall clock and an elapsed presentation timer with start, pause, continue, restart, and close/reset controls
33
33
  - Button to open audience view in a new tab/window
34
- - Button to cast the audience view to a secondary display when supported; the same control becomes a stop button while casting and is disabled with a hint when unsupported
35
- - Navigation buttons that move through the timeline while staying in presenter mode
34
+ - Color mode toggle that also updates audience views and cast receivers
35
+ - Blank screen toggle (`b`) that makes audience and cast views black while presenter mode shows a `Screen blanked (b)` indicator
36
+ - Button to cast the audience view to a secondary display when supported; the same control becomes a stop button while casting. Unsupported browsers show a visibly disabled-looking button with hover/accessible text explaining why casting is unavailable.
37
+ - Navigation buttons that move through the timeline while staying in presenter mode on mobile. Desktop presenter mode uses keyboard shortcuts instead.
36
38
 
37
39
  ## Speaker Notes
38
40
 
@@ -65,7 +67,7 @@ Content here.
65
67
  - Navigation controls button in normal presentation.
66
68
  - Direct URL: `/#/presenter/1/0`
67
69
 
68
- Pressing `p` opens presenter mode in the **current tab**.
70
+ Pressing `p` opens presenter mode in the **current tab**. In presenter mode, press `p` or `Escape` to return to the audience slide view at the same slide and step.
69
71
 
70
72
  ## Navigation
71
73
 
@@ -86,12 +88,16 @@ Reveal content from later timeline steps is also shown in the `Next` preview at
86
88
 
87
89
  When no next timeline state exists, the `Next` preview shows an end-of-deck placeholder instead of trying to render a missing slide.
88
90
 
91
+ ## Blank Screen
92
+
93
+ Press `b` or use the blank screen button to make the audience and cast views black. Press `b` again or use the same button to restore the slide. Audience tabs unblank automatically when presenter mode disconnects.
94
+
89
95
  ## Presenter/Audience Sync
90
96
 
91
97
  Presenter mode and audience view synchronize navigation via `BroadcastChannel` and, when supported, the Presentation API.
92
98
 
93
99
  - Presenter mode acts as the controller.
94
- - Audience view (opened from presenter mode) listens for navigation updates.
100
+ - Audience view (opened from presenter mode) listens for navigation, color mode, and blank-screen updates.
95
101
  - The cast audience sends a `sync-request` as soon as the receiver connection appears; the presenter replies with the current slide/step in a `sync-response` so late connections resync immediately.
96
102
  - The cast audience follows presenter navigation through Presentation API receiver messages.
97
103
  - No server, internet, WebSocket, or device pairing required.
@@ -0,0 +1,126 @@
1
+ <!-- Generated from packages/docs/content/docs/(core)/transitions.mdx. Do not edit by hand. -->
2
+
3
+ # Transitions
4
+
5
+ Honeydeck uses named slide transitions. Set a deck-wide default in the first frontmatter block, then override individual slides when needed.
6
+
7
+ ## Deck defaults
8
+
9
+ ```yaml
10
+ ---
11
+ transition: fade
12
+ transitionDuration: 200
13
+ transitionEasing: ease
14
+ ---
15
+ ```
16
+
17
+ | Property | Type | Default | Description |
18
+ |----------|------|---------|-------------|
19
+ | `transition` | `string \| boolean` | `fade` | Named transition for slide changes |
20
+ | `transitionDuration` | `number` | `200` | Duration in milliseconds |
21
+ | `transitionEasing` | `string` | `ease` | CSS timing function |
22
+
23
+ Built-in transition names:
24
+
25
+ - `fade` — default crossfade
26
+ - `none` — no slide transition
27
+ - `slide-left` — horizontal slide, reverse-aware when navigating backward
28
+
29
+ ## Slide overrides
30
+
31
+ Slide frontmatter controls the transition **into that slide**:
32
+
33
+ ```mdx
34
+ ---
35
+ transition: slide-left
36
+ transitionDuration: 500
37
+ transitionEasing: cubic-bezier(0.22, 1, 0.36, 1)
38
+ ---
39
+
40
+ # A slide with a custom entrance
41
+ ```
42
+
43
+ Slides without transition frontmatter use the deck defaults.
44
+
45
+ ## Custom transitions
46
+
47
+ Any transition name that is not built in becomes a CSS hook. For example:
48
+
49
+ ```mdx
50
+ ---
51
+ transition: honey-spin
52
+ transitionDuration: 700
53
+ transitionEasing: cubic-bezier(0.22, 1, 0.36, 1)
54
+ ---
55
+
56
+ # Custom CSS Transition
57
+ ```
58
+
59
+ Honeydeck adds classes to only the entering and exiting slide layers:
60
+
61
+ ```html
62
+ <div class="honeydeck-slide-layer honeydeck-transition-honey-spin honeydeck-transition-enter">
63
+ ```
64
+
65
+ ```html
66
+ <div class="honeydeck-slide-layer honeydeck-transition-honey-spin honeydeck-transition-exit">
67
+ ```
68
+
69
+ Scope your CSS to both the transition name and enter/exit class:
70
+
71
+ ```css
72
+ .honeydeck-slide-layer.honeydeck-transition-honey-spin.honeydeck-transition-enter {
73
+ animation-name: honey-spin-enter;
74
+ animation-duration: var(--honeydeck-transition-duration);
75
+ animation-timing-function: var(--honeydeck-transition-easing);
76
+ animation-fill-mode: both;
77
+ }
78
+
79
+ .honeydeck-slide-layer.honeydeck-transition-honey-spin.honeydeck-transition-exit {
80
+ animation-name: honey-spin-exit;
81
+ animation-duration: var(--honeydeck-transition-duration);
82
+ animation-timing-function: var(--honeydeck-transition-easing);
83
+ animation-fill-mode: both;
84
+ }
85
+ ```
86
+
87
+ ## Reverse-aware CSS
88
+
89
+ Honeydeck provides a direction variable:
90
+
91
+ ```css
92
+ --honeydeck-transition-direction: 1; /* forward */
93
+ --honeydeck-transition-direction: -1; /* backward */
94
+ ```
95
+
96
+ Use it in transform math when your custom transition should reverse with navigation direction:
97
+
98
+ ```css
99
+ @keyframes custom-enter {
100
+ from {
101
+ opacity: 0;
102
+ transform: translateX(calc(40% * var(--honeydeck-transition-direction)));
103
+ }
104
+ to {
105
+ opacity: 1;
106
+ transform: translateX(0);
107
+ }
108
+ }
109
+
110
+ @keyframes custom-exit {
111
+ from {
112
+ opacity: 1;
113
+ transform: translateX(0);
114
+ }
115
+ to {
116
+ opacity: 0;
117
+ transform: translateX(calc(-20% * var(--honeydeck-transition-direction)));
118
+ }
119
+ }
120
+ ```
121
+
122
+ Honeydeck cannot safely invert arbitrary custom keyframes automatically, so reverse behavior is opt-in through CSS variables.
123
+
124
+ ## Reduced motion
125
+
126
+ If the viewer has `prefers-reduced-motion: reduce`, Honeydeck disables slide transition animations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@honeydeck/honeydeck",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "MDX and React-based presentation framework for AI-friendly slide decks.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -43,8 +43,9 @@ Generated starter tree includes `package.json`, `deck.mdx`, `styles.css`, `.giti
43
43
 
44
44
  Tutorial-style `deck.mdx` imports `./styles.css` so styling stays explicit and user-controlled. It demonstrates:
45
45
 
46
- - Deck frontmatter, including `colorMode: system`
46
+ - Deck frontmatter, including `colorMode: system`, named transition defaults (`transition`, `transitionDuration`, `transitionEasing`), and layout map hints
47
47
  - Slide separators
48
+ - Built-in slide transitions via deck-level defaults and at least one slide-level `transition:` override
48
49
  - Built-in layouts via per-slide `layout:` (`Default`, `Section`, `TwoCol`, `Cover`, `Blank`)
49
50
  - Code highlighting with step-through
50
51
  - Custom interactive component (`SparkleButton`)
@@ -3,6 +3,10 @@ title: demo-deck
3
3
  description: A clean Honeydeck starter deck
4
4
  # Define the color mode for your slides: light, dark, system.
5
5
  colorMode: system
6
+ # Configure slide transitions. Use "none" to disable.
7
+ transition: fade
8
+ transitionDuration: 200
9
+ transitionEasing: ease
6
10
  # Swap layouts for a custom layout map or the included bee theme (also update css).
7
11
  # - Custom layouts: layouts: "./layouts"
8
12
  # - Bee layouts: layouts: "@honeydeck/honeydeck/layouts/bee"
@@ -44,6 +48,24 @@ All you need is `---` for new slides.
44
48
  You can press <Keyboard>↓</Keyboard> to skip revealed content and jump to the next slide.
45
49
  </Reveal>
46
50
 
51
+ ---
52
+ transition: slide-left
53
+ transitionDuration: 500
54
+ transitionEasing: cubic-bezier(0.22, 1, 0.36, 1)
55
+ ---
56
+
57
+ # Choose slide transitions 🎬
58
+
59
+ Deck-level frontmatter sets the default transition. Slide frontmatter overrides the transition into that slide.
60
+
61
+ ```yaml
62
+ transition: fade
63
+ transitionDuration: 200
64
+ transitionEasing: ease
65
+ ```
66
+
67
+ Use `transition: none` when you want no slide animation.
68
+
47
69
  ---
48
70
 
49
71
  # Grow into React when needed ⚛️