@waveform-playlist/ui-components 13.1.5 → 14.0.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/README.md +1 -1
- package/dist/index.d.mts +24 -1
- package/dist/index.d.ts +24 -1
- package/dist/index.js +163 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +145 -43
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -6
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ Peer dependencies (install alongside):
|
|
|
26
26
|
npm install react react-dom styled-components
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
`@dnd-kit/react`
|
|
29
|
+
`@dnd-kit/react` and `@dnd-kit/dom` are optional peers — only needed if you use the drag/trim-enabled clip components.
|
|
30
30
|
|
|
31
31
|
## Usage
|
|
32
32
|
|
package/dist/index.d.mts
CHANGED
|
@@ -688,6 +688,29 @@ declare const TrashIcon: react__default.FC<IconProps>;
|
|
|
688
688
|
|
|
689
689
|
declare const DotsIcon: react__default.FC<IconProps>;
|
|
690
690
|
|
|
691
|
+
declare const GripIcon: react__default.FC<IconProps>;
|
|
692
|
+
|
|
693
|
+
declare const MoveUpIcon: react__default.FC<IconProps>;
|
|
694
|
+
|
|
695
|
+
declare const MoveDownIcon: react__default.FC<IconProps>;
|
|
696
|
+
|
|
697
|
+
interface ReorderRailProps {
|
|
698
|
+
onMoveUp: (e: react__default.MouseEvent) => void;
|
|
699
|
+
onMoveDown: (e: react__default.MouseEvent) => void;
|
|
700
|
+
upDisabled?: boolean;
|
|
701
|
+
downDisabled?: boolean;
|
|
702
|
+
/** Attach to the grip element (drag activation surface). */
|
|
703
|
+
gripRef?: react__default.Ref<HTMLButtonElement>;
|
|
704
|
+
onGripClick?: (e: react__default.MouseEvent) => void;
|
|
705
|
+
/** Positioning within the parent panel is the consumer's responsibility. */
|
|
706
|
+
style?: react__default.CSSProperties;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Channel-strip reorder rail: chevron-up / drag-grip / chevron-down stacked
|
|
710
|
+
* vertically. Fades to 55% opacity at rest, full opacity on hover/focus.
|
|
711
|
+
*/
|
|
712
|
+
declare const ReorderRail: react__default.FC<ReorderRailProps>;
|
|
713
|
+
|
|
691
714
|
/**
|
|
692
715
|
* TrackControls Slider - Compact slider for volume/pan controls
|
|
693
716
|
*
|
|
@@ -982,4 +1005,4 @@ declare const BaseSlider: styled_components_dist_types.IStyledComponentBase<"web
|
|
|
982
1005
|
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;
|
|
983
1006
|
}, "type">>> & string;
|
|
984
1007
|
|
|
985
|
-
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 };
|
|
1008
|
+
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, GripIcon, Header, InlineLabel, LoopRegion, LoopRegionMarkers, type LoopRegionMarkersProps, type LoopRegionProps, MasterVolumeControl, type MasterVolumeControlProps, MoveDownIcon, MoveUpIcon, PianoRollChannel, type PianoRollChannelProps, Playhead, type PlayheadProps, PlayheadWithMarker, Playlist, PlaylistErrorBoundary, type PlaylistErrorBoundaryProps, PlaylistInfoContext, type PlaylistProps, PlayoutProvider, type PrecomputedTickData, type RenderPlayheadFunction, ReorderRail, type ReorderRailProps, 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.d.ts
CHANGED
|
@@ -688,6 +688,29 @@ declare const TrashIcon: react__default.FC<IconProps>;
|
|
|
688
688
|
|
|
689
689
|
declare const DotsIcon: react__default.FC<IconProps>;
|
|
690
690
|
|
|
691
|
+
declare const GripIcon: react__default.FC<IconProps>;
|
|
692
|
+
|
|
693
|
+
declare const MoveUpIcon: react__default.FC<IconProps>;
|
|
694
|
+
|
|
695
|
+
declare const MoveDownIcon: react__default.FC<IconProps>;
|
|
696
|
+
|
|
697
|
+
interface ReorderRailProps {
|
|
698
|
+
onMoveUp: (e: react__default.MouseEvent) => void;
|
|
699
|
+
onMoveDown: (e: react__default.MouseEvent) => void;
|
|
700
|
+
upDisabled?: boolean;
|
|
701
|
+
downDisabled?: boolean;
|
|
702
|
+
/** Attach to the grip element (drag activation surface). */
|
|
703
|
+
gripRef?: react__default.Ref<HTMLButtonElement>;
|
|
704
|
+
onGripClick?: (e: react__default.MouseEvent) => void;
|
|
705
|
+
/** Positioning within the parent panel is the consumer's responsibility. */
|
|
706
|
+
style?: react__default.CSSProperties;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Channel-strip reorder rail: chevron-up / drag-grip / chevron-down stacked
|
|
710
|
+
* vertically. Fades to 55% opacity at rest, full opacity on hover/focus.
|
|
711
|
+
*/
|
|
712
|
+
declare const ReorderRail: react__default.FC<ReorderRailProps>;
|
|
713
|
+
|
|
691
714
|
/**
|
|
692
715
|
* TrackControls Slider - Compact slider for volume/pan controls
|
|
693
716
|
*
|
|
@@ -982,4 +1005,4 @@ declare const BaseSlider: styled_components_dist_types.IStyledComponentBase<"web
|
|
|
982
1005
|
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;
|
|
983
1006
|
}, "type">>> & string;
|
|
984
1007
|
|
|
985
|
-
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 };
|
|
1008
|
+
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, GripIcon, Header, InlineLabel, LoopRegion, LoopRegionMarkers, type LoopRegionMarkersProps, type LoopRegionProps, MasterVolumeControl, type MasterVolumeControlProps, MoveDownIcon, MoveUpIcon, PianoRollChannel, type PianoRollChannelProps, Playhead, type PlayheadProps, PlayheadWithMarker, Playlist, PlaylistErrorBoundary, type PlaylistErrorBoundaryProps, PlaylistInfoContext, type PlaylistProps, PlayoutProvider, type PrecomputedTickData, type RenderPlayheadFunction, ReorderRail, type ReorderRailProps, 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
|
@@ -60,11 +60,14 @@ __export(index_exports, {
|
|
|
60
60
|
DevicePixelRatioProvider: () => DevicePixelRatioProvider,
|
|
61
61
|
DotsIcon: () => DotsIcon,
|
|
62
62
|
FadeOverlay: () => FadeOverlay,
|
|
63
|
+
GripIcon: () => GripIcon,
|
|
63
64
|
Header: () => Header,
|
|
64
65
|
InlineLabel: () => InlineLabel,
|
|
65
66
|
LoopRegion: () => LoopRegion,
|
|
66
67
|
LoopRegionMarkers: () => LoopRegionMarkers,
|
|
67
68
|
MasterVolumeControl: () => MasterVolumeControl,
|
|
69
|
+
MoveDownIcon: () => MoveDownIcon,
|
|
70
|
+
MoveUpIcon: () => MoveUpIcon,
|
|
68
71
|
PianoRollChannel: () => PianoRollChannel,
|
|
69
72
|
Playhead: () => Playhead,
|
|
70
73
|
PlayheadWithMarker: () => PlayheadWithMarker,
|
|
@@ -72,6 +75,7 @@ __export(index_exports, {
|
|
|
72
75
|
PlaylistErrorBoundary: () => PlaylistErrorBoundary,
|
|
73
76
|
PlaylistInfoContext: () => PlaylistInfoContext,
|
|
74
77
|
PlayoutProvider: () => PlayoutProvider,
|
|
78
|
+
ReorderRail: () => ReorderRail,
|
|
75
79
|
ScreenReaderOnly: () => ScreenReaderOnly,
|
|
76
80
|
ScrollViewportProvider: () => ScrollViewportProvider,
|
|
77
81
|
SegmentedVUMeter: () => SegmentedVUMeter,
|
|
@@ -1060,6 +1064,7 @@ var PlaylistErrorBoundary = class extends import_react5.default.Component {
|
|
|
1060
1064
|
// src/components/Clip.tsx
|
|
1061
1065
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1062
1066
|
var import_react7 = require("@dnd-kit/react");
|
|
1067
|
+
var import_dom = require("@dnd-kit/dom");
|
|
1063
1068
|
|
|
1064
1069
|
// src/components/ClipHeader.tsx
|
|
1065
1070
|
var import_styled_components10 = __toESM(require("styled-components"));
|
|
@@ -1259,6 +1264,8 @@ var FadeOverlay = ({
|
|
|
1259
1264
|
// src/components/Clip.tsx
|
|
1260
1265
|
var import_core2 = require("@waveform-playlist/core");
|
|
1261
1266
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1267
|
+
var CLIP_MOVE_PLUGINS = [import_dom.Feedback.configure({ dropAnimation: null })];
|
|
1268
|
+
var TRIM_HANDLE_PLUGINS = [import_dom.Feedback.configure({ feedback: "none" })];
|
|
1262
1269
|
var ClipContainer = import_styled_components13.default.div.attrs((props) => ({
|
|
1263
1270
|
style: props.$isOverlay ? {} : {
|
|
1264
1271
|
left: `${props.$left}px`,
|
|
@@ -1312,21 +1319,22 @@ var Clip = ({
|
|
|
1312
1319
|
} = (0, import_react7.useDraggable)({
|
|
1313
1320
|
id: draggableId,
|
|
1314
1321
|
data: { clipId, trackIndex, clipIndex, startSample, durationSamples },
|
|
1315
|
-
disabled: !enableDrag
|
|
1322
|
+
disabled: !enableDrag,
|
|
1323
|
+
plugins: CLIP_MOVE_PLUGINS
|
|
1316
1324
|
});
|
|
1317
1325
|
const leftBoundaryId = `clip-boundary-left-${trackIndex}-${clipIndex}`;
|
|
1318
1326
|
const { ref: leftBoundaryRef, isDragSource: isLeftBoundaryDragging } = (0, import_react7.useDraggable)({
|
|
1319
1327
|
id: leftBoundaryId,
|
|
1320
1328
|
data: { clipId, trackIndex, clipIndex, boundary: "left", startSample, durationSamples },
|
|
1321
1329
|
disabled: !enableDrag,
|
|
1322
|
-
|
|
1330
|
+
plugins: TRIM_HANDLE_PLUGINS
|
|
1323
1331
|
});
|
|
1324
1332
|
const rightBoundaryId = `clip-boundary-right-${trackIndex}-${clipIndex}`;
|
|
1325
1333
|
const { ref: rightBoundaryRef, isDragSource: isRightBoundaryDragging } = (0, import_react7.useDraggable)({
|
|
1326
1334
|
id: rightBoundaryId,
|
|
1327
1335
|
data: { clipId, trackIndex, clipIndex, boundary: "right", startSample, durationSamples },
|
|
1328
1336
|
disabled: !enableDrag,
|
|
1329
|
-
|
|
1337
|
+
plugins: TRIM_HANDLE_PLUGINS
|
|
1330
1338
|
});
|
|
1331
1339
|
const style = isDragSource ? { zIndex: 100 } : void 0;
|
|
1332
1340
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
@@ -3326,9 +3334,103 @@ var import_react28 = require("@phosphor-icons/react");
|
|
|
3326
3334
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3327
3335
|
var DotsIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react28.DotsThreeIcon, { weight: "bold", ...props });
|
|
3328
3336
|
|
|
3329
|
-
// src/components/TrackControls/
|
|
3337
|
+
// src/components/TrackControls/GripIcon.tsx
|
|
3338
|
+
var import_react29 = require("@phosphor-icons/react");
|
|
3339
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3340
|
+
var GripIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react29.DotsSixVerticalIcon, { weight: "bold", ...props });
|
|
3341
|
+
|
|
3342
|
+
// src/components/TrackControls/MoveUpIcon.tsx
|
|
3343
|
+
var import_react30 = require("@phosphor-icons/react");
|
|
3344
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3345
|
+
var MoveUpIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react30.CaretUpIcon, { weight: "bold", ...props });
|
|
3346
|
+
|
|
3347
|
+
// src/components/TrackControls/MoveDownIcon.tsx
|
|
3348
|
+
var import_react31 = require("@phosphor-icons/react");
|
|
3349
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3350
|
+
var MoveDownIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react31.CaretDownIcon, { weight: "bold", ...props });
|
|
3351
|
+
|
|
3352
|
+
// src/components/TrackControls/ReorderRail.tsx
|
|
3330
3353
|
var import_styled_components32 = __toESM(require("styled-components"));
|
|
3331
|
-
var
|
|
3354
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3355
|
+
var Rail = import_styled_components32.default.div`
|
|
3356
|
+
display: flex;
|
|
3357
|
+
flex-direction: column;
|
|
3358
|
+
align-items: center;
|
|
3359
|
+
gap: 2px;
|
|
3360
|
+
color: ${(props) => props.theme.textColor};
|
|
3361
|
+
opacity: 0.55;
|
|
3362
|
+
transition: opacity 0.15s ease-in-out;
|
|
3363
|
+
|
|
3364
|
+
&:hover,
|
|
3365
|
+
&:focus-within {
|
|
3366
|
+
opacity: 1;
|
|
3367
|
+
}
|
|
3368
|
+
`;
|
|
3369
|
+
var RailButton = import_styled_components32.default.button.attrs({ type: "button" })`
|
|
3370
|
+
border: none;
|
|
3371
|
+
background: transparent;
|
|
3372
|
+
color: inherit;
|
|
3373
|
+
padding: 0;
|
|
3374
|
+
display: flex;
|
|
3375
|
+
align-items: center;
|
|
3376
|
+
justify-content: center;
|
|
3377
|
+
border-radius: ${(props) => props.theme.borderRadius};
|
|
3378
|
+
|
|
3379
|
+
&:focus-visible {
|
|
3380
|
+
outline: none;
|
|
3381
|
+
box-shadow: 0 0 0 0.2rem ${(props) => props.theme.inputFocusBorder}33;
|
|
3382
|
+
}
|
|
3383
|
+
`;
|
|
3384
|
+
var ChevronButton = (0, import_styled_components32.default)(RailButton)`
|
|
3385
|
+
width: 16px;
|
|
3386
|
+
height: 14px;
|
|
3387
|
+
cursor: pointer;
|
|
3388
|
+
|
|
3389
|
+
&:hover:not(:disabled) {
|
|
3390
|
+
background: ${(props) => props.theme.borderColor};
|
|
3391
|
+
}
|
|
3392
|
+
|
|
3393
|
+
&:disabled {
|
|
3394
|
+
opacity: 0.15;
|
|
3395
|
+
cursor: default;
|
|
3396
|
+
}
|
|
3397
|
+
`;
|
|
3398
|
+
var GripButton = (0, import_styled_components32.default)(RailButton)`
|
|
3399
|
+
width: 16px;
|
|
3400
|
+
height: 20px;
|
|
3401
|
+
cursor: grab;
|
|
3402
|
+
touch-action: none;
|
|
3403
|
+
|
|
3404
|
+
&:active {
|
|
3405
|
+
cursor: grabbing;
|
|
3406
|
+
}
|
|
3407
|
+
`;
|
|
3408
|
+
var ReorderRail = ({
|
|
3409
|
+
onMoveUp,
|
|
3410
|
+
onMoveDown,
|
|
3411
|
+
upDisabled = false,
|
|
3412
|
+
downDisabled = false,
|
|
3413
|
+
gripRef,
|
|
3414
|
+
onGripClick,
|
|
3415
|
+
style
|
|
3416
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Rail, { style, children: [
|
|
3417
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChevronButton, { "aria-label": "Move track up", disabled: upDisabled, onClick: onMoveUp, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MoveUpIcon, { size: 12 }) }),
|
|
3418
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3419
|
+
GripButton,
|
|
3420
|
+
{
|
|
3421
|
+
ref: gripRef,
|
|
3422
|
+
"aria-label": "Drag to reorder track",
|
|
3423
|
+
title: "Drag to reorder track",
|
|
3424
|
+
onClick: onGripClick,
|
|
3425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(GripIcon, { size: 14 })
|
|
3426
|
+
}
|
|
3427
|
+
),
|
|
3428
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChevronButton, { "aria-label": "Move track down", disabled: downDisabled, onClick: onMoveDown, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MoveDownIcon, { size: 12 }) })
|
|
3429
|
+
] });
|
|
3430
|
+
|
|
3431
|
+
// src/components/TrackControls/Slider.tsx
|
|
3432
|
+
var import_styled_components33 = __toESM(require("styled-components"));
|
|
3433
|
+
var Slider = (0, import_styled_components33.default)(BaseSlider)`
|
|
3332
3434
|
width: 75%;
|
|
3333
3435
|
height: 5px;
|
|
3334
3436
|
background: ${(props) => props.theme.sliderTrackColor};
|
|
@@ -3380,8 +3482,8 @@ var Slider = (0, import_styled_components32.default)(BaseSlider)`
|
|
|
3380
3482
|
`;
|
|
3381
3483
|
|
|
3382
3484
|
// src/components/TrackControls/SliderWrapper.tsx
|
|
3383
|
-
var
|
|
3384
|
-
var SliderWrapper =
|
|
3485
|
+
var import_styled_components34 = __toESM(require("styled-components"));
|
|
3486
|
+
var SliderWrapper = import_styled_components34.default.label`
|
|
3385
3487
|
width: 100%;
|
|
3386
3488
|
display: flex;
|
|
3387
3489
|
justify-content: space-between;
|
|
@@ -3392,15 +3494,15 @@ var SliderWrapper = import_styled_components33.default.label`
|
|
|
3392
3494
|
`;
|
|
3393
3495
|
|
|
3394
3496
|
// src/components/TrackMenu.tsx
|
|
3395
|
-
var
|
|
3497
|
+
var import_react32 = __toESM(require("react"));
|
|
3396
3498
|
var import_react_dom = require("react-dom");
|
|
3397
|
-
var
|
|
3398
|
-
var
|
|
3399
|
-
var MenuContainer =
|
|
3499
|
+
var import_styled_components35 = __toESM(require("styled-components"));
|
|
3500
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3501
|
+
var MenuContainer = import_styled_components35.default.div`
|
|
3400
3502
|
position: relative;
|
|
3401
3503
|
display: inline-block;
|
|
3402
3504
|
`;
|
|
3403
|
-
var MenuButton =
|
|
3505
|
+
var MenuButton = import_styled_components35.default.button`
|
|
3404
3506
|
background: none;
|
|
3405
3507
|
border: none;
|
|
3406
3508
|
cursor: pointer;
|
|
@@ -3416,7 +3518,7 @@ var MenuButton = import_styled_components34.default.button`
|
|
|
3416
3518
|
}
|
|
3417
3519
|
`;
|
|
3418
3520
|
var DROPDOWN_MIN_WIDTH = 180;
|
|
3419
|
-
var Dropdown =
|
|
3521
|
+
var Dropdown = import_styled_components35.default.div`
|
|
3420
3522
|
position: fixed;
|
|
3421
3523
|
top: ${(p) => p.$top}px;
|
|
3422
3524
|
left: ${(p) => p.$left}px;
|
|
@@ -3429,19 +3531,19 @@ var Dropdown = import_styled_components34.default.div`
|
|
|
3429
3531
|
min-width: ${DROPDOWN_MIN_WIDTH}px;
|
|
3430
3532
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
3431
3533
|
`;
|
|
3432
|
-
var Divider =
|
|
3534
|
+
var Divider = import_styled_components35.default.hr`
|
|
3433
3535
|
border: none;
|
|
3434
3536
|
border-top: 1px solid rgba(128, 128, 128, 0.3);
|
|
3435
3537
|
margin: 0.35rem 0;
|
|
3436
3538
|
`;
|
|
3437
3539
|
var TrackMenu = ({ items: itemsProp }) => {
|
|
3438
|
-
const [open, setOpen] = (0,
|
|
3439
|
-
const close = (0,
|
|
3540
|
+
const [open, setOpen] = (0, import_react32.useState)(false);
|
|
3541
|
+
const close = (0, import_react32.useCallback)(() => setOpen(false), []);
|
|
3440
3542
|
const items = typeof itemsProp === "function" ? itemsProp(close) : itemsProp;
|
|
3441
|
-
const [dropdownPos, setDropdownPos] = (0,
|
|
3442
|
-
const buttonRef = (0,
|
|
3443
|
-
const dropdownRef = (0,
|
|
3444
|
-
const updatePosition = (0,
|
|
3543
|
+
const [dropdownPos, setDropdownPos] = (0, import_react32.useState)({ top: 0, left: 0 });
|
|
3544
|
+
const buttonRef = (0, import_react32.useRef)(null);
|
|
3545
|
+
const dropdownRef = (0, import_react32.useRef)(null);
|
|
3546
|
+
const updatePosition = (0, import_react32.useCallback)(() => {
|
|
3445
3547
|
if (!buttonRef.current) return;
|
|
3446
3548
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
3447
3549
|
const vw = window.innerWidth;
|
|
@@ -3458,7 +3560,7 @@ var TrackMenu = ({ items: itemsProp }) => {
|
|
|
3458
3560
|
}
|
|
3459
3561
|
setDropdownPos({ top, left });
|
|
3460
3562
|
}, []);
|
|
3461
|
-
(0,
|
|
3563
|
+
(0, import_react32.useEffect)(() => {
|
|
3462
3564
|
if (!open) return;
|
|
3463
3565
|
updatePosition();
|
|
3464
3566
|
const rafId = requestAnimationFrame(() => updatePosition());
|
|
@@ -3472,7 +3574,7 @@ var TrackMenu = ({ items: itemsProp }) => {
|
|
|
3472
3574
|
window.removeEventListener("resize", onResize);
|
|
3473
3575
|
};
|
|
3474
3576
|
}, [open, updatePosition]);
|
|
3475
|
-
(0,
|
|
3577
|
+
(0, import_react32.useEffect)(() => {
|
|
3476
3578
|
if (!open) return;
|
|
3477
3579
|
const handleClick = (e) => {
|
|
3478
3580
|
const target = e.target;
|
|
@@ -3492,8 +3594,8 @@ var TrackMenu = ({ items: itemsProp }) => {
|
|
|
3492
3594
|
document.removeEventListener("keydown", handleKeyDown);
|
|
3493
3595
|
};
|
|
3494
3596
|
}, [open]);
|
|
3495
|
-
return /* @__PURE__ */ (0,
|
|
3496
|
-
/* @__PURE__ */ (0,
|
|
3597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(MenuContainer, { children: [
|
|
3598
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3497
3599
|
MenuButton,
|
|
3498
3600
|
{
|
|
3499
3601
|
ref: buttonRef,
|
|
@@ -3504,19 +3606,19 @@ var TrackMenu = ({ items: itemsProp }) => {
|
|
|
3504
3606
|
onMouseDown: (e) => e.stopPropagation(),
|
|
3505
3607
|
title: "Track menu",
|
|
3506
3608
|
"aria-label": "Track menu",
|
|
3507
|
-
children: /* @__PURE__ */ (0,
|
|
3609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DotsIcon, { size: 16 })
|
|
3508
3610
|
}
|
|
3509
3611
|
),
|
|
3510
3612
|
open && typeof document !== "undefined" && (0, import_react_dom.createPortal)(
|
|
3511
|
-
/* @__PURE__ */ (0,
|
|
3613
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3512
3614
|
Dropdown,
|
|
3513
3615
|
{
|
|
3514
3616
|
ref: dropdownRef,
|
|
3515
3617
|
$top: dropdownPos.top,
|
|
3516
3618
|
$left: dropdownPos.left,
|
|
3517
3619
|
onMouseDown: (e) => e.stopPropagation(),
|
|
3518
|
-
children: items.map((item, index) => /* @__PURE__ */ (0,
|
|
3519
|
-
index > 0 && /* @__PURE__ */ (0,
|
|
3620
|
+
children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react32.default.Fragment, { children: [
|
|
3621
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Divider, {}),
|
|
3520
3622
|
item.content
|
|
3521
3623
|
] }, item.id))
|
|
3522
3624
|
}
|
|
@@ -3527,10 +3629,10 @@ var TrackMenu = ({ items: itemsProp }) => {
|
|
|
3527
3629
|
};
|
|
3528
3630
|
|
|
3529
3631
|
// src/components/SegmentedVUMeter.tsx
|
|
3530
|
-
var
|
|
3531
|
-
var
|
|
3632
|
+
var import_react33 = __toESM(require("react"));
|
|
3633
|
+
var import_styled_components36 = __toESM(require("styled-components"));
|
|
3532
3634
|
var import_core8 = require("@waveform-playlist/core");
|
|
3533
|
-
var
|
|
3635
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3534
3636
|
var DEFAULT_COLOR_STOPS = [
|
|
3535
3637
|
{ dB: 2, color: "#ff0000" },
|
|
3536
3638
|
{ dB: -1, color: "#e74c3c" },
|
|
@@ -3567,23 +3669,23 @@ function computeThresholds(segmentCount, dBRange) {
|
|
|
3567
3669
|
function formatDbLabel(dB) {
|
|
3568
3670
|
return Math.round(dB).toString();
|
|
3569
3671
|
}
|
|
3570
|
-
var MeterContainer =
|
|
3672
|
+
var MeterContainer = import_styled_components36.default.div`
|
|
3571
3673
|
display: inline-flex;
|
|
3572
3674
|
flex-direction: ${(props) => props.$orientation === "horizontal" ? "column" : "row"};
|
|
3573
3675
|
gap: 4px;
|
|
3574
3676
|
font-family: 'Courier New', monospace;
|
|
3575
3677
|
`;
|
|
3576
|
-
var ChannelColumn =
|
|
3678
|
+
var ChannelColumn = import_styled_components36.default.div`
|
|
3577
3679
|
display: flex;
|
|
3578
3680
|
flex-direction: ${(props) => props.$orientation === "horizontal" ? "row" : "column"};
|
|
3579
3681
|
align-items: center;
|
|
3580
3682
|
gap: 4px;
|
|
3581
3683
|
`;
|
|
3582
|
-
var SegmentStack =
|
|
3684
|
+
var SegmentStack = import_styled_components36.default.div`
|
|
3583
3685
|
display: flex;
|
|
3584
3686
|
flex-direction: ${(props) => props.$orientation === "horizontal" ? "row" : "column"};
|
|
3585
3687
|
`;
|
|
3586
|
-
var Segment =
|
|
3688
|
+
var Segment = import_styled_components36.default.div.attrs((props) => ({
|
|
3587
3689
|
style: {
|
|
3588
3690
|
width: `${props.$width}px`,
|
|
3589
3691
|
height: `${props.$height}px`,
|
|
@@ -3596,19 +3698,19 @@ var Segment = import_styled_components35.default.div.attrs((props) => ({
|
|
|
3596
3698
|
border-radius: 1px;
|
|
3597
3699
|
`;
|
|
3598
3700
|
var DEFAULT_LABEL_COLOR = "#888";
|
|
3599
|
-
var ChannelLabel =
|
|
3701
|
+
var ChannelLabel = import_styled_components36.default.div`
|
|
3600
3702
|
color: ${(props) => props.$labelColor};
|
|
3601
3703
|
font-size: 10px;
|
|
3602
3704
|
text-align: center;
|
|
3603
3705
|
user-select: none;
|
|
3604
3706
|
`;
|
|
3605
|
-
var ScaleColumn =
|
|
3707
|
+
var ScaleColumn = import_styled_components36.default.div`
|
|
3606
3708
|
display: flex;
|
|
3607
3709
|
flex-direction: column;
|
|
3608
3710
|
position: relative;
|
|
3609
3711
|
min-width: 28px;
|
|
3610
3712
|
`;
|
|
3611
|
-
var ScaleLabel =
|
|
3713
|
+
var ScaleLabel = import_styled_components36.default.div.attrs((props) => ({
|
|
3612
3714
|
style: {
|
|
3613
3715
|
top: `${props.$top}px`,
|
|
3614
3716
|
color: props.$labelColor
|
|
@@ -3622,19 +3724,19 @@ var ScaleLabel = import_styled_components35.default.div.attrs((props) => ({
|
|
|
3622
3724
|
transform: translate(-50%, -50%);
|
|
3623
3725
|
user-select: none;
|
|
3624
3726
|
`;
|
|
3625
|
-
var HorizontalScaleWrapper =
|
|
3727
|
+
var HorizontalScaleWrapper = import_styled_components36.default.div`
|
|
3626
3728
|
display: flex;
|
|
3627
3729
|
flex-direction: row;
|
|
3628
3730
|
align-items: center;
|
|
3629
3731
|
gap: 4px;
|
|
3630
3732
|
`;
|
|
3631
|
-
var ScaleRow =
|
|
3733
|
+
var ScaleRow = import_styled_components36.default.div`
|
|
3632
3734
|
display: flex;
|
|
3633
3735
|
flex-direction: row;
|
|
3634
3736
|
position: relative;
|
|
3635
3737
|
min-height: 16px;
|
|
3636
3738
|
`;
|
|
3637
|
-
var ScaleLabelHorizontal =
|
|
3739
|
+
var ScaleLabelHorizontal = import_styled_components36.default.div.attrs((props) => ({
|
|
3638
3740
|
style: {
|
|
3639
3741
|
left: `${props.$left}px`,
|
|
3640
3742
|
color: props.$labelColor
|
|
@@ -3675,11 +3777,11 @@ var SegmentedVUMeterInner = ({
|
|
|
3675
3777
|
const isMultiChannel = channelCount >= 2;
|
|
3676
3778
|
const segmentTotalHeight = segmentHeight + segmentGap;
|
|
3677
3779
|
const [dBMin, dBMax] = dBRange;
|
|
3678
|
-
const thresholds = (0,
|
|
3780
|
+
const thresholds = (0, import_react33.useMemo)(
|
|
3679
3781
|
() => computeThresholds(segmentCount, [dBMin, dBMax]),
|
|
3680
3782
|
[segmentCount, dBMin, dBMax]
|
|
3681
3783
|
);
|
|
3682
|
-
const scaleLabels = (0,
|
|
3784
|
+
const scaleLabels = (0, import_react33.useMemo)(() => {
|
|
3683
3785
|
const totalSize = segmentCount * segmentTotalHeight - segmentGap;
|
|
3684
3786
|
const minDb = dBMin;
|
|
3685
3787
|
const maxDb = dBMax;
|
|
@@ -3699,7 +3801,7 @@ var SegmentedVUMeterInner = ({
|
|
|
3699
3801
|
}
|
|
3700
3802
|
return labels2;
|
|
3701
3803
|
}, [orientation, segmentCount, segmentTotalHeight, segmentGap, dBMin, dBMax]);
|
|
3702
|
-
const renderThresholds = (0,
|
|
3804
|
+
const renderThresholds = (0, import_react33.useMemo)(
|
|
3703
3805
|
() => orientation === "horizontal" ? [...thresholds].reverse() : thresholds,
|
|
3704
3806
|
[thresholds, orientation]
|
|
3705
3807
|
);
|
|
@@ -3718,13 +3820,13 @@ var SegmentedVUMeterInner = ({
|
|
|
3718
3820
|
}
|
|
3719
3821
|
}
|
|
3720
3822
|
}
|
|
3721
|
-
return /* @__PURE__ */ (0,
|
|
3722
|
-
orientation === "horizontal" && /* @__PURE__ */ (0,
|
|
3723
|
-
/* @__PURE__ */ (0,
|
|
3823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(ChannelColumn, { $orientation: orientation, "data-channel": true, children: [
|
|
3824
|
+
orientation === "horizontal" && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ChannelLabel, { $labelColor: resolvedLabelColor, children: labels[channelIndex] }),
|
|
3825
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SegmentStack, { $orientation: orientation, children: renderThresholds.map((threshold, segIdx) => {
|
|
3724
3826
|
const active = levelDb >= threshold;
|
|
3725
3827
|
const isPeak = segIdx === peakSegmentIndex;
|
|
3726
3828
|
const color = getColorForDb(threshold, colorStops);
|
|
3727
|
-
return /* @__PURE__ */ (0,
|
|
3829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3728
3830
|
Segment,
|
|
3729
3831
|
{
|
|
3730
3832
|
$width: orientation === "horizontal" ? segmentHeight : segmentWidth,
|
|
@@ -3741,23 +3843,23 @@ var SegmentedVUMeterInner = ({
|
|
|
3741
3843
|
segIdx
|
|
3742
3844
|
);
|
|
3743
3845
|
}) }),
|
|
3744
|
-
orientation === "vertical" && /* @__PURE__ */ (0,
|
|
3846
|
+
orientation === "vertical" && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ChannelLabel, { $labelColor: resolvedLabelColor, children: labels[channelIndex] })
|
|
3745
3847
|
] }, channelIndex);
|
|
3746
3848
|
};
|
|
3747
3849
|
const renderScale = () => {
|
|
3748
3850
|
if (orientation === "horizontal") {
|
|
3749
3851
|
const totalWidth = segmentCount * segmentTotalHeight - segmentGap;
|
|
3750
|
-
return /* @__PURE__ */ (0,
|
|
3751
|
-
/* @__PURE__ */ (0,
|
|
3752
|
-
/* @__PURE__ */ (0,
|
|
3852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(HorizontalScaleWrapper, { children: [
|
|
3853
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ChannelLabel, { $labelColor: resolvedLabelColor, style: { visibility: "hidden" }, children: "L" }),
|
|
3854
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ScaleRow, { style: { width: `${totalWidth}px` }, children: scaleLabels.map(({ position, label }, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ScaleLabelHorizontal, { $left: position, $labelColor: resolvedLabelColor, children: label }, i)) })
|
|
3753
3855
|
] });
|
|
3754
3856
|
}
|
|
3755
3857
|
const totalHeight = segmentCount * segmentTotalHeight - segmentGap;
|
|
3756
|
-
return /* @__PURE__ */ (0,
|
|
3858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ScaleColumn, { style: { height: `${totalHeight}px` }, children: scaleLabels.map(({ position, label }, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ScaleLabel, { $top: position, $labelColor: resolvedLabelColor, children: label }, i)) });
|
|
3757
3859
|
};
|
|
3758
3860
|
if (isMultiChannel) {
|
|
3759
3861
|
if (orientation === "horizontal") {
|
|
3760
|
-
return /* @__PURE__ */ (0,
|
|
3862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3761
3863
|
MeterContainer,
|
|
3762
3864
|
{
|
|
3763
3865
|
className,
|
|
@@ -3773,7 +3875,7 @@ var SegmentedVUMeterInner = ({
|
|
|
3773
3875
|
const midpoint = Math.ceil(channelCount / 2);
|
|
3774
3876
|
const leftChannels = Array.from({ length: midpoint }, (_, i) => i);
|
|
3775
3877
|
const rightChannels = Array.from({ length: channelCount - midpoint }, (_, i) => midpoint + i);
|
|
3776
|
-
return /* @__PURE__ */ (0,
|
|
3878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3777
3879
|
MeterContainer,
|
|
3778
3880
|
{
|
|
3779
3881
|
className,
|
|
@@ -3787,7 +3889,7 @@ var SegmentedVUMeterInner = ({
|
|
|
3787
3889
|
}
|
|
3788
3890
|
);
|
|
3789
3891
|
}
|
|
3790
|
-
return /* @__PURE__ */ (0,
|
|
3892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3791
3893
|
MeterContainer,
|
|
3792
3894
|
{
|
|
3793
3895
|
className,
|
|
@@ -3800,7 +3902,7 @@ var SegmentedVUMeterInner = ({
|
|
|
3800
3902
|
}
|
|
3801
3903
|
);
|
|
3802
3904
|
};
|
|
3803
|
-
var SegmentedVUMeter =
|
|
3905
|
+
var SegmentedVUMeter = import_react33.default.memo(SegmentedVUMeterInner);
|
|
3804
3906
|
|
|
3805
3907
|
// src/utils/conversions.ts
|
|
3806
3908
|
function samplesToSeconds(samples, sampleRate) {
|
|
@@ -3853,11 +3955,14 @@ function secondsToPixels2(seconds, samplesPerPixel, sampleRate) {
|
|
|
3853
3955
|
DevicePixelRatioProvider,
|
|
3854
3956
|
DotsIcon,
|
|
3855
3957
|
FadeOverlay,
|
|
3958
|
+
GripIcon,
|
|
3856
3959
|
Header,
|
|
3857
3960
|
InlineLabel,
|
|
3858
3961
|
LoopRegion,
|
|
3859
3962
|
LoopRegionMarkers,
|
|
3860
3963
|
MasterVolumeControl,
|
|
3964
|
+
MoveDownIcon,
|
|
3965
|
+
MoveUpIcon,
|
|
3861
3966
|
PianoRollChannel,
|
|
3862
3967
|
Playhead,
|
|
3863
3968
|
PlayheadWithMarker,
|
|
@@ -3865,6 +3970,7 @@ function secondsToPixels2(seconds, samplesPerPixel, sampleRate) {
|
|
|
3865
3970
|
PlaylistErrorBoundary,
|
|
3866
3971
|
PlaylistInfoContext,
|
|
3867
3972
|
PlayoutProvider,
|
|
3973
|
+
ReorderRail,
|
|
3868
3974
|
ScreenReaderOnly,
|
|
3869
3975
|
ScrollViewportProvider,
|
|
3870
3976
|
SegmentedVUMeter,
|