@dnd-kit/modifiers 1.0.3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +48 -0
- package/dist/modifiers.cjs.development.js +34 -49
- package/dist/modifiers.cjs.development.js.map +1 -1
- package/dist/modifiers.cjs.production.min.js +1 -1
- package/dist/modifiers.cjs.production.min.js.map +1 -1
- package/dist/modifiers.esm.js +34 -49
- package/dist/modifiers.esm.js.map +1 -1
- package/package.json +8 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,53 @@
|
|
1
1
|
# @dnd-kit/modifiers
|
2
2
|
|
3
|
+
## 2.1.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [`68960c4`](https://github.com/clauderic/dnd-kit/commit/68960c490f50962b47a57663ee0625d7704173ec) [#295](https://github.com/clauderic/dnd-kit/pull/295) Thanks [@akhmadullin](https://github.com/akhmadullin)! - `@dnd-kit/core` is now a `peerDependency` rather than a `dependency` for other `@dnd-kit` packages that depend on it, such as `@dnd-kit/sortable` and `@dnd-kit/modifiers`. This is done to avoid issues with multiple versions of `@dnd-kit/core` being installed by some package managers such as Yarn 2.
|
8
|
+
|
9
|
+
### Patch Changes
|
10
|
+
|
11
|
+
- Updated dependencies [[`ae398de`](https://github.com/clauderic/dnd-kit/commit/ae398de012aee28f5e3bec10b438153d00f65630), [`8b938ce`](https://github.com/clauderic/dnd-kit/commit/8b938ceb158c67e9fdc4616351d1a3291ac614c3)]:
|
12
|
+
- @dnd-kit/core@3.0.4
|
13
|
+
|
14
|
+
## 2.0.0
|
15
|
+
|
16
|
+
### Major Changes
|
17
|
+
|
18
|
+
- [`a9d92cf`](https://github.com/clauderic/dnd-kit/commit/a9d92cf1fa35dd957e6c5915a13dfd2af134c103) [#174](https://github.com/clauderic/dnd-kit/pull/174) Thanks [@clauderic](https://github.com/clauderic)! - Distributed assets now only target modern browsers. [Browserlist](https://github.com/browserslist/browserslist) config:
|
19
|
+
|
20
|
+
```
|
21
|
+
defaults
|
22
|
+
last 2 version
|
23
|
+
not IE 11
|
24
|
+
not dead
|
25
|
+
```
|
26
|
+
|
27
|
+
If you need to support older browsers, include the appropriate polyfills in your project's build process.
|
28
|
+
|
29
|
+
### Patch Changes
|
30
|
+
|
31
|
+
- Updated dependencies [[`b7355d1`](https://github.com/clauderic/dnd-kit/commit/b7355d19d9e15bb1972627bb622c2487ddec82ad), [`a9d92cf`](https://github.com/clauderic/dnd-kit/commit/a9d92cf1fa35dd957e6c5915a13dfd2af134c103), [`b406cb9`](https://github.com/clauderic/dnd-kit/commit/b406cb9251beef8677d05c45ec42bab7581a86dc)]:
|
32
|
+
- @dnd-kit/core@3.0.0
|
33
|
+
- @dnd-kit/utilities@2.0.0
|
34
|
+
|
35
|
+
## 1.0.5
|
36
|
+
|
37
|
+
### Patch Changes
|
38
|
+
|
39
|
+
- Updated dependencies [[`8583825`](https://github.com/clauderic/dnd-kit/commit/8583825380bc4d7c36e076be30bb5ca3fd20a26b)]:
|
40
|
+
- @dnd-kit/core@2.0.0
|
41
|
+
|
42
|
+
## 1.0.4
|
43
|
+
|
44
|
+
### Patch Changes
|
45
|
+
|
46
|
+
- [`6a5c8a1`](https://github.com/clauderic/dnd-kit/commit/6a5c8a13bf19742efa65b20f16666f00ffaae1b1) [#154](https://github.com/clauderic/dnd-kit/pull/154) Thanks [@clauderic](https://github.com/clauderic)! - Update implementation of FirstArgument
|
47
|
+
|
48
|
+
- Updated dependencies [[`6a5c8a1`](https://github.com/clauderic/dnd-kit/commit/6a5c8a13bf19742efa65b20f16666f00ffaae1b1)]:
|
49
|
+
- @dnd-kit/utilities@1.0.3
|
50
|
+
|
3
51
|
## 1.0.3
|
4
52
|
|
5
53
|
### Patch Changes
|
@@ -2,43 +2,26 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
function _extends() {
|
6
|
-
_extends = Object.assign || function (target) {
|
7
|
-
for (var i = 1; i < arguments.length; i++) {
|
8
|
-
var source = arguments[i];
|
9
|
-
|
10
|
-
for (var key in source) {
|
11
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
12
|
-
target[key] = source[key];
|
13
|
-
}
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
return target;
|
18
|
-
};
|
19
|
-
|
20
|
-
return _extends.apply(this, arguments);
|
21
|
-
}
|
22
|
-
|
23
5
|
function createSnapModifier(gridSize) {
|
24
|
-
return
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
};
|
6
|
+
return ({
|
7
|
+
transform
|
8
|
+
}) => ({ ...transform,
|
9
|
+
x: Math.ceil(transform.x / gridSize) * gridSize,
|
10
|
+
y: Math.ceil(transform.y / gridSize) * gridSize
|
11
|
+
});
|
31
12
|
}
|
32
13
|
|
33
|
-
|
34
|
-
|
35
|
-
|
14
|
+
const restrictToHorizontalAxis = ({
|
15
|
+
transform
|
16
|
+
}) => {
|
17
|
+
return { ...transform,
|
36
18
|
y: 0
|
37
|
-
}
|
19
|
+
};
|
38
20
|
};
|
39
21
|
|
40
22
|
function restrictToBoundingRect(transform, rect, boundingRect) {
|
41
|
-
|
23
|
+
const value = { ...transform
|
24
|
+
};
|
42
25
|
|
43
26
|
if (rect.top + transform.y <= boundingRect.top) {
|
44
27
|
value.y = boundingRect.top - rect.top;
|
@@ -55,11 +38,11 @@ function restrictToBoundingRect(transform, rect, boundingRect) {
|
|
55
38
|
return value;
|
56
39
|
}
|
57
40
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
41
|
+
const restrictToParentElement = ({
|
42
|
+
transform,
|
43
|
+
activeNodeRect,
|
44
|
+
containerNodeRect
|
45
|
+
}) => {
|
63
46
|
if (!activeNodeRect || !containerNodeRect) {
|
64
47
|
return transform;
|
65
48
|
}
|
@@ -67,11 +50,12 @@ var restrictToParentElement = function restrictToParentElement(_ref) {
|
|
67
50
|
return restrictToBoundingRect(transform, activeNodeRect, containerNodeRect);
|
68
51
|
};
|
69
52
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
53
|
+
const restrictToFirstScrollableAncestor = ({
|
54
|
+
transform,
|
55
|
+
activeNodeRect,
|
56
|
+
scrollableAncestorRects
|
57
|
+
}) => {
|
58
|
+
const firstScrollableAncestorRect = scrollableAncestorRects[0];
|
75
59
|
|
76
60
|
if (!activeNodeRect || !firstScrollableAncestorRect) {
|
77
61
|
return transform;
|
@@ -80,18 +64,19 @@ var restrictToFirstScrollableAncestor = function restrictToFirstScrollableAncest
|
|
80
64
|
return restrictToBoundingRect(transform, activeNodeRect, firstScrollableAncestorRect);
|
81
65
|
};
|
82
66
|
|
83
|
-
|
84
|
-
|
85
|
-
|
67
|
+
const restrictToVerticalAxis = ({
|
68
|
+
transform
|
69
|
+
}) => {
|
70
|
+
return { ...transform,
|
86
71
|
x: 0
|
87
|
-
}
|
72
|
+
};
|
88
73
|
};
|
89
74
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
75
|
+
const restrictToWindowEdges = ({
|
76
|
+
transform,
|
77
|
+
activeNodeRect,
|
78
|
+
windowRect
|
79
|
+
}) => {
|
95
80
|
if (!activeNodeRect || !windowRect) {
|
96
81
|
return transform;
|
97
82
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modifiers.cjs.development.js","sources":["../src/createSnapModifier.ts","../src/restrictToHorizontalAxis.ts","../src/utilities/restrictToBoundingRect.ts","../src/restrictToParentElement.ts","../src/restrictToFirstScrollableAncestor.ts","../src/restrictToVerticalAxis.ts","../src/restrictToWindowEdges.ts"],"sourcesContent":["import type {Modifier} from '@dnd-kit/core';\n\nexport function createSnapModifier(gridSize: number): Modifier {\n return ({transform}) => ({\n ...transform,\n x: Math.ceil(transform.x / gridSize) * gridSize,\n y: Math.ceil(transform.y / gridSize) * gridSize,\n });\n}\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToHorizontalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n y: 0,\n };\n};\n","import type {ViewRect} from '@dnd-kit/core';\nimport type {Transform} from '@dnd-kit/utilities';\n\nexport function restrictToBoundingRect(\n transform: Transform,\n rect: ViewRect,\n boundingRect: ViewRect\n): Transform {\n const value = {\n ...transform,\n };\n\n if (rect.top + transform.y <= boundingRect.top) {\n value.y = boundingRect.top - rect.top;\n } else if (\n rect.bottom + transform.y >=\n boundingRect.top + boundingRect.height\n ) {\n value.y = boundingRect.top + boundingRect.height - rect.bottom;\n }\n\n if (rect.left + transform.x <= boundingRect.left) {\n value.x = boundingRect.left - rect.left;\n } else if (\n rect.right + transform.x >=\n boundingRect.left + boundingRect.width\n ) {\n value.x = boundingRect.left + boundingRect.width - rect.right;\n }\n\n return value;\n}\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToParentElement: Modifier = ({\n transform,\n activeNodeRect,\n containerNodeRect,\n}) => {\n if (!activeNodeRect || !containerNodeRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, containerNodeRect);\n};\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToFirstScrollableAncestor: Modifier = ({\n transform,\n activeNodeRect,\n scrollableAncestorRects,\n}) => {\n const firstScrollableAncestorRect = scrollableAncestorRects[0];\n\n if (!activeNodeRect || !firstScrollableAncestorRect) {\n return transform;\n }\n\n return restrictToBoundingRect(\n transform,\n activeNodeRect,\n firstScrollableAncestorRect\n );\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToVerticalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n x: 0,\n };\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToWindowEdges: Modifier = ({\n transform,\n activeNodeRect,\n windowRect,\n}) => {\n if (!activeNodeRect || !windowRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, windowRect);\n};\n"],"names":["createSnapModifier","gridSize","transform","x","Math","ceil","y","restrictToHorizontalAxis","restrictToBoundingRect","rect","boundingRect","value","top","bottom","height","left","right","width","restrictToParentElement","activeNodeRect","containerNodeRect","restrictToFirstScrollableAncestor","scrollableAncestorRects","firstScrollableAncestorRect","restrictToVerticalAxis","restrictToWindowEdges","windowRect"],"mappings":"
|
1
|
+
{"version":3,"file":"modifiers.cjs.development.js","sources":["../src/createSnapModifier.ts","../src/restrictToHorizontalAxis.ts","../src/utilities/restrictToBoundingRect.ts","../src/restrictToParentElement.ts","../src/restrictToFirstScrollableAncestor.ts","../src/restrictToVerticalAxis.ts","../src/restrictToWindowEdges.ts"],"sourcesContent":["import type {Modifier} from '@dnd-kit/core';\n\nexport function createSnapModifier(gridSize: number): Modifier {\n return ({transform}) => ({\n ...transform,\n x: Math.ceil(transform.x / gridSize) * gridSize,\n y: Math.ceil(transform.y / gridSize) * gridSize,\n });\n}\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToHorizontalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n y: 0,\n };\n};\n","import type {ViewRect} from '@dnd-kit/core';\nimport type {Transform} from '@dnd-kit/utilities';\n\nexport function restrictToBoundingRect(\n transform: Transform,\n rect: ViewRect,\n boundingRect: ViewRect\n): Transform {\n const value = {\n ...transform,\n };\n\n if (rect.top + transform.y <= boundingRect.top) {\n value.y = boundingRect.top - rect.top;\n } else if (\n rect.bottom + transform.y >=\n boundingRect.top + boundingRect.height\n ) {\n value.y = boundingRect.top + boundingRect.height - rect.bottom;\n }\n\n if (rect.left + transform.x <= boundingRect.left) {\n value.x = boundingRect.left - rect.left;\n } else if (\n rect.right + transform.x >=\n boundingRect.left + boundingRect.width\n ) {\n value.x = boundingRect.left + boundingRect.width - rect.right;\n }\n\n return value;\n}\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToParentElement: Modifier = ({\n transform,\n activeNodeRect,\n containerNodeRect,\n}) => {\n if (!activeNodeRect || !containerNodeRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, containerNodeRect);\n};\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToFirstScrollableAncestor: Modifier = ({\n transform,\n activeNodeRect,\n scrollableAncestorRects,\n}) => {\n const firstScrollableAncestorRect = scrollableAncestorRects[0];\n\n if (!activeNodeRect || !firstScrollableAncestorRect) {\n return transform;\n }\n\n return restrictToBoundingRect(\n transform,\n activeNodeRect,\n firstScrollableAncestorRect\n );\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToVerticalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n x: 0,\n };\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToWindowEdges: Modifier = ({\n transform,\n activeNodeRect,\n windowRect,\n}) => {\n if (!activeNodeRect || !windowRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, windowRect);\n};\n"],"names":["createSnapModifier","gridSize","transform","x","Math","ceil","y","restrictToHorizontalAxis","restrictToBoundingRect","rect","boundingRect","value","top","bottom","height","left","right","width","restrictToParentElement","activeNodeRect","containerNodeRect","restrictToFirstScrollableAncestor","scrollableAncestorRects","firstScrollableAncestorRect","restrictToVerticalAxis","restrictToWindowEdges","windowRect"],"mappings":"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"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";function t(
|
1
|
+
"use strict";function t(t,e,r){const o={...t};return e.top+t.y<=r.top?o.y=r.top-e.top:e.bottom+t.y>=r.top+r.height&&(o.y=r.top+r.height-e.bottom),e.left+t.x<=r.left?o.x=r.left-e.left:e.right+t.x>=r.left+r.width&&(o.x=r.left+r.width-e.right),o}Object.defineProperty(exports,"__esModule",{value:!0}),exports.createSnapModifier=function(t){return({transform:e})=>({...e,x:Math.ceil(e.x/t)*t,y:Math.ceil(e.y/t)*t})},exports.restrictToFirstScrollableAncestor=({transform:e,activeNodeRect:r,scrollableAncestorRects:o})=>{const s=o[0];return r&&s?t(e,r,s):e},exports.restrictToHorizontalAxis=({transform:t})=>({...t,y:0}),exports.restrictToParentElement=({transform:e,activeNodeRect:r,containerNodeRect:o})=>r&&o?t(e,r,o):e,exports.restrictToVerticalAxis=({transform:t})=>({...t,x:0}),exports.restrictToWindowEdges=({transform:e,activeNodeRect:r,windowRect:o})=>r&&o?t(e,r,o):e;
|
2
2
|
//# sourceMappingURL=modifiers.cjs.production.min.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modifiers.cjs.production.min.js","sources":["../src/utilities/restrictToBoundingRect.ts","../src/createSnapModifier.ts","../src/restrictToFirstScrollableAncestor.ts","../src/restrictToHorizontalAxis.ts","../src/restrictToParentElement.ts","../src/restrictToVerticalAxis.ts","../src/restrictToWindowEdges.ts"],"sourcesContent":["import type {ViewRect} from '@dnd-kit/core';\nimport type {Transform} from '@dnd-kit/utilities';\n\nexport function restrictToBoundingRect(\n transform: Transform,\n rect: ViewRect,\n boundingRect: ViewRect\n): Transform {\n const value = {\n ...transform,\n };\n\n if (rect.top + transform.y <= boundingRect.top) {\n value.y = boundingRect.top - rect.top;\n } else if (\n rect.bottom + transform.y >=\n boundingRect.top + boundingRect.height\n ) {\n value.y = boundingRect.top + boundingRect.height - rect.bottom;\n }\n\n if (rect.left + transform.x <= boundingRect.left) {\n value.x = boundingRect.left - rect.left;\n } else if (\n rect.right + transform.x >=\n boundingRect.left + boundingRect.width\n ) {\n value.x = boundingRect.left + boundingRect.width - rect.right;\n }\n\n return value;\n}\n","import type {Modifier} from '@dnd-kit/core';\n\nexport function createSnapModifier(gridSize: number): Modifier {\n return ({transform}) => ({\n ...transform,\n x: Math.ceil(transform.x / gridSize) * gridSize,\n y: Math.ceil(transform.y / gridSize) * gridSize,\n });\n}\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToFirstScrollableAncestor: Modifier = ({\n transform,\n activeNodeRect,\n scrollableAncestorRects,\n}) => {\n const firstScrollableAncestorRect = scrollableAncestorRects[0];\n\n if (!activeNodeRect || !firstScrollableAncestorRect) {\n return transform;\n }\n\n return restrictToBoundingRect(\n transform,\n activeNodeRect,\n firstScrollableAncestorRect\n );\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToHorizontalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n y: 0,\n };\n};\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToParentElement: Modifier = ({\n transform,\n activeNodeRect,\n containerNodeRect,\n}) => {\n if (!activeNodeRect || !containerNodeRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, containerNodeRect);\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToVerticalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n x: 0,\n };\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToWindowEdges: Modifier = ({\n transform,\n activeNodeRect,\n windowRect,\n}) => {\n if (!activeNodeRect || !windowRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, windowRect);\n};\n"],"names":["restrictToBoundingRect","transform","rect","boundingRect","value","top","y","bottom","height","left","x","right","width","gridSize","Math","ceil","activeNodeRect","
|
1
|
+
{"version":3,"file":"modifiers.cjs.production.min.js","sources":["../src/utilities/restrictToBoundingRect.ts","../src/createSnapModifier.ts","../src/restrictToFirstScrollableAncestor.ts","../src/restrictToHorizontalAxis.ts","../src/restrictToParentElement.ts","../src/restrictToVerticalAxis.ts","../src/restrictToWindowEdges.ts"],"sourcesContent":["import type {ViewRect} from '@dnd-kit/core';\nimport type {Transform} from '@dnd-kit/utilities';\n\nexport function restrictToBoundingRect(\n transform: Transform,\n rect: ViewRect,\n boundingRect: ViewRect\n): Transform {\n const value = {\n ...transform,\n };\n\n if (rect.top + transform.y <= boundingRect.top) {\n value.y = boundingRect.top - rect.top;\n } else if (\n rect.bottom + transform.y >=\n boundingRect.top + boundingRect.height\n ) {\n value.y = boundingRect.top + boundingRect.height - rect.bottom;\n }\n\n if (rect.left + transform.x <= boundingRect.left) {\n value.x = boundingRect.left - rect.left;\n } else if (\n rect.right + transform.x >=\n boundingRect.left + boundingRect.width\n ) {\n value.x = boundingRect.left + boundingRect.width - rect.right;\n }\n\n return value;\n}\n","import type {Modifier} from '@dnd-kit/core';\n\nexport function createSnapModifier(gridSize: number): Modifier {\n return ({transform}) => ({\n ...transform,\n x: Math.ceil(transform.x / gridSize) * gridSize,\n y: Math.ceil(transform.y / gridSize) * gridSize,\n });\n}\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToFirstScrollableAncestor: Modifier = ({\n transform,\n activeNodeRect,\n scrollableAncestorRects,\n}) => {\n const firstScrollableAncestorRect = scrollableAncestorRects[0];\n\n if (!activeNodeRect || !firstScrollableAncestorRect) {\n return transform;\n }\n\n return restrictToBoundingRect(\n transform,\n activeNodeRect,\n firstScrollableAncestorRect\n );\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToHorizontalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n y: 0,\n };\n};\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToParentElement: Modifier = ({\n transform,\n activeNodeRect,\n containerNodeRect,\n}) => {\n if (!activeNodeRect || !containerNodeRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, containerNodeRect);\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToVerticalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n x: 0,\n };\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToWindowEdges: Modifier = ({\n transform,\n activeNodeRect,\n windowRect,\n}) => {\n if (!activeNodeRect || !windowRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, windowRect);\n};\n"],"names":["restrictToBoundingRect","transform","rect","boundingRect","value","top","y","bottom","height","left","x","right","width","gridSize","Math","ceil","activeNodeRect","scrollableAncestorRects","firstScrollableAncestorRect","containerNodeRect","windowRect"],"mappings":"sBAGgBA,EACdC,EACAC,EACAC,SAEMC,EAAQ,IACTH,UAGDC,EAAKG,IAAMJ,EAAUK,GAAKH,EAAaE,IACzCD,EAAME,EAAIH,EAAaE,IAAMH,EAAKG,IAElCH,EAAKK,OAASN,EAAUK,GACxBH,EAAaE,IAAMF,EAAaK,SAEhCJ,EAAME,EAAIH,EAAaE,IAAMF,EAAaK,OAASN,EAAKK,QAGtDL,EAAKO,KAAOR,EAAUS,GAAKP,EAAaM,KAC1CL,EAAMM,EAAIP,EAAaM,KAAOP,EAAKO,KAEnCP,EAAKS,MAAQV,EAAUS,GACvBP,EAAaM,KAAON,EAAaS,QAEjCR,EAAMM,EAAIP,EAAaM,KAAON,EAAaS,MAAQV,EAAKS,OAGnDP,6FC5B0BS,SAC1B,EAAEZ,UAAAA,UACJA,EACHS,EAAGI,KAAKC,KAAKd,EAAUS,EAAIG,GAAYA,EACvCP,EAAGQ,KAAKC,KAAKd,EAAUK,EAAIO,GAAYA,+CCHgB,EACzDZ,UAAAA,EACAe,eAAAA,EACAC,wBAAAA,YAEMC,EAA8BD,EAAwB,UAEvDD,GAAmBE,EAIjBlB,EACLC,EACAe,EACAE,GANOjB,oCCTuC,EAAEA,UAAAA,MAC3C,IACFA,EACHK,EAAG,oCCF0C,EAC/CL,UAAAA,EACAe,eAAAA,EACAG,kBAAAA,KAEKH,GAAmBG,EAIjBnB,EAAuBC,EAAWe,EAAgBG,GAHhDlB,iCCPqC,EAAEA,UAAAA,MACzC,IACFA,EACHS,EAAG,kCCDwC,EAC7CT,UAAAA,EACAe,eAAAA,EACAI,WAAAA,KAEKJ,GAAmBI,EAIjBpB,EAAuBC,EAAWe,EAAgBI,GAHhDnB"}
|
package/dist/modifiers.esm.js
CHANGED
@@ -1,40 +1,23 @@
|
|
1
|
-
function _extends() {
|
2
|
-
_extends = Object.assign || function (target) {
|
3
|
-
for (var i = 1; i < arguments.length; i++) {
|
4
|
-
var source = arguments[i];
|
5
|
-
|
6
|
-
for (var key in source) {
|
7
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
8
|
-
target[key] = source[key];
|
9
|
-
}
|
10
|
-
}
|
11
|
-
}
|
12
|
-
|
13
|
-
return target;
|
14
|
-
};
|
15
|
-
|
16
|
-
return _extends.apply(this, arguments);
|
17
|
-
}
|
18
|
-
|
19
1
|
function createSnapModifier(gridSize) {
|
20
|
-
return
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
};
|
2
|
+
return ({
|
3
|
+
transform
|
4
|
+
}) => ({ ...transform,
|
5
|
+
x: Math.ceil(transform.x / gridSize) * gridSize,
|
6
|
+
y: Math.ceil(transform.y / gridSize) * gridSize
|
7
|
+
});
|
27
8
|
}
|
28
9
|
|
29
|
-
|
30
|
-
|
31
|
-
|
10
|
+
const restrictToHorizontalAxis = ({
|
11
|
+
transform
|
12
|
+
}) => {
|
13
|
+
return { ...transform,
|
32
14
|
y: 0
|
33
|
-
}
|
15
|
+
};
|
34
16
|
};
|
35
17
|
|
36
18
|
function restrictToBoundingRect(transform, rect, boundingRect) {
|
37
|
-
|
19
|
+
const value = { ...transform
|
20
|
+
};
|
38
21
|
|
39
22
|
if (rect.top + transform.y <= boundingRect.top) {
|
40
23
|
value.y = boundingRect.top - rect.top;
|
@@ -51,11 +34,11 @@ function restrictToBoundingRect(transform, rect, boundingRect) {
|
|
51
34
|
return value;
|
52
35
|
}
|
53
36
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
37
|
+
const restrictToParentElement = ({
|
38
|
+
transform,
|
39
|
+
activeNodeRect,
|
40
|
+
containerNodeRect
|
41
|
+
}) => {
|
59
42
|
if (!activeNodeRect || !containerNodeRect) {
|
60
43
|
return transform;
|
61
44
|
}
|
@@ -63,11 +46,12 @@ var restrictToParentElement = function restrictToParentElement(_ref) {
|
|
63
46
|
return restrictToBoundingRect(transform, activeNodeRect, containerNodeRect);
|
64
47
|
};
|
65
48
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
49
|
+
const restrictToFirstScrollableAncestor = ({
|
50
|
+
transform,
|
51
|
+
activeNodeRect,
|
52
|
+
scrollableAncestorRects
|
53
|
+
}) => {
|
54
|
+
const firstScrollableAncestorRect = scrollableAncestorRects[0];
|
71
55
|
|
72
56
|
if (!activeNodeRect || !firstScrollableAncestorRect) {
|
73
57
|
return transform;
|
@@ -76,18 +60,19 @@ var restrictToFirstScrollableAncestor = function restrictToFirstScrollableAncest
|
|
76
60
|
return restrictToBoundingRect(transform, activeNodeRect, firstScrollableAncestorRect);
|
77
61
|
};
|
78
62
|
|
79
|
-
|
80
|
-
|
81
|
-
|
63
|
+
const restrictToVerticalAxis = ({
|
64
|
+
transform
|
65
|
+
}) => {
|
66
|
+
return { ...transform,
|
82
67
|
x: 0
|
83
|
-
}
|
68
|
+
};
|
84
69
|
};
|
85
70
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
71
|
+
const restrictToWindowEdges = ({
|
72
|
+
transform,
|
73
|
+
activeNodeRect,
|
74
|
+
windowRect
|
75
|
+
}) => {
|
91
76
|
if (!activeNodeRect || !windowRect) {
|
92
77
|
return transform;
|
93
78
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modifiers.esm.js","sources":["../src/createSnapModifier.ts","../src/restrictToHorizontalAxis.ts","../src/utilities/restrictToBoundingRect.ts","../src/restrictToParentElement.ts","../src/restrictToFirstScrollableAncestor.ts","../src/restrictToVerticalAxis.ts","../src/restrictToWindowEdges.ts"],"sourcesContent":["import type {Modifier} from '@dnd-kit/core';\n\nexport function createSnapModifier(gridSize: number): Modifier {\n return ({transform}) => ({\n ...transform,\n x: Math.ceil(transform.x / gridSize) * gridSize,\n y: Math.ceil(transform.y / gridSize) * gridSize,\n });\n}\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToHorizontalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n y: 0,\n };\n};\n","import type {ViewRect} from '@dnd-kit/core';\nimport type {Transform} from '@dnd-kit/utilities';\n\nexport function restrictToBoundingRect(\n transform: Transform,\n rect: ViewRect,\n boundingRect: ViewRect\n): Transform {\n const value = {\n ...transform,\n };\n\n if (rect.top + transform.y <= boundingRect.top) {\n value.y = boundingRect.top - rect.top;\n } else if (\n rect.bottom + transform.y >=\n boundingRect.top + boundingRect.height\n ) {\n value.y = boundingRect.top + boundingRect.height - rect.bottom;\n }\n\n if (rect.left + transform.x <= boundingRect.left) {\n value.x = boundingRect.left - rect.left;\n } else if (\n rect.right + transform.x >=\n boundingRect.left + boundingRect.width\n ) {\n value.x = boundingRect.left + boundingRect.width - rect.right;\n }\n\n return value;\n}\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToParentElement: Modifier = ({\n transform,\n activeNodeRect,\n containerNodeRect,\n}) => {\n if (!activeNodeRect || !containerNodeRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, containerNodeRect);\n};\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToFirstScrollableAncestor: Modifier = ({\n transform,\n activeNodeRect,\n scrollableAncestorRects,\n}) => {\n const firstScrollableAncestorRect = scrollableAncestorRects[0];\n\n if (!activeNodeRect || !firstScrollableAncestorRect) {\n return transform;\n }\n\n return restrictToBoundingRect(\n transform,\n activeNodeRect,\n firstScrollableAncestorRect\n );\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToVerticalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n x: 0,\n };\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToWindowEdges: Modifier = ({\n transform,\n activeNodeRect,\n windowRect,\n}) => {\n if (!activeNodeRect || !windowRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, windowRect);\n};\n"],"names":["createSnapModifier","gridSize","transform","x","Math","ceil","y","restrictToHorizontalAxis","restrictToBoundingRect","rect","boundingRect","value","top","bottom","height","left","right","width","restrictToParentElement","activeNodeRect","containerNodeRect","restrictToFirstScrollableAncestor","scrollableAncestorRects","firstScrollableAncestorRect","restrictToVerticalAxis","restrictToWindowEdges","windowRect"],"mappings":"
|
1
|
+
{"version":3,"file":"modifiers.esm.js","sources":["../src/createSnapModifier.ts","../src/restrictToHorizontalAxis.ts","../src/utilities/restrictToBoundingRect.ts","../src/restrictToParentElement.ts","../src/restrictToFirstScrollableAncestor.ts","../src/restrictToVerticalAxis.ts","../src/restrictToWindowEdges.ts"],"sourcesContent":["import type {Modifier} from '@dnd-kit/core';\n\nexport function createSnapModifier(gridSize: number): Modifier {\n return ({transform}) => ({\n ...transform,\n x: Math.ceil(transform.x / gridSize) * gridSize,\n y: Math.ceil(transform.y / gridSize) * gridSize,\n });\n}\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToHorizontalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n y: 0,\n };\n};\n","import type {ViewRect} from '@dnd-kit/core';\nimport type {Transform} from '@dnd-kit/utilities';\n\nexport function restrictToBoundingRect(\n transform: Transform,\n rect: ViewRect,\n boundingRect: ViewRect\n): Transform {\n const value = {\n ...transform,\n };\n\n if (rect.top + transform.y <= boundingRect.top) {\n value.y = boundingRect.top - rect.top;\n } else if (\n rect.bottom + transform.y >=\n boundingRect.top + boundingRect.height\n ) {\n value.y = boundingRect.top + boundingRect.height - rect.bottom;\n }\n\n if (rect.left + transform.x <= boundingRect.left) {\n value.x = boundingRect.left - rect.left;\n } else if (\n rect.right + transform.x >=\n boundingRect.left + boundingRect.width\n ) {\n value.x = boundingRect.left + boundingRect.width - rect.right;\n }\n\n return value;\n}\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToParentElement: Modifier = ({\n transform,\n activeNodeRect,\n containerNodeRect,\n}) => {\n if (!activeNodeRect || !containerNodeRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, containerNodeRect);\n};\n","import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToFirstScrollableAncestor: Modifier = ({\n transform,\n activeNodeRect,\n scrollableAncestorRects,\n}) => {\n const firstScrollableAncestorRect = scrollableAncestorRects[0];\n\n if (!activeNodeRect || !firstScrollableAncestorRect) {\n return transform;\n }\n\n return restrictToBoundingRect(\n transform,\n activeNodeRect,\n firstScrollableAncestorRect\n );\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToVerticalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n x: 0,\n };\n};\n","import type {Modifier} from '@dnd-kit/core';\n\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToWindowEdges: Modifier = ({\n transform,\n activeNodeRect,\n windowRect,\n}) => {\n if (!activeNodeRect || !windowRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, activeNodeRect, windowRect);\n};\n"],"names":["createSnapModifier","gridSize","transform","x","Math","ceil","y","restrictToHorizontalAxis","restrictToBoundingRect","rect","boundingRect","value","top","bottom","height","left","right","width","restrictToParentElement","activeNodeRect","containerNodeRect","restrictToFirstScrollableAncestor","scrollableAncestorRects","firstScrollableAncestorRect","restrictToVerticalAxis","restrictToWindowEdges","windowRect"],"mappings":"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"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dnd-kit/modifiers",
|
3
|
-
"version": "1.0
|
3
|
+
"version": "2.1.0",
|
4
4
|
"description": "Translate modifier presets for use with `@dnd-kit` packages.",
|
5
5
|
"author": "Claudéric Demers",
|
6
6
|
"license": "MIT",
|
@@ -26,10 +26,15 @@
|
|
26
26
|
"dist"
|
27
27
|
],
|
28
28
|
"dependencies": {
|
29
|
-
"@dnd-kit/
|
30
|
-
"@dnd-kit/utilities": "^1.0.2",
|
29
|
+
"@dnd-kit/utilities": "^2.0.0",
|
31
30
|
"tslib": "^2.0.0"
|
32
31
|
},
|
32
|
+
"peerDependencies": {
|
33
|
+
"@dnd-kit/core": "^3.0.4"
|
34
|
+
},
|
35
|
+
"devDependencies": {
|
36
|
+
"@dnd-kit/core": "^3.0.4"
|
37
|
+
},
|
33
38
|
"publishConfig": {
|
34
39
|
"access": "public"
|
35
40
|
}
|