@glasshome/ui 1.16.1 → 1.17.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/SPEC.md CHANGED
@@ -119,6 +119,8 @@ role clears 4.5:1 against `--background`/`--card`/`--popover`/`--muted` (3:1 for
119
119
  | position inside a multi-step flow | `<StepIndicator count index>` | a hand-rolled row of dots |
120
120
  | tinted text alone | `glassToneText(tone)` | ad-hoc color-mix |
121
121
  | a metallic tier chip | `<TierBadge>` | gradients by hand |
122
+ | the ambient motion window | `startMotionWindow()` | an app-local timer writing `data-motion` |
123
+ | a built-in wallpaper | `GEOMETRIC_HOUSES_SVG` from `@glasshome/ui/backgrounds` | an app's own copy of the SVG |
122
124
 
123
125
  Server-run `.astro` markup imports `@glasshome/ui/solid` too: the `solid`
124
126
  export condition hands Astro the source, and a component with no `client:`
@@ -148,8 +150,10 @@ Motion is one system, not per-component flair. Four rules, all held by
148
150
  the arrival time. Pressables dip (`PRESS_DIP`).
149
151
  5. **Ambient motion is an event.** A wallpaper or decorative loop runs for a
150
152
  window after mount or a touch, then freezes mid-phase; an idle screen
151
- animates nothing. The host holds `html[data-motion="live"]` for the window
152
- (dash: `createMotionWindow`, 30 s); light-DOM loops gate on that attribute,
153
+ animates nothing. `startMotionWindow()` (package root) holds
154
+ `html[data-motion="live"]` for the window: 30 s, woken by `pointerdown`,
155
+ frozen on tab hide. Dash wraps it as `createMotionWindow` for Solid's
156
+ lifecycle; hub calls it directly. Light-DOM loops gate on that attribute,
153
157
  widget shadow roots on the inherited `--motion-ambient` (1 live, else 0)
154
158
  or, for a loop that can only pause, `--motion-play` (`running` live, else
155
159
  `paused`). A wrapper with `data-motion="still"` opts out: thumbnails are
@@ -0,0 +1 @@
1
+ export declare const GEOMETRIC_HOUSES_SVG = "<svg width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid slice\">\n <style>\n .house-shape { opacity: 0.9; filter: blur(0.2px); transform: translate(var(--tx), var(--ty)) rotate(var(--rot)); }\n\n @keyframes pop {\n 0% { transform: scale(0.88); opacity: 0; }\n 100% { transform: scale(1); opacity: 1; }\n }\n\n .h1 { --tx: 12px; --ty: 20px; --rot: 12deg; }\n .h1 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.10s; }\n .h2 { --tx: 85px; --ty: 25px; --rot: -15deg; }\n .h2 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.40s; }\n .h3 { --tx: 15px; --ty: 75px; --rot: -8deg; }\n .h3 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.70s; }\n .h4 { --tx: 70px; --ty: 10px; --rot: 20deg; }\n .h4 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 1.00s; }\n .h5 { --tx: 35px; --ty: 8px; --rot: -25deg; }\n .h5 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 1.30s; }\n .h6 { --tx: 55px; --ty: 55px; --rot: 18deg; }\n .h6 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 1.60s; }\n\n .house-shape .house-pop { animation-play-state: paused; }\n [data-motion=\"live\"] .house-shape .house-pop { animation-play-state: running; }\n [data-motion=\"still\"] .house-shape .house-pop { animation-play-state: paused; }\n\n @media (prefers-reduced-motion: reduce) {\n .house-pop { animation: none; }\n }\n </style>\n\n <defs>\n <linearGradient id=\"grad1\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.28\" />\n <stop offset=\"100%\" style=\"stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.06\" />\n </linearGradient>\n <linearGradient id=\"grad2\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.30\" />\n <stop offset=\"100%\" style=\"stop-color:var(--secondary, oklch(0.11 0.003 0));stop-opacity:0.08\" />\n </linearGradient>\n <linearGradient id=\"grad3\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.35\" />\n <stop offset=\"100%\" style=\"stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.10\" />\n </linearGradient>\n <linearGradient id=\"grad4\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--secondary, oklch(0.11 0.003 0));stop-opacity:0.22\" />\n <stop offset=\"100%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.04\" />\n </linearGradient>\n <linearGradient id=\"grad5\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.25\" />\n <stop offset=\"100%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.05\" />\n </linearGradient>\n <linearGradient id=\"grad6\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.32\" />\n <stop offset=\"100%\" style=\"stop-color:var(--secondary, oklch(0.11 0.003 0));stop-opacity:0.07\" />\n </linearGradient>\n <linearGradient id=\"overlay\" x1=\"0%\" y1=\"100%\" x2=\"100%\" y2=\"0%\">\n <stop offset=\"0%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.20\" />\n <stop offset=\"50%\" style=\"stop-color:transparent;stop-opacity:0\" />\n <stop offset=\"100%\" style=\"stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.40\" />\n </linearGradient>\n\n <path id=\"house\" d=\"M 50,4 C 52,4 53.5,4.7 54.5,6 L 86,38 C 88.8,40.2 90,43 90,46 L 90,90 C 90,93.8 87.8,96 84,96 L 16,96 C 12.2,96 10,93.8 10,90 L 10,46 C 10,43 11.2,40.2 14,38 L 45.5,6 C 46.5,4.7 48,4 50,4 Z\"/>\n </defs>\n\n <rect width=\"100%\" height=\"100%\" fill=\"var(--background, oklch(0.12 0.005 0))\"/>\n\n <g class=\"house-shape h1\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-15, -15) scale(0.31)\" fill=\"url(#grad1)\" stroke=\"var(--primary, oklch(0.48 0.2 215.221))\" stroke-opacity=\"0.35\" stroke-width=\"0.5\"/>\n </g>\n </g>\n <g class=\"house-shape h2\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-13, -12) scale(0.26)\" fill=\"url(#grad2)\" stroke=\"var(--accent, oklch(0.6 0.2 195))\" stroke-opacity=\"0.40\" stroke-width=\"0.5\"/>\n </g>\n </g>\n <g class=\"house-shape h3\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-8, -8) scale(0.16)\" fill=\"url(#grad3)\" stroke=\"var(--primary, oklch(0.48 0.2 215.221))\" stroke-opacity=\"0.45\" stroke-width=\"0.5\"/>\n </g>\n </g>\n <g class=\"house-shape h4\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-5, -5) scale(0.10)\" fill=\"url(#grad4)\" stroke=\"var(--secondary, oklch(0.11 0.003 0))\" stroke-opacity=\"0.28\" stroke-width=\"0.5\"/>\n </g>\n </g>\n <g class=\"house-shape h5\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-4, -4) scale(0.08)\" fill=\"url(#grad5)\" stroke=\"var(--accent, oklch(0.6 0.2 195))\" stroke-opacity=\"0.32\" stroke-width=\"0.5\"/>\n </g>\n </g>\n <g class=\"house-shape h6\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-9.5, -9.5) scale(0.19)\" fill=\"url(#grad6)\" stroke=\"var(--primary, oklch(0.48 0.2 215.221))\" stroke-opacity=\"0.38\" stroke-width=\"0.5\"/>\n </g>\n </g>\n\n <rect width=\"100%\" height=\"100%\" fill=\"url(#overlay)\" pointer-events=\"none\"/>\n</svg>";
@@ -0,0 +1 @@
1
+ export { GEOMETRIC_HOUSES_SVG } from "./geometric-houses.js";
@@ -0,0 +1,4 @@
1
+ //#region src/backgrounds/geometric-houses.ts
2
+ var e = "<svg width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid slice\">\n <style>\n .house-shape { opacity: 0.9; filter: blur(0.2px); transform: translate(var(--tx), var(--ty)) rotate(var(--rot)); }\n\n @keyframes pop {\n 0% { transform: scale(0.88); opacity: 0; }\n 100% { transform: scale(1); opacity: 1; }\n }\n\n .h1 { --tx: 12px; --ty: 20px; --rot: 12deg; }\n .h1 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.10s; }\n .h2 { --tx: 85px; --ty: 25px; --rot: -15deg; }\n .h2 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.40s; }\n .h3 { --tx: 15px; --ty: 75px; --rot: -8deg; }\n .h3 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.70s; }\n .h4 { --tx: 70px; --ty: 10px; --rot: 20deg; }\n .h4 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 1.00s; }\n .h5 { --tx: 35px; --ty: 8px; --rot: -25deg; }\n .h5 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 1.30s; }\n .h6 { --tx: 55px; --ty: 55px; --rot: 18deg; }\n .h6 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 1.60s; }\n\n .house-shape .house-pop { animation-play-state: paused; }\n [data-motion=\"live\"] .house-shape .house-pop { animation-play-state: running; }\n [data-motion=\"still\"] .house-shape .house-pop { animation-play-state: paused; }\n\n @media (prefers-reduced-motion: reduce) {\n .house-pop { animation: none; }\n }\n </style>\n\n <defs>\n <linearGradient id=\"grad1\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.28\" />\n <stop offset=\"100%\" style=\"stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.06\" />\n </linearGradient>\n <linearGradient id=\"grad2\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.30\" />\n <stop offset=\"100%\" style=\"stop-color:var(--secondary, oklch(0.11 0.003 0));stop-opacity:0.08\" />\n </linearGradient>\n <linearGradient id=\"grad3\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.35\" />\n <stop offset=\"100%\" style=\"stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.10\" />\n </linearGradient>\n <linearGradient id=\"grad4\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--secondary, oklch(0.11 0.003 0));stop-opacity:0.22\" />\n <stop offset=\"100%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.04\" />\n </linearGradient>\n <linearGradient id=\"grad5\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.25\" />\n <stop offset=\"100%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.05\" />\n </linearGradient>\n <linearGradient id=\"grad6\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.32\" />\n <stop offset=\"100%\" style=\"stop-color:var(--secondary, oklch(0.11 0.003 0));stop-opacity:0.07\" />\n </linearGradient>\n <linearGradient id=\"overlay\" x1=\"0%\" y1=\"100%\" x2=\"100%\" y2=\"0%\">\n <stop offset=\"0%\" style=\"stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.20\" />\n <stop offset=\"50%\" style=\"stop-color:transparent;stop-opacity:0\" />\n <stop offset=\"100%\" style=\"stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.40\" />\n </linearGradient>\n\n <path id=\"house\" d=\"M 50,4 C 52,4 53.5,4.7 54.5,6 L 86,38 C 88.8,40.2 90,43 90,46 L 90,90 C 90,93.8 87.8,96 84,96 L 16,96 C 12.2,96 10,93.8 10,90 L 10,46 C 10,43 11.2,40.2 14,38 L 45.5,6 C 46.5,4.7 48,4 50,4 Z\"/>\n </defs>\n\n <rect width=\"100%\" height=\"100%\" fill=\"var(--background, oklch(0.12 0.005 0))\"/>\n\n <g class=\"house-shape h1\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-15, -15) scale(0.31)\" fill=\"url(#grad1)\" stroke=\"var(--primary, oklch(0.48 0.2 215.221))\" stroke-opacity=\"0.35\" stroke-width=\"0.5\"/>\n </g>\n </g>\n <g class=\"house-shape h2\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-13, -12) scale(0.26)\" fill=\"url(#grad2)\" stroke=\"var(--accent, oklch(0.6 0.2 195))\" stroke-opacity=\"0.40\" stroke-width=\"0.5\"/>\n </g>\n </g>\n <g class=\"house-shape h3\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-8, -8) scale(0.16)\" fill=\"url(#grad3)\" stroke=\"var(--primary, oklch(0.48 0.2 215.221))\" stroke-opacity=\"0.45\" stroke-width=\"0.5\"/>\n </g>\n </g>\n <g class=\"house-shape h4\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-5, -5) scale(0.10)\" fill=\"url(#grad4)\" stroke=\"var(--secondary, oklch(0.11 0.003 0))\" stroke-opacity=\"0.28\" stroke-width=\"0.5\"/>\n </g>\n </g>\n <g class=\"house-shape h5\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-4, -4) scale(0.08)\" fill=\"url(#grad5)\" stroke=\"var(--accent, oklch(0.6 0.2 195))\" stroke-opacity=\"0.32\" stroke-width=\"0.5\"/>\n </g>\n </g>\n <g class=\"house-shape h6\">\n <g class=\"house-pop\">\n <use href=\"#house\" transform=\"translate(-9.5, -9.5) scale(0.19)\" fill=\"url(#grad6)\" stroke=\"var(--primary, oklch(0.48 0.2 215.221))\" stroke-opacity=\"0.38\" stroke-width=\"0.5\"/>\n </g>\n </g>\n\n <rect width=\"100%\" height=\"100%\" fill=\"url(#overlay)\" pointer-events=\"none\"/>\n</svg>";
3
+ //#endregion
4
+ export { e as GEOMETRIC_HOUSES_SVG };
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export { Z, Z_CLASS } from "./lib/layers.js";
8
8
  export { LOGO_DEFAULT_SIZE, LOGO_DEFAULT_SRC, LOGO_DEFAULT_SUB, LOGO_MARK_CLASS, LOGO_MARK_PX, LOGO_NAME_CLASS, LOGO_ROOT_CLASS, LOGO_SIZES, LOGO_STACK_CLASS, LOGO_SUB_CLASS, type LogoSize, } from "./lib/logo-lockup.js";
9
9
  export { MENU_ITEM, MENU_ITEM_BASE, MENU_ITEM_X, MENU_LABEL, MENU_SEPARATOR, } from "./lib/menu-classes.js";
10
10
  export { FIELD_MOTION, MODAL_MOTION, MORPH_MOTION, OVERLAY_MOTION, PRESS_DIP, SCRIM_MOTION, SETTLE_MOTION, STAGGER, } from "./lib/motion-classes.js";
11
+ export { MOTION_WINDOW_MS, startMotionWindow } from "./lib/motion-window.js";
11
12
  export { anchorToTriggerTop, FLOATING_PANEL, OVERLAY_BLUR, OVERLAY_SURFACE, OVERLAY_SURFACE_BASE, OVERLAY_SURFACE_OPAQUE, SCRIM_CLASS, } from "./lib/overlay-classes.js";
12
13
  export { CONTROL_H_TOUCH, PICKER_LIST, PICKER_TRIGGER } from "./lib/picker-classes.js";
13
14
  export { CHIP, ICON_PILL, ICON_PILL_TINT } from "./lib/pill-classes.js";
package/dist/index.js CHANGED
@@ -1,2 +1,20 @@
1
- import { $ as e, A as t, B as n, Bt as r, C as i, Ct as a, D as o, Dt as s, E as c, Et as l, F as u, Ft as d, G as f, Gt as p, H as m, Ht as h, I as g, It as _, J as v, Jt as y, Kt as b, L as x, Lt as S, M as C, Mt as w, N as T, Nt as E, O as D, Ot as O, P as k, Pt as A, Q as j, R as M, Rt as N, S as P, St as F, T as I, U as L, Ut as R, V as z, Vt as B, Wt as V, X as H, Xt as U, Y as W, Yt as G, Z as K, Zt as q, _ as J, _t as Y, at as X, b as Z, c as Q, ct as $, d as ee, et as te, f as ne, g as re, h as ie, i as ae, it as oe, j as se, jt as ce, k as le, kt as ue, l as de, m as fe, n as pe, nt as me, o as he, ot as ge, p as _e, q as ve, qt as ye, r as be, rt as xe, s as Se, st as Ce, t as we, tt as Te, u as Ee, ut as De, v as Oe, vt as ke, w as Ae, wt as je, x as Me, y as Ne, yt as Pe, z as Fe } from "./utils-DMaksjvy.js";
2
- export { r as ALERT_CLASS, B as ALERT_CONTENT_CLASS, h as ALERT_DESCRIPTION_CLASS, R as ALERT_ICON_BG_CLASS, V as ALERT_ICON_CLASS, p as ALERT_ICON_PATHS, b as ALERT_TITLE_CLASS, ye as ALERT_TONES, A as BUTTON_DEFAULT_CLASS, d as BUTTON_OUTLINE_CLASS, De as CARD_BLUR, Y as CARD_SURFACE, ke as CARD_SURFACE_BASE, Pe as CARD_SURFACE_OPAQUE, v as CAROUSEL_DOTS, W as CAROUSEL_VIEWPORT, fe as CHIP, Te as CONTROL_H, J as CONTROL_H_TOUCH, me as FIELD_CHROME, xe as FIELD_CONTROL, je as FIELD_MOTION, oe as FIELD_TEXT, Z as FLOATING_PANEL, X as FOCUS_RING, _ as ICON_BUTTON_CLASS, ie as ICON_PILL, re as ICON_PILL_TINT, ge as INPUT_CLASS, Ce as INPUT_SURFACE, $ as INVALID_RING, C as LOGO_DEFAULT_SIZE, T as LOGO_DEFAULT_SRC, k as LOGO_DEFAULT_SUB, u as LOGO_MARK_CLASS, g as LOGO_MARK_PX, x as LOGO_NAME_CLASS, M as LOGO_ROOT_CLASS, Fe as LOGO_SIZES, n as LOGO_STACK_CLASS, z as LOGO_SUB_CLASS, o as MENU_ITEM, D as MENU_ITEM_BASE, le as MENU_ITEM_X, t as MENU_LABEL, se as MENU_SEPARATOR, pe as MOBILE_BREAKPOINT, l as MODAL_MOTION, s as MORPH_MOTION, S as OUTLINE_SURFACE, Me as OVERLAY_BLUR, O as OVERLAY_MOTION, P as OVERLAY_SURFACE, i as OVERLAY_SURFACE_BASE, Ae as OVERLAY_SURFACE_OPAQUE, Oe as PICKER_LIST, Ne as PICKER_TRIGGER, e as POSITION_BAR, te as POSITION_BAR_LIT, ue as PRESS_DIP, I as SCRIM_CLASS, ce as SCRIM_MOTION, Ee as SECTION_INNER_RADIUS, ee as SECTION_OUTER_RADIUS, ne as SECTION_PADDING, _e as SECTION_ROW_CLASS, F as SECTION_ROW_SURFACE, de as SEGMENT_ITEM, w as SETTLE_MOTION, E as STAGGER, ae as THUMB_CLASS, he as THUMB_RAIL_BLEED, Se as THUMB_RAIL_PAD, Q as THUMB_SIZE, a as TRACK_SURFACE, m as Z, L as Z_CLASS, y as alertBorder, G as alertFill, U as alertIconBgStyle, q as alertIconFill, c as anchorToTriggerTop, N as buttonVariants, H as carouselDot, K as carouselItem, j as carouselTrack, we as cn, be as createIsMobile, f as glassToneText, ve as toneTextMix };
1
+ import { $ as e, A as t, B as n, Bt as r, C as i, Ct as a, D as ee, Dt as te, E as o, Et as s, F as c, Ft as l, G as u, Gt as d, H as f, Ht as p, I as m, It as h, J as g, Jt as _, Kt as v, L as y, Lt as b, M as x, Mt as S, N as C, Nt as w, O as T, Ot as E, P as D, Pt as O, Q as k, R as A, Rt as j, S as M, St as N, T as P, U as F, Ut as I, V as L, Vt as R, Wt as z, X as B, Xt as V, Y as H, Yt as U, Z as W, Zt as G, _ as K, _t as q, at as J, b as Y, c as ne, ct as X, d as Z, et as re, f as ie, g as ae, h as oe, i as se, it as ce, j as le, jt as ue, k as de, kt as fe, l as pe, m as me, n as he, nt as ge, o as _e, ot as ve, p as ye, q as be, qt as xe, r as Se, rt as Ce, s as we, st as Te, t as Ee, tt as De, u as Oe, ut as Q, v as ke, vt as Ae, w as je, wt as Me, x as Ne, y as Pe, yt as Fe, z as Ie } from "./utils-DMaksjvy.js";
2
+ //#region src/lib/motion-window.ts
3
+ var $ = 3e4;
4
+ function Le(e = $) {
5
+ let t, n = document.documentElement, r = () => {
6
+ clearTimeout(t), t = void 0, delete n.dataset.motion;
7
+ }, i = () => {
8
+ clearTimeout(t), t = setTimeout(r, e), n.dataset.motion !== "live" && (n.dataset.motion = "live");
9
+ }, a = () => {
10
+ document.visibilityState === "hidden" ? r() : i();
11
+ };
12
+ return i(), document.addEventListener("pointerdown", i, {
13
+ passive: !0,
14
+ capture: !0
15
+ }), document.addEventListener("visibilitychange", a), () => {
16
+ r(), document.removeEventListener("pointerdown", i, { capture: !0 }), document.removeEventListener("visibilitychange", a);
17
+ };
18
+ }
19
+ //#endregion
20
+ export { r as ALERT_CLASS, R as ALERT_CONTENT_CLASS, p as ALERT_DESCRIPTION_CLASS, I as ALERT_ICON_BG_CLASS, z as ALERT_ICON_CLASS, d as ALERT_ICON_PATHS, v as ALERT_TITLE_CLASS, xe as ALERT_TONES, O as BUTTON_DEFAULT_CLASS, l as BUTTON_OUTLINE_CLASS, Q as CARD_BLUR, q as CARD_SURFACE, Ae as CARD_SURFACE_BASE, Fe as CARD_SURFACE_OPAQUE, g as CAROUSEL_DOTS, H as CAROUSEL_VIEWPORT, me as CHIP, De as CONTROL_H, K as CONTROL_H_TOUCH, ge as FIELD_CHROME, Ce as FIELD_CONTROL, Me as FIELD_MOTION, ce as FIELD_TEXT, Y as FLOATING_PANEL, J as FOCUS_RING, h as ICON_BUTTON_CLASS, oe as ICON_PILL, ae as ICON_PILL_TINT, ve as INPUT_CLASS, Te as INPUT_SURFACE, X as INVALID_RING, x as LOGO_DEFAULT_SIZE, C as LOGO_DEFAULT_SRC, D as LOGO_DEFAULT_SUB, c as LOGO_MARK_CLASS, m as LOGO_MARK_PX, y as LOGO_NAME_CLASS, A as LOGO_ROOT_CLASS, Ie as LOGO_SIZES, n as LOGO_STACK_CLASS, L as LOGO_SUB_CLASS, ee as MENU_ITEM, T as MENU_ITEM_BASE, de as MENU_ITEM_X, t as MENU_LABEL, le as MENU_SEPARATOR, he as MOBILE_BREAKPOINT, s as MODAL_MOTION, te as MORPH_MOTION, $ as MOTION_WINDOW_MS, b as OUTLINE_SURFACE, Ne as OVERLAY_BLUR, E as OVERLAY_MOTION, M as OVERLAY_SURFACE, i as OVERLAY_SURFACE_BASE, je as OVERLAY_SURFACE_OPAQUE, ke as PICKER_LIST, Pe as PICKER_TRIGGER, e as POSITION_BAR, re as POSITION_BAR_LIT, fe as PRESS_DIP, P as SCRIM_CLASS, ue as SCRIM_MOTION, Oe as SECTION_INNER_RADIUS, Z as SECTION_OUTER_RADIUS, ie as SECTION_PADDING, ye as SECTION_ROW_CLASS, N as SECTION_ROW_SURFACE, pe as SEGMENT_ITEM, S as SETTLE_MOTION, w as STAGGER, se as THUMB_CLASS, _e as THUMB_RAIL_BLEED, we as THUMB_RAIL_PAD, ne as THUMB_SIZE, a as TRACK_SURFACE, f as Z, F as Z_CLASS, _ as alertBorder, U as alertFill, V as alertIconBgStyle, G as alertIconFill, o as anchorToTriggerTop, j as buttonVariants, B as carouselDot, W as carouselItem, k as carouselTrack, Ee as cn, Se as createIsMobile, u as glassToneText, Le as startMotionWindow, be as toneTextMix };
@@ -0,0 +1,5 @@
1
+ export declare const MOTION_WINDOW_MS = 30000;
2
+ /** Ambient motion runs for a window after load or a touch, then freezes; `html[data-motion="live"]`
3
+ * is the one signal, which theme.css turns into `--motion-ambient` and the wallpapers gate on.
4
+ * Returns the stop function. */
5
+ export declare function startMotionWindow(windowMs?: number): () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glasshome/ui",
3
- "version": "1.16.1",
3
+ "version": "1.17.0",
4
4
  "description": "SolidJS component library for GlassHome, built on Kobalte",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/glasshome/ui#readme",
@@ -47,11 +47,17 @@
47
47
  "./styles": "./src/styles/globals.css",
48
48
  "./package.json": "./package.json",
49
49
  "./styles/theme": "./src/styles/theme.css",
50
- "./scripts/*": "./scripts/*"
50
+ "./scripts/*": "./scripts/*",
51
+ "./backgrounds": {
52
+ "@glasshome/source": "./src/backgrounds/index.ts",
53
+ "types": "./dist/backgrounds/index.d.ts",
54
+ "import": "./dist/backgrounds/index.js"
55
+ }
51
56
  },
52
57
  "files": [
53
58
  "dist",
54
59
  "src/index.ts",
60
+ "src/backgrounds",
55
61
  "src/lib",
56
62
  "src/solid",
57
63
  "src/styles",
@@ -0,0 +1,103 @@
1
+ /* The wallpaper both apps render. Motion lives on an inner .house-pop group gated by
2
+ * html[data-motion], so the entrance plays inside the motion window and nothing animates after it.
3
+ * Written by hand once; keep the copy here and nowhere else. */
4
+ export const GEOMETRIC_HOUSES_SVG = `<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid slice">
5
+ <style>
6
+ .house-shape { opacity: 0.9; filter: blur(0.2px); transform: translate(var(--tx), var(--ty)) rotate(var(--rot)); }
7
+
8
+ @keyframes pop {
9
+ 0% { transform: scale(0.88); opacity: 0; }
10
+ 100% { transform: scale(1); opacity: 1; }
11
+ }
12
+
13
+ .h1 { --tx: 12px; --ty: 20px; --rot: 12deg; }
14
+ .h1 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.10s; }
15
+ .h2 { --tx: 85px; --ty: 25px; --rot: -15deg; }
16
+ .h2 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.40s; }
17
+ .h3 { --tx: 15px; --ty: 75px; --rot: -8deg; }
18
+ .h3 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.70s; }
19
+ .h4 { --tx: 70px; --ty: 10px; --rot: 20deg; }
20
+ .h4 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 1.00s; }
21
+ .h5 { --tx: 35px; --ty: 8px; --rot: -25deg; }
22
+ .h5 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 1.30s; }
23
+ .h6 { --tx: 55px; --ty: 55px; --rot: 18deg; }
24
+ .h6 .house-pop { animation: pop 2.2s cubic-bezier(0.16, 1, 0.3, 1) 1.60s; }
25
+
26
+ .house-shape .house-pop { animation-play-state: paused; }
27
+ [data-motion="live"] .house-shape .house-pop { animation-play-state: running; }
28
+ [data-motion="still"] .house-shape .house-pop { animation-play-state: paused; }
29
+
30
+ @media (prefers-reduced-motion: reduce) {
31
+ .house-pop { animation: none; }
32
+ }
33
+ </style>
34
+
35
+ <defs>
36
+ <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
37
+ <stop offset="0%" style="stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.28" />
38
+ <stop offset="100%" style="stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.06" />
39
+ </linearGradient>
40
+ <linearGradient id="grad2" x1="0%" y1="0%" x2="100%" y2="100%">
41
+ <stop offset="0%" style="stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.30" />
42
+ <stop offset="100%" style="stop-color:var(--secondary, oklch(0.11 0.003 0));stop-opacity:0.08" />
43
+ </linearGradient>
44
+ <linearGradient id="grad3" x1="0%" y1="0%" x2="100%" y2="100%">
45
+ <stop offset="0%" style="stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.35" />
46
+ <stop offset="100%" style="stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.10" />
47
+ </linearGradient>
48
+ <linearGradient id="grad4" x1="0%" y1="0%" x2="100%" y2="100%">
49
+ <stop offset="0%" style="stop-color:var(--secondary, oklch(0.11 0.003 0));stop-opacity:0.22" />
50
+ <stop offset="100%" style="stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.04" />
51
+ </linearGradient>
52
+ <linearGradient id="grad5" x1="0%" y1="0%" x2="100%" y2="100%">
53
+ <stop offset="0%" style="stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.25" />
54
+ <stop offset="100%" style="stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.05" />
55
+ </linearGradient>
56
+ <linearGradient id="grad6" x1="0%" y1="0%" x2="100%" y2="100%">
57
+ <stop offset="0%" style="stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.32" />
58
+ <stop offset="100%" style="stop-color:var(--secondary, oklch(0.11 0.003 0));stop-opacity:0.07" />
59
+ </linearGradient>
60
+ <linearGradient id="overlay" x1="0%" y1="100%" x2="100%" y2="0%">
61
+ <stop offset="0%" style="stop-color:var(--primary, oklch(0.48 0.2 215.221));stop-opacity:0.20" />
62
+ <stop offset="50%" style="stop-color:transparent;stop-opacity:0" />
63
+ <stop offset="100%" style="stop-color:var(--accent, oklch(0.6 0.2 195));stop-opacity:0.40" />
64
+ </linearGradient>
65
+
66
+ <path id="house" d="M 50,4 C 52,4 53.5,4.7 54.5,6 L 86,38 C 88.8,40.2 90,43 90,46 L 90,90 C 90,93.8 87.8,96 84,96 L 16,96 C 12.2,96 10,93.8 10,90 L 10,46 C 10,43 11.2,40.2 14,38 L 45.5,6 C 46.5,4.7 48,4 50,4 Z"/>
67
+ </defs>
68
+
69
+ <rect width="100%" height="100%" fill="var(--background, oklch(0.12 0.005 0))"/>
70
+
71
+ <g class="house-shape h1">
72
+ <g class="house-pop">
73
+ <use href="#house" transform="translate(-15, -15) scale(0.31)" fill="url(#grad1)" stroke="var(--primary, oklch(0.48 0.2 215.221))" stroke-opacity="0.35" stroke-width="0.5"/>
74
+ </g>
75
+ </g>
76
+ <g class="house-shape h2">
77
+ <g class="house-pop">
78
+ <use href="#house" transform="translate(-13, -12) scale(0.26)" fill="url(#grad2)" stroke="var(--accent, oklch(0.6 0.2 195))" stroke-opacity="0.40" stroke-width="0.5"/>
79
+ </g>
80
+ </g>
81
+ <g class="house-shape h3">
82
+ <g class="house-pop">
83
+ <use href="#house" transform="translate(-8, -8) scale(0.16)" fill="url(#grad3)" stroke="var(--primary, oklch(0.48 0.2 215.221))" stroke-opacity="0.45" stroke-width="0.5"/>
84
+ </g>
85
+ </g>
86
+ <g class="house-shape h4">
87
+ <g class="house-pop">
88
+ <use href="#house" transform="translate(-5, -5) scale(0.10)" fill="url(#grad4)" stroke="var(--secondary, oklch(0.11 0.003 0))" stroke-opacity="0.28" stroke-width="0.5"/>
89
+ </g>
90
+ </g>
91
+ <g class="house-shape h5">
92
+ <g class="house-pop">
93
+ <use href="#house" transform="translate(-4, -4) scale(0.08)" fill="url(#grad5)" stroke="var(--accent, oklch(0.6 0.2 195))" stroke-opacity="0.32" stroke-width="0.5"/>
94
+ </g>
95
+ </g>
96
+ <g class="house-shape h6">
97
+ <g class="house-pop">
98
+ <use href="#house" transform="translate(-9.5, -9.5) scale(0.19)" fill="url(#grad6)" stroke="var(--primary, oklch(0.48 0.2 215.221))" stroke-opacity="0.38" stroke-width="0.5"/>
99
+ </g>
100
+ </g>
101
+
102
+ <rect width="100%" height="100%" fill="url(#overlay)" pointer-events="none"/>
103
+ </svg>`;
@@ -0,0 +1 @@
1
+ export { GEOMETRIC_HOUSES_SVG } from "./geometric-houses.js";
package/src/index.ts CHANGED
@@ -82,6 +82,7 @@ export {
82
82
  SETTLE_MOTION,
83
83
  STAGGER,
84
84
  } from "./lib/motion-classes.js";
85
+ export { MOTION_WINDOW_MS, startMotionWindow } from "./lib/motion-window.js";
85
86
  export {
86
87
  anchorToTriggerTop,
87
88
  FLOATING_PANEL,
@@ -0,0 +1,34 @@
1
+ export const MOTION_WINDOW_MS = 30_000;
2
+
3
+ /** Ambient motion runs for a window after load or a touch, then freezes; `html[data-motion="live"]`
4
+ * is the one signal, which theme.css turns into `--motion-ambient` and the wallpapers gate on.
5
+ * Returns the stop function. */
6
+ export function startMotionWindow(windowMs = MOTION_WINDOW_MS): () => void {
7
+ let timer: ReturnType<typeof setTimeout> | undefined;
8
+ const root = document.documentElement;
9
+
10
+ const freeze = () => {
11
+ clearTimeout(timer);
12
+ timer = undefined;
13
+ delete root.dataset.motion;
14
+ };
15
+ const wake = () => {
16
+ clearTimeout(timer);
17
+ timer = setTimeout(freeze, windowMs);
18
+ if (root.dataset.motion !== "live") root.dataset.motion = "live";
19
+ };
20
+ const onVisibility = () => {
21
+ if (document.visibilityState === "hidden") freeze();
22
+ else wake();
23
+ };
24
+
25
+ wake();
26
+ document.addEventListener("pointerdown", wake, { passive: true, capture: true });
27
+ document.addEventListener("visibilitychange", onVisibility);
28
+
29
+ return () => {
30
+ freeze();
31
+ document.removeEventListener("pointerdown", wake, { capture: true });
32
+ document.removeEventListener("visibilitychange", onVisibility);
33
+ };
34
+ }