@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.cjs CHANGED
@@ -2042,7 +2042,6 @@ var OpenUI = class {
2042
2042
  * opts out. */
2043
2043
  autoplayInsufficientNotice = true;
2044
2044
  sessionNet = 0;
2045
- prevVolumes = null;
2046
2045
  /** The frozen UISpec `createUI` built this from, if any — authored = run = tested. */
2047
2046
  spec;
2048
2047
  /** Typed convenience handles for the controls. */
@@ -2247,18 +2246,14 @@ var OpenUI = class {
2247
2246
  toggleMute() {
2248
2247
  this.setMuted(!this.muted.get());
2249
2248
  }
2250
- /** Mute/unmute music+sfx, remembering the levels to restore on unmute. */
2249
+ /**
2250
+ * Master mute/unmute. This ONLY flips the `muted` signal — the host silences audio off it
2251
+ * (and may grey the volume sliders). It does NOT drive the Music/Sound sliders to 0: doing so
2252
+ * would fire `valueChanged` and let a persistence layer save the transient 0, wiping the real
2253
+ * volume. The sliders keep showing the actual volume, just muted.
2254
+ */
2251
2255
  setMuted(m) {
2252
2256
  if (m === this.muted.get()) return;
2253
- if (m) {
2254
- this.prevVolumes = { music: this.musicSlider.value.get(), sfx: this.sfxSlider.value.get() };
2255
- this.musicSlider.setNormalized(0);
2256
- this.sfxSlider.setNormalized(0);
2257
- } else if (this.prevVolumes) {
2258
- this.musicSlider.setNormalized(this.prevVolumes.music);
2259
- this.sfxSlider.setNormalized(this.prevVolumes.sfx);
2260
- this.prevVolumes = null;
2261
- }
2262
2257
  this.muted.set(m);
2263
2258
  }
2264
2259
  /**