@glasshome/widget-sdk 1.32.4 → 1.33.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.
@@ -7188,5 +7188,155 @@
7188
7188
  "useWidgetViewer",
7189
7189
  "widgetFields",
7190
7190
  "z"
7191
+ ],
7192
+ "1.33.0": [
7193
+ "Badge",
7194
+ "Button",
7195
+ "ButtonGroup",
7196
+ "CameraSourceContext",
7197
+ "CameraStream",
7198
+ "Carousel",
7199
+ "CarouselContent",
7200
+ "CarouselDots",
7201
+ "CarouselItem",
7202
+ "CarouselNext",
7203
+ "CarouselPrevious",
7204
+ "ColorDisc",
7205
+ "ColorSlider",
7206
+ "ColorWheel",
7207
+ "CountPill",
7208
+ "Icon",
7209
+ "Input",
7210
+ "Label",
7211
+ "PanelEntityRow",
7212
+ "PanelFacts",
7213
+ "PanelRow",
7214
+ "PanelRows",
7215
+ "PanelSection",
7216
+ "Progress",
7217
+ "ResponsiveDialog",
7218
+ "ResponsiveDialogBody",
7219
+ "ResponsiveDialogClose",
7220
+ "ResponsiveDialogContent",
7221
+ "ResponsiveDialogDescription",
7222
+ "ResponsiveDialogFooter",
7223
+ "ResponsiveDialogHeader",
7224
+ "ResponsiveDialogTitle",
7225
+ "SDK_VERSION",
7226
+ "SchemaForm",
7227
+ "SectionIcon",
7228
+ "SectionTitle",
7229
+ "Select",
7230
+ "SelectContent",
7231
+ "SelectItem",
7232
+ "SelectTrigger",
7233
+ "SelectValue",
7234
+ "Slider",
7235
+ "SwatchPicker",
7236
+ "Switch",
7237
+ "Tabs",
7238
+ "TabsContent",
7239
+ "TabsList",
7240
+ "TabsTrigger",
7241
+ "TemperatureBar",
7242
+ "Toggle",
7243
+ "ToggleGroup",
7244
+ "ToggleGroupItem",
7245
+ "ToneSchema",
7246
+ "Widget",
7247
+ "WidgetAction",
7248
+ "WidgetBackdrop",
7249
+ "WidgetChip",
7250
+ "WidgetChoice",
7251
+ "WidgetContent",
7252
+ "WidgetControls",
7253
+ "WidgetCtx",
7254
+ "WidgetDebugTab",
7255
+ "WidgetDebugView",
7256
+ "WidgetDialog",
7257
+ "WidgetGlyph",
7258
+ "WidgetHead",
7259
+ "WidgetHero",
7260
+ "WidgetIcon",
7261
+ "WidgetLayer",
7262
+ "WidgetManifestSchema",
7263
+ "WidgetSizeCtx",
7264
+ "WidgetSliderFill",
7265
+ "WidgetStatus",
7266
+ "WidgetStepper",
7267
+ "WidgetTitle",
7268
+ "WidgetValue",
7269
+ "buildDebugData",
7270
+ "byDomain",
7271
+ "calculateLightGroup",
7272
+ "calculateSensorGroup",
7273
+ "copyText",
7274
+ "countActiveEntities",
7275
+ "defineConfig",
7276
+ "defineWidget",
7277
+ "deprecations",
7278
+ "field",
7279
+ "formatDeprecation",
7280
+ "formatSchemaError",
7281
+ "getEntityAttribute",
7282
+ "getForecasts",
7283
+ "getStream",
7284
+ "getWebRtcClientConfig",
7285
+ "hassMediaUrl",
7286
+ "imagePreset",
7287
+ "imageSrc",
7288
+ "imageUrl",
7289
+ "injectTokens",
7290
+ "isDark",
7291
+ "isEntityActive",
7292
+ "isPanelControllable",
7293
+ "mediaUrl",
7294
+ "monotoneCubicPath",
7295
+ "parseColor",
7296
+ "presetValue",
7297
+ "provideCameraSource",
7298
+ "sendWebRtcCandidate",
7299
+ "startWebRtcSession",
7300
+ "state",
7301
+ "svgColors",
7302
+ "trackEntityHistory",
7303
+ "untrackEntityHistory",
7304
+ "useArea",
7305
+ "useCalendarEvents",
7306
+ "useCamera",
7307
+ "useCameraSource",
7308
+ "useConfirm",
7309
+ "useConnection",
7310
+ "useCopyText",
7311
+ "useCurrency",
7312
+ "useDaylight",
7313
+ "useEntities",
7314
+ "useEntity",
7315
+ "useEntityHistory",
7316
+ "useEntityStatistics",
7317
+ "useForecast",
7318
+ "useHassConfig",
7319
+ "useIntersectionPause",
7320
+ "useLocale",
7321
+ "useMaterial",
7322
+ "useReducedMotion",
7323
+ "useService",
7324
+ "useSheetDormant",
7325
+ "useStore",
7326
+ "useTemperatureUnit",
7327
+ "useToggle",
7328
+ "useTurnOff",
7329
+ "useTurnOn",
7330
+ "useUnitSystem",
7331
+ "useWidgetContext",
7332
+ "useWidgetDashboard",
7333
+ "useWidgetDialog",
7334
+ "useWidgetDimensions",
7335
+ "useWidgetEntityGroup",
7336
+ "useWidgetGestures",
7337
+ "useWidgetState",
7338
+ "useWidgetViewer",
7339
+ "widgetFields",
7340
+ "z"
7191
7341
  ]
7192
7342
  }
@@ -1,6 +1,6 @@
1
1
  import type { ModalSize, Button as UIButton, ResponsiveDialog as UIResponsiveDialog, ResponsiveDialogContent as UIResponsiveDialogContent, ResponsiveDialogDescription as UIResponsiveDialogDescription, ResponsiveDialogHeader as UIResponsiveDialogHeader, ResponsiveDialogTitle as UIResponsiveDialogTitle, SchemaForm as UISchemaForm } from "@glasshome/ui/solid";
2
2
  import { ResponsiveDialogBody, ResponsiveDialogFooter, Tabs, TabsContent, TabsList, TabsTrigger } from "@glasshome/ui/solid";
3
- import { type JSX } from "solid-js";
3
+ import { type Accessor, type Component, type ComponentProps, type JSX } from "solid-js";
4
4
  import type { ZodType } from "zod";
5
5
  /** Widths a widget could name before ui's modal size scale existed. */
6
6
  type LegacyMaxWidth = "2xl" | "3xl" | "4xl";
@@ -50,7 +50,9 @@ export interface WidgetDialogProps {
50
50
  configSchema?: ZodType;
51
51
  config?: Record<string, unknown>;
52
52
  onConfigSave?: (config: Record<string, unknown>) => void;
53
- ResponsiveDialog: typeof UIResponsiveDialog;
53
+ ResponsiveDialog: Component<ComponentProps<typeof UIResponsiveDialog> & {
54
+ keep?: boolean;
55
+ }>;
54
56
  ResponsiveDialogContent: typeof UIResponsiveDialogContent;
55
57
  ResponsiveDialogHeader: typeof UIResponsiveDialogHeader;
56
58
  ResponsiveDialogTitle: typeof UIResponsiveDialogTitle;
@@ -64,5 +66,7 @@ export interface WidgetDialogProps {
64
66
  TabsTrigger?: typeof TabsTrigger;
65
67
  TabsContent?: typeof TabsContent;
66
68
  }
69
+ /** True from a sheet's close to its next open: a warm sheet stays mounted, so a ticker inside it pauses on this. */
70
+ export declare function useSheetDormant(): Accessor<boolean>;
67
71
  export declare function WidgetDialog(props: WidgetDialogProps): JSX.Element;
68
72
  export {};
@@ -2,4 +2,4 @@
2
2
  * Dialog Components - Barrel Export
3
3
  */
4
4
  export { buildDebugData, WidgetDebugTab, WidgetDebugView, type WidgetDebugData, type WidgetDebugEntity, } from "./debug-view";
5
- export { type SheetTile, WidgetDialog, type WidgetDialogProps, type WidgetDialogTab, } from "./WidgetDialog";
5
+ export { type SheetTile, useSheetDormant, WidgetDialog, type WidgetDialogProps, type WidgetDialogTab, } from "./WidgetDialog";
@@ -0,0 +1,8 @@
1
+ export interface WarmSet<K> {
2
+ has(key: K): boolean;
3
+ touch(key: K): void;
4
+ drop(key: K): void;
5
+ }
6
+ export declare function createWarmSet<K>(cap: number): WarmSet<K>;
7
+ export declare const WARM_SHEET_CAP = 3;
8
+ export declare const warmSheets: WarmSet<object>;
@@ -35,7 +35,7 @@ export { type Confirm, useConfirm } from "./hooks/use-confirm";
35
35
  export { WidgetSliderFill } from "./backgrounds/WidgetSliderFill";
36
36
  export { type PanelFact, PanelFacts, PanelRow, type PanelRowProps, PanelRows, PanelSection, type PanelSlide, } from "./panel/panel";
37
37
  export { isPanelControllable, PanelEntityRow } from "./panel/panel-entity";
38
- export { buildDebugData, WidgetDebugTab, type WidgetDebugData, type WidgetDebugEntity, WidgetDebugView, WidgetDialog, type SheetTile, type WidgetDialogProps, type WidgetDialogTab, } from "./dialogs";
38
+ export { buildDebugData, WidgetDebugTab, type WidgetDebugData, type WidgetDebugEntity, WidgetDebugView, WidgetDialog, type SheetTile, useSheetDormant, type WidgetDialogProps, type WidgetDialogTab, } from "./dialogs";
39
39
  export { type AggregationPreset, type ReactiveWidgetContext, type ServiceCallFn, type UseWidgetEntityGroupOptions, type UseWidgetEntityGroupResult, type Daylight, type DaylightPhase, useDaylight, useIntersectionPause, useReducedMotion, useWidgetContext, useWidgetDashboard, useMaterial, useWidgetViewer, useWidgetState, useWidgetDialog, useWidgetDimensions, useWidgetEntityGroup, WidgetCtx, type WidgetDashboard, type WidgetMaterial, type WidgetViewer, type WidgetStateStore, type WidgetStateVerdict, type WidgetDialogReturn, type WidgetDimensions, type WidgetDimensionsAccessor, WidgetSizeCtx, } from "./hooks";
40
40
  export { type GestureHandlers, useWidgetGestures } from "./gestures/use-widget-gestures";
41
41
  export { injectTokens, type SvgColorKey, svgColors, type Tone, ToneSchema } from "./theming";