claude-presentation-master 5.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +2 -2
- package/dist/index.d.mts +375 -162
- package/dist/index.d.ts +375 -162
- package/dist/index.js +1039 -620
- package/dist/index.mjs +1036 -617
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
* Claude Presentation Master - Type Definitions
|
|
3
3
|
* @module types
|
|
4
4
|
*/
|
|
5
|
-
type PresentationMode = 'keynote' | 'business';
|
|
5
|
+
type PresentationMode$1 = 'keynote' | 'business';
|
|
6
6
|
type OutputFormat = 'html' | 'pptx';
|
|
7
7
|
type ThemeName = 'default' | 'light-corporate' | 'modern-tech' | 'minimal' | 'warm' | 'creative';
|
|
8
|
+
type PresentationType$1 = 'ted_keynote' | 'sales_pitch' | 'consulting_deck' | 'investment_banking' | 'investor_pitch' | 'technical_presentation' | 'all_hands';
|
|
8
9
|
interface PresentationConfig {
|
|
9
10
|
/** Input content (Markdown, JSON, YAML, or plain text) */
|
|
10
11
|
content: string;
|
|
11
12
|
/** Content format */
|
|
12
13
|
contentType: 'markdown' | 'json' | 'yaml' | 'text';
|
|
13
14
|
/** Presentation mode: keynote (6-25 words/slide) or business (40-80 words/slide) */
|
|
14
|
-
mode: PresentationMode;
|
|
15
|
+
mode: PresentationMode$1;
|
|
16
|
+
/** Specific presentation type (optional, inferred from mode if not provided) */
|
|
17
|
+
presentationType?: PresentationType$1;
|
|
15
18
|
/** Output formats to generate */
|
|
16
19
|
format: OutputFormat[];
|
|
17
20
|
/** Visual theme */
|
|
@@ -239,7 +242,7 @@ interface PresentationMetadata {
|
|
|
239
242
|
/** Generation timestamp */
|
|
240
243
|
generatedAt: string;
|
|
241
244
|
/** Presentation mode */
|
|
242
|
-
mode: PresentationMode;
|
|
245
|
+
mode: PresentationMode$1;
|
|
243
246
|
/** Total slide count */
|
|
244
247
|
slideCount: number;
|
|
245
248
|
/** Total word count */
|
|
@@ -251,13 +254,41 @@ interface PresentationMetadata {
|
|
|
251
254
|
/** Themes/frameworks used */
|
|
252
255
|
frameworks: string[];
|
|
253
256
|
}
|
|
254
|
-
interface
|
|
257
|
+
interface ContentSection$1 {
|
|
258
|
+
/** Section header text */
|
|
259
|
+
header: string;
|
|
260
|
+
/** Header level (1-6) */
|
|
261
|
+
level: number;
|
|
262
|
+
/** Body content */
|
|
263
|
+
content: string;
|
|
264
|
+
/** Bullet points */
|
|
265
|
+
bullets: string[];
|
|
266
|
+
/** Metrics extracted from section */
|
|
267
|
+
metrics: Array<{
|
|
268
|
+
value: string;
|
|
269
|
+
label: string;
|
|
270
|
+
context?: string;
|
|
271
|
+
}>;
|
|
272
|
+
}
|
|
273
|
+
interface ContentAnalysis$1 {
|
|
274
|
+
/** Detected presentation type */
|
|
275
|
+
detectedType: PresentationType$1;
|
|
276
|
+
/** Main title */
|
|
277
|
+
title: string;
|
|
278
|
+
/** Content sections */
|
|
279
|
+
sections: ContentSection$1[];
|
|
255
280
|
/** SCQA structure extracted */
|
|
256
281
|
scqa: SCQAStructure;
|
|
257
282
|
/** Sparkline narrative arc */
|
|
258
283
|
sparkline: SparklineStructure;
|
|
259
284
|
/** Key messages identified */
|
|
260
285
|
keyMessages: string[];
|
|
286
|
+
/** Data points (metrics, percentages, etc.) */
|
|
287
|
+
dataPoints: Array<{
|
|
288
|
+
value: string;
|
|
289
|
+
label: string;
|
|
290
|
+
context?: string;
|
|
291
|
+
}>;
|
|
261
292
|
/** Generated action titles */
|
|
262
293
|
titles: string[];
|
|
263
294
|
/** STAR moments identified */
|
|
@@ -337,6 +368,194 @@ declare class PresentationEngine {
|
|
|
337
368
|
private detectFrameworks;
|
|
338
369
|
}
|
|
339
370
|
|
|
371
|
+
/**
|
|
372
|
+
* KnowledgeGateway - Central access point to the presentation knowledge base
|
|
373
|
+
*
|
|
374
|
+
* This gateway provides methods to query the knowledge base for:
|
|
375
|
+
* - Presentation mode selection (keynote vs business)
|
|
376
|
+
* - Expert methodology recommendations
|
|
377
|
+
* - Word limits and constraints
|
|
378
|
+
* - Slide templates
|
|
379
|
+
* - Quality metrics
|
|
380
|
+
* - Color palettes
|
|
381
|
+
* - Anti-patterns to avoid
|
|
382
|
+
*
|
|
383
|
+
* The entire presentation engine should query this gateway for EVERY decision.
|
|
384
|
+
*/
|
|
385
|
+
interface PresentationMode {
|
|
386
|
+
name: string;
|
|
387
|
+
use_for: string[];
|
|
388
|
+
characteristics: {
|
|
389
|
+
words_per_slide: string;
|
|
390
|
+
whitespace: string;
|
|
391
|
+
visuals: string;
|
|
392
|
+
structure: string;
|
|
393
|
+
slides_per_idea?: number;
|
|
394
|
+
action_titles?: string;
|
|
395
|
+
};
|
|
396
|
+
experts: string[];
|
|
397
|
+
}
|
|
398
|
+
interface SlideTemplate {
|
|
399
|
+
name: string;
|
|
400
|
+
purpose: string;
|
|
401
|
+
elements?: string[];
|
|
402
|
+
components?: string[];
|
|
403
|
+
word_limit: number;
|
|
404
|
+
}
|
|
405
|
+
interface QualityMetrics {
|
|
406
|
+
keynote_mode: Record<string, {
|
|
407
|
+
threshold?: number;
|
|
408
|
+
required?: boolean;
|
|
409
|
+
description: string;
|
|
410
|
+
}>;
|
|
411
|
+
business_mode: Record<string, {
|
|
412
|
+
threshold?: number;
|
|
413
|
+
required?: boolean;
|
|
414
|
+
description: string;
|
|
415
|
+
}>;
|
|
416
|
+
universal: Record<string, {
|
|
417
|
+
threshold?: number;
|
|
418
|
+
required?: boolean;
|
|
419
|
+
max_items_per_chunk?: number;
|
|
420
|
+
description: string;
|
|
421
|
+
}>;
|
|
422
|
+
}
|
|
423
|
+
interface ColorPalette {
|
|
424
|
+
name: string;
|
|
425
|
+
background: string;
|
|
426
|
+
primary: string;
|
|
427
|
+
secondary: string;
|
|
428
|
+
accent: string;
|
|
429
|
+
text: string;
|
|
430
|
+
use_case: string;
|
|
431
|
+
contrast_ratio: string;
|
|
432
|
+
}
|
|
433
|
+
type PresentationType = 'ted_keynote' | 'sales_pitch' | 'consulting_deck' | 'investment_banking' | 'investor_pitch' | 'technical_presentation' | 'all_hands';
|
|
434
|
+
declare class KnowledgeGateway {
|
|
435
|
+
private kb;
|
|
436
|
+
private loaded;
|
|
437
|
+
constructor();
|
|
438
|
+
/**
|
|
439
|
+
* Load the knowledge base from YAML file
|
|
440
|
+
*/
|
|
441
|
+
load(): Promise<void>;
|
|
442
|
+
/**
|
|
443
|
+
* Get presentation mode configuration (keynote or business)
|
|
444
|
+
*/
|
|
445
|
+
getMode(mode: 'keynote' | 'business'): PresentationMode;
|
|
446
|
+
/**
|
|
447
|
+
* Determine which mode is best for a given presentation type
|
|
448
|
+
*/
|
|
449
|
+
getModeForType(type: PresentationType): 'keynote' | 'business';
|
|
450
|
+
/**
|
|
451
|
+
* Get word limits for the specified mode
|
|
452
|
+
*/
|
|
453
|
+
getWordLimits(mode: 'keynote' | 'business'): {
|
|
454
|
+
min: number;
|
|
455
|
+
max: number;
|
|
456
|
+
ideal: number;
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* Get bullet point limits
|
|
460
|
+
*/
|
|
461
|
+
getBulletLimits(mode: 'keynote' | 'business'): {
|
|
462
|
+
maxBullets: number;
|
|
463
|
+
maxWordsPerBullet: number;
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Get whitespace percentage requirement
|
|
467
|
+
*/
|
|
468
|
+
getWhitespaceRequirement(mode: 'keynote' | 'business'): number;
|
|
469
|
+
/**
|
|
470
|
+
* Get slide templates for the specified mode
|
|
471
|
+
*/
|
|
472
|
+
getSlideTemplates(mode: 'keynote' | 'business'): SlideTemplate[];
|
|
473
|
+
/**
|
|
474
|
+
* Get a specific slide template by name
|
|
475
|
+
*/
|
|
476
|
+
getSlideTemplate(mode: 'keynote' | 'business', templateName: string): SlideTemplate | undefined;
|
|
477
|
+
/**
|
|
478
|
+
* Get quality metrics for grading
|
|
479
|
+
*/
|
|
480
|
+
getQualityMetrics(): QualityMetrics;
|
|
481
|
+
/**
|
|
482
|
+
* Get anti-patterns to avoid
|
|
483
|
+
*/
|
|
484
|
+
getAntiPatterns(mode: 'keynote' | 'business'): string[];
|
|
485
|
+
/**
|
|
486
|
+
* Get data visualization anti-patterns
|
|
487
|
+
*/
|
|
488
|
+
getDataVizAntiPatterns(): string[];
|
|
489
|
+
/**
|
|
490
|
+
* Get accessibility anti-patterns
|
|
491
|
+
*/
|
|
492
|
+
getAccessibilityAntiPatterns(): string[];
|
|
493
|
+
/**
|
|
494
|
+
* Get color palette by name
|
|
495
|
+
*/
|
|
496
|
+
getColorPalette(name: string): ColorPalette | undefined;
|
|
497
|
+
/**
|
|
498
|
+
* Get recommended color palette for presentation type
|
|
499
|
+
*/
|
|
500
|
+
getRecommendedPalette(type: PresentationType): ColorPalette;
|
|
501
|
+
/**
|
|
502
|
+
* Get typography guidelines for mode
|
|
503
|
+
*/
|
|
504
|
+
getTypography(mode: 'keynote' | 'business'): Record<string, string>;
|
|
505
|
+
/**
|
|
506
|
+
* Get story framework by name
|
|
507
|
+
*/
|
|
508
|
+
getStoryFramework(name: 'sparkline' | 'scqa' | 'pyramid' | 'scr'): any;
|
|
509
|
+
/**
|
|
510
|
+
* Get expert principles by name
|
|
511
|
+
*/
|
|
512
|
+
getExpertPrinciples(expertName: string): any;
|
|
513
|
+
/**
|
|
514
|
+
* Get Duarte's glance test requirements
|
|
515
|
+
*/
|
|
516
|
+
getDuarteGlanceTest(): {
|
|
517
|
+
wordLimit: number;
|
|
518
|
+
timeSeconds: number;
|
|
519
|
+
};
|
|
520
|
+
/**
|
|
521
|
+
* Get Miller's Law constraints
|
|
522
|
+
*/
|
|
523
|
+
getMillersLaw(): {
|
|
524
|
+
minItems: number;
|
|
525
|
+
maxItems: number;
|
|
526
|
+
};
|
|
527
|
+
/**
|
|
528
|
+
* Get cognitive load constraints
|
|
529
|
+
*/
|
|
530
|
+
getCognitiveLoadLimits(): {
|
|
531
|
+
maxItemsPerChunk: number;
|
|
532
|
+
};
|
|
533
|
+
/**
|
|
534
|
+
* Get chart selection guidance
|
|
535
|
+
*/
|
|
536
|
+
getChartGuidance(purpose: 'comparison' | 'composition' | 'distribution' | 'relationship'): any;
|
|
537
|
+
/**
|
|
538
|
+
* Get charts to avoid
|
|
539
|
+
*/
|
|
540
|
+
getChartsToAvoid(): string[];
|
|
541
|
+
/**
|
|
542
|
+
* Get investment banking pitch book structure
|
|
543
|
+
*/
|
|
544
|
+
getIBPitchBookStructure(type: 'ma_sell_side' | 'ma_buy_side' | 'ipo_pitchbook'): any;
|
|
545
|
+
/**
|
|
546
|
+
* Check if knowledge base is loaded
|
|
547
|
+
*/
|
|
548
|
+
private ensureLoaded;
|
|
549
|
+
/**
|
|
550
|
+
* Get the full knowledge base (for advanced queries)
|
|
551
|
+
*/
|
|
552
|
+
getRawKB(): any;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Get or create the KnowledgeGateway instance
|
|
556
|
+
*/
|
|
557
|
+
declare function getKnowledgeGateway(): Promise<KnowledgeGateway>;
|
|
558
|
+
|
|
340
559
|
/**
|
|
341
560
|
* Content Analyzer - Extracts Structure from Raw Content
|
|
342
561
|
*
|
|
@@ -344,82 +563,121 @@ declare class PresentationEngine {
|
|
|
344
563
|
* - SCQA structure (Barbara Minto)
|
|
345
564
|
* - Sparkline narrative arc (Nancy Duarte)
|
|
346
565
|
* - Key messages (Rule of Three)
|
|
347
|
-
* -
|
|
348
|
-
* -
|
|
566
|
+
* - Sections with headers, bullets, metrics
|
|
567
|
+
* - Presentation type detection
|
|
568
|
+
*
|
|
569
|
+
* Fully integrated with KnowledgeGateway for expert principles.
|
|
349
570
|
*/
|
|
350
571
|
|
|
572
|
+
interface ContentSection {
|
|
573
|
+
header: string;
|
|
574
|
+
level: number;
|
|
575
|
+
content: string;
|
|
576
|
+
bullets: string[];
|
|
577
|
+
metrics: Array<{
|
|
578
|
+
value: string;
|
|
579
|
+
label: string;
|
|
580
|
+
context?: string;
|
|
581
|
+
}>;
|
|
582
|
+
}
|
|
583
|
+
interface ContentAnalysis {
|
|
584
|
+
detectedType: PresentationType;
|
|
585
|
+
title: string;
|
|
586
|
+
sections: ContentSection[];
|
|
587
|
+
keyMessages: string[];
|
|
588
|
+
dataPoints: Array<{
|
|
589
|
+
value: string;
|
|
590
|
+
label: string;
|
|
591
|
+
context?: string;
|
|
592
|
+
}>;
|
|
593
|
+
scqa: {
|
|
594
|
+
situation: string;
|
|
595
|
+
complication: string;
|
|
596
|
+
question: string;
|
|
597
|
+
answer: string;
|
|
598
|
+
};
|
|
599
|
+
sparkline: {
|
|
600
|
+
whatIs: string[];
|
|
601
|
+
whatCouldBe: string[];
|
|
602
|
+
callToAdventure: string;
|
|
603
|
+
};
|
|
604
|
+
titles: string[];
|
|
605
|
+
starMoments: string[];
|
|
606
|
+
estimatedSlideCount: number;
|
|
607
|
+
}
|
|
351
608
|
declare class ContentAnalyzer {
|
|
609
|
+
private kb;
|
|
352
610
|
private readonly situationSignals;
|
|
353
611
|
private readonly complicationSignals;
|
|
354
|
-
private readonly questionSignals;
|
|
355
612
|
private readonly answerSignals;
|
|
356
|
-
private readonly
|
|
357
|
-
private readonly
|
|
613
|
+
private readonly ctaSignals;
|
|
614
|
+
private readonly typeSignals;
|
|
615
|
+
initialize(): Promise<void>;
|
|
358
616
|
/**
|
|
359
617
|
* Analyze content and extract structural elements.
|
|
360
618
|
*/
|
|
361
619
|
analyze(content: string, contentType: string): Promise<ContentAnalysis>;
|
|
362
620
|
/**
|
|
363
|
-
* Parse content based on
|
|
621
|
+
* Parse content based on type
|
|
364
622
|
*/
|
|
365
623
|
private parseContent;
|
|
366
624
|
/**
|
|
367
|
-
*
|
|
625
|
+
* Extract the main title from content
|
|
368
626
|
*/
|
|
369
|
-
private
|
|
627
|
+
private extractTitle;
|
|
370
628
|
/**
|
|
371
|
-
*
|
|
629
|
+
* Detect presentation type from content signals
|
|
372
630
|
*/
|
|
373
|
-
private
|
|
631
|
+
private detectPresentationType;
|
|
374
632
|
/**
|
|
375
|
-
*
|
|
633
|
+
* Extract sections from content (headers, bullets, content)
|
|
376
634
|
*/
|
|
377
|
-
private
|
|
635
|
+
private extractSections;
|
|
378
636
|
/**
|
|
379
|
-
*
|
|
637
|
+
* Extract SCQA structure (Barbara Minto)
|
|
380
638
|
*/
|
|
381
|
-
private
|
|
382
|
-
/**
|
|
383
|
-
* Split text into paragraphs.
|
|
384
|
-
*/
|
|
385
|
-
private splitIntoParagraphs;
|
|
386
|
-
/**
|
|
387
|
-
* Split text into sentences.
|
|
388
|
-
*/
|
|
389
|
-
private splitIntoSentences;
|
|
639
|
+
private extractSCQA;
|
|
390
640
|
/**
|
|
391
|
-
* Extract
|
|
641
|
+
* Extract STAR moments (Something They'll Always Remember)
|
|
642
|
+
* Per Nancy Duarte: These should be memorable, COMPLETE thoughts with impact
|
|
643
|
+
*
|
|
644
|
+
* CRITICAL REQUIREMENTS:
|
|
645
|
+
* - Must be complete sentences with subject + verb structure
|
|
646
|
+
* - Must have 5+ words minimum (no fragments!)
|
|
647
|
+
* - Must be 30+ characters
|
|
648
|
+
* - Must contain a verb
|
|
649
|
+
* - NOT fragments like "significant growth" or "cloud-first strategy"
|
|
650
|
+
* - NOT headers or topic labels
|
|
392
651
|
*/
|
|
393
|
-
private
|
|
652
|
+
private extractStarMoments;
|
|
394
653
|
/**
|
|
395
|
-
* Extract Sparkline
|
|
654
|
+
* Extract Sparkline elements (Nancy Duarte)
|
|
396
655
|
*/
|
|
397
656
|
private extractSparkline;
|
|
398
657
|
/**
|
|
399
|
-
* Extract key messages
|
|
658
|
+
* Extract key messages - the actual insights from the content
|
|
659
|
+
* Per Carmine Gallo: Rule of Three - max 3 key messages
|
|
660
|
+
* Per Barbara Minto: Messages should be actionable conclusions, not topics
|
|
400
661
|
*/
|
|
401
662
|
private extractKeyMessages;
|
|
402
663
|
/**
|
|
403
|
-
*
|
|
664
|
+
* Extract data points (metrics with values)
|
|
665
|
+
* IMPROVED: Smarter label extraction that understands markdown tables
|
|
404
666
|
*/
|
|
405
|
-
private
|
|
667
|
+
private extractDataPoints;
|
|
406
668
|
/**
|
|
407
|
-
*
|
|
669
|
+
* Extract a meaningful label from a line containing a metric
|
|
408
670
|
*/
|
|
409
|
-
private
|
|
671
|
+
private extractLabelFromLine;
|
|
410
672
|
/**
|
|
411
|
-
*
|
|
673
|
+
* Check if text contains any of the signals
|
|
412
674
|
*/
|
|
413
|
-
private
|
|
675
|
+
private containsSignals;
|
|
414
676
|
/**
|
|
415
|
-
*
|
|
677
|
+
* Extract first meaningful sentence from text
|
|
678
|
+
* CRITICAL: Must strip headers, CTA text, and fragments
|
|
416
679
|
*/
|
|
417
|
-
private
|
|
418
|
-
private containsSignals;
|
|
419
|
-
private extractRelevantSentence;
|
|
420
|
-
private truncateToSentence;
|
|
421
|
-
private truncateToWords;
|
|
422
|
-
private capitalizeFirst;
|
|
680
|
+
private extractFirstSentence;
|
|
423
681
|
}
|
|
424
682
|
|
|
425
683
|
/**
|
|
@@ -433,11 +691,43 @@ declare class ContentAnalyzer {
|
|
|
433
691
|
|
|
434
692
|
declare class SlideFactory {
|
|
435
693
|
private readonly templates;
|
|
694
|
+
private usedContent;
|
|
436
695
|
constructor();
|
|
696
|
+
/**
|
|
697
|
+
* Check if content has already been used (deduplication)
|
|
698
|
+
*/
|
|
699
|
+
private isContentUsed;
|
|
437
700
|
/**
|
|
438
701
|
* Create slides from analyzed content.
|
|
702
|
+
*
|
|
703
|
+
* ARCHITECTURE (per KB expert methodologies):
|
|
704
|
+
* 1. Title slide - always first
|
|
705
|
+
* 2. Agenda slide - business mode only with 3+ sections
|
|
706
|
+
* 3. SCQA slides - Situation, Complication (per Minto)
|
|
707
|
+
* 4. Content slides - from sections with bullets/content
|
|
708
|
+
* 5. Metrics slide - if data points exist
|
|
709
|
+
* 6. Solution slide - SCQA answer
|
|
710
|
+
* 7. STAR moments - only if high-quality (per Duarte)
|
|
711
|
+
* 8. CTA slide - if call to action exists
|
|
712
|
+
* 9. Thank you slide - always last
|
|
713
|
+
*/
|
|
714
|
+
createSlides(analysis: ContentAnalysis$1, mode: PresentationMode$1): Promise<Slide[]>;
|
|
715
|
+
/**
|
|
716
|
+
* Create a slide from a section with bullets
|
|
717
|
+
*/
|
|
718
|
+
private createSectionBulletSlide;
|
|
719
|
+
/**
|
|
720
|
+
* Create a slide from a section with body content
|
|
721
|
+
*/
|
|
722
|
+
private createSectionContentSlide;
|
|
723
|
+
/**
|
|
724
|
+
* Extract first sentence from text
|
|
725
|
+
*/
|
|
726
|
+
private extractFirstSentence;
|
|
727
|
+
/**
|
|
728
|
+
* Create a metrics slide from data points
|
|
439
729
|
*/
|
|
440
|
-
|
|
730
|
+
private createMetricsSlide;
|
|
441
731
|
/**
|
|
442
732
|
* Create a title slide.
|
|
443
733
|
*/
|
|
@@ -479,11 +769,13 @@ declare class SlideFactory {
|
|
|
479
769
|
*/
|
|
480
770
|
private initializeTemplates;
|
|
481
771
|
/**
|
|
482
|
-
* Clean text by removing all content markers.
|
|
772
|
+
* Clean text by removing all markdown and content markers.
|
|
773
|
+
* CRITICAL: Must strip all formatting to prevent garbage in slides
|
|
483
774
|
*/
|
|
484
775
|
private cleanText;
|
|
485
776
|
/**
|
|
486
|
-
* Truncate text to max length at
|
|
777
|
+
* Truncate text to max length at sentence boundary when possible.
|
|
778
|
+
* CRITICAL: Never cut mid-number (99.5% should not become 99.)
|
|
487
779
|
*/
|
|
488
780
|
private truncate;
|
|
489
781
|
/**
|
|
@@ -495,7 +787,7 @@ declare class SlideFactory {
|
|
|
495
787
|
*/
|
|
496
788
|
private extractBullets;
|
|
497
789
|
/**
|
|
498
|
-
* Remove a statistic from text.
|
|
790
|
+
* Remove a statistic from text and clean thoroughly.
|
|
499
791
|
*/
|
|
500
792
|
private removeStatistic;
|
|
501
793
|
}
|
|
@@ -633,19 +925,27 @@ declare class ScoreCalculator {
|
|
|
633
925
|
}
|
|
634
926
|
|
|
635
927
|
/**
|
|
636
|
-
* QA Engine - Real Visual Quality Validation
|
|
928
|
+
* QA Engine - Real Visual Quality Validation with KB-Driven Metrics
|
|
637
929
|
*
|
|
930
|
+
* Uses KnowledgeGateway for ALL quality thresholds and expert principles.
|
|
638
931
|
* Unlike fake validation systems, this engine ACTUALLY tests:
|
|
639
932
|
* - Visual quality using Playwright screenshots + Canvas API
|
|
640
933
|
* - Layout balance and whitespace distribution
|
|
641
934
|
* - WCAG contrast compliance
|
|
642
|
-
* - Expert methodology adherence
|
|
935
|
+
* - Expert methodology adherence (Duarte, Reynolds, Gallo, Anderson)
|
|
936
|
+
*
|
|
937
|
+
* CRITICAL: All thresholds come from the knowledge base
|
|
643
938
|
*/
|
|
644
939
|
|
|
645
940
|
declare class QAEngine {
|
|
646
941
|
private browser;
|
|
942
|
+
private kb;
|
|
943
|
+
/**
|
|
944
|
+
* Initialize KnowledgeGateway
|
|
945
|
+
*/
|
|
946
|
+
private initialize;
|
|
647
947
|
/**
|
|
648
|
-
* Validate a presentation
|
|
948
|
+
* Validate a presentation using KB-driven quality metrics
|
|
649
949
|
*/
|
|
650
950
|
validate(presentation: string | Buffer, options?: {
|
|
651
951
|
mode?: 'keynote' | 'business';
|
|
@@ -653,7 +953,7 @@ declare class QAEngine {
|
|
|
653
953
|
threshold?: number;
|
|
654
954
|
}): Promise<QAResults>;
|
|
655
955
|
/**
|
|
656
|
-
* Calculate overall QA score
|
|
956
|
+
* Calculate overall QA score using KB-driven weights
|
|
657
957
|
*/
|
|
658
958
|
calculateScore(results: QAResults): number;
|
|
659
959
|
/**
|
|
@@ -663,7 +963,10 @@ declare class QAEngine {
|
|
|
663
963
|
private runVisualTests;
|
|
664
964
|
private runContentTests;
|
|
665
965
|
private runExpertTests;
|
|
666
|
-
private
|
|
966
|
+
private validateDuartePrinciples;
|
|
967
|
+
private validateReynoldsPrinciples;
|
|
968
|
+
private validateGalloPrinciples;
|
|
969
|
+
private validateAndersonPrinciples;
|
|
667
970
|
private runAccessibilityTests;
|
|
668
971
|
private calculateVisualScore;
|
|
669
972
|
private calculateContentScore;
|
|
@@ -678,32 +981,47 @@ declare class QAEngine {
|
|
|
678
981
|
* Reveal.js Generator - HTML Presentation Output
|
|
679
982
|
*
|
|
680
983
|
* Generates complete Reveal.js presentations with:
|
|
984
|
+
* - KB-driven color palettes and typography
|
|
681
985
|
* - Responsive layouts
|
|
682
986
|
* - Animations
|
|
683
987
|
* - Speaker notes
|
|
684
|
-
* - Custom themes
|
|
685
988
|
* - Chart.js integration
|
|
686
989
|
* - Mermaid diagrams
|
|
990
|
+
*
|
|
991
|
+
* CRITICAL: All design decisions come from KnowledgeGateway
|
|
687
992
|
*/
|
|
688
993
|
|
|
689
994
|
declare class RevealJsGenerator {
|
|
690
995
|
private templateEngine;
|
|
996
|
+
private kb;
|
|
691
997
|
private defaultRevealConfig;
|
|
692
998
|
constructor();
|
|
999
|
+
/**
|
|
1000
|
+
* Initialize KnowledgeGateway
|
|
1001
|
+
*/
|
|
1002
|
+
private initialize;
|
|
693
1003
|
/**
|
|
694
1004
|
* Generate complete Reveal.js HTML presentation.
|
|
695
1005
|
*/
|
|
696
1006
|
generate(slides: Slide[], config: PresentationConfig): Promise<string>;
|
|
1007
|
+
/**
|
|
1008
|
+
* Detect presentation type from config
|
|
1009
|
+
*/
|
|
1010
|
+
private detectPresentationType;
|
|
697
1011
|
/**
|
|
698
1012
|
* Build the complete HTML document.
|
|
699
1013
|
*/
|
|
700
1014
|
private buildDocument;
|
|
701
1015
|
/**
|
|
702
|
-
* Get base styles for slides
|
|
1016
|
+
* Get base styles for slides - KB-DRIVEN
|
|
703
1017
|
*/
|
|
704
1018
|
private getBaseStyles;
|
|
705
1019
|
/**
|
|
706
|
-
*
|
|
1020
|
+
* Lighten a hex color
|
|
1021
|
+
*/
|
|
1022
|
+
private lightenColor;
|
|
1023
|
+
/**
|
|
1024
|
+
* Get theme-specific styles - KB-DRIVEN
|
|
707
1025
|
*/
|
|
708
1026
|
private getThemeStyles;
|
|
709
1027
|
/**
|
|
@@ -1026,111 +1344,6 @@ declare class CompositeChartProvider implements ChartProvider {
|
|
|
1026
1344
|
*/
|
|
1027
1345
|
declare function createDefaultChartProvider(): CompositeChartProvider;
|
|
1028
1346
|
|
|
1029
|
-
/**
|
|
1030
|
-
* Knowledge Base - RuVector Expert Principles Loader
|
|
1031
|
-
*
|
|
1032
|
-
* Loads and provides access to the 6,300+ line expert knowledge base
|
|
1033
|
-
* containing methodologies from 40+ presentation experts.
|
|
1034
|
-
*
|
|
1035
|
-
* This runs WITHOUT any API - it's static data bundled with the package.
|
|
1036
|
-
*/
|
|
1037
|
-
interface ExpertPrinciple {
|
|
1038
|
-
name: string;
|
|
1039
|
-
description: string;
|
|
1040
|
-
validation?: string[];
|
|
1041
|
-
examples?: string[];
|
|
1042
|
-
}
|
|
1043
|
-
interface ExpertMethodology {
|
|
1044
|
-
name: string;
|
|
1045
|
-
principles: ExpertPrinciple[];
|
|
1046
|
-
slideTypes?: string[];
|
|
1047
|
-
wordLimits?: {
|
|
1048
|
-
min?: number;
|
|
1049
|
-
max?: number;
|
|
1050
|
-
};
|
|
1051
|
-
}
|
|
1052
|
-
interface AutomatedQA {
|
|
1053
|
-
scoringRubric: {
|
|
1054
|
-
totalPoints: number;
|
|
1055
|
-
passingThreshold: number;
|
|
1056
|
-
categories: Record<string, {
|
|
1057
|
-
weight: number;
|
|
1058
|
-
checks: Record<string, unknown>;
|
|
1059
|
-
}>;
|
|
1060
|
-
};
|
|
1061
|
-
}
|
|
1062
|
-
declare class KnowledgeBase {
|
|
1063
|
-
private data;
|
|
1064
|
-
private loaded;
|
|
1065
|
-
/**
|
|
1066
|
-
* Load the knowledge base from the bundled YAML file.
|
|
1067
|
-
*/
|
|
1068
|
-
load(): Promise<void>;
|
|
1069
|
-
/**
|
|
1070
|
-
* Get expert methodology by name.
|
|
1071
|
-
*/
|
|
1072
|
-
getExpert(name: string): ExpertMethodology | undefined;
|
|
1073
|
-
/**
|
|
1074
|
-
* Get all expert names.
|
|
1075
|
-
*/
|
|
1076
|
-
getExpertNames(): string[];
|
|
1077
|
-
/**
|
|
1078
|
-
* Get framework recommendation for audience.
|
|
1079
|
-
*/
|
|
1080
|
-
getFrameworkForAudience(audience: string): {
|
|
1081
|
-
primaryFramework: string;
|
|
1082
|
-
secondaryFramework?: string;
|
|
1083
|
-
slideTypes: string[];
|
|
1084
|
-
} | undefined;
|
|
1085
|
-
/**
|
|
1086
|
-
* Get framework recommendation for goal.
|
|
1087
|
-
*/
|
|
1088
|
-
getFrameworkForGoal(goal: string): {
|
|
1089
|
-
primaryFramework: string;
|
|
1090
|
-
secondaryFramework?: string;
|
|
1091
|
-
slideTypes: string[];
|
|
1092
|
-
} | undefined;
|
|
1093
|
-
/**
|
|
1094
|
-
* Get QA scoring rubric.
|
|
1095
|
-
*/
|
|
1096
|
-
getScoringRubric(): AutomatedQA['scoringRubric'] | undefined;
|
|
1097
|
-
/**
|
|
1098
|
-
* Get mode configuration (keynote or business).
|
|
1099
|
-
*/
|
|
1100
|
-
getModeConfig(mode: 'keynote' | 'business'): unknown;
|
|
1101
|
-
/**
|
|
1102
|
-
* Get slide type configuration.
|
|
1103
|
-
*/
|
|
1104
|
-
getSlideType(type: string): unknown;
|
|
1105
|
-
/**
|
|
1106
|
-
* Get the knowledge base version.
|
|
1107
|
-
*/
|
|
1108
|
-
getVersion(): string;
|
|
1109
|
-
/**
|
|
1110
|
-
* Validate a slide against expert principles.
|
|
1111
|
-
*/
|
|
1112
|
-
validateAgainstExpert(expertName: string, slideData: {
|
|
1113
|
-
wordCount: number;
|
|
1114
|
-
hasActionTitle: boolean;
|
|
1115
|
-
bulletCount: number;
|
|
1116
|
-
}): {
|
|
1117
|
-
passed: boolean;
|
|
1118
|
-
violations: string[];
|
|
1119
|
-
};
|
|
1120
|
-
/**
|
|
1121
|
-
* Ensure knowledge base is loaded.
|
|
1122
|
-
*/
|
|
1123
|
-
private ensureLoaded;
|
|
1124
|
-
/**
|
|
1125
|
-
* Get default data if YAML can't be loaded.
|
|
1126
|
-
*/
|
|
1127
|
-
private getDefaultData;
|
|
1128
|
-
}
|
|
1129
|
-
/**
|
|
1130
|
-
* Get the knowledge base singleton.
|
|
1131
|
-
*/
|
|
1132
|
-
declare function getKnowledgeBase(): KnowledgeBase;
|
|
1133
|
-
|
|
1134
1347
|
/**
|
|
1135
1348
|
* Claude Presentation Master
|
|
1136
1349
|
*
|
|
@@ -1198,7 +1411,7 @@ declare function validate(presentation: string | Buffer, options?: {
|
|
|
1198
1411
|
/**
|
|
1199
1412
|
* Get the version of the package.
|
|
1200
1413
|
*/
|
|
1201
|
-
declare const VERSION = "
|
|
1414
|
+
declare const VERSION = "6.0.0";
|
|
1202
1415
|
/**
|
|
1203
1416
|
* Default export for convenience.
|
|
1204
1417
|
*/
|
|
@@ -1210,4 +1423,4 @@ declare const _default: {
|
|
|
1210
1423
|
VERSION: string;
|
|
1211
1424
|
};
|
|
1212
1425
|
|
|
1213
|
-
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,
|
|
1426
|
+
export { type AccessibilityResults, type ChartData, type ChartDataset, ChartJsProvider, type ChartProvider, type ChartRequest, type ChartResult, type ChartType, type ColorPalette, CompositeChartProvider, CompositeImageProvider, type ContentAnalysis$1 as ContentAnalysis, ContentAnalyzer, type ContentQAResults, type ContentSection$1 as ContentSection, type ContrastIssue, type ExpertQAResults, type ExpertValidation, type FontSizeIssue, type GlanceTestResult, type ImageData, type ImageProvider, type ImageRequest, type ImageResult, KnowledgeGateway, LocalImageProvider, MermaidProvider, type MetricData, type OneIdeaResult, type OutputFormat, PlaceholderImageProvider, PowerPointGenerator, type PresentationConfig, PresentationEngine, type PresentationMetadata, type PresentationMode$1 as PresentationMode, type PresentationResult, type PresentationType, QAEngine, QAFailureError, type QAIssue, type QAResults, QuickChartProvider, RevealJsGenerator, type SCQAStructure, ScoreCalculator, type SignalNoiseResult, type Slide, type SlideContentScore, type SlideData, SlideFactory, type SlideTemplate, type SlideType, type SlideVisualScore, type SparklineStructure, TemplateEngine, TemplateNotFoundError, type ThemeName, UnsplashImageProvider, VERSION, ValidationError, type VisualQAResults, createDefaultChartProvider, createDefaultImageProvider, _default as default, generate, getKnowledgeGateway, validate };
|