zds-pickers 3.11.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +196 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.es.js +23698 -0
- package/dist/index.es.js.map +1 -0
- package/dist/main.d.ts +232 -0
- package/package.json +56 -65
- package/dist/hooks/useComponentSize.js +0 -54
- package/dist/hooks/useStateWithDynamicDefault.js +0 -11
- package/dist/index.js +0 -43
- package/dist/midi/ccValues.js +0 -137
- package/dist/midi/statuses.js +0 -33
- package/dist/other/DefaultTooltip.js +0 -8
- package/dist/other/OctavePlayer.js +0 -121
- package/dist/other/SVGText.js +0 -116
- package/dist/other/SoundFontProvider.js +0 -124
- package/dist/other/utils.js +0 -52
- package/dist/pickers/CCPicker.js +0 -19
- package/dist/pickers/ChannelMappingPicker.js +0 -79
- package/dist/pickers/ChannelPicker.js +0 -40
- package/dist/pickers/Knob.js +0 -86
- package/dist/pickers/KnobPicker.js +0 -101
- package/dist/pickers/LatchPicker.js +0 -23
- package/dist/pickers/MappingPicker.js +0 -61
- package/dist/pickers/NotePicker.js +0 -83
- package/dist/pickers/PianoPicker.js +0 -104
- package/dist/pickers/PolarityPicker.js +0 -32
- package/dist/pickers/ResponseCurve.js +0 -263
- package/dist/pickers/ResponseCurvePicker.js +0 -58
- package/dist/pickers/Select.js +0 -174
- package/dist/pickers/StatusPicker.js +0 -22
- package/dist/pickers/ValuePicker.js +0 -57
- package/dist/pickers/knobSkin10.js +0 -94
- package/dist/shapes.js +0 -11
- package/dist/stories/assets/General MIDI.js +0 -69
- package/dist/stories/assets/mapper.js +0 -82
- package/dist/stories/assets/utils.js +0 -6
- package/dist/temp/acoustic_grand_piano-mp3.js +0 -94
- package/dist/utils.js +0 -45
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";var _excluded = ["Tooltip", "inverted", "onChange", "value"];import PropTypes from 'prop-types';
|
|
2
|
-
import React, { forwardRef, useCallback } from 'react';
|
|
3
|
-
import DefaultTooltip from '../other/DefaultTooltip';
|
|
4
|
-
import { findObj } from '../utils';
|
|
5
|
-
import ResponseCurve, { RESPONSE_CURVES } from './ResponseCurve';
|
|
6
|
-
import Select from './Select';
|
|
7
|
-
|
|
8
|
-
var ResponseCurvePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
9
|
-
var Tooltip = props.Tooltip,inverted = props.inverted,_onChange = props.onChange,value = props.value,rest = _objectWithoutProperties(props, _excluded);
|
|
10
|
-
|
|
11
|
-
var Placeholder = useCallback(function () {var _findObj;return /*#__PURE__*/(
|
|
12
|
-
React.createElement("div", { className: "singleValue" }, (_findObj =
|
|
13
|
-
findObj('value', value)(RESPONSE_CURVES)) === null || _findObj === void 0 ? void 0 : _findObj.label
|
|
14
|
-
));},
|
|
15
|
-
[value]);
|
|
16
|
-
|
|
17
|
-
var MenuList = useCallback(function (_ref) {var setValue = _ref.setValue;return /*#__PURE__*/(
|
|
18
|
-
React.createElement(ResponseCurve, {
|
|
19
|
-
autosize: true,
|
|
20
|
-
inverted: inverted,
|
|
21
|
-
onChange: function onChange(_ref2) {var v = _ref2.target.value;
|
|
22
|
-
setValue(v);
|
|
23
|
-
_onChange(v);
|
|
24
|
-
},
|
|
25
|
-
Tooltip: Tooltip,
|
|
26
|
-
value: value }
|
|
27
|
-
|
|
28
|
-
));},
|
|
29
|
-
[Tooltip, inverted, _onChange, value]);
|
|
30
|
-
|
|
31
|
-
return /*#__PURE__*/(
|
|
32
|
-
React.createElement(Select, _extends({},
|
|
33
|
-
rest, {
|
|
34
|
-
components: {
|
|
35
|
-
Placeholder: Placeholder,
|
|
36
|
-
MenuList: MenuList
|
|
37
|
-
},
|
|
38
|
-
isSearchable: false,
|
|
39
|
-
onChange: function onChange(f) {return f;},
|
|
40
|
-
ref: ref,
|
|
41
|
-
value: value })
|
|
42
|
-
));
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
ResponseCurvePicker.propTypes = {
|
|
47
|
-
value: PropTypes.number.isRequired,
|
|
48
|
-
inverted: PropTypes.bool,
|
|
49
|
-
onChange: PropTypes.func.isRequired,
|
|
50
|
-
Tooltip: PropTypes.elementType
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
ResponseCurvePicker.defaultProps = {
|
|
54
|
-
inverted: false,
|
|
55
|
-
Tooltip: DefaultTooltip
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export default ResponseCurvePicker;
|
package/dist/pickers/Select.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";import _extends from "@babel/runtime/helpers/extends";import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";var _excluded = ["children"],_excluded2 = ["children"],_excluded3 = ["components", "disabled", "label", "onChange", "options", "preserveMenuWidth", "shrinkLabel", "value"];function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}import React, { Children, forwardRef, useCallback, useMemo } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import ReactSelect, { components as originalComponents } from 'react-select';
|
|
4
|
-
import { compose, omit, set } from '../utils';
|
|
5
|
-
|
|
6
|
-
var IndicatorsContainer = originalComponents.IndicatorsContainer,Placeholder = originalComponents.Placeholder,ValueContainer = originalComponents.ValueContainer;
|
|
7
|
-
|
|
8
|
-
var CustomIndicatorsContainer = function CustomIndicatorsContainer(_ref) {var _rest$selectProps;var children = _ref.children,rest = _objectWithoutProperties(_ref, _excluded);
|
|
9
|
-
var actionButton = (_rest$selectProps = rest.selectProps) === null || _rest$selectProps === void 0 || (_rest$selectProps = _rest$selectProps.selectProps) === null || _rest$selectProps === void 0 ? void 0 : _rest$selectProps.actionButton;
|
|
10
|
-
|
|
11
|
-
return /*#__PURE__*/(
|
|
12
|
-
React.createElement(IndicatorsContainer, rest, /*#__PURE__*/
|
|
13
|
-
|
|
14
|
-
React.createElement("div", {
|
|
15
|
-
onMouseDown: function onMouseDown(e) {
|
|
16
|
-
e.stopPropagation();
|
|
17
|
-
e.preventDefault();
|
|
18
|
-
},
|
|
19
|
-
style: { display: 'flex' } },
|
|
20
|
-
|
|
21
|
-
actionButton,
|
|
22
|
-
children
|
|
23
|
-
)
|
|
24
|
-
));
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
CustomIndicatorsContainer.propTypes = {
|
|
28
|
-
children: PropTypes.node.isRequired
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
var CustomValueContainer = function CustomValueContainer(_ref2) {var children = _ref2.children,props = _objectWithoutProperties(_ref2, _excluded2);return /*#__PURE__*/(
|
|
32
|
-
React.createElement(ValueContainer, props, /*#__PURE__*/
|
|
33
|
-
React.createElement(Placeholder, _extends({},
|
|
34
|
-
props, {
|
|
35
|
-
className: props.hasValue || props.selectProps.inputValue ? 'shrunk' : '',
|
|
36
|
-
isFocused: props.isFocused }),
|
|
37
|
-
|
|
38
|
-
props.selectProps.placeholder
|
|
39
|
-
),
|
|
40
|
-
Children.map(children, function (child) {return child && child.type !== Placeholder ? child : null;})
|
|
41
|
-
));};
|
|
42
|
-
|
|
43
|
-
CustomValueContainer.propTypes = {
|
|
44
|
-
children: PropTypes.node.isRequired,
|
|
45
|
-
hasValue: PropTypes.bool.isRequired,
|
|
46
|
-
isFocused: PropTypes.bool,
|
|
47
|
-
selectProps: PropTypes.object.isRequired
|
|
48
|
-
};
|
|
49
|
-
CustomValueContainer.defaultProps = { isFocused: false };
|
|
50
|
-
|
|
51
|
-
var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
52
|
-
var
|
|
53
|
-
components =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
props.components,disabled = props.disabled,label = props.label,onChange = props.onChange,options = props.options,preserveMenuWidth = props.preserveMenuWidth,shrinkLabel = props.shrinkLabel,value = props.value,rest = _objectWithoutProperties(props, _excluded3);
|
|
63
|
-
|
|
64
|
-
var handleChange = useCallback(function (option) {
|
|
65
|
-
onChange(option.value);
|
|
66
|
-
}, [onChange]);
|
|
67
|
-
|
|
68
|
-
var flatOptionsList = options.reduce(function (acc, entry) {return entry.options ? [].concat(_toConsumableArray(
|
|
69
|
-
acc), _toConsumableArray(entry.options)) : [].concat(_toConsumableArray(
|
|
70
|
-
acc), [entry]);}, []);
|
|
71
|
-
|
|
72
|
-
var selectedOption = flatOptionsList.find(function (option) {return value === option.value;}) || undefined;
|
|
73
|
-
|
|
74
|
-
var styles = useMemo(function () {
|
|
75
|
-
var base = preserveMenuWidth ?
|
|
76
|
-
{
|
|
77
|
-
menu: omit('width'),
|
|
78
|
-
menuList: set('overflowX', 'hidden'),
|
|
79
|
-
option: compose(
|
|
80
|
-
set('whiteSpace', 'nowrap'),
|
|
81
|
-
set('paddingRight', 10)
|
|
82
|
-
)
|
|
83
|
-
} :
|
|
84
|
-
{};
|
|
85
|
-
|
|
86
|
-
return shrinkLabel ? _objectSpread(_objectSpread({},
|
|
87
|
-
|
|
88
|
-
base), {}, {
|
|
89
|
-
container: function container(provided /* , state */) {return _objectSpread(_objectSpread({},
|
|
90
|
-
provided), {}, {
|
|
91
|
-
marginTop: 10 });},
|
|
92
|
-
|
|
93
|
-
placeholder: function placeholder(provided, state) {return _objectSpread(_objectSpread({},
|
|
94
|
-
provided), {}, {
|
|
95
|
-
position: 'absolute',
|
|
96
|
-
left: state.hasValue || state.selectProps.inputValue ? -2 : '4%',
|
|
97
|
-
top: state.hasValue || state.selectProps.inputValue ? -12 : '50%',
|
|
98
|
-
transition: 'top 0.1s, font-size 0.1s, color 0.1s',
|
|
99
|
-
fontSize: (state.hasValue || state.selectProps.inputValue) && 13 });},
|
|
100
|
-
|
|
101
|
-
valueContainer: function valueContainer(provided /* , state */) {return _objectSpread(_objectSpread({},
|
|
102
|
-
provided), {}, {
|
|
103
|
-
overflow: 'visible' });} }) : _objectSpread({},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
base);
|
|
108
|
-
|
|
109
|
-
}, [preserveMenuWidth, shrinkLabel]);
|
|
110
|
-
|
|
111
|
-
return shrinkLabel ? /*#__PURE__*/
|
|
112
|
-
|
|
113
|
-
React.createElement("div", { className: "zds-pickers__container" }, /*#__PURE__*/
|
|
114
|
-
React.createElement(ReactSelect, _extends({},
|
|
115
|
-
rest, {
|
|
116
|
-
classNamePrefix: "zds-pickers",
|
|
117
|
-
components: _objectSpread({
|
|
118
|
-
IndicatorsContainer: CustomIndicatorsContainer,
|
|
119
|
-
ValueContainer: CustomValueContainer },
|
|
120
|
-
components),
|
|
121
|
-
|
|
122
|
-
isDisabled: disabled,
|
|
123
|
-
onChange: handleChange,
|
|
124
|
-
options: options,
|
|
125
|
-
placeholder: label,
|
|
126
|
-
ref: ref,
|
|
127
|
-
styles: styles,
|
|
128
|
-
value: selectedOption })
|
|
129
|
-
)
|
|
130
|
-
) : /*#__PURE__*/
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
React.createElement("div", { className: "zds-pickers__container" },
|
|
134
|
-
Boolean(label) && /*#__PURE__*/React.createElement("span", { className: "zds-pickers__label" }, label), /*#__PURE__*/
|
|
135
|
-
React.createElement(ReactSelect, _extends({},
|
|
136
|
-
rest, {
|
|
137
|
-
classNamePrefix: "zds-pickers",
|
|
138
|
-
components: _objectSpread({
|
|
139
|
-
IndicatorsContainer: CustomIndicatorsContainer },
|
|
140
|
-
components),
|
|
141
|
-
|
|
142
|
-
isDisabled: disabled,
|
|
143
|
-
onChange: handleChange,
|
|
144
|
-
options: options,
|
|
145
|
-
ref: ref,
|
|
146
|
-
styles: styles,
|
|
147
|
-
value: selectedOption })
|
|
148
|
-
)
|
|
149
|
-
);
|
|
150
|
-
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
Select.propTypes = {
|
|
154
|
-
components: PropTypes.object,
|
|
155
|
-
disabled: PropTypes.bool,
|
|
156
|
-
label: PropTypes.string,
|
|
157
|
-
onChange: PropTypes.func.isRequired,
|
|
158
|
-
options: PropTypes.arrayOf(PropTypes.object),
|
|
159
|
-
preserveMenuWidth: PropTypes.bool,
|
|
160
|
-
shrinkLabel: PropTypes.bool,
|
|
161
|
-
value: PropTypes.any // PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
Select.defaultProps = {
|
|
165
|
-
components: undefined,
|
|
166
|
-
disabled: false,
|
|
167
|
-
label: undefined,
|
|
168
|
-
options: [],
|
|
169
|
-
preserveMenuWidth: false,
|
|
170
|
-
shrinkLabel: false,
|
|
171
|
-
value: undefined
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
export default Select;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";var _excluded = ["statuses"];import PropTypes from 'prop-types';
|
|
2
|
-
import React, { forwardRef } from 'react';
|
|
3
|
-
import Select from './Select';
|
|
4
|
-
|
|
5
|
-
var StatusPicker = /*#__PURE__*/forwardRef(function (_ref, ref) {var statuses = _ref.statuses,rest = _objectWithoutProperties(_ref, _excluded);return /*#__PURE__*/(
|
|
6
|
-
React.createElement(Select, _extends({},
|
|
7
|
-
rest, {
|
|
8
|
-
options: statuses,
|
|
9
|
-
ref: ref })
|
|
10
|
-
));}
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
var statusShape = {
|
|
14
|
-
value: PropTypes.number,
|
|
15
|
-
label: PropTypes.string
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
StatusPicker.propTypes = {
|
|
19
|
-
statuses: PropTypes.arrayOf(PropTypes.shape(statusShape)).isRequired
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default StatusPicker;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";import _slicedToArray from "@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";var _excluded = ["disabled", "highToLow", "max", "min", "onChange", "value"];import React, { forwardRef, useCallback, useMemo } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { arraySequence, assertRange } from '../utils';
|
|
4
|
-
import useStateWithDynamicDefault from '../hooks/useStateWithDynamicDefault';
|
|
5
|
-
import Select from './Select';
|
|
6
|
-
|
|
7
|
-
var ValuePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
8
|
-
var disabled = props.disabled,highToLow = props.highToLow,max = props.max,min = props.min,onChange = props.onChange,initialValue = props.value,rest = _objectWithoutProperties(props, _excluded);
|
|
9
|
-
var options = useMemo(
|
|
10
|
-
function () {
|
|
11
|
-
var result = arraySequence(max - min + 1).
|
|
12
|
-
map(function (i) {return min + i;}).
|
|
13
|
-
map(function (value) {return { value: value, label: value };});
|
|
14
|
-
return highToLow ? result.reverse() : result;
|
|
15
|
-
},
|
|
16
|
-
[highToLow, max, min]
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
var _useStateWithDynamicD = useStateWithDynamicDefault(initialValue),_useStateWithDynamicD2 = _slicedToArray(_useStateWithDynamicD, 2),value = _useStateWithDynamicD2[0],setValue = _useStateWithDynamicD2[1];
|
|
20
|
-
|
|
21
|
-
var handleChange = useCallback(function (v) {
|
|
22
|
-
onChange(assertRange(v, max, min));
|
|
23
|
-
|
|
24
|
-
setValue(v);
|
|
25
|
-
}, [max, min, onChange, setValue]);
|
|
26
|
-
|
|
27
|
-
return /*#__PURE__*/(
|
|
28
|
-
React.createElement(Select, _extends({},
|
|
29
|
-
rest, {
|
|
30
|
-
disabled: disabled,
|
|
31
|
-
isDisabled: disabled,
|
|
32
|
-
onChange: handleChange,
|
|
33
|
-
options: options,
|
|
34
|
-
ref: ref,
|
|
35
|
-
value: value })
|
|
36
|
-
));
|
|
37
|
-
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
ValuePicker.propTypes = {
|
|
41
|
-
disabled: PropTypes.bool,
|
|
42
|
-
highToLow: PropTypes.bool,
|
|
43
|
-
max: PropTypes.number,
|
|
44
|
-
min: PropTypes.number,
|
|
45
|
-
onChange: PropTypes.func.isRequired,
|
|
46
|
-
value: PropTypes.number
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
ValuePicker.defaultProps = {
|
|
50
|
-
disabled: false,
|
|
51
|
-
highToLow: false,
|
|
52
|
-
max: 127,
|
|
53
|
-
min: 0,
|
|
54
|
-
value: undefined
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export default ValuePicker;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
var knobSkin10 = {
|
|
2
|
-
knobX: 71.44,
|
|
3
|
-
knobY: 71.44,
|
|
4
|
-
svg: "\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"207px\" height=\"207px\" viewBox=\"0 0 207 207\" version=\"1.1\">\n <!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->\n <desc>Created with Sketch.</desc>\n <defs>\n <linearGradient x1=\"50%\" y1=\"50%\" x2=\"50%\" y2=\"100%\" id=\"27c61b0f-392f-962d-de12-cb9da898274b\">\n <stop stop-color=\"#444040\" stop-opacity=\"0.51098279\" offset=\"0%\"/>\n <stop stop-color=\"#131111\" stop-opacity=\"0.893200861\" offset=\"100%\"/>\n </linearGradient>\n <circle id=\"e966567b-3869-4bcd-76b6-2cf084e45390\" cx=\"100.497487\" cy=\"100.497487\" r=\"99.4974874\"/>\n <filter x=\"-3.3%\" y=\"-3.3%\" width=\"106.5%\" height=\"106.5%\" filterUnits=\"objectBoundingBox\" id=\"e2e6829f-0086-96b2-e92a-6f3809b8ac61\">\n <feMorphology radius=\"0.5\" operator=\"dilate\" in=\"SourceAlpha\" result=\"shadowSpreadOuter1\"/>\n <feOffset dx=\"0\" dy=\"0\" in=\"shadowSpreadOuter1\" result=\"shadowOffsetOuter1\"/>\n <feGaussianBlur stdDeviation=\"2\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"/>\n <feComposite in=\"shadowBlurOuter1\" in2=\"SourceAlpha\" operator=\"out\" result=\"shadowBlurOuter1\"/>\n <feColorMatrix values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0\" type=\"matrix\" in=\"shadowBlurOuter1\"/>\n </filter>\n <linearGradient x1=\"50%\" y1=\"0%\" x2=\"50%\" y2=\"100%\" id=\"0facd5c9-8e04-e83f-4842-8ba16f949942\">\n <stop stop-color=\"#FFFFFF\" stop-opacity=\"0.5\" offset=\"0%\"/>\n <stop stop-color=\"#000000\" stop-opacity=\"0.5\" offset=\"100%\"/>\n </linearGradient>\n <circle id=\"c54189ed-7ea3-956c-f040-f0207548b268\" cx=\"100.432161\" cy=\"100.432161\" r=\"86.4321608\"/>\n <filter x=\"-4.0%\" y=\"-3.5%\" width=\"108.1%\" height=\"108.1%\" filterUnits=\"objectBoundingBox\" id=\"dedf2e7e-f008-c315-f682-e424d670f210\">\n <feMorphology radius=\"0.5\" operator=\"dilate\" in=\"SourceAlpha\" result=\"shadowSpreadOuter1\"/>\n <feOffset dx=\"0\" dy=\"1\" in=\"shadowSpreadOuter1\" result=\"shadowOffsetOuter1\"/>\n <feGaussianBlur stdDeviation=\"2\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"/>\n <feComposite in=\"shadowBlurOuter1\" in2=\"SourceAlpha\" operator=\"out\" result=\"shadowBlurOuter1\"/>\n <feColorMatrix values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0\" type=\"matrix\" in=\"shadowBlurOuter1\"/>\n </filter>\n\n <filter x=\"-5.3%\" y=\"-11.3%\" width=\"110.7%\" height=\"122.6%\" filterUnits=\"objectBoundingBox\" id=\"12f618f7-e258-b597-3ed6-242484ddad8f\">\n <feOffset dx=\"0\" dy=\"0\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\"/>\n <feGaussianBlur stdDeviation=\"2\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"/>\n <feColorMatrix values=\"0 0 0 0 0.915577168 0 0 0 0 0.797591325 0 0 0 0 0.601479722 0 0 0 1 0\" type=\"matrix\" in=\"shadowBlurOuter1\"/>\n </filter>\n <pattern id=\"3cc0e5b8-1f0a-886b-f635-8fcb19212870\" width=\"8.04411765\" height=\"8.04411765\" x=\"21.9558824\" y=\"21.9558824\" patternUnits=\"userSpaceOnUse\">\n <use xlink:href=\"#2b8719c1-286b-ebf8-a488-ac66a6598fc5\" transform=\"scale(0.167585784,0.167585784)\"/>\n </pattern>\n <image id=\"2b8719c1-286b-ebf8-a488-ac66a6598fc5\" width=\"48\" height=\"48\" xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAEGWlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5SDFcSDiH+hRkH25+L+sdxKEAMZahrlSX8ukqMOWy/jXW2m6M9LDBc31B9LFuv6gVKg/0Szi3KAr1kGq1GMjU/aLbnq6/lRxc4XfJ98hTargX++DbMJBSiYMIe9Ck1YAxFkKEAG3xbYaKmDDgYyFK0UGYpfoWYXG+fAPPI6tJnNwb7ClP7IyF+D+bjOtCpkhz6CFrIa/I6sFtNl8auFXGMTP34sNwI/JhkgEtmDz14ySfaRcTIBInmKPE32kxyyE2Tv+thKbEVePDfW/byMM1Kmm0XdObS7oGD/MypMXFPXrCwOtoYjyyn7BV29/MZfsVzpLDdRtuIZnbpXzvlf+ev8MvYr/Gqk4H/kV/G3csdazLuyTMPsbFhzd1UabQbjFvDRmcWJxR3zcfHkVw9GfpbJmeev9F08WW8uDkaslwX6avlWGU6NRKz0g/SHtCy9J30o/ca9zX3Kfc19zn3BXQKRO8ud477hLnAfc1/G9mrzGlrfexZ5GLdn6ZZrrEohI2wVHhZywjbhUWEy8icMCGNCUdiBlq3r+xafL549HQ5jH+an+1y+LlYBifuxAvRN/lVVVOlwlCkdVm9NOL5BE4wkQ2SMlDZU97hX86EilU/lUmkQUztTE6mx1EEPh7OmdqBtAvv8HdWpbrJS6tJj3n0CWdM6busNzRV3S9KTYhqvNiqWmuroiKgYhshMjmhTh9ptWhsF7970j/SbMrsPE1suR5z7DMC+P/Hs+y7ijrQAlhyAgccjbhjPygfeBTjzhNqy28EdkUh8C+DU9+z2v/oyeH791OncxHOs5y2AtTc7nb/f73TWPkD/qwBnjX8BoJ98VQNcC+8AAAFFSURBVGgF7djbDYMwDAXQBjEMYqyqY1WMxTppLiJIQIA8ariWkp8IPuweO60am67r7MstY8wwjuPH7dMz3uUua63p+/7r9rePIRW/9QmQzCV9ub0YgSIgzhxvQkjFb1EZBAdEKolkfJTqtnb7bv/zOJm58moRE0AzYgFoRawAGhE7gDZEEKAJcQjQgjgFaEBcAtgRUQBmRDSAFZEEYEQkA9gQWQAmRDaABVEEYEAUAx5H4EaGOyw+SMl66mbXzNOD4k6gCPNUY/CFwF1YOn5zRxJJRINqaUbUuZA/79sd3wm3xIdbdS60rXzo2XVCbO60/HxKJgFKKv4CkEziuyKBWAE0InYAbYggQBPiEKAFcQrQgLgEsCOiAMyIaAArIgnAiEgGsCGyAEyIbAALogjAgCgGPI7AX9w6F3JtqHMhnMWLFSrSD9jOnakVHpZYAAAAAElFTkSuQmCC\"/>\n </defs>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g id=\"s10\" transform=\"translate(3.000000, 3.000000)\">\n <g id=\"container\">\n <g id=\"Oval-2\">\n <use fill=\"black\" fill-opacity=\"1\" filter=\"url(#e2e6829f-0086-96b2-e92a-6f3809b8ac61)\" xlink:href=\"#e966567b-3869-4bcd-76b6-2cf084e45390\"/>\n <use stroke=\"#979797\" stroke-width=\"1\" fill=\"url(#27c61b0f-392f-962d-de12-cb9da898274b)\" fill-rule=\"evenodd\" xlink:href=\"#e966567b-3869-4bcd-76b6-2cf084e45390\"/>\n </g>\n <g id=\"Oval-2\">\n <use fill=\"black\" fill-opacity=\"1\" filter=\"url(#dedf2e7e-f008-c315-f682-e424d670f210)\" xlink:href=\"#c54189ed-7ea3-956c-f040-f0207548b268\"/>\n <use fill=\"\" fill-rule=\"evenodd\" xlink:href=\"#c54189ed-7ea3-956c-f040-f0207548b268\"/>\n <use stroke=\"#4A4A4A\" stroke-width=\"1\" fill=\"url(#0facd5c9-8e04-e83f-4842-8ba16f949942)\" fill-rule=\"evenodd\" xlink:href=\"#c54189ed-7ea3-956c-f040-f0207548b268\"/>\n </g>\n <g id=\"knob\" transform=\"translate(28.574244, 28.574244)\">\n <circle id=\"Oval-5\" fill=\"#322E2E\" cx=\"71.4356094\" cy=\"71.4356094\" r=\"71.4356094\"/>\n <path d=\"M72.4209282,3.63066376 L88.6786876,16.869789 C81.585496,18.1548295 76.1662428,18.7973498 72.4209282,18.7973498 C68.6756135,18.7973498 63.2563604,18.1548295 56.1631688,16.869789 L72.4209282,3.63066376 Z\" id=\"Rectangle\" fill=\"#E6D7D7\" transform=\"translate(72.420928, 11.214007) scale(1, -1) translate(-72.420928, -11.214007) \"/>\n </g>\n <g id=\"label\">\n <g id=\"labeltext\" fill-opacity=\"1\" fill=\"#E6D7D7\">\n <text id=\"534f4e02-5541-3607-0966-af0b025d80e0\" font-family=\"Helvetica\" font-size=\"44\" font-weight=\"normal\" fill=\"#E6D7D7\" class=\"text-7\" filter=\"url(#12f618f7-e258-b597-3ed6-242484ddad8f)\">\n <tspan x=\"45.3246625\" y=\"117.884225\">10.10</tspan>\n </text>\n <text id=\"92ebe866-c281-70c7-7b0e-a373cee013a9\" font-family=\"Helvetica\" font-size=\"44\" font-weight=\"normal\" fill=\"#E6D7D7\" class=\"text-7\">\n <tspan x=\"45.3246625\" y=\"117.884225\">10.10</tspan>\n </text>\n </g>\n <circle id=\"Oval-6\" stroke=\"#979797\" fill-opacity=\"0.730000019\" fill=\"url(#3cc0e5b8-1f0a-886b-f635-8fcb19212870)\" transform=\"translate(100.351759, 100.351759) rotate(-45.000000) translate(-100.351759, -100.351759) \" cx=\"100.351759\" cy=\"100.351759\" r=\"70.3517588\"/>\n </g>\n </g>\n </g>\n </g>\n</svg>\n",
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
updateAttributes: [
|
|
77
|
-
{
|
|
78
|
-
element: '#labeltext text tspan',
|
|
79
|
-
content: function content(props, value) {return value.toFixed(0);},
|
|
80
|
-
attrs: [
|
|
81
|
-
{
|
|
82
|
-
name: 'text-anchor',
|
|
83
|
-
value: function value( /* props, value */) {return 'middle';}
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: 'x',
|
|
87
|
-
value: function value( /* props, value */) {return '100';}
|
|
88
|
-
}]
|
|
89
|
-
|
|
90
|
-
}]
|
|
91
|
-
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export default knobSkin10;
|
package/dist/shapes.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { number, oneOfType, shape, string } from 'prop-types';
|
|
2
|
-
|
|
3
|
-
export var numberOrString = oneOfType([number, string]);
|
|
4
|
-
|
|
5
|
-
export var mappingShape = shape({
|
|
6
|
-
note: number.isRequired,
|
|
7
|
-
name: string.isRequired,
|
|
8
|
-
group: string.isRequired
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export default mappingShape;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import mapper from './mapper';
|
|
2
|
-
|
|
3
|
-
export default mapper([
|
|
4
|
-
'26:Other|Finger Snap',
|
|
5
|
-
'27:Other|High Q',
|
|
6
|
-
'28:Other|Slap',
|
|
7
|
-
'29:Other|Scratch Push',
|
|
8
|
-
'30:Other|Scratch Pull',
|
|
9
|
-
'31:Other|Sticks',
|
|
10
|
-
'32:Other|Square Click',
|
|
11
|
-
'33:Other|Metronome Click',
|
|
12
|
-
'34:Other|Metronome Bell',
|
|
13
|
-
'35:Kicks|Deep Kick',
|
|
14
|
-
'36:Kicks|Kick',
|
|
15
|
-
'37:Snares|Rim Shot',
|
|
16
|
-
'38:Snares|Snare',
|
|
17
|
-
'39:Other|Clap',
|
|
18
|
-
'40:Snares|Gated Snare',
|
|
19
|
-
'41:Toms|Low Tom 2',
|
|
20
|
-
'42:Hats|Closed HH',
|
|
21
|
-
'43:Toms|Low Tom 1',
|
|
22
|
-
'44:Hats|Pedal HH',
|
|
23
|
-
'45:Toms|Mid Tom 2',
|
|
24
|
-
'46:Hats|Open HH',
|
|
25
|
-
'47:Toms|Mid Tom 1',
|
|
26
|
-
'48:Toms|Mid Tom 2',
|
|
27
|
-
'49:Cymbals|Crash',
|
|
28
|
-
'50:Toms|High Tom 1',
|
|
29
|
-
'51:Rides|Ride 1',
|
|
30
|
-
'52:Cymbals|Chinese Crash',
|
|
31
|
-
'53:Rides|Ride Bell',
|
|
32
|
-
'54:Perc|Tambourine',
|
|
33
|
-
'55:Cymbals|Splash',
|
|
34
|
-
'56:Perc|Cowbell',
|
|
35
|
-
'57:Cymbals|Crash 2',
|
|
36
|
-
'58:Perc|Vibra Slap',
|
|
37
|
-
'59:Rides|Ride 2',
|
|
38
|
-
'60:Perc|High Bongo',
|
|
39
|
-
'61:Perc|Low Bongo',
|
|
40
|
-
'62:Perc|Mute High Conga',
|
|
41
|
-
'63:Perc|Open High Conga',
|
|
42
|
-
'64:Perc|Low Conga',
|
|
43
|
-
'65:Perc|High Timbale',
|
|
44
|
-
'66:Perc|Low Timbale',
|
|
45
|
-
'67:Perc|High Agogo',
|
|
46
|
-
'68:Perc|Low Agogo',
|
|
47
|
-
'69:Perc|Cabasa',
|
|
48
|
-
'70:Perc|Maracas',
|
|
49
|
-
'71:Perc|Short Whistle',
|
|
50
|
-
'72:Perc|Long Whistle',
|
|
51
|
-
'73:Perc|Short Guiro',
|
|
52
|
-
'74:Perc|Long Guiro',
|
|
53
|
-
'75:Perc|Claves',
|
|
54
|
-
'76:Perc|High Woodblock',
|
|
55
|
-
'77:Perc|Low Woodblock',
|
|
56
|
-
'78:Perc|Mute Cuica',
|
|
57
|
-
'79:Perc|Open Cuica',
|
|
58
|
-
'80:Perc|Mute Triangle',
|
|
59
|
-
'81:Perc|Triangle',
|
|
60
|
-
'82:Perc|Shaker',
|
|
61
|
-
'83:Perc|Jingle Bell',
|
|
62
|
-
'84:Perc|Bell Tree',
|
|
63
|
-
'85:Perc|Castenets',
|
|
64
|
-
'86:Perc|Mute Surdo',
|
|
65
|
-
'87:Perc|Open Surdo',
|
|
66
|
-
'88:Other|Applause 2',
|
|
67
|
-
'95:Snares|Room Snare 1',
|
|
68
|
-
'96:Snares|Room Snare 2']
|
|
69
|
-
);
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { arraySequence } from './utils';
|
|
2
|
-
|
|
3
|
-
export var standardizeGroup = function standardizeGroup(name) {
|
|
4
|
-
switch (String(name).toLocaleLowerCase()) {
|
|
5
|
-
case 'cymbals':
|
|
6
|
-
case 'cymbal':
|
|
7
|
-
case 'cym':
|
|
8
|
-
return 'Cymbals';
|
|
9
|
-
|
|
10
|
-
case 'hats':
|
|
11
|
-
case 'hat':
|
|
12
|
-
case 'hi-hat':
|
|
13
|
-
case 'hi-hats':
|
|
14
|
-
return 'Hats';
|
|
15
|
-
|
|
16
|
-
case 'kicks':
|
|
17
|
-
case 'kick':
|
|
18
|
-
return 'Kicks';
|
|
19
|
-
|
|
20
|
-
case 'perc':
|
|
21
|
-
case 'percussion':
|
|
22
|
-
return 'Perc';
|
|
23
|
-
|
|
24
|
-
case 'rides':
|
|
25
|
-
case 'ride':
|
|
26
|
-
return 'Rides';
|
|
27
|
-
|
|
28
|
-
case 'snares':
|
|
29
|
-
case 'snare':
|
|
30
|
-
return 'Snares';
|
|
31
|
-
|
|
32
|
-
case 'toms':
|
|
33
|
-
case 'tom':
|
|
34
|
-
case 'tom-tom':
|
|
35
|
-
return 'Toms';
|
|
36
|
-
|
|
37
|
-
case 'aux':
|
|
38
|
-
case 'auxillary':
|
|
39
|
-
return 'aux';
|
|
40
|
-
|
|
41
|
-
default:
|
|
42
|
-
return name;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export var standardizeItem = function standardizeItem(_ref) {var note = _ref.note,group = _ref.group,name = _ref.name;return {
|
|
47
|
-
note: note,
|
|
48
|
-
name: name,
|
|
49
|
-
group: standardizeGroup(group)
|
|
50
|
-
};};
|
|
51
|
-
|
|
52
|
-
export var reverse = function reverse(content) {return content.map(function (_ref2) {var note = _ref2.note,group = _ref2.group,name = _ref2.name;return "".concat(note, ":").concat(group, "|").concat(name);}).join('\n');};
|
|
53
|
-
|
|
54
|
-
var mapper = function mapper(raw) {var fillMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
55
|
-
var availableNotes = raw.
|
|
56
|
-
map(function (item) {
|
|
57
|
-
var props = /(\d+):([\w\s-]*)\|(.*)/.exec(item);
|
|
58
|
-
|
|
59
|
-
return props ?
|
|
60
|
-
{
|
|
61
|
-
note: parseInt(props[1], 10),
|
|
62
|
-
group: String(props[2]).trim(),
|
|
63
|
-
name: String(props[3]).trim()
|
|
64
|
-
} :
|
|
65
|
-
null;
|
|
66
|
-
}).
|
|
67
|
-
filter(function (item) {return item !== null;}).
|
|
68
|
-
map(standardizeItem);
|
|
69
|
-
|
|
70
|
-
// We may not have a complete set of 128 notes, so fill in the blanks
|
|
71
|
-
return fillMissing ?
|
|
72
|
-
arraySequence(128).
|
|
73
|
-
map(function (n) {return n + 1;}).
|
|
74
|
-
map(function (n) {return availableNotes.find(function (_ref3) {var note = _ref3.note;return n === note;}) || {
|
|
75
|
-
note: n,
|
|
76
|
-
group: '',
|
|
77
|
-
name: ''
|
|
78
|
-
};}) :
|
|
79
|
-
availableNotes;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export default mapper;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/* ---------------------------- Arrays -------------------------------------- */
|
|
2
|
-
|
|
3
|
-
// this just creates and fills a zero-indexed array array; 0, 1, 2, 3, etc
|
|
4
|
-
export var arraySequence = function arraySequence(numberOfElements) {return Array.from(Array(numberOfElements).keys());};
|
|
5
|
-
|
|
6
|
-
export default arraySequence;
|