zds-pickers 4.0.12 → 4.0.14

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 (96) hide show
  1. package/dist/index.cjs.js +160 -1
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.es.js +12481 -35
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/midi/ccValues.js +2 -2
  7. package/dist/midi/export.js +43 -1
  8. package/dist/other/DefaultTooltip.js +1 -1
  9. package/dist/other/OctavePlayer.js +4 -4
  10. package/dist/other/SoundFontProvider.js +1 -1
  11. package/dist/other/{SVGText.js → SvgText.js} +2 -3
  12. package/dist/pickers/CCPicker.js +4 -4
  13. package/dist/pickers/ChannelMappingPicker.js +2 -2
  14. package/dist/pickers/ChannelPicker.js +2 -2
  15. package/dist/pickers/Knob.js +3 -3
  16. package/dist/pickers/KnobPicker.js +3 -3
  17. package/dist/pickers/LatchPicker.js +2 -2
  18. package/dist/pickers/MappingPicker.js +2 -2
  19. package/dist/pickers/NotePicker.js +2 -2
  20. package/dist/pickers/PianoPicker.js +4 -4
  21. package/dist/pickers/PolarityPicker.js +2 -2
  22. package/dist/pickers/ResponseCurve.js +14 -56
  23. package/dist/pickers/ResponseCurvePicker.js +6 -5
  24. package/dist/pickers/Select.js +1 -1
  25. package/dist/pickers/StatusPicker.js +2 -2
  26. package/dist/pickers/ValuePicker.js +2 -2
  27. package/dist/pickers/knobSkin10.js +1 -1
  28. package/dist/rotaryKnob/InternalInput.js +1 -1
  29. package/dist/rotaryKnob/helpers/DrawCircle.js +1 -1
  30. package/dist/rotaryKnob/helpers/DrawLine.js +1 -1
  31. package/dist/rotaryKnob/helpers/HelpersOverlay.js +1 -1
  32. package/dist/rotaryKnob/helpers/KnobVisualHelpers.js +6 -6
  33. package/dist/rotaryKnob/index.js +6 -6
  34. package/dist/rotaryKnob/utils.js +4 -8
  35. package/dist/types/index.d.ts +2 -2
  36. package/dist/types/midi/ccValues.d.ts +2 -2
  37. package/dist/types/midi/export.d.ts +12 -1
  38. package/dist/types/other/DefaultTooltip.d.ts +1 -1
  39. package/dist/types/other/OctavePlayer.d.ts +1 -1
  40. package/dist/types/other/SoundFontProvider.d.ts +1 -1
  41. package/dist/types/other/{SVGText.d.ts → SvgText.d.ts} +2 -3
  42. package/dist/types/pickers/CCPicker.d.ts +1 -1
  43. package/dist/types/pickers/ChannelMappingPicker.d.ts +1 -1
  44. package/dist/types/pickers/ChannelPicker.d.ts +1 -1
  45. package/dist/types/pickers/Knob.d.ts +1 -1
  46. package/dist/types/pickers/KnobPicker.d.ts +1 -1
  47. package/dist/types/pickers/LatchPicker.d.ts +1 -1
  48. package/dist/types/pickers/MappingPicker.d.ts +1 -1
  49. package/dist/types/pickers/NotePicker.d.ts +1 -1
  50. package/dist/types/pickers/PianoPicker.d.ts +1 -1
  51. package/dist/types/pickers/PolarityPicker.d.ts +1 -1
  52. package/dist/types/pickers/ResponseCurve.d.ts +4 -15
  53. package/dist/types/pickers/ResponseCurvePicker.d.ts +2 -2
  54. package/dist/types/pickers/Select.d.ts +1 -1
  55. package/dist/types/pickers/StatusPicker.d.ts +1 -1
  56. package/dist/types/pickers/ValuePicker.d.ts +1 -1
  57. package/dist/types/pickers/knobSkin10.d.ts +1 -1
  58. package/dist/types/rotaryKnob/InternalInput.d.ts +1 -1
  59. package/dist/types/rotaryKnob/helpers/DrawCircle.d.ts +1 -1
  60. package/dist/types/rotaryKnob/helpers/DrawLine.d.ts +1 -1
  61. package/dist/types/rotaryKnob/helpers/HelpersOverlay.d.ts +1 -1
  62. package/dist/types/rotaryKnob/index.d.ts +1 -1
  63. package/dist/types/rotaryKnob/utils.d.ts +1 -7
  64. package/lib/index.ts +2 -2
  65. package/lib/midi/ccValues.ts +2 -2
  66. package/lib/midi/export.ts +58 -2
  67. package/lib/other/DefaultTooltip.ts +1 -1
  68. package/lib/other/OctavePlayer.tsx +4 -4
  69. package/lib/other/SoundFontProvider.tsx +1 -1
  70. package/lib/other/{SVGText.tsx → SvgText.tsx} +2 -4
  71. package/lib/pickers/CCPicker.tsx +4 -4
  72. package/lib/pickers/ChannelMappingPicker.tsx +2 -2
  73. package/lib/pickers/ChannelPicker.tsx +2 -2
  74. package/lib/pickers/Knob.tsx +3 -3
  75. package/lib/pickers/KnobPicker.tsx +3 -3
  76. package/lib/pickers/LatchPicker.tsx +2 -2
  77. package/lib/pickers/MappingPicker.tsx +2 -2
  78. package/lib/pickers/NotePicker.tsx +2 -2
  79. package/lib/pickers/PianoPicker.tsx +4 -4
  80. package/lib/pickers/PolarityPicker.tsx +2 -2
  81. package/lib/pickers/ResponseCurve.tsx +22 -75
  82. package/lib/pickers/ResponseCurvePicker.tsx +6 -5
  83. package/lib/pickers/Select.tsx +1 -1
  84. package/lib/pickers/StatusPicker.tsx +2 -2
  85. package/lib/pickers/ValuePicker.tsx +2 -2
  86. package/lib/pickers/knobSkin10.tsx +1 -1
  87. package/lib/rotaryKnob/InternalInput.tsx +1 -1
  88. package/lib/rotaryKnob/helpers/DrawCircle.tsx +1 -1
  89. package/lib/rotaryKnob/helpers/DrawLine.tsx +1 -1
  90. package/lib/rotaryKnob/helpers/HelpersOverlay.tsx +1 -1
  91. package/lib/rotaryKnob/helpers/KnobVisualHelpers.tsx +6 -7
  92. package/lib/rotaryKnob/index.tsx +6 -6
  93. package/lib/rotaryKnob/utils.ts +1 -1
  94. package/package.json +1 -1
  95. package/stories/assets/utils.js +1 -1
  96. package/stories/picker.stories.tsx +15 -15
@@ -2,7 +2,7 @@ export * from './midi/ccValues';
2
2
  export * from './midi/export';
3
3
  export * from './other/DefaultTooltip';
4
4
  export * from './other/OctavePlayer';
5
- export * from './other/SVGText';
5
+ export * from './other/SvgText';
6
6
  export * from './pickers/ChannelMappingPicker';
7
7
  export * from './pickers/ChannelPicker';
8
8
  export * from './pickers/Knob';
@@ -21,7 +21,7 @@ export type * from './midi/export';
21
21
  export type * from './other/DefaultTooltip';
22
22
  export type * from './other/OctavePlayer';
23
23
  export type * from './other/SoundFontProvider';
24
- export type * from './other/SVGText';
24
+ export type * from './other/SvgText';
25
25
  export type * from './pickers/CCPicker';
26
26
  export type * from './pickers/ChannelMappingPicker';
27
27
  export type * from './pickers/ChannelPicker';
@@ -1,3 +1,3 @@
1
1
  import type { Option } from '../pickers/Select';
2
- declare const CC_NAMES: Option<number>[];
3
- export default CC_NAMES;
2
+ declare const changeControllerOptions: Option<number>[];
3
+ export { changeControllerOptions };
@@ -18,4 +18,15 @@ declare const extractStatusAndChannel: (status: number) => {
18
18
  status: Status;
19
19
  channel: number;
20
20
  };
21
- export { combineStatusWithChannel, extractStatusAndChannel, getStatusLabel, MASK_CHANNEL, MASK_STATUS, statusOptions, Statuses, type Status, };
21
+ declare const RESPONSE_CURVE_0 = 0;
22
+ declare const RESPONSE_CURVE_1 = 1;
23
+ declare const RESPONSE_CURVE_2 = 2;
24
+ declare const RESPONSE_CURVE_3 = 3;
25
+ declare const RESPONSE_CURVE_4 = 4;
26
+ declare const RESPONSE_CURVE_5 = 5;
27
+ declare const RESPONSE_CURVE_6 = 6;
28
+ declare const RESPONSE_CURVE_7 = 7;
29
+ type Curve = typeof RESPONSE_CURVE_0 | typeof RESPONSE_CURVE_1 | typeof RESPONSE_CURVE_2 | typeof RESPONSE_CURVE_3 | typeof RESPONSE_CURVE_4 | typeof RESPONSE_CURVE_5 | typeof RESPONSE_CURVE_6 | typeof RESPONSE_CURVE_7;
30
+ declare const responseCurves: Option<Curve>[];
31
+ export { combineStatusWithChannel, extractStatusAndChannel, getStatusLabel, MASK_CHANNEL, MASK_STATUS, responseCurves, Statuses, statusOptions, };
32
+ export type { Curve, Status };
@@ -6,5 +6,5 @@ type TooltipProps = {
6
6
  declare const DefaultTooltip: ({ children }: React.PropsWithoutRef<TooltipProps>) => import("react").FunctionComponentElement<{
7
7
  children?: import("react").ReactNode | undefined;
8
8
  }>;
9
- export default DefaultTooltip;
9
+ export { DefaultTooltip };
10
10
  export type { TooltipProps };
@@ -22,5 +22,5 @@ type WithProviderProps = {
22
22
  width: number;
23
23
  };
24
24
  declare const WithProvider: ({ format, height, hostname, instrumentName, octave, onChange, onClick, onDoubleClick, onKeyMouseEnter, onKeyMouseLeave, soundfont, Tooltip, width, }: WithProviderProps) => import("react/jsx-runtime").JSX.Element;
25
- export default WithProvider;
25
+ export { WithProvider as OctavePlayer };
26
26
  export type { OctavePlayerProps, WithProviderProps };
@@ -14,5 +14,5 @@ type SoundfontProviderProps = {
14
14
  soundfont?: 'MusyngKite' | 'FluidR3_GM';
15
15
  };
16
16
  declare const SoundfontProvider: (props: SoundfontProviderProps) => import("react").ReactNode;
17
- export default SoundfontProvider;
17
+ export { SoundfontProvider };
18
18
  export type { SoundfontProviderProps };
@@ -22,7 +22,6 @@ type TextProps = Partial<HTMLOrSVGElement> & {
22
22
  x?: number;
23
23
  y?: number;
24
24
  };
25
- declare const Text: (props: TextProps) => import("react/jsx-runtime").JSX.Element;
26
- export default Text;
27
- export { MEASUREMENT_ELEMENT_ID };
25
+ declare const SvgText: (props: TextProps) => import("react/jsx-runtime").JSX.Element;
26
+ export { SvgText, MEASUREMENT_ELEMENT_ID };
28
27
  export type { TextProps, WordWidths, WordsByLine };
@@ -3,5 +3,5 @@ import type { Option, SelectProps } from './Select';
3
3
  type CCPickerProps = SelectProps<number>;
4
4
  type CCPickerRef = SelectInstance<Option<number>, false, GroupBase<Option<number>>>;
5
5
  declare const CCPicker: import("react").ForwardRefExoticComponent<CCPickerProps & import("react").RefAttributes<SelectInstance<Option<number>, false, GroupBase<Option<number>>>>>;
6
- export default CCPicker;
6
+ export { CCPicker };
7
7
  export type { CCPickerProps, CCPickerRef };
@@ -11,5 +11,5 @@ interface ChannelMappingPickerProps extends SelectProps<InternalValue> {
11
11
  }
12
12
  type ChannelMappingPickerRef = SelectInstance<Option<number>, false, GroupBase<Option<number>>>;
13
13
  declare const ChannelMappingPicker: import("react").ForwardRefExoticComponent<ChannelMappingPickerProps & import("react").RefAttributes<SelectInstance<Option<InternalValue>, false, GroupBase<Option<InternalValue>>>>>;
14
- export default ChannelMappingPicker;
14
+ export { ChannelMappingPicker };
15
15
  export type { ChannelMappingOption, ChannelMappingPickerProps, ChannelMappingPickerRef, };
@@ -4,5 +4,5 @@ type Channel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
4
4
  type ChannelPickerProps = SelectProps<Channel>;
5
5
  type ChannelPickerRef = SelectInstance<Option<Channel>, false, GroupBase<Option<Channel>>>;
6
6
  declare const ChannelPicker: import("react").ForwardRefExoticComponent<ChannelPickerProps & import("react").RefAttributes<SelectInstance<Option<Channel>, false, GroupBase<Option<Channel>>>>>;
7
- export default ChannelPicker;
7
+ export { ChannelPicker };
8
8
  export type { Channel, ChannelPickerProps, ChannelPickerRef };
@@ -8,5 +8,5 @@ type KnobProps = {
8
8
  wheelSensitivity?: number;
9
9
  };
10
10
  declare const Knob: (props: KnobProps) => import("react/jsx-runtime").JSX.Element;
11
- export default Knob;
11
+ export { Knob };
12
12
  export type { KnobProps };
@@ -23,5 +23,5 @@ declare const KnobPicker: import("react").ForwardRefExoticComponent<SelectProps<
23
23
  wheelSensitivity?: number;
24
24
  value: number;
25
25
  } & import("react").RefAttributes<SelectInstance<Option<number>, false, GroupBase<Option<number>>>>>;
26
- export default KnobPicker;
26
+ export { KnobPicker };
27
27
  export type { KnobPickerProps, KnobPickerRef };
@@ -4,5 +4,5 @@ import type { Option, SelectProps } from './Select';
4
4
  type LatchPickerProps = SelectProps<Polarity>;
5
5
  type LatchPickerRef = SelectInstance<Option<Polarity>, false, GroupBase<Option<Polarity>>>;
6
6
  declare const LatchPicker: import("react").ForwardRefExoticComponent<LatchPickerProps & import("react").RefAttributes<SelectInstance<Option<Polarity>, false, GroupBase<Option<Polarity>>>>>;
7
- export default LatchPicker;
7
+ export { LatchPicker };
8
8
  export type { LatchPickerProps, LatchPickerRef };
@@ -7,5 +7,5 @@ type MappingPickerRef = SelectInstance<Option<string>, false, GroupBase<Option<s
7
7
  declare const MappingPicker: import("react").ForwardRefExoticComponent<SelectProps<string> & {
8
8
  allowClearing: boolean;
9
9
  } & import("react").RefAttributes<SelectInstance<Option<string>, false, GroupBase<Option<string>>>>>;
10
- export default MappingPicker;
10
+ export { MappingPicker };
11
11
  export type { MappingPickerProps, MappingPickerRef };
@@ -16,5 +16,5 @@ declare const NotePicker: import("react").ForwardRefExoticComponent<SelectProps<
16
16
  mapping?: Mapping;
17
17
  onChange: (value: number) => void;
18
18
  } & import("react").RefAttributes<SelectInstance<Option<number>, false, GroupBase<Option<number>>>>>;
19
- export default NotePicker;
19
+ export { NotePicker };
20
20
  export type { NotePickerProps, NotePickerRef };
@@ -5,5 +5,5 @@ type PianoProps = {
5
5
  width: number;
6
6
  };
7
7
  declare const WithProvider: ({ format, height, hostname, instrumentName, onChange, onClick, onDoubleClick, onKeyMouseEnter, onKeyMouseLeave, soundfont, width, }: WithProviderProps) => import("react/jsx-runtime").JSX.Element;
8
- export default WithProvider;
8
+ export { WithProvider as PianoPicker };
9
9
  export type { PianoProps };
@@ -10,5 +10,5 @@ declare const PolarityPicker: import("react").ForwardRefExoticComponent<SelectPr
10
10
  labelOff?: string;
11
11
  labelOn?: string;
12
12
  } & import("react").RefAttributes<SelectInstance<Option<Polarity>, false, GroupBase<Option<Polarity>>>>>;
13
- export default PolarityPicker;
13
+ export { PolarityPicker };
14
14
  export type { Polarity, PolarityPickerProps, PolarityPickerRef };
@@ -1,15 +1,6 @@
1
+ import { type Curve } from '../midi/export';
1
2
  import { type TooltipProps } from '../other/DefaultTooltip';
2
- import type { Option } from './Select';
3
- declare const RESPONSE_CURVE_0 = 0;
4
- declare const RESPONSE_CURVE_1 = 1;
5
- declare const RESPONSE_CURVE_2 = 2;
6
- declare const RESPONSE_CURVE_3 = 3;
7
- declare const RESPONSE_CURVE_4 = 4;
8
- declare const RESPONSE_CURVE_5 = 5;
9
- declare const RESPONSE_CURVE_6 = 6;
10
- declare const RESPONSE_CURVE_7 = 7;
11
- type Curve = typeof RESPONSE_CURVE_0 | typeof RESPONSE_CURVE_1 | typeof RESPONSE_CURVE_2 | typeof RESPONSE_CURVE_3 | typeof RESPONSE_CURVE_4 | typeof RESPONSE_CURVE_5 | typeof RESPONSE_CURVE_6 | typeof RESPONSE_CURVE_7;
12
- type ResponseCurve = {
3
+ type ResponseCurveType = {
13
4
  value: Curve;
14
5
  label: React.ReactNode;
15
6
  c1: number;
@@ -21,7 +12,6 @@ type ResponseCurve = {
21
12
  labelX: number;
22
13
  labelY: number;
23
14
  };
24
- declare const RESPONSE_CURVES: Option<Curve>[];
25
15
  type ResponseCurveProps = {
26
16
  autosize: boolean;
27
17
  disabled?: boolean;
@@ -35,6 +25,5 @@ type ResponseCurveProps = {
35
25
  value: Curve;
36
26
  };
37
27
  declare const ResponseCurve: (props: ResponseCurveProps) => import("react/jsx-runtime").JSX.Element;
38
- export default ResponseCurve;
39
- export { RESPONSE_CURVES };
40
- export type { Curve, ResponseCurve, ResponseCurveProps };
28
+ export { ResponseCurve };
29
+ export type { ResponseCurveType, ResponseCurveProps };
@@ -1,6 +1,6 @@
1
1
  import type { GroupBase, SelectInstance } from 'react-select';
2
+ import { type Curve } from '../midi/export';
2
3
  import { type TooltipProps } from '../other/DefaultTooltip';
3
- import { type Curve } from './ResponseCurve';
4
4
  import type { Option, SelectProps } from './Select';
5
5
  type ResponseCurvePickerProps = SelectProps<Curve> & {
6
6
  inverted?: boolean;
@@ -11,5 +11,5 @@ declare const ResponseCurvePicker: import("react").ForwardRefExoticComponent<Sel
11
11
  inverted?: boolean;
12
12
  Tooltip?: React.FC<TooltipProps>;
13
13
  } & import("react").RefAttributes<SelectInstance<Option<Curve>, false, GroupBase<Option<Curve>>>>>;
14
- export default ResponseCurvePicker;
14
+ export { ResponseCurvePicker };
15
15
  export type { ResponseCurvePickerProps, ResponseCurvePickerRef };
@@ -25,5 +25,5 @@ type SelectProps<T> = {
25
25
  declare const Select: <T>(props: SelectProps<T> & {
26
26
  ref?: React.ForwardedRef<SelectInstance<Option<T>, false, GroupBase<Option<T>>>>;
27
27
  }) => JSX.Element;
28
- export default Select;
28
+ export { Select };
29
29
  export type { Option, SelectProps };
@@ -8,5 +8,5 @@ type StatusPickerRef = SelectInstance<Option<Status>, false, GroupBase<Option<St
8
8
  declare const StatusPicker: import("react").ForwardRefExoticComponent<SelectProps<Status> & {
9
9
  statuses: Option<Status>[];
10
10
  } & import("react").RefAttributes<SelectInstance<Option<Status>, false, GroupBase<Option<Status>>>>>;
11
- export default StatusPicker;
11
+ export { StatusPicker };
12
12
  export type { StatusPickerProps, StatusPickerRef };
@@ -11,5 +11,5 @@ declare const ValuePicker: import("react").ForwardRefExoticComponent<SelectProps
11
11
  max?: number;
12
12
  min?: number;
13
13
  } & import("react").RefAttributes<SelectInstance<Option<number>, false, GroupBase<Option<number>>>>>;
14
- export default ValuePicker;
14
+ export { ValuePicker };
15
15
  export type { ValuePickerProps, ValuePickerRef };
@@ -11,4 +11,4 @@ declare const knobSkin10: {
11
11
  }[];
12
12
  }[];
13
13
  };
14
- export default knobSkin10;
14
+ export { knobSkin10 };
@@ -15,4 +15,4 @@ declare class InternalInput extends React.Component<InternalInputProps> {
15
15
  };
16
16
  render(): import("react/jsx-runtime").JSX.Element;
17
17
  }
18
- export default InternalInput;
18
+ export { InternalInput };
@@ -15,4 +15,4 @@ type DrawCircleProps = React.SVGProps<SVGCircleElement> & {
15
15
  declare class DrawCircle extends React.Component<DrawCircleProps> {
16
16
  render(): import("react/jsx-runtime").JSX.Element;
17
17
  }
18
- export default DrawCircle;
18
+ export { DrawCircle };
@@ -12,4 +12,4 @@ type DrawLineProps = React.SVGProps<SVGLineElement> & {
12
12
  declare class DrawLine extends React.Component<DrawLineProps> {
13
13
  render(): import("react/jsx-runtime").JSX.Element;
14
14
  }
15
- export default DrawLine;
15
+ export { DrawLine };
@@ -8,4 +8,4 @@ type HelpersOverlayProps = React.PropsWithChildren & {
8
8
  declare class HelpersOverlay extends React.Component<HelpersOverlayProps> {
9
9
  render(): React.ReactPortal;
10
10
  }
11
- export default HelpersOverlay;
11
+ export { HelpersOverlay };
@@ -46,4 +46,4 @@ type KnobProps = Omit<React.ComponentProps<'div'>, 'onChange'> & {
46
46
  * Generic knob component
47
47
  */
48
48
  declare const RotaryKnob: (props: KnobProps) => import("react/jsx-runtime").JSX.Element;
49
- export default RotaryKnob;
49
+ export { RotaryKnob };
@@ -40,10 +40,4 @@ declare function transformBoundingClientRectToDocument(box: DOMRect): {
40
40
  width: number;
41
41
  height: number;
42
42
  };
43
- declare const _default: {
44
- toRadians: typeof toRadians;
45
- getQuadrant: typeof getQuadrant;
46
- getAngleForPoint: typeof getAngleForPoint;
47
- transformBoundingClientRectToDocument: typeof transformBoundingClientRectToDocument;
48
- };
49
- export default _default;
43
+ export { toRadians, getQuadrant, getAngleForPoint, transformBoundingClientRectToDocument, };
package/lib/index.ts CHANGED
@@ -3,7 +3,7 @@ export * from './midi/export'
3
3
 
4
4
  export * from './other/DefaultTooltip'
5
5
  export * from './other/OctavePlayer'
6
- export * from './other/SVGText'
6
+ export * from './other/SvgText'
7
7
 
8
8
  export * from './pickers/ChannelMappingPicker'
9
9
  export * from './pickers/ChannelPicker'
@@ -26,7 +26,7 @@ export type * from './midi/export'
26
26
  export type * from './other/DefaultTooltip'
27
27
  export type * from './other/OctavePlayer'
28
28
  export type * from './other/SoundFontProvider'
29
- export type * from './other/SVGText'
29
+ export type * from './other/SvgText'
30
30
 
31
31
  export type * from './pickers/CCPicker'
32
32
  export type * from './pickers/ChannelMappingPicker'
@@ -1,6 +1,6 @@
1
1
  import type { Option } from '../pickers/Select'
2
2
 
3
- const CC_NAMES = [
3
+ const changeControllerOptions = [
4
4
  'Bank Select',
5
5
  'Modulation Wheel',
6
6
  'Breath Controller',
@@ -136,4 +136,4 @@ const CC_NAMES = [
136
136
  }),
137
137
  )
138
138
 
139
- export default CC_NAMES
139
+ export { changeControllerOptions }
@@ -41,13 +41,69 @@ const extractStatusAndChannel = (
41
41
  channel: status & MASK_CHANNEL,
42
42
  })
43
43
 
44
+ const RESPONSE_CURVE_0 = 0
45
+ const RESPONSE_CURVE_1 = 1
46
+ const RESPONSE_CURVE_2 = 2
47
+ const RESPONSE_CURVE_3 = 3
48
+ const RESPONSE_CURVE_4 = 4
49
+ const RESPONSE_CURVE_5 = 5
50
+ const RESPONSE_CURVE_6 = 6
51
+ const RESPONSE_CURVE_7 = 7
52
+
53
+ type Curve =
54
+ | typeof RESPONSE_CURVE_0
55
+ | typeof RESPONSE_CURVE_1
56
+ | typeof RESPONSE_CURVE_2
57
+ | typeof RESPONSE_CURVE_3
58
+ | typeof RESPONSE_CURVE_4
59
+ | typeof RESPONSE_CURVE_5
60
+ | typeof RESPONSE_CURVE_6
61
+ | typeof RESPONSE_CURVE_7
62
+
63
+ const responseCurves: Option<Curve>[] = [
64
+ {
65
+ value: RESPONSE_CURVE_7,
66
+ label: 'Always maxed out.',
67
+ },
68
+ {
69
+ value: RESPONSE_CURVE_6,
70
+ label: 'Most sensitive.',
71
+ },
72
+ {
73
+ value: RESPONSE_CURVE_5,
74
+ label: 'Moderately sensitive.',
75
+ },
76
+ {
77
+ value: RESPONSE_CURVE_4,
78
+ label: 'A little sensitive.',
79
+ },
80
+ {
81
+ value: RESPONSE_CURVE_0,
82
+ label: 'Linear, no change.',
83
+ },
84
+ {
85
+ value: RESPONSE_CURVE_1,
86
+ label: 'A little less sensitive.',
87
+ },
88
+ {
89
+ value: RESPONSE_CURVE_2,
90
+ label: 'Even less sensitive.',
91
+ },
92
+ {
93
+ value: RESPONSE_CURVE_3,
94
+ label: 'Least sensitive.',
95
+ },
96
+ ]
97
+
44
98
  export {
45
99
  combineStatusWithChannel,
46
100
  extractStatusAndChannel,
47
101
  getStatusLabel,
48
102
  MASK_CHANNEL,
49
103
  MASK_STATUS,
50
- statusOptions,
104
+ responseCurves,
51
105
  Statuses,
52
- type Status,
106
+ statusOptions,
53
107
  }
108
+
109
+ export type { Curve, Status }
@@ -9,6 +9,6 @@ type TooltipProps = {
9
9
  const DefaultTooltip = ({ children }: React.PropsWithoutRef<TooltipProps>) =>
10
10
  createElement(Fragment, null, children)
11
11
 
12
- export default DefaultTooltip
12
+ export { DefaultTooltip }
13
13
 
14
14
  export type { TooltipProps }
@@ -2,7 +2,7 @@ import type Soundfont from 'soundfont-player'
2
2
  import { /* Midi, */ Note } from 'tonal'
3
3
  import { Piano as ReactPiano } from 'zds-react-piano'
4
4
  import type { TooltipProps } from './DefaultTooltip'
5
- import SoundfontProvider from './SoundFontProvider'
5
+ import { SoundfontProvider } from './SoundFontProvider'
6
6
 
7
7
  const baseNotes = [
8
8
  'C',
@@ -38,7 +38,7 @@ type OctavePlayerProps = {
38
38
  width: number
39
39
  }
40
40
 
41
- const OctavePlayer = ({
41
+ const BaseOctavePlayer = ({
42
42
  octave,
43
43
  height,
44
44
  width,
@@ -116,7 +116,7 @@ const WithProvider = ({
116
116
  <div>
117
117
  <h2>Octave: {octave}</h2>
118
118
  </div>
119
- <OctavePlayer
119
+ <BaseOctavePlayer
120
120
  disabled={isLoading}
121
121
  {...{
122
122
  height,
@@ -136,6 +136,6 @@ const WithProvider = ({
136
136
  />
137
137
  )
138
138
 
139
- export default WithProvider
139
+ export { WithProvider as OctavePlayer }
140
140
 
141
141
  export type { OctavePlayerProps, WithProviderProps }
@@ -127,6 +127,6 @@ const SoundfontProvider = (props: SoundfontProviderProps) => {
127
127
  // https://gleitz.github.io/midi-js-soundfonts/MusyngKite/acoustic_grand_piano-mp3.js
128
128
  // https://gleitz.github.io/midi-js-soundfonts/FluidR3_GM/.js
129
129
 
130
- export default SoundfontProvider
130
+ export { SoundfontProvider }
131
131
 
132
132
  export type { SoundfontProviderProps }
@@ -91,7 +91,7 @@ type TextProps = Partial<HTMLOrSVGElement> & {
91
91
  y?: number
92
92
  }
93
93
 
94
- const Text = (props: TextProps) => {
94
+ const SvgText = (props: TextProps) => {
95
95
  const {
96
96
  className = '',
97
97
  dx = 0,
@@ -216,8 +216,6 @@ const Text = (props: TextProps) => {
216
216
  )
217
217
  }
218
218
 
219
- export default Text
220
-
221
- export { MEASUREMENT_ELEMENT_ID }
219
+ export { SvgText, MEASUREMENT_ELEMENT_ID }
222
220
 
223
221
  export type { TextProps, WordWidths, WordsByLine }
@@ -1,7 +1,7 @@
1
1
  import { forwardRef } from 'react'
2
2
  import type { GroupBase, SelectInstance } from 'react-select'
3
- import ccValues from '../midi/ccValues'
4
- import Select from './Select'
3
+ import { changeControllerOptions } from '../midi/ccValues'
4
+ import { Select } from './Select'
5
5
  import type { Option, SelectProps } from './Select'
6
6
 
7
7
  type CCPickerProps = SelectProps<number>
@@ -18,11 +18,11 @@ const CCPicker = forwardRef<
18
18
  >((props, ref) => (
19
19
  <Select
20
20
  {...props}
21
- options={ccValues}
21
+ options={changeControllerOptions}
22
22
  ref={ref}
23
23
  />
24
24
  ))
25
25
 
26
- export default CCPicker
26
+ export { CCPicker }
27
27
 
28
28
  export type { CCPickerProps, CCPickerRef }
@@ -2,7 +2,7 @@ import cl from 'classnames'
2
2
  import { forwardRef, useCallback, useEffect, useState } from 'react'
3
3
  import type { GroupBase, SelectInstance } from 'react-select'
4
4
  import { arraySequence } from '../utils'
5
- import Select from './Select'
5
+ import { Select } from './Select'
6
6
  import type { Option, SelectProps } from './Select'
7
7
 
8
8
  type InternalValue = number | 'separator'
@@ -130,7 +130,7 @@ const ChannelMappingPicker = forwardRef<
130
130
  )
131
131
  })
132
132
 
133
- export default ChannelMappingPicker
133
+ export { ChannelMappingPicker }
134
134
 
135
135
  export type {
136
136
  ChannelMappingOption,
@@ -2,7 +2,7 @@ import cl from 'classnames'
2
2
  import { forwardRef } from 'react'
3
3
  import type { GroupBase, SelectInstance } from 'react-select'
4
4
  import { arraySequence } from '../utils'
5
- import Select from './Select'
5
+ import { Select } from './Select'
6
6
  import type { Option, SelectProps } from './Select'
7
7
 
8
8
  type Channel =
@@ -71,6 +71,6 @@ const ChannelPicker = forwardRef<
71
71
  )
72
72
  })
73
73
 
74
- export default ChannelPicker
74
+ export { ChannelPicker }
75
75
 
76
76
  export type { Channel, ChannelPickerProps, ChannelPickerRef }
@@ -1,8 +1,8 @@
1
1
  import { useCallback } from 'react'
2
2
  import useStateWithDynamicDefault from '../hooks/useStateWithDynamicDefault'
3
- import RotaryKnob from '../rotaryKnob'
3
+ import { RotaryKnob } from '../rotaryKnob'
4
4
  import { assertRange } from '../utils'
5
- import knobSkin10 from './knobSkin10'
5
+ import { knobSkin10 } from './knobSkin10'
6
6
 
7
7
  type KnobProps = {
8
8
  disabled?: boolean
@@ -88,6 +88,6 @@ const Knob = (props: KnobProps) => {
88
88
  )
89
89
  }
90
90
 
91
- export default Knob
91
+ export { Knob }
92
92
 
93
93
  export type { KnobProps }
@@ -1,8 +1,8 @@
1
1
  import { forwardRef, useMemo } from 'react'
2
2
  import type { GroupBase, SelectInstance } from 'react-select'
3
3
  import { arraySequence } from '../utils'
4
- import Knob from './Knob'
5
- import Select from './Select'
4
+ import { Knob } from './Knob'
5
+ import { Select } from './Select'
6
6
  import type { Option, SelectProps } from './Select'
7
7
 
8
8
  type KnobPickerProps = SelectProps<number> & {
@@ -88,6 +88,6 @@ const KnobPicker = forwardRef<
88
88
  )
89
89
  })
90
90
 
91
- export default KnobPicker
91
+ export { KnobPicker }
92
92
 
93
93
  export type { KnobPickerProps, KnobPickerRef }
@@ -1,7 +1,7 @@
1
1
  import { forwardRef } from 'react'
2
2
  import type { GroupBase, SelectInstance } from 'react-select'
3
3
  import type { Polarity } from './PolarityPicker'
4
- import Select from './Select'
4
+ import { Select } from './Select'
5
5
  import type { Option, SelectProps } from './Select'
6
6
 
7
7
  const options: Option<Polarity>[] = [
@@ -28,6 +28,6 @@ const LatchPicker = forwardRef<
28
28
  />
29
29
  ))
30
30
 
31
- export default LatchPicker
31
+ export { LatchPicker }
32
32
 
33
33
  export type { LatchPickerProps, LatchPickerRef }
@@ -1,7 +1,7 @@
1
1
  import { forwardRef, useMemo } from 'react'
2
2
  import type { GroupBase, SelectInstance } from 'react-select'
3
3
  import { getStockNames, getUserMappingNames } from 'zds-mappings'
4
- import Select from './Select'
4
+ import { Select } from './Select'
5
5
  import type { Option, SelectProps } from './Select'
6
6
 
7
7
  type MappingPickerProps = SelectProps<string> & {
@@ -63,6 +63,6 @@ const MappingPicker = forwardRef<
63
63
  )
64
64
  })
65
65
 
66
- export default MappingPicker
66
+ export { MappingPicker }
67
67
 
68
68
  export type { MappingPickerProps, MappingPickerRef }
@@ -4,7 +4,7 @@ import { Midi } from 'tonal'
4
4
  import { type MapItem, type Mapping, emptyMapping } from 'zds-mappings'
5
5
  import useStateWithDynamicDefault from '../hooks/useStateWithDynamicDefault'
6
6
  import { assertRange } from '../utils'
7
- import Select from './Select'
7
+ import { Select } from './Select'
8
8
  import type { Option, SelectProps } from './Select'
9
9
 
10
10
  const { midiToNoteName } = Midi
@@ -90,6 +90,6 @@ const NotePicker = forwardRef<
90
90
  )
91
91
  })
92
92
 
93
- export default NotePicker
93
+ export { NotePicker }
94
94
 
95
95
  export type { NotePickerProps, NotePickerRef }