@waveform-playlist/browser 15.4.0 → 16.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 +10 -23
- package/dist/index.d.ts +10 -23
- package/dist/index.js +10 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.mjs
CHANGED
|
@@ -3767,6 +3767,7 @@ import {
|
|
|
3767
3767
|
import { useCallback as useCallback16, useEffect as useEffect8, useRef as useRef12 } from "react";
|
|
3768
3768
|
import { useSortable } from "@dnd-kit/react/sortable";
|
|
3769
3769
|
import { RestrictToVerticalAxis } from "@dnd-kit/abstract/modifiers";
|
|
3770
|
+
import { Feedback } from "@dnd-kit/dom";
|
|
3770
3771
|
|
|
3771
3772
|
// src/utils/dragPopoverHealer.ts
|
|
3772
3773
|
function createDragPopoverHealer(element) {
|
|
@@ -3797,6 +3798,8 @@ function createDragPopoverHealer(element) {
|
|
|
3797
3798
|
|
|
3798
3799
|
// src/components/SortableTrackControls.tsx
|
|
3799
3800
|
import { Fragment, jsx as jsx7 } from "react/jsx-runtime";
|
|
3801
|
+
var MOVE_FEEDBACK = Feedback.configure({ feedback: "move" });
|
|
3802
|
+
var withMoveFeedback = (defaults) => [...defaults, MOVE_FEEDBACK];
|
|
3800
3803
|
var SortableTrackControls = ({
|
|
3801
3804
|
trackId,
|
|
3802
3805
|
index,
|
|
@@ -3812,6 +3815,12 @@ var SortableTrackControls = ({
|
|
|
3812
3815
|
data: { kind: "track-reorder", trackId },
|
|
3813
3816
|
modifiers: [RestrictToVerticalAxis],
|
|
3814
3817
|
disabled,
|
|
3818
|
+
// Per-entity Feedback config (@dnd-kit 0.5+ moved `feedback` out of the
|
|
3819
|
+
// hook options into `plugins`). The FUNCTION form extends the sortable's
|
|
3820
|
+
// default plugins — a bare array would silently drop
|
|
3821
|
+
// OptimisticSortingPlugin, which drives the live `sortable.index` that
|
|
3822
|
+
// drag-commit reads (covered by sortableTrackControlsFeedbackPlugins.test).
|
|
3823
|
+
//
|
|
3815
3824
|
// feedback: 'move' (NOT 'none' — see below) disables the Feedback
|
|
3816
3825
|
// plugin's placeholder/clone splicing for this sortable while KEEPING its
|
|
3817
3826
|
// dragOperation.shape computation alive. That plugin does raw,
|
|
@@ -3837,7 +3846,7 @@ var SortableTrackControls = ({
|
|
|
3837
3846
|
// sortables need shape. `isDragSource` (box-shadow lift feedback below)
|
|
3838
3847
|
// is a reactive signal, unaffected either way. See browser/CLAUDE.md
|
|
3839
3848
|
// "Track Reordering".
|
|
3840
|
-
|
|
3849
|
+
plugins: withMoveFeedback
|
|
3841
3850
|
});
|
|
3842
3851
|
const elementRef = useRef12(null);
|
|
3843
3852
|
const composedRef = useCallback16(
|
|
@@ -5047,25 +5056,6 @@ import {
|
|
|
5047
5056
|
waveformColorToCss as waveformColorToCss4
|
|
5048
5057
|
} from "@waveform-playlist/ui-components";
|
|
5049
5058
|
|
|
5050
|
-
// src/plugins/noDropAnimationPlugins.ts
|
|
5051
|
-
import { Feedback } from "@dnd-kit/dom";
|
|
5052
|
-
var noDropAnimationPlugins = (defaults) => {
|
|
5053
|
-
let feedbackFound = false;
|
|
5054
|
-
const result = defaults.map((p) => {
|
|
5055
|
-
if (p === Feedback) {
|
|
5056
|
-
feedbackFound = true;
|
|
5057
|
-
return Feedback.configure({ dropAnimation: null });
|
|
5058
|
-
}
|
|
5059
|
-
return p;
|
|
5060
|
-
});
|
|
5061
|
-
if (!feedbackFound) {
|
|
5062
|
-
console.warn(
|
|
5063
|
-
"[waveform-playlist] noDropAnimationPlugins: Feedback plugin not found in defaults \u2014 drop animation may not be disabled. Check @dnd-kit/dom version."
|
|
5064
|
-
);
|
|
5065
|
-
}
|
|
5066
|
-
return result;
|
|
5067
|
-
};
|
|
5068
|
-
|
|
5069
5059
|
// src/components/AnimatedMediaElementPlayhead.tsx
|
|
5070
5060
|
import { useRef as useRef16, useEffect as useEffect13 } from "react";
|
|
5071
5061
|
import styled5 from "styled-components";
|
|
@@ -5517,7 +5507,6 @@ var MediaElementPlaylist = ({
|
|
|
5517
5507
|
onDragMove,
|
|
5518
5508
|
onDragEnd,
|
|
5519
5509
|
modifiers: editable ? [RestrictToHorizontalAxis] : [],
|
|
5520
|
-
plugins: noDropAnimationPlugins,
|
|
5521
5510
|
children: /* @__PURE__ */ jsx15(annotationIntegration.AnnotationBoxesWrapper, { height: 30, width: tracksFullWidth, children: annotations.map((annotation, index) => {
|
|
5522
5511
|
const startPosition = annotation.start * sampleRate / samplesPerPixel;
|
|
5523
5512
|
const endPosition = annotation.end * sampleRate / samplesPerPixel;
|
|
@@ -5933,7 +5922,6 @@ var ClipInteractionProvider = ({
|
|
|
5933
5922
|
onDragOver: handleDragOver,
|
|
5934
5923
|
onDragEnd: handleDragEnd,
|
|
5935
5924
|
modifiers,
|
|
5936
|
-
plugins: noDropAnimationPlugins,
|
|
5937
5925
|
children
|
|
5938
5926
|
}
|
|
5939
5927
|
) });
|
|
@@ -5979,7 +5967,6 @@ export {
|
|
|
5979
5967
|
getWaveformDataMetadata,
|
|
5980
5968
|
loadPeaksFromWaveformData,
|
|
5981
5969
|
loadWaveformData,
|
|
5982
|
-
noDropAnimationPlugins,
|
|
5983
5970
|
useAnnotationDragHandlers,
|
|
5984
5971
|
useAnnotationIntegration,
|
|
5985
5972
|
useAnnotationKeyboardControls,
|