claude-presentation-master 3.6.0 → 3.8.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/assets/presentation-knowledge.yaml +9 -9
- package/dist/index.d.mts +184 -10
- package/dist/index.d.ts +184 -10
- package/dist/index.js +942 -129
- package/dist/index.mjs +938 -129
- package/package.json +2 -2
|
@@ -3028,10 +3028,10 @@ persuasion_psychology:
|
|
|
3028
3028
|
principle: "Make abstract ideas tangible"
|
|
3029
3029
|
technique: "Use specific examples, not generalizations"
|
|
3030
3030
|
examples:
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3031
|
+
bad: "We improve operational efficiency"
|
|
3032
|
+
good: "We save 2 hours per employee per day"
|
|
3033
|
+
bad: "Significant ROI"
|
|
3034
|
+
good: "47% reduction in processing time, saving $2.3M annually"
|
|
3035
3035
|
|
|
3036
3036
|
credible:
|
|
3037
3037
|
principle: "Make people believe"
|
|
@@ -3051,10 +3051,10 @@ persuasion_psychology:
|
|
|
3051
3051
|
- "Use the power of one (individual stories)"
|
|
3052
3052
|
- "Connect to things people already care about"
|
|
3053
3053
|
examples:
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3054
|
+
bad: "This affects millions of people"
|
|
3055
|
+
good: "Meet Sarah. She represents your typical customer..."
|
|
3056
|
+
bad: "Revenue growth opportunity"
|
|
3057
|
+
good: "What would you do with an extra $2M?"
|
|
3058
3058
|
|
|
3059
3059
|
stories:
|
|
3060
3060
|
principle: "Tell stories, not facts"
|
|
@@ -3320,7 +3320,7 @@ data_integrity:
|
|
|
3320
3320
|
right: "[Cite specific evidence with source]"
|
|
3321
3321
|
imprecise_numbers:
|
|
3322
3322
|
wrong: "Approximately $5M"
|
|
3323
|
-
right:
|
|
3323
|
+
right: "$4.8M (Source: X)" or "$4.5-5.5M range (estimates)"
|
|
3324
3324
|
vague_trends:
|
|
3325
3325
|
wrong: "The market is growing"
|
|
3326
3326
|
right: "Market growing 12% CAGR (Gartner, 2024)"
|
package/dist/index.d.mts
CHANGED
|
@@ -14,12 +14,12 @@ type PresentationType = 'ted_keynote' | 'sales_pitch' | 'consulting_deck' | 'inv
|
|
|
14
14
|
*/
|
|
15
15
|
type PresentationMode = 'keynote' | 'business';
|
|
16
16
|
type OutputFormat = 'html' | 'pptx';
|
|
17
|
-
type SlideType = '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';
|
|
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';
|
|
18
18
|
interface Slide {
|
|
19
19
|
/** Slide index (0-based) */
|
|
20
20
|
index: number;
|
|
21
21
|
/** Slide type from KB */
|
|
22
|
-
type: SlideType;
|
|
22
|
+
type: SlideType$1;
|
|
23
23
|
/** Slide content */
|
|
24
24
|
data: SlideData;
|
|
25
25
|
/** Slide-level score (must be >= 95) */
|
|
@@ -43,7 +43,7 @@ interface SlideData {
|
|
|
43
43
|
/** Quote attribution */
|
|
44
44
|
attribution?: string;
|
|
45
45
|
/** Metrics for metrics_grid */
|
|
46
|
-
metrics?: MetricData[];
|
|
46
|
+
metrics?: MetricData$1[];
|
|
47
47
|
/** Source citation (required for consulting/IB) */
|
|
48
48
|
source?: string;
|
|
49
49
|
/** Callout text (for data slides) */
|
|
@@ -53,7 +53,7 @@ interface SlideData {
|
|
|
53
53
|
/** Additional custom data */
|
|
54
54
|
[key: string]: unknown;
|
|
55
55
|
}
|
|
56
|
-
interface MetricData {
|
|
56
|
+
interface MetricData$1 {
|
|
57
57
|
value: string | number;
|
|
58
58
|
label: string;
|
|
59
59
|
change?: string;
|
|
@@ -548,6 +548,9 @@ declare class SlideGenerator {
|
|
|
548
548
|
private wordLimits;
|
|
549
549
|
private bulletLimit;
|
|
550
550
|
private allowedSlideTypes;
|
|
551
|
+
private createdSlideTitles;
|
|
552
|
+
private sectionDividerCount;
|
|
553
|
+
private readonly maxSectionDividers;
|
|
551
554
|
constructor();
|
|
552
555
|
initialize(): Promise<void>;
|
|
553
556
|
/**
|
|
@@ -605,14 +608,14 @@ declare class SlideGenerator {
|
|
|
605
608
|
*/
|
|
606
609
|
private stripMarkdownSyntax;
|
|
607
610
|
/**
|
|
608
|
-
* Clean bullets - strip markdown and
|
|
609
|
-
*
|
|
610
|
-
*
|
|
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.
|
|
611
614
|
*/
|
|
612
615
|
private cleanBullets;
|
|
613
616
|
/**
|
|
614
617
|
* Truncate text to word limit, stripping markdown first.
|
|
615
|
-
*
|
|
618
|
+
* Preserves complete sentences. Business content needs room to breathe.
|
|
616
619
|
*/
|
|
617
620
|
private truncateToWordLimit;
|
|
618
621
|
/**
|
|
@@ -626,6 +629,7 @@ declare class SlideGenerator {
|
|
|
626
629
|
private extractKeyMessage;
|
|
627
630
|
/**
|
|
628
631
|
* Extract a label from context (nearby text around a data point).
|
|
632
|
+
* CRITICAL: Strip all markdown table syntax first to avoid garbage labels.
|
|
629
633
|
*/
|
|
630
634
|
private extractLabelFromContext;
|
|
631
635
|
/**
|
|
@@ -649,6 +653,100 @@ declare class SlideGenerator {
|
|
|
649
653
|
declare function getSlideGenerator(): SlideGenerator;
|
|
650
654
|
declare function initSlideGenerator(): Promise<SlideGenerator>;
|
|
651
655
|
|
|
656
|
+
/**
|
|
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
|
|
664
|
+
*
|
|
665
|
+
* This replaces the 945-line monster that produced garbage.
|
|
666
|
+
*/
|
|
667
|
+
|
|
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';
|
|
694
|
+
}
|
|
695
|
+
declare class SlideGeneratorV2 {
|
|
696
|
+
private config;
|
|
697
|
+
private presentationType;
|
|
698
|
+
constructor(presentationType?: PresentationType);
|
|
699
|
+
/**
|
|
700
|
+
* Generate slides from markdown content.
|
|
701
|
+
* Simple, correct, no garbage.
|
|
702
|
+
*/
|
|
703
|
+
generate(markdown: string, title?: string): SlideV2[];
|
|
704
|
+
/**
|
|
705
|
+
* Extract title from first H1 token.
|
|
706
|
+
*/
|
|
707
|
+
private extractTitle;
|
|
708
|
+
/**
|
|
709
|
+
* Split tokens into sections based on H2 headers.
|
|
710
|
+
*/
|
|
711
|
+
private splitIntoSections;
|
|
712
|
+
/**
|
|
713
|
+
* Process section content into slides.
|
|
714
|
+
* Tables become table slides. Lists become bullet slides.
|
|
715
|
+
*/
|
|
716
|
+
private processSectionContent;
|
|
717
|
+
/**
|
|
718
|
+
* Create a table slide - render the table as-is, no extraction.
|
|
719
|
+
*/
|
|
720
|
+
private createTableSlide;
|
|
721
|
+
/**
|
|
722
|
+
* Create bullet slides from list content.
|
|
723
|
+
* NEVER truncate bullets. Split into multiple slides if needed.
|
|
724
|
+
*/
|
|
725
|
+
private createBulletSlides;
|
|
726
|
+
/**
|
|
727
|
+
* Get complete text from a list item, including nested content.
|
|
728
|
+
* NEVER truncate.
|
|
729
|
+
*/
|
|
730
|
+
private getCompleteItemText;
|
|
731
|
+
/**
|
|
732
|
+
* Check if section has significant paragraph content.
|
|
733
|
+
*/
|
|
734
|
+
private hasSignificantParagraphs;
|
|
735
|
+
/**
|
|
736
|
+
* Create a content slide from paragraphs.
|
|
737
|
+
*/
|
|
738
|
+
private createContentSlide;
|
|
739
|
+
/**
|
|
740
|
+
* Extract a key statement from tokens.
|
|
741
|
+
*/
|
|
742
|
+
private extractStatement;
|
|
743
|
+
/**
|
|
744
|
+
* VALIDATE ALL SLIDES - Fail loudly on garbage.
|
|
745
|
+
*/
|
|
746
|
+
private validateSlides;
|
|
747
|
+
}
|
|
748
|
+
declare function createSlideGeneratorV2(type?: PresentationType): SlideGeneratorV2;
|
|
749
|
+
|
|
652
750
|
/**
|
|
653
751
|
* VisualDesignSystem - KB-Driven Visual Design Configuration
|
|
654
752
|
*
|
|
@@ -1144,7 +1242,13 @@ declare class Renderer {
|
|
|
1144
1242
|
private escapeHTML;
|
|
1145
1243
|
/**
|
|
1146
1244
|
* Generate a background image URL based on slide type and content.
|
|
1147
|
-
* Priority: 1) slide.data.image, 2) local images array, 3)
|
|
1245
|
+
* Priority: 1) slide.data.image, 2) local images array, 3) NO RANDOM STOCK PHOTOS
|
|
1246
|
+
*
|
|
1247
|
+
* IMPORTANT: Random stock photos destroy credibility. A photo of flowers behind
|
|
1248
|
+
* a financial slide makes you look incompetent. Only use images that are:
|
|
1249
|
+
* - Explicitly provided by the user
|
|
1250
|
+
* - Actually relevant to the content
|
|
1251
|
+
* Otherwise, rely on clean gradients via CSS.
|
|
1148
1252
|
*/
|
|
1149
1253
|
private getBackgroundImageUrl;
|
|
1150
1254
|
/**
|
|
@@ -1178,6 +1282,76 @@ declare class Renderer {
|
|
|
1178
1282
|
declare function getRenderer(): Renderer;
|
|
1179
1283
|
declare function initRenderer(): Promise<Renderer>;
|
|
1180
1284
|
|
|
1285
|
+
/**
|
|
1286
|
+
* Renderer V2 - Clean, Professional, No Garbage
|
|
1287
|
+
*
|
|
1288
|
+
* Renders slides to HTML with:
|
|
1289
|
+
* - Tables as actual tables (not mangled metrics)
|
|
1290
|
+
* - Complete bullets (never truncated)
|
|
1291
|
+
* - Clean professional CSS (no random stock photos)
|
|
1292
|
+
* - McKinsey/BCG style dark theme
|
|
1293
|
+
*/
|
|
1294
|
+
|
|
1295
|
+
declare class RendererV2 {
|
|
1296
|
+
/**
|
|
1297
|
+
* Render slides to complete HTML document.
|
|
1298
|
+
*/
|
|
1299
|
+
render(slides: SlideV2[], title?: string): string;
|
|
1300
|
+
/**
|
|
1301
|
+
* Render a single slide.
|
|
1302
|
+
*/
|
|
1303
|
+
private renderSlide;
|
|
1304
|
+
/**
|
|
1305
|
+
* Title slide - big, bold, centered.
|
|
1306
|
+
*/
|
|
1307
|
+
private renderTitleSlide;
|
|
1308
|
+
/**
|
|
1309
|
+
* Section divider - transition slide.
|
|
1310
|
+
*/
|
|
1311
|
+
private renderSectionSlide;
|
|
1312
|
+
/**
|
|
1313
|
+
* Bullet slide - the workhorse.
|
|
1314
|
+
*/
|
|
1315
|
+
private renderBulletSlide;
|
|
1316
|
+
/**
|
|
1317
|
+
* Table slide - render tables properly.
|
|
1318
|
+
*/
|
|
1319
|
+
private renderTableSlide;
|
|
1320
|
+
/**
|
|
1321
|
+
* Render a table as clean HTML.
|
|
1322
|
+
*/
|
|
1323
|
+
private renderTable;
|
|
1324
|
+
/**
|
|
1325
|
+
* Metrics slide - big numbers with labels.
|
|
1326
|
+
*/
|
|
1327
|
+
private renderMetricsSlide;
|
|
1328
|
+
/**
|
|
1329
|
+
* Statement slide - single powerful message.
|
|
1330
|
+
*/
|
|
1331
|
+
private renderStatementSlide;
|
|
1332
|
+
/**
|
|
1333
|
+
* Call to action slide.
|
|
1334
|
+
*/
|
|
1335
|
+
private renderCTASlide;
|
|
1336
|
+
/**
|
|
1337
|
+
* Thank you slide.
|
|
1338
|
+
*/
|
|
1339
|
+
private renderThankYouSlide;
|
|
1340
|
+
/**
|
|
1341
|
+
* Format bullet text - handle bold, arrows, etc.
|
|
1342
|
+
*/
|
|
1343
|
+
private formatBulletText;
|
|
1344
|
+
/**
|
|
1345
|
+
* Escape HTML special characters.
|
|
1346
|
+
*/
|
|
1347
|
+
private escapeHtml;
|
|
1348
|
+
/**
|
|
1349
|
+
* Professional CSS - McKinsey/BCG style.
|
|
1350
|
+
*/
|
|
1351
|
+
private getCSS;
|
|
1352
|
+
}
|
|
1353
|
+
declare function createRendererV2(): RendererV2;
|
|
1354
|
+
|
|
1181
1355
|
/**
|
|
1182
1356
|
* NanoBanana Pro Image Generation Provider
|
|
1183
1357
|
*
|
|
@@ -1438,4 +1612,4 @@ interface GenerateResult {
|
|
|
1438
1612
|
*/
|
|
1439
1613
|
declare function generate(options: GenerateOptions): Promise<GenerateResult>;
|
|
1440
1614
|
|
|
1441
|
-
export { CodeQualityValidator, type ValidationResult as CodeValidationResult, type ContentAnalysis, ContentAnalyzer, DeckQualityReviewer, type DeckScore, type GenerateOptions, type GenerateResult, type HardcodedViolation, type ImageGenerationRequest, type ImageGenerationResult, KnowledgeGateway, type NanoBananaConfig, NanoBananaProvider, type OutputFormat, type PresentationMetadata, type PresentationMode, type PresentationResult, type PresentationType, type QualitativeDeckReview, type QualitativeSlideReview, type RemediationResult, Remediator, Renderer, type Slide, SlideGenerator, SlideQualityReviewer, type SlideScore, VERSION, type Violation, VisualDesignSystem, createNanoBananaProvider, generate, getContentAnalyzer, getDeckQualityReviewer, getKB, getNanoBananaPrompt, getRemediator, getRenderer, getSlideGenerator, getSlideQualityReviewer, getVisualDesignSystem, initContentAnalyzer, initDeckQualityReviewer, initKB, initRemediator, initRenderer, initSlideGenerator, initSlideQualityReviewer, initVisualDesignSystem, runCodeQualityCheck, validateCodeQuality };
|
|
1615
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,12 +14,12 @@ type PresentationType = 'ted_keynote' | 'sales_pitch' | 'consulting_deck' | 'inv
|
|
|
14
14
|
*/
|
|
15
15
|
type PresentationMode = 'keynote' | 'business';
|
|
16
16
|
type OutputFormat = 'html' | 'pptx';
|
|
17
|
-
type SlideType = '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';
|
|
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';
|
|
18
18
|
interface Slide {
|
|
19
19
|
/** Slide index (0-based) */
|
|
20
20
|
index: number;
|
|
21
21
|
/** Slide type from KB */
|
|
22
|
-
type: SlideType;
|
|
22
|
+
type: SlideType$1;
|
|
23
23
|
/** Slide content */
|
|
24
24
|
data: SlideData;
|
|
25
25
|
/** Slide-level score (must be >= 95) */
|
|
@@ -43,7 +43,7 @@ interface SlideData {
|
|
|
43
43
|
/** Quote attribution */
|
|
44
44
|
attribution?: string;
|
|
45
45
|
/** Metrics for metrics_grid */
|
|
46
|
-
metrics?: MetricData[];
|
|
46
|
+
metrics?: MetricData$1[];
|
|
47
47
|
/** Source citation (required for consulting/IB) */
|
|
48
48
|
source?: string;
|
|
49
49
|
/** Callout text (for data slides) */
|
|
@@ -53,7 +53,7 @@ interface SlideData {
|
|
|
53
53
|
/** Additional custom data */
|
|
54
54
|
[key: string]: unknown;
|
|
55
55
|
}
|
|
56
|
-
interface MetricData {
|
|
56
|
+
interface MetricData$1 {
|
|
57
57
|
value: string | number;
|
|
58
58
|
label: string;
|
|
59
59
|
change?: string;
|
|
@@ -548,6 +548,9 @@ declare class SlideGenerator {
|
|
|
548
548
|
private wordLimits;
|
|
549
549
|
private bulletLimit;
|
|
550
550
|
private allowedSlideTypes;
|
|
551
|
+
private createdSlideTitles;
|
|
552
|
+
private sectionDividerCount;
|
|
553
|
+
private readonly maxSectionDividers;
|
|
551
554
|
constructor();
|
|
552
555
|
initialize(): Promise<void>;
|
|
553
556
|
/**
|
|
@@ -605,14 +608,14 @@ declare class SlideGenerator {
|
|
|
605
608
|
*/
|
|
606
609
|
private stripMarkdownSyntax;
|
|
607
610
|
/**
|
|
608
|
-
* Clean bullets - strip markdown and
|
|
609
|
-
*
|
|
610
|
-
*
|
|
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.
|
|
611
614
|
*/
|
|
612
615
|
private cleanBullets;
|
|
613
616
|
/**
|
|
614
617
|
* Truncate text to word limit, stripping markdown first.
|
|
615
|
-
*
|
|
618
|
+
* Preserves complete sentences. Business content needs room to breathe.
|
|
616
619
|
*/
|
|
617
620
|
private truncateToWordLimit;
|
|
618
621
|
/**
|
|
@@ -626,6 +629,7 @@ declare class SlideGenerator {
|
|
|
626
629
|
private extractKeyMessage;
|
|
627
630
|
/**
|
|
628
631
|
* Extract a label from context (nearby text around a data point).
|
|
632
|
+
* CRITICAL: Strip all markdown table syntax first to avoid garbage labels.
|
|
629
633
|
*/
|
|
630
634
|
private extractLabelFromContext;
|
|
631
635
|
/**
|
|
@@ -649,6 +653,100 @@ declare class SlideGenerator {
|
|
|
649
653
|
declare function getSlideGenerator(): SlideGenerator;
|
|
650
654
|
declare function initSlideGenerator(): Promise<SlideGenerator>;
|
|
651
655
|
|
|
656
|
+
/**
|
|
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
|
|
664
|
+
*
|
|
665
|
+
* This replaces the 945-line monster that produced garbage.
|
|
666
|
+
*/
|
|
667
|
+
|
|
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';
|
|
694
|
+
}
|
|
695
|
+
declare class SlideGeneratorV2 {
|
|
696
|
+
private config;
|
|
697
|
+
private presentationType;
|
|
698
|
+
constructor(presentationType?: PresentationType);
|
|
699
|
+
/**
|
|
700
|
+
* Generate slides from markdown content.
|
|
701
|
+
* Simple, correct, no garbage.
|
|
702
|
+
*/
|
|
703
|
+
generate(markdown: string, title?: string): SlideV2[];
|
|
704
|
+
/**
|
|
705
|
+
* Extract title from first H1 token.
|
|
706
|
+
*/
|
|
707
|
+
private extractTitle;
|
|
708
|
+
/**
|
|
709
|
+
* Split tokens into sections based on H2 headers.
|
|
710
|
+
*/
|
|
711
|
+
private splitIntoSections;
|
|
712
|
+
/**
|
|
713
|
+
* Process section content into slides.
|
|
714
|
+
* Tables become table slides. Lists become bullet slides.
|
|
715
|
+
*/
|
|
716
|
+
private processSectionContent;
|
|
717
|
+
/**
|
|
718
|
+
* Create a table slide - render the table as-is, no extraction.
|
|
719
|
+
*/
|
|
720
|
+
private createTableSlide;
|
|
721
|
+
/**
|
|
722
|
+
* Create bullet slides from list content.
|
|
723
|
+
* NEVER truncate bullets. Split into multiple slides if needed.
|
|
724
|
+
*/
|
|
725
|
+
private createBulletSlides;
|
|
726
|
+
/**
|
|
727
|
+
* Get complete text from a list item, including nested content.
|
|
728
|
+
* NEVER truncate.
|
|
729
|
+
*/
|
|
730
|
+
private getCompleteItemText;
|
|
731
|
+
/**
|
|
732
|
+
* Check if section has significant paragraph content.
|
|
733
|
+
*/
|
|
734
|
+
private hasSignificantParagraphs;
|
|
735
|
+
/**
|
|
736
|
+
* Create a content slide from paragraphs.
|
|
737
|
+
*/
|
|
738
|
+
private createContentSlide;
|
|
739
|
+
/**
|
|
740
|
+
* Extract a key statement from tokens.
|
|
741
|
+
*/
|
|
742
|
+
private extractStatement;
|
|
743
|
+
/**
|
|
744
|
+
* VALIDATE ALL SLIDES - Fail loudly on garbage.
|
|
745
|
+
*/
|
|
746
|
+
private validateSlides;
|
|
747
|
+
}
|
|
748
|
+
declare function createSlideGeneratorV2(type?: PresentationType): SlideGeneratorV2;
|
|
749
|
+
|
|
652
750
|
/**
|
|
653
751
|
* VisualDesignSystem - KB-Driven Visual Design Configuration
|
|
654
752
|
*
|
|
@@ -1144,7 +1242,13 @@ declare class Renderer {
|
|
|
1144
1242
|
private escapeHTML;
|
|
1145
1243
|
/**
|
|
1146
1244
|
* Generate a background image URL based on slide type and content.
|
|
1147
|
-
* Priority: 1) slide.data.image, 2) local images array, 3)
|
|
1245
|
+
* Priority: 1) slide.data.image, 2) local images array, 3) NO RANDOM STOCK PHOTOS
|
|
1246
|
+
*
|
|
1247
|
+
* IMPORTANT: Random stock photos destroy credibility. A photo of flowers behind
|
|
1248
|
+
* a financial slide makes you look incompetent. Only use images that are:
|
|
1249
|
+
* - Explicitly provided by the user
|
|
1250
|
+
* - Actually relevant to the content
|
|
1251
|
+
* Otherwise, rely on clean gradients via CSS.
|
|
1148
1252
|
*/
|
|
1149
1253
|
private getBackgroundImageUrl;
|
|
1150
1254
|
/**
|
|
@@ -1178,6 +1282,76 @@ declare class Renderer {
|
|
|
1178
1282
|
declare function getRenderer(): Renderer;
|
|
1179
1283
|
declare function initRenderer(): Promise<Renderer>;
|
|
1180
1284
|
|
|
1285
|
+
/**
|
|
1286
|
+
* Renderer V2 - Clean, Professional, No Garbage
|
|
1287
|
+
*
|
|
1288
|
+
* Renders slides to HTML with:
|
|
1289
|
+
* - Tables as actual tables (not mangled metrics)
|
|
1290
|
+
* - Complete bullets (never truncated)
|
|
1291
|
+
* - Clean professional CSS (no random stock photos)
|
|
1292
|
+
* - McKinsey/BCG style dark theme
|
|
1293
|
+
*/
|
|
1294
|
+
|
|
1295
|
+
declare class RendererV2 {
|
|
1296
|
+
/**
|
|
1297
|
+
* Render slides to complete HTML document.
|
|
1298
|
+
*/
|
|
1299
|
+
render(slides: SlideV2[], title?: string): string;
|
|
1300
|
+
/**
|
|
1301
|
+
* Render a single slide.
|
|
1302
|
+
*/
|
|
1303
|
+
private renderSlide;
|
|
1304
|
+
/**
|
|
1305
|
+
* Title slide - big, bold, centered.
|
|
1306
|
+
*/
|
|
1307
|
+
private renderTitleSlide;
|
|
1308
|
+
/**
|
|
1309
|
+
* Section divider - transition slide.
|
|
1310
|
+
*/
|
|
1311
|
+
private renderSectionSlide;
|
|
1312
|
+
/**
|
|
1313
|
+
* Bullet slide - the workhorse.
|
|
1314
|
+
*/
|
|
1315
|
+
private renderBulletSlide;
|
|
1316
|
+
/**
|
|
1317
|
+
* Table slide - render tables properly.
|
|
1318
|
+
*/
|
|
1319
|
+
private renderTableSlide;
|
|
1320
|
+
/**
|
|
1321
|
+
* Render a table as clean HTML.
|
|
1322
|
+
*/
|
|
1323
|
+
private renderTable;
|
|
1324
|
+
/**
|
|
1325
|
+
* Metrics slide - big numbers with labels.
|
|
1326
|
+
*/
|
|
1327
|
+
private renderMetricsSlide;
|
|
1328
|
+
/**
|
|
1329
|
+
* Statement slide - single powerful message.
|
|
1330
|
+
*/
|
|
1331
|
+
private renderStatementSlide;
|
|
1332
|
+
/**
|
|
1333
|
+
* Call to action slide.
|
|
1334
|
+
*/
|
|
1335
|
+
private renderCTASlide;
|
|
1336
|
+
/**
|
|
1337
|
+
* Thank you slide.
|
|
1338
|
+
*/
|
|
1339
|
+
private renderThankYouSlide;
|
|
1340
|
+
/**
|
|
1341
|
+
* Format bullet text - handle bold, arrows, etc.
|
|
1342
|
+
*/
|
|
1343
|
+
private formatBulletText;
|
|
1344
|
+
/**
|
|
1345
|
+
* Escape HTML special characters.
|
|
1346
|
+
*/
|
|
1347
|
+
private escapeHtml;
|
|
1348
|
+
/**
|
|
1349
|
+
* Professional CSS - McKinsey/BCG style.
|
|
1350
|
+
*/
|
|
1351
|
+
private getCSS;
|
|
1352
|
+
}
|
|
1353
|
+
declare function createRendererV2(): RendererV2;
|
|
1354
|
+
|
|
1181
1355
|
/**
|
|
1182
1356
|
* NanoBanana Pro Image Generation Provider
|
|
1183
1357
|
*
|
|
@@ -1438,4 +1612,4 @@ interface GenerateResult {
|
|
|
1438
1612
|
*/
|
|
1439
1613
|
declare function generate(options: GenerateOptions): Promise<GenerateResult>;
|
|
1440
1614
|
|
|
1441
|
-
export { CodeQualityValidator, type ValidationResult as CodeValidationResult, type ContentAnalysis, ContentAnalyzer, DeckQualityReviewer, type DeckScore, type GenerateOptions, type GenerateResult, type HardcodedViolation, type ImageGenerationRequest, type ImageGenerationResult, KnowledgeGateway, type NanoBananaConfig, NanoBananaProvider, type OutputFormat, type PresentationMetadata, type PresentationMode, type PresentationResult, type PresentationType, type QualitativeDeckReview, type QualitativeSlideReview, type RemediationResult, Remediator, Renderer, type Slide, SlideGenerator, SlideQualityReviewer, type SlideScore, VERSION, type Violation, VisualDesignSystem, createNanoBananaProvider, generate, getContentAnalyzer, getDeckQualityReviewer, getKB, getNanoBananaPrompt, getRemediator, getRenderer, getSlideGenerator, getSlideQualityReviewer, getVisualDesignSystem, initContentAnalyzer, initDeckQualityReviewer, initKB, initRemediator, initRenderer, initSlideGenerator, initSlideQualityReviewer, initVisualDesignSystem, runCodeQualityCheck, validateCodeQuality };
|
|
1615
|
+
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 };
|