@thanh01.pmt/presentation-kit 0.2.15 → 0.2.16
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/ai/index.cjs +145 -16
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.d.cts +15 -15
- package/dist/ai/index.d.ts +15 -15
- package/dist/ai/index.js +132 -3
- package/dist/ai/index.js.map +1 -1
- package/dist/{chunk-YPYAP4TF.js → chunk-7QHDWDSB.js} +218 -4
- package/dist/chunk-7QHDWDSB.js.map +1 -0
- package/dist/{chunk-SUGKWGJJ.cjs → chunk-JNTRKKJX.cjs} +218 -3
- package/dist/chunk-JNTRKKJX.cjs.map +1 -0
- package/dist/index.cjs +19 -15
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -2
- package/dist/react/index.cjs +5 -5
- package/dist/react/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-SUGKWGJJ.cjs.map +0 -1
- package/dist/chunk-YPYAP4TF.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkTGI6YSZP_cjs = require('./chunk-TGI6YSZP.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkJNTRKKJX_cjs = require('./chunk-JNTRKKJX.cjs');
|
|
5
5
|
|
|
6
6
|
// src/engine.ts
|
|
7
7
|
function createEngine(config = {}) {
|
|
@@ -102,7 +102,7 @@ async function convertMarkdownToPptx(markdown, options) {
|
|
|
102
102
|
if (options?.title) pptx.title = options.title;
|
|
103
103
|
if (options?.author) pptx.author = options.author;
|
|
104
104
|
const renderResult = chunkTGI6YSZP_cjs.renderSlide(markdown);
|
|
105
|
-
const { slides } =
|
|
105
|
+
const { slides } = chunkJNTRKKJX_cjs.splitMarkdownSlides(markdown);
|
|
106
106
|
const isDark = options?.theme !== "light";
|
|
107
107
|
const defaultBg = isDark ? "14151B" : "FFFFFF";
|
|
108
108
|
const defaultText = isDark ? "F1F5F9" : "1E293B";
|
|
@@ -313,55 +313,59 @@ Object.defineProperty(exports, "sanitizeMermaidCode", {
|
|
|
313
313
|
});
|
|
314
314
|
Object.defineProperty(exports, "HTML_SLIDE_PRESETS", {
|
|
315
315
|
enumerable: true,
|
|
316
|
-
get: function () { return
|
|
316
|
+
get: function () { return chunkJNTRKKJX_cjs.HTML_SLIDE_PRESETS; }
|
|
317
317
|
});
|
|
318
318
|
Object.defineProperty(exports, "HTML_THEMES", {
|
|
319
319
|
enumerable: true,
|
|
320
|
-
get: function () { return
|
|
320
|
+
get: function () { return chunkJNTRKKJX_cjs.HTML_THEMES; }
|
|
321
321
|
});
|
|
322
322
|
Object.defineProperty(exports, "SLIDE_LAYOUT_PRESETS", {
|
|
323
323
|
enumerable: true,
|
|
324
|
-
get: function () { return
|
|
324
|
+
get: function () { return chunkJNTRKKJX_cjs.SLIDE_LAYOUT_PRESETS; }
|
|
325
325
|
});
|
|
326
326
|
Object.defineProperty(exports, "compileHtmlDeck", {
|
|
327
327
|
enumerable: true,
|
|
328
|
-
get: function () { return
|
|
328
|
+
get: function () { return chunkJNTRKKJX_cjs.compileHtmlDeck; }
|
|
329
329
|
});
|
|
330
330
|
Object.defineProperty(exports, "generateHtmlShell", {
|
|
331
331
|
enumerable: true,
|
|
332
|
-
get: function () { return
|
|
332
|
+
get: function () { return chunkJNTRKKJX_cjs.generateHtmlShell; }
|
|
333
333
|
});
|
|
334
334
|
Object.defineProperty(exports, "getSlideLayoutPresetById", {
|
|
335
335
|
enumerable: true,
|
|
336
|
-
get: function () { return
|
|
336
|
+
get: function () { return chunkJNTRKKJX_cjs.getSlideLayoutPresetById; }
|
|
337
337
|
});
|
|
338
338
|
Object.defineProperty(exports, "getSlideLayoutPresetsByCategory", {
|
|
339
339
|
enumerable: true,
|
|
340
|
-
get: function () { return
|
|
340
|
+
get: function () { return chunkJNTRKKJX_cjs.getSlideLayoutPresetsByCategory; }
|
|
341
|
+
});
|
|
342
|
+
Object.defineProperty(exports, "normalizeSlideSlots", {
|
|
343
|
+
enumerable: true,
|
|
344
|
+
get: function () { return chunkJNTRKKJX_cjs.normalizeSlideSlots; }
|
|
341
345
|
});
|
|
342
346
|
Object.defineProperty(exports, "removeSlideElementFromMarkdown", {
|
|
343
347
|
enumerable: true,
|
|
344
|
-
get: function () { return
|
|
348
|
+
get: function () { return chunkJNTRKKJX_cjs.removeSlideElementFromMarkdown; }
|
|
345
349
|
});
|
|
346
350
|
Object.defineProperty(exports, "resolveHtmlTheme", {
|
|
347
351
|
enumerable: true,
|
|
348
|
-
get: function () { return
|
|
352
|
+
get: function () { return chunkJNTRKKJX_cjs.resolveHtmlTheme; }
|
|
349
353
|
});
|
|
350
354
|
Object.defineProperty(exports, "serializeLayoutToComment", {
|
|
351
355
|
enumerable: true,
|
|
352
|
-
get: function () { return
|
|
356
|
+
get: function () { return chunkJNTRKKJX_cjs.serializeLayoutToComment; }
|
|
353
357
|
});
|
|
354
358
|
Object.defineProperty(exports, "splitMarkdownSlides", {
|
|
355
359
|
enumerable: true,
|
|
356
|
-
get: function () { return
|
|
360
|
+
get: function () { return chunkJNTRKKJX_cjs.splitMarkdownSlides; }
|
|
357
361
|
});
|
|
358
362
|
Object.defineProperty(exports, "updateSlideLayoutInMarkdown", {
|
|
359
363
|
enumerable: true,
|
|
360
|
-
get: function () { return
|
|
364
|
+
get: function () { return chunkJNTRKKJX_cjs.updateSlideLayoutInMarkdown; }
|
|
361
365
|
});
|
|
362
366
|
Object.defineProperty(exports, "updateSlideTextInMarkdown", {
|
|
363
367
|
enumerable: true,
|
|
364
|
-
get: function () { return
|
|
368
|
+
get: function () { return chunkJNTRKKJX_cjs.updateSlideTextInMarkdown; }
|
|
365
369
|
});
|
|
366
370
|
exports.cleanHexColor = cleanHexColor;
|
|
367
371
|
exports.convertMarkdownToPptx = convertMarkdownToPptx;
|
package/dist/index.d.cts
CHANGED
|
@@ -180,4 +180,6 @@ declare function generateHtmlShell(options: GenerateHtmlShellOptions): string;
|
|
|
180
180
|
|
|
181
181
|
declare function compileHtmlDeck(deckData: HtmlDeckData, options?: HtmlCompileOptions): CompiledHtmlDeckResult;
|
|
182
182
|
|
|
183
|
-
|
|
183
|
+
declare function normalizeSlideSlots(slide: any): Record<string, any>;
|
|
184
|
+
|
|
185
|
+
export { CompiledHtmlDeckResult, type GenerateHtmlShellOptions, HTML_SLIDE_PRESETS, HTML_THEMES, HtmlCompileOptions, HtmlDeckData, HtmlDeckTheme, HtmlLayoutPresetId, HtmlSlidePreset, HtmlThemeName, MermaidBlock, type PptxExportOptions, SlideEngine, SlideEngineConfig, SlideLayoutData, ThemeTokens, cleanHexColor, compileHtmlDeck, convertMarkdownToPptx, convertTextArrows, createEngine, darkThemeTokens, detectMermaidBlocks, extractLayoutsAndNotes, extractMarpSource, filterPresenterNotes, generateHtmlShell, generateLayoutCss, generateScopedCss as generateScopedCssFromTokens, getHighlighter, highlightCodeBlocks, isLayoutComment, lightThemeTokens, navyThemeTokens, normalizeSlideSlots, parseFontSizeToPt, parseLayoutFromComment, removeSlideElementFromMarkdown, renderMermaidDiagrams, resolveHtmlTheme, sanitizeMermaidCode, serializeLayoutToComment, splitMarkdownSlides, updateSlideLayoutInMarkdown, updateSlideTextInMarkdown };
|
package/dist/index.d.ts
CHANGED
|
@@ -180,4 +180,6 @@ declare function generateHtmlShell(options: GenerateHtmlShellOptions): string;
|
|
|
180
180
|
|
|
181
181
|
declare function compileHtmlDeck(deckData: HtmlDeckData, options?: HtmlCompileOptions): CompiledHtmlDeckResult;
|
|
182
182
|
|
|
183
|
-
|
|
183
|
+
declare function normalizeSlideSlots(slide: any): Record<string, any>;
|
|
184
|
+
|
|
185
|
+
export { CompiledHtmlDeckResult, type GenerateHtmlShellOptions, HTML_SLIDE_PRESETS, HTML_THEMES, HtmlCompileOptions, HtmlDeckData, HtmlDeckTheme, HtmlLayoutPresetId, HtmlSlidePreset, HtmlThemeName, MermaidBlock, type PptxExportOptions, SlideEngine, SlideEngineConfig, SlideLayoutData, ThemeTokens, cleanHexColor, compileHtmlDeck, convertMarkdownToPptx, convertTextArrows, createEngine, darkThemeTokens, detectMermaidBlocks, extractLayoutsAndNotes, extractMarpSource, filterPresenterNotes, generateHtmlShell, generateLayoutCss, generateScopedCss as generateScopedCssFromTokens, getHighlighter, highlightCodeBlocks, isLayoutComment, lightThemeTokens, navyThemeTokens, normalizeSlideSlots, parseFontSizeToPt, parseLayoutFromComment, removeSlideElementFromMarkdown, renderMermaidDiagrams, resolveHtmlTheme, sanitizeMermaidCode, serializeLayoutToComment, splitMarkdownSlides, updateSlideLayoutInMarkdown, updateSlideTextInMarkdown };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveTheme, generateScopedCss2, renderSlideAsync, renderSlide } from './chunk-NYLDRVHZ.js';
|
|
2
2
|
export { convertTextArrows, countSlides, darkThemeTokens, defineTheme, detectMermaidBlocks, extractLayoutsAndNotes, extractMarpSource, extractMaxClicks, filterPresenterNotes, generateClickCss, generateLayoutCss, generateScopedCss2 as generateScopedCss, generateScopedCss as generateScopedCssFromTokens, getHighlighter, getThemeTokens, highlightCodeBlocks, isLayoutComment, lightThemeTokens, navyThemeTokens, parseLayoutFromComment, postprocessClicks, preprocessClicks, renderMarp, renderMermaidDiagrams, renderSlide, renderSlideAsync, resolveTheme, sanitizeMermaidCode } from './chunk-NYLDRVHZ.js';
|
|
3
|
-
import { splitMarkdownSlides } from './chunk-
|
|
4
|
-
export { HTML_SLIDE_PRESETS, HTML_THEMES, SLIDE_LAYOUT_PRESETS, compileHtmlDeck, generateHtmlShell, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, removeSlideElementFromMarkdown, resolveHtmlTheme, serializeLayoutToComment, splitMarkdownSlides, updateSlideLayoutInMarkdown, updateSlideTextInMarkdown } from './chunk-
|
|
3
|
+
import { splitMarkdownSlides } from './chunk-7QHDWDSB.js';
|
|
4
|
+
export { HTML_SLIDE_PRESETS, HTML_THEMES, SLIDE_LAYOUT_PRESETS, compileHtmlDeck, generateHtmlShell, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, normalizeSlideSlots, removeSlideElementFromMarkdown, resolveHtmlTheme, serializeLayoutToComment, splitMarkdownSlides, updateSlideLayoutInMarkdown, updateSlideTextInMarkdown } from './chunk-7QHDWDSB.js';
|
|
5
5
|
|
|
6
6
|
// src/engine.ts
|
|
7
7
|
function createEngine(config = {}) {
|
package/dist/react/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkTGI6YSZP_cjs = require('../chunk-TGI6YSZP.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkJNTRKKJX_cjs = require('../chunk-JNTRKKJX.cjs');
|
|
5
5
|
var React2 = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
|
|
@@ -914,7 +914,7 @@ function SlideDesignOverlay({
|
|
|
914
914
|
"select",
|
|
915
915
|
{
|
|
916
916
|
onChange: (e) => {
|
|
917
|
-
const preset =
|
|
917
|
+
const preset = chunkJNTRKKJX_cjs.SLIDE_LAYOUT_PRESETS.find((p) => p.id === e.target.value);
|
|
918
918
|
if (preset) {
|
|
919
919
|
const clonedBoxes = JSON.parse(JSON.stringify(preset.layout.boxes));
|
|
920
920
|
setBoxes(clonedBoxes);
|
|
@@ -934,7 +934,7 @@ function SlideDesignOverlay({
|
|
|
934
934
|
title: "\xC1p d\u1EE5ng m\u1EABu b\u1ED1 c\u1EE5c c\xF3 s\u1EB5n",
|
|
935
935
|
children: [
|
|
936
936
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, style: { backgroundColor: isLight ? "#ffffff" : "#1e1f29", color: subtextColor }, children: "M\u1EABu b\u1ED1 c\u1EE5c (Presets)..." }),
|
|
937
|
-
|
|
937
|
+
chunkJNTRKKJX_cjs.SLIDE_LAYOUT_PRESETS.map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.id, style: { backgroundColor: isLight ? "#ffffff" : "#1e1f29", color: isLight ? "#0f172a" : "#f8fafc" }, children: p.name }, p.id))
|
|
938
938
|
]
|
|
939
939
|
}
|
|
940
940
|
),
|
|
@@ -1567,7 +1567,7 @@ function SlideViewer({
|
|
|
1567
1567
|
onSave: (layout) => {
|
|
1568
1568
|
setLiveLayout(layout);
|
|
1569
1569
|
if (onSaveMarkdown) {
|
|
1570
|
-
const updated =
|
|
1570
|
+
const updated = chunkJNTRKKJX_cjs.updateSlideLayoutInMarkdown(markdown, currentIndex, layout);
|
|
1571
1571
|
onSaveMarkdown(updated);
|
|
1572
1572
|
}
|
|
1573
1573
|
},
|
|
@@ -1621,7 +1621,7 @@ var HtmlSlideViewer = ({
|
|
|
1621
1621
|
const fullHtml = React2.useMemo(() => {
|
|
1622
1622
|
if (initialHtml) return initialHtml;
|
|
1623
1623
|
if (deckData) {
|
|
1624
|
-
return
|
|
1624
|
+
return chunkJNTRKKJX_cjs.compileHtmlDeck(deckData).html;
|
|
1625
1625
|
}
|
|
1626
1626
|
return "";
|
|
1627
1627
|
}, [initialHtml, deckData]);
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { renderSlide, renderMermaidDiagrams } from '../chunk-NYLDRVHZ.js';
|
|
2
2
|
export { defineTheme, extractMaxClicks, generateClickCss, postprocessClicks, preprocessClicks, renderSlide, renderSlideAsync, resolveTheme } from '../chunk-NYLDRVHZ.js';
|
|
3
|
-
import { SLIDE_LAYOUT_PRESETS, updateSlideLayoutInMarkdown, compileHtmlDeck } from '../chunk-
|
|
3
|
+
import { SLIDE_LAYOUT_PRESETS, updateSlideLayoutInMarkdown, compileHtmlDeck } from '../chunk-7QHDWDSB.js';
|
|
4
4
|
import React2, { useState, useRef, useMemo, useEffect, useCallback } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thanh01.pmt/presentation-kit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"description": "Standalone client-side slide rendering engine with Marp, Shiki syntax highlighting, Mermaid diagrams, custom themes, and AI slide authoring tools.",
|
|
5
5
|
"author": "Thanh Pham <https://github.com/thanh01pmt>",
|
|
6
6
|
"license": "MIT",
|