@hanzo/ui 8.27.2 → 8.27.4

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.
Files changed (60) hide show
  1. package/dist/backdrop/Backdrop.cjs +420 -0
  2. package/dist/backdrop/Backdrop.d.ts +53 -0
  3. package/dist/backdrop/Backdrop.d.ts.map +1 -0
  4. package/dist/backdrop/Backdrop.js +418 -0
  5. package/dist/backdrop/Backdrop.js.map +1 -0
  6. package/dist/backdrop/index.cjs +50 -0
  7. package/dist/backdrop/index.d.ts +29 -0
  8. package/dist/backdrop/index.d.ts.map +1 -0
  9. package/dist/backdrop/index.js +29 -0
  10. package/dist/backdrop/index.js.map +1 -0
  11. package/dist/backdrop/scene.cjs +439 -0
  12. package/dist/backdrop/scene.d.ts +235 -0
  13. package/dist/backdrop/scene.d.ts.map +1 -0
  14. package/dist/backdrop/scene.js +423 -0
  15. package/dist/backdrop/scene.js.map +1 -0
  16. package/dist/chat/Chat.cjs +23 -1
  17. package/dist/chat/Chat.d.ts +6 -3
  18. package/dist/chat/Chat.d.ts.map +1 -1
  19. package/dist/chat/Chat.js +23 -1
  20. package/dist/chat/Chat.js.map +1 -1
  21. package/dist/chat/Inspector.cjs +51 -0
  22. package/dist/chat/Inspector.d.ts +49 -0
  23. package/dist/chat/Inspector.d.ts.map +1 -0
  24. package/dist/chat/Inspector.js +49 -0
  25. package/dist/chat/Inspector.js.map +1 -0
  26. package/dist/chat/Message.cjs +3 -1
  27. package/dist/chat/Message.d.ts +3 -1
  28. package/dist/chat/Message.d.ts.map +1 -1
  29. package/dist/chat/Message.js +3 -1
  30. package/dist/chat/Message.js.map +1 -1
  31. package/dist/chat/Parts.cjs +159 -0
  32. package/dist/chat/Parts.d.ts +186 -0
  33. package/dist/chat/Parts.d.ts.map +1 -0
  34. package/dist/chat/Parts.js +153 -0
  35. package/dist/chat/Parts.js.map +1 -0
  36. package/dist/chat/Persona.cjs +34 -0
  37. package/dist/chat/Persona.d.ts +37 -0
  38. package/dist/chat/Persona.d.ts.map +1 -0
  39. package/dist/chat/Persona.js +30 -0
  40. package/dist/chat/Persona.js.map +1 -0
  41. package/dist/chat/Preview.cjs +42 -0
  42. package/dist/chat/Preview.d.ts +36 -0
  43. package/dist/chat/Preview.d.ts.map +1 -0
  44. package/dist/chat/Preview.js +40 -0
  45. package/dist/chat/Preview.js.map +1 -0
  46. package/dist/chat/directive.cjs +272 -0
  47. package/dist/chat/directive.d.ts +167 -0
  48. package/dist/chat/directive.d.ts.map +1 -0
  49. package/dist/chat/directive.js +266 -0
  50. package/dist/chat/directive.js.map +1 -0
  51. package/dist/chat/index.cjs +59 -4
  52. package/dist/chat/index.d.ts +31 -3
  53. package/dist/chat/index.d.ts.map +1 -1
  54. package/dist/chat/index.js +31 -3
  55. package/dist/chat/index.js.map +1 -1
  56. package/dist/gallery.html +35 -4
  57. package/dist/glass.css +31 -0
  58. package/dist/styles.css +34 -3
  59. package/dist/theme.css +34 -3
  60. package/package.json +7 -1
package/dist/styles.css CHANGED
@@ -1368,7 +1368,7 @@
1368
1368
  .hz-prose > h1, .hz-prose > h2, .hz-prose > h3,
1369
1369
  .hz-prose > h4, .hz-prose > h5, .hz-prose > h6 {
1370
1370
  font-family: var(--font-display, var(--font-sans)), sans-serif;
1371
- font-weight: 600;
1371
+ font-weight: 606;
1372
1372
  line-height: var(--leading-tight);
1373
1373
  letter-spacing: var(--tracking-tight);
1374
1374
  margin: 0;
@@ -1384,7 +1384,7 @@
1384
1384
  stack. */
1385
1385
  .hz-prose > h6 {
1386
1386
  font-size: var(--text-base);
1387
- font-weight: 400;
1387
+ font-weight: 497;
1388
1388
  color: var(--muted-foreground);
1389
1389
  }
1390
1390
 
@@ -1432,7 +1432,7 @@
1432
1432
  font-size: 0.9em;
1433
1433
  }
1434
1434
  .hz-prose a { color: inherit; text-decoration: underline }
1435
- .hz-prose strong { font-weight: 600 }
1435
+ .hz-prose strong { font-weight: 606 }
1436
1436
  .hz-prose :where(img, video) { max-width: 100%; height: auto }
1437
1437
 
1438
1438
  /* The named rungs. `responsive` is the default and is the only one that moves
@@ -1997,6 +1997,37 @@
1997
1997
  }
1998
1998
  }
1999
1999
 
2000
+ /* FOCUS RINGS THE CONTROL A PERSON SEES, WHICH IS THE WHOLE COMPOSER.
2001
+
2002
+ `Composer` is a bordered box holding a field above a toolbar row, so it reads
2003
+ as one control the way a chat composer everywhere does. The field inside it is
2004
+ an ordinary textarea, so the indicator was drawn round the field alone: a
2005
+ second rounded rectangle nested inside the box, stopping above the mic and the
2006
+ send button, which reads as the top half being selected. WCAG 2.4.11 asks the
2007
+ indicator to enclose the control, and the control here is the composer.
2008
+
2009
+ THE FIELD DOES NOT ABSTAIN, and control.ts is right that it must not: gui
2010
+ compiles `focusVisibleStyle` to `:root:root:root:root … !important`, past any
2011
+ sheet, so a field that says `outlineWidth: 0` deletes the indicator on every
2012
+ surface at once. What gui declares is `outline-color: var(--outlineColor)` —
2013
+ a VARIABLE — so the colour is re-pointed for this one field instead, in the
2014
+ same breath as the host taking the ring up. The declaration gui emits is
2015
+ untouched and `focus.test.tsx` still reads it.
2016
+
2017
+ Both rules turn on the SAME condition, which is what makes it safe: where
2018
+ `:has` is unsupported neither applies and the field keeps drawing its own
2019
+ ring, so no browser reaches a state with a focused composer and no indicator
2020
+ anywhere. */
2021
+ [data-slot='composer']:has([data-slot='composer-field']:focus-visible) {
2022
+ outline: 2px solid var(--ring);
2023
+ outline-offset: 2px;
2024
+ }
2025
+
2026
+ [data-slot='composer']:has([data-slot='composer-field']:focus-visible)
2027
+ [data-slot='composer-field'] {
2028
+ --outlineColor: transparent;
2029
+ }
2030
+
2000
2031
  [stylesheet-group="0"]{}
2001
2032
  body{margin:0;}
2002
2033
  button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
package/dist/theme.css CHANGED
@@ -1366,7 +1366,7 @@
1366
1366
  .hz-prose > h1, .hz-prose > h2, .hz-prose > h3,
1367
1367
  .hz-prose > h4, .hz-prose > h5, .hz-prose > h6 {
1368
1368
  font-family: var(--font-display, var(--font-sans)), sans-serif;
1369
- font-weight: 600;
1369
+ font-weight: 606;
1370
1370
  line-height: var(--leading-tight);
1371
1371
  letter-spacing: var(--tracking-tight);
1372
1372
  margin: 0;
@@ -1382,7 +1382,7 @@
1382
1382
  stack. */
1383
1383
  .hz-prose > h6 {
1384
1384
  font-size: var(--text-base);
1385
- font-weight: 400;
1385
+ font-weight: 497;
1386
1386
  color: var(--muted-foreground);
1387
1387
  }
1388
1388
 
@@ -1430,7 +1430,7 @@
1430
1430
  font-size: 0.9em;
1431
1431
  }
1432
1432
  .hz-prose a { color: inherit; text-decoration: underline }
1433
- .hz-prose strong { font-weight: 600 }
1433
+ .hz-prose strong { font-weight: 606 }
1434
1434
  .hz-prose :where(img, video) { max-width: 100%; height: auto }
1435
1435
 
1436
1436
  /* The named rungs. `responsive` is the default and is the only one that moves
@@ -1994,3 +1994,34 @@
1994
1994
  animation: none;
1995
1995
  }
1996
1996
  }
1997
+
1998
+ /* FOCUS RINGS THE CONTROL A PERSON SEES, WHICH IS THE WHOLE COMPOSER.
1999
+
2000
+ `Composer` is a bordered box holding a field above a toolbar row, so it reads
2001
+ as one control the way a chat composer everywhere does. The field inside it is
2002
+ an ordinary textarea, so the indicator was drawn round the field alone: a
2003
+ second rounded rectangle nested inside the box, stopping above the mic and the
2004
+ send button, which reads as the top half being selected. WCAG 2.4.11 asks the
2005
+ indicator to enclose the control, and the control here is the composer.
2006
+
2007
+ THE FIELD DOES NOT ABSTAIN, and control.ts is right that it must not: gui
2008
+ compiles `focusVisibleStyle` to `:root:root:root:root … !important`, past any
2009
+ sheet, so a field that says `outlineWidth: 0` deletes the indicator on every
2010
+ surface at once. What gui declares is `outline-color: var(--outlineColor)` —
2011
+ a VARIABLE — so the colour is re-pointed for this one field instead, in the
2012
+ same breath as the host taking the ring up. The declaration gui emits is
2013
+ untouched and `focus.test.tsx` still reads it.
2014
+
2015
+ Both rules turn on the SAME condition, which is what makes it safe: where
2016
+ `:has` is unsupported neither applies and the field keeps drawing its own
2017
+ ring, so no browser reaches a state with a focused composer and no indicator
2018
+ anywhere. */
2019
+ [data-slot='composer']:has([data-slot='composer-field']:focus-visible) {
2020
+ outline: 2px solid var(--ring);
2021
+ outline-offset: 2px;
2022
+ }
2023
+
2024
+ [data-slot='composer']:has([data-slot='composer-field']:focus-visible)
2025
+ [data-slot='composer-field'] {
2026
+ --outlineColor: transparent;
2027
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "8.27.2",
3
+ "version": "8.27.4",
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": {
@@ -39,6 +39,12 @@
39
39
  "require": "./dist/chat/index.cjs",
40
40
  "default": "./dist/chat/index.js"
41
41
  },
42
+ "./backdrop": {
43
+ "types": "./dist/backdrop/index.d.ts",
44
+ "import": "./dist/backdrop/index.js",
45
+ "require": "./dist/backdrop/index.cjs",
46
+ "default": "./dist/backdrop/index.js"
47
+ },
42
48
  "./chat/pure": {
43
49
  "types": "./dist/chat/pure.d.ts",
44
50
  "import": "./dist/chat/pure.js",