themed-markdown 0.1.20 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +68 -61
- package/dist/industryMarkdown/index.d.ts +1 -1
- package/dist/industryMarkdown/index.d.ts.map +1 -1
- package/dist/industryMarkdown/types/presentation.d.ts +0 -7
- package/dist/industryMarkdown/types/presentation.d.ts.map +1 -1
- package/dist/industryMarkdown/utils/presentationUtils.d.ts +2 -2
- package/dist/industryMarkdown/utils/presentationUtils.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { IndustryLazyMermaidDiagram } from './industryMarkdown/components/Indust
|
|
|
14
14
|
export { IndustryZoomableMermaidDiagram } from './industryMarkdown/components/IndustryZoomableMermaidDiagram';
|
|
15
15
|
export { parseMarkdownIntoPresentation, serializePresentationToMarkdown, updatePresentationSlide, parseMarkdownIntoPresentationFromSource, createGithubFileSource, extractSlideTitle, createPresentationWithErrorMessage, reconstructMarkdownContent, getAllSlideTitles, findSlideByTitle, findSlideIndexByTitle, updateSlideTitle, updateSlideContent, } from './industryMarkdown/utils/presentationUtils';
|
|
16
16
|
export { parseMarkdownChunks } from './industryMarkdown/utils/markdownUtils';
|
|
17
|
-
export type { MarkdownPresentation, MarkdownSlide,
|
|
17
|
+
export type { MarkdownPresentation, MarkdownSlide, MarkdownSource, MarkdownSourceType, RepositoryInfo, MarkdownSlideLocation, } from './industryMarkdown/types/presentation';
|
|
18
18
|
export type { ContentChunk, MarkdownChunk, MermaidChunk, CodeChunk, } from './industryMarkdown/types/customMarkdownChunks';
|
|
19
19
|
export type { Theme } from './industryTheme';
|
|
20
20
|
export { theme as defaultTheme } from './industryTheme';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources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E,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACL,aAAa,EACb,QAAQ,EACR,SAAS,EACV,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACf,MAAM,iBAAiB,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -237,12 +237,6 @@ var CHUNK_TYPES = {
|
|
|
237
237
|
SLIDE: "slide_chunk",
|
|
238
238
|
CODE: "code_chunk"
|
|
239
239
|
};
|
|
240
|
-
var MarkdownPresentationFormat;
|
|
241
|
-
((MarkdownPresentationFormat2) => {
|
|
242
|
-
MarkdownPresentationFormat2["HORIZONTAL_RULE"] = "horizontal_rule";
|
|
243
|
-
MarkdownPresentationFormat2["HEADER"] = "header";
|
|
244
|
-
MarkdownPresentationFormat2["FULL_CONTENT"] = "full_content";
|
|
245
|
-
})(MarkdownPresentationFormat ||= {});
|
|
246
240
|
var MarkdownSourceType;
|
|
247
241
|
((MarkdownSourceType2) => {
|
|
248
242
|
MarkdownSourceType2["WORKSPACE_FILE"] = "workspace_file";
|
|
@@ -370,9 +364,9 @@ function extractSlideTitle(content) {
|
|
|
370
364
|
}
|
|
371
365
|
return "Untitled Slide";
|
|
372
366
|
}
|
|
373
|
-
function parseMarkdownIntoPresentation(markdownContent,
|
|
374
|
-
const
|
|
375
|
-
if (
|
|
367
|
+
function parseMarkdownIntoPresentation(markdownContent, repositoryInfo, customParsers) {
|
|
368
|
+
const hasMultipleHeaders = detectMultipleHeaders(markdownContent);
|
|
369
|
+
if (!hasMultipleHeaders) {
|
|
376
370
|
const id = `slide-0-${hashMarkdownString2(markdownContent)}`;
|
|
377
371
|
const chunks = parseMarkdownChunks(markdownContent, id, customParsers);
|
|
378
372
|
return {
|
|
@@ -384,14 +378,12 @@ function parseMarkdownIntoPresentation(markdownContent, format, repositoryInfo,
|
|
|
384
378
|
startLine: 0,
|
|
385
379
|
endLine: markdownContent.split(`
|
|
386
380
|
`).length - 1,
|
|
387
|
-
content: markdownContent
|
|
388
|
-
type: detectedFormat
|
|
381
|
+
content: markdownContent
|
|
389
382
|
},
|
|
390
383
|
chunks
|
|
391
384
|
}
|
|
392
385
|
],
|
|
393
386
|
originalContent: markdownContent,
|
|
394
|
-
format: detectedFormat,
|
|
395
387
|
repositoryInfo
|
|
396
388
|
};
|
|
397
389
|
}
|
|
@@ -400,9 +392,20 @@ function parseMarkdownIntoPresentation(markdownContent, format, repositoryInfo,
|
|
|
400
392
|
const slides = [];
|
|
401
393
|
let currentSlideLines = [];
|
|
402
394
|
let currentSlideStartLine = 0;
|
|
395
|
+
let inCodeBlock = false;
|
|
396
|
+
let codeBlockDelimiter = "";
|
|
403
397
|
for (let i = 0;i < lines.length; i++) {
|
|
404
398
|
const line = lines[i];
|
|
405
|
-
|
|
399
|
+
if (line.trim().startsWith("```") || line.trim().startsWith("~~~")) {
|
|
400
|
+
if (!inCodeBlock) {
|
|
401
|
+
inCodeBlock = true;
|
|
402
|
+
codeBlockDelimiter = line.trim().substring(0, 3);
|
|
403
|
+
} else if (line.trim().startsWith(codeBlockDelimiter)) {
|
|
404
|
+
inCodeBlock = false;
|
|
405
|
+
codeBlockDelimiter = "";
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
const isDelimiter = !inCodeBlock && line.trim().startsWith("#") && !line.trim().startsWith("###");
|
|
406
409
|
if (isDelimiter && currentSlideLines.length > 0) {
|
|
407
410
|
const slideContent = currentSlideLines.join(`
|
|
408
411
|
`);
|
|
@@ -414,12 +417,11 @@ function parseMarkdownIntoPresentation(markdownContent, format, repositoryInfo,
|
|
|
414
417
|
location: {
|
|
415
418
|
startLine: currentSlideStartLine,
|
|
416
419
|
endLine: i - 1,
|
|
417
|
-
content: slideContent
|
|
418
|
-
type: detectedFormat
|
|
420
|
+
content: slideContent
|
|
419
421
|
},
|
|
420
422
|
chunks
|
|
421
423
|
});
|
|
422
|
-
currentSlideLines =
|
|
424
|
+
currentSlideLines = [line];
|
|
423
425
|
currentSlideStartLine = i;
|
|
424
426
|
} else {
|
|
425
427
|
currentSlideLines.push(line);
|
|
@@ -436,8 +438,7 @@ function parseMarkdownIntoPresentation(markdownContent, format, repositoryInfo,
|
|
|
436
438
|
location: {
|
|
437
439
|
startLine: currentSlideStartLine,
|
|
438
440
|
endLine: lines.length - 1,
|
|
439
|
-
content: slideContent
|
|
440
|
-
type: detectedFormat
|
|
441
|
+
content: slideContent
|
|
441
442
|
},
|
|
442
443
|
chunks
|
|
443
444
|
});
|
|
@@ -445,28 +446,38 @@ function parseMarkdownIntoPresentation(markdownContent, format, repositoryInfo,
|
|
|
445
446
|
return {
|
|
446
447
|
slides,
|
|
447
448
|
originalContent: markdownContent,
|
|
448
|
-
format: detectedFormat,
|
|
449
449
|
repositoryInfo
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function detectMultipleHeaders(markdownContent) {
|
|
453
453
|
const lines = markdownContent.split(`
|
|
454
454
|
`);
|
|
455
|
-
let hrCount = 0;
|
|
456
455
|
let h1Count = 0;
|
|
456
|
+
let h2Count = 0;
|
|
457
|
+
let inCodeBlock = false;
|
|
458
|
+
let codeBlockDelimiter = "";
|
|
457
459
|
for (const line of lines) {
|
|
458
|
-
if (line.trim()
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
460
|
+
if (line.trim().startsWith("```") || line.trim().startsWith("~~~")) {
|
|
461
|
+
if (!inCodeBlock) {
|
|
462
|
+
inCodeBlock = true;
|
|
463
|
+
codeBlockDelimiter = line.trim().substring(0, 3);
|
|
464
|
+
} else if (line.trim().startsWith(codeBlockDelimiter)) {
|
|
465
|
+
inCodeBlock = false;
|
|
466
|
+
codeBlockDelimiter = "";
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
if (!inCodeBlock) {
|
|
470
|
+
if (line.trim().startsWith("#") && !line.trim().startsWith("###")) {
|
|
471
|
+
if (!line.trim().startsWith("##")) {
|
|
472
|
+
h1Count++;
|
|
473
|
+
} else {
|
|
474
|
+
h2Count++;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
468
478
|
}
|
|
469
|
-
|
|
479
|
+
const totalHeaders = h1Count + h2Count;
|
|
480
|
+
return totalHeaders > 1;
|
|
470
481
|
}
|
|
471
482
|
function parseBashCommands(codeString) {
|
|
472
483
|
const lines = codeString.split(`
|
|
@@ -475,10 +486,12 @@ function parseBashCommands(codeString) {
|
|
|
475
486
|
let currentCommand = "";
|
|
476
487
|
let commandStartLine = 0;
|
|
477
488
|
let currentDescription = "";
|
|
489
|
+
let inBackslashContinuation = false;
|
|
478
490
|
for (let i = 0;i < lines.length; i++) {
|
|
479
|
-
const
|
|
491
|
+
const rawLine = lines[i];
|
|
492
|
+
const line = rawLine.trim();
|
|
480
493
|
if (!line) {
|
|
481
|
-
if (currentCommand) {
|
|
494
|
+
if (currentCommand && !inBackslashContinuation) {
|
|
482
495
|
commands.push({
|
|
483
496
|
command: currentCommand.trim(),
|
|
484
497
|
description: currentDescription || undefined,
|
|
@@ -495,11 +508,19 @@ function parseBashCommands(codeString) {
|
|
|
495
508
|
}
|
|
496
509
|
continue;
|
|
497
510
|
}
|
|
498
|
-
|
|
511
|
+
const endsWithBackslash = rawLine.trimEnd().endsWith("\\");
|
|
512
|
+
if (endsWithBackslash || inBackslashContinuation) {
|
|
499
513
|
if (!currentCommand) {
|
|
500
514
|
commandStartLine = i;
|
|
501
515
|
}
|
|
502
|
-
|
|
516
|
+
if (endsWithBackslash) {
|
|
517
|
+
const content = rawLine.trimEnd().slice(0, -1).trim();
|
|
518
|
+
currentCommand += (currentCommand ? " " : "") + content;
|
|
519
|
+
inBackslashContinuation = true;
|
|
520
|
+
} else {
|
|
521
|
+
currentCommand += (currentCommand ? " " : "") + line;
|
|
522
|
+
inBackslashContinuation = false;
|
|
523
|
+
}
|
|
503
524
|
continue;
|
|
504
525
|
}
|
|
505
526
|
const isPipeContinuation = line.startsWith("|") || line.startsWith("&&") || line.startsWith("||");
|
|
@@ -3830,7 +3851,7 @@ function parseMarkdownIntoPresentationFromSource(source) {
|
|
|
3830
3851
|
case MarkdownSourceType.WORKSPACE_FILE:
|
|
3831
3852
|
case MarkdownSourceType.GITHUB_FILE:
|
|
3832
3853
|
case MarkdownSourceType.DRAFT:
|
|
3833
|
-
presentation = parseMarkdownIntoPresentation2(source.content,
|
|
3854
|
+
presentation = parseMarkdownIntoPresentation2(source.content, source.repositoryInfo);
|
|
3834
3855
|
break;
|
|
3835
3856
|
default:
|
|
3836
3857
|
throw new Error(`Unsupported source type: ${source.type}`);
|
|
@@ -3847,8 +3868,8 @@ function createGithubFileSource(content, repositoryInfo) {
|
|
|
3847
3868
|
deletable: false
|
|
3848
3869
|
};
|
|
3849
3870
|
}
|
|
3850
|
-
function parseMarkdownIntoPresentation2(markdownContent,
|
|
3851
|
-
return parseMarkdownIntoPresentation(markdownContent,
|
|
3871
|
+
function parseMarkdownIntoPresentation2(markdownContent, repositoryInfo) {
|
|
3872
|
+
return parseMarkdownIntoPresentation(markdownContent, repositoryInfo);
|
|
3852
3873
|
}
|
|
3853
3874
|
function createPresentationWithErrorMessage(errorMessage) {
|
|
3854
3875
|
const errorMessageMarkdown = `# Error Loading Markdown:
|
|
@@ -3862,37 +3883,23 @@ ${errorMessage}`;
|
|
|
3862
3883
|
location: {
|
|
3863
3884
|
startLine: 0,
|
|
3864
3885
|
endLine: 0,
|
|
3865
|
-
content: errorMessageMarkdown
|
|
3866
|
-
type: MarkdownPresentationFormat.FULL_CONTENT
|
|
3886
|
+
content: errorMessageMarkdown
|
|
3867
3887
|
},
|
|
3868
3888
|
chunks: parseMarkdownChunks(errorMessageMarkdown, "slide-error")
|
|
3869
3889
|
}
|
|
3870
3890
|
],
|
|
3871
|
-
originalContent: errorMessageMarkdown
|
|
3872
|
-
format: MarkdownPresentationFormat.FULL_CONTENT
|
|
3891
|
+
originalContent: errorMessageMarkdown
|
|
3873
3892
|
};
|
|
3874
3893
|
}
|
|
3875
3894
|
function reconstructMarkdownContent(presentation) {
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
return
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
`);
|
|
3883
|
-
case MarkdownPresentationFormat.HEADER:
|
|
3884
|
-
return presentation.slides.map((slide, index) => {
|
|
3885
|
-
if (index === 0 && !slide.location.content.startsWith("##")) {
|
|
3886
|
-
return slide.location.content;
|
|
3887
|
-
}
|
|
3888
|
-
return slide.location.content.startsWith("##") ? slide.location.content : `## ${slide.location.content}`;
|
|
3889
|
-
}).join(`
|
|
3895
|
+
return presentation.slides.map((slide, index) => {
|
|
3896
|
+
if (index === 0 && !slide.location.content.startsWith("##")) {
|
|
3897
|
+
return slide.location.content;
|
|
3898
|
+
}
|
|
3899
|
+
return slide.location.content.startsWith("##") ? slide.location.content : `## ${slide.location.content}`;
|
|
3900
|
+
}).join(`
|
|
3890
3901
|
|
|
3891
3902
|
`);
|
|
3892
|
-
case MarkdownPresentationFormat.FULL_CONTENT:
|
|
3893
|
-
default:
|
|
3894
|
-
return presentation.slides[0]?.location.content || "";
|
|
3895
|
-
}
|
|
3896
3903
|
}
|
|
3897
3904
|
function getAllSlideTitles(presentation) {
|
|
3898
3905
|
return presentation.slides.map((slide) => slide.title);
|
|
@@ -16,7 +16,7 @@ export { IndustryLazyMermaidDiagram } from './components/IndustryLazyMermaidDiag
|
|
|
16
16
|
export { IndustryZoomableMermaidDiagram } from './components/IndustryZoomableMermaidDiagram';
|
|
17
17
|
export { parseMarkdownIntoPresentation, serializePresentationToMarkdown, updatePresentationSlide, parseMarkdownIntoPresentationFromSource, createGithubFileSource, extractSlideTitle, createPresentationWithErrorMessage, reconstructMarkdownContent, getAllSlideTitles, findSlideByTitle, findSlideIndexByTitle, updateSlideTitle, updateSlideContent, } from './utils/presentationUtils';
|
|
18
18
|
export { parseMarkdownChunks } from './utils/markdownUtils';
|
|
19
|
-
export type { MarkdownPresentation, MarkdownSlide,
|
|
19
|
+
export type { MarkdownPresentation, MarkdownSlide, MarkdownSource, MarkdownSourceType, RepositoryInfo, MarkdownSlideLocation, } from './types/presentation';
|
|
20
20
|
export type { Theme } from '../industryTheme';
|
|
21
21
|
export { theme as defaultTheme } from '../industryTheme';
|
|
22
22
|
export { ThemeProvider, useTheme, withTheme } from '../industryTheme/ThemeProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../industryMarkdown/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAGrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,YAAY,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAGrG,OAAO,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAC7F,YAAY,EAAE,mCAAmC,EAAE,MAAM,6CAA6C,CAAC;AAGvG,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAG3F,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,0B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AAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAG7F,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,uBAAuB,EACvB,uCAAuC,EACvC,sBAAsB,EACtB,iBAAiB,EACjB,kCAAkC,EAClC,0BAA0B,EAC1B,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EACL,aAAa,EACb,QAAQ,EACR,SAAS,EACV,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACf,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { ContentChunk } from './customMarkdownChunks';
|
|
2
|
-
export declare enum MarkdownPresentationFormat {
|
|
3
|
-
HORIZONTAL_RULE = "horizontal_rule",
|
|
4
|
-
HEADER = "header",
|
|
5
|
-
FULL_CONTENT = "full_content"
|
|
6
|
-
}
|
|
7
2
|
export declare enum MarkdownSourceType {
|
|
8
3
|
WORKSPACE_FILE = "workspace_file",
|
|
9
4
|
REMOTE_FILE = "remote_file",
|
|
@@ -26,7 +21,6 @@ export interface MarkdownSlideLocation {
|
|
|
26
21
|
startLine: number;
|
|
27
22
|
endLine: number;
|
|
28
23
|
content: string;
|
|
29
|
-
type: MarkdownPresentationFormat;
|
|
30
24
|
}
|
|
31
25
|
export interface MarkdownSlide {
|
|
32
26
|
id: string;
|
|
@@ -59,7 +53,6 @@ export interface MarkdownPresentation {
|
|
|
59
53
|
source?: MarkdownSource;
|
|
60
54
|
slides: MarkdownSlide[];
|
|
61
55
|
originalContent: string;
|
|
62
|
-
format: MarkdownPresentationFormat;
|
|
63
56
|
/** Optional repository information for resolving relative URLs to GitHub raw URLs */
|
|
64
57
|
repositoryInfo?: RepositoryInfo;
|
|
65
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/types/presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,oBAAY,
|
|
1
|
+
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/types/presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,oBAAY,kBAAkB;IAC5B,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,YAAY,iBAAiB;IAC7B,mBAAmB,wBAAwB;IAC3C,WAAW,gBAAgB;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,qBAAqB,CAAC;IAChC,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB;AAGD,MAAM,WAAW,kBAAkB;IACjC,kDAAkD;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAGD,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAGxC,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IAGnC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,qFAAqF;IACrF,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MarkdownPresentation, MarkdownSlide,
|
|
1
|
+
import { MarkdownPresentation, MarkdownSlide, MarkdownSource, RepositoryInfo, extractSlideTitle as extractSlideTitleCore } from '@a24z/markdown-utils';
|
|
2
2
|
/**
|
|
3
3
|
* Extract the title from slide content (first heading or first line)
|
|
4
4
|
* Re-export from core library
|
|
@@ -11,7 +11,7 @@ export declare function createGithubFileSource(content: string, repositoryInfo:
|
|
|
11
11
|
* and returns a structured Presentation object
|
|
12
12
|
* Now uses the core library implementation
|
|
13
13
|
*/
|
|
14
|
-
export declare function parseMarkdownIntoPresentation(markdownContent: string,
|
|
14
|
+
export declare function parseMarkdownIntoPresentation(markdownContent: string, repositoryInfo?: RepositoryInfo): MarkdownPresentation;
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
* @param errorMessage Depricated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentationUtils.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/utils/presentationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"presentationUtils.d.ts","sourceRoot":"","sources":["../../../industryMarkdown/utils/presentationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,cAAc,EAEd,cAAc,EAEd,iBAAiB,IAAI,qBAAqB,EAE3C,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,eAAO,MAAM,iBAAiB,8BAAwB,CAAC;AAEvD,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,cAAc,GACrB,oBAAoB,CAatB;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,cAAc,GAC7B,cAAc,CAQhB;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,eAAe,EAAE,MAAM,EACvB,cAAc,CAAC,EAAE,cAAc,GAC9B,oBAAoB,CAGtB;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,YAAY,EAAE,MAAM,GAAG,oBAAoB,CAiB7F;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,oBAAoB,GAAG,MAAM,CAcrF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAE9E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,oBAAoB,EAClC,KAAK,EAAE,MAAM,GACZ,aAAa,GAAG,SAAS,CAE3B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/F;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,GAAG,aAAa,CAKtF;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,YAAY,EAAE,oBAAoB,GAAG,MAAM,CAE1F;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,GAAG,aAAa,CAU1F;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,oBAAoB,EAClC,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,GACjB,oBAAoB,CActB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "themed-markdown",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "Industry-themed markdown renderer with presentation capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"author": "PrincipleMD Team",
|
|
44
44
|
"license": "MIT",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@a24z/markdown-utils": "^0.1.
|
|
46
|
+
"@a24z/markdown-utils": "^0.1.1",
|
|
47
47
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
48
48
|
"@types/d3-hierarchy": "^3.1.7",
|
|
49
49
|
"@types/flexsearch": "^0.7.6",
|