@vessel-dsp/stompbox 0.6.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.
Files changed (63) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +471 -0
  3. package/assets/cad/parts/box-125b/.tayda-a7244.step.glb +0 -0
  4. package/assets/cad/parts/box-125b/tayda-a7244.step +3588 -0
  5. package/assets/cad/parts/box-1590b/.tayda-a6619.step.glb +0 -0
  6. package/assets/cad/parts/box-1590b/tayda-a6619.step +3587 -0
  7. package/assets/cad/parts/box-1590bb/.tayda-a5880.step.glb +0 -0
  8. package/assets/cad/parts/box-1590bb/tayda-a5880.step +3589 -0
  9. package/assets/cad/parts/box-hammond-diecast-stompbox-series/.hammond-1590a.step.glb +0 -0
  10. package/assets/cad/parts/box-hammond-diecast-stompbox-series/.hammond-1590n1.step.glb +0 -0
  11. package/assets/cad/parts/box-hammond-diecast-stompbox-series/.hammond-1590xx.step.glb +0 -0
  12. package/assets/cad/parts/box-hammond-diecast-stompbox-series/hammond-1590a.step +3587 -0
  13. package/assets/cad/parts/box-hammond-diecast-stompbox-series/hammond-1590n1.step +3589 -0
  14. package/assets/cad/parts/box-hammond-diecast-stompbox-series/hammond-1590xx.step +3589 -0
  15. package/assets/cad/parts/dc-socket-dc099/.dc099.step.glb +0 -0
  16. package/assets/cad/parts/dc-socket-dc099/dc099.step +261 -0
  17. package/assets/cad/parts/jack-ts-pj629han/.pj-629han-05.step.glb +0 -0
  18. package/assets/cad/parts/jack-ts-pj629han/pj-629han-05.step +261 -0
  19. package/assets/cad/parts/knob-chickenhead-lms-30mm/.lovemyswitches-chicken-head-30mm.step.glb +0 -0
  20. package/assets/cad/parts/knob-chickenhead-lms-30mm/lovemyswitches-chicken-head-30mm.step +535 -0
  21. package/assets/cad/parts/knob-cm42-bb/.tayda-a6078-cm42-bb.step.glb +0 -0
  22. package/assets/cad/parts/knob-cm42-bb/tayda-a6078-cm42-bb.step +535 -0
  23. package/assets/cad/parts/knob-davies-instrument-series/.davies-1100.step.glb +0 -0
  24. package/assets/cad/parts/knob-davies-instrument-series/.davies-1105.step.glb +0 -0
  25. package/assets/cad/parts/knob-davies-instrument-series/.davies-1110.step.glb +0 -0
  26. package/assets/cad/parts/knob-davies-instrument-series/.davies-1120.step.glb +0 -0
  27. package/assets/cad/parts/knob-davies-instrument-series/.davies-1510bg.step.glb +0 -0
  28. package/assets/cad/parts/knob-davies-instrument-series/.davies-1550ag.step.glb +0 -0
  29. package/assets/cad/parts/knob-davies-instrument-series/.davies-1900.step.glb +0 -0
  30. package/assets/cad/parts/knob-davies-instrument-series/davies-1100.step +7781 -0
  31. package/assets/cad/parts/knob-davies-instrument-series/davies-1105.step +7975 -0
  32. package/assets/cad/parts/knob-davies-instrument-series/davies-1110.step +8754 -0
  33. package/assets/cad/parts/knob-davies-instrument-series/davies-1120.step +8570 -0
  34. package/assets/cad/parts/knob-davies-instrument-series/davies-1510bg.step +1686 -0
  35. package/assets/cad/parts/knob-davies-instrument-series/davies-1550ag.step +3137 -0
  36. package/assets/cad/parts/knob-davies-instrument-series/davies-1900.step +19769 -0
  37. package/assets/cad/parts/knob-mxr-style-fluted/.daier-mf-b01.step.glb +0 -0
  38. package/assets/cad/parts/knob-mxr-style-fluted/.daier-mf-b02.step.glb +0 -0
  39. package/assets/cad/parts/knob-mxr-style-fluted/.daier-mf-b03.step.glb +0 -0
  40. package/assets/cad/parts/knob-mxr-style-fluted/.tayda-a1829-tymf-b00.step.glb +0 -0
  41. package/assets/cad/parts/knob-mxr-style-fluted/daier-mf-b01.step +4277 -0
  42. package/assets/cad/parts/knob-mxr-style-fluted/daier-mf-b02.step +4318 -0
  43. package/assets/cad/parts/knob-mxr-style-fluted/daier-mf-b03.step +4577 -0
  44. package/assets/cad/parts/knob-mxr-style-fluted/tayda-a1829-tymf-b00.step +535 -0
  45. package/assets/cad/parts/led-5mm-red-kento-5408urc/.kento-5408urc.step.glb +0 -0
  46. package/assets/cad/parts/led-5mm-red-kento-5408urc/kento-5408urc.step +384 -0
  47. package/assets/cad/parts/led-bezel-lh5/.pedal-parts-and-kits-bzl-5mm-p.step.glb +0 -0
  48. package/assets/cad/parts/led-bezel-lh5/pedal-parts-and-kits-bzl-5mm-p.step +469 -0
  49. package/assets/cad/parts/switch-3pdt-pic-pbs24302/.pic-pbs24302.step.glb +0 -0
  50. package/assets/cad/parts/switch-3pdt-pic-pbs24302/pic-pbs24302.step +435 -0
  51. package/assets/cad/parts/switch-toggle-reference-series/.toggle-switch-dpdt-pcb.step.glb +0 -0
  52. package/assets/cad/parts/switch-toggle-reference-series/.toggle-switch-mounting-plate.step.glb +0 -0
  53. package/assets/cad/parts/switch-toggle-reference-series/.toggle-switch-spdt-pcb.step.glb +0 -0
  54. package/assets/cad/parts/switch-toggle-reference-series/.toggle-switch-spst-13x7.step.glb +0 -0
  55. package/assets/cad/parts/switch-toggle-reference-series/toggle-switch-dpdt-pcb.step +2860 -0
  56. package/assets/cad/parts/switch-toggle-reference-series/toggle-switch-mounting-plate.step +1090 -0
  57. package/assets/cad/parts/switch-toggle-reference-series/toggle-switch-spdt-pcb.step +1749 -0
  58. package/assets/cad/parts/switch-toggle-reference-series/toggle-switch-spst-13x7.step +1608 -0
  59. package/dist/index.d.ts +714 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.js +4462 -0
  62. package/dist/index.js.map +1 -0
  63. package/package.json +55 -0
@@ -0,0 +1,714 @@
1
+ import { type CircuitDocument, type ControlState, type ControlValue, type Panel } from "@vessel-dsp/core";
2
+ export type StompboxUnits = "mm";
3
+ export type StompboxPlacementProvenance = "vdsp-declared" | "auto-generated";
4
+ export type StompboxFaceId = "top" | "bottom" | "left" | "right" | "back" | (string & {});
5
+ export type StompboxTemplateMode = "preview" | "print";
6
+ export type StompboxStyleProfileId = string & {};
7
+ export type StompboxKnobGridStrategy = "large-merged-row" | "compact-led-row";
8
+ export type StompboxSideHardwareStrategy = "side-power-five-slot" | "back-power-paired-side-jacks";
9
+ export type StompboxAudioJackLabelStrategy = "edge-rotated" | "inline";
10
+ export type StompboxFootswitchStrategy = "lower-row" | "bottom-merged-row";
11
+ export type StompboxStyleProfile = Readonly<{
12
+ id: StompboxStyleProfileId;
13
+ label: string;
14
+ supportedKnobCounts: readonly number[];
15
+ defaultPartIds?: Partial<StompboxDefaultPartProfileIds>;
16
+ layout?: Readonly<{
17
+ knobGrid?: StompboxKnobGridStrategy;
18
+ sideHardware?: StompboxSideHardwareStrategy;
19
+ audioJackLabels?: StompboxAudioJackLabelStrategy;
20
+ footswitch?: StompboxFootswitchStrategy;
21
+ statusLedLabel?: string;
22
+ }>;
23
+ }>;
24
+ export type StompboxStyleProfileFilter = Readonly<{
25
+ knobCount: number;
26
+ }>;
27
+ export declare function getAvailableStompboxStyleProfiles(profiles: readonly StompboxStyleProfile[], filter: StompboxStyleProfileFilter): readonly StompboxStyleProfile[];
28
+ export type StompboxPoint2 = Readonly<{
29
+ x: number;
30
+ y: number;
31
+ }>;
32
+ export type StompboxPoint3 = Readonly<{
33
+ x: number;
34
+ y: number;
35
+ z: number;
36
+ }>;
37
+ export type StompboxRotationDeg = Readonly<{
38
+ x: number;
39
+ y: number;
40
+ z: number;
41
+ }>;
42
+ export type StompboxSize2 = Readonly<{
43
+ widthMm: number;
44
+ heightMm: number;
45
+ }>;
46
+ export type StompboxDecalGridPlacement = Readonly<{
47
+ kind: "grid";
48
+ columns: number;
49
+ rows: number;
50
+ column: number;
51
+ row: number;
52
+ }>;
53
+ export type StompboxDecalPlacement = StompboxDecalGridPlacement;
54
+ export type StompboxDecalInputCommon = Readonly<{
55
+ id: string;
56
+ face?: StompboxFaceId;
57
+ centerMm?: StompboxPoint2;
58
+ placement?: StompboxDecalPlacement;
59
+ sizeMm?: StompboxSize2;
60
+ rotationDeg?: number;
61
+ }>;
62
+ export type StompboxTextDecalInput = StompboxDecalInputCommon & Readonly<{
63
+ kind: "text";
64
+ text: string;
65
+ color?: string;
66
+ fontFamily?: string;
67
+ fontSizeMm?: number;
68
+ }>;
69
+ export type StompboxSvgDecalInput = StompboxDecalInputCommon & Readonly<{
70
+ kind: "svg";
71
+ svg: string;
72
+ color?: string;
73
+ }>;
74
+ export type StompboxImageDecalInput = StompboxDecalInputCommon & Readonly<{
75
+ kind: "image";
76
+ href: string;
77
+ mimeType?: string;
78
+ color?: string;
79
+ }>;
80
+ export type StompboxDecalInput = StompboxTextDecalInput | StompboxSvgDecalInput | StompboxImageDecalInput;
81
+ export type StompboxAssetRefs = Readonly<{
82
+ glbRelativePath: string;
83
+ stepRelativePath: string;
84
+ }>;
85
+ export type ResolvedStompboxAssetPaths = Readonly<{
86
+ glb: string;
87
+ step: string;
88
+ }>;
89
+ export type StompboxDrillHoleMarker = "ring-with-center-dot" | "center-dot";
90
+ export type StompboxDrillHoleProfile = Readonly<{
91
+ id: string;
92
+ label: string;
93
+ diameterMm: number;
94
+ fractionInches: string;
95
+ marker: StompboxDrillHoleMarker;
96
+ }>;
97
+ export declare const STOMPBOX_DRILL_HOLE_PROFILE_CATALOG: Readonly<Record<string, StompboxDrillHoleProfile>>;
98
+ export type StompboxAssetResolveOptions = Readonly<{
99
+ basePath?: string;
100
+ baseUrl?: string;
101
+ }>;
102
+ export type StompboxGlbStateTargetSelector = Readonly<{
103
+ nodeName?: string;
104
+ nodeNameIncludes?: string;
105
+ meshName?: string;
106
+ meshNameIncludes?: string;
107
+ materialName?: string;
108
+ materialNameIncludes?: string;
109
+ extras?: Readonly<Record<string, string | number | boolean>>;
110
+ }>;
111
+ export type StompboxGlbStateTargetRef = Readonly<{
112
+ selector: StompboxGlbStateTargetSelector;
113
+ }>;
114
+ export type StompboxFootswitchTravelAxis = "x" | "y" | "z";
115
+ export type StompboxPartStateTargets = Readonly<{
116
+ led?: Readonly<{
117
+ lens: StompboxGlbStateTargetRef;
118
+ }>;
119
+ footswitch?: Readonly<{
120
+ actuator: StompboxGlbStateTargetRef;
121
+ travelMm?: number;
122
+ travelAxis?: StompboxFootswitchTravelAxis;
123
+ }>;
124
+ }>;
125
+ export type StompboxGlbStateTargetRole = "led.lens" | "footswitch.actuator";
126
+ export type StompboxResolvedGlbStateTarget = Readonly<{
127
+ role: StompboxGlbStateTargetRole;
128
+ selector: StompboxGlbStateTargetSelector;
129
+ nodeName: string;
130
+ meshName?: string;
131
+ materialName?: string;
132
+ travelMm?: number;
133
+ travelAxis?: StompboxFootswitchTravelAxis;
134
+ }>;
135
+ export type StompboxResolvedPartStateTargets = Readonly<{
136
+ led?: Readonly<{
137
+ lens: StompboxResolvedGlbStateTarget;
138
+ }>;
139
+ footswitch?: Readonly<{
140
+ actuator: StompboxResolvedGlbStateTarget;
141
+ }>;
142
+ }>;
143
+ export type StompboxGlbAssetValidation = Readonly<{
144
+ schema: "stompbox-glb-asset-validation/v1";
145
+ partProfileId: string;
146
+ assetPath?: string;
147
+ valid: boolean;
148
+ targets: Readonly<Partial<Record<StompboxGlbStateTargetRole, StompboxResolvedGlbStateTarget>>>;
149
+ diagnostics: readonly StompboxDiagnostic[];
150
+ }>;
151
+ export type StompboxHardwareProfileAssetValidation = Readonly<{
152
+ schema: "stompbox-hardware-profile-asset-validation/v1";
153
+ valid: boolean;
154
+ assets: Readonly<Record<string, StompboxGlbAssetValidation>>;
155
+ diagnostics: readonly StompboxDiagnostic[];
156
+ }>;
157
+ export type StompboxGlbAssetValidationOptions = Readonly<{
158
+ assetPath?: string;
159
+ }>;
160
+ export type StompboxHardwareProfileAssetValidationOptions = StompboxAssetResolveOptions & Readonly<{
161
+ partIds?: readonly string[];
162
+ }>;
163
+ export type StompboxPartGeometry = Readonly<{
164
+ kind: "knob";
165
+ diameterMm: number;
166
+ depthMm: number;
167
+ shaftDiameterMm: number;
168
+ }> | Readonly<{
169
+ kind: "led";
170
+ lensDiameterMm: number;
171
+ bodyHeightMm: number;
172
+ flangeDiameterMm: number;
173
+ }> | Readonly<{
174
+ kind: "led-bezel";
175
+ outerDiameterMm: number;
176
+ innerDiameterMm: number;
177
+ depthMm: number;
178
+ }> | Readonly<{
179
+ kind: "footswitch";
180
+ buttonDiameterMm: number;
181
+ nutOuterDiameterMm: number;
182
+ ringHeightMm: number;
183
+ buttonHeightMm: number;
184
+ pressedTravelMm: number;
185
+ }> | Readonly<{
186
+ kind: "ring";
187
+ outerDiameterMm: number;
188
+ innerDiameterMm: number;
189
+ depthMm: number;
190
+ }>;
191
+ export type StompboxPartProfile = Readonly<{
192
+ id: string;
193
+ label: string;
194
+ family: "knob" | "led" | "footswitch" | "audio-jack" | "dc-jack";
195
+ level: "exterior";
196
+ status: "generated-stub";
197
+ panelHoleDrillMm: number;
198
+ drillHoleProfileId?: string;
199
+ geometry: StompboxPartGeometry;
200
+ assets: StompboxAssetRefs;
201
+ assetScale?: number;
202
+ stateTargets?: StompboxPartStateTargets;
203
+ }>;
204
+ export type StompboxPartProfileCatalog = Readonly<Record<string, StompboxPartProfile>>;
205
+ export type StompboxEnclosureProfile = Readonly<{
206
+ variantId: string;
207
+ label: string;
208
+ dimensionsMm: Readonly<{
209
+ widthMm: number;
210
+ lengthMm: number;
211
+ depthMm: number;
212
+ }>;
213
+ topFace: Readonly<{
214
+ usableRectMm: Readonly<{
215
+ x: number;
216
+ y: number;
217
+ width: number;
218
+ height: number;
219
+ }>;
220
+ }>;
221
+ assets: StompboxAssetRefs;
222
+ }>;
223
+ export type StompboxEnclosureProfileCatalog = Readonly<Record<string, StompboxEnclosureProfile>>;
224
+ export type StompboxDefaultPartProfileIds = Readonly<{
225
+ knob: string;
226
+ largeKnob: string;
227
+ smallKnob: string;
228
+ led: string;
229
+ footswitch: string;
230
+ audioJack: string;
231
+ dcJack: string;
232
+ }>;
233
+ export type StompboxHardwareProfile = Readonly<{
234
+ id: string;
235
+ label: string;
236
+ partProfiles: StompboxPartProfileCatalog;
237
+ enclosureProfiles: StompboxEnclosureProfileCatalog;
238
+ defaultEnclosureId: string;
239
+ defaultPartIds: StompboxDefaultPartProfileIds;
240
+ }>;
241
+ export type StompboxHardwareProfileOptions = Readonly<{
242
+ hardwareProfile?: StompboxHardwareProfile;
243
+ }>;
244
+ export type StompboxDiagnosticCode = "placement-auto-generated" | "unsupported-control" | "unknown-part-profile" | "placement-collision" | "placement-clearance" | "placement-out-of-bounds" | "invalid-glb-asset" | "missing-state-target-contract" | "missing-state-target" | "ambiguous-state-target";
245
+ export type StompboxDiagnostic = Readonly<{
246
+ code: StompboxDiagnosticCode;
247
+ message: string;
248
+ controlId?: string;
249
+ partId?: string;
250
+ placementId?: string;
251
+ face?: StompboxFaceId;
252
+ assetPath?: string;
253
+ targetRole?: StompboxGlbStateTargetRole;
254
+ }>;
255
+ export type StompboxDrillHole = Readonly<{
256
+ id: string;
257
+ face: StompboxFaceId;
258
+ centerMm: StompboxPoint2;
259
+ drillDiameterMm: number;
260
+ drillHoleProfileId?: string;
261
+ partId: string;
262
+ partLabel: string;
263
+ partFamily: StompboxPartProfile["family"];
264
+ partGeometry: StompboxPartGeometry;
265
+ assetScale?: number;
266
+ controlId?: string;
267
+ componentId?: string;
268
+ label?: string;
269
+ provenance: StompboxPlacementProvenance;
270
+ locked?: boolean;
271
+ assets: StompboxAssetRefs;
272
+ stateTargets?: StompboxPartStateTargets;
273
+ }>;
274
+ export type StompboxDrillLayout = Readonly<{
275
+ schema: "stompbox-drill-layout/v1";
276
+ units: StompboxUnits;
277
+ enclosure: StompboxEnclosureProfile;
278
+ holes: readonly StompboxDrillHole[];
279
+ diagnostics: readonly StompboxDiagnostic[];
280
+ }>;
281
+ export type StompboxPreviewMaterial = Readonly<{
282
+ color?: string;
283
+ strokeColor?: string;
284
+ offColor?: string;
285
+ pressedColor?: string;
286
+ emissive?: boolean;
287
+ intensity?: number;
288
+ metallicFactor?: number;
289
+ roughnessFactor?: number;
290
+ opacity?: number;
291
+ }>;
292
+ export type StompboxLabelAppearance = Readonly<{
293
+ text?: string;
294
+ color?: string;
295
+ fontFamily?: string;
296
+ fontSizeMm?: number;
297
+ }>;
298
+ export type StompboxAppearance = Readonly<{
299
+ enclosure?: StompboxPreviewMaterial;
300
+ template?: StompboxPreviewMaterial & Readonly<{
301
+ guideColor?: string;
302
+ foldColor?: string;
303
+ holeStrokeColor?: string;
304
+ holeFillColor?: string;
305
+ centerDotColor?: string;
306
+ }>;
307
+ defaults?: Readonly<{
308
+ led?: StompboxPreviewMaterial;
309
+ label?: StompboxLabelAppearance;
310
+ footswitch?: StompboxPreviewMaterial;
311
+ audioJack?: StompboxPreviewMaterial;
312
+ dcJack?: StompboxPreviewMaterial;
313
+ }>;
314
+ controls?: Readonly<Record<string, Readonly<{
315
+ led?: StompboxPreviewMaterial;
316
+ label?: StompboxLabelAppearance;
317
+ footswitch?: StompboxPreviewMaterial;
318
+ audioJack?: StompboxPreviewMaterial;
319
+ dcJack?: StompboxPreviewMaterial;
320
+ }>>>;
321
+ parts?: Readonly<Record<string, StompboxPreviewMaterial>>;
322
+ labels?: Readonly<Record<string, StompboxLabelAppearance>>;
323
+ }>;
324
+ export type StompboxAppearancePatchTarget = Readonly<{
325
+ targetId: string;
326
+ color?: string;
327
+ strokeColor?: string;
328
+ offColor?: string;
329
+ pressedColor?: string;
330
+ emissive?: boolean;
331
+ intensity?: number;
332
+ metallicFactor?: number;
333
+ roughnessFactor?: number;
334
+ opacity?: number;
335
+ }>;
336
+ export type StompboxPartAppearancePatchTarget = StompboxAppearancePatchTarget & Readonly<{
337
+ partId: string;
338
+ controlId?: string;
339
+ family: StompboxPartProfile["family"];
340
+ }>;
341
+ export type StompboxDecalAppearancePatchTarget = Readonly<{
342
+ targetId: string;
343
+ decalId: string;
344
+ kind: StompboxPreviewDecal["kind"];
345
+ face: StompboxFaceId;
346
+ text?: string;
347
+ color?: string;
348
+ fontFamily?: string;
349
+ fontSizeMm?: number;
350
+ }>;
351
+ export type StompboxResolvedAppearance = Readonly<{
352
+ schema: "stompbox-appearance-patch/v1";
353
+ units: StompboxUnits;
354
+ enclosure?: StompboxAppearancePatchTarget;
355
+ parts: Readonly<Record<string, StompboxPartAppearancePatchTarget>>;
356
+ decals: Readonly<Record<string, StompboxDecalAppearancePatchTarget>>;
357
+ }>;
358
+ export type StompboxPreviewPart = Readonly<{
359
+ id: string;
360
+ partId: string;
361
+ family: StompboxPartProfile["family"];
362
+ geometry: StompboxPartGeometry;
363
+ assetScale?: number;
364
+ controlId?: string;
365
+ face: StompboxFaceId;
366
+ provenance: StompboxPlacementProvenance;
367
+ assets: ResolvedStompboxAssetPaths;
368
+ stateTargets?: StompboxPartStateTargets;
369
+ transform: Readonly<{
370
+ translationMm: StompboxPoint3;
371
+ rotationDeg: StompboxRotationDeg;
372
+ }>;
373
+ material?: StompboxPreviewMaterial;
374
+ }>;
375
+ export type StompboxPreviewDecalCommon = Readonly<{
376
+ id: string;
377
+ face: StompboxFaceId;
378
+ centerMm: StompboxPoint2;
379
+ placement?: StompboxDecalPlacement;
380
+ sizeMm: StompboxSize2;
381
+ rotationDeg: number;
382
+ }>;
383
+ export type StompboxPreviewTextDecal = StompboxPreviewDecalCommon & Readonly<{
384
+ kind: "text";
385
+ text: string;
386
+ color: string;
387
+ fontFamily: string;
388
+ fontSizeMm: number;
389
+ }>;
390
+ export type StompboxPreviewSvgDecal = StompboxPreviewDecalCommon & Readonly<{
391
+ kind: "svg";
392
+ svg: string;
393
+ color?: string;
394
+ }>;
395
+ export type StompboxPreviewImageDecal = StompboxPreviewDecalCommon & Readonly<{
396
+ kind: "image";
397
+ href: string;
398
+ mimeType?: string;
399
+ color?: string;
400
+ }>;
401
+ export type StompboxPreviewDecal = StompboxPreviewTextDecal | StompboxPreviewSvgDecal | StompboxPreviewImageDecal;
402
+ export type StompboxPreviewEnclosure = Omit<StompboxEnclosureProfile, "assets"> & Readonly<{
403
+ assets: ResolvedStompboxAssetPaths;
404
+ material?: StompboxPreviewMaterial;
405
+ }>;
406
+ export type StompboxPreview = Readonly<{
407
+ schema: "stompbox-preview/v1";
408
+ units: StompboxUnits;
409
+ enclosure: StompboxPreviewEnclosure;
410
+ parts: readonly StompboxPreviewPart[];
411
+ decals: readonly StompboxPreviewDecal[];
412
+ drillLayout: StompboxDrillLayout;
413
+ diagnostics: readonly StompboxDiagnostic[];
414
+ }>;
415
+ export type StompboxRuntimeControlKind = "knob" | "switch";
416
+ export type StompboxCompiledControlLike = Readonly<{
417
+ id: string;
418
+ sourceComponentId?: string;
419
+ name: string;
420
+ kind: "potentiometer" | "variableResistor" | "switch";
421
+ value: number;
422
+ defaultBehavior?: "noon" | "source";
423
+ min: number;
424
+ max: number;
425
+ step: number;
426
+ unit?: string;
427
+ sweep?: string;
428
+ options?: readonly string[];
429
+ targets?: readonly unknown[];
430
+ }>;
431
+ export type StompboxSourcePanelControl = Readonly<{
432
+ id: string;
433
+ label: string;
434
+ kind: StompboxRuntimeControlKind;
435
+ value: number;
436
+ sourceComponentId?: string;
437
+ panelElementId?: string;
438
+ sweep?: string;
439
+ options?: readonly string[];
440
+ description?: string;
441
+ }>;
442
+ export type StompboxRuntimeControlDescriptor = Readonly<{
443
+ id: string;
444
+ label: string;
445
+ kind: StompboxRuntimeControlKind;
446
+ source: "compiled" | "source-panel";
447
+ value: number;
448
+ min: number;
449
+ max: number;
450
+ step: number;
451
+ normalizedValue: ControlValue;
452
+ sourceComponentId?: string;
453
+ panelElementId?: string;
454
+ runtimeControlId?: string;
455
+ controlKind?: StompboxCompiledControlLike["kind"];
456
+ unit?: string;
457
+ sweep?: string;
458
+ options?: readonly string[];
459
+ description?: string;
460
+ targetCount?: number;
461
+ }>;
462
+ export type StompboxRuntimeControlRoute = Readonly<{
463
+ publicControlId: string;
464
+ runtimeControlId?: string;
465
+ sourceComponentId?: string;
466
+ kind: StompboxRuntimeControlKind;
467
+ source: "compiled" | "source-panel";
468
+ min: number;
469
+ max: number;
470
+ step: number;
471
+ }>;
472
+ export type StompboxControlSurface = Readonly<{
473
+ schema: "stompbox-control-surface/v1";
474
+ pedalId: string;
475
+ label?: string;
476
+ panel: Panel;
477
+ controls: readonly StompboxRuntimeControlDescriptor[];
478
+ routes: Readonly<Record<string, StompboxRuntimeControlRoute>>;
479
+ diagnostics: readonly StompboxDiagnostic[];
480
+ }>;
481
+ export type StompboxPedalState = Readonly<{
482
+ schema: "stompbox-pedal-state/v1";
483
+ pedalId: string;
484
+ revision: number;
485
+ enabled: boolean;
486
+ controls: ControlState;
487
+ }>;
488
+ export type StompboxPedalStateCommand = Readonly<{
489
+ type: "set-enabled";
490
+ enabled: boolean;
491
+ }> | Readonly<{
492
+ type: "set-control-value";
493
+ controlId: string;
494
+ value: ControlValue;
495
+ }> | Readonly<{
496
+ type: "noop";
497
+ }> | Readonly<{
498
+ type: "error";
499
+ reason: string;
500
+ controlId?: string;
501
+ }>;
502
+ export type StompboxRuntimeCommand = Readonly<{
503
+ kind: "set-control-value";
504
+ pedalId: string;
505
+ controlId: string;
506
+ publicControlId: string;
507
+ rawValue: number;
508
+ }> | Readonly<{
509
+ kind: "set-enabled";
510
+ pedalId: string;
511
+ enabled: boolean;
512
+ }> | Readonly<{
513
+ kind: "noop";
514
+ }> | Readonly<{
515
+ kind: "error";
516
+ reason: string;
517
+ controlId?: string;
518
+ }>;
519
+ export type StompboxPedalStateChange = Readonly<{
520
+ previous: StompboxPedalState;
521
+ current: StompboxPedalState;
522
+ changedControlIds: readonly string[];
523
+ enabledChanged: boolean;
524
+ command: StompboxPedalStateCommand;
525
+ }>;
526
+ export type StompboxPedalStateListener = (event: StompboxPedalStateChange) => void;
527
+ export type StompboxControlStateListener = (value: ControlValue | undefined, event: StompboxPedalStateChange) => void;
528
+ export type StompboxPreviewStatePatchListener = (patch: StompboxPreviewStatePatch, event: StompboxPedalStateChange) => void;
529
+ export type StompboxUnsubscribe = () => void;
530
+ export type StompboxPedalStateStore = Readonly<{
531
+ getSnapshot(): StompboxPedalState;
532
+ dispatch(command: StompboxPedalStateCommand): StompboxPedalState;
533
+ setEnabled(enabled: boolean): StompboxPedalState;
534
+ setControlValue(controlId: string, value: ControlValue): StompboxPedalState;
535
+ turnKnob(controlId: string, position: number): StompboxPedalState;
536
+ pressFootswitch(partIdOrControlId: string, pressed: boolean): StompboxPedalState;
537
+ subscribe(listener: StompboxPedalStateListener): StompboxUnsubscribe;
538
+ subscribeControl(controlId: string, listener: StompboxControlStateListener): StompboxUnsubscribe;
539
+ subscribePreviewPatch(listener: StompboxPreviewStatePatchListener): StompboxUnsubscribe;
540
+ }>;
541
+ export type StompboxPreviewStatePatchTarget = Readonly<{
542
+ targetId: string;
543
+ previewPartId: string;
544
+ partId: string;
545
+ family: StompboxPartProfile["family"];
546
+ controlId?: string;
547
+ value?: ControlValue;
548
+ stateTarget?: StompboxResolvedGlbStateTarget;
549
+ transform?: StompboxPreviewPart["transform"];
550
+ material?: StompboxPreviewMaterial;
551
+ }>;
552
+ export type StompboxPreviewStatePatch = Readonly<{
553
+ schema: "stompbox-preview-state-patch/v1";
554
+ units: StompboxUnits;
555
+ pedalId: string;
556
+ revision: number;
557
+ parts: Readonly<Record<string, StompboxPreviewStatePatchTarget>>;
558
+ }>;
559
+ export type StompboxPreviewSvgViewId = "top" | "bottom" | "left" | "right" | "back";
560
+ export type StompboxPreviewSvgViews = Readonly<{
561
+ schema: "stompbox-preview-svg-views/v1";
562
+ units: StompboxUnits;
563
+ preview: StompboxPreview;
564
+ views: Readonly<Record<StompboxPreviewSvgViewId, string>>;
565
+ diagnostics: readonly StompboxDiagnostic[];
566
+ }>;
567
+ export type StompboxPreviewGlb = Readonly<{
568
+ schema: "stompbox-preview-glb/v1";
569
+ mimeType: "model/gltf-binary";
570
+ bytes: Uint8Array;
571
+ preview: StompboxPreview;
572
+ diagnostics: readonly StompboxDiagnostic[];
573
+ }>;
574
+ export type StompboxPreviewSvgGrainOptions = Readonly<{
575
+ baseFrequency?: number;
576
+ numOctaves?: number;
577
+ opacity?: number;
578
+ }>;
579
+ export type StompboxDrillTemplateHole = StompboxDrillHole & Readonly<{
580
+ templateCenterMm: StompboxPoint2;
581
+ }>;
582
+ export type StompboxDrillTemplateScaleMark = Readonly<{
583
+ id: string;
584
+ label: string;
585
+ lengthMm: number;
586
+ startMm: StompboxPoint2;
587
+ endMm: StompboxPoint2;
588
+ }>;
589
+ export type StompboxDrillTemplatePage = Readonly<{
590
+ paper: "A4";
591
+ orientation: "portrait";
592
+ widthMm: number;
593
+ heightMm: number;
594
+ marginMm: number;
595
+ }>;
596
+ export type StompboxDrillTemplate = Readonly<{
597
+ schema: "stompbox-drill-template/v1";
598
+ mode: StompboxTemplateMode;
599
+ units: StompboxUnits;
600
+ scale: 1;
601
+ detailLevel: "preview" | "fabrication-detail";
602
+ canvasMm: Readonly<{
603
+ widthMm: number;
604
+ heightMm: number;
605
+ }>;
606
+ page: StompboxDrillTemplatePage | undefined;
607
+ enclosure: StompboxEnclosureProfile;
608
+ holes: readonly StompboxDrillTemplateHole[];
609
+ decals: readonly StompboxPreviewDecal[];
610
+ appearance?: StompboxAppearance;
611
+ scaleMarks: readonly StompboxDrillTemplateScaleMark[];
612
+ holeTable: readonly StompboxDrillHole[];
613
+ diagnostics: readonly StompboxDiagnostic[];
614
+ }>;
615
+ export type StompboxLayoutOptions = StompboxHardwareProfileOptions & Readonly<{
616
+ enclosureId?: string;
617
+ includePowerJack?: boolean;
618
+ minPartClearanceMm?: number;
619
+ styleProfile?: StompboxStyleProfile;
620
+ }>;
621
+ export type StompboxFromVdspOptions = StompboxLayoutOptions & Readonly<{
622
+ filename?: string;
623
+ }>;
624
+ export type StompboxDecalOptions = Readonly<{
625
+ decals?: readonly StompboxDecalInput[];
626
+ }>;
627
+ export type StompboxAppearanceOptions = Readonly<{
628
+ appearance?: StompboxAppearance;
629
+ }>;
630
+ export type StompboxPreviewOptions = StompboxLayoutOptions & StompboxAssetResolveOptions & StompboxDecalOptions & StompboxAppearanceOptions & Readonly<{
631
+ state?: ControlState;
632
+ pedalState?: StompboxPedalState;
633
+ }>;
634
+ export type StompboxPreviewFromVdspOptions = StompboxPreviewOptions & Readonly<{
635
+ filename?: string;
636
+ }>;
637
+ export type StompboxDrillTemplateOptions = StompboxLayoutOptions & StompboxDecalOptions & StompboxAppearanceOptions & Readonly<{
638
+ mode: StompboxTemplateMode;
639
+ }>;
640
+ export type StompboxDrillTemplateFromVdspOptions = StompboxDrillTemplateOptions & Readonly<{
641
+ filename?: string;
642
+ }>;
643
+ export type StompboxPreviewSvgViewsOptions = StompboxPreviewOptions & Readonly<{
644
+ grain?: boolean | StompboxPreviewSvgGrainOptions;
645
+ }>;
646
+ export type StompboxPreviewSvgViewsFromVdspOptions = StompboxPreviewSvgViewsOptions & Readonly<{
647
+ filename?: string;
648
+ }>;
649
+ export type StompboxPreviewGlbOptions = StompboxPreviewOptions;
650
+ export type StompboxPreviewGlbFromVdspOptions = StompboxPreviewGlbOptions & Readonly<{
651
+ filename?: string;
652
+ }>;
653
+ export declare function resolveStompboxAssetPaths(assets: StompboxAssetRefs, options?: StompboxAssetResolveOptions): ResolvedStompboxAssetPaths;
654
+ export declare function validateStompboxGlbAsset(bytes: Uint8Array, partProfile: StompboxPartProfile, options?: StompboxGlbAssetValidationOptions): StompboxGlbAssetValidation;
655
+ export declare function validateStompboxGlbAssetFile(path: string, partProfile: StompboxPartProfile): StompboxGlbAssetValidation;
656
+ export declare function validateStompboxHardwareProfileAssets(hardwareProfile: StompboxHardwareProfile, options?: StompboxHardwareProfileAssetValidationOptions): StompboxHardwareProfileAssetValidation;
657
+ export declare function createStompboxSourcePanelControls(document: CircuitDocument): readonly StompboxSourcePanelControl[];
658
+ export declare function createStompboxControlSurface(document: CircuitDocument, options: Readonly<{
659
+ pedalId: string;
660
+ label?: string;
661
+ compiledControls?: readonly StompboxCompiledControlLike[];
662
+ }>): StompboxControlSurface;
663
+ export declare function createStompboxPanelFromControlSurface(surface: StompboxControlSurface): Panel;
664
+ export declare function createDefaultStompboxPedalState(document: CircuitDocument, options: Readonly<{
665
+ pedalId: string;
666
+ enabled?: boolean;
667
+ compiledControls?: readonly StompboxCompiledControlLike[];
668
+ }>): StompboxPedalState;
669
+ export declare function createDefaultStompboxPedalStateFromVdsp(source: string, options: Readonly<{
670
+ pedalId: string;
671
+ filename?: string;
672
+ enabled?: boolean;
673
+ compiledControls?: readonly StompboxCompiledControlLike[];
674
+ }>): StompboxPedalState;
675
+ export declare function createStompboxPedalStateFromControlSurface(surface: StompboxControlSurface, options?: Readonly<{
676
+ enabled?: boolean;
677
+ }>): StompboxPedalState;
678
+ export declare function normalizeStompboxControlValue(descriptor: StompboxRuntimeControlDescriptor, rawValue: number): ControlValue;
679
+ export declare function denormalizeStompboxControlValue(descriptor: StompboxRuntimeControlDescriptor, value: ControlValue): number;
680
+ export declare function createStompboxRuntimeCommand(surface: StompboxControlSurface, command: StompboxPedalStateCommand): StompboxRuntimeCommand;
681
+ export declare function setStompboxPedalEnabled(state: StompboxPedalState, enabled: boolean): StompboxPedalState;
682
+ export declare function setStompboxControlValue(state: StompboxPedalState, controlId: string, value: ControlValue): StompboxPedalState;
683
+ export declare function applyStompboxPedalStateCommand(state: StompboxPedalState, command: StompboxPedalStateCommand): StompboxPedalState;
684
+ export declare function createStompboxKnobTurnCommand(surface: StompboxControlSurface, input: Readonly<{
685
+ controlId: string;
686
+ position: number;
687
+ }>): StompboxPedalStateCommand;
688
+ export declare function createStompboxFootswitchPressCommand(surface: StompboxControlSurface, input: Readonly<{
689
+ controlId?: string;
690
+ partId?: string;
691
+ pressed: boolean;
692
+ }>): StompboxPedalStateCommand;
693
+ export declare function applyStompboxPreviewInteraction(state: StompboxPedalState, command: StompboxPedalStateCommand): StompboxPedalState;
694
+ export declare function createStompboxPedalStateStore(initialState: StompboxPedalState, options?: Readonly<{
695
+ preview?: StompboxPreview;
696
+ }>): StompboxPedalStateStore;
697
+ export declare function createStompboxDrillLayoutFromVdsp(source: string, options?: StompboxFromVdspOptions): StompboxDrillLayout;
698
+ export declare function createStompboxDrillLayout(document: CircuitDocument, options?: StompboxLayoutOptions): StompboxDrillLayout;
699
+ export declare function createStompboxPreviewFromVdsp(source: string, options?: StompboxPreviewFromVdspOptions): StompboxPreview;
700
+ export declare function createStompboxPreview(document: CircuitDocument, options?: StompboxPreviewOptions): StompboxPreview;
701
+ export declare function createStompboxPreviewStatePatch(preview: StompboxPreview, state: StompboxPedalState, previousState?: StompboxPedalState): StompboxPreviewStatePatch;
702
+ export declare function applyStompboxPreviewStatePatch(preview: StompboxPreview, patch: StompboxPreviewStatePatch): StompboxPreview;
703
+ export declare function resolveStompboxAppearance(preview: StompboxPreview, appearance?: StompboxAppearance): StompboxResolvedAppearance;
704
+ export declare function createStompboxAppearancePatch(preview: StompboxPreview, appearance?: StompboxAppearance): StompboxResolvedAppearance;
705
+ export declare function createStompboxDrillTemplateFromVdsp(source: string, options: StompboxDrillTemplateFromVdspOptions): StompboxDrillTemplate;
706
+ export declare function createStompboxDrillTemplate(layout: StompboxDrillLayout, options: StompboxDrillTemplateOptions): StompboxDrillTemplate;
707
+ export declare function createStompboxDrillTemplateSvgFromVdsp(source: string, options: StompboxDrillTemplateFromVdspOptions): string;
708
+ export declare function createStompboxDrillTemplateSvg(layout: StompboxDrillLayout, options: StompboxDrillTemplateOptions): string;
709
+ export declare function createStompboxPreviewSvgViewsFromVdsp(source: string, options?: StompboxPreviewSvgViewsFromVdspOptions): StompboxPreviewSvgViews;
710
+ export declare function createStompboxPreviewSvgViews(document: CircuitDocument, options?: StompboxPreviewSvgViewsOptions): StompboxPreviewSvgViews;
711
+ export declare function createStompboxPreviewGlbFromVdsp(source: string, options?: StompboxPreviewGlbFromVdspOptions): StompboxPreviewGlb;
712
+ export declare function createStompboxPreviewGlb(document: CircuitDocument, options?: StompboxPreviewGlbOptions): StompboxPreviewGlb;
713
+ export declare function knobRotationDegForPosition(position: number): number;
714
+ //# sourceMappingURL=index.d.ts.map