hono-decks 1.0.4 → 1.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/README.ja.md +221 -3
- package/README.md +241 -3
- package/dist/adapters/hono-markdown.d.ts +39 -0
- package/dist/adapters/hono-markdown.js +47 -0
- package/dist/advanced.d.ts +8 -1
- package/dist/advanced.js +165 -118
- package/dist/bin.js +356 -86
- package/dist/cli.js +356 -86
- package/dist/file-transaction-NjDxX6Gt.js +80 -0
- package/dist/honox.d.ts +21 -0
- package/dist/honox.js +47 -0
- package/dist/init-vite-EA_L4k2H.js +441 -0
- package/dist/mod.d.ts +8 -1
- package/dist/mod.js +7 -2
- package/dist/node.d.ts +121 -98
- package/dist/node.js +474 -157
- package/dist/vite.d.ts +4 -2
- package/dist/vite.js +441 -53
- package/package.json +15 -2
- package/skills/hono-decks/references/getting-started.md +40 -1
- package/skills/hono-decks/references/integrating.md +12 -0
- package/skills/hono-decks/references/styling.md +10 -0
- package/vite-env.d.ts +7 -0
package/dist/node.d.ts
CHANGED
|
@@ -178,6 +178,8 @@ interface CompiledDeck {
|
|
|
178
178
|
meta: DeckFrontmatter;
|
|
179
179
|
themeStyle?: string;
|
|
180
180
|
themeSourcePath?: string;
|
|
181
|
+
/** Omit generated client code for explicitly static compiled decks. */
|
|
182
|
+
clientEntryRequired?: boolean;
|
|
181
183
|
slides: CompiledSlide[];
|
|
182
184
|
assets: AssetRef[];
|
|
183
185
|
componentRegistry?: Record<string, SlideComponentInput>;
|
|
@@ -234,102 +236,6 @@ declare class RenderError extends Error {
|
|
|
234
236
|
constructor(message: string, code: string, cause?: unknown);
|
|
235
237
|
}
|
|
236
238
|
//#endregion
|
|
237
|
-
//#region src/routing/file-routing.d.ts
|
|
238
|
-
interface ResolvedDeckFile {
|
|
239
|
-
slug: string;
|
|
240
|
-
sourcePath: string;
|
|
241
|
-
kind: DeckKind;
|
|
242
|
-
assetPaths: string[];
|
|
243
|
-
}
|
|
244
|
-
declare function resolveDeckFiles(paths: string[], root?: string): ResolvedDeckFile[];
|
|
245
|
-
//#endregion
|
|
246
|
-
//#region src/generator/mdx/ogp.d.ts
|
|
247
|
-
interface LinkCardOgpMetadata {
|
|
248
|
-
title?: string;
|
|
249
|
-
description?: string;
|
|
250
|
-
image?: string;
|
|
251
|
-
siteName?: string;
|
|
252
|
-
}
|
|
253
|
-
//#endregion
|
|
254
|
-
//#region src/generator/component-registry.d.ts
|
|
255
|
-
interface DeckComponentExport {
|
|
256
|
-
slug: string;
|
|
257
|
-
sourcePath: string;
|
|
258
|
-
modulePath: string;
|
|
259
|
-
exportName: string;
|
|
260
|
-
}
|
|
261
|
-
interface ResolvedDeckComponentExport extends DeckComponentExport {
|
|
262
|
-
internalName: string;
|
|
263
|
-
}
|
|
264
|
-
interface ApplyDeckComponentRegistryInput {
|
|
265
|
-
manifest: DeckManifest;
|
|
266
|
-
components: DeckComponentExport[];
|
|
267
|
-
}
|
|
268
|
-
interface ApplyDeckComponentRegistryResult {
|
|
269
|
-
manifest: DeckManifest;
|
|
270
|
-
components: ResolvedDeckComponentExport[];
|
|
271
|
-
}
|
|
272
|
-
declare function applyDeckComponentRegistry(input: ApplyDeckComponentRegistryInput): ApplyDeckComponentRegistryResult;
|
|
273
|
-
declare function emitDeckComponentRegistryModule(components: ResolvedDeckComponentExport[]): string;
|
|
274
|
-
//#endregion
|
|
275
|
-
//#region src/node/compile-decks.d.ts
|
|
276
|
-
interface BuildDeckManifestFromFileSystemInput {
|
|
277
|
-
cwd: string;
|
|
278
|
-
root: string;
|
|
279
|
-
mountPath?: string;
|
|
280
|
-
}
|
|
281
|
-
interface WriteDeckManifestModuleInput {
|
|
282
|
-
manifest: DeckManifest;
|
|
283
|
-
outFile: string;
|
|
284
|
-
}
|
|
285
|
-
interface WriteDeckComponentRegistryModuleInput {
|
|
286
|
-
components: ResolvedDeckComponentExport[];
|
|
287
|
-
outFile: string;
|
|
288
|
-
}
|
|
289
|
-
interface WriteDecksRouterModuleInput {
|
|
290
|
-
manifestModulePath: string;
|
|
291
|
-
componentRegistryModulePath?: string;
|
|
292
|
-
outFile: string;
|
|
293
|
-
}
|
|
294
|
-
interface CompileDecksInput extends BuildDeckManifestFromFileSystemInput {
|
|
295
|
-
out: string;
|
|
296
|
-
ogpCacheFile?: string;
|
|
297
|
-
refreshOgp?: boolean;
|
|
298
|
-
resolveOgp?(this: void, url: string): Promise<LinkCardOgpMetadata | undefined>;
|
|
299
|
-
}
|
|
300
|
-
declare function compileDecks(input: CompileDecksInput): Promise<DeckManifest>;
|
|
301
|
-
declare function buildDeckManifestFromFileSystem(input: BuildDeckManifestFromFileSystemInput): Promise<DeckManifest>;
|
|
302
|
-
declare function writeDeckManifestModule(input: WriteDeckManifestModuleInput): Promise<void>;
|
|
303
|
-
declare function writeDeckComponentRegistryModule(input: WriteDeckComponentRegistryModuleInput): Promise<void>;
|
|
304
|
-
declare function writeDecksRouterModule(input: WriteDecksRouterModuleInput): Promise<void>;
|
|
305
|
-
//#endregion
|
|
306
|
-
//#region src/node/local-deck-io.d.ts
|
|
307
|
-
interface CreateLocalDeckIOInput {
|
|
308
|
-
cwd: string;
|
|
309
|
-
root: string;
|
|
310
|
-
pathExists?(this: void, path: string): boolean;
|
|
311
|
-
watchFileSystem?(this: void, path: string, options: {
|
|
312
|
-
recursive: boolean;
|
|
313
|
-
}, listener: (eventType: "rename" | "change", filename: string | null) => void): {
|
|
314
|
-
close(): void;
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
declare function createLocalDeckIO(input: CreateLocalDeckIOInput): LocalDeckIO;
|
|
318
|
-
//#endregion
|
|
319
|
-
//#region src/node/local-dev-app.d.ts
|
|
320
|
-
interface CreateLocalDevSlidesAppInput {
|
|
321
|
-
cwd: string;
|
|
322
|
-
root: string;
|
|
323
|
-
mountPath?: string;
|
|
324
|
-
watchFileSystem?: CreateLocalDeckIOInput["watchFileSystem"];
|
|
325
|
-
}
|
|
326
|
-
interface LocalDevSlidesApp {
|
|
327
|
-
app: Hono;
|
|
328
|
-
localDeckIO: LocalDeckIO;
|
|
329
|
-
stop: () => void;
|
|
330
|
-
}
|
|
331
|
-
declare function createLocalDevSlidesApp(input: CreateLocalDevSlidesAppInput): Promise<LocalDevSlidesApp>;
|
|
332
|
-
//#endregion
|
|
333
239
|
//#region src/renderer/control-icons.d.ts
|
|
334
240
|
type DeckControlIconName = "deck-list" | "home" | "viewer" | "projection" | "presenter" | "previous" | "next" | "fullscreen" | "external-link" | "print" | "details" | "export-pdf" | "export-png";
|
|
335
241
|
//#endregion
|
|
@@ -630,9 +536,14 @@ type DecksRouterOverrides<E extends Env = any> = Partial<Omit<DecksRouterOptions
|
|
|
630
536
|
type DecksRouterConfig<E extends Env = any> = Omit<DecksRouterOverrides<E>, "source">;
|
|
631
537
|
/** File-system settings consumed by the CLI. */
|
|
632
538
|
interface DecksBuildConfig {
|
|
539
|
+
/** Build-only Markdown adapter reference. "void" retains the compatible preset. */
|
|
540
|
+
markdown?: "void" | {
|
|
541
|
+
adapter: string;
|
|
542
|
+
options?: Record<string, unknown>;
|
|
543
|
+
};
|
|
633
544
|
/** Deck source directory. @default "decks" */
|
|
634
545
|
root?: string;
|
|
635
|
-
/**
|
|
546
|
+
/** CLI output directory. Vite keeps modules in memory. @default "src/generated" */
|
|
636
547
|
outDir?: string;
|
|
637
548
|
/** Optional deterministic Open Graph metadata cache. */
|
|
638
549
|
ogpCacheFile?: string;
|
|
@@ -646,11 +557,123 @@ interface DecksConfig<E extends Env = any> {
|
|
|
646
557
|
router?: DecksRouterConfig<E>;
|
|
647
558
|
}
|
|
648
559
|
//#endregion
|
|
560
|
+
//#region src/routing/file-routing.d.ts
|
|
561
|
+
interface ResolvedDeckFile {
|
|
562
|
+
slug: string;
|
|
563
|
+
sourcePath: string;
|
|
564
|
+
kind: DeckKind;
|
|
565
|
+
assetPaths: string[];
|
|
566
|
+
}
|
|
567
|
+
declare function resolveDeckFiles(paths: string[], root?: string, options?: {
|
|
568
|
+
markdown?: boolean;
|
|
569
|
+
}): ResolvedDeckFile[];
|
|
570
|
+
//#endregion
|
|
571
|
+
//#region src/generator/mdx/ogp.d.ts
|
|
572
|
+
interface LinkCardOgpMetadata {
|
|
573
|
+
title?: string;
|
|
574
|
+
description?: string;
|
|
575
|
+
image?: string;
|
|
576
|
+
siteName?: string;
|
|
577
|
+
}
|
|
578
|
+
//#endregion
|
|
579
|
+
//#region src/generator/component-registry.d.ts
|
|
580
|
+
interface DeckComponentExport {
|
|
581
|
+
slug: string;
|
|
582
|
+
sourcePath: string;
|
|
583
|
+
modulePath: string;
|
|
584
|
+
exportName: string;
|
|
585
|
+
}
|
|
586
|
+
interface ResolvedDeckComponentExport extends DeckComponentExport {
|
|
587
|
+
internalName: string;
|
|
588
|
+
}
|
|
589
|
+
interface ApplyDeckComponentRegistryInput {
|
|
590
|
+
manifest: DeckManifest;
|
|
591
|
+
components: DeckComponentExport[];
|
|
592
|
+
}
|
|
593
|
+
interface ApplyDeckComponentRegistryResult {
|
|
594
|
+
manifest: DeckManifest;
|
|
595
|
+
components: ResolvedDeckComponentExport[];
|
|
596
|
+
}
|
|
597
|
+
declare function applyDeckComponentRegistry(input: ApplyDeckComponentRegistryInput): ApplyDeckComponentRegistryResult;
|
|
598
|
+
declare function emitDeckComponentRegistryModule(components: ResolvedDeckComponentExport[]): string;
|
|
599
|
+
//#endregion
|
|
600
|
+
//#region src/node/compile-decks.d.ts
|
|
601
|
+
interface BuildDeckManifestFromFileSystemInput {
|
|
602
|
+
cwd: string;
|
|
603
|
+
root: string;
|
|
604
|
+
mountPath?: string;
|
|
605
|
+
}
|
|
606
|
+
interface WriteDeckManifestModuleInput {
|
|
607
|
+
manifest: DeckManifest;
|
|
608
|
+
outFile: string;
|
|
609
|
+
}
|
|
610
|
+
interface WriteDeckComponentRegistryModuleInput {
|
|
611
|
+
components: ResolvedDeckComponentExport[];
|
|
612
|
+
outFile: string;
|
|
613
|
+
}
|
|
614
|
+
interface WriteDecksRouterModuleInput {
|
|
615
|
+
manifestModulePath: string;
|
|
616
|
+
componentRegistryModulePath?: string;
|
|
617
|
+
outFile: string;
|
|
618
|
+
}
|
|
619
|
+
interface CompileDecksInput extends BuildDeckManifestFromFileSystemInput {
|
|
620
|
+
markdown?: DecksBuildConfig["markdown"];
|
|
621
|
+
out: string;
|
|
622
|
+
ogpCacheFile?: string;
|
|
623
|
+
refreshOgp?: boolean;
|
|
624
|
+
resolveOgp?(this: void, url: string): Promise<LinkCardOgpMetadata | undefined>;
|
|
625
|
+
}
|
|
626
|
+
/** Build information only; render using createDecks() from routerModulePath. */
|
|
627
|
+
interface CompileDecksResult {
|
|
628
|
+
outDir: string;
|
|
629
|
+
routerModulePath: string;
|
|
630
|
+
decks: DeckBuildSummary[];
|
|
631
|
+
}
|
|
632
|
+
interface DeckBuildSummary extends Omit<CompiledDeck, "slides" | "componentRegistry"> {
|
|
633
|
+
slides: (Pick<CompiledSlide, "index" | "meta" | "notes"> & {
|
|
634
|
+
modulePath: string;
|
|
635
|
+
})[];
|
|
636
|
+
}
|
|
637
|
+
declare function compileDecks(input: CompileDecksInput): Promise<CompileDecksResult>;
|
|
638
|
+
declare function buildDeckManifestFromFileSystem(input: BuildDeckManifestFromFileSystemInput): Promise<DeckManifest>;
|
|
639
|
+
declare function writeDeckManifestModule(input: WriteDeckManifestModuleInput): Promise<void>;
|
|
640
|
+
declare function writeDeckComponentRegistryModule(input: WriteDeckComponentRegistryModuleInput): Promise<void>;
|
|
641
|
+
declare function writeDecksRouterModule(input: WriteDecksRouterModuleInput): Promise<void>;
|
|
642
|
+
//#endregion
|
|
643
|
+
//#region src/node/local-deck-io.d.ts
|
|
644
|
+
interface CreateLocalDeckIOInput {
|
|
645
|
+
cwd: string;
|
|
646
|
+
root: string;
|
|
647
|
+
pathExists?(this: void, path: string): boolean;
|
|
648
|
+
watchFileSystem?(this: void, path: string, options: {
|
|
649
|
+
recursive: boolean;
|
|
650
|
+
}, listener: (eventType: "rename" | "change", filename: string | null) => void): {
|
|
651
|
+
close(): void;
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
declare function createLocalDeckIO(input: CreateLocalDeckIOInput): LocalDeckIO;
|
|
655
|
+
//#endregion
|
|
656
|
+
//#region src/node/local-dev-app.d.ts
|
|
657
|
+
interface CreateLocalDevSlidesAppInput {
|
|
658
|
+
cwd: string;
|
|
659
|
+
root: string;
|
|
660
|
+
mountPath?: string;
|
|
661
|
+
watchFileSystem?: CreateLocalDeckIOInput["watchFileSystem"];
|
|
662
|
+
}
|
|
663
|
+
interface LocalDevSlidesApp {
|
|
664
|
+
app: Hono;
|
|
665
|
+
localDeckIO: LocalDeckIO;
|
|
666
|
+
stop: () => void;
|
|
667
|
+
}
|
|
668
|
+
declare function createLocalDevSlidesApp(input: CreateLocalDevSlidesAppInput): Promise<LocalDevSlidesApp>;
|
|
669
|
+
//#endregion
|
|
649
670
|
//#region src/node/config.d.ts
|
|
650
671
|
declare const DEFAULT_DECKS_CONFIG_FILE = "hono-decks.config.ts";
|
|
651
672
|
interface LoadedDecksConfig<E extends Env = any> {
|
|
652
673
|
path: string;
|
|
653
674
|
config: DecksConfig<E>;
|
|
675
|
+
/** Absolute config inputs, including imported local settings. */
|
|
676
|
+
dependencies: string[];
|
|
654
677
|
root: string;
|
|
655
678
|
outDir: string;
|
|
656
679
|
ogpCacheFile?: string;
|
|
@@ -737,4 +760,4 @@ interface BuildDeckManifestInput {
|
|
|
737
760
|
declare function buildDeckManifest(input: BuildDeckManifestInput): Promise<DeckManifest>;
|
|
738
761
|
declare function emitDeckManifestModule(manifest: DeckManifest): string;
|
|
739
762
|
//#endregion
|
|
740
|
-
export { type ApplyDeckComponentRegistryInput, type ApplyDeckComponentRegistryResult, type AssetRef, type BuildDeckManifestFromFileSystemInput, type BuildDeckManifestInput, type CompileDeckInput, type CompileDecksInput, CompileError, type CompileWarning, type CompiledDeck, type CompiledSlide, type ComponentPlaceholder, type CreateLocalDeckIOInput, type CreateLocalDevSlidesAppInput, DEFAULT_DECKS_CONFIG_FILE, type DeckCompiler, type DeckComponentExport, type DeckEntry, type DeckFileChange, type DeckFileEntry, type DeckFrontmatter, type DeckManifest, type DeckMiddlewareOptions, type DeckRequestContext, type DeckSource, type DevDeckRuntime, type DevDeckRuntimeInput, type LoadedDecksConfig, type LocalDeckIO, type LocalDevSlidesApp, type PreviewEvent, type PreviewEventHub, type PreviewEventType, RenderError, type ResolvedDeckComponentExport, type ResolvedDeckFile, type Slide, type SlideBlock, type SlideDeck, type SlideFrontmatter, type SlideNode, type SlidePropValue, type WriteDeckComponentRegistryModuleInput, type WriteDeckManifestModuleInput, type WriteDecksRouterModuleInput, applyDeckComponentRegistry, buildDeckManifest, buildDeckManifestFromFileSystem, compileDecks, compileMarkdown, createDevDeckRuntime, createLocalDeckIO, createLocalDevSlidesApp, createPreviewEventHub, deckMiddleware, emitDeckComponentRegistryModule, emitDeckManifestModule, loadDecksConfig, parseDeck, renderDeck, renderDeckPage, renderSlide, resolveDeckFiles, writeDeckComponentRegistryModule, writeDeckManifestModule, writeDecksRouterModule };
|
|
763
|
+
export { type ApplyDeckComponentRegistryInput, type ApplyDeckComponentRegistryResult, type AssetRef, type BuildDeckManifestFromFileSystemInput, type BuildDeckManifestInput, type CompileDeckInput, type CompileDecksInput, type CompileDecksResult, CompileError, type CompileWarning, type CompiledDeck, type CompiledSlide, type ComponentPlaceholder, type CreateLocalDeckIOInput, type CreateLocalDevSlidesAppInput, DEFAULT_DECKS_CONFIG_FILE, type DeckBuildSummary, type DeckCompiler, type DeckComponentExport, type DeckEntry, type DeckFileChange, type DeckFileEntry, type DeckFrontmatter, type DeckManifest, type DeckMiddlewareOptions, type DeckRequestContext, type DeckSource, type DevDeckRuntime, type DevDeckRuntimeInput, type LoadedDecksConfig, type LocalDeckIO, type LocalDevSlidesApp, type PreviewEvent, type PreviewEventHub, type PreviewEventType, RenderError, type ResolvedDeckComponentExport, type ResolvedDeckFile, type Slide, type SlideBlock, type SlideDeck, type SlideFrontmatter, type SlideNode, type SlidePropValue, type WriteDeckComponentRegistryModuleInput, type WriteDeckManifestModuleInput, type WriteDecksRouterModuleInput, applyDeckComponentRegistry, buildDeckManifest, buildDeckManifestFromFileSystem, compileDecks, compileMarkdown, createDevDeckRuntime, createLocalDeckIO, createLocalDevSlidesApp, createPreviewEventHub, deckMiddleware, emitDeckComponentRegistryModule, emitDeckManifestModule, loadDecksConfig, parseDeck, renderDeck, renderDeckPage, renderSlide, resolveDeckFiles, writeDeckComponentRegistryModule, writeDeckManifestModule, writeDecksRouterModule };
|