claude-presentation-master 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +763 -0
- package/assets/presentation-engine.css +3057 -0
- package/assets/presentation-knowledge.yaml +6312 -0
- package/bin/cli.js +445 -0
- package/dist/index.d.mts +1209 -0
- package/dist/index.d.ts +1209 -0
- package/dist/index.js +4204 -0
- package/dist/index.mjs +4142 -0
- package/package.json +99 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Presentation Master - Type Definitions
|
|
3
|
+
* @module types
|
|
4
|
+
*/
|
|
5
|
+
type PresentationMode = 'keynote' | 'business';
|
|
6
|
+
type OutputFormat = 'html' | 'pptx';
|
|
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';
|
|
39
|
+
interface Slide {
|
|
40
|
+
/** Slide index (0-based) */
|
|
41
|
+
index: number;
|
|
42
|
+
/** Slide type */
|
|
43
|
+
type: SlideType;
|
|
44
|
+
/** Slide data for template rendering */
|
|
45
|
+
data: SlideData;
|
|
46
|
+
/** CSS classes to apply */
|
|
47
|
+
classes?: string[];
|
|
48
|
+
/** Custom styles */
|
|
49
|
+
styles?: Record<string, string>;
|
|
50
|
+
/** Speaker notes */
|
|
51
|
+
notes?: string;
|
|
52
|
+
}
|
|
53
|
+
interface SlideData {
|
|
54
|
+
/** Main title */
|
|
55
|
+
title?: string;
|
|
56
|
+
/** Subtitle */
|
|
57
|
+
subtitle?: string;
|
|
58
|
+
/** Body content */
|
|
59
|
+
body?: string;
|
|
60
|
+
/** Bullet points */
|
|
61
|
+
bullets?: string[];
|
|
62
|
+
/** Key message */
|
|
63
|
+
keyMessage?: string;
|
|
64
|
+
/** Images */
|
|
65
|
+
images?: ImageData[];
|
|
66
|
+
/** Metrics/KPIs */
|
|
67
|
+
metrics?: MetricData[];
|
|
68
|
+
/** Quote text */
|
|
69
|
+
quote?: string;
|
|
70
|
+
/** Quote attribution */
|
|
71
|
+
attribution?: string;
|
|
72
|
+
/** Source citation */
|
|
73
|
+
source?: string;
|
|
74
|
+
/** Additional custom data */
|
|
75
|
+
[key: string]: unknown;
|
|
76
|
+
}
|
|
77
|
+
interface ImageData {
|
|
78
|
+
src: string;
|
|
79
|
+
alt: string;
|
|
80
|
+
caption?: string;
|
|
81
|
+
}
|
|
82
|
+
interface MetricData {
|
|
83
|
+
value: string | number;
|
|
84
|
+
label: string;
|
|
85
|
+
change?: string;
|
|
86
|
+
trend?: 'up' | 'down' | 'neutral';
|
|
87
|
+
}
|
|
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 */
|
|
98
|
+
passed: boolean;
|
|
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;
|
|
123
|
+
passed: boolean;
|
|
124
|
+
issues: string[];
|
|
125
|
+
}
|
|
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[];
|
|
142
|
+
}
|
|
143
|
+
interface GlanceTestResult {
|
|
144
|
+
slideIndex: number;
|
|
145
|
+
keyMessage: string;
|
|
146
|
+
wordCount: number;
|
|
147
|
+
readingTime: number;
|
|
148
|
+
passed: boolean;
|
|
149
|
+
recommendation?: string;
|
|
150
|
+
}
|
|
151
|
+
interface SignalNoiseResult {
|
|
152
|
+
slideIndex: number;
|
|
153
|
+
signalCount: number;
|
|
154
|
+
noiseCount: number;
|
|
155
|
+
signalRatio: number;
|
|
156
|
+
passed: boolean;
|
|
157
|
+
noiseElements: string[];
|
|
158
|
+
}
|
|
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;
|
|
202
|
+
}
|
|
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;
|
|
220
|
+
}
|
|
221
|
+
interface PresentationResult {
|
|
222
|
+
/** Generated outputs */
|
|
223
|
+
outputs: {
|
|
224
|
+
html?: string;
|
|
225
|
+
pptx?: Buffer;
|
|
226
|
+
};
|
|
227
|
+
/** QA validation results */
|
|
228
|
+
qaResults: QAResults;
|
|
229
|
+
/** Overall QA score (0-100) */
|
|
230
|
+
score: number;
|
|
231
|
+
/** Presentation metadata */
|
|
232
|
+
metadata: PresentationMetadata;
|
|
233
|
+
}
|
|
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[];
|
|
253
|
+
}
|
|
254
|
+
interface ContentAnalysis {
|
|
255
|
+
/** SCQA structure extracted */
|
|
256
|
+
scqa: SCQAStructure;
|
|
257
|
+
/** Sparkline narrative arc */
|
|
258
|
+
sparkline: SparklineStructure;
|
|
259
|
+
/** Key messages identified */
|
|
260
|
+
keyMessages: string[];
|
|
261
|
+
/** Generated action titles */
|
|
262
|
+
titles: string[];
|
|
263
|
+
/** STAR moments identified */
|
|
264
|
+
starMoments: string[];
|
|
265
|
+
/** Estimated slide count */
|
|
266
|
+
estimatedSlideCount: number;
|
|
267
|
+
}
|
|
268
|
+
interface SCQAStructure {
|
|
269
|
+
situation: string;
|
|
270
|
+
complication: string;
|
|
271
|
+
question: string;
|
|
272
|
+
answer: string;
|
|
273
|
+
}
|
|
274
|
+
interface SparklineStructure {
|
|
275
|
+
whatIs: string[];
|
|
276
|
+
whatCouldBe: string[];
|
|
277
|
+
callToAdventure: string;
|
|
278
|
+
}
|
|
279
|
+
declare class ValidationError extends Error {
|
|
280
|
+
errors: string[];
|
|
281
|
+
constructor(errors: string[], message?: string);
|
|
282
|
+
}
|
|
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);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Presentation Engine - Main Orchestrator
|
|
297
|
+
*
|
|
298
|
+
* Coordinates content analysis, slide generation, and QA validation
|
|
299
|
+
* to produce world-class presentations.
|
|
300
|
+
*/
|
|
301
|
+
|
|
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();
|
|
311
|
+
/**
|
|
312
|
+
* Generate a presentation from content.
|
|
313
|
+
*
|
|
314
|
+
* @param config - Presentation configuration
|
|
315
|
+
* @returns Presentation result with outputs, QA results, and score
|
|
316
|
+
*/
|
|
317
|
+
generate(config: PresentationConfig): Promise<PresentationResult>;
|
|
318
|
+
/**
|
|
319
|
+
* Validate presentation configuration.
|
|
320
|
+
*/
|
|
321
|
+
private validateConfig;
|
|
322
|
+
/**
|
|
323
|
+
* Validate slide structure before generation.
|
|
324
|
+
*/
|
|
325
|
+
private validateStructure;
|
|
326
|
+
/**
|
|
327
|
+
* Count words in a slide.
|
|
328
|
+
*/
|
|
329
|
+
private countWords;
|
|
330
|
+
/**
|
|
331
|
+
* Build presentation metadata.
|
|
332
|
+
*/
|
|
333
|
+
private buildMetadata;
|
|
334
|
+
/**
|
|
335
|
+
* Detect which expert frameworks were applied.
|
|
336
|
+
*/
|
|
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;
|
|
358
|
+
/**
|
|
359
|
+
* Analyze content and extract structural elements.
|
|
360
|
+
*/
|
|
361
|
+
analyze(content: string, contentType: string): Promise<ContentAnalysis>;
|
|
362
|
+
/**
|
|
363
|
+
* Parse content based on its type.
|
|
364
|
+
*/
|
|
365
|
+
private parseContent;
|
|
366
|
+
/**
|
|
367
|
+
* Parse markdown content to plain text (preserving structure hints).
|
|
368
|
+
*/
|
|
369
|
+
private parseMarkdown;
|
|
370
|
+
/**
|
|
371
|
+
* Parse JSON content.
|
|
372
|
+
*/
|
|
373
|
+
private parseJSON;
|
|
374
|
+
/**
|
|
375
|
+
* Parse YAML content.
|
|
376
|
+
*/
|
|
377
|
+
private parseYAML;
|
|
378
|
+
/**
|
|
379
|
+
* Flatten object to text.
|
|
380
|
+
*/
|
|
381
|
+
private flattenObject;
|
|
382
|
+
/**
|
|
383
|
+
* Split text into paragraphs.
|
|
384
|
+
*/
|
|
385
|
+
private splitIntoParagraphs;
|
|
386
|
+
/**
|
|
387
|
+
* Split text into sentences.
|
|
388
|
+
*/
|
|
389
|
+
private splitIntoSentences;
|
|
390
|
+
/**
|
|
391
|
+
* Extract SCQA structure (Barbara Minto's Pyramid Principle).
|
|
392
|
+
*/
|
|
393
|
+
private extractSCQA;
|
|
394
|
+
/**
|
|
395
|
+
* Extract Sparkline structure (Nancy Duarte).
|
|
396
|
+
*/
|
|
397
|
+
private extractSparkline;
|
|
398
|
+
/**
|
|
399
|
+
* Extract key messages (max 3 - Rule of Three).
|
|
400
|
+
*/
|
|
401
|
+
private extractKeyMessages;
|
|
402
|
+
/**
|
|
403
|
+
* Generate action titles (McKinsey-style).
|
|
404
|
+
*/
|
|
405
|
+
private generateActionTitles;
|
|
406
|
+
/**
|
|
407
|
+
* Transform a statement into an action title.
|
|
408
|
+
*/
|
|
409
|
+
private transformToActionTitle;
|
|
410
|
+
/**
|
|
411
|
+
* Identify STAR moments (Something They'll Always Remember).
|
|
412
|
+
*/
|
|
413
|
+
private identifyStarMoments;
|
|
414
|
+
/**
|
|
415
|
+
* Estimate slide count based on content.
|
|
416
|
+
*/
|
|
417
|
+
private estimateSlideCount;
|
|
418
|
+
private containsSignals;
|
|
419
|
+
private extractRelevantSentence;
|
|
420
|
+
private truncateToSentence;
|
|
421
|
+
private truncateToWords;
|
|
422
|
+
private capitalizeFirst;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Slide Factory - Creates Slides from Content Analysis
|
|
427
|
+
*
|
|
428
|
+
* Generates slide structures based on:
|
|
429
|
+
* - Presentation mode (keynote vs business)
|
|
430
|
+
* - Content analysis results
|
|
431
|
+
* - Expert methodology recommendations
|
|
432
|
+
*/
|
|
433
|
+
|
|
434
|
+
declare class SlideFactory {
|
|
435
|
+
private readonly templates;
|
|
436
|
+
constructor();
|
|
437
|
+
/**
|
|
438
|
+
* Create slides from analyzed content.
|
|
439
|
+
*/
|
|
440
|
+
createSlides(analysis: ContentAnalysis, mode: PresentationMode): Promise<Slide[]>;
|
|
441
|
+
/**
|
|
442
|
+
* Create a title slide.
|
|
443
|
+
*/
|
|
444
|
+
private createTitleSlide;
|
|
445
|
+
/**
|
|
446
|
+
* Create an agenda slide.
|
|
447
|
+
*/
|
|
448
|
+
private createAgendaSlide;
|
|
449
|
+
/**
|
|
450
|
+
* Create a context/situation slide.
|
|
451
|
+
*/
|
|
452
|
+
private createContextSlide;
|
|
453
|
+
/**
|
|
454
|
+
* Create a problem/complication slide.
|
|
455
|
+
*/
|
|
456
|
+
private createProblemSlide;
|
|
457
|
+
/**
|
|
458
|
+
* Create a key message slide.
|
|
459
|
+
*/
|
|
460
|
+
private createMessageSlide;
|
|
461
|
+
/**
|
|
462
|
+
* Create a STAR moment slide.
|
|
463
|
+
*/
|
|
464
|
+
private createStarMomentSlide;
|
|
465
|
+
/**
|
|
466
|
+
* Create a solution/answer slide.
|
|
467
|
+
*/
|
|
468
|
+
private createSolutionSlide;
|
|
469
|
+
/**
|
|
470
|
+
* Create a call-to-action slide.
|
|
471
|
+
*/
|
|
472
|
+
private createCTASlide;
|
|
473
|
+
/**
|
|
474
|
+
* Create a thank you slide.
|
|
475
|
+
*/
|
|
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;
|
|
489
|
+
/**
|
|
490
|
+
* Extract bullet points from text.
|
|
491
|
+
*/
|
|
492
|
+
private extractBullets;
|
|
493
|
+
/**
|
|
494
|
+
* Remove a statistic from text.
|
|
495
|
+
*/
|
|
496
|
+
private removeStatistic;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Template Engine - Handlebars Template Rendering
|
|
501
|
+
*
|
|
502
|
+
* Renders slide data into HTML using Handlebars templates.
|
|
503
|
+
* Supports custom templates and helper functions.
|
|
504
|
+
*/
|
|
505
|
+
|
|
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;
|
|
514
|
+
constructor();
|
|
515
|
+
/**
|
|
516
|
+
* Render a slide to HTML.
|
|
517
|
+
*/
|
|
518
|
+
render(slide: Slide, config?: TemplateConfig): string;
|
|
519
|
+
/**
|
|
520
|
+
* Render multiple slides.
|
|
521
|
+
*/
|
|
522
|
+
renderAll(slides: Slide[], config?: TemplateConfig): string[];
|
|
523
|
+
/**
|
|
524
|
+
* Prepare template context with computed properties.
|
|
525
|
+
*/
|
|
526
|
+
private prepareContext;
|
|
527
|
+
/**
|
|
528
|
+
* Build CSS class list for slide.
|
|
529
|
+
*/
|
|
530
|
+
private buildClassList;
|
|
531
|
+
/**
|
|
532
|
+
* Build inline style string.
|
|
533
|
+
*/
|
|
534
|
+
private buildStyleString;
|
|
535
|
+
/**
|
|
536
|
+
* Register Handlebars helpers.
|
|
537
|
+
*/
|
|
538
|
+
private registerHelpers;
|
|
539
|
+
/**
|
|
540
|
+
* Register reusable partials.
|
|
541
|
+
*/
|
|
542
|
+
private registerPartials;
|
|
543
|
+
/**
|
|
544
|
+
* Compile built-in templates.
|
|
545
|
+
*/
|
|
546
|
+
private compileTemplates;
|
|
547
|
+
/**
|
|
548
|
+
* Render fallback for unknown slide types.
|
|
549
|
+
*/
|
|
550
|
+
private renderFallback;
|
|
551
|
+
/**
|
|
552
|
+
* Convert camelCase to kebab-case.
|
|
553
|
+
*/
|
|
554
|
+
private kebabCase;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Score Calculator - QA Score Computation
|
|
559
|
+
*
|
|
560
|
+
* Calculates presentation quality scores based on:
|
|
561
|
+
* - Visual quality (35%)
|
|
562
|
+
* - Content quality (30%)
|
|
563
|
+
* - Expert methodology compliance (25%)
|
|
564
|
+
* - Accessibility (10%)
|
|
565
|
+
*/
|
|
566
|
+
|
|
567
|
+
interface ScoreBreakdown {
|
|
568
|
+
visual: number;
|
|
569
|
+
content: number;
|
|
570
|
+
expert: number;
|
|
571
|
+
accessibility: number;
|
|
572
|
+
total: number;
|
|
573
|
+
penalties: number;
|
|
574
|
+
details: ScoreDetail[];
|
|
575
|
+
}
|
|
576
|
+
interface ScoreDetail {
|
|
577
|
+
category: string;
|
|
578
|
+
check: string;
|
|
579
|
+
score: number;
|
|
580
|
+
maxScore: number;
|
|
581
|
+
notes?: string;
|
|
582
|
+
}
|
|
583
|
+
declare class ScoreCalculator {
|
|
584
|
+
private readonly weights;
|
|
585
|
+
/**
|
|
586
|
+
* Calculate overall QA score from results.
|
|
587
|
+
*/
|
|
588
|
+
calculate(results: QAResults): number;
|
|
589
|
+
/**
|
|
590
|
+
* Get detailed score breakdown.
|
|
591
|
+
*/
|
|
592
|
+
getBreakdown(results: QAResults): ScoreBreakdown;
|
|
593
|
+
/**
|
|
594
|
+
* Calculate visual quality score.
|
|
595
|
+
*/
|
|
596
|
+
private calculateVisualScore;
|
|
597
|
+
/**
|
|
598
|
+
* Calculate content quality score.
|
|
599
|
+
*/
|
|
600
|
+
private calculateContentScore;
|
|
601
|
+
/**
|
|
602
|
+
* Calculate expert methodology compliance score.
|
|
603
|
+
*/
|
|
604
|
+
private calculateExpertScore;
|
|
605
|
+
/**
|
|
606
|
+
* Calculate accessibility compliance score.
|
|
607
|
+
*/
|
|
608
|
+
private calculateAccessibilityScore;
|
|
609
|
+
/**
|
|
610
|
+
* Calculate penalties from issues.
|
|
611
|
+
*/
|
|
612
|
+
private calculatePenalties;
|
|
613
|
+
/**
|
|
614
|
+
* Get human-readable grade from score.
|
|
615
|
+
*/
|
|
616
|
+
getGrade(score: number): string;
|
|
617
|
+
/**
|
|
618
|
+
* Get pass/fail status.
|
|
619
|
+
*/
|
|
620
|
+
isPassing(score: number, threshold?: number): boolean;
|
|
621
|
+
/**
|
|
622
|
+
* Format score for display.
|
|
623
|
+
*/
|
|
624
|
+
formatScore(score: number): string;
|
|
625
|
+
/**
|
|
626
|
+
* Generate summary report.
|
|
627
|
+
*/
|
|
628
|
+
generateReport(results: QAResults): string;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* QA Engine - Real Visual Quality Validation
|
|
633
|
+
*
|
|
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
|
|
639
|
+
*/
|
|
640
|
+
|
|
641
|
+
declare class QAEngine {
|
|
642
|
+
private browser;
|
|
643
|
+
/**
|
|
644
|
+
* Validate a presentation.
|
|
645
|
+
*/
|
|
646
|
+
validate(presentation: string | Buffer, options?: {
|
|
647
|
+
mode?: 'keynote' | 'business';
|
|
648
|
+
strictMode?: boolean;
|
|
649
|
+
threshold?: number;
|
|
650
|
+
}): Promise<QAResults>;
|
|
651
|
+
/**
|
|
652
|
+
* Calculate overall QA score.
|
|
653
|
+
*/
|
|
654
|
+
calculateScore(results: QAResults): number;
|
|
655
|
+
/**
|
|
656
|
+
* Create empty QA results (for when QA is skipped).
|
|
657
|
+
*/
|
|
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();
|
|
689
|
+
/**
|
|
690
|
+
* Generate complete Reveal.js HTML presentation.
|
|
691
|
+
*/
|
|
692
|
+
generate(slides: Slide[], config: PresentationConfig): Promise<string>;
|
|
693
|
+
/**
|
|
694
|
+
* Build the complete HTML document.
|
|
695
|
+
*/
|
|
696
|
+
private buildDocument;
|
|
697
|
+
/**
|
|
698
|
+
* Get base styles for slides.
|
|
699
|
+
*/
|
|
700
|
+
private getBaseStyles;
|
|
701
|
+
/**
|
|
702
|
+
* Get theme-specific styles.
|
|
703
|
+
*/
|
|
704
|
+
private getThemeStyles;
|
|
705
|
+
/**
|
|
706
|
+
* Get animation styles.
|
|
707
|
+
*/
|
|
708
|
+
private getAnimationStyles;
|
|
709
|
+
/**
|
|
710
|
+
* Escape HTML entities.
|
|
711
|
+
*/
|
|
712
|
+
private escapeHtml;
|
|
713
|
+
/**
|
|
714
|
+
* Basic HTML minification.
|
|
715
|
+
*/
|
|
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;
|
|
731
|
+
/**
|
|
732
|
+
* Generate a PowerPoint presentation.
|
|
733
|
+
*/
|
|
734
|
+
generate(slides: Slide[], config: PresentationConfig): Promise<Buffer>;
|
|
735
|
+
/**
|
|
736
|
+
* Add a slide to the presentation.
|
|
737
|
+
*/
|
|
738
|
+
private addSlide;
|
|
739
|
+
/**
|
|
740
|
+
* Add title slide.
|
|
741
|
+
*/
|
|
742
|
+
private addTitleSlide;
|
|
743
|
+
/**
|
|
744
|
+
* Add big idea / single statement slide.
|
|
745
|
+
*/
|
|
746
|
+
private addBigIdeaSlide;
|
|
747
|
+
/**
|
|
748
|
+
* Add big number slide.
|
|
749
|
+
*/
|
|
750
|
+
private addBigNumberSlide;
|
|
751
|
+
/**
|
|
752
|
+
* Add quote slide.
|
|
753
|
+
*/
|
|
754
|
+
private addQuoteSlide;
|
|
755
|
+
/**
|
|
756
|
+
* Add bullet points slide.
|
|
757
|
+
*/
|
|
758
|
+
private addBulletSlide;
|
|
759
|
+
/**
|
|
760
|
+
* Add two-column slide.
|
|
761
|
+
*/
|
|
762
|
+
private addTwoColumnSlide;
|
|
763
|
+
/**
|
|
764
|
+
* Add metrics grid slide.
|
|
765
|
+
*/
|
|
766
|
+
private addMetricsSlide;
|
|
767
|
+
/**
|
|
768
|
+
* Add metrics to a slide at specified position.
|
|
769
|
+
*/
|
|
770
|
+
private addMetricsToSlide;
|
|
771
|
+
/**
|
|
772
|
+
* Add thank you slide.
|
|
773
|
+
*/
|
|
774
|
+
private addThankYouSlide;
|
|
775
|
+
/**
|
|
776
|
+
* Add agenda slide.
|
|
777
|
+
*/
|
|
778
|
+
private addAgendaSlide;
|
|
779
|
+
/**
|
|
780
|
+
* Add section divider slide.
|
|
781
|
+
*/
|
|
782
|
+
private addSectionDividerSlide;
|
|
783
|
+
/**
|
|
784
|
+
* Add default slide (fallback).
|
|
785
|
+
*/
|
|
786
|
+
private addDefaultSlide;
|
|
787
|
+
/**
|
|
788
|
+
* Add image placeholder.
|
|
789
|
+
*/
|
|
790
|
+
private addImagePlaceholder;
|
|
791
|
+
/**
|
|
792
|
+
* Convert layout position to PptxGenJS text props.
|
|
793
|
+
*/
|
|
794
|
+
private positionToProps;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* Image Provider - Pluggable Image Generation
|
|
799
|
+
*
|
|
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)
|
|
805
|
+
*/
|
|
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;
|
|
827
|
+
}
|
|
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[]>;
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* Local Image Provider - Uses user-provided images
|
|
840
|
+
*/
|
|
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
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* Placeholder Image Provider - Uses picsum.photos (no API key needed)
|
|
854
|
+
*/
|
|
855
|
+
declare class PlaceholderImageProvider implements ImageProvider {
|
|
856
|
+
name: string;
|
|
857
|
+
isAvailable(): Promise<boolean>;
|
|
858
|
+
getImage(request: ImageRequest): Promise<ImageResult>;
|
|
859
|
+
getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
|
|
860
|
+
private hashString;
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Unsplash Image Provider - Uses Unsplash API (free tier: 50 req/hour)
|
|
864
|
+
*/
|
|
865
|
+
declare class UnsplashImageProvider implements ImageProvider {
|
|
866
|
+
name: string;
|
|
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;
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Composite Image Provider - Tries providers in order
|
|
878
|
+
*/
|
|
879
|
+
declare class CompositeImageProvider implements ImageProvider {
|
|
880
|
+
name: string;
|
|
881
|
+
private providers;
|
|
882
|
+
constructor(providers: ImageProvider[]);
|
|
883
|
+
isAvailable(): Promise<boolean>;
|
|
884
|
+
getImage(request: ImageRequest): Promise<ImageResult>;
|
|
885
|
+
getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Create default image provider chain
|
|
889
|
+
*/
|
|
890
|
+
declare function createDefaultImageProvider(options?: {
|
|
891
|
+
localImages?: Record<string, string>;
|
|
892
|
+
unsplashKey?: string;
|
|
893
|
+
}): ImageProvider;
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Chart Provider - Pluggable Chart Generation
|
|
897
|
+
*
|
|
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)
|
|
902
|
+
*/
|
|
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;
|
|
942
|
+
}
|
|
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>;
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* Chart.js Provider - Generates embedded Chart.js HTML
|
|
953
|
+
* No API needed - runs in browser
|
|
954
|
+
*/
|
|
955
|
+
declare class ChartJsProvider implements ChartProvider {
|
|
956
|
+
name: string;
|
|
957
|
+
isAvailable(): Promise<boolean>;
|
|
958
|
+
generateChart(request: ChartRequest): Promise<ChartResult>;
|
|
959
|
+
}
|
|
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>;
|
|
969
|
+
}
|
|
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>;
|
|
978
|
+
/**
|
|
979
|
+
* Generate a Mermaid diagram
|
|
980
|
+
*/
|
|
981
|
+
generateDiagram(definition: string, title?: string): Promise<ChartResult>;
|
|
982
|
+
/**
|
|
983
|
+
* Generate flowchart from steps
|
|
984
|
+
*/
|
|
985
|
+
generateFlowchart(steps: {
|
|
986
|
+
id: string;
|
|
987
|
+
label: string;
|
|
988
|
+
next?: string[];
|
|
989
|
+
}[]): string;
|
|
990
|
+
/**
|
|
991
|
+
* Generate timeline from events
|
|
992
|
+
*/
|
|
993
|
+
generateTimeline(events: {
|
|
994
|
+
date: string;
|
|
995
|
+
title: string;
|
|
996
|
+
}[]): string;
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Composite Chart Provider
|
|
1000
|
+
*/
|
|
1001
|
+
declare class CompositeChartProvider implements ChartProvider {
|
|
1002
|
+
name: string;
|
|
1003
|
+
private htmlProvider;
|
|
1004
|
+
private imageProvider;
|
|
1005
|
+
private mermaidProvider;
|
|
1006
|
+
constructor();
|
|
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;
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Create default chart provider
|
|
1022
|
+
*/
|
|
1023
|
+
declare function createDefaultChartProvider(): CompositeChartProvider;
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Knowledge Base - RuVector Expert Principles Loader
|
|
1027
|
+
*
|
|
1028
|
+
* Loads and provides access to the 6,300+ line expert knowledge base
|
|
1029
|
+
* containing methodologies from 40+ presentation experts.
|
|
1030
|
+
*
|
|
1031
|
+
* This runs WITHOUT any API - it's static data bundled with the package.
|
|
1032
|
+
*/
|
|
1033
|
+
interface ExpertPrinciple {
|
|
1034
|
+
name: string;
|
|
1035
|
+
description: string;
|
|
1036
|
+
validation?: string[];
|
|
1037
|
+
examples?: string[];
|
|
1038
|
+
}
|
|
1039
|
+
interface ExpertMethodology {
|
|
1040
|
+
name: string;
|
|
1041
|
+
principles: ExpertPrinciple[];
|
|
1042
|
+
slideTypes?: string[];
|
|
1043
|
+
wordLimits?: {
|
|
1044
|
+
min?: number;
|
|
1045
|
+
max?: number;
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
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;
|
|
1061
|
+
/**
|
|
1062
|
+
* Load the knowledge base from the bundled YAML file.
|
|
1063
|
+
*/
|
|
1064
|
+
load(): Promise<void>;
|
|
1065
|
+
/**
|
|
1066
|
+
* Get expert methodology by name.
|
|
1067
|
+
*/
|
|
1068
|
+
getExpert(name: string): ExpertMethodology | undefined;
|
|
1069
|
+
/**
|
|
1070
|
+
* Get all expert names.
|
|
1071
|
+
*/
|
|
1072
|
+
getExpertNames(): string[];
|
|
1073
|
+
/**
|
|
1074
|
+
* Get framework recommendation for audience.
|
|
1075
|
+
*/
|
|
1076
|
+
getFrameworkForAudience(audience: string): {
|
|
1077
|
+
primaryFramework: string;
|
|
1078
|
+
secondaryFramework?: string;
|
|
1079
|
+
slideTypes: string[];
|
|
1080
|
+
} | undefined;
|
|
1081
|
+
/**
|
|
1082
|
+
* Get framework recommendation for goal.
|
|
1083
|
+
*/
|
|
1084
|
+
getFrameworkForGoal(goal: string): {
|
|
1085
|
+
primaryFramework: string;
|
|
1086
|
+
secondaryFramework?: string;
|
|
1087
|
+
slideTypes: string[];
|
|
1088
|
+
} | undefined;
|
|
1089
|
+
/**
|
|
1090
|
+
* Get QA scoring rubric.
|
|
1091
|
+
*/
|
|
1092
|
+
getScoringRubric(): AutomatedQA['scoringRubric'] | undefined;
|
|
1093
|
+
/**
|
|
1094
|
+
* Get mode configuration (keynote or business).
|
|
1095
|
+
*/
|
|
1096
|
+
getModeConfig(mode: 'keynote' | 'business'): unknown;
|
|
1097
|
+
/**
|
|
1098
|
+
* Get slide type configuration.
|
|
1099
|
+
*/
|
|
1100
|
+
getSlideType(type: string): unknown;
|
|
1101
|
+
/**
|
|
1102
|
+
* Get the knowledge base version.
|
|
1103
|
+
*/
|
|
1104
|
+
getVersion(): string;
|
|
1105
|
+
/**
|
|
1106
|
+
* Validate a slide against expert principles.
|
|
1107
|
+
*/
|
|
1108
|
+
validateAgainstExpert(expertName: string, slideData: {
|
|
1109
|
+
wordCount: number;
|
|
1110
|
+
hasActionTitle: boolean;
|
|
1111
|
+
bulletCount: number;
|
|
1112
|
+
}): {
|
|
1113
|
+
passed: boolean;
|
|
1114
|
+
violations: string[];
|
|
1115
|
+
};
|
|
1116
|
+
/**
|
|
1117
|
+
* Ensure knowledge base is loaded.
|
|
1118
|
+
*/
|
|
1119
|
+
private ensureLoaded;
|
|
1120
|
+
/**
|
|
1121
|
+
* Get default data if YAML can't be loaded.
|
|
1122
|
+
*/
|
|
1123
|
+
private getDefaultData;
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* Get the knowledge base singleton.
|
|
1127
|
+
*/
|
|
1128
|
+
declare function getKnowledgeBase(): KnowledgeBase;
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
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
|
|
1141
|
+
*/
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Generate a presentation from content.
|
|
1145
|
+
*
|
|
1146
|
+
* @example
|
|
1147
|
+
* ```typescript
|
|
1148
|
+
* import { generate } from '@isovision/claude-presentation-master';
|
|
1149
|
+
*
|
|
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
|
+
* });
|
|
1158
|
+
*
|
|
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
|
|
1166
|
+
*/
|
|
1167
|
+
declare function generate(config: PresentationConfig): Promise<PresentationResult>;
|
|
1168
|
+
/**
|
|
1169
|
+
* Validate an existing presentation.
|
|
1170
|
+
*
|
|
1171
|
+
* @example
|
|
1172
|
+
* ```typescript
|
|
1173
|
+
* import { validate } from '@isovision/claude-presentation-master';
|
|
1174
|
+
* import fs from 'fs';
|
|
1175
|
+
*
|
|
1176
|
+
* const html = fs.readFileSync('presentation.html', 'utf-8');
|
|
1177
|
+
* const result = await validate(html, { mode: 'keynote' });
|
|
1178
|
+
*
|
|
1179
|
+
* console.log(`Score: ${result.score}/100`);
|
|
1180
|
+
* console.log(`Passed: ${result.passed}`);
|
|
1181
|
+
* ```
|
|
1182
|
+
*
|
|
1183
|
+
* @param presentation - HTML string or file buffer
|
|
1184
|
+
* @param options - Validation options
|
|
1185
|
+
* @returns QA validation results
|
|
1186
|
+
*/
|
|
1187
|
+
declare function validate(presentation: string | Buffer, options?: {
|
|
1188
|
+
mode?: 'keynote' | 'business';
|
|
1189
|
+
threshold?: number;
|
|
1190
|
+
strictMode?: boolean;
|
|
1191
|
+
}): Promise<QAResults & {
|
|
1192
|
+
score: number;
|
|
1193
|
+
}>;
|
|
1194
|
+
/**
|
|
1195
|
+
* Get the version of the package.
|
|
1196
|
+
*/
|
|
1197
|
+
declare const VERSION = "1.0.0";
|
|
1198
|
+
/**
|
|
1199
|
+
* Default export for convenience.
|
|
1200
|
+
*/
|
|
1201
|
+
declare const _default: {
|
|
1202
|
+
generate: typeof generate;
|
|
1203
|
+
validate: typeof validate;
|
|
1204
|
+
PresentationEngine: typeof PresentationEngine;
|
|
1205
|
+
QAEngine: typeof QAEngine;
|
|
1206
|
+
VERSION: string;
|
|
1207
|
+
};
|
|
1208
|
+
|
|
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 };
|