@open-slot-ui/core 0.13.3 → 0.13.4

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.cts CHANGED
@@ -1424,7 +1424,6 @@ declare class OpenUI {
1424
1424
  * opts out. */
1425
1425
  autoplayInsufficientNotice: boolean;
1426
1426
  private sessionNet;
1427
- private prevVolumes;
1428
1427
  /** The frozen UISpec `createUI` built this from, if any — authored = run = tested. */
1429
1428
  spec?: Readonly<UISpec>;
1430
1429
  /** Typed convenience handles for the controls. */
@@ -1471,7 +1470,12 @@ declare class OpenUI {
1471
1470
  unlock(): void;
1472
1471
  /** Toggle master mute (music + sfx). */
1473
1472
  toggleMute(): void;
1474
- /** Mute/unmute music+sfx, remembering the levels to restore on unmute. */
1473
+ /**
1474
+ * Master mute/unmute. This ONLY flips the `muted` signal — the host silences audio off it
1475
+ * (and may grey the volume sliders). It does NOT drive the Music/Sound sliders to 0: doing so
1476
+ * would fire `valueChanged` and let a persistence layer save the transient 0, wiping the real
1477
+ * volume. The sliders keep showing the actual volume, just muted.
1478
+ */
1475
1479
  setMuted(m: boolean): void;
1476
1480
  /**
1477
1481
  * Report one completed round (major units): updates the net-position readout and,
package/dist/index.d.ts CHANGED
@@ -1424,7 +1424,6 @@ declare class OpenUI {
1424
1424
  * opts out. */
1425
1425
  autoplayInsufficientNotice: boolean;
1426
1426
  private sessionNet;
1427
- private prevVolumes;
1428
1427
  /** The frozen UISpec `createUI` built this from, if any — authored = run = tested. */
1429
1428
  spec?: Readonly<UISpec>;
1430
1429
  /** Typed convenience handles for the controls. */
@@ -1471,7 +1470,12 @@ declare class OpenUI {
1471
1470
  unlock(): void;
1472
1471
  /** Toggle master mute (music + sfx). */
1473
1472
  toggleMute(): void;
1474
- /** Mute/unmute music+sfx, remembering the levels to restore on unmute. */
1473
+ /**
1474
+ * Master mute/unmute. This ONLY flips the `muted` signal — the host silences audio off it
1475
+ * (and may grey the volume sliders). It does NOT drive the Music/Sound sliders to 0: doing so
1476
+ * would fire `valueChanged` and let a persistence layer save the transient 0, wiping the real
1477
+ * volume. The sliders keep showing the actual volume, just muted.
1478
+ */
1475
1479
  setMuted(m: boolean): void;
1476
1480
  /**
1477
1481
  * Report one completed round (major units): updates the net-position readout and,
package/dist/index.js CHANGED
@@ -2040,7 +2040,6 @@ var OpenUI = class {
2040
2040
  * opts out. */
2041
2041
  autoplayInsufficientNotice = true;
2042
2042
  sessionNet = 0;
2043
- prevVolumes = null;
2044
2043
  /** The frozen UISpec `createUI` built this from, if any — authored = run = tested. */
2045
2044
  spec;
2046
2045
  /** Typed convenience handles for the controls. */
@@ -2245,18 +2244,14 @@ var OpenUI = class {
2245
2244
  toggleMute() {
2246
2245
  this.setMuted(!this.muted.get());
2247
2246
  }
2248
- /** Mute/unmute music+sfx, remembering the levels to restore on unmute. */
2247
+ /**
2248
+ * Master mute/unmute. This ONLY flips the `muted` signal — the host silences audio off it
2249
+ * (and may grey the volume sliders). It does NOT drive the Music/Sound sliders to 0: doing so
2250
+ * would fire `valueChanged` and let a persistence layer save the transient 0, wiping the real
2251
+ * volume. The sliders keep showing the actual volume, just muted.
2252
+ */
2249
2253
  setMuted(m) {
2250
2254
  if (m === this.muted.get()) return;
2251
- if (m) {
2252
- this.prevVolumes = { music: this.musicSlider.value.get(), sfx: this.sfxSlider.value.get() };
2253
- this.musicSlider.setNormalized(0);
2254
- this.sfxSlider.setNormalized(0);
2255
- } else if (this.prevVolumes) {
2256
- this.musicSlider.setNormalized(this.prevVolumes.music);
2257
- this.sfxSlider.setNormalized(this.prevVolumes.sfx);
2258
- this.prevVolumes = null;
2259
- }
2260
2255
  this.muted.set(m);
2261
2256
  }
2262
2257
  /**