@cube-dev/ui-kit 0.0.0-canary-7c5dc45 → 0.0.0-canary-7d44972

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 (492) hide show
  1. package/dist/CHANGELOG.md +8 -0
  2. package/dist/_internal/hooks/use-chained-callback.js +1 -1
  3. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  4. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  5. package/dist/_internal/hooks/use-event.js +1 -1
  6. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  7. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  8. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  9. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  10. package/dist/_internal/hooks/use-warn.js +1 -1
  11. package/dist/components/Block.js +1 -1
  12. package/dist/components/CollectionItem.js +1 -1
  13. package/dist/components/GlobalStyles.js +7 -7
  14. package/dist/components/GlobalStyles.js.map +1 -1
  15. package/dist/components/GridProvider.js +1 -1
  16. package/dist/components/HiddenInput.js +1 -1
  17. package/dist/components/Root.js +1 -1
  18. package/dist/components/actions/Action/Action.js +1 -1
  19. package/dist/components/actions/Banner/Banner.js +1 -1
  20. package/dist/components/actions/Button/Button.js +1 -1
  21. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  22. package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
  23. package/dist/components/actions/ButtonSplit/context.js +1 -1
  24. package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
  25. package/dist/components/actions/CommandMenu/styled.js +1 -1
  26. package/dist/components/actions/ItemAction/ItemAction.js +1 -1
  27. package/dist/components/actions/ItemActionContext.js +1 -1
  28. package/dist/components/actions/ItemButton/ItemButton.js +1 -1
  29. package/dist/components/actions/Link/Link.js +1 -1
  30. package/dist/components/actions/Menu/Menu.js +1 -1
  31. package/dist/components/actions/Menu/MenuItem.js +1 -1
  32. package/dist/components/actions/Menu/MenuSection.js +1 -1
  33. package/dist/components/actions/Menu/MenuTrigger.js +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/InfoBadge/InfoBadge.js +1 -1
  59. package/dist/components/content/InlineInput/InlineInput.js +1 -1
  60. package/dist/components/content/Item/Item.js +1 -1
  61. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  62. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  63. package/dist/components/content/Layout/GridLayout.js +1 -1
  64. package/dist/components/content/Layout/Layout.js +1 -1
  65. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  66. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  67. package/dist/components/content/Layout/LayoutContainer.js +1 -1
  68. package/dist/components/content/Layout/LayoutContent.js +1 -1
  69. package/dist/components/content/Layout/LayoutContext.js +1 -1
  70. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  71. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  72. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  73. package/dist/components/content/Layout/LayoutHeader.js +1 -1
  74. package/dist/components/content/Layout/LayoutPane.js +1 -1
  75. package/dist/components/content/Layout/LayoutPanel.js +1 -1
  76. package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
  77. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  78. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  79. package/dist/components/content/Layout/index.js +1 -1
  80. package/dist/components/content/Layout/utils.js +1 -1
  81. package/dist/components/content/Paragraph.js +1 -1
  82. package/dist/components/content/Placeholder/Placeholder.js +1 -1
  83. package/dist/components/content/PrismCode/PrismCode.js +2 -6
  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.js +1 -1
  91. package/dist/components/content/TextItem/TextItem.js +1 -1
  92. package/dist/components/content/Title.js +1 -1
  93. package/dist/components/content/Tree/Tree.js +1 -1
  94. package/dist/components/content/Tree/TreeNode.js +1 -1
  95. package/dist/components/content/Tree/styled.js +1 -1
  96. package/dist/components/content/Tree/tree-index.js +1 -1
  97. package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
  98. package/dist/components/content/Tree/use-load-data.js +1 -1
  99. package/dist/components/content/highlightText.js +1 -1
  100. package/dist/components/content/use-auto-tooltip.js +1 -1
  101. package/dist/components/fields/Checkbox/Checkbox.js +1 -1
  102. package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
  103. package/dist/components/fields/Checkbox/context.js +1 -1
  104. package/dist/components/fields/ComboBox/ComboBox.js +1 -1
  105. package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
  106. package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
  107. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  108. package/dist/components/fields/DatePicker/DateInput.js +1 -1
  109. package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
  110. package/dist/components/fields/DatePicker/DatePicker.js +1 -1
  111. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  112. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  113. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  114. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  115. package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
  116. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
  117. package/dist/components/fields/DatePicker/TimeInput.js +1 -1
  118. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  119. package/dist/components/fields/DatePicker/props.js +1 -1
  120. package/dist/components/fields/DatePicker/utils.js +1 -1
  121. package/dist/components/fields/FileInput/FileInput.js +1 -1
  122. package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
  123. package/dist/components/fields/FilterPicker/FilterPicker.js +2 -1
  124. package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
  125. package/dist/components/fields/Input/Input.js +1 -1
  126. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  127. package/dist/components/fields/ListBox/ListBox.js +1 -1
  128. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
  129. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  130. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
  131. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  132. package/dist/components/fields/NumberInput/StepButton.js +1 -1
  133. package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
  134. package/dist/components/fields/Picker/Picker.js +1 -1
  135. package/dist/components/fields/RadioGroup/Radio.js +1 -1
  136. package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
  137. package/dist/components/fields/RadioGroup/context.js +1 -1
  138. package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
  139. package/dist/components/fields/SearchInput/SearchInput.js +1 -1
  140. package/dist/components/fields/Select/Select.js +1 -1
  141. package/dist/components/fields/Slider/Gradation.js +1 -1
  142. package/dist/components/fields/Slider/HueSlider.js +1 -1
  143. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  144. package/dist/components/fields/Slider/Slider.js +1 -1
  145. package/dist/components/fields/Slider/SliderBase.js +1 -1
  146. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  147. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  148. package/dist/components/fields/Slider/elements.js +1 -1
  149. package/dist/components/fields/Slider/index.js +1 -1
  150. package/dist/components/fields/Switch/Switch.js +1 -1
  151. package/dist/components/fields/TextArea/TextArea.js +1 -1
  152. package/dist/components/fields/TextInput/TextInput.js +1 -1
  153. package/dist/components/fields/TextInput/TextInputBase.js +1 -1
  154. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
  155. package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
  156. package/dist/components/form/Form/Field.js +1 -1
  157. package/dist/components/form/Form/Form.js +1 -1
  158. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  159. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  160. package/dist/components/form/Form/SubmitError.js +1 -1
  161. package/dist/components/form/Form/index.js +1 -1
  162. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  163. package/dist/components/form/Form/use-field/use-field.js +1 -1
  164. package/dist/components/form/Form/use-form.js +1 -1
  165. package/dist/components/form/Form/validation.js +1 -1
  166. package/dist/components/form/Label.js +1 -1
  167. package/dist/components/form/validation/ValidationIndicator.js +1 -1
  168. package/dist/components/form/validation/resolve-validation-props.js +1 -1
  169. package/dist/components/form/validation/use-validation-props.js +1 -1
  170. package/dist/components/form/wrapper.js +1 -1
  171. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  172. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  173. package/dist/components/layout/Board/Board.js +1 -1
  174. package/dist/components/layout/Board/BoardProvider.js +1 -1
  175. package/dist/components/layout/Board/BoardResponsive.js +1 -1
  176. package/dist/components/layout/Board/Widget.js +1 -1
  177. package/dist/components/layout/Board/WidgetHost.js +1 -1
  178. package/dist/components/layout/Board/board-context.js +1 -1
  179. package/dist/components/layout/Board/board-store.js +1 -1
  180. package/dist/components/layout/Board/grid-core/calculate.js +1 -1
  181. package/dist/components/layout/Board/grid-core/collision.js +1 -1
  182. package/dist/components/layout/Board/grid-core/compactors.js +1 -1
  183. package/dist/components/layout/Board/grid-core/constraints.js +1 -1
  184. package/dist/components/layout/Board/grid-core/layout.js +1 -1
  185. package/dist/components/layout/Board/grid-core/sort.js +1 -1
  186. package/dist/components/layout/Board/index.js +1 -1
  187. package/dist/components/layout/Board/responsive-utils.js +1 -1
  188. package/dist/components/layout/Board/use-board-layout.js +1 -1
  189. package/dist/components/layout/Board/use-board-registry.js +1 -1
  190. package/dist/components/layout/Flex.js +1 -1
  191. package/dist/components/layout/Flow.js +1 -1
  192. package/dist/components/layout/Grid.js +1 -1
  193. package/dist/components/layout/Panel.js +1 -1
  194. package/dist/components/layout/Prefix.js +1 -1
  195. package/dist/components/layout/ResizablePanel.js +1 -1
  196. package/dist/components/layout/Space.js +1 -1
  197. package/dist/components/layout/Suffix.js +1 -1
  198. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  199. package/dist/components/navigation/Tabs/TabButton.js +1 -1
  200. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  201. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  202. package/dist/components/navigation/Tabs/TabPicker.js +1 -1
  203. package/dist/components/navigation/Tabs/Tabs.js +1 -1
  204. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  205. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  206. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  207. package/dist/components/navigation/Tabs/styled.js +1 -1
  208. package/dist/components/navigation/Tabs/types.js +1 -1
  209. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  210. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  211. package/dist/components/organisms/FileTabs/FileTabs.js +1 -1
  212. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  213. package/dist/components/other/Calendar/Calendar.js +1 -1
  214. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  215. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  216. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  217. package/dist/components/other/CloudLogo/CloudLogo.js +1 -1
  218. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  219. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  220. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  221. package/dist/components/overlays/Dialog/Dialog.js +1 -1
  222. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  223. package/dist/components/overlays/Dialog/DialogForm.js +1 -1
  224. package/dist/components/overlays/Dialog/DialogTrigger.js +2 -2
  225. package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
  226. package/dist/components/overlays/Dialog/context.js +1 -1
  227. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  228. package/dist/components/overlays/Modal/Modal.js +1 -1
  229. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  230. package/dist/components/overlays/Modal/Overlay.js +1 -1
  231. package/dist/components/overlays/Modal/Popover.js +1 -1
  232. package/dist/components/overlays/Modal/Tray.js +1 -1
  233. package/dist/components/overlays/Modal/Underlay.js +1 -1
  234. package/dist/components/overlays/Notifications/Notification.js +1 -1
  235. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  236. package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
  237. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  238. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  239. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  240. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  241. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
  242. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  243. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  244. package/dist/components/overlays/Notifications/index.js +1 -1
  245. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  246. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  247. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  248. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  249. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  250. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  251. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  252. package/dist/components/overlays/Toast/index.js +1 -1
  253. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  254. package/dist/components/overlays/Toast/useToast.js +1 -1
  255. package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
  256. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  257. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  258. package/dist/components/overlays/Tooltip/context.js +1 -1
  259. package/dist/components/portal/Portal.js +1 -1
  260. package/dist/components/portal/PortalProvider.js +1 -1
  261. package/dist/components/portal/usePortal.js +1 -1
  262. package/dist/components/shared/DraggableCollection.js +1 -1
  263. package/dist/components/shared/InvalidIcon.js +1 -1
  264. package/dist/components/shared/ValidIcon.js +1 -1
  265. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
  266. package/dist/components/status/Spin/Cube.js +1 -1
  267. package/dist/components/status/Spin/InternalSpinner.js +1 -1
  268. package/dist/components/status/Spin/Spin.js +1 -1
  269. package/dist/components/status/Spin/SpinsContainer.js +1 -1
  270. package/dist/data/item-themes.js +3 -5
  271. package/dist/data/item-themes.js.map +1 -1
  272. package/dist/data/themes.js +1 -1
  273. package/dist/i18n/I18nProvider.js +1 -1
  274. package/dist/i18n/createFormatter.js +1 -1
  275. package/dist/i18n/index.js +1 -1
  276. package/dist/i18n/instance.js +1 -1
  277. package/dist/i18n/locales/de-DE/uikit.js +1 -1
  278. package/dist/i18n/locales/en-US/uikit.js +1 -1
  279. package/dist/i18n/locales/es-ES/uikit.js +1 -1
  280. package/dist/i18n/locales/es-MX/uikit.js +1 -1
  281. package/dist/i18n/locales/fr-FR/uikit.js +1 -1
  282. package/dist/i18n/locales/it-IT/uikit.js +1 -1
  283. package/dist/i18n/locales/ja-JP/uikit.js +1 -1
  284. package/dist/i18n/locales/nb-NO/uikit.js +1 -1
  285. package/dist/i18n/locales/pt-BR/uikit.js +1 -1
  286. package/dist/i18n/locales/pt-PT/uikit.js +1 -1
  287. package/dist/i18n/locales/sv-SE/uikit.js +1 -1
  288. package/dist/i18n/locales/vi-VN/uikit.js +1 -1
  289. package/dist/i18n/locales.js +1 -1
  290. package/dist/i18n/useFormatter.js +1 -1
  291. package/dist/i18n/useI18n.js +1 -1
  292. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  293. package/dist/icons/AdjustmentsIcon.js +1 -1
  294. package/dist/icons/AiIcon.js +1 -1
  295. package/dist/icons/AreaChartIcon.js +1 -1
  296. package/dist/icons/BackwardIcon.js +1 -1
  297. package/dist/icons/BarChartIcon.js +1 -1
  298. package/dist/icons/BellFilledIcon.js +1 -1
  299. package/dist/icons/BellIcon.js +1 -1
  300. package/dist/icons/BooleanIcon.js +1 -1
  301. package/dist/icons/CalendarEditIcon.js +1 -1
  302. package/dist/icons/CalendarIcon.js +1 -1
  303. package/dist/icons/CaretDownIcon.js +1 -1
  304. package/dist/icons/CaretUpIcon.js +1 -1
  305. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  306. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  307. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  308. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  309. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  310. package/dist/icons/ChartBarLineIcon.js +1 -1
  311. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  312. package/dist/icons/ChartBarStackedIcon.js +1 -1
  313. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  314. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  315. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  316. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  317. package/dist/icons/ChartBubbleIcon.js +1 -1
  318. package/dist/icons/ChartDonut2Icon.js +1 -1
  319. package/dist/icons/ChartFunnelIcon.js +1 -1
  320. package/dist/icons/ChartHeatmapIcon.js +1 -1
  321. package/dist/icons/ChartKPIIcon.js +1 -1
  322. package/dist/icons/ChartPie2Icon.js +1 -1
  323. package/dist/icons/ChartScatterIcon.js +1 -1
  324. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  325. package/dist/icons/CheckCircleIcon.js +1 -1
  326. package/dist/icons/CheckIcon.js +1 -1
  327. package/dist/icons/CircleFilledIcon.js +1 -1
  328. package/dist/icons/ClearIcon.js +1 -1
  329. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  330. package/dist/icons/CloseCircleIcon.js +1 -1
  331. package/dist/icons/CloseIcon.js +1 -1
  332. package/dist/icons/CodeIcon.js +1 -1
  333. package/dist/icons/ColumnTotalIcon.js +1 -1
  334. package/dist/icons/CopyIcon.js +1 -1
  335. package/dist/icons/CountIcon.js +1 -1
  336. package/dist/icons/CubeIcon.js +1 -1
  337. package/dist/icons/CubePauseIcon.js +1 -1
  338. package/dist/icons/CubePlayIcon.js +1 -1
  339. package/dist/icons/CurrencyDollarIcon.js +1 -1
  340. package/dist/icons/DangerIcon.js +1 -1
  341. package/dist/icons/DashboardIcon.js +1 -1
  342. package/dist/icons/DatabaseIcon.js +1 -1
  343. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  344. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  345. package/dist/icons/DirectionIcon.js +1 -1
  346. package/dist/icons/DonutIcon.js +1 -1
  347. package/dist/icons/DownIcon.js +1 -1
  348. package/dist/icons/EditIcon.js +1 -1
  349. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  350. package/dist/icons/ExclamationCircleIcon.js +1 -1
  351. package/dist/icons/ExclamationIcon.js +1 -1
  352. package/dist/icons/EyeIcon.js +1 -1
  353. package/dist/icons/EyeInvisibleIcon.js +1 -1
  354. package/dist/icons/FilterIcon.js +1 -1
  355. package/dist/icons/FolderFilledIcon.js +1 -1
  356. package/dist/icons/FolderIcon.js +1 -1
  357. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  358. package/dist/icons/FolderOpenIcon.js +1 -1
  359. package/dist/icons/ForwardIcon.js +1 -1
  360. package/dist/icons/GripVerticalIcon.js +1 -1
  361. package/dist/icons/HierarchyIcon.js +1 -1
  362. package/dist/icons/HierarchyOpenIcon.js +1 -1
  363. package/dist/icons/Icon.js +1 -1
  364. package/dist/icons/InfoCircleIcon.js +1 -1
  365. package/dist/icons/InfoIcon.js +1 -1
  366. package/dist/icons/KeyIcon.js +1 -1
  367. package/dist/icons/LeftIcon.js +1 -1
  368. package/dist/icons/LineChartIcon.js +1 -1
  369. package/dist/icons/LoadingIcon.js +1 -1
  370. package/dist/icons/LockFilledIcon.js +1 -1
  371. package/dist/icons/LockIcon.js +1 -1
  372. package/dist/icons/MoreIcon.js +1 -1
  373. package/dist/icons/NotAllowedIcon.js +1 -1
  374. package/dist/icons/Number123Icon.js +1 -1
  375. package/dist/icons/NumberIcon.js +1 -1
  376. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  377. package/dist/icons/PauseCircleIcon.js +1 -1
  378. package/dist/icons/PauseIcon.js +1 -1
  379. package/dist/icons/PercentageIcon.js +1 -1
  380. package/dist/icons/PieChartIcon.js +1 -1
  381. package/dist/icons/PlayCircleIcon.js +1 -1
  382. package/dist/icons/PlayIcon.js +1 -1
  383. package/dist/icons/PlusIcon.js +1 -1
  384. package/dist/icons/ProgressBarIcon.js +1 -1
  385. package/dist/icons/ReloadIcon.js +1 -1
  386. package/dist/icons/ReportIcon.js +1 -1
  387. package/dist/icons/ReturnIcon.js +1 -1
  388. package/dist/icons/RightIcon.js +1 -1
  389. package/dist/icons/RowTotalsIcon.js +1 -1
  390. package/dist/icons/SchemeIcon.js +1 -1
  391. package/dist/icons/SearchIcon.js +1 -1
  392. package/dist/icons/SemanticQueryIcon.js +1 -1
  393. package/dist/icons/SettingsIcon.js +1 -1
  394. package/dist/icons/ShieldFilledIcon.js +1 -1
  395. package/dist/icons/ShieldIcon.js +1 -1
  396. package/dist/icons/SlashIcon.js +1 -1
  397. package/dist/icons/SparklesIcon.js +1 -1
  398. package/dist/icons/SqlIcon.js +1 -1
  399. package/dist/icons/StatsIcon.js +1 -1
  400. package/dist/icons/StopIcon.js +1 -1
  401. package/dist/icons/StringIcon.js +1 -1
  402. package/dist/icons/SubtotalsIcon.js +1 -1
  403. package/dist/icons/SwitchIcon.js +1 -1
  404. package/dist/icons/TableIcon.js +1 -1
  405. package/dist/icons/ThumbsDownIcon.js +1 -1
  406. package/dist/icons/ThumbsUpIcon.js +1 -1
  407. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  408. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  409. package/dist/icons/ThunderboltIcon.js +1 -1
  410. package/dist/icons/TimeIcon.js +1 -1
  411. package/dist/icons/TrashIcon.js +1 -1
  412. package/dist/icons/UnlockIcon.js +1 -1
  413. package/dist/icons/UpIcon.js +1 -1
  414. package/dist/icons/UserGroupIcon.js +1 -1
  415. package/dist/icons/UserIcon.js +1 -1
  416. package/dist/icons/UserLockIcon.js +1 -1
  417. package/dist/icons/ViewIcon.js +1 -1
  418. package/dist/icons/WarningFilledIcon.js +1 -1
  419. package/dist/icons/WarningIcon.js +1 -1
  420. package/dist/icons/wrap-icon.js +1 -1
  421. package/dist/index.d.ts +3 -4
  422. package/dist/index.js +4 -5
  423. package/dist/index.js.map +1 -1
  424. package/dist/provider.js +1 -1
  425. package/dist/providers/TrackingProvider.js +1 -1
  426. package/dist/providers/navigationAdapter.default.js +1 -1
  427. package/dist/tokens/base.js +1 -1
  428. package/dist/tokens/colors.d.ts +7 -2
  429. package/dist/tokens/colors.js +8 -16
  430. package/dist/tokens/colors.js.map +1 -1
  431. package/dist/tokens/index.d.ts +17 -5
  432. package/dist/tokens/index.js +13 -23
  433. package/dist/tokens/index.js.map +1 -1
  434. package/dist/tokens/layout.js +1 -1
  435. package/dist/tokens/palette.js +126 -169
  436. package/dist/tokens/palette.js.map +1 -1
  437. package/dist/tokens/shadows.js +1 -1
  438. package/dist/tokens/sizes.js +1 -1
  439. package/dist/tokens/spacing.js +1 -1
  440. package/dist/tokens/typography.d.ts +0 -1
  441. package/dist/tokens/typography.js +1 -29
  442. package/dist/tokens/typography.js.map +1 -1
  443. package/dist/utils/ResizeSensor.js +1 -1
  444. package/dist/utils/is-dev-env.js +1 -1
  445. package/dist/utils/modules.js +1 -1
  446. package/dist/utils/promise.js +1 -1
  447. package/dist/utils/raf.js +1 -1
  448. package/dist/utils/random.js +1 -1
  449. package/dist/utils/range.js +1 -1
  450. package/dist/utils/react/RenderCache.js +1 -1
  451. package/dist/utils/react/Slots.js +1 -1
  452. package/dist/utils/react/chain.js +1 -1
  453. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  454. package/dist/utils/react/index.js +1 -1
  455. package/dist/utils/react/interactions.js +1 -1
  456. package/dist/utils/react/isTextOnly.js +1 -1
  457. package/dist/utils/react/mapProps.js +1 -1
  458. package/dist/utils/react/mergeProps.js +1 -1
  459. package/dist/utils/react/nullableValue.js +1 -1
  460. package/dist/utils/react/resolveIcon.js +1 -1
  461. package/dist/utils/react/sharedStore.js +1 -1
  462. package/dist/utils/react/useCombinedRefs.js +1 -1
  463. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  464. package/dist/utils/react/useEventBus.js +1 -1
  465. package/dist/utils/react/useId.js +1 -1
  466. package/dist/utils/react/useIsDarwin.js +1 -1
  467. package/dist/utils/react/useKeySymbols.js +1 -1
  468. package/dist/utils/react/useLayoutEffect.js +1 -1
  469. package/dist/utils/react/useLocalStorage.js +1 -1
  470. package/dist/utils/react/useMergeStyles.js +1 -1
  471. package/dist/utils/react/usePopoverSync.js +1 -1
  472. package/dist/utils/react/useQaProps.js +1 -1
  473. package/dist/utils/react/useViewportSize.js +1 -1
  474. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  475. package/dist/utils/selection.js +1 -1
  476. package/dist/utils/styles.js +1 -1
  477. package/dist/utils/tree.js +1 -1
  478. package/dist/utils/warnings.js +1 -1
  479. package/dist/version.js +2 -2
  480. package/docs/Typography.md +1 -1
  481. package/docs/Usage.md +0 -10
  482. package/docs/components/content/CopySnippet.md +1 -1
  483. package/docs/components/content/PrismCode.md +0 -1
  484. package/docs/glaze/api.md +414 -1033
  485. package/docs/glaze/methodology.md +208 -536
  486. package/docs/glaze/migration.md +49 -127
  487. package/package.json +3 -3
  488. package/dist/tokens/lazy-styles.js +0 -33
  489. package/dist/tokens/lazy-styles.js.map +0 -1
  490. package/dist/tokens/palette.d.ts +0 -15
  491. package/docs/Colors.md +0 -77
  492. package/docs/glaze/okhst.md +0 -190
@@ -1,664 +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;
115
-
116
- glaze.configure({
117
- states: { dark: '@dark', highContrast: '@hc' },
118
- modes: { dark: true, highContrast: true },
119
- });
120
27
  ```
121
28
 
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.
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.
125
30
 
126
- ### When dark needs its own chroma
31
+ ## Global `glaze.configure()`
127
32
 
128
- Dark schemes get a flat `darkDesaturation` haircut (10% by default), which is
129
- enough for most palettes. Reach for a second seed only when dark is wrong in a
130
- way a uniform reduction cannot fix — a hue that reads muddy against dark
131
- surfaces, or an accent that stays gaudy no matter how much you dial the global
132
- knob:
33
+ Configure state aliases and output modes once at module load:
133
34
 
134
35
  ```ts
135
- const primary = glaze({
136
- hue: PURPLE_HUE,
137
- saturation: SEED_SATURATION,
138
- darkHue: PURPLE_HUE - 12, // cooler purple on dark surfaces
139
- darkSaturation: 62, // calmer than a 10% haircut would give
36
+ glaze.configure({
37
+ states: { dark: '@dark', highContrast: '@hc' },
38
+ modes: { dark: true, highContrast: true },
140
39
  });
141
40
  ```
142
41
 
143
- An explicit `darkSaturation` replaces `darkDesaturation` rather than stacking
144
- with it, so the number you write is the number you get. Prefer tuning the seed
145
- over per-color `darkHue` / `darkSaturation`: one seed keeps the palette
146
- coherent, while scattered per-color dark overrides drift apart as the palette
147
- grows. Save the per-color form for the one or two tokens that genuinely need it.
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.
148
43
 
149
- ## Naming
44
+ ## Naming conventions
150
45
 
151
- Prefer purpose first and variant last:
46
+ A tight, predictable vocabulary that the rest of the doc relies on:
152
47
 
153
- - Surfaces: `surface`, `surface-2`, `surface-3`.
154
- - Foregrounds: `surface-text`, `surface-text-soft`, `surface-text-soft-2`.
155
- - Structure: `border`, `divider`, `outline`, `placeholder`, `focus`.
156
- - Fills: `accent-surface`, `accent-surface-2`,
157
- `accent-surface-hover`.
158
- - Foregrounds on neutral surfaces: `accent-text`, `accent-text-soft`,
159
- `accent-icon`.
160
- - Disabled states: `disabled-surface`, `disabled-surface-text`,
161
- `accent-disabled-surface`, `accent-disabled-surface-text`.
162
- - 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` |
163
63
 
164
- These names are not only readable. They also help APCA role inference pick the
165
- right polarity. For example, `button-text` is foreground, `input-bg` is a
166
- surface, and `card-outline` is a border.
64
+ **Rule of thumb:** *purpose-name first, variant suffix last* (`-2`, `-text`, `-soft`, `-hover`, `-disabled`).
167
65
 
168
- ## Build the default theme
66
+ ## Surfaces (root colors)
169
67
 
170
- Start with the surface family. It is mostly tone, with small saturation changes
171
- 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:
172
69
 
173
70
  ```ts
174
- const defaultTheme = glaze(PURPLE_HUE, SEED_SATURATION);
175
-
176
71
  defaultTheme.colors({
177
- surface: { tone: 100, saturation: 0.11 },
178
- 'surface-2': {
179
- base: 'surface',
180
- tone: '-2',
181
- saturation: 0.15,
182
- inherit: false,
183
- },
184
- 'surface-3': {
185
- base: 'surface',
186
- tone: '-4',
187
- saturation: 0.19,
188
- inherit: false,
189
- },
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 },
190
75
  });
191
76
  ```
192
77
 
193
- Because each tone delta re-anchors to the resolved surface in every scheme,
194
- these small relative offsets are enough to define the ladder. There is no
195
- 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.
79
+
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.
196
81
 
197
- ### Text and borders
82
+ ## Text on surfaces (anchor at the edge)
198
83
 
199
- Use a hard edge tone for maximum-prominence text, and APCA floors for softer
200
- content:
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`**.
201
85
 
202
86
  ```ts
203
- defaultTheme.colors({
204
- 'surface-text': {
205
- base: 'surface',
206
- tone: 2,
207
- saturation: 0.475,
208
- },
209
- 'surface-text-soft': {
210
- base: 'surface',
211
- tone: '-1',
212
- saturation: 0.375,
213
- contrast: { apca: ['content', 'body'] },
214
- inherit: false,
215
- },
216
- 'surface-text-soft-2': {
217
- base: 'surface',
218
- tone: '-1',
219
- saturation: 0.24,
220
- contrast: { apca: ['large', 'content'] },
221
- inherit: false,
222
- },
223
- border: {
224
- base: 'surface',
225
- tone: ['-10', '-20'],
226
- saturation: 0.175,
227
- inherit: false,
228
- },
229
- });
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
+ },
230
98
  ```
231
99
 
232
- `surface-text` uses an absolute `tone: 2` despite having a base: it is
233
- intentionally edge-anchored, and the base records the relationship used by
234
- role inference. The soft variants use a `-1` tone delta as the preferred
235
- direction and APCA as the readable floor. `border` uses an HC tone-delta pair
236
- 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.
103
+
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.
237
105
 
238
- Repeat the same pattern for `surface-2` and `surface-3` only if components need
239
- text directly on those surfaces.
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).
240
107
 
241
- ### Neutral utility tokens
108
+ ## Other neutral primitives
242
109
 
243
- Keep neutral-only primitives local to the default theme:
110
+ Borders, placeholders, focus rings, and the floating "muted text" lightness — all default-only:
244
111
 
245
112
  ```ts
246
- defaultTheme.colors({
247
- placeholder: {
248
- base: 'surface',
249
- tone: 67,
250
- saturation: 0.175,
251
- inherit: false,
252
- },
253
- focus: {
254
- base: 'surface',
255
- tone: 71,
256
- saturation: 0.8625,
257
- inherit: false,
258
- },
259
- disabled: {
260
- tone: 80.8,
261
- saturation: 0.4,
262
- inherit: false,
263
- },
264
- });
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 },
265
117
  ```
266
118
 
267
- Absolute tones are fine for primitives whose job is visual placement rather than
268
- 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.
269
120
 
270
- ## Chips and disabled states
121
+ ## Disabled chip (contrast-driven for scheme symmetry)
271
122
 
272
- 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'`:
273
124
 
274
125
  ```ts
275
- defaultTheme.colors({
276
- 'disabled-surface': {
277
- base: 'surface',
278
- tone: '-3',
279
- saturation: 0.2,
280
- inherit: false,
281
- },
282
- 'disabled-surface-text': {
283
- base: 'disabled-surface',
284
- tone: '+18',
285
- saturation: 0.3,
286
- autoFlip: false,
287
- inherit: false,
288
- },
289
- });
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
+ },
290
134
  ```
291
135
 
292
- This says exactly what the pair should do: the chip sits a small tone delta off
293
- the page, and the label sits a muted delta from the chip. `autoFlip: false`
294
- 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.
137
+
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.
295
139
 
296
- Use contrast instead when the chip must hit an explicit accessibility floor:
140
+ ## `surface-inverse` (the fixed-mode escape hatch)
297
141
 
298
142
  ```ts
299
- defaultTheme.colors({
300
- 'disabled-surface-text': {
301
- base: 'disabled-surface',
302
- tone: '+1',
303
- saturation: 0.3,
304
- contrast: { apca: 'non-text' },
305
- inherit: false,
306
- },
307
- });
143
+ 'surface-inverse': {
144
+ lightness: 12, saturation: 0.475, mode: 'fixed', inherit: false,
145
+ },
308
146
  ```
309
147
 
310
- When a token needs the scheme extreme, use `tone: 'min'` or `tone: 'max'`
311
- directly. Avoid large magic numbers or fake contrast floors just to push a color
312
- 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.
313
149
 
314
- Pair the extreme with a `base` when the gap between the two has to survive the
315
- scheme switch. Glaze then replays the light-scheme tone shift against the
316
- resolved dark base instead of re-mapping the extreme through the dark window,
317
- so a knockout on a surface keeps the same contrast in both schemes.
150
+ Use it for tooltips, code blocks, popovers with their own dark theme. Pair with `#white` for foreground text.
318
151
 
319
- ## 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.
320
153
 
321
- Use `mode: 'fixed'` when the authored color should stay recognizable across
322
- 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'`:
323
157
 
324
158
  ```ts
325
- defaultTheme.colors({
326
- 'surface-inverse': {
327
- tone: 12,
328
- saturation: 0.475,
329
- mode: 'fixed',
330
- inherit: false,
331
- },
332
-
333
- 'accent-surface-text': {
334
- tone: 100,
335
- mode: 'fixed',
336
- },
337
- 'accent-surface': {
338
- base: 'accent-surface-text',
339
- tone: '-1',
340
- contrast: { apca: ['content', 'body'] },
341
- mode: 'fixed',
342
- },
343
- 'accent-surface-2': {
344
- base: 'accent-surface-text',
345
- tone: '-1',
346
- contrast: { apca: [65, 80] },
347
- mode: 'fixed',
348
- },
349
- 'accent-surface-hover': {
350
- base: 'accent-surface-text',
351
- tone: '-1',
352
- contrast: { apca: ['body', 'preferred'] },
353
- mode: 'fixed',
354
- },
355
- });
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' },
356
165
  ```
357
166
 
358
- The accent fill family is a fixed chain against a fixed text anchor. The names
359
- infer `surface` and `text` roles, so APCA gets the right polarity without extra
360
- 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.
361
174
 
362
175
  ## Adaptive accent foregrounds
363
176
 
364
- 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:
365
178
 
366
179
  ```ts
367
- defaultTheme.colors({
368
- 'accent-text': {
369
- base: 'surface',
370
- tone: '-1',
371
- saturation: 1,
372
- contrast: { apca: ['content', 'body'] },
373
- },
374
- 'accent-text-soft': {
375
- base: 'surface',
376
- tone: '-1',
377
- saturation: 1,
378
- contrast: { apca: ['large', 'content'] },
379
- },
380
- 'accent-icon': {
381
- base: 'surface',
382
- tone: '-1',
383
- saturation: 0.9375,
384
- contrast: { apca: ['non-text', 'large'] },
385
- },
386
- });
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] },
387
183
  ```
388
184
 
389
- Anchor these to `surface`, not to `accent-surface`. Their real job is to remain
390
- readable on neutral UI, so `mode: 'auto'` and a surface base are the right
391
- 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.
392
188
 
393
- 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:
394
192
 
395
193
  ```ts
396
- defaultTheme.colors({
397
- 'accent-disabled-surface': {
398
- base: 'surface',
399
- tone: '+3',
400
- saturation: 0.5,
401
- },
402
- 'accent-disabled-surface-text': {
403
- base: 'accent-disabled-surface',
404
- tone: '+18',
405
- saturation: 0.4,
406
- autoFlip: false,
407
- },
408
- });
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
+ },
409
202
  ```
410
203
 
411
- These are inherited, so status themes automatically get
412
- `success-accent-disabled-surface`, `danger-accent-disabled-surface`, and the
413
- 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.
414
207
 
415
- ## Special-purpose colors
208
+ ## Per-color hue overrides (code highlighting)
416
209
 
417
- Use absolute `hue` overrides for tokens that should come from another hue family
418
- 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:
419
211
 
420
212
  ```ts
421
- defaultTheme.colors({
422
- 'code-comment': {
423
- base: 'surface',
424
- hue: 280,
425
- saturation: 0.1,
426
- tone: '-1',
427
- contrast: { apca: ['large', 'content'] },
428
- inherit: false,
429
- },
430
- 'code-keyword': {
431
- base: 'surface',
432
- hue: 348,
433
- saturation: 1,
434
- tone: '-1',
435
- contrast: { apca: ['content', 'body'] },
436
- inherit: false,
437
- },
438
- 'code-string': {
439
- base: 'surface',
440
- hue: SUCCESS_HUE,
441
- saturation: 1,
442
- tone: '-1',
443
- contrast: { apca: ['large', 'content'] },
444
- inherit: false,
445
- },
446
- });
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
447
217
  ```
448
218
 
449
- 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:
450
224
 
451
225
  ```ts
452
- defaultTheme.colors({
453
- 'loading-face-1': {
454
- base: 'surface',
455
- tone: 98,
456
- saturation: 0.3,
457
- inherit: false,
458
- },
459
- 'loading-face-2': {
460
- base: 'surface',
461
- tone: 91,
462
- saturation: 0.62,
463
- inherit: false,
464
- },
465
- 'loading-face-3': {
466
- base: 'surface',
467
- tone: 79,
468
- saturation: 0.66,
469
- inherit: false,
470
- },
471
- });
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 },
472
229
  ```
473
230
 
474
- Since tone steps now invert consistently across schemes, the same ramp keeps its
475
- spacing in light and dark without involving the contrast solver. Use an HC tone
476
- 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.
477
232
 
478
- ## Effects
233
+ ## Shadows
479
234
 
480
- Define one neutral shadow system:
235
+ Three sizes, all sharing `bg: 'surface'` and `fg: 'surface-text'`, varying only `intensity`:
481
236
 
482
237
  ```ts
483
- defaultTheme.colors({
484
- 'shadow-sm': {
485
- type: 'shadow',
486
- bg: 'surface',
487
- fg: 'surface-text',
488
- intensity: 5,
489
- inherit: false,
490
- },
491
- 'shadow-md': {
492
- type: 'shadow',
493
- bg: 'surface',
494
- fg: 'surface-text',
495
- intensity: [10, 20],
496
- inherit: false,
497
- },
498
- 'shadow-lg': {
499
- type: 'shadow',
500
- bg: 'surface',
501
- fg: 'surface-text',
502
- intensity: [15, 30],
503
- inherit: false,
504
- },
505
- });
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 },
506
241
  ```
507
242
 
508
- Including `fg` lets shadow strength follow the resolved foreground/background
509
- 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).
510
246
 
511
- Use `opacity` for one fixed-alpha color:
247
+ ## Overlay (fixed opacity)
512
248
 
513
249
  ```ts
514
- defaultTheme.colors({
515
- overlay: { tone: 10, opacity: 0.5, inherit: false },
516
- });
250
+ overlay: { lightness: 10, opacity: 0.5, inherit: false },
517
251
  ```
518
252
 
519
- 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:
520
258
 
521
259
  ```ts
522
- defaultTheme.colors({
523
- hover: {
524
- type: 'mix',
525
- base: 'surface',
526
- target: 'accent-surface',
527
- value: 8,
528
- blend: 'transparent',
529
- },
530
- tint: {
531
- type: 'mix',
532
- base: 'surface',
533
- target: 'accent-surface',
534
- value: 20,
535
- },
536
- });
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
+ },
537
270
  ```
538
271
 
539
- Transparent mixes are good for hover overlays. Opaque mixes are good for solid
540
- tints. Opaque mixes default to perceptual OKHSL interpolation; choose `srgb`
541
- when matching channel compositing matters. Transparent mixes always composite
542
- in linear sRGB. Mix colors can also use `contrast`; the solver adjusts the
543
- 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.
544
276
 
545
- ## Extend into status themes
277
+ ## Colored sibling themes via `extend()`
546
278
 
547
- Once the default theme is shaped, create colored siblings by replacing hue and
548
- 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:
549
280
 
550
281
  ```ts
551
- const TINTED_SURFACE_OVERRIDE = {
552
- surface: { tone: 96, saturation: 0.8 },
282
+ const TINTED_SURFACE_OVERRIDE: ColorMap = {
283
+ surface: { lightness: 96, saturation: 0.8 },
553
284
  };
554
285
 
555
- const primaryTheme = defaultTheme.extend({
556
- colors: TINTED_SURFACE_OVERRIDE,
557
- });
558
- const successTheme = defaultTheme.extend({
559
- hue: SUCCESS_HUE,
560
- colors: TINTED_SURFACE_OVERRIDE,
561
- });
562
- const dangerTheme = defaultTheme.extend({
563
- hue: DANGER_HUE,
564
- colors: TINTED_SURFACE_OVERRIDE,
565
- });
566
- const warningTheme = defaultTheme.extend({
567
- hue: WARNING_HUE,
568
- colors: TINTED_SURFACE_OVERRIDE,
569
- });
570
- const noteTheme = defaultTheme.extend({
571
- hue: NOTE_HUE,
572
- colors: TINTED_SURFACE_OVERRIDE,
573
- });
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 });
574
291
  ```
575
292
 
576
- The inherited accent and disabled tokens now resolve in each status hue. Tokens
577
- 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.
578
294
 
579
- ## 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.
580
296
 
581
- Compose the themes once:
297
+ ## Palette composition
298
+
299
+ Compose all themes into a palette so they can be exported as one token set:
582
300
 
583
301
  ```ts
584
302
  const palette = glaze.palette({
585
303
  default: defaultTheme,
586
304
  primary: primaryTheme,
587
305
  success: successTheme,
588
- danger: dangerTheme,
306
+ danger: dangerTheme,
589
307
  warning: warningTheme,
590
- note: noteTheme,
308
+ note: noteTheme,
591
309
  });
592
310
  ```
593
311
 
594
- The usual export shape is default unprefixed and status themes prefixed:
595
-
596
- ```ts
597
- const prefix = {
598
- default: '',
599
- primary: 'primary-',
600
- success: 'success-',
601
- danger: 'danger-',
602
- warning: 'warning-',
603
- note: 'note-',
604
- };
605
-
606
- palette.tasty({ prefix });
607
- ```
608
-
609
- An explicit prefix map is the clearest choice when the palette has a neutral
610
- `default` theme. The separate palette `primary` option serves another pattern:
611
- it duplicates one named theme without a prefix while retaining its prefixed
612
- tokens. Do not combine the two accidentally; choose the token namespace your
613
- components expect.
614
-
615
- The palette design is independent of the exporter:
616
-
617
- ```ts
618
- palette.tokens({ prefix }); // JavaScript maps, native oklch by default
619
- palette.css({ prefix }); // CSS custom-property declarations
620
- palette.dtcg({ prefix }); // one design-token tree per scheme
621
- palette.tailwind({ prefix }); // Tailwind CSS v4 theme
622
- ```
623
-
624
- Use `palette.tasty({ prefix })` for [Tasty](https://tasty.style) state bindings. See
625
- [migration.md](migration.md#choosing-an-export) for output shapes, application
626
- wiring, and the `primary` alias pattern.
627
-
628
- ## 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.
629
313
 
630
- High contrast is not a separate palette. Any value that accepts an HC pair can
631
- tighten the HC variant: `tone`, `contrast`, shadow `intensity`, and mix `value`.
314
+ ## High-contrast strategy
632
315
 
633
- 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:
634
317
 
635
- - Text/content contrast: `{ apca: ['content', 'body'] }`.
636
- - Accent fills: `{ apca: ['content', 'body'] }` or stronger.
637
- - Borders: `tone: ['-10', '-20']`.
638
- - Shadows: `intensity: [10, 20]`.
639
- - 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']`).
640
323
 
641
- In HC variants, Glaze bypasses the normal tone window and uses the full
642
- `[0, 100]` range. Edge tones can reach the edge; contrast floors have more room
643
- 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.
644
325
 
645
- ## Checklist
326
+ ## Closing checklist
646
327
 
647
328
  Before shipping a palette, verify:
648
329
 
649
- - Text, icon, and content tokens either have APCA/WCAG contrast or are
650
- deliberately edge-anchored.
651
- - Accent fills use `mode: 'fixed'`; accent foregrounds on neutral UI stay
652
- `mode: 'auto'` and are based on `surface`.
653
- - Ambiguous APCA tokens have an explicit `role`; obvious names rely on inference.
654
- - Low-stakes visual relationships use tone deltas instead of fake contrast
655
- floors.
656
- - `inherit: false` is set on default-only tokens so status themes stay focused.
657
- - HC pairs exist where high contrast should visibly tighten.
658
- - `glaze.configure({ states, modes })` matches the states registered in the app.
659
- - Every emitted scheme (`light`, `dark`, `lightContrast`, `darkContrast`) has
660
- been reviewed on complete screens, not only in a token grid.
661
- - Rendered WCAG/APCA results have been checked for chromatic foreground/base
662
- pairs that carry accessibility requirements.
663
- - Resolution emits no unexplained unreachable-contrast or token-collision
664
- 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.