@thanh01.pmt/presentation-kit 0.2.18 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/ai/index.cjs +16 -15
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.d.cts +3 -2
- package/dist/ai/index.d.ts +3 -2
- package/dist/ai/index.js +2 -1
- package/dist/ai/index.js.map +1 -1
- package/dist/assets/fonts/NOTICE.md +25 -0
- package/dist/assets/fonts/SOURCES.json +47 -0
- package/dist/assets/fonts/fira-code.woff2 +0 -0
- package/dist/assets/fonts/inter.woff2 +0 -0
- package/dist/assets/fonts/jetbrains-mono.woff2 +0 -0
- package/dist/assets/fonts/playfair-display.woff2 +0 -0
- package/dist/assets/fonts/plus-jakarta-sans.woff2 +0 -0
- package/dist/assets/fonts/space-grotesk.woff2 +0 -0
- package/dist/chunk-3Q4RMZVQ.cjs +867 -0
- package/dist/chunk-3Q4RMZVQ.cjs.map +1 -0
- package/dist/{chunk-DDOUFYLK.js → chunk-I5RG2L3M.js} +3 -3
- package/dist/{chunk-DDOUFYLK.js.map → chunk-I5RG2L3M.js.map} +1 -1
- package/dist/{chunk-JJQDQIRG.js → chunk-INAOTYLK.cjs} +294 -854
- package/dist/chunk-INAOTYLK.cjs.map +1 -0
- package/dist/{chunk-DIHFQ5LF.cjs → chunk-JBGGQGSQ.cjs} +4 -4
- package/dist/{chunk-DIHFQ5LF.cjs.map → chunk-JBGGQGSQ.cjs.map} +1 -1
- package/dist/{chunk-SFBEDDGU.cjs → chunk-OCP2TAY2.js} +279 -878
- package/dist/chunk-OCP2TAY2.js.map +1 -0
- package/dist/chunk-V6X7D44H.js +854 -0
- package/dist/chunk-V6X7D44H.js.map +1 -0
- package/dist/{click-css-Bcc1CkTN.d.cts → click-css-C8VciwZ6.d.cts} +1 -1
- package/dist/{click-css-B2s9B_uP.d.ts → click-css-COIiFo1I.d.ts} +1 -1
- package/dist/index.cjs +90 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -5
- package/dist/index.d.ts +46 -5
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/node/index.cjs +117 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +36 -0
- package/dist/node/index.d.ts +36 -0
- package/dist/node/index.js +105 -0
- package/dist/node/index.js.map +1 -0
- package/dist/{presets-D_hfPJX9.d.ts → presets-DPRGtpO-.d.ts} +1 -1
- package/dist/{presets-BYvgAAkJ.d.cts → presets-MIi91wZg.d.cts} +1 -1
- package/dist/react/index.cjs +17 -16
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +4 -3
- package/dist/react/index.d.ts +4 -3
- package/dist/react/index.js +4 -3
- package/dist/react/index.js.map +1 -1
- package/dist/{types-C3d04zzP.d.cts → types-CvxCxWus.d.cts} +1 -67
- package/dist/{types-C3d04zzP.d.ts → types-CvxCxWus.d.ts} +1 -67
- package/dist/types-k_eae8UV.d.cts +74 -0
- package/dist/types-k_eae8UV.d.ts +74 -0
- package/package.json +8 -2
- package/dist/chunk-JJQDQIRG.js.map +0 -1
- package/dist/chunk-SFBEDDGU.cjs.map +0 -1
|
@@ -151,70 +151,4 @@ interface SlideEngine {
|
|
|
151
151
|
getThemeCss: (theme: BuiltInTheme | SlideTheme, containerId?: string) => string;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
type
|
|
155
|
-
interface HtmlDeckTheme {
|
|
156
|
-
id: HtmlThemeName;
|
|
157
|
-
name: string;
|
|
158
|
-
scheme: 'light' | 'dark';
|
|
159
|
-
palette: {
|
|
160
|
-
bg: string;
|
|
161
|
-
bgSecondary?: string;
|
|
162
|
-
primary: string;
|
|
163
|
-
accent?: string;
|
|
164
|
-
text: string;
|
|
165
|
-
textMuted: string;
|
|
166
|
-
border?: string;
|
|
167
|
-
};
|
|
168
|
-
typography: {
|
|
169
|
-
display: string;
|
|
170
|
-
body: string;
|
|
171
|
-
code?: string;
|
|
172
|
-
};
|
|
173
|
-
customCss?: string;
|
|
174
|
-
}
|
|
175
|
-
type HtmlLayoutPresetId = 'hero-cover' | 'split-concept-code' | 'two-columns-compare' | 'three-cards-grid' | 'timeline-steps' | 'metric-callout' | 'checkpoint-quiz' | 'summary-takeaways';
|
|
176
|
-
interface HtmlSlotDefinition {
|
|
177
|
-
name: string;
|
|
178
|
-
label: string;
|
|
179
|
-
type: 'text' | 'multiline' | 'code' | 'list' | 'badge' | 'metric' | 'options';
|
|
180
|
-
description: string;
|
|
181
|
-
required?: boolean;
|
|
182
|
-
default?: any;
|
|
183
|
-
}
|
|
184
|
-
interface HtmlSlidePreset {
|
|
185
|
-
id: HtmlLayoutPresetId;
|
|
186
|
-
name: string;
|
|
187
|
-
category: 'cover' | 'content' | 'split' | 'grid' | 'timeline' | 'callout' | 'assessment';
|
|
188
|
-
description: string;
|
|
189
|
-
slots: HtmlSlotDefinition[];
|
|
190
|
-
template: (slots: Record<string, any>, theme: HtmlDeckTheme) => string;
|
|
191
|
-
}
|
|
192
|
-
interface HtmlSlideSlotData {
|
|
193
|
-
layoutId: HtmlLayoutPresetId;
|
|
194
|
-
slots: Record<string, any>;
|
|
195
|
-
notes?: string;
|
|
196
|
-
customClass?: string;
|
|
197
|
-
}
|
|
198
|
-
interface HtmlDeckData {
|
|
199
|
-
title: string;
|
|
200
|
-
subtitle?: string;
|
|
201
|
-
author?: string;
|
|
202
|
-
theme?: HtmlThemeName;
|
|
203
|
-
slides: HtmlSlideSlotData[];
|
|
204
|
-
aspectRatio?: '16:9' | '4:3';
|
|
205
|
-
metadata?: Record<string, any>;
|
|
206
|
-
}
|
|
207
|
-
interface HtmlCompileOptions {
|
|
208
|
-
themeOverride?: HtmlDeckTheme;
|
|
209
|
-
minify?: boolean;
|
|
210
|
-
inlineFonts?: boolean;
|
|
211
|
-
customHeadTags?: string;
|
|
212
|
-
}
|
|
213
|
-
interface CompiledHtmlDeckResult {
|
|
214
|
-
html: string;
|
|
215
|
-
slideCount: number;
|
|
216
|
-
theme: HtmlDeckTheme;
|
|
217
|
-
title: string;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export type { BuiltInTheme as B, CompiledHtmlDeckResult as C, HtmlLayoutPresetId as H, LayoutBoxConfig as L, MermaidBlock as M, SlideLayoutData as S, ThemeTokens as T, SlideRenderOptions as a, SlideRenderResult as b, SlideRenderAsyncResult as c, SlideTheme as d, HtmlDeckData as e, HtmlThemeName as f, HtmlSlideSlotData as g, SlideEngineConfig as h, SlideEngine as i, HtmlDeckTheme as j, HtmlSlidePreset as k, HtmlCompileOptions as l, HtmlSlotDefinition as m };
|
|
154
|
+
export type { BuiltInTheme as B, LayoutBoxConfig as L, MermaidBlock as M, SlideLayoutData as S, ThemeTokens as T, SlideRenderOptions as a, SlideRenderResult as b, SlideRenderAsyncResult as c, SlideTheme as d, SlideEngineConfig as e, SlideEngine as f };
|
|
@@ -151,70 +151,4 @@ interface SlideEngine {
|
|
|
151
151
|
getThemeCss: (theme: BuiltInTheme | SlideTheme, containerId?: string) => string;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
type
|
|
155
|
-
interface HtmlDeckTheme {
|
|
156
|
-
id: HtmlThemeName;
|
|
157
|
-
name: string;
|
|
158
|
-
scheme: 'light' | 'dark';
|
|
159
|
-
palette: {
|
|
160
|
-
bg: string;
|
|
161
|
-
bgSecondary?: string;
|
|
162
|
-
primary: string;
|
|
163
|
-
accent?: string;
|
|
164
|
-
text: string;
|
|
165
|
-
textMuted: string;
|
|
166
|
-
border?: string;
|
|
167
|
-
};
|
|
168
|
-
typography: {
|
|
169
|
-
display: string;
|
|
170
|
-
body: string;
|
|
171
|
-
code?: string;
|
|
172
|
-
};
|
|
173
|
-
customCss?: string;
|
|
174
|
-
}
|
|
175
|
-
type HtmlLayoutPresetId = 'hero-cover' | 'split-concept-code' | 'two-columns-compare' | 'three-cards-grid' | 'timeline-steps' | 'metric-callout' | 'checkpoint-quiz' | 'summary-takeaways';
|
|
176
|
-
interface HtmlSlotDefinition {
|
|
177
|
-
name: string;
|
|
178
|
-
label: string;
|
|
179
|
-
type: 'text' | 'multiline' | 'code' | 'list' | 'badge' | 'metric' | 'options';
|
|
180
|
-
description: string;
|
|
181
|
-
required?: boolean;
|
|
182
|
-
default?: any;
|
|
183
|
-
}
|
|
184
|
-
interface HtmlSlidePreset {
|
|
185
|
-
id: HtmlLayoutPresetId;
|
|
186
|
-
name: string;
|
|
187
|
-
category: 'cover' | 'content' | 'split' | 'grid' | 'timeline' | 'callout' | 'assessment';
|
|
188
|
-
description: string;
|
|
189
|
-
slots: HtmlSlotDefinition[];
|
|
190
|
-
template: (slots: Record<string, any>, theme: HtmlDeckTheme) => string;
|
|
191
|
-
}
|
|
192
|
-
interface HtmlSlideSlotData {
|
|
193
|
-
layoutId: HtmlLayoutPresetId;
|
|
194
|
-
slots: Record<string, any>;
|
|
195
|
-
notes?: string;
|
|
196
|
-
customClass?: string;
|
|
197
|
-
}
|
|
198
|
-
interface HtmlDeckData {
|
|
199
|
-
title: string;
|
|
200
|
-
subtitle?: string;
|
|
201
|
-
author?: string;
|
|
202
|
-
theme?: HtmlThemeName;
|
|
203
|
-
slides: HtmlSlideSlotData[];
|
|
204
|
-
aspectRatio?: '16:9' | '4:3';
|
|
205
|
-
metadata?: Record<string, any>;
|
|
206
|
-
}
|
|
207
|
-
interface HtmlCompileOptions {
|
|
208
|
-
themeOverride?: HtmlDeckTheme;
|
|
209
|
-
minify?: boolean;
|
|
210
|
-
inlineFonts?: boolean;
|
|
211
|
-
customHeadTags?: string;
|
|
212
|
-
}
|
|
213
|
-
interface CompiledHtmlDeckResult {
|
|
214
|
-
html: string;
|
|
215
|
-
slideCount: number;
|
|
216
|
-
theme: HtmlDeckTheme;
|
|
217
|
-
title: string;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export type { BuiltInTheme as B, CompiledHtmlDeckResult as C, HtmlLayoutPresetId as H, LayoutBoxConfig as L, MermaidBlock as M, SlideLayoutData as S, ThemeTokens as T, SlideRenderOptions as a, SlideRenderResult as b, SlideRenderAsyncResult as c, SlideTheme as d, HtmlDeckData as e, HtmlThemeName as f, HtmlSlideSlotData as g, SlideEngineConfig as h, SlideEngine as i, HtmlDeckTheme as j, HtmlSlidePreset as k, HtmlCompileOptions as l, HtmlSlotDefinition as m };
|
|
154
|
+
export type { BuiltInTheme as B, LayoutBoxConfig as L, MermaidBlock as M, SlideLayoutData as S, ThemeTokens as T, SlideRenderOptions as a, SlideRenderResult as b, SlideRenderAsyncResult as c, SlideTheme as d, SlideEngineConfig as e, SlideEngine as f };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
type HtmlThemeName = 'blue-professional' | 'editorial-forest' | 'cobalt-grid' | 'studio' | 'monochrome';
|
|
2
|
+
interface HtmlDeckTheme {
|
|
3
|
+
id: HtmlThemeName;
|
|
4
|
+
name: string;
|
|
5
|
+
scheme: 'light' | 'dark';
|
|
6
|
+
palette: {
|
|
7
|
+
bg: string;
|
|
8
|
+
bgSecondary?: string;
|
|
9
|
+
primary: string;
|
|
10
|
+
accent?: string;
|
|
11
|
+
text: string;
|
|
12
|
+
textMuted: string;
|
|
13
|
+
border?: string;
|
|
14
|
+
};
|
|
15
|
+
typography: {
|
|
16
|
+
display: string;
|
|
17
|
+
body: string;
|
|
18
|
+
code?: string;
|
|
19
|
+
};
|
|
20
|
+
customCss?: string;
|
|
21
|
+
}
|
|
22
|
+
type HtmlLayoutPresetId = 'hero-cover' | 'split-concept-code' | 'two-columns-compare' | 'three-cards-grid' | 'timeline-steps' | 'metric-callout' | 'checkpoint-quiz' | 'summary-takeaways';
|
|
23
|
+
interface HtmlSlotDefinition {
|
|
24
|
+
name: string;
|
|
25
|
+
label: string;
|
|
26
|
+
type: 'text' | 'multiline' | 'code' | 'list' | 'badge' | 'metric' | 'options';
|
|
27
|
+
description: string;
|
|
28
|
+
required?: boolean;
|
|
29
|
+
default?: any;
|
|
30
|
+
}
|
|
31
|
+
interface HtmlSlidePreset {
|
|
32
|
+
id: HtmlLayoutPresetId;
|
|
33
|
+
name: string;
|
|
34
|
+
category: 'cover' | 'content' | 'split' | 'grid' | 'timeline' | 'callout' | 'assessment';
|
|
35
|
+
description: string;
|
|
36
|
+
slots: HtmlSlotDefinition[];
|
|
37
|
+
template: (slots: Record<string, any>, theme: HtmlDeckTheme) => string;
|
|
38
|
+
}
|
|
39
|
+
interface HtmlSlideSlotData {
|
|
40
|
+
layoutId: HtmlLayoutPresetId;
|
|
41
|
+
slots: Record<string, any>;
|
|
42
|
+
notes?: string;
|
|
43
|
+
customClass?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Free-form slide markup (frontend-slides mode). When present the slide is
|
|
46
|
+
* compiled as authored instead of slot-filled into a layout preset — the
|
|
47
|
+
* model makes the design decisions, the compiler only sanitizes, wraps it in
|
|
48
|
+
* the fixed stage section, and validates it. `layoutId` is ignored.
|
|
49
|
+
*/
|
|
50
|
+
html?: string;
|
|
51
|
+
}
|
|
52
|
+
interface HtmlDeckData {
|
|
53
|
+
title: string;
|
|
54
|
+
subtitle?: string;
|
|
55
|
+
author?: string;
|
|
56
|
+
theme?: HtmlThemeName;
|
|
57
|
+
slides: HtmlSlideSlotData[];
|
|
58
|
+
aspectRatio?: '16:9' | '4:3';
|
|
59
|
+
metadata?: Record<string, any>;
|
|
60
|
+
}
|
|
61
|
+
interface HtmlCompileOptions {
|
|
62
|
+
themeOverride?: HtmlDeckTheme;
|
|
63
|
+
minify?: boolean;
|
|
64
|
+
inlineFonts?: boolean;
|
|
65
|
+
customHeadTags?: string;
|
|
66
|
+
}
|
|
67
|
+
interface CompiledHtmlDeckResult {
|
|
68
|
+
html: string;
|
|
69
|
+
slideCount: number;
|
|
70
|
+
theme: HtmlDeckTheme;
|
|
71
|
+
title: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type { CompiledHtmlDeckResult as C, HtmlCompileOptions as H, HtmlDeckData as a, HtmlLayoutPresetId as b, HtmlThemeName as c, HtmlSlideSlotData as d, HtmlDeckTheme as e, HtmlSlidePreset as f, HtmlSlotDefinition as g };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
type HtmlThemeName = 'blue-professional' | 'editorial-forest' | 'cobalt-grid' | 'studio' | 'monochrome';
|
|
2
|
+
interface HtmlDeckTheme {
|
|
3
|
+
id: HtmlThemeName;
|
|
4
|
+
name: string;
|
|
5
|
+
scheme: 'light' | 'dark';
|
|
6
|
+
palette: {
|
|
7
|
+
bg: string;
|
|
8
|
+
bgSecondary?: string;
|
|
9
|
+
primary: string;
|
|
10
|
+
accent?: string;
|
|
11
|
+
text: string;
|
|
12
|
+
textMuted: string;
|
|
13
|
+
border?: string;
|
|
14
|
+
};
|
|
15
|
+
typography: {
|
|
16
|
+
display: string;
|
|
17
|
+
body: string;
|
|
18
|
+
code?: string;
|
|
19
|
+
};
|
|
20
|
+
customCss?: string;
|
|
21
|
+
}
|
|
22
|
+
type HtmlLayoutPresetId = 'hero-cover' | 'split-concept-code' | 'two-columns-compare' | 'three-cards-grid' | 'timeline-steps' | 'metric-callout' | 'checkpoint-quiz' | 'summary-takeaways';
|
|
23
|
+
interface HtmlSlotDefinition {
|
|
24
|
+
name: string;
|
|
25
|
+
label: string;
|
|
26
|
+
type: 'text' | 'multiline' | 'code' | 'list' | 'badge' | 'metric' | 'options';
|
|
27
|
+
description: string;
|
|
28
|
+
required?: boolean;
|
|
29
|
+
default?: any;
|
|
30
|
+
}
|
|
31
|
+
interface HtmlSlidePreset {
|
|
32
|
+
id: HtmlLayoutPresetId;
|
|
33
|
+
name: string;
|
|
34
|
+
category: 'cover' | 'content' | 'split' | 'grid' | 'timeline' | 'callout' | 'assessment';
|
|
35
|
+
description: string;
|
|
36
|
+
slots: HtmlSlotDefinition[];
|
|
37
|
+
template: (slots: Record<string, any>, theme: HtmlDeckTheme) => string;
|
|
38
|
+
}
|
|
39
|
+
interface HtmlSlideSlotData {
|
|
40
|
+
layoutId: HtmlLayoutPresetId;
|
|
41
|
+
slots: Record<string, any>;
|
|
42
|
+
notes?: string;
|
|
43
|
+
customClass?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Free-form slide markup (frontend-slides mode). When present the slide is
|
|
46
|
+
* compiled as authored instead of slot-filled into a layout preset — the
|
|
47
|
+
* model makes the design decisions, the compiler only sanitizes, wraps it in
|
|
48
|
+
* the fixed stage section, and validates it. `layoutId` is ignored.
|
|
49
|
+
*/
|
|
50
|
+
html?: string;
|
|
51
|
+
}
|
|
52
|
+
interface HtmlDeckData {
|
|
53
|
+
title: string;
|
|
54
|
+
subtitle?: string;
|
|
55
|
+
author?: string;
|
|
56
|
+
theme?: HtmlThemeName;
|
|
57
|
+
slides: HtmlSlideSlotData[];
|
|
58
|
+
aspectRatio?: '16:9' | '4:3';
|
|
59
|
+
metadata?: Record<string, any>;
|
|
60
|
+
}
|
|
61
|
+
interface HtmlCompileOptions {
|
|
62
|
+
themeOverride?: HtmlDeckTheme;
|
|
63
|
+
minify?: boolean;
|
|
64
|
+
inlineFonts?: boolean;
|
|
65
|
+
customHeadTags?: string;
|
|
66
|
+
}
|
|
67
|
+
interface CompiledHtmlDeckResult {
|
|
68
|
+
html: string;
|
|
69
|
+
slideCount: number;
|
|
70
|
+
theme: HtmlDeckTheme;
|
|
71
|
+
title: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type { CompiledHtmlDeckResult as C, HtmlCompileOptions as H, HtmlDeckData as a, HtmlLayoutPresetId as b, HtmlThemeName as c, HtmlSlideSlotData as d, HtmlDeckTheme as e, HtmlSlidePreset as f, HtmlSlotDefinition as g };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thanh01.pmt/presentation-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
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",
|
|
@@ -32,6 +32,12 @@
|
|
|
32
32
|
"import": "./dist/skills/index.js",
|
|
33
33
|
"require": "./dist/skills/index.cjs",
|
|
34
34
|
"default": "./dist/skills/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./node": {
|
|
37
|
+
"types": "./dist/node/index.d.ts",
|
|
38
|
+
"import": "./dist/node/index.js",
|
|
39
|
+
"require": "./dist/node/index.cjs",
|
|
40
|
+
"default": "./dist/node/index.js"
|
|
35
41
|
}
|
|
36
42
|
},
|
|
37
43
|
"peerDependencies": {
|
|
@@ -54,7 +60,7 @@
|
|
|
54
60
|
},
|
|
55
61
|
"scripts": {
|
|
56
62
|
"clean": "rm -rf dist",
|
|
57
|
-
"build": "npm run clean && tsup",
|
|
63
|
+
"build": "npm run clean && tsup && node scripts/copy-assets.mjs",
|
|
58
64
|
"dev": "tsup --watch",
|
|
59
65
|
"test": "node --test test/*.test.mjs",
|
|
60
66
|
"typecheck": "tsc --noEmit",
|