@bettercms-ai/kit 0.1.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 (630) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/dist/_chunks-cjs/_visual-editing.js +5898 -0
  4. package/dist/_chunks-cjs/refractor.js +22 -0
  5. package/dist/_chunks-es/_visual-editing.mjs +5904 -0
  6. package/dist/_chunks-es/refractor.mjs +25 -0
  7. package/dist/_color.d.mts +119 -0
  8. package/dist/_color.d.ts +119 -0
  9. package/dist/_color.js +1412 -0
  10. package/dist/_color.mjs +1411 -0
  11. package/dist/_visual-editing.d.mts +1126 -0
  12. package/dist/_visual-editing.d.ts +1126 -0
  13. package/dist/_visual-editing.js +30 -0
  14. package/dist/_visual-editing.mjs +30 -0
  15. package/dist/index.d.mts +3140 -0
  16. package/dist/index.d.ts +3140 -0
  17. package/dist/index.js +2036 -0
  18. package/dist/index.mjs +2044 -0
  19. package/dist/theme.d.mts +1506 -0
  20. package/dist/theme.d.ts +1506 -0
  21. package/dist/theme.js +4126 -0
  22. package/dist/theme.mjs +4126 -0
  23. package/exports/_visual-editing.ts +31 -0
  24. package/exports/index.ts +1 -0
  25. package/exports/theme.ts +1 -0
  26. package/package.json +78 -0
  27. package/src/color/index.d.mts +119 -0
  28. package/src/color/index.mjs +1411 -0
  29. package/src/core/__workshop__/constants.ts +293 -0
  30. package/src/core/_compat.ts +264 -0
  31. package/src/core/components/autocomplete/__mocks__/apiStore.ts +49 -0
  32. package/src/core/components/autocomplete/__mocks__/countries.ts +245 -0
  33. package/src/core/components/autocomplete/__workshop__/async.tsx +156 -0
  34. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +137 -0
  35. package/src/core/components/autocomplete/__workshop__/custom.tsx +89 -0
  36. package/src/core/components/autocomplete/__workshop__/example.tsx +79 -0
  37. package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +36 -0
  38. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +294 -0
  39. package/src/core/components/autocomplete/__workshop__/index.ts +39 -0
  40. package/src/core/components/autocomplete/__workshop__/types.ts +4 -0
  41. package/src/core/components/autocomplete/autocomplete.styles.tsx +39 -0
  42. package/src/core/components/autocomplete/autocomplete.tsx +767 -0
  43. package/src/core/components/autocomplete/autocompleteOption.tsx +45 -0
  44. package/src/core/components/autocomplete/autocompleteReducer.ts +47 -0
  45. package/src/core/components/autocomplete/constants.ts +28 -0
  46. package/src/core/components/autocomplete/index.ts +2 -0
  47. package/src/core/components/autocomplete/types.ts +108 -0
  48. package/src/core/components/breadcrumbs/__workshop__/example.tsx +62 -0
  49. package/src/core/components/breadcrumbs/__workshop__/index.ts +14 -0
  50. package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +18 -0
  51. package/src/core/components/breadcrumbs/breadcrumbs.test.tsx +51 -0
  52. package/src/core/components/breadcrumbs/breadcrumbs.tsx +133 -0
  53. package/src/core/components/breadcrumbs/index.ts +1 -0
  54. package/src/core/components/dialog/__workshop__/activate.tsx +134 -0
  55. package/src/core/components/dialog/__workshop__/autoFocus.tsx +29 -0
  56. package/src/core/components/dialog/__workshop__/index.ts +19 -0
  57. package/src/core/components/dialog/__workshop__/layering.tsx +41 -0
  58. package/src/core/components/dialog/__workshop__/nested.tsx +72 -0
  59. package/src/core/components/dialog/__workshop__/onScroll.tsx +39 -0
  60. package/src/core/components/dialog/__workshop__/panes.tsx +82 -0
  61. package/src/core/components/dialog/__workshop__/position.tsx +30 -0
  62. package/src/core/components/dialog/__workshop__/props.tsx +75 -0
  63. package/src/core/components/dialog/__workshop__/provider.tsx +11 -0
  64. package/src/core/components/dialog/__workshop__/wrapped.tsx +76 -0
  65. package/src/core/components/dialog/dialog.tsx +430 -0
  66. package/src/core/components/dialog/dialogContext.ts +20 -0
  67. package/src/core/components/dialog/dialogProvider.tsx +35 -0
  68. package/src/core/components/dialog/index.ts +4 -0
  69. package/src/core/components/dialog/styles.ts +77 -0
  70. package/src/core/components/dialog/useDialog.ts +11 -0
  71. package/src/core/components/hotkeys/__workshop__/index.ts +14 -0
  72. package/src/core/components/hotkeys/__workshop__/plain.tsx +9 -0
  73. package/src/core/components/hotkeys/hotkeys.test.tsx +42 -0
  74. package/src/core/components/hotkeys/hotkeys.tsx +66 -0
  75. package/src/core/components/hotkeys/index.ts +1 -0
  76. package/src/core/components/index.ts +9 -0
  77. package/src/core/components/menu/__workshop__/asComponent.tsx +45 -0
  78. package/src/core/components/menu/__workshop__/avatarMenu.tsx +51 -0
  79. package/src/core/components/menu/__workshop__/closableMenuButton.tsx +46 -0
  80. package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +134 -0
  81. package/src/core/components/menu/__workshop__/customMenuItem.tsx +45 -0
  82. package/src/core/components/menu/__workshop__/customSelectedState.tsx +39 -0
  83. package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +40 -0
  84. package/src/core/components/menu/__workshop__/groups.tsx +156 -0
  85. package/src/core/components/menu/__workshop__/index.ts +89 -0
  86. package/src/core/components/menu/__workshop__/menuButton.tsx +80 -0
  87. package/src/core/components/menu/__workshop__/menuGroupRight.tsx +58 -0
  88. package/src/core/components/menu/__workshop__/nestedMenu.tsx +22 -0
  89. package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +41 -0
  90. package/src/core/components/menu/__workshop__/selectedItem.tsx +69 -0
  91. package/src/core/components/menu/__workshop__/shouldFocus.tsx +47 -0
  92. package/src/core/components/menu/__workshop__/tones.tsx +25 -0
  93. package/src/core/components/menu/__workshop__/withoutArrow.tsx +32 -0
  94. package/src/core/components/menu/helpers.ts +82 -0
  95. package/src/core/components/menu/index.ts +5 -0
  96. package/src/core/components/menu/menu.spacing.test.tsx +63 -0
  97. package/src/core/components/menu/menu.test.tsx +125 -0
  98. package/src/core/components/menu/menu.tsx +178 -0
  99. package/src/core/components/menu/menuButton.tsx +268 -0
  100. package/src/core/components/menu/menuContext.ts +18 -0
  101. package/src/core/components/menu/menuDivider.ts +23 -0
  102. package/src/core/components/menu/menuGroup.spacing.test.tsx +63 -0
  103. package/src/core/components/menu/menuGroup.tsx +233 -0
  104. package/src/core/components/menu/menuItem.spacing.test.tsx +59 -0
  105. package/src/core/components/menu/menuItem.tsx +197 -0
  106. package/src/core/components/menu/useMenu.ts +21 -0
  107. package/src/core/components/menu/useMenuController.ts +231 -0
  108. package/src/core/components/skeleton/__workshop__/delay.tsx +70 -0
  109. package/src/core/components/skeleton/__workshop__/index.ts +11 -0
  110. package/src/core/components/skeleton/__workshop__/skeleton.tsx +64 -0
  111. package/src/core/components/skeleton/index.ts +2 -0
  112. package/src/core/components/skeleton/skeleton.tsx +57 -0
  113. package/src/core/components/skeleton/styles.ts +50 -0
  114. package/src/core/components/skeleton/textSkeleton.tsx +122 -0
  115. package/src/core/components/tab/__workshop__/example.tsx +79 -0
  116. package/src/core/components/tab/__workshop__/index.ts +14 -0
  117. package/src/core/components/tab/index.ts +3 -0
  118. package/src/core/components/tab/tab.tsx +101 -0
  119. package/src/core/components/tab/tabList.test.tsx +48 -0
  120. package/src/core/components/tab/tabList.tsx +70 -0
  121. package/src/core/components/tab/tabPanel.tsx +39 -0
  122. package/src/core/components/toast/__workshop__/hook.tsx +71 -0
  123. package/src/core/components/toast/__workshop__/index.ts +19 -0
  124. package/src/core/components/toast/__workshop__/toast.tsx +26 -0
  125. package/src/core/components/toast/index.ts +4 -0
  126. package/src/core/components/toast/styles.ts +77 -0
  127. package/src/core/components/toast/toast.test.tsx +101 -0
  128. package/src/core/components/toast/toast.tsx +198 -0
  129. package/src/core/components/toast/toastContext.ts +7 -0
  130. package/src/core/components/toast/toastLayer.tsx +51 -0
  131. package/src/core/components/toast/toastProvider.tsx +113 -0
  132. package/src/core/components/toast/toastState.ts +6 -0
  133. package/src/core/components/toast/types.ts +26 -0
  134. package/src/core/components/toast/useToast.ts +25 -0
  135. package/src/core/components/tree/__workshop__/basic.perf.ts +19 -0
  136. package/src/core/components/tree/__workshop__/basic.tsx +105 -0
  137. package/src/core/components/tree/__workshop__/index.ts +21 -0
  138. package/src/core/components/tree/__workshop__/tabFromElement.tsx +84 -0
  139. package/src/core/components/tree/helpers.ts +105 -0
  140. package/src/core/components/tree/index.ts +4 -0
  141. package/src/core/components/tree/style.ts +105 -0
  142. package/src/core/components/tree/tree.test.tsx +55 -0
  143. package/src/core/components/tree/tree.tsx +240 -0
  144. package/src/core/components/tree/treeContext.ts +10 -0
  145. package/src/core/components/tree/treeGroup.tsx +28 -0
  146. package/src/core/components/tree/treeItem.test.tsx +65 -0
  147. package/src/core/components/tree/treeItem.tsx +224 -0
  148. package/src/core/components/tree/types.ts +25 -0
  149. package/src/core/components/tree/useTree.ts +17 -0
  150. package/src/core/constants.ts +79 -0
  151. package/src/core/helpers/animation.ts +27 -0
  152. package/src/core/helpers/element.ts +55 -0
  153. package/src/core/helpers/focus.ts +100 -0
  154. package/src/core/helpers/index.ts +4 -0
  155. package/src/core/helpers/scroll.ts +15 -0
  156. package/src/core/hooks/index.ts +12 -0
  157. package/src/core/hooks/useArrayProp.ts +17 -0
  158. package/src/core/hooks/useClickOutside.test.tsx +482 -0
  159. package/src/core/hooks/useClickOutside.ts +118 -0
  160. package/src/core/hooks/useClickOutsideEvent.test.tsx +115 -0
  161. package/src/core/hooks/useClickOutsideEvent.ts +73 -0
  162. package/src/core/hooks/useCustomValidity.ts +13 -0
  163. package/src/core/hooks/useDelayed.test.ts +88 -0
  164. package/src/core/hooks/useDelayedState.ts +36 -0
  165. package/src/core/hooks/useElementRect/__workshop__/example.tsx +32 -0
  166. package/src/core/hooks/useElementRect/__workshop__/index.ts +14 -0
  167. package/src/core/hooks/useElementRect/index.ts +1 -0
  168. package/src/core/hooks/useElementRect/useElementRect.ts +13 -0
  169. package/src/core/hooks/useElementSize.ts +19 -0
  170. package/src/core/hooks/useForwardedRef.ts +19 -0
  171. package/src/core/hooks/useGlobalKeyDown.ts +24 -0
  172. package/src/core/hooks/useIsomorphicEffect.ts +7 -0
  173. package/src/core/hooks/useMatchMedia.ts +28 -0
  174. package/src/core/hooks/useMediaIndex/__workshop__/index.ts +14 -0
  175. package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +14 -0
  176. package/src/core/hooks/useMediaIndex/index.ts +1 -0
  177. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +36 -0
  178. package/src/core/hooks/useMediaIndex/useMediaIndex.ts +102 -0
  179. package/src/core/hooks/useMounted.ts +15 -0
  180. package/src/core/hooks/usePrefersDark.hydration.test.tsx +56 -0
  181. package/src/core/hooks/usePrefersDark.test.tsx +19 -0
  182. package/src/core/hooks/usePrefersDark.ts +16 -0
  183. package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +56 -0
  184. package/src/core/hooks/usePrefersReducedMotion.test.tsx +19 -0
  185. package/src/core/hooks/usePrefersReducedMotion.ts +16 -0
  186. package/src/core/index.ts +10 -0
  187. package/src/core/lib/createGlobalScopedContext.ts +36 -0
  188. package/src/core/lib/globalScope.ts +19 -0
  189. package/src/core/lib/isRecord.ts +3 -0
  190. package/src/core/middleware/origin.ts +47 -0
  191. package/src/core/observers/elementSizeObserver.ts +116 -0
  192. package/src/core/observers/index.ts +2 -0
  193. package/src/core/observers/resizeObserver.ts +9 -0
  194. package/src/core/primitives/_selectable/index.ts +1 -0
  195. package/src/core/primitives/_selectable/selectable.tsx +15 -0
  196. package/src/core/primitives/_selectable/style.ts +115 -0
  197. package/src/core/primitives/avatar/__workshop__/asButton.tsx +14 -0
  198. package/src/core/primitives/avatar/__workshop__/index.ts +29 -0
  199. package/src/core/primitives/avatar/__workshop__/stack.tsx +25 -0
  200. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +63 -0
  201. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +70 -0
  202. package/src/core/primitives/avatar/avatar.tsx +200 -0
  203. package/src/core/primitives/avatar/avatarCounter.tsx +91 -0
  204. package/src/core/primitives/avatar/avatarStack.tsx +100 -0
  205. package/src/core/primitives/avatar/index.ts +4 -0
  206. package/src/core/primitives/avatar/styles.ts +167 -0
  207. package/src/core/primitives/avatar/types.ts +17 -0
  208. package/src/core/primitives/badge/__workshop__/index.ts +19 -0
  209. package/src/core/primitives/badge/__workshop__/props.tsx +30 -0
  210. package/src/core/primitives/badge/__workshop__/tones.tsx +21 -0
  211. package/src/core/primitives/badge/badge.test.tsx +16 -0
  212. package/src/core/primitives/badge/badge.tsx +70 -0
  213. package/src/core/primitives/badge/index.ts +1 -0
  214. package/src/core/primitives/badge/styles.ts +20 -0
  215. package/src/core/primitives/badge/types.ts +8 -0
  216. package/src/core/primitives/box/__workshop__/asComponent.tsx +31 -0
  217. package/src/core/primitives/box/__workshop__/index.ts +24 -0
  218. package/src/core/primitives/box/__workshop__/props.tsx +20 -0
  219. package/src/core/primitives/box/__workshop__/responsive.tsx +20 -0
  220. package/src/core/primitives/box/box.test.tsx +142 -0
  221. package/src/core/primitives/box/box.tsx +154 -0
  222. package/src/core/primitives/box/index.ts +1 -0
  223. package/src/core/primitives/button/__workshop__/custom.tsx +51 -0
  224. package/src/core/primitives/button/__workshop__/customIcons.tsx +30 -0
  225. package/src/core/primitives/button/__workshop__/disabled.tsx +74 -0
  226. package/src/core/primitives/button/__workshop__/index.ts +59 -0
  227. package/src/core/primitives/button/__workshop__/labelUploadButton.tsx +36 -0
  228. package/src/core/primitives/button/__workshop__/mixedChildren.tsx +12 -0
  229. package/src/core/primitives/button/__workshop__/props.tsx +55 -0
  230. package/src/core/primitives/button/__workshop__/stacked.tsx +58 -0
  231. package/src/core/primitives/button/__workshop__/styled1.tsx +17 -0
  232. package/src/core/primitives/button/__workshop__/styled2.tsx +19 -0
  233. package/src/core/primitives/button/__workshop__/uploadButton.tsx +28 -0
  234. package/src/core/primitives/button/button.test.tsx +82 -0
  235. package/src/core/primitives/button/button.tsx +210 -0
  236. package/src/core/primitives/button/index.ts +1 -0
  237. package/src/core/primitives/button/styles.ts +117 -0
  238. package/src/core/primitives/card/__workshop__/allTones.tsx +25 -0
  239. package/src/core/primitives/card/__workshop__/asButton.tsx +107 -0
  240. package/src/core/primitives/card/__workshop__/asComponent.tsx +27 -0
  241. package/src/core/primitives/card/__workshop__/checkered.tsx +26 -0
  242. package/src/core/primitives/card/__workshop__/index.ts +18 -0
  243. package/src/core/primitives/card/__workshop__/interactive.tsx +30 -0
  244. package/src/core/primitives/card/__workshop__/listNavigation.tsx +80 -0
  245. package/src/core/primitives/card/__workshop__/props.tsx +53 -0
  246. package/src/core/primitives/card/__workshop__/selected.tsx +94 -0
  247. package/src/core/primitives/card/__workshop__/styled.tsx +14 -0
  248. package/src/core/primitives/card/card.tsx +128 -0
  249. package/src/core/primitives/card/index.ts +2 -0
  250. package/src/core/primitives/card/styles.ts +147 -0
  251. package/src/core/primitives/card/types.ts +11 -0
  252. package/src/core/primitives/checkbox/__workshop__/example.tsx +25 -0
  253. package/src/core/primitives/checkbox/__workshop__/index.ts +13 -0
  254. package/src/core/primitives/checkbox/__workshop__/props.tsx +33 -0
  255. package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +16 -0
  256. package/src/core/primitives/checkbox/__workshop__/tones.tsx +28 -0
  257. package/src/core/primitives/checkbox/checkbox.tsx +73 -0
  258. package/src/core/primitives/checkbox/index.ts +1 -0
  259. package/src/core/primitives/checkbox/styles.ts +128 -0
  260. package/src/core/primitives/code/__workshop__/index.ts +19 -0
  261. package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +48 -0
  262. package/src/core/primitives/code/__workshop__/props.tsx +21 -0
  263. package/src/core/primitives/code/code.tsx +55 -0
  264. package/src/core/primitives/code/index.ts +1 -0
  265. package/src/core/primitives/code/refractor.tsx +20 -0
  266. package/src/core/primitives/code/styles.ts +77 -0
  267. package/src/core/primitives/container/__workshop__/example.tsx +20 -0
  268. package/src/core/primitives/container/__workshop__/index.ts +8 -0
  269. package/src/core/primitives/container/container.tsx +54 -0
  270. package/src/core/primitives/container/index.ts +2 -0
  271. package/src/core/primitives/container/styles.ts +23 -0
  272. package/src/core/primitives/container/types.ts +6 -0
  273. package/src/core/primitives/flex/__workshop__/example.tsx +34 -0
  274. package/src/core/primitives/flex/__workshop__/gap.tsx +25 -0
  275. package/src/core/primitives/flex/__workshop__/index.ts +11 -0
  276. package/src/core/primitives/flex/flex.tsx +64 -0
  277. package/src/core/primitives/flex/index.ts +1 -0
  278. package/src/core/primitives/grid/__workshop__/index.ts +10 -0
  279. package/src/core/primitives/grid/__workshop__/responsive.tsx +54 -0
  280. package/src/core/primitives/grid/grid.test.tsx +80 -0
  281. package/src/core/primitives/grid/grid.tsx +74 -0
  282. package/src/core/primitives/grid/index.ts +1 -0
  283. package/src/core/primitives/heading/__workshop__/index.ts +19 -0
  284. package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +54 -0
  285. package/src/core/primitives/heading/__workshop__/plain.tsx +32 -0
  286. package/src/core/primitives/heading/heading.tsx +88 -0
  287. package/src/core/primitives/heading/index.ts +1 -0
  288. package/src/core/primitives/heading/styles.ts +64 -0
  289. package/src/core/primitives/heading/types.ts +7 -0
  290. package/src/core/primitives/index.ts +27 -0
  291. package/src/core/primitives/inline/__workshop__/index.ts +8 -0
  292. package/src/core/primitives/inline/__workshop__/plain.tsx +27 -0
  293. package/src/core/primitives/inline/index.ts +1 -0
  294. package/src/core/primitives/inline/inline.test.tsx +51 -0
  295. package/src/core/primitives/inline/inline.tsx +63 -0
  296. package/src/core/primitives/inline/styles.ts +32 -0
  297. package/src/core/primitives/inline/types.ts +6 -0
  298. package/src/core/primitives/kbd/__workshop__/index.ts +8 -0
  299. package/src/core/primitives/kbd/__workshop__/plain.tsx +9 -0
  300. package/src/core/primitives/kbd/index.ts +1 -0
  301. package/src/core/primitives/kbd/kbd.tsx +69 -0
  302. package/src/core/primitives/label/__workshop__/index.ts +19 -0
  303. package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +48 -0
  304. package/src/core/primitives/label/__workshop__/plain.tsx +24 -0
  305. package/src/core/primitives/label/index.ts +1 -0
  306. package/src/core/primitives/label/label.tsx +87 -0
  307. package/src/core/primitives/label/styles.ts +45 -0
  308. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +77 -0
  309. package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +31 -0
  310. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +32 -0
  311. package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +11 -0
  312. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +71 -0
  313. package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +71 -0
  314. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +89 -0
  315. package/src/core/primitives/popover/__workshop__/TestStory.tsx +97 -0
  316. package/src/core/primitives/popover/__workshop__/index.ts +49 -0
  317. package/src/core/primitives/popover/constants.ts +22 -0
  318. package/src/core/primitives/popover/floating-ui/size.ts +99 -0
  319. package/src/core/primitives/popover/helpers.ts +31 -0
  320. package/src/core/primitives/popover/index.ts +2 -0
  321. package/src/core/primitives/popover/popover.tsx +511 -0
  322. package/src/core/primitives/popover/popoverCard.tsx +166 -0
  323. package/src/core/primitives/popover/types.ts +7 -0
  324. package/src/core/primitives/radio/__workshop__/example.tsx +63 -0
  325. package/src/core/primitives/radio/__workshop__/index.ts +11 -0
  326. package/src/core/primitives/radio/__workshop__/plain.tsx +28 -0
  327. package/src/core/primitives/radio/index.ts +1 -0
  328. package/src/core/primitives/radio/radio.tsx +51 -0
  329. package/src/core/primitives/radio/styles.ts +117 -0
  330. package/src/core/primitives/select/__workshop__/index.ts +11 -0
  331. package/src/core/primitives/select/__workshop__/plain.tsx +27 -0
  332. package/src/core/primitives/select/__workshop__/readOnly.tsx +23 -0
  333. package/src/core/primitives/select/index.ts +1 -0
  334. package/src/core/primitives/select/select.test.tsx +52 -0
  335. package/src/core/primitives/select/select.tsx +94 -0
  336. package/src/core/primitives/select/styles.ts +166 -0
  337. package/src/core/primitives/spinner/__workshop__/Props.tsx +15 -0
  338. package/src/core/primitives/spinner/__workshop__/index.ts +14 -0
  339. package/src/core/primitives/spinner/index.ts +1 -0
  340. package/src/core/primitives/spinner/spinner.tsx +46 -0
  341. package/src/core/primitives/stack/__workshop__/index.ts +14 -0
  342. package/src/core/primitives/stack/__workshop__/plain.tsx +32 -0
  343. package/src/core/primitives/stack/index.ts +1 -0
  344. package/src/core/primitives/stack/stack.test.tsx +57 -0
  345. package/src/core/primitives/stack/stack.tsx +57 -0
  346. package/src/core/primitives/stack/styles.ts +32 -0
  347. package/src/core/primitives/switch/__workshop__/example.tsx +23 -0
  348. package/src/core/primitives/switch/__workshop__/index.ts +11 -0
  349. package/src/core/primitives/switch/__workshop__/props.tsx +21 -0
  350. package/src/core/primitives/switch/index.ts +1 -0
  351. package/src/core/primitives/switch/styles.ts +173 -0
  352. package/src/core/primitives/switch/switch.tsx +68 -0
  353. package/src/core/primitives/text/__workshop__/colored.tsx +30 -0
  354. package/src/core/primitives/text/__workshop__/example.tsx +39 -0
  355. package/src/core/primitives/text/__workshop__/index.ts +24 -0
  356. package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +48 -0
  357. package/src/core/primitives/text/index.ts +1 -0
  358. package/src/core/primitives/text/styles.ts +74 -0
  359. package/src/core/primitives/text/text.tsx +89 -0
  360. package/src/core/primitives/textArea/__workshop__/index.ts +14 -0
  361. package/src/core/primitives/textArea/__workshop__/plain.tsx +50 -0
  362. package/src/core/primitives/textArea/index.ts +1 -0
  363. package/src/core/primitives/textArea/textArea.tsx +120 -0
  364. package/src/core/primitives/textInput/__workshop__/clearButton.tsx +30 -0
  365. package/src/core/primitives/textInput/__workshop__/customValidity.tsx +17 -0
  366. package/src/core/primitives/textInput/__workshop__/index.ts +44 -0
  367. package/src/core/primitives/textInput/__workshop__/plain.tsx +98 -0
  368. package/src/core/primitives/textInput/__workshop__/readOnly.tsx +9 -0
  369. package/src/core/primitives/textInput/__workshop__/states.tsx +53 -0
  370. package/src/core/primitives/textInput/__workshop__/tones.tsx +277 -0
  371. package/src/core/primitives/textInput/__workshop__/typed.tsx +23 -0
  372. package/src/core/primitives/textInput/index.ts +1 -0
  373. package/src/core/primitives/textInput/textInput.test.tsx +48 -0
  374. package/src/core/primitives/textInput/textInput.tsx +395 -0
  375. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +102 -0
  376. package/src/core/primitives/tooltip/__workshop__/index.ts +29 -0
  377. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +74 -0
  378. package/src/core/primitives/tooltip/__workshop__/props.tsx +107 -0
  379. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +86 -0
  380. package/src/core/primitives/tooltip/constants.ts +23 -0
  381. package/src/core/primitives/tooltip/index.ts +2 -0
  382. package/src/core/primitives/tooltip/tooltip.test.tsx +452 -0
  383. package/src/core/primitives/tooltip/tooltip.tsx +495 -0
  384. package/src/core/primitives/tooltip/tooltipCard.tsx +109 -0
  385. package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +4 -0
  386. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +11 -0
  387. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +57 -0
  388. package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +10 -0
  389. package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +13 -0
  390. package/src/core/primitives/types.ts +179 -0
  391. package/src/core/styles/border/borderStyle.ts +56 -0
  392. package/src/core/styles/border/index.ts +2 -0
  393. package/src/core/styles/border/types.ts +10 -0
  394. package/src/core/styles/box/boxStyle.ts +69 -0
  395. package/src/core/styles/box/index.ts +2 -0
  396. package/src/core/styles/box/types.ts +11 -0
  397. package/src/core/styles/card/_cardColorStyle.ts +108 -0
  398. package/src/core/styles/card/index.ts +1 -0
  399. package/src/core/styles/flex/flexItemStyle.ts +27 -0
  400. package/src/core/styles/flex/flexStyle.ts +70 -0
  401. package/src/core/styles/flex/index.ts +3 -0
  402. package/src/core/styles/flex/types.ts +25 -0
  403. package/src/core/styles/focusRing/index.ts +25 -0
  404. package/src/core/styles/font/codeFontStyle.ts +13 -0
  405. package/src/core/styles/font/headingFontStyle.ts +13 -0
  406. package/src/core/styles/font/index.ts +6 -0
  407. package/src/core/styles/font/labelFontStyle.ts +13 -0
  408. package/src/core/styles/font/responsiveFont.ts +103 -0
  409. package/src/core/styles/font/textAlignStyle.ts +19 -0
  410. package/src/core/styles/font/textFontStyle.ts +13 -0
  411. package/src/core/styles/font/types.ts +35 -0
  412. package/src/core/styles/grid/gridItemStyle.ts +82 -0
  413. package/src/core/styles/grid/gridStyle.ts +108 -0
  414. package/src/core/styles/grid/index.ts +3 -0
  415. package/src/core/styles/grid/types.ts +37 -0
  416. package/src/core/styles/helpers.ts +72 -0
  417. package/src/core/styles/index.ts +5 -0
  418. package/src/core/styles/input/index.ts +2 -0
  419. package/src/core/styles/input/responsiveInputPaddingStyle.ts +78 -0
  420. package/src/core/styles/input/textInputStyle.ts +263 -0
  421. package/src/core/styles/internal.ts +12 -0
  422. package/src/core/styles/margin/index.ts +2 -0
  423. package/src/core/styles/margin/marginStyle.ts +21 -0
  424. package/src/core/styles/margin/marginsStyle.test.ts +33 -0
  425. package/src/core/styles/margin/types.ts +9 -0
  426. package/src/core/styles/padding/index.ts +2 -0
  427. package/src/core/styles/padding/paddingStyle.test.ts +33 -0
  428. package/src/core/styles/padding/paddingStyle.ts +21 -0
  429. package/src/core/styles/padding/types.ts +12 -0
  430. package/src/core/styles/radius/index.ts +2 -0
  431. package/src/core/styles/radius/radiusStyle.ts +23 -0
  432. package/src/core/styles/radius/types.ts +8 -0
  433. package/src/core/styles/shadow/index.ts +2 -0
  434. package/src/core/styles/shadow/shadowStyle.ts +29 -0
  435. package/src/core/styles/shadow/types.ts +6 -0
  436. package/src/core/styles/types.ts +8 -0
  437. package/src/core/theme/__workshop__/build/Root.tsx +367 -0
  438. package/src/core/theme/__workshop__/build/helpers.ts +46 -0
  439. package/src/core/theme/__workshop__/build/story.tsx +465 -0
  440. package/src/core/theme/__workshop__/canvas.tsx +352 -0
  441. package/src/core/theme/__workshop__/color.tsx +62 -0
  442. package/src/core/theme/__workshop__/debug/story.tsx +408 -0
  443. package/src/core/theme/__workshop__/index.ts +39 -0
  444. package/src/core/theme/__workshop__/layer.tsx +78 -0
  445. package/src/core/theme/__workshop__/nestedProvider.tsx +15 -0
  446. package/src/core/theme/index.ts +5 -0
  447. package/src/core/theme/theme.test.tsx +73 -0
  448. package/src/core/theme/themeColorProvider.tsx +29 -0
  449. package/src/core/theme/themeContext.ts +10 -0
  450. package/src/core/theme/themeProvider.tsx +62 -0
  451. package/src/core/theme/types.ts +12 -0
  452. package/src/core/theme/useRootTheme.ts +17 -0
  453. package/src/core/theme/useTheme.ts +16 -0
  454. package/src/core/types/avatar.ts +14 -0
  455. package/src/core/types/badge.ts +12 -0
  456. package/src/core/types/box.ts +19 -0
  457. package/src/core/types/button.ts +21 -0
  458. package/src/core/types/card.ts +6 -0
  459. package/src/core/types/component.ts +32 -0
  460. package/src/core/types/dialog.ts +4 -0
  461. package/src/core/types/flex.ts +30 -0
  462. package/src/core/types/grid.ts +14 -0
  463. package/src/core/types/gridItem.ts +29 -0
  464. package/src/core/types/index.ts +15 -0
  465. package/src/core/types/placement.ts +18 -0
  466. package/src/core/types/popover.ts +4 -0
  467. package/src/core/types/radius.ts +4 -0
  468. package/src/core/types/selectable.ts +6 -0
  469. package/src/core/types/text.ts +4 -0
  470. package/src/core/utils/arrow/arrow.tsx +123 -0
  471. package/src/core/utils/arrow/cmds.ts +91 -0
  472. package/src/core/utils/arrow/index.ts +1 -0
  473. package/src/core/utils/boundaryElement/__workshop__/index.ts +14 -0
  474. package/src/core/utils/boundaryElement/__workshop__/plain.tsx +19 -0
  475. package/src/core/utils/boundaryElement/boundaryElement.test.tsx +100 -0
  476. package/src/core/utils/boundaryElement/boundaryElementContext.ts +7 -0
  477. package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +24 -0
  478. package/src/core/utils/boundaryElement/index.ts +3 -0
  479. package/src/core/utils/boundaryElement/types.ts +7 -0
  480. package/src/core/utils/boundaryElement/useBoundaryElement.ts +26 -0
  481. package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +21 -0
  482. package/src/core/utils/conditionalWrapper/index.ts +1 -0
  483. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +30 -0
  484. package/src/core/utils/elementQuery/__workshop__/index.ts +14 -0
  485. package/src/core/utils/elementQuery/elementQuery.tsx +53 -0
  486. package/src/core/utils/elementQuery/helpers.ts +27 -0
  487. package/src/core/utils/elementQuery/index.ts +1 -0
  488. package/src/core/utils/errorBoundary.tsx +48 -0
  489. package/src/core/utils/getElementRef.ts +26 -0
  490. package/src/core/utils/index.ts +9 -0
  491. package/src/core/utils/layer/__workshop__/_debug.tsx +17 -0
  492. package/src/core/utils/layer/__workshop__/index.ts +24 -0
  493. package/src/core/utils/layer/__workshop__/multipleRoots.tsx +49 -0
  494. package/src/core/utils/layer/__workshop__/nested.tsx +98 -0
  495. package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +13 -0
  496. package/src/core/utils/layer/getLayerContext.test.ts +30 -0
  497. package/src/core/utils/layer/getLayerContext.ts +21 -0
  498. package/src/core/utils/layer/index.ts +4 -0
  499. package/src/core/utils/layer/layer.test.tsx +108 -0
  500. package/src/core/utils/layer/layer.tsx +98 -0
  501. package/src/core/utils/layer/layerContext.ts +7 -0
  502. package/src/core/utils/layer/layerProvider.tsx +111 -0
  503. package/src/core/utils/layer/types.ts +9 -0
  504. package/src/core/utils/layer/useLayer.ts +26 -0
  505. package/src/core/utils/portal/__workshop__/index.ts +14 -0
  506. package/src/core/utils/portal/__workshop__/named.tsx +63 -0
  507. package/src/core/utils/portal/index.ts +4 -0
  508. package/src/core/utils/portal/portal.test.tsx +103 -0
  509. package/src/core/utils/portal/portal.ts +32 -0
  510. package/src/core/utils/portal/portalContext.ts +31 -0
  511. package/src/core/utils/portal/portalProvider.tsx +47 -0
  512. package/src/core/utils/portal/types.ts +9 -0
  513. package/src/core/utils/portal/usePortal.ts +25 -0
  514. package/src/core/utils/spanWithTextOverflow.tsx +10 -0
  515. package/src/core/utils/srOnly/index.ts +1 -0
  516. package/src/core/utils/srOnly/srOnly.tsx +36 -0
  517. package/src/core/utils/virtualList/__workshop__/changingProps.tsx +36 -0
  518. package/src/core/utils/virtualList/__workshop__/elementScroll.tsx +24 -0
  519. package/src/core/utils/virtualList/__workshop__/index.ts +29 -0
  520. package/src/core/utils/virtualList/__workshop__/infiniteList.tsx +48 -0
  521. package/src/core/utils/virtualList/__workshop__/windowScrolll.tsx +22 -0
  522. package/src/core/utils/virtualList/index.ts +1 -0
  523. package/src/core/utils/virtualList/virtualList.tsx +200 -0
  524. package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +76 -0
  525. package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +54 -0
  526. package/src/theme/build/_deprecated/color/button/createButtonModes.ts +22 -0
  527. package/src/theme/build/_deprecated/color/button/createButtonTones.ts +55 -0
  528. package/src/theme/build/_deprecated/color/card/createCardStates.ts +60 -0
  529. package/src/theme/build/_deprecated/color/color.test.ts +63 -0
  530. package/src/theme/build/_deprecated/color/defaults.ts +390 -0
  531. package/src/theme/build/_deprecated/color/factory.ts +142 -0
  532. package/src/theme/build/_deprecated/color/index.ts +1 -0
  533. package/src/theme/build/_deprecated/color/input/createInputModes.ts +81 -0
  534. package/src/theme/build/_deprecated/color/muted/createMuted.ts +54 -0
  535. package/src/theme/build/_deprecated/color/spot/createSpot.ts +20 -0
  536. package/src/theme/build/buildColorTheme.test.ts +183 -0
  537. package/src/theme/build/buildColorTheme.ts +499 -0
  538. package/src/theme/build/buildTheme.test.ts +87 -0
  539. package/src/theme/build/buildTheme.ts +36 -0
  540. package/src/theme/build/colorToken/colorToken.ts +19 -0
  541. package/src/theme/build/colorToken/compileColorToken.ts +21 -0
  542. package/src/theme/build/colorToken/index.ts +2 -0
  543. package/src/theme/build/colorToken/types.ts +6 -0
  544. package/src/theme/build/index.ts +3 -0
  545. package/src/theme/build/lib/color-fns/blend/index.ts +3 -0
  546. package/src/theme/build/lib/color-fns/blend/mix.ts +21 -0
  547. package/src/theme/build/lib/color-fns/blend/multiply.ts +18 -0
  548. package/src/theme/build/lib/color-fns/blend/screen.ts +18 -0
  549. package/src/theme/build/lib/color-fns/color-fns.test.ts +68 -0
  550. package/src/theme/build/lib/color-fns/contrastRatio.ts +31 -0
  551. package/src/theme/build/lib/color-fns/convert.ts +150 -0
  552. package/src/theme/build/lib/color-fns/index.ts +6 -0
  553. package/src/theme/build/lib/color-fns/parse.ts +60 -0
  554. package/src/theme/build/lib/color-fns/rgba.ts +10 -0
  555. package/src/theme/build/lib/color-fns/types.ts +28 -0
  556. package/src/theme/build/lib/isRecord.ts +3 -0
  557. package/src/theme/build/lib/lazy.ts +30 -0
  558. package/src/theme/build/lib/utils.ts +19 -0
  559. package/src/theme/build/merge.ts +26 -0
  560. package/src/theme/build/mixThemeColor.test.ts +21 -0
  561. package/src/theme/build/mixThemeColor.ts +53 -0
  562. package/src/theme/build/renderColorTheme.ts +532 -0
  563. package/src/theme/build/renderColorValue.ts +85 -0
  564. package/src/theme/build/resolveColorTokens.ts +268 -0
  565. package/src/theme/build/theme.test.ts +27 -0
  566. package/src/theme/config/helpers.ts +55 -0
  567. package/src/theme/config/index.ts +4 -0
  568. package/src/theme/config/system.ts +115 -0
  569. package/src/theme/config/tokens/color/index.ts +1 -0
  570. package/src/theme/config/tokens/color/types.ts +133 -0
  571. package/src/theme/config/tokens/index.ts +4 -0
  572. package/src/theme/config/tokens/parseTokenKey.test.ts +64 -0
  573. package/src/theme/config/tokens/parseTokenKey.ts +67 -0
  574. package/src/theme/config/tokens/parseTokenValue.test.ts +42 -0
  575. package/src/theme/config/tokens/parseTokenValue.ts +133 -0
  576. package/src/theme/config/tokens/types.ts +53 -0
  577. package/src/theme/config/types.ts +46 -0
  578. package/src/theme/defaults/colorPalette.ts +5 -0
  579. package/src/theme/defaults/colorTokens.ts +648 -0
  580. package/src/theme/defaults/config.ts +84 -0
  581. package/src/theme/defaults/fonts.ts +227 -0
  582. package/src/theme/getScopedTheme.ts +98 -0
  583. package/src/theme/index.ts +5 -0
  584. package/src/theme/system/avatar.ts +14 -0
  585. package/src/theme/system/color/_constants.ts +45 -0
  586. package/src/theme/system/color/_helpers.ts +24 -0
  587. package/src/theme/system/color/_system.ts +40 -0
  588. package/src/theme/system/color/avatar.ts +15 -0
  589. package/src/theme/system/color/badge.ts +16 -0
  590. package/src/theme/system/color/button.ts +17 -0
  591. package/src/theme/system/color/color.ts +34 -0
  592. package/src/theme/system/color/index.ts +13 -0
  593. package/src/theme/system/color/input.ts +25 -0
  594. package/src/theme/system/color/kbd.ts +8 -0
  595. package/src/theme/system/color/selectable.ts +12 -0
  596. package/src/theme/system/color/shadow.ts +7 -0
  597. package/src/theme/system/color/state.ts +43 -0
  598. package/src/theme/system/color/syntax.ts +41 -0
  599. package/src/theme/system/css.ts +14 -0
  600. package/src/theme/system/focusRing.ts +7 -0
  601. package/src/theme/system/font.ts +52 -0
  602. package/src/theme/system/index.ts +11 -0
  603. package/src/theme/system/input.ts +33 -0
  604. package/src/theme/system/layer.ts +8 -0
  605. package/src/theme/system/shadow.ts +19 -0
  606. package/src/theme/system/styles.ts +13 -0
  607. package/src/theme/system/theme.ts +138 -0
  608. package/src/theme/system/v0/avatar.ts +10 -0
  609. package/src/theme/system/v0/color/_generic.ts +35 -0
  610. package/src/theme/system/v0/color/_system.ts +17 -0
  611. package/src/theme/system/v0/color/base.ts +21 -0
  612. package/src/theme/system/v0/color/button.ts +42 -0
  613. package/src/theme/system/v0/color/card.ts +19 -0
  614. package/src/theme/system/v0/color/color.ts +40 -0
  615. package/src/theme/system/v0/color/index.ts +11 -0
  616. package/src/theme/system/v0/color/input.ts +34 -0
  617. package/src/theme/system/v0/color/muted.ts +26 -0
  618. package/src/theme/system/v0/color/selectable.ts +31 -0
  619. package/src/theme/system/v0/color/solid.ts +26 -0
  620. package/src/theme/system/v0/color/spot.ts +13 -0
  621. package/src/theme/system/v0/index.ts +3 -0
  622. package/src/theme/system/v0/input.ts +23 -0
  623. package/src/theme/versioning/getTheme_v2.ts +57 -0
  624. package/src/theme/versioning/index.ts +5 -0
  625. package/src/theme/versioning/is_v0.ts +6 -0
  626. package/src/theme/versioning/is_v2.ts +6 -0
  627. package/src/theme/versioning/themeColor_v0_v2.ts +243 -0
  628. package/src/theme/versioning/themeColor_v2_v2_9.ts +49 -0
  629. package/src/theme/versioning/v0_v2.ts +94 -0
  630. package/src/theme/versioning/v2_v0.ts +135 -0
@@ -0,0 +1,1506 @@
1
+ import {ColorHueKey} from './_color.js'
2
+ import {ColorTint} from './_color.js'
3
+ import {ColorTintKey} from './_color.js'
4
+ import type * as CSS_2 from 'csstype'
5
+
6
+ /**
7
+ * @public
8
+ */
9
+ export declare interface BaseTheme {
10
+ _version?: 0
11
+ /**
12
+ * @deprecated Use `v2.avatar` instead
13
+ */
14
+ avatar: ThemeAvatar
15
+ /**
16
+ * @deprecated Use `v2.button` instead
17
+ */
18
+ button: {
19
+ textWeight: ThemeFontWeightKey
20
+ }
21
+ /**
22
+ * @deprecated Use `v2.color` instead
23
+ */
24
+ color: ThemeColorSchemes
25
+ /**
26
+ * @deprecated Use `v2.container` instead
27
+ */
28
+ container: number[]
29
+ /**
30
+ * @deprecated Use component-specific `v2.{button | card | input}.focusRing` values instead
31
+ */
32
+ focusRing: {
33
+ offset: number
34
+ width: number
35
+ }
36
+ /**
37
+ * @deprecated Use `v2.font` instead
38
+ */
39
+ fonts: ThemeFonts
40
+ /**
41
+ * @deprecated Use `v2.input` instead
42
+ */
43
+ input: ThemeInput
44
+ /**
45
+ * THIS API MAY BE UNSTABLE. DO NOT USE IN PRODUCTION.
46
+ * @beta
47
+ * @deprecated Use `v2.layer` instead
48
+ */
49
+ layer?: ThemeLayer
50
+ /**
51
+ * @deprecated Use `v2.media` instead
52
+ */
53
+ media: number[]
54
+ /**
55
+ * @deprecated Use `v2.radius` instead
56
+ */
57
+ radius: number[]
58
+ /**
59
+ * @deprecated Use `v2.shadow` instead
60
+ */
61
+ shadows: Array<ThemeShadow | null>
62
+ /**
63
+ * @deprecated Use `v2.space` instead
64
+ */
65
+ space: number[]
66
+ /**
67
+ * @internal
68
+ * @deprecated Use `v2.style` instead
69
+ */
70
+ styles?: ThemeStyles
71
+ v2?: RootTheme_v2
72
+ }
73
+
74
+ /** @internal */
75
+ export declare function buildTheme(config?: ThemeConfig): RootTheme
76
+
77
+ /** @public */
78
+ export declare const COLOR_CONFIG_AVATAR_COLORS: readonly ['*', ...ColorHueKey[]]
79
+
80
+ /** @public */
81
+ export declare const COLOR_CONFIG_BLEND_KEYS: readonly ['_blend']
82
+
83
+ /** @public */
84
+ export declare const COLOR_CONFIG_CARD_KEYS: readonly [
85
+ '_hue',
86
+ 'bg',
87
+ 'fg',
88
+ 'border',
89
+ 'focusRing',
90
+ 'muted/fg',
91
+ 'accent/fg',
92
+ 'link/fg',
93
+ 'code/bg',
94
+ 'code/fg',
95
+ 'skeleton/from',
96
+ 'skeleton/to',
97
+ 'status/dot',
98
+ 'status/icon',
99
+ '_hue',
100
+ 'bg',
101
+ 'fg',
102
+ 'border',
103
+ 'focusRing',
104
+ 'shadow/outline',
105
+ 'shadow/umbra',
106
+ 'shadow/penumbra',
107
+ 'shadow/ambient',
108
+ ]
109
+
110
+ /** @public */
111
+ export declare const COLOR_CONFIG_CARD_TONES: readonly [
112
+ '*',
113
+ 'transparent',
114
+ 'default',
115
+ 'neutral',
116
+ 'primary',
117
+ 'suggest',
118
+ 'positive',
119
+ 'caution',
120
+ 'critical',
121
+ ]
122
+
123
+ /** @public */
124
+ export declare const COLOR_CONFIG_INPUT_MODES: readonly ['*', 'default', 'invalid']
125
+
126
+ /** @public */
127
+ export declare const COLOR_CONFIG_INPUT_STATES: readonly [
128
+ '*',
129
+ 'enabled',
130
+ 'hovered',
131
+ 'readOnly',
132
+ 'disabled',
133
+ ]
134
+
135
+ /** @public */
136
+ export declare const COLOR_CONFIG_STATE_KEYS: readonly [
137
+ '_hue',
138
+ 'bg',
139
+ 'fg',
140
+ 'border',
141
+ 'focusRing',
142
+ 'muted/fg',
143
+ 'accent/fg',
144
+ 'link/fg',
145
+ 'code/bg',
146
+ 'code/fg',
147
+ 'skeleton/from',
148
+ 'skeleton/to',
149
+ 'status/dot',
150
+ 'status/icon',
151
+ ]
152
+
153
+ /** @public */
154
+ export declare const COLOR_CONFIG_STATE_TONES: readonly [
155
+ '*',
156
+ 'default',
157
+ 'neutral',
158
+ 'primary',
159
+ 'suggest',
160
+ 'positive',
161
+ 'caution',
162
+ 'critical',
163
+ ]
164
+
165
+ /** @public */
166
+ export declare const COLOR_CONFIG_STATES: readonly [
167
+ '*',
168
+ 'enabled',
169
+ 'hovered',
170
+ 'pressed',
171
+ 'selected',
172
+ 'disabled',
173
+ ]
174
+
175
+ /** @public */
176
+ export declare type ColorBlendModeTokenValue = [ThemeColorBlendModeKey, ThemeColorBlendModeKey]
177
+
178
+ /** @public */
179
+ export declare type ColorConfigAvatarColor = (typeof COLOR_CONFIG_AVATAR_COLORS)[number]
180
+
181
+ /** @public */
182
+ export declare type ColorConfigBlendKey = (typeof COLOR_CONFIG_BLEND_KEYS)[number]
183
+
184
+ /** @public */
185
+ export declare type ColorConfigCardKey = (typeof COLOR_CONFIG_CARD_KEYS)[number]
186
+
187
+ /** @public */
188
+ export declare type ColorConfigCardTone = (typeof COLOR_CONFIG_CARD_TONES)[number]
189
+
190
+ /** @public */
191
+ export declare type ColorConfigInputMode = (typeof COLOR_CONFIG_INPUT_MODES)[number]
192
+
193
+ /** @public */
194
+ export declare type ColorConfigInputState = (typeof COLOR_CONFIG_INPUT_STATES)[number]
195
+
196
+ /** @public */
197
+ export declare type ColorConfigOpacityValue = `0` | `0.${number}` | `1`
198
+
199
+ /** @public */
200
+ export declare type ColorConfigState = (typeof COLOR_CONFIG_STATES)[number]
201
+
202
+ /** @public */
203
+ export declare type ColorConfigStateKey = (typeof COLOR_CONFIG_STATE_KEYS)[number]
204
+
205
+ /** @public */
206
+ export declare type ColorConfigStateTone = (typeof COLOR_CONFIG_STATE_TONES)[number]
207
+
208
+ /** @public */
209
+ export declare type ColorConfigValue =
210
+ | `black`
211
+ | `white`
212
+ | `black/${ColorConfigOpacityValue}`
213
+ | `white/${ColorConfigOpacityValue}`
214
+ | `${ColorHueKey}`
215
+ | `${ColorHueKey} ${number}%`
216
+ | `${ColorHueKey}/${ColorTintKey}`
217
+ | `${ColorHueKey}/${ColorTintKey} ${number}%`
218
+ | `${ColorHueKey}/${ColorTintKey}/${ColorConfigOpacityValue}`
219
+ | `${ColorTintKey}`
220
+ | `${ColorTintKey} ${number}%`
221
+ | `${ColorTintKey}/${ColorConfigOpacityValue}`
222
+
223
+ /**
224
+ * @public
225
+ * @deprecated Use `buildColorTheme` instead.
226
+ */
227
+ export declare function createColorTheme(
228
+ partialOpts?: PartialThemeColorBuilderOpts,
229
+ ): ThemeColorSchemes
230
+
231
+ /**
232
+ * A CSS-in-JS style object: standard CSS properties plus an index signature that allows nested
233
+ * selectors, at-rules and custom properties.
234
+ *
235
+ * This is a self-owned definition (based on `csstype`) so the published `.d.ts` types stay fully
236
+ * controlled by us and do not reference any external CSS-in-JS library types.
237
+ *
238
+ * @internal
239
+ */
240
+ export declare interface CSSObject extends CSS_2.Properties<number | (string & {})> {
241
+ [key: string]: CSSObject | string | number | undefined
242
+ }
243
+
244
+ /** @internal */
245
+ export declare function getContrastRatio(bg: string, fg: string): number
246
+
247
+ /** @internal */
248
+ export declare function getScopedTheme(
249
+ themeProp: RootTheme | RootTheme_v2,
250
+ scheme: ThemeColorSchemeKey,
251
+ tone: ThemeColorCardToneKey,
252
+ ): Theme
253
+
254
+ /** @public */
255
+ export declare function getTheme_v2(theme: Theme): Theme_v2
256
+
257
+ /**
258
+ * @internal
259
+ */
260
+ export declare function hexToRgb(hex: string): RGB
261
+
262
+ /**
263
+ * @internal
264
+ */
265
+ export declare interface HSL {
266
+ h: number
267
+ s: number
268
+ l: number
269
+ }
270
+
271
+ /**
272
+ * @internal
273
+ */
274
+ export declare function hslToRgb(hsl: HSL): RGB
275
+
276
+ /** @internal */
277
+ export declare function is_v0(themeProp: RootTheme | RootTheme_v2): themeProp is RootTheme
278
+
279
+ /** @internal */
280
+ export declare function is_v2(themeProp: RootTheme | RootTheme_v2): themeProp is RootTheme_v2
281
+
282
+ /** @internal */
283
+ export declare function isColorBlendModeValue(str: string): str is ThemeColorBlendModeKey
284
+
285
+ /** @internal */
286
+ export declare function isColorButtonMode(str: string): str is ThemeColorButtonModeKey
287
+
288
+ /** @internal */
289
+ export declare function isColorConfigBaseKey(str: string): str is ColorConfigCardKey
290
+
291
+ /** @internal */
292
+ export declare function isColorConfigBaseTone(str: string): str is ColorConfigCardTone
293
+
294
+ /** @internal */
295
+ export declare function isColorConfigBlendKey(str: string): str is ColorConfigBlendKey
296
+
297
+ /** @internal */
298
+ export declare function isColorConfigStateKey(str: string): str is ColorConfigStateKey
299
+
300
+ /** @internal */
301
+ export declare function isColorConfigStateTone(str: string): str is ColorConfigStateTone
302
+
303
+ /** @internal */
304
+ export declare function isColorHueKey(str: string): str is ColorHueKey
305
+
306
+ /** @internal */
307
+ export declare function isColorOpacityValue(str: string): str is ColorConfigOpacityValue
308
+
309
+ /** @internal */
310
+ export declare function isColorTintKey(str: string): str is ColorTintKey
311
+
312
+ /** @internal */
313
+ export declare function isColorTokenValue(str: string): str is ColorConfigValue
314
+
315
+ /** @internal */
316
+ export declare function isColorValue(str: string): str is 'black' | 'white'
317
+
318
+ /**
319
+ * Apply the \`mix\` blend mode
320
+ * @internal
321
+ */
322
+ export declare function mix(b: RGB | RGBA, s: RGB | RGBA, weight: number): RGB
323
+
324
+ /**
325
+ * Apply the \`multiply\` blend mode
326
+ * Source: https://www.w3.org/TR/compositing-1/#blendingmultiply
327
+ * @internal
328
+ */
329
+ export declare function multiply(b: RGB | RGBA, s: RGB | RGBA): RGB
330
+
331
+ /**
332
+ * @internal
333
+ */
334
+ export declare function parseColor(color: unknown): RGB | RGBA
335
+
336
+ /** @internal */
337
+ export declare function parseTokenKey(str: string): TokenKeyNode | undefined
338
+
339
+ /** @internal */
340
+ export declare function parseTokenValue(str: string): TokenValueNode | undefined
341
+
342
+ /**
343
+ * @public
344
+ * @deprecated Use `ThemeConfig` instead.
345
+ */
346
+ export declare type PartialThemeColorBuilderOpts = Partial<ThemeColorBuilderOpts>
347
+
348
+ /**
349
+ * @internal
350
+ */
351
+ export declare interface RGB {
352
+ r: number
353
+ g: number
354
+ b: number
355
+ a?: undefined
356
+ }
357
+
358
+ /**
359
+ * @internal
360
+ */
361
+ export declare interface RGBA {
362
+ r: number
363
+ g: number
364
+ b: number
365
+ a: number
366
+ }
367
+
368
+ /**
369
+ * @internal
370
+ */
371
+ export declare function rgba(color: unknown, a: number): string
372
+
373
+ /**
374
+ * @internal
375
+ */
376
+ export declare function rgbaToRGBA(rgba: string): RGBA
377
+
378
+ /**
379
+ * @internal
380
+ */
381
+ export declare function rgbToHex(color: RGB | RGBA): string
382
+
383
+ /**
384
+ * @internal
385
+ * @see https://css-tricks.com/converting-color-spaces-in-javascript/
386
+ */
387
+ export declare function rgbToHsl({r, g, b}: RGB): HSL
388
+
389
+ /**
390
+ * @public
391
+ */
392
+ export declare type RootTheme = BaseTheme
393
+
394
+ /**
395
+ * @public
396
+ */
397
+ export declare interface RootTheme_v2 {
398
+ _version: 2
399
+ avatar: ThemeAvatar_v2
400
+ button: {
401
+ border: {
402
+ width: number
403
+ }
404
+ focusRing: ThemeFocusRing
405
+ textWeight: ThemeFontWeightKey
406
+ }
407
+ card: {
408
+ border: {
409
+ width: number
410
+ }
411
+ focusRing: ThemeFocusRing
412
+ shadow: {
413
+ outline: number
414
+ }
415
+ }
416
+ color: ThemeColorSchemes_v2
417
+ container: number[]
418
+ font: ThemeFonts
419
+ input: ThemeInput_v2
420
+ layer: ThemeLayer
421
+ media: number[]
422
+ radius: number[]
423
+ shadow: Array<ThemeShadow | null>
424
+ space: number[]
425
+ /** @internal */
426
+ style?: ThemeStyles
427
+ }
428
+
429
+ /**
430
+ * Apply the \`screen\` blend mode
431
+ * Source: https://www.w3.org/TR/compositing-1/#blendingscreen
432
+ * @internal
433
+ */
434
+ declare function screen_2(b: RGB | RGBA, s: RGB | RGBA): RGB
435
+ export {screen_2 as screen}
436
+
437
+ /**
438
+ * @public
439
+ */
440
+ export declare interface Theme {
441
+ bcms: Omit<RootTheme, 'color' | 'v2'> & {
442
+ /**
443
+ * @deprecated Use `v2.color` instead
444
+ */
445
+ color: ThemeColor
446
+ v2?: Theme_v2
447
+ }
448
+ }
449
+
450
+ /** @public */
451
+ export declare const THEME_COLOR_AVATAR_COLORS: ColorHueKey[]
452
+
453
+ /** @public */
454
+ export declare const THEME_COLOR_BLEND_MODES: readonly ['multiply', 'screen']
455
+
456
+ /** @public */
457
+ export declare const THEME_COLOR_BUTTON_MODES: readonly ['default', 'ghost', 'bleed']
458
+
459
+ /** @public */
460
+ export declare const THEME_COLOR_CARD_TONES: readonly [
461
+ 'transparent',
462
+ 'default',
463
+ 'neutral',
464
+ 'primary',
465
+ 'suggest',
466
+ 'positive',
467
+ 'caution',
468
+ 'critical',
469
+ ]
470
+
471
+ /** @public */
472
+ export declare const THEME_COLOR_INPUT_MODES: readonly ['default', 'invalid']
473
+
474
+ /** @public */
475
+ export declare const THEME_COLOR_INPUT_STATES: readonly [
476
+ 'enabled',
477
+ 'hovered',
478
+ 'readOnly',
479
+ 'disabled',
480
+ ]
481
+
482
+ /** @public */
483
+ export declare const THEME_COLOR_SCHEMES: readonly ['light', 'dark']
484
+
485
+ /** @public */
486
+ export declare const THEME_COLOR_STATE_TONES: readonly [
487
+ 'default',
488
+ 'neutral',
489
+ 'primary',
490
+ 'suggest',
491
+ 'positive',
492
+ 'caution',
493
+ 'critical',
494
+ ]
495
+
496
+ /** @public */
497
+ export declare const THEME_COLOR_STATES: readonly [
498
+ 'enabled',
499
+ 'hovered',
500
+ 'pressed',
501
+ 'selected',
502
+ 'disabled',
503
+ ]
504
+
505
+ /**
506
+ * @public
507
+ */
508
+ export declare type Theme_v2 = Omit<RootTheme_v2, 'color'> & {
509
+ color: ThemeColorCard_v2
510
+ /**
511
+ * Indicates whether the theme is resolved or raw, it's necessary to avoid issues
512
+ * with bcms V2 components accessing a v1 <ThemeProvider>.
513
+ * See upstream PR #1203 for more info.
514
+ */
515
+ _resolved: boolean
516
+ }
517
+
518
+ /**
519
+ * @public
520
+ * @deprecated Use `ThemeAvatar_v2` from `@bettercms-ai/kit/theme` instead.
521
+ */
522
+ export declare interface ThemeAvatar {
523
+ sizes: {
524
+ distance: number
525
+ size: number
526
+ }[]
527
+ }
528
+
529
+ /**
530
+ * @public
531
+ */
532
+ export declare interface ThemeAvatar_v2 {
533
+ sizes: {
534
+ /** Spacing between avatars in an <AvatarStack> component (px) */
535
+ distance: number
536
+ /** Diameter of the avatar (px) */
537
+ size: number
538
+ }[]
539
+ focusRing: ThemeFocusRing
540
+ }
541
+
542
+ /**
543
+ * @public
544
+ */
545
+ export declare type ThemeBoxShadow = [number, number, number, number]
546
+
547
+ /**
548
+ * @public
549
+ * @deprecated Use `ThemeColor_v2` instead.
550
+ */
551
+ export declare interface ThemeColor extends Partial<Omit<ThemeColorGenericState, 'muted'>> {
552
+ base: ThemeColorBase
553
+ button: ThemeColorButton
554
+ card: ThemeColorCard
555
+ dark: boolean
556
+ input: ThemeColorInput
557
+ muted: ThemeColorMuted
558
+ selectable?: ThemeColorSelectable
559
+ solid: ThemeColorSolid
560
+ spot: ThemeColorSpot
561
+ syntax: ThemeColorSyntax
562
+ }
563
+
564
+ /**
565
+ * @public
566
+ */
567
+ export declare type ThemeColorAvatar_v2 = Record<ThemeColorAvatarColorKey, ThemeColorAvatarHue_v2>
568
+
569
+ /** @public */
570
+ export declare type ThemeColorAvatarColorKey = (typeof THEME_COLOR_AVATAR_COLORS)[number]
571
+
572
+ /**
573
+ * @public
574
+ */
575
+ export declare interface ThemeColorAvatarHue_v2 {
576
+ _blend?: ThemeColorBlendModeKey
577
+ bg: string
578
+ fg: string
579
+ }
580
+
581
+ /** @public */
582
+ export declare interface ThemeColorAvatarHueTokens {
583
+ _blend?: ColorBlendModeTokenValue
584
+ _hue?: ColorHueKey
585
+ bg?: ThemeColorTokenValue
586
+ fg?: ThemeColorTokenValue
587
+ }
588
+
589
+ /** @public */
590
+ export declare interface ThemeColorAvatarTokens {
591
+ '*'?: ThemeColorAvatarHueTokens
592
+ 'gray'?: ThemeColorAvatarHueTokens
593
+ 'blue'?: ThemeColorAvatarHueTokens
594
+ 'purple'?: ThemeColorAvatarHueTokens
595
+ 'magenta'?: ThemeColorAvatarHueTokens
596
+ 'red'?: ThemeColorAvatarHueTokens
597
+ 'orange'?: ThemeColorAvatarHueTokens
598
+ 'yellow'?: ThemeColorAvatarHueTokens
599
+ 'green'?: ThemeColorAvatarHueTokens
600
+ 'cyan'?: ThemeColorAvatarHueTokens
601
+ }
602
+
603
+ /**
604
+ * @public
605
+ */
606
+ export declare type ThemeColorBadge_v2 = Record<ThemeColorStateToneKey, ThemeColorBadgeTone_v2>
607
+
608
+ /** @public */
609
+ export declare type ThemeColorBadgeTokens = Partial<
610
+ Record<'*' | ThemeColorStateToneKey, ThemeColorBadgeToneTokens>
611
+ >
612
+
613
+ /**
614
+ * @public
615
+ */
616
+ export declare interface ThemeColorBadgeTone_v2 {
617
+ bg: string
618
+ fg: string
619
+ dot: string
620
+ icon: string
621
+ }
622
+
623
+ /** @public */
624
+ export declare interface ThemeColorBadgeToneTokens {
625
+ _blend?: ColorBlendModeTokenValue
626
+ _hue?: ColorHueKey
627
+ bg?: ThemeColorTokenValue
628
+ dot?: ThemeColorTokenValue
629
+ fg?: ThemeColorTokenValue
630
+ icon?: ThemeColorTokenValue
631
+ }
632
+
633
+ /**
634
+ * @public
635
+ * @deprecated Use `ThemeColorCard_v2` instead.
636
+ */
637
+ export declare interface ThemeColorBase {
638
+ bg: string
639
+ fg: string
640
+ border: string
641
+ focusRing: string
642
+ backdrop?: string
643
+ shadow: {
644
+ outline: string
645
+ umbra: string
646
+ penumbra: string
647
+ ambient: string
648
+ }
649
+ skeleton?: {
650
+ from: string
651
+ to: string
652
+ }
653
+ }
654
+
655
+ /** @public */
656
+ export declare interface ThemeColorBaseTokens extends ThemeColorStateTokens {
657
+ focusRing?: ThemeColorTokenValue
658
+ backdrop?: ThemeColorTokenValue
659
+ shadow?: {
660
+ outline?: ThemeColorTokenValue
661
+ umbra?: ThemeColorTokenValue
662
+ penumbra?: ThemeColorTokenValue
663
+ ambient?: ThemeColorTokenValue
664
+ }
665
+ }
666
+
667
+ /** @public */
668
+ export declare type ThemeColorBlendModeKey = (typeof THEME_COLOR_BLEND_MODES)[number]
669
+
670
+ /**
671
+ * @public
672
+ * @deprecated Use `buildColorTheme` instead.
673
+ */
674
+ export declare interface ThemeColorBuilderOpts {
675
+ base: (opts: {dark: boolean; name: ThemeColorName}) => ThemeColorBase
676
+ solid: (opts: {
677
+ base: ThemeColorBase
678
+ dark: boolean
679
+ tone: ThemeColorName
680
+ name: ThemeColorName
681
+ state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'
682
+ }) => ThemeColorGenericState
683
+ muted: (opts: {
684
+ base: ThemeColorBase
685
+ dark: boolean
686
+ tone: ThemeColorToneKey
687
+ name: ThemeColorName
688
+ state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'
689
+ }) => ThemeColorGenericState
690
+ card: (opts: {
691
+ base: ThemeColorBase
692
+ dark: boolean
693
+ muted: ThemeColorMuted
694
+ name: ThemeColorName
695
+ solid: ThemeColorSolid
696
+ state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'
697
+ }) => ThemeColorGenericState
698
+ button: (opts: {
699
+ dark: boolean
700
+ mode: ThemeColorButtonModeKey
701
+ base: ThemeColorBase
702
+ solid: ThemeColorSolidTone
703
+ muted: ThemeColorMutedTone
704
+ }) => ThemeColorButtonStates
705
+ input: (opts: {
706
+ base: ThemeColorBase
707
+ solid: ThemeColorSolidTone
708
+ muted: ThemeColorMutedTone
709
+ dark: boolean
710
+ mode: 'default' | 'invalid'
711
+ state: 'enabled' | 'disabled' | 'hovered' | 'readOnly'
712
+ }) => ThemeColorInputState
713
+ selectable: (opts: {
714
+ dark: boolean
715
+ base: ThemeColorBase
716
+ solid: ThemeColorSolid
717
+ muted: ThemeColorMuted
718
+ state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'
719
+ tone: 'default' | 'primary' | 'positive' | 'caution' | 'critical'
720
+ }) => ThemeColorGenericState
721
+ syntax: (opts: {base: ThemeColorBase; dark: boolean}) => ThemeColorSyntax
722
+ spot: (opts: {base: ThemeColorBase; dark: boolean; key: ThemeColorSpotKey}) => string
723
+ }
724
+
725
+ /**
726
+ * @public
727
+ * @deprecated Use `ThemeColorButton_v2` instead.
728
+ */
729
+ export declare interface ThemeColorButton {
730
+ default: ThemeColorButtonTones
731
+ ghost: ThemeColorButtonTones
732
+ bleed: ThemeColorButtonTones
733
+ }
734
+
735
+ /**
736
+ * @public
737
+ */
738
+ export declare type ThemeColorButton_v2 = Record<ThemeColorButtonModeKey, ThemeColorButtonMode_v2>
739
+
740
+ /**
741
+ * @public
742
+ */
743
+ export declare type ThemeColorButtonMode_v2 = Record<
744
+ ThemeColorStateToneKey,
745
+ ThemeColorButtonTone_v2
746
+ >
747
+
748
+ /** @public */
749
+ export declare type ThemeColorButtonModeKey = (typeof THEME_COLOR_BUTTON_MODES)[number]
750
+
751
+ /**
752
+ * @public
753
+ * @deprecated Use `ThemeColorState_v2` instead.
754
+ */
755
+ export declare type ThemeColorButtonState = ThemeColorGenericState
756
+
757
+ /**
758
+ * @public
759
+ * @deprecated Use `ThemeColorButtonStates_v2` instead.
760
+ */
761
+ export declare interface ThemeColorButtonStates {
762
+ enabled: ThemeColorGenericState
763
+ hovered: ThemeColorGenericState
764
+ pressed: ThemeColorGenericState
765
+ selected: ThemeColorGenericState
766
+ disabled: ThemeColorGenericState
767
+ }
768
+
769
+ /** @public */
770
+ export declare interface ThemeColorButtonTokens
771
+ extends Partial<Record<ColorConfigStateTone, ThemeColorStatesTokens>> {
772
+ _hue?: ColorHueKey
773
+ }
774
+
775
+ /**
776
+ * @public
777
+ */
778
+ export declare type ThemeColorButtonTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
779
+
780
+ /**
781
+ * TODO: Rename to `ThemeColorButtonMode`.
782
+ * @public
783
+ * @deprecated Use `ThemeColorButtonTones_v2` instead.
784
+ */
785
+ export declare interface ThemeColorButtonTones {
786
+ default: ThemeColorButtonStates
787
+ primary: ThemeColorButtonStates
788
+ positive: ThemeColorButtonStates
789
+ caution: ThemeColorButtonStates
790
+ critical: ThemeColorButtonStates
791
+ }
792
+
793
+ /**
794
+ * @public
795
+ * @deprecated Use `ThemeColorSelectable_v2` instead.
796
+ */
797
+ export declare interface ThemeColorCard {
798
+ enabled: ThemeColorGenericState
799
+ hovered: ThemeColorGenericState
800
+ pressed: ThemeColorGenericState
801
+ selected: ThemeColorGenericState
802
+ disabled: ThemeColorGenericState
803
+ }
804
+
805
+ /**
806
+ * @public
807
+ */
808
+ export declare interface ThemeColorCard_v2 extends ThemeColorState_v2 {
809
+ /** @internal */
810
+ _blend: ThemeColorBlendModeKey
811
+ _dark: boolean
812
+ backdrop: string
813
+ button: ThemeColorButton_v2
814
+ focusRing: string
815
+ input: ThemeColorInput_v2
816
+ selectable: ThemeColorSelectable_v2
817
+ shadow: ThemeColorShadow
818
+ syntax: ThemeColorSyntax
819
+ }
820
+
821
+ /**
822
+ * @public
823
+ * @deprecated Use `ThemeColorState_v2` instead.
824
+ */
825
+ export declare type ThemeColorCardState = ThemeColorGenericState
826
+
827
+ /** @public */
828
+ export declare type ThemeColorCardToneKey = (typeof THEME_COLOR_CARD_TONES)[number]
829
+
830
+ /**
831
+ * @public
832
+ * @deprecated Use `ThemeColorState_v2` instead.
833
+ */
834
+ export declare interface ThemeColorGenericState {
835
+ /** @internal */
836
+ _blend?: ThemeColorBlendModeKey
837
+ bg: string
838
+ /**
839
+ * @beta
840
+ */
841
+ bg2?: string
842
+ border: string
843
+ fg: string
844
+ icon: string
845
+ muted: {
846
+ fg: string
847
+ }
848
+ accent: {
849
+ fg: string
850
+ }
851
+ link: {
852
+ fg: string
853
+ }
854
+ code: {
855
+ bg: string
856
+ fg: string
857
+ }
858
+ skeleton?: {
859
+ from: string
860
+ to: string
861
+ }
862
+ }
863
+
864
+ /**
865
+ * @public
866
+ * @deprecated Use `ThemeColorInput_v2` instead.
867
+ */
868
+ export declare interface ThemeColorInput {
869
+ default: ThemeColorInputStates
870
+ invalid: ThemeColorInputStates
871
+ }
872
+
873
+ /**
874
+ * @public
875
+ */
876
+ export declare type ThemeColorInput_v2 = Record<ThemeColorInputModeKey, ThemeColorInputMode_v2>
877
+
878
+ /**
879
+ * @public
880
+ */
881
+ export declare type ThemeColorInputMode_v2 = Record<
882
+ ThemeColorInputStateKey,
883
+ ThemeColorInputState_v2
884
+ >
885
+
886
+ /** @public */
887
+ export declare type ThemeColorInputModeKey = (typeof THEME_COLOR_INPUT_MODES)[number]
888
+
889
+ /**
890
+ * @public
891
+ * @deprecated Use `ThemeColorInputState_v2` instead.
892
+ */
893
+ export declare interface ThemeColorInputState {
894
+ _blend?: ThemeColorBlendModeKey
895
+ bg: string
896
+ bg2: string
897
+ border: string
898
+ fg: string
899
+ placeholder: string
900
+ }
901
+
902
+ /**
903
+ * @public
904
+ */
905
+ export declare interface ThemeColorInputState_v2 {
906
+ _blend?: ThemeColorBlendModeKey
907
+ bg: string
908
+ border: string
909
+ fg: string
910
+ muted: {
911
+ bg: string
912
+ }
913
+ placeholder: string
914
+ }
915
+
916
+ /** @public */
917
+ export declare type ThemeColorInputStateKey = (typeof THEME_COLOR_INPUT_STATES)[number]
918
+
919
+ /**
920
+ * @public
921
+ * @deprecated Use `ThemeColorInputMode_v2` instead.
922
+ */
923
+ export declare interface ThemeColorInputStates {
924
+ enabled: ThemeColorInputState
925
+ disabled: ThemeColorInputState
926
+ hovered: ThemeColorInputState
927
+ readOnly: ThemeColorInputState
928
+ }
929
+
930
+ /** @public */
931
+ export declare interface ThemeColorInputStateTokens {
932
+ _blend?: ColorBlendModeTokenValue
933
+ _hue?: ColorHueKey
934
+ bg?: ThemeColorTokenValue
935
+ border?: ThemeColorTokenValue
936
+ fg?: ThemeColorTokenValue
937
+ muted?: {
938
+ bg?: ThemeColorTokenValue
939
+ }
940
+ placeholder?: ThemeColorTokenValue
941
+ }
942
+
943
+ /** @public */
944
+ export declare interface ThemeColorInputTokens
945
+ extends Partial<Record<ColorConfigInputState, ThemeColorInputStateTokens>> {
946
+ _hue?: ColorHueKey
947
+ }
948
+
949
+ /**
950
+ * @public
951
+ */
952
+ export declare interface ThemeColorKBD {
953
+ bg: string
954
+ fg: string
955
+ border: string
956
+ }
957
+
958
+ /**
959
+ * @public
960
+ * @deprecated Use `ThemeColorSelectable_v2` instead.
961
+ */
962
+ export declare interface ThemeColorMuted {
963
+ default: ThemeColorMutedTone
964
+ transparent: ThemeColorMutedTone
965
+ primary: ThemeColorMutedTone
966
+ positive: ThemeColorMutedTone
967
+ caution: ThemeColorMutedTone
968
+ critical: ThemeColorMutedTone
969
+ }
970
+
971
+ /**
972
+ * @public
973
+ * @deprecated Use `ThemeColorSelectableTone_v2` instead.
974
+ */
975
+ export declare interface ThemeColorMutedTone {
976
+ enabled: ThemeColorGenericState
977
+ disabled: ThemeColorGenericState
978
+ hovered: ThemeColorGenericState
979
+ pressed: ThemeColorGenericState
980
+ selected: ThemeColorGenericState
981
+ }
982
+
983
+ /**
984
+ * @public
985
+ * @deprecated Use `ThemeColorCardToneKey` instead.
986
+ */
987
+ export declare type ThemeColorName =
988
+ | 'transparent'
989
+ | 'default'
990
+ | 'primary'
991
+ | 'positive'
992
+ | 'caution'
993
+ | 'critical'
994
+
995
+ /** @public */
996
+ export declare type ThemeColorPalette = {
997
+ black: string | ColorTint
998
+ white: string | ColorTint
999
+ } & Record<ColorHueKey, Record<ColorTintKey, string | ColorTint>>
1000
+
1001
+ /**
1002
+ * @public
1003
+ * @deprecated Use `ThemeColorScheme_v2` instead.
1004
+ */
1005
+ export declare type ThemeColorScheme = Record<ThemeColorName, ThemeColor>
1006
+
1007
+ /**
1008
+ * @public
1009
+ */
1010
+ export declare type ThemeColorScheme_v2 = Record<ThemeColorCardToneKey, ThemeColorCard_v2>
1011
+
1012
+ /**
1013
+ * @public
1014
+ */
1015
+ export declare type ThemeColorSchemeKey = (typeof THEME_COLOR_SCHEMES)[number]
1016
+
1017
+ /**
1018
+ * @public
1019
+ * @deprecated Use `ThemeColorSchemes_v2` instead.
1020
+ */
1021
+ export declare type ThemeColorSchemes = Record<ThemeColorSchemeKey, ThemeColorScheme>
1022
+
1023
+ /**
1024
+ * @public
1025
+ */
1026
+ export declare type ThemeColorSchemes_v2 = Record<ThemeColorSchemeKey, ThemeColorScheme_v2>
1027
+
1028
+ /**
1029
+ * @public
1030
+ * @deprecated Use `ThemeColorSelectable_v2` instead.
1031
+ */
1032
+ export declare interface ThemeColorSelectable {
1033
+ default: ThemeColorSelectableStates
1034
+ primary: ThemeColorSelectableStates
1035
+ positive: ThemeColorSelectableStates
1036
+ caution: ThemeColorSelectableStates
1037
+ critical: ThemeColorSelectableStates
1038
+ }
1039
+
1040
+ /**
1041
+ * @public
1042
+ */
1043
+ export declare type ThemeColorSelectable_v2 = Record<
1044
+ ThemeColorStateToneKey,
1045
+ ThemeColorSelectableTone_v2
1046
+ >
1047
+
1048
+ /**
1049
+ * @public
1050
+ * @deprecated Use `ThemeColorState_v2` instead.
1051
+ */
1052
+ export declare type ThemeColorSelectableState = ThemeColorGenericState
1053
+
1054
+ /**
1055
+ * @public
1056
+ * @deprecated Use `ThemeColorSelectableStates_v2` instead.
1057
+ */
1058
+ export declare interface ThemeColorSelectableStates {
1059
+ enabled: ThemeColorSelectableState
1060
+ hovered: ThemeColorSelectableState
1061
+ pressed: ThemeColorSelectableState
1062
+ selected: ThemeColorSelectableState
1063
+ disabled: ThemeColorSelectableState
1064
+ }
1065
+
1066
+ /**
1067
+ * @public
1068
+ */
1069
+ export declare type ThemeColorSelectableTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
1070
+
1071
+ /** @public */
1072
+ export declare interface ThemeColorShadow {
1073
+ outline: string
1074
+ umbra: string
1075
+ penumbra: string
1076
+ ambient: string
1077
+ }
1078
+
1079
+ /**
1080
+ * @public
1081
+ * @deprecated Use `ThemeColorSelectable_v2` instead.
1082
+ */
1083
+ export declare interface ThemeColorSolid {
1084
+ default: ThemeColorSolidTone
1085
+ transparent: ThemeColorSolidTone
1086
+ primary: ThemeColorSolidTone
1087
+ positive: ThemeColorSolidTone
1088
+ caution: ThemeColorSolidTone
1089
+ critical: ThemeColorSolidTone
1090
+ }
1091
+
1092
+ /**
1093
+ * @public
1094
+ * @deprecated Use `ThemeColorSelectableTone_v2` instead.
1095
+ */
1096
+ export declare interface ThemeColorSolidTone {
1097
+ enabled: ThemeColorGenericState
1098
+ disabled: ThemeColorGenericState
1099
+ hovered: ThemeColorGenericState
1100
+ pressed: ThemeColorGenericState
1101
+ selected: ThemeColorGenericState
1102
+ }
1103
+
1104
+ /**
1105
+ * @public
1106
+ * @deprecated Use `ThemeColorAvatar_v2` instead
1107
+ */
1108
+ export declare type ThemeColorSpot = Record<ThemeColorSpotKey, string>
1109
+
1110
+ /**
1111
+ * @public
1112
+ * @deprecated Use `ThemeColorAvatarColorKey` instead
1113
+ */
1114
+ export declare type ThemeColorSpotKey = ThemeColorAvatarColorKey
1115
+
1116
+ /**
1117
+ * @public
1118
+ */
1119
+ export declare interface ThemeColorState_v2 {
1120
+ /** @internal */
1121
+ _blend?: ThemeColorBlendModeKey
1122
+ accent: {
1123
+ fg: string
1124
+ }
1125
+ /**
1126
+ * @internal This may be removed in a future release
1127
+ * */
1128
+ avatar: ThemeColorAvatar_v2
1129
+ /**
1130
+ * @internal This may be removed in a future release
1131
+ * */
1132
+ badge: ThemeColorBadge_v2
1133
+ bg: string
1134
+ border: string
1135
+ code: {
1136
+ bg: string
1137
+ fg: string
1138
+ }
1139
+ fg: string
1140
+ icon: string
1141
+ kbd: ThemeColorKBD
1142
+ link: {
1143
+ fg: string
1144
+ }
1145
+ muted: {
1146
+ bg: string
1147
+ fg: string
1148
+ }
1149
+ skeleton: {
1150
+ from: string
1151
+ to: string
1152
+ }
1153
+ }
1154
+
1155
+ /** @public */
1156
+ export declare type ThemeColorStateKey = (typeof THEME_COLOR_STATES)[number]
1157
+
1158
+ /** @public */
1159
+ export declare type ThemeColorStatesTokens = Partial<
1160
+ Record<ColorConfigState, ThemeColorStateTokens>
1161
+ >
1162
+
1163
+ /** @public */
1164
+ export declare interface ThemeColorStateTokens {
1165
+ _blend?: ColorBlendModeTokenValue
1166
+ _hue?: ColorHueKey
1167
+ accent?: {
1168
+ fg?: ThemeColorTokenValue
1169
+ }
1170
+ avatar?: ThemeColorAvatarTokens
1171
+ badge?: ThemeColorBadgeTokens
1172
+ bg?: ThemeColorTokenValue
1173
+ border?: ThemeColorTokenValue
1174
+ code?: {
1175
+ bg?: ThemeColorTokenValue
1176
+ fg?: ThemeColorTokenValue
1177
+ }
1178
+ fg?: ThemeColorTokenValue
1179
+ icon?: ThemeColorTokenValue
1180
+ kbd?: {
1181
+ bg?: ThemeColorTokenValue
1182
+ fg?: ThemeColorTokenValue
1183
+ border?: ThemeColorTokenValue
1184
+ }
1185
+ link?: {
1186
+ fg?: ThemeColorTokenValue
1187
+ }
1188
+ muted?: {
1189
+ bg?: ThemeColorTokenValue
1190
+ fg?: ThemeColorTokenValue
1191
+ }
1192
+ skeleton?: {
1193
+ from?: ThemeColorTokenValue
1194
+ to?: ThemeColorTokenValue
1195
+ }
1196
+ }
1197
+
1198
+ /** @public */
1199
+ export declare type ThemeColorStateToneKey = (typeof THEME_COLOR_STATE_TONES)[number]
1200
+
1201
+ /**
1202
+ * @public
1203
+ */
1204
+ export declare interface ThemeColorSyntax {
1205
+ atrule: string
1206
+ attrName: string
1207
+ attrValue: string
1208
+ attribute: string
1209
+ boolean: string
1210
+ builtin: string
1211
+ cdata: string
1212
+ char: string
1213
+ class: string
1214
+ className: string
1215
+ comment: string
1216
+ constant: string
1217
+ deleted: string
1218
+ doctype: string
1219
+ entity: string
1220
+ function: string
1221
+ hexcode: string
1222
+ id: string
1223
+ important: string
1224
+ inserted: string
1225
+ keyword: string
1226
+ number: string
1227
+ operator: string
1228
+ prolog: string
1229
+ property: string
1230
+ pseudoClass: string
1231
+ pseudoElement: string
1232
+ punctuation: string
1233
+ regex: string
1234
+ selector: string
1235
+ string: string
1236
+ symbol: string
1237
+ tag: string
1238
+ unit: string
1239
+ url: string
1240
+ variable: string
1241
+ }
1242
+
1243
+ /** @public */
1244
+ export declare interface ThemeColorTokens {
1245
+ base?: Partial<Record<ColorConfigCardTone, ThemeColorBaseTokens>>
1246
+ button?: Partial<Record<ThemeColorButtonModeKey, ThemeColorButtonTokens>>
1247
+ input?: Partial<Record<ColorConfigInputMode, ThemeColorInputTokens>>
1248
+ selectable?: Partial<
1249
+ Record<
1250
+ ColorConfigStateTone,
1251
+ {
1252
+ _hue?: ColorHueKey
1253
+ } & ThemeColorStatesTokens
1254
+ >
1255
+ >
1256
+ syntax?: Partial<Record<keyof ThemeColorSyntax, ThemeColorTokenValue>>
1257
+ }
1258
+
1259
+ /** @public */
1260
+ export declare type ThemeColorTokenValue = [ColorConfigValue, ColorConfigValue]
1261
+
1262
+ /**
1263
+ * @public
1264
+ * @deprecated Use `ThemeColorCardToneKey` instead.
1265
+ */
1266
+ export declare type ThemeColorToneKey = ThemeColorName
1267
+
1268
+ /** @public */
1269
+ export declare interface ThemeConfig {
1270
+ avatar?: ThemeAvatar_v2
1271
+ button?: {
1272
+ border: {
1273
+ width: number
1274
+ }
1275
+ focusRing: ThemeFocusRing
1276
+ textWeight: ThemeFontWeightKey
1277
+ }
1278
+ card?: {
1279
+ border: {
1280
+ width: number
1281
+ }
1282
+ focusRing: ThemeFocusRing
1283
+ shadow: {
1284
+ outline: number
1285
+ }
1286
+ }
1287
+ color?: ThemeColorTokens
1288
+ container?: number[]
1289
+ font?: ThemeFonts
1290
+ input?: ThemeInput_v2
1291
+ layer?: ThemeLayer
1292
+ media?: number[]
1293
+ palette?: ThemeColorPalette
1294
+ radius?: number[]
1295
+ shadow?: Array<ThemeShadow | null>
1296
+ space?: number[]
1297
+ /** @internal */
1298
+ style?: ThemeStyles
1299
+ }
1300
+
1301
+ /**
1302
+ * @public
1303
+ */
1304
+ export declare interface ThemeFocusRing {
1305
+ offset: number
1306
+ width: number
1307
+ }
1308
+
1309
+ /**
1310
+ * @public
1311
+ */
1312
+ export declare interface ThemeFont {
1313
+ family: string
1314
+ weights: ThemeFontWeight
1315
+ sizes: ThemeFontSize[]
1316
+ /** @deprecated No longer supported. */
1317
+ horizontalOffset?: number
1318
+ }
1319
+
1320
+ /**
1321
+ * @public
1322
+ */
1323
+ export declare type ThemeFontKey = 'code' | 'heading' | 'label' | 'text'
1324
+
1325
+ /**
1326
+ * @public
1327
+ */
1328
+ export declare interface ThemeFonts {
1329
+ code: ThemeFont
1330
+ heading: ThemeFont
1331
+ label: ThemeFont
1332
+ text: ThemeFont
1333
+ }
1334
+
1335
+ /**
1336
+ * @public
1337
+ */
1338
+ export declare interface ThemeFontSize {
1339
+ ascenderHeight: number
1340
+ descenderHeight: number
1341
+ fontSize: number
1342
+ iconSize: number
1343
+ letterSpacing: number
1344
+ lineHeight: number
1345
+ }
1346
+
1347
+ /**
1348
+ * @public
1349
+ */
1350
+ export declare interface ThemeFontWeight {
1351
+ regular: number
1352
+ medium: number
1353
+ semibold: number
1354
+ bold: number
1355
+ }
1356
+
1357
+ /**
1358
+ * @public
1359
+ */
1360
+ export declare type ThemeFontWeightKey = 'regular' | 'medium' | 'semibold' | 'bold'
1361
+
1362
+ /**
1363
+ * @public
1364
+ * @deprecated Use `ThemeInput_v2` instead
1365
+ */
1366
+ export declare interface ThemeInput {
1367
+ checkbox: {
1368
+ size: number
1369
+ }
1370
+ radio: {
1371
+ size: number
1372
+ markSize: number
1373
+ }
1374
+ switch: {
1375
+ width: number
1376
+ height: number
1377
+ padding: number
1378
+ transitionDurationMs: number
1379
+ transitionTimingFunction: string
1380
+ }
1381
+ border: {
1382
+ width: number
1383
+ }
1384
+ }
1385
+
1386
+ /**
1387
+ * @public
1388
+ */
1389
+ export declare interface ThemeInput_v2 {
1390
+ checkbox: {
1391
+ size: number
1392
+ focusRing: ThemeFocusRing
1393
+ }
1394
+ radio: {
1395
+ size: number
1396
+ markSize: number
1397
+ focusRing: ThemeFocusRing
1398
+ }
1399
+ switch: {
1400
+ width: number
1401
+ height: number
1402
+ padding: number
1403
+ transitionDurationMs: number
1404
+ transitionTimingFunction: string
1405
+ focusRing: ThemeFocusRing
1406
+ }
1407
+ border: {
1408
+ width: number
1409
+ }
1410
+ select: {
1411
+ focusRing: ThemeFocusRing
1412
+ }
1413
+ text: {
1414
+ focusRing: ThemeFocusRing
1415
+ }
1416
+ }
1417
+
1418
+ /**
1419
+ * @public
1420
+ */
1421
+ export declare interface ThemeLayer {
1422
+ dialog: {
1423
+ zOffset: number
1424
+ }
1425
+ popover: {
1426
+ zOffset: number
1427
+ }
1428
+ tooltip: {
1429
+ zOffset: number
1430
+ }
1431
+ }
1432
+
1433
+ /**
1434
+ * @public
1435
+ */
1436
+ export declare interface ThemeShadow {
1437
+ umbra: ThemeBoxShadow
1438
+ penumbra: ThemeBoxShadow
1439
+ ambient: ThemeBoxShadow
1440
+ }
1441
+
1442
+ /**
1443
+ * @internal
1444
+ */
1445
+ export declare interface ThemeStyles {
1446
+ button?: {
1447
+ root?: CSSObject
1448
+ }
1449
+ card?: {
1450
+ root?: CSSObject
1451
+ }
1452
+ }
1453
+
1454
+ /** @internal */
1455
+ export declare interface TokenBaseKeyNode {
1456
+ type: 'base'
1457
+ tone: ColorConfigCardTone
1458
+ key: ColorConfigCardKey | ColorConfigBlendKey
1459
+ }
1460
+
1461
+ /** @internal */
1462
+ export declare interface TokenBlendModeValueNode {
1463
+ type: 'blendMode'
1464
+ value?: ThemeColorBlendModeKey
1465
+ }
1466
+
1467
+ /** @internal */
1468
+ export declare interface TokenButtonKeyNode {
1469
+ type: 'button'
1470
+ tone: ColorConfigStateTone
1471
+ mode: ThemeColorButtonModeKey
1472
+ key: ColorConfigStateKey | ColorConfigBlendKey
1473
+ }
1474
+
1475
+ /** @internal */
1476
+ export declare interface TokenColorValueNode {
1477
+ type: 'color'
1478
+ key?: 'black' | 'white'
1479
+ hue?: ColorHueKey
1480
+ mix?: number
1481
+ opacity?: number
1482
+ tint?: ColorTintKey
1483
+ }
1484
+
1485
+ /** @internal */
1486
+ export declare interface TokenHueValueNode {
1487
+ type: 'hue'
1488
+ value?: ColorHueKey
1489
+ }
1490
+
1491
+ /** @internal */
1492
+ export declare type TokenKeyNode = TokenBaseKeyNode | TokenButtonKeyNode
1493
+
1494
+ /** @internal */
1495
+ export declare type TokenValueNode =
1496
+ | TokenColorValueNode
1497
+ | TokenHueValueNode
1498
+ | TokenBlendModeValueNode
1499
+
1500
+ /** @internal */
1501
+ export declare function v0_v2(v0: RootTheme): RootTheme_v2
1502
+
1503
+ /** @internal */
1504
+ export declare function v2_v0(v2: RootTheme_v2): RootTheme
1505
+
1506
+ export {}