@cube-dev/ui-kit 0.0.0-canary-a2deb22 → 0.0.0-canary-e397738

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 (489) hide show
  1. package/dist/_internal/hooks/use-chained-callback.js +1 -1
  2. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  3. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  4. package/dist/_internal/hooks/use-event.js +1 -1
  5. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  6. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  7. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  8. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  9. package/dist/_internal/hooks/use-warn.js +1 -1
  10. package/dist/components/Block.js +1 -1
  11. package/dist/components/CollectionItem.js +1 -1
  12. package/dist/components/GlobalStyles.js +9 -30
  13. package/dist/components/GlobalStyles.js.map +1 -1
  14. package/dist/components/GridProvider.js +1 -1
  15. package/dist/components/HiddenInput.js +1 -1
  16. package/dist/components/Root.js +1 -1
  17. package/dist/components/actions/Action/Action.js +1 -1
  18. package/dist/components/actions/Banner/Banner.js +1 -1
  19. package/dist/components/actions/Button/Button.js +1 -1
  20. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  21. package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
  22. package/dist/components/actions/ButtonSplit/context.js +1 -1
  23. package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
  24. package/dist/components/actions/CommandMenu/styled.js +1 -1
  25. package/dist/components/actions/ItemAction/ItemAction.js +1 -1
  26. package/dist/components/actions/ItemActionContext.js +1 -1
  27. package/dist/components/actions/ItemButton/ItemButton.js +1 -1
  28. package/dist/components/actions/Link/Link.js +1 -1
  29. package/dist/components/actions/Menu/Menu.js +1 -1
  30. package/dist/components/actions/Menu/MenuItem.js +1 -1
  31. package/dist/components/actions/Menu/MenuSection.js +1 -1
  32. package/dist/components/actions/Menu/MenuTrigger.js +1 -1
  33. package/dist/components/actions/Menu/MenuTrigger.js.map +1 -1
  34. package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
  35. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  36. package/dist/components/actions/Menu/context.js +1 -1
  37. package/dist/components/actions/Menu/styled.js +1 -1
  38. package/dist/components/actions/index.js +1 -1
  39. package/dist/components/actions/use-action.js +1 -1
  40. package/dist/components/actions/use-action.js.map +1 -1
  41. package/dist/components/actions/use-anchored-menu.js +1 -1
  42. package/dist/components/actions/use-context-menu.js +1 -1
  43. package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
  44. package/dist/components/content/Alert/Alert.js +1 -1
  45. package/dist/components/content/Alert/use-alert.js +1 -1
  46. package/dist/components/content/Avatar/Avatar.js +1 -1
  47. package/dist/components/content/Badge/Badge.js +1 -1
  48. package/dist/components/content/Card/Card.js +1 -1
  49. package/dist/components/content/Content.js +1 -1
  50. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
  51. package/dist/components/content/CopySnippet/CopySnippet.js +4 -4
  52. package/dist/components/content/CopySnippet/CopySnippet.js.map +1 -1
  53. package/dist/components/content/Disclosure/Disclosure.js +1 -1
  54. package/dist/components/content/Divider.js +1 -1
  55. package/dist/components/content/Footer.js +1 -1
  56. package/dist/components/content/Header.js +1 -1
  57. package/dist/components/content/HotKeys/HotKeys.js +1 -1
  58. package/dist/components/content/InlineInput/InlineInput.js +1 -1
  59. package/dist/components/content/Item/Item.js +1 -1
  60. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  61. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  62. package/dist/components/content/Layout/GridLayout.js +1 -1
  63. package/dist/components/content/Layout/Layout.js +1 -1
  64. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  65. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  66. package/dist/components/content/Layout/LayoutContainer.js +1 -1
  67. package/dist/components/content/Layout/LayoutContent.js +1 -1
  68. package/dist/components/content/Layout/LayoutContext.js +1 -1
  69. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  70. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  71. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  72. package/dist/components/content/Layout/LayoutHeader.js +1 -1
  73. package/dist/components/content/Layout/LayoutPane.js +1 -1
  74. package/dist/components/content/Layout/LayoutPanel.js +1 -1
  75. package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
  76. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  77. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  78. package/dist/components/content/Layout/index.js +1 -1
  79. package/dist/components/content/Layout/utils.js +1 -1
  80. package/dist/components/content/Paragraph.js +1 -1
  81. package/dist/components/content/Placeholder/Placeholder.js +1 -1
  82. package/dist/components/content/PrismCode/PrismCode.d.ts +0 -1
  83. package/dist/components/content/PrismCode/PrismCode.js +2 -7
  84. package/dist/components/content/PrismCode/PrismCode.js.map +1 -1
  85. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  86. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  87. package/dist/components/content/Result/Result.js +1 -1
  88. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  89. package/dist/components/content/Tag/Tag.js +1 -1
  90. package/dist/components/content/Text.d.ts +7 -7
  91. package/dist/components/content/Text.js +1 -1
  92. package/dist/components/content/TextItem/TextItem.js +1 -1
  93. package/dist/components/content/Title.js +1 -1
  94. package/dist/components/content/Tree/Tree.js +1 -1
  95. package/dist/components/content/Tree/TreeNode.js +1 -1
  96. package/dist/components/content/Tree/styled.js +1 -1
  97. package/dist/components/content/Tree/tree-index.js +1 -1
  98. package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
  99. package/dist/components/content/Tree/use-load-data.js +1 -1
  100. package/dist/components/content/highlightText.js +1 -1
  101. package/dist/components/content/use-auto-tooltip.js +1 -1
  102. package/dist/components/fields/Checkbox/Checkbox.js +1 -1
  103. package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
  104. package/dist/components/fields/Checkbox/context.js +1 -1
  105. package/dist/components/fields/ComboBox/ComboBox.js +1 -1
  106. package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
  107. package/dist/components/fields/CommandTextArea/caretPosition.js +2 -2
  108. package/dist/components/fields/CommandTextArea/caretPosition.js.map +1 -1
  109. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  110. package/dist/components/fields/DatePicker/DateInput.js +1 -1
  111. package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
  112. package/dist/components/fields/DatePicker/DatePicker.js +1 -1
  113. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  114. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  115. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  116. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  117. package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
  118. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
  119. package/dist/components/fields/DatePicker/TimeInput.js +1 -1
  120. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  121. package/dist/components/fields/DatePicker/props.js +1 -1
  122. package/dist/components/fields/DatePicker/utils.js +1 -1
  123. package/dist/components/fields/FileInput/FileInput.js +1 -1
  124. package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
  125. package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
  126. package/dist/components/fields/Input/Input.js +1 -1
  127. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  128. package/dist/components/fields/ListBox/ListBox.js +1 -1
  129. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
  130. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  131. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
  132. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  133. package/dist/components/fields/NumberInput/StepButton.js +1 -1
  134. package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
  135. package/dist/components/fields/Picker/Picker.js +1 -1
  136. package/dist/components/fields/RadioGroup/Radio.js +1 -1
  137. package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
  138. package/dist/components/fields/RadioGroup/context.js +1 -1
  139. package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
  140. package/dist/components/fields/SearchInput/SearchInput.js +1 -1
  141. package/dist/components/fields/Select/Select.js +1 -1
  142. package/dist/components/fields/Slider/Gradation.js +1 -1
  143. package/dist/components/fields/Slider/HueSlider.js +1 -1
  144. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  145. package/dist/components/fields/Slider/Slider.js +1 -1
  146. package/dist/components/fields/Slider/SliderBase.js +1 -1
  147. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  148. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  149. package/dist/components/fields/Slider/elements.js +1 -1
  150. package/dist/components/fields/Slider/index.js +1 -1
  151. package/dist/components/fields/Switch/Switch.js +1 -1
  152. package/dist/components/fields/TextArea/TextArea.js +1 -1
  153. package/dist/components/fields/TextInput/TextInput.js +1 -1
  154. package/dist/components/fields/TextInput/TextInputBase.js +1 -1
  155. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
  156. package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
  157. package/dist/components/form/FieldWrapper/extract-field-wrapper-props.js +1 -1
  158. package/dist/components/form/Form/Field.js +1 -1
  159. package/dist/components/form/Form/Form.js +1 -1
  160. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  161. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  162. package/dist/components/form/Form/SubmitError.js +1 -1
  163. package/dist/components/form/Form/index.js +1 -1
  164. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  165. package/dist/components/form/Form/use-field/use-field.js +1 -1
  166. package/dist/components/form/Form/use-form.js +1 -1
  167. package/dist/components/form/Form/validation.js +1 -1
  168. package/dist/components/form/Label.js +1 -1
  169. package/dist/components/form/wrapper.js +1 -1
  170. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  171. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  172. package/dist/components/layout/Board/Board.js +1 -1
  173. package/dist/components/layout/Board/BoardProvider.js +1 -1
  174. package/dist/components/layout/Board/BoardResponsive.js +1 -1
  175. package/dist/components/layout/Board/Widget.js +1 -1
  176. package/dist/components/layout/Board/WidgetHost.js +1 -1
  177. package/dist/components/layout/Board/board-context.js +1 -1
  178. package/dist/components/layout/Board/board-store.js +1 -1
  179. package/dist/components/layout/Board/grid-core/calculate.js +1 -1
  180. package/dist/components/layout/Board/grid-core/collision.js +1 -1
  181. package/dist/components/layout/Board/grid-core/compactors.js +1 -1
  182. package/dist/components/layout/Board/grid-core/constraints.js +1 -1
  183. package/dist/components/layout/Board/grid-core/layout.js +1 -1
  184. package/dist/components/layout/Board/grid-core/sort.js +1 -1
  185. package/dist/components/layout/Board/index.js +1 -1
  186. package/dist/components/layout/Board/responsive-utils.js +1 -1
  187. package/dist/components/layout/Board/use-board-layout.js +1 -1
  188. package/dist/components/layout/Board/use-board-registry.js +1 -1
  189. package/dist/components/layout/Flex.js +1 -1
  190. package/dist/components/layout/Flow.js +1 -1
  191. package/dist/components/layout/Grid.js +1 -1
  192. package/dist/components/layout/Panel.js +1 -1
  193. package/dist/components/layout/Prefix.js +1 -1
  194. package/dist/components/layout/ResizablePanel.js +1 -1
  195. package/dist/components/layout/Space.js +1 -1
  196. package/dist/components/layout/Suffix.js +1 -1
  197. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  198. package/dist/components/navigation/Tabs/TabButton.js +1 -1
  199. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  200. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  201. package/dist/components/navigation/Tabs/TabPicker.js +1 -1
  202. package/dist/components/navigation/Tabs/Tabs.js +1 -1
  203. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  204. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  205. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  206. package/dist/components/navigation/Tabs/styled.js +1 -1
  207. package/dist/components/navigation/Tabs/types.js +1 -1
  208. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  209. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  210. package/dist/components/organisms/FileTabs/FileTabs.js +1 -1
  211. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  212. package/dist/components/other/Calendar/Calendar.js +1 -1
  213. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  214. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  215. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  216. package/dist/components/other/CloudLogo/CloudLogo.js +1 -1
  217. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  218. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  219. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  220. package/dist/components/overlays/Dialog/Dialog.js +1 -1
  221. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  222. package/dist/components/overlays/Dialog/DialogForm.js +1 -1
  223. package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
  224. package/dist/components/overlays/Dialog/context.js +1 -1
  225. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  226. package/dist/components/overlays/Modal/Modal.js +1 -1
  227. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  228. package/dist/components/overlays/Modal/Overlay.js +1 -1
  229. package/dist/components/overlays/Modal/Popover.js +1 -1
  230. package/dist/components/overlays/Modal/Tray.js +1 -1
  231. package/dist/components/overlays/Modal/Underlay.js +1 -1
  232. package/dist/components/overlays/Notifications/Notification.js +1 -1
  233. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  234. package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
  235. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  236. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  237. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  238. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  239. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
  240. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  241. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  242. package/dist/components/overlays/Notifications/index.js +1 -1
  243. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  244. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  245. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  246. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  247. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  248. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  249. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  250. package/dist/components/overlays/Toast/index.js +1 -1
  251. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  252. package/dist/components/overlays/Toast/useToast.js +1 -1
  253. package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
  254. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  255. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  256. package/dist/components/overlays/Tooltip/context.js +1 -1
  257. package/dist/components/portal/Portal.js +1 -1
  258. package/dist/components/portal/PortalProvider.js +1 -1
  259. package/dist/components/portal/usePortal.js +1 -1
  260. package/dist/components/shared/DraggableCollection.js +1 -1
  261. package/dist/components/shared/InvalidIcon.js +1 -1
  262. package/dist/components/shared/ValidIcon.js +1 -1
  263. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
  264. package/dist/components/status/Spin/Cube.js +1 -1
  265. package/dist/components/status/Spin/InternalSpinner.js +1 -1
  266. package/dist/components/status/Spin/Spin.js +1 -1
  267. package/dist/components/status/Spin/SpinsContainer.js +1 -1
  268. package/dist/data/item-themes.js +1 -1
  269. package/dist/data/themes.js +1 -1
  270. package/dist/i18n/I18nProvider.js +1 -1
  271. package/dist/i18n/createFormatter.js +1 -1
  272. package/dist/i18n/index.js +1 -1
  273. package/dist/i18n/instance.js +1 -1
  274. package/dist/i18n/locales/de-DE/uikit.js +1 -1
  275. package/dist/i18n/locales/en-US/uikit.js +1 -1
  276. package/dist/i18n/locales/es-ES/uikit.js +1 -1
  277. package/dist/i18n/locales/es-MX/uikit.js +1 -1
  278. package/dist/i18n/locales/fr-FR/uikit.js +1 -1
  279. package/dist/i18n/locales/it-IT/uikit.js +1 -1
  280. package/dist/i18n/locales/ja-JP/uikit.js +1 -1
  281. package/dist/i18n/locales/nb-NO/uikit.js +1 -1
  282. package/dist/i18n/locales/pt-BR/uikit.js +1 -1
  283. package/dist/i18n/locales/pt-PT/uikit.js +1 -1
  284. package/dist/i18n/locales/sv-SE/uikit.js +1 -1
  285. package/dist/i18n/locales/vi-VN/uikit.js +1 -1
  286. package/dist/i18n/locales.js +1 -1
  287. package/dist/i18n/useFormatter.js +1 -1
  288. package/dist/i18n/useI18n.js +1 -1
  289. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  290. package/dist/icons/AdjustmentsIcon.js +1 -1
  291. package/dist/icons/AiIcon.js +1 -1
  292. package/dist/icons/AreaChartIcon.js +1 -1
  293. package/dist/icons/BackwardIcon.js +1 -1
  294. package/dist/icons/BarChartIcon.js +1 -1
  295. package/dist/icons/BellFilledIcon.js +1 -1
  296. package/dist/icons/BellIcon.js +1 -1
  297. package/dist/icons/BooleanIcon.js +1 -1
  298. package/dist/icons/CalendarEditIcon.js +1 -1
  299. package/dist/icons/CalendarIcon.js +1 -1
  300. package/dist/icons/CaretDownIcon.js +1 -1
  301. package/dist/icons/CaretUpIcon.js +1 -1
  302. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  303. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  304. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  305. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  306. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  307. package/dist/icons/ChartBarLineIcon.js +1 -1
  308. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  309. package/dist/icons/ChartBarStackedIcon.js +1 -1
  310. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  311. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  312. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  313. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  314. package/dist/icons/ChartBubbleIcon.js +1 -1
  315. package/dist/icons/ChartDonut2Icon.js +1 -1
  316. package/dist/icons/ChartFunnelIcon.js +1 -1
  317. package/dist/icons/ChartHeatmapIcon.js +1 -1
  318. package/dist/icons/ChartKPIIcon.js +1 -1
  319. package/dist/icons/ChartPie2Icon.js +1 -1
  320. package/dist/icons/ChartScatterIcon.js +1 -1
  321. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  322. package/dist/icons/CheckCircleIcon.js +1 -1
  323. package/dist/icons/CheckIcon.js +1 -1
  324. package/dist/icons/CircleFilledIcon.js +1 -1
  325. package/dist/icons/ClearIcon.js +1 -1
  326. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  327. package/dist/icons/CloseCircleIcon.js +1 -1
  328. package/dist/icons/CloseIcon.js +1 -1
  329. package/dist/icons/CodeIcon.js +1 -1
  330. package/dist/icons/ColumnTotalIcon.js +1 -1
  331. package/dist/icons/CopyIcon.js +1 -1
  332. package/dist/icons/CountIcon.js +1 -1
  333. package/dist/icons/CubeIcon.js +1 -1
  334. package/dist/icons/CubePauseIcon.js +1 -1
  335. package/dist/icons/CubePlayIcon.js +1 -1
  336. package/dist/icons/CurrencyDollarIcon.js +1 -1
  337. package/dist/icons/DangerIcon.js +1 -1
  338. package/dist/icons/DashboardIcon.js +1 -1
  339. package/dist/icons/DatabaseIcon.js +1 -1
  340. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  341. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  342. package/dist/icons/DirectionIcon.js +1 -1
  343. package/dist/icons/DonutIcon.js +1 -1
  344. package/dist/icons/DownIcon.js +1 -1
  345. package/dist/icons/EditIcon.js +1 -1
  346. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  347. package/dist/icons/ExclamationCircleIcon.js +1 -1
  348. package/dist/icons/ExclamationIcon.js +1 -1
  349. package/dist/icons/EyeIcon.js +1 -1
  350. package/dist/icons/EyeInvisibleIcon.js +1 -1
  351. package/dist/icons/FilterIcon.js +1 -1
  352. package/dist/icons/FolderFilledIcon.js +1 -1
  353. package/dist/icons/FolderIcon.js +1 -1
  354. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  355. package/dist/icons/FolderOpenIcon.js +1 -1
  356. package/dist/icons/ForwardIcon.js +1 -1
  357. package/dist/icons/GripVerticalIcon.js +1 -1
  358. package/dist/icons/HierarchyIcon.js +1 -1
  359. package/dist/icons/HierarchyOpenIcon.js +1 -1
  360. package/dist/icons/Icon.js +1 -1
  361. package/dist/icons/InfoCircleIcon.js +1 -1
  362. package/dist/icons/InfoIcon.js +1 -1
  363. package/dist/icons/KeyIcon.js +1 -1
  364. package/dist/icons/LeftIcon.js +1 -1
  365. package/dist/icons/LineChartIcon.js +1 -1
  366. package/dist/icons/LoadingIcon.js +1 -1
  367. package/dist/icons/LockFilledIcon.js +1 -1
  368. package/dist/icons/LockIcon.js +1 -1
  369. package/dist/icons/MoreIcon.js +1 -1
  370. package/dist/icons/NotAllowedIcon.js +1 -1
  371. package/dist/icons/Number123Icon.js +1 -1
  372. package/dist/icons/NumberIcon.js +1 -1
  373. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  374. package/dist/icons/PauseCircleIcon.js +1 -1
  375. package/dist/icons/PauseIcon.js +1 -1
  376. package/dist/icons/PercentageIcon.js +1 -1
  377. package/dist/icons/PieChartIcon.js +1 -1
  378. package/dist/icons/PlayCircleIcon.js +1 -1
  379. package/dist/icons/PlayIcon.js +1 -1
  380. package/dist/icons/PlusIcon.js +1 -1
  381. package/dist/icons/ProgressBarIcon.js +1 -1
  382. package/dist/icons/ReloadIcon.js +1 -1
  383. package/dist/icons/ReportIcon.js +1 -1
  384. package/dist/icons/ReturnIcon.js +1 -1
  385. package/dist/icons/RightIcon.js +1 -1
  386. package/dist/icons/RowTotalsIcon.js +1 -1
  387. package/dist/icons/SchemeIcon.js +1 -1
  388. package/dist/icons/SearchIcon.js +1 -1
  389. package/dist/icons/SemanticQueryIcon.js +1 -1
  390. package/dist/icons/SettingsIcon.js +1 -1
  391. package/dist/icons/ShieldFilledIcon.js +1 -1
  392. package/dist/icons/ShieldIcon.js +1 -1
  393. package/dist/icons/SlashIcon.js +1 -1
  394. package/dist/icons/SparklesIcon.js +1 -1
  395. package/dist/icons/SqlIcon.js +1 -1
  396. package/dist/icons/StatsIcon.js +1 -1
  397. package/dist/icons/StopIcon.js +1 -1
  398. package/dist/icons/StringIcon.js +1 -1
  399. package/dist/icons/SubtotalsIcon.js +1 -1
  400. package/dist/icons/SwitchIcon.js +1 -1
  401. package/dist/icons/TableIcon.js +1 -1
  402. package/dist/icons/ThumbsDownIcon.js +1 -1
  403. package/dist/icons/ThumbsUpIcon.js +1 -1
  404. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  405. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  406. package/dist/icons/ThunderboltIcon.js +1 -1
  407. package/dist/icons/TimeIcon.js +1 -1
  408. package/dist/icons/TrashIcon.js +1 -1
  409. package/dist/icons/UnlockIcon.js +1 -1
  410. package/dist/icons/UpIcon.js +1 -1
  411. package/dist/icons/UserGroupIcon.js +1 -1
  412. package/dist/icons/UserIcon.js +1 -1
  413. package/dist/icons/UserLockIcon.js +1 -1
  414. package/dist/icons/ViewIcon.js +1 -1
  415. package/dist/icons/WarningFilledIcon.js +1 -1
  416. package/dist/icons/WarningIcon.js +1 -1
  417. package/dist/icons/wrap-icon.js +1 -1
  418. package/dist/index.d.ts +3 -4
  419. package/dist/index.js +4 -5
  420. package/dist/index.js.map +1 -1
  421. package/dist/provider.js +1 -1
  422. package/dist/providers/TrackingProvider.js +1 -1
  423. package/dist/providers/navigationAdapter.default.js +1 -1
  424. package/dist/tokens/base.js +1 -1
  425. package/dist/tokens/colors.d.ts +7 -2
  426. package/dist/tokens/colors.js +8 -16
  427. package/dist/tokens/colors.js.map +1 -1
  428. package/dist/tokens/index.d.ts +17 -5
  429. package/dist/tokens/index.js +13 -23
  430. package/dist/tokens/index.js.map +1 -1
  431. package/dist/tokens/layout.js +1 -1
  432. package/dist/tokens/palette.js +124 -161
  433. package/dist/tokens/palette.js.map +1 -1
  434. package/dist/tokens/shadows.js +1 -1
  435. package/dist/tokens/sizes.js +1 -1
  436. package/dist/tokens/spacing.js +1 -1
  437. package/dist/tokens/typography.d.ts +0 -1
  438. package/dist/tokens/typography.js +1 -29
  439. package/dist/tokens/typography.js.map +1 -1
  440. package/dist/utils/ResizeSensor.js +1 -1
  441. package/dist/utils/is-dev-env.js +1 -1
  442. package/dist/utils/modules.js +1 -1
  443. package/dist/utils/promise.js +1 -1
  444. package/dist/utils/raf.js +1 -1
  445. package/dist/utils/random.js +1 -1
  446. package/dist/utils/range.js +1 -1
  447. package/dist/utils/react/RenderCache.js +1 -1
  448. package/dist/utils/react/Slots.js +1 -1
  449. package/dist/utils/react/chain.js +1 -1
  450. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  451. package/dist/utils/react/index.js +1 -1
  452. package/dist/utils/react/interactions.js +1 -1
  453. package/dist/utils/react/isTextOnly.js +1 -1
  454. package/dist/utils/react/mapProps.js +1 -1
  455. package/dist/utils/react/mergeProps.js +1 -1
  456. package/dist/utils/react/nullableValue.js +1 -1
  457. package/dist/utils/react/resolveIcon.js +1 -1
  458. package/dist/utils/react/sharedStore.js +1 -1
  459. package/dist/utils/react/useCombinedRefs.js +1 -1
  460. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  461. package/dist/utils/react/useEventBus.js +1 -1
  462. package/dist/utils/react/useId.js +1 -1
  463. package/dist/utils/react/useIsDarwin.js +1 -1
  464. package/dist/utils/react/useKeySymbols.js +1 -1
  465. package/dist/utils/react/useLayoutEffect.js +1 -1
  466. package/dist/utils/react/useLocalStorage.js +1 -1
  467. package/dist/utils/react/useMergeStyles.js +1 -1
  468. package/dist/utils/react/usePopoverSync.js +1 -1
  469. package/dist/utils/react/useQaProps.js +1 -1
  470. package/dist/utils/react/useViewportSize.js +1 -1
  471. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  472. package/dist/utils/selection.js +1 -1
  473. package/dist/utils/styles.js +1 -1
  474. package/dist/utils/tree.js +1 -1
  475. package/dist/utils/warnings.js +1 -1
  476. package/dist/version.js +3 -3
  477. package/docs/Typography.md +1 -1
  478. package/docs/Usage.md +0 -10
  479. package/docs/components/content/CopySnippet.md +1 -6
  480. package/docs/components/content/PrismCode.md +2 -3
  481. package/docs/glaze/api.md +414 -951
  482. package/docs/glaze/methodology.md +212 -512
  483. package/docs/glaze/migration.md +49 -127
  484. package/package.json +4 -4
  485. package/dist/tokens/lazy-styles.js +0 -33
  486. package/dist/tokens/lazy-styles.js.map +0 -1
  487. package/dist/tokens/palette.d.ts +0 -15
  488. package/docs/Colors.md +0 -77
  489. package/docs/glaze/okhst.md +0 -170
@@ -1,636 +1,336 @@
1
1
  # Methodology
2
2
 
3
- A practical way to design a Glaze palette without fighting dark mode. Start from
4
- tone relationships, add contrast only where a role needs a readable floor, and
5
- let `extend()` carry the same decisions across status hues.
6
-
7
- For the full API surface, see [api.md](api.md). For the Glaze color-model
8
- overview, see [okhst.md](okhst.md); the derivation lives in the
9
- [canonical OKHST specification](https://github.com/tenphi/okhst).
3
+ A practical guide for designing a real, production-grade Glaze palette. Recipe-ordered: the sections follow the same sequence you'd actually build a palette in, and each one ties the choice back to a Glaze behavior.
10
4
 
11
5
  ## The mental model
12
6
 
13
- Glaze palettes work best as one default neutral theme plus a few colored sibling
14
- themes:
15
-
16
- - `default` owns the neutral system most components consume: `#surface`,
17
- `#surface-text`, `#border`, `#disabled-surface`, and so on.
18
- - Status themes (`success`, `danger`, `warning`, `note`, ...) are created with
19
- `extend()`. They swap the hue and keep only the inherited tokens that should
20
- become status-aware.
21
- - `inherit: false` keeps a token local to the parent theme. Use it for neutral
22
- ladders, shadows, code colors, overlays, and anything that should not be
23
- repeated for every status hue.
24
-
25
- The main simplification is OKHST tone. Dark mode is a single inversion
26
- (`100 - t`) plus a scheme tone window, so a relative **tone delta** stays
27
- anchored to its base in every scheme. A token authored as `tone: '-4'` remains
28
- the same kind of visual step in light and dark. The step is exactly
29
- contrast-even for neutrals and approximate for chromatic colors; add a
30
- `contrast` floor when the measured result matters.
31
-
32
- Use `glaze.color()` instead of a theme when you need one standalone color or
33
- one base/dependent pair and do not need a named palette. The same tone,
34
- adaptation, and contrast rules apply; see
35
- [Standalone color tokens](api.md#standalone-color-tokens).
36
-
37
- ## Implementation workflow
38
-
39
- Build in dependency order so every decision has a clear base:
40
-
41
- 1. Configure the output schemes and application states once.
42
- 2. Choose the default theme's hue and saturation seed.
43
- 3. Define root surfaces with absolute tones.
44
- 4. Add dependent surfaces, text, borders, and icons with tone deltas.
45
- 5. Add contrast floors only to roles that need measured readability or
46
- recognizability.
47
- 6. Choose adaptation per color: `auto`, `fixed`, or `static`.
48
- 7. Add explicit HC pairs where high contrast should increase separation.
49
- 8. Mark default-only tokens `inherit: false`, then extend the shared
50
- definitions into status themes.
51
- 9. Compose and export the palette in the shape your application consumes.
52
- 10. Verify complete screens in all emitted scheme variants.
53
-
54
- The sections below follow this order and build one palette incrementally.
55
-
56
- ## Authoring decisions
57
-
58
- Use this order when defining a token:
59
-
60
- 1. Pick the base it visually belongs to.
61
- 2. Use an absolute numeric `tone` for independent placement. Use a signed
62
- **tone delta** (`'+N'` / `'-N'`) for distance from a base: surface ladders,
63
- soft chips, disabled states, hover ramps, and similar relationships.
64
- 3. Add `contrast` only when readability or recognizability needs a measured
65
- floor.
66
- 4. Prefer APCA presets for content-like colors when perceptual readability is
67
- the design goal:
68
- `contrast: { apca: 'content' }` or
69
- `contrast: { apca: ['content', 'body'] }`.
70
- 5. Use WCAG numbers or presets when compatibility, policy, or migration
71
- requires a WCAG ratio:
72
- `contrast: 4.5`, `contrast: 'AAA'`, or `contrast: { wcag: [4.5, 7] }`.
73
- 6. Let token names infer APCA roles. Names ending in `text`, `label`, `border`,
74
- `surface`, `fill`, `bg`, and similar aliases already tell Glaze which side is
75
- foreground or background. Set `role` only when a name is ambiguous.
76
- 7. Add high-contrast pairs only where HC should intentionally tighten:
77
- text/content contrast, border tone, shadow intensity, mix value, or similar.
78
-
79
- ### Choosing adaptation mode
80
-
81
- | Mode | Choose it when |
82
- | ---------------- | --------------------------------------------------------------------------------------------------------------------------- |
83
- | `auto` (default) | The color should exchange light/dark positions through dark tone inversion. Typical for surfaces, text, borders, and icons. |
84
- | `fixed` | A brand fill, status banner, or inverse surface should stay on the authored side of the tone scale. |
85
- | `static` | The exact authored tone and saturation must render in every scheme, without tone-window mapping or dark desaturation. |
86
-
87
- Dark tone inversion is controlled by `mode`; it is unrelated to `autoFlip`.
88
- `autoFlip` only allows an overshooting tone delta or an unsuccessful contrast
89
- direction to reverse around its base.
90
-
91
- ### Root or dependent?
92
-
93
- - Use a root color when its tone has meaning on its own: the page surface, a
94
- fixed brand anchor, or a scheme extreme.
95
- - Use a dependent color when its purpose exists relative to another token:
96
- text on a surface, a border around a fill, or a tint of an accent.
97
- - Setting `base` with an absolute tone is valid when the color needs a contrast
98
- relationship but not a tone delta. The absolute position is resolved
99
- independently; `contrast` acts as a safety floor.
100
-
101
- ## Seed and configure
102
-
103
- Keep hue decisions named and configure output modes once:
7
+ A Glaze palette is a **default neutral theme** plus a small fan of **colored sibling themes** (`success`, `danger`, `warning`, `note`, …) created via `extend()`. Most colors live in the default theme as neutrals; brand-tinted colors come from `extend()` swapping the hue.
104
8
 
105
- ```ts
106
- import { glaze } from '@tenphi/glaze';
9
+ The default theme is what most components consume — its tokens are emitted unprefixed (`#surface`, `#border`). Colored themes are scoped to status surfaces and accent variants, emitted with a theme-name prefix (`#success-surface`, `#danger-accent-surface`).
10
+
11
+ You design the default theme once, and `extend()` propagates that design across every status hue.
12
+
13
+ Every color definition has an **`inherit`** flag (default: `true`) controlling whether it flows into child themes via `extend()`. Set `inherit: false` to scope a color to its parent theme only — this is how sibling themes stay lean, carrying only the tokens they actually need.
14
+
15
+ ## Hue / saturation seeds
107
16
 
108
- const PURPLE_HUE = 280.3;
17
+ Declare hues as named constants up top, plus a single shared seed saturation:
18
+
19
+ ```ts
20
+ const PURPLE_HUE = 280.3;
109
21
  const SUCCESS_HUE = 156.9;
110
- const DANGER_HUE = 23.1;
22
+ const DANGER_HUE = 23.1;
111
23
  const WARNING_HUE = 84.3;
112
- const NOTE_HUE = 302.3;
24
+ const NOTE_HUE = 302.3;
113
25
 
114
26
  const SEED_SATURATION = 80;
27
+ ```
28
+
29
+ Hues are design tokens too — keeping them named in one place beats burying numbers in `extend()` calls. The shared `SEED_SATURATION` keeps every status theme on the same saturation budget; per-color `saturation` factors below are 0–1 *of this seed*, not absolute.
30
+
31
+ ## Global `glaze.configure()`
115
32
 
33
+ Configure state aliases and output modes once at module load:
34
+
35
+ ```ts
116
36
  glaze.configure({
117
37
  states: { dark: '@dark', highContrast: '@hc' },
118
- modes: { dark: true, highContrast: true },
38
+ modes: { dark: true, highContrast: true },
119
39
  });
120
40
  ```
121
41
 
122
- Per-color `saturation` is a factor of the theme seed, not an absolute
123
- saturation. With `SEED_SATURATION = 80`, `saturation: 0.25` means one quarter of
124
- that seed.
42
+ Match the state alias names to whatever your app wires into the global predefined states (`@dark` / `@hc` is what Tasty expects). Setting `modes.highContrast: true` makes every export emit four variants — HC tokens are then available globally without per-call overrides.
125
43
 
126
- ## Naming
44
+ ## Naming conventions
127
45
 
128
- Prefer purpose first and variant last:
46
+ A tight, predictable vocabulary that the rest of the doc relies on:
129
47
 
130
- - Surfaces: `surface`, `surface-2`, `surface-3`.
131
- - Foregrounds: `surface-text`, `surface-text-soft`, `surface-text-soft-2`.
132
- - Structure: `border`, `divider`, `outline`, `placeholder`, `focus`.
133
- - Fills: `accent-surface`, `accent-surface-2`,
134
- `accent-surface-hover`.
135
- - Foregrounds on neutral surfaces: `accent-text`, `accent-text-soft`,
136
- `accent-icon`.
137
- - Disabled states: `disabled-surface`, `disabled-surface-text`,
138
- `accent-disabled-surface`, `accent-disabled-surface-text`.
139
- - Effects: `shadow-sm`, `shadow-md`, `shadow-lg`, `overlay`, `hover`, `tint`.
48
+ | Pattern | Tokens |
49
+ |---|---|
50
+ | Surface ladder | `surface`, `surface-2`, `surface-3` |
51
+ | Text on surface (decreasing prominence) | `<surface>-text`, `<surface>-text-soft`, `<surface>-text-soft-2` |
52
+ | Misc neutral primitives | `border`, `placeholder`, `focus`, `disabled` |
53
+ | Neutral disabled chip | `disabled-surface`, `disabled-surface-text` |
54
+ | Fixed-mode dark surface | `surface-inverse` |
55
+ | Brand fills | `accent-surface`, `accent-surface-2`, `accent-surface-3`, `accent-surface-hover` |
56
+ | Brand fill anchor | `accent-surface-text` (the fixed white token everything anchors to) |
57
+ | Brand foregrounds on neutrals | `accent-text`, `accent-text-soft`, `accent-icon` |
58
+ | Brand-tinted disabled | `accent-disabled-surface`, `accent-disabled-surface-text` |
59
+ | Code syntax highlighting | `code-comment`, `code-keyword`, `code-string`, `code-number`, … |
60
+ | Loading animation | `loading-face-1`, `loading-face-2`, `loading-face-3` |
61
+ | Shadows | `shadow-sm`, `shadow-md`, `shadow-lg` |
62
+ | Backdrop | `overlay` |
140
63
 
141
- These names are not only readable. They also help APCA role inference pick the
142
- right polarity. For example, `button-text` is foreground, `input-bg` is a
143
- surface, and `card-outline` is a border.
64
+ **Rule of thumb:** *purpose-name first, variant suffix last* (`-2`, `-text`, `-soft`, `-hover`, `-disabled`).
144
65
 
145
- ## Build the default theme
66
+ ## Surfaces (root colors)
146
67
 
147
- Start with the surface family. It is mostly tone, with small saturation changes
148
- to keep the ladder visually coherent:
68
+ `surface` is a root color (absolute `lightness`, no `base`) with a low saturation factor. The ladder chains off it via small relative offsets:
149
69
 
150
70
  ```ts
151
- const defaultTheme = glaze(PURPLE_HUE, SEED_SATURATION);
152
-
153
71
  defaultTheme.colors({
154
- surface: { tone: 100, saturation: 0.11 },
155
- 'surface-2': {
156
- base: 'surface',
157
- tone: '-2',
158
- saturation: 0.15,
159
- inherit: false,
160
- },
161
- 'surface-3': {
162
- base: 'surface',
163
- tone: '-4',
164
- saturation: 0.19,
165
- inherit: false,
166
- },
72
+ surface: { lightness: 100, saturation: 0.11 },
73
+ 'surface-2': { base: 'surface', lightness: '-2', saturation: 0.15, inherit: false },
74
+ 'surface-3': { base: 'surface', lightness: '-4', saturation: 0.19, inherit: false },
167
75
  });
168
76
  ```
169
77
 
170
- Because each tone delta re-anchors to the resolved surface in every scheme,
171
- these small relative offsets are enough to define the ladder. There is no
172
- separate dark-mode curve to tune.
78
+ A factor of `0.11` of the seed gives a barely-noticeable hue shift — enough that light/dark surfaces feel branded, not enough to look tinted. The slight saturation bump on `-2` / `-3` compensates for perceived saturation dropping as lightness drops, so the ladder reads as one consistent surface family.
173
79
 
174
- ### Text and borders
80
+ `mode: 'auto'` (the default) feeds these through Glaze's Möbius dark inversion, so an `L=100` light-mode surface lands near `L≈15` in dark mode with proportional deltas across the ladder preserved. `inherit: false` on `-2` / `-3` keeps colored sibling themes lean — they only need a single tinted `surface`, not the whole ladder.
175
81
 
176
- Use a hard edge tone for maximum-prominence text, and APCA floors for softer
177
- content:
82
+ ## Text on surfaces (anchor at the edge)
83
+
84
+ The headline trick of the whole methodology. Strong text uses an **absolute `lightness` near the edge of the window**; soft variants use a **directional relative hint plus a numeric `contrast`**.
178
85
 
179
86
  ```ts
180
- defaultTheme.colors({
181
- 'surface-text': {
182
- base: 'surface',
183
- tone: 2,
184
- saturation: 0.475,
185
- },
186
- 'surface-text-soft': {
187
- base: 'surface',
188
- tone: '-1',
189
- saturation: 0.375,
190
- contrast: { apca: ['content', 'body'] },
191
- inherit: false,
192
- },
193
- 'surface-text-soft-2': {
194
- base: 'surface',
195
- tone: '-1',
196
- saturation: 0.24,
197
- contrast: { apca: ['large', 'content'] },
198
- inherit: false,
199
- },
200
- border: {
201
- base: 'surface',
202
- tone: ['-10', '-20'],
203
- saturation: 0.175,
204
- inherit: false,
205
- },
206
- });
87
+ 'surface-text': {
88
+ base: 'surface', lightness: 2, saturation: 0.475,
89
+ },
90
+ 'surface-text-soft': {
91
+ base: 'surface', lightness: '-1', saturation: 0.375,
92
+ contrast: [9, 11], inherit: false,
93
+ },
94
+ 'surface-text-soft-2': {
95
+ base: 'surface', lightness: '-1', saturation: 0.24,
96
+ contrast: [4.5, 5.5], inherit: false,
97
+ },
207
98
  ```
208
99
 
209
- `surface-text` uses an absolute `tone: 2` despite having a base: it is
210
- intentionally edge-anchored, and the base records the relationship used by
211
- role inference. The soft variants use a `-1` tone delta as the preferred
212
- direction and APCA as the readable floor. `border` uses an HC tone-delta pair
213
- because borders usually need a larger visible step in high contrast.
100
+ Repeat the same triple anchored to each subordinate surface (`surface-2-text`, `surface-2-text-soft`, `surface-3-text`, …) so the ladder stays self-consistent.
101
+
102
+ The strong-text `lightness: 2` pins the light-mode resolved value to **L≈11.8** (mapped through the default `[10, 100]` window) and inverts to **L≈94** in dark mode (cr≈13.7 vs the dark surface). A `contrast: 'AAA'` solver pass would have stopped at L≈21 — meeting the AAA floor and no further. **Anchoring at the edge** beats the contrast solver because the solver only needs to *meet* the floor, not exceed it.
214
103
 
215
- Repeat the same pattern for `surface-2` and `surface-3` only if components need
216
- text directly on those surfaces.
104
+ The soft variants use `lightness: '-1'` only as a *directional hint* — the real positioning comes from the numeric `contrast`. Numeric ratios give designers precise perceived weight where presets would only guarantee the AA/AAA floor.
217
105
 
218
- ### Neutral utility tokens
106
+ In high-contrast mode the lightness window is bypassed entirely, so `lightness: 2` resolves to L=2 in light HC and L≈99 in dark HC (cr≈20.8 / 20.5).
219
107
 
220
- Keep neutral-only primitives local to the default theme:
108
+ ## Other neutral primitives
109
+
110
+ Borders, placeholders, focus rings, and the floating "muted text" lightness — all default-only:
221
111
 
222
112
  ```ts
223
- defaultTheme.colors({
224
- placeholder: {
225
- base: 'surface',
226
- tone: 67,
227
- saturation: 0.175,
228
- inherit: false,
229
- },
230
- focus: {
231
- base: 'surface',
232
- tone: 71,
233
- saturation: 0.8625,
234
- inherit: false,
235
- },
236
- disabled: {
237
- tone: 80.8,
238
- saturation: 0.4,
239
- inherit: false,
240
- },
241
- });
113
+ border: { base: 'surface', lightness: ['-10', '-20'], saturation: 0.175, inherit: false },
114
+ placeholder: { base: 'surface', lightness: 67, saturation: 0.175, inherit: false },
115
+ focus: { base: 'surface', lightness: 71, saturation: 0.8625, inherit: false },
116
+ disabled: { lightness: 80.8, saturation: 0.4, inherit: false },
242
117
  ```
243
118
 
244
- Absolute tones are fine for primitives whose job is visual placement rather than
245
- a strict relationship to a specific surface.
119
+ `border` uses an HC pair — the border darkens twice as much in high-contrast mode for visibility. `placeholder` and `focus` give a `base` for namespacing but use absolute lightness independently. `disabled` is a root color (no `base`) — it's used as a plain "muted text" token in some places, free of the surface chain.
246
120
 
247
- ## Chips and disabled states
121
+ ## Disabled chip (contrast-driven for scheme symmetry)
248
122
 
249
- For subtle fills, tone is usually clearer than contrast:
123
+ The disabled chip + label pair uses `mode: 'auto'` and **explicit numeric contrast** against `surface`, not preset `'AA'` / `'AAA'`:
250
124
 
251
125
  ```ts
252
- defaultTheme.colors({
253
- 'disabled-surface': {
254
- base: 'surface',
255
- tone: '-3',
256
- saturation: 0.2,
257
- inherit: false,
258
- },
259
- 'disabled-surface-text': {
260
- base: 'disabled-surface',
261
- tone: '+18',
262
- saturation: 0.3,
263
- autoFlip: false,
264
- inherit: false,
265
- },
266
- });
126
+ 'disabled-surface': {
127
+ base: 'surface', lightness: '-1', saturation: 0.2,
128
+ contrast: [1.5, 2], inherit: false,
129
+ },
130
+ 'disabled-surface-text': {
131
+ base: 'disabled-surface', lightness: '+1', saturation: 0.3,
132
+ contrast: 3, inherit: false,
133
+ },
267
134
  ```
268
135
 
269
- This says exactly what the pair should do: the chip sits a small tone delta off
270
- the page, and the label sits a muted delta from the chip. `autoFlip: false`
271
- keeps the label on the authored side when the delta reaches the edge.
136
+ Each token anchors to its immediate parent surface — `*-surface` contrasts against the root `surface`, while `*-surface-text` contrasts against its own chip (`disabled-surface`). This keeps the disabled state self-contained and resolves to consistent ratios in light, dark, and HC (chip 1.5–2× vs surface, label ≈ 3× on chip). An alpha-tinted overlay would have asymmetric behavior — composited alpha against a near-white light surface produces a much weaker chip than the same overlay against a near-dark dark surface, and the disabled state would stop *looking* disabled in one of the schemes.
272
137
 
273
- Use contrast instead when the chip must hit an explicit accessibility floor:
138
+ The general rule: when a color needs to *feel the same across schemes*, anchor it with `mode: 'auto'` + a numeric contrast against a surface, not with a preset.
139
+
140
+ ## `surface-inverse` (the fixed-mode escape hatch)
274
141
 
275
142
  ```ts
276
- defaultTheme.colors({
277
- 'disabled-surface-text': {
278
- base: 'disabled-surface',
279
- tone: '+1',
280
- saturation: 0.3,
281
- contrast: { apca: 'non-text' },
282
- inherit: false,
283
- },
284
- });
143
+ 'surface-inverse': {
144
+ lightness: 12, saturation: 0.475, mode: 'fixed', inherit: false,
145
+ },
285
146
  ```
286
147
 
287
- When a token needs the scheme extreme, use `tone: 'min'` or `tone: 'max'`
288
- directly. Avoid large magic numbers or fake contrast floors just to push a color
289
- to the edge.
148
+ `mode: 'fixed'` skips the dark-scheme Möbius inversion and only does a linear window mapping, so `surface-inverse` reads as a dark surface in *every* scheme — light, dark, and HC. In high-contrast variants the window is bypassed entirely (identity), so the color stays at its raw lightness across all four schemes.
149
+
150
+ Use it for tooltips, code blocks, popovers with their own dark theme. Pair with `#white` for foreground text.
290
151
 
291
- ## Fixed surfaces and accent fills
152
+ This is the canonical "I want this color to stay recognizable" pattern. The other `mode: 'fixed'` use is the entire accent system below.
292
153
 
293
- Use `mode: 'fixed'` when the authored color should stay recognizable across
294
- schemes.
154
+ ## Accent system (anchor pattern)
155
+
156
+ The load-bearing trick. Define a single fixed white anchor `accent-surface-text`, then derive every accent surface from it with a small relative lightness offset and a numeric contrast under `mode: 'fixed'`:
295
157
 
296
158
  ```ts
297
- defaultTheme.colors({
298
- 'surface-inverse': {
299
- tone: 12,
300
- saturation: 0.475,
301
- mode: 'fixed',
302
- inherit: false,
303
- },
304
-
305
- 'accent-surface-text': {
306
- tone: 100,
307
- mode: 'fixed',
308
- },
309
- 'accent-surface': {
310
- base: 'accent-surface-text',
311
- tone: '-1',
312
- contrast: { apca: ['content', 'body'] },
313
- mode: 'fixed',
314
- },
315
- 'accent-surface-2': {
316
- base: 'accent-surface-text',
317
- tone: '-1',
318
- contrast: { apca: [65, 80] },
319
- mode: 'fixed',
320
- },
321
- 'accent-surface-hover': {
322
- base: 'accent-surface-text',
323
- tone: '-1',
324
- contrast: { apca: ['body', 'preferred'] },
325
- mode: 'fixed',
326
- },
327
- });
159
+ 'accent-surface-text': { lightness: 100, mode: 'fixed' },
160
+
161
+ 'accent-surface': { base: 'accent-surface-text', lightness: '-1', contrast: [4.5, 7], mode: 'fixed' },
162
+ 'accent-surface-2': { base: 'accent-surface-text', lightness: '-1', contrast: [4.8, 7.5], mode: 'fixed' },
163
+ 'accent-surface-3': { base: 'accent-surface-text', lightness: '-1', contrast: [5.2, 8], mode: 'fixed' },
164
+ 'accent-surface-hover': { base: 'accent-surface-text', lightness: '-1', contrast: [6, 8.5], mode: 'fixed' },
328
165
  ```
329
166
 
330
- The accent fill family is a fixed chain against a fixed text anchor. The names
331
- infer `surface` and `text` roles, so APCA gets the right polarity without extra
332
- fields.
167
+ Three things make this work:
168
+
169
+ - **One anchor, one chain.** All accent surfaces stay in the same hue family because they all derive from `accent-surface-text`.
170
+ - **`mode: 'fixed'` keeps the brand recognizable.** Without it, the dark-scheme Möbius inversion would turn the brand fill into a lightness-inverted counterpart that may no longer read as the intended brand surface. Fixed maps lightness linearly into the dark window, so a `L=52` brand color resolves to ~L=51.6 in dark mode — still recognizably the same color.
171
+ - **Numeric contrasts, not presets.** `'AA'` / `'AAA'` would let the solver push the color far away from its anchor in dark schemes, breaking the relationship between `accent-surface` and its neighbors. Numeric ratios make the darkening between `accent-surface` (4.5/7), `-2` (4.8/7.5), `-3` (5.2/8), and `-hover` (6/8.5) a tight, designed sequence — a stepped gradient rather than four solver-generated outliers.
172
+
173
+ The hover variant is a dedicated *fixed* token. Reusing `accent-text` (which is `mode: 'auto'` and inverts direction in dark) would break the hover feel.
333
174
 
334
175
  ## Adaptive accent foregrounds
335
176
 
336
- Brand foregrounds that sit on neutral surfaces should stay adaptive:
177
+ The opposite of the fills. Brand-colored *foregrounds* are anchored to **`surface`, not `accent-surface`**, with `mode: 'auto'` (default) and full saturation:
337
178
 
338
179
  ```ts
339
- defaultTheme.colors({
340
- 'accent-text': {
341
- base: 'surface',
342
- tone: '-1',
343
- saturation: 1,
344
- contrast: { apca: ['content', 'body'] },
345
- },
346
- 'accent-text-soft': {
347
- base: 'surface',
348
- tone: '-1',
349
- saturation: 1,
350
- contrast: { apca: ['large', 'content'] },
351
- },
352
- 'accent-icon': {
353
- base: 'surface',
354
- tone: '-1',
355
- saturation: 0.9375,
356
- contrast: { apca: ['non-text', 'large'] },
357
- },
358
- });
180
+ 'accent-text': { base: 'surface', lightness: '-1', saturation: 1, contrast: [6.4, 10] },
181
+ 'accent-text-soft': { base: 'surface', lightness: '-1', saturation: 1, contrast: [4.5, 7] },
182
+ 'accent-icon': { base: 'surface', lightness: '-1', saturation: 0.9375, contrast: [3.2, 5] },
359
183
  ```
360
184
 
361
- Anchor these to `surface`, not to `accent-surface`. Their real job is to remain
362
- readable on neutral UI, so `mode: 'auto'` and a surface base are the right
363
- defaults.
185
+ Foregrounds need to stay readable on the surface they actually sit on — anchoring to the brand fill would only enforce contrast against that fill, leaving the dark-mode color washed out against the actual surface (e.g. SECONDARY button labels sit on `surface`, not on the brand fill). Anchoring to `surface` + `mode: 'auto'` lets the solver lift the lightness in dark mode so the contrast floor holds in both schemes.
186
+
187
+ `accent-text-soft` shares the anchor and saturation but relaxes the contrast floor for a visibly less prominent secondary foreground (link base color, subdued labels). Critically, it stays `mode: 'auto'` — a fixed version would collapse to cr≈3 against the dark surface and break AA.
364
188
 
365
- Brand-tinted disabled states can usually be pure tone:
189
+ ## Brand-tinted disabled
190
+
191
+ Mirrors the neutral disabled pair from above but with higher saturation so the chip reads as a *muted brand color* rather than fully neutral grey:
366
192
 
367
193
  ```ts
368
- defaultTheme.colors({
369
- 'accent-disabled-surface': {
370
- base: 'surface',
371
- tone: '+3',
372
- saturation: 0.5,
373
- },
374
- 'accent-disabled-surface-text': {
375
- base: 'accent-disabled-surface',
376
- tone: '+18',
377
- saturation: 0.4,
378
- autoFlip: false,
379
- },
380
- });
194
+ 'accent-disabled-surface': {
195
+ base: 'surface', lightness: '-1', saturation: 0.5,
196
+ contrast: [1.4, 1.3],
197
+ },
198
+ 'accent-disabled-surface-text': {
199
+ base: 'accent-disabled-surface', lightness: '+1', saturation: 0.4,
200
+ contrast: 1.51, mode: 'fixed',
201
+ },
381
202
  ```
382
203
 
383
- These are inherited, so status themes automatically get
384
- `success-accent-disabled-surface`, `danger-accent-disabled-surface`, and the
385
- matching text tokens.
204
+ The HC pair `[1.4, 1.3]` is intentionally *lower* in high-contrast mode — the tinted chip naturally gains more contrast against `surface` when the lightness window bypasses (identity mapping), so we loosen the constraint to leave room for stronger text-on-chip contrast. The text token uses `contrast: 1.51`, which is the maximum value that stays below Glaze's auto-flip threshold (the solver would otherwise invert the color past the midpoint, producing a result on the wrong side of its base). This keeps the label legible without flipping into an unexpected hue.
205
+
206
+ These are inherited (no `inherit: false`), so each colored sibling theme automatically emits `<theme>-accent-disabled-surface` and `<theme>-accent-disabled-surface-text`. PRIMARY-style disabled buttons stay tinted with the active theme's hue (danger-tinted danger button, success-tinted success button), preserving brand identity even in the disabled state.
386
207
 
387
- ## Special-purpose colors
208
+ ## Per-color hue overrides (code highlighting)
388
209
 
389
- Use absolute `hue` overrides for tokens that should come from another hue family
390
- but keep the same adaptation behavior:
210
+ The `code-*` tokens use **absolute `hue` numbers** regardless of the seed. Each is `base: 'surface'` with `mode: 'auto'`, a per-token saturation, and a numeric contrast floor:
391
211
 
392
212
  ```ts
393
- defaultTheme.colors({
394
- 'code-comment': {
395
- base: 'surface',
396
- hue: 280,
397
- saturation: 0.1,
398
- tone: '-1',
399
- contrast: { apca: ['large', 'content'] },
400
- inherit: false,
401
- },
402
- 'code-keyword': {
403
- base: 'surface',
404
- hue: 348,
405
- saturation: 1,
406
- tone: '-1',
407
- contrast: { apca: ['content', 'body'] },
408
- inherit: false,
409
- },
410
- 'code-string': {
411
- base: 'surface',
412
- hue: SUCCESS_HUE,
413
- saturation: 1,
414
- tone: '-1',
415
- contrast: { apca: ['large', 'content'] },
416
- inherit: false,
417
- },
418
- });
213
+ 'code-comment': { base: 'surface', hue: 280, saturation: 0.1, lightness: '-1', contrast: [4.5, 7], inherit: false },
214
+ 'code-keyword': { base: 'surface', hue: 348, saturation: 1, lightness: '-1', contrast: [5, 7.5], inherit: false },
215
+ 'code-string': { base: 'surface', hue: SUCCESS_HUE, saturation: 1, lightness: '-1', contrast: [4.5, 7], inherit: false },
216
+ // …code-punctuation, code-number, code-function, code-attribute follow the same shape
419
217
  ```
420
218
 
421
- Use small tone ramps for decorative motion:
219
+ The canonical pattern for "I want a color from a different hue family but the same adaptive behavior". Absolute `hue` overrides the theme seed for a single color; everything else (contrast against `surface`, dark adaptation, HC tightening) still works. `inherit: false` because syntax highlighting is a default-only concern.
220
+
221
+ ## Loading-animation faces
222
+
223
+ A 3-step ramp using *absolute* lightnesses with high saturation factors and tight numeric contrasts:
422
224
 
423
225
  ```ts
424
- defaultTheme.colors({
425
- 'loading-face-1': {
426
- base: 'surface',
427
- tone: 98,
428
- saturation: 0.3,
429
- inherit: false,
430
- },
431
- 'loading-face-2': {
432
- base: 'surface',
433
- tone: 91,
434
- saturation: 0.62,
435
- inherit: false,
436
- },
437
- 'loading-face-3': {
438
- base: 'surface',
439
- tone: 79,
440
- saturation: 0.66,
441
- inherit: false,
442
- },
443
- });
226
+ 'loading-face-1': { base: 'surface', lightness: 98, saturation: 0.3, contrast: [1.04, 1.5], inherit: false },
227
+ 'loading-face-2': { base: 'surface', lightness: 91, saturation: 0.62, contrast: [1.24, 2.5], inherit: false },
228
+ 'loading-face-3': { base: 'surface', lightness: 79, saturation: 0.66, contrast: [1.75, 4], inherit: false },
444
229
  ```
445
230
 
446
- Since tone steps now invert consistently across schemes, the same ramp keeps its
447
- spacing in light and dark without involving the contrast solver. Use an HC tone
448
- pair only when the animation should become more pronounced in high contrast.
231
+ Combines absolute lightness positioning (so the ramp is deterministic in light mode) with a numeric contrast floor (so the ramp still reads in dark and HC). The HC contrast jumps significantly (`1.04 → 1.5`, `1.24 → 2.5`, `1.75 → 4`) so the animation stays perceivable for low-vision users.
449
232
 
450
- ## Effects
233
+ ## Shadows
451
234
 
452
- Define one neutral shadow system:
235
+ Three sizes, all sharing `bg: 'surface'` and `fg: 'surface-text'`, varying only `intensity`:
453
236
 
454
237
  ```ts
455
- defaultTheme.colors({
456
- 'shadow-sm': {
457
- type: 'shadow',
458
- bg: 'surface',
459
- fg: 'surface-text',
460
- intensity: 5,
461
- inherit: false,
462
- },
463
- 'shadow-md': {
464
- type: 'shadow',
465
- bg: 'surface',
466
- fg: 'surface-text',
467
- intensity: [10, 20],
468
- inherit: false,
469
- },
470
- 'shadow-lg': {
471
- type: 'shadow',
472
- bg: 'surface',
473
- fg: 'surface-text',
474
- intensity: [15, 30],
475
- inherit: false,
476
- },
477
- });
238
+ 'shadow-sm': { type: 'shadow', bg: 'surface', fg: 'surface-text', intensity: 5, inherit: false },
239
+ 'shadow-md': { type: 'shadow', bg: 'surface', fg: 'surface-text', intensity: 10, inherit: false },
240
+ 'shadow-lg': { type: 'shadow', bg: 'surface', fg: 'surface-text', intensity: 15, inherit: false },
478
241
  ```
479
242
 
480
- Including `fg` lets shadow strength follow the resolved foreground/background
481
- gap. Use an HC pair for shadows that should deepen in high contrast.
243
+ Including `fg` matters: shadow strength scales with `|l_bg − l_fg|`, so anchoring `fg` to `surface-text` (which is anchored at the edge of the window) makes shadows *automatically deeper* in dark mode where the bg/fg gap is larger. All shadows are `inherit: false` — there's only one shadow system for the whole UI, and colored sibling themes don't carry their own.
244
+
245
+ For HC, pass `intensity: [normal, hc]` (e.g. `[10, 20]`) to deepen shadows in high-contrast mode. The full algorithm and tuning knobs are in [api.md → Shadows](api.md#shadows).
482
246
 
483
- Use `opacity` for one fixed-alpha color:
247
+ ## Overlay (fixed opacity)
484
248
 
485
249
  ```ts
486
- defaultTheme.colors({
487
- overlay: { tone: 10, opacity: 0.5, inherit: false },
488
- });
250
+ overlay: { lightness: 10, opacity: 0.5, inherit: false },
489
251
  ```
490
252
 
491
- Use mixes when one color should tint through another:
253
+ The shortcut for *one solid color with a fixed alpha* — no shadow algorithm, no mix. `opacity` on a regular color attaches an alpha component to every variant. Use it for backdrops, scrims, modal overlays. (Combining `opacity` with `contrast` is not recommended — perceived lightness becomes unpredictable when alpha is fixed; Glaze emits a `console.warn`.)
254
+
255
+ ## Mixes for hover / tint
256
+
257
+ Reach for mix tokens when you want one color to "tint through" another:
492
258
 
493
259
  ```ts
494
- defaultTheme.colors({
495
- hover: {
496
- type: 'mix',
497
- base: 'surface',
498
- target: 'accent-surface',
499
- value: 8,
500
- blend: 'transparent',
501
- },
502
- tint: {
503
- type: 'mix',
504
- base: 'surface',
505
- target: 'accent-surface',
506
- value: 20,
507
- },
508
- });
260
+ hover: {
261
+ type: 'mix', base: 'surface', target: 'accent-surface',
262
+ value: 8, blend: 'transparent',
263
+ },
264
+ // hover → accent-surface with alpha = 0.08
265
+
266
+ tint: {
267
+ type: 'mix', base: 'surface', target: 'accent-surface',
268
+ value: 20,
269
+ },
509
270
  ```
510
271
 
511
- Transparent mixes are good for hover overlays. Opaque mixes are good for solid
512
- tints. Opaque mixes default to perceptual OKHSL interpolation; choose `srgb`
513
- when matching channel compositing matters. Transparent mixes always composite
514
- in linear sRGB. Mix colors can also use `contrast`; the solver adjusts the
515
- value or opacity to hit the floor. See [Mix colors](api.md#mix-colors).
272
+ - **Transparent mix** *the target color with controlled alpha*. Useful for hover overlays.
273
+ - **Opaque mix** solid blend of two colors. Good for subtle tints.
274
+
275
+ Choose `space: 'okhsl'` (default) for design tokens — perceptually uniform, consistent with the rest of Glaze. Choose `space: 'srgb'` to match what the browser would render with a plain CSS overlay. Mix colors support the same `contrast` prop as regular colors; the solver adjusts the mix ratio (opaque) or opacity (transparent) to meet the target.
516
276
 
517
- ## Extend into status themes
277
+ ## Colored sibling themes via `extend()`
518
278
 
519
- Once the default theme is shaped, create colored siblings by replacing hue and
520
- overriding only the root surface that should become visibly tinted:
279
+ One shared `TINTED_SURFACE_OVERRIDE`, applied to every colored theme, with only the `hue` changing per status:
521
280
 
522
281
  ```ts
523
- const TINTED_SURFACE_OVERRIDE = {
524
- surface: { tone: 96, saturation: 0.8 },
282
+ const TINTED_SURFACE_OVERRIDE: ColorMap = {
283
+ surface: { lightness: 96, saturation: 0.8 },
525
284
  };
526
285
 
527
- const primaryTheme = defaultTheme.extend({
528
- colors: TINTED_SURFACE_OVERRIDE,
529
- });
530
- const successTheme = defaultTheme.extend({
531
- hue: SUCCESS_HUE,
532
- colors: TINTED_SURFACE_OVERRIDE,
533
- });
534
- const dangerTheme = defaultTheme.extend({
535
- hue: DANGER_HUE,
536
- colors: TINTED_SURFACE_OVERRIDE,
537
- });
538
- const warningTheme = defaultTheme.extend({
539
- hue: WARNING_HUE,
540
- colors: TINTED_SURFACE_OVERRIDE,
541
- });
542
- const noteTheme = defaultTheme.extend({
543
- hue: NOTE_HUE,
544
- colors: TINTED_SURFACE_OVERRIDE,
545
- });
286
+ const primaryTheme = defaultTheme.extend({ colors: TINTED_SURFACE_OVERRIDE });
287
+ const successTheme = defaultTheme.extend({ hue: SUCCESS_HUE, colors: TINTED_SURFACE_OVERRIDE });
288
+ const dangerTheme = defaultTheme.extend({ hue: DANGER_HUE, colors: TINTED_SURFACE_OVERRIDE });
289
+ const warningTheme = defaultTheme.extend({ hue: WARNING_HUE, colors: TINTED_SURFACE_OVERRIDE });
290
+ const noteTheme = defaultTheme.extend({ hue: NOTE_HUE, colors: TINTED_SURFACE_OVERRIDE });
546
291
  ```
547
292
 
548
- The inherited accent and disabled tokens now resolve in each status hue. Tokens
549
- marked `inherit: false` stay default-only, so sibling themes remain small.
293
+ Colored themes need a visibly tinted surface for status banners — saturation jumps from the neutral `0.11` (default theme) to `0.8`. The `inherit: false` discipline pays off here: because most neutrals (`surface-2`, `surface-3`, `border`, `placeholder`, `disabled-*`, `code-*`, `loading-*`, `shadow-*`) are flagged default-only, each colored theme inherits *only* the accent + tinted surface chain and emits a small, focused token set.
550
294
 
551
- ## Export the palette
295
+ `primaryTheme` keeps the default hue but gets the tinted surface — useful for places that want a brand-tinted banner without semantic status meaning.
552
296
 
553
- Compose the themes once:
297
+ ## Palette composition
298
+
299
+ Compose all themes into a palette so they can be exported as one token set:
554
300
 
555
301
  ```ts
556
302
  const palette = glaze.palette({
557
303
  default: defaultTheme,
558
304
  primary: primaryTheme,
559
305
  success: successTheme,
560
- danger: dangerTheme,
306
+ danger: dangerTheme,
561
307
  warning: warningTheme,
562
- note: noteTheme,
308
+ note: noteTheme,
563
309
  });
564
310
  ```
565
311
 
566
- The usual export shape is default unprefixed and status themes prefixed:
567
-
568
- ```ts
569
- const prefix = {
570
- default: '',
571
- primary: 'primary-',
572
- success: 'success-',
573
- danger: 'danger-',
574
- warning: 'warning-',
575
- note: 'note-',
576
- };
577
-
578
- palette.tasty({ prefix });
579
- ```
580
-
581
- An explicit prefix map is the clearest choice when the palette has a neutral
582
- `default` theme. The separate palette `primary` option serves another pattern:
583
- it duplicates one named theme without a prefix while retaining its prefixed
584
- tokens. Do not combine the two accidentally; choose the token namespace your
585
- components expect.
586
-
587
- The palette design is independent of the exporter:
588
-
589
- ```ts
590
- palette.tokens({ prefix }); // JavaScript maps, native oklch by default
591
- palette.css({ prefix }); // CSS custom-property declarations
592
- palette.dtcg({ prefix }); // one design-token tree per scheme
593
- palette.tailwind({ prefix }); // Tailwind CSS v4 theme
594
- ```
595
-
596
- Use `palette.tasty({ prefix })` for [Tasty](https://tasty.style) state bindings. See
597
- [migration.md](migration.md#choosing-an-export) for output shapes, application
598
- wiring, and the `primary` alias pattern.
599
-
600
- ## High contrast
312
+ The default theme is conventionally exported unprefixed (its tokens land as `#surface`, `#border`); colored themes are prefixed with their name. See [migration.md](migration.md) for the prefix map shape, alias patterns, and how to wire the resulting tokens into Tasty / CSS / framework-agnostic JSON.
601
313
 
602
- High contrast is not a separate palette. Any value that accepts an HC pair can
603
- tighten the HC variant: `tone`, `contrast`, shadow `intensity`, and mix `value`.
314
+ ## High-contrast strategy
604
315
 
605
- Use HC pairs where users should actually get more separation:
316
+ Glaze's high-contrast mode is opt-in per token: anywhere `lightness`, `contrast`, `intensity`, or `value` accepts an HC pair, you can pass `[normal, hc]` to tighten the HC variant. The heuristic is to pair anything that's already contrast-driven:
606
317
 
607
- - Text/content contrast: `{ apca: ['content', 'body'] }`.
608
- - Accent fills: `{ apca: ['content', 'body'] }` or stronger.
609
- - Borders: `tone: ['-10', '-20']`.
610
- - Shadows: `intensity: [10, 20]`.
611
- - Decorative ramps that must stay perceivable.
318
+ - Text-against-surface contrasts (`[9, 11]`, `[4.5, 5.5]`, `[6.4, 10]`).
319
+ - The accent surface ladder (`[4.5, 7]` → `[5.2, 8]` `[6, 8.5]`).
320
+ - The loading ramp's contrasts.
321
+ - Shadow `intensity` (e.g. `intensity: [10, 20]`).
322
+ - `border` lightness (e.g. `lightness: ['-10', '-20']`).
612
323
 
613
- In HC variants, Glaze bypasses the normal tone window and uses the full
614
- `[0, 100]` range. Edge tones can reach the edge; contrast floors have more room
615
- to solve.
324
+ In HC the lightness window is **bypassed entirely** light HC and dark HC operate on the full `[0, 100]` range. That's why edge-anchored absolute lightnesses like `surface-text: { lightness: 2 }` blow out to L=2 in light HC and L≈99 in dark HC, exactly what you want for maximum contrast.
616
325
 
617
- ## Checklist
326
+ ## Closing checklist
618
327
 
619
328
  Before shipping a palette, verify:
620
329
 
621
- - Text, icon, and content tokens either have APCA/WCAG contrast or are
622
- deliberately edge-anchored.
623
- - Accent fills use `mode: 'fixed'`; accent foregrounds on neutral UI stay
624
- `mode: 'auto'` and are based on `surface`.
625
- - Ambiguous APCA tokens have an explicit `role`; obvious names rely on inference.
626
- - Low-stakes visual relationships use tone deltas instead of fake contrast
627
- floors.
628
- - `inherit: false` is set on default-only tokens so status themes stay focused.
629
- - HC pairs exist where high contrast should visibly tighten.
630
- - `glaze.configure({ states, modes })` matches the states registered in the app.
631
- - Every emitted scheme (`light`, `dark`, `lightContrast`, `darkContrast`) has
632
- been reviewed on complete screens, not only in a token grid.
633
- - Rendered WCAG/APCA results have been checked for chromatic foreground/base
634
- pairs that carry accessibility requirements.
635
- - Resolution emits no unexplained unreachable-contrast or token-collision
636
- warnings.
330
+ - [ ] Every text token has an explicit `contrast` *or* an edge-anchored absolute `lightness`.
331
+ - [ ] Every accent surface uses `mode: 'fixed'` + numeric `contrast` (not preset `'AA'` / `'AAA'`).
332
+ - [ ] Every brand foreground (`accent-text*`, `accent-icon`) is anchored to `surface`, **not** to `accent-surface`.
333
+ - [ ] Every `inherit: false` is intentional colored sibling themes only carry the tokens they actually need.
334
+ - [ ] HC pairs are present on every contrast-driven token, not just the strong ones.
335
+ - [ ] Shadow `fg` is set when you want shadows to deepen in dark mode.
336
+ - [ ] `glaze.configure({ states, modes })` matches the global predefined states wired in your app's root.