@waveform-playlist/browser 11.0.1 → 11.1.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 +11 -20
- package/dist/index.d.ts +11 -20
- package/dist/index.js +449 -397
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +327 -275
- 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;
|
|
@@ -687,16 +693,6 @@ interface UseClipSplittingResult {
|
|
|
687
693
|
*/
|
|
688
694
|
declare const useClipSplitting: (options: UseClipSplittingOptions) => UseClipSplittingResult;
|
|
689
695
|
|
|
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
696
|
interface UseKeyboardShortcutsOptions {
|
|
701
697
|
shortcuts: KeyboardShortcut[];
|
|
702
698
|
enabled?: boolean;
|
|
@@ -727,13 +723,6 @@ interface UseKeyboardShortcutsOptions {
|
|
|
727
723
|
* ```
|
|
728
724
|
*/
|
|
729
725
|
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
726
|
|
|
738
727
|
interface UsePlaybackShortcutsOptions {
|
|
739
728
|
/**
|
|
@@ -1537,6 +1526,8 @@ interface KeyboardShortcutsProps {
|
|
|
1537
1526
|
clipSplitting?: boolean;
|
|
1538
1527
|
/** Enable annotation keyboard controls (arrow nav, boundary editing). Defaults to false. */
|
|
1539
1528
|
annotations?: boolean;
|
|
1529
|
+
/** Enable undo/redo shortcuts (Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z). Defaults to false. */
|
|
1530
|
+
undo?: boolean;
|
|
1540
1531
|
/** Additional shortcuts appended to the defaults. */
|
|
1541
1532
|
additionalShortcuts?: KeyboardShortcut[];
|
|
1542
1533
|
}
|
|
@@ -1816,4 +1807,4 @@ declare function getWaveformDataMetadata(src: string): Promise<{
|
|
|
1816
1807
|
bits: 8 | 16;
|
|
1817
1808
|
}>;
|
|
1818
1809
|
|
|
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,
|
|
1810
|
+
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;
|
|
@@ -687,16 +693,6 @@ interface UseClipSplittingResult {
|
|
|
687
693
|
*/
|
|
688
694
|
declare const useClipSplitting: (options: UseClipSplittingOptions) => UseClipSplittingResult;
|
|
689
695
|
|
|
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
696
|
interface UseKeyboardShortcutsOptions {
|
|
701
697
|
shortcuts: KeyboardShortcut[];
|
|
702
698
|
enabled?: boolean;
|
|
@@ -727,13 +723,6 @@ interface UseKeyboardShortcutsOptions {
|
|
|
727
723
|
* ```
|
|
728
724
|
*/
|
|
729
725
|
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
726
|
|
|
738
727
|
interface UsePlaybackShortcutsOptions {
|
|
739
728
|
/**
|
|
@@ -1537,6 +1526,8 @@ interface KeyboardShortcutsProps {
|
|
|
1537
1526
|
clipSplitting?: boolean;
|
|
1538
1527
|
/** Enable annotation keyboard controls (arrow nav, boundary editing). Defaults to false. */
|
|
1539
1528
|
annotations?: boolean;
|
|
1529
|
+
/** Enable undo/redo shortcuts (Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z). Defaults to false. */
|
|
1530
|
+
undo?: boolean;
|
|
1540
1531
|
/** Additional shortcuts appended to the defaults. */
|
|
1541
1532
|
additionalShortcuts?: KeyboardShortcut[];
|
|
1542
1533
|
}
|
|
@@ -1816,4 +1807,4 @@ declare function getWaveformDataMetadata(src: string): Promise<{
|
|
|
1816
1807
|
bits: 8 | 16;
|
|
1817
1808
|
}>;
|
|
1818
1809
|
|
|
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,
|
|
1810
|
+
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 };
|