@glasshome/widget-sdk 0.3.6 → 0.4.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 +18 -0
- package/dist/framework/backgrounds/Glow.d.ts +21 -9
- package/dist/framework/backgrounds/WidgetSliderFill.d.ts +24 -13
- package/dist/framework/components/WidgetContent.d.ts +2 -1
- package/dist/framework/components/WidgetEmptyState.d.ts +2 -1
- package/dist/framework/components/WidgetIcon.d.ts +22 -24
- package/dist/framework/components/WidgetMetrics.d.ts +5 -4
- package/dist/framework/components/WidgetStatus.d.ts +2 -1
- package/dist/framework/components/WidgetSubtitle.d.ts +2 -1
- package/dist/framework/components/WidgetTitle.d.ts +2 -1
- package/dist/framework/components/WidgetValue.d.ts +2 -1
- package/dist/framework/core/Widget.d.ts +30 -25
- package/dist/framework/gestures/cursors.d.ts +2 -1
- package/dist/framework/gestures/haptics.d.ts +19 -0
- package/dist/framework/gestures/use-widget-gestures.d.ts +19 -41
- package/dist/framework/hooks/index.d.ts +0 -1
- package/dist/framework/index.d.ts +2 -2
- package/dist/framework/layout/WidgetStack.d.ts +2 -1
- package/dist/framework/theming/index.d.ts +2 -1
- package/dist/framework/theming/tokens.d.ts +24 -0
- package/dist/framework/theming/tone.d.ts +10 -0
- package/dist/framework/types.d.ts +0 -4
- package/dist/index.js +1093 -1023
- package/package.json +1 -2
- package/dist/framework/design-system/index.d.ts +0 -8
- package/dist/framework/theming/adaptive-color.d.ts +0 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glasshome/widget-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "SDK for building GlassHome dashboard widgets with SolidJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"glasshome",
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
"@types/node": "^25.2.2",
|
|
60
60
|
"typescript": "^5",
|
|
61
61
|
"vite": "^7.3.1",
|
|
62
|
-
"vite-plugin-externalize-deps": "^0.8.0",
|
|
63
62
|
"vite-plugin-solid": "^2.11.10"
|
|
64
63
|
},
|
|
65
64
|
"repository": {
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Design System - Barrel Export
|
|
3
|
-
*
|
|
4
|
-
* Responsive design tokens for widget sizing, typography, and layering.
|
|
5
|
-
*/
|
|
6
|
-
export { getSpacingClass, spacing } from "./spacing";
|
|
7
|
-
export { typography } from "./typography";
|
|
8
|
-
export { WIDGET_Z, type WidgetZIndex } from "./z-index";
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adaptive Color Utilities
|
|
3
|
-
*
|
|
4
|
-
* Derives icon background and glow colors from a dynamic CSS color (rgb, hsl, hex).
|
|
5
|
-
* Used by widgets like lights where the color changes at runtime based on entity state.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Adaptive icon colors derived from a dynamic CSS color.
|
|
9
|
-
*/
|
|
10
|
-
export interface AdaptiveIconColors {
|
|
11
|
-
/** Icon container background — contrasts against the widget fill */
|
|
12
|
-
background: string;
|
|
13
|
-
/** Box-shadow glow color */
|
|
14
|
-
glow: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Derive icon background and glow from a CSS color string.
|
|
18
|
-
*
|
|
19
|
-
* Strategy:
|
|
20
|
-
* - The widget fill is typically the color at ~30% opacity, so the perceived
|
|
21
|
-
* background sits around 15-25% lightness on a dark dashboard.
|
|
22
|
-
* - For the icon container we want a darker, richer version of the color that
|
|
23
|
-
* "pops" against that fill. We clamp lightness to a low range and boost
|
|
24
|
-
* saturation slightly so it reads as a tinted dark square.
|
|
25
|
-
* - For very dark colors (e.g. deep blues) we lift lightness a bit instead.
|
|
26
|
-
* - The glow uses the original color at moderate opacity.
|
|
27
|
-
*/
|
|
28
|
-
export declare function deriveAdaptiveIconColors(cssColor: string): AdaptiveIconColors | null;
|