@sguisse/react-grid-layout 2.2.3-sguisse.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/LICENSE +21 -0
- package/README.md +125 -0
- package/css/styles.css +120 -0
- package/dist/ResponsiveGridLayout-B_6TXsWM.d.ts +80 -0
- package/dist/ResponsiveGridLayout-Bin5MBC3.d.mts +80 -0
- package/dist/calculate-CoBSgofg.d.mts +196 -0
- package/dist/calculate-K0IBpu53.d.ts +196 -0
- package/dist/chunk-7BT7XXIT.js +74 -0
- package/dist/chunk-G3PAJYGP.mjs +72 -0
- package/dist/chunk-ITLZ7N2R.mjs +456 -0
- package/dist/chunk-J4LTYI7L.js +485 -0
- package/dist/chunk-KKV4ZCG4.mjs +583 -0
- package/dist/chunk-LQOPWRJR.js +623 -0
- package/dist/chunk-O3KX3VYW.mjs +1 -0
- package/dist/chunk-STBCV65G.js +3159 -0
- package/dist/chunk-UZL6BMXQ.mjs +3146 -0
- package/dist/chunk-ZJHF4QM5.js +2 -0
- package/dist/core.d.mts +160 -0
- package/dist/core.d.ts +160 -0
- package/dist/core.js +268 -0
- package/dist/core.mjs +3 -0
- package/dist/extras.d.mts +208 -0
- package/dist/extras.d.ts +208 -0
- package/dist/extras.js +388 -0
- package/dist/extras.mjs +380 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +152 -0
- package/dist/index.mjs +5 -0
- package/dist/legacy.d.mts +163 -0
- package/dist/legacy.d.ts +163 -0
- package/dist/legacy.js +331 -0
- package/dist/legacy.mjs +319 -0
- package/dist/position-BeP60S5h.d.ts +316 -0
- package/dist/position-CeG3Nr4z.d.mts +316 -0
- package/dist/react.d.mts +214 -0
- package/dist/react.d.ts +214 -0
- package/dist/react.js +94 -0
- package/dist/react.mjs +5 -0
- package/dist/responsive-D4zBXLkH.d.ts +145 -0
- package/dist/responsive-DQi_9rBi.d.mts +145 -0
- package/dist/types-Dbg8jAWj.d.mts +458 -0
- package/dist/types-Dbg8jAWj.d.ts +458 -0
- package/index-dev.js +23 -0
- package/index.js +8 -0
- package/package.json +238 -0
package/dist/extras.mjs
ADDED
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { calcGridCellDimensions, cloneLayout, cloneLayoutItem } from './chunk-ITLZ7N2R.mjs';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function GridBackground({
|
|
6
|
+
width,
|
|
7
|
+
cols,
|
|
8
|
+
rowHeight,
|
|
9
|
+
margin = [10, 10],
|
|
10
|
+
containerPadding,
|
|
11
|
+
rows = 10,
|
|
12
|
+
height,
|
|
13
|
+
color = "#e0e0e0",
|
|
14
|
+
borderRadius = 4,
|
|
15
|
+
className,
|
|
16
|
+
style
|
|
17
|
+
}) {
|
|
18
|
+
const dims = useMemo(
|
|
19
|
+
() => calcGridCellDimensions({
|
|
20
|
+
width,
|
|
21
|
+
cols,
|
|
22
|
+
rowHeight,
|
|
23
|
+
margin,
|
|
24
|
+
containerPadding
|
|
25
|
+
}),
|
|
26
|
+
[width, cols, rowHeight, margin, containerPadding]
|
|
27
|
+
);
|
|
28
|
+
const rowCount = useMemo(() => {
|
|
29
|
+
if (rows !== "auto") return rows;
|
|
30
|
+
if (height) {
|
|
31
|
+
const padding = containerPadding ?? margin;
|
|
32
|
+
return Math.ceil(
|
|
33
|
+
(height - padding[1] * 2 + margin[1]) / (rowHeight + margin[1])
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return 10;
|
|
37
|
+
}, [rows, height, rowHeight, margin, containerPadding]);
|
|
38
|
+
const totalHeight = useMemo(() => {
|
|
39
|
+
const padding = containerPadding ?? margin;
|
|
40
|
+
return padding[1] * 2 + rowCount * rowHeight + (rowCount - 1) * margin[1];
|
|
41
|
+
}, [rowCount, rowHeight, margin, containerPadding]);
|
|
42
|
+
const cells = useMemo(() => {
|
|
43
|
+
const rects = [];
|
|
44
|
+
const { cellWidth, cellHeight, offsetX, offsetY, gapX, gapY } = dims;
|
|
45
|
+
for (let row = 0; row < rowCount; row++) {
|
|
46
|
+
for (let col = 0; col < cols; col++) {
|
|
47
|
+
const x = offsetX + col * (cellWidth + gapX);
|
|
48
|
+
const y = offsetY + row * (cellHeight + gapY);
|
|
49
|
+
rects.push(
|
|
50
|
+
/* @__PURE__ */ jsx(
|
|
51
|
+
"rect",
|
|
52
|
+
{
|
|
53
|
+
x,
|
|
54
|
+
y,
|
|
55
|
+
width: cellWidth,
|
|
56
|
+
height: cellHeight,
|
|
57
|
+
rx: borderRadius,
|
|
58
|
+
ry: borderRadius,
|
|
59
|
+
fill: color
|
|
60
|
+
},
|
|
61
|
+
`${row}-${col}`
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return rects;
|
|
67
|
+
}, [dims, rowCount, cols, borderRadius, color]);
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
"svg",
|
|
70
|
+
{
|
|
71
|
+
className,
|
|
72
|
+
style: {
|
|
73
|
+
position: "absolute",
|
|
74
|
+
top: 0,
|
|
75
|
+
left: 0,
|
|
76
|
+
width,
|
|
77
|
+
height: totalHeight,
|
|
78
|
+
pointerEvents: "none",
|
|
79
|
+
...style
|
|
80
|
+
},
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
children: cells
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// src/extras/fastVerticalCompactor.ts
|
|
88
|
+
function collides(l1, l2) {
|
|
89
|
+
if (l1.i === l2.i) return false;
|
|
90
|
+
return l1.x < l2.x + l2.w && l1.x + l1.w > l2.x && l1.y < l2.y + l2.h && l1.y + l1.h > l2.y;
|
|
91
|
+
}
|
|
92
|
+
function compactVerticalFast(layout, cols, allowOverlap) {
|
|
93
|
+
const numItems = layout.length;
|
|
94
|
+
layout.sort((a, b) => {
|
|
95
|
+
if (a.y < b.y) return -1;
|
|
96
|
+
if (a.y > b.y) return 1;
|
|
97
|
+
if (a.x < b.x) return -1;
|
|
98
|
+
if (a.x > b.x) return 1;
|
|
99
|
+
if (a.static && !b.static) return -1;
|
|
100
|
+
if (!a.static && b.static) return 1;
|
|
101
|
+
return 0;
|
|
102
|
+
});
|
|
103
|
+
const tide = new Array(cols).fill(0);
|
|
104
|
+
const staticItems = layout.filter((item) => item.static);
|
|
105
|
+
const numStatics = staticItems.length;
|
|
106
|
+
let staticOffset = 0;
|
|
107
|
+
for (let i = 0; i < numItems; i++) {
|
|
108
|
+
const item = layout[i];
|
|
109
|
+
let x2 = item.x + item.w;
|
|
110
|
+
if (x2 > cols) {
|
|
111
|
+
x2 = cols;
|
|
112
|
+
}
|
|
113
|
+
if (item.static) {
|
|
114
|
+
++staticOffset;
|
|
115
|
+
} else {
|
|
116
|
+
let minGap = Infinity;
|
|
117
|
+
for (let x = item.x; x < x2; ++x) {
|
|
118
|
+
const tideValue = tide[x] ?? 0;
|
|
119
|
+
const gap = item.y - tideValue;
|
|
120
|
+
if (gap < minGap) {
|
|
121
|
+
minGap = gap;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (!allowOverlap || minGap > 0) {
|
|
125
|
+
item.y -= minGap;
|
|
126
|
+
}
|
|
127
|
+
for (let j = staticOffset; !allowOverlap && j < numStatics; ++j) {
|
|
128
|
+
const staticItem = staticItems[j];
|
|
129
|
+
if (staticItem === void 0) continue;
|
|
130
|
+
if (staticItem.y >= item.y + item.h) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
if (collides(item, staticItem)) {
|
|
134
|
+
item.y = staticItem.y + staticItem.h;
|
|
135
|
+
if (j > staticOffset) {
|
|
136
|
+
j = staticOffset;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
item.moved = false;
|
|
141
|
+
}
|
|
142
|
+
const t = item.y + item.h;
|
|
143
|
+
for (let x = item.x; x < x2; ++x) {
|
|
144
|
+
const currentTide = tide[x] ?? 0;
|
|
145
|
+
if (currentTide < t) {
|
|
146
|
+
tide[x] = t;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
var fastVerticalCompactor = {
|
|
152
|
+
type: "vertical",
|
|
153
|
+
allowOverlap: false,
|
|
154
|
+
compact(layout, cols) {
|
|
155
|
+
const out = cloneLayout(layout);
|
|
156
|
+
compactVerticalFast(out, cols, false);
|
|
157
|
+
return out;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
var fastVerticalOverlapCompactor = {
|
|
161
|
+
...fastVerticalCompactor,
|
|
162
|
+
allowOverlap: true,
|
|
163
|
+
compact(layout, cols) {
|
|
164
|
+
const out = cloneLayout(layout);
|
|
165
|
+
compactVerticalFast(out, cols, true);
|
|
166
|
+
return out;
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
// src/extras/fastHorizontalCompactor.ts
|
|
171
|
+
function ensureTideRows(tide, neededRows) {
|
|
172
|
+
while (tide.length < neededRows) {
|
|
173
|
+
tide.push(0);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function getMaxTideForItem(tide, y, h) {
|
|
177
|
+
let maxTide = 0;
|
|
178
|
+
for (let row = y; row < y + h; row++) {
|
|
179
|
+
const tideValue = tide[row] ?? 0;
|
|
180
|
+
if (tideValue > maxTide) {
|
|
181
|
+
maxTide = tideValue;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return maxTide;
|
|
185
|
+
}
|
|
186
|
+
function canPlaceAt(item, x, y, staticItems, cols) {
|
|
187
|
+
if (x + item.w > cols) return false;
|
|
188
|
+
for (const staticItem of staticItems) {
|
|
189
|
+
if (x < staticItem.x + staticItem.w && x + item.w > staticItem.x && y < staticItem.y + staticItem.h && y + item.h > staticItem.y) {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
function compactHorizontalFast(layout, cols, allowOverlap) {
|
|
196
|
+
const numItems = layout.length;
|
|
197
|
+
if (numItems === 0) return;
|
|
198
|
+
layout.sort((a, b) => {
|
|
199
|
+
if (a.x !== b.x) return a.x - b.x;
|
|
200
|
+
if (a.y !== b.y) return a.y - b.y;
|
|
201
|
+
if (a.static !== b.static) return a.static ? -1 : 1;
|
|
202
|
+
return 0;
|
|
203
|
+
});
|
|
204
|
+
let maxRow = 0;
|
|
205
|
+
for (let i = 0; i < numItems; i++) {
|
|
206
|
+
const item = layout[i];
|
|
207
|
+
if (item !== void 0) {
|
|
208
|
+
const bottom = item.y + item.h;
|
|
209
|
+
if (bottom > maxRow) maxRow = bottom;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
const tide = new Array(maxRow).fill(0);
|
|
213
|
+
const staticItems = layout.filter((item) => item.static);
|
|
214
|
+
const maxRowLimit = Math.max(1e4, numItems * 100);
|
|
215
|
+
for (let i = 0; i < numItems; i++) {
|
|
216
|
+
const item = layout[i];
|
|
217
|
+
if (item.static) {
|
|
218
|
+
ensureTideRows(tide, item.y + item.h);
|
|
219
|
+
const t2 = item.x + item.w;
|
|
220
|
+
for (let y = item.y; y < item.y + item.h; y++) {
|
|
221
|
+
if ((tide[y] ?? 0) < t2) {
|
|
222
|
+
tide[y] = t2;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
let targetY = item.y;
|
|
228
|
+
let targetX = 0;
|
|
229
|
+
let placed = false;
|
|
230
|
+
while (!placed) {
|
|
231
|
+
ensureTideRows(tide, targetY + item.h);
|
|
232
|
+
const maxTide = getMaxTideForItem(tide, targetY, item.h);
|
|
233
|
+
targetX = maxTide;
|
|
234
|
+
if (targetX + item.w <= cols) {
|
|
235
|
+
if (allowOverlap || canPlaceAt(item, targetX, targetY, staticItems, cols)) {
|
|
236
|
+
placed = true;
|
|
237
|
+
} else {
|
|
238
|
+
let maxStaticRight = targetX;
|
|
239
|
+
let foundCollision = false;
|
|
240
|
+
for (const staticItem of staticItems) {
|
|
241
|
+
if (targetX < staticItem.x + staticItem.w && targetX + item.w > staticItem.x && targetY < staticItem.y + staticItem.h && targetY + item.h > staticItem.y) {
|
|
242
|
+
maxStaticRight = Math.max(
|
|
243
|
+
maxStaticRight,
|
|
244
|
+
staticItem.x + staticItem.w
|
|
245
|
+
);
|
|
246
|
+
foundCollision = true;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
if (foundCollision) {
|
|
250
|
+
targetX = maxStaticRight;
|
|
251
|
+
}
|
|
252
|
+
if (foundCollision && targetX + item.w <= cols) {
|
|
253
|
+
if (canPlaceAt(item, targetX, targetY, staticItems, cols)) {
|
|
254
|
+
placed = true;
|
|
255
|
+
} else {
|
|
256
|
+
targetY++;
|
|
257
|
+
}
|
|
258
|
+
} else if (foundCollision) {
|
|
259
|
+
targetY++;
|
|
260
|
+
} else {
|
|
261
|
+
placed = true;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
} else {
|
|
265
|
+
targetY++;
|
|
266
|
+
}
|
|
267
|
+
if (targetY > maxRowLimit) {
|
|
268
|
+
if (typeof console !== "undefined" && console.warn) {
|
|
269
|
+
console.warn(
|
|
270
|
+
`Fast horizontal compactor: Item "${item.i}" exceeded max row limit (${targetY}). This may indicate a layout that cannot be compacted within grid bounds.`
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
targetX = 0;
|
|
274
|
+
placed = true;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
item.x = targetX;
|
|
278
|
+
item.y = targetY;
|
|
279
|
+
item.moved = false;
|
|
280
|
+
ensureTideRows(tide, targetY + item.h);
|
|
281
|
+
const t = targetX + item.w;
|
|
282
|
+
for (let y = targetY; y < targetY + item.h; y++) {
|
|
283
|
+
if ((tide[y] ?? 0) < t) {
|
|
284
|
+
tide[y] = t;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
var fastHorizontalCompactor = {
|
|
290
|
+
type: "horizontal",
|
|
291
|
+
allowOverlap: false,
|
|
292
|
+
compact(layout, cols) {
|
|
293
|
+
const out = cloneLayout(layout);
|
|
294
|
+
compactHorizontalFast(out, cols, false);
|
|
295
|
+
return out;
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
var fastHorizontalOverlapCompactor = {
|
|
299
|
+
...fastHorizontalCompactor,
|
|
300
|
+
allowOverlap: true,
|
|
301
|
+
compact(layout, cols) {
|
|
302
|
+
const out = cloneLayout(layout);
|
|
303
|
+
compactHorizontalFast(out, cols, true);
|
|
304
|
+
return out;
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
// src/extras/wrapCompactor.ts
|
|
309
|
+
function sortByWrapOrder(layout) {
|
|
310
|
+
return [...layout].sort((a, b) => {
|
|
311
|
+
if (a.y !== b.y) return a.y - b.y;
|
|
312
|
+
return a.x - b.x;
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
function fromWrapPosition(pos, cols) {
|
|
316
|
+
return {
|
|
317
|
+
x: pos % cols,
|
|
318
|
+
y: Math.floor(pos / cols)
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
function compactWrap(layout, cols) {
|
|
322
|
+
if (layout.length === 0) return [];
|
|
323
|
+
const sorted = sortByWrapOrder(layout);
|
|
324
|
+
const out = new Array(layout.length);
|
|
325
|
+
const statics = sorted.filter((item) => item.static);
|
|
326
|
+
const staticPositions = /* @__PURE__ */ new Set();
|
|
327
|
+
for (const s of statics) {
|
|
328
|
+
for (let dy = 0; dy < s.h; dy++) {
|
|
329
|
+
for (let dx = 0; dx < s.w; dx++) {
|
|
330
|
+
staticPositions.add((s.y + dy) * cols + (s.x + dx));
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
let nextPos = 0;
|
|
335
|
+
for (let i = 0; i < sorted.length; i++) {
|
|
336
|
+
const sortedItem = sorted[i];
|
|
337
|
+
if (sortedItem === void 0) continue;
|
|
338
|
+
const l = cloneLayoutItem(sortedItem);
|
|
339
|
+
if (l.static) {
|
|
340
|
+
const originalIndex2 = layout.indexOf(sortedItem);
|
|
341
|
+
out[originalIndex2] = l;
|
|
342
|
+
l.moved = false;
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
345
|
+
while (staticPositions.has(nextPos)) {
|
|
346
|
+
nextPos++;
|
|
347
|
+
}
|
|
348
|
+
const { x, y } = fromWrapPosition(nextPos, cols);
|
|
349
|
+
if (x + l.w > cols) {
|
|
350
|
+
nextPos = (y + 1) * cols;
|
|
351
|
+
while (staticPositions.has(nextPos)) {
|
|
352
|
+
nextPos++;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
const newCoords = fromWrapPosition(nextPos, cols);
|
|
356
|
+
l.x = newCoords.x;
|
|
357
|
+
l.y = newCoords.y;
|
|
358
|
+
nextPos += l.w;
|
|
359
|
+
const originalIndex = layout.indexOf(sortedItem);
|
|
360
|
+
out[originalIndex] = l;
|
|
361
|
+
l.moved = false;
|
|
362
|
+
}
|
|
363
|
+
return out;
|
|
364
|
+
}
|
|
365
|
+
var wrapCompactor = {
|
|
366
|
+
type: "wrap",
|
|
367
|
+
allowOverlap: false,
|
|
368
|
+
compact(layout, cols) {
|
|
369
|
+
return compactWrap(layout, cols);
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
var wrapOverlapCompactor = {
|
|
373
|
+
...wrapCompactor,
|
|
374
|
+
allowOverlap: true,
|
|
375
|
+
compact(layout, _cols) {
|
|
376
|
+
return cloneLayout(layout);
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
export { GridBackground, fastHorizontalCompactor, fastHorizontalOverlapCompactor, fastVerticalCompactor, fastVerticalOverlapCompactor, wrapCompactor, wrapOverlapCompactor };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { DEFAULT_BREAKPOINTS, DEFAULT_COLS, DefaultBreakpoints, DragState, DropState, GridItem, GridItemCallback, GridItemProps, ResizeHandle, ResizeState, UseContainerWidthOptions, UseContainerWidthResult, UseGridLayoutOptions, UseGridLayoutResult, UseResponsiveLayoutOptions, UseResponsiveLayoutResult, useContainerWidth, useGridLayout, useResponsiveLayout } from './react.mjs';
|
|
2
|
+
export { G as GridLayout, a as GridLayoutProps, G as ReactGridLayout, a as ReactGridLayoutProps, R as Responsive, R as ResponsiveGridLayout, b as ResponsiveGridLayoutProps, b as ResponsiveProps, G as default } from './ResponsiveGridLayout-Bin5MBC3.mjs';
|
|
3
|
+
export { B as Breakpoint, a as Breakpoints, C as CompactType, b as Compactor, D as DroppingPosition, E as EventCallback, G as GridDragEvent, c as GridResizeEvent, L as Layout, d as LayoutItem, P as Position, R as ResizeHandleAxis, e as ResponsiveLayouts } from './types-Dbg8jAWj.mjs';
|
|
4
|
+
export { c as collides, f as findOrGenerateResponsiveLayout, g as getAllCollisions, a as getBreakpointFromWidth, b as getColsFromBreakpoint, d as getFirstCollision, s as sortLayoutItems, e as sortLayoutItemsByColRow, h as sortLayoutItemsByRowCol } from './responsive-DQi_9rBi.mjs';
|
|
5
|
+
export { b as bottom, c as cloneLayout, a as cloneLayoutItem, g as getCompactor, d as getLayoutItem, h as horizontalCompactor, m as moveElement, n as noCompactor, s as setTopLeft, e as setTransform, v as validateLayout, f as verticalCompactor } from './position-CeG3Nr4z.mjs';
|
|
6
|
+
export { c as calcGridItemPosition, a as calcWH, b as calcXY } from './calculate-CoBSgofg.mjs';
|
|
7
|
+
import 'react';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { DEFAULT_BREAKPOINTS, DEFAULT_COLS, DefaultBreakpoints, DragState, DropState, GridItem, GridItemCallback, GridItemProps, ResizeHandle, ResizeState, UseContainerWidthOptions, UseContainerWidthResult, UseGridLayoutOptions, UseGridLayoutResult, UseResponsiveLayoutOptions, UseResponsiveLayoutResult, useContainerWidth, useGridLayout, useResponsiveLayout } from './react.js';
|
|
2
|
+
export { G as GridLayout, a as GridLayoutProps, G as ReactGridLayout, a as ReactGridLayoutProps, R as Responsive, R as ResponsiveGridLayout, b as ResponsiveGridLayoutProps, b as ResponsiveProps, G as default } from './ResponsiveGridLayout-B_6TXsWM.js';
|
|
3
|
+
export { B as Breakpoint, a as Breakpoints, C as CompactType, b as Compactor, D as DroppingPosition, E as EventCallback, G as GridDragEvent, c as GridResizeEvent, L as Layout, d as LayoutItem, P as Position, R as ResizeHandleAxis, e as ResponsiveLayouts } from './types-Dbg8jAWj.js';
|
|
4
|
+
export { c as collides, f as findOrGenerateResponsiveLayout, g as getAllCollisions, a as getBreakpointFromWidth, b as getColsFromBreakpoint, d as getFirstCollision, s as sortLayoutItems, e as sortLayoutItemsByColRow, h as sortLayoutItemsByRowCol } from './responsive-D4zBXLkH.js';
|
|
5
|
+
export { b as bottom, c as cloneLayout, a as cloneLayoutItem, g as getCompactor, d as getLayoutItem, h as horizontalCompactor, m as moveElement, n as noCompactor, s as setTopLeft, e as setTransform, v as validateLayout, f as verticalCompactor } from './position-BeP60S5h.js';
|
|
6
|
+
export { c as calcGridItemPosition, a as calcWH, b as calcXY } from './calculate-K0IBpu53.js';
|
|
7
|
+
import 'react';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var chunk7BT7XXIT_js = require('./chunk-7BT7XXIT.js');
|
|
6
|
+
require('./chunk-ZJHF4QM5.js');
|
|
7
|
+
var chunkSTBCV65G_js = require('./chunk-STBCV65G.js');
|
|
8
|
+
var chunkLQOPWRJR_js = require('./chunk-LQOPWRJR.js');
|
|
9
|
+
var chunkJ4LTYI7L_js = require('./chunk-J4LTYI7L.js');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
Object.defineProperty(exports, "useContainerWidth", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunk7BT7XXIT_js.useContainerWidth; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "DEFAULT_BREAKPOINTS", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkSTBCV65G_js.DEFAULT_BREAKPOINTS; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "DEFAULT_COLS", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkSTBCV65G_js.DEFAULT_COLS; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "GridItem", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunkSTBCV65G_js.GridItem; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "GridLayout", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunkSTBCV65G_js.GridLayout; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "ReactGridLayout", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunkSTBCV65G_js.GridLayout; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "Responsive", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return chunkSTBCV65G_js.ResponsiveGridLayout; }
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "ResponsiveGridLayout", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () { return chunkSTBCV65G_js.ResponsiveGridLayout; }
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, "default", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () { return chunkSTBCV65G_js.GridLayout; }
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "useGridLayout", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return chunkSTBCV65G_js.useGridLayout; }
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "useResponsiveLayout", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () { return chunkSTBCV65G_js.useResponsiveLayout; }
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, "findOrGenerateResponsiveLayout", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () { return chunkLQOPWRJR_js.findOrGenerateResponsiveLayout; }
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "getBreakpointFromWidth", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () { return chunkLQOPWRJR_js.getBreakpointFromWidth; }
|
|
64
|
+
});
|
|
65
|
+
Object.defineProperty(exports, "getColsFromBreakpoint", {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () { return chunkLQOPWRJR_js.getColsFromBreakpoint; }
|
|
68
|
+
});
|
|
69
|
+
Object.defineProperty(exports, "getCompactor", {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
get: function () { return chunkLQOPWRJR_js.getCompactor; }
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(exports, "horizontalCompactor", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () { return chunkLQOPWRJR_js.horizontalCompactor; }
|
|
76
|
+
});
|
|
77
|
+
Object.defineProperty(exports, "noCompactor", {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function () { return chunkLQOPWRJR_js.noCompactor; }
|
|
80
|
+
});
|
|
81
|
+
Object.defineProperty(exports, "setTopLeft", {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function () { return chunkLQOPWRJR_js.setTopLeft; }
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(exports, "setTransform", {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function () { return chunkLQOPWRJR_js.setTransform; }
|
|
88
|
+
});
|
|
89
|
+
Object.defineProperty(exports, "verticalCompactor", {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
get: function () { return chunkLQOPWRJR_js.verticalCompactor; }
|
|
92
|
+
});
|
|
93
|
+
Object.defineProperty(exports, "bottom", {
|
|
94
|
+
enumerable: true,
|
|
95
|
+
get: function () { return chunkJ4LTYI7L_js.bottom; }
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(exports, "calcGridItemPosition", {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
get: function () { return chunkJ4LTYI7L_js.calcGridItemPosition; }
|
|
100
|
+
});
|
|
101
|
+
Object.defineProperty(exports, "calcWH", {
|
|
102
|
+
enumerable: true,
|
|
103
|
+
get: function () { return chunkJ4LTYI7L_js.calcWH; }
|
|
104
|
+
});
|
|
105
|
+
Object.defineProperty(exports, "calcXY", {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get: function () { return chunkJ4LTYI7L_js.calcXY; }
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(exports, "cloneLayout", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () { return chunkJ4LTYI7L_js.cloneLayout; }
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(exports, "cloneLayoutItem", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
get: function () { return chunkJ4LTYI7L_js.cloneLayoutItem; }
|
|
116
|
+
});
|
|
117
|
+
Object.defineProperty(exports, "collides", {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function () { return chunkJ4LTYI7L_js.collides; }
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(exports, "getAllCollisions", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function () { return chunkJ4LTYI7L_js.getAllCollisions; }
|
|
124
|
+
});
|
|
125
|
+
Object.defineProperty(exports, "getFirstCollision", {
|
|
126
|
+
enumerable: true,
|
|
127
|
+
get: function () { return chunkJ4LTYI7L_js.getFirstCollision; }
|
|
128
|
+
});
|
|
129
|
+
Object.defineProperty(exports, "getLayoutItem", {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function () { return chunkJ4LTYI7L_js.getLayoutItem; }
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(exports, "moveElement", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function () { return chunkJ4LTYI7L_js.moveElement; }
|
|
136
|
+
});
|
|
137
|
+
Object.defineProperty(exports, "sortLayoutItems", {
|
|
138
|
+
enumerable: true,
|
|
139
|
+
get: function () { return chunkJ4LTYI7L_js.sortLayoutItems; }
|
|
140
|
+
});
|
|
141
|
+
Object.defineProperty(exports, "sortLayoutItemsByColRow", {
|
|
142
|
+
enumerable: true,
|
|
143
|
+
get: function () { return chunkJ4LTYI7L_js.sortLayoutItemsByColRow; }
|
|
144
|
+
});
|
|
145
|
+
Object.defineProperty(exports, "sortLayoutItemsByRowCol", {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
get: function () { return chunkJ4LTYI7L_js.sortLayoutItemsByRowCol; }
|
|
148
|
+
});
|
|
149
|
+
Object.defineProperty(exports, "validateLayout", {
|
|
150
|
+
enumerable: true,
|
|
151
|
+
get: function () { return chunkJ4LTYI7L_js.validateLayout; }
|
|
152
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { useContainerWidth } from './chunk-G3PAJYGP.mjs';
|
|
2
|
+
import './chunk-O3KX3VYW.mjs';
|
|
3
|
+
export { DEFAULT_BREAKPOINTS, DEFAULT_COLS, GridItem, GridLayout, GridLayout as ReactGridLayout, ResponsiveGridLayout as Responsive, ResponsiveGridLayout, GridLayout as default, useGridLayout, useResponsiveLayout } from './chunk-UZL6BMXQ.mjs';
|
|
4
|
+
export { findOrGenerateResponsiveLayout, getBreakpointFromWidth, getColsFromBreakpoint, getCompactor, horizontalCompactor, noCompactor, setTopLeft, setTransform, verticalCompactor } from './chunk-KKV4ZCG4.mjs';
|
|
5
|
+
export { bottom, calcGridItemPosition, calcWH, calcXY, cloneLayout, cloneLayoutItem, collides, getAllCollisions, getFirstCollision, getLayoutItem, moveElement, sortLayoutItems, sortLayoutItemsByColRow, sortLayoutItemsByRowCol, validateLayout } from './chunk-ITLZ7N2R.mjs';
|