@mkbabb/glass-ui 3.3.0 → 3.4.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.
@@ -1,4 +1,4 @@
1
- import type { TimingFunction, TimingFunctionNames } from "@mkbabb/keyframes.js";
1
+ import type { TimingFunction } from "@mkbabb/keyframes.js";
2
2
  export type SpringSnapshot<K extends string> = Record<K, number>;
3
3
  export interface UseNumericTransitionOptions<K extends string> {
4
4
  /** Named numeric endpoints to interpolate between. */
@@ -6,8 +6,19 @@ export interface UseNumericTransitionOptions<K extends string> {
6
6
  to: SpringSnapshot<K>;
7
7
  /** Playback duration in ms. */
8
8
  duration: number;
9
- /** keyframes.js timing function — string name or explicit function. */
10
- timingFunction?: TimingFunction | TimingFunctionNames;
9
+ /**
10
+ * keyframes.js timing function — an explicit callable `(t) => number`.
11
+ *
12
+ * AW.W27: this is a CALLABLE `TimingFunction`, NOT a string easing name.
13
+ * keyframes 4 removed string-name acceptance from `NumericAnimationOptions`
14
+ * (a name now resolves only through the ASYNC `resolveEasing`, which crosses
15
+ * the value.js dynamic boundary the dock/motion light surface must never
16
+ * pull in). Narrowing glass-ui's public option to a callable decouples it
17
+ * from keyframes' name-resolution churn AND is assignable to every supported
18
+ * keyframes major (2.2 / 3 / 4). A consumer wanting a named curve passes the
19
+ * function directly (e.g. `(t) => 1 - Math.pow(1 - t, 3)` for easeOutCubic).
20
+ */
21
+ timingFunction?: TimingFunction;
11
22
  /** Per-frame consumer. Receives the same zero-allocation record each tick. */
12
23
  onFrame?: (values: SpringSnapshot<K>) => void;
13
24
  }
@@ -68,15 +68,20 @@
68
68
  position: relative;
69
69
  display: inline-flex;
70
70
  align-items: center;
71
- /* AV.W16 TW3 — the dock establishes an inline-size container named
72
- `dock` so its descendants (the label glyph, the density rules)
73
- read the dock's OWN box, not the viewport. This makes the dock
74
- portable into a 320px sidebar: the label compresses off the
75
- dock's box width, not `@media`. A consumer that sets the
76
- `containerName` prop overrides the name via inline style (the
77
- explicit container-query opt-in); the default `dock` name backs
78
- the built-in label/density container reads below. */
79
- container: dock / inline-size;
71
+ /* AW.W1 — the dock does NOT establish a default inline-size container.
72
+ `container-type: inline-size` applies `contain: inline-size`, which
73
+ makes an element's inline size INDEPENDENT of its contents fatally
74
+ incompatible with a shrink-to-fit pill: under it `.glass-dock` cannot
75
+ size to its content and collapses to its padding floor (~19px) with the
76
+ active layer overflowing (the 3.3.0 regression every horizontal dock,
77
+ collapsed AND always-expanded, rendered as a sliver). The `dock`-named
78
+ container is now OPT-IN via the `containerName` prop: a consumer
79
+ embedding the dock in a width-CONSTRAINED host (a 320px sidebar) sets
80
+ `containerName="dock"` to get the descendant container-query reads (the
81
+ audacious-label compression below), trading shrink-to-fit for the
82
+ host-constrained width it already has there. The default free-floating
83
+ dock shrink-wraps to its content (AV.W16 TW3 made this a default and
84
+ silently broke dock sizing for the common case). */
80
85
  border-radius: var(--radius-dock);
81
86
  white-space: nowrap;
82
87
  max-inline-size: var(--dock-max-inline-size);
@@ -210,9 +215,13 @@
210
215
  /* Density-audacious narrow-box carve (AV.W16 TW3) — when the dock's OWN
211
216
  box is narrow the audacious-dock label glyphs compress so the chrome
212
217
  doesn't overflow its host (≤14px below 30rem, 15px 30–45rem). Keyed off
213
- the dock's `dock` inline-size container (established on `.glass-dock`
214
- above) rather than the viewport so a dock dropped into a 320px
215
- sidebar compresses its label off ITS box, not the page width. The var
218
+ the dock's `dock` inline-size container now OPT-IN via the
219
+ `containerName="dock"` prop (AW.W1 removed the always-on default that
220
+ broke shrink-to-fit), so it fires only for a dock the consumer has
221
+ width-CONSTRAINED into a host (the 320px sidebar case) where the
222
+ compression is meaningful and the containment does not collapse the box.
223
+ A free-floating dock shrink-wraps (box == content) so there is nothing to
224
+ compress. The var
216
225
  is set on the `.dock-label` descendant (which reads it via
217
226
  `font-size: var(--dock-label-size)`, typography.css). Thresholds keep
218
227
  the prior 479/719px viewport cadence as box widths (30rem ≈ 480px,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mkbabb/glass-ui",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "Glassmorphic design system — Vue 3.5 components, reka-ui primitives, Tailwind CSS v4 tokens",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -546,6 +546,7 @@
546
546
  "proof:theme": "node scripts/proof-theme-style.mjs",
547
547
  "proof:components-css": "node scripts/proof-components-css.mjs",
548
548
  "proof:resolution": "node scripts/proof-resolution-contract.mjs",
549
+ "proof:peer-conformance": "node scripts/proof-peer-conformance.mjs",
549
550
  "proof:phantom-classes": "node scripts/proof-phantom-classes.mjs",
550
551
  "proof:vt-names": "node scripts/proof-vt-names.mjs",
551
552
  "proof:dock-animation-live": "node scripts/proof-dock-animation-live.mjs",
@@ -612,8 +613,8 @@
612
613
  },
613
614
  "peerDependencies": {
614
615
  "@lucide/vue": "^1.16.0",
615
- "@mkbabb/keyframes.js": "^2.2.0 || ^3.0.0",
616
- "@mkbabb/value.js": "^0.10.0",
616
+ "@mkbabb/keyframes.js": "^2.2.0 || ^3.0.0 || ^4.0.0",
617
+ "@mkbabb/value.js": "^0.10.0 || ^0.11.0",
617
618
  "@vueuse/core": "^14.0",
618
619
  "class-variance-authority": "^0.7",
619
620
  "clsx": "^2.0",
@@ -68,15 +68,20 @@
68
68
  position: relative;
69
69
  display: inline-flex;
70
70
  align-items: center;
71
- /* AV.W16 TW3 — the dock establishes an inline-size container named
72
- `dock` so its descendants (the label glyph, the density rules)
73
- read the dock's OWN box, not the viewport. This makes the dock
74
- portable into a 320px sidebar: the label compresses off the
75
- dock's box width, not `@media`. A consumer that sets the
76
- `containerName` prop overrides the name via inline style (the
77
- explicit container-query opt-in); the default `dock` name backs
78
- the built-in label/density container reads below. */
79
- container: dock / inline-size;
71
+ /* AW.W1 — the dock does NOT establish a default inline-size container.
72
+ `container-type: inline-size` applies `contain: inline-size`, which
73
+ makes an element's inline size INDEPENDENT of its contents fatally
74
+ incompatible with a shrink-to-fit pill: under it `.glass-dock` cannot
75
+ size to its content and collapses to its padding floor (~19px) with the
76
+ active layer overflowing (the 3.3.0 regression every horizontal dock,
77
+ collapsed AND always-expanded, rendered as a sliver). The `dock`-named
78
+ container is now OPT-IN via the `containerName` prop: a consumer
79
+ embedding the dock in a width-CONSTRAINED host (a 320px sidebar) sets
80
+ `containerName="dock"` to get the descendant container-query reads (the
81
+ audacious-label compression below), trading shrink-to-fit for the
82
+ host-constrained width it already has there. The default free-floating
83
+ dock shrink-wraps to its content (AV.W16 TW3 made this a default and
84
+ silently broke dock sizing for the common case). */
80
85
  border-radius: var(--radius-dock);
81
86
  white-space: nowrap;
82
87
  max-inline-size: var(--dock-max-inline-size);
@@ -210,9 +215,13 @@
210
215
  /* Density-audacious narrow-box carve (AV.W16 TW3) — when the dock's OWN
211
216
  box is narrow the audacious-dock label glyphs compress so the chrome
212
217
  doesn't overflow its host (≤14px below 30rem, 15px 30–45rem). Keyed off
213
- the dock's `dock` inline-size container (established on `.glass-dock`
214
- above) rather than the viewport so a dock dropped into a 320px
215
- sidebar compresses its label off ITS box, not the page width. The var
218
+ the dock's `dock` inline-size container now OPT-IN via the
219
+ `containerName="dock"` prop (AW.W1 removed the always-on default that
220
+ broke shrink-to-fit), so it fires only for a dock the consumer has
221
+ width-CONSTRAINED into a host (the 320px sidebar case) where the
222
+ compression is meaningful and the containment does not collapse the box.
223
+ A free-floating dock shrink-wraps (box == content) so there is nothing to
224
+ compress. The var
216
225
  is set on the `.dock-label` descendant (which reads it via
217
226
  `font-size: var(--dock-label-size)`, typography.css). Thresholds keep
218
227
  the prior 479/719px viewport cadence as box widths (30rem ≈ 480px,