@waveform-playlist/ui-components 12.1.0 → 13.0.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.ts CHANGED
@@ -6,7 +6,6 @@ import * as styled_components from 'styled-components';
6
6
  import { DefaultTheme } from 'styled-components';
7
7
  import * as styled_components_dist_types from 'styled-components/dist/types';
8
8
  import { IconProps } from '@phosphor-icons/react';
9
- import * as react_jsx_runtime from 'react/jsx-runtime';
10
9
 
11
10
  interface AudioPositionProps {
12
11
  formattedTime: string;
@@ -410,7 +409,7 @@ interface PlaylistProps {
410
409
  readonly timescaleGapHeight?: number;
411
410
  }
412
411
  declare const Playlist: FunctionComponent<PlaylistProps>;
413
- declare const StyledPlaylist: react__default.ForwardRefExoticComponent<styled_components.ExecutionProps & react__default.RefAttributes<react__default.FunctionComponent<PlaylistProps>>> & styled_components_dist_utils_hoist.NonReactStatics<react__default.FunctionComponent<PlaylistProps>>;
412
+ declare const StyledPlaylist: react__default.ForwardRefExoticComponent<Omit<PlaylistProps, keyof styled_components.ExecutionProps> & styled_components.ExecutionProps & react__default.RefAttributes<any>> & styled_components_dist_utils_hoist.NonReactStatics<react__default.FunctionComponent<PlaylistProps>>;
414
413
 
415
414
  interface SelectionProps {
416
415
  startPosition: number;
@@ -480,9 +479,14 @@ interface SelectionTimeInputsProps {
480
479
  }
481
480
  declare const SelectionTimeInputs: react__default.FC<SelectionTimeInputsProps>;
482
481
 
483
- interface SpectrogramWorkerCanvasApi {
484
- registerCanvas(canvasId: string, canvas: OffscreenCanvas): void;
485
- unregisterCanvas(canvasId: string): void;
482
+ interface SpectrogramCanvasRegistration {
483
+ canvasId: string;
484
+ canvas: OffscreenCanvas;
485
+ clipId: string;
486
+ channelIndex: number;
487
+ chunkIndex: number;
488
+ widthPx: number;
489
+ heightPx: number;
486
490
  }
487
491
  interface SpectrogramChannelProps {
488
492
  /** Visual position index — used for CSS positioning (top offset). */
@@ -497,12 +501,12 @@ interface SpectrogramChannelProps {
497
501
  devicePixelRatio?: number;
498
502
  /** Samples per pixel at current zoom level */
499
503
  samplesPerPixel: number;
500
- /** Worker API for transferring canvas ownership. Rendering is done in the worker. */
501
- workerApi: SpectrogramWorkerCanvasApi;
502
- /** Clip ID used to construct unique canvas IDs for worker registration */
504
+ /** Clip ID used to construct unique canvas IDs */
503
505
  clipId: string;
504
- /** Callback when canvases are registered with the worker, providing canvas IDs and widths */
505
- onCanvasesReady?: (canvasIds: string[], canvasWidths: number[]) => void;
506
+ /** Single-call canvas registration. Receives the transferred OffscreenCanvas + metadata. */
507
+ onCanvasRegister: (reg: SpectrogramCanvasRegistration) => void;
508
+ /** Counterpart for chunk unmount / component unmount. */
509
+ onCanvasUnregister: (canvasId: string) => void;
506
510
  }
507
511
  declare const SpectrogramChannel: FunctionComponent<SpectrogramChannelProps>;
508
512
 
@@ -519,12 +523,12 @@ interface SmartChannelProps {
519
523
  renderMode?: RenderMode;
520
524
  /** Samples per pixel at current zoom level */
521
525
  samplesPerPixel?: number;
522
- /** Worker API for OffscreenCanvas transfer */
523
- spectrogramWorkerApi?: SpectrogramWorkerCanvasApi;
524
- /** Clip ID for worker canvas registration */
526
+ /** Clip ID for spectrogram canvas registration */
525
527
  spectrogramClipId?: string;
526
- /** Callback when canvases are registered with the worker */
527
- spectrogramOnCanvasesReady?: (canvasIds: string[], canvasWidths: number[]) => void;
528
+ /** Single-call registration for spectrogram canvases (from SpectrogramIntegration). */
529
+ spectrogramOnCanvasRegister?: (reg: SpectrogramCanvasRegistration) => void;
530
+ /** Counterpart for chunk unmount / unmount. */
531
+ spectrogramOnCanvasUnregister?: (canvasId: string) => void;
528
532
  /** MIDI note data for piano-roll rendering */
529
533
  midiNotes?: MidiNoteData[];
530
534
  /** Sample rate for MIDI note time → pixel conversion */
@@ -645,13 +649,17 @@ declare const Track: FunctionComponent<TrackProps>;
645
649
  * Supports variants: outline (default), danger, info
646
650
  * Uses theme values for consistent styling.
647
651
  */
648
- declare const Button: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<styled_components.FastOmit<styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
652
+ declare const Button: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<styled_components.FastOmit<styled_components.FastOmit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref" | "key" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
653
+ ref?: ((instance: HTMLButtonElement | 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<HTMLButtonElement> | null | undefined;
654
+ }, "$variant"> & {
655
+ $variant?: "outline" | "danger" | "info";
656
+ }, "form" | "slot" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "name" | "type" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value"> & Partial<Pick<styled_components.FastOmit<styled_components.FastOmit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref" | "key" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
649
657
  ref?: ((instance: HTMLButtonElement | 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<HTMLButtonElement> | null | undefined;
650
- }>, never>, {
658
+ }, "$variant"> & {
651
659
  $variant?: "outline" | "danger" | "info";
652
- }>> & string;
660
+ }, "form" | "slot" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "name" | "type" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value">>> & string;
653
661
 
654
- declare const ButtonGroup: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
662
+ declare const ButtonGroup: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
655
663
 
656
664
  interface CloseButtonProps {
657
665
  onClick: (e: react__default.MouseEvent) => void;
@@ -659,9 +667,9 @@ interface CloseButtonProps {
659
667
  }
660
668
  declare const CloseButton: react__default.FC<CloseButtonProps>;
661
669
 
662
- declare const Controls$1: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
670
+ declare const Controls$1: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
663
671
 
664
- declare const Header: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
672
+ declare const Header: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>>> & string;
665
673
 
666
674
  declare const VolumeDownIcon: react__default.FC<IconProps>;
667
675
 
@@ -678,11 +686,23 @@ declare const DotsIcon: react__default.FC<IconProps>;
678
686
  * - Smaller thumb and track for compact layout
679
687
  * - Uses theme's sliderThumbColor (goldenrod by default)
680
688
  */
681
- declare const Slider: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<styled_components.FastOmit<styled_components.FastOmit<styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
689
+ declare const Slider: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<styled_components.FastOmit<styled_components.FastOmit<styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref" | "key" | keyof react.InputHTMLAttributes<HTMLInputElement>> & Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
690
+ 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;
691
+ }, "type"> & Partial<Pick<styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref" | "key" | keyof react.InputHTMLAttributes<HTMLInputElement>> & Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
692
+ 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;
693
+ }, "type">>, "as" | "forwardedAs"> & {
694
+ as?: styled_components.WebTarget | undefined;
695
+ forwardedAs?: styled_components.WebTarget | undefined;
696
+ }, never> & Partial<Pick<styled_components.FastOmit<styled_components.FastOmit<styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref" | "key" | keyof react.InputHTMLAttributes<HTMLInputElement>> & Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
682
697
  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;
683
- }>, never>, never>, never>> & string;
698
+ }, "type"> & Partial<Pick<styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref" | "key" | keyof react.InputHTMLAttributes<HTMLInputElement>> & Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
699
+ 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;
700
+ }, "type">>, "as" | "forwardedAs"> & {
701
+ as?: styled_components.WebTarget | undefined;
702
+ forwardedAs?: styled_components.WebTarget | undefined;
703
+ }, never>>> & string;
684
704
 
685
- declare const SliderWrapper: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
705
+ declare const SliderWrapper: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>>> & string;
686
706
 
687
707
  interface TrackMenuItem {
688
708
  id: string;
@@ -736,13 +756,13 @@ interface BeatsAndBarsProviderProps {
736
756
  scaleMode?: ScaleMode;
737
757
  children: react__default.ReactNode;
738
758
  }
739
- declare function BeatsAndBarsProvider({ bpm, timeSignature, snapTo, scaleMode, children, }: BeatsAndBarsProviderProps): react_jsx_runtime.JSX.Element;
759
+ declare function BeatsAndBarsProvider({ bpm, timeSignature, snapTo, scaleMode, children, }: BeatsAndBarsProviderProps): react__default.JSX.Element;
740
760
  declare function useBeatsAndBars(): BeatsAndBarsContextValue | null;
741
761
 
742
762
  type Props$1 = {
743
763
  children: ReactNode;
744
764
  };
745
- declare const DevicePixelRatioProvider: ({ children }: Props$1) => react_jsx_runtime.JSX.Element;
765
+ declare const DevicePixelRatioProvider: ({ children }: Props$1) => react__default.JSX.Element;
746
766
  declare const useDevicePixelRatio: () => number;
747
767
 
748
768
  type Controls = {
@@ -780,7 +800,7 @@ type PlayoutStatusUpdate = {
780
800
  type Props = {
781
801
  children: ReactNode;
782
802
  };
783
- declare const PlayoutProvider: ({ children }: Props) => react_jsx_runtime.JSX.Element;
803
+ declare const PlayoutProvider: ({ children }: Props) => react__default.JSX.Element;
784
804
  declare const usePlayoutStatus: () => {
785
805
  progress: number;
786
806
  isPlaying: boolean;
@@ -801,7 +821,7 @@ type ScrollViewportProviderProps = {
801
821
  containerRef: react__default.RefObject<HTMLElement | null>;
802
822
  children: ReactNode;
803
823
  };
804
- declare const ScrollViewportProvider: ({ containerRef, children }: ScrollViewportProviderProps) => react_jsx_runtime.JSX.Element;
824
+ declare const ScrollViewportProvider: ({ containerRef, children }: ScrollViewportProviderProps) => react__default.JSX.Element;
805
825
  /**
806
826
  * Full viewport hook — re-renders on every viewport update (after threshold).
807
827
  * Use useScrollViewportSelector() instead when you only need derived state.
@@ -841,7 +861,7 @@ interface ClipViewportOriginProviderProps {
841
861
  * space, which causes them to be culled incorrectly when a clip doesn't start
842
862
  * at position 0 on the timeline.
843
863
  */
844
- declare const ClipViewportOriginProvider: ({ originX, children, }: ClipViewportOriginProviderProps) => react_jsx_runtime.JSX.Element;
864
+ declare const ClipViewportOriginProvider: ({ originX, children, }: ClipViewportOriginProviderProps) => react__default.JSX.Element;
845
865
  /**
846
866
  * Returns the clip's pixel-space left offset within the timeline.
847
867
  * Defaults to 0 when used outside a ClipViewportOriginProvider (e.g., TimeScale).
@@ -860,20 +880,20 @@ declare function secondsToPixels(seconds: number, samplesPerPixel: number, sampl
860
880
  *
861
881
  * This provides consistent styling across all button elements in the waveform playlist.
862
882
  */
863
- declare const BaseButton: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
883
+ declare const BaseButton: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>>> & string;
864
884
 
865
885
  /**
866
886
  * BaseCheckboxWrapper - Container for checkbox + label
867
887
  */
868
- declare const BaseCheckboxWrapper: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
888
+ declare const BaseCheckboxWrapper: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
869
889
  /**
870
890
  * BaseCheckbox - A styled checkbox input
871
891
  */
872
- declare const BaseCheckbox: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
892
+ declare const BaseCheckbox: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>>> & string;
873
893
  /**
874
894
  * BaseCheckboxLabel - Label for checkboxes
875
895
  */
876
- declare const BaseCheckboxLabel: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
896
+ declare const BaseCheckboxLabel: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>>> & string;
877
897
 
878
898
  /**
879
899
  * ControlButton - A colored action button for prominent actions like Play, Pause, Record.
@@ -881,7 +901,7 @@ declare const BaseCheckboxLabel: styled_components_dist_types.IStyledComponentBa
881
901
  *
882
902
  * Uses theme colors when available, with fallbacks for standalone use.
883
903
  */
884
- declare const BaseControlButton: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
904
+ declare const BaseControlButton: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>>> & string;
885
905
 
886
906
  /**
887
907
  * BaseInput - A styled input component that uses theme values
@@ -889,39 +909,55 @@ declare const BaseControlButton: styled_components_dist_types.IStyledComponentBa
889
909
  * This provides consistent styling across all input elements in the waveform playlist.
890
910
  * Styling is controlled via the theme, making it easy to adapt to different environments.
891
911
  */
892
- declare const BaseInput: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
912
+ declare const BaseInput: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>>> & string;
893
913
  /**
894
914
  * BaseInputSmall - A smaller variant for compact layouts
895
915
  */
896
- declare const BaseInputSmall: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<Omit<styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>, "ref"> & {
916
+ declare const BaseInputSmall: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<Omit<styled_components.FastOmit<styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>>, "as" | "forwardedAs"> & {
917
+ as?: styled_components.WebTarget | undefined;
918
+ forwardedAs?: styled_components.WebTarget | undefined;
919
+ }, "ref"> & {
920
+ 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;
921
+ }, never> & Partial<Pick<Omit<styled_components.FastOmit<styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>>, "as" | "forwardedAs"> & {
922
+ as?: styled_components.WebTarget | undefined;
923
+ forwardedAs?: styled_components.WebTarget | undefined;
924
+ }, "ref"> & {
897
925
  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;
898
- }, never>> & string;
926
+ }, never>>> & string;
899
927
 
900
928
  /**
901
929
  * BaseLabel - A styled label component that uses theme values
902
930
  */
903
- declare const BaseLabel: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
931
+ declare const BaseLabel: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>>> & string;
904
932
  /**
905
933
  * InlineLabel - A label that displays inline with its input
906
934
  */
907
- declare const InlineLabel: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
935
+ declare const InlineLabel: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>>> & string;
908
936
  /**
909
937
  * ScreenReaderOnly - Visually hidden but accessible to screen readers
910
938
  */
911
- declare const ScreenReaderOnly: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
939
+ declare const ScreenReaderOnly: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
912
940
 
913
941
  /**
914
942
  * BaseSelect - A styled select component that uses theme values
915
943
  *
916
944
  * This provides consistent styling across all select elements in the waveform playlist.
917
945
  */
918
- declare const BaseSelect: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never>> & string;
946
+ declare const BaseSelect: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never>>> & string;
919
947
  /**
920
948
  * BaseSelectSmall - A smaller variant for compact layouts
921
949
  */
922
- declare const BaseSelectSmall: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<Omit<styled_components.FastOmit<react.DetailedHTMLProps<react.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never>, "ref"> & {
950
+ declare const BaseSelectSmall: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<Omit<styled_components.FastOmit<styled_components.FastOmit<react.DetailedHTMLProps<react.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never>>, "as" | "forwardedAs"> & {
951
+ as?: styled_components.WebTarget | undefined;
952
+ forwardedAs?: styled_components.WebTarget | undefined;
953
+ }, "ref"> & {
923
954
  ref?: ((instance: HTMLSelectElement | 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<HTMLSelectElement> | null | undefined;
924
- }, never>> & string;
955
+ }, never> & Partial<Pick<Omit<styled_components.FastOmit<styled_components.FastOmit<react.DetailedHTMLProps<react.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never> & Partial<Pick<react.DetailedHTMLProps<react.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never>>, "as" | "forwardedAs"> & {
956
+ as?: styled_components.WebTarget | undefined;
957
+ forwardedAs?: styled_components.WebTarget | undefined;
958
+ }, "ref"> & {
959
+ ref?: ((instance: HTMLSelectElement | 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<HTMLSelectElement> | null | undefined;
960
+ }, never>>> & string;
925
961
 
926
962
  /**
927
963
  * BaseSlider - Themed range input for volume controls, etc.
@@ -929,8 +965,10 @@ declare const BaseSelectSmall: styled_components_dist_types.IStyledComponentBase
929
965
  * Uses theme values for consistent styling across light/dark modes.
930
966
  * Provides custom styling for the track and thumb.
931
967
  */
932
- declare const BaseSlider: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<styled_components.FastOmit<styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
968
+ declare const BaseSlider: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref" | "key" | keyof react.InputHTMLAttributes<HTMLInputElement>> & Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
969
+ 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;
970
+ }, "type"> & Partial<Pick<styled_components.FastOmit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref" | "key" | keyof react.InputHTMLAttributes<HTMLInputElement>> & Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
933
971
  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;
934
- }>, never>, never>> & string;
972
+ }, "type">>> & string;
935
973
 
936
- export { AudioPosition, type AudioPositionProps, AutomaticScrollCheckbox, type AutomaticScrollCheckboxProps, BaseButton, BaseCheckbox, BaseCheckboxLabel, BaseCheckboxWrapper, BaseControlButton, BaseInput, BaseInputSmall, BaseLabel, BaseSelect, BaseSelectSmall, BaseSlider, type BeatsAndBarsContextValue, BeatsAndBarsProvider, type BeatsAndBarsProviderProps, 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, ClipViewportOriginProvider, CloseButton, type ColorStop, Controls$1 as Controls, DevicePixelRatioProvider, DotsIcon, type DragHandleProps, FadeOverlay, type FadeOverlayProps, type GradientStop, Header, InlineLabel, LoopRegion, LoopRegionMarkers, type LoopRegionMarkersProps, type LoopRegionProps, MasterVolumeControl, type MasterVolumeControlProps, PianoRollChannel, type PianoRollChannelProps, Playhead, type PlayheadProps, PlayheadWithMarker, Playlist, PlaylistErrorBoundary, type PlaylistErrorBoundaryProps, PlaylistInfoContext, type PlaylistProps, PlayoutProvider, type PrecomputedTickData, type RenderPlayheadFunction, type ScaleMode, ScreenReaderOnly, type ScrollViewport, ScrollViewportProvider, SegmentedVUMeter, type SegmentedVUMeterProps, Selection, type SelectionProps, SelectionTimeInputs, type SelectionTimeInputsProps, Slider, SliderWrapper, SmartChannel, type SmartChannelProps, SmartScale, type SmartScaleProps, type SnapTo, 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, getScaleInfo, isWaveformGradient, parseTime, pixelsToSamples, pixelsToSeconds, samplesToPixels, samplesToSeconds, secondsToPixels, secondsToSamples, useBeatsAndBars, useClipViewportOrigin, useDevicePixelRatio, usePlaylistInfo, usePlayoutStatus, usePlayoutStatusUpdate, useScrollViewport, useScrollViewportSelector, useTheme, useTrackControls, useVisibleChunkIndices, waveformColorToCss };
974
+ export { AudioPosition, type AudioPositionProps, AutomaticScrollCheckbox, type AutomaticScrollCheckboxProps, BaseButton, BaseCheckbox, BaseCheckboxLabel, BaseCheckboxWrapper, BaseControlButton, BaseInput, BaseInputSmall, BaseLabel, BaseSelect, BaseSelectSmall, BaseSlider, type BeatsAndBarsContextValue, BeatsAndBarsProvider, type BeatsAndBarsProviderProps, 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, ClipViewportOriginProvider, CloseButton, type ColorStop, Controls$1 as Controls, DevicePixelRatioProvider, DotsIcon, type DragHandleProps, FadeOverlay, type FadeOverlayProps, type GradientStop, Header, InlineLabel, LoopRegion, LoopRegionMarkers, type LoopRegionMarkersProps, type LoopRegionProps, MasterVolumeControl, type MasterVolumeControlProps, PianoRollChannel, type PianoRollChannelProps, Playhead, type PlayheadProps, PlayheadWithMarker, Playlist, PlaylistErrorBoundary, type PlaylistErrorBoundaryProps, PlaylistInfoContext, type PlaylistProps, PlayoutProvider, type PrecomputedTickData, type RenderPlayheadFunction, type ScaleMode, ScreenReaderOnly, type ScrollViewport, ScrollViewportProvider, SegmentedVUMeter, type SegmentedVUMeterProps, Selection, type SelectionProps, SelectionTimeInputs, type SelectionTimeInputsProps, Slider, SliderWrapper, SmartChannel, type SmartChannelProps, SmartScale, type SmartScaleProps, type SnapTo, type SpectrogramCanvasRegistration, SpectrogramChannel, type SpectrogramChannelProps, SpectrogramLabels, type SpectrogramLabelsProps, 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, getScaleInfo, isWaveformGradient, parseTime, pixelsToSamples, pixelsToSeconds, samplesToPixels, samplesToSeconds, secondsToPixels, secondsToSamples, useBeatsAndBars, useClipViewportOrigin, useDevicePixelRatio, usePlaylistInfo, usePlayoutStatus, usePlayoutStatusUpdate, useScrollViewport, useScrollViewportSelector, useTheme, useTrackControls, useVisibleChunkIndices, waveformColorToCss };
package/dist/index.js CHANGED
@@ -2461,28 +2461,28 @@ var SpectrogramChannel = ({
2461
2461
  waveHeight,
2462
2462
  devicePixelRatio = 1,
2463
2463
  samplesPerPixel: _samplesPerPixel,
2464
- workerApi,
2465
2464
  clipId,
2466
- onCanvasesReady
2465
+ onCanvasRegister,
2466
+ onCanvasUnregister
2467
2467
  }) => {
2468
2468
  const channelIndex = channelIndexProp ?? index;
2469
2469
  const { canvasRef, canvasMapRef } = useChunkedCanvasRefs();
2470
2470
  const registeredIdsRef = (0, import_react20.useRef)([]);
2471
2471
  const transferredCanvasesRef = (0, import_react20.useRef)(/* @__PURE__ */ new WeakSet());
2472
- const workerApiRef = (0, import_react20.useRef)(workerApi);
2473
- const onCanvasesReadyRef = (0, import_react20.useRef)(onCanvasesReady);
2472
+ const onCanvasRegisterRef = (0, import_react20.useRef)(onCanvasRegister);
2473
+ const onCanvasUnregisterRef = (0, import_react20.useRef)(onCanvasUnregister);
2474
2474
  const clipOriginX = useClipViewportOrigin();
2475
2475
  const visibleChunkIndices = useVisibleChunkIndices(length, import_core5.MAX_CANVAS_WIDTH, clipOriginX);
2476
2476
  (0, import_react20.useEffect)(() => {
2477
- workerApiRef.current = workerApi;
2478
- }, [workerApi]);
2477
+ onCanvasRegisterRef.current = onCanvasRegister;
2478
+ }, [onCanvasRegister]);
2479
2479
  (0, import_react20.useEffect)(() => {
2480
- onCanvasesReadyRef.current = onCanvasesReady;
2481
- }, [onCanvasesReady]);
2480
+ onCanvasUnregisterRef.current = onCanvasUnregister;
2481
+ }, [onCanvasUnregister]);
2482
2482
  (0, import_react20.useEffect)(() => {
2483
- const currentWorkerApi = workerApiRef.current;
2484
- if (!currentWorkerApi || !clipId) return;
2485
- const previousCount = registeredIdsRef.current.length;
2483
+ if (!clipId) return;
2484
+ const unregister = onCanvasUnregisterRef.current;
2485
+ const register = onCanvasRegisterRef.current;
2486
2486
  const remaining = [];
2487
2487
  for (const id of registeredIdsRef.current) {
2488
2488
  const match = id.match(/chunk(\d+)$/);
@@ -2496,14 +2496,13 @@ var SpectrogramChannel = ({
2496
2496
  remaining.push(id);
2497
2497
  } else {
2498
2498
  try {
2499
- currentWorkerApi.unregisterCanvas(id);
2499
+ unregister(id);
2500
2500
  } catch (err) {
2501
- console.warn(`[spectrogram] unregisterCanvas failed for ${id}:`, err);
2501
+ console.warn(`[spectrogram] unregister failed for ${id}:`, err);
2502
2502
  }
2503
2503
  }
2504
2504
  }
2505
2505
  registeredIdsRef.current = remaining;
2506
- const newIds = [];
2507
2506
  for (const [canvasIdx, canvas] of canvasMapRef.current.entries()) {
2508
2507
  if (transferredCanvasesRef.current.has(canvas)) continue;
2509
2508
  const canvasId = `${clipId}-ch${channelIndex}-chunk${canvasIdx}`;
@@ -2515,41 +2514,31 @@ var SpectrogramChannel = ({
2515
2514
  continue;
2516
2515
  }
2517
2516
  transferredCanvasesRef.current.add(canvas);
2517
+ const widthPx = Math.min(length - canvasIdx * import_core5.MAX_CANVAS_WIDTH, import_core5.MAX_CANVAS_WIDTH);
2518
2518
  try {
2519
- currentWorkerApi.registerCanvas(canvasId, offscreen);
2520
- newIds.push(canvasId);
2519
+ register({
2520
+ canvasId,
2521
+ canvas: offscreen,
2522
+ clipId,
2523
+ channelIndex,
2524
+ chunkIndex: canvasIdx,
2525
+ widthPx,
2526
+ heightPx: waveHeight
2527
+ });
2528
+ registeredIdsRef.current.push(canvasId);
2521
2529
  } catch (err) {
2522
- console.warn(`[spectrogram] registerCanvas failed for ${canvasId}:`, err);
2523
- continue;
2530
+ console.warn(`[spectrogram] register failed for ${canvasId}:`, err);
2524
2531
  }
2525
2532
  }
2526
- if (newIds.length > 0) {
2527
- registeredIdsRef.current = [...registeredIdsRef.current, ...newIds];
2528
- }
2529
- const canvasSetChanged = newIds.length > 0 || remaining.length < previousCount;
2530
- if (canvasSetChanged) {
2531
- const allIds = registeredIdsRef.current;
2532
- const allWidths = allIds.map((id) => {
2533
- const match = id.match(/chunk(\d+)$/);
2534
- if (!match) {
2535
- console.warn(`[spectrogram] Unexpected canvas ID format: ${id}`);
2536
- return import_core5.MAX_CANVAS_WIDTH;
2537
- }
2538
- const chunkIdx = parseInt(match[1], 10);
2539
- return Math.min(length - chunkIdx * import_core5.MAX_CANVAS_WIDTH, import_core5.MAX_CANVAS_WIDTH);
2540
- });
2541
- onCanvasesReadyRef.current?.(allIds, allWidths);
2542
- }
2543
- }, [canvasMapRef, clipId, channelIndex, length, visibleChunkIndices]);
2533
+ }, [canvasMapRef, clipId, channelIndex, length, waveHeight, visibleChunkIndices]);
2544
2534
  (0, import_react20.useEffect)(() => {
2545
2535
  return () => {
2546
- const api = workerApiRef.current;
2547
- if (!api) return;
2536
+ const unregister = onCanvasUnregisterRef.current;
2548
2537
  for (const id of registeredIdsRef.current) {
2549
2538
  try {
2550
- api.unregisterCanvas(id);
2539
+ unregister(id);
2551
2540
  } catch (err) {
2552
- console.warn(`[spectrogram] unregisterCanvas failed for ${id}:`, err);
2541
+ console.warn(`[spectrogram] unregister failed for ${id}:`, err);
2553
2542
  }
2554
2543
  }
2555
2544
  registeredIdsRef.current = [];
@@ -2582,9 +2571,9 @@ var SmartChannel = ({
2582
2571
  transparentBackground,
2583
2572
  renderMode = "waveform",
2584
2573
  samplesPerPixel: sppProp,
2585
- spectrogramWorkerApi,
2586
2574
  spectrogramClipId,
2587
- spectrogramOnCanvasesReady,
2575
+ spectrogramOnCanvasRegister,
2576
+ spectrogramOnCanvasUnregister,
2588
2577
  midiNotes,
2589
2578
  sampleRate: sampleRateProp,
2590
2579
  clipOffsetSeconds,
@@ -2603,7 +2592,7 @@ var SmartChannel = ({
2603
2592
  const waveOutlineColor = isSelected && theme ? theme.selectedWaveOutlineColor : theme?.waveOutlineColor;
2604
2593
  const waveFillColor = isSelected && theme ? theme.selectedWaveFillColor : theme?.waveFillColor;
2605
2594
  const drawMode = theme?.waveformDrawMode || "inverted";
2606
- const hasSpectrogram = spectrogramWorkerApi && spectrogramClipId;
2595
+ const hasSpectrogram = spectrogramClipId && spectrogramOnCanvasRegister && spectrogramOnCanvasUnregister;
2607
2596
  if (renderMode === "spectrogram" && hasSpectrogram) {
2608
2597
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2609
2598
  SpectrogramChannel,
@@ -2613,9 +2602,9 @@ var SmartChannel = ({
2613
2602
  waveHeight,
2614
2603
  devicePixelRatio,
2615
2604
  samplesPerPixel,
2616
- workerApi: spectrogramWorkerApi,
2617
2605
  clipId: spectrogramClipId,
2618
- onCanvasesReady: spectrogramOnCanvasesReady
2606
+ onCanvasRegister: spectrogramOnCanvasRegister,
2607
+ onCanvasUnregister: spectrogramOnCanvasUnregister
2619
2608
  }
2620
2609
  );
2621
2610
  }
@@ -2631,9 +2620,9 @@ var SmartChannel = ({
2631
2620
  waveHeight: halfHeight,
2632
2621
  devicePixelRatio,
2633
2622
  samplesPerPixel,
2634
- workerApi: spectrogramWorkerApi,
2635
2623
  clipId: spectrogramClipId,
2636
- onCanvasesReady: spectrogramOnCanvasesReady
2624
+ onCanvasRegister: spectrogramOnCanvasRegister,
2625
+ onCanvasUnregister: spectrogramOnCanvasUnregister
2637
2626
  }
2638
2627
  ),
2639
2628
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(