@waveform-playlist/ui-components 9.1.0 → 9.1.2

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.mjs CHANGED
@@ -1105,6 +1105,7 @@ var FadeOverlay = ({
1105
1105
  };
1106
1106
 
1107
1107
  // src/components/Clip.tsx
1108
+ import { clipPixelWidth } from "@waveform-playlist/core";
1108
1109
  import { Fragment, jsx as jsx10, jsxs as jsxs2 } from "react/jsx-runtime";
1109
1110
  var ClipContainer = styled13.div.attrs((props) => ({
1110
1111
  style: props.$isOverlay ? {} : {
@@ -1118,13 +1119,8 @@ var ClipContainer = styled13.div.attrs((props) => ({
1118
1119
  width: ${(props) => props.$isOverlay ? `${props.$width}px` : "auto"};
1119
1120
  display: flex;
1120
1121
  flex-direction: column;
1121
- background: rgba(255, 255, 255, 0.05);
1122
1122
  z-index: 10; /* Above progress overlay (z-index: 2) but below controls/playhead */
1123
1123
  pointer-events: none; /* Let clicks pass through to ClickOverlay for playhead positioning */
1124
-
1125
- &:hover {
1126
- background: rgba(255, 255, 255, 0.08);
1127
- }
1128
1124
  `;
1129
1125
  var ChannelsWrapper = styled13.div`
1130
1126
  flex: 1;
@@ -1154,8 +1150,7 @@ var Clip = ({
1154
1150
  touchOptimized = false
1155
1151
  }) => {
1156
1152
  const left = Math.floor(startSample / samplesPerPixel);
1157
- const endPixel = Math.floor((startSample + durationSamples) / samplesPerPixel);
1158
- const width = endPixel - left;
1153
+ const width = clipPixelWidth(startSample, durationSamples, samplesPerPixel);
1159
1154
  const enableDrag = showHeader && !disableHeaderDrag && !isOverlay;
1160
1155
  const draggableId = `clip-${trackIndex}-${clipIndex}`;
1161
1156
  const {
@@ -2036,7 +2031,7 @@ function clockFormat(seconds, decimals) {
2036
2031
  const hours = Math.floor(seconds / 3600) % 24;
2037
2032
  const minutes = Math.floor(seconds / 60) % 60;
2038
2033
  const secs = (seconds % 60).toFixed(decimals);
2039
- return String(hours).padStart(2, "0") + ":" + String(minutes).padStart(2, "0") + ":" + secs.padStart(decimals + 3, "0");
2034
+ return String(hours).padStart(2, "0") + ":" + String(minutes).padStart(2, "0") + ":" + secs.padStart(decimals > 0 ? decimals + 3 : 2, "0");
2040
2035
  }
2041
2036
  function formatTime(seconds, format) {
2042
2037
  switch (format) {