@molecule/app-feature-audio-effects-rack-solid 0.0.0-stage → 1.1.0

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.js ADDED
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Solid multi-effect rack for music-DAW and similar audio tools — the Solid
3
+ * counterpart of `@molecule/app-feature-audio-effects-rack-react`, with the
4
+ * same props and the same DOM for the same input.
5
+ *
6
+ * Renders a chain of effect panels — bypass toggle, per-param slider
7
+ * grid, drag-to-reorder via pointer events, add-effect dropdown,
8
+ * per-panel remove button. Pure UI: callers wire the emitted change
9
+ * patches + reorder events back into a real audio engine (Tone.js,
10
+ * the Web Audio API, native `AudioContext`, etc.).
11
+ *
12
+ * Exports `AudioEffectsRack`, the `Effect` / `EffectKind` /
13
+ * `EffectChangePatch` shapes consumed by callers, the built-in
14
+ * `EFFECT_KINDS` list and `EFFECT_PARAM_SCHEMAS` registry, and the
15
+ * `resolveParamValue` / `reorderEffects` helpers used internally.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * import { createSignal } from 'solid-js'
20
+ * import {
21
+ * AudioEffectsRack,
22
+ * type Effect,
23
+ * } from '@molecule/app-feature-audio-effects-rack-solid'
24
+ *
25
+ * const [effects] = createSignal<Effect[]>([
26
+ * { id: 'eq-1', kind: 'eq', enabled: true, params: { low: 2, mid: 0, high: -1 } },
27
+ * { id: 'rev-1', kind: 'reverb', enabled: true, params: { mix: 0.4, decay: 3 } },
28
+ * ])
29
+ *
30
+ * export function Rack() {
31
+ * return (
32
+ * <AudioEffectsRack
33
+ * effects={effects()}
34
+ * onChange={(patch) => engine.applyEffectPatch(patch)}
35
+ * onReorder={(next) => engine.applyEffectOrder(next)}
36
+ * onAdd={(kind) => engine.addEffect(kind)}
37
+ * onRemove={(id) => engine.removeEffect(id)}
38
+ * />
39
+ * )
40
+ * }
41
+ * ```
42
+ *
43
+ * @remarks
44
+ * All user-visible text routes through the companion locale bond
45
+ * `@molecule/app-locales-feature-audio-effects-rack`. Styling
46
+ * routes through `getClassMap()` from `@molecule/app-ui` — no
47
+ * Tailwind utility class names appear in this package.
48
+ *
49
+ * @module
50
+ */
51
+ export * from './AudioEffectsRack.jsx';
52
+ export * from './types.js';
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,cAAc,wBAAwB,CAAA;AACtC,cAAc,YAAY,CAAA"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Types for the Solid multi-effect rack — the Solid counterparts of the shapes
3
+ * `@molecule/app-feature-audio-effects-rack-react` exports.
4
+ *
5
+ * @module
6
+ */
7
+ /**
8
+ * Built-in catalog of effect kinds the rack knows how to render. Each
9
+ * entry has its own parameter schema in `EFFECT_PARAM_SCHEMAS`.
10
+ */
11
+ export type EffectKind = 'eq' | 'compressor' | 'reverb' | 'delay' | 'distortion' | 'gate' | 'limiter' | 'chorus' | 'flanger' | 'phaser';
12
+ /**
13
+ * Parameter schema entry — a single named knob on an effect panel.
14
+ * `min` / `max` define the closed slider interval, `step` is the
15
+ * granularity of the underlying range input, and `default` is the
16
+ * value used when an effect is created without an explicit value for
17
+ * this param.
18
+ */
19
+ export interface EffectParamSchema {
20
+ /** Stable parameter id used as the key inside `Effect.params`. */
21
+ id: string;
22
+ /** Lowest allowed value. */
23
+ min: number;
24
+ /** Highest allowed value. */
25
+ max: number;
26
+ /** Slider step granularity. */
27
+ step: number;
28
+ /** Default value when the param is missing on an effect. */
29
+ default: number;
30
+ }
31
+ /**
32
+ * Single effect node in the chain. Effects are pure data — the rack
33
+ * renders them as panels but never executes any DSP itself. The
34
+ * caller is expected to wire the emitted patches/reorders back into
35
+ * a real audio engine (Tone.js, Web Audio API, native `AudioContext`).
36
+ */
37
+ export interface Effect {
38
+ /** Stable identifier for the effect (used as the list key + handler arg). */
39
+ id: string;
40
+ /** Kind of effect — picks the parameter schema + display label. */
41
+ kind: EffectKind;
42
+ /** Whether the effect is currently enabled (i.e. NOT bypassed). */
43
+ enabled: boolean;
44
+ /** Map of param id → current value. Missing keys fall back to the schema default. */
45
+ params: Record<string, number>;
46
+ }
47
+ /**
48
+ * Patch describing the changed fields for a single effect-change event.
49
+ * Always carries the effect id; the touched field is set and the rest
50
+ * are absent.
51
+ */
52
+ export interface EffectChangePatch {
53
+ /** Effect that changed. */
54
+ id: string;
55
+ /** New enabled (bypass-off) state — only set when the bypass toggle moved. */
56
+ enabled?: boolean;
57
+ /** Param id that moved — paired with `paramValue`. */
58
+ paramId?: string;
59
+ /** New param value — paired with `paramId`. */
60
+ paramValue?: number;
61
+ }
62
+ /** Props accepted by the `AudioEffectsRack` component. */
63
+ export interface AudioEffectsRackProps {
64
+ /** Effects rendered as panels from left to right (or top to bottom on narrow viewports). */
65
+ effects: Effect[];
66
+ /**
67
+ * Called for every per-effect change with a partial patch describing
68
+ * which field moved. Bypass emits a single patch on click; param
69
+ * sliders emit a stream of patches as the user drags.
70
+ */
71
+ onChange?: (patch: EffectChangePatch) => void;
72
+ /**
73
+ * Called when the user reorders effects (drag-to-reorder via pointer
74
+ * events) with the new full ordering. The caller is expected to apply
75
+ * the new order to its source-of-truth state.
76
+ */
77
+ onReorder?: (nextOrder: Effect[]) => void;
78
+ /** Called when the user adds a new effect via the add-effect dropdown. */
79
+ onAdd?: (kind: EffectKind) => void;
80
+ /** Called when the user removes an effect via the per-panel remove button. */
81
+ onRemove?: (id: string) => void;
82
+ /** Extra classes merged onto the root element. */
83
+ className?: string;
84
+ }
85
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,MAAM,UAAU,GAClB,IAAI,GACJ,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AA8E;IAC9E,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
package/dist/types.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Types for the Solid multi-effect rack — the Solid counterparts of the shapes
3
+ * `@molecule/app-feature-audio-effects-rack-react` exports.
4
+ *
5
+ * @module
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
package/package.json CHANGED
@@ -1,6 +1,73 @@
1
1
  {
2
2
  "name": "@molecule/app-feature-audio-effects-rack-solid",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "description": "Effects rack (chain of EQ/compressor/reverb/delay/distortion/etc.) for music-DAW — UI only; caller wires effects to actual audio engine",
5
+ "homepage": "https://www.molecule.dev/packages/app-feature-audio-effects-rack-solid",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc",
21
+ "dev": "tsc --watch",
22
+ "test": "vitest run",
23
+ "test:watch": "vitest"
24
+ },
25
+ "keywords": [
26
+ "molecule",
27
+ "feature",
28
+ "audio",
29
+ "effects",
30
+ "rack",
31
+ "eq",
32
+ "compressor",
33
+ "reverb",
34
+ "delay",
35
+ "distortion",
36
+ "daw",
37
+ "solid"
38
+ ],
39
+ "author": "Molecule Dev, Inc. (https://molecule.dev)",
40
+ "license": "Apache-2.0",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "https://github.com/molecule-dev/molecule.git",
44
+ "directory": "packages/app/features/feature-audio-effects-rack-solid"
45
+ },
46
+ "engines": {
47
+ "node": ">=20"
48
+ },
49
+ "bugs": "https://github.com/molecule-dev/molecule/issues",
50
+ "publishConfig": {
51
+ "access": "public"
52
+ },
53
+ "peerDependencies": {
54
+ "@molecule/app-solid": "^3.5.0",
55
+ "@molecule/app-ui": "^1.1.0",
56
+ "@molecule/app-ui-solid": "^1.1.0",
57
+ "solid-js": "^1.8.0"
58
+ },
59
+ "devDependencies": {
60
+ "@molecule/app-framework-conformance": "0.0.0",
61
+ "@molecule/app-i18n": "1.2.2",
62
+ "@molecule/app-icons": "1.0.4",
63
+ "@molecule/app-solid": "3.9.0",
64
+ "@molecule/app-ui": "1.5.0",
65
+ "@molecule/app-ui-solid": "1.2.1",
66
+ "@types/node": "26.6.5",
67
+ "jsdom": "30.1.3",
68
+ "solid-js": "1.9.17",
69
+ "typescript": "6.0.3",
70
+ "vite-plugin-solid": "2.11.15",
71
+ "vitest": "4.1.12"
72
+ }
73
+ }