@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/core.d.mts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { f as LayoutConstraint, d as LayoutItem, g as ConstraintContext, R as ResizeHandleAxis } from './types-Dbg8jAWj.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-Dbg8jAWj.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-DQi_9rBi.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-CeG3Nr4z.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-CoBSgofg.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Pluggable layout constraints for react-grid-layout v2
|
|
9
|
+
*
|
|
10
|
+
* Constraints control position and size limits during drag/resize operations.
|
|
11
|
+
* They are composable, tree-shakeable, and can be applied at grid or item level.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Grid boundary constraint.
|
|
16
|
+
*
|
|
17
|
+
* Ensures items stay within the grid bounds (0 to cols-w for x, 0 to maxRows-h for y).
|
|
18
|
+
* This is the default position constraint.
|
|
19
|
+
*/
|
|
20
|
+
declare const gridBounds: LayoutConstraint;
|
|
21
|
+
/**
|
|
22
|
+
* Min/max size constraint.
|
|
23
|
+
*
|
|
24
|
+
* Enforces per-item minW/maxW/minH/maxH properties.
|
|
25
|
+
* This is applied by default after gridBounds.
|
|
26
|
+
*/
|
|
27
|
+
declare const minMaxSize: LayoutConstraint;
|
|
28
|
+
/**
|
|
29
|
+
* Container bounds constraint.
|
|
30
|
+
*
|
|
31
|
+
* Constrains items to stay within the visible container.
|
|
32
|
+
* Use this as a replacement for the legacy `isBounded` prop.
|
|
33
|
+
*
|
|
34
|
+
* Unlike gridBounds which uses maxRows (which may be Infinity),
|
|
35
|
+
* this constraint calculates visible rows from the actual container height.
|
|
36
|
+
* Falls back to maxRows if containerHeight is 0 (auto-height grids).
|
|
37
|
+
*/
|
|
38
|
+
declare const containerBounds: LayoutConstraint;
|
|
39
|
+
/**
|
|
40
|
+
* Bounded X constraint.
|
|
41
|
+
*
|
|
42
|
+
* Only constrains horizontal position (x-axis).
|
|
43
|
+
* Items can move freely in the vertical direction.
|
|
44
|
+
*/
|
|
45
|
+
declare const boundedX: LayoutConstraint;
|
|
46
|
+
/**
|
|
47
|
+
* Bounded Y constraint.
|
|
48
|
+
*
|
|
49
|
+
* Only constrains vertical position (y-axis).
|
|
50
|
+
* Items can move freely in the horizontal direction.
|
|
51
|
+
*/
|
|
52
|
+
declare const boundedY: LayoutConstraint;
|
|
53
|
+
/**
|
|
54
|
+
* Create an aspect ratio constraint.
|
|
55
|
+
*
|
|
56
|
+
* Maintains a fixed width-to-height ratio **in pixels** during resize operations.
|
|
57
|
+
* Accounts for the different pixel sizes of grid columns vs rows.
|
|
58
|
+
*
|
|
59
|
+
* @param ratio - Width-to-height ratio (e.g., 16/9 for widescreen, 1 for square)
|
|
60
|
+
* @returns A constraint that enforces the aspect ratio
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* // 16:9 aspect ratio (actual pixel proportions)
|
|
65
|
+
* const layout = [
|
|
66
|
+
* { i: 'video', x: 0, y: 0, w: 4, h: 2, constraints: [aspectRatio(16/9)] }
|
|
67
|
+
* ];
|
|
68
|
+
*
|
|
69
|
+
* // Square items (in pixels, not grid units)
|
|
70
|
+
* <GridLayout constraints={[gridBounds, minMaxSize, aspectRatio(1)]} />
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
declare function aspectRatio(ratio: number): LayoutConstraint;
|
|
74
|
+
/**
|
|
75
|
+
* Create a snap-to-grid constraint.
|
|
76
|
+
*
|
|
77
|
+
* Snaps positions to multiples of the specified step values.
|
|
78
|
+
* Useful for aligning items to a coarser grid.
|
|
79
|
+
*
|
|
80
|
+
* @param stepX - Horizontal snap step in grid units
|
|
81
|
+
* @param stepY - Vertical snap step in grid units (defaults to stepX)
|
|
82
|
+
* @returns A constraint that snaps positions to the grid
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* // Snap to every 2 grid units
|
|
87
|
+
* <GridLayout constraints={[snapToGrid(2), gridBounds]} />
|
|
88
|
+
*
|
|
89
|
+
* // Different horizontal and vertical snap
|
|
90
|
+
* <GridLayout constraints={[snapToGrid(2, 3), gridBounds]} />
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
declare function snapToGrid(stepX: number, stepY?: number): LayoutConstraint;
|
|
94
|
+
/**
|
|
95
|
+
* Create a minimum size constraint.
|
|
96
|
+
*
|
|
97
|
+
* Sets minimum width and height for all items using this constraint.
|
|
98
|
+
* Useful for grid-wide minimums without setting minW/minH on each item.
|
|
99
|
+
*
|
|
100
|
+
* @param minW - Minimum width in grid units
|
|
101
|
+
* @param minH - Minimum height in grid units
|
|
102
|
+
* @returns A constraint that enforces minimum size
|
|
103
|
+
*/
|
|
104
|
+
declare function minSize(minW: number, minH: number): LayoutConstraint;
|
|
105
|
+
/**
|
|
106
|
+
* Create a maximum size constraint.
|
|
107
|
+
*
|
|
108
|
+
* Sets maximum width and height for all items using this constraint.
|
|
109
|
+
* Useful for grid-wide maximums without setting maxW/maxH on each item.
|
|
110
|
+
*
|
|
111
|
+
* @param maxW - Maximum width in grid units
|
|
112
|
+
* @param maxH - Maximum height in grid units
|
|
113
|
+
* @returns A constraint that enforces maximum size
|
|
114
|
+
*/
|
|
115
|
+
declare function maxSize(maxW: number, maxH: number): LayoutConstraint;
|
|
116
|
+
/**
|
|
117
|
+
* Default constraints applied when none are specified.
|
|
118
|
+
*
|
|
119
|
+
* Includes:
|
|
120
|
+
* - gridBounds: Keep items within the grid
|
|
121
|
+
* - minMaxSize: Respect per-item min/max constraints
|
|
122
|
+
*/
|
|
123
|
+
declare const defaultConstraints: LayoutConstraint[];
|
|
124
|
+
/**
|
|
125
|
+
* Apply position constraints to a proposed position.
|
|
126
|
+
*
|
|
127
|
+
* Constraints are applied in array order, allowing composition.
|
|
128
|
+
* Grid-level constraints are applied first, then per-item constraints.
|
|
129
|
+
*
|
|
130
|
+
* @param constraints - Array of constraints to apply
|
|
131
|
+
* @param item - The layout item being positioned
|
|
132
|
+
* @param x - Proposed x position
|
|
133
|
+
* @param y - Proposed y position
|
|
134
|
+
* @param context - Grid context (cols, maxRows, etc.)
|
|
135
|
+
* @returns Constrained position
|
|
136
|
+
*/
|
|
137
|
+
declare function applyPositionConstraints(constraints: LayoutConstraint[], item: LayoutItem, x: number, y: number, context: ConstraintContext): {
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Apply size constraints to a proposed size.
|
|
143
|
+
*
|
|
144
|
+
* Constraints are applied in array order, allowing composition.
|
|
145
|
+
* Grid-level constraints are applied first, then per-item constraints.
|
|
146
|
+
*
|
|
147
|
+
* @param constraints - Array of constraints to apply
|
|
148
|
+
* @param item - The layout item being resized
|
|
149
|
+
* @param w - Proposed width
|
|
150
|
+
* @param h - Proposed height
|
|
151
|
+
* @param handle - Which resize handle is being used
|
|
152
|
+
* @param context - Grid context (cols, maxRows, etc.)
|
|
153
|
+
* @returns Constrained size
|
|
154
|
+
*/
|
|
155
|
+
declare function applySizeConstraints(constraints: LayoutConstraint[], item: LayoutItem, w: number, h: number, handle: ResizeHandleAxis, context: ConstraintContext): {
|
|
156
|
+
w: number;
|
|
157
|
+
h: number;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export { ConstraintContext, LayoutConstraint, LayoutItem, ResizeHandleAxis, applyPositionConstraints, applySizeConstraints, aspectRatio, boundedX, boundedY, containerBounds, defaultConstraints, gridBounds, maxSize, minMaxSize, minSize, snapToGrid };
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { f as LayoutConstraint, d as LayoutItem, g as ConstraintContext, R as ResizeHandleAxis } from './types-Dbg8jAWj.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-Dbg8jAWj.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-D4zBXLkH.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-BeP60S5h.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-K0IBpu53.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Pluggable layout constraints for react-grid-layout v2
|
|
9
|
+
*
|
|
10
|
+
* Constraints control position and size limits during drag/resize operations.
|
|
11
|
+
* They are composable, tree-shakeable, and can be applied at grid or item level.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Grid boundary constraint.
|
|
16
|
+
*
|
|
17
|
+
* Ensures items stay within the grid bounds (0 to cols-w for x, 0 to maxRows-h for y).
|
|
18
|
+
* This is the default position constraint.
|
|
19
|
+
*/
|
|
20
|
+
declare const gridBounds: LayoutConstraint;
|
|
21
|
+
/**
|
|
22
|
+
* Min/max size constraint.
|
|
23
|
+
*
|
|
24
|
+
* Enforces per-item minW/maxW/minH/maxH properties.
|
|
25
|
+
* This is applied by default after gridBounds.
|
|
26
|
+
*/
|
|
27
|
+
declare const minMaxSize: LayoutConstraint;
|
|
28
|
+
/**
|
|
29
|
+
* Container bounds constraint.
|
|
30
|
+
*
|
|
31
|
+
* Constrains items to stay within the visible container.
|
|
32
|
+
* Use this as a replacement for the legacy `isBounded` prop.
|
|
33
|
+
*
|
|
34
|
+
* Unlike gridBounds which uses maxRows (which may be Infinity),
|
|
35
|
+
* this constraint calculates visible rows from the actual container height.
|
|
36
|
+
* Falls back to maxRows if containerHeight is 0 (auto-height grids).
|
|
37
|
+
*/
|
|
38
|
+
declare const containerBounds: LayoutConstraint;
|
|
39
|
+
/**
|
|
40
|
+
* Bounded X constraint.
|
|
41
|
+
*
|
|
42
|
+
* Only constrains horizontal position (x-axis).
|
|
43
|
+
* Items can move freely in the vertical direction.
|
|
44
|
+
*/
|
|
45
|
+
declare const boundedX: LayoutConstraint;
|
|
46
|
+
/**
|
|
47
|
+
* Bounded Y constraint.
|
|
48
|
+
*
|
|
49
|
+
* Only constrains vertical position (y-axis).
|
|
50
|
+
* Items can move freely in the horizontal direction.
|
|
51
|
+
*/
|
|
52
|
+
declare const boundedY: LayoutConstraint;
|
|
53
|
+
/**
|
|
54
|
+
* Create an aspect ratio constraint.
|
|
55
|
+
*
|
|
56
|
+
* Maintains a fixed width-to-height ratio **in pixels** during resize operations.
|
|
57
|
+
* Accounts for the different pixel sizes of grid columns vs rows.
|
|
58
|
+
*
|
|
59
|
+
* @param ratio - Width-to-height ratio (e.g., 16/9 for widescreen, 1 for square)
|
|
60
|
+
* @returns A constraint that enforces the aspect ratio
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* // 16:9 aspect ratio (actual pixel proportions)
|
|
65
|
+
* const layout = [
|
|
66
|
+
* { i: 'video', x: 0, y: 0, w: 4, h: 2, constraints: [aspectRatio(16/9)] }
|
|
67
|
+
* ];
|
|
68
|
+
*
|
|
69
|
+
* // Square items (in pixels, not grid units)
|
|
70
|
+
* <GridLayout constraints={[gridBounds, minMaxSize, aspectRatio(1)]} />
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
declare function aspectRatio(ratio: number): LayoutConstraint;
|
|
74
|
+
/**
|
|
75
|
+
* Create a snap-to-grid constraint.
|
|
76
|
+
*
|
|
77
|
+
* Snaps positions to multiples of the specified step values.
|
|
78
|
+
* Useful for aligning items to a coarser grid.
|
|
79
|
+
*
|
|
80
|
+
* @param stepX - Horizontal snap step in grid units
|
|
81
|
+
* @param stepY - Vertical snap step in grid units (defaults to stepX)
|
|
82
|
+
* @returns A constraint that snaps positions to the grid
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* // Snap to every 2 grid units
|
|
87
|
+
* <GridLayout constraints={[snapToGrid(2), gridBounds]} />
|
|
88
|
+
*
|
|
89
|
+
* // Different horizontal and vertical snap
|
|
90
|
+
* <GridLayout constraints={[snapToGrid(2, 3), gridBounds]} />
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
declare function snapToGrid(stepX: number, stepY?: number): LayoutConstraint;
|
|
94
|
+
/**
|
|
95
|
+
* Create a minimum size constraint.
|
|
96
|
+
*
|
|
97
|
+
* Sets minimum width and height for all items using this constraint.
|
|
98
|
+
* Useful for grid-wide minimums without setting minW/minH on each item.
|
|
99
|
+
*
|
|
100
|
+
* @param minW - Minimum width in grid units
|
|
101
|
+
* @param minH - Minimum height in grid units
|
|
102
|
+
* @returns A constraint that enforces minimum size
|
|
103
|
+
*/
|
|
104
|
+
declare function minSize(minW: number, minH: number): LayoutConstraint;
|
|
105
|
+
/**
|
|
106
|
+
* Create a maximum size constraint.
|
|
107
|
+
*
|
|
108
|
+
* Sets maximum width and height for all items using this constraint.
|
|
109
|
+
* Useful for grid-wide maximums without setting maxW/maxH on each item.
|
|
110
|
+
*
|
|
111
|
+
* @param maxW - Maximum width in grid units
|
|
112
|
+
* @param maxH - Maximum height in grid units
|
|
113
|
+
* @returns A constraint that enforces maximum size
|
|
114
|
+
*/
|
|
115
|
+
declare function maxSize(maxW: number, maxH: number): LayoutConstraint;
|
|
116
|
+
/**
|
|
117
|
+
* Default constraints applied when none are specified.
|
|
118
|
+
*
|
|
119
|
+
* Includes:
|
|
120
|
+
* - gridBounds: Keep items within the grid
|
|
121
|
+
* - minMaxSize: Respect per-item min/max constraints
|
|
122
|
+
*/
|
|
123
|
+
declare const defaultConstraints: LayoutConstraint[];
|
|
124
|
+
/**
|
|
125
|
+
* Apply position constraints to a proposed position.
|
|
126
|
+
*
|
|
127
|
+
* Constraints are applied in array order, allowing composition.
|
|
128
|
+
* Grid-level constraints are applied first, then per-item constraints.
|
|
129
|
+
*
|
|
130
|
+
* @param constraints - Array of constraints to apply
|
|
131
|
+
* @param item - The layout item being positioned
|
|
132
|
+
* @param x - Proposed x position
|
|
133
|
+
* @param y - Proposed y position
|
|
134
|
+
* @param context - Grid context (cols, maxRows, etc.)
|
|
135
|
+
* @returns Constrained position
|
|
136
|
+
*/
|
|
137
|
+
declare function applyPositionConstraints(constraints: LayoutConstraint[], item: LayoutItem, x: number, y: number, context: ConstraintContext): {
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Apply size constraints to a proposed size.
|
|
143
|
+
*
|
|
144
|
+
* Constraints are applied in array order, allowing composition.
|
|
145
|
+
* Grid-level constraints are applied first, then per-item constraints.
|
|
146
|
+
*
|
|
147
|
+
* @param constraints - Array of constraints to apply
|
|
148
|
+
* @param item - The layout item being resized
|
|
149
|
+
* @param w - Proposed width
|
|
150
|
+
* @param h - Proposed height
|
|
151
|
+
* @param handle - Which resize handle is being used
|
|
152
|
+
* @param context - Grid context (cols, maxRows, etc.)
|
|
153
|
+
* @returns Constrained size
|
|
154
|
+
*/
|
|
155
|
+
declare function applySizeConstraints(constraints: LayoutConstraint[], item: LayoutItem, w: number, h: number, handle: ResizeHandleAxis, context: ConstraintContext): {
|
|
156
|
+
w: number;
|
|
157
|
+
h: number;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export { ConstraintContext, LayoutConstraint, LayoutItem, ResizeHandleAxis, applyPositionConstraints, applySizeConstraints, aspectRatio, boundedX, boundedY, containerBounds, defaultConstraints, gridBounds, maxSize, minMaxSize, minSize, snapToGrid };
|
package/dist/core.js
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./chunk-ZJHF4QM5.js');
|
|
4
|
+
var chunkLQOPWRJR_js = require('./chunk-LQOPWRJR.js');
|
|
5
|
+
var chunkJ4LTYI7L_js = require('./chunk-J4LTYI7L.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "absoluteStrategy", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkLQOPWRJR_js.absoluteStrategy; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "applyPositionConstraints", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkLQOPWRJR_js.applyPositionConstraints; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "applySizeConstraints", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkLQOPWRJR_js.applySizeConstraints; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "aspectRatio", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkLQOPWRJR_js.aspectRatio; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "boundedX", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunkLQOPWRJR_js.boundedX; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "boundedY", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunkLQOPWRJR_js.boundedY; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "compactItemHorizontal", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunkLQOPWRJR_js.compactItemHorizontal; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "compactItemVertical", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return chunkLQOPWRJR_js.compactItemVertical; }
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "containerBounds", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () { return chunkLQOPWRJR_js.containerBounds; }
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, "createScaledStrategy", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () { return chunkLQOPWRJR_js.createScaledStrategy; }
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "defaultConstraints", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return chunkLQOPWRJR_js.defaultConstraints; }
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "defaultDragConfig", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () { return chunkLQOPWRJR_js.defaultDragConfig; }
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, "defaultDropConfig", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () { return chunkLQOPWRJR_js.defaultDropConfig; }
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "defaultGridConfig", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () { return chunkLQOPWRJR_js.defaultGridConfig; }
|
|
64
|
+
});
|
|
65
|
+
Object.defineProperty(exports, "defaultPositionStrategy", {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () { return chunkLQOPWRJR_js.defaultPositionStrategy; }
|
|
68
|
+
});
|
|
69
|
+
Object.defineProperty(exports, "defaultResizeConfig", {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
get: function () { return chunkLQOPWRJR_js.defaultResizeConfig; }
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(exports, "findOrGenerateResponsiveLayout", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () { return chunkLQOPWRJR_js.findOrGenerateResponsiveLayout; }
|
|
76
|
+
});
|
|
77
|
+
Object.defineProperty(exports, "getBreakpointFromWidth", {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function () { return chunkLQOPWRJR_js.getBreakpointFromWidth; }
|
|
80
|
+
});
|
|
81
|
+
Object.defineProperty(exports, "getColsFromBreakpoint", {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function () { return chunkLQOPWRJR_js.getColsFromBreakpoint; }
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(exports, "getCompactor", {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function () { return chunkLQOPWRJR_js.getCompactor; }
|
|
88
|
+
});
|
|
89
|
+
Object.defineProperty(exports, "getIndentationValue", {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
get: function () { return chunkLQOPWRJR_js.getIndentationValue; }
|
|
92
|
+
});
|
|
93
|
+
Object.defineProperty(exports, "gridBounds", {
|
|
94
|
+
enumerable: true,
|
|
95
|
+
get: function () { return chunkLQOPWRJR_js.gridBounds; }
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(exports, "horizontalCompactor", {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
get: function () { return chunkLQOPWRJR_js.horizontalCompactor; }
|
|
100
|
+
});
|
|
101
|
+
Object.defineProperty(exports, "horizontalOverlapCompactor", {
|
|
102
|
+
enumerable: true,
|
|
103
|
+
get: function () { return chunkLQOPWRJR_js.horizontalOverlapCompactor; }
|
|
104
|
+
});
|
|
105
|
+
Object.defineProperty(exports, "maxSize", {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get: function () { return chunkLQOPWRJR_js.maxSize; }
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(exports, "minMaxSize", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () { return chunkLQOPWRJR_js.minMaxSize; }
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(exports, "minSize", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
get: function () { return chunkLQOPWRJR_js.minSize; }
|
|
116
|
+
});
|
|
117
|
+
Object.defineProperty(exports, "noCompactor", {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function () { return chunkLQOPWRJR_js.noCompactor; }
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(exports, "noOverlapCompactor", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function () { return chunkLQOPWRJR_js.noOverlapCompactor; }
|
|
124
|
+
});
|
|
125
|
+
Object.defineProperty(exports, "perc", {
|
|
126
|
+
enumerable: true,
|
|
127
|
+
get: function () { return chunkLQOPWRJR_js.perc; }
|
|
128
|
+
});
|
|
129
|
+
Object.defineProperty(exports, "resizeItemInDirection", {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function () { return chunkLQOPWRJR_js.resizeItemInDirection; }
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(exports, "resolveCompactionCollision", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function () { return chunkLQOPWRJR_js.resolveCompactionCollision; }
|
|
136
|
+
});
|
|
137
|
+
Object.defineProperty(exports, "setTopLeft", {
|
|
138
|
+
enumerable: true,
|
|
139
|
+
get: function () { return chunkLQOPWRJR_js.setTopLeft; }
|
|
140
|
+
});
|
|
141
|
+
Object.defineProperty(exports, "setTransform", {
|
|
142
|
+
enumerable: true,
|
|
143
|
+
get: function () { return chunkLQOPWRJR_js.setTransform; }
|
|
144
|
+
});
|
|
145
|
+
Object.defineProperty(exports, "snapToGrid", {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
get: function () { return chunkLQOPWRJR_js.snapToGrid; }
|
|
148
|
+
});
|
|
149
|
+
Object.defineProperty(exports, "sortBreakpoints", {
|
|
150
|
+
enumerable: true,
|
|
151
|
+
get: function () { return chunkLQOPWRJR_js.sortBreakpoints; }
|
|
152
|
+
});
|
|
153
|
+
Object.defineProperty(exports, "transformStrategy", {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function () { return chunkLQOPWRJR_js.transformStrategy; }
|
|
156
|
+
});
|
|
157
|
+
Object.defineProperty(exports, "verticalCompactor", {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get: function () { return chunkLQOPWRJR_js.verticalCompactor; }
|
|
160
|
+
});
|
|
161
|
+
Object.defineProperty(exports, "verticalOverlapCompactor", {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
get: function () { return chunkLQOPWRJR_js.verticalOverlapCompactor; }
|
|
164
|
+
});
|
|
165
|
+
Object.defineProperty(exports, "bottom", {
|
|
166
|
+
enumerable: true,
|
|
167
|
+
get: function () { return chunkJ4LTYI7L_js.bottom; }
|
|
168
|
+
});
|
|
169
|
+
Object.defineProperty(exports, "calcGridCellDimensions", {
|
|
170
|
+
enumerable: true,
|
|
171
|
+
get: function () { return chunkJ4LTYI7L_js.calcGridCellDimensions; }
|
|
172
|
+
});
|
|
173
|
+
Object.defineProperty(exports, "calcGridColWidth", {
|
|
174
|
+
enumerable: true,
|
|
175
|
+
get: function () { return chunkJ4LTYI7L_js.calcGridColWidth; }
|
|
176
|
+
});
|
|
177
|
+
Object.defineProperty(exports, "calcGridItemPosition", {
|
|
178
|
+
enumerable: true,
|
|
179
|
+
get: function () { return chunkJ4LTYI7L_js.calcGridItemPosition; }
|
|
180
|
+
});
|
|
181
|
+
Object.defineProperty(exports, "calcGridItemWHPx", {
|
|
182
|
+
enumerable: true,
|
|
183
|
+
get: function () { return chunkJ4LTYI7L_js.calcGridItemWHPx; }
|
|
184
|
+
});
|
|
185
|
+
Object.defineProperty(exports, "calcWH", {
|
|
186
|
+
enumerable: true,
|
|
187
|
+
get: function () { return chunkJ4LTYI7L_js.calcWH; }
|
|
188
|
+
});
|
|
189
|
+
Object.defineProperty(exports, "calcWHRaw", {
|
|
190
|
+
enumerable: true,
|
|
191
|
+
get: function () { return chunkJ4LTYI7L_js.calcWHRaw; }
|
|
192
|
+
});
|
|
193
|
+
Object.defineProperty(exports, "calcXY", {
|
|
194
|
+
enumerable: true,
|
|
195
|
+
get: function () { return chunkJ4LTYI7L_js.calcXY; }
|
|
196
|
+
});
|
|
197
|
+
Object.defineProperty(exports, "calcXYRaw", {
|
|
198
|
+
enumerable: true,
|
|
199
|
+
get: function () { return chunkJ4LTYI7L_js.calcXYRaw; }
|
|
200
|
+
});
|
|
201
|
+
Object.defineProperty(exports, "clamp", {
|
|
202
|
+
enumerable: true,
|
|
203
|
+
get: function () { return chunkJ4LTYI7L_js.clamp; }
|
|
204
|
+
});
|
|
205
|
+
Object.defineProperty(exports, "cloneLayout", {
|
|
206
|
+
enumerable: true,
|
|
207
|
+
get: function () { return chunkJ4LTYI7L_js.cloneLayout; }
|
|
208
|
+
});
|
|
209
|
+
Object.defineProperty(exports, "cloneLayoutItem", {
|
|
210
|
+
enumerable: true,
|
|
211
|
+
get: function () { return chunkJ4LTYI7L_js.cloneLayoutItem; }
|
|
212
|
+
});
|
|
213
|
+
Object.defineProperty(exports, "collides", {
|
|
214
|
+
enumerable: true,
|
|
215
|
+
get: function () { return chunkJ4LTYI7L_js.collides; }
|
|
216
|
+
});
|
|
217
|
+
Object.defineProperty(exports, "correctBounds", {
|
|
218
|
+
enumerable: true,
|
|
219
|
+
get: function () { return chunkJ4LTYI7L_js.correctBounds; }
|
|
220
|
+
});
|
|
221
|
+
Object.defineProperty(exports, "getAllCollisions", {
|
|
222
|
+
enumerable: true,
|
|
223
|
+
get: function () { return chunkJ4LTYI7L_js.getAllCollisions; }
|
|
224
|
+
});
|
|
225
|
+
Object.defineProperty(exports, "getFirstCollision", {
|
|
226
|
+
enumerable: true,
|
|
227
|
+
get: function () { return chunkJ4LTYI7L_js.getFirstCollision; }
|
|
228
|
+
});
|
|
229
|
+
Object.defineProperty(exports, "getLayoutItem", {
|
|
230
|
+
enumerable: true,
|
|
231
|
+
get: function () { return chunkJ4LTYI7L_js.getLayoutItem; }
|
|
232
|
+
});
|
|
233
|
+
Object.defineProperty(exports, "getStatics", {
|
|
234
|
+
enumerable: true,
|
|
235
|
+
get: function () { return chunkJ4LTYI7L_js.getStatics; }
|
|
236
|
+
});
|
|
237
|
+
Object.defineProperty(exports, "modifyLayout", {
|
|
238
|
+
enumerable: true,
|
|
239
|
+
get: function () { return chunkJ4LTYI7L_js.modifyLayout; }
|
|
240
|
+
});
|
|
241
|
+
Object.defineProperty(exports, "moveElement", {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get: function () { return chunkJ4LTYI7L_js.moveElement; }
|
|
244
|
+
});
|
|
245
|
+
Object.defineProperty(exports, "moveElementAwayFromCollision", {
|
|
246
|
+
enumerable: true,
|
|
247
|
+
get: function () { return chunkJ4LTYI7L_js.moveElementAwayFromCollision; }
|
|
248
|
+
});
|
|
249
|
+
Object.defineProperty(exports, "sortLayoutItems", {
|
|
250
|
+
enumerable: true,
|
|
251
|
+
get: function () { return chunkJ4LTYI7L_js.sortLayoutItems; }
|
|
252
|
+
});
|
|
253
|
+
Object.defineProperty(exports, "sortLayoutItemsByColRow", {
|
|
254
|
+
enumerable: true,
|
|
255
|
+
get: function () { return chunkJ4LTYI7L_js.sortLayoutItemsByColRow; }
|
|
256
|
+
});
|
|
257
|
+
Object.defineProperty(exports, "sortLayoutItemsByRowCol", {
|
|
258
|
+
enumerable: true,
|
|
259
|
+
get: function () { return chunkJ4LTYI7L_js.sortLayoutItemsByRowCol; }
|
|
260
|
+
});
|
|
261
|
+
Object.defineProperty(exports, "validateLayout", {
|
|
262
|
+
enumerable: true,
|
|
263
|
+
get: function () { return chunkJ4LTYI7L_js.validateLayout; }
|
|
264
|
+
});
|
|
265
|
+
Object.defineProperty(exports, "withLayoutItem", {
|
|
266
|
+
enumerable: true,
|
|
267
|
+
get: function () { return chunkJ4LTYI7L_js.withLayoutItem; }
|
|
268
|
+
});
|
package/dist/core.mjs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
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-KKV4ZCG4.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-ITLZ7N2R.mjs';
|