zds-pickers 4.0.7 → 4.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +12 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +103 -102
- package/dist/index.es.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/other/OctavePlayer.d.ts +7 -1
- package/dist/types/other/SVGText.d.ts +11 -0
- package/dist/types/other/SoundFontProvider.d.ts +1 -0
- package/dist/types/pickers/ChannelMappingPicker.d.ts +2 -1
- package/lib/index.ts +2 -0
- package/lib/other/OctavePlayer.tsx +1 -1
- package/lib/other/SVGText.tsx +2 -0
- package/lib/other/SoundFontProvider.tsx +2 -0
- package/lib/pickers/ChannelMappingPicker.tsx +5 -1
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as ChannelMappingPicker } from './pickers/ChannelMappingPicker';
|
|
2
2
|
export { default as ChannelPicker } from './pickers/ChannelPicker';
|
|
3
|
+
export { default as DefaultTooltip } from './other/DefaultTooltip';
|
|
3
4
|
export { default as Knob } from './pickers/Knob';
|
|
4
5
|
export { default as KnobPicker } from './pickers/KnobPicker';
|
|
5
6
|
export { default as LatchPicker } from './pickers/LatchPicker';
|
|
@@ -15,6 +16,7 @@ export { default as SVGText } from './other/SVGText';
|
|
|
15
16
|
export { default as ValuePicker } from './pickers/ValuePicker';
|
|
16
17
|
export type * from './pickers/ChannelMappingPicker';
|
|
17
18
|
export type * from './pickers/ChannelPicker';
|
|
19
|
+
export type * from './other/DefaultTooltip';
|
|
18
20
|
export type * from './pickers/Knob';
|
|
19
21
|
export type * from './pickers/KnobPicker';
|
|
20
22
|
export type * from './pickers/LatchPicker';
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type Soundfont from 'soundfont-player';
|
|
2
2
|
import type { TooltipProps } from './DefaultTooltip';
|
|
3
|
+
type OctavePlayerProps = {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
height: number;
|
|
6
|
+
octave: number;
|
|
7
|
+
width: number;
|
|
8
|
+
};
|
|
3
9
|
type WithProviderProps = {
|
|
4
10
|
format?: 'mp3' | 'ogg';
|
|
5
11
|
height: number;
|
|
@@ -17,4 +23,4 @@ type WithProviderProps = {
|
|
|
17
23
|
};
|
|
18
24
|
declare const WithProvider: ({ format, height, hostname, instrumentName, octave, onChange, onClick, onDoubleClick, onKeyMouseEnter, onKeyMouseLeave, soundfont, Tooltip, width, }: WithProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
25
|
export default WithProvider;
|
|
20
|
-
export type { WithProviderProps };
|
|
26
|
+
export type { OctavePlayerProps, WithProviderProps };
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
declare const MEASUREMENT_ELEMENT_ID = "__react_svg_text_measurement_id";
|
|
2
|
+
type WordsByLine = {
|
|
3
|
+
words: string[];
|
|
4
|
+
width: number;
|
|
5
|
+
showLine: boolean;
|
|
6
|
+
};
|
|
7
|
+
type WordWidths = {
|
|
8
|
+
wordsWithComputedWidth: Record<string, number>;
|
|
9
|
+
spaceWidth: number;
|
|
10
|
+
lineHeight: number;
|
|
11
|
+
};
|
|
2
12
|
type TextProps = Partial<HTMLOrSVGElement> & {
|
|
3
13
|
className?: string;
|
|
4
14
|
dx?: number;
|
|
@@ -15,3 +25,4 @@ type TextProps = Partial<HTMLOrSVGElement> & {
|
|
|
15
25
|
declare const Text: (props: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
26
|
export default Text;
|
|
17
27
|
export { MEASUREMENT_ELEMENT_ID };
|
|
28
|
+
export type { TextProps, WordWidths, WordsByLine };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { GroupBase, SelectInstance } from 'react-select';
|
|
2
2
|
import type { Option, SelectProps } from './Select';
|
|
3
3
|
type InternalValue = number | 'separator';
|
|
4
|
+
type ChannelMappingOption = Option<InternalValue>;
|
|
4
5
|
interface ChannelMappingPickerProps extends SelectProps<InternalValue> {
|
|
5
6
|
channels: Option<number>[];
|
|
6
7
|
className?: string;
|
|
@@ -11,4 +12,4 @@ interface ChannelMappingPickerProps extends SelectProps<InternalValue> {
|
|
|
11
12
|
type ChannelMappingPickerRef = SelectInstance<Option<number>, false, GroupBase<Option<number>>>;
|
|
12
13
|
declare const ChannelMappingPicker: import("react").ForwardRefExoticComponent<ChannelMappingPickerProps & import("react").RefAttributes<SelectInstance<Option<InternalValue>, false, GroupBase<Option<InternalValue>>>>>;
|
|
13
14
|
export default ChannelMappingPicker;
|
|
14
|
-
export type { ChannelMappingPickerProps, ChannelMappingPickerRef };
|
|
15
|
+
export type { ChannelMappingOption, ChannelMappingPickerProps, ChannelMappingPickerRef, };
|
package/lib/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Components
|
|
2
2
|
export { default as ChannelMappingPicker } from './pickers/ChannelMappingPicker'
|
|
3
3
|
export { default as ChannelPicker } from './pickers/ChannelPicker'
|
|
4
|
+
export { default as DefaultTooltip } from './other/DefaultTooltip'
|
|
4
5
|
export { default as Knob } from './pickers/Knob'
|
|
5
6
|
export { default as KnobPicker } from './pickers/KnobPicker'
|
|
6
7
|
export { default as LatchPicker } from './pickers/LatchPicker'
|
|
@@ -18,6 +19,7 @@ export { default as ValuePicker } from './pickers/ValuePicker'
|
|
|
18
19
|
// Types
|
|
19
20
|
export type * from './pickers/ChannelMappingPicker'
|
|
20
21
|
export type * from './pickers/ChannelPicker'
|
|
22
|
+
export type * from './other/DefaultTooltip'
|
|
21
23
|
export type * from './pickers/Knob'
|
|
22
24
|
export type * from './pickers/KnobPicker'
|
|
23
25
|
export type * from './pickers/LatchPicker'
|
package/lib/other/SVGText.tsx
CHANGED
|
@@ -132,4 +132,8 @@ const ChannelMappingPicker = forwardRef<
|
|
|
132
132
|
|
|
133
133
|
export default ChannelMappingPicker
|
|
134
134
|
|
|
135
|
-
export type {
|
|
135
|
+
export type {
|
|
136
|
+
ChannelMappingOption,
|
|
137
|
+
ChannelMappingPickerProps,
|
|
138
|
+
ChannelMappingPickerRef,
|
|
139
|
+
}
|