@thanh01.pmt/presentation-kit 0.2.1 → 0.2.3

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.
@@ -0,0 +1,206 @@
1
+ import { z } from 'zod';
2
+ import { c as SlideLayoutCategory } from '../presets-JpoJbNKE.cjs';
3
+ import { b as SlideLayoutData } from '../types-DnR81ReX.cjs';
4
+
5
+ declare const listSlidePresetsSchema: z.ZodObject<{
6
+ category: z.ZodOptional<z.ZodEnum<["all", "cover", "content", "split", "code", "metrics", "diagram", "quote", "assessment"]>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ category?: "all" | "cover" | "content" | "split" | "code" | "metrics" | "diagram" | "quote" | "assessment" | undefined;
9
+ }, {
10
+ category?: "all" | "cover" | "content" | "split" | "code" | "metrics" | "diagram" | "quote" | "assessment" | undefined;
11
+ }>;
12
+ declare const createSlideFromPresetSchema: z.ZodObject<{
13
+ presetId: z.ZodString;
14
+ title: z.ZodString;
15
+ subtitle: z.ZodOptional<z.ZodString>;
16
+ content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
17
+ customMarkdownBody: z.ZodOptional<z.ZodString>;
18
+ presenterNotes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ presetId: string;
21
+ title: string;
22
+ content?: Record<string, string> | undefined;
23
+ subtitle?: string | undefined;
24
+ customMarkdownBody?: string | undefined;
25
+ presenterNotes?: string[] | undefined;
26
+ }, {
27
+ presetId: string;
28
+ title: string;
29
+ content?: Record<string, string> | undefined;
30
+ subtitle?: string | undefined;
31
+ customMarkdownBody?: string | undefined;
32
+ presenterNotes?: string[] | undefined;
33
+ }>;
34
+ declare const applySlideLayoutSchema: z.ZodObject<{
35
+ markdown: z.ZodString;
36
+ slideIndex: z.ZodNumber;
37
+ presetId: z.ZodOptional<z.ZodString>;
38
+ boxes: z.ZodOptional<z.ZodArray<z.ZodObject<{
39
+ id: z.ZodString;
40
+ target: z.ZodOptional<z.ZodString>;
41
+ pos: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
42
+ fontSize: z.ZodOptional<z.ZodString>;
43
+ color: z.ZodOptional<z.ZodString>;
44
+ textAlign: z.ZodOptional<z.ZodEnum<["left", "center", "right", "justify"]>>;
45
+ style: z.ZodOptional<z.ZodString>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ id: string;
48
+ pos: [number, number, number, number];
49
+ target?: string | undefined;
50
+ fontSize?: string | undefined;
51
+ color?: string | undefined;
52
+ textAlign?: "left" | "center" | "right" | "justify" | undefined;
53
+ style?: string | undefined;
54
+ }, {
55
+ id: string;
56
+ pos: [number, number, number, number];
57
+ target?: string | undefined;
58
+ fontSize?: string | undefined;
59
+ color?: string | undefined;
60
+ textAlign?: "left" | "center" | "right" | "justify" | undefined;
61
+ style?: string | undefined;
62
+ }>, "many">>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ markdown: string;
65
+ slideIndex: number;
66
+ presetId?: string | undefined;
67
+ boxes?: {
68
+ id: string;
69
+ pos: [number, number, number, number];
70
+ target?: string | undefined;
71
+ fontSize?: string | undefined;
72
+ color?: string | undefined;
73
+ textAlign?: "left" | "center" | "right" | "justify" | undefined;
74
+ style?: string | undefined;
75
+ }[] | undefined;
76
+ }, {
77
+ markdown: string;
78
+ slideIndex: number;
79
+ presetId?: string | undefined;
80
+ boxes?: {
81
+ id: string;
82
+ pos: [number, number, number, number];
83
+ target?: string | undefined;
84
+ fontSize?: string | undefined;
85
+ color?: string | undefined;
86
+ textAlign?: "left" | "center" | "right" | "justify" | undefined;
87
+ style?: string | undefined;
88
+ }[] | undefined;
89
+ }>;
90
+ declare const updatePresenterNotesSchema: z.ZodObject<{
91
+ markdown: z.ZodString;
92
+ slideIndex: z.ZodNumber;
93
+ notes: z.ZodArray<z.ZodString, "many">;
94
+ }, "strip", z.ZodTypeAny, {
95
+ markdown: string;
96
+ slideIndex: number;
97
+ notes: string[];
98
+ }, {
99
+ markdown: string;
100
+ slideIndex: number;
101
+ notes: string[];
102
+ }>;
103
+ declare const generateDeckOutlineSchema: z.ZodObject<{
104
+ topic: z.ZodString;
105
+ durationMins: z.ZodDefault<z.ZodNumber>;
106
+ audience: z.ZodString;
107
+ keyObjectives: z.ZodArray<z.ZodString, "many">;
108
+ techStack: z.ZodOptional<z.ZodString>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ topic: string;
111
+ durationMins: number;
112
+ audience: string;
113
+ keyObjectives: string[];
114
+ techStack?: string | undefined;
115
+ }, {
116
+ topic: string;
117
+ audience: string;
118
+ keyObjectives: string[];
119
+ durationMins?: number | undefined;
120
+ techStack?: string | undefined;
121
+ }>;
122
+
123
+ /**
124
+ * Execute: listSlidePresets
125
+ */
126
+ declare function executeListSlidePresets(params?: {
127
+ category?: string;
128
+ }): {
129
+ count: number;
130
+ presets: {
131
+ id: string;
132
+ name: string;
133
+ category: SlideLayoutCategory;
134
+ description: string;
135
+ boxCount: number;
136
+ snippetPreview: string;
137
+ }[];
138
+ };
139
+ /**
140
+ * Execute: createSlideFromPreset
141
+ */
142
+ declare function executeCreateSlideFromPreset(params: {
143
+ presetId: string;
144
+ title: string;
145
+ subtitle?: string;
146
+ content?: Record<string, string>;
147
+ customMarkdownBody?: string;
148
+ presenterNotes?: string[];
149
+ }): {
150
+ success: boolean;
151
+ slideMarkdown: string;
152
+ presetName?: string;
153
+ error?: string;
154
+ };
155
+ /**
156
+ * Execute: applySlideLayout
157
+ */
158
+ declare function executeApplySlideLayout(params: {
159
+ markdown: string;
160
+ slideIndex: number;
161
+ presetId?: string;
162
+ boxes?: SlideLayoutData['boxes'];
163
+ }): {
164
+ success: boolean;
165
+ updatedMarkdown: string;
166
+ error?: string;
167
+ };
168
+ /**
169
+ * Execute: updatePresenterNotes
170
+ */
171
+ declare function executeUpdatePresenterNotes(params: {
172
+ markdown: string;
173
+ slideIndex: number;
174
+ notes: string[];
175
+ }): {
176
+ success: boolean;
177
+ updatedMarkdown: string;
178
+ error?: string;
179
+ };
180
+ /**
181
+ * Execute: generateDeckOutline (indexed by talk duration)
182
+ */
183
+ declare function executeGenerateDeckOutline(params: {
184
+ topic: string;
185
+ durationMins: number;
186
+ audience: string;
187
+ keyObjectives: string[];
188
+ techStack?: string;
189
+ }): {
190
+ topic: string;
191
+ audience: string;
192
+ durationMins: number;
193
+ format: string;
194
+ recommendedSlideCount: number;
195
+ structureGuidelines: string[];
196
+ suggestedOutline: {
197
+ slide: number;
198
+ type: string;
199
+ title: string;
200
+ intent: string;
201
+ }[];
202
+ };
203
+
204
+ declare const SLIDE_DESIGN_PROMPT_CONTRACT = "\n# SYSTEM MANDATE: PROFESSIONAL PRESENTATION & SLIDE DESIGN INVARIANTS\n\nYou are an expert Presentation Architect & Visual Designer for educational, technical, and executive decks.\nWhen generating or modifying Marp slide presentations, you MUST STRICTLY obey the following non-negotiable rules:\n\n---\n\n## 1. DURATION-INDEXED SLIDE PACING\nStructure decks based on allocated talk time (averaging 1.5 - 2 minutes per slide):\n- **5 min (Lightning Talk):** 5 - 7 slides [Hook -> 2-3 Core Points -> CTA / Summary]\n- **15 min (Short Tech Talk):** 12 - 16 slides [Title -> Agenda -> Hook -> 3-4 Concepts -> Lab/Demo -> Summary]\n- **30 min (Conference / Class):** 24 - 32 slides [Full 5E Learning Cycle + Interactive Formative Checkpoint]\n- **45-60 min (Keynote / Workshop):** 36 - 50 slides [Modular Micro-cycles + Tiered Hands-on Exercises]\n\n---\n\n## 2. THE \"ONE IDEA PER SLIDE\" RULE\n- Each slide communicates **EXACTLY ONE** pedagogical or architectural concept.\n- Never pack multiple distinct topics into a single slide.\n- If a concept has both theory and code, split into: (Slide A) Concept Diagram -> (Slide B) Code Walkthrough.\n\n---\n\n## 3. STRICT WORD BUDGET (ZERO-SCROLL INVARIANT)\n- **Hard Limit:** Maximum **35 - 40 words** per card or column.\n- Never write paragraphs longer than 2 sentences. Use structured bullets with bold anchor terms:\n - Format: `- **Key Concept:** Concise explanation in a single line.`\n- Vertical scrolling inside a slide is STRICTLY FORBIDDEN. Content must fit the 16:9 (1280x720) canvas cleanly.\n\n---\n\n## 4. TWO-COLUMN & CARD BALANCED LAYOUTS\n- Avoid centered vertical walls of text. Use responsive side-by-side card wrappers:\n ```html\n <div class=\"columns-2\">\n <div>\n ### \uD83D\uDD34 Legacy / Challenge\n - High idle compute overhead\n - Cascading timeout failures\n </div>\n <div>\n ### \uD83D\uDFE2 Modern / Solution\n - Event-driven webhook streams\n - Automatic queue backpressure\n </div>\n </div>\n ```\n- For 3 metrics or bronze/silver/gold differentiation, use `<div class=\"columns-3\">...</div>`.\n\n---\n\n## 5. MANDATORY PRESENTER NOTES (TEACHER TALK TRACK)\nEvery single slide MUST conclude with an HTML comment block containing:\n1. **Talk Track:** 2-3 sentences of what the speaker should say out loud.\n2. **Cold-Call Check Question:** 1 diagnostic question to ask a specific student or attendee.\n3. **Scaffolding Tip:** 1 hint or real-world analogy if learners look confused.\n\nExample:\n```markdown\n<!--\nPresenter Notes:\n- Walk through the primary bottleneck when scaling database writes under high concurrency.\n- Cold-call: \"Alex, if traffic spikes 10x in 1 minute, which subsystem will experience lock contention first?\"\n- Scaffolding tip: Remind the room of the I/O saturation trade-off discussed in the previous module.\n-->\n```\n\n---\n\n## 6. MARP COMPATIBLE YAML LAYOUT HEADERS\nWhen a precise coordinate layout is specified, include the clean YAML block at the very top of the slide:\n```markdown\n<!-- layout:\n boxes:\n - id: heading\n target: h2\n pos: [80, 50, 1120, 70]\n fontSize: 2rem\n - id: col-left\n target: '.columns-2 > div:first-child'\n pos: [80, 150, 530, 510]\n - id: col-right\n target: '.columns-2 > div:last-child'\n pos: [670, 150, 530, 510]\n-->\n```\n";
205
+
206
+ export { SLIDE_DESIGN_PROMPT_CONTRACT, applySlideLayoutSchema, createSlideFromPresetSchema, executeApplySlideLayout, executeCreateSlideFromPreset, executeGenerateDeckOutline, executeListSlidePresets, executeUpdatePresenterNotes, generateDeckOutlineSchema, listSlidePresetsSchema, updatePresenterNotesSchema };
@@ -0,0 +1,206 @@
1
+ import { z } from 'zod';
2
+ import { c as SlideLayoutCategory } from '../presets-B1N2_jKl.js';
3
+ import { b as SlideLayoutData } from '../types-DnR81ReX.js';
4
+
5
+ declare const listSlidePresetsSchema: z.ZodObject<{
6
+ category: z.ZodOptional<z.ZodEnum<["all", "cover", "content", "split", "code", "metrics", "diagram", "quote", "assessment"]>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ category?: "all" | "cover" | "content" | "split" | "code" | "metrics" | "diagram" | "quote" | "assessment" | undefined;
9
+ }, {
10
+ category?: "all" | "cover" | "content" | "split" | "code" | "metrics" | "diagram" | "quote" | "assessment" | undefined;
11
+ }>;
12
+ declare const createSlideFromPresetSchema: z.ZodObject<{
13
+ presetId: z.ZodString;
14
+ title: z.ZodString;
15
+ subtitle: z.ZodOptional<z.ZodString>;
16
+ content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
17
+ customMarkdownBody: z.ZodOptional<z.ZodString>;
18
+ presenterNotes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ presetId: string;
21
+ title: string;
22
+ content?: Record<string, string> | undefined;
23
+ subtitle?: string | undefined;
24
+ customMarkdownBody?: string | undefined;
25
+ presenterNotes?: string[] | undefined;
26
+ }, {
27
+ presetId: string;
28
+ title: string;
29
+ content?: Record<string, string> | undefined;
30
+ subtitle?: string | undefined;
31
+ customMarkdownBody?: string | undefined;
32
+ presenterNotes?: string[] | undefined;
33
+ }>;
34
+ declare const applySlideLayoutSchema: z.ZodObject<{
35
+ markdown: z.ZodString;
36
+ slideIndex: z.ZodNumber;
37
+ presetId: z.ZodOptional<z.ZodString>;
38
+ boxes: z.ZodOptional<z.ZodArray<z.ZodObject<{
39
+ id: z.ZodString;
40
+ target: z.ZodOptional<z.ZodString>;
41
+ pos: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
42
+ fontSize: z.ZodOptional<z.ZodString>;
43
+ color: z.ZodOptional<z.ZodString>;
44
+ textAlign: z.ZodOptional<z.ZodEnum<["left", "center", "right", "justify"]>>;
45
+ style: z.ZodOptional<z.ZodString>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ id: string;
48
+ pos: [number, number, number, number];
49
+ target?: string | undefined;
50
+ fontSize?: string | undefined;
51
+ color?: string | undefined;
52
+ textAlign?: "left" | "center" | "right" | "justify" | undefined;
53
+ style?: string | undefined;
54
+ }, {
55
+ id: string;
56
+ pos: [number, number, number, number];
57
+ target?: string | undefined;
58
+ fontSize?: string | undefined;
59
+ color?: string | undefined;
60
+ textAlign?: "left" | "center" | "right" | "justify" | undefined;
61
+ style?: string | undefined;
62
+ }>, "many">>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ markdown: string;
65
+ slideIndex: number;
66
+ presetId?: string | undefined;
67
+ boxes?: {
68
+ id: string;
69
+ pos: [number, number, number, number];
70
+ target?: string | undefined;
71
+ fontSize?: string | undefined;
72
+ color?: string | undefined;
73
+ textAlign?: "left" | "center" | "right" | "justify" | undefined;
74
+ style?: string | undefined;
75
+ }[] | undefined;
76
+ }, {
77
+ markdown: string;
78
+ slideIndex: number;
79
+ presetId?: string | undefined;
80
+ boxes?: {
81
+ id: string;
82
+ pos: [number, number, number, number];
83
+ target?: string | undefined;
84
+ fontSize?: string | undefined;
85
+ color?: string | undefined;
86
+ textAlign?: "left" | "center" | "right" | "justify" | undefined;
87
+ style?: string | undefined;
88
+ }[] | undefined;
89
+ }>;
90
+ declare const updatePresenterNotesSchema: z.ZodObject<{
91
+ markdown: z.ZodString;
92
+ slideIndex: z.ZodNumber;
93
+ notes: z.ZodArray<z.ZodString, "many">;
94
+ }, "strip", z.ZodTypeAny, {
95
+ markdown: string;
96
+ slideIndex: number;
97
+ notes: string[];
98
+ }, {
99
+ markdown: string;
100
+ slideIndex: number;
101
+ notes: string[];
102
+ }>;
103
+ declare const generateDeckOutlineSchema: z.ZodObject<{
104
+ topic: z.ZodString;
105
+ durationMins: z.ZodDefault<z.ZodNumber>;
106
+ audience: z.ZodString;
107
+ keyObjectives: z.ZodArray<z.ZodString, "many">;
108
+ techStack: z.ZodOptional<z.ZodString>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ topic: string;
111
+ durationMins: number;
112
+ audience: string;
113
+ keyObjectives: string[];
114
+ techStack?: string | undefined;
115
+ }, {
116
+ topic: string;
117
+ audience: string;
118
+ keyObjectives: string[];
119
+ durationMins?: number | undefined;
120
+ techStack?: string | undefined;
121
+ }>;
122
+
123
+ /**
124
+ * Execute: listSlidePresets
125
+ */
126
+ declare function executeListSlidePresets(params?: {
127
+ category?: string;
128
+ }): {
129
+ count: number;
130
+ presets: {
131
+ id: string;
132
+ name: string;
133
+ category: SlideLayoutCategory;
134
+ description: string;
135
+ boxCount: number;
136
+ snippetPreview: string;
137
+ }[];
138
+ };
139
+ /**
140
+ * Execute: createSlideFromPreset
141
+ */
142
+ declare function executeCreateSlideFromPreset(params: {
143
+ presetId: string;
144
+ title: string;
145
+ subtitle?: string;
146
+ content?: Record<string, string>;
147
+ customMarkdownBody?: string;
148
+ presenterNotes?: string[];
149
+ }): {
150
+ success: boolean;
151
+ slideMarkdown: string;
152
+ presetName?: string;
153
+ error?: string;
154
+ };
155
+ /**
156
+ * Execute: applySlideLayout
157
+ */
158
+ declare function executeApplySlideLayout(params: {
159
+ markdown: string;
160
+ slideIndex: number;
161
+ presetId?: string;
162
+ boxes?: SlideLayoutData['boxes'];
163
+ }): {
164
+ success: boolean;
165
+ updatedMarkdown: string;
166
+ error?: string;
167
+ };
168
+ /**
169
+ * Execute: updatePresenterNotes
170
+ */
171
+ declare function executeUpdatePresenterNotes(params: {
172
+ markdown: string;
173
+ slideIndex: number;
174
+ notes: string[];
175
+ }): {
176
+ success: boolean;
177
+ updatedMarkdown: string;
178
+ error?: string;
179
+ };
180
+ /**
181
+ * Execute: generateDeckOutline (indexed by talk duration)
182
+ */
183
+ declare function executeGenerateDeckOutline(params: {
184
+ topic: string;
185
+ durationMins: number;
186
+ audience: string;
187
+ keyObjectives: string[];
188
+ techStack?: string;
189
+ }): {
190
+ topic: string;
191
+ audience: string;
192
+ durationMins: number;
193
+ format: string;
194
+ recommendedSlideCount: number;
195
+ structureGuidelines: string[];
196
+ suggestedOutline: {
197
+ slide: number;
198
+ type: string;
199
+ title: string;
200
+ intent: string;
201
+ }[];
202
+ };
203
+
204
+ declare const SLIDE_DESIGN_PROMPT_CONTRACT = "\n# SYSTEM MANDATE: PROFESSIONAL PRESENTATION & SLIDE DESIGN INVARIANTS\n\nYou are an expert Presentation Architect & Visual Designer for educational, technical, and executive decks.\nWhen generating or modifying Marp slide presentations, you MUST STRICTLY obey the following non-negotiable rules:\n\n---\n\n## 1. DURATION-INDEXED SLIDE PACING\nStructure decks based on allocated talk time (averaging 1.5 - 2 minutes per slide):\n- **5 min (Lightning Talk):** 5 - 7 slides [Hook -> 2-3 Core Points -> CTA / Summary]\n- **15 min (Short Tech Talk):** 12 - 16 slides [Title -> Agenda -> Hook -> 3-4 Concepts -> Lab/Demo -> Summary]\n- **30 min (Conference / Class):** 24 - 32 slides [Full 5E Learning Cycle + Interactive Formative Checkpoint]\n- **45-60 min (Keynote / Workshop):** 36 - 50 slides [Modular Micro-cycles + Tiered Hands-on Exercises]\n\n---\n\n## 2. THE \"ONE IDEA PER SLIDE\" RULE\n- Each slide communicates **EXACTLY ONE** pedagogical or architectural concept.\n- Never pack multiple distinct topics into a single slide.\n- If a concept has both theory and code, split into: (Slide A) Concept Diagram -> (Slide B) Code Walkthrough.\n\n---\n\n## 3. STRICT WORD BUDGET (ZERO-SCROLL INVARIANT)\n- **Hard Limit:** Maximum **35 - 40 words** per card or column.\n- Never write paragraphs longer than 2 sentences. Use structured bullets with bold anchor terms:\n - Format: `- **Key Concept:** Concise explanation in a single line.`\n- Vertical scrolling inside a slide is STRICTLY FORBIDDEN. Content must fit the 16:9 (1280x720) canvas cleanly.\n\n---\n\n## 4. TWO-COLUMN & CARD BALANCED LAYOUTS\n- Avoid centered vertical walls of text. Use responsive side-by-side card wrappers:\n ```html\n <div class=\"columns-2\">\n <div>\n ### \uD83D\uDD34 Legacy / Challenge\n - High idle compute overhead\n - Cascading timeout failures\n </div>\n <div>\n ### \uD83D\uDFE2 Modern / Solution\n - Event-driven webhook streams\n - Automatic queue backpressure\n </div>\n </div>\n ```\n- For 3 metrics or bronze/silver/gold differentiation, use `<div class=\"columns-3\">...</div>`.\n\n---\n\n## 5. MANDATORY PRESENTER NOTES (TEACHER TALK TRACK)\nEvery single slide MUST conclude with an HTML comment block containing:\n1. **Talk Track:** 2-3 sentences of what the speaker should say out loud.\n2. **Cold-Call Check Question:** 1 diagnostic question to ask a specific student or attendee.\n3. **Scaffolding Tip:** 1 hint or real-world analogy if learners look confused.\n\nExample:\n```markdown\n<!--\nPresenter Notes:\n- Walk through the primary bottleneck when scaling database writes under high concurrency.\n- Cold-call: \"Alex, if traffic spikes 10x in 1 minute, which subsystem will experience lock contention first?\"\n- Scaffolding tip: Remind the room of the I/O saturation trade-off discussed in the previous module.\n-->\n```\n\n---\n\n## 6. MARP COMPATIBLE YAML LAYOUT HEADERS\nWhen a precise coordinate layout is specified, include the clean YAML block at the very top of the slide:\n```markdown\n<!-- layout:\n boxes:\n - id: heading\n target: h2\n pos: [80, 50, 1120, 70]\n fontSize: 2rem\n - id: col-left\n target: '.columns-2 > div:first-child'\n pos: [80, 150, 530, 510]\n - id: col-right\n target: '.columns-2 > div:last-child'\n pos: [670, 150, 530, 510]\n-->\n```\n";
205
+
206
+ export { SLIDE_DESIGN_PROMPT_CONTRACT, applySlideLayoutSchema, createSlideFromPresetSchema, executeApplySlideLayout, executeCreateSlideFromPreset, executeGenerateDeckOutline, executeListSlidePresets, executeUpdatePresenterNotes, generateDeckOutlineSchema, listSlidePresetsSchema, updatePresenterNotesSchema };