@ncukondo/slide-generation 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.
@@ -0,0 +1,999 @@
1
+ import { z, ZodTypeAny } from 'zod';
2
+
3
+ declare const metaSchema: z.ZodObject<{
4
+ title: z.ZodString;
5
+ author: z.ZodOptional<z.ZodString>;
6
+ date: z.ZodOptional<z.ZodString>;
7
+ theme: z.ZodDefault<z.ZodString>;
8
+ references: z.ZodOptional<z.ZodObject<{
9
+ enabled: z.ZodDefault<z.ZodBoolean>;
10
+ style: z.ZodDefault<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ enabled: boolean;
13
+ style: string;
14
+ }, {
15
+ enabled?: boolean | undefined;
16
+ style?: string | undefined;
17
+ }>>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ title: string;
20
+ theme: string;
21
+ author?: string | undefined;
22
+ date?: string | undefined;
23
+ references?: {
24
+ enabled: boolean;
25
+ style: string;
26
+ } | undefined;
27
+ }, {
28
+ title: string;
29
+ author?: string | undefined;
30
+ date?: string | undefined;
31
+ theme?: string | undefined;
32
+ references?: {
33
+ enabled?: boolean | undefined;
34
+ style?: string | undefined;
35
+ } | undefined;
36
+ }>;
37
+ declare const slideSchema: z.ZodObject<{
38
+ template: z.ZodString;
39
+ content: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
40
+ class: z.ZodOptional<z.ZodString>;
41
+ notes: z.ZodOptional<z.ZodString>;
42
+ raw: z.ZodOptional<z.ZodString>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ template: string;
45
+ content: Record<string, unknown>;
46
+ class?: string | undefined;
47
+ notes?: string | undefined;
48
+ raw?: string | undefined;
49
+ }, {
50
+ template: string;
51
+ content?: Record<string, unknown> | undefined;
52
+ class?: string | undefined;
53
+ notes?: string | undefined;
54
+ raw?: string | undefined;
55
+ }>;
56
+ declare const presentationSchema: z.ZodObject<{
57
+ meta: z.ZodObject<{
58
+ title: z.ZodString;
59
+ author: z.ZodOptional<z.ZodString>;
60
+ date: z.ZodOptional<z.ZodString>;
61
+ theme: z.ZodDefault<z.ZodString>;
62
+ references: z.ZodOptional<z.ZodObject<{
63
+ enabled: z.ZodDefault<z.ZodBoolean>;
64
+ style: z.ZodDefault<z.ZodString>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ enabled: boolean;
67
+ style: string;
68
+ }, {
69
+ enabled?: boolean | undefined;
70
+ style?: string | undefined;
71
+ }>>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ title: string;
74
+ theme: string;
75
+ author?: string | undefined;
76
+ date?: string | undefined;
77
+ references?: {
78
+ enabled: boolean;
79
+ style: string;
80
+ } | undefined;
81
+ }, {
82
+ title: string;
83
+ author?: string | undefined;
84
+ date?: string | undefined;
85
+ theme?: string | undefined;
86
+ references?: {
87
+ enabled?: boolean | undefined;
88
+ style?: string | undefined;
89
+ } | undefined;
90
+ }>;
91
+ slides: z.ZodDefault<z.ZodArray<z.ZodObject<{
92
+ template: z.ZodString;
93
+ content: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
94
+ class: z.ZodOptional<z.ZodString>;
95
+ notes: z.ZodOptional<z.ZodString>;
96
+ raw: z.ZodOptional<z.ZodString>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ template: string;
99
+ content: Record<string, unknown>;
100
+ class?: string | undefined;
101
+ notes?: string | undefined;
102
+ raw?: string | undefined;
103
+ }, {
104
+ template: string;
105
+ content?: Record<string, unknown> | undefined;
106
+ class?: string | undefined;
107
+ notes?: string | undefined;
108
+ raw?: string | undefined;
109
+ }>, "many">>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ meta: {
112
+ title: string;
113
+ theme: string;
114
+ author?: string | undefined;
115
+ date?: string | undefined;
116
+ references?: {
117
+ enabled: boolean;
118
+ style: string;
119
+ } | undefined;
120
+ };
121
+ slides: {
122
+ template: string;
123
+ content: Record<string, unknown>;
124
+ class?: string | undefined;
125
+ notes?: string | undefined;
126
+ raw?: string | undefined;
127
+ }[];
128
+ }, {
129
+ meta: {
130
+ title: string;
131
+ author?: string | undefined;
132
+ date?: string | undefined;
133
+ theme?: string | undefined;
134
+ references?: {
135
+ enabled?: boolean | undefined;
136
+ style?: string | undefined;
137
+ } | undefined;
138
+ };
139
+ slides?: {
140
+ template: string;
141
+ content?: Record<string, unknown> | undefined;
142
+ class?: string | undefined;
143
+ notes?: string | undefined;
144
+ raw?: string | undefined;
145
+ }[] | undefined;
146
+ }>;
147
+ type PresentationMeta = z.infer<typeof metaSchema>;
148
+ type ParsedSlide = z.infer<typeof slideSchema>;
149
+ type ParsedPresentation = z.infer<typeof presentationSchema>;
150
+ declare class ParseError extends Error {
151
+ details?: unknown | undefined;
152
+ constructor(message: string, details?: unknown | undefined);
153
+ }
154
+ declare class ValidationError extends Error {
155
+ details?: unknown | undefined;
156
+ constructor(message: string, details?: unknown | undefined);
157
+ }
158
+ declare class Parser {
159
+ parse(yamlContent: string): ParsedPresentation;
160
+ parseFile(filePath: string): Promise<ParsedPresentation>;
161
+ }
162
+
163
+ /**
164
+ * Icons helper interface for template rendering
165
+ */
166
+ interface IconsHelper {
167
+ render: (name: string, options?: Record<string, unknown>) => string;
168
+ }
169
+ /**
170
+ * References helper interface for citation handling
171
+ */
172
+ interface RefsHelper {
173
+ cite: (id: string) => string;
174
+ expand: (text: string) => string;
175
+ }
176
+ /**
177
+ * Slide context passed to templates
178
+ */
179
+ interface SlideContext {
180
+ index: number;
181
+ total: number;
182
+ }
183
+ /**
184
+ * Meta context for presentation metadata
185
+ */
186
+ interface MetaContext {
187
+ title: string;
188
+ author?: string;
189
+ theme: string;
190
+ [key: string]: unknown;
191
+ }
192
+ /**
193
+ * Full template context interface
194
+ */
195
+ interface TemplateContext {
196
+ content: Record<string, unknown>;
197
+ meta: MetaContext;
198
+ slide: SlideContext;
199
+ icons: IconsHelper;
200
+ refs: RefsHelper;
201
+ [key: string]: unknown;
202
+ }
203
+ declare class TemplateEngine {
204
+ private env;
205
+ constructor();
206
+ render(template: string, context: Record<string, unknown>): string;
207
+ private registerFilters;
208
+ private registerGlobals;
209
+ }
210
+
211
+ /**
212
+ * JSON Schema type definition (subset used by templates)
213
+ */
214
+ interface JsonSchema {
215
+ type?: string;
216
+ required?: string[];
217
+ properties?: Record<string, JsonSchema>;
218
+ items?: JsonSchema;
219
+ minItems?: number;
220
+ maxItems?: number;
221
+ pattern?: string;
222
+ enum?: (string | number | boolean)[];
223
+ default?: unknown;
224
+ description?: string;
225
+ oneOf?: JsonSchema[];
226
+ }
227
+ /**
228
+ * Validation result for content against template schema
229
+ */
230
+ interface ValidationResult {
231
+ valid: boolean;
232
+ errors: string[];
233
+ }
234
+ /**
235
+ * Convert a JSON Schema object to a Zod schema
236
+ *
237
+ * Supports a subset of JSON Schema used by template definitions:
238
+ * - Basic types: string, number, boolean, array, object
239
+ * - Required fields
240
+ * - Nested objects and arrays
241
+ * - Pattern validation for strings
242
+ * - minItems/maxItems for arrays
243
+ */
244
+ declare function jsonSchemaToZod(schema: JsonSchema): ZodTypeAny;
245
+ /**
246
+ * Validate content against a JSON Schema
247
+ */
248
+ declare function validateWithJsonSchema(schema: JsonSchema, content: unknown): ValidationResult;
249
+
250
+ /**
251
+ * Template definition schema - validates YAML template definition files
252
+ */
253
+ declare const templateDefSchema: z.ZodObject<{
254
+ name: z.ZodString;
255
+ description: z.ZodString;
256
+ category: z.ZodString;
257
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
258
+ example: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
259
+ output: z.ZodString;
260
+ css: z.ZodOptional<z.ZodString>;
261
+ }, "strip", z.ZodTypeAny, {
262
+ name: string;
263
+ description: string;
264
+ category: string;
265
+ schema: Record<string, unknown>;
266
+ output: string;
267
+ example?: Record<string, unknown> | undefined;
268
+ css?: string | undefined;
269
+ }, {
270
+ name: string;
271
+ description: string;
272
+ category: string;
273
+ schema: Record<string, unknown>;
274
+ output: string;
275
+ example?: Record<string, unknown> | undefined;
276
+ css?: string | undefined;
277
+ }>;
278
+ /**
279
+ * Template definition type derived from schema
280
+ */
281
+ type TemplateDefinition = z.infer<typeof templateDefSchema>;
282
+ /**
283
+ * Loads and manages template definitions from YAML files
284
+ */
285
+ declare class TemplateLoader {
286
+ private templates;
287
+ constructor();
288
+ /**
289
+ * Load a template from a YAML string
290
+ */
291
+ loadFromString(yamlContent: string): Promise<void>;
292
+ /**
293
+ * Load a template from a file
294
+ */
295
+ loadFromFile(filePath: string): Promise<void>;
296
+ /**
297
+ * Load all templates from a directory (recursively)
298
+ */
299
+ loadBuiltIn(directory: string): Promise<void>;
300
+ /**
301
+ * Load custom templates from a directory (can override built-in)
302
+ */
303
+ loadCustom(directory: string): Promise<void>;
304
+ /**
305
+ * Internal method to load templates from a directory
306
+ */
307
+ private loadDirectory;
308
+ /**
309
+ * Get a template by name
310
+ */
311
+ get(name: string): TemplateDefinition | undefined;
312
+ /**
313
+ * List all loaded templates
314
+ */
315
+ list(): TemplateDefinition[];
316
+ /**
317
+ * List templates filtered by category
318
+ */
319
+ listByCategory(category: string): TemplateDefinition[];
320
+ /**
321
+ * Validate content against a template's schema
322
+ */
323
+ validateContent(templateName: string, content: unknown): ValidationResult;
324
+ }
325
+
326
+ /**
327
+ * Schema for individual icon source definition
328
+ */
329
+ declare const iconSourceSchema: z.ZodObject<{
330
+ name: z.ZodString;
331
+ type: z.ZodEnum<["web-font", "svg-inline", "svg-sprite", "local-svg"]>;
332
+ prefix: z.ZodString;
333
+ url: z.ZodOptional<z.ZodString>;
334
+ path: z.ZodOptional<z.ZodString>;
335
+ render: z.ZodOptional<z.ZodString>;
336
+ }, "strip", z.ZodTypeAny, {
337
+ type: "web-font" | "svg-inline" | "svg-sprite" | "local-svg";
338
+ name: string;
339
+ prefix: string;
340
+ path?: string | undefined;
341
+ url?: string | undefined;
342
+ render?: string | undefined;
343
+ }, {
344
+ type: "web-font" | "svg-inline" | "svg-sprite" | "local-svg";
345
+ name: string;
346
+ prefix: string;
347
+ path?: string | undefined;
348
+ url?: string | undefined;
349
+ render?: string | undefined;
350
+ }>;
351
+ type IconSource = z.infer<typeof iconSourceSchema>;
352
+ /**
353
+ * Schema for icon defaults
354
+ */
355
+ declare const iconDefaultsSchema: z.ZodObject<{
356
+ size: z.ZodDefault<z.ZodString>;
357
+ color: z.ZodDefault<z.ZodString>;
358
+ }, "strip", z.ZodTypeAny, {
359
+ size: string;
360
+ color: string;
361
+ }, {
362
+ size?: string | undefined;
363
+ color?: string | undefined;
364
+ }>;
365
+ type IconDefaults = z.infer<typeof iconDefaultsSchema>;
366
+ /**
367
+ * Schema for the full icon registry configuration
368
+ */
369
+ declare const iconRegistrySchema: z.ZodObject<{
370
+ sources: z.ZodArray<z.ZodObject<{
371
+ name: z.ZodString;
372
+ type: z.ZodEnum<["web-font", "svg-inline", "svg-sprite", "local-svg"]>;
373
+ prefix: z.ZodString;
374
+ url: z.ZodOptional<z.ZodString>;
375
+ path: z.ZodOptional<z.ZodString>;
376
+ render: z.ZodOptional<z.ZodString>;
377
+ }, "strip", z.ZodTypeAny, {
378
+ type: "web-font" | "svg-inline" | "svg-sprite" | "local-svg";
379
+ name: string;
380
+ prefix: string;
381
+ path?: string | undefined;
382
+ url?: string | undefined;
383
+ render?: string | undefined;
384
+ }, {
385
+ type: "web-font" | "svg-inline" | "svg-sprite" | "local-svg";
386
+ name: string;
387
+ prefix: string;
388
+ path?: string | undefined;
389
+ url?: string | undefined;
390
+ render?: string | undefined;
391
+ }>, "many">;
392
+ aliases: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
393
+ colors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
394
+ defaults: z.ZodDefault<z.ZodObject<{
395
+ size: z.ZodDefault<z.ZodString>;
396
+ color: z.ZodDefault<z.ZodString>;
397
+ }, "strip", z.ZodTypeAny, {
398
+ size: string;
399
+ color: string;
400
+ }, {
401
+ size?: string | undefined;
402
+ color?: string | undefined;
403
+ }>>;
404
+ }, "strip", z.ZodTypeAny, {
405
+ sources: {
406
+ type: "web-font" | "svg-inline" | "svg-sprite" | "local-svg";
407
+ name: string;
408
+ prefix: string;
409
+ path?: string | undefined;
410
+ url?: string | undefined;
411
+ render?: string | undefined;
412
+ }[];
413
+ aliases: Record<string, string>;
414
+ defaults: {
415
+ size: string;
416
+ color: string;
417
+ };
418
+ colors?: Record<string, string> | undefined;
419
+ }, {
420
+ sources: {
421
+ type: "web-font" | "svg-inline" | "svg-sprite" | "local-svg";
422
+ name: string;
423
+ prefix: string;
424
+ path?: string | undefined;
425
+ url?: string | undefined;
426
+ render?: string | undefined;
427
+ }[];
428
+ aliases?: Record<string, string> | undefined;
429
+ colors?: Record<string, string> | undefined;
430
+ defaults?: {
431
+ size?: string | undefined;
432
+ color?: string | undefined;
433
+ } | undefined;
434
+ }>;
435
+ type IconRegistry = z.infer<typeof iconRegistrySchema>;
436
+
437
+ /**
438
+ * Parsed icon reference with prefix and name
439
+ */
440
+ interface ParsedIconReference {
441
+ prefix: string;
442
+ name: string;
443
+ }
444
+ /**
445
+ * Icon Registry Loader - loads and manages icon registry configuration
446
+ */
447
+ declare class IconRegistryLoader {
448
+ private registry;
449
+ private sourcesByPrefix;
450
+ private aliasMap;
451
+ private colorMap;
452
+ /**
453
+ * Load registry from YAML file
454
+ */
455
+ load(configPath: string): Promise<IconRegistry>;
456
+ /**
457
+ * Resolve an alias to its icon reference
458
+ * @returns The resolved icon reference or the original name if not an alias
459
+ */
460
+ resolveAlias(nameOrAlias: string): string;
461
+ /**
462
+ * Get icon source by prefix
463
+ */
464
+ getSource(prefix: string): IconSource | undefined;
465
+ /**
466
+ * Parse an icon reference string (e.g., "mi:home" or "iconify:mdi:account")
467
+ * @returns Parsed reference or null if invalid format
468
+ */
469
+ parseIconReference(reference: string): ParsedIconReference | null;
470
+ /**
471
+ * Get registry defaults
472
+ */
473
+ getDefaults(): IconDefaults;
474
+ /**
475
+ * Get color by name from color palette
476
+ */
477
+ getColor(name: string): string | undefined;
478
+ /**
479
+ * Get all sources
480
+ */
481
+ getSources(): IconSource[];
482
+ /**
483
+ * Get all aliases
484
+ */
485
+ getAliases(): Record<string, string>;
486
+ /**
487
+ * Check if registry is loaded
488
+ */
489
+ isLoaded(): boolean;
490
+ /**
491
+ * Build internal lookup maps from registry
492
+ */
493
+ private buildMaps;
494
+ }
495
+
496
+ /**
497
+ * Options for rendering an icon
498
+ */
499
+ interface IconOptions {
500
+ size?: string;
501
+ color?: string;
502
+ class?: string;
503
+ }
504
+ /**
505
+ * Icon Resolver - renders icons from various sources
506
+ */
507
+ declare class IconResolver {
508
+ private registry;
509
+ private nunjucksEnv;
510
+ constructor(registry: IconRegistryLoader);
511
+ /**
512
+ * Render an icon by name or alias
513
+ */
514
+ render(nameOrAlias: string, options?: IconOptions): Promise<string>;
515
+ /**
516
+ * Render a web-font icon
517
+ */
518
+ private renderWebFont;
519
+ /**
520
+ * Render a local SVG icon
521
+ */
522
+ private renderLocalSvg;
523
+ /**
524
+ * Render an SVG from external URL (placeholder without cache)
525
+ */
526
+ private renderSvgInline;
527
+ /**
528
+ * Render an SVG sprite reference
529
+ */
530
+ private renderSvgSprite;
531
+ /**
532
+ * Process SVG content and apply options
533
+ */
534
+ private processSvg;
535
+ /**
536
+ * Build CSS style string
537
+ */
538
+ private buildStyle;
539
+ /**
540
+ * Build class name string
541
+ */
542
+ private buildClassName;
543
+ }
544
+
545
+ interface CSLAuthor {
546
+ family: string;
547
+ given?: string;
548
+ }
549
+ interface CSLItem {
550
+ id: string;
551
+ author?: CSLAuthor[];
552
+ issued?: {
553
+ 'date-parts': number[][];
554
+ };
555
+ title?: string;
556
+ DOI?: string;
557
+ PMID?: string;
558
+ 'container-title'?: string;
559
+ volume?: string;
560
+ issue?: string;
561
+ page?: string;
562
+ URL?: string;
563
+ type?: string;
564
+ }
565
+ /**
566
+ * Client for reference-manager CLI
567
+ */
568
+ declare class ReferenceManager {
569
+ private command;
570
+ constructor(command?: string);
571
+ /**
572
+ * Check if reference-manager CLI is available
573
+ */
574
+ isAvailable(): Promise<boolean>;
575
+ /**
576
+ * Get all references from the library
577
+ */
578
+ getAll(): Promise<CSLItem[]>;
579
+ /**
580
+ * Get a single reference by ID
581
+ */
582
+ getById(id: string): Promise<CSLItem | null>;
583
+ /**
584
+ * Get multiple references by IDs
585
+ */
586
+ getByIds(ids: string[]): Promise<Map<string, CSLItem>>;
587
+ private execCommand;
588
+ private parseJSON;
589
+ }
590
+
591
+ interface FormatterConfig {
592
+ author?: {
593
+ maxAuthors?: number;
594
+ etAl?: string;
595
+ etAlJa?: string;
596
+ separatorJa?: string;
597
+ };
598
+ inline?: {
599
+ authorSep?: string;
600
+ identifierSep?: string;
601
+ multiSep?: string;
602
+ };
603
+ }
604
+ /**
605
+ * Formats citations for inline display and bibliography generation
606
+ */
607
+ declare class CitationFormatter {
608
+ private manager;
609
+ private config;
610
+ constructor(manager: ReferenceManager, config?: FormatterConfig);
611
+ /**
612
+ * Format an inline citation
613
+ * e.g., "(Smith et al., 2024; PMID: 12345678)"
614
+ */
615
+ formatInline(id: string): Promise<string>;
616
+ /**
617
+ * Format a full bibliography citation
618
+ */
619
+ formatFull(id: string): Promise<string>;
620
+ /**
621
+ * Expand all citations in text
622
+ * e.g., "[@smith2024]" -> "(Smith et al., 2024; PMID: 12345678)"
623
+ */
624
+ expandCitations(text: string): Promise<string>;
625
+ /**
626
+ * Generate bibliography entries
627
+ */
628
+ generateBibliography(ids: string[], sort?: 'author' | 'year' | 'citation-order'): Promise<string[]>;
629
+ private formatInlineItem;
630
+ private formatFullItem;
631
+ private formatAuthorInline;
632
+ private formatAuthorsFull;
633
+ private isJapaneseAuthors;
634
+ private getFirstAuthorFamily;
635
+ private getYear;
636
+ private getIdentifier;
637
+ }
638
+
639
+ /**
640
+ * Context passed to each slide transformation
641
+ */
642
+ interface TransformContext {
643
+ meta: PresentationMeta;
644
+ slideIndex: number;
645
+ totalSlides: number;
646
+ }
647
+ /**
648
+ * Error thrown when transformation fails
649
+ */
650
+ declare class TransformError extends Error {
651
+ slide?: ParsedSlide | undefined;
652
+ details?: unknown | undefined;
653
+ constructor(message: string, slide?: ParsedSlide | undefined, details?: unknown | undefined);
654
+ }
655
+ /**
656
+ * Transformer applies templates to slides and generates HTML content
657
+ */
658
+ declare class Transformer {
659
+ private templateEngine;
660
+ private templateLoader;
661
+ private iconResolver;
662
+ private citationFormatter;
663
+ constructor(templateEngine: TemplateEngine, templateLoader: TemplateLoader, iconResolver: IconResolver, citationFormatter: CitationFormatter);
664
+ /**
665
+ * Transform a single slide using its template
666
+ */
667
+ transform(slide: ParsedSlide, context: TransformContext): Promise<string>;
668
+ /**
669
+ * Transform all slides in a presentation
670
+ */
671
+ transformAll(presentation: ParsedPresentation): Promise<string[]>;
672
+ /**
673
+ * Build the full template context with helpers that collect async operations
674
+ */
675
+ private buildTemplateContext;
676
+ /**
677
+ * Resolve all placeholders by executing async operations
678
+ */
679
+ private resolvePlaceholders;
680
+ }
681
+
682
+ /**
683
+ * Options for rendering the final Marp markdown
684
+ */
685
+ interface RenderOptions {
686
+ /** Include theme in front matter (default: true) */
687
+ includeTheme?: boolean;
688
+ /** Speaker notes for each slide (indexed by slide position) */
689
+ notes?: (string | undefined)[];
690
+ /** Additional front matter properties */
691
+ additionalFrontMatter?: Record<string, unknown>;
692
+ }
693
+ /**
694
+ * Renderer combines transformed slides into Marp-compatible Markdown
695
+ */
696
+ declare class Renderer {
697
+ /**
698
+ * Render slides and metadata into final Marp markdown
699
+ */
700
+ render(slides: string[], meta: PresentationMeta, options?: RenderOptions): string;
701
+ /**
702
+ * Render the YAML front matter block
703
+ */
704
+ private renderFrontMatter;
705
+ /**
706
+ * Format a front matter value for YAML
707
+ */
708
+ private formatFrontMatterValue;
709
+ /**
710
+ * Join slides with Marp slide separator
711
+ */
712
+ private joinSlides;
713
+ /**
714
+ * Render speaker notes as HTML comment
715
+ */
716
+ private renderSpeakerNotes;
717
+ }
718
+
719
+ declare const configSchema: z.ZodObject<{
720
+ templates: z.ZodDefault<z.ZodObject<{
721
+ builtin: z.ZodDefault<z.ZodString>;
722
+ custom: z.ZodOptional<z.ZodString>;
723
+ }, "strip", z.ZodTypeAny, {
724
+ builtin: string;
725
+ custom?: string | undefined;
726
+ }, {
727
+ custom?: string | undefined;
728
+ builtin?: string | undefined;
729
+ }>>;
730
+ icons: z.ZodDefault<z.ZodObject<{
731
+ registry: z.ZodDefault<z.ZodString>;
732
+ cache: z.ZodDefault<z.ZodObject<{
733
+ enabled: z.ZodDefault<z.ZodBoolean>;
734
+ directory: z.ZodDefault<z.ZodString>;
735
+ ttl: z.ZodDefault<z.ZodNumber>;
736
+ }, "strip", z.ZodTypeAny, {
737
+ enabled: boolean;
738
+ directory: string;
739
+ ttl: number;
740
+ }, {
741
+ enabled?: boolean | undefined;
742
+ directory?: string | undefined;
743
+ ttl?: number | undefined;
744
+ }>>;
745
+ }, "strip", z.ZodTypeAny, {
746
+ registry: string;
747
+ cache: {
748
+ enabled: boolean;
749
+ directory: string;
750
+ ttl: number;
751
+ };
752
+ }, {
753
+ registry?: string | undefined;
754
+ cache?: {
755
+ enabled?: boolean | undefined;
756
+ directory?: string | undefined;
757
+ ttl?: number | undefined;
758
+ } | undefined;
759
+ }>>;
760
+ references: z.ZodDefault<z.ZodObject<{
761
+ enabled: z.ZodDefault<z.ZodBoolean>;
762
+ connection: z.ZodDefault<z.ZodObject<{
763
+ type: z.ZodDefault<z.ZodLiteral<"cli">>;
764
+ command: z.ZodDefault<z.ZodString>;
765
+ }, "strip", z.ZodTypeAny, {
766
+ type: "cli";
767
+ command: string;
768
+ }, {
769
+ type?: "cli" | undefined;
770
+ command?: string | undefined;
771
+ }>>;
772
+ format: z.ZodDefault<z.ZodObject<{
773
+ locale: z.ZodDefault<z.ZodString>;
774
+ authorSep: z.ZodDefault<z.ZodString>;
775
+ identifierSep: z.ZodDefault<z.ZodString>;
776
+ maxAuthors: z.ZodDefault<z.ZodNumber>;
777
+ etAl: z.ZodDefault<z.ZodString>;
778
+ etAlJa: z.ZodDefault<z.ZodString>;
779
+ }, "strip", z.ZodTypeAny, {
780
+ etAl: string;
781
+ etAlJa: string;
782
+ locale: string;
783
+ authorSep: string;
784
+ identifierSep: string;
785
+ maxAuthors: number;
786
+ }, {
787
+ etAl?: string | undefined;
788
+ etAlJa?: string | undefined;
789
+ locale?: string | undefined;
790
+ authorSep?: string | undefined;
791
+ identifierSep?: string | undefined;
792
+ maxAuthors?: number | undefined;
793
+ }>>;
794
+ }, "strip", z.ZodTypeAny, {
795
+ enabled: boolean;
796
+ connection: {
797
+ type: "cli";
798
+ command: string;
799
+ };
800
+ format: {
801
+ etAl: string;
802
+ etAlJa: string;
803
+ locale: string;
804
+ authorSep: string;
805
+ identifierSep: string;
806
+ maxAuthors: number;
807
+ };
808
+ }, {
809
+ enabled?: boolean | undefined;
810
+ connection?: {
811
+ type?: "cli" | undefined;
812
+ command?: string | undefined;
813
+ } | undefined;
814
+ format?: {
815
+ etAl?: string | undefined;
816
+ etAlJa?: string | undefined;
817
+ locale?: string | undefined;
818
+ authorSep?: string | undefined;
819
+ identifierSep?: string | undefined;
820
+ maxAuthors?: number | undefined;
821
+ } | undefined;
822
+ }>>;
823
+ output: z.ZodDefault<z.ZodObject<{
824
+ theme: z.ZodDefault<z.ZodString>;
825
+ inlineStyles: z.ZodDefault<z.ZodBoolean>;
826
+ }, "strip", z.ZodTypeAny, {
827
+ theme: string;
828
+ inlineStyles: boolean;
829
+ }, {
830
+ theme?: string | undefined;
831
+ inlineStyles?: boolean | undefined;
832
+ }>>;
833
+ }, "strip", z.ZodTypeAny, {
834
+ references: {
835
+ enabled: boolean;
836
+ connection: {
837
+ type: "cli";
838
+ command: string;
839
+ };
840
+ format: {
841
+ etAl: string;
842
+ etAlJa: string;
843
+ locale: string;
844
+ authorSep: string;
845
+ identifierSep: string;
846
+ maxAuthors: number;
847
+ };
848
+ };
849
+ icons: {
850
+ registry: string;
851
+ cache: {
852
+ enabled: boolean;
853
+ directory: string;
854
+ ttl: number;
855
+ };
856
+ };
857
+ output: {
858
+ theme: string;
859
+ inlineStyles: boolean;
860
+ };
861
+ templates: {
862
+ builtin: string;
863
+ custom?: string | undefined;
864
+ };
865
+ }, {
866
+ references?: {
867
+ enabled?: boolean | undefined;
868
+ connection?: {
869
+ type?: "cli" | undefined;
870
+ command?: string | undefined;
871
+ } | undefined;
872
+ format?: {
873
+ etAl?: string | undefined;
874
+ etAlJa?: string | undefined;
875
+ locale?: string | undefined;
876
+ authorSep?: string | undefined;
877
+ identifierSep?: string | undefined;
878
+ maxAuthors?: number | undefined;
879
+ } | undefined;
880
+ } | undefined;
881
+ icons?: {
882
+ registry?: string | undefined;
883
+ cache?: {
884
+ enabled?: boolean | undefined;
885
+ directory?: string | undefined;
886
+ ttl?: number | undefined;
887
+ } | undefined;
888
+ } | undefined;
889
+ output?: {
890
+ theme?: string | undefined;
891
+ inlineStyles?: boolean | undefined;
892
+ } | undefined;
893
+ templates?: {
894
+ custom?: string | undefined;
895
+ builtin?: string | undefined;
896
+ } | undefined;
897
+ }>;
898
+ type Config = z.infer<typeof configSchema>;
899
+
900
+ /**
901
+ * Options for the Pipeline
902
+ */
903
+ interface PipelineOptions {
904
+ /** Custom config path override */
905
+ configPath?: string;
906
+ /** Output file path (if not specified, returns string only) */
907
+ outputPath?: string;
908
+ /** Enable verbose/progress output */
909
+ verbose?: boolean;
910
+ }
911
+ /**
912
+ * Result of a pipeline run
913
+ */
914
+ interface PipelineResult {
915
+ /** Generated Marp markdown */
916
+ output: string;
917
+ /** Citation IDs found in the presentation */
918
+ citations: string[];
919
+ /** Warnings generated during processing */
920
+ warnings: string[];
921
+ /** Number of slides processed */
922
+ slideCount: number;
923
+ }
924
+ /**
925
+ * Error thrown when pipeline processing fails
926
+ */
927
+ declare class PipelineError extends Error {
928
+ stage: string;
929
+ details?: unknown | undefined;
930
+ constructor(message: string, stage: string, details?: unknown | undefined);
931
+ }
932
+ /**
933
+ * Pipeline orchestrates the full YAML to Marp markdown conversion
934
+ *
935
+ * Stages:
936
+ * 1. Parse Source - Load and validate YAML
937
+ * 2. Collect Citations - Extract citation IDs from all slides
938
+ * 3. Resolve References - Fetch bibliography data
939
+ * 4. Transform Slides - Apply templates and resolve icons/citations
940
+ * 5. Render Output - Generate final Marp markdown
941
+ */
942
+ declare class Pipeline {
943
+ private config;
944
+ private parser;
945
+ private templateEngine;
946
+ private templateLoader;
947
+ private iconRegistry;
948
+ private iconResolver;
949
+ private referenceManager;
950
+ private citationExtractor;
951
+ private citationFormatter;
952
+ private transformer;
953
+ private renderer;
954
+ private warnings;
955
+ constructor(config: Config);
956
+ /**
957
+ * Run the full conversion pipeline
958
+ */
959
+ run(inputPath: string, options?: PipelineOptions): Promise<string>;
960
+ /**
961
+ * Run the full pipeline with detailed result
962
+ */
963
+ runWithResult(inputPath: string, options?: PipelineOptions): Promise<PipelineResult>;
964
+ /**
965
+ * Initialize the pipeline by loading templates and icon registry
966
+ */
967
+ initialize(): Promise<void>;
968
+ /**
969
+ * Get collected warnings
970
+ */
971
+ getWarnings(): string[];
972
+ /**
973
+ * Stage 1: Parse the YAML source file
974
+ */
975
+ private parseSource;
976
+ /**
977
+ * Stage 2: Collect all citation IDs from the presentation
978
+ */
979
+ private collectCitations;
980
+ /**
981
+ * Stage 3: Resolve references from the reference manager
982
+ */
983
+ private resolveReferences;
984
+ /**
985
+ * Stage 4: Transform all slides using templates
986
+ */
987
+ private transformSlides;
988
+ /**
989
+ * Stage 5: Render the final Marp markdown
990
+ */
991
+ private render;
992
+ }
993
+
994
+ /**
995
+ * slide-generation - A CLI tool to generate Marp-compatible Markdown from YAML source files
996
+ */
997
+ declare const VERSION = "0.1.0";
998
+
999
+ export { type IconsHelper, type JsonSchema, type MetaContext, ParseError, type ParsedPresentation, type ParsedSlide, Parser, Pipeline, PipelineError, type PipelineOptions, type PipelineResult, type PresentationMeta, type RefsHelper, type RenderOptions, Renderer, type SlideContext, type TemplateContext, type TemplateDefinition, TemplateEngine, TemplateLoader, type TransformContext, TransformError, Transformer, VERSION, ValidationError, type ValidationResult, jsonSchemaToZod, presentationSchema, templateDefSchema, validateWithJsonSchema };