@glasshome/widget-cli 0.11.2 → 0.11.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glasshome/widget-cli",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"description": "CLI for creating and managing GlassHome widgets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@fontsource-variable/geist-mono": "^5.2.8",
|
|
31
31
|
"@glasshome/sync-layer": "0.7.2",
|
|
32
32
|
"@glasshome/widget-contract": "0.2.0",
|
|
33
|
-
"@glasshome/widget-sdk": "1.11.
|
|
33
|
+
"@glasshome/widget-sdk": "1.11.2",
|
|
34
34
|
"@iconify-json/lucide": "^1.2.0",
|
|
35
35
|
"@iconify-json/mdi": "^1.2.3",
|
|
36
36
|
"@tailwindcss/vite": "^4.1.13",
|
|
@@ -20,6 +20,7 @@ import { addAPIProvider, addCollection } from "iconify-icon";
|
|
|
20
20
|
// (custom properties cross the boundary; class rules don't). Without them,
|
|
21
21
|
// shadow-side calc(var(--radius)+…) collapses — sharp corners, no border.
|
|
22
22
|
import "@glasshome/ui/styles";
|
|
23
|
+
import uiCss from "@glasshome/ui/styles?raw";
|
|
23
24
|
// Fonts must load at the document (an @font-face in an adopted/shadow sheet
|
|
24
25
|
// won't); the family name then inherits into the widget shadow. Same set dash's
|
|
25
26
|
// styles.css loads.
|
|
@@ -119,6 +120,14 @@ FROST_SHEET.replaceSync(
|
|
|
119
120
|
".glasshome-widget { --glass-frost: linear-gradient(var(--card), var(--card)); }",
|
|
120
121
|
);
|
|
121
122
|
|
|
123
|
+
/* ui's material lives in class rules (.glass, .glass-tint), and class rules do
|
|
124
|
+
not cross a shadow boundary — only custom properties inherit. Without this,
|
|
125
|
+
every @glasshome/ui component the SDK re-exports renders inside a widget with
|
|
126
|
+
its layout classes but no material. Adopted verbatim: globals.css declares on
|
|
127
|
+
:where(.glass), never :root, so it needs no re-scoping. */
|
|
128
|
+
const UI_SHEET = new CSSStyleSheet();
|
|
129
|
+
UI_SHEET.replaceSync(uiCss);
|
|
130
|
+
|
|
122
131
|
/** Mount via the shared SDK recipe (`@glasshome/widget-sdk/host`): closed shadow
|
|
123
132
|
root, injected tokens, adopted widget CSS, WidgetCtx provider, `dark`
|
|
124
133
|
mirrored onto the host. `dark` is the default `mirrorClasses`; the `dark`
|
|
@@ -135,7 +144,7 @@ function mount(
|
|
|
135
144
|
config: () => config,
|
|
136
145
|
ctx,
|
|
137
146
|
cssText,
|
|
138
|
-
extraSheets: [FROST_SHEET],
|
|
147
|
+
extraSheets: [UI_SHEET, FROST_SHEET],
|
|
139
148
|
onCrash: (err) => console.error("[harness] widget threw:", err),
|
|
140
149
|
});
|
|
141
150
|
}
|