@dnd-kit/react 0.3.0-beta-20260216014448 → 0.3.0-beta-20260427213741

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 CHANGED
@@ -34,11 +34,11 @@ function App() {
34
34
 
35
35
  ## Hooks
36
36
 
37
- | Hook | Import | Description |
38
- | -------------- | ------------------------- | ---------------------------------- |
39
- | `useDraggable` | `@dnd-kit/react` | Make an element draggable |
40
- | `useDroppable` | `@dnd-kit/react` | Create a drop target |
41
- | `useSortable` | `@dnd-kit/react/sortable` | Combine drag and drop with sorting |
37
+ | Hook | Import | Description |
38
+ |---|---|---|
39
+ | `useDraggable` | `@dnd-kit/react` | Make an element draggable |
40
+ | `useDroppable` | `@dnd-kit/react` | Create a drop target |
41
+ | `useSortable` | `@dnd-kit/react/sortable` | Combine drag and drop with sorting |
42
42
 
43
43
  ## Components
44
44
 
@@ -47,4 +47,4 @@ function App() {
47
47
 
48
48
  ## Documentation
49
49
 
50
- Visit [dndkit.com](https://dndkit.com/react) for full documentation, guides, and interactive examples.
50
+ Visit [next.dndkit.com](https://next.dndkit.com/react) for full documentation, guides, and interactive examples.
package/index.cjs CHANGED
@@ -99,10 +99,7 @@ function DragDropProvider(_a2) {
99
99
  "onDragEnd"
100
100
  ]);
101
101
  const rendererRef = react.useRef(null);
102
- const { plugins: pluginsInput, modifiers: modifiersInput, sensors: sensorsInput } = input;
103
- const plugins = dom.resolveCustomizable(pluginsInput, dom.defaultPreset.plugins);
104
- const sensors = dom.resolveCustomizable(sensorsInput, dom.defaultPreset.sensors);
105
- const modifiers = dom.resolveCustomizable(modifiersInput, dom.defaultPreset.modifiers);
102
+ const { plugins, modifiers, sensors } = input;
106
103
  const handleBeforeDragStart = hooks.useLatest(onBeforeDragStart);
107
104
  const handleDragStart = hooks.useLatest(onDragStart);
108
105
  const handleDragOver = hooks.useLatest(onDragOver);
@@ -162,17 +159,17 @@ function DragDropProvider(_a2) {
162
159
  }, [manager]);
163
160
  hooks.useOnValueChange(
164
161
  plugins,
165
- () => manager && (manager.plugins = plugins),
162
+ () => manager && (manager.plugins = plugins != null ? plugins : dom.defaultPreset.plugins),
166
163
  ...options
167
164
  );
168
165
  hooks.useOnValueChange(
169
166
  sensors,
170
- () => manager && (manager.sensors = sensors),
167
+ () => manager && (manager.sensors = sensors != null ? sensors : dom.defaultPreset.sensors),
171
168
  ...options
172
169
  );
173
170
  hooks.useOnValueChange(
174
171
  modifiers,
175
- () => manager && (manager.modifiers = modifiers),
172
+ () => manager && (manager.modifiers = modifiers != null ? modifiers : dom.defaultPreset.modifiers),
176
173
  ...options
177
174
  );
178
175
  return /* @__PURE__ */ jsxRuntime.jsxs(DragDropContext.Provider, { value: manager, children: [
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createContext, memo, forwardRef, useState, useRef, useMemo, startTransition, useImperativeHandle, useEffect, useInsertionEffect, useContext, useCallback, createElement } from 'react';
2
- import { DragDropManager, resolveCustomizable, defaultPreset, Draggable, Feedback, Droppable } from '@dnd-kit/dom';
2
+ import { DragDropManager, defaultPreset, Draggable, Feedback, Droppable } from '@dnd-kit/dom';
3
3
  export { KeyboardSensor, PointerSensor } from '@dnd-kit/dom';
4
4
  import { useIsomorphicLayoutEffect, useLatest, useOnValueChange, useDeepSignal, useOnElementChange, useComputed } from '@dnd-kit/react/hooks';
5
5
  import { deepEqual, ValueHistory, derived, batch } from '@dnd-kit/state';
@@ -98,10 +98,7 @@ function DragDropProvider(_a2) {
98
98
  "onDragEnd"
99
99
  ]);
100
100
  const rendererRef = useRef(null);
101
- const { plugins: pluginsInput, modifiers: modifiersInput, sensors: sensorsInput } = input;
102
- const plugins = resolveCustomizable(pluginsInput, defaultPreset.plugins);
103
- const sensors = resolveCustomizable(sensorsInput, defaultPreset.sensors);
104
- const modifiers = resolveCustomizable(modifiersInput, defaultPreset.modifiers);
101
+ const { plugins, modifiers, sensors } = input;
105
102
  const handleBeforeDragStart = useLatest(onBeforeDragStart);
106
103
  const handleDragStart = useLatest(onDragStart);
107
104
  const handleDragOver = useLatest(onDragOver);
@@ -161,17 +158,17 @@ function DragDropProvider(_a2) {
161
158
  }, [manager]);
162
159
  useOnValueChange(
163
160
  plugins,
164
- () => manager && (manager.plugins = plugins),
161
+ () => manager && (manager.plugins = plugins != null ? plugins : defaultPreset.plugins),
165
162
  ...options
166
163
  );
167
164
  useOnValueChange(
168
165
  sensors,
169
- () => manager && (manager.sensors = sensors),
166
+ () => manager && (manager.sensors = sensors != null ? sensors : defaultPreset.sensors),
170
167
  ...options
171
168
  );
172
169
  useOnValueChange(
173
170
  modifiers,
174
- () => manager && (manager.modifiers = modifiers),
171
+ () => manager && (manager.modifiers = modifiers != null ? modifiers : defaultPreset.modifiers),
175
172
  ...options
176
173
  );
177
174
  return /* @__PURE__ */ jsxs(DragDropContext.Provider, { value: manager, children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnd-kit/react",
3
- "version": "0.3.0-beta-20260216014448",
3
+ "version": "0.3.0-beta-20260427213741",
4
4
  "main": "./index.cjs",
5
5
  "module": "./index.js",
6
6
  "type": "module",
@@ -56,9 +56,9 @@
56
56
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
57
57
  },
58
58
  "dependencies": {
59
- "@dnd-kit/abstract": "0.3.0-beta-20260216014448",
60
- "@dnd-kit/dom": "0.3.0-beta-20260216014448",
61
- "@dnd-kit/state": "0.3.0-beta-20260216014448",
59
+ "@dnd-kit/abstract": "0.3.0-beta-20260427213741",
60
+ "@dnd-kit/dom": "0.3.0-beta-20260427213741",
61
+ "@dnd-kit/state": "0.3.0-beta-20260427213741",
62
62
  "tslib": "^2.6.2"
63
63
  },
64
64
  "peerDependencies": {
package/sortable.cjs CHANGED
@@ -175,10 +175,6 @@ Object.defineProperty(exports, "isSortable", {
175
175
  enumerable: true,
176
176
  get: function () { return sortable.isSortable; }
177
177
  });
178
- Object.defineProperty(exports, "isSortableOperation", {
179
- enumerable: true,
180
- get: function () { return sortable.isSortableOperation; }
181
- });
182
178
  exports.useSortable = useSortable;
183
179
  //# sourceMappingURL=sortable.cjs.map
184
180
  //# sourceMappingURL=sortable.cjs.map
package/sortable.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Data } from '@dnd-kit/abstract';
2
2
  import { SortableInput, Sortable } from '@dnd-kit/dom/sortable';
3
- export { isSortable, isSortableOperation } from '@dnd-kit/dom/sortable';
3
+ export { isSortable } from '@dnd-kit/dom/sortable';
4
4
  import { RefObject, MutableRefObject } from 'react';
5
5
 
6
6
  type Ref<T> = RefObject<T | null | undefined> | MutableRefObject<T>;
package/sortable.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from 'react';
2
2
  import { batch, deepEqual } from '@dnd-kit/state';
3
3
  import { defaultSortableTransition, Sortable } from '@dnd-kit/dom/sortable';
4
- export { isSortable, isSortableOperation } from '@dnd-kit/dom/sortable';
4
+ export { isSortable } from '@dnd-kit/dom/sortable';
5
5
  import { useInstance } from '@dnd-kit/react';
6
6
  import { useDeepSignal, useOnValueChange, useIsomorphicLayoutEffect, useImmediateEffect, useOnElementChange } from '@dnd-kit/react/hooks';
7
7
  import { currentValue } from '@dnd-kit/react/utilities';