@hanzo/ui 8.0.51 → 8.0.53

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/theme.css CHANGED
@@ -227,7 +227,7 @@
227
227
  So EVERY token whose dark value is a --white-* rung must be restated below,
228
228
  and check-tokens.mjs fails the build if one is missed — that class of bug is
229
229
  silent (the border simply stops existing) and has shipped before. */
230
- .light, :root.t_light{
230
+ .light, :root.t_light, .t_light{
231
231
  color-scheme:light;
232
232
  --background:#ffffff;
233
233
  --foreground:#0a0a0a;
@@ -606,7 +606,7 @@
606
606
  obvious spelling would invalidate the whole declaration and take the drop
607
607
  shadow down with it. A zero-size transparent shadow composes to nothing and
608
608
  costs nothing. */
609
- .light, :root.t_light{
609
+ .light, :root.t_light, .t_light{
610
610
  --shadow-floating:0 24px 60px -16px rgb(0 0 0 / .18);
611
611
  --shadow-inset-hairline:inset 0 0 0 1px rgb(0 0 0 / .10);
612
612
  --edge-highlight:inset 0 0 0 0 transparent;
@@ -893,7 +893,7 @@
893
893
  stays INSIDE the layer — an unlayered rule here would outrank an app's own
894
894
  utilities, which is the defect check 1c exists to catch. */
895
895
  :where(html){scrollbar-color:var(--white-15) transparent;scrollbar-width:thin}
896
- .light, :root.t_light{scrollbar-color:rgb(0 0 0 / .18) transparent}
896
+ .light, :root.t_light, .t_light{scrollbar-color:rgb(0 0 0 / .18) transparent}
897
897
  :where(*)::-webkit-scrollbar{width:6px;height:6px}
898
898
  :where(*)::-webkit-scrollbar-track{background:transparent}
899
899
  :where(*)::-webkit-scrollbar-thumb{background:var(--white-15);border-radius:var(--radius-full)}
@@ -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,47 @@
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` and `.t_light` alongside `.light` are gui's spelling of the
1188
+ same idea — compose-theme teaches design's sheet those aliases, and this
1189
+ file, which also ships on its own, says them outright. The bare class is for
1190
+ a NESTED light scope: gui puts `t_light` on a span for `<Theme name="light">`
1191
+ inside a dark app, which `:root.t_light` cannot match, so without it a light
1192
+ island stood on the dark ladder. */
1193
+ :root {
1194
+ --glass-shadow-1: 0 1px 2px 0 rgb(0 0 0 / .40);
1195
+ --glass-shadow-2: 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55);
1196
+ --glass-shadow-3: 0 24px 60px -16px rgb(0 0 0 / .75);
1197
+ }
1198
+
1199
+ .light, :root.t_light, .t_light {
1200
+ --glass-shadow-1: 0 1px 2px 0 rgb(0 0 0 / .06);
1201
+ --glass-shadow-2: 0 10px 15px -3px rgb(0 0 0 / .09), 0 4px 6px -4px rgb(0 0 0 / .07);
1202
+ --glass-shadow-3: 0 24px 60px -16px rgb(0 0 0 / .18);
1203
+ }
1204
+
1157
1205
  .elevation-1 {
1158
1206
  box-shadow:
1159
1207
  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;
1208
+ var(--glass-shadow-1) !important;
1161
1209
  }
1162
1210
 
1163
1211
  .elevation-2,
@@ -1168,14 +1216,14 @@
1168
1216
  [data-slot="tooltip-content"] {
1169
1217
  box-shadow:
1170
1218
  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;
1219
+ var(--glass-shadow-2) !important;
1172
1220
  }
1173
1221
 
1174
1222
  .elevation-3,
1175
1223
  [data-slot="dialog-content"] {
1176
1224
  box-shadow:
1177
1225
  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;
1226
+ var(--glass-shadow-3) !important;
1179
1227
  }
1180
1228
 
1181
1229
  /* ── The scrim ──────────────────────────────────────────────────────────────
@@ -1187,10 +1235,19 @@
1187
1235
 
1188
1236
  One value, in one place: the recipes module reads the same token, so the dim
1189
1237
  behind a component dialog and the dim behind a hand-rolled one are the same
1190
- dim by construction rather than by two people remembering a number. */
1238
+ dim by construction rather than by two people remembering a number.
1239
+
1240
+ !important for the same reason the material above carries it, and it was
1241
+ missing here: gui compiles `opacity` and `background-color` into atomic
1242
+ classes (`_o-0--5`, `_bg-rgba0000--538295333`) that land in an inline <style>
1243
+ a bundler orders AFTER this sheet, so at equal specificity they won and the
1244
+ rule read as if it had never been written. Measured on hanzo.app's ⌘K
1245
+ palette: `rgba(0,0,0,.5)` under `opacity: .5` — a quarter black, exactly the
1246
+ double dim these two lines exist to end. A rule written to beat a compiled
1247
+ class has to be written with the weight to beat one. */
1191
1248
  [data-slot="dialog-overlay"] {
1192
- opacity: 1;
1193
- background-color: var(--surface-scrim, rgb(0 0 0 / .8));
1249
+ opacity: 1 !important;
1250
+ background-color: var(--surface-scrim, rgb(0 0 0 / .8)) !important;
1194
1251
  }
1195
1252
 
1196
1253
  /* ── Grouped rows ───────────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "8.0.51",
3
+ "version": "8.0.53",
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": {