@waveform-playlist/ui-components 13.2.0 → 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.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- 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.js
CHANGED
|
@@ -1064,6 +1064,7 @@ var PlaylistErrorBoundary = class extends import_react5.default.Component {
|
|
|
1064
1064
|
// src/components/Clip.tsx
|
|
1065
1065
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1066
1066
|
var import_react7 = require("@dnd-kit/react");
|
|
1067
|
+
var import_dom = require("@dnd-kit/dom");
|
|
1067
1068
|
|
|
1068
1069
|
// src/components/ClipHeader.tsx
|
|
1069
1070
|
var import_styled_components10 = __toESM(require("styled-components"));
|
|
@@ -1263,6 +1264,8 @@ var FadeOverlay = ({
|
|
|
1263
1264
|
// src/components/Clip.tsx
|
|
1264
1265
|
var import_core2 = require("@waveform-playlist/core");
|
|
1265
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" })];
|
|
1266
1269
|
var ClipContainer = import_styled_components13.default.div.attrs((props) => ({
|
|
1267
1270
|
style: props.$isOverlay ? {} : {
|
|
1268
1271
|
left: `${props.$left}px`,
|
|
@@ -1316,21 +1319,22 @@ var Clip = ({
|
|
|
1316
1319
|
} = (0, import_react7.useDraggable)({
|
|
1317
1320
|
id: draggableId,
|
|
1318
1321
|
data: { clipId, trackIndex, clipIndex, startSample, durationSamples },
|
|
1319
|
-
disabled: !enableDrag
|
|
1322
|
+
disabled: !enableDrag,
|
|
1323
|
+
plugins: CLIP_MOVE_PLUGINS
|
|
1320
1324
|
});
|
|
1321
1325
|
const leftBoundaryId = `clip-boundary-left-${trackIndex}-${clipIndex}`;
|
|
1322
1326
|
const { ref: leftBoundaryRef, isDragSource: isLeftBoundaryDragging } = (0, import_react7.useDraggable)({
|
|
1323
1327
|
id: leftBoundaryId,
|
|
1324
1328
|
data: { clipId, trackIndex, clipIndex, boundary: "left", startSample, durationSamples },
|
|
1325
1329
|
disabled: !enableDrag,
|
|
1326
|
-
|
|
1330
|
+
plugins: TRIM_HANDLE_PLUGINS
|
|
1327
1331
|
});
|
|
1328
1332
|
const rightBoundaryId = `clip-boundary-right-${trackIndex}-${clipIndex}`;
|
|
1329
1333
|
const { ref: rightBoundaryRef, isDragSource: isRightBoundaryDragging } = (0, import_react7.useDraggable)({
|
|
1330
1334
|
id: rightBoundaryId,
|
|
1331
1335
|
data: { clipId, trackIndex, clipIndex, boundary: "right", startSample, durationSamples },
|
|
1332
1336
|
disabled: !enableDrag,
|
|
1333
|
-
|
|
1337
|
+
plugins: TRIM_HANDLE_PLUGINS
|
|
1334
1338
|
});
|
|
1335
1339
|
const style = isDragSource ? { zIndex: 100 } : void 0;
|
|
1336
1340
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|