claude-presentation-master 7.2.0 → 7.3.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 +6 -0
- package/dist/index.d.mts +105 -11
- package/dist/index.d.ts +105 -11
- package/dist/index.js +612 -83
- package/dist/index.mjs +612 -83
- package/package.json +3 -2
package/bin/cli.js
CHANGED
|
@@ -445,6 +445,12 @@ async function runGenerate(inputPath, options, generate) {
|
|
|
445
445
|
console.log(`✅ PPTX saved: ${pptxPath}`);
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
+
if (result.outputs.pdf) {
|
|
449
|
+
const pdfPath = resolve(outputDir, `${baseFilename}.pdf`);
|
|
450
|
+
writeFileSync(pdfPath, result.outputs.pdf);
|
|
451
|
+
console.log(`✅ PDF saved: ${pdfPath}`);
|
|
452
|
+
}
|
|
453
|
+
|
|
448
454
|
// Show results
|
|
449
455
|
const avgWords = result.metadata.avgWordsPerSlide?.toFixed(1) ?? 'N/A';
|
|
450
456
|
const totalWords = result.metadata.wordCount || result.metadata.totalWords || 0;
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module types
|
|
4
4
|
*/
|
|
5
5
|
type PresentationMode$1 = 'keynote' | 'business';
|
|
6
|
-
type OutputFormat = 'html' | 'pptx';
|
|
6
|
+
type OutputFormat = 'html' | 'pptx' | 'pdf';
|
|
7
7
|
type ThemeName = 'default' | 'light-corporate' | 'modern-tech' | 'minimal' | 'warm' | 'creative';
|
|
8
8
|
type PresentationType$1 = 'ted_keynote' | 'sales_pitch' | 'consulting_deck' | 'investment_banking' | 'investor_pitch' | 'technical_presentation' | 'all_hands';
|
|
9
9
|
interface PresentationConfig {
|
|
@@ -45,6 +45,8 @@ interface PresentationConfig {
|
|
|
45
45
|
images?: string[];
|
|
46
46
|
/** Base path for resolving image paths */
|
|
47
47
|
imageBasePath?: string;
|
|
48
|
+
/** Generate PDF alongside HTML (default: true when format includes 'html') */
|
|
49
|
+
generatePdf?: boolean;
|
|
48
50
|
}
|
|
49
51
|
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';
|
|
50
52
|
interface Slide {
|
|
@@ -96,6 +98,26 @@ interface MetricData {
|
|
|
96
98
|
change?: string;
|
|
97
99
|
trend?: 'up' | 'down' | 'neutral';
|
|
98
100
|
}
|
|
101
|
+
/** Legacy slide format for backwards compatibility */
|
|
102
|
+
interface LegacySlide {
|
|
103
|
+
index: number;
|
|
104
|
+
type: string;
|
|
105
|
+
title: string;
|
|
106
|
+
content: {
|
|
107
|
+
subtitle?: string | undefined;
|
|
108
|
+
statement?: string | undefined;
|
|
109
|
+
body?: string | undefined;
|
|
110
|
+
bullets?: string[] | undefined;
|
|
111
|
+
metrics?: MetricData[] | undefined;
|
|
112
|
+
quote?: {
|
|
113
|
+
text: string;
|
|
114
|
+
attribution?: string | undefined;
|
|
115
|
+
} | undefined;
|
|
116
|
+
callToAction?: string | undefined;
|
|
117
|
+
};
|
|
118
|
+
notes?: string | undefined;
|
|
119
|
+
template: string;
|
|
120
|
+
}
|
|
99
121
|
interface QAResults {
|
|
100
122
|
/** Visual quality results */
|
|
101
123
|
visual: VisualQAResults;
|
|
@@ -157,7 +179,7 @@ interface GlanceTestResult {
|
|
|
157
179
|
wordCount: number;
|
|
158
180
|
readingTime: number;
|
|
159
181
|
passed: boolean;
|
|
160
|
-
recommendation?: string;
|
|
182
|
+
recommendation?: string | undefined;
|
|
161
183
|
}
|
|
162
184
|
interface SignalNoiseResult {
|
|
163
185
|
slideIndex: number;
|
|
@@ -172,7 +194,7 @@ interface OneIdeaResult {
|
|
|
172
194
|
ideaCount: number;
|
|
173
195
|
mainIdea: string;
|
|
174
196
|
passed: boolean;
|
|
175
|
-
conflictingIdeas?: string[];
|
|
197
|
+
conflictingIdeas?: string[] | undefined;
|
|
176
198
|
}
|
|
177
199
|
interface ExpertQAResults {
|
|
178
200
|
/** Nancy Duarte validation */
|
|
@@ -229,11 +251,47 @@ interface QAIssue {
|
|
|
229
251
|
/** Suggested fix */
|
|
230
252
|
suggestion?: string;
|
|
231
253
|
}
|
|
254
|
+
/** Result from 7-dimension QA scoring */
|
|
255
|
+
interface SevenDimensionQAResult {
|
|
256
|
+
passed: boolean;
|
|
257
|
+
score: number;
|
|
258
|
+
visual: {
|
|
259
|
+
whitespacePercentage: number;
|
|
260
|
+
layoutBalance: number;
|
|
261
|
+
colorContrast: number;
|
|
262
|
+
};
|
|
263
|
+
content: {
|
|
264
|
+
perSlide: SlideContentScore[];
|
|
265
|
+
issues: Array<{
|
|
266
|
+
dimension: string;
|
|
267
|
+
message: string;
|
|
268
|
+
slideIndex?: number;
|
|
269
|
+
}>;
|
|
270
|
+
};
|
|
271
|
+
accessibility: {
|
|
272
|
+
wcagLevel: string;
|
|
273
|
+
issues: Array<{
|
|
274
|
+
dimension: string;
|
|
275
|
+
message: string;
|
|
276
|
+
slideIndex?: number;
|
|
277
|
+
}>;
|
|
278
|
+
};
|
|
279
|
+
issues: Array<{
|
|
280
|
+
severity: string;
|
|
281
|
+
message: string;
|
|
282
|
+
slideIndex?: number;
|
|
283
|
+
dimension: string;
|
|
284
|
+
}>;
|
|
285
|
+
dimensions: Record<string, number>;
|
|
286
|
+
iterations: unknown[];
|
|
287
|
+
report: string;
|
|
288
|
+
}
|
|
232
289
|
interface PresentationResult {
|
|
233
290
|
/** Generated outputs */
|
|
234
291
|
outputs: {
|
|
235
292
|
html?: string;
|
|
236
293
|
pptx?: Buffer;
|
|
294
|
+
pdf?: Buffer;
|
|
237
295
|
};
|
|
238
296
|
/** QA validation results */
|
|
239
297
|
qaResults: QAResults;
|
|
@@ -296,6 +354,8 @@ interface ContentAnalysis$1 {
|
|
|
296
354
|
detectedType: PresentationType$1;
|
|
297
355
|
/** Main title */
|
|
298
356
|
title: string;
|
|
357
|
+
/** Subtitle (line after title) */
|
|
358
|
+
subtitle?: string;
|
|
299
359
|
/** Content sections */
|
|
300
360
|
sections: ContentSection$1[];
|
|
301
361
|
/** SCQA structure extracted */
|
|
@@ -457,6 +517,7 @@ declare class PresentationEngine {
|
|
|
457
517
|
private qaEngine;
|
|
458
518
|
private htmlGenerator;
|
|
459
519
|
private pptxGenerator;
|
|
520
|
+
private pdfGenerator;
|
|
460
521
|
private kb;
|
|
461
522
|
constructor();
|
|
462
523
|
/**
|
|
@@ -555,6 +616,7 @@ interface ColorPalette {
|
|
|
555
616
|
contrast_ratio: string;
|
|
556
617
|
}
|
|
557
618
|
type PresentationType = 'ted_keynote' | 'sales_pitch' | 'consulting_deck' | 'investment_banking' | 'investor_pitch' | 'technical_presentation' | 'all_hands';
|
|
619
|
+
type KnowledgeBaseData = Record<string, any>;
|
|
558
620
|
declare class KnowledgeGateway {
|
|
559
621
|
private kb;
|
|
560
622
|
private loaded;
|
|
@@ -629,11 +691,11 @@ declare class KnowledgeGateway {
|
|
|
629
691
|
/**
|
|
630
692
|
* Get story framework by name
|
|
631
693
|
*/
|
|
632
|
-
getStoryFramework(name: 'sparkline' | 'scqa' | 'pyramid' | 'scr'):
|
|
694
|
+
getStoryFramework(name: 'sparkline' | 'scqa' | 'pyramid' | 'scr'): unknown;
|
|
633
695
|
/**
|
|
634
696
|
* Get expert principles by name
|
|
635
697
|
*/
|
|
636
|
-
getExpertPrinciples(expertName: string):
|
|
698
|
+
getExpertPrinciples(expertName: string): unknown;
|
|
637
699
|
/**
|
|
638
700
|
* Get Duarte's glance test requirements
|
|
639
701
|
*/
|
|
@@ -657,7 +719,7 @@ declare class KnowledgeGateway {
|
|
|
657
719
|
/**
|
|
658
720
|
* Get chart selection guidance
|
|
659
721
|
*/
|
|
660
|
-
getChartGuidance(purpose: 'comparison' | 'composition' | 'distribution' | 'relationship'):
|
|
722
|
+
getChartGuidance(purpose: 'comparison' | 'composition' | 'distribution' | 'relationship'): unknown;
|
|
661
723
|
/**
|
|
662
724
|
* Get charts to avoid
|
|
663
725
|
*/
|
|
@@ -665,7 +727,7 @@ declare class KnowledgeGateway {
|
|
|
665
727
|
/**
|
|
666
728
|
* Get investment banking pitch book structure
|
|
667
729
|
*/
|
|
668
|
-
getIBPitchBookStructure(type: 'ma_sell_side' | 'ma_buy_side' | 'ipo_pitchbook'):
|
|
730
|
+
getIBPitchBookStructure(type: 'ma_sell_side' | 'ma_buy_side' | 'ipo_pitchbook'): unknown;
|
|
669
731
|
/**
|
|
670
732
|
* Check if knowledge base is loaded
|
|
671
733
|
*/
|
|
@@ -673,7 +735,7 @@ declare class KnowledgeGateway {
|
|
|
673
735
|
/**
|
|
674
736
|
* Get the full knowledge base (for advanced queries)
|
|
675
737
|
*/
|
|
676
|
-
getRawKB():
|
|
738
|
+
getRawKB(): KnowledgeBaseData;
|
|
677
739
|
/**
|
|
678
740
|
* Get allowed slide types for a specific presentation type.
|
|
679
741
|
* CRITICAL: SlideFactory must ONLY use types from this list.
|
|
@@ -890,6 +952,7 @@ interface ContentSection {
|
|
|
890
952
|
interface ContentAnalysis {
|
|
891
953
|
detectedType: PresentationType;
|
|
892
954
|
title: string;
|
|
955
|
+
subtitle: string;
|
|
893
956
|
sections: ContentSection[];
|
|
894
957
|
keyMessages: string[];
|
|
895
958
|
dataPoints: Array<{
|
|
@@ -930,7 +993,12 @@ declare class ContentAnalyzer {
|
|
|
930
993
|
*/
|
|
931
994
|
private parseContent;
|
|
932
995
|
/**
|
|
933
|
-
* Extract the main title from content
|
|
996
|
+
* Extract the main title AND subtitle from content
|
|
997
|
+
* Subtitle is the line immediately after the H1 title (if not another header)
|
|
998
|
+
*/
|
|
999
|
+
private extractTitleAndSubtitle;
|
|
1000
|
+
/**
|
|
1001
|
+
* Extract the main title from content (legacy wrapper)
|
|
934
1002
|
*/
|
|
935
1003
|
private extractTitle;
|
|
936
1004
|
/**
|
|
@@ -995,6 +1063,11 @@ declare class ContentAnalyzer {
|
|
|
995
1063
|
* CRITICAL: Must strip headers, CTA text, and fragments
|
|
996
1064
|
*/
|
|
997
1065
|
private extractFirstSentence;
|
|
1066
|
+
/**
|
|
1067
|
+
* Extract metrics from natural language text
|
|
1068
|
+
* Handles formats like "40% productivity loss", "$2.5M investment"
|
|
1069
|
+
*/
|
|
1070
|
+
private extractMetricsFromText;
|
|
998
1071
|
}
|
|
999
1072
|
|
|
1000
1073
|
/**
|
|
@@ -1198,7 +1271,7 @@ declare class SlideGenerator {
|
|
|
1198
1271
|
* - Content pattern to slide type mapping
|
|
1199
1272
|
* - Slide validation against KB rules
|
|
1200
1273
|
*/
|
|
1201
|
-
generate(analysis: ContentAnalysis$1, type?: PresentationType): Promise<
|
|
1274
|
+
generate(analysis: ContentAnalysis$1, type?: PresentationType): Promise<LegacySlide[]>;
|
|
1202
1275
|
/**
|
|
1203
1276
|
* Convert new Slide format to legacy format for backwards compatibility
|
|
1204
1277
|
*/
|
|
@@ -1358,6 +1431,15 @@ declare class ScoreCalculator {
|
|
|
1358
1431
|
* CRITICAL: All thresholds come from the knowledge base
|
|
1359
1432
|
*/
|
|
1360
1433
|
|
|
1434
|
+
interface RevealApi {
|
|
1435
|
+
getTotalSlides?: () => number;
|
|
1436
|
+
slide?: (index: number) => void;
|
|
1437
|
+
}
|
|
1438
|
+
declare global {
|
|
1439
|
+
interface Window {
|
|
1440
|
+
Reveal?: RevealApi;
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1361
1443
|
declare class QAEngine {
|
|
1362
1444
|
private browser;
|
|
1363
1445
|
private kb;
|
|
@@ -1698,6 +1780,18 @@ declare class RevealJsGenerator {
|
|
|
1698
1780
|
* Lighten a hex color
|
|
1699
1781
|
*/
|
|
1700
1782
|
private lightenColor;
|
|
1783
|
+
/**
|
|
1784
|
+
* Check if a palette is "dark mode" (dark background, light text)
|
|
1785
|
+
*/
|
|
1786
|
+
private isDarkPalette;
|
|
1787
|
+
/**
|
|
1788
|
+
* Get relative luminance of a hex color (0-1, 0=black, 1=white)
|
|
1789
|
+
*/
|
|
1790
|
+
private getLuminance;
|
|
1791
|
+
/**
|
|
1792
|
+
* Darken a hex color
|
|
1793
|
+
*/
|
|
1794
|
+
private darkenColor;
|
|
1701
1795
|
/**
|
|
1702
1796
|
* Get theme-specific styles - KB-DRIVEN
|
|
1703
1797
|
*/
|
|
@@ -2101,4 +2195,4 @@ declare const _default: {
|
|
|
2101
2195
|
VERSION: string;
|
|
2102
2196
|
};
|
|
2103
2197
|
|
|
2104
|
-
export { type AccessibilityResults, AutoFixEngine, type AutoFixResult, type ChartData, type ChartDataset, ChartJsProvider, type ChartProvider, type ChartRequest, type ChartResult, type ChartType, type ColorPalette, CompositeChartProvider, CompositeImageProvider, type ContentAnalysis$1 as ContentAnalysis, ContentAnalyzer, type ContentPattern, ContentPatternClassifier, type ContentQAResults, type ContentSection$1 as ContentSection, type ContrastIssue, type DimensionIssue, type DimensionScore, type ExpertQAResults, type ExpertValidation, type FixResult, type FontSizeIssue, type GlanceTestResult, type ImageData, type ImageProvider, type ImageRequest, type ImageResult, type IterationRecord, IterativeQAEngine, type IterativeQAOptions, type IterativeQAResult, 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 ScoringWeights, type SevenDimensionResult, SevenDimensionScorer, type SignalNoiseResult, type Slide, type SlideContentScore, type SlideData, SlideFactory, SlideGenerator, type SlideTemplate, type SlideType, type SlideValidationResult, type SlideVisualScore, type SparklineStructure, type StoryStructure, TemplateEngine, TemplateNotFoundError, type ThemeName, type TypographyRules, UnsplashImageProvider, VERSION, ValidationError, type ValidationRules, type VisualQAResults, createAutoFixEngine, createDefaultChartProvider, createDefaultImageProvider, createIterativeQAEngine, createSlideFactory, _default as default, generate, getKnowledgeGateway, initSlideGenerator, validate };
|
|
2198
|
+
export { type AccessibilityResults, AutoFixEngine, type AutoFixResult, type ChartData, type ChartDataset, ChartJsProvider, type ChartProvider, type ChartRequest, type ChartResult, type ChartType, type ColorPalette, CompositeChartProvider, CompositeImageProvider, type ContentAnalysis$1 as ContentAnalysis, ContentAnalyzer, type ContentPattern, ContentPatternClassifier, type ContentQAResults, type ContentSection$1 as ContentSection, type ContrastIssue, type DimensionIssue, type DimensionScore, type ExpertQAResults, type ExpertValidation, type FixResult, type FontSizeIssue, type GlanceTestResult, type ImageData, type ImageProvider, type ImageRequest, type ImageResult, type IterationRecord, IterativeQAEngine, type IterativeQAOptions, type IterativeQAResult, KnowledgeGateway, type LegacySlide, 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 ScoringWeights, type SevenDimensionQAResult, type SevenDimensionResult, SevenDimensionScorer, type SignalNoiseResult, type Slide, type SlideContentScore, type SlideData, SlideFactory, SlideGenerator, type SlideTemplate, type SlideType, type SlideValidationResult, type SlideVisualScore, type SparklineStructure, type StoryStructure, TemplateEngine, TemplateNotFoundError, type ThemeName, type TypographyRules, UnsplashImageProvider, VERSION, ValidationError, type ValidationRules, type VisualQAResults, createAutoFixEngine, createDefaultChartProvider, createDefaultImageProvider, createIterativeQAEngine, createSlideFactory, _default as default, generate, getKnowledgeGateway, initSlideGenerator, validate };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module types
|
|
4
4
|
*/
|
|
5
5
|
type PresentationMode$1 = 'keynote' | 'business';
|
|
6
|
-
type OutputFormat = 'html' | 'pptx';
|
|
6
|
+
type OutputFormat = 'html' | 'pptx' | 'pdf';
|
|
7
7
|
type ThemeName = 'default' | 'light-corporate' | 'modern-tech' | 'minimal' | 'warm' | 'creative';
|
|
8
8
|
type PresentationType$1 = 'ted_keynote' | 'sales_pitch' | 'consulting_deck' | 'investment_banking' | 'investor_pitch' | 'technical_presentation' | 'all_hands';
|
|
9
9
|
interface PresentationConfig {
|
|
@@ -45,6 +45,8 @@ interface PresentationConfig {
|
|
|
45
45
|
images?: string[];
|
|
46
46
|
/** Base path for resolving image paths */
|
|
47
47
|
imageBasePath?: string;
|
|
48
|
+
/** Generate PDF alongside HTML (default: true when format includes 'html') */
|
|
49
|
+
generatePdf?: boolean;
|
|
48
50
|
}
|
|
49
51
|
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';
|
|
50
52
|
interface Slide {
|
|
@@ -96,6 +98,26 @@ interface MetricData {
|
|
|
96
98
|
change?: string;
|
|
97
99
|
trend?: 'up' | 'down' | 'neutral';
|
|
98
100
|
}
|
|
101
|
+
/** Legacy slide format for backwards compatibility */
|
|
102
|
+
interface LegacySlide {
|
|
103
|
+
index: number;
|
|
104
|
+
type: string;
|
|
105
|
+
title: string;
|
|
106
|
+
content: {
|
|
107
|
+
subtitle?: string | undefined;
|
|
108
|
+
statement?: string | undefined;
|
|
109
|
+
body?: string | undefined;
|
|
110
|
+
bullets?: string[] | undefined;
|
|
111
|
+
metrics?: MetricData[] | undefined;
|
|
112
|
+
quote?: {
|
|
113
|
+
text: string;
|
|
114
|
+
attribution?: string | undefined;
|
|
115
|
+
} | undefined;
|
|
116
|
+
callToAction?: string | undefined;
|
|
117
|
+
};
|
|
118
|
+
notes?: string | undefined;
|
|
119
|
+
template: string;
|
|
120
|
+
}
|
|
99
121
|
interface QAResults {
|
|
100
122
|
/** Visual quality results */
|
|
101
123
|
visual: VisualQAResults;
|
|
@@ -157,7 +179,7 @@ interface GlanceTestResult {
|
|
|
157
179
|
wordCount: number;
|
|
158
180
|
readingTime: number;
|
|
159
181
|
passed: boolean;
|
|
160
|
-
recommendation?: string;
|
|
182
|
+
recommendation?: string | undefined;
|
|
161
183
|
}
|
|
162
184
|
interface SignalNoiseResult {
|
|
163
185
|
slideIndex: number;
|
|
@@ -172,7 +194,7 @@ interface OneIdeaResult {
|
|
|
172
194
|
ideaCount: number;
|
|
173
195
|
mainIdea: string;
|
|
174
196
|
passed: boolean;
|
|
175
|
-
conflictingIdeas?: string[];
|
|
197
|
+
conflictingIdeas?: string[] | undefined;
|
|
176
198
|
}
|
|
177
199
|
interface ExpertQAResults {
|
|
178
200
|
/** Nancy Duarte validation */
|
|
@@ -229,11 +251,47 @@ interface QAIssue {
|
|
|
229
251
|
/** Suggested fix */
|
|
230
252
|
suggestion?: string;
|
|
231
253
|
}
|
|
254
|
+
/** Result from 7-dimension QA scoring */
|
|
255
|
+
interface SevenDimensionQAResult {
|
|
256
|
+
passed: boolean;
|
|
257
|
+
score: number;
|
|
258
|
+
visual: {
|
|
259
|
+
whitespacePercentage: number;
|
|
260
|
+
layoutBalance: number;
|
|
261
|
+
colorContrast: number;
|
|
262
|
+
};
|
|
263
|
+
content: {
|
|
264
|
+
perSlide: SlideContentScore[];
|
|
265
|
+
issues: Array<{
|
|
266
|
+
dimension: string;
|
|
267
|
+
message: string;
|
|
268
|
+
slideIndex?: number;
|
|
269
|
+
}>;
|
|
270
|
+
};
|
|
271
|
+
accessibility: {
|
|
272
|
+
wcagLevel: string;
|
|
273
|
+
issues: Array<{
|
|
274
|
+
dimension: string;
|
|
275
|
+
message: string;
|
|
276
|
+
slideIndex?: number;
|
|
277
|
+
}>;
|
|
278
|
+
};
|
|
279
|
+
issues: Array<{
|
|
280
|
+
severity: string;
|
|
281
|
+
message: string;
|
|
282
|
+
slideIndex?: number;
|
|
283
|
+
dimension: string;
|
|
284
|
+
}>;
|
|
285
|
+
dimensions: Record<string, number>;
|
|
286
|
+
iterations: unknown[];
|
|
287
|
+
report: string;
|
|
288
|
+
}
|
|
232
289
|
interface PresentationResult {
|
|
233
290
|
/** Generated outputs */
|
|
234
291
|
outputs: {
|
|
235
292
|
html?: string;
|
|
236
293
|
pptx?: Buffer;
|
|
294
|
+
pdf?: Buffer;
|
|
237
295
|
};
|
|
238
296
|
/** QA validation results */
|
|
239
297
|
qaResults: QAResults;
|
|
@@ -296,6 +354,8 @@ interface ContentAnalysis$1 {
|
|
|
296
354
|
detectedType: PresentationType$1;
|
|
297
355
|
/** Main title */
|
|
298
356
|
title: string;
|
|
357
|
+
/** Subtitle (line after title) */
|
|
358
|
+
subtitle?: string;
|
|
299
359
|
/** Content sections */
|
|
300
360
|
sections: ContentSection$1[];
|
|
301
361
|
/** SCQA structure extracted */
|
|
@@ -457,6 +517,7 @@ declare class PresentationEngine {
|
|
|
457
517
|
private qaEngine;
|
|
458
518
|
private htmlGenerator;
|
|
459
519
|
private pptxGenerator;
|
|
520
|
+
private pdfGenerator;
|
|
460
521
|
private kb;
|
|
461
522
|
constructor();
|
|
462
523
|
/**
|
|
@@ -555,6 +616,7 @@ interface ColorPalette {
|
|
|
555
616
|
contrast_ratio: string;
|
|
556
617
|
}
|
|
557
618
|
type PresentationType = 'ted_keynote' | 'sales_pitch' | 'consulting_deck' | 'investment_banking' | 'investor_pitch' | 'technical_presentation' | 'all_hands';
|
|
619
|
+
type KnowledgeBaseData = Record<string, any>;
|
|
558
620
|
declare class KnowledgeGateway {
|
|
559
621
|
private kb;
|
|
560
622
|
private loaded;
|
|
@@ -629,11 +691,11 @@ declare class KnowledgeGateway {
|
|
|
629
691
|
/**
|
|
630
692
|
* Get story framework by name
|
|
631
693
|
*/
|
|
632
|
-
getStoryFramework(name: 'sparkline' | 'scqa' | 'pyramid' | 'scr'):
|
|
694
|
+
getStoryFramework(name: 'sparkline' | 'scqa' | 'pyramid' | 'scr'): unknown;
|
|
633
695
|
/**
|
|
634
696
|
* Get expert principles by name
|
|
635
697
|
*/
|
|
636
|
-
getExpertPrinciples(expertName: string):
|
|
698
|
+
getExpertPrinciples(expertName: string): unknown;
|
|
637
699
|
/**
|
|
638
700
|
* Get Duarte's glance test requirements
|
|
639
701
|
*/
|
|
@@ -657,7 +719,7 @@ declare class KnowledgeGateway {
|
|
|
657
719
|
/**
|
|
658
720
|
* Get chart selection guidance
|
|
659
721
|
*/
|
|
660
|
-
getChartGuidance(purpose: 'comparison' | 'composition' | 'distribution' | 'relationship'):
|
|
722
|
+
getChartGuidance(purpose: 'comparison' | 'composition' | 'distribution' | 'relationship'): unknown;
|
|
661
723
|
/**
|
|
662
724
|
* Get charts to avoid
|
|
663
725
|
*/
|
|
@@ -665,7 +727,7 @@ declare class KnowledgeGateway {
|
|
|
665
727
|
/**
|
|
666
728
|
* Get investment banking pitch book structure
|
|
667
729
|
*/
|
|
668
|
-
getIBPitchBookStructure(type: 'ma_sell_side' | 'ma_buy_side' | 'ipo_pitchbook'):
|
|
730
|
+
getIBPitchBookStructure(type: 'ma_sell_side' | 'ma_buy_side' | 'ipo_pitchbook'): unknown;
|
|
669
731
|
/**
|
|
670
732
|
* Check if knowledge base is loaded
|
|
671
733
|
*/
|
|
@@ -673,7 +735,7 @@ declare class KnowledgeGateway {
|
|
|
673
735
|
/**
|
|
674
736
|
* Get the full knowledge base (for advanced queries)
|
|
675
737
|
*/
|
|
676
|
-
getRawKB():
|
|
738
|
+
getRawKB(): KnowledgeBaseData;
|
|
677
739
|
/**
|
|
678
740
|
* Get allowed slide types for a specific presentation type.
|
|
679
741
|
* CRITICAL: SlideFactory must ONLY use types from this list.
|
|
@@ -890,6 +952,7 @@ interface ContentSection {
|
|
|
890
952
|
interface ContentAnalysis {
|
|
891
953
|
detectedType: PresentationType;
|
|
892
954
|
title: string;
|
|
955
|
+
subtitle: string;
|
|
893
956
|
sections: ContentSection[];
|
|
894
957
|
keyMessages: string[];
|
|
895
958
|
dataPoints: Array<{
|
|
@@ -930,7 +993,12 @@ declare class ContentAnalyzer {
|
|
|
930
993
|
*/
|
|
931
994
|
private parseContent;
|
|
932
995
|
/**
|
|
933
|
-
* Extract the main title from content
|
|
996
|
+
* Extract the main title AND subtitle from content
|
|
997
|
+
* Subtitle is the line immediately after the H1 title (if not another header)
|
|
998
|
+
*/
|
|
999
|
+
private extractTitleAndSubtitle;
|
|
1000
|
+
/**
|
|
1001
|
+
* Extract the main title from content (legacy wrapper)
|
|
934
1002
|
*/
|
|
935
1003
|
private extractTitle;
|
|
936
1004
|
/**
|
|
@@ -995,6 +1063,11 @@ declare class ContentAnalyzer {
|
|
|
995
1063
|
* CRITICAL: Must strip headers, CTA text, and fragments
|
|
996
1064
|
*/
|
|
997
1065
|
private extractFirstSentence;
|
|
1066
|
+
/**
|
|
1067
|
+
* Extract metrics from natural language text
|
|
1068
|
+
* Handles formats like "40% productivity loss", "$2.5M investment"
|
|
1069
|
+
*/
|
|
1070
|
+
private extractMetricsFromText;
|
|
998
1071
|
}
|
|
999
1072
|
|
|
1000
1073
|
/**
|
|
@@ -1198,7 +1271,7 @@ declare class SlideGenerator {
|
|
|
1198
1271
|
* - Content pattern to slide type mapping
|
|
1199
1272
|
* - Slide validation against KB rules
|
|
1200
1273
|
*/
|
|
1201
|
-
generate(analysis: ContentAnalysis$1, type?: PresentationType): Promise<
|
|
1274
|
+
generate(analysis: ContentAnalysis$1, type?: PresentationType): Promise<LegacySlide[]>;
|
|
1202
1275
|
/**
|
|
1203
1276
|
* Convert new Slide format to legacy format for backwards compatibility
|
|
1204
1277
|
*/
|
|
@@ -1358,6 +1431,15 @@ declare class ScoreCalculator {
|
|
|
1358
1431
|
* CRITICAL: All thresholds come from the knowledge base
|
|
1359
1432
|
*/
|
|
1360
1433
|
|
|
1434
|
+
interface RevealApi {
|
|
1435
|
+
getTotalSlides?: () => number;
|
|
1436
|
+
slide?: (index: number) => void;
|
|
1437
|
+
}
|
|
1438
|
+
declare global {
|
|
1439
|
+
interface Window {
|
|
1440
|
+
Reveal?: RevealApi;
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1361
1443
|
declare class QAEngine {
|
|
1362
1444
|
private browser;
|
|
1363
1445
|
private kb;
|
|
@@ -1698,6 +1780,18 @@ declare class RevealJsGenerator {
|
|
|
1698
1780
|
* Lighten a hex color
|
|
1699
1781
|
*/
|
|
1700
1782
|
private lightenColor;
|
|
1783
|
+
/**
|
|
1784
|
+
* Check if a palette is "dark mode" (dark background, light text)
|
|
1785
|
+
*/
|
|
1786
|
+
private isDarkPalette;
|
|
1787
|
+
/**
|
|
1788
|
+
* Get relative luminance of a hex color (0-1, 0=black, 1=white)
|
|
1789
|
+
*/
|
|
1790
|
+
private getLuminance;
|
|
1791
|
+
/**
|
|
1792
|
+
* Darken a hex color
|
|
1793
|
+
*/
|
|
1794
|
+
private darkenColor;
|
|
1701
1795
|
/**
|
|
1702
1796
|
* Get theme-specific styles - KB-DRIVEN
|
|
1703
1797
|
*/
|
|
@@ -2101,4 +2195,4 @@ declare const _default: {
|
|
|
2101
2195
|
VERSION: string;
|
|
2102
2196
|
};
|
|
2103
2197
|
|
|
2104
|
-
export { type AccessibilityResults, AutoFixEngine, type AutoFixResult, type ChartData, type ChartDataset, ChartJsProvider, type ChartProvider, type ChartRequest, type ChartResult, type ChartType, type ColorPalette, CompositeChartProvider, CompositeImageProvider, type ContentAnalysis$1 as ContentAnalysis, ContentAnalyzer, type ContentPattern, ContentPatternClassifier, type ContentQAResults, type ContentSection$1 as ContentSection, type ContrastIssue, type DimensionIssue, type DimensionScore, type ExpertQAResults, type ExpertValidation, type FixResult, type FontSizeIssue, type GlanceTestResult, type ImageData, type ImageProvider, type ImageRequest, type ImageResult, type IterationRecord, IterativeQAEngine, type IterativeQAOptions, type IterativeQAResult, 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 ScoringWeights, type SevenDimensionResult, SevenDimensionScorer, type SignalNoiseResult, type Slide, type SlideContentScore, type SlideData, SlideFactory, SlideGenerator, type SlideTemplate, type SlideType, type SlideValidationResult, type SlideVisualScore, type SparklineStructure, type StoryStructure, TemplateEngine, TemplateNotFoundError, type ThemeName, type TypographyRules, UnsplashImageProvider, VERSION, ValidationError, type ValidationRules, type VisualQAResults, createAutoFixEngine, createDefaultChartProvider, createDefaultImageProvider, createIterativeQAEngine, createSlideFactory, _default as default, generate, getKnowledgeGateway, initSlideGenerator, validate };
|
|
2198
|
+
export { type AccessibilityResults, AutoFixEngine, type AutoFixResult, type ChartData, type ChartDataset, ChartJsProvider, type ChartProvider, type ChartRequest, type ChartResult, type ChartType, type ColorPalette, CompositeChartProvider, CompositeImageProvider, type ContentAnalysis$1 as ContentAnalysis, ContentAnalyzer, type ContentPattern, ContentPatternClassifier, type ContentQAResults, type ContentSection$1 as ContentSection, type ContrastIssue, type DimensionIssue, type DimensionScore, type ExpertQAResults, type ExpertValidation, type FixResult, type FontSizeIssue, type GlanceTestResult, type ImageData, type ImageProvider, type ImageRequest, type ImageResult, type IterationRecord, IterativeQAEngine, type IterativeQAOptions, type IterativeQAResult, KnowledgeGateway, type LegacySlide, 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 ScoringWeights, type SevenDimensionQAResult, type SevenDimensionResult, SevenDimensionScorer, type SignalNoiseResult, type Slide, type SlideContentScore, type SlideData, SlideFactory, SlideGenerator, type SlideTemplate, type SlideType, type SlideValidationResult, type SlideVisualScore, type SparklineStructure, type StoryStructure, TemplateEngine, TemplateNotFoundError, type ThemeName, type TypographyRules, UnsplashImageProvider, VERSION, ValidationError, type ValidationRules, type VisualQAResults, createAutoFixEngine, createDefaultChartProvider, createDefaultImageProvider, createIterativeQAEngine, createSlideFactory, _default as default, generate, getKnowledgeGateway, initSlideGenerator, validate };
|