@algorisys/yappydraw 0.8.294 → 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-DqccAnxC.js → canva-ai-kg789_jz.js} +1 -1
- package/chunks/{choice-dialog-state-10-yA9qy.js → choice-dialog-state-ByeMPVwB.js} +1 -1
- package/chunks/{custgeom-gp_HWEYw.js → custgeom-CEAI2znd.js} +1 -1
- package/chunks/{design-generator-DIyJ4Dr0.js → design-generator-zF-F-iCB.js} +1 -1
- package/chunks/{drawing-engine-nqE0zI8L.js → drawing-engine-U5zBcwtj.js} +1 -1
- package/chunks/{drawings-store-BFtMld-q.js → drawings-store-CZSZCNqP.js} +1 -1
- package/chunks/{ds-operations-40JYI4lM.js → ds-operations-_c-HiYjk.js} +1 -1
- package/chunks/{export-game-5Kek7Bol.js → export-game-CgMvNkoa.js} +1 -1
- package/chunks/{from-yappy-ChRzxzZ9.js → from-yappy-Dd2p9P6N.js} +29 -20
- package/chunks/{game-runtime--zmzKmmo.js → game-runtime-CH3yVPDc.js} +5 -5
- package/chunks/import-C3P7glRz.js +1726 -0
- package/chunks/{index-v2rH-W8-.js → index-B_V19zDs.js} +11038 -10929
- 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-BHWkJbay.js → lucide-solid-DfQVDBtM.js} +1 -1
- package/chunks/{markdown-to-slides-siI6fZd3.js → markdown-to-slides-B5OASdqg.js} +1 -1
- package/chunks/{morph-animator-klLNQx0a.js → morph-animator-b1aFWI5O.js} +1 -1
- package/chunks/{onboarding-tour-CV0e3oyB.js → onboarding-tour-j-RhQYNM.js} +1 -1
- package/chunks/{pdf-vector-DLxGyE10.js → pdf-vector-CzrRoyPR.js} +2 -2
- package/chunks/purify.es-B0KlbA1O.js +1520 -0
- package/chunks/{search-53sGgwDp.js → search-B7AUhYCm.js} +2 -2
- package/chunks/{slide-generator-BttJgv2N.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-7udakZBz.js → turntable-ai-DddsPGTo.js} +1 -1
- package/chunks/{write-CIGfHqn4.js → write-uweO04Cm.js} +117 -106
- package/package.json +1 -1
- package/yappy.js +1 -1
- package/chunks/import-DGbhv-Je.js +0 -1699
- package/chunks/purify.es-C2Qa7b4C.js +0 -906
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a1 as et, a2 as pt, a3 as mt, a4 as xt, a5 as gt, a6 as yt, a7 as kt, a8 as bt, a9 as G, aa as Mt, ab as wt, ac as vt, ad as St, ae as At, af as $t, ag as It, ah as Ct, ai as Tt, aj as
|
|
2
|
-
import { d as
|
|
1
|
+
import { a1 as et, a2 as pt, a3 as mt, a4 as xt, a5 as gt, a6 as yt, a7 as kt, a8 as bt, a9 as G, aa as Mt, ab as wt, ac as vt, ad as St, ae as At, af as $t, ag as It, ah as Ct, ai as Tt, aj as Ft, ak as Pt, al as zt } from "./index-B_V19zDs.js";
|
|
2
|
+
import { d as z, g as j, t as C, h as Lt } from "./custgeom-CEAI2znd.js";
|
|
3
3
|
function Et(t) {
|
|
4
4
|
const { l: n, c: e, h: r } = t, i = r * Math.PI / 180, o = e * Math.cos(i), l = e * Math.sin(i), f = n + 0.3963377774 * o + 0.2158037573 * l, s = n - 0.1055613458 * o - 0.0638541728 * l, a = n - 0.0894841775 * o - 1.291485548 * l, c = f * f * f, u = s * s * s, p = a * a * a, d = 1.2270138511 * c - 0.5577999807 * u + 0.2812561489 * p, h = -0.0405801784 * c + 1.1122568696 * u - 0.0716766787 * p, x = -0.0763812845 * c - 0.4214819787 * u + 1.5861632204 * p, g = 2.4039459 * d - 0.9898517 * h - 0.4141151 * x, k = -0.7797967 * d + 1.5445214 * h + 0.0352745 * x, m = 0.0384795 * d - 0.1141381 * h + 1.0756786 * x, y = (b) => {
|
|
5
5
|
const M = Math.abs(b), w = M > 31308e-7 ? 1.055 * Math.pow(M, 1 / 2.4) - 0.055 : 12.92 * M;
|
|
@@ -58,10 +58,10 @@ function T(t) {
|
|
|
58
58
|
}
|
|
59
59
|
return Rt(n);
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const F = /* @__PURE__ */ new Map();
|
|
62
62
|
let $;
|
|
63
63
|
function Rt(t) {
|
|
64
|
-
if (
|
|
64
|
+
if (F.has(t)) return F.get(t);
|
|
65
65
|
let n = null;
|
|
66
66
|
try {
|
|
67
67
|
if ($ === void 0) {
|
|
@@ -76,7 +76,7 @@ function Rt(t) {
|
|
|
76
76
|
} catch {
|
|
77
77
|
n = null;
|
|
78
78
|
}
|
|
79
|
-
return
|
|
79
|
+
return F.size < 512 && F.set(t, n), n;
|
|
80
80
|
}
|
|
81
81
|
const L = (t) => "#" + t.map((n) => n.toString(16).padStart(2, "0")).join("");
|
|
82
82
|
function Xt(t) {
|
|
@@ -172,13 +172,13 @@ function Wt(t, n, e, r) {
|
|
|
172
172
|
s && (o.bulletColor = s);
|
|
173
173
|
}
|
|
174
174
|
t.listMarkerScale && t.listMarkerScale !== 1 && (o.bulletScale = t.listMarkerScale);
|
|
175
|
-
const l =
|
|
175
|
+
const l = zt(t), f = r(t);
|
|
176
176
|
return o.marL = f, o.indent = l - f, o;
|
|
177
177
|
}
|
|
178
178
|
function at(t, n, e, r) {
|
|
179
179
|
const i = [];
|
|
180
180
|
let o = { runs: [], align: n }, l = !1, f = null;
|
|
181
|
-
const s =
|
|
181
|
+
const s = Ft(Yt, t, r), a = () => {
|
|
182
182
|
i.push(o), o = { runs: [], align: n }, l = !1;
|
|
183
183
|
};
|
|
184
184
|
for (const c of t)
|
|
@@ -232,7 +232,7 @@ function ft(t, n) {
|
|
|
232
232
|
}
|
|
233
233
|
function jt(t, n, e) {
|
|
234
234
|
const r = [], i = Math.abs(n) / 2, o = Math.abs(e) / 2, l = (s, a, c) => {
|
|
235
|
-
const u = C(
|
|
235
|
+
const u = C(z(s), i, o);
|
|
236
236
|
if (u.length === 0) return;
|
|
237
237
|
const p = a, d = { fill: p.noFill ? !1 : void 0, stroke: p.noStroke ? !1 : void 0 };
|
|
238
238
|
if (c) {
|
|
@@ -386,7 +386,7 @@ function Qt(t, n) {
|
|
|
386
386
|
const e = (t.opacity ?? 100) / 100, r = N(t, e, !0), i = bt(t), o = [];
|
|
387
387
|
if (r) {
|
|
388
388
|
const l = t.type === "arrow", f = l ? t.startArrowhead : null, s = l ? t.endArrowhead || (t.startArrowhead ? null : "arrow") : null, a = { ...r, head: J(f, G(t, "start"), t.strokeWidth), tail: J(s, G(t, "end"), t.strokeWidth) };
|
|
389
|
-
if (!i.d || Kt(
|
|
389
|
+
if (!i.d || Kt(z(i.d), i.start, i.end)) {
|
|
390
390
|
const { start: c, end: u } = i, p = {
|
|
391
391
|
kind: "connector",
|
|
392
392
|
id: n.nextId++,
|
|
@@ -409,7 +409,7 @@ function Qt(t, n) {
|
|
|
409
409
|
p.start = d(t.startBinding, c), p.end = d(t.endBinding, u);
|
|
410
410
|
}), o.push(p);
|
|
411
411
|
} else {
|
|
412
|
-
const c =
|
|
412
|
+
const c = z(i.d), u = j(c);
|
|
413
413
|
if (u) {
|
|
414
414
|
const p = Math.max(u.maxX - u.minX, 0.01), d = Math.max(u.maxY - u.minY, 0.01);
|
|
415
415
|
o.push({
|
|
@@ -471,7 +471,7 @@ const en = (t) => {
|
|
|
471
471
|
return e.length === 6 && e.every(Number.isFinite) ? e : [1, 0, 0, 1, 0, 0];
|
|
472
472
|
}, Q = (t, n, e) => ({ x: t[0] * n + t[2] * e + t[4], y: t[1] * n + t[3] * e + t[5] });
|
|
473
473
|
function rn(t) {
|
|
474
|
-
const n =
|
|
474
|
+
const n = Pt.generator(), e = (i) => {
|
|
475
475
|
for (const o of n.toPaths(i))
|
|
476
476
|
t.save(), o.fill && o.fill !== "none" && (!o.stroke || o.stroke === "none") ? (t.fillStyle = o.fill, t.fillPath(o.d)) : o.stroke && o.stroke !== "none" && o.strokeWidth > 0 && (t.strokeStyle = o.stroke, t.lineWidth = o.strokeWidth, t.strokePath(o.d)), t.restore();
|
|
477
477
|
return i;
|
|
@@ -540,7 +540,7 @@ function on(t) {
|
|
|
540
540
|
f = "fail";
|
|
541
541
|
return;
|
|
542
542
|
}
|
|
543
|
-
const d = en(c.getAttribute("transform")), h = Lt(
|
|
543
|
+
const d = en(c.getAttribute("transform")), h = Lt(z(p || ""), d);
|
|
544
544
|
if (!h.length) continue;
|
|
545
545
|
const x = c.getAttribute("fill"), g = c.getAttribute("stroke"), k = !!x && x.startsWith("url("), m = +(c.getAttribute("fill-opacity") ?? 1), y = +(c.getAttribute("stroke-opacity") ?? 1);
|
|
546
546
|
l.push({
|
|
@@ -637,14 +637,14 @@ function an(t, n) {
|
|
|
637
637
|
}
|
|
638
638
|
const cn = (t) => t.map((n) => n.op === "Z" ? "Z" : n.op === "C" ? `C ${n.x1} ${n.y1} ${n.x2} ${n.y2} ${n.x} ${n.y}` : `${n.op} ${n.x} ${n.y}`).join(" ");
|
|
639
639
|
let B = null;
|
|
640
|
-
const
|
|
640
|
+
const P = 28;
|
|
641
641
|
function D(t, n, e) {
|
|
642
642
|
B ??= document.createElement("canvas").getContext("2d");
|
|
643
643
|
const r = [];
|
|
644
644
|
if (!B) return r;
|
|
645
645
|
const i = t.map((o) => new Path2D(cn(o)));
|
|
646
|
-
for (let o = 0; o <
|
|
647
|
-
const f = e.minX + (l + 0.5) /
|
|
646
|
+
for (let o = 0; o < P; o++) for (let l = 0; l < P; l++) {
|
|
647
|
+
const f = e.minX + (l + 0.5) / P * (e.maxX - e.minX), s = e.minY + (o + 0.5) / P * (e.maxY - e.minY);
|
|
648
648
|
r.push(i.some((a) => B.isPointInPath(a, f, s, n)));
|
|
649
649
|
}
|
|
650
650
|
return r;
|
|
@@ -798,7 +798,14 @@ function xn(t) {
|
|
|
798
798
|
if (n.kind === "slide") return { kind: "slide", key: n.slideId };
|
|
799
799
|
if (n.kind === "action") return { kind: "action", action: n.action };
|
|
800
800
|
}
|
|
801
|
-
function
|
|
801
|
+
function gn(t) {
|
|
802
|
+
return {
|
|
803
|
+
...t?.hidden && { hidden: !0 },
|
|
804
|
+
...t?.advanceAfter && t.advanceAfter > 0 && { advanceAfterMs: t.advanceAfter },
|
|
805
|
+
...t?.section && { section: t.section }
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
function bn(t, n, e) {
|
|
802
809
|
const r = { ox: t.x, oy: t.y, nextId: 2, ids: /* @__PURE__ */ new Map(), glue: [], hooks: n, report: e }, i = ht(t.elements, 0, r);
|
|
803
810
|
return r.glue.forEach((o) => o()), {
|
|
804
811
|
name: t.name,
|
|
@@ -806,18 +813,20 @@ function kn(t, n, e) {
|
|
|
806
813
|
background: hn(t, n),
|
|
807
814
|
transition: dn(t.slide?.transition),
|
|
808
815
|
notes: t.slide?.notes?.trim() ? t.slide.notes : void 0,
|
|
809
|
-
key: t.slide?.id
|
|
816
|
+
key: t.slide?.id,
|
|
817
|
+
...gn(t.slide)
|
|
810
818
|
};
|
|
811
819
|
}
|
|
812
|
-
function
|
|
820
|
+
function Mn(t, n, e, r) {
|
|
813
821
|
const i = Math.min(e / Math.max(t, 1), r / Math.max(n, 1));
|
|
814
822
|
return { scale: i, dx: (e - t * i) / 2, dy: (r - n * i) / 2 };
|
|
815
823
|
}
|
|
816
824
|
export {
|
|
817
|
-
|
|
825
|
+
Mn as fitInto,
|
|
818
826
|
_ as mediaOf,
|
|
819
|
-
|
|
827
|
+
bn as pageToSlide,
|
|
820
828
|
pn as remapPageStops,
|
|
829
|
+
gn as showFields,
|
|
821
830
|
S as toColor,
|
|
822
831
|
dn as transitionOf,
|
|
823
832
|
rt as typefaceOf
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as o, b as m, d as b, z as R, h as W, g as a, i as z, j as B } from "./index-
|
|
1
|
+
import { s as o, b as m, d as b, z as R, h as W, g as a, i as z, j as B } from "./index-B_V19zDs.js";
|
|
2
2
|
const h = /* @__PURE__ */ new Set(), x = [], D = {
|
|
3
3
|
ArrowLeft: "left",
|
|
4
4
|
a: "left",
|
|
@@ -240,17 +240,17 @@ function Y() {
|
|
|
240
240
|
t && B(t.id);
|
|
241
241
|
},
|
|
242
242
|
playAnim: (n, t) => {
|
|
243
|
-
n?.alive && import("./index-
|
|
243
|
+
n?.alive && import("./index-B_V19zDs.js").then((r) => r.aT).then((r) => r.sequenceAnimator.playAnimation(n.id, { id: `bhv-${Date.now()}`, type: "preset", name: t, trigger: "programmatic" }, () => {
|
|
244
244
|
}));
|
|
245
245
|
},
|
|
246
246
|
goToPage: (n) => {
|
|
247
247
|
n >= 0 && n < o.slides.length && z(n);
|
|
248
248
|
},
|
|
249
249
|
sound: (n) => {
|
|
250
|
-
import("./index-
|
|
250
|
+
import("./index-B_V19zDs.js").then((t) => t.aU).then((t) => t.playSfx(n));
|
|
251
251
|
},
|
|
252
252
|
music: (n) => {
|
|
253
|
-
import("./index-
|
|
253
|
+
import("./index-B_V19zDs.js").then((t) => t.aU).then((t) => n ? t.startMusic() : t.stopMusic());
|
|
254
254
|
},
|
|
255
255
|
end: (n) => {
|
|
256
256
|
if (P(!0), n) {
|
|
@@ -316,7 +316,7 @@ ${i}`);
|
|
|
316
316
|
return y = requestAnimationFrame(n), !0;
|
|
317
317
|
}
|
|
318
318
|
function p() {
|
|
319
|
-
if (y !== null && (cancelAnimationFrame(y), y = null), window.removeEventListener("keydown", U, !0), window.removeEventListener("keyup", K, !0), import("./index-
|
|
319
|
+
if (y !== null && (cancelAnimationFrame(y), y = null), window.removeEventListener("keydown", U, !0), window.removeEventListener("keyup", K, !0), import("./index-B_V19zDs.js").then((e) => e.aU).then((e) => e.stopMusic()), h.clear(), w = [], x.length = 0, v.length = 0, g) {
|
|
320
320
|
const e = g;
|
|
321
321
|
g = null, b(() => {
|
|
322
322
|
a("elements", JSON.parse(e.elements)), a("selection", e.selection), a("activeSlideIndex", e.activeSlideIndex), a("appMode", e.appMode), a("gameActive", !1);
|