hono-decks 1.4.1 → 1.4.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hono-decks",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Slide decks for Hono and Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare-workers",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"check": "bun run typecheck && bun run test && bun run skills:validate"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@babel/parser": "^7.29.
|
|
86
|
+
"@babel/parser": "^7.29.12",
|
|
87
87
|
"@mdx-js/mdx": "^3.1.1",
|
|
88
|
-
"esbuild": "^0.28.
|
|
88
|
+
"esbuild": "^0.28.2",
|
|
89
89
|
"remark-directive": "^4.0.0",
|
|
90
90
|
"remark-gfm": "^4.0.0",
|
|
91
91
|
"remark-mdx": "^3.1.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hono-decks
|
|
3
3
|
description: >
|
|
4
|
-
Create, style, integrate, and troubleshoot hono-decks presentations in Hono and Cloudflare Workers. Load for installation,
|
|
4
|
+
Create, style, integrate, and troubleshoot hono-decks presentations in Hono and Cloudflare Workers. Load for installation, Markdown and MDX deck authoring, Fire reveals, theme.css, generated createDecks modules, Hono routing, Vite or Wrangler builds, R2 assets, PDF or PNG export, OGP generation, embeds, or custom DeckSource pipelines.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# hono-decks
|
|
@@ -13,7 +13,7 @@ Use this skill as a router. Inspect the application and the request, then read o
|
|
|
13
13
|
| User intent | Read |
|
|
14
14
|
| --- | --- |
|
|
15
15
|
| Install, initialize, first deck, compile failure | [Getting started](references/getting-started.md) |
|
|
16
|
-
| Write or fix `deck.mdx`, frontmatter,
|
|
16
|
+
| Write or fix `deck.mdx` or adapter-backed `deck.md`, frontmatter, Fire, embeds, components, notes | [Authoring MDX](references/authoring-mdx.md) |
|
|
17
17
|
| Create or improve `theme.css`, layout, typography, visual quality, overflow | [Styling](references/styling.md) |
|
|
18
18
|
| Add to an existing Hono, HonoX, Vite, Wrangler, or Worker app; configure routes, presenter, or external embed | [Integrating](references/integrating.md) |
|
|
19
19
|
| Serve deck images or other local assets from R2 | [R2 assets](references/r2-assets.md) plus [Integrating](references/integrating.md) |
|
|
@@ -25,16 +25,16 @@ If the request is simply “make a deck,” read Authoring MDX and Styling. If i
|
|
|
25
25
|
|
|
26
26
|
## Non-negotiable architecture
|
|
27
27
|
|
|
28
|
-
1. Compile
|
|
29
|
-
2.
|
|
28
|
+
1. Compile deck sources with Node.js or Bun during development or build, never in the Worker runtime.
|
|
29
|
+
2. For Vite integrations use `virtual:hono-decks`; for the CLI/file workflow import generated TypeScript modules.
|
|
30
30
|
3. Keep `hono-decks.config.ts` as the single mount-path and build configuration.
|
|
31
|
-
4.
|
|
31
|
+
4. Use the framework integration to register routes, or mount manually with `app.route(decks.mountPath, decks.router())`. Obtain URLs from `decks.paths(slug)` or `meta.paths`.
|
|
32
32
|
5. Edit source decks, deck-local components, assets, and themes. Never hand-edit the generated output directory.
|
|
33
33
|
|
|
34
34
|
## Authoring and design defaults
|
|
35
35
|
|
|
36
36
|
- hono-decks is not Slidev. Never generate `v-click`, Slidev frontmatter, or UnoCSS utility classes unless the application independently installed and configured those features.
|
|
37
|
-
- Use supported `:::fire` blocks or block-level custom components with `fire`; reveals follow source order.
|
|
37
|
+
- Use supported `:::fire` blocks, `<Fire>` groups in MDX, or block-level custom components with `fire`; reveals follow source order.
|
|
38
38
|
- Design for the fixed 1920 × 1080, 16:9 canvas. Responsive slide layouts are not required.
|
|
39
39
|
- Keep body text presentation-sized (the base root size is 32px), preserve strong contrast, and keep every slide inside the canvas.
|
|
40
40
|
- Prefer one idea per slide. Split dense content instead of shrinking text or relying on hidden overflow.
|
|
@@ -51,7 +51,7 @@ Wrong:
|
|
|
51
51
|
// Hand-edit the generated manifest or routes.
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
Correct: edit
|
|
54
|
+
Correct: edit the deck source, `theme.css`, assets, or components. Vite integrations compile automatically; run `hono-decks compile` for the CLI/file workflow.
|
|
55
55
|
|
|
56
56
|
### Compiling inside the Worker
|
|
57
57
|
|
|
@@ -163,7 +163,7 @@ Correct: use `:::fire` and define project-specific classes explicitly in `theme.
|
|
|
163
163
|
|
|
164
164
|
After changes:
|
|
165
165
|
|
|
166
|
-
1. Run `hono-decks compile`
|
|
166
|
+
1. Run the application build; use `hono-decks compile` explicitly for the CLI/file workflow.
|
|
167
167
|
2. Run the application's typecheck and tests.
|
|
168
168
|
3. Open the viewer and check every slide at 16:9 for readable text and overflow.
|
|
169
169
|
4. Check presentation, presenter, print, embed, export, or OGP routes that the change affects.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Authoring MDX
|
|
2
2
|
|
|
3
|
-
Use this route when writing or correcting
|
|
3
|
+
Use this route when writing or correcting `deck.mdx` or an adapter-backed `deck.md` file. Start with the basic syntax, then load the advanced sections only when the requested deck needs them.
|
|
4
4
|
|
|
5
5
|
## Basic deck structure
|
|
6
6
|
|
|
@@ -77,7 +77,7 @@ app.route(decks.mountPath, decks.router())
|
|
|
77
77
|
|
|
78
78
|
Local image paths are rewritten during compilation. Put deck-local files under `assets/` and use relative paths.
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
In `.mdx`, exports, expressions, and JSX are supported:
|
|
81
81
|
|
|
82
82
|
```mdx
|
|
83
83
|
export const release = "2026.07"
|
|
@@ -88,6 +88,10 @@ export const metrics = ["42% faster", "3 fewer steps"]
|
|
|
88
88
|
{metrics.map((metric) => <Badge label={metric} />)}
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
+
## Markdown adapter and islands
|
|
92
|
+
|
|
93
|
+
`.md` decks require a configured Markdown adapter. Void init configures it; Hono and HonoX default to MDX. For Hono Markdown, a `<script>` may contain relative default TSX/JSX imports marked `with { island: "load" }` (also `visible`, `idle`, or `media:(query)`). Imported island tags accept literal string and boolean props, not JSX expressions or children; arbitrary script code is unsupported. Do not substitute MDX component-registry or expression syntax into `.md`. See the package README for setup and examples.
|
|
94
|
+
|
|
91
95
|
## Speaker notes
|
|
92
96
|
|
|
93
97
|
Use the slide `notes` frontmatter field or MDX comments. Comments are removed from visible slide output and collected as presenter notes.
|
|
@@ -197,4 +201,4 @@ Client props may contain only strings, finite numbers, booleans, `null`, arrays,
|
|
|
197
201
|
- Keep visible body copy sparse enough for a 32px base size.
|
|
198
202
|
- Split long lists, large tables, and multi-screen code into multiple slides.
|
|
199
203
|
- Add useful alt text to images and titles to embeds.
|
|
200
|
-
-
|
|
204
|
+
- Confirm the application build or development compiler succeeds after syntax changes and resolve warnings.
|
|
@@ -22,7 +22,7 @@ for manual integration and non-Vite applications.
|
|
|
22
22
|
|
|
23
23
|
For an existing Void app, use `npx hono-decks init --framework void` after
|
|
24
24
|
installing the compatible packages and Markdown peers described in the README.
|
|
25
|
-
|
|
25
|
+
New installs use `void-plugin-hono-jsx@^0.9.1`; existing compatible Void 1.1 apps may retain adapter 0.6. Init connects the existing Vite config, creates the routing
|
|
26
26
|
middleware and a sample `.md` deck at `/slides/welcome`, and uses virtual modules without generated
|
|
27
27
|
files. Use the app's normal `dev` and `build` scripts without changes or a manual
|
|
28
28
|
compile. Existing `.mdx` files remain supported. Unsupported configs or existing
|
|
@@ -146,7 +146,7 @@ export default defineConfig({
|
|
|
146
146
|
- Missing config: run `hono-decks init` or create a default-exported `hono-decks.config.ts`.
|
|
147
147
|
- Missing virtual module types: reference `hono-decks/vite-env`; a dev/build or manual compile is not required for typechecking.
|
|
148
148
|
- Missing generated import in the CLI/file workflow: run `hono-decks compile` before typechecking the application.
|
|
149
|
-
- Deck not discovered: use `decks/<slug>/deck.mdx` or a supported single-file deck in the configured root.
|
|
149
|
+
- Deck not discovered: use `decks/<slug>/deck.mdx` or a supported single-file deck in the configured root; `.md` requires a configured Markdown adapter.
|
|
150
150
|
- Broken routes or assets: remove duplicated strings and use `decks.mountPath` and `decks.paths(slug)`.
|
|
151
151
|
- Worker bundling Node modules: import `hono-decks/node` only from build scripts, never from Worker runtime code.
|
|
152
152
|
- Lost edits after compile: move changes out of `src/generated` and into source decks or configuration.
|
|
@@ -159,4 +159,4 @@ retain manual dependency installation by omitting --install. Yarn PnP is not
|
|
|
159
159
|
supported by the automatic installer. The generated Markdown sample includes a
|
|
160
160
|
Counter.tsx island. Markdown uses relative default imports with `island: "load"`,
|
|
161
161
|
`visible`, `idle`, or `media:(query)` and literal props, with no separate registry.
|
|
162
|
-
Arbitrary script code/JSX expressions remain unsupported; MDX stays unchanged.
|
|
162
|
+
Arbitrary script code/JSX expressions remain unsupported; MDX stays unchanged. For Hono or HonoX, MDX is the default; enable `.md` explicitly with `build.markdown: { adapter: "hono-decks/adapters/hono-markdown" }` and install the common Markdown package and its compiler peers as documented in the package README.
|
|
@@ -4,7 +4,7 @@ Use this route when adding hono-decks to an existing Hono, HonoX, Vite, Wrangler
|
|
|
4
4
|
|
|
5
5
|
## Preserve the build/runtime boundary
|
|
6
6
|
|
|
7
|
-
The compiler and `hono-decks/node` use Node filesystem tooling. Run them
|
|
7
|
+
The compiler and `hono-decks/node` use Node filesystem tooling. Run them during development or build, never in the Worker. Vite framework init uses `virtual:hono-decks`; the following generated facade applies to the CLI/file workflow.
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
10
|
// src/decks.ts
|
|
@@ -81,6 +81,10 @@ export default defineConfig({
|
|
|
81
81
|
|
|
82
82
|
For HonoX, mount the router from a HonoX route module while keeping the generated facade outside the route tree. Follow the application's established catch-all route convention.
|
|
83
83
|
|
|
84
|
+
## Development updates
|
|
85
|
+
|
|
86
|
+
In Vite integrations, successful source edits update the presentation in place when island identities can be matched safely, preserving supported state and the current slide/step. Client code edits reload the presentation iframe and reset island state while retaining the viewer and slide/step. Ambiguous identities, unsupported hydration, and update failures also fall back to an iframe reload. Wrangler direct mode uses its own `--live-reload`.
|
|
87
|
+
|
|
84
88
|
## Application-owned routes
|
|
85
89
|
|
|
86
90
|
Use `decks.context()` to share deck lookup, draft policy, paths, and viewer configuration:
|
|
@@ -149,7 +153,7 @@ Review any application-wide CSP middleware after mounting: it must preserve the
|
|
|
149
153
|
|
|
150
154
|
## Integration verification
|
|
151
155
|
|
|
152
|
-
- Start the normal application dev command and confirm
|
|
156
|
+
- Start the normal application dev command and confirm deck changes recompile and appear.
|
|
153
157
|
- Verify direct navigation and application links use `decks.paths`.
|
|
154
158
|
- Confirm draft decks are unavailable outside development.
|
|
155
159
|
- Test application-owned routes before the deck router catch-all.
|