claude-presentation-master 4.2.0 → 4.4.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 +867 -1535
- package/dist/index.d.ts +867 -1535
- package/dist/index.js +3696 -99483
- package/dist/index.mjs +3626 -7517
- package/package.json +5 -3
- package/dist/BrowserWebSocketTransport-HTFZUK6G.mjs +0 -7
- package/dist/LaunchOptions-SFJP2D7Z.mjs +0 -9
- package/dist/NodeWebSocketTransport-RBVOEJLR.mjs +0 -8
- package/dist/bidi-BVFTPINL.mjs +0 -18501
- package/dist/chunk-3UL3L2R6.mjs +0 -30
- package/dist/chunk-4MOE77QU.mjs +0 -1661
- package/dist/chunk-5NJVL3OH.mjs +0 -31312
- package/dist/chunk-5TVEOHFT.mjs +0 -244
- package/dist/chunk-6D5VEPNW.mjs +0 -12104
- package/dist/chunk-CFGGYLHX.mjs +0 -3684
- package/dist/chunk-EC7LFFYG.mjs +0 -15
- package/dist/chunk-HEBXNMVQ.mjs +0 -48
- package/dist/chunk-KJPJW5EB.mjs +0 -40
- package/dist/chunk-QUYDTLMJ.mjs +0 -775
- package/dist/extract-zip-UJUIS3MT.mjs +0 -1499
- package/dist/helpers-GOUCEJ3S.mjs +0 -17
- package/dist/main-GWERC3XX.mjs +0 -56
- package/dist/puppeteer-EG4MVFUF.mjs +0 -14961
- package/dist/src-HTL2N5EV.mjs +0 -5
- package/dist/tar-fs-NIVQWNBX.mjs +0 -2562
- package/dist/yargs-COGWK7P3.mjs +0 -3230
package/dist/index.d.mts
CHANGED
|
@@ -1,237 +1,269 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Claude Presentation Master - Type Definitions
|
|
3
|
-
*
|
|
4
|
-
* Clean rewrite: All types for KB-driven presentation generation.
|
|
5
|
-
* Every decision comes from the Knowledge Base - no hardcoded fallbacks.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* The 7 distinct presentation types, each with its own validation rules.
|
|
9
|
-
* These come from KB path: presentation_types.<type>
|
|
10
|
-
*/
|
|
11
|
-
type PresentationType = 'ted_keynote' | 'sales_pitch' | 'consulting_deck' | 'investment_banking' | 'investor_pitch' | 'technical_presentation' | 'all_hands';
|
|
12
|
-
/**
|
|
13
|
-
* Legacy mode for backwards compatibility
|
|
3
|
+
* @module types
|
|
14
4
|
*/
|
|
15
5
|
type PresentationMode = 'keynote' | 'business';
|
|
16
6
|
type OutputFormat = 'html' | 'pptx';
|
|
17
|
-
type
|
|
7
|
+
type ThemeName = 'default' | 'light-corporate' | 'modern-tech' | 'minimal' | 'warm' | 'creative';
|
|
8
|
+
interface PresentationConfig {
|
|
9
|
+
/** Input content (Markdown, JSON, YAML, or plain text) */
|
|
10
|
+
content: string;
|
|
11
|
+
/** Content format */
|
|
12
|
+
contentType: 'markdown' | 'json' | 'yaml' | 'text';
|
|
13
|
+
/** Presentation mode: keynote (6-25 words/slide) or business (40-80 words/slide) */
|
|
14
|
+
mode: PresentationMode;
|
|
15
|
+
/** Output formats to generate */
|
|
16
|
+
format: OutputFormat[];
|
|
17
|
+
/** Visual theme */
|
|
18
|
+
theme?: ThemeName;
|
|
19
|
+
/** Minimum QA score required (0-100, default: 95) */
|
|
20
|
+
qaThreshold?: number;
|
|
21
|
+
/** Skip QA validation (NOT RECOMMENDED) */
|
|
22
|
+
skipQA?: boolean;
|
|
23
|
+
/** Presentation title */
|
|
24
|
+
title: string;
|
|
25
|
+
/** Author name */
|
|
26
|
+
author?: string;
|
|
27
|
+
/** Subject/description */
|
|
28
|
+
subject?: string;
|
|
29
|
+
/** Output directory */
|
|
30
|
+
output?: string;
|
|
31
|
+
/** Minify HTML output */
|
|
32
|
+
minify?: boolean;
|
|
33
|
+
/** Custom CSS to inject */
|
|
34
|
+
customCSS?: string;
|
|
35
|
+
/** Custom Handlebars templates */
|
|
36
|
+
customTemplates?: Record<string, string>;
|
|
37
|
+
}
|
|
38
|
+
type SlideType = 'title' | 'agenda' | 'section-divider' | 'thank-you' | 'big-idea' | 'single-statement' | 'big-number' | 'full-image' | 'quote' | 'two-column' | 'three-column' | 'bullet-points' | 'screenshot' | 'screenshot-left' | 'screenshot-right' | 'comparison' | 'timeline' | 'process' | 'metrics-grid' | 'pricing' | 'team' | 'features' | 'chart' | 'table' | 'social-proof' | 'case-study' | 'cta';
|
|
18
39
|
interface Slide {
|
|
19
40
|
/** Slide index (0-based) */
|
|
20
41
|
index: number;
|
|
21
|
-
/** Slide type
|
|
22
|
-
type: SlideType
|
|
23
|
-
/** Slide
|
|
42
|
+
/** Slide type */
|
|
43
|
+
type: SlideType;
|
|
44
|
+
/** Slide data for template rendering */
|
|
24
45
|
data: SlideData;
|
|
25
|
-
/**
|
|
26
|
-
|
|
46
|
+
/** CSS classes to apply */
|
|
47
|
+
classes?: string[];
|
|
48
|
+
/** Custom styles */
|
|
49
|
+
styles?: Record<string, string>;
|
|
27
50
|
/** Speaker notes */
|
|
28
51
|
notes?: string;
|
|
29
52
|
}
|
|
30
53
|
interface SlideData {
|
|
31
|
-
/** Main title
|
|
54
|
+
/** Main title */
|
|
32
55
|
title?: string;
|
|
33
56
|
/** Subtitle */
|
|
34
57
|
subtitle?: string;
|
|
35
|
-
/** Body
|
|
58
|
+
/** Body content */
|
|
36
59
|
body?: string;
|
|
37
60
|
/** Bullet points */
|
|
38
61
|
bullets?: string[];
|
|
39
|
-
/** Key message
|
|
62
|
+
/** Key message */
|
|
40
63
|
keyMessage?: string;
|
|
64
|
+
/** Images */
|
|
65
|
+
images?: ImageData[];
|
|
66
|
+
/** Metrics/KPIs */
|
|
67
|
+
metrics?: MetricData[];
|
|
41
68
|
/** Quote text */
|
|
42
69
|
quote?: string;
|
|
43
70
|
/** Quote attribution */
|
|
44
71
|
attribution?: string;
|
|
45
|
-
/**
|
|
46
|
-
metrics?: MetricData$1[];
|
|
47
|
-
/** Source citation (required for consulting/IB) */
|
|
72
|
+
/** Source citation */
|
|
48
73
|
source?: string;
|
|
49
|
-
/** Callout text (for data slides) */
|
|
50
|
-
callout?: string;
|
|
51
|
-
/** Background image path (local file or URL) */
|
|
52
|
-
image?: string;
|
|
53
74
|
/** Additional custom data */
|
|
54
75
|
[key: string]: unknown;
|
|
55
76
|
}
|
|
56
|
-
interface
|
|
77
|
+
interface ImageData {
|
|
78
|
+
src: string;
|
|
79
|
+
alt: string;
|
|
80
|
+
caption?: string;
|
|
81
|
+
}
|
|
82
|
+
interface MetricData {
|
|
57
83
|
value: string | number;
|
|
58
84
|
label: string;
|
|
59
85
|
change?: string;
|
|
60
86
|
trend?: 'up' | 'down' | 'neutral';
|
|
61
87
|
}
|
|
62
|
-
interface
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
accessibility: CategoryScore;
|
|
73
|
-
/** Did this slide pass? */
|
|
88
|
+
interface QAResults {
|
|
89
|
+
/** Visual quality results */
|
|
90
|
+
visual: VisualQAResults;
|
|
91
|
+
/** Content quality results */
|
|
92
|
+
content: ContentQAResults;
|
|
93
|
+
/** Expert methodology compliance */
|
|
94
|
+
expert: ExpertQAResults;
|
|
95
|
+
/** Accessibility compliance */
|
|
96
|
+
accessibility: AccessibilityResults;
|
|
97
|
+
/** Overall pass/fail */
|
|
74
98
|
passed: boolean;
|
|
75
|
-
/**
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
interface
|
|
79
|
-
/**
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/** What was found */
|
|
100
|
-
actual: string;
|
|
101
|
-
/** How to fix it */
|
|
102
|
-
fix: string;
|
|
103
|
-
}
|
|
104
|
-
interface DeckScore {
|
|
105
|
-
/** Overall deck score (0-100) */
|
|
106
|
-
total: number;
|
|
107
|
-
/** Individual slide scores */
|
|
108
|
-
slideScores: SlideScore[];
|
|
109
|
-
/** Holistic checks */
|
|
110
|
-
holistic: HolisticScore;
|
|
111
|
-
/** Did the deck pass? */
|
|
99
|
+
/** List of issues found */
|
|
100
|
+
issues: QAIssue[];
|
|
101
|
+
}
|
|
102
|
+
interface VisualQAResults {
|
|
103
|
+
/** Whitespace percentage (target: 35%+ keynote, 25%+ business) */
|
|
104
|
+
whitespacePercentage: number;
|
|
105
|
+
/** Layout balance score (0-1) */
|
|
106
|
+
layoutBalance: number;
|
|
107
|
+
/** Contrast ratio (target: 4.5+) */
|
|
108
|
+
contrastRatio: number;
|
|
109
|
+
/** Number of font families used (target: ≤2) */
|
|
110
|
+
fontFamilies: number;
|
|
111
|
+
/** Number of colors used */
|
|
112
|
+
colorCount: number;
|
|
113
|
+
/** Screenshots of each slide */
|
|
114
|
+
screenshots: Buffer[];
|
|
115
|
+
/** Per-slide visual scores */
|
|
116
|
+
perSlide: SlideVisualScore[];
|
|
117
|
+
}
|
|
118
|
+
interface SlideVisualScore {
|
|
119
|
+
slideIndex: number;
|
|
120
|
+
whitespace: number;
|
|
121
|
+
balance: number;
|
|
122
|
+
contrast: number;
|
|
112
123
|
passed: boolean;
|
|
113
|
-
|
|
114
|
-
violations: Violation[];
|
|
124
|
+
issues: string[];
|
|
115
125
|
}
|
|
116
|
-
interface
|
|
117
|
-
/**
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
|
|
126
|
+
interface ContentQAResults {
|
|
127
|
+
/** Per-slide content analysis */
|
|
128
|
+
perSlide: SlideContentScore[];
|
|
129
|
+
/** Glance test results */
|
|
130
|
+
glanceTest: GlanceTestResult[];
|
|
131
|
+
/** Signal-to-noise ratio results */
|
|
132
|
+
signalNoise: SignalNoiseResult[];
|
|
133
|
+
/** One idea per slide validation */
|
|
134
|
+
oneIdea: OneIdeaResult[];
|
|
135
|
+
}
|
|
136
|
+
interface SlideContentScore {
|
|
137
|
+
slideIndex: number;
|
|
138
|
+
wordCount: number;
|
|
139
|
+
withinLimit: boolean;
|
|
140
|
+
hasActionTitle: boolean;
|
|
141
|
+
issues: string[];
|
|
125
142
|
}
|
|
126
|
-
interface
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
slide_types_allowed: string[];
|
|
134
|
-
required_elements: string[];
|
|
135
|
-
anti_patterns: string[];
|
|
136
|
-
color_palette: string;
|
|
137
|
-
typography: KBTypography;
|
|
138
|
-
scoring_weights: KBScoringWeights;
|
|
143
|
+
interface GlanceTestResult {
|
|
144
|
+
slideIndex: number;
|
|
145
|
+
keyMessage: string;
|
|
146
|
+
wordCount: number;
|
|
147
|
+
readingTime: number;
|
|
148
|
+
passed: boolean;
|
|
149
|
+
recommendation?: string;
|
|
139
150
|
}
|
|
140
|
-
interface
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
min: number;
|
|
148
|
-
ideal: number;
|
|
149
|
-
max?: number;
|
|
150
|
-
};
|
|
151
|
-
bullets_per_slide: {
|
|
152
|
-
max: number;
|
|
153
|
-
};
|
|
154
|
-
action_titles_required: boolean;
|
|
155
|
-
sources_required: boolean;
|
|
156
|
-
callouts_required?: boolean;
|
|
157
|
-
dense_data_allowed?: boolean;
|
|
151
|
+
interface SignalNoiseResult {
|
|
152
|
+
slideIndex: number;
|
|
153
|
+
signalCount: number;
|
|
154
|
+
noiseCount: number;
|
|
155
|
+
signalRatio: number;
|
|
156
|
+
passed: boolean;
|
|
157
|
+
noiseElements: string[];
|
|
158
158
|
}
|
|
159
|
-
interface
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
interface OneIdeaResult {
|
|
160
|
+
slideIndex: number;
|
|
161
|
+
ideaCount: number;
|
|
162
|
+
mainIdea: string;
|
|
163
|
+
passed: boolean;
|
|
164
|
+
conflictingIdeas?: string[];
|
|
165
|
+
}
|
|
166
|
+
interface ExpertQAResults {
|
|
167
|
+
/** Nancy Duarte validation */
|
|
168
|
+
duarte: ExpertValidation;
|
|
169
|
+
/** Garr Reynolds validation */
|
|
170
|
+
reynolds: ExpertValidation;
|
|
171
|
+
/** Carmine Gallo validation */
|
|
172
|
+
gallo: ExpertValidation;
|
|
173
|
+
/** Chris Anderson validation */
|
|
174
|
+
anderson: ExpertValidation;
|
|
175
|
+
}
|
|
176
|
+
interface ExpertValidation {
|
|
177
|
+
expertName: string;
|
|
178
|
+
principlesChecked: string[];
|
|
179
|
+
passed: boolean;
|
|
180
|
+
score: number;
|
|
181
|
+
violations: string[];
|
|
182
|
+
}
|
|
183
|
+
interface AccessibilityResults {
|
|
184
|
+
/** WCAG compliance level achieved */
|
|
185
|
+
wcagLevel: 'A' | 'AA' | 'AAA' | 'FAIL';
|
|
186
|
+
/** Contrast issues found */
|
|
187
|
+
contrastIssues: ContrastIssue[];
|
|
188
|
+
/** Font size issues */
|
|
189
|
+
fontSizeIssues: FontSizeIssue[];
|
|
190
|
+
/** Focus state coverage */
|
|
191
|
+
focusCoverage: number;
|
|
192
|
+
/** Color-blind safety */
|
|
193
|
+
colorBlindSafe: boolean;
|
|
194
|
+
}
|
|
195
|
+
interface ContrastIssue {
|
|
196
|
+
slideIndex: number;
|
|
197
|
+
element: string;
|
|
198
|
+
foreground: string;
|
|
199
|
+
background: string;
|
|
200
|
+
ratio: number;
|
|
201
|
+
required: number;
|
|
166
202
|
}
|
|
167
|
-
interface
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
203
|
+
interface FontSizeIssue {
|
|
204
|
+
slideIndex: number;
|
|
205
|
+
element: string;
|
|
206
|
+
actualSize: number;
|
|
207
|
+
minimumSize: number;
|
|
208
|
+
}
|
|
209
|
+
interface QAIssue {
|
|
210
|
+
/** Issue severity */
|
|
211
|
+
severity: 'error' | 'warning' | 'info';
|
|
212
|
+
/** Issue category */
|
|
213
|
+
category: 'visual' | 'content' | 'expert' | 'accessibility';
|
|
214
|
+
/** Slide index (if applicable) */
|
|
215
|
+
slideIndex?: number;
|
|
216
|
+
/** Issue description */
|
|
217
|
+
message: string;
|
|
218
|
+
/** Suggested fix */
|
|
219
|
+
suggestion?: string;
|
|
172
220
|
}
|
|
173
|
-
interface
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
content_quality: KBScoringCategory;
|
|
179
|
-
expert_compliance: KBScoringCategory;
|
|
180
|
-
accessibility: KBScoringCategory;
|
|
221
|
+
interface PresentationResult {
|
|
222
|
+
/** Generated outputs */
|
|
223
|
+
outputs: {
|
|
224
|
+
html?: string;
|
|
225
|
+
pptx?: Buffer;
|
|
181
226
|
};
|
|
227
|
+
/** QA validation results */
|
|
228
|
+
qaResults: QAResults;
|
|
229
|
+
/** Overall QA score (0-100) */
|
|
230
|
+
score: number;
|
|
231
|
+
/** Presentation metadata */
|
|
232
|
+
metadata: PresentationMetadata;
|
|
182
233
|
}
|
|
183
|
-
interface
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
234
|
+
interface PresentationMetadata {
|
|
235
|
+
/** Presentation title */
|
|
236
|
+
title: string;
|
|
237
|
+
/** Author */
|
|
238
|
+
author: string;
|
|
239
|
+
/** Generation timestamp */
|
|
240
|
+
generatedAt: string;
|
|
241
|
+
/** Presentation mode */
|
|
242
|
+
mode: PresentationMode;
|
|
243
|
+
/** Total slide count */
|
|
244
|
+
slideCount: number;
|
|
245
|
+
/** Total word count */
|
|
246
|
+
wordCount: number;
|
|
247
|
+
/** Average words per slide */
|
|
248
|
+
avgWordsPerSlide: number;
|
|
249
|
+
/** Estimated presentation duration (minutes) */
|
|
250
|
+
estimatedDuration: number;
|
|
251
|
+
/** Themes/frameworks used */
|
|
252
|
+
frameworks: string[];
|
|
200
253
|
}
|
|
201
254
|
interface ContentAnalysis {
|
|
202
|
-
/**
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
sections: ContentSection[];
|
|
208
|
-
/** Key messages */
|
|
255
|
+
/** SCQA structure extracted */
|
|
256
|
+
scqa: SCQAStructure;
|
|
257
|
+
/** Sparkline narrative arc */
|
|
258
|
+
sparkline: SparklineStructure;
|
|
259
|
+
/** Key messages identified */
|
|
209
260
|
keyMessages: string[];
|
|
210
|
-
/**
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
interface ContentSection {
|
|
218
|
-
/** Section header */
|
|
219
|
-
header: string;
|
|
220
|
-
/** Header level (1-6) */
|
|
221
|
-
level: number;
|
|
222
|
-
/** Raw content */
|
|
223
|
-
content: string;
|
|
224
|
-
/** Extracted bullets */
|
|
225
|
-
bullets: string[];
|
|
226
|
-
/** Metrics in this section */
|
|
227
|
-
metrics: DataPoint[];
|
|
228
|
-
}
|
|
229
|
-
interface DataPoint {
|
|
230
|
-
value: string;
|
|
231
|
-
numericValue?: number;
|
|
232
|
-
type: 'currency' | 'percentage' | 'number' | 'time';
|
|
233
|
-
context: string;
|
|
234
|
-
label?: string;
|
|
261
|
+
/** Generated action titles */
|
|
262
|
+
titles: string[];
|
|
263
|
+
/** STAR moments identified */
|
|
264
|
+
starMoments: string[];
|
|
265
|
+
/** Estimated slide count */
|
|
266
|
+
estimatedSlideCount: number;
|
|
235
267
|
}
|
|
236
268
|
interface SCQAStructure {
|
|
237
269
|
situation: string;
|
|
@@ -242,1636 +274,936 @@ interface SCQAStructure {
|
|
|
242
274
|
interface SparklineStructure {
|
|
243
275
|
whatIs: string[];
|
|
244
276
|
whatCouldBe: string[];
|
|
245
|
-
starMoment?: string;
|
|
246
277
|
callToAdventure: string;
|
|
247
278
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
html?: string;
|
|
252
|
-
pptx?: Buffer;
|
|
253
|
-
};
|
|
254
|
-
/** Slides generated */
|
|
255
|
-
slides: Slide[];
|
|
256
|
-
/** Final deck score */
|
|
257
|
-
score: DeckScore;
|
|
258
|
-
/** Metadata */
|
|
259
|
-
metadata: PresentationMetadata;
|
|
279
|
+
declare class ValidationError extends Error {
|
|
280
|
+
errors: string[];
|
|
281
|
+
constructor(errors: string[], message?: string);
|
|
260
282
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
283
|
+
declare class QAFailureError extends Error {
|
|
284
|
+
score: number;
|
|
285
|
+
threshold: number;
|
|
286
|
+
qaResults: QAResults;
|
|
287
|
+
constructor(score: number, threshold: number, qaResults: QAResults, message?: string);
|
|
288
|
+
getIssues(): string[];
|
|
289
|
+
}
|
|
290
|
+
declare class TemplateNotFoundError extends Error {
|
|
291
|
+
templatePath: string;
|
|
292
|
+
constructor(templatePath: string, message?: string);
|
|
270
293
|
}
|
|
271
294
|
|
|
272
295
|
/**
|
|
273
|
-
*
|
|
296
|
+
* Presentation Engine - Main Orchestrator
|
|
274
297
|
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
* Every decision in this application comes from the KB.
|
|
298
|
+
* Coordinates content analysis, slide generation, and QA validation
|
|
299
|
+
* to produce world-class presentations.
|
|
278
300
|
*/
|
|
279
301
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
*/
|
|
290
|
-
declare class KnowledgeGateway {
|
|
291
|
-
private data;
|
|
292
|
-
private loaded;
|
|
293
|
-
private version;
|
|
294
|
-
/**
|
|
295
|
-
* Load the knowledge base from YAML.
|
|
296
|
-
* MUST be called before any queries.
|
|
297
|
-
*/
|
|
298
|
-
load(): Promise<void>;
|
|
299
|
-
/**
|
|
300
|
-
* Get KB version
|
|
301
|
-
*/
|
|
302
|
-
getVersion(): string;
|
|
303
|
-
/**
|
|
304
|
-
* Get complete presentation type configuration.
|
|
305
|
-
* @throws KBQueryError if type not found
|
|
306
|
-
*/
|
|
307
|
-
getPresentationType(type: PresentationType): KBResult<KBPresentationType>;
|
|
308
|
-
/**
|
|
309
|
-
* Get validation rules for a presentation type.
|
|
310
|
-
* @throws KBQueryError if rules not found
|
|
311
|
-
*/
|
|
312
|
-
getValidationRules(type: PresentationType): KBResult<KBValidationRules>;
|
|
313
|
-
/**
|
|
314
|
-
* Get word limits for a presentation type.
|
|
315
|
-
*/
|
|
316
|
-
getWordLimits(type: PresentationType): KBResult<{
|
|
317
|
-
min: number;
|
|
318
|
-
max: number;
|
|
319
|
-
ideal: number;
|
|
320
|
-
}>;
|
|
321
|
-
/**
|
|
322
|
-
* Get whitespace requirements.
|
|
323
|
-
*/
|
|
324
|
-
getWhitespaceRules(type: PresentationType): KBResult<{
|
|
325
|
-
min: number;
|
|
326
|
-
ideal: number;
|
|
327
|
-
max?: number;
|
|
328
|
-
}>;
|
|
329
|
-
/**
|
|
330
|
-
* Get scoring weights for a presentation type.
|
|
331
|
-
*/
|
|
332
|
-
getScoringWeights(type: PresentationType): KBResult<KBScoringWeights>;
|
|
333
|
-
/**
|
|
334
|
-
* Get allowed slide types for a presentation type.
|
|
335
|
-
*/
|
|
336
|
-
getAllowedSlideTypes(type: PresentationType): KBResult<string[]>;
|
|
337
|
-
/**
|
|
338
|
-
* Get required elements for a presentation type.
|
|
339
|
-
*/
|
|
340
|
-
getRequiredElements(type: PresentationType): KBResult<string[]>;
|
|
341
|
-
/**
|
|
342
|
-
* Get anti-patterns to avoid for a presentation type.
|
|
343
|
-
*/
|
|
344
|
-
getAntiPatterns(type: PresentationType): KBResult<string[]>;
|
|
345
|
-
/**
|
|
346
|
-
* Get the scoring rubric.
|
|
347
|
-
*/
|
|
348
|
-
getScoringRubric(): KBResult<KBScoringRubric>;
|
|
349
|
-
/**
|
|
350
|
-
* Get passing threshold (default: 95).
|
|
351
|
-
*/
|
|
352
|
-
getPassingThreshold(): KBResult<number>;
|
|
353
|
-
/**
|
|
354
|
-
* Get expert methodology.
|
|
355
|
-
*/
|
|
356
|
-
getExpert(name: string): KBResult<KBExpert>;
|
|
302
|
+
declare class PresentationEngine {
|
|
303
|
+
private contentAnalyzer;
|
|
304
|
+
private slideFactory;
|
|
305
|
+
private templateEngine;
|
|
306
|
+
private scoreCalculator;
|
|
307
|
+
private qaEngine;
|
|
308
|
+
private htmlGenerator;
|
|
309
|
+
private pptxGenerator;
|
|
310
|
+
constructor();
|
|
357
311
|
/**
|
|
358
|
-
*
|
|
312
|
+
* Generate a presentation from content.
|
|
313
|
+
*
|
|
314
|
+
* @param config - Presentation configuration
|
|
315
|
+
* @returns Presentation result with outputs, QA results, and score
|
|
359
316
|
*/
|
|
360
|
-
|
|
361
|
-
description: string;
|
|
362
|
-
word_limit: number;
|
|
363
|
-
}>;
|
|
317
|
+
generate(config: PresentationConfig): Promise<PresentationResult>;
|
|
364
318
|
/**
|
|
365
|
-
*
|
|
319
|
+
* Validate presentation configuration.
|
|
366
320
|
*/
|
|
367
|
-
|
|
321
|
+
private validateConfig;
|
|
368
322
|
/**
|
|
369
|
-
*
|
|
323
|
+
* Validate slide structure before generation.
|
|
370
324
|
*/
|
|
371
|
-
|
|
325
|
+
private validateStructure;
|
|
372
326
|
/**
|
|
373
|
-
*
|
|
327
|
+
* Count words in a slide.
|
|
374
328
|
*/
|
|
375
|
-
|
|
376
|
-
principle: string;
|
|
377
|
-
application: string[];
|
|
378
|
-
}>;
|
|
329
|
+
private countWords;
|
|
379
330
|
/**
|
|
380
|
-
*
|
|
331
|
+
* Build presentation metadata.
|
|
381
332
|
*/
|
|
382
|
-
|
|
333
|
+
private buildMetadata;
|
|
383
334
|
/**
|
|
384
|
-
*
|
|
335
|
+
* Detect which expert frameworks were applied.
|
|
385
336
|
*/
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
337
|
+
private detectFrameworks;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Content Analyzer - Extracts Structure from Raw Content
|
|
342
|
+
*
|
|
343
|
+
* Uses expert methodologies to analyze content and extract:
|
|
344
|
+
* - SCQA structure (Barbara Minto)
|
|
345
|
+
* - Sparkline narrative arc (Nancy Duarte)
|
|
346
|
+
* - Key messages (Rule of Three)
|
|
347
|
+
* - STAR moments
|
|
348
|
+
* - Action titles
|
|
349
|
+
*/
|
|
350
|
+
|
|
351
|
+
declare class ContentAnalyzer {
|
|
352
|
+
private readonly situationSignals;
|
|
353
|
+
private readonly complicationSignals;
|
|
354
|
+
private readonly questionSignals;
|
|
355
|
+
private readonly answerSignals;
|
|
356
|
+
private readonly whatIsSignals;
|
|
357
|
+
private readonly whatCouldBeSignals;
|
|
390
358
|
/**
|
|
391
|
-
*
|
|
359
|
+
* Analyze content and extract structural elements.
|
|
392
360
|
*/
|
|
393
|
-
|
|
361
|
+
analyze(content: string, contentType: string): Promise<ContentAnalysis>;
|
|
394
362
|
/**
|
|
395
|
-
*
|
|
363
|
+
* Parse content based on its type.
|
|
396
364
|
*/
|
|
397
|
-
|
|
365
|
+
private parseContent;
|
|
398
366
|
/**
|
|
399
|
-
*
|
|
367
|
+
* Parse markdown content to plain text (preserving structure hints).
|
|
400
368
|
*/
|
|
401
|
-
|
|
369
|
+
private parseMarkdown;
|
|
402
370
|
/**
|
|
403
|
-
*
|
|
371
|
+
* Parse JSON content.
|
|
404
372
|
*/
|
|
405
|
-
|
|
373
|
+
private parseJSON;
|
|
406
374
|
/**
|
|
407
|
-
*
|
|
375
|
+
* Parse YAML content.
|
|
408
376
|
*/
|
|
409
|
-
|
|
377
|
+
private parseYAML;
|
|
410
378
|
/**
|
|
411
|
-
*
|
|
379
|
+
* Flatten object to text.
|
|
412
380
|
*/
|
|
413
|
-
|
|
381
|
+
private flattenObject;
|
|
414
382
|
/**
|
|
415
|
-
*
|
|
383
|
+
* Split text into paragraphs.
|
|
416
384
|
*/
|
|
417
|
-
|
|
385
|
+
private splitIntoParagraphs;
|
|
418
386
|
/**
|
|
419
|
-
*
|
|
387
|
+
* Split text into sentences.
|
|
420
388
|
*/
|
|
421
|
-
|
|
389
|
+
private splitIntoSentences;
|
|
422
390
|
/**
|
|
423
|
-
*
|
|
391
|
+
* Extract SCQA structure (Barbara Minto's Pyramid Principle).
|
|
424
392
|
*/
|
|
425
|
-
|
|
393
|
+
private extractSCQA;
|
|
426
394
|
/**
|
|
427
|
-
*
|
|
395
|
+
* Extract Sparkline structure (Nancy Duarte).
|
|
428
396
|
*/
|
|
429
|
-
|
|
397
|
+
private extractSparkline;
|
|
430
398
|
/**
|
|
431
|
-
*
|
|
432
|
-
* @throws KBQueryError if path not found
|
|
399
|
+
* Extract key messages (max 3 - Rule of Three).
|
|
433
400
|
*/
|
|
434
|
-
|
|
401
|
+
private extractKeyMessages;
|
|
435
402
|
/**
|
|
436
|
-
*
|
|
403
|
+
* Generate action titles (McKinsey-style).
|
|
437
404
|
*/
|
|
438
|
-
|
|
405
|
+
private generateActionTitles;
|
|
439
406
|
/**
|
|
440
|
-
*
|
|
407
|
+
* Transform a statement into an action title.
|
|
441
408
|
*/
|
|
442
|
-
private
|
|
409
|
+
private transformToActionTitle;
|
|
443
410
|
/**
|
|
444
|
-
*
|
|
411
|
+
* Identify STAR moments (Something They'll Always Remember).
|
|
445
412
|
*/
|
|
446
|
-
private
|
|
413
|
+
private identifyStarMoments;
|
|
447
414
|
/**
|
|
448
|
-
*
|
|
415
|
+
* Estimate slide count based on content.
|
|
449
416
|
*/
|
|
450
|
-
private
|
|
417
|
+
private estimateSlideCount;
|
|
418
|
+
private containsSignals;
|
|
419
|
+
private extractRelevantSentence;
|
|
420
|
+
private truncateToSentence;
|
|
421
|
+
private truncateToWords;
|
|
422
|
+
private capitalizeFirst;
|
|
451
423
|
}
|
|
452
|
-
/**
|
|
453
|
-
* Get the singleton KnowledgeGateway instance.
|
|
454
|
-
*/
|
|
455
|
-
declare function getKB(): KnowledgeGateway;
|
|
456
|
-
/**
|
|
457
|
-
* Initialize and return the KB (async).
|
|
458
|
-
*/
|
|
459
|
-
declare function initKB(): Promise<KnowledgeGateway>;
|
|
460
424
|
|
|
461
425
|
/**
|
|
462
|
-
*
|
|
426
|
+
* Slide Factory - Creates Slides from Content Analysis
|
|
463
427
|
*
|
|
464
|
-
*
|
|
465
|
-
* -
|
|
466
|
-
* -
|
|
467
|
-
* -
|
|
468
|
-
* - Detects presentation type from content signals
|
|
469
|
-
* - Identifies SCQA structure if present
|
|
470
|
-
* - Identifies Sparkline moments
|
|
428
|
+
* Generates slide structures based on:
|
|
429
|
+
* - Presentation mode (keynote vs business)
|
|
430
|
+
* - Content analysis results
|
|
431
|
+
* - Expert methodology recommendations
|
|
471
432
|
*/
|
|
472
433
|
|
|
473
|
-
declare class
|
|
474
|
-
private
|
|
475
|
-
private initialized;
|
|
434
|
+
declare class SlideFactory {
|
|
435
|
+
private readonly templates;
|
|
476
436
|
constructor();
|
|
477
|
-
initialize(): Promise<void>;
|
|
478
437
|
/**
|
|
479
|
-
*
|
|
438
|
+
* Create slides from analyzed content.
|
|
480
439
|
*/
|
|
481
|
-
|
|
440
|
+
createSlides(analysis: ContentAnalysis, mode: PresentationMode): Promise<Slide[]>;
|
|
482
441
|
/**
|
|
483
|
-
*
|
|
442
|
+
* Create a title slide.
|
|
484
443
|
*/
|
|
485
|
-
private
|
|
444
|
+
private createTitleSlide;
|
|
486
445
|
/**
|
|
487
|
-
*
|
|
446
|
+
* Create an agenda slide.
|
|
488
447
|
*/
|
|
489
|
-
private
|
|
448
|
+
private createAgendaSlide;
|
|
490
449
|
/**
|
|
491
|
-
*
|
|
492
|
-
* Strips markdown formatting (**bold**, *italic*, `code`) from bullet text.
|
|
450
|
+
* Create a context/situation slide.
|
|
493
451
|
*/
|
|
494
|
-
private
|
|
452
|
+
private createContextSlide;
|
|
495
453
|
/**
|
|
496
|
-
*
|
|
497
|
-
* Converts **bold**, *italic*, `code`, [links](url) to plain text.
|
|
454
|
+
* Create a problem/complication slide.
|
|
498
455
|
*/
|
|
499
|
-
private
|
|
456
|
+
private createProblemSlide;
|
|
500
457
|
/**
|
|
501
|
-
*
|
|
458
|
+
* Create a key message slide.
|
|
502
459
|
*/
|
|
503
|
-
private
|
|
460
|
+
private createMessageSlide;
|
|
504
461
|
/**
|
|
505
|
-
*
|
|
462
|
+
* Create a STAR moment slide.
|
|
506
463
|
*/
|
|
507
|
-
private
|
|
464
|
+
private createStarMomentSlide;
|
|
508
465
|
/**
|
|
509
|
-
*
|
|
466
|
+
* Create a solution/answer slide.
|
|
510
467
|
*/
|
|
511
|
-
private
|
|
468
|
+
private createSolutionSlide;
|
|
512
469
|
/**
|
|
513
|
-
*
|
|
470
|
+
* Create a call-to-action slide.
|
|
514
471
|
*/
|
|
515
|
-
private
|
|
472
|
+
private createCTASlide;
|
|
516
473
|
/**
|
|
517
|
-
*
|
|
474
|
+
* Create a thank you slide.
|
|
518
475
|
*/
|
|
519
|
-
private
|
|
476
|
+
private createThankYouSlide;
|
|
477
|
+
/**
|
|
478
|
+
* Initialize slide templates with constraints.
|
|
479
|
+
*/
|
|
480
|
+
private initializeTemplates;
|
|
481
|
+
/**
|
|
482
|
+
* Truncate text to max length at word boundary.
|
|
483
|
+
*/
|
|
484
|
+
private truncate;
|
|
485
|
+
/**
|
|
486
|
+
* Extract an action title from a message.
|
|
487
|
+
*/
|
|
488
|
+
private extractActionTitle;
|
|
520
489
|
/**
|
|
521
|
-
*
|
|
490
|
+
* Extract bullet points from text.
|
|
522
491
|
*/
|
|
523
|
-
private
|
|
492
|
+
private extractBullets;
|
|
524
493
|
/**
|
|
525
|
-
*
|
|
494
|
+
* Remove a statistic from text.
|
|
526
495
|
*/
|
|
527
|
-
private
|
|
496
|
+
private removeStatistic;
|
|
528
497
|
}
|
|
529
|
-
declare function getContentAnalyzer(): ContentAnalyzer;
|
|
530
|
-
declare function initContentAnalyzer(): Promise<ContentAnalyzer>;
|
|
531
498
|
|
|
532
499
|
/**
|
|
533
|
-
*
|
|
500
|
+
* Template Engine - Handlebars Template Rendering
|
|
534
501
|
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
* - Visual intent (emphasis, layout hints)
|
|
538
|
-
* - Respect for KB word limits and rules
|
|
539
|
-
* - SCQA/Sparkline narrative structure when detected
|
|
540
|
-
*
|
|
541
|
-
* ALL decisions come from the Knowledge Base. NO hardcoded fallbacks.
|
|
502
|
+
* Renders slide data into HTML using Handlebars templates.
|
|
503
|
+
* Supports custom templates and helper functions.
|
|
542
504
|
*/
|
|
543
505
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
private
|
|
550
|
-
private
|
|
551
|
-
private
|
|
552
|
-
private sectionDividerCount;
|
|
553
|
-
private readonly maxSectionDividers;
|
|
506
|
+
interface TemplateConfig {
|
|
507
|
+
customTemplates?: Record<string, string>;
|
|
508
|
+
theme?: ThemeName;
|
|
509
|
+
}
|
|
510
|
+
declare class TemplateEngine {
|
|
511
|
+
private handlebars;
|
|
512
|
+
private templates;
|
|
513
|
+
private partials;
|
|
554
514
|
constructor();
|
|
555
|
-
initialize(): Promise<void>;
|
|
556
|
-
/**
|
|
557
|
-
* Generate slides from content analysis.
|
|
558
|
-
*/
|
|
559
|
-
generate(analysis: ContentAnalysis, presentationType: PresentationType): Promise<Slide[]>;
|
|
560
|
-
private loadRulesForType;
|
|
561
|
-
/**
|
|
562
|
-
* Create title slide.
|
|
563
|
-
*/
|
|
564
|
-
private createTitleSlide;
|
|
565
|
-
/**
|
|
566
|
-
* Create agenda slide.
|
|
567
|
-
*/
|
|
568
|
-
private createAgendaSlide;
|
|
569
|
-
/**
|
|
570
|
-
* Create SCQA slides (Situation, Complication, Question, Answer).
|
|
571
|
-
*/
|
|
572
|
-
private createSCQASlides;
|
|
573
|
-
/**
|
|
574
|
-
* Create slides for a content section.
|
|
575
|
-
*/
|
|
576
|
-
private createSectionSlides;
|
|
577
515
|
/**
|
|
578
|
-
*
|
|
516
|
+
* Render a slide to HTML.
|
|
579
517
|
*/
|
|
580
|
-
|
|
518
|
+
render(slide: Slide, config?: TemplateConfig): string;
|
|
581
519
|
/**
|
|
582
|
-
*
|
|
520
|
+
* Render multiple slides.
|
|
583
521
|
*/
|
|
584
|
-
|
|
522
|
+
renderAll(slides: Slide[], config?: TemplateConfig): string[];
|
|
585
523
|
/**
|
|
586
|
-
*
|
|
524
|
+
* Prepare template context with computed properties.
|
|
587
525
|
*/
|
|
588
|
-
private
|
|
526
|
+
private prepareContext;
|
|
589
527
|
/**
|
|
590
|
-
*
|
|
528
|
+
* Build CSS class list for slide.
|
|
591
529
|
*/
|
|
592
|
-
private
|
|
530
|
+
private buildClassList;
|
|
593
531
|
/**
|
|
594
|
-
*
|
|
532
|
+
* Build inline style string.
|
|
595
533
|
*/
|
|
596
|
-
private
|
|
534
|
+
private buildStyleString;
|
|
597
535
|
/**
|
|
598
|
-
*
|
|
536
|
+
* Register Handlebars helpers.
|
|
599
537
|
*/
|
|
600
|
-
private
|
|
538
|
+
private registerHelpers;
|
|
601
539
|
/**
|
|
602
|
-
*
|
|
540
|
+
* Register reusable partials.
|
|
603
541
|
*/
|
|
604
|
-
private
|
|
542
|
+
private registerPartials;
|
|
605
543
|
/**
|
|
606
|
-
*
|
|
607
|
-
* This is called on ALL text going into slides to prevent raw markdown.
|
|
544
|
+
* Compile built-in templates.
|
|
608
545
|
*/
|
|
609
|
-
private
|
|
546
|
+
private compileTemplates;
|
|
610
547
|
/**
|
|
611
|
-
*
|
|
612
|
-
* Business presentations need full context. Never truncate mid-thought.
|
|
613
|
-
* Reasonable limit: 20 words per bullet allows complete ideas.
|
|
548
|
+
* Render fallback for unknown slide types.
|
|
614
549
|
*/
|
|
615
|
-
private
|
|
550
|
+
private renderFallback;
|
|
616
551
|
/**
|
|
617
|
-
*
|
|
618
|
-
* Preserves complete sentences. Business content needs room to breathe.
|
|
552
|
+
* Convert camelCase to kebab-case.
|
|
619
553
|
*/
|
|
620
|
-
private
|
|
621
|
-
/**
|
|
622
|
-
* Extract a key statement from content (first sentence or bold text).
|
|
623
|
-
*/
|
|
624
|
-
private extractKeyStatement;
|
|
625
|
-
/**
|
|
626
|
-
* Extract a key message from title and body for single_statement slides.
|
|
627
|
-
* Returns a concise, impactful message that provides substance.
|
|
628
|
-
*/
|
|
629
|
-
private extractKeyMessage;
|
|
630
|
-
/**
|
|
631
|
-
* Extract a label from context (nearby text around a data point).
|
|
632
|
-
* CRITICAL: Strip all markdown table syntax first to avoid garbage labels.
|
|
633
|
-
*/
|
|
634
|
-
private extractLabelFromContext;
|
|
635
|
-
/**
|
|
636
|
-
* Detect trend from context (up, down, neutral).
|
|
637
|
-
*/
|
|
638
|
-
private detectTrend;
|
|
639
|
-
/**
|
|
640
|
-
* Split array into chunks.
|
|
641
|
-
*/
|
|
642
|
-
private chunkArray;
|
|
643
|
-
/**
|
|
644
|
-
* Generate meaningful titles for chunked bullet lists.
|
|
645
|
-
* Instead of "Title (continued)", create contextual subtitles.
|
|
646
|
-
*/
|
|
647
|
-
private generateChunkTitles;
|
|
648
|
-
/**
|
|
649
|
-
* Extract a meaningful subtitle from bullet content.
|
|
650
|
-
*/
|
|
651
|
-
private extractSubtitleFromBullets;
|
|
554
|
+
private kebabCase;
|
|
652
555
|
}
|
|
653
|
-
declare function getSlideGenerator(): SlideGenerator;
|
|
654
|
-
declare function initSlideGenerator(): Promise<SlideGenerator>;
|
|
655
556
|
|
|
656
557
|
/**
|
|
657
|
-
*
|
|
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
|
|
558
|
+
* Score Calculator - QA Score Computation
|
|
664
559
|
*
|
|
665
|
-
*
|
|
560
|
+
* Calculates presentation quality scores based on:
|
|
561
|
+
* - Visual quality (35%)
|
|
562
|
+
* - Content quality (30%)
|
|
563
|
+
* - Expert methodology compliance (25%)
|
|
564
|
+
* - Accessibility (10%)
|
|
666
565
|
*/
|
|
667
566
|
|
|
668
|
-
interface
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
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';
|
|
567
|
+
interface ScoreBreakdown {
|
|
568
|
+
visual: number;
|
|
569
|
+
content: number;
|
|
570
|
+
expert: number;
|
|
571
|
+
accessibility: number;
|
|
572
|
+
total: number;
|
|
573
|
+
penalties: number;
|
|
574
|
+
details: ScoreDetail[];
|
|
694
575
|
}
|
|
695
|
-
interface
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
576
|
+
interface ScoreDetail {
|
|
577
|
+
category: string;
|
|
578
|
+
check: string;
|
|
579
|
+
score: number;
|
|
580
|
+
maxScore: number;
|
|
581
|
+
notes?: string;
|
|
699
582
|
}
|
|
700
|
-
declare class
|
|
701
|
-
private
|
|
702
|
-
private presentationType;
|
|
703
|
-
/**
|
|
704
|
-
* Create a slide generator with default configs.
|
|
705
|
-
* For KB-driven configs, use createSlideGeneratorV2WithConfig() instead.
|
|
706
|
-
*/
|
|
707
|
-
constructor(presentationType?: PresentationType);
|
|
708
|
-
/**
|
|
709
|
-
* Override config with KB-loaded values at runtime.
|
|
710
|
-
*/
|
|
711
|
-
setConfig(config: ModeConfig): void;
|
|
712
|
-
/**
|
|
713
|
-
* Get current config (useful for debugging).
|
|
714
|
-
*/
|
|
715
|
-
getConfig(): ModeConfig;
|
|
583
|
+
declare class ScoreCalculator {
|
|
584
|
+
private readonly weights;
|
|
716
585
|
/**
|
|
717
|
-
*
|
|
718
|
-
* Simple, correct, no garbage.
|
|
586
|
+
* Calculate overall QA score from results.
|
|
719
587
|
*/
|
|
720
|
-
|
|
588
|
+
calculate(results: QAResults): number;
|
|
721
589
|
/**
|
|
722
|
-
*
|
|
590
|
+
* Get detailed score breakdown.
|
|
723
591
|
*/
|
|
724
|
-
|
|
592
|
+
getBreakdown(results: QAResults): ScoreBreakdown;
|
|
725
593
|
/**
|
|
726
|
-
*
|
|
594
|
+
* Calculate visual quality score.
|
|
727
595
|
*/
|
|
728
|
-
private
|
|
596
|
+
private calculateVisualScore;
|
|
729
597
|
/**
|
|
730
|
-
*
|
|
731
|
-
* RULES:
|
|
732
|
-
* 1. Tables ALWAYS become table slides - NEVER extract to metrics
|
|
733
|
-
* 2. Empty sections are SKIPPED - no blank divider slides
|
|
734
|
-
* 3. H3 headings become individual slides with ACTION TITLES (critical for consulting)
|
|
735
|
-
* 4. Sections with minimal content are combined into statement slides
|
|
598
|
+
* Calculate content quality score.
|
|
736
599
|
*/
|
|
737
|
-
private
|
|
600
|
+
private calculateContentScore;
|
|
738
601
|
/**
|
|
739
|
-
*
|
|
740
|
-
* H3 headers become ACTION TITLES for consulting decks.
|
|
602
|
+
* Calculate expert methodology compliance score.
|
|
741
603
|
*/
|
|
742
|
-
private
|
|
604
|
+
private calculateExpertScore;
|
|
743
605
|
/**
|
|
744
|
-
*
|
|
745
|
-
* The H3 title IS the action title.
|
|
606
|
+
* Calculate accessibility compliance score.
|
|
746
607
|
*/
|
|
747
|
-
private
|
|
608
|
+
private calculateAccessibilityScore;
|
|
748
609
|
/**
|
|
749
|
-
*
|
|
610
|
+
* Calculate penalties from issues.
|
|
750
611
|
*/
|
|
751
|
-
private
|
|
612
|
+
private calculatePenalties;
|
|
752
613
|
/**
|
|
753
|
-
*
|
|
754
|
-
* RULES:
|
|
755
|
-
* 1. NEVER truncate bullets
|
|
756
|
-
* 2. NEVER create slides with only 1-2 bullets (orphan slides)
|
|
757
|
-
* 3. If there are fewer than minBulletsToKeep bullets, combine them into a statement slide
|
|
614
|
+
* Get human-readable grade from score.
|
|
758
615
|
*/
|
|
759
|
-
|
|
616
|
+
getGrade(score: number): string;
|
|
760
617
|
/**
|
|
761
|
-
*
|
|
762
|
-
* If the last chunk would have fewer than minBullets, steal from previous chunk.
|
|
618
|
+
* Get pass/fail status.
|
|
763
619
|
*/
|
|
764
|
-
|
|
620
|
+
isPassing(score: number, threshold?: number): boolean;
|
|
765
621
|
/**
|
|
766
|
-
*
|
|
767
|
-
* NEVER truncate.
|
|
622
|
+
* Format score for display.
|
|
768
623
|
*/
|
|
769
|
-
|
|
624
|
+
formatScore(score: number): string;
|
|
770
625
|
/**
|
|
771
|
-
*
|
|
626
|
+
* Generate summary report.
|
|
772
627
|
*/
|
|
773
|
-
|
|
774
|
-
/**
|
|
775
|
-
* Create a content slide from paragraphs.
|
|
776
|
-
*/
|
|
777
|
-
private createContentSlide;
|
|
778
|
-
/**
|
|
779
|
-
* Extract a key statement from tokens.
|
|
780
|
-
*/
|
|
781
|
-
private extractStatement;
|
|
782
|
-
/**
|
|
783
|
-
* VALIDATE ALL SLIDES - Fail loudly on garbage.
|
|
784
|
-
*/
|
|
785
|
-
private validateSlides;
|
|
628
|
+
generateReport(results: QAResults): string;
|
|
786
629
|
}
|
|
787
|
-
declare function createSlideGeneratorV2(type?: PresentationType): SlideGeneratorV2;
|
|
788
630
|
|
|
789
631
|
/**
|
|
790
|
-
*
|
|
632
|
+
* QA Engine - Real Visual Quality Validation
|
|
791
633
|
*
|
|
792
|
-
*
|
|
793
|
-
* -
|
|
794
|
-
* -
|
|
795
|
-
* -
|
|
796
|
-
* -
|
|
797
|
-
* - Typography and spacing from KB
|
|
798
|
-
* - Automatic PDF generation alongside HTML
|
|
634
|
+
* Unlike fake validation systems, this engine ACTUALLY tests:
|
|
635
|
+
* - Visual quality using Playwright screenshots + Canvas API
|
|
636
|
+
* - Layout balance and whitespace distribution
|
|
637
|
+
* - WCAG contrast compliance
|
|
638
|
+
* - Expert methodology adherence
|
|
799
639
|
*/
|
|
800
640
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
private theme;
|
|
804
|
-
private presentationType;
|
|
805
|
-
private kb;
|
|
806
|
-
/**
|
|
807
|
-
* Create renderer with theme loaded from Knowledge Base.
|
|
808
|
-
* @param presentationType - The type of deck being created (determines palette)
|
|
809
|
-
* @param kb - Knowledge Base gateway (optional, will use global if not provided)
|
|
810
|
-
*/
|
|
811
|
-
constructor(presentationType?: PresentationType, kb?: KnowledgeGateway);
|
|
641
|
+
declare class QAEngine {
|
|
642
|
+
private browser;
|
|
812
643
|
/**
|
|
813
|
-
*
|
|
814
|
-
* Falls back to hardcoded values only if KB fails.
|
|
644
|
+
* Validate a presentation.
|
|
815
645
|
*/
|
|
816
|
-
|
|
646
|
+
validate(presentation: string | Buffer, options?: {
|
|
647
|
+
mode?: 'keynote' | 'business';
|
|
648
|
+
strictMode?: boolean;
|
|
649
|
+
threshold?: number;
|
|
650
|
+
}): Promise<QAResults>;
|
|
817
651
|
/**
|
|
818
|
-
*
|
|
652
|
+
* Calculate overall QA score.
|
|
819
653
|
*/
|
|
820
|
-
|
|
654
|
+
calculateScore(results: QAResults): number;
|
|
821
655
|
/**
|
|
822
|
-
*
|
|
656
|
+
* Create empty QA results (for when QA is skipped).
|
|
823
657
|
*/
|
|
824
|
-
|
|
658
|
+
createEmptyResults(): QAResults;
|
|
659
|
+
private runVisualTests;
|
|
660
|
+
private runContentTests;
|
|
661
|
+
private runExpertTests;
|
|
662
|
+
private createExpertResult;
|
|
663
|
+
private runAccessibilityTests;
|
|
664
|
+
private calculateVisualScore;
|
|
665
|
+
private calculateContentScore;
|
|
666
|
+
private calculateExpertScore;
|
|
667
|
+
private calculateA11yScore;
|
|
668
|
+
private collectIssues;
|
|
669
|
+
private initBrowser;
|
|
670
|
+
private closeBrowser;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* Reveal.js Generator - HTML Presentation Output
|
|
675
|
+
*
|
|
676
|
+
* Generates complete Reveal.js presentations with:
|
|
677
|
+
* - Responsive layouts
|
|
678
|
+
* - Animations
|
|
679
|
+
* - Speaker notes
|
|
680
|
+
* - Custom themes
|
|
681
|
+
* - Chart.js integration
|
|
682
|
+
* - Mermaid diagrams
|
|
683
|
+
*/
|
|
684
|
+
|
|
685
|
+
declare class RevealJsGenerator {
|
|
686
|
+
private templateEngine;
|
|
687
|
+
private defaultRevealConfig;
|
|
688
|
+
constructor();
|
|
825
689
|
/**
|
|
826
|
-
*
|
|
827
|
-
* Always generates both formats for easy sharing.
|
|
690
|
+
* Generate complete Reveal.js HTML presentation.
|
|
828
691
|
*/
|
|
829
|
-
|
|
830
|
-
htmlPath: string;
|
|
831
|
-
pdfPath: string;
|
|
832
|
-
}>;
|
|
692
|
+
generate(slides: Slide[], config: PresentationConfig): Promise<string>;
|
|
833
693
|
/**
|
|
834
|
-
*
|
|
835
|
-
* Creates a printable PDF with one slide per page.
|
|
694
|
+
* Build the complete HTML document.
|
|
836
695
|
*/
|
|
837
|
-
|
|
696
|
+
private buildDocument;
|
|
838
697
|
/**
|
|
839
|
-
*
|
|
698
|
+
* Get base styles for slides.
|
|
840
699
|
*/
|
|
841
|
-
private
|
|
700
|
+
private getBaseStyles;
|
|
842
701
|
/**
|
|
843
|
-
*
|
|
702
|
+
* Get theme-specific styles.
|
|
844
703
|
*/
|
|
845
|
-
private
|
|
704
|
+
private getThemeStyles;
|
|
846
705
|
/**
|
|
847
|
-
*
|
|
706
|
+
* Get animation styles.
|
|
848
707
|
*/
|
|
849
|
-
private
|
|
708
|
+
private getAnimationStyles;
|
|
850
709
|
/**
|
|
851
|
-
*
|
|
710
|
+
* Escape HTML entities.
|
|
852
711
|
*/
|
|
853
|
-
private
|
|
712
|
+
private escapeHtml;
|
|
854
713
|
/**
|
|
855
|
-
*
|
|
714
|
+
* Basic HTML minification.
|
|
856
715
|
*/
|
|
857
|
-
private
|
|
716
|
+
private minifyHtml;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* PowerPoint Generator - PPTX Presentation Output
|
|
721
|
+
*
|
|
722
|
+
* Generates PowerPoint presentations using PptxGenJS with:
|
|
723
|
+
* - Professional layouts
|
|
724
|
+
* - Embedded charts
|
|
725
|
+
* - Images
|
|
726
|
+
* - Consistent styling
|
|
727
|
+
*/
|
|
728
|
+
|
|
729
|
+
declare class PowerPointGenerator {
|
|
730
|
+
private chartProvider;
|
|
858
731
|
/**
|
|
859
|
-
*
|
|
732
|
+
* Generate a PowerPoint presentation.
|
|
860
733
|
*/
|
|
861
|
-
|
|
734
|
+
generate(slides: Slide[], config: PresentationConfig): Promise<Buffer>;
|
|
862
735
|
/**
|
|
863
|
-
*
|
|
736
|
+
* Add a slide to the presentation.
|
|
864
737
|
*/
|
|
865
|
-
private
|
|
738
|
+
private addSlide;
|
|
866
739
|
/**
|
|
867
|
-
*
|
|
740
|
+
* Add title slide.
|
|
868
741
|
*/
|
|
869
|
-
private
|
|
742
|
+
private addTitleSlide;
|
|
870
743
|
/**
|
|
871
|
-
*
|
|
744
|
+
* Add big idea / single statement slide.
|
|
872
745
|
*/
|
|
873
|
-
private
|
|
746
|
+
private addBigIdeaSlide;
|
|
874
747
|
/**
|
|
875
|
-
*
|
|
748
|
+
* Add big number slide.
|
|
876
749
|
*/
|
|
877
|
-
private
|
|
750
|
+
private addBigNumberSlide;
|
|
878
751
|
/**
|
|
879
|
-
*
|
|
752
|
+
* Add quote slide.
|
|
880
753
|
*/
|
|
881
|
-
private
|
|
754
|
+
private addQuoteSlide;
|
|
882
755
|
/**
|
|
883
|
-
*
|
|
756
|
+
* Add bullet points slide.
|
|
884
757
|
*/
|
|
885
|
-
private
|
|
758
|
+
private addBulletSlide;
|
|
886
759
|
/**
|
|
887
|
-
*
|
|
760
|
+
* Add two-column slide.
|
|
888
761
|
*/
|
|
889
|
-
private
|
|
762
|
+
private addTwoColumnSlide;
|
|
890
763
|
/**
|
|
891
|
-
*
|
|
764
|
+
* Add metrics grid slide.
|
|
892
765
|
*/
|
|
893
|
-
private
|
|
766
|
+
private addMetricsSlide;
|
|
894
767
|
/**
|
|
895
|
-
*
|
|
768
|
+
* Add metrics to a slide at specified position.
|
|
896
769
|
*/
|
|
897
|
-
private
|
|
770
|
+
private addMetricsToSlide;
|
|
898
771
|
/**
|
|
899
|
-
*
|
|
772
|
+
* Add thank you slide.
|
|
900
773
|
*/
|
|
901
|
-
private
|
|
774
|
+
private addThankYouSlide;
|
|
902
775
|
/**
|
|
903
|
-
*
|
|
776
|
+
* Add agenda slide.
|
|
904
777
|
*/
|
|
905
|
-
private
|
|
778
|
+
private addAgendaSlide;
|
|
906
779
|
/**
|
|
907
|
-
*
|
|
780
|
+
* Add section divider slide.
|
|
908
781
|
*/
|
|
909
|
-
private
|
|
782
|
+
private addSectionDividerSlide;
|
|
910
783
|
/**
|
|
911
|
-
*
|
|
784
|
+
* Add default slide (fallback).
|
|
912
785
|
*/
|
|
913
|
-
private
|
|
786
|
+
private addDefaultSlide;
|
|
914
787
|
/**
|
|
915
|
-
*
|
|
788
|
+
* Add image placeholder.
|
|
916
789
|
*/
|
|
917
|
-
private
|
|
790
|
+
private addImagePlaceholder;
|
|
918
791
|
/**
|
|
919
|
-
*
|
|
792
|
+
* Convert layout position to PptxGenJS text props.
|
|
920
793
|
*/
|
|
921
|
-
private
|
|
794
|
+
private positionToProps;
|
|
922
795
|
}
|
|
923
|
-
/**
|
|
924
|
-
* Create a renderer with theme matched to the presentation type.
|
|
925
|
-
*
|
|
926
|
-
* @param presentationType - Type of deck (consulting_deck, keynote, etc.)
|
|
927
|
-
* @param themeOverride - Optional explicit theme to use instead of auto-mapping
|
|
928
|
-
*
|
|
929
|
-
* Theme mapping:
|
|
930
|
-
* - consulting_deck, board_presentation, internal_update → McKinsey (white, professional)
|
|
931
|
-
* - keynote, sales_pitch, technical → Dark (dramatic)
|
|
932
|
-
* - training, workshop, all_hands → Minimal (clean, readable)
|
|
933
|
-
* - product_demo, investor_pitch → Startup (modern dark)
|
|
934
|
-
* - executive_briefing → Corporate (professional)
|
|
935
|
-
*/
|
|
936
|
-
declare function createRendererV2(presentationType?: PresentationType, kb?: KnowledgeGateway): RendererV2;
|
|
937
796
|
|
|
938
797
|
/**
|
|
939
|
-
*
|
|
940
|
-
*
|
|
941
|
-
* This engine orchestrates the ENTIRE presentation creation flow:
|
|
942
|
-
* 1. Analyze content to detect presentation type
|
|
943
|
-
* 2. Load design specs from Knowledge Base (YAML)
|
|
944
|
-
* 3. Generate slides following expert methodologies
|
|
945
|
-
* 4. Enhance with images (optional, needs API key)
|
|
946
|
-
* 5. Review ruthlessly (must score 95/100+)
|
|
947
|
-
* 6. Output ONLY if quality passes
|
|
798
|
+
* Image Provider - Pluggable Image Generation
|
|
948
799
|
*
|
|
949
|
-
*
|
|
950
|
-
*
|
|
951
|
-
*
|
|
800
|
+
* Provides multiple strategies for obtaining images:
|
|
801
|
+
* - Local: User-provided paths/URLs
|
|
802
|
+
* - Placeholder: Uses picsum.photos (no API key)
|
|
803
|
+
* - Unsplash: Free API (50 req/hour, optional key)
|
|
804
|
+
* - AI: Claude Code integration (when available)
|
|
952
805
|
*/
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
structure: string;
|
|
975
|
-
experts: string[];
|
|
976
|
-
actionTitlesRequired: boolean;
|
|
977
|
-
sourcesRequired: boolean;
|
|
978
|
-
scoringWeights: {
|
|
979
|
-
visual_quality: number;
|
|
980
|
-
content_quality: number;
|
|
981
|
-
expert_compliance: number;
|
|
982
|
-
accessibility: number;
|
|
983
|
-
};
|
|
984
|
-
}
|
|
985
|
-
interface SlideReview {
|
|
986
|
-
slideIndex: number;
|
|
987
|
-
title: string;
|
|
988
|
-
score: number;
|
|
989
|
-
issues: string[];
|
|
990
|
-
suggestions: string[];
|
|
991
|
-
passed: boolean;
|
|
992
|
-
}
|
|
993
|
-
interface DeckReview {
|
|
994
|
-
overallScore: number;
|
|
995
|
-
slideReviews: SlideReview[];
|
|
996
|
-
deckIssues: string[];
|
|
997
|
-
flow: 'excellent' | 'good' | 'needs_work' | 'poor';
|
|
998
|
-
passed: boolean;
|
|
999
|
-
summary: string;
|
|
1000
|
-
}
|
|
1001
|
-
interface EngineOptions {
|
|
1002
|
-
/** Override detected presentation type */
|
|
1003
|
-
presentationType?: PresentationType;
|
|
1004
|
-
/** Override theme selection */
|
|
1005
|
-
themeOverride?: ThemeStyle;
|
|
1006
|
-
/** API key for image generation (optional) */
|
|
1007
|
-
imageApiKey?: string;
|
|
1008
|
-
/** Minimum quality score (default: 95) */
|
|
1009
|
-
minScore?: number;
|
|
1010
|
-
/** Enable verbose logging */
|
|
1011
|
-
verbose?: boolean;
|
|
1012
|
-
/** Maximum remediation attempts per slide */
|
|
1013
|
-
maxRemediationAttempts?: number;
|
|
1014
|
-
}
|
|
1015
|
-
interface EngineResult {
|
|
1016
|
-
slides: SlideV2[];
|
|
1017
|
-
html: string;
|
|
1018
|
-
pdfPath?: string;
|
|
1019
|
-
presentationType: PresentationType;
|
|
1020
|
-
designSpecs: DesignSpecs;
|
|
1021
|
-
review: DeckReview;
|
|
1022
|
-
warnings: string[];
|
|
806
|
+
interface ImageRequest {
|
|
807
|
+
/** Description of desired image */
|
|
808
|
+
description: string;
|
|
809
|
+
/** Desired width */
|
|
810
|
+
width?: number;
|
|
811
|
+
/** Desired height */
|
|
812
|
+
height?: number;
|
|
813
|
+
/** Style hints (e.g., 'professional', 'minimal', 'vibrant') */
|
|
814
|
+
style?: string;
|
|
815
|
+
/** Category for filtering (e.g., 'business', 'technology', 'nature') */
|
|
816
|
+
category?: string;
|
|
817
|
+
}
|
|
818
|
+
interface ImageResult {
|
|
819
|
+
/** URL or data URI of the image */
|
|
820
|
+
src: string;
|
|
821
|
+
/** Alt text for accessibility */
|
|
822
|
+
alt: string;
|
|
823
|
+
/** Attribution if required */
|
|
824
|
+
attribution?: string;
|
|
825
|
+
/** Whether this is a placeholder */
|
|
826
|
+
isPlaceholder?: boolean;
|
|
1023
827
|
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
/**
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
* CRITICAL: All specs come from the Knowledge Base YAML at runtime.
|
|
1034
|
-
* No hardcoded fallbacks - if KB is missing data, we fail loudly.
|
|
1035
|
-
*/
|
|
1036
|
-
generate(markdown: string, title?: string): Promise<EngineResult>;
|
|
1037
|
-
/**
|
|
1038
|
-
* Detect presentation type from content analysis.
|
|
1039
|
-
*/
|
|
1040
|
-
private detectPresentationType;
|
|
1041
|
-
/**
|
|
1042
|
-
* Should we recommend images for this presentation?
|
|
1043
|
-
*/
|
|
1044
|
-
private shouldRecommendImages;
|
|
1045
|
-
/**
|
|
1046
|
-
* Ruthlessly review the deck against knowledge base criteria.
|
|
1047
|
-
*/
|
|
1048
|
-
private reviewDeck;
|
|
1049
|
-
/**
|
|
1050
|
-
* Review a single slide against quality criteria.
|
|
1051
|
-
*/
|
|
1052
|
-
private reviewSlide;
|
|
1053
|
-
/**
|
|
1054
|
-
* Check if title is an action/insight title vs. just a topic.
|
|
1055
|
-
*/
|
|
1056
|
-
private isActionTitle;
|
|
1057
|
-
/**
|
|
1058
|
-
* Assess the flow and narrative structure of the deck.
|
|
1059
|
-
*/
|
|
1060
|
-
private assessFlow;
|
|
1061
|
-
/**
|
|
1062
|
-
* Attempt to remediate failing slides.
|
|
1063
|
-
*/
|
|
1064
|
-
private remediateSlides;
|
|
1065
|
-
/**
|
|
1066
|
-
* Count words in a slide.
|
|
1067
|
-
*/
|
|
1068
|
-
private countWords;
|
|
828
|
+
interface ImageProvider {
|
|
829
|
+
/** Provider name */
|
|
830
|
+
name: string;
|
|
831
|
+
/** Check if provider is available */
|
|
832
|
+
isAvailable(): Promise<boolean>;
|
|
833
|
+
/** Get an image matching the request */
|
|
834
|
+
getImage(request: ImageRequest): Promise<ImageResult>;
|
|
835
|
+
/** Get multiple images */
|
|
836
|
+
getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
|
|
1069
837
|
}
|
|
1070
|
-
declare function createPresentationEngineV2(options?: EngineOptions): PresentationEngineV2;
|
|
1071
838
|
/**
|
|
1072
|
-
*
|
|
1073
|
-
* Throws if quality score is below 95/100.
|
|
839
|
+
* Local Image Provider - Uses user-provided images
|
|
1074
840
|
*/
|
|
1075
|
-
declare
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
841
|
+
declare class LocalImageProvider implements ImageProvider {
|
|
842
|
+
name: string;
|
|
843
|
+
private images;
|
|
844
|
+
constructor(imageMap?: Record<string, string>);
|
|
845
|
+
isAvailable(): Promise<boolean>;
|
|
846
|
+
getImage(request: ImageRequest): Promise<ImageResult>;
|
|
847
|
+
getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
|
|
848
|
+
private getPlaceholderUrl;
|
|
849
|
+
/** Register an image for later use */
|
|
850
|
+
registerImage(name: string, src: string): void;
|
|
851
|
+
}
|
|
1080
852
|
/**
|
|
1081
|
-
*
|
|
1082
|
-
*
|
|
1083
|
-
* CRITICAL: ALL design decisions come from the Knowledge Base.
|
|
1084
|
-
* This module queries KB for colors, typography, gradients, layouts.
|
|
1085
|
-
* NO hardcoded fallbacks.
|
|
853
|
+
* Placeholder Image Provider - Uses picsum.photos (no API key needed)
|
|
1086
854
|
*/
|
|
1087
|
-
|
|
1088
|
-
interface ColorPalette {
|
|
855
|
+
declare class PlaceholderImageProvider implements ImageProvider {
|
|
1089
856
|
name: string;
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
text: string;
|
|
1095
|
-
useCase: string;
|
|
1096
|
-
contrastRatio: string;
|
|
1097
|
-
}
|
|
1098
|
-
interface Typography {
|
|
1099
|
-
titles: string;
|
|
1100
|
-
headlines?: string;
|
|
1101
|
-
body: string;
|
|
1102
|
-
maxFonts: number;
|
|
1103
|
-
fontPairing?: string;
|
|
1104
|
-
actionTitle?: string;
|
|
1105
|
-
sectionHeaders?: string;
|
|
1106
|
-
dataLabels?: string;
|
|
1107
|
-
}
|
|
1108
|
-
interface LayoutRules {
|
|
1109
|
-
whitespace: string;
|
|
1110
|
-
wordsPerSlide: string;
|
|
1111
|
-
elementsPerSlide?: string;
|
|
1112
|
-
requiresActionTitles?: boolean;
|
|
1113
|
-
requiresSources?: boolean;
|
|
1114
|
-
requiresCallouts?: boolean;
|
|
857
|
+
isAvailable(): Promise<boolean>;
|
|
858
|
+
getImage(request: ImageRequest): Promise<ImageResult>;
|
|
859
|
+
getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
|
|
860
|
+
private hashString;
|
|
1115
861
|
}
|
|
1116
|
-
|
|
862
|
+
/**
|
|
863
|
+
* Unsplash Image Provider - Uses Unsplash API (free tier: 50 req/hour)
|
|
864
|
+
*/
|
|
865
|
+
declare class UnsplashImageProvider implements ImageProvider {
|
|
1117
866
|
name: string;
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
867
|
+
private accessKey?;
|
|
868
|
+
private baseUrl;
|
|
869
|
+
constructor(accessKey?: string);
|
|
870
|
+
isAvailable(): Promise<boolean>;
|
|
871
|
+
getImage(request: ImageRequest): Promise<ImageResult>;
|
|
872
|
+
getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
|
|
873
|
+
private getSourceImage;
|
|
874
|
+
private delay;
|
|
1124
875
|
}
|
|
1125
|
-
|
|
876
|
+
/**
|
|
877
|
+
* Composite Image Provider - Tries providers in order
|
|
878
|
+
*/
|
|
879
|
+
declare class CompositeImageProvider implements ImageProvider {
|
|
1126
880
|
name: string;
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
rows?: number;
|
|
1133
|
-
gap: string;
|
|
1134
|
-
};
|
|
1135
|
-
}
|
|
1136
|
-
interface VisualTheme {
|
|
1137
|
-
presentationType: PresentationType;
|
|
1138
|
-
mode: 'keynote' | 'business';
|
|
1139
|
-
palette: ColorPalette;
|
|
1140
|
-
typography: Typography;
|
|
1141
|
-
layout: LayoutRules;
|
|
1142
|
-
gradients: GradientDefinition[];
|
|
1143
|
-
cssVariables: Record<string, string>;
|
|
1144
|
-
}
|
|
1145
|
-
declare class VisualDesignSystem {
|
|
1146
|
-
private kb;
|
|
1147
|
-
private initialized;
|
|
1148
|
-
constructor();
|
|
1149
|
-
/**
|
|
1150
|
-
* Initialize the design system (loads KB)
|
|
1151
|
-
*/
|
|
1152
|
-
initialize(): Promise<void>;
|
|
1153
|
-
/**
|
|
1154
|
-
* Get complete visual theme for a presentation type.
|
|
1155
|
-
*/
|
|
1156
|
-
getTheme(type: PresentationType): Promise<VisualTheme>;
|
|
1157
|
-
/**
|
|
1158
|
-
* Determine mode (keynote vs business) for a presentation type.
|
|
1159
|
-
*/
|
|
1160
|
-
private getModeForType;
|
|
1161
|
-
/**
|
|
1162
|
-
* Get color palette for presentation type from KB.
|
|
1163
|
-
*/
|
|
1164
|
-
private getPaletteForType;
|
|
1165
|
-
/**
|
|
1166
|
-
* Get typography rules for mode from KB.
|
|
1167
|
-
*/
|
|
1168
|
-
private getTypographyForMode;
|
|
1169
|
-
/**
|
|
1170
|
-
* Get layout rules for mode from KB.
|
|
1171
|
-
*/
|
|
1172
|
-
private getLayoutRulesForMode;
|
|
1173
|
-
/**
|
|
1174
|
-
* Get gradient definitions for presentation type.
|
|
1175
|
-
*/
|
|
1176
|
-
private getGradientsForType;
|
|
1177
|
-
/**
|
|
1178
|
-
* Build CSS custom properties for the theme.
|
|
1179
|
-
*/
|
|
1180
|
-
private buildCSSVariables;
|
|
1181
|
-
/**
|
|
1182
|
-
* Get slide layout templates from KB.
|
|
1183
|
-
*/
|
|
1184
|
-
getSlideLayouts(type: PresentationType): Promise<SlideLayout[]>;
|
|
1185
|
-
/**
|
|
1186
|
-
* Generate complete CSS for the theme.
|
|
1187
|
-
*/
|
|
1188
|
-
generateCSS(theme: VisualTheme): string;
|
|
1189
|
-
private lightenColor;
|
|
1190
|
-
private darkenColor;
|
|
1191
|
-
private hexToRgb;
|
|
1192
|
-
/**
|
|
1193
|
-
* Get contrasting text color for a given background color.
|
|
1194
|
-
* Returns white or black based on luminance.
|
|
1195
|
-
*/
|
|
1196
|
-
private getContrastColor;
|
|
881
|
+
private providers;
|
|
882
|
+
constructor(providers: ImageProvider[]);
|
|
883
|
+
isAvailable(): Promise<boolean>;
|
|
884
|
+
getImage(request: ImageRequest): Promise<ImageResult>;
|
|
885
|
+
getImages(requests: ImageRequest[]): Promise<ImageResult[]>;
|
|
1197
886
|
}
|
|
1198
|
-
|
|
1199
|
-
|
|
887
|
+
/**
|
|
888
|
+
* Create default image provider chain
|
|
889
|
+
*/
|
|
890
|
+
declare function createDefaultImageProvider(options?: {
|
|
891
|
+
localImages?: Record<string, string>;
|
|
892
|
+
unsplashKey?: string;
|
|
893
|
+
}): ImageProvider;
|
|
1200
894
|
|
|
1201
895
|
/**
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1204
|
-
* This is NOT a mechanical checker. It evaluates REAL quality.
|
|
1205
|
-
* A slide ONLY passes at 95+ if:
|
|
1206
|
-
* 1. You would personally present it without changes
|
|
1207
|
-
* 2. It follows expert principles (Duarte, Reynolds, Tufte)
|
|
1208
|
-
* 3. It looks professionally designed
|
|
1209
|
-
* 4. It clearly communicates its message
|
|
1210
|
-
* 5. It fits the overall presentation
|
|
896
|
+
* Chart Provider - Pluggable Chart Generation
|
|
1211
897
|
*
|
|
1212
|
-
*
|
|
898
|
+
* Provides multiple strategies for creating charts:
|
|
899
|
+
* - ChartJS: Embedded in HTML (no API needed)
|
|
900
|
+
* - QuickChart: Remote rendering (no API key needed)
|
|
901
|
+
* - Mermaid: Diagrams and flowcharts (no API needed)
|
|
1213
902
|
*/
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
}
|
|
1226
|
-
interface
|
|
1227
|
-
/**
|
|
1228
|
-
|
|
1229
|
-
/**
|
|
1230
|
-
|
|
1231
|
-
/**
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
/**
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
903
|
+
type ChartType = 'bar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'scatter' | 'bubble';
|
|
904
|
+
interface ChartDataset {
|
|
905
|
+
label: string;
|
|
906
|
+
data: number[];
|
|
907
|
+
backgroundColor?: string | string[];
|
|
908
|
+
borderColor?: string | string[];
|
|
909
|
+
borderWidth?: number;
|
|
910
|
+
}
|
|
911
|
+
interface ChartData {
|
|
912
|
+
labels: string[];
|
|
913
|
+
datasets: ChartDataset[];
|
|
914
|
+
}
|
|
915
|
+
interface ChartRequest {
|
|
916
|
+
/** Chart type */
|
|
917
|
+
type: ChartType;
|
|
918
|
+
/** Chart data */
|
|
919
|
+
data: ChartData;
|
|
920
|
+
/** Chart title */
|
|
921
|
+
title?: string;
|
|
922
|
+
/** Width in pixels */
|
|
923
|
+
width?: number;
|
|
924
|
+
/** Height in pixels */
|
|
925
|
+
height?: number;
|
|
926
|
+
/** Show legend */
|
|
927
|
+
showLegend?: boolean;
|
|
928
|
+
/** Animation enabled (HTML only) */
|
|
929
|
+
animated?: boolean;
|
|
930
|
+
/** Color palette to use */
|
|
931
|
+
palette?: 'default' | 'professional' | 'vibrant' | 'monochrome';
|
|
932
|
+
}
|
|
933
|
+
interface ChartResult {
|
|
934
|
+
/** HTML for embedding (Chart.js canvas) */
|
|
935
|
+
html?: string;
|
|
936
|
+
/** Image URL for static contexts (PPTX) */
|
|
937
|
+
imageUrl?: string;
|
|
938
|
+
/** Base64 data URI */
|
|
939
|
+
dataUri?: string;
|
|
940
|
+
/** Chart title for accessibility */
|
|
941
|
+
title: string;
|
|
1252
942
|
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
private assessmentWeights;
|
|
1261
|
-
private _loggedWeights;
|
|
1262
|
-
private hasCialdini;
|
|
1263
|
-
private hasGestalt;
|
|
1264
|
-
private hasTufteDataInk;
|
|
1265
|
-
private chartjunkToAvoid;
|
|
1266
|
-
constructor();
|
|
1267
|
-
initialize(): Promise<void>;
|
|
1268
|
-
/**
|
|
1269
|
-
* Review a slide qualitatively.
|
|
1270
|
-
*/
|
|
1271
|
-
review(slide: Slide, presentationType: PresentationType): Promise<QualitativeSlideReview>;
|
|
1272
|
-
/**
|
|
1273
|
-
* Convert qualitative review to SlideScore format.
|
|
1274
|
-
*/
|
|
1275
|
-
toSlideScore(review: QualitativeSlideReview): SlideScore;
|
|
1276
|
-
private loadRulesForType;
|
|
1277
|
-
/**
|
|
1278
|
-
* Visual Impact (25%): Does this slide command attention appropriately?
|
|
1279
|
-
*/
|
|
1280
|
-
private assessVisualImpact;
|
|
1281
|
-
/**
|
|
1282
|
-
* Content Clarity (20%): Can you understand the message in 3 seconds?
|
|
1283
|
-
*/
|
|
1284
|
-
private assessContentClarity;
|
|
1285
|
-
/**
|
|
1286
|
-
* Get all text content from a slide for analysis.
|
|
1287
|
-
*/
|
|
1288
|
-
private getAllTextContent;
|
|
1289
|
-
/**
|
|
1290
|
-
* Layout Balance (15%): Is visual weight distributed appropriately?
|
|
1291
|
-
*/
|
|
1292
|
-
private assessLayoutBalance;
|
|
1293
|
-
/**
|
|
1294
|
-
* Typography Hierarchy (15%): Is there clear primary/secondary/tertiary hierarchy?
|
|
1295
|
-
*/
|
|
1296
|
-
private assessTypographyHierarchy;
|
|
1297
|
-
/**
|
|
1298
|
-
* Whitespace Usage (10%): Is whitespace used purposefully?
|
|
1299
|
-
*/
|
|
1300
|
-
private assessWhitespaceUsage;
|
|
1301
|
-
/**
|
|
1302
|
-
* Color Harmony (10%): Do colors work together within the theme?
|
|
1303
|
-
*/
|
|
1304
|
-
private assessColorHarmony;
|
|
1305
|
-
/**
|
|
1306
|
-
* Audience Appropriateness (5%): Is the visual style right for this audience?
|
|
1307
|
-
*/
|
|
1308
|
-
private assessAudienceAppropriate;
|
|
1309
|
-
private isMinimalType;
|
|
1310
|
-
private isDenseType;
|
|
1311
|
-
private countWords;
|
|
1312
|
-
private countLongWords;
|
|
1313
|
-
/**
|
|
1314
|
-
* Detect raw markdown syntax that should have been rendered to HTML.
|
|
1315
|
-
* Returns array of issue descriptions.
|
|
1316
|
-
*/
|
|
1317
|
-
private detectRawMarkdown;
|
|
1318
|
-
/**
|
|
1319
|
-
* Check if slide type is appropriate for its content.
|
|
1320
|
-
* Returns issue description if mismatched.
|
|
1321
|
-
*/
|
|
1322
|
-
private checkSlideTypeMismatch;
|
|
1323
|
-
private scoreToLevel;
|
|
1324
|
-
private collectIssues;
|
|
1325
|
-
private mapAssessmentToCategory;
|
|
1326
|
-
private mapIssueCategory;
|
|
1327
|
-
private generateImprovements;
|
|
1328
|
-
private createCategoryScore;
|
|
943
|
+
interface ChartProvider {
|
|
944
|
+
/** Provider name */
|
|
945
|
+
name: string;
|
|
946
|
+
/** Check if provider is available */
|
|
947
|
+
isAvailable(): Promise<boolean>;
|
|
948
|
+
/** Generate a chart */
|
|
949
|
+
generateChart(request: ChartRequest): Promise<ChartResult>;
|
|
1329
950
|
}
|
|
1330
|
-
declare function getSlideQualityReviewer(): SlideQualityReviewer;
|
|
1331
|
-
declare function initSlideQualityReviewer(): Promise<SlideQualityReviewer>;
|
|
1332
|
-
|
|
1333
951
|
/**
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1336
|
-
* After all slides pass individual review, this evaluates the deck as a whole:
|
|
1337
|
-
* 1. Narrative Flow (30%) - Does it tell a coherent story?
|
|
1338
|
-
* 2. Visual Consistency (25%) - Is the same theme applied throughout?
|
|
1339
|
-
* 3. Pacing & Rhythm (20%) - Is there variety and appropriate density?
|
|
1340
|
-
* 4. Opening & Closing (15%) - Are first/last slides the strongest?
|
|
1341
|
-
* 5. Overall Impression (10%) - Would you hire/invest based on this?
|
|
1342
|
-
*
|
|
1343
|
-
* ALL rules come from the Knowledge Base. NO hardcoded fallbacks.
|
|
952
|
+
* Chart.js Provider - Generates embedded Chart.js HTML
|
|
953
|
+
* No API needed - runs in browser
|
|
1344
954
|
*/
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
score: number;
|
|
1350
|
-
/** Quality level */
|
|
1351
|
-
level: DeckQualityLevel;
|
|
1352
|
-
/** WHY this score - specific reasoning */
|
|
1353
|
-
reasoning: string;
|
|
1354
|
-
/** KB reference for this assessment */
|
|
1355
|
-
kbReference?: string;
|
|
1356
|
-
}
|
|
1357
|
-
interface QualitativeDeckReview {
|
|
1358
|
-
/** Overall deck score (0-100, must be >= 95) */
|
|
1359
|
-
score: number;
|
|
1360
|
-
/** Would this deck impress the target audience? */
|
|
1361
|
-
wouldImpress: boolean;
|
|
1362
|
-
/** Detailed assessments */
|
|
1363
|
-
assessments: {
|
|
1364
|
-
narrativeFlow: DeckAssessment;
|
|
1365
|
-
visualConsistency: DeckAssessment;
|
|
1366
|
-
pacingRhythm: DeckAssessment;
|
|
1367
|
-
openingClosing: DeckAssessment;
|
|
1368
|
-
overallImpression: DeckAssessment;
|
|
1369
|
-
};
|
|
1370
|
-
/** Individual slide reviews */
|
|
1371
|
-
slideReviews: QualitativeSlideReview[];
|
|
1372
|
-
/** Deck-level issues */
|
|
1373
|
-
issues: DeckIssue[];
|
|
1374
|
-
/** Deck-level improvements */
|
|
1375
|
-
improvements: string[];
|
|
955
|
+
declare class ChartJsProvider implements ChartProvider {
|
|
956
|
+
name: string;
|
|
957
|
+
isAvailable(): Promise<boolean>;
|
|
958
|
+
generateChart(request: ChartRequest): Promise<ChartResult>;
|
|
1376
959
|
}
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
960
|
+
/**
|
|
961
|
+
* QuickChart Provider - Uses quickchart.io for image generation
|
|
962
|
+
* No API key needed - free service
|
|
963
|
+
*/
|
|
964
|
+
declare class QuickChartProvider implements ChartProvider {
|
|
965
|
+
name: string;
|
|
966
|
+
private baseUrl;
|
|
967
|
+
isAvailable(): Promise<boolean>;
|
|
968
|
+
generateChart(request: ChartRequest): Promise<ChartResult>;
|
|
1384
969
|
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
constructor();
|
|
1394
|
-
initialize(): Promise<void>;
|
|
1395
|
-
/**
|
|
1396
|
-
* Review the entire deck qualitatively.
|
|
1397
|
-
*/
|
|
1398
|
-
review(slides: Slide[], presentationType: PresentationType): Promise<QualitativeDeckReview>;
|
|
1399
|
-
/**
|
|
1400
|
-
* Convert qualitative review to DeckScore format.
|
|
1401
|
-
*/
|
|
1402
|
-
toDeckScore(review: QualitativeDeckReview): DeckScore;
|
|
1403
|
-
private loadRulesForType;
|
|
1404
|
-
/**
|
|
1405
|
-
* Narrative Flow (30%): Does the presentation tell a coherent story?
|
|
1406
|
-
*/
|
|
1407
|
-
private assessNarrativeFlow;
|
|
1408
|
-
/**
|
|
1409
|
-
* Visual Consistency (25%): Is the same theme applied throughout?
|
|
1410
|
-
*/
|
|
1411
|
-
private assessVisualConsistency;
|
|
970
|
+
/**
|
|
971
|
+
* Mermaid Provider - Generates diagrams using Mermaid.js
|
|
972
|
+
* No API needed - renders in browser
|
|
973
|
+
*/
|
|
974
|
+
declare class MermaidProvider implements ChartProvider {
|
|
975
|
+
name: string;
|
|
976
|
+
isAvailable(): Promise<boolean>;
|
|
977
|
+
generateChart(request: ChartRequest): Promise<ChartResult>;
|
|
1412
978
|
/**
|
|
1413
|
-
*
|
|
979
|
+
* Generate a Mermaid diagram
|
|
1414
980
|
*/
|
|
1415
|
-
|
|
981
|
+
generateDiagram(definition: string, title?: string): Promise<ChartResult>;
|
|
1416
982
|
/**
|
|
1417
|
-
*
|
|
983
|
+
* Generate flowchart from steps
|
|
1418
984
|
*/
|
|
1419
|
-
|
|
985
|
+
generateFlowchart(steps: {
|
|
986
|
+
id: string;
|
|
987
|
+
label: string;
|
|
988
|
+
next?: string[];
|
|
989
|
+
}[]): string;
|
|
1420
990
|
/**
|
|
1421
|
-
*
|
|
991
|
+
* Generate timeline from events
|
|
1422
992
|
*/
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
private collectDeckIssues;
|
|
1428
|
-
private mapAssessmentToCategory;
|
|
1429
|
-
private mapDeckCategory;
|
|
1430
|
-
private generateDeckImprovements;
|
|
1431
|
-
private calculateRequiredElementsScore;
|
|
1432
|
-
private calculateAntiPatternScore;
|
|
993
|
+
generateTimeline(events: {
|
|
994
|
+
date: string;
|
|
995
|
+
title: string;
|
|
996
|
+
}[]): string;
|
|
1433
997
|
}
|
|
1434
|
-
declare function getDeckQualityReviewer(): DeckQualityReviewer;
|
|
1435
|
-
declare function initDeckQualityReviewer(): Promise<DeckQualityReviewer>;
|
|
1436
|
-
|
|
1437
998
|
/**
|
|
1438
|
-
*
|
|
1439
|
-
*
|
|
1440
|
-
* When a slide fails qualitative review (< 95), this module attempts to fix it.
|
|
1441
|
-
* Maximum 3 remediation attempts per slide.
|
|
1442
|
-
*
|
|
1443
|
-
* Remediation strategies are based on the specific quality issues identified:
|
|
1444
|
-
* - Visual Impact: Increase title prominence, add visual elements
|
|
1445
|
-
* - Content Clarity: Reduce word count, simplify messaging
|
|
1446
|
-
* - Layout Balance: Redistribute content, improve alignment
|
|
1447
|
-
* - Typography Hierarchy: Adjust text sizes, create clearer hierarchy
|
|
1448
|
-
* - Whitespace Usage: Remove content or split slide
|
|
1449
|
-
* - Color Harmony: Ensure colors match theme
|
|
1450
|
-
* - Audience Appropriateness: Adjust density for audience
|
|
1451
|
-
*
|
|
1452
|
-
* ALL rules come from the Knowledge Base. NO hardcoded fallbacks.
|
|
999
|
+
* Composite Chart Provider
|
|
1453
1000
|
*/
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
originalSlide: Slide;
|
|
1460
|
-
/** Remediated slide (or original if failed) */
|
|
1461
|
-
remediatedSlide: Slide;
|
|
1462
|
-
/** Number of attempts made */
|
|
1463
|
-
attempts: number;
|
|
1464
|
-
/** Final score after remediation */
|
|
1465
|
-
finalScore: number;
|
|
1466
|
-
/** Review after remediation */
|
|
1467
|
-
finalReview: QualitativeSlideReview;
|
|
1468
|
-
/** Actions taken during remediation */
|
|
1469
|
-
actions: RemediationAction[];
|
|
1470
|
-
/** Why remediation failed (if it did) */
|
|
1471
|
-
failureReason?: string;
|
|
1472
|
-
}
|
|
1473
|
-
interface RemediationAction {
|
|
1474
|
-
/** What was done */
|
|
1475
|
-
action: string;
|
|
1476
|
-
/** Which issue it addressed */
|
|
1477
|
-
targetIssue: string;
|
|
1478
|
-
/** Score before this action */
|
|
1479
|
-
scoreBefore: number;
|
|
1480
|
-
/** Score after this action */
|
|
1481
|
-
scoreAfter: number;
|
|
1482
|
-
/** Was this action effective? */
|
|
1483
|
-
effective: boolean;
|
|
1484
|
-
}
|
|
1485
|
-
declare class Remediator {
|
|
1486
|
-
private kb;
|
|
1487
|
-
private reviewer;
|
|
1488
|
-
private initialized;
|
|
1489
|
-
private wordLimits;
|
|
1490
|
-
private bulletLimit;
|
|
1491
|
-
private maxAttempts;
|
|
1492
|
-
private targetScore;
|
|
1001
|
+
declare class CompositeChartProvider implements ChartProvider {
|
|
1002
|
+
name: string;
|
|
1003
|
+
private htmlProvider;
|
|
1004
|
+
private imageProvider;
|
|
1005
|
+
private mermaidProvider;
|
|
1493
1006
|
constructor();
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
private fixVisualIssue;
|
|
1507
|
-
private fixContentIssue;
|
|
1508
|
-
private fixLayoutIssue;
|
|
1509
|
-
private fixTypographyIssue;
|
|
1510
|
-
private fixAccessibilityIssue;
|
|
1511
|
-
private cloneSlide;
|
|
1512
|
-
private truncateToWords;
|
|
1513
|
-
private isMinimalType;
|
|
1514
|
-
private countWords;
|
|
1007
|
+
isAvailable(): Promise<boolean>;
|
|
1008
|
+
generateChart(request: ChartRequest): Promise<ChartResult>;
|
|
1009
|
+
generateDiagram(definition: string, title?: string): Promise<ChartResult>;
|
|
1010
|
+
generateFlowchart(steps: {
|
|
1011
|
+
id: string;
|
|
1012
|
+
label: string;
|
|
1013
|
+
next?: string[];
|
|
1014
|
+
}[]): string;
|
|
1015
|
+
generateTimeline(events: {
|
|
1016
|
+
date: string;
|
|
1017
|
+
title: string;
|
|
1018
|
+
}[]): string;
|
|
1515
1019
|
}
|
|
1516
|
-
|
|
1517
|
-
|
|
1020
|
+
/**
|
|
1021
|
+
* Create default chart provider
|
|
1022
|
+
*/
|
|
1023
|
+
declare function createDefaultChartProvider(): CompositeChartProvider;
|
|
1518
1024
|
|
|
1519
1025
|
/**
|
|
1520
|
-
*
|
|
1026
|
+
* Knowledge Base - RuVector Expert Principles Loader
|
|
1521
1027
|
*
|
|
1522
|
-
*
|
|
1523
|
-
*
|
|
1524
|
-
* - PPTX: PowerPoint (future implementation)
|
|
1028
|
+
* Loads and provides access to the 6,300+ line expert knowledge base
|
|
1029
|
+
* containing methodologies from 40+ presentation experts.
|
|
1525
1030
|
*
|
|
1526
|
-
*
|
|
1527
|
-
* NO hardcoded styles.
|
|
1031
|
+
* This runs WITHOUT any API - it's static data bundled with the package.
|
|
1528
1032
|
*/
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
author?: string;
|
|
1535
|
-
/** Presentation type */
|
|
1536
|
-
presentationType: PresentationType;
|
|
1537
|
-
/** Metadata */
|
|
1538
|
-
metadata?: PresentationMetadata;
|
|
1539
|
-
/** Local images to use as backgrounds */
|
|
1540
|
-
images?: string[];
|
|
1541
|
-
/** Base path for resolving relative image paths */
|
|
1542
|
-
imageBasePath?: string;
|
|
1033
|
+
interface ExpertPrinciple {
|
|
1034
|
+
name: string;
|
|
1035
|
+
description: string;
|
|
1036
|
+
validation?: string[];
|
|
1037
|
+
examples?: string[];
|
|
1543
1038
|
}
|
|
1544
|
-
interface
|
|
1545
|
-
|
|
1546
|
-
|
|
1039
|
+
interface ExpertMethodology {
|
|
1040
|
+
name: string;
|
|
1041
|
+
principles: ExpertPrinciple[];
|
|
1042
|
+
slideTypes?: string[];
|
|
1043
|
+
wordLimits?: {
|
|
1044
|
+
min?: number;
|
|
1045
|
+
max?: number;
|
|
1046
|
+
};
|
|
1547
1047
|
}
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
private
|
|
1560
|
-
private
|
|
1561
|
-
private renderSlide;
|
|
1562
|
-
private renderTitleSlide;
|
|
1563
|
-
private renderSectionDivider;
|
|
1564
|
-
private renderMetricsSlide;
|
|
1565
|
-
private renderQuoteSlide;
|
|
1566
|
-
private renderStarMomentSlide;
|
|
1567
|
-
private renderCTASlide;
|
|
1568
|
-
private renderThankYouSlide;
|
|
1569
|
-
private renderTwoColumnSlide;
|
|
1570
|
-
private renderThreeColumnSlide;
|
|
1571
|
-
private renderContentSlide;
|
|
1572
|
-
private renderPPTX;
|
|
1573
|
-
private formatCSSVariables;
|
|
1574
|
-
private escapeHTML;
|
|
1575
|
-
/**
|
|
1576
|
-
* Generate a background image URL based on slide type and content.
|
|
1577
|
-
* Priority: 1) slide.data.image, 2) local images array, 3) NO RANDOM STOCK PHOTOS
|
|
1578
|
-
*
|
|
1579
|
-
* IMPORTANT: Random stock photos destroy credibility. A photo of flowers behind
|
|
1580
|
-
* a financial slide makes you look incompetent. Only use images that are:
|
|
1581
|
-
* - Explicitly provided by the user
|
|
1582
|
-
* - Actually relevant to the content
|
|
1583
|
-
* Otherwise, rely on clean gradients via CSS.
|
|
1584
|
-
*/
|
|
1585
|
-
private getBackgroundImageUrl;
|
|
1586
|
-
/**
|
|
1587
|
-
* Resolve an image path - handles relative paths, absolute paths, and URLs.
|
|
1588
|
-
*/
|
|
1589
|
-
private resolveImagePath;
|
|
1590
|
-
/**
|
|
1591
|
-
* Generate fallback image URL using Picsum with smart seeding.
|
|
1592
|
-
*/
|
|
1593
|
-
private getFallbackImageUrl;
|
|
1048
|
+
interface AutomatedQA {
|
|
1049
|
+
scoringRubric: {
|
|
1050
|
+
totalPoints: number;
|
|
1051
|
+
passingThreshold: number;
|
|
1052
|
+
categories: Record<string, {
|
|
1053
|
+
weight: number;
|
|
1054
|
+
checks: Record<string, unknown>;
|
|
1055
|
+
}>;
|
|
1056
|
+
};
|
|
1057
|
+
}
|
|
1058
|
+
declare class KnowledgeBase {
|
|
1059
|
+
private data;
|
|
1060
|
+
private loaded;
|
|
1594
1061
|
/**
|
|
1595
|
-
*
|
|
1596
|
-
* Handles: bold, italic, code, links, and basic formatting.
|
|
1597
|
-
* Called BEFORE escapeHTML to preserve markdown-generated HTML tags.
|
|
1062
|
+
* Load the knowledge base from the bundled YAML file.
|
|
1598
1063
|
*/
|
|
1599
|
-
|
|
1064
|
+
load(): Promise<void>;
|
|
1600
1065
|
/**
|
|
1601
|
-
*
|
|
1602
|
-
* Removes partial code blocks, inline tables, etc.
|
|
1066
|
+
* Get expert methodology by name.
|
|
1603
1067
|
*/
|
|
1604
|
-
|
|
1068
|
+
getExpert(name: string): ExpertMethodology | undefined;
|
|
1605
1069
|
/**
|
|
1606
|
-
*
|
|
1070
|
+
* Get all expert names.
|
|
1607
1071
|
*/
|
|
1608
|
-
|
|
1072
|
+
getExpertNames(): string[];
|
|
1609
1073
|
/**
|
|
1610
|
-
*
|
|
1074
|
+
* Get framework recommendation for audience.
|
|
1611
1075
|
*/
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
/**
|
|
1618
|
-
* NanoBanana Pro Image Generation Provider
|
|
1619
|
-
*
|
|
1620
|
-
* Integrates with Google Gemini's image generation capabilities via NanoBanana Pro.
|
|
1621
|
-
* Generates high-quality hero images, concept illustrations, and visual assets
|
|
1622
|
-
* for presentation slides.
|
|
1623
|
-
*
|
|
1624
|
-
* Requires: GOOGLE_AI_API_KEY environment variable
|
|
1625
|
-
*
|
|
1626
|
-
* Usage:
|
|
1627
|
-
* const provider = createNanoBananaProvider();
|
|
1628
|
-
* if (await provider.isAvailable()) {
|
|
1629
|
-
* const imageUrl = await provider.generateHeroImage('AI revolution');
|
|
1630
|
-
* }
|
|
1631
|
-
*/
|
|
1632
|
-
interface ImageGenerationRequest {
|
|
1633
|
-
/** The concept or topic to visualize */
|
|
1634
|
-
concept: string;
|
|
1635
|
-
/** Image style/type */
|
|
1636
|
-
style: 'hero' | 'concept' | 'icon' | 'background' | 'diagram';
|
|
1637
|
-
/** Presentation type for context */
|
|
1638
|
-
presentationType?: string;
|
|
1639
|
-
/** Aspect ratio */
|
|
1640
|
-
aspectRatio?: '16:9' | '4:3' | '1:1' | '9:16';
|
|
1641
|
-
/** Color scheme preference */
|
|
1642
|
-
colorScheme?: 'dark' | 'light' | 'vibrant' | 'muted';
|
|
1643
|
-
}
|
|
1644
|
-
interface ImageGenerationResult {
|
|
1645
|
-
/** Whether generation succeeded */
|
|
1646
|
-
success: boolean;
|
|
1647
|
-
/** Generated image URL or base64 data */
|
|
1648
|
-
imageUrl?: string;
|
|
1649
|
-
/** Base64 encoded image data */
|
|
1650
|
-
imageData?: string;
|
|
1651
|
-
/** MIME type of the image */
|
|
1652
|
-
mimeType?: string;
|
|
1653
|
-
/** Error message if failed */
|
|
1654
|
-
error?: string;
|
|
1655
|
-
/** Prompt used for generation */
|
|
1656
|
-
promptUsed?: string;
|
|
1657
|
-
}
|
|
1658
|
-
interface NanoBananaConfig {
|
|
1659
|
-
/** Google AI API key (defaults to GOOGLE_AI_API_KEY env var) */
|
|
1660
|
-
apiKey?: string;
|
|
1661
|
-
/** Model to use (defaults to gemini-2.0-flash-exp for image generation) */
|
|
1662
|
-
model?: string;
|
|
1663
|
-
/** Timeout in milliseconds */
|
|
1664
|
-
timeout?: number;
|
|
1665
|
-
/** Enable verbose logging */
|
|
1666
|
-
verbose?: boolean;
|
|
1667
|
-
}
|
|
1668
|
-
/**
|
|
1669
|
-
* NanoBanana Pro image generation provider.
|
|
1670
|
-
* Uses Google Gemini's image generation capabilities.
|
|
1671
|
-
*/
|
|
1672
|
-
declare class NanoBananaProvider {
|
|
1673
|
-
readonly name = "NanoBanana Pro";
|
|
1674
|
-
private apiKey;
|
|
1675
|
-
private model;
|
|
1676
|
-
private timeout;
|
|
1677
|
-
private verbose;
|
|
1678
|
-
constructor(config?: NanoBananaConfig);
|
|
1076
|
+
getFrameworkForAudience(audience: string): {
|
|
1077
|
+
primaryFramework: string;
|
|
1078
|
+
secondaryFramework?: string;
|
|
1079
|
+
slideTypes: string[];
|
|
1080
|
+
} | undefined;
|
|
1679
1081
|
/**
|
|
1680
|
-
*
|
|
1082
|
+
* Get framework recommendation for goal.
|
|
1681
1083
|
*/
|
|
1682
|
-
|
|
1084
|
+
getFrameworkForGoal(goal: string): {
|
|
1085
|
+
primaryFramework: string;
|
|
1086
|
+
secondaryFramework?: string;
|
|
1087
|
+
slideTypes: string[];
|
|
1088
|
+
} | undefined;
|
|
1683
1089
|
/**
|
|
1684
|
-
*
|
|
1090
|
+
* Get QA scoring rubric.
|
|
1685
1091
|
*/
|
|
1686
|
-
|
|
1092
|
+
getScoringRubric(): AutomatedQA['scoringRubric'] | undefined;
|
|
1687
1093
|
/**
|
|
1688
|
-
*
|
|
1094
|
+
* Get mode configuration (keynote or business).
|
|
1689
1095
|
*/
|
|
1690
|
-
|
|
1096
|
+
getModeConfig(mode: 'keynote' | 'business'): unknown;
|
|
1691
1097
|
/**
|
|
1692
|
-
*
|
|
1098
|
+
* Get slide type configuration.
|
|
1693
1099
|
*/
|
|
1694
|
-
|
|
1100
|
+
getSlideType(type: string): unknown;
|
|
1695
1101
|
/**
|
|
1696
|
-
*
|
|
1102
|
+
* Get the knowledge base version.
|
|
1697
1103
|
*/
|
|
1698
|
-
|
|
1104
|
+
getVersion(): string;
|
|
1699
1105
|
/**
|
|
1700
|
-
*
|
|
1106
|
+
* Validate a slide against expert principles.
|
|
1701
1107
|
*/
|
|
1702
|
-
|
|
1108
|
+
validateAgainstExpert(expertName: string, slideData: {
|
|
1109
|
+
wordCount: number;
|
|
1110
|
+
hasActionTitle: boolean;
|
|
1111
|
+
bulletCount: number;
|
|
1112
|
+
}): {
|
|
1113
|
+
passed: boolean;
|
|
1114
|
+
violations: string[];
|
|
1115
|
+
};
|
|
1703
1116
|
/**
|
|
1704
|
-
*
|
|
1117
|
+
* Ensure knowledge base is loaded.
|
|
1705
1118
|
*/
|
|
1706
|
-
private
|
|
1119
|
+
private ensureLoaded;
|
|
1707
1120
|
/**
|
|
1708
|
-
*
|
|
1121
|
+
* Get default data if YAML can't be loaded.
|
|
1709
1122
|
*/
|
|
1710
|
-
private
|
|
1123
|
+
private getDefaultData;
|
|
1711
1124
|
}
|
|
1712
1125
|
/**
|
|
1713
|
-
*
|
|
1126
|
+
* Get the knowledge base singleton.
|
|
1714
1127
|
*/
|
|
1715
|
-
declare function
|
|
1128
|
+
declare function getKnowledgeBase(): KnowledgeBase;
|
|
1129
|
+
|
|
1716
1130
|
/**
|
|
1717
|
-
*
|
|
1718
|
-
*
|
|
1131
|
+
* Claude Presentation Master
|
|
1132
|
+
*
|
|
1133
|
+
* Generate world-class presentations using expert methodologies from
|
|
1134
|
+
* Duarte, Reynolds, Gallo, and Anderson. Enforces rigorous quality
|
|
1135
|
+
* standards through real visual validation.
|
|
1136
|
+
*
|
|
1137
|
+
* @packageDocumentation
|
|
1138
|
+
* @module claude-presentation-master
|
|
1139
|
+
* @author Stuart Kerr <stuart@isovision.ai>
|
|
1140
|
+
* @license MIT
|
|
1719
1141
|
*/
|
|
1720
|
-
declare function getNanoBananaPrompt(style: 'hero' | 'concept' | 'icon' | 'background' | 'diagram', concept: string, presentationType?: string): string;
|
|
1721
1142
|
|
|
1722
1143
|
/**
|
|
1723
|
-
*
|
|
1144
|
+
* Generate a presentation from content.
|
|
1724
1145
|
*
|
|
1725
|
-
*
|
|
1726
|
-
*
|
|
1146
|
+
* @example
|
|
1147
|
+
* ```typescript
|
|
1148
|
+
* import { generate } from '@isovision/claude-presentation-master';
|
|
1727
1149
|
*
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1730
|
-
*
|
|
1731
|
-
*
|
|
1732
|
-
*
|
|
1150
|
+
* const result = await generate({
|
|
1151
|
+
* content: '# My Presentation\n\n...',
|
|
1152
|
+
* contentType: 'markdown',
|
|
1153
|
+
* mode: 'keynote',
|
|
1154
|
+
* format: ['html', 'pptx'],
|
|
1155
|
+
* qaThreshold: 95,
|
|
1156
|
+
* title: 'My Amazing Presentation'
|
|
1157
|
+
* });
|
|
1733
1158
|
*
|
|
1734
|
-
*
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
value: string;
|
|
1742
|
-
context: string;
|
|
1743
|
-
severity: 'error' | 'warning';
|
|
1744
|
-
suggestion: string;
|
|
1745
|
-
}
|
|
1746
|
-
interface ValidationResult {
|
|
1747
|
-
passed: boolean;
|
|
1748
|
-
violations: HardcodedViolation[];
|
|
1749
|
-
summary: {
|
|
1750
|
-
totalFiles: number;
|
|
1751
|
-
filesWithViolations: number;
|
|
1752
|
-
totalViolations: number;
|
|
1753
|
-
byType: Record<string, number>;
|
|
1754
|
-
bySeverity: Record<string, number>;
|
|
1755
|
-
};
|
|
1756
|
-
}
|
|
1757
|
-
declare class CodeQualityValidator {
|
|
1758
|
-
private srcDir;
|
|
1759
|
-
private violations;
|
|
1760
|
-
constructor(srcDir: string);
|
|
1761
|
-
/**
|
|
1762
|
-
* Validate all TypeScript files in the source directory.
|
|
1763
|
-
*/
|
|
1764
|
-
validate(): Promise<ValidationResult>;
|
|
1765
|
-
/**
|
|
1766
|
-
* Validate a single file for hardcoded values.
|
|
1767
|
-
*/
|
|
1768
|
-
private validateFile;
|
|
1769
|
-
private checkForHexColors;
|
|
1770
|
-
private checkForRgbaColors;
|
|
1771
|
-
private checkForDimensions;
|
|
1772
|
-
private checkForGradients;
|
|
1773
|
-
private findTypeScriptFiles;
|
|
1774
|
-
private shouldSkipFile;
|
|
1775
|
-
private isExemptLine;
|
|
1776
|
-
private buildResult;
|
|
1777
|
-
/**
|
|
1778
|
-
* Format validation results for console output.
|
|
1779
|
-
*/
|
|
1780
|
-
formatResults(result: ValidationResult): string;
|
|
1781
|
-
}
|
|
1782
|
-
/**
|
|
1783
|
-
* Run code quality validation on the source directory.
|
|
1784
|
-
*/
|
|
1785
|
-
declare function validateCodeQuality(srcDir: string): Promise<ValidationResult>;
|
|
1786
|
-
/**
|
|
1787
|
-
* Run validation and print results to console.
|
|
1159
|
+
* console.log(`Score: ${result.score}/100`);
|
|
1160
|
+
* ```
|
|
1161
|
+
*
|
|
1162
|
+
* @param config - Presentation configuration
|
|
1163
|
+
* @returns Presentation result with outputs, QA results, and score
|
|
1164
|
+
* @throws {ValidationError} If input validation fails
|
|
1165
|
+
* @throws {QAFailureError} If QA score is below threshold
|
|
1788
1166
|
*/
|
|
1789
|
-
declare function
|
|
1790
|
-
|
|
1167
|
+
declare function generate(config: PresentationConfig): Promise<PresentationResult>;
|
|
1791
1168
|
/**
|
|
1792
|
-
*
|
|
1169
|
+
* Validate an existing presentation.
|
|
1170
|
+
*
|
|
1171
|
+
* @example
|
|
1172
|
+
* ```typescript
|
|
1173
|
+
* import { validate } from '@isovision/claude-presentation-master';
|
|
1174
|
+
* import fs from 'fs';
|
|
1793
1175
|
*
|
|
1794
|
-
*
|
|
1795
|
-
*
|
|
1176
|
+
* const html = fs.readFileSync('presentation.html', 'utf-8');
|
|
1177
|
+
* const result = await validate(html, { mode: 'keynote' });
|
|
1796
1178
|
*
|
|
1797
|
-
*
|
|
1798
|
-
*
|
|
1799
|
-
*
|
|
1800
|
-
* 3. SlideQualityReviewer -> Qualitative review per slide (must pass 95)
|
|
1801
|
-
* 4. Remediator -> Fix failing slides (3 attempts max)
|
|
1802
|
-
* 5. DeckQualityReviewer -> Holistic deck review (must pass 95)
|
|
1803
|
-
* 6. Renderer -> Premium HTML/PPTX output
|
|
1179
|
+
* console.log(`Score: ${result.score}/100`);
|
|
1180
|
+
* console.log(`Passed: ${result.passed}`);
|
|
1181
|
+
* ```
|
|
1804
1182
|
*
|
|
1805
|
-
*
|
|
1183
|
+
* @param presentation - HTML string or file buffer
|
|
1184
|
+
* @param options - Validation options
|
|
1185
|
+
* @returns QA validation results
|
|
1806
1186
|
*/
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
/** Content type */
|
|
1813
|
-
contentType?: 'markdown' | 'text';
|
|
1814
|
-
/** Output formats to generate */
|
|
1815
|
-
format?: OutputFormat[];
|
|
1816
|
-
/** Output directory */
|
|
1817
|
-
outputDir?: string;
|
|
1818
|
-
/** Presentation title (optional, will be detected from content) */
|
|
1819
|
-
title?: string;
|
|
1820
|
-
/** Author name */
|
|
1821
|
-
author?: string;
|
|
1822
|
-
/** Explicit presentation type (optional, will be detected from content) */
|
|
1823
|
-
presentationType?: PresentationType;
|
|
1824
|
-
/** Legacy mode (maps to presentation type) */
|
|
1825
|
-
mode?: PresentationMode;
|
|
1826
|
-
/** Minimum score threshold (default: 95) */
|
|
1827
|
-
qaThreshold?: number;
|
|
1828
|
-
/** Skip remediation (fail fast) */
|
|
1829
|
-
skipRemediation?: boolean;
|
|
1830
|
-
/** Verbose logging */
|
|
1831
|
-
verbose?: boolean;
|
|
1832
|
-
/** Local images to use as backgrounds (paths relative to output or absolute URLs) */
|
|
1833
|
-
images?: string[];
|
|
1834
|
-
/** Base path for resolving relative image paths */
|
|
1835
|
-
imageBasePath?: string;
|
|
1836
|
-
}
|
|
1837
|
-
interface GenerateResult {
|
|
1838
|
-
/** Generated outputs */
|
|
1839
|
-
outputs: {
|
|
1840
|
-
html?: string;
|
|
1841
|
-
pptx?: Buffer;
|
|
1842
|
-
};
|
|
1843
|
-
/** Final slides */
|
|
1844
|
-
slides: Slide[];
|
|
1845
|
-
/** Overall score (0-100) */
|
|
1187
|
+
declare function validate(presentation: string | Buffer, options?: {
|
|
1188
|
+
mode?: 'keynote' | 'business';
|
|
1189
|
+
threshold?: number;
|
|
1190
|
+
strictMode?: boolean;
|
|
1191
|
+
}): Promise<QAResults & {
|
|
1846
1192
|
score: number;
|
|
1847
|
-
|
|
1848
|
-
deckScore?: QualitativeDeckReview | undefined;
|
|
1849
|
-
/** Metadata */
|
|
1850
|
-
metadata: {
|
|
1851
|
-
title: string;
|
|
1852
|
-
author: string;
|
|
1853
|
-
presentationType: PresentationType;
|
|
1854
|
-
generatedAt: string;
|
|
1855
|
-
slideCount: number;
|
|
1856
|
-
totalWords: number;
|
|
1857
|
-
avgWordsPerSlide: number;
|
|
1858
|
-
};
|
|
1859
|
-
/** Remediation results (if any slides were fixed) */
|
|
1860
|
-
remediations?: RemediationResult[] | undefined;
|
|
1861
|
-
/** Any warnings (non-fatal issues) */
|
|
1862
|
-
warnings?: string[] | undefined;
|
|
1863
|
-
}
|
|
1193
|
+
}>;
|
|
1864
1194
|
/**
|
|
1865
|
-
*
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
*
|
|
1870
|
-
* 3. Qualitative review (95/100 threshold)
|
|
1871
|
-
* 4. Remediation (3 attempts per failing slide)
|
|
1872
|
-
* 5. Deck-level review
|
|
1873
|
-
* 6. Rendering to HTML/PPTX
|
|
1195
|
+
* Get the version of the package.
|
|
1196
|
+
*/
|
|
1197
|
+
declare const VERSION = "1.0.0";
|
|
1198
|
+
/**
|
|
1199
|
+
* Default export for convenience.
|
|
1874
1200
|
*/
|
|
1875
|
-
declare
|
|
1201
|
+
declare const _default: {
|
|
1202
|
+
generate: typeof generate;
|
|
1203
|
+
validate: typeof validate;
|
|
1204
|
+
PresentationEngine: typeof PresentationEngine;
|
|
1205
|
+
QAEngine: typeof QAEngine;
|
|
1206
|
+
VERSION: string;
|
|
1207
|
+
};
|
|
1876
1208
|
|
|
1877
|
-
export {
|
|
1209
|
+
export { type AccessibilityResults, type ChartData, type ChartDataset, ChartJsProvider, type ChartProvider, type ChartRequest, type ChartResult, type ChartType, CompositeChartProvider, CompositeImageProvider, type ContentAnalysis, ContentAnalyzer, type ContentQAResults, type ContrastIssue, type ExpertQAResults, type ExpertValidation, type FontSizeIssue, type GlanceTestResult, type ImageData, type ImageProvider, type ImageRequest, type ImageResult, KnowledgeBase, LocalImageProvider, MermaidProvider, type MetricData, type OneIdeaResult, type OutputFormat, PlaceholderImageProvider, PowerPointGenerator, type PresentationConfig, PresentationEngine, type PresentationMetadata, type PresentationMode, type PresentationResult, QAEngine, QAFailureError, type QAIssue, type QAResults, QuickChartProvider, RevealJsGenerator, type SCQAStructure, ScoreCalculator, type SignalNoiseResult, type Slide, type SlideContentScore, type SlideData, SlideFactory, type SlideType, type SlideVisualScore, type SparklineStructure, TemplateEngine, TemplateNotFoundError, type ThemeName, UnsplashImageProvider, VERSION, ValidationError, type VisualQAResults, createDefaultChartProvider, createDefaultImageProvider, _default as default, generate, getKnowledgeBase, validate };
|