@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
|
@@ -8050,7 +8050,7 @@ function c1() {
|
|
|
8050
8050
|
});
|
|
8051
8051
|
}
|
|
8052
8052
|
function e() {
|
|
8053
|
-
return ($t.DOMPurify ? Promise.resolve($t.DOMPurify) : import("./purify.es-
|
|
8053
|
+
return ($t.DOMPurify ? Promise.resolve($t.DOMPurify) : import("./purify.es-B0KlbA1O.js")).catch(function(u) {
|
|
8054
8054
|
return Promise.reject(new Error("Could not load dompurify: " + u));
|
|
8055
8055
|
}).then(function(u) {
|
|
8056
8056
|
return u.default ? u.default : u;
|
|
@@ -8760,7 +8760,7 @@ endobj\r
|
|
|
8760
8760
|
var d = c.getContext("2d");
|
|
8761
8761
|
d.fillStyle = "#fff", d.fillRect(0, 0, c.width, c.height);
|
|
8762
8762
|
var m = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, A = this;
|
|
8763
|
-
return ($t.canvg ? Promise.resolve($t.canvg) : import("./index.es-
|
|
8763
|
+
return ($t.canvg ? Promise.resolve($t.canvg) : import("./index.es-yTIj1Pnc.js")).catch(function(P) {
|
|
8764
8764
|
return Promise.reject(new Error("Could not load canvg: " + P));
|
|
8765
8765
|
}).then(function(P) {
|
|
8766
8766
|
return P.default ? P.default : P;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as e,
|
|
1
|
+
import { U as e, aF as o, aG as r, aH as d, aI as t, aJ as i, aK as c, aL as n, aM as h } from "./index-B_V19zDs.js";
|
|
2
2
|
var s = [["path", {
|
|
3
3
|
d: "m14 12 4 4 4-4",
|
|
4
4
|
key: "buelq4"
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { F as I, G as L, H as j, P as x, I as v, J as A, K as P } from "./index-B_V19zDs.js";
|
|
2
|
+
function G(u, w) {
|
|
3
|
+
const h = x[w || "minimalist"] || x.minimalist, c = u.split(`
|
|
4
|
+
`), f = [];
|
|
5
|
+
let t = null, m = [], p = !1;
|
|
6
|
+
const g = (e) => {
|
|
7
|
+
t || s(""), (t.notes ??= []).push(e);
|
|
8
|
+
}, d = () => {
|
|
9
|
+
p = !1, t && (m.length > 0 && !t.bullets?.length && !t.body && !t.quoteText && (t.body = m.join(`
|
|
10
|
+
`).trim()), m = [], f.push(t), t = null);
|
|
11
|
+
}, s = (e, o = "content") => {
|
|
12
|
+
d(), t = { title: e, type: o };
|
|
13
|
+
};
|
|
14
|
+
for (let e = 0; e < c.length; e++) {
|
|
15
|
+
const o = c[e], n = o.trim();
|
|
16
|
+
if (n.startsWith("<!--")) {
|
|
17
|
+
const i = [n.slice(4)];
|
|
18
|
+
for (; !i[i.length - 1].includes("-->") && e + 1 < c.length; ) i.push(c[++e].trim());
|
|
19
|
+
const a = i.length - 1;
|
|
20
|
+
i[a] = i[a].slice(0, i[a].includes("-->") ? i[a].indexOf("-->") : void 0);
|
|
21
|
+
const r = i.join(`
|
|
22
|
+
`).trim();
|
|
23
|
+
r && g(r);
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (/^---+\s*$/.test(n)) {
|
|
27
|
+
d();
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const l = n.match(/^#\s+(.+)$/);
|
|
31
|
+
if (l) {
|
|
32
|
+
f.length === 0 && !t ? s(l[1], "title") : s(l[1]);
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
const b = n.match(/^##\s+(.+)$/);
|
|
36
|
+
if (b) {
|
|
37
|
+
s(b[1]);
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const y = n.match(/^notes?:\s*(.*)$/i);
|
|
41
|
+
if (y) {
|
|
42
|
+
y[1] ? g(y[1]) : t || s(""), p = !0;
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (p) {
|
|
46
|
+
g(o.trimEnd());
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const $ = n.match(/^###\s+(.+)$/);
|
|
50
|
+
if ($) {
|
|
51
|
+
t ? m.push($[1]) : s($[1]);
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const k = n.match(/^>\s*(.+)$/);
|
|
55
|
+
if (k) {
|
|
56
|
+
const i = [k[1]];
|
|
57
|
+
for (; e + 1 < c.length && /^>\s*/.test(c[e + 1].trim()); )
|
|
58
|
+
e++, i.push(c[e].trim().replace(/^>\s*/, ""));
|
|
59
|
+
const a = i.join(" ").trim(), r = a.match(/^(.+?)\s*[—–-]{1,2}\s*(.+)$/);
|
|
60
|
+
t && t.type !== "title" && d(), t || (t = { title: "", type: "quote" }), r ? (t.type = "quote", t.quoteText = r[1].trim(), t.quoteAttribution = r[2].trim()) : (t.type = "quote", t.quoteText = a);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
const T = n.match(/^[-*]\s+(.+)$/);
|
|
64
|
+
if (T) {
|
|
65
|
+
t || s(""), t.bullets || (t.bullets = []), t.bullets.push(E(T[1]));
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const S = n.match(/^\d+\.\s+(.+)$/);
|
|
69
|
+
if (S) {
|
|
70
|
+
t || s(""), t.bullets || (t.bullets = []), t.bullets.push(E(S[1]));
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
n !== "" && (t || s(""), m.push(E(n)));
|
|
74
|
+
}
|
|
75
|
+
d(), f.length === 0 && f.push({ title: "Untitled", type: "content", body: u.trim() });
|
|
76
|
+
const C = 2e3, q = [], M = [];
|
|
77
|
+
return f.forEach((e, o) => {
|
|
78
|
+
const n = o * C;
|
|
79
|
+
let l;
|
|
80
|
+
switch (e.type) {
|
|
81
|
+
case "title":
|
|
82
|
+
l = v(e.title, e.body || e.bullets?.[0], h);
|
|
83
|
+
break;
|
|
84
|
+
case "quote":
|
|
85
|
+
l = j(e.quoteText || "", e.quoteAttribution, h);
|
|
86
|
+
break;
|
|
87
|
+
case "closing":
|
|
88
|
+
l = L(e.title, e.body, h);
|
|
89
|
+
break;
|
|
90
|
+
default:
|
|
91
|
+
l = I(e.title, e.bullets, e.body, h);
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
const b = A(l, n, 0);
|
|
95
|
+
q.push(...b), M.push({
|
|
96
|
+
id: P("slide"),
|
|
97
|
+
name: e.title || `Slide ${o + 1}`,
|
|
98
|
+
spatialPosition: { x: n, y: 0 },
|
|
99
|
+
dimensions: { width: 1920, height: 1080 },
|
|
100
|
+
order: o,
|
|
101
|
+
backgroundColor: h.background,
|
|
102
|
+
..._(e.notes) && { notes: _(e.notes) }
|
|
103
|
+
});
|
|
104
|
+
}), {
|
|
105
|
+
version: 4,
|
|
106
|
+
metadata: { name: "Markdown Import", docType: "slides" },
|
|
107
|
+
elements: q,
|
|
108
|
+
layers: [{ id: "default-layer", name: "Layer 1", visible: !0, locked: !1, opacity: 1, order: 0, backgroundColor: "transparent" }],
|
|
109
|
+
slides: M,
|
|
110
|
+
globalSettings: {}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function _(u) {
|
|
114
|
+
return (u ?? []).join(`
|
|
115
|
+
`).replace(/^\s*\n/, "").trimEnd();
|
|
116
|
+
}
|
|
117
|
+
function E(u) {
|
|
118
|
+
return u.replace(/\*\*(.+?)\*\*/g, "$1").replace(/__(.+?)__/g, "$1").replace(/\*(.+?)\*/g, "$1").replace(/_(.+?)_/g, "$1").replace(/`(.+?)`/g, "$1").replace(/\[(.+?)\]\(.+?\)/g, "$1").trim();
|
|
119
|
+
}
|
|
120
|
+
export {
|
|
121
|
+
G as parseMarkdownToSlides
|
|
122
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Q as T, R as it, S as nt, T as st, U as x, s as V, V as h, W as A, X as S, Y as g, Z as v, _ as at, $ as lt, a0 as C } from "./index-
|
|
1
|
+
import { Q as T, R as it, S as nt, T as st, U as x, s as V, V as h, W as A, X as S, Y as g, Z as v, _ as at, $ as lt, a0 as C } from "./index-B_V19zDs.js";
|
|
2
2
|
var ct = /* @__PURE__ */ C("<svg><rect rx=10 fill=black></svg>", !1, !0, !1), ut = /* @__PURE__ */ C("<div class=tour-spotlight-ring>"), dt = /* @__PURE__ */ C('<div class=tour-overlay role=dialog aria-modal=true aria-label="Product tour"><svg class=tour-mask width=100% height=100%><defs><mask id=tour-spotlight><rect width=100% height=100% fill=white></rect></mask></defs><rect width=100% height=100% fill=rgba(0,0,0,0.6) mask=url(#tour-spotlight)></rect></svg><div class=tour-tooltip><div class=tour-tooltip-head><span class=tour-step-count> of </span><button class=tour-skip>Skip tour</button></div><h3 class=tour-title></h3><p class=tour-content></p><div class=tour-nav><button class="tour-btn tour-btn-secondary">Back</button><button class="tour-btn tour-btn-primary"></button></div><div class=tour-dots>'), ht = /* @__PURE__ */ C("<button class=tour-dot>");
|
|
3
3
|
const Z = "yappy:tour:seen", L = [{
|
|
4
4
|
id: "welcome",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as S, M as C, N as $ } from "./index-
|
|
1
|
+
import { L as S, M as C, N as $ } from "./index-B_V19zDs.js";
|
|
2
2
|
import { p as E, i as P, a as D, c as T } from "./pdf-cmyk-CqVZV2FF.js";
|
|
3
3
|
const b = (t, i) => {
|
|
4
4
|
for (let n = t; n; n = n.parentElement) {
|
|
@@ -135,7 +135,7 @@ const b = (t, i) => {
|
|
|
135
135
|
const [e, s, u, f = "1"] = r[1].split(",").map((a) => a.trim());
|
|
136
136
|
return parseFloat(f) === 0 ? null : "#" + [e, s, u].map((a) => (+a).toString(16).padStart(2, "0")).join("");
|
|
137
137
|
}, z = async (t, i, n, r, e) => {
|
|
138
|
-
const [{ jsPDF: s }, { svg2pdf: u }] = await Promise.all([import("./jspdf.es.min-
|
|
138
|
+
const [{ jsPDF: s }, { svg2pdf: u }] = await Promise.all([import("./jspdf.es.min-DFBFqtMo.js").then((c) => c.j), import("./svg2pdf.es.min-4O9RYeoT.js")]), f = r[0], a = new s({
|
|
139
139
|
orientation: f.width >= f.height ? "landscape" : "portrait",
|
|
140
140
|
unit: "px",
|
|
141
141
|
format: [f.width, f.height],
|