@adea-ai/audio 0.70.10 → 0.70.12

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/sound.js CHANGED
@@ -3,7 +3,7 @@ import { musicForScene } from "./scene-music.js";
3
3
  import { createComponent, memo } from "solid-js/web";
4
4
  import { Music, Music2 } from "lucide-solid";
5
5
  import { createContext, createEffect, createMemo, createSignal, on, onCleanup, onMount, useContext } from "solid-js";
6
- import { Button } from "@adea-ai/ui/components/ui/button";
6
+ import { ActionButton } from "@adea-ai/ui/components/composites/action-button";
7
7
  //#region src/sound.tsx
8
8
  var SoundContext = createContext(null);
9
9
  function SoundProvider(props) {
@@ -60,8 +60,11 @@ function useSceneMusic(sceneId) {
60
60
  }));
61
61
  }
62
62
  function MusicButton(props) {
63
- return createComponent(Button, {
63
+ return createComponent(ActionButton, {
64
64
  type: "button",
65
+ get tooltip() {
66
+ return props.muted ? "Unmute music" : "Mute music";
67
+ },
65
68
  get ["aria-label"]() {
66
69
  return props.muted ? "Unmute music" : "Mute music";
67
70
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adea-ai/audio",
3
- "version": "0.70.10",
3
+ "version": "0.70.12",
4
4
  "description": "Optional, lazy music controller and Solid bindings for Adea. Audio is non-blocking so scene loading never waits on sound assets.",
5
5
  "keywords": [
6
6
  "audio",
package/src/sound.tsx CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  import { soundController, type MusicOptions } from './controller'
14
14
  import { musicForScene } from './scene-music'
15
15
  import type { MusicId } from './config'
16
- import { Button } from '@adea-ai/ui/components/ui/button'
16
+ import { ActionButton } from '@adea-ai/ui/components/composites/action-button'
17
17
 
18
18
  export type SoundContextValue = {
19
19
  controller: typeof soundController
@@ -88,8 +88,9 @@ export function useSceneMusic(sceneId: string | null | undefined): void {
88
88
 
89
89
  function MusicButton(props: { muted: boolean; onToggle: () => void }) {
90
90
  return (
91
- <Button
91
+ <ActionButton
92
92
  type="button"
93
+ tooltip={props.muted ? 'Unmute music' : 'Mute music'}
93
94
  aria-label={props.muted ? 'Unmute music' : 'Mute music'}
94
95
  aria-pressed={props.muted}
95
96
  onClick={() => props.onToggle()}
@@ -101,7 +102,7 @@ function MusicButton(props: { muted: boolean; onToggle: () => void }) {
101
102
  ) : (
102
103
  <Music2 class="size-5" aria-hidden="true" />
103
104
  )}
104
- </Button>
105
+ </ActionButton>
105
106
  )
106
107
  }
107
108