@glasshome/widget-sdk 1.1.1 → 1.2.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.
@@ -8,9 +8,13 @@ export declare const widgetFields: {
8
8
  /** Optional display name override (renders as text input) */
9
9
  title: () => z.ZodOptional<z.ZodString>;
10
10
  /** Multi-select entity picker for a HA domain */
11
- entityIds: (domain: string) => z.ZodDefault<z.ZodArray<z.ZodString>>;
11
+ entityIds: (domain: string, options?: {
12
+ deviceClass?: string;
13
+ }) => z.ZodDefault<z.ZodArray<z.ZodString>>;
12
14
  /** Single-select entity picker for a HA domain */
13
- singleEntity: (domain: string) => z.ZodDefault<z.ZodArray<z.ZodString>>;
15
+ singleEntity: (domain: string, options?: {
16
+ deviceClass?: string;
17
+ }) => z.ZodDefault<z.ZodArray<z.ZodString>>;
14
18
  /** Area picker dropdown */
15
19
  areaId: () => z.ZodOptional<z.ZodString>;
16
20
  };
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { z as A } from "zod";
2
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";
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 Ce, delegateEvents as Se } from "solid-js/web";
4
4
  import { createElementSize as Me } from "@solid-primitives/resize-observer";
5
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
6
  import { clsx as Oe } from "clsx";
7
7
  import { twMerge as ze } from "tailwind-merge";
8
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";
9
+ import { byDomain as kn, useArea as Cn, useCamera as Sn, 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
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
11
  function me(e) {
12
12
  return A.toJSONSchema(e, {
@@ -472,14 +472,14 @@ function rt(e, t = !1) {
472
472
  };
473
473
  const i = e.length > 1;
474
474
  if (!i) {
475
- const s = e[0], f = s.state === "on", b = s.attributes?.brightness || 0, S = Math.round(b / 255 * 100);
475
+ const s = e[0], f = s.state === "on", b = s.attributes?.brightness || 0, C = Math.round(b / 255 * 100);
476
476
  return {
477
477
  isGroup: !1,
478
478
  state: s.state,
479
479
  isOn: f,
480
480
  isUnavailable: s.state === "unavailable",
481
481
  brightness: b,
482
- brightnessPercent: S,
482
+ brightnessPercent: C,
483
483
  color: fe(s),
484
484
  onCount: f ? 1 : 0,
485
485
  totalCount: 1,
@@ -503,18 +503,18 @@ function rt(e, t = !1) {
503
503
  u++;
504
504
  break;
505
505
  }
506
- const h = e.length, v = u === h, y = o + u === h, g = r > 0, a = r === h, C = n === h;
506
+ const h = e.length, v = u === h, y = o + u === h, g = r > 0, a = r === h, S = n === h;
507
507
  let w, M;
508
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);
509
509
  const O = $ > 0 ? Math.round(d / $) : 0, L = Math.round(O / 255 * 100);
510
510
  let F;
511
511
  if (m.length > 0) {
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)})`;
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), C = O / 255;
513
+ F = `rgb(${Math.round(s * C)}, ${Math.round(f * C)}, ${Math.round(b * C)})`;
514
514
  } else
515
515
  F = fe(e[0]);
516
516
  let H;
517
- return a ? H = "All on" : C ? H = "All off" : r > 0 ? H = `${r} of ${h} on` : H = "Off", {
517
+ return a ? H = "All on" : S ? H = "All off" : r > 0 ? H = `${r} of ${h} on` : H = "Off", {
518
518
  isGroup: i,
519
519
  state: w,
520
520
  isOn: M,
@@ -539,14 +539,14 @@ function ot(e, t = "mean", i = !0) {
539
539
  const r = e.length > 1;
540
540
  if (!r) {
541
541
  const g = e[0], a = Number.parseFloat(g.state);
542
- let C = g.state;
543
- return Number.isNaN(a) || (C = Number.isInteger(a) ? a.toString() : a.toFixed(1)), {
542
+ let S = g.state;
543
+ return Number.isNaN(a) || (S = Number.isInteger(a) ? a.toString() : a.toFixed(1)), {
544
544
  isGroup: !1,
545
- state: C,
545
+ state: S,
546
546
  numericValue: Number.isNaN(a) ? null : a,
547
547
  isUnavailable: g.state === "unavailable",
548
548
  unit: g.unitOfMeasurement ?? void 0,
549
- description: C
549
+ description: S
550
550
  };
551
551
  }
552
552
  const n = [], o = [];
@@ -594,7 +594,7 @@ function ot(e, t = "mean", i = !0) {
594
594
  h = n.reduce((g, a) => g + a, 0) / n.length, v = "Average";
595
595
  break;
596
596
  case "median": {
597
- const g = [...n].sort((C, w) => C - w), a = Math.floor(g.length / 2);
597
+ const g = [...n].sort((S, w) => S - w), a = Math.floor(g.length / 2);
598
598
  h = g.length % 2 === 0 ? (g[a - 1] + g[a]) / 2 : g[a], v = "Median";
599
599
  break;
600
600
  }
@@ -611,7 +611,7 @@ function ot(e, t = "mean", i = !0) {
611
611
  h = n.reduce((g, a) => g * a, 1), v = "Product";
612
612
  break;
613
613
  case "std_dev": {
614
- const g = n.reduce((C, w) => C + w, 0) / n.length, a = n.reduce((C, w) => C + (w - g) ** 2, 0) / n.length;
614
+ const g = n.reduce((S, w) => S + w, 0) / n.length, a = n.reduce((S, w) => S + (w - g) ** 2, 0) / n.length;
615
615
  h = Math.sqrt(a), v = "Std Dev";
616
616
  break;
617
617
  }
@@ -740,10 +740,10 @@ function pt(e) {
740
740
  return k(P.Provider, {
741
741
  value: o,
742
742
  get children() {
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) => {
743
+ var a = gt(), S = a.firstChild;
744
+ return K(a, "pointercancel", g), K(a, "pointerup", y), K(a, "pointermove", v), K(a, "pointerdown", h), K(a, "pointerenter", m), Ce((w) => {
745
745
  r(w), e.gestures?.bindElement(w);
746
- }, a), p(C, (() => {
746
+ }, a), p(S, (() => {
747
747
  var w = T(() => !!e.emptyState);
748
748
  return () => w() ? k(bt, {
749
749
  get icon() {
@@ -764,7 +764,7 @@ function pt(e) {
764
764
  })();
765
765
  })(), null), W((w) => {
766
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;
767
+ return M !== w.e && I(a, w.e = M), w.t = le(a, O, w.t), L !== w.a && ee(S, "z-index", w.a = L), w;
768
768
  }, {
769
769
  e: void 0,
770
770
  t: void 0,
@@ -804,7 +804,7 @@ q.Title = it;
804
804
  q.Status = et;
805
805
  q.Value = ut;
806
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">');
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'), Ct = /* @__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>'), St = /* @__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
808
  function Et(e) {
809
809
  return (() => {
810
810
  var t = yt();
@@ -847,7 +847,7 @@ function an(e) {
847
847
  "3xl": "max-w-3xl",
848
848
  "4xl": "max-w-4xl"
849
849
  }[c];
850
- }, C = () => {
850
+ }, S = () => {
851
851
  if (t.tabs) return t.tabs;
852
852
  const c = [];
853
853
  return c.push({
@@ -866,8 +866,8 @@ function an(e) {
866
866
  }), c.push({
867
867
  id: "controls",
868
868
  label: "Controls",
869
- icon: St(),
870
- content: t.controlsContent ?? Ct()
869
+ icon: Ct(),
870
+ content: t.controlsContent ?? St()
871
871
  }), c.push({
872
872
  id: "debug",
873
873
  label: "Debug",
@@ -882,14 +882,14 @@ function an(e) {
882
882
  } catch {
883
883
  }
884
884
  }, M = () => {
885
- const c = C();
885
+ const c = S();
886
886
  return c.find((N) => N.id === y())?.content ?? c[0]?.content;
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;
887
+ }, O = t.ResponsiveDialog, L = t.ResponsiveDialogContent, F = t.ResponsiveDialogHeader, H = t.ResponsiveDialogTitle, s = t.ResponsiveDialogDescription, f = t.Button, b = t.SchemaForm, C = (c) => i() ? $(c) : t.onOpenChange(c), z = () => i() ? d() : t.hasUnsavedChanges, D = () => i() ? m : t.onSave;
888
888
  return k(O, {
889
889
  get open() {
890
890
  return t.open;
891
891
  },
892
- onOpenChange: (c) => S(c),
892
+ onOpenChange: (c) => C(c),
893
893
  get children() {
894
894
  return k(L, {
895
895
  get class() {
@@ -912,7 +912,7 @@ function an(e) {
912
912
  }), null), c;
913
913
  })(), (() => {
914
914
  var c = _t(), Y = c.firstChild;
915
- return p(Y, () => C().map((N) => k(Et, {
915
+ return p(Y, () => S().map((N) => k(Et, {
916
916
  get icon() {
917
917
  return N.icon;
918
918
  },
@@ -988,7 +988,7 @@ function an(e) {
988
988
  }
989
989
  });
990
990
  }
991
- Ce(["click"]);
991
+ Se(["click"]);
992
992
  function sn(e) {
993
993
  if (typeof IntersectionObserver > "u")
994
994
  return () => !1;
@@ -1186,8 +1186,8 @@ function un(e, t) {
1186
1186
  s !== u && (d && d.disconnect(), d = new ResizeObserver((f) => {
1187
1187
  const b = f[0];
1188
1188
  if (b) {
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);
1189
+ const C = b.borderBoxSize?.[0];
1190
+ C ? o = { width: C.inlineSize, height: C.blockSize } : o = { width: b.contentRect.width, height: b.contentRect.height }, m(o.height > o.width);
1191
1191
  }
1192
1192
  }), u = s, d.observe(s), o = { width: s.clientWidth, height: s.clientHeight }, m(o.height > o.width));
1193
1193
  }
@@ -1213,22 +1213,22 @@ function un(e, t) {
1213
1213
  } catch {
1214
1214
  }
1215
1215
  }
1216
- }, C = (s) => {
1216
+ }, S = (s) => {
1217
1217
  if (!n.isDown) return;
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) {
1218
+ const f = e(), b = s.clientX - n.startX, C = s.clientY - n.startY;
1219
+ if (Math.sqrt(b * b + C * C) > 10 && (v(), n.hasMoved = !0), f.slide && n.hasMoved) {
1220
1220
  const D = s.currentTarget, c = g(D);
1221
1221
  if (n.isTouch && !n.sliding) {
1222
- const $e = Math.abs(c === "vertical" ? S : b), ke = Math.abs(c === "vertical" ? b : S);
1222
+ const $e = Math.abs(c === "vertical" ? C : b), ke = Math.abs(c === "vertical" ? b : C);
1223
1223
  if ($e < ke) return;
1224
1224
  }
1225
1225
  n.sliding = !0;
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));
1226
+ const Y = f.slide.min ?? 0, N = f.slide.max ?? 100, we = N - Y, pe = c === "vertical" ? -C : 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
1227
  f.slide.onChange(Math.round(ye)), n.startX = s.clientX, n.startY = s.clientY, s.preventDefault();
1228
1228
  }
1229
1229
  }, w = (s) => {
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();
1230
+ const f = e(), b = n.isDown, C = Date.now() - n.startTime, z = f.hold?.delay ?? 300;
1231
+ v(), b && f.tap && !n.hasMoved && C < z && f.tap();
1232
1232
  try {
1233
1233
  s.currentTarget.releasePointerCapture(s.pointerId);
1234
1234
  } catch {
@@ -1251,7 +1251,7 @@ function un(e, t) {
1251
1251
  };
1252
1252
  return {
1253
1253
  onPointerDown: a,
1254
- onPointerMove: C,
1254
+ onPointerMove: S,
1255
1255
  onPointerUp: w,
1256
1256
  onPointerCancel: M,
1257
1257
  onPointerEnter: (s) => {
@@ -1304,9 +1304,18 @@ const gn = Object.fromEntries(
1304
1304
  /** Optional display name override (renders as text input) */
1305
1305
  title: () => A.string().optional().meta({ title: "Title", description: "Optional display name override" }),
1306
1306
  /** Multi-select entity picker for a HA domain */
1307
- entityIds: (e) => A.array(A.string()).default([]).meta({ domain: e, title: "Entities" }),
1307
+ entityIds: (e, t) => A.array(A.string()).default([]).meta({
1308
+ domain: e,
1309
+ title: "Entities",
1310
+ ...t?.deviceClass ? { deviceClass: t.deviceClass } : {}
1311
+ }),
1308
1312
  /** Single-select entity picker for a HA domain */
1309
- singleEntity: (e) => A.array(A.string()).default([]).meta({ domain: e, title: "Entity", singleSelect: !0 }),
1313
+ singleEntity: (e, t) => A.array(A.string()).default([]).meta({
1314
+ domain: e,
1315
+ title: "Entity",
1316
+ singleSelect: !0,
1317
+ ...t?.deviceClass ? { deviceClass: t.deviceClass } : {}
1318
+ }),
1310
1319
  /** Area picker dropdown */
1311
1320
  areaId: () => A.string().optional().meta({ formType: "area-picker", title: "Area" })
1312
1321
  };
@@ -1340,7 +1349,7 @@ function mn(e) {
1340
1349
  function vn() {
1341
1350
  return document.documentElement.classList.contains("dark");
1342
1351
  }
1343
- const Lt = "1.1.1", Ut = {
1352
+ const Lt = "1.2.0", Ut = {
1344
1353
  version: Lt
1345
1354
  }, wn = Ut.version;
1346
1355
  export {
@@ -1376,8 +1385,8 @@ export {
1376
1385
  gn as svgColors,
1377
1386
  Fn as trackEntityHistory,
1378
1387
  Gn as untrackEntityHistory,
1379
- Sn as useArea,
1380
- Cn as useCamera,
1388
+ Cn as useArea,
1389
+ Sn as useCamera,
1381
1390
  Mn as useConnection,
1382
1391
  Dn as useCurrency,
1383
1392
  Tn as useEntities,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glasshome/widget-sdk",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "SDK for building GlassHome dashboard widgets with SolidJS",
5
5
  "keywords": [
6
6
  "glasshome",