@hanzo/ui 8.0.51 → 8.0.52

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/dist/glass.css CHANGED
@@ -17,6 +17,18 @@
17
17
  * declaration (an undefined var() invalidates the whole property). They are a
18
18
  * mirror, not a second opinion — glass.test.ts reads @hanzo/design/styles.css
19
19
  * and fails if any of them stops matching, so the copy cannot drift.
20
+ *
21
+ * Reached BY ROLE, never by size. A role name (--edge-highlight,
22
+ * --surface-scrim) is coined for one job and only design declares it. The
23
+ * t-shirt ramp — --shadow-sm/md/lg/xl — is the opposite: a generic scale that
24
+ * every token package ships, and @hanzo/brand ships one too, at :root, tuned
25
+ * for a WHITE canvas (.05/.1 against design's .40/.55). Same names, same
26
+ * specificity, so the winner is whichever sheet the bundler ordered last, and
27
+ * it was brand. A declared variable also beats a var() fallback outright — so
28
+ * the mirror above could not save the rungs that read a ramp name, and on
29
+ * #080808 their drops resolved to a shadow you cannot see. The lit edge kept
30
+ * the ladder from vanishing, which is why it read as flat rather than as
31
+ * broken. The ladder therefore declares its own drops below; see there.
20
32
  */
21
33
 
22
34
  /* ── The material ───────────────────────────────────────────────────────────
@@ -77,11 +89,44 @@
77
89
 
78
90
  Glass over glass (a select opened inside a dialog) is deliberately left to
79
91
  stack: two 72% grounds land near 92%, so the nested surface reads as MORE
80
- solid than its parent, which is the right answer and the one macOS gives. */
92
+ solid than its parent, which is the right answer and the one macOS gives.
93
+
94
+ ── The rungs' drops are this package's own, and that is the fix ────────────
95
+ A rung used to read the ramp by size — var(--shadow-sm | --shadow-lg) — and
96
+ a name you do not own is a value somebody else gets to set. @hanzo/brand
97
+ sets exactly those, at :root, for a white canvas, and won on load order.
98
+ Three values are three names, so they are declared here: nothing else ships
99
+ a --glass-shadow-*, so no sheet can outrank them and no load order can
100
+ change the answer. A theme that wants a different ladder declares these
101
+ three and gets one; that is a hook, where reading the ramp was an accident.
102
+
103
+ Only the DROP is owned. --edge-highlight stays design's, because it is
104
+ role-named, uncollided, and design's `.light` zeroing of it is the half of
105
+ the composition that makes one rule work on both canvases.
106
+
107
+ Both themes are stated for the same reason design states them: on white the
108
+ drop does all the work and must be light enough not to smudge, on near-black
109
+ it must be heavy enough to exist at all. The values are design's own, and
110
+ glass.test.ts fails if either column stops matching what design publishes.
111
+ `:root.t_light` alongside `.light` is gui's spelling of the same idea —
112
+ compose-theme teaches design's sheet that alias, and this file, which also
113
+ ships on its own, says it outright. */
114
+ :root {
115
+ --glass-shadow-1: 0 1px 2px 0 rgb(0 0 0 / .40);
116
+ --glass-shadow-2: 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55);
117
+ --glass-shadow-3: 0 24px 60px -16px rgb(0 0 0 / .75);
118
+ }
119
+
120
+ .light, :root.t_light {
121
+ --glass-shadow-1: 0 1px 2px 0 rgb(0 0 0 / .06);
122
+ --glass-shadow-2: 0 10px 15px -3px rgb(0 0 0 / .09), 0 4px 6px -4px rgb(0 0 0 / .07);
123
+ --glass-shadow-3: 0 24px 60px -16px rgb(0 0 0 / .18);
124
+ }
125
+
81
126
  .elevation-1 {
82
127
  box-shadow:
83
128
  var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
84
- var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .40)) !important;
129
+ var(--glass-shadow-1) !important;
85
130
  }
86
131
 
87
132
  .elevation-2,
@@ -92,14 +137,14 @@
92
137
  [data-slot="tooltip-content"] {
93
138
  box-shadow:
94
139
  var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
95
- var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55)) !important;
140
+ var(--glass-shadow-2) !important;
96
141
  }
97
142
 
98
143
  .elevation-3,
99
144
  [data-slot="dialog-content"] {
100
145
  box-shadow:
101
146
  var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
102
- var(--shadow-floating, 0 24px 60px -16px rgb(0 0 0 / .75)) !important;
147
+ var(--glass-shadow-3) !important;
103
148
  }
104
149
 
105
150
  /* ── The scrim ──────────────────────────────────────────────────────────────
@@ -158,16 +158,22 @@
158
158
  }
159
159
 
160
160
  /* Paper — a ringed sheet: the ladder's lit edge and drop, plus a hairline all
161
- the way round. The three values are @hanzo/design's, reached by their real
162
- names. They used to be `--hz-ring` / `--hz-paper-highlight` /
163
- `--hz-elevation-3`, none of which is defined in this repo, in @hanzo/design
164
- or in any consumer — so all three resolved to hardcoded fallbacks, and the
165
- comment above promising that "a host that defines its own --hz-* tokens still
166
- wins" described a hook nobody could reach. */
161
+ the way round. The three values are reached by their real names. They used to
162
+ be `--hz-ring` / `--hz-paper-highlight` / `--hz-elevation-3`, none of which is
163
+ defined in this repo, in @hanzo/design or in any consumer — so all three
164
+ resolved to hardcoded fallbacks, and the comment above promising that "a host
165
+ that defines its own --hz-* tokens still wins" described a hook nobody could
166
+ reach.
167
+
168
+ The drop is rung 2's, by the ladder's own name. It read `--shadow-lg` — a
169
+ t-shirt size @hanzo/brand also declares, for a white canvas, winning on load
170
+ order — so paper lost its drop on dark exactly the way the rungs did. The
171
+ fallback stays because this sheet ships on its own: a host that imports
172
+ motion.css without glass.css has no ladder to read. */
167
173
  .paper {
168
174
  box-shadow: var(--shadow-inset-hairline, inset 0 0 0 1px rgb(255 255 255 / .10)),
169
175
  var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
170
- var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55));
176
+ var(--glass-shadow-2, 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55));
171
177
  }
172
178
 
173
179
  @keyframes menu-in {
package/dist/styles.css CHANGED
@@ -1095,6 +1095,18 @@
1095
1095
  * declaration (an undefined var() invalidates the whole property). They are a
1096
1096
  * mirror, not a second opinion — glass.test.ts reads @hanzo/design/styles.css
1097
1097
  * and fails if any of them stops matching, so the copy cannot drift.
1098
+ *
1099
+ * Reached BY ROLE, never by size. A role name (--edge-highlight,
1100
+ * --surface-scrim) is coined for one job and only design declares it. The
1101
+ * t-shirt ramp — --shadow-sm/md/lg/xl — is the opposite: a generic scale that
1102
+ * every token package ships, and @hanzo/brand ships one too, at :root, tuned
1103
+ * for a WHITE canvas (.05/.1 against design's .40/.55). Same names, same
1104
+ * specificity, so the winner is whichever sheet the bundler ordered last, and
1105
+ * it was brand. A declared variable also beats a var() fallback outright — so
1106
+ * the mirror above could not save the rungs that read a ramp name, and on
1107
+ * #080808 their drops resolved to a shadow you cannot see. The lit edge kept
1108
+ * the ladder from vanishing, which is why it read as flat rather than as
1109
+ * broken. The ladder therefore declares its own drops below; see there.
1098
1110
  */
1099
1111
 
1100
1112
  /* ── The material ───────────────────────────────────────────────────────────
@@ -1155,11 +1167,44 @@
1155
1167
 
1156
1168
  Glass over glass (a select opened inside a dialog) is deliberately left to
1157
1169
  stack: two 72% grounds land near 92%, so the nested surface reads as MORE
1158
- solid than its parent, which is the right answer and the one macOS gives. */
1170
+ solid than its parent, which is the right answer and the one macOS gives.
1171
+
1172
+ ── The rungs' drops are this package's own, and that is the fix ────────────
1173
+ A rung used to read the ramp by size — var(--shadow-sm | --shadow-lg) — and
1174
+ a name you do not own is a value somebody else gets to set. @hanzo/brand
1175
+ sets exactly those, at :root, for a white canvas, and won on load order.
1176
+ Three values are three names, so they are declared here: nothing else ships
1177
+ a --glass-shadow-*, so no sheet can outrank them and no load order can
1178
+ change the answer. A theme that wants a different ladder declares these
1179
+ three and gets one; that is a hook, where reading the ramp was an accident.
1180
+
1181
+ Only the DROP is owned. --edge-highlight stays design's, because it is
1182
+ role-named, uncollided, and design's `.light` zeroing of it is the half of
1183
+ the composition that makes one rule work on both canvases.
1184
+
1185
+ Both themes are stated for the same reason design states them: on white the
1186
+ drop does all the work and must be light enough not to smudge, on near-black
1187
+ it must be heavy enough to exist at all. The values are design's own, and
1188
+ glass.test.ts fails if either column stops matching what design publishes.
1189
+ `:root.t_light` alongside `.light` is gui's spelling of the same idea —
1190
+ compose-theme teaches design's sheet that alias, and this file, which also
1191
+ ships on its own, says it outright. */
1192
+ :root {
1193
+ --glass-shadow-1: 0 1px 2px 0 rgb(0 0 0 / .40);
1194
+ --glass-shadow-2: 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55);
1195
+ --glass-shadow-3: 0 24px 60px -16px rgb(0 0 0 / .75);
1196
+ }
1197
+
1198
+ .light, :root.t_light {
1199
+ --glass-shadow-1: 0 1px 2px 0 rgb(0 0 0 / .06);
1200
+ --glass-shadow-2: 0 10px 15px -3px rgb(0 0 0 / .09), 0 4px 6px -4px rgb(0 0 0 / .07);
1201
+ --glass-shadow-3: 0 24px 60px -16px rgb(0 0 0 / .18);
1202
+ }
1203
+
1159
1204
  .elevation-1 {
1160
1205
  box-shadow:
1161
1206
  var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
1162
- var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .40)) !important;
1207
+ var(--glass-shadow-1) !important;
1163
1208
  }
1164
1209
 
1165
1210
  .elevation-2,
@@ -1170,14 +1215,14 @@
1170
1215
  [data-slot="tooltip-content"] {
1171
1216
  box-shadow:
1172
1217
  var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
1173
- var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55)) !important;
1218
+ var(--glass-shadow-2) !important;
1174
1219
  }
1175
1220
 
1176
1221
  .elevation-3,
1177
1222
  [data-slot="dialog-content"] {
1178
1223
  box-shadow:
1179
1224
  var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
1180
- var(--shadow-floating, 0 24px 60px -16px rgb(0 0 0 / .75)) !important;
1225
+ var(--glass-shadow-3) !important;
1181
1226
  }
1182
1227
 
1183
1228
  /* ── The scrim ──────────────────────────────────────────────────────────────
@@ -1377,16 +1422,22 @@
1377
1422
  }
1378
1423
 
1379
1424
  /* Paper — a ringed sheet: the ladder's lit edge and drop, plus a hairline all
1380
- the way round. The three values are @hanzo/design's, reached by their real
1381
- names. They used to be `--hz-ring` / `--hz-paper-highlight` /
1382
- `--hz-elevation-3`, none of which is defined in this repo, in @hanzo/design
1383
- or in any consumer — so all three resolved to hardcoded fallbacks, and the
1384
- comment above promising that "a host that defines its own --hz-* tokens still
1385
- wins" described a hook nobody could reach. */
1425
+ the way round. The three values are reached by their real names. They used to
1426
+ be `--hz-ring` / `--hz-paper-highlight` / `--hz-elevation-3`, none of which is
1427
+ defined in this repo, in @hanzo/design or in any consumer — so all three
1428
+ resolved to hardcoded fallbacks, and the comment above promising that "a host
1429
+ that defines its own --hz-* tokens still wins" described a hook nobody could
1430
+ reach.
1431
+
1432
+ The drop is rung 2's, by the ladder's own name. It read `--shadow-lg` — a
1433
+ t-shirt size @hanzo/brand also declares, for a white canvas, winning on load
1434
+ order — so paper lost its drop on dark exactly the way the rungs did. The
1435
+ fallback stays because this sheet ships on its own: a host that imports
1436
+ motion.css without glass.css has no ladder to read. */
1386
1437
  .paper {
1387
1438
  box-shadow: var(--shadow-inset-hairline, inset 0 0 0 1px rgb(255 255 255 / .10)),
1388
1439
  var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
1389
- var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55));
1440
+ var(--glass-shadow-2, 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55));
1390
1441
  }
1391
1442
 
1392
1443
  @keyframes menu-in {
package/dist/theme.css CHANGED
@@ -1093,6 +1093,18 @@
1093
1093
  * declaration (an undefined var() invalidates the whole property). They are a
1094
1094
  * mirror, not a second opinion — glass.test.ts reads @hanzo/design/styles.css
1095
1095
  * and fails if any of them stops matching, so the copy cannot drift.
1096
+ *
1097
+ * Reached BY ROLE, never by size. A role name (--edge-highlight,
1098
+ * --surface-scrim) is coined for one job and only design declares it. The
1099
+ * t-shirt ramp — --shadow-sm/md/lg/xl — is the opposite: a generic scale that
1100
+ * every token package ships, and @hanzo/brand ships one too, at :root, tuned
1101
+ * for a WHITE canvas (.05/.1 against design's .40/.55). Same names, same
1102
+ * specificity, so the winner is whichever sheet the bundler ordered last, and
1103
+ * it was brand. A declared variable also beats a var() fallback outright — so
1104
+ * the mirror above could not save the rungs that read a ramp name, and on
1105
+ * #080808 their drops resolved to a shadow you cannot see. The lit edge kept
1106
+ * the ladder from vanishing, which is why it read as flat rather than as
1107
+ * broken. The ladder therefore declares its own drops below; see there.
1096
1108
  */
1097
1109
 
1098
1110
  /* ── The material ───────────────────────────────────────────────────────────
@@ -1153,11 +1165,44 @@
1153
1165
 
1154
1166
  Glass over glass (a select opened inside a dialog) is deliberately left to
1155
1167
  stack: two 72% grounds land near 92%, so the nested surface reads as MORE
1156
- solid than its parent, which is the right answer and the one macOS gives. */
1168
+ solid than its parent, which is the right answer and the one macOS gives.
1169
+
1170
+ ── The rungs' drops are this package's own, and that is the fix ────────────
1171
+ A rung used to read the ramp by size — var(--shadow-sm | --shadow-lg) — and
1172
+ a name you do not own is a value somebody else gets to set. @hanzo/brand
1173
+ sets exactly those, at :root, for a white canvas, and won on load order.
1174
+ Three values are three names, so they are declared here: nothing else ships
1175
+ a --glass-shadow-*, so no sheet can outrank them and no load order can
1176
+ change the answer. A theme that wants a different ladder declares these
1177
+ three and gets one; that is a hook, where reading the ramp was an accident.
1178
+
1179
+ Only the DROP is owned. --edge-highlight stays design's, because it is
1180
+ role-named, uncollided, and design's `.light` zeroing of it is the half of
1181
+ the composition that makes one rule work on both canvases.
1182
+
1183
+ Both themes are stated for the same reason design states them: on white the
1184
+ drop does all the work and must be light enough not to smudge, on near-black
1185
+ it must be heavy enough to exist at all. The values are design's own, and
1186
+ glass.test.ts fails if either column stops matching what design publishes.
1187
+ `:root.t_light` alongside `.light` is gui's spelling of the same idea —
1188
+ compose-theme teaches design's sheet that alias, and this file, which also
1189
+ ships on its own, says it outright. */
1190
+ :root {
1191
+ --glass-shadow-1: 0 1px 2px 0 rgb(0 0 0 / .40);
1192
+ --glass-shadow-2: 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55);
1193
+ --glass-shadow-3: 0 24px 60px -16px rgb(0 0 0 / .75);
1194
+ }
1195
+
1196
+ .light, :root.t_light {
1197
+ --glass-shadow-1: 0 1px 2px 0 rgb(0 0 0 / .06);
1198
+ --glass-shadow-2: 0 10px 15px -3px rgb(0 0 0 / .09), 0 4px 6px -4px rgb(0 0 0 / .07);
1199
+ --glass-shadow-3: 0 24px 60px -16px rgb(0 0 0 / .18);
1200
+ }
1201
+
1157
1202
  .elevation-1 {
1158
1203
  box-shadow:
1159
1204
  var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
1160
- var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .40)) !important;
1205
+ var(--glass-shadow-1) !important;
1161
1206
  }
1162
1207
 
1163
1208
  .elevation-2,
@@ -1168,14 +1213,14 @@
1168
1213
  [data-slot="tooltip-content"] {
1169
1214
  box-shadow:
1170
1215
  var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
1171
- var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55)) !important;
1216
+ var(--glass-shadow-2) !important;
1172
1217
  }
1173
1218
 
1174
1219
  .elevation-3,
1175
1220
  [data-slot="dialog-content"] {
1176
1221
  box-shadow:
1177
1222
  var(--edge-highlight, inset 0 1px 0 0 rgb(255 255 255 / .10)),
1178
- var(--shadow-floating, 0 24px 60px -16px rgb(0 0 0 / .75)) !important;
1223
+ var(--glass-shadow-3) !important;
1179
1224
  }
1180
1225
 
1181
1226
  /* ── The scrim ──────────────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "8.0.51",
3
+ "version": "8.0.52",
4
4
  "type": "module",
5
5
  "description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
6
6
  "exports": {