@zyncat/ui 0.15.0 → 0.18.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 (339) hide show
  1. package/README.md +32 -202
  2. package/dist/alert.css +1 -1
  3. package/dist/alert.js +18 -10
  4. package/dist/alert.js.map +1 -1
  5. package/dist/avatar.css +3 -2
  6. package/dist/badge.css +1 -1
  7. package/dist/bloom-HV23M4AW.js +81 -0
  8. package/dist/bloom-HV23M4AW.js.map +1 -0
  9. package/dist/button.css +38 -31
  10. package/dist/button.js +4 -1
  11. package/dist/checkbox.css +1 -1
  12. package/dist/{chunk-5W5TKANX.js → chunk-2DNKZ57E.js} +3 -3
  13. package/dist/{chunk-5W5TKANX.js.map → chunk-2DNKZ57E.js.map} +1 -1
  14. package/dist/chunk-2YGHPQ66.js +16 -0
  15. package/dist/chunk-2YGHPQ66.js.map +1 -0
  16. package/dist/{chunk-N2GJEO5Z.js → chunk-6H3IJ752.js} +24 -9
  17. package/dist/chunk-6H3IJ752.js.map +1 -0
  18. package/dist/chunk-7NHY2CRA.js +132 -0
  19. package/dist/chunk-7NHY2CRA.js.map +1 -0
  20. package/dist/{chunk-PWQVSVXR.js → chunk-AIAPXRCI.js} +20 -19
  21. package/dist/chunk-AIAPXRCI.js.map +1 -0
  22. package/dist/{chunk-K45CWVHS.js → chunk-BRKGYLEQ.js} +12 -9
  23. package/dist/chunk-BRKGYLEQ.js.map +1 -0
  24. package/dist/{chunk-MDSRZ4QR.js → chunk-C3D32LE3.js} +6 -5
  25. package/dist/chunk-C3D32LE3.js.map +1 -0
  26. package/dist/chunk-F2TB3TT6.js +103 -0
  27. package/dist/chunk-F2TB3TT6.js.map +1 -0
  28. package/dist/{chunk-FVPNICF4.js → chunk-F64Z42PJ.js} +6 -6
  29. package/dist/{chunk-FVPNICF4.js.map → chunk-F64Z42PJ.js.map} +1 -1
  30. package/dist/{chunk-QGVFFT2B.js → chunk-HBWRKEW4.js} +3 -3
  31. package/dist/{chunk-QGVFFT2B.js.map → chunk-HBWRKEW4.js.map} +1 -1
  32. package/dist/{chunk-CAXQJSIE.js → chunk-JINATP4N.js} +13 -13
  33. package/dist/chunk-JINATP4N.js.map +1 -0
  34. package/dist/chunk-KSAJ6DED.js +16 -0
  35. package/dist/chunk-KSAJ6DED.js.map +1 -0
  36. package/dist/{chunk-BH4JFWXQ.js → chunk-M2KGLH2G.js} +19 -16
  37. package/dist/chunk-M2KGLH2G.js.map +1 -0
  38. package/dist/{chunk-6X3G4GIM.js → chunk-N43NDSME.js} +3 -3
  39. package/dist/{chunk-6X3G4GIM.js.map → chunk-N43NDSME.js.map} +1 -1
  40. package/dist/chunk-NYQQH4R5.js +40 -0
  41. package/dist/chunk-NYQQH4R5.js.map +1 -0
  42. package/dist/{chunk-BTF6DAE3.js → chunk-ODRO3KS6.js} +4 -4
  43. package/dist/{chunk-BTF6DAE3.js.map → chunk-ODRO3KS6.js.map} +1 -1
  44. package/dist/chunk-PXQBJMPJ.js +50 -0
  45. package/dist/chunk-PXQBJMPJ.js.map +1 -0
  46. package/dist/{chunk-GJTHWB6O.js → chunk-QDAN43B6.js} +3 -3
  47. package/dist/{chunk-GJTHWB6O.js.map → chunk-QDAN43B6.js.map} +1 -1
  48. package/dist/{chunk-RBSHRRNO.js → chunk-RJENXXTI.js} +5 -5
  49. package/dist/{chunk-RBSHRRNO.js.map → chunk-RJENXXTI.js.map} +1 -1
  50. package/dist/chunk-RLNCRDAL.js +89 -0
  51. package/dist/chunk-RLNCRDAL.js.map +1 -0
  52. package/dist/{chunk-GOLSYGRA.js → chunk-TBLPZQSI.js} +84 -48
  53. package/dist/chunk-TBLPZQSI.js.map +1 -0
  54. package/dist/{chunk-WZUTBJC4.js → chunk-TDHLZY6I.js} +23 -5
  55. package/dist/chunk-TDHLZY6I.js.map +1 -0
  56. package/dist/chunk-TP2AC5MQ.js +13 -0
  57. package/dist/chunk-TP2AC5MQ.js.map +1 -0
  58. package/dist/chunk-TRPAKUIB.js +196 -0
  59. package/dist/chunk-TRPAKUIB.js.map +1 -0
  60. package/dist/{chunk-5X3MJRIM.js → chunk-UKPX3RIP.js} +3 -3
  61. package/dist/{chunk-5X3MJRIM.js.map → chunk-UKPX3RIP.js.map} +1 -1
  62. package/dist/{chunk-5GBV45YD.js → chunk-V6QAAOA5.js} +3 -3
  63. package/dist/{chunk-5GBV45YD.js.map → chunk-V6QAAOA5.js.map} +1 -1
  64. package/dist/{chunk-FLQVOSFC.js → chunk-VJXP256V.js} +10 -10
  65. package/dist/chunk-VJXP256V.js.map +1 -0
  66. package/dist/{chunk-IUQAUBVM.js → chunk-VQFILXQN.js} +5 -5
  67. package/dist/chunk-VQFILXQN.js.map +1 -0
  68. package/dist/{chunk-CFRGQJ23.js → chunk-VZXML7EH.js} +4 -4
  69. package/dist/{chunk-CFRGQJ23.js.map → chunk-VZXML7EH.js.map} +1 -1
  70. package/dist/{chunk-FEXUS4SV.js → chunk-XKDR22VE.js} +11 -5
  71. package/dist/chunk-XKDR22VE.js.map +1 -0
  72. package/dist/cli.js +262 -45
  73. package/dist/collapse.css +8 -5
  74. package/dist/confetti.css +3 -3
  75. package/dist/confetti.js +2 -2
  76. package/dist/date-field.js +20 -18
  77. package/dist/date-field.js.map +1 -1
  78. package/dist/date-picker.css +168 -43
  79. package/dist/date-range-field.js +42 -27
  80. package/dist/date-range-field.js.map +1 -1
  81. package/dist/datetime-field.js +21 -19
  82. package/dist/datetime-field.js.map +1 -1
  83. package/dist/dialog.css +4 -3
  84. package/dist/dialog.js +12 -12
  85. package/dist/dialog.js.map +1 -1
  86. package/dist/digit-strip.css +1 -1
  87. package/dist/dropdown.css +1 -1
  88. package/dist/dropdown.js +16 -16
  89. package/dist/dropdown.js.map +1 -1
  90. package/dist/emoji-picker.js +41 -26
  91. package/dist/emoji-picker.js.map +1 -1
  92. package/dist/facebook-feed.css +1 -1
  93. package/dist/flow-field.css +4 -4
  94. package/dist/flow-field.js +3 -3
  95. package/dist/flow-field.js.map +1 -1
  96. package/dist/glide.js +3 -3
  97. package/dist/icon.css +1 -1
  98. package/dist/input.css +7 -4
  99. package/dist/instagram-feed.css +1 -1
  100. package/dist/instagram-feed.js +2 -2
  101. package/dist/lens.css +1 -2
  102. package/dist/lens.js +2 -2
  103. package/dist/mcp.js +1 -1
  104. package/dist/menu-surface.css +1 -1
  105. package/dist/modal.css +1 -1
  106. package/dist/modal.js +10 -10
  107. package/dist/modal.js.map +1 -1
  108. package/dist/morphing-text.css +2 -2
  109. package/dist/morphing-text.js +2 -2
  110. package/dist/motion-devtools.css +77 -2
  111. package/dist/motion-devtools.js +194 -37
  112. package/dist/motion-devtools.js.map +1 -1
  113. package/dist/motion-tokens.js +1 -1
  114. package/dist/multi-select.js +12 -12
  115. package/dist/number-field.js +3 -3
  116. package/dist/odometer.css +1 -1
  117. package/dist/odometer.js +2 -2
  118. package/dist/overlay.css +1 -1
  119. package/dist/pagination.css +1 -1
  120. package/dist/pagination.js +6 -4
  121. package/dist/pagination.js.map +1 -1
  122. package/dist/paint-CJQCM6ZO.js +260 -0
  123. package/dist/paint-CJQCM6ZO.js.map +1 -0
  124. package/dist/popover.css +1 -1
  125. package/dist/popover.js +10 -10
  126. package/dist/radio-group.css +6 -4
  127. package/dist/radio-group.js +6 -6
  128. package/dist/select.css +1 -1
  129. package/dist/select.js +12 -12
  130. package/dist/sheet.css +1 -1
  131. package/dist/sheet.js +9 -9
  132. package/dist/spinner.css +115 -0
  133. package/dist/spinner.js +4 -0
  134. package/dist/spinner.js.map +1 -0
  135. package/dist/status-badge.js +2 -2
  136. package/dist/styles.css +1 -1
  137. package/dist/support-rail.css +76 -238
  138. package/dist/support-rail.js +99 -107
  139. package/dist/support-rail.js.map +1 -1
  140. package/dist/table.css +2 -2
  141. package/dist/table.js +8 -6
  142. package/dist/table.js.map +1 -1
  143. package/dist/tabs.css +10 -14
  144. package/dist/tabs.js +17 -11
  145. package/dist/tabs.js.map +1 -1
  146. package/dist/tag.css +1 -1
  147. package/dist/tag.js +6 -6
  148. package/dist/text-field.js +3 -3
  149. package/dist/textarea.css +1 -1
  150. package/dist/textarea.js +2 -2
  151. package/dist/theme-grid.js +11 -0
  152. package/dist/theme-grid.js.map +1 -0
  153. package/dist/theme-switcher.css +107 -0
  154. package/dist/theme-switcher.js +70 -0
  155. package/dist/theme-switcher.js.map +1 -0
  156. package/dist/theme-transition-VGLPZDJI.js +346 -0
  157. package/dist/theme-transition-VGLPZDJI.js.map +1 -0
  158. package/dist/theme-transition.css +48 -0
  159. package/dist/theme.js +57 -26
  160. package/dist/theme.js.map +1 -1
  161. package/dist/tide-DJZMDAFT.js +57 -0
  162. package/dist/tide-DJZMDAFT.js.map +1 -0
  163. package/dist/tiktok.css +2 -3
  164. package/dist/tiktok.js +2 -2
  165. package/dist/time-field.js +4 -4
  166. package/dist/toast.css +2 -14
  167. package/dist/toast.js +12 -10
  168. package/dist/toast.js.map +1 -1
  169. package/dist/toggle-tag.js +2 -2
  170. package/dist/toggle.css +1 -1
  171. package/dist/tooltip.css +1 -1
  172. package/dist/tooltip.js +25 -22
  173. package/dist/tooltip.js.map +1 -1
  174. package/dist/trigger.css +1 -1
  175. package/dist/types/components/composites/date-picker/month-jump.d.ts +11 -0
  176. package/dist/types/components/composites/theme-switcher/ThemeGrid.d.ts +20 -0
  177. package/dist/types/components/composites/theme-switcher/ThemeSwitcher.d.ts +24 -0
  178. package/dist/types/components/compound/support-rail/SupportRail.d.ts +10 -8
  179. package/dist/types/components/dev/MotionDevtools.d.ts +10 -5
  180. package/dist/types/components/expressive/theme-transition/bloom.d.ts +2 -0
  181. package/dist/types/components/expressive/theme-transition/paint.d.ts +2 -0
  182. package/dist/types/components/expressive/theme-transition/scene.d.ts +24 -0
  183. package/dist/types/components/expressive/theme-transition/theme-transition.d.ts +19 -0
  184. package/dist/types/components/expressive/theme-transition/tide.d.ts +2 -0
  185. package/dist/types/components/internal/hooks/use-press-feedback.d.ts +7 -0
  186. package/dist/types/components/internal/icon/Icon.d.ts +1 -0
  187. package/dist/types/components/internal/overlay/layer.d.ts +7 -1
  188. package/dist/types/components/internal/utils/token-px.d.ts +1 -1
  189. package/dist/types/components/primitives/button/Button.d.ts +9 -12
  190. package/dist/types/components/primitives/button/button-style.d.ts +15 -0
  191. package/dist/types/components/primitives/spinner/Spinner.d.ts +27 -0
  192. package/dist/types/engine/animate.d.ts +1 -0
  193. package/dist/types/motion/motion-timing.d.ts +1 -1
  194. package/dist/types/tokens/component-styles.generated.d.ts +35 -38
  195. package/dist/types/tokens/motion-tokens.d.ts +5 -3
  196. package/dist/types/tokens/theme-store.d.ts +47 -0
  197. package/dist/types/tokens/theme-sync.d.ts +7 -1
  198. package/dist/types/tokens/theme-tokens.generated.d.ts +125 -115
  199. package/dist/types/tokens/theme.d.ts +28 -5
  200. package/dist/typing-lines.css +1 -1
  201. package/dist/typing-lines.js +2 -2
  202. package/dist/typing-lines.js.map +1 -1
  203. package/dist/weight-field.css +2 -2
  204. package/dist/youtube.css +1 -1
  205. package/dist/youtube.js +2 -2
  206. package/package.json +20 -24
  207. package/skills/zyncat-ui/SKILL.md +1 -1
  208. package/skills/zyncat-ui/references/components.md +5 -2
  209. package/skills/zyncat-ui/references/theming.md +31 -23
  210. package/src/components/composites/alert/Alert.tsx +7 -3
  211. package/src/components/composites/alert/alert.css +1 -1
  212. package/src/components/composites/date-picker/calendar-panel.tsx +10 -4
  213. package/src/components/composites/date-picker/date-picker.css +168 -43
  214. package/src/components/composites/date-picker/month-jump.tsx +192 -0
  215. package/src/components/composites/date-picker/range-panel.tsx +20 -5
  216. package/src/components/composites/dialog/Dialog.tsx +2 -2
  217. package/src/components/composites/dialog/dialog.css +4 -3
  218. package/src/components/composites/dropdown/Dropdown.tsx +5 -5
  219. package/src/components/composites/dropdown/dropdown.css +1 -1
  220. package/src/components/composites/emoji-picker/react/category-bar.tsx +17 -5
  221. package/src/components/composites/emoji-picker/scaffold.ts +6 -5
  222. package/src/components/composites/emoji-picker/styles.css +1 -1
  223. package/src/components/composites/modal/Modal.tsx +2 -2
  224. package/src/components/composites/modal/modal.css +1 -1
  225. package/src/components/composites/pagination/pagination.css +1 -1
  226. package/src/components/composites/popover/Popover.tsx +5 -5
  227. package/src/components/composites/popover/popover.css +1 -1
  228. package/src/components/composites/select/core/menu.tsx +15 -10
  229. package/src/components/composites/select/select.css +1 -1
  230. package/src/components/composites/sheet/Sheet.tsx +2 -2
  231. package/src/components/composites/sheet/sheet.css +1 -1
  232. package/src/components/composites/table/table.css +2 -2
  233. package/src/components/composites/tabs/Tabs.tsx +13 -7
  234. package/src/components/composites/tabs/tabs.css +10 -14
  235. package/src/components/composites/theme-switcher/ThemeGrid.tsx +133 -0
  236. package/src/components/composites/theme-switcher/ThemeGrid.usage.md +20 -0
  237. package/src/components/composites/theme-switcher/ThemeSwitcher.tsx +75 -0
  238. package/src/components/composites/theme-switcher/ThemeSwitcher.usage.md +21 -0
  239. package/src/components/composites/theme-switcher/theme-switcher.css +107 -0
  240. package/src/components/composites/toast/Toast.tsx +2 -1
  241. package/src/components/composites/toast/toast.css +2 -14
  242. package/src/components/composites/tooltip/tooltip-host.tsx +19 -17
  243. package/src/components/composites/tooltip/tooltip.css +1 -1
  244. package/src/components/compound/support-rail/SupportRail.tsx +116 -128
  245. package/src/components/compound/support-rail/SupportRail.usage.md +7 -6
  246. package/src/components/compound/support-rail/support-rail.css +76 -238
  247. package/src/components/dev/MotionDevtools.tsx +252 -42
  248. package/src/components/dev/MotionDevtools.usage.md +12 -4
  249. package/src/components/dev/motion-devtools.css +77 -2
  250. package/src/components/dev/slowmo-engine.ts +1 -1
  251. package/src/components/expressive/confetti/confetti.css +3 -3
  252. package/src/components/expressive/facebook-feed/facebook-feed.css +1 -1
  253. package/src/components/expressive/flow-field/FlowField.tsx +1 -1
  254. package/src/components/expressive/flow-field/flow-field.css +4 -4
  255. package/src/components/expressive/instagram-feed/instagram-feed.css +1 -1
  256. package/src/components/expressive/lens/lens.css +1 -2
  257. package/src/components/expressive/morphing-text/morphing-text.css +2 -2
  258. package/src/components/expressive/odometer/odometer.css +1 -1
  259. package/src/components/expressive/theme-transition/bloom.ts +88 -0
  260. package/src/components/expressive/theme-transition/paint.ts +296 -0
  261. package/src/components/expressive/theme-transition/scene.ts +38 -0
  262. package/src/components/expressive/theme-transition/theme-transition.css +48 -0
  263. package/src/components/expressive/theme-transition/theme-transition.ts +423 -0
  264. package/src/components/expressive/theme-transition/tide.ts +65 -0
  265. package/src/components/expressive/tiktok/tiktok.css +2 -3
  266. package/src/components/expressive/typing-lines/TypingLines.tsx +0 -0
  267. package/src/components/expressive/typing-lines/typing-lines.css +1 -1
  268. package/src/components/expressive/weight-field/weight-field.css +2 -2
  269. package/src/components/expressive/youtube/youtube.css +1 -1
  270. package/src/components/internal/glass/glass.css +1 -1
  271. package/src/components/internal/hooks/use-press-feedback.ts +52 -0
  272. package/src/components/internal/icon/Icon.tsx +2 -0
  273. package/src/components/internal/icon/icon.css +1 -1
  274. package/src/components/internal/menu/menu-surface.css +1 -1
  275. package/src/components/internal/overlay/layer.tsx +35 -2
  276. package/src/components/internal/overlay/overlay.css +1 -1
  277. package/src/components/internal/overlay/position.ts +2 -2
  278. package/src/components/internal/overlay/trigger.css +1 -1
  279. package/src/components/internal/utils/token-px.ts +4 -4
  280. package/src/components/primitives/avatar/avatar.css +3 -2
  281. package/src/components/primitives/badge/badge.css +1 -1
  282. package/src/components/primitives/badge/digit-strip.css +1 -1
  283. package/src/components/primitives/button/Button.tsx +28 -27
  284. package/src/components/primitives/button/button-style.ts +28 -0
  285. package/src/components/primitives/button/button.css +38 -31
  286. package/src/components/primitives/checkbox/checkbox.css +1 -1
  287. package/src/components/primitives/collapse/collapse.css +8 -5
  288. package/src/components/primitives/input/input.css +7 -4
  289. package/src/components/primitives/radio-group/radio-group.css +6 -4
  290. package/src/components/primitives/spinner/Spinner.tsx +70 -0
  291. package/src/components/primitives/spinner/Spinner.usage.md +19 -0
  292. package/src/components/primitives/spinner/spinner.css +115 -0
  293. package/src/components/primitives/tag/tag.css +1 -1
  294. package/src/components/primitives/textarea/textarea.css +1 -1
  295. package/src/components/primitives/toggle/toggle.css +1 -1
  296. package/src/engine/animate.ts +10 -2
  297. package/src/mcp/server.ts +2 -1
  298. package/src/motion/glide.tsx +9 -6
  299. package/src/motion/motion-timing.ts +5 -2
  300. package/src/styles.css +3 -4
  301. package/src/tokens/base.css +5 -5
  302. package/src/tokens/color.css +8 -9
  303. package/src/tokens/component-styles.generated.ts +36 -38
  304. package/src/tokens/dark.css +8 -13
  305. package/src/tokens/decisions.css +9 -12
  306. package/src/tokens/elevation.css +18 -26
  307. package/src/tokens/glass.css +3 -2
  308. package/src/tokens/motion-defaults.generated.ts +1 -1
  309. package/src/tokens/motion-tokens.ts +27 -8
  310. package/src/tokens/motion.css +9 -9
  311. package/src/tokens/radius.css +3 -2
  312. package/src/tokens/reset.css +36 -0
  313. package/src/tokens/semantic.css +12 -22
  314. package/src/tokens/spacing.css +1 -1
  315. package/src/tokens/theme-store.ts +187 -0
  316. package/src/tokens/theme-sync.tsx +49 -2
  317. package/src/tokens/theme-tokens.generated.ts +128 -116
  318. package/src/tokens/theme.tsx +96 -24
  319. package/src/tokens/theme.usage.md +25 -24
  320. package/src/tokens/typography.css +4 -3
  321. package/tailwind.css +8 -14
  322. package/dist/chunk-6SUHSSOK.js +0 -25
  323. package/dist/chunk-6SUHSSOK.js.map +0 -1
  324. package/dist/chunk-BH4JFWXQ.js.map +0 -1
  325. package/dist/chunk-CAXQJSIE.js.map +0 -1
  326. package/dist/chunk-FEXUS4SV.js.map +0 -1
  327. package/dist/chunk-FLQVOSFC.js.map +0 -1
  328. package/dist/chunk-GOLSYGRA.js.map +0 -1
  329. package/dist/chunk-IUQAUBVM.js.map +0 -1
  330. package/dist/chunk-K45CWVHS.js.map +0 -1
  331. package/dist/chunk-MDSRZ4QR.js.map +0 -1
  332. package/dist/chunk-N2GJEO5Z.js.map +0 -1
  333. package/dist/chunk-PWQVSVXR.js.map +0 -1
  334. package/dist/chunk-UE63OOVG.js +0 -13
  335. package/dist/chunk-UE63OOVG.js.map +0 -1
  336. package/dist/chunk-UYSXJ7MH.js +0 -52
  337. package/dist/chunk-UYSXJ7MH.js.map +0 -1
  338. package/dist/chunk-WZUTBJC4.js.map +0 -1
  339. package/src/tokens/fonts.css +0 -1
@@ -0,0 +1,115 @@
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.components;
2
+
3
+ @layer zyncat.components {
4
+ .zc-spin {
5
+ --_spinner-size: 1em;
6
+ --_spinner-stroke: 0.125em;
7
+ --_spinner-dim: 0.16;
8
+ --_spinner-onset: var(--duration-slowest);
9
+
10
+ display: inline-block;
11
+ vertical-align: middle;
12
+ flex: none;
13
+ color: inherit;
14
+ }
15
+
16
+ .zc-spin--sm {
17
+ font-size: var(--size-caption);
18
+ }
19
+ .zc-spin--md {
20
+ font-size: var(--size-heading);
21
+ }
22
+ .zc-spin--lg {
23
+ font-size: var(--size-title-lg);
24
+ }
25
+
26
+ .zc-spin--thin {
27
+ --_spinner-stroke: 0.09em;
28
+ }
29
+ .zc-spin--bold {
30
+ --_spinner-stroke: 0.19em;
31
+ }
32
+
33
+ .zc-spin__figure {
34
+ position: relative;
35
+ display: block;
36
+ inline-size: var(--_spinner-size);
37
+ block-size: var(--_spinner-size);
38
+ }
39
+
40
+ .zc-spin--delayed .zc-spin__figure {
41
+ animation: zc-spin-appear var(--duration-base) var(--ease-standard) var(--_spinner-onset) backwards;
42
+ }
43
+ @keyframes zc-spin-appear {
44
+ from {
45
+ opacity: 0;
46
+ }
47
+ }
48
+
49
+ .zc-spin--arc .zc-spin__figure {
50
+ border-radius: var(--radius-full);
51
+ border: var(--_spinner-stroke) solid currentColor;
52
+ border-inline-end-color: transparent;
53
+ animation: zc-spin-turn var(--duration-spin) linear infinite;
54
+ }
55
+ .zc-spin--delayed.zc-spin--arc .zc-spin__figure {
56
+ animation:
57
+ zc-spin-turn var(--duration-spin) linear infinite,
58
+ zc-spin-appear var(--duration-base) var(--ease-standard) var(--_spinner-onset) backwards;
59
+ }
60
+ @keyframes zc-spin-turn {
61
+ to {
62
+ rotate: 1turn;
63
+ }
64
+ }
65
+
66
+ .zc-spin--pulse .zc-spin__figure::before,
67
+ .zc-spin--pulse .zc-spin__figure::after {
68
+ content: '';
69
+ position: absolute;
70
+ inset: 0;
71
+ border-radius: var(--radius-full);
72
+ border: var(--_spinner-stroke) solid currentColor;
73
+ animation: zc-spin-ping var(--duration-spin) var(--ease-standard) infinite;
74
+ }
75
+ .zc-spin--pulse .zc-spin__figure::after {
76
+ animation-delay: calc(var(--duration-spin) / -2);
77
+ }
78
+ @keyframes zc-spin-ping {
79
+ from {
80
+ scale: 0.2;
81
+ opacity: 1;
82
+ }
83
+ to {
84
+ scale: 1;
85
+ opacity: 0;
86
+ }
87
+ }
88
+
89
+ .zc-spin--dots .zc-spin__figure {
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: space-between;
93
+ inline-size: calc(var(--_spinner-size) * 2);
94
+ }
95
+ .zc-spin--dots .zc-spin__part {
96
+ inline-size: calc(var(--_spinner-size) / 2.6);
97
+ block-size: calc(var(--_spinner-size) / 2.6);
98
+ border-radius: var(--radius-full);
99
+ background: currentColor;
100
+ animation: zc-spin-bob var(--duration-spin) var(--ease-standard) infinite;
101
+ animation-delay: calc(var(--_spinner-i) * var(--duration-spin) / 6);
102
+ }
103
+ @keyframes zc-spin-bob {
104
+ 0%,
105
+ 70%,
106
+ 100% {
107
+ scale: 0.6;
108
+ opacity: var(--_spinner-dim);
109
+ }
110
+ 35% {
111
+ scale: 1;
112
+ opacity: 1;
113
+ }
114
+ }
115
+ }
@@ -1,4 +1,4 @@
1
- @layer zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.components;
2
2
 
3
3
  @layer zyncat.components {
4
4
  .zc-tag {
@@ -1,4 +1,4 @@
1
- @layer zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.components;
2
2
 
3
3
  @layer zyncat.components {
4
4
  .zc-txa {
@@ -1,4 +1,4 @@
1
- @layer zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.components;
2
2
 
3
3
  @layer zyncat.components {
4
4
  .zc-sw {
@@ -19,6 +19,7 @@ export interface Layer {
19
19
  opacity?: number[];
20
20
  width?: Size[];
21
21
  height?: Size[];
22
+ radius?: string[];
22
23
  timing?: Timing;
23
24
  composite?: CompositeOperation;
24
25
  }
@@ -26,6 +27,11 @@ export interface Layer {
26
27
  export type Placement = Omit<Layer, 'timing' | 'composite'>;
27
28
 
28
29
  const RESET: Record<string, string> = { translate: '0px 0px', scale: '1' };
30
+ const CSS_NAME: Record<string, string> = { borderRadius: 'border-radius' };
31
+
32
+ function cssName(key: string): string {
33
+ return CSS_NAME[key] ?? key;
34
+ }
29
35
  const AUTO_METRIC = { width: 'offsetWidth', height: 'offsetHeight' } as const;
30
36
  const SIZES = ['width', 'height'] as const;
31
37
 
@@ -47,7 +53,7 @@ function cssLength(value: Length): string {
47
53
  }
48
54
 
49
55
  function currentValue(el: HTMLElement, key: string): string {
50
- const raw = getComputedStyle(el).getPropertyValue(key).trim();
56
+ const raw = getComputedStyle(el).getPropertyValue(cssName(key)).trim();
51
57
  return raw && raw !== 'none' ? raw : RESET[key];
52
58
  }
53
59
 
@@ -63,6 +69,7 @@ function compile(el: HTMLElement, layer: Layer) {
63
69
  }
64
70
  if (layer.scale) frames.scale = layer.scale.map((v) => (typeof v === 'number' ? String(v) : `${v[0]} ${v[1]}`));
65
71
  if (layer.opacity) frames.opacity = layer.opacity.map(String);
72
+ if (layer.radius) frames.borderRadius = [...layer.radius];
66
73
 
67
74
  for (const key of SIZES) {
68
75
  const list = layer[key];
@@ -115,7 +122,8 @@ function play(el: HTMLElement, layer: Layer): Playback | null {
115
122
 
116
123
  if (resolved.duration <= 0) {
117
124
  claim(el, keys, null);
118
- if (timing?.fill !== 'none') for (const key of keys) el.style.setProperty(key, frames[key][frames[key].length - 1]);
125
+ if (timing?.fill !== 'none')
126
+ for (const key of keys) el.style.setProperty(cssName(key), frames[key][frames[key].length - 1]);
119
127
  return null;
120
128
  }
121
129
 
package/src/mcp/server.ts CHANGED
@@ -382,7 +382,8 @@ const CONTRIBUTOR_TOOLS = [
382
382
  properties: {
383
383
  topic: {
384
384
  type: 'string',
385
- description: 'One section, e.g. "tokens", "contracts", "overrides", "compose", "tier". Omit for all.',
385
+ description:
386
+ 'One section, e.g. "tokens", "retiring", "contracts", "overrides", "compose", "tier". Omit for all.',
386
387
  },
387
388
  },
388
389
  additionalProperties: false,
@@ -3,7 +3,7 @@
3
3
  import { useCallback, useMemo, useRef, type RefObject } from 'react';
4
4
 
5
5
  import { animate, flip, measure, set, type Box } from '../engine';
6
- import { UIMotion as SM } from '../tokens/motion-tokens';
6
+ import { motionFor } from '../tokens/motion-tokens';
7
7
 
8
8
  export type GlideApi = ReturnType<typeof useGlide>;
9
9
 
@@ -36,20 +36,23 @@ export function useGlide<T extends HTMLElement>(containerRef: RefObject<T | null
36
36
  if (!box || !pill || !target) return;
37
37
  const at = layoutBox(target, box);
38
38
  if (!at) return;
39
+ const motion = motionFor(box);
39
40
  const was = measure(pill);
40
41
  set(pill, { x: [at.left], y: [at.top], width: [at.width], height: [at.height] });
41
- animate(pill, { opacity: [1], timing: { duration: SM.dur.fast, ease: SM.ease.standard } });
42
- const glided = visible.current && !SM.reduced && was.width > 0 && was.height > 0;
42
+ animate(pill, { opacity: [1], timing: { duration: motion.dur.fast, ease: motion.ease.standard } });
43
+ const glided = visible.current && !motion.reduced && was.width > 0 && was.height > 0;
43
44
  visible.current = true;
44
- if (glided) flip(pill, was, { size: 'morph', timing: SM.t.glide });
45
+ if (glided) flip(pill, was, { size: 'morph', timing: motion.t.glide });
45
46
  },
46
47
  [containerRef],
47
48
  );
48
49
 
49
50
  const leave = useCallback(() => {
50
51
  visible.current = false;
51
- if (ref.current) animate(ref.current, { opacity: [0], timing: { duration: SM.dur.fast, ease: SM.ease.exit } });
52
- }, []);
52
+ if (!ref.current) return;
53
+ const motion = motionFor(containerRef.current);
54
+ animate(ref.current, { opacity: [0], timing: { duration: motion.dur.fast, ease: motion.ease.exit } });
55
+ }, [containerRef]);
53
56
 
54
57
  return useMemo(() => ({ ref, enter, leave }), [enter, leave]);
55
58
  }
@@ -1,5 +1,5 @@
1
1
  import type { DurationToken, EaseToken } from '../tokens/motion-scale';
2
- import { UIMotion, type MotionTransition } from '../tokens/motion-tokens';
2
+ import { motionFor, type MotionTransition } from '../tokens/motion-tokens';
3
3
  import { resolveDirection, type DisableableAnimation, type TimingDirection } from './timing';
4
4
 
5
5
  export interface DirectionDefault {
@@ -20,13 +20,16 @@ export interface MotionTimings {
20
20
  export function resolveMotionTiming(
21
21
  animation: DisableableAnimation | undefined,
22
22
  defaults: MotionTimingDefaults,
23
+ scope?: Element | null,
23
24
  ): MotionTimings {
24
25
  if (animation === null) return { open: { duration: 0 }, close: { duration: 0 } };
25
26
 
27
+ const motion = motionFor(scope);
28
+
26
29
  const build = (dir: TimingDirection): MotionTransition => {
27
30
  const durToken = (animation && resolveDirection(animation.duration, dir)) || defaults[dir].duration;
28
31
  const easeToken = (animation && resolveDirection(animation.ease, dir)) || defaults[dir].ease;
29
- return { duration: UIMotion.dur[durToken], ease: UIMotion.ease[easeToken] };
32
+ return { duration: motion.dur[durToken], ease: motion.ease[easeToken] };
30
33
  };
31
34
 
32
35
  return { open: build('open'), close: build('close') };
package/src/styles.css CHANGED
@@ -1,11 +1,10 @@
1
1
  /* Zyncat UI global layer - import ONCE at your app root: import '@zyncat/ui/styles.css'.
2
- Fonts, tokens, the dark theme, the body defaults and the shared glass utility, in the `zyncat`
3
- layers so an unlayered rule of yours wins. Component CSS ships per component. Order matters. */
2
+ The reset layer is first, so everything else outranks it. Component CSS ships per component. */
4
3
 
5
- @layer zyncat.tokens, zyncat.components;
4
+ @layer zyncat.reset, zyncat.tokens, zyncat.components;
6
5
 
6
+ @import './tokens/reset.css';
7
7
  @import './tokens/decisions.css';
8
- @import './tokens/fonts.css';
9
8
 
10
9
  @import './tokens/color.css';
11
10
  @import './tokens/typography.css';
@@ -1,8 +1,4 @@
1
- /* The base layer paints the page - app surface, body ink, body type - so `data-theme` on <html>
2
- turns the whole page, not only the components. Its own cascade layer, after the components, so
3
- a consumer's unlayered body rule still wins; antialiasing keeps light ink from bloating. */
4
-
5
- @layer zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.components;
6
2
 
7
3
  @layer zyncat.base {
8
4
  body {
@@ -12,4 +8,8 @@
12
8
  -webkit-font-smoothing: antialiased;
13
9
  -moz-osx-font-smoothing: grayscale;
14
10
  }
11
+
12
+ ::selection {
13
+ background-color: color-mix(in oklab, var(--accent) 30%, transparent);
14
+ }
15
15
  }
@@ -1,12 +1,11 @@
1
- /* The neutral ramp and the shadow ink. The ramp is --neutral's hue at whisper chroma, peaking at
2
- the mid steps, so chrome, fills and text share the accent's temperature, and lightness is the
3
- contrast spine. The ramp is a material: the dark theme derives its roles from --neutral. */
4
-
5
- @layer zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.components;
6
2
 
7
3
  @layer zyncat.tokens {
8
- :root {
9
- --gray-0: oklch(1 0 0);
4
+ :root,
5
+ [data-theme],
6
+ [data-polarity] {
7
+ /* The top of the ramp, not pure white: it carries --neutral like every rung below it. */
8
+ --gray-0: oklch(from var(--neutral) 0.995 0.002 h);
10
9
  --gray-50: oklch(from var(--neutral) 0.984 0.003 h);
11
10
  --gray-100: oklch(from var(--neutral) 0.97 0.004 h);
12
11
  --gray-150: oklch(from var(--neutral) 0.954 0.005 h);
@@ -22,8 +21,8 @@
22
21
  }
23
22
 
24
23
  :root,
25
- [data-theme='light'] {
26
- /* Cool near-black shadow ink on the white canvas; the dark theme casts pure black. */
24
+ [data-polarity='light'] {
25
+ /* Cool near-black on the white canvas. */
27
26
  --shadow-rgb: 15 22 25;
28
27
  }
29
28
  }
@@ -9,17 +9,17 @@ import type { CSSProperties } from 'react';
9
9
  * Generated from the token and component CSS by `scripts/gen-theme.mjs` - `pnpm sync` rebuilds it.
10
10
  */
11
11
  export interface ConfettiStyle extends CSSProperties {
12
- /** `--confetti-paper-1` - The five papers a burst draws from; a slot set to a role follows the theme. Default: `oklch(0.53 0.2 288)`. */
12
+ /** `--confetti-paper-1` - The five papers a burst draws from. Default: `oklch(0.53 0.2 288)`. */
13
13
  '--confetti-paper-1'?: string | number;
14
- /** `--confetti-paper-2` - The five papers a burst draws from; a slot set to a role follows the theme. Default: `var(--accent)`. */
14
+ /** `--confetti-paper-2` - The five papers a burst draws from. Default: `var(--accent)`. */
15
15
  '--confetti-paper-2'?: string | number;
16
- /** `--confetti-paper-3` - The five papers a burst draws from; a slot set to a role follows the theme. Default: `oklch(0.78 0.115 62)`. */
16
+ /** `--confetti-paper-3` - The five papers a burst draws from. Default: `oklch(0.78 0.115 62)`. */
17
17
  '--confetti-paper-3'?: string | number;
18
- /** `--confetti-paper-4` - The five papers a burst draws from; a slot set to a role follows the theme. Default: `oklch(0.67 0.18 12)`. */
18
+ /** `--confetti-paper-4` - The five papers a burst draws from. Default: `oklch(0.67 0.18 12)`. */
19
19
  '--confetti-paper-4'?: string | number;
20
- /** `--confetti-paper-5` - The five papers a burst draws from; a slot set to a role follows the theme. Default: `var(--text-strong)`. */
20
+ /** `--confetti-paper-5` - The five papers a burst draws from. Default: `var(--text-strong)`. */
21
21
  '--confetti-paper-5'?: string | number;
22
- /** `--confetti-weights` - How often each paper appears - five weights, in slot order. Default: `1 1 1 1 0.45`. */
22
+ /** `--confetti-weights` - How often each paper appears, in slot order. Default: `1 1 1 1 0.45`. */
23
23
  '--confetti-weights'?: string | number;
24
24
  /** `--confetti-ink` - What the reverse side of a piece darkens toward. Default: `var(--text-strong)`. */
25
25
  '--confetti-ink'?: string | number;
@@ -35,35 +35,35 @@ export interface ConfettiStyle extends CSSProperties {
35
35
 
36
36
  /** Inline styles for FlowField, including its `--flow-field-*` knobs. */
37
37
  export interface FlowFieldStyle extends CSSProperties {
38
- /** `--flow-field-ink` - The particle colour at rest - the ramp's cold end. Default: `var(--text-subtle)`. */
38
+ /** `--flow-field-ink` - The particle colour at rest. Default: `var(--text-subtle)`. */
39
39
  '--flow-field-ink'?: string | number;
40
- /** `--flow-field-accent` - The particle colour at full speed - the ramp's hot end. Default: `var(--accent)`. */
40
+ /** `--flow-field-accent` - The particle colour at full speed. Default: `var(--accent)`. */
41
41
  '--flow-field-accent'?: string | number;
42
42
  /** `--flow-field-min-height` - The field's minimum height before content sizes it. Default: `var(--space-10)`. */
43
43
  '--flow-field-min-height'?: string | number;
44
- /** `--flow-field-ramp-0` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `var(--flow-field-ink)`. */
44
+ /** `--flow-field-ramp-0` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `var(--flow-field-ink)`. */
45
45
  '--flow-field-ramp-0'?: string | number;
46
- /** `--flow-field-ramp-1` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 9%, var(--flow-field-ink))`. */
46
+ /** `--flow-field-ramp-1` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 9%, var(--flow-field-ink))`. */
47
47
  '--flow-field-ramp-1'?: string | number;
48
- /** `--flow-field-ramp-2` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 18%, var(--flow-field-ink))`. */
48
+ /** `--flow-field-ramp-2` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 18%, var(--flow-field-ink))`. */
49
49
  '--flow-field-ramp-2'?: string | number;
50
- /** `--flow-field-ramp-3` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 27%, var(--flow-field-ink))`. */
50
+ /** `--flow-field-ramp-3` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 27%, var(--flow-field-ink))`. */
51
51
  '--flow-field-ramp-3'?: string | number;
52
- /** `--flow-field-ramp-4` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 36%, var(--flow-field-ink))`. */
52
+ /** `--flow-field-ramp-4` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 36%, var(--flow-field-ink))`. */
53
53
  '--flow-field-ramp-4'?: string | number;
54
- /** `--flow-field-ramp-5` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 45%, var(--flow-field-ink))`. */
54
+ /** `--flow-field-ramp-5` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 45%, var(--flow-field-ink))`. */
55
55
  '--flow-field-ramp-5'?: string | number;
56
- /** `--flow-field-ramp-6` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 55%, var(--flow-field-ink))`. */
56
+ /** `--flow-field-ramp-6` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 55%, var(--flow-field-ink))`. */
57
57
  '--flow-field-ramp-6'?: string | number;
58
- /** `--flow-field-ramp-7` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 64%, var(--flow-field-ink))`. */
58
+ /** `--flow-field-ramp-7` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 64%, var(--flow-field-ink))`. */
59
59
  '--flow-field-ramp-7'?: string | number;
60
- /** `--flow-field-ramp-8` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 73%, var(--flow-field-ink))`. */
60
+ /** `--flow-field-ramp-8` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 73%, var(--flow-field-ink))`. */
61
61
  '--flow-field-ramp-8'?: string | number;
62
- /** `--flow-field-ramp-9` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 82%, var(--flow-field-ink))`. */
62
+ /** `--flow-field-ramp-9` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 82%, var(--flow-field-ink))`. */
63
63
  '--flow-field-ramp-9'?: string | number;
64
- /** `--flow-field-ramp-10` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 91%, var(--flow-field-ink))`. */
64
+ /** `--flow-field-ramp-10` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 91%, var(--flow-field-ink))`. */
65
65
  '--flow-field-ramp-10'?: string | number;
66
- /** `--flow-field-ramp-11` - The twelve stops from ink to accent, sampled at the next measure; set all twelve for a ramp of your own. Default: `var(--flow-field-accent)`. */
66
+ /** `--flow-field-ramp-11` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `var(--flow-field-accent)`. */
67
67
  '--flow-field-ramp-11'?: string | number;
68
68
  }
69
69
 
@@ -91,7 +91,7 @@ export interface MorphingTextStyle extends CSSProperties {
91
91
  '--morphing-text-leading'?: string | number;
92
92
  /** `--morphing-text-tracking` - Letter spacing. Default: `var(--tracking-display)`. */
93
93
  '--morphing-text-tracking'?: string | number;
94
- /** `--morphing-text-smear` - How much letters blur on the way between words; 0 cuts clean. Default: `1`. */
94
+ /** `--morphing-text-smear` - How much letters blur between words, 0 cutting clean. Default: `1`. */
95
95
  '--morphing-text-smear'?: string | number;
96
96
  /** `--morphing-text-rule-ink` - The rule at rest. Default: `var(--text-strong)`. */
97
97
  '--morphing-text-rule-ink'?: string | number;
@@ -119,6 +119,12 @@ export interface OdometerStyle extends CSSProperties {
119
119
  '--odometer-weight'?: string | number;
120
120
  }
121
121
 
122
+ /** Inline styles for ThemeTransition, including its `--theme-transition-*` knobs. */
123
+ export interface ThemeTransitionStyle extends CSSProperties {
124
+ /** `--theme-transition-layer` - The z-index the arriving page paints at, above every panel it covers. Default: `var(--layer-infinity)`. */
125
+ '--theme-transition-layer'?: string | number;
126
+ }
127
+
122
128
  /** Inline styles for TypingLines, including its `--typing-lines-*` knobs. */
123
129
  export interface TypingLinesStyle extends CSSProperties {
124
130
  /** `--typing-lines-ink` - Letter ink. Default: `var(--text-strong)`. */
@@ -161,7 +167,7 @@ export interface WeightFieldStyle extends CSSProperties {
161
167
  '--weight-field-peak-weight'?: string | number;
162
168
  /** `--weight-field-hover-padding` - How much a unit widens under the pointer. Default: `calc(1em / 12)`. */
163
169
  '--weight-field-hover-padding'?: string | number;
164
- /** `--weight-field-stroke` - The text stroke every unit carries; the peak letter doubles it. Default: `calc(1em * 125 / 6000)`. */
170
+ /** `--weight-field-stroke` - The text stroke every unit carries, doubled on the peak letter. Default: `calc(1em * 125 / 6000)`. */
165
171
  '--weight-field-stroke'?: string | number;
166
172
  /** `--weight-field-duration` - How long a unit takes to settle at a new weight. Default: `400ms`. */
167
173
  '--weight-field-duration'?: string | number;
@@ -171,28 +177,20 @@ export interface WeightFieldStyle extends CSSProperties {
171
177
 
172
178
  /** Inline styles for SupportRail, including its `--support-rail-*` knobs. */
173
179
  export interface SupportRailStyle extends CSSProperties {
174
- /** `--support-rail-width` - Panel width; the rail never exceeds its container. Default: `318px`. */
180
+ /** `--support-rail-width` - Panel width, capped by the container. Default: `318px`. */
175
181
  '--support-rail-width'?: string | number;
176
- /** `--support-rail-row-pad-block` - Row padding on the block axis - the density knob. Default: `var(--space-4)`. */
182
+ /** `--support-rail-row-pad-block` - Row padding on the block axis. Default: `var(--space-3)`. */
177
183
  '--support-rail-row-pad-block'?: string | number;
178
- /** `--support-rail-row-pad-inline` - Row padding on the inline axis - the density knob. Default: `var(--space-4)`. */
184
+ /** `--support-rail-row-pad-inline` - Row padding on the inline axis. Default: `var(--space-4)`. */
179
185
  '--support-rail-row-pad-inline'?: string | number;
180
- /** `--support-rail-surface` - The panel and the needle. Default: `var(--bg-subtle)`. */
186
+ /** `--support-rail-surface` - The tab, and the panel it morphs into. Default: `var(--bg-subtle)`. */
181
187
  '--support-rail-surface'?: string | number;
182
- /** `--support-rail-surface-raised` - The needle while hovered. Default: `var(--bg-surface)`. */
188
+ /** `--support-rail-surface-raised` - The tab while hovered. Default: `var(--bg-surface)`. */
183
189
  '--support-rail-surface-raised'?: string | number;
184
- /** `--support-rail-line` - The panel's edge and the needle's border. Default: `var(--border-default)`. */
190
+ /** `--support-rail-line` - The surface's edge. Default: `var(--border-default)`. */
185
191
  '--support-rail-line'?: string | number;
186
- /** `--support-rail-line-soft` - Row dividers and the grabber's edge. Default: `var(--border-subtle)`. */
192
+ /** `--support-rail-line-soft` - Row dividers. Default: `var(--border-subtle)`. */
187
193
  '--support-rail-line-soft'?: string | number;
188
- /** `--support-rail-accent` - The needle's rule. Default: `var(--accent)`. */
189
- '--support-rail-accent'?: string | number;
190
- /** `--support-rail-live-color` - The live dot and its pulse. Default: `var(--success)`. */
191
- '--support-rail-live-color'?: string | number;
192
- /** `--support-rail-radius` - The needle's outer corners. Default: `var(--radius-2xl)`. */
194
+ /** `--support-rail-radius` - The tab's outer corners. Default: `var(--radius-2xl)`. */
193
195
  '--support-rail-radius'?: string | number;
194
- /** `--support-rail-open-duration` - How long the panel takes to open. Default: `calc(var(--duration-slower) * 1.4)`. */
195
- '--support-rail-open-duration'?: string | number;
196
- /** `--support-rail-close-duration` - How long the panel takes to close. Default: `var(--duration-slower)`. */
197
- '--support-rail-close-duration'?: string | number;
198
196
  }
@@ -1,19 +1,15 @@
1
- /* The dark theme - `data-theme="dark"` on <html> or any subtree root, `data-theme="light"` for a
2
- light island inside it. Every value here is a polarity with a light twin, and gen-theme holds
3
- the two sides together. Surfaces step lighter as they rise; ink steps down from near-white. */
4
-
5
- @layer zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.components;
6
2
 
7
3
  @layer zyncat.tokens {
8
- [data-theme='dark'] {
4
+ [data-polarity='dark'] {
9
5
  color-scheme: dark;
10
6
 
11
7
  --bg-app: oklch(from var(--neutral) 0.165 0.006 h);
12
- --bg-surface: oklch(from var(--neutral) 0.195 0.007 h);
13
- --bg-surface-raised: oklch(from var(--neutral) 0.24 0.008 h);
14
- --bg-subtle: oklch(from var(--neutral) 0.222 0.007 h);
15
- --bg-muted: oklch(from var(--neutral) 0.255 0.008 h);
16
- --bg-inset: oklch(from var(--neutral) 0.13 0.006 h);
8
+ --bg-surface: oklch(from var(--neutral) 0.165 0.006 h);
9
+ --bg-surface-raised: oklch(from var(--neutral) 0.195 0.007 h);
10
+ --bg-subtle: oklch(from var(--neutral) 0.154 0.006 h);
11
+ --bg-muted: oklch(from var(--neutral) 0.14 0.007 h);
12
+ --bg-inset: oklch(from var(--neutral) 0.124 0.007 h);
17
13
  --bg-overlay: oklch(from var(--neutral) 0.06 0.004 h / 0.64);
18
14
 
19
15
  --text-strong: oklch(from var(--neutral) 0.975 0.003 h);
@@ -33,8 +29,7 @@
33
29
  --sheen-strength: 0.2;
34
30
  --glow-strength: 1;
35
31
 
36
- /* The fills drop a step, since a light face reads as a light source on dark, and the lift they
37
- rise to stays put. The steps the light side pins near white re-derive from their decision. */
32
+ /* A light face reads as a light source on dark, so the fills drop a step while the lift stays put. */
38
33
  --accent-fill: oklch(from var(--accent) calc(l - 0.06) calc(c - 0.01) h);
39
34
  --accent-subtle: oklch(from var(--accent) 0.27 0.045 h);
40
35
  --accent-border: oklch(from var(--accent) 0.45 0.09 h);
@@ -1,10 +1,8 @@
1
- /* The decisions - the values the rest of the vocabulary derives from. zyncat-ui init copies the
2
- :root block below, comments included, into the project as zyncat.theme.css. */
3
-
4
- @layer zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.components;
5
2
 
6
3
  @layer zyncat.tokens {
7
- :root {
4
+ :root,
5
+ [data-theme='default'] {
8
6
  /* The brand hue - hover, active, lift, subtle, border, wash, the focus ring and info follow. */
9
7
  --accent: oklch(0.63 0.118 198);
10
8
  /* Positive status - its subtle, text and wash follow. */
@@ -13,14 +11,13 @@
13
11
  --warning: oklch(0.7 0.142 75);
14
12
  /* Destructive actions and errors - the danger button ladder, ring, subtle, text and wash follow. */
15
13
  --danger: oklch(0.545 0.196 27);
16
- /* The gray ramp's hue - the accent by default, so chrome shares its temperature. A fixed colour
17
- cuts the grays loose. Read on :root only: a themed subtree inherits the ramp. */
14
+ /* The gray ramp's hue - the accent by default, so chrome shares its temperature. */
18
15
  --neutral: var(--accent);
19
- /* Roundness - every --radius-<step> is a fixed ratio of it; 0 squares every corner. */
16
+ /* Roundness - every --radius-<step> is a fixed ratio of it, 0 squaring every corner. */
20
17
  --radius: 0.5rem;
21
- /* The body face - every --type-* bundle follows. */
22
- --font-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
23
- /* The code face - --type-code follows. */
24
- --font-code: 'Geist Mono', ui-monospace, 'SF Mono', 'Menlo', monospace;
18
+ /* The body face - every --type-* bundle follows. The package loads no webfont; point this at yours. */
19
+ --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
20
+ /* The code face - --type-code follows. The package loads no webfont; point this at yours. */
21
+ --font-code: ui-monospace, 'SF Mono', 'Menlo', monospace;
25
22
  }
26
23
  }
@@ -1,36 +1,32 @@
1
- /* Elevation - shadows, top-light highlights, rings and border widths, on every theme root.
2
- Three strengths scale the lighting per polarity: every shadow, white highlight and cast-light
3
- alpha is a multiple of --shadow-strength, --sheen-strength or --glow-strength. */
4
-
5
- @layer zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.components;
6
2
 
7
3
  @layer zyncat.tokens {
8
4
  :root {
9
- /* Border widths - weight comes from the colour, not the thickness. */
10
5
  --border-hairline: 1px;
11
6
  --border-emphasis: 1.5px;
12
7
 
13
- /* How far every focus ring reaches past the border box - the exact room a clipping
14
- ancestor reserves so a ring is never cut. */
8
+ /* How far every focus ring reaches past the border box. */
15
9
  --ring-width: 3px;
16
10
 
17
- --layer-overlay: 1000; /* a band - each overlay adds its stack depth, so a later one paints above an earlier one */
11
+ --layer-overlay: 1000; /* a band - each overlay adds its stack depth on top */
18
12
  --layer-toast: 1050;
19
13
  --layer-tooltip: 1100;
14
+ --layer-infinity: 2147483647;
20
15
  }
21
16
 
22
17
  :root,
23
- [data-theme='light'] {
24
- /* Multiplies every shadow alpha - 1 on the white canvas; black on dark needs 3-4x to read. */
18
+ [data-polarity='light'] {
19
+ /* Multiplies every shadow alpha - 3-4x on dark. */
25
20
  --shadow-strength: 1;
26
- /* Multiplies every white top-light highlight - 1 on the white canvas, a fifth on dark. */
21
+ /* Multiplies every white top-light highlight. */
27
22
  --sheen-strength: 1;
28
- /* Multiplies the light a lifted hue fill casts around it - off on the white canvas, on in dark. */
23
+ /* Multiplies the light a lifted hue fill casts around it - off on the white canvas. */
29
24
  --glow-strength: 0;
30
25
  }
31
26
 
32
27
  :root,
33
- [data-theme] {
28
+ [data-theme],
29
+ [data-polarity] {
34
30
  --shadow-xs: 0 1px 1px rgb(var(--shadow-rgb) / calc(0.04 * var(--shadow-strength)));
35
31
  --shadow-sm:
36
32
  0 1px 2px rgb(var(--shadow-rgb) / calc(0.05 * var(--shadow-strength))),
@@ -38,8 +34,6 @@
38
34
  --shadow-md:
39
35
  0 2px 4px rgb(var(--shadow-rgb) / calc(0.04 * var(--shadow-strength))),
40
36
  0 6px 12px rgb(var(--shadow-rgb) / calc(0.07 * var(--shadow-strength)));
41
- /* The floating steps are three layers: a tight contact shadow, a mid layer for form, a wide
42
- ambient one. Without the contact layer the panel reads soft and unanchored. */
43
37
  --shadow-lg:
44
38
  0 1px 2px rgb(var(--shadow-rgb) / calc(0.06 * var(--shadow-strength))),
45
39
  0 4px 8px rgb(var(--shadow-rgb) / calc(0.04 * var(--shadow-strength))),
@@ -49,34 +43,32 @@
49
43
  0 8px 16px rgb(var(--shadow-rgb) / calc(0.06 * var(--shadow-strength))),
50
44
  0 24px 48px rgb(var(--shadow-rgb) / calc(0.14 * var(--shadow-strength)));
51
45
 
52
- /* Focus & selection ring hues - each tracks its role; danger rings on its fill tone, the
53
- lighter face the destructive button rests on. */
46
+ /* Danger rings on its fill tone, the lighter face the destructive button rests on. */
54
47
  --ring-color-accent: color-mix(in oklab, var(--accent) 32%, transparent);
55
48
  --ring-color-danger: oklch(from var(--danger) 0.602 0.196 h / 0.3);
56
49
  --ring-color-warning: color-mix(in oklab, var(--warning) 30%, transparent);
57
50
  --ring-color-success: color-mix(in oklab, var(--success) 30%, transparent);
58
51
 
59
- /* The rings themselves - outline values, so a ring never shares box-shadow with elevation and a
60
- clipping ancestor can reserve exactly --ring-width. Outlines follow border-radius everywhere
61
- this library supports. --ring-rest is the resting ring a control fades in from; --ring-inset
62
- is the offset that turns a ring inward, for a control flush with a clipping edge. */
52
+ /* Outlines, not box-shadow, so a ring never collides with elevation and still follows border-radius. */
63
53
  --ring-rest: var(--ring-width) solid transparent;
64
54
  --ring-inset: calc(var(--ring-width) * -1);
55
+ /* The room a clipping container holds open for a child's ring. */
56
+ --ring-gutter: var(--ring-width);
65
57
  --ring-accent: var(--ring-width) solid var(--ring-color-accent);
66
58
  --ring-danger: var(--ring-width) solid var(--ring-color-danger);
67
59
  --ring-warning: var(--ring-width) solid var(--ring-color-warning);
68
60
  --ring-success: var(--ring-width) solid var(--ring-color-success);
69
61
 
70
- /* Cast light - the hover of the primary and destructive buttons; each tracks its ring's hue. */
71
62
  --glow-accent: 0 4px 16px oklch(from var(--accent) l c h / calc(0.4 * var(--glow-strength)));
72
63
  --glow-danger: 0 4px 16px oklch(from var(--danger) 0.602 0.196 h / calc(0.4 * var(--glow-strength)));
73
64
  }
74
65
 
75
- /* Forced colours repaint every outline-color, transparent included, so the resting ring would
76
- sit on every control as a permanent border. It costs the fade-in, not the ring. */
66
+ /* Forced colours repaint every outline-color, transparent included - the resting ring would sit
67
+ on every control as a permanent border. */
77
68
  @media (forced-colors: active) {
78
69
  :root,
79
- [data-theme] {
70
+ [data-theme],
71
+ [data-polarity] {
80
72
  --ring-rest: none;
81
73
  }
82
74
  }