This commit is contained in:
2
node_modules/@dnd-kit/modifiers/dist/createSnapModifier.d.ts
generated
vendored
Normal file
2
node_modules/@dnd-kit/modifiers/dist/createSnapModifier.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Modifier } from '@dnd-kit/core';
|
||||
export declare function createSnapModifier(gridSize: number): Modifier;
|
||||
7
node_modules/@dnd-kit/modifiers/dist/index.d.ts
generated
vendored
Normal file
7
node_modules/@dnd-kit/modifiers/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export { createSnapModifier } from './createSnapModifier';
|
||||
export { restrictToHorizontalAxis } from './restrictToHorizontalAxis';
|
||||
export { restrictToParentElement } from './restrictToParentElement';
|
||||
export { restrictToFirstScrollableAncestor } from './restrictToFirstScrollableAncestor';
|
||||
export { restrictToVerticalAxis } from './restrictToVerticalAxis';
|
||||
export { restrictToWindowEdges } from './restrictToWindowEdges';
|
||||
export { snapCenterToCursor } from './snapCenterToCursor';
|
||||
8
node_modules/@dnd-kit/modifiers/dist/index.js
generated
vendored
Normal file
8
node_modules/@dnd-kit/modifiers/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./modifiers.cjs.production.min.js')
|
||||
} else {
|
||||
module.exports = require('./modifiers.cjs.development.js')
|
||||
}
|
||||
131
node_modules/@dnd-kit/modifiers/dist/modifiers.cjs.development.js
generated
vendored
Normal file
131
node_modules/@dnd-kit/modifiers/dist/modifiers.cjs.development.js
generated
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var utilities = require('@dnd-kit/utilities');
|
||||
|
||||
function createSnapModifier(gridSize) {
|
||||
return _ref => {
|
||||
let {
|
||||
transform
|
||||
} = _ref;
|
||||
return { ...transform,
|
||||
x: Math.ceil(transform.x / gridSize) * gridSize,
|
||||
y: Math.ceil(transform.y / gridSize) * gridSize
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
const restrictToHorizontalAxis = _ref => {
|
||||
let {
|
||||
transform
|
||||
} = _ref;
|
||||
return { ...transform,
|
||||
y: 0
|
||||
};
|
||||
};
|
||||
|
||||
function restrictToBoundingRect(transform, rect, boundingRect) {
|
||||
const value = { ...transform
|
||||
};
|
||||
|
||||
if (rect.top + transform.y <= boundingRect.top) {
|
||||
value.y = boundingRect.top - rect.top;
|
||||
} else if (rect.bottom + transform.y >= boundingRect.top + boundingRect.height) {
|
||||
value.y = boundingRect.top + boundingRect.height - rect.bottom;
|
||||
}
|
||||
|
||||
if (rect.left + transform.x <= boundingRect.left) {
|
||||
value.x = boundingRect.left - rect.left;
|
||||
} else if (rect.right + transform.x >= boundingRect.left + boundingRect.width) {
|
||||
value.x = boundingRect.left + boundingRect.width - rect.right;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
const restrictToParentElement = _ref => {
|
||||
let {
|
||||
containerNodeRect,
|
||||
draggingNodeRect,
|
||||
transform
|
||||
} = _ref;
|
||||
|
||||
if (!draggingNodeRect || !containerNodeRect) {
|
||||
return transform;
|
||||
}
|
||||
|
||||
return restrictToBoundingRect(transform, draggingNodeRect, containerNodeRect);
|
||||
};
|
||||
|
||||
const restrictToFirstScrollableAncestor = _ref => {
|
||||
let {
|
||||
draggingNodeRect,
|
||||
transform,
|
||||
scrollableAncestorRects
|
||||
} = _ref;
|
||||
const firstScrollableAncestorRect = scrollableAncestorRects[0];
|
||||
|
||||
if (!draggingNodeRect || !firstScrollableAncestorRect) {
|
||||
return transform;
|
||||
}
|
||||
|
||||
return restrictToBoundingRect(transform, draggingNodeRect, firstScrollableAncestorRect);
|
||||
};
|
||||
|
||||
const restrictToVerticalAxis = _ref => {
|
||||
let {
|
||||
transform
|
||||
} = _ref;
|
||||
return { ...transform,
|
||||
x: 0
|
||||
};
|
||||
};
|
||||
|
||||
const restrictToWindowEdges = _ref => {
|
||||
let {
|
||||
transform,
|
||||
draggingNodeRect,
|
||||
windowRect
|
||||
} = _ref;
|
||||
|
||||
if (!draggingNodeRect || !windowRect) {
|
||||
return transform;
|
||||
}
|
||||
|
||||
return restrictToBoundingRect(transform, draggingNodeRect, windowRect);
|
||||
};
|
||||
|
||||
const snapCenterToCursor = _ref => {
|
||||
let {
|
||||
activatorEvent,
|
||||
draggingNodeRect,
|
||||
transform
|
||||
} = _ref;
|
||||
|
||||
if (draggingNodeRect && activatorEvent) {
|
||||
const activatorCoordinates = utilities.getEventCoordinates(activatorEvent);
|
||||
|
||||
if (!activatorCoordinates) {
|
||||
return transform;
|
||||
}
|
||||
|
||||
const offsetX = activatorCoordinates.x - draggingNodeRect.left;
|
||||
const offsetY = activatorCoordinates.y - draggingNodeRect.top;
|
||||
return { ...transform,
|
||||
x: transform.x + offsetX - draggingNodeRect.width / 2,
|
||||
y: transform.y + offsetY - draggingNodeRect.height / 2
|
||||
};
|
||||
}
|
||||
|
||||
return transform;
|
||||
};
|
||||
|
||||
exports.createSnapModifier = createSnapModifier;
|
||||
exports.restrictToFirstScrollableAncestor = restrictToFirstScrollableAncestor;
|
||||
exports.restrictToHorizontalAxis = restrictToHorizontalAxis;
|
||||
exports.restrictToParentElement = restrictToParentElement;
|
||||
exports.restrictToVerticalAxis = restrictToVerticalAxis;
|
||||
exports.restrictToWindowEdges = restrictToWindowEdges;
|
||||
exports.snapCenterToCursor = snapCenterToCursor;
|
||||
//# sourceMappingURL=modifiers.cjs.development.js.map
|
||||
1
node_modules/@dnd-kit/modifiers/dist/modifiers.cjs.development.js.map
generated
vendored
Normal file
1
node_modules/@dnd-kit/modifiers/dist/modifiers.cjs.development.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/@dnd-kit/modifiers/dist/modifiers.cjs.production.min.js
generated
vendored
Normal file
2
node_modules/@dnd-kit/modifiers/dist/modifiers.cjs.production.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@dnd-kit/utilities");function e(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}exports.createSnapModifier=function(t){return e=>{let{transform:r}=e;return{...r,x:Math.ceil(r.x/t)*t,y:Math.ceil(r.y/t)*t}}},exports.restrictToFirstScrollableAncestor=t=>{let{draggingNodeRect:r,transform:o,scrollableAncestorRects:n}=t;const i=n[0];return r&&i?e(o,r,i):o},exports.restrictToHorizontalAxis=t=>{let{transform:e}=t;return{...e,y:0}},exports.restrictToParentElement=t=>{let{containerNodeRect:r,draggingNodeRect:o,transform:n}=t;return o&&r?e(n,o,r):n},exports.restrictToVerticalAxis=t=>{let{transform:e}=t;return{...e,x:0}},exports.restrictToWindowEdges=t=>{let{transform:r,draggingNodeRect:o,windowRect:n}=t;return o&&n?e(r,o,n):r},exports.snapCenterToCursor=e=>{let{activatorEvent:r,draggingNodeRect:o,transform:n}=e;if(o&&r){const e=t.getEventCoordinates(r);if(!e)return n;const i=e.x-o.left,s=e.y-o.top;return{...n,x:n.x+i-o.width/2,y:n.y+s-o.height/2}}return n};
|
||||
//# sourceMappingURL=modifiers.cjs.production.min.js.map
|
||||
1
node_modules/@dnd-kit/modifiers/dist/modifiers.cjs.production.min.js.map
generated
vendored
Normal file
1
node_modules/@dnd-kit/modifiers/dist/modifiers.cjs.production.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
121
node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js
generated
vendored
Normal file
121
node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
import { getEventCoordinates } from '@dnd-kit/utilities';
|
||||
|
||||
function createSnapModifier(gridSize) {
|
||||
return _ref => {
|
||||
let {
|
||||
transform
|
||||
} = _ref;
|
||||
return { ...transform,
|
||||
x: Math.ceil(transform.x / gridSize) * gridSize,
|
||||
y: Math.ceil(transform.y / gridSize) * gridSize
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
const restrictToHorizontalAxis = _ref => {
|
||||
let {
|
||||
transform
|
||||
} = _ref;
|
||||
return { ...transform,
|
||||
y: 0
|
||||
};
|
||||
};
|
||||
|
||||
function restrictToBoundingRect(transform, rect, boundingRect) {
|
||||
const value = { ...transform
|
||||
};
|
||||
|
||||
if (rect.top + transform.y <= boundingRect.top) {
|
||||
value.y = boundingRect.top - rect.top;
|
||||
} else if (rect.bottom + transform.y >= boundingRect.top + boundingRect.height) {
|
||||
value.y = boundingRect.top + boundingRect.height - rect.bottom;
|
||||
}
|
||||
|
||||
if (rect.left + transform.x <= boundingRect.left) {
|
||||
value.x = boundingRect.left - rect.left;
|
||||
} else if (rect.right + transform.x >= boundingRect.left + boundingRect.width) {
|
||||
value.x = boundingRect.left + boundingRect.width - rect.right;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
const restrictToParentElement = _ref => {
|
||||
let {
|
||||
containerNodeRect,
|
||||
draggingNodeRect,
|
||||
transform
|
||||
} = _ref;
|
||||
|
||||
if (!draggingNodeRect || !containerNodeRect) {
|
||||
return transform;
|
||||
}
|
||||
|
||||
return restrictToBoundingRect(transform, draggingNodeRect, containerNodeRect);
|
||||
};
|
||||
|
||||
const restrictToFirstScrollableAncestor = _ref => {
|
||||
let {
|
||||
draggingNodeRect,
|
||||
transform,
|
||||
scrollableAncestorRects
|
||||
} = _ref;
|
||||
const firstScrollableAncestorRect = scrollableAncestorRects[0];
|
||||
|
||||
if (!draggingNodeRect || !firstScrollableAncestorRect) {
|
||||
return transform;
|
||||
}
|
||||
|
||||
return restrictToBoundingRect(transform, draggingNodeRect, firstScrollableAncestorRect);
|
||||
};
|
||||
|
||||
const restrictToVerticalAxis = _ref => {
|
||||
let {
|
||||
transform
|
||||
} = _ref;
|
||||
return { ...transform,
|
||||
x: 0
|
||||
};
|
||||
};
|
||||
|
||||
const restrictToWindowEdges = _ref => {
|
||||
let {
|
||||
transform,
|
||||
draggingNodeRect,
|
||||
windowRect
|
||||
} = _ref;
|
||||
|
||||
if (!draggingNodeRect || !windowRect) {
|
||||
return transform;
|
||||
}
|
||||
|
||||
return restrictToBoundingRect(transform, draggingNodeRect, windowRect);
|
||||
};
|
||||
|
||||
const snapCenterToCursor = _ref => {
|
||||
let {
|
||||
activatorEvent,
|
||||
draggingNodeRect,
|
||||
transform
|
||||
} = _ref;
|
||||
|
||||
if (draggingNodeRect && activatorEvent) {
|
||||
const activatorCoordinates = getEventCoordinates(activatorEvent);
|
||||
|
||||
if (!activatorCoordinates) {
|
||||
return transform;
|
||||
}
|
||||
|
||||
const offsetX = activatorCoordinates.x - draggingNodeRect.left;
|
||||
const offsetY = activatorCoordinates.y - draggingNodeRect.top;
|
||||
return { ...transform,
|
||||
x: transform.x + offsetX - draggingNodeRect.width / 2,
|
||||
y: transform.y + offsetY - draggingNodeRect.height / 2
|
||||
};
|
||||
}
|
||||
|
||||
return transform;
|
||||
};
|
||||
|
||||
export { createSnapModifier, restrictToFirstScrollableAncestor, restrictToHorizontalAxis, restrictToParentElement, restrictToVerticalAxis, restrictToWindowEdges, snapCenterToCursor };
|
||||
//# sourceMappingURL=modifiers.esm.js.map
|
||||
1
node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js.map
generated
vendored
Normal file
1
node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/@dnd-kit/modifiers/dist/restrictToFirstScrollableAncestor.d.ts
generated
vendored
Normal file
2
node_modules/@dnd-kit/modifiers/dist/restrictToFirstScrollableAncestor.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Modifier } from '@dnd-kit/core';
|
||||
export declare const restrictToFirstScrollableAncestor: Modifier;
|
||||
2
node_modules/@dnd-kit/modifiers/dist/restrictToHorizontalAxis.d.ts
generated
vendored
Normal file
2
node_modules/@dnd-kit/modifiers/dist/restrictToHorizontalAxis.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Modifier } from '@dnd-kit/core';
|
||||
export declare const restrictToHorizontalAxis: Modifier;
|
||||
2
node_modules/@dnd-kit/modifiers/dist/restrictToParentElement.d.ts
generated
vendored
Normal file
2
node_modules/@dnd-kit/modifiers/dist/restrictToParentElement.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Modifier } from '@dnd-kit/core';
|
||||
export declare const restrictToParentElement: Modifier;
|
||||
2
node_modules/@dnd-kit/modifiers/dist/restrictToVerticalAxis.d.ts
generated
vendored
Normal file
2
node_modules/@dnd-kit/modifiers/dist/restrictToVerticalAxis.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Modifier } from '@dnd-kit/core';
|
||||
export declare const restrictToVerticalAxis: Modifier;
|
||||
2
node_modules/@dnd-kit/modifiers/dist/restrictToWindowEdges.d.ts
generated
vendored
Normal file
2
node_modules/@dnd-kit/modifiers/dist/restrictToWindowEdges.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Modifier } from '@dnd-kit/core';
|
||||
export declare const restrictToWindowEdges: Modifier;
|
||||
2
node_modules/@dnd-kit/modifiers/dist/snapCenterToCursor.d.ts
generated
vendored
Normal file
2
node_modules/@dnd-kit/modifiers/dist/snapCenterToCursor.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Modifier } from '@dnd-kit/core';
|
||||
export declare const snapCenterToCursor: Modifier;
|
||||
1
node_modules/@dnd-kit/modifiers/dist/utilities/index.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/modifiers/dist/utilities/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { restrictToBoundingRect } from './restrictToBoundingRect';
|
||||
3
node_modules/@dnd-kit/modifiers/dist/utilities/restrictToBoundingRect.d.ts
generated
vendored
Normal file
3
node_modules/@dnd-kit/modifiers/dist/utilities/restrictToBoundingRect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { ClientRect } from '@dnd-kit/core';
|
||||
import type { Transform } from '@dnd-kit/utilities';
|
||||
export declare function restrictToBoundingRect(transform: Transform, rect: ClientRect, boundingRect: ClientRect): Transform;
|
||||
Reference in New Issue
Block a user