@waveform-playlist/browser 5.0.0-alpha.2 → 5.0.0-alpha.4
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.ts +59 -10
- package/dist/index.js +98 -96
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4117 -4089
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ declare interface AnnotationData {
|
|
|
65
65
|
* to avoid floating-point precision errors. Convert to seconds only when
|
|
66
66
|
* needed for playback using: seconds = samples / sampleRate
|
|
67
67
|
*/
|
|
68
|
-
declare interface AudioClip {
|
|
68
|
+
export declare interface AudioClip {
|
|
69
69
|
/** Unique identifier for this clip */
|
|
70
70
|
id: string;
|
|
71
71
|
/** The audio buffer containing the audio data */
|
|
@@ -152,7 +152,7 @@ declare interface ClipPeaks {
|
|
|
152
152
|
/**
|
|
153
153
|
* Represents a track containing multiple audio clips
|
|
154
154
|
*/
|
|
155
|
-
declare interface ClipTrack {
|
|
155
|
+
export declare interface ClipTrack {
|
|
156
156
|
/** Unique identifier for this track */
|
|
157
157
|
id: string;
|
|
158
158
|
/** Display name for this track */
|
|
@@ -206,6 +206,37 @@ export declare const DownloadAnnotationsButton: default_2.FC<{
|
|
|
206
206
|
className?: string;
|
|
207
207
|
}>;
|
|
208
208
|
|
|
209
|
+
/**
|
|
210
|
+
* Hook for configuring @dnd-kit sensors for clip dragging
|
|
211
|
+
*
|
|
212
|
+
* Provides consistent drag activation behavior across all examples.
|
|
213
|
+
* Supports both desktop (immediate feedback) and mobile (delay-based) interactions.
|
|
214
|
+
*/
|
|
215
|
+
declare interface DragSensorOptions {
|
|
216
|
+
/**
|
|
217
|
+
* Enable mobile-optimized touch handling with delay-based activation.
|
|
218
|
+
* When true, uses TouchSensor with 250ms delay to distinguish drag from scroll.
|
|
219
|
+
* When false (default), uses PointerSensor with 1px activation for immediate feedback.
|
|
220
|
+
*/
|
|
221
|
+
touchOptimized?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Delay in milliseconds before touch drag activates (only when touchOptimized is true).
|
|
224
|
+
* Default: 250ms - long enough to distinguish from scroll intent
|
|
225
|
+
*/
|
|
226
|
+
touchDelay?: number;
|
|
227
|
+
/**
|
|
228
|
+
* Distance tolerance during touch delay (only when touchOptimized is true).
|
|
229
|
+
* If finger moves more than this during delay, drag is cancelled.
|
|
230
|
+
* Default: 5px - allows slight finger movement
|
|
231
|
+
*/
|
|
232
|
+
touchTolerance?: number;
|
|
233
|
+
/**
|
|
234
|
+
* Distance in pixels before mouse drag activates.
|
|
235
|
+
* Default: 1px for immediate feedback on desktop
|
|
236
|
+
*/
|
|
237
|
+
mouseDistance?: number;
|
|
238
|
+
}
|
|
239
|
+
|
|
209
240
|
/**
|
|
210
241
|
* Editable annotations checkbox that uses the playlist context
|
|
211
242
|
* Uses split contexts to avoid re-rendering during animation
|
|
@@ -328,7 +359,7 @@ export declare interface ExportWavButtonProps {
|
|
|
328
359
|
/**
|
|
329
360
|
* Simple fade configuration
|
|
330
361
|
*/
|
|
331
|
-
declare interface Fade {
|
|
362
|
+
export declare interface Fade {
|
|
332
363
|
/** Duration of the fade in seconds */
|
|
333
364
|
duration: number;
|
|
334
365
|
/** Type of fade curve (default: 'linear') */
|
|
@@ -1050,17 +1081,29 @@ declare interface UseClipSplittingResult {
|
|
|
1050
1081
|
splitClipAt: (trackIndex: number, clipIndex: number, splitTime: number) => boolean;
|
|
1051
1082
|
}
|
|
1052
1083
|
|
|
1053
|
-
/**
|
|
1054
|
-
* Hook for configuring @dnd-kit sensors for clip dragging
|
|
1055
|
-
*
|
|
1056
|
-
* Provides consistent drag activation behavior across all examples
|
|
1057
|
-
*/
|
|
1058
1084
|
/**
|
|
1059
1085
|
* Returns configured sensors for @dnd-kit drag operations
|
|
1060
1086
|
*
|
|
1061
|
-
* @
|
|
1087
|
+
* @param options - Configuration options for drag sensors
|
|
1088
|
+
* @returns Configured sensors appropriate for the interaction mode
|
|
1089
|
+
*
|
|
1090
|
+
* @example
|
|
1091
|
+
* // Desktop-optimized (default)
|
|
1092
|
+
* const sensors = useDragSensors();
|
|
1093
|
+
*
|
|
1094
|
+
* @example
|
|
1095
|
+
* // Mobile-optimized with touch delay
|
|
1096
|
+
* const sensors = useDragSensors({ touchOptimized: true });
|
|
1097
|
+
*
|
|
1098
|
+
* @example
|
|
1099
|
+
* // Custom touch settings
|
|
1100
|
+
* const sensors = useDragSensors({
|
|
1101
|
+
* touchOptimized: true,
|
|
1102
|
+
* touchDelay: 300,
|
|
1103
|
+
* touchTolerance: 8
|
|
1104
|
+
* });
|
|
1062
1105
|
*/
|
|
1063
|
-
export declare function useDragSensors(): SensorDescriptor<SensorOptions>[];
|
|
1106
|
+
export declare function useDragSensors(options?: DragSensorOptions): SensorDescriptor<SensorOptions>[];
|
|
1064
1107
|
|
|
1065
1108
|
/**
|
|
1066
1109
|
* Hook for managing a dynamic chain of audio effects with real-time parameter updates
|
|
@@ -1496,6 +1539,12 @@ export declare interface WaveformProps {
|
|
|
1496
1539
|
showClipHeaders?: boolean;
|
|
1497
1540
|
interactiveClips?: boolean;
|
|
1498
1541
|
showFades?: boolean;
|
|
1542
|
+
/**
|
|
1543
|
+
* Enable mobile-optimized touch interactions.
|
|
1544
|
+
* When true, increases touch target sizes for clip boundaries.
|
|
1545
|
+
* Use with useDragSensors({ touchOptimized: true }) for best results.
|
|
1546
|
+
*/
|
|
1547
|
+
touchOptimized?: boolean;
|
|
1499
1548
|
recordingState?: {
|
|
1500
1549
|
isRecording: boolean;
|
|
1501
1550
|
trackId: string;
|