@mtngtools/frame-vue 0.0.21-experimental.0 → 0.0.23-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-CJLX8GhG.js} +200 -133
- 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 +7 -3
- package/dist/components/live/LiveFrame/LiveFrame.vue.d.ts.map +1 -1
- package/dist/components/live/LiveFrame/helpers.test.d.ts +78 -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
|
|
|
@@ -372,7 +372,11 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
372
372
|
headerHideWidthThreshold: { default: "50rem" },
|
|
373
373
|
headerHideHeightThreshold: { default: "40rem" },
|
|
374
374
|
disableSidePanel: {
|
|
375
|
-
type:
|
|
375
|
+
type: [
|
|
376
|
+
Boolean,
|
|
377
|
+
Function,
|
|
378
|
+
Object
|
|
379
|
+
],
|
|
376
380
|
default: !1
|
|
377
381
|
},
|
|
378
382
|
hideSidePanelIcons: {
|
|
@@ -387,36 +391,39 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
387
391
|
"sidePanelAvailableStates",
|
|
388
392
|
"defaultSlotResize"
|
|
389
393
|
],
|
|
390
|
-
setup(e, {
|
|
391
|
-
let
|
|
392
|
-
function
|
|
393
|
-
let e =
|
|
394
|
+
setup(e, { expose: t, emit: n }) {
|
|
395
|
+
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);
|
|
396
|
+
function S() {
|
|
397
|
+
let e = g.value;
|
|
394
398
|
if (!e) return;
|
|
395
|
-
let t =
|
|
399
|
+
let t = r.enforceSlotSizingQuerySelector ? Array.from(e.querySelectorAll(r.enforceSlotSizingQuerySelector)) : Array.from(e.children), n = `${x.value}px`;
|
|
396
400
|
t.forEach((e) => {
|
|
397
|
-
e.style.height !==
|
|
401
|
+
e.style.height !== n && (e.style.height = n);
|
|
398
402
|
});
|
|
399
403
|
}
|
|
400
|
-
let
|
|
404
|
+
let C = ref("none"), w = ref("none"), T = ref([]), E = ref("none"), D = ref(!0), O = ref(!1), te = {
|
|
401
405
|
sm: 640,
|
|
402
406
|
md: 768,
|
|
403
407
|
lg: 1024,
|
|
404
408
|
xl: 1280,
|
|
405
409
|
"2xl": 1536
|
|
406
|
-
},
|
|
407
|
-
let e =
|
|
408
|
-
return
|
|
409
|
-
}),
|
|
410
|
-
|
|
411
|
-
|
|
410
|
+
}, ne = computed(() => {
|
|
411
|
+
let e = unref(r.disableSidePanel);
|
|
412
|
+
return typeof e == "function" ? e() : !!e;
|
|
413
|
+
}), 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(() => {
|
|
414
|
+
let e = se.value + ce.value;
|
|
415
|
+
return M.value >= e;
|
|
416
|
+
}), ue = computed(() => Math.max(0, M.value - oe.value)), de = computed(() => {
|
|
417
|
+
if (w.value !== "bottom") return r.sidePanelMinBottom;
|
|
418
|
+
let e = K(r.sidePanelMinBottom, _.value, v.value), t = Math.min(e, F.value);
|
|
412
419
|
return `${Math.max(0, Math.floor(t))}px`;
|
|
413
|
-
}),
|
|
414
|
-
let e =
|
|
415
|
-
return Math.max(0, Math.min(e,
|
|
416
|
-
}),
|
|
420
|
+
}), F = computed(() => {
|
|
421
|
+
let e = K(w.value === "bottom" && E.value === "tall-bottom" ? r.sidePanelMaxBottomTall : r.sidePanelMaxBottom, _.value, v.value);
|
|
422
|
+
return Math.max(0, Math.min(e, ue.value));
|
|
423
|
+
}), 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
424
|
opacity: 0,
|
|
418
425
|
pointerEvents: "none"
|
|
419
|
-
} : {}),
|
|
426
|
+
} : {}), L = computed(() => !k.value || N.value || w.value === "none" || w.value === "minimized" || w.value === "right" || w.value === "bottom" ? null : {
|
|
420
427
|
position: "absolute",
|
|
421
428
|
top: 0,
|
|
422
429
|
right: 0,
|
|
@@ -424,16 +431,16 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
424
431
|
left: 0,
|
|
425
432
|
zIndex: 10,
|
|
426
433
|
pointerEvents: "none"
|
|
427
|
-
}),
|
|
434
|
+
}), R = computed(() => !k.value || w.value === "none" || w.value === "full" ? { gridTemplate: "1fr / 1fr" } : w.value === "right" ? {
|
|
428
435
|
gridTemplateRows: "1fr",
|
|
429
|
-
gridTemplateColumns: `minmax(0, 1fr) max(${
|
|
430
|
-
} :
|
|
431
|
-
gridTemplateRows: `minmax(0, 1fr) ${
|
|
436
|
+
gridTemplateColumns: `minmax(0, 1fr) max(${r.sidePanelMinRight}, ${re.value})`
|
|
437
|
+
} : w.value === "bottom" ? {
|
|
438
|
+
gridTemplateRows: `minmax(0, 1fr) ${I.value}`,
|
|
432
439
|
gridTemplateColumns: "1fr"
|
|
433
|
-
} :
|
|
440
|
+
} : w.value === "minimized" ? {
|
|
434
441
|
gridTemplateRows: "1fr max-content",
|
|
435
442
|
gridTemplateColumns: "1fr"
|
|
436
|
-
} : { gridTemplate: "1fr / 1fr" }),
|
|
443
|
+
} : { gridTemplate: "1fr / 1fr" }), pe = computed(() => {
|
|
437
444
|
let e = {
|
|
438
445
|
minWidth: 0,
|
|
439
446
|
minHeight: 0,
|
|
@@ -442,13 +449,13 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
442
449
|
placeSelf: "stretch",
|
|
443
450
|
zIndex: 20
|
|
444
451
|
};
|
|
445
|
-
if (
|
|
446
|
-
if (
|
|
452
|
+
if (k.value) {
|
|
453
|
+
if (w.value === "right") return {
|
|
447
454
|
...e,
|
|
448
455
|
gridColumn: "2 / 3",
|
|
449
456
|
gridRow: "1 / 2"
|
|
450
457
|
};
|
|
451
|
-
if (
|
|
458
|
+
if (w.value === "full") return {
|
|
452
459
|
...e,
|
|
453
460
|
gridColumn: "1 / 2",
|
|
454
461
|
gridRow: "1 / 2"
|
|
@@ -459,7 +466,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
459
466
|
gridColumn: "1 / 2",
|
|
460
467
|
gridRow: "2 / 3"
|
|
461
468
|
};
|
|
462
|
-
}),
|
|
469
|
+
}), me = computed(() => {
|
|
463
470
|
let e = {
|
|
464
471
|
position: "fixed",
|
|
465
472
|
top: 0,
|
|
@@ -468,7 +475,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
468
475
|
left: 0,
|
|
469
476
|
overflow: "hidden"
|
|
470
477
|
};
|
|
471
|
-
return
|
|
478
|
+
return A.value ? {
|
|
472
479
|
...e,
|
|
473
480
|
display: "grid",
|
|
474
481
|
gridTemplateRows: "auto 1fr"
|
|
@@ -476,11 +483,11 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
476
483
|
...e,
|
|
477
484
|
display: "block"
|
|
478
485
|
};
|
|
479
|
-
}),
|
|
486
|
+
}), he = computed(() => A.value ? {
|
|
480
487
|
position: "relative",
|
|
481
488
|
zIndex: 0,
|
|
482
489
|
display: "grid",
|
|
483
|
-
...
|
|
490
|
+
...R.value,
|
|
484
491
|
gridRow: "2 / 3",
|
|
485
492
|
minWidth: 0,
|
|
486
493
|
minHeight: 0,
|
|
@@ -489,7 +496,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
489
496
|
position: "absolute",
|
|
490
497
|
zIndex: 0,
|
|
491
498
|
display: "grid",
|
|
492
|
-
...
|
|
499
|
+
...R.value,
|
|
493
500
|
minWidth: 0,
|
|
494
501
|
minHeight: 0,
|
|
495
502
|
overflow: "hidden",
|
|
@@ -497,9 +504,9 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
497
504
|
right: "0",
|
|
498
505
|
bottom: "0",
|
|
499
506
|
left: "0"
|
|
500
|
-
}),
|
|
501
|
-
function
|
|
502
|
-
let t =
|
|
507
|
+
}), ge = computed(() => !N.value || D.value), z = null, B, V, H = null, U = "", W = !1;
|
|
508
|
+
function G(e) {
|
|
509
|
+
let t = te[e];
|
|
503
510
|
if (t !== void 0) return t;
|
|
504
511
|
if (e.endsWith("px")) {
|
|
505
512
|
let t = Number.parseFloat(e);
|
|
@@ -508,7 +515,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
508
515
|
let n = Number.parseFloat(e);
|
|
509
516
|
return Number.isFinite(n) ? n : 0;
|
|
510
517
|
}
|
|
511
|
-
function
|
|
518
|
+
function _e(e, t) {
|
|
512
519
|
if (typeof e == "number") return Number.isFinite(e) && e > 0 ? e : t;
|
|
513
520
|
let n = String(e).trim();
|
|
514
521
|
if (n.includes("/")) {
|
|
@@ -518,7 +525,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
518
525
|
let r = Number.parseFloat(n);
|
|
519
526
|
return Number.isFinite(r) && r > 0 ? r : t;
|
|
520
527
|
}
|
|
521
|
-
function
|
|
528
|
+
function K(e, t, n) {
|
|
522
529
|
let r = e.trim();
|
|
523
530
|
if (r.endsWith("px")) {
|
|
524
531
|
let e = Number.parseFloat(r);
|
|
@@ -535,9 +542,9 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
535
542
|
let i = Number.parseFloat(r);
|
|
536
543
|
return Number.isFinite(i) ? i : 0;
|
|
537
544
|
}
|
|
538
|
-
function
|
|
539
|
-
let e = Math.max(1,
|
|
540
|
-
return
|
|
545
|
+
function ve() {
|
|
546
|
+
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;
|
|
547
|
+
return n < r.autoBottomAspectRatioBreakpoint && o ? (E.value = "tall-bottom", {
|
|
541
548
|
states: [
|
|
542
549
|
"auto",
|
|
543
550
|
"full",
|
|
@@ -545,7 +552,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
545
552
|
"minimized"
|
|
546
553
|
],
|
|
547
554
|
resolved: "bottom"
|
|
548
|
-
}) : i >
|
|
555
|
+
}) : i > r.autoRightAspectRatioBreakpoint ? (E.value = "wide-right", {
|
|
549
556
|
states: [
|
|
550
557
|
"auto",
|
|
551
558
|
"full",
|
|
@@ -553,7 +560,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
553
560
|
"minimized"
|
|
554
561
|
],
|
|
555
562
|
resolved: "right"
|
|
556
|
-
}) : (
|
|
563
|
+
}) : (E.value = "mixed", e >= a ? {
|
|
557
564
|
states: o ? [
|
|
558
565
|
"auto",
|
|
559
566
|
"full",
|
|
@@ -576,74 +583,74 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
576
583
|
resolved: "full"
|
|
577
584
|
});
|
|
578
585
|
}
|
|
579
|
-
function
|
|
580
|
-
e === t || t === "none" || !
|
|
586
|
+
function ye(e, t, n) {
|
|
587
|
+
e === t || t === "none" || !k.value || i("sidePanelTransition", {
|
|
581
588
|
from: e,
|
|
582
589
|
to: t,
|
|
583
590
|
reason: n
|
|
584
591
|
});
|
|
585
592
|
}
|
|
586
|
-
function
|
|
593
|
+
function q(e = !1) {
|
|
587
594
|
let t = {
|
|
588
|
-
availableStates:
|
|
589
|
-
sidePanelMode:
|
|
590
|
-
sidePanelModeResolved:
|
|
591
|
-
overlayOnly:
|
|
595
|
+
availableStates: k.value ? [...j.value] : [],
|
|
596
|
+
sidePanelMode: k.value ? C.value : "none",
|
|
597
|
+
sidePanelModeResolved: k.value ? w.value : "none",
|
|
598
|
+
overlayOnly: N.value
|
|
592
599
|
};
|
|
593
|
-
if (!
|
|
594
|
-
if (
|
|
595
|
-
|
|
600
|
+
if (!k.value) {
|
|
601
|
+
if (W) return;
|
|
602
|
+
W = !0, i("sidePanelAvailableStates", t);
|
|
596
603
|
return;
|
|
597
604
|
}
|
|
598
|
-
|
|
605
|
+
W = !1;
|
|
599
606
|
let n = JSON.stringify(t);
|
|
600
|
-
!e && n ===
|
|
607
|
+
!e && n === U || (U = n, i("sidePanelAvailableStates", t));
|
|
601
608
|
}
|
|
602
|
-
function
|
|
603
|
-
let t =
|
|
604
|
-
if (!
|
|
605
|
-
|
|
609
|
+
function be(e) {
|
|
610
|
+
let t = w.value;
|
|
611
|
+
if (!k.value) {
|
|
612
|
+
C.value = "none", w.value = "none", T.value = [], q();
|
|
606
613
|
return;
|
|
607
614
|
}
|
|
608
|
-
let n =
|
|
609
|
-
|
|
610
|
-
let
|
|
611
|
-
|
|
615
|
+
let n = ve();
|
|
616
|
+
T.value = n.states;
|
|
617
|
+
let r = C.value === "none" ? "auto" : C.value;
|
|
618
|
+
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
619
|
}
|
|
613
620
|
function J(e, t = !1) {
|
|
614
|
-
if (
|
|
615
|
-
|
|
621
|
+
if (B &&= (clearTimeout(B), void 0), t || !O.value) {
|
|
622
|
+
be(e);
|
|
616
623
|
return;
|
|
617
624
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
},
|
|
625
|
+
B = setTimeout(() => {
|
|
626
|
+
be(e);
|
|
627
|
+
}, r.layoutDebounceMs);
|
|
621
628
|
}
|
|
622
629
|
function Y(e) {
|
|
623
|
-
if (!
|
|
624
|
-
let t =
|
|
625
|
-
t !==
|
|
630
|
+
if (!k.value) return;
|
|
631
|
+
let t = T.value.includes(e) ? e : "auto";
|
|
632
|
+
t !== C.value && (C.value = t, i("update:sidePanelPosition", t)), J("set-side-panel-mode", !0);
|
|
626
633
|
}
|
|
627
|
-
function
|
|
628
|
-
!
|
|
634
|
+
function xe() {
|
|
635
|
+
!k.value || !N.value || Y("minimized");
|
|
629
636
|
}
|
|
630
637
|
function X() {
|
|
631
|
-
|
|
638
|
+
V &&= (clearTimeout(V), void 0);
|
|
632
639
|
}
|
|
633
640
|
function Z() {
|
|
634
|
-
if (X(), !
|
|
635
|
-
|
|
641
|
+
if (X(), !N.value || P.value || w.value === "none") {
|
|
642
|
+
D.value = !0;
|
|
636
643
|
return;
|
|
637
644
|
}
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
},
|
|
645
|
+
V = setTimeout(() => {
|
|
646
|
+
D.value = !1;
|
|
647
|
+
}, r.autoHideTimeout);
|
|
641
648
|
}
|
|
642
649
|
function Q() {
|
|
643
|
-
|
|
650
|
+
D.value = !0, Z();
|
|
644
651
|
}
|
|
645
|
-
function
|
|
646
|
-
if (!
|
|
652
|
+
function Se() {
|
|
653
|
+
if (!d.value) return;
|
|
647
654
|
let e = [
|
|
648
655
|
"mousemove",
|
|
649
656
|
"click",
|
|
@@ -653,67 +660,70 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
653
660
|
], t = () => {
|
|
654
661
|
Q();
|
|
655
662
|
};
|
|
656
|
-
for (let n of e)
|
|
657
|
-
|
|
658
|
-
if (
|
|
663
|
+
for (let n of e) d.value.addEventListener(n, t, { passive: !0 });
|
|
664
|
+
H = () => {
|
|
665
|
+
if (d.value) for (let n of e) d.value.removeEventListener(n, t);
|
|
659
666
|
};
|
|
660
667
|
}
|
|
661
668
|
function $() {
|
|
662
|
-
|
|
669
|
+
_.value = window.innerWidth, v.value = window.innerHeight, J("viewport-resize");
|
|
670
|
+
}
|
|
671
|
+
function Ce() {
|
|
672
|
+
_.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);
|
|
663
673
|
}
|
|
664
|
-
return watch(() =>
|
|
665
|
-
if (!
|
|
666
|
-
|
|
674
|
+
return t({ refresh: Ce }), watch(() => r.sidePanelPosition, (e) => {
|
|
675
|
+
if (!k.value) {
|
|
676
|
+
C.value = "none";
|
|
667
677
|
return;
|
|
668
678
|
}
|
|
669
|
-
|
|
670
|
-
}, { immediate: !0 }), watch(
|
|
679
|
+
C.value = e, J("prop-sync");
|
|
680
|
+
}, { immediate: !0 }), watch(k, (e) => {
|
|
671
681
|
if (!e) {
|
|
672
|
-
|
|
682
|
+
C.value = "none", w.value = "none", T.value = [], q();
|
|
673
683
|
return;
|
|
674
684
|
}
|
|
675
|
-
|
|
685
|
+
C.value = r.sidePanelPosition, J("slot-state-change", !0);
|
|
676
686
|
}, { immediate: !0 }), watch(() => [
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
687
|
+
N.value,
|
|
688
|
+
r.autoHideTimeout,
|
|
689
|
+
w.value
|
|
680
690
|
], () => {
|
|
681
|
-
if (
|
|
691
|
+
if (w.value === "full") {
|
|
682
692
|
Z();
|
|
683
693
|
return;
|
|
684
694
|
}
|
|
685
695
|
Q();
|
|
686
|
-
}), watch(
|
|
696
|
+
}), watch(P, (e, t) => {
|
|
687
697
|
if (e) {
|
|
688
|
-
|
|
698
|
+
D.value = !0, X();
|
|
689
699
|
return;
|
|
690
700
|
}
|
|
691
701
|
t && Q();
|
|
692
702
|
}), watch(() => [
|
|
693
|
-
y.value,
|
|
694
703
|
b.value,
|
|
695
|
-
|
|
696
|
-
|
|
704
|
+
x.value,
|
|
705
|
+
w.value,
|
|
706
|
+
k.value
|
|
697
707
|
], () => {
|
|
698
|
-
!
|
|
699
|
-
width:
|
|
700
|
-
height:
|
|
708
|
+
!k.value || w.value === "none" || i("defaultSlotResize", {
|
|
709
|
+
width: b.value,
|
|
710
|
+
height: x.value
|
|
701
711
|
});
|
|
702
712
|
}), onMounted(async () => {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}),
|
|
713
|
+
O.value = !0, $(), window.addEventListener("resize", $), Se(), Q(), await nextTick(), z = new ResizeObserver(() => {
|
|
714
|
+
y.value = p.value?.offsetHeight ?? 0, b.value = g.value?.offsetWidth ?? 0, x.value = g.value?.offsetHeight ?? 0, S(), J("slot-measure");
|
|
715
|
+
}), 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
716
|
}), onBeforeUnmount(() => {
|
|
707
|
-
window.removeEventListener("resize", $),
|
|
708
|
-
}), (t,
|
|
717
|
+
window.removeEventListener("resize", $), H?.(), H = null, z?.disconnect(), z = null, X(), B &&= (clearTimeout(B), void 0);
|
|
718
|
+
}), (t, n) => (openBlock(), createElementBlock("section", {
|
|
709
719
|
ref_key: "rootRef",
|
|
710
|
-
ref:
|
|
720
|
+
ref: d,
|
|
711
721
|
class: "bg-black text-neutral-100",
|
|
712
|
-
style: normalizeStyle({ ...
|
|
713
|
-
}, [
|
|
722
|
+
style: normalizeStyle({ ...me.value })
|
|
723
|
+
}, [A.value ? withDirectives((openBlock(), createElementBlock("header", {
|
|
714
724
|
key: 0,
|
|
715
725
|
ref_key: "headerRef",
|
|
716
|
-
ref:
|
|
726
|
+
ref: p,
|
|
717
727
|
class: "",
|
|
718
728
|
style: {
|
|
719
729
|
position: "relative",
|
|
@@ -722,15 +732,15 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
722
732
|
zIndex: 40
|
|
723
733
|
}
|
|
724
734
|
}, [(openBlock(), createBlock(resolveDynamicComponent("style"), null, {
|
|
725
|
-
default: withCtx(() => [createTextVNode(" #header-outer { display: none; } @media (min-width: " + toDisplayString(
|
|
735
|
+
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
736
|
_: 1
|
|
727
|
-
})), createElementVNode("div", _hoisted_1, [renderSlot(t.$slots, "header")])], 512)), [[vShow,
|
|
737
|
+
})), createElementVNode("div", _hoisted_1, [renderSlot(t.$slots, "header")])], 512)), [[vShow, ge.value]]) : createCommentVNode("", !0), createElementVNode("article", {
|
|
728
738
|
class: "",
|
|
729
|
-
style: normalizeStyle({ ...
|
|
739
|
+
style: normalizeStyle({ ...he.value })
|
|
730
740
|
}, [
|
|
731
741
|
createElementVNode("main", {
|
|
732
742
|
ref_key: "defaultRef",
|
|
733
|
-
ref:
|
|
743
|
+
ref: g,
|
|
734
744
|
class: "slot-content-container",
|
|
735
745
|
style: normalizeStyle({
|
|
736
746
|
position: "relative",
|
|
@@ -744,34 +754,34 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
744
754
|
gridColumn: "1 / 2",
|
|
745
755
|
gridRow: "1 / 2",
|
|
746
756
|
zIndex: 0,
|
|
747
|
-
...
|
|
757
|
+
...fe.value
|
|
748
758
|
})
|
|
749
759
|
}, [renderSlot(t.$slots, "default")], 4),
|
|
750
|
-
|
|
760
|
+
L.value ? (openBlock(), createElementBlock("div", {
|
|
751
761
|
key: 0,
|
|
752
762
|
class: "bg-black",
|
|
753
763
|
style: normalizeStyle({
|
|
754
|
-
...
|
|
764
|
+
...L.value,
|
|
755
765
|
gridColumn: "1 / 2",
|
|
756
766
|
gridRow: "1 / 2"
|
|
757
767
|
})
|
|
758
768
|
}, null, 4)) : createCommentVNode("", !0),
|
|
759
|
-
|
|
769
|
+
k.value && w.value !== "none" ? (openBlock(), createElementBlock("div", {
|
|
760
770
|
key: 1,
|
|
761
771
|
class: "",
|
|
762
|
-
style: normalizeStyle(
|
|
772
|
+
style: normalizeStyle(pe.value)
|
|
763
773
|
}, [createVNode(SidePanelFrame_default, {
|
|
764
|
-
"side-panel-mode":
|
|
765
|
-
"side-panel-mode-resolved":
|
|
766
|
-
"available-states":
|
|
767
|
-
"overlay-only":
|
|
774
|
+
"side-panel-mode": C.value,
|
|
775
|
+
"side-panel-mode-resolved": w.value,
|
|
776
|
+
"available-states": j.value,
|
|
777
|
+
"overlay-only": N.value,
|
|
768
778
|
"hide-icons": e.hideSidePanelIcons,
|
|
769
779
|
"min-width": e.sidePanelMinRight,
|
|
770
|
-
"max-width":
|
|
771
|
-
"min-height":
|
|
772
|
-
"max-height":
|
|
780
|
+
"max-width": re.value,
|
|
781
|
+
"min-height": de.value,
|
|
782
|
+
"max-height": I.value,
|
|
773
783
|
onSetSidePanelMode: Y,
|
|
774
|
-
onCloseSidePanel:
|
|
784
|
+
onCloseSidePanel: xe
|
|
775
785
|
}, {
|
|
776
786
|
default: withCtx(() => [renderSlot(t.$slots, "sidePanelContent")]),
|
|
777
787
|
_: 3
|
|
@@ -788,7 +798,7 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
788
798
|
])], 4)) : createCommentVNode("", !0)
|
|
789
799
|
], 4)], 4));
|
|
790
800
|
}
|
|
791
|
-
}), [["__scopeId", "data-v-
|
|
801
|
+
}), [["__scopeId", "data-v-4bbac08e"]]), LoggedInOut_default = /* @__PURE__ */ defineComponent({
|
|
792
802
|
__name: "LoggedInOut",
|
|
793
803
|
props: {
|
|
794
804
|
initiallyLoggedIn: { type: Boolean },
|
|
@@ -832,5 +842,62 @@ var _hoisted_1$4 = ["disabled"], SidePanelControlButton_default = /* @__PURE__ *
|
|
|
832
842
|
setLoggedIn: f
|
|
833
843
|
}), (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
844
|
}
|
|
845
|
+
}), VanillaIf_default = /* @__PURE__ */ defineComponent({
|
|
846
|
+
__name: "VanillaIf",
|
|
847
|
+
props: { show: { type: [
|
|
848
|
+
Boolean,
|
|
849
|
+
Function,
|
|
850
|
+
Object
|
|
851
|
+
] } },
|
|
852
|
+
setup(e) {
|
|
853
|
+
let t = e, n = ref(!1), r = ref(!1), i = null;
|
|
854
|
+
function o() {
|
|
855
|
+
i &&= (clearInterval(i), null);
|
|
856
|
+
}
|
|
857
|
+
function s() {
|
|
858
|
+
let e = unref(t.show);
|
|
859
|
+
if (typeof e == "function") try {
|
|
860
|
+
let t = e();
|
|
861
|
+
return typeof t == "boolean" ? {
|
|
862
|
+
ready: !0,
|
|
863
|
+
value: t
|
|
864
|
+
} : {
|
|
865
|
+
ready: !1,
|
|
866
|
+
value: !1
|
|
867
|
+
};
|
|
868
|
+
} catch (e) {
|
|
869
|
+
if (e instanceof ReferenceError || e instanceof TypeError) return {
|
|
870
|
+
ready: !1,
|
|
871
|
+
value: !1
|
|
872
|
+
};
|
|
873
|
+
throw e;
|
|
874
|
+
}
|
|
875
|
+
return typeof e == "boolean" ? {
|
|
876
|
+
ready: !0,
|
|
877
|
+
value: e
|
|
878
|
+
} : e == null ? {
|
|
879
|
+
ready: !1,
|
|
880
|
+
value: !1
|
|
881
|
+
} : {
|
|
882
|
+
ready: !0,
|
|
883
|
+
value: !!e
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
function c() {
|
|
887
|
+
let { ready: e, value: t } = s();
|
|
888
|
+
e ? (r.value = t, n.value = !0, o()) : i ||= setInterval(() => {
|
|
889
|
+
let e = s();
|
|
890
|
+
e.ready && (r.value = e.value, n.value = !0, o());
|
|
891
|
+
}, 50);
|
|
892
|
+
}
|
|
893
|
+
let l = s();
|
|
894
|
+
return l.ready && (n.value = !0, r.value = l.value), watch(() => t.show, () => {
|
|
895
|
+
n.value = !1, o(), c();
|
|
896
|
+
}, { deep: !0 }), onMounted(() => {
|
|
897
|
+
n.value || c();
|
|
898
|
+
}), onUnmounted(() => {
|
|
899
|
+
o();
|
|
900
|
+
}), (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);
|
|
901
|
+
}
|
|
835
902
|
});
|
|
836
|
-
export {
|
|
903
|
+
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":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,cAAc,SAAS,CAAC"}
|