claude-presentation-master 3.8.7 → 3.9.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
@@ -714,9 +714,20 @@ declare class SlideGeneratorV2 {
714
714
  * RULES:
715
715
  * 1. Tables ALWAYS become table slides - NEVER extract to metrics
716
716
  * 2. Empty sections are SKIPPED - no blank divider slides
717
- * 3. Sections with minimal content are combined into statement slides
717
+ * 3. H3 headings become individual slides with ACTION TITLES (critical for consulting)
718
+ * 4. Sections with minimal content are combined into statement slides
718
719
  */
719
720
  private processSectionContent;
721
+ /**
722
+ * Split tokens into subsections based on H3 headers.
723
+ * H3 headers become ACTION TITLES for consulting decks.
724
+ */
725
+ private splitIntoSubsections;
726
+ /**
727
+ * Process a subsection (H3) into a slide.
728
+ * The H3 title IS the action title.
729
+ */
730
+ private processSubsection;
720
731
  /**
721
732
  * Create a table slide - render the table as-is, no extraction.
722
733
  */
@@ -758,6 +769,264 @@ declare class SlideGeneratorV2 {
758
769
  }
759
770
  declare function createSlideGeneratorV2(type?: PresentationType): SlideGeneratorV2;
760
771
 
772
+ /**
773
+ * Renderer V2 - Clean, Professional, No Garbage
774
+ *
775
+ * Renders slides to HTML and PDF with:
776
+ * - Tables as actual tables (not mangled metrics)
777
+ * - Complete bullets (never truncated)
778
+ * - Clean professional CSS (no random stock photos)
779
+ * - McKinsey/BCG consulting style (WHITE background, strong hierarchy)
780
+ * - Automatic PDF generation alongside HTML
781
+ */
782
+
783
+ type ThemeStyle = 'mckinsey' | 'dark' | 'minimal' | 'corporate' | 'startup';
784
+ declare class RendererV2 {
785
+ private theme;
786
+ private presentationType;
787
+ /**
788
+ * Create renderer with theme based on presentation type.
789
+ * @param presentationType - The type of deck being created (determines theme)
790
+ * @param themeOverride - Optional explicit theme override
791
+ */
792
+ constructor(presentationType?: PresentationType, themeOverride?: ThemeStyle);
793
+ /**
794
+ * Render slides to complete HTML document.
795
+ */
796
+ render(slides: SlideV2[], title?: string): string;
797
+ /**
798
+ * Render slides to both HTML and PDF files.
799
+ * Always generates both formats for easy sharing.
800
+ */
801
+ renderToFiles(slides: SlideV2[], outputPath: string, title?: string): Promise<{
802
+ htmlPath: string;
803
+ pdfPath: string;
804
+ }>;
805
+ /**
806
+ * Render slides directly to PDF using Puppeteer.
807
+ * Creates a printable PDF with one slide per page.
808
+ */
809
+ renderToPDF(slides: SlideV2[], outputPath: string, title?: string): Promise<Uint8Array>;
810
+ /**
811
+ * Render HTML optimized for PDF printing (no reveal.js, static pages).
812
+ */
813
+ private renderForPrint;
814
+ /**
815
+ * McKinsey-style print HTML (white background, professional).
816
+ */
817
+ private getMcKinseyPrintHTML;
818
+ /**
819
+ * Dark theme print HTML (legacy).
820
+ */
821
+ private getDarkPrintHTML;
822
+ /**
823
+ * Render slide content (shared between HTML and PDF renderers).
824
+ */
825
+ private renderSlideContent;
826
+ /**
827
+ * Render a single slide.
828
+ */
829
+ private renderSlide;
830
+ /**
831
+ * Title slide - big, bold, centered.
832
+ */
833
+ private renderTitleSlide;
834
+ /**
835
+ * Section divider - transition slide.
836
+ */
837
+ private renderSectionSlide;
838
+ /**
839
+ * Bullet slide - the workhorse.
840
+ */
841
+ private renderBulletSlide;
842
+ /**
843
+ * Table slide - render tables properly.
844
+ */
845
+ private renderTableSlide;
846
+ /**
847
+ * Render a table as clean HTML.
848
+ */
849
+ private renderTable;
850
+ /**
851
+ * Metrics slide - big numbers with labels.
852
+ */
853
+ private renderMetricsSlide;
854
+ /**
855
+ * Statement slide - single powerful message.
856
+ */
857
+ private renderStatementSlide;
858
+ /**
859
+ * Call to action slide.
860
+ */
861
+ private renderCTASlide;
862
+ /**
863
+ * Thank you slide.
864
+ */
865
+ private renderThankYouSlide;
866
+ /**
867
+ * Format bullet text - handle bold, arrows, etc.
868
+ */
869
+ private formatBulletText;
870
+ /**
871
+ * Escape HTML special characters.
872
+ */
873
+ private escapeHtml;
874
+ /**
875
+ * Professional CSS - McKinsey/BCG consulting style.
876
+ */
877
+ private getCSS;
878
+ /**
879
+ * McKinsey/BCG Consulting Style - WHITE background, professional hierarchy.
880
+ */
881
+ private getMcKinseyCSS;
882
+ /**
883
+ * Dark theme CSS (legacy).
884
+ */
885
+ private getDarkCSS;
886
+ }
887
+ /**
888
+ * Create a renderer with theme matched to the presentation type.
889
+ *
890
+ * @param presentationType - Type of deck (consulting_deck, keynote, etc.)
891
+ * @param themeOverride - Optional explicit theme to use instead of auto-mapping
892
+ *
893
+ * Theme mapping:
894
+ * - consulting_deck, board_presentation, internal_update → McKinsey (white, professional)
895
+ * - keynote, sales_pitch, technical → Dark (dramatic)
896
+ * - training, workshop, all_hands → Minimal (clean, readable)
897
+ * - product_demo, investor_pitch → Startup (modern dark)
898
+ * - executive_briefing → Corporate (professional)
899
+ */
900
+ declare function createRendererV2(presentationType?: PresentationType, themeOverride?: ThemeStyle): RendererV2;
901
+
902
+ /**
903
+ * PresentationEngineV2 - Knowledge-Driven Excellence
904
+ *
905
+ * This engine orchestrates the ENTIRE presentation creation flow:
906
+ * 1. Analyze content to detect presentation type
907
+ * 2. Load design specs from Knowledge Base
908
+ * 3. Generate slides following expert methodologies
909
+ * 4. Enhance with images (optional, needs API key)
910
+ * 5. Review ruthlessly (must score 95/100+)
911
+ * 6. Output ONLY if quality passes
912
+ *
913
+ * The Knowledge Base drives EVERYTHING:
914
+ * - Presentation type detection
915
+ * - Design specs (colors, fonts, spacing)
916
+ * - Slide structure and word limits
917
+ * - Quality criteria and scoring
918
+ */
919
+
920
+ interface DesignSpecs {
921
+ wordsPerSlide: {
922
+ min: number;
923
+ max: number;
924
+ ideal: number;
925
+ };
926
+ whitespace: string;
927
+ bulletPoints: {
928
+ max: number;
929
+ };
930
+ fonts: {
931
+ title: number;
932
+ body: number;
933
+ minimum: number;
934
+ };
935
+ theme: ThemeStyle;
936
+ structure: string;
937
+ experts: string[];
938
+ }
939
+ interface SlideReview {
940
+ slideIndex: number;
941
+ title: string;
942
+ score: number;
943
+ issues: string[];
944
+ suggestions: string[];
945
+ passed: boolean;
946
+ }
947
+ interface DeckReview {
948
+ overallScore: number;
949
+ slideReviews: SlideReview[];
950
+ deckIssues: string[];
951
+ flow: 'excellent' | 'good' | 'needs_work' | 'poor';
952
+ passed: boolean;
953
+ summary: string;
954
+ }
955
+ interface EngineOptions {
956
+ /** Override detected presentation type */
957
+ presentationType?: PresentationType;
958
+ /** Override theme selection */
959
+ themeOverride?: ThemeStyle;
960
+ /** API key for image generation (optional) */
961
+ imageApiKey?: string;
962
+ /** Minimum quality score (default: 95) */
963
+ minScore?: number;
964
+ /** Enable verbose logging */
965
+ verbose?: boolean;
966
+ /** Maximum remediation attempts per slide */
967
+ maxRemediationAttempts?: number;
968
+ }
969
+ interface EngineResult {
970
+ slides: SlideV2[];
971
+ html: string;
972
+ pdfPath?: string;
973
+ presentationType: PresentationType;
974
+ designSpecs: DesignSpecs;
975
+ review: DeckReview;
976
+ warnings: string[];
977
+ }
978
+ declare class PresentationEngineV2 {
979
+ private options;
980
+ constructor(options?: EngineOptions);
981
+ private log;
982
+ /**
983
+ * Generate a world-class presentation from markdown content.
984
+ * Follows knowledge base specs and demands 95+ quality score.
985
+ */
986
+ generate(markdown: string, title?: string): Promise<EngineResult>;
987
+ /**
988
+ * Detect presentation type from content analysis.
989
+ */
990
+ private detectPresentationType;
991
+ /**
992
+ * Should we recommend images for this presentation?
993
+ */
994
+ private shouldRecommendImages;
995
+ /**
996
+ * Ruthlessly review the deck against knowledge base criteria.
997
+ */
998
+ private reviewDeck;
999
+ /**
1000
+ * Review a single slide against quality criteria.
1001
+ */
1002
+ private reviewSlide;
1003
+ /**
1004
+ * Check if title is an action/insight title vs. just a topic.
1005
+ */
1006
+ private isActionTitle;
1007
+ /**
1008
+ * Assess the flow and narrative structure of the deck.
1009
+ */
1010
+ private assessFlow;
1011
+ /**
1012
+ * Attempt to remediate failing slides.
1013
+ */
1014
+ private remediateSlides;
1015
+ /**
1016
+ * Count words in a slide.
1017
+ */
1018
+ private countWords;
1019
+ }
1020
+ declare function createPresentationEngineV2(options?: EngineOptions): PresentationEngineV2;
1021
+ /**
1022
+ * Generate a presentation with automatic type detection and ruthless quality control.
1023
+ * Throws if quality score is below 95/100.
1024
+ */
1025
+ declare function generatePresentation(markdown: string, options?: EngineOptions & {
1026
+ title?: string;
1027
+ outputPath?: string;
1028
+ }): Promise<EngineResult>;
1029
+
761
1030
  /**
762
1031
  * VisualDesignSystem - KB-Driven Visual Design Configuration
763
1032
  *
@@ -1293,136 +1562,6 @@ declare class Renderer {
1293
1562
  declare function getRenderer(): Renderer;
1294
1563
  declare function initRenderer(): Promise<Renderer>;
1295
1564
 
1296
- /**
1297
- * Renderer V2 - Clean, Professional, No Garbage
1298
- *
1299
- * Renders slides to HTML and PDF with:
1300
- * - Tables as actual tables (not mangled metrics)
1301
- * - Complete bullets (never truncated)
1302
- * - Clean professional CSS (no random stock photos)
1303
- * - McKinsey/BCG consulting style (WHITE background, strong hierarchy)
1304
- * - Automatic PDF generation alongside HTML
1305
- */
1306
-
1307
- type ThemeStyle = 'mckinsey' | 'dark' | 'minimal' | 'corporate' | 'startup';
1308
- declare class RendererV2 {
1309
- private theme;
1310
- private presentationType;
1311
- /**
1312
- * Create renderer with theme based on presentation type.
1313
- * @param presentationType - The type of deck being created (determines theme)
1314
- * @param themeOverride - Optional explicit theme override
1315
- */
1316
- constructor(presentationType?: PresentationType, themeOverride?: ThemeStyle);
1317
- /**
1318
- * Render slides to complete HTML document.
1319
- */
1320
- render(slides: SlideV2[], title?: string): string;
1321
- /**
1322
- * Render slides to both HTML and PDF files.
1323
- * Always generates both formats for easy sharing.
1324
- */
1325
- renderToFiles(slides: SlideV2[], outputPath: string, title?: string): Promise<{
1326
- htmlPath: string;
1327
- pdfPath: string;
1328
- }>;
1329
- /**
1330
- * Render slides directly to PDF using Puppeteer.
1331
- * Creates a printable PDF with one slide per page.
1332
- */
1333
- renderToPDF(slides: SlideV2[], outputPath: string, title?: string): Promise<Uint8Array>;
1334
- /**
1335
- * Render HTML optimized for PDF printing (no reveal.js, static pages).
1336
- */
1337
- private renderForPrint;
1338
- /**
1339
- * McKinsey-style print HTML (white background, professional).
1340
- */
1341
- private getMcKinseyPrintHTML;
1342
- /**
1343
- * Dark theme print HTML (legacy).
1344
- */
1345
- private getDarkPrintHTML;
1346
- /**
1347
- * Render slide content (shared between HTML and PDF renderers).
1348
- */
1349
- private renderSlideContent;
1350
- /**
1351
- * Render a single slide.
1352
- */
1353
- private renderSlide;
1354
- /**
1355
- * Title slide - big, bold, centered.
1356
- */
1357
- private renderTitleSlide;
1358
- /**
1359
- * Section divider - transition slide.
1360
- */
1361
- private renderSectionSlide;
1362
- /**
1363
- * Bullet slide - the workhorse.
1364
- */
1365
- private renderBulletSlide;
1366
- /**
1367
- * Table slide - render tables properly.
1368
- */
1369
- private renderTableSlide;
1370
- /**
1371
- * Render a table as clean HTML.
1372
- */
1373
- private renderTable;
1374
- /**
1375
- * Metrics slide - big numbers with labels.
1376
- */
1377
- private renderMetricsSlide;
1378
- /**
1379
- * Statement slide - single powerful message.
1380
- */
1381
- private renderStatementSlide;
1382
- /**
1383
- * Call to action slide.
1384
- */
1385
- private renderCTASlide;
1386
- /**
1387
- * Thank you slide.
1388
- */
1389
- private renderThankYouSlide;
1390
- /**
1391
- * Format bullet text - handle bold, arrows, etc.
1392
- */
1393
- private formatBulletText;
1394
- /**
1395
- * Escape HTML special characters.
1396
- */
1397
- private escapeHtml;
1398
- /**
1399
- * Professional CSS - McKinsey/BCG consulting style.
1400
- */
1401
- private getCSS;
1402
- /**
1403
- * McKinsey/BCG Consulting Style - WHITE background, professional hierarchy.
1404
- */
1405
- private getMcKinseyCSS;
1406
- /**
1407
- * Dark theme CSS (legacy).
1408
- */
1409
- private getDarkCSS;
1410
- }
1411
- /**
1412
- * Create a renderer with theme matched to the presentation type.
1413
- *
1414
- * @param presentationType - Type of deck (consulting_deck, keynote, etc.)
1415
- * @param themeOverride - Optional explicit theme to use instead of auto-mapping
1416
- *
1417
- * Theme mapping:
1418
- * - consulting_deck, board_presentation, internal_update → McKinsey (white, professional)
1419
- * - keynote, sales_pitch, technical → Dark (dramatic)
1420
- * - training, workshop, all_hands → Minimal (clean, readable)
1421
- * - product_demo, investor_pitch → Startup (modern dark)
1422
- * - executive_briefing → Corporate (professional)
1423
- */
1424
- declare function createRendererV2(presentationType?: PresentationType, themeOverride?: ThemeStyle): RendererV2;
1425
-
1426
1565
  /**
1427
1566
  * NanoBanana Pro Image Generation Provider
1428
1567
  *
@@ -1683,4 +1822,4 @@ interface GenerateResult {
1683
1822
  */
1684
1823
  declare function generate(options: GenerateOptions): Promise<GenerateResult>;
1685
1824
 
1686
- 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, 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, createRendererV2, createSlideGeneratorV2, generate, getContentAnalyzer, getDeckQualityReviewer, getKB, getNanoBananaPrompt, getRemediator, getRenderer, getSlideGenerator, getSlideQualityReviewer, getVisualDesignSystem, initContentAnalyzer, initDeckQualityReviewer, initKB, initRemediator, initRenderer, initSlideGenerator, initSlideQualityReviewer, initVisualDesignSystem, runCodeQualityCheck, validateCodeQuality };
1825
+ 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 };