@digilogiclabs/saas-factory-ui 2.8.0 → 2.8.2

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,10 @@ 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 extruded 3D polyhedron slabs (numeral
4616
+ * front + shaded back + stacked edge layers for real thickness)
4617
+ * that tumble on every axis with the same chaos-snap-then-settle
4618
+ * motion as the cube
4616
4619
  * - Displayed face is structurally guaranteed to match the recorded
4617
4620
  * value: the d6 landing rotation is DERIVED as the inverse of the
4618
4621
  * face placement (one source of truth), and non-cube dice render
@@ -5926,7 +5929,10 @@ interface ScoreboardProps {
5926
5929
  onBeforeNewGame?: () => boolean;
5927
5930
  /** Max characters accepted in a team-name input. Unlimited by default. */
5928
5931
  nameMaxLength?: number;
5929
- /** Lower clamp for scores driven by the +/− buttons. Default −9999. */
5932
+ /** Lower clamp for scores driven by the +/− buttons. Default −9999.
5933
+ * Seeded/resumed scores are NOT rewritten at init — an out-of-range
5934
+ * restored score renders as-is and snaps into range on the first
5935
+ * button press. Changing the bounds does not reset current scores. */
5930
5936
  scoreMin?: number;
5931
5937
  /** Upper clamp for scores driven by the +/− buttons. Default 9999. */
5932
5938
  scoreMax?: number;
package/dist/index.d.ts CHANGED
@@ -4612,7 +4612,10 @@ 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 extruded 3D polyhedron slabs (numeral
4616
+ * front + shaded back + stacked edge layers for real thickness)
4617
+ * that tumble on every axis with the same chaos-snap-then-settle
4618
+ * motion as the cube
4616
4619
  * - Displayed face is structurally guaranteed to match the recorded
4617
4620
  * value: the d6 landing rotation is DERIVED as the inverse of the
4618
4621
  * face placement (one source of truth), and non-cube dice render
@@ -5926,7 +5929,10 @@ interface ScoreboardProps {
5926
5929
  onBeforeNewGame?: () => boolean;
5927
5930
  /** Max characters accepted in a team-name input. Unlimited by default. */
5928
5931
  nameMaxLength?: number;
5929
- /** Lower clamp for scores driven by the +/− buttons. Default −9999. */
5932
+ /** Lower clamp for scores driven by the +/− buttons. Default −9999.
5933
+ * Seeded/resumed scores are NOT rewritten at init — an out-of-range
5934
+ * restored score renders as-is and snaps into range on the first
5935
+ * button press. Changing the bounds does not reset current scores. */
5930
5936
  scoreMin?: number;
5931
5937
  /** Upper clamp for scores driven by the +/− buttons. Default 9999. */
5932
5938
  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,157 @@ 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 depth = effectiveSize * 0.18;
31158
+ const edgeLayers = 16;
31159
+ const cardFaceStyle = {
31160
+ position: "absolute",
31161
+ inset: 0,
31162
+ display: "block",
31163
+ overflow: "visible",
31164
+ backfaceVisibility: "hidden"
31165
+ };
31166
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_jsx_runtime114.Fragment, { children: [
31167
+ Array.from({ length: edgeLayers }, (_2, li) => {
31168
+ const z = -depth / 2 + depth * (li + 0.5) / edgeLayers;
31169
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
31170
+ "svg",
31171
+ {
31172
+ viewBox: "0 0 100 100",
31173
+ width: "100%",
31174
+ height: "100%",
31175
+ style: {
31176
+ position: "absolute",
31177
+ inset: 0,
31178
+ display: "block",
31179
+ overflow: "visible",
31180
+ transform: `translateZ(${z}px)`
31181
+ },
31182
+ "aria-hidden": "true",
31183
+ children: [
31184
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31185
+ "polygon",
31186
+ {
31187
+ points: shape.points,
31188
+ fill: colors.face
31189
+ }
31190
+ ),
31191
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31192
+ "polygon",
31193
+ {
31194
+ points: shape.points,
31195
+ fill: "#000",
31196
+ opacity: 0.22
31197
+ }
31198
+ )
31199
+ ]
31200
+ },
31201
+ li
31202
+ );
31203
+ }),
31204
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
31205
+ "svg",
31206
+ {
31207
+ viewBox: "0 0 100 100",
31208
+ width: "100%",
31209
+ height: "100%",
31210
+ style: {
31211
+ ...cardFaceStyle,
31212
+ transform: `translateZ(${depth / 2}px)`
31213
+ },
31214
+ "aria-hidden": "true",
31215
+ children: [
31216
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31217
+ "polygon",
31218
+ {
31219
+ points: shape.points,
31220
+ fill: colors.face,
31221
+ stroke: colors.faceBorder,
31222
+ strokeWidth: 2.5,
31223
+ strokeLinejoin: "round",
31224
+ style: { transition: "fill 0.3s, stroke 0.3s" }
31225
+ }
31226
+ ),
31227
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31228
+ "polygon",
31229
+ {
31230
+ points: shape.points,
31231
+ fill: "none",
31232
+ stroke: colors.faceBorder,
31233
+ strokeWidth: 1.5,
31234
+ strokeLinejoin: "round",
31235
+ opacity: 0.55,
31236
+ transform: "translate(50 50) scale(0.76) translate(-50 -50)"
31237
+ }
31238
+ ),
31239
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31240
+ "text",
31241
+ {
31242
+ ref: getNumeralSetter(d),
31243
+ x: 50,
31244
+ y: shape.textY,
31245
+ textAnchor: "middle",
31246
+ dominantBaseline: "central",
31247
+ fontSize: 100 * shape.fontScale,
31248
+ fontWeight: 800,
31249
+ fill: colors.pip,
31250
+ style: {
31251
+ fontVariantNumeric: "tabular-nums",
31252
+ transition: "fill 0.3s",
31253
+ userSelect: "none"
31254
+ },
31255
+ children: formatDieValue(shown, sides)
31256
+ }
31257
+ )
31258
+ ]
31259
+ }
31260
+ ),
31261
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
31262
+ "svg",
31263
+ {
31264
+ viewBox: "0 0 100 100",
31265
+ width: "100%",
31266
+ height: "100%",
31267
+ style: {
31268
+ ...cardFaceStyle,
31269
+ transform: `rotateY(180deg) translateZ(${depth / 2}px)`
31270
+ },
31271
+ "aria-hidden": "true",
31272
+ children: [
31273
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31274
+ "polygon",
31275
+ {
31276
+ points: shape.points,
31277
+ fill: colors.face,
31278
+ stroke: colors.faceBorder,
31279
+ strokeWidth: 2.5,
31280
+ strokeLinejoin: "round",
31281
+ style: { transition: "fill 0.3s, stroke 0.3s" }
31282
+ }
31283
+ ),
31284
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31285
+ "polygon",
31286
+ {
31287
+ points: shape.points,
31288
+ fill: "none",
31289
+ stroke: colors.faceBorder,
31290
+ strokeWidth: 1.5,
31291
+ strokeLinejoin: "round",
31292
+ opacity: 0.55,
31293
+ transform: "translate(50 50) scale(0.76) translate(-50 -50)"
31294
+ }
31295
+ ),
31296
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
31297
+ "polygon",
31298
+ {
31299
+ points: shape.points,
31300
+ fill: "#000",
31301
+ opacity: 0.14
31302
+ }
31303
+ )
31304
+ ]
31305
+ }
31306
+ )
31307
+ ] });
31213
31308
  })()
31214
31309
  }
31215
31310
  )