@cutoff/audio-ui-react 1.0.0-preview.20260123.1125

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 (107) hide show
  1. package/LICENSE.md +690 -0
  2. package/README.md +228 -0
  3. package/dist/components/defaults/controls/Button.d.ts +51 -0
  4. package/dist/components/defaults/controls/Button.d.ts.map +1 -0
  5. package/dist/components/defaults/controls/ButtonView.d.ts +20 -0
  6. package/dist/components/defaults/controls/ButtonView.d.ts.map +1 -0
  7. package/dist/components/defaults/controls/CycleButton.d.ts +82 -0
  8. package/dist/components/defaults/controls/CycleButton.d.ts.map +1 -0
  9. package/dist/components/defaults/controls/Knob.d.ts +82 -0
  10. package/dist/components/defaults/controls/Knob.d.ts.map +1 -0
  11. package/dist/components/defaults/controls/KnobView.d.ts +43 -0
  12. package/dist/components/defaults/controls/KnobView.d.ts.map +1 -0
  13. package/dist/components/defaults/controls/Slider.d.ts +79 -0
  14. package/dist/components/defaults/controls/Slider.d.ts.map +1 -0
  15. package/dist/components/defaults/controls/SliderView.d.ts +90 -0
  16. package/dist/components/defaults/controls/SliderView.d.ts.map +1 -0
  17. package/dist/components/defaults/devices/Keys.d.ts +104 -0
  18. package/dist/components/defaults/devices/Keys.d.ts.map +1 -0
  19. package/dist/components/generic/controls/FilmStripBooleanControl.d.ts +58 -0
  20. package/dist/components/generic/controls/FilmStripBooleanControl.d.ts.map +1 -0
  21. package/dist/components/generic/controls/FilmStripContinuousControl.d.ts +82 -0
  22. package/dist/components/generic/controls/FilmStripContinuousControl.d.ts.map +1 -0
  23. package/dist/components/generic/controls/FilmStripDiscreteControl.d.ts +55 -0
  24. package/dist/components/generic/controls/FilmStripDiscreteControl.d.ts.map +1 -0
  25. package/dist/components/generic/controls/FilmstripView.d.ts +36 -0
  26. package/dist/components/generic/controls/FilmstripView.d.ts.map +1 -0
  27. package/dist/components/generic/controls/ImageKnob.d.ts +74 -0
  28. package/dist/components/generic/controls/ImageKnob.d.ts.map +1 -0
  29. package/dist/components/generic/controls/ImageKnobView.d.ts +38 -0
  30. package/dist/components/generic/controls/ImageKnobView.d.ts.map +1 -0
  31. package/dist/components/generic/controls/ImageRotarySwitch.d.ts +54 -0
  32. package/dist/components/generic/controls/ImageRotarySwitch.d.ts.map +1 -0
  33. package/dist/components/generic/controls/ImageSwitch.d.ts +62 -0
  34. package/dist/components/generic/controls/ImageSwitch.d.ts.map +1 -0
  35. package/dist/components/generic/controls/ImageSwitchView.d.ts +26 -0
  36. package/dist/components/generic/controls/ImageSwitchView.d.ts.map +1 -0
  37. package/dist/components/primitives/AdaptiveBox.d.ts +127 -0
  38. package/dist/components/primitives/AdaptiveBox.d.ts.map +1 -0
  39. package/dist/components/primitives/controls/BooleanControl.d.ts +66 -0
  40. package/dist/components/primitives/controls/BooleanControl.d.ts.map +1 -0
  41. package/dist/components/primitives/controls/ContinuousControl.d.ts +46 -0
  42. package/dist/components/primitives/controls/ContinuousControl.d.ts.map +1 -0
  43. package/dist/components/primitives/controls/DiscreteControl.d.ts +70 -0
  44. package/dist/components/primitives/controls/DiscreteControl.d.ts.map +1 -0
  45. package/dist/components/primitives/controls/OptionView.d.ts +12 -0
  46. package/dist/components/primitives/controls/OptionView.d.ts.map +1 -0
  47. package/dist/components/primitives/svg/FilmstripImage.d.ts +60 -0
  48. package/dist/components/primitives/svg/FilmstripImage.d.ts.map +1 -0
  49. package/dist/components/primitives/svg/Image.d.ts +50 -0
  50. package/dist/components/primitives/svg/Image.d.ts.map +1 -0
  51. package/dist/components/primitives/svg/LabelRing.d.ts +42 -0
  52. package/dist/components/primitives/svg/LabelRing.d.ts.map +1 -0
  53. package/dist/components/primitives/svg/LinearCursor.d.ts +72 -0
  54. package/dist/components/primitives/svg/LinearCursor.d.ts.map +1 -0
  55. package/dist/components/primitives/svg/LinearStrip.d.ts +49 -0
  56. package/dist/components/primitives/svg/LinearStrip.d.ts.map +1 -0
  57. package/dist/components/primitives/svg/RadialHtmlOverlay.d.ts +29 -0
  58. package/dist/components/primitives/svg/RadialHtmlOverlay.d.ts.map +1 -0
  59. package/dist/components/primitives/svg/RadialImage.d.ts +36 -0
  60. package/dist/components/primitives/svg/RadialImage.d.ts.map +1 -0
  61. package/dist/components/primitives/svg/RevealingPath.d.ts +37 -0
  62. package/dist/components/primitives/svg/RevealingPath.d.ts.map +1 -0
  63. package/dist/components/primitives/svg/RingArc.d.ts +21 -0
  64. package/dist/components/primitives/svg/RingArc.d.ts.map +1 -0
  65. package/dist/components/primitives/svg/RotaryImage.d.ts +43 -0
  66. package/dist/components/primitives/svg/RotaryImage.d.ts.map +1 -0
  67. package/dist/components/primitives/svg/TickRing.d.ts +53 -0
  68. package/dist/components/primitives/svg/TickRing.d.ts.map +1 -0
  69. package/dist/components/primitives/svg/ValueRing.d.ts +38 -0
  70. package/dist/components/primitives/svg/ValueRing.d.ts.map +1 -0
  71. package/dist/components/primitives/svg/ValueStrip.d.ts +59 -0
  72. package/dist/components/primitives/svg/ValueStrip.d.ts.map +1 -0
  73. package/dist/components/types.d.ts +451 -0
  74. package/dist/components/types.d.ts.map +1 -0
  75. package/dist/hooks/useAdaptiveSize.d.ts +32 -0
  76. package/dist/hooks/useAdaptiveSize.d.ts.map +1 -0
  77. package/dist/hooks/useArcAngle.d.ts +23 -0
  78. package/dist/hooks/useArcAngle.d.ts.map +1 -0
  79. package/dist/hooks/useAudioParameter.d.ts +89 -0
  80. package/dist/hooks/useAudioParameter.d.ts.map +1 -0
  81. package/dist/hooks/useBooleanInteraction.d.ts +106 -0
  82. package/dist/hooks/useBooleanInteraction.d.ts.map +1 -0
  83. package/dist/hooks/useBooleanParameterResolution.d.ts +54 -0
  84. package/dist/hooks/useBooleanParameterResolution.d.ts.map +1 -0
  85. package/dist/hooks/useContinuousInteraction.d.ts +94 -0
  86. package/dist/hooks/useContinuousInteraction.d.ts.map +1 -0
  87. package/dist/hooks/useContinuousParameterResolution.d.ts +75 -0
  88. package/dist/hooks/useContinuousParameterResolution.d.ts.map +1 -0
  89. package/dist/hooks/useDiscreteInteraction.d.ts +70 -0
  90. package/dist/hooks/useDiscreteInteraction.d.ts.map +1 -0
  91. package/dist/hooks/useDiscreteParameterResolution.d.ts +120 -0
  92. package/dist/hooks/useDiscreteParameterResolution.d.ts.map +1 -0
  93. package/dist/hooks/useNoteInteraction.d.ts +84 -0
  94. package/dist/hooks/useNoteInteraction.d.ts.map +1 -0
  95. package/dist/hooks/useThemableProps.d.ts +68 -0
  96. package/dist/hooks/useThemableProps.d.ts.map +1 -0
  97. package/dist/index.d.ts +77 -0
  98. package/dist/index.d.ts.map +1 -0
  99. package/dist/index.js +3197 -0
  100. package/dist/index.js.map +1 -0
  101. package/dist/stats.html +4949 -0
  102. package/dist/style.css +1 -0
  103. package/dist/utils/textUtils.d.ts +15 -0
  104. package/dist/utils/textUtils.d.ts.map +1 -0
  105. package/dist/utils/theme.d.ts +88 -0
  106. package/dist/utils/theme.d.ts.map +1 -0
  107. package/package.json +78 -0
@@ -0,0 +1,90 @@
1
+ import { default as React } from 'react';
2
+ import { ControlComponent, SliderVariant, SliderCursorSize } from '../../types';
3
+
4
+ /**
5
+ * Props for the SliderView component
6
+ */
7
+ export type SliderViewProps = {
8
+ /** Normalized value between 0 and 1 */
9
+ normalizedValue: number;
10
+ /** Whether to start fill from center (bipolar mode) */
11
+ bipolar?: boolean;
12
+ /** Visual variant of the slider */
13
+ variant?: SliderVariant;
14
+ /** Orientation of the slider */
15
+ orientation?: "horizontal" | "vertical";
16
+ /** Thickness of the slider (normalized 0.0-1.0, maps to 1-50) */
17
+ thickness?: number;
18
+ /** Corner roundness (normalized 0.0-1.0, maps to 0-20, or CSS variable string) */
19
+ roundness?: number | string;
20
+ /** Color prop (kept for API compatibility, but colors are read from CSS variables) */
21
+ color?: string;
22
+ /** Cursor size option - determines which component's width is used for the cursor */
23
+ cursorSize?: SliderCursorSize;
24
+ /** Aspect ratio of the cursor */
25
+ cursorAspectRatio?: number;
26
+ /** Overrides the roundness factor of the cursor. Defaults to `roundness` */
27
+ cursorRoundness?: number | string;
28
+ /** Optional image URL to display as cursor */
29
+ cursorImageHref?: string;
30
+ /** Optional CSS class name for the cursor */
31
+ cursorClassName?: string;
32
+ /** Optional inline styles for the cursor */
33
+ cursorStyle?: React.CSSProperties;
34
+ /** Additional CSS class name */
35
+ className?: string;
36
+ /** Content to render (unused in default slider but required by generic props) */
37
+ children?: React.ReactNode;
38
+ };
39
+ /**
40
+ * Pure SVG presentation component for a slider.
41
+ * Renders background and filled rectangles based on normalized value.
42
+ *
43
+ * Colors are read from CSS variables (`--audioui-primary-color`, `--audioui-primary-50`)
44
+ * which are set by the parent Slider component based on the `color` prop.
45
+ *
46
+ * **Performance Optimizations:**
47
+ * - Memoized calculations: thickness translation, layout coordinates, strip padding, cursor dimensions, style objects
48
+ * - Constants moved outside component to avoid unnecessary dependency array entries
49
+ * - Simple boolean checks and nullish coalescing are not memoized (minimal overhead)
50
+ * - Style objects memoized to prevent unnecessary re-renders of child components
51
+ *
52
+ * @param {number} normalizedValue - Value between 0 and 1
53
+ * @param {boolean} [bipolar=false] - Whether to fill from center (bipolar mode)
54
+ * @param {SliderVariant} [variant="abstract"] - Visual variant of the slider
55
+ * @param {"horizontal" | "vertical"} [orientation="vertical"] - Orientation of the slider
56
+ * @param {number} [thickness=0.4] - Normalized thickness 0.0-1.0 (maps to 1-50)
57
+ * @param {number | string} [roundness] - Normalized roundness 0.0-1.0 (maps to 0-20) or CSS variable string
58
+ * @param {string} [color] - Color prop (kept for API compatibility, but not used - CSS variables are used instead)
59
+ * @param {SliderCursorSize} [cursorSize] - Cursor size option (None, Strip, Track, Tick, Label)
60
+ * @param {number} [cursorAspectRatio] - Aspect ratio of the cursor
61
+ * @param {number | string} [cursorRoundness] - Overrides cursor roundness (defaults to roundness prop)
62
+ * @param {string} [cursorImageHref] - Optional image URL for cursor
63
+ * @param {string} [cursorClassName] - Optional CSS class name for cursor
64
+ * @param {React.CSSProperties} [cursorStyle] - Optional inline styles for cursor
65
+ * @param {string} [className] - Optional CSS class name
66
+ * @returns {JSX.Element} SVG group element containing background and foreground strips
67
+ */
68
+ declare function SliderView({ normalizedValue, bipolar, variant, orientation, thickness, roundness, cursorSize, cursorAspectRatio, cursorRoundness, cursorImageHref, cursorClassName, cursorStyle, className, }: SliderViewProps): JSX.Element;
69
+ declare namespace SliderView {
70
+ var viewBox: {
71
+ readonly vertical: {
72
+ readonly width: 100;
73
+ readonly height: 300;
74
+ };
75
+ readonly horizontal: {
76
+ readonly width: 300;
77
+ readonly height: 100;
78
+ };
79
+ };
80
+ }
81
+ /**
82
+ * Props for specialized slider views (without normalizedValue, children, className, style, orientation)
83
+ */
84
+ type SpecializedSliderProps = Omit<SliderViewProps, "normalizedValue" | "children" | "className" | "style" | "orientation">;
85
+ declare const VerticalSliderView: ControlComponent<SpecializedSliderProps>;
86
+ declare const HorizontalSliderView: ControlComponent<SpecializedSliderProps>;
87
+ export { VerticalSliderView, HorizontalSliderView };
88
+ declare const _default: React.MemoExoticComponent<typeof SliderView>;
89
+ export default _default;
90
+ //# sourceMappingURL=SliderView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SliderView.d.ts","sourceRoot":"","sources":["../../../../src/components/defaults/controls/SliderView.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAS5E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,uCAAuC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mCAAmC;IACnC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,gCAAgC;IAChC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,iCAAiC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,8CAA8C;IAC9C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAClC,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,iBAAS,UAAU,CAAC,EAChB,eAAe,EACf,OAAe,EACf,OAAoB,EACpB,WAAwB,EACxB,SAAe,EACf,SAA6B,EAC7B,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,WAAW,EACX,SAAS,GACZ,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAoK/B;kBAlLQ,UAAU;;;;;;;;;;;;AAsMnB;;GAEG;AACH,KAAK,sBAAsB,GAAG,IAAI,CAC9B,eAAe,EACf,iBAAiB,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,GAAG,aAAa,CACzE,CAAC;AAiCF,QAAA,MAAM,kBAAkB,EAAwC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;AAgCzG,QAAA,MAAM,oBAAoB,EAA0C,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;AAE7G,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAC;;AACpD,wBAAsC"}
@@ -0,0 +1,104 @@
1
+ import { default as React } from 'react';
2
+ import { AdaptiveBoxProps, AdaptiveSizeProps, AudioControlEvent, BaseProps, ThemableProps } from '../../types';
3
+ import { WHITE_KEY_NAMES } from '@cutoff/audio-ui-core';
4
+
5
+ /**
6
+ * Type definition for note names (C to B)
7
+ */
8
+ type NoteName = (typeof WHITE_KEY_NAMES)[number];
9
+ /**
10
+ * Props for the Keys component
11
+ */
12
+ export type KeysProps = BaseProps & AdaptiveSizeProps & Omit<AdaptiveBoxProps, "labelMode" | "labelPosition" | "labelAlign"> & ThemableProps & {
13
+ /** Number of keys on the keyboard
14
+ * @default 61 */
15
+ nbKeys?: number;
16
+ /** Starting note name (A-G)
17
+ * @default 'C' for 61 keys, 'A' for 88 keys */
18
+ startKey?: NoteName;
19
+ /** Octave transpose index (default: 0)
20
+ * Positive values shift notes up by that many octaves, negative values shift down
21
+ * @default 0 */
22
+ octaveShift?: number;
23
+ /** Array of notes that should be highlighted
24
+ * Notes can be specified as:
25
+ * - Strings in the format: NoteName + Octave (+ optional '#' for sharp), e.g., 'C4', 'F#5'
26
+ * - Numbers representing MIDI note IDs (e.g., 60 for C4, 61 for C#4, etc.)
27
+ * @example ['C4', 'E4', 'G4'] or [60, 64, 67] or ['C4', 64, 'G4'] */
28
+ notesOn?: (string | number)[];
29
+ /** Key styling mode
30
+ * - 'theme': Uses theme colors (current behavior, uses color prop and themable hook)
31
+ * - 'classic': Classic piano style with ivory white keys and ebony black keys
32
+ * - 'classic-inverted': Inverted classic style with ebony white keys and ivory black keys
33
+ * @default 'theme' */
34
+ keyStyle?: "theme" | "classic" | "classic-inverted";
35
+ /** Callback triggered when a key is pressed or released.
36
+ * Only active if this prop is provided. */
37
+ onChange?: (event: AudioControlEvent<{
38
+ note: number;
39
+ active: boolean;
40
+ }>) => void;
41
+ };
42
+ /**
43
+ * Piano Keys component that renders a piano keyboard visualization.
44
+ * Supports variable number of keys, different starting positions, and note highlighting.
45
+ *
46
+ * Features:
47
+ * - Configurable number of keys (default 61, supports any number from 1 to 128)
48
+ * - Customizable starting position (note and octave)
49
+ * - Highlights active notes (supports both note names and MIDI note numbers)
50
+ * - Maintains proper piano key layout and proportions
51
+ * - Responsive sizing through AdaptiveSvgComponent integration
52
+ * - Multiple size variants (xsmall, small, normal, large, xlarge)
53
+ *
54
+ * @property {boolean} adaptiveSize - Whether the keys component fills its container (ignores size constraints when true)
55
+ * @property {number} nbKeys - Number of keys on the keyboard (default 61)
56
+ * @property {NoteName} startKey - Starting note name (A-G) (default 'C' for 61 keys, 'A' for 88 keys)
57
+ * @property {number} octaveShift - Octave transpose index (default 0). Positive values shift notes up by that many octaves, negative values shift down.
58
+ * @property {(string | number)[]} notesOn - Array of notes that should be highlighted. Can contain note names (e.g., 'C4') or MIDI note numbers (e.g., 60 for C4).
59
+ * @property {string} className - Additional CSS classes
60
+ * @property {React.CSSProperties} style - Additional inline styles
61
+ * @property {SizeType} size - Size of the component (xsmall, small, normal, large, xlarge)
62
+ * @property {"theme" | "classic" | "classic-inverted"} keyStyle - Key styling mode (default "theme")
63
+ *
64
+ * @example
65
+ * ```tsx
66
+ * // Basic usage
67
+ * <Keys />
68
+ *
69
+ * // Full piano configuration with note names
70
+ * <Keys
71
+ * nbKeys={88}
72
+ * startKey="A"
73
+ * octaveShift={0}
74
+ * notesOn={['C4', 'E4', 'G4']}
75
+ * />
76
+ *
77
+ * // Using MIDI note numbers
78
+ * <Keys
79
+ * notesOn={[60, 64, 67]} // C4, E4, G4
80
+ * />
81
+ *
82
+ * // Mixing note names and MIDI note numbers
83
+ * <Keys
84
+ * notesOn={['C4', 64, 'G4']} // C4, E4, G4
85
+ * />
86
+ *
87
+ * // Custom styling with size
88
+ * <Keys
89
+ * className="my-keyboard"
90
+ * style={{ marginTop: '20px' }}
91
+ * size="large"
92
+ * />
93
+ *
94
+ * // Classic piano style
95
+ * <Keys keyStyle="classic" />
96
+ *
97
+ * // Inverted classic style
98
+ * <Keys keyStyle="classic-inverted" />
99
+ * ```
100
+ */
101
+ declare function Keys({ nbKeys, startKey, octaveShift, notesOn, adaptiveSize, size, displayMode, keyStyle, color, roundness, className, style, onChange, onClick, }: KeysProps): import("react/jsx-runtime").JSX.Element;
102
+ declare const _default: React.MemoExoticComponent<typeof Keys>;
103
+ export default _default;
104
+ //# sourceMappingURL=Keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Keys.d.ts","sourceRoot":"","sources":["../../../../src/components/defaults/devices/Keys.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAK3G,OAAO,EAKH,eAAe,EAGlB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,kCAAkC,CAAC;AAK1C;;GAEG;AACH,KAAK,QAAQ,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAGjD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAC7B,iBAAiB,GAGjB,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC,GACpE,aAAa,GAAG;IACZ;qBACiB;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;mDAC+C;IAC/C,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;oBAEgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;yEAIqE;IACrE,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC9B;;;;0BAIsB;IACtB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,kBAAkB,CAAC;IACpD;+CAC2C;IAC3C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;CACpF,CAAC;AASN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,iBAAS,IAAI,CAAC,EACV,MAAW,EACX,QAAoC,EACpC,WAAe,EACf,OAAY,EACZ,YAAoB,EACpB,IAAe,EACf,WAAW,EACX,QAAkB,EAClB,KAAK,EACL,SAAS,EACT,SAAc,EACd,KAAU,EACV,QAAQ,EACR,OAAO,GACV,EAAE,SAAS,2CAiZX;;AAGD,wBAAgC"}
@@ -0,0 +1,58 @@
1
+ import { default as React } from 'react';
2
+ import { AdaptiveBoxProps, AdaptiveSizeProps, BooleanControlProps } from '../../types';
3
+ import { FilmstripProps } from './FilmStripContinuousControl';
4
+
5
+ /**
6
+ * Props for the FilmStripBooleanControl component
7
+ */
8
+ export type FilmStripBooleanControlProps = BooleanControlProps & AdaptiveSizeProps & AdaptiveBoxProps & FilmstripProps & {
9
+ /**
10
+ * If true, inverts the normalized value passed to the view (0.0 -> 1.0 and 1.0 -> 0.0).
11
+ * Useful for filmstrips where frame 0 represents "on" and frame 1 represents "off".
12
+ * @default false
13
+ */
14
+ invertValue?: boolean;
15
+ };
16
+ /**
17
+ * A boolean control that displays frames from a filmstrip sprite sheet.
18
+ *
19
+ * This component supports the widely-used current industry standard for control representation:
20
+ * bitmap sprite sheets (filmstrips). While bitmap-based visualization is more constrained
21
+ * than SVG (no dynamic theming, fixed visual appearance), this component provides full
22
+ * access to all library features:
23
+ *
24
+ * - Complete layout system: AdaptiveBox with all sizing modes, label positioning, alignment
25
+ * - Full parameter model: BooleanParameter with latch/momentary modes
26
+ * - Complete interaction system: Click, drag-in/drag-out, and keyboard interactions
27
+ * - Full accessibility: ARIA attributes, focus management, keyboard navigation
28
+ *
29
+ * Typically uses 2 frames: frame 0 for false/off, frame 1 for true/on.
30
+ *
31
+ * Supports two modes of operation:
32
+ * 1. Strict Mode (Parameter only): Model provided via parameter prop.
33
+ * 2. Ad-Hoc Mode (Props only): Model created from individual props (label, latch, etc.).
34
+ *
35
+ * Note: This component does NOT support themable props (color, roundness, thickness) as
36
+ * visuals are entirely determined by the image content.
37
+ *
38
+ * @param props - Component props
39
+ * @returns Rendered FilmStripBooleanControl component
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * <FilmStripBooleanControl
44
+ * value={isOn}
45
+ * onChange={(e) => setIsOn(e.value)}
46
+ * label="Power"
47
+ * latch={true}
48
+ * frameWidth={100}
49
+ * frameHeight={100}
50
+ * frameCount={2}
51
+ * imageHref="/button-frames.png"
52
+ * />
53
+ * ```
54
+ */
55
+ declare function FilmStripBooleanControl({ latch, value, onChange, label, adaptiveSize, size, displayMode, labelMode, labelPosition, labelAlign, frameWidth, frameHeight, frameCount, imageHref, orientation, frameRotation, invertValue, parameter, paramId, midiResolution, onClick, onMouseDown, onMouseUp, onMouseEnter, onMouseLeave, className, style, }: FilmStripBooleanControlProps): import("react/jsx-runtime").JSX.Element;
56
+ declare const _default: React.MemoExoticComponent<typeof FilmStripBooleanControl>;
57
+ export default _default;
58
+ //# sourceMappingURL=FilmStripBooleanControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilmStripBooleanControl.d.ts","sourceRoot":"","sources":["../../../../src/components/generic/controls/FilmStripBooleanControl.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,mBAAmB,GAC1D,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GAAG;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,iBAAS,uBAAuB,CAAC,EAC7B,KAAa,EACb,KAAa,EACb,QAAQ,EACR,KAAK,EACL,YAAoB,EACpB,IAAe,EACf,WAAW,EACX,SAAS,EACT,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,WAAwB,EACxB,aAAiB,EACjB,WAAmB,EACnB,SAAS,EACT,OAAO,EACP,cAAc,EACd,OAAO,EACP,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,KAAK,GACR,EAAE,4BAA4B,2CAqC9B;;AAED,wBAAmD"}
@@ -0,0 +1,82 @@
1
+ import { default as React } from 'react';
2
+ import { AdaptiveBoxProps, AdaptiveSizeProps, ContinuousControlProps, ValueLabelMode } from '../../types';
3
+
4
+ /**
5
+ * Props specific to filmstrip controls
6
+ */
7
+ export type FilmstripProps = {
8
+ /** Width of a SINGLE frame in the filmstrip */
9
+ frameWidth: number;
10
+ /** Height of a SINGLE frame in the filmstrip */
11
+ frameHeight: number;
12
+ /** Total number of frames in the strip */
13
+ frameCount: number;
14
+ /** URL to the sprite sheet/filmstrip image */
15
+ imageHref: string;
16
+ /** Orientation of the strip (default: "vertical") */
17
+ orientation?: "vertical" | "horizontal";
18
+ /** Optional frame rotation in degrees (default: 0) */
19
+ frameRotation?: number;
20
+ };
21
+ /**
22
+ * Props for the FilmStripContinuousControl component
23
+ */
24
+ export type FilmStripContinuousControlProps = ContinuousControlProps & AdaptiveSizeProps & AdaptiveBoxProps & FilmstripProps & {
25
+ /**
26
+ * Controls how the label and value are displayed.
27
+ * - "labelOnly": Always shows the label (default)
28
+ * - "valueOnly": Always shows the value
29
+ * - "interactive": Shows label normally, but temporarily swaps to value during interaction
30
+ * @default "labelOnly"
31
+ */
32
+ valueAsLabel?: ValueLabelMode;
33
+ /**
34
+ * If true, inverts the normalized value (0.0 -> 1.0 and 1.0 -> 0.0).
35
+ * Useful for filmstrips where frame 0 represents the maximum value and frame N represents the minimum value.
36
+ * @default false
37
+ */
38
+ invertValue?: boolean;
39
+ };
40
+ /**
41
+ * A continuous control that displays frames from a filmstrip sprite sheet.
42
+ *
43
+ * This component supports the widely-used current industry standard for control representation:
44
+ * bitmap sprite sheets (filmstrips). While bitmap-based visualization is more constrained
45
+ * than SVG (no dynamic theming, fixed visual appearance), this component provides full
46
+ * access to all library features:
47
+ *
48
+ * - Complete layout system: AdaptiveBox with all sizing modes, label positioning, alignment
49
+ * - Full parameter model: AudioParameter with min/max ranges, scaling functions, units, formatting
50
+ * - Complete interaction system: Drag, wheel, and keyboard with configurable sensitivity and modes
51
+ * - Full accessibility: ARIA attributes, focus management, keyboard navigation
52
+ *
53
+ * The frame displayed is determined by the normalized value (0-1 maps to frame 0 to frameCount-1).
54
+ *
55
+ * Supports two modes of operation:
56
+ * 1. Parameter model mode: Provide `parameter` (ContinuousParameter) - all range/label info comes from the model
57
+ * 2. Ad-hoc mode: Provide `min`, `max`, `step`, `label` directly as props
58
+ *
59
+ * Note: This component does NOT support themable props (color, roundness, thickness) as
60
+ * visuals are entirely determined by the image content.
61
+ *
62
+ * @param props - Component props
63
+ * @returns Rendered FilmStripContinuousControl component
64
+ *
65
+ * @example
66
+ * ```tsx
67
+ * <FilmStripContinuousControl
68
+ * value={50}
69
+ * min={0}
70
+ * max={100}
71
+ * label="Volume"
72
+ * frameWidth={100}
73
+ * frameHeight={100}
74
+ * frameCount={64}
75
+ * imageHref="/knob-frames.png"
76
+ * />
77
+ * ```
78
+ */
79
+ declare function FilmStripContinuousControl({ min, max, step, bipolar, value, onChange, valueFormatter, label, adaptiveSize, size, displayMode, labelMode, labelPosition, labelAlign, frameWidth, frameHeight, frameCount, imageHref, orientation, frameRotation, parameter, unit, scale, paramId, interactionMode, interactionDirection, interactionSensitivity, valueAsLabel, midiResolution, defaultValue, invertValue, onClick, onMouseDown, onMouseUp, onMouseEnter, onMouseLeave, className, style, }: FilmStripContinuousControlProps): import("react/jsx-runtime").JSX.Element;
80
+ declare const _default: React.MemoExoticComponent<typeof FilmStripContinuousControl>;
81
+ export default _default;
82
+ //# sourceMappingURL=FilmStripContinuousControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilmStripContinuousControl.d.ts","sourceRoot":"","sources":["../../../../src/components/generic/controls/FilmStripContinuousControl.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGtG;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IACzB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,sBAAsB,GAChE,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GAAG;IACb;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,iBAAS,0BAA0B,CAAC,EAChC,GAAG,EACH,GAAG,EACH,IAAI,EACJ,OAAe,EACf,KAAK,EACL,QAAQ,EACR,cAAc,EACd,KAAK,EACL,YAAoB,EACpB,IAAe,EACf,WAAW,EACX,SAAS,EACT,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,WAAwB,EACxB,aAAiB,EACjB,SAAS,EACT,IAAI,EACJ,KAAK,EACL,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,YAA0B,EAC1B,cAAc,EACd,YAAY,EACZ,WAAmB,EACnB,OAAO,EACP,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,KAAK,GACR,EAAE,+BAA+B,2CAgDjC;;AAED,wBAAsD"}
@@ -0,0 +1,55 @@
1
+ import { default as React } from 'react';
2
+ import { AdaptiveBoxProps, AdaptiveSizeProps, DiscreteControlProps } from '../../types';
3
+ import { FilmstripProps } from './FilmStripContinuousControl';
4
+
5
+ /**
6
+ * Props for the FilmStripDiscreteControl component
7
+ */
8
+ export type FilmStripDiscreteControlProps = DiscreteControlProps & AdaptiveSizeProps & AdaptiveBoxProps & FilmstripProps;
9
+ /**
10
+ * A discrete control that displays frames from a filmstrip sprite sheet.
11
+ *
12
+ * This component supports the widely-used current industry standard for control representation:
13
+ * bitmap sprite sheets (filmstrips). While bitmap-based visualization is more constrained
14
+ * than SVG (no dynamic theming, fixed visual appearance), this component provides full
15
+ * access to all library features:
16
+ *
17
+ * - Complete layout system: AdaptiveBox with all sizing modes, label positioning, alignment
18
+ * - Full parameter model: DiscreteParameter with options, labels, value mapping
19
+ * - Complete interaction system: Click and keyboard interactions for cycling/stepping
20
+ * - Full accessibility: ARIA attributes, focus management, keyboard navigation
21
+ *
22
+ * The frame displayed is determined by mapping the current value to a frame index.
23
+ *
24
+ * Supports three modes of operation:
25
+ * 1. Ad-Hoc Mode (Children only): Model inferred from OptionView children.
26
+ * 2. Strict Mode (Parameter only): Model provided via parameter prop. View via renderOption.
27
+ * 3. Hybrid Mode (Parameter + Children): Model from parameter, View from children (matched by value).
28
+ *
29
+ * Note: This component does NOT support themable props (color, roundness, thickness) as
30
+ * visuals are entirely determined by the image content.
31
+ *
32
+ * @param props - Component props
33
+ * @returns Rendered FilmStripDiscreteControl component
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * <FilmStripDiscreteControl
38
+ * value="sine"
39
+ * onChange={(e) => setValue(e.value)}
40
+ * frameWidth={100}
41
+ * frameHeight={100}
42
+ * frameCount={4}
43
+ * imageHref="/waveform-frames.png"
44
+ * >
45
+ * <Option value="sine">Sine</Option>
46
+ * <Option value="square">Square</Option>
47
+ * <Option value="triangle">Triangle</Option>
48
+ * <Option value="sawtooth">Sawtooth</Option>
49
+ * </FilmStripDiscreteControl>
50
+ * ```
51
+ */
52
+ declare function FilmStripDiscreteControl({ value, defaultValue, onChange, label, adaptiveSize, size, displayMode, labelMode, labelPosition, labelAlign, frameWidth, frameHeight, frameCount, imageHref, orientation, frameRotation, parameter, paramId, options, midiResolution, midiMapping, children, onClick, onMouseDown, onMouseUp, onMouseEnter, onMouseLeave, className, style, }: FilmStripDiscreteControlProps): import("react/jsx-runtime").JSX.Element;
53
+ declare const _default: React.MemoExoticComponent<typeof FilmStripDiscreteControl>;
54
+ export default _default;
55
+ //# sourceMappingURL=FilmStripDiscreteControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilmStripDiscreteControl.d.ts","sourceRoot":"","sources":["../../../../src/components/generic/controls/FilmStripDiscreteControl.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,GAC5D,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,CAAC;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,iBAAS,wBAAwB,CAAC,EAC9B,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,YAAoB,EACpB,IAAe,EACf,WAAW,EACX,SAAS,EACT,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,WAAwB,EACxB,aAAiB,EACjB,SAAS,EACT,OAAO,EACP,OAAO,EACP,cAAc,EACd,WAAW,EACX,QAAQ,EACR,OAAO,EACP,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,KAAK,GACR,EAAE,6BAA6B,2CAwC/B;;AAED,wBAAoD"}
@@ -0,0 +1,36 @@
1
+ import { default as React } from 'react';
2
+ import { ControlComponent } from '../../types';
3
+
4
+ /**
5
+ * Props specific to filmstrip visualization
6
+ */
7
+ export type FilmstripViewProps = {
8
+ /** Normalized value between 0 and 1 */
9
+ normalizedValue: number;
10
+ /** Width of a SINGLE frame */
11
+ frameWidth: number;
12
+ /** Height of a SINGLE frame */
13
+ frameHeight: number;
14
+ /** Total number of frames in the strip */
15
+ frameCount: number;
16
+ /** URL to the sprite sheet/filmstrip image */
17
+ imageHref: string;
18
+ /** Orientation of the strip (default: "vertical") */
19
+ orientation?: "vertical" | "horizontal";
20
+ /** Optional frame rotation in degrees (default: 0) */
21
+ frameRotation?: number;
22
+ /**
23
+ * If true, inverts the normalized value (0.0 -> 1.0 and 1.0 -> 0.0).
24
+ * Useful for filmstrips where frame 0 represents "on" and frame 1 represents "off".
25
+ * @default false
26
+ */
27
+ invertValue?: boolean;
28
+ /** Additional CSS class name */
29
+ className?: string;
30
+ /** Content to render (unused in filmstrip but required by generic props) */
31
+ children?: React.ReactNode;
32
+ };
33
+ type FilmstripViewComponentProps = Omit<FilmstripViewProps, "normalizedValue" | "className" | "style" | "children">;
34
+ declare const _default: ControlComponent<FilmstripViewComponentProps>;
35
+ export default _default;
36
+ //# sourceMappingURL=FilmstripView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilmstripView.d.ts","sourceRoot":"","sources":["../../../../src/components/generic/controls/FilmstripView.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG3C;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,uCAAuC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,CAAC;AAkEF,KAAK,2BAA2B,GAAG,IAAI,CAAC,kBAAkB,EAAE,iBAAiB,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;wBAErE,gBAAgB,CAAC,2BAA2B,CAAC;AAA5F,wBAA6F"}
@@ -0,0 +1,74 @@
1
+ import { default as React } from 'react';
2
+ import { AdaptiveBoxProps, AdaptiveSizeProps, ContinuousControlProps, ValueLabelMode } from '../../types';
3
+
4
+ /**
5
+ * Props specific to rotary image controls
6
+ */
7
+ export type RotaryImageProps = {
8
+ /** Width of the viewBox (determines viewBox width) */
9
+ frameWidth: number;
10
+ /** Height of the viewBox (determines viewBox height) */
11
+ frameHeight: number;
12
+ /** URL to the image to rotate */
13
+ imageHref: string;
14
+ /** Optional rotation angle offset in degrees (default: 0) */
15
+ rotation?: number;
16
+ /** Openness of the arc in degrees (value between 0-360º; 0º: closed; 90º: 3/4 open; 180º: half-circle;)
17
+ * @default 90
18
+ */
19
+ openness?: number;
20
+ };
21
+ /**
22
+ * Props for the ImageKnob component
23
+ */
24
+ export type ImageKnobProps = ContinuousControlProps & AdaptiveSizeProps & AdaptiveBoxProps & RotaryImageProps & {
25
+ /**
26
+ * Controls how the label and value are displayed.
27
+ * - "labelOnly": Always shows the label (default)
28
+ * - "valueOnly": Always shows the value
29
+ * - "interactive": Shows label normally, but temporarily swaps to value during interaction
30
+ * @default "labelOnly"
31
+ */
32
+ valueAsLabel?: ValueLabelMode;
33
+ };
34
+ /**
35
+ * A continuous control that rotates an image based on a normalized value.
36
+ *
37
+ * This component provides full access to all library features:
38
+ *
39
+ * - Complete layout system: AdaptiveBox with all sizing modes, label positioning, alignment
40
+ * - Full parameter model: AudioParameter with min/max ranges, scaling functions, units, formatting
41
+ * - Complete interaction system: Drag, wheel, and keyboard with configurable sensitivity and modes
42
+ * - Full accessibility: ARIA attributes, focus management, keyboard navigation
43
+ *
44
+ * The image rotation is determined by the normalized value (0-1 maps to rotation based on openness and rotation offset).
45
+ *
46
+ * Supports two modes of operation:
47
+ * 1. Parameter model mode: Provide `parameter` (ContinuousParameter) - all range/label info comes from the model
48
+ * 2. Ad-hoc mode: Provide `min`, `max`, `step`, `label` directly as props
49
+ *
50
+ * Note: This component does NOT support themable props (color, roundness, thickness) as
51
+ * visuals are entirely determined by the image content.
52
+ *
53
+ * @param props - Component props
54
+ * @returns Rendered ImageKnob component
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * <ImageKnob
59
+ * value={50}
60
+ * min={0}
61
+ * max={100}
62
+ * label="Volume"
63
+ * frameWidth={100}
64
+ * frameHeight={100}
65
+ * imageHref="/knob-image.png"
66
+ * openness={90}
67
+ * rotation={0}
68
+ * />
69
+ * ```
70
+ */
71
+ declare function ImageKnob({ min, max, step, bipolar, value, onChange, valueFormatter, label, adaptiveSize, size, displayMode, labelMode, labelPosition, labelAlign, frameWidth, frameHeight, imageHref, rotation, openness, parameter, unit, scale, paramId, interactionMode, interactionDirection, interactionSensitivity, valueAsLabel, midiResolution, defaultValue, onClick, onMouseDown, onMouseUp, onMouseEnter, onMouseLeave, className, style, }: ImageKnobProps): import("react/jsx-runtime").JSX.Element;
72
+ declare const _default: React.MemoExoticComponent<typeof ImageKnob>;
73
+ export default _default;
74
+ //# sourceMappingURL=ImageKnob.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageKnob.d.ts","sourceRoot":"","sources":["../../../../src/components/generic/controls/ImageKnob.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGtG;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B,sDAAsD;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,sBAAsB,GAC/C,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAAG;IACf;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,iBAAS,SAAS,CAAC,EACf,GAAG,EACH,GAAG,EACH,IAAI,EACJ,OAAe,EACf,KAAK,EACL,QAAQ,EACR,cAAc,EACd,KAAK,EACL,YAAoB,EACpB,IAAe,EACf,WAAW,EACX,SAAS,EACT,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAY,EACZ,QAAa,EACb,SAAS,EACT,IAAI,EACJ,KAAK,EACL,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,YAA0B,EAC1B,cAAc,EACd,YAAY,EACZ,OAAO,EACP,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,KAAK,GACR,EAAE,cAAc,2CA+ChB;;AAED,wBAAqC"}
@@ -0,0 +1,38 @@
1
+ import { default as React } from 'react';
2
+ import { ControlComponent } from '../../types';
3
+
4
+ /**
5
+ * Props specific to rotary image visualization
6
+ */
7
+ export type ImageKnobViewProps = {
8
+ /** Normalized value between 0 and 1 */
9
+ normalizedValue: number;
10
+ /** Width of the viewBox (determines viewBox width) */
11
+ frameWidth: number;
12
+ /** Height of the viewBox (determines viewBox height) */
13
+ frameHeight: number;
14
+ /** URL to the image to rotate */
15
+ imageHref: string;
16
+ /** Optional rotation angle offset in degrees (default: 0) */
17
+ rotation?: number;
18
+ /** Openness of the arc in degrees (value between 0-360º; 0º: closed; 90º: 3/4 open; 180º: half-circle;)
19
+ * @default 90
20
+ */
21
+ openness?: number;
22
+ /** Whether to start the arc from center (bipolar mode)
23
+ * @default false
24
+ */
25
+ bipolar?: boolean;
26
+ /** Optional number of discrete positions. When defined, the value will snap to the nearest position.
27
+ * Used by discrete controls to snap to option positions.
28
+ */
29
+ positions?: number;
30
+ /** Additional CSS class name */
31
+ className?: string;
32
+ /** Content to render (unused in rotary image but required by generic props) */
33
+ children?: React.ReactNode;
34
+ };
35
+ type ImageKnobViewComponentProps = Omit<ImageKnobViewProps, "normalizedValue" | "className" | "style" | "children">;
36
+ declare const _default: ControlComponent<ImageKnobViewComponentProps>;
37
+ export default _default;
38
+ //# sourceMappingURL=ImageKnobView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageKnobView.d.ts","sourceRoot":"","sources":["../../../../src/components/generic/controls/ImageKnobView.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG3C;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,uCAAuC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,CAAC;AAuEF,KAAK,2BAA2B,GAAG,IAAI,CAAC,kBAAkB,EAAE,iBAAiB,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;wBAErE,gBAAgB,CAAC,2BAA2B,CAAC;AAA5F,wBAA6F"}
@@ -0,0 +1,54 @@
1
+ import { default as React } from 'react';
2
+ import { AdaptiveBoxProps, AdaptiveSizeProps, DiscreteControlProps } from '../../types';
3
+ import { RotaryImageProps } from './ImageKnob';
4
+
5
+ /**
6
+ * Props for the ImageRotarySwitch component
7
+ */
8
+ export type ImageRotarySwitchProps = DiscreteControlProps & AdaptiveSizeProps & AdaptiveBoxProps & RotaryImageProps;
9
+ /**
10
+ * A discrete control that rotates an image based on discrete option values.
11
+ *
12
+ * This component provides full access to all library features:
13
+ *
14
+ * - Complete layout system: AdaptiveBox with all sizing modes, label positioning, alignment
15
+ * - Full parameter model: DiscreteParameter with options, labels, value mapping
16
+ * - Complete interaction system: Click and keyboard interactions for cycling/stepping
17
+ * - Full accessibility: ARIA attributes, focus management, keyboard navigation
18
+ *
19
+ * The image rotation is determined by mapping the current value to a normalized position,
20
+ * with snapping to discrete positions based on the number of options.
21
+ *
22
+ * Supports three modes of operation:
23
+ * 1. Ad-Hoc Mode (Children only): Model inferred from OptionView children.
24
+ * 2. Strict Mode (Parameter only): Model provided via parameter prop. View via renderOption.
25
+ * 3. Hybrid Mode (Parameter + Children): Model from parameter, View from children (matched by value).
26
+ *
27
+ * Note: This component does NOT support themable props (color, roundness, thickness) as
28
+ * visuals are entirely determined by the image content.
29
+ *
30
+ * @param props - Component props
31
+ * @returns Rendered ImageRotarySwitch component
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * <ImageRotarySwitch
36
+ * value="sine"
37
+ * onChange={(e) => setValue(e.value)}
38
+ * frameWidth={100}
39
+ * frameHeight={100}
40
+ * imageHref="/waveform-knob.png"
41
+ * openness={90}
42
+ * rotation={0}
43
+ * >
44
+ * <Option value="sine">Sine</Option>
45
+ * <Option value="square">Square</Option>
46
+ * <Option value="triangle">Triangle</Option>
47
+ * <Option value="sawtooth">Sawtooth</Option>
48
+ * </ImageRotarySwitch>
49
+ * ```
50
+ */
51
+ declare function ImageRotarySwitch({ value, defaultValue, onChange, label, adaptiveSize, size, displayMode, labelMode, labelPosition, labelAlign, frameWidth, frameHeight, imageHref, rotation, openness, parameter, paramId, options, midiResolution, midiMapping, children, onClick, onMouseDown, onMouseUp, onMouseEnter, onMouseLeave, className, style, }: ImageRotarySwitchProps): import("react/jsx-runtime").JSX.Element;
52
+ declare const _default: React.MemoExoticComponent<typeof ImageRotarySwitch>;
53
+ export default _default;
54
+ //# sourceMappingURL=ImageRotarySwitch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageRotarySwitch.d.ts","sourceRoot":"","sources":["../../../../src/components/generic/controls/ImageRotarySwitch.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAEpH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,iBAAS,iBAAiB,CAAC,EACvB,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,YAAoB,EACpB,IAAe,EACf,WAAW,EACX,SAAS,EACT,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAY,EACZ,QAAa,EACb,SAAS,EACT,OAAO,EACP,OAAO,EACP,cAAc,EACd,WAAW,EACX,QAAQ,EACR,OAAO,EACP,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,KAAK,GACR,EAAE,sBAAsB,2CAuDxB;;AAED,wBAA6C"}