react-grid-layout 2.2.1 → 2.2.3
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/dist/{ResponsiveGridLayout-MbDNfJ8M.d.ts → ResponsiveGridLayout-BjVraYMQ.d.mts} +2 -3
- package/dist/{ResponsiveGridLayout-DqK__izz.d.mts → ResponsiveGridLayout-BrhkSyZk.d.ts} +2 -3
- package/dist/{calculate-FbCWy8x1.d.mts → calculate-DH4EVtn1.d.mts} +2 -2
- package/dist/{calculate-9RxGrt-U.d.ts → calculate-rP3DHexe.d.ts} +2 -2
- package/dist/{chunk-2DDROKB2.js → chunk-55DQUWLA.js} +21 -23
- package/dist/{chunk-AWM66AWF.mjs → chunk-76RTO6EO.mjs} +0 -2
- package/dist/{chunk-QGXQSZII.js → chunk-7MZZ6T4J.js} +49 -35
- package/dist/{chunk-BJFPTW5Q.js → chunk-A5WIFECI.js} +0 -2
- package/dist/{chunk-3CEWSUXL.js → chunk-BPZQUJ7Y.js} +101 -84
- package/dist/{chunk-XYPIYYYQ.mjs → chunk-KDANGDDL.mjs} +1 -3
- package/dist/chunk-O3KX3VYW.mjs +1 -0
- package/dist/{chunk-YFVX5RDK.mjs → chunk-PZLKKWSX.mjs} +19 -5
- package/dist/{chunk-AZ6K3JIJ.mjs → chunk-WGL5FSZH.mjs} +34 -17
- package/dist/chunk-ZJHF4QM5.js +2 -0
- package/dist/core.d.mts +5 -5
- package/dist/core.d.ts +5 -5
- package/dist/core.js +68 -70
- package/dist/core.mjs +3 -5
- package/dist/extras.d.mts +2 -2
- package/dist/extras.d.ts +2 -2
- package/dist/extras.js +8 -10
- package/dist/extras.mjs +1 -3
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +40 -42
- package/dist/index.mjs +5 -7
- package/dist/legacy.d.mts +2 -2
- package/dist/legacy.d.ts +2 -2
- package/dist/legacy.js +25 -17
- package/dist/legacy.mjs +14 -6
- package/dist/{position-CetgOHhD.d.mts → position-BV-g3Ezg.d.mts} +2 -2
- package/dist/{position-DhZqWO1-.d.ts → position-CSgQSjwQ.d.ts} +2 -2
- package/dist/react.d.mts +5 -5
- package/dist/react.d.ts +5 -5
- package/dist/react.js +26 -28
- package/dist/react.mjs +5 -7
- package/dist/{responsive-T0N0GmBB.d.mts → responsive-BrTV_0tK.d.mts} +2 -2
- package/dist/{responsive-DLRtE8v8.d.ts → responsive-C_YtBQYq.d.ts} +2 -2
- package/dist/{types-BiXsdXr7.d.mts → types-jd8MiKM1.d.mts} +1 -1
- package/dist/{types-BiXsdXr7.d.ts → types-jd8MiKM1.d.ts} +1 -1
- package/package.json +22 -22
- package/dist/chunk-2DDROKB2.js.map +0 -1
- package/dist/chunk-3CEWSUXL.js.map +0 -1
- package/dist/chunk-AWM66AWF.mjs.map +0 -1
- package/dist/chunk-AZ6K3JIJ.mjs.map +0 -1
- package/dist/chunk-BJFPTW5Q.js.map +0 -1
- package/dist/chunk-PBQSHIID.js +0 -4
- package/dist/chunk-PBQSHIID.js.map +0 -1
- package/dist/chunk-QGXQSZII.js.map +0 -1
- package/dist/chunk-XYPIYYYQ.mjs.map +0 -1
- package/dist/chunk-YFVX5RDK.mjs.map +0 -1
- package/dist/chunk-ZWN22PS2.mjs +0 -3
- package/dist/chunk-ZWN22PS2.mjs.map +0 -1
- package/dist/core.js.map +0 -1
- package/dist/core.mjs.map +0 -1
- package/dist/extras.js.map +0 -1
- package/dist/extras.mjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/legacy.js.map +0 -1
- package/dist/legacy.mjs.map +0 -1
- package/dist/react.js.map +0 -1
- package/dist/react.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defaultConstraints, setTransform, setTopLeft, perc, applyPositionConstraints, resizeItemInDirection, applySizeConstraints, defaultPositionStrategy, defaultGridConfig, defaultDragConfig, defaultResizeConfig, defaultDropConfig, getCompactor, getBreakpointFromWidth, getColsFromBreakpoint, findOrGenerateResponsiveLayout, getIndentationValue } from './chunk-
|
|
2
|
-
import { calcXYRaw, calcGridItemWHPx, clamp, calcGridColWidth, calcWHRaw, calcGridItemPosition, bottom, getLayoutItem, cloneLayoutItem, moveElement, withLayoutItem, getAllCollisions, calcXY, cloneLayout, correctBounds } from './chunk-
|
|
1
|
+
import { defaultConstraints, setTransform, setTopLeft, perc, applyPositionConstraints, resizeItemInDirection, applySizeConstraints, defaultPositionStrategy, defaultGridConfig, defaultDragConfig, defaultResizeConfig, defaultDropConfig, getCompactor, getBreakpointFromWidth, getColsFromBreakpoint, findOrGenerateResponsiveLayout, getIndentationValue } from './chunk-KDANGDDL.mjs';
|
|
2
|
+
import { calcXYRaw, calcGridItemWHPx, clamp, calcGridColWidth, calcWHRaw, calcGridItemPosition, bottom, getLayoutItem, cloneLayoutItem, moveElement, withLayoutItem, getAllCollisions, calcXY, cloneLayout, correctBounds } from './chunk-76RTO6EO.mjs';
|
|
3
3
|
import React2, { useState, useRef, useMemo, useCallback, useEffect } from 'react';
|
|
4
4
|
import { DraggableCore } from 'react-draggable';
|
|
5
5
|
import { Resizable } from 'react-resizable';
|
|
@@ -66,6 +66,8 @@ function GridItem(props) {
|
|
|
66
66
|
);
|
|
67
67
|
const layoutRef = useRef(layout);
|
|
68
68
|
layoutRef.current = layout;
|
|
69
|
+
const onDragStartRef = useRef(null);
|
|
70
|
+
const onDragRef = useRef(null);
|
|
69
71
|
const dragPendingRef = useRef(false);
|
|
70
72
|
const initialDragClientRef = useRef({ x: 0, y: 0 });
|
|
71
73
|
const thresholdExceededRef = useRef(false);
|
|
@@ -245,8 +247,8 @@ function GridItem(props) {
|
|
|
245
247
|
if (offsetParent) {
|
|
246
248
|
const bottomBoundary = offsetParent.clientHeight - calcGridItemWHPx(h, rowHeight, margin[1]);
|
|
247
249
|
top = clamp(top, 0, bottomBoundary);
|
|
248
|
-
const
|
|
249
|
-
const rightBoundary = containerWidth - calcGridItemWHPx(w,
|
|
250
|
+
const colWidth2 = calcGridColWidth(positionParams);
|
|
251
|
+
const rightBoundary = containerWidth - calcGridItemWHPx(w, colWidth2, margin[0]);
|
|
250
252
|
left = clamp(left, 0, rightBoundary);
|
|
251
253
|
}
|
|
252
254
|
}
|
|
@@ -324,6 +326,8 @@ function GridItem(props) {
|
|
|
324
326
|
i
|
|
325
327
|
]
|
|
326
328
|
);
|
|
329
|
+
onDragStartRef.current = onDragStart;
|
|
330
|
+
onDragRef.current = onDrag;
|
|
327
331
|
const onResizeHandler = useCallback(
|
|
328
332
|
(e, { node, size, handle: resizeHandle2 }, position, handlerName) => {
|
|
329
333
|
const handler = handlerName === "onResizeStart" ? onResizeStartProp : handlerName === "onResize" ? onResizeProp : onResizeStopProp;
|
|
@@ -431,7 +435,10 @@ function GridItem(props) {
|
|
|
431
435
|
x: droppingPosition.left,
|
|
432
436
|
y: droppingPosition.top
|
|
433
437
|
};
|
|
434
|
-
|
|
438
|
+
onDragStartRef.current?.(
|
|
439
|
+
droppingPosition.e,
|
|
440
|
+
fakeData
|
|
441
|
+
);
|
|
435
442
|
} else if (shouldDrag) {
|
|
436
443
|
const deltaX = droppingPosition.left - dragPositionRef.current.left;
|
|
437
444
|
const deltaY = droppingPosition.top - dragPositionRef.current.top;
|
|
@@ -444,10 +451,13 @@ function GridItem(props) {
|
|
|
444
451
|
x: droppingPosition.left,
|
|
445
452
|
y: droppingPosition.top
|
|
446
453
|
};
|
|
447
|
-
|
|
454
|
+
onDragRef.current?.(
|
|
455
|
+
droppingPosition.e,
|
|
456
|
+
fakeData
|
|
457
|
+
);
|
|
448
458
|
}
|
|
449
459
|
prevDroppingPositionRef.current = droppingPosition;
|
|
450
|
-
}, [droppingPosition, dragging,
|
|
460
|
+
}, [droppingPosition, dragging, i]);
|
|
451
461
|
const pos = calcGridItemPosition(
|
|
452
462
|
positionParams,
|
|
453
463
|
x,
|
|
@@ -458,12 +468,15 @@ function GridItem(props) {
|
|
|
458
468
|
resizing ? resizePositionRef.current : null
|
|
459
469
|
);
|
|
460
470
|
const child = React2.Children.only(children);
|
|
461
|
-
const
|
|
471
|
+
const colWidth = calcGridColWidth(positionParams);
|
|
462
472
|
const minConstraints = [
|
|
463
|
-
|
|
464
|
-
|
|
473
|
+
calcGridItemWHPx(minW, colWidth, margin[0]),
|
|
474
|
+
calcGridItemWHPx(minH, rowHeight, margin[1])
|
|
475
|
+
];
|
|
476
|
+
const maxConstraints = [
|
|
477
|
+
calcGridItemWHPx(maxW, colWidth, margin[0]),
|
|
478
|
+
calcGridItemWHPx(maxH, rowHeight, margin[1])
|
|
465
479
|
];
|
|
466
|
-
const maxConstraints = [Infinity, Infinity];
|
|
467
480
|
const childProps = child.props;
|
|
468
481
|
const childClassName = childProps["className"];
|
|
469
482
|
const childStyle = childProps["style"];
|
|
@@ -701,7 +714,9 @@ function GridLayout(props) {
|
|
|
701
714
|
cols,
|
|
702
715
|
compactor
|
|
703
716
|
);
|
|
704
|
-
|
|
717
|
+
if (!deepEqual(newLayout, layout)) {
|
|
718
|
+
setLayout(newLayout);
|
|
719
|
+
}
|
|
705
720
|
}
|
|
706
721
|
prevPropsLayoutRef.current = propsLayout;
|
|
707
722
|
prevChildrenRef.current = children;
|
|
@@ -719,9 +734,10 @@ function GridLayout(props) {
|
|
|
719
734
|
useEffect(() => {
|
|
720
735
|
if (!activeDrag && !deepEqual(layout, prevLayoutRef.current)) {
|
|
721
736
|
prevLayoutRef.current = layout;
|
|
722
|
-
|
|
737
|
+
const publicLayout = layout.filter((l) => l.i !== droppingItem.i);
|
|
738
|
+
onLayoutChange(publicLayout);
|
|
723
739
|
}
|
|
724
|
-
}, [layout, activeDrag, onLayoutChange]);
|
|
740
|
+
}, [layout, activeDrag, onLayoutChange, droppingItem.i]);
|
|
725
741
|
const containerHeight = useMemo(() => {
|
|
726
742
|
if (!autoSize) return void 0;
|
|
727
743
|
const nbRow = bottom(layout);
|
|
@@ -1016,8 +1032,11 @@ function GridLayout(props) {
|
|
|
1016
1032
|
);
|
|
1017
1033
|
setDroppingDOMNode(/* @__PURE__ */ jsx("div", {}, finalDroppingItem.i));
|
|
1018
1034
|
setDroppingPosition(newDroppingPosition);
|
|
1035
|
+
const baseLayout = layoutRef.current.filter(
|
|
1036
|
+
(l) => l.i !== finalDroppingItem.i
|
|
1037
|
+
);
|
|
1019
1038
|
setLayout([
|
|
1020
|
-
...
|
|
1039
|
+
...baseLayout,
|
|
1021
1040
|
{
|
|
1022
1041
|
...finalDroppingItem,
|
|
1023
1042
|
x: calculatedPosition.x,
|
|
@@ -1500,5 +1519,3 @@ function ResponsiveGridLayout(props) {
|
|
|
1500
1519
|
}
|
|
1501
1520
|
|
|
1502
1521
|
export { GridItem, GridLayout, ResponsiveGridLayout };
|
|
1503
|
-
//# sourceMappingURL=chunk-AZ6K3JIJ.mjs.map
|
|
1504
|
-
//# sourceMappingURL=chunk-AZ6K3JIJ.mjs.map
|
package/dist/core.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as LayoutConstraint,
|
|
2
|
-
export { A as ArrayElement, B as Breakpoint,
|
|
3
|
-
export { c as collides,
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
1
|
+
import { f as LayoutConstraint, d as LayoutItem, g as ConstraintContext, R as ResizeHandleAxis } from './types-jd8MiKM1.mjs';
|
|
2
|
+
export { A as ArrayElement, B as Breakpoint, h as BreakpointCols, a as Breakpoints, C as CompactType, b as Compactor, i as DeepPartial, j as DragConfig, k as DragOverEvent, l as DropConfig, D as DroppingPosition, E as EventCallback, m as GridConfig, G as GridDragEvent, c as GridResizeEvent, L as Layout, M as Mutable, O as OnBreakpointChangeCallback, n as OnLayoutChangeCallback, o as PartialPosition, P as Position, p as PositionStrategy, q as ReactDraggableCallbackData, r as ResizeConfig, e as ResponsiveLayouts, S as Size, s as defaultDragConfig, t as defaultDropConfig, u as defaultGridConfig, v as defaultResizeConfig } from './types-jd8MiKM1.mjs';
|
|
3
|
+
export { c as collides, f as findOrGenerateResponsiveLayout, g as getAllCollisions, a as getBreakpointFromWidth, b as getColsFromBreakpoint, d as getFirstCollision, i as getIndentationValue, j as sortBreakpoints, s as sortLayoutItems, e as sortLayoutItemsByColRow, h as sortLayoutItemsByRowCol } from './responsive-BrTV_0tK.mjs';
|
|
4
|
+
export { i as absoluteStrategy, b as bottom, c as cloneLayout, a as cloneLayoutItem, j as compactItemHorizontal, k as compactItemVertical, l as correctBounds, o as createScaledStrategy, p as defaultPositionStrategy, g as getCompactor, d as getLayoutItem, q as getStatics, h as horizontalCompactor, r as horizontalOverlapCompactor, t as modifyLayout, m as moveElement, u as moveElementAwayFromCollision, n as noCompactor, w as noOverlapCompactor, x as perc, y as resizeItemInDirection, z as resolveCompactionCollision, s as setTopLeft, e as setTransform, A as transformStrategy, v as validateLayout, f as verticalCompactor, B as verticalOverlapCompactor, C as withLayoutItem } from './position-BV-g3Ezg.mjs';
|
|
5
|
+
export { G as GridCellConfig, d as GridCellDimensions, P as PositionParams, e as calcGridCellDimensions, f as calcGridColWidth, c as calcGridItemPosition, g as calcGridItemWHPx, a as calcWH, h as calcWHRaw, b as calcXY, i as calcXYRaw, j as clamp } from './calculate-DH4EVtn1.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Pluggable layout constraints for react-grid-layout v2
|
package/dist/core.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as LayoutConstraint,
|
|
2
|
-
export { A as ArrayElement, B as Breakpoint,
|
|
3
|
-
export { c as collides,
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
1
|
+
import { f as LayoutConstraint, d as LayoutItem, g as ConstraintContext, R as ResizeHandleAxis } from './types-jd8MiKM1.js';
|
|
2
|
+
export { A as ArrayElement, B as Breakpoint, h as BreakpointCols, a as Breakpoints, C as CompactType, b as Compactor, i as DeepPartial, j as DragConfig, k as DragOverEvent, l as DropConfig, D as DroppingPosition, E as EventCallback, m as GridConfig, G as GridDragEvent, c as GridResizeEvent, L as Layout, M as Mutable, O as OnBreakpointChangeCallback, n as OnLayoutChangeCallback, o as PartialPosition, P as Position, p as PositionStrategy, q as ReactDraggableCallbackData, r as ResizeConfig, e as ResponsiveLayouts, S as Size, s as defaultDragConfig, t as defaultDropConfig, u as defaultGridConfig, v as defaultResizeConfig } from './types-jd8MiKM1.js';
|
|
3
|
+
export { c as collides, f as findOrGenerateResponsiveLayout, g as getAllCollisions, a as getBreakpointFromWidth, b as getColsFromBreakpoint, d as getFirstCollision, i as getIndentationValue, j as sortBreakpoints, s as sortLayoutItems, e as sortLayoutItemsByColRow, h as sortLayoutItemsByRowCol } from './responsive-C_YtBQYq.js';
|
|
4
|
+
export { i as absoluteStrategy, b as bottom, c as cloneLayout, a as cloneLayoutItem, j as compactItemHorizontal, k as compactItemVertical, l as correctBounds, o as createScaledStrategy, p as defaultPositionStrategy, g as getCompactor, d as getLayoutItem, q as getStatics, h as horizontalCompactor, r as horizontalOverlapCompactor, t as modifyLayout, m as moveElement, u as moveElementAwayFromCollision, n as noCompactor, w as noOverlapCompactor, x as perc, y as resizeItemInDirection, z as resolveCompactionCollision, s as setTopLeft, e as setTransform, A as transformStrategy, v as validateLayout, f as verticalCompactor, B as verticalOverlapCompactor, C as withLayoutItem } from './position-CSgQSjwQ.js';
|
|
5
|
+
export { G as GridCellConfig, d as GridCellDimensions, P as PositionParams, e as calcGridCellDimensions, f as calcGridColWidth, c as calcGridItemPosition, g as calcGridItemWHPx, a as calcWH, h as calcWHRaw, b as calcXY, i as calcXYRaw, j as clamp } from './calculate-rP3DHexe.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Pluggable layout constraints for react-grid-layout v2
|
package/dist/core.js
CHANGED
|
@@ -1,270 +1,268 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('./chunk-
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
require('./chunk-ZJHF4QM5.js');
|
|
4
|
+
var chunk55DQUWLA_js = require('./chunk-55DQUWLA.js');
|
|
5
|
+
var chunkA5WIFECI_js = require('./chunk-A5WIFECI.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "absoluteStrategy", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunk55DQUWLA_js.absoluteStrategy; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "applyPositionConstraints", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunk55DQUWLA_js.applyPositionConstraints; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "applySizeConstraints", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunk55DQUWLA_js.applySizeConstraints; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "aspectRatio", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunk55DQUWLA_js.aspectRatio; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "boundedX", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunk55DQUWLA_js.boundedX; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "boundedY", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunk55DQUWLA_js.boundedY; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "compactItemHorizontal", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunk55DQUWLA_js.compactItemHorizontal; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "compactItemVertical", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunk55DQUWLA_js.compactItemVertical; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "containerBounds", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunk55DQUWLA_js.containerBounds; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "createScaledStrategy", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunk55DQUWLA_js.createScaledStrategy; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "defaultConstraints", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunk55DQUWLA_js.defaultConstraints; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "defaultDragConfig", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunk55DQUWLA_js.defaultDragConfig; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "defaultDropConfig", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunk55DQUWLA_js.defaultDropConfig; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "defaultGridConfig", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunk55DQUWLA_js.defaultGridConfig; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "defaultPositionStrategy", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunk55DQUWLA_js.defaultPositionStrategy; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "defaultResizeConfig", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunk55DQUWLA_js.defaultResizeConfig; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "findOrGenerateResponsiveLayout", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunk55DQUWLA_js.findOrGenerateResponsiveLayout; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "getBreakpointFromWidth", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunk55DQUWLA_js.getBreakpointFromWidth; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "getColsFromBreakpoint", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunk55DQUWLA_js.getColsFromBreakpoint; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "getCompactor", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunk55DQUWLA_js.getCompactor; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "getIndentationValue", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunk55DQUWLA_js.getIndentationValue; }
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "gridBounds", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunk55DQUWLA_js.gridBounds; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "horizontalCompactor", {
|
|
98
98
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunk55DQUWLA_js.horizontalCompactor; }
|
|
100
100
|
});
|
|
101
101
|
Object.defineProperty(exports, "horizontalOverlapCompactor", {
|
|
102
102
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunk55DQUWLA_js.horizontalOverlapCompactor; }
|
|
104
104
|
});
|
|
105
105
|
Object.defineProperty(exports, "maxSize", {
|
|
106
106
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunk55DQUWLA_js.maxSize; }
|
|
108
108
|
});
|
|
109
109
|
Object.defineProperty(exports, "minMaxSize", {
|
|
110
110
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunk55DQUWLA_js.minMaxSize; }
|
|
112
112
|
});
|
|
113
113
|
Object.defineProperty(exports, "minSize", {
|
|
114
114
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunk55DQUWLA_js.minSize; }
|
|
116
116
|
});
|
|
117
117
|
Object.defineProperty(exports, "noCompactor", {
|
|
118
118
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunk55DQUWLA_js.noCompactor; }
|
|
120
120
|
});
|
|
121
121
|
Object.defineProperty(exports, "noOverlapCompactor", {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunk55DQUWLA_js.noOverlapCompactor; }
|
|
124
124
|
});
|
|
125
125
|
Object.defineProperty(exports, "perc", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunk55DQUWLA_js.perc; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "resizeItemInDirection", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunk55DQUWLA_js.resizeItemInDirection; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "resolveCompactionCollision", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunk55DQUWLA_js.resolveCompactionCollision; }
|
|
136
136
|
});
|
|
137
137
|
Object.defineProperty(exports, "setTopLeft", {
|
|
138
138
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunk55DQUWLA_js.setTopLeft; }
|
|
140
140
|
});
|
|
141
141
|
Object.defineProperty(exports, "setTransform", {
|
|
142
142
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunk55DQUWLA_js.setTransform; }
|
|
144
144
|
});
|
|
145
145
|
Object.defineProperty(exports, "snapToGrid", {
|
|
146
146
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunk55DQUWLA_js.snapToGrid; }
|
|
148
148
|
});
|
|
149
149
|
Object.defineProperty(exports, "sortBreakpoints", {
|
|
150
150
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunk55DQUWLA_js.sortBreakpoints; }
|
|
152
152
|
});
|
|
153
153
|
Object.defineProperty(exports, "transformStrategy", {
|
|
154
154
|
enumerable: true,
|
|
155
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunk55DQUWLA_js.transformStrategy; }
|
|
156
156
|
});
|
|
157
157
|
Object.defineProperty(exports, "verticalCompactor", {
|
|
158
158
|
enumerable: true,
|
|
159
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunk55DQUWLA_js.verticalCompactor; }
|
|
160
160
|
});
|
|
161
161
|
Object.defineProperty(exports, "verticalOverlapCompactor", {
|
|
162
162
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunk55DQUWLA_js.verticalOverlapCompactor; }
|
|
164
164
|
});
|
|
165
165
|
Object.defineProperty(exports, "bottom", {
|
|
166
166
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkA5WIFECI_js.bottom; }
|
|
168
168
|
});
|
|
169
169
|
Object.defineProperty(exports, "calcGridCellDimensions", {
|
|
170
170
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkA5WIFECI_js.calcGridCellDimensions; }
|
|
172
172
|
});
|
|
173
173
|
Object.defineProperty(exports, "calcGridColWidth", {
|
|
174
174
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkA5WIFECI_js.calcGridColWidth; }
|
|
176
176
|
});
|
|
177
177
|
Object.defineProperty(exports, "calcGridItemPosition", {
|
|
178
178
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkA5WIFECI_js.calcGridItemPosition; }
|
|
180
180
|
});
|
|
181
181
|
Object.defineProperty(exports, "calcGridItemWHPx", {
|
|
182
182
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkA5WIFECI_js.calcGridItemWHPx; }
|
|
184
184
|
});
|
|
185
185
|
Object.defineProperty(exports, "calcWH", {
|
|
186
186
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkA5WIFECI_js.calcWH; }
|
|
188
188
|
});
|
|
189
189
|
Object.defineProperty(exports, "calcWHRaw", {
|
|
190
190
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkA5WIFECI_js.calcWHRaw; }
|
|
192
192
|
});
|
|
193
193
|
Object.defineProperty(exports, "calcXY", {
|
|
194
194
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkA5WIFECI_js.calcXY; }
|
|
196
196
|
});
|
|
197
197
|
Object.defineProperty(exports, "calcXYRaw", {
|
|
198
198
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkA5WIFECI_js.calcXYRaw; }
|
|
200
200
|
});
|
|
201
201
|
Object.defineProperty(exports, "clamp", {
|
|
202
202
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
203
|
+
get: function () { return chunkA5WIFECI_js.clamp; }
|
|
204
204
|
});
|
|
205
205
|
Object.defineProperty(exports, "cloneLayout", {
|
|
206
206
|
enumerable: true,
|
|
207
|
-
get: function () { return
|
|
207
|
+
get: function () { return chunkA5WIFECI_js.cloneLayout; }
|
|
208
208
|
});
|
|
209
209
|
Object.defineProperty(exports, "cloneLayoutItem", {
|
|
210
210
|
enumerable: true,
|
|
211
|
-
get: function () { return
|
|
211
|
+
get: function () { return chunkA5WIFECI_js.cloneLayoutItem; }
|
|
212
212
|
});
|
|
213
213
|
Object.defineProperty(exports, "collides", {
|
|
214
214
|
enumerable: true,
|
|
215
|
-
get: function () { return
|
|
215
|
+
get: function () { return chunkA5WIFECI_js.collides; }
|
|
216
216
|
});
|
|
217
217
|
Object.defineProperty(exports, "correctBounds", {
|
|
218
218
|
enumerable: true,
|
|
219
|
-
get: function () { return
|
|
219
|
+
get: function () { return chunkA5WIFECI_js.correctBounds; }
|
|
220
220
|
});
|
|
221
221
|
Object.defineProperty(exports, "getAllCollisions", {
|
|
222
222
|
enumerable: true,
|
|
223
|
-
get: function () { return
|
|
223
|
+
get: function () { return chunkA5WIFECI_js.getAllCollisions; }
|
|
224
224
|
});
|
|
225
225
|
Object.defineProperty(exports, "getFirstCollision", {
|
|
226
226
|
enumerable: true,
|
|
227
|
-
get: function () { return
|
|
227
|
+
get: function () { return chunkA5WIFECI_js.getFirstCollision; }
|
|
228
228
|
});
|
|
229
229
|
Object.defineProperty(exports, "getLayoutItem", {
|
|
230
230
|
enumerable: true,
|
|
231
|
-
get: function () { return
|
|
231
|
+
get: function () { return chunkA5WIFECI_js.getLayoutItem; }
|
|
232
232
|
});
|
|
233
233
|
Object.defineProperty(exports, "getStatics", {
|
|
234
234
|
enumerable: true,
|
|
235
|
-
get: function () { return
|
|
235
|
+
get: function () { return chunkA5WIFECI_js.getStatics; }
|
|
236
236
|
});
|
|
237
237
|
Object.defineProperty(exports, "modifyLayout", {
|
|
238
238
|
enumerable: true,
|
|
239
|
-
get: function () { return
|
|
239
|
+
get: function () { return chunkA5WIFECI_js.modifyLayout; }
|
|
240
240
|
});
|
|
241
241
|
Object.defineProperty(exports, "moveElement", {
|
|
242
242
|
enumerable: true,
|
|
243
|
-
get: function () { return
|
|
243
|
+
get: function () { return chunkA5WIFECI_js.moveElement; }
|
|
244
244
|
});
|
|
245
245
|
Object.defineProperty(exports, "moveElementAwayFromCollision", {
|
|
246
246
|
enumerable: true,
|
|
247
|
-
get: function () { return
|
|
247
|
+
get: function () { return chunkA5WIFECI_js.moveElementAwayFromCollision; }
|
|
248
248
|
});
|
|
249
249
|
Object.defineProperty(exports, "sortLayoutItems", {
|
|
250
250
|
enumerable: true,
|
|
251
|
-
get: function () { return
|
|
251
|
+
get: function () { return chunkA5WIFECI_js.sortLayoutItems; }
|
|
252
252
|
});
|
|
253
253
|
Object.defineProperty(exports, "sortLayoutItemsByColRow", {
|
|
254
254
|
enumerable: true,
|
|
255
|
-
get: function () { return
|
|
255
|
+
get: function () { return chunkA5WIFECI_js.sortLayoutItemsByColRow; }
|
|
256
256
|
});
|
|
257
257
|
Object.defineProperty(exports, "sortLayoutItemsByRowCol", {
|
|
258
258
|
enumerable: true,
|
|
259
|
-
get: function () { return
|
|
259
|
+
get: function () { return chunkA5WIFECI_js.sortLayoutItemsByRowCol; }
|
|
260
260
|
});
|
|
261
261
|
Object.defineProperty(exports, "validateLayout", {
|
|
262
262
|
enumerable: true,
|
|
263
|
-
get: function () { return
|
|
263
|
+
get: function () { return chunkA5WIFECI_js.validateLayout; }
|
|
264
264
|
});
|
|
265
265
|
Object.defineProperty(exports, "withLayoutItem", {
|
|
266
266
|
enumerable: true,
|
|
267
|
-
get: function () { return
|
|
267
|
+
get: function () { return chunkA5WIFECI_js.withLayoutItem; }
|
|
268
268
|
});
|
|
269
|
-
//# sourceMappingURL=core.js.map
|
|
270
|
-
//# sourceMappingURL=core.js.map
|
package/dist/core.mjs
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import './chunk-
|
|
2
|
-
export { absoluteStrategy, applyPositionConstraints, applySizeConstraints, aspectRatio, boundedX, boundedY, compactItemHorizontal, compactItemVertical, containerBounds, createScaledStrategy, defaultConstraints, defaultDragConfig, defaultDropConfig, defaultGridConfig, defaultPositionStrategy, defaultResizeConfig, findOrGenerateResponsiveLayout, getBreakpointFromWidth, getColsFromBreakpoint, getCompactor, getIndentationValue, gridBounds, horizontalCompactor, horizontalOverlapCompactor, maxSize, minMaxSize, minSize, noCompactor, noOverlapCompactor, perc, resizeItemInDirection, resolveCompactionCollision, setTopLeft, setTransform, snapToGrid, sortBreakpoints, transformStrategy, verticalCompactor, verticalOverlapCompactor } from './chunk-
|
|
3
|
-
export { bottom, calcGridCellDimensions, calcGridColWidth, calcGridItemPosition, calcGridItemWHPx, calcWH, calcWHRaw, calcXY, calcXYRaw, clamp, cloneLayout, cloneLayoutItem, collides, correctBounds, getAllCollisions, getFirstCollision, getLayoutItem, getStatics, modifyLayout, moveElement, moveElementAwayFromCollision, sortLayoutItems, sortLayoutItemsByColRow, sortLayoutItemsByRowCol, validateLayout, withLayoutItem } from './chunk-
|
|
4
|
-
//# sourceMappingURL=core.mjs.map
|
|
5
|
-
//# sourceMappingURL=core.mjs.map
|
|
1
|
+
import './chunk-O3KX3VYW.mjs';
|
|
2
|
+
export { absoluteStrategy, applyPositionConstraints, applySizeConstraints, aspectRatio, boundedX, boundedY, compactItemHorizontal, compactItemVertical, containerBounds, createScaledStrategy, defaultConstraints, defaultDragConfig, defaultDropConfig, defaultGridConfig, defaultPositionStrategy, defaultResizeConfig, findOrGenerateResponsiveLayout, getBreakpointFromWidth, getColsFromBreakpoint, getCompactor, getIndentationValue, gridBounds, horizontalCompactor, horizontalOverlapCompactor, maxSize, minMaxSize, minSize, noCompactor, noOverlapCompactor, perc, resizeItemInDirection, resolveCompactionCollision, setTopLeft, setTransform, snapToGrid, sortBreakpoints, transformStrategy, verticalCompactor, verticalOverlapCompactor } from './chunk-KDANGDDL.mjs';
|
|
3
|
+
export { bottom, calcGridCellDimensions, calcGridColWidth, calcGridItemPosition, calcGridItemWHPx, calcWH, calcWHRaw, calcXY, calcXYRaw, clamp, cloneLayout, cloneLayoutItem, collides, correctBounds, getAllCollisions, getFirstCollision, getLayoutItem, getStatics, modifyLayout, moveElement, moveElementAwayFromCollision, sortLayoutItems, sortLayoutItemsByColRow, sortLayoutItemsByRowCol, validateLayout, withLayoutItem } from './chunk-76RTO6EO.mjs';
|
package/dist/extras.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { G as GridCellConfig } from './calculate-DH4EVtn1.mjs';
|
|
3
|
+
import { b as Compactor } from './types-jd8MiKM1.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* GridBackground component
|
package/dist/extras.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { G as GridCellConfig } from './calculate-rP3DHexe.js';
|
|
3
|
+
import { b as Compactor } from './types-jd8MiKM1.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* GridBackground component
|
package/dist/extras.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkA5WIFECI_js = require('./chunk-A5WIFECI.js');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ function GridBackground({
|
|
|
18
18
|
style
|
|
19
19
|
}) {
|
|
20
20
|
const dims = react.useMemo(
|
|
21
|
-
() =>
|
|
21
|
+
() => chunkA5WIFECI_js.calcGridCellDimensions({
|
|
22
22
|
width,
|
|
23
23
|
cols,
|
|
24
24
|
rowHeight,
|
|
@@ -154,7 +154,7 @@ var fastVerticalCompactor = {
|
|
|
154
154
|
type: "vertical",
|
|
155
155
|
allowOverlap: false,
|
|
156
156
|
compact(layout, cols) {
|
|
157
|
-
const out =
|
|
157
|
+
const out = chunkA5WIFECI_js.cloneLayout(layout);
|
|
158
158
|
compactVerticalFast(out, cols, false);
|
|
159
159
|
return out;
|
|
160
160
|
}
|
|
@@ -163,7 +163,7 @@ var fastVerticalOverlapCompactor = {
|
|
|
163
163
|
...fastVerticalCompactor,
|
|
164
164
|
allowOverlap: true,
|
|
165
165
|
compact(layout, cols) {
|
|
166
|
-
const out =
|
|
166
|
+
const out = chunkA5WIFECI_js.cloneLayout(layout);
|
|
167
167
|
compactVerticalFast(out, cols, true);
|
|
168
168
|
return out;
|
|
169
169
|
}
|
|
@@ -292,7 +292,7 @@ var fastHorizontalCompactor = {
|
|
|
292
292
|
type: "horizontal",
|
|
293
293
|
allowOverlap: false,
|
|
294
294
|
compact(layout, cols) {
|
|
295
|
-
const out =
|
|
295
|
+
const out = chunkA5WIFECI_js.cloneLayout(layout);
|
|
296
296
|
compactHorizontalFast(out, cols, false);
|
|
297
297
|
return out;
|
|
298
298
|
}
|
|
@@ -301,7 +301,7 @@ var fastHorizontalOverlapCompactor = {
|
|
|
301
301
|
...fastHorizontalCompactor,
|
|
302
302
|
allowOverlap: true,
|
|
303
303
|
compact(layout, cols) {
|
|
304
|
-
const out =
|
|
304
|
+
const out = chunkA5WIFECI_js.cloneLayout(layout);
|
|
305
305
|
compactHorizontalFast(out, cols, true);
|
|
306
306
|
return out;
|
|
307
307
|
}
|
|
@@ -337,7 +337,7 @@ function compactWrap(layout, cols) {
|
|
|
337
337
|
for (let i = 0; i < sorted.length; i++) {
|
|
338
338
|
const sortedItem = sorted[i];
|
|
339
339
|
if (sortedItem === void 0) continue;
|
|
340
|
-
const l =
|
|
340
|
+
const l = chunkA5WIFECI_js.cloneLayoutItem(sortedItem);
|
|
341
341
|
if (l.static) {
|
|
342
342
|
const originalIndex2 = layout.indexOf(sortedItem);
|
|
343
343
|
out[originalIndex2] = l;
|
|
@@ -375,7 +375,7 @@ var wrapOverlapCompactor = {
|
|
|
375
375
|
...wrapCompactor,
|
|
376
376
|
allowOverlap: true,
|
|
377
377
|
compact(layout, _cols) {
|
|
378
|
-
return
|
|
378
|
+
return chunkA5WIFECI_js.cloneLayout(layout);
|
|
379
379
|
}
|
|
380
380
|
};
|
|
381
381
|
|
|
@@ -386,5 +386,3 @@ exports.fastVerticalCompactor = fastVerticalCompactor;
|
|
|
386
386
|
exports.fastVerticalOverlapCompactor = fastVerticalOverlapCompactor;
|
|
387
387
|
exports.wrapCompactor = wrapCompactor;
|
|
388
388
|
exports.wrapOverlapCompactor = wrapOverlapCompactor;
|
|
389
|
-
//# sourceMappingURL=extras.js.map
|
|
390
|
-
//# sourceMappingURL=extras.js.map
|
package/dist/extras.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { calcGridCellDimensions, cloneLayout, cloneLayoutItem } from './chunk-
|
|
1
|
+
import { calcGridCellDimensions, cloneLayout, cloneLayoutItem } from './chunk-76RTO6EO.mjs';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -378,5 +378,3 @@ var wrapOverlapCompactor = {
|
|
|
378
378
|
};
|
|
379
379
|
|
|
380
380
|
export { GridBackground, fastHorizontalCompactor, fastHorizontalOverlapCompactor, fastVerticalCompactor, fastVerticalOverlapCompactor, wrapCompactor, wrapOverlapCompactor };
|
|
381
|
-
//# sourceMappingURL=extras.mjs.map
|
|
382
|
-
//# sourceMappingURL=extras.mjs.map
|