@digilogiclabs/saas-factory-ui 2.8.0 → 2.8.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 +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +119 -66
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -66
- package/dist/index.mjs.map +1 -1
- package/dist/web/index.d.mts +7 -2
- package/dist/web/index.d.ts +7 -2
- package/dist/web/index.js +119 -66
- package/dist/web/index.js.map +1 -1
- package/dist/web/index.mjs +119 -66
- package/dist/web/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -30871,17 +30871,13 @@ function DiceRoller({
|
|
|
30871
30871
|
const starts = currentPositionsRef.current ?? defaultPositions(w, h, clampedCount);
|
|
30872
30872
|
const frames = simulateDice(w, h, effectiveSize, starts, clampedCount);
|
|
30873
30873
|
for (let i = 0; i < clampedCount; i++) {
|
|
30874
|
-
|
|
30875
|
-
|
|
30876
|
-
|
|
30877
|
-
|
|
30878
|
-
|
|
30879
|
-
|
|
30880
|
-
|
|
30881
|
-
);
|
|
30882
|
-
} else {
|
|
30883
|
-
writeCubeRotation(i, 0, 0, (Math.random() - 0.5) * 720, false);
|
|
30884
|
-
}
|
|
30874
|
+
writeCubeRotation(
|
|
30875
|
+
i,
|
|
30876
|
+
(Math.random() - 0.5) * 720,
|
|
30877
|
+
(Math.random() - 0.5) * 720,
|
|
30878
|
+
(Math.random() - 0.5) * 720,
|
|
30879
|
+
false
|
|
30880
|
+
);
|
|
30885
30881
|
const el = dieWrapperRefs.current[i];
|
|
30886
30882
|
if (el) el.style.transition = "none";
|
|
30887
30883
|
const shadow = shadowRefs.current[i];
|
|
@@ -30942,8 +30938,10 @@ function DiceRoller({
|
|
|
30942
30938
|
const lz = (Math.random() > 0.5 ? 1 : -1) * 360;
|
|
30943
30939
|
writeCubeRotation(i, lx, ly, lz, true, tilt);
|
|
30944
30940
|
} else {
|
|
30941
|
+
const lx = (Math.random() > 0.5 ? 1 : -1) * 720;
|
|
30942
|
+
const ly = (Math.random() > 0.5 ? 1 : -1) * 360;
|
|
30945
30943
|
const lz = (Math.random() > 0.5 ? 1 : -1) * 720 + tilt;
|
|
30946
|
-
writeCubeRotation(i,
|
|
30944
|
+
writeCubeRotation(i, lx, ly, lz, true);
|
|
30947
30945
|
}
|
|
30948
30946
|
}
|
|
30949
30947
|
});
|
|
@@ -31102,60 +31100,115 @@ function DiceRoller({
|
|
|
31102
31100
|
)) : (() => {
|
|
31103
31101
|
const shape = POLY_SHAPES[sides];
|
|
31104
31102
|
const shown = results?.[d] ?? sides;
|
|
31105
|
-
|
|
31106
|
-
"
|
|
31107
|
-
|
|
31108
|
-
|
|
31109
|
-
|
|
31110
|
-
|
|
31111
|
-
|
|
31112
|
-
|
|
31113
|
-
|
|
31114
|
-
|
|
31115
|
-
|
|
31116
|
-
|
|
31117
|
-
|
|
31118
|
-
|
|
31119
|
-
|
|
31120
|
-
|
|
31121
|
-
|
|
31122
|
-
|
|
31123
|
-
|
|
31124
|
-
|
|
31125
|
-
|
|
31126
|
-
|
|
31127
|
-
|
|
31128
|
-
|
|
31129
|
-
|
|
31130
|
-
|
|
31131
|
-
|
|
31132
|
-
|
|
31133
|
-
|
|
31134
|
-
|
|
31135
|
-
|
|
31136
|
-
|
|
31137
|
-
|
|
31138
|
-
|
|
31139
|
-
|
|
31140
|
-
|
|
31141
|
-
|
|
31142
|
-
|
|
31143
|
-
|
|
31144
|
-
|
|
31145
|
-
|
|
31146
|
-
|
|
31147
|
-
|
|
31148
|
-
|
|
31149
|
-
|
|
31150
|
-
|
|
31151
|
-
|
|
31152
|
-
|
|
31153
|
-
|
|
31154
|
-
|
|
31155
|
-
|
|
31156
|
-
|
|
31157
|
-
|
|
31158
|
-
|
|
31103
|
+
const cardFaceStyle = {
|
|
31104
|
+
position: "absolute",
|
|
31105
|
+
inset: 0,
|
|
31106
|
+
display: "block",
|
|
31107
|
+
overflow: "visible",
|
|
31108
|
+
backfaceVisibility: "hidden"
|
|
31109
|
+
};
|
|
31110
|
+
return /* @__PURE__ */ jsxs86(Fragment30, { children: [
|
|
31111
|
+
/* @__PURE__ */ jsxs86(
|
|
31112
|
+
"svg",
|
|
31113
|
+
{
|
|
31114
|
+
viewBox: "0 0 100 100",
|
|
31115
|
+
width: "100%",
|
|
31116
|
+
height: "100%",
|
|
31117
|
+
style: cardFaceStyle,
|
|
31118
|
+
"aria-hidden": "true",
|
|
31119
|
+
children: [
|
|
31120
|
+
/* @__PURE__ */ jsx114(
|
|
31121
|
+
"polygon",
|
|
31122
|
+
{
|
|
31123
|
+
points: shape.points,
|
|
31124
|
+
fill: colors.face,
|
|
31125
|
+
stroke: colors.faceBorder,
|
|
31126
|
+
strokeWidth: 2.5,
|
|
31127
|
+
strokeLinejoin: "round",
|
|
31128
|
+
style: { transition: "fill 0.3s, stroke 0.3s" }
|
|
31129
|
+
}
|
|
31130
|
+
),
|
|
31131
|
+
/* @__PURE__ */ jsx114(
|
|
31132
|
+
"polygon",
|
|
31133
|
+
{
|
|
31134
|
+
points: shape.points,
|
|
31135
|
+
fill: "none",
|
|
31136
|
+
stroke: colors.faceBorder,
|
|
31137
|
+
strokeWidth: 1.5,
|
|
31138
|
+
strokeLinejoin: "round",
|
|
31139
|
+
opacity: 0.55,
|
|
31140
|
+
transform: "translate(50 50) scale(0.76) translate(-50 -50)"
|
|
31141
|
+
}
|
|
31142
|
+
),
|
|
31143
|
+
/* @__PURE__ */ jsx114(
|
|
31144
|
+
"text",
|
|
31145
|
+
{
|
|
31146
|
+
ref: getNumeralSetter(d),
|
|
31147
|
+
x: 50,
|
|
31148
|
+
y: shape.textY,
|
|
31149
|
+
textAnchor: "middle",
|
|
31150
|
+
dominantBaseline: "central",
|
|
31151
|
+
fontSize: 100 * shape.fontScale,
|
|
31152
|
+
fontWeight: 800,
|
|
31153
|
+
fill: colors.pip,
|
|
31154
|
+
style: {
|
|
31155
|
+
fontVariantNumeric: "tabular-nums",
|
|
31156
|
+
transition: "fill 0.3s",
|
|
31157
|
+
userSelect: "none"
|
|
31158
|
+
},
|
|
31159
|
+
children: formatDieValue(shown, sides)
|
|
31160
|
+
}
|
|
31161
|
+
)
|
|
31162
|
+
]
|
|
31163
|
+
}
|
|
31164
|
+
),
|
|
31165
|
+
/* @__PURE__ */ jsxs86(
|
|
31166
|
+
"svg",
|
|
31167
|
+
{
|
|
31168
|
+
viewBox: "0 0 100 100",
|
|
31169
|
+
width: "100%",
|
|
31170
|
+
height: "100%",
|
|
31171
|
+
style: {
|
|
31172
|
+
...cardFaceStyle,
|
|
31173
|
+
transform: "rotateY(180deg)"
|
|
31174
|
+
},
|
|
31175
|
+
"aria-hidden": "true",
|
|
31176
|
+
children: [
|
|
31177
|
+
/* @__PURE__ */ jsx114(
|
|
31178
|
+
"polygon",
|
|
31179
|
+
{
|
|
31180
|
+
points: shape.points,
|
|
31181
|
+
fill: colors.face,
|
|
31182
|
+
stroke: colors.faceBorder,
|
|
31183
|
+
strokeWidth: 2.5,
|
|
31184
|
+
strokeLinejoin: "round",
|
|
31185
|
+
style: { transition: "fill 0.3s, stroke 0.3s" }
|
|
31186
|
+
}
|
|
31187
|
+
),
|
|
31188
|
+
/* @__PURE__ */ jsx114(
|
|
31189
|
+
"polygon",
|
|
31190
|
+
{
|
|
31191
|
+
points: shape.points,
|
|
31192
|
+
fill: "none",
|
|
31193
|
+
stroke: colors.faceBorder,
|
|
31194
|
+
strokeWidth: 1.5,
|
|
31195
|
+
strokeLinejoin: "round",
|
|
31196
|
+
opacity: 0.55,
|
|
31197
|
+
transform: "translate(50 50) scale(0.76) translate(-50 -50)"
|
|
31198
|
+
}
|
|
31199
|
+
),
|
|
31200
|
+
/* @__PURE__ */ jsx114(
|
|
31201
|
+
"polygon",
|
|
31202
|
+
{
|
|
31203
|
+
points: shape.points,
|
|
31204
|
+
fill: "#000",
|
|
31205
|
+
opacity: 0.14
|
|
31206
|
+
}
|
|
31207
|
+
)
|
|
31208
|
+
]
|
|
31209
|
+
}
|
|
31210
|
+
)
|
|
31211
|
+
] });
|
|
31159
31212
|
})()
|
|
31160
31213
|
}
|
|
31161
31214
|
)
|