@nice2dev/ui-audio 1.1.10 → 1.2.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/CHANGELOG.md +70 -0
- package/README.md +14 -20
- package/dist/assets/scoringWorker-3JjtDDtu.js +1 -0
- package/dist/core/i18n.d.ts +1 -0
- package/dist/dmx/DmxEditor.d.ts +1 -11
- package/dist/editor/panels/CCAutomationLaneEditor.d.ts +0 -10
- package/dist/editor/panels/StepSequencerPanel.d.ts +1 -6
- package/dist/editor/panels/selectValue.d.ts +2 -0
- package/dist/effects/noteThemeColors.d.ts +0 -4
- package/dist/index.cjs +40 -40
- package/dist/index.d.ts +0 -69
- package/dist/index.mjs +10407 -10886
- package/dist/karaoke/rendering/glossyBarRenderer.d.ts +2 -2
- package/dist/karaoke/rendering/karaokeSettings.d.ts +0 -57
- package/dist/playlist/PlaylistDualPane.d.ts +0 -8
- package/dist/ui-audio.css +1 -1
- package/dist/utils/karaokeScoring.d.ts +0 -3
- package/dist/workers/scoringWorker.d.ts +0 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# @nice2dev/ui-audio — Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3a4939d: 1.2.0 — the API cleanup announced for this version, dictionaries per language by default, and
|
|
8
|
+
three new controls. **Breaking:** every removal has a replacement, listed name by name in
|
|
9
|
+
`documentation/omniverk/OMNIVERK_UPGRADE_1.2.0.md`.
|
|
10
|
+
|
|
11
|
+
**Removed (breaking).** All 118 `@deprecated` names: the aliases without the `Nice` prefix in
|
|
12
|
+
`ui-audio`, `ui-graphics` and `ui-3d`; `NiceBarcodeGenerator` (→ `NiceBarcode`), `NiceFloorPlanCanvas`
|
|
13
|
+
(→ `NiceSpatialEditor` in `@nice2dev/ui-buildings`), the v2 props and types of `NiceTopNav`,
|
|
14
|
+
`NiceProgress.showLabel`, `NiceCountryPicker.showDialCode` / `showFlag`, `type` on
|
|
15
|
+
`NiceDateTimePicker` / `NiceDateRangeBox` (→ `dateFormatPreset`); `ZoneOccupancy` in
|
|
16
|
+
`ui-buildings` and `events`, the `SmartHome*` types; the icon variant `flat` (→ `cutout`) and
|
|
17
|
+
`NiceIconEditor` (→ `NiceVectorEditor`); `NiceSizeLegacy`; the `snapGrid` module of `ui-diagrams` (→
|
|
18
|
+
`@nice2dev/spatial-core`); the opt-in stylesheet `@nice2dev/ui/css/legacy-bg-text-aliases.css`, which
|
|
19
|
+
formed an alias cycle with `style.css`. Props that were accepted and never read — 19 on
|
|
20
|
+
`NiceModuleGrid`, and more on `NiceAutocomplete`, `NiceTaskInbox`, `NiceConsentBanner`, the
|
|
21
|
+
building and communication controls, four `ui-audio` panels and `NiceStreamDashboard` — are gone
|
|
22
|
+
from the types. `NiceResourceAllocation` in `ui-erp` is `NiceCapacityPlanner` (the one in `ui`
|
|
23
|
+
keeps its name); `NiceGenericPlayerStageVisualizer` (→ `NiceStageVisualizer`) and
|
|
24
|
+
`NiceCubeBrowserProps` are removed. The `@nice2dev/ui/overlays` entry calls its modal, drawer,
|
|
25
|
+
bottom sheet and context menu `NiceOverlayModal`, `NiceOverlayDrawer`, `NiceOverlayBottomSheet` and
|
|
26
|
+
`NiceOverlayContextMenu`: the old names belonged to different components of `@nice2dev/ui`.
|
|
27
|
+
|
|
28
|
+
**Dictionaries per language.** `NiceI18nProvider` loads only the language in use, with `import()`
|
|
29
|
+
(it was `NiceI18nLazyProvider` in 1.1.10, which stays as the same component); the controls show their
|
|
30
|
+
built-in English until it arrives — `await loadNiceDictionary(lang)` before the first render to start
|
|
31
|
+
in the language. Nothing on the main entry of `@nice2dev/i18n` imports a dictionary any more:
|
|
32
|
+
`NICE_I18N_DICTIONARIES`, `createTranslator`, `NICE_I18N_VARIANTS` / `resolvePlVariant` and the
|
|
33
|
+
translation tooling moved to the new entry `@nice2dev/i18n/all`, and `@nice2dev/ui-core` no longer
|
|
34
|
+
re-exports the dictionary map. `@nice2dev/ui` with what it bundles: 1283 kB → 952 kB gzip loaded up
|
|
35
|
+
front. The `ui-audio` controls read the app's `NiceI18nProvider` now; their own provider overrides it.
|
|
36
|
+
|
|
37
|
+
**New controls.** `NiceRecurrenceEditor`, `NiceStopwatch`, `NiceCountdownTimer` (`@nice2dev/ui`) and
|
|
38
|
+
`NicePasswordGenerator` (`@nice2dev/auth`), plus `recurrenceDates()` and `generatePassword()`.
|
|
39
|
+
`NiceScheduler` honours a weekly rule's `byDay`, which it ignored.
|
|
40
|
+
|
|
41
|
+
**Visible changes.** The palette meets WCAG AA for text on every fill: darker fills in the light
|
|
42
|
+
theme, dark text on the fills of the dark theme (new `--nice-text-on-success` / `-error` / `-info` /
|
|
43
|
+
`-accent` / `-warning`; `NiceThemeText` takes `onSuccess`, `onError`, `onInfo`, `onWarning`). Mobile
|
|
44
|
+
and platform panels follow the app theme instead of `prefers-color-scheme`. Swipes in
|
|
45
|
+
`NiceSwipeActions`, `NiceTouchTable` and `NiceMobileCalendar` work with a mouse and a pen. The
|
|
46
|
+
`ui-forms` editors have the intended spacing (it was four times too large). `NiceMAM`,
|
|
47
|
+
`NiceTranscoder`, `NiceVideoAnnotator` and `NiceStreamDashboard` use `nice-`-prefixed BEM classes.
|
|
48
|
+
|
|
49
|
+
**Fixes.** Controls that invented results ask the host instead: `NiceIntegrationHub`,
|
|
50
|
+
`NiceMLStudio` (`onExperimentRun` may return metrics), `NiceRemoteManagement`
|
|
51
|
+
(`onCaptureScreenshot`), `NicePoseDetector` (`detector`), `NiceBatchScannerProvider`,
|
|
52
|
+
`NiceCacheStrategies`; `NiceLowCodeStudio` accepts dropped components. Controls that did nothing
|
|
53
|
+
work or say why they are off: `NiceStreamDashboard` adds sources, sends chat and runs the chosen
|
|
54
|
+
transition (new `onAddPlatform`, `onSendChatMessage`, `onTransition`, `onScreenshot`,
|
|
55
|
+
`onOpenAudioMixer`, `onOpenSettings`; `receiveChatMessage` feeds incoming chat), `NiceMLStudio`
|
|
56
|
+
downloads through `onModelDownload`, `NiceETLBuilder` saves through `onSave` (its Save button had
|
|
57
|
+
no handler), `NiceTranscoder` makes jobs of picked and dropped files, `NiceAutomationEditor` offers
|
|
58
|
+
the trigger types its model has. Texts of about fifty components go
|
|
59
|
+
through `t()` in six languages, among them the AI data grid, chart and form builders, the ML
|
|
60
|
+
studio, the report designer, the song picker, `NiceProtocolConfig`, `NiceETLBuilder` and
|
|
61
|
+
`NiceInlineHelp` — every key the controls pass to `t()` now has a dictionary entry, so none of
|
|
62
|
+
them stays English under another language; `NiceDataGridAI` sorts on a query in any language, not
|
|
63
|
+
only in English. `NiceWindow`, `NiceConsole`, `NiceFileManager` and `NiceGitManager` no longer
|
|
64
|
+
crash when `accessMode` switches to or from `'hidden'`. Ids come from `createId()` (`@nice2dev/ui-core`), so nothing throws
|
|
65
|
+
outside a secure context as `crypto.randomUUID()` did on plain http. `ui-3d` runs on three r183
|
|
66
|
+
without its deprecation warnings. `NiceRemoteManagement` calls the handlers of the latest render.
|
|
67
|
+
The AI hint popover and the `ui-platform` panels follow the app theme, not the system's or a
|
|
68
|
+
`.dark` class on the host. `NiceCommandPalette` has styles and its search filters;
|
|
69
|
+
`NiceTimeoutFeedback` starts its clock; `NiceOfflineBanner` takes `online`; Monaco's workers in
|
|
70
|
+
`NiceCodeEditor` load; the `ui-audio` panels that used Bootstrap classes use Nice controls; colours
|
|
71
|
+
that reached a canvas as `var(…)` (karaoke lanes and notes) are resolved first.
|
|
72
|
+
|
|
3
73
|
## 1.1.10
|
|
4
74
|
|
|
5
75
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -147,20 +147,20 @@ This library is **backend-agnostic**. All API-dependent operations are exposed a
|
|
|
147
147
|
|
|
148
148
|
> All controls are also exported `Nice*`-prefixed (e.g. `NiceWaveform`); the unprefixed names are kept for backward compatibility.
|
|
149
149
|
|
|
150
|
-
| Module | Components
|
|
151
|
-
| --------------------- |
|
|
152
|
-
| **DAW Studio** | `NiceAudioStudio` (turnkey multi-track workspace)
|
|
153
|
-
| **Editor** | `
|
|
154
|
-
| **Editor Panels** | `AutoSavePanel`, `UndoRedoPanel`, `ZoomSnapControls`, `MasterFXPanel`, `RecordingOptionsPanel`, `
|
|
155
|
-
| **Karaoke** | `NiceKaraokeManager` (orchestrator), `
|
|
156
|
-
| **Karaoke — songs** | `NiceKaraokeSongBrowser`, `NiceKaraokeUploader` (`parseUltraStarText`), `NiceMusicLibraryExplorer`
|
|
157
|
-
| **Karaoke — session** | `NiceKaraokeSetupPanel`, `NiceKaraokeSessionJoin`, `NiceKaraokeSelectionMode` (`useCanPickSong`), `NiceLatencyCalibrator`
|
|
158
|
-
| **Karaoke Editor** | `
|
|
159
|
-
| **Player** | `
|
|
160
|
-
| **Input / FX** | `NiceAudioInputPicker`, `NiceVocalEffectsRack`, `NiceAudioEffectsRack`
|
|
161
|
-
| **Visualizer** | `
|
|
162
|
-
| **Playlist** | `
|
|
163
|
-
| **Effects** | `
|
|
150
|
+
| Module | Components |
|
|
151
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
152
|
+
| **DAW Studio** | `NiceAudioStudio` (turnkey multi-track workspace) |
|
|
153
|
+
| **Editor** | `NiceWaveform`, `PianoRoll`, `NiceCCLane`, `NiceAudioTimeline` |
|
|
154
|
+
| **Editor Panels** | `AutoSavePanel`, `UndoRedoPanel`, `ZoomSnapControls`, `MasterFXPanel`, `RecordingOptionsPanel`, `NiceCCAutomationLaneEditor`, `NiceArpeggiatorPanel`, `NiceLFOPanel`, `NiceStepSequencerPanel` |
|
|
155
|
+
| **Karaoke** | `NiceKaraokeManager` (orchestrator), `NiceKaraokeLyrics`, `NiceKaraokeTimeline`, `NiceBarFillEditor`, `NiceAudioPitchAnalyzer`, `NiceKaraokeSummaryOverlay`, `NiceVocalPerformanceReport`, `NicePadKaraokeOverlay` |
|
|
156
|
+
| **Karaoke — songs** | `NiceKaraokeSongBrowser`, `NiceKaraokeUploader` (`parseUltraStarText`), `NiceMusicLibraryExplorer` |
|
|
157
|
+
| **Karaoke — session** | `NiceKaraokeSetupPanel`, `NiceKaraokeSessionJoin`, `NiceKaraokeSelectionMode` (`useCanPickSong`), `NiceLatencyCalibrator` |
|
|
158
|
+
| **Karaoke Editor** | `NiceKaraokeEditorManager`, `NiceKaraokePhaserRenderer` |
|
|
159
|
+
| **Player** | `NiceGenericPlayer`, `NiceGenericPlayerControls`, `NiceGenericPlayerStage`, `NiceYouTubePlayer` |
|
|
160
|
+
| **Input / FX** | `NiceAudioInputPicker`, `NiceVocalEffectsRack`, `NiceAudioEffectsRack` |
|
|
161
|
+
| **Visualizer** | `NiceStageVisualizer`, `NiceModeSwitcher` |
|
|
162
|
+
| **Playlist** | `NiceGenericPlaylist`, `GenericPlaylistItem`, `NicePlaylistTagEditor`, `NiceDynamicRuleEditor`, `NicePlaylistDualPane`, `NicePlaylistBrowser`, `PlaylistList`, `NicePlaylistSidebar` |
|
|
163
|
+
| **Effects** | `NiceNoteRiver`, `NiceNoteParticles` |
|
|
164
164
|
|
|
165
165
|
### Hooks
|
|
166
166
|
|
|
@@ -213,12 +213,6 @@ This package ships unstyled component logic. Import the shared CSS bundle once a
|
|
|
213
213
|
import '@nice2dev/ui/style.css';
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
-
Optional: opt into the legacy shorthand token aliases (`--bg-*`, `--text-*`, `--border-*`, ...) when migrating from a custom design-token system:
|
|
217
|
-
|
|
218
|
-
```tsx
|
|
219
|
-
import '@nice2dev/ui/css/legacy-bg-text-aliases.css';
|
|
220
|
-
```
|
|
221
|
-
|
|
222
216
|
## License
|
|
223
217
|
|
|
224
218
|
MIT © NiceToDev
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){"use strict";function k(t){return t>=.95?"Perfect":t>=.8?"Great":t>=.6?"Good":t>=.4?"OK":t>=.2?"Bad":"Awful"}function O(t){return t>=50?3:t>=30?2.5:t>=20?2:t>=10?1.5:1}function V(t,s,n){const{semitoneTolerance:c,preWindow:r,postExtra:a}=n,S=n.segMs??.25,w=typeof n.completionBonusFactor=="number"?n.completionBonusFactor:.15,H=typeof n.goldFullBonusFactor=="number"?n.goldFullBonusFactor:.3,N=typeof n.difficultyMult=="number"?n.difficultyMult:1,G=!!n.disableGoldNotes;let v=0,z=0,A=0;const W=[];let u=0,E=0,T=0;const B=new Map;t.forEach((o,h)=>{const d=o.startTime,Q=o.startTime+o.duration,U=d-r,X=Q+a,K=s.filter(e=>e.t>=U&&e.t<=X&&e.hz>0);if(!K||K.length===0)return;const m=Math.max(1,Math.ceil((o.duration||.25)/S)),Y=Math.max(10,Math.round(100*(o.duration||1))),Z=Math.max(1,Math.round(Y/m));let x=0;const y=[];for(let e=0;e<m;e++){const M=d+e*(o.duration/m),F=d+(e+1)*(o.duration/m),R=Math.min(.06,o.duration/m*.2),f=M-R,g=F+R,i=s.filter(l=>l.t>=f&&l.t<=g&&l.hz>0);if(!i||i.length===0)continue;let L=0;i.forEach(l=>{const ot=12*Math.log2(l.hz/440)+69,nt=Math.abs(ot-o.pitch);L+=nt});const $=L/i.length;let b=0;if(c<=0)b=$===0?1:0;else{const l=c*2;b=Math.max(0,1-Math.min($/l,1))}if(b<=0)continue;const tt=!G&&o.isGold?2:1,p=Math.round(Z*tt*b);p>0&&(v+=p,x+=p,y.push({segIndex:e,frac:b,add:p,segStart:f,segEnd:g,visualStart:M,visualEnd:F}))}const P=o.line??0;B.has(P)||B.set(P,{total:0,hit:0,comboBonus:0});const C=B.get(P);if(C.total++,x>0){u++,u>E&&(E=u),C.hit++;const e=O(u),M=e>1?Math.round(x*(e-1)):0;T+=M,C.comboBonus+=M;const F=Math.max(1,Math.ceil((o.duration||.25)/S)),f=y.length>=F,g=f?Math.round(Math.max(10,Math.round(100*(o.duration||1)))*w*(!G&&o.isGold?1.5:1)*N):0,i=f&&!G&&o.isGold?Math.round(Math.max(10,Math.round(100*(o.duration||1)))*H*N):0;z+=g,A+=i,W.push({noteKey:`${o.line??0}-${o.idx??0}`,segments:y,totalAdded:x,completed:f,completionBonus:g,goldFullBonus:i})}else u=0});const D=[];for(const[o,h]of B.entries()){const d=h.total>0?h.hit/h.total:0;D.push({verseIndex:o,hitFraction:d,label:k(d),comboBonus:h.comboBonus})}const J={maxCombo:E,currentCombo:u,totalComboBonus:T},I=T+z+A;return{classicScore:v,bonusScore:I,totalScore:v+I,perNote:W,combo:J,verseRatings:D}}function _(t,s){let n=0;for(const c of t){const r=Math.max(10,Math.round(100*(c.duration||1))),a=!s&&c.isGold?2:1;n+=r*a}return n}function j(t,s){return s<=0?0:Math.min(1e4,Math.round(t/s*1e4))}function q(t,s,n){const c=_(s,n);if(c<=0)return{...t,classicScore:0,bonusScore:0,totalScore:0};const r=j(t.classicScore,c),a=Math.round(t.bonusScore/c*1e4);return{...t,classicScore:r,bonusScore:a,totalScore:r+a}}self.onmessage=t=>{const{id:s,notes:n,points:c,params:r}=t.data,a=V(n,c,r),S=q(a,n,r.disableGoldNotes),w={id:s,result:S};self.postMessage(w)}})();
|
package/dist/core/i18n.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface NiceI18nProviderProps {
|
|
|
4
4
|
t: NiceTranslateFn;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
+
/** Overrides the app's global translator for the audio controls below it. */
|
|
7
8
|
export declare const NiceI18nProvider: React.FC<NiceI18nProviderProps>;
|
|
8
9
|
export declare function useNiceTranslation(): {
|
|
9
10
|
t: NiceTranslateFn;
|
package/dist/dmx/DmxEditor.d.ts
CHANGED
|
@@ -7,18 +7,8 @@ export interface DmxEditorProps {
|
|
|
7
7
|
pollInterval?: number;
|
|
8
8
|
className?: string;
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
|
-
/** Optional precomputed channel list (standalone usage without a service). */
|
|
11
|
-
channels?: Array<{
|
|
12
|
-
id: number;
|
|
13
|
-
name?: string;
|
|
14
|
-
value: number;
|
|
15
|
-
}>;
|
|
16
|
-
/** Optional callback when a channel value changes (standalone usage). */
|
|
17
|
-
onChannelChange?: (channelId: number, value: number) => void;
|
|
18
|
-
/** Optional fixtures (informational). */
|
|
19
|
-
fixtures?: unknown[];
|
|
20
10
|
/** Optional "?" guided tour. Off by default; `true` uses the built-in tour. */
|
|
21
11
|
tutorial?: import('@nice2dev/ui-core').NiceComponentTutorial;
|
|
22
12
|
}
|
|
23
|
-
export declare function DmxEditor({ service,
|
|
13
|
+
export declare function DmxEditor({ service, ...rest }: DmxEditorProps): React.JSX.Element;
|
|
24
14
|
export default DmxEditor;
|
|
@@ -13,16 +13,6 @@ interface Props {
|
|
|
13
13
|
automation?: UseCCAutomation;
|
|
14
14
|
/** Change the active CC number */
|
|
15
15
|
onChangeCCNumber?: (cc: number) => void;
|
|
16
|
-
/** Optional precomputed automation points used in standalone/demo usage. */
|
|
17
|
-
points?: Array<{
|
|
18
|
-
time: number;
|
|
19
|
-
value: number;
|
|
20
|
-
}>;
|
|
21
|
-
/** Optional callback invoked with new automation points (alias of writing through `automation`). */
|
|
22
|
-
onChange?: (points: Array<{
|
|
23
|
-
time: number;
|
|
24
|
-
value: number;
|
|
25
|
-
}>) => void;
|
|
26
16
|
}
|
|
27
17
|
declare const CCAutomationLaneEditor: React.FC<Props>;
|
|
28
18
|
export default CCAutomationLaneEditor;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { UseStepSequencerResult } from '../../hooks/useStepSequencer';
|
|
3
3
|
interface Props {
|
|
4
|
+
/** The sequencer to edit — `useStepSequencer()`. Without it the panel shows a placeholder. */
|
|
4
5
|
seq?: UseStepSequencerResult;
|
|
5
|
-
/** Optional standalone props (used when no `seq` hook is provided). */
|
|
6
|
-
steps?: number;
|
|
7
|
-
tracks?: string[];
|
|
8
|
-
bpm?: number;
|
|
9
|
-
pattern?: unknown;
|
|
10
|
-
onChange?: (pattern: unknown) => void;
|
|
11
6
|
}
|
|
12
7
|
declare const StepSequencerPanel: React.FC<Props>;
|
|
13
8
|
export default StepSequencerPanel;
|