@thanh01.pmt/presentation-kit 0.2.17 → 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.
Files changed (70) hide show
  1. package/README.md +26 -0
  2. package/dist/ai/index.cjs +33 -28
  3. package/dist/ai/index.cjs.map +1 -1
  4. package/dist/ai/index.d.cts +4 -3
  5. package/dist/ai/index.d.ts +4 -3
  6. package/dist/ai/index.js +3 -2
  7. package/dist/ai/index.js.map +1 -1
  8. package/dist/assets/fonts/NOTICE.md +25 -0
  9. package/dist/assets/fonts/SOURCES.json +47 -0
  10. package/dist/assets/fonts/fira-code.woff2 +0 -0
  11. package/dist/assets/fonts/inter.woff2 +0 -0
  12. package/dist/assets/fonts/jetbrains-mono.woff2 +0 -0
  13. package/dist/assets/fonts/playfair-display.woff2 +0 -0
  14. package/dist/assets/fonts/plus-jakarta-sans.woff2 +0 -0
  15. package/dist/assets/fonts/space-grotesk.woff2 +0 -0
  16. package/dist/chunk-3Q4RMZVQ.cjs +867 -0
  17. package/dist/chunk-3Q4RMZVQ.cjs.map +1 -0
  18. package/dist/chunk-HSVXH7DD.cjs +1624 -0
  19. package/dist/chunk-HSVXH7DD.cjs.map +1 -0
  20. package/dist/{chunk-NYLDRVHZ.js → chunk-I5RG2L3M.js} +4 -78
  21. package/dist/chunk-I5RG2L3M.js.map +1 -0
  22. package/dist/{chunk-7QHDWDSB.js → chunk-INAOTYLK.cjs} +437 -849
  23. package/dist/chunk-INAOTYLK.cjs.map +1 -0
  24. package/dist/{chunk-TGI6YSZP.cjs → chunk-JBGGQGSQ.cjs} +4 -80
  25. package/dist/chunk-JBGGQGSQ.cjs.map +1 -0
  26. package/dist/{chunk-JNTRKKJX.cjs → chunk-OCP2TAY2.js} +421 -868
  27. package/dist/chunk-OCP2TAY2.js.map +1 -0
  28. package/dist/chunk-V6X7D44H.js +854 -0
  29. package/dist/chunk-V6X7D44H.js.map +1 -0
  30. package/dist/chunk-VRXEXUHR.js +1610 -0
  31. package/dist/chunk-VRXEXUHR.js.map +1 -0
  32. package/dist/{click-css-Bcc1CkTN.d.cts → click-css-C8VciwZ6.d.cts} +1 -1
  33. package/dist/{click-css-B2s9B_uP.d.ts → click-css-COIiFo1I.d.ts} +1 -1
  34. package/dist/index.cjs +143 -110
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +62 -6
  37. package/dist/index.d.ts +62 -6
  38. package/dist/index.js +6 -5
  39. package/dist/index.js.map +1 -1
  40. package/dist/node/index.cjs +117 -0
  41. package/dist/node/index.cjs.map +1 -0
  42. package/dist/node/index.d.cts +36 -0
  43. package/dist/node/index.d.ts +36 -0
  44. package/dist/node/index.js +105 -0
  45. package/dist/node/index.js.map +1 -0
  46. package/dist/{presets-D_hfPJX9.d.ts → presets-DPRGtpO-.d.ts} +1 -1
  47. package/dist/{presets-BYvgAAkJ.d.cts → presets-MIi91wZg.d.cts} +1 -1
  48. package/dist/react/index.cjs +17 -16
  49. package/dist/react/index.cjs.map +1 -1
  50. package/dist/react/index.d.cts +4 -3
  51. package/dist/react/index.d.ts +4 -3
  52. package/dist/react/index.js +4 -3
  53. package/dist/react/index.js.map +1 -1
  54. package/dist/skills/index.cjs +16 -12
  55. package/dist/skills/index.d.cts +36 -20
  56. package/dist/skills/index.d.ts +36 -20
  57. package/dist/skills/index.js +1 -1
  58. package/dist/{types-C3d04zzP.d.cts → types-CvxCxWus.d.cts} +1 -67
  59. package/dist/{types-C3d04zzP.d.ts → types-CvxCxWus.d.ts} +1 -67
  60. package/dist/types-k_eae8UV.d.cts +74 -0
  61. package/dist/types-k_eae8UV.d.ts +74 -0
  62. package/package.json +8 -2
  63. package/dist/chunk-6R6L6KSC.cjs +0 -601
  64. package/dist/chunk-6R6L6KSC.cjs.map +0 -1
  65. package/dist/chunk-7QHDWDSB.js.map +0 -1
  66. package/dist/chunk-BHJXQCVE.js +0 -588
  67. package/dist/chunk-BHJXQCVE.js.map +0 -1
  68. package/dist/chunk-JNTRKKJX.cjs.map +0 -1
  69. package/dist/chunk-NYLDRVHZ.js.map +0 -1
  70. package/dist/chunk-TGI6YSZP.cjs.map +0 -1
@@ -1,52 +1,56 @@
1
1
  'use strict';
2
2
 
3
- var chunk6R6L6KSC_cjs = require('../chunk-6R6L6KSC.cjs');
3
+ var chunkHSVXH7DD_cjs = require('../chunk-HSVXH7DD.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FRONTEND_SLIDES_CORE_RULES", {
8
8
  enumerable: true,
9
- get: function () { return chunk6R6L6KSC_cjs.FRONTEND_SLIDES_CORE_RULES; }
9
+ get: function () { return chunkHSVXH7DD_cjs.FRONTEND_SLIDES_CORE_RULES; }
10
10
  });
11
11
  Object.defineProperty(exports, "STYLE_PRESETS", {
12
12
  enumerable: true,
13
- get: function () { return chunk6R6L6KSC_cjs.STYLE_PRESETS; }
13
+ get: function () { return chunkHSVXH7DD_cjs.STYLE_PRESETS; }
14
14
  });
15
15
  Object.defineProperty(exports, "TEMPLATES_CATALOG", {
16
16
  enumerable: true,
17
- get: function () { return chunk6R6L6KSC_cjs.TEMPLATES_CATALOG; }
17
+ get: function () { return chunkHSVXH7DD_cjs.TEMPLATES_CATALOG; }
18
18
  });
19
19
  Object.defineProperty(exports, "VIEWPORT_BASE_CSS", {
20
20
  enumerable: true,
21
- get: function () { return chunk6R6L6KSC_cjs.VIEWPORT_BASE_CSS; }
21
+ get: function () { return chunkHSVXH7DD_cjs.VIEWPORT_BASE_CSS; }
22
22
  });
23
23
  Object.defineProperty(exports, "frontendSlidesTools", {
24
24
  enumerable: true,
25
- get: function () { return chunk6R6L6KSC_cjs.frontendSlidesTools; }
25
+ get: function () { return chunkHSVXH7DD_cjs.frontendSlidesTools; }
26
26
  });
27
27
  Object.defineProperty(exports, "getFrontendSlidesSkillPrompt", {
28
28
  enumerable: true,
29
- get: function () { return chunk6R6L6KSC_cjs.getFrontendSlidesSkillPrompt; }
29
+ get: function () { return chunkHSVXH7DD_cjs.getFrontendSlidesSkillPrompt; }
30
30
  });
31
31
  Object.defineProperty(exports, "getSlideStylePresetSchema", {
32
32
  enumerable: true,
33
- get: function () { return chunk6R6L6KSC_cjs.getSlideStylePresetSchema; }
33
+ get: function () { return chunkHSVXH7DD_cjs.getSlideStylePresetSchema; }
34
34
  });
35
35
  Object.defineProperty(exports, "getStylePreset", {
36
36
  enumerable: true,
37
- get: function () { return chunk6R6L6KSC_cjs.getStylePreset; }
37
+ get: function () { return chunkHSVXH7DD_cjs.getStylePreset; }
38
+ });
39
+ Object.defineProperty(exports, "getStylePresetById", {
40
+ enumerable: true,
41
+ get: function () { return chunkHSVXH7DD_cjs.getStylePresetById; }
38
42
  });
39
43
  Object.defineProperty(exports, "getTemplatesCatalog", {
40
44
  enumerable: true,
41
- get: function () { return chunk6R6L6KSC_cjs.getTemplatesCatalog; }
45
+ get: function () { return chunkHSVXH7DD_cjs.getTemplatesCatalog; }
42
46
  });
43
47
  Object.defineProperty(exports, "querySlideTemplatesSchema", {
44
48
  enumerable: true,
45
- get: function () { return chunk6R6L6KSC_cjs.querySlideTemplatesSchema; }
49
+ get: function () { return chunkHSVXH7DD_cjs.querySlideTemplatesSchema; }
46
50
  });
47
51
  Object.defineProperty(exports, "searchTemplates", {
48
52
  enumerable: true,
49
- get: function () { return chunk6R6L6KSC_cjs.searchTemplates; }
53
+ get: function () { return chunkHSVXH7DD_cjs.searchTemplates; }
50
54
  });
51
55
  //# sourceMappingURL=index.cjs.map
52
56
  //# sourceMappingURL=index.cjs.map
@@ -8,7 +8,7 @@ interface TemplateCatalogItem {
8
8
  occasion: string[];
9
9
  tone: string[];
10
10
  formality: 'low' | 'medium-low' | 'medium' | 'medium-high' | 'high';
11
- density: 'low' | 'medium' | 'high';
11
+ density: 'low' | 'medium' | 'medium-high' | 'high';
12
12
  scheme: 'light' | 'dark' | 'mixed';
13
13
  best_for: string;
14
14
  avoid_for: string;
@@ -54,16 +54,30 @@ interface FrontendSlidesSkillOptions {
54
54
  declare function getTemplatesCatalog(): TemplateCatalogItem[];
55
55
  /**
56
56
  * Searches templates by mood, scheme, or keywords.
57
+ *
58
+ * Scoring semantics (graceful, not hard-AND):
59
+ * - `scheme` and `mood` add weight when they match.
60
+ * - `query` matches against slug/name/tagline/best_for/occasion/tone/avoid_for.
61
+ * - Results are ranked by score and a minimum threshold applies; when NO
62
+ * template clears the threshold the full catalog is returned so LLM agents
63
+ * never dead-end on an over-constrained query.
57
64
  */
58
65
  declare function searchTemplates(filter?: string | {
59
66
  mood?: string;
60
- scheme?: 'light' | 'dark';
67
+ scheme?: 'light' | 'dark' | 'mixed';
61
68
  query?: string;
62
69
  }): TemplateCatalogItem[];
63
70
  /**
64
- * Retrieves a style preset by its ID.
71
+ * Retrieves a style preset by its ID. Falls back to the first preset
72
+ * (electric-studio) when the ID is unknown — use `getStylePresetById`
73
+ * when a strict match is required (e.g. validating user-provided IDs).
65
74
  */
66
- declare function getStylePreset(id: string): StylePresetItem | undefined;
75
+ declare function getStylePreset(id: string): StylePresetItem;
76
+ /**
77
+ * Strict variant: returns the exact preset or `undefined` when unknown.
78
+ * Never falls back silently — callers can surface a proper error.
79
+ */
80
+ declare function getStylePresetById(id: string): StylePresetItem | undefined;
67
81
  /**
68
82
  * Assembles a comprehensive, production-grade Vercel AI SDK system prompt
69
83
  * integrating the entire Frontend-Slides Skill, fixed 16:9 stage rules,
@@ -73,40 +87,41 @@ declare function getFrontendSlidesSkillPrompt(options?: FrontendSlidesSkillOptio
73
87
 
74
88
  declare const querySlideTemplatesSchema: z.ZodObject<{
75
89
  mood: z.ZodOptional<z.ZodString>;
76
- scheme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
90
+ scheme: z.ZodOptional<z.ZodEnum<["light", "dark", "mixed"]>>;
77
91
  query: z.ZodOptional<z.ZodString>;
78
92
  }, "strip", z.ZodTypeAny, {
79
- scheme?: "dark" | "light" | undefined;
93
+ scheme?: "dark" | "light" | "mixed" | undefined;
80
94
  mood?: string | undefined;
81
95
  query?: string | undefined;
82
96
  }, {
83
- scheme?: "dark" | "light" | undefined;
97
+ scheme?: "dark" | "light" | "mixed" | undefined;
84
98
  mood?: string | undefined;
85
99
  query?: string | undefined;
86
100
  }>;
87
101
  declare const getSlideStylePresetSchema: z.ZodObject<{
88
- presetId: z.ZodEnum<["electric-studio", "blue-professional", "creative-voltage"]>;
102
+ presetId: z.ZodString;
89
103
  }, "strip", z.ZodTypeAny, {
90
- presetId: "blue-professional" | "electric-studio" | "creative-voltage";
104
+ presetId: string;
91
105
  }, {
92
- presetId: "blue-professional" | "electric-studio" | "creative-voltage";
106
+ presetId: string;
93
107
  }>;
94
108
  /**
95
- * Tool definitions that can be directly passed to Vercel AI SDK's `tools` parameter.
109
+ * Tool definitions that can be directly passed to Vercel AI SDK v5+/v7's
110
+ * `tools` parameter (uses `inputSchema`, not the legacy v4 `parameters`).
96
111
  */
97
112
  declare const frontendSlidesTools: {
98
113
  querySlideTemplates: {
99
114
  description: string;
100
- parameters: z.ZodObject<{
115
+ inputSchema: z.ZodObject<{
101
116
  mood: z.ZodOptional<z.ZodString>;
102
- scheme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
117
+ scheme: z.ZodOptional<z.ZodEnum<["light", "dark", "mixed"]>>;
103
118
  query: z.ZodOptional<z.ZodString>;
104
119
  }, "strip", z.ZodTypeAny, {
105
- scheme?: "dark" | "light" | undefined;
120
+ scheme?: "dark" | "light" | "mixed" | undefined;
106
121
  mood?: string | undefined;
107
122
  query?: string | undefined;
108
123
  }, {
109
- scheme?: "dark" | "light" | undefined;
124
+ scheme?: "dark" | "light" | "mixed" | undefined;
110
125
  mood?: string | undefined;
111
126
  query?: string | undefined;
112
127
  }>;
@@ -126,17 +141,18 @@ declare const frontendSlidesTools: {
126
141
  };
127
142
  getSlideStylePreset: {
128
143
  description: string;
129
- parameters: z.ZodObject<{
130
- presetId: z.ZodEnum<["electric-studio", "blue-professional", "creative-voltage"]>;
144
+ inputSchema: z.ZodObject<{
145
+ presetId: z.ZodString;
131
146
  }, "strip", z.ZodTypeAny, {
132
- presetId: "blue-professional" | "electric-studio" | "creative-voltage";
147
+ presetId: string;
133
148
  }, {
134
- presetId: "blue-professional" | "electric-studio" | "creative-voltage";
149
+ presetId: string;
135
150
  }>;
136
151
  execute: (args: z.infer<typeof getSlideStylePresetSchema>) => Promise<StylePresetItem | {
137
152
  error: string;
153
+ availablePresets: string[];
138
154
  }>;
139
155
  };
140
156
  };
141
157
 
142
- export { FRONTEND_SLIDES_CORE_RULES, type FrontendSlidesSkillOptions, STYLE_PRESETS, type StylePresetItem, TEMPLATES_CATALOG, type TemplateCatalogItem, VIEWPORT_BASE_CSS, frontendSlidesTools, getFrontendSlidesSkillPrompt, getSlideStylePresetSchema, getStylePreset, getTemplatesCatalog, querySlideTemplatesSchema, searchTemplates };
158
+ export { FRONTEND_SLIDES_CORE_RULES, type FrontendSlidesSkillOptions, STYLE_PRESETS, type StylePresetItem, TEMPLATES_CATALOG, type TemplateCatalogItem, VIEWPORT_BASE_CSS, frontendSlidesTools, getFrontendSlidesSkillPrompt, getSlideStylePresetSchema, getStylePreset, getStylePresetById, getTemplatesCatalog, querySlideTemplatesSchema, searchTemplates };
@@ -8,7 +8,7 @@ interface TemplateCatalogItem {
8
8
  occasion: string[];
9
9
  tone: string[];
10
10
  formality: 'low' | 'medium-low' | 'medium' | 'medium-high' | 'high';
11
- density: 'low' | 'medium' | 'high';
11
+ density: 'low' | 'medium' | 'medium-high' | 'high';
12
12
  scheme: 'light' | 'dark' | 'mixed';
13
13
  best_for: string;
14
14
  avoid_for: string;
@@ -54,16 +54,30 @@ interface FrontendSlidesSkillOptions {
54
54
  declare function getTemplatesCatalog(): TemplateCatalogItem[];
55
55
  /**
56
56
  * Searches templates by mood, scheme, or keywords.
57
+ *
58
+ * Scoring semantics (graceful, not hard-AND):
59
+ * - `scheme` and `mood` add weight when they match.
60
+ * - `query` matches against slug/name/tagline/best_for/occasion/tone/avoid_for.
61
+ * - Results are ranked by score and a minimum threshold applies; when NO
62
+ * template clears the threshold the full catalog is returned so LLM agents
63
+ * never dead-end on an over-constrained query.
57
64
  */
58
65
  declare function searchTemplates(filter?: string | {
59
66
  mood?: string;
60
- scheme?: 'light' | 'dark';
67
+ scheme?: 'light' | 'dark' | 'mixed';
61
68
  query?: string;
62
69
  }): TemplateCatalogItem[];
63
70
  /**
64
- * Retrieves a style preset by its ID.
71
+ * Retrieves a style preset by its ID. Falls back to the first preset
72
+ * (electric-studio) when the ID is unknown — use `getStylePresetById`
73
+ * when a strict match is required (e.g. validating user-provided IDs).
65
74
  */
66
- declare function getStylePreset(id: string): StylePresetItem | undefined;
75
+ declare function getStylePreset(id: string): StylePresetItem;
76
+ /**
77
+ * Strict variant: returns the exact preset or `undefined` when unknown.
78
+ * Never falls back silently — callers can surface a proper error.
79
+ */
80
+ declare function getStylePresetById(id: string): StylePresetItem | undefined;
67
81
  /**
68
82
  * Assembles a comprehensive, production-grade Vercel AI SDK system prompt
69
83
  * integrating the entire Frontend-Slides Skill, fixed 16:9 stage rules,
@@ -73,40 +87,41 @@ declare function getFrontendSlidesSkillPrompt(options?: FrontendSlidesSkillOptio
73
87
 
74
88
  declare const querySlideTemplatesSchema: z.ZodObject<{
75
89
  mood: z.ZodOptional<z.ZodString>;
76
- scheme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
90
+ scheme: z.ZodOptional<z.ZodEnum<["light", "dark", "mixed"]>>;
77
91
  query: z.ZodOptional<z.ZodString>;
78
92
  }, "strip", z.ZodTypeAny, {
79
- scheme?: "dark" | "light" | undefined;
93
+ scheme?: "dark" | "light" | "mixed" | undefined;
80
94
  mood?: string | undefined;
81
95
  query?: string | undefined;
82
96
  }, {
83
- scheme?: "dark" | "light" | undefined;
97
+ scheme?: "dark" | "light" | "mixed" | undefined;
84
98
  mood?: string | undefined;
85
99
  query?: string | undefined;
86
100
  }>;
87
101
  declare const getSlideStylePresetSchema: z.ZodObject<{
88
- presetId: z.ZodEnum<["electric-studio", "blue-professional", "creative-voltage"]>;
102
+ presetId: z.ZodString;
89
103
  }, "strip", z.ZodTypeAny, {
90
- presetId: "blue-professional" | "electric-studio" | "creative-voltage";
104
+ presetId: string;
91
105
  }, {
92
- presetId: "blue-professional" | "electric-studio" | "creative-voltage";
106
+ presetId: string;
93
107
  }>;
94
108
  /**
95
- * Tool definitions that can be directly passed to Vercel AI SDK's `tools` parameter.
109
+ * Tool definitions that can be directly passed to Vercel AI SDK v5+/v7's
110
+ * `tools` parameter (uses `inputSchema`, not the legacy v4 `parameters`).
96
111
  */
97
112
  declare const frontendSlidesTools: {
98
113
  querySlideTemplates: {
99
114
  description: string;
100
- parameters: z.ZodObject<{
115
+ inputSchema: z.ZodObject<{
101
116
  mood: z.ZodOptional<z.ZodString>;
102
- scheme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
117
+ scheme: z.ZodOptional<z.ZodEnum<["light", "dark", "mixed"]>>;
103
118
  query: z.ZodOptional<z.ZodString>;
104
119
  }, "strip", z.ZodTypeAny, {
105
- scheme?: "dark" | "light" | undefined;
120
+ scheme?: "dark" | "light" | "mixed" | undefined;
106
121
  mood?: string | undefined;
107
122
  query?: string | undefined;
108
123
  }, {
109
- scheme?: "dark" | "light" | undefined;
124
+ scheme?: "dark" | "light" | "mixed" | undefined;
110
125
  mood?: string | undefined;
111
126
  query?: string | undefined;
112
127
  }>;
@@ -126,17 +141,18 @@ declare const frontendSlidesTools: {
126
141
  };
127
142
  getSlideStylePreset: {
128
143
  description: string;
129
- parameters: z.ZodObject<{
130
- presetId: z.ZodEnum<["electric-studio", "blue-professional", "creative-voltage"]>;
144
+ inputSchema: z.ZodObject<{
145
+ presetId: z.ZodString;
131
146
  }, "strip", z.ZodTypeAny, {
132
- presetId: "blue-professional" | "electric-studio" | "creative-voltage";
147
+ presetId: string;
133
148
  }, {
134
- presetId: "blue-professional" | "electric-studio" | "creative-voltage";
149
+ presetId: string;
135
150
  }>;
136
151
  execute: (args: z.infer<typeof getSlideStylePresetSchema>) => Promise<StylePresetItem | {
137
152
  error: string;
153
+ availablePresets: string[];
138
154
  }>;
139
155
  };
140
156
  };
141
157
 
142
- export { FRONTEND_SLIDES_CORE_RULES, type FrontendSlidesSkillOptions, STYLE_PRESETS, type StylePresetItem, TEMPLATES_CATALOG, type TemplateCatalogItem, VIEWPORT_BASE_CSS, frontendSlidesTools, getFrontendSlidesSkillPrompt, getSlideStylePresetSchema, getStylePreset, getTemplatesCatalog, querySlideTemplatesSchema, searchTemplates };
158
+ export { FRONTEND_SLIDES_CORE_RULES, type FrontendSlidesSkillOptions, STYLE_PRESETS, type StylePresetItem, TEMPLATES_CATALOG, type TemplateCatalogItem, VIEWPORT_BASE_CSS, frontendSlidesTools, getFrontendSlidesSkillPrompt, getSlideStylePresetSchema, getStylePreset, getStylePresetById, getTemplatesCatalog, querySlideTemplatesSchema, searchTemplates };
@@ -1,3 +1,3 @@
1
- export { FRONTEND_SLIDES_CORE_RULES, STYLE_PRESETS, TEMPLATES_CATALOG, VIEWPORT_BASE_CSS, frontendSlidesTools, getFrontendSlidesSkillPrompt, getSlideStylePresetSchema, getStylePreset, getTemplatesCatalog, querySlideTemplatesSchema, searchTemplates } from '../chunk-BHJXQCVE.js';
1
+ export { FRONTEND_SLIDES_CORE_RULES, STYLE_PRESETS, TEMPLATES_CATALOG, VIEWPORT_BASE_CSS, frontendSlidesTools, getFrontendSlidesSkillPrompt, getSlideStylePresetSchema, getStylePreset, getStylePresetById, getTemplatesCatalog, querySlideTemplatesSchema, searchTemplates } from '../chunk-VRXEXUHR.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -151,70 +151,4 @@ interface SlideEngine {
151
151
  getThemeCss: (theme: BuiltInTheme | SlideTheme, containerId?: string) => string;
152
152
  }
153
153
 
154
- type HtmlThemeName = 'blue-professional' | 'editorial-forest' | 'cobalt-grid' | 'studio' | 'monochrome';
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 HtmlThemeName = 'blue-professional' | 'editorial-forest' | 'cobalt-grid' | 'studio' | 'monochrome';
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.2.17",
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",