@glasshome/widget-sdk 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data.d.ts +2 -1
- package/dist/framework/hooks/index.d.ts +1 -1
- package/dist/framework/hooks/use-service.d.ts +11 -0
- package/dist/framework/hooks/use-widget-context.d.ts +6 -0
- package/dist/framework/index.d.ts +1 -1
- package/dist/index.js +334 -302
- package/dist/vite/index.js +138 -115
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { z as A } from "zod";
|
|
2
|
-
import { widgetManifestSchema as
|
|
3
|
-
import { effect as W, className as
|
|
4
|
-
import { createElementSize as
|
|
5
|
-
import { createContext as
|
|
6
|
-
import { clsx as
|
|
2
|
+
import { widgetManifestSchema as xn, formatSchemaError as yn } from "@glasshome/widget-contract";
|
|
3
|
+
import { effect as W, className as I, style as le, template as x, insert as p, createComponent as k, memo as T, setStyleProperty as ee, addEventListener as K, use as Se, delegateEvents as Ce } from "solid-js/web";
|
|
4
|
+
import { createElementSize as Me } from "@solid-primitives/resize-observer";
|
|
5
|
+
import { createContext as De, useContext as B, Show as E, createSignal as V, onMount as Te, createMemo as j, splitProps as _e, createEffect as se, on as ge, onCleanup as ce } from "solid-js";
|
|
6
|
+
import { clsx as Oe } from "clsx";
|
|
7
7
|
import { twMerge as ze } from "tailwind-merge";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
8
|
+
import { useService as Ee, useToggle as Ne, useTurnOff as Ae, useTurnOn as Ve } from "@glasshome/sync-layer/solid";
|
|
9
|
+
import { byDomain as kn, useArea as Sn, useCamera as Cn, useConnection as Mn, useCurrency as Dn, useEntities as Tn, useEntity as _n, useEntityHistory as On, useEntityStatistics as zn, useForecast as En, useHassConfig as Nn, useLocale as An, useStore as Vn, useTemperatureUnit as Wn, useUnitSystem as Rn } from "@glasshome/sync-layer/solid";
|
|
10
|
+
import { getForecasts as Pn, getStream as In, getWebRtcClientConfig as Ln, sendWebRtcCandidate as Un, startWebRtcSession as jn, state as Bn, trackEntityHistory as Fn, untrackEntityHistory as Gn } from "@glasshome/sync-layer";
|
|
11
|
+
function me(e) {
|
|
11
12
|
return A.toJSONSchema(e, {
|
|
12
13
|
override: (t) => {
|
|
13
14
|
const i = A.globalRegistry.get(t.zodSchema);
|
|
@@ -15,17 +16,53 @@ function fe(e) {
|
|
|
15
16
|
}
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function We(e) {
|
|
19
20
|
try {
|
|
20
21
|
return e.parse({});
|
|
21
22
|
} catch {
|
|
22
23
|
return {};
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
return e.configSchema && (e.manifest.schema || (e.manifest.schema =
|
|
26
|
+
function Jt(e) {
|
|
27
|
+
return e.configSchema && (e.manifest.schema || (e.manifest.schema = me(e.configSchema)), e.manifest.defaultConfig || (e.manifest.defaultConfig = We(e.configSchema))), e;
|
|
28
|
+
}
|
|
29
|
+
const P = De();
|
|
30
|
+
function Qt() {
|
|
31
|
+
const e = B(P);
|
|
32
|
+
if (!e)
|
|
33
|
+
throw new Error("useWidgetContext must be used within a Widget component");
|
|
34
|
+
return e;
|
|
35
|
+
}
|
|
36
|
+
function Re(e) {
|
|
37
|
+
const t = Array.isArray(e) ? e[0] : e, i = t?.split(".")[0];
|
|
38
|
+
if (!i) throw new Error(`Invalid entity ID: ${String(t)}`);
|
|
39
|
+
return i;
|
|
40
|
+
}
|
|
41
|
+
function G(e, t) {
|
|
42
|
+
return (i, r = {}) => e(Re(i), t, r, { entity_id: i });
|
|
27
43
|
}
|
|
28
|
-
|
|
44
|
+
function Zt() {
|
|
45
|
+
const e = B(P)?.callService;
|
|
46
|
+
return e ? {
|
|
47
|
+
callService: e,
|
|
48
|
+
turnOn: G(e, "turn_on"),
|
|
49
|
+
turnOff: G(e, "turn_off"),
|
|
50
|
+
toggle: G(e, "toggle")
|
|
51
|
+
} : Ee();
|
|
52
|
+
}
|
|
53
|
+
function en() {
|
|
54
|
+
const e = B(P)?.callService;
|
|
55
|
+
return e ? G(e, "turn_on") : Ve();
|
|
56
|
+
}
|
|
57
|
+
function tn() {
|
|
58
|
+
const e = B(P)?.callService;
|
|
59
|
+
return e ? G(e, "turn_off") : Ae();
|
|
60
|
+
}
|
|
61
|
+
function nn() {
|
|
62
|
+
const e = B(P)?.callService;
|
|
63
|
+
return e ? G(e, "toggle") : Ne();
|
|
64
|
+
}
|
|
65
|
+
const J = {
|
|
29
66
|
/** Background layer (gradients, images, glows) */
|
|
30
67
|
BACKGROUND: 0,
|
|
31
68
|
/** Main content layer (icon, title, text) */
|
|
@@ -34,14 +71,7 @@ const Y = {
|
|
|
34
71
|
OVERLAY: 20,
|
|
35
72
|
/** Action layer (buttons, edit controls) */
|
|
36
73
|
ACTIONS: 30
|
|
37
|
-
},
|
|
38
|
-
function Ft() {
|
|
39
|
-
const e = se(Q);
|
|
40
|
-
if (!e)
|
|
41
|
-
throw new Error("useWidgetContext must be used within a Widget component");
|
|
42
|
-
return e;
|
|
43
|
-
}
|
|
44
|
-
const me = `/* Authoritative SDK CSS contract. Injected once on first Widget mount
|
|
74
|
+
}, ve = `/* Authoritative SDK CSS contract. Injected once on first Widget mount
|
|
45
75
|
* via framework/theming/tokens.ts.
|
|
46
76
|
*
|
|
47
77
|
* All widget-internal visual scale is driven from CSS custom properties +
|
|
@@ -213,34 +243,34 @@ const me = `/* Authoritative SDK CSS contract. Injected once on first Widget mou
|
|
|
213
243
|
}
|
|
214
244
|
}
|
|
215
245
|
`;
|
|
216
|
-
let
|
|
217
|
-
const
|
|
218
|
-
function
|
|
219
|
-
return
|
|
220
|
-
|
|
221
|
-
)),
|
|
222
|
-
}
|
|
223
|
-
function
|
|
246
|
+
let re = !1, Q;
|
|
247
|
+
const he = /* @__PURE__ */ new WeakSet();
|
|
248
|
+
function He() {
|
|
249
|
+
return Q || (Q = new CSSStyleSheet(), Q.replaceSync(
|
|
250
|
+
ve.replace(/:root\b/g, ":host").replace(/^\.dark\b/gm, ":host(.dark)")
|
|
251
|
+
)), Q;
|
|
252
|
+
}
|
|
253
|
+
function Pe(e) {
|
|
224
254
|
if (typeof ShadowRoot < "u" && e instanceof ShadowRoot) {
|
|
225
|
-
if (
|
|
226
|
-
const r =
|
|
227
|
-
e.adoptedStyleSheets.includes(r) || (e.adoptedStyleSheets = [...e.adoptedStyleSheets, r]),
|
|
255
|
+
if (he.has(e)) return;
|
|
256
|
+
const r = He();
|
|
257
|
+
e.adoptedStyleSheets.includes(r) || (e.adoptedStyleSheets = [...e.adoptedStyleSheets, r]), he.add(e);
|
|
228
258
|
return;
|
|
229
259
|
}
|
|
230
|
-
if (
|
|
260
|
+
if (re) return;
|
|
231
261
|
const t = e ?? (typeof document > "u" ? void 0 : document);
|
|
232
262
|
if (!t) return;
|
|
233
263
|
if (t.head.querySelector?.("style[data-glasshome-tokens]")) {
|
|
234
|
-
|
|
264
|
+
re = !0;
|
|
235
265
|
return;
|
|
236
266
|
}
|
|
237
267
|
const i = t.createElement("style");
|
|
238
|
-
i.setAttribute("data-glasshome-tokens", ""), i.textContent =
|
|
268
|
+
i.setAttribute("data-glasshome-tokens", ""), i.textContent = ve, t.head.appendChild(i), re = !0;
|
|
239
269
|
}
|
|
240
270
|
function R(...e) {
|
|
241
|
-
return ze(
|
|
271
|
+
return ze(Oe(e));
|
|
242
272
|
}
|
|
243
|
-
const
|
|
273
|
+
const Ie = {
|
|
244
274
|
id: "classic-glass",
|
|
245
275
|
name: "Classic Glass",
|
|
246
276
|
description: "Default glassmorphism design with blur background and gradient",
|
|
@@ -268,7 +298,7 @@ const Ae = {
|
|
|
268
298
|
hoverScale: 1.02,
|
|
269
299
|
activeScale: 0.98
|
|
270
300
|
}
|
|
271
|
-
},
|
|
301
|
+
}, Le = {
|
|
272
302
|
id: "minimal",
|
|
273
303
|
name: "Minimal",
|
|
274
304
|
description: "Clean, minimal design with no background effects",
|
|
@@ -297,7 +327,7 @@ const Ae = {
|
|
|
297
327
|
active: !1,
|
|
298
328
|
focus: !0
|
|
299
329
|
}
|
|
300
|
-
},
|
|
330
|
+
}, Ue = {
|
|
301
331
|
id: "compact-horizontal",
|
|
302
332
|
name: "Compact Horizontal",
|
|
303
333
|
description: "Horizontal layout for compact widgets",
|
|
@@ -325,108 +355,108 @@ const Ae = {
|
|
|
325
355
|
hoverScale: 1.02,
|
|
326
356
|
activeScale: 0.98
|
|
327
357
|
}
|
|
328
|
-
},
|
|
329
|
-
"classic-glass":
|
|
330
|
-
minimal:
|
|
331
|
-
"compact-horizontal":
|
|
358
|
+
}, je = {
|
|
359
|
+
"classic-glass": Ie,
|
|
360
|
+
minimal: Le,
|
|
361
|
+
"compact-horizontal": Ue
|
|
332
362
|
};
|
|
333
|
-
function
|
|
334
|
-
return
|
|
363
|
+
function Be(e) {
|
|
364
|
+
return je[e];
|
|
335
365
|
}
|
|
336
|
-
var
|
|
337
|
-
function
|
|
366
|
+
var Fe = /* @__PURE__ */ x("<div>");
|
|
367
|
+
function Ge(e) {
|
|
338
368
|
return (() => {
|
|
339
|
-
var t =
|
|
369
|
+
var t = Fe();
|
|
340
370
|
return W((i) => {
|
|
341
371
|
var r = R("glasshome-widget-slider-fill pointer-events-none absolute inset-0", e.isDragging ? "duration-0" : "transition-all duration-300 ease-out", e.class), n = {
|
|
342
372
|
"--widget-fill-value": e.value,
|
|
343
|
-
"z-index":
|
|
373
|
+
"z-index": J.BACKGROUND,
|
|
344
374
|
...e.color ? {
|
|
345
375
|
"--widget-icon-color": e.color
|
|
346
376
|
} : {}
|
|
347
377
|
};
|
|
348
|
-
return r !== i.e &&
|
|
378
|
+
return r !== i.e && I(t, i.e = r), i.t = le(t, n, i.t), i;
|
|
349
379
|
}, {
|
|
350
380
|
e: void 0,
|
|
351
381
|
t: void 0
|
|
352
382
|
}), t;
|
|
353
383
|
})();
|
|
354
384
|
}
|
|
355
|
-
var
|
|
356
|
-
function
|
|
385
|
+
var qe = /* @__PURE__ */ x("<div>");
|
|
386
|
+
function Ye(e) {
|
|
357
387
|
return (() => {
|
|
358
|
-
var t =
|
|
359
|
-
return p(t, () => e.children), W(() =>
|
|
388
|
+
var t = qe();
|
|
389
|
+
return p(t, () => e.children), W(() => I(t, R("glasshome-widget-content", e.class))), t;
|
|
360
390
|
})();
|
|
361
391
|
}
|
|
362
|
-
var
|
|
363
|
-
function
|
|
392
|
+
var Ke = /* @__PURE__ */ x('<div class="glasshome-widget-icon glasshome-widget-icon-stack glasshome-widget-icon-stack-2">'), Xe = /* @__PURE__ */ x('<div class="glasshome-widget-icon glasshome-widget-icon-stack glasshome-widget-icon-stack-3">'), Je = /* @__PURE__ */ x('<div><div class="glasshome-widget-icon-glyph flex items-center justify-center">');
|
|
393
|
+
function Qe(e) {
|
|
364
394
|
const t = () => e.entityCount ?? 1;
|
|
365
395
|
return (() => {
|
|
366
|
-
var i =
|
|
367
|
-
return p(i, k(
|
|
396
|
+
var i = Je(), r = i.firstChild;
|
|
397
|
+
return p(i, k(E, {
|
|
368
398
|
get when() {
|
|
369
399
|
return t() >= 2;
|
|
370
400
|
},
|
|
371
401
|
get children() {
|
|
372
|
-
return
|
|
402
|
+
return Ke();
|
|
373
403
|
}
|
|
374
|
-
}), r), p(i, k(
|
|
404
|
+
}), r), p(i, k(E, {
|
|
375
405
|
get when() {
|
|
376
406
|
return t() >= 3;
|
|
377
407
|
},
|
|
378
408
|
get children() {
|
|
379
|
-
return
|
|
409
|
+
return Xe();
|
|
380
410
|
}
|
|
381
411
|
}), r), p(r, () => e.icon), W((n) => {
|
|
382
412
|
var o = R("glasshome-widget-icon", "relative flex shrink-0 items-center justify-center pointer-events-none transition-all", e.dimmed && "opacity-50", e.class), u = e.color ? {
|
|
383
413
|
"--widget-icon-color": e.color
|
|
384
414
|
} : void 0;
|
|
385
|
-
return o !== n.e &&
|
|
415
|
+
return o !== n.e && I(i, n.e = o), n.t = le(i, u, n.t), n;
|
|
386
416
|
}, {
|
|
387
417
|
e: void 0,
|
|
388
418
|
t: void 0
|
|
389
419
|
}), i;
|
|
390
420
|
})();
|
|
391
421
|
}
|
|
392
|
-
var
|
|
393
|
-
function
|
|
422
|
+
var Ze = /* @__PURE__ */ x("<p>");
|
|
423
|
+
function et(e) {
|
|
394
424
|
return (() => {
|
|
395
|
-
var t =
|
|
425
|
+
var t = Ze();
|
|
396
426
|
return p(t, (() => {
|
|
397
427
|
var i = T(() => !!e.isUnavailable);
|
|
398
428
|
return () => i() ? "Unavailable" : e.children;
|
|
399
429
|
})()), W((i) => {
|
|
400
|
-
var r = R("glasshome-widget-status", "relative", e.dimmed && "opacity-40", e.class), n =
|
|
401
|
-
return r !== i.e &&
|
|
430
|
+
var r = R("glasshome-widget-status", "relative", e.dimmed && "opacity-40", e.class), n = J.ACTIONS;
|
|
431
|
+
return r !== i.e && I(t, i.e = r), n !== i.t && ee(t, "z-index", i.t = n), i;
|
|
402
432
|
}, {
|
|
403
433
|
e: void 0,
|
|
404
434
|
t: void 0
|
|
405
435
|
}), t;
|
|
406
436
|
})();
|
|
407
437
|
}
|
|
408
|
-
var
|
|
409
|
-
function
|
|
438
|
+
var tt = /* @__PURE__ */ x('<span class="glasshome-widget-badge shrink-0">'), nt = /* @__PURE__ */ x("<div><h3 class=glasshome-widget-title>");
|
|
439
|
+
function it(e) {
|
|
410
440
|
return (() => {
|
|
411
|
-
var t =
|
|
412
|
-
return p(i, () => e.children), p(t, k(
|
|
441
|
+
var t = nt(), i = t.firstChild;
|
|
442
|
+
return p(i, () => e.children), p(t, k(E, {
|
|
413
443
|
get when() {
|
|
414
444
|
return T(() => e.badge !== void 0)() && e.badge > 0;
|
|
415
445
|
},
|
|
416
446
|
get children() {
|
|
417
|
-
var r =
|
|
447
|
+
var r = tt();
|
|
418
448
|
return p(r, () => e.badge), r;
|
|
419
449
|
}
|
|
420
450
|
}), null), W((r) => {
|
|
421
|
-
var n = R("relative flex items-center gap-2", e.class), o =
|
|
422
|
-
return n !== r.e &&
|
|
451
|
+
var n = R("relative flex items-center gap-2", e.class), o = J.ACTIONS;
|
|
452
|
+
return n !== r.e && I(t, r.e = n), o !== r.t && ee(t, "z-index", r.t = o), r;
|
|
423
453
|
}, {
|
|
424
454
|
e: void 0,
|
|
425
455
|
t: void 0
|
|
426
456
|
}), t;
|
|
427
457
|
})();
|
|
428
458
|
}
|
|
429
|
-
function
|
|
459
|
+
function rt(e, t = !1) {
|
|
430
460
|
if (e.length === 0)
|
|
431
461
|
return {
|
|
432
462
|
isGroup: !1,
|
|
@@ -442,15 +472,15 @@ function Qe(e, t = !1) {
|
|
|
442
472
|
};
|
|
443
473
|
const i = e.length > 1;
|
|
444
474
|
if (!i) {
|
|
445
|
-
const s = e[0], f = s.state === "on", b = s.attributes?.brightness || 0,
|
|
475
|
+
const s = e[0], f = s.state === "on", b = s.attributes?.brightness || 0, S = Math.round(b / 255 * 100);
|
|
446
476
|
return {
|
|
447
477
|
isGroup: !1,
|
|
448
478
|
state: s.state,
|
|
449
479
|
isOn: f,
|
|
450
480
|
isUnavailable: s.state === "unavailable",
|
|
451
481
|
brightness: b,
|
|
452
|
-
brightnessPercent:
|
|
453
|
-
color:
|
|
482
|
+
brightnessPercent: S,
|
|
483
|
+
color: fe(s),
|
|
454
484
|
onCount: f ? 1 : 0,
|
|
455
485
|
totalCount: 1,
|
|
456
486
|
description: f ? "On" : "Off"
|
|
@@ -473,31 +503,31 @@ function Qe(e, t = !1) {
|
|
|
473
503
|
u++;
|
|
474
504
|
break;
|
|
475
505
|
}
|
|
476
|
-
const h = e.length, v = u === h, y = o + u === h, g = r > 0, a = r === h,
|
|
506
|
+
const h = e.length, v = u === h, y = o + u === h, g = r > 0, a = r === h, C = n === h;
|
|
477
507
|
let w, M;
|
|
478
508
|
t ? v ? (w = "unavailable", M = !1) : o > 0 || u > 0 ? (w = "unknown", M = !1) : n > 0 ? (w = "off", M = !1) : (w = "on", M = !0) : v ? (w = "unavailable", M = !1) : y ? (w = "unknown", M = !1) : g ? (w = "on", M = !0) : (w = "off", M = !1);
|
|
479
|
-
const
|
|
480
|
-
let
|
|
509
|
+
const O = $ > 0 ? Math.round(d / $) : 0, L = Math.round(O / 255 * 100);
|
|
510
|
+
let F;
|
|
481
511
|
if (m.length > 0) {
|
|
482
|
-
const s = Math.round(m.reduce((
|
|
483
|
-
|
|
512
|
+
const s = Math.round(m.reduce((z, D) => z + D[0], 0) / m.length), f = Math.round(m.reduce((z, D) => z + D[1], 0) / m.length), b = Math.round(m.reduce((z, D) => z + D[2], 0) / m.length), S = O / 255;
|
|
513
|
+
F = `rgb(${Math.round(s * S)}, ${Math.round(f * S)}, ${Math.round(b * S)})`;
|
|
484
514
|
} else
|
|
485
|
-
|
|
515
|
+
F = fe(e[0]);
|
|
486
516
|
let H;
|
|
487
|
-
return a ? H = "All on" :
|
|
517
|
+
return a ? H = "All on" : C ? H = "All off" : r > 0 ? H = `${r} of ${h} on` : H = "Off", {
|
|
488
518
|
isGroup: i,
|
|
489
519
|
state: w,
|
|
490
520
|
isOn: M,
|
|
491
521
|
isUnavailable: w === "unavailable",
|
|
492
|
-
brightness:
|
|
493
|
-
brightnessPercent:
|
|
494
|
-
color:
|
|
522
|
+
brightness: O,
|
|
523
|
+
brightnessPercent: L,
|
|
524
|
+
color: F,
|
|
495
525
|
onCount: r,
|
|
496
526
|
totalCount: h,
|
|
497
527
|
description: H
|
|
498
528
|
};
|
|
499
529
|
}
|
|
500
|
-
function
|
|
530
|
+
function ot(e, t = "mean", i = !0) {
|
|
501
531
|
if (e.length === 0)
|
|
502
532
|
return {
|
|
503
533
|
isGroup: !1,
|
|
@@ -509,14 +539,14 @@ function Ze(e, t = "mean", i = !0) {
|
|
|
509
539
|
const r = e.length > 1;
|
|
510
540
|
if (!r) {
|
|
511
541
|
const g = e[0], a = Number.parseFloat(g.state);
|
|
512
|
-
let
|
|
513
|
-
return Number.isNaN(a) || (
|
|
542
|
+
let C = g.state;
|
|
543
|
+
return Number.isNaN(a) || (C = Number.isInteger(a) ? a.toString() : a.toFixed(1)), {
|
|
514
544
|
isGroup: !1,
|
|
515
|
-
state:
|
|
545
|
+
state: C,
|
|
516
546
|
numericValue: Number.isNaN(a) ? null : a,
|
|
517
547
|
isUnavailable: g.state === "unavailable",
|
|
518
548
|
unit: g.unitOfMeasurement ?? void 0,
|
|
519
|
-
description:
|
|
549
|
+
description: C
|
|
520
550
|
};
|
|
521
551
|
}
|
|
522
552
|
const n = [], o = [];
|
|
@@ -564,7 +594,7 @@ function Ze(e, t = "mean", i = !0) {
|
|
|
564
594
|
h = n.reduce((g, a) => g + a, 0) / n.length, v = "Average";
|
|
565
595
|
break;
|
|
566
596
|
case "median": {
|
|
567
|
-
const g = [...n].sort((
|
|
597
|
+
const g = [...n].sort((C, w) => C - w), a = Math.floor(g.length / 2);
|
|
568
598
|
h = g.length % 2 === 0 ? (g[a - 1] + g[a]) / 2 : g[a], v = "Median";
|
|
569
599
|
break;
|
|
570
600
|
}
|
|
@@ -581,7 +611,7 @@ function Ze(e, t = "mean", i = !0) {
|
|
|
581
611
|
h = n.reduce((g, a) => g * a, 1), v = "Product";
|
|
582
612
|
break;
|
|
583
613
|
case "std_dev": {
|
|
584
|
-
const g = n.reduce((
|
|
614
|
+
const g = n.reduce((C, w) => C + w, 0) / n.length, a = n.reduce((C, w) => C + (w - g) ** 2, 0) / n.length;
|
|
585
615
|
h = Math.sqrt(a), v = "Std Dev";
|
|
586
616
|
break;
|
|
587
617
|
}
|
|
@@ -599,7 +629,7 @@ function Ze(e, t = "mean", i = !0) {
|
|
|
599
629
|
memberValues: o
|
|
600
630
|
};
|
|
601
631
|
}
|
|
602
|
-
function
|
|
632
|
+
function fe(e) {
|
|
603
633
|
if (e.state !== "on") return "rgb(100, 100, 100)";
|
|
604
634
|
const i = (e.attributes?.brightness ?? 255) / 255;
|
|
605
635
|
if (e.attributes?.rgb_color) {
|
|
@@ -613,7 +643,7 @@ function he(e) {
|
|
|
613
643
|
}
|
|
614
644
|
return `rgb(${Math.round(255 * i)}, ${Math.round(220 * i)}, ${Math.round(180 * i)})`;
|
|
615
645
|
}
|
|
616
|
-
function
|
|
646
|
+
function at(e) {
|
|
617
647
|
if (!e) return !1;
|
|
618
648
|
if (["on", "open", "locked", "home", "playing", "active"].includes(e.state))
|
|
619
649
|
return !0;
|
|
@@ -623,13 +653,13 @@ function et(e) {
|
|
|
623
653
|
}
|
|
624
654
|
return !1;
|
|
625
655
|
}
|
|
626
|
-
function
|
|
656
|
+
function rn(e, t, i) {
|
|
627
657
|
return e?.attributes ? e.attributes[t] ?? i : i;
|
|
628
658
|
}
|
|
629
|
-
function
|
|
630
|
-
return e.filter(
|
|
659
|
+
function on(e) {
|
|
660
|
+
return e.filter(at).length;
|
|
631
661
|
}
|
|
632
|
-
function
|
|
662
|
+
function st(e, t, i) {
|
|
633
663
|
const { decimals: r, scale: n = !0 } = {};
|
|
634
664
|
if (typeof e == "string")
|
|
635
665
|
return t ? `${e}${t}` : e;
|
|
@@ -640,44 +670,45 @@ function tt(e, t, i) {
|
|
|
640
670
|
let d;
|
|
641
671
|
return r !== void 0 ? d = o.toFixed(r) : o !== e ? d = o.toFixed(1) : Number.isInteger(e) ? d = e.toString() : d = Number.parseFloat(e.toFixed(2)).toString(), u ? `${d}${u}` : d;
|
|
642
672
|
}
|
|
643
|
-
function
|
|
673
|
+
function lt(e, t) {
|
|
644
674
|
return e == null || isNaN(e) ? null : t === "°C" ? e < 10 ? "Cold" : e < 18 ? "Cool" : e < 24 ? "Comfortable" : e < 28 ? "Warm" : "Hot" : t === "°F" ? e < 50 ? "Cold" : e < 64 ? "Cool" : e < 75 ? "Comfortable" : e < 82 ? "Warm" : "Hot" : t === "%" ? e < 20 ? "Very Low" : e < 40 ? "Low" : e < 60 ? "Medium" : e < 80 ? "High" : "Very High" : t === "ppm" ? e < 400 ? "Excellent" : e < 600 ? "Good" : e < 1e3 ? "Acceptable" : e < 1500 ? "Mediocre" : "Poor" : t === "lx" ? e < 50 ? "Dark" : e < 200 ? "Dim" : e < 500 ? "Moderate" : e < 1e3 ? "Bright" : "Very Bright" : t === "AQI" ? e <= 50 ? "Good" : e <= 100 ? "Moderate" : e <= 150 ? "Unhealthy for Sensitive" : e <= 200 ? "Unhealthy" : e <= 300 ? "Very Unhealthy" : "Hazardous" : t === "dB" ? e < 30 ? "Very Quiet" : e < 50 ? "Quiet" : e < 70 ? "Moderate" : e < 85 ? "Loud" : "Very Loud" : null;
|
|
645
675
|
}
|
|
646
|
-
var
|
|
647
|
-
function
|
|
676
|
+
var ct = /* @__PURE__ */ x("<div class=glasshome-widget-subtitle>"), dt = /* @__PURE__ */ x("<div><div class=glasshome-widget-value>");
|
|
677
|
+
function ut(e) {
|
|
648
678
|
return (() => {
|
|
649
|
-
var t =
|
|
650
|
-
return p(i, () =>
|
|
679
|
+
var t = dt(), i = t.firstChild;
|
|
680
|
+
return p(i, () => st(e.value, e.unit)), p(t, k(E, {
|
|
651
681
|
get when() {
|
|
652
682
|
return T(() => !!e.interpret)() && typeof e.value == "number";
|
|
653
683
|
},
|
|
654
684
|
get children() {
|
|
655
|
-
var r =
|
|
656
|
-
return p(r, () =>
|
|
685
|
+
var r = ct();
|
|
686
|
+
return p(r, () => lt(e.value, e.unit)), r;
|
|
657
687
|
}
|
|
658
|
-
}), null), W(() =>
|
|
688
|
+
}), null), W(() => I(t, R("flex flex-col", e.class))), t;
|
|
659
689
|
})();
|
|
660
690
|
}
|
|
661
|
-
var
|
|
662
|
-
function
|
|
663
|
-
const t =
|
|
664
|
-
|
|
691
|
+
var gt = /* @__PURE__ */ x('<div><div class="relative h-full w-full">'), ht = /* @__PURE__ */ x('<div class="glasshome-widget-loading pointer-events-none absolute inset-0 animate-pulse">'), ft = /* @__PURE__ */ x('<div class="flex h-full w-full flex-col items-center justify-center gap-2 text-center">'), mt = /* @__PURE__ */ x('<div class="flex items-center justify-center text-white/30">'), vt = /* @__PURE__ */ x('<h3 class="font-semibold text-sm text-white/60">'), wt = /* @__PURE__ */ x('<p class="text-white/50 text-xs">');
|
|
692
|
+
function pt(e) {
|
|
693
|
+
const t = B(P), [i, r] = V(), n = Me(i);
|
|
694
|
+
Te(() => {
|
|
665
695
|
const a = i()?.getRootNode();
|
|
666
|
-
|
|
696
|
+
Pe(typeof ShadowRoot < "u" && a instanceof ShadowRoot || typeof Document < "u" && a instanceof Document ? a : void 0);
|
|
667
697
|
});
|
|
668
698
|
const o = {
|
|
669
699
|
isEditMode: () => e.isEditMode ?? !1,
|
|
670
700
|
updateConfig: t?.updateConfig ?? (() => {
|
|
671
701
|
}),
|
|
672
702
|
registerDialogOpener: t?.registerDialogOpener,
|
|
703
|
+
callService: t?.callService,
|
|
673
704
|
dimensions: () => ({
|
|
674
705
|
width: n.width ?? 0,
|
|
675
706
|
height: n.height ?? 0
|
|
676
707
|
})
|
|
677
|
-
}, u =
|
|
708
|
+
}, u = j(() => {
|
|
678
709
|
if (e.variant)
|
|
679
|
-
return typeof e.variant == "string" ?
|
|
680
|
-
}), d =
|
|
710
|
+
return typeof e.variant == "string" ? Be(e.variant) : e.variant;
|
|
711
|
+
}), d = j(() => ({
|
|
681
712
|
"container-type": "size",
|
|
682
713
|
"container-name": "widget",
|
|
683
714
|
"touch-action": e.gestures && !e.isEditMode ? e.gestures.touchAction() : void 0,
|
|
@@ -706,15 +737,15 @@ function gt(e) {
|
|
|
706
737
|
}, g = (a) => {
|
|
707
738
|
$() && e.gestures?.onPointerCancel(a);
|
|
708
739
|
};
|
|
709
|
-
return k(
|
|
740
|
+
return k(P.Provider, {
|
|
710
741
|
value: o,
|
|
711
742
|
get children() {
|
|
712
|
-
var a =
|
|
713
|
-
return
|
|
743
|
+
var a = gt(), C = a.firstChild;
|
|
744
|
+
return K(a, "pointercancel", g), K(a, "pointerup", y), K(a, "pointermove", v), K(a, "pointerdown", h), K(a, "pointerenter", m), Se((w) => {
|
|
714
745
|
r(w), e.gestures?.bindElement(w);
|
|
715
|
-
}, a), p(
|
|
746
|
+
}, a), p(C, (() => {
|
|
716
747
|
var w = T(() => !!e.emptyState);
|
|
717
|
-
return () => w() ? k(
|
|
748
|
+
return () => w() ? k(bt, {
|
|
718
749
|
get icon() {
|
|
719
750
|
return e.emptyState.icon;
|
|
720
751
|
},
|
|
@@ -728,12 +759,12 @@ function gt(e) {
|
|
|
728
759
|
})()), p(a, (() => {
|
|
729
760
|
var w = T(() => !!e.loading);
|
|
730
761
|
return () => w() && (() => {
|
|
731
|
-
var M =
|
|
732
|
-
return W((
|
|
762
|
+
var M = ht();
|
|
763
|
+
return W((O) => ee(M, "z-index", J.OVERLAY)), M;
|
|
733
764
|
})();
|
|
734
765
|
})(), null), W((w) => {
|
|
735
|
-
var M = R("glasshome-widget", "relative h-full w-full select-none overflow-hidden rounded-xl border border-border/50", u()?.styles?.class, e.class),
|
|
736
|
-
return M !== w.e &&
|
|
766
|
+
var M = R("glasshome-widget", "relative h-full w-full select-none overflow-hidden rounded-xl border border-border/50", u()?.styles?.class, e.class), O = d(), L = J.CONTENT;
|
|
767
|
+
return M !== w.e && I(a, w.e = M), w.t = le(a, O, w.t), L !== w.a && ee(C, "z-index", w.a = L), w;
|
|
737
768
|
}, {
|
|
738
769
|
e: void 0,
|
|
739
770
|
t: void 0,
|
|
@@ -742,60 +773,60 @@ function gt(e) {
|
|
|
742
773
|
}
|
|
743
774
|
});
|
|
744
775
|
}
|
|
745
|
-
function
|
|
776
|
+
function bt(e) {
|
|
746
777
|
return (() => {
|
|
747
|
-
var t =
|
|
778
|
+
var t = ft();
|
|
748
779
|
return p(t, (() => {
|
|
749
780
|
var i = T(() => !!e.icon);
|
|
750
781
|
return () => i() && (() => {
|
|
751
|
-
var r =
|
|
782
|
+
var r = mt();
|
|
752
783
|
return p(r, () => e.icon), r;
|
|
753
784
|
})();
|
|
754
785
|
})(), null), p(t, (() => {
|
|
755
786
|
var i = T(() => !!e.title);
|
|
756
787
|
return () => i() && (() => {
|
|
757
|
-
var r =
|
|
788
|
+
var r = vt();
|
|
758
789
|
return p(r, () => e.title), r;
|
|
759
790
|
})();
|
|
760
791
|
})(), null), p(t, (() => {
|
|
761
792
|
var i = T(() => !!e.message);
|
|
762
793
|
return () => i() && (() => {
|
|
763
|
-
var r =
|
|
794
|
+
var r = wt();
|
|
764
795
|
return p(r, () => e.message), r;
|
|
765
796
|
})();
|
|
766
797
|
})(), null), t;
|
|
767
798
|
})();
|
|
768
799
|
}
|
|
769
|
-
const
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
var
|
|
777
|
-
function
|
|
800
|
+
const q = pt;
|
|
801
|
+
q.Content = Ye;
|
|
802
|
+
q.Icon = Qe;
|
|
803
|
+
q.Title = it;
|
|
804
|
+
q.Status = et;
|
|
805
|
+
q.Value = ut;
|
|
806
|
+
q.SliderFill = Ge;
|
|
807
|
+
var xt = /* @__PURE__ */ x('<span class="inline-flex size-3.5 shrink-0 items-center">'), yt = /* @__PURE__ */ x("<button type=button>"), $t = /* @__PURE__ */ x('<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">'), kt = /* @__PURE__ */ x('<div class="rounded-lg bg-muted/30 p-2 text-center md:p-6"><p class="text-muted-foreground text-sm">No edit options available'), St = /* @__PURE__ */ x('<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>'), Ct = /* @__PURE__ */ x('<div class="rounded-lg bg-muted/30 p-2 text-center md:p-6"><p class="text-muted-foreground text-sm">No additional controls'), Mt = /* @__PURE__ */ x('<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">'), Dt = /* @__PURE__ */ x('<div class="rounded-lg bg-muted/30 p-2 text-center md:p-6"><p class="text-muted-foreground text-sm">No debug information available'), Tt = /* @__PURE__ */ x('<div class="min-w-0 shrink-0">'), _t = /* @__PURE__ */ x('<div class="flex items-center gap-2"><div class="flex h-8 items-center rounded-lg border border-border/50 bg-muted/30 p-0.5">'), Ot = /* @__PURE__ */ x('<div class="min-h-0 flex-1 overflow-y-auto [scrollbar-gutter:stable]">'), zt = /* @__PURE__ */ x('<div class="flex shrink-0 items-center justify-end gap-2 border-border/50 border-t pt-3">');
|
|
808
|
+
function Et(e) {
|
|
778
809
|
return (() => {
|
|
779
|
-
var t =
|
|
780
|
-
return t.$$click = () => e.onClick(), p(t, k(
|
|
810
|
+
var t = yt();
|
|
811
|
+
return t.$$click = () => e.onClick(), p(t, k(E, {
|
|
781
812
|
get when() {
|
|
782
813
|
return e.isActive;
|
|
783
814
|
},
|
|
784
815
|
get children() {
|
|
785
|
-
var i =
|
|
816
|
+
var i = xt();
|
|
786
817
|
return p(i, () => e.icon), i;
|
|
787
818
|
}
|
|
788
|
-
}), null), p(t, () => e.label, null), W(() =>
|
|
819
|
+
}), null), p(t, () => e.label, null), W(() => I(t, R("flex cursor-pointer items-center justify-center rounded-md px-3 py-1.5 text-xs transition-all duration-300 ease-in-out", e.isActive ? "gap-1.5 bg-foreground/10 font-semibold text-foreground shadow-sm" : "gap-0 text-muted-foreground hover:bg-foreground/5 hover:text-foreground"))), t;
|
|
789
820
|
})();
|
|
790
821
|
}
|
|
791
|
-
function
|
|
792
|
-
const [t] =
|
|
793
|
-
|
|
822
|
+
function an(e) {
|
|
823
|
+
const [t] = _e(e, ["open", "onOpenChange", "title", "onSave", "hasUnsavedChanges", "onDelete", "editContent", "controlsContent", "debugContent", "debugData", "tabs", "class", "maxWidth", "defaultTab", "activeTab", "onActiveTabChange", "headerActions", "configSchema", "config", "onConfigSave", "ResponsiveDialog", "ResponsiveDialogContent", "ResponsiveDialogHeader", "ResponsiveDialogTitle", "ResponsiveDialogDescription", "Button", "SchemaForm"]), i = () => !!t.configSchema && !!t.config && !!t.onConfigSave && !!t.SchemaForm, [r, n] = V({}), [o, u] = V(null);
|
|
824
|
+
se(ge(() => t.config, (c) => {
|
|
794
825
|
c && n({
|
|
795
826
|
...c
|
|
796
827
|
});
|
|
797
|
-
})),
|
|
798
|
-
c && u(
|
|
828
|
+
})), se(ge(() => t.configSchema, (c) => {
|
|
829
|
+
c && u(me(c));
|
|
799
830
|
}));
|
|
800
831
|
const d = () => i() && JSON.stringify(r()) !== JSON.stringify(t.config), $ = (c) => {
|
|
801
832
|
!c && t.config && n({
|
|
@@ -816,13 +847,13 @@ function Yt(e) {
|
|
|
816
847
|
"3xl": "max-w-3xl",
|
|
817
848
|
"4xl": "max-w-4xl"
|
|
818
849
|
}[c];
|
|
819
|
-
},
|
|
850
|
+
}, C = () => {
|
|
820
851
|
if (t.tabs) return t.tabs;
|
|
821
852
|
const c = [];
|
|
822
853
|
return c.push({
|
|
823
854
|
id: "edit",
|
|
824
855
|
label: "Edit",
|
|
825
|
-
icon:
|
|
856
|
+
icon: $t(),
|
|
826
857
|
content: t.editContent ?? (i() && o() ? k(b, {
|
|
827
858
|
get schema() {
|
|
828
859
|
return o();
|
|
@@ -831,17 +862,17 @@ function Yt(e) {
|
|
|
831
862
|
return r();
|
|
832
863
|
},
|
|
833
864
|
onChange: n
|
|
834
|
-
}) :
|
|
865
|
+
}) : kt())
|
|
835
866
|
}), c.push({
|
|
836
867
|
id: "controls",
|
|
837
868
|
label: "Controls",
|
|
838
|
-
icon:
|
|
839
|
-
content: t.controlsContent ??
|
|
869
|
+
icon: St(),
|
|
870
|
+
content: t.controlsContent ?? Ct()
|
|
840
871
|
}), c.push({
|
|
841
872
|
id: "debug",
|
|
842
873
|
label: "Debug",
|
|
843
|
-
icon:
|
|
844
|
-
content: t.debugContent ??
|
|
874
|
+
icon: Mt(),
|
|
875
|
+
content: t.debugContent ?? Dt()
|
|
845
876
|
}), c;
|
|
846
877
|
}, w = async () => {
|
|
847
878
|
if (t.debugData !== void 0)
|
|
@@ -851,25 +882,25 @@ function Yt(e) {
|
|
|
851
882
|
} catch {
|
|
852
883
|
}
|
|
853
884
|
}, M = () => {
|
|
854
|
-
const c =
|
|
885
|
+
const c = C();
|
|
855
886
|
return c.find((N) => N.id === y())?.content ?? c[0]?.content;
|
|
856
|
-
},
|
|
857
|
-
return k(
|
|
887
|
+
}, O = t.ResponsiveDialog, L = t.ResponsiveDialogContent, F = t.ResponsiveDialogHeader, H = t.ResponsiveDialogTitle, s = t.ResponsiveDialogDescription, f = t.Button, b = t.SchemaForm, S = (c) => i() ? $(c) : t.onOpenChange(c), z = () => i() ? d() : t.hasUnsavedChanges, D = () => i() ? m : t.onSave;
|
|
888
|
+
return k(O, {
|
|
858
889
|
get open() {
|
|
859
890
|
return t.open;
|
|
860
891
|
},
|
|
861
|
-
onOpenChange: (c) =>
|
|
892
|
+
onOpenChange: (c) => S(c),
|
|
862
893
|
get children() {
|
|
863
|
-
return k(
|
|
894
|
+
return k(L, {
|
|
864
895
|
get class() {
|
|
865
896
|
return R(a(), t.class);
|
|
866
897
|
},
|
|
867
898
|
get children() {
|
|
868
|
-
return [k(
|
|
899
|
+
return [k(F, {
|
|
869
900
|
class: "flex flex-row items-center justify-between gap-3",
|
|
870
901
|
get children() {
|
|
871
902
|
return [(() => {
|
|
872
|
-
var c =
|
|
903
|
+
var c = Tt();
|
|
873
904
|
return p(c, k(H, {
|
|
874
905
|
class: "truncate leading-tight",
|
|
875
906
|
get children() {
|
|
@@ -880,8 +911,8 @@ function Yt(e) {
|
|
|
880
911
|
children: "Widget configuration dialog"
|
|
881
912
|
}), null), c;
|
|
882
913
|
})(), (() => {
|
|
883
|
-
var c =
|
|
884
|
-
return p(
|
|
914
|
+
var c = _t(), Y = c.firstChild;
|
|
915
|
+
return p(Y, () => C().map((N) => k(Et, {
|
|
885
916
|
get icon() {
|
|
886
917
|
return N.icon;
|
|
887
918
|
},
|
|
@@ -892,7 +923,7 @@ function Yt(e) {
|
|
|
892
923
|
return y() === N.id;
|
|
893
924
|
},
|
|
894
925
|
onClick: () => g(N.id)
|
|
895
|
-
}))), p(c, k(
|
|
926
|
+
}))), p(c, k(E, {
|
|
896
927
|
get when() {
|
|
897
928
|
return t.headerActions;
|
|
898
929
|
},
|
|
@@ -903,15 +934,15 @@ function Yt(e) {
|
|
|
903
934
|
})()];
|
|
904
935
|
}
|
|
905
936
|
}), (() => {
|
|
906
|
-
var c =
|
|
937
|
+
var c = Ot();
|
|
907
938
|
return p(c, M), c;
|
|
908
|
-
})(), k(
|
|
939
|
+
})(), k(E, {
|
|
909
940
|
get when() {
|
|
910
941
|
return T(() => y() === "edit")() && (D() || t.onDelete) || y() === "debug" && t.debugData !== void 0;
|
|
911
942
|
},
|
|
912
943
|
get children() {
|
|
913
|
-
var c =
|
|
914
|
-
return p(c, k(
|
|
944
|
+
var c = zt();
|
|
945
|
+
return p(c, k(E, {
|
|
915
946
|
get when() {
|
|
916
947
|
return T(() => y() === "edit")() && t.onDelete;
|
|
917
948
|
},
|
|
@@ -923,7 +954,7 @@ function Yt(e) {
|
|
|
923
954
|
children: "Delete"
|
|
924
955
|
});
|
|
925
956
|
}
|
|
926
|
-
}), null), p(c, k(
|
|
957
|
+
}), null), p(c, k(E, {
|
|
927
958
|
get when() {
|
|
928
959
|
return T(() => y() === "edit")() && D();
|
|
929
960
|
},
|
|
@@ -931,13 +962,13 @@ function Yt(e) {
|
|
|
931
962
|
return k(f, {
|
|
932
963
|
size: "sm",
|
|
933
964
|
get disabled() {
|
|
934
|
-
return !
|
|
965
|
+
return !z();
|
|
935
966
|
},
|
|
936
967
|
onClick: () => D()?.(),
|
|
937
968
|
children: "Save"
|
|
938
969
|
});
|
|
939
970
|
}
|
|
940
|
-
}), null), p(c, k(
|
|
971
|
+
}), null), p(c, k(E, {
|
|
941
972
|
get when() {
|
|
942
973
|
return T(() => y() === "debug")() && t.debugData !== void 0;
|
|
943
974
|
},
|
|
@@ -958,29 +989,29 @@ function Yt(e) {
|
|
|
958
989
|
});
|
|
959
990
|
}
|
|
960
991
|
Ce(["click"]);
|
|
961
|
-
function
|
|
992
|
+
function sn(e) {
|
|
962
993
|
if (typeof IntersectionObserver > "u")
|
|
963
994
|
return () => !1;
|
|
964
995
|
const [t, i] = V(!1), r = new IntersectionObserver((n) => {
|
|
965
996
|
const o = n[0];
|
|
966
997
|
o && i(!o.isIntersecting);
|
|
967
998
|
});
|
|
968
|
-
return
|
|
999
|
+
return se(() => {
|
|
969
1000
|
const n = e();
|
|
970
1001
|
r.disconnect(), n && r.observe(n);
|
|
971
|
-
}),
|
|
1002
|
+
}), ce(() => r.disconnect()), t;
|
|
972
1003
|
}
|
|
973
|
-
function
|
|
1004
|
+
function ln() {
|
|
974
1005
|
if (typeof window > "u" || typeof window.matchMedia != "function")
|
|
975
1006
|
return () => !1;
|
|
976
1007
|
const e = window.matchMedia("(prefers-reduced-motion: reduce)"), [t, i] = V(e.matches), r = (n) => i(n.matches);
|
|
977
|
-
return e.addEventListener("change", r),
|
|
1008
|
+
return e.addEventListener("change", r), ce(() => e.removeEventListener("change", r)), t;
|
|
978
1009
|
}
|
|
979
|
-
function
|
|
1010
|
+
function cn(e = "controls") {
|
|
980
1011
|
const [t, i] = V(!1), [r, n] = V(e), o = (d) => {
|
|
981
1012
|
n(d ?? e), i(!0);
|
|
982
|
-
}, u =
|
|
983
|
-
return u?.registerDialogOpener?.(o),
|
|
1013
|
+
}, u = B(P);
|
|
1014
|
+
return u?.registerDialogOpener?.(o), ce(() => u?.registerDialogOpener?.(null)), {
|
|
984
1015
|
showDialog: t,
|
|
985
1016
|
setShowDialog: i,
|
|
986
1017
|
openDialog: o,
|
|
@@ -999,19 +1030,19 @@ function Jt(e = "controls") {
|
|
|
999
1030
|
}
|
|
1000
1031
|
};
|
|
1001
1032
|
}
|
|
1002
|
-
function
|
|
1003
|
-
const t = e.minEntities ?? 1, i =
|
|
1033
|
+
function dn(e) {
|
|
1034
|
+
const t = e.minEntities ?? 1, i = j(() => e.entities().length), r = j(() => i() >= t), n = j(() => !r() || !e.calculateGroupData ? null : e.calculateGroupData(e.entities())), o = j(() => {
|
|
1004
1035
|
if (!r()) return;
|
|
1005
1036
|
const d = e.aggregationMode?.();
|
|
1006
1037
|
if (!d || d === "none") return;
|
|
1007
1038
|
const $ = e.entities();
|
|
1008
1039
|
if (d === "light" || d === "binary-sensor" || d === "switch")
|
|
1009
|
-
return
|
|
1040
|
+
return rt($, e.allEntitiesMode);
|
|
1010
1041
|
if (d === "sensor") {
|
|
1011
1042
|
const m = e.sensorGroupType?.() ?? "mean";
|
|
1012
|
-
return
|
|
1043
|
+
return ot($, m, !0);
|
|
1013
1044
|
}
|
|
1014
|
-
}), u =
|
|
1045
|
+
}), u = j(() => r() ? void 0 : e.emptyStateConfig);
|
|
1015
1046
|
return {
|
|
1016
1047
|
entities: e.entities,
|
|
1017
1048
|
groupData: n,
|
|
@@ -1021,40 +1052,40 @@ function Qt(e) {
|
|
|
1021
1052
|
count: i
|
|
1022
1053
|
};
|
|
1023
1054
|
}
|
|
1024
|
-
const
|
|
1025
|
-
function
|
|
1055
|
+
const X = 32, l = X / 2, _ = "white", te = "rgba(0,0,0,0.4)", de = 2, ne = 3;
|
|
1056
|
+
function Nt(e) {
|
|
1026
1057
|
return `url("data:image/svg+xml,${encodeURIComponent(e)}")`;
|
|
1027
1058
|
}
|
|
1028
|
-
function
|
|
1029
|
-
return `<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
1059
|
+
function ie(e) {
|
|
1060
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${X}" height="${X}" viewBox="0 0 ${X} ${X}">${e}</svg>`;
|
|
1030
1061
|
}
|
|
1031
|
-
const
|
|
1062
|
+
const At = ie(`
|
|
1032
1063
|
<g transform="translate(6, 2)">
|
|
1033
1064
|
<!-- shadow -->
|
|
1034
|
-
<g stroke="${
|
|
1065
|
+
<g stroke="${te}" stroke-width="${ne}" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
1035
1066
|
<path d="M10 8V3a2 2 0 0 1 4 0v10l4.5-4.5a2 2 0 0 1 2.83 2.83L14 18.5c-2 2-4 3.5-8 3.5-3 0-5-2-5-5v-6a2 2 0 0 1 4 0v2"/>
|
|
1036
1067
|
</g>
|
|
1037
1068
|
<!-- main -->
|
|
1038
|
-
<g stroke="${_}" stroke-width="${
|
|
1069
|
+
<g stroke="${_}" stroke-width="${de}" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
1039
1070
|
<path d="M10 8V3a2 2 0 0 1 4 0v10l4.5-4.5a2 2 0 0 1 2.83 2.83L14 18.5c-2 2-4 3.5-8 3.5-3 0-5-2-5-5v-6a2 2 0 0 1 4 0v2"/>
|
|
1040
1071
|
</g>
|
|
1041
1072
|
</g>
|
|
1042
|
-
`),
|
|
1073
|
+
`), Vt = ie(`
|
|
1043
1074
|
<g>
|
|
1044
|
-
<circle cx="${l}" cy="${l}" r="8" stroke="${
|
|
1075
|
+
<circle cx="${l}" cy="${l}" r="8" stroke="${te}" stroke-width="${ne}" fill="none"/>
|
|
1045
1076
|
<circle cx="${l}" cy="${l}" r="8" stroke="${_}" stroke-width="1.5" fill="none"/>
|
|
1046
1077
|
<circle cx="${l}" cy="${l}" r="1.5" fill="${_}"/>
|
|
1047
1078
|
</g>
|
|
1048
|
-
`),
|
|
1079
|
+
`), Wt = ie(`
|
|
1049
1080
|
<g>
|
|
1050
1081
|
<!-- shadow -->
|
|
1051
|
-
<g stroke="${
|
|
1082
|
+
<g stroke="${te}" stroke-width="${ne}" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
1052
1083
|
<line x1="6" y1="${l}" x2="26" y2="${l}"/>
|
|
1053
1084
|
<polyline points="10,${l - 4} 6,${l} 10,${l + 4}"/>
|
|
1054
1085
|
<polyline points="22,${l - 4} 26,${l} 22,${l + 4}"/>
|
|
1055
1086
|
</g>
|
|
1056
1087
|
<!-- main -->
|
|
1057
|
-
<g stroke="${_}" stroke-width="${
|
|
1088
|
+
<g stroke="${_}" stroke-width="${de}" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
1058
1089
|
<line x1="6" y1="${l}" x2="26" y2="${l}"/>
|
|
1059
1090
|
<polyline points="10,${l - 4} 6,${l} 10,${l + 4}"/>
|
|
1060
1091
|
<polyline points="22,${l - 4} 26,${l} 22,${l + 4}"/>
|
|
@@ -1064,16 +1095,16 @@ const Tt = te(`
|
|
|
1064
1095
|
<circle cx="${l - 5}" cy="${l}" r="1" fill="${_}" opacity="0.6"/>
|
|
1065
1096
|
<circle cx="${l + 5}" cy="${l}" r="1" fill="${_}" opacity="0.6"/>
|
|
1066
1097
|
</g>
|
|
1067
|
-
`),
|
|
1098
|
+
`), Rt = ie(`
|
|
1068
1099
|
<g>
|
|
1069
1100
|
<!-- shadow -->
|
|
1070
|
-
<g stroke="${
|
|
1101
|
+
<g stroke="${te}" stroke-width="${ne}" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
1071
1102
|
<line x1="${l}" y1="6" x2="${l}" y2="26"/>
|
|
1072
1103
|
<polyline points="${l - 4},10 ${l},6 ${l + 4},10"/>
|
|
1073
1104
|
<polyline points="${l - 4},22 ${l},26 ${l + 4},22"/>
|
|
1074
1105
|
</g>
|
|
1075
1106
|
<!-- main -->
|
|
1076
|
-
<g stroke="${_}" stroke-width="${
|
|
1107
|
+
<g stroke="${_}" stroke-width="${de}" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
1077
1108
|
<line x1="${l}" y1="6" x2="${l}" y2="26"/>
|
|
1078
1109
|
<polyline points="${l - 4},10 ${l},6 ${l + 4},10"/>
|
|
1079
1110
|
<polyline points="${l - 4},22 ${l},26 ${l + 4},22"/>
|
|
@@ -1084,60 +1115,60 @@ const Tt = te(`
|
|
|
1084
1115
|
<circle cx="${l}" cy="${l + 5}" r="1" fill="${_}" opacity="0.6"/>
|
|
1085
1116
|
</g>
|
|
1086
1117
|
`);
|
|
1087
|
-
function
|
|
1088
|
-
return { css: `${
|
|
1089
|
-
}
|
|
1090
|
-
const
|
|
1091
|
-
tap:
|
|
1092
|
-
hold:
|
|
1093
|
-
slideHorizontal:
|
|
1094
|
-
slideVertical:
|
|
1118
|
+
function Z(e, t, i) {
|
|
1119
|
+
return { css: `${Nt(e)} ${t} ${i}, auto`, hotspotX: t, hotspotY: i };
|
|
1120
|
+
}
|
|
1121
|
+
const U = {
|
|
1122
|
+
tap: Z(At, 12, 4),
|
|
1123
|
+
hold: Z(Vt, 16, 16),
|
|
1124
|
+
slideHorizontal: Z(Wt, l, l),
|
|
1125
|
+
slideVertical: Z(Rt, l, l)
|
|
1095
1126
|
};
|
|
1096
|
-
function
|
|
1127
|
+
function oe() {
|
|
1097
1128
|
if (typeof window > "u") return null;
|
|
1098
1129
|
const e = window;
|
|
1099
1130
|
return e.Capacitor?.isNativePlatform?.() ? e.Capacitor.Plugins?.Haptics ?? null : null;
|
|
1100
1131
|
}
|
|
1101
|
-
function
|
|
1132
|
+
function ae(e) {
|
|
1102
1133
|
if (!(typeof navigator > "u" || typeof navigator.vibrate != "function"))
|
|
1103
1134
|
try {
|
|
1104
1135
|
navigator.vibrate(e);
|
|
1105
1136
|
} catch {
|
|
1106
1137
|
}
|
|
1107
1138
|
}
|
|
1108
|
-
const
|
|
1139
|
+
const Ht = {
|
|
1109
1140
|
/** Light confirmation — fires when slide gesture arms after user holds still. */
|
|
1110
1141
|
tick() {
|
|
1111
|
-
const e =
|
|
1142
|
+
const e = oe();
|
|
1112
1143
|
if (e) {
|
|
1113
1144
|
e.impact({ style: "Light" }).catch(() => {
|
|
1114
1145
|
});
|
|
1115
1146
|
return;
|
|
1116
1147
|
}
|
|
1117
|
-
|
|
1148
|
+
ae(8);
|
|
1118
1149
|
},
|
|
1119
1150
|
/** Medium bump — fires when hold gesture commits (detail opening). */
|
|
1120
1151
|
bump() {
|
|
1121
|
-
const e =
|
|
1152
|
+
const e = oe();
|
|
1122
1153
|
if (e) {
|
|
1123
1154
|
e.impact({ style: "Medium" }).catch(() => {
|
|
1124
1155
|
});
|
|
1125
1156
|
return;
|
|
1126
1157
|
}
|
|
1127
|
-
|
|
1158
|
+
ae(20);
|
|
1128
1159
|
},
|
|
1129
1160
|
/** Stronger pulse — reserved for edit-mode pickup (future use). */
|
|
1130
1161
|
pulse() {
|
|
1131
|
-
const e =
|
|
1162
|
+
const e = oe();
|
|
1132
1163
|
if (e) {
|
|
1133
1164
|
e.impact({ style: "Heavy" }).catch(() => {
|
|
1134
1165
|
});
|
|
1135
1166
|
return;
|
|
1136
1167
|
}
|
|
1137
|
-
|
|
1168
|
+
ae([0, 15, 40, 15]);
|
|
1138
1169
|
}
|
|
1139
1170
|
};
|
|
1140
|
-
function
|
|
1171
|
+
function un(e, t) {
|
|
1141
1172
|
const n = {
|
|
1142
1173
|
isDown: !1,
|
|
1143
1174
|
isTouch: !1,
|
|
@@ -1155,8 +1186,8 @@ function Zt(e, t) {
|
|
|
1155
1186
|
s !== u && (d && d.disconnect(), d = new ResizeObserver((f) => {
|
|
1156
1187
|
const b = f[0];
|
|
1157
1188
|
if (b) {
|
|
1158
|
-
const
|
|
1159
|
-
|
|
1189
|
+
const S = b.borderBoxSize?.[0];
|
|
1190
|
+
S ? o = { width: S.inlineSize, height: S.blockSize } : o = { width: b.contentRect.width, height: b.contentRect.height }, m(o.height > o.width);
|
|
1160
1191
|
}
|
|
1161
1192
|
}), u = s, d.observe(s), o = { width: s.clientWidth, height: s.clientHeight }, m(o.height > o.width));
|
|
1162
1193
|
}
|
|
@@ -1173,7 +1204,7 @@ function Zt(e, t) {
|
|
|
1173
1204
|
if (n.isDown = !0, n.isTouch = s.pointerType === "touch", n.element = s.currentTarget, h(n.element), n.startX = s.clientX, n.startY = s.clientY, n.startTime = Date.now(), n.hasMoved = !1, n.sliding = !1, f.hold) {
|
|
1174
1205
|
const b = f.hold.delay ?? 300;
|
|
1175
1206
|
n.holdTimer = setTimeout(() => {
|
|
1176
|
-
n.holdTimer = null, !(!n.isDown || n.hasMoved) && (
|
|
1207
|
+
n.holdTimer = null, !(!n.isDown || n.hasMoved) && (Ht.bump(), f.hold?.action(), n.isDown = !1);
|
|
1177
1208
|
}, b);
|
|
1178
1209
|
}
|
|
1179
1210
|
if (!n.isTouch && f.slide)
|
|
@@ -1182,22 +1213,22 @@ function Zt(e, t) {
|
|
|
1182
1213
|
} catch {
|
|
1183
1214
|
}
|
|
1184
1215
|
}
|
|
1185
|
-
},
|
|
1216
|
+
}, C = (s) => {
|
|
1186
1217
|
if (!n.isDown) return;
|
|
1187
|
-
const f = e(), b = s.clientX - n.startX,
|
|
1188
|
-
if (Math.sqrt(b * b +
|
|
1218
|
+
const f = e(), b = s.clientX - n.startX, S = s.clientY - n.startY;
|
|
1219
|
+
if (Math.sqrt(b * b + S * S) > 10 && (v(), n.hasMoved = !0), f.slide && n.hasMoved) {
|
|
1189
1220
|
const D = s.currentTarget, c = g(D);
|
|
1190
1221
|
if (n.isTouch && !n.sliding) {
|
|
1191
|
-
const
|
|
1192
|
-
if (
|
|
1222
|
+
const $e = Math.abs(c === "vertical" ? S : b), ke = Math.abs(c === "vertical" ? b : S);
|
|
1223
|
+
if ($e < ke) return;
|
|
1193
1224
|
}
|
|
1194
1225
|
n.sliding = !0;
|
|
1195
|
-
const
|
|
1196
|
-
f.slide.onChange(Math.round(
|
|
1226
|
+
const Y = f.slide.min ?? 0, N = f.slide.max ?? 100, we = N - Y, pe = c === "vertical" ? -S : b, ue = o ?? { width: D.clientWidth, height: D.clientHeight }, be = c === "vertical" ? ue.height : ue.width, xe = pe / be * we, ye = Math.max(Y, Math.min(N, f.slide.value + xe));
|
|
1227
|
+
f.slide.onChange(Math.round(ye)), n.startX = s.clientX, n.startY = s.clientY, s.preventDefault();
|
|
1197
1228
|
}
|
|
1198
1229
|
}, w = (s) => {
|
|
1199
|
-
const f = e(), b = n.isDown,
|
|
1200
|
-
v(), b && f.tap && !n.hasMoved &&
|
|
1230
|
+
const f = e(), b = n.isDown, S = Date.now() - n.startTime, z = f.hold?.delay ?? 300;
|
|
1231
|
+
v(), b && f.tap && !n.hasMoved && S < z && f.tap();
|
|
1201
1232
|
try {
|
|
1202
1233
|
s.currentTarget.releasePointerCapture(s.pointerId);
|
|
1203
1234
|
} catch {
|
|
@@ -1210,22 +1241,22 @@ function Zt(e, t) {
|
|
|
1210
1241
|
} catch {
|
|
1211
1242
|
}
|
|
1212
1243
|
y();
|
|
1213
|
-
},
|
|
1244
|
+
}, O = (s) => {
|
|
1214
1245
|
const f = e();
|
|
1215
1246
|
if (f.slide) {
|
|
1216
1247
|
const b = f.slide.orientation;
|
|
1217
|
-
return b === "horizontal" ?
|
|
1248
|
+
return b === "horizontal" ? U.slideHorizontal.css : b === "vertical" ? U.slideVertical.css : (o || h(s), o && o.height > o.width ? U.slideVertical.css : U.slideHorizontal.css);
|
|
1218
1249
|
}
|
|
1219
|
-
return f.tap ?
|
|
1250
|
+
return f.tap ? U.tap.css : f.hold ? U.hold.css : "";
|
|
1220
1251
|
};
|
|
1221
1252
|
return {
|
|
1222
1253
|
onPointerDown: a,
|
|
1223
|
-
onPointerMove:
|
|
1254
|
+
onPointerMove: C,
|
|
1224
1255
|
onPointerUp: w,
|
|
1225
1256
|
onPointerCancel: M,
|
|
1226
1257
|
onPointerEnter: (s) => {
|
|
1227
1258
|
const f = s.currentTarget;
|
|
1228
|
-
n.element = f, f.style.cursor =
|
|
1259
|
+
n.element = f, f.style.cursor = O(f);
|
|
1229
1260
|
},
|
|
1230
1261
|
bindElement: (s) => {
|
|
1231
1262
|
s && (n.element = s, h(s));
|
|
@@ -1243,7 +1274,7 @@ function Zt(e, t) {
|
|
|
1243
1274
|
}
|
|
1244
1275
|
};
|
|
1245
1276
|
}
|
|
1246
|
-
const
|
|
1277
|
+
const Pt = {
|
|
1247
1278
|
solar: "oklch(0.74 0.18 60)",
|
|
1248
1279
|
grid: "oklch(0.62 0.12 245)",
|
|
1249
1280
|
battery: "oklch(0.70 0.18 145)",
|
|
@@ -1253,23 +1284,23 @@ const Nt = {
|
|
|
1253
1284
|
// Fault red-orange; used only for faults, never normal consumption.
|
|
1254
1285
|
negative: "oklch(0.64 0.22 27)"
|
|
1255
1286
|
};
|
|
1256
|
-
function
|
|
1287
|
+
function It(e) {
|
|
1257
1288
|
return {
|
|
1258
1289
|
fill: `color-mix(in oklch, ${e} 20%, transparent)`,
|
|
1259
1290
|
stroke: e,
|
|
1260
1291
|
solid: e
|
|
1261
1292
|
};
|
|
1262
1293
|
}
|
|
1263
|
-
const
|
|
1264
|
-
Object.entries(
|
|
1265
|
-
),
|
|
1294
|
+
const gn = Object.fromEntries(
|
|
1295
|
+
Object.entries(Pt).map(([e, t]) => [e, It(t)])
|
|
1296
|
+
), hn = A.enum([
|
|
1266
1297
|
"success",
|
|
1267
1298
|
"warning",
|
|
1268
1299
|
"danger",
|
|
1269
1300
|
"info",
|
|
1270
1301
|
"neutral",
|
|
1271
1302
|
"accent"
|
|
1272
|
-
]),
|
|
1303
|
+
]), fn = {
|
|
1273
1304
|
/** Optional display name override (renders as text input) */
|
|
1274
1305
|
title: () => A.string().optional().meta({ title: "Title", description: "Optional display name override" }),
|
|
1275
1306
|
/** Multi-select entity picker for a HA domain */
|
|
@@ -1279,7 +1310,7 @@ const en = Object.fromEntries(
|
|
|
1279
1310
|
/** Area picker dropdown */
|
|
1280
1311
|
areaId: () => A.string().optional().meta({ formType: "area-picker", title: "Area" })
|
|
1281
1312
|
};
|
|
1282
|
-
function
|
|
1313
|
+
function mn(e) {
|
|
1283
1314
|
if (e.length < 2) return "";
|
|
1284
1315
|
const t = e[0], i = e[1];
|
|
1285
1316
|
if (!t || !i) return "";
|
|
@@ -1306,67 +1337,68 @@ function rn(e) {
|
|
|
1306
1337
|
}
|
|
1307
1338
|
return $;
|
|
1308
1339
|
}
|
|
1309
|
-
function
|
|
1340
|
+
function vn() {
|
|
1310
1341
|
return document.documentElement.classList.contains("dark");
|
|
1311
1342
|
}
|
|
1312
|
-
const
|
|
1313
|
-
version:
|
|
1314
|
-
},
|
|
1343
|
+
const Lt = "1.1.1", Ut = {
|
|
1344
|
+
version: Lt
|
|
1345
|
+
}, wn = Ut.version;
|
|
1315
1346
|
export {
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1347
|
+
wn as SDK_VERSION,
|
|
1348
|
+
hn as ToneSchema,
|
|
1349
|
+
q as Widget,
|
|
1350
|
+
Ye as WidgetContent,
|
|
1351
|
+
P as WidgetCtx,
|
|
1352
|
+
an as WidgetDialog,
|
|
1353
|
+
Qe as WidgetIcon,
|
|
1354
|
+
xn as WidgetManifestSchema,
|
|
1355
|
+
Ge as WidgetSliderFill,
|
|
1356
|
+
et as WidgetStatus,
|
|
1357
|
+
it as WidgetTitle,
|
|
1358
|
+
ut as WidgetValue,
|
|
1359
|
+
kn as byDomain,
|
|
1360
|
+
rt as calculateLightGroup,
|
|
1361
|
+
ot as calculateSensorGroup,
|
|
1362
|
+
on as countActiveEntities,
|
|
1363
|
+
Jt as defineWidget,
|
|
1364
|
+
yn as formatSchemaError,
|
|
1365
|
+
rn as getEntityAttribute,
|
|
1366
|
+
Pn as getForecasts,
|
|
1367
|
+
In as getStream,
|
|
1368
|
+
Ln as getWebRtcClientConfig,
|
|
1369
|
+
Pe as injectTokens,
|
|
1370
|
+
vn as isDark,
|
|
1371
|
+
at as isEntityActive,
|
|
1372
|
+
mn as monotoneCubicPath,
|
|
1373
|
+
Un as sendWebRtcCandidate,
|
|
1374
|
+
jn as startWebRtcSession,
|
|
1375
|
+
Bn as state,
|
|
1376
|
+
gn as svgColors,
|
|
1377
|
+
Fn as trackEntityHistory,
|
|
1378
|
+
Gn as untrackEntityHistory,
|
|
1379
|
+
Sn as useArea,
|
|
1380
|
+
Cn as useCamera,
|
|
1381
|
+
Mn as useConnection,
|
|
1382
|
+
Dn as useCurrency,
|
|
1383
|
+
Tn as useEntities,
|
|
1384
|
+
_n as useEntity,
|
|
1385
|
+
On as useEntityHistory,
|
|
1386
|
+
zn as useEntityStatistics,
|
|
1387
|
+
En as useForecast,
|
|
1388
|
+
Nn as useHassConfig,
|
|
1389
|
+
sn as useIntersectionPause,
|
|
1390
|
+
An as useLocale,
|
|
1391
|
+
ln as useReducedMotion,
|
|
1392
|
+
Zt as useService,
|
|
1393
|
+
Vn as useStore,
|
|
1394
|
+
Wn as useTemperatureUnit,
|
|
1395
|
+
nn as useToggle,
|
|
1396
|
+
tn as useTurnOff,
|
|
1397
|
+
en as useTurnOn,
|
|
1398
|
+
Rn as useUnitSystem,
|
|
1399
|
+
Qt as useWidgetContext,
|
|
1400
|
+
cn as useWidgetDialog,
|
|
1401
|
+
dn as useWidgetEntityGroup,
|
|
1402
|
+
un as useWidgetGestures,
|
|
1403
|
+
fn as widgetFields
|
|
1372
1404
|
};
|