@digilogiclabs/saas-factory-ui 2.8.2 → 2.9.1
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/index.d.mts +43 -7
- package/dist/index.d.ts +43 -7
- package/dist/index.js +329 -146
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +330 -146
- package/dist/index.mjs.map +1 -1
- package/dist/web/index.d.mts +43 -7
- package/dist/web/index.d.ts +43 -7
- package/dist/web/index.js +329 -146
- package/dist/web/index.js.map +1 -1
- package/dist/web/index.mjs +330 -146
- package/dist/web/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -30388,6 +30388,7 @@ function TiltCard({
|
|
|
30388
30388
|
import {
|
|
30389
30389
|
useCallback as useCallback44,
|
|
30390
30390
|
useEffect as useEffect54,
|
|
30391
|
+
useId as useId3,
|
|
30391
30392
|
useMemo as useMemo28,
|
|
30392
30393
|
useRef as useRef39,
|
|
30393
30394
|
useState as useState70
|
|
@@ -30478,17 +30479,226 @@ function d6LandingRotation(value) {
|
|
|
30478
30479
|
y: Math.abs(p.y) === 180 ? 180 : -p.y || 0
|
|
30479
30480
|
};
|
|
30480
30481
|
}
|
|
30481
|
-
var
|
|
30482
|
-
|
|
30483
|
-
|
|
30484
|
-
|
|
30485
|
-
|
|
30486
|
-
|
|
30487
|
-
|
|
30488
|
-
|
|
30489
|
-
|
|
30482
|
+
var PHI = (1 + Math.sqrt(5)) / 2;
|
|
30483
|
+
var dot3 = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
|
|
30484
|
+
var cross3 = (a, b) => [
|
|
30485
|
+
a[1] * b[2] - a[2] * b[1],
|
|
30486
|
+
a[2] * b[0] - a[0] * b[2],
|
|
30487
|
+
a[0] * b[1] - a[1] * b[0]
|
|
30488
|
+
];
|
|
30489
|
+
var sub3 = (a, b) => [
|
|
30490
|
+
a[0] - b[0],
|
|
30491
|
+
a[1] - b[1],
|
|
30492
|
+
a[2] - b[2]
|
|
30493
|
+
];
|
|
30494
|
+
var scale3 = (a, s) => [a[0] * s, a[1] * s, a[2] * s];
|
|
30495
|
+
var len3 = (a) => Math.hypot(a[0], a[1], a[2]);
|
|
30496
|
+
var norm3 = (a) => scale3(a, 1 / len3(a));
|
|
30497
|
+
function rotateAround(p, axis, angle) {
|
|
30498
|
+
const cosA = Math.cos(angle);
|
|
30499
|
+
const sinA = Math.sin(angle);
|
|
30500
|
+
const t1 = scale3(p, cosA);
|
|
30501
|
+
const t2 = scale3(cross3(axis, p), sinA);
|
|
30502
|
+
const t3 = scale3(axis, dot3(axis, p) * (1 - cosA));
|
|
30503
|
+
return [t1[0] + t2[0] + t3[0], t1[1] + t2[1] + t3[1], t1[2] + t2[2] + t3[2]];
|
|
30504
|
+
}
|
|
30505
|
+
function rotationTo(from, to) {
|
|
30506
|
+
const c = dot3(from, to);
|
|
30507
|
+
if (c > 1 - 1e-9) return (p) => p;
|
|
30508
|
+
const axis = c < -1 + 1e-9 ? norm3(
|
|
30509
|
+
Math.abs(from[0]) < 0.9 ? cross3(from, [1, 0, 0]) : cross3(from, [0, 1, 0])
|
|
30510
|
+
) : norm3(cross3(from, to));
|
|
30511
|
+
const angle = Math.acos(Math.max(-1, Math.min(1, c)));
|
|
30512
|
+
return (p) => rotateAround(p, axis, angle);
|
|
30513
|
+
}
|
|
30514
|
+
function solidVertices(sides) {
|
|
30515
|
+
switch (sides) {
|
|
30516
|
+
case 4:
|
|
30517
|
+
return [
|
|
30518
|
+
[1, 1, 1],
|
|
30519
|
+
[1, -1, -1],
|
|
30520
|
+
[-1, 1, -1],
|
|
30521
|
+
[-1, -1, 1]
|
|
30522
|
+
];
|
|
30523
|
+
case 8:
|
|
30524
|
+
return [
|
|
30525
|
+
[1, 0, 0],
|
|
30526
|
+
[-1, 0, 0],
|
|
30527
|
+
[0, 1, 0],
|
|
30528
|
+
[0, -1, 0],
|
|
30529
|
+
[0, 0, 1],
|
|
30530
|
+
[0, 0, -1]
|
|
30531
|
+
];
|
|
30532
|
+
case 10: {
|
|
30533
|
+
const h = 0.15;
|
|
30534
|
+
const cos36 = Math.cos(Math.PI / 5);
|
|
30535
|
+
const zApex = 2 * h / (1 - cos36) * cos36 + h;
|
|
30536
|
+
const verts = [
|
|
30537
|
+
[0, 0, zApex],
|
|
30538
|
+
[0, 0, -zApex]
|
|
30539
|
+
];
|
|
30540
|
+
for (let k = 0; k < 10; k++) {
|
|
30541
|
+
const a = k * Math.PI / 5;
|
|
30542
|
+
verts.push([Math.cos(a), Math.sin(a), k % 2 === 0 ? h : -h]);
|
|
30543
|
+
}
|
|
30544
|
+
return verts;
|
|
30545
|
+
}
|
|
30546
|
+
case 12: {
|
|
30547
|
+
const v = [];
|
|
30548
|
+
for (const sx of [1, -1])
|
|
30549
|
+
for (const sy of [1, -1])
|
|
30550
|
+
for (const sz of [1, -1]) v.push([sx, sy, sz]);
|
|
30551
|
+
const b = 1 / PHI;
|
|
30552
|
+
for (const s1 of [1, -1])
|
|
30553
|
+
for (const s2 of [1, -1]) {
|
|
30554
|
+
v.push([0, s1 * b, s2 * PHI]);
|
|
30555
|
+
v.push([s1 * b, s2 * PHI, 0]);
|
|
30556
|
+
v.push([s2 * PHI, 0, s1 * b]);
|
|
30557
|
+
}
|
|
30558
|
+
return v;
|
|
30559
|
+
}
|
|
30560
|
+
case 20: {
|
|
30561
|
+
const v = [];
|
|
30562
|
+
for (const s1 of [1, -1])
|
|
30563
|
+
for (const s2 of [1, -1]) {
|
|
30564
|
+
v.push([0, s1, s2 * PHI]);
|
|
30565
|
+
v.push([s1, s2 * PHI, 0]);
|
|
30566
|
+
v.push([s2 * PHI, 0, s1]);
|
|
30567
|
+
}
|
|
30568
|
+
return v;
|
|
30569
|
+
}
|
|
30490
30570
|
}
|
|
30491
|
-
}
|
|
30571
|
+
}
|
|
30572
|
+
function computeFaces(verts) {
|
|
30573
|
+
const faces = [];
|
|
30574
|
+
const seen = /* @__PURE__ */ new Set();
|
|
30575
|
+
for (let i = 0; i < verts.length; i++)
|
|
30576
|
+
for (let j = i + 1; j < verts.length; j++)
|
|
30577
|
+
for (let k = j + 1; k < verts.length; k++) {
|
|
30578
|
+
let n = cross3(sub3(verts[j], verts[i]), sub3(verts[k], verts[i]));
|
|
30579
|
+
if (len3(n) < 1e-9) continue;
|
|
30580
|
+
n = norm3(n);
|
|
30581
|
+
let d = dot3(n, verts[i]);
|
|
30582
|
+
if (d < 0) {
|
|
30583
|
+
n = scale3(n, -1);
|
|
30584
|
+
d = -d;
|
|
30585
|
+
}
|
|
30586
|
+
if (verts.some((p) => dot3(n, p) > d + 1e-4)) continue;
|
|
30587
|
+
const ids = verts.flatMap(
|
|
30588
|
+
(p, idx) => Math.abs(dot3(n, p) - d) < 1e-4 ? [idx] : []
|
|
30589
|
+
);
|
|
30590
|
+
const key = ids.join(",");
|
|
30591
|
+
if (seen.has(key)) continue;
|
|
30592
|
+
seen.add(key);
|
|
30593
|
+
faces.push({ normal: n, ids });
|
|
30594
|
+
}
|
|
30595
|
+
return faces;
|
|
30596
|
+
}
|
|
30597
|
+
var polyhedronCache = /* @__PURE__ */ new Map();
|
|
30598
|
+
function buildPolyhedron(sides) {
|
|
30599
|
+
const cached = polyhedronCache.get(sides);
|
|
30600
|
+
if (cached) return cached;
|
|
30601
|
+
let verts = solidVertices(sides);
|
|
30602
|
+
const rough = computeFaces(verts);
|
|
30603
|
+
const front = rough.reduce(
|
|
30604
|
+
(best, f) => f.normal[2] > best.normal[2] + 1e-9 ? f : best
|
|
30605
|
+
);
|
|
30606
|
+
const rot = rotationTo(front.normal, [0, 0, 1]);
|
|
30607
|
+
verts = verts.map(rot);
|
|
30608
|
+
const rMax = Math.max(...verts.map(len3));
|
|
30609
|
+
verts = verts.map((p) => scale3(p, 1 / rMax));
|
|
30610
|
+
const raw = computeFaces(verts);
|
|
30611
|
+
const built = raw.map((f) => {
|
|
30612
|
+
const faceVerts = f.ids.map((i) => verts[i]);
|
|
30613
|
+
const centroid = scale3(
|
|
30614
|
+
faceVerts.reduce((a, b) => [a[0] + b[0], a[1] + b[1], a[2] + b[2]]),
|
|
30615
|
+
1 / faceVerts.length
|
|
30616
|
+
);
|
|
30617
|
+
const w = f.normal;
|
|
30618
|
+
let vRaw = sub3([0, 1, 0], scale3(w, w[1]));
|
|
30619
|
+
if (len3(vRaw) < 1e-6) vRaw = sub3([0, 0, 1], scale3(w, w[2]));
|
|
30620
|
+
const v = norm3(vRaw);
|
|
30621
|
+
const u = cross3(v, w);
|
|
30622
|
+
const pts = faceVerts.map((p) => [
|
|
30623
|
+
dot3(sub3(p, centroid), u),
|
|
30624
|
+
dot3(sub3(p, centroid), v)
|
|
30625
|
+
]).sort((a, b) => Math.atan2(a[1], a[0]) - Math.atan2(b[1], b[0]));
|
|
30626
|
+
return { normal: w, centroid, u, v, pts, value: 0 };
|
|
30627
|
+
});
|
|
30628
|
+
built.sort((a, b) => b.normal[2] - a.normal[2]);
|
|
30629
|
+
const oppOf = (i) => built.findIndex((g) => dot3(built[i].normal, g.normal) < -0.9999);
|
|
30630
|
+
const pool = [];
|
|
30631
|
+
for (let v2 = 1; v2 < sides; v2++) pool.push(v2);
|
|
30632
|
+
built[0].value = sides;
|
|
30633
|
+
const opp0 = oppOf(0);
|
|
30634
|
+
if (opp0 >= 0) {
|
|
30635
|
+
built[opp0].value = 1;
|
|
30636
|
+
pool.splice(pool.indexOf(1), 1);
|
|
30637
|
+
}
|
|
30638
|
+
for (let i = 1; i < built.length; i++) {
|
|
30639
|
+
if (built[i].value !== 0) continue;
|
|
30640
|
+
const v2 = pool.shift();
|
|
30641
|
+
built[i].value = v2;
|
|
30642
|
+
const j = oppOf(i);
|
|
30643
|
+
if (j >= 0 && built[j].value === 0) {
|
|
30644
|
+
built[j].value = sides + 1 - v2;
|
|
30645
|
+
pool.splice(pool.indexOf(sides + 1 - v2), 1);
|
|
30646
|
+
}
|
|
30647
|
+
}
|
|
30648
|
+
const faceRadius = Math.max(
|
|
30649
|
+
...built.flatMap((f) => f.pts.map(([x, y]) => Math.hypot(x, y)))
|
|
30650
|
+
);
|
|
30651
|
+
const edgeDist = (pts) => Math.min(
|
|
30652
|
+
...pts.map((p1, i2) => {
|
|
30653
|
+
const p2 = pts[(i2 + 1) % pts.length];
|
|
30654
|
+
const dx = p2[0] - p1[0];
|
|
30655
|
+
const dy = p2[1] - p1[1];
|
|
30656
|
+
const t = Math.max(
|
|
30657
|
+
0,
|
|
30658
|
+
Math.min(1, -(p1[0] * dx + p1[1] * dy) / (dx * dx + dy * dy))
|
|
30659
|
+
);
|
|
30660
|
+
return Math.hypot(p1[0] + t * dx, p1[1] + t * dy);
|
|
30661
|
+
})
|
|
30662
|
+
);
|
|
30663
|
+
const faceInradius = Math.min(...built.map((f) => edgeDist(f.pts)));
|
|
30664
|
+
const opposite = built.map((_, i) => oppOf(i));
|
|
30665
|
+
const result = {
|
|
30666
|
+
faces: built,
|
|
30667
|
+
opposite,
|
|
30668
|
+
faceRadius,
|
|
30669
|
+
faceInradius
|
|
30670
|
+
};
|
|
30671
|
+
polyhedronCache.set(sides, result);
|
|
30672
|
+
return result;
|
|
30673
|
+
}
|
|
30674
|
+
function dealFaceValues(geo, sides, rolled) {
|
|
30675
|
+
const n = geo.faces.length;
|
|
30676
|
+
const out = new Array(n).fill(0);
|
|
30677
|
+
const used = /* @__PURE__ */ new Set([rolled]);
|
|
30678
|
+
out[0] = rolled;
|
|
30679
|
+
const opp0 = geo.opposite[0];
|
|
30680
|
+
if (opp0 >= 0) {
|
|
30681
|
+
out[opp0] = sides + 1 - rolled;
|
|
30682
|
+
used.add(sides + 1 - rolled);
|
|
30683
|
+
}
|
|
30684
|
+
const values = [];
|
|
30685
|
+
for (let v = 1; v <= sides; v++) if (!used.has(v)) values.push(v);
|
|
30686
|
+
for (let i = values.length - 1; i > 0; i--) {
|
|
30687
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
30688
|
+
[values[i], values[j]] = [values[j], values[i]];
|
|
30689
|
+
}
|
|
30690
|
+
for (let fi = 1; fi < n; fi++) {
|
|
30691
|
+
if (out[fi] !== 0) continue;
|
|
30692
|
+
const v = values.shift();
|
|
30693
|
+
out[fi] = v;
|
|
30694
|
+
const o = geo.opposite[fi];
|
|
30695
|
+
if (o >= 0 && out[o] === 0) {
|
|
30696
|
+
out[o] = sides + 1 - v;
|
|
30697
|
+
values.splice(values.indexOf(sides + 1 - v), 1);
|
|
30698
|
+
}
|
|
30699
|
+
}
|
|
30700
|
+
return out;
|
|
30701
|
+
}
|
|
30492
30702
|
function formatDieValue(v, sides) {
|
|
30493
30703
|
return sides > 8 && (v === 6 || v === 9) ? `${v}.` : String(v);
|
|
30494
30704
|
}
|
|
@@ -30674,7 +30884,7 @@ function DiceRoller({
|
|
|
30674
30884
|
const dieWrapperRefs = useRef39([]);
|
|
30675
30885
|
const cubeRefs = useRef39([]);
|
|
30676
30886
|
const shadowRefs = useRef39([]);
|
|
30677
|
-
const
|
|
30887
|
+
const faceTextRefs = useRef39([]);
|
|
30678
30888
|
const currentPositionsRef = useRef39(null);
|
|
30679
30889
|
const rollingRef = useRef39(false);
|
|
30680
30890
|
const dieSetters = useRef39([]);
|
|
@@ -30704,15 +30914,18 @@ function DiceRoller({
|
|
|
30704
30914
|
}
|
|
30705
30915
|
return shadowSetters.current[i];
|
|
30706
30916
|
};
|
|
30707
|
-
const
|
|
30708
|
-
const
|
|
30709
|
-
if (!
|
|
30710
|
-
|
|
30711
|
-
|
|
30917
|
+
const faceTextSetters = useRef39([]);
|
|
30918
|
+
const getFaceTextSetter = (i, fi) => {
|
|
30919
|
+
if (!faceTextSetters.current[i]) faceTextSetters.current[i] = [];
|
|
30920
|
+
if (!faceTextSetters.current[i][fi]) {
|
|
30921
|
+
faceTextSetters.current[i][fi] = (el) => {
|
|
30922
|
+
if (!faceTextRefs.current[i]) faceTextRefs.current[i] = [];
|
|
30923
|
+
faceTextRefs.current[i][fi] = el;
|
|
30712
30924
|
};
|
|
30713
30925
|
}
|
|
30714
|
-
return
|
|
30926
|
+
return faceTextSetters.current[i][fi];
|
|
30715
30927
|
};
|
|
30928
|
+
const sheenGradientId = useId3();
|
|
30716
30929
|
const timersRef = useRef39([]);
|
|
30717
30930
|
const rafHandleRef = useRef39(null);
|
|
30718
30931
|
const arenaRef = useRef39(null);
|
|
@@ -30916,12 +31129,15 @@ function DiceRoller({
|
|
|
30916
31129
|
for (let f = 1; f <= flickerTicks; f++) {
|
|
30917
31130
|
const t = setTimeout(() => {
|
|
30918
31131
|
for (let i = 0; i < clampedCount; i++) {
|
|
30919
|
-
const
|
|
30920
|
-
if (
|
|
30921
|
-
|
|
30922
|
-
|
|
30923
|
-
|
|
30924
|
-
|
|
31132
|
+
const texts = faceTextRefs.current[i];
|
|
31133
|
+
if (!texts) continue;
|
|
31134
|
+
for (const el of texts) {
|
|
31135
|
+
if (el)
|
|
31136
|
+
el.textContent = formatDieValue(
|
|
31137
|
+
Math.floor(Math.random() * sides) + 1,
|
|
31138
|
+
sides
|
|
31139
|
+
);
|
|
31140
|
+
}
|
|
30925
31141
|
}
|
|
30926
31142
|
}, f * flickerStep);
|
|
30927
31143
|
timersRef.current.push(t);
|
|
@@ -30948,9 +31164,19 @@ function DiceRoller({
|
|
|
30948
31164
|
});
|
|
30949
31165
|
const settleTimer = setTimeout(() => {
|
|
30950
31166
|
if (sides !== 6) {
|
|
31167
|
+
const geo = buildPolyhedron(sides);
|
|
30951
31168
|
for (let i = 0; i < clampedCount; i++) {
|
|
30952
|
-
const
|
|
30953
|
-
if (
|
|
31169
|
+
const texts = faceTextRefs.current[i];
|
|
31170
|
+
if (!texts) continue;
|
|
31171
|
+
const dealt = dealFaceValues(
|
|
31172
|
+
geo,
|
|
31173
|
+
sides,
|
|
31174
|
+
vals[i]
|
|
31175
|
+
);
|
|
31176
|
+
for (let fi = 0; fi < dealt.length; fi++) {
|
|
31177
|
+
const el = texts[fi];
|
|
31178
|
+
if (el) el.textContent = formatDieValue(dealt[fi], sides);
|
|
31179
|
+
}
|
|
30954
31180
|
}
|
|
30955
31181
|
}
|
|
30956
31182
|
setResults(vals);
|
|
@@ -31098,99 +31324,97 @@ function DiceRoller({
|
|
|
31098
31324
|
},
|
|
31099
31325
|
val
|
|
31100
31326
|
)) : (() => {
|
|
31101
|
-
const
|
|
31327
|
+
const geo = buildPolyhedron(sides);
|
|
31328
|
+
const R = effectiveSize / 2;
|
|
31329
|
+
const S = Math.ceil(geo.faceRadius * R * 2) + 6;
|
|
31330
|
+
const fontSize = geo.faceInradius * R * 1.15;
|
|
31102
31331
|
const shown = results?.[d] ?? sides;
|
|
31103
|
-
|
|
31104
|
-
|
|
31105
|
-
|
|
31106
|
-
|
|
31107
|
-
|
|
31108
|
-
|
|
31109
|
-
|
|
31110
|
-
backfaceVisibility: "hidden"
|
|
31111
|
-
};
|
|
31112
|
-
return /* @__PURE__ */ jsxs86(Fragment30, { children: [
|
|
31113
|
-
Array.from({ length: edgeLayers }, (_2, li) => {
|
|
31114
|
-
const z = -depth / 2 + depth * (li + 0.5) / edgeLayers;
|
|
31115
|
-
return /* @__PURE__ */ jsxs86(
|
|
31116
|
-
"svg",
|
|
31117
|
-
{
|
|
31118
|
-
viewBox: "0 0 100 100",
|
|
31119
|
-
width: "100%",
|
|
31120
|
-
height: "100%",
|
|
31121
|
-
style: {
|
|
31122
|
-
position: "absolute",
|
|
31123
|
-
inset: 0,
|
|
31124
|
-
display: "block",
|
|
31125
|
-
overflow: "visible",
|
|
31126
|
-
transform: `translateZ(${z}px)`
|
|
31127
|
-
},
|
|
31128
|
-
"aria-hidden": "true",
|
|
31129
|
-
children: [
|
|
31130
|
-
/* @__PURE__ */ jsx114(
|
|
31131
|
-
"polygon",
|
|
31132
|
-
{
|
|
31133
|
-
points: shape.points,
|
|
31134
|
-
fill: colors.face
|
|
31135
|
-
}
|
|
31136
|
-
),
|
|
31137
|
-
/* @__PURE__ */ jsx114(
|
|
31138
|
-
"polygon",
|
|
31139
|
-
{
|
|
31140
|
-
points: shape.points,
|
|
31141
|
-
fill: "#000",
|
|
31142
|
-
opacity: 0.22
|
|
31143
|
-
}
|
|
31144
|
-
)
|
|
31145
|
-
]
|
|
31146
|
-
},
|
|
31147
|
-
li
|
|
31148
|
-
);
|
|
31149
|
-
}),
|
|
31150
|
-
/* @__PURE__ */ jsxs86(
|
|
31332
|
+
return /* @__PURE__ */ jsx114(Fragment30, { children: geo.faces.map((f, fi) => {
|
|
31333
|
+
const m = `matrix3d(${f.u[0]},${f.u[1]},${f.u[2]},0,${f.v[0]},${f.v[1]},${f.v[2]},0,${f.normal[0]},${f.normal[1]},${f.normal[2]},0,${f.centroid[0] * R},${f.centroid[1] * R},${f.centroid[2] * R},1)`;
|
|
31334
|
+
const gid = `${sheenGradientId}-${d}-${fi}`;
|
|
31335
|
+
const pts = f.pts.map(
|
|
31336
|
+
([x, y]) => `${(x * R + S / 2).toFixed(2)},${(y * R + S / 2).toFixed(2)}`
|
|
31337
|
+
).join(" ");
|
|
31338
|
+
return /* @__PURE__ */ jsxs86(
|
|
31151
31339
|
"svg",
|
|
31152
31340
|
{
|
|
31153
|
-
|
|
31154
|
-
|
|
31155
|
-
|
|
31341
|
+
width: S,
|
|
31342
|
+
height: S,
|
|
31343
|
+
viewBox: `0 0 ${S} ${S}`,
|
|
31156
31344
|
style: {
|
|
31157
|
-
|
|
31158
|
-
|
|
31345
|
+
position: "absolute",
|
|
31346
|
+
left: "50%",
|
|
31347
|
+
top: "50%",
|
|
31348
|
+
marginLeft: -S / 2,
|
|
31349
|
+
marginTop: -S / 2,
|
|
31350
|
+
overflow: "visible",
|
|
31351
|
+
transform: m,
|
|
31352
|
+
// Convex solid: a face is either front-
|
|
31353
|
+
// facing or hidden behind nearer faces,
|
|
31354
|
+
// so hiding backfaces is both correct
|
|
31355
|
+
// and the mirrored-numeral guard.
|
|
31356
|
+
backfaceVisibility: "hidden"
|
|
31159
31357
|
},
|
|
31160
31358
|
"aria-hidden": "true",
|
|
31161
31359
|
children: [
|
|
31162
|
-
/* @__PURE__ */ jsx114(
|
|
31163
|
-
"
|
|
31360
|
+
/* @__PURE__ */ jsx114("defs", { children: /* @__PURE__ */ jsxs86(
|
|
31361
|
+
"radialGradient",
|
|
31164
31362
|
{
|
|
31165
|
-
|
|
31166
|
-
|
|
31167
|
-
|
|
31168
|
-
|
|
31169
|
-
|
|
31170
|
-
|
|
31363
|
+
id: gid,
|
|
31364
|
+
cx: "32%",
|
|
31365
|
+
cy: "26%",
|
|
31366
|
+
r: "80%",
|
|
31367
|
+
children: [
|
|
31368
|
+
/* @__PURE__ */ jsx114(
|
|
31369
|
+
"stop",
|
|
31370
|
+
{
|
|
31371
|
+
offset: "0%",
|
|
31372
|
+
stopColor: "#fff",
|
|
31373
|
+
stopOpacity: "0.38"
|
|
31374
|
+
}
|
|
31375
|
+
),
|
|
31376
|
+
/* @__PURE__ */ jsx114(
|
|
31377
|
+
"stop",
|
|
31378
|
+
{
|
|
31379
|
+
offset: "55%",
|
|
31380
|
+
stopColor: "#fff",
|
|
31381
|
+
stopOpacity: "0.08"
|
|
31382
|
+
}
|
|
31383
|
+
),
|
|
31384
|
+
/* @__PURE__ */ jsx114(
|
|
31385
|
+
"stop",
|
|
31386
|
+
{
|
|
31387
|
+
offset: "100%",
|
|
31388
|
+
stopColor: "#fff",
|
|
31389
|
+
stopOpacity: "0"
|
|
31390
|
+
}
|
|
31391
|
+
)
|
|
31392
|
+
]
|
|
31171
31393
|
}
|
|
31172
|
-
),
|
|
31394
|
+
) }),
|
|
31173
31395
|
/* @__PURE__ */ jsx114(
|
|
31174
31396
|
"polygon",
|
|
31175
31397
|
{
|
|
31176
|
-
points:
|
|
31177
|
-
fill:
|
|
31398
|
+
points: pts,
|
|
31399
|
+
fill: colors.face,
|
|
31178
31400
|
stroke: colors.faceBorder,
|
|
31179
31401
|
strokeWidth: 1.5,
|
|
31180
31402
|
strokeLinejoin: "round",
|
|
31181
|
-
|
|
31182
|
-
|
|
31403
|
+
style: {
|
|
31404
|
+
transition: "fill 0.3s, stroke 0.3s"
|
|
31405
|
+
}
|
|
31183
31406
|
}
|
|
31184
31407
|
),
|
|
31408
|
+
/* @__PURE__ */ jsx114("polygon", { points: pts, fill: `url(#${gid})` }),
|
|
31185
31409
|
/* @__PURE__ */ jsx114(
|
|
31186
31410
|
"text",
|
|
31187
31411
|
{
|
|
31188
|
-
ref:
|
|
31189
|
-
x:
|
|
31190
|
-
y:
|
|
31412
|
+
ref: getFaceTextSetter(d, fi),
|
|
31413
|
+
x: S / 2,
|
|
31414
|
+
y: S / 2,
|
|
31191
31415
|
textAnchor: "middle",
|
|
31192
31416
|
dominantBaseline: "central",
|
|
31193
|
-
fontSize
|
|
31417
|
+
fontSize,
|
|
31194
31418
|
fontWeight: 800,
|
|
31195
31419
|
fill: colors.pip,
|
|
31196
31420
|
style: {
|
|
@@ -31198,59 +31422,17 @@ function DiceRoller({
|
|
|
31198
31422
|
transition: "fill 0.3s",
|
|
31199
31423
|
userSelect: "none"
|
|
31200
31424
|
},
|
|
31201
|
-
children: formatDieValue(
|
|
31425
|
+
children: formatDieValue(
|
|
31426
|
+
fi === 0 ? shown : f.value,
|
|
31427
|
+
sides
|
|
31428
|
+
)
|
|
31202
31429
|
}
|
|
31203
31430
|
)
|
|
31204
31431
|
]
|
|
31205
|
-
}
|
|
31206
|
-
|
|
31207
|
-
|
|
31208
|
-
|
|
31209
|
-
{
|
|
31210
|
-
viewBox: "0 0 100 100",
|
|
31211
|
-
width: "100%",
|
|
31212
|
-
height: "100%",
|
|
31213
|
-
style: {
|
|
31214
|
-
...cardFaceStyle,
|
|
31215
|
-
transform: `rotateY(180deg) translateZ(${depth / 2}px)`
|
|
31216
|
-
},
|
|
31217
|
-
"aria-hidden": "true",
|
|
31218
|
-
children: [
|
|
31219
|
-
/* @__PURE__ */ jsx114(
|
|
31220
|
-
"polygon",
|
|
31221
|
-
{
|
|
31222
|
-
points: shape.points,
|
|
31223
|
-
fill: colors.face,
|
|
31224
|
-
stroke: colors.faceBorder,
|
|
31225
|
-
strokeWidth: 2.5,
|
|
31226
|
-
strokeLinejoin: "round",
|
|
31227
|
-
style: { transition: "fill 0.3s, stroke 0.3s" }
|
|
31228
|
-
}
|
|
31229
|
-
),
|
|
31230
|
-
/* @__PURE__ */ jsx114(
|
|
31231
|
-
"polygon",
|
|
31232
|
-
{
|
|
31233
|
-
points: shape.points,
|
|
31234
|
-
fill: "none",
|
|
31235
|
-
stroke: colors.faceBorder,
|
|
31236
|
-
strokeWidth: 1.5,
|
|
31237
|
-
strokeLinejoin: "round",
|
|
31238
|
-
opacity: 0.55,
|
|
31239
|
-
transform: "translate(50 50) scale(0.76) translate(-50 -50)"
|
|
31240
|
-
}
|
|
31241
|
-
),
|
|
31242
|
-
/* @__PURE__ */ jsx114(
|
|
31243
|
-
"polygon",
|
|
31244
|
-
{
|
|
31245
|
-
points: shape.points,
|
|
31246
|
-
fill: "#000",
|
|
31247
|
-
opacity: 0.14
|
|
31248
|
-
}
|
|
31249
|
-
)
|
|
31250
|
-
]
|
|
31251
|
-
}
|
|
31252
|
-
)
|
|
31253
|
-
] });
|
|
31432
|
+
},
|
|
31433
|
+
fi
|
|
31434
|
+
);
|
|
31435
|
+
}) });
|
|
31254
31436
|
})()
|
|
31255
31437
|
}
|
|
31256
31438
|
)
|
|
@@ -45705,6 +45887,7 @@ export {
|
|
|
45705
45887
|
audioAppTabs,
|
|
45706
45888
|
audioPlayerVariants,
|
|
45707
45889
|
breadcrumbsVariants,
|
|
45890
|
+
buildPolyhedron,
|
|
45708
45891
|
cn,
|
|
45709
45892
|
commonValidators,
|
|
45710
45893
|
containerVariants2 as containerVariants,
|
|
@@ -45717,6 +45900,7 @@ export {
|
|
|
45717
45900
|
createTransition,
|
|
45718
45901
|
d6LandingRotation,
|
|
45719
45902
|
dailyTrendingConfig,
|
|
45903
|
+
dealFaceValues,
|
|
45720
45904
|
detectAuthProvider,
|
|
45721
45905
|
detectDelimiter,
|
|
45722
45906
|
detectHeader,
|