@jcsoftdev/ui 0.2.3 → 0.3.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.
Files changed (375) hide show
  1. package/CHANGELOG.md +288 -7
  2. package/README.md +2 -1
  3. package/bin/ui-theme.mjs +1151 -25
  4. package/dist/ai/attachment/attachment.js +1 -1
  5. package/dist/ai/chat-list/group.js +3 -1
  6. package/dist/ai/conversation/conversation.js +1 -1
  7. package/dist/ai/internal/use-copy.d.ts +1 -5
  8. package/dist/ai/internal/use-copy.js +1 -32
  9. package/dist/ai/markdown/parse.js +59 -17
  10. package/dist/ai/source/source.js +1 -1
  11. package/dist/atoms/avatar/avatar.d.ts +13 -3
  12. package/dist/atoms/avatar/avatar.js +40 -2
  13. package/dist/atoms/avatar/index.d.ts +1 -1
  14. package/dist/atoms/avatar/index.js +3 -1
  15. package/dist/atoms/button/button.d.ts +4 -1
  16. package/dist/atoms/button/button.js +4 -2
  17. package/dist/atoms/checkbox/checkbox.d.ts +8 -3
  18. package/dist/atoms/checkbox/checkbox.js +23 -2
  19. package/dist/atoms/chip/chip.d.ts +9 -3
  20. package/dist/atoms/chip/chip.js +26 -4
  21. package/dist/atoms/chip/index.d.ts +1 -1
  22. package/dist/atoms/chip/index.js +4 -1
  23. package/dist/atoms/status-dot/index.d.ts +1 -1
  24. package/dist/atoms/status-dot/status-dot.d.ts +4 -2
  25. package/dist/atoms/status-dot/status-dot.js +5 -1
  26. package/dist/charts/bar-chart/bar-race-chart.js +1 -0
  27. package/dist/charts/beeswarm-chart/beeswarm-chart.js +1 -1
  28. package/dist/charts/chord-chart/chord-chart.js +13 -5
  29. package/dist/charts/core/cartesian/cartesian-chart.d.ts +1 -1
  30. package/dist/charts/core/cartesian/cartesian-chart.js +48 -11
  31. package/dist/charts/core/cartesian/layout.d.ts +6 -1
  32. package/dist/charts/core/cartesian/layout.js +14 -5
  33. package/dist/charts/core/cartesian/marks.d.ts +2 -2
  34. package/dist/charts/core/cartesian/marks.js +1 -1
  35. package/dist/charts/core/cartesian/types.d.ts +28 -2
  36. package/dist/charts/core/category-explorer.d.ts +2 -2
  37. package/dist/charts/core/category-explorer.js +8 -4
  38. package/dist/charts/core/chart-dock.d.ts +26 -0
  39. package/dist/charts/core/chart-dock.js +45 -0
  40. package/dist/charts/core/chart-frame.d.ts +9 -2
  41. package/dist/charts/core/chart-frame.js +105 -25
  42. package/dist/charts/core/distribution/explorer.d.ts +5 -2
  43. package/dist/charts/core/distribution/explorer.js +12 -5
  44. package/dist/charts/core/distribution/xy-points.js +1 -1
  45. package/dist/charts/core/index.d.ts +3 -0
  46. package/dist/charts/core/index.js +3 -0
  47. package/dist/charts/core/leave-grace.d.ts +11 -0
  48. package/dist/charts/core/leave-grace.js +26 -0
  49. package/dist/charts/core/nearest.d.ts +14 -0
  50. package/dist/charts/core/nearest.js +22 -0
  51. package/dist/charts/core/plot-overlay.js +9 -3
  52. package/dist/charts/core/pointer.test-utils.d.ts +38 -0
  53. package/dist/charts/core/pointer.test-utils.js +123 -0
  54. package/dist/charts/core/tooltip.d.ts +25 -2
  55. package/dist/charts/core/tooltip.js +115 -40
  56. package/dist/charts/core/touch-select.d.ts +20 -0
  57. package/dist/charts/core/touch-select.js +184 -0
  58. package/dist/charts/core/types.d.ts +8 -4
  59. package/dist/charts/core/types.js +5 -0
  60. package/dist/charts/core/use-index-navigation.d.ts +17 -6
  61. package/dist/charts/core/use-index-navigation.js +47 -10
  62. package/dist/charts/donut-chart/donut-chart.d.ts +5 -1
  63. package/dist/charts/donut-chart/donut-chart.js +40 -1
  64. package/dist/charts/donut-chart/slice-labels.d.ts +20 -0
  65. package/dist/charts/donut-chart/slice-labels.js +20 -0
  66. package/dist/charts/dumbbell-chart/dumbbell-chart.js +6 -3
  67. package/dist/charts/fill-gauge-chart/fill-gauge-chart.js +1 -0
  68. package/dist/charts/funnel-chart/funnel-chart.js +2 -1
  69. package/dist/charts/gauge-chart/gauge-chart.js +2 -1
  70. package/dist/charts/heatmap-chart/heatmap-chart.d.ts +4 -1
  71. package/dist/charts/heatmap-chart/heatmap-chart.js +3 -1
  72. package/dist/charts/heatmap-chart/heatmap-grid.d.ts +4 -1
  73. package/dist/charts/heatmap-chart/heatmap-grid.js +3 -1
  74. package/dist/charts/hex-tile-map/hex-tile-map.js +124 -115
  75. package/dist/charts/hierarchy-morph/hierarchy-morph.js +2 -1
  76. package/dist/charts/icicle-chart/icicle-chart.js +7 -9
  77. package/dist/charts/lollipop-chart/lollipop-chart.js +6 -3
  78. package/dist/charts/maps/geo/map-viewport.js +1 -1
  79. package/dist/charts/polar-area-chart/polar-area-chart.js +42 -12
  80. package/dist/charts/progress-units/progress-units.js +1 -0
  81. package/dist/charts/radar-chart/radar-chart.js +1 -1
  82. package/dist/charts/radial-bar-chart/radial-bar-chart.js +2 -1
  83. package/dist/charts/range-area-chart/range-area-chart.js +3 -2
  84. package/dist/charts/sankey-chart/sankey-chart.js +12 -4
  85. package/dist/charts/tree-chart/tree-chart.js +1 -0
  86. package/dist/charts/treemap-chart/treemap-chart.js +2 -7
  87. package/dist/charts/waterfall-chart/waterfall-chart.js +6 -3
  88. package/dist/containers/action-bar/action-bar.d.ts +11 -2
  89. package/dist/containers/action-bar/action-bar.js +4 -1
  90. package/dist/containers/card/card.d.ts +21 -3
  91. package/dist/containers/card/card.js +20 -5
  92. package/dist/containers/grid/grid.d.ts +15 -0
  93. package/dist/containers/grid/grid.js +24 -0
  94. package/dist/containers/grid/index.d.ts +1 -0
  95. package/dist/containers/grid/index.js +4 -0
  96. package/dist/containers/index.d.ts +3 -0
  97. package/dist/containers/index.js +3 -0
  98. package/dist/containers/kpi/kpi.d.ts +13 -2
  99. package/dist/containers/kpi/kpi.js +86 -24
  100. package/dist/containers/kpi-group/index.d.ts +1 -1
  101. package/dist/containers/kpi-group/index.js +3 -1
  102. package/dist/containers/kpi-group/kpi-group.d.ts +9 -1
  103. package/dist/containers/kpi-group/kpi-group.js +11 -1
  104. package/dist/containers/page/index.d.ts +1 -0
  105. package/dist/containers/page/index.js +4 -0
  106. package/dist/containers/page/page.d.ts +7 -0
  107. package/dist/containers/page/page.js +14 -0
  108. package/dist/containers/page-header/page-header.d.ts +8 -3
  109. package/dist/containers/page-header/page-header.js +35 -8
  110. package/dist/containers/responsive-list/responsive-list.d.ts +1 -1
  111. package/dist/containers/responsive-list/responsive-list.js +6 -3
  112. package/dist/containers/stack/index.d.ts +1 -0
  113. package/dist/containers/stack/index.js +6 -0
  114. package/dist/containers/stack/stack.d.ts +15 -0
  115. package/dist/containers/stack/stack.js +43 -0
  116. package/dist/forms/copy-field/copy-field.d.ts +17 -0
  117. package/dist/forms/copy-field/copy-field.js +72 -0
  118. package/dist/forms/copy-field/index.d.ts +1 -0
  119. package/dist/forms/copy-field/index.js +4 -0
  120. package/dist/forms/emoji-picker/emoji-picker.js +1 -1
  121. package/dist/forms/form/form.d.ts +15 -0
  122. package/dist/forms/form/form.js +29 -0
  123. package/dist/forms/form/index.d.ts +1 -0
  124. package/dist/forms/form/index.js +10 -0
  125. package/dist/forms/index.d.ts +2 -0
  126. package/dist/forms/index.js +2 -0
  127. package/dist/forms/input/index.d.ts +1 -1
  128. package/dist/forms/input/index.js +3 -2
  129. package/dist/forms/input/input.d.ts +6 -2
  130. package/dist/forms/input/input.js +9 -3
  131. package/dist/glass/crystal-map.d.ts +70 -0
  132. package/dist/glass/crystal-map.js +88 -0
  133. package/dist/glass/displacement-map.d.ts +117 -0
  134. package/dist/glass/displacement-map.js +201 -0
  135. package/dist/glass/index.d.ts +8 -0
  136. package/dist/glass/index.js +63 -0
  137. package/dist/glass/lens-crystal.d.ts +29 -0
  138. package/dist/glass/lens-crystal.js +161 -0
  139. package/dist/glass/lens-dispersion.d.ts +11 -0
  140. package/dist/glass/lens-dispersion.js +19 -0
  141. package/dist/glass/liquid-glass.d.ts +41 -0
  142. package/dist/glass/liquid-glass.js +256 -0
  143. package/dist/glass/liquid-motion.d.ts +53 -0
  144. package/dist/glass/liquid-motion.js +302 -0
  145. package/dist/glass/liquid-options.d.ts +162 -0
  146. package/dist/glass/liquid-options.js +179 -0
  147. package/dist/glass/refraction.d.ts +100 -0
  148. package/dist/glass/refraction.js +714 -0
  149. package/dist/glass/specular-map.d.ts +26 -0
  150. package/dist/glass/specular-map.js +75 -0
  151. package/dist/glass/spring.d.ts +79 -0
  152. package/dist/glass/spring.js +58 -0
  153. package/dist/glass/support.d.ts +13 -0
  154. package/dist/glass/support.js +14 -0
  155. package/dist/glass/use-glass-refraction.d.ts +8 -0
  156. package/dist/glass/use-glass-refraction.js +16 -0
  157. package/dist/i18n/strings.d.ts +24 -0
  158. package/dist/i18n/strings.js +18 -2
  159. package/dist/icons/index.d.ts +2 -0
  160. package/dist/icons/index.js +4 -0
  161. package/dist/icons/key.d.ts +2 -0
  162. package/dist/icons/key.js +12 -0
  163. package/dist/icons/webhook.d.ts +2 -0
  164. package/dist/icons/webhook.js +12 -0
  165. package/dist/liquid/index.d.ts +3 -0
  166. package/dist/liquid/index.js +29 -0
  167. package/dist/navigation/breadcrumbs/breadcrumbs.d.ts +29 -0
  168. package/dist/navigation/breadcrumbs/breadcrumbs.js +70 -0
  169. package/dist/navigation/breadcrumbs/index.d.ts +1 -0
  170. package/dist/navigation/breadcrumbs/index.js +6 -0
  171. package/dist/navigation/index.d.ts +1 -0
  172. package/dist/navigation/index.js +1 -0
  173. package/dist/navigation/segmented/index.d.ts +1 -1
  174. package/dist/navigation/segmented/model.d.ts +5 -0
  175. package/dist/navigation/segmented/model.js +6 -0
  176. package/dist/navigation/segmented/segmented.d.ts +17 -3
  177. package/dist/navigation/segmented/segmented.js +20 -4
  178. package/dist/overlays/context-menu/context-menu.d.ts +9 -1
  179. package/dist/overlays/context-menu/context-menu.js +4 -1
  180. package/dist/overlays/dialog/dialog.d.ts +9 -1
  181. package/dist/overlays/dialog/dialog.js +3 -0
  182. package/dist/overlays/drawer/drawer.d.ts +9 -1
  183. package/dist/overlays/drawer/drawer.js +3 -0
  184. package/dist/overlays/dropdown-menu/dropdown-menu.d.ts +9 -1
  185. package/dist/overlays/dropdown-menu/dropdown-menu.js +3 -1
  186. package/dist/overlays/hover-card/hover-card.d.ts +10 -1
  187. package/dist/overlays/hover-card/hover-card.js +4 -1
  188. package/dist/overlays/popover/popover.d.ts +9 -1
  189. package/dist/overlays/popover/popover.js +3 -0
  190. package/dist/palette/command-palette/command-palette.d.ts +12 -2
  191. package/dist/palette/command-palette/command-palette.js +5 -0
  192. package/dist/primitives/command/command.d.ts +3 -2
  193. package/dist/primitives/command/command.js +2 -0
  194. package/dist/primitives/menu/menu.js +1 -1
  195. package/dist/primitives/popper/popper.js +5 -0
  196. package/dist/rich-text/rich-text-editor.js +94 -8
  197. package/dist/rich-text/sanitize.js +70 -20
  198. package/dist/shell/app-shell/app-shell.d.ts +17 -0
  199. package/dist/shell/app-shell/app-shell.js +44 -4
  200. package/dist/shell/bottom-nav/bottom-nav.d.ts +34 -0
  201. package/dist/shell/bottom-nav/bottom-nav.js +124 -0
  202. package/dist/shell/bottom-nav/index.d.ts +2 -0
  203. package/dist/shell/bottom-nav/index.js +9 -0
  204. package/dist/shell/bottom-nav/split.d.ts +11 -0
  205. package/dist/shell/bottom-nav/split.js +10 -0
  206. package/dist/shell/sidebar/sidebar.d.ts +16 -2
  207. package/dist/shell/sidebar/sidebar.js +46 -4
  208. package/dist/shell/topbar/topbar.d.ts +20 -9
  209. package/dist/shell/topbar/topbar.js +16 -9
  210. package/dist/states/empty-state/empty-state.d.ts +3 -1
  211. package/dist/states/empty-state/empty-state.js +9 -1
  212. package/dist/states/error-state/error-state.d.ts +3 -1
  213. package/dist/states/error-state/error-state.js +2 -0
  214. package/dist/states/index.d.ts +1 -0
  215. package/dist/states/index.js +1 -0
  216. package/dist/states/live-status-bar/index.d.ts +1 -0
  217. package/dist/states/live-status-bar/index.js +6 -0
  218. package/dist/states/live-status-bar/live-status-bar.d.ts +17 -0
  219. package/dist/states/live-status-bar/live-status-bar.js +49 -0
  220. package/dist/states/offline-banner/offline-banner.d.ts +3 -1
  221. package/dist/states/offline-banner/offline-banner.js +8 -4
  222. package/dist/utils/class-groups.js +17 -0
  223. package/dist/utils/index.d.ts +1 -0
  224. package/dist/utils/index.js +2 -0
  225. package/dist/utils/material.d.ts +13 -0
  226. package/dist/utils/material.js +6 -0
  227. package/dist/utils/tone.d.ts +8 -0
  228. package/dist/utils/tone.js +17 -0
  229. package/dist/utils/use-copy.d.ts +5 -0
  230. package/dist/utils/use-copy.js +35 -0
  231. package/icons/svg/key.svg +5 -0
  232. package/icons/svg/webhook.svg +5 -0
  233. package/package.json +31 -21
  234. package/scripts/build-theme.d.mts +22 -0
  235. package/scripts/build-theme.mjs +236 -4
  236. package/src/ai/attachment/attachment.tsx +1 -1
  237. package/src/ai/chat-list/group.ts +3 -1
  238. package/src/ai/conversation/conversation.tsx +1 -1
  239. package/src/ai/internal/use-copy.ts +1 -38
  240. package/src/ai/markdown/parse.ts +74 -17
  241. package/src/ai/source/source.tsx +1 -1
  242. package/src/atoms/avatar/avatar.tsx +57 -4
  243. package/src/atoms/avatar/index.ts +8 -1
  244. package/src/atoms/button/button.tsx +8 -3
  245. package/src/atoms/checkbox/checkbox.tsx +30 -3
  246. package/src/atoms/chip/chip.tsx +37 -5
  247. package/src/atoms/chip/index.ts +7 -1
  248. package/src/atoms/status-dot/index.ts +1 -0
  249. package/src/atoms/status-dot/status-dot.tsx +15 -3
  250. package/src/charts/README.md +21 -0
  251. package/src/charts/bar-chart/bar-race-chart.tsx +1 -0
  252. package/src/charts/beeswarm-chart/beeswarm-chart.tsx +1 -1
  253. package/src/charts/chord-chart/chord-chart.tsx +13 -5
  254. package/src/charts/core/cartesian/cartesian-chart.tsx +55 -10
  255. package/src/charts/core/cartesian/layout.ts +29 -10
  256. package/src/charts/core/cartesian/marks.tsx +3 -3
  257. package/src/charts/core/cartesian/types.ts +30 -2
  258. package/src/charts/core/category-explorer.tsx +12 -6
  259. package/src/charts/core/chart-dock.tsx +68 -0
  260. package/src/charts/core/chart-frame.tsx +116 -27
  261. package/src/charts/core/distribution/explorer.tsx +17 -7
  262. package/src/charts/core/distribution/xy-points.tsx +1 -1
  263. package/src/charts/core/index.ts +3 -0
  264. package/src/charts/core/leave-grace.ts +35 -0
  265. package/src/charts/core/nearest.ts +38 -0
  266. package/src/charts/core/plot-overlay.tsx +9 -3
  267. package/src/charts/core/pointer.test-utils.ts +146 -0
  268. package/src/charts/core/tooltip.tsx +129 -15
  269. package/src/charts/core/touch-select.ts +250 -0
  270. package/src/charts/core/types.ts +13 -4
  271. package/src/charts/core/use-index-navigation.ts +70 -11
  272. package/src/charts/donut-chart/donut-chart.tsx +53 -3
  273. package/src/charts/donut-chart/slice-labels.ts +39 -0
  274. package/src/charts/dumbbell-chart/dumbbell-chart.tsx +8 -3
  275. package/src/charts/fill-gauge-chart/fill-gauge-chart.tsx +1 -0
  276. package/src/charts/funnel-chart/funnel-chart.tsx +2 -1
  277. package/src/charts/gauge-chart/gauge-chart.tsx +2 -1
  278. package/src/charts/heatmap-chart/heatmap-chart.tsx +5 -0
  279. package/src/charts/heatmap-chart/heatmap-grid.tsx +5 -1
  280. package/src/charts/hex-tile-map/hex-tile-map.tsx +6 -1
  281. package/src/charts/hierarchy-morph/hierarchy-morph.tsx +2 -1
  282. package/src/charts/icicle-chart/icicle-chart.tsx +8 -9
  283. package/src/charts/lollipop-chart/lollipop-chart.tsx +8 -3
  284. package/src/charts/maps/geo/map-viewport.tsx +1 -1
  285. package/src/charts/polar-area-chart/polar-area-chart.tsx +37 -12
  286. package/src/charts/progress-units/progress-units.tsx +1 -0
  287. package/src/charts/radar-chart/radar-chart.tsx +1 -1
  288. package/src/charts/radial-bar-chart/radial-bar-chart.tsx +2 -1
  289. package/src/charts/range-area-chart/range-area-chart.tsx +3 -2
  290. package/src/charts/sankey-chart/sankey-chart.tsx +12 -4
  291. package/src/charts/tree-chart/tree-chart.tsx +1 -0
  292. package/src/charts/treemap-chart/treemap-chart.tsx +2 -7
  293. package/src/charts/waterfall-chart/waterfall-chart.tsx +8 -3
  294. package/src/containers/action-bar/action-bar.tsx +13 -2
  295. package/src/containers/card/card.tsx +43 -4
  296. package/src/containers/grid/grid.tsx +37 -0
  297. package/src/containers/grid/index.ts +1 -0
  298. package/src/containers/index.ts +3 -0
  299. package/src/containers/kpi/kpi.tsx +116 -22
  300. package/src/containers/kpi-group/index.ts +7 -1
  301. package/src/containers/kpi-group/kpi-group.tsx +26 -1
  302. package/src/containers/page/index.ts +1 -0
  303. package/src/containers/page/page.tsx +17 -0
  304. package/src/containers/page-header/page-header.tsx +38 -8
  305. package/src/containers/responsive-list/responsive-list.tsx +7 -4
  306. package/src/containers/stack/index.ts +7 -0
  307. package/src/containers/stack/stack.tsx +55 -0
  308. package/src/forms/copy-field/copy-field.tsx +88 -0
  309. package/src/forms/copy-field/index.ts +1 -0
  310. package/src/forms/emoji-picker/emoji-picker.tsx +1 -1
  311. package/src/forms/form/form.tsx +46 -0
  312. package/src/forms/form/index.ts +8 -0
  313. package/src/forms/index.ts +2 -0
  314. package/src/forms/input/index.ts +1 -1
  315. package/src/forms/input/input.tsx +14 -3
  316. package/src/glass/crystal-map.ts +150 -0
  317. package/src/glass/displacement-map.ts +317 -0
  318. package/src/glass/index.ts +43 -0
  319. package/src/glass/lens-crystal.ts +226 -0
  320. package/src/glass/lens-dispersion.ts +34 -0
  321. package/src/glass/liquid-glass.tsx +371 -0
  322. package/src/glass/liquid-motion.ts +395 -0
  323. package/src/glass/liquid-options.ts +306 -0
  324. package/src/glass/refraction.ts +1010 -0
  325. package/src/glass/specular-map.ts +95 -0
  326. package/src/glass/spring.ts +98 -0
  327. package/src/glass/support.ts +27 -0
  328. package/src/glass/use-glass-refraction.ts +21 -0
  329. package/src/i18n/strings.ts +24 -0
  330. package/src/icons/index.ts +2 -0
  331. package/src/icons/key.tsx +13 -0
  332. package/src/icons/webhook.tsx +13 -0
  333. package/src/liquid/index.ts +24 -0
  334. package/src/navigation/breadcrumbs/breadcrumbs.tsx +103 -0
  335. package/src/navigation/breadcrumbs/index.ts +8 -0
  336. package/src/navigation/index.ts +1 -0
  337. package/src/navigation/segmented/index.ts +1 -0
  338. package/src/navigation/segmented/model.ts +11 -0
  339. package/src/navigation/segmented/segmented.tsx +45 -6
  340. package/src/overlays/context-menu/context-menu.tsx +11 -1
  341. package/src/overlays/dialog/dialog.tsx +10 -0
  342. package/src/overlays/drawer/drawer.tsx +10 -0
  343. package/src/overlays/dropdown-menu/dropdown-menu.tsx +10 -1
  344. package/src/overlays/hover-card/hover-card.tsx +12 -1
  345. package/src/overlays/popover/popover.tsx +10 -0
  346. package/src/palette/command-palette/command-palette.tsx +15 -1
  347. package/src/primitives/command/command.tsx +4 -0
  348. package/src/primitives/menu/menu.tsx +1 -1
  349. package/src/primitives/popper/popper.tsx +10 -0
  350. package/src/rich-text/rich-text-editor.tsx +116 -13
  351. package/src/rich-text/sanitize.ts +94 -23
  352. package/src/shell/app-shell/app-shell.tsx +60 -4
  353. package/src/shell/bottom-nav/bottom-nav.tsx +187 -0
  354. package/src/shell/bottom-nav/index.ts +8 -0
  355. package/src/shell/bottom-nav/split.ts +20 -0
  356. package/src/shell/sidebar/sidebar.tsx +51 -5
  357. package/src/shell/topbar/topbar.tsx +81 -58
  358. package/src/states/empty-state/empty-state.tsx +11 -1
  359. package/src/states/error-state/error-state.tsx +4 -0
  360. package/src/states/index.ts +1 -0
  361. package/src/states/live-status-bar/index.ts +6 -0
  362. package/src/states/live-status-bar/live-status-bar.tsx +62 -0
  363. package/src/states/offline-banner/offline-banner.tsx +13 -5
  364. package/src/utils/class-groups.ts +17 -0
  365. package/src/utils/index.ts +1 -0
  366. package/src/utils/material.ts +16 -0
  367. package/src/utils/tone.ts +29 -0
  368. package/src/utils/use-copy.ts +38 -0
  369. package/styles/Theme.kt +64 -3
  370. package/styles/base.css +51 -0
  371. package/styles/tailwind.css +833 -0
  372. package/styles/theme.css +546 -4
  373. package/styles/tokens.css +788 -15
  374. package/tokens/default.json +918 -29
  375. package/scripts/build-theme.d.ts +0 -18
package/CHANGELOG.md CHANGED
@@ -1,25 +1,281 @@
1
1
  # Changelog
2
2
 
3
- ## 0.2.3 (2026-10-13)
3
+ ## 0.3.0 (2026-10-15)
4
+
5
+ ### Components for app shells
6
+
7
+ - **`Sidebar` rail.** `collapsed` turns the sidebar into an icons-only rail (labels as `title` tooltips and screen-reader text, badges as dots). It is ignored while the sidebar is a drawer, so the default behavior is unchanged.
8
+ - **`Chip` `onRemove`.** Appends a remove button named from the new `remove` UI string ("Remove" / "Quitar", or `removeLabel`), keyboard operable, with a 44px hit area under touch density.
9
+ - **`ResponsiveList` follows its own width.** It is a container (`@container/responsive-list`) and swaps cards for the table at 42rem of its own width instead of the viewport `md`, so it stays right in a narrow column or beside a sidebar.
10
+ - **`Input` `size="lg"`.** A thumb-friendly field at the height of the large `Button` (`h-control-lg`); `size` defaults to `md`. `size` is now the `md | lg` prop, no longer the native numeric attribute.
11
+ - **Key and Webhook icons.** `Key` and `Webhook` join the icon set (Lucide sources in `icons/svg`), with their lazy `<ui-icon>` glyphs.
12
+ ### Liquid Glass on phones
13
+
14
+ - **Cheaper lens maps.** The displacement and specular maps are rasterised at no more than 1.5
15
+ pixels per CSS pixel (they are smooth fields that `feImage` stretches), and a large surface drops
16
+ toward one, so a 3x phone no longer builds a map 4x the size of the surface on the main thread.
17
+ The specular map (contour and glint) keeps up to 1.5 even where the large-surface cap has taken
18
+ the refraction map down to one. The crystal map, which mostly covers the margin its layer clips
19
+ away, is lowered toward 48,000 pixels but never below half a pixel per CSS pixel (so a very
20
+ large layer can still exceed that). `computeCrystalField` now accepts a `dpr` from 0.5. The
21
+ whole-surface field computes its per-column terms once, with the same output. Sample positions use
22
+ the effective ratio after rounding the map size, so a fractional size no longer drifts.
23
+ - **Lens work is spread over frames.** The per-frame pass that installs and resizes lenses stops
24
+ after about 12 ms and leaves the rest for the next frame, so several lenses built at once no
25
+ longer land in one task. A single lens build still runs whole (the budget is checked between
26
+ tasks, not inside one), the leftover tasks run first in the next pass so one slow task cannot
27
+ starve the others, and a lens that is undone drops its pending work.
28
+ - **A crystal lens no longer drops while an ancestor changes.** `<LiquidGlass />` read the crystal
29
+ surface (whose backdrop filter moves to its own layer) as not painting one, so any class, style or
30
+ `data-*` change above it, such as dragging, released and rebuilt the lens. The lens is kept only
31
+ while the surface itself still resolves to a backdrop filter, so a crystal surface whose own
32
+ liquid class stops applying (`data-[state=open]:liquid` closing) under a lensed ancestor releases.
33
+
34
+ ### Liquid Glass is opt-in (breaking for the 0.3.0 previews)
35
+
36
+ Liquid Glass now costs nothing until an app asks for it. This replaces the material objects and
37
+ the per-component lens of the earlier 0.3.0 previews, which were never published (0.2.x users have
38
+ nothing to change).
39
+
40
+ - **Non-liquid components carry no liquid code.** Card, Dialog, Drawer, Popover, DropdownMenu,
41
+ ContextMenu, HoverCard, Topbar, Sidebar, ActionBar and CommandPalette are back to plain class
42
+ names: no lens hook, no option mapping, no glass-card detection, no ref composition, and no
43
+ chunk they could fetch later. `check:treeshake` asserts that no chunk of the `atoms`, `ai`,
44
+ `containers`, `forms`, `navigation`, `overlays`, `palette`, `primitives`, `shell` and `utils`
45
+ entries, eager or lazy, holds a glass module, so a page without Liquid Glass cannot fetch one at
46
+ run time. Sizes match the build before Liquid Glass (#35) within 15 bytes gzip (`shell` 10057 B, `overlays` 27125 B,
47
+ `containers` 89025 B, `utils` 7678 B).
48
+ - **New `@jcsoftdev/ui/liquid` entry** for the declarative API: `<LiquidGlass />`,
49
+ `startLiquidGlass()`, `liquidStyle()`, `liquidVars()`, `mergeLiquid()`, `LIQUID_DEFAULTS`,
50
+ `LIQUID_PRESETS`, `LIQUID_PRESET_CLEAR`, `LIQUID_PRESET_REGULAR`, `LIQUID_PRESET_THICK`,
51
+ `LIQUID_PRESET_CRYSTAL`, `supportsBackdropRefraction()` and the option types. It holds no static
52
+ import of the lens engine, so even a bundler that splits by file (esbuild) keeps the engine out
53
+ of the first load. `@jcsoftdev/ui/glass` keeps the imperative engine and the map builders.
54
+ - **`<LiquidGlass />`** (or `startLiquidGlass()`, which returns its stop; calls are counted) is the
55
+ only thing that loads the lens. Render it once near the root. It watches the document (classes,
56
+ `data-glass`, `data-glass-lens`, `data-style`, `data-theme`, added and removed nodes, and the
57
+ transparency, contrast and motion preferences) and gives the lens to every surface whose CSS
58
+ resolves to `--glass-lens: 1` with a backdrop filter (computed, so `md:liquid`, `dark:liquid`,
59
+ `data-[state=open]:liquid`, `aria-*` and `group-*` variants, container queries and an inline
60
+ `--glass-lens` count; pseudo-class variants such as `hover:liquid` are not followed; a custom
61
+ `@apply liquid` class needs `data-glass-lens="on"`),
62
+ fetching the engine the first time one does and retrying a failed fetch with a backoff (six attempts at most). It does
63
+ nothing on the server and nothing where the lens cannot paint (Safari, Firefox).
64
+ - **A lens applied by code and the watcher share an element safely.** Each element's lens keeps one
65
+ claim per owner: `applyGlassRefraction` / `useGlassRefraction` options win over the automatic
66
+ ones, the watcher never stops a manual lens, and after the manual cleanup the automatic lens takes
67
+ over again. A release left over from an ended claim is a no-op.
68
+ - **Lens slots go to surfaces that can show one.** Hidden (`display: none`), zero-area and
69
+ far-offscreen surfaces take none of the 8 slots, and are lensed once they show.
70
+ - **Options are `style={liquidStyle(options)}`**: synchronous custom properties, so the server
71
+ markup and the first client paint are already right, nothing changes at hydration, and no option
72
+ can go stale after it.
73
+ - The engine is split along its features: the crystal layer (`lens-crystal`, with `crystal-map`)
74
+ and the dispersion passes (`lens-dispersion`) are lazy chunks fetched only for a surface that
75
+ uses them. The specular and crystal map builders moved out of `displacement-map` into
76
+ `specular-map` and `crystal-map` (same exports from `@jcsoftdev/ui/glass`). The specular layer
77
+ and the motion stay in the engine chunk: every lensed surface uses both on its first frame.
78
+ - Topbar, Sidebar and CommandPalette accept `style` on their root.
79
+ - `check:size` measures the liquid tiers (Topbar alone, plus `liquidStyle`, plus `<LiquidGlass />`,
80
+ plus the lazy engine, plus the crystal and dispersion chunks).
81
+
82
+ ### Migration
83
+
84
+ From the 0.3.0 previews (`main` before this change):
85
+
86
+ - `material={{ type: "liquid", ...options }}` becomes
87
+ `material="liquid" style={liquidStyle(options)}` (`"liquid-clear"` the same way). `material` only
88
+ takes `"solid" | "glass" | "glass-clear" | "liquid" | "liquid-clear"`.
89
+ - `material={{ type: "liquid", preset: "thick", radius: 24 }}` becomes
90
+ `material="liquid" style={liquidStyle(mergeLiquid(LIQUID_PRESET_THICK, { radius: 24 }))}`.
91
+ - The lens no longer turns on by itself: render `<LiquidGlass />` once (from
92
+ `@jcsoftdev/ui/liquid`) in an app that wants it. Without it, liquid surfaces keep the CSS look.
93
+ - `useGlassLens(ref?)` is removed. Drop the ref: with `<LiquidGlass />` mounted, any element with
94
+ the `liquid` or `liquid-clear` class (or a glass surface under `data-glass="liquid"`) is lensed.
95
+ `applyGlassRefraction()` and `useGlassRefraction()` remain for manual control.
96
+ - `materialStyle()`, `withMaterialStyle()`, `MaterialName`, `LiquidMaterial` and
97
+ `liquidOptionsOf()` are removed. `@jcsoftdev/ui/utils` exports `Material` (now a string union)
98
+ and `materialClass()` only.
99
+ - Import `LiquidGlass` and `startLiquidGlass` from `@jcsoftdev/ui/liquid`; the options, presets
100
+ and `liquidStyle` are exported from both `@jcsoftdev/ui/liquid` and `@jcsoftdev/ui/glass`.
101
+ - The automatic lens reads the pointer mode (`interactive`) only from the surface itself, on every
102
+ surface (before, only the overlays did).
103
+ - A surface that leaves the page releases its lens when the DOM mutation is observed (a microtask later), not synchronously.
104
+
105
+ From 0.2.x: nothing changes unless you adopt Liquid Glass.
106
+
107
+ ### Security
108
+
109
+ - **RichTextEditor sanitizer: `javascript:` href bypass via Unicode whitespace.** The URL check ignored only ASCII and a few invisible characters, while the emitted `href` was `decodeEntities(href).trim()`, and `trim()` also strips U+00A0, U+1680, U+2000-200A, U+202F, U+205F and U+3000. A link such as `<a href="&nbsp;javascript:alert(1)">` passed the check and was emitted as `href="javascript:alert(1)"` (stored XSS for apps that render sanitized HTML as markup); the output was not idempotent. The href is now normalized once, that exact string is validated (all whitespace and format characters ignored, then a protocol allowlist through `new URL`), and the same string is emitted. Anyone using `sanitizeHtml` or `isSafeUrl` should upgrade; stored content is re-sanitized on the next pass.
110
+ - **Markdown parser (low): bounded nesting and link scan.** Blockquote and list nesting is capped at 32 levels (deeper levels render as literal text), which removes a stack overflow on `>` x 20000 and a multi-second parse on deeply nested lists, and the link-target scan is bounded so `[](` repeated thousands of times is no longer quadratic.
111
+
112
+ ### App-level building blocks
113
+
114
+ - **Tone palettes.** `tonePalettes` in a token file (optional) emits `--tone-<name>`, `--tone-<name>-soft` and `--tone-<name>-ink` for light and dark, plus `--color-tone-*` in `theme.css`. Names are kebab-case; `fill` and `soft` are required, `ink` falls back to `fill`. `buildTheme`, `buildTokensCss`, `buildThemeCss` and `ui-theme build` all honour it; files without the section build byte-identically.
115
+ - **Open `tone`.** `Chip`, `StatusDot`, `Kpi` and `Avatar` accept any tone name besides the built-in ones (`ChipTone`, `StatusDotTone`, `KpiTone`, `AvatarTone` are the built-in union plus `string & {}`; `ChipBuiltinTone` and friends keep the closed unions). Unknown names resolve through `--tone-<name>` variables set inline, so no class needs generating.
116
+ - **Kpi**: `tone`, `dot`, `icon`, `trend`. **KpiGroup**: `layout="auto-fit"` with `minItemWidth` (default 150) for separate cards in as many columns as fit.
117
+ - **Avatar**: `tone`, and `status` + `statusLabel` for a small status dot at the bottom-right.
118
+ - **EmptyState / ErrorState**: `variant="outlined"` (dashed border / danger border).
119
+ - **PageHeader**: `compact` (centred, tighter, body-size lede) and `breadcrumbs` (trail on its own row above the title).
120
+ - **Topbar**: `onSearch`, `searchLabel`, `searchPlaceholder`, `breadcrumbs` and `breadcrumbsLabel` are optional; missing parts render nothing (and Cmd/Ctrl+K is only bound with `onSearch`).
121
+ - **CardHeader**: `icon`, `title` and `action` slots; children still render as before.
122
+ - **Segmented**: `options` (`{ value, label, disabled? }[]`), `block` (full width, control-height items) and `allowDeselect` (default `false`: the pressed item stays selected; `true` lets a second press clear it).
123
+ - **Button**: while `loading` without a `loadingLabel`, the children stay and the UI string `loading` is announced.
124
+ - **CopyField**: label, monospace read-only value and a copy button with a 1.5 s copied state and a live region; strings `copy` and `copied` join the UI strings (`en`, `es`).
125
+ - **Layout**: `Page`, `Stack` and `Grid` (`@jcsoftdev/ui/containers/page`, `/stack`, `/grid`). `Page` is the `page` container, so `Cols` and `SettingsLayout` inside it react to the page width. `Grid` is intrinsic by default (`minColumnWidth`) or fixed with `columns`; `Stack` takes `direction`, `gap` and `align`.
126
+ - **Forms**: `Form`, `FormError` (`role="alert"`) and `FormStatus` (`role="status"`) in `@jcsoftdev/ui/forms/form`; the two messages render nothing for `null`, `undefined` or an empty `message`.
127
+ - **`Breadcrumbs`** (`@jcsoftdev/ui/navigation/breadcrumbs`): a named `nav` with an ordered list, `aria-current="page"` on the last item and a `renderLink` hook.
128
+ - **`LiveStatusBar`** (`@jcsoftdev/ui/states/live-status-bar`): `live`, `reconnecting` and `offline` states as a polite `role="status"` with a dot and localized text.
129
+ - **`BottomNav`** (`@jcsoftdev/ui/shell/bottom-nav`): phone navigation bar for `Sidebar` items; the items past the fifth slot go behind a "More" button that opens a drawer. It hides itself once the `AppShell` is 900 px wide.
130
+ - New localized strings: `breadcrumbs`, `live`, `reconnecting`, `offline`, `more`.
131
+
132
+ ### Chart gaps
133
+
134
+ - **Cartesian charts** (`BarChart`, `AreaChart`, `LineChart`, `ComboChart`): `tooltipRows({ index, category, rows })` returns `{ title?, rows?, footer? }` to replace parts of the tooltip (the default is unchanged when absent; the hidden data table is untouched); `categoryTickEvery` (a step or `(index, label) => boolean`) overrides the automatic thinning of the category labels; `markers` also takes an array of indices of `categories` to dot only those points.
135
+ - **`ValueAxisOptions.min` / `max`** accept a function of the data bound, e.g. `max: (dataMax) => Math.ceil(dataMax / 400) * 400`. `resolveAxisBound` and `AxisBound` are exported from `core/types`; the horizontal bar, lollipop, dumbbell, range area and waterfall axes honour it too.
136
+ - **`HeatmapChart`**: `cellDetail(row, column, value)` returns extra `TooltipRow`s under the cell value; `ChartTooltip` gained a `footer` slot.
137
+ - **`DonutChart`**: `sliceLabels` (`true`, `"percent"` or `"value"`) draws the share or the formatted value inside the ring and skips slices too small to hold it; it combines with `outsideLabels`.
138
+
139
+ ### Behavior change
140
+
141
+ - **`Segmented` keeps the selected item selected.** Pressing the selected `SegmentedItem` again used to clear the selection (value `""`); a single-select group now stays on it. `Segmented` takes `allowDeselect` (default `false`) to keep the old behavior.
4
142
 
5
143
  ### Fixes
6
144
 
145
+ - **PolarAreaChart hover no longer flickers.** The hovered sector steps out by 6px and was also the pointer target, so a still pointer near its inner edge fell outside the moved sector: hover, tooltip and dimming toggled about 25 times a second. Pointer events now go to invisible sectors at rest, with no gap between neighbours and covering the stepped-out area, as in DonutChart since 0.2.1. The tooltip stays inside the chart vertically too.
146
+ - **DonutChart, PieChart and PolarAreaChart keep a tapped slice.** On touch and pen, lifting the finger fires `pointerleave`, which dropped the slice right after the tap: tooltip, centre value and dimming flashed for a frame and vanished. A tap now pins the slice until the next tap on another slice or outside the chart; the mouse still drops the hover when it leaves. `useIndexNavigation` returns `pointerLeave` for this.
147
+ - **Chart tooltips stop swapping sides under the pointer.** On pointer-following tooltips (Sankey, Chord, Treemap, Icicle, Sunburst, Radar, horizontal Bar and Funnel, Scatter, ...) a 1-2px move across 60% of the width swapped the card from one side of the pointer to the other, and the 100ms transform transition animated the swap across the cursor. The side now has a dead zone (right of the pointer until 65% of the width, left of it until 55%, or until the card would overflow) and a swap jumps instead of sliding.
148
+ - **Waffle, Parliament and Pictogram keep the category over the gaps between its units** instead of hiding the tooltip until the pointer reaches the next unit; Treemap and Icicle snap to the nearest cell across the 1-6px gutters, and Sankey, Chord, RadialBar and every `useIndexNavigation` chart wait 60ms before clearing, so crossing a gutter goes from one mark to the next without an empty frame.
149
+ - **Charts react to taps on touch screens.** `ChartFrame` now owns touch selection for every chart: a tap pins the mark's (or category's) details, tapping it again, tapping outside or pressing Escape unpins, tapping another mark moves the pin, and a swipe or scroll (more than 10px) never selects. Lifting a finger no longer counts as leaving, and a tap snaps to the nearest mark within 44px. Cartesian charts (Bar, Line, Area, Combo, ChartGrid) pin the tapped category instead of ignoring the tap and picking the first one on focus; focusing a chart by pointer no longer selects the first item (only the keyboard does).
150
+ - **Chart details dock on phones.** `ChartTooltip` gets `dock="auto" | "always" | "never"` (default `auto`). `auto` docks the details in a full-width panel under the plot, in normal flow, based on the device: a coarse primary pointer or a viewport 480px wide or less. A narrow card on a desktop with a mouse keeps the floating card and reserves nothing. The panel reserves a fixed 160px (it scrolls past that) through CSS, so the reservation also holds on the server render and only exists while docking applies; its rows are at least 44px tall. A separate polite live region announces the pinned or keyboard-selected category, debounced and never for mouse hover. `ChartFrame` takes `dock` too, and `BarChart`, `LineChart`, `AreaChart`, `ComboChart` and `ChartGrid` forward it. Charts with `tooltip={false}` reserve nothing.
151
+ - **`AppShell` no longer re-renders the page during hydration.** Its context value changed in the first layout effect after hydration, which made Next.js client-render still-dehydrated Suspense boundaries (a hidden `div#S:0` stayed in the page). The value is now a store that never changes identity and reads `false` on the server and on the first client render; only `useAppShell` consumers update, once the width is measured.
152
+ - **`OfflineBanner` takes an `action`** (for example a retry button) after the queue counter.
153
+ - **`Checkbox` takes a `label`**: it renders a `<label>` bound to the box, so it names the checkbox and a click on it toggles. New `wrapper` and `label` parts.
7
154
  - **Checkbox looks like a checkbox.** The box is square (`rounded-xs`, the 4px small-radius token, 3px in the compact theme) instead of a circle, and the checked and indeterminate fill is the accent (as in Switch and the selected RadioGroup row) instead of the success green. Round plus green read as a radio button in multi-select lists. Sizes, 44px touch hit area, focus ring, disabled state and the `box`/`indicator`/`icon` parts are unchanged; The indeterminate state draws a dash instead of a check mark, and a disabled checkbox is dimmed (`opacity-50`, `cursor-not-allowed`) like the other form controls. RadioGroup stays round.
8
155
 
9
- ## 0.2.2 (2026-10-13)
156
+ ### Theme builder
10
157
 
11
- ### Fixes
158
+ - **`@jcsoftdev/ui/theme-builder` stays available.** The subpath published in 0.2.2 (`buildTheme`, `buildTokensCss`, `buildThemeCss`, `buildFontsCss`, `buildThemeKt`; `buildTheme(tokens, { kotlin: false })`) is re-exported from `@jcsoftdev/ui-tokens` and shipped inside this package, so 0.2.2 consumers upgrade unchanged and nothing extra is installed.
159
+
160
+ ### Crystal lens
161
+
162
+ - **`profile: "crystal"`** and the `crystal` preset (`data-glass="liquid-crystal"`): a thick, fully clear convex lens that minifies the backdrop, bends it hard towards the rim, splits colour at the edge and has no frost, veil or tint. `refraction` accepts 0 to 2 for it (defaults and the other profiles are unchanged; above 1 they behave as 1). The minifying map cannot fold; the filter runs on a layer that extends past the surface and is clipped to it. No contrast guarantee.
163
+
164
+ ### Configurable Liquid Glass and liquid motion
12
165
 
13
- - **`ui-theme build --no-kotlin` no longer builds Kotlin.** It used to generate `Theme.kt` and discard it, so `var(...)` and `oklch(...)` colors still threw "Unsupported color for Kotlin". Without the flag, the error now names the token and suggests `--no-kotlin`.
166
+ - **`LiquidGlassOptions`**: `style={liquidStyle(options)}` on any liquid surface. Options: `refraction`,
167
+ `bevelWidth`, `profile` (`"full"`, `"dome"`, `"rim"`), `dispersion`, `frost`, `saturation`,
168
+ `brightness`, `tint`, `rim`, `specular`, `fresnel`, `grain`, `radius`, `opacity`, `shadow`,
169
+ `interactive`, `motion`. Each maps to a `--liquid-*` custom property that the CSS and the lens
170
+ read, so a scope or the theme can set them and a change applies live. Exported from
171
+ `@jcsoftdev/ui/liquid` with `LIQUID_DEFAULTS`, `LIQUID_PRESETS`, `liquidStyle` and `liquidVars`.
172
+ - **`data-glass` presets**: `liquid-clear`, `liquid-regular` and `liquid-thick` (in `base.css`).
173
+ The global switch is now `[data-glass^="liquid"]`.
174
+ - **Optics**: the `dome` profile (round contours), a size-scaled outer shadow, fresnel glow, film
175
+ grain, and a specular glint that follows `specular.angle`. Defaults are unchanged.
176
+ - **Motion**: an in-house spring and one rAF loop: the lens materialises by spring, a press deepens
177
+ it, swells the surface and lights a touch glow that follows the pointer (the rim light turns
178
+ towards it), and `interactive: "drag"` pulls the surface through a rubber band with a velocity
179
+ squash (mismatched X/Y springs) and a jelly settle. Off under `prefers-reduced-motion` and with
180
+ `motion: false`.
181
+ - New tokens: `liquid-rim-lit`, `liquid-rim-back`, `liquid-rim-ring`, `liquid-shadow-ink`,
182
+ `liquid-shadow-alpha`, `liquid-shadow-drop`, `liquid-shadow-blur`, `liquid-shadow-contact` (the
183
+ engine's size-scaled shadow now follows the theme in light and dark). The liquid utilities compose their backdrop filter from the blur and
184
+ saturate tokens and the per-surface options; overriding `--liquid-regular-filter` alone no longer
185
+ changes anything.
186
+ - A lower `opacity`, a `tint` or `grain` void the contrast guarantee of the defaults.
187
+ - Fix: a removed element released its lens only after the rebuild throttle; it is now immediate.
188
+ - Motion hardening: the motion is written to `translate`/`scale` composed with the author's own
189
+ (an author `transform` is untouched; inline values are restored at rest, nothing is pinned); a
190
+ drag ignores presses on buttons, links and fields inside the surface, captures the pointer only
191
+ after 6 px, and swallows just its own gesture's click (within ~350 ms); no style reads per frame
192
+ and no config refresh from the motion's own writes; `--liquid-motion` and `--liquid-interactive`
193
+ are live; a moved surface follows its new ancestors.
14
194
 
15
- ### Added
195
+ ### Liquid variant of the glass (lensing)
16
196
 
17
- - **`@jcsoftdev/ui/theme-builder`** exports `buildTheme`, `buildTokensCss`, `buildThemeCss`, `buildFontsCss` and `buildThemeKt`, typed. `buildTheme` takes `kotlin: false` to skip `Theme.kt`.
197
+ Frosted glass is unchanged; Apple-style Liquid Glass is a second look next to it.
18
198
 
19
- ## 0.2.1 (2026-10-13)
199
+ - **`liquid` and `liquid-clear` utilities and `material="liquid" | "liquid-clear"`**: thin blur, higher
200
+ saturation, specular rim (lit top-left edge and a fainter opposite one), inner highlight, edge
201
+ glow and lower inner shadow for thickness, press flex on interactive surfaces (brightens and
202
+ scales; no transition under reduced motion; `backdrop-filter` is never animated). `glass` and
203
+ `glass-clear` render exactly as in 0.2 (a golden test pins their CSS).
204
+ - **Global switch**: `data-glass="liquid"` on `<html>` or any scope makes `glass`, `glass-clear` and
205
+ the glass-preset chrome surfaces render liquid. Content (`surface-card`) stays solid.
206
+ - **Lens for liquid surfaces in Chromium** once `<LiquidGlass />` is mounted (see above). The displacement map is rasterised from a
207
+ rounded-rect signed distance field with a Snell's-law squircle profile, DPR aware; chromatic
208
+ dispersion on surfaces up to 100,000 px squared; the blur and legibility veil move into the
209
+ filter so the rim stays sharp while the middle stays frosted. Budgets: 8 lenses, 640,000 px
210
+ squared, rebuilds throttled, one coalesced pass per frame. Opt out with `data-glass-lens="off"`
211
+ (element or ancestor) or `--glass-lens: 0`. Other engines get the base liquid look.
212
+ - **Closer to Apple** (liquid only): refraction only across a bevel as wide as the corner radius
213
+ (centre shows the backdrop undisplaced), strength equal to the bevel width, blur 4px / 1.5px,
214
+ saturation 1.5, thinner veil (regular .6 light / .54 dark, clear .47 / .38) with a text halo
215
+ (`--liquid-halo`), a directional specular layer in the filter (glint tinted by the backdrop,
216
+ dark contour, faint inner shadow, second `feImage`), dispersion 0.05, a materialise ramp and a
217
+ press lift on the refraction, and a `--liquid-shadow` token. Liquid contrast floors are now
218
+ documented per variant (regular 4.5 / 3.5, clear 4.5 / 2).
219
+ - **Full-surface lens** (liquid): the lens now bends the whole surface (smooth dome, strongest at the
220
+ rim, 24 px cap) instead of a bevel only; `coverage: "rim"` / `--glass-lens-coverage: rim` keeps the
221
+ old extent. The serrated edge of the first lenses was a fold-over of the displacement (offset
222
+ falling faster than 1 px per px); both profiles are now fold-free, with a regression test. The
223
+ veil moved fully into the filter and is adaptive (only where the backdrop is close to the ink), the
224
+ tint is dropped while the lens is on, blur is 2 px / 0.6 px, the rim glint is brighter and wider,
225
+ and dispersion is off by default (`--glass-lens-dispersion` or the option turns it on).
226
+ - The full-surface lens is a crease-free superellipse dome (pull along the gradient of `r = (|u|^3 + |v|^3)^(1/3)`), not a per-axis or edge-distance field, so it no longer reads as a four-faced diamond; tests check direction continuity across the diagonals and a positive 2D Jacobian.
227
+ - **Fixes**: `Card` stays a server component; the lens follows class, `data-glass`, opt-out and
228
+ preference changes at runtime; area and dispersion budgets are enforced on every resize;
229
+ surfaces waiting for one of the 8 slots get one when it frees. New `check:rsc` script.
230
+ - `@jcsoftdev/ui/glass`: new `computeDisplacementField`, `lensProfile`;
231
+ `createDisplacementMap` now returns a PNG data URI (browser only); `applyGlassRefraction` gains
232
+ `dispersion`, `veil` and `auto`, and moves the blur into the filter. The default `scale` is 20.
233
+ - New shared tokens `--liquid-*` (blur, saturate, filters, tints, dim, rim, depth).
234
+ - Material components and the `cn` merge group accept the new values. Card and ActionBar type
235
+ their `ref` prop (it reaches the root).
236
+
237
+ ### Liquid Glass
238
+
239
+ Apple-style glass for the control and navigation layer, with content kept solid.
240
+
241
+ - **Glass material tokens in every preset**: `--glass-regular-*` and `--glass-clear-*` (`tint`,
242
+ `blur`, `saturate`, `filter`, `border`, `edge`, `shadow`, `dim`, `fallback`) plus
243
+ `--glass-sheen`, `--glass-noise` (off) and `--glass-nested-tint`. The `glass` preset now tunes
244
+ them. `Theme.kt` exports `UiGlass` / `GlassMaterial`.
245
+ - **`glass` and `glass-clear` utilities** with an opaque base and the blur behind
246
+ `@supports (backdrop-filter)`; `prefers-reduced-transparency`, `prefers-contrast: more` and
247
+ `forced-colors` fall back to a solid fill with a border. Glass nested in glass drops its blur.
248
+ Specular edge highlight and sheen are built in. Both variants carry a legibility veil (stronger
249
+ for clear) so `text-ink` and `text-ink-2` keep 4.5:1 over white, black, split and striped
250
+ backdrops in both themes; `text-ink-3` and tinted text are not covered.
251
+ - **`material` prop** (`"solid" | "glass" | "glass-clear"`) on Card, Dialog, Drawer, Popover,
252
+ DropdownMenu, ContextMenu, HoverCard, CommandPalette, ActionBar, Topbar and Sidebar; every other
253
+ surface opts in with `glass`, `glass-clear` or `surface-solid` in `className`. The `cn` merge
254
+ treats the surface utilities as one group (the last one wins).
255
+ - **New `surface-nav`, `surface-side` and `surface-solid` utilities**; Topbar and Sidebar are glass
256
+ in the `glass` preset and unchanged elsewhere.
257
+ - **Opt-in refraction** in the new `@jcsoftdev/ui/glass` entry: `useGlassRefraction`,
258
+ `applyGlassRefraction`, `supportsBackdropRefraction`, `createDisplacementMap`. Chromium only,
259
+ never on by default, skipped under reduced transparency, more contrast, forced colors and reduced
260
+ motion. No dependencies.
261
+ - New [Liquid Glass guide](https://ui.jcsoftdev.com/docs/glass), stories and real-browser tests
262
+ (`pnpm test:glass`) including measured text contrast over a worst-case backdrop.
263
+
264
+ ### Platform
265
+
266
+ - **Tokens live in `@jcsoftdev/ui-tokens`.** `@jcsoftdev/ui` still ships the same `styles/*`,
267
+ `tokens/*` and `ui-theme` bin; they are synced from ui-tokens at build time.
268
+ - **The `ui-theme` bin is now a single bundled file** (it inlines the theme engine from ui-tokens);
269
+ invoke it exactly as before. It is no longer a thin script next to `scripts/build-theme.mjs`.
270
+ - **`ui-theme build` also writes `tailwind.css`** next to `tokens.css`, `theme.css` and `fonts.css`.
271
+ - **`ui-theme generate`** derives a WCAG AA color set from `--brand` (and optional `--accent`,
272
+ `--neutral`, `--danger`) and writes `tokens.json` plus the CSS outputs; a bad hex prints a clean
273
+ error and exits 1. The same engine is available as `createTheme`, `toCss` and `applyTheme` in
274
+ `@jcsoftdev/ui-tokens`.
20
275
 
21
276
  ### Fixes
22
277
 
278
+ - **`ui-theme build --no-kotlin` no longer builds Kotlin.** It used to generate `Theme.kt` and discard it, so `var(...)` and `oklch(...)` colors still threw "Unsupported color for Kotlin". Without the flag, the error now names the token and suggests `--no-kotlin`. The builders in `@jcsoftdev/ui-tokens/build` take `kotlin: false` and have typed `buildTokensCss`, `buildThemeCss`, `buildFontsCss` and `buildThemeKt`.
23
279
  - **DonutChart / PieChart no longer flicker on hover.** The hovered slice steps out by `explode`
24
280
  and was also the pointer target, so a still pointer near its edge ended up outside the moved
25
281
  slice, the hover dropped, the slice slid back under the pointer and the loop repeated (tooltip,
@@ -28,6 +284,31 @@
28
284
  - `ChartTooltip` takes an optional `containerHeight` and keeps the card inside it vertically
29
285
  (DonutChart passes it), so a slice near the top no longer pushes the card past the chart edge.
30
286
 
287
+ ### Migration notes
288
+
289
+ - **Cards no longer blur.** `surface-card` is now an opaque fill with no `backdrop-filter`, in every
290
+ preset. In the `glass` preset cards (`surface-card`, `surface-control`) are opaque instead of
291
+ translucent. To get the old look on one card use `material="glass"` (or `className="glass"`).
292
+ - `--surface-alpha` is now `1` in every preset and is only kept as an alias. `--surface-blur` and
293
+ `--surface-filter` still exist; in the `glass` preset they equal `--glass-regular-blur` and
294
+ `--glass-regular-filter`, and `--surface-overlay` equals `--glass-regular-tint`.
295
+ - Translucent `bg-surface-overlay` without a blur was replaced by the `surface-overlay` utility in
296
+ the map controls, attachment preview, emoji picker, source card and conversation button.
297
+ - `cn("surface-card", "surface-overlay")` now returns `surface-overlay`.
298
+ - A menu or popover portaled out of a glass dialog is not a DOM descendant, so it is not detected as
299
+ nested glass; pass `material="solid"` if you want it opaque.
300
+ - Non-glass presets are unchanged: overlays, the top bar and the sidebar keep their 0.2.0 fills in
301
+ every media mode (new `--surface-overlay-fallback`, `--surface-nav-fallback` and
302
+ `--surface-side-fallback` default to the surface's own token). In the `glass` preset, browsers
303
+ without `backdrop-filter` and users with reduced transparency or more contrast now get an opaque
304
+ overlay instead of a translucent one, plus a ring (more contrast) or outline (forced colors).
305
+ - In the `glass` preset `--shadow-card` changed (an inset highlight plus a large drop shadow became
306
+ a 1px ring plus a softer drop), and the overlay fill went from 82% `--float` to the regular
307
+ glass tint (72% white in light, 62% near-black in dark) plus the veil, which only the
308
+ `surface-overlay` / `surface-nav` / `surface-side` utilities paint: a bare `bg-surface-overlay`
309
+ is a translucent colour without blur or veil, use the utility.
310
+ - The unprefixed `glass` class can collide with an existing `.glass` in your CSS; see the guide.
311
+
31
312
  ## 0.2.0 (2026-10-11)
32
313
 
33
314
  Zero runtime dependencies, a published headless layer, per-part customization and a configurable
package/README.md CHANGED
@@ -24,6 +24,7 @@ Set these on `<html>` (or any element to restyle only its subtree); no rebuild i
24
24
  | `data-style="<preset>"` | Style preset (radii, borders, shadows, glass, ...). See https://ui.jcsoftdev.com/docs/theming/. |
25
25
  | `data-density="<level>"` | Control and spacing density: `compact`, `normal`, `comfortable`, `touch`. |
26
26
  | `data-radius="<level>"` | Global corner radius scale. |
27
+ | `data-glass="liquid\|liquid-clear\|liquid-regular\|liquid-thick\|liquid-crystal"` | Switch glass surfaces to Liquid Glass (lensing, specular rim) with a preset. Configure one surface with `style={liquidStyle(options)}` and mount `<LiquidGlass />` once for the lens (both from `@jcsoftdev/ui/liquid`); see https://ui.jcsoftdev.com/docs/glass/. |
27
28
 
28
29
  ### Subpath exports
29
30
 
@@ -65,7 +66,7 @@ import { Button } from "@jcsoftdev/ui/atoms/button";
65
66
  | `tokens.css` | CSS variables. Light by default, dark through `prefers-color-scheme` and the `[data-theme="dark"]` / `[data-theme="light"]` override, brand palettes through `[data-accent="<id>"]`. |
66
67
  | `theme.css` | Tailwind v4 `@theme inline` mapping variables to utilities (`bg-surface`, `text-ink`, `rounded-card`, `shadow-flat`, `text-page-title`, `h-control-height`, ...). |
67
68
  | `fonts.css` | Optional `@import` for the Google Fonts declared in the tokens. Skip it when the app loads fonts itself (for example `next/font`, then override `--font-sans`). |
68
- | `Theme.kt` | Compose Multiplatform colors (per theme), palettes, shapes, sizes and text styles, so a Kotlin app shares the same tokens. |
69
+ | `Theme.kt` | Compose Multiplatform colors (per theme), palettes, shapes, sizes and text styles, so a Kotlin app shares the same tokens. Needs hex or `rgb(a)` colors: pass `--no-kotlin` to skip it when tokens use `var(...)` or `oklch(...)`. |
69
70
 
70
71
  Without a tokens argument the bundled default (`tokens/default.json`) is used; its output is already shipped as
71
72
  `@jcsoftdev/ui/styles/{tokens,theme,fonts}.css`.