@thanh01.pmt/presentation-kit 0.2.13 → 0.2.14

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Tony Pham
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/ai/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk53GLUCYC_cjs = require('../chunk-53GLUCYC.cjs');
3
+ var chunkJIIUW2TN_cjs = require('../chunk-JIIUW2TN.cjs');
4
4
  var zod = require('zod');
5
5
 
6
6
  var listSlidePresetsSchema = zod.z.object({
@@ -64,7 +64,7 @@ var generateDeckOutlineSchema = zod.z.object({
64
64
  // src/ai/tools.ts
65
65
  function executeListSlidePresets(params) {
66
66
  const category = params?.category;
67
- const presets = !category || category === "all" ? chunk53GLUCYC_cjs.SLIDE_LAYOUT_PRESETS : chunk53GLUCYC_cjs.getSlideLayoutPresetsByCategory(category);
67
+ const presets = !category || category === "all" ? chunkJIIUW2TN_cjs.SLIDE_LAYOUT_PRESETS : chunkJIIUW2TN_cjs.getSlideLayoutPresetsByCategory(category);
68
68
  return {
69
69
  count: presets.length,
70
70
  presets: presets.map((p) => ({
@@ -78,7 +78,7 @@ function executeListSlidePresets(params) {
78
78
  };
79
79
  }
80
80
  function executeCreateSlideFromPreset(params) {
81
- const preset = chunk53GLUCYC_cjs.getSlideLayoutPresetById(params.presetId);
81
+ const preset = chunkJIIUW2TN_cjs.getSlideLayoutPresetById(params.presetId);
82
82
  if (!preset) {
83
83
  return {
84
84
  success: false,
@@ -86,7 +86,7 @@ function executeCreateSlideFromPreset(params) {
86
86
  error: `Preset with ID "${params.presetId}" not found. Use listSlidePresets to see available layout templates.`
87
87
  };
88
88
  }
89
- const layoutComment = chunk53GLUCYC_cjs.serializeLayoutToComment(preset.layout);
89
+ const layoutComment = chunkJIIUW2TN_cjs.serializeLayoutToComment(preset.layout);
90
90
  const title = params.title;
91
91
  const subtitle = params.subtitle ? `
92
92
  ### ${params.subtitle}` : "";
@@ -227,7 +227,7 @@ Presenter Notes:
227
227
  function executeApplySlideLayout(params) {
228
228
  let layoutData = null;
229
229
  if (params.presetId) {
230
- const preset = chunk53GLUCYC_cjs.getSlideLayoutPresetById(params.presetId);
230
+ const preset = chunkJIIUW2TN_cjs.getSlideLayoutPresetById(params.presetId);
231
231
  if (!preset) {
232
232
  return {
233
233
  success: false,
@@ -239,7 +239,7 @@ function executeApplySlideLayout(params) {
239
239
  } else if (params.boxes && params.boxes.length > 0) {
240
240
  layoutData = { boxes: params.boxes };
241
241
  }
242
- const updatedMarkdown = chunk53GLUCYC_cjs.updateSlideLayoutInMarkdown(
242
+ const updatedMarkdown = chunkJIIUW2TN_cjs.updateSlideLayoutInMarkdown(
243
243
  params.markdown,
244
244
  params.slideIndex,
245
245
  layoutData
@@ -250,7 +250,7 @@ function executeApplySlideLayout(params) {
250
250
  };
251
251
  }
252
252
  function executeUpdatePresenterNotes(params) {
253
- const { frontmatter, slides } = chunk53GLUCYC_cjs.splitMarkdownSlides(params.markdown);
253
+ const { frontmatter, slides } = chunkJIIUW2TN_cjs.splitMarkdownSlides(params.markdown);
254
254
  if (params.slideIndex < 0 || params.slideIndex >= slides.length) {
255
255
  return {
256
256
  success: false,
@@ -469,13 +469,13 @@ function validateHtmlSlideDeck(deck, strict = false) {
469
469
  slides.forEach((slide, idx) => {
470
470
  const slideNumber = idx + 1;
471
471
  const layoutId = slide.layoutId;
472
- const preset = chunk53GLUCYC_cjs.HTML_SLIDE_PRESETS[layoutId];
472
+ const preset = chunkJIIUW2TN_cjs.HTML_SLIDE_PRESETS[layoutId];
473
473
  if (!preset) {
474
474
  issues.push({
475
475
  slideIndex: slideNumber,
476
476
  severity: "error",
477
477
  rule: "INVALID_LAYOUT_PRESET",
478
- message: `Unknown layoutId "${slide.layoutId}". Available presets: ${Object.keys(chunk53GLUCYC_cjs.HTML_SLIDE_PRESETS).join(", ")}`
478
+ message: `Unknown layoutId "${slide.layoutId}". Available presets: ${Object.keys(chunkJIIUW2TN_cjs.HTML_SLIDE_PRESETS).join(", ")}`
479
479
  });
480
480
  return;
481
481
  }
@@ -624,7 +624,7 @@ function validateMarkdownSlideDeck(markdown, strict = false) {
624
624
  suggestions: ['Provide Markdown slide content delimited by "---".']
625
625
  };
626
626
  }
627
- const { slides: rawSlides } = chunk53GLUCYC_cjs.splitMarkdownSlides(markdown);
627
+ const { slides: rawSlides } = chunkJIIUW2TN_cjs.splitMarkdownSlides(markdown);
628
628
  const activeSlides = rawSlides.filter((s) => s.trim().length > 0);
629
629
  const slideCount = activeSlides.length;
630
630
  if (slideCount === 0) {
@@ -872,7 +872,7 @@ Scaffolding Tip: Compare it to ordering coffee at a counter (async buzzer) versu
872
872
  // src/ai/html/tools.ts
873
873
  function handleListHtmlSlidePresets(input) {
874
874
  const category = input.category || "all";
875
- const presets = Object.values(chunk53GLUCYC_cjs.HTML_SLIDE_PRESETS).filter((p) => category === "all" || p.category === category).map((p) => ({
875
+ const presets = Object.values(chunkJIIUW2TN_cjs.HTML_SLIDE_PRESETS).filter((p) => category === "all" || p.category === category).map((p) => ({
876
876
  id: p.id,
877
877
  name: p.name,
878
878
  category: p.category,
@@ -888,12 +888,12 @@ function handleListHtmlSlidePresets(input) {
888
888
  return {
889
889
  success: true,
890
890
  presets,
891
- availableThemes: Object.keys(chunk53GLUCYC_cjs.HTML_THEMES)
891
+ availableThemes: Object.keys(chunkJIIUW2TN_cjs.HTML_THEMES)
892
892
  };
893
893
  }
894
894
  function handleGenerateHtmlDeck(input) {
895
895
  try {
896
- const result = chunk53GLUCYC_cjs.compileHtmlDeck(input);
896
+ const result = chunkJIIUW2TN_cjs.compileHtmlDeck(input);
897
897
  return {
898
898
  success: true,
899
899
  title: result.title,
@@ -909,7 +909,7 @@ function handleGenerateHtmlDeck(input) {
909
909
  }
910
910
  }
911
911
  function handleCreateHtmlSlide(input) {
912
- const preset = chunk53GLUCYC_cjs.HTML_SLIDE_PRESETS[input.layoutId];
912
+ const preset = chunkJIIUW2TN_cjs.HTML_SLIDE_PRESETS[input.layoutId];
913
913
  if (!preset) {
914
914
  return {
915
915
  success: false,
package/dist/ai/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { SLIDE_LAYOUT_PRESETS, getSlideLayoutPresetsByCategory, getSlideLayoutPresetById, serializeLayoutToComment, updateSlideLayoutInMarkdown, splitMarkdownSlides, HTML_SLIDE_PRESETS, HTML_THEMES, compileHtmlDeck } from '../chunk-3VGV5KYZ.js';
1
+ import { SLIDE_LAYOUT_PRESETS, getSlideLayoutPresetsByCategory, getSlideLayoutPresetById, serializeLayoutToComment, updateSlideLayoutInMarkdown, splitMarkdownSlides, HTML_SLIDE_PRESETS, HTML_THEMES, compileHtmlDeck } from '../chunk-A7T5Y2G4.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  var listSlidePresetsSchema = z.object({
@@ -2233,7 +2233,7 @@ function generateHtmlShell(options) {
2233
2233
  <!-- WYSIWYG Inline Edit UI (Level 1) -->
2234
2234
  <div class="edit-hotzone" id="edit-hotzone"></div>
2235
2235
  <button class="edit-toggle" id="btn-edit-toggle" title="Toggle Inline Edit Mode (E)">
2236
- <span>\u270F\uFE0F</span>
2236
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"/><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"/></svg>
2237
2237
  <span id="edit-toggle-label">Edit Mode (E)</span>
2238
2238
  </button>
2239
2239
 
@@ -2248,7 +2248,9 @@ function generateHtmlShell(options) {
2248
2248
  <button type="button" class="mode-tab active" id="tab-mode-unified">Unified</button>
2249
2249
  <button type="button" class="mode-tab" id="tab-mode-independent">Independent</button>
2250
2250
  </div>
2251
- <button type="button" class="scale-panel-close" id="btn-scale-panel-close" title="Close Panel">\u2715</button>
2251
+ <button type="button" class="scale-panel-close" id="btn-scale-panel-close" title="Close Panel" style="display: flex; align-items: center; justify-content: center;">
2252
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
2253
+ </button>
2252
2254
  </div>
2253
2255
 
2254
2256
  <!-- Unified Mode Content -->
@@ -2298,7 +2300,10 @@ function generateHtmlShell(options) {
2298
2300
  <input type="range" id="input-scale-spacing" min="70" max="150" value="100" class="scale-range-slider" />
2299
2301
  </div>
2300
2302
  <div class="scale-independent-footer">
2301
- <button type="button" class="btn-reset-scales" id="btn-reset-scales">\u21BA Reset All</button>
2303
+ <button type="button" class="btn-reset-scales" id="btn-reset-scales" style="display: flex; align-items: center; gap: 4px;">
2304
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>
2305
+ <span>Reset All</span>
2306
+ </button>
2302
2307
  </div>
2303
2308
  </div>
2304
2309
  </div>
@@ -2311,13 +2316,22 @@ function generateHtmlShell(options) {
2311
2316
  <button class="edit-bar-btn" id="btn-format-underline" title="Underline (Cmd+U)"><u>U</u></button>
2312
2317
  <div class="edit-bar-divider"></div>
2313
2318
  <button class="edit-bar-btn" id="btn-editbar-scale" title="Tune Element Scales (Unified / Independent)">
2314
- <span>\u{1F4D0}</span>
2319
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 3 3 21"/><path d="m14 4 6 6"/><path d="m4 14 6 6"/></svg>
2315
2320
  <span>Scale</span>
2316
2321
  </button>
2317
2322
  <div class="edit-bar-divider"></div>
2318
- <button class="edit-bar-btn" id="btn-reset-edits" title="Restore original content">\u21BA Reset</button>
2319
- <button class="edit-bar-btn save-btn" id="btn-save-html" title="Save and download clean HTML file">\u{1F4BE} Save HTML</button>
2320
- <button class="edit-bar-btn" id="btn-done-edit" title="Done editing (E)">\u2715 Done</button>
2323
+ <button class="edit-bar-btn" id="btn-reset-edits" title="Restore original content">
2324
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>
2325
+ <span>Reset</span>
2326
+ </button>
2327
+ <button class="edit-bar-btn save-btn" id="btn-save-html" title="Save and download clean HTML file">
2328
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/></svg>
2329
+ <span>Save HTML</span>
2330
+ </button>
2331
+ <button class="edit-bar-btn" id="btn-done-edit" title="Done editing (E)">
2332
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>
2333
+ <span>Done</span>
2334
+ </button>
2321
2335
  </div>
2322
2336
 
2323
2337
  <!-- Presenter Drawer (Quick In-Page Notes & Timer) -->
@@ -2326,15 +2340,18 @@ function generateHtmlShell(options) {
2326
2340
  <div class="presenter-meta-group">
2327
2341
  <span style="font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #a1a1aa;">Presenter Console</span>
2328
2342
  <div class="presenter-timer-badge">
2329
- <span>\u23F1</span>
2343
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
2330
2344
  <span id="presenter-timer-text">00:00</span>
2331
2345
  </div>
2332
2346
  </div>
2333
2347
  <div style="display: flex; align-items: center; gap: 8px;">
2334
- <button type="button" class="btn-reset-scales" id="btn-open-dual-presenter" title="Open separate synced presenter console window for multi-monitor display">
2335
- <span>Launch 2nd Window \u2197</span>
2348
+ <button type="button" class="btn-reset-scales" id="btn-open-dual-presenter" title="Open separate synced presenter console window for multi-monitor display" style="display: flex; align-items: center; gap: 4px;">
2349
+ <span>Launch 2nd Window</span>
2350
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7"/><path d="M7 7h10v10"/></svg>
2351
+ </button>
2352
+ <button type="button" class="scale-panel-close" id="btn-close-presenter-drawer" title="Close Drawer (P)" style="display: flex; align-items: center; justify-content: center;">
2353
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
2336
2354
  </button>
2337
- <button type="button" class="scale-panel-close" id="btn-close-presenter-drawer" title="Close Drawer (P)">\u2715</button>
2338
2355
  </div>
2339
2356
  </div>
2340
2357
  <div class="presenter-notes-box" id="presenter-notes-text">
@@ -2354,11 +2371,14 @@ function generateHtmlShell(options) {
2354
2371
  <span style="user-select: none;">In k\xE8m ghi ch\xFA gi\u1EA3ng vi\xEAn (Handout / Teacher Notes)</span>
2355
2372
  </label>
2356
2373
  <p style="font-size: 12px; color: #a1a1aa; line-height: 1.5; margin: 0;">
2357
- \u{1F4A1} Ch\u1ECDn trang in Kh\u1ED5 ngang (Landscape), B\u1EADt "Background graphics" trong h\u1ED9p tho\u1EA1i in c\u1EE7a tr\xECnh duy\u1EC7t \u0111\u1EC3 m\xE0u s\u1EAFc hi\u1EC3n th\u1ECB \u0111\xFAng 100%.
2374
+ L\u01B0u \xFD: Ch\u1ECDn trang in Kh\u1ED5 ngang (Landscape), B\u1EADt &quot;Background graphics&quot; trong h\u1ED9p tho\u1EA1i in c\u1EE7a tr\xECnh duy\u1EC7t \u0111\u1EC3 m\xE0u s\u1EAFc hi\u1EC3n th\u1ECB \u0111\xFAng 100%.
2358
2375
  </p>
2359
2376
  <div class="print-dialog-actions">
2360
2377
  <button type="button" class="btn-reset-scales" id="btn-cancel-print">H\u1EE7y</button>
2361
- <button type="button" class="edit-bar-btn save-btn" id="btn-start-print" style="padding: 6px 16px;">\u{1F5A8}\uFE0F In ngay (Print)</button>
2378
+ <button type="button" class="edit-bar-btn save-btn" id="btn-start-print" style="padding: 6px 16px; display: flex; align-items: center; gap: 6px;">
2379
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg>
2380
+ <span>In ngay (Print)</span>
2381
+ </button>
2362
2382
  </div>
2363
2383
  </div>
2364
2384
  </div>
@@ -2382,7 +2402,7 @@ function generateHtmlShell(options) {
2382
2402
  <button class="control-btn" id="btn-controls-print" title="Print &amp; Export PDF (Cmd+P)">
2383
2403
  <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg>
2384
2404
  </button>
2385
- <button class="control-btn" id="btn-controls-scale" title="Tune Scale (\u{1F4D0})">
2405
+ <button class="control-btn" id="btn-controls-scale" title="Tune Scale">
2386
2406
  <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 3 3 21"/><path d="m14 4 6 6"/><path d="m4 14 6 6"/></svg>
2387
2407
  </button>
2388
2408
  <button class="control-btn" id="btn-fullscreen" title="Toggle Fullscreen (F)">
@@ -3442,5 +3462,5 @@ function compileHtmlDeck(deckData, options) {
3442
3462
  }
3443
3463
 
3444
3464
  export { HTML_SLIDE_PRESETS, HTML_THEMES, SLIDE_LAYOUT_PRESETS, compileHtmlDeck, generateHtmlShell, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, removeSlideElementFromMarkdown, resolveHtmlTheme, serializeLayoutToComment, splitMarkdownSlides, updateSlideLayoutInMarkdown, updateSlideTextInMarkdown };
3445
- //# sourceMappingURL=chunk-3VGV5KYZ.js.map
3446
- //# sourceMappingURL=chunk-3VGV5KYZ.js.map
3465
+ //# sourceMappingURL=chunk-A7T5Y2G4.js.map
3466
+ //# sourceMappingURL=chunk-A7T5Y2G4.js.map