@trippnology/mixshell 0.0.0-stage → 0.7.1

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 (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +320 -2
  3. package/assets/mixshell-screenshot.png +0 -0
  4. package/package.json +74 -5
  5. package/src/alsa-pulse.conf +20 -0
  6. package/src/alsa-setup.js +15 -0
  7. package/src/components/browser.js +193 -0
  8. package/src/components/config.js +168 -0
  9. package/src/components/durations.js +151 -0
  10. package/src/components/library.js +679 -0
  11. package/src/components/mediakeys.js +222 -0
  12. package/src/components/mpris.js +309 -0
  13. package/src/components/player.js +436 -0
  14. package/src/components/playlist.js +335 -0
  15. package/src/components/session.js +96 -0
  16. package/src/constants.js +164 -0
  17. package/src/engines/ffmpeg.js +610 -0
  18. package/src/engines/index.js +14 -0
  19. package/src/engines/webaudio.js +317 -0
  20. package/src/index.js +188 -0
  21. package/src/mediakeys/macos-nowplaying.js +227 -0
  22. package/src/ui/app.js +56 -0
  23. package/src/ui/artPane.js +314 -0
  24. package/src/ui/confirmPrompt.js +34 -0
  25. package/src/ui/constants.js +133 -0
  26. package/src/ui/controller.js +1654 -0
  27. package/src/ui/dom.js +9 -0
  28. package/src/ui/goToPrompt.js +105 -0
  29. package/src/ui/index.html +78 -0
  30. package/src/ui/libraryPanel.js +415 -0
  31. package/src/ui/listView.js +209 -0
  32. package/src/ui/onboarding.js +353 -0
  33. package/src/ui/playlistPanel.js +207 -0
  34. package/src/ui/settingsPanel.js +473 -0
  35. package/src/ui/shortcuts.js +30 -0
  36. package/src/ui/splash.js +302 -0
  37. package/src/ui/style.css +532 -0
  38. package/src/ui/subtabs.js +31 -0
  39. package/src/ui/visualizer/bars.js +74 -0
  40. package/src/ui/visualizer/circles.js +64 -0
  41. package/src/ui/visualizer/color.js +61 -0
  42. package/src/ui/visualizer/cube.js +105 -0
  43. package/src/ui/visualizer/grid.js +68 -0
  44. package/src/ui/visualizer/index.js +65 -0
  45. package/src/ui/visualizer/onset.js +130 -0
  46. package/src/ui/visualizer/spectrum.js +34 -0
  47. package/src/ui/visualizer/vu.js +71 -0
  48. package/src/ui/visualizer/waveform.js +58 -0
  49. package/src/utils/audioAnalyzer.js +362 -0
  50. package/src/utils/audioDevices.js +222 -0
  51. package/src/utils/cellart.js +75 -0
  52. package/src/utils/debug.js +7 -0
  53. package/src/utils/durationProbe.js +48 -0
  54. package/src/utils/folderArt.js +46 -0
  55. package/src/utils/format.js +20 -0
  56. package/src/utils/id3.js +84 -0
  57. package/src/utils/pathInput.js +76 -0
  58. package/src/utils/playlistIO.js +176 -0
  59. package/src/utils/terminalGraphics.js +47 -0
@@ -0,0 +1,133 @@
1
+ import { SCREENS } from '../constants.js';
2
+
3
+ export const VIZ_MODES = [
4
+ 'vu',
5
+ 'bars',
6
+ 'waveform',
7
+ 'circles',
8
+ 'cube',
9
+ 'albumart',
10
+ ];
11
+
12
+ // Visualizer quality vocabulary. Analysis half (fftSize per level) lives
13
+ // in the analyzer's QUALITY_PRESETS; the render half is here: bar count
14
+ // per level (the keys are the quality levels), passed to
15
+ // visualizer.setMaxBars().
16
+ export const VIZ_BARS = { low: 16, medium: 32, high: 64 };
17
+
18
+ // Tab count varies with --debug; the footer range derives per render.
19
+ export const globalShortcuts = (tabCount) => [
20
+ ['Space', 'Play/Pause'],
21
+ ['s', 'Stop'],
22
+ ['n/p', 'Next/Prev'],
23
+ ['m', 'Mute'],
24
+ [`1-${tabCount}`, 'Tabs'],
25
+ ['q', 'Quit'],
26
+ ];
27
+
28
+ // Function so the Main tab's seek label carries the configured step
29
+ // (config key `seekStep`); everything else is static. Call per render.
30
+ export const tabShortcuts = (seekStep) => ({
31
+ [SCREENS.MAIN]: [
32
+ ['v', 'Visualizer'],
33
+ ['↑/↓', 'Volume'],
34
+ ['←/→', `Seek ±${seekStep}s`],
35
+ ],
36
+ [SCREENS.BROWSER]: [
37
+ ['↑/↓', 'Select'],
38
+ ['Enter', 'Play'],
39
+ ['Alt+Enter/Alt+J', 'Queue/Queue next'],
40
+ // Arrows share one entry so the footer stays one row (issues/051).
41
+ ['←/→', 'Back/Open'],
42
+ ['a', 'Add all'],
43
+ ['L', 'Add to Library'],
44
+ ['f', 'Favourite'],
45
+ ['Ctrl+F', 'Filter'],
46
+ ['g', 'Go to'],
47
+ ],
48
+ [SCREENS.PLAYLIST]: [
49
+ ['↑/↓', 'Select'],
50
+ ['Enter', 'Play'],
51
+ ['Del', 'Remove'],
52
+ ['u/d', 'Move'],
53
+ ['c', 'Clear'],
54
+ ['w/o', 'Save/Open playlist'],
55
+ ['r/h', 'Rep/Shuf'],
56
+ ['f', 'Favourite'],
57
+ ['Ctrl+F', 'Filter'],
58
+ ],
59
+ [SCREENS.LIBRARY]: [
60
+ ['[ / ]', 'View'],
61
+ ['↑/↓', 'Select'],
62
+ ['Enter', 'Play'],
63
+ ['Alt+Enter/Alt+J', 'Queue/Queue next'],
64
+ ['←/→', 'Up/Open'],
65
+ ['a', 'Add all'],
66
+ ['f', 'Favourite'],
67
+ ['S/D', 'Sort/Direction'],
68
+ ['Ctrl+F', 'Filter'],
69
+ ],
70
+ [SCREENS.SETTINGS]: [
71
+ ['[ / ]', 'View'],
72
+ ['↑/↓', 'Select'],
73
+ ['←/→', 'Step ±1'],
74
+ ['Enter', 'Change'],
75
+ ],
76
+ });
77
+
78
+ // Settings → Library → Library Dirs drill level (issues/031) replaces the
79
+ // generic Settings row while the root list is on screen.
80
+ export const SETTINGS_DIR_SHORTCUTS = [
81
+ ['Del', 'Remove'],
82
+ ['Enter', 'Info'],
83
+ ['←', 'Back'],
84
+ ];
85
+
86
+ // Settings → General → Output device list (issue 058): its own footer row.
87
+ export const SETTINGS_DEVICE_SHORTCUTS = [
88
+ ['↑/↓', 'Choose'],
89
+ ['Enter', 'Apply'],
90
+ ['←/Esc', 'Back'],
91
+ ];
92
+
93
+ // Library › Search at root level eats plain typing, so its local row
94
+ // replaces the generic Library row and the global row goes quiet (issues/052).
95
+ export const SEARCH_SHORTCUTS = [
96
+ ['[ / ]', 'View'],
97
+ ['↑/↓', 'Select'],
98
+ ['Enter', 'Play'],
99
+ ['Alt+Enter', 'Queue'],
100
+ ['Alt+J', 'Queue next'],
101
+ ['a', 'Add all'],
102
+ ['type', 'Filter'],
103
+ ['Backspace', 'Delete'],
104
+ ['Esc', 'Clear/exit'],
105
+ ];
106
+
107
+ // Theme: one class per palette (default is classless) — blocks in
108
+ // style.css; list must match the cycle order in applySetting().
109
+ export const THEMES = [
110
+ 'default',
111
+ 'terminal',
112
+ 'nord',
113
+ 'dracula',
114
+ 'gruvbox',
115
+ 'monokai',
116
+ 'tokyo-night',
117
+ 'solarized-dark',
118
+ 'night-owl',
119
+ ];
120
+
121
+ // Album art style cycle order for the settings panel (applySetting).
122
+ export const ART_STYLES = [
123
+ 'blocks',
124
+ 'basic',
125
+ 'binary',
126
+ 'braille',
127
+ 'braille_plus',
128
+ 'medium',
129
+ 'complex',
130
+ ];
131
+
132
+ export const OVERSCAN = 5;
133
+ export const EDGE = 2; // rows kept between the selection and the window edge