jaml-ui 2.0.0 → 2.1.0
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/dist/assets/searchPoolWorker-BgC_66wv.js +2 -0
- package/dist/assets/searchPoolWorker-BgC_66wv.js.map +1 -0
- package/dist/chunks/{runtime-CW7XHgOy.js → runtime-DAQf1WrX.js} +365 -374
- package/dist/chunks/{runtime-CW7XHgOy.js.map → runtime-DAQf1WrX.js.map} +1 -1
- package/dist/chunks/{searchPoolWorker-CEdClSPb.js → searchPoolWorker-BO7D6obp.js} +2 -2
- package/dist/chunks/searchPoolWorker-BO7D6obp.js.map +1 -0
- package/dist/chunks/{spriteMapper-C2mqQHLj.js → spriteMapper-C8uYedXB.js} +5 -2
- package/dist/chunks/{spriteMapper-C2mqQHLj.js.map → spriteMapper-C8uYedXB.js.map} +1 -1
- package/dist/chunks/{ui-CyhuNM51.js → ui-BXbEyxHZ.js} +39 -39
- package/dist/chunks/{ui-CyhuNM51.js.map → ui-BXbEyxHZ.js.map} +1 -1
- package/dist/components/JamlIdeToolbar.d.ts +3 -2
- package/dist/components/JimmolateEditor.d.ts +7 -7
- package/dist/core.js +6 -6
- package/dist/hooks/useSearch.d.ts +3 -3
- package/dist/index.js +3917 -3920
- package/dist/index.js.map +1 -1
- package/dist/lib/motely/runtime.d.ts +0 -6
- package/dist/motely.js +34 -34
- package/dist/r3f/Card3D.d.ts +8 -15
- package/dist/r3f.js +275 -0
- package/dist/r3f.js.map +1 -0
- package/dist/ui/jimbo.css +1 -1
- package/dist/ui.js +1 -1
- package/package.json +8 -4
- package/dist/assets/searchPoolWorker-CGxhF1pC.js +0 -2
- package/dist/assets/searchPoolWorker-CGxhF1pC.js.map +0 -1
- package/dist/chunks/searchPoolWorker-CEdClSPb.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as e, n as t, r as n, t as r, x as i } from "./spriteMapper-C8uYedXB.js";
|
|
2
2
|
import a, { createContext as o, createElement as s, forwardRef as c, memo as l, useCallback as u, useContext as d, useEffect as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
3
3
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
4
4
|
import { FiCheck as b, FiCopy as x } from "react-icons/fi";
|
|
@@ -239,7 +239,7 @@ function M({ mode: e = "snap", placement: t = "auto", delay: n = 80, disabled: r
|
|
|
239
239
|
}, [e])
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
function ee({ layers:
|
|
242
|
+
function ee({ layers: t, invert: n = !1, hoverTilt: r = !1 }) {
|
|
243
243
|
let i = h(null), a = h(null), o = h(/* @__PURE__ */ new Map()), [s, c] = g(3 / 4), [, l] = g(0), d = h(null), p = h({
|
|
244
244
|
rx: 0,
|
|
245
245
|
ry: 0,
|
|
@@ -248,40 +248,40 @@ function ee({ layers: e, invert: t = !1, hoverTilt: r = !1 }) {
|
|
|
248
248
|
rx: 0,
|
|
249
249
|
ry: 0,
|
|
250
250
|
rz: 0
|
|
251
|
-
}), _ =
|
|
251
|
+
}), _ = t?.some((e) => e.animated);
|
|
252
252
|
f(() => {
|
|
253
|
-
let
|
|
253
|
+
let t = !1, n = o.current;
|
|
254
254
|
return (async () => {
|
|
255
|
-
let r = Array.from(new Set(Object.values(
|
|
256
|
-
|
|
257
|
-
e &&
|
|
255
|
+
let r = Array.from(new Set(Object.values(e).map((e) => e.src))), i = await Promise.all(r.map((e) => E(e)));
|
|
256
|
+
t || (i.forEach((e, t) => {
|
|
257
|
+
e && n.set(r[t], e);
|
|
258
258
|
}), l((e) => e + 1));
|
|
259
259
|
})().catch((e) => console.error("[JamlCardRenderer]", e)), () => {
|
|
260
|
-
|
|
260
|
+
t = !0, n.clear();
|
|
261
261
|
};
|
|
262
262
|
}, []), f(() => {
|
|
263
|
-
let
|
|
264
|
-
if (!
|
|
265
|
-
let r =
|
|
263
|
+
let e = i.current;
|
|
264
|
+
if (!e || !t || t.length === 0) return;
|
|
265
|
+
let r = e.getContext("2d");
|
|
266
266
|
if (!r) return;
|
|
267
267
|
let a = !1, s = null, u, d = (i) => {
|
|
268
|
-
r.clearRect(0, 0,
|
|
269
|
-
let
|
|
270
|
-
if (
|
|
271
|
-
let a = D(
|
|
272
|
-
|
|
268
|
+
r.clearRect(0, 0, e.width, e.height), [...t].sort((e, t) => e.order - t.order).forEach((t) => {
|
|
269
|
+
let n = o.current.get(t.source);
|
|
270
|
+
if (n) {
|
|
271
|
+
let a = D(e, r, n, t, _ ? i : void 0);
|
|
272
|
+
t.order === 0 && c(a);
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
|
-
E(
|
|
276
|
-
if (!(a || !
|
|
277
|
-
if (o.current.set(
|
|
278
|
-
let i = D(
|
|
279
|
-
|
|
275
|
+
E(t.source).then((n) => {
|
|
276
|
+
if (!(a || !n)) {
|
|
277
|
+
if (o.current.set(t.source, n), !_) {
|
|
278
|
+
let i = D(e, r, n, t);
|
|
279
|
+
t.order === 0 && c(i);
|
|
280
280
|
}
|
|
281
281
|
l((e) => e + 1);
|
|
282
282
|
}
|
|
283
283
|
});
|
|
284
|
-
}),
|
|
284
|
+
}), e.style.filter = n ? "invert(0.94)" : "none";
|
|
285
285
|
};
|
|
286
286
|
if (_) {
|
|
287
287
|
let e = (t) => {
|
|
@@ -293,8 +293,8 @@ function ee({ layers: e, invert: t = !1, hoverTilt: r = !1 }) {
|
|
|
293
293
|
a = !0, s !== null && cancelAnimationFrame(s);
|
|
294
294
|
};
|
|
295
295
|
}, [
|
|
296
|
-
e,
|
|
297
296
|
t,
|
|
297
|
+
n,
|
|
298
298
|
_
|
|
299
299
|
]);
|
|
300
300
|
let v = u(() => {
|
|
@@ -417,8 +417,8 @@ function te(e, t, n) {
|
|
|
417
417
|
}
|
|
418
418
|
//#endregion
|
|
419
419
|
//#region src/ui/sprites.tsx
|
|
420
|
-
function ne({ name:
|
|
421
|
-
let u =
|
|
420
|
+
function ne({ name: e, sheet: a, width: o = 40, height: s, style: c, className: l }) {
|
|
421
|
+
let u = n(e), d = a ?? u?.type ?? "Jokers", f = r[d], p = t(d), m = u?.pos ?? p.pos, h = o;
|
|
422
422
|
[
|
|
423
423
|
"Jokers",
|
|
424
424
|
"Tarots",
|
|
@@ -437,7 +437,7 @@ function ne({ name: n, sheet: a, width: o = 40, height: s, style: c, className:
|
|
|
437
437
|
width: o,
|
|
438
438
|
height: g,
|
|
439
439
|
flexShrink: 0,
|
|
440
|
-
backgroundImage: `url(${
|
|
440
|
+
backgroundImage: `url(${i(f.assetKey)})`,
|
|
441
441
|
backgroundSize: `${_}px ${y}px`,
|
|
442
442
|
backgroundPosition: `${b}px ${x}px`,
|
|
443
443
|
backgroundRepeat: "no-repeat",
|
|
@@ -456,18 +456,18 @@ var re = [
|
|
|
456
456
|
"Orange",
|
|
457
457
|
"Gold"
|
|
458
458
|
];
|
|
459
|
-
function ie({ stake:
|
|
460
|
-
let a = re.indexOf(
|
|
459
|
+
function ie({ stake: e, width: t = 29, height: n, style: r }) {
|
|
460
|
+
let a = re.indexOf(e.replace(" Stake", "")), o = a >= 0 ? a : 0, s = o % 5, c = Math.floor(o / 5), l = n ?? t, u = t * 5, d = l * 2;
|
|
461
461
|
return /* @__PURE__ */ v("div", { style: {
|
|
462
|
-
width:
|
|
462
|
+
width: t,
|
|
463
463
|
height: l,
|
|
464
464
|
flexShrink: 0,
|
|
465
|
-
backgroundImage: `url(${
|
|
465
|
+
backgroundImage: `url(${i("stakes")})`,
|
|
466
466
|
backgroundSize: `${u}px ${d}px`,
|
|
467
|
-
backgroundPosition: `-${s *
|
|
467
|
+
backgroundPosition: `-${s * t}px -${c * l}px`,
|
|
468
468
|
backgroundRepeat: "no-repeat",
|
|
469
469
|
imageRendering: "pixelated",
|
|
470
|
-
...
|
|
470
|
+
...r
|
|
471
471
|
} });
|
|
472
472
|
}
|
|
473
473
|
var ae = {
|
|
@@ -496,15 +496,15 @@ var ae = {
|
|
|
496
496
|
y: 2
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
|
-
function oe({ deck: t, width:
|
|
500
|
-
let o = ae[t.replace(" Deck", "")] ?? ae.Red, s =
|
|
499
|
+
function oe({ deck: t, width: n = 71, height: r, style: a }) {
|
|
500
|
+
let o = ae[t.replace(" Deck", "")] ?? ae.Red, s = r ?? n * 95 / 71, c = e.enhancers;
|
|
501
501
|
return /* @__PURE__ */ v("div", { style: {
|
|
502
|
-
width:
|
|
502
|
+
width: n,
|
|
503
503
|
height: s,
|
|
504
504
|
flexShrink: 0,
|
|
505
|
-
backgroundImage: `url(${
|
|
506
|
-
backgroundSize: `${
|
|
507
|
-
backgroundPosition: `${-o.x *
|
|
505
|
+
backgroundImage: `url(${i(c.asset)})`,
|
|
506
|
+
backgroundSize: `${n * c.columns}px ${s * c.rows}px`,
|
|
507
|
+
backgroundPosition: `${-o.x * n}px ${-o.y * s}px`,
|
|
508
508
|
backgroundRepeat: "no-repeat",
|
|
509
509
|
imageRendering: "pixelated",
|
|
510
510
|
...a
|
|
@@ -3385,4 +3385,4 @@ function da({ left: e, right: t, className: n = "" }) {
|
|
|
3385
3385
|
//#endregion
|
|
3386
3386
|
export { le as $, Le as A, be as B, qe as C, He as D, Ue as E, De as F, ge as G, P as H, Ee as I, ue as J, ce as K, Te as L, Pe as M, je as N, ze as O, Oe as P, fe as Q, we as R, Ge as S, We as T, _e as U, ve as V, ye as W, de as X, he as Y, pe as Z, Ze as _, sa as a, ee as at, Ye as b, ra as c, C as ct, it as d, se as et, rt as f, et as g, Xe as h, ca as i, ie as it, Ie as j, Re as k, st as l, w as lt, tt as m, ua as n, oe as nt, oa as o, te as ot, nt as p, me as q, la as r, ne as rt, aa as s, T as st, da as t, N as tt, at as u, $e as v, Ke as w, Je as x, Qe as y, xe as z };
|
|
3387
3387
|
|
|
3388
|
-
//# sourceMappingURL=ui-
|
|
3388
|
+
//# sourceMappingURL=ui-BXbEyxHZ.js.map
|