claude-presentation-master 4.2.0 → 4.4.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/dist/index.d.ts CHANGED
@@ -1,237 +1,269 @@
1
1
  /**
2
2
  * Claude Presentation Master - Type Definitions
3
- *
4
- * Clean rewrite: All types for KB-driven presentation generation.
5
- * Every decision comes from the Knowledge Base - no hardcoded fallbacks.
6
- */
7
- /**
8
- * The 7 distinct presentation types, each with its own validation rules.
9
- * These come from KB path: presentation_types.<type>
10
- */
11
- type PresentationType = 'ted_keynote' | 'sales_pitch' | 'consulting_deck' | 'investment_banking' | 'investor_pitch' | 'technical_presentation' | 'all_hands';
12
- /**
13
- * Legacy mode for backwards compatibility
3
+ * @module types
14
4
  */
15
5
  type PresentationMode = 'keynote' | 'business';
16
6
  type OutputFormat = 'html' | 'pptx';
17
- type SlideType$1 = 'title' | 'title_impact' | 'agenda' | 'section_divider' | 'thank_you' | 'single_statement' | 'big_idea' | 'big_number' | 'full_image' | 'quote' | 'star_moment' | 'call_to_action' | 'three_points' | 'bullet_points' | 'two_column' | 'three_column' | 'comparison' | 'timeline' | 'process' | 'metrics_grid' | 'data_insight' | 'problem_statement' | 'solution_overview' | 'social_proof' | 'testimonial' | 'pricing' | 'demo_screenshot' | 'executive_summary_scr' | 'mece_breakdown' | 'recommendation' | 'risks_mitigation' | 'next_steps' | 'credentials' | 'valuation_summary' | 'football_field' | 'comparable_companies' | 'precedent_transactions' | 'dcf_summary' | 'waterfall_bridge' | 'sources_uses' | 'situation_overview' | 'risk_factors' | 'process_timeline';
7
+ type ThemeName = 'default' | 'light-corporate' | 'modern-tech' | 'minimal' | 'warm' | 'creative';
8
+ interface PresentationConfig {
9
+ /** Input content (Markdown, JSON, YAML, or plain text) */
10
+ content: string;
11
+ /** Content format */
12
+ contentType: 'markdown' | 'json' | 'yaml' | 'text';
13
+ /** Presentation mode: keynote (6-25 words/slide) or business (40-80 words/slide) */
14
+ mode: PresentationMode;
15
+ /** Output formats to generate */
16
+ format: OutputFormat[];
17
+ /** Visual theme */
18
+ theme?: ThemeName;
19
+ /** Minimum QA score required (0-100, default: 95) */
20
+ qaThreshold?: number;
21
+ /** Skip QA validation (NOT RECOMMENDED) */
22
+ skipQA?: boolean;
23
+ /** Presentation title */
24
+ title: string;
25
+ /** Author name */
26
+ author?: string;
27
+ /** Subject/description */
28
+ subject?: string;
29
+ /** Output directory */
30
+ output?: string;
31
+ /** Minify HTML output */
32
+ minify?: boolean;
33
+ /** Custom CSS to inject */
34
+ customCSS?: string;
35
+ /** Custom Handlebars templates */
36
+ customTemplates?: Record<string, string>;
37
+ }
38
+ type SlideType = 'title' | 'agenda' | 'section-divider' | 'thank-you' | 'big-idea' | 'single-statement' | 'big-number' | 'full-image' | 'quote' | 'two-column' | 'three-column' | 'bullet-points' | 'screenshot' | 'screenshot-left' | 'screenshot-right' | 'comparison' | 'timeline' | 'process' | 'metrics-grid' | 'pricing' | 'team' | 'features' | 'chart' | 'table' | 'social-proof' | 'case-study' | 'cta';
18
39
  interface Slide {
19
40
  /** Slide index (0-based) */
20
41
  index: number;
21
- /** Slide type from KB */
22
- type: SlideType$1;
23
- /** Slide content */
42
+ /** Slide type */
43
+ type: SlideType;
44
+ /** Slide data for template rendering */
24
45
  data: SlideData;
25
- /** Slide-level score (must be >= 95) */
26
- score?: SlideScore;
46
+ /** CSS classes to apply */
47
+ classes?: string[];
48
+ /** Custom styles */
49
+ styles?: Record<string, string>;
27
50
  /** Speaker notes */
28
51
  notes?: string;
29
52
  }
30
53
  interface SlideData {
31
- /** Main title (action title for consulting, emotional for keynote) */
54
+ /** Main title */
32
55
  title?: string;
33
56
  /** Subtitle */
34
57
  subtitle?: string;
35
- /** Body text */
58
+ /** Body content */
36
59
  body?: string;
37
60
  /** Bullet points */
38
61
  bullets?: string[];
39
- /** Key message / takeaway */
62
+ /** Key message */
40
63
  keyMessage?: string;
64
+ /** Images */
65
+ images?: ImageData[];
66
+ /** Metrics/KPIs */
67
+ metrics?: MetricData[];
41
68
  /** Quote text */
42
69
  quote?: string;
43
70
  /** Quote attribution */
44
71
  attribution?: string;
45
- /** Metrics for metrics_grid */
46
- metrics?: MetricData$1[];
47
- /** Source citation (required for consulting/IB) */
72
+ /** Source citation */
48
73
  source?: string;
49
- /** Callout text (for data slides) */
50
- callout?: string;
51
- /** Background image path (local file or URL) */
52
- image?: string;
53
74
  /** Additional custom data */
54
75
  [key: string]: unknown;
55
76
  }
56
- interface MetricData$1 {
77
+ interface ImageData {
78
+ src: string;
79
+ alt: string;
80
+ caption?: string;
81
+ }
82
+ interface MetricData {
57
83
  value: string | number;
58
84
  label: string;
59
85
  change?: string;
60
86
  trend?: 'up' | 'down' | 'neutral';
61
87
  }
62
- interface SlideScore {
63
- /** Total score (0-100) - must be >= 95 */
64
- total: number;
65
- /** Visual quality score (weighted per type) */
66
- visual: CategoryScore;
67
- /** Content quality score (weighted per type) */
68
- content: CategoryScore;
69
- /** Expert compliance score (weighted per type) */
70
- expert: CategoryScore;
71
- /** Accessibility score (weighted per type) */
72
- accessibility: CategoryScore;
73
- /** Did this slide pass? */
88
+ interface QAResults {
89
+ /** Visual quality results */
90
+ visual: VisualQAResults;
91
+ /** Content quality results */
92
+ content: ContentQAResults;
93
+ /** Expert methodology compliance */
94
+ expert: ExpertQAResults;
95
+ /** Accessibility compliance */
96
+ accessibility: AccessibilityResults;
97
+ /** Overall pass/fail */
74
98
  passed: boolean;
75
- /** Specific violations found */
76
- violations: Violation[];
77
- }
78
- interface CategoryScore {
79
- /** Raw score (0-100) */
80
- score: number;
81
- /** Weight for this category (from KB) */
82
- weight: number;
83
- /** Weighted contribution to total */
84
- weighted: number;
85
- /** Checks that passed */
86
- passed: string[];
87
- /** Checks that failed */
88
- failed: string[];
89
- }
90
- interface Violation {
91
- /** Severity level */
92
- severity: 'critical' | 'major' | 'minor';
93
- /** Category */
94
- category: 'visual' | 'content' | 'expert' | 'accessibility';
95
- /** KB path that was violated */
96
- kbPath: string;
97
- /** What was expected (from KB) */
98
- expected: string;
99
- /** What was found */
100
- actual: string;
101
- /** How to fix it */
102
- fix: string;
103
- }
104
- interface DeckScore {
105
- /** Overall deck score (0-100) */
106
- total: number;
107
- /** Individual slide scores */
108
- slideScores: SlideScore[];
109
- /** Holistic checks */
110
- holistic: HolisticScore;
111
- /** Did the deck pass? */
99
+ /** List of issues found */
100
+ issues: QAIssue[];
101
+ }
102
+ interface VisualQAResults {
103
+ /** Whitespace percentage (target: 35%+ keynote, 25%+ business) */
104
+ whitespacePercentage: number;
105
+ /** Layout balance score (0-1) */
106
+ layoutBalance: number;
107
+ /** Contrast ratio (target: 4.5+) */
108
+ contrastRatio: number;
109
+ /** Number of font families used (target: ≤2) */
110
+ fontFamilies: number;
111
+ /** Number of colors used */
112
+ colorCount: number;
113
+ /** Screenshots of each slide */
114
+ screenshots: Buffer[];
115
+ /** Per-slide visual scores */
116
+ perSlide: SlideVisualScore[];
117
+ }
118
+ interface SlideVisualScore {
119
+ slideIndex: number;
120
+ whitespace: number;
121
+ balance: number;
122
+ contrast: number;
112
123
  passed: boolean;
113
- /** Deck-level violations */
114
- violations: Violation[];
124
+ issues: string[];
115
125
  }
116
- interface HolisticScore {
117
- /** Narrative flow (Sparkline, SCQA) */
118
- narrativeFlow: number;
119
- /** Visual consistency */
120
- visualConsistency: number;
121
- /** Has required elements (STAR moment, CTA, etc.) */
122
- requiredElements: number;
123
- /** No anti-patterns */
124
- antiPatternFree: number;
126
+ interface ContentQAResults {
127
+ /** Per-slide content analysis */
128
+ perSlide: SlideContentScore[];
129
+ /** Glance test results */
130
+ glanceTest: GlanceTestResult[];
131
+ /** Signal-to-noise ratio results */
132
+ signalNoise: SignalNoiseResult[];
133
+ /** One idea per slide validation */
134
+ oneIdea: OneIdeaResult[];
135
+ }
136
+ interface SlideContentScore {
137
+ slideIndex: number;
138
+ wordCount: number;
139
+ withinLimit: boolean;
140
+ hasActionTitle: boolean;
141
+ issues: string[];
125
142
  }
126
- interface KBPresentationType {
127
- id: PresentationType;
128
- name: string;
129
- description: string;
130
- use_for: string[];
131
- primary_experts: string[];
132
- validation_rules: KBValidationRules;
133
- slide_types_allowed: string[];
134
- required_elements: string[];
135
- anti_patterns: string[];
136
- color_palette: string;
137
- typography: KBTypography;
138
- scoring_weights: KBScoringWeights;
143
+ interface GlanceTestResult {
144
+ slideIndex: number;
145
+ keyMessage: string;
146
+ wordCount: number;
147
+ readingTime: number;
148
+ passed: boolean;
149
+ recommendation?: string;
139
150
  }
140
- interface KBValidationRules {
141
- words_per_slide: {
142
- min: number;
143
- max: number;
144
- ideal: number;
145
- };
146
- whitespace: {
147
- min: number;
148
- ideal: number;
149
- max?: number;
150
- };
151
- bullets_per_slide: {
152
- max: number;
153
- };
154
- action_titles_required: boolean;
155
- sources_required: boolean;
156
- callouts_required?: boolean;
157
- dense_data_allowed?: boolean;
151
+ interface SignalNoiseResult {
152
+ slideIndex: number;
153
+ signalCount: number;
154
+ noiseCount: number;
155
+ signalRatio: number;
156
+ passed: boolean;
157
+ noiseElements: string[];
158
158
  }
159
- interface KBTypography {
160
- titles?: string;
161
- body?: string;
162
- action_title?: string;
163
- section_headers?: string;
164
- data_labels?: string;
165
- max_fonts: number;
159
+ interface OneIdeaResult {
160
+ slideIndex: number;
161
+ ideaCount: number;
162
+ mainIdea: string;
163
+ passed: boolean;
164
+ conflictingIdeas?: string[];
165
+ }
166
+ interface ExpertQAResults {
167
+ /** Nancy Duarte validation */
168
+ duarte: ExpertValidation;
169
+ /** Garr Reynolds validation */
170
+ reynolds: ExpertValidation;
171
+ /** Carmine Gallo validation */
172
+ gallo: ExpertValidation;
173
+ /** Chris Anderson validation */
174
+ anderson: ExpertValidation;
175
+ }
176
+ interface ExpertValidation {
177
+ expertName: string;
178
+ principlesChecked: string[];
179
+ passed: boolean;
180
+ score: number;
181
+ violations: string[];
182
+ }
183
+ interface AccessibilityResults {
184
+ /** WCAG compliance level achieved */
185
+ wcagLevel: 'A' | 'AA' | 'AAA' | 'FAIL';
186
+ /** Contrast issues found */
187
+ contrastIssues: ContrastIssue[];
188
+ /** Font size issues */
189
+ fontSizeIssues: FontSizeIssue[];
190
+ /** Focus state coverage */
191
+ focusCoverage: number;
192
+ /** Color-blind safety */
193
+ colorBlindSafe: boolean;
194
+ }
195
+ interface ContrastIssue {
196
+ slideIndex: number;
197
+ element: string;
198
+ foreground: string;
199
+ background: string;
200
+ ratio: number;
201
+ required: number;
166
202
  }
167
- interface KBScoringWeights {
168
- visual_quality: number;
169
- content_quality: number;
170
- expert_compliance: number;
171
- accessibility: number;
203
+ interface FontSizeIssue {
204
+ slideIndex: number;
205
+ element: string;
206
+ actualSize: number;
207
+ minimumSize: number;
208
+ }
209
+ interface QAIssue {
210
+ /** Issue severity */
211
+ severity: 'error' | 'warning' | 'info';
212
+ /** Issue category */
213
+ category: 'visual' | 'content' | 'expert' | 'accessibility';
214
+ /** Slide index (if applicable) */
215
+ slideIndex?: number;
216
+ /** Issue description */
217
+ message: string;
218
+ /** Suggested fix */
219
+ suggestion?: string;
172
220
  }
173
- interface KBScoringRubric {
174
- total_points: number;
175
- passing_threshold: number;
176
- categories: {
177
- visual_quality: KBScoringCategory;
178
- content_quality: KBScoringCategory;
179
- expert_compliance: KBScoringCategory;
180
- accessibility: KBScoringCategory;
221
+ interface PresentationResult {
222
+ /** Generated outputs */
223
+ outputs: {
224
+ html?: string;
225
+ pptx?: Buffer;
181
226
  };
227
+ /** QA validation results */
228
+ qaResults: QAResults;
229
+ /** Overall QA score (0-100) */
230
+ score: number;
231
+ /** Presentation metadata */
232
+ metadata: PresentationMetadata;
182
233
  }
183
- interface KBScoringCategory {
184
- weight: number;
185
- checks: Record<string, KBCheck>;
186
- }
187
- interface KBCheck {
188
- points: number;
189
- description: string;
190
- validation?: string;
191
- }
192
- interface KBExpert {
193
- name: string;
194
- core_principles: Record<string, KBPrinciple>;
195
- }
196
- interface KBPrinciple {
197
- description: string;
198
- rules?: string[];
199
- examples?: string[];
234
+ interface PresentationMetadata {
235
+ /** Presentation title */
236
+ title: string;
237
+ /** Author */
238
+ author: string;
239
+ /** Generation timestamp */
240
+ generatedAt: string;
241
+ /** Presentation mode */
242
+ mode: PresentationMode;
243
+ /** Total slide count */
244
+ slideCount: number;
245
+ /** Total word count */
246
+ wordCount: number;
247
+ /** Average words per slide */
248
+ avgWordsPerSlide: number;
249
+ /** Estimated presentation duration (minutes) */
250
+ estimatedDuration: number;
251
+ /** Themes/frameworks used */
252
+ frameworks: string[];
200
253
  }
201
254
  interface ContentAnalysis {
202
- /** Detected presentation type */
203
- detectedType: PresentationType;
204
- /** Extracted title */
205
- title: string;
206
- /** Sections found */
207
- sections: ContentSection[];
208
- /** Key messages */
255
+ /** SCQA structure extracted */
256
+ scqa: SCQAStructure;
257
+ /** Sparkline narrative arc */
258
+ sparkline: SparklineStructure;
259
+ /** Key messages identified */
209
260
  keyMessages: string[];
210
- /** Data points (metrics, percentages) */
211
- dataPoints: DataPoint[];
212
- /** SCQA structure if detected */
213
- scqa?: SCQAStructure;
214
- /** Sparkline moments */
215
- sparkline?: SparklineStructure;
216
- }
217
- interface ContentSection {
218
- /** Section header */
219
- header: string;
220
- /** Header level (1-6) */
221
- level: number;
222
- /** Raw content */
223
- content: string;
224
- /** Extracted bullets */
225
- bullets: string[];
226
- /** Metrics in this section */
227
- metrics: DataPoint[];
228
- }
229
- interface DataPoint {
230
- value: string;
231
- numericValue?: number;
232
- type: 'currency' | 'percentage' | 'number' | 'time';
233
- context: string;
234
- label?: string;
261
+ /** Generated action titles */
262
+ titles: string[];
263
+ /** STAR moments identified */
264
+ starMoments: string[];
265
+ /** Estimated slide count */
266
+ estimatedSlideCount: number;
235
267
  }
236
268
  interface SCQAStructure {
237
269
  situation: string;
@@ -242,1636 +274,936 @@ interface SCQAStructure {
242
274
  interface SparklineStructure {
243
275
  whatIs: string[];
244
276
  whatCouldBe: string[];
245
- starMoment?: string;
246
277
  callToAdventure: string;
247
278
  }
248
- interface PresentationResult {
249
- /** Generated outputs */
250
- outputs: {
251
- html?: string;
252
- pptx?: Buffer;
253
- };
254
- /** Slides generated */
255
- slides: Slide[];
256
- /** Final deck score */
257
- score: DeckScore;
258
- /** Metadata */
259
- metadata: PresentationMetadata;
279
+ declare class ValidationError extends Error {
280
+ errors: string[];
281
+ constructor(errors: string[], message?: string);
260
282
  }
261
- interface PresentationMetadata {
262
- title: string;
263
- author: string;
264
- presentationType: PresentationType;
265
- generatedAt: string;
266
- slideCount: number;
267
- totalWords: number;
268
- avgWordsPerSlide: number;
269
- kbVersion: string;
283
+ declare class QAFailureError extends Error {
284
+ score: number;
285
+ threshold: number;
286
+ qaResults: QAResults;
287
+ constructor(score: number, threshold: number, qaResults: QAResults, message?: string);
288
+ getIssues(): string[];
289
+ }
290
+ declare class TemplateNotFoundError extends Error {
291
+ templatePath: string;
292
+ constructor(templatePath: string, message?: string);
270
293
  }
271
294
 
272
295
  /**
273
- * KnowledgeGateway - Single Point of Access to the Knowledge Base
296
+ * Presentation Engine - Main Orchestrator
274
297
  *
275
- * CRITICAL DESIGN PRINCIPLE: NO FALLBACKS
276
- * If data is missing from KB, we FAIL with a clear error.
277
- * Every decision in this application comes from the KB.
298
+ * Coordinates content analysis, slide generation, and QA validation
299
+ * to produce world-class presentations.
278
300
  */
279
301
 
280
- /**
281
- * Result wrapper that includes KB path for debugging
282
- */
283
- interface KBResult<T> {
284
- value: T;
285
- kbPath: string;
286
- }
287
- /**
288
- * KnowledgeGateway - The ONLY way to access KB data
289
- */
290
- declare class KnowledgeGateway {
291
- private data;
292
- private loaded;
293
- private version;
294
- /**
295
- * Load the knowledge base from YAML.
296
- * MUST be called before any queries.
297
- */
298
- load(): Promise<void>;
299
- /**
300
- * Get KB version
301
- */
302
- getVersion(): string;
303
- /**
304
- * Get complete presentation type configuration.
305
- * @throws KBQueryError if type not found
306
- */
307
- getPresentationType(type: PresentationType): KBResult<KBPresentationType>;
308
- /**
309
- * Get validation rules for a presentation type.
310
- * @throws KBQueryError if rules not found
311
- */
312
- getValidationRules(type: PresentationType): KBResult<KBValidationRules>;
313
- /**
314
- * Get word limits for a presentation type.
315
- */
316
- getWordLimits(type: PresentationType): KBResult<{
317
- min: number;
318
- max: number;
319
- ideal: number;
320
- }>;
321
- /**
322
- * Get whitespace requirements.
323
- */
324
- getWhitespaceRules(type: PresentationType): KBResult<{
325
- min: number;
326
- ideal: number;
327
- max?: number;
328
- }>;
329
- /**
330
- * Get scoring weights for a presentation type.
331
- */
332
- getScoringWeights(type: PresentationType): KBResult<KBScoringWeights>;
333
- /**
334
- * Get allowed slide types for a presentation type.
335
- */
336
- getAllowedSlideTypes(type: PresentationType): KBResult<string[]>;
337
- /**
338
- * Get required elements for a presentation type.
339
- */
340
- getRequiredElements(type: PresentationType): KBResult<string[]>;
341
- /**
342
- * Get anti-patterns to avoid for a presentation type.
343
- */
344
- getAntiPatterns(type: PresentationType): KBResult<string[]>;
345
- /**
346
- * Get the scoring rubric.
347
- */
348
- getScoringRubric(): KBResult<KBScoringRubric>;
349
- /**
350
- * Get passing threshold (default: 95).
351
- */
352
- getPassingThreshold(): KBResult<number>;
353
- /**
354
- * Get expert methodology.
355
- */
356
- getExpert(name: string): KBResult<KBExpert>;
302
+ declare class PresentationEngine {
303
+ private contentAnalyzer;
304
+ private slideFactory;
305
+ private templateEngine;
306
+ private scoreCalculator;
307
+ private qaEngine;
308
+ private htmlGenerator;
309
+ private pptxGenerator;
310
+ constructor();
357
311
  /**
358
- * Get Nancy Duarte's glance test rules.
312
+ * Generate a presentation from content.
313
+ *
314
+ * @param config - Presentation configuration
315
+ * @returns Presentation result with outputs, QA results, and score
359
316
  */
360
- getGlanceTest(): KBResult<{
361
- description: string;
362
- word_limit: number;
363
- }>;
317
+ generate(config: PresentationConfig): Promise<PresentationResult>;
364
318
  /**
365
- * Get Duarte's Sparkline framework.
319
+ * Validate presentation configuration.
366
320
  */
367
- getSparkline(): KBResult<Record<string, unknown>>;
321
+ private validateConfig;
368
322
  /**
369
- * Get Minto's SCQA framework.
323
+ * Validate slide structure before generation.
370
324
  */
371
- getSCQA(): KBResult<Record<string, unknown>>;
325
+ private validateStructure;
372
326
  /**
373
- * Get Miller's Law (7±2 items).
327
+ * Count words in a slide.
374
328
  */
375
- getMillersLaw(): KBResult<{
376
- principle: string;
377
- application: string[];
378
- }>;
329
+ private countWords;
379
330
  /**
380
- * Get accessibility requirements.
331
+ * Build presentation metadata.
381
332
  */
382
- getAccessibilityRules(): KBResult<Record<string, unknown>>;
333
+ private buildMetadata;
383
334
  /**
384
- * Get contrast ratio requirements.
335
+ * Detect which expert frameworks were applied.
385
336
  */
386
- getContrastRequirements(): KBResult<{
387
- normal_text: string;
388
- large_text: string;
389
- }>;
337
+ private detectFrameworks;
338
+ }
339
+
340
+ /**
341
+ * Content Analyzer - Extracts Structure from Raw Content
342
+ *
343
+ * Uses expert methodologies to analyze content and extract:
344
+ * - SCQA structure (Barbara Minto)
345
+ * - Sparkline narrative arc (Nancy Duarte)
346
+ * - Key messages (Rule of Three)
347
+ * - STAR moments
348
+ * - Action titles
349
+ */
350
+
351
+ declare class ContentAnalyzer {
352
+ private readonly situationSignals;
353
+ private readonly complicationSignals;
354
+ private readonly questionSignals;
355
+ private readonly answerSignals;
356
+ private readonly whatIsSignals;
357
+ private readonly whatCouldBeSignals;
390
358
  /**
391
- * Get minimum font sizes.
359
+ * Analyze content and extract structural elements.
392
360
  */
393
- getFontSizeRequirements(): KBResult<Record<string, string>>;
361
+ analyze(content: string, contentType: string): Promise<ContentAnalysis>;
394
362
  /**
395
- * Get Tufte's data-ink ratio rules.
363
+ * Parse content based on its type.
396
364
  */
397
- getDataInkRules(): KBResult<Record<string, unknown>>;
365
+ private parseContent;
398
366
  /**
399
- * Get chartjunk to avoid.
367
+ * Parse markdown content to plain text (preserving structure hints).
400
368
  */
401
- getChartjunk(): KBResult<string[]>;
369
+ private parseMarkdown;
402
370
  /**
403
- * Get Cialdini's 6 Principles of Influence.
371
+ * Parse JSON content.
404
372
  */
405
- getCialdiniPrinciples(): KBResult<Record<string, unknown>>;
373
+ private parseJSON;
406
374
  /**
407
- * Get specific Cialdini principle by name.
375
+ * Parse YAML content.
408
376
  */
409
- getCialdiniPrinciple(name: string): KBResult<Record<string, unknown>>;
377
+ private parseYAML;
410
378
  /**
411
- * Get all Gestalt principles.
379
+ * Flatten object to text.
412
380
  */
413
- getGestaltPrinciples(): KBResult<Record<string, unknown>>;
381
+ private flattenObject;
414
382
  /**
415
- * Get specific Gestalt principle by name.
383
+ * Split text into paragraphs.
416
384
  */
417
- getGestaltPrinciple(name: string): KBResult<Record<string, unknown>>;
385
+ private splitIntoParagraphs;
418
386
  /**
419
- * Get Gestalt proximity principle (for layout checks).
387
+ * Split text into sentences.
420
388
  */
421
- getGestaltProximity(): KBResult<Record<string, unknown>>;
389
+ private splitIntoSentences;
422
390
  /**
423
- * Get Gestalt similarity principle (for consistency checks).
391
+ * Extract SCQA structure (Barbara Minto's Pyramid Principle).
424
392
  */
425
- getGestaltSimilarity(): KBResult<Record<string, unknown>>;
393
+ private extractSCQA;
426
394
  /**
427
- * Get Gestalt figure-ground principle (for visual impact checks).
395
+ * Extract Sparkline structure (Nancy Duarte).
428
396
  */
429
- getGestaltFigureGround(): KBResult<Record<string, unknown>>;
397
+ private extractSparkline;
430
398
  /**
431
- * Query any KB path directly.
432
- * @throws KBQueryError if path not found
399
+ * Extract key messages (max 3 - Rule of Three).
433
400
  */
434
- queryRequired<T>(path: string): KBResult<T>;
401
+ private extractKeyMessages;
435
402
  /**
436
- * Query any KB path directly (optional - returns null if not found).
403
+ * Generate action titles (McKinsey-style).
437
404
  */
438
- queryOptional<T>(path: string): KBResult<T | null>;
405
+ private generateActionTitles;
439
406
  /**
440
- * Ensure KB is loaded.
407
+ * Transform a statement into an action title.
441
408
  */
442
- private ensureLoaded;
409
+ private transformToActionTitle;
443
410
  /**
444
- * Query a dotted path in the KB.
411
+ * Identify STAR moments (Something They'll Always Remember).
445
412
  */
446
- private query;
413
+ private identifyStarMoments;
447
414
  /**
448
- * Create a KB query error.
415
+ * Estimate slide count based on content.
449
416
  */
450
- private error;
417
+ private estimateSlideCount;
418
+ private containsSignals;
419
+ private extractRelevantSentence;
420
+ private truncateToSentence;
421
+ private truncateToWords;
422
+ private capitalizeFirst;
451
423
  }
452
- /**
453
- * Get the singleton KnowledgeGateway instance.
454
- */
455
- declare function getKB(): KnowledgeGateway;
456
- /**
457
- * Initialize and return the KB (async).
458
- */
459
- declare function initKB(): Promise<KnowledgeGateway>;
460
424
 
461
425
  /**
462
- * ContentAnalyzer - Parse and Analyze Input Content
426
+ * Slide Factory - Creates Slides from Content Analysis
463
427
  *
464
- * Parses markdown/text input and extracts:
465
- * - Sections with headers
466
- * - Bullets and key points
467
- * - Data points (metrics, percentages, currencies)
468
- * - Detects presentation type from content signals
469
- * - Identifies SCQA structure if present
470
- * - Identifies Sparkline moments
428
+ * Generates slide structures based on:
429
+ * - Presentation mode (keynote vs business)
430
+ * - Content analysis results
431
+ * - Expert methodology recommendations
471
432
  */
472
433
 
473
- declare class ContentAnalyzer {
474
- private kb;
475
- private initialized;
434
+ declare class SlideFactory {
435
+ private readonly templates;
476
436
  constructor();
477
- initialize(): Promise<void>;
478
437
  /**
479
- * Analyze content and return structured analysis.
438
+ * Create slides from analyzed content.
480
439
  */
481
- analyze(content: string, contentType?: 'markdown' | 'text'): Promise<ContentAnalysis>;
440
+ createSlides(analysis: ContentAnalysis, mode: PresentationMode): Promise<Slide[]>;
482
441
  /**
483
- * Parse content into sections based on headers.
442
+ * Create a title slide.
484
443
  */
485
- private parseSections;
444
+ private createTitleSlide;
486
445
  /**
487
- * Extract title from content.
446
+ * Create an agenda slide.
488
447
  */
489
- private extractTitle;
448
+ private createAgendaSlide;
490
449
  /**
491
- * Extract bullet points from content.
492
- * Strips markdown formatting (**bold**, *italic*, `code`) from bullet text.
450
+ * Create a context/situation slide.
493
451
  */
494
- private extractBullets;
452
+ private createContextSlide;
495
453
  /**
496
- * Strip markdown formatting from text.
497
- * Converts **bold**, *italic*, `code`, [links](url) to plain text.
454
+ * Create a problem/complication slide.
498
455
  */
499
- private stripMarkdown;
456
+ private createProblemSlide;
500
457
  /**
501
- * Extract data points (metrics, percentages, currencies, numbers).
458
+ * Create a key message slide.
502
459
  */
503
- private extractDataPoints;
460
+ private createMessageSlide;
504
461
  /**
505
- * Get surrounding context for a data point.
462
+ * Create a STAR moment slide.
506
463
  */
507
- private getContext;
464
+ private createStarMomentSlide;
508
465
  /**
509
- * Parse numeric value from string (handles M/B/K suffixes).
466
+ * Create a solution/answer slide.
510
467
  */
511
- private parseNumericValue;
468
+ private createSolutionSlide;
512
469
  /**
513
- * Extract key messages from sections.
470
+ * Create a call-to-action slide.
514
471
  */
515
- private extractKeyMessages;
472
+ private createCTASlide;
516
473
  /**
517
- * Detect presentation type based on content signals.
474
+ * Create a thank you slide.
518
475
  */
519
- private detectPresentationType;
476
+ private createThankYouSlide;
477
+ /**
478
+ * Initialize slide templates with constraints.
479
+ */
480
+ private initializeTemplates;
481
+ /**
482
+ * Truncate text to max length at word boundary.
483
+ */
484
+ private truncate;
485
+ /**
486
+ * Extract an action title from a message.
487
+ */
488
+ private extractActionTitle;
520
489
  /**
521
- * Identify SCQA (Situation, Complication, Question, Answer) structure.
490
+ * Extract bullet points from text.
522
491
  */
523
- private identifySCQA;
492
+ private extractBullets;
524
493
  /**
525
- * Identify Sparkline (What Is / What Could Be) structure.
494
+ * Remove a statistic from text.
526
495
  */
527
- private identifySparkline;
496
+ private removeStatistic;
528
497
  }
529
- declare function getContentAnalyzer(): ContentAnalyzer;
530
- declare function initContentAnalyzer(): Promise<ContentAnalyzer>;
531
498
 
532
499
  /**
533
- * SlideGenerator - Generate Slides with Visual Intent
500
+ * Template Engine - Handlebars Template Rendering
534
501
  *
535
- * Takes ContentAnalysis and generates slides with:
536
- * - Appropriate slide types based on content
537
- * - Visual intent (emphasis, layout hints)
538
- * - Respect for KB word limits and rules
539
- * - SCQA/Sparkline narrative structure when detected
540
- *
541
- * ALL decisions come from the Knowledge Base. NO hardcoded fallbacks.
502
+ * Renders slide data into HTML using Handlebars templates.
503
+ * Supports custom templates and helper functions.
542
504
  */
543
505
 
544
- declare class SlideGenerator {
545
- private kb;
546
- private vds;
547
- private initialized;
548
- private wordLimits;
549
- private bulletLimit;
550
- private allowedSlideTypes;
551
- private createdSlideTitles;
552
- private sectionDividerCount;
553
- private readonly maxSectionDividers;
506
+ interface TemplateConfig {
507
+ customTemplates?: Record<string, string>;
508
+ theme?: ThemeName;
509
+ }
510
+ declare class TemplateEngine {
511
+ private handlebars;
512
+ private templates;
513
+ private partials;
554
514
  constructor();
555
- initialize(): Promise<void>;
556
- /**
557
- * Generate slides from content analysis.
558
- */
559
- generate(analysis: ContentAnalysis, presentationType: PresentationType): Promise<Slide[]>;
560
- private loadRulesForType;
561
- /**
562
- * Create title slide.
563
- */
564
- private createTitleSlide;
565
- /**
566
- * Create agenda slide.
567
- */
568
- private createAgendaSlide;
569
- /**
570
- * Create SCQA slides (Situation, Complication, Question, Answer).
571
- */
572
- private createSCQASlides;
573
- /**
574
- * Create slides for a content section.
575
- */
576
- private createSectionSlides;
577
515
  /**
578
- * Create metrics grid slide from data points.
516
+ * Render a slide to HTML.
579
517
  */
580
- private createMetricsSlide;
518
+ render(slide: Slide, config?: TemplateConfig): string;
581
519
  /**
582
- * Create metrics grid slide from a section.
520
+ * Render multiple slides.
583
521
  */
584
- private createMetricsGridSlide;
522
+ renderAll(slides: Slide[], config?: TemplateConfig): string[];
585
523
  /**
586
- * Create STAR moment slide (Something They'll Always Remember).
524
+ * Prepare template context with computed properties.
587
525
  */
588
- private createStarMomentSlide;
526
+ private prepareContext;
589
527
  /**
590
- * Create call to action slide.
528
+ * Build CSS class list for slide.
591
529
  */
592
- private createCallToActionSlide;
530
+ private buildClassList;
593
531
  /**
594
- * Create thank you / closing slide.
532
+ * Build inline style string.
595
533
  */
596
- private createThankYouSlide;
534
+ private buildStyleString;
597
535
  /**
598
- * Determine the best slide type for a section.
536
+ * Register Handlebars helpers.
599
537
  */
600
- private determineSlideType;
538
+ private registerHelpers;
601
539
  /**
602
- * Check if presentation type favors minimal slides.
540
+ * Register reusable partials.
603
541
  */
604
- private isMinimalType;
542
+ private registerPartials;
605
543
  /**
606
- * Strip all markdown syntax from text for clean slide content.
607
- * This is called on ALL text going into slides to prevent raw markdown.
544
+ * Compile built-in templates.
608
545
  */
609
- private stripMarkdownSyntax;
546
+ private compileTemplates;
610
547
  /**
611
- * Clean bullets - strip markdown and preserve COMPLETE, MEANINGFUL sentences.
612
- * Business presentations need full context. Never truncate mid-thought.
613
- * Reasonable limit: 20 words per bullet allows complete ideas.
548
+ * Render fallback for unknown slide types.
614
549
  */
615
- private cleanBullets;
550
+ private renderFallback;
616
551
  /**
617
- * Truncate text to word limit, stripping markdown first.
618
- * Preserves complete sentences. Business content needs room to breathe.
552
+ * Convert camelCase to kebab-case.
619
553
  */
620
- private truncateToWordLimit;
621
- /**
622
- * Extract a key statement from content (first sentence or bold text).
623
- */
624
- private extractKeyStatement;
625
- /**
626
- * Extract a key message from title and body for single_statement slides.
627
- * Returns a concise, impactful message that provides substance.
628
- */
629
- private extractKeyMessage;
630
- /**
631
- * Extract a label from context (nearby text around a data point).
632
- * CRITICAL: Strip all markdown table syntax first to avoid garbage labels.
633
- */
634
- private extractLabelFromContext;
635
- /**
636
- * Detect trend from context (up, down, neutral).
637
- */
638
- private detectTrend;
639
- /**
640
- * Split array into chunks.
641
- */
642
- private chunkArray;
643
- /**
644
- * Generate meaningful titles for chunked bullet lists.
645
- * Instead of "Title (continued)", create contextual subtitles.
646
- */
647
- private generateChunkTitles;
648
- /**
649
- * Extract a meaningful subtitle from bullet content.
650
- */
651
- private extractSubtitleFromBullets;
554
+ private kebabCase;
652
555
  }
653
- declare function getSlideGenerator(): SlideGenerator;
654
- declare function initSlideGenerator(): Promise<SlideGenerator>;
655
556
 
656
557
  /**
657
- * SlideGenerator V2 - Simple, Correct, No Garbage
658
- *
659
- * Philosophy:
660
- * 1. Don't be clever - if it's hard, don't do it
661
- * 2. Preserve source truth - tables stay tables, bullets stay complete
662
- * 3. Fail loudly - reject garbage, don't score it 93/100
663
- * 4. Content is the hero - never truncate meaning
558
+ * Score Calculator - QA Score Computation
664
559
  *
665
- * This replaces the 945-line monster that produced garbage.
560
+ * Calculates presentation quality scores based on:
561
+ * - Visual quality (35%)
562
+ * - Content quality (30%)
563
+ * - Expert methodology compliance (25%)
564
+ * - Accessibility (10%)
666
565
  */
667
566
 
668
- interface SlideV2 {
669
- index: number;
670
- type: SlideType;
671
- title: string;
672
- content: SlideContent;
673
- notes?: string;
674
- }
675
- type SlideType = 'title' | 'section' | 'bullets' | 'table' | 'metrics' | 'statement' | 'call_to_action' | 'thank_you';
676
- interface SlideContent {
677
- bullets?: string[];
678
- table?: TableData;
679
- metrics?: MetricData[];
680
- statement?: string;
681
- subtext?: string;
682
- body?: string;
683
- source?: string;
684
- }
685
- interface TableData {
686
- headers: string[];
687
- rows: string[][];
688
- caption?: string;
689
- }
690
- interface MetricData {
691
- value: string;
692
- label: string;
693
- trend?: 'up' | 'down' | 'neutral';
567
+ interface ScoreBreakdown {
568
+ visual: number;
569
+ content: number;
570
+ expert: number;
571
+ accessibility: number;
572
+ total: number;
573
+ penalties: number;
574
+ details: ScoreDetail[];
694
575
  }
695
- interface ModeConfig {
696
- maxBulletsPerSlide: number;
697
- maxWordsPerSlide: number;
698
- minBulletsToKeep: number;
576
+ interface ScoreDetail {
577
+ category: string;
578
+ check: string;
579
+ score: number;
580
+ maxScore: number;
581
+ notes?: string;
699
582
  }
700
- declare class SlideGeneratorV2 {
701
- private config;
702
- private presentationType;
703
- /**
704
- * Create a slide generator with default configs.
705
- * For KB-driven configs, use createSlideGeneratorV2WithConfig() instead.
706
- */
707
- constructor(presentationType?: PresentationType);
708
- /**
709
- * Override config with KB-loaded values at runtime.
710
- */
711
- setConfig(config: ModeConfig): void;
712
- /**
713
- * Get current config (useful for debugging).
714
- */
715
- getConfig(): ModeConfig;
583
+ declare class ScoreCalculator {
584
+ private readonly weights;
716
585
  /**
717
- * Generate slides from markdown content.
718
- * Simple, correct, no garbage.
586
+ * Calculate overall QA score from results.
719
587
  */
720
- generate(markdown: string, title?: string): SlideV2[];
588
+ calculate(results: QAResults): number;
721
589
  /**
722
- * Extract title from first H1 token.
590
+ * Get detailed score breakdown.
723
591
  */
724
- private extractTitle;
592
+ getBreakdown(results: QAResults): ScoreBreakdown;
725
593
  /**
726
- * Split tokens into sections based on H2 headers.
594
+ * Calculate visual quality score.
727
595
  */
728
- private splitIntoSections;
596
+ private calculateVisualScore;
729
597
  /**
730
- * Process section content into slides.
731
- * RULES:
732
- * 1. Tables ALWAYS become table slides - NEVER extract to metrics
733
- * 2. Empty sections are SKIPPED - no blank divider slides
734
- * 3. H3 headings become individual slides with ACTION TITLES (critical for consulting)
735
- * 4. Sections with minimal content are combined into statement slides
598
+ * Calculate content quality score.
736
599
  */
737
- private processSectionContent;
600
+ private calculateContentScore;
738
601
  /**
739
- * Split tokens into subsections based on H3 headers.
740
- * H3 headers become ACTION TITLES for consulting decks.
602
+ * Calculate expert methodology compliance score.
741
603
  */
742
- private splitIntoSubsections;
604
+ private calculateExpertScore;
743
605
  /**
744
- * Process a subsection (H3) into a slide.
745
- * The H3 title IS the action title.
606
+ * Calculate accessibility compliance score.
746
607
  */
747
- private processSubsection;
608
+ private calculateAccessibilityScore;
748
609
  /**
749
- * Create a table slide - render the table as-is, no extraction.
610
+ * Calculate penalties from issues.
750
611
  */
751
- private createTableSlide;
612
+ private calculatePenalties;
752
613
  /**
753
- * Create bullet slides from list content.
754
- * RULES:
755
- * 1. NEVER truncate bullets
756
- * 2. NEVER create slides with only 1-2 bullets (orphan slides)
757
- * 3. If there are fewer than minBulletsToKeep bullets, combine them into a statement slide
614
+ * Get human-readable grade from score.
758
615
  */
759
- private createBulletSlides;
616
+ getGrade(score: number): string;
760
617
  /**
761
- * Split bullets into chunks without creating orphan slides.
762
- * If the last chunk would have fewer than minBullets, steal from previous chunk.
618
+ * Get pass/fail status.
763
619
  */
764
- private splitBulletsWithoutOrphans;
620
+ isPassing(score: number, threshold?: number): boolean;
765
621
  /**
766
- * Get complete text from a list item, including nested content.
767
- * NEVER truncate.
622
+ * Format score for display.
768
623
  */
769
- private getCompleteItemText;
624
+ formatScore(score: number): string;
770
625
  /**
771
- * Check if section has significant paragraph content.
626
+ * Generate summary report.
772
627
  */
773
- private hasSignificantParagraphs;
774
- /**
775
- * Create a content slide from paragraphs.
776
- */
777
- private createContentSlide;
778
- /**
779
- * Extract a key statement from tokens.
780
- */
781
- private extractStatement;
782
- /**
783
- * VALIDATE ALL SLIDES - Fail loudly on garbage.
784
- */
785
- private validateSlides;
628
+ generateReport(results: QAResults): string;
786
629
  }
787
- declare function createSlideGeneratorV2(type?: PresentationType): SlideGeneratorV2;
788
630
 
789
631
  /**
790
- * Renderer V2 - KB-Driven Visual Excellence
632
+ * QA Engine - Real Visual Quality Validation
791
633
  *
792
- * Renders slides to HTML and PDF with:
793
- * - Tables as actual tables (not mangled metrics)
794
- * - Complete bullets (never truncated)
795
- * - Clean professional CSS (no random stock photos)
796
- * - Color palettes loaded from Knowledge Base per presentation type
797
- * - Typography and spacing from KB
798
- * - Automatic PDF generation alongside HTML
634
+ * Unlike fake validation systems, this engine ACTUALLY tests:
635
+ * - Visual quality using Playwright screenshots + Canvas API
636
+ * - Layout balance and whitespace distribution
637
+ * - WCAG contrast compliance
638
+ * - Expert methodology adherence
799
639
  */
800
640
 
801
- type ThemeStyle = 'light' | 'dark';
802
- declare class RendererV2 {
803
- private theme;
804
- private presentationType;
805
- private kb;
806
- /**
807
- * Create renderer with theme loaded from Knowledge Base.
808
- * @param presentationType - The type of deck being created (determines palette)
809
- * @param kb - Knowledge Base gateway (optional, will use global if not provided)
810
- */
811
- constructor(presentationType?: PresentationType, kb?: KnowledgeGateway);
641
+ declare class QAEngine {
642
+ private browser;
812
643
  /**
813
- * Load theme configuration from Knowledge Base.
814
- * Falls back to hardcoded values only if KB fails.
644
+ * Validate a presentation.
815
645
  */
816
- private loadThemeFromKB;
646
+ validate(presentation: string | Buffer, options?: {
647
+ mode?: 'keynote' | 'business';
648
+ strictMode?: boolean;
649
+ threshold?: number;
650
+ }): Promise<QAResults>;
817
651
  /**
818
- * Default palette mapping per presentation type (used if KB doesn't specify).
652
+ * Calculate overall QA score.
819
653
  */
820
- private getDefaultPaletteName;
654
+ calculateScore(results: QAResults): number;
821
655
  /**
822
- * Render slides to complete HTML document.
656
+ * Create empty QA results (for when QA is skipped).
823
657
  */
824
- render(slides: SlideV2[], title?: string): string;
658
+ createEmptyResults(): QAResults;
659
+ private runVisualTests;
660
+ private runContentTests;
661
+ private runExpertTests;
662
+ private createExpertResult;
663
+ private runAccessibilityTests;
664
+ private calculateVisualScore;
665
+ private calculateContentScore;
666
+ private calculateExpertScore;
667
+ private calculateA11yScore;
668
+ private collectIssues;
669
+ private initBrowser;
670
+ private closeBrowser;
671
+ }
672
+
673
+ /**
674
+ * Reveal.js Generator - HTML Presentation Output
675
+ *
676
+ * Generates complete Reveal.js presentations with:
677
+ * - Responsive layouts
678
+ * - Animations
679
+ * - Speaker notes
680
+ * - Custom themes
681
+ * - Chart.js integration
682
+ * - Mermaid diagrams
683
+ */
684
+
685
+ declare class RevealJsGenerator {
686
+ private templateEngine;
687
+ private defaultRevealConfig;
688
+ constructor();
825
689
  /**
826
- * Render slides to both HTML and PDF files.
827
- * Always generates both formats for easy sharing.
690
+ * Generate complete Reveal.js HTML presentation.
828
691
  */
829
- renderToFiles(slides: SlideV2[], outputPath: string, title?: string): Promise<{
830
- htmlPath: string;
831
- pdfPath: string;
832
- }>;
692
+ generate(slides: Slide[], config: PresentationConfig): Promise<string>;
833
693
  /**
834
- * Render slides directly to PDF using Puppeteer.
835
- * Creates a printable PDF with one slide per page.
694
+ * Build the complete HTML document.
836
695
  */
837
- renderToPDF(slides: SlideV2[], outputPath: string, title?: string): Promise<Uint8Array>;
696
+ private buildDocument;
838
697
  /**
839
- * Render HTML optimized for PDF printing (no reveal.js, static pages).
698
+ * Get base styles for slides.
840
699
  */
841
- private renderForPrint;
700
+ private getBaseStyles;
842
701
  /**
843
- * Light theme print HTML (professional, white background).
702
+ * Get theme-specific styles.
844
703
  */
845
- private getLightPrintHTML;
704
+ private getThemeStyles;
846
705
  /**
847
- * Dark theme print HTML (legacy).
706
+ * Get animation styles.
848
707
  */
849
- private getDarkPrintHTML;
708
+ private getAnimationStyles;
850
709
  /**
851
- * Render slide content (shared between HTML and PDF renderers).
710
+ * Escape HTML entities.
852
711
  */
853
- private renderSlideContent;
712
+ private escapeHtml;
854
713
  /**
855
- * Render a single slide.
714
+ * Basic HTML minification.
856
715
  */
857
- private renderSlide;
716
+ private minifyHtml;
717
+ }
718
+
719
+ /**
720
+ * PowerPoint Generator - PPTX Presentation Output
721
+ *
722
+ * Generates PowerPoint presentations using PptxGenJS with:
723
+ * - Professional layouts
724
+ * - Embedded charts
725
+ * - Images
726
+ * - Consistent styling
727
+ */
728
+
729
+ declare class PowerPointGenerator {
730
+ private chartProvider;
858
731
  /**
859
- * Title slide - big, bold, centered.
732
+ * Generate a PowerPoint presentation.
860
733
  */
861
- private renderTitleSlide;
734
+ generate(slides: Slide[], config: PresentationConfig): Promise<Buffer>;
862
735
  /**
863
- * Section divider - transition slide.
736
+ * Add a slide to the presentation.
864
737
  */
865
- private renderSectionSlide;
738
+ private addSlide;
866
739
  /**
867
- * Bullet slide - the workhorse.
740
+ * Add title slide.
868
741
  */
869
- private renderBulletSlide;
742
+ private addTitleSlide;
870
743
  /**
871
- * Table slide - render tables properly.
744
+ * Add big idea / single statement slide.
872
745
  */
873
- private renderTableSlide;
746
+ private addBigIdeaSlide;
874
747
  /**
875
- * Render a table as clean HTML.
748
+ * Add big number slide.
876
749
  */
877
- private renderTable;
750
+ private addBigNumberSlide;
878
751
  /**
879
- * Metrics slide - big numbers with labels.
752
+ * Add quote slide.
880
753
  */
881
- private renderMetricsSlide;
754
+ private addQuoteSlide;
882
755
  /**
883
- * Statement slide - single powerful message.
756
+ * Add bullet points slide.
884
757
  */
885
- private renderStatementSlide;
758
+ private addBulletSlide;
886
759
  /**
887
- * Call to action slide.
760
+ * Add two-column slide.
888
761
  */
889
- private renderCTASlide;
762
+ private addTwoColumnSlide;
890
763
  /**
891
- * Thank you slide.
764
+ * Add metrics grid slide.
892
765
  */
893
- private renderThankYouSlide;
766
+ private addMetricsSlide;
894
767
  /**
895
- * Format bullet text - handle bold, arrows, etc.
768
+ * Add metrics to a slide at specified position.
896
769
  */
897
- private formatBulletText;
770
+ private addMetricsToSlide;
898
771
  /**
899
- * Escape HTML special characters.
772
+ * Add thank you slide.
900
773
  */
901
- private escapeHtml;
774
+ private addThankYouSlide;
902
775
  /**
903
- * Generate CSS with colors from Knowledge Base.
776
+ * Add agenda slide.
904
777
  */
905
- private getCSS;
778
+ private addAgendaSlide;
906
779
  /**
907
- * Generate CSS variables from KB palette.
780
+ * Add section divider slide.
908
781
  */
909
- private getCSSVariables;
782
+ private addSectionDividerSlide;
910
783
  /**
911
- * Lighten or darken a hex color.
784
+ * Add default slide (fallback).
912
785
  */
913
- private lightenColor;
786
+ private addDefaultSlide;
914
787
  /**
915
- * Light theme CSS (consulting style) with KB palette colors.
788
+ * Add image placeholder.
916
789
  */
917
- private getLightThemeCSS;
790
+ private addImagePlaceholder;
918
791
  /**
919
- * Dark theme CSS with KB palette colors.
792
+ * Convert layout position to PptxGenJS text props.
920
793
  */
921
- private getDarkThemeCSS;
794
+ private positionToProps;
922
795
  }
923
- /**
924
- * Create a renderer with theme matched to the presentation type.
925
- *
926
- * @param presentationType - Type of deck (consulting_deck, keynote, etc.)
927
- * @param themeOverride - Optional explicit theme to use instead of auto-mapping
928
- *
929
- * Theme mapping:
930
- * - consulting_deck, board_presentation, internal_update → McKinsey (white, professional)
931
- * - keynote, sales_pitch, technical → Dark (dramatic)
932
- * - training, workshop, all_hands → Minimal (clean, readable)
933
- * - product_demo, investor_pitch → Startup (modern dark)
934
- * - executive_briefing → Corporate (professional)
935
- */
936
- declare function createRendererV2(presentationType?: PresentationType, kb?: KnowledgeGateway): RendererV2;
937
796
 
938
797
  /**
939
- * PresentationEngineV2 - Knowledge-Driven Excellence
940
- *
941
- * This engine orchestrates the ENTIRE presentation creation flow:
942
- * 1. Analyze content to detect presentation type
943
- * 2. Load design specs from Knowledge Base (YAML)
944
- * 3. Generate slides following expert methodologies
945
- * 4. Enhance with images (optional, needs API key)
946
- * 5. Review ruthlessly (must score 95/100+)
947
- * 6. Output ONLY if quality passes
798
+ * Image Provider - Pluggable Image Generation
948
799
  *
949
- * CRITICAL: The Knowledge Base drives EVERYTHING.
950
- * The KnowledgeGateway reads from presentation-knowledge.yaml at runtime.
951
- * NO hardcoded fallbacks - if KB is missing data, we fail loudly.
800
+ * Provides multiple strategies for obtaining images:
801
+ * - Local: User-provided paths/URLs
802
+ * - Placeholder: Uses picsum.photos (no API key)
803
+ * - Unsplash: Free API (50 req/hour, optional key)
804
+ * - AI: Claude Code integration (when available)
952
805
  */
953
-
954
- interface DesignSpecs {
955
- wordsPerSlide: {
956
- min: number;
957
- max: number;
958
- ideal: number;
959
- };
960
- whitespace: {
961
- min: number;
962
- max?: number;
963
- ideal: number;
964
- };
965
- bulletPoints: {
966
- max: number;
967
- };
968
- fonts: {
969
- title: string;
970
- body: string;
971
- maxFonts: number;
972
- };
973
- theme: ThemeStyle;
974
- structure: string;
975
- experts: string[];
976
- actionTitlesRequired: boolean;
977
- sourcesRequired: boolean;
978
- scoringWeights: {
979
- visual_quality: number;
980
- content_quality: number;
981
- expert_compliance: number;
982
- accessibility: number;
983
- };
984
- }
985
- interface SlideReview {
986
- slideIndex: number;
987
- title: string;
988
- score: number;
989
- issues: string[];
990
- suggestions: string[];
991
- passed: boolean;
992
- }
993
- interface DeckReview {
994
- overallScore: number;
995
- slideReviews: SlideReview[];
996
- deckIssues: string[];
997
- flow: 'excellent' | 'good' | 'needs_work' | 'poor';
998
- passed: boolean;
999
- summary: string;
1000
- }
1001
- interface EngineOptions {
1002
- /** Override detected presentation type */
1003
- presentationType?: PresentationType;
1004
- /** Override theme selection */
1005
- themeOverride?: ThemeStyle;
1006
- /** API key for image generation (optional) */
1007
- imageApiKey?: string;
1008
- /** Minimum quality score (default: 95) */
1009
- minScore?: number;
1010
- /** Enable verbose logging */
1011
- verbose?: boolean;
1012
- /** Maximum remediation attempts per slide */
1013
- maxRemediationAttempts?: number;
1014
- }
1015
- interface EngineResult {
1016
- slides: SlideV2[];
1017
- html: string;
1018
- pdfPath?: string;
1019
- presentationType: PresentationType;
1020
- designSpecs: DesignSpecs;
1021
- review: DeckReview;
1022
- warnings: string[];
806
+ interface ImageRequest {
807
+ /** Description of desired image */
808
+ description: string;
809
+ /** Desired width */
810
+ width?: number;
811
+ /** Desired height */
812
+ height?: number;
813
+ /** Style hints (e.g., 'professional', 'minimal', 'vibrant') */
814
+ style?: string;
815
+ /** Category for filtering (e.g., 'business', 'technology', 'nature') */
816
+ category?: string;
817
+ }
818
+ interface ImageResult {
819
+ /** URL or data URI of the image */
820
+ src: string;
821
+ /** Alt text for accessibility */
822
+ alt: string;
823
+ /** Attribution if required */
824
+ attribution?: string;
825
+ /** Whether this is a placeholder */
826
+ isPlaceholder?: boolean;
1023
827
  }
1024
- declare class PresentationEngineV2 {
1025
- private options;
1026
- private kb;
1027
- constructor(options?: EngineOptions);
1028
- private log;
1029
- /**
1030
- * Generate a world-class presentation from markdown content.
1031
- * Follows knowledge base specs and demands 95+ quality score.
1032
- *
1033
- * CRITICAL: All specs come from the Knowledge Base YAML at runtime.
1034
- * No hardcoded fallbacks - if KB is missing data, we fail loudly.
1035
- */
1036
- generate(markdown: string, title?: string): Promise<EngineResult>;
1037
- /**
1038
- * Detect presentation type from content analysis.
1039
- */
1040
- private detectPresentationType;
1041
- /**
1042
- * Should we recommend images for this presentation?
1043
- */
1044
- private shouldRecommendImages;
1045
- /**
1046
- * Ruthlessly review the deck against knowledge base criteria.
1047
- */
1048
- private reviewDeck;
1049
- /**
1050
- * Review a single slide against quality criteria.
1051
- */
1052
- private reviewSlide;
1053
- /**
1054
- * Check if title is an action/insight title vs. just a topic.
1055
- */
1056
- private isActionTitle;
1057
- /**
1058
- * Assess the flow and narrative structure of the deck.
1059
- */
1060
- private assessFlow;
1061
- /**
1062
- * Attempt to remediate failing slides.
1063
- */
1064
- private remediateSlides;
1065
- /**
1066
- * Count words in a slide.
1067
- */
1068
- private countWords;
828
+ interface ImageProvider {
829
+ /** Provider name */
830
+ name: string;
831
+ /** Check if provider is available */
832
+ isAvailable(): Promise<boolean>;
833
+ /** Get an image matching the request */
834
+ getImage(request: ImageRequest): Promise<ImageResult>;
835
+ /** Get multiple images */
836
+ getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
1069
837
  }
1070
- declare function createPresentationEngineV2(options?: EngineOptions): PresentationEngineV2;
1071
838
  /**
1072
- * Generate a presentation with automatic type detection and ruthless quality control.
1073
- * Throws if quality score is below 95/100.
839
+ * Local Image Provider - Uses user-provided images
1074
840
  */
1075
- declare function generatePresentation(markdown: string, options?: EngineOptions & {
1076
- title?: string;
1077
- outputPath?: string;
1078
- }): Promise<EngineResult>;
1079
-
841
+ declare class LocalImageProvider implements ImageProvider {
842
+ name: string;
843
+ private images;
844
+ constructor(imageMap?: Record<string, string>);
845
+ isAvailable(): Promise<boolean>;
846
+ getImage(request: ImageRequest): Promise<ImageResult>;
847
+ getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
848
+ private getPlaceholderUrl;
849
+ /** Register an image for later use */
850
+ registerImage(name: string, src: string): void;
851
+ }
1080
852
  /**
1081
- * VisualDesignSystem - KB-Driven Visual Design Configuration
1082
- *
1083
- * CRITICAL: ALL design decisions come from the Knowledge Base.
1084
- * This module queries KB for colors, typography, gradients, layouts.
1085
- * NO hardcoded fallbacks.
853
+ * Placeholder Image Provider - Uses picsum.photos (no API key needed)
1086
854
  */
1087
-
1088
- interface ColorPalette {
855
+ declare class PlaceholderImageProvider implements ImageProvider {
1089
856
  name: string;
1090
- background: string;
1091
- primary: string;
1092
- secondary: string;
1093
- accent: string;
1094
- text: string;
1095
- useCase: string;
1096
- contrastRatio: string;
1097
- }
1098
- interface Typography {
1099
- titles: string;
1100
- headlines?: string;
1101
- body: string;
1102
- maxFonts: number;
1103
- fontPairing?: string;
1104
- actionTitle?: string;
1105
- sectionHeaders?: string;
1106
- dataLabels?: string;
1107
- }
1108
- interface LayoutRules {
1109
- whitespace: string;
1110
- wordsPerSlide: string;
1111
- elementsPerSlide?: string;
1112
- requiresActionTitles?: boolean;
1113
- requiresSources?: boolean;
1114
- requiresCallouts?: boolean;
857
+ isAvailable(): Promise<boolean>;
858
+ getImage(request: ImageRequest): Promise<ImageResult>;
859
+ getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
860
+ private hashString;
1115
861
  }
1116
- interface GradientDefinition {
862
+ /**
863
+ * Unsplash Image Provider - Uses Unsplash API (free tier: 50 req/hour)
864
+ */
865
+ declare class UnsplashImageProvider implements ImageProvider {
1117
866
  name: string;
1118
- css: string;
1119
- angle?: number;
1120
- stops: Array<{
1121
- color: string;
1122
- position: string;
1123
- }>;
867
+ private accessKey?;
868
+ private baseUrl;
869
+ constructor(accessKey?: string);
870
+ isAvailable(): Promise<boolean>;
871
+ getImage(request: ImageRequest): Promise<ImageResult>;
872
+ getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
873
+ private getSourceImage;
874
+ private delay;
1124
875
  }
1125
- interface SlideLayout {
876
+ /**
877
+ * Composite Image Provider - Tries providers in order
878
+ */
879
+ declare class CompositeImageProvider implements ImageProvider {
1126
880
  name: string;
1127
- purpose: string;
1128
- elements: string[];
1129
- wordLimit?: number;
1130
- grid?: {
1131
- columns: number;
1132
- rows?: number;
1133
- gap: string;
1134
- };
1135
- }
1136
- interface VisualTheme {
1137
- presentationType: PresentationType;
1138
- mode: 'keynote' | 'business';
1139
- palette: ColorPalette;
1140
- typography: Typography;
1141
- layout: LayoutRules;
1142
- gradients: GradientDefinition[];
1143
- cssVariables: Record<string, string>;
1144
- }
1145
- declare class VisualDesignSystem {
1146
- private kb;
1147
- private initialized;
1148
- constructor();
1149
- /**
1150
- * Initialize the design system (loads KB)
1151
- */
1152
- initialize(): Promise<void>;
1153
- /**
1154
- * Get complete visual theme for a presentation type.
1155
- */
1156
- getTheme(type: PresentationType): Promise<VisualTheme>;
1157
- /**
1158
- * Determine mode (keynote vs business) for a presentation type.
1159
- */
1160
- private getModeForType;
1161
- /**
1162
- * Get color palette for presentation type from KB.
1163
- */
1164
- private getPaletteForType;
1165
- /**
1166
- * Get typography rules for mode from KB.
1167
- */
1168
- private getTypographyForMode;
1169
- /**
1170
- * Get layout rules for mode from KB.
1171
- */
1172
- private getLayoutRulesForMode;
1173
- /**
1174
- * Get gradient definitions for presentation type.
1175
- */
1176
- private getGradientsForType;
1177
- /**
1178
- * Build CSS custom properties for the theme.
1179
- */
1180
- private buildCSSVariables;
1181
- /**
1182
- * Get slide layout templates from KB.
1183
- */
1184
- getSlideLayouts(type: PresentationType): Promise<SlideLayout[]>;
1185
- /**
1186
- * Generate complete CSS for the theme.
1187
- */
1188
- generateCSS(theme: VisualTheme): string;
1189
- private lightenColor;
1190
- private darkenColor;
1191
- private hexToRgb;
1192
- /**
1193
- * Get contrasting text color for a given background color.
1194
- * Returns white or black based on luminance.
1195
- */
1196
- private getContrastColor;
881
+ private providers;
882
+ constructor(providers: ImageProvider[]);
883
+ isAvailable(): Promise<boolean>;
884
+ getImage(request: ImageRequest): Promise<ImageResult>;
885
+ getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
1197
886
  }
1198
- declare function getVisualDesignSystem(): VisualDesignSystem;
1199
- declare function initVisualDesignSystem(): Promise<VisualDesignSystem>;
887
+ /**
888
+ * Create default image provider chain
889
+ */
890
+ declare function createDefaultImageProvider(options?: {
891
+ localImages?: Record<string, string>;
892
+ unsplashKey?: string;
893
+ }): ImageProvider;
1200
894
 
1201
895
  /**
1202
- * SlideQualityReviewer - THE HEART OF THE QUALITATIVE REVIEW SYSTEM
1203
- *
1204
- * This is NOT a mechanical checker. It evaluates REAL quality.
1205
- * A slide ONLY passes at 95+ if:
1206
- * 1. You would personally present it without changes
1207
- * 2. It follows expert principles (Duarte, Reynolds, Tufte)
1208
- * 3. It looks professionally designed
1209
- * 4. It clearly communicates its message
1210
- * 5. It fits the overall presentation
896
+ * Chart Provider - Pluggable Chart Generation
1211
897
  *
1212
- * ALL rules come from the Knowledge Base. NO hardcoded fallbacks.
898
+ * Provides multiple strategies for creating charts:
899
+ * - ChartJS: Embedded in HTML (no API needed)
900
+ * - QuickChart: Remote rendering (no API key needed)
901
+ * - Mermaid: Diagrams and flowcharts (no API needed)
1213
902
  */
1214
-
1215
- type QualityLevel = 'excellent' | 'good' | 'acceptable' | 'poor' | 'failing';
1216
- interface QualitativeAssessment {
1217
- /** Score (0-100) */
1218
- score: number;
1219
- /** Quality level */
1220
- level: QualityLevel;
1221
- /** WHY this score - specific reasoning */
1222
- reasoning: string;
1223
- /** KB reference for this assessment */
1224
- kbReference?: string;
1225
- }
1226
- interface QualitativeSlideReview {
1227
- /** Overall qualitative score (0-100, must be >= 95) */
1228
- score: number;
1229
- /** Would you be proud to present this? */
1230
- wouldPresent: boolean;
1231
- /** Detailed qualitative assessments */
1232
- assessments: {
1233
- visualImpact: QualitativeAssessment;
1234
- contentClarity: QualitativeAssessment;
1235
- layoutBalance: QualitativeAssessment;
1236
- typographyHierarchy: QualitativeAssessment;
1237
- whitespaceUsage: QualitativeAssessment;
1238
- colorHarmony: QualitativeAssessment;
1239
- audienceAppropriate: QualitativeAssessment;
1240
- };
1241
- /** Specific issues found */
1242
- issues: QualityIssue[];
1243
- /** What would make this slide better */
1244
- improvements: string[];
1245
- }
1246
- interface QualityIssue {
1247
- severity: 'critical' | 'major' | 'minor';
1248
- category: 'visual' | 'content' | 'layout' | 'typography' | 'accessibility';
1249
- issue: string;
1250
- fix: string;
1251
- kbReference?: string;
903
+ type ChartType = 'bar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'scatter' | 'bubble';
904
+ interface ChartDataset {
905
+ label: string;
906
+ data: number[];
907
+ backgroundColor?: string | string[];
908
+ borderColor?: string | string[];
909
+ borderWidth?: number;
910
+ }
911
+ interface ChartData {
912
+ labels: string[];
913
+ datasets: ChartDataset[];
914
+ }
915
+ interface ChartRequest {
916
+ /** Chart type */
917
+ type: ChartType;
918
+ /** Chart data */
919
+ data: ChartData;
920
+ /** Chart title */
921
+ title?: string;
922
+ /** Width in pixels */
923
+ width?: number;
924
+ /** Height in pixels */
925
+ height?: number;
926
+ /** Show legend */
927
+ showLegend?: boolean;
928
+ /** Animation enabled (HTML only) */
929
+ animated?: boolean;
930
+ /** Color palette to use */
931
+ palette?: 'default' | 'professional' | 'vibrant' | 'monochrome';
932
+ }
933
+ interface ChartResult {
934
+ /** HTML for embedding (Chart.js canvas) */
935
+ html?: string;
936
+ /** Image URL for static contexts (PPTX) */
937
+ imageUrl?: string;
938
+ /** Base64 data URI */
939
+ dataUri?: string;
940
+ /** Chart title for accessibility */
941
+ title: string;
1252
942
  }
1253
- declare class SlideQualityReviewer {
1254
- private kb;
1255
- private initialized;
1256
- private wordLimits;
1257
- private whitespaceRules;
1258
- private bulletLimit;
1259
- private glanceTestSeconds;
1260
- private assessmentWeights;
1261
- private _loggedWeights;
1262
- private hasCialdini;
1263
- private hasGestalt;
1264
- private hasTufteDataInk;
1265
- private chartjunkToAvoid;
1266
- constructor();
1267
- initialize(): Promise<void>;
1268
- /**
1269
- * Review a slide qualitatively.
1270
- */
1271
- review(slide: Slide, presentationType: PresentationType): Promise<QualitativeSlideReview>;
1272
- /**
1273
- * Convert qualitative review to SlideScore format.
1274
- */
1275
- toSlideScore(review: QualitativeSlideReview): SlideScore;
1276
- private loadRulesForType;
1277
- /**
1278
- * Visual Impact (25%): Does this slide command attention appropriately?
1279
- */
1280
- private assessVisualImpact;
1281
- /**
1282
- * Content Clarity (20%): Can you understand the message in 3 seconds?
1283
- */
1284
- private assessContentClarity;
1285
- /**
1286
- * Get all text content from a slide for analysis.
1287
- */
1288
- private getAllTextContent;
1289
- /**
1290
- * Layout Balance (15%): Is visual weight distributed appropriately?
1291
- */
1292
- private assessLayoutBalance;
1293
- /**
1294
- * Typography Hierarchy (15%): Is there clear primary/secondary/tertiary hierarchy?
1295
- */
1296
- private assessTypographyHierarchy;
1297
- /**
1298
- * Whitespace Usage (10%): Is whitespace used purposefully?
1299
- */
1300
- private assessWhitespaceUsage;
1301
- /**
1302
- * Color Harmony (10%): Do colors work together within the theme?
1303
- */
1304
- private assessColorHarmony;
1305
- /**
1306
- * Audience Appropriateness (5%): Is the visual style right for this audience?
1307
- */
1308
- private assessAudienceAppropriate;
1309
- private isMinimalType;
1310
- private isDenseType;
1311
- private countWords;
1312
- private countLongWords;
1313
- /**
1314
- * Detect raw markdown syntax that should have been rendered to HTML.
1315
- * Returns array of issue descriptions.
1316
- */
1317
- private detectRawMarkdown;
1318
- /**
1319
- * Check if slide type is appropriate for its content.
1320
- * Returns issue description if mismatched.
1321
- */
1322
- private checkSlideTypeMismatch;
1323
- private scoreToLevel;
1324
- private collectIssues;
1325
- private mapAssessmentToCategory;
1326
- private mapIssueCategory;
1327
- private generateImprovements;
1328
- private createCategoryScore;
943
+ interface ChartProvider {
944
+ /** Provider name */
945
+ name: string;
946
+ /** Check if provider is available */
947
+ isAvailable(): Promise<boolean>;
948
+ /** Generate a chart */
949
+ generateChart(request: ChartRequest): Promise<ChartResult>;
1329
950
  }
1330
- declare function getSlideQualityReviewer(): SlideQualityReviewer;
1331
- declare function initSlideQualityReviewer(): Promise<SlideQualityReviewer>;
1332
-
1333
951
  /**
1334
- * DeckQualityReviewer - HOLISTIC DECK QUALITY REVIEW
1335
- *
1336
- * After all slides pass individual review, this evaluates the deck as a whole:
1337
- * 1. Narrative Flow (30%) - Does it tell a coherent story?
1338
- * 2. Visual Consistency (25%) - Is the same theme applied throughout?
1339
- * 3. Pacing & Rhythm (20%) - Is there variety and appropriate density?
1340
- * 4. Opening & Closing (15%) - Are first/last slides the strongest?
1341
- * 5. Overall Impression (10%) - Would you hire/invest based on this?
1342
- *
1343
- * ALL rules come from the Knowledge Base. NO hardcoded fallbacks.
952
+ * Chart.js Provider - Generates embedded Chart.js HTML
953
+ * No API needed - runs in browser
1344
954
  */
1345
-
1346
- type DeckQualityLevel = 'excellent' | 'good' | 'acceptable' | 'poor' | 'failing';
1347
- interface DeckAssessment {
1348
- /** Score (0-100) */
1349
- score: number;
1350
- /** Quality level */
1351
- level: DeckQualityLevel;
1352
- /** WHY this score - specific reasoning */
1353
- reasoning: string;
1354
- /** KB reference for this assessment */
1355
- kbReference?: string;
1356
- }
1357
- interface QualitativeDeckReview {
1358
- /** Overall deck score (0-100, must be >= 95) */
1359
- score: number;
1360
- /** Would this deck impress the target audience? */
1361
- wouldImpress: boolean;
1362
- /** Detailed assessments */
1363
- assessments: {
1364
- narrativeFlow: DeckAssessment;
1365
- visualConsistency: DeckAssessment;
1366
- pacingRhythm: DeckAssessment;
1367
- openingClosing: DeckAssessment;
1368
- overallImpression: DeckAssessment;
1369
- };
1370
- /** Individual slide reviews */
1371
- slideReviews: QualitativeSlideReview[];
1372
- /** Deck-level issues */
1373
- issues: DeckIssue[];
1374
- /** Deck-level improvements */
1375
- improvements: string[];
955
+ declare class ChartJsProvider implements ChartProvider {
956
+ name: string;
957
+ isAvailable(): Promise<boolean>;
958
+ generateChart(request: ChartRequest): Promise<ChartResult>;
1376
959
  }
1377
- interface DeckIssue {
1378
- severity: 'critical' | 'major' | 'minor';
1379
- category: 'narrative' | 'visual' | 'pacing' | 'structure';
1380
- issue: string;
1381
- fix: string;
1382
- affectedSlides?: number[];
1383
- kbReference?: string;
960
+ /**
961
+ * QuickChart Provider - Uses quickchart.io for image generation
962
+ * No API key needed - free service
963
+ */
964
+ declare class QuickChartProvider implements ChartProvider {
965
+ name: string;
966
+ private baseUrl;
967
+ isAvailable(): Promise<boolean>;
968
+ generateChart(request: ChartRequest): Promise<ChartResult>;
1384
969
  }
1385
- declare class DeckQualityReviewer {
1386
- private kb;
1387
- private slideReviewer;
1388
- private initialized;
1389
- private requiredElements;
1390
- private antiPatterns;
1391
- private hasSparkline;
1392
- private hasSCQA;
1393
- constructor();
1394
- initialize(): Promise<void>;
1395
- /**
1396
- * Review the entire deck qualitatively.
1397
- */
1398
- review(slides: Slide[], presentationType: PresentationType): Promise<QualitativeDeckReview>;
1399
- /**
1400
- * Convert qualitative review to DeckScore format.
1401
- */
1402
- toDeckScore(review: QualitativeDeckReview): DeckScore;
1403
- private loadRulesForType;
1404
- /**
1405
- * Narrative Flow (30%): Does the presentation tell a coherent story?
1406
- */
1407
- private assessNarrativeFlow;
1408
- /**
1409
- * Visual Consistency (25%): Is the same theme applied throughout?
1410
- */
1411
- private assessVisualConsistency;
970
+ /**
971
+ * Mermaid Provider - Generates diagrams using Mermaid.js
972
+ * No API needed - renders in browser
973
+ */
974
+ declare class MermaidProvider implements ChartProvider {
975
+ name: string;
976
+ isAvailable(): Promise<boolean>;
977
+ generateChart(request: ChartRequest): Promise<ChartResult>;
1412
978
  /**
1413
- * Pacing & Rhythm (20%): Is there variety in slide types and density?
979
+ * Generate a Mermaid diagram
1414
980
  */
1415
- private assessPacingRhythm;
981
+ generateDiagram(definition: string, title?: string): Promise<ChartResult>;
1416
982
  /**
1417
- * Opening & Closing (15%): Are the first and last slides the strongest?
983
+ * Generate flowchart from steps
1418
984
  */
1419
- private assessOpeningClosing;
985
+ generateFlowchart(steps: {
986
+ id: string;
987
+ label: string;
988
+ next?: string[];
989
+ }[]): string;
1420
990
  /**
1421
- * Overall Impression (10%): Would you hire/invest based on this?
991
+ * Generate timeline from events
1422
992
  */
1423
- private assessOverallImpression;
1424
- private scoreToLevel;
1425
- private calculateVariance;
1426
- private getMissingRequiredElements;
1427
- private collectDeckIssues;
1428
- private mapAssessmentToCategory;
1429
- private mapDeckCategory;
1430
- private generateDeckImprovements;
1431
- private calculateRequiredElementsScore;
1432
- private calculateAntiPatternScore;
993
+ generateTimeline(events: {
994
+ date: string;
995
+ title: string;
996
+ }[]): string;
1433
997
  }
1434
- declare function getDeckQualityReviewer(): DeckQualityReviewer;
1435
- declare function initDeckQualityReviewer(): Promise<DeckQualityReviewer>;
1436
-
1437
998
  /**
1438
- * Remediator - Fix Failing Slides
1439
- *
1440
- * When a slide fails qualitative review (< 95), this module attempts to fix it.
1441
- * Maximum 3 remediation attempts per slide.
1442
- *
1443
- * Remediation strategies are based on the specific quality issues identified:
1444
- * - Visual Impact: Increase title prominence, add visual elements
1445
- * - Content Clarity: Reduce word count, simplify messaging
1446
- * - Layout Balance: Redistribute content, improve alignment
1447
- * - Typography Hierarchy: Adjust text sizes, create clearer hierarchy
1448
- * - Whitespace Usage: Remove content or split slide
1449
- * - Color Harmony: Ensure colors match theme
1450
- * - Audience Appropriateness: Adjust density for audience
1451
- *
1452
- * ALL rules come from the Knowledge Base. NO hardcoded fallbacks.
999
+ * Composite Chart Provider
1453
1000
  */
1454
-
1455
- interface RemediationResult {
1456
- /** Was remediation successful? */
1457
- success: boolean;
1458
- /** Original slide */
1459
- originalSlide: Slide;
1460
- /** Remediated slide (or original if failed) */
1461
- remediatedSlide: Slide;
1462
- /** Number of attempts made */
1463
- attempts: number;
1464
- /** Final score after remediation */
1465
- finalScore: number;
1466
- /** Review after remediation */
1467
- finalReview: QualitativeSlideReview;
1468
- /** Actions taken during remediation */
1469
- actions: RemediationAction[];
1470
- /** Why remediation failed (if it did) */
1471
- failureReason?: string;
1472
- }
1473
- interface RemediationAction {
1474
- /** What was done */
1475
- action: string;
1476
- /** Which issue it addressed */
1477
- targetIssue: string;
1478
- /** Score before this action */
1479
- scoreBefore: number;
1480
- /** Score after this action */
1481
- scoreAfter: number;
1482
- /** Was this action effective? */
1483
- effective: boolean;
1484
- }
1485
- declare class Remediator {
1486
- private kb;
1487
- private reviewer;
1488
- private initialized;
1489
- private wordLimits;
1490
- private bulletLimit;
1491
- private maxAttempts;
1492
- private targetScore;
1001
+ declare class CompositeChartProvider implements ChartProvider {
1002
+ name: string;
1003
+ private htmlProvider;
1004
+ private imageProvider;
1005
+ private mermaidProvider;
1493
1006
  constructor();
1494
- initialize(): Promise<void>;
1495
- /**
1496
- * Attempt to remediate a failing slide.
1497
- */
1498
- remediate(slide: Slide, presentationType: PresentationType, initialReview: QualitativeSlideReview): Promise<RemediationResult>;
1499
- /**
1500
- * Batch remediate multiple slides.
1501
- */
1502
- remediateBatch(slides: Slide[], reviews: QualitativeSlideReview[], presentationType: PresentationType): Promise<RemediationResult[]>;
1503
- private loadRulesForType;
1504
- private prioritizeIssues;
1505
- private applyFix;
1506
- private fixVisualIssue;
1507
- private fixContentIssue;
1508
- private fixLayoutIssue;
1509
- private fixTypographyIssue;
1510
- private fixAccessibilityIssue;
1511
- private cloneSlide;
1512
- private truncateToWords;
1513
- private isMinimalType;
1514
- private countWords;
1007
+ isAvailable(): Promise<boolean>;
1008
+ generateChart(request: ChartRequest): Promise<ChartResult>;
1009
+ generateDiagram(definition: string, title?: string): Promise<ChartResult>;
1010
+ generateFlowchart(steps: {
1011
+ id: string;
1012
+ label: string;
1013
+ next?: string[];
1014
+ }[]): string;
1015
+ generateTimeline(events: {
1016
+ date: string;
1017
+ title: string;
1018
+ }[]): string;
1515
1019
  }
1516
- declare function getRemediator(): Remediator;
1517
- declare function initRemediator(): Promise<Remediator>;
1020
+ /**
1021
+ * Create default chart provider
1022
+ */
1023
+ declare function createDefaultChartProvider(): CompositeChartProvider;
1518
1024
 
1519
1025
  /**
1520
- * Renderer - Premium HTML/PPTX Output Generation
1026
+ * Knowledge Base - RuVector Expert Principles Loader
1521
1027
  *
1522
- * Renders slides to high-quality outputs:
1523
- * - HTML: Reveal.js with premium CSS from KB
1524
- * - PPTX: PowerPoint (future implementation)
1028
+ * Loads and provides access to the 6,300+ line expert knowledge base
1029
+ * containing methodologies from 40+ presentation experts.
1525
1030
  *
1526
- * ALL styling comes from the Knowledge Base and VisualDesignSystem.
1527
- * NO hardcoded styles.
1031
+ * This runs WITHOUT any API - it's static data bundled with the package.
1528
1032
  */
1529
-
1530
- interface RenderOptions {
1531
- /** Presentation title */
1532
- title: string;
1533
- /** Author name */
1534
- author?: string;
1535
- /** Presentation type */
1536
- presentationType: PresentationType;
1537
- /** Metadata */
1538
- metadata?: PresentationMetadata;
1539
- /** Local images to use as backgrounds */
1540
- images?: string[];
1541
- /** Base path for resolving relative image paths */
1542
- imageBasePath?: string;
1033
+ interface ExpertPrinciple {
1034
+ name: string;
1035
+ description: string;
1036
+ validation?: string[];
1037
+ examples?: string[];
1543
1038
  }
1544
- interface RenderResult {
1545
- html?: string;
1546
- pptx?: Buffer;
1039
+ interface ExpertMethodology {
1040
+ name: string;
1041
+ principles: ExpertPrinciple[];
1042
+ slideTypes?: string[];
1043
+ wordLimits?: {
1044
+ min?: number;
1045
+ max?: number;
1046
+ };
1547
1047
  }
1548
- declare class Renderer {
1549
- private kb;
1550
- private vds;
1551
- private initialized;
1552
- private readonly slideImageKeywords;
1553
- constructor();
1554
- initialize(): Promise<void>;
1555
- /**
1556
- * Render slides to specified formats.
1557
- */
1558
- render(slides: Slide[], formats: OutputFormat[], options: RenderOptions): Promise<RenderResult>;
1559
- private renderHTML;
1560
- private generateCSS;
1561
- private renderSlide;
1562
- private renderTitleSlide;
1563
- private renderSectionDivider;
1564
- private renderMetricsSlide;
1565
- private renderQuoteSlide;
1566
- private renderStarMomentSlide;
1567
- private renderCTASlide;
1568
- private renderThankYouSlide;
1569
- private renderTwoColumnSlide;
1570
- private renderThreeColumnSlide;
1571
- private renderContentSlide;
1572
- private renderPPTX;
1573
- private formatCSSVariables;
1574
- private escapeHTML;
1575
- /**
1576
- * Generate a background image URL based on slide type and content.
1577
- * Priority: 1) slide.data.image, 2) local images array, 3) NO RANDOM STOCK PHOTOS
1578
- *
1579
- * IMPORTANT: Random stock photos destroy credibility. A photo of flowers behind
1580
- * a financial slide makes you look incompetent. Only use images that are:
1581
- * - Explicitly provided by the user
1582
- * - Actually relevant to the content
1583
- * Otherwise, rely on clean gradients via CSS.
1584
- */
1585
- private getBackgroundImageUrl;
1586
- /**
1587
- * Resolve an image path - handles relative paths, absolute paths, and URLs.
1588
- */
1589
- private resolveImagePath;
1590
- /**
1591
- * Generate fallback image URL using Picsum with smart seeding.
1592
- */
1593
- private getFallbackImageUrl;
1048
+ interface AutomatedQA {
1049
+ scoringRubric: {
1050
+ totalPoints: number;
1051
+ passingThreshold: number;
1052
+ categories: Record<string, {
1053
+ weight: number;
1054
+ checks: Record<string, unknown>;
1055
+ }>;
1056
+ };
1057
+ }
1058
+ declare class KnowledgeBase {
1059
+ private data;
1060
+ private loaded;
1594
1061
  /**
1595
- * Convert markdown syntax to HTML.
1596
- * Handles: bold, italic, code, links, and basic formatting.
1597
- * Called BEFORE escapeHTML to preserve markdown-generated HTML tags.
1062
+ * Load the knowledge base from the bundled YAML file.
1598
1063
  */
1599
- private renderMarkdown;
1064
+ load(): Promise<void>;
1600
1065
  /**
1601
- * Clean up broken/truncated markdown that can't be properly rendered.
1602
- * Removes partial code blocks, inline tables, etc.
1066
+ * Get expert methodology by name.
1603
1067
  */
1604
- private cleanBrokenMarkdown;
1068
+ getExpert(name: string): ExpertMethodology | undefined;
1605
1069
  /**
1606
- * Render markdown tables to HTML tables.
1070
+ * Get all expert names.
1607
1071
  */
1608
- private renderMarkdownTables;
1072
+ getExpertNames(): string[];
1609
1073
  /**
1610
- * Build an HTML table from markdown table rows.
1074
+ * Get framework recommendation for audience.
1611
1075
  */
1612
- private buildHTMLTable;
1613
- }
1614
- declare function getRenderer(): Renderer;
1615
- declare function initRenderer(): Promise<Renderer>;
1616
-
1617
- /**
1618
- * NanoBanana Pro Image Generation Provider
1619
- *
1620
- * Integrates with Google Gemini's image generation capabilities via NanoBanana Pro.
1621
- * Generates high-quality hero images, concept illustrations, and visual assets
1622
- * for presentation slides.
1623
- *
1624
- * Requires: GOOGLE_AI_API_KEY environment variable
1625
- *
1626
- * Usage:
1627
- * const provider = createNanoBananaProvider();
1628
- * if (await provider.isAvailable()) {
1629
- * const imageUrl = await provider.generateHeroImage('AI revolution');
1630
- * }
1631
- */
1632
- interface ImageGenerationRequest {
1633
- /** The concept or topic to visualize */
1634
- concept: string;
1635
- /** Image style/type */
1636
- style: 'hero' | 'concept' | 'icon' | 'background' | 'diagram';
1637
- /** Presentation type for context */
1638
- presentationType?: string;
1639
- /** Aspect ratio */
1640
- aspectRatio?: '16:9' | '4:3' | '1:1' | '9:16';
1641
- /** Color scheme preference */
1642
- colorScheme?: 'dark' | 'light' | 'vibrant' | 'muted';
1643
- }
1644
- interface ImageGenerationResult {
1645
- /** Whether generation succeeded */
1646
- success: boolean;
1647
- /** Generated image URL or base64 data */
1648
- imageUrl?: string;
1649
- /** Base64 encoded image data */
1650
- imageData?: string;
1651
- /** MIME type of the image */
1652
- mimeType?: string;
1653
- /** Error message if failed */
1654
- error?: string;
1655
- /** Prompt used for generation */
1656
- promptUsed?: string;
1657
- }
1658
- interface NanoBananaConfig {
1659
- /** Google AI API key (defaults to GOOGLE_AI_API_KEY env var) */
1660
- apiKey?: string;
1661
- /** Model to use (defaults to gemini-2.0-flash-exp for image generation) */
1662
- model?: string;
1663
- /** Timeout in milliseconds */
1664
- timeout?: number;
1665
- /** Enable verbose logging */
1666
- verbose?: boolean;
1667
- }
1668
- /**
1669
- * NanoBanana Pro image generation provider.
1670
- * Uses Google Gemini's image generation capabilities.
1671
- */
1672
- declare class NanoBananaProvider {
1673
- readonly name = "NanoBanana Pro";
1674
- private apiKey;
1675
- private model;
1676
- private timeout;
1677
- private verbose;
1678
- constructor(config?: NanoBananaConfig);
1076
+ getFrameworkForAudience(audience: string): {
1077
+ primaryFramework: string;
1078
+ secondaryFramework?: string;
1079
+ slideTypes: string[];
1080
+ } | undefined;
1679
1081
  /**
1680
- * Check if NanoBanana is available (API key present).
1082
+ * Get framework recommendation for goal.
1681
1083
  */
1682
- isAvailable(): Promise<boolean>;
1084
+ getFrameworkForGoal(goal: string): {
1085
+ primaryFramework: string;
1086
+ secondaryFramework?: string;
1087
+ slideTypes: string[];
1088
+ } | undefined;
1683
1089
  /**
1684
- * Generate a hero image for a slide.
1090
+ * Get QA scoring rubric.
1685
1091
  */
1686
- generateHeroImage(concept: string): Promise<ImageGenerationResult>;
1092
+ getScoringRubric(): AutomatedQA['scoringRubric'] | undefined;
1687
1093
  /**
1688
- * Generate a concept illustration.
1094
+ * Get mode configuration (keynote or business).
1689
1095
  */
1690
- generateConceptImage(concept: string): Promise<ImageGenerationResult>;
1096
+ getModeConfig(mode: 'keynote' | 'business'): unknown;
1691
1097
  /**
1692
- * Generate an icon or symbol.
1098
+ * Get slide type configuration.
1693
1099
  */
1694
- generateIcon(concept: string): Promise<ImageGenerationResult>;
1100
+ getSlideType(type: string): unknown;
1695
1101
  /**
1696
- * Generate a background image.
1102
+ * Get the knowledge base version.
1697
1103
  */
1698
- generateBackground(concept: string, colorScheme?: 'dark' | 'light'): Promise<ImageGenerationResult>;
1104
+ getVersion(): string;
1699
1105
  /**
1700
- * Generate an image based on request parameters.
1106
+ * Validate a slide against expert principles.
1701
1107
  */
1702
- generate(request: ImageGenerationRequest): Promise<ImageGenerationResult>;
1108
+ validateAgainstExpert(expertName: string, slideData: {
1109
+ wordCount: number;
1110
+ hasActionTitle: boolean;
1111
+ bulletCount: number;
1112
+ }): {
1113
+ passed: boolean;
1114
+ violations: string[];
1115
+ };
1703
1116
  /**
1704
- * Build an optimized prompt for image generation.
1117
+ * Ensure knowledge base is loaded.
1705
1118
  */
1706
- private buildPrompt;
1119
+ private ensureLoaded;
1707
1120
  /**
1708
- * Call the Gemini API for image generation.
1121
+ * Get default data if YAML can't be loaded.
1709
1122
  */
1710
- private callGeminiAPI;
1123
+ private getDefaultData;
1711
1124
  }
1712
1125
  /**
1713
- * Create a new NanoBanana provider instance.
1126
+ * Get the knowledge base singleton.
1714
1127
  */
1715
- declare function createNanoBananaProvider(config?: NanoBananaConfig): NanoBananaProvider;
1128
+ declare function getKnowledgeBase(): KnowledgeBase;
1129
+
1716
1130
  /**
1717
- * Get a pre-built prompt for a specific image type.
1718
- * Useful for customization or debugging.
1131
+ * Claude Presentation Master
1132
+ *
1133
+ * Generate world-class presentations using expert methodologies from
1134
+ * Duarte, Reynolds, Gallo, and Anderson. Enforces rigorous quality
1135
+ * standards through real visual validation.
1136
+ *
1137
+ * @packageDocumentation
1138
+ * @module claude-presentation-master
1139
+ * @author Stuart Kerr <stuart@isovision.ai>
1140
+ * @license MIT
1719
1141
  */
1720
- declare function getNanoBananaPrompt(style: 'hero' | 'concept' | 'icon' | 'background' | 'diagram', concept: string, presentationType?: string): string;
1721
1142
 
1722
1143
  /**
1723
- * CodeQualityValidator - Detects Hardcoded Values in Source Code
1144
+ * Generate a presentation from content.
1724
1145
  *
1725
- * This validator scans TypeScript/JavaScript source files for hardcoded CSS values,
1726
- * colors, and dimensions that should be coming from the Knowledge Base.
1146
+ * @example
1147
+ * ```typescript
1148
+ * import { generate } from '@isovision/claude-presentation-master';
1727
1149
  *
1728
- * RATIONALE: ALL styling decisions must come from the KB. Hardcoded values:
1729
- * 1. Break the single-source-of-truth principle
1730
- * 2. Make theme changes inconsistent
1731
- * 3. Bypass QA validation
1732
- * 4. Create maintenance nightmares
1150
+ * const result = await generate({
1151
+ * content: '# My Presentation\n\n...',
1152
+ * contentType: 'markdown',
1153
+ * mode: 'keynote',
1154
+ * format: ['html', 'pptx'],
1155
+ * qaThreshold: 95,
1156
+ * title: 'My Amazing Presentation'
1157
+ * });
1733
1158
  *
1734
- * This validator catches these careless errors at build/test time.
1735
- */
1736
- interface HardcodedViolation {
1737
- file: string;
1738
- line: number;
1739
- column: number;
1740
- type: 'color' | 'dimension' | 'font' | 'shadow' | 'rgba' | 'gradient';
1741
- value: string;
1742
- context: string;
1743
- severity: 'error' | 'warning';
1744
- suggestion: string;
1745
- }
1746
- interface ValidationResult {
1747
- passed: boolean;
1748
- violations: HardcodedViolation[];
1749
- summary: {
1750
- totalFiles: number;
1751
- filesWithViolations: number;
1752
- totalViolations: number;
1753
- byType: Record<string, number>;
1754
- bySeverity: Record<string, number>;
1755
- };
1756
- }
1757
- declare class CodeQualityValidator {
1758
- private srcDir;
1759
- private violations;
1760
- constructor(srcDir: string);
1761
- /**
1762
- * Validate all TypeScript files in the source directory.
1763
- */
1764
- validate(): Promise<ValidationResult>;
1765
- /**
1766
- * Validate a single file for hardcoded values.
1767
- */
1768
- private validateFile;
1769
- private checkForHexColors;
1770
- private checkForRgbaColors;
1771
- private checkForDimensions;
1772
- private checkForGradients;
1773
- private findTypeScriptFiles;
1774
- private shouldSkipFile;
1775
- private isExemptLine;
1776
- private buildResult;
1777
- /**
1778
- * Format validation results for console output.
1779
- */
1780
- formatResults(result: ValidationResult): string;
1781
- }
1782
- /**
1783
- * Run code quality validation on the source directory.
1784
- */
1785
- declare function validateCodeQuality(srcDir: string): Promise<ValidationResult>;
1786
- /**
1787
- * Run validation and print results to console.
1159
+ * console.log(`Score: ${result.score}/100`);
1160
+ * ```
1161
+ *
1162
+ * @param config - Presentation configuration
1163
+ * @returns Presentation result with outputs, QA results, and score
1164
+ * @throws {ValidationError} If input validation fails
1165
+ * @throws {QAFailureError} If QA score is below threshold
1788
1166
  */
1789
- declare function runCodeQualityCheck(srcDir: string): Promise<boolean>;
1790
-
1167
+ declare function generate(config: PresentationConfig): Promise<PresentationResult>;
1791
1168
  /**
1792
- * Claude Presentation Master - Main API
1169
+ * Validate an existing presentation.
1170
+ *
1171
+ * @example
1172
+ * ```typescript
1173
+ * import { validate } from '@isovision/claude-presentation-master';
1174
+ * import fs from 'fs';
1793
1175
  *
1794
- * Entry point for the qualitative-first presentation engine.
1795
- * Every slide must score 95/100 based on REAL qualitative excellence.
1176
+ * const html = fs.readFileSync('presentation.html', 'utf-8');
1177
+ * const result = await validate(html, { mode: 'keynote' });
1796
1178
  *
1797
- * Flow:
1798
- * 1. ContentAnalyzer -> Parse and detect structure
1799
- * 2. SlideGenerator -> Generate slides with visual intent
1800
- * 3. SlideQualityReviewer -> Qualitative review per slide (must pass 95)
1801
- * 4. Remediator -> Fix failing slides (3 attempts max)
1802
- * 5. DeckQualityReviewer -> Holistic deck review (must pass 95)
1803
- * 6. Renderer -> Premium HTML/PPTX output
1179
+ * console.log(`Score: ${result.score}/100`);
1180
+ * console.log(`Passed: ${result.passed}`);
1181
+ * ```
1804
1182
  *
1805
- * ALL decisions come from the Knowledge Base. NO hardcoded fallbacks.
1183
+ * @param presentation - HTML string or file buffer
1184
+ * @param options - Validation options
1185
+ * @returns QA validation results
1806
1186
  */
1807
-
1808
- declare const VERSION = "4.2.0";
1809
- interface GenerateOptions {
1810
- /** Input content (Markdown, text, etc.) */
1811
- content: string;
1812
- /** Content type */
1813
- contentType?: 'markdown' | 'text';
1814
- /** Output formats to generate */
1815
- format?: OutputFormat[];
1816
- /** Output directory */
1817
- outputDir?: string;
1818
- /** Presentation title (optional, will be detected from content) */
1819
- title?: string;
1820
- /** Author name */
1821
- author?: string;
1822
- /** Explicit presentation type (optional, will be detected from content) */
1823
- presentationType?: PresentationType;
1824
- /** Legacy mode (maps to presentation type) */
1825
- mode?: PresentationMode;
1826
- /** Minimum score threshold (default: 95) */
1827
- qaThreshold?: number;
1828
- /** Skip remediation (fail fast) */
1829
- skipRemediation?: boolean;
1830
- /** Verbose logging */
1831
- verbose?: boolean;
1832
- /** Local images to use as backgrounds (paths relative to output or absolute URLs) */
1833
- images?: string[];
1834
- /** Base path for resolving relative image paths */
1835
- imageBasePath?: string;
1836
- }
1837
- interface GenerateResult {
1838
- /** Generated outputs */
1839
- outputs: {
1840
- html?: string;
1841
- pptx?: Buffer;
1842
- };
1843
- /** Final slides */
1844
- slides: Slide[];
1845
- /** Overall score (0-100) */
1187
+ declare function validate(presentation: string | Buffer, options?: {
1188
+ mode?: 'keynote' | 'business';
1189
+ threshold?: number;
1190
+ strictMode?: boolean;
1191
+ }): Promise<QAResults & {
1846
1192
  score: number;
1847
- /** Detailed deck score */
1848
- deckScore?: QualitativeDeckReview | undefined;
1849
- /** Metadata */
1850
- metadata: {
1851
- title: string;
1852
- author: string;
1853
- presentationType: PresentationType;
1854
- generatedAt: string;
1855
- slideCount: number;
1856
- totalWords: number;
1857
- avgWordsPerSlide: number;
1858
- };
1859
- /** Remediation results (if any slides were fixed) */
1860
- remediations?: RemediationResult[] | undefined;
1861
- /** Any warnings (non-fatal issues) */
1862
- warnings?: string[] | undefined;
1863
- }
1193
+ }>;
1864
1194
  /**
1865
- * Generate a presentation from content.
1866
- *
1867
- * This is the main entry point. It orchestrates:
1868
- * 1. Content analysis
1869
- * 2. Slide generation
1870
- * 3. Qualitative review (95/100 threshold)
1871
- * 4. Remediation (3 attempts per failing slide)
1872
- * 5. Deck-level review
1873
- * 6. Rendering to HTML/PPTX
1195
+ * Get the version of the package.
1196
+ */
1197
+ declare const VERSION = "1.0.0";
1198
+ /**
1199
+ * Default export for convenience.
1874
1200
  */
1875
- declare function generate(options: GenerateOptions): Promise<GenerateResult>;
1201
+ declare const _default: {
1202
+ generate: typeof generate;
1203
+ validate: typeof validate;
1204
+ PresentationEngine: typeof PresentationEngine;
1205
+ QAEngine: typeof QAEngine;
1206
+ VERSION: string;
1207
+ };
1876
1208
 
1877
- export { CodeQualityValidator, type ValidationResult as CodeValidationResult, type ContentAnalysis, ContentAnalyzer, DeckQualityReviewer, type DeckScore, type GenerateOptions, type GenerateResult, type HardcodedViolation, type ImageGenerationRequest, type ImageGenerationResult, KnowledgeGateway, type MetricData, type NanoBananaConfig, NanoBananaProvider, type OutputFormat, PresentationEngineV2, type PresentationMetadata, type PresentationMode, type PresentationResult, type PresentationType, type QualitativeDeckReview, type QualitativeSlideReview, type RemediationResult, Remediator, Renderer, RendererV2, type Slide, type SlideContent as SlideContentV2, SlideGenerator, SlideGeneratorV2, SlideQualityReviewer, type SlideScore, type SlideType as SlideTypeV2, type SlideV2, type TableData, VERSION, type Violation, VisualDesignSystem, createNanoBananaProvider, createPresentationEngineV2, createRendererV2, createSlideGeneratorV2, generate, generatePresentation, getContentAnalyzer, getDeckQualityReviewer, getKB, getNanoBananaPrompt, getRemediator, getRenderer, getSlideGenerator, getSlideQualityReviewer, getVisualDesignSystem, initContentAnalyzer, initDeckQualityReviewer, initKB, initRemediator, initRenderer, initSlideGenerator, initSlideQualityReviewer, initVisualDesignSystem, runCodeQualityCheck, validateCodeQuality };
1209
+ export { type AccessibilityResults, type ChartData, type ChartDataset, ChartJsProvider, type ChartProvider, type ChartRequest, type ChartResult, type ChartType, CompositeChartProvider, CompositeImageProvider, type ContentAnalysis, ContentAnalyzer, type ContentQAResults, type ContrastIssue, type ExpertQAResults, type ExpertValidation, type FontSizeIssue, type GlanceTestResult, type ImageData, type ImageProvider, type ImageRequest, type ImageResult, KnowledgeBase, LocalImageProvider, MermaidProvider, type MetricData, type OneIdeaResult, type OutputFormat, PlaceholderImageProvider, PowerPointGenerator, type PresentationConfig, PresentationEngine, type PresentationMetadata, type PresentationMode, type PresentationResult, QAEngine, QAFailureError, type QAIssue, type QAResults, QuickChartProvider, RevealJsGenerator, type SCQAStructure, ScoreCalculator, type SignalNoiseResult, type Slide, type SlideContentScore, type SlideData, SlideFactory, type SlideType, type SlideVisualScore, type SparklineStructure, TemplateEngine, TemplateNotFoundError, type ThemeName, UnsplashImageProvider, VERSION, ValidationError, type VisualQAResults, createDefaultChartProvider, createDefaultImageProvider, _default as default, generate, getKnowledgeBase, validate };