@zyncat/ui 0.15.0 → 0.17.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 (290) 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 +21 -24
  10. package/dist/button.js +3 -1
  11. package/dist/checkbox.css +1 -1
  12. package/dist/chunk-2YGHPQ66.js +16 -0
  13. package/dist/chunk-2YGHPQ66.js.map +1 -0
  14. package/dist/{chunk-K45CWVHS.js → chunk-3MLUH2QL.js} +4 -4
  15. package/dist/{chunk-K45CWVHS.js.map → chunk-3MLUH2QL.js.map} +1 -1
  16. package/dist/{chunk-FVPNICF4.js → chunk-4PQDVK23.js} +4 -4
  17. package/dist/{chunk-FVPNICF4.js.map → chunk-4PQDVK23.js.map} +1 -1
  18. package/dist/{chunk-FLQVOSFC.js → chunk-6IXLW7QA.js} +7 -7
  19. package/dist/{chunk-FLQVOSFC.js.map → chunk-6IXLW7QA.js.map} +1 -1
  20. package/dist/chunk-7NHY2CRA.js +132 -0
  21. package/dist/chunk-7NHY2CRA.js.map +1 -0
  22. package/dist/{chunk-BH4JFWXQ.js → chunk-7VTWJL72.js} +19 -16
  23. package/dist/chunk-7VTWJL72.js.map +1 -0
  24. package/dist/chunk-7ZSIUUC3.js +50 -0
  25. package/dist/chunk-7ZSIUUC3.js.map +1 -0
  26. package/dist/{chunk-6X3G4GIM.js → chunk-DH7DT6EO.js} +3 -3
  27. package/dist/{chunk-6X3G4GIM.js.map → chunk-DH7DT6EO.js.map} +1 -1
  28. package/dist/{chunk-QGVFFT2B.js → chunk-EOWWVFBF.js} +3 -3
  29. package/dist/{chunk-QGVFFT2B.js.map → chunk-EOWWVFBF.js.map} +1 -1
  30. package/dist/{chunk-RBSHRRNO.js → chunk-FLDIRXFU.js} +5 -5
  31. package/dist/{chunk-RBSHRRNO.js.map → chunk-FLDIRXFU.js.map} +1 -1
  32. package/dist/{chunk-5GBV45YD.js → chunk-GWCBTD63.js} +3 -3
  33. package/dist/{chunk-5GBV45YD.js.map → chunk-GWCBTD63.js.map} +1 -1
  34. package/dist/chunk-GZ6UMHCK.js +103 -0
  35. package/dist/chunk-GZ6UMHCK.js.map +1 -0
  36. package/dist/{chunk-FEXUS4SV.js → chunk-HWDIVGME.js} +11 -5
  37. package/dist/chunk-HWDIVGME.js.map +1 -0
  38. package/dist/chunk-KSAJ6DED.js +16 -0
  39. package/dist/chunk-KSAJ6DED.js.map +1 -0
  40. package/dist/{chunk-UYSXJ7MH.js → chunk-LH2UIEKN.js} +7 -17
  41. package/dist/chunk-LH2UIEKN.js.map +1 -0
  42. package/dist/{chunk-CAXQJSIE.js → chunk-M2A6PZ7J.js} +6 -6
  43. package/dist/{chunk-CAXQJSIE.js.map → chunk-M2A6PZ7J.js.map} +1 -1
  44. package/dist/chunk-NYQQH4R5.js +40 -0
  45. package/dist/chunk-NYQQH4R5.js.map +1 -0
  46. package/dist/{chunk-BTF6DAE3.js → chunk-ODRO3KS6.js} +4 -4
  47. package/dist/{chunk-BTF6DAE3.js.map → chunk-ODRO3KS6.js.map} +1 -1
  48. package/dist/{chunk-GJTHWB6O.js → chunk-QDAN43B6.js} +3 -3
  49. package/dist/{chunk-GJTHWB6O.js.map → chunk-QDAN43B6.js.map} +1 -1
  50. package/dist/{chunk-MDSRZ4QR.js → chunk-RY35IU3G.js} +3 -3
  51. package/dist/{chunk-MDSRZ4QR.js.map → chunk-RY35IU3G.js.map} +1 -1
  52. package/dist/{chunk-GOLSYGRA.js → chunk-TBLPZQSI.js} +84 -48
  53. package/dist/chunk-TBLPZQSI.js.map +1 -0
  54. package/dist/{chunk-5X3MJRIM.js → chunk-UKPX3RIP.js} +3 -3
  55. package/dist/{chunk-5X3MJRIM.js.map → chunk-UKPX3RIP.js.map} +1 -1
  56. package/dist/{chunk-CFRGQJ23.js → chunk-VZXML7EH.js} +4 -4
  57. package/dist/{chunk-CFRGQJ23.js.map → chunk-VZXML7EH.js.map} +1 -1
  58. package/dist/{chunk-PWQVSVXR.js → chunk-WC45VSST.js} +8 -8
  59. package/dist/{chunk-PWQVSVXR.js.map → chunk-WC45VSST.js.map} +1 -1
  60. package/dist/chunk-WQKWPI6V.js +196 -0
  61. package/dist/chunk-WQKWPI6V.js.map +1 -0
  62. package/dist/{chunk-N2GJEO5Z.js → chunk-ZHMOH62S.js} +4 -4
  63. package/dist/chunk-ZHMOH62S.js.map +1 -0
  64. package/dist/cli.js +259 -43
  65. package/dist/collapse.css +8 -5
  66. package/dist/confetti.css +3 -3
  67. package/dist/confetti.js +2 -2
  68. package/dist/date-field.js +16 -14
  69. package/dist/date-field.js.map +1 -1
  70. package/dist/date-picker.css +168 -43
  71. package/dist/date-range-field.js +38 -23
  72. package/dist/date-range-field.js.map +1 -1
  73. package/dist/datetime-field.js +17 -15
  74. package/dist/datetime-field.js.map +1 -1
  75. package/dist/dialog.css +4 -3
  76. package/dist/dialog.js +8 -8
  77. package/dist/digit-strip.css +1 -1
  78. package/dist/dropdown.css +1 -1
  79. package/dist/dropdown.js +8 -8
  80. package/dist/emoji-picker.js +14 -14
  81. package/dist/facebook-feed.css +1 -1
  82. package/dist/flow-field.css +4 -4
  83. package/dist/flow-field.js +3 -3
  84. package/dist/flow-field.js.map +1 -1
  85. package/dist/glide.js +3 -3
  86. package/dist/icon.css +1 -1
  87. package/dist/input.css +7 -4
  88. package/dist/instagram-feed.css +1 -1
  89. package/dist/instagram-feed.js +2 -2
  90. package/dist/lens.css +1 -2
  91. package/dist/lens.js +2 -2
  92. package/dist/mcp.js +1 -1
  93. package/dist/menu-surface.css +1 -1
  94. package/dist/modal.css +1 -1
  95. package/dist/modal.js +6 -6
  96. package/dist/morphing-text.css +2 -2
  97. package/dist/morphing-text.js +2 -2
  98. package/dist/motion-devtools.css +77 -2
  99. package/dist/motion-devtools.js +194 -37
  100. package/dist/motion-devtools.js.map +1 -1
  101. package/dist/motion-tokens.js +1 -1
  102. package/dist/multi-select.js +9 -9
  103. package/dist/number-field.js +3 -3
  104. package/dist/odometer.css +1 -1
  105. package/dist/odometer.js +2 -2
  106. package/dist/overlay.css +1 -1
  107. package/dist/pagination.css +1 -1
  108. package/dist/pagination.js +6 -4
  109. package/dist/pagination.js.map +1 -1
  110. package/dist/paint-CJQCM6ZO.js +260 -0
  111. package/dist/paint-CJQCM6ZO.js.map +1 -0
  112. package/dist/popover.css +1 -1
  113. package/dist/popover.js +6 -6
  114. package/dist/radio-group.css +6 -4
  115. package/dist/radio-group.js +6 -6
  116. package/dist/select.css +1 -1
  117. package/dist/select.js +9 -9
  118. package/dist/sheet.css +1 -1
  119. package/dist/sheet.js +7 -7
  120. package/dist/spinner.css +115 -0
  121. package/dist/spinner.js +4 -0
  122. package/dist/spinner.js.map +1 -0
  123. package/dist/status-badge.js +2 -2
  124. package/dist/styles.css +1 -1
  125. package/dist/support-rail.css +76 -238
  126. package/dist/support-rail.js +97 -105
  127. package/dist/support-rail.js.map +1 -1
  128. package/dist/table.css +2 -2
  129. package/dist/table.js +8 -6
  130. package/dist/table.js.map +1 -1
  131. package/dist/tabs.css +10 -14
  132. package/dist/tabs.js +6 -6
  133. package/dist/tag.css +1 -1
  134. package/dist/tag.js +6 -6
  135. package/dist/text-field.js +3 -3
  136. package/dist/textarea.css +1 -1
  137. package/dist/textarea.js +2 -2
  138. package/dist/theme-grid.js +11 -0
  139. package/dist/theme-grid.js.map +1 -0
  140. package/dist/theme-switcher.css +107 -0
  141. package/dist/theme-switcher.js +70 -0
  142. package/dist/theme-switcher.js.map +1 -0
  143. package/dist/theme-transition-LLC644ZR.js +346 -0
  144. package/dist/theme-transition-LLC644ZR.js.map +1 -0
  145. package/dist/theme-transition.css +48 -0
  146. package/dist/theme.js +57 -26
  147. package/dist/theme.js.map +1 -1
  148. package/dist/tide-DJZMDAFT.js +57 -0
  149. package/dist/tide-DJZMDAFT.js.map +1 -0
  150. package/dist/tiktok.css +2 -3
  151. package/dist/tiktok.js +2 -2
  152. package/dist/time-field.js +4 -4
  153. package/dist/toast.css +2 -14
  154. package/dist/toast.js +11 -9
  155. package/dist/toast.js.map +1 -1
  156. package/dist/toggle-tag.js +2 -2
  157. package/dist/toggle.css +1 -1
  158. package/dist/tooltip.css +1 -1
  159. package/dist/tooltip.js +5 -5
  160. package/dist/trigger.css +1 -1
  161. package/dist/types/components/composites/date-picker/month-jump.d.ts +11 -0
  162. package/dist/types/components/composites/theme-switcher/ThemeGrid.d.ts +20 -0
  163. package/dist/types/components/composites/theme-switcher/ThemeSwitcher.d.ts +24 -0
  164. package/dist/types/components/compound/support-rail/SupportRail.d.ts +10 -8
  165. package/dist/types/components/dev/MotionDevtools.d.ts +10 -5
  166. package/dist/types/components/expressive/theme-transition/bloom.d.ts +2 -0
  167. package/dist/types/components/expressive/theme-transition/paint.d.ts +2 -0
  168. package/dist/types/components/expressive/theme-transition/scene.d.ts +24 -0
  169. package/dist/types/components/expressive/theme-transition/theme-transition.d.ts +19 -0
  170. package/dist/types/components/expressive/theme-transition/tide.d.ts +2 -0
  171. package/dist/types/components/internal/icon/Icon.d.ts +1 -0
  172. package/dist/types/components/primitives/button/Button.d.ts +9 -12
  173. package/dist/types/components/primitives/button/button-style.d.ts +15 -0
  174. package/dist/types/components/primitives/spinner/Spinner.d.ts +27 -0
  175. package/dist/types/engine/animate.d.ts +1 -0
  176. package/dist/types/tokens/component-styles.generated.d.ts +35 -38
  177. package/dist/types/tokens/motion-tokens.d.ts +2 -2
  178. package/dist/types/tokens/theme-store.d.ts +47 -0
  179. package/dist/types/tokens/theme-sync.d.ts +7 -1
  180. package/dist/types/tokens/theme-tokens.generated.d.ts +121 -109
  181. package/dist/types/tokens/theme.d.ts +28 -5
  182. package/dist/typing-lines.css +1 -1
  183. package/dist/typing-lines.js +2 -2
  184. package/dist/weight-field.css +2 -2
  185. package/dist/youtube.css +1 -1
  186. package/dist/youtube.js +2 -2
  187. package/package.json +25 -31
  188. package/skills/zyncat-ui/references/components.md +5 -2
  189. package/src/components/composites/alert/Alert.tsx +7 -3
  190. package/src/components/composites/alert/alert.css +1 -1
  191. package/src/components/composites/date-picker/calendar-panel.tsx +10 -4
  192. package/src/components/composites/date-picker/date-picker.css +168 -43
  193. package/src/components/composites/date-picker/month-jump.tsx +192 -0
  194. package/src/components/composites/date-picker/range-panel.tsx +20 -5
  195. package/src/components/composites/dialog/dialog.css +4 -3
  196. package/src/components/composites/dropdown/dropdown.css +1 -1
  197. package/src/components/composites/emoji-picker/styles.css +1 -1
  198. package/src/components/composites/modal/modal.css +1 -1
  199. package/src/components/composites/pagination/pagination.css +1 -1
  200. package/src/components/composites/popover/popover.css +1 -1
  201. package/src/components/composites/select/select.css +1 -1
  202. package/src/components/composites/sheet/sheet.css +1 -1
  203. package/src/components/composites/table/table.css +2 -2
  204. package/src/components/composites/tabs/tabs.css +10 -14
  205. package/src/components/composites/theme-switcher/ThemeGrid.tsx +133 -0
  206. package/src/components/composites/theme-switcher/ThemeGrid.usage.md +20 -0
  207. package/src/components/composites/theme-switcher/ThemeSwitcher.tsx +75 -0
  208. package/src/components/composites/theme-switcher/ThemeSwitcher.usage.md +21 -0
  209. package/src/components/composites/theme-switcher/theme-switcher.css +107 -0
  210. package/src/components/composites/toast/Toast.tsx +2 -1
  211. package/src/components/composites/toast/toast.css +2 -14
  212. package/src/components/composites/tooltip/tooltip.css +1 -1
  213. package/src/components/compound/support-rail/SupportRail.tsx +116 -128
  214. package/src/components/compound/support-rail/SupportRail.usage.md +7 -6
  215. package/src/components/compound/support-rail/support-rail.css +76 -238
  216. package/src/components/dev/MotionDevtools.tsx +252 -42
  217. package/src/components/dev/MotionDevtools.usage.md +12 -4
  218. package/src/components/dev/motion-devtools.css +77 -2
  219. package/src/components/dev/slowmo-engine.ts +1 -1
  220. package/src/components/expressive/confetti/confetti.css +3 -3
  221. package/src/components/expressive/facebook-feed/facebook-feed.css +1 -1
  222. package/src/components/expressive/flow-field/FlowField.tsx +1 -1
  223. package/src/components/expressive/flow-field/flow-field.css +4 -4
  224. package/src/components/expressive/instagram-feed/instagram-feed.css +1 -1
  225. package/src/components/expressive/lens/lens.css +1 -2
  226. package/src/components/expressive/morphing-text/morphing-text.css +2 -2
  227. package/src/components/expressive/odometer/odometer.css +1 -1
  228. package/src/components/expressive/theme-transition/bloom.ts +88 -0
  229. package/src/components/expressive/theme-transition/paint.ts +296 -0
  230. package/src/components/expressive/theme-transition/scene.ts +38 -0
  231. package/src/components/expressive/theme-transition/theme-transition.css +48 -0
  232. package/src/components/expressive/theme-transition/theme-transition.ts +423 -0
  233. package/src/components/expressive/theme-transition/tide.ts +65 -0
  234. package/src/components/expressive/tiktok/tiktok.css +2 -3
  235. package/src/components/expressive/typing-lines/typing-lines.css +1 -1
  236. package/src/components/expressive/weight-field/weight-field.css +2 -2
  237. package/src/components/expressive/youtube/youtube.css +1 -1
  238. package/src/components/internal/glass/glass.css +1 -1
  239. package/src/components/internal/icon/Icon.tsx +2 -0
  240. package/src/components/internal/icon/icon.css +1 -1
  241. package/src/components/internal/menu/menu-surface.css +1 -1
  242. package/src/components/internal/overlay/overlay.css +1 -1
  243. package/src/components/internal/overlay/trigger.css +1 -1
  244. package/src/components/primitives/avatar/avatar.css +3 -2
  245. package/src/components/primitives/badge/badge.css +1 -1
  246. package/src/components/primitives/badge/digit-strip.css +1 -1
  247. package/src/components/primitives/button/Button.tsx +12 -26
  248. package/src/components/primitives/button/button-style.ts +28 -0
  249. package/src/components/primitives/button/button.css +21 -24
  250. package/src/components/primitives/checkbox/checkbox.css +1 -1
  251. package/src/components/primitives/collapse/collapse.css +8 -5
  252. package/src/components/primitives/input/input.css +7 -4
  253. package/src/components/primitives/radio-group/radio-group.css +6 -4
  254. package/src/components/primitives/spinner/Spinner.tsx +70 -0
  255. package/src/components/primitives/spinner/Spinner.usage.md +19 -0
  256. package/src/components/primitives/spinner/spinner.css +115 -0
  257. package/src/components/primitives/tag/tag.css +1 -1
  258. package/src/components/primitives/textarea/textarea.css +1 -1
  259. package/src/components/primitives/toggle/toggle.css +1 -1
  260. package/src/engine/animate.ts +10 -2
  261. package/src/mcp/server.ts +2 -1
  262. package/src/styles.css +3 -3
  263. package/src/tokens/base.css +5 -5
  264. package/src/tokens/color.css +8 -9
  265. package/src/tokens/component-styles.generated.ts +36 -38
  266. package/src/tokens/dark.css +8 -13
  267. package/src/tokens/decisions.css +5 -8
  268. package/src/tokens/elevation.css +18 -26
  269. package/src/tokens/glass.css +3 -2
  270. package/src/tokens/motion-defaults.generated.ts +1 -1
  271. package/src/tokens/motion-tokens.ts +3 -3
  272. package/src/tokens/motion.css +9 -9
  273. package/src/tokens/radius.css +3 -2
  274. package/src/tokens/reset.css +36 -0
  275. package/src/tokens/semantic.css +10 -18
  276. package/src/tokens/spacing.css +1 -1
  277. package/src/tokens/theme-store.ts +187 -0
  278. package/src/tokens/theme-sync.tsx +49 -2
  279. package/src/tokens/theme-tokens.generated.ts +124 -110
  280. package/src/tokens/theme.tsx +96 -24
  281. package/src/tokens/theme.usage.md +25 -24
  282. package/src/tokens/typography.css +4 -3
  283. package/tailwind.css +7 -13
  284. package/dist/chunk-6SUHSSOK.js +0 -25
  285. package/dist/chunk-6SUHSSOK.js.map +0 -1
  286. package/dist/chunk-BH4JFWXQ.js.map +0 -1
  287. package/dist/chunk-FEXUS4SV.js.map +0 -1
  288. package/dist/chunk-GOLSYGRA.js.map +0 -1
  289. package/dist/chunk-N2GJEO5Z.js.map +0 -1
  290. package/dist/chunk-UYSXJ7MH.js.map +0 -1
@@ -8,17 +8,17 @@ import type { CSSProperties } from 'react';
8
8
  * Generated from the token and component CSS by `scripts/gen-theme.mjs` - `pnpm sync` rebuilds it.
9
9
  */
10
10
  export interface ConfettiStyle extends CSSProperties {
11
- /** `--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)`. */
11
+ /** `--confetti-paper-1` - The five papers a burst draws from. Default: `oklch(0.53 0.2 288)`. */
12
12
  '--confetti-paper-1'?: string | number;
13
- /** `--confetti-paper-2` - The five papers a burst draws from; a slot set to a role follows the theme. Default: `var(--accent)`. */
13
+ /** `--confetti-paper-2` - The five papers a burst draws from. Default: `var(--accent)`. */
14
14
  '--confetti-paper-2'?: string | number;
15
- /** `--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)`. */
15
+ /** `--confetti-paper-3` - The five papers a burst draws from. Default: `oklch(0.78 0.115 62)`. */
16
16
  '--confetti-paper-3'?: string | number;
17
- /** `--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)`. */
17
+ /** `--confetti-paper-4` - The five papers a burst draws from. Default: `oklch(0.67 0.18 12)`. */
18
18
  '--confetti-paper-4'?: string | number;
19
- /** `--confetti-paper-5` - The five papers a burst draws from; a slot set to a role follows the theme. Default: `var(--text-strong)`. */
19
+ /** `--confetti-paper-5` - The five papers a burst draws from. Default: `var(--text-strong)`. */
20
20
  '--confetti-paper-5'?: string | number;
21
- /** `--confetti-weights` - How often each paper appears - five weights, in slot order. Default: `1 1 1 1 0.45`. */
21
+ /** `--confetti-weights` - How often each paper appears, in slot order. Default: `1 1 1 1 0.45`. */
22
22
  '--confetti-weights'?: string | number;
23
23
  /** `--confetti-ink` - What the reverse side of a piece darkens toward. Default: `var(--text-strong)`. */
24
24
  '--confetti-ink'?: string | number;
@@ -33,35 +33,35 @@ export interface ConfettiStyle extends CSSProperties {
33
33
  }
34
34
  /** Inline styles for FlowField, including its `--flow-field-*` knobs. */
35
35
  export interface FlowFieldStyle extends CSSProperties {
36
- /** `--flow-field-ink` - The particle colour at rest - the ramp's cold end. Default: `var(--text-subtle)`. */
36
+ /** `--flow-field-ink` - The particle colour at rest. Default: `var(--text-subtle)`. */
37
37
  '--flow-field-ink'?: string | number;
38
- /** `--flow-field-accent` - The particle colour at full speed - the ramp's hot end. Default: `var(--accent)`. */
38
+ /** `--flow-field-accent` - The particle colour at full speed. Default: `var(--accent)`. */
39
39
  '--flow-field-accent'?: string | number;
40
40
  /** `--flow-field-min-height` - The field's minimum height before content sizes it. Default: `var(--space-10)`. */
41
41
  '--flow-field-min-height'?: string | number;
42
- /** `--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)`. */
42
+ /** `--flow-field-ramp-0` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `var(--flow-field-ink)`. */
43
43
  '--flow-field-ramp-0'?: string | number;
44
- /** `--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))`. */
44
+ /** `--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))`. */
45
45
  '--flow-field-ramp-1'?: string | number;
46
- /** `--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))`. */
46
+ /** `--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))`. */
47
47
  '--flow-field-ramp-2'?: string | number;
48
- /** `--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))`. */
48
+ /** `--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))`. */
49
49
  '--flow-field-ramp-3'?: string | number;
50
- /** `--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))`. */
50
+ /** `--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))`. */
51
51
  '--flow-field-ramp-4'?: string | number;
52
- /** `--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))`. */
52
+ /** `--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))`. */
53
53
  '--flow-field-ramp-5'?: string | number;
54
- /** `--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))`. */
54
+ /** `--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))`. */
55
55
  '--flow-field-ramp-6'?: string | number;
56
- /** `--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))`. */
56
+ /** `--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))`. */
57
57
  '--flow-field-ramp-7'?: string | number;
58
- /** `--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))`. */
58
+ /** `--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))`. */
59
59
  '--flow-field-ramp-8'?: string | number;
60
- /** `--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))`. */
60
+ /** `--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))`. */
61
61
  '--flow-field-ramp-9'?: string | number;
62
- /** `--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))`. */
62
+ /** `--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))`. */
63
63
  '--flow-field-ramp-10'?: string | number;
64
- /** `--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)`. */
64
+ /** `--flow-field-ramp-11` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `var(--flow-field-accent)`. */
65
65
  '--flow-field-ramp-11'?: string | number;
66
66
  }
67
67
  /** Inline styles for Lens, including its `--lens-*` knobs. */
@@ -87,7 +87,7 @@ export interface MorphingTextStyle extends CSSProperties {
87
87
  '--morphing-text-leading'?: string | number;
88
88
  /** `--morphing-text-tracking` - Letter spacing. Default: `var(--tracking-display)`. */
89
89
  '--morphing-text-tracking'?: string | number;
90
- /** `--morphing-text-smear` - How much letters blur on the way between words; 0 cuts clean. Default: `1`. */
90
+ /** `--morphing-text-smear` - How much letters blur between words, 0 cutting clean. Default: `1`. */
91
91
  '--morphing-text-smear'?: string | number;
92
92
  /** `--morphing-text-rule-ink` - The rule at rest. Default: `var(--text-strong)`. */
93
93
  '--morphing-text-rule-ink'?: string | number;
@@ -113,6 +113,11 @@ export interface OdometerStyle extends CSSProperties {
113
113
  /** `--odometer-weight` - Digit weight. Default: `var(--weight-medium)`. */
114
114
  '--odometer-weight'?: string | number;
115
115
  }
116
+ /** Inline styles for ThemeTransition, including its `--theme-transition-*` knobs. */
117
+ export interface ThemeTransitionStyle extends CSSProperties {
118
+ /** `--theme-transition-layer` - The z-index the arriving page paints at, above every panel it covers. Default: `var(--layer-infinity)`. */
119
+ '--theme-transition-layer'?: string | number;
120
+ }
116
121
  /** Inline styles for TypingLines, including its `--typing-lines-*` knobs. */
117
122
  export interface TypingLinesStyle extends CSSProperties {
118
123
  /** `--typing-lines-ink` - Letter ink. Default: `var(--text-strong)`. */
@@ -154,7 +159,7 @@ export interface WeightFieldStyle extends CSSProperties {
154
159
  '--weight-field-peak-weight'?: string | number;
155
160
  /** `--weight-field-hover-padding` - How much a unit widens under the pointer. Default: `calc(1em / 12)`. */
156
161
  '--weight-field-hover-padding'?: string | number;
157
- /** `--weight-field-stroke` - The text stroke every unit carries; the peak letter doubles it. Default: `calc(1em * 125 / 6000)`. */
162
+ /** `--weight-field-stroke` - The text stroke every unit carries, doubled on the peak letter. Default: `calc(1em * 125 / 6000)`. */
158
163
  '--weight-field-stroke'?: string | number;
159
164
  /** `--weight-field-duration` - How long a unit takes to settle at a new weight. Default: `400ms`. */
160
165
  '--weight-field-duration'?: string | number;
@@ -163,28 +168,20 @@ export interface WeightFieldStyle extends CSSProperties {
163
168
  }
164
169
  /** Inline styles for SupportRail, including its `--support-rail-*` knobs. */
165
170
  export interface SupportRailStyle extends CSSProperties {
166
- /** `--support-rail-width` - Panel width; the rail never exceeds its container. Default: `318px`. */
171
+ /** `--support-rail-width` - Panel width, capped by the container. Default: `318px`. */
167
172
  '--support-rail-width'?: string | number;
168
- /** `--support-rail-row-pad-block` - Row padding on the block axis - the density knob. Default: `var(--space-4)`. */
173
+ /** `--support-rail-row-pad-block` - Row padding on the block axis. Default: `var(--space-3)`. */
169
174
  '--support-rail-row-pad-block'?: string | number;
170
- /** `--support-rail-row-pad-inline` - Row padding on the inline axis - the density knob. Default: `var(--space-4)`. */
175
+ /** `--support-rail-row-pad-inline` - Row padding on the inline axis. Default: `var(--space-4)`. */
171
176
  '--support-rail-row-pad-inline'?: string | number;
172
- /** `--support-rail-surface` - The panel and the needle. Default: `var(--bg-subtle)`. */
177
+ /** `--support-rail-surface` - The tab, and the panel it morphs into. Default: `var(--bg-subtle)`. */
173
178
  '--support-rail-surface'?: string | number;
174
- /** `--support-rail-surface-raised` - The needle while hovered. Default: `var(--bg-surface)`. */
179
+ /** `--support-rail-surface-raised` - The tab while hovered. Default: `var(--bg-surface)`. */
175
180
  '--support-rail-surface-raised'?: string | number;
176
- /** `--support-rail-line` - The panel's edge and the needle's border. Default: `var(--border-default)`. */
181
+ /** `--support-rail-line` - The surface's edge. Default: `var(--border-default)`. */
177
182
  '--support-rail-line'?: string | number;
178
- /** `--support-rail-line-soft` - Row dividers and the grabber's edge. Default: `var(--border-subtle)`. */
183
+ /** `--support-rail-line-soft` - Row dividers. Default: `var(--border-subtle)`. */
179
184
  '--support-rail-line-soft'?: string | number;
180
- /** `--support-rail-accent` - The needle's rule. Default: `var(--accent)`. */
181
- '--support-rail-accent'?: string | number;
182
- /** `--support-rail-live-color` - The live dot and its pulse. Default: `var(--success)`. */
183
- '--support-rail-live-color'?: string | number;
184
- /** `--support-rail-radius` - The needle's outer corners. Default: `var(--radius-2xl)`. */
185
+ /** `--support-rail-radius` - The tab's outer corners. Default: `var(--radius-2xl)`. */
185
186
  '--support-rail-radius'?: string | number;
186
- /** `--support-rail-open-duration` - How long the panel takes to open. Default: `calc(var(--duration-slower) * 1.4)`. */
187
- '--support-rail-open-duration'?: string | number;
188
- /** `--support-rail-close-duration` - How long the panel takes to close. Default: `var(--duration-slower)`. */
189
- '--support-rail-close-duration'?: string | number;
190
187
  }
@@ -28,8 +28,8 @@ export interface MotionTokens {
28
28
  export declare const UIMotion: MotionTokens;
29
29
  /**
30
30
  * Re-reads the motion tokens into `UIMotion` in place, so every held reference sees the new values. Runs on
31
- * a `data-theme` change, a `prefers-reduced-motion` flip and after `ZyncatTheme` renders; call it yourself
32
- * after injecting a stylesheet that retimes the `--duration-*` tokens.
31
+ * a `data-theme` or `data-polarity` change, a `prefers-reduced-motion` flip and after `ZyncatTheme`
32
+ * renders; call it yourself after injecting a stylesheet that retimes the `--duration-*` tokens.
33
33
  */
34
34
  export declare function refreshMotionTokens(): MotionTokens;
35
35
  export default UIMotion;
@@ -0,0 +1,47 @@
1
+ export type Polarity = 'light' | 'dark';
2
+ export type PolarityPreference = Polarity | 'system';
3
+ export interface ThemeState {
4
+ /** The active palette - `default` when no other is named. */
5
+ theme: string;
6
+ /** The stored side, or `system` to follow the OS setting. */
7
+ polarity: PolarityPreference;
8
+ /** The side the page is painted in - `system` resolved through the OS setting. */
9
+ resolvedPolarity: Polarity;
10
+ /** Every palette `ZyncatTheme` declared, `default` first. */
11
+ themes: readonly string[];
12
+ /** Display name per palette - the palette's `name`, else its key title-cased. */
13
+ themeNames: Readonly<Record<string, string>>;
14
+ }
15
+ export interface ThemeControls extends ThemeState {
16
+ /** Switch the palette; the side stays. */
17
+ setTheme(theme: string): void;
18
+ /** Pick a side, or `system` to follow the OS setting. */
19
+ setPolarity(polarity: PolarityPreference): void;
20
+ }
21
+ export type ThemeBootConfig = {
22
+ key: string;
23
+ declared: ThemeState;
24
+ };
25
+ export interface ThemeChange {
26
+ current: ThemeState;
27
+ next: ThemeState;
28
+ origin?: readonly [number, number];
29
+ commit(): void;
30
+ revert(): void;
31
+ }
32
+ export interface ThemePreferenceOptions {
33
+ /** Viewport point the change spreads from - the centre of the pressed control. */
34
+ origin?: readonly [number, number];
35
+ }
36
+ export type ThemeTransitionRunner = (change: ThemeChange) => void;
37
+ export declare const DEFAULT_THEME = "default";
38
+ export declare const THEME_STORAGE_KEY = "zyncat-theme";
39
+ export declare function bootTheme(config: ThemeBootConfig, stored?: unknown): Omit<ThemeState, 'themes' | 'themeNames'>;
40
+ export declare function configureThemeStore(json: string): void;
41
+ export declare function applyTheme(stored?: unknown): void;
42
+ export declare const getThemeSnapshot: () => ThemeState;
43
+ export declare const getThemeTargetSnapshot: () => ThemeState;
44
+ export declare const getServerThemeSnapshot: () => ThemeState;
45
+ export declare function setThemeTransition(runner: ThemeTransitionRunner | null): void;
46
+ export declare function setThemePreference(patch: Partial<Pick<ThemeState, 'theme' | 'polarity'>>, options?: ThemePreferenceOptions): void;
47
+ export declare function subscribeTheme(listener: () => void): () => void;
@@ -1,3 +1,9 @@
1
- export declare function ThemeSync({ css }: {
1
+ import type { ThemeTransitionSetting } from '../components/expressive/theme-transition/theme-transition';
2
+ import * as store from './theme-store';
3
+ export declare function useTheme(): store.ThemeControls;
4
+ export declare function useThemeTarget(): store.ThemeState;
5
+ export declare function ThemeSync({ css, config, transition, }: {
2
6
  css: string;
7
+ config: string | null;
8
+ transition?: ThemeTransitionSetting;
3
9
  }): null;