hono-decks 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/LICENSE +21 -0
- package/README.md +287 -0
- package/dist/advanced.d.ts +62 -0
- package/dist/advanced.js +3162 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +2331 -0
- package/dist/cli.d.ts +20 -0
- package/dist/cli.js +2334 -0
- package/dist/client.d.ts +12 -0
- package/dist/client.js +22 -0
- package/dist/define-decks-U4NxIs66.d.ts +587 -0
- package/dist/jsx-renderer-BO-N4tMZ.d.ts +20 -0
- package/dist/mod.d.ts +39 -0
- package/dist/mod.js +1071 -0
- package/dist/node.d.ts +181 -0
- package/dist/node.js +5625 -0
- package/dist/vite.d.ts +19 -0
- package/dist/vite.js +2175 -0
- package/package.json +93 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ts-76
|
|
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,287 @@
|
|
|
1
|
+
# hono-decks
|
|
2
|
+
|
|
3
|
+
Hono と Cloudflare Workers 上で MDX のスライドを配信するためのライブラリです。ビルド時に MDX を TypeScript module へ変換し、Worker runtime ではファイルシステムや compiler を読み込みません。
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add hono hono-decks
|
|
9
|
+
bunx hono-decks init
|
|
10
|
+
bunx hono-decks compile
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`init` は次の2ファイルを作ります。既存ファイルは上書きしません。
|
|
14
|
+
|
|
15
|
+
- `hono-decks.config.ts`: CLI と runtime が共有する唯一の設定
|
|
16
|
+
- `src/decks.ts`: generated module をアプリへ接続する編集可能な facade
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
// hono-decks.config.ts
|
|
20
|
+
import { defineDecksConfig } from "hono-decks";
|
|
21
|
+
|
|
22
|
+
export default defineDecksConfig({
|
|
23
|
+
mountPath: "/decks",
|
|
24
|
+
build: {
|
|
25
|
+
root: "decks",
|
|
26
|
+
outDir: "src/generated",
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
// src/decks.ts
|
|
33
|
+
import config from "../hono-decks.config";
|
|
34
|
+
import { createDecks } from "./generated/decks";
|
|
35
|
+
|
|
36
|
+
export const decks = createDecks(config);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
// src/index.ts
|
|
41
|
+
import { Hono } from "hono";
|
|
42
|
+
import { decks } from "./decks";
|
|
43
|
+
|
|
44
|
+
const app = new Hono();
|
|
45
|
+
app.get("/", (c) => c.redirect(decks.paths("welcome").viewer));
|
|
46
|
+
app.route(decks.mountPath, decks.router());
|
|
47
|
+
export default app;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`decks/welcome/deck.mdx` を作り、`bunx hono-decks compile` を実行すると `src/generated/decks.ts` と slide modules が更新されます。generated directory は直接編集しません。
|
|
51
|
+
|
|
52
|
+
## One config, one runtime kit
|
|
53
|
+
|
|
54
|
+
以前のように compile option、`app.route()`、asset URL の mount path を別々に指定する必要はありません。`mountPath` は config に一度だけ書きます。generated module の `createDecks(config)` は次の configured kit を返します。
|
|
55
|
+
|
|
56
|
+
- `decks.mountPath`: `app.route()` に渡す正規化済みパス
|
|
57
|
+
- `decks.source`: config の `source()` が適用された `DeckSource`
|
|
58
|
+
- `decks.router(overrides?)`: config と呼び出し時 override を安全に深く合成した router
|
|
59
|
+
- `decks.context(overrides?)`: custom route 用 middleware
|
|
60
|
+
- `decks.paths(slug)`: viewer、render、print、presentation、presenter、embed、export、OGP image、assets の完全な route map
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
const paths = decks.paths("product");
|
|
64
|
+
paths.viewer; // /decks/product
|
|
65
|
+
paths.render; // /decks/product/render
|
|
66
|
+
paths.print; // /decks/product/print
|
|
67
|
+
paths.presentation; // /decks/product/presentation
|
|
68
|
+
paths.presenter; // /decks/product/presenter
|
|
69
|
+
paths.embed; // /decks/product/embed
|
|
70
|
+
paths.exportPdf; // /decks/product/export.pdf
|
|
71
|
+
paths.exportPng; // /decks/product/export.png
|
|
72
|
+
paths.ogImage; // /decks/product/og.png
|
|
73
|
+
paths.assets; // /decks/product/assets
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Viewer callbacks では同じ map を `input.meta.paths` から参照できます。文字列連結で route を再構築しないでください。
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
export default defineDecksConfig({
|
|
80
|
+
mountPath: "/decks",
|
|
81
|
+
router: {
|
|
82
|
+
viewer: {
|
|
83
|
+
controls: {
|
|
84
|
+
after: ({ meta }) => [
|
|
85
|
+
{ type: "link", href: `${meta.paths.viewer}/about`, label: "Details" },
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Development integration
|
|
94
|
+
|
|
95
|
+
Cloudflare Workersでは、deck compilerをWranglerのcustom buildへ登録します。
|
|
96
|
+
|
|
97
|
+
```jsonc
|
|
98
|
+
// wrangler.jsonc
|
|
99
|
+
{
|
|
100
|
+
"build": {
|
|
101
|
+
"command": "hono-decks compile",
|
|
102
|
+
"watch_dir": ["decks"]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`wrangler dev --live-reload`が初回compileとMDX、deck-local component、asset、theme CSSの変更監視、ブラウザ更新を担当します。deploy時にも同じbuild commandが実行されます。
|
|
108
|
+
|
|
109
|
+
HonoXまたはViteでは、既存のVite configへpluginを追加します。
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import { honoDecks } from "hono-decks/vite";
|
|
113
|
+
import { defineConfig } from "vite";
|
|
114
|
+
|
|
115
|
+
export default defineConfig({
|
|
116
|
+
plugins: [honoDecks()],
|
|
117
|
+
});
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
pluginはVite起動前にcompileし、deck rootと`hono-decks.config.ts`をVite watcherへ登録します。再compileに成功するとfull reloadを通知するため、手動更新は不要です。どちらの構成でも通常の`bun run dev`だけでauthoringできます。
|
|
121
|
+
|
|
122
|
+
## Runtime configuration
|
|
123
|
+
|
|
124
|
+
すべての resolver は1個の object argument を受け取ります。引数の順序を覚える必要がなく、将来 input が増えても callback の意味が崩れません。
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
interface AppEnv {
|
|
128
|
+
Bindings: {
|
|
129
|
+
BROWSER?: DeckBrowserRunBinding;
|
|
130
|
+
DECK_EXPORT_TOKEN?: string;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export default defineDecksConfig<AppEnv>({
|
|
135
|
+
mountPath: "/decks",
|
|
136
|
+
build: { root: "decks", outDir: "src/generated" },
|
|
137
|
+
router: {
|
|
138
|
+
presenter: {
|
|
139
|
+
enabled: ({ dev }) => dev,
|
|
140
|
+
viewerControl: true,
|
|
141
|
+
},
|
|
142
|
+
export: {
|
|
143
|
+
authorize: ({ c }) =>
|
|
144
|
+
c.req.header("authorization") === `Bearer ${c.env.DECK_EXPORT_TOKEN}`,
|
|
145
|
+
browser: ({ c }) => c.env.BROWSER,
|
|
146
|
+
pdf: true,
|
|
147
|
+
png: true,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
`dev`を省略すると、ViteとWranglerが設定する`NODE_ENV`から判定します。標準設定では、`vite`と`wrangler dev`は開発モード、プロダクションビルドと`wrangler deploy`は本番モードになります。`dev: false`やresolverを指定した場合は明示値が優先され、判定できない環境では本番モードとして扱われます。
|
|
154
|
+
|
|
155
|
+
呼び出し元で一部だけ変える場合は `decks.router({ viewer: ... })` を使います。viewer controls、document surfaces、presenter、embed、export などの nested option は config を失わずに合成されます。機能を止めるときは `presenter: false`、`embed: false`、`export: false` のように明示できます。
|
|
156
|
+
|
|
157
|
+
## Custom application routes
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
import type { DeckContextVariables } from "hono-decks";
|
|
161
|
+
import { decks } from "./decks";
|
|
162
|
+
|
|
163
|
+
const app = new Hono<{ Variables: DeckContextVariables }>();
|
|
164
|
+
|
|
165
|
+
app.get(
|
|
166
|
+
`${decks.mountPath}/:slug/about`,
|
|
167
|
+
decks.context(),
|
|
168
|
+
(c) => c.json({
|
|
169
|
+
title: c.var.deckMeta.title,
|
|
170
|
+
viewer: c.var.deckMeta.paths.viewer,
|
|
171
|
+
slides: c.var.deckToc,
|
|
172
|
+
}),
|
|
173
|
+
);
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
`decks.context()` は configured source、mount path、dev policy、viewer controls を自動的に共有します。custom route と標準 viewer で draft 判定や URL がずれません。
|
|
177
|
+
|
|
178
|
+
標準ページ全体を差し替える場合は config の `viewer.render` を使います。callback には `frame`、`controls`、`toc`、`meta.paths` が渡るため、標準部品を再利用しながら app-owned layout を構築できます。
|
|
179
|
+
|
|
180
|
+
## Deck-local components and CSS
|
|
181
|
+
|
|
182
|
+
Directory deck は次の構造を使えます。
|
|
183
|
+
|
|
184
|
+
```text
|
|
185
|
+
decks/product/
|
|
186
|
+
deck.mdx
|
|
187
|
+
theme.css
|
|
188
|
+
assets/
|
|
189
|
+
diagram.svg
|
|
190
|
+
components/
|
|
191
|
+
index.tsx
|
|
192
|
+
client/
|
|
193
|
+
index.tsx
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
`components/index.tsx` は server-side JSX component、`components/client/index.tsx` は browser で hydrate する component です。`theme.css` はその deck だけに適用されます。画像は compile 時に検出され、`mountPath` と slug を使った public URL に書き換えられます。
|
|
197
|
+
|
|
198
|
+
## Embedding
|
|
199
|
+
|
|
200
|
+
同じdocumentへ複数配置する場合は `createDeckViewerEmbed()` を使えます。これは app が取得済みの `CompiledDeck` から iframe viewer、controls、TOC を組み立てる high-level helper です。
|
|
201
|
+
|
|
202
|
+
Embedding from an external blog では `router.embed` を有効にし、`frameAncestors` に許可する親 origin を明示してください。`iframe navigationにCORSは不要`ですが、CSP の `frame-ancestors` は必要です。
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
router: {
|
|
206
|
+
embed: {
|
|
207
|
+
frameAncestors: ["https://blog.example.com"],
|
|
208
|
+
robots: false,
|
|
209
|
+
},
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
```html
|
|
214
|
+
<iframe
|
|
215
|
+
src="https://slides.example.com/decks/product/embed"
|
|
216
|
+
title="Product deck"
|
|
217
|
+
allow="fullscreen"
|
|
218
|
+
></iframe>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Browser export
|
|
222
|
+
|
|
223
|
+
PDF/PNG export は Cloudflare Browser Rendering binding を resolver から返すと有効になります。viewer に export control が表示されるのは、その request が `authorize` を通った場合だけです。token は `vars` ではなく Wrangler secret として管理してください。
|
|
224
|
+
|
|
225
|
+
`Cmd + P` / `Ctrl + P` は viewer から print route を開き、印刷用に全 slide を表示します。server-side export も同じ print route を Browser Rendering に渡します。
|
|
226
|
+
|
|
227
|
+
## Build-time OGP recipe
|
|
228
|
+
|
|
229
|
+
viewer の share image をビルド時に生成する場合は、`router.viewer.openGraph` を有効にします。既定の画像パスは `decks.paths(slug).ogImage` です。viewer は request origin から Open Graph / Twitter Card の絶対URLを生成します。
|
|
230
|
+
|
|
231
|
+
```ts
|
|
232
|
+
export default defineDecksConfig({
|
|
233
|
+
mountPath: "/decks",
|
|
234
|
+
router: {
|
|
235
|
+
viewer: { openGraph: true },
|
|
236
|
+
},
|
|
237
|
+
});
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
独自CDNを使う場合は `imagePath: ({ deck }) => \`https://cdn.example.com/${deck.slug}.png\`` のように resolver で上書きできます。`false` または未指定なら social metadata は出力しません。
|
|
241
|
+
|
|
242
|
+
生成処理は core に含まれません。`examples/ogp` では `hono-decks/node` の `compileDecks()` が返す manifest を Satori + resvg へ渡し、1200×630 PNG を Workers Static Assets へ保存します。Satori / resvg は example だけの依存で、Browser Rendering binding は不要です。Satori は TTF / OTF / WOFF を読み込めますが WOFF2 は扱えないため、対象言語の font file を build script から明示的に渡してください。
|
|
243
|
+
|
|
244
|
+
`build.ogpCacheFile` は `@[card](...)` が参照する外部サイトのメタデータキャッシュです。viewer 自身の share image とは別機能です。
|
|
245
|
+
|
|
246
|
+
## Public entries
|
|
247
|
+
|
|
248
|
+
- `hono-decks`: config、configured kit の型、deck authoring、viewer/embed customization、source decorator
|
|
249
|
+
- `hono-decks/advanced`: `defineDecks()`、`decksRouter()`、`deckContext()`、raw renderer など独自 pipeline 用
|
|
250
|
+
- `hono-decks/client`: browser hydration
|
|
251
|
+
- `hono-decks/node`: compiler と Node filesystem adapter
|
|
252
|
+
- `hono-decks/cli`: programmatic CLI runner
|
|
253
|
+
|
|
254
|
+
通常の generated workflow では root entry だけを import します。`hono-decks/advanced` は custom `DeckSource` や router をゼロから組み立てる場合に限定してください。
|
|
255
|
+
|
|
256
|
+
## Cloudflare Workers
|
|
257
|
+
|
|
258
|
+
Wrangler は JSONC config、current compatibility date、必要に応じた `nodejs_compat` を使います。binding types は `wrangler types` で生成し、hand-written binding interface と実際の config がずれないようにしてください。
|
|
259
|
+
|
|
260
|
+
```jsonc
|
|
261
|
+
{
|
|
262
|
+
"$schema": "node_modules/wrangler/config-schema.json",
|
|
263
|
+
"name": "my-decks",
|
|
264
|
+
"main": "src/index.ts",
|
|
265
|
+
"compatibility_date": "2026-07-14",
|
|
266
|
+
"compatibility_flags": ["nodejs_compat"]
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## Advanced API
|
|
271
|
+
|
|
272
|
+
既存 manifest、database、remote object store から完全に独自の runtime を作る場合だけ advanced entry を使います。
|
|
273
|
+
|
|
274
|
+
```ts
|
|
275
|
+
import { decksRouter, manifestDeckSource } from "hono-decks/advanced";
|
|
276
|
+
|
|
277
|
+
const source = manifestDeckSource(manifest);
|
|
278
|
+
app.route("/internal-slides", decksRouter({ source, dev: true }));
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
このレベルでは mount path、source policy、option merge をアプリ側が管理します。通常の利用では generated `createDecks(config)` のほうが安全で短くなります。
|
|
282
|
+
|
|
283
|
+
## Examples
|
|
284
|
+
|
|
285
|
+
- `examples/minimal`: standalone Worker の最小構成
|
|
286
|
+
- `examples/basic`: R2、Browser Rendering、custom routes、client components
|
|
287
|
+
- `examples/honox`: HonoX integration
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { C as CompiledDeck, R as ResolvedDeckDocument, a as CompiledSlide, A as AssetRef, D as DeckManifest, b as DeckSource } from './define-decks-U4NxIs66.js';
|
|
2
|
+
export { c as CompileWarning, d as ComponentPlaceholder, e as ConfiguredDecks, f as DeckBrowserRunBinding, g as DeckBrowserRunPdfOptions, h as DeckBrowserRunPngOptions, i as DeckContextOptions, j as DeckContextVariables, k as DeckControlIconName, l as DeckDevResolver, m as DeckDevResolverInput, n as DeckDocumentOptions, o as DeckDocumentPageOptions, p as DeckDocumentRenderInput, q as DeckDocumentSurface, r as DeckEntry, s as DeckExportOptions, t as DeckExportResolverInput, u as DeckExternalEmbedContext, v as DeckExternalEmbedOptions, w as DeckExternalEmbedRenderInput, x as DeckExternalEmbedViewerOptions, y as DeckFrontmatter, z as DeckIndexPageInput, B as DeckIndexPageOptions, E as DeckIndexRenderInput, F as DeckKind, G as DeckPageMeta, H as DeckPaths, I as DeckPresenterEnabledInput, J as DeckPresenterEnabledResolver, K as DeckPresenterViewerControlOptions, L as DeckRequestContext, M as DeckRouteEnabled, N as DeckRouteEnabledResolver, O as DeckRouteSurface, P as DeckRouteSurfaceInput, Q as DeckTocItem, S as DeckViewerAvailablePages, T as DeckViewerControlDefaults, U as DeckViewerControlItem, V as DeckViewerControlItemRenderer, W as DeckViewerControlKey, X as DeckViewerControlRenderInput, Y as DeckViewerControlSlotItems, Z as DeckViewerControlsContext, _ as DeckViewerControlsItemsResolver, $ as DeckViewerControlsOptions, a0 as DeckViewerDefaultControlItem, a1 as DeckViewerEmbed, a2 as DeckViewerEmbedOptions, a3 as DeckViewerExportPaths, a4 as DeckViewerLinkControlItem, a5 as DeckViewerOptions, a6 as DeckViewerPart, a7 as DeckViewerParts, a8 as DeckViewerRenderControlItem, a9 as DeckViewerRenderInput, aa as DecksBuildConfig, ab as DecksConfig, ac as DecksOptions, ad as DecksRouterConfig, ae as DecksRouterExtension, af as DecksRouterOptions, ag as DecksRouterOverrides, ah as DecksRouterPagesOptions, ai as DecksRouterPresenterOptions, aj as DefinedDecks, ak as SLIDE_TRANSITIONS, al as SlideFrontmatter, am as SlideTransition, an as configureDecks, ao as controlIconLabel, ap as createDeckPaths, aq as createDeckViewerEmbed, ar as createDeckViewerParts, as as deckContext, at as decksRouter, au as defineDecks, av as defineDecksConfig, aw as mergeDecksRouterOptions, ax as renderControlIcon, ay as renderControlIconHtml } from './define-decks-U4NxIs66.js';
|
|
3
|
+
export { R2AssetKeyInput, R2AssetSourceOptions, R2BucketLike, R2BucketResolver, R2ObjectBodyLike, R2ObjectHttpMetadataLike, withR2Assets } from './mod.js';
|
|
4
|
+
import { a as SlideComponentRegistry, b as SlideComponentInput } from './jsx-renderer-BO-N4tMZ.js';
|
|
5
|
+
export { D as DeckRenderable, M as MaybePromise, S as SlideComponent, c as SlideComponentDefinition, d as SlideComponentProps, e as builtInSlideComponents, f as defineSlideComponents } from './jsx-renderer-BO-N4tMZ.js';
|
|
6
|
+
import { Handler, Env } from 'hono';
|
|
7
|
+
import 'hono/jsx';
|
|
8
|
+
import 'hono/utils/html';
|
|
9
|
+
|
|
10
|
+
declare function renderCompiledDeckPage(input: {
|
|
11
|
+
deck: CompiledDeck;
|
|
12
|
+
mountPath: string;
|
|
13
|
+
style?: string;
|
|
14
|
+
liveReloadPath?: string;
|
|
15
|
+
components?: SlideComponentRegistry | Record<string, SlideComponentInput>;
|
|
16
|
+
clientEntry?: string;
|
|
17
|
+
printPreview?: boolean;
|
|
18
|
+
speakerNotes?: boolean;
|
|
19
|
+
document?: ResolvedDeckDocument;
|
|
20
|
+
}): string;
|
|
21
|
+
declare function renderCompiledDeckPageAsync(input: {
|
|
22
|
+
deck: CompiledDeck;
|
|
23
|
+
mountPath: string;
|
|
24
|
+
style?: string;
|
|
25
|
+
liveReloadPath?: string;
|
|
26
|
+
components?: SlideComponentRegistry | Record<string, SlideComponentInput>;
|
|
27
|
+
clientEntry?: string;
|
|
28
|
+
printPreview?: boolean;
|
|
29
|
+
speakerNotes?: boolean;
|
|
30
|
+
document?: ResolvedDeckDocument;
|
|
31
|
+
}): Promise<string>;
|
|
32
|
+
|
|
33
|
+
declare function renderCompiledDeck(deck: CompiledDeck, input?: {
|
|
34
|
+
components?: SlideComponentRegistry | Record<string, SlideComponentInput>;
|
|
35
|
+
speakerNotes?: boolean;
|
|
36
|
+
}): string;
|
|
37
|
+
declare function renderCompiledDeckAsync(deck: CompiledDeck, input?: {
|
|
38
|
+
components?: SlideComponentRegistry | Record<string, SlideComponentInput>;
|
|
39
|
+
speakerNotes?: boolean;
|
|
40
|
+
}): Promise<string>;
|
|
41
|
+
declare function renderCompiledSlide(slide: CompiledSlide, assets?: AssetRef[], input?: {
|
|
42
|
+
components?: SlideComponentRegistry | Record<string, SlideComponentInput>;
|
|
43
|
+
deck?: CompiledDeck;
|
|
44
|
+
speakerNotes?: boolean;
|
|
45
|
+
slideState?: "active" | "inactive";
|
|
46
|
+
}): string;
|
|
47
|
+
declare function renderCompiledSlideAsync(slide: CompiledSlide, assets?: AssetRef[], input?: {
|
|
48
|
+
components?: SlideComponentRegistry | Record<string, SlideComponentInput>;
|
|
49
|
+
deck?: CompiledDeck;
|
|
50
|
+
speakerNotes?: boolean;
|
|
51
|
+
slideState?: "active" | "inactive";
|
|
52
|
+
}): Promise<string>;
|
|
53
|
+
|
|
54
|
+
interface ServeDecksClientEntryOptions {
|
|
55
|
+
cacheControl?: string | false;
|
|
56
|
+
contentType?: string;
|
|
57
|
+
}
|
|
58
|
+
declare function serveDecksClientEntry(clientEntry: string, options?: ServeDecksClientEntryOptions): Handler;
|
|
59
|
+
|
|
60
|
+
declare function manifestDeckSource<E extends Env = any>(manifest: DeckManifest): DeckSource<E>;
|
|
61
|
+
|
|
62
|
+
export { AssetRef, CompiledDeck, CompiledSlide, DeckManifest, DeckSource, ResolvedDeckDocument, type ServeDecksClientEntryOptions, SlideComponentInput, SlideComponentRegistry, manifestDeckSource, renderCompiledDeck, renderCompiledDeckAsync, renderCompiledDeckPage, renderCompiledDeckPageAsync, renderCompiledSlide, renderCompiledSlideAsync, serveDecksClientEntry };
|