@minicode-dev/chat 0.1.14 → 0.1.15

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 (37) hide show
  1. package/dist/chunks/{BattleshipGameCard-B-B4r7lK.js → BattleshipGameCard-8H-sBCsv.js} +3 -3
  2. package/dist/chunks/{BattleshipGameCard-B-B4r7lK.js.map → BattleshipGameCard-8H-sBCsv.js.map} +1 -1
  3. package/dist/chunks/{ChatContext-DQtKsR6Z.js → ChatContext-CVW58bzC.js} +2 -2
  4. package/dist/chunks/{ChatContext-DQtKsR6Z.js.map → ChatContext-CVW58bzC.js.map} +1 -1
  5. package/dist/chunks/{RacingLiveGameCard-c1G7uoDI.js → RacingLiveGameCard-8j9QLnxW.js} +4 -4
  6. package/dist/chunks/{RacingLiveGameCard-c1G7uoDI.js.map → RacingLiveGameCard-8j9QLnxW.js.map} +1 -1
  7. package/dist/chunks/{TanksGameCard-CvTaF7tu.js → TanksGameCard-DnCufSH6.js} +12 -12
  8. package/dist/chunks/{TanksGameCard-CvTaF7tu.js.map → TanksGameCard-DnCufSH6.js.map} +1 -1
  9. package/dist/chunks/TanksLiveGameCard-D_27Jomp.js +1274 -0
  10. package/dist/chunks/TanksLiveGameCard-D_27Jomp.js.map +1 -0
  11. package/dist/chunks/{avalancheScene3d-Z5QyZIid.js → avalancheScene3d-CIE2WKQn.js} +51 -50
  12. package/dist/chunks/{avalancheScene3d-Z5QyZIid.js.map → avalancheScene3d-CIE2WKQn.js.map} +1 -1
  13. package/dist/chunks/cars-D1PM7mVD.js +340 -0
  14. package/dist/chunks/cars-D1PM7mVD.js.map +1 -0
  15. package/dist/chunks/{connect4Sounds-DmD-E9kX.js → connect4Sounds-BqEHULjv.js} +2 -2
  16. package/dist/chunks/{connect4Sounds-DmD-E9kX.js.map → connect4Sounds-BqEHULjv.js.map} +1 -1
  17. package/dist/chunks/createLiveScene-MTGRv8rx.js +758 -0
  18. package/dist/chunks/createLiveScene-MTGRv8rx.js.map +1 -0
  19. package/dist/chunks/{createRaceScene-C7Rw89kj.js → createRaceScene-BiEtQsVs.js} +4 -3
  20. package/dist/chunks/{createRaceScene-C7Rw89kj.js.map → createRaceScene-BiEtQsVs.js.map} +1 -1
  21. package/dist/chunks/fx-DhXerGyt.js +248 -0
  22. package/dist/chunks/fx-DhXerGyt.js.map +1 -0
  23. package/dist/chunks/{games-BvYTWgaR.js → games-Bl_8raG6.js} +1147 -574
  24. package/dist/chunks/games-Bl_8raG6.js.map +1 -0
  25. package/dist/chunks/{tanksSounds-DwjfSp3W.js → tanksSounds-DTnidbiq.js} +5 -5
  26. package/dist/chunks/{tanksSounds-DwjfSp3W.js.map → tanksSounds-DTnidbiq.js.map} +1 -1
  27. package/dist/index.js +28 -28
  28. package/dist/index.js.map +1 -1
  29. package/dist/styles.css +1 -1
  30. package/package.json +1 -1
  31. package/dist/chunks/TanksLiveGameCard-COr9Oay5.js +0 -1011
  32. package/dist/chunks/TanksLiveGameCard-COr9Oay5.js.map +0 -1
  33. package/dist/chunks/createLiveScene-CWBunxPi.js +0 -367
  34. package/dist/chunks/createLiveScene-CWBunxPi.js.map +0 -1
  35. package/dist/chunks/fx-UZwhOmdl.js +0 -584
  36. package/dist/chunks/fx-UZwhOmdl.js.map +0 -1
  37. package/dist/chunks/games-BvYTWgaR.js.map +0 -1
@@ -1,10 +1,10 @@
1
- import { a as e, c as t, d as n, f as r, l as i, o as a, p as o, s, u as c } from "./games-BvYTWgaR.js";
2
- import { t as l } from "./ChatContext-DQtKsR6Z.js";
1
+ import { a as e, c as t, d as n, f as r, l as i, o as a, p as o, s, u as c } from "./games-Bl_8raG6.js";
2
+ import { t as l } from "./ChatContext-CVW58bzC.js";
3
3
  import { r as u } from "./connectionStore-DwgIUl30.js";
4
4
  import { c as d, l as f, t as p } from "./gameStatus-BChd29yI.js";
5
- import { o as m } from "./connect4Sounds-DmD-E9kX.js";
5
+ import { o as m } from "./connect4Sounds-BqEHULjv.js";
6
6
  import { t as h } from "./webglSupport-2WjPEPZ_.js";
7
- import { a as g, i as _, n as v, o as y, r as b, t as ee } from "./tanksSounds-DwjfSp3W.js";
7
+ import { l as g, n as _, o as v, r as y, s as b, t as ee } from "./tanksSounds-DTnidbiq.js";
8
8
  import { memo as x, useCallback as S, useContext as C, useEffect as w, useRef as T, useState as E, useSyncExternalStore as D } from "react";
9
9
  import { ChevronDown as te, Crosshair as O, Flag as ne, Layers as k, RotateCcw as re, Swords as ie, Video as A, Wind as ae, X as oe } from "lucide-react";
10
10
  import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
@@ -953,7 +953,7 @@ function Be(e, t, n, r) {
953
953
  try {
954
954
  a?.dispose();
955
955
  } catch {}
956
- i.current = null, g();
956
+ i.current = null, b();
957
957
  };
958
958
  }, [
959
959
  e,
@@ -1004,17 +1004,17 @@ function Ve({ game: e, currentUserId: t }) {
1004
1004
  });
1005
1005
  }
1006
1006
  function He({ game: e, gameKey: t, currentUserId: r, variant: i, onMinimize: o, onDismiss: s }) {
1007
- let l = Ie(), u = T(null), [h, g] = E(!1), [x, S] = E(null), [C, D] = E(!1), [P, se] = E("overview"), [F, ce] = E(""), [I, L] = E(!1), [ue, me] = E(() => Date.now()), he = T("init"), ge = T(0), z = [
1007
+ let l = Ie(), u = T(null), [h, b] = E(!1), [x, S] = E(null), [C, D] = E(!1), [P, se] = E("overview"), [F, ce] = E(""), [I, L] = E(!1), [ue, me] = E(() => Date.now()), he = T("init"), ge = T(0), z = [
1008
1008
  "active",
1009
1009
  "won",
1010
1010
  "draw",
1011
1011
  "conflict",
1012
1012
  "closed"
1013
- ].includes(e.status) && !!e.logic, { sceneRef: B, mode: V, use2d: _e } = Be(u, z, h, (e) => v(e, `${he.current}:${e.type}:${ge.current += 1}`)), H = String(r ?? e.ownId), ve = e.logic?.players ?? [e.hostId, e.guestId], U = ve.indexOf(H), W = f(H, e.guestId), G = U >= 0, K = d(e), q = a(e) && !C, J = (e, ...t) => {
1013
+ ].includes(e.status) && !!e.logic, { sceneRef: B, mode: V, use2d: _e } = Be(u, z, h, (e) => _(e, `${he.current}:${e.type}:${ge.current += 1}`)), H = String(r ?? e.ownId), ve = e.logic?.players ?? [e.hostId, e.guestId], U = ve.indexOf(H), W = f(H, e.guestId), G = U >= 0, K = d(e), q = a(e) && !C, J = (e, ...t) => {
1014
1014
  ce(""), Le(e, ...t).catch((e) => ce(e?.message || "No se pudo enviar."));
1015
1015
  };
1016
1016
  w(() => {
1017
- _();
1017
+ v();
1018
1018
  }, []);
1019
1019
  let Y = T({
1020
1020
  eventId: void 0,
@@ -1045,7 +1045,7 @@ function He({ game: e, gameKey: t, currentUserId: r, variant: i, onMinimize: o,
1045
1045
  if (B.current === t) {
1046
1046
  if (!o) t.setWorld(s);
1047
1047
  else {
1048
- he.current = r, o.destroyed.length && y("big_explosion", 15e3), D(!0), se("overview");
1048
+ he.current = r, o.destroyed.length && g("big_explosion", 15e3), D(!0), se("overview");
1049
1049
  try {
1050
1050
  await t.playTurn(o);
1051
1051
  } catch {
@@ -1063,7 +1063,7 @@ function He({ game: e, gameKey: t, currentUserId: r, variant: i, onMinimize: o,
1063
1063
  let be = T(K);
1064
1064
  w(() => {
1065
1065
  !be.current && ["won", "draw"].includes(e.status) && ye.current.then(() => {
1066
- B.current?.celebrate?.(e.winnerId ?? null), G && b(f(e.winnerId, H) ? "victory" : "defeat", `${e.gameId}:end`);
1066
+ B.current?.celebrate?.(e.winnerId ?? null), G && y(f(e.winnerId, H) ? "victory" : "defeat", `${e.gameId}:end`);
1067
1067
  });
1068
1068
  }, [
1069
1069
  e.status,
@@ -1342,7 +1342,7 @@ function He({ game: e, gameKey: t, currentUserId: r, variant: i, onMinimize: o,
1342
1342
  type: "button",
1343
1343
  className: "chat-game-action",
1344
1344
  "aria-pressed": _e,
1345
- onClick: () => g(!_e),
1345
+ onClick: () => b(!_e),
1346
1346
  title: "Cambiar vista",
1347
1347
  children: [/* @__PURE__ */ M(k, {
1348
1348
  size: 14,
@@ -1534,4 +1534,4 @@ function $({ gameKey: t, currentUserId: n, variant: r = "panel", onMinimize: i,
1534
1534
  var Ue = x($);
1535
1535
  export { Ue as default };
1536
1536
 
1537
- //# sourceMappingURL=TanksGameCard-CvTaF7tu.js.map
1537
+ //# sourceMappingURL=TanksGameCard-DnCufSH6.js.map