@viji-dev/core 0.5.1 → 0.5.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.ts CHANGED
@@ -466,6 +466,7 @@ export declare class AudioSystem {
466
466
  isOnsetMuted(instrument: InstrumentType): boolean;
467
467
  onOnsetModeChange(listener: (ev: OnsetModeChangeEvent) => void): Unsubscribe;
468
468
  onOnsetSessionEnd(listener: (ev: OnsetSessionEndEvent) => void): Unsubscribe;
469
+ onOnsetMuteChange(listener: (ev: OnsetMuteChangeEvent) => void): Unsubscribe;
469
470
  exportOnsetSessionState(): SerializedOnsetState;
470
471
  importOnsetSessionState(state: SerializedOnsetState, clockOffset: number): void;
471
472
  exportAudioAnalysisState(): SerializedAudioAnalysisState;
@@ -1455,6 +1456,12 @@ export declare interface OnsetModeChangeEvent {
1455
1456
  newMode: OnsetMode;
1456
1457
  }
1457
1458
 
1459
+ export declare interface OnsetMuteChangeEvent {
1460
+ instrument: OnsetInstrument;
1461
+ prevMuted: boolean;
1462
+ muted: boolean;
1463
+ }
1464
+
1458
1465
  export declare interface OnsetSessionEndEvent {
1459
1466
  instrument: OnsetInstrument;
1460
1467
  /**
@@ -2237,7 +2244,7 @@ declare type TrackingState = 'TRACKING' | 'LOCKED' | 'BREAKDOWN' | 'LOST';
2237
2244
  /** Returned by `on*` listener registration calls; invoke to unsubscribe. */
2238
2245
  export declare type Unsubscribe = () => void;
2239
2246
 
2240
- export declare const VERSION = "0.5.1";
2247
+ export declare const VERSION = "0.5.2";
2241
2248
 
2242
2249
  /**
2243
2250
  * Real-time video API: drawable frame, dimensions, and the source-side
@@ -3054,6 +3061,20 @@ export declare class VijiCore {
3054
3061
  * @returns Unsubscribe function. Call to remove the listener.
3055
3062
  */
3056
3063
  onSessionEnd: (listener: (ev: OnsetSessionEndEvent) => void) => Unsubscribe;
3064
+ /**
3065
+ * Listen for instrument mute-state transitions (`true ↔ false`). Fires
3066
+ * whenever the underlying mute state actually changes, regardless of
3067
+ * which method triggered it:
3068
+ * - `setMuted(instrument, muted)` when `prev !== next`
3069
+ * - `tap(instrument)` auto-unmute on first tap of a muted instrument
3070
+ * - `clear(instrument)` when the instrument was muted
3071
+ *
3072
+ * Idempotent calls (e.g. `setMuted(true)` on an already-muted instrument)
3073
+ * do not fire. Imported state does NOT fire either.
3074
+ *
3075
+ * @returns Unsubscribe function. Call to remove the listener.
3076
+ */
3077
+ onMuteChange: (listener: (ev: OnsetMuteChangeEvent) => void) => Unsubscribe;
3057
3078
  /**
3058
3079
  * Snapshot per-instrument onset state for cross-instance transfer.
3059
3080
  * Cross-device-safe (no audio analysis state included). Pair with
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A, V, a, b } from "./index-Cqh1k_49.js";
1
+ import { A, V, a, b } from "./index-B8LJ9m47.js";
2
2
  export {
3
3
  A as AudioSystem,
4
4
  V as VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viji-dev/core",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Universal execution engine for Viji Creative scenes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",