@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 CHANGED
@@ -4612,7 +4612,9 @@ declare function TiltCard({ accent, accentSecondary, topLabel, icon, title, subt
4612
4612
  * Features:
4613
4613
  * - 1 to 6 dice; d6 renders as a full 3D cube (six faces, CSS
4614
4614
  * transforms, standard layout — opposite faces sum to 7); d4/d8/
4615
- * d10/d12/d20 render as themed polyhedron silhouettes with numerals
4615
+ * d10/d12/d20 render as two-sided 3D polyhedron cards (numeral
4616
+ * front + shaded back, hidden backfaces) that tumble on every
4617
+ * axis with the same chaos-snap-then-settle motion as the cube
4616
4618
  * - Displayed face is structurally guaranteed to match the recorded
4617
4619
  * value: the d6 landing rotation is DERIVED as the inverse of the
4618
4620
  * face placement (one source of truth), and non-cube dice render
@@ -5926,7 +5928,10 @@ interface ScoreboardProps {
5926
5928
  onBeforeNewGame?: () => boolean;
5927
5929
  /** Max characters accepted in a team-name input. Unlimited by default. */
5928
5930
  nameMaxLength?: number;
5929
- /** Lower clamp for scores driven by the +/− buttons. Default −9999. */
5931
+ /** Lower clamp for scores driven by the +/− buttons. Default −9999.
5932
+ * Seeded/resumed scores are NOT rewritten at init — an out-of-range
5933
+ * restored score renders as-is and snaps into range on the first
5934
+ * button press. Changing the bounds does not reset current scores. */
5930
5935
  scoreMin?: number;
5931
5936
  /** Upper clamp for scores driven by the +/− buttons. Default 9999. */
5932
5937
  scoreMax?: number;
package/dist/index.d.ts CHANGED
@@ -4612,7 +4612,9 @@ declare function TiltCard({ accent, accentSecondary, topLabel, icon, title, subt
4612
4612
  * Features:
4613
4613
  * - 1 to 6 dice; d6 renders as a full 3D cube (six faces, CSS
4614
4614
  * transforms, standard layout — opposite faces sum to 7); d4/d8/
4615
- * d10/d12/d20 render as themed polyhedron silhouettes with numerals
4615
+ * d10/d12/d20 render as two-sided 3D polyhedron cards (numeral
4616
+ * front + shaded back, hidden backfaces) that tumble on every
4617
+ * axis with the same chaos-snap-then-settle motion as the cube
4616
4618
  * - Displayed face is structurally guaranteed to match the recorded
4617
4619
  * value: the d6 landing rotation is DERIVED as the inverse of the
4618
4620
  * face placement (one source of truth), and non-cube dice render
@@ -5926,7 +5928,10 @@ interface ScoreboardProps {
5926
5928
  onBeforeNewGame?: () => boolean;
5927
5929
  /** Max characters accepted in a team-name input. Unlimited by default. */
5928
5930
  nameMaxLength?: number;
5929
- /** Lower clamp for scores driven by the +/− buttons. Default −9999. */
5931
+ /** Lower clamp for scores driven by the +/− buttons. Default −9999.
5932
+ * Seeded/resumed scores are NOT rewritten at init — an out-of-range
5933
+ * restored score renders as-is and snaps into range on the first
5934
+ * button press. Changing the bounds does not reset current scores. */
5930
5935
  scoreMin?: number;
5931
5936
  /** Upper clamp for scores driven by the +/− buttons. Default 9999. */
5932
5937
  scoreMax?: number;
package/dist/index.js CHANGED
@@ -30925,17 +30925,13 @@ function DiceRoller({
30925
30925
  const starts = currentPositionsRef.current ?? defaultPositions(w, h, clampedCount);
30926
30926
  const frames = simulateDice(w, h, effectiveSize, starts, clampedCount);
30927
30927
  for (let i = 0; i < clampedCount; i++) {
30928
- if (sides === 6) {
30929
- writeCubeRotation(
30930
- i,
30931
- (Math.random() - 0.5) * 720,
30932
- (Math.random() - 0.5) * 720,
30933
- (Math.random() - 0.5) * 720,
30934
- false
30935
- );
30936
- } else {
30937
- writeCubeRotation(i, 0, 0, (Math.random() - 0.5) * 720, false);
30938
- }
30928
+ writeCubeRotation(
30929
+ i,
30930
+ (Math.random() - 0.5) * 720,
30931
+ (Math.random() - 0.5) * 720,
30932
+ (Math.random() - 0.5) * 720,
30933
+ false
30934
+ );
30939
30935
  const el = dieWrapperRefs.current[i];
30940
30936
  if (el) el.style.transition = "none";
30941
30937
  const shadow = shadowRefs.current[i];
@@ -30996,8 +30992,10 @@ function DiceRoller({
30996
30992
  const lz = (Math.random() > 0.5 ? 1 : -1) * 360;
30997
30993
  writeCubeRotation(i, lx, ly, lz, true, tilt);
30998
30994
  } else {
30995
+ const lx = (Math.random() > 0.5 ? 1 : -1) * 720;
30996
+ const ly = (Math.random() > 0.5 ? 1 : -1) * 360;
30999
30997
  const lz = (Math.random() > 0.5 ? 1 : -1) * 720 + tilt;
31000
- writeCubeRotation(i, 0, 0, lz, true);
30998
+ writeCubeRotation(i, lx, ly, lz, true);
31001
30999
  }
31002
31000
  }
31003
31001
  });
@@ -31156,60 +31154,115 @@ function DiceRoller({
31156
31154
  )) : (() => {
31157
31155
  const shape = POLY_SHAPES[sides];
31158
31156
  const shown = results?.[d] ?? sides;
31159
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
31160
- "svg",
31161
- {
31162
- viewBox: "0 0 100 100",
31163
- width: "100%",
31164
- height: "100%",
31165
- style: { display: "block", overflow: "visible" },
31166
- "aria-hidden": "true",
31167
- children: [
31168
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31169
- "polygon",
31170
- {
31171
- points: shape.points,
31172
- fill: colors.face,
31173
- stroke: colors.faceBorder,
31174
- strokeWidth: 2.5,
31175
- strokeLinejoin: "round",
31176
- style: { transition: "fill 0.3s, stroke 0.3s" }
31177
- }
31178
- ),
31179
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31180
- "polygon",
31181
- {
31182
- points: shape.points,
31183
- fill: "none",
31184
- stroke: colors.faceBorder,
31185
- strokeWidth: 1.5,
31186
- strokeLinejoin: "round",
31187
- opacity: 0.55,
31188
- transform: "translate(50 50) scale(0.76) translate(-50 -50)"
31189
- }
31190
- ),
31191
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31192
- "text",
31193
- {
31194
- ref: getNumeralSetter(d),
31195
- x: 50,
31196
- y: shape.textY,
31197
- textAnchor: "middle",
31198
- dominantBaseline: "central",
31199
- fontSize: 100 * shape.fontScale,
31200
- fontWeight: 800,
31201
- fill: colors.pip,
31202
- style: {
31203
- fontVariantNumeric: "tabular-nums",
31204
- transition: "fill 0.3s",
31205
- userSelect: "none"
31206
- },
31207
- children: formatDieValue(shown, sides)
31208
- }
31209
- )
31210
- ]
31211
- }
31212
- );
31157
+ const cardFaceStyle = {
31158
+ position: "absolute",
31159
+ inset: 0,
31160
+ display: "block",
31161
+ overflow: "visible",
31162
+ backfaceVisibility: "hidden"
31163
+ };
31164
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_jsx_runtime114.Fragment, { children: [
31165
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
31166
+ "svg",
31167
+ {
31168
+ viewBox: "0 0 100 100",
31169
+ width: "100%",
31170
+ height: "100%",
31171
+ style: cardFaceStyle,
31172
+ "aria-hidden": "true",
31173
+ children: [
31174
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31175
+ "polygon",
31176
+ {
31177
+ points: shape.points,
31178
+ fill: colors.face,
31179
+ stroke: colors.faceBorder,
31180
+ strokeWidth: 2.5,
31181
+ strokeLinejoin: "round",
31182
+ style: { transition: "fill 0.3s, stroke 0.3s" }
31183
+ }
31184
+ ),
31185
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31186
+ "polygon",
31187
+ {
31188
+ points: shape.points,
31189
+ fill: "none",
31190
+ stroke: colors.faceBorder,
31191
+ strokeWidth: 1.5,
31192
+ strokeLinejoin: "round",
31193
+ opacity: 0.55,
31194
+ transform: "translate(50 50) scale(0.76) translate(-50 -50)"
31195
+ }
31196
+ ),
31197
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31198
+ "text",
31199
+ {
31200
+ ref: getNumeralSetter(d),
31201
+ x: 50,
31202
+ y: shape.textY,
31203
+ textAnchor: "middle",
31204
+ dominantBaseline: "central",
31205
+ fontSize: 100 * shape.fontScale,
31206
+ fontWeight: 800,
31207
+ fill: colors.pip,
31208
+ style: {
31209
+ fontVariantNumeric: "tabular-nums",
31210
+ transition: "fill 0.3s",
31211
+ userSelect: "none"
31212
+ },
31213
+ children: formatDieValue(shown, sides)
31214
+ }
31215
+ )
31216
+ ]
31217
+ }
31218
+ ),
31219
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
31220
+ "svg",
31221
+ {
31222
+ viewBox: "0 0 100 100",
31223
+ width: "100%",
31224
+ height: "100%",
31225
+ style: {
31226
+ ...cardFaceStyle,
31227
+ transform: "rotateY(180deg)"
31228
+ },
31229
+ "aria-hidden": "true",
31230
+ children: [
31231
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31232
+ "polygon",
31233
+ {
31234
+ points: shape.points,
31235
+ fill: colors.face,
31236
+ stroke: colors.faceBorder,
31237
+ strokeWidth: 2.5,
31238
+ strokeLinejoin: "round",
31239
+ style: { transition: "fill 0.3s, stroke 0.3s" }
31240
+ }
31241
+ ),
31242
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31243
+ "polygon",
31244
+ {
31245
+ points: shape.points,
31246
+ fill: "none",
31247
+ stroke: colors.faceBorder,
31248
+ strokeWidth: 1.5,
31249
+ strokeLinejoin: "round",
31250
+ opacity: 0.55,
31251
+ transform: "translate(50 50) scale(0.76) translate(-50 -50)"
31252
+ }
31253
+ ),
31254
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31255
+ "polygon",
31256
+ {
31257
+ points: shape.points,
31258
+ fill: "#000",
31259
+ opacity: 0.14
31260
+ }
31261
+ )
31262
+ ]
31263
+ }
31264
+ )
31265
+ ] });
31213
31266
  })()
31214
31267
  }
31215
31268
  )