@glasshome/widget-sdk 1.26.0 → 1.27.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 +11 -0
- package/dist/deprecations.js +7 -0
- package/dist/export-history.json +144 -0
- package/dist/framework/hooks/use-reduced-motion.d.ts +2 -1
- package/dist/index.js +316 -301
- package/dist/theme.d.ts +4 -6
- package/dist/types.d.ts +4 -0
- package/guide/widgets.md +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,8 +4,8 @@ import { z as a, z as o } from "zod";
|
|
|
4
4
|
import { getForecasts as s, getStream as c, getWebRtcClientConfig as l, hassMediaUrl as u, sendWebRtcCandidate as d, startWebRtcSession as f, state as p, trackEntityHistory as m, untrackEntityHistory as h } from "@glasshome/sync-layer";
|
|
5
5
|
import { byDomain as g, useArea as _, useCalendarEvents as v, useCamera as y, useConnection as b, useCurrency as x, useEntities as S, useEntity as ee, useEntity as te, useEntityHistory as C, useEntityStatistics as w, useForecast as ne, useHassConfig as re, useLocale as ie, useService as ae, useStore as oe, useTemperatureUnit as se, useToggle as ce, useTurnOff as le, useTurnOn as ue, useUnitSystem as de } from "@glasshome/sync-layer/solid";
|
|
6
6
|
import { For as T, Show as E, children as fe, createContext as pe, createEffect as D, createMemo as O, createSignal as k, on as me, onCleanup as A, onMount as he, splitProps as ge, useContext as j } from "solid-js";
|
|
7
|
-
import { addEventListener as
|
|
8
|
-
import { Accordion as
|
|
7
|
+
import { addEventListener as M, className as N, createComponent as P, delegateEvents as _e, effect as F, insert as I, memo as L, setAttribute as R, setStyleProperty as z, style as B, template as V, use as H } from "solid-js/web";
|
|
8
|
+
import { Accordion as ve, AccordionContent as ye, AccordionItem as be, AccordionTrigger as xe, Badge as Se, Badge as Ce, Button as we, Button as Te, ButtonGroup as Ee, ButtonGroup as De, Carousel as Oe, CarouselContent as ke, CarouselDots as Ae, CarouselItem as je, CarouselNext as Me, CarouselPrevious as Ne, ColorDisc as Pe, ColorSlider as Fe, ColorWheel as Ie, CountPill as Le, CountPill as Re, Empty as ze, EmptyDescription as Be, EmptyHeader as Ve, EmptyTitle as He, FactRow as Ue, FieldGroup as We, FieldTitle as Ge, HOLD_GRACE_MS as Ke, HOLD_MS as qe, Icon as Je, Icon as U, Input as Ye, Label as Xe, Popover as Ze, PopoverContent as Qe, Progress as $e, ResponsiveDialog as et, ResponsiveDialogBody as tt, ResponsiveDialogBody as nt, ResponsiveDialogClose as rt, ResponsiveDialogContent as it, ResponsiveDialogDescription as at, ResponsiveDialogFooter as ot, ResponsiveDialogFooter as st, ResponsiveDialogHeader as ct, ResponsiveDialogTitle as lt, SchemaForm as ut, SectionIcon as dt, SectionIcon as ft, SectionMeta as pt, SectionRow as mt, SectionTitle as ht, Select as gt, SelectContent as _t, SelectItem as vt, SelectTrigger as yt, SelectValue as bt, Slider as xt, SwatchPicker as St, Switch as Ct, Tabs as wt, Tabs as Tt, TabsContent as Et, TabsContent as Dt, TabsList as Ot, TabsList as kt, TabsTrigger as At, TabsTrigger as jt, TemperatureBar as Mt, Toggle as Nt, ToggleGroup as Pt, ToggleGroup as Ft, ToggleGroupItem as It, ToggleGroupItem as Lt, buttonVariants as Rt, copyText as zt, imagePreset as Bt, imagePreset as Vt, imageUrl as Ht, imageUrl as Ut, mediaUrl as Wt, parseColor as Gt, presetValue as Kt, spendLongPress as qt, useCopyText as Jt, useCopyText as Yt } from "@glasshome/ui/solid";
|
|
9
9
|
import { clsx as Xt } from "clsx";
|
|
10
10
|
import { twMerge as Zt } from "tailwind-merge";
|
|
11
11
|
//#region src/framework/to-form-schema.ts
|
|
@@ -438,28 +438,28 @@ function J(...e) {
|
|
|
438
438
|
}
|
|
439
439
|
//#endregion
|
|
440
440
|
//#region src/framework/components/WidgetIcon.tsx
|
|
441
|
-
var Ln = /*#__PURE__*/
|
|
441
|
+
var Ln = /*#__PURE__*/ V("<div class=\"glasshome-widget-icon glasshome-widget-icon-stack glasshome-widget-icon-stack-2 glass glass-tint\">"), Rn = /*#__PURE__*/ V("<div class=\"glasshome-widget-icon glasshome-widget-icon-stack glasshome-widget-icon-stack-3 glass glass-tint\">"), zn = /*#__PURE__*/ V("<div><div class=\"glasshome-widget-icon-glyph flex items-center justify-center\">");
|
|
442
442
|
function Bn(e) {
|
|
443
443
|
let t = () => e.entityCount ?? 1;
|
|
444
444
|
return (() => {
|
|
445
445
|
var n = zn(), r = n.firstChild;
|
|
446
|
-
return
|
|
446
|
+
return I(n, P(E, {
|
|
447
447
|
get when() {
|
|
448
448
|
return t() >= 2;
|
|
449
449
|
},
|
|
450
450
|
get children() {
|
|
451
451
|
return Ln();
|
|
452
452
|
}
|
|
453
|
-
}), r),
|
|
453
|
+
}), r), I(n, P(E, {
|
|
454
454
|
get when() {
|
|
455
455
|
return t() >= 3;
|
|
456
456
|
},
|
|
457
457
|
get children() {
|
|
458
458
|
return Rn();
|
|
459
459
|
}
|
|
460
|
-
}), r),
|
|
460
|
+
}), r), I(r, () => e.icon), F((t) => {
|
|
461
461
|
var r = J("glasshome-widget-icon glass glass-tint", "pointer-events-none relative flex shrink-0 items-center justify-center transition-all", e.dimmed && "opacity-50", e.class), i = e.color ? { "--widget-icon-color": e.color } : void 0;
|
|
462
|
-
return r !== t.e &&
|
|
462
|
+
return r !== t.e && N(n, t.e = r), t.t = B(n, i, t.t), t;
|
|
463
463
|
}, {
|
|
464
464
|
e: void 0,
|
|
465
465
|
t: void 0
|
|
@@ -468,7 +468,7 @@ function Bn(e) {
|
|
|
468
468
|
}
|
|
469
469
|
//#endregion
|
|
470
470
|
//#region src/framework/components/anatomy.tsx
|
|
471
|
-
var Vn = /*#__PURE__*/
|
|
471
|
+
var Vn = /*#__PURE__*/ V("<span class=glasshome-widget-eyebrow>"), Hn = /*#__PURE__*/ V("<div class=glasshome-widget-head-aside>"), Un = /*#__PURE__*/ V("<div class=glasshome-widget-head><div class=glasshome-widget-head-text><span class=glasshome-widget-name>"), Wn = /*#__PURE__*/ V("<span class=glasshome-widget-sub>"), Gn = /*#__PURE__*/ V("<span class=glasshome-widget-unit>"), Kn = /*#__PURE__*/ V("<div class=glasshome-widget-art>"), qn = /*#__PURE__*/ V("<div><div class=glasshome-widget-reading><span class=glasshome-widget-reading-value>"), Jn = /*#__PURE__*/ V("<div class=glasshome-widget-controls>"), Yn = /*#__PURE__*/ V("<div>"), Xn = /*#__PURE__*/ V("<div class=glasshome-widget-backdrop>"), Zn = /*#__PURE__*/ V("<div class=glasshome-widget-glyph aria-hidden=true>"), Qn = pe(() => !1), $n = "mdi:check";
|
|
472
472
|
function er(e) {
|
|
473
473
|
let t = j(Qn), n = mn(j(W));
|
|
474
474
|
D(() => n?.setIcon(e.icon)), A(() => {
|
|
@@ -480,14 +480,14 @@ function er(e) {
|
|
|
480
480
|
};
|
|
481
481
|
return (() => {
|
|
482
482
|
var n = Un(), o = n.firstChild, s = o.firstChild;
|
|
483
|
-
return
|
|
483
|
+
return I(n, P(E, {
|
|
484
484
|
get when() {
|
|
485
485
|
return e.icon;
|
|
486
486
|
},
|
|
487
|
-
children: (n) =>
|
|
487
|
+
children: (n) => P(Bn, {
|
|
488
488
|
get icon() {
|
|
489
|
-
return
|
|
490
|
-
return
|
|
489
|
+
return P(U, { get icon() {
|
|
490
|
+
return L(() => !!t())() ? $n : n();
|
|
491
491
|
} });
|
|
492
492
|
},
|
|
493
493
|
get entityCount() {
|
|
@@ -498,21 +498,21 @@ function er(e) {
|
|
|
498
498
|
},
|
|
499
499
|
class: "glasshome-widget-head-icon"
|
|
500
500
|
})
|
|
501
|
-
}), o),
|
|
501
|
+
}), o), I(o, P(E, {
|
|
502
502
|
get when() {
|
|
503
|
-
return
|
|
503
|
+
return L(() => !!r())() && !a();
|
|
504
504
|
},
|
|
505
505
|
get children() {
|
|
506
506
|
var e = Vn();
|
|
507
|
-
return
|
|
507
|
+
return I(e, r), e;
|
|
508
508
|
}
|
|
509
|
-
}), s),
|
|
509
|
+
}), s), I(s, () => e.name), I(n, P(E, {
|
|
510
510
|
get when() {
|
|
511
511
|
return i();
|
|
512
512
|
},
|
|
513
513
|
get children() {
|
|
514
514
|
var e = Hn();
|
|
515
|
-
return
|
|
515
|
+
return I(e, i), e;
|
|
516
516
|
}
|
|
517
517
|
}), null), n;
|
|
518
518
|
})();
|
|
@@ -521,33 +521,33 @@ function tr(e) {
|
|
|
521
521
|
let t = fe(() => e.sub), n = fe(() => e.art), r = O(() => typeof e.value == "string" ? e.value.replace(/[\d\s.,:/%°+\-−]/g, "") : void 0), i = () => typeof e.value == "string" || typeof e.value == "number" ? String(e.value).length + (e.unit ? .5 : 0) : void 0, [a, o] = k();
|
|
522
522
|
return D(me(r, () => o((e) => e === "a" ? "b" : "a"), { defer: !0 })), (() => {
|
|
523
523
|
var r = qn(), o = r.firstChild, s = o.firstChild;
|
|
524
|
-
return
|
|
524
|
+
return I(o, P(E, {
|
|
525
525
|
get when() {
|
|
526
526
|
return t();
|
|
527
527
|
},
|
|
528
528
|
get children() {
|
|
529
529
|
var e = Wn();
|
|
530
|
-
return
|
|
530
|
+
return I(e, t), e;
|
|
531
531
|
}
|
|
532
|
-
}), s),
|
|
532
|
+
}), s), I(s, () => e.value, null), I(s, P(E, {
|
|
533
533
|
get when() {
|
|
534
534
|
return e.unit;
|
|
535
535
|
},
|
|
536
536
|
get children() {
|
|
537
537
|
var t = Gn();
|
|
538
|
-
return
|
|
538
|
+
return I(t, () => e.unit), F(() => R(t, "data-degree", e.unit === "°" || void 0)), t;
|
|
539
539
|
}
|
|
540
|
-
}), null),
|
|
540
|
+
}), null), I(r, P(E, {
|
|
541
541
|
get when() {
|
|
542
542
|
return n();
|
|
543
543
|
},
|
|
544
544
|
get children() {
|
|
545
545
|
var e = Kn();
|
|
546
|
-
return
|
|
546
|
+
return I(e, n), e;
|
|
547
547
|
}
|
|
548
|
-
}), null),
|
|
548
|
+
}), null), F((o) => {
|
|
549
549
|
var c = J("glasshome-widget-hero", e.class), l = n() ? "" : void 0, u = e.value === "" && !t() ? "" : void 0, d = a(), f = i();
|
|
550
|
-
return c !== o.e &&
|
|
550
|
+
return c !== o.e && N(r, o.e = c), l !== o.t && R(r, "data-art", o.t = l), u !== o.a && R(r, "data-empty", o.a = u), d !== o.o && R(s, "data-turn", o.o = d), f !== o.i && z(s, "--value-len", o.i = f), o;
|
|
551
551
|
}, {
|
|
552
552
|
e: void 0,
|
|
553
553
|
t: void 0,
|
|
@@ -560,40 +560,40 @@ function tr(e) {
|
|
|
560
560
|
function nr(e) {
|
|
561
561
|
return (() => {
|
|
562
562
|
var t = Jn();
|
|
563
|
-
return
|
|
563
|
+
return I(t, () => e.children), t;
|
|
564
564
|
})();
|
|
565
565
|
}
|
|
566
566
|
function rr(e) {
|
|
567
|
-
return
|
|
567
|
+
return P(De, {
|
|
568
568
|
get "aria-label"() {
|
|
569
569
|
return e.label;
|
|
570
570
|
},
|
|
571
571
|
class: "glasshome-widget-stepper",
|
|
572
572
|
get children() {
|
|
573
|
-
return [
|
|
573
|
+
return [P(Te, {
|
|
574
574
|
variant: "outline",
|
|
575
575
|
size: "icon",
|
|
576
576
|
"aria-label": "Lower",
|
|
577
577
|
class: "glasshome-widget-control",
|
|
578
578
|
onClick: () => e.onStep(-1),
|
|
579
579
|
get children() {
|
|
580
|
-
return
|
|
580
|
+
return P(U, { icon: "mdi:minus" });
|
|
581
581
|
}
|
|
582
|
-
}),
|
|
582
|
+
}), P(Te, {
|
|
583
583
|
variant: "outline",
|
|
584
584
|
size: "icon",
|
|
585
585
|
"aria-label": "Raise",
|
|
586
586
|
class: "glasshome-widget-control",
|
|
587
587
|
onClick: () => e.onStep(1),
|
|
588
588
|
get children() {
|
|
589
|
-
return
|
|
589
|
+
return P(U, { icon: "mdi:plus" });
|
|
590
590
|
}
|
|
591
591
|
})];
|
|
592
592
|
}
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
595
|
function ir(e) {
|
|
596
|
-
return
|
|
596
|
+
return P(Ft, {
|
|
597
597
|
get "aria-label"() {
|
|
598
598
|
return e.label;
|
|
599
599
|
},
|
|
@@ -606,11 +606,11 @@ function ir(e) {
|
|
|
606
606
|
onChange: (t) => t && e.onChange(t),
|
|
607
607
|
class: "glasshome-widget-choice",
|
|
608
608
|
get children() {
|
|
609
|
-
return
|
|
609
|
+
return P(T, {
|
|
610
610
|
get each() {
|
|
611
611
|
return e.options;
|
|
612
612
|
},
|
|
613
|
-
children: (t) =>
|
|
613
|
+
children: (t) => P(Lt, {
|
|
614
614
|
get value() {
|
|
615
615
|
return t.value;
|
|
616
616
|
},
|
|
@@ -622,7 +622,7 @@ function ir(e) {
|
|
|
622
622
|
return t.value === e.value ? void 0 : "";
|
|
623
623
|
},
|
|
624
624
|
get children() {
|
|
625
|
-
return
|
|
625
|
+
return P(U, { get icon() {
|
|
626
626
|
return t.icon;
|
|
627
627
|
} });
|
|
628
628
|
}
|
|
@@ -633,7 +633,7 @@ function ir(e) {
|
|
|
633
633
|
}
|
|
634
634
|
function ar(e) {
|
|
635
635
|
let t = In(), n = () => e.confirm ?? t, r = () => e.id ?? e["aria-label"] ?? e.icon, i = () => n().has(r());
|
|
636
|
-
return
|
|
636
|
+
return P(Te, {
|
|
637
637
|
variant: "outline",
|
|
638
638
|
get size() {
|
|
639
639
|
return e.children ? "default" : "icon";
|
|
@@ -649,48 +649,48 @@ function ar(e) {
|
|
|
649
649
|
},
|
|
650
650
|
onClick: () => void n().run([r()], e.run),
|
|
651
651
|
get children() {
|
|
652
|
-
return [
|
|
653
|
-
return
|
|
654
|
-
} }),
|
|
652
|
+
return [P(U, { get icon() {
|
|
653
|
+
return L(() => !!i())() ? $n : e.icon;
|
|
654
|
+
} }), L(() => e.children)];
|
|
655
655
|
}
|
|
656
656
|
});
|
|
657
657
|
}
|
|
658
658
|
function or(e) {
|
|
659
|
-
return
|
|
659
|
+
return P(Ce, {
|
|
660
660
|
get tone() {
|
|
661
661
|
return e.tone ?? "var(--muted-foreground)";
|
|
662
662
|
},
|
|
663
663
|
class: "gap-1 tabular-nums",
|
|
664
664
|
get children() {
|
|
665
|
-
return [
|
|
665
|
+
return [P(E, {
|
|
666
666
|
get when() {
|
|
667
667
|
return e.icon;
|
|
668
668
|
},
|
|
669
|
-
children: (e) =>
|
|
669
|
+
children: (e) => P(U, { get icon() {
|
|
670
670
|
return e();
|
|
671
671
|
} })
|
|
672
|
-
}),
|
|
672
|
+
}), L(() => e.children)];
|
|
673
673
|
}
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
676
|
function sr(e) {
|
|
677
677
|
return (() => {
|
|
678
678
|
var t = Yn();
|
|
679
|
-
return
|
|
679
|
+
return I(t, () => e.children), F(() => N(t, J("glasshome-widget-layer", e.class))), t;
|
|
680
680
|
})();
|
|
681
681
|
}
|
|
682
682
|
function cr(e) {
|
|
683
683
|
return (() => {
|
|
684
684
|
var t = Xn();
|
|
685
|
-
return
|
|
685
|
+
return I(t, () => e.children), t;
|
|
686
686
|
})();
|
|
687
687
|
}
|
|
688
688
|
function lr(e) {
|
|
689
689
|
let t = j(Qn);
|
|
690
690
|
return (() => {
|
|
691
691
|
var n = Zn();
|
|
692
|
-
return
|
|
693
|
-
return
|
|
692
|
+
return I(n, P(U, { get icon() {
|
|
693
|
+
return L(() => !!t())() ? $n : e.icon;
|
|
694
694
|
} })), n;
|
|
695
695
|
})();
|
|
696
696
|
}
|
|
@@ -744,16 +744,16 @@ function _r(e) {
|
|
|
744
744
|
}
|
|
745
745
|
//#endregion
|
|
746
746
|
//#region src/framework/backgrounds/WidgetSliderFill.tsx
|
|
747
|
-
var vr = /*#__PURE__*/
|
|
747
|
+
var vr = /*#__PURE__*/ V("<div>"), yr = e(() => void 0, "sliderFill.color");
|
|
748
748
|
function br(e) {
|
|
749
749
|
return e.color !== void 0 && yr(), (() => {
|
|
750
750
|
var t = vr();
|
|
751
|
-
return
|
|
751
|
+
return F((n) => {
|
|
752
752
|
var r = J("glasshome-widget-slider-fill pointer-events-none absolute inset-0", e.isDragging ? "duration-0" : "transition-all duration-300 ease-out", e.class), i = {
|
|
753
753
|
"--widget-fill-value": e.value,
|
|
754
754
|
"z-index": ln.BACKGROUND
|
|
755
755
|
};
|
|
756
|
-
return r !== n.e &&
|
|
756
|
+
return r !== n.e && N(t, n.e = r), n.t = B(t, i, n.t), n;
|
|
757
757
|
}, {
|
|
758
758
|
e: void 0,
|
|
759
759
|
t: void 0
|
|
@@ -762,16 +762,16 @@ function br(e) {
|
|
|
762
762
|
}
|
|
763
763
|
//#endregion
|
|
764
764
|
//#region src/framework/components/WidgetContent.tsx
|
|
765
|
-
var xr = /*#__PURE__*/
|
|
765
|
+
var xr = /*#__PURE__*/ V("<div>"), Sr = /\bglasshome-widget-(head|hero|controls|backdrop|glyph|layer)\b/;
|
|
766
766
|
function Cr(e) {
|
|
767
767
|
let t = mn(j(W));
|
|
768
768
|
D(() => t?.setAccent(e.accent)), A(() => t?.setAccent(void 0));
|
|
769
769
|
let n = fe(() => e.children), r = O(() => n.toArray().some((e) => e instanceof Element && Sr.test(e.className)));
|
|
770
770
|
return (() => {
|
|
771
771
|
var t = xr();
|
|
772
|
-
return
|
|
772
|
+
return I(t, n), F((n) => {
|
|
773
773
|
var i = J(r() ? "glasshome-widget-grid" : "glasshome-widget-content", e.class), a = e.accent ? { "--widget-color": e.accent } : void 0;
|
|
774
|
-
return i !== n.e &&
|
|
774
|
+
return i !== n.e && N(t, n.e = i), n.t = B(t, a, n.t), n;
|
|
775
775
|
}, {
|
|
776
776
|
e: void 0,
|
|
777
777
|
t: void 0
|
|
@@ -780,16 +780,16 @@ function Cr(e) {
|
|
|
780
780
|
}
|
|
781
781
|
//#endregion
|
|
782
782
|
//#region src/framework/components/WidgetStatus.tsx
|
|
783
|
-
var wr = /*#__PURE__*/
|
|
783
|
+
var wr = /*#__PURE__*/ V("<p>");
|
|
784
784
|
function Tr(e) {
|
|
785
785
|
return (() => {
|
|
786
786
|
var t = wr();
|
|
787
|
-
return
|
|
788
|
-
var t =
|
|
787
|
+
return I(t, (() => {
|
|
788
|
+
var t = L(() => !!e.isUnavailable);
|
|
789
789
|
return () => t() ? "Unavailable" : e.children;
|
|
790
|
-
})()),
|
|
790
|
+
})()), F((n) => {
|
|
791
791
|
var r = J("glasshome-widget-status", "relative", e.dimmed && "opacity-40", e.class), i = ln.ACTIONS;
|
|
792
|
-
return r !== n.e &&
|
|
792
|
+
return r !== n.e && N(t, n.e = r), i !== n.t && z(t, "z-index", n.t = i), n;
|
|
793
793
|
}, {
|
|
794
794
|
e: void 0,
|
|
795
795
|
t: void 0
|
|
@@ -798,21 +798,21 @@ function Tr(e) {
|
|
|
798
798
|
}
|
|
799
799
|
//#endregion
|
|
800
800
|
//#region src/framework/components/WidgetTitle.tsx
|
|
801
|
-
var Er = /*#__PURE__*/
|
|
801
|
+
var Er = /*#__PURE__*/ V("<span class=\"glasshome-widget-badge shrink-0\">"), Dr = /*#__PURE__*/ V("<div><h3 class=glasshome-widget-title>");
|
|
802
802
|
function Or(e) {
|
|
803
803
|
return (() => {
|
|
804
804
|
var t = Dr(), n = t.firstChild;
|
|
805
|
-
return
|
|
805
|
+
return I(n, () => e.children), I(t, P(E, {
|
|
806
806
|
get when() {
|
|
807
|
-
return
|
|
807
|
+
return L(() => e.badge !== void 0)() && e.badge > 0;
|
|
808
808
|
},
|
|
809
809
|
get children() {
|
|
810
810
|
var t = Er();
|
|
811
|
-
return
|
|
811
|
+
return I(t, () => e.badge), t;
|
|
812
812
|
}
|
|
813
|
-
}), null),
|
|
813
|
+
}), null), F((n) => {
|
|
814
814
|
var r = J("relative flex items-center gap-2", e.class), i = ln.ACTIONS;
|
|
815
|
-
return r !== n.e &&
|
|
815
|
+
return r !== n.e && N(t, n.e = r), i !== n.t && z(t, "z-index", n.t = i), n;
|
|
816
816
|
}, {
|
|
817
817
|
e: void 0,
|
|
818
818
|
t: void 0
|
|
@@ -1053,24 +1053,24 @@ function Lr(e, t) {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
//#endregion
|
|
1055
1055
|
//#region src/framework/components/WidgetValue.tsx
|
|
1056
|
-
var Rr = /*#__PURE__*/
|
|
1056
|
+
var Rr = /*#__PURE__*/ V("<div class=glasshome-widget-subtitle>"), zr = /*#__PURE__*/ V("<div><div class=glasshome-widget-value>");
|
|
1057
1057
|
function Br(e) {
|
|
1058
1058
|
return (() => {
|
|
1059
1059
|
var t = zr(), n = t.firstChild;
|
|
1060
|
-
return
|
|
1060
|
+
return I(n, () => Ir(e.value, e.unit)), I(t, P(E, {
|
|
1061
1061
|
get when() {
|
|
1062
|
-
return
|
|
1062
|
+
return L(() => !!e.interpret)() && typeof e.value == "number";
|
|
1063
1063
|
},
|
|
1064
1064
|
get children() {
|
|
1065
1065
|
var t = Rr();
|
|
1066
|
-
return
|
|
1066
|
+
return I(t, () => Lr(e.value, e.unit)), t;
|
|
1067
1067
|
}
|
|
1068
|
-
}), null),
|
|
1068
|
+
}), null), F(() => N(t, J("flex flex-col", e.class))), t;
|
|
1069
1069
|
})();
|
|
1070
1070
|
}
|
|
1071
1071
|
//#endregion
|
|
1072
1072
|
//#region src/framework/core/Widget.tsx
|
|
1073
|
-
var Vr = /*#__PURE__*/
|
|
1073
|
+
var Vr = /*#__PURE__*/ V("<span class=glasshome-widget-hold-flood aria-hidden=true>"), Hr = /*#__PURE__*/ V("<div class=\"glasshome-widget-halo glass-halo rounded-xl\"aria-hidden=true>"), Ur = /*#__PURE__*/ V("<div class=\"glasshome-widget-frame relative h-full w-full\"><div><div class=\"relative h-full w-full\">"), Wr = /*#__PURE__*/ V("<div class=\"glasshome-widget-loading pointer-events-none absolute inset-0 animate-pulse\">"), Gr = /*#__PURE__*/ V("<div class=\"flex h-full w-full flex-col items-center justify-center gap-2 text-center\">"), Kr = /*#__PURE__*/ V("<div class=\"text-muted-foreground flex items-center justify-center\">"), qr = /*#__PURE__*/ V("<h3 class=\"text-foreground text-sm font-semibold\">"), Jr = /*#__PURE__*/ V("<p class=\"text-muted-foreground text-xs\">"), Yr = 2e3;
|
|
1074
1074
|
function Xr(t) {
|
|
1075
1075
|
let n = j(W), r = Mn(() => ({ hold: { action: () => (G.get(n ?? {}) ?? G.get(f))?.("edit") } }));
|
|
1076
1076
|
A(r.dispose);
|
|
@@ -1165,39 +1165,39 @@ function Xr(t) {
|
|
|
1165
1165
|
height: `${w.r * 2}px`,
|
|
1166
1166
|
"z-index": ln.BACKGROUND
|
|
1167
1167
|
});
|
|
1168
|
-
return
|
|
1168
|
+
return P(W.Provider, {
|
|
1169
1169
|
value: f,
|
|
1170
1170
|
get children() {
|
|
1171
|
-
return
|
|
1171
|
+
return P(Qn.Provider, {
|
|
1172
1172
|
value: () => t.confirmed === !0,
|
|
1173
1173
|
get children() {
|
|
1174
|
-
return
|
|
1174
|
+
return P(Nn.Provider, {
|
|
1175
1175
|
value: u,
|
|
1176
1176
|
get children() {
|
|
1177
1177
|
return [(() => {
|
|
1178
1178
|
var e = Ur(), n = e.firstChild, i = n.firstChild;
|
|
1179
1179
|
return n.$$keydown = (e) => {
|
|
1180
1180
|
y() && s()?.onKeyDown?.(e);
|
|
1181
|
-
},
|
|
1181
|
+
}, M(n, "pointercancel", te), M(n, "pointerup", ee), M(n, "pointermove", S), M(n, "pointerdown", x), M(n, "pointerenter", b), H((e) => {
|
|
1182
1182
|
l(e), t.gestures?.bindElement(e), r.bindElement(e);
|
|
1183
|
-
}, n),
|
|
1183
|
+
}, n), I(n, P(E, {
|
|
1184
1184
|
get when() {
|
|
1185
1185
|
return s()?.hold;
|
|
1186
1186
|
},
|
|
1187
1187
|
get children() {
|
|
1188
1188
|
var e = Vr();
|
|
1189
|
-
return
|
|
1189
|
+
return F((t) => {
|
|
1190
1190
|
var n = C() && !C()?.fired ? "" : void 0, r = C()?.fired ? "" : void 0, i = ne(C());
|
|
1191
|
-
return n !== t.e &&
|
|
1191
|
+
return n !== t.e && R(e, "data-hold", t.e = n), r !== t.t && R(e, "data-fired", t.t = r), t.a = B(e, i, t.a), t;
|
|
1192
1192
|
}, {
|
|
1193
1193
|
e: void 0,
|
|
1194
1194
|
t: void 0,
|
|
1195
1195
|
a: void 0
|
|
1196
1196
|
}), e;
|
|
1197
1197
|
}
|
|
1198
|
-
}), i),
|
|
1199
|
-
var e =
|
|
1200
|
-
return () => e() ?
|
|
1198
|
+
}), i), I(i, (() => {
|
|
1199
|
+
var e = L(() => !!t.emptyState);
|
|
1200
|
+
return () => e() ? P(Zr, {
|
|
1201
1201
|
get icon() {
|
|
1202
1202
|
return t.emptyState.icon;
|
|
1203
1203
|
},
|
|
@@ -1208,27 +1208,27 @@ function Xr(t) {
|
|
|
1208
1208
|
return t.emptyState.message;
|
|
1209
1209
|
}
|
|
1210
1210
|
}) : t.children;
|
|
1211
|
-
})()),
|
|
1212
|
-
var e =
|
|
1211
|
+
})()), I(n, (() => {
|
|
1212
|
+
var e = L(() => !!t.loading);
|
|
1213
1213
|
return () => e() && (() => {
|
|
1214
1214
|
var e = Wr();
|
|
1215
|
-
return
|
|
1215
|
+
return F((t) => z(e, "z-index", ln.OVERLAY)), e;
|
|
1216
1216
|
})();
|
|
1217
|
-
})(), null),
|
|
1217
|
+
})(), null), I(e, P(E, {
|
|
1218
1218
|
when: !_,
|
|
1219
1219
|
get children() {
|
|
1220
1220
|
var e = Hr();
|
|
1221
|
-
return
|
|
1221
|
+
return F((t) => {
|
|
1222
1222
|
var n = g(), r = h() ? "" : void 0;
|
|
1223
|
-
return t.e =
|
|
1223
|
+
return t.e = B(e, n, t.e), r !== t.t && R(e, "data-toned", t.t = r), t;
|
|
1224
1224
|
}, {
|
|
1225
1225
|
e: void 0,
|
|
1226
1226
|
t: void 0
|
|
1227
1227
|
}), e;
|
|
1228
1228
|
}
|
|
1229
|
-
}), null),
|
|
1229
|
+
}), null), F((e) => {
|
|
1230
1230
|
var r = J("glasshome-widget glass", "relative h-full w-full overflow-hidden rounded-xl select-none", p()?.class, t.class), a = v(), o = h() ? "" : void 0, s = t.confirmed || void 0, c = y() ? 0 : void 0, l = ln.CONTENT;
|
|
1231
|
-
return r !== e.e &&
|
|
1231
|
+
return r !== e.e && N(n, e.e = r), e.t = B(n, a, e.t), o !== e.a && R(n, "data-toned", e.a = o), s !== e.o && R(n, "data-confirmed", e.o = s), c !== e.i && R(n, "tabindex", e.i = c), l !== e.n && z(i, "z-index", e.n = l), e;
|
|
1232
1232
|
}, {
|
|
1233
1233
|
e: void 0,
|
|
1234
1234
|
t: void 0,
|
|
@@ -1237,10 +1237,10 @@ function Xr(t) {
|
|
|
1237
1237
|
i: void 0,
|
|
1238
1238
|
n: void 0
|
|
1239
1239
|
}), e;
|
|
1240
|
-
})(),
|
|
1240
|
+
})(), P(E, {
|
|
1241
1241
|
when: a,
|
|
1242
1242
|
get children() {
|
|
1243
|
-
return
|
|
1243
|
+
return P(Ze, {
|
|
1244
1244
|
get open() {
|
|
1245
1245
|
return i?.nothingMore() ?? !1;
|
|
1246
1246
|
},
|
|
@@ -1249,10 +1249,10 @@ function Xr(t) {
|
|
|
1249
1249
|
},
|
|
1250
1250
|
anchorRef: c,
|
|
1251
1251
|
get children() {
|
|
1252
|
-
return
|
|
1252
|
+
return P(Qe, {
|
|
1253
1253
|
class: "flex w-auto items-center gap-2 p-3 text-sm",
|
|
1254
1254
|
get children() {
|
|
1255
|
-
return [
|
|
1255
|
+
return [P(U, { icon: "mdi:information-outline" }), "No more controls for this widget"];
|
|
1256
1256
|
}
|
|
1257
1257
|
});
|
|
1258
1258
|
}
|
|
@@ -1269,32 +1269,32 @@ function Xr(t) {
|
|
|
1269
1269
|
function Zr(e) {
|
|
1270
1270
|
return (() => {
|
|
1271
1271
|
var t = Gr();
|
|
1272
|
-
return
|
|
1273
|
-
var t =
|
|
1272
|
+
return I(t, (() => {
|
|
1273
|
+
var t = L(() => !!e.icon);
|
|
1274
1274
|
return () => t() && (() => {
|
|
1275
1275
|
var t = Kr();
|
|
1276
|
-
return
|
|
1276
|
+
return I(t, () => e.icon), t;
|
|
1277
1277
|
})();
|
|
1278
|
-
})(), null),
|
|
1279
|
-
var t =
|
|
1278
|
+
})(), null), I(t, (() => {
|
|
1279
|
+
var t = L(() => !!e.title);
|
|
1280
1280
|
return () => t() && (() => {
|
|
1281
1281
|
var t = qr();
|
|
1282
|
-
return
|
|
1282
|
+
return I(t, () => e.title), t;
|
|
1283
1283
|
})();
|
|
1284
|
-
})(), null),
|
|
1285
|
-
var t =
|
|
1284
|
+
})(), null), I(t, (() => {
|
|
1285
|
+
var t = L(() => !!e.message);
|
|
1286
1286
|
return () => t() && (() => {
|
|
1287
1287
|
var t = Jr();
|
|
1288
|
-
return
|
|
1288
|
+
return I(t, () => e.message), t;
|
|
1289
1289
|
})();
|
|
1290
1290
|
})(), null), t;
|
|
1291
1291
|
})();
|
|
1292
1292
|
}
|
|
1293
1293
|
var Y = Xr;
|
|
1294
|
-
Y.Content = Cr, Y.Icon = Bn, Y.Title = Or, Y.Status = Tr, Y.Value = Br, Y.SliderFill = br, Y.Head = er, Y.Hero = tr, Y.Controls = nr, Y.Stepper = rr, Y.Choice = ir, Y.Action = ar, Y.Chip = or, Y.Backdrop = cr, Y.Layer = sr, Y.Glyph = lr,
|
|
1294
|
+
Y.Content = Cr, Y.Icon = Bn, Y.Title = Or, Y.Status = Tr, Y.Value = Br, Y.SliderFill = br, Y.Head = er, Y.Hero = tr, Y.Controls = nr, Y.Stepper = rr, Y.Choice = ir, Y.Action = ar, Y.Chip = or, Y.Backdrop = cr, Y.Layer = sr, Y.Glyph = lr, _e(["keydown"]);
|
|
1295
1295
|
//#endregion
|
|
1296
1296
|
//#region src/framework/panel/panel.tsx
|
|
1297
|
-
var Qr = /*#__PURE__*/
|
|
1297
|
+
var Qr = /*#__PURE__*/ V("<section class=glasshome-panel-section><h3 class=glasshome-panel-label>"), $r = /*#__PURE__*/ V("<div class=glasshome-panel-rows>"), ei = /*#__PURE__*/ V("<span class=\"glasshome-widget-slider-fill glasshome-panel-row-fill\">"), ti = /*#__PURE__*/ V("<span class=\"glasshome-widget-icon glass glasshome-panel-row-icon\">"), ni = /*#__PURE__*/ V("<span class=glasshome-panel-row-state>"), ri = /*#__PURE__*/ V("<span class=glasshome-panel-row-text><span class=glasshome-panel-row-name>"), ii = /*#__PURE__*/ V("<span class=glasshome-panel-row-trailing>"), ai = /*#__PURE__*/ V("<div class=glasshome-panel-row-wrap>"), oi = /*#__PURE__*/ V("<div>"), si = /*#__PURE__*/ V("<div class=\"glasshome-panel-facts glass\">"), ci = /*#__PURE__*/ V("<div class=glasshome-panel-fact><span class=glasshome-panel-row-text><span class=glasshome-panel-fact-label></span><span class=glasshome-panel-fact-value>"), li = 8, ui = (e, t, n) => Math.min(n, Math.max(t, e));
|
|
1298
1298
|
function di(e) {
|
|
1299
1299
|
let t = j(W), n, r = !1, i = !1, a, o = 0, s = (t, n) => {
|
|
1300
1300
|
let r = e.slide?.();
|
|
@@ -1330,13 +1330,13 @@ function di(e) {
|
|
|
1330
1330
|
function fi(e) {
|
|
1331
1331
|
return (() => {
|
|
1332
1332
|
var t = Qr(), n = t.firstChild;
|
|
1333
|
-
return
|
|
1333
|
+
return I(n, () => e.label), I(t, () => e.children, null), t;
|
|
1334
1334
|
})();
|
|
1335
1335
|
}
|
|
1336
1336
|
function pi(e) {
|
|
1337
1337
|
return (() => {
|
|
1338
1338
|
var t = $r();
|
|
1339
|
-
return
|
|
1339
|
+
return I(t, () => e.children), t;
|
|
1340
1340
|
})();
|
|
1341
1341
|
}
|
|
1342
1342
|
function mi(e) {
|
|
@@ -1360,23 +1360,23 @@ function mi(e) {
|
|
|
1360
1360
|
let i = ui(n.value + r, n.min ?? 0, n.max ?? 100);
|
|
1361
1361
|
n.onChange(i), n.onCommit?.(i);
|
|
1362
1362
|
}, a = () => [
|
|
1363
|
-
|
|
1363
|
+
P(E, {
|
|
1364
1364
|
get when() {
|
|
1365
1365
|
return r() !== void 0;
|
|
1366
1366
|
},
|
|
1367
1367
|
get children() {
|
|
1368
1368
|
var e = ei();
|
|
1369
|
-
return
|
|
1369
|
+
return F((t) => B(e, { "--widget-fill-value": r() }, t)), e;
|
|
1370
1370
|
}
|
|
1371
1371
|
}),
|
|
1372
1372
|
(() => {
|
|
1373
1373
|
var t = ti();
|
|
1374
|
-
return
|
|
1374
|
+
return I(t, P(U, {
|
|
1375
1375
|
get icon() {
|
|
1376
1376
|
return e.icon;
|
|
1377
1377
|
},
|
|
1378
1378
|
class: "glasshome-widget-icon-glyph"
|
|
1379
|
-
})),
|
|
1379
|
+
})), F((n) => {
|
|
1380
1380
|
var r = !!e.on, i = !e.on;
|
|
1381
1381
|
return r !== n.e && t.classList.toggle("glass-tint", n.e = r), i !== n.t && t.classList.toggle("glasshome-panel-row-icon-off", n.t = i), n;
|
|
1382
1382
|
}, {
|
|
@@ -1386,32 +1386,32 @@ function mi(e) {
|
|
|
1386
1386
|
})(),
|
|
1387
1387
|
(() => {
|
|
1388
1388
|
var t = ri(), n = t.firstChild;
|
|
1389
|
-
return
|
|
1389
|
+
return I(n, () => e.name), I(t, P(E, {
|
|
1390
1390
|
get when() {
|
|
1391
1391
|
return e.state !== void 0;
|
|
1392
1392
|
},
|
|
1393
1393
|
get children() {
|
|
1394
1394
|
var t = ni();
|
|
1395
|
-
return
|
|
1395
|
+
return I(t, () => e.state), t;
|
|
1396
1396
|
}
|
|
1397
1397
|
}), null), t;
|
|
1398
1398
|
})()
|
|
1399
1399
|
], o = () => ({ "--widget-color": e.tone ?? "var(--tone-neutral)" });
|
|
1400
1400
|
return (() => {
|
|
1401
1401
|
var r = ai();
|
|
1402
|
-
return
|
|
1402
|
+
return I(r, P(E, {
|
|
1403
1403
|
get when() {
|
|
1404
1404
|
return t();
|
|
1405
1405
|
},
|
|
1406
1406
|
get fallback() {
|
|
1407
1407
|
return (() => {
|
|
1408
1408
|
var e = oi();
|
|
1409
|
-
return
|
|
1409
|
+
return I(e, a), F((t) => {
|
|
1410
1410
|
var n = `${Rt({
|
|
1411
1411
|
variant: "outline",
|
|
1412
1412
|
size: "none"
|
|
1413
1413
|
})} glasshome-panel-row glasshome-panel-row-static`, r = o();
|
|
1414
|
-
return n !== t.e &&
|
|
1414
|
+
return n !== t.e && N(e, t.e = n), t.t = B(e, r, t.t), t;
|
|
1415
1415
|
}, {
|
|
1416
1416
|
e: void 0,
|
|
1417
1417
|
t: void 0
|
|
@@ -1419,7 +1419,7 @@ function mi(e) {
|
|
|
1419
1419
|
})();
|
|
1420
1420
|
},
|
|
1421
1421
|
get children() {
|
|
1422
|
-
return
|
|
1422
|
+
return P(Te, {
|
|
1423
1423
|
variant: "outline",
|
|
1424
1424
|
size: "none",
|
|
1425
1425
|
class: "glasshome-panel-row",
|
|
@@ -1453,13 +1453,13 @@ function mi(e) {
|
|
|
1453
1453
|
}
|
|
1454
1454
|
});
|
|
1455
1455
|
}
|
|
1456
|
-
}), null),
|
|
1456
|
+
}), null), I(r, P(E, {
|
|
1457
1457
|
get when() {
|
|
1458
1458
|
return e.trailing;
|
|
1459
1459
|
},
|
|
1460
1460
|
get children() {
|
|
1461
1461
|
var t = ii();
|
|
1462
|
-
return
|
|
1462
|
+
return I(t, () => e.trailing), t;
|
|
1463
1463
|
}
|
|
1464
1464
|
}), null), r;
|
|
1465
1465
|
})();
|
|
@@ -1467,18 +1467,18 @@ function mi(e) {
|
|
|
1467
1467
|
function hi(e) {
|
|
1468
1468
|
return (() => {
|
|
1469
1469
|
var t = si();
|
|
1470
|
-
return
|
|
1470
|
+
return I(t, P(T, {
|
|
1471
1471
|
get each() {
|
|
1472
1472
|
return e.items;
|
|
1473
1473
|
},
|
|
1474
1474
|
children: (e) => (() => {
|
|
1475
1475
|
var t = ci(), n = t.firstChild, r = n.firstChild, i = r.nextSibling;
|
|
1476
|
-
return
|
|
1476
|
+
return I(t, P(U, {
|
|
1477
1477
|
get icon() {
|
|
1478
1478
|
return e.icon;
|
|
1479
1479
|
},
|
|
1480
1480
|
class: "glasshome-panel-fact-icon"
|
|
1481
|
-
}), n),
|
|
1481
|
+
}), n), I(r, () => e.label), I(i, () => e.value), t;
|
|
1482
1482
|
})()
|
|
1483
1483
|
})), t;
|
|
1484
1484
|
})();
|
|
@@ -1653,13 +1653,13 @@ function Ti(e) {
|
|
|
1653
1653
|
let t = te(() => e.entityId), { callService: n } = an(), [r, i] = k();
|
|
1654
1654
|
return D(() => {
|
|
1655
1655
|
t(), i(void 0);
|
|
1656
|
-
}),
|
|
1656
|
+
}), P(E, {
|
|
1657
1657
|
get when() {
|
|
1658
1658
|
return t();
|
|
1659
1659
|
},
|
|
1660
1660
|
children: (t) => {
|
|
1661
1661
|
let a = () => vi[t().domain] ?? Si, o = () => r() ?? a().level?.(t()), s = () => a().setLevel;
|
|
1662
|
-
return
|
|
1662
|
+
return P(mi, {
|
|
1663
1663
|
get icon() {
|
|
1664
1664
|
let n = a().icon;
|
|
1665
1665
|
return typeof n == "function" ? e.icon ?? n(t()) : e.icon ?? t().icon ?? yi[t().domain === "cover" ? t().deviceClass ?? "" : ""] ?? n;
|
|
@@ -1679,7 +1679,7 @@ function Ti(e) {
|
|
|
1679
1679
|
return a().on(t());
|
|
1680
1680
|
},
|
|
1681
1681
|
get slide() {
|
|
1682
|
-
return
|
|
1682
|
+
return L(() => !!(s() && o() !== void 0))() ? {
|
|
1683
1683
|
value: o() ?? 0,
|
|
1684
1684
|
onChange: i,
|
|
1685
1685
|
onCommit: (e) => s()?.(n, t(), e)
|
|
@@ -1697,7 +1697,7 @@ function Ti(e) {
|
|
|
1697
1697
|
}
|
|
1698
1698
|
//#endregion
|
|
1699
1699
|
//#region src/framework/dialogs/debug-view.tsx
|
|
1700
|
-
var Ei = /*#__PURE__*/
|
|
1700
|
+
var Ei = /*#__PURE__*/ V("<pre class=\"text-muted-foreground max-h-64 overflow-auto p-3 font-mono text-xs leading-relaxed\">"), Di = /*#__PURE__*/ V("<span class=\"flex items-center gap-2\">"), Oi = /*#__PURE__*/ V("<section class=\"flex min-w-0 flex-col gap-2\"><header class=\"flex items-center gap-3\"><div class=\"flex min-w-0 flex-1 flex-col\"></div></header><div class=\"flex flex-col gap-2\">"), ki = /*#__PURE__*/ V("<div class=\"flex flex-col\">"), Ai = /*#__PURE__*/ V("<pre class=\"text-muted-foreground max-h-96 overflow-auto p-3 font-mono text-xs leading-relaxed whitespace-pre-wrap\">");
|
|
1701
1701
|
function ji(e, t, n) {
|
|
1702
1702
|
return {
|
|
1703
1703
|
widgetConfig: e,
|
|
@@ -1726,7 +1726,7 @@ var Mi = (e) => JSON.stringify(e, null, 2), Ni = {
|
|
|
1726
1726
|
};
|
|
1727
1727
|
function Fi(e) {
|
|
1728
1728
|
let { state: t, copy: n } = Yt();
|
|
1729
|
-
return
|
|
1729
|
+
return P(Te, {
|
|
1730
1730
|
variant: "ghost",
|
|
1731
1731
|
size: "icon",
|
|
1732
1732
|
class: "size-8",
|
|
@@ -1735,7 +1735,7 @@ function Fi(e) {
|
|
|
1735
1735
|
},
|
|
1736
1736
|
onClick: () => void n(e.text()),
|
|
1737
1737
|
get children() {
|
|
1738
|
-
return
|
|
1738
|
+
return P(U, {
|
|
1739
1739
|
get icon() {
|
|
1740
1740
|
return Ni[t()];
|
|
1741
1741
|
},
|
|
@@ -1764,41 +1764,41 @@ function Bi(e) {
|
|
|
1764
1764
|
return Number.isNaN(t.getTime()) ? e : t.toLocaleString();
|
|
1765
1765
|
}
|
|
1766
1766
|
function Vi(e) {
|
|
1767
|
-
return
|
|
1767
|
+
return P(mt, {
|
|
1768
1768
|
class: "overflow-hidden p-0",
|
|
1769
1769
|
get children() {
|
|
1770
1770
|
var t = Ei();
|
|
1771
|
-
return
|
|
1771
|
+
return I(t, () => Mi(e.value)), t;
|
|
1772
1772
|
}
|
|
1773
1773
|
});
|
|
1774
1774
|
}
|
|
1775
1775
|
function Hi(e) {
|
|
1776
|
-
return
|
|
1776
|
+
return P(ve, {
|
|
1777
1777
|
collapsible: !0,
|
|
1778
1778
|
class: "border-border/50 border-t",
|
|
1779
1779
|
get children() {
|
|
1780
|
-
return
|
|
1780
|
+
return P(be, {
|
|
1781
1781
|
get value() {
|
|
1782
1782
|
return e.label;
|
|
1783
1783
|
},
|
|
1784
1784
|
get children() {
|
|
1785
|
-
return [
|
|
1785
|
+
return [P(xe, {
|
|
1786
1786
|
class: "text-muted-foreground py-3 text-xs",
|
|
1787
1787
|
get children() {
|
|
1788
1788
|
var t = Di();
|
|
1789
|
-
return
|
|
1789
|
+
return I(t, () => e.label, null), I(t, P(E, {
|
|
1790
1790
|
get when() {
|
|
1791
1791
|
return e.count !== void 0;
|
|
1792
1792
|
},
|
|
1793
1793
|
get children() {
|
|
1794
|
-
return
|
|
1794
|
+
return P(Re, { get children() {
|
|
1795
1795
|
return e.count;
|
|
1796
1796
|
} });
|
|
1797
1797
|
}
|
|
1798
1798
|
}), null), t;
|
|
1799
1799
|
}
|
|
1800
|
-
}),
|
|
1801
|
-
return
|
|
1800
|
+
}), P(ye, { get children() {
|
|
1801
|
+
return P(Vi, { get value() {
|
|
1802
1802
|
return e.value;
|
|
1803
1803
|
} });
|
|
1804
1804
|
} })];
|
|
@@ -1810,55 +1810,55 @@ function Hi(e) {
|
|
|
1810
1810
|
function Ui(e) {
|
|
1811
1811
|
return (() => {
|
|
1812
1812
|
var t = Oi(), n = t.firstChild, r = n.firstChild, i = n.nextSibling;
|
|
1813
|
-
return
|
|
1813
|
+
return I(n, P(ft, {
|
|
1814
1814
|
get icon() {
|
|
1815
1815
|
return e.icon;
|
|
1816
1816
|
},
|
|
1817
1817
|
size: "sm"
|
|
1818
|
-
}), r),
|
|
1818
|
+
}), r), I(r, P(Ge, {
|
|
1819
1819
|
class: "truncate",
|
|
1820
1820
|
get children() {
|
|
1821
1821
|
return e.title;
|
|
1822
1822
|
}
|
|
1823
|
-
}), null),
|
|
1823
|
+
}), null), I(r, P(E, {
|
|
1824
1824
|
get when() {
|
|
1825
1825
|
return e.subtitle;
|
|
1826
1826
|
},
|
|
1827
|
-
children: (e) =>
|
|
1827
|
+
children: (e) => P(pt, {
|
|
1828
1828
|
class: "truncate font-mono",
|
|
1829
1829
|
get children() {
|
|
1830
1830
|
return e();
|
|
1831
1831
|
}
|
|
1832
1832
|
})
|
|
1833
|
-
}), null),
|
|
1833
|
+
}), null), I(n, () => e.badge, null), I(n, P(Fi, {
|
|
1834
1834
|
get label() {
|
|
1835
1835
|
return `Copy ${e.title}`;
|
|
1836
1836
|
},
|
|
1837
1837
|
text: () => Mi(e.source)
|
|
1838
|
-
}), null),
|
|
1838
|
+
}), null), I(i, () => e.children), t;
|
|
1839
1839
|
})();
|
|
1840
1840
|
}
|
|
1841
1841
|
function Wi(e) {
|
|
1842
1842
|
let t = O(() => Object.entries(e.record)), n = O(() => t().flatMap(([e, t]) => Li(t) ? [[e, t]] : [])), r = O(() => t().filter(([, e]) => !Li(e)));
|
|
1843
|
-
return
|
|
1843
|
+
return P(E, {
|
|
1844
1844
|
get when() {
|
|
1845
1845
|
return t().length > 0;
|
|
1846
1846
|
},
|
|
1847
1847
|
get fallback() {
|
|
1848
|
-
return
|
|
1848
|
+
return P(pt, { children: "Nothing set" });
|
|
1849
1849
|
},
|
|
1850
1850
|
get children() {
|
|
1851
|
-
return [
|
|
1851
|
+
return [P(E, {
|
|
1852
1852
|
get when() {
|
|
1853
1853
|
return n().length > 0;
|
|
1854
1854
|
},
|
|
1855
1855
|
get children() {
|
|
1856
1856
|
var e = ki();
|
|
1857
|
-
return
|
|
1857
|
+
return I(e, P(T, {
|
|
1858
1858
|
get each() {
|
|
1859
1859
|
return n();
|
|
1860
1860
|
},
|
|
1861
|
-
children: ([e, t]) =>
|
|
1861
|
+
children: ([e, t]) => P(Ue, {
|
|
1862
1862
|
get label() {
|
|
1863
1863
|
return Ii(e);
|
|
1864
1864
|
},
|
|
@@ -1868,11 +1868,11 @@ function Wi(e) {
|
|
|
1868
1868
|
})
|
|
1869
1869
|
})), e;
|
|
1870
1870
|
}
|
|
1871
|
-
}),
|
|
1871
|
+
}), P(T, {
|
|
1872
1872
|
get each() {
|
|
1873
1873
|
return r();
|
|
1874
1874
|
},
|
|
1875
|
-
children: ([e, t]) =>
|
|
1875
|
+
children: ([e, t]) => P(Hi, {
|
|
1876
1876
|
get label() {
|
|
1877
1877
|
return Ii(e);
|
|
1878
1878
|
},
|
|
@@ -1887,7 +1887,7 @@ function Wi(e) {
|
|
|
1887
1887
|
}
|
|
1888
1888
|
function Gi(e) {
|
|
1889
1889
|
let t = () => e.entity.attributes ?? {};
|
|
1890
|
-
return
|
|
1890
|
+
return P(Ui, {
|
|
1891
1891
|
icon: "lucide:activity",
|
|
1892
1892
|
get title() {
|
|
1893
1893
|
return e.entity.friendly_name ?? e.entity.entity_id;
|
|
@@ -1896,7 +1896,7 @@ function Gi(e) {
|
|
|
1896
1896
|
return e.entity.entity_id;
|
|
1897
1897
|
},
|
|
1898
1898
|
get badge() {
|
|
1899
|
-
return
|
|
1899
|
+
return P(Ce, { get children() {
|
|
1900
1900
|
return e.entity.state;
|
|
1901
1901
|
} });
|
|
1902
1902
|
},
|
|
@@ -1906,48 +1906,48 @@ function Gi(e) {
|
|
|
1906
1906
|
get children() {
|
|
1907
1907
|
return [(() => {
|
|
1908
1908
|
var t = ki();
|
|
1909
|
-
return
|
|
1909
|
+
return I(t, P(Ue, {
|
|
1910
1910
|
label: "Domain",
|
|
1911
1911
|
get children() {
|
|
1912
1912
|
return e.entity.domain;
|
|
1913
1913
|
}
|
|
1914
|
-
}), null),
|
|
1914
|
+
}), null), I(t, P(E, {
|
|
1915
1915
|
get when() {
|
|
1916
1916
|
return e.entity.device_class;
|
|
1917
1917
|
},
|
|
1918
|
-
children: (e) =>
|
|
1918
|
+
children: (e) => P(Ue, {
|
|
1919
1919
|
label: "Device class",
|
|
1920
1920
|
get children() {
|
|
1921
1921
|
return e();
|
|
1922
1922
|
}
|
|
1923
1923
|
})
|
|
1924
|
-
}), null),
|
|
1924
|
+
}), null), I(t, P(E, {
|
|
1925
1925
|
get when() {
|
|
1926
1926
|
return e.entity.area_id;
|
|
1927
1927
|
},
|
|
1928
|
-
children: (e) =>
|
|
1928
|
+
children: (e) => P(Ue, {
|
|
1929
1929
|
label: "Area",
|
|
1930
1930
|
get children() {
|
|
1931
1931
|
return e();
|
|
1932
1932
|
}
|
|
1933
1933
|
})
|
|
1934
|
-
}), null),
|
|
1934
|
+
}), null), I(t, P(Ue, {
|
|
1935
1935
|
label: "Changed",
|
|
1936
1936
|
get children() {
|
|
1937
1937
|
return Bi(e.entity.last_changed);
|
|
1938
1938
|
}
|
|
1939
|
-
}), null),
|
|
1939
|
+
}), null), I(t, P(Ue, {
|
|
1940
1940
|
label: "Updated",
|
|
1941
1941
|
get children() {
|
|
1942
1942
|
return Bi(e.entity.last_updated);
|
|
1943
1943
|
}
|
|
1944
1944
|
}), null), t;
|
|
1945
|
-
})(),
|
|
1945
|
+
})(), P(E, {
|
|
1946
1946
|
get when() {
|
|
1947
1947
|
return zi(t()) > 0;
|
|
1948
1948
|
},
|
|
1949
1949
|
get children() {
|
|
1950
|
-
return
|
|
1950
|
+
return P(Hi, {
|
|
1951
1951
|
label: "Attributes",
|
|
1952
1952
|
get count() {
|
|
1953
1953
|
return zi(t());
|
|
@@ -1963,31 +1963,31 @@ function Gi(e) {
|
|
|
1963
1963
|
}
|
|
1964
1964
|
function Ki(e) {
|
|
1965
1965
|
let t = O(() => Object.keys(e.data).filter((e) => e !== "widgetConfig" && e !== "entities"));
|
|
1966
|
-
return
|
|
1966
|
+
return P(We, { get children() {
|
|
1967
1967
|
return [
|
|
1968
|
-
|
|
1968
|
+
P(Ui, {
|
|
1969
1969
|
icon: "lucide:sliders-horizontal",
|
|
1970
1970
|
title: "Configuration",
|
|
1971
1971
|
get source() {
|
|
1972
1972
|
return e.data.widgetConfig;
|
|
1973
1973
|
},
|
|
1974
1974
|
get children() {
|
|
1975
|
-
return
|
|
1975
|
+
return P(Wi, { get record() {
|
|
1976
1976
|
return e.data.widgetConfig;
|
|
1977
1977
|
} });
|
|
1978
1978
|
}
|
|
1979
1979
|
}),
|
|
1980
|
-
|
|
1980
|
+
P(T, {
|
|
1981
1981
|
get each() {
|
|
1982
1982
|
return e.data.entities;
|
|
1983
1983
|
},
|
|
1984
|
-
children: (e) =>
|
|
1984
|
+
children: (e) => P(Gi, { entity: e })
|
|
1985
1985
|
}),
|
|
1986
|
-
|
|
1986
|
+
P(T, {
|
|
1987
1987
|
get each() {
|
|
1988
1988
|
return t();
|
|
1989
1989
|
},
|
|
1990
|
-
children: (t) =>
|
|
1990
|
+
children: (t) => P(Ui, {
|
|
1991
1991
|
icon: "lucide:braces",
|
|
1992
1992
|
get title() {
|
|
1993
1993
|
return Ii(t);
|
|
@@ -1996,7 +1996,7 @@ function Ki(e) {
|
|
|
1996
1996
|
return e.data[t];
|
|
1997
1997
|
},
|
|
1998
1998
|
get children() {
|
|
1999
|
-
return
|
|
1999
|
+
return P(Vi, { get value() {
|
|
2000
2000
|
return e.data[t];
|
|
2001
2001
|
} });
|
|
2002
2002
|
}
|
|
@@ -2012,45 +2012,45 @@ function qi(e) {
|
|
|
2012
2012
|
}
|
|
2013
2013
|
function Ji(e) {
|
|
2014
2014
|
let t = O(() => qi(e.data));
|
|
2015
|
-
return
|
|
2015
|
+
return P(E, {
|
|
2016
2016
|
get when() {
|
|
2017
2017
|
return e.data !== void 0;
|
|
2018
2018
|
},
|
|
2019
2019
|
get fallback() {
|
|
2020
|
-
return
|
|
2021
|
-
return
|
|
2022
|
-
return [
|
|
2020
|
+
return P(ze, { get children() {
|
|
2021
|
+
return P(Ve, { get children() {
|
|
2022
|
+
return [P(He, { children: "Nothing to inspect" }), P(Be, { children: "This widget publishes no debug information." })];
|
|
2023
2023
|
} });
|
|
2024
2024
|
} });
|
|
2025
2025
|
},
|
|
2026
2026
|
get children() {
|
|
2027
|
-
return
|
|
2027
|
+
return P(E, {
|
|
2028
2028
|
get when() {
|
|
2029
2029
|
return t();
|
|
2030
2030
|
},
|
|
2031
2031
|
get fallback() {
|
|
2032
|
-
return
|
|
2032
|
+
return P(Ui, {
|
|
2033
2033
|
icon: "lucide:braces",
|
|
2034
2034
|
title: "Debug data",
|
|
2035
2035
|
get source() {
|
|
2036
2036
|
return e.data;
|
|
2037
2037
|
},
|
|
2038
2038
|
get children() {
|
|
2039
|
-
return
|
|
2039
|
+
return P(E, {
|
|
2040
2040
|
get when() {
|
|
2041
2041
|
return typeof e.data == "string";
|
|
2042
2042
|
},
|
|
2043
2043
|
get fallback() {
|
|
2044
|
-
return
|
|
2044
|
+
return P(Vi, { get value() {
|
|
2045
2045
|
return e.data;
|
|
2046
2046
|
} });
|
|
2047
2047
|
},
|
|
2048
2048
|
get children() {
|
|
2049
|
-
return
|
|
2049
|
+
return P(mt, {
|
|
2050
2050
|
class: "overflow-hidden p-0",
|
|
2051
2051
|
get children() {
|
|
2052
2052
|
var t = Ai();
|
|
2053
|
-
return
|
|
2053
|
+
return I(t, () => e.data), t;
|
|
2054
2054
|
}
|
|
2055
2055
|
});
|
|
2056
2056
|
}
|
|
@@ -2058,7 +2058,7 @@ function Ji(e) {
|
|
|
2058
2058
|
}
|
|
2059
2059
|
});
|
|
2060
2060
|
},
|
|
2061
|
-
children: (e) =>
|
|
2061
|
+
children: (e) => P(Ki, { get data() {
|
|
2062
2062
|
return e();
|
|
2063
2063
|
} })
|
|
2064
2064
|
});
|
|
@@ -2081,7 +2081,7 @@ function Xi(e, t) {
|
|
|
2081
2081
|
}
|
|
2082
2082
|
//#endregion
|
|
2083
2083
|
//#region src/framework/dialogs/WidgetDialog.tsx
|
|
2084
|
-
var Zi = /*#__PURE__*/
|
|
2084
|
+
var Zi = /*#__PURE__*/ V("<svg xmlns=http://www.w3.org/2000/svg class=size-3.5 fill=none viewBox=\"0 0 24 24\"stroke=currentColor stroke-width=2><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\">"), Qi = /*#__PURE__*/ V("<div class=\"bg-muted/30 rounded-lg p-2 text-center md:p-6\"><p class=\"text-muted-foreground text-sm\">No edit options available"), $i = /*#__PURE__*/ V("<svg xmlns=http://www.w3.org/2000/svg class=size-3.5 fill=none viewBox=\"0 0 24 24\"stroke=currentColor stroke-width=2><line x1=4 y1=21 x2=4 y2=14></line><line x1=4 y1=10 x2=4 y2=3></line><line x1=12 y1=21 x2=12 y2=12></line><line x1=12 y1=8 x2=12 y2=3></line><line x1=20 y1=21 x2=20 y2=16></line><line x1=20 y1=12 x2=20 y2=3></line><line x1=1 y1=14 x2=7 y2=14></line><line x1=9 y1=8 x2=15 y2=8></line><line x1=17 y1=16 x2=23 y2=16>"), ea = /*#__PURE__*/ V("<svg xmlns=http://www.w3.org/2000/svg class=size-3.5 fill=none viewBox=\"0 0 24 24\"stroke=currentColor stroke-width=2><path d=\"m8 2 1.88 1.88\"></path><path d=\"M14.12 3.88 16 2\"></path><path d=\"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1\"></path><path d=\"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6\"></path><path d=\"M12 20v-9\"></path><path d=\"M6.53 9C4.6 8.8 3 7.1 3 5\"></path><path d=\"M6 13H2\"></path><path d=\"M3 21c0-2.1 1.7-3.9 3.8-4\"></path><path d=\"M20.97 5c0 2.1-1.6 3.8-3.5 4\"></path><path d=\"M22 13h-4\"></path><path d=\"M17.2 17c2.1.1 3.8 1.9 3.8 4\">"), ta = /*#__PURE__*/ V("<div class=glasshome-sheet>"), na = /*#__PURE__*/ V("<div class=glasshome-sheet-band aria-hidden=true><img alt>"), ra = /*#__PURE__*/ V("<span class=\"glasshome-widget-icon glass glass-tint glasshome-sheet-icon\">"), ia = /*#__PURE__*/ V("<span class=\"inline-flex size-3.5 shrink-0 items-center\">"), aa = (e) => Qt(e), oa = {
|
|
2085
2085
|
sm: "sm",
|
|
2086
2086
|
md: "md",
|
|
2087
2087
|
lg: "lg",
|
|
@@ -2129,7 +2129,7 @@ function ca(e) {
|
|
|
2129
2129
|
icon: () => Zi(),
|
|
2130
2130
|
content: () => t.editContent ?? (() => {
|
|
2131
2131
|
let e = t.SchemaForm, o = n() ? a() : void 0;
|
|
2132
|
-
return !o || !e ? Qi() :
|
|
2132
|
+
return !o || !e ? Qi() : P(e, {
|
|
2133
2133
|
schema: o,
|
|
2134
2134
|
get data() {
|
|
2135
2135
|
return r();
|
|
@@ -2144,16 +2144,16 @@ function ca(e) {
|
|
|
2144
2144
|
id: "controls",
|
|
2145
2145
|
label: "Controls",
|
|
2146
2146
|
icon: () => $i(),
|
|
2147
|
-
content: () => t.controlsContent ??
|
|
2148
|
-
return
|
|
2149
|
-
return [
|
|
2147
|
+
content: () => t.controlsContent ?? P(ze, { get children() {
|
|
2148
|
+
return P(Ve, { get children() {
|
|
2149
|
+
return [P(He, { children: "No controls" }), P(Be, { children: "This widget is shown as is." })];
|
|
2150
2150
|
} });
|
|
2151
2151
|
} })
|
|
2152
2152
|
}), e.push({
|
|
2153
2153
|
id: "debug",
|
|
2154
2154
|
label: "Debug",
|
|
2155
2155
|
icon: () => ea(),
|
|
2156
|
-
content: () => t.debugContent ??
|
|
2156
|
+
content: () => t.debugContent ?? P(Ji, { get data() {
|
|
2157
2157
|
return t.debugData;
|
|
2158
2158
|
} })
|
|
2159
2159
|
}), e;
|
|
@@ -2163,66 +2163,66 @@ function ca(e) {
|
|
|
2163
2163
|
icon: t.tile?.icon ?? y?.icon(),
|
|
2164
2164
|
tone: t.tile?.tone ?? y?.accent() ?? y?.tone(),
|
|
2165
2165
|
backdrop: t.tile?.backdrop
|
|
2166
|
-
}), x = () => v?.developer?.() ?? !1, S = () =>
|
|
2166
|
+
}), x = () => v?.developer?.() ?? !1, S = () => H() === "controls" && t.sheet !== void 0, ee = la(), te = () => v?.anchor?.(), C = () => S() && !ee() && te() !== void 0, w = Yt(), ne = () => {
|
|
2167
2167
|
if (t.debugData === void 0) return;
|
|
2168
2168
|
let e = typeof t.debugData == "string" ? t.debugData : JSON.stringify(t.debugData, null, 2);
|
|
2169
2169
|
w.copy(e);
|
|
2170
|
-
}, re = t.ResponsiveDialog, ie = t.ResponsiveDialogContent, ae = t.ResponsiveDialogHeader, oe = t.ResponsiveDialogTitle, se = t.ResponsiveDialogDescription, ce = t.ResponsiveDialogBody ?? nt, le = t.ResponsiveDialogFooter ?? st, ue = t.Tabs ?? Tt, de = t.TabsList ?? kt, fe = t.TabsTrigger ?? jt, pe = t.TabsContent ?? Dt, he = t.Button,
|
|
2170
|
+
}, re = t.ResponsiveDialog, ie = t.ResponsiveDialogContent, ae = t.ResponsiveDialogHeader, oe = t.ResponsiveDialogTitle, se = t.ResponsiveDialogDescription, ce = t.ResponsiveDialogBody ?? nt, le = t.ResponsiveDialogFooter ?? st, ue = t.Tabs ?? Tt, de = t.TabsList ?? kt, fe = t.TabsTrigger ?? jt, pe = t.TabsContent ?? Dt, he = t.Button, M = O(me([
|
|
2171
2171
|
() => t.open,
|
|
2172
2172
|
a,
|
|
2173
2173
|
() => t.config,
|
|
2174
2174
|
() => t.tabs
|
|
2175
|
-
], () => _())),
|
|
2176
|
-
let e =
|
|
2175
|
+
], () => _())), N = (e) => n() ? u(e) : t.onOpenChange(e), _e = () => n() ? l() : t.hasUnsavedChanges, z = () => n() ? d : t.onSave, B = () => M().filter((e) => e.id !== "debug" || x()), V = () => B().filter((e) => e.id !== "controls" || t.sheet === void 0), H = () => {
|
|
2176
|
+
let e = B(), n = m() === "controls" && t.sheet === void 0 && !("controlsContent" in t) && !t.tabs ? "edit" : m();
|
|
2177
2177
|
return e.some((e) => e.id === n) ? n : e[0]?.id ?? n;
|
|
2178
|
-
},
|
|
2179
|
-
return
|
|
2178
|
+
}, ve = () => H() === "edit" && (z() || t.onDelete) || H() === "debug" && t.debugData !== void 0;
|
|
2179
|
+
return P(re, {
|
|
2180
2180
|
get open() {
|
|
2181
2181
|
return t.open;
|
|
2182
2182
|
},
|
|
2183
|
-
onOpenChange: (e) =>
|
|
2183
|
+
onOpenChange: (e) => N(e),
|
|
2184
2184
|
get children() {
|
|
2185
|
-
return
|
|
2185
|
+
return P(E, {
|
|
2186
2186
|
get when() {
|
|
2187
2187
|
return !S();
|
|
2188
2188
|
},
|
|
2189
2189
|
get fallback() {
|
|
2190
|
-
return
|
|
2190
|
+
return P(ie, {
|
|
2191
2191
|
size: "sm",
|
|
2192
2192
|
get ariaLabel() {
|
|
2193
2193
|
return t.title;
|
|
2194
2194
|
},
|
|
2195
2195
|
get anchor() {
|
|
2196
|
-
return
|
|
2196
|
+
return L(() => !!C())() ? te() : void 0;
|
|
2197
2197
|
},
|
|
2198
2198
|
class: "glasshome-sheet-surface",
|
|
2199
2199
|
get style() {
|
|
2200
|
-
return
|
|
2200
|
+
return L(() => !!b().tone)() ? {
|
|
2201
2201
|
"--glass-tone": b().tone,
|
|
2202
2202
|
"--widget-color": b().tone
|
|
2203
2203
|
} : void 0;
|
|
2204
2204
|
},
|
|
2205
2205
|
get children() {
|
|
2206
2206
|
return [
|
|
2207
|
-
|
|
2207
|
+
P(E, {
|
|
2208
2208
|
get when() {
|
|
2209
2209
|
return b().backdrop;
|
|
2210
2210
|
},
|
|
2211
2211
|
children: (e) => (() => {
|
|
2212
2212
|
var t = na(), n = t.firstChild;
|
|
2213
|
-
return
|
|
2213
|
+
return F(() => R(n, "src", e())), t;
|
|
2214
2214
|
})()
|
|
2215
2215
|
}),
|
|
2216
|
-
|
|
2216
|
+
P(ae, {
|
|
2217
2217
|
class: "items-center",
|
|
2218
2218
|
get media() {
|
|
2219
|
-
return
|
|
2219
|
+
return P(E, {
|
|
2220
2220
|
get when() {
|
|
2221
2221
|
return b().icon;
|
|
2222
2222
|
},
|
|
2223
2223
|
children: (e) => (() => {
|
|
2224
2224
|
var t = ra();
|
|
2225
|
-
return
|
|
2225
|
+
return I(t, P(U, {
|
|
2226
2226
|
get icon() {
|
|
2227
2227
|
return e();
|
|
2228
2228
|
},
|
|
@@ -2232,7 +2232,7 @@ function ca(e) {
|
|
|
2232
2232
|
});
|
|
2233
2233
|
},
|
|
2234
2234
|
get children() {
|
|
2235
|
-
return
|
|
2235
|
+
return P(oe, {
|
|
2236
2236
|
class: "truncate",
|
|
2237
2237
|
get children() {
|
|
2238
2238
|
return t.title;
|
|
@@ -2240,16 +2240,16 @@ function ca(e) {
|
|
|
2240
2240
|
});
|
|
2241
2241
|
}
|
|
2242
2242
|
}),
|
|
2243
|
-
|
|
2243
|
+
P(ce, { get children() {
|
|
2244
2244
|
var e = ta();
|
|
2245
|
-
return
|
|
2245
|
+
return I(e, () => t.sheet?.()), e;
|
|
2246
2246
|
} })
|
|
2247
2247
|
];
|
|
2248
2248
|
}
|
|
2249
2249
|
});
|
|
2250
2250
|
},
|
|
2251
2251
|
get children() {
|
|
2252
|
-
return
|
|
2252
|
+
return P(ie, {
|
|
2253
2253
|
get size() {
|
|
2254
2254
|
return g();
|
|
2255
2255
|
},
|
|
@@ -2257,70 +2257,70 @@ function ca(e) {
|
|
|
2257
2257
|
return t.class;
|
|
2258
2258
|
},
|
|
2259
2259
|
get children() {
|
|
2260
|
-
return
|
|
2260
|
+
return P(ue, {
|
|
2261
2261
|
get value() {
|
|
2262
|
-
return
|
|
2262
|
+
return H();
|
|
2263
2263
|
},
|
|
2264
2264
|
onChange: h,
|
|
2265
2265
|
layout: "split",
|
|
2266
2266
|
get children() {
|
|
2267
2267
|
return [
|
|
2268
|
-
|
|
2268
|
+
P(ae, {
|
|
2269
2269
|
class: "flex-wrap",
|
|
2270
2270
|
get action() {
|
|
2271
|
-
return [
|
|
2271
|
+
return [P(E, {
|
|
2272
2272
|
get when() {
|
|
2273
2273
|
return x() || t.tabs !== void 0;
|
|
2274
2274
|
},
|
|
2275
2275
|
get children() {
|
|
2276
|
-
return
|
|
2276
|
+
return P(de, {
|
|
2277
2277
|
class: "w-auto",
|
|
2278
2278
|
get children() {
|
|
2279
|
-
return
|
|
2279
|
+
return P(T, {
|
|
2280
2280
|
get each() {
|
|
2281
|
-
return
|
|
2281
|
+
return V();
|
|
2282
2282
|
},
|
|
2283
|
-
children: (e) =>
|
|
2283
|
+
children: (e) => P(fe, {
|
|
2284
2284
|
get value() {
|
|
2285
2285
|
return e.id;
|
|
2286
2286
|
},
|
|
2287
2287
|
get children() {
|
|
2288
2288
|
return [(() => {
|
|
2289
2289
|
var t = ia();
|
|
2290
|
-
return
|
|
2291
|
-
})(),
|
|
2290
|
+
return I(t, () => e.icon()), t;
|
|
2291
|
+
})(), L(() => e.label)];
|
|
2292
2292
|
}
|
|
2293
2293
|
})
|
|
2294
2294
|
});
|
|
2295
2295
|
}
|
|
2296
2296
|
});
|
|
2297
2297
|
}
|
|
2298
|
-
}),
|
|
2298
|
+
}), L(() => t.headerActions)];
|
|
2299
2299
|
},
|
|
2300
2300
|
get children() {
|
|
2301
|
-
return [
|
|
2301
|
+
return [P(oe, {
|
|
2302
2302
|
class: "truncate",
|
|
2303
2303
|
get children() {
|
|
2304
2304
|
return t.title;
|
|
2305
2305
|
}
|
|
2306
|
-
}),
|
|
2306
|
+
}), P(E, {
|
|
2307
2307
|
get when() {
|
|
2308
2308
|
return t.description;
|
|
2309
2309
|
},
|
|
2310
2310
|
get children() {
|
|
2311
|
-
return
|
|
2311
|
+
return P(se, { get children() {
|
|
2312
2312
|
return t.description;
|
|
2313
2313
|
} });
|
|
2314
2314
|
}
|
|
2315
2315
|
})];
|
|
2316
2316
|
}
|
|
2317
2317
|
}),
|
|
2318
|
-
|
|
2319
|
-
return
|
|
2318
|
+
P(ce, { get children() {
|
|
2319
|
+
return P(T, {
|
|
2320
2320
|
get each() {
|
|
2321
|
-
return
|
|
2321
|
+
return B();
|
|
2322
2322
|
},
|
|
2323
|
-
children: (e) =>
|
|
2323
|
+
children: (e) => P(pe, {
|
|
2324
2324
|
get value() {
|
|
2325
2325
|
return e.id;
|
|
2326
2326
|
},
|
|
@@ -2330,19 +2330,19 @@ function ca(e) {
|
|
|
2330
2330
|
})
|
|
2331
2331
|
});
|
|
2332
2332
|
} }),
|
|
2333
|
-
|
|
2333
|
+
P(E, {
|
|
2334
2334
|
get when() {
|
|
2335
|
-
return
|
|
2335
|
+
return ve();
|
|
2336
2336
|
},
|
|
2337
2337
|
get children() {
|
|
2338
|
-
return
|
|
2338
|
+
return P(le, { get children() {
|
|
2339
2339
|
return [
|
|
2340
|
-
|
|
2340
|
+
P(E, {
|
|
2341
2341
|
get when() {
|
|
2342
|
-
return
|
|
2342
|
+
return L(() => H() === "edit")() && t.onDelete;
|
|
2343
2343
|
},
|
|
2344
2344
|
get children() {
|
|
2345
|
-
return
|
|
2345
|
+
return P(he, {
|
|
2346
2346
|
size: "sm",
|
|
2347
2347
|
variant: "destructive",
|
|
2348
2348
|
onClick: () => t.onDelete?.(),
|
|
@@ -2350,27 +2350,27 @@ function ca(e) {
|
|
|
2350
2350
|
});
|
|
2351
2351
|
}
|
|
2352
2352
|
}),
|
|
2353
|
-
|
|
2353
|
+
P(E, {
|
|
2354
2354
|
get when() {
|
|
2355
|
-
return
|
|
2355
|
+
return L(() => H() === "edit")() && z();
|
|
2356
2356
|
},
|
|
2357
2357
|
get children() {
|
|
2358
|
-
return
|
|
2358
|
+
return P(he, {
|
|
2359
2359
|
size: "sm",
|
|
2360
2360
|
get disabled() {
|
|
2361
|
-
return !
|
|
2361
|
+
return !_e();
|
|
2362
2362
|
},
|
|
2363
|
-
onClick: () =>
|
|
2363
|
+
onClick: () => z()?.(),
|
|
2364
2364
|
children: "Save"
|
|
2365
2365
|
});
|
|
2366
2366
|
}
|
|
2367
2367
|
}),
|
|
2368
|
-
|
|
2368
|
+
P(E, {
|
|
2369
2369
|
get when() {
|
|
2370
|
-
return
|
|
2370
|
+
return L(() => H() === "debug")() && t.debugData !== void 0;
|
|
2371
2371
|
},
|
|
2372
2372
|
get children() {
|
|
2373
|
-
return
|
|
2373
|
+
return P(he, {
|
|
2374
2374
|
size: "sm",
|
|
2375
2375
|
variant: "outline",
|
|
2376
2376
|
onClick: ne,
|
|
@@ -2849,15 +2849,35 @@ function Wa() {
|
|
|
2849
2849
|
});
|
|
2850
2850
|
}
|
|
2851
2851
|
//#endregion
|
|
2852
|
+
//#region src/theme.ts
|
|
2853
|
+
var Ga = /* @__PURE__ */ new Map(), Ka;
|
|
2854
|
+
function qa(e) {
|
|
2855
|
+
let t = new MutationObserver(() => {
|
|
2856
|
+
for (let [t, [, n]] of Ga) n(e.classList.contains(t));
|
|
2857
|
+
});
|
|
2858
|
+
return t.observe(e, {
|
|
2859
|
+
attributes: !0,
|
|
2860
|
+
attributeFilter: ["class"]
|
|
2861
|
+
}), t;
|
|
2862
|
+
}
|
|
2863
|
+
function Ja(e) {
|
|
2864
|
+
if (typeof document > "u") return !1;
|
|
2865
|
+
let t = document.documentElement, n = Ga.get(e);
|
|
2866
|
+
return n || (n = k(t.classList.contains(e)), Ga.set(e, n), Ka ??= qa(t)), n[0](), t.classList.contains(e);
|
|
2867
|
+
}
|
|
2868
|
+
function Ya() {
|
|
2869
|
+
return Ja("dark");
|
|
2870
|
+
}
|
|
2871
|
+
//#endregion
|
|
2852
2872
|
//#region src/framework/hooks/use-reduced-motion.ts
|
|
2853
|
-
function
|
|
2873
|
+
function Xa() {
|
|
2854
2874
|
if (typeof window > "u" || typeof window.matchMedia != "function") return () => !1;
|
|
2855
2875
|
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), [t, n] = k(e.matches), r = (e) => n(e.matches);
|
|
2856
|
-
return e.addEventListener("change", r), A(() => e.removeEventListener("change", r)), t;
|
|
2876
|
+
return e.addEventListener("change", r), A(() => e.removeEventListener("change", r)), () => t() || Ja("reduce-motion");
|
|
2857
2877
|
}
|
|
2858
2878
|
//#endregion
|
|
2859
2879
|
//#region src/framework/hooks/use-widget-entity-group.ts
|
|
2860
|
-
function
|
|
2880
|
+
function Za(e) {
|
|
2861
2881
|
let t = e.minEntities ?? 1, n = O(() => e.entities().length), r = O(() => n() >= t), i = O(() => !r() || !e.calculateGroupData ? null : e.calculateGroupData(e.entities())), a = O(() => {
|
|
2862
2882
|
if (!r()) return;
|
|
2863
2883
|
let t = e.aggregationMode?.();
|
|
@@ -2877,7 +2897,7 @@ function Ka(e) {
|
|
|
2877
2897
|
}
|
|
2878
2898
|
//#endregion
|
|
2879
2899
|
//#region src/framework/theming/svg-colors.ts
|
|
2880
|
-
var
|
|
2900
|
+
var Qa = {
|
|
2881
2901
|
solar: "oklch(0.74 0.18 60)",
|
|
2882
2902
|
grid: "oklch(0.62 0.12 245)",
|
|
2883
2903
|
battery: "oklch(0.70 0.18 145)",
|
|
@@ -2886,21 +2906,21 @@ var qa = {
|
|
|
2886
2906
|
positive: "oklch(0.70 0.14 160)",
|
|
2887
2907
|
negative: "oklch(0.64 0.22 27)"
|
|
2888
2908
|
};
|
|
2889
|
-
function
|
|
2909
|
+
function $a(e) {
|
|
2890
2910
|
return {
|
|
2891
2911
|
fill: `color-mix(in oklch, ${e} 20%, transparent)`,
|
|
2892
2912
|
stroke: e,
|
|
2893
2913
|
solid: e
|
|
2894
2914
|
};
|
|
2895
2915
|
}
|
|
2896
|
-
var
|
|
2916
|
+
var eo = Object.fromEntries(Object.entries(Qa).map(([e, t]) => [e, $a(t)])), to = o.enum([
|
|
2897
2917
|
"success",
|
|
2898
2918
|
"warning",
|
|
2899
2919
|
"danger",
|
|
2900
2920
|
"info",
|
|
2901
2921
|
"neutral",
|
|
2902
2922
|
"accent"
|
|
2903
|
-
]),
|
|
2923
|
+
]), no = {
|
|
2904
2924
|
title: e(() => o.string().optional().meta({
|
|
2905
2925
|
title: "Title",
|
|
2906
2926
|
description: "Optional display name override"
|
|
@@ -2920,38 +2940,38 @@ var Ya = Object.fromEntries(Object.entries(qa).map(([e, t]) => [e, Ja(t)])), Xa
|
|
|
2920
2940
|
formType: "area-picker",
|
|
2921
2941
|
title: "Area"
|
|
2922
2942
|
}), "widgetFields.areaId")
|
|
2923
|
-
},
|
|
2943
|
+
}, ro = 24;
|
|
2924
2944
|
function $(e) {
|
|
2925
2945
|
let t = {};
|
|
2926
2946
|
for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = r);
|
|
2927
2947
|
return t;
|
|
2928
2948
|
}
|
|
2929
|
-
function
|
|
2949
|
+
function io() {
|
|
2930
2950
|
return o.string().optional().meta({
|
|
2931
2951
|
title: "Title",
|
|
2932
2952
|
description: "Optional display name override"
|
|
2933
2953
|
});
|
|
2934
2954
|
}
|
|
2935
|
-
function
|
|
2955
|
+
function ao(e) {
|
|
2936
2956
|
return (e.default === void 0 ? o.string().optional() : o.string().default(e.default)).meta($({
|
|
2937
2957
|
title: e.title,
|
|
2938
2958
|
description: e.description
|
|
2939
2959
|
}));
|
|
2940
2960
|
}
|
|
2941
|
-
function
|
|
2961
|
+
function oo(e) {
|
|
2942
2962
|
let t = o.number();
|
|
2943
2963
|
return e.min !== void 0 && (t = t.min(e.min)), e.max !== void 0 && (t = t.max(e.max)), (e.default === void 0 ? t.optional() : t.default(e.default)).meta($({
|
|
2944
2964
|
title: e.title,
|
|
2945
2965
|
description: e.description
|
|
2946
2966
|
}));
|
|
2947
2967
|
}
|
|
2948
|
-
function
|
|
2968
|
+
function so(e) {
|
|
2949
2969
|
return o.boolean().default(e.default ?? !1).meta($({
|
|
2950
2970
|
title: e.title,
|
|
2951
2971
|
description: e.description
|
|
2952
2972
|
}));
|
|
2953
2973
|
}
|
|
2954
|
-
function
|
|
2974
|
+
function co(e, t) {
|
|
2955
2975
|
let n = o.enum(e);
|
|
2956
2976
|
return (t.default === void 0 ? n.optional() : n.default(t.default)).meta($({
|
|
2957
2977
|
title: t.title,
|
|
@@ -2960,14 +2980,14 @@ function ro(e, t) {
|
|
|
2960
2980
|
icons: t.icons
|
|
2961
2981
|
}));
|
|
2962
2982
|
}
|
|
2963
|
-
function
|
|
2983
|
+
function lo(e, t) {
|
|
2964
2984
|
return o.array(o.enum(e)).default([...t.default ?? []]).meta($({
|
|
2965
2985
|
title: t.title,
|
|
2966
2986
|
description: t.description,
|
|
2967
2987
|
labels: t.labels
|
|
2968
2988
|
}));
|
|
2969
2989
|
}
|
|
2970
|
-
function
|
|
2990
|
+
function uo(e, t) {
|
|
2971
2991
|
return o.array(o.string()).default([]).meta($({
|
|
2972
2992
|
domain: e,
|
|
2973
2993
|
title: t?.title ?? "Entities",
|
|
@@ -2975,7 +2995,7 @@ function ao(e, t) {
|
|
|
2975
2995
|
deviceClass: t?.deviceClass
|
|
2976
2996
|
}));
|
|
2977
2997
|
}
|
|
2978
|
-
function
|
|
2998
|
+
function fo(e, t) {
|
|
2979
2999
|
return o.array(o.string()).default([]).meta($({
|
|
2980
3000
|
domain: e,
|
|
2981
3001
|
title: t?.title ?? "Entity",
|
|
@@ -2984,13 +3004,13 @@ function oo(e, t) {
|
|
|
2984
3004
|
singleSelect: !0
|
|
2985
3005
|
}));
|
|
2986
3006
|
}
|
|
2987
|
-
function
|
|
3007
|
+
function po(e) {
|
|
2988
3008
|
return o.string().optional().meta({
|
|
2989
3009
|
formType: "area-picker",
|
|
2990
3010
|
title: e?.title ?? "Area"
|
|
2991
3011
|
});
|
|
2992
3012
|
}
|
|
2993
|
-
function
|
|
3013
|
+
function mo(e) {
|
|
2994
3014
|
let t = o.string().meta($({
|
|
2995
3015
|
formType: "icon-picker",
|
|
2996
3016
|
title: e?.title ?? "Icon",
|
|
@@ -2998,7 +3018,7 @@ function co(e) {
|
|
|
2998
3018
|
}));
|
|
2999
3019
|
return e?.default === void 0 ? t.optional() : t.default(e.default);
|
|
3000
3020
|
}
|
|
3001
|
-
function
|
|
3021
|
+
function ho(e) {
|
|
3002
3022
|
let t = e?.presets && Object.fromEntries(Object.entries(e.presets).map(([e, t]) => [e, {
|
|
3003
3023
|
label: t.label,
|
|
3004
3024
|
thumb: t.thumb
|
|
@@ -3010,36 +3030,36 @@ function lo(e) {
|
|
|
3010
3030
|
}));
|
|
3011
3031
|
return e?.default === void 0 ? n.optional() : n.default(e.default);
|
|
3012
3032
|
}
|
|
3013
|
-
function
|
|
3033
|
+
function go(e) {
|
|
3014
3034
|
return o.array(o.string()).default([]).meta($({
|
|
3015
3035
|
title: e.title,
|
|
3016
3036
|
description: e.description
|
|
3017
3037
|
}));
|
|
3018
3038
|
}
|
|
3019
|
-
function
|
|
3039
|
+
function _o(e, t) {
|
|
3020
3040
|
let n = o.object(e);
|
|
3021
3041
|
return n.default($t(n)).meta({ title: t.title });
|
|
3022
3042
|
}
|
|
3023
|
-
function
|
|
3043
|
+
function vo(e) {
|
|
3024
3044
|
return e.def;
|
|
3025
3045
|
}
|
|
3026
|
-
function
|
|
3046
|
+
function yo(e) {
|
|
3027
3047
|
if (o.globalRegistry.get(e)?.formType === "list") return !0;
|
|
3028
|
-
let t =
|
|
3029
|
-
return t.shape ? Object.values(t.shape).some(
|
|
3048
|
+
let t = vo(e);
|
|
3049
|
+
return t.shape ? Object.values(t.shape).some(yo) : t.options ? t.options.some(yo) : t.element ? yo(t.element) : t.innerType ? yo(t.innerType) : !1;
|
|
3030
3050
|
}
|
|
3031
|
-
function
|
|
3032
|
-
let t = e, n =
|
|
3033
|
-
for (; n;) t = n, n =
|
|
3051
|
+
function bo(e) {
|
|
3052
|
+
let t = e, n = vo(t).innerType;
|
|
3053
|
+
for (; n;) t = n, n = vo(t).innerType;
|
|
3034
3054
|
return t;
|
|
3035
3055
|
}
|
|
3036
|
-
function
|
|
3037
|
-
let t =
|
|
3056
|
+
function xo(e) {
|
|
3057
|
+
let t = vo(bo(e));
|
|
3038
3058
|
if (t.shape) return new Set(Object.keys(t.shape));
|
|
3039
3059
|
if (t.options) {
|
|
3040
3060
|
let e = [];
|
|
3041
3061
|
for (let n of t.options) {
|
|
3042
|
-
let t =
|
|
3062
|
+
let t = xo(n);
|
|
3043
3063
|
if (!t) return null;
|
|
3044
3064
|
e.push(t);
|
|
3045
3065
|
}
|
|
@@ -3051,7 +3071,7 @@ function go(e) {
|
|
|
3051
3071
|
}
|
|
3052
3072
|
return null;
|
|
3053
3073
|
}
|
|
3054
|
-
function
|
|
3074
|
+
function So(e, t, n) {
|
|
3055
3075
|
let r = { [t]: n };
|
|
3056
3076
|
try {
|
|
3057
3077
|
return e.parse(r);
|
|
@@ -3059,12 +3079,12 @@ function _o(e, t, n) {
|
|
|
3059
3079
|
return r;
|
|
3060
3080
|
}
|
|
3061
3081
|
}
|
|
3062
|
-
function
|
|
3082
|
+
function Co(e, t) {
|
|
3063
3083
|
if (!Number.isInteger(t.max) || t.max < 1) throw Error(`field.list: max must be a positive integer, got ${t.max}`);
|
|
3064
|
-
if (t.max >
|
|
3084
|
+
if (t.max > ro) throw Error(`field.list: max ${t.max} exceeds the ceiling of ${ro}`);
|
|
3065
3085
|
if (t.min !== void 0 && (!Number.isInteger(t.min) || t.min < 0 || t.min > t.max)) throw Error(`field.list: min must be an integer between 0 and max, got ${t.min}`);
|
|
3066
|
-
if (
|
|
3067
|
-
if (t.labelField !== void 0 && !
|
|
3086
|
+
if (yo(e)) throw Error("field.list: a list item cannot contain another field.list (depth 1 only)");
|
|
3087
|
+
if (t.labelField !== void 0 && !xo(e)?.has(t.labelField)) throw Error(`field.list: labelField "${t.labelField}" must name a field present in every item`);
|
|
3068
3088
|
let n = o.array(e);
|
|
3069
3089
|
return t.min !== void 0 && (n = n.min(t.min)), n = n.max(t.max), n.default([]).meta($({
|
|
3070
3090
|
formType: "list",
|
|
@@ -3074,7 +3094,7 @@ function vo(e, t) {
|
|
|
3074
3094
|
labelField: t.labelField
|
|
3075
3095
|
}));
|
|
3076
3096
|
}
|
|
3077
|
-
function
|
|
3097
|
+
function wo(e, t, n) {
|
|
3078
3098
|
let r = Object.keys(t)[0];
|
|
3079
3099
|
if (r === void 0) throw Error("field.variants: at least one variant is required");
|
|
3080
3100
|
if (n.shared && e in n.shared) throw Error(`field.variants: shared fields cannot redefine the discriminator "${e}"`);
|
|
@@ -3087,7 +3107,7 @@ function yo(e, t, n) {
|
|
|
3087
3107
|
...r,
|
|
3088
3108
|
[e]: o.literal(t)
|
|
3089
3109
|
})), a = o.discriminatedUnion(e, i), s = i[0];
|
|
3090
|
-
return a.default(s ?
|
|
3110
|
+
return a.default(s ? So(s, e, r) : {}).meta($({
|
|
3091
3111
|
formType: "variants",
|
|
3092
3112
|
discriminator: e,
|
|
3093
3113
|
title: n.title,
|
|
@@ -3095,35 +3115,35 @@ function yo(e, t, n) {
|
|
|
3095
3115
|
labels: n.labels
|
|
3096
3116
|
}));
|
|
3097
3117
|
}
|
|
3098
|
-
var
|
|
3099
|
-
title:
|
|
3100
|
-
text:
|
|
3101
|
-
number:
|
|
3102
|
-
toggle:
|
|
3103
|
-
choice:
|
|
3104
|
-
choices:
|
|
3105
|
-
entities:
|
|
3106
|
-
entity:
|
|
3107
|
-
area:
|
|
3108
|
-
icon:
|
|
3109
|
-
image:
|
|
3110
|
-
stringList:
|
|
3111
|
-
group:
|
|
3112
|
-
list:
|
|
3113
|
-
variants:
|
|
3118
|
+
var To = {
|
|
3119
|
+
title: io,
|
|
3120
|
+
text: ao,
|
|
3121
|
+
number: oo,
|
|
3122
|
+
toggle: so,
|
|
3123
|
+
choice: co,
|
|
3124
|
+
choices: lo,
|
|
3125
|
+
entities: uo,
|
|
3126
|
+
entity: fo,
|
|
3127
|
+
area: po,
|
|
3128
|
+
icon: mo,
|
|
3129
|
+
image: ho,
|
|
3130
|
+
stringList: go,
|
|
3131
|
+
group: _o,
|
|
3132
|
+
list: Co,
|
|
3133
|
+
variants: wo
|
|
3114
3134
|
};
|
|
3115
|
-
function
|
|
3135
|
+
function Eo(e) {
|
|
3116
3136
|
return o.object(e);
|
|
3117
3137
|
}
|
|
3118
3138
|
//#endregion
|
|
3119
3139
|
//#region src/framework/image-src.ts
|
|
3120
|
-
function
|
|
3140
|
+
function Do(e, t) {
|
|
3121
3141
|
let n = Vt(e);
|
|
3122
3142
|
return n === void 0 ? Ut(e) : t?.[n]?.src;
|
|
3123
3143
|
}
|
|
3124
3144
|
//#endregion
|
|
3125
3145
|
//#region src/shared/spline.ts
|
|
3126
|
-
function
|
|
3146
|
+
function Oo(e) {
|
|
3127
3147
|
if (e.length < 2) return "";
|
|
3128
3148
|
let t = e[0], n = e[1];
|
|
3129
3149
|
if (!t || !n) return "";
|
|
@@ -3149,15 +3169,10 @@ function Co(e) {
|
|
|
3149
3169
|
return c;
|
|
3150
3170
|
}
|
|
3151
3171
|
//#endregion
|
|
3152
|
-
//#region src/theme.ts
|
|
3153
|
-
function wo() {
|
|
3154
|
-
return document.documentElement.classList.contains("dark");
|
|
3155
|
-
}
|
|
3156
|
-
//#endregion
|
|
3157
3172
|
//#region src/version.ts
|
|
3158
|
-
var
|
|
3173
|
+
var ko = {
|
|
3159
3174
|
name: "@glasshome/widget-sdk",
|
|
3160
|
-
version: "1.
|
|
3175
|
+
version: "1.27.0",
|
|
3161
3176
|
description: "SDK for building GlassHome dashboard widgets with SolidJS",
|
|
3162
3177
|
keywords: [
|
|
3163
3178
|
"dashboard",
|
|
@@ -3262,4 +3277,4 @@ var To = {
|
|
|
3262
3277
|
engines: { node: ">=18" }
|
|
3263
3278
|
}.version;
|
|
3264
3279
|
//#endregion
|
|
3265
|
-
export {
|
|
3280
|
+
export { Se as Badge, we as Button, Ee as ButtonGroup, Oe as Carousel, ke as CarouselContent, Ae as CarouselDots, je as CarouselItem, Me as CarouselNext, Ne as CarouselPrevious, Pe as ColorDisc, Fe as ColorSlider, Ie as ColorWheel, Le as CountPill, Je as Icon, Ye as Input, Xe as Label, Ti as PanelEntityRow, hi as PanelFacts, mi as PanelRow, pi as PanelRows, fi as PanelSection, $e as Progress, et as ResponsiveDialog, tt as ResponsiveDialogBody, rt as ResponsiveDialogClose, it as ResponsiveDialogContent, at as ResponsiveDialogDescription, ot as ResponsiveDialogFooter, ct as ResponsiveDialogHeader, lt as ResponsiveDialogTitle, ko as SDK_VERSION, ut as SchemaForm, dt as SectionIcon, ht as SectionTitle, gt as Select, _t as SelectContent, vt as SelectItem, yt as SelectTrigger, bt as SelectValue, xt as Slider, St as SwatchPicker, Ct as Switch, wt as Tabs, Et as TabsContent, Ot as TabsList, At as TabsTrigger, Mt as TemperatureBar, Nt as Toggle, Pt as ToggleGroup, It as ToggleGroupItem, to as ToneSchema, Y as Widget, ar as WidgetAction, cr as WidgetBackdrop, or as WidgetChip, ir as WidgetChoice, Cr as WidgetContent, nr as WidgetControls, W as WidgetCtx, Ji as WidgetDebugTab, Ki as WidgetDebugView, ca as WidgetDialog, lr as WidgetGlyph, er as WidgetHead, tr as WidgetHero, Bn as WidgetIcon, sr as WidgetLayer, r as WidgetManifestSchema, Nn as WidgetSizeCtx, br as WidgetSliderFill, Tr as WidgetStatus, rr as WidgetStepper, Or as WidgetTitle, Br as WidgetValue, ji as buildDebugData, g as byDomain, kr as calculateLightGroup, Ar as calculateSensorGroup, zt as copyText, Fr as countActiveEntities, Eo as defineConfig, en as defineWidget, t as deprecations, To as field, n as formatDeprecation, i as formatSchemaError, Pr as getEntityAttribute, s as getForecasts, c as getStream, l as getWebRtcClientConfig, u as hassMediaUrl, Bt as imagePreset, Do as imageSrc, Ht as imageUrl, hr as injectTokens, Ya as isDark, Nr as isEntityActive, wi as isPanelControllable, Wt as mediaUrl, Oo as monotoneCubicPath, Gt as parseColor, Kt as presetValue, d as sendWebRtcCandidate, f as startWebRtcSession, p as state, eo as svgColors, m as trackEntityHistory, h as untrackEntityHistory, _ as useArea, v as useCalendarEvents, y as useCamera, In as useConfirm, b as useConnection, Jt as useCopyText, x as useCurrency, Wa as useDaylight, S as useEntities, ee as useEntity, C as useEntityHistory, w as useEntityStatistics, ne as useForecast, re as useHassConfig, Ma as useIntersectionPause, ie as useLocale, ja as useMaterial, Xa as useReducedMotion, an as useService, oe as useStore, se as useTemperatureUnit, cn as useToggle, sn as useTurnOff, on as useTurnOn, de as useUnitSystem, tn as useWidgetContext, da as useWidgetDashboard, un as useWidgetDialog, Pn as useWidgetDimensions, Za as useWidgetEntityGroup, Mn as useWidgetGestures, pa as useWidgetViewer, no as widgetFields, a as z };
|