@glasshome/widget-sdk 1.9.0 → 1.9.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.
@@ -52,8 +52,8 @@ var e = "https://glasshome.app/docs/widget-sdk/config", t = [
52
52
  id: "direct-ui-import",
53
53
  since: "1.9.0",
54
54
  removeIn: "2.0.0",
55
- replacement: "the same export from \"@glasshome/widget-sdk\"",
56
- docsUrl: "https://glasshome.app/docs/widget-styling",
55
+ replacement: "the same export from \"@glasshome/widget-sdk\" (keep @glasshome/ui installed: its styles stay in the build)",
56
+ docsUrl: "https://glasshome.app/docs/widget-styling#importing-ui-components",
57
57
  sourcePattern: "from\\s+[\"']@glasshome/ui(/[^\"']*)?[\"']"
58
58
  },
59
59
  {
@@ -1,6 +1,6 @@
1
- import { n as e, t } from "../tokens-CFl0mCx4.js";
2
- import { ErrorBoundary as n, createComponent as r } from "solid-js";
3
- import { render as i } from "solid-js/web";
1
+ import { ErrorBoundary as e, createComponent as t } from "solid-js";
2
+ import { render as n } from "solid-js/web";
3
+ import { WidgetCtx as r, injectTokens as i } from "@glasshome/widget-sdk";
4
4
  //#region src/host/instantiate-widget.ts
5
5
  var a = /* @__PURE__ */ new Map();
6
6
  function o(e) {
@@ -26,17 +26,17 @@ function d(e, t) {
26
26
  }
27
27
  function f(a, s) {
28
28
  let c = a.attachShadow({ mode: "closed" }), l = d(a, s.mirrorClasses ?? ["dark"]);
29
- t(c), s.cssText !== null && (c.adoptedStyleSheets = [...c.adoptedStyleSheets, o(s.cssText)]), s.extraSheets?.length && (c.adoptedStyleSheets = [...c.adoptedStyleSheets, ...s.extraSheets]);
30
- let u = i(() => r(e.Provider, {
29
+ i(c), s.cssText !== null && (c.adoptedStyleSheets = [...c.adoptedStyleSheets, o(s.cssText)]), s.extraSheets?.length && (c.adoptedStyleSheets = [...c.adoptedStyleSheets, ...s.extraSheets]);
30
+ let u = n(() => t(r.Provider, {
31
31
  value: s.ctx,
32
32
  get children() {
33
- return r(n, {
33
+ return t(e, {
34
34
  fallback: (e) => {
35
35
  let t = e instanceof Error ? e : Error(String(e));
36
36
  return queueMicrotask(() => s.onCrash(t)), null;
37
37
  },
38
38
  get children() {
39
- return r(s.definition.component, { get config() {
39
+ return t(s.definition.component, { get config() {
40
40
  return s.config();
41
41
  } });
42
42
  }
@@ -1,6 +1,5 @@
1
+ import type { ReactiveWidgetContext, WidgetDefinition } from "@glasshome/widget-sdk";
1
2
  import { type Accessor } from "solid-js";
2
- import type { ReactiveWidgetContext } from "../framework/hooks/use-widget-context";
3
- import type { WidgetDefinition } from "../types";
4
3
  export interface WidgetInstanceHandle {
5
4
  dispose: () => void;
6
5
  }