@gendive/slide 0.1.3 → 0.1.4
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/dist/devdive-slide.es.js
CHANGED
|
@@ -45,7 +45,7 @@ const k6 = [
|
|
|
45
45
|
// 8: text color
|
|
46
46
|
"#0f172a"
|
|
47
47
|
// 9: darkest
|
|
48
|
-
],
|
|
48
|
+
], j7 = y6({
|
|
49
49
|
/* @Todo vibecode - 기본 컬러 설정 */
|
|
50
50
|
primaryColor: "devdive",
|
|
51
51
|
colors: {
|
|
@@ -85,7 +85,7 @@ const k6 = [
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
}),
|
|
88
|
+
}), q7 = {
|
|
89
89
|
/* 색상 */
|
|
90
90
|
primary: "#5B6EF7",
|
|
91
91
|
bgMain: "#f4f4f5",
|
|
@@ -23772,9 +23772,9 @@ Incoming: %s`, De, "[" + a.join(", ") + "]", "[" + r.join(", ") + "]");
|
|
|
23772
23772
|
}
|
|
23773
23773
|
return [z, C];
|
|
23774
23774
|
}
|
|
23775
|
-
function
|
|
23775
|
+
function H7(r, a, f) {
|
|
23776
23776
|
}
|
|
23777
|
-
function
|
|
23777
|
+
function X7(r, a, f) {
|
|
23778
23778
|
}
|
|
23779
23779
|
function U0(r, a, f) {
|
|
23780
23780
|
var m = An, v = mo(), C, N = l();
|
|
@@ -31488,51 +31488,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
|
|
|
31488
31488
|
)
|
|
31489
31489
|
}
|
|
31490
31490
|
) });
|
|
31491
|
-
},
|
|
31492
|
-
position: "fixed",
|
|
31493
|
-
top: "50%",
|
|
31494
|
-
transform: "translateY(-50%)",
|
|
31495
|
-
zIndex: 30,
|
|
31496
|
-
width: 48,
|
|
31497
|
-
height: 48,
|
|
31498
|
-
borderRadius: "50%",
|
|
31499
|
-
backgroundColor: "rgba(255, 255, 255, 0.8)",
|
|
31500
|
-
backdropFilter: "blur(12px)",
|
|
31501
|
-
border: "1px solid var(--devdive-border-light)",
|
|
31502
|
-
boxShadow: "0 10px 25px rgba(0, 0, 0, 0.1)"
|
|
31503
|
-
}, L7 = () => {
|
|
31504
|
-
const t = Ve((h) => h.slides), e = Ve((h) => h.currentSlideIndex), n = Ve((h) => h.selectSlide), o = e > 0, i = e < t.length - 1, c = () => {
|
|
31505
|
-
o && n(e - 1);
|
|
31506
|
-
}, d = () => {
|
|
31507
|
-
i && n(e + 1);
|
|
31508
|
-
};
|
|
31509
|
-
return /* @__PURE__ */ de(Jl, { children: [
|
|
31510
|
-
/* @__PURE__ */ P($n, { label: "이전 슬라이드", position: "right", children: /* @__PURE__ */ P(
|
|
31511
|
-
cn,
|
|
31512
|
-
{
|
|
31513
|
-
variant: "subtle",
|
|
31514
|
-
color: "gray",
|
|
31515
|
-
size: "xl",
|
|
31516
|
-
onClick: c,
|
|
31517
|
-
disabled: !o,
|
|
31518
|
-
style: { ...Dx, left: 24 },
|
|
31519
|
-
children: /* @__PURE__ */ P("span", { className: "material-symbols-outlined", children: "chevron_left" })
|
|
31520
|
-
}
|
|
31521
|
-
) }),
|
|
31522
|
-
/* @__PURE__ */ P($n, { label: "다음 슬라이드", position: "left", children: /* @__PURE__ */ P(
|
|
31523
|
-
cn,
|
|
31524
|
-
{
|
|
31525
|
-
variant: "subtle",
|
|
31526
|
-
color: "gray",
|
|
31527
|
-
size: "xl",
|
|
31528
|
-
onClick: d,
|
|
31529
|
-
disabled: !i,
|
|
31530
|
-
style: { ...Dx, right: 24 },
|
|
31531
|
-
children: /* @__PURE__ */ P("span", { className: "material-symbols-outlined", children: "chevron_right" })
|
|
31532
|
-
}
|
|
31533
|
-
) })
|
|
31534
|
-
] });
|
|
31535
|
-
}, BA = 142, hv = 80, k7 = 960, ln = BA / k7, N7 = ({ element: t, scale: e }) => {
|
|
31491
|
+
}, BA = 142, hv = 80, L7 = 960, ln = BA / L7, k7 = ({ element: t, scale: e }) => {
|
|
31536
31492
|
const [n] = b7(t.src);
|
|
31537
31493
|
return n ? /* @__PURE__ */ P(
|
|
31538
31494
|
DA,
|
|
@@ -31545,7 +31501,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
|
|
|
31545
31501
|
rotation: t.rotation
|
|
31546
31502
|
}
|
|
31547
31503
|
) : null;
|
|
31548
|
-
},
|
|
31504
|
+
}, N7 = ({ slide: t }) => {
|
|
31549
31505
|
const e = Lx(() => t.elements.map((n) => {
|
|
31550
31506
|
if (n.type === "text") {
|
|
31551
31507
|
const o = n;
|
|
@@ -31656,14 +31612,14 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
|
|
|
31656
31612
|
return null;
|
|
31657
31613
|
}
|
|
31658
31614
|
} else if (n.type === "image")
|
|
31659
|
-
return /* @__PURE__ */ P(
|
|
31615
|
+
return /* @__PURE__ */ P(k7, { element: n, scale: ln }, n.id);
|
|
31660
31616
|
return null;
|
|
31661
31617
|
}), [t.elements]);
|
|
31662
31618
|
return /* @__PURE__ */ P(I5, { width: BA, height: hv, children: /* @__PURE__ */ de(F5, { children: [
|
|
31663
31619
|
/* @__PURE__ */ P(oa, { x: 0, y: 0, width: BA, height: hv, fill: t.background }),
|
|
31664
31620
|
e
|
|
31665
31621
|
] }) });
|
|
31666
|
-
},
|
|
31622
|
+
}, P7 = () => {
|
|
31667
31623
|
const t = Ve((p) => p.slides), e = Ve((p) => p.currentSlideIndex), n = Ve((p) => p.selectSlide), o = Ve((p) => p.addSlide), i = Ve((p) => p.deleteSlide), [c, d] = at(null), h = (p, u) => {
|
|
31668
31624
|
p.stopPropagation(), t.length > 1 && i(u);
|
|
31669
31625
|
};
|
|
@@ -31724,7 +31680,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
|
|
|
31724
31680
|
boxShadow: e === u ? "0 0 0 4px rgba(91, 110, 247, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1)" : void 0,
|
|
31725
31681
|
transition: "all 150ms ease"
|
|
31726
31682
|
},
|
|
31727
|
-
children: /* @__PURE__ */ P(
|
|
31683
|
+
children: /* @__PURE__ */ P(N7, { slide: p })
|
|
31728
31684
|
}
|
|
31729
31685
|
)
|
|
31730
31686
|
]
|
|
@@ -31754,7 +31710,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
|
|
|
31754
31710
|
] }) })
|
|
31755
31711
|
}
|
|
31756
31712
|
);
|
|
31757
|
-
},
|
|
31713
|
+
}, M7 = () => {
|
|
31758
31714
|
const [t, e] = at(!1), n = Ve((R) => R.slides), o = Ve((R) => R.currentSlideIndex), i = Ve((R) => R.selectedElementId), c = Ve((R) => R.updateElement), d = Ve((R) => R.updateSlideBackground), h = Ve((R) => R.bringToFront), p = Ve((R) => R.sendToBack), u = Ve((R) => R.bringForward), A = Ve((R) => R.sendBackward), y = Ve((R) => R.copyElement), x = Ve((R) => R.commitElementUpdate), S = n[o], w = i ? S.elements.find((R) => R.id === i) : null;
|
|
31759
31715
|
if (t)
|
|
31760
31716
|
return /* @__PURE__ */ P(At, { w: 40, bg: "white", py: "md", style: { borderLeft: "1px solid var(--devdive-border-light)" }, children: /* @__PURE__ */ P(dr, { align: "center", children: /* @__PURE__ */ P($n, { label: "속성 패널 펼치기", position: "left", children: /* @__PURE__ */ P(cn, { variant: "subtle", color: "gray", onClick: () => e(!1), children: /* @__PURE__ */ P("span", { className: "material-symbols-outlined", children: "chevron_left" }) }) }) }) });
|
|
@@ -31822,12 +31778,12 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
|
|
|
31822
31778
|
}
|
|
31823
31779
|
)
|
|
31824
31780
|
] }),
|
|
31825
|
-
/* @__PURE__ */ P(
|
|
31826
|
-
w.type === "text" && /* @__PURE__ */ P(
|
|
31827
|
-
w.type === "shape" && /* @__PURE__ */ P(
|
|
31828
|
-
w.type === "image" && /* @__PURE__ */ P(
|
|
31781
|
+
/* @__PURE__ */ P(B7, { element: w, onUpdate: E, onStartEdit: x }),
|
|
31782
|
+
w.type === "text" && /* @__PURE__ */ P(z7, { element: w, onUpdate: E, onStartEdit: x }),
|
|
31783
|
+
w.type === "shape" && /* @__PURE__ */ P(F7, { element: w, onUpdate: E, onStartEdit: x }),
|
|
31784
|
+
w.type === "image" && /* @__PURE__ */ P(I7, { element: w, onUpdate: E, onStartEdit: x })
|
|
31829
31785
|
] });
|
|
31830
|
-
},
|
|
31786
|
+
}, B7 = ({
|
|
31831
31787
|
element: t,
|
|
31832
31788
|
onUpdate: e,
|
|
31833
31789
|
onStartEdit: n
|
|
@@ -31974,7 +31930,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
|
|
|
31974
31930
|
)
|
|
31975
31931
|
] })
|
|
31976
31932
|
] });
|
|
31977
|
-
},
|
|
31933
|
+
}, z7 = ({
|
|
31978
31934
|
element: t,
|
|
31979
31935
|
onUpdate: e,
|
|
31980
31936
|
onStartEdit: n
|
|
@@ -32021,7 +31977,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
|
|
|
32021
31977
|
}
|
|
32022
31978
|
)
|
|
32023
31979
|
] })
|
|
32024
|
-
] }),
|
|
31980
|
+
] }), F7 = ({
|
|
32025
31981
|
element: t,
|
|
32026
31982
|
onUpdate: e,
|
|
32027
31983
|
onStartEdit: n
|
|
@@ -32134,7 +32090,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
|
|
|
32134
32090
|
] })
|
|
32135
32091
|
] })
|
|
32136
32092
|
] });
|
|
32137
|
-
},
|
|
32093
|
+
}, I7 = ({
|
|
32138
32094
|
element: t,
|
|
32139
32095
|
onUpdate: e,
|
|
32140
32096
|
onStartEdit: n
|
|
@@ -32262,7 +32218,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
|
|
|
32262
32218
|
)
|
|
32263
32219
|
] })
|
|
32264
32220
|
] });
|
|
32265
|
-
},
|
|
32221
|
+
}, O7 = () => {
|
|
32266
32222
|
const [t, e] = at(!1), [n, o] = at([]), [i, c] = at(""), [d, h] = at(!1), [p, u] = at([]), [A, y] = at(-1), [x, S] = at({ x: 0, y: 0 }), [w, E] = at(!1), R = Rn({ x: 0, y: 0, posX: 0, posY: 0 }), T = Rn(null), M = Rn(null), B = Rn(null), { generateSlideContent: I } = IA(), F = Ve((K) => K.slides), Y = Ve((K) => K.currentSlideIndex), q = Ve((K) => K.updateElement), j = F[Y];
|
|
32267
32223
|
er(() => {
|
|
32268
32224
|
T.current && t && T.current.scrollTo({ top: T.current.scrollHeight, behavior: "smooth" });
|
|
@@ -32448,7 +32404,7 @@ ${Ee.join(`
|
|
|
32448
32404
|
] })
|
|
32449
32405
|
] }) }),
|
|
32450
32406
|
/* @__PURE__ */ P(Kl, { h: 200, px: "sm", py: "xs", viewportRef: T, children: /* @__PURE__ */ de(dr, { gap: "xs", children: [
|
|
32451
|
-
n.map((K) => /* @__PURE__ */ P(
|
|
32407
|
+
n.map((K) => /* @__PURE__ */ P(U7, { message: K }, K.id)),
|
|
32452
32408
|
d && /* @__PURE__ */ P(At, { children: /* @__PURE__ */ P(ji, { px: "xs", py: 4, radius: "md", bg: "gray.1", style: { display: "inline-block" }, children: /* @__PURE__ */ de(wt, { gap: "xs", children: [
|
|
32453
32409
|
/* @__PURE__ */ P(
|
|
32454
32410
|
"span",
|
|
@@ -32567,7 +32523,7 @@ ${Ee.join(`
|
|
|
32567
32523
|
]
|
|
32568
32524
|
}
|
|
32569
32525
|
);
|
|
32570
|
-
},
|
|
32526
|
+
}, U7 = ({ message: t }) => {
|
|
32571
32527
|
const e = t.role === "user";
|
|
32572
32528
|
return /* @__PURE__ */ P(At, { style: { textAlign: e ? "right" : "left" }, children: /* @__PURE__ */ P(
|
|
32573
32529
|
ji,
|
|
@@ -32584,7 +32540,7 @@ ${Ee.join(`
|
|
|
32584
32540
|
children: /* @__PURE__ */ P(pt, { size: "xs", style: { whiteSpace: "pre-wrap", lineHeight: 1.4 }, children: t.content })
|
|
32585
32541
|
}
|
|
32586
32542
|
) });
|
|
32587
|
-
},
|
|
32543
|
+
}, G7 = () => {
|
|
32588
32544
|
const t = Ve((p) => p.copyElement), e = Ve((p) => p.pasteElement), n = Ve((p) => p.deleteElement), o = Ve((p) => p.selectedElementId), i = Ve((p) => p.bringToFront), c = Ve((p) => p.sendToBack), d = Ve((p) => p.undo), h = Ve((p) => p.redo);
|
|
32589
32545
|
er(() => {
|
|
32590
32546
|
const p = (u) => {
|
|
@@ -32596,7 +32552,7 @@ ${Ee.join(`
|
|
|
32596
32552
|
};
|
|
32597
32553
|
return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
|
|
32598
32554
|
}, [t, e, n, o, i, c, d, h]);
|
|
32599
|
-
},
|
|
32555
|
+
}, i_ = () => (G7(), /* @__PURE__ */ de(v2, { direction: "column", h: "100%", c: "slate.8", children: [
|
|
32600
32556
|
/* @__PURE__ */ P(xw, {}),
|
|
32601
32557
|
/* @__PURE__ */ de(v2, { flex: 1, style: { overflow: "hidden" }, children: [
|
|
32602
32558
|
/* @__PURE__ */ de(
|
|
@@ -32610,36 +32566,79 @@ ${Ee.join(`
|
|
|
32610
32566
|
children: [
|
|
32611
32567
|
/* @__PURE__ */ P(zw, {}),
|
|
32612
32568
|
/* @__PURE__ */ P(At, { flex: 1, style: { overflow: "hidden" }, children: /* @__PURE__ */ P(D7, {}) }),
|
|
32613
|
-
/* @__PURE__ */ P(
|
|
32614
|
-
/* @__PURE__ */ P(U7, {})
|
|
32569
|
+
/* @__PURE__ */ P(O7, {})
|
|
32615
32570
|
]
|
|
32616
32571
|
}
|
|
32617
32572
|
),
|
|
32618
|
-
/* @__PURE__ */ P(
|
|
32573
|
+
/* @__PURE__ */ P(M7, {})
|
|
32619
32574
|
] }),
|
|
32620
|
-
/* @__PURE__ */ P(
|
|
32621
|
-
] }))
|
|
32575
|
+
/* @__PURE__ */ P(P7, {})
|
|
32576
|
+
] })), Dx = {
|
|
32577
|
+
position: "fixed",
|
|
32578
|
+
top: "50%",
|
|
32579
|
+
transform: "translateY(-50%)",
|
|
32580
|
+
zIndex: 30,
|
|
32581
|
+
width: 48,
|
|
32582
|
+
height: 48,
|
|
32583
|
+
borderRadius: "50%",
|
|
32584
|
+
backgroundColor: "rgba(255, 255, 255, 0.8)",
|
|
32585
|
+
backdropFilter: "blur(12px)",
|
|
32586
|
+
border: "1px solid var(--devdive-border-light)",
|
|
32587
|
+
boxShadow: "0 10px 25px rgba(0, 0, 0, 0.1)"
|
|
32588
|
+
}, o_ = () => {
|
|
32589
|
+
const t = Ve((h) => h.slides), e = Ve((h) => h.currentSlideIndex), n = Ve((h) => h.selectSlide), o = e > 0, i = e < t.length - 1, c = () => {
|
|
32590
|
+
o && n(e - 1);
|
|
32591
|
+
}, d = () => {
|
|
32592
|
+
i && n(e + 1);
|
|
32593
|
+
};
|
|
32594
|
+
return /* @__PURE__ */ de(Jl, { children: [
|
|
32595
|
+
/* @__PURE__ */ P($n, { label: "이전 슬라이드", position: "right", children: /* @__PURE__ */ P(
|
|
32596
|
+
cn,
|
|
32597
|
+
{
|
|
32598
|
+
variant: "subtle",
|
|
32599
|
+
color: "gray",
|
|
32600
|
+
size: "xl",
|
|
32601
|
+
onClick: c,
|
|
32602
|
+
disabled: !o,
|
|
32603
|
+
style: { ...Dx, left: 24 },
|
|
32604
|
+
children: /* @__PURE__ */ P("span", { className: "material-symbols-outlined", children: "chevron_left" })
|
|
32605
|
+
}
|
|
32606
|
+
) }),
|
|
32607
|
+
/* @__PURE__ */ P($n, { label: "다음 슬라이드", position: "left", children: /* @__PURE__ */ P(
|
|
32608
|
+
cn,
|
|
32609
|
+
{
|
|
32610
|
+
variant: "subtle",
|
|
32611
|
+
color: "gray",
|
|
32612
|
+
size: "xl",
|
|
32613
|
+
onClick: d,
|
|
32614
|
+
disabled: !i,
|
|
32615
|
+
style: { ...Dx, right: 24 },
|
|
32616
|
+
children: /* @__PURE__ */ P("span", { className: "material-symbols-outlined", children: "chevron_right" })
|
|
32617
|
+
}
|
|
32618
|
+
) })
|
|
32619
|
+
] });
|
|
32620
|
+
};
|
|
32622
32621
|
export {
|
|
32623
|
-
|
|
32622
|
+
i_ as Editor,
|
|
32624
32623
|
zw as FloatingToolbar,
|
|
32625
32624
|
xw as Header,
|
|
32626
32625
|
T7 as ImageNode,
|
|
32627
32626
|
Px as LAYOUT_TEMPLATES,
|
|
32628
|
-
|
|
32627
|
+
M7 as PropertiesPanel,
|
|
32629
32628
|
_7 as ShapeNode,
|
|
32630
32629
|
D7 as SlideCanvas,
|
|
32631
|
-
|
|
32632
|
-
|
|
32630
|
+
o_ as SlideNavigation,
|
|
32631
|
+
P7 as SlideThumbnails,
|
|
32633
32632
|
Xf as TEXT_STYLE_PRESETS,
|
|
32634
32633
|
fs as THEME_PRESETS,
|
|
32635
32634
|
QS as TemplateGallery,
|
|
32636
32635
|
S7 as TextNode,
|
|
32637
32636
|
f7 as calculateSnap,
|
|
32638
|
-
|
|
32637
|
+
j7 as devdiveTheme,
|
|
32639
32638
|
Vi as generateId,
|
|
32640
32639
|
XS as generatePptx,
|
|
32641
32640
|
b2 as getLayoutTemplate,
|
|
32642
|
-
|
|
32641
|
+
q7 as themeVars,
|
|
32643
32642
|
Ve as useEditorStore
|
|
32644
32643
|
};
|
|
32645
32644
|
//# sourceMappingURL=devdive-slide.es.js.map
|