@glasshome/widget-sdk 0.4.2 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glasshome/widget-sdk",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "SDK for building GlassHome dashboard widgets with SolidJS",
5
5
  "keywords": [
6
6
  "glasshome",
@@ -1,40 +0,0 @@
1
- /**
2
- * Spacing System
3
- *
4
- * Provides responsive spacing that adapts to widget size.
5
- *
6
- * @example
7
- * ```tsx
8
- * const { size } = useWidgetContext();
9
- *
10
- * <div style={{ "margin-top": spacing.iconToTitle(size) }}>
11
- * <Widget.Title>{title}</Widget.Title>
12
- * </div>
13
- * ```
14
- */
15
- import type { SpacingScale, WidgetSize } from "../types";
16
- /**
17
- * Get spacing value based on widget size
18
- */
19
- export declare const spacing: {
20
- /** Extra small spacing (4-8px) */
21
- S1: (size: WidgetSize) => string;
22
- /** Small spacing (6-14px) - default for most layouts */
23
- S2: (size: WidgetSize) => string;
24
- /** Medium spacing (8-16px) */
25
- S3: (size: WidgetSize) => string;
26
- /** Large spacing (12-20px) */
27
- S4: (size: WidgetSize) => string;
28
- /** Icon container size in pixels */
29
- icon: (size: WidgetSize) => number;
30
- /** Icon stroke size for lucide icons */
31
- iconSize: (size: WidgetSize) => number;
32
- /** Spacing between icon and title */
33
- iconToTitle: (size: WidgetSize) => string;
34
- /** Container padding */
35
- container: (size: WidgetSize) => string;
36
- };
37
- /**
38
- * Get Tailwind spacing class name for layout components
39
- */
40
- export declare function getSpacingClass(scale: SpacingScale, size: WidgetSize): string;
@@ -1,40 +0,0 @@
1
- /**
2
- * Typography System
3
- *
4
- * Provides responsive typography classes that adapt to widget size.
5
- *
6
- * @example
7
- * ```tsx
8
- * const { size } = useWidgetContext();
9
- *
10
- * <h3 class={cn("font-bold text-white", typography.title(size))}>
11
- * {title}
12
- * </h3>
13
- * ```
14
- */
15
- import type { WidgetSize } from "../types";
16
- /**
17
- * Typography utilities based on current widget patterns
18
- * Matches existing container query breakpoints from LockWidget:
19
- * - text-sm @[300px]:text-base @[400px]:text-lg
20
- */
21
- export declare const typography: {
22
- /** Container base text sizing */
23
- container: (size: WidgetSize) => string;
24
- /** Title text sizing (main heading) */
25
- title: (size: WidgetSize) => string;
26
- /** Subtitle/secondary text sizing */
27
- subtitle: (size: WidgetSize) => string;
28
- /** Value display text sizing (large numbers) */
29
- value: (size: WidgetSize) => string;
30
- /** Badge text sizing (entity count badges) */
31
- badge: (size: WidgetSize) => string;
32
- /** Metric label text sizing */
33
- metricLabel: (size: WidgetSize) => string;
34
- /** Metric value text sizing */
35
- metricValue: (size: WidgetSize) => string;
36
- /** Status text (same as subtitle but semantic) */
37
- status: (size: WidgetSize) => string;
38
- /** Empty state message text */
39
- emptyState: (size: WidgetSize) => string;
40
- };