zds-pickers 4.1.1 → 4.1.3

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 (64) hide show
  1. package/dist/index.cjs.js.map +1 -1
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/other/SoundFontProvider.js +4 -4
  4. package/dist/types/other/SoundFontProvider.d.ts +1 -1
  5. package/lib/soundfonts/acoustic_grand_piano-mp3.js +107 -0
  6. package/package.json +5 -1
  7. package/.editorconfig +0 -19
  8. package/.github/workflows/codeql-analysis.yml +0 -67
  9. package/.nvmrc +0 -1
  10. package/.prettierignore +0 -0
  11. package/.prettierrc +0 -13
  12. package/.storybook/main.ts +0 -42
  13. package/.storybook/manager.ts +0 -12
  14. package/.storybook/preview.tsx +0 -26
  15. package/.vscode/extensions.json +0 -32
  16. package/.vscode/javascript.code-snippets +0 -229
  17. package/.vscode/settings.json +0 -358
  18. package/biome.jsonc +0 -158
  19. package/lib/@types/nebiru-react-rotary-knob.d.ts +0 -20
  20. package/lib/@types/react-svgmt.d.ts +0 -74
  21. package/lib/@types/zds-mappings.d.ts +0 -55
  22. package/lib/@types/zds-react-piano.d.ts +0 -17
  23. package/lib/hooks/useComponentSize.ts +0 -52
  24. package/lib/hooks/useStateWithDynamicDefault.ts +0 -13
  25. package/lib/index.ts +0 -52
  26. package/lib/midi/ccValues.ts +0 -139
  27. package/lib/midi/export.ts +0 -88
  28. package/lib/other/DefaultTooltip.ts +0 -14
  29. package/lib/other/OctavePlayer.tsx +0 -139
  30. package/lib/other/SoundFontProvider.tsx +0 -214
  31. package/lib/other/SvgText.tsx +0 -221
  32. package/lib/pickers/CCPicker.tsx +0 -28
  33. package/lib/pickers/ChannelMappingPicker.tsx +0 -150
  34. package/lib/pickers/ChannelPicker.tsx +0 -84
  35. package/lib/pickers/KeyPicker.tsx +0 -55
  36. package/lib/pickers/Knob.tsx +0 -93
  37. package/lib/pickers/KnobPicker.tsx +0 -93
  38. package/lib/pickers/LatchPicker.tsx +0 -33
  39. package/lib/pickers/MappingPicker.tsx +0 -68
  40. package/lib/pickers/NotePicker.tsx +0 -95
  41. package/lib/pickers/PianoPicker.tsx +0 -81
  42. package/lib/pickers/PolarityPicker.tsx +0 -39
  43. package/lib/pickers/ResponseCurve.tsx +0 -251
  44. package/lib/pickers/ResponseCurvePicker.tsx +0 -75
  45. package/lib/pickers/Select.tsx +0 -268
  46. package/lib/pickers/StatusPicker.tsx +0 -30
  47. package/lib/pickers/ValuePicker.tsx +0 -67
  48. package/lib/pickers/knobSkin10.tsx +0 -112
  49. package/lib/rotaryKnob/InternalInput.tsx +0 -43
  50. package/lib/rotaryKnob/Types.ts +0 -6
  51. package/lib/rotaryKnob/helpers/DrawCircle.tsx +0 -41
  52. package/lib/rotaryKnob/helpers/DrawLine.tsx +0 -32
  53. package/lib/rotaryKnob/helpers/HelpersOverlay.tsx +0 -43
  54. package/lib/rotaryKnob/helpers/KnobVisualHelpers.tsx +0 -138
  55. package/lib/rotaryKnob/index.tsx +0 -417
  56. package/lib/rotaryKnob/knobdefaultskin.ts +0 -69
  57. package/lib/rotaryKnob/utils.ts +0 -112
  58. package/lib/utils.ts +0 -41
  59. package/stories/assets/sampleStyles.css +0 -365
  60. package/stories/assets/utils.js +0 -7
  61. package/stories/picker.stories.tsx +0 -432
  62. package/tsconfig.json +0 -35
  63. package/vite.config.ts +0 -41
  64. /package/{lib/temp → dist/soundfonts}/acoustic_grand_piano-mp3.js +0 -0
@@ -25,7 +25,7 @@ if (typeof global !== 'undefined') {
25
25
  // NOTE: This adds ~2.2MB to the bundle size. Currently all consumers need piano,
26
26
  // but if future web apps don't need audio, consider making this import conditional
27
27
  // or implementing lazy loading to reduce bundle size for audio-free use cases.
28
- import '../temp/acoustic_grand_piano-mp3';
28
+ import '../soundfonts/acoustic_grand_piano-mp3';
29
29
  const isDefined = (item) => item !== undefined && item !== null && !Number.isNaN(item);
30
30
  const SoundfontProvider = (props) => {
31
31
  const { audioContext, format, hostname, instrumentName, onChange, render, soundfont, } = props;
@@ -41,7 +41,7 @@ const SoundfontProvider = (props) => {
41
41
  format,
42
42
  soundfont,
43
43
  nameToUrl: (name, sf, fmt) => `${hostname}/${sf}/${name}-${fmt}.js`,
44
- }).then(newInstrument => {
44
+ }).then((newInstrument) => {
45
45
  setInstrument(newInstrument);
46
46
  });
47
47
  }
@@ -108,7 +108,7 @@ const SoundfontProvider = (props) => {
108
108
  if (instrument) {
109
109
  audioContext.resume().then(() => {
110
110
  const audioNode = instrument.play(String(midiNumber));
111
- setActiveAudioNodes(prev => ({ ...prev, [midiNumber]: audioNode }));
111
+ setActiveAudioNodes((prev) => ({ ...prev, [midiNumber]: audioNode }));
112
112
  });
113
113
  }
114
114
  };
@@ -119,7 +119,7 @@ const SoundfontProvider = (props) => {
119
119
  }
120
120
  const audioNode = activeAudioNodes[midiNumber];
121
121
  audioNode.stop();
122
- setActiveAudioNodes(prev => {
122
+ setActiveAudioNodes((prev) => {
123
123
  const { [midiNumber]: _, ...rest } = prev;
124
124
  return rest;
125
125
  });
@@ -11,7 +11,7 @@ declare global {
11
11
  var MIDI: MIDIGlobal | undefined;
12
12
  }
13
13
  }
14
- import '../temp/acoustic_grand_piano-mp3';
14
+ import '../soundfonts/acoustic_grand_piano-mp3';
15
15
  type SoundfontProviderProps = {
16
16
  audioContext: AudioContext;
17
17
  format?: 'mp3' | 'ogg';