@algorisys/yappydraw 0.8.291 → 0.8.292

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.
Files changed (30) hide show
  1. package/README.md +2 -2
  2. package/chunks/browser-DbZP-BrN.js +641 -0
  3. package/chunks/{canva-ai-BFOytREO.js → canva-ai-DEXgo3RO.js} +1 -1
  4. package/chunks/{choice-dialog-state-BxwyrXRG.js → choice-dialog-state-DF7Hd13K.js} +1 -1
  5. package/chunks/custgeom-DK60FLyH.js +225 -0
  6. package/chunks/{design-generator-BGXMoviP.js → design-generator-dbNACXM-.js} +1 -1
  7. package/chunks/{drawing-engine-ChTNR20M.js → drawing-engine-Dpuzo1lz.js} +1 -1
  8. package/chunks/{drawings-store-C2gQVOCO.js → drawings-store-Day7j_Tw.js} +1 -1
  9. package/chunks/{ds-operations-aFfgZej1.js → ds-operations-DTBQ2jlO.js} +1 -1
  10. package/chunks/{export-game-vrAl7xq7.js → export-game-B-Zaoh5a.js} +1 -1
  11. package/chunks/from-yappy-ChDOEKXM.js +814 -0
  12. package/chunks/{game-runtime-CpvR1mdl.js → game-runtime-A4EiMP-P.js} +25 -25
  13. package/chunks/import-D8POTmPt.js +1430 -0
  14. package/chunks/{index-BhrKqu0C.js → index-Dxj5fgvO.js} +11437 -11204
  15. package/chunks/{index.es-Cmz4JyRm.js → index.es-m_qpxIjM.js} +1 -1
  16. package/chunks/jspdf.es.min-DGjtdWau.js +9526 -0
  17. package/chunks/{lucide-solid-DU0uSW4D.js → lucide-solid-BXo3zhMX.js} +1 -1
  18. package/chunks/{markdown-to-slides-CZ_4B6Pe.js → markdown-to-slides-DdrONEUr.js} +1 -1
  19. package/chunks/{morph-animator-CD-EWxCR.js → morph-animator-mlVxvG9t.js} +1 -1
  20. package/chunks/{onboarding-tour-DpXkBcSr.js → onboarding-tour-EDXLuYEp.js} +1 -1
  21. package/chunks/{pdf-vector-BBxb3gRO.js → pdf-vector-OO6sbSA5.js} +2 -2
  22. package/chunks/presets-DP49P8i2.js +379 -0
  23. package/chunks/{search-B09o2eIz.js → search-C28u5fM2.js} +2 -2
  24. package/chunks/{slide-generator-CyshVj2x.js → slide-generator-BxoPBOpW.js} +1 -1
  25. package/chunks/{svg2pdf.es.min-BVaMJ-wC.js → svg2pdf.es.min-B6z21zR3.js} +1 -1
  26. package/chunks/{turntable-ai-cz89NMQ6.js → turntable-ai-BxllwIBP.js} +1 -1
  27. package/chunks/write-DbVLX69U.js +212 -0
  28. package/package.json +1 -1
  29. package/yappy.js +6 -6
  30. package/chunks/jspdf.es.min-rJE95jGX.js +0 -9859
@@ -1,4 +1,4 @@
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 B } from "./index-BhrKqu0C.js";
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 B } from "./index-Dxj5fgvO.js";
2
2
  const h = /* @__PURE__ */ new Set(), x = [], G = {
3
3
  ArrowLeft: "left",
4
4
  a: "left",
@@ -19,17 +19,17 @@ const h = /* @__PURE__ */ new Set(), x = [], G = {
19
19
  x: "b",
20
20
  X: "b",
21
21
  Shift: "b"
22
- }, Q = (e) => {
22
+ }, _ = (e) => {
23
23
  h.has(e) || (h.add(e), I(e));
24
24
  }, q = (e) => {
25
25
  h.delete(e);
26
26
  }, I = (e) => {
27
- for (const i of x) i.button === e && L(i.fn);
27
+ for (const i of x) i.button === e && $(i.fn);
28
28
  }, u = { x: 0, y: 0, down: !1 }, v = [], ee = (e, i) => {
29
29
  u.x = e, u.y = i;
30
30
  }, te = (e, i) => {
31
31
  u.x = e, u.y = i, u.down = !0;
32
- for (const s of v) L(() => s(e, i));
32
+ for (const s of v) $(() => s(e, i));
33
33
  }, ne = () => {
34
34
  u.down = !1;
35
35
  };
@@ -109,38 +109,38 @@ const C = (e, i) => {
109
109
  };
110
110
  let g = null, y = null, w = [], k = 0, M = 0, c = null, T = !1, F = "", f = 0;
111
111
  const N = "SCORE ";
112
- let $ = null, V = !1, E = () => {
112
+ let R = null, V = !1, E = () => {
113
113
  };
114
114
  const ie = (e) => {
115
115
  E = e;
116
116
  }, J = (e) => {
117
- $ = e, E();
117
+ R = e, E();
118
118
  }, P = (e) => {
119
119
  T = e, V = e, E();
120
- }, L = (e) => {
120
+ }, $ = (e) => {
121
121
  try {
122
122
  e();
123
123
  } catch (i) {
124
124
  console.error("[arcade] script error:", i), m(`Game error: ${i?.message || i}`, "error"), p();
125
125
  }
126
- }, K = (e) => {
126
+ }, L = (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
- }, O = (e) => {
133
+ }, K = (e) => {
134
134
  const i = G[e.key];
135
135
  i && h.delete(i);
136
136
  };
137
137
  let j = 0;
138
- function X() {
138
+ function Q() {
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 Y() {
143
- const e = X(), i = {
142
+ function X() {
143
+ const e = Q(), i = {
144
144
  strokeColor: "transparent",
145
145
  strokeWidth: 0,
146
146
  strokeStyle: "solid",
@@ -165,7 +165,7 @@ function Y() {
165
165
  ...i,
166
166
  ...S
167
167
  };
168
- return a("elements", (R) => [...R, D]), new A(D.id);
168
+ return a("elements", (O) => [...O, D]), new A(D.id);
169
169
  };
170
170
  return {
171
171
  x: e.x,
@@ -240,17 +240,17 @@ function Y() {
240
240
  t && B(t.id);
241
241
  },
242
242
  playAnim: (n, t) => {
243
- n?.alive && import("./index-BhrKqu0C.js").then((r) => r.at).then((r) => r.sequenceAnimator.playAnimation(n.id, { id: `bhv-${Date.now()}`, type: "preset", name: t, trigger: "programmatic" }, () => {
243
+ n?.alive && import("./index-Dxj5fgvO.js").then((r) => r.aQ).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 && U(n);
248
248
  },
249
249
  sound: (n) => {
250
- import("./index-BhrKqu0C.js").then((t) => t.au).then((t) => t.playSfx(n));
250
+ import("./index-Dxj5fgvO.js").then((t) => t.aR).then((t) => t.playSfx(n));
251
251
  },
252
252
  music: (n) => {
253
- import("./index-BhrKqu0C.js").then((t) => t.au).then((t) => n ? t.startMusic() : t.stopMusic());
253
+ import("./index-Dxj5fgvO.js").then((t) => t.aR).then((t) => n ? t.startMusic() : t.stopMusic());
254
254
  },
255
255
  end: (n) => {
256
256
  if (P(!0), n) {
@@ -272,7 +272,7 @@ function Y() {
272
272
  };
273
273
  }
274
274
  const re = () => o.gameActive;
275
- function Z(e) {
275
+ function Y(e) {
276
276
  o.gameActive && p();
277
277
  const i = e ?? o.gameScript;
278
278
  if (!i?.trim())
@@ -283,7 +283,7 @@ function Z(e) {
283
283
  activeSlideIndex: o.activeSlideIndex,
284
284
  appMode: o.appMode,
285
285
  viewState: { ...o.viewState }
286
- }, F = i, w = [], x.length = 0, v.length = 0, h.clear(), c = null, f = 0, P(!1), $ = null;
286
+ }, F = i, w = [], x.length = 0, v.length = 0, h.clear(), c = null, f = 0, P(!1), R = null;
287
287
  let s;
288
288
  try {
289
289
  s = new Function("game", `'use strict';
@@ -295,11 +295,11 @@ ${i}`);
295
295
  a("selection", []), a("gameActive", !0), a("appMode", "presentation");
296
296
  }), W();
297
297
  try {
298
- s(Y());
298
+ s(X());
299
299
  } catch (t) {
300
300
  return m(`Game error: ${t?.message || t}`, "error"), p(), !1;
301
301
  }
302
- window.addEventListener("keydown", K, !0), window.addEventListener("keyup", O, !0), k = performance.now(), M = k;
302
+ window.addEventListener("keydown", L, !0), window.addEventListener("keyup", K, !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,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", K, !0), window.removeEventListener("keyup", O, !0), import("./index-BhrKqu0C.js").then((e) => e.au).then((e) => e.stopMusic()), h.clear(), w = [], x.length = 0, v.length = 0, g) {
319
+ if (y !== null && (cancelAnimationFrame(y), y = null), window.removeEventListener("keydown", L, !0), window.removeEventListener("keyup", K, !0), import("./index-Dxj5fgvO.js").then((e) => e.aR).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);
@@ -327,7 +327,7 @@ function p() {
327
327
  }
328
328
  function se() {
329
329
  const e = F;
330
- p(), e && Z(e);
330
+ p(), e && Y(e);
331
331
  }
332
332
  export {
333
333
  A as Sprite,
@@ -337,10 +337,10 @@ export {
337
337
  ne as gamePointerUp,
338
338
  re as isGameRunning,
339
339
  ie as onGameUiSignal,
340
- Q as padPress,
340
+ _ as padPress,
341
341
  q as padRelease,
342
- $ as padVisibleOverride,
342
+ R as padVisibleOverride,
343
343
  se as restartGame,
344
- Z as startGame,
344
+ Y as startGame,
345
345
  p as stopGame
346
346
  };