@waveform-playlist/ui-components 5.2.0 → 5.3.1
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 +98 -43
- package/dist/index.d.ts +98 -43
- package/dist/index.js +566 -155
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +554 -147
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { FunctionComponent, ReactNode, Dispatch, SetStateAction } from 'react';
|
|
3
3
|
import { Peaks, Bits } from '@waveform-playlist/webaudio-peaks';
|
|
4
|
-
import { Fade, FadeType } from '@waveform-playlist/core';
|
|
4
|
+
import { Fade, FadeType, SpectrogramData, RenderMode } from '@waveform-playlist/core';
|
|
5
5
|
import { DraggableAttributes } from '@dnd-kit/core';
|
|
6
6
|
import { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities';
|
|
7
7
|
import * as styled_components_dist_utils_hoist from 'styled-components/dist/utils/hoist';
|
|
@@ -415,6 +415,40 @@ interface SelectionTimeInputsProps {
|
|
|
415
415
|
}
|
|
416
416
|
declare const SelectionTimeInputs: react__default.FC<SelectionTimeInputsProps>;
|
|
417
417
|
|
|
418
|
+
interface SpectrogramWorkerCanvasApi {
|
|
419
|
+
registerCanvas(canvasId: string, canvas: OffscreenCanvas): void;
|
|
420
|
+
unregisterCanvas(canvasId: string): void;
|
|
421
|
+
}
|
|
422
|
+
interface SpectrogramChannelProps {
|
|
423
|
+
/** Channel index (0 = first, 1 = second, etc.) */
|
|
424
|
+
index: number;
|
|
425
|
+
/** Computed spectrogram data (not needed when workerApi is provided) */
|
|
426
|
+
data?: SpectrogramData;
|
|
427
|
+
/** Width in CSS pixels */
|
|
428
|
+
length: number;
|
|
429
|
+
/** Height in CSS pixels */
|
|
430
|
+
waveHeight: number;
|
|
431
|
+
/** Device pixel ratio for sharp rendering */
|
|
432
|
+
devicePixelRatio?: number;
|
|
433
|
+
/** Samples per pixel at current zoom level */
|
|
434
|
+
samplesPerPixel: number;
|
|
435
|
+
/** 256-entry RGB LUT (768 bytes) from getColorMap() */
|
|
436
|
+
colorLUT?: Uint8Array;
|
|
437
|
+
/** Frequency scale function: (freqHz, minF, maxF) => [0,1] */
|
|
438
|
+
frequencyScaleFn?: (f: number, minF: number, maxF: number) => number;
|
|
439
|
+
/** Min frequency in Hz */
|
|
440
|
+
minFrequency?: number;
|
|
441
|
+
/** Max frequency in Hz (defaults to sampleRate/2) */
|
|
442
|
+
maxFrequency?: number;
|
|
443
|
+
/** Worker API for transferring canvas ownership. When provided, rendering is done in the worker. */
|
|
444
|
+
workerApi?: SpectrogramWorkerCanvasApi;
|
|
445
|
+
/** Clip ID used to construct unique canvas IDs for worker registration */
|
|
446
|
+
clipId?: string;
|
|
447
|
+
/** Callback when canvases are registered with the worker, providing canvas IDs and widths */
|
|
448
|
+
onCanvasesReady?: (canvasIds: string[], canvasWidths: number[]) => void;
|
|
449
|
+
}
|
|
450
|
+
declare const SpectrogramChannel: FunctionComponent<SpectrogramChannelProps>;
|
|
451
|
+
|
|
418
452
|
interface SmartChannelProps {
|
|
419
453
|
className?: string;
|
|
420
454
|
index: number;
|
|
@@ -424,10 +458,55 @@ interface SmartChannelProps {
|
|
|
424
458
|
isSelected?: boolean;
|
|
425
459
|
/** If true, background is transparent (for use with external progress overlay) */
|
|
426
460
|
transparentBackground?: boolean;
|
|
461
|
+
/** Render mode: waveform, spectrogram, or both */
|
|
462
|
+
renderMode?: RenderMode;
|
|
463
|
+
/** Spectrogram data for this channel */
|
|
464
|
+
spectrogramData?: SpectrogramData;
|
|
465
|
+
/** 256-entry RGB LUT from getColorMap() */
|
|
466
|
+
spectrogramColorLUT?: Uint8Array;
|
|
467
|
+
/** Samples per pixel at current zoom level */
|
|
468
|
+
samplesPerPixel?: number;
|
|
469
|
+
/** Frequency scale function */
|
|
470
|
+
spectrogramFrequencyScaleFn?: (f: number, minF: number, maxF: number) => number;
|
|
471
|
+
/** Min frequency in Hz */
|
|
472
|
+
spectrogramMinFrequency?: number;
|
|
473
|
+
/** Max frequency in Hz */
|
|
474
|
+
spectrogramMaxFrequency?: number;
|
|
475
|
+
/** Worker API for OffscreenCanvas transfer */
|
|
476
|
+
spectrogramWorkerApi?: SpectrogramWorkerCanvasApi;
|
|
477
|
+
/** Clip ID for worker canvas registration */
|
|
478
|
+
spectrogramClipId?: string;
|
|
479
|
+
/** Callback when canvases are registered with the worker */
|
|
480
|
+
spectrogramOnCanvasesReady?: (canvasIds: string[], canvasWidths: number[]) => void;
|
|
427
481
|
}
|
|
428
482
|
declare const SmartChannel: FunctionComponent<SmartChannelProps>;
|
|
429
483
|
|
|
430
|
-
|
|
484
|
+
interface SpectrogramLabelsProps {
|
|
485
|
+
/** Height per channel in CSS pixels */
|
|
486
|
+
waveHeight: number;
|
|
487
|
+
/** Number of audio channels */
|
|
488
|
+
numChannels: number;
|
|
489
|
+
/** Frequency scale function */
|
|
490
|
+
frequencyScaleFn: (f: number, minF: number, maxF: number) => number;
|
|
491
|
+
/** Min frequency in Hz */
|
|
492
|
+
minFrequency: number;
|
|
493
|
+
/** Max frequency in Hz */
|
|
494
|
+
maxFrequency: number;
|
|
495
|
+
/** Label text color */
|
|
496
|
+
labelsColor?: string;
|
|
497
|
+
/** Label background color */
|
|
498
|
+
labelsBackground?: string;
|
|
499
|
+
/** Render mode — in "both" mode spectrogram is half height */
|
|
500
|
+
renderMode?: 'spectrogram' | 'both';
|
|
501
|
+
/** Whether clip headers are shown (adds offset) */
|
|
502
|
+
hasClipHeaders?: boolean;
|
|
503
|
+
}
|
|
504
|
+
declare const SpectrogramLabels: react__default.FC<SpectrogramLabelsProps>;
|
|
505
|
+
|
|
506
|
+
interface SmartScaleProps {
|
|
507
|
+
readonly renderTimestamp?: (timeMs: number, pixelPosition: number) => ReactNode;
|
|
508
|
+
}
|
|
509
|
+
declare const SmartScale: FunctionComponent<SmartScaleProps>;
|
|
431
510
|
|
|
432
511
|
/**
|
|
433
512
|
* Time format utilities for displaying and parsing audio timestamps
|
|
@@ -516,6 +595,12 @@ declare const Button: styled_components_dist_types.IStyledComponentBase<"web", s
|
|
|
516
595
|
|
|
517
596
|
declare const ButtonGroup: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
518
597
|
|
|
598
|
+
interface CloseButtonProps {
|
|
599
|
+
onClick: (e: react__default.MouseEvent) => void;
|
|
600
|
+
title?: string;
|
|
601
|
+
}
|
|
602
|
+
declare const CloseButton: react__default.FC<CloseButtonProps>;
|
|
603
|
+
|
|
519
604
|
declare const Controls$1: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
520
605
|
|
|
521
606
|
declare const Header: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
@@ -526,6 +611,8 @@ declare const VolumeUpIcon: react__default.FC<IconProps>;
|
|
|
526
611
|
|
|
527
612
|
declare const TrashIcon: react__default.FC<IconProps>;
|
|
528
613
|
|
|
614
|
+
declare const DotsIcon: react__default.FC<IconProps>;
|
|
615
|
+
|
|
529
616
|
/**
|
|
530
617
|
* TrackControls Slider - Compact slider for volume/pan controls
|
|
531
618
|
*
|
|
@@ -539,47 +626,15 @@ declare const Slider: styled_components_dist_types.IStyledComponentBase<"web", s
|
|
|
539
626
|
|
|
540
627
|
declare const SliderWrapper: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
541
628
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
* (mute, solo, volume, pan) plus a delete button
|
|
547
|
-
*/
|
|
548
|
-
|
|
549
|
-
interface TrackControlsWithDeleteProps {
|
|
550
|
-
trackIndex: number;
|
|
551
|
-
trackName: string;
|
|
552
|
-
muted: boolean;
|
|
553
|
-
soloed: boolean;
|
|
554
|
-
volume: number;
|
|
555
|
-
pan: number;
|
|
556
|
-
onMuteChange: (muted: boolean) => void;
|
|
557
|
-
onSoloChange: (soloed: boolean) => void;
|
|
558
|
-
onVolumeChange: (volume: number) => void;
|
|
559
|
-
onPanChange: (pan: number) => void;
|
|
560
|
-
onDelete: () => void;
|
|
629
|
+
interface TrackMenuItem {
|
|
630
|
+
id: string;
|
|
631
|
+
label?: string;
|
|
632
|
+
content: ReactNode;
|
|
561
633
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
* ```tsx
|
|
567
|
-
* <TrackControlsWithDelete
|
|
568
|
-
* trackIndex={0}
|
|
569
|
-
* trackName="Track 1"
|
|
570
|
-
* muted={false}
|
|
571
|
-
* soloed={false}
|
|
572
|
-
* volume={1.0}
|
|
573
|
-
* pan={0}
|
|
574
|
-
* onMuteChange={(muted) => console.log('mute:', muted)}
|
|
575
|
-
* onSoloChange={(soloed) => console.log('solo:', soloed)}
|
|
576
|
-
* onVolumeChange={(volume) => console.log('volume:', volume)}
|
|
577
|
-
* onPanChange={(pan) => console.log('pan:', pan)}
|
|
578
|
-
* onDelete={() => console.log('delete')}
|
|
579
|
-
* />
|
|
580
|
-
* ```
|
|
581
|
-
*/
|
|
582
|
-
declare const TrackControlsWithDelete: react__default.FC<TrackControlsWithDeleteProps>;
|
|
634
|
+
interface TrackMenuProps {
|
|
635
|
+
items: TrackMenuItem[] | ((onClose: () => void) => TrackMenuItem[]);
|
|
636
|
+
}
|
|
637
|
+
declare const TrackMenu: react__default.FC<TrackMenuProps>;
|
|
583
638
|
|
|
584
639
|
type Props$1 = {
|
|
585
640
|
children: ReactNode;
|
|
@@ -709,4 +764,4 @@ declare const BaseSlider: styled_components_dist_types.IStyledComponentBase<"web
|
|
|
709
764
|
ref?: ((instance: HTMLInputElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLInputElement> | null | undefined;
|
|
710
765
|
}>, never>, never>> & string;
|
|
711
766
|
|
|
712
|
-
export { AudioPosition, type AudioPositionProps, AutomaticScrollCheckbox, type AutomaticScrollCheckboxProps, BaseButton, BaseCheckbox, BaseCheckboxLabel, BaseCheckboxWrapper, BaseControlButton, BaseInput, BaseLabel, BaseSelect, BaseSlider, Button, ButtonGroup, CLIP_BOUNDARY_WIDTH, CLIP_BOUNDARY_WIDTH_TOUCH, CLIP_HEADER_HEIGHT, Channel, type ChannelProps, Clip, ClipBoundary, type ClipBoundaryProps, ClipHeader, ClipHeaderPresentational, type ClipHeaderPresentationalProps, type ClipHeaderProps, type ClipProps, Controls$1 as Controls, type ControlsWrapperProps, DevicePixelRatioProvider, type DragHandleProps$1 as DragHandleProps, FadeOverlay, type FadeOverlayProps, type GradientStop, Header, InlineLabel, LoopRegion, LoopRegionMarkers, type LoopRegionMarkersProps, type LoopRegionProps, MasterVolumeControl, type MasterVolumeControlProps, Playhead, type PlayheadProps, PlayheadWithMarker, Playlist, PlaylistInfoContext, type PlaylistProps, PlayoutProvider, type RenderPlayheadFunction, ScreenReaderOnly, Selection, type SelectionProps, SelectionTimeInputs, type SelectionTimeInputsProps, Slider, SliderWrapper, SmartChannel, type SmartChannelProps, SmartScale, StyledPlaylist, StyledTimeScale, type TimeFormat, TimeFormatSelect, type TimeFormatSelectProps, TimeInput, type TimeInputProps, TimeScale, type TimeScaleProps, TimescaleLoopRegion, type TimescaleLoopRegionProps, Track, TrackControlsContext,
|
|
767
|
+
export { AudioPosition, type AudioPositionProps, AutomaticScrollCheckbox, type AutomaticScrollCheckboxProps, BaseButton, BaseCheckbox, BaseCheckboxLabel, BaseCheckboxWrapper, BaseControlButton, BaseInput, BaseLabel, BaseSelect, BaseSlider, Button, ButtonGroup, CLIP_BOUNDARY_WIDTH, CLIP_BOUNDARY_WIDTH_TOUCH, CLIP_HEADER_HEIGHT, Channel, type ChannelProps, Clip, ClipBoundary, type ClipBoundaryProps, ClipHeader, ClipHeaderPresentational, type ClipHeaderPresentationalProps, type ClipHeaderProps, type ClipProps, CloseButton, Controls$1 as Controls, type ControlsWrapperProps, DevicePixelRatioProvider, DotsIcon, type DragHandleProps$1 as DragHandleProps, FadeOverlay, type FadeOverlayProps, type GradientStop, Header, InlineLabel, LoopRegion, LoopRegionMarkers, type LoopRegionMarkersProps, type LoopRegionProps, MasterVolumeControl, type MasterVolumeControlProps, Playhead, type PlayheadProps, PlayheadWithMarker, Playlist, PlaylistInfoContext, type PlaylistProps, PlayoutProvider, type RenderPlayheadFunction, ScreenReaderOnly, Selection, type SelectionProps, SelectionTimeInputs, type SelectionTimeInputsProps, Slider, SliderWrapper, SmartChannel, type SmartChannelProps, SmartScale, type SmartScaleProps, SpectrogramChannel, type SpectrogramChannelProps, SpectrogramLabels, type SpectrogramLabelsProps, type SpectrogramWorkerCanvasApi, StyledPlaylist, StyledTimeScale, type TimeFormat, TimeFormatSelect, type TimeFormatSelectProps, TimeInput, type TimeInputProps, TimeScale, type TimeScaleProps, TimescaleLoopRegion, type TimescaleLoopRegionProps, Track, TrackControlsContext, TrackMenu, type TrackMenuItem, type TrackMenuProps, type TrackProps, TrashIcon, VolumeDownIcon, VolumeUpIcon, type WaveformColor, type WaveformDrawMode, type WaveformGradient, type WaveformPlaylistTheme, darkTheme, defaultTheme, formatTime, isWaveformGradient, parseTime, pixelsToSamples, pixelsToSeconds, samplesToPixels, samplesToSeconds, secondsToPixels, secondsToSamples, useDevicePixelRatio, usePlaylistInfo, usePlayoutStatus, usePlayoutStatusUpdate, useTheme, useTrackControls, waveformColorToCss };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { FunctionComponent, ReactNode, Dispatch, SetStateAction } from 'react';
|
|
3
3
|
import { Peaks, Bits } from '@waveform-playlist/webaudio-peaks';
|
|
4
|
-
import { Fade, FadeType } from '@waveform-playlist/core';
|
|
4
|
+
import { Fade, FadeType, SpectrogramData, RenderMode } from '@waveform-playlist/core';
|
|
5
5
|
import { DraggableAttributes } from '@dnd-kit/core';
|
|
6
6
|
import { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities';
|
|
7
7
|
import * as styled_components_dist_utils_hoist from 'styled-components/dist/utils/hoist';
|
|
@@ -415,6 +415,40 @@ interface SelectionTimeInputsProps {
|
|
|
415
415
|
}
|
|
416
416
|
declare const SelectionTimeInputs: react__default.FC<SelectionTimeInputsProps>;
|
|
417
417
|
|
|
418
|
+
interface SpectrogramWorkerCanvasApi {
|
|
419
|
+
registerCanvas(canvasId: string, canvas: OffscreenCanvas): void;
|
|
420
|
+
unregisterCanvas(canvasId: string): void;
|
|
421
|
+
}
|
|
422
|
+
interface SpectrogramChannelProps {
|
|
423
|
+
/** Channel index (0 = first, 1 = second, etc.) */
|
|
424
|
+
index: number;
|
|
425
|
+
/** Computed spectrogram data (not needed when workerApi is provided) */
|
|
426
|
+
data?: SpectrogramData;
|
|
427
|
+
/** Width in CSS pixels */
|
|
428
|
+
length: number;
|
|
429
|
+
/** Height in CSS pixels */
|
|
430
|
+
waveHeight: number;
|
|
431
|
+
/** Device pixel ratio for sharp rendering */
|
|
432
|
+
devicePixelRatio?: number;
|
|
433
|
+
/** Samples per pixel at current zoom level */
|
|
434
|
+
samplesPerPixel: number;
|
|
435
|
+
/** 256-entry RGB LUT (768 bytes) from getColorMap() */
|
|
436
|
+
colorLUT?: Uint8Array;
|
|
437
|
+
/** Frequency scale function: (freqHz, minF, maxF) => [0,1] */
|
|
438
|
+
frequencyScaleFn?: (f: number, minF: number, maxF: number) => number;
|
|
439
|
+
/** Min frequency in Hz */
|
|
440
|
+
minFrequency?: number;
|
|
441
|
+
/** Max frequency in Hz (defaults to sampleRate/2) */
|
|
442
|
+
maxFrequency?: number;
|
|
443
|
+
/** Worker API for transferring canvas ownership. When provided, rendering is done in the worker. */
|
|
444
|
+
workerApi?: SpectrogramWorkerCanvasApi;
|
|
445
|
+
/** Clip ID used to construct unique canvas IDs for worker registration */
|
|
446
|
+
clipId?: string;
|
|
447
|
+
/** Callback when canvases are registered with the worker, providing canvas IDs and widths */
|
|
448
|
+
onCanvasesReady?: (canvasIds: string[], canvasWidths: number[]) => void;
|
|
449
|
+
}
|
|
450
|
+
declare const SpectrogramChannel: FunctionComponent<SpectrogramChannelProps>;
|
|
451
|
+
|
|
418
452
|
interface SmartChannelProps {
|
|
419
453
|
className?: string;
|
|
420
454
|
index: number;
|
|
@@ -424,10 +458,55 @@ interface SmartChannelProps {
|
|
|
424
458
|
isSelected?: boolean;
|
|
425
459
|
/** If true, background is transparent (for use with external progress overlay) */
|
|
426
460
|
transparentBackground?: boolean;
|
|
461
|
+
/** Render mode: waveform, spectrogram, or both */
|
|
462
|
+
renderMode?: RenderMode;
|
|
463
|
+
/** Spectrogram data for this channel */
|
|
464
|
+
spectrogramData?: SpectrogramData;
|
|
465
|
+
/** 256-entry RGB LUT from getColorMap() */
|
|
466
|
+
spectrogramColorLUT?: Uint8Array;
|
|
467
|
+
/** Samples per pixel at current zoom level */
|
|
468
|
+
samplesPerPixel?: number;
|
|
469
|
+
/** Frequency scale function */
|
|
470
|
+
spectrogramFrequencyScaleFn?: (f: number, minF: number, maxF: number) => number;
|
|
471
|
+
/** Min frequency in Hz */
|
|
472
|
+
spectrogramMinFrequency?: number;
|
|
473
|
+
/** Max frequency in Hz */
|
|
474
|
+
spectrogramMaxFrequency?: number;
|
|
475
|
+
/** Worker API for OffscreenCanvas transfer */
|
|
476
|
+
spectrogramWorkerApi?: SpectrogramWorkerCanvasApi;
|
|
477
|
+
/** Clip ID for worker canvas registration */
|
|
478
|
+
spectrogramClipId?: string;
|
|
479
|
+
/** Callback when canvases are registered with the worker */
|
|
480
|
+
spectrogramOnCanvasesReady?: (canvasIds: string[], canvasWidths: number[]) => void;
|
|
427
481
|
}
|
|
428
482
|
declare const SmartChannel: FunctionComponent<SmartChannelProps>;
|
|
429
483
|
|
|
430
|
-
|
|
484
|
+
interface SpectrogramLabelsProps {
|
|
485
|
+
/** Height per channel in CSS pixels */
|
|
486
|
+
waveHeight: number;
|
|
487
|
+
/** Number of audio channels */
|
|
488
|
+
numChannels: number;
|
|
489
|
+
/** Frequency scale function */
|
|
490
|
+
frequencyScaleFn: (f: number, minF: number, maxF: number) => number;
|
|
491
|
+
/** Min frequency in Hz */
|
|
492
|
+
minFrequency: number;
|
|
493
|
+
/** Max frequency in Hz */
|
|
494
|
+
maxFrequency: number;
|
|
495
|
+
/** Label text color */
|
|
496
|
+
labelsColor?: string;
|
|
497
|
+
/** Label background color */
|
|
498
|
+
labelsBackground?: string;
|
|
499
|
+
/** Render mode — in "both" mode spectrogram is half height */
|
|
500
|
+
renderMode?: 'spectrogram' | 'both';
|
|
501
|
+
/** Whether clip headers are shown (adds offset) */
|
|
502
|
+
hasClipHeaders?: boolean;
|
|
503
|
+
}
|
|
504
|
+
declare const SpectrogramLabels: react__default.FC<SpectrogramLabelsProps>;
|
|
505
|
+
|
|
506
|
+
interface SmartScaleProps {
|
|
507
|
+
readonly renderTimestamp?: (timeMs: number, pixelPosition: number) => ReactNode;
|
|
508
|
+
}
|
|
509
|
+
declare const SmartScale: FunctionComponent<SmartScaleProps>;
|
|
431
510
|
|
|
432
511
|
/**
|
|
433
512
|
* Time format utilities for displaying and parsing audio timestamps
|
|
@@ -516,6 +595,12 @@ declare const Button: styled_components_dist_types.IStyledComponentBase<"web", s
|
|
|
516
595
|
|
|
517
596
|
declare const ButtonGroup: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
518
597
|
|
|
598
|
+
interface CloseButtonProps {
|
|
599
|
+
onClick: (e: react__default.MouseEvent) => void;
|
|
600
|
+
title?: string;
|
|
601
|
+
}
|
|
602
|
+
declare const CloseButton: react__default.FC<CloseButtonProps>;
|
|
603
|
+
|
|
519
604
|
declare const Controls$1: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
520
605
|
|
|
521
606
|
declare const Header: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
@@ -526,6 +611,8 @@ declare const VolumeUpIcon: react__default.FC<IconProps>;
|
|
|
526
611
|
|
|
527
612
|
declare const TrashIcon: react__default.FC<IconProps>;
|
|
528
613
|
|
|
614
|
+
declare const DotsIcon: react__default.FC<IconProps>;
|
|
615
|
+
|
|
529
616
|
/**
|
|
530
617
|
* TrackControls Slider - Compact slider for volume/pan controls
|
|
531
618
|
*
|
|
@@ -539,47 +626,15 @@ declare const Slider: styled_components_dist_types.IStyledComponentBase<"web", s
|
|
|
539
626
|
|
|
540
627
|
declare const SliderWrapper: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
541
628
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
* (mute, solo, volume, pan) plus a delete button
|
|
547
|
-
*/
|
|
548
|
-
|
|
549
|
-
interface TrackControlsWithDeleteProps {
|
|
550
|
-
trackIndex: number;
|
|
551
|
-
trackName: string;
|
|
552
|
-
muted: boolean;
|
|
553
|
-
soloed: boolean;
|
|
554
|
-
volume: number;
|
|
555
|
-
pan: number;
|
|
556
|
-
onMuteChange: (muted: boolean) => void;
|
|
557
|
-
onSoloChange: (soloed: boolean) => void;
|
|
558
|
-
onVolumeChange: (volume: number) => void;
|
|
559
|
-
onPanChange: (pan: number) => void;
|
|
560
|
-
onDelete: () => void;
|
|
629
|
+
interface TrackMenuItem {
|
|
630
|
+
id: string;
|
|
631
|
+
label?: string;
|
|
632
|
+
content: ReactNode;
|
|
561
633
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
* ```tsx
|
|
567
|
-
* <TrackControlsWithDelete
|
|
568
|
-
* trackIndex={0}
|
|
569
|
-
* trackName="Track 1"
|
|
570
|
-
* muted={false}
|
|
571
|
-
* soloed={false}
|
|
572
|
-
* volume={1.0}
|
|
573
|
-
* pan={0}
|
|
574
|
-
* onMuteChange={(muted) => console.log('mute:', muted)}
|
|
575
|
-
* onSoloChange={(soloed) => console.log('solo:', soloed)}
|
|
576
|
-
* onVolumeChange={(volume) => console.log('volume:', volume)}
|
|
577
|
-
* onPanChange={(pan) => console.log('pan:', pan)}
|
|
578
|
-
* onDelete={() => console.log('delete')}
|
|
579
|
-
* />
|
|
580
|
-
* ```
|
|
581
|
-
*/
|
|
582
|
-
declare const TrackControlsWithDelete: react__default.FC<TrackControlsWithDeleteProps>;
|
|
634
|
+
interface TrackMenuProps {
|
|
635
|
+
items: TrackMenuItem[] | ((onClose: () => void) => TrackMenuItem[]);
|
|
636
|
+
}
|
|
637
|
+
declare const TrackMenu: react__default.FC<TrackMenuProps>;
|
|
583
638
|
|
|
584
639
|
type Props$1 = {
|
|
585
640
|
children: ReactNode;
|
|
@@ -709,4 +764,4 @@ declare const BaseSlider: styled_components_dist_types.IStyledComponentBase<"web
|
|
|
709
764
|
ref?: ((instance: HTMLInputElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLInputElement> | null | undefined;
|
|
710
765
|
}>, never>, never>> & string;
|
|
711
766
|
|
|
712
|
-
export { AudioPosition, type AudioPositionProps, AutomaticScrollCheckbox, type AutomaticScrollCheckboxProps, BaseButton, BaseCheckbox, BaseCheckboxLabel, BaseCheckboxWrapper, BaseControlButton, BaseInput, BaseLabel, BaseSelect, BaseSlider, Button, ButtonGroup, CLIP_BOUNDARY_WIDTH, CLIP_BOUNDARY_WIDTH_TOUCH, CLIP_HEADER_HEIGHT, Channel, type ChannelProps, Clip, ClipBoundary, type ClipBoundaryProps, ClipHeader, ClipHeaderPresentational, type ClipHeaderPresentationalProps, type ClipHeaderProps, type ClipProps, Controls$1 as Controls, type ControlsWrapperProps, DevicePixelRatioProvider, type DragHandleProps$1 as DragHandleProps, FadeOverlay, type FadeOverlayProps, type GradientStop, Header, InlineLabel, LoopRegion, LoopRegionMarkers, type LoopRegionMarkersProps, type LoopRegionProps, MasterVolumeControl, type MasterVolumeControlProps, Playhead, type PlayheadProps, PlayheadWithMarker, Playlist, PlaylistInfoContext, type PlaylistProps, PlayoutProvider, type RenderPlayheadFunction, ScreenReaderOnly, Selection, type SelectionProps, SelectionTimeInputs, type SelectionTimeInputsProps, Slider, SliderWrapper, SmartChannel, type SmartChannelProps, SmartScale, StyledPlaylist, StyledTimeScale, type TimeFormat, TimeFormatSelect, type TimeFormatSelectProps, TimeInput, type TimeInputProps, TimeScale, type TimeScaleProps, TimescaleLoopRegion, type TimescaleLoopRegionProps, Track, TrackControlsContext,
|
|
767
|
+
export { AudioPosition, type AudioPositionProps, AutomaticScrollCheckbox, type AutomaticScrollCheckboxProps, BaseButton, BaseCheckbox, BaseCheckboxLabel, BaseCheckboxWrapper, BaseControlButton, BaseInput, BaseLabel, BaseSelect, BaseSlider, Button, ButtonGroup, CLIP_BOUNDARY_WIDTH, CLIP_BOUNDARY_WIDTH_TOUCH, CLIP_HEADER_HEIGHT, Channel, type ChannelProps, Clip, ClipBoundary, type ClipBoundaryProps, ClipHeader, ClipHeaderPresentational, type ClipHeaderPresentationalProps, type ClipHeaderProps, type ClipProps, CloseButton, Controls$1 as Controls, type ControlsWrapperProps, DevicePixelRatioProvider, DotsIcon, type DragHandleProps$1 as DragHandleProps, FadeOverlay, type FadeOverlayProps, type GradientStop, Header, InlineLabel, LoopRegion, LoopRegionMarkers, type LoopRegionMarkersProps, type LoopRegionProps, MasterVolumeControl, type MasterVolumeControlProps, Playhead, type PlayheadProps, PlayheadWithMarker, Playlist, PlaylistInfoContext, type PlaylistProps, PlayoutProvider, type RenderPlayheadFunction, ScreenReaderOnly, Selection, type SelectionProps, SelectionTimeInputs, type SelectionTimeInputsProps, Slider, SliderWrapper, SmartChannel, type SmartChannelProps, SmartScale, type SmartScaleProps, SpectrogramChannel, type SpectrogramChannelProps, SpectrogramLabels, type SpectrogramLabelsProps, type SpectrogramWorkerCanvasApi, StyledPlaylist, StyledTimeScale, type TimeFormat, TimeFormatSelect, type TimeFormatSelectProps, TimeInput, type TimeInputProps, TimeScale, type TimeScaleProps, TimescaleLoopRegion, type TimescaleLoopRegionProps, Track, TrackControlsContext, TrackMenu, type TrackMenuItem, type TrackMenuProps, type TrackProps, TrashIcon, VolumeDownIcon, VolumeUpIcon, type WaveformColor, type WaveformDrawMode, type WaveformGradient, type WaveformPlaylistTheme, darkTheme, defaultTheme, formatTime, isWaveformGradient, parseTime, pixelsToSamples, pixelsToSeconds, samplesToPixels, samplesToSeconds, secondsToPixels, secondsToSamples, useDevicePixelRatio, usePlaylistInfo, usePlayoutStatus, usePlayoutStatusUpdate, useTheme, useTrackControls, waveformColorToCss };
|