@sdxc/ui 0.0.0-pre.1

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 (399) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +812 -0
  3. package/dist/animations/index.d.ts +12 -0
  4. package/dist/animations/index.js +12 -0
  5. package/dist/animations/keyframes.d.ts +162 -0
  6. package/dist/animations/keyframes.js +297 -0
  7. package/dist/animations/scroll.d.ts +154 -0
  8. package/dist/animations/scroll.js +228 -0
  9. package/dist/animations/tokens.d.ts +47 -0
  10. package/dist/animations/tokens.js +47 -0
  11. package/dist/animations/transitions.d.ts +143 -0
  12. package/dist/animations/transitions.js +147 -0
  13. package/dist/behaviors/announcer.d.ts +90 -0
  14. package/dist/behaviors/announcer.js +93 -0
  15. package/dist/behaviors/calendar-model.d.ts +218 -0
  16. package/dist/behaviors/calendar-model.js +376 -0
  17. package/dist/behaviors/drag-session.d.ts +119 -0
  18. package/dist/behaviors/drag-session.js +110 -0
  19. package/dist/behaviors/filter-model.d.ts +117 -0
  20. package/dist/behaviors/filter-model.js +185 -0
  21. package/dist/behaviors/index.d.ts +16 -0
  22. package/dist/behaviors/index.js +16 -0
  23. package/dist/behaviors/resize-session.d.ts +115 -0
  24. package/dist/behaviors/resize-session.js +157 -0
  25. package/dist/behaviors/scroll-follow-model.d.ts +180 -0
  26. package/dist/behaviors/scroll-follow-model.js +197 -0
  27. package/dist/behaviors/selection-model.d.ts +129 -0
  28. package/dist/behaviors/selection-model.js +259 -0
  29. package/dist/behaviors/toaster.d.ts +144 -0
  30. package/dist/behaviors/toaster.js +228 -0
  31. package/dist/components/accordion.d.ts +93 -0
  32. package/dist/components/accordion.js +165 -0
  33. package/dist/components/alert-dialog.d.ts +110 -0
  34. package/dist/components/alert-dialog.js +169 -0
  35. package/dist/components/alert.d.ts +109 -0
  36. package/dist/components/alert.js +160 -0
  37. package/dist/components/aspect-ratio.d.ts +44 -0
  38. package/dist/components/aspect-ratio.js +35 -0
  39. package/dist/components/attachment.d.ts +146 -0
  40. package/dist/components/attachment.js +320 -0
  41. package/dist/components/avatar.d.ts +118 -0
  42. package/dist/components/avatar.js +89 -0
  43. package/dist/components/badge.d.ts +66 -0
  44. package/dist/components/badge.js +129 -0
  45. package/dist/components/breadcrumbs.d.ts +67 -0
  46. package/dist/components/breadcrumbs.js +121 -0
  47. package/dist/components/bubble.d.ts +91 -0
  48. package/dist/components/bubble.js +216 -0
  49. package/dist/components/button.d.ts +78 -0
  50. package/dist/components/button.js +207 -0
  51. package/dist/components/calendar.d.ts +166 -0
  52. package/dist/components/calendar.js +320 -0
  53. package/dist/components/card.d.ts +82 -0
  54. package/dist/components/card.js +126 -0
  55. package/dist/components/carousel.d.ts +96 -0
  56. package/dist/components/carousel.js +214 -0
  57. package/dist/components/chart.d.ts +485 -0
  58. package/dist/components/chart.js +563 -0
  59. package/dist/components/checkbox-group.d.ts +58 -0
  60. package/dist/components/checkbox-group.js +53 -0
  61. package/dist/components/checkbox.d.ts +61 -0
  62. package/dist/components/checkbox.js +81 -0
  63. package/dist/components/color-area.d.ts +83 -0
  64. package/dist/components/color-area.js +251 -0
  65. package/dist/components/color-field.d.ts +128 -0
  66. package/dist/components/color-field.js +73 -0
  67. package/dist/components/color-picker.d.ts +132 -0
  68. package/dist/components/color-picker.js +183 -0
  69. package/dist/components/color-slider.d.ts +103 -0
  70. package/dist/components/color-slider.js +198 -0
  71. package/dist/components/color-swatch-picker.d.ts +106 -0
  72. package/dist/components/color-swatch-picker.js +75 -0
  73. package/dist/components/color-swatch.d.ts +57 -0
  74. package/dist/components/color-swatch.js +82 -0
  75. package/dist/components/color-wheel.d.ts +58 -0
  76. package/dist/components/color-wheel.js +160 -0
  77. package/dist/components/combobox.d.ts +73 -0
  78. package/dist/components/combobox.js +108 -0
  79. package/dist/components/command.d.ts +80 -0
  80. package/dist/components/command.js +151 -0
  81. package/dist/components/confirm.d.ts +124 -0
  82. package/dist/components/confirm.js +56 -0
  83. package/dist/components/context-menu.d.ts +108 -0
  84. package/dist/components/context-menu.js +200 -0
  85. package/dist/components/date-field.d.ts +110 -0
  86. package/dist/components/date-field.js +49 -0
  87. package/dist/components/date-picker.d.ts +136 -0
  88. package/dist/components/date-picker.js +155 -0
  89. package/dist/components/date-range-picker.d.ts +152 -0
  90. package/dist/components/date-range-picker.js +106 -0
  91. package/dist/components/description.d.ts +36 -0
  92. package/dist/components/description.js +21 -0
  93. package/dist/components/dialog.d.ts +97 -0
  94. package/dist/components/dialog.js +203 -0
  95. package/dist/components/disclosure.d.ts +85 -0
  96. package/dist/components/disclosure.js +180 -0
  97. package/dist/components/drawer.d.ts +82 -0
  98. package/dist/components/drawer.js +162 -0
  99. package/dist/components/drop-indicator.d.ts +43 -0
  100. package/dist/components/drop-indicator.js +47 -0
  101. package/dist/components/drop-zone.d.ts +73 -0
  102. package/dist/components/drop-zone.js +54 -0
  103. package/dist/components/empty.d.ts +89 -0
  104. package/dist/components/empty.js +129 -0
  105. package/dist/components/field-error.d.ts +41 -0
  106. package/dist/components/field-error.js +36 -0
  107. package/dist/components/file-trigger.d.ts +84 -0
  108. package/dist/components/file-trigger.js +169 -0
  109. package/dist/components/form.d.ts +118 -0
  110. package/dist/components/form.js +113 -0
  111. package/dist/components/grid-list.d.ts +112 -0
  112. package/dist/components/grid-list.js +220 -0
  113. package/dist/components/group.d.ts +45 -0
  114. package/dist/components/group.js +44 -0
  115. package/dist/components/header.d.ts +33 -0
  116. package/dist/components/header.js +29 -0
  117. package/dist/components/heading-scope.d.ts +83 -0
  118. package/dist/components/heading-scope.js +82 -0
  119. package/dist/components/heading.d.ts +50 -0
  120. package/dist/components/heading.js +31 -0
  121. package/dist/components/hover-card.d.ts +77 -0
  122. package/dist/components/hover-card.js +151 -0
  123. package/dist/components/image-placeholder.d.ts +105 -0
  124. package/dist/components/image-placeholder.js +212 -0
  125. package/dist/components/index.d.ts +109 -0
  126. package/dist/components/index.js +109 -0
  127. package/dist/components/input.d.ts +53 -0
  128. package/dist/components/input.js +76 -0
  129. package/dist/components/item.d.ts +97 -0
  130. package/dist/components/item.js +185 -0
  131. package/dist/components/keyboard.d.ts +33 -0
  132. package/dist/components/keyboard.js +20 -0
  133. package/dist/components/label.d.ts +38 -0
  134. package/dist/components/label.js +24 -0
  135. package/dist/components/link-button.d.ts +59 -0
  136. package/dist/components/link-button.js +174 -0
  137. package/dist/components/link.d.ts +43 -0
  138. package/dist/components/link.js +85 -0
  139. package/dist/components/listbox.d.ts +119 -0
  140. package/dist/components/listbox.js +114 -0
  141. package/dist/components/logo.d.ts +117 -0
  142. package/dist/components/logo.js +89 -0
  143. package/dist/components/marker.d.ts +82 -0
  144. package/dist/components/marker.js +163 -0
  145. package/dist/components/menu.d.ts +90 -0
  146. package/dist/components/menu.js +146 -0
  147. package/dist/components/menubar.d.ts +54 -0
  148. package/dist/components/menubar.js +118 -0
  149. package/dist/components/message-scroller.d.ts +109 -0
  150. package/dist/components/message-scroller.js +180 -0
  151. package/dist/components/message.d.ts +104 -0
  152. package/dist/components/message.js +200 -0
  153. package/dist/components/meter.d.ts +60 -0
  154. package/dist/components/meter.js +110 -0
  155. package/dist/components/modal.d.ts +71 -0
  156. package/dist/components/modal.js +120 -0
  157. package/dist/components/nav-link.d.ts +53 -0
  158. package/dist/components/nav-link.js +83 -0
  159. package/dist/components/navigation-menu.d.ts +150 -0
  160. package/dist/components/navigation-menu.js +381 -0
  161. package/dist/components/number-field.d.ts +76 -0
  162. package/dist/components/number-field.js +190 -0
  163. package/dist/components/otp-field.d.ts +68 -0
  164. package/dist/components/otp-field.js +46 -0
  165. package/dist/components/overlay-arrow.d.ts +51 -0
  166. package/dist/components/overlay-arrow.js +77 -0
  167. package/dist/components/pagination.d.ts +67 -0
  168. package/dist/components/pagination.js +164 -0
  169. package/dist/components/popover.d.ts +69 -0
  170. package/dist/components/popover.js +68 -0
  171. package/dist/components/progress-bar.d.ts +53 -0
  172. package/dist/components/progress-bar.js +90 -0
  173. package/dist/components/radio-group.d.ts +102 -0
  174. package/dist/components/radio-group.js +114 -0
  175. package/dist/components/range-calendar.d.ts +169 -0
  176. package/dist/components/range-calendar.js +216 -0
  177. package/dist/components/resizable.d.ts +98 -0
  178. package/dist/components/resizable.js +151 -0
  179. package/dist/components/scroll-area.d.ts +54 -0
  180. package/dist/components/scroll-area.js +89 -0
  181. package/dist/components/search-field.d.ts +55 -0
  182. package/dist/components/search-field.js +49 -0
  183. package/dist/components/section.d.ts +37 -0
  184. package/dist/components/section.js +22 -0
  185. package/dist/components/select.d.ts +96 -0
  186. package/dist/components/select.js +285 -0
  187. package/dist/components/selection-indicator.d.ts +47 -0
  188. package/dist/components/selection-indicator.js +50 -0
  189. package/dist/components/sentinel-row.d.ts +22 -0
  190. package/dist/components/sentinel-row.js +29 -0
  191. package/dist/components/separator.d.ts +35 -0
  192. package/dist/components/separator.js +48 -0
  193. package/dist/components/shared-element.d.ts +45 -0
  194. package/dist/components/shared-element.js +48 -0
  195. package/dist/components/sheet.d.ts +78 -0
  196. package/dist/components/sheet.js +167 -0
  197. package/dist/components/sidebar.d.ts +288 -0
  198. package/dist/components/sidebar.js +1068 -0
  199. package/dist/components/skeleton.d.ts +36 -0
  200. package/dist/components/skeleton.js +38 -0
  201. package/dist/components/slider.d.ts +102 -0
  202. package/dist/components/slider.js +179 -0
  203. package/dist/components/spinner.d.ts +55 -0
  204. package/dist/components/spinner.js +51 -0
  205. package/dist/components/switch.d.ts +47 -0
  206. package/dist/components/switch.js +82 -0
  207. package/dist/components/table.d.ts +139 -0
  208. package/dist/components/table.js +216 -0
  209. package/dist/components/tabs.d.ts +124 -0
  210. package/dist/components/tabs.js +246 -0
  211. package/dist/components/tag-group.d.ts +83 -0
  212. package/dist/components/tag-group.js +157 -0
  213. package/dist/components/text-field.d.ts +119 -0
  214. package/dist/components/text-field.js +51 -0
  215. package/dist/components/text.d.ts +34 -0
  216. package/dist/components/text.js +19 -0
  217. package/dist/components/textarea.d.ts +52 -0
  218. package/dist/components/textarea.js +82 -0
  219. package/dist/components/time-field.d.ts +110 -0
  220. package/dist/components/time-field.js +48 -0
  221. package/dist/components/toast.d.ts +149 -0
  222. package/dist/components/toast.js +365 -0
  223. package/dist/components/toggle-button.d.ts +115 -0
  224. package/dist/components/toggle-button.js +237 -0
  225. package/dist/components/toolbar.d.ts +47 -0
  226. package/dist/components/toolbar.js +54 -0
  227. package/dist/components/tooltip.d.ts +52 -0
  228. package/dist/components/tooltip.js +92 -0
  229. package/dist/components/tree.d.ts +123 -0
  230. package/dist/components/tree.js +239 -0
  231. package/dist/components/typeset.d.ts +53 -0
  232. package/dist/components/typeset.js +271 -0
  233. package/dist/index.d.ts +8 -0
  234. package/dist/index.js +8 -0
  235. package/dist/mixins/aria-checked.d.ts +42 -0
  236. package/dist/mixins/aria-checked.js +127 -0
  237. package/dist/mixins/attachment-trigger.d.ts +64 -0
  238. package/dist/mixins/attachment-trigger.js +190 -0
  239. package/dist/mixins/calendar-keys.d.ts +27 -0
  240. package/dist/mixins/calendar-keys.js +113 -0
  241. package/dist/mixins/carousel-controls.d.ts +30 -0
  242. package/dist/mixins/carousel-controls.js +222 -0
  243. package/dist/mixins/chart-tooltip.d.ts +118 -0
  244. package/dist/mixins/chart-tooltip.js +323 -0
  245. package/dist/mixins/clear-field.d.ts +60 -0
  246. package/dist/mixins/clear-field.js +100 -0
  247. package/dist/mixins/color-area-drag.d.ts +58 -0
  248. package/dist/mixins/color-area-drag.js +162 -0
  249. package/dist/mixins/color-channel-sync.d.ts +73 -0
  250. package/dist/mixins/color-channel-sync.js +169 -0
  251. package/dist/mixins/color-preview.d.ts +28 -0
  252. package/dist/mixins/color-preview.js +77 -0
  253. package/dist/mixins/color-wheel-drag.d.ts +58 -0
  254. package/dist/mixins/color-wheel-drag.js +139 -0
  255. package/dist/mixins/combobox-filter.d.ts +59 -0
  256. package/dist/mixins/combobox-filter.js +81 -0
  257. package/dist/mixins/command-filter.d.ts +55 -0
  258. package/dist/mixins/command-filter.js +121 -0
  259. package/dist/mixins/command-keys.d.ts +31 -0
  260. package/dist/mixins/command-keys.js +116 -0
  261. package/dist/mixins/context-menu.d.ts +24 -0
  262. package/dist/mixins/context-menu.js +64 -0
  263. package/dist/mixins/copy-to-clipboard.d.ts +64 -0
  264. package/dist/mixins/copy-to-clipboard.js +109 -0
  265. package/dist/mixins/dismiss.d.ts +77 -0
  266. package/dist/mixins/dismiss.js +151 -0
  267. package/dist/mixins/drag-reorder.d.ts +88 -0
  268. package/dist/mixins/drag-reorder.js +214 -0
  269. package/dist/mixins/drop-zone.d.ts +52 -0
  270. package/dist/mixins/drop-zone.js +132 -0
  271. package/dist/mixins/dual-range.d.ts +60 -0
  272. package/dist/mixins/dual-range.js +100 -0
  273. package/dist/mixins/grid-list-keys.d.ts +34 -0
  274. package/dist/mixins/grid-list-keys.js +260 -0
  275. package/dist/mixins/heading-level-fallback.d.ts +81 -0
  276. package/dist/mixins/heading-level-fallback.js +112 -0
  277. package/dist/mixins/hotkey.d.ts +26 -0
  278. package/dist/mixins/hotkey.js +132 -0
  279. package/dist/mixins/image-fallback.d.ts +57 -0
  280. package/dist/mixins/image-fallback.js +86 -0
  281. package/dist/mixins/index.d.ts +48 -0
  282. package/dist/mixins/index.js +48 -0
  283. package/dist/mixins/listbox-keys.d.ts +52 -0
  284. package/dist/mixins/listbox-keys.js +63 -0
  285. package/dist/mixins/long-press.d.ts +76 -0
  286. package/dist/mixins/long-press.js +130 -0
  287. package/dist/mixins/menu-keys.d.ts +40 -0
  288. package/dist/mixins/menu-keys.js +117 -0
  289. package/dist/mixins/menubar-keys.d.ts +59 -0
  290. package/dist/mixins/menubar-keys.js +230 -0
  291. package/dist/mixins/message-follow.d.ts +56 -0
  292. package/dist/mixins/message-follow.js +368 -0
  293. package/dist/mixins/otp-slots.d.ts +53 -0
  294. package/dist/mixins/otp-slots.js +175 -0
  295. package/dist/mixins/persist.d.ts +36 -0
  296. package/dist/mixins/persist.js +78 -0
  297. package/dist/mixins/press-toggle.d.ts +43 -0
  298. package/dist/mixins/press-toggle.js +61 -0
  299. package/dist/mixins/range-preview.d.ts +26 -0
  300. package/dist/mixins/range-preview.js +120 -0
  301. package/dist/mixins/resize-handle.d.ts +101 -0
  302. package/dist/mixins/resize-handle.js +288 -0
  303. package/dist/mixins/stepper.d.ts +81 -0
  304. package/dist/mixins/stepper.js +194 -0
  305. package/dist/mixins/tab-keys.d.ts +30 -0
  306. package/dist/mixins/tab-keys.js +63 -0
  307. package/dist/mixins/theme-toggle.d.ts +82 -0
  308. package/dist/mixins/theme-toggle.js +158 -0
  309. package/dist/mixins/track-host-node.d.ts +34 -0
  310. package/dist/mixins/track-host-node.js +42 -0
  311. package/dist/mixins/treeKeys.d.ts +57 -0
  312. package/dist/mixins/treeKeys.js +266 -0
  313. package/dist/mixins/validate.d.ts +65 -0
  314. package/dist/mixins/validate.js +139 -0
  315. package/dist/mixins/view-transition.d.ts +56 -0
  316. package/dist/mixins/view-transition.js +111 -0
  317. package/dist/styles/chart-palette.d.ts +34 -0
  318. package/dist/styles/chart-palette.js +27 -0
  319. package/dist/styles/field-stack-layout.d.ts +27 -0
  320. package/dist/styles/field-stack-layout.js +16 -0
  321. package/dist/styles/floating-surface.d.ts +32 -0
  322. package/dist/styles/floating-surface.js +30 -0
  323. package/dist/styles/graphic-host.d.ts +25 -0
  324. package/dist/styles/graphic-host.js +18 -0
  325. package/dist/styles/index.d.ts +20 -0
  326. package/dist/styles/index.js +20 -0
  327. package/dist/styles/interactive-transition.d.ts +32 -0
  328. package/dist/styles/interactive-transition.js +32 -0
  329. package/dist/styles/legend-toggle.d.ts +29 -0
  330. package/dist/styles/legend-toggle.js +24 -0
  331. package/dist/styles/output-caption-text.d.ts +22 -0
  332. package/dist/styles/output-caption-text.js +15 -0
  333. package/dist/styles/panel-chrome.d.ts +34 -0
  334. package/dist/styles/panel-chrome.js +26 -0
  335. package/dist/styles/range-thumb-appearance.d.ts +36 -0
  336. package/dist/styles/range-thumb-appearance.js +76 -0
  337. package/dist/styles/rtl-aware-gradient-direction.d.ts +28 -0
  338. package/dist/styles/rtl-aware-gradient-direction.js +28 -0
  339. package/dist/styles/semantic-color-panel.d.ts +35 -0
  340. package/dist/styles/semantic-color-panel.js +41 -0
  341. package/dist/utils/chart-marker-indices.d.ts +22 -0
  342. package/dist/utils/chart-marker-indices.js +45 -0
  343. package/dist/utils/chart-path.d.ts +86 -0
  344. package/dist/utils/chart-path.js +122 -0
  345. package/dist/utils/chart-scale.d.ts +182 -0
  346. package/dist/utils/chart-scale.js +221 -0
  347. package/dist/utils/color-math.d.ts +252 -0
  348. package/dist/utils/color-math.js +480 -0
  349. package/dist/utils/command-event.d.ts +24 -0
  350. package/dist/utils/command-event.js +26 -0
  351. package/dist/utils/css-styles.d.ts +21 -0
  352. package/dist/utils/css-styles.js +11 -0
  353. package/dist/utils/decorative-icon.d.ts +15 -0
  354. package/dist/utils/decorative-icon.js +15 -0
  355. package/dist/utils/disabled-selector.d.ts +22 -0
  356. package/dist/utils/disabled-selector.js +22 -0
  357. package/dist/utils/dispatch-change.d.ts +17 -0
  358. package/dist/utils/dispatch-change.js +19 -0
  359. package/dist/utils/field-parts.d.ts +26 -0
  360. package/dist/utils/field-parts.js +12 -0
  361. package/dist/utils/full-turn-radians.d.ts +16 -0
  362. package/dist/utils/full-turn-radians.js +16 -0
  363. package/dist/utils/geometry.d.ts +14 -0
  364. package/dist/utils/geometry.js +9 -0
  365. package/dist/utils/has-accessible-text.d.ts +19 -0
  366. package/dist/utils/has-accessible-text.js +30 -0
  367. package/dist/utils/hue-spectrum.d.ts +19 -0
  368. package/dist/utils/hue-spectrum.js +19 -0
  369. package/dist/utils/index.d.ts +35 -0
  370. package/dist/utils/index.js +35 -0
  371. package/dist/utils/is-new-primary-press.d.ts +29 -0
  372. package/dist/utils/is-new-primary-press.js +31 -0
  373. package/dist/utils/keyboard-nav.d.ts +64 -0
  374. package/dist/utils/keyboard-nav.js +79 -0
  375. package/dist/utils/merge-style.d.ts +33 -0
  376. package/dist/utils/merge-style.js +30 -0
  377. package/dist/utils/paired-range-inputs.d.ts +26 -0
  378. package/dist/utils/paired-range-inputs.js +29 -0
  379. package/dist/utils/placement.d.ts +18 -0
  380. package/dist/utils/placement.js +12 -0
  381. package/dist/utils/prefers-reduced-motion.d.ts +17 -0
  382. package/dist/utils/prefers-reduced-motion.js +19 -0
  383. package/dist/utils/resolve-field-wiring.d.ts +83 -0
  384. package/dist/utils/resolve-field-wiring.js +53 -0
  385. package/dist/utils/resolve-fill-percent.d.ts +28 -0
  386. package/dist/utils/resolve-fill-percent.js +34 -0
  387. package/dist/utils/round-precision.d.ts +22 -0
  388. package/dist/utils/round-precision.js +25 -0
  389. package/dist/utils/semantic-color-panel.d.ts +35 -0
  390. package/dist/utils/semantic-color-panel.js +28 -0
  391. package/dist/utils/semantic-color.d.ts +17 -0
  392. package/dist/utils/semantic-color.js +11 -0
  393. package/dist/utils/warn-if-no-accessible-name.d.ts +52 -0
  394. package/dist/utils/warn-if-no-accessible-name.js +55 -0
  395. package/dist/utils/write-cookie.d.ts +35 -0
  396. package/dist/utils/write-cookie.js +37 -0
  397. package/package.json +32 -0
  398. package/src/reset.css +223 -0
  399. package/src/theme.css +146 -0
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The `interactiveTransition()` style-mixin factory: the shared
3
+ * `transition-property`/`transition-timing-function`/`transition-duration`
4
+ * triplet composed into an interactive control's `mix` array, animating a
5
+ * hover, focus, press, selection, or validity change instead of snapping
6
+ * between states, sourced from the animation layer's shared tokens.
7
+ *
8
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
9
+ * @copyright Sergio Xalambrí 2026
10
+ */
11
+ import { transition } from "@sdxc/u/effects";
12
+ import { durations, easings } from "../animations/tokens.js";
13
+ /**
14
+ * Composes the transition-property/timing-function/duration triplet shared
15
+ * by every interactive control's hover, focus, press, selection, and
16
+ * validity-state changes, for use alongside a host's own `css()` styling.
17
+ *
18
+ * @returns A `css()` mixin ready for a host element's `mix` prop.
19
+ * @example
20
+ * <input
21
+ * mix={[
22
+ * interactiveTransition(),
23
+ * css({
24
+ * borderColor: "var(--ui-neutral-border)",
25
+ * "&:hover": { borderColor: "var(--ui-neutral-border-strong)" },
26
+ * }),
27
+ * ]}
28
+ * />;
29
+ */
30
+ export function interactiveTransition() {
31
+ return transition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter", { duration: durations.fast, easing: easings.standard });
32
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Position-keyed visibility rules pairing a chart root with a later
3
+ * legend: hides each `[data-color]` slot once the legend's same-position
4
+ * `<label>` holds no checked input.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { ElementProps, MixinDescriptor } from "remix/ui";
10
+ import type { CSSStyles } from "../utils/css-styles.js";
11
+ /**
12
+ * Composes the categorical legend-toggle visibility rules as a `css()`
13
+ * mixin covering every {@link CHART_COLOR_SLOT_COUNT} color slot. The
14
+ * general sibling combinator requires the legend to follow the chart root.
15
+ *
16
+ * @returns A `css()` mixin ready for a host element's `mix` prop.
17
+ * @example
18
+ * <svg
19
+ * mix={[
20
+ * legendToggle(),
21
+ * css({ display: "block", inlineSize: "100%", blockSize: "auto" }),
22
+ * ]}
23
+ * >
24
+ * {content}
25
+ * </svg>;
26
+ */
27
+ export declare function legendToggle<Node extends Element = Element>(): MixinDescriptor<Node, [
28
+ styles: CSSStyles
29
+ ], ElementProps>;
@@ -0,0 +1,24 @@
1
+ import { combine } from "@sdxc/u/general";
2
+ import { hidden } from "@sdxc/u/layout";
3
+ import { when } from "@sdxc/u/state";
4
+ import { CHART_COLOR_SLOT_COUNT } from "./chart-palette.js";
5
+ /**
6
+ * Composes the categorical legend-toggle visibility rules as a `css()`
7
+ * mixin covering every {@link CHART_COLOR_SLOT_COUNT} color slot. The
8
+ * general sibling combinator requires the legend to follow the chart root.
9
+ *
10
+ * @returns A `css()` mixin ready for a host element's `mix` prop.
11
+ * @example
12
+ * <svg
13
+ * mix={[
14
+ * legendToggle(),
15
+ * css({ display: "block", inlineSize: "100%", blockSize: "auto" }),
16
+ * ]}
17
+ * >
18
+ * {content}
19
+ * </svg>;
20
+ */
21
+ export function legendToggle() {
22
+ let slots = Array.from({ length: CHART_COLOR_SLOT_COUNT }, (_, index) => index + 1);
23
+ return combine(slots.map((slot) => when(`&:has(~ [data-slot='legend'] label:nth-of-type(${slot}):not(:has(input:checked))) [data-color='${slot}']`, hidden())));
24
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The muted caption typography shared by every live readout rendered through
3
+ * a native `<output>` element: a small point size, a matching line height,
4
+ * and the neutral muted foreground color.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { ElementProps, MixinDescriptor } from "remix/ui";
10
+ import type { CSSStyles } from "../utils/css-styles.js";
11
+ /**
12
+ * `text("sm")`'s font-size/line-height fallback pair matches the
13
+ * `0.875rem`/`calc(1.25 / 0.875)` caption spec exactly, so composing it
14
+ * directly keeps every `<output>` readout visually identical.
15
+ *
16
+ * @returns A `css()` mixin ready for a host element's `mix` prop.
17
+ * @example
18
+ * <output mix={[outputCaptionText(), mix]}>{value}</output>;
19
+ */
20
+ export declare function outputCaptionText<Node extends Element = Element>(): MixinDescriptor<Node, [
21
+ styles: CSSStyles
22
+ ], ElementProps>;
@@ -0,0 +1,15 @@
1
+ import { fg } from "@sdxc/u/color";
2
+ import { combine } from "@sdxc/u/general";
3
+ import { text } from "@sdxc/u/typography";
4
+ /**
5
+ * `text("sm")`'s font-size/line-height fallback pair matches the
6
+ * `0.875rem`/`calc(1.25 / 0.875)` caption spec exactly, so composing it
7
+ * directly keeps every `<output>` readout visually identical.
8
+ *
9
+ * @returns A `css()` mixin ready for a host element's `mix` prop.
10
+ * @example
11
+ * <output mix={[outputCaptionText(), mix]}>{value}</output>;
12
+ */
13
+ export function outputCaptionText() {
14
+ return combine([text("sm"), fg("neutral")]);
15
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The border and rounding a bordered, framed panel applies to its own host
3
+ * element — the outer frame a scrollable region, a hierarchical tree, an
4
+ * expand/collapse section, or a row list draws itself as, before any of its
5
+ * own padding, layout, or interaction styling layers on top.
6
+ *
7
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
8
+ * @copyright Sergio Xalambrí 2026
9
+ */
10
+ import type { ElementProps, MixinDescriptor } from "remix/ui";
11
+ import type { CSSStyles } from "../utils/css-styles.js";
12
+ /**
13
+ * A framed panel's shared border and rounding: a solid, 1px neutral border
14
+ * with large rounding, sized through the shared radius and border variables.
15
+ * Compose it in a host's `mix` array alongside that host's own local styles.
16
+ *
17
+ * @returns A mixin ready for a host element's `mix` prop.
18
+ * @example
19
+ * <div
20
+ * mix={[
21
+ * panelChrome(),
22
+ * css({
23
+ * paddingBlock: "0.5rem",
24
+ * paddingInline: "0.5rem",
25
+ * outline: "none",
26
+ * }),
27
+ * ]}
28
+ * >
29
+ * {children}
30
+ * </div>;
31
+ */
32
+ export declare function panelChrome<Node extends Element = Element>(): MixinDescriptor<Node, [
33
+ styles: CSSStyles
34
+ ], ElementProps>;
@@ -0,0 +1,26 @@
1
+ import { border } from "@sdxc/u/color";
2
+ import { rounded } from "@sdxc/u/effects";
3
+ import { combine } from "@sdxc/u/general";
4
+ /**
5
+ * A framed panel's shared border and rounding: a solid, 1px neutral border
6
+ * with large rounding, sized through the shared radius and border variables.
7
+ * Compose it in a host's `mix` array alongside that host's own local styles.
8
+ *
9
+ * @returns A mixin ready for a host element's `mix` prop.
10
+ * @example
11
+ * <div
12
+ * mix={[
13
+ * panelChrome(),
14
+ * css({
15
+ * paddingBlock: "0.5rem",
16
+ * paddingInline: "0.5rem",
17
+ * outline: "none",
18
+ * }),
19
+ * ]}
20
+ * >
21
+ * {children}
22
+ * </div>;
23
+ */
24
+ export function panelChrome() {
25
+ return combine([rounded("lg"), border({ color: "neutral", width: 1 })]);
26
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The `rangeThumbAppearance()` style-mixin factory: the circular thumb a
3
+ * native `<input type="range">` paints through its own
4
+ * `::-webkit-slider-thumb` and `::-moz-range-thumb` pseudo-elements — the
5
+ * appearance reset, fill and border colors, elevation shadow, pressed scale,
6
+ * focus-visible ring, and disabled dimming shared by every single-channel
7
+ * range control in the catalog, whichever pair of custom properties that
8
+ * control reads its own thumb size and border width from.
9
+ *
10
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
11
+ * @copyright Sergio Xalambrí 2026
12
+ */
13
+ import type { ElementProps, MixinDescriptor } from "remix/ui";
14
+ import type { CSSStyles } from "../utils/css-styles.js";
15
+ /**
16
+ * Composes the range thumb's shared appearance recipe — reset, shape, border,
17
+ * fill, shadow, pressed scale, focus ring, and disabled dimming — identical
18
+ * across every control except the size and border-width properties given here.
19
+ *
20
+ * @param sizeVariable Custom property (with its leading `--`) the thumb reads its own inline and block size from, falling back to `1.25rem`.
21
+ * @param borderWidthVariable Custom property (with its leading `--`) the thumb reads its own border width from, falling back to `2px`.
22
+ * @returns A mixin ready for a host element's `mix` prop.
23
+ * @example
24
+ * <input
25
+ * type="range"
26
+ * mix={[
27
+ * rangeThumbAppearance("--ui-slider-thumb-size", "--ui-slider-thumb-border-width"),
28
+ * css({
29
+ * position: "absolute",
30
+ * inset: "0",
31
+ * // ...the control's own reset and track declarations
32
+ * }),
33
+ * ]}
34
+ * />;
35
+ */
36
+ export declare function rangeThumbAppearance<Node extends Element = Element>(sizeVariable: string, borderWidthVariable: string): MixinDescriptor<Node, [styles: CSSStyles], ElementProps>;
@@ -0,0 +1,76 @@
1
+ import { bg, border, outline } from "@sdxc/u/color";
2
+ import { rounded, transition } from "@sdxc/u/effects";
3
+ import { combine, raw } from "@sdxc/u/general";
4
+ import { media } from "@sdxc/u/responsive";
5
+ import { bs, is } from "@sdxc/u/size";
6
+ import { when } from "@sdxc/u/state";
7
+ /**
8
+ * The declarations shared by both engines' thumb pseudo-elements; the
9
+ * webkit-only appearance reset is composed separately by the caller. Its
10
+ * box-shadow stays raw; no shared shadow-scale entry matches this value.
11
+ */
12
+ function thumbBase(size, borderWidth) {
13
+ return combine([
14
+ is(size),
15
+ bs(size),
16
+ rounded("full"),
17
+ border({ color: "brand.solid", width: borderWidth }),
18
+ bg("neutral.tint"),
19
+ raw({
20
+ boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
21
+ cursor: "pointer",
22
+ }),
23
+ transition("box-shadow, scale", {
24
+ duration: 150,
25
+ easing: "cubic-bezier(0.4, 0, 0.2, 1)",
26
+ }),
27
+ ]);
28
+ }
29
+ /**
30
+ * Composes the range thumb's shared appearance recipe — reset, shape, border,
31
+ * fill, shadow, pressed scale, focus ring, and disabled dimming — identical
32
+ * across every control except the size and border-width properties given here.
33
+ *
34
+ * @param sizeVariable Custom property (with its leading `--`) the thumb reads its own inline and block size from, falling back to `1.25rem`.
35
+ * @param borderWidthVariable Custom property (with its leading `--`) the thumb reads its own border width from, falling back to `2px`.
36
+ * @returns A mixin ready for a host element's `mix` prop.
37
+ * @example
38
+ * <input
39
+ * type="range"
40
+ * mix={[
41
+ * rangeThumbAppearance("--ui-slider-thumb-size", "--ui-slider-thumb-border-width"),
42
+ * css({
43
+ * position: "absolute",
44
+ * inset: "0",
45
+ * // ...the control's own reset and track declarations
46
+ * }),
47
+ * ]}
48
+ * />;
49
+ */
50
+ export function rangeThumbAppearance(sizeVariable, borderWidthVariable) {
51
+ let size = `var(${sizeVariable}, 1.25rem)`;
52
+ let borderWidth = `var(${borderWidthVariable}, 2px)`;
53
+ return combine([
54
+ when("&::-webkit-slider-thumb", combine([
55
+ raw({ WebkitAppearance: "none", appearance: "none" }),
56
+ thumbBase(size, borderWidth),
57
+ ])),
58
+ when("&::-moz-range-thumb", thumbBase(size, borderWidth)),
59
+ when("&:active::-webkit-slider-thumb", raw({ scale: "1.1" })),
60
+ when("&:active::-moz-range-thumb", raw({ scale: "1.1" })),
61
+ when("&:focus-visible::-webkit-slider-thumb", outline({ color: "brand.ring", offset: 2 })),
62
+ when("&:focus-visible::-moz-range-thumb", outline({ color: "brand.ring", offset: 2 })),
63
+ when("&:disabled::-webkit-slider-thumb", [
64
+ raw({ cursor: "not-allowed", boxShadow: "none" }),
65
+ border("neutral"),
66
+ ]),
67
+ when("&:disabled::-moz-range-thumb", [
68
+ raw({ cursor: "not-allowed", boxShadow: "none" }),
69
+ border("neutral"),
70
+ ]),
71
+ media("(prefers-reduced-motion: reduce)", [
72
+ when("&::-webkit-slider-thumb", raw({ transitionDuration: "0s" })),
73
+ when("&::-moz-range-thumb", raw({ transitionDuration: "0s" })),
74
+ ]),
75
+ ]);
76
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The custom-property declarations behind a linear-gradient direction that a
3
+ * rangeable gradient track shares with its own `&:dir(rtl)` mirror: the
4
+ * property lands at `"right"` by default and flips to `"left"` once the
5
+ * surrounding writing direction reads right-to-left, so the same gradient
6
+ * string paints correctly in either direction from one shared declaration.
7
+ *
8
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
9
+ * @copyright Sergio Xalambrí 2026
10
+ */
11
+ import type { ElementProps, MixinDescriptor } from "remix/ui";
12
+ import type { CSSStyles } from "../utils/css-styles.js";
13
+ /**
14
+ * Composes the custom property pairing a gradient direction's `"right"`
15
+ * default with its `"left"` mirror under `&:dir(rtl)`, ready to compose
16
+ * alongside a host's own remaining, genuinely local declarations.
17
+ *
18
+ * @param propertyName The custom property the gradient direction reads from.
19
+ * @returns A `css()` mixin ready for a host element's `mix` prop.
20
+ * @example
21
+ * <div
22
+ * mix={[
23
+ * rtlAwareGradientDirection("--ui-color-slider-track-direction"),
24
+ * css({ ...ownStyles }),
25
+ * ]}
26
+ * />;
27
+ */
28
+ export declare function rtlAwareGradientDirection<Node extends Element = Element>(propertyName: string): MixinDescriptor<Node, [styles: CSSStyles], ElementProps>;
@@ -0,0 +1,28 @@
1
+ import { combine, vars } from "@sdxc/u/general";
2
+ import { when } from "@sdxc/u/state";
3
+ /** Strips a leading `--` from a custom property name, matching `u.vars()`'s own bare-name convention. */
4
+ function stripLeadingDashes(propertyName) {
5
+ return propertyName.replace(/^--/, "");
6
+ }
7
+ /**
8
+ * Composes the custom property pairing a gradient direction's `"right"`
9
+ * default with its `"left"` mirror under `&:dir(rtl)`, ready to compose
10
+ * alongside a host's own remaining, genuinely local declarations.
11
+ *
12
+ * @param propertyName The custom property the gradient direction reads from.
13
+ * @returns A `css()` mixin ready for a host element's `mix` prop.
14
+ * @example
15
+ * <div
16
+ * mix={[
17
+ * rtlAwareGradientDirection("--ui-color-slider-track-direction"),
18
+ * css({ ...ownStyles }),
19
+ * ]}
20
+ * />;
21
+ */
22
+ export function rtlAwareGradientDirection(propertyName) {
23
+ let name = stripLeadingDashes(propertyName);
24
+ return combine([
25
+ vars({ [name]: "right" }),
26
+ when("&:dir(rtl)", vars({ [name]: "left" })),
27
+ ]);
28
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The border, tinted background, and emphasized foreground a bordered,
3
+ * tinted panel — a full-width status message or placeholder panel — takes on
4
+ * for each of the five semantic color roles, one `&[data-color="..."]`
5
+ * branch per role, every branch driven by that color's own `--ui-*`
6
+ * variables.
7
+ *
8
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
9
+ * @copyright Sergio Xalambrí 2026
10
+ */
11
+ import type { ElementProps, MixinDescriptor } from "remix/ui";
12
+ import type { CSSStyles } from "../utils/css-styles.js";
13
+ /**
14
+ * Composes every `&[data-color="..."]` branch a tinted panel keys its
15
+ * border, background, and foreground on, one branch per {@link SemanticColor},
16
+ * built from `@sdxc/u`'s `border()`/`bg()`/`fg()` utilities nested under `when()`.
17
+ *
18
+ * @returns A `css()` mixin ready for a host element's `mix` prop.
19
+ * @example
20
+ * <div
21
+ * data-color="danger"
22
+ * mix={[
23
+ * semanticColorPanel(),
24
+ * css({
25
+ * display: "flex",
26
+ * borderRadius: "var(--ui-radius-lg, 0.5rem)",
27
+ * }),
28
+ * ]}
29
+ * >
30
+ * {children}
31
+ * </div>;
32
+ */
33
+ export declare function semanticColorPanel<Node extends Element = Element>(): MixinDescriptor<Node, [
34
+ styles: CSSStyles
35
+ ], ElementProps>;
@@ -0,0 +1,41 @@
1
+ import { bg, border, fg } from "@sdxc/u/color";
2
+ import { combine } from "@sdxc/u/general";
3
+ import { when } from "@sdxc/u/state";
4
+ /**
5
+ * Every {@link SemanticColor}, in the order {@link semanticColorPanel} emits
6
+ * its branches.
7
+ */
8
+ const SEMANTIC_COLORS = [
9
+ "brand",
10
+ "neutral",
11
+ "success",
12
+ "warning",
13
+ "danger",
14
+ ];
15
+ /**
16
+ * Composes every `&[data-color="..."]` branch a tinted panel keys its
17
+ * border, background, and foreground on, one branch per {@link SemanticColor},
18
+ * built from `@sdxc/u`'s `border()`/`bg()`/`fg()` utilities nested under `when()`.
19
+ *
20
+ * @returns A `css()` mixin ready for a host element's `mix` prop.
21
+ * @example
22
+ * <div
23
+ * data-color="danger"
24
+ * mix={[
25
+ * semanticColorPanel(),
26
+ * css({
27
+ * display: "flex",
28
+ * borderRadius: "var(--ui-radius-lg, 0.5rem)",
29
+ * }),
30
+ * ]}
31
+ * >
32
+ * {children}
33
+ * </div>;
34
+ */
35
+ export function semanticColorPanel() {
36
+ return combine(SEMANTIC_COLORS.map((color) => when(`&[data-color="${color}"]`, [
37
+ border(`${color}.border`),
38
+ bg(`${color}.tint`),
39
+ fg(`${color}.emphasis`),
40
+ ])));
41
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shared marker-placement math behind a plotted series' accessible,
3
+ * hoverable point markers: picking a representative, evenly spread subset of
4
+ * a series' points instead of placing one marker per raw data point, which
5
+ * would turn a dense series into an unusable wall of keyboard stops.
6
+ *
7
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
8
+ * @copyright Sergio Xalambrí 2026
9
+ */
10
+ /**
11
+ * Picks which of a plotted series' points get an accessible, hoverable
12
+ * marker by snapping evenly spread "nice" values across `xDomain` onto the
13
+ * nearest actual point; duplicate snaps collapse into one marker.
14
+ *
15
+ * @param points The series' data points, in draw order along `x`.
16
+ * @param xDomain The `[start, end]` domain {@link ticks} generates its "nice" values across.
17
+ * @param markerCount Approximate number of markers to place.
18
+ * @returns The deduplicated indices into `points` to render a marker for, or `[]` when `points` is empty.
19
+ */
20
+ export declare function computeMarkerIndices(points: readonly {
21
+ x: number;
22
+ }[], xDomain: readonly [number, number], markerCount: number): number[];
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Shared marker-placement math behind a plotted series' accessible,
3
+ * hoverable point markers: picking a representative, evenly spread subset of
4
+ * a series' points instead of placing one marker per raw data point, which
5
+ * would turn a dense series into an unusable wall of keyboard stops.
6
+ *
7
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
8
+ * @copyright Sergio Xalambrí 2026
9
+ */
10
+ import { ticks } from "./chart-scale.js";
11
+ /**
12
+ * Finds the index of the point in `points` whose `x` value sits closest to
13
+ * `target`, favoring the earlier point on an exact tie.
14
+ *
15
+ * @param points The points to search, in their own original order.
16
+ * @param target The `x` value to find the nearest point to.
17
+ * @returns The index into `points` of the closest match, or `0` when `points` is empty.
18
+ */
19
+ function nearestPointIndex(points, target) {
20
+ let closestIndex = 0;
21
+ let closestDistance = Infinity;
22
+ for (let [index, point] of points.entries()) {
23
+ let distance = Math.abs(point.x - target);
24
+ if (distance < closestDistance) {
25
+ closestDistance = distance;
26
+ closestIndex = index;
27
+ }
28
+ }
29
+ return closestIndex;
30
+ }
31
+ /**
32
+ * Picks which of a plotted series' points get an accessible, hoverable
33
+ * marker by snapping evenly spread "nice" values across `xDomain` onto the
34
+ * nearest actual point; duplicate snaps collapse into one marker.
35
+ *
36
+ * @param points The series' data points, in draw order along `x`.
37
+ * @param xDomain The `[start, end]` domain {@link ticks} generates its "nice" values across.
38
+ * @param markerCount Approximate number of markers to place.
39
+ * @returns The deduplicated indices into `points` to render a marker for, or `[]` when `points` is empty.
40
+ */
41
+ export function computeMarkerIndices(points, xDomain, markerCount) {
42
+ if (points.length === 0)
43
+ return [];
44
+ return [...new Set(ticks(xDomain, markerCount).map((value) => nearestPointIndex(points, value)))];
45
+ }
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Pure SVG path-string builders for chart geometry: {@link linePath} for a
3
+ * connected polyline through a series of points, {@link areaPath} for the
4
+ * same line closed down to a baseline, and {@link arcPath} for a pie or
5
+ * donut wedge. Every builder takes coordinates already scaled to pixels —
6
+ * mapping a data value onto a pixel position is a separate concern the
7
+ * caller owns — so a chart component's render function is the only caller,
8
+ * feeding these functions whatever pixel coordinates it already computed.
9
+ *
10
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
11
+ * @copyright Sergio Xalambrí 2026
12
+ */
13
+ import type { Point } from "./geometry.js";
14
+ export type { Point };
15
+ /**
16
+ * Builds the `d` attribute for a connected polyline through `points`: a
17
+ * single move-to for the first point, followed by one line-to per remaining
18
+ * point, in the order given. Backs a line chart's plotted series.
19
+ *
20
+ * @param points Already-scaled pixel positions to connect, in draw order.
21
+ * @returns An SVG path `d` string, or an empty string when `points` is empty.
22
+ * @example
23
+ * linePath([{ x: 0, y: 10 }, { x: 20, y: 0 }]);
24
+ * // "M 0,10 L 20,0"
25
+ */
26
+ export declare function linePath(points: readonly Point[]): string;
27
+ /**
28
+ * Builds the `d` attribute for the line {@link linePath} draws, closed into
29
+ * a filled region down to `baselineY`, for an area chart's filled series.
30
+ *
31
+ * @param points Already-scaled pixel positions along the top edge of the area, in draw order.
32
+ * @param baselineY Pixel `y` position the area closes down (or up) to — typically the zero line or the chart's floor.
33
+ * @returns An SVG path `d` string, or an empty string when `points` is empty.
34
+ * @example
35
+ * areaPath([{ x: 0, y: 10 }, { x: 20, y: 0 }], 30);
36
+ * // "M 0,10 L 20,0 L 20,30 L 0,30 Z"
37
+ */
38
+ export declare function areaPath(points: readonly Point[], baselineY: number): string;
39
+ /**
40
+ * Options accepted by {@link arcPath}.
41
+ */
42
+ export declare namespace ArcPath {
43
+ interface Options {
44
+ /** Horizontal pixel position of the circle's center. */
45
+ cx: number;
46
+ /** Vertical pixel position of the circle's center. */
47
+ cy: number;
48
+ /**
49
+ * Pixel distance from the center to the wedge's inner edge. Omit or pass
50
+ * `0` for a solid pie wedge reaching the center; a positive value
51
+ * produces a donut segment with a hole.
52
+ *
53
+ * @default `0`
54
+ */
55
+ innerRadius?: number;
56
+ /** Pixel distance from the center to the wedge's outer edge. */
57
+ outerRadius: number;
58
+ /**
59
+ * Angle, in radians, where the wedge starts. `0` points straight up (12
60
+ * o'clock) with positive angles sweeping clockwise, the convention a
61
+ * pie chart's slice allocation already produces.
62
+ */
63
+ startAngle: number;
64
+ /**
65
+ * Angle, in radians, where the wedge ends, measured on the same
66
+ * clockwise-from-12-o'clock scale as `startAngle`. Must be greater than
67
+ * `startAngle` — the wedge sweeps clockwise from start to end.
68
+ */
69
+ endAngle: number;
70
+ }
71
+ }
72
+ /**
73
+ * Builds the `d` attribute for a pie or donut wedge spanning `startAngle`
74
+ * to `endAngle`, solid when `innerRadius` is `0` and a donut segment
75
+ * otherwise. A full-turn (or larger) sweep renders as a full ring or disc.
76
+ *
77
+ * @param options Center, radii, and the clockwise angle span the wedge covers.
78
+ * @returns An SVG path `d` string, or an empty string when `outerRadius` or the angle span is zero or negative.
79
+ * @example
80
+ * arcPath({ cx: 0, cy: 0, outerRadius: 10, startAngle: 0, endAngle: Math.PI / 2 });
81
+ * // "M 0,0 L 0,-10 A 10 10 0 0 1 10,0 Z"
82
+ * @example
83
+ * arcPath({ cx: 0, cy: 0, innerRadius: 5, outerRadius: 10, startAngle: 0, endAngle: Math.PI / 2 });
84
+ * // "M 0,-5 L 0,-10 A 10 10 0 0 1 10,0 L 5,0 A 5 5 0 0 0 0,-5 Z"
85
+ */
86
+ export declare function arcPath(options: ArcPath.Options): string;