@witchcraft/layout 0.3.0 → 0.4.0
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/README.md +79 -74
- package/dist/module.json +1 -1
- package/dist/module.mjs +6 -1
- package/dist/runtime/components/FrameDragHandle.vue +1 -1
- package/dist/runtime/components/LayoutDecosEdges.d.vue.ts +15 -0
- package/dist/runtime/components/LayoutDecosEdges.vue +34 -0
- package/dist/runtime/components/LayoutDecosEdges.vue.d.ts +15 -0
- package/dist/runtime/components/LayoutDecosRects.d.vue.ts +15 -0
- package/dist/runtime/components/LayoutDecosRects.vue +37 -0
- package/dist/runtime/components/LayoutDecosRects.vue.d.ts +15 -0
- package/dist/runtime/components/LayoutDragEdgeGrabbed.d.vue.ts +2 -0
- package/dist/runtime/components/LayoutDragEdgeGrabbed.vue +43 -0
- package/dist/runtime/components/LayoutDragEdgeGrabbed.vue.d.ts +2 -0
- package/dist/runtime/components/LayoutDragEdgeHandle.d.vue.ts +9 -0
- package/dist/runtime/components/LayoutDragEdgeHandle.vue +44 -0
- package/dist/runtime/components/LayoutDragEdgeHandle.vue.d.ts +9 -0
- package/dist/runtime/components/{LayoutDecos.d.vue.ts → LayoutDragEdgeVisible.d.vue.ts} +3 -2
- package/dist/runtime/components/LayoutDragEdgeVisible.vue +38 -0
- package/dist/runtime/components/{LayoutDecos.vue.d.ts → LayoutDragEdgeVisible.vue.d.ts} +3 -2
- package/dist/runtime/components/LayoutDragEdges.d.vue.ts +21 -0
- package/dist/runtime/components/LayoutDragEdges.vue +67 -0
- package/dist/runtime/components/LayoutDragEdges.vue.d.ts +21 -0
- package/dist/runtime/components/LayoutEdgesActiveFrame.d.vue.ts +2 -0
- package/dist/runtime/components/LayoutEdgesActiveFrame.vue +35 -0
- package/dist/runtime/components/LayoutEdgesActiveFrame.vue.d.ts +2 -0
- package/dist/runtime/components/LayoutFrame.d.vue.ts +7 -6
- package/dist/runtime/components/LayoutFrame.vue +18 -14
- package/dist/runtime/components/LayoutFrame.vue.d.ts +7 -6
- package/dist/runtime/components/LayoutIntersectionHandle.d.vue.ts +10 -0
- package/dist/runtime/components/LayoutIntersectionHandle.vue +36 -0
- package/dist/runtime/components/LayoutIntersectionHandle.vue.d.ts +10 -0
- package/dist/runtime/components/LayoutIntersectionVisible.d.vue.ts +6 -0
- package/dist/runtime/components/LayoutIntersectionVisible.vue +34 -0
- package/dist/runtime/components/LayoutIntersectionVisible.vue.d.ts +6 -0
- package/dist/runtime/components/LayoutIntersections.d.vue.ts +21 -0
- package/dist/runtime/components/LayoutIntersections.vue +52 -0
- package/dist/runtime/components/LayoutIntersections.vue.d.ts +21 -0
- package/dist/runtime/components/{LayoutShapeSquare.d.vue.ts → LayoutShapeRect.d.vue.ts} +2 -2
- package/dist/runtime/components/{LayoutShapeSquare.vue.d.ts → LayoutShapeRect.vue.d.ts} +2 -2
- package/dist/runtime/components/LayoutWindow.d.vue.ts +252 -14
- package/dist/runtime/components/LayoutWindow.vue +27 -48
- package/dist/runtime/components/LayoutWindow.vue.d.ts +252 -14
- package/dist/runtime/composables/useFrames.d.ts +859 -2
- package/dist/runtime/composables/useFrames.js +2 -0
- package/dist/runtime/demo/App.vue +122 -74
- package/dist/runtime/demo/DemoControls.vue +7 -5
- package/dist/runtime/demo/index.html +12 -0
- package/dist/runtime/demo/tailwind.css +1 -1
- package/dist/runtime/drag/CloseAction.d.ts +1 -2
- package/dist/runtime/drag/CloseAction.js +1 -1
- package/dist/runtime/drag/DragActionHandler.d.ts +5 -3
- package/dist/runtime/drag/DragActionHandler.js +40 -6
- package/dist/runtime/drag/FrameDragAction.js +6 -7
- package/dist/runtime/drag/SplitAction.d.ts +1 -2
- package/dist/runtime/drag/SplitAction.js +1 -1
- package/dist/runtime/drag/createDefaultHandlers.d.ts +1 -1
- package/dist/runtime/drag/defaultDragActions.d.ts +1 -1
- package/dist/runtime/helpers/consoleDebugWindow.d.ts +43 -0
- package/dist/runtime/helpers/consoleDebugWindow.js +222 -0
- package/dist/runtime/helpers/convertLayoutWindowToWorkspace.js +2 -2
- package/dist/runtime/helpers/framesRedistributeFix.d.ts +87 -0
- package/dist/runtime/helpers/framesRedistributeFix.js +54 -0
- package/dist/runtime/helpers/getMoveEdgeInfo.d.ts +6 -2
- package/dist/runtime/helpers/getMoveEdgeInfo.js +11 -2
- package/dist/runtime/helpers/getPinnedEdgesForCollapsedFrames.d.ts +5 -0
- package/dist/runtime/helpers/getPinnedEdgesForCollapsedFrames.js +18 -0
- package/dist/runtime/helpers/getShapeRectCss.d.ts +7 -0
- package/dist/runtime/helpers/{getShapeSquareCss.js → getShapeRectCss.js} +1 -1
- package/dist/runtime/helpers/index.d.ts +3 -3
- package/dist/runtime/helpers/index.js +3 -3
- package/dist/runtime/helpers/moveEdge.js +3 -1
- package/dist/runtime/helpers/pxSizeToScaledSize.d.ts +2 -0
- package/dist/runtime/helpers/{numberToScaledSize.js → pxSizeToScaledSize.js} +1 -1
- package/dist/runtime/helpers/updateWindowSizeWithEvent.d.ts +3 -0
- package/dist/runtime/helpers/validateLayoutShape.d.ts +5 -0
- package/dist/runtime/helpers/validateLayoutShape.js +28 -0
- package/dist/runtime/layout/applyFrameChanges.js +6 -0
- package/dist/runtime/layout/createSplitDecoShapes.js +1 -1
- package/dist/runtime/layout/getFrameCollapseInfo.d.ts +5 -2
- package/dist/runtime/layout/getFrameCollapseInfo.js +16 -46
- package/dist/runtime/layout/getFrameDockInfo.d.ts +1 -1
- package/dist/runtime/layout/getFrameDockInfo.js +5 -1
- package/dist/runtime/layout/getFrameUncollapseInfo.d.ts +5 -2
- package/dist/runtime/layout/getFrameUncollapseInfo.js +16 -50
- package/dist/runtime/layout/getFramesRedistributeInfo.d.ts +20 -4
- package/dist/runtime/layout/getFramesRedistributeInfo.js +31 -2
- package/dist/runtime/layout/getRelaxFramesInfo.d.ts +7 -0
- package/dist/runtime/layout/getRelaxFramesInfo.js +91 -0
- package/dist/runtime/layout/getUpdateWindowSizeInfo.d.ts +13 -0
- package/dist/runtime/layout/getUpdateWindowSizeInfo.js +65 -0
- package/dist/runtime/layout/index.d.ts +1 -0
- package/dist/runtime/layout/index.js +1 -0
- package/dist/runtime/layout/resizeFrame.js +1 -3
- package/dist/runtime/settings.d.ts +26 -19
- package/dist/runtime/settings.js +57 -22
- package/dist/runtime/types/index.d.ts +1243 -30
- package/dist/runtime/types/index.js +22 -8
- package/dist/runtime/types/vue.d.ts +41 -0
- package/dist/runtime/{drag/types.js → types/vue.js} +1 -0
- package/dist/runtime/utils/cssToKey.d.ts +5 -0
- package/dist/runtime/utils/cssToKey.js +3 -0
- package/package.json +11 -12
- package/src/module.ts +6 -1
- package/src/runtime/components/FrameDragHandle.vue +1 -1
- package/src/runtime/components/LayoutDecosEdges.vue +38 -0
- package/src/runtime/components/LayoutDecosRects.vue +42 -0
- package/src/runtime/components/LayoutDragEdgeGrabbed.vue +50 -0
- package/src/runtime/components/LayoutDragEdgeHandle.vue +52 -0
- package/src/runtime/components/LayoutDragEdgeVisible.vue +45 -0
- package/src/runtime/components/LayoutDragEdges.vue +78 -0
- package/src/runtime/components/LayoutEdgesActiveFrame.vue +43 -0
- package/src/runtime/components/LayoutFrame.vue +22 -15
- package/src/runtime/components/LayoutIntersectionHandle.vue +45 -0
- package/src/runtime/components/LayoutIntersectionVisible.vue +41 -0
- package/src/runtime/components/LayoutIntersections.vue +64 -0
- package/src/runtime/components/{LayoutShapeSquare.vue → LayoutShapeRect.vue} +2 -2
- package/src/runtime/components/LayoutWindow.vue +29 -49
- package/src/runtime/composables/useFrames.ts +7 -2
- package/src/runtime/demo/App.vue +128 -78
- package/src/runtime/demo/DemoControls.vue +7 -5
- package/src/runtime/demo/index.html +12 -0
- package/src/runtime/demo/tailwind.css +3 -0
- package/src/runtime/drag/CloseAction.ts +2 -3
- package/src/runtime/drag/DragActionHandler.ts +48 -10
- package/src/runtime/drag/FrameDragAction.ts +4 -5
- package/src/runtime/drag/SplitAction.ts +4 -3
- package/src/runtime/drag/createDefaultHandlers.ts +2 -1
- package/src/runtime/drag/defaultDragActions.ts +2 -1
- package/src/runtime/helpers/consoleDebugWindow.ts +331 -0
- package/src/runtime/helpers/convertLayoutWindowToWorkspace.ts +2 -2
- package/src/runtime/helpers/framesRedistributeFix.ts +162 -0
- package/src/runtime/helpers/getMoveEdgeInfo.ts +22 -5
- package/src/runtime/helpers/getPinnedEdgesForCollapsedFrames.ts +29 -0
- package/src/runtime/helpers/{getShapeSquareCss.ts → getShapeRectCss.ts} +3 -3
- package/src/runtime/helpers/index.ts +4 -3
- package/src/runtime/helpers/moveEdge.ts +3 -1
- package/src/runtime/helpers/{numberToScaledSize.ts → pxSizeToScaledSize.ts} +2 -2
- package/src/runtime/helpers/updateWindowSizeWithEvent.ts +3 -0
- package/src/runtime/helpers/validateLayoutShape.ts +46 -0
- package/src/runtime/layout/applyFrameChanges.ts +5 -0
- package/src/runtime/layout/createSplitDecoShapes.ts +1 -1
- package/src/runtime/layout/getFrameCollapseInfo.ts +26 -85
- package/src/runtime/layout/getFrameDockInfo.ts +8 -1
- package/src/runtime/layout/getFrameUncollapseInfo.ts +29 -96
- package/src/runtime/layout/getFramesRedistributeInfo.ts +60 -5
- package/src/runtime/layout/getRelaxFramesInfo.ts +139 -0
- package/src/runtime/layout/getUpdateWindowSizeInfo.ts +105 -0
- package/src/runtime/layout/index.ts +1 -0
- package/src/runtime/layout/resizeFrame.ts +4 -3
- package/src/runtime/settings.ts +78 -25
- package/src/runtime/types/index.ts +205 -33
- package/src/runtime/types/vue.ts +41 -0
- package/src/runtime/utils/cssToKey.ts +8 -0
- package/dist/runtime/components/LayoutDecos.vue +0 -26
- package/dist/runtime/components/LayoutEdges.d.vue.ts +0 -17
- package/dist/runtime/components/LayoutEdges.vue +0 -144
- package/dist/runtime/components/LayoutEdges.vue.d.ts +0 -17
- package/dist/runtime/drag/types.d.ts +0 -161
- package/dist/runtime/helpers/clampNumber.d.ts +0 -1
- package/dist/runtime/helpers/clampNumber.js +0 -3
- package/dist/runtime/helpers/getShapeSquareCss.d.ts +0 -7
- package/dist/runtime/helpers/numberToScaledSize.d.ts +0 -2
- package/src/runtime/components/LayoutDecos.vue +0 -28
- package/src/runtime/components/LayoutEdges.vue +0 -170
- package/src/runtime/drag/types.ts +0 -177
- package/src/runtime/helpers/clampNumber.ts +0 -9
- /package/dist/runtime/components/{LayoutShapeSquare.vue → LayoutShapeRect.vue} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EnumLike } from "@alanscodelog/utils";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
3
|
+
import { KnownError } from "../utils/KnownError.js";
|
|
4
4
|
export declare const zUuid: z.ZodUUID;
|
|
5
5
|
export type AnyUuid = z.infer<typeof zUuid>;
|
|
6
6
|
export declare const zWindowIdConstants: z.ZodEnum<{
|
|
@@ -48,6 +48,124 @@ export declare const zEdge: z.ZodObject<{
|
|
|
48
48
|
startY: z.ZodNumber;
|
|
49
49
|
endX: z.ZodNumber;
|
|
50
50
|
endY: z.ZodNumber;
|
|
51
|
+
error: z.ZodOptional<z.ZodUnion<[z.ZodCustom<KnownError<LayoutError, {} | {
|
|
52
|
+
id: string | undefined;
|
|
53
|
+
} | {
|
|
54
|
+
id: string | undefined;
|
|
55
|
+
} | {
|
|
56
|
+
size: Size;
|
|
57
|
+
} | Record<string, never> | {
|
|
58
|
+
frame: LayoutFrame;
|
|
59
|
+
} | {
|
|
60
|
+
frame: LayoutFrame;
|
|
61
|
+
nearbyFrames: LayoutFrame[];
|
|
62
|
+
minSize: Size;
|
|
63
|
+
} | {
|
|
64
|
+
frame: LayoutFrame;
|
|
65
|
+
} | {
|
|
66
|
+
frame: LayoutFrame;
|
|
67
|
+
newSize: number;
|
|
68
|
+
minSize: number;
|
|
69
|
+
} | {
|
|
70
|
+
frame: LayoutFrame;
|
|
71
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
72
|
+
} | {
|
|
73
|
+
frame: LayoutFrame;
|
|
74
|
+
} | {
|
|
75
|
+
draggingFrameId: string;
|
|
76
|
+
hoveredFrameId: string;
|
|
77
|
+
zoneSide: DragZone["side"];
|
|
78
|
+
} | {
|
|
79
|
+
draggingFrameId: string;
|
|
80
|
+
hoveredFrameId: string;
|
|
81
|
+
zoneSide: DragZone["side"];
|
|
82
|
+
} | {
|
|
83
|
+
draggingFrameId: string;
|
|
84
|
+
hoveredFrameId: string;
|
|
85
|
+
zoneSide: DragZone["side"];
|
|
86
|
+
} | {
|
|
87
|
+
frame: LayoutFrame;
|
|
88
|
+
} | {
|
|
89
|
+
minFrameSize: number;
|
|
90
|
+
frameSizeNeeded: number;
|
|
91
|
+
} | {
|
|
92
|
+
min: number;
|
|
93
|
+
max: number;
|
|
94
|
+
wanted: number;
|
|
95
|
+
} | {
|
|
96
|
+
problemEdgeCoordinates: number[];
|
|
97
|
+
} | {
|
|
98
|
+
side: EdgeSide;
|
|
99
|
+
id: string;
|
|
100
|
+
} | {
|
|
101
|
+
frame: string;
|
|
102
|
+
} | {
|
|
103
|
+
frame: LayoutFrame;
|
|
104
|
+
} | {
|
|
105
|
+
frame: LayoutFrame;
|
|
106
|
+
} | {
|
|
107
|
+
frame: LayoutFrame;
|
|
108
|
+
}>, KnownError<LayoutError, {} | {
|
|
109
|
+
id: string | undefined;
|
|
110
|
+
} | {
|
|
111
|
+
id: string | undefined;
|
|
112
|
+
} | {
|
|
113
|
+
size: Size;
|
|
114
|
+
} | Record<string, never> | {
|
|
115
|
+
frame: LayoutFrame;
|
|
116
|
+
} | {
|
|
117
|
+
frame: LayoutFrame;
|
|
118
|
+
nearbyFrames: LayoutFrame[];
|
|
119
|
+
minSize: Size;
|
|
120
|
+
} | {
|
|
121
|
+
frame: LayoutFrame;
|
|
122
|
+
} | {
|
|
123
|
+
frame: LayoutFrame;
|
|
124
|
+
newSize: number;
|
|
125
|
+
minSize: number;
|
|
126
|
+
} | {
|
|
127
|
+
frame: LayoutFrame;
|
|
128
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
129
|
+
} | {
|
|
130
|
+
frame: LayoutFrame;
|
|
131
|
+
} | {
|
|
132
|
+
draggingFrameId: string;
|
|
133
|
+
hoveredFrameId: string;
|
|
134
|
+
zoneSide: DragZone["side"];
|
|
135
|
+
} | {
|
|
136
|
+
draggingFrameId: string;
|
|
137
|
+
hoveredFrameId: string;
|
|
138
|
+
zoneSide: DragZone["side"];
|
|
139
|
+
} | {
|
|
140
|
+
draggingFrameId: string;
|
|
141
|
+
hoveredFrameId: string;
|
|
142
|
+
zoneSide: DragZone["side"];
|
|
143
|
+
} | {
|
|
144
|
+
frame: LayoutFrame;
|
|
145
|
+
} | {
|
|
146
|
+
minFrameSize: number;
|
|
147
|
+
frameSizeNeeded: number;
|
|
148
|
+
} | {
|
|
149
|
+
min: number;
|
|
150
|
+
max: number;
|
|
151
|
+
wanted: number;
|
|
152
|
+
} | {
|
|
153
|
+
problemEdgeCoordinates: number[];
|
|
154
|
+
} | {
|
|
155
|
+
side: EdgeSide;
|
|
156
|
+
id: string;
|
|
157
|
+
} | {
|
|
158
|
+
frame: string;
|
|
159
|
+
} | {
|
|
160
|
+
frame: LayoutFrame;
|
|
161
|
+
} | {
|
|
162
|
+
frame: LayoutFrame;
|
|
163
|
+
} | {
|
|
164
|
+
frame: LayoutFrame;
|
|
165
|
+
}>>, z.ZodObject<{
|
|
166
|
+
code: z.ZodString;
|
|
167
|
+
message: z.ZodString;
|
|
168
|
+
}, z.core.$strip>]>>;
|
|
51
169
|
}, z.core.$strip>;
|
|
52
170
|
export type Edge = z.infer<typeof zEdge>;
|
|
53
171
|
export declare const zDirection: z.ZodEnum<{
|
|
@@ -89,24 +207,24 @@ export type ExtendedDirection = z.infer<typeof zExtendedDirection>;
|
|
|
89
207
|
export type Orientation = z.infer<typeof zOrientation>;
|
|
90
208
|
export type EdgeSide = z.infer<typeof zSide>;
|
|
91
209
|
export type ExtendedEdgeSide = z.infer<typeof zExtendedSide>;
|
|
92
|
-
export declare const
|
|
210
|
+
export declare const zBaseRect: z.ZodObject<{
|
|
93
211
|
width: z.ZodNumber;
|
|
94
212
|
height: z.ZodNumber;
|
|
95
213
|
x: z.ZodNumber;
|
|
96
214
|
y: z.ZodNumber;
|
|
97
215
|
}, z.core.$strip>;
|
|
98
|
-
export type
|
|
99
|
-
export type
|
|
216
|
+
export type BaseRect = z.infer<typeof zBaseRect>;
|
|
217
|
+
export type BaseRectCss = {
|
|
100
218
|
x: string;
|
|
101
219
|
y: string;
|
|
102
220
|
width: string;
|
|
103
221
|
height: string;
|
|
104
222
|
translate?: string;
|
|
105
223
|
};
|
|
106
|
-
export type EdgeCss =
|
|
224
|
+
export type EdgeCss = BaseRectCss & {
|
|
107
225
|
translate: string;
|
|
108
226
|
};
|
|
109
|
-
export type PointCss =
|
|
227
|
+
export type PointCss = BaseRectCss & {
|
|
110
228
|
translate: string;
|
|
111
229
|
};
|
|
112
230
|
export type Intersections = Record<number, Record<number, number>>;
|
|
@@ -314,7 +432,7 @@ export type Layout = ExtendedLayout & {
|
|
|
314
432
|
windows: LayoutWindows;
|
|
315
433
|
};
|
|
316
434
|
declare const zLayoutShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
317
|
-
type: z.ZodLiteral<"
|
|
435
|
+
type: z.ZodLiteral<"rect">;
|
|
318
436
|
data: z.ZodObject<{
|
|
319
437
|
width: z.ZodNumber;
|
|
320
438
|
height: z.ZodNumber;
|
|
@@ -329,13 +447,131 @@ declare const zLayoutShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
329
447
|
startY: z.ZodNumber;
|
|
330
448
|
endX: z.ZodNumber;
|
|
331
449
|
endY: z.ZodNumber;
|
|
450
|
+
error: z.ZodOptional<z.ZodUnion<[z.ZodCustom<KnownError<LayoutError, {} | {
|
|
451
|
+
id: string | undefined;
|
|
452
|
+
} | {
|
|
453
|
+
id: string | undefined;
|
|
454
|
+
} | {
|
|
455
|
+
size: Size;
|
|
456
|
+
} | Record<string, never> | {
|
|
457
|
+
frame: LayoutFrame;
|
|
458
|
+
} | {
|
|
459
|
+
frame: LayoutFrame;
|
|
460
|
+
nearbyFrames: LayoutFrame[];
|
|
461
|
+
minSize: Size;
|
|
462
|
+
} | {
|
|
463
|
+
frame: LayoutFrame;
|
|
464
|
+
} | {
|
|
465
|
+
frame: LayoutFrame;
|
|
466
|
+
newSize: number;
|
|
467
|
+
minSize: number;
|
|
468
|
+
} | {
|
|
469
|
+
frame: LayoutFrame;
|
|
470
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
471
|
+
} | {
|
|
472
|
+
frame: LayoutFrame;
|
|
473
|
+
} | {
|
|
474
|
+
draggingFrameId: string;
|
|
475
|
+
hoveredFrameId: string;
|
|
476
|
+
zoneSide: DragZone["side"];
|
|
477
|
+
} | {
|
|
478
|
+
draggingFrameId: string;
|
|
479
|
+
hoveredFrameId: string;
|
|
480
|
+
zoneSide: DragZone["side"];
|
|
481
|
+
} | {
|
|
482
|
+
draggingFrameId: string;
|
|
483
|
+
hoveredFrameId: string;
|
|
484
|
+
zoneSide: DragZone["side"];
|
|
485
|
+
} | {
|
|
486
|
+
frame: LayoutFrame;
|
|
487
|
+
} | {
|
|
488
|
+
minFrameSize: number;
|
|
489
|
+
frameSizeNeeded: number;
|
|
490
|
+
} | {
|
|
491
|
+
min: number;
|
|
492
|
+
max: number;
|
|
493
|
+
wanted: number;
|
|
494
|
+
} | {
|
|
495
|
+
problemEdgeCoordinates: number[];
|
|
496
|
+
} | {
|
|
497
|
+
side: EdgeSide;
|
|
498
|
+
id: string;
|
|
499
|
+
} | {
|
|
500
|
+
frame: string;
|
|
501
|
+
} | {
|
|
502
|
+
frame: LayoutFrame;
|
|
503
|
+
} | {
|
|
504
|
+
frame: LayoutFrame;
|
|
505
|
+
} | {
|
|
506
|
+
frame: LayoutFrame;
|
|
507
|
+
}>, KnownError<LayoutError, {} | {
|
|
508
|
+
id: string | undefined;
|
|
509
|
+
} | {
|
|
510
|
+
id: string | undefined;
|
|
511
|
+
} | {
|
|
512
|
+
size: Size;
|
|
513
|
+
} | Record<string, never> | {
|
|
514
|
+
frame: LayoutFrame;
|
|
515
|
+
} | {
|
|
516
|
+
frame: LayoutFrame;
|
|
517
|
+
nearbyFrames: LayoutFrame[];
|
|
518
|
+
minSize: Size;
|
|
519
|
+
} | {
|
|
520
|
+
frame: LayoutFrame;
|
|
521
|
+
} | {
|
|
522
|
+
frame: LayoutFrame;
|
|
523
|
+
newSize: number;
|
|
524
|
+
minSize: number;
|
|
525
|
+
} | {
|
|
526
|
+
frame: LayoutFrame;
|
|
527
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
528
|
+
} | {
|
|
529
|
+
frame: LayoutFrame;
|
|
530
|
+
} | {
|
|
531
|
+
draggingFrameId: string;
|
|
532
|
+
hoveredFrameId: string;
|
|
533
|
+
zoneSide: DragZone["side"];
|
|
534
|
+
} | {
|
|
535
|
+
draggingFrameId: string;
|
|
536
|
+
hoveredFrameId: string;
|
|
537
|
+
zoneSide: DragZone["side"];
|
|
538
|
+
} | {
|
|
539
|
+
draggingFrameId: string;
|
|
540
|
+
hoveredFrameId: string;
|
|
541
|
+
zoneSide: DragZone["side"];
|
|
542
|
+
} | {
|
|
543
|
+
frame: LayoutFrame;
|
|
544
|
+
} | {
|
|
545
|
+
minFrameSize: number;
|
|
546
|
+
frameSizeNeeded: number;
|
|
547
|
+
} | {
|
|
548
|
+
min: number;
|
|
549
|
+
max: number;
|
|
550
|
+
wanted: number;
|
|
551
|
+
} | {
|
|
552
|
+
problemEdgeCoordinates: number[];
|
|
553
|
+
} | {
|
|
554
|
+
side: EdgeSide;
|
|
555
|
+
id: string;
|
|
556
|
+
} | {
|
|
557
|
+
frame: string;
|
|
558
|
+
} | {
|
|
559
|
+
frame: LayoutFrame;
|
|
560
|
+
} | {
|
|
561
|
+
frame: LayoutFrame;
|
|
562
|
+
} | {
|
|
563
|
+
frame: LayoutFrame;
|
|
564
|
+
}>>, z.ZodObject<{
|
|
565
|
+
code: z.ZodString;
|
|
566
|
+
message: z.ZodString;
|
|
567
|
+
}, z.core.$strip>]>>;
|
|
332
568
|
}, z.core.$strip>;
|
|
333
569
|
attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
334
570
|
}, z.core.$strip>], "type">;
|
|
335
571
|
export type LayoutShape = z.infer<typeof zLayoutShape>;
|
|
336
572
|
declare const zBaseDeco: z.ZodObject<{
|
|
337
573
|
shapes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
338
|
-
type: z.ZodLiteral<"
|
|
574
|
+
type: z.ZodLiteral<"rect">;
|
|
339
575
|
data: z.ZodObject<{
|
|
340
576
|
width: z.ZodNumber;
|
|
341
577
|
height: z.ZodNumber;
|
|
@@ -350,6 +586,124 @@ declare const zBaseDeco: z.ZodObject<{
|
|
|
350
586
|
startY: z.ZodNumber;
|
|
351
587
|
endX: z.ZodNumber;
|
|
352
588
|
endY: z.ZodNumber;
|
|
589
|
+
error: z.ZodOptional<z.ZodUnion<[z.ZodCustom<KnownError<LayoutError, {} | {
|
|
590
|
+
id: string | undefined;
|
|
591
|
+
} | {
|
|
592
|
+
id: string | undefined;
|
|
593
|
+
} | {
|
|
594
|
+
size: Size;
|
|
595
|
+
} | Record<string, never> | {
|
|
596
|
+
frame: LayoutFrame;
|
|
597
|
+
} | {
|
|
598
|
+
frame: LayoutFrame;
|
|
599
|
+
nearbyFrames: LayoutFrame[];
|
|
600
|
+
minSize: Size;
|
|
601
|
+
} | {
|
|
602
|
+
frame: LayoutFrame;
|
|
603
|
+
} | {
|
|
604
|
+
frame: LayoutFrame;
|
|
605
|
+
newSize: number;
|
|
606
|
+
minSize: number;
|
|
607
|
+
} | {
|
|
608
|
+
frame: LayoutFrame;
|
|
609
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
610
|
+
} | {
|
|
611
|
+
frame: LayoutFrame;
|
|
612
|
+
} | {
|
|
613
|
+
draggingFrameId: string;
|
|
614
|
+
hoveredFrameId: string;
|
|
615
|
+
zoneSide: DragZone["side"];
|
|
616
|
+
} | {
|
|
617
|
+
draggingFrameId: string;
|
|
618
|
+
hoveredFrameId: string;
|
|
619
|
+
zoneSide: DragZone["side"];
|
|
620
|
+
} | {
|
|
621
|
+
draggingFrameId: string;
|
|
622
|
+
hoveredFrameId: string;
|
|
623
|
+
zoneSide: DragZone["side"];
|
|
624
|
+
} | {
|
|
625
|
+
frame: LayoutFrame;
|
|
626
|
+
} | {
|
|
627
|
+
minFrameSize: number;
|
|
628
|
+
frameSizeNeeded: number;
|
|
629
|
+
} | {
|
|
630
|
+
min: number;
|
|
631
|
+
max: number;
|
|
632
|
+
wanted: number;
|
|
633
|
+
} | {
|
|
634
|
+
problemEdgeCoordinates: number[];
|
|
635
|
+
} | {
|
|
636
|
+
side: EdgeSide;
|
|
637
|
+
id: string;
|
|
638
|
+
} | {
|
|
639
|
+
frame: string;
|
|
640
|
+
} | {
|
|
641
|
+
frame: LayoutFrame;
|
|
642
|
+
} | {
|
|
643
|
+
frame: LayoutFrame;
|
|
644
|
+
} | {
|
|
645
|
+
frame: LayoutFrame;
|
|
646
|
+
}>, KnownError<LayoutError, {} | {
|
|
647
|
+
id: string | undefined;
|
|
648
|
+
} | {
|
|
649
|
+
id: string | undefined;
|
|
650
|
+
} | {
|
|
651
|
+
size: Size;
|
|
652
|
+
} | Record<string, never> | {
|
|
653
|
+
frame: LayoutFrame;
|
|
654
|
+
} | {
|
|
655
|
+
frame: LayoutFrame;
|
|
656
|
+
nearbyFrames: LayoutFrame[];
|
|
657
|
+
minSize: Size;
|
|
658
|
+
} | {
|
|
659
|
+
frame: LayoutFrame;
|
|
660
|
+
} | {
|
|
661
|
+
frame: LayoutFrame;
|
|
662
|
+
newSize: number;
|
|
663
|
+
minSize: number;
|
|
664
|
+
} | {
|
|
665
|
+
frame: LayoutFrame;
|
|
666
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
667
|
+
} | {
|
|
668
|
+
frame: LayoutFrame;
|
|
669
|
+
} | {
|
|
670
|
+
draggingFrameId: string;
|
|
671
|
+
hoveredFrameId: string;
|
|
672
|
+
zoneSide: DragZone["side"];
|
|
673
|
+
} | {
|
|
674
|
+
draggingFrameId: string;
|
|
675
|
+
hoveredFrameId: string;
|
|
676
|
+
zoneSide: DragZone["side"];
|
|
677
|
+
} | {
|
|
678
|
+
draggingFrameId: string;
|
|
679
|
+
hoveredFrameId: string;
|
|
680
|
+
zoneSide: DragZone["side"];
|
|
681
|
+
} | {
|
|
682
|
+
frame: LayoutFrame;
|
|
683
|
+
} | {
|
|
684
|
+
minFrameSize: number;
|
|
685
|
+
frameSizeNeeded: number;
|
|
686
|
+
} | {
|
|
687
|
+
min: number;
|
|
688
|
+
max: number;
|
|
689
|
+
wanted: number;
|
|
690
|
+
} | {
|
|
691
|
+
problemEdgeCoordinates: number[];
|
|
692
|
+
} | {
|
|
693
|
+
side: EdgeSide;
|
|
694
|
+
id: string;
|
|
695
|
+
} | {
|
|
696
|
+
frame: string;
|
|
697
|
+
} | {
|
|
698
|
+
frame: LayoutFrame;
|
|
699
|
+
} | {
|
|
700
|
+
frame: LayoutFrame;
|
|
701
|
+
} | {
|
|
702
|
+
frame: LayoutFrame;
|
|
703
|
+
}>>, z.ZodObject<{
|
|
704
|
+
code: z.ZodString;
|
|
705
|
+
message: z.ZodString;
|
|
706
|
+
}, z.core.$strip>]>>;
|
|
353
707
|
}, z.core.$strip>;
|
|
354
708
|
attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
355
709
|
}, z.core.$strip>], "type">>>;
|
|
@@ -357,7 +711,7 @@ declare const zBaseDeco: z.ZodObject<{
|
|
|
357
711
|
export type BaseDeco = z.infer<typeof zBaseDeco>;
|
|
358
712
|
export declare const zSplitDeco: z.ZodObject<{
|
|
359
713
|
shapes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
360
|
-
type: z.ZodLiteral<"
|
|
714
|
+
type: z.ZodLiteral<"rect">;
|
|
361
715
|
data: z.ZodObject<{
|
|
362
716
|
width: z.ZodNumber;
|
|
363
717
|
height: z.ZodNumber;
|
|
@@ -372,6 +726,124 @@ export declare const zSplitDeco: z.ZodObject<{
|
|
|
372
726
|
startY: z.ZodNumber;
|
|
373
727
|
endX: z.ZodNumber;
|
|
374
728
|
endY: z.ZodNumber;
|
|
729
|
+
error: z.ZodOptional<z.ZodUnion<[z.ZodCustom<KnownError<LayoutError, {} | {
|
|
730
|
+
id: string | undefined;
|
|
731
|
+
} | {
|
|
732
|
+
id: string | undefined;
|
|
733
|
+
} | {
|
|
734
|
+
size: Size;
|
|
735
|
+
} | Record<string, never> | {
|
|
736
|
+
frame: LayoutFrame;
|
|
737
|
+
} | {
|
|
738
|
+
frame: LayoutFrame;
|
|
739
|
+
nearbyFrames: LayoutFrame[];
|
|
740
|
+
minSize: Size;
|
|
741
|
+
} | {
|
|
742
|
+
frame: LayoutFrame;
|
|
743
|
+
} | {
|
|
744
|
+
frame: LayoutFrame;
|
|
745
|
+
newSize: number;
|
|
746
|
+
minSize: number;
|
|
747
|
+
} | {
|
|
748
|
+
frame: LayoutFrame;
|
|
749
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
750
|
+
} | {
|
|
751
|
+
frame: LayoutFrame;
|
|
752
|
+
} | {
|
|
753
|
+
draggingFrameId: string;
|
|
754
|
+
hoveredFrameId: string;
|
|
755
|
+
zoneSide: DragZone["side"];
|
|
756
|
+
} | {
|
|
757
|
+
draggingFrameId: string;
|
|
758
|
+
hoveredFrameId: string;
|
|
759
|
+
zoneSide: DragZone["side"];
|
|
760
|
+
} | {
|
|
761
|
+
draggingFrameId: string;
|
|
762
|
+
hoveredFrameId: string;
|
|
763
|
+
zoneSide: DragZone["side"];
|
|
764
|
+
} | {
|
|
765
|
+
frame: LayoutFrame;
|
|
766
|
+
} | {
|
|
767
|
+
minFrameSize: number;
|
|
768
|
+
frameSizeNeeded: number;
|
|
769
|
+
} | {
|
|
770
|
+
min: number;
|
|
771
|
+
max: number;
|
|
772
|
+
wanted: number;
|
|
773
|
+
} | {
|
|
774
|
+
problemEdgeCoordinates: number[];
|
|
775
|
+
} | {
|
|
776
|
+
side: EdgeSide;
|
|
777
|
+
id: string;
|
|
778
|
+
} | {
|
|
779
|
+
frame: string;
|
|
780
|
+
} | {
|
|
781
|
+
frame: LayoutFrame;
|
|
782
|
+
} | {
|
|
783
|
+
frame: LayoutFrame;
|
|
784
|
+
} | {
|
|
785
|
+
frame: LayoutFrame;
|
|
786
|
+
}>, KnownError<LayoutError, {} | {
|
|
787
|
+
id: string | undefined;
|
|
788
|
+
} | {
|
|
789
|
+
id: string | undefined;
|
|
790
|
+
} | {
|
|
791
|
+
size: Size;
|
|
792
|
+
} | Record<string, never> | {
|
|
793
|
+
frame: LayoutFrame;
|
|
794
|
+
} | {
|
|
795
|
+
frame: LayoutFrame;
|
|
796
|
+
nearbyFrames: LayoutFrame[];
|
|
797
|
+
minSize: Size;
|
|
798
|
+
} | {
|
|
799
|
+
frame: LayoutFrame;
|
|
800
|
+
} | {
|
|
801
|
+
frame: LayoutFrame;
|
|
802
|
+
newSize: number;
|
|
803
|
+
minSize: number;
|
|
804
|
+
} | {
|
|
805
|
+
frame: LayoutFrame;
|
|
806
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
807
|
+
} | {
|
|
808
|
+
frame: LayoutFrame;
|
|
809
|
+
} | {
|
|
810
|
+
draggingFrameId: string;
|
|
811
|
+
hoveredFrameId: string;
|
|
812
|
+
zoneSide: DragZone["side"];
|
|
813
|
+
} | {
|
|
814
|
+
draggingFrameId: string;
|
|
815
|
+
hoveredFrameId: string;
|
|
816
|
+
zoneSide: DragZone["side"];
|
|
817
|
+
} | {
|
|
818
|
+
draggingFrameId: string;
|
|
819
|
+
hoveredFrameId: string;
|
|
820
|
+
zoneSide: DragZone["side"];
|
|
821
|
+
} | {
|
|
822
|
+
frame: LayoutFrame;
|
|
823
|
+
} | {
|
|
824
|
+
minFrameSize: number;
|
|
825
|
+
frameSizeNeeded: number;
|
|
826
|
+
} | {
|
|
827
|
+
min: number;
|
|
828
|
+
max: number;
|
|
829
|
+
wanted: number;
|
|
830
|
+
} | {
|
|
831
|
+
problemEdgeCoordinates: number[];
|
|
832
|
+
} | {
|
|
833
|
+
side: EdgeSide;
|
|
834
|
+
id: string;
|
|
835
|
+
} | {
|
|
836
|
+
frame: string;
|
|
837
|
+
} | {
|
|
838
|
+
frame: LayoutFrame;
|
|
839
|
+
} | {
|
|
840
|
+
frame: LayoutFrame;
|
|
841
|
+
} | {
|
|
842
|
+
frame: LayoutFrame;
|
|
843
|
+
}>>, z.ZodObject<{
|
|
844
|
+
code: z.ZodString;
|
|
845
|
+
message: z.ZodString;
|
|
846
|
+
}, z.core.$strip>]>>;
|
|
375
847
|
}, z.core.$strip>;
|
|
376
848
|
attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
377
849
|
}, z.core.$strip>], "type">>>;
|
|
@@ -400,7 +872,7 @@ export type RawSplitDeco = z.infer<typeof zRawSplitDeco>;
|
|
|
400
872
|
export type SplitDeco = z.infer<typeof zSplitDeco>;
|
|
401
873
|
declare const zCloseDeco: z.ZodObject<{
|
|
402
874
|
shapes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
403
|
-
type: z.ZodLiteral<"
|
|
875
|
+
type: z.ZodLiteral<"rect">;
|
|
404
876
|
data: z.ZodObject<{
|
|
405
877
|
width: z.ZodNumber;
|
|
406
878
|
height: z.ZodNumber;
|
|
@@ -415,6 +887,124 @@ declare const zCloseDeco: z.ZodObject<{
|
|
|
415
887
|
startY: z.ZodNumber;
|
|
416
888
|
endX: z.ZodNumber;
|
|
417
889
|
endY: z.ZodNumber;
|
|
890
|
+
error: z.ZodOptional<z.ZodUnion<[z.ZodCustom<KnownError<LayoutError, {} | {
|
|
891
|
+
id: string | undefined;
|
|
892
|
+
} | {
|
|
893
|
+
id: string | undefined;
|
|
894
|
+
} | {
|
|
895
|
+
size: Size;
|
|
896
|
+
} | Record<string, never> | {
|
|
897
|
+
frame: LayoutFrame;
|
|
898
|
+
} | {
|
|
899
|
+
frame: LayoutFrame;
|
|
900
|
+
nearbyFrames: LayoutFrame[];
|
|
901
|
+
minSize: Size;
|
|
902
|
+
} | {
|
|
903
|
+
frame: LayoutFrame;
|
|
904
|
+
} | {
|
|
905
|
+
frame: LayoutFrame;
|
|
906
|
+
newSize: number;
|
|
907
|
+
minSize: number;
|
|
908
|
+
} | {
|
|
909
|
+
frame: LayoutFrame;
|
|
910
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
911
|
+
} | {
|
|
912
|
+
frame: LayoutFrame;
|
|
913
|
+
} | {
|
|
914
|
+
draggingFrameId: string;
|
|
915
|
+
hoveredFrameId: string;
|
|
916
|
+
zoneSide: DragZone["side"];
|
|
917
|
+
} | {
|
|
918
|
+
draggingFrameId: string;
|
|
919
|
+
hoveredFrameId: string;
|
|
920
|
+
zoneSide: DragZone["side"];
|
|
921
|
+
} | {
|
|
922
|
+
draggingFrameId: string;
|
|
923
|
+
hoveredFrameId: string;
|
|
924
|
+
zoneSide: DragZone["side"];
|
|
925
|
+
} | {
|
|
926
|
+
frame: LayoutFrame;
|
|
927
|
+
} | {
|
|
928
|
+
minFrameSize: number;
|
|
929
|
+
frameSizeNeeded: number;
|
|
930
|
+
} | {
|
|
931
|
+
min: number;
|
|
932
|
+
max: number;
|
|
933
|
+
wanted: number;
|
|
934
|
+
} | {
|
|
935
|
+
problemEdgeCoordinates: number[];
|
|
936
|
+
} | {
|
|
937
|
+
side: EdgeSide;
|
|
938
|
+
id: string;
|
|
939
|
+
} | {
|
|
940
|
+
frame: string;
|
|
941
|
+
} | {
|
|
942
|
+
frame: LayoutFrame;
|
|
943
|
+
} | {
|
|
944
|
+
frame: LayoutFrame;
|
|
945
|
+
} | {
|
|
946
|
+
frame: LayoutFrame;
|
|
947
|
+
}>, KnownError<LayoutError, {} | {
|
|
948
|
+
id: string | undefined;
|
|
949
|
+
} | {
|
|
950
|
+
id: string | undefined;
|
|
951
|
+
} | {
|
|
952
|
+
size: Size;
|
|
953
|
+
} | Record<string, never> | {
|
|
954
|
+
frame: LayoutFrame;
|
|
955
|
+
} | {
|
|
956
|
+
frame: LayoutFrame;
|
|
957
|
+
nearbyFrames: LayoutFrame[];
|
|
958
|
+
minSize: Size;
|
|
959
|
+
} | {
|
|
960
|
+
frame: LayoutFrame;
|
|
961
|
+
} | {
|
|
962
|
+
frame: LayoutFrame;
|
|
963
|
+
newSize: number;
|
|
964
|
+
minSize: number;
|
|
965
|
+
} | {
|
|
966
|
+
frame: LayoutFrame;
|
|
967
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
968
|
+
} | {
|
|
969
|
+
frame: LayoutFrame;
|
|
970
|
+
} | {
|
|
971
|
+
draggingFrameId: string;
|
|
972
|
+
hoveredFrameId: string;
|
|
973
|
+
zoneSide: DragZone["side"];
|
|
974
|
+
} | {
|
|
975
|
+
draggingFrameId: string;
|
|
976
|
+
hoveredFrameId: string;
|
|
977
|
+
zoneSide: DragZone["side"];
|
|
978
|
+
} | {
|
|
979
|
+
draggingFrameId: string;
|
|
980
|
+
hoveredFrameId: string;
|
|
981
|
+
zoneSide: DragZone["side"];
|
|
982
|
+
} | {
|
|
983
|
+
frame: LayoutFrame;
|
|
984
|
+
} | {
|
|
985
|
+
minFrameSize: number;
|
|
986
|
+
frameSizeNeeded: number;
|
|
987
|
+
} | {
|
|
988
|
+
min: number;
|
|
989
|
+
max: number;
|
|
990
|
+
wanted: number;
|
|
991
|
+
} | {
|
|
992
|
+
problemEdgeCoordinates: number[];
|
|
993
|
+
} | {
|
|
994
|
+
side: EdgeSide;
|
|
995
|
+
id: string;
|
|
996
|
+
} | {
|
|
997
|
+
frame: string;
|
|
998
|
+
} | {
|
|
999
|
+
frame: LayoutFrame;
|
|
1000
|
+
} | {
|
|
1001
|
+
frame: LayoutFrame;
|
|
1002
|
+
} | {
|
|
1003
|
+
frame: LayoutFrame;
|
|
1004
|
+
}>>, z.ZodObject<{
|
|
1005
|
+
code: z.ZodString;
|
|
1006
|
+
message: z.ZodString;
|
|
1007
|
+
}, z.core.$strip>]>>;
|
|
418
1008
|
}, z.core.$strip>;
|
|
419
1009
|
attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
420
1010
|
}, z.core.$strip>], "type">>>;
|
|
@@ -425,7 +1015,7 @@ declare const zCloseDeco: z.ZodObject<{
|
|
|
425
1015
|
export type CloseDeco = z.infer<typeof zCloseDeco>;
|
|
426
1016
|
declare const zFrameDragDeco: z.ZodObject<{
|
|
427
1017
|
shapes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
428
|
-
type: z.ZodLiteral<"
|
|
1018
|
+
type: z.ZodLiteral<"rect">;
|
|
429
1019
|
data: z.ZodObject<{
|
|
430
1020
|
width: z.ZodNumber;
|
|
431
1021
|
height: z.ZodNumber;
|
|
@@ -440,6 +1030,124 @@ declare const zFrameDragDeco: z.ZodObject<{
|
|
|
440
1030
|
startY: z.ZodNumber;
|
|
441
1031
|
endX: z.ZodNumber;
|
|
442
1032
|
endY: z.ZodNumber;
|
|
1033
|
+
error: z.ZodOptional<z.ZodUnion<[z.ZodCustom<KnownError<LayoutError, {} | {
|
|
1034
|
+
id: string | undefined;
|
|
1035
|
+
} | {
|
|
1036
|
+
id: string | undefined;
|
|
1037
|
+
} | {
|
|
1038
|
+
size: Size;
|
|
1039
|
+
} | Record<string, never> | {
|
|
1040
|
+
frame: LayoutFrame;
|
|
1041
|
+
} | {
|
|
1042
|
+
frame: LayoutFrame;
|
|
1043
|
+
nearbyFrames: LayoutFrame[];
|
|
1044
|
+
minSize: Size;
|
|
1045
|
+
} | {
|
|
1046
|
+
frame: LayoutFrame;
|
|
1047
|
+
} | {
|
|
1048
|
+
frame: LayoutFrame;
|
|
1049
|
+
newSize: number;
|
|
1050
|
+
minSize: number;
|
|
1051
|
+
} | {
|
|
1052
|
+
frame: LayoutFrame;
|
|
1053
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
1054
|
+
} | {
|
|
1055
|
+
frame: LayoutFrame;
|
|
1056
|
+
} | {
|
|
1057
|
+
draggingFrameId: string;
|
|
1058
|
+
hoveredFrameId: string;
|
|
1059
|
+
zoneSide: DragZone["side"];
|
|
1060
|
+
} | {
|
|
1061
|
+
draggingFrameId: string;
|
|
1062
|
+
hoveredFrameId: string;
|
|
1063
|
+
zoneSide: DragZone["side"];
|
|
1064
|
+
} | {
|
|
1065
|
+
draggingFrameId: string;
|
|
1066
|
+
hoveredFrameId: string;
|
|
1067
|
+
zoneSide: DragZone["side"];
|
|
1068
|
+
} | {
|
|
1069
|
+
frame: LayoutFrame;
|
|
1070
|
+
} | {
|
|
1071
|
+
minFrameSize: number;
|
|
1072
|
+
frameSizeNeeded: number;
|
|
1073
|
+
} | {
|
|
1074
|
+
min: number;
|
|
1075
|
+
max: number;
|
|
1076
|
+
wanted: number;
|
|
1077
|
+
} | {
|
|
1078
|
+
problemEdgeCoordinates: number[];
|
|
1079
|
+
} | {
|
|
1080
|
+
side: EdgeSide;
|
|
1081
|
+
id: string;
|
|
1082
|
+
} | {
|
|
1083
|
+
frame: string;
|
|
1084
|
+
} | {
|
|
1085
|
+
frame: LayoutFrame;
|
|
1086
|
+
} | {
|
|
1087
|
+
frame: LayoutFrame;
|
|
1088
|
+
} | {
|
|
1089
|
+
frame: LayoutFrame;
|
|
1090
|
+
}>, KnownError<LayoutError, {} | {
|
|
1091
|
+
id: string | undefined;
|
|
1092
|
+
} | {
|
|
1093
|
+
id: string | undefined;
|
|
1094
|
+
} | {
|
|
1095
|
+
size: Size;
|
|
1096
|
+
} | Record<string, never> | {
|
|
1097
|
+
frame: LayoutFrame;
|
|
1098
|
+
} | {
|
|
1099
|
+
frame: LayoutFrame;
|
|
1100
|
+
nearbyFrames: LayoutFrame[];
|
|
1101
|
+
minSize: Size;
|
|
1102
|
+
} | {
|
|
1103
|
+
frame: LayoutFrame;
|
|
1104
|
+
} | {
|
|
1105
|
+
frame: LayoutFrame;
|
|
1106
|
+
newSize: number;
|
|
1107
|
+
minSize: number;
|
|
1108
|
+
} | {
|
|
1109
|
+
frame: LayoutFrame;
|
|
1110
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
1111
|
+
} | {
|
|
1112
|
+
frame: LayoutFrame;
|
|
1113
|
+
} | {
|
|
1114
|
+
draggingFrameId: string;
|
|
1115
|
+
hoveredFrameId: string;
|
|
1116
|
+
zoneSide: DragZone["side"];
|
|
1117
|
+
} | {
|
|
1118
|
+
draggingFrameId: string;
|
|
1119
|
+
hoveredFrameId: string;
|
|
1120
|
+
zoneSide: DragZone["side"];
|
|
1121
|
+
} | {
|
|
1122
|
+
draggingFrameId: string;
|
|
1123
|
+
hoveredFrameId: string;
|
|
1124
|
+
zoneSide: DragZone["side"];
|
|
1125
|
+
} | {
|
|
1126
|
+
frame: LayoutFrame;
|
|
1127
|
+
} | {
|
|
1128
|
+
minFrameSize: number;
|
|
1129
|
+
frameSizeNeeded: number;
|
|
1130
|
+
} | {
|
|
1131
|
+
min: number;
|
|
1132
|
+
max: number;
|
|
1133
|
+
wanted: number;
|
|
1134
|
+
} | {
|
|
1135
|
+
problemEdgeCoordinates: number[];
|
|
1136
|
+
} | {
|
|
1137
|
+
side: EdgeSide;
|
|
1138
|
+
id: string;
|
|
1139
|
+
} | {
|
|
1140
|
+
frame: string;
|
|
1141
|
+
} | {
|
|
1142
|
+
frame: LayoutFrame;
|
|
1143
|
+
} | {
|
|
1144
|
+
frame: LayoutFrame;
|
|
1145
|
+
} | {
|
|
1146
|
+
frame: LayoutFrame;
|
|
1147
|
+
}>>, z.ZodObject<{
|
|
1148
|
+
code: z.ZodString;
|
|
1149
|
+
message: z.ZodString;
|
|
1150
|
+
}, z.core.$strip>]>>;
|
|
443
1151
|
}, z.core.$strip>;
|
|
444
1152
|
attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
445
1153
|
}, z.core.$strip>], "type">>>;
|
|
@@ -457,7 +1165,7 @@ declare const zFrameDragDeco: z.ZodObject<{
|
|
|
457
1165
|
export type FrameDragDeco = z.infer<typeof zFrameDragDeco>;
|
|
458
1166
|
export declare const zDeco: z.ZodUnion<readonly [z.ZodObject<{
|
|
459
1167
|
shapes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
460
|
-
type: z.ZodLiteral<"
|
|
1168
|
+
type: z.ZodLiteral<"rect">;
|
|
461
1169
|
data: z.ZodObject<{
|
|
462
1170
|
width: z.ZodNumber;
|
|
463
1171
|
height: z.ZodNumber;
|
|
@@ -472,6 +1180,124 @@ export declare const zDeco: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
472
1180
|
startY: z.ZodNumber;
|
|
473
1181
|
endX: z.ZodNumber;
|
|
474
1182
|
endY: z.ZodNumber;
|
|
1183
|
+
error: z.ZodOptional<z.ZodUnion<[z.ZodCustom<KnownError<LayoutError, {} | {
|
|
1184
|
+
id: string | undefined;
|
|
1185
|
+
} | {
|
|
1186
|
+
id: string | undefined;
|
|
1187
|
+
} | {
|
|
1188
|
+
size: Size;
|
|
1189
|
+
} | Record<string, never> | {
|
|
1190
|
+
frame: LayoutFrame;
|
|
1191
|
+
} | {
|
|
1192
|
+
frame: LayoutFrame;
|
|
1193
|
+
nearbyFrames: LayoutFrame[];
|
|
1194
|
+
minSize: Size;
|
|
1195
|
+
} | {
|
|
1196
|
+
frame: LayoutFrame;
|
|
1197
|
+
} | {
|
|
1198
|
+
frame: LayoutFrame;
|
|
1199
|
+
newSize: number;
|
|
1200
|
+
minSize: number;
|
|
1201
|
+
} | {
|
|
1202
|
+
frame: LayoutFrame;
|
|
1203
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
1204
|
+
} | {
|
|
1205
|
+
frame: LayoutFrame;
|
|
1206
|
+
} | {
|
|
1207
|
+
draggingFrameId: string;
|
|
1208
|
+
hoveredFrameId: string;
|
|
1209
|
+
zoneSide: DragZone["side"];
|
|
1210
|
+
} | {
|
|
1211
|
+
draggingFrameId: string;
|
|
1212
|
+
hoveredFrameId: string;
|
|
1213
|
+
zoneSide: DragZone["side"];
|
|
1214
|
+
} | {
|
|
1215
|
+
draggingFrameId: string;
|
|
1216
|
+
hoveredFrameId: string;
|
|
1217
|
+
zoneSide: DragZone["side"];
|
|
1218
|
+
} | {
|
|
1219
|
+
frame: LayoutFrame;
|
|
1220
|
+
} | {
|
|
1221
|
+
minFrameSize: number;
|
|
1222
|
+
frameSizeNeeded: number;
|
|
1223
|
+
} | {
|
|
1224
|
+
min: number;
|
|
1225
|
+
max: number;
|
|
1226
|
+
wanted: number;
|
|
1227
|
+
} | {
|
|
1228
|
+
problemEdgeCoordinates: number[];
|
|
1229
|
+
} | {
|
|
1230
|
+
side: EdgeSide;
|
|
1231
|
+
id: string;
|
|
1232
|
+
} | {
|
|
1233
|
+
frame: string;
|
|
1234
|
+
} | {
|
|
1235
|
+
frame: LayoutFrame;
|
|
1236
|
+
} | {
|
|
1237
|
+
frame: LayoutFrame;
|
|
1238
|
+
} | {
|
|
1239
|
+
frame: LayoutFrame;
|
|
1240
|
+
}>, KnownError<LayoutError, {} | {
|
|
1241
|
+
id: string | undefined;
|
|
1242
|
+
} | {
|
|
1243
|
+
id: string | undefined;
|
|
1244
|
+
} | {
|
|
1245
|
+
size: Size;
|
|
1246
|
+
} | Record<string, never> | {
|
|
1247
|
+
frame: LayoutFrame;
|
|
1248
|
+
} | {
|
|
1249
|
+
frame: LayoutFrame;
|
|
1250
|
+
nearbyFrames: LayoutFrame[];
|
|
1251
|
+
minSize: Size;
|
|
1252
|
+
} | {
|
|
1253
|
+
frame: LayoutFrame;
|
|
1254
|
+
} | {
|
|
1255
|
+
frame: LayoutFrame;
|
|
1256
|
+
newSize: number;
|
|
1257
|
+
minSize: number;
|
|
1258
|
+
} | {
|
|
1259
|
+
frame: LayoutFrame;
|
|
1260
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
1261
|
+
} | {
|
|
1262
|
+
frame: LayoutFrame;
|
|
1263
|
+
} | {
|
|
1264
|
+
draggingFrameId: string;
|
|
1265
|
+
hoveredFrameId: string;
|
|
1266
|
+
zoneSide: DragZone["side"];
|
|
1267
|
+
} | {
|
|
1268
|
+
draggingFrameId: string;
|
|
1269
|
+
hoveredFrameId: string;
|
|
1270
|
+
zoneSide: DragZone["side"];
|
|
1271
|
+
} | {
|
|
1272
|
+
draggingFrameId: string;
|
|
1273
|
+
hoveredFrameId: string;
|
|
1274
|
+
zoneSide: DragZone["side"];
|
|
1275
|
+
} | {
|
|
1276
|
+
frame: LayoutFrame;
|
|
1277
|
+
} | {
|
|
1278
|
+
minFrameSize: number;
|
|
1279
|
+
frameSizeNeeded: number;
|
|
1280
|
+
} | {
|
|
1281
|
+
min: number;
|
|
1282
|
+
max: number;
|
|
1283
|
+
wanted: number;
|
|
1284
|
+
} | {
|
|
1285
|
+
problemEdgeCoordinates: number[];
|
|
1286
|
+
} | {
|
|
1287
|
+
side: EdgeSide;
|
|
1288
|
+
id: string;
|
|
1289
|
+
} | {
|
|
1290
|
+
frame: string;
|
|
1291
|
+
} | {
|
|
1292
|
+
frame: LayoutFrame;
|
|
1293
|
+
} | {
|
|
1294
|
+
frame: LayoutFrame;
|
|
1295
|
+
} | {
|
|
1296
|
+
frame: LayoutFrame;
|
|
1297
|
+
}>>, z.ZodObject<{
|
|
1298
|
+
code: z.ZodString;
|
|
1299
|
+
message: z.ZodString;
|
|
1300
|
+
}, z.core.$strip>]>>;
|
|
475
1301
|
}, z.core.$strip>;
|
|
476
1302
|
attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
477
1303
|
}, z.core.$strip>], "type">>>;
|
|
@@ -486,7 +1312,7 @@ export declare const zDeco: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
486
1312
|
}>;
|
|
487
1313
|
}, z.core.$strip>, z.ZodObject<{
|
|
488
1314
|
shapes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
489
|
-
type: z.ZodLiteral<"
|
|
1315
|
+
type: z.ZodLiteral<"rect">;
|
|
490
1316
|
data: z.ZodObject<{
|
|
491
1317
|
width: z.ZodNumber;
|
|
492
1318
|
height: z.ZodNumber;
|
|
@@ -501,6 +1327,124 @@ export declare const zDeco: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
501
1327
|
startY: z.ZodNumber;
|
|
502
1328
|
endX: z.ZodNumber;
|
|
503
1329
|
endY: z.ZodNumber;
|
|
1330
|
+
error: z.ZodOptional<z.ZodUnion<[z.ZodCustom<KnownError<LayoutError, {} | {
|
|
1331
|
+
id: string | undefined;
|
|
1332
|
+
} | {
|
|
1333
|
+
id: string | undefined;
|
|
1334
|
+
} | {
|
|
1335
|
+
size: Size;
|
|
1336
|
+
} | Record<string, never> | {
|
|
1337
|
+
frame: LayoutFrame;
|
|
1338
|
+
} | {
|
|
1339
|
+
frame: LayoutFrame;
|
|
1340
|
+
nearbyFrames: LayoutFrame[];
|
|
1341
|
+
minSize: Size;
|
|
1342
|
+
} | {
|
|
1343
|
+
frame: LayoutFrame;
|
|
1344
|
+
} | {
|
|
1345
|
+
frame: LayoutFrame;
|
|
1346
|
+
newSize: number;
|
|
1347
|
+
minSize: number;
|
|
1348
|
+
} | {
|
|
1349
|
+
frame: LayoutFrame;
|
|
1350
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
1351
|
+
} | {
|
|
1352
|
+
frame: LayoutFrame;
|
|
1353
|
+
} | {
|
|
1354
|
+
draggingFrameId: string;
|
|
1355
|
+
hoveredFrameId: string;
|
|
1356
|
+
zoneSide: DragZone["side"];
|
|
1357
|
+
} | {
|
|
1358
|
+
draggingFrameId: string;
|
|
1359
|
+
hoveredFrameId: string;
|
|
1360
|
+
zoneSide: DragZone["side"];
|
|
1361
|
+
} | {
|
|
1362
|
+
draggingFrameId: string;
|
|
1363
|
+
hoveredFrameId: string;
|
|
1364
|
+
zoneSide: DragZone["side"];
|
|
1365
|
+
} | {
|
|
1366
|
+
frame: LayoutFrame;
|
|
1367
|
+
} | {
|
|
1368
|
+
minFrameSize: number;
|
|
1369
|
+
frameSizeNeeded: number;
|
|
1370
|
+
} | {
|
|
1371
|
+
min: number;
|
|
1372
|
+
max: number;
|
|
1373
|
+
wanted: number;
|
|
1374
|
+
} | {
|
|
1375
|
+
problemEdgeCoordinates: number[];
|
|
1376
|
+
} | {
|
|
1377
|
+
side: EdgeSide;
|
|
1378
|
+
id: string;
|
|
1379
|
+
} | {
|
|
1380
|
+
frame: string;
|
|
1381
|
+
} | {
|
|
1382
|
+
frame: LayoutFrame;
|
|
1383
|
+
} | {
|
|
1384
|
+
frame: LayoutFrame;
|
|
1385
|
+
} | {
|
|
1386
|
+
frame: LayoutFrame;
|
|
1387
|
+
}>, KnownError<LayoutError, {} | {
|
|
1388
|
+
id: string | undefined;
|
|
1389
|
+
} | {
|
|
1390
|
+
id: string | undefined;
|
|
1391
|
+
} | {
|
|
1392
|
+
size: Size;
|
|
1393
|
+
} | Record<string, never> | {
|
|
1394
|
+
frame: LayoutFrame;
|
|
1395
|
+
} | {
|
|
1396
|
+
frame: LayoutFrame;
|
|
1397
|
+
nearbyFrames: LayoutFrame[];
|
|
1398
|
+
minSize: Size;
|
|
1399
|
+
} | {
|
|
1400
|
+
frame: LayoutFrame;
|
|
1401
|
+
} | {
|
|
1402
|
+
frame: LayoutFrame;
|
|
1403
|
+
newSize: number;
|
|
1404
|
+
minSize: number;
|
|
1405
|
+
} | {
|
|
1406
|
+
frame: LayoutFrame;
|
|
1407
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
1408
|
+
} | {
|
|
1409
|
+
frame: LayoutFrame;
|
|
1410
|
+
} | {
|
|
1411
|
+
draggingFrameId: string;
|
|
1412
|
+
hoveredFrameId: string;
|
|
1413
|
+
zoneSide: DragZone["side"];
|
|
1414
|
+
} | {
|
|
1415
|
+
draggingFrameId: string;
|
|
1416
|
+
hoveredFrameId: string;
|
|
1417
|
+
zoneSide: DragZone["side"];
|
|
1418
|
+
} | {
|
|
1419
|
+
draggingFrameId: string;
|
|
1420
|
+
hoveredFrameId: string;
|
|
1421
|
+
zoneSide: DragZone["side"];
|
|
1422
|
+
} | {
|
|
1423
|
+
frame: LayoutFrame;
|
|
1424
|
+
} | {
|
|
1425
|
+
minFrameSize: number;
|
|
1426
|
+
frameSizeNeeded: number;
|
|
1427
|
+
} | {
|
|
1428
|
+
min: number;
|
|
1429
|
+
max: number;
|
|
1430
|
+
wanted: number;
|
|
1431
|
+
} | {
|
|
1432
|
+
problemEdgeCoordinates: number[];
|
|
1433
|
+
} | {
|
|
1434
|
+
side: EdgeSide;
|
|
1435
|
+
id: string;
|
|
1436
|
+
} | {
|
|
1437
|
+
frame: string;
|
|
1438
|
+
} | {
|
|
1439
|
+
frame: LayoutFrame;
|
|
1440
|
+
} | {
|
|
1441
|
+
frame: LayoutFrame;
|
|
1442
|
+
} | {
|
|
1443
|
+
frame: LayoutFrame;
|
|
1444
|
+
}>>, z.ZodObject<{
|
|
1445
|
+
code: z.ZodString;
|
|
1446
|
+
message: z.ZodString;
|
|
1447
|
+
}, z.core.$strip>]>>;
|
|
504
1448
|
}, z.core.$strip>;
|
|
505
1449
|
attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
506
1450
|
}, z.core.$strip>], "type">>>;
|
|
@@ -509,7 +1453,7 @@ export declare const zDeco: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
509
1453
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
510
1454
|
}, z.core.$strip>, z.ZodObject<{
|
|
511
1455
|
shapes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
512
|
-
type: z.ZodLiteral<"
|
|
1456
|
+
type: z.ZodLiteral<"rect">;
|
|
513
1457
|
data: z.ZodObject<{
|
|
514
1458
|
width: z.ZodNumber;
|
|
515
1459
|
height: z.ZodNumber;
|
|
@@ -524,6 +1468,124 @@ export declare const zDeco: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
524
1468
|
startY: z.ZodNumber;
|
|
525
1469
|
endX: z.ZodNumber;
|
|
526
1470
|
endY: z.ZodNumber;
|
|
1471
|
+
error: z.ZodOptional<z.ZodUnion<[z.ZodCustom<KnownError<LayoutError, {} | {
|
|
1472
|
+
id: string | undefined;
|
|
1473
|
+
} | {
|
|
1474
|
+
id: string | undefined;
|
|
1475
|
+
} | {
|
|
1476
|
+
size: Size;
|
|
1477
|
+
} | Record<string, never> | {
|
|
1478
|
+
frame: LayoutFrame;
|
|
1479
|
+
} | {
|
|
1480
|
+
frame: LayoutFrame;
|
|
1481
|
+
nearbyFrames: LayoutFrame[];
|
|
1482
|
+
minSize: Size;
|
|
1483
|
+
} | {
|
|
1484
|
+
frame: LayoutFrame;
|
|
1485
|
+
} | {
|
|
1486
|
+
frame: LayoutFrame;
|
|
1487
|
+
newSize: number;
|
|
1488
|
+
minSize: number;
|
|
1489
|
+
} | {
|
|
1490
|
+
frame: LayoutFrame;
|
|
1491
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
1492
|
+
} | {
|
|
1493
|
+
frame: LayoutFrame;
|
|
1494
|
+
} | {
|
|
1495
|
+
draggingFrameId: string;
|
|
1496
|
+
hoveredFrameId: string;
|
|
1497
|
+
zoneSide: DragZone["side"];
|
|
1498
|
+
} | {
|
|
1499
|
+
draggingFrameId: string;
|
|
1500
|
+
hoveredFrameId: string;
|
|
1501
|
+
zoneSide: DragZone["side"];
|
|
1502
|
+
} | {
|
|
1503
|
+
draggingFrameId: string;
|
|
1504
|
+
hoveredFrameId: string;
|
|
1505
|
+
zoneSide: DragZone["side"];
|
|
1506
|
+
} | {
|
|
1507
|
+
frame: LayoutFrame;
|
|
1508
|
+
} | {
|
|
1509
|
+
minFrameSize: number;
|
|
1510
|
+
frameSizeNeeded: number;
|
|
1511
|
+
} | {
|
|
1512
|
+
min: number;
|
|
1513
|
+
max: number;
|
|
1514
|
+
wanted: number;
|
|
1515
|
+
} | {
|
|
1516
|
+
problemEdgeCoordinates: number[];
|
|
1517
|
+
} | {
|
|
1518
|
+
side: EdgeSide;
|
|
1519
|
+
id: string;
|
|
1520
|
+
} | {
|
|
1521
|
+
frame: string;
|
|
1522
|
+
} | {
|
|
1523
|
+
frame: LayoutFrame;
|
|
1524
|
+
} | {
|
|
1525
|
+
frame: LayoutFrame;
|
|
1526
|
+
} | {
|
|
1527
|
+
frame: LayoutFrame;
|
|
1528
|
+
}>, KnownError<LayoutError, {} | {
|
|
1529
|
+
id: string | undefined;
|
|
1530
|
+
} | {
|
|
1531
|
+
id: string | undefined;
|
|
1532
|
+
} | {
|
|
1533
|
+
size: Size;
|
|
1534
|
+
} | Record<string, never> | {
|
|
1535
|
+
frame: LayoutFrame;
|
|
1536
|
+
} | {
|
|
1537
|
+
frame: LayoutFrame;
|
|
1538
|
+
nearbyFrames: LayoutFrame[];
|
|
1539
|
+
minSize: Size;
|
|
1540
|
+
} | {
|
|
1541
|
+
frame: LayoutFrame;
|
|
1542
|
+
} | {
|
|
1543
|
+
frame: LayoutFrame;
|
|
1544
|
+
newSize: number;
|
|
1545
|
+
minSize: number;
|
|
1546
|
+
} | {
|
|
1547
|
+
frame: LayoutFrame;
|
|
1548
|
+
framesRequiredToBeDeleted: LayoutFrame[];
|
|
1549
|
+
} | {
|
|
1550
|
+
frame: LayoutFrame;
|
|
1551
|
+
} | {
|
|
1552
|
+
draggingFrameId: string;
|
|
1553
|
+
hoveredFrameId: string;
|
|
1554
|
+
zoneSide: DragZone["side"];
|
|
1555
|
+
} | {
|
|
1556
|
+
draggingFrameId: string;
|
|
1557
|
+
hoveredFrameId: string;
|
|
1558
|
+
zoneSide: DragZone["side"];
|
|
1559
|
+
} | {
|
|
1560
|
+
draggingFrameId: string;
|
|
1561
|
+
hoveredFrameId: string;
|
|
1562
|
+
zoneSide: DragZone["side"];
|
|
1563
|
+
} | {
|
|
1564
|
+
frame: LayoutFrame;
|
|
1565
|
+
} | {
|
|
1566
|
+
minFrameSize: number;
|
|
1567
|
+
frameSizeNeeded: number;
|
|
1568
|
+
} | {
|
|
1569
|
+
min: number;
|
|
1570
|
+
max: number;
|
|
1571
|
+
wanted: number;
|
|
1572
|
+
} | {
|
|
1573
|
+
problemEdgeCoordinates: number[];
|
|
1574
|
+
} | {
|
|
1575
|
+
side: EdgeSide;
|
|
1576
|
+
id: string;
|
|
1577
|
+
} | {
|
|
1578
|
+
frame: string;
|
|
1579
|
+
} | {
|
|
1580
|
+
frame: LayoutFrame;
|
|
1581
|
+
} | {
|
|
1582
|
+
frame: LayoutFrame;
|
|
1583
|
+
} | {
|
|
1584
|
+
frame: LayoutFrame;
|
|
1585
|
+
}>>, z.ZodObject<{
|
|
1586
|
+
code: z.ZodString;
|
|
1587
|
+
message: z.ZodString;
|
|
1588
|
+
}, z.core.$strip>]>>;
|
|
527
1589
|
}, z.core.$strip>;
|
|
528
1590
|
attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
529
1591
|
}, z.core.$strip>], "type">>>;
|
|
@@ -557,12 +1619,14 @@ export declare const LAYOUT_ERROR: {
|
|
|
557
1619
|
CANT_SPLIT_DOCKED_FRAME: "CANT_SPLIT_DOCKED_FRAME";
|
|
558
1620
|
NO_SPACE_TO_REDISTRIBUTE: "NO_SPACE_TO_REDISTRIBUTE";
|
|
559
1621
|
REDISTRIBUTE_OUT_OF_BOUNDS: "REDISTRIBUTE_OUT_OF_BOUNDS";
|
|
1622
|
+
REDISTRIBUTE_WOULD_RESULT_IN_INVALID_FRAMES: "REDISTRIBUTE_WOULD_RESULT_IN_INVALID_FRAMES";
|
|
560
1623
|
FRAME_ALREADY_DOCKED_ON_SIDE: "FRAME_ALREADY_DOCKED_ON_SIDE";
|
|
561
1624
|
CANT_LEAVE_NO_UNDOCKED_FRAMES: "CANT_LEAVE_NO_UNDOCKED_FRAMES";
|
|
562
1625
|
CANT_UNDOCK_COLLAPSED_FRAME: "CANT_UNDOCK_COLLAPSED_FRAME";
|
|
563
1626
|
CANT_COLLAPSE_NOT_DOCKED: "CANT_COLLAPSE_NOT_DOCKED";
|
|
564
1627
|
CANT_UNCOLLAPSE_NOT_COLLAPSED: "CANT_UNCOLLAPSE_NOT_COLLAPSED";
|
|
565
1628
|
NO_FILL_CANDIDATES: "NO_FILL_CANDIDATES";
|
|
1629
|
+
CANT_RESIZE_COLLAPSED_FRAME: "CANT_RESIZE_COLLAPSED_FRAME";
|
|
566
1630
|
};
|
|
567
1631
|
export type LayoutError = EnumLike<typeof LAYOUT_ERROR>;
|
|
568
1632
|
export type LayoutErrorInfo<T extends LayoutError> = LayoutErrorsInfo[T] extends undefined ? never : LayoutErrorsInfo[T];
|
|
@@ -643,6 +1707,12 @@ export type LayoutErrorsInfo = {
|
|
|
643
1707
|
frame: LayoutFrame;
|
|
644
1708
|
};
|
|
645
1709
|
[LAYOUT_ERROR.NO_FILL_CANDIDATES]: {};
|
|
1710
|
+
[LAYOUT_ERROR.CANT_RESIZE_COLLAPSED_FRAME]: {
|
|
1711
|
+
frame: LayoutFrame;
|
|
1712
|
+
};
|
|
1713
|
+
[LAYOUT_ERROR.REDISTRIBUTE_WOULD_RESULT_IN_INVALID_FRAMES]: {
|
|
1714
|
+
problemEdgeCoordinates: number[];
|
|
1715
|
+
};
|
|
646
1716
|
};
|
|
647
1717
|
export type HasOpposite = Direction | EdgeSide | ExtendedDirection | ExtendedEdgeSide | keyof Point | keyof Size;
|
|
648
1718
|
export type BaseDragZone = {
|
|
@@ -723,26 +1793,169 @@ export declare const zFrameCreate: z.ZodObject<{
|
|
|
723
1793
|
}>>;
|
|
724
1794
|
collapsed: z.ZodOptional<z.ZodNumber>;
|
|
725
1795
|
}, z.core.$loose>;
|
|
726
|
-
export type
|
|
727
|
-
css:
|
|
1796
|
+
export type LayoutShapeRectProps = {
|
|
1797
|
+
css: BaseRectCss;
|
|
728
1798
|
};
|
|
729
|
-
export type LayoutEdgesProps = {
|
|
730
|
-
edges: Edge[];
|
|
731
|
-
intersections: IntersectionEntry[];
|
|
732
|
-
/** The owning window, needed so we can correctly scale coordinates. */
|
|
733
|
-
win: LayoutWindow;
|
|
734
|
-
/** The active frame, used to render the active edges. Calculate it from the `frames` returned by `useFrames` composable because otherwise it will be the wrong size while dragging. */
|
|
735
|
-
activeFrame?: LayoutFrame;
|
|
736
|
-
draggingEdge?: Edge;
|
|
737
|
-
draggingIntersection?: IntersectionEntry;
|
|
738
|
-
} & Partial<LayoutShapeSquareProps>;
|
|
739
1799
|
export type LayoutChange<TInfo = never> = {
|
|
740
1800
|
modified: LayoutFrame[];
|
|
741
1801
|
created: LayoutFrame[];
|
|
742
1802
|
deleted: LayoutFrame[];
|
|
1803
|
+
window?: Partial<LayoutWindow>;
|
|
743
1804
|
info?: TInfo;
|
|
744
1805
|
};
|
|
745
|
-
export type
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
1806
|
+
export type DragState = {
|
|
1807
|
+
/** The current directions in the corresponding orientations that the user is dragging in. */
|
|
1808
|
+
dragDirections: Record<Orientation, Direction | undefined>;
|
|
1809
|
+
/** The curren point (in scaled window coordinates) the user is dragging at. */
|
|
1810
|
+
dragPoint?: Point;
|
|
1811
|
+
/** Whether the user is currently dragging and what type of drag. Is truthy string during all drag events. */
|
|
1812
|
+
isDragging: boolean | "frame" | "edge";
|
|
1813
|
+
/** Whether to show the moved frames while dragging. */
|
|
1814
|
+
showDragging: boolean;
|
|
1815
|
+
/** The frame being dragged during a frame drag. Only set when isDragging is "frame". */
|
|
1816
|
+
draggingFrameId?: FrameId;
|
|
1817
|
+
/**
|
|
1818
|
+
* The edges that are currently being dragged. There are multiple edges if they drag an intersection since what's actually happening is we're just dragging the closest horizontal and vertical edges.
|
|
1819
|
+
*/
|
|
1820
|
+
draggingEdges: Edge[];
|
|
1821
|
+
/**
|
|
1822
|
+
* The intersection that is currently being dragged.
|
|
1823
|
+
*/
|
|
1824
|
+
draggingIntersection?: IntersectionEntry;
|
|
1825
|
+
/** The "visual" edges that can be displayed for dragging. See {@link getVisualEdges} */
|
|
1826
|
+
visualEdges: Edge[];
|
|
1827
|
+
/**
|
|
1828
|
+
* The frames touching the currently dragged edges. Each entry corresponds to the frames touching the corresponding dragging edge.
|
|
1829
|
+
*
|
|
1830
|
+
* So you can use the index in draggingEdges to get the corresponding frames.
|
|
1831
|
+
*/
|
|
1832
|
+
touchingFrames: Record<string, LayoutFrame>[];
|
|
1833
|
+
/**
|
|
1834
|
+
* Same as touchingFrames, but with the frames in an array.
|
|
1835
|
+
*/
|
|
1836
|
+
touchingFramesArrays: LayoutFrame[][];
|
|
1837
|
+
/**
|
|
1838
|
+
* All the frames, with/without the currently dragged frames depending on if `showDragging` is true.
|
|
1839
|
+
*/
|
|
1840
|
+
frames: Record<string, LayoutFrame>;
|
|
1841
|
+
/**
|
|
1842
|
+
* The frame that is currently being hovered over (according to whether `dragPoint` in in the frame or not).
|
|
1843
|
+
*/
|
|
1844
|
+
dragHoveredFrame: LayoutFrame | undefined;
|
|
1845
|
+
/**
|
|
1846
|
+
* A list of corner intersections. Frames can also be dragged by these.
|
|
1847
|
+
*/
|
|
1848
|
+
intersections: IntersectionEntry[];
|
|
1849
|
+
/**
|
|
1850
|
+
* Whether the drag was initiated from a point along the window edge.
|
|
1851
|
+
*/
|
|
1852
|
+
isDraggingFromWindowEdge: boolean;
|
|
1853
|
+
win: LayoutWindow;
|
|
1854
|
+
};
|
|
1855
|
+
export interface ActionDragChangeResult {
|
|
1856
|
+
/** Whether the drag should update the edges. Defaults to false. */
|
|
1857
|
+
updateEdges?: boolean;
|
|
1858
|
+
/** Deco shapes produced by this action during this drag step. */
|
|
1859
|
+
shapes: LayoutShape[];
|
|
1860
|
+
/** Whether to show the moved edges while dragging. Defaults to true. */
|
|
1861
|
+
showDragging?: boolean;
|
|
1862
|
+
}
|
|
1863
|
+
export type DragChangeResult = Omit<ActionDragChangeResult, "shapes">;
|
|
1864
|
+
/**
|
|
1865
|
+
* Called when the drag coordinates change (during any event).
|
|
1866
|
+
*
|
|
1867
|
+
* Should return `{ allowed: true/false, shapes: LayoutShape[] }` to control whether the action is allowed and edges update and what deco shapes to render.
|
|
1868
|
+
*
|
|
1869
|
+
* Note that the allowed return type only affect the `move` event but is also typed as `boolean` for other events for ease of use.
|
|
1870
|
+
*/
|
|
1871
|
+
export type DragChangeHandler = <T extends "start" | "move" | "end">(type: T, e: T extends "end" ? PointerEvent | undefined : PointerEvent, state: DragState, forceRecalculateEdges: () => void, cancel: (e: PointerEvent | KeyboardEvent | undefined, state: DragState) => void) => ActionDragChangeResult;
|
|
1872
|
+
/**
|
|
1873
|
+
* A drag action describes when and how to handle a drag event.
|
|
1874
|
+
*
|
|
1875
|
+
* For example, there are the default split/close actions that can be triggered in certain situations. This could be when holding down a modifier or key, or some other condition (e.g. the user is dragging a specific edge).
|
|
1876
|
+
*
|
|
1877
|
+
* Each action should handle it's configuration and saving/caching any state it needs. See {@link SplitAction} and {@link CloseAction} for examples.
|
|
1878
|
+
*/
|
|
1879
|
+
export interface IDragAction {
|
|
1880
|
+
/** A unique name for your action. */
|
|
1881
|
+
name: string;
|
|
1882
|
+
onDragChange: DragChangeHandler;
|
|
1883
|
+
/**
|
|
1884
|
+
*
|
|
1885
|
+
* Is called after `onDragChange("end")` with the same event. Might not be called if the request was cancelled.
|
|
1886
|
+
*
|
|
1887
|
+
* You should apply your action if possible and return whether it was applied.
|
|
1888
|
+
*
|
|
1889
|
+
* This is also a good place to reset your state.
|
|
1890
|
+
*/
|
|
1891
|
+
onDragApply: (state: DragState, forceRecalculateEdges: () => void) => boolean;
|
|
1892
|
+
/**
|
|
1893
|
+
* Should return true if it should handle the "request"/event (e.g. some modifier is being pressed => user is requesting x action).
|
|
1894
|
+
*
|
|
1895
|
+
* The user is not necessarily dragging at this point, though they might also change actions mid drag. So it does not necessarily mean the event is allowed.
|
|
1896
|
+
*
|
|
1897
|
+
* Here is where you should initiate your state. Don't allow the action by default unless it can always be allowed.
|
|
1898
|
+
*/
|
|
1899
|
+
canHandleRequest(e: KeyboardEvent | PointerEvent, state: DragState, forceRecalculateEdges: () => void): boolean;
|
|
1900
|
+
/**
|
|
1901
|
+
* Called when a user cancels the drag action.
|
|
1902
|
+
*
|
|
1903
|
+
* You should reset your state here.
|
|
1904
|
+
*/
|
|
1905
|
+
cancel(e: PointerEvent | KeyboardEvent | undefined, state: DragState): void;
|
|
1906
|
+
/**
|
|
1907
|
+
* Plugins should implement some basic debug logs by calling {@link DragActionHandler.debugState } at least before and after applying actions in onDragApply. Debug can be a string because it can be an object key to filter on (see the debugState function).
|
|
1908
|
+
*
|
|
1909
|
+
*
|
|
1910
|
+
* Calls look like this usually, where this.state is the plugin state:
|
|
1911
|
+
* ```ts
|
|
1912
|
+
* DragActionHandler.debugState(this.name, "before", state, this.state, this.debug)
|
|
1913
|
+
* ```
|
|
1914
|
+
*/
|
|
1915
|
+
debug: boolean | string;
|
|
1916
|
+
/**
|
|
1917
|
+
* The action handler will call this regardless of whether the action is active or not.
|
|
1918
|
+
*
|
|
1919
|
+
* Can be used by actions to return display hints.
|
|
1920
|
+
*
|
|
1921
|
+
* Actions should keep the state of the hints locally and update them in canHandlerRequest/onDrag*, etc. and only use this to return the state of the actions, not update them as that could become expensive.
|
|
1922
|
+
*/
|
|
1923
|
+
getTextHints(type: "start" | "move" | "end"): {
|
|
1924
|
+
/** Hint texts to display regarding the action state/usage. Undefined means no hint. */
|
|
1925
|
+
actions?: string[];
|
|
1926
|
+
/** Error texts/hints to display when the action produces an error. */
|
|
1927
|
+
errors?: string[];
|
|
1928
|
+
};
|
|
1929
|
+
/**
|
|
1930
|
+
* Called after visual edges are recalculated, once per edge. Action handlers can annotate edges with error info here ({@link Edge.error}).
|
|
1931
|
+
*
|
|
1932
|
+
* When `LayoutEdges` sees an error it adds the message as the title and the following classes:
|
|
1933
|
+
* - `data-error` attribute with the error message
|
|
1934
|
+
* - class `drag-edge-errored` on the thick drag handle
|
|
1935
|
+
* - class `edge-errored` on the thin visual edge
|
|
1936
|
+
*
|
|
1937
|
+
* Tailwind example to style errored edges:
|
|
1938
|
+
* ```css
|
|
1939
|
+
* [&_.drag-edge-errored]:cursor-not-allowed
|
|
1940
|
+
* [&_.drag-edge-errored]:bg-red-500/30
|
|
1941
|
+
* [&_.edge-errored]:bg-red-500/20
|
|
1942
|
+
* ```
|
|
1943
|
+
*
|
|
1944
|
+
* Regarding the title, this is a temporary solution until lib is refactored to more composable components.
|
|
1945
|
+
*
|
|
1946
|
+
* NOTE: Annotation does NOT prevent dragging/events on edges.
|
|
1947
|
+
*/
|
|
1948
|
+
annotateEdge?(edge: Edge, frames: LayoutFrame[]): void;
|
|
1949
|
+
}
|
|
1950
|
+
export type EdgeDragStartData = {
|
|
1951
|
+
edge?: Edge;
|
|
1952
|
+
intersection?: IntersectionEntry;
|
|
1953
|
+
};
|
|
1954
|
+
export type FrameDragStartData = {
|
|
1955
|
+
frameId: FrameId;
|
|
1956
|
+
};
|
|
1957
|
+
export type DragStartFn = {
|
|
1958
|
+
(e: PointerEvent, type: "edge", data: EdgeDragStartData): void;
|
|
1959
|
+
(e: PointerEvent, type: "frame", data: FrameDragStartData): void;
|
|
1960
|
+
};
|
|
1961
|
+
export type * from "./vue.js";
|