@glasshome/ui 1.25.0 → 1.26.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
@@ -15,6 +15,8 @@ implementations. Never hand-roll `backdrop-blur` + translucent `bg-*` panels.
15
15
  .glass neutral pane: card fill, border edge, lit rim, no tint
16
16
  .glass-tint + tinted look driven by --glass-tone (badge/alert/button/chip)
17
17
  .glass-sink rim flipped concave: the surface reads dug-out (fields)
18
+ .glass-halo the outer glow as its own layer over a sibling surface's box, so it
19
+ lies over neighbouring surfaces; that surface sets --glass-halo: 1
18
20
  ```
19
21
 
20
22
  Knobs (typed `@property`, `inherits: false` — a knob set on a parent never
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glasshome/ui",
3
- "version": "1.25.0",
3
+ "version": "1.26.0",
4
4
  "description": "SolidJS component library for GlassHome, built on Kobalte",
5
5
  "keywords": [
6
6
  "components",
@@ -55,6 +55,12 @@
55
55
  inherits: false;
56
56
  initial-value: 0;
57
57
  }
58
+ /* 1 when a .glass-halo beside the surface draws its outer glow instead. */
59
+ @property --glass-halo {
60
+ syntax: "<number>";
61
+ inherits: false;
62
+ initial-value: 0;
63
+ }
58
64
  @property --glass-text {
59
65
  syntax: "<percentage>";
60
66
  inherits: false;
@@ -320,6 +326,28 @@
320
326
  }
321
327
  }
322
328
 
329
+ :where(.glass, .glass-halo) {
330
+ /* The surface's own hue, opaque: its tone when it has one, the accent otherwise
331
+ * (a transparent tone mixes to the accent at low alpha; the /1 restores it). */
332
+ --material-hue: oklch(
333
+ from color-mix(in srgb, var(--glass-tone) 99%, var(--material-accent)) l c h / 1
334
+ );
335
+ /* Glow scales with --glass-lift, the knob that already says how big a surface
336
+ * floats: a card (0.45) takes the full bloom, a chip or button (0) about a third. */
337
+ --material-reach: calc(0.35 + var(--glass-lift) * 1.45);
338
+ --_glass-bloom: calc(var(--material-glow) * var(--material-reach) * var(--_material-glow-out));
339
+ }
340
+ /* A surface's outer glow as its own layer, laid over the surface's box with the
341
+ * same tone and lift. Its z-index lifts the glow over neighbouring surfaces;
342
+ * the surface itself sets --glass-halo: 1 so the glow is not drawn twice. */
343
+ :where(.glass-halo) {
344
+ position: absolute;
345
+ inset: 0;
346
+ z-index: 1;
347
+ pointer-events: none;
348
+ box-shadow: 0 0 var(--_glass-bloom) oklch(from var(--material-hue) l c h / 0.65);
349
+ }
350
+
323
351
  /* The ONE glass formula. Neutral by default (--glass-tone transparent makes
324
352
  * every tone term inert); add .glass-tint for the tinted badge/alert look and
325
353
  * .glass-sink for a recessed field. Tone mixes are srgb: oklch drags a tone
@@ -342,11 +370,6 @@
342
370
  --glass-wash-2: calc(var(--glass-wash) / var(--_material-wash-split));
343
371
  --glass-wash-angle: var(--_material-wash-angle);
344
372
  --surface-wash: calc(var(--glass-wash) * var(--material-tint));
345
- /* The surface's own hue, opaque: its tone when it has one, the accent otherwise
346
- * (a transparent tone mixes to the accent at low alpha; the /1 restores it). */
347
- --material-hue: oklch(
348
- from color-mix(in srgb, var(--glass-tone) 99%, var(--material-accent)) l c h / 1
349
- );
350
373
  border: var(--material-edge-width) solid
351
374
  color-mix(
352
375
  in srgb,
@@ -396,16 +419,13 @@
396
419
  )
397
420
  ),
398
421
  linear-gradient(var(--glass-base), var(--glass-base)), var(--glass-frost, none);
399
- /* Glow scales with --glass-lift, the knob that already says how big a surface
400
- * floats: a card (0.45) takes the full bloom, a chip or button (0) about a third. */
401
- --material-reach: calc(0.35 + var(--glass-lift) * 1.45);
402
422
  box-shadow:
403
423
  var(--glass-rim-shine, 0 0 #0000),
404
424
  inset 0 -2px 4px color-mix(in srgb, var(--glass-tone) var(--glass-glow), transparent),
405
425
  0 1px 3px color-mix(in srgb, var(--glass-tone) var(--glass-drop), transparent),
406
426
  calc(-10px * var(--_material-light-sin)) calc(10px * var(--_material-light-cos)) 30px -16px
407
427
  oklch(0 0 0 / calc(var(--glass-lift) * var(--_material-shadow))),
408
- 0 0 calc(var(--material-glow) * var(--material-reach) * var(--_material-glow-out))
428
+ 0 0 calc(var(--_glass-bloom) * (1 - var(--glass-halo)))
409
429
  oklch(from var(--material-hue) l c h / 0.65),
410
430
  inset 0 0 calc(var(--material-glow) * 0.9 * var(--_material-glow-in))
411
431
  oklch(from var(--material-hue) l c h / calc(0.65 * var(--_material-glow-in))),
@@ -526,6 +546,9 @@
526
546
  * paints above its parent's own background and border; contain: layout anchors
527
547
  * them and makes the stacking context without repositioning the surface. */
528
548
  @container not style(--material-ink-level: 0) {
549
+ :where(.glass-halo) {
550
+ box-shadow: none;
551
+ }
529
552
  :where(.glass) {
530
553
  --ink-r: var(--radius);
531
554
  --ink-line: color-mix(