@orchidui/dashboard 1.8.1-95 → 1.8.1-96
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/AccordionTrigger.vue_vue_type_script_setup_true_lang-BdmLII9i.js +295 -0
- package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-DpJRpFhK.js +891 -0
- package/dist/CardTitle.vue_vue_type_script_setup_true_lang-D2_Bj3jw.js +68 -0
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-C51LjITJ.js +172 -0
- package/dist/CollapsibleTrigger-fCarY5DJ.js +154 -0
- package/dist/Collection-COudIl-A.js +55 -0
- package/dist/ConfigProvider-7mV0D7Sp.js +6 -0
- package/dist/Dashboard/Card/OcCard.js +1 -1
- package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
- package/dist/DialogContent.vue_vue_type_script_setup_true_lang-CdrrrG29.js +68 -0
- package/dist/DialogOverlay-Cj3UTjZ8.js +309 -0
- package/dist/DialogPortal-zAvO8zt4.js +23 -0
- package/dist/DialogTrigger-BIF1A4hk.js +72 -0
- package/dist/DismissableLayer-C7IJliOb.js +151 -0
- package/dist/FocusScope--pJ6bboI.js +121 -0
- package/dist/FormMessage.vue_vue_type_script_setup_true_lang-DwlnFEn2.js +92 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-BrjsUUvL.js +27 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-D_LMIKBv.js +51 -0
- package/dist/ListboxItem-CjMk-mEX.js +417 -0
- package/dist/MenuSubTrigger-CUrxnPwO.js +845 -0
- package/dist/{OcCard-D3be6IMj.js → OcCard-B3SCzVwn.js} +54 -58
- package/dist/{OcLottieAnimation-0mdksHMn.js → OcLottieAnimation-DeMoIDaX.js} +1 -1
- package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-DtI_qIyx.js +394 -0
- package/dist/PopperContent-BT3Svcc3.js +1465 -0
- package/dist/Presence-CxfTrw6l.js +133 -0
- package/dist/Primitive-B3twiLO1.js +44 -0
- package/dist/{QuillEditor-DRwC0sgJ.js → QuillEditor-hFQ0MJZO.js} +556 -579
- package/dist/RadioGroupItem.vue_vue_type_script_setup_true_lang-BNfRYIhL.js +297 -0
- package/dist/RovingFocusGroup-0OHdFQl0.js +92 -0
- package/dist/RovingFocusItem-s7Ug6oxb.js +82 -0
- package/dist/SelectValue.vue_vue_type_script_setup_true_lang-CVsYrN1R.js +1255 -0
- package/dist/Separator-DRam5i7g.js +54 -0
- package/dist/Separator.vue_vue_type_script_setup_true_lang-DGPbh6Dt.js +27 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-k1A7l6Y-.js +17 -0
- package/dist/Switch.vue_vue_type_script_setup_true_lang-94ZKgnTz.js +135 -0
- package/dist/Teleport-DnUewq5H.js +25 -0
- package/dist/Textarea.vue_vue_type_script_setup_true_lang-DKazues9.js +27 -0
- package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-CZ3AuN38.js +426 -0
- package/dist/VisuallyHidden-DMAU4heD.js +41 -0
- package/dist/VisuallyHiddenInput-DvJnsVHt.js +59 -0
- package/dist/_commonjsHelpers-B4e78b8K.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/array-CqVTtuYm.js +6 -0
- package/dist/arrays-4jDZqbdb.js +20 -0
- package/dist/check-C2tzJ0Gk.js +11 -0
- package/dist/chevron-down-CnpAlizg.js +13 -0
- package/dist/chevron-left-BOwFasou.js +13 -0
- package/dist/chevron-right-D308801z.js +13 -0
- package/dist/circle-A-6NpYiX.js +13 -0
- package/dist/clamp-BL1Rb24G.js +22 -0
- package/dist/constant-CuDQlTIy.js +3433 -0
- package/dist/createContext-CZEfaSVa.js +17 -0
- package/dist/createLucideIcon-eXqDwUWj.js +71 -0
- package/dist/ellipsis-CEG9G7eN.js +15 -0
- package/dist/getActiveElement-B-HWdUIb.js +11 -0
- package/dist/handleAndDispatchCustomEvent-Byh08EHr.js +11 -0
- package/dist/index-B3LW8uSH.js +133 -0
- package/dist/index-BIlpXuWX.js +3430 -0
- package/dist/index-BlGEiPHj.js +1246 -0
- package/dist/index-BwPb_idr.js +574 -0
- package/dist/index-C9julNQm.js +173 -0
- package/dist/index-C_aI-Wfj.js +34 -0
- package/dist/index-CumjCvqB.js +5703 -0
- package/dist/index-LqWMCtOd.js +809 -0
- package/dist/index-OpE2oGce.js +110 -0
- package/dist/index.js +3 -3
- package/dist/isValueEqualOrExist-BDSMUv8t.js +8 -0
- package/dist/lib/utils.js +5 -0
- package/dist/nullish-CjWwlQS3.js +6 -0
- package/dist/ohash.D__AXeF1-DX2n0b2C.js +106 -0
- package/dist/plus-CgluTYQY.js +14 -0
- package/dist/text-zwICaAnx.js +743 -0
- package/dist/ui/accordion/index.js +7 -0
- package/dist/ui/alert/index.js +64 -0
- package/dist/ui/alert-dialog/index.js +356 -0
- package/dist/ui/aspect-ratio/index.js +50 -0
- package/dist/ui/auto-form/constant.js +5 -0
- package/dist/ui/auto-form/dependencies.js +61 -0
- package/dist/ui/auto-form/index.js +227 -0
- package/dist/ui/auto-form/interface.js +4 -0
- package/dist/ui/auto-form/utils.js +89 -0
- package/dist/ui/avatar/index.js +189 -0
- package/dist/ui/badge/index.js +37 -0
- package/dist/ui/breadcrumb/index.js +126 -0
- package/dist/ui/button/index.js +55 -0
- package/dist/ui/calendar/index.js +15 -0
- package/dist/ui/card/index.js +38 -0
- package/dist/ui/carousel/index.js +174 -0
- package/dist/ui/carousel/interface.js +1 -0
- package/dist/ui/carousel/useCarousel.js +1288 -0
- package/dist/ui/chart/index.js +8 -0
- package/dist/ui/chart/interface.js +1 -0
- package/dist/ui/chart-area/index.js +331 -0
- package/dist/ui/chart-bar/index.js +490 -0
- package/dist/ui/chart-donut/index.js +509 -0
- package/dist/ui/chart-line/index.js +110 -0
- package/dist/ui/checkbox/index.js +4 -0
- package/dist/ui/collapsible/index.js +60 -0
- package/dist/ui/combobox/index.js +877 -0
- package/dist/ui/command/index.js +323 -0
- package/dist/ui/context-menu/index.js +734 -0
- package/dist/ui/dialog/index.js +169 -0
- package/dist/ui/drawer/index.js +971 -0
- package/dist/ui/dropdown-menu/index.js +723 -0
- package/dist/ui/form/index.js +13 -0
- package/dist/ui/form/injectionKeys.js +4 -0
- package/dist/ui/form/useFormField.js +25 -0
- package/dist/ui/hover-card/index.js +331 -0
- package/dist/ui/input/index.js +4 -0
- package/dist/ui/label/index.js +4 -0
- package/dist/ui/menubar/index.js +862 -0
- package/dist/ui/navigation-menu/index.js +873 -0
- package/dist/ui/number-field/index.js +682 -0
- package/dist/ui/pagination/index.js +444 -0
- package/dist/ui/pin-input/index.js +308 -0
- package/dist/ui/popover/index.js +6 -0
- package/dist/ui/progress/index.js +137 -0
- package/dist/ui/radio-group/index.js +5 -0
- package/dist/ui/range-calendar/index.js +986 -0
- package/dist/ui/resizable/index.js +1432 -0
- package/dist/ui/scroll-area/index.js +775 -0
- package/dist/ui/select/index.js +135 -0
- package/dist/ui/separator/index.js +4 -0
- package/dist/ui/sheet/index.js +188 -0
- package/dist/ui/sidebar/index.js +652 -0
- package/dist/ui/sidebar/utils.js +12 -0
- package/dist/ui/skeleton/index.js +4 -0
- package/dist/ui/slider/index.js +478 -0
- package/dist/ui/sonner/index.js +892 -0
- package/dist/ui/stepper/index.js +442 -0
- package/dist/ui/switch/index.js +4 -0
- package/dist/ui/table/index.js +153 -0
- package/dist/ui/tabs/index.js +280 -0
- package/dist/ui/tags-input/index.js +449 -0
- package/dist/ui/textarea/index.js +4 -0
- package/dist/ui/toast/index.js +738 -0
- package/dist/ui/toast/use-toast.js +85 -0
- package/dist/ui/toggle/index.js +6 -0
- package/dist/ui/toggle-group/index.js +112 -0
- package/dist/ui/tooltip/index.js +29 -0
- package/dist/useArrowNavigation-BRMPveaB.js +49 -0
- package/dist/useBodyScrollLock-CazCRZjZ.js +153 -0
- package/dist/useDirection-C3C_TLKm.js +14 -0
- package/dist/useFocusGuards-CyjC9cG9.js +26 -0
- package/dist/useFormControl-CFVC51Lp.js +11 -0
- package/dist/useForwardExpose-DZT6mL_U.js +37 -0
- package/dist/useForwardPropsEmits-0XKBv1pB.js +33 -0
- package/dist/useGraceArea-D7-GP1ii.js +137 -0
- package/dist/useId-reAg216X.js +13 -0
- package/dist/useKbd-BJNupnml.js +41 -0
- package/dist/useLocale-BfU0LC8Z.js +14 -0
- package/dist/useNonce-C1ZOgOp5.js +14 -0
- package/dist/usePrimitiveElement-BjwUvHih.js +15 -0
- package/dist/useSingleOrMultipleValue-BkTAaaJB.js +43 -0
- package/dist/useSize-BnyQ8FZF.js +37 -0
- package/dist/useTypeahead-oSidjyFF.js +40 -0
- package/dist/utils-DKNaYMZh.js +57 -0
- package/dist/utils-Dx9la83v.js +35 -0
- package/dist/utils-DxQ_ywGa.js +55 -0
- package/dist/utils-SFgRDk1R.js +2748 -0
- package/dist/utils-W-UiqiPE.js +1869 -0
- package/dist/vee-validate-Cf8JDJ_k.js +2232 -0
- package/dist/x-Cl6YllUK.js +14 -0
- package/package.json +264 -2
|
@@ -0,0 +1,1432 @@
|
|
|
1
|
+
import { watchEffect as oe, defineComponent as se, toRefs as Be, ref as $, computed as te, watch as we, createBlock as ue, openBlock as Z, unref as P, normalizeStyle as Ne, withCtx as ce, renderSlot as ve, onMounted as ft, onUnmounted as pt, mergeProps as Ge, createElementBlock as mt, createCommentVNode as vt, createVNode as ht } from "vue";
|
|
2
|
+
import { c as He } from "../../utils-SFgRDk1R.js";
|
|
3
|
+
import { u as $e } from "../../useForwardPropsEmits-0XKBv1pB.js";
|
|
4
|
+
import { u as Fe } from "../../useForwardExpose-DZT6mL_U.js";
|
|
5
|
+
import { u as Ee } from "../../useId-reAg216X.js";
|
|
6
|
+
import { P as Pe } from "../../Primitive-B3twiLO1.js";
|
|
7
|
+
import { c as gt } from "../../createContext-CZEfaSVa.js";
|
|
8
|
+
import { u as yt } from "../../useDirection-C3C_TLKm.js";
|
|
9
|
+
import { a as zt } from "../../arrays-4jDZqbdb.js";
|
|
10
|
+
import { c as St } from "../../createLucideIcon-eXqDwUWj.js";
|
|
11
|
+
import { r as Te } from "../../index-OpE2oGce.js";
|
|
12
|
+
function x(e, t = "Assertion failed!") {
|
|
13
|
+
if (!e)
|
|
14
|
+
throw console.error(t), new Error(t);
|
|
15
|
+
}
|
|
16
|
+
const de = typeof document < "u";
|
|
17
|
+
function Oe(e, t = document) {
|
|
18
|
+
var a;
|
|
19
|
+
if (!de)
|
|
20
|
+
return null;
|
|
21
|
+
if (t instanceof HTMLElement && ((a = t == null ? void 0 : t.dataset) == null ? void 0 : a.panelGroupId) === e)
|
|
22
|
+
return t;
|
|
23
|
+
const n = t.querySelector(
|
|
24
|
+
`[data-panel-group][data-panel-group-id="${e}"]`
|
|
25
|
+
);
|
|
26
|
+
return n || null;
|
|
27
|
+
}
|
|
28
|
+
function he(e, t = document) {
|
|
29
|
+
if (!de)
|
|
30
|
+
return null;
|
|
31
|
+
const n = t.querySelector(`[data-panel-resize-handle-id="${e}"]`);
|
|
32
|
+
return n || null;
|
|
33
|
+
}
|
|
34
|
+
function Ve(e, t, n = document) {
|
|
35
|
+
return de ? ie(e, n).findIndex(
|
|
36
|
+
(o) => o.getAttribute("data-panel-resize-handle-id") === t
|
|
37
|
+
) ?? null : null;
|
|
38
|
+
}
|
|
39
|
+
function ie(e, t = document) {
|
|
40
|
+
return de ? Array.from(
|
|
41
|
+
t.querySelectorAll(
|
|
42
|
+
`[data-panel-resize-handle-id][data-panel-group-id="${e}"]`
|
|
43
|
+
)
|
|
44
|
+
) : [];
|
|
45
|
+
}
|
|
46
|
+
function xt(e, t, n, a = document) {
|
|
47
|
+
var f, h;
|
|
48
|
+
const l = he(t, a), o = ie(e, a), i = l ? o.indexOf(l) : -1, r = ((f = n[i]) == null ? void 0 : f.id) ?? null, c = ((h = n[i + 1]) == null ? void 0 : h.id) ?? null;
|
|
49
|
+
return [r, c];
|
|
50
|
+
}
|
|
51
|
+
function je(e) {
|
|
52
|
+
return e.type === "keydown";
|
|
53
|
+
}
|
|
54
|
+
function Ke(e) {
|
|
55
|
+
return e.type.startsWith("mouse");
|
|
56
|
+
}
|
|
57
|
+
function Xe(e) {
|
|
58
|
+
return e.type.startsWith("touch");
|
|
59
|
+
}
|
|
60
|
+
function ge(e) {
|
|
61
|
+
if (Ke(e))
|
|
62
|
+
return {
|
|
63
|
+
x: e.clientX,
|
|
64
|
+
y: e.clientY
|
|
65
|
+
};
|
|
66
|
+
if (Xe(e)) {
|
|
67
|
+
const t = e.touches[0];
|
|
68
|
+
if (t && t.clientX && t.clientY)
|
|
69
|
+
return {
|
|
70
|
+
x: t.clientX,
|
|
71
|
+
y: t.clientY
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
x: Number.POSITIVE_INFINITY,
|
|
76
|
+
y: Number.POSITIVE_INFINITY
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function We(e, t) {
|
|
80
|
+
const n = e === "horizontal", { x: a, y: l } = ge(t);
|
|
81
|
+
return n ? a : l;
|
|
82
|
+
}
|
|
83
|
+
function bt(e, t, n, a, l) {
|
|
84
|
+
const o = n === "horizontal", i = he(t, l);
|
|
85
|
+
x(i);
|
|
86
|
+
const r = i.getAttribute("data-panel-group-id");
|
|
87
|
+
x(r);
|
|
88
|
+
const { initialCursorPosition: c } = a, f = We(n, e), h = Oe(r, l);
|
|
89
|
+
x(h);
|
|
90
|
+
const u = h.getBoundingClientRect(), m = o ? u.width : u.height;
|
|
91
|
+
return (f - c) / m * 100;
|
|
92
|
+
}
|
|
93
|
+
function wt(e, t, n, a, l, o) {
|
|
94
|
+
if (je(e)) {
|
|
95
|
+
const i = n === "horizontal";
|
|
96
|
+
let r = 0;
|
|
97
|
+
e.shiftKey ? r = 100 : r = l ?? 10;
|
|
98
|
+
let c = 0;
|
|
99
|
+
switch (e.key) {
|
|
100
|
+
case "ArrowDown":
|
|
101
|
+
c = i ? 0 : r;
|
|
102
|
+
break;
|
|
103
|
+
case "ArrowLeft":
|
|
104
|
+
c = i ? -r : 0;
|
|
105
|
+
break;
|
|
106
|
+
case "ArrowRight":
|
|
107
|
+
c = i ? r : 0;
|
|
108
|
+
break;
|
|
109
|
+
case "ArrowUp":
|
|
110
|
+
c = i ? 0 : -r;
|
|
111
|
+
break;
|
|
112
|
+
case "End":
|
|
113
|
+
c = 100;
|
|
114
|
+
break;
|
|
115
|
+
case "Home":
|
|
116
|
+
c = -100;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
return c;
|
|
120
|
+
} else
|
|
121
|
+
return a == null ? 0 : bt(
|
|
122
|
+
e,
|
|
123
|
+
t,
|
|
124
|
+
n,
|
|
125
|
+
a,
|
|
126
|
+
o
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
function Et({
|
|
130
|
+
layout: e,
|
|
131
|
+
panelsArray: t,
|
|
132
|
+
pivotIndices: n
|
|
133
|
+
}) {
|
|
134
|
+
let a = 0, l = 100, o = 0, i = 0;
|
|
135
|
+
const r = n[0];
|
|
136
|
+
x(r != null), t.forEach((u, m) => {
|
|
137
|
+
const { constraints: v } = u, { maxSize: g = 100, minSize: w = 0 } = v;
|
|
138
|
+
m === r ? (a = w, l = g) : (o += w, i += g);
|
|
139
|
+
});
|
|
140
|
+
const c = Math.min(l, 100 - o), f = Math.max(a, 100 - i), h = e[r];
|
|
141
|
+
return {
|
|
142
|
+
valueMax: c,
|
|
143
|
+
valueMin: f,
|
|
144
|
+
valueNow: h
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function Pt({
|
|
148
|
+
panelDataArray: e
|
|
149
|
+
}) {
|
|
150
|
+
const t = Array.from({ length: e.length }), n = e.map(
|
|
151
|
+
(o) => o.constraints
|
|
152
|
+
);
|
|
153
|
+
let a = 0, l = 100;
|
|
154
|
+
for (let o = 0; o < e.length; o++) {
|
|
155
|
+
const i = n[o];
|
|
156
|
+
x(i);
|
|
157
|
+
const { defaultSize: r } = i;
|
|
158
|
+
r != null && (a++, t[o] = r, l -= r);
|
|
159
|
+
}
|
|
160
|
+
for (let o = 0; o < e.length; o++) {
|
|
161
|
+
const i = n[o];
|
|
162
|
+
x(i);
|
|
163
|
+
const { defaultSize: r } = i;
|
|
164
|
+
if (r != null)
|
|
165
|
+
continue;
|
|
166
|
+
const c = e.length - a, f = l / c;
|
|
167
|
+
a++, t[o] = f, l -= f;
|
|
168
|
+
}
|
|
169
|
+
return t;
|
|
170
|
+
}
|
|
171
|
+
function ee(e, t, n) {
|
|
172
|
+
t.forEach((a, l) => {
|
|
173
|
+
const o = e[l];
|
|
174
|
+
x(o);
|
|
175
|
+
const { callbacks: i, constraints: r, id: c } = o, { collapsedSize: f = 0, collapsible: h } = r, u = n[c];
|
|
176
|
+
if (u == null || a !== u) {
|
|
177
|
+
n[c] = a;
|
|
178
|
+
const { onCollapse: m, onExpand: v, onResize: g } = i;
|
|
179
|
+
g && g(a, u), h && (m || v) && (v && (u == null || u === f) && a !== f && v(), m && (u == null || u !== f) && a === f && m());
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function It(e, t = 10) {
|
|
184
|
+
let n = null;
|
|
185
|
+
return (...l) => {
|
|
186
|
+
n !== null && clearTimeout(n), n = setTimeout(() => {
|
|
187
|
+
e(...l);
|
|
188
|
+
}, t);
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
const Ie = 10;
|
|
192
|
+
function le(e, t, n = Ie) {
|
|
193
|
+
e = Number.parseFloat(e.toFixed(n)), t = Number.parseFloat(t.toFixed(n));
|
|
194
|
+
const a = e - t;
|
|
195
|
+
return a === 0 ? 0 : a > 0 ? 1 : -1;
|
|
196
|
+
}
|
|
197
|
+
function N(e, t, n) {
|
|
198
|
+
return le(e, t, n) === 0;
|
|
199
|
+
}
|
|
200
|
+
function J({
|
|
201
|
+
panelConstraints: e,
|
|
202
|
+
panelIndex: t,
|
|
203
|
+
size: n
|
|
204
|
+
}) {
|
|
205
|
+
const a = e[t];
|
|
206
|
+
x(a != null);
|
|
207
|
+
const { collapsedSize: l = 0, collapsible: o, maxSize: i = 100, minSize: r = 0 } = a;
|
|
208
|
+
if (le(n, r) < 0)
|
|
209
|
+
if (o) {
|
|
210
|
+
const c = (l + r) / 2;
|
|
211
|
+
le(n, c) < 0 ? n = l : n = r;
|
|
212
|
+
} else
|
|
213
|
+
n = r;
|
|
214
|
+
return n = Math.min(i, n), n = Number.parseFloat(n.toFixed(Ie)), n;
|
|
215
|
+
}
|
|
216
|
+
function fe(e, t) {
|
|
217
|
+
if (e.length !== t.length)
|
|
218
|
+
return !1;
|
|
219
|
+
for (let n = 0; n < e.length; n++)
|
|
220
|
+
if (e[n] !== t[n])
|
|
221
|
+
return !1;
|
|
222
|
+
return !0;
|
|
223
|
+
}
|
|
224
|
+
function ne({
|
|
225
|
+
delta: e,
|
|
226
|
+
layout: t,
|
|
227
|
+
panelConstraints: n,
|
|
228
|
+
pivotIndices: a,
|
|
229
|
+
trigger: l
|
|
230
|
+
}) {
|
|
231
|
+
if (N(e, 0))
|
|
232
|
+
return t;
|
|
233
|
+
const o = [...t], [i, r] = a;
|
|
234
|
+
x(i != null), x(r != null);
|
|
235
|
+
let c = 0;
|
|
236
|
+
if (l === "keyboard") {
|
|
237
|
+
{
|
|
238
|
+
const h = e < 0 ? r : i, u = n[h];
|
|
239
|
+
if (x(u), u.collapsible) {
|
|
240
|
+
const m = t[h];
|
|
241
|
+
x(m != null);
|
|
242
|
+
const v = n[h];
|
|
243
|
+
x(v);
|
|
244
|
+
const { collapsedSize: g = 0, minSize: w = 0 } = v;
|
|
245
|
+
if (N(m, g)) {
|
|
246
|
+
const d = w - m;
|
|
247
|
+
le(d, Math.abs(e)) > 0 && (e = e < 0 ? 0 - d : d);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
{
|
|
252
|
+
const h = e < 0 ? i : r, u = n[h];
|
|
253
|
+
x(u);
|
|
254
|
+
const { collapsible: m } = u;
|
|
255
|
+
if (m) {
|
|
256
|
+
const v = t[h];
|
|
257
|
+
x(v != null);
|
|
258
|
+
const g = n[h];
|
|
259
|
+
x(g);
|
|
260
|
+
const { collapsedSize: w = 0, minSize: d = 0 } = g;
|
|
261
|
+
if (N(v, d)) {
|
|
262
|
+
const b = v - w;
|
|
263
|
+
le(b, Math.abs(e)) > 0 && (e = e < 0 ? 0 - b : b);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
{
|
|
269
|
+
const h = e < 0 ? 1 : -1;
|
|
270
|
+
let u = e < 0 ? r : i, m = 0;
|
|
271
|
+
for (; ; ) {
|
|
272
|
+
const g = t[u];
|
|
273
|
+
x(g != null);
|
|
274
|
+
const d = J({
|
|
275
|
+
panelConstraints: n,
|
|
276
|
+
panelIndex: u,
|
|
277
|
+
size: 100
|
|
278
|
+
}) - g;
|
|
279
|
+
if (m += d, u += h, u < 0 || u >= n.length)
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
const v = Math.min(Math.abs(e), Math.abs(m));
|
|
283
|
+
e = e < 0 ? 0 - v : v;
|
|
284
|
+
}
|
|
285
|
+
{
|
|
286
|
+
let u = e < 0 ? i : r;
|
|
287
|
+
for (; u >= 0 && u < n.length; ) {
|
|
288
|
+
const m = Math.abs(e) - Math.abs(c), v = t[u];
|
|
289
|
+
x(v != null);
|
|
290
|
+
const g = v - m, w = J({
|
|
291
|
+
panelConstraints: n,
|
|
292
|
+
panelIndex: u,
|
|
293
|
+
size: g
|
|
294
|
+
});
|
|
295
|
+
if (!N(v, w) && (c += v - w, o[u] = w, c.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3), void 0, {
|
|
296
|
+
numeric: !0
|
|
297
|
+
}) >= 0))
|
|
298
|
+
break;
|
|
299
|
+
e < 0 ? u-- : u++;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
if (N(c, 0))
|
|
303
|
+
return t;
|
|
304
|
+
{
|
|
305
|
+
const h = e < 0 ? r : i, u = t[h];
|
|
306
|
+
x(u != null);
|
|
307
|
+
const m = u + c, v = J({
|
|
308
|
+
panelConstraints: n,
|
|
309
|
+
panelIndex: h,
|
|
310
|
+
size: m
|
|
311
|
+
});
|
|
312
|
+
if (o[h] = v, !N(v, m)) {
|
|
313
|
+
let g = m - v, d = e < 0 ? r : i;
|
|
314
|
+
for (; d >= 0 && d < n.length; ) {
|
|
315
|
+
const b = o[d];
|
|
316
|
+
x(b != null);
|
|
317
|
+
const L = b + g, I = J({
|
|
318
|
+
panelConstraints: n,
|
|
319
|
+
panelIndex: d,
|
|
320
|
+
size: L
|
|
321
|
+
});
|
|
322
|
+
if (N(b, I) || (g -= I - b, o[d] = I), N(g, 0))
|
|
323
|
+
break;
|
|
324
|
+
e > 0 ? d-- : d++;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
const f = o.reduce((h, u) => u + h, 0);
|
|
329
|
+
return N(f, 100) ? o : t;
|
|
330
|
+
}
|
|
331
|
+
function Ue(e, t, n) {
|
|
332
|
+
const a = Ve(
|
|
333
|
+
e,
|
|
334
|
+
t,
|
|
335
|
+
n
|
|
336
|
+
);
|
|
337
|
+
return a != null ? [a, a + 1] : [-1, -1];
|
|
338
|
+
}
|
|
339
|
+
function Ct(e, t, n) {
|
|
340
|
+
return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
|
|
341
|
+
}
|
|
342
|
+
function kt(e, t) {
|
|
343
|
+
if (e === t)
|
|
344
|
+
throw new Error("Cannot compare node with itself");
|
|
345
|
+
const n = {
|
|
346
|
+
a: De(e),
|
|
347
|
+
b: De(t)
|
|
348
|
+
};
|
|
349
|
+
let a;
|
|
350
|
+
for (; n.a.at(-1) === n.b.at(-1); )
|
|
351
|
+
e = n.a.pop(), t = n.b.pop(), a = e;
|
|
352
|
+
x(a);
|
|
353
|
+
const l = {
|
|
354
|
+
a: Me(Re(n.a)),
|
|
355
|
+
b: Me(Re(n.b))
|
|
356
|
+
};
|
|
357
|
+
if (l.a === l.b) {
|
|
358
|
+
const o = a.childNodes, i = {
|
|
359
|
+
a: n.a.at(-1),
|
|
360
|
+
b: n.b.at(-1)
|
|
361
|
+
};
|
|
362
|
+
let r = o.length;
|
|
363
|
+
for (; r--; ) {
|
|
364
|
+
const c = o[r];
|
|
365
|
+
if (c === i.a)
|
|
366
|
+
return 1;
|
|
367
|
+
if (c === i.b)
|
|
368
|
+
return -1;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return Math.sign(l.a - l.b);
|
|
372
|
+
}
|
|
373
|
+
const At = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
374
|
+
function Lt(e) {
|
|
375
|
+
const t = getComputedStyle(qe(e)).display;
|
|
376
|
+
return t === "flex" || t === "inline-flex";
|
|
377
|
+
}
|
|
378
|
+
function Rt(e) {
|
|
379
|
+
const t = getComputedStyle(e);
|
|
380
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || Lt(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || At.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
381
|
+
}
|
|
382
|
+
function Re(e) {
|
|
383
|
+
let t = e.length;
|
|
384
|
+
for (; t--; ) {
|
|
385
|
+
const n = e[t];
|
|
386
|
+
if (x(n), Rt(n))
|
|
387
|
+
return n;
|
|
388
|
+
}
|
|
389
|
+
return null;
|
|
390
|
+
}
|
|
391
|
+
function Me(e) {
|
|
392
|
+
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
393
|
+
}
|
|
394
|
+
function De(e) {
|
|
395
|
+
const t = [];
|
|
396
|
+
for (; e; )
|
|
397
|
+
t.push(e), e = qe(e);
|
|
398
|
+
return t;
|
|
399
|
+
}
|
|
400
|
+
function qe(e) {
|
|
401
|
+
var t;
|
|
402
|
+
return e.parentNode instanceof DocumentFragment && ((t = e.parentNode) == null ? void 0 : t.host) || e.parentNode;
|
|
403
|
+
}
|
|
404
|
+
let be = null, q = null;
|
|
405
|
+
function Mt(e, t) {
|
|
406
|
+
if (t) {
|
|
407
|
+
const n = (t & Je) !== 0, a = (t & Ze) !== 0, l = (t & Qe) !== 0, o = (t & et) !== 0;
|
|
408
|
+
if (n)
|
|
409
|
+
return l ? "se-resize" : o ? "ne-resize" : "e-resize";
|
|
410
|
+
if (a)
|
|
411
|
+
return l ? "sw-resize" : o ? "nw-resize" : "w-resize";
|
|
412
|
+
if (l)
|
|
413
|
+
return "s-resize";
|
|
414
|
+
if (o)
|
|
415
|
+
return "n-resize";
|
|
416
|
+
}
|
|
417
|
+
switch (e) {
|
|
418
|
+
case "horizontal":
|
|
419
|
+
return "ew-resize";
|
|
420
|
+
case "intersection":
|
|
421
|
+
return "move";
|
|
422
|
+
case "vertical":
|
|
423
|
+
return "ns-resize";
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
function Ye() {
|
|
427
|
+
q !== null && (document.head.removeChild(q), be = null, q = null);
|
|
428
|
+
}
|
|
429
|
+
function Se(e, t) {
|
|
430
|
+
const n = Mt(e, t);
|
|
431
|
+
be !== n && (be = n, q === null && (q = document.createElement("style"), document.head.appendChild(q)), q.innerHTML = `*{cursor: ${n}!important;}`);
|
|
432
|
+
}
|
|
433
|
+
function Dt({
|
|
434
|
+
defaultSize: e,
|
|
435
|
+
dragState: t,
|
|
436
|
+
layout: n,
|
|
437
|
+
panelData: a,
|
|
438
|
+
panelIndex: l,
|
|
439
|
+
precision: o = 3
|
|
440
|
+
}) {
|
|
441
|
+
const i = n[l];
|
|
442
|
+
let r;
|
|
443
|
+
return i == null ? r = e !== void 0 ? e.toPrecision(o) : "1" : a.length === 1 ? r = "1" : r = i.toPrecision(o), {
|
|
444
|
+
flexBasis: 0,
|
|
445
|
+
flexGrow: r,
|
|
446
|
+
flexShrink: 1,
|
|
447
|
+
// Without this, Panel sizes may be unintentionally overridden by their content
|
|
448
|
+
overflow: "hidden",
|
|
449
|
+
// Disable pointer events inside of a panel during resize
|
|
450
|
+
// This avoid edge cases like nested iframes
|
|
451
|
+
pointerEvents: t !== null ? "none" : void 0
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
const Je = 1, Ze = 2, Qe = 4, et = 8;
|
|
455
|
+
function _t() {
|
|
456
|
+
if (typeof matchMedia == "function")
|
|
457
|
+
return matchMedia("(pointer:coarse)").matches ? "coarse" : "fine";
|
|
458
|
+
}
|
|
459
|
+
const Bt = _t() === "coarse", K = [];
|
|
460
|
+
let ye = !1;
|
|
461
|
+
const j = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Set();
|
|
462
|
+
function Nt(e, t, n, a, l) {
|
|
463
|
+
const { ownerDocument: o } = t, i = {
|
|
464
|
+
direction: n,
|
|
465
|
+
element: t,
|
|
466
|
+
hitAreaMargins: a,
|
|
467
|
+
setResizeHandlerState: l
|
|
468
|
+
}, r = j.get(o) ?? 0;
|
|
469
|
+
return j.set(o, r + 1), re.add(i), me(), function() {
|
|
470
|
+
ze.delete(e), re.delete(i);
|
|
471
|
+
const f = j.get(o) ?? 1;
|
|
472
|
+
j.set(o, f - 1), me(), Ye(), f === 1 && j.delete(o);
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
function pe(e) {
|
|
476
|
+
const { target: t } = e, { x: n, y: a } = ge(e);
|
|
477
|
+
ye = !0, Ce({ target: t, x: n, y: a }), me(), K.length > 0 && (ke("down", e), e.preventDefault());
|
|
478
|
+
}
|
|
479
|
+
function O(e) {
|
|
480
|
+
const { x: t, y: n } = ge(e);
|
|
481
|
+
if (!ye) {
|
|
482
|
+
const { target: a } = e;
|
|
483
|
+
Ce({ target: a, x: t, y: n });
|
|
484
|
+
}
|
|
485
|
+
ke("move", e), tt(), K.length > 0 && e.preventDefault();
|
|
486
|
+
}
|
|
487
|
+
function V(e) {
|
|
488
|
+
const { target: t } = e, { x: n, y: a } = ge(e);
|
|
489
|
+
ze.clear(), ye = !1, K.length > 0 && e.preventDefault(), ke("up", e), Ce({ target: t, x: n, y: a }), tt(), me();
|
|
490
|
+
}
|
|
491
|
+
function Ce({
|
|
492
|
+
target: e,
|
|
493
|
+
x: t,
|
|
494
|
+
y: n
|
|
495
|
+
}) {
|
|
496
|
+
K.splice(0);
|
|
497
|
+
let a = null;
|
|
498
|
+
e instanceof HTMLElement && (a = e), re.forEach((l) => {
|
|
499
|
+
const { element: o, hitAreaMargins: i } = l, r = o.getBoundingClientRect(), { bottom: c, left: f, right: h, top: u } = r, m = Bt ? i.coarse : i.fine;
|
|
500
|
+
if (t >= f - m && t <= h + m && n >= u - m && n <= c + m) {
|
|
501
|
+
if (a !== null && o !== a && !o.contains(a) && !a.contains(o) && kt(a, o) > 0) {
|
|
502
|
+
let g = a, w = !1;
|
|
503
|
+
for (; g && !g.contains(o); ) {
|
|
504
|
+
if (Ct(
|
|
505
|
+
g.getBoundingClientRect(),
|
|
506
|
+
r
|
|
507
|
+
)) {
|
|
508
|
+
w = !0;
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
g = g.parentElement;
|
|
512
|
+
}
|
|
513
|
+
if (w)
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
K.push(l);
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
function xe(e, t) {
|
|
521
|
+
ze.set(e, t);
|
|
522
|
+
}
|
|
523
|
+
function tt() {
|
|
524
|
+
let e = !1, t = !1;
|
|
525
|
+
K.forEach((a) => {
|
|
526
|
+
const { direction: l } = a;
|
|
527
|
+
l.value === "horizontal" ? e = !0 : t = !0;
|
|
528
|
+
});
|
|
529
|
+
let n = 0;
|
|
530
|
+
ze.forEach((a) => {
|
|
531
|
+
n |= a;
|
|
532
|
+
}), e && t ? Se("intersection", n) : e ? Se("horizontal", n) : t ? Se("vertical", n) : Ye();
|
|
533
|
+
}
|
|
534
|
+
function me() {
|
|
535
|
+
j.forEach((e, t) => {
|
|
536
|
+
const { body: n } = t;
|
|
537
|
+
n.removeEventListener("contextmenu", V), n.removeEventListener("mousedown", pe), n.removeEventListener("mouseleave", O), n.removeEventListener("mousemove", O), n.removeEventListener("touchmove", O), n.removeEventListener("touchstart", pe);
|
|
538
|
+
}), window.removeEventListener("mouseup", V), window.removeEventListener("touchcancel", V), window.removeEventListener("touchend", V), re.size > 0 && (ye ? (K.length > 0 && j.forEach((e, t) => {
|
|
539
|
+
const { body: n } = t;
|
|
540
|
+
e > 0 && (n.addEventListener("contextmenu", V), n.addEventListener("mouseleave", O), n.addEventListener("mousemove", O), n.addEventListener("touchmove", O, {
|
|
541
|
+
passive: !1
|
|
542
|
+
}));
|
|
543
|
+
}), window.addEventListener("mouseup", V), window.addEventListener("touchcancel", V), window.addEventListener("touchend", V)) : j.forEach((e, t) => {
|
|
544
|
+
const { body: n } = t;
|
|
545
|
+
e > 0 && (n.addEventListener("mousedown", pe), n.addEventListener("mousemove", O), n.addEventListener("touchmove", O, {
|
|
546
|
+
passive: !1
|
|
547
|
+
}), n.addEventListener("touchstart", pe));
|
|
548
|
+
}));
|
|
549
|
+
}
|
|
550
|
+
function ke(e, t) {
|
|
551
|
+
re.forEach((n) => {
|
|
552
|
+
const { setResizeHandlerState: a } = n, l = K.includes(n);
|
|
553
|
+
a(e, l, t);
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
function Gt({
|
|
557
|
+
layout: e,
|
|
558
|
+
panelConstraints: t
|
|
559
|
+
}) {
|
|
560
|
+
const n = [...e], a = n.reduce(
|
|
561
|
+
(o, i) => o + i,
|
|
562
|
+
0
|
|
563
|
+
);
|
|
564
|
+
if (n.length !== t.length)
|
|
565
|
+
throw new Error(
|
|
566
|
+
`Invalid ${t.length} panel layout: ${n.map((o) => `${o}%`).join(", ")}`
|
|
567
|
+
);
|
|
568
|
+
if (!N(a, 100)) {
|
|
569
|
+
console.warn(
|
|
570
|
+
`WARNING: Invalid layout total size: ${n.map((o) => `${o}%`).join(", ")}. Layout normalization will be applied.`
|
|
571
|
+
);
|
|
572
|
+
for (let o = 0; o < t.length; o++) {
|
|
573
|
+
const i = n[o];
|
|
574
|
+
x(i != null);
|
|
575
|
+
const r = 100 / a * i;
|
|
576
|
+
n[o] = r;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
let l = 0;
|
|
580
|
+
for (let o = 0; o < t.length; o++) {
|
|
581
|
+
const i = n[o];
|
|
582
|
+
x(i != null);
|
|
583
|
+
const r = J({
|
|
584
|
+
panelConstraints: t,
|
|
585
|
+
panelIndex: o,
|
|
586
|
+
size: i
|
|
587
|
+
});
|
|
588
|
+
i !== r && (l += i - r, n[o] = r);
|
|
589
|
+
}
|
|
590
|
+
if (!N(l, 0))
|
|
591
|
+
for (let o = 0; o < t.length; o++) {
|
|
592
|
+
const i = n[o];
|
|
593
|
+
x(i != null);
|
|
594
|
+
const r = i + l, c = J({
|
|
595
|
+
panelConstraints: t,
|
|
596
|
+
panelIndex: o,
|
|
597
|
+
size: r
|
|
598
|
+
});
|
|
599
|
+
if (i !== c && (l -= c - i, n[o] = c, N(l, 0)))
|
|
600
|
+
break;
|
|
601
|
+
}
|
|
602
|
+
return n;
|
|
603
|
+
}
|
|
604
|
+
function Ht({
|
|
605
|
+
eagerValuesRef: e,
|
|
606
|
+
groupId: t,
|
|
607
|
+
layout: n,
|
|
608
|
+
panelDataArray: a,
|
|
609
|
+
panelGroupElement: l,
|
|
610
|
+
setLayout: o
|
|
611
|
+
}) {
|
|
612
|
+
oe((i) => {
|
|
613
|
+
const r = l.value;
|
|
614
|
+
if (!r)
|
|
615
|
+
return;
|
|
616
|
+
const c = ie(
|
|
617
|
+
t,
|
|
618
|
+
r
|
|
619
|
+
);
|
|
620
|
+
for (let f = 0; f < a.length - 1; f++) {
|
|
621
|
+
const { valueMax: h, valueMin: u, valueNow: m } = Et({
|
|
622
|
+
layout: n.value,
|
|
623
|
+
panelsArray: a,
|
|
624
|
+
pivotIndices: [f, f + 1]
|
|
625
|
+
}), v = c[f];
|
|
626
|
+
if (v != null) {
|
|
627
|
+
const g = a[f];
|
|
628
|
+
x(g), v.setAttribute("aria-controls", g.id), v.setAttribute(
|
|
629
|
+
"aria-valuemax",
|
|
630
|
+
`${Math.round(h)}`
|
|
631
|
+
), v.setAttribute(
|
|
632
|
+
"aria-valuemin",
|
|
633
|
+
`${Math.round(u)}`
|
|
634
|
+
), v.setAttribute(
|
|
635
|
+
"aria-valuenow",
|
|
636
|
+
m != null ? `${Math.round(m)}` : ""
|
|
637
|
+
);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
i(() => {
|
|
641
|
+
c.forEach((f) => {
|
|
642
|
+
f.removeAttribute("aria-controls"), f.removeAttribute("aria-valuemax"), f.removeAttribute("aria-valuemin"), f.removeAttribute("aria-valuenow");
|
|
643
|
+
});
|
|
644
|
+
});
|
|
645
|
+
}), oe((i) => {
|
|
646
|
+
const r = l.value;
|
|
647
|
+
if (!r)
|
|
648
|
+
return;
|
|
649
|
+
const c = e.value;
|
|
650
|
+
x(c);
|
|
651
|
+
const { panelDataArray: f } = c, h = Oe(t, r);
|
|
652
|
+
x(h != null, `No group found for id "${t}"`);
|
|
653
|
+
const u = ie(t, r);
|
|
654
|
+
x(u);
|
|
655
|
+
const m = u.map((v) => {
|
|
656
|
+
const g = v.getAttribute("data-panel-resize-handle-id");
|
|
657
|
+
x(g);
|
|
658
|
+
const [w, d] = xt(
|
|
659
|
+
t,
|
|
660
|
+
g,
|
|
661
|
+
f,
|
|
662
|
+
r
|
|
663
|
+
);
|
|
664
|
+
if (w == null || d == null)
|
|
665
|
+
return () => {
|
|
666
|
+
};
|
|
667
|
+
const b = (L) => {
|
|
668
|
+
if (!L.defaultPrevented)
|
|
669
|
+
switch (L.key) {
|
|
670
|
+
case "Enter": {
|
|
671
|
+
L.preventDefault();
|
|
672
|
+
const I = f.findIndex(
|
|
673
|
+
(B) => B.id === w
|
|
674
|
+
);
|
|
675
|
+
if (I >= 0) {
|
|
676
|
+
const B = f[I];
|
|
677
|
+
x(B);
|
|
678
|
+
const R = n.value[I], {
|
|
679
|
+
collapsedSize: G = 0,
|
|
680
|
+
collapsible: F,
|
|
681
|
+
minSize: C = 0
|
|
682
|
+
} = B.constraints;
|
|
683
|
+
if (R != null && F) {
|
|
684
|
+
const M = ne({
|
|
685
|
+
delta: N(R, G) ? C - G : G - R,
|
|
686
|
+
layout: n.value,
|
|
687
|
+
panelConstraints: f.map(
|
|
688
|
+
(Y) => Y.constraints
|
|
689
|
+
),
|
|
690
|
+
pivotIndices: Ue(
|
|
691
|
+
t,
|
|
692
|
+
g,
|
|
693
|
+
r
|
|
694
|
+
),
|
|
695
|
+
trigger: "keyboard"
|
|
696
|
+
});
|
|
697
|
+
n.value !== M && o(M);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
break;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
return v.addEventListener("keydown", b), () => {
|
|
705
|
+
v.removeEventListener("keydown", b);
|
|
706
|
+
};
|
|
707
|
+
});
|
|
708
|
+
i(() => {
|
|
709
|
+
m.forEach((v) => v());
|
|
710
|
+
});
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
function _e(e) {
|
|
714
|
+
try {
|
|
715
|
+
if (typeof localStorage < "u")
|
|
716
|
+
e.getItem = (t) => localStorage.getItem(t), e.setItem = (t, n) => {
|
|
717
|
+
localStorage.setItem(t, n);
|
|
718
|
+
};
|
|
719
|
+
else
|
|
720
|
+
throw new TypeError("localStorage not supported in this environment");
|
|
721
|
+
} catch (t) {
|
|
722
|
+
console.error(t), e.getItem = () => null, e.setItem = () => {
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
function nt(e) {
|
|
727
|
+
return `reka:${e}`;
|
|
728
|
+
}
|
|
729
|
+
function at(e) {
|
|
730
|
+
return e.map((t) => {
|
|
731
|
+
const { constraints: n, id: a, idIsFromProps: l, order: o } = t;
|
|
732
|
+
return l ? a : o ? `${o}:${JSON.stringify(n)}` : JSON.stringify(n);
|
|
733
|
+
}).sort((t, n) => t.localeCompare(n)).join(",");
|
|
734
|
+
}
|
|
735
|
+
function ot(e, t) {
|
|
736
|
+
try {
|
|
737
|
+
const n = nt(e), a = t.getItem(n);
|
|
738
|
+
if (a) {
|
|
739
|
+
const l = JSON.parse(a);
|
|
740
|
+
if (typeof l == "object" && l != null)
|
|
741
|
+
return l;
|
|
742
|
+
}
|
|
743
|
+
} catch {
|
|
744
|
+
}
|
|
745
|
+
return null;
|
|
746
|
+
}
|
|
747
|
+
function $t(e, t, n) {
|
|
748
|
+
const a = ot(e, n) ?? {}, l = at(t);
|
|
749
|
+
return a[l] ?? null;
|
|
750
|
+
}
|
|
751
|
+
function Ft(e, t, n, a, l) {
|
|
752
|
+
const o = nt(e), i = at(t), r = ot(e, l) ?? {};
|
|
753
|
+
r[i] = {
|
|
754
|
+
expandToSizes: Object.fromEntries(n.entries()),
|
|
755
|
+
layout: a
|
|
756
|
+
};
|
|
757
|
+
try {
|
|
758
|
+
l.setItem(o, JSON.stringify(r));
|
|
759
|
+
} catch (c) {
|
|
760
|
+
console.error(c);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
const Tt = 100, ae = {
|
|
764
|
+
getItem: (e) => (_e(ae), ae.getItem(e)),
|
|
765
|
+
setItem: (e, t) => {
|
|
766
|
+
_e(ae), ae.setItem(e, t);
|
|
767
|
+
}
|
|
768
|
+
}, [it, Ot] = gt("PanelGroup"), Vt = /* @__PURE__ */ se({
|
|
769
|
+
__name: "SplitterGroup",
|
|
770
|
+
props: {
|
|
771
|
+
id: {},
|
|
772
|
+
autoSaveId: { default: null },
|
|
773
|
+
direction: {},
|
|
774
|
+
keyboardResizeBy: { default: 10 },
|
|
775
|
+
storage: { default: () => ae },
|
|
776
|
+
asChild: { type: Boolean },
|
|
777
|
+
as: {}
|
|
778
|
+
},
|
|
779
|
+
emits: ["layout"],
|
|
780
|
+
setup(e, { emit: t }) {
|
|
781
|
+
const n = e, a = t, l = {}, { direction: o } = Be(n), i = Ee(n.id, "reka-splitter-group"), r = yt(), { forwardRef: c, currentElement: f } = Fe(), h = $(null), u = $([]), m = $({}), v = $(/* @__PURE__ */ new Map()), g = $(0), w = te(() => ({
|
|
782
|
+
autoSaveId: n.autoSaveId,
|
|
783
|
+
direction: n.direction,
|
|
784
|
+
dragState: h.value,
|
|
785
|
+
id: i,
|
|
786
|
+
keyboardResizeBy: n.keyboardResizeBy,
|
|
787
|
+
storage: n.storage
|
|
788
|
+
})), d = $({
|
|
789
|
+
layout: u.value,
|
|
790
|
+
panelDataArray: [],
|
|
791
|
+
panelDataArrayChanged: !1
|
|
792
|
+
}), b = (s) => u.value = s;
|
|
793
|
+
Ht({
|
|
794
|
+
eagerValuesRef: d,
|
|
795
|
+
groupId: i,
|
|
796
|
+
layout: u,
|
|
797
|
+
panelDataArray: d.value.panelDataArray,
|
|
798
|
+
setLayout: b,
|
|
799
|
+
panelGroupElement: f
|
|
800
|
+
}), oe(() => {
|
|
801
|
+
const { panelDataArray: s } = d.value, { autoSaveId: z } = n;
|
|
802
|
+
if (z) {
|
|
803
|
+
if (u.value.length === 0 || u.value.length !== s.length)
|
|
804
|
+
return;
|
|
805
|
+
let p = l[z];
|
|
806
|
+
p || (p = It(
|
|
807
|
+
Ft,
|
|
808
|
+
Tt
|
|
809
|
+
), l[z] = p);
|
|
810
|
+
const y = [...s], E = new Map(
|
|
811
|
+
v.value
|
|
812
|
+
);
|
|
813
|
+
p(
|
|
814
|
+
z,
|
|
815
|
+
y,
|
|
816
|
+
E,
|
|
817
|
+
u.value,
|
|
818
|
+
n.storage
|
|
819
|
+
);
|
|
820
|
+
}
|
|
821
|
+
});
|
|
822
|
+
function L(s, z) {
|
|
823
|
+
const { panelDataArray: p } = d.value, y = X(p, s);
|
|
824
|
+
return Dt({
|
|
825
|
+
defaultSize: z,
|
|
826
|
+
dragState: h.value,
|
|
827
|
+
layout: u.value,
|
|
828
|
+
panelData: p,
|
|
829
|
+
panelIndex: y
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
function I(s) {
|
|
833
|
+
const { panelDataArray: z } = d.value;
|
|
834
|
+
z.push(s), z.sort((p, y) => {
|
|
835
|
+
const E = p.order, S = y.order;
|
|
836
|
+
return E == null && S == null ? 0 : E == null ? -1 : S == null ? 1 : E - S;
|
|
837
|
+
}), d.value.panelDataArrayChanged = !0;
|
|
838
|
+
}
|
|
839
|
+
we(() => d.value.panelDataArrayChanged, () => {
|
|
840
|
+
if (d.value.panelDataArrayChanged) {
|
|
841
|
+
d.value.panelDataArrayChanged = !1;
|
|
842
|
+
const { autoSaveId: s, storage: z } = w.value, { layout: p, panelDataArray: y } = d.value;
|
|
843
|
+
let E = null;
|
|
844
|
+
if (s) {
|
|
845
|
+
const A = $t(s, y, z);
|
|
846
|
+
A && (v.value = new Map(
|
|
847
|
+
Object.entries(A.expandToSizes)
|
|
848
|
+
), E = A.layout);
|
|
849
|
+
}
|
|
850
|
+
E === null && (E = Pt({
|
|
851
|
+
panelDataArray: y
|
|
852
|
+
}));
|
|
853
|
+
const S = Gt({
|
|
854
|
+
layout: E,
|
|
855
|
+
panelConstraints: y.map(
|
|
856
|
+
(A) => A.constraints
|
|
857
|
+
)
|
|
858
|
+
});
|
|
859
|
+
zt(p, S) || (b(S), d.value.layout = S, a("layout", S), ee(
|
|
860
|
+
y,
|
|
861
|
+
S,
|
|
862
|
+
m.value
|
|
863
|
+
));
|
|
864
|
+
}
|
|
865
|
+
});
|
|
866
|
+
function B(s) {
|
|
867
|
+
return function(p) {
|
|
868
|
+
p.preventDefault();
|
|
869
|
+
const y = f.value;
|
|
870
|
+
if (!y)
|
|
871
|
+
return () => null;
|
|
872
|
+
const { direction: E, dragState: S, id: A, keyboardResizeBy: H } = w.value, { layout: D, panelDataArray: k } = d.value, { initialLayout: U } = S ?? {}, T = Ue(
|
|
873
|
+
A,
|
|
874
|
+
s,
|
|
875
|
+
y
|
|
876
|
+
);
|
|
877
|
+
let _ = wt(
|
|
878
|
+
p,
|
|
879
|
+
s,
|
|
880
|
+
E,
|
|
881
|
+
S,
|
|
882
|
+
H,
|
|
883
|
+
y
|
|
884
|
+
);
|
|
885
|
+
if (_ === 0)
|
|
886
|
+
return;
|
|
887
|
+
const Ae = E === "horizontal";
|
|
888
|
+
r.value === "rtl" && Ae && (_ = -_);
|
|
889
|
+
const ct = k.map((dt) => dt.constraints), Q = ne({
|
|
890
|
+
delta: _,
|
|
891
|
+
layout: U ?? D,
|
|
892
|
+
panelConstraints: ct,
|
|
893
|
+
pivotIndices: T,
|
|
894
|
+
trigger: je(p) ? "keyboard" : "mouse-or-touch"
|
|
895
|
+
}), Le = !fe(D, Q);
|
|
896
|
+
(Ke(p) || Xe(p)) && g.value !== _ && (g.value = _, Le ? xe(s, 0) : Ae ? xe(
|
|
897
|
+
s,
|
|
898
|
+
_ < 0 ? Je : Ze
|
|
899
|
+
) : xe(
|
|
900
|
+
s,
|
|
901
|
+
_ < 0 ? Qe : et
|
|
902
|
+
)), Le && (b(Q), d.value.layout = Q, a("layout", Q), ee(
|
|
903
|
+
k,
|
|
904
|
+
Q,
|
|
905
|
+
m.value
|
|
906
|
+
));
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
function R(s, z) {
|
|
910
|
+
const { layout: p, panelDataArray: y } = d.value, E = y.map((U) => U.constraints), { panelSize: S, pivotIndices: A } = W(
|
|
911
|
+
y,
|
|
912
|
+
s,
|
|
913
|
+
p
|
|
914
|
+
);
|
|
915
|
+
x(S != null);
|
|
916
|
+
const D = X(y, s) === y.length - 1 ? S - z : z - S, k = ne({
|
|
917
|
+
delta: D,
|
|
918
|
+
layout: p,
|
|
919
|
+
panelConstraints: E,
|
|
920
|
+
pivotIndices: A,
|
|
921
|
+
trigger: "imperative-api"
|
|
922
|
+
});
|
|
923
|
+
fe(p, k) || (b(k), d.value.layout = k, a("layout", k), ee(
|
|
924
|
+
y,
|
|
925
|
+
k,
|
|
926
|
+
m.value
|
|
927
|
+
));
|
|
928
|
+
}
|
|
929
|
+
function G(s, z) {
|
|
930
|
+
const { layout: p, panelDataArray: y } = d.value, E = X(y, s);
|
|
931
|
+
y[E] = s, d.value.panelDataArrayChanged = !0;
|
|
932
|
+
const {
|
|
933
|
+
collapsedSize: S = 0,
|
|
934
|
+
collapsible: A
|
|
935
|
+
} = z, {
|
|
936
|
+
collapsedSize: H = 0,
|
|
937
|
+
collapsible: D,
|
|
938
|
+
maxSize: k = 100,
|
|
939
|
+
minSize: U = 0
|
|
940
|
+
} = s.constraints, { panelSize: T } = W(
|
|
941
|
+
y,
|
|
942
|
+
s,
|
|
943
|
+
p
|
|
944
|
+
);
|
|
945
|
+
T !== null && (A && D && T === S ? S !== H && R(s, H) : T < U ? R(s, U) : T > k && R(s, k));
|
|
946
|
+
}
|
|
947
|
+
function F(s, z) {
|
|
948
|
+
const { direction: p } = w.value, { layout: y } = d.value;
|
|
949
|
+
if (!f.value)
|
|
950
|
+
return;
|
|
951
|
+
const E = he(
|
|
952
|
+
s,
|
|
953
|
+
f.value
|
|
954
|
+
);
|
|
955
|
+
x(E);
|
|
956
|
+
const S = We(
|
|
957
|
+
p,
|
|
958
|
+
z
|
|
959
|
+
);
|
|
960
|
+
h.value = {
|
|
961
|
+
dragHandleId: s,
|
|
962
|
+
dragHandleRect: E.getBoundingClientRect(),
|
|
963
|
+
initialCursorPosition: S,
|
|
964
|
+
initialLayout: y
|
|
965
|
+
};
|
|
966
|
+
}
|
|
967
|
+
function C() {
|
|
968
|
+
h.value = null;
|
|
969
|
+
}
|
|
970
|
+
function M(s) {
|
|
971
|
+
const { panelDataArray: z } = d.value, p = X(z, s);
|
|
972
|
+
p >= 0 && (z.splice(p, 1), delete m.value[s.id], d.value.panelDataArrayChanged = !0);
|
|
973
|
+
}
|
|
974
|
+
function Y(s) {
|
|
975
|
+
const { layout: z, panelDataArray: p } = d.value;
|
|
976
|
+
if (s.constraints.collapsible) {
|
|
977
|
+
const y = p.map(
|
|
978
|
+
(H) => H.constraints
|
|
979
|
+
), {
|
|
980
|
+
collapsedSize: E = 0,
|
|
981
|
+
panelSize: S,
|
|
982
|
+
pivotIndices: A
|
|
983
|
+
} = W(p, s, z);
|
|
984
|
+
if (x(
|
|
985
|
+
S != null,
|
|
986
|
+
`Panel size not found for panel "${s.id}"`
|
|
987
|
+
), S !== E) {
|
|
988
|
+
v.value.set(s.id, S);
|
|
989
|
+
const D = X(p, s) === p.length - 1 ? S - E : E - S, k = ne({
|
|
990
|
+
delta: D,
|
|
991
|
+
layout: z,
|
|
992
|
+
panelConstraints: y,
|
|
993
|
+
pivotIndices: A,
|
|
994
|
+
trigger: "imperative-api"
|
|
995
|
+
});
|
|
996
|
+
fe(z, k) || (b(k), d.value.layout = k, a("layout", k), ee(
|
|
997
|
+
p,
|
|
998
|
+
k,
|
|
999
|
+
m.value
|
|
1000
|
+
));
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
function lt(s) {
|
|
1005
|
+
const { layout: z, panelDataArray: p } = d.value;
|
|
1006
|
+
if (s.constraints.collapsible) {
|
|
1007
|
+
const y = p.map(
|
|
1008
|
+
(D) => D.constraints
|
|
1009
|
+
), {
|
|
1010
|
+
collapsedSize: E = 0,
|
|
1011
|
+
panelSize: S,
|
|
1012
|
+
minSize: A = 0,
|
|
1013
|
+
pivotIndices: H
|
|
1014
|
+
} = W(p, s, z);
|
|
1015
|
+
if (S === E) {
|
|
1016
|
+
const D = v.value.get(
|
|
1017
|
+
s.id
|
|
1018
|
+
), k = D != null && D >= A ? D : A, T = X(p, s) === p.length - 1 ? S - k : k - S, _ = ne({
|
|
1019
|
+
delta: T,
|
|
1020
|
+
layout: z,
|
|
1021
|
+
panelConstraints: y,
|
|
1022
|
+
pivotIndices: H,
|
|
1023
|
+
trigger: "imperative-api"
|
|
1024
|
+
});
|
|
1025
|
+
fe(z, _) || (b(_), d.value.layout = _, a("layout", _), ee(
|
|
1026
|
+
p,
|
|
1027
|
+
_,
|
|
1028
|
+
m.value
|
|
1029
|
+
));
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
function rt(s) {
|
|
1034
|
+
const { layout: z, panelDataArray: p } = d.value, { panelSize: y } = W(p, s, z);
|
|
1035
|
+
return x(
|
|
1036
|
+
y != null,
|
|
1037
|
+
`Panel size not found for panel "${s.id}"`
|
|
1038
|
+
), y;
|
|
1039
|
+
}
|
|
1040
|
+
function st(s) {
|
|
1041
|
+
const { layout: z, panelDataArray: p } = d.value, {
|
|
1042
|
+
collapsedSize: y = 0,
|
|
1043
|
+
collapsible: E,
|
|
1044
|
+
panelSize: S
|
|
1045
|
+
} = W(p, s, z);
|
|
1046
|
+
return E ? S === void 0 ? s.constraints.defaultSize === s.constraints.collapsedSize : S === y : !1;
|
|
1047
|
+
}
|
|
1048
|
+
function ut(s) {
|
|
1049
|
+
const { layout: z, panelDataArray: p } = d.value, {
|
|
1050
|
+
collapsedSize: y = 0,
|
|
1051
|
+
collapsible: E,
|
|
1052
|
+
panelSize: S
|
|
1053
|
+
} = W(p, s, z);
|
|
1054
|
+
return x(
|
|
1055
|
+
S != null,
|
|
1056
|
+
`Panel size not found for panel "${s.id}"`
|
|
1057
|
+
), !E || S > y;
|
|
1058
|
+
}
|
|
1059
|
+
Ot({
|
|
1060
|
+
direction: o,
|
|
1061
|
+
dragState: h.value,
|
|
1062
|
+
groupId: i,
|
|
1063
|
+
reevaluatePanelConstraints: G,
|
|
1064
|
+
registerPanel: I,
|
|
1065
|
+
registerResizeHandle: B,
|
|
1066
|
+
resizePanel: R,
|
|
1067
|
+
startDragging: F,
|
|
1068
|
+
stopDragging: C,
|
|
1069
|
+
unregisterPanel: M,
|
|
1070
|
+
panelGroupElement: f,
|
|
1071
|
+
collapsePanel: Y,
|
|
1072
|
+
expandPanel: lt,
|
|
1073
|
+
isPanelCollapsed: st,
|
|
1074
|
+
isPanelExpanded: ut,
|
|
1075
|
+
getPanelSize: rt,
|
|
1076
|
+
getPanelStyle: L
|
|
1077
|
+
});
|
|
1078
|
+
function X(s, z) {
|
|
1079
|
+
return s.findIndex(
|
|
1080
|
+
(p) => p === z || p.id === z.id
|
|
1081
|
+
);
|
|
1082
|
+
}
|
|
1083
|
+
function W(s, z, p) {
|
|
1084
|
+
const y = X(s, z), S = y === s.length - 1 ? [y - 1, y] : [y, y + 1], A = p[y];
|
|
1085
|
+
return {
|
|
1086
|
+
...z.constraints,
|
|
1087
|
+
panelSize: A,
|
|
1088
|
+
pivotIndices: S
|
|
1089
|
+
};
|
|
1090
|
+
}
|
|
1091
|
+
return (s, z) => (Z(), ue(P(Pe), {
|
|
1092
|
+
ref: P(c),
|
|
1093
|
+
as: s.as,
|
|
1094
|
+
"as-child": s.asChild,
|
|
1095
|
+
style: Ne({
|
|
1096
|
+
display: "flex",
|
|
1097
|
+
flexDirection: P(o) === "horizontal" ? "row" : "column",
|
|
1098
|
+
height: "100%",
|
|
1099
|
+
overflow: "hidden",
|
|
1100
|
+
width: "100%"
|
|
1101
|
+
}),
|
|
1102
|
+
"data-panel-group": "",
|
|
1103
|
+
"data-orientation": P(o),
|
|
1104
|
+
"data-panel-group-id": P(i)
|
|
1105
|
+
}, {
|
|
1106
|
+
default: ce(() => [
|
|
1107
|
+
ve(s.$slots, "default", { layout: u.value })
|
|
1108
|
+
]),
|
|
1109
|
+
_: 3
|
|
1110
|
+
}, 8, ["as", "as-child", "style", "data-orientation", "data-panel-group-id"]));
|
|
1111
|
+
}
|
|
1112
|
+
}), ln = /* @__PURE__ */ se({
|
|
1113
|
+
__name: "SplitterPanel",
|
|
1114
|
+
props: {
|
|
1115
|
+
collapsedSize: {},
|
|
1116
|
+
collapsible: { type: Boolean },
|
|
1117
|
+
defaultSize: {},
|
|
1118
|
+
id: {},
|
|
1119
|
+
maxSize: {},
|
|
1120
|
+
minSize: {},
|
|
1121
|
+
order: {},
|
|
1122
|
+
asChild: { type: Boolean },
|
|
1123
|
+
as: {}
|
|
1124
|
+
},
|
|
1125
|
+
emits: ["collapse", "expand", "resize"],
|
|
1126
|
+
setup(e, { expose: t, emit: n }) {
|
|
1127
|
+
const a = e, l = n, o = it();
|
|
1128
|
+
if (o === null)
|
|
1129
|
+
throw new Error(
|
|
1130
|
+
"SplitterPanel components must be rendered within a SplitterGroup container"
|
|
1131
|
+
);
|
|
1132
|
+
const { collapsePanel: i, expandPanel: r, getPanelSize: c, getPanelStyle: f, isPanelCollapsed: h, resizePanel: u, groupId: m, reevaluatePanelConstraints: v, registerPanel: g, unregisterPanel: w } = o, d = Ee(a.id, "reka-splitter-panel"), b = te(() => ({
|
|
1133
|
+
callbacks: {
|
|
1134
|
+
onCollapse: () => l("collapse"),
|
|
1135
|
+
onExpand: () => l("expand"),
|
|
1136
|
+
onResize: (...C) => l("resize", ...C)
|
|
1137
|
+
},
|
|
1138
|
+
constraints: {
|
|
1139
|
+
collapsedSize: a.collapsedSize && Number.parseFloat(a.collapsedSize.toFixed(Ie)),
|
|
1140
|
+
collapsible: a.collapsible,
|
|
1141
|
+
defaultSize: a.defaultSize,
|
|
1142
|
+
/** Panel id (unique within group); falls back to useId when not provided */
|
|
1143
|
+
/** Panel id (unique within group); falls back to useId when not provided */
|
|
1144
|
+
maxSize: a.maxSize,
|
|
1145
|
+
minSize: a.minSize
|
|
1146
|
+
},
|
|
1147
|
+
id: d,
|
|
1148
|
+
idIsFromProps: a.id !== void 0,
|
|
1149
|
+
order: a.order
|
|
1150
|
+
}));
|
|
1151
|
+
we(() => b.value.constraints, (C, M) => {
|
|
1152
|
+
(M.collapsedSize !== C.collapsedSize || M.collapsible !== C.collapsible || M.maxSize !== C.maxSize || M.minSize !== C.minSize) && v(b.value, M);
|
|
1153
|
+
}, { deep: !0 }), ft(() => {
|
|
1154
|
+
const C = b.value;
|
|
1155
|
+
g(C), pt(() => {
|
|
1156
|
+
w(C);
|
|
1157
|
+
});
|
|
1158
|
+
});
|
|
1159
|
+
const L = te(() => f(b.value, a.defaultSize)), I = te(() => h(b.value)), B = te(() => !I.value);
|
|
1160
|
+
function R() {
|
|
1161
|
+
i(b.value);
|
|
1162
|
+
}
|
|
1163
|
+
function G() {
|
|
1164
|
+
r(b.value);
|
|
1165
|
+
}
|
|
1166
|
+
function F(C) {
|
|
1167
|
+
u(b.value, C);
|
|
1168
|
+
}
|
|
1169
|
+
return t({
|
|
1170
|
+
/** If panel is `collapsible`, collapse it fully. */
|
|
1171
|
+
collapse: R,
|
|
1172
|
+
/** If panel is currently collapsed, expand it to its most recent size. */
|
|
1173
|
+
expand: G,
|
|
1174
|
+
/** Gets the current size of the panel as a percentage (1 - 100). */
|
|
1175
|
+
getSize() {
|
|
1176
|
+
return c(b.value);
|
|
1177
|
+
},
|
|
1178
|
+
/** Resize panel to the specified percentage (1 - 100). */
|
|
1179
|
+
resize: F,
|
|
1180
|
+
/** Returns `true` if the panel is currently collapsed */
|
|
1181
|
+
isCollapsed: I,
|
|
1182
|
+
/** Returns `true` if the panel is currently not collapsed */
|
|
1183
|
+
isExpanded: B
|
|
1184
|
+
}), (C, M) => (Z(), ue(P(Pe), {
|
|
1185
|
+
id: P(d),
|
|
1186
|
+
style: Ne(L.value),
|
|
1187
|
+
as: C.as,
|
|
1188
|
+
"as-child": C.asChild,
|
|
1189
|
+
"data-panel": "",
|
|
1190
|
+
"data-panel-collapsible": C.collapsible || void 0,
|
|
1191
|
+
"data-panel-group-id": P(m),
|
|
1192
|
+
"data-panel-id": P(d),
|
|
1193
|
+
"data-panel-size": Number.parseFloat(`${L.value.flexGrow}`).toFixed(1),
|
|
1194
|
+
"data-state": C.collapsible ? I.value ? "collapsed" : "expanded" : void 0
|
|
1195
|
+
}, {
|
|
1196
|
+
default: ce(() => [
|
|
1197
|
+
ve(C.$slots, "default", {
|
|
1198
|
+
isCollapsed: I.value,
|
|
1199
|
+
isExpanded: B.value,
|
|
1200
|
+
expand: G,
|
|
1201
|
+
collapse: R,
|
|
1202
|
+
resize: F
|
|
1203
|
+
})
|
|
1204
|
+
]),
|
|
1205
|
+
_: 3
|
|
1206
|
+
}, 8, ["id", "style", "as", "as-child", "data-panel-collapsible", "data-panel-group-id", "data-panel-id", "data-panel-size", "data-state"]));
|
|
1207
|
+
}
|
|
1208
|
+
});
|
|
1209
|
+
function jt({
|
|
1210
|
+
disabled: e,
|
|
1211
|
+
handleId: t,
|
|
1212
|
+
resizeHandler: n,
|
|
1213
|
+
panelGroupElement: a
|
|
1214
|
+
}) {
|
|
1215
|
+
oe((l) => {
|
|
1216
|
+
const o = a.value;
|
|
1217
|
+
if (e.value || n.value === null || o === null)
|
|
1218
|
+
return;
|
|
1219
|
+
const i = he(t, o);
|
|
1220
|
+
if (i == null)
|
|
1221
|
+
return;
|
|
1222
|
+
const r = (c) => {
|
|
1223
|
+
var f;
|
|
1224
|
+
if (!c.defaultPrevented)
|
|
1225
|
+
switch (c.key) {
|
|
1226
|
+
case "ArrowDown":
|
|
1227
|
+
case "ArrowLeft":
|
|
1228
|
+
case "ArrowRight":
|
|
1229
|
+
case "ArrowUp":
|
|
1230
|
+
case "End":
|
|
1231
|
+
case "Home": {
|
|
1232
|
+
c.preventDefault(), (f = n.value) == null || f.call(n, c);
|
|
1233
|
+
break;
|
|
1234
|
+
}
|
|
1235
|
+
case "F6": {
|
|
1236
|
+
c.preventDefault();
|
|
1237
|
+
const h = i.getAttribute("data-panel-group-id");
|
|
1238
|
+
x(h);
|
|
1239
|
+
const u = ie(
|
|
1240
|
+
h,
|
|
1241
|
+
o
|
|
1242
|
+
), m = Ve(
|
|
1243
|
+
h,
|
|
1244
|
+
t,
|
|
1245
|
+
o
|
|
1246
|
+
);
|
|
1247
|
+
x(m !== null);
|
|
1248
|
+
const v = c.shiftKey ? m > 0 ? m - 1 : u.length - 1 : m + 1 < u.length ? m + 1 : 0;
|
|
1249
|
+
u[v].focus();
|
|
1250
|
+
break;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1254
|
+
i.addEventListener("keydown", r), l(() => {
|
|
1255
|
+
i.removeEventListener("keydown", r);
|
|
1256
|
+
});
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
const Kt = /* @__PURE__ */ se({
|
|
1260
|
+
__name: "SplitterResizeHandle",
|
|
1261
|
+
props: {
|
|
1262
|
+
id: {},
|
|
1263
|
+
hitAreaMargins: {},
|
|
1264
|
+
tabindex: { default: 0 },
|
|
1265
|
+
disabled: { type: Boolean },
|
|
1266
|
+
asChild: { type: Boolean },
|
|
1267
|
+
as: {}
|
|
1268
|
+
},
|
|
1269
|
+
emits: ["dragging"],
|
|
1270
|
+
setup(e, { emit: t }) {
|
|
1271
|
+
const n = e, a = t, { forwardRef: l, currentElement: o } = Fe(), { disabled: i } = Be(n), r = it();
|
|
1272
|
+
if (r === null)
|
|
1273
|
+
throw new Error(
|
|
1274
|
+
"PanelResizeHandle components must be rendered within a PanelGroup container"
|
|
1275
|
+
);
|
|
1276
|
+
const {
|
|
1277
|
+
direction: c,
|
|
1278
|
+
groupId: f,
|
|
1279
|
+
registerResizeHandle: h,
|
|
1280
|
+
startDragging: u,
|
|
1281
|
+
stopDragging: m,
|
|
1282
|
+
panelGroupElement: v
|
|
1283
|
+
} = r, g = Ee(n.id, "reka-splitter-resize-handle"), w = $("inactive"), d = $(!1), b = $(null);
|
|
1284
|
+
return we(i, () => {
|
|
1285
|
+
de && (i.value ? b.value = null : b.value = h(g));
|
|
1286
|
+
}, { immediate: !0 }), oe((L) => {
|
|
1287
|
+
var R, G;
|
|
1288
|
+
if (i.value || b.value === null)
|
|
1289
|
+
return;
|
|
1290
|
+
const I = o.value;
|
|
1291
|
+
if (!I)
|
|
1292
|
+
return;
|
|
1293
|
+
x(I);
|
|
1294
|
+
const B = (F, C, M) => {
|
|
1295
|
+
var Y;
|
|
1296
|
+
if (C)
|
|
1297
|
+
switch (F) {
|
|
1298
|
+
case "down": {
|
|
1299
|
+
w.value = "drag", u(g, M), a("dragging", !0);
|
|
1300
|
+
break;
|
|
1301
|
+
}
|
|
1302
|
+
case "move": {
|
|
1303
|
+
w.value !== "drag" && (w.value = "hover"), (Y = b.value) == null || Y.call(b, M);
|
|
1304
|
+
break;
|
|
1305
|
+
}
|
|
1306
|
+
case "up": {
|
|
1307
|
+
w.value = "hover", m(), a("dragging", !1);
|
|
1308
|
+
break;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
else
|
|
1312
|
+
w.value = "inactive";
|
|
1313
|
+
};
|
|
1314
|
+
L(Nt(
|
|
1315
|
+
g,
|
|
1316
|
+
I,
|
|
1317
|
+
c,
|
|
1318
|
+
{
|
|
1319
|
+
// Coarse inputs (e.g. finger/touch)
|
|
1320
|
+
coarse: ((R = n.hitAreaMargins) == null ? void 0 : R.coarse) ?? 15,
|
|
1321
|
+
// Fine inputs (e.g. mouse)
|
|
1322
|
+
fine: ((G = n.hitAreaMargins) == null ? void 0 : G.fine) ?? 5
|
|
1323
|
+
},
|
|
1324
|
+
B
|
|
1325
|
+
));
|
|
1326
|
+
}), jt({
|
|
1327
|
+
disabled: i,
|
|
1328
|
+
resizeHandler: b,
|
|
1329
|
+
handleId: g,
|
|
1330
|
+
panelGroupElement: v
|
|
1331
|
+
}), (L, I) => (Z(), ue(P(Pe), {
|
|
1332
|
+
id: P(g),
|
|
1333
|
+
ref: P(l),
|
|
1334
|
+
style: {
|
|
1335
|
+
touchAction: "none",
|
|
1336
|
+
userSelect: "none"
|
|
1337
|
+
},
|
|
1338
|
+
as: L.as,
|
|
1339
|
+
"as-child": L.asChild,
|
|
1340
|
+
role: "separator",
|
|
1341
|
+
"data-resize-handle": "",
|
|
1342
|
+
tabindex: L.tabindex,
|
|
1343
|
+
"data-state": w.value,
|
|
1344
|
+
"data-disabled": P(i) ? "" : void 0,
|
|
1345
|
+
"data-orientation": P(c),
|
|
1346
|
+
"data-panel-group-id": P(f),
|
|
1347
|
+
"data-resize-handle-active": w.value === "drag" ? "pointer" : d.value ? "keyboard" : void 0,
|
|
1348
|
+
"data-resize-handle-state": w.value,
|
|
1349
|
+
"data-panel-resize-handle-enabled": !P(i),
|
|
1350
|
+
"data-panel-resize-handle-id": P(g),
|
|
1351
|
+
onBlur: I[0] || (I[0] = (B) => d.value = !1),
|
|
1352
|
+
onFocus: I[1] || (I[1] = (B) => d.value = !1)
|
|
1353
|
+
}, {
|
|
1354
|
+
default: ce(() => [
|
|
1355
|
+
ve(L.$slots, "default")
|
|
1356
|
+
]),
|
|
1357
|
+
_: 3
|
|
1358
|
+
}, 8, ["id", "as", "as-child", "tabindex", "data-state", "data-disabled", "data-orientation", "data-panel-group-id", "data-resize-handle-active", "data-resize-handle-state", "data-panel-resize-handle-enabled", "data-panel-resize-handle-id"]));
|
|
1359
|
+
}
|
|
1360
|
+
});
|
|
1361
|
+
/**
|
|
1362
|
+
* @license lucide-vue-next v0.514.0 - ISC
|
|
1363
|
+
*
|
|
1364
|
+
* This source code is licensed under the ISC license.
|
|
1365
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1366
|
+
*/
|
|
1367
|
+
const Xt = St("grip-vertical", [
|
|
1368
|
+
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
|
|
1369
|
+
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
|
|
1370
|
+
["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
|
|
1371
|
+
["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
|
|
1372
|
+
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
1373
|
+
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
1374
|
+
]), Wt = {
|
|
1375
|
+
key: 0,
|
|
1376
|
+
class: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"
|
|
1377
|
+
}, rn = /* @__PURE__ */ se({
|
|
1378
|
+
__name: "ResizableHandle",
|
|
1379
|
+
props: {
|
|
1380
|
+
id: {},
|
|
1381
|
+
hitAreaMargins: {},
|
|
1382
|
+
tabindex: {},
|
|
1383
|
+
disabled: { type: Boolean },
|
|
1384
|
+
asChild: { type: Boolean },
|
|
1385
|
+
as: { type: [String, Object, Function] },
|
|
1386
|
+
class: {},
|
|
1387
|
+
withHandle: { type: Boolean }
|
|
1388
|
+
},
|
|
1389
|
+
emits: ["dragging"],
|
|
1390
|
+
setup(e, { emit: t }) {
|
|
1391
|
+
const n = e, a = t, l = Te(n, "class"), o = $e(l, a);
|
|
1392
|
+
return (i, r) => (Z(), ue(P(Kt), Ge(P(o), {
|
|
1393
|
+
class: P(He)("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 [&[data-orientation=vertical]]:h-px [&[data-orientation=vertical]]:w-full [&[data-orientation=vertical]]:after:left-0 [&[data-orientation=vertical]]:after:h-1 [&[data-orientation=vertical]]:after:w-full [&[data-orientation=vertical]]:after:-translate-y-1/2 [&[data-orientation=vertical]]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90", n.class)
|
|
1394
|
+
}), {
|
|
1395
|
+
default: ce(() => [
|
|
1396
|
+
n.withHandle ? (Z(), mt("div", Wt, [
|
|
1397
|
+
ht(P(Xt), { class: "h-2.5 w-2.5" })
|
|
1398
|
+
])) : vt("", !0)
|
|
1399
|
+
]),
|
|
1400
|
+
_: 1
|
|
1401
|
+
}, 16, ["class"]));
|
|
1402
|
+
}
|
|
1403
|
+
}), sn = /* @__PURE__ */ se({
|
|
1404
|
+
__name: "ResizablePanelGroup",
|
|
1405
|
+
props: {
|
|
1406
|
+
id: {},
|
|
1407
|
+
autoSaveId: {},
|
|
1408
|
+
direction: {},
|
|
1409
|
+
keyboardResizeBy: {},
|
|
1410
|
+
storage: {},
|
|
1411
|
+
asChild: { type: Boolean },
|
|
1412
|
+
as: { type: [String, Object, Function] },
|
|
1413
|
+
class: {}
|
|
1414
|
+
},
|
|
1415
|
+
emits: ["layout"],
|
|
1416
|
+
setup(e, { emit: t }) {
|
|
1417
|
+
const n = e, a = t, l = Te(n, "class"), o = $e(l, a);
|
|
1418
|
+
return (i, r) => (Z(), ue(P(Vt), Ge(P(o), {
|
|
1419
|
+
class: P(He)("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", n.class)
|
|
1420
|
+
}), {
|
|
1421
|
+
default: ce(() => [
|
|
1422
|
+
ve(i.$slots, "default")
|
|
1423
|
+
]),
|
|
1424
|
+
_: 3
|
|
1425
|
+
}, 16, ["class"]));
|
|
1426
|
+
}
|
|
1427
|
+
});
|
|
1428
|
+
export {
|
|
1429
|
+
rn as ResizableHandle,
|
|
1430
|
+
ln as ResizablePanel,
|
|
1431
|
+
sn as ResizablePanelGroup
|
|
1432
|
+
};
|