@algorisys/yappydraw 0.8.293 → 0.8.295
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/README.md +2 -2
- package/chunks/{canva-ai-B5NJGMGr.js → canva-ai-kg789_jz.js} +1 -1
- package/chunks/{choice-dialog-state-Cw0WShhc.js → choice-dialog-state-ByeMPVwB.js} +1 -1
- package/chunks/{custgeom-BeeylhzV.js → custgeom-CEAI2znd.js} +13 -10
- package/chunks/{design-generator-BSZ2XUOE.js → design-generator-zF-F-iCB.js} +1 -1
- package/chunks/{drawing-engine-DfASJ_gK.js → drawing-engine-U5zBcwtj.js} +1 -1
- package/chunks/{drawings-store-cl-M93Eh.js → drawings-store-CZSZCNqP.js} +1 -1
- package/chunks/{ds-operations-CXoS_Obn.js → ds-operations-_c-HiYjk.js} +1 -1
- package/chunks/{export-game-BTjE-uv-.js → export-game-CgMvNkoa.js} +1 -1
- package/chunks/{from-yappy-hUcG5auS.js → from-yappy-Dd2p9P6N.js} +116 -97
- package/chunks/{game-runtime-33Ly0Axb.js → game-runtime-CH3yVPDc.js} +37 -37
- package/chunks/import-C3P7glRz.js +1726 -0
- package/chunks/{index-OCtbNe3Y.js → index-B_V19zDs.js} +20563 -19834
- package/chunks/{index.es-m_qpxIjM.js → index.es-yTIj1Pnc.js} +1 -1
- package/chunks/{jspdf.es.min-DGjtdWau.js → jspdf.es.min-DFBFqtMo.js} +2 -2
- package/chunks/{lucide-solid-Btzt68l9.js → lucide-solid-DfQVDBtM.js} +1 -1
- package/chunks/markdown-to-slides-B5OASdqg.js +122 -0
- package/chunks/{morph-animator-CWLzpuUc.js → morph-animator-b1aFWI5O.js} +1 -1
- package/chunks/{onboarding-tour-eLES7UJM.js → onboarding-tour-j-RhQYNM.js} +1 -1
- package/chunks/{pdf-vector-C1l03NEO.js → pdf-vector-CzrRoyPR.js} +2 -2
- package/chunks/purify.es-B0KlbA1O.js +1520 -0
- package/chunks/{search-tbh5OqVp.js → search-B7AUhYCm.js} +2 -2
- package/chunks/{slide-generator-CZfB2tSO.js → slide-generator-AO60zi1f.js} +1 -1
- package/chunks/{svg2pdf.es.min-B6z21zR3.js → svg2pdf.es.min-4O9RYeoT.js} +1 -1
- package/chunks/{turntable-ai-CeD-w_eE.js → turntable-ai-DddsPGTo.js} +1 -1
- package/chunks/write-uweO04Cm.js +265 -0
- package/package.json +1 -1
- package/yappy.js +1 -1
- package/chunks/import-Dk___UKU.js +0 -1635
- package/chunks/markdown-to-slides-CNpwNPE8.js +0 -96
- package/chunks/purify.es-C2Qa7b4C.js +0 -906
- package/chunks/write-BUtbdS9L.js +0 -212
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { F as _, G as w, H as C, P as M, I, J as L, K as x } from "./index-OCtbNe3Y.js";
|
|
2
|
-
function P(r, T) {
|
|
3
|
-
const o = M[T || "minimalist"] || M.minimalist, c = r.split(`
|
|
4
|
-
`), a = [];
|
|
5
|
-
let t = null, u = [];
|
|
6
|
-
const h = () => {
|
|
7
|
-
t && (u.length > 0 && !t.bullets?.length && !t.body && !t.quoteText && (t.body = u.join(`
|
|
8
|
-
`).trim()), u = [], a.push(t), t = null);
|
|
9
|
-
}, n = (e, s = "content") => {
|
|
10
|
-
h(), t = { title: e, type: s };
|
|
11
|
-
};
|
|
12
|
-
for (let e = 0; e < c.length; e++) {
|
|
13
|
-
const i = c[e].trim();
|
|
14
|
-
if (/^---+\s*$/.test(i)) {
|
|
15
|
-
h();
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
const l = i.match(/^#\s+(.+)$/);
|
|
19
|
-
if (l) {
|
|
20
|
-
a.length === 0 && !t ? n(l[1], "title") : n(l[1]);
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
const m = i.match(/^##\s+(.+)$/);
|
|
24
|
-
if (m) {
|
|
25
|
-
n(m[1]);
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
const f = i.match(/^###\s+(.+)$/);
|
|
29
|
-
if (f) {
|
|
30
|
-
t ? u.push(f[1]) : n(f[1]);
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
const y = i.match(/^>\s*(.+)$/);
|
|
34
|
-
if (y) {
|
|
35
|
-
const E = [y[1]];
|
|
36
|
-
for (; e + 1 < c.length && /^>\s*/.test(c[e + 1].trim()); )
|
|
37
|
-
e++, E.push(c[e].trim().replace(/^>\s*/, ""));
|
|
38
|
-
const k = E.join(" ").trim(), b = k.match(/^(.+?)\s*[—–-]{1,2}\s*(.+)$/);
|
|
39
|
-
t && t.type !== "title" && h(), t || (t = { title: "", type: "quote" }), b ? (t.type = "quote", t.quoteText = b[1].trim(), t.quoteAttribution = b[2].trim()) : (t.type = "quote", t.quoteText = k);
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
const $ = i.match(/^[-*]\s+(.+)$/);
|
|
43
|
-
if ($) {
|
|
44
|
-
t || n(""), t.bullets || (t.bullets = []), t.bullets.push(d($[1]));
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
const q = i.match(/^\d+\.\s+(.+)$/);
|
|
48
|
-
if (q) {
|
|
49
|
-
t || n(""), t.bullets || (t.bullets = []), t.bullets.push(d(q[1]));
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
i !== "" && (t || n(""), u.push(d(i)));
|
|
53
|
-
}
|
|
54
|
-
h(), a.length === 0 && a.push({ title: "Untitled", type: "content", body: r.trim() });
|
|
55
|
-
const S = 2e3, p = [], g = [];
|
|
56
|
-
return a.forEach((e, s) => {
|
|
57
|
-
const i = s * S;
|
|
58
|
-
let l;
|
|
59
|
-
switch (e.type) {
|
|
60
|
-
case "title":
|
|
61
|
-
l = I(e.title, e.body || e.bullets?.[0], o);
|
|
62
|
-
break;
|
|
63
|
-
case "quote":
|
|
64
|
-
l = C(e.quoteText || "", e.quoteAttribution, o);
|
|
65
|
-
break;
|
|
66
|
-
case "closing":
|
|
67
|
-
l = w(e.title, e.body, o);
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
l = _(e.title, e.bullets, e.body, o);
|
|
71
|
-
break;
|
|
72
|
-
}
|
|
73
|
-
const m = L(l, i, 0);
|
|
74
|
-
p.push(...m), g.push({
|
|
75
|
-
id: x("slide"),
|
|
76
|
-
name: e.title || `Slide ${s + 1}`,
|
|
77
|
-
spatialPosition: { x: i, y: 0 },
|
|
78
|
-
dimensions: { width: 1920, height: 1080 },
|
|
79
|
-
order: s,
|
|
80
|
-
backgroundColor: o.background
|
|
81
|
-
});
|
|
82
|
-
}), {
|
|
83
|
-
version: 4,
|
|
84
|
-
metadata: { name: "Markdown Import", docType: "slides" },
|
|
85
|
-
elements: p,
|
|
86
|
-
layers: [{ id: "default-layer", name: "Layer 1", visible: !0, locked: !1, opacity: 1, order: 0, backgroundColor: "transparent" }],
|
|
87
|
-
slides: g,
|
|
88
|
-
globalSettings: {}
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
function d(r) {
|
|
92
|
-
return r.replace(/\*\*(.+?)\*\*/g, "$1").replace(/__(.+?)__/g, "$1").replace(/\*(.+?)\*/g, "$1").replace(/_(.+?)_/g, "$1").replace(/`(.+?)`/g, "$1").replace(/\[(.+?)\]\(.+?\)/g, "$1").trim();
|
|
93
|
-
}
|
|
94
|
-
export {
|
|
95
|
-
P as parseMarkdownToSlides
|
|
96
|
-
};
|