claude-presentation-master 3.8.8 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +119 -6
- package/dist/index.mjs +119 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -714,9 +714,20 @@ declare class SlideGeneratorV2 {
|
|
|
714
714
|
* RULES:
|
|
715
715
|
* 1. Tables ALWAYS become table slides - NEVER extract to metrics
|
|
716
716
|
* 2. Empty sections are SKIPPED - no blank divider slides
|
|
717
|
-
* 3.
|
|
717
|
+
* 3. H3 headings become individual slides with ACTION TITLES (critical for consulting)
|
|
718
|
+
* 4. Sections with minimal content are combined into statement slides
|
|
718
719
|
*/
|
|
719
720
|
private processSectionContent;
|
|
721
|
+
/**
|
|
722
|
+
* Split tokens into subsections based on H3 headers.
|
|
723
|
+
* H3 headers become ACTION TITLES for consulting decks.
|
|
724
|
+
*/
|
|
725
|
+
private splitIntoSubsections;
|
|
726
|
+
/**
|
|
727
|
+
* Process a subsection (H3) into a slide.
|
|
728
|
+
* The H3 title IS the action title.
|
|
729
|
+
*/
|
|
730
|
+
private processSubsection;
|
|
720
731
|
/**
|
|
721
732
|
* Create a table slide - render the table as-is, no extraction.
|
|
722
733
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -714,9 +714,20 @@ declare class SlideGeneratorV2 {
|
|
|
714
714
|
* RULES:
|
|
715
715
|
* 1. Tables ALWAYS become table slides - NEVER extract to metrics
|
|
716
716
|
* 2. Empty sections are SKIPPED - no blank divider slides
|
|
717
|
-
* 3.
|
|
717
|
+
* 3. H3 headings become individual slides with ACTION TITLES (critical for consulting)
|
|
718
|
+
* 4. Sections with minimal content are combined into statement slides
|
|
718
719
|
*/
|
|
719
720
|
private processSectionContent;
|
|
721
|
+
/**
|
|
722
|
+
* Split tokens into subsections based on H3 headers.
|
|
723
|
+
* H3 headers become ACTION TITLES for consulting decks.
|
|
724
|
+
*/
|
|
725
|
+
private splitIntoSubsections;
|
|
726
|
+
/**
|
|
727
|
+
* Process a subsection (H3) into a slide.
|
|
728
|
+
* The H3 title IS the action title.
|
|
729
|
+
*/
|
|
730
|
+
private processSubsection;
|
|
720
731
|
/**
|
|
721
732
|
* Create a table slide - render the table as-is, no extraction.
|
|
722
733
|
*/
|
package/dist/index.js
CHANGED
|
@@ -93861,10 +93861,19 @@ var SlideGeneratorV2 = class {
|
|
|
93861
93861
|
* RULES:
|
|
93862
93862
|
* 1. Tables ALWAYS become table slides - NEVER extract to metrics
|
|
93863
93863
|
* 2. Empty sections are SKIPPED - no blank divider slides
|
|
93864
|
-
* 3.
|
|
93864
|
+
* 3. H3 headings become individual slides with ACTION TITLES (critical for consulting)
|
|
93865
|
+
* 4. Sections with minimal content are combined into statement slides
|
|
93865
93866
|
*/
|
|
93866
93867
|
processSectionContent(section, startIndex) {
|
|
93867
93868
|
const slides = [];
|
|
93869
|
+
const subsections = this.splitIntoSubsections(section.tokens);
|
|
93870
|
+
if (subsections.length > 0) {
|
|
93871
|
+
for (const subsection of subsections) {
|
|
93872
|
+
const subsectionSlides = this.processSubsection(subsection, section.title);
|
|
93873
|
+
slides.push(...subsectionSlides);
|
|
93874
|
+
}
|
|
93875
|
+
return slides;
|
|
93876
|
+
}
|
|
93868
93877
|
const tableTokens = section.tokens.filter((t) => t.type === "table");
|
|
93869
93878
|
const hasList = section.tokens.some((t) => t.type === "list");
|
|
93870
93879
|
const hasSignificantText = this.hasSignificantParagraphs(section.tokens);
|
|
@@ -93891,6 +93900,63 @@ var SlideGeneratorV2 = class {
|
|
|
93891
93900
|
}
|
|
93892
93901
|
return slides;
|
|
93893
93902
|
}
|
|
93903
|
+
/**
|
|
93904
|
+
* Split tokens into subsections based on H3 headers.
|
|
93905
|
+
* H3 headers become ACTION TITLES for consulting decks.
|
|
93906
|
+
*/
|
|
93907
|
+
splitIntoSubsections(tokens) {
|
|
93908
|
+
const subsections = [];
|
|
93909
|
+
let currentSubsection = null;
|
|
93910
|
+
let hasH3 = false;
|
|
93911
|
+
for (const token of tokens) {
|
|
93912
|
+
if (token.type === "heading" && token.depth === 3) {
|
|
93913
|
+
hasH3 = true;
|
|
93914
|
+
if (currentSubsection) {
|
|
93915
|
+
subsections.push(currentSubsection);
|
|
93916
|
+
}
|
|
93917
|
+
currentSubsection = {
|
|
93918
|
+
title: token.text,
|
|
93919
|
+
tokens: []
|
|
93920
|
+
};
|
|
93921
|
+
} else if (currentSubsection) {
|
|
93922
|
+
currentSubsection.tokens.push(token);
|
|
93923
|
+
}
|
|
93924
|
+
}
|
|
93925
|
+
if (currentSubsection && currentSubsection.tokens.length > 0) {
|
|
93926
|
+
subsections.push(currentSubsection);
|
|
93927
|
+
}
|
|
93928
|
+
return hasH3 ? subsections : [];
|
|
93929
|
+
}
|
|
93930
|
+
/**
|
|
93931
|
+
* Process a subsection (H3) into a slide.
|
|
93932
|
+
* The H3 title IS the action title.
|
|
93933
|
+
*/
|
|
93934
|
+
processSubsection(subsection, parentTitle) {
|
|
93935
|
+
const slides = [];
|
|
93936
|
+
const tableTokens = subsection.tokens.filter((t) => t.type === "table");
|
|
93937
|
+
for (const tableToken of tableTokens) {
|
|
93938
|
+
slides.push(this.createTableSlide(subsection.title, tableToken));
|
|
93939
|
+
}
|
|
93940
|
+
const hasList = subsection.tokens.some((t) => t.type === "list");
|
|
93941
|
+
if (hasList) {
|
|
93942
|
+
const listSlides = this.createBulletSlides(subsection.title, subsection.tokens);
|
|
93943
|
+
slides.push(...listSlides);
|
|
93944
|
+
}
|
|
93945
|
+
if (slides.length === 0) {
|
|
93946
|
+
const paragraphs = subsection.tokens.filter((t) => t.type === "paragraph");
|
|
93947
|
+
if (paragraphs.length > 0) {
|
|
93948
|
+
const statement = paragraphs.map((p) => p.text).join("\n\n");
|
|
93949
|
+
slides.push({
|
|
93950
|
+
index: 0,
|
|
93951
|
+
type: "statement",
|
|
93952
|
+
title: subsection.title,
|
|
93953
|
+
// H3 is the action title
|
|
93954
|
+
content: { statement }
|
|
93955
|
+
});
|
|
93956
|
+
}
|
|
93957
|
+
}
|
|
93958
|
+
return slides;
|
|
93959
|
+
}
|
|
93894
93960
|
/**
|
|
93895
93961
|
* Create a table slide - render the table as-is, no extraction.
|
|
93896
93962
|
*/
|
|
@@ -95834,7 +95900,29 @@ SUCCESS: Generated ${slides.length} slides scoring ${review.overallScore}/100`);
|
|
|
95834
95900
|
*/
|
|
95835
95901
|
isActionTitle(title) {
|
|
95836
95902
|
const lower = title.toLowerCase();
|
|
95837
|
-
const
|
|
95903
|
+
const genericTopics = [
|
|
95904
|
+
"executive summary",
|
|
95905
|
+
"summary",
|
|
95906
|
+
"overview",
|
|
95907
|
+
"introduction",
|
|
95908
|
+
"background",
|
|
95909
|
+
"context",
|
|
95910
|
+
"current state",
|
|
95911
|
+
"assessment",
|
|
95912
|
+
"recommendations",
|
|
95913
|
+
"next steps",
|
|
95914
|
+
"conclusion",
|
|
95915
|
+
"appendix",
|
|
95916
|
+
"key findings",
|
|
95917
|
+
"findings",
|
|
95918
|
+
"analysis",
|
|
95919
|
+
"results"
|
|
95920
|
+
];
|
|
95921
|
+
if (genericTopics.some((topic) => lower === topic || lower === topic + "s")) {
|
|
95922
|
+
return false;
|
|
95923
|
+
}
|
|
95924
|
+
const actionIndicators = [
|
|
95925
|
+
// Verbs
|
|
95838
95926
|
"increase",
|
|
95839
95927
|
"decrease",
|
|
95840
95928
|
"reduce",
|
|
@@ -95847,31 +95935,56 @@ SUCCESS: Generated ${slides.length} slides scoring ${review.overallScore}/100`);
|
|
|
95847
95935
|
"build",
|
|
95848
95936
|
"transform",
|
|
95849
95937
|
"accelerate",
|
|
95938
|
+
"cut",
|
|
95939
|
+
"save",
|
|
95940
|
+
"grow",
|
|
95941
|
+
"expand",
|
|
95942
|
+
"optimize",
|
|
95943
|
+
"streamline",
|
|
95944
|
+
// Modal verbs indicating action
|
|
95850
95945
|
"will",
|
|
95851
95946
|
"can",
|
|
95852
95947
|
"should",
|
|
95853
95948
|
"must",
|
|
95854
95949
|
"need",
|
|
95855
95950
|
"require",
|
|
95951
|
+
// Insight verbs
|
|
95856
95952
|
"shows",
|
|
95857
95953
|
"demonstrates",
|
|
95858
95954
|
"reveals",
|
|
95859
95955
|
"indicates",
|
|
95860
95956
|
"suggests",
|
|
95957
|
+
// Cause/effect
|
|
95861
95958
|
"leads to",
|
|
95862
95959
|
"results in",
|
|
95863
95960
|
"enables",
|
|
95864
95961
|
"supports",
|
|
95962
|
+
"drives",
|
|
95963
|
+
// Method indicators
|
|
95865
95964
|
"by",
|
|
95866
95965
|
"through",
|
|
95867
95966
|
"via",
|
|
95868
95967
|
"using",
|
|
95869
|
-
//
|
|
95968
|
+
// Quantified outcomes
|
|
95870
95969
|
"%",
|
|
95871
|
-
"$"
|
|
95872
|
-
|
|
95970
|
+
"$",
|
|
95971
|
+
"x",
|
|
95972
|
+
"10x",
|
|
95973
|
+
"2x",
|
|
95974
|
+
"3x",
|
|
95975
|
+
// Time-bound opportunities
|
|
95976
|
+
"opportunity",
|
|
95977
|
+
"in q",
|
|
95978
|
+
"by q",
|
|
95979
|
+
"timeline",
|
|
95980
|
+
"roadmap",
|
|
95981
|
+
// Comparative
|
|
95982
|
+
"better",
|
|
95983
|
+
"faster",
|
|
95984
|
+
"cheaper",
|
|
95985
|
+
"more efficient"
|
|
95873
95986
|
];
|
|
95874
|
-
return
|
|
95987
|
+
return actionIndicators.some((word) => lower.includes(word));
|
|
95875
95988
|
}
|
|
95876
95989
|
/**
|
|
95877
95990
|
* Assess the flow and narrative structure of the deck.
|
package/dist/index.mjs
CHANGED
|
@@ -2145,10 +2145,19 @@ var SlideGeneratorV2 = class {
|
|
|
2145
2145
|
* RULES:
|
|
2146
2146
|
* 1. Tables ALWAYS become table slides - NEVER extract to metrics
|
|
2147
2147
|
* 2. Empty sections are SKIPPED - no blank divider slides
|
|
2148
|
-
* 3.
|
|
2148
|
+
* 3. H3 headings become individual slides with ACTION TITLES (critical for consulting)
|
|
2149
|
+
* 4. Sections with minimal content are combined into statement slides
|
|
2149
2150
|
*/
|
|
2150
2151
|
processSectionContent(section, startIndex) {
|
|
2151
2152
|
const slides = [];
|
|
2153
|
+
const subsections = this.splitIntoSubsections(section.tokens);
|
|
2154
|
+
if (subsections.length > 0) {
|
|
2155
|
+
for (const subsection of subsections) {
|
|
2156
|
+
const subsectionSlides = this.processSubsection(subsection, section.title);
|
|
2157
|
+
slides.push(...subsectionSlides);
|
|
2158
|
+
}
|
|
2159
|
+
return slides;
|
|
2160
|
+
}
|
|
2152
2161
|
const tableTokens = section.tokens.filter((t) => t.type === "table");
|
|
2153
2162
|
const hasList = section.tokens.some((t) => t.type === "list");
|
|
2154
2163
|
const hasSignificantText = this.hasSignificantParagraphs(section.tokens);
|
|
@@ -2175,6 +2184,63 @@ var SlideGeneratorV2 = class {
|
|
|
2175
2184
|
}
|
|
2176
2185
|
return slides;
|
|
2177
2186
|
}
|
|
2187
|
+
/**
|
|
2188
|
+
* Split tokens into subsections based on H3 headers.
|
|
2189
|
+
* H3 headers become ACTION TITLES for consulting decks.
|
|
2190
|
+
*/
|
|
2191
|
+
splitIntoSubsections(tokens) {
|
|
2192
|
+
const subsections = [];
|
|
2193
|
+
let currentSubsection = null;
|
|
2194
|
+
let hasH3 = false;
|
|
2195
|
+
for (const token of tokens) {
|
|
2196
|
+
if (token.type === "heading" && token.depth === 3) {
|
|
2197
|
+
hasH3 = true;
|
|
2198
|
+
if (currentSubsection) {
|
|
2199
|
+
subsections.push(currentSubsection);
|
|
2200
|
+
}
|
|
2201
|
+
currentSubsection = {
|
|
2202
|
+
title: token.text,
|
|
2203
|
+
tokens: []
|
|
2204
|
+
};
|
|
2205
|
+
} else if (currentSubsection) {
|
|
2206
|
+
currentSubsection.tokens.push(token);
|
|
2207
|
+
}
|
|
2208
|
+
}
|
|
2209
|
+
if (currentSubsection && currentSubsection.tokens.length > 0) {
|
|
2210
|
+
subsections.push(currentSubsection);
|
|
2211
|
+
}
|
|
2212
|
+
return hasH3 ? subsections : [];
|
|
2213
|
+
}
|
|
2214
|
+
/**
|
|
2215
|
+
* Process a subsection (H3) into a slide.
|
|
2216
|
+
* The H3 title IS the action title.
|
|
2217
|
+
*/
|
|
2218
|
+
processSubsection(subsection, parentTitle) {
|
|
2219
|
+
const slides = [];
|
|
2220
|
+
const tableTokens = subsection.tokens.filter((t) => t.type === "table");
|
|
2221
|
+
for (const tableToken of tableTokens) {
|
|
2222
|
+
slides.push(this.createTableSlide(subsection.title, tableToken));
|
|
2223
|
+
}
|
|
2224
|
+
const hasList = subsection.tokens.some((t) => t.type === "list");
|
|
2225
|
+
if (hasList) {
|
|
2226
|
+
const listSlides = this.createBulletSlides(subsection.title, subsection.tokens);
|
|
2227
|
+
slides.push(...listSlides);
|
|
2228
|
+
}
|
|
2229
|
+
if (slides.length === 0) {
|
|
2230
|
+
const paragraphs = subsection.tokens.filter((t) => t.type === "paragraph");
|
|
2231
|
+
if (paragraphs.length > 0) {
|
|
2232
|
+
const statement = paragraphs.map((p) => p.text).join("\n\n");
|
|
2233
|
+
slides.push({
|
|
2234
|
+
index: 0,
|
|
2235
|
+
type: "statement",
|
|
2236
|
+
title: subsection.title,
|
|
2237
|
+
// H3 is the action title
|
|
2238
|
+
content: { statement }
|
|
2239
|
+
});
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2242
|
+
return slides;
|
|
2243
|
+
}
|
|
2178
2244
|
/**
|
|
2179
2245
|
* Create a table slide - render the table as-is, no extraction.
|
|
2180
2246
|
*/
|
|
@@ -4118,7 +4184,29 @@ SUCCESS: Generated ${slides.length} slides scoring ${review.overallScore}/100`);
|
|
|
4118
4184
|
*/
|
|
4119
4185
|
isActionTitle(title) {
|
|
4120
4186
|
const lower = title.toLowerCase();
|
|
4121
|
-
const
|
|
4187
|
+
const genericTopics = [
|
|
4188
|
+
"executive summary",
|
|
4189
|
+
"summary",
|
|
4190
|
+
"overview",
|
|
4191
|
+
"introduction",
|
|
4192
|
+
"background",
|
|
4193
|
+
"context",
|
|
4194
|
+
"current state",
|
|
4195
|
+
"assessment",
|
|
4196
|
+
"recommendations",
|
|
4197
|
+
"next steps",
|
|
4198
|
+
"conclusion",
|
|
4199
|
+
"appendix",
|
|
4200
|
+
"key findings",
|
|
4201
|
+
"findings",
|
|
4202
|
+
"analysis",
|
|
4203
|
+
"results"
|
|
4204
|
+
];
|
|
4205
|
+
if (genericTopics.some((topic) => lower === topic || lower === topic + "s")) {
|
|
4206
|
+
return false;
|
|
4207
|
+
}
|
|
4208
|
+
const actionIndicators = [
|
|
4209
|
+
// Verbs
|
|
4122
4210
|
"increase",
|
|
4123
4211
|
"decrease",
|
|
4124
4212
|
"reduce",
|
|
@@ -4131,31 +4219,56 @@ SUCCESS: Generated ${slides.length} slides scoring ${review.overallScore}/100`);
|
|
|
4131
4219
|
"build",
|
|
4132
4220
|
"transform",
|
|
4133
4221
|
"accelerate",
|
|
4222
|
+
"cut",
|
|
4223
|
+
"save",
|
|
4224
|
+
"grow",
|
|
4225
|
+
"expand",
|
|
4226
|
+
"optimize",
|
|
4227
|
+
"streamline",
|
|
4228
|
+
// Modal verbs indicating action
|
|
4134
4229
|
"will",
|
|
4135
4230
|
"can",
|
|
4136
4231
|
"should",
|
|
4137
4232
|
"must",
|
|
4138
4233
|
"need",
|
|
4139
4234
|
"require",
|
|
4235
|
+
// Insight verbs
|
|
4140
4236
|
"shows",
|
|
4141
4237
|
"demonstrates",
|
|
4142
4238
|
"reveals",
|
|
4143
4239
|
"indicates",
|
|
4144
4240
|
"suggests",
|
|
4241
|
+
// Cause/effect
|
|
4145
4242
|
"leads to",
|
|
4146
4243
|
"results in",
|
|
4147
4244
|
"enables",
|
|
4148
4245
|
"supports",
|
|
4246
|
+
"drives",
|
|
4247
|
+
// Method indicators
|
|
4149
4248
|
"by",
|
|
4150
4249
|
"through",
|
|
4151
4250
|
"via",
|
|
4152
4251
|
"using",
|
|
4153
|
-
//
|
|
4252
|
+
// Quantified outcomes
|
|
4154
4253
|
"%",
|
|
4155
|
-
"$"
|
|
4156
|
-
|
|
4254
|
+
"$",
|
|
4255
|
+
"x",
|
|
4256
|
+
"10x",
|
|
4257
|
+
"2x",
|
|
4258
|
+
"3x",
|
|
4259
|
+
// Time-bound opportunities
|
|
4260
|
+
"opportunity",
|
|
4261
|
+
"in q",
|
|
4262
|
+
"by q",
|
|
4263
|
+
"timeline",
|
|
4264
|
+
"roadmap",
|
|
4265
|
+
// Comparative
|
|
4266
|
+
"better",
|
|
4267
|
+
"faster",
|
|
4268
|
+
"cheaper",
|
|
4269
|
+
"more efficient"
|
|
4157
4270
|
];
|
|
4158
|
-
return
|
|
4271
|
+
return actionIndicators.some((word) => lower.includes(word));
|
|
4159
4272
|
}
|
|
4160
4273
|
/**
|
|
4161
4274
|
* Assess the flow and narrative structure of the deck.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-presentation-master",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "Generate world-class presentations using expert methodologies from Duarte, Reynolds, Gallo, and Anderson. Enforces rigorous quality standards through real visual validation.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|