@thanh01.pmt/presentation-kit 0.2.0 → 0.2.2

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.
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkO4Y3VEOA_cjs = require('../chunk-O4Y3VEOA.cjs');
3
+ var chunkVLAPHJOC_cjs = require('../chunk-VLAPHJOC.cjs');
4
+ var chunkOEAOYF7C_cjs = require('../chunk-OEAOYF7C.cjs');
4
5
  var react = require('react');
5
6
  var jsxRuntime = require('react/jsx-runtime');
6
7
 
@@ -20,7 +21,7 @@ function useSlideState(options) {
20
21
  const result = react.useMemo(() => {
21
22
  if (!markdown || !markdown.trim()) return null;
22
23
  renderCountRef.current++;
23
- return chunkO4Y3VEOA_cjs.renderSlide(markdown, {
24
+ return chunkVLAPHJOC_cjs.renderSlide(markdown, {
24
25
  theme,
25
26
  enableMermaid: true,
26
27
  enableClicks,
@@ -760,6 +761,32 @@ function SlideDesignOverlay({
760
761
  children: "+ \u0110o\u1EA1n v\u0103n (P)"
761
762
  }
762
763
  ),
764
+ /* @__PURE__ */ jsxRuntime.jsxs(
765
+ "select",
766
+ {
767
+ onChange: (e) => {
768
+ const preset = chunkOEAOYF7C_cjs.SLIDE_LAYOUT_PRESETS.find((p) => p.id === e.target.value);
769
+ if (preset) {
770
+ const clonedBoxes = JSON.parse(JSON.stringify(preset.layout.boxes));
771
+ setBoxes(clonedBoxes);
772
+ onLayoutChange({ boxes: clonedBoxes });
773
+ }
774
+ },
775
+ defaultValue: "",
776
+ style: {
777
+ ...toolbarButtonStyle,
778
+ cursor: "pointer",
779
+ outline: "none",
780
+ color: "#f8fafc",
781
+ border: "1px solid rgba(56, 189, 248, 0.3)"
782
+ },
783
+ title: "\xC1p d\u1EE5ng m\u1EABu b\u1ED1 c\u1EE5c c\xF3 s\u1EB5n",
784
+ children: [
785
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, style: { backgroundColor: "#1e1f29", color: "#94a3b8" }, children: "M\u1EABu b\u1ED1 c\u1EE5c (Presets)..." }),
786
+ chunkOEAOYF7C_cjs.SLIDE_LAYOUT_PRESETS.map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.id, style: { backgroundColor: "#1e1f29", color: "#f8fafc" }, children: p.name }, p.id))
787
+ ]
788
+ }
789
+ ),
763
790
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "1px", height: "16px", backgroundColor: "rgba(255,255,255,0.2)" } }),
764
791
  onSave && /* @__PURE__ */ jsxRuntime.jsx(
765
792
  "button",
@@ -1186,7 +1213,7 @@ function SlideViewer({
1186
1213
  containers.forEach((container) => {
1187
1214
  if (container instanceof HTMLElement) {
1188
1215
  const themeName2 = typeof theme === "string" ? theme : "dark";
1189
- chunkO4Y3VEOA_cjs.renderMermaidDiagrams(container, themeName2).catch(() => {
1216
+ chunkVLAPHJOC_cjs.renderMermaidDiagrams(container, themeName2).catch(() => {
1190
1217
  });
1191
1218
  }
1192
1219
  });
@@ -1403,7 +1430,7 @@ function SlideViewer({
1403
1430
  onSave: (layout) => {
1404
1431
  setLiveLayout(layout);
1405
1432
  if (onSaveMarkdown) {
1406
- const updated = chunkO4Y3VEOA_cjs.updateSlideLayoutInMarkdown(markdown, currentIndex, layout);
1433
+ const updated = chunkOEAOYF7C_cjs.updateSlideLayoutInMarkdown(markdown, currentIndex, layout);
1407
1434
  onSaveMarkdown(updated);
1408
1435
  }
1409
1436
  },
@@ -1439,35 +1466,35 @@ function SlideViewer({
1439
1466
 
1440
1467
  Object.defineProperty(exports, "defineTheme", {
1441
1468
  enumerable: true,
1442
- get: function () { return chunkO4Y3VEOA_cjs.defineTheme; }
1469
+ get: function () { return chunkVLAPHJOC_cjs.defineTheme; }
1443
1470
  });
1444
1471
  Object.defineProperty(exports, "extractMaxClicks", {
1445
1472
  enumerable: true,
1446
- get: function () { return chunkO4Y3VEOA_cjs.extractMaxClicks; }
1473
+ get: function () { return chunkVLAPHJOC_cjs.extractMaxClicks; }
1447
1474
  });
1448
1475
  Object.defineProperty(exports, "generateClickCss", {
1449
1476
  enumerable: true,
1450
- get: function () { return chunkO4Y3VEOA_cjs.generateClickCss; }
1477
+ get: function () { return chunkVLAPHJOC_cjs.generateClickCss; }
1451
1478
  });
1452
1479
  Object.defineProperty(exports, "postprocessClicks", {
1453
1480
  enumerable: true,
1454
- get: function () { return chunkO4Y3VEOA_cjs.postprocessClicks; }
1481
+ get: function () { return chunkVLAPHJOC_cjs.postprocessClicks; }
1455
1482
  });
1456
1483
  Object.defineProperty(exports, "preprocessClicks", {
1457
1484
  enumerable: true,
1458
- get: function () { return chunkO4Y3VEOA_cjs.preprocessClicks; }
1485
+ get: function () { return chunkVLAPHJOC_cjs.preprocessClicks; }
1459
1486
  });
1460
1487
  Object.defineProperty(exports, "renderSlide", {
1461
1488
  enumerable: true,
1462
- get: function () { return chunkO4Y3VEOA_cjs.renderSlide; }
1489
+ get: function () { return chunkVLAPHJOC_cjs.renderSlide; }
1463
1490
  });
1464
1491
  Object.defineProperty(exports, "renderSlideAsync", {
1465
1492
  enumerable: true,
1466
- get: function () { return chunkO4Y3VEOA_cjs.renderSlideAsync; }
1493
+ get: function () { return chunkVLAPHJOC_cjs.renderSlideAsync; }
1467
1494
  });
1468
1495
  Object.defineProperty(exports, "resolveTheme", {
1469
1496
  enumerable: true,
1470
- get: function () { return chunkO4Y3VEOA_cjs.resolveTheme; }
1497
+ get: function () { return chunkVLAPHJOC_cjs.resolveTheme; }
1471
1498
  });
1472
1499
  exports.DeckView = DeckView;
1473
1500
  exports.NavigationBar = NavigationBar;