@waveform-playlist/browser 9.2.1 → 9.3.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.ts CHANGED
@@ -296,6 +296,18 @@ declare interface ClipCollisionOptions {
296
296
  samplesPerPixel: number;
297
297
  }
298
298
 
299
+ export declare const ClipInteractionProvider: default_2.FC<ClipInteractionProviderProps>;
300
+
301
+ export declare interface ClipInteractionProviderProps {
302
+ /** Enable snap-to-grid for clip moves and boundary trims. When true,
303
+ * auto-detects beats snapping from BeatsAndBarsProvider context
304
+ * (if present with scaleMode="beats" and snapTo!="off"), otherwise
305
+ * falls back to timescale-based snapping. Default: false. */
306
+ snap?: boolean;
307
+ touchOptimized?: boolean;
308
+ children: default_2.ReactNode;
309
+ }
310
+
299
311
  declare interface ClipPeaks {
300
312
  clipId: string;
301
313
  trackName: string;
@@ -1081,6 +1093,7 @@ declare interface PlaylistDataContextValue {
1081
1093
  /** Ref set by useClipDragHandlers during boundary trim drags.
1082
1094
  * When true, loadAudio skips engine rebuild — visual updates flow via React state only. */
1083
1095
  isDraggingRef: default_2.MutableRefObject<boolean>;
1096
+ onTracksChange: ((tracks: ClipTrack[]) => void) | undefined;
1084
1097
  }
1085
1098
 
1086
1099
  declare interface PlaylistStateContextValue {
@@ -1205,7 +1218,7 @@ declare interface SnapToGridBeatsOptions {
1205
1218
  *
1206
1219
  * Two modes:
1207
1220
  * - "beats": Snaps to beat/bar grid using PPQN tick space for exact musical timing.
1208
- * - "temporal": Snaps to a sample-based grid derived from timescale markers.
1221
+ * - "timescale": Snaps to a sample-based grid derived from timescale markers.
1209
1222
  *
1210
1223
  * Designed to compose with ClipCollisionModifier — snap first,
1211
1224
  * then collision constrains the snapped position.
@@ -1215,13 +1228,13 @@ export declare class SnapToGridModifier extends Modifier<DragDropManager<any, an
1215
1228
  x: number;
1216
1229
  y: number;
1217
1230
  };
1218
- static configure: (options: SnapToGridBeatsOptions | SnapToGridTemporalOptions) => PluginDescriptor<any, any, typeof SnapToGridModifier>;
1231
+ static configure: (options: SnapToGridBeatsOptions | SnapToGridTimescaleOptions) => PluginDescriptor<any, any, typeof SnapToGridModifier>;
1219
1232
  }
1220
1233
 
1221
- declare type SnapToGridOptions = SnapToGridBeatsOptions | SnapToGridTemporalOptions;
1234
+ declare type SnapToGridOptions = SnapToGridBeatsOptions | SnapToGridTimescaleOptions;
1222
1235
 
1223
- declare interface SnapToGridTemporalOptions {
1224
- mode: 'temporal';
1236
+ declare interface SnapToGridTimescaleOptions {
1237
+ mode: 'timescale';
1225
1238
  gridSamples: number;
1226
1239
  samplesPerPixel: number;
1227
1240
  }
@@ -1756,6 +1769,8 @@ declare interface UseClipDragHandlersOptions {
1756
1769
  snapSamplePosition?: (samplePosition: number) => number;
1757
1770
  }
1758
1771
 
1772
+ export declare function useClipInteractionEnabled(): boolean;
1773
+
1759
1774
  /**
1760
1775
  * Hook for splitting clips at the playhead or at a specific time
1761
1776
  *