@raineworks/ha-dashboards 1.3.1 → 1.3.2

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.
@@ -18,7 +18,7 @@ export declare function isHouseholdMember(person: HassEntity | undefined): perso
18
18
  export declare const INTEGRATION = "raineworks_dashboards";
19
19
  /**
20
20
  * Ask the integration who the household is (when it's loaded) and set it, with its house settings
21
- * (`setIntegrationHouse()`); resolves true when that changed the household. Without the
21
+ * (`setIntegrationHouse()`) and its Animations option (`setIntegrationMotion()`); resolves true when that changed the household. Without the
22
22
  * integration, or when it can't answer, nothing changes.
23
23
  */
24
24
  export declare function loadHousehold(hass: Pick<HomeAssistant, 'callWS' | 'config'>): Promise<boolean>;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * How much the dashboards move: `full`, or `reduced`, which draws them as a device asking for less
3
+ * motion does (no rolling numbers, nothing spinning, pulsing or drifting; dialogs open and close
4
+ * without sliding). For hardware that struggles: the number rolls, the main cost of a light changing,
5
+ * restyle their digits every frame of the roll.
6
+ *
7
+ * A card's `motion` option wins, then the integration's Animations option (General), else `full`.
8
+ * Whatever they say, a device's own reduce-motion setting always gets less motion. definePanelElement
9
+ * marks the card's mount point `data-motion="reduced"`, which the `motion-reduce:` variant and the
10
+ * reduced-motion rules in theme.css follow (dialogs portal there too), and `lessMotion()` reads it
11
+ * for what moves from code.
12
+ *
13
+ * @module
14
+ */
15
+ /** How much the dashboards move. */
16
+ export type Motion = 'full' | 'reduced';
17
+ /** A setting as written (a card's YAML, the integration's option), or null when it isn't one. */
18
+ export declare function parseMotion(value: unknown): Motion | null;
19
+ /** The integration's Animations option, from `raineworks_dashboards/info` (null: it didn't say). */
20
+ export declare function setIntegrationMotion(value: unknown): void;
21
+ /** The motion for a card: its own `motion` option, else the integration's, else `full`. */
22
+ export declare function resolveMotion(cardOption: unknown): Motion;
23
+ /** The attribute on a card's mount point that asks for less motion. */
24
+ export declare const REDUCED_MOTION_SELECTOR = "[data-motion=\"reduced\"]";
25
+ /**
26
+ * Whether what's at `el` should move less: the device asks for it, or it's inside a card set to
27
+ * `reduced`. False for an element not (yet) in a card.
28
+ */
29
+ export declare function lessMotion(el: Element | null | undefined): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raineworks/ha-dashboards",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "type": "module",
5
5
  "description": "Raineworks Dashboards' house settings parser, bedtime routines and setup MCP server, for a house's own Home Assistant config repository",
6
6
  "license": "MIT",