@algorisys/yappydraw 0.8.297 → 0.8.298
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-cwK_LwEk.js → canva-ai-wYv31lWm.js} +1 -1
- package/chunks/{choice-dialog-state-CF9ddIAk.js → choice-dialog-state-DqR_5IIZ.js} +1 -1
- package/chunks/{custgeom-N1NlyQKZ.js → custgeom-DUHYX5Vs.js} +28 -26
- package/chunks/{design-generator-DSEgwQ7i.js → design-generator-DGqLbsqR.js} +1 -1
- package/chunks/{drawing-engine-CPFaJPyz.js → drawing-engine-BCPX1hm_.js} +1 -1
- package/chunks/{drawings-store-CxGNbTN7.js → drawings-store-BJW1Dmw_.js} +1 -1
- package/chunks/{ds-operations-BTcGLr6X.js → ds-operations-Bi7WKGwN.js} +1 -1
- package/chunks/{export-game-BVjxTYD1.js → export-game-BkUpm1R8.js} +1 -1
- package/chunks/{from-yappy-kTebD-0Y.js → from-yappy-fz7AULvS.js} +175 -173
- package/chunks/{game-runtime-Ch0y0mLm.js → game-runtime-Bng0zlkA.js} +24 -24
- package/chunks/import-BvGSYTzL.js +1895 -0
- package/chunks/{index-zg1eC33A.js → index-Bqlr2FLr.js} +9325 -9170
- package/chunks/{lucide-solid-DAmszm-d.js → lucide-solid-Db2bPSrx.js} +1 -1
- package/chunks/{markdown-to-slides-CGvmGrK2.js → markdown-to-slides-D1OVYcQV.js} +1 -1
- package/chunks/{morph-animator-BQPPQ08b.js → morph-animator-DCs2sEkC.js} +1 -1
- package/chunks/{onboarding-tour-CpRCV3Ub.js → onboarding-tour-DoZ9Sivk.js} +1 -1
- package/chunks/{pdf-vector-D65OC03c.js → pdf-vector-DTgEkBKW.js} +1 -1
- package/chunks/{search-rp-eRNJ6.js → search-4gFkAhbD.js} +9 -9
- package/chunks/{slide-generator-Ctxdc9Yn.js → slide-generator-D1fy8u8B.js} +5 -5
- package/chunks/{turntable-ai-ZhAGEjzz.js → turntable-ai-C1B4jzNc.js} +1 -1
- package/chunks/write-DDXhxpu-.js +408 -0
- package/chunks/yappy-Btkc8ueG.css +1 -0
- package/package.json +1 -1
- package/yappy.js +1 -1
- package/chunks/import-eCGTFoVi.js +0 -1814
- package/chunks/write-ZW6FSyj1.js +0 -327
- package/chunks/yappy-CvwwkLs8.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as o, b as m, d as b, z as
|
|
1
|
+
import { s as o, b as m, d as b, z as W, h as z, g as a, i as U, j as Z } from "./index-Bqlr2FLr.js";
|
|
2
2
|
const h = /* @__PURE__ */ new Set(), x = [], G = {
|
|
3
3
|
ArrowLeft: "left",
|
|
4
4
|
a: "left",
|
|
@@ -113,7 +113,7 @@ let $ = null, N = !1, E = () => {
|
|
|
113
113
|
};
|
|
114
114
|
const ie = (e) => {
|
|
115
115
|
E = e;
|
|
116
|
-
},
|
|
116
|
+
}, V = (e) => {
|
|
117
117
|
$ = e, E();
|
|
118
118
|
}, P = (e) => {
|
|
119
119
|
T = e, N = e, E();
|
|
@@ -123,24 +123,24 @@ const ie = (e) => {
|
|
|
123
123
|
} catch (i) {
|
|
124
124
|
console.error("[arcade] script error:", i), m(`Game error: ${i?.message || i}`, "error"), p();
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, K = (e) => {
|
|
127
127
|
if (e.key === "Escape") {
|
|
128
128
|
p();
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
131
|
const i = G[e.key];
|
|
132
132
|
i && (e.preventDefault(), h.has(i) || (h.add(i), I(i)));
|
|
133
|
-
},
|
|
133
|
+
}, O = (e) => {
|
|
134
134
|
const i = G[e.key];
|
|
135
135
|
i && h.delete(i);
|
|
136
136
|
};
|
|
137
|
-
let
|
|
138
|
-
function
|
|
137
|
+
let J = 0;
|
|
138
|
+
function Y() {
|
|
139
139
|
const e = o.slides[o.activeSlideIndex] || o.slides[0];
|
|
140
140
|
return e ? { x: e.spatialPosition.x, y: e.spatialPosition.y, width: e.dimensions.width, height: e.dimensions.height } : { x: 0, y: 0, width: 800, height: 600 };
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
const e =
|
|
142
|
+
function j() {
|
|
143
|
+
const e = Y(), i = {
|
|
144
144
|
strokeColor: "transparent",
|
|
145
145
|
strokeWidth: 0,
|
|
146
146
|
strokeStyle: "solid",
|
|
@@ -154,7 +154,7 @@ function Y() {
|
|
|
154
154
|
roundness: null
|
|
155
155
|
}, s = (n, t, r, d, l, S) => {
|
|
156
156
|
const D = {
|
|
157
|
-
id: `game-${Date.now()}-${++
|
|
157
|
+
id: `game-${Date.now()}-${++J}`,
|
|
158
158
|
type: n,
|
|
159
159
|
x: t,
|
|
160
160
|
y: r,
|
|
@@ -165,7 +165,7 @@ function Y() {
|
|
|
165
165
|
...i,
|
|
166
166
|
...S
|
|
167
167
|
};
|
|
168
|
-
return a("elements", (
|
|
168
|
+
return a("elements", (R) => [...R, D]), new A(D.id);
|
|
169
169
|
};
|
|
170
170
|
return {
|
|
171
171
|
x: e.x,
|
|
@@ -237,20 +237,20 @@ function Y() {
|
|
|
237
237
|
getScore: () => f,
|
|
238
238
|
goToState: (n) => {
|
|
239
239
|
const t = o.states.find((r) => r.name === n || r.id === n);
|
|
240
|
-
t &&
|
|
240
|
+
t && Z(t.id);
|
|
241
241
|
},
|
|
242
242
|
playAnim: (n, t) => {
|
|
243
|
-
n?.alive && import("./index-
|
|
243
|
+
n?.alive && import("./index-Bqlr2FLr.js").then((r) => r.aY).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
|
-
n >= 0 && n < o.slides.length &&
|
|
247
|
+
n >= 0 && n < o.slides.length && U(n);
|
|
248
248
|
},
|
|
249
249
|
sound: (n) => {
|
|
250
|
-
import("./index-
|
|
250
|
+
import("./index-Bqlr2FLr.js").then((t) => t.aZ).then((t) => t.playSfx(n));
|
|
251
251
|
},
|
|
252
252
|
music: (n) => {
|
|
253
|
-
import("./index-
|
|
253
|
+
import("./index-Bqlr2FLr.js").then((t) => t.aZ).then((t) => n ? t.startMusic() : t.stopMusic());
|
|
254
254
|
},
|
|
255
255
|
end: (n) => {
|
|
256
256
|
if (P(!0), n) {
|
|
@@ -266,13 +266,13 @@ function Y() {
|
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
|
-
pad: (n) =>
|
|
269
|
+
pad: (n) => V(n),
|
|
270
270
|
random: (n, t) => n + Math.random() * (t - n),
|
|
271
271
|
clamp: (n, t, r) => Math.max(t, Math.min(r, n))
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
const re = () => o.gameActive;
|
|
275
|
-
function
|
|
275
|
+
function X(e) {
|
|
276
276
|
o.gameActive && p();
|
|
277
277
|
const i = e ?? o.gameScript;
|
|
278
278
|
if (!i?.trim())
|
|
@@ -293,13 +293,13 @@ ${i}`);
|
|
|
293
293
|
}
|
|
294
294
|
b(() => {
|
|
295
295
|
a("selection", []), a("gameActive", !0), a("appMode", "presentation");
|
|
296
|
-
}),
|
|
296
|
+
}), W();
|
|
297
297
|
try {
|
|
298
|
-
s(
|
|
298
|
+
s(j());
|
|
299
299
|
} catch (t) {
|
|
300
300
|
return m(`Game error: ${t?.message || t}`, "error"), p(), !1;
|
|
301
301
|
}
|
|
302
|
-
window.addEventListener("keydown",
|
|
302
|
+
window.addEventListener("keydown", K, !0), window.addEventListener("keyup", O, !0), k = performance.now(), M = k;
|
|
303
303
|
const n = (t) => {
|
|
304
304
|
y = requestAnimationFrame(n);
|
|
305
305
|
const r = Math.min(0.05, (t - M) / 1e3);
|
|
@@ -316,18 +316,18 @@ ${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",
|
|
319
|
+
if (y !== null && (cancelAnimationFrame(y), y = null), window.removeEventListener("keydown", K, !0), window.removeEventListener("keyup", O, !0), import("./index-Bqlr2FLr.js").then((e) => e.aZ).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);
|
|
323
|
-
}),
|
|
323
|
+
}), z(e.viewState);
|
|
324
324
|
} else
|
|
325
325
|
a("gameActive", !1);
|
|
326
326
|
P(!1);
|
|
327
327
|
}
|
|
328
328
|
function se() {
|
|
329
329
|
const e = F;
|
|
330
|
-
p(), e &&
|
|
330
|
+
p(), e && X(e);
|
|
331
331
|
}
|
|
332
332
|
export {
|
|
333
333
|
A as Sprite,
|
|
@@ -341,6 +341,6 @@ export {
|
|
|
341
341
|
q as padRelease,
|
|
342
342
|
$ as padVisibleOverride,
|
|
343
343
|
se as restartGame,
|
|
344
|
-
|
|
344
|
+
X as startGame,
|
|
345
345
|
p as stopGame
|
|
346
346
|
};
|