@waveform-playlist/ui-components 5.0.0-alpha.3 → 5.0.0-alpha.5
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 +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -670,6 +670,7 @@ var HeaderContainer = styled10.div`
|
|
|
670
670
|
z-index: 110;
|
|
671
671
|
flex-shrink: 0;
|
|
672
672
|
pointer-events: auto; /* Re-enable pointer events (parent ClipContainer has pointer-events: none) */
|
|
673
|
+
touch-action: ${(props) => props.$interactive ? "none" : "auto"}; /* Prevent browser scroll during drag on touch devices */
|
|
673
674
|
|
|
674
675
|
${(props) => props.$interactive && `
|
|
675
676
|
&:hover {
|
|
@@ -742,16 +743,18 @@ import React2 from "react";
|
|
|
742
743
|
import styled11 from "styled-components";
|
|
743
744
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
744
745
|
var CLIP_BOUNDARY_WIDTH = 8;
|
|
746
|
+
var CLIP_BOUNDARY_WIDTH_TOUCH = 24;
|
|
745
747
|
var BoundaryContainer = styled11.div`
|
|
746
748
|
position: absolute;
|
|
747
749
|
${(props) => props.$edge === "left" ? "left: 0;" : "right: 0;"}
|
|
748
750
|
top: 0;
|
|
749
751
|
bottom: 0;
|
|
750
|
-
width: ${CLIP_BOUNDARY_WIDTH}px;
|
|
752
|
+
width: ${(props) => props.$touchOptimized ? CLIP_BOUNDARY_WIDTH_TOUCH : CLIP_BOUNDARY_WIDTH}px;
|
|
751
753
|
cursor: col-resize;
|
|
752
754
|
user-select: none;
|
|
753
755
|
z-index: 105; /* Above waveform, below header */
|
|
754
756
|
pointer-events: auto; /* Re-enable pointer events (parent ClipContainer has pointer-events: none) */
|
|
757
|
+
touch-action: none; /* Prevent browser scroll during drag on touch devices */
|
|
755
758
|
|
|
756
759
|
/* Invisible by default, visible on hover */
|
|
757
760
|
background: ${(props) => props.$isDragging ? "rgba(255, 255, 255, 0.4)" : props.$isHovered ? "rgba(255, 255, 255, 0.2)" : "transparent"};
|
|
@@ -775,7 +778,8 @@ var ClipBoundary = ({
|
|
|
775
778
|
trackIndex,
|
|
776
779
|
clipIndex,
|
|
777
780
|
edge,
|
|
778
|
-
dragHandleProps
|
|
781
|
+
dragHandleProps,
|
|
782
|
+
touchOptimized = false
|
|
779
783
|
}) => {
|
|
780
784
|
const [isHovered, setIsHovered] = React2.useState(false);
|
|
781
785
|
if (!dragHandleProps) {
|
|
@@ -791,6 +795,7 @@ var ClipBoundary = ({
|
|
|
791
795
|
$edge: edge,
|
|
792
796
|
$isDragging: isDragging,
|
|
793
797
|
$isHovered: isHovered,
|
|
798
|
+
$touchOptimized: touchOptimized,
|
|
794
799
|
onMouseEnter: () => setIsHovered(true),
|
|
795
800
|
onMouseLeave: () => setIsHovered(false),
|
|
796
801
|
...listeners,
|
|
@@ -913,7 +918,8 @@ var Clip = ({
|
|
|
913
918
|
fadeIn,
|
|
914
919
|
fadeOut,
|
|
915
920
|
sampleRate = 44100,
|
|
916
|
-
showFades = false
|
|
921
|
+
showFades = false,
|
|
922
|
+
touchOptimized = false
|
|
917
923
|
}) => {
|
|
918
924
|
const left = Math.floor(startSample / samplesPerPixel);
|
|
919
925
|
const endPixel = Math.floor((startSample + durationSamples) / samplesPerPixel);
|
|
@@ -1006,6 +1012,7 @@ var Clip = ({
|
|
|
1006
1012
|
trackIndex,
|
|
1007
1013
|
clipIndex,
|
|
1008
1014
|
edge: "left",
|
|
1015
|
+
touchOptimized,
|
|
1009
1016
|
dragHandleProps: {
|
|
1010
1017
|
attributes: leftBoundaryAttributes,
|
|
1011
1018
|
listeners: leftBoundaryListeners,
|
|
@@ -1021,6 +1028,7 @@ var Clip = ({
|
|
|
1021
1028
|
trackIndex,
|
|
1022
1029
|
clipIndex,
|
|
1023
1030
|
edge: "right",
|
|
1031
|
+
touchOptimized,
|
|
1024
1032
|
dragHandleProps: {
|
|
1025
1033
|
attributes: rightBoundaryAttributes,
|
|
1026
1034
|
listeners: rightBoundaryListeners,
|
|
@@ -2263,6 +2271,7 @@ export {
|
|
|
2263
2271
|
Button,
|
|
2264
2272
|
ButtonGroup,
|
|
2265
2273
|
CLIP_BOUNDARY_WIDTH,
|
|
2274
|
+
CLIP_BOUNDARY_WIDTH_TOUCH,
|
|
2266
2275
|
CLIP_HEADER_HEIGHT,
|
|
2267
2276
|
Channel,
|
|
2268
2277
|
Clip,
|