@audio/synth-sfx 1.1.1 → 1.1.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.
Files changed (2) hide show
  1. package/audio.d.ts +27 -0
  2. package/package.json +7 -3
package/audio.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ // Generated from the audio.js manifest (params metadata is the source of truth).
2
+ // Regenerate: node tools/dts.js in @audio/compile. Do not edit by hand.
3
+
4
+ /** Automatable number — scalar, `t => value` fn, or breakpoint curve {t, v} */
5
+ type Auto = number | ((t: number) => number) | { t: number[], v: number[] }
6
+ /** Per-block param values as delivered by hosts (numbers arrive as 1-length Float32Array) */
7
+ type Live = Record<string, Float32Array | string | boolean>
8
+ type Ctx = { sampleRate: number, maxBlockSize: number, maxChannels: number, currentTime: number, duration?: number, events?: readonly any[], emit?: (name: string, ...args: any[]) => void, [k: string]: unknown }
9
+ type Process = (inputs: Float32Array[][], outputs: Float32Array[][], params: Live) => void
10
+
11
+ /** Chainable-host options for 'sfx' */
12
+ export interface SfxOptions {
13
+ /** default "blip" */
14
+ "preset"?: "pickup" | "laser" | "explosion" | "powerup" | "hit" | "jump" | "blip" | "coin"
15
+ at?: number | string
16
+ duration?: number | string
17
+ }
18
+
19
+ export declare const sfx: {
20
+ (ctx: Ctx): Process
21
+ channels: {"inputs":[],"outputs":"any"}
22
+ streaming: false
23
+ params: {
24
+ /** default "blip" */
25
+ "preset": { type: "enum", values: ["pickup","laser","explosion","powerup","hit","jump","blip","coin"], default: "blip" }
26
+ }
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/synth-sfx",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Game/UI sound effects generator — ZZFX / ChipTone class parameterized synthesis",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -19,12 +19,16 @@
19
19
  "main": "sfx.js",
20
20
  "exports": {
21
21
  ".": "./sfx.js",
22
- "./audio": "./audio.js",
22
+ "./audio": {
23
+ "types": "./audio.d.ts",
24
+ "default": "./audio.js"
25
+ },
23
26
  "./package.json": "./package.json"
24
27
  },
25
28
  "files": [
26
29
  "sfx.js",
27
- "audio.js"
30
+ "audio.js",
31
+ "audio.d.ts"
28
32
  ],
29
33
  "publishConfig": {
30
34
  "access": "public"