@mtngtools/frame-vue 0.0.21-experimental.0 → 0.0.24-experimental.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/{LoggedInOut-DjWBHJcm.js → VanillaIf-Cur4x_1H.js} +204 -135
- package/dist/components/VanillaIf/VanillaIf.vue.d.ts +23 -0
- package/dist/components/VanillaIf/VanillaIf.vue.d.ts.map +1 -0
- package/dist/components/VanillaIf/index.d.ts +2 -0
- package/dist/components/VanillaIf/index.d.ts.map +1 -0
- package/dist/components/VanillaIf/index.test.d.ts +2 -0
- package/dist/components/VanillaIf/index.test.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/live/LiveFrame/LiveFrame.vue.d.ts +8 -3
- package/dist/components/live/LiveFrame/LiveFrame.vue.d.ts.map +1 -1
- package/dist/components/live/LiveFrame/helpers.test.d.ts +108 -54
- package/dist/components/live/LiveFrame/helpers.test.d.ts.map +1 -1
- package/dist/components.js +2 -2
- package/dist/frame-vue.css +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ Vue.js component and composable library for mtngTOOLS. Built for use in Nuxt app
|
|
|
11
11
|
| --- | --- |
|
|
12
12
|
| [`LiveFrame`](./src/components/live/LiveFrame) | Full-screen wrapper for live video players with responsive layout support. |
|
|
13
13
|
| [`LoggedInOut`](./src/components/LoggedInOut) | Component that toggles content visibility based on authentication status. |
|
|
14
|
+
| [`VanillaIf`](./src/components/VanillaIf) | A `v-if` wrapper that naturally delays rendering until synchronously or asynchronously evaluating its condition. |
|
|
14
15
|
| [`SidePanelFrame`](./src/components/live/SidePanelFrame) | Wrapper for controlling and displaying side panel content. |
|
|
15
16
|
| [`SidePanelHeader`](./src/components/live/SidePanelHeader) | Standardized header component for the side panel. |
|
|
16
17
|
| [`SidePanelButtonGroup`](./src/components/live/SidePanelButtonGroup) | Control group for managing panel selection buttons. |
|
|
@@ -33,7 +34,7 @@ pnpm add @mtngtools/frame-vue vue
|
|
|
33
34
|
### Regular Imports
|
|
34
35
|
|
|
35
36
|
```ts
|
|
36
|
-
import { LiveFrame, LoggedInOut } from '@mtngtools/frame-vue';
|
|
37
|
+
import { LiveFrame, LoggedInOut, VanillaIf } from '@mtngtools/frame-vue';
|
|
37
38
|
```
|
|
38
39
|
|
|
39
40
|
### Direct Subpath Imports
|
|
@@ -41,7 +42,7 @@ import { LiveFrame, LoggedInOut } from '@mtngtools/frame-vue';
|
|
|
41
42
|
For specific needs or smaller bundle sizes, you can import directly from subpaths:
|
|
42
43
|
|
|
43
44
|
```ts
|
|
44
|
-
import { LoggedInOut } from '@mtngtools/frame-vue/components';
|
|
45
|
+
import { LoggedInOut, VanillaIf } from '@mtngtools/frame-vue/components';
|
|
45
46
|
import { useSimpleLoggedIn } from '@mtngtools/frame-vue/composables';
|
|
46
47
|
```
|
|
47
48
|
|
|
@@ -371,10 +371,15 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
371
371
|
sidePanelMaxBottomTall: { default: "60vh" },
|
|
372
372
|
headerHideWidthThreshold: { default: "50rem" },
|
|
373
373
|
headerHideHeightThreshold: { default: "40rem" },
|
|
374
|
-
|
|
375
|
-
type:
|
|
376
|
-
|
|
374
|
+
displaySidePanel: {
|
|
375
|
+
type: [
|
|
376
|
+
Boolean,
|
|
377
|
+
Function,
|
|
378
|
+
Object
|
|
379
|
+
],
|
|
380
|
+
default: !0
|
|
377
381
|
},
|
|
382
|
+
displaySidePanelWindowFn: {},
|
|
378
383
|
hideSidePanelIcons: {
|
|
379
384
|
type: Boolean,
|
|
380
385
|
default: !1
|
|
@@ -387,36 +392,40 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
387
392
|
"sidePanelAvailableStates",
|
|
388
393
|
"defaultSlotResize"
|
|
389
394
|
],
|
|
390
|
-
setup(e, {
|
|
391
|
-
let
|
|
392
|
-
function
|
|
393
|
-
let e =
|
|
395
|
+
setup(e, { expose: t, emit: n }) {
|
|
396
|
+
let r = e, i = n, a = useSlots(), d = ref(null), p = ref(null), g = ref(null), _ = ref(0), v = ref(0), y = ref(0), b = ref(0), x = ref(0);
|
|
397
|
+
function S() {
|
|
398
|
+
let e = g.value;
|
|
394
399
|
if (!e) return;
|
|
395
|
-
let t =
|
|
400
|
+
let t = r.enforceSlotSizingQuerySelector ? Array.from(e.querySelectorAll(r.enforceSlotSizingQuerySelector)) : Array.from(e.children), n = `${x.value}px`;
|
|
396
401
|
t.forEach((e) => {
|
|
397
|
-
e.style.height !==
|
|
402
|
+
e.style.height !== n && (e.style.height = n);
|
|
398
403
|
});
|
|
399
404
|
}
|
|
400
|
-
let
|
|
405
|
+
let C = ref("none"), w = ref("none"), T = ref([]), E = ref("none"), D = ref(!0), O = ref(!1), te = {
|
|
401
406
|
sm: 640,
|
|
402
407
|
md: 768,
|
|
403
408
|
lg: 1024,
|
|
404
409
|
xl: 1280,
|
|
405
410
|
"2xl": 1536
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
let e =
|
|
411
|
+
}, ne = computed(() => {
|
|
412
|
+
if (typeof window < "u" && r.displaySidePanelWindowFn && typeof window[r.displaySidePanelWindowFn] == "function") return !!window[r.displaySidePanelWindowFn]();
|
|
413
|
+
let e = unref(r.displaySidePanel);
|
|
414
|
+
return typeof e == "function" ? e() : !!e;
|
|
415
|
+
}), k = computed(() => !!a.sidePanelContent && ne.value), A = computed(() => !!a.header), j = computed(() => T.value.filter((e) => e !== "auto")), M = computed(() => Math.max(0, v.value - y.value)), N = computed(() => _.value < G(r.controlsOverlayOnly)), P = computed(() => _.value === 0 ? !1 : M.value / _.value > 1.1), re = computed(() => w.value === "right" && E.value === "wide-right" ? r.sidePanelMaxRightWide : r.sidePanelMaxRight), ie = computed(() => _e(r.mainContentAspectRatio, 16 / 9)), ae = computed(() => b.value > 0 ? b.value : Math.max(1, _.value)), oe = computed(() => ae.value / ie.value + 20), se = computed(() => Math.max(1, _.value) / ie.value), ce = computed(() => K(r.sidePanelMinBottom, _.value, v.value)), le = computed(() => {
|
|
416
|
+
let e = se.value + ce.value;
|
|
417
|
+
return M.value >= e;
|
|
418
|
+
}), ue = computed(() => Math.max(0, M.value - oe.value)), de = computed(() => {
|
|
419
|
+
if (w.value !== "bottom") return r.sidePanelMinBottom;
|
|
420
|
+
let e = K(r.sidePanelMinBottom, _.value, v.value), t = Math.min(e, F.value);
|
|
412
421
|
return `${Math.max(0, Math.floor(t))}px`;
|
|
413
|
-
}),
|
|
414
|
-
let e =
|
|
415
|
-
return Math.max(0, Math.min(e,
|
|
416
|
-
}),
|
|
422
|
+
}), F = computed(() => {
|
|
423
|
+
let e = K(w.value === "bottom" && E.value === "tall-bottom" ? r.sidePanelMaxBottomTall : r.sidePanelMaxBottom, _.value, v.value);
|
|
424
|
+
return Math.max(0, Math.min(e, ue.value));
|
|
425
|
+
}), I = computed(() => w.value === "bottom" ? `${Math.max(0, Math.floor(F.value))}px` : r.sidePanelMaxBottom), fe = computed(() => w.value === "right" || w.value === "bottom" ? {} : w.value === "full" && !N.value ? {
|
|
417
426
|
opacity: 0,
|
|
418
427
|
pointerEvents: "none"
|
|
419
|
-
} : {}),
|
|
428
|
+
} : {}), L = computed(() => !k.value || N.value || w.value === "none" || w.value === "minimized" || w.value === "right" || w.value === "bottom" ? null : {
|
|
420
429
|
position: "absolute",
|
|
421
430
|
top: 0,
|
|
422
431
|
right: 0,
|
|
@@ -424,16 +433,16 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
424
433
|
left: 0,
|
|
425
434
|
zIndex: 10,
|
|
426
435
|
pointerEvents: "none"
|
|
427
|
-
}),
|
|
436
|
+
}), R = computed(() => !k.value || w.value === "none" || w.value === "full" ? { gridTemplate: "1fr / 1fr" } : w.value === "right" ? {
|
|
428
437
|
gridTemplateRows: "1fr",
|
|
429
|
-
gridTemplateColumns: `minmax(0, 1fr) max(${
|
|
430
|
-
} :
|
|
431
|
-
gridTemplateRows: `minmax(0, 1fr) ${
|
|
438
|
+
gridTemplateColumns: `minmax(0, 1fr) max(${r.sidePanelMinRight}, ${re.value})`
|
|
439
|
+
} : w.value === "bottom" ? {
|
|
440
|
+
gridTemplateRows: `minmax(0, 1fr) ${I.value}`,
|
|
432
441
|
gridTemplateColumns: "1fr"
|
|
433
|
-
} :
|
|
442
|
+
} : w.value === "minimized" ? {
|
|
434
443
|
gridTemplateRows: "1fr max-content",
|
|
435
444
|
gridTemplateColumns: "1fr"
|
|
436
|
-
} : { gridTemplate: "1fr / 1fr" }),
|
|
445
|
+
} : { gridTemplate: "1fr / 1fr" }), pe = computed(() => {
|
|
437
446
|
let e = {
|
|
438
447
|
minWidth: 0,
|
|
439
448
|
minHeight: 0,
|
|
@@ -442,13 +451,13 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
442
451
|
placeSelf: "stretch",
|
|
443
452
|
zIndex: 20
|
|
444
453
|
};
|
|
445
|
-
if (
|
|
446
|
-
if (
|
|
454
|
+
if (k.value) {
|
|
455
|
+
if (w.value === "right") return {
|
|
447
456
|
...e,
|
|
448
457
|
gridColumn: "2 / 3",
|
|
449
458
|
gridRow: "1 / 2"
|
|
450
459
|
};
|
|
451
|
-
if (
|
|
460
|
+
if (w.value === "full") return {
|
|
452
461
|
...e,
|
|
453
462
|
gridColumn: "1 / 2",
|
|
454
463
|
gridRow: "1 / 2"
|
|
@@ -459,7 +468,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
459
468
|
gridColumn: "1 / 2",
|
|
460
469
|
gridRow: "2 / 3"
|
|
461
470
|
};
|
|
462
|
-
}),
|
|
471
|
+
}), me = computed(() => {
|
|
463
472
|
let e = {
|
|
464
473
|
position: "fixed",
|
|
465
474
|
top: 0,
|
|
@@ -468,7 +477,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
468
477
|
left: 0,
|
|
469
478
|
overflow: "hidden"
|
|
470
479
|
};
|
|
471
|
-
return
|
|
480
|
+
return A.value ? {
|
|
472
481
|
...e,
|
|
473
482
|
display: "grid",
|
|
474
483
|
gridTemplateRows: "auto 1fr"
|
|
@@ -476,11 +485,11 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
476
485
|
...e,
|
|
477
486
|
display: "block"
|
|
478
487
|
};
|
|
479
|
-
}),
|
|
488
|
+
}), he = computed(() => A.value ? {
|
|
480
489
|
position: "relative",
|
|
481
490
|
zIndex: 0,
|
|
482
491
|
display: "grid",
|
|
483
|
-
...
|
|
492
|
+
...R.value,
|
|
484
493
|
gridRow: "2 / 3",
|
|
485
494
|
minWidth: 0,
|
|
486
495
|
minHeight: 0,
|
|
@@ -489,7 +498,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
489
498
|
position: "absolute",
|
|
490
499
|
zIndex: 0,
|
|
491
500
|
display: "grid",
|
|
492
|
-
...
|
|
501
|
+
...R.value,
|
|
493
502
|
minWidth: 0,
|
|
494
503
|
minHeight: 0,
|
|
495
504
|
overflow: "hidden",
|
|
@@ -497,9 +506,9 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
497
506
|
right: "0",
|
|
498
507
|
bottom: "0",
|
|
499
508
|
left: "0"
|
|
500
|
-
}),
|
|
501
|
-
function
|
|
502
|
-
let t =
|
|
509
|
+
}), ge = computed(() => !N.value || D.value), z = null, B, V, H = null, U = "", W = !1;
|
|
510
|
+
function G(e) {
|
|
511
|
+
let t = te[e];
|
|
503
512
|
if (t !== void 0) return t;
|
|
504
513
|
if (e.endsWith("px")) {
|
|
505
514
|
let t = Number.parseFloat(e);
|
|
@@ -508,7 +517,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
508
517
|
let n = Number.parseFloat(e);
|
|
509
518
|
return Number.isFinite(n) ? n : 0;
|
|
510
519
|
}
|
|
511
|
-
function
|
|
520
|
+
function _e(e, t) {
|
|
512
521
|
if (typeof e == "number") return Number.isFinite(e) && e > 0 ? e : t;
|
|
513
522
|
let n = String(e).trim();
|
|
514
523
|
if (n.includes("/")) {
|
|
@@ -518,7 +527,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
518
527
|
let r = Number.parseFloat(n);
|
|
519
528
|
return Number.isFinite(r) && r > 0 ? r : t;
|
|
520
529
|
}
|
|
521
|
-
function
|
|
530
|
+
function K(e, t, n) {
|
|
522
531
|
let r = e.trim();
|
|
523
532
|
if (r.endsWith("px")) {
|
|
524
533
|
let e = Number.parseFloat(r);
|
|
@@ -535,9 +544,9 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
535
544
|
let i = Number.parseFloat(r);
|
|
536
545
|
return Number.isFinite(i) ? i : 0;
|
|
537
546
|
}
|
|
538
|
-
function
|
|
539
|
-
let e = Math.max(1,
|
|
540
|
-
return
|
|
547
|
+
function ve() {
|
|
548
|
+
let e = Math.max(1, _.value), t = Math.max(1, M.value), n = e / t, i = e / t, a = G(r.sidePanelBreakpoint), o = le.value;
|
|
549
|
+
return n < r.autoBottomAspectRatioBreakpoint && o ? (E.value = "tall-bottom", {
|
|
541
550
|
states: [
|
|
542
551
|
"auto",
|
|
543
552
|
"full",
|
|
@@ -545,7 +554,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
545
554
|
"minimized"
|
|
546
555
|
],
|
|
547
556
|
resolved: "bottom"
|
|
548
|
-
}) : i >
|
|
557
|
+
}) : i > r.autoRightAspectRatioBreakpoint ? (E.value = "wide-right", {
|
|
549
558
|
states: [
|
|
550
559
|
"auto",
|
|
551
560
|
"full",
|
|
@@ -553,7 +562,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
553
562
|
"minimized"
|
|
554
563
|
],
|
|
555
564
|
resolved: "right"
|
|
556
|
-
}) : (
|
|
565
|
+
}) : (E.value = "mixed", e >= a ? {
|
|
557
566
|
states: o ? [
|
|
558
567
|
"auto",
|
|
559
568
|
"full",
|
|
@@ -576,74 +585,74 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
576
585
|
resolved: "full"
|
|
577
586
|
});
|
|
578
587
|
}
|
|
579
|
-
function
|
|
580
|
-
e === t || t === "none" || !
|
|
588
|
+
function ye(e, t, n) {
|
|
589
|
+
e === t || t === "none" || !k.value || i("sidePanelTransition", {
|
|
581
590
|
from: e,
|
|
582
591
|
to: t,
|
|
583
592
|
reason: n
|
|
584
593
|
});
|
|
585
594
|
}
|
|
586
|
-
function
|
|
595
|
+
function q(e = !1) {
|
|
587
596
|
let t = {
|
|
588
|
-
availableStates:
|
|
589
|
-
sidePanelMode:
|
|
590
|
-
sidePanelModeResolved:
|
|
591
|
-
overlayOnly:
|
|
597
|
+
availableStates: k.value ? [...j.value] : [],
|
|
598
|
+
sidePanelMode: k.value ? C.value : "none",
|
|
599
|
+
sidePanelModeResolved: k.value ? w.value : "none",
|
|
600
|
+
overlayOnly: N.value
|
|
592
601
|
};
|
|
593
|
-
if (!
|
|
594
|
-
if (
|
|
595
|
-
|
|
602
|
+
if (!k.value) {
|
|
603
|
+
if (W) return;
|
|
604
|
+
W = !0, i("sidePanelAvailableStates", t);
|
|
596
605
|
return;
|
|
597
606
|
}
|
|
598
|
-
|
|
607
|
+
W = !1;
|
|
599
608
|
let n = JSON.stringify(t);
|
|
600
|
-
!e && n ===
|
|
609
|
+
!e && n === U || (U = n, i("sidePanelAvailableStates", t));
|
|
601
610
|
}
|
|
602
|
-
function
|
|
603
|
-
let t =
|
|
604
|
-
if (!
|
|
605
|
-
|
|
611
|
+
function be(e) {
|
|
612
|
+
let t = w.value;
|
|
613
|
+
if (!k.value) {
|
|
614
|
+
C.value = "none", w.value = "none", T.value = [], q();
|
|
606
615
|
return;
|
|
607
616
|
}
|
|
608
|
-
let n =
|
|
609
|
-
|
|
610
|
-
let
|
|
611
|
-
|
|
617
|
+
let n = ve();
|
|
618
|
+
T.value = n.states;
|
|
619
|
+
let r = C.value === "none" ? "auto" : C.value;
|
|
620
|
+
r !== "auto" && !T.value.includes(r) ? (C.value = "auto", i("update:sidePanelPosition", "auto")) : C.value = r, w.value = C.value === "auto" ? n.resolved : C.value, ye(t, w.value, e), q(O.value === !1);
|
|
612
621
|
}
|
|
613
622
|
function J(e, t = !1) {
|
|
614
|
-
if (
|
|
615
|
-
|
|
623
|
+
if (B &&= (clearTimeout(B), void 0), t || !O.value) {
|
|
624
|
+
be(e);
|
|
616
625
|
return;
|
|
617
626
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
},
|
|
627
|
+
B = setTimeout(() => {
|
|
628
|
+
be(e);
|
|
629
|
+
}, r.layoutDebounceMs);
|
|
621
630
|
}
|
|
622
631
|
function Y(e) {
|
|
623
|
-
if (!
|
|
624
|
-
let t =
|
|
625
|
-
t !==
|
|
632
|
+
if (!k.value) return;
|
|
633
|
+
let t = T.value.includes(e) ? e : "auto";
|
|
634
|
+
t !== C.value && (C.value = t, i("update:sidePanelPosition", t)), J("set-side-panel-mode", !0);
|
|
626
635
|
}
|
|
627
|
-
function
|
|
628
|
-
!
|
|
636
|
+
function xe() {
|
|
637
|
+
!k.value || !N.value || Y("minimized");
|
|
629
638
|
}
|
|
630
639
|
function X() {
|
|
631
|
-
|
|
640
|
+
V &&= (clearTimeout(V), void 0);
|
|
632
641
|
}
|
|
633
642
|
function Z() {
|
|
634
|
-
if (X(), !
|
|
635
|
-
|
|
643
|
+
if (X(), !N.value || P.value || w.value === "none") {
|
|
644
|
+
D.value = !0;
|
|
636
645
|
return;
|
|
637
646
|
}
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
},
|
|
647
|
+
V = setTimeout(() => {
|
|
648
|
+
D.value = !1;
|
|
649
|
+
}, r.autoHideTimeout);
|
|
641
650
|
}
|
|
642
651
|
function Q() {
|
|
643
|
-
|
|
652
|
+
D.value = !0, Z();
|
|
644
653
|
}
|
|
645
|
-
function
|
|
646
|
-
if (!
|
|
654
|
+
function Se() {
|
|
655
|
+
if (!d.value) return;
|
|
647
656
|
let e = [
|
|
648
657
|
"mousemove",
|
|
649
658
|
"click",
|
|
@@ -653,67 +662,70 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
653
662
|
], t = () => {
|
|
654
663
|
Q();
|
|
655
664
|
};
|
|
656
|
-
for (let n of e)
|
|
657
|
-
|
|
658
|
-
if (
|
|
665
|
+
for (let n of e) d.value.addEventListener(n, t, { passive: !0 });
|
|
666
|
+
H = () => {
|
|
667
|
+
if (d.value) for (let n of e) d.value.removeEventListener(n, t);
|
|
659
668
|
};
|
|
660
669
|
}
|
|
661
670
|
function $() {
|
|
662
|
-
|
|
671
|
+
_.value = window.innerWidth, v.value = window.innerHeight, J("viewport-resize");
|
|
663
672
|
}
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
673
|
+
function Ce() {
|
|
674
|
+
_.value = window.innerWidth, v.value = window.innerHeight, y.value = p.value?.offsetHeight ?? 0, b.value = g.value?.offsetWidth ?? 0, x.value = g.value?.offsetHeight ?? 0, S(), J("manual-refresh", !0);
|
|
675
|
+
}
|
|
676
|
+
return t({ refresh: Ce }), watch(() => r.sidePanelPosition, (e) => {
|
|
677
|
+
if (!k.value) {
|
|
678
|
+
C.value = "none";
|
|
667
679
|
return;
|
|
668
680
|
}
|
|
669
|
-
|
|
670
|
-
}, { immediate: !0 }), watch(
|
|
681
|
+
C.value = e, J("prop-sync");
|
|
682
|
+
}, { immediate: !0 }), watch(k, (e) => {
|
|
671
683
|
if (!e) {
|
|
672
|
-
|
|
684
|
+
C.value = "none", w.value = "none", T.value = [], q();
|
|
673
685
|
return;
|
|
674
686
|
}
|
|
675
|
-
|
|
687
|
+
C.value = r.sidePanelPosition, J("slot-state-change", !0);
|
|
676
688
|
}, { immediate: !0 }), watch(() => [
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
689
|
+
N.value,
|
|
690
|
+
r.autoHideTimeout,
|
|
691
|
+
w.value
|
|
680
692
|
], () => {
|
|
681
|
-
if (
|
|
693
|
+
if (w.value === "full") {
|
|
682
694
|
Z();
|
|
683
695
|
return;
|
|
684
696
|
}
|
|
685
697
|
Q();
|
|
686
|
-
}), watch(
|
|
698
|
+
}), watch(P, (e, t) => {
|
|
687
699
|
if (e) {
|
|
688
|
-
|
|
700
|
+
D.value = !0, X();
|
|
689
701
|
return;
|
|
690
702
|
}
|
|
691
703
|
t && Q();
|
|
692
704
|
}), watch(() => [
|
|
693
|
-
y.value,
|
|
694
705
|
b.value,
|
|
695
|
-
|
|
696
|
-
|
|
706
|
+
x.value,
|
|
707
|
+
w.value,
|
|
708
|
+
k.value
|
|
697
709
|
], () => {
|
|
698
|
-
!
|
|
699
|
-
width:
|
|
700
|
-
height:
|
|
710
|
+
!k.value || w.value === "none" || i("defaultSlotResize", {
|
|
711
|
+
width: b.value,
|
|
712
|
+
height: x.value
|
|
701
713
|
});
|
|
702
714
|
}), onMounted(async () => {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}),
|
|
715
|
+
O.value = !0, $(), window.addEventListener("resize", $), Se(), Q(), await nextTick(), z = new ResizeObserver(() => {
|
|
716
|
+
y.value = p.value?.offsetHeight ?? 0, b.value = g.value?.offsetWidth ?? 0, x.value = g.value?.offsetHeight ?? 0, S(), J("slot-measure");
|
|
717
|
+
}), p.value && z.observe(p.value), g.value && (z.observe(g.value), b.value = g.value.offsetWidth, x.value = g.value.offsetHeight), y.value = p.value?.offsetHeight ?? 0, J("mounted", !0);
|
|
706
718
|
}), onBeforeUnmount(() => {
|
|
707
|
-
window.removeEventListener("resize", $),
|
|
708
|
-
}), (t,
|
|
719
|
+
window.removeEventListener("resize", $), H?.(), H = null, z?.disconnect(), z = null, X(), B &&= (clearTimeout(B), void 0);
|
|
720
|
+
}), (t, n) => (openBlock(), createElementBlock("section", {
|
|
709
721
|
ref_key: "rootRef",
|
|
710
|
-
ref:
|
|
722
|
+
ref: d,
|
|
711
723
|
class: "bg-black text-neutral-100",
|
|
712
|
-
style: normalizeStyle({ ...
|
|
713
|
-
}, [
|
|
724
|
+
style: normalizeStyle({ ...me.value })
|
|
725
|
+
}, [A.value ? withDirectives((openBlock(), createElementBlock("header", {
|
|
714
726
|
key: 0,
|
|
715
727
|
ref_key: "headerRef",
|
|
716
|
-
ref:
|
|
728
|
+
ref: p,
|
|
717
729
|
class: "",
|
|
718
730
|
style: {
|
|
719
731
|
position: "relative",
|
|
@@ -722,15 +734,15 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
722
734
|
zIndex: 40
|
|
723
735
|
}
|
|
724
736
|
}, [(openBlock(), createBlock(resolveDynamicComponent("style"), null, {
|
|
725
|
-
default: withCtx(() => [createTextVNode(" #header-outer { display: none; } @media (min-width: " + toDisplayString(
|
|
737
|
+
default: withCtx(() => [createTextVNode(" #header-outer { display: none; } @media (min-width: " + toDisplayString(r.headerHideWidthThreshold) + ") and (min-height: " + toDisplayString(r.headerHideHeightThreshold) + ") { #header-outer { display: block; } } ", 1)]),
|
|
726
738
|
_: 1
|
|
727
|
-
})), createElementVNode("div", _hoisted_1, [renderSlot(t.$slots, "header")])], 512)), [[vShow,
|
|
739
|
+
})), createElementVNode("div", _hoisted_1, [renderSlot(t.$slots, "header")])], 512)), [[vShow, ge.value]]) : createCommentVNode("", !0), createElementVNode("article", {
|
|
728
740
|
class: "",
|
|
729
|
-
style: normalizeStyle({ ...
|
|
741
|
+
style: normalizeStyle({ ...he.value })
|
|
730
742
|
}, [
|
|
731
743
|
createElementVNode("main", {
|
|
732
744
|
ref_key: "defaultRef",
|
|
733
|
-
ref:
|
|
745
|
+
ref: g,
|
|
734
746
|
class: "slot-content-container",
|
|
735
747
|
style: normalizeStyle({
|
|
736
748
|
position: "relative",
|
|
@@ -744,34 +756,34 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
744
756
|
gridColumn: "1 / 2",
|
|
745
757
|
gridRow: "1 / 2",
|
|
746
758
|
zIndex: 0,
|
|
747
|
-
...
|
|
759
|
+
...fe.value
|
|
748
760
|
})
|
|
749
761
|
}, [renderSlot(t.$slots, "default")], 4),
|
|
750
|
-
|
|
762
|
+
L.value ? (openBlock(), createElementBlock("div", {
|
|
751
763
|
key: 0,
|
|
752
764
|
class: "bg-black",
|
|
753
765
|
style: normalizeStyle({
|
|
754
|
-
...
|
|
766
|
+
...L.value,
|
|
755
767
|
gridColumn: "1 / 2",
|
|
756
768
|
gridRow: "1 / 2"
|
|
757
769
|
})
|
|
758
770
|
}, null, 4)) : createCommentVNode("", !0),
|
|
759
|
-
|
|
771
|
+
k.value && w.value !== "none" ? (openBlock(), createElementBlock("div", {
|
|
760
772
|
key: 1,
|
|
761
773
|
class: "",
|
|
762
|
-
style: normalizeStyle(
|
|
774
|
+
style: normalizeStyle(pe.value)
|
|
763
775
|
}, [createVNode(SidePanelFrame_default, {
|
|
764
|
-
"side-panel-mode":
|
|
765
|
-
"side-panel-mode-resolved":
|
|
766
|
-
"available-states":
|
|
767
|
-
"overlay-only":
|
|
776
|
+
"side-panel-mode": C.value,
|
|
777
|
+
"side-panel-mode-resolved": w.value,
|
|
778
|
+
"available-states": j.value,
|
|
779
|
+
"overlay-only": N.value,
|
|
768
780
|
"hide-icons": e.hideSidePanelIcons,
|
|
769
781
|
"min-width": e.sidePanelMinRight,
|
|
770
|
-
"max-width":
|
|
771
|
-
"min-height":
|
|
772
|
-
"max-height":
|
|
782
|
+
"max-width": re.value,
|
|
783
|
+
"min-height": de.value,
|
|
784
|
+
"max-height": I.value,
|
|
773
785
|
onSetSidePanelMode: Y,
|
|
774
|
-
onCloseSidePanel:
|
|
786
|
+
onCloseSidePanel: xe
|
|
775
787
|
}, {
|
|
776
788
|
default: withCtx(() => [renderSlot(t.$slots, "sidePanelContent")]),
|
|
777
789
|
_: 3
|
|
@@ -788,7 +800,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
788
800
|
])], 4)) : createCommentVNode("", !0)
|
|
789
801
|
], 4)], 4));
|
|
790
802
|
}
|
|
791
|
-
}), [["__scopeId", "data-v-
|
|
803
|
+
}), [["__scopeId", "data-v-3fd50542"]]), LoggedInOut_default = /* @__PURE__ */ defineComponent({
|
|
792
804
|
__name: "LoggedInOut",
|
|
793
805
|
props: {
|
|
794
806
|
initiallyLoggedIn: { type: Boolean },
|
|
@@ -832,5 +844,62 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
832
844
|
setLoggedIn: f
|
|
833
845
|
}), (e, t) => !h.value || unref(s) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [unref(r) ? renderSlot(e.$slots, "loggedIn", { key: 0 }) : renderSlot(e.$slots, "loggedOut", { key: 1 })], 64)) : createCommentVNode("", !0);
|
|
834
846
|
}
|
|
847
|
+
}), VanillaIf_default = /* @__PURE__ */ defineComponent({
|
|
848
|
+
__name: "VanillaIf",
|
|
849
|
+
props: { show: { type: [
|
|
850
|
+
Boolean,
|
|
851
|
+
Function,
|
|
852
|
+
Object
|
|
853
|
+
] } },
|
|
854
|
+
setup(e) {
|
|
855
|
+
let t = e, n = ref(!1), r = ref(!1), i = null;
|
|
856
|
+
function o() {
|
|
857
|
+
i &&= (clearInterval(i), null);
|
|
858
|
+
}
|
|
859
|
+
function s() {
|
|
860
|
+
let e = unref(t.show);
|
|
861
|
+
if (typeof e == "function") try {
|
|
862
|
+
let t = e();
|
|
863
|
+
return typeof t == "boolean" ? {
|
|
864
|
+
ready: !0,
|
|
865
|
+
value: t
|
|
866
|
+
} : {
|
|
867
|
+
ready: !1,
|
|
868
|
+
value: !1
|
|
869
|
+
};
|
|
870
|
+
} catch (e) {
|
|
871
|
+
if (e instanceof ReferenceError || e instanceof TypeError) return {
|
|
872
|
+
ready: !1,
|
|
873
|
+
value: !1
|
|
874
|
+
};
|
|
875
|
+
throw e;
|
|
876
|
+
}
|
|
877
|
+
return typeof e == "boolean" ? {
|
|
878
|
+
ready: !0,
|
|
879
|
+
value: e
|
|
880
|
+
} : e == null ? {
|
|
881
|
+
ready: !1,
|
|
882
|
+
value: !1
|
|
883
|
+
} : {
|
|
884
|
+
ready: !0,
|
|
885
|
+
value: !!e
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
function c() {
|
|
889
|
+
let { ready: e, value: t } = s();
|
|
890
|
+
e ? (r.value = t, n.value = !0, o()) : i ||= setInterval(() => {
|
|
891
|
+
let e = s();
|
|
892
|
+
e.ready && (r.value = e.value, n.value = !0, o());
|
|
893
|
+
}, 50);
|
|
894
|
+
}
|
|
895
|
+
let l = s();
|
|
896
|
+
return l.ready && (n.value = !0, r.value = l.value), watch(() => t.show, () => {
|
|
897
|
+
n.value = !1, o(), c();
|
|
898
|
+
}, { deep: !0 }), onMounted(() => {
|
|
899
|
+
n.value || c();
|
|
900
|
+
}), onUnmounted(() => {
|
|
901
|
+
o();
|
|
902
|
+
}), (e, t) => n.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [r.value ? renderSlot(e.$slots, "default", { key: 0 }) : renderSlot(e.$slots, "else", { key: 1 })], 64)) : createCommentVNode("", !0);
|
|
903
|
+
}
|
|
835
904
|
});
|
|
836
|
-
export {
|
|
905
|
+
export { SidePanelHeader_default as a, SidePanelFrame_default as i, LoggedInOut_default as n, SidePanelButtonGroup_default as o, LiveFrame_default as r, SidePanelControlButton_default as s, VanillaIf_default as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
show: boolean | (() => boolean) | Ref<boolean>;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
else?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=VanillaIf.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VanillaIf.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VanillaIf/VanillaIf.vue"],"names":[],"mappings":"AA6GA,OAAO,EAAsC,KAAK,GAAG,EAAS,MAAM,KAAK,CAAA;AAEzE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,CAAA;CAC/C,CAAC;AAkGF,iBAAS,cAAc;WA6BT,OAAO,IAA6B;;yBAXrB,GAAG;sBACN,GAAG;;;;EAe5B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/VanillaIf/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/components/VanillaIf/index.test.ts"],"names":[],"mappings":""}
|