@waveform-playlist/browser 11.0.1 → 11.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/dist/index.d.mts +15 -20
- package/dist/index.d.ts +15 -20
- package/dist/index.js +487 -405
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +366 -283
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -6,8 +6,8 @@ export { EffectsFunction, TrackEffectsFunction } from '@waveform-playlist/playou
|
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import React__default, { ReactNode, RefObject } from 'react';
|
|
8
8
|
import { PlaylistEngine, EngineState } from '@waveform-playlist/engine';
|
|
9
|
-
import { ClipTrack, AnnotationData, AnnotationAction, PeakData, Fade, MidiNoteData, WaveformDataObject, TrackEffectsFunction as TrackEffectsFunction$2, RenderMode, SpectrogramConfig, ColorMapValue, AnnotationActionOptions, RenderAnnotationItemProps, TrackSpectrogramOverrides } from '@waveform-playlist/core';
|
|
10
|
-
export { AnnotationData, AudioClip, ClipTrack, Fade } from '@waveform-playlist/core';
|
|
9
|
+
import { ClipTrack, AnnotationData, AnnotationAction, PeakData, Fade, MidiNoteData, WaveformDataObject, TrackEffectsFunction as TrackEffectsFunction$2, RenderMode, SpectrogramConfig, ColorMapValue, KeyboardShortcut, AnnotationActionOptions, RenderAnnotationItemProps, TrackSpectrogramOverrides } from '@waveform-playlist/core';
|
|
10
|
+
export { AnnotationData, AudioClip, ClipTrack, Fade, getShortcutLabel } from '@waveform-playlist/core';
|
|
11
11
|
import { WaveformPlaylistTheme, TimeFormat, RenderPlayheadFunction, TrackMenuItem, SnapTo } from '@waveform-playlist/ui-components';
|
|
12
12
|
export { TimeFormat } from '@waveform-playlist/ui-components';
|
|
13
13
|
import { FadeConfig, MediaElementPlayout } from '@waveform-playlist/media-element-playout';
|
|
@@ -65,6 +65,10 @@ interface PlaylistStateContextValue {
|
|
|
65
65
|
loopEnd: number;
|
|
66
66
|
/** Whether playback continues past the end of loaded audio */
|
|
67
67
|
indefinitePlayback: boolean;
|
|
68
|
+
/** Whether undo is available */
|
|
69
|
+
canUndo: boolean;
|
|
70
|
+
/** Whether redo is available */
|
|
71
|
+
canRedo: boolean;
|
|
68
72
|
}
|
|
69
73
|
interface PlaylistControlsContextValue {
|
|
70
74
|
play: (startTime?: number, playDuration?: number) => Promise<void>;
|
|
@@ -95,6 +99,8 @@ interface PlaylistControlsContextValue {
|
|
|
95
99
|
setLoopRegion: (start: number, end: number) => void;
|
|
96
100
|
setLoopRegionFromSelection: () => void;
|
|
97
101
|
clearLoopRegion: () => void;
|
|
102
|
+
undo: () => void;
|
|
103
|
+
redo: () => void;
|
|
98
104
|
}
|
|
99
105
|
interface PlaylistDataContextValue {
|
|
100
106
|
duration: number;
|
|
@@ -180,6 +186,10 @@ interface WaveformPlaylistProviderProps {
|
|
|
180
186
|
/** Disable automatic stop when the cursor reaches the end of the longest
|
|
181
187
|
* track. Useful for DAW-style recording beyond existing audio. */
|
|
182
188
|
indefinitePlayback?: boolean;
|
|
189
|
+
/** Desired AudioContext sample rate. Creates a cross-browser AudioContext at
|
|
190
|
+
* this rate via standardized-audio-context. Pre-computed peaks (.dat files)
|
|
191
|
+
* render instantly when they match. On mismatch, falls back to worker. */
|
|
192
|
+
sampleRate?: number;
|
|
183
193
|
children: ReactNode;
|
|
184
194
|
}
|
|
185
195
|
declare const WaveformPlaylistProvider: React__default.FC<WaveformPlaylistProviderProps>;
|
|
@@ -687,16 +697,6 @@ interface UseClipSplittingResult {
|
|
|
687
697
|
*/
|
|
688
698
|
declare const useClipSplitting: (options: UseClipSplittingOptions) => UseClipSplittingResult;
|
|
689
699
|
|
|
690
|
-
interface KeyboardShortcut {
|
|
691
|
-
key: string;
|
|
692
|
-
ctrlKey?: boolean;
|
|
693
|
-
shiftKey?: boolean;
|
|
694
|
-
metaKey?: boolean;
|
|
695
|
-
altKey?: boolean;
|
|
696
|
-
action: () => void;
|
|
697
|
-
description?: string;
|
|
698
|
-
preventDefault?: boolean;
|
|
699
|
-
}
|
|
700
700
|
interface UseKeyboardShortcutsOptions {
|
|
701
701
|
shortcuts: KeyboardShortcut[];
|
|
702
702
|
enabled?: boolean;
|
|
@@ -727,13 +727,6 @@ interface UseKeyboardShortcutsOptions {
|
|
|
727
727
|
* ```
|
|
728
728
|
*/
|
|
729
729
|
declare const useKeyboardShortcuts: (options: UseKeyboardShortcutsOptions) => void;
|
|
730
|
-
/**
|
|
731
|
-
* Get a human-readable string representation of a keyboard shortcut
|
|
732
|
-
*
|
|
733
|
-
* @param shortcut - The keyboard shortcut
|
|
734
|
-
* @returns Human-readable string (e.g., "Cmd+Shift+S")
|
|
735
|
-
*/
|
|
736
|
-
declare const getShortcutLabel: (shortcut: KeyboardShortcut) => string;
|
|
737
730
|
|
|
738
731
|
interface UsePlaybackShortcutsOptions {
|
|
739
732
|
/**
|
|
@@ -1537,6 +1530,8 @@ interface KeyboardShortcutsProps {
|
|
|
1537
1530
|
clipSplitting?: boolean;
|
|
1538
1531
|
/** Enable annotation keyboard controls (arrow nav, boundary editing). Defaults to false. */
|
|
1539
1532
|
annotations?: boolean;
|
|
1533
|
+
/** Enable undo/redo shortcuts (Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z). Defaults to false. */
|
|
1534
|
+
undo?: boolean;
|
|
1540
1535
|
/** Additional shortcuts appended to the defaults. */
|
|
1541
1536
|
additionalShortcuts?: KeyboardShortcut[];
|
|
1542
1537
|
}
|
|
@@ -1816,4 +1811,4 @@ declare function getWaveformDataMetadata(src: string): Promise<{
|
|
|
1816
1811
|
bits: 8 | 16;
|
|
1817
1812
|
}>;
|
|
1818
1813
|
|
|
1819
|
-
export { type ActiveEffect, type AnnotationIntegration, AnnotationIntegrationProvider, AudioPosition, type AudioTrackConfig, AutomaticScrollCheckbox, ClearAllButton, type ClearAllButtonProps, ClipCollisionModifier, ClipInteractionProvider, type ClipInteractionProviderProps, ContinuousPlayCheckbox, DownloadAnnotationsButton, EditableCheckbox, type EffectDefinition, type EffectInstance, type EffectParameter, type ExportOptions, type ExportResult, ExportWavButton, type ExportWavButtonProps, FastForwardButton, type GetAnnotationBoxLabelFn, KeyboardShortcuts, type KeyboardShortcutsProps, LinkEndpointsCheckbox, LoopButton, MasterVolumeControl, type MasterVolumeControls, type MediaElementAnimationContextValue, MediaElementAnnotationList, type MediaElementAnnotationListProps, type MediaElementControlsContextValue, type MediaElementDataContextValue, MediaElementPlaylist, type MediaElementPlaylistProps, MediaElementPlaylistProvider, type MediaElementStateContextValue, type MediaElementTrackConfig, MediaElementWaveform, type MediaElementWaveformProps, type OnAnnotationUpdateFn, type ParameterType, PauseButton, PlayButton, PlaylistAnnotationList, type PlaylistAnnotationListProps, PlaylistVisualization, type PlaylistVisualizationProps, RewindButton, SelectionTimeInputs, SetLoopRegionButton, SkipBackwardButton, SkipForwardButton, SnapToGridModifier, type SpectrogramIntegration, SpectrogramIntegrationProvider, StopButton, type TimeFormatControls, TimeFormatSelect, type TrackActiveEffect, type TrackEffectsState, type TrackLoadError, type TrackSource, type TrackState$1 as TrackState, type UseDynamicEffectsReturn, type UseDynamicTracksReturn, type UseExportWavReturn, type UseOutputMeterOptions, type UseOutputMeterReturn, type UsePlaybackShortcutsOptions, type UsePlaybackShortcutsReturn, type UseTrackDynamicEffectsReturn, Waveform, WaveformPlaylistProvider, type WaveformProps, type WaveformTrack, type ZoomControls, ZoomInButton, ZoomOutButton, createEffectChain, createEffectInstance, effectCategories, effectDefinitions, getEffectDefinition, getEffectsByCategory,
|
|
1814
|
+
export { type ActiveEffect, type AnnotationIntegration, AnnotationIntegrationProvider, AudioPosition, type AudioTrackConfig, AutomaticScrollCheckbox, ClearAllButton, type ClearAllButtonProps, ClipCollisionModifier, ClipInteractionProvider, type ClipInteractionProviderProps, ContinuousPlayCheckbox, DownloadAnnotationsButton, EditableCheckbox, type EffectDefinition, type EffectInstance, type EffectParameter, type ExportOptions, type ExportResult, ExportWavButton, type ExportWavButtonProps, FastForwardButton, type GetAnnotationBoxLabelFn, KeyboardShortcuts, type KeyboardShortcutsProps, LinkEndpointsCheckbox, LoopButton, MasterVolumeControl, type MasterVolumeControls, type MediaElementAnimationContextValue, MediaElementAnnotationList, type MediaElementAnnotationListProps, type MediaElementControlsContextValue, type MediaElementDataContextValue, MediaElementPlaylist, type MediaElementPlaylistProps, MediaElementPlaylistProvider, type MediaElementStateContextValue, type MediaElementTrackConfig, MediaElementWaveform, type MediaElementWaveformProps, type OnAnnotationUpdateFn, type ParameterType, PauseButton, PlayButton, PlaylistAnnotationList, type PlaylistAnnotationListProps, PlaylistVisualization, type PlaylistVisualizationProps, RewindButton, SelectionTimeInputs, SetLoopRegionButton, SkipBackwardButton, SkipForwardButton, SnapToGridModifier, type SpectrogramIntegration, SpectrogramIntegrationProvider, StopButton, type TimeFormatControls, TimeFormatSelect, type TrackActiveEffect, type TrackEffectsState, type TrackLoadError, type TrackSource, type TrackState$1 as TrackState, type UseDynamicEffectsReturn, type UseDynamicTracksReturn, type UseExportWavReturn, type UseOutputMeterOptions, type UseOutputMeterReturn, type UsePlaybackShortcutsOptions, type UsePlaybackShortcutsReturn, type UseTrackDynamicEffectsReturn, Waveform, WaveformPlaylistProvider, type WaveformProps, type WaveformTrack, type ZoomControls, ZoomInButton, ZoomOutButton, createEffectChain, createEffectInstance, effectCategories, effectDefinitions, getEffectDefinition, getEffectsByCategory, getWaveformDataMetadata, loadPeaksFromWaveformData, loadWaveformData, noDropAnimationPlugins, useAnnotationDragHandlers, useAnnotationIntegration, useAnnotationKeyboardControls, useAudioTracks, useClipDragHandlers, useClipInteractionEnabled, useClipSplitting, useDragSensors, useDynamicEffects, useDynamicTracks, useExportWav, useKeyboardShortcuts, useMasterAnalyser, useMasterVolume, useMediaElementAnimation, useMediaElementControls, useMediaElementData, useMediaElementState, useOutputMeter, usePlaybackAnimation, usePlaybackShortcuts, usePlaylistControls, usePlaylistData, usePlaylistState, useSpectrogramIntegration, useTimeFormat, useTrackDynamicEffects, useZoomControls, waveformDataToPeaks };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export { EffectsFunction, TrackEffectsFunction } from '@waveform-playlist/playou
|
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import React__default, { ReactNode, RefObject } from 'react';
|
|
8
8
|
import { PlaylistEngine, EngineState } from '@waveform-playlist/engine';
|
|
9
|
-
import { ClipTrack, AnnotationData, AnnotationAction, PeakData, Fade, MidiNoteData, WaveformDataObject, TrackEffectsFunction as TrackEffectsFunction$2, RenderMode, SpectrogramConfig, ColorMapValue, AnnotationActionOptions, RenderAnnotationItemProps, TrackSpectrogramOverrides } from '@waveform-playlist/core';
|
|
10
|
-
export { AnnotationData, AudioClip, ClipTrack, Fade } from '@waveform-playlist/core';
|
|
9
|
+
import { ClipTrack, AnnotationData, AnnotationAction, PeakData, Fade, MidiNoteData, WaveformDataObject, TrackEffectsFunction as TrackEffectsFunction$2, RenderMode, SpectrogramConfig, ColorMapValue, KeyboardShortcut, AnnotationActionOptions, RenderAnnotationItemProps, TrackSpectrogramOverrides } from '@waveform-playlist/core';
|
|
10
|
+
export { AnnotationData, AudioClip, ClipTrack, Fade, getShortcutLabel } from '@waveform-playlist/core';
|
|
11
11
|
import { WaveformPlaylistTheme, TimeFormat, RenderPlayheadFunction, TrackMenuItem, SnapTo } from '@waveform-playlist/ui-components';
|
|
12
12
|
export { TimeFormat } from '@waveform-playlist/ui-components';
|
|
13
13
|
import { FadeConfig, MediaElementPlayout } from '@waveform-playlist/media-element-playout';
|
|
@@ -65,6 +65,10 @@ interface PlaylistStateContextValue {
|
|
|
65
65
|
loopEnd: number;
|
|
66
66
|
/** Whether playback continues past the end of loaded audio */
|
|
67
67
|
indefinitePlayback: boolean;
|
|
68
|
+
/** Whether undo is available */
|
|
69
|
+
canUndo: boolean;
|
|
70
|
+
/** Whether redo is available */
|
|
71
|
+
canRedo: boolean;
|
|
68
72
|
}
|
|
69
73
|
interface PlaylistControlsContextValue {
|
|
70
74
|
play: (startTime?: number, playDuration?: number) => Promise<void>;
|
|
@@ -95,6 +99,8 @@ interface PlaylistControlsContextValue {
|
|
|
95
99
|
setLoopRegion: (start: number, end: number) => void;
|
|
96
100
|
setLoopRegionFromSelection: () => void;
|
|
97
101
|
clearLoopRegion: () => void;
|
|
102
|
+
undo: () => void;
|
|
103
|
+
redo: () => void;
|
|
98
104
|
}
|
|
99
105
|
interface PlaylistDataContextValue {
|
|
100
106
|
duration: number;
|
|
@@ -180,6 +186,10 @@ interface WaveformPlaylistProviderProps {
|
|
|
180
186
|
/** Disable automatic stop when the cursor reaches the end of the longest
|
|
181
187
|
* track. Useful for DAW-style recording beyond existing audio. */
|
|
182
188
|
indefinitePlayback?: boolean;
|
|
189
|
+
/** Desired AudioContext sample rate. Creates a cross-browser AudioContext at
|
|
190
|
+
* this rate via standardized-audio-context. Pre-computed peaks (.dat files)
|
|
191
|
+
* render instantly when they match. On mismatch, falls back to worker. */
|
|
192
|
+
sampleRate?: number;
|
|
183
193
|
children: ReactNode;
|
|
184
194
|
}
|
|
185
195
|
declare const WaveformPlaylistProvider: React__default.FC<WaveformPlaylistProviderProps>;
|
|
@@ -687,16 +697,6 @@ interface UseClipSplittingResult {
|
|
|
687
697
|
*/
|
|
688
698
|
declare const useClipSplitting: (options: UseClipSplittingOptions) => UseClipSplittingResult;
|
|
689
699
|
|
|
690
|
-
interface KeyboardShortcut {
|
|
691
|
-
key: string;
|
|
692
|
-
ctrlKey?: boolean;
|
|
693
|
-
shiftKey?: boolean;
|
|
694
|
-
metaKey?: boolean;
|
|
695
|
-
altKey?: boolean;
|
|
696
|
-
action: () => void;
|
|
697
|
-
description?: string;
|
|
698
|
-
preventDefault?: boolean;
|
|
699
|
-
}
|
|
700
700
|
interface UseKeyboardShortcutsOptions {
|
|
701
701
|
shortcuts: KeyboardShortcut[];
|
|
702
702
|
enabled?: boolean;
|
|
@@ -727,13 +727,6 @@ interface UseKeyboardShortcutsOptions {
|
|
|
727
727
|
* ```
|
|
728
728
|
*/
|
|
729
729
|
declare const useKeyboardShortcuts: (options: UseKeyboardShortcutsOptions) => void;
|
|
730
|
-
/**
|
|
731
|
-
* Get a human-readable string representation of a keyboard shortcut
|
|
732
|
-
*
|
|
733
|
-
* @param shortcut - The keyboard shortcut
|
|
734
|
-
* @returns Human-readable string (e.g., "Cmd+Shift+S")
|
|
735
|
-
*/
|
|
736
|
-
declare const getShortcutLabel: (shortcut: KeyboardShortcut) => string;
|
|
737
730
|
|
|
738
731
|
interface UsePlaybackShortcutsOptions {
|
|
739
732
|
/**
|
|
@@ -1537,6 +1530,8 @@ interface KeyboardShortcutsProps {
|
|
|
1537
1530
|
clipSplitting?: boolean;
|
|
1538
1531
|
/** Enable annotation keyboard controls (arrow nav, boundary editing). Defaults to false. */
|
|
1539
1532
|
annotations?: boolean;
|
|
1533
|
+
/** Enable undo/redo shortcuts (Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z). Defaults to false. */
|
|
1534
|
+
undo?: boolean;
|
|
1540
1535
|
/** Additional shortcuts appended to the defaults. */
|
|
1541
1536
|
additionalShortcuts?: KeyboardShortcut[];
|
|
1542
1537
|
}
|
|
@@ -1816,4 +1811,4 @@ declare function getWaveformDataMetadata(src: string): Promise<{
|
|
|
1816
1811
|
bits: 8 | 16;
|
|
1817
1812
|
}>;
|
|
1818
1813
|
|
|
1819
|
-
export { type ActiveEffect, type AnnotationIntegration, AnnotationIntegrationProvider, AudioPosition, type AudioTrackConfig, AutomaticScrollCheckbox, ClearAllButton, type ClearAllButtonProps, ClipCollisionModifier, ClipInteractionProvider, type ClipInteractionProviderProps, ContinuousPlayCheckbox, DownloadAnnotationsButton, EditableCheckbox, type EffectDefinition, type EffectInstance, type EffectParameter, type ExportOptions, type ExportResult, ExportWavButton, type ExportWavButtonProps, FastForwardButton, type GetAnnotationBoxLabelFn, KeyboardShortcuts, type KeyboardShortcutsProps, LinkEndpointsCheckbox, LoopButton, MasterVolumeControl, type MasterVolumeControls, type MediaElementAnimationContextValue, MediaElementAnnotationList, type MediaElementAnnotationListProps, type MediaElementControlsContextValue, type MediaElementDataContextValue, MediaElementPlaylist, type MediaElementPlaylistProps, MediaElementPlaylistProvider, type MediaElementStateContextValue, type MediaElementTrackConfig, MediaElementWaveform, type MediaElementWaveformProps, type OnAnnotationUpdateFn, type ParameterType, PauseButton, PlayButton, PlaylistAnnotationList, type PlaylistAnnotationListProps, PlaylistVisualization, type PlaylistVisualizationProps, RewindButton, SelectionTimeInputs, SetLoopRegionButton, SkipBackwardButton, SkipForwardButton, SnapToGridModifier, type SpectrogramIntegration, SpectrogramIntegrationProvider, StopButton, type TimeFormatControls, TimeFormatSelect, type TrackActiveEffect, type TrackEffectsState, type TrackLoadError, type TrackSource, type TrackState$1 as TrackState, type UseDynamicEffectsReturn, type UseDynamicTracksReturn, type UseExportWavReturn, type UseOutputMeterOptions, type UseOutputMeterReturn, type UsePlaybackShortcutsOptions, type UsePlaybackShortcutsReturn, type UseTrackDynamicEffectsReturn, Waveform, WaveformPlaylistProvider, type WaveformProps, type WaveformTrack, type ZoomControls, ZoomInButton, ZoomOutButton, createEffectChain, createEffectInstance, effectCategories, effectDefinitions, getEffectDefinition, getEffectsByCategory,
|
|
1814
|
+
export { type ActiveEffect, type AnnotationIntegration, AnnotationIntegrationProvider, AudioPosition, type AudioTrackConfig, AutomaticScrollCheckbox, ClearAllButton, type ClearAllButtonProps, ClipCollisionModifier, ClipInteractionProvider, type ClipInteractionProviderProps, ContinuousPlayCheckbox, DownloadAnnotationsButton, EditableCheckbox, type EffectDefinition, type EffectInstance, type EffectParameter, type ExportOptions, type ExportResult, ExportWavButton, type ExportWavButtonProps, FastForwardButton, type GetAnnotationBoxLabelFn, KeyboardShortcuts, type KeyboardShortcutsProps, LinkEndpointsCheckbox, LoopButton, MasterVolumeControl, type MasterVolumeControls, type MediaElementAnimationContextValue, MediaElementAnnotationList, type MediaElementAnnotationListProps, type MediaElementControlsContextValue, type MediaElementDataContextValue, MediaElementPlaylist, type MediaElementPlaylistProps, MediaElementPlaylistProvider, type MediaElementStateContextValue, type MediaElementTrackConfig, MediaElementWaveform, type MediaElementWaveformProps, type OnAnnotationUpdateFn, type ParameterType, PauseButton, PlayButton, PlaylistAnnotationList, type PlaylistAnnotationListProps, PlaylistVisualization, type PlaylistVisualizationProps, RewindButton, SelectionTimeInputs, SetLoopRegionButton, SkipBackwardButton, SkipForwardButton, SnapToGridModifier, type SpectrogramIntegration, SpectrogramIntegrationProvider, StopButton, type TimeFormatControls, TimeFormatSelect, type TrackActiveEffect, type TrackEffectsState, type TrackLoadError, type TrackSource, type TrackState$1 as TrackState, type UseDynamicEffectsReturn, type UseDynamicTracksReturn, type UseExportWavReturn, type UseOutputMeterOptions, type UseOutputMeterReturn, type UsePlaybackShortcutsOptions, type UsePlaybackShortcutsReturn, type UseTrackDynamicEffectsReturn, Waveform, WaveformPlaylistProvider, type WaveformProps, type WaveformTrack, type ZoomControls, ZoomInButton, ZoomOutButton, createEffectChain, createEffectInstance, effectCategories, effectDefinitions, getEffectDefinition, getEffectsByCategory, getWaveformDataMetadata, loadPeaksFromWaveformData, loadWaveformData, noDropAnimationPlugins, useAnnotationDragHandlers, useAnnotationIntegration, useAnnotationKeyboardControls, useAudioTracks, useClipDragHandlers, useClipInteractionEnabled, useClipSplitting, useDragSensors, useDynamicEffects, useDynamicTracks, useExportWav, useKeyboardShortcuts, useMasterAnalyser, useMasterVolume, useMediaElementAnimation, useMediaElementControls, useMediaElementData, useMediaElementState, useOutputMeter, usePlaybackAnimation, usePlaybackShortcuts, usePlaylistControls, usePlaylistData, usePlaylistState, useSpectrogramIntegration, useTimeFormat, useTrackDynamicEffects, useZoomControls, waveformDataToPeaks };
|