@dynamix-layout/solid 1.0.3 → 2.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/index.es.js DELETED
@@ -1,760 +0,0 @@
1
- import { spread as T, mergeProps as $, insert as y, memo as ie, effect as Ee, setStyleProperty as De, template as H, createComponent as v, use as Te } from "solid-js/web";
2
- import { DynamixLayoutCore as D, Node as x, setElementRect as Y, createFrameScheduler as $e, getTabBodyRect as Se, getNavbarDropPreview as Ne, getRootSplitPreview as Re, isSameDropPreview as ze, getTabsetDropPreview as Oe } from "@dynamix-layout/core";
3
- import { splitProps as He, createMemo as se, createSignal as W, onMount as Pe, onCleanup as Ce, For as L } from "solid-js";
4
- var P = H("<div>"), _e = H("<div><div style=display:flex;align-items:center;gap:4px;height:100%>"), Ie = H('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="lucide lucide-grip-vertical size-2.5"><circle cx=9 cy=12 r=1></circle><circle cx=9 cy=5 r=1></circle><circle cx=9 cy=19 r=1></circle><circle cx=15 cy=12 r=1></circle><circle cx=15 cy=5 r=1></circle><circle cx=15 cy=19 r=1>'), We = H('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round style=transform:rotate(90deg)><circle cx=9 cy=12 r=1></circle><circle cx=9 cy=5 r=1></circle><circle cx=9 cy=19 r=1></circle><circle cx=15 cy=12 r=1></circle><circle cx=15 cy=5 r=1></circle><circle cx=15 cy=19 r=1>');
5
- const Le = (e) => (() => {
6
- var a = P();
7
- return T(a, $(e, {
8
- get class() {
9
- return `DefaultWrapTabLabel ${e.class || ""}`;
10
- },
11
- get "data-state"() {
12
- return e.active ? "active" : "inactive";
13
- },
14
- get style() {
15
- return {
16
- "align-self": "center",
17
- padding: "4px 6px",
18
- "box-sizing": "border-box",
19
- "font-size": "14px",
20
- "border-radius": "4px",
21
- ...e.style
22
- };
23
- }
24
- }), !1, !0), y(a, () => e.children), a;
25
- })(), ke = (e) => (() => {
26
- var a = P();
27
- return T(a, $(e, {
28
- get class() {
29
- return `DefaultWrapTabBody hide-scrollbar ${e.class || ""}`;
30
- },
31
- get style() {
32
- return {
33
- "box-sizing": "border-box",
34
- height: "100%",
35
- width: "100%",
36
- display: "grid",
37
- overflow: "auto",
38
- "scrollbar-width": "none",
39
- "-ms-overflow-style": "none",
40
- ...e.style
41
- };
42
- }
43
- }), !1, !0), y(a, () => e.children), a;
44
- })(), Be = (e) => (() => {
45
- var a = P();
46
- return T(a, $(e, {
47
- get class() {
48
- return `DefaultWrapTabHead hide-scrollbar ${e.class || ""}`;
49
- },
50
- get style() {
51
- return {
52
- display: "grid",
53
- "grid-auto-flow": "column",
54
- "justify-content": "start",
55
- "align-items": "center",
56
- gap: "6px",
57
- "padding-left": "8px",
58
- width: "100%",
59
- "box-sizing": "border-box",
60
- height: "100%",
61
- "place-items": "self-start",
62
- overflow: "auto",
63
- "background-color": "#dfdfdf",
64
- "scrollbar-width": "none",
65
- "-ms-overflow-style": "none",
66
- ...e.style
67
- };
68
- }
69
- }), !1, !0), y(a, () => e.children), a;
70
- })(), Me = (e) => (() => {
71
- var a = P();
72
- return T(a, $(e, {
73
- get class() {
74
- return `DefaultWrapTabPanel ${e.class || ""}`;
75
- },
76
- get style() {
77
- return {
78
- display: "grid",
79
- "align-items": "center",
80
- "place-items": "self-start",
81
- "box-sizing": "border-box",
82
- position: "absolute",
83
- "border-radius": "8px",
84
- ...e.style
85
- };
86
- }
87
- }), !1, !0), y(a, () => e.children), a;
88
- })(), Ae = (e) => (() => {
89
- var a = P();
90
- return T(a, $(e, {
91
- get class() {
92
- return `DefaultHoverElement ${e.class || ""}`;
93
- },
94
- get style() {
95
- return {
96
- display: "flex",
97
- "justify-content": "center",
98
- "align-items": "center",
99
- opacity: 0.7,
100
- position: "absolute",
101
- "box-sizing": "border-box",
102
- "font-weight": "bold",
103
- "pointer-events": "none",
104
- "background-color": "rgba(0, 175, 249, 0.5)",
105
- "border-radius": "10px",
106
- transition: "all 0.2s ease",
107
- border: "2px dashed rgb(0, 196, 42)",
108
- ...e.style
109
- };
110
- }
111
- }), !1, !0), y(a, () => e.children), a;
112
- })(), je = (e) => (() => {
113
- var a = _e(), h = a.firstChild;
114
- return T(a, $(e, {
115
- get class() {
116
- return `DefaultSliderElement ${e.class || ""}`;
117
- },
118
- get style() {
119
- return {
120
- width: "100%",
121
- height: "100%",
122
- position: "absolute",
123
- "box-sizing": "border-box",
124
- "background-color": "white",
125
- "z-index": 9,
126
- cursor: "grab",
127
- ...e.style
128
- };
129
- }
130
- }), !1, !0), y(h, (() => {
131
- var g = ie(() => !e.direction);
132
- return () => g() ? Ie() : We();
133
- })()), y(a, () => e.children, null), Ee((g) => De(h, "flex-direction", e.direction ? "column" : "row")), a;
134
- })(), Fe = (e) => {
135
- const [a, h] = He(e, ["area", "size", "gap", "class", "style", "children"]), g = se(() => {
136
- const s = a.size || {
137
- h: "20%",
138
- w: "6px"
139
- }, b = a.gap || "0px", u = {};
140
- return a.area === "left" ? (Object.assign(u, {
141
- "border-top-right-radius": "16px",
142
- "border-bottom-right-radius": "16px",
143
- height: s.h,
144
- left: b,
145
- width: s.w
146
- }), u.top = `calc(50% - ${s.h} / 2)`) : a.area === "top" ? (Object.assign(u, {
147
- "border-bottom-left-radius": "16px",
148
- "border-bottom-right-radius": "16px",
149
- width: s.h,
150
- top: b,
151
- height: s.w
152
- }), u.left = `calc(50% - ${s.h} / 2)`) : a.area === "right" ? (Object.assign(u, {
153
- "border-top-left-radius": "16px",
154
- "border-bottom-left-radius": "16px",
155
- height: s.h,
156
- right: b,
157
- width: s.w
158
- }), u.top = `calc(50% - ${s.h} / 2)`) : a.area === "bottom" && (Object.assign(u, {
159
- "border-top-left-radius": "16px",
160
- "border-top-right-radius": "16px",
161
- width: s.h,
162
- bottom: b,
163
- height: s.w
164
- }), u.left = `calc(50% - ${s.h} / 2)`), u;
165
- });
166
- return (() => {
167
- var s = P();
168
- return T(s, $(h, {
169
- get class() {
170
- return `RootSplitterHoverEl ${a.class || ""}`;
171
- },
172
- get style() {
173
- return {
174
- position: "absolute",
175
- "z-index": -1,
176
- display: "none",
177
- "box-sizing": "border-box",
178
- "background-color": "#0081f9",
179
- cursor: "grab",
180
- ...a.style,
181
- ...g()
182
- };
183
- }
184
- }), !1, !0), y(s, () => a.children), s;
185
- })();
186
- }, Ue = ({
187
- tabOutput: e,
188
- rootId: a,
189
- layoutTree: h,
190
- updateJSON: g,
191
- dimensions: s,
192
- tabHeadHeight: b,
193
- enableTabbar: u,
194
- bondWidth: J,
195
- minTabHeight: k,
196
- minTabWidth: R,
197
- sliderUpdateTimeout: K,
198
- windowResizeTimeout: B,
199
- disableSliderTimeout: C,
200
- disableResizeTimeout: _
201
- }) => {
202
- const z = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), w = { current: void 0 }, I = [], [j, G] = W(
203
- h
204
- ), [F, S] = W(
205
- /* @__PURE__ */ new Map()
206
- ), [Q, U] = W(
207
- /* @__PURE__ */ new Map()
208
- ), [V, p] = W(!1);
209
- let E = null;
210
- const [Z, m] = W(!1), o = {
211
- src: void 0,
212
- des: void 0,
213
- area: void 0,
214
- drag: !1
215
- }, n = {
216
- sliderId: void 0,
217
- isSliding: !1
218
- }, d = u ? Math.max(k, b) : k, c = new D({
219
- tabs: e.keys,
220
- tree: j(),
221
- minW: R,
222
- minH: d,
223
- bond: J,
224
- uqid: a,
225
- tabsIds: e.name
226
- }), ne = (t) => {
227
- const r = new Map(t);
228
- S(r);
229
- }, ae = (t) => {
230
- const r = new Map(t);
231
- U(r);
232
- }, q = () => {
233
- const t = u ? b : 0;
234
- x.cache.tabOpts.get().forEach((r, l) => {
235
- const i = A.get(l);
236
- if (!i) return;
237
- const f = Se(r.nodDims, t);
238
- Y(i, f), i.style.display = r.nodOpen && f.h > 0 ? "block" : "none";
239
- });
240
- }, le = x.cache.nodOpts.onChange(
241
- (t) => {
242
- t.forEach((r, l) => {
243
- const i = O.get(l);
244
- i && Y(i, r.nodDims);
245
- const f = z.get(l);
246
- f && u && Y(f, {
247
- ...r.nodDims,
248
- h: b
249
- });
250
- });
251
- }
252
- ), de = x.cache.tabOpts.onChange(() => q()), ce = x.cache.bndOpts.onChange(
253
- (t) => {
254
- t.forEach((r, l) => {
255
- const i = M.get(l);
256
- i && Y(i, r.nodDims);
257
- });
258
- }
259
- ), ee = $e(
260
- ({ id: t, point: r }) => c.updateSlider(
261
- t,
262
- r,
263
- C,
264
- K
265
- )
266
- ), oe = (t) => {
267
- const r = n.sliderId;
268
- !n.isSliding || !r || ee.schedule({ id: r, point: { x: t.clientX, y: t.clientY } });
269
- }, X = (t) => {
270
- if (!n.isSliding) return;
271
- ee.flush();
272
- const r = t.currentTarget;
273
- n.isSliding = !1, n.sliderId = void 0, p(!1), g && g(D._root.toJSON()), r.releasePointerCapture(t.pointerId), r.removeEventListener("pointermove", oe), r.removeEventListener("pointerup", X), r.removeEventListener("pointercancel", X);
274
- }, ue = (t) => {
275
- t.preventDefault();
276
- const r = t.currentTarget;
277
- n.isSliding = !0, n.sliderId = r.id, p(!0), r.setPointerCapture(t.pointerId), r.addEventListener("pointermove", oe), r.addEventListener("pointerup", X), r.addEventListener("pointercancel", X);
278
- };
279
- let te = {};
280
- const ge = (t, r, l) => {
281
- if (!w.current || !o || !l)
282
- return null;
283
- const i = Oe(
284
- l.getBoundingClientRect(),
285
- t,
286
- r
287
- );
288
- re(i), o.des = l, o.area = i.area;
289
- }, fe = (t) => {
290
- t.preventDefault(), t.stopPropagation(), t.dataTransfer && (t.dataTransfer.dropEffect = "move");
291
- const r = t.currentTarget, l = Array.from(
292
- r.childNodes
293
- );
294
- if (!w.current || !o) return;
295
- const i = Ne(
296
- r.getBoundingClientRect(),
297
- l.map((f) => f.getBoundingClientRect()),
298
- t.clientX,
299
- t.clientY
300
- );
301
- i && (re(i), o.des = l[i.index], o.area = i.area);
302
- }, me = (t) => {
303
- t.preventDefault(), t.stopPropagation(), t.dataTransfer && (t.dataTransfer.dropEffect = "move");
304
- const r = t.currentTarget, { area: l, uid: i } = r.dataset;
305
- if (!l || !i || !w.current || !o)
306
- return;
307
- const f = l;
308
- o.des = r, o.area = f, re(Re(s(), f));
309
- }, re = (t) => {
310
- const r = w.current;
311
- !r || ze(te, t) || (Object.assign(r.style, {
312
- left: `${t.left}px`,
313
- top: `${t.top}px`,
314
- width: `${t.width}px`,
315
- height: `${t.height}px`,
316
- display: "block",
317
- zIndex: "100"
318
- }), te = t);
319
- }, he = (t) => {
320
- if (t.stopPropagation(), p(!0), document.body.style.cursor = "move", t.currentTarget) {
321
- if (t.dataTransfer) {
322
- t.dataTransfer.effectAllowed = "move";
323
- const r = document.createElement("div");
324
- r.style.width = "1px", r.style.height = "1px", r.style.backgroundColor = "transparent", r.style.position = "absolute", r.style.top = "-1000px", document.body.appendChild(r), t.dataTransfer.setDragImage(r, 0, 0), setTimeout(() => {
325
- r.parentNode && r.parentNode.removeChild(r);
326
- }, 0);
327
- }
328
- I.forEach((r) => {
329
- r && (r.style.display = "block", r.style.zIndex = "99");
330
- }), O.forEach((r) => {
331
- r && (r.style.display = "block", r.style.zIndex = "95");
332
- }), o.src = t.currentTarget, o.drag = !0;
333
- }
334
- }, be = (t) => {
335
- if (t.preventDefault(), t.stopPropagation(), document.body.style.cursor = "move", t.dataTransfer && (t.dataTransfer.dropEffect = "move"), !o?.src)
336
- return;
337
- const r = t.currentTarget, l = t.clientX, i = t.clientY;
338
- E && cancelAnimationFrame(E), E = requestAnimationFrame(() => {
339
- ge(l, i, r);
340
- });
341
- }, ye = () => {
342
- if (document.body.style.cursor = "default", I.forEach((t) => {
343
- t && (t.style.display = "none", t.style.zIndex = "-1");
344
- }), E && (cancelAnimationFrame(E), E = null), w.current && (w.current.style.display = "none", w.current.style.zIndex = "-1"), te = {}, o.drag = !1, !o?.src || !o?.des) {
345
- o.area = void 0, o.src = void 0, o.des = void 0, p(!1);
346
- return;
347
- }
348
- if (o.src === o.des) {
349
- o.area = void 0, o.src = void 0, o.des = void 0, p(!1);
350
- return;
351
- }
352
- if (o.src && o.des) {
353
- if (!o.area) {
354
- console.warn("No area specified for drag and drop"), p(!1);
355
- return;
356
- }
357
- if (!c.updateTree(
358
- o.src.dataset.uid,
359
- o.des.dataset.uid,
360
- o.area || "contain"
361
- )) {
362
- console.warn("Failed to update layout tree"), p(!1);
363
- return;
364
- }
365
- requestAnimationFrame(() => {
366
- ne(x.cache.nodOpts.get()), ae(x.cache.bndOpts.get()), q(), g && g(D._root.toJSON());
367
- });
368
- }
369
- o.area = void 0, o.src = void 0, o.des = void 0, p(!1);
370
- }, ve = (t) => {
371
- t.preventDefault(), t.stopPropagation(), t.dataTransfer && (t.dataTransfer.dropEffect = "move");
372
- }, pe = (t) => {
373
- t.preventDefault(), t.stopPropagation();
374
- }, xe = (t) => {
375
- t.preventDefault(), t.stopPropagation(), t.dataTransfer && t.dataTransfer.getData("text/plain");
376
- }, we = (t) => {
377
- const r = t.currentTarget, l = r.dataset.uid;
378
- if (!l) return;
379
- const i = x.cache.mapElem.get(l);
380
- if (!(i instanceof x)) {
381
- console.warn(`Element with uid ${l} is not a Node instance`);
382
- return;
383
- }
384
- if (!i || !i.host || !i.host.unId) {
385
- console.warn(`Node with uid ${l} not found in mapNode`);
386
- return;
387
- }
388
- if (i.host.open == i.name) {
389
- console.warn(`Node ${i.name} is already open`);
390
- return;
391
- }
392
- const f = x.cache.nodOpts.get().get(i.host.unId);
393
- if (!f || f.nodOpen && i?.open)
394
- return;
395
- i.host.open = i.name, f.nodOpen = i.name, f.nodKids?.forEach((N) => {
396
- N.nodOpen = N.nodName === i.name;
397
- }), r?.parentElement?.childNodes?.forEach((N) => {
398
- N instanceof HTMLDivElement && N.dataset.uid !== l ? N.dataset.state = "inactive" : N.dataset.state = "active";
399
- }), q();
400
- };
401
- return Pe(() => {
402
- const t = (l) => {
403
- c.updateDimension(
404
- s(),
405
- l,
406
- B
407
- );
408
- };
409
- t(!0);
410
- const r = () => t(_ ?? !1);
411
- window.addEventListener("resize", r), ne(x.cache.nodOpts.get()), ae(x.cache.bndOpts.get()), q(), g && g(D._root.toJSON()), Ce(() => {
412
- window.removeEventListener("resize", r), le(), ce(), de(), ee.cancel(), E && cancelAnimationFrame(E);
413
- });
414
- }), {
415
- tabsets: F,
416
- sliders: Q,
417
- tabsetsRef: z,
418
- panelsRef: O,
419
- tabsRef: A,
420
- slidersRef: M,
421
- layoutJSON: j,
422
- layoutInstance: c,
423
- hoverElementRef: w,
424
- rootSplitHoverEl: I,
425
- dragging: V,
426
- isUpdating: Z,
427
- setIsUpdating: m,
428
- setDragging: p,
429
- setTabsets: S,
430
- setSliders: U,
431
- setLayoutJSON: G,
432
- onDragStart: he,
433
- onDragOver: be,
434
- onDragEnd: ye,
435
- onDragEnter: ve,
436
- onDragLeave: pe,
437
- onDrop: xe,
438
- onPointerDown: ue,
439
- updateActiveTab: we,
440
- handleRootSplit: me,
441
- handleNavbarDragOver: fe
442
- };
443
- };
444
- var qe = H("<div>"), Xe = H('<div class="flex items-center justify-center h-full"><span class=text-gray-500>No content');
445
- const Ye = (e) => {
446
- const a = [], h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
447
- for (const [s, b] of e) {
448
- const u = crypto.randomUUID();
449
- a.push(s), h.set(s, {
450
- uqid: u,
451
- name: s,
452
- node: b
453
- }), g.set(s, u);
454
- }
455
- return {
456
- keys: a,
457
- maps: h,
458
- name: g
459
- };
460
- }, Ve = (e) => {
461
- const a = se(() => Ye(e.tabs));
462
- let h;
463
- const g = () => {
464
- const m = h;
465
- if (!m) return {
466
- w: 0,
467
- h: 0,
468
- x: 0,
469
- y: 0
470
- };
471
- const o = m.getBoundingClientRect(), n = e.pad || {
472
- t: 0,
473
- b: 0,
474
- l: 0,
475
- r: 0
476
- };
477
- return {
478
- w: o.width - (n.l + n.r),
479
- h: o.height - (n.t + n.b),
480
- x: o.left + n.l,
481
- y: o.top + n.t
482
- };
483
- }, {
484
- tabsetsRef: s,
485
- slidersRef: b,
486
- sliders: u,
487
- tabsets: J,
488
- hoverElementRef: k,
489
- onDragEnd: R,
490
- onDragOver: K,
491
- onDragStart: B,
492
- onDragEnter: C,
493
- onDragLeave: _,
494
- onDrop: z,
495
- dragging: M,
496
- panelsRef: O,
497
- onPointerDown: A,
498
- handleNavbarDragOver: w,
499
- updateActiveTab: I,
500
- rootSplitHoverEl: j,
501
- handleRootSplit: G,
502
- tabsRef: F,
503
- isUpdating: S
504
- } = Ue({
505
- tabOutput: a(),
506
- rootId: e.rootId || "dynamix-layout-root",
507
- updateJSON: e.updateJSON,
508
- enableTabbar: e.enableTabbar === void 0 ? !0 : e.enableTabbar,
509
- layoutTree: e.layoutTree,
510
- tabHeadHeight: e.tabHeadHeight || D._minH,
511
- dimensions: g,
512
- sliderUpdateTimeout: e.sliderUpdateTimeout || 2,
513
- windowResizeTimeout: e.windowResizeTimeout || 2,
514
- bondWidth: e.bondWidth || D._bond,
515
- minTabHeight: e.minTabHeight || D._minH,
516
- minTabWidth: e.minTabWidth || D._minW,
517
- disableSliderTimeout: e.disableSliderTimeout === void 0 ? !0 : e.disableSliderTimeout,
518
- disableResizeTimeout: e.disableResizeTimeout === void 0 ? !0 : e.disableResizeTimeout,
519
- hoverElementStyles: e.hoverElementStyles
520
- }), Q = e.WrapTabPanel || Me, U = e.WrapTabHead || Be, V = e.WrapTabLabel || Le, p = e.WrapTabBody || ke, E = e.SliderElement || je, Z = e.HoverElement || Ae;
521
- return (() => {
522
- var m = qe(), o = h;
523
- return typeof o == "function" ? Te(o, m) : h = m, T(m, $({
524
- get id() {
525
- return e.rootId || "dynamix-layout-root";
526
- }
527
- }, e, {
528
- get "data-testid"() {
529
- return e.rootId || "dynamix-layout-root";
530
- },
531
- get class() {
532
- return M() ? "is-dragging" : "";
533
- },
534
- get style() {
535
- return {
536
- position: "relative",
537
- width: "100%",
538
- height: "100%",
539
- overflow: "hidden",
540
- ...e.style
541
- };
542
- }
543
- }), !1, !0), y(m, v(L, {
544
- get each() {
545
- return Array.from(J().values());
546
- },
547
- children: (n) => [v(Q, {
548
- ref: (d) => {
549
- const c = n.uidNode;
550
- d ? O.set(c, d) : O.delete(c);
551
- },
552
- onDragEnd: R,
553
- onDragOver: K,
554
- onDragEnter: C,
555
- onDragLeave: _,
556
- onDrop: z,
557
- get "data-uid"() {
558
- return n.uidNode;
559
- },
560
- get "data-type"() {
561
- return n.typNode;
562
- },
563
- get class() {
564
- return "hide-scrollbar DefaultWrapTabPanel " + (e.tabPanelElementClass || "");
565
- },
566
- get style() {
567
- return {
568
- position: "absolute",
569
- ...e.tabPanelElementStyles,
570
- width: `${n.nodDims.w}px`,
571
- height: `${n.nodDims.h}px`,
572
- left: `${n.nodDims.x}px`,
573
- top: `${n.nodDims.y}px`,
574
- "background-color": "transparent"
575
- };
576
- }
577
- }), v(U, {
578
- get draggable() {
579
- return !S();
580
- },
581
- get "data-uid"() {
582
- return n.uidNode;
583
- },
584
- "data-type": "tabset",
585
- onDragOver: w,
586
- onDragStart: B,
587
- onDragEnd: R,
588
- onDragEnter: C,
589
- onDragLeave: _,
590
- onDrop: z,
591
- ref: (d) => {
592
- const c = n.uidNode;
593
- d ? s.set(c, d) : s.delete(c);
594
- },
595
- get class() {
596
- return "hide-scrollbar " + (e.tabHeadElementClass || "");
597
- },
598
- get style() {
599
- return {
600
- ...e.tabHeadElementStyles,
601
- position: "absolute",
602
- "z-index": 99,
603
- width: `${n.nodDims.w}px`,
604
- height: `${e.tabHeadHeight || D._minH}px`,
605
- left: `${n.nodDims.x}px`,
606
- top: `${n.nodDims.y}px`,
607
- cursor: S() ? "wait" : "pointer"
608
- };
609
- },
610
- get children() {
611
- return v(L, {
612
- get each() {
613
- return n.nodKids;
614
- },
615
- children: (d) => v(V, {
616
- get "data-uid"() {
617
- return d.uidNode;
618
- },
619
- "data-type": "tab",
620
- onDragStart: B,
621
- onDragEnd: R,
622
- get draggable() {
623
- return !S();
624
- },
625
- get active() {
626
- return !!d.nodOpen;
627
- },
628
- get class() {
629
- return "hide-scrollbar " + (e.tabLabelElementClass || "");
630
- },
631
- get style() {
632
- return {
633
- cursor: S() ? "wait" : "pointer",
634
- ...e.tabLabelElementStyles
635
- };
636
- },
637
- onClick: I,
638
- get children() {
639
- return ie(() => !!e.tabNames)() && e.tabNames.get(d.nodName) || d.nodName;
640
- }
641
- })
642
- });
643
- }
644
- })]
645
- }), null), y(m, v(L, {
646
- get each() {
647
- return a().keys;
648
- },
649
- children: (n) => {
650
- const d = a().maps.get(n)?.uqid;
651
- return v(p, {
652
- id: d,
653
- draggable: !1,
654
- "data-uid": d,
655
- get class() {
656
- return "hide-scrollbar " + (e.tabBodyElementClass || "");
657
- },
658
- get style() {
659
- return {
660
- position: "absolute",
661
- "z-index": 90,
662
- "overscroll-behavior": "contain",
663
- ...e.tabBodyElementStyles
664
- };
665
- },
666
- ref: (c) => {
667
- d && (c ? F.set(d, c) : F.delete(d));
668
- },
669
- get children() {
670
- return a().maps.get(n)?.node || Xe();
671
- }
672
- });
673
- }
674
- }), null), y(m, v(L, {
675
- get each() {
676
- return Array.from(u().values());
677
- },
678
- children: (n) => v(E, {
679
- get id() {
680
- return n.uidNode;
681
- },
682
- get "data-uid"() {
683
- return n.uidNode;
684
- },
685
- get direction() {
686
- return n.nodeDir;
687
- },
688
- onPointerDown: A,
689
- get class() {
690
- return "hide-scrollbar " + (e.sliderElementClass || "");
691
- },
692
- ref: (d) => {
693
- const c = n.uidNode;
694
- d ? b.set(c, d) : b.delete(c);
695
- },
696
- get style() {
697
- return {
698
- width: `${n.nodDims.w}px`,
699
- height: `${n.nodDims.h}px`,
700
- left: `${n.nodDims.x}px`,
701
- top: `${n.nodDims.y}px`,
702
- cursor: n.nodeDir ? "ns-resize" : "ew-resize",
703
- ...e.sliderElementStyles
704
- };
705
- }
706
- })
707
- }), null), y(m, v(Z, {
708
- get class() {
709
- return "hide-scrollbar " + (e.hoverElementClass || "");
710
- },
711
- get style() {
712
- return {
713
- ...e.hoverElementStyles
714
- };
715
- },
716
- ref: (n) => k.current = n
717
- }), null), y(m, v(L, {
718
- each: ["left", "right", "top", "bottom"],
719
- children: (n, d) => v(Fe, {
720
- onDragOver: G,
721
- onDragEnd: R,
722
- onDragEnter: C,
723
- onDragLeave: _,
724
- onDrop: z,
725
- get "data-uid"() {
726
- return e.rootId || "dynamix-layout-root";
727
- },
728
- "data-area": n,
729
- get class() {
730
- return "hide-scrollbar " + (e.RootSplitterHoverElClass || "");
731
- },
732
- ref: (c) => {
733
- c && (j[d()] = c);
734
- },
735
- get style() {
736
- return {
737
- ...e.RootSplitterHoverElStyles
738
- };
739
- },
740
- area: n,
741
- size: {
742
- h: "25%",
743
- w: "8px"
744
- }
745
- })
746
- }), null), m;
747
- })();
748
- };
749
- export {
750
- Ae as DefaultHoverElement,
751
- je as DefaultSliderElement,
752
- ke as DefaultWrapTabBody,
753
- Be as DefaultWrapTabHead,
754
- Le as DefaultWrapTabLabel,
755
- Me as DefaultWrapTabPanel,
756
- Ve as DynamixLayout,
757
- Fe as RootSplitterHoverEl,
758
- Ye as getTabOutput,
759
- Ue as useDynamixLayout
760
- };