@algorisys/yappydraw 0.8.292 → 0.8.294

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 (29) hide show
  1. package/README.md +2 -2
  2. package/chunks/{canva-ai-DEXgo3RO.js → canva-ai-DqccAnxC.js} +1 -1
  3. package/chunks/{choice-dialog-state-DF7Hd13K.js → choice-dialog-state-10-yA9qy.js} +1 -1
  4. package/chunks/{custgeom-DK60FLyH.js → custgeom-gp_HWEYw.js} +13 -10
  5. package/chunks/{design-generator-dbNACXM-.js → design-generator-DIyJ4Dr0.js} +1 -1
  6. package/chunks/{drawing-engine-Dpuzo1lz.js → drawing-engine-nqE0zI8L.js} +1 -1
  7. package/chunks/{drawings-store-Day7j_Tw.js → drawings-store-BFtMld-q.js} +1 -1
  8. package/chunks/{ds-operations-DTBQ2jlO.js → ds-operations-40JYI4lM.js} +1 -1
  9. package/chunks/{export-game-B-Zaoh5a.js → export-game-5Kek7Bol.js} +1 -1
  10. package/chunks/{from-yappy-ChDOEKXM.js → from-yappy-ChRzxzZ9.js} +216 -206
  11. package/chunks/{game-runtime-A4EiMP-P.js → game-runtime--zmzKmmo.js} +37 -37
  12. package/chunks/import-DGbhv-Je.js +1699 -0
  13. package/chunks/{index-Dxj5fgvO.js → index-v2rH-W8-.js} +40141 -39505
  14. package/chunks/{lucide-solid-BXo3zhMX.js → lucide-solid-BHWkJbay.js} +1 -1
  15. package/chunks/markdown-to-slides-siI6fZd3.js +122 -0
  16. package/chunks/{morph-animator-mlVxvG9t.js → morph-animator-klLNQx0a.js} +1 -1
  17. package/chunks/{onboarding-tour-EDXLuYEp.js → onboarding-tour-CV0e3oyB.js} +1 -1
  18. package/chunks/{pdf-vector-OO6sbSA5.js → pdf-vector-DLxGyE10.js} +1 -1
  19. package/chunks/{search-C28u5fM2.js → search-53sGgwDp.js} +2 -2
  20. package/chunks/{slide-generator-BxoPBOpW.js → slide-generator-BttJgv2N.js} +1 -1
  21. package/chunks/{turntable-ai-BxllwIBP.js → turntable-ai-7udakZBz.js} +1 -1
  22. package/chunks/write-CIGfHqn4.js +254 -0
  23. package/chunks/yappy-CvwwkLs8.css +1 -0
  24. package/package.json +1 -1
  25. package/yappy.js +1 -1
  26. package/chunks/import-D8POTmPt.js +0 -1430
  27. package/chunks/markdown-to-slides-DdrONEUr.js +0 -96
  28. package/chunks/write-DbVLX69U.js +0 -212
  29. package/chunks/yappy-FCQs01wv.css +0 -1
@@ -1,5 +1,5 @@
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
- const h = /* @__PURE__ */ new Set(), x = [], G = {
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-v2rH-W8-.js";
2
+ const h = /* @__PURE__ */ new Set(), x = [], D = {
3
3
  ArrowLeft: "left",
4
4
  a: "left",
5
5
  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
- }, _ = (e) => {
23
- h.has(e) || (h.add(e), I(e));
22
+ }, Q = (e) => {
23
+ h.has(e) || (h.add(e), G(e));
24
24
  }, q = (e) => {
25
25
  h.delete(e);
26
- }, I = (e) => {
27
- for (const i of x) i.button === e && $(i.fn);
26
+ }, G = (e) => {
27
+ for (const i of x) i.button === e && L(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) $(() => s(e, i));
32
+ for (const s of v) L(() => s(e, i));
33
33
  }, ne = () => {
34
34
  u.down = !1;
35
35
  };
@@ -107,40 +107,40 @@ const C = (e, i) => {
107
107
  }, H = (e) => {
108
108
  a("elements", (i) => i.filter((s) => s.id !== e));
109
109
  };
110
- let g = null, y = null, w = [], k = 0, M = 0, c = null, T = !1, F = "", f = 0;
110
+ let g = null, y = null, w = [], k = 0, M = 0, c = null, I = !1, F = "", f = 0;
111
111
  const N = "SCORE ";
112
- let R = null, V = !1, E = () => {
112
+ let $ = null, V = !1, E = () => {
113
113
  };
114
114
  const ie = (e) => {
115
115
  E = e;
116
116
  }, J = (e) => {
117
- R = e, E();
117
+ $ = e, E();
118
118
  }, P = (e) => {
119
- T = e, V = e, E();
120
- }, $ = (e) => {
119
+ I = e, V = e, E();
120
+ }, L = (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
- }, L = (e) => {
126
+ }, U = (e) => {
127
127
  if (e.key === "Escape") {
128
128
  p();
129
129
  return;
130
130
  }
131
- const i = G[e.key];
132
- i && (e.preventDefault(), h.has(i) || (h.add(i), I(i)));
131
+ const i = D[e.key];
132
+ i && (e.preventDefault(), h.has(i) || (h.add(i), G(i)));
133
133
  }, K = (e) => {
134
- const i = G[e.key];
134
+ const i = D[e.key];
135
135
  i && h.delete(i);
136
136
  };
137
137
  let j = 0;
138
- function Q() {
138
+ function X() {
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 X() {
143
- const e = Q(), i = {
142
+ function Y() {
143
+ const e = X(), i = {
144
144
  strokeColor: "transparent",
145
145
  strokeWidth: 0,
146
146
  strokeStyle: "solid",
@@ -153,7 +153,7 @@ function X() {
153
153
  layerId: o.activeLayerId || "default-layer",
154
154
  roundness: null
155
155
  }, s = (n, t, r, d, l, S) => {
156
- const D = {
156
+ const T = {
157
157
  id: `game-${Date.now()}-${++j}`,
158
158
  type: n,
159
159
  x: t,
@@ -165,7 +165,7 @@ function X() {
165
165
  ...i,
166
166
  ...S
167
167
  };
168
- return a("elements", (O) => [...O, D]), new A(D.id);
168
+ return a("elements", (O) => [...O, T]), new A(T.id);
169
169
  };
170
170
  return {
171
171
  x: e.x,
@@ -240,17 +240,17 @@ function X() {
240
240
  t && B(t.id);
241
241
  },
242
242
  playAnim: (n, t) => {
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" }, () => {
243
+ n?.alive && import("./index-v2rH-W8-.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
- n >= 0 && n < o.slides.length && U(n);
247
+ n >= 0 && n < o.slides.length && z(n);
248
248
  },
249
249
  sound: (n) => {
250
- import("./index-Dxj5fgvO.js").then((t) => t.aR).then((t) => t.playSfx(n));
250
+ import("./index-v2rH-W8-.js").then((t) => t.aU).then((t) => t.playSfx(n));
251
251
  },
252
252
  music: (n) => {
253
- import("./index-Dxj5fgvO.js").then((t) => t.aR).then((t) => n ? t.startMusic() : t.stopMusic());
253
+ import("./index-v2rH-W8-.js").then((t) => t.aU).then((t) => n ? t.startMusic() : t.stopMusic());
254
254
  },
255
255
  end: (n) => {
256
256
  if (P(!0), n) {
@@ -272,7 +272,7 @@ function X() {
272
272
  };
273
273
  }
274
274
  const re = () => o.gameActive;
275
- function Y(e) {
275
+ function Z(e) {
276
276
  o.gameActive && p();
277
277
  const i = e ?? o.gameScript;
278
278
  if (!i?.trim())
@@ -283,7 +283,7 @@ function Y(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), R = null;
286
+ }, F = i, w = [], x.length = 0, v.length = 0, h.clear(), c = null, f = 0, P(!1), $ = null;
287
287
  let s;
288
288
  try {
289
289
  s = new Function("game", `'use strict';
@@ -293,17 +293,17 @@ ${i}`);
293
293
  }
294
294
  b(() => {
295
295
  a("selection", []), a("gameActive", !0), a("appMode", "presentation");
296
- }), W();
296
+ }), R();
297
297
  try {
298
- s(X());
298
+ s(Y());
299
299
  } catch (t) {
300
300
  return m(`Game error: ${t?.message || t}`, "error"), p(), !1;
301
301
  }
302
- window.addEventListener("keydown", L, !0), window.addEventListener("keyup", K, !0), k = performance.now(), M = k;
302
+ window.addEventListener("keydown", U, !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);
306
- if (M = t, T) return;
306
+ if (M = t, I) return;
307
307
  const d = (t - k) / 1e3;
308
308
  try {
309
309
  b(() => {
@@ -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", 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) {
319
+ if (y !== null && (cancelAnimationFrame(y), y = null), window.removeEventListener("keydown", U, !0), window.removeEventListener("keyup", K, !0), import("./index-v2rH-W8-.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);
323
- }), z(e.viewState);
323
+ }), W(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 && Y(e);
330
+ p(), e && Z(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
- _ as padPress,
340
+ Q as padPress,
341
341
  q as padRelease,
342
- R as padVisibleOverride,
342
+ $ as padVisibleOverride,
343
343
  se as restartGame,
344
- Y as startGame,
344
+ Z as startGame,
345
345
  p as stopGame
346
346
  };