@dxos/ui-theme 0.8.4-main.fbb7a13 → 0.8.4-staging.ac66bdf99f

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 (384) hide show
  1. package/dist/lib/browser/index.mjs +766 -2802
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +766 -2802
  5. package/dist/lib/node-esm/index.mjs.map +4 -4
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/plugin/node-cjs/main.css +1529 -0
  8. package/dist/plugin/node-cjs/main.css.map +7 -0
  9. package/dist/plugin/node-cjs/meta.json +1 -1
  10. package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs +137 -0
  11. package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs.map +7 -0
  12. package/dist/plugin/node-esm/main.css +1529 -0
  13. package/dist/plugin/node-esm/main.css.map +7 -0
  14. package/dist/plugin/node-esm/meta.json +1 -1
  15. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs +105 -0
  16. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs.map +7 -0
  17. package/dist/types/src/Theme.stories.d.ts +27 -0
  18. package/dist/types/src/Theme.stories.d.ts.map +1 -0
  19. package/dist/types/src/defs.d.ts +21 -0
  20. package/dist/types/src/defs.d.ts.map +1 -0
  21. package/dist/types/src/fragments/density.d.ts +4 -0
  22. package/dist/types/src/fragments/density.d.ts.map +1 -0
  23. package/dist/types/src/fragments/disabled.d.ts.map +1 -0
  24. package/dist/types/src/fragments/hover.d.ts +10 -0
  25. package/dist/types/src/fragments/hover.d.ts.map +1 -0
  26. package/dist/types/src/fragments/index.d.ts +5 -0
  27. package/dist/types/src/fragments/index.d.ts.map +1 -0
  28. package/dist/types/src/fragments/text.d.ts +2 -0
  29. package/dist/types/src/fragments/text.d.ts.map +1 -0
  30. package/dist/types/src/index.d.ts +3 -10
  31. package/dist/types/src/index.d.ts.map +1 -1
  32. package/dist/types/src/plugins/ThemePlugin.d.ts +16 -0
  33. package/dist/types/src/plugins/ThemePlugin.d.ts.map +1 -0
  34. package/dist/types/src/plugins/dark-mode.d.ts +1 -0
  35. package/dist/types/src/plugins/dark-mode.d.ts.map +1 -0
  36. package/dist/types/src/theme/components/avatar.d.ts.map +1 -0
  37. package/dist/types/src/theme/components/breadcrumb.d.ts.map +1 -0
  38. package/dist/types/src/theme/components/button.d.ts +15 -0
  39. package/dist/types/src/theme/components/button.d.ts.map +1 -0
  40. package/dist/types/src/theme/components/card.d.ts +12 -0
  41. package/dist/types/src/theme/components/card.d.ts.map +1 -0
  42. package/dist/types/src/{styles → theme}/components/dialog.d.ts +2 -0
  43. package/dist/types/src/theme/components/dialog.d.ts.map +1 -0
  44. package/dist/types/src/theme/components/focus.d.ts +6 -0
  45. package/dist/types/src/theme/components/focus.d.ts.map +1 -0
  46. package/dist/types/src/theme/components/icon-button.d.ts.map +1 -0
  47. package/dist/types/src/{styles → theme}/components/icon.d.ts +3 -0
  48. package/dist/types/src/theme/components/icon.d.ts.map +1 -0
  49. package/dist/types/src/{styles → theme}/components/index.d.ts +4 -1
  50. package/dist/types/src/theme/components/index.d.ts.map +1 -0
  51. package/dist/types/src/{styles → theme}/components/input.d.ts +25 -21
  52. package/dist/types/src/theme/components/input.d.ts.map +1 -0
  53. package/dist/types/src/theme/components/link.d.ts.map +1 -0
  54. package/dist/types/src/theme/components/list.d.ts.map +1 -0
  55. package/dist/types/src/{styles → theme}/components/main.d.ts +2 -7
  56. package/dist/types/src/theme/components/main.d.ts.map +1 -0
  57. package/dist/types/src/{styles → theme}/components/menu.d.ts +1 -1
  58. package/dist/types/src/theme/components/menu.d.ts.map +1 -0
  59. package/dist/types/src/{styles → theme}/components/message.d.ts +1 -0
  60. package/dist/types/src/theme/components/message.d.ts.map +1 -0
  61. package/dist/types/src/{styles → theme}/components/popover.d.ts +1 -1
  62. package/dist/types/src/theme/components/popover.d.ts.map +1 -0
  63. package/dist/types/src/theme/components/scroll-area.d.ts +32 -0
  64. package/dist/types/src/theme/components/scroll-area.d.ts.map +1 -0
  65. package/dist/types/src/theme/components/select.d.ts.map +1 -0
  66. package/dist/types/src/theme/components/separator.d.ts.map +1 -0
  67. package/dist/types/src/theme/components/skeleton.d.ts +7 -0
  68. package/dist/types/src/theme/components/skeleton.d.ts.map +1 -0
  69. package/dist/types/src/theme/components/splitter.d.ts +4 -0
  70. package/dist/types/src/theme/components/splitter.d.ts.map +1 -0
  71. package/dist/types/src/{styles → theme}/components/status.d.ts +1 -1
  72. package/dist/types/src/theme/components/status.d.ts.map +1 -0
  73. package/dist/types/src/theme/components/tag.d.ts.map +1 -0
  74. package/dist/types/src/theme/components/toast.d.ts.map +1 -0
  75. package/dist/types/src/theme/components/toolbar.d.ts +11 -0
  76. package/dist/types/src/theme/components/toolbar.d.ts.map +1 -0
  77. package/dist/types/src/theme/components/tooltip.d.ts.map +1 -0
  78. package/dist/types/src/theme/components/treegrid.d.ts.map +1 -0
  79. package/dist/types/src/theme/index.d.ts +4 -0
  80. package/dist/types/src/theme/index.d.ts.map +1 -0
  81. package/dist/types/src/theme/primitives/column.d.ts +29 -0
  82. package/dist/types/src/theme/primitives/column.d.ts.map +1 -0
  83. package/dist/types/src/theme/primitives/index.d.ts +3 -0
  84. package/dist/types/src/theme/primitives/index.d.ts.map +1 -0
  85. package/dist/types/src/theme/primitives/panel.d.ts +13 -0
  86. package/dist/types/src/theme/primitives/panel.d.ts.map +1 -0
  87. package/dist/types/src/theme/theme.d.ts +5 -0
  88. package/dist/types/src/theme/theme.d.ts.map +1 -0
  89. package/dist/types/src/{styles/fragments → util}/elevation.d.ts +0 -6
  90. package/dist/types/src/util/elevation.d.ts.map +1 -0
  91. package/dist/types/src/util/hash-styles.d.ts +8 -5
  92. package/dist/types/src/util/hash-styles.d.ts.map +1 -1
  93. package/dist/types/src/util/index.d.ts +3 -0
  94. package/dist/types/src/util/index.d.ts.map +1 -1
  95. package/dist/types/src/util/mx.d.ts +36 -0
  96. package/dist/types/src/util/mx.d.ts.map +1 -1
  97. package/dist/types/src/util/size.d.ts +27 -0
  98. package/dist/types/src/util/size.d.ts.map +1 -0
  99. package/dist/types/src/util/valence.d.ts +4 -0
  100. package/dist/types/src/util/valence.d.ts.map +1 -0
  101. package/dist/types/tsconfig.tsbuildinfo +1 -1
  102. package/package.json +24 -27
  103. package/src/Theme.stories.tsx +224 -0
  104. package/src/css/base/base.css +43 -0
  105. package/src/{styles/layers → css/base}/typography.css +3 -5
  106. package/src/{styles/layers → css/components}/button.css +23 -14
  107. package/src/{styles/layers → css/components}/checkbox.css +12 -8
  108. package/src/{styles/layers → css/components}/dialog.css +16 -15
  109. package/src/{styles/layers/focus-ring.css → css/components/focus.css} +60 -41
  110. package/src/css/components/icon.css +9 -0
  111. package/src/css/components/link.css +9 -0
  112. package/src/css/components/panel.css +117 -0
  113. package/src/css/components/scrollbar.css +24 -0
  114. package/src/css/components/selected.css +30 -0
  115. package/src/css/components/surface.css +34 -0
  116. package/src/css/components/tag.css +130 -0
  117. package/src/css/components/text.css +124 -0
  118. package/src/css/integrations/codemirror.css +34 -0
  119. package/src/css/integrations/tldraw.css +14 -0
  120. package/src/css/layout/main.css +205 -0
  121. package/src/{styles/layers → css/layout}/native.css +6 -4
  122. package/src/css/layout/positioning.css +19 -0
  123. package/src/{styles/layers → css/layout}/size.css +117 -109
  124. package/src/css/theme/animation.css +229 -0
  125. package/src/css/theme/border.css +23 -0
  126. package/src/css/theme/palette.css +36 -0
  127. package/src/css/theme/semantic.css +116 -0
  128. package/src/css/theme/spacing.css +147 -0
  129. package/src/css/theme/styles.css +145 -0
  130. package/src/css/theme/text.css +37 -0
  131. package/src/css/utilities.css +76 -0
  132. package/src/defs.ts +48 -0
  133. package/src/fragments/AUDIT.md +57 -0
  134. package/src/fragments/density.ts +16 -0
  135. package/src/fragments/hover.ts +18 -0
  136. package/src/fragments/index.ts +10 -0
  137. package/src/fragments/text.ts +6 -0
  138. package/src/index.ts +3 -14
  139. package/src/main.css +87 -0
  140. package/src/plugins/ThemePlugin.ts +125 -0
  141. package/src/plugins/dark-mode.ts +22 -0
  142. package/src/plugins/main.css +45 -0
  143. package/src/{styles → theme}/components/avatar.ts +12 -13
  144. package/src/theme/components/button.ts +48 -0
  145. package/src/theme/components/card.ts +102 -0
  146. package/src/{styles → theme}/components/dialog.ts +19 -10
  147. package/src/theme/components/focus.ts +33 -0
  148. package/src/{styles → theme}/components/icon-button.ts +1 -3
  149. package/src/theme/components/icon.ts +28 -0
  150. package/src/{styles → theme}/components/index.ts +4 -1
  151. package/src/theme/components/input.ts +171 -0
  152. package/src/{styles → theme}/components/link.ts +3 -4
  153. package/src/{styles → theme}/components/list.ts +5 -5
  154. package/src/{styles → theme}/components/main.ts +2 -6
  155. package/src/{styles → theme}/components/menu.ts +11 -21
  156. package/src/{styles → theme}/components/message.ts +11 -7
  157. package/src/{styles → theme}/components/popover.ts +13 -12
  158. package/src/theme/components/scroll-area.ts +115 -0
  159. package/src/{styles → theme}/components/select.ts +8 -16
  160. package/src/{styles → theme}/components/separator.ts +3 -3
  161. package/src/theme/components/skeleton.ts +23 -0
  162. package/src/theme/components/splitter.ts +20 -0
  163. package/src/{styles → theme}/components/status.ts +7 -7
  164. package/src/{styles → theme}/components/tag.ts +1 -1
  165. package/src/{styles → theme}/components/toast.ts +6 -8
  166. package/src/theme/components/toolbar.ts +35 -0
  167. package/src/{styles → theme}/components/tooltip.ts +4 -6
  168. package/src/{styles → theme}/components/treegrid.ts +9 -9
  169. package/src/{styles → theme}/index.ts +2 -2
  170. package/src/theme/primitives/column.ts +71 -0
  171. package/src/theme/primitives/index.ts +6 -0
  172. package/src/theme/primitives/panel.ts +43 -0
  173. package/src/{styles → theme}/theme.ts +27 -9
  174. package/src/typings.d.ts +3 -1
  175. package/src/{styles/fragments → util}/elevation.ts +6 -8
  176. package/src/util/hash-styles.ts +118 -98
  177. package/src/util/index.ts +3 -0
  178. package/src/util/mx.ts +165 -43
  179. package/src/util/size.ts +103 -0
  180. package/src/util/valence.ts +33 -0
  181. package/dist/plugin/node-cjs/chunk-UUMDOU7E.cjs +0 -79
  182. package/dist/plugin/node-cjs/chunk-UUMDOU7E.cjs.map +0 -7
  183. package/dist/plugin/node-cjs/chunk-ZVALPM6U.cjs +0 -1619
  184. package/dist/plugin/node-cjs/chunk-ZVALPM6U.cjs.map +0 -7
  185. package/dist/plugin/node-cjs/config/tailwind.cjs +0 -29
  186. package/dist/plugin/node-cjs/config/tailwind.cjs.map +0 -7
  187. package/dist/plugin/node-cjs/plugins/esbuild-plugin.cjs +0 -90
  188. package/dist/plugin/node-cjs/plugins/esbuild-plugin.cjs.map +0 -7
  189. package/dist/plugin/node-cjs/plugins/plugin.cjs +0 -124
  190. package/dist/plugin/node-cjs/plugins/plugin.cjs.map +0 -7
  191. package/dist/plugin/node-cjs/theme.css +0 -1418
  192. package/dist/plugin/node-cjs/theme.css.map +0 -7
  193. package/dist/plugin/node-esm/chunk-AFRHJHP4.mjs +0 -49
  194. package/dist/plugin/node-esm/chunk-AFRHJHP4.mjs.map +0 -7
  195. package/dist/plugin/node-esm/chunk-HJE6EZWE.mjs +0 -1614
  196. package/dist/plugin/node-esm/chunk-HJE6EZWE.mjs.map +0 -7
  197. package/dist/plugin/node-esm/config/tailwind.mjs +0 -8
  198. package/dist/plugin/node-esm/config/tailwind.mjs.map +0 -7
  199. package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs +0 -63
  200. package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs.map +0 -7
  201. package/dist/plugin/node-esm/plugins/plugin.mjs +0 -98
  202. package/dist/plugin/node-esm/plugins/plugin.mjs.map +0 -7
  203. package/dist/plugin/node-esm/theme.css +0 -1418
  204. package/dist/plugin/node-esm/theme.css.map +0 -7
  205. package/dist/types/src/Tokens.stories.d.ts +0 -10
  206. package/dist/types/src/Tokens.stories.d.ts.map +0 -1
  207. package/dist/types/src/config/index.d.ts +0 -3
  208. package/dist/types/src/config/index.d.ts.map +0 -1
  209. package/dist/types/src/config/tailwind.d.ts +0 -9
  210. package/dist/types/src/config/tailwind.d.ts.map +0 -1
  211. package/dist/types/src/config/tokens/alias-colors.d.ts +0 -21
  212. package/dist/types/src/config/tokens/alias-colors.d.ts.map +0 -1
  213. package/dist/types/src/config/tokens/index.d.ts +0 -486
  214. package/dist/types/src/config/tokens/index.d.ts.map +0 -1
  215. package/dist/types/src/config/tokens/lengths.d.ts +0 -139
  216. package/dist/types/src/config/tokens/lengths.d.ts.map +0 -1
  217. package/dist/types/src/config/tokens/physical-colors.d.ts +0 -23
  218. package/dist/types/src/config/tokens/physical-colors.d.ts.map +0 -1
  219. package/dist/types/src/config/tokens/semantic-colors.d.ts +0 -187
  220. package/dist/types/src/config/tokens/semantic-colors.d.ts.map +0 -1
  221. package/dist/types/src/config/tokens/sememes-calls.d.ts +0 -3
  222. package/dist/types/src/config/tokens/sememes-calls.d.ts.map +0 -1
  223. package/dist/types/src/config/tokens/sememes-codemirror.d.ts +0 -43
  224. package/dist/types/src/config/tokens/sememes-codemirror.d.ts.map +0 -1
  225. package/dist/types/src/config/tokens/sememes-hue.d.ts +0 -4
  226. package/dist/types/src/config/tokens/sememes-hue.d.ts.map +0 -1
  227. package/dist/types/src/config/tokens/sememes-sheet.d.ts +0 -58
  228. package/dist/types/src/config/tokens/sememes-sheet.d.ts.map +0 -1
  229. package/dist/types/src/config/tokens/sememes-system.d.ts +0 -99
  230. package/dist/types/src/config/tokens/sememes-system.d.ts.map +0 -1
  231. package/dist/types/src/config/tokens/sizes.d.ts +0 -7
  232. package/dist/types/src/config/tokens/sizes.d.ts.map +0 -1
  233. package/dist/types/src/config/tokens/types.d.ts +0 -5
  234. package/dist/types/src/config/tokens/types.d.ts.map +0 -1
  235. package/dist/types/src/plugins/esbuild-plugin.d.ts +0 -9
  236. package/dist/types/src/plugins/esbuild-plugin.d.ts.map +0 -1
  237. package/dist/types/src/plugins/plugin.d.ts +0 -20
  238. package/dist/types/src/plugins/plugin.d.ts.map +0 -1
  239. package/dist/types/src/plugins/resolveContent.d.ts +0 -2
  240. package/dist/types/src/plugins/resolveContent.d.ts.map +0 -1
  241. package/dist/types/src/styles/components/anchored-overflow.d.ts +0 -6
  242. package/dist/types/src/styles/components/anchored-overflow.d.ts.map +0 -1
  243. package/dist/types/src/styles/components/avatar.d.ts.map +0 -1
  244. package/dist/types/src/styles/components/breadcrumb.d.ts.map +0 -1
  245. package/dist/types/src/styles/components/button.d.ts +0 -19
  246. package/dist/types/src/styles/components/button.d.ts.map +0 -1
  247. package/dist/types/src/styles/components/dialog.d.ts.map +0 -1
  248. package/dist/types/src/styles/components/icon-button.d.ts.map +0 -1
  249. package/dist/types/src/styles/components/icon.d.ts.map +0 -1
  250. package/dist/types/src/styles/components/index.d.ts.map +0 -1
  251. package/dist/types/src/styles/components/input.d.ts.map +0 -1
  252. package/dist/types/src/styles/components/link.d.ts.map +0 -1
  253. package/dist/types/src/styles/components/list.d.ts.map +0 -1
  254. package/dist/types/src/styles/components/main.d.ts.map +0 -1
  255. package/dist/types/src/styles/components/menu.d.ts.map +0 -1
  256. package/dist/types/src/styles/components/message.d.ts.map +0 -1
  257. package/dist/types/src/styles/components/popover.d.ts.map +0 -1
  258. package/dist/types/src/styles/components/scroll-area.d.ts +0 -9
  259. package/dist/types/src/styles/components/scroll-area.d.ts.map +0 -1
  260. package/dist/types/src/styles/components/select.d.ts.map +0 -1
  261. package/dist/types/src/styles/components/separator.d.ts.map +0 -1
  262. package/dist/types/src/styles/components/status.d.ts.map +0 -1
  263. package/dist/types/src/styles/components/tag.d.ts.map +0 -1
  264. package/dist/types/src/styles/components/toast.d.ts.map +0 -1
  265. package/dist/types/src/styles/components/toolbar.d.ts +0 -11
  266. package/dist/types/src/styles/components/toolbar.d.ts.map +0 -1
  267. package/dist/types/src/styles/components/tooltip.d.ts.map +0 -1
  268. package/dist/types/src/styles/components/treegrid.d.ts.map +0 -1
  269. package/dist/types/src/styles/fragments/density.d.ts +0 -13
  270. package/dist/types/src/styles/fragments/density.d.ts.map +0 -1
  271. package/dist/types/src/styles/fragments/dimension.d.ts +0 -5
  272. package/dist/types/src/styles/fragments/dimension.d.ts.map +0 -1
  273. package/dist/types/src/styles/fragments/disabled.d.ts.map +0 -1
  274. package/dist/types/src/styles/fragments/elevation.d.ts.map +0 -1
  275. package/dist/types/src/styles/fragments/focus.d.ts +0 -6
  276. package/dist/types/src/styles/fragments/focus.d.ts.map +0 -1
  277. package/dist/types/src/styles/fragments/group.d.ts +0 -5
  278. package/dist/types/src/styles/fragments/group.d.ts.map +0 -1
  279. package/dist/types/src/styles/fragments/hover.d.ts +0 -17
  280. package/dist/types/src/styles/fragments/hover.d.ts.map +0 -1
  281. package/dist/types/src/styles/fragments/index.d.ts +0 -17
  282. package/dist/types/src/styles/fragments/index.d.ts.map +0 -1
  283. package/dist/types/src/styles/fragments/layout.d.ts +0 -3
  284. package/dist/types/src/styles/fragments/layout.d.ts.map +0 -1
  285. package/dist/types/src/styles/fragments/motion.d.ts +0 -2
  286. package/dist/types/src/styles/fragments/motion.d.ts.map +0 -1
  287. package/dist/types/src/styles/fragments/ornament.d.ts +0 -5
  288. package/dist/types/src/styles/fragments/ornament.d.ts.map +0 -1
  289. package/dist/types/src/styles/fragments/selected.d.ts +0 -13
  290. package/dist/types/src/styles/fragments/selected.d.ts.map +0 -1
  291. package/dist/types/src/styles/fragments/shimmer.d.ts +0 -3
  292. package/dist/types/src/styles/fragments/shimmer.d.ts.map +0 -1
  293. package/dist/types/src/styles/fragments/size.d.ts +0 -9
  294. package/dist/types/src/styles/fragments/size.d.ts.map +0 -1
  295. package/dist/types/src/styles/fragments/surface.d.ts +0 -9
  296. package/dist/types/src/styles/fragments/surface.d.ts.map +0 -1
  297. package/dist/types/src/styles/fragments/text.d.ts +0 -7
  298. package/dist/types/src/styles/fragments/text.d.ts.map +0 -1
  299. package/dist/types/src/styles/fragments/valence.d.ts +0 -13
  300. package/dist/types/src/styles/fragments/valence.d.ts.map +0 -1
  301. package/dist/types/src/styles/index.d.ts +0 -4
  302. package/dist/types/src/styles/index.d.ts.map +0 -1
  303. package/dist/types/src/styles/theme.d.ts +0 -5
  304. package/dist/types/src/styles/theme.d.ts.map +0 -1
  305. package/dist/types/src/tailwind.d.ts +0 -3
  306. package/dist/types/src/tailwind.d.ts.map +0 -1
  307. package/dist/types/src/types.d.ts +0 -3
  308. package/dist/types/src/types.d.ts.map +0 -1
  309. package/dist/types/src/util/withLogical.d.ts +0 -164
  310. package/dist/types/src/util/withLogical.d.ts.map +0 -1
  311. package/src/Tokens.stories.tsx +0 -88
  312. package/src/config/index.ts +0 -6
  313. package/src/config/tailwind.ts +0 -264
  314. package/src/config/tokens/alias-colors.ts +0 -39
  315. package/src/config/tokens/index.ts +0 -92
  316. package/src/config/tokens/lengths.ts +0 -97
  317. package/src/config/tokens/physical-colors.ts +0 -125
  318. package/src/config/tokens/semantic-colors.ts +0 -27
  319. package/src/config/tokens/sememes-calls.ts +0 -17
  320. package/src/config/tokens/sememes-codemirror.ts +0 -50
  321. package/src/config/tokens/sememes-hue.ts +0 -54
  322. package/src/config/tokens/sememes-sheet.ts +0 -62
  323. package/src/config/tokens/sememes-system.ts +0 -302
  324. package/src/config/tokens/sizes.ts +0 -10
  325. package/src/config/tokens/types.ts +0 -9
  326. package/src/docs/theme.drawio.svg +0 -635
  327. package/src/plugins/esbuild-plugin.ts +0 -65
  328. package/src/plugins/plugin.ts +0 -130
  329. package/src/plugins/resolveContent.ts +0 -51
  330. package/src/styles/components/README.md +0 -6
  331. package/src/styles/components/anchored-overflow.ts +0 -20
  332. package/src/styles/components/button.ts +0 -48
  333. package/src/styles/components/icon.ts +0 -19
  334. package/src/styles/components/input.ts +0 -177
  335. package/src/styles/components/scroll-area.ts +0 -43
  336. package/src/styles/components/toolbar.ts +0 -29
  337. package/src/styles/fragments/density.ts +0 -17
  338. package/src/styles/fragments/dimension.ts +0 -8
  339. package/src/styles/fragments/focus.ts +0 -16
  340. package/src/styles/fragments/group.ts +0 -12
  341. package/src/styles/fragments/hover.ts +0 -25
  342. package/src/styles/fragments/index.ts +0 -20
  343. package/src/styles/fragments/layout.ts +0 -7
  344. package/src/styles/fragments/motion.ts +0 -6
  345. package/src/styles/fragments/ornament.ts +0 -10
  346. package/src/styles/fragments/selected.ts +0 -45
  347. package/src/styles/fragments/shimmer.ts +0 -9
  348. package/src/styles/fragments/size.ts +0 -117
  349. package/src/styles/fragments/surface.ts +0 -29
  350. package/src/styles/fragments/text.ts +0 -12
  351. package/src/styles/fragments/valence.ts +0 -46
  352. package/src/styles/layers/README.md +0 -15
  353. package/src/styles/layers/anchored-overflow.css +0 -9
  354. package/src/styles/layers/animation.css +0 -17
  355. package/src/styles/layers/attention.css +0 -8
  356. package/src/styles/layers/base.css +0 -25
  357. package/src/styles/layers/can-scroll.css +0 -26
  358. package/src/styles/layers/drag-preview.css +0 -18
  359. package/src/styles/layers/hues.css +0 -110
  360. package/src/styles/layers/index.css +0 -26
  361. package/src/styles/layers/main.css +0 -227
  362. package/src/styles/layers/positioning.css +0 -23
  363. package/src/styles/layers/surfaces.css +0 -31
  364. package/src/styles/layers/tag.css +0 -132
  365. package/src/styles/layers/tldraw.css +0 -91
  366. package/src/styles/layers/tokens.css +0 -46
  367. package/src/tailwind.ts +0 -7
  368. package/src/theme.css +0 -9
  369. package/src/types.ts +0 -7
  370. package/src/util/withLogical.ts +0 -114
  371. /package/dist/types/src/{styles/fragments → fragments}/disabled.d.ts +0 -0
  372. /package/dist/types/src/{styles → theme}/components/avatar.d.ts +0 -0
  373. /package/dist/types/src/{styles → theme}/components/breadcrumb.d.ts +0 -0
  374. /package/dist/types/src/{styles → theme}/components/icon-button.d.ts +0 -0
  375. /package/dist/types/src/{styles → theme}/components/link.d.ts +0 -0
  376. /package/dist/types/src/{styles → theme}/components/list.d.ts +0 -0
  377. /package/dist/types/src/{styles → theme}/components/select.d.ts +0 -0
  378. /package/dist/types/src/{styles → theme}/components/separator.d.ts +0 -0
  379. /package/dist/types/src/{styles → theme}/components/tag.d.ts +0 -0
  380. /package/dist/types/src/{styles → theme}/components/toast.d.ts +0 -0
  381. /package/dist/types/src/{styles → theme}/components/tooltip.d.ts +0 -0
  382. /package/dist/types/src/{styles → theme}/components/treegrid.d.ts +0 -0
  383. /package/src/{styles/fragments → fragments}/disabled.ts +0 -0
  384. /package/src/{styles → theme}/components/breadcrumb.ts +0 -0
@@ -1,264 +0,0 @@
1
- //
2
- // Copyright 2022 DXOS.org
3
- //
4
-
5
- import tailwindcssContainerQueries from '@tailwindcss/container-queries';
6
- import tailwindcssForms from '@tailwindcss/forms';
7
- import merge from 'lodash.merge';
8
- import tailwindScrollbar from 'tailwind-scrollbar';
9
- import defaultConfig from 'tailwindcss/stubs/config.full.js';
10
- import { type Config, type ThemeConfig } from 'tailwindcss/types/config';
11
- import tailwindcssLogical from 'tailwindcss-logical';
12
- import tailwindcssRadix from 'tailwindcss-radix';
13
-
14
- import { tokensTailwindConfig } from './tokens';
15
-
16
- export type TailwindConfig = Config;
17
- export type TailwindThemeConfig = ThemeConfig;
18
-
19
- const { extend: extendTokens, ...overrideTokens } = tokensTailwindConfig;
20
-
21
- export const tailwindConfig = ({
22
- env = 'production',
23
- content = [],
24
- extensions = [],
25
- }: {
26
- env?: string;
27
- content?: string[];
28
- extensions?: Partial<TailwindThemeConfig>[];
29
- }): TailwindConfig => ({
30
- darkMode: 'class',
31
- theme: {
32
- // Configure fonts in theme.css and package.json.
33
- fontFamily: {
34
- body: ['Inter Variable', ...defaultConfig.theme.fontFamily.sans],
35
- mono: ['JetBrains Mono Variable', ...defaultConfig.theme.fontFamily.mono],
36
- },
37
- extend: merge(
38
- {
39
- // Generates is-card-default-width, is-card-min-width, etc.
40
- spacing: {
41
- 'card-default-width': 'var(--dx-card-default-width)',
42
- 'card-min-width': 'var(--dx-card-min-width)',
43
- 'card-max-width': 'var(--dx-card-max-width)',
44
- 'container-max-width': 'var(--dx-container-max-width)',
45
- 'popover-max-width': 'var(--dx-popover-max-width)',
46
- 'prose-max-width': 'var(--dx-prose-max-width)',
47
- },
48
- backgroundImage: {
49
- 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
50
- 'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
51
- },
52
- borderRadius: {
53
- none: '0',
54
- sm: '0.25rem',
55
- DEFAULT: '0.5rem',
56
- md: '0.75rem',
57
- lg: '1rem',
58
- },
59
- screens: {
60
- 'pointer-fine': { raw: '(pointer: fine)' },
61
- 'hover-hover': { raw: '(hover: hover)' },
62
- 'md': '768px',
63
- 'lg': '1024px',
64
- },
65
- fontSize: {
66
- // Base size 16px
67
- // Scale 1.125
68
- 'xs': ['0.790rem', { lineHeight: '1rem' }],
69
- 'sm': ['0.889rem', { lineHeight: '1.25rem' }],
70
- 'base': ['1rem', { lineHeight: '1.5rem' }],
71
- 'lg': ['1.125rem', { lineHeight: '1.75rem' }],
72
- 'xl': ['1.266rem', { lineHeight: '1.75rem' }],
73
- '2xl': ['1.424rem', { lineHeight: '2rem' }],
74
- '3xl': ['1.602rem', { lineHeight: '2.25rem' }],
75
- '4xl': ['1.802rem', { lineHeight: '2.5rem' }],
76
- '5xl': ['2.027rem', { lineHeight: '2.5rem' }],
77
- '6xl': ['2.281rem', { lineHeight: '2.5rem' }],
78
- '7xl': ['2.566rem', { lineHeight: '2.75rem' }],
79
- '8xl': ['2.887rem', { lineHeight: '3rem' }],
80
- '9xl': ['3.247rem', { lineHeight: '3.25rem' }],
81
- },
82
- boxShadow: {
83
- 'slider': '0 0 0 5px rgba(0, 0, 0, 0.3)',
84
- },
85
- transitionProperty: {
86
- 'max-height': 'max-height',
87
- },
88
- transitionTimingFunction: {
89
- 'in-out-symmetric': 'cubic-bezier(0.5, 0, 0.5, 1)',
90
- },
91
- keyframes: {
92
- // Fade
93
- 'fade-in': {
94
- from: { opacity: 0 },
95
- to: { opacity: 1 },
96
- },
97
- 'fade-out': {
98
- from: { opacity: 1 },
99
- to: { opacity: 0 },
100
- },
101
-
102
- // Popper chrome
103
- 'slide-down-and-fade': {
104
- from: { opacity: 1, transform: 'translateY(0)' },
105
- to: { opacity: 0, transform: 'translateY(16px)' },
106
- },
107
- 'slide-left-and-fade': {
108
- from: { opacity: 0, transform: 'translateX(-16px)' },
109
- to: { opacity: 1, transform: 'translateX(0)' },
110
- },
111
- 'slide-up-and-fade': {
112
- from: { opacity: 0, transform: 'translateY(16px)' },
113
- to: { opacity: 1, transform: 'translateY(0)' },
114
- },
115
- 'slide-right-and-fade': {
116
- from: { opacity: 0, transform: 'translateX(16px)' },
117
- to: { opacity: 1, transform: 'translateX(0)' },
118
- },
119
-
120
- // Toast
121
- 'toast-hide': {
122
- '0%': { opacity: '1' },
123
- '100%': { opacity: '0' },
124
- },
125
- 'toast-slide-in-right': {
126
- '0%': { transform: 'translateX(calc(100% + 1rem))' },
127
- '100%': { transform: 'translateX(0)' },
128
- },
129
- 'toast-slide-in-bottom': {
130
- '0%': { transform: 'translateY(calc(100% + 1rem))' },
131
- '100%': { transform: 'translateY(0)' },
132
- },
133
- 'toast-swipe-out': {
134
- '0%': {
135
- transform: 'translateX(var(--radix-toast-swipe-end-x))',
136
- },
137
- '100%': {
138
- transform: 'translateX(calc(100% + 1rem))',
139
- },
140
- },
141
-
142
- // Accordion
143
- 'slide-down': {
144
- from: { height: '0px' },
145
- to: { height: 'var(--radix-accordion-content-height)' },
146
- },
147
- 'slide-up': {
148
- from: { height: 'var(--radix-accordion-content-height)' },
149
- to: { height: '0px' },
150
- },
151
-
152
- // Shimmer
153
- 'shimmer-loop': {
154
- '100%': {
155
- transform: 'translateX(100%)',
156
- },
157
- },
158
-
159
- // HALO
160
- 'halo-pulse': {
161
- '0%': {
162
- opacity: 0.3,
163
- },
164
- '5%': {
165
- opacity: 1,
166
- },
167
- '100%': {
168
- opacity: 0.3,
169
- },
170
- },
171
-
172
- // Progress
173
- 'progress-indeterminate': {
174
- '0%': {
175
- left: 0,
176
- width: '0%',
177
- },
178
- '25%': {
179
- left: '25%',
180
- width: '50%',
181
- },
182
- '75%': {
183
- left: '50%',
184
- width: '100%',
185
- },
186
- '100%': {
187
- left: '100%',
188
- width: '0%',
189
- },
190
- },
191
-
192
- // Border trail effect
193
- 'trail': {
194
- to: { 'offset-distance': '100%' },
195
- },
196
- 'trail-offset': {
197
- '0%': { 'offset-distance': '50%' },
198
- '100%': { 'offset-distance': '150%' },
199
- },
200
- },
201
- animation: {
202
- // Fade
203
- 'fade-in': 'fade-in 200ms ease-out',
204
- 'fade-out': 'fade-out 400ms ease-out',
205
-
206
- // Popper chrome
207
- 'slide-down-and-fade': 'slide-down-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
208
- 'slide-left-and-fade': 'slide-left-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
209
- 'slide-up-and-fade': 'slide-up-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
210
- 'slide-right-and-fade': 'slide-right-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
211
-
212
- // Toast
213
- 'toast-hide': 'toast-hide 100ms ease-in forwards',
214
- 'toast-slide-in-right': 'toast-slide-in-right 150ms cubic-bezier(0.16, 1, 0.3, 1)',
215
- 'toast-slide-in-bottom': 'toast-slide-in-bottom 150ms cubic-bezier(0.16, 1, 0.3, 1)',
216
- 'toast-swipe-out': 'toast-swipe-out 100ms ease-out forwards',
217
-
218
- // Accordion
219
- 'slide-down': 'slide-down 300ms cubic-bezier(0.87, 0, 0.13, 1)',
220
- 'slide-up': 'slide-up 300ms cubic-bezier(0.87, 0, 0.13, 1)',
221
-
222
- // Border trail effect
223
- 'trail': 'trail 6s linear infinite',
224
- 'trail-offset': 'trail-offset 6s linear infinite',
225
-
226
- // Progress effects
227
- 'spin': 'spin 1.5s linear infinite',
228
- 'spin-slow': 'spin 3s linear infinite',
229
- 'shimmer': 'shimmer-loop 2s infinite',
230
- 'halo-pulse': 'halo-pulse 2s ease-out infinite',
231
- 'progress-indeterminate': 'progress-indeterminate 2s ease-out infinite',
232
- 'progress-linear': 'progress-linear 2s ease-out infinite',
233
- },
234
- },
235
- extendTokens,
236
- ...extensions,
237
- ),
238
- ...overrideTokens,
239
- colors: {
240
- ...overrideTokens.colors,
241
- inherit: 'inherit',
242
- current: 'currentColor',
243
- transparent: 'transparent',
244
- black: 'black',
245
- white: 'white',
246
- },
247
- },
248
- plugins: [
249
- tailwindcssContainerQueries,
250
- tailwindcssForms,
251
- tailwindcssLogical,
252
- tailwindcssRadix(),
253
- // https://adoxography.github.io/tailwind-scrollbar/utilities
254
- tailwindScrollbar({
255
- nocompatible: true,
256
- preferredStrategy: 'pseudoelements',
257
- }),
258
- ],
259
- ...(env === 'development' && { mode: 'jit' }),
260
- content,
261
- future: {
262
- hoverOnlyWhenSupported: true,
263
- },
264
- });
@@ -1,39 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { type AliasLayer } from '@ch-ui/tokens';
6
-
7
- import { valenceAliases } from './sememes-hue';
8
- import { sheetAliases } from './sememes-sheet';
9
- import { systemAliases } from './sememes-system';
10
-
11
- const groupAliases = ['groupSurface', ...(systemAliases.groupSurface?.root ?? [])];
12
- const modalAliases = ['modalSurface', ...(systemAliases.modalSurface?.root ?? [])];
13
-
14
- export const aliasColors = {
15
- conditions: {
16
- root: [':root, .dark'],
17
- group: [
18
- [
19
- '.sidebar-surface, .dark .sidebar-surface',
20
- ...groupAliases.map((alias) => `.bg-${alias}, .dark .bg-${alias}`),
21
- ].join(', '),
22
- ],
23
- modal: [
24
- [
25
- '.modal-surface, .dark .modal-surface',
26
- ...modalAliases.map((alias) => `.bg-${alias}, .dark .bg-${alias}`),
27
- //
28
- ].join(', '),
29
- ],
30
- gridFocusStack: ['[data-grid-focus-indicator-variant="stack"]'],
31
- },
32
- aliases: {
33
- // TODO(thure): Aliases should be merged more elegantly, this causes overwrites.
34
- ...sheetAliases,
35
- ...systemAliases,
36
- ...valenceAliases,
37
- },
38
- namespace: 'dx-',
39
- } satisfies AliasLayer<string>;
@@ -1,92 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import { type TailwindAdapterConfig } from '@ch-ui/tailwind-tokens';
6
- import adapter from '@ch-ui/tailwind-tokens';
7
- import { type TokenSet } from '@ch-ui/tokens';
8
-
9
- import { aliasColors } from './alias-colors';
10
- import { lengthsFacet, maxSizesFacet } from './lengths';
11
- import { huePalettes, physicalColors } from './physical-colors';
12
- import { semanticColors } from './semantic-colors';
13
- import { systemAliases, systemSememes } from './sememes-system';
14
-
15
- export * from './sizes';
16
-
17
- export const hues = Object.keys(huePalettes);
18
-
19
- export const tokenSet = {
20
- colors: {
21
- physical: physicalColors,
22
- semantic: semanticColors,
23
- alias: aliasColors,
24
- },
25
- lengths: lengthsFacet,
26
- maxSizes: maxSizesFacet,
27
- } satisfies TokenSet;
28
-
29
- const adapterConfig: TailwindAdapterConfig = {
30
- colors: {
31
- facet: 'colors',
32
- disposition: 'overwrite',
33
- tokenization: 'recursive',
34
- },
35
- borderWidth: {
36
- facet: 'lengths',
37
- disposition: 'extend',
38
- tokenization: 'omit-series',
39
- },
40
- ringWidth: {
41
- facet: 'lengths',
42
- disposition: 'extend',
43
- tokenization: 'omit-series',
44
- },
45
- ringOffsetWidth: {
46
- facet: 'lengths',
47
- disposition: 'extend',
48
- tokenization: 'omit-series',
49
- },
50
- outlineWidth: {
51
- facet: 'lengths',
52
- disposition: 'extend',
53
- tokenization: 'omit-series',
54
- },
55
- spacing: {
56
- facet: 'lengths',
57
- disposition: 'extend',
58
- tokenization: 'keep-series',
59
- },
60
- };
61
-
62
- export const userDefaultTokenSet = {
63
- colors: {
64
- physical: {
65
- definitions: {
66
- series: {
67
- neutral: physicalColors.definitions!.series!.neutral,
68
- primary: physicalColors.definitions!.series!.primary,
69
- },
70
- accompanyingSeries: physicalColors.definitions!.accompanyingSeries,
71
- },
72
- conditions: physicalColors.conditions,
73
- series: {
74
- neutral: physicalColors.series.neutral,
75
- primary: physicalColors.series.primary,
76
- },
77
- namespace: physicalColors.namespace,
78
- },
79
- semantic: {
80
- conditions: semanticColors.conditions,
81
- sememes: systemSememes,
82
- namespace: semanticColors.namespace,
83
- },
84
- alias: {
85
- conditions: aliasColors.conditions,
86
- aliases: systemAliases,
87
- namespace: aliasColors.namespace,
88
- },
89
- },
90
- } satisfies TokenSet;
91
-
92
- export const tokensTailwindConfig = adapter(tokenSet, adapterConfig);
@@ -1,97 +0,0 @@
1
- //
2
-
3
- // Copyright 2025 DXOS.org
4
- //
5
-
6
- import { type Facet, type LinearPhysicalLayer } from '@ch-ui/tokens';
7
-
8
- import { cardDefaultInlineSize, cardMaxInlineSize, cardMinInlineSize } from './sizes';
9
-
10
- export const lengthsFacet = {
11
- physical: {
12
- namespace: 'dx-',
13
- conditions: { root: [':root'] },
14
- series: {
15
- line: {
16
- root: {
17
- unit: 'px',
18
- initial: 0,
19
- slope: 1,
20
- },
21
- },
22
- // "gap"
23
- lacuna: {
24
- root: {
25
- unit: 'rem',
26
- initial: 0,
27
- slope: 0.125,
28
- },
29
- },
30
- },
31
- } satisfies LinearPhysicalLayer,
32
-
33
- semantic: {
34
- namespace: 'dx-',
35
- conditions: { root: [':root'] },
36
- sememes: {
37
- noLine: { root: ['line', 0] },
38
- hairLine: { root: ['line', 1] },
39
- thickLine: { root: ['line', 2] },
40
- trimXs: { root: ['lacuna', 3] },
41
- trimSm: { root: ['lacuna', 4] },
42
- trimMd: { root: ['lacuna', 6] },
43
- trimLg: { root: ['lacuna', 12] },
44
- inputFine: { root: ['lacuna', 3] },
45
- inputCoarse: { root: ['lacuna', 4] },
46
- },
47
- },
48
-
49
- alias: {
50
- namespace: 'dx-',
51
- conditions: {
52
- fine: [':root, .density-fine'],
53
- coarse: ['.density-coarse'],
54
- flush: ['.density-flush'],
55
- gridFocusStack: ['[data-grid-focus-indicator-variant="stack"]'],
56
- },
57
- aliases: {
58
- noLine: { fine: ['focusOffset'] },
59
- hairLine: { fine: ['modalLine', 'landmarkLine', 'positionedLine', 'gridGap', 'gridFocusIndicatorWidth'] },
60
- thickLine: { fine: ['focusLine'], gridFocusStack: ['gridFocusIndicatorWidth'] },
61
- trimXs: { fine: ['cardSpacingChrome', 'labelSpacingBlock', 'inputSpacingBlock'] }, // TODO(burdon): Remove need for this.
62
- trimSm: { fine: ['cardSpacingInline', 'cardSpacingBlock', 'cardSpacingGap'] },
63
- trimMd: { coarse: ['cardSpacingInline', 'cardSpacingBlock', 'cardSpacingGap'] },
64
- inputFine: { fine: ['iconButtonPadding'] },
65
- inputCoarse: { coarse: ['iconButtonPadding'] },
66
- },
67
- },
68
- } satisfies Facet;
69
-
70
- export const maxSizesFacet = {
71
- physical: {
72
- namespace: 'dx-',
73
- conditions: { root: [':root'] },
74
- series: {
75
- size: {
76
- root: {
77
- unit: 'rem',
78
- initial: 0,
79
- slope: 1,
80
- },
81
- },
82
- },
83
- } satisfies LinearPhysicalLayer,
84
-
85
- semantic: {
86
- namespace: 'dx-',
87
- conditions: { root: [':root'] },
88
- sememes: {
89
- 'prose-max-width': { root: ['size', 50] },
90
- 'container-max-width': { root: ['size', 50] },
91
- 'popover-max-width': { root: ['size', cardDefaultInlineSize] },
92
- 'card-default-width': { root: ['size', cardDefaultInlineSize] },
93
- 'card-min-width': { root: ['size', cardMinInlineSize] },
94
- 'card-max-width': { root: ['size', cardMaxInlineSize] },
95
- },
96
- },
97
- } satisfies Facet;
@@ -1,125 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import type { AccompanyingSeries, ColorsPhysicalLayer, Gamut, HelicalArcSeries, PhysicalSeries } from '@ch-ui/tokens';
6
-
7
- import { type PhysicalPalette } from './types';
8
-
9
- const reflectiveRelation = {
10
- initial: 1_000,
11
- slope: -1_000,
12
- method: 'floor',
13
- } satisfies AccompanyingSeries;
14
-
15
- const gamuts: (Gamut & string)[] = ['srgb', 'p3', 'rec2020'];
16
-
17
- const DEG_RAD = Math.PI / 180;
18
-
19
- /**
20
- * Creates a color palette configuration for a given hue value.
21
- *
22
- * @param hue - A number from 0-16 representing different hue angles
23
- * @returns A PhysicalPalette configuration with:
24
- * - keyPoint: [lightness, chroma, hue] in LCH color space
25
- * - lightness: Fixed at 0.5 (50%)
26
- * - chroma: Varies sinusoidally around 0.13 based on hue angle
27
- * - hue: Calculated by mapping input 0-16 to 26-386 degrees
28
- * - Control points and torsion for color interpolation
29
- */
30
- const hueKeyPoint = (hue: number): PhysicalPalette => {
31
- const hueDeg = (360 * (hue / 17) + 26) % 360;
32
- return {
33
- keyPoint: [0.5, 0.13 + 0.024 * Math.sin((hueDeg - 15) * DEG_RAD), hueDeg],
34
- lowerCp: 1,
35
- upperCp: 1,
36
- torsion: 0,
37
- };
38
- };
39
-
40
- export const huePalettes = {
41
- red: hueKeyPoint(0),
42
- orange: hueKeyPoint(1),
43
- amber: hueKeyPoint(2),
44
- yellow: hueKeyPoint(3),
45
- lime: hueKeyPoint(4),
46
- green: hueKeyPoint(5),
47
- emerald: hueKeyPoint(6),
48
- teal: hueKeyPoint(7),
49
- cyan: hueKeyPoint(8),
50
- sky: hueKeyPoint(9),
51
- blue: hueKeyPoint(10),
52
- indigo: hueKeyPoint(11),
53
- violet: hueKeyPoint(12),
54
- purple: hueKeyPoint(13),
55
- fuchsia: hueKeyPoint(14),
56
- pink: hueKeyPoint(15),
57
- rose: hueKeyPoint(16),
58
- };
59
-
60
- /**
61
- * The keyPoint represents the LCH value:
62
- * - Lightness: 0-1, should usually set the keyPoint at or near 0.5
63
- * - Chroma: min 0, max 0.08–0.5 depending on hue and gamut, theme will clamp final value to within gamut’s range
64
- * - Hue: 0-360 (~26 “red”, ~141 “green”, ~262 “blue”)
65
- *
66
- * NOTE: Rebuild the theme and restart the dev server to see changes.
67
- *
68
- * Theme references:
69
- * https://oklch.com
70
- * https://colorsublime.github.io
71
- * https://github.com/microsoft/vscode-docs/blob/main/api/extension-guides/color-theme.md#create-a-new-color-theme
72
- * https://raw.githubusercontent.com/microsoft/vscode/main/src/vs/workbench/services/themes/common/colorThemeSchema.ts
73
- * https://tailwindcss.com/docs/colors
74
- */
75
- const systemPalettes = {
76
- neutral: {
77
- keyPoint: [0.5, 0.001, 260],
78
- lowerCp: 0,
79
- upperCp: 0,
80
- torsion: 0,
81
- // Values used directly.
82
- // TODO(burdon): Audit.
83
- values: [25, 50, 75, 100, 150, 200, 250, 300, 400, 500, 600, 700, 750, 800, 850, 900],
84
- } satisfies PhysicalPalette,
85
-
86
- // https://oklch.com/#0.5,0.2,260,100 (#0559d2)
87
- primary: {
88
- keyPoint: [0.5, 0.2, 260],
89
- lowerCp: 0.86,
90
- upperCp: 1,
91
- torsion: -30,
92
- // Values used directly.
93
- // TODO(burdon): Audit.
94
- values: [100, 150, 200, 350, 400, 450, 500, 750, 800, 850],
95
- } satisfies PhysicalPalette,
96
- };
97
-
98
- const physicalSeries = {
99
- ...huePalettes,
100
- ...systemPalettes,
101
- };
102
-
103
- export const physicalColors: ColorsPhysicalLayer = {
104
- namespace: 'dx-',
105
- definitions: {
106
- // @ts-ignore
107
- series: physicalSeries,
108
- accompanyingSeries: { reflectiveRelation },
109
- },
110
- conditions: {
111
- srgb: [':root, .dark'],
112
- p3: ['@media (color-gamut: p3)', ':root, .dark'],
113
- rec2020: ['@media (color-gamut: rec2020)', ':root, .dark'],
114
- },
115
- series: Object.entries(physicalSeries).reduce((acc: ColorsPhysicalLayer['series'], [id]) => {
116
- acc[id] = gamuts.reduce((acc: PhysicalSeries<Gamut & string, HelicalArcSeries>, gamut) => {
117
- acc[gamut] = {
118
- extends: id,
119
- physicalValueRelation: { extends: 'reflectiveRelation' },
120
- };
121
- return acc;
122
- }, {});
123
- return acc;
124
- }, {}),
125
- };
@@ -1,27 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import type { HelicalArcValue, SemanticLayer } from '@ch-ui/tokens';
6
-
7
- import { callsSememes } from './sememes-calls';
8
- import { codemirrorSememes } from './sememes-codemirror';
9
- import { hueSememes } from './sememes-hue';
10
- import { sheetSememes } from './sememes-sheet';
11
- import { systemSememes } from './sememes-system';
12
-
13
- export const semanticColors = {
14
- conditions: {
15
- light: [':root'],
16
- dark: ['.dark'],
17
- },
18
- sememes: {
19
- // Define each set of sememes in its own file.
20
- ...callsSememes,
21
- ...codemirrorSememes,
22
- ...hueSememes,
23
- ...sheetSememes,
24
- ...systemSememes,
25
- },
26
- namespace: 'dx-',
27
- } satisfies SemanticLayer<string, string, HelicalArcValue>;
@@ -1,17 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import { type ColorSememes } from './types';
6
-
7
- // TODO(burdon): This should be broader than just calls.
8
- export const callsSememes: ColorSememes = {
9
- callActive: {
10
- light: ['green', '500'],
11
- dark: ['green', '500'],
12
- },
13
- callAlert: {
14
- light: ['rose', '500'],
15
- dark: ['rose', '500'],
16
- },
17
- };