@archbase/layout 3.0.25 → 4.0.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/dist/containers/index.d.ts +2 -0
- package/dist/containers/mosaic/ArchbaseMosaicLayout.d.ts +43 -0
- package/dist/containers/mosaic/index.d.ts +3 -0
- package/dist/containers/resizable/ArchbaseResizableLayout.d.ts +113 -0
- package/dist/containers/resizable/index.d.ts +2 -0
- package/dist/containers/split-pane/ArchbaseSplitPane.d.ts +18 -27
- package/dist/index.js +1084 -846
- package/package.json +9 -8
package/dist/index.js
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import { Menu as at, ActionIcon as
|
|
2
|
-
import { Card as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
7
|
-
import { ResizeSensor as
|
|
8
|
-
import { useWindowSize as
|
|
9
|
-
import { useArchbaseTranslation as
|
|
10
|
-
import { useElementSize as
|
|
11
|
-
import {
|
|
12
|
-
import { IconPinnedOff as
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { Menu as at, useMantineTheme as Qt, useComputedColorScheme as te, Box as ee, ActionIcon as ie, useMantineColorScheme as oe } from "@mantine/core";
|
|
2
|
+
import { Card as $i, Container as Mi, Group as ji, Stack as Bi } from "@mantine/core";
|
|
3
|
+
import { jsx as a, jsxs as F, Fragment as Et } from "react/jsx-runtime";
|
|
4
|
+
import * as h from "prop-types";
|
|
5
|
+
import * as O from "react";
|
|
6
|
+
import W, { useRef as it, useState as U, useEffect as et, useCallback as kt, useMemo as Ht } from "react";
|
|
7
|
+
import { ResizeSensor as ne } from "css-element-queries";
|
|
8
|
+
import { useWindowSize as re } from "usehooks-ts";
|
|
9
|
+
import { useArchbaseTranslation as Wt } from "@archbase/core";
|
|
10
|
+
import { useElementSize as se } from "@mantine/hooks";
|
|
11
|
+
import { PanelGroup as Ft, Panel as Mt, PanelResizeHandle as Vt } from "react-resizable-panels";
|
|
12
|
+
import { IconPinnedOff as le, IconPinned as ae } from "@tabler/icons-react";
|
|
13
|
+
import { MosaicWindow as de, Mosaic as ce } from "react-mosaic-component";
|
|
14
|
+
import "react-mosaic-component/react-mosaic-component.css";
|
|
15
|
+
import { DockviewReact as he } from "dockview-react";
|
|
16
|
+
function bi({ children: t }) {
|
|
17
|
+
return /* @__PURE__ */ a("form", { children: t });
|
|
16
18
|
}
|
|
17
|
-
var A = /* @__PURE__ */ ((t) => (t.ViewPort = "viewport", t.Fixed = "fixed", t.Fill = "fill", t.Positioned = "positioned", t.Anchored = "anchored", t.Custom = "custom", t))(A || {}), C = /* @__PURE__ */ ((t) => (t.Left = "anchor-left", t.Right = "anchor-right", t.Top = "anchor-top", t.Bottom = "anchor-bottom", t))(C || {}), mt = /* @__PURE__ */ ((t) => (t[t.Horizontal = 0] = "Horizontal", t[t.Vertical = 1] = "Vertical", t))(mt || {}),
|
|
18
|
-
function
|
|
19
|
+
var A = /* @__PURE__ */ ((t) => (t.ViewPort = "viewport", t.Fixed = "fixed", t.Fill = "fill", t.Positioned = "positioned", t.Anchored = "anchored", t.Custom = "custom", t))(A || {}), C = /* @__PURE__ */ ((t) => (t.Left = "anchor-left", t.Right = "anchor-right", t.Top = "anchor-top", t.Bottom = "anchor-bottom", t))(C || {}), mt = /* @__PURE__ */ ((t) => (t[t.Horizontal = 0] = "Horizontal", t[t.Vertical = 1] = "Vertical", t))(mt || {}), y = /* @__PURE__ */ ((t) => (t.All = "resize-all", t.Left = "resize-left", t.Right = "resize-right", t.Top = "resize-top", t.Bottom = "resize-bottom", t.TopLeft = "resize-topleft", t.TopRight = "resize-topright", t.BottomLeft = "resize-bottomleft", t.BottomRight = "resize-bottomright", t))(y || {}), rt = /* @__PURE__ */ ((t) => (t.OverlayInside = "overlay-inside", t.Inside = "inside", t.OverlayBoundary = "overlay-boundary", t))(rt || {}), st = /* @__PURE__ */ ((t) => (t.None = "none", t.Vertical = "vertical", t.HorizontalVertical = "horizontalVertical", t))(st || {}), zt = /* @__PURE__ */ ((t) => (t.Mouse = "mousemove", t.Touch = "touchmove", t))(zt || {}), wt = /* @__PURE__ */ ((t) => (t.Mouse = "mouseup", t.Touch = "touchend", t))(wt || {});
|
|
20
|
+
function ue(t, ...i) {
|
|
19
21
|
const o = /* @__PURE__ */ Object.create(null);
|
|
20
|
-
i.forEach((
|
|
21
|
-
o[
|
|
22
|
+
i.forEach((u) => {
|
|
23
|
+
o[u] = !0;
|
|
22
24
|
});
|
|
23
25
|
const n = /* @__PURE__ */ Object.create(null);
|
|
24
|
-
return Object.keys(t).forEach((
|
|
25
|
-
o[
|
|
26
|
+
return Object.keys(t).forEach((u) => {
|
|
27
|
+
o[u] || (n[u] = t[u]);
|
|
26
28
|
}), n;
|
|
27
29
|
}
|
|
28
|
-
function
|
|
30
|
+
function fe() {
|
|
29
31
|
let t = Math.random() * 46656 | 0, i = Math.random() * 46656 | 0;
|
|
30
32
|
return ("000" + t.toString(36)).slice(-3) + ("000" + i.toString(36)).slice(-3);
|
|
31
33
|
}
|
|
@@ -50,7 +52,7 @@ function Ct(t, i) {
|
|
|
50
52
|
return !1;
|
|
51
53
|
return !0;
|
|
52
54
|
}
|
|
53
|
-
function
|
|
55
|
+
function me(t, i) {
|
|
54
56
|
var o = !1;
|
|
55
57
|
return function(...n) {
|
|
56
58
|
o || (t(...n), o = !0, setTimeout(function() {
|
|
@@ -58,7 +60,7 @@ function re(t, i) {
|
|
|
58
60
|
}, i));
|
|
59
61
|
};
|
|
60
62
|
}
|
|
61
|
-
function
|
|
63
|
+
function ge(t) {
|
|
62
64
|
const i = [], o = {
|
|
63
65
|
position: t.position,
|
|
64
66
|
left: v(t.left),
|
|
@@ -70,160 +72,160 @@ function se(t) {
|
|
|
70
72
|
zIndex: t.zIndex
|
|
71
73
|
}, n = [];
|
|
72
74
|
o.position && n.push(`position: ${o.position};`), o.left && n.push(`left: ${o.left};`), o.top && n.push(`top: ${o.top};`), o.right && n.push(`right: ${o.right};`), o.bottom && n.push(`bottom: ${o.bottom};`), o.width && n.push(`width: ${o.width};`), o.height && n.push(`height: ${o.height};`), o.zIndex && n.push(`z-index: ${o.zIndex};`), t.allowOverflow && n.push("overflow: visible;"), n.length > 0 && i.push(`#${t.id} { ${n.join(" ")} }`), t.scrollable && i.push(`#${t.id} > .spaces-space-inner { overflow: auto; touch-action: auto; }`);
|
|
73
|
-
let
|
|
74
|
-
const
|
|
75
|
+
let u = 0;
|
|
76
|
+
const d = `${t.handleSize}px`, r = `-${t.touchHandleSize / 2 - t.handleSize / 2}px`, b = `${t.touchHandleSize / 2 - t.handleSize / 2}px`;
|
|
75
77
|
switch (t.handlePlacement) {
|
|
76
78
|
case rt.Inside:
|
|
77
79
|
case rt.OverlayInside:
|
|
78
|
-
|
|
80
|
+
u = t.handleSize, t.type === A.Positioned && (u = 0);
|
|
79
81
|
break;
|
|
80
82
|
case rt.OverlayBoundary:
|
|
81
|
-
|
|
83
|
+
u = t.handleSize / 2;
|
|
82
84
|
break;
|
|
83
85
|
}
|
|
84
|
-
const e = `${
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
return t.canResizeLeft && (t.anchor ?
|
|
86
|
+
const e = `${u}px`, l = (s, f) => {
|
|
87
|
+
const g = [];
|
|
88
|
+
f.left && g.push(`left: ${f.left}`), f.top && g.push(`top: ${f.top}`), f.right && g.push(`right: ${f.right}`), f.bottom && g.push(`bottom: ${f.bottom}`), f.width && g.push(`width: ${f.width}`), f.height && g.push(`height: ${f.height}`), i.push(`#${t.id}-${s} { ${g.join("; ")}}`);
|
|
89
|
+
}, p = () => t.type === A.Positioned ? t.width.size && t.height.size : t.orientation == mt.Horizontal ? t.width.size : t.height.size;
|
|
90
|
+
return t.canResizeLeft && (t.anchor ? l("ml", {
|
|
89
91
|
right: `calc(${v(t.right, !0)} + ${v(t.width)} - ${e})`,
|
|
90
92
|
top: "0",
|
|
91
93
|
bottom: "0",
|
|
92
|
-
width:
|
|
93
|
-
}) :
|
|
94
|
+
width: d
|
|
95
|
+
}) : l("ml", {
|
|
94
96
|
left: `calc(${v(t.left, !0)} - ${e})`,
|
|
95
97
|
top: v(t.top),
|
|
96
98
|
bottom: v(t.bottom),
|
|
97
|
-
width:
|
|
99
|
+
width: d,
|
|
98
100
|
height: v(t.height)
|
|
99
|
-
}),
|
|
100
|
-
left:
|
|
101
|
-
right:
|
|
102
|
-
top:
|
|
103
|
-
bottom:
|
|
104
|
-
})), t.canResizeTop && (t.anchor ? (
|
|
101
|
+
}), l("ml:after", {
|
|
102
|
+
left: r,
|
|
103
|
+
right: r,
|
|
104
|
+
top: r,
|
|
105
|
+
bottom: r
|
|
106
|
+
})), t.canResizeTop && (t.anchor ? (l("mt", {
|
|
105
107
|
left: "0",
|
|
106
108
|
right: "0",
|
|
107
109
|
bottom: `calc(${v(t.bottom)} + ${v(t.height)} - ${e})`,
|
|
108
|
-
height:
|
|
109
|
-
}),
|
|
110
|
-
top:
|
|
111
|
-
bottom:
|
|
112
|
-
left:
|
|
110
|
+
height: d
|
|
111
|
+
}), l("mt:after", {
|
|
112
|
+
top: r,
|
|
113
|
+
bottom: r,
|
|
114
|
+
left: r,
|
|
113
115
|
width: v(t.width),
|
|
114
|
-
right:
|
|
115
|
-
})) : (
|
|
116
|
+
right: r
|
|
117
|
+
})) : (l("mt", {
|
|
116
118
|
top: `calc(${v(t.top, !0)} - ${e})`,
|
|
117
119
|
left: v(t.left),
|
|
118
120
|
right: v(t.right),
|
|
119
121
|
width: v(t.width),
|
|
120
|
-
height:
|
|
121
|
-
}),
|
|
122
|
-
top:
|
|
123
|
-
bottom:
|
|
124
|
-
left:
|
|
125
|
-
width: `calc(${v(t.width, !0)} - ${e}) + ${
|
|
126
|
-
right:
|
|
127
|
-
}) :
|
|
128
|
-
top:
|
|
129
|
-
bottom:
|
|
130
|
-
left:
|
|
122
|
+
height: d
|
|
123
|
+
}), p() ? l("mt:after", {
|
|
124
|
+
top: r,
|
|
125
|
+
bottom: r,
|
|
126
|
+
left: r,
|
|
127
|
+
width: `calc(${v(t.width, !0)} - ${e}) + ${b}`,
|
|
128
|
+
right: r
|
|
129
|
+
}) : l("mt:after", {
|
|
130
|
+
top: r,
|
|
131
|
+
bottom: r,
|
|
132
|
+
left: r,
|
|
131
133
|
width: v(t.width),
|
|
132
|
-
right:
|
|
133
|
-
}))), t.canResizeRight && (
|
|
134
|
-
left: `calc(${v(t.left, !0)} + ${v(t.width, !0)} - ${
|
|
134
|
+
right: r
|
|
135
|
+
}))), t.canResizeRight && (p() ? l("mr", {
|
|
136
|
+
left: `calc(${v(t.left, !0)} + ${v(t.width, !0)} - ${d} + ${e})`,
|
|
135
137
|
top: v(t.top),
|
|
136
138
|
bottom: v(t.bottom),
|
|
137
|
-
width:
|
|
139
|
+
width: d,
|
|
138
140
|
height: v(t.height)
|
|
139
|
-
}) :
|
|
141
|
+
}) : l("mr", {
|
|
140
142
|
right: `calc(${v(t.right, !0)} - ${e})`,
|
|
141
143
|
top: v(t.top),
|
|
142
144
|
bottom: v(t.bottom),
|
|
143
|
-
width:
|
|
145
|
+
width: d,
|
|
144
146
|
height: v(t.height)
|
|
145
|
-
}),
|
|
146
|
-
left:
|
|
147
|
-
right:
|
|
148
|
-
top:
|
|
149
|
-
bottom:
|
|
150
|
-
})), t.canResizeBottom && (
|
|
151
|
-
top: `calc(${v(t.top, !0)} + ${v(t.height, !0)} - ${
|
|
147
|
+
}), l("mr:after", {
|
|
148
|
+
left: r,
|
|
149
|
+
right: r,
|
|
150
|
+
top: r,
|
|
151
|
+
bottom: r
|
|
152
|
+
})), t.canResizeBottom && (p() ? l("mb", {
|
|
153
|
+
top: `calc(${v(t.top, !0)} + ${v(t.height, !0)} - ${d} + ${e})`,
|
|
152
154
|
left: v(t.left),
|
|
153
155
|
right: v(t.right),
|
|
154
156
|
width: v(t.width),
|
|
155
|
-
height:
|
|
156
|
-
}) :
|
|
157
|
+
height: d
|
|
158
|
+
}) : l("mb", {
|
|
157
159
|
bottom: `calc(${v(t.bottom, !0)} - ${e})`,
|
|
158
160
|
left: v(t.left),
|
|
159
161
|
right: v(t.right),
|
|
160
162
|
width: v(t.width),
|
|
161
|
-
height:
|
|
162
|
-
}),
|
|
163
|
-
top:
|
|
164
|
-
bottom:
|
|
165
|
-
left:
|
|
166
|
-
right:
|
|
167
|
-
})), t.canResizeTopLeft && (
|
|
163
|
+
height: d
|
|
164
|
+
}), l("mb:after", {
|
|
165
|
+
top: r,
|
|
166
|
+
bottom: r,
|
|
167
|
+
left: r,
|
|
168
|
+
right: r
|
|
169
|
+
})), t.canResizeTopLeft && (l("mtl", {
|
|
168
170
|
left: `calc(${v(t.left, !0)} - ${e})`,
|
|
169
171
|
top: v(t.top),
|
|
170
|
-
width:
|
|
171
|
-
height:
|
|
172
|
-
}),
|
|
173
|
-
top:
|
|
174
|
-
bottom:
|
|
175
|
-
left:
|
|
176
|
-
right:
|
|
177
|
-
})), t.canResizeTopRight && (
|
|
178
|
-
left: `calc(${v(t.left, !0)} + ${v(t.width, !0)} - ${
|
|
172
|
+
width: d,
|
|
173
|
+
height: d
|
|
174
|
+
}), l("mtl:after", {
|
|
175
|
+
top: r,
|
|
176
|
+
bottom: r,
|
|
177
|
+
left: r,
|
|
178
|
+
right: r
|
|
179
|
+
})), t.canResizeTopRight && (p() ? l("mtr", {
|
|
180
|
+
left: `calc(${v(t.left, !0)} + ${v(t.width, !0)} - ${d} + ${e})`,
|
|
179
181
|
top: v(t.top),
|
|
180
|
-
width:
|
|
181
|
-
height:
|
|
182
|
-
}) :
|
|
182
|
+
width: d,
|
|
183
|
+
height: d
|
|
184
|
+
}) : l("mtr", {
|
|
183
185
|
right: `calc(${v(t.right, !0)} - ${e})`,
|
|
184
186
|
top: v(t.top),
|
|
185
|
-
width:
|
|
186
|
-
height:
|
|
187
|
-
}),
|
|
188
|
-
top:
|
|
189
|
-
bottom:
|
|
190
|
-
left:
|
|
191
|
-
right:
|
|
192
|
-
})), t.canResizeBottomLeft && (
|
|
193
|
-
top: `calc(${v(t.top, !0)} + ${v(t.height, !0)} - ${
|
|
187
|
+
width: d,
|
|
188
|
+
height: d
|
|
189
|
+
}), l("mtr:after", {
|
|
190
|
+
top: r,
|
|
191
|
+
bottom: r,
|
|
192
|
+
left: r,
|
|
193
|
+
right: r
|
|
194
|
+
})), t.canResizeBottomLeft && (p() ? l("mbl", {
|
|
195
|
+
top: `calc(${v(t.top, !0)} + ${v(t.height, !0)} - ${d} + ${e})`,
|
|
194
196
|
left: v(t.left),
|
|
195
|
-
width:
|
|
196
|
-
height:
|
|
197
|
-
}) :
|
|
197
|
+
width: d,
|
|
198
|
+
height: d
|
|
199
|
+
}) : l("mbl", {
|
|
198
200
|
bottom: `calc(${v(t.bottom, !0)} - ${e})`,
|
|
199
201
|
left: v(t.left),
|
|
200
|
-
width:
|
|
201
|
-
height:
|
|
202
|
-
}),
|
|
203
|
-
top:
|
|
204
|
-
bottom:
|
|
205
|
-
left:
|
|
206
|
-
right:
|
|
207
|
-
})), t.canResizeBottomRight && (
|
|
208
|
-
left: `calc(${v(t.left, !0)} + ${v(t.width, !0)} - ${
|
|
209
|
-
top: `calc(${v(t.top, !0)} + ${v(t.height, !0)} - ${
|
|
210
|
-
width:
|
|
211
|
-
height:
|
|
212
|
-
}) :
|
|
202
|
+
width: d,
|
|
203
|
+
height: d
|
|
204
|
+
}), l("mbl:after", {
|
|
205
|
+
top: r,
|
|
206
|
+
bottom: r,
|
|
207
|
+
left: r,
|
|
208
|
+
right: r
|
|
209
|
+
})), t.canResizeBottomRight && (p() ? l("mbr", {
|
|
210
|
+
left: `calc(${v(t.left, !0)} + ${v(t.width, !0)} - ${d} + ${e})`,
|
|
211
|
+
top: `calc(${v(t.top, !0)} + ${v(t.height, !0)} - ${d} + ${e})`,
|
|
212
|
+
width: d,
|
|
213
|
+
height: d
|
|
214
|
+
}) : l("mbr", {
|
|
213
215
|
right: `calc(${v(t.right, !0)} - ${e})`,
|
|
214
216
|
bottom: `calc(${v(t.bottom, !0)} - ${e})`,
|
|
215
|
-
width:
|
|
216
|
-
height:
|
|
217
|
-
}),
|
|
218
|
-
top:
|
|
219
|
-
bottom:
|
|
220
|
-
left:
|
|
221
|
-
right:
|
|
217
|
+
width: d,
|
|
218
|
+
height: d
|
|
219
|
+
}), l("mbr:after", {
|
|
220
|
+
top: r,
|
|
221
|
+
bottom: r,
|
|
222
|
+
left: r,
|
|
223
|
+
right: r
|
|
222
224
|
})), i.join(" ");
|
|
223
225
|
}
|
|
224
|
-
function
|
|
225
|
-
const i =
|
|
226
|
-
if (
|
|
226
|
+
function yt(t) {
|
|
227
|
+
const i = ge(t);
|
|
228
|
+
if (qt())
|
|
227
229
|
t.ssrStyle = i;
|
|
228
230
|
else {
|
|
229
231
|
const o = document.getElementById(`style_${t.id}`);
|
|
@@ -235,122 +237,122 @@ function Rt(t) {
|
|
|
235
237
|
}
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
|
-
function
|
|
240
|
+
function be(t) {
|
|
239
241
|
const i = document.getElementById(`style_${t.id}`);
|
|
240
242
|
i && document.head.removeChild(i);
|
|
241
243
|
}
|
|
242
|
-
function
|
|
244
|
+
function qt() {
|
|
243
245
|
return !(typeof document < "u" && document);
|
|
244
246
|
}
|
|
245
|
-
function
|
|
246
|
-
return t ===
|
|
247
|
+
function Rt(t) {
|
|
248
|
+
return t === y.Left || t === y.Right;
|
|
247
249
|
}
|
|
248
|
-
function Q(t, i, o, n,
|
|
249
|
-
const
|
|
250
|
-
return (
|
|
251
|
-
let
|
|
252
|
-
n.type !== A.Positioned && (m = Math.max(
|
|
250
|
+
function Q(t, i, o, n, u, d) {
|
|
251
|
+
const r = i === y.Right || i === y.Bottom ? (g) => -g : (g) => g, b = Rt(i) ? n.width : n.height, e = o.resized, l = b.resized, p = Rt(i) ? t.width : t.height, s = Z(n.minimumSize, 20) - p + 0, f = n.maximumSize ? n.maximumSize - p + 0 : void 0;
|
|
252
|
+
return (g, z) => {
|
|
253
|
+
let c = (Rt(i) ? u : d) - (Rt(i) ? g : z), m = r(c);
|
|
254
|
+
n.type !== A.Positioned && (m = Math.max(r(c), s), m < s && (m = s), typeof f == "number" && m > f && (m = f)), o.size !== void 0 ? (o.resized = r(-c) + e, b.size && (b.resized = r(c) + l)) : b.resized = m + l;
|
|
253
255
|
};
|
|
254
256
|
}
|
|
255
|
-
function
|
|
256
|
-
const
|
|
257
|
+
function pe(t, i, o, n) {
|
|
258
|
+
const u = i.element.getBoundingClientRect();
|
|
257
259
|
switch (t) {
|
|
258
|
-
case
|
|
259
|
-
return Q(
|
|
260
|
-
case
|
|
261
|
-
return Q(
|
|
262
|
-
case
|
|
263
|
-
return Q(
|
|
264
|
-
case
|
|
265
|
-
return Q(
|
|
266
|
-
case
|
|
267
|
-
const
|
|
268
|
-
return (
|
|
269
|
-
|
|
260
|
+
case y.Left:
|
|
261
|
+
return Q(u, t, i.left, i, o, n);
|
|
262
|
+
case y.Right:
|
|
263
|
+
return Q(u, t, i.right, i, o, n);
|
|
264
|
+
case y.Bottom:
|
|
265
|
+
return Q(u, t, i.bottom, i, o, n);
|
|
266
|
+
case y.Top:
|
|
267
|
+
return Q(u, t, i.top, i, o, n);
|
|
268
|
+
case y.TopLeft:
|
|
269
|
+
const d = Q(u, y.Top, i.top, i, o, n), r = Q(u, y.Left, i.left, i, o, n);
|
|
270
|
+
return (g, z) => {
|
|
271
|
+
d(g, z), r(g, z);
|
|
270
272
|
};
|
|
271
|
-
case
|
|
272
|
-
const
|
|
273
|
-
return (
|
|
274
|
-
|
|
273
|
+
case y.TopRight:
|
|
274
|
+
const b = Q(u, y.Top, i.top, i, o, n), e = Q(u, y.Right, i.right, i, o, n);
|
|
275
|
+
return (g, z) => {
|
|
276
|
+
b(g, z), e(g, z);
|
|
275
277
|
};
|
|
276
|
-
case
|
|
277
|
-
const
|
|
278
|
-
return (
|
|
279
|
-
|
|
278
|
+
case y.BottomLeft:
|
|
279
|
+
const l = Q(u, y.Bottom, i.bottom, i, o, n), p = Q(u, y.Left, i.left, i, o, n);
|
|
280
|
+
return (g, z) => {
|
|
281
|
+
l(g, z), p(g, z);
|
|
280
282
|
};
|
|
281
|
-
case
|
|
282
|
-
const
|
|
283
|
-
return (
|
|
284
|
-
|
|
283
|
+
case y.BottomRight:
|
|
284
|
+
const s = Q(u, y.Bottom, i.bottom, i, o, n), f = Q(u, y.Right, i.right, i, o, n);
|
|
285
|
+
return (g, z) => {
|
|
286
|
+
s(g, z), f(g, z);
|
|
285
287
|
};
|
|
286
288
|
default:
|
|
287
289
|
throw `Resize type ${t} not supported`;
|
|
288
290
|
}
|
|
289
291
|
}
|
|
290
|
-
function
|
|
292
|
+
function ze(t) {
|
|
291
293
|
return {
|
|
292
|
-
startResize(i, o, n,
|
|
294
|
+
startResize(i, o, n, u, d, r, b) {
|
|
293
295
|
if (n.onResizeStart) {
|
|
294
296
|
const m = n.onResizeStart(o);
|
|
295
297
|
if (typeof m == "boolean" && !m)
|
|
296
298
|
return;
|
|
297
299
|
}
|
|
298
|
-
const e =
|
|
300
|
+
const e = r(i), l = pe(o, n, e.x, e.y);
|
|
299
301
|
n.resizing = !0, n.updateParent();
|
|
300
|
-
let
|
|
301
|
-
const
|
|
302
|
-
|
|
302
|
+
let p = 0, s = 0, f = !1;
|
|
303
|
+
const g = (m, R) => {
|
|
304
|
+
l(m, R), t.updateStyles(n);
|
|
303
305
|
}, z = (m) => {
|
|
304
|
-
|
|
305
|
-
const R =
|
|
306
|
-
|
|
307
|
-
n.resizing &&
|
|
306
|
+
f = !0;
|
|
307
|
+
const R = r(m);
|
|
308
|
+
p = R.x, s = R.y, m.preventDefault(), window.requestAnimationFrame(() => {
|
|
309
|
+
n.resizing && g(p, s);
|
|
308
310
|
});
|
|
309
|
-
},
|
|
310
|
-
n.resizing = !1,
|
|
311
|
-
const m =
|
|
311
|
+
}, c = () => {
|
|
312
|
+
n.resizing = !1, f && g(p, s), window.removeEventListener(d, z), window.removeEventListener(u, c), n.updateParent();
|
|
313
|
+
const m = b || n.onResizeEnd;
|
|
312
314
|
if (m) {
|
|
313
315
|
const R = n.element.getBoundingClientRect();
|
|
314
|
-
m(Math.floor(
|
|
316
|
+
m(Math.floor(Rt(o) ? R.width : R.height), R, o);
|
|
315
317
|
}
|
|
316
318
|
};
|
|
317
|
-
window.addEventListener(
|
|
319
|
+
window.addEventListener(d, z), window.addEventListener(u, c);
|
|
318
320
|
}
|
|
319
321
|
};
|
|
320
322
|
}
|
|
321
|
-
function
|
|
322
|
-
function i(o, n,
|
|
323
|
-
const
|
|
324
|
-
o.left.adjusted = [
|
|
323
|
+
function we(t) {
|
|
324
|
+
function i(o, n, u, d, r) {
|
|
325
|
+
const b = -(n - d), e = -(u - r);
|
|
326
|
+
o.left.adjusted = [b], o.top.adjusted = [e], o.right.size && (o.right.adjusted = [-b]), o.bottom.size && (o.bottom.adjusted = [-e]), t.updateStyles(o);
|
|
325
327
|
}
|
|
326
328
|
return {
|
|
327
|
-
startDrag(o, n,
|
|
329
|
+
startDrag(o, n, u, d, r, b) {
|
|
328
330
|
if (n.element) {
|
|
329
|
-
const e =
|
|
330
|
-
let
|
|
331
|
-
const m = (I,
|
|
332
|
-
|
|
333
|
-
const
|
|
334
|
-
|
|
331
|
+
const e = r(o), l = n.left.adjusted.length === 0 ? 0 : n.left.adjusted[0], p = n.top.adjusted.length === 0 ? 0 : n.top.adjusted[0], s = e.x - l, f = e.y - p;
|
|
332
|
+
let g = 0, z = 0, c = !1;
|
|
333
|
+
const m = (I, M) => i(n, s, f, I, M), R = me(m, 5), S = (I) => {
|
|
334
|
+
c = !0;
|
|
335
|
+
const M = r(I);
|
|
336
|
+
g = M.x, z = M.y, I.preventDefault(), R(g, z);
|
|
335
337
|
}, w = () => {
|
|
336
|
-
if (
|
|
338
|
+
if (c && m(g, z), window.removeEventListener(d, S), window.removeEventListener(u, w), b) {
|
|
337
339
|
const I = n.parentId && t.getSpace(n.parentId)?.element.getBoundingClientRect() || {
|
|
338
340
|
left: 0,
|
|
339
341
|
top: 0
|
|
340
|
-
},
|
|
342
|
+
}, M = (({ left: N, top: x, right: T, bottom: P, width: k, height: E }) => ({ left: N, top: x, right: T, bottom: P, width: k, height: E }))(
|
|
341
343
|
n.element.getBoundingClientRect()
|
|
342
344
|
);
|
|
343
|
-
|
|
345
|
+
b(
|
|
344
346
|
{
|
|
345
|
-
...
|
|
346
|
-
left:
|
|
347
|
-
top:
|
|
347
|
+
...M,
|
|
348
|
+
left: M.left - I.left,
|
|
349
|
+
top: M.top - I.top
|
|
348
350
|
},
|
|
349
|
-
|
|
351
|
+
c
|
|
350
352
|
);
|
|
351
353
|
}
|
|
352
354
|
};
|
|
353
|
-
window.addEventListener(
|
|
355
|
+
window.addEventListener(d, S), window.addEventListener(u, w);
|
|
354
356
|
}
|
|
355
357
|
}
|
|
356
358
|
};
|
|
@@ -372,14 +374,14 @@ const bt = {
|
|
|
372
374
|
adjustBottom: () => !1,
|
|
373
375
|
adjustEdge: () => !1,
|
|
374
376
|
anchoredChildren: () => []
|
|
375
|
-
},
|
|
376
|
-
function
|
|
377
|
+
}, ye = [C.Left, C.Top, C.Right, C.Bottom];
|
|
378
|
+
function _t(t) {
|
|
377
379
|
return t === A.ViewPort ? "fixed" : t === A.Fixed ? "relative" : "absolute";
|
|
378
380
|
}
|
|
379
|
-
function
|
|
381
|
+
function Nt(t) {
|
|
380
382
|
return t === C.Bottom || t === C.Top ? mt.Vertical : mt.Horizontal;
|
|
381
383
|
}
|
|
382
|
-
function
|
|
384
|
+
function Re(t) {
|
|
383
385
|
return [
|
|
384
386
|
{
|
|
385
387
|
anchor: C.Left,
|
|
@@ -402,87 +404,87 @@ function ue(t) {
|
|
|
402
404
|
function ut(t) {
|
|
403
405
|
return { size: t, adjusted: [], resized: 0 };
|
|
404
406
|
}
|
|
405
|
-
function
|
|
407
|
+
function ve() {
|
|
406
408
|
let t = [];
|
|
407
409
|
const i = (e) => {
|
|
408
410
|
t = e;
|
|
409
|
-
}, o = (e) => n().find((
|
|
410
|
-
const
|
|
411
|
-
let
|
|
412
|
-
return
|
|
411
|
+
}, o = (e) => n().find((l) => l.id === e), n = () => t, u = (e) => {
|
|
412
|
+
const l = (z, c, m) => m.indexOf(z) === c, s = ((z) => {
|
|
413
|
+
let c = [];
|
|
414
|
+
return ye.forEach((m) => {
|
|
413
415
|
const R = z.filter((w) => w.anchor !== void 0 && w.anchor === m);
|
|
414
|
-
R.map((w) => w.zIndex).filter(
|
|
415
|
-
const I = R.filter((T) => T.zIndex === w),
|
|
416
|
-
var x =
|
|
417
|
-
|
|
416
|
+
R.map((w) => w.zIndex).filter(l).forEach((w) => {
|
|
417
|
+
const I = R.filter((T) => T.zIndex === w), M = I.filter((T) => T.order !== void 0), N = I.filter((T) => T.order === void 0);
|
|
418
|
+
var x = M.length > 0 ? M.map((T) => T.order).reduce((T, P) => Math.max(T, P)) : 0;
|
|
419
|
+
c = [...c, ...M, ...N.map((T, P) => ({ ...T, order: x + P + 1 }))];
|
|
418
420
|
});
|
|
419
|
-
}), [...
|
|
421
|
+
}), [...c, ...z.filter((m) => m.anchor === void 0)];
|
|
420
422
|
})(e.children);
|
|
421
|
-
for (var
|
|
422
|
-
const z =
|
|
423
|
-
let
|
|
423
|
+
for (var f = 0, g = s.length; f < g; f++) {
|
|
424
|
+
const z = s[f];
|
|
425
|
+
let c = !1;
|
|
424
426
|
if (z.type === A.Fill)
|
|
425
|
-
|
|
427
|
+
Re(z).forEach((m) => {
|
|
426
428
|
const R = [];
|
|
427
|
-
e.anchoredChildren(
|
|
429
|
+
e.anchoredChildren(s, m.anchor, z.zIndex).forEach((w) => {
|
|
428
430
|
w.orientation === mt.Vertical ? (w.height.size && R.push(w.height.size), w.height.resized && R.push(w.height.resized)) : (w.width.size && R.push(w.width.size), w.width.resized && R.push(w.width.resized));
|
|
429
|
-
}), m.update(R) && (
|
|
431
|
+
}), m.update(R) && (c = !0);
|
|
430
432
|
});
|
|
431
433
|
else if (z.type === A.Anchored) {
|
|
432
434
|
const m = [];
|
|
433
|
-
e.anchoredChildren(
|
|
435
|
+
e.anchoredChildren(s, z.anchor, z.zIndex).filter((S) => S.id !== z.id && S.order <= z.order).forEach((S) => {
|
|
434
436
|
S.orientation === mt.Vertical ? (S.height.size && m.push(S.height.size), S.height.resized && m.push(S.height.resized)) : (S.width.size && m.push(S.width.size), S.width.resized && m.push(S.width.resized));
|
|
435
|
-
}), z.adjustEdge(m) && (
|
|
437
|
+
}), z.adjustEdge(m) && (c = !0);
|
|
436
438
|
}
|
|
437
|
-
|
|
439
|
+
c && yt(z);
|
|
438
440
|
}
|
|
439
|
-
},
|
|
441
|
+
}, d = {
|
|
440
442
|
getSpaces: n,
|
|
441
443
|
getSpace: o,
|
|
442
444
|
addSpace: (e) => {
|
|
443
445
|
if (n().push(e), e.parentId) {
|
|
444
|
-
const
|
|
445
|
-
|
|
446
|
+
const l = o(e.parentId);
|
|
447
|
+
l && (l.children.push(e), u(l));
|
|
446
448
|
}
|
|
447
|
-
|
|
449
|
+
yt(e);
|
|
448
450
|
},
|
|
449
451
|
removeSpace: (e) => {
|
|
450
|
-
if (i(n().filter((
|
|
451
|
-
const
|
|
452
|
-
|
|
452
|
+
if (i(n().filter((l) => l.id !== e.id)), e.parentId) {
|
|
453
|
+
const l = o(e.parentId);
|
|
454
|
+
l && (l.children = l.children.filter((p) => p.id !== e.id), u(l));
|
|
453
455
|
}
|
|
454
|
-
|
|
456
|
+
be(e);
|
|
455
457
|
},
|
|
456
458
|
updateStyles: (e) => {
|
|
457
459
|
if (e.parentId) {
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
+
const l = o(e.parentId);
|
|
461
|
+
l && u(l);
|
|
460
462
|
}
|
|
461
|
-
|
|
463
|
+
yt(e);
|
|
462
464
|
},
|
|
463
|
-
updateSpace: (e,
|
|
465
|
+
updateSpace: (e, l) => {
|
|
464
466
|
const {
|
|
465
|
-
type:
|
|
466
|
-
anchor:
|
|
467
|
-
order:
|
|
468
|
-
zIndex:
|
|
467
|
+
type: p,
|
|
468
|
+
anchor: s,
|
|
469
|
+
order: f,
|
|
470
|
+
zIndex: g,
|
|
469
471
|
scrollable: z,
|
|
470
|
-
position:
|
|
472
|
+
position: c,
|
|
471
473
|
centerContent: m,
|
|
472
474
|
minimumSize: R,
|
|
473
475
|
maximumSize: S,
|
|
474
476
|
handleSize: w,
|
|
475
477
|
touchHandleSize: I,
|
|
476
|
-
handlePlacement:
|
|
477
|
-
allowOverflow:
|
|
478
|
-
} =
|
|
478
|
+
handlePlacement: M,
|
|
479
|
+
allowOverflow: N
|
|
480
|
+
} = l, x = c && c.leftResizable || !1, T = c && c.rightResizable || !1, P = c && c.topResizable || !1, k = c && c.bottomResizable || !1, E = c && c.topLeftResizable || !1, X = c && c.topRightResizable || !1, D = c && c.bottomLeftResizable || !1, ot = c && c.bottomRightResizable || !1;
|
|
479
481
|
let L = !1;
|
|
480
|
-
if (e.type !==
|
|
482
|
+
if (e.type !== p && (e.type = p, e.position = _t(p), L = !0), e.anchor !== s && (e.anchor = s, e.orientation = Nt(s), L = !0, p === A.Anchored && (s === C.Left ? e.adjustEdge = e.adjustLeft : s === C.Top ? e.adjustEdge = e.adjustTop : s === C.Right ? e.adjustEdge = e.adjustRight : s === C.Bottom && (e.adjustEdge = e.adjustBottom))), e.left.size !== (c && c.left) && (e.left.size = c && c.left, e.left.resized = 0, e.left.adjusted = [], L = !0), e.right.size !== (c && c.right) && (e.right.size = c && c.right, e.right.resized = 0, e.right.adjusted = [], L = !0), e.top.size !== (c && c.top) && (e.top.size = c && c.top, e.top.resized = 0, e.top.adjusted = [], L = !0), e.bottom.size !== (c && c.bottom) && (e.bottom.size = c && c.bottom, e.bottom.resized = 0, e.bottom.adjusted = [], L = !0), e.width.size !== (c && c.width) && (e.width.size = c && c.width, e.width.resized = 0, e.width.adjusted = [], L = !0), e.height.size !== (c && c.height) && (e.height.size = c && c.height, e.height.resized = 0, e.height.adjusted = [], L = !0), Z(e.order, 0) !== Z(f, 0) && (e.order = Z(f, 0), L = !0), Z(e.zIndex, 0) !== Z(g, 0) && (e.zIndex = Z(g, 0), L = !0), Z(e.scrollable, !1) !== Z(z, !1) && (e.scrollable = Z(z, !1), L = !0), e.minimumSize !== R && (e.minimumSize = R, L = !0), e.maximumSize !== S && (e.maximumSize = S, L = !0), Z(e.centerContent, st.None) !== Z(m, st.None) && (e.centerContent = Z(m, st.None), L = !0), e.handleSize !== w && (e.handleSize = w || bt.handleSize, L = !0), e.touchHandleSize !== I && (e.touchHandleSize = I || bt.touchHandleSize, L = !0), e.handlePlacement !== M && (e.handlePlacement = M || bt.handlePlacement, L = !0), e.canResizeBottom !== k && (e.canResizeBottom = k, L = !0), e.canResizeTop !== P && (e.canResizeTop = P, L = !0), e.canResizeLeft !== x && (e.canResizeLeft = x, L = !0), e.canResizeRight !== T && (e.canResizeRight = T, L = !0), e.canResizeTopLeft !== E && (e.canResizeTopLeft = E, L = !0), e.canResizeTopRight !== X && (e.canResizeTopRight = X, L = !0), e.canResizeBottomLeft !== D && (e.canResizeBottomLeft = D, L = !0), e.canResizeBottomRight !== ot && (e.canResizeBottomRight = ot, L = !0), e.allowOverflow !== N && (e.allowOverflow = N || bt.allowOverflow, L = !0), L) {
|
|
481
483
|
if (e.parentId) {
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
+
const q = o(e.parentId);
|
|
485
|
+
q && u(q);
|
|
484
486
|
}
|
|
485
|
-
|
|
487
|
+
yt(e);
|
|
486
488
|
}
|
|
487
489
|
},
|
|
488
490
|
createSpace: () => ({}),
|
|
@@ -490,332 +492,332 @@ function fe() {
|
|
|
490
492
|
startTouchResize: () => null,
|
|
491
493
|
startMouseDrag: () => null,
|
|
492
494
|
startTouchDrag: () => null
|
|
493
|
-
},
|
|
494
|
-
return
|
|
495
|
-
const { position:
|
|
495
|
+
}, r = ze(d), b = we(d);
|
|
496
|
+
return d.createSpace = (e, l, p) => {
|
|
497
|
+
const { position: s, anchor: f, type: g, ...z } = l, c = s && s.rightResizable || !1, m = s && s.leftResizable || !1, R = s && s.bottomResizable || !1, S = s && s.topResizable || !1, w = s && s.topLeftResizable || !1, I = s && s.topRightResizable || !1, M = s && s.bottomLeftResizable || !1, N = s && s.bottomRightResizable || !1, x = {
|
|
496
498
|
...bt,
|
|
497
499
|
...z,
|
|
498
|
-
store:
|
|
499
|
-
update:
|
|
500
|
+
store: d,
|
|
501
|
+
update: p,
|
|
500
502
|
updateParent: () => {
|
|
501
503
|
if (e) {
|
|
502
|
-
const T =
|
|
504
|
+
const T = d.getSpace(e);
|
|
503
505
|
T && T.update();
|
|
504
506
|
}
|
|
505
507
|
},
|
|
506
508
|
parentId: e,
|
|
507
509
|
children: [],
|
|
508
|
-
anchor:
|
|
509
|
-
type:
|
|
510
|
-
orientation:
|
|
511
|
-
position:
|
|
512
|
-
left: ut(
|
|
513
|
-
right: ut(
|
|
514
|
-
top: ut(
|
|
515
|
-
bottom: ut(
|
|
516
|
-
width: ut(
|
|
517
|
-
height: ut(
|
|
518
|
-
canResizeLeft:
|
|
510
|
+
anchor: f,
|
|
511
|
+
type: g,
|
|
512
|
+
orientation: Nt(f),
|
|
513
|
+
position: _t(g),
|
|
514
|
+
left: ut(s && s.left),
|
|
515
|
+
right: ut(s && s.right),
|
|
516
|
+
top: ut(s && s.top),
|
|
517
|
+
bottom: ut(s && s.bottom),
|
|
518
|
+
width: ut(s && s.width),
|
|
519
|
+
height: ut(s && s.height),
|
|
520
|
+
canResizeLeft: c,
|
|
519
521
|
canResizeRight: m,
|
|
520
522
|
canResizeTop: R,
|
|
521
523
|
canResizeBottom: S,
|
|
522
524
|
canResizeTopLeft: w,
|
|
523
525
|
canResizeTopRight: I,
|
|
524
|
-
canResizeBottomLeft:
|
|
525
|
-
canResizeBottomRight:
|
|
526
|
+
canResizeBottomLeft: M,
|
|
527
|
+
canResizeBottomRight: N
|
|
526
528
|
};
|
|
527
|
-
return x.anchoredChildren = (T,
|
|
528
|
-
},
|
|
529
|
-
|
|
530
|
-
|
|
529
|
+
return x.anchoredChildren = (T, P, k) => T.filter((E) => E.type === A.Anchored && E.anchor === P && E.zIndex === k), x.adjustLeft = (T) => Ct(x.left.adjusted, T) ? !1 : (x.left.adjusted = T, !0), x.adjustRight = (T) => Ct(x.right.adjusted, T) ? !1 : (x.right.adjusted = T, !0), x.adjustTop = (T) => Ct(x.top.adjusted, T) ? !1 : (x.top.adjusted = T, !0), x.adjustBottom = (T) => Ct(x.bottom.adjusted, T) ? !1 : (x.bottom.adjusted = T, !0), g === A.Anchored && (f === C.Left ? x.adjustEdge = x.adjustLeft : f === C.Top ? x.adjustEdge = x.adjustTop : f === C.Right ? x.adjustEdge = x.adjustRight : f === C.Bottom && (x.adjustEdge = x.adjustBottom)), x;
|
|
530
|
+
}, d.startMouseResize = (e, l, p, s) => {
|
|
531
|
+
r.startResize(
|
|
532
|
+
p,
|
|
531
533
|
e,
|
|
532
|
-
|
|
534
|
+
l,
|
|
533
535
|
wt.Mouse,
|
|
534
536
|
zt.Mouse,
|
|
535
|
-
(
|
|
536
|
-
x:
|
|
537
|
-
y:
|
|
537
|
+
(f) => ({
|
|
538
|
+
x: f.clientX,
|
|
539
|
+
y: f.clientY
|
|
538
540
|
}),
|
|
539
|
-
|
|
541
|
+
s
|
|
540
542
|
);
|
|
541
|
-
},
|
|
542
|
-
|
|
543
|
-
|
|
543
|
+
}, d.startTouchResize = (e, l, p, s) => {
|
|
544
|
+
r.startResize(
|
|
545
|
+
p,
|
|
544
546
|
e,
|
|
545
|
-
|
|
547
|
+
l,
|
|
546
548
|
wt.Touch,
|
|
547
549
|
zt.Touch,
|
|
548
|
-
(
|
|
549
|
-
x:
|
|
550
|
-
y:
|
|
550
|
+
(f) => ({
|
|
551
|
+
x: f.touches[0].clientX,
|
|
552
|
+
y: f.touches[0].clientY
|
|
551
553
|
}),
|
|
552
|
-
|
|
554
|
+
s
|
|
553
555
|
);
|
|
554
|
-
},
|
|
555
|
-
|
|
556
|
-
|
|
556
|
+
}, d.startMouseDrag = (e, l, p) => {
|
|
557
|
+
b.startDrag(
|
|
558
|
+
l,
|
|
557
559
|
e,
|
|
558
560
|
wt.Mouse,
|
|
559
561
|
zt.Mouse,
|
|
560
|
-
(
|
|
561
|
-
x:
|
|
562
|
-
y:
|
|
562
|
+
(s) => ({
|
|
563
|
+
x: s.clientX,
|
|
564
|
+
y: s.clientY
|
|
563
565
|
}),
|
|
564
|
-
|
|
566
|
+
p
|
|
565
567
|
);
|
|
566
|
-
},
|
|
567
|
-
|
|
568
|
-
|
|
568
|
+
}, d.startTouchDrag = (e, l, p) => {
|
|
569
|
+
b.startDrag(
|
|
570
|
+
l,
|
|
569
571
|
e,
|
|
570
572
|
wt.Touch,
|
|
571
573
|
zt.Touch,
|
|
572
|
-
(
|
|
573
|
-
x:
|
|
574
|
-
y:
|
|
574
|
+
(s) => ({
|
|
575
|
+
x: s.touches[0].clientX,
|
|
576
|
+
y: s.touches[0].clientY
|
|
575
577
|
}),
|
|
576
|
-
|
|
578
|
+
p
|
|
577
579
|
);
|
|
578
|
-
},
|
|
580
|
+
}, d;
|
|
579
581
|
}
|
|
580
|
-
const
|
|
581
|
-
const i = it(void 0), o = it(!1), n = it(!1), [
|
|
582
|
-
o.current && (n.current = !0), et(() => (o.current || (i.current = t(), o.current = !0),
|
|
582
|
+
const Ut = (t) => {
|
|
583
|
+
const i = it(void 0), o = it(!1), n = it(!1), [u, d] = U(0);
|
|
584
|
+
o.current && (n.current = !0), et(() => (o.current || (i.current = t(), o.current = !0), d((r) => r + 1), () => {
|
|
583
585
|
n.current && i.current && i.current();
|
|
584
586
|
}), []);
|
|
585
|
-
}, jt =
|
|
586
|
-
id:
|
|
587
|
-
className:
|
|
588
|
-
style:
|
|
589
|
-
as:
|
|
590
|
-
centerContent:
|
|
591
|
-
zIndex:
|
|
592
|
-
scrollable:
|
|
593
|
-
trackSize:
|
|
594
|
-
allowOverflow:
|
|
595
|
-
handleRender:
|
|
596
|
-
onClick:
|
|
597
|
-
onDoubleClick:
|
|
598
|
-
onMouseDown:
|
|
599
|
-
onMouseEnter:
|
|
600
|
-
onMouseLeave:
|
|
601
|
-
onMouseMove:
|
|
602
|
-
onTouchStart:
|
|
603
|
-
onTouchMove:
|
|
604
|
-
onTouchEnd:
|
|
587
|
+
}, jt = O.createContext(void 0), Bt = O.createContext(void 0), At = O.createContext(void 0), Xt = O.createContext({}), Gt = ve(), vt = {
|
|
588
|
+
id: h.string,
|
|
589
|
+
className: h.string,
|
|
590
|
+
style: h.oneOfType([h.object, h.array]),
|
|
591
|
+
as: h.any,
|
|
592
|
+
centerContent: h.oneOf([st.None, st.Vertical, st.HorizontalVertical]),
|
|
593
|
+
zIndex: h.number,
|
|
594
|
+
scrollable: h.bool,
|
|
595
|
+
trackSize: h.bool,
|
|
596
|
+
allowOverflow: h.bool,
|
|
597
|
+
handleRender: h.func,
|
|
598
|
+
onClick: h.func,
|
|
599
|
+
onDoubleClick: h.func,
|
|
600
|
+
onMouseDown: h.func,
|
|
601
|
+
onMouseEnter: h.func,
|
|
602
|
+
onMouseLeave: h.func,
|
|
603
|
+
onMouseMove: h.func,
|
|
604
|
+
onTouchStart: h.func,
|
|
605
|
+
onTouchMove: h.func,
|
|
606
|
+
onTouchEnd: h.func
|
|
605
607
|
};
|
|
606
|
-
function
|
|
607
|
-
const [, t] =
|
|
608
|
-
return
|
|
608
|
+
function Se() {
|
|
609
|
+
const [, t] = O.useState(0);
|
|
610
|
+
return O.useCallback(() => {
|
|
609
611
|
t((i) => i + 1);
|
|
610
612
|
}, []);
|
|
611
613
|
}
|
|
612
|
-
function
|
|
614
|
+
function Jt() {
|
|
613
615
|
if (ft) {
|
|
614
|
-
if (
|
|
615
|
-
return `s${
|
|
616
|
-
if (typeof
|
|
617
|
-
return `s${
|
|
616
|
+
if (O.version && O.version.startsWith("18"))
|
|
617
|
+
return `s${O.useId().replace(/\:/g, "")}`;
|
|
618
|
+
if (typeof O.useId == "function")
|
|
619
|
+
return `s${O.useId().replace(/\:/g, "")}`;
|
|
618
620
|
}
|
|
619
|
-
return `s${
|
|
621
|
+
return `s${fe()}`;
|
|
620
622
|
}
|
|
621
|
-
function
|
|
622
|
-
const i =
|
|
623
|
-
let
|
|
624
|
-
|
|
625
|
-
const
|
|
623
|
+
function Te(t) {
|
|
624
|
+
const i = Gt, o = Se(), n = O.useContext(jt), u = O.useContext(At), { debug: d } = O.useContext(Xt), r = Jt(), [b] = O.useState(t.id || r), e = O.useRef(null), l = O.useRef(void 0), [p, s] = O.useState();
|
|
625
|
+
let f = i.getSpace(b);
|
|
626
|
+
d && console.table(i.getSpaces());
|
|
627
|
+
const g = {
|
|
626
628
|
...t,
|
|
627
|
-
id:
|
|
628
|
-
zIndex: Z(t.zIndex,
|
|
629
|
+
id: b,
|
|
630
|
+
zIndex: Z(t.zIndex, u)
|
|
629
631
|
};
|
|
630
|
-
|
|
631
|
-
const z =
|
|
632
|
-
return
|
|
633
|
-
const
|
|
634
|
-
return
|
|
635
|
-
...
|
|
636
|
-
left: Math.floor(
|
|
637
|
-
top: Math.floor(
|
|
638
|
-
right: Math.floor(
|
|
639
|
-
bottom: Math.floor(
|
|
640
|
-
width: Math.floor(
|
|
641
|
-
height: Math.floor(
|
|
642
|
-
x: Math.floor(
|
|
643
|
-
y: Math.floor(
|
|
644
|
-
},
|
|
645
|
-
|
|
646
|
-
...
|
|
632
|
+
f ? i.updateSpace(f, g) : (f = i.createSpace(n, g, o), i.addSpace(f));
|
|
633
|
+
const z = Ce(i, f);
|
|
634
|
+
return Ut(() => {
|
|
635
|
+
const c = e.current ? e.current.getBoundingClientRect() : new DOMRect();
|
|
636
|
+
return f.dimension = {
|
|
637
|
+
...c,
|
|
638
|
+
left: Math.floor(c.left),
|
|
639
|
+
top: Math.floor(c.top),
|
|
640
|
+
right: Math.floor(c.right),
|
|
641
|
+
bottom: Math.floor(c.bottom),
|
|
642
|
+
width: Math.floor(c.width),
|
|
643
|
+
height: Math.floor(c.height),
|
|
644
|
+
x: Math.floor(c.x),
|
|
645
|
+
y: Math.floor(c.y)
|
|
646
|
+
}, s(f.dimension), t.trackSize && (l.current = new ne(e.current, (m) => {
|
|
647
|
+
f.dimension = {
|
|
648
|
+
...c,
|
|
647
649
|
width: Math.floor(m.width),
|
|
648
650
|
height: Math.floor(m.height)
|
|
649
|
-
},
|
|
651
|
+
}, s(f.dimension);
|
|
650
652
|
})), () => {
|
|
651
|
-
|
|
653
|
+
l.current && l.current.detach(), i.removeSpace(f);
|
|
652
654
|
};
|
|
653
|
-
}), { space:
|
|
655
|
+
}), { space: f, resizeHandles: z, domRect: p, elementRef: e };
|
|
654
656
|
}
|
|
655
|
-
const
|
|
656
|
-
{ id: "ml", className: "resize-left", resizeType:
|
|
657
|
-
{ id: "mr", className: "resize-right", resizeType:
|
|
658
|
-
{ id: "mt", className: "resize-top", resizeType:
|
|
659
|
-
{ id: "mb", className: "resize-bottom", resizeType:
|
|
660
|
-
{ id: "mtl", className: "resize-top-left", resizeType:
|
|
661
|
-
{ id: "mtr", className: "resize-top-right", resizeType:
|
|
657
|
+
const xe = [
|
|
658
|
+
{ id: "ml", className: "resize-left", resizeType: y.Left, condition: (t) => t.canResizeLeft },
|
|
659
|
+
{ id: "mr", className: "resize-right", resizeType: y.Right, condition: (t) => t.canResizeRight },
|
|
660
|
+
{ id: "mt", className: "resize-top", resizeType: y.Top, condition: (t) => t.canResizeTop },
|
|
661
|
+
{ id: "mb", className: "resize-bottom", resizeType: y.Bottom, condition: (t) => t.canResizeBottom },
|
|
662
|
+
{ id: "mtl", className: "resize-top-left", resizeType: y.TopLeft, condition: (t) => t.canResizeTopLeft },
|
|
663
|
+
{ id: "mtr", className: "resize-top-right", resizeType: y.TopRight, condition: (t) => t.canResizeTopRight },
|
|
662
664
|
{
|
|
663
665
|
id: "mbl",
|
|
664
666
|
className: "resize-bottom-left",
|
|
665
|
-
resizeType:
|
|
667
|
+
resizeType: y.BottomLeft,
|
|
666
668
|
condition: (t) => t.canResizeBottomLeft
|
|
667
669
|
},
|
|
668
670
|
{
|
|
669
671
|
id: "mbr",
|
|
670
672
|
className: "resize-bottom-right",
|
|
671
|
-
resizeType:
|
|
673
|
+
resizeType: y.BottomRight,
|
|
672
674
|
condition: (t) => t.canResizeBottomRight
|
|
673
675
|
}
|
|
674
676
|
];
|
|
675
|
-
function
|
|
676
|
-
const o = [], n = (
|
|
677
|
+
function Ce(t, i) {
|
|
678
|
+
const o = [], n = (u, d, r) => {
|
|
677
679
|
o.push({
|
|
678
|
-
id: `${i.id}-${
|
|
679
|
-
key:
|
|
680
|
-
className: `spaces-resize-handle ${
|
|
681
|
-
onMouseDown: (
|
|
682
|
-
onTouchStart: (
|
|
680
|
+
id: `${i.id}-${u}`,
|
|
681
|
+
key: u,
|
|
682
|
+
className: `spaces-resize-handle ${d}`,
|
|
683
|
+
onMouseDown: (b) => t.startMouseResize(r, i, b),
|
|
684
|
+
onTouchStart: (b) => t.startTouchResize(r, i, b)
|
|
683
685
|
});
|
|
684
686
|
};
|
|
685
|
-
return
|
|
686
|
-
|
|
687
|
+
return xe.forEach((u) => {
|
|
688
|
+
u.condition(i) && n(u.id, u.className, u.resizeType);
|
|
687
689
|
}), {
|
|
688
690
|
mouseHandles: o
|
|
689
691
|
};
|
|
690
692
|
}
|
|
691
|
-
function
|
|
692
|
-
const t =
|
|
693
|
-
(
|
|
693
|
+
function pi() {
|
|
694
|
+
const t = Gt, i = O.useContext(jt), o = i ? t.getSpace(i) : void 0, n = O.useContext(Bt), u = O.useContext(At), d = O.useCallback(
|
|
695
|
+
(p, s) => o ? t.startMouseDrag(o, p, s) : null,
|
|
694
696
|
[i]
|
|
695
|
-
),
|
|
696
|
-
(
|
|
697
|
+
), r = O.useCallback(
|
|
698
|
+
(p, s) => o ? t.startTouchDrag(o, p, s) : null,
|
|
697
699
|
[i]
|
|
698
|
-
),
|
|
700
|
+
), b = O.useCallback(() => o ? t.updateStyles(o) : null, [i]);
|
|
699
701
|
return {
|
|
700
702
|
size: {
|
|
701
703
|
...{ width: 0, height: 0, x: 0, y: 0 },
|
|
702
704
|
...n
|
|
703
705
|
},
|
|
704
|
-
layer:
|
|
705
|
-
startMouseDrag:
|
|
706
|
-
startTouchDrag:
|
|
707
|
-
forceUpdate:
|
|
706
|
+
layer: u || 0,
|
|
707
|
+
startMouseDrag: d,
|
|
708
|
+
startTouchDrag: r,
|
|
709
|
+
forceUpdate: b
|
|
708
710
|
};
|
|
709
711
|
}
|
|
710
712
|
let ft = !1;
|
|
711
|
-
function
|
|
713
|
+
function zi() {
|
|
712
714
|
ft = !0;
|
|
713
715
|
}
|
|
714
|
-
const
|
|
715
|
-
function
|
|
716
|
+
const Ae = (t) => /* @__PURE__ */ a("div", { className: "spaces-centered", children: t.children }), Le = (t) => /* @__PURE__ */ a("div", { className: "spaces-centered-vertically", children: t.children });
|
|
717
|
+
function $e(t, i) {
|
|
716
718
|
switch (i) {
|
|
717
719
|
case st.Vertical:
|
|
718
|
-
return /* @__PURE__ */
|
|
720
|
+
return /* @__PURE__ */ a(Le, { children: t });
|
|
719
721
|
case st.HorizontalVertical:
|
|
720
|
-
return /* @__PURE__ */
|
|
722
|
+
return /* @__PURE__ */ a(Ae, { children: t });
|
|
721
723
|
}
|
|
722
724
|
return t;
|
|
723
725
|
}
|
|
724
|
-
class K extends
|
|
726
|
+
class K extends O.Component {
|
|
725
727
|
_react_spaces_uniqueid;
|
|
726
728
|
render() {
|
|
727
|
-
return /* @__PURE__ */
|
|
729
|
+
return /* @__PURE__ */ a(Me, { ...this.props, wrapperInstance: this });
|
|
728
730
|
}
|
|
729
731
|
}
|
|
730
|
-
const
|
|
732
|
+
const Me = (t) => {
|
|
731
733
|
let i = t.id ?? t.wrapperInstance._react_spaces_uniqueid;
|
|
732
|
-
const [o, n] =
|
|
733
|
-
i || (t.wrapperInstance._react_spaces_uniqueid =
|
|
734
|
+
const [o, n] = O.useState(!!ft), u = Jt();
|
|
735
|
+
i || (t.wrapperInstance._react_spaces_uniqueid = u, i = t.wrapperInstance._react_spaces_uniqueid);
|
|
734
736
|
const {
|
|
735
|
-
style:
|
|
736
|
-
className:
|
|
737
|
-
onClick:
|
|
737
|
+
style: d,
|
|
738
|
+
className: r,
|
|
739
|
+
onClick: b,
|
|
738
740
|
onDoubleClick: e,
|
|
739
|
-
onMouseDown:
|
|
740
|
-
onMouseEnter:
|
|
741
|
-
onMouseLeave:
|
|
742
|
-
onMouseMove:
|
|
743
|
-
onTouchStart:
|
|
741
|
+
onMouseDown: l,
|
|
742
|
+
onMouseEnter: p,
|
|
743
|
+
onMouseLeave: s,
|
|
744
|
+
onMouseMove: f,
|
|
745
|
+
onTouchStart: g,
|
|
744
746
|
onTouchMove: z,
|
|
745
|
-
onTouchEnd:
|
|
747
|
+
onTouchEnd: c,
|
|
746
748
|
children: m,
|
|
747
749
|
handleRender: R
|
|
748
750
|
} = t, S = {
|
|
749
|
-
onClick:
|
|
751
|
+
onClick: b,
|
|
750
752
|
onDoubleClick: e,
|
|
751
|
-
onMouseDown:
|
|
752
|
-
onMouseEnter:
|
|
753
|
-
onMouseLeave:
|
|
754
|
-
onMouseMove:
|
|
755
|
-
onTouchStart:
|
|
753
|
+
onMouseDown: l,
|
|
754
|
+
onMouseEnter: p,
|
|
755
|
+
onMouseLeave: s,
|
|
756
|
+
onMouseMove: f,
|
|
757
|
+
onTouchStart: g,
|
|
756
758
|
onTouchMove: z,
|
|
757
|
-
onTouchEnd:
|
|
758
|
-
}, { space: w, domRect: I, elementRef:
|
|
759
|
+
onTouchEnd: c
|
|
760
|
+
}, { space: w, domRect: I, elementRef: M, resizeHandles: N } = Te({
|
|
759
761
|
...t,
|
|
760
762
|
id: i
|
|
761
763
|
});
|
|
762
|
-
if (ft && !
|
|
764
|
+
if (ft && !qt()) {
|
|
763
765
|
const D = document.getElementById(`style_${i}_ssr`);
|
|
764
|
-
D && (w.ssrStyle = D.innerHTML),
|
|
766
|
+
D && (w.ssrStyle = D.innerHTML), yt(w);
|
|
765
767
|
}
|
|
766
|
-
|
|
767
|
-
w.element =
|
|
768
|
+
Ut(() => {
|
|
769
|
+
w.element = M.current, ft && o && n(!1);
|
|
768
770
|
});
|
|
769
|
-
const x =
|
|
771
|
+
const x = r ? r.split(" ").map((D) => D.trim()) : [], T = [
|
|
770
772
|
"spaces-space",
|
|
771
773
|
w.children.find((D) => D.resizing) ? "spaces-resizing" : void 0,
|
|
772
774
|
w.type === A.Fixed ? "spaces-fixedsize-layout" : void 0,
|
|
773
775
|
w.type === A.ViewPort ? "spaces-fullpage-layout" : void 0,
|
|
774
776
|
...x.map((D) => `${D}-container`)
|
|
775
|
-
].filter((D) => D),
|
|
776
|
-
let k =
|
|
777
|
+
].filter((D) => D), P = ["spaces-space-inner", ...x];
|
|
778
|
+
let k = d;
|
|
777
779
|
w.handlePlacement === rt.Inside && (k = {
|
|
778
|
-
...
|
|
780
|
+
...d,
|
|
779
781
|
left: w.anchor === C.Right ? w.handleSize : void 0,
|
|
780
782
|
right: w.anchor === C.Left ? w.handleSize : void 0,
|
|
781
783
|
top: w.anchor === C.Bottom ? w.handleSize : void 0,
|
|
782
784
|
bottom: w.anchor === C.Top ? w.handleSize : void 0
|
|
783
785
|
});
|
|
784
|
-
const
|
|
786
|
+
const E = $e(m, t.centerContent), X = {
|
|
785
787
|
id: w.id,
|
|
786
|
-
ref:
|
|
788
|
+
ref: M,
|
|
787
789
|
className: T.join(" "),
|
|
788
790
|
...S
|
|
789
791
|
};
|
|
790
|
-
return /* @__PURE__ */
|
|
791
|
-
|
|
792
|
-
ft && w.ssrStyle && o && /* @__PURE__ */
|
|
793
|
-
|
|
792
|
+
return /* @__PURE__ */ F(Et, { children: [
|
|
793
|
+
N.mouseHandles.map((D) => R?.(D) || /* @__PURE__ */ a("div", { ...D })),
|
|
794
|
+
ft && w.ssrStyle && o && /* @__PURE__ */ a("style", { id: `style_${w.id}_ssr`, children: w.ssrStyle }),
|
|
795
|
+
O.createElement(
|
|
794
796
|
t.as || "div",
|
|
795
|
-
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
+
X,
|
|
798
|
+
/* @__PURE__ */ a("div", { className: P.join(" "), style: k, children: /* @__PURE__ */ a(jt.Provider, { value: w.id, children: /* @__PURE__ */ a(At.Provider, { value: void 0, children: /* @__PURE__ */ a(Bt.Provider, { value: I, children: E }) }) }) })
|
|
797
799
|
)
|
|
798
800
|
] });
|
|
799
801
|
}, St = {
|
|
800
|
-
...
|
|
801
|
-
size:
|
|
802
|
-
order:
|
|
803
|
-
handleSize:
|
|
804
|
-
touchHandleSize:
|
|
805
|
-
handlePlacement:
|
|
802
|
+
...vt,
|
|
803
|
+
size: h.oneOfType([h.string, h.number]).isRequired,
|
|
804
|
+
order: h.number,
|
|
805
|
+
handleSize: h.number,
|
|
806
|
+
touchHandleSize: h.number,
|
|
807
|
+
handlePlacement: h.oneOf([
|
|
806
808
|
rt.Inside,
|
|
807
809
|
rt.OverlayBoundary,
|
|
808
810
|
rt.OverlayInside
|
|
809
811
|
]),
|
|
810
|
-
handleRender:
|
|
811
|
-
minimumSize:
|
|
812
|
-
maximumSize:
|
|
813
|
-
onResizeStart:
|
|
814
|
-
onResizeEnd:
|
|
812
|
+
handleRender: h.func,
|
|
813
|
+
minimumSize: h.number,
|
|
814
|
+
maximumSize: h.number,
|
|
815
|
+
onResizeStart: h.func,
|
|
816
|
+
onResizeEnd: h.func
|
|
815
817
|
}, Tt = {
|
|
816
818
|
...St,
|
|
817
|
-
resizable:
|
|
818
|
-
},
|
|
819
|
+
resizable: h.bool
|
|
820
|
+
}, je = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
|
|
819
821
|
K,
|
|
820
822
|
{
|
|
821
823
|
...o,
|
|
@@ -825,8 +827,8 @@ const ve = (t) => {
|
|
|
825
827
|
children: t
|
|
826
828
|
}
|
|
827
829
|
);
|
|
828
|
-
|
|
829
|
-
const
|
|
830
|
+
je.propTypes = St;
|
|
831
|
+
const Be = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
|
|
830
832
|
K,
|
|
831
833
|
{
|
|
832
834
|
...n,
|
|
@@ -836,8 +838,8 @@ const Se = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ c(
|
|
|
836
838
|
children: i
|
|
837
839
|
}
|
|
838
840
|
);
|
|
839
|
-
|
|
840
|
-
const
|
|
841
|
+
Be.propTypes = Tt;
|
|
842
|
+
const Ie = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
|
|
841
843
|
K,
|
|
842
844
|
{
|
|
843
845
|
...o,
|
|
@@ -847,8 +849,8 @@ const Te = ({ children: t, size: i, ...o }) => /* @__PURE__ */ c(
|
|
|
847
849
|
children: t
|
|
848
850
|
}
|
|
849
851
|
);
|
|
850
|
-
|
|
851
|
-
const
|
|
852
|
+
Ie.propTypes = St;
|
|
853
|
+
const Oe = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
|
|
852
854
|
K,
|
|
853
855
|
{
|
|
854
856
|
...n,
|
|
@@ -858,8 +860,8 @@ const xe = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ c(
|
|
|
858
860
|
children: i
|
|
859
861
|
}
|
|
860
862
|
);
|
|
861
|
-
|
|
862
|
-
const
|
|
863
|
+
Oe.propTypes = Tt;
|
|
864
|
+
const De = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
|
|
863
865
|
K,
|
|
864
866
|
{
|
|
865
867
|
...o,
|
|
@@ -869,8 +871,8 @@ const Ce = ({ children: t, size: i, ...o }) => /* @__PURE__ */ c(
|
|
|
869
871
|
children: t
|
|
870
872
|
}
|
|
871
873
|
);
|
|
872
|
-
|
|
873
|
-
const
|
|
874
|
+
De.propTypes = St;
|
|
875
|
+
const _e = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
|
|
874
876
|
K,
|
|
875
877
|
{
|
|
876
878
|
...n,
|
|
@@ -880,8 +882,8 @@ const Ae = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ c(
|
|
|
880
882
|
children: i
|
|
881
883
|
}
|
|
882
884
|
);
|
|
883
|
-
|
|
884
|
-
const
|
|
885
|
+
_e.propTypes = Tt;
|
|
886
|
+
const Ne = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
|
|
885
887
|
K,
|
|
886
888
|
{
|
|
887
889
|
...o,
|
|
@@ -891,8 +893,8 @@ const Le = ({ children: t, size: i, ...o }) => /* @__PURE__ */ c(
|
|
|
891
893
|
children: t
|
|
892
894
|
}
|
|
893
895
|
);
|
|
894
|
-
|
|
895
|
-
const
|
|
896
|
+
Ne.propTypes = St;
|
|
897
|
+
const Pe = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
|
|
896
898
|
K,
|
|
897
899
|
{
|
|
898
900
|
...n,
|
|
@@ -902,297 +904,297 @@ const $e = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ c(
|
|
|
902
904
|
children: i
|
|
903
905
|
}
|
|
904
906
|
);
|
|
905
|
-
|
|
906
|
-
const
|
|
907
|
+
Pe.propTypes = Tt;
|
|
908
|
+
const Ee = ue(
|
|
907
909
|
{
|
|
908
910
|
...Tt,
|
|
909
|
-
type:
|
|
910
|
-
anchor:
|
|
911
|
-
anchorSize:
|
|
912
|
-
left:
|
|
913
|
-
top:
|
|
914
|
-
right:
|
|
915
|
-
bottom:
|
|
916
|
-
width:
|
|
917
|
-
height:
|
|
918
|
-
resizeTypes:
|
|
911
|
+
type: h.oneOf([A.Positioned, A.Fill, A.Anchored]),
|
|
912
|
+
anchor: h.oneOf([C.Left, C.Top, C.Right, C.Bottom]),
|
|
913
|
+
anchorSize: h.oneOfType([h.string, h.number]),
|
|
914
|
+
left: h.oneOfType([h.string, h.number]),
|
|
915
|
+
top: h.oneOfType([h.string, h.number]),
|
|
916
|
+
right: h.oneOfType([h.string, h.number]),
|
|
917
|
+
bottom: h.oneOfType([h.string, h.number]),
|
|
918
|
+
width: h.oneOfType([h.string, h.number]),
|
|
919
|
+
height: h.oneOfType([h.string, h.number]),
|
|
920
|
+
resizeTypes: h.array
|
|
919
921
|
},
|
|
920
922
|
"size"
|
|
921
|
-
),
|
|
923
|
+
), ke = ({
|
|
922
924
|
children: t,
|
|
923
925
|
type: i,
|
|
924
926
|
left: o,
|
|
925
927
|
top: n,
|
|
926
|
-
right:
|
|
927
|
-
bottom:
|
|
928
|
-
width:
|
|
929
|
-
height:
|
|
928
|
+
right: u,
|
|
929
|
+
bottom: d,
|
|
930
|
+
width: r,
|
|
931
|
+
height: b,
|
|
930
932
|
anchorSize: e,
|
|
931
|
-
anchor:
|
|
932
|
-
resizable:
|
|
933
|
-
resizeTypes:
|
|
934
|
-
...
|
|
933
|
+
anchor: l,
|
|
934
|
+
resizable: p,
|
|
935
|
+
resizeTypes: s,
|
|
936
|
+
...f
|
|
935
937
|
}) => {
|
|
936
|
-
let
|
|
937
|
-
return i = i || A.Fill, i === A.Positioned ?
|
|
938
|
+
let g;
|
|
939
|
+
return i = i || A.Fill, i === A.Positioned ? g = {
|
|
938
940
|
left: o,
|
|
939
941
|
top: n,
|
|
940
|
-
right:
|
|
941
|
-
bottom:
|
|
942
|
-
width:
|
|
943
|
-
height:
|
|
944
|
-
leftResizable:
|
|
945
|
-
topResizable:
|
|
946
|
-
rightResizable:
|
|
947
|
-
bottomResizable:
|
|
948
|
-
topLeftResizable:
|
|
949
|
-
topRightResizable:
|
|
950
|
-
bottomLeftResizable:
|
|
951
|
-
bottomRightResizable:
|
|
952
|
-
} :
|
|
942
|
+
right: u,
|
|
943
|
+
bottom: d,
|
|
944
|
+
width: r,
|
|
945
|
+
height: b,
|
|
946
|
+
leftResizable: s && (s.includes(y.Left) || s.includes(y.All)),
|
|
947
|
+
topResizable: s && (s.includes(y.Top) || s.includes(y.All)),
|
|
948
|
+
rightResizable: s && (s.includes(y.Right) || s.includes(y.All)),
|
|
949
|
+
bottomResizable: s && (s.includes(y.Bottom) || s.includes(y.All)),
|
|
950
|
+
topLeftResizable: s && (s.includes(y.TopLeft) || s.includes(y.All)),
|
|
951
|
+
topRightResizable: s && (s.includes(y.TopRight) || s.includes(y.All)),
|
|
952
|
+
bottomLeftResizable: s && (s.includes(y.BottomLeft) || s.includes(y.All)),
|
|
953
|
+
bottomRightResizable: s && (s.includes(y.BottomRight) || s.includes(y.All))
|
|
954
|
+
} : l === C.Left ? (g = { left: 0, top: 0, bottom: 0, width: e, rightResizable: p }, i = A.Anchored) : l === C.Right ? (g = { right: 0, top: 0, bottom: 0, width: e, leftResizable: p }, i = A.Anchored) : l === C.Top ? (g = { left: 0, top: 0, right: 0, height: e, bottomResizable: p }, i = A.Anchored) : l === C.Bottom ? (g = { left: 0, bottom: 0, right: 0, height: e, topResizable: p }, i = A.Anchored) : (g = {
|
|
953
955
|
left: 0,
|
|
954
956
|
top: 0,
|
|
955
957
|
bottom: 0,
|
|
956
958
|
right: 0
|
|
957
|
-
}, i = A.Fill), /* @__PURE__ */
|
|
959
|
+
}, i = A.Fill), /* @__PURE__ */ a(K, { ...f, type: i, anchor: l, position: g, children: t });
|
|
958
960
|
};
|
|
959
|
-
|
|
960
|
-
const
|
|
961
|
-
|
|
962
|
-
const
|
|
963
|
-
|
|
964
|
-
...
|
|
965
|
-
width:
|
|
966
|
-
height:
|
|
961
|
+
ke.propTypes = Ee;
|
|
962
|
+
const He = (t) => /* @__PURE__ */ a(K, { ...t, type: A.Fill, position: { left: 0, top: 0, right: 0, bottom: 0 }, children: t.children });
|
|
963
|
+
He.propTypes = vt;
|
|
964
|
+
const We = ({ width: t, height: i, children: o, ...n }) => /* @__PURE__ */ a(K, { ...n, type: A.Fixed, position: { width: t, height: i }, children: o });
|
|
965
|
+
We.propTypes = {
|
|
966
|
+
...vt,
|
|
967
|
+
width: h.oneOfType([h.string, h.number]),
|
|
968
|
+
height: h.oneOfType([h.string, h.number]).isRequired
|
|
967
969
|
};
|
|
968
|
-
const
|
|
969
|
-
|
|
970
|
-
zIndex:
|
|
970
|
+
const Fe = (t) => /* @__PURE__ */ a(At.Provider, { value: t.zIndex, children: t.children });
|
|
971
|
+
Fe.propTypes = {
|
|
972
|
+
zIndex: h.number.isRequired
|
|
971
973
|
};
|
|
972
|
-
const
|
|
973
|
-
const e =
|
|
974
|
-
return /* @__PURE__ */
|
|
974
|
+
const Ve = ({ left: t, top: i, right: o, bottom: n, width: u, height: d, resizable: r, ...b }) => {
|
|
975
|
+
const e = r || [];
|
|
976
|
+
return /* @__PURE__ */ a(
|
|
975
977
|
K,
|
|
976
978
|
{
|
|
977
|
-
...
|
|
979
|
+
...b,
|
|
978
980
|
type: A.Positioned,
|
|
979
981
|
position: {
|
|
980
982
|
left: t,
|
|
981
983
|
top: i,
|
|
982
984
|
right: o,
|
|
983
985
|
bottom: n,
|
|
984
|
-
leftResizable: e.includes(
|
|
985
|
-
topResizable: e.includes(
|
|
986
|
-
rightResizable: e.includes(
|
|
987
|
-
bottomResizable: e.includes(
|
|
988
|
-
topLeftResizable: e.includes(
|
|
989
|
-
topRightResizable: e.includes(
|
|
990
|
-
bottomLeftResizable: e.includes(
|
|
991
|
-
bottomRightResizable: e.includes(
|
|
992
|
-
width:
|
|
993
|
-
height:
|
|
986
|
+
leftResizable: e.includes(y.Left) || e.includes(y.All),
|
|
987
|
+
topResizable: e.includes(y.Top) || e.includes(y.All),
|
|
988
|
+
rightResizable: e.includes(y.Right) || e.includes(y.All),
|
|
989
|
+
bottomResizable: e.includes(y.Bottom) || e.includes(y.All),
|
|
990
|
+
topLeftResizable: e.includes(y.TopLeft) || e.includes(y.All),
|
|
991
|
+
topRightResizable: e.includes(y.TopRight) || e.includes(y.All),
|
|
992
|
+
bottomLeftResizable: e.includes(y.BottomLeft) || e.includes(y.All),
|
|
993
|
+
bottomRightResizable: e.includes(y.BottomRight) || e.includes(y.All),
|
|
994
|
+
width: u,
|
|
995
|
+
height: d
|
|
994
996
|
},
|
|
995
|
-
children:
|
|
997
|
+
children: b.children
|
|
996
998
|
}
|
|
997
999
|
);
|
|
998
1000
|
};
|
|
999
|
-
|
|
1000
|
-
...
|
|
1001
|
-
left:
|
|
1002
|
-
top:
|
|
1003
|
-
right:
|
|
1004
|
-
bottom:
|
|
1005
|
-
width:
|
|
1006
|
-
height:
|
|
1007
|
-
resizable:
|
|
1001
|
+
Ve.propTypes = {
|
|
1002
|
+
...vt,
|
|
1003
|
+
left: h.oneOfType([h.string, h.number]),
|
|
1004
|
+
top: h.oneOfType([h.string, h.number]),
|
|
1005
|
+
right: h.oneOfType([h.string, h.number]),
|
|
1006
|
+
bottom: h.oneOfType([h.string, h.number]),
|
|
1007
|
+
width: h.oneOfType([h.string, h.number]),
|
|
1008
|
+
height: h.oneOfType([h.string, h.number]),
|
|
1009
|
+
resizable: h.array
|
|
1008
1010
|
};
|
|
1009
|
-
const
|
|
1010
|
-
const i =
|
|
1011
|
+
const wi = (t) => {
|
|
1012
|
+
const i = O.useContext(Bt);
|
|
1011
1013
|
return i ? t.children(i) : t.children({ left: 0, top: 0, right: 0, bottom: 0, width: 0, height: 0, x: 0, y: 0, toJSON: () => "" });
|
|
1012
|
-
},
|
|
1013
|
-
|
|
1014
|
-
...
|
|
1015
|
-
left:
|
|
1016
|
-
top:
|
|
1017
|
-
right:
|
|
1018
|
-
bottom:
|
|
1014
|
+
}, qe = ({ left: t, top: i, right: o, bottom: n, children: u, ...d }) => /* @__PURE__ */ a(K, { ...d, type: A.ViewPort, position: { left: t || 0, top: i || 0, right: o || 0, bottom: n || 0 }, children: u });
|
|
1015
|
+
qe.propTypes = {
|
|
1016
|
+
...vt,
|
|
1017
|
+
left: h.oneOfType([h.string, h.number]),
|
|
1018
|
+
top: h.oneOfType([h.string, h.number]),
|
|
1019
|
+
right: h.oneOfType([h.string, h.number]),
|
|
1020
|
+
bottom: h.oneOfType([h.string, h.number])
|
|
1019
1021
|
};
|
|
1020
|
-
const
|
|
1022
|
+
const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i, children: t }), Ue = (t) => {
|
|
1021
1023
|
const {
|
|
1022
1024
|
favicon: i,
|
|
1023
1025
|
title: o,
|
|
1024
1026
|
customTitle: n,
|
|
1025
|
-
activeTab:
|
|
1026
|
-
position:
|
|
1027
|
-
contentWidth:
|
|
1028
|
-
onClick:
|
|
1027
|
+
activeTab: u,
|
|
1028
|
+
position: d,
|
|
1029
|
+
contentWidth: r,
|
|
1030
|
+
onClick: b,
|
|
1029
1031
|
onClose: e,
|
|
1030
|
-
setDragging:
|
|
1031
|
-
tabsContentWidth:
|
|
1032
|
-
animateTabMove:
|
|
1033
|
-
isDragging:
|
|
1034
|
-
index:
|
|
1032
|
+
setDragging: l,
|
|
1033
|
+
tabsContentWidth: p,
|
|
1034
|
+
animateTabMove: s,
|
|
1035
|
+
isDragging: f,
|
|
1036
|
+
index: g,
|
|
1035
1037
|
sorting: z,
|
|
1036
|
-
showButtonClose:
|
|
1038
|
+
showButtonClose: c,
|
|
1037
1039
|
onCloseAllTabs: m,
|
|
1038
1040
|
onCloseLeftTabs: R,
|
|
1039
1041
|
onCloseRightTabs: S,
|
|
1040
1042
|
onCloseOtherTabs: w,
|
|
1041
1043
|
totalTabs: I
|
|
1042
|
-
} = t, { t:
|
|
1043
|
-
et(() => (document.addEventListener("mousemove", j), document.addEventListener("mouseup",
|
|
1044
|
-
document.removeEventListener("mousemove", j), document.addEventListener("mouseup",
|
|
1044
|
+
} = t, { t: M } = Wt("archbase"), [N, x] = U(0), [T, P] = U(!1), [k, E] = U(null), [X, D] = U(null), [ot, L] = U(!1), [q, tt] = U(0), [nt, G] = U(!1), lt = it(null), $ = 9, _ = 84, H = 60, V = 48;
|
|
1045
|
+
et(() => (document.addEventListener("mousemove", j), document.addEventListener("mouseup", B), () => {
|
|
1046
|
+
document.removeEventListener("mousemove", j), document.addEventListener("mouseup", B);
|
|
1045
1047
|
})), et(() => {
|
|
1046
|
-
T || setTimeout(() =>
|
|
1048
|
+
T || setTimeout(() => P(!0), 500);
|
|
1047
1049
|
}, [T]), et(() => {
|
|
1048
|
-
x(
|
|
1049
|
-
}, [
|
|
1050
|
-
const
|
|
1051
|
-
Y.button === 0 && (
|
|
1050
|
+
x(r + 2 * $);
|
|
1051
|
+
}, [r]);
|
|
1052
|
+
const J = (Y) => {
|
|
1053
|
+
Y.button === 0 && (l(!0), D(Y.pageX), L(!1), tt(d));
|
|
1052
1054
|
}, j = (Y) => {
|
|
1053
|
-
if (
|
|
1054
|
-
let ht =
|
|
1055
|
-
ht < 0 && (ht = 0), ht >
|
|
1055
|
+
if (X != null && f) {
|
|
1056
|
+
let ht = q - $ + (Y.pageX - X);
|
|
1057
|
+
ht < 0 && (ht = 0), ht > p - N && (ht = p - N), E(ht), !z && s(ht);
|
|
1056
1058
|
}
|
|
1057
|
-
},
|
|
1058
|
-
|
|
1059
|
-
}, [dt, ct] =
|
|
1059
|
+
}, B = (Y) => {
|
|
1060
|
+
X != null && f && (D(null), E(null), l(!1), L(!0));
|
|
1061
|
+
}, [dt, ct] = U(d - $);
|
|
1060
1062
|
et(() => {
|
|
1061
|
-
ct(
|
|
1062
|
-
}, [
|
|
1063
|
+
ct(d ? d - $ : 0);
|
|
1064
|
+
}, [g, d]);
|
|
1063
1065
|
const gt = () => {
|
|
1064
|
-
w && w(t.id),
|
|
1066
|
+
w && w(t.id), G(!1);
|
|
1065
1067
|
}, xt = () => {
|
|
1066
|
-
R && R(t.id),
|
|
1068
|
+
R && R(t.id), G(!1);
|
|
1067
1069
|
}, Lt = () => {
|
|
1068
|
-
S && S(t.id),
|
|
1069
|
-
},
|
|
1070
|
-
m && m(),
|
|
1071
|
-
},
|
|
1072
|
-
Y.preventDefault(),
|
|
1073
|
-
},
|
|
1074
|
-
return /* @__PURE__ */
|
|
1070
|
+
S && S(t.id), G(!1);
|
|
1071
|
+
}, Yt = () => {
|
|
1072
|
+
m && m(), G(!1);
|
|
1073
|
+
}, Kt = (Y) => {
|
|
1074
|
+
Y.preventDefault(), G(!0);
|
|
1075
|
+
}, It = g > 0, Ot = I !== void 0 && g < I - 1, Dt = (I || 0) > 1;
|
|
1076
|
+
return /* @__PURE__ */ F(
|
|
1075
1077
|
"div",
|
|
1076
1078
|
{
|
|
1077
|
-
className: `archbase_tab ${T ? "" : " archbase_tab-was-just-added"}${
|
|
1079
|
+
className: `archbase_tab ${T ? "" : " archbase_tab-was-just-added"}${X == null && !u ? " archbase_tab-was-just-dragged" : ""}`,
|
|
1078
1080
|
style: {
|
|
1079
1081
|
transform: `translate3d(${k ?? dt}px, 0, 0)`,
|
|
1080
|
-
width: `${
|
|
1082
|
+
width: `${N}px`
|
|
1081
1083
|
},
|
|
1082
|
-
"tab-active":
|
|
1083
|
-
"is-small":
|
|
1084
|
-
"is-smaller":
|
|
1085
|
-
"is-mini":
|
|
1084
|
+
"tab-active": u !== !1 ? "" : null,
|
|
1085
|
+
"is-small": r < _ ? "" : null,
|
|
1086
|
+
"is-smaller": r < H ? "" : null,
|
|
1087
|
+
"is-mini": r < V ? "" : null,
|
|
1086
1088
|
ref: lt,
|
|
1087
|
-
onContextMenu:
|
|
1089
|
+
onContextMenu: Kt,
|
|
1088
1090
|
children: [
|
|
1089
|
-
/* @__PURE__ */
|
|
1090
|
-
/* @__PURE__ */
|
|
1091
|
-
/* @__PURE__ */
|
|
1092
|
-
/* @__PURE__ */
|
|
1093
|
-
/* @__PURE__ */
|
|
1094
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ a("div", { className: "archbase_tab-dividers" }),
|
|
1092
|
+
/* @__PURE__ */ a("div", { className: "archbase_tab-background", children: /* @__PURE__ */ F("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1093
|
+
/* @__PURE__ */ F("defs", { children: [
|
|
1094
|
+
/* @__PURE__ */ a("symbol", { id: "archbase_tab-geometry-left", viewBox: "0 0 214 36", children: /* @__PURE__ */ a("path", { d: "M17 0h197v36H0v-2c4.5 0 9-3.5 9-8V8c0-4.5 3.5-8 8-8z" }) }),
|
|
1095
|
+
/* @__PURE__ */ a("symbol", { id: "archbase_tab-geometry-right", viewBox: "0 0 214 36", children: /* @__PURE__ */ a("use", { xlinkHref: "#archbase_tab-geometry-left" }) }),
|
|
1096
|
+
/* @__PURE__ */ a("clipPath", { id: "crop", children: /* @__PURE__ */ a("rect", { className: "mask", width: "100%", height: "100%", x: "0" }) })
|
|
1095
1097
|
] }),
|
|
1096
|
-
/* @__PURE__ */
|
|
1097
|
-
/* @__PURE__ */
|
|
1098
|
+
/* @__PURE__ */ a("svg", { width: "52%", height: "100%", children: /* @__PURE__ */ a("use", { xlinkHref: "#archbase_tab-geometry-left", width: "214", height: "36", className: "archbase_tab-geometry" }) }),
|
|
1099
|
+
/* @__PURE__ */ a("g", { transform: "scale(-1, 1)", children: /* @__PURE__ */ a("svg", { width: "52%", height: "100%", x: "-100%", y: "0", children: /* @__PURE__ */ a("use", { xlinkHref: "#archbase_tab-geometry-right", width: "214", height: "36", className: "archbase_tab-geometry" }) }) })
|
|
1098
1100
|
] }) }),
|
|
1099
|
-
/* @__PURE__ */
|
|
1100
|
-
!!i && /* @__PURE__ */
|
|
1101
|
-
/* @__PURE__ */
|
|
1102
|
-
/* @__PURE__ */
|
|
1103
|
-
(m || R || S || w) && /* @__PURE__ */
|
|
1104
|
-
/* @__PURE__ */
|
|
1105
|
-
Y.stopPropagation(),
|
|
1101
|
+
/* @__PURE__ */ F("div", { className: "archbase_tab-content", children: [
|
|
1102
|
+
!!i && /* @__PURE__ */ a("div", { className: "archbase_tab-favicon", style: { backgroundImage: `url(${i})` } }),
|
|
1103
|
+
/* @__PURE__ */ a("div", { className: "archbase_tab-title", children: n ?? o }),
|
|
1104
|
+
/* @__PURE__ */ a("div", { className: "archbase_tab-drag-handle", title: n ?? o, onClick: b, onPointerDown: (Y) => b(Y), onMouseUp: B, onMouseMove: j, onMouseDown: J }),
|
|
1105
|
+
(m || R || S || w) && /* @__PURE__ */ F(at, { shadow: "md", width: 200, opened: nt, onChange: G, position: "bottom-end", children: [
|
|
1106
|
+
/* @__PURE__ */ a(at.Target, { children: /* @__PURE__ */ a("div", { className: "archbase_tab-dropdown", onClick: (Y) => {
|
|
1107
|
+
Y.stopPropagation(), G(!nt);
|
|
1106
1108
|
} }) }),
|
|
1107
|
-
/* @__PURE__ */
|
|
1108
|
-
Dt && /* @__PURE__ */
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
(Dt ||
|
|
1112
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ F(at.Dropdown, { children: [
|
|
1110
|
+
Dt && /* @__PURE__ */ a(at.Item, { onClick: gt, children: String(M("tabs.closeOthers")) }),
|
|
1111
|
+
It && /* @__PURE__ */ a(at.Item, { onClick: xt, children: String(M("tabs.closeLeft")) }),
|
|
1112
|
+
Ot && /* @__PURE__ */ a(at.Item, { onClick: Lt, children: String(M("tabs.closeRight")) }),
|
|
1113
|
+
(Dt || It || Ot) && /* @__PURE__ */ a(at.Divider, {}),
|
|
1114
|
+
/* @__PURE__ */ a(at.Item, { onClick: Yt, children: String(M("tabs.closeAll")) })
|
|
1113
1115
|
] })
|
|
1114
1116
|
] }),
|
|
1115
|
-
|
|
1117
|
+
c ? /* @__PURE__ */ a("div", { className: "archbase_tab-close", onClick: (Y) => {
|
|
1116
1118
|
e(Y);
|
|
1117
1119
|
} }) : null
|
|
1118
1120
|
] })
|
|
1119
1121
|
]
|
|
1120
1122
|
}
|
|
1121
1123
|
);
|
|
1122
|
-
},
|
|
1123
|
-
const { currentTabs: i, onTabChange: o, activeTab: n, onTabClose:
|
|
1124
|
+
}, Ri = (t) => {
|
|
1125
|
+
const { currentTabs: i, onTabChange: o, activeTab: n, onTabClose: u, className: d, style: r, dark: b, onClick: e, buttonCloseOnlyActiveTab: l = !1, onCloseAllTabs: p, onCloseLeftTabs: s, onCloseRightTabs: f, onCloseOtherTabs: g } = t, [z, c] = U([]), [m, R] = U([]), [S, w] = U(i || []), [I, M] = U(!1), [N, x] = U(!1), T = it(null), { width: P, height: k } = re(), E = 9, X = 1, D = 24, ot = 240;
|
|
1124
1126
|
et(() => {
|
|
1125
|
-
|
|
1127
|
+
c(q()), R(tt(q()));
|
|
1126
1128
|
}, []), et(() => {
|
|
1127
1129
|
L();
|
|
1128
|
-
}, [JSON.stringify(S),
|
|
1130
|
+
}, [JSON.stringify(S), P, k]), et(() => {
|
|
1129
1131
|
i && w(i);
|
|
1130
1132
|
}, [JSON.stringify(i)]);
|
|
1131
1133
|
const L = () => {
|
|
1132
|
-
const $ =
|
|
1133
|
-
$ && (
|
|
1134
|
-
},
|
|
1134
|
+
const $ = q();
|
|
1135
|
+
$ && (c($), R(tt($)));
|
|
1136
|
+
}, q = () => {
|
|
1135
1137
|
const $ = [];
|
|
1136
1138
|
if (T.current) {
|
|
1137
|
-
const
|
|
1139
|
+
const _ = S.length, H = T.current.clientWidth, V = (_ - 1) * X, J = (H - 2 * E + V) / _, j = Math.max(D, Math.min(ot, J)), B = Math.floor(j), dt = B * _ + 2 * E - V;
|
|
1138
1140
|
let gt = H - dt;
|
|
1139
|
-
for (let xt = 0; xt <
|
|
1140
|
-
const Lt =
|
|
1141
|
-
$.push(
|
|
1141
|
+
for (let xt = 0; xt < _; xt += 1) {
|
|
1142
|
+
const Lt = B < ot && gt > 0 ? 1 : 0;
|
|
1143
|
+
$.push(B + Lt), gt > 0 && (gt -= 1);
|
|
1142
1144
|
}
|
|
1143
1145
|
}
|
|
1144
1146
|
return $;
|
|
1145
1147
|
}, tt = ($) => {
|
|
1146
|
-
const
|
|
1147
|
-
let
|
|
1148
|
-
return H.forEach((
|
|
1149
|
-
const
|
|
1150
|
-
|
|
1151
|
-
}),
|
|
1152
|
-
}, nt = ($,
|
|
1153
|
-
|
|
1154
|
-
let H = 1 / 0,
|
|
1155
|
-
m.forEach((j,
|
|
1156
|
-
Math.abs($ - j) < H && (H = Math.abs($ - j),
|
|
1157
|
-
}),
|
|
1158
|
-
|
|
1159
|
-
}),
|
|
1160
|
-
},
|
|
1161
|
-
|
|
1148
|
+
const _ = [], H = $ || z;
|
|
1149
|
+
let V = E;
|
|
1150
|
+
return H.forEach((J, j) => {
|
|
1151
|
+
const B = j * X;
|
|
1152
|
+
_.push(V - B), V += J;
|
|
1153
|
+
}), _;
|
|
1154
|
+
}, nt = ($, _) => {
|
|
1155
|
+
M(!0);
|
|
1156
|
+
let H = 1 / 0, V = -1, J = [];
|
|
1157
|
+
m.forEach((j, B) => {
|
|
1158
|
+
Math.abs($ - j) < H && (H = Math.abs($ - j), V = B);
|
|
1159
|
+
}), V = Math.max(0, Math.min(m.length, V)), _ != V && (m.forEach((j, B) => {
|
|
1160
|
+
B == _ ? J[B] = S[V > _ ? B + 1 : B - 1] : _ > B && B >= V ? J[B] = S[B + 1] : _ < B && B <= V ? J[B] = S[B - 1] : J[B] = S[B];
|
|
1161
|
+
}), G(J) && o(J)), M(!1);
|
|
1162
|
+
}, G = ($) => new Set($).size === $.length, lt = ($) => {
|
|
1163
|
+
u ? u($) : o(S.filter((_, H) => H != $));
|
|
1162
1164
|
};
|
|
1163
|
-
return /* @__PURE__ */
|
|
1165
|
+
return /* @__PURE__ */ a("div", { className: d, style: r, children: /* @__PURE__ */ F(
|
|
1164
1166
|
"div",
|
|
1165
1167
|
{
|
|
1166
|
-
className: `archbase_tabs${
|
|
1168
|
+
className: `archbase_tabs${b ? " archbase_tabs-dark-theme" : ""}${N ? "" : " archbase_tabs-is-sorting"}`,
|
|
1167
1169
|
children: [
|
|
1168
|
-
/* @__PURE__ */
|
|
1169
|
-
|
|
1170
|
+
/* @__PURE__ */ a("div", { className: "archbase_tabs_content", ref: T, children: !!S && S.map(($, _) => !!m[_] && /* @__PURE__ */ a(
|
|
1171
|
+
Ue,
|
|
1170
1172
|
{
|
|
1171
1173
|
favicon: $.favicon,
|
|
1172
1174
|
title: $.title,
|
|
1173
1175
|
customTitle: $.customTitle,
|
|
1174
1176
|
activeTab: n === $.key,
|
|
1175
|
-
position: m[
|
|
1176
|
-
contentWidth: z[
|
|
1177
|
+
position: m[_],
|
|
1178
|
+
contentWidth: z[_],
|
|
1177
1179
|
onClick: (H) => e($.key),
|
|
1178
1180
|
onClose: (H) => lt($.key),
|
|
1179
1181
|
setDragging: x,
|
|
1180
|
-
showButtonClose:
|
|
1182
|
+
showButtonClose: l ? n === $.key : !0,
|
|
1181
1183
|
tabsContentWidth: T.current && T.current.clientWidth,
|
|
1182
|
-
animateTabMove: (H) => nt(H,
|
|
1183
|
-
isDragging:
|
|
1184
|
+
animateTabMove: (H) => nt(H, _),
|
|
1185
|
+
isDragging: N,
|
|
1184
1186
|
id: $.key,
|
|
1185
|
-
index:
|
|
1187
|
+
index: _,
|
|
1186
1188
|
sorting: I,
|
|
1187
|
-
onCloseAllTabs:
|
|
1188
|
-
onCloseLeftTabs:
|
|
1189
|
-
onCloseRightTabs:
|
|
1190
|
-
onCloseOtherTabs:
|
|
1189
|
+
onCloseAllTabs: p,
|
|
1190
|
+
onCloseLeftTabs: s,
|
|
1191
|
+
onCloseRightTabs: f,
|
|
1192
|
+
onCloseOtherTabs: g,
|
|
1191
1193
|
totalTabs: S.length
|
|
1192
1194
|
},
|
|
1193
1195
|
$.key
|
|
1194
1196
|
)) }),
|
|
1195
|
-
/* @__PURE__ */
|
|
1197
|
+
/* @__PURE__ */ a("div", { className: "archbase_tabs-bottom-bar" })
|
|
1196
1198
|
]
|
|
1197
1199
|
}
|
|
1198
1200
|
) });
|
|
@@ -1202,7 +1204,7 @@ const ri = ({ children: t, ...i }) => /* @__PURE__ */ c(Vt.Provider, { value: i,
|
|
|
1202
1204
|
const n = parseInt(o.style.zIndex);
|
|
1203
1205
|
t = Math.max(isNaN(n) ? 0 : n, t);
|
|
1204
1206
|
}), t + 1;
|
|
1205
|
-
},
|
|
1207
|
+
}, vi = (t) => {
|
|
1206
1208
|
const i = Object.assign(
|
|
1207
1209
|
{
|
|
1208
1210
|
id: t.id && t.id.length ? t.id : Date.now().toString(),
|
|
@@ -1232,55 +1234,55 @@ const ri = ({ children: t, ...i }) => /* @__PURE__ */ c(Vt.Provider, { value: i,
|
|
|
1232
1234
|
t
|
|
1233
1235
|
);
|
|
1234
1236
|
i.id || (i.id = Date.now().toString()), Object.freeze(i);
|
|
1235
|
-
const [o, n] =
|
|
1236
|
-
|
|
1237
|
-
},
|
|
1238
|
-
|
|
1237
|
+
const [o, n] = W.useState(i.height), [u, d] = W.useState(i.width), [r, b] = W.useState(i.top || 0), [e, l] = W.useState(i.left || 0), [p, s] = W.useState(0), [f, g] = W.useState(0), [z, c] = W.useState(!1), [m, R] = W.useState(!1), [S, w] = W.useState("▁"), [I, M] = W.useState("□"), [N, x] = W.useState(""), [T, P] = W.useState(pt()), [k, E] = W.useState(1), { ref: X, width: D, height: ot } = se(), L = W.useRef(null), q = it(o), tt = it(u), nt = it(r), G = it(e), lt = 500, $ = (j) => {
|
|
1238
|
+
g(j.clientY - r), s(j.clientX - e), P(pt()), E(0.5);
|
|
1239
|
+
}, _ = (j) => {
|
|
1240
|
+
l((j.clientX || j.screenX || e + p) - p), b((j.clientY || j.screenY || r + f) - f);
|
|
1239
1241
|
}, H = (j) => {
|
|
1240
|
-
|
|
1241
|
-
},
|
|
1242
|
+
l((j.clientX || j.screenX) - p), b((j.clientY || j.screenY) - f), E(1);
|
|
1243
|
+
}, V = () => {
|
|
1242
1244
|
if (x(`${lt}ms ease-in-out`), z)
|
|
1243
|
-
|
|
1245
|
+
q.current = o, b(nt.current || 0), l(G.current || 0), c(!1), w("▁"), R(!1);
|
|
1244
1246
|
else {
|
|
1245
|
-
|
|
1247
|
+
q.current = 32, m || (G.current = e, nt.current = r);
|
|
1246
1248
|
const j = document.getElementById(i.id)?.parentElement;
|
|
1247
|
-
tt.current =
|
|
1248
|
-
let
|
|
1249
|
+
tt.current = u;
|
|
1250
|
+
let B = (j?.clientHeight || window.innerHeight) - q.current - 4;
|
|
1249
1251
|
const dt = (j?.clientWidth || window.innerWidth) - tt.current - 4, ct = document.elementFromPoint(
|
|
1250
1252
|
dt + tt.current / 2,
|
|
1251
|
-
|
|
1253
|
+
B + q.current / 2
|
|
1252
1254
|
);
|
|
1253
|
-
ct && ["archbase-window-container", "windowTitle"].includes(ct?.className || "") && (
|
|
1255
|
+
ct && ["archbase-window-container", "windowTitle"].includes(ct?.className || "") && (B -= ct?.clientHeight + 4), b(B), l(dt), c(!0), w("◰"), R(!1);
|
|
1254
1256
|
}
|
|
1255
|
-
|
|
1256
|
-
},
|
|
1257
|
+
P(pt()), setTimeout(x, lt + 1, "");
|
|
1258
|
+
}, J = () => {
|
|
1257
1259
|
x(`${lt}ms ease-in-out`);
|
|
1258
1260
|
const j = document.getElementById(i.id)?.parentElement;
|
|
1259
|
-
m ? (
|
|
1261
|
+
m ? (q.current = o, tt.current = u, b(nt.current || 0), l(G.current || 0), R(!1), M("□"), c(!1), w("▁")) : (q.current = j?.clientHeight || window.innerHeight, tt.current = j?.clientWidth || window.innerWidth, z || (G.current = e, nt.current = r), b(j?.offsetTop || 0), l(j?.offsetLeft || 0), R(!0), M("❐"), c(!1), w("▁")), P(pt()), setTimeout(x, lt + 1, "");
|
|
1260
1262
|
};
|
|
1261
1263
|
return et(() => {
|
|
1262
|
-
!m && !z && (
|
|
1263
|
-
}, [D, ot, m, z]), /* @__PURE__ */
|
|
1264
|
+
!m && !z && (d(D), n(ot));
|
|
1265
|
+
}, [D, ot, m, z]), /* @__PURE__ */ F(
|
|
1264
1266
|
"div",
|
|
1265
1267
|
{
|
|
1266
1268
|
id: i.id,
|
|
1267
1269
|
className: "archbase-window-container",
|
|
1268
1270
|
style: {
|
|
1269
|
-
height:
|
|
1271
|
+
height: q.current,
|
|
1270
1272
|
width: tt.current,
|
|
1271
|
-
top:
|
|
1273
|
+
top: r,
|
|
1272
1274
|
left: e,
|
|
1273
1275
|
resize: i.resizable ? "both" : "none",
|
|
1274
|
-
transition:
|
|
1276
|
+
transition: N,
|
|
1275
1277
|
zIndex: T,
|
|
1276
1278
|
opacity: k
|
|
1277
1279
|
},
|
|
1278
|
-
ref:
|
|
1280
|
+
ref: X,
|
|
1279
1281
|
onClick: () => {
|
|
1280
|
-
|
|
1282
|
+
P(pt());
|
|
1281
1283
|
},
|
|
1282
1284
|
children: [
|
|
1283
|
-
i.titleBar && /* @__PURE__ */
|
|
1285
|
+
i.titleBar && /* @__PURE__ */ F(
|
|
1284
1286
|
"div",
|
|
1285
1287
|
{
|
|
1286
1288
|
className: "title-bar",
|
|
@@ -1289,29 +1291,29 @@ const ri = ({ children: t, ...i }) => /* @__PURE__ */ c(Vt.Provider, { value: i,
|
|
|
1289
1291
|
opacity: k
|
|
1290
1292
|
},
|
|
1291
1293
|
children: [
|
|
1292
|
-
i.titleBar.icon && /* @__PURE__ */
|
|
1293
|
-
/* @__PURE__ */
|
|
1294
|
+
i.titleBar.icon && /* @__PURE__ */ a("span", { className: "icon", children: i.titleBar.icon }),
|
|
1295
|
+
/* @__PURE__ */ a(
|
|
1294
1296
|
"span",
|
|
1295
1297
|
{
|
|
1296
1298
|
className: "windowTitle",
|
|
1297
1299
|
draggable: !0,
|
|
1298
1300
|
onDragStart: $,
|
|
1299
|
-
onDrag:
|
|
1301
|
+
onDrag: _,
|
|
1300
1302
|
onDragEnd: H,
|
|
1301
1303
|
style: { opacity: Math.floor(k) },
|
|
1302
1304
|
ref: L,
|
|
1303
1305
|
children: i.titleBar.title
|
|
1304
1306
|
}
|
|
1305
1307
|
),
|
|
1306
|
-
i.titleBar.buttons && /* @__PURE__ */
|
|
1307
|
-
i.titleBar.buttons.minimize && /* @__PURE__ */
|
|
1308
|
-
i.titleBar.buttons.maximize && /* @__PURE__ */
|
|
1309
|
-
!!i.titleBar.buttons.close && /* @__PURE__ */
|
|
1308
|
+
i.titleBar.buttons && /* @__PURE__ */ F("span", { className: "buttonContainer", children: [
|
|
1309
|
+
i.titleBar.buttons.minimize && /* @__PURE__ */ a("span", { className: "windowButton", onClick: V, children: S }),
|
|
1310
|
+
i.titleBar.buttons.maximize && /* @__PURE__ */ a("span", { className: "windowButton", onClick: J, children: I }),
|
|
1311
|
+
!!i.titleBar.buttons.close && /* @__PURE__ */ a("span", { className: "windowButton", onClick: i.titleBar.buttons.close, children: "⨯" })
|
|
1310
1312
|
] })
|
|
1311
1313
|
]
|
|
1312
1314
|
}
|
|
1313
1315
|
),
|
|
1314
|
-
/* @__PURE__ */
|
|
1316
|
+
/* @__PURE__ */ a(
|
|
1315
1317
|
"div",
|
|
1316
1318
|
{
|
|
1317
1319
|
className: "content",
|
|
@@ -1328,91 +1330,128 @@ const ri = ({ children: t, ...i }) => /* @__PURE__ */ c(Vt.Provider, { value: i,
|
|
|
1328
1330
|
]
|
|
1329
1331
|
}
|
|
1330
1332
|
);
|
|
1331
|
-
},
|
|
1333
|
+
}, Si = ({
|
|
1332
1334
|
children: t,
|
|
1333
1335
|
direction: i = "row",
|
|
1334
|
-
splitterSize: o
|
|
1336
|
+
splitterSize: o,
|
|
1335
1337
|
splitterColor: n,
|
|
1336
|
-
splitterHoverColor:
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
)
|
|
1338
|
+
splitterHoverColor: u,
|
|
1339
|
+
style: d,
|
|
1340
|
+
className: r,
|
|
1341
|
+
autoSaveId: b
|
|
1342
|
+
}) => {
|
|
1343
|
+
const e = i === "row" ? "horizontal" : "vertical";
|
|
1344
|
+
return /* @__PURE__ */ a(
|
|
1345
|
+
Ft,
|
|
1346
|
+
{
|
|
1347
|
+
direction: e,
|
|
1348
|
+
autoSaveId: b,
|
|
1349
|
+
style: { height: "100%", ...d },
|
|
1350
|
+
className: r,
|
|
1351
|
+
children: W.Children.map(t, (l) => W.isValidElement(l) && l.type === Xe ? W.cloneElement(l, {
|
|
1352
|
+
_splitterSize: o,
|
|
1353
|
+
_splitterColor: n,
|
|
1354
|
+
_splitterHoverColor: u,
|
|
1355
|
+
_direction: e
|
|
1356
|
+
}) : l)
|
|
1357
|
+
}
|
|
1358
|
+
);
|
|
1359
|
+
}, Ti = ({
|
|
1357
1360
|
children: t,
|
|
1358
1361
|
minSize: i,
|
|
1359
1362
|
maxSize: o,
|
|
1360
1363
|
defaultSize: n,
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
{
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1364
|
+
collapsible: u = !1,
|
|
1365
|
+
style: d,
|
|
1366
|
+
className: r
|
|
1367
|
+
}) => {
|
|
1368
|
+
const b = (e) => {
|
|
1369
|
+
if (e !== void 0)
|
|
1370
|
+
return typeof e == "string" ? parseFloat(e) : e;
|
|
1371
|
+
};
|
|
1372
|
+
return /* @__PURE__ */ a(
|
|
1373
|
+
Mt,
|
|
1374
|
+
{
|
|
1375
|
+
defaultSize: b(n),
|
|
1376
|
+
minSize: b(i),
|
|
1377
|
+
maxSize: b(o),
|
|
1378
|
+
collapsible: u,
|
|
1379
|
+
style: d,
|
|
1380
|
+
className: r,
|
|
1381
|
+
children: t
|
|
1382
|
+
}
|
|
1383
|
+
);
|
|
1384
|
+
}, Xe = ({
|
|
1377
1385
|
style: t,
|
|
1378
|
-
className: i
|
|
1379
|
-
|
|
1386
|
+
className: i,
|
|
1387
|
+
...o
|
|
1388
|
+
}) => {
|
|
1389
|
+
const n = Qt(), d = te() === "dark", r = o._splitterSize ?? 4, b = o._splitterColor ?? (d ? n.colors.dark[4] : n.colors.gray[3]);
|
|
1390
|
+
o._splitterHoverColor ?? n.colors.blue[5];
|
|
1391
|
+
const l = (o._direction ?? "horizontal") === "horizontal";
|
|
1392
|
+
return /* @__PURE__ */ a(
|
|
1393
|
+
Vt,
|
|
1394
|
+
{
|
|
1395
|
+
className: i,
|
|
1396
|
+
style: {
|
|
1397
|
+
display: "flex",
|
|
1398
|
+
alignItems: "center",
|
|
1399
|
+
justifyContent: "center",
|
|
1400
|
+
backgroundColor: b,
|
|
1401
|
+
transition: "background-color 150ms ease",
|
|
1402
|
+
...l ? { width: Number(r), cursor: "col-resize" } : { height: Number(r), cursor: "row-resize" },
|
|
1403
|
+
...t
|
|
1404
|
+
},
|
|
1405
|
+
onDragging: () => {
|
|
1406
|
+
},
|
|
1407
|
+
children: /* @__PURE__ */ a(
|
|
1408
|
+
ee,
|
|
1409
|
+
{
|
|
1410
|
+
style: {
|
|
1411
|
+
...l ? { width: 2, height: 20, borderRadius: 1 } : { width: 20, height: 2, borderRadius: 1 },
|
|
1412
|
+
backgroundColor: d ? n.colors.dark[2] : n.colors.gray[5]
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
)
|
|
1416
|
+
}
|
|
1417
|
+
);
|
|
1418
|
+
}, xi = ({
|
|
1380
1419
|
children: t,
|
|
1381
1420
|
title: i,
|
|
1382
1421
|
reducedTitle: o,
|
|
1383
1422
|
containerWidth: n = "300px",
|
|
1384
|
-
backgroundColor:
|
|
1385
|
-
hiddenBackgroundColor:
|
|
1386
|
-
withBorder:
|
|
1387
|
-
hiddenWidth:
|
|
1423
|
+
backgroundColor: u = "transparent",
|
|
1424
|
+
hiddenBackgroundColor: d = "#ccc",
|
|
1425
|
+
withBorder: r = !1,
|
|
1426
|
+
hiddenWidth: b = "30px",
|
|
1388
1427
|
position: e = "right",
|
|
1389
|
-
onShow:
|
|
1390
|
-
onHide:
|
|
1391
|
-
defaultIsDocked:
|
|
1392
|
-
defaultIsVisible:
|
|
1428
|
+
onShow: l,
|
|
1429
|
+
onHide: p,
|
|
1430
|
+
defaultIsDocked: s = !1,
|
|
1431
|
+
defaultIsVisible: f = !1
|
|
1393
1432
|
}) => {
|
|
1394
|
-
const [
|
|
1395
|
-
!
|
|
1433
|
+
const [g, z] = U(s), [c, m] = U(f), R = () => z(!g), S = () => {
|
|
1434
|
+
!g && !c && (m(!0), l && l());
|
|
1396
1435
|
}, w = () => {
|
|
1397
|
-
!
|
|
1436
|
+
!g && c && (m(!1), p && p());
|
|
1398
1437
|
};
|
|
1399
1438
|
et(() => {
|
|
1400
|
-
|
|
1401
|
-
}, [
|
|
1439
|
+
f ? S() : w();
|
|
1440
|
+
}, [f]);
|
|
1402
1441
|
const I = {
|
|
1403
1442
|
writingMode: "vertical-rl",
|
|
1404
1443
|
transform: "rotate(360deg)",
|
|
1405
1444
|
margin: "10px 0",
|
|
1406
1445
|
alignSelf: "flex-center",
|
|
1407
1446
|
cursor: "pointer"
|
|
1408
|
-
},
|
|
1447
|
+
}, M = {
|
|
1409
1448
|
writingMode: "vertical-rl",
|
|
1410
1449
|
transform: "rotate(180deg)",
|
|
1411
1450
|
margin: "10px 0",
|
|
1412
1451
|
alignSelf: "flex-center",
|
|
1413
1452
|
cursor: "pointer"
|
|
1414
|
-
},
|
|
1415
|
-
return /* @__PURE__ */
|
|
1453
|
+
}, N = r ? "1px solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4))" : "none";
|
|
1454
|
+
return /* @__PURE__ */ F(
|
|
1416
1455
|
"div",
|
|
1417
1456
|
{
|
|
1418
1457
|
style: {
|
|
@@ -1424,40 +1463,40 @@ const ri = ({ children: t, ...i }) => /* @__PURE__ */ c(Vt.Provider, { value: i,
|
|
|
1424
1463
|
flexDirection: e === "left" ? "row-reverse" : "row"
|
|
1425
1464
|
},
|
|
1426
1465
|
children: [
|
|
1427
|
-
/* @__PURE__ */
|
|
1466
|
+
/* @__PURE__ */ a(
|
|
1428
1467
|
"div",
|
|
1429
1468
|
{
|
|
1430
1469
|
onMouseOver: S,
|
|
1431
1470
|
style: {
|
|
1432
|
-
width:
|
|
1471
|
+
width: c || g ? "0px" : b,
|
|
1433
1472
|
height: "100%",
|
|
1434
|
-
backgroundColor:
|
|
1473
|
+
backgroundColor: d,
|
|
1435
1474
|
cursor: "pointer",
|
|
1436
|
-
border:
|
|
1475
|
+
border: N,
|
|
1437
1476
|
display: "flex",
|
|
1438
1477
|
flexDirection: "column",
|
|
1439
1478
|
justifyContent: "flex-start",
|
|
1440
1479
|
alignItems: "center"
|
|
1441
1480
|
},
|
|
1442
|
-
children: !
|
|
1443
|
-
/* @__PURE__ */
|
|
1481
|
+
children: !c && !g && // @ts-ignore
|
|
1482
|
+
/* @__PURE__ */ a("span", { style: e === "right" ? I : M, children: o })
|
|
1444
1483
|
}
|
|
1445
1484
|
),
|
|
1446
|
-
/* @__PURE__ */
|
|
1485
|
+
/* @__PURE__ */ a(
|
|
1447
1486
|
"div",
|
|
1448
1487
|
{
|
|
1449
1488
|
onMouseLeave: w,
|
|
1450
1489
|
style: {
|
|
1451
|
-
width:
|
|
1490
|
+
width: c || g ? n : "0px",
|
|
1452
1491
|
height: "100%",
|
|
1453
1492
|
overflow: "hidden",
|
|
1454
1493
|
transition: "width 0.3s ease-in-out",
|
|
1455
|
-
backgroundColor:
|
|
1456
|
-
padding:
|
|
1457
|
-
border:
|
|
1494
|
+
backgroundColor: u,
|
|
1495
|
+
padding: c || g ? "10px" : "0px",
|
|
1496
|
+
border: c || g ? N : 0
|
|
1458
1497
|
},
|
|
1459
|
-
children:
|
|
1460
|
-
/* @__PURE__ */
|
|
1498
|
+
children: c || g ? /* @__PURE__ */ F(Et, { children: [
|
|
1499
|
+
/* @__PURE__ */ F(
|
|
1461
1500
|
"div",
|
|
1462
1501
|
{
|
|
1463
1502
|
style: {
|
|
@@ -1467,8 +1506,8 @@ const ri = ({ children: t, ...i }) => /* @__PURE__ */ c(Vt.Provider, { value: i,
|
|
|
1467
1506
|
marginBottom: "10px"
|
|
1468
1507
|
},
|
|
1469
1508
|
children: [
|
|
1470
|
-
/* @__PURE__ */
|
|
1471
|
-
/* @__PURE__ */
|
|
1509
|
+
/* @__PURE__ */ a("span", { children: i }),
|
|
1510
|
+
/* @__PURE__ */ a(ie, { onClick: R, children: g ? /* @__PURE__ */ a(le, { size: 16 }) : /* @__PURE__ */ a(ae, { size: 16 }) })
|
|
1472
1511
|
]
|
|
1473
1512
|
}
|
|
1474
1513
|
),
|
|
@@ -1479,35 +1518,230 @@ const ri = ({ children: t, ...i }) => /* @__PURE__ */ c(Vt.Provider, { value: i,
|
|
|
1479
1518
|
]
|
|
1480
1519
|
}
|
|
1481
1520
|
);
|
|
1521
|
+
}, Ge = ({
|
|
1522
|
+
panels: t,
|
|
1523
|
+
initialLayout: i,
|
|
1524
|
+
onChange: o,
|
|
1525
|
+
onPanelClose: n,
|
|
1526
|
+
zeroStateView: u,
|
|
1527
|
+
resize: d = { minimumPaneSizePercentage: 10 },
|
|
1528
|
+
style: r,
|
|
1529
|
+
className: b,
|
|
1530
|
+
height: e,
|
|
1531
|
+
width: l
|
|
1532
|
+
}) => {
|
|
1533
|
+
const { colorScheme: p } = oe(), s = p === "dark", f = kt(
|
|
1534
|
+
(z, c) => {
|
|
1535
|
+
const m = t[z];
|
|
1536
|
+
if (!m)
|
|
1537
|
+
return /* @__PURE__ */ F("div", { children: [
|
|
1538
|
+
"Panel not found: ",
|
|
1539
|
+
z
|
|
1540
|
+
] });
|
|
1541
|
+
const R = m.closable !== !1, S = /* @__PURE__ */ F("span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
1542
|
+
m.icon && /* @__PURE__ */ a("span", { style: { display: "inline-flex" }, children: m.icon }),
|
|
1543
|
+
/* @__PURE__ */ a("span", { children: m.title })
|
|
1544
|
+
] }), w = [];
|
|
1545
|
+
m.toolbarControls && w.push(...m.toolbarControls), R && w.push(
|
|
1546
|
+
/* @__PURE__ */ a(
|
|
1547
|
+
"button",
|
|
1548
|
+
{
|
|
1549
|
+
onClick: () => n?.(z),
|
|
1550
|
+
title: "Close",
|
|
1551
|
+
style: {
|
|
1552
|
+
background: "none",
|
|
1553
|
+
border: "none",
|
|
1554
|
+
cursor: "pointer",
|
|
1555
|
+
fontSize: 16,
|
|
1556
|
+
lineHeight: 1,
|
|
1557
|
+
padding: "0 4px",
|
|
1558
|
+
color: "inherit"
|
|
1559
|
+
},
|
|
1560
|
+
children: "×"
|
|
1561
|
+
},
|
|
1562
|
+
"close"
|
|
1563
|
+
)
|
|
1564
|
+
);
|
|
1565
|
+
const I = typeof m.component == "function" ? m.component() : m.component;
|
|
1566
|
+
return /* @__PURE__ */ a(
|
|
1567
|
+
de,
|
|
1568
|
+
{
|
|
1569
|
+
path: c,
|
|
1570
|
+
title: S,
|
|
1571
|
+
toolbarControls: w.length > 0 ? w : void 0,
|
|
1572
|
+
children: I
|
|
1573
|
+
}
|
|
1574
|
+
);
|
|
1575
|
+
},
|
|
1576
|
+
[t, n]
|
|
1577
|
+
), g = {
|
|
1578
|
+
position: "relative",
|
|
1579
|
+
height: e ?? "100%",
|
|
1580
|
+
width: l ?? "100%",
|
|
1581
|
+
...r
|
|
1582
|
+
};
|
|
1583
|
+
return /* @__PURE__ */ a("div", { style: g, className: b, children: /* @__PURE__ */ a(
|
|
1584
|
+
ce,
|
|
1585
|
+
{
|
|
1586
|
+
renderTile: f,
|
|
1587
|
+
value: i,
|
|
1588
|
+
onChange: (z) => o?.(z ?? null),
|
|
1589
|
+
zeroStateView: u || void 0,
|
|
1590
|
+
resize: d,
|
|
1591
|
+
className: s ? "mosaic-blueprint-theme bp4-dark" : "mosaic-blueprint-theme"
|
|
1592
|
+
}
|
|
1593
|
+
) });
|
|
1594
|
+
};
|
|
1595
|
+
Ge.displayName = "ArchbaseMosaicLayout";
|
|
1596
|
+
const Je = ({
|
|
1597
|
+
children: t,
|
|
1598
|
+
id: i,
|
|
1599
|
+
defaultSize: o,
|
|
1600
|
+
minSize: n = 10,
|
|
1601
|
+
maxSize: u,
|
|
1602
|
+
collapsible: d = !1,
|
|
1603
|
+
collapsedSize: r = 0,
|
|
1604
|
+
order: b,
|
|
1605
|
+
style: e,
|
|
1606
|
+
className: l
|
|
1607
|
+
}) => /* @__PURE__ */ a(
|
|
1608
|
+
Mt,
|
|
1609
|
+
{
|
|
1610
|
+
id: i,
|
|
1611
|
+
defaultSize: o,
|
|
1612
|
+
minSize: n,
|
|
1613
|
+
maxSize: u,
|
|
1614
|
+
collapsible: d,
|
|
1615
|
+
collapsedSize: r,
|
|
1616
|
+
order: b,
|
|
1617
|
+
style: e,
|
|
1618
|
+
className: l,
|
|
1619
|
+
children: t
|
|
1620
|
+
}
|
|
1621
|
+
);
|
|
1622
|
+
Je.displayName = "ArchbaseResizablePanel";
|
|
1623
|
+
const Zt = ({
|
|
1624
|
+
direction: t = "horizontal",
|
|
1625
|
+
size: i = 4,
|
|
1626
|
+
className: o,
|
|
1627
|
+
showGrip: n = !0
|
|
1628
|
+
}) => {
|
|
1629
|
+
const u = t === "vertical", d = {
|
|
1630
|
+
display: "flex",
|
|
1631
|
+
alignItems: "center",
|
|
1632
|
+
justifyContent: "center",
|
|
1633
|
+
flexShrink: 0,
|
|
1634
|
+
transition: "background-color 150ms ease",
|
|
1635
|
+
...u ? { height: `${i}px`, width: "100%", cursor: "row-resize" } : { width: `${i}px`, height: "100%", cursor: "col-resize" }
|
|
1636
|
+
}, r = {
|
|
1637
|
+
display: "flex",
|
|
1638
|
+
gap: "2px",
|
|
1639
|
+
flexDirection: u ? "row" : "column",
|
|
1640
|
+
alignItems: "center",
|
|
1641
|
+
justifyContent: "center"
|
|
1642
|
+
}, b = {
|
|
1643
|
+
width: 3,
|
|
1644
|
+
height: 3,
|
|
1645
|
+
borderRadius: "50%",
|
|
1646
|
+
backgroundColor: "var(--archbase-resizable-grip-color, #adb5bd)",
|
|
1647
|
+
transition: "background-color 150ms ease"
|
|
1648
|
+
};
|
|
1649
|
+
return /* @__PURE__ */ a(
|
|
1650
|
+
Vt,
|
|
1651
|
+
{
|
|
1652
|
+
className: o,
|
|
1653
|
+
style: d,
|
|
1654
|
+
children: n && /* @__PURE__ */ F("span", { style: r, "aria-hidden": !0, children: [
|
|
1655
|
+
/* @__PURE__ */ a("span", { style: b }),
|
|
1656
|
+
/* @__PURE__ */ a("span", { style: b }),
|
|
1657
|
+
/* @__PURE__ */ a("span", { style: b })
|
|
1658
|
+
] })
|
|
1659
|
+
}
|
|
1660
|
+
);
|
|
1661
|
+
};
|
|
1662
|
+
Zt.displayName = "ArchbaseResizableHandle";
|
|
1663
|
+
const Ze = ({
|
|
1664
|
+
direction: t = "horizontal",
|
|
1665
|
+
panels: i,
|
|
1666
|
+
onLayout: o,
|
|
1667
|
+
autoSaveId: n,
|
|
1668
|
+
handleSize: u = 4,
|
|
1669
|
+
handleClassName: d,
|
|
1670
|
+
showHandleGrip: r = !0,
|
|
1671
|
+
style: b,
|
|
1672
|
+
className: e,
|
|
1673
|
+
height: l,
|
|
1674
|
+
width: p
|
|
1675
|
+
}) => {
|
|
1676
|
+
const s = {
|
|
1677
|
+
height: l ?? "100%",
|
|
1678
|
+
width: p ?? "100%",
|
|
1679
|
+
...b
|
|
1680
|
+
};
|
|
1681
|
+
return /* @__PURE__ */ a(
|
|
1682
|
+
Ft,
|
|
1683
|
+
{
|
|
1684
|
+
direction: t,
|
|
1685
|
+
onLayout: o,
|
|
1686
|
+
autoSaveId: n,
|
|
1687
|
+
style: s,
|
|
1688
|
+
className: e,
|
|
1689
|
+
children: i.map((f, g) => /* @__PURE__ */ F(W.Fragment, { children: [
|
|
1690
|
+
/* @__PURE__ */ a(
|
|
1691
|
+
Mt,
|
|
1692
|
+
{
|
|
1693
|
+
id: f.id,
|
|
1694
|
+
defaultSize: f.defaultSize,
|
|
1695
|
+
minSize: f.minSize ?? 10,
|
|
1696
|
+
maxSize: f.maxSize,
|
|
1697
|
+
collapsible: f.collapsible ?? !1,
|
|
1698
|
+
collapsedSize: f.collapsedSize ?? 0,
|
|
1699
|
+
order: f.order,
|
|
1700
|
+
children: f.children
|
|
1701
|
+
}
|
|
1702
|
+
),
|
|
1703
|
+
g < i.length - 1 && /* @__PURE__ */ a(
|
|
1704
|
+
Zt,
|
|
1705
|
+
{
|
|
1706
|
+
direction: t,
|
|
1707
|
+
size: u,
|
|
1708
|
+
className: d,
|
|
1709
|
+
showGrip: r
|
|
1710
|
+
}
|
|
1711
|
+
)
|
|
1712
|
+
] }, f.id))
|
|
1713
|
+
}
|
|
1714
|
+
);
|
|
1482
1715
|
};
|
|
1483
|
-
|
|
1716
|
+
Ze.displayName = "ArchbaseResizableLayout";
|
|
1717
|
+
function Ye({
|
|
1484
1718
|
components: t,
|
|
1485
1719
|
defaultLayout: i,
|
|
1486
1720
|
watermark: o,
|
|
1487
1721
|
hideBorders: n = !1,
|
|
1488
|
-
autoHideHeaders:
|
|
1489
|
-
onLayoutChange:
|
|
1490
|
-
onPanelClose:
|
|
1491
|
-
onPanelOpen:
|
|
1722
|
+
autoHideHeaders: u = !1,
|
|
1723
|
+
onLayoutChange: d,
|
|
1724
|
+
onPanelClose: r,
|
|
1725
|
+
onPanelOpen: b,
|
|
1492
1726
|
style: e,
|
|
1493
|
-
className:
|
|
1494
|
-
height:
|
|
1495
|
-
disabled:
|
|
1727
|
+
className: l,
|
|
1728
|
+
height: p = "600px",
|
|
1729
|
+
disabled: s = !1
|
|
1496
1730
|
}) {
|
|
1497
|
-
const { t:
|
|
1731
|
+
const { t: f } = Wt(), g = it(null), z = Ht(() => {
|
|
1498
1732
|
const m = {};
|
|
1499
1733
|
for (const R of Object.values(t))
|
|
1500
|
-
m[R.id] = (S) => /* @__PURE__ */
|
|
1501
|
-
|
|
1734
|
+
m[R.id] = (S) => /* @__PURE__ */ a(
|
|
1735
|
+
Ke,
|
|
1502
1736
|
{
|
|
1503
1737
|
component: R,
|
|
1504
1738
|
api: S.api,
|
|
1505
|
-
onClose: () =>
|
|
1739
|
+
onClose: () => r?.(R.id)
|
|
1506
1740
|
}
|
|
1507
1741
|
);
|
|
1508
1742
|
return m;
|
|
1509
|
-
}, [t,
|
|
1510
|
-
if (
|
|
1743
|
+
}, [t, r]), c = kt((m) => {
|
|
1744
|
+
if (g.current = m.api, i && typeof i != "string")
|
|
1511
1745
|
try {
|
|
1512
1746
|
m.api.fromJSON(i);
|
|
1513
1747
|
} catch (R) {
|
|
@@ -1527,40 +1761,40 @@ function _e({
|
|
|
1527
1761
|
}
|
|
1528
1762
|
}, [i, t]);
|
|
1529
1763
|
return et(() => {
|
|
1530
|
-
if (!
|
|
1764
|
+
if (!g.current)
|
|
1531
1765
|
return;
|
|
1532
1766
|
const m = [];
|
|
1533
|
-
if (
|
|
1534
|
-
const R =
|
|
1535
|
-
|
|
1767
|
+
if (d) {
|
|
1768
|
+
const R = g.current.onDidLayoutChange(() => {
|
|
1769
|
+
d(g.current.toJSON());
|
|
1536
1770
|
});
|
|
1537
1771
|
m.push(R);
|
|
1538
1772
|
}
|
|
1539
|
-
if (
|
|
1540
|
-
const R =
|
|
1541
|
-
|
|
1773
|
+
if (r) {
|
|
1774
|
+
const R = g.current.onDidRemovePanel((S) => {
|
|
1775
|
+
r(S.panel.id);
|
|
1542
1776
|
});
|
|
1543
1777
|
m.push(R);
|
|
1544
1778
|
}
|
|
1545
1779
|
return () => {
|
|
1546
1780
|
m.forEach((R) => R.dispose());
|
|
1547
1781
|
};
|
|
1548
|
-
}, [
|
|
1782
|
+
}, [d, r]), /* @__PURE__ */ a(
|
|
1549
1783
|
"div",
|
|
1550
1784
|
{
|
|
1551
1785
|
style: {
|
|
1552
1786
|
width: "100%",
|
|
1553
|
-
height:
|
|
1787
|
+
height: p,
|
|
1554
1788
|
...e
|
|
1555
1789
|
},
|
|
1556
|
-
className:
|
|
1557
|
-
children: /* @__PURE__ */
|
|
1558
|
-
|
|
1790
|
+
className: l,
|
|
1791
|
+
children: /* @__PURE__ */ a(
|
|
1792
|
+
he,
|
|
1559
1793
|
{
|
|
1560
1794
|
components: z,
|
|
1561
|
-
onReady:
|
|
1795
|
+
onReady: c,
|
|
1562
1796
|
hideBorders: n,
|
|
1563
|
-
watermarkComponent: o ? () => /* @__PURE__ */
|
|
1797
|
+
watermarkComponent: o ? () => /* @__PURE__ */ a("div", { style: {
|
|
1564
1798
|
display: "flex",
|
|
1565
1799
|
alignItems: "center",
|
|
1566
1800
|
justifyContent: "center",
|
|
@@ -1574,9 +1808,9 @@ function _e({
|
|
|
1574
1808
|
}
|
|
1575
1809
|
);
|
|
1576
1810
|
}
|
|
1577
|
-
function
|
|
1811
|
+
function Ke({ component: t, api: i, onClose: o }) {
|
|
1578
1812
|
const n = t.component;
|
|
1579
|
-
return /* @__PURE__ */
|
|
1813
|
+
return /* @__PURE__ */ a("div", { style: { height: "100%", overflow: "auto" }, children: /* @__PURE__ */ a(
|
|
1580
1814
|
n,
|
|
1581
1815
|
{
|
|
1582
1816
|
api: i,
|
|
@@ -1585,131 +1819,131 @@ function Ne({ component: t, api: i, onClose: o }) {
|
|
|
1585
1819
|
}
|
|
1586
1820
|
) });
|
|
1587
1821
|
}
|
|
1588
|
-
function
|
|
1822
|
+
function Ci({
|
|
1589
1823
|
preset: t,
|
|
1590
1824
|
components: i = {},
|
|
1591
1825
|
onPanelClose: o,
|
|
1592
1826
|
onPanelOpen: n,
|
|
1593
|
-
style:
|
|
1594
|
-
className:
|
|
1595
|
-
height:
|
|
1827
|
+
style: u,
|
|
1828
|
+
className: d,
|
|
1829
|
+
height: r
|
|
1596
1830
|
}) {
|
|
1597
|
-
const { layout:
|
|
1598
|
-
return /* @__PURE__ */
|
|
1599
|
-
|
|
1831
|
+
const { layout: b, components: e } = Ht(() => Qe(t, i), [t, i]);
|
|
1832
|
+
return /* @__PURE__ */ a(
|
|
1833
|
+
Ye,
|
|
1600
1834
|
{
|
|
1601
1835
|
components: e,
|
|
1602
|
-
defaultLayout:
|
|
1836
|
+
defaultLayout: b,
|
|
1603
1837
|
onPanelClose: o,
|
|
1604
1838
|
onPanelOpen: n,
|
|
1605
|
-
style:
|
|
1606
|
-
className:
|
|
1607
|
-
height:
|
|
1839
|
+
style: u,
|
|
1840
|
+
className: d,
|
|
1841
|
+
height: r
|
|
1608
1842
|
}
|
|
1609
1843
|
);
|
|
1610
1844
|
}
|
|
1611
|
-
function
|
|
1845
|
+
function Qe(t, i) {
|
|
1612
1846
|
const o = {
|
|
1613
|
-
...
|
|
1847
|
+
...ti(),
|
|
1614
1848
|
...i
|
|
1615
1849
|
};
|
|
1616
1850
|
let n;
|
|
1617
1851
|
switch (t) {
|
|
1618
1852
|
case "dashboard":
|
|
1619
|
-
n =
|
|
1853
|
+
n = Pt(o);
|
|
1620
1854
|
break;
|
|
1621
1855
|
case "ide":
|
|
1622
|
-
n =
|
|
1856
|
+
n = ei(o);
|
|
1623
1857
|
break;
|
|
1624
1858
|
case "explorer":
|
|
1625
|
-
n =
|
|
1859
|
+
n = ii(o);
|
|
1626
1860
|
break;
|
|
1627
1861
|
case "analytics":
|
|
1628
|
-
n =
|
|
1862
|
+
n = oi(o);
|
|
1629
1863
|
break;
|
|
1630
1864
|
default:
|
|
1631
|
-
n =
|
|
1865
|
+
n = Pt(o);
|
|
1632
1866
|
}
|
|
1633
1867
|
return { layout: n, components: o };
|
|
1634
1868
|
}
|
|
1635
|
-
function
|
|
1869
|
+
function ti() {
|
|
1636
1870
|
return {
|
|
1637
1871
|
// Dashboard
|
|
1638
1872
|
overview: {
|
|
1639
1873
|
id: "overview",
|
|
1640
1874
|
title: "Overview",
|
|
1641
|
-
component: () => /* @__PURE__ */
|
|
1875
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Overview Panel" })
|
|
1642
1876
|
},
|
|
1643
1877
|
charts: {
|
|
1644
1878
|
id: "charts",
|
|
1645
1879
|
title: "Charts",
|
|
1646
|
-
component: () => /* @__PURE__ */
|
|
1880
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Charts Panel" })
|
|
1647
1881
|
},
|
|
1648
1882
|
details: {
|
|
1649
1883
|
id: "details",
|
|
1650
1884
|
title: "Details",
|
|
1651
|
-
component: () => /* @__PURE__ */
|
|
1885
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Details Panel" })
|
|
1652
1886
|
},
|
|
1653
1887
|
recent: {
|
|
1654
1888
|
id: "recent",
|
|
1655
1889
|
title: "Recent Activity",
|
|
1656
|
-
component: () => /* @__PURE__ */
|
|
1890
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Recent Activity" })
|
|
1657
1891
|
},
|
|
1658
1892
|
// IDE
|
|
1659
1893
|
explorer: {
|
|
1660
1894
|
id: "explorer",
|
|
1661
1895
|
title: "Explorer",
|
|
1662
|
-
component: () => /* @__PURE__ */
|
|
1896
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "File Explorer" })
|
|
1663
1897
|
},
|
|
1664
1898
|
search: {
|
|
1665
1899
|
id: "search",
|
|
1666
1900
|
title: "Search",
|
|
1667
|
-
component: () => /* @__PURE__ */
|
|
1901
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Search Panel" })
|
|
1668
1902
|
},
|
|
1669
1903
|
editor: {
|
|
1670
1904
|
id: "editor",
|
|
1671
1905
|
title: "Editor",
|
|
1672
|
-
component: () => /* @__PURE__ */
|
|
1906
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Code Editor" })
|
|
1673
1907
|
},
|
|
1674
1908
|
terminal: {
|
|
1675
1909
|
id: "terminal",
|
|
1676
1910
|
title: "Terminal",
|
|
1677
|
-
component: () => /* @__PURE__ */
|
|
1911
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Terminal" })
|
|
1678
1912
|
},
|
|
1679
1913
|
output: {
|
|
1680
1914
|
id: "output",
|
|
1681
1915
|
title: "Output",
|
|
1682
|
-
component: () => /* @__PURE__ */
|
|
1916
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Output" })
|
|
1683
1917
|
},
|
|
1684
1918
|
problems: {
|
|
1685
1919
|
id: "problems",
|
|
1686
1920
|
title: "Problems",
|
|
1687
|
-
component: () => /* @__PURE__ */
|
|
1921
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Problems Panel" })
|
|
1688
1922
|
},
|
|
1689
1923
|
// Analytics
|
|
1690
1924
|
metrics: {
|
|
1691
1925
|
id: "metrics",
|
|
1692
1926
|
title: "Metrics",
|
|
1693
|
-
component: () => /* @__PURE__ */
|
|
1927
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Metrics Dashboard" })
|
|
1694
1928
|
},
|
|
1695
1929
|
reports: {
|
|
1696
1930
|
id: "reports",
|
|
1697
1931
|
title: "Reports",
|
|
1698
|
-
component: () => /* @__PURE__ */
|
|
1932
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Reports Panel" })
|
|
1699
1933
|
},
|
|
1700
1934
|
data: {
|
|
1701
1935
|
id: "data",
|
|
1702
1936
|
title: "Data Source",
|
|
1703
|
-
component: () => /* @__PURE__ */
|
|
1937
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Data Configuration" })
|
|
1704
1938
|
},
|
|
1705
1939
|
filters: {
|
|
1706
1940
|
id: "filters",
|
|
1707
1941
|
title: "Filters",
|
|
1708
|
-
component: () => /* @__PURE__ */
|
|
1942
|
+
component: () => /* @__PURE__ */ a("div", { style: { padding: 16 }, children: "Filter Panel" })
|
|
1709
1943
|
}
|
|
1710
1944
|
};
|
|
1711
1945
|
}
|
|
1712
|
-
function
|
|
1946
|
+
function Pt(t) {
|
|
1713
1947
|
return {
|
|
1714
1948
|
root: {
|
|
1715
1949
|
type: "branch",
|
|
@@ -1768,7 +2002,7 @@ function _t(t) {
|
|
|
1768
2002
|
}
|
|
1769
2003
|
};
|
|
1770
2004
|
}
|
|
1771
|
-
function
|
|
2005
|
+
function ei(t) {
|
|
1772
2006
|
return {
|
|
1773
2007
|
root: {
|
|
1774
2008
|
type: "branch",
|
|
@@ -1849,7 +2083,7 @@ function We(t) {
|
|
|
1849
2083
|
}
|
|
1850
2084
|
};
|
|
1851
2085
|
}
|
|
1852
|
-
function
|
|
2086
|
+
function ii(t) {
|
|
1853
2087
|
return {
|
|
1854
2088
|
root: {
|
|
1855
2089
|
type: "branch",
|
|
@@ -1880,7 +2114,7 @@ function Fe(t) {
|
|
|
1880
2114
|
}
|
|
1881
2115
|
};
|
|
1882
2116
|
}
|
|
1883
|
-
function
|
|
2117
|
+
function oi(t) {
|
|
1884
2118
|
return {
|
|
1885
2119
|
root: {
|
|
1886
2120
|
type: "branch",
|
|
@@ -1935,43 +2169,47 @@ function Ve(t) {
|
|
|
1935
2169
|
}
|
|
1936
2170
|
export {
|
|
1937
2171
|
C as AnchorType,
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
2172
|
+
Ri as ArchbaseAdvancedTabs,
|
|
2173
|
+
$i as ArchbaseCard,
|
|
2174
|
+
Mi as ArchbaseContainer,
|
|
2175
|
+
Ye as ArchbaseDockLayout,
|
|
2176
|
+
Ci as ArchbaseDockLayoutPreset,
|
|
2177
|
+
xi as ArchbaseDockableContainer,
|
|
2178
|
+
vi as ArchbaseFloatingWindow,
|
|
2179
|
+
bi as ArchbaseForm,
|
|
2180
|
+
ji as ArchbaseGroup,
|
|
2181
|
+
Ge as ArchbaseMosaicLayout,
|
|
2182
|
+
Zt as ArchbaseResizableHandle,
|
|
2183
|
+
Ze as ArchbaseResizableLayout,
|
|
2184
|
+
Je as ArchbaseResizablePanel,
|
|
2185
|
+
Pe as ArchbaseSpaceBottom,
|
|
2186
|
+
Ne as ArchbaseSpaceBottomResizable,
|
|
2187
|
+
Ae as ArchbaseSpaceCentered,
|
|
2188
|
+
Le as ArchbaseSpaceCenteredVertically,
|
|
2189
|
+
ke as ArchbaseSpaceCustom,
|
|
2190
|
+
He as ArchbaseSpaceFill,
|
|
2191
|
+
We as ArchbaseSpaceFixed,
|
|
2192
|
+
wi as ArchbaseSpaceInfo,
|
|
2193
|
+
Fe as ArchbaseSpaceLayer,
|
|
2194
|
+
Be as ArchbaseSpaceLeft,
|
|
2195
|
+
je as ArchbaseSpaceLeftResizable,
|
|
2196
|
+
yi as ArchbaseSpaceOptions,
|
|
2197
|
+
Ve as ArchbaseSpacePositioned,
|
|
2198
|
+
_e as ArchbaseSpaceRight,
|
|
2199
|
+
De as ArchbaseSpaceRightResizable,
|
|
2200
|
+
Oe as ArchbaseSpaceTop,
|
|
2201
|
+
Ie as ArchbaseSpaceTopResizable,
|
|
2202
|
+
qe as ArchbaseSpaceViewPort,
|
|
2203
|
+
Si as ArchbaseSplitPane,
|
|
2204
|
+
Ti as ArchbaseSplitPanePane,
|
|
2205
|
+
Xe as ArchbaseSplitPaneResizer,
|
|
2206
|
+
Bi as ArchbaseStack,
|
|
1969
2207
|
st as CenterType,
|
|
1970
2208
|
rt as ResizeHandlePlacement,
|
|
1971
|
-
|
|
2209
|
+
y as ResizeType,
|
|
1972
2210
|
A as Type,
|
|
1973
2211
|
Tt as anchoredProps,
|
|
1974
|
-
|
|
2212
|
+
zi as enabledSsrSupport,
|
|
1975
2213
|
St as resizableProps,
|
|
1976
|
-
|
|
2214
|
+
pi as useArchbaseCurrentSpace
|
|
1977
2215
|
};
|