@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.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +125 -0
  3. package/css/styles.css +120 -0
  4. package/dist/ResponsiveGridLayout-B_6TXsWM.d.ts +80 -0
  5. package/dist/ResponsiveGridLayout-Bin5MBC3.d.mts +80 -0
  6. package/dist/calculate-CoBSgofg.d.mts +196 -0
  7. package/dist/calculate-K0IBpu53.d.ts +196 -0
  8. package/dist/chunk-7BT7XXIT.js +74 -0
  9. package/dist/chunk-G3PAJYGP.mjs +72 -0
  10. package/dist/chunk-ITLZ7N2R.mjs +456 -0
  11. package/dist/chunk-J4LTYI7L.js +485 -0
  12. package/dist/chunk-KKV4ZCG4.mjs +583 -0
  13. package/dist/chunk-LQOPWRJR.js +623 -0
  14. package/dist/chunk-O3KX3VYW.mjs +1 -0
  15. package/dist/chunk-STBCV65G.js +3159 -0
  16. package/dist/chunk-UZL6BMXQ.mjs +3146 -0
  17. package/dist/chunk-ZJHF4QM5.js +2 -0
  18. package/dist/core.d.mts +160 -0
  19. package/dist/core.d.ts +160 -0
  20. package/dist/core.js +268 -0
  21. package/dist/core.mjs +3 -0
  22. package/dist/extras.d.mts +208 -0
  23. package/dist/extras.d.ts +208 -0
  24. package/dist/extras.js +388 -0
  25. package/dist/extras.mjs +380 -0
  26. package/dist/index.d.mts +7 -0
  27. package/dist/index.d.ts +7 -0
  28. package/dist/index.js +152 -0
  29. package/dist/index.mjs +5 -0
  30. package/dist/legacy.d.mts +163 -0
  31. package/dist/legacy.d.ts +163 -0
  32. package/dist/legacy.js +331 -0
  33. package/dist/legacy.mjs +319 -0
  34. package/dist/position-BeP60S5h.d.ts +316 -0
  35. package/dist/position-CeG3Nr4z.d.mts +316 -0
  36. package/dist/react.d.mts +214 -0
  37. package/dist/react.d.ts +214 -0
  38. package/dist/react.js +94 -0
  39. package/dist/react.mjs +5 -0
  40. package/dist/responsive-D4zBXLkH.d.ts +145 -0
  41. package/dist/responsive-DQi_9rBi.d.mts +145 -0
  42. package/dist/types-Dbg8jAWj.d.mts +458 -0
  43. package/dist/types-Dbg8jAWj.d.ts +458 -0
  44. package/index-dev.js +23 -0
  45. package/index.js +8 -0
  46. package/package.json +238 -0
@@ -0,0 +1,623 @@
1
+ 'use strict';
2
+
3
+ var chunkJ4LTYI7L_js = require('./chunk-J4LTYI7L.js');
4
+
5
+ // src/core/constraints.ts
6
+ function clamp(value, min, max) {
7
+ return Math.max(min, Math.min(max, value));
8
+ }
9
+ var gridBounds = {
10
+ name: "gridBounds",
11
+ constrainPosition(item, x, y, { cols, maxRows }) {
12
+ return {
13
+ x: clamp(x, 0, Math.max(0, cols - item.w)),
14
+ y: clamp(y, 0, Math.max(0, maxRows - item.h))
15
+ };
16
+ },
17
+ constrainSize(item, w, h, handle, { cols, maxRows }) {
18
+ const maxW = handle === "w" || handle === "nw" || handle === "sw" ? item.x + item.w : cols - item.x;
19
+ const maxH = handle === "n" || handle === "nw" || handle === "ne" ? item.y + item.h : maxRows - item.y;
20
+ return {
21
+ w: clamp(w, 1, Math.max(1, maxW)),
22
+ h: clamp(h, 1, Math.max(1, maxH))
23
+ };
24
+ }
25
+ };
26
+ var minMaxSize = {
27
+ name: "minMaxSize",
28
+ constrainSize(item, w, h) {
29
+ return {
30
+ w: clamp(w, item.minW ?? 1, item.maxW ?? Infinity),
31
+ h: clamp(h, item.minH ?? 1, item.maxH ?? Infinity)
32
+ };
33
+ }
34
+ };
35
+ var containerBounds = {
36
+ name: "containerBounds",
37
+ constrainPosition(item, x, y, { cols, maxRows, containerHeight, rowHeight, margin }) {
38
+ const visibleRows = containerHeight > 0 ? Math.floor((containerHeight + margin[1]) / (rowHeight + margin[1])) : maxRows;
39
+ return {
40
+ x: clamp(x, 0, Math.max(0, cols - item.w)),
41
+ y: clamp(y, 0, Math.max(0, visibleRows - item.h))
42
+ };
43
+ }
44
+ };
45
+ var boundedX = {
46
+ name: "boundedX",
47
+ constrainPosition(item, x, y, { cols }) {
48
+ return {
49
+ x: clamp(x, 0, Math.max(0, cols - item.w)),
50
+ y
51
+ };
52
+ }
53
+ };
54
+ var boundedY = {
55
+ name: "boundedY",
56
+ constrainPosition(item, x, y, { maxRows }) {
57
+ return {
58
+ x,
59
+ y: clamp(y, 0, Math.max(0, maxRows - item.h))
60
+ };
61
+ }
62
+ };
63
+ function aspectRatio(ratio) {
64
+ return {
65
+ name: `aspectRatio(${ratio})`,
66
+ constrainSize(_item, w, _h, _handle, context) {
67
+ const { cols, containerWidth, rowHeight, margin } = context;
68
+ const colWidth = (containerWidth - margin[0] * (cols - 1)) / cols;
69
+ const pixelWidth = colWidth * w + margin[0] * Math.max(0, w - 1);
70
+ const pixelHeight = pixelWidth / ratio;
71
+ const h = Math.max(
72
+ 1,
73
+ Math.round((pixelHeight + margin[1]) / (rowHeight + margin[1]))
74
+ );
75
+ return { w, h };
76
+ }
77
+ };
78
+ }
79
+ function snapToGrid(stepX, stepY = stepX) {
80
+ if (stepX <= 0 || stepY <= 0) {
81
+ throw new Error(
82
+ `snapToGrid: step values must be positive (got stepX=${stepX}, stepY=${stepY})`
83
+ );
84
+ }
85
+ return {
86
+ name: `snapToGrid(${stepX}, ${stepY})`,
87
+ constrainPosition(_item, x, y) {
88
+ return {
89
+ x: Math.round(x / stepX) * stepX,
90
+ y: Math.round(y / stepY) * stepY
91
+ };
92
+ }
93
+ };
94
+ }
95
+ function minSize(minW, minH) {
96
+ return {
97
+ name: `minSize(${minW}, ${minH})`,
98
+ constrainSize(_item, w, h) {
99
+ return {
100
+ w: Math.max(minW, w),
101
+ h: Math.max(minH, h)
102
+ };
103
+ }
104
+ };
105
+ }
106
+ function maxSize(maxW, maxH) {
107
+ return {
108
+ name: `maxSize(${maxW}, ${maxH})`,
109
+ constrainSize(_item, w, h) {
110
+ return {
111
+ w: Math.min(maxW, w),
112
+ h: Math.min(maxH, h)
113
+ };
114
+ }
115
+ };
116
+ }
117
+ var defaultConstraints = [gridBounds, minMaxSize];
118
+ function applyPositionConstraints(constraints, item, x, y, context) {
119
+ let result = { x, y };
120
+ for (const constraint of constraints) {
121
+ if (constraint.constrainPosition) {
122
+ result = constraint.constrainPosition(item, result.x, result.y, context);
123
+ }
124
+ }
125
+ if (item.constraints) {
126
+ for (const constraint of item.constraints) {
127
+ if (constraint.constrainPosition) {
128
+ result = constraint.constrainPosition(
129
+ item,
130
+ result.x,
131
+ result.y,
132
+ context
133
+ );
134
+ }
135
+ }
136
+ }
137
+ return result;
138
+ }
139
+ function applySizeConstraints(constraints, item, w, h, handle, context) {
140
+ let result = { w, h };
141
+ for (const constraint of constraints) {
142
+ if (constraint.constrainSize) {
143
+ result = constraint.constrainSize(
144
+ item,
145
+ result.w,
146
+ result.h,
147
+ handle,
148
+ context
149
+ );
150
+ }
151
+ }
152
+ if (item.constraints) {
153
+ for (const constraint of item.constraints) {
154
+ if (constraint.constrainSize) {
155
+ result = constraint.constrainSize(
156
+ item,
157
+ result.w,
158
+ result.h,
159
+ handle,
160
+ context
161
+ );
162
+ }
163
+ }
164
+ }
165
+ return result;
166
+ }
167
+
168
+ // src/core/position.ts
169
+ function setTransform({
170
+ top,
171
+ left,
172
+ width,
173
+ height
174
+ }) {
175
+ function buildTranslateValue(l, t) {
176
+ return `translate(${l}px,${t}px)`;
177
+ }
178
+ const translate = buildTranslateValue(left, top);
179
+ return {
180
+ transform: translate,
181
+ WebkitTransform: translate,
182
+ MozTransform: translate,
183
+ msTransform: translate,
184
+ OTransform: translate,
185
+ width: `${width}px`,
186
+ height: `${height}px`,
187
+ position: "absolute"
188
+ };
189
+ }
190
+ function setTopLeft({
191
+ top,
192
+ left,
193
+ width,
194
+ height
195
+ }) {
196
+ return {
197
+ top: `${top}px`,
198
+ left: `${left}px`,
199
+ width: `${width}px`,
200
+ height: `${height}px`,
201
+ position: "absolute"
202
+ };
203
+ }
204
+ function perc(num) {
205
+ return num * 100 + "%";
206
+ }
207
+ function constrainWidth(left, currentWidth, newWidth, containerWidth) {
208
+ return left + newWidth > containerWidth ? currentWidth : newWidth;
209
+ }
210
+ function constrainHeight(top, currentHeight, newHeight) {
211
+ return top < 0 ? currentHeight : newHeight;
212
+ }
213
+ function constrainLeft(left) {
214
+ return Math.max(0, left);
215
+ }
216
+ function constrainTop(top) {
217
+ return Math.max(0, top);
218
+ }
219
+ var resizeNorth = (currentSize, newSize, _containerWidth) => {
220
+ const { left, height, width } = newSize;
221
+ const top = currentSize.top - (height - currentSize.height);
222
+ return {
223
+ left,
224
+ width,
225
+ height: constrainHeight(top, currentSize.height, height),
226
+ top: constrainTop(top)
227
+ };
228
+ };
229
+ var resizeEast = (currentSize, newSize, containerWidth) => {
230
+ const { top, left, height, width } = newSize;
231
+ return {
232
+ top,
233
+ height,
234
+ width: constrainWidth(
235
+ currentSize.left,
236
+ currentSize.width,
237
+ width,
238
+ containerWidth
239
+ ),
240
+ left: constrainLeft(left)
241
+ };
242
+ };
243
+ var resizeWest = (currentSize, newSize, _containerWidth) => {
244
+ const { top, height, width } = newSize;
245
+ const left = currentSize.left + currentSize.width - width;
246
+ if (left < 0) {
247
+ return {
248
+ height,
249
+ width: currentSize.left + currentSize.width,
250
+ top: constrainTop(top),
251
+ left: 0
252
+ };
253
+ }
254
+ return {
255
+ height,
256
+ width,
257
+ top: constrainTop(top),
258
+ left
259
+ };
260
+ };
261
+ var resizeSouth = (currentSize, newSize, _containerWidth) => {
262
+ const { top, left, height, width } = newSize;
263
+ return {
264
+ width,
265
+ left,
266
+ height: constrainHeight(top, currentSize.height, height),
267
+ top: constrainTop(top)
268
+ };
269
+ };
270
+ var resizeNorthEast = (currentSize, newSize, containerWidth) => resizeNorth(
271
+ currentSize,
272
+ resizeEast(currentSize, newSize, containerWidth));
273
+ var resizeNorthWest = (currentSize, newSize, containerWidth) => resizeNorth(
274
+ currentSize,
275
+ resizeWest(currentSize, newSize));
276
+ var resizeSouthEast = (currentSize, newSize, containerWidth) => resizeSouth(
277
+ currentSize,
278
+ resizeEast(currentSize, newSize, containerWidth));
279
+ var resizeSouthWest = (currentSize, newSize, containerWidth) => resizeSouth(
280
+ currentSize,
281
+ resizeWest(currentSize, newSize));
282
+ var resizeHandlerMap = {
283
+ n: resizeNorth,
284
+ ne: resizeNorthEast,
285
+ e: resizeEast,
286
+ se: resizeSouthEast,
287
+ s: resizeSouth,
288
+ sw: resizeSouthWest,
289
+ w: resizeWest,
290
+ nw: resizeNorthWest
291
+ };
292
+ function resizeItemInDirection(direction, currentSize, newSize, containerWidth) {
293
+ const handler = resizeHandlerMap[direction];
294
+ if (!handler) {
295
+ return newSize;
296
+ }
297
+ return handler(currentSize, { ...currentSize, ...newSize }, containerWidth);
298
+ }
299
+ var transformStrategy = {
300
+ type: "transform",
301
+ scale: 1,
302
+ calcStyle(pos) {
303
+ return setTransform(pos);
304
+ }
305
+ };
306
+ var absoluteStrategy = {
307
+ type: "absolute",
308
+ scale: 1,
309
+ calcStyle(pos) {
310
+ return setTopLeft(pos);
311
+ }
312
+ };
313
+ function createScaledStrategy(scale) {
314
+ return {
315
+ type: "transform",
316
+ scale,
317
+ calcStyle(pos) {
318
+ return setTransform(pos);
319
+ },
320
+ calcDragPosition(clientX, clientY, offsetX, offsetY) {
321
+ return {
322
+ left: (clientX - offsetX) / scale,
323
+ top: (clientY - offsetY) / scale
324
+ };
325
+ }
326
+ };
327
+ }
328
+ var defaultPositionStrategy = transformStrategy;
329
+
330
+ // src/core/types.ts
331
+ var defaultGridConfig = {
332
+ cols: 12,
333
+ rowHeight: 150,
334
+ margin: [10, 10],
335
+ containerPadding: null,
336
+ maxRows: Infinity
337
+ };
338
+ var defaultDragConfig = {
339
+ enabled: true,
340
+ bounded: false,
341
+ threshold: 3
342
+ };
343
+ var defaultResizeConfig = {
344
+ enabled: true,
345
+ handles: ["se"]
346
+ };
347
+ var defaultDropConfig = /* @__PURE__ */ (() => {
348
+ const DEFAULT_DROPPING_ITEM_SIZE = { w: 1, h: 1 };
349
+ return { enabled: false, defaultItem: DEFAULT_DROPPING_ITEM_SIZE };
350
+ })();
351
+
352
+ // src/core/compactors.ts
353
+ function getCompactionTarget(item, collision, axis) {
354
+ return axis === "x" ? collision.x + collision.w : collision.y + collision.h;
355
+ }
356
+ function projectCompactionItem(item, moveToCoord, axis) {
357
+ if (axis === "x") {
358
+ return { i: item.i, x: moveToCoord, y: item.y, w: item.w, h: item.h };
359
+ }
360
+ return { i: item.i, x: item.x, y: moveToCoord, w: item.w, h: item.h };
361
+ }
362
+ function resolveCompactionCollision(layout, item, moveToCoord, axis, hasStatics) {
363
+ item[axis] += 1;
364
+ const itemIndex = layout.findIndex((l) => l.i === item.i);
365
+ const layoutHasStatics = hasStatics ?? chunkJ4LTYI7L_js.getStatics(layout).length > 0;
366
+ const projectedItem = projectCompactionItem(item, moveToCoord, axis);
367
+ const projectedTarget = getCompactionTarget(
368
+ item,
369
+ projectedItem,
370
+ axis
371
+ );
372
+ for (let i = itemIndex + 1; i < layout.length; i++) {
373
+ const otherItem = layout[i];
374
+ if (otherItem === void 0) continue;
375
+ if (otherItem.static) continue;
376
+ if (!layoutHasStatics && otherItem.y > item.y + item.h) break;
377
+ if (chunkJ4LTYI7L_js.collides(item, otherItem)) {
378
+ resolveCompactionCollision(
379
+ layout,
380
+ otherItem,
381
+ projectedTarget,
382
+ axis,
383
+ layoutHasStatics
384
+ );
385
+ }
386
+ }
387
+ item[axis] = moveToCoord;
388
+ }
389
+ function compactItemVertical(compareWith, l, fullLayout, maxY) {
390
+ l.x = Math.max(l.x, 0);
391
+ l.y = Math.max(l.y, 0);
392
+ l.y = Math.min(maxY, l.y);
393
+ while (l.y > 0 && !chunkJ4LTYI7L_js.getFirstCollision(compareWith, l)) {
394
+ l.y--;
395
+ }
396
+ let collision;
397
+ while ((collision = chunkJ4LTYI7L_js.getFirstCollision(compareWith, l)) !== void 0) {
398
+ resolveCompactionCollision(fullLayout, l, collision.y + collision.h, "y");
399
+ }
400
+ l.y = Math.max(l.y, 0);
401
+ return l;
402
+ }
403
+ function compactItemHorizontal(compareWith, l, cols, fullLayout) {
404
+ l.x = Math.max(l.x, 0);
405
+ l.y = Math.max(l.y, 0);
406
+ while (l.x > 0 && !chunkJ4LTYI7L_js.getFirstCollision(compareWith, l)) {
407
+ l.x--;
408
+ }
409
+ let collision;
410
+ while ((collision = chunkJ4LTYI7L_js.getFirstCollision(compareWith, l)) !== void 0) {
411
+ resolveCompactionCollision(fullLayout, l, collision.x + collision.w, "x");
412
+ if (l.x + l.w > cols) {
413
+ l.x = cols - l.w;
414
+ l.y++;
415
+ while (l.x > 0 && !chunkJ4LTYI7L_js.getFirstCollision(compareWith, l)) {
416
+ l.x--;
417
+ }
418
+ }
419
+ }
420
+ l.x = Math.max(l.x, 0);
421
+ return l;
422
+ }
423
+ var verticalCompactor = {
424
+ type: "vertical",
425
+ allowOverlap: false,
426
+ compact(layout, _cols) {
427
+ const compareWith = chunkJ4LTYI7L_js.getStatics(layout);
428
+ let maxY = chunkJ4LTYI7L_js.bottom(compareWith);
429
+ const sorted = chunkJ4LTYI7L_js.sortLayoutItemsByRowCol(layout);
430
+ const out = new Array(layout.length);
431
+ for (let i = 0; i < sorted.length; i++) {
432
+ const sortedItem = sorted[i];
433
+ if (sortedItem === void 0) continue;
434
+ let l = chunkJ4LTYI7L_js.cloneLayoutItem(sortedItem);
435
+ if (!l.static) {
436
+ l = compactItemVertical(compareWith, l, sorted, maxY);
437
+ maxY = Math.max(maxY, l.y + l.h);
438
+ compareWith.push(l);
439
+ }
440
+ const originalIndex = layout.indexOf(sortedItem);
441
+ out[originalIndex] = l;
442
+ l.moved = false;
443
+ }
444
+ return out;
445
+ }
446
+ };
447
+ var horizontalCompactor = {
448
+ type: "horizontal",
449
+ allowOverlap: false,
450
+ compact(layout, cols) {
451
+ const compareWith = chunkJ4LTYI7L_js.getStatics(layout);
452
+ const sorted = chunkJ4LTYI7L_js.sortLayoutItemsByColRow(layout);
453
+ const out = new Array(layout.length);
454
+ for (let i = 0; i < sorted.length; i++) {
455
+ const sortedItem = sorted[i];
456
+ if (sortedItem === void 0) continue;
457
+ let l = chunkJ4LTYI7L_js.cloneLayoutItem(sortedItem);
458
+ if (!l.static) {
459
+ l = compactItemHorizontal(compareWith, l, cols, sorted);
460
+ compareWith.push(l);
461
+ }
462
+ const originalIndex = layout.indexOf(sortedItem);
463
+ out[originalIndex] = l;
464
+ l.moved = false;
465
+ }
466
+ return out;
467
+ }
468
+ };
469
+ var noCompactor = {
470
+ type: null,
471
+ allowOverlap: false,
472
+ compact(layout, _cols) {
473
+ return chunkJ4LTYI7L_js.cloneLayout(layout);
474
+ }
475
+ };
476
+ var verticalOverlapCompactor = {
477
+ ...verticalCompactor,
478
+ allowOverlap: true,
479
+ compact(layout, _cols) {
480
+ return chunkJ4LTYI7L_js.cloneLayout(layout);
481
+ }
482
+ };
483
+ var horizontalOverlapCompactor = {
484
+ ...horizontalCompactor,
485
+ allowOverlap: true,
486
+ compact(layout, _cols) {
487
+ return chunkJ4LTYI7L_js.cloneLayout(layout);
488
+ }
489
+ };
490
+ var noOverlapCompactor = {
491
+ ...noCompactor,
492
+ allowOverlap: true
493
+ };
494
+ function getCompactor(compactType, allowOverlap = false, preventCollision = false) {
495
+ let baseCompactor;
496
+ if (allowOverlap) {
497
+ if (compactType === "vertical") baseCompactor = verticalOverlapCompactor;
498
+ else if (compactType === "horizontal")
499
+ baseCompactor = horizontalOverlapCompactor;
500
+ else baseCompactor = noOverlapCompactor;
501
+ } else {
502
+ if (compactType === "vertical") baseCompactor = verticalCompactor;
503
+ else if (compactType === "horizontal") baseCompactor = horizontalCompactor;
504
+ else baseCompactor = noCompactor;
505
+ }
506
+ if (preventCollision) {
507
+ return { ...baseCompactor, preventCollision };
508
+ }
509
+ return baseCompactor;
510
+ }
511
+
512
+ // src/core/responsive.ts
513
+ function sortBreakpoints(breakpoints) {
514
+ const keys = Object.keys(breakpoints);
515
+ return keys.sort((a, b) => breakpoints[a] - breakpoints[b]);
516
+ }
517
+ function getBreakpointFromWidth(breakpoints, width) {
518
+ const sorted = sortBreakpoints(breakpoints);
519
+ let matching = sorted[0];
520
+ if (matching === void 0) {
521
+ throw new Error("No breakpoints defined");
522
+ }
523
+ for (let i = 1; i < sorted.length; i++) {
524
+ const breakpointName = sorted[i];
525
+ if (breakpointName === void 0) continue;
526
+ const breakpointWidth = breakpoints[breakpointName];
527
+ if (width > breakpointWidth) {
528
+ matching = breakpointName;
529
+ }
530
+ }
531
+ return matching;
532
+ }
533
+ function getColsFromBreakpoint(breakpoint, cols) {
534
+ const colCount = cols[breakpoint];
535
+ if (colCount === void 0) {
536
+ throw new Error(
537
+ `ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(breakpoint)} is missing!`
538
+ );
539
+ }
540
+ return colCount;
541
+ }
542
+ function findOrGenerateResponsiveLayout(layouts, breakpoints, breakpoint, lastBreakpoint, cols, compactTypeOrCompactor) {
543
+ const existingLayout = layouts[breakpoint];
544
+ if (existingLayout) {
545
+ return chunkJ4LTYI7L_js.cloneLayout(existingLayout);
546
+ }
547
+ let layout = layouts[lastBreakpoint];
548
+ const breakpointsSorted = sortBreakpoints(breakpoints);
549
+ const breakpointsAbove = breakpointsSorted.slice(
550
+ breakpointsSorted.indexOf(breakpoint)
551
+ );
552
+ for (let i = 0; i < breakpointsAbove.length; i++) {
553
+ const b = breakpointsAbove[i];
554
+ if (b === void 0) continue;
555
+ const layoutForBreakpoint = layouts[b];
556
+ if (layoutForBreakpoint) {
557
+ layout = layoutForBreakpoint;
558
+ break;
559
+ }
560
+ }
561
+ const clonedLayout = chunkJ4LTYI7L_js.cloneLayout(layout || []);
562
+ const corrected = chunkJ4LTYI7L_js.correctBounds(clonedLayout, { cols });
563
+ const compactor = typeof compactTypeOrCompactor === "object" && compactTypeOrCompactor !== null ? compactTypeOrCompactor : getCompactor(compactTypeOrCompactor);
564
+ return compactor.compact(corrected, cols);
565
+ }
566
+ function getIndentationValue(value, breakpoint) {
567
+ if (Array.isArray(value)) {
568
+ return value;
569
+ }
570
+ const breakpointMap = value;
571
+ const breakpointValue = breakpointMap[breakpoint];
572
+ if (breakpointValue !== void 0) {
573
+ return breakpointValue;
574
+ }
575
+ const keys = Object.keys(breakpointMap);
576
+ for (const key of keys) {
577
+ const v = breakpointMap[key];
578
+ if (v !== void 0) {
579
+ return v;
580
+ }
581
+ }
582
+ return [10, 10];
583
+ }
584
+
585
+ exports.absoluteStrategy = absoluteStrategy;
586
+ exports.applyPositionConstraints = applyPositionConstraints;
587
+ exports.applySizeConstraints = applySizeConstraints;
588
+ exports.aspectRatio = aspectRatio;
589
+ exports.boundedX = boundedX;
590
+ exports.boundedY = boundedY;
591
+ exports.compactItemHorizontal = compactItemHorizontal;
592
+ exports.compactItemVertical = compactItemVertical;
593
+ exports.containerBounds = containerBounds;
594
+ exports.createScaledStrategy = createScaledStrategy;
595
+ exports.defaultConstraints = defaultConstraints;
596
+ exports.defaultDragConfig = defaultDragConfig;
597
+ exports.defaultDropConfig = defaultDropConfig;
598
+ exports.defaultGridConfig = defaultGridConfig;
599
+ exports.defaultPositionStrategy = defaultPositionStrategy;
600
+ exports.defaultResizeConfig = defaultResizeConfig;
601
+ exports.findOrGenerateResponsiveLayout = findOrGenerateResponsiveLayout;
602
+ exports.getBreakpointFromWidth = getBreakpointFromWidth;
603
+ exports.getColsFromBreakpoint = getColsFromBreakpoint;
604
+ exports.getCompactor = getCompactor;
605
+ exports.getIndentationValue = getIndentationValue;
606
+ exports.gridBounds = gridBounds;
607
+ exports.horizontalCompactor = horizontalCompactor;
608
+ exports.horizontalOverlapCompactor = horizontalOverlapCompactor;
609
+ exports.maxSize = maxSize;
610
+ exports.minMaxSize = minMaxSize;
611
+ exports.minSize = minSize;
612
+ exports.noCompactor = noCompactor;
613
+ exports.noOverlapCompactor = noOverlapCompactor;
614
+ exports.perc = perc;
615
+ exports.resizeItemInDirection = resizeItemInDirection;
616
+ exports.resolveCompactionCollision = resolveCompactionCollision;
617
+ exports.setTopLeft = setTopLeft;
618
+ exports.setTransform = setTransform;
619
+ exports.snapToGrid = snapToGrid;
620
+ exports.sortBreakpoints = sortBreakpoints;
621
+ exports.transformStrategy = transformStrategy;
622
+ exports.verticalCompactor = verticalCompactor;
623
+ exports.verticalOverlapCompactor = verticalOverlapCompactor;
@@ -0,0 +1 @@
1
+