@dxos/ui-theme 0.8.4-main.ef1bc66f44 → 0.8.4-main.fcfe5033a5

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 (390) hide show
  1. package/dist/lib/browser/index.mjs +770 -2901
  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 +770 -2901
  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 -11
  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/theme/components/dialog.d.ts.map +1 -0
  43. package/dist/types/src/theme/components/focus.d.ts +6 -0
  44. package/dist/types/src/theme/components/focus.d.ts.map +1 -0
  45. package/dist/types/src/theme/components/icon-button.d.ts.map +1 -0
  46. package/dist/types/src/{styles → theme}/components/icon.d.ts +3 -0
  47. package/dist/types/src/theme/components/icon.d.ts.map +1 -0
  48. package/dist/types/src/{styles → theme}/components/index.d.ts +3 -1
  49. package/dist/types/src/theme/components/index.d.ts.map +1 -0
  50. package/dist/types/src/{styles → theme}/components/input.d.ts +25 -21
  51. package/dist/types/src/theme/components/input.d.ts.map +1 -0
  52. package/dist/types/src/theme/components/link.d.ts.map +1 -0
  53. package/dist/types/src/theme/components/list.d.ts.map +1 -0
  54. package/dist/types/src/{styles → theme}/components/main.d.ts +2 -2
  55. package/dist/types/src/theme/components/main.d.ts.map +1 -0
  56. package/dist/types/src/{styles → theme}/components/menu.d.ts +1 -1
  57. package/dist/types/src/theme/components/menu.d.ts.map +1 -0
  58. package/dist/types/src/{styles → theme}/components/message.d.ts +1 -0
  59. package/dist/types/src/theme/components/message.d.ts.map +1 -0
  60. package/dist/types/src/{styles → theme}/components/popover.d.ts +1 -1
  61. package/dist/types/src/theme/components/popover.d.ts.map +1 -0
  62. package/dist/types/src/{styles → theme}/components/scroll-area.d.ts +17 -1
  63. package/dist/types/src/theme/components/scroll-area.d.ts.map +1 -0
  64. package/dist/types/src/theme/components/select.d.ts.map +1 -0
  65. package/dist/types/src/theme/components/separator.d.ts.map +1 -0
  66. package/dist/types/src/theme/components/skeleton.d.ts.map +1 -0
  67. package/dist/types/src/theme/components/splitter.d.ts +4 -0
  68. package/dist/types/src/theme/components/splitter.d.ts.map +1 -0
  69. package/dist/types/src/{styles → theme}/components/status.d.ts +1 -1
  70. package/dist/types/src/theme/components/status.d.ts.map +1 -0
  71. package/dist/types/src/theme/components/tag.d.ts.map +1 -0
  72. package/dist/types/src/theme/components/toast.d.ts.map +1 -0
  73. package/dist/types/src/{styles → theme}/components/toolbar.d.ts +2 -2
  74. package/dist/types/src/theme/components/toolbar.d.ts.map +1 -0
  75. package/dist/types/src/theme/components/tooltip.d.ts.map +1 -0
  76. package/dist/types/src/theme/components/treegrid.d.ts.map +1 -0
  77. package/dist/types/src/{styles → theme}/index.d.ts +0 -1
  78. package/dist/types/src/theme/index.d.ts.map +1 -0
  79. package/dist/types/src/theme/primitives/column.d.ts +29 -0
  80. package/dist/types/src/theme/primitives/column.d.ts.map +1 -0
  81. package/dist/types/src/theme/primitives/index.d.ts +3 -0
  82. package/dist/types/src/theme/primitives/index.d.ts.map +1 -0
  83. package/dist/types/src/theme/primitives/panel.d.ts +13 -0
  84. package/dist/types/src/theme/primitives/panel.d.ts.map +1 -0
  85. package/dist/types/src/theme/theme.d.ts.map +1 -0
  86. package/dist/types/src/{styles/fragments → util}/elevation.d.ts +0 -6
  87. package/dist/types/src/util/elevation.d.ts.map +1 -0
  88. package/dist/types/src/util/hash-styles.d.ts +8 -5
  89. package/dist/types/src/util/hash-styles.d.ts.map +1 -1
  90. package/dist/types/src/util/index.d.ts +3 -0
  91. package/dist/types/src/util/index.d.ts.map +1 -1
  92. package/dist/types/src/util/mx.d.ts +36 -0
  93. package/dist/types/src/util/mx.d.ts.map +1 -1
  94. package/dist/types/src/util/size.d.ts +27 -0
  95. package/dist/types/src/util/size.d.ts.map +1 -0
  96. package/dist/types/src/util/valence.d.ts +4 -0
  97. package/dist/types/src/util/valence.d.ts.map +1 -0
  98. package/dist/types/tsconfig.tsbuildinfo +1 -1
  99. package/package.json +23 -26
  100. package/src/Theme.stories.tsx +224 -0
  101. package/src/css/base/base.css +43 -0
  102. package/src/{styles/layers → css/base}/typography.css +3 -5
  103. package/src/{styles/layers → css/components}/button.css +23 -14
  104. package/src/{styles/layers → css/components}/checkbox.css +12 -8
  105. package/src/{styles/layers → css/components}/dialog.css +16 -11
  106. package/src/{styles/layers/focus-ring.css → css/components/focus.css} +60 -41
  107. package/src/css/components/icon.css +9 -0
  108. package/src/css/components/link.css +9 -0
  109. package/src/css/components/panel.css +117 -0
  110. package/src/css/components/scrollbar.css +24 -0
  111. package/src/css/components/selected.css +30 -0
  112. package/src/css/components/surface.css +34 -0
  113. package/src/css/components/tag.css +130 -0
  114. package/src/css/components/text.css +124 -0
  115. package/src/css/integrations/codemirror.css +34 -0
  116. package/src/css/integrations/tldraw.css +14 -0
  117. package/src/css/layout/main.css +205 -0
  118. package/src/{styles/layers → css/layout}/native.css +6 -4
  119. package/src/css/layout/positioning.css +19 -0
  120. package/src/{styles/layers → css/layout}/size.css +117 -107
  121. package/src/css/theme/animation.css +229 -0
  122. package/src/css/theme/border.css +23 -0
  123. package/src/css/theme/palette.css +36 -0
  124. package/src/css/theme/semantic.css +116 -0
  125. package/src/css/theme/spacing.css +147 -0
  126. package/src/css/theme/styles.css +145 -0
  127. package/src/css/theme/text.css +37 -0
  128. package/src/css/utilities.css +76 -0
  129. package/src/defs.ts +48 -0
  130. package/src/fragments/AUDIT.md +57 -0
  131. package/src/fragments/density.ts +16 -0
  132. package/src/fragments/hover.ts +18 -0
  133. package/src/fragments/index.ts +10 -0
  134. package/src/fragments/text.ts +6 -0
  135. package/src/index.ts +3 -15
  136. package/src/main.css +87 -0
  137. package/src/plugins/ThemePlugin.ts +125 -0
  138. package/src/plugins/dark-mode.ts +22 -0
  139. package/src/plugins/main.css +45 -0
  140. package/src/{styles → theme}/components/avatar.ts +12 -13
  141. package/src/theme/components/button.ts +48 -0
  142. package/src/theme/components/card.ts +102 -0
  143. package/src/{styles → theme}/components/dialog.ts +13 -12
  144. package/src/theme/components/focus.ts +33 -0
  145. package/src/{styles → theme}/components/icon-button.ts +1 -3
  146. package/src/theme/components/icon.ts +28 -0
  147. package/src/{styles → theme}/components/index.ts +3 -1
  148. package/src/theme/components/input.ts +171 -0
  149. package/src/{styles → theme}/components/link.ts +3 -4
  150. package/src/{styles → theme}/components/list.ts +5 -5
  151. package/src/{styles → theme}/components/main.ts +2 -2
  152. package/src/{styles → theme}/components/menu.ts +11 -13
  153. package/src/{styles → theme}/components/message.ts +11 -7
  154. package/src/{styles → theme}/components/popover.ts +13 -12
  155. package/src/theme/components/scroll-area.ts +115 -0
  156. package/src/{styles → theme}/components/select.ts +8 -16
  157. package/src/{styles → theme}/components/separator.ts +3 -3
  158. package/src/{styles → theme}/components/skeleton.ts +2 -2
  159. package/src/theme/components/splitter.ts +20 -0
  160. package/src/{styles → theme}/components/status.ts +7 -7
  161. package/src/{styles → theme}/components/tag.ts +1 -1
  162. package/src/{styles → theme}/components/toast.ts +6 -8
  163. package/src/{styles → theme}/components/toolbar.ts +6 -7
  164. package/src/{styles → theme}/components/tooltip.ts +4 -6
  165. package/src/{styles → theme}/components/treegrid.ts +9 -9
  166. package/src/{styles → theme}/index.ts +1 -2
  167. package/src/theme/primitives/column.ts +71 -0
  168. package/src/theme/primitives/index.ts +6 -0
  169. package/src/theme/primitives/panel.ts +43 -0
  170. package/src/{styles → theme}/theme.ts +13 -19
  171. package/src/typings.d.ts +3 -1
  172. package/src/{styles/fragments → util}/elevation.ts +6 -8
  173. package/src/util/hash-styles.ts +118 -98
  174. package/src/util/index.ts +3 -0
  175. package/src/util/mx.ts +165 -43
  176. package/src/util/size.ts +103 -0
  177. package/src/util/valence.ts +33 -0
  178. package/dist/plugin/node-cjs/chunk-UUMDOU7E.cjs +0 -79
  179. package/dist/plugin/node-cjs/chunk-UUMDOU7E.cjs.map +0 -7
  180. package/dist/plugin/node-cjs/chunk-YBWOZKXY.cjs +0 -1634
  181. package/dist/plugin/node-cjs/chunk-YBWOZKXY.cjs.map +0 -7
  182. package/dist/plugin/node-cjs/config/tailwind.cjs +0 -29
  183. package/dist/plugin/node-cjs/config/tailwind.cjs.map +0 -7
  184. package/dist/plugin/node-cjs/plugins/esbuild-plugin.cjs +0 -90
  185. package/dist/plugin/node-cjs/plugins/esbuild-plugin.cjs.map +0 -7
  186. package/dist/plugin/node-cjs/plugins/plugin.cjs +0 -124
  187. package/dist/plugin/node-cjs/plugins/plugin.cjs.map +0 -7
  188. package/dist/plugin/node-cjs/theme.css +0 -1378
  189. package/dist/plugin/node-cjs/theme.css.map +0 -7
  190. package/dist/plugin/node-esm/chunk-AFRHJHP4.mjs +0 -49
  191. package/dist/plugin/node-esm/chunk-AFRHJHP4.mjs.map +0 -7
  192. package/dist/plugin/node-esm/chunk-LTGUAP22.mjs +0 -1629
  193. package/dist/plugin/node-esm/chunk-LTGUAP22.mjs.map +0 -7
  194. package/dist/plugin/node-esm/config/tailwind.mjs +0 -8
  195. package/dist/plugin/node-esm/config/tailwind.mjs.map +0 -7
  196. package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs +0 -63
  197. package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs.map +0 -7
  198. package/dist/plugin/node-esm/plugins/plugin.mjs +0 -98
  199. package/dist/plugin/node-esm/plugins/plugin.mjs.map +0 -7
  200. package/dist/plugin/node-esm/theme.css +0 -1378
  201. package/dist/plugin/node-esm/theme.css.map +0 -7
  202. package/dist/types/src/Tokens.stories.d.ts +0 -10
  203. package/dist/types/src/Tokens.stories.d.ts.map +0 -1
  204. package/dist/types/src/config/index.d.ts +0 -3
  205. package/dist/types/src/config/index.d.ts.map +0 -1
  206. package/dist/types/src/config/tailwind.d.ts +0 -9
  207. package/dist/types/src/config/tailwind.d.ts.map +0 -1
  208. package/dist/types/src/config/tokens/alias-colors.d.ts +0 -21
  209. package/dist/types/src/config/tokens/alias-colors.d.ts.map +0 -1
  210. package/dist/types/src/config/tokens/index.d.ts +0 -3
  211. package/dist/types/src/config/tokens/index.d.ts.map +0 -1
  212. package/dist/types/src/config/tokens/lengths.d.ts +0 -142
  213. package/dist/types/src/config/tokens/lengths.d.ts.map +0 -1
  214. package/dist/types/src/config/tokens/physical-colors.d.ts +0 -23
  215. package/dist/types/src/config/tokens/physical-colors.d.ts.map +0 -1
  216. package/dist/types/src/config/tokens/semantic-colors.d.ts +0 -192
  217. package/dist/types/src/config/tokens/semantic-colors.d.ts.map +0 -1
  218. package/dist/types/src/config/tokens/sememes-calls.d.ts +0 -3
  219. package/dist/types/src/config/tokens/sememes-calls.d.ts.map +0 -1
  220. package/dist/types/src/config/tokens/sememes-codemirror.d.ts +0 -43
  221. package/dist/types/src/config/tokens/sememes-codemirror.d.ts.map +0 -1
  222. package/dist/types/src/config/tokens/sememes-hue.d.ts +0 -4
  223. package/dist/types/src/config/tokens/sememes-hue.d.ts.map +0 -1
  224. package/dist/types/src/config/tokens/sememes-sheet.d.ts +0 -58
  225. package/dist/types/src/config/tokens/sememes-sheet.d.ts.map +0 -1
  226. package/dist/types/src/config/tokens/sememes-system.d.ts +0 -104
  227. package/dist/types/src/config/tokens/sememes-system.d.ts.map +0 -1
  228. package/dist/types/src/config/tokens/sizes.d.ts +0 -9
  229. package/dist/types/src/config/tokens/sizes.d.ts.map +0 -1
  230. package/dist/types/src/config/tokens/tokens.d.ts +0 -498
  231. package/dist/types/src/config/tokens/tokens.d.ts.map +0 -1
  232. package/dist/types/src/config/tokens/types.d.ts +0 -5
  233. package/dist/types/src/config/tokens/types.d.ts.map +0 -1
  234. package/dist/types/src/plugins/esbuild-plugin.d.ts +0 -9
  235. package/dist/types/src/plugins/esbuild-plugin.d.ts.map +0 -1
  236. package/dist/types/src/plugins/plugin.d.ts +0 -20
  237. package/dist/types/src/plugins/plugin.d.ts.map +0 -1
  238. package/dist/types/src/plugins/resolveContent.d.ts +0 -2
  239. package/dist/types/src/plugins/resolveContent.d.ts.map +0 -1
  240. package/dist/types/src/styles/components/anchored-overflow.d.ts +0 -6
  241. package/dist/types/src/styles/components/anchored-overflow.d.ts.map +0 -1
  242. package/dist/types/src/styles/components/avatar.d.ts.map +0 -1
  243. package/dist/types/src/styles/components/breadcrumb.d.ts.map +0 -1
  244. package/dist/types/src/styles/components/button.d.ts +0 -19
  245. package/dist/types/src/styles/components/button.d.ts.map +0 -1
  246. package/dist/types/src/styles/components/dialog.d.ts.map +0 -1
  247. package/dist/types/src/styles/components/icon-button.d.ts.map +0 -1
  248. package/dist/types/src/styles/components/icon.d.ts.map +0 -1
  249. package/dist/types/src/styles/components/index.d.ts.map +0 -1
  250. package/dist/types/src/styles/components/input.d.ts.map +0 -1
  251. package/dist/types/src/styles/components/link.d.ts.map +0 -1
  252. package/dist/types/src/styles/components/list.d.ts.map +0 -1
  253. package/dist/types/src/styles/components/main.d.ts.map +0 -1
  254. package/dist/types/src/styles/components/menu.d.ts.map +0 -1
  255. package/dist/types/src/styles/components/message.d.ts.map +0 -1
  256. package/dist/types/src/styles/components/popover.d.ts.map +0 -1
  257. package/dist/types/src/styles/components/scroll-area.d.ts.map +0 -1
  258. package/dist/types/src/styles/components/select.d.ts.map +0 -1
  259. package/dist/types/src/styles/components/separator.d.ts.map +0 -1
  260. package/dist/types/src/styles/components/skeleton.d.ts.map +0 -1
  261. package/dist/types/src/styles/components/status.d.ts.map +0 -1
  262. package/dist/types/src/styles/components/tag.d.ts.map +0 -1
  263. package/dist/types/src/styles/components/toast.d.ts.map +0 -1
  264. package/dist/types/src/styles/components/toolbar.d.ts.map +0 -1
  265. package/dist/types/src/styles/components/tooltip.d.ts.map +0 -1
  266. package/dist/types/src/styles/components/treegrid.d.ts.map +0 -1
  267. package/dist/types/src/styles/fragments/density.d.ts +0 -13
  268. package/dist/types/src/styles/fragments/density.d.ts.map +0 -1
  269. package/dist/types/src/styles/fragments/dimension.d.ts +0 -5
  270. package/dist/types/src/styles/fragments/dimension.d.ts.map +0 -1
  271. package/dist/types/src/styles/fragments/disabled.d.ts.map +0 -1
  272. package/dist/types/src/styles/fragments/elevation.d.ts.map +0 -1
  273. package/dist/types/src/styles/fragments/focus.d.ts +0 -6
  274. package/dist/types/src/styles/fragments/focus.d.ts.map +0 -1
  275. package/dist/types/src/styles/fragments/group.d.ts +0 -5
  276. package/dist/types/src/styles/fragments/group.d.ts.map +0 -1
  277. package/dist/types/src/styles/fragments/hover.d.ts +0 -17
  278. package/dist/types/src/styles/fragments/hover.d.ts.map +0 -1
  279. package/dist/types/src/styles/fragments/index.d.ts +0 -17
  280. package/dist/types/src/styles/fragments/index.d.ts.map +0 -1
  281. package/dist/types/src/styles/fragments/layout.d.ts +0 -3
  282. package/dist/types/src/styles/fragments/layout.d.ts.map +0 -1
  283. package/dist/types/src/styles/fragments/motion.d.ts +0 -2
  284. package/dist/types/src/styles/fragments/motion.d.ts.map +0 -1
  285. package/dist/types/src/styles/fragments/ornament.d.ts +0 -5
  286. package/dist/types/src/styles/fragments/ornament.d.ts.map +0 -1
  287. package/dist/types/src/styles/fragments/selected.d.ts +0 -13
  288. package/dist/types/src/styles/fragments/selected.d.ts.map +0 -1
  289. package/dist/types/src/styles/fragments/shimmer.d.ts +0 -3
  290. package/dist/types/src/styles/fragments/shimmer.d.ts.map +0 -1
  291. package/dist/types/src/styles/fragments/size.d.ts +0 -9
  292. package/dist/types/src/styles/fragments/size.d.ts.map +0 -1
  293. package/dist/types/src/styles/fragments/surface.d.ts +0 -9
  294. package/dist/types/src/styles/fragments/surface.d.ts.map +0 -1
  295. package/dist/types/src/styles/fragments/text.d.ts +0 -7
  296. package/dist/types/src/styles/fragments/text.d.ts.map +0 -1
  297. package/dist/types/src/styles/fragments/valence.d.ts +0 -13
  298. package/dist/types/src/styles/fragments/valence.d.ts.map +0 -1
  299. package/dist/types/src/styles/index.d.ts.map +0 -1
  300. package/dist/types/src/styles/primitives/container.d.ts +0 -15
  301. package/dist/types/src/styles/primitives/container.d.ts.map +0 -1
  302. package/dist/types/src/styles/primitives/index.d.ts +0 -2
  303. package/dist/types/src/styles/primitives/index.d.ts.map +0 -1
  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 -265
  314. package/src/config/tokens/alias-colors.ts +0 -39
  315. package/src/config/tokens/index.ts +0 -6
  316. package/src/config/tokens/lengths.ts +0 -106
  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 -307
  324. package/src/config/tokens/sizes.ts +0 -12
  325. package/src/config/tokens/tokens.ts +0 -90
  326. package/src/config/tokens/types.ts +0 -9
  327. package/src/docs/theme.drawio.svg +0 -635
  328. package/src/plugins/esbuild-plugin.ts +0 -65
  329. package/src/plugins/plugin.ts +0 -130
  330. package/src/plugins/resolveContent.ts +0 -51
  331. package/src/styles/components/README.md +0 -6
  332. package/src/styles/components/anchored-overflow.ts +0 -20
  333. package/src/styles/components/button.ts +0 -48
  334. package/src/styles/components/icon.ts +0 -19
  335. package/src/styles/components/input.ts +0 -177
  336. package/src/styles/components/scroll-area.ts +0 -90
  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 -27
  361. package/src/styles/layers/main.css +0 -183
  362. package/src/styles/layers/positioning.css +0 -23
  363. package/src/styles/layers/scrollbar.css +0 -10
  364. package/src/styles/layers/surfaces.css +0 -31
  365. package/src/styles/layers/tag.css +0 -132
  366. package/src/styles/layers/tldraw.css +0 -91
  367. package/src/styles/layers/tokens.css +0 -47
  368. package/src/styles/primitives/container.ts +0 -33
  369. package/src/styles/primitives/index.ts +0 -5
  370. package/src/tailwind.ts +0 -7
  371. package/src/theme.css +0 -9
  372. package/src/types.ts +0 -7
  373. package/src/util/withLogical.ts +0 -114
  374. /package/dist/types/src/{styles/fragments → fragments}/disabled.d.ts +0 -0
  375. /package/dist/types/src/{styles → theme}/components/avatar.d.ts +0 -0
  376. /package/dist/types/src/{styles → theme}/components/breadcrumb.d.ts +0 -0
  377. /package/dist/types/src/{styles → theme}/components/dialog.d.ts +0 -0
  378. /package/dist/types/src/{styles → theme}/components/icon-button.d.ts +0 -0
  379. /package/dist/types/src/{styles → theme}/components/link.d.ts +0 -0
  380. /package/dist/types/src/{styles → theme}/components/list.d.ts +0 -0
  381. /package/dist/types/src/{styles → theme}/components/select.d.ts +0 -0
  382. /package/dist/types/src/{styles → theme}/components/separator.d.ts +0 -0
  383. /package/dist/types/src/{styles → theme}/components/skeleton.d.ts +0 -0
  384. /package/dist/types/src/{styles → theme}/components/tag.d.ts +0 -0
  385. /package/dist/types/src/{styles → theme}/components/toast.d.ts +0 -0
  386. /package/dist/types/src/{styles → theme}/components/tooltip.d.ts +0 -0
  387. /package/dist/types/src/{styles → theme}/components/treegrid.d.ts +0 -0
  388. /package/dist/types/src/{styles → theme}/theme.d.ts +0 -0
  389. /package/src/{styles/fragments → fragments}/disabled.ts +0 -0
  390. /package/src/{styles → theme}/components/breadcrumb.ts +0 -0
@@ -1,265 +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
- 'prose-max-width': 'var(--dx-prose-max-width)',
42
- 'container-max-width': 'var(--dx-container-max-width)',
43
- 'card-default-width': 'var(--dx-card-default-width)',
44
- 'card-min-width': 'var(--dx-card-min-width)',
45
- 'card-max-width': 'var(--dx-card-max-width)',
46
- 'card-min-height': 'var(--dx-card-min-height)',
47
- 'card-max-height': 'var(--dx-card-max-height)',
48
- },
49
- backgroundImage: {
50
- 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
51
- 'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
52
- },
53
- borderRadius: {
54
- none: '0',
55
- sm: '0.25rem',
56
- DEFAULT: '0.5rem',
57
- md: '0.75rem',
58
- lg: '1rem',
59
- },
60
- screens: {
61
- 'pointer-fine': { raw: '(pointer: fine)' },
62
- 'hover-hover': { raw: '(hover: hover)' },
63
- 'md': '768px',
64
- 'lg': '1024px',
65
- },
66
- fontSize: {
67
- // Base size 16px
68
- // Scale 1.125
69
- 'xs': ['0.790rem', { lineHeight: '1rem' }],
70
- 'sm': ['0.889rem', { lineHeight: '1.25rem' }],
71
- 'base': ['1rem', { lineHeight: '1.5rem' }],
72
- 'lg': ['1.125rem', { lineHeight: '1.75rem' }],
73
- 'xl': ['1.266rem', { lineHeight: '1.75rem' }],
74
- '2xl': ['1.424rem', { lineHeight: '2rem' }],
75
- '3xl': ['1.602rem', { lineHeight: '2.25rem' }],
76
- '4xl': ['1.802rem', { lineHeight: '2.5rem' }],
77
- '5xl': ['2.027rem', { lineHeight: '2.5rem' }],
78
- '6xl': ['2.281rem', { lineHeight: '2.5rem' }],
79
- '7xl': ['2.566rem', { lineHeight: '2.75rem' }],
80
- '8xl': ['2.887rem', { lineHeight: '3rem' }],
81
- '9xl': ['3.247rem', { lineHeight: '3.25rem' }],
82
- },
83
- boxShadow: {
84
- 'slider': '0 0 0 5px rgba(0, 0, 0, 0.3)',
85
- },
86
- transitionProperty: {
87
- 'max-height': 'max-height',
88
- },
89
- transitionTimingFunction: {
90
- 'in-out-symmetric': 'cubic-bezier(0.5, 0, 0.5, 1)',
91
- },
92
- keyframes: {
93
- // Fade
94
- 'fade-in': {
95
- from: { opacity: 0 },
96
- to: { opacity: 1 },
97
- },
98
- 'fade-out': {
99
- from: { opacity: 1 },
100
- to: { opacity: 0 },
101
- },
102
-
103
- // Popper chrome
104
- 'slide-down-and-fade': {
105
- from: { opacity: 1, transform: 'translateY(0)' },
106
- to: { opacity: 0, transform: 'translateY(16px)' },
107
- },
108
- 'slide-left-and-fade': {
109
- from: { opacity: 0, transform: 'translateX(-16px)' },
110
- to: { opacity: 1, transform: 'translateX(0)' },
111
- },
112
- 'slide-up-and-fade': {
113
- from: { opacity: 0, transform: 'translateY(16px)' },
114
- to: { opacity: 1, transform: 'translateY(0)' },
115
- },
116
- 'slide-right-and-fade': {
117
- from: { opacity: 0, transform: 'translateX(16px)' },
118
- to: { opacity: 1, transform: 'translateX(0)' },
119
- },
120
-
121
- // Toast
122
- 'toast-hide': {
123
- '0%': { opacity: '1' },
124
- '100%': { opacity: '0' },
125
- },
126
- 'toast-slide-in-right': {
127
- '0%': { transform: 'translateX(calc(100% + 1rem))' },
128
- '100%': { transform: 'translateX(0)' },
129
- },
130
- 'toast-slide-in-bottom': {
131
- '0%': { transform: 'translateY(calc(100% + 1rem))' },
132
- '100%': { transform: 'translateY(0)' },
133
- },
134
- 'toast-swipe-out': {
135
- '0%': {
136
- transform: 'translateX(var(--radix-toast-swipe-end-x))',
137
- },
138
- '100%': {
139
- transform: 'translateX(calc(100% + 1rem))',
140
- },
141
- },
142
-
143
- // Accordion
144
- 'slide-down': {
145
- from: { height: '0px' },
146
- to: { height: 'var(--radix-accordion-content-height)' },
147
- },
148
- 'slide-up': {
149
- from: { height: 'var(--radix-accordion-content-height)' },
150
- to: { height: '0px' },
151
- },
152
-
153
- // Shimmer
154
- 'shimmer-loop': {
155
- '100%': {
156
- transform: 'translateX(100%)',
157
- },
158
- },
159
-
160
- // HALO
161
- 'halo-pulse': {
162
- '0%': {
163
- opacity: 0.3,
164
- },
165
- '5%': {
166
- opacity: 1,
167
- },
168
- '100%': {
169
- opacity: 0.3,
170
- },
171
- },
172
-
173
- // Progress
174
- 'progress-indeterminate': {
175
- '0%': {
176
- left: 0,
177
- width: '0%',
178
- },
179
- '25%': {
180
- left: '25%',
181
- width: '50%',
182
- },
183
- '75%': {
184
- left: '50%',
185
- width: '100%',
186
- },
187
- '100%': {
188
- left: '100%',
189
- width: '0%',
190
- },
191
- },
192
-
193
- // Border trail effect
194
- 'trail': {
195
- to: { 'offset-distance': '100%' },
196
- },
197
- 'trail-offset': {
198
- '0%': { 'offset-distance': '50%' },
199
- '100%': { 'offset-distance': '150%' },
200
- },
201
- },
202
- animation: {
203
- // Fade
204
- 'fade-in': 'fade-in 200ms ease-out',
205
- 'fade-out': 'fade-out 400ms ease-out',
206
-
207
- // Popper chrome
208
- 'slide-down-and-fade': 'slide-down-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
209
- 'slide-left-and-fade': 'slide-left-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
210
- 'slide-up-and-fade': 'slide-up-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
211
- 'slide-right-and-fade': 'slide-right-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
212
-
213
- // Toast
214
- 'toast-hide': 'toast-hide 100ms ease-in forwards',
215
- 'toast-slide-in-right': 'toast-slide-in-right 150ms cubic-bezier(0.16, 1, 0.3, 1)',
216
- 'toast-slide-in-bottom': 'toast-slide-in-bottom 150ms cubic-bezier(0.16, 1, 0.3, 1)',
217
- 'toast-swipe-out': 'toast-swipe-out 100ms ease-out forwards',
218
-
219
- // Accordion
220
- 'slide-down': 'slide-down 300ms cubic-bezier(0.87, 0, 0.13, 1)',
221
- 'slide-up': 'slide-up 300ms cubic-bezier(0.87, 0, 0.13, 1)',
222
-
223
- // Border trail effect
224
- 'trail': 'trail 6s linear infinite',
225
- 'trail-offset': 'trail-offset 6s linear infinite',
226
-
227
- // Progress effects
228
- 'spin': 'spin 1.5s linear infinite',
229
- 'spin-slow': 'spin 3s linear infinite',
230
- 'shimmer': 'shimmer-loop 2s infinite',
231
- 'halo-pulse': 'halo-pulse 2s ease-out infinite',
232
- 'progress-indeterminate': 'progress-indeterminate 2s ease-out infinite',
233
- 'progress-linear': 'progress-linear 2s ease-out infinite',
234
- },
235
- },
236
- extendTokens,
237
- ...extensions,
238
- ),
239
- ...overrideTokens,
240
- colors: {
241
- ...overrideTokens.colors,
242
- inherit: 'inherit',
243
- current: 'currentColor',
244
- transparent: 'transparent',
245
- black: 'black',
246
- white: 'white',
247
- },
248
- },
249
- plugins: [
250
- tailwindcssContainerQueries,
251
- tailwindcssForms,
252
- tailwindcssLogical,
253
- tailwindcssRadix(),
254
- // https://adoxography.github.io/tailwind-scrollbar/utilities
255
- tailwindScrollbar({
256
- nocompatible: true,
257
- preferredStrategy: 'pseudoelements',
258
- }),
259
- ],
260
- ...(env === 'development' && { mode: 'jit' }),
261
- content,
262
- future: {
263
- hoverOnlyWhenSupported: true,
264
- },
265
- });
@@ -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,6 +0,0 @@
1
- //
2
- // Copyright 2026 DXOS.org
3
- //
4
-
5
- export * from './sizes';
6
- export * from './tokens';
@@ -1,106 +0,0 @@
1
- //
2
-
3
- // Copyright 2025 DXOS.org
4
- //
5
-
6
- import { type Facet, type LinearPhysicalLayer } from '@ch-ui/tokens';
7
-
8
- import {
9
- cardDefaultInlineSize,
10
- cardMaxBlockSize,
11
- cardMaxInlineSize,
12
- cardMinBlockSize,
13
- cardMinInlineSize,
14
- } from './sizes';
15
-
16
- export const lengthsFacet = {
17
- physical: {
18
- namespace: 'dx-',
19
- conditions: { root: [':root'] },
20
- series: {
21
- line: {
22
- root: {
23
- unit: 'px',
24
- initial: 0,
25
- slope: 1,
26
- },
27
- },
28
- // "gap"
29
- lacuna: {
30
- root: {
31
- unit: 'rem',
32
- initial: 0,
33
- slope: 0.125,
34
- },
35
- },
36
- },
37
- } satisfies LinearPhysicalLayer,
38
-
39
- semantic: {
40
- namespace: 'dx-',
41
- conditions: { root: [':root'] },
42
- sememes: {
43
- noLine: { root: ['line', 0] },
44
- hairLine: { root: ['line', 1] },
45
- thickLine: { root: ['line', 2] },
46
- trimXs: { root: ['lacuna', 3] },
47
- trimSm: { root: ['lacuna', 4] },
48
- trimMd: { root: ['lacuna', 6] },
49
- trimLg: { root: ['lacuna', 12] },
50
- inputFine: { root: ['lacuna', 3] },
51
- inputCoarse: { root: ['lacuna', 4] },
52
- },
53
- },
54
-
55
- alias: {
56
- namespace: 'dx-',
57
- conditions: {
58
- fine: [':root, .density-fine'],
59
- coarse: ['.density-coarse'],
60
- flush: ['.density-flush'],
61
- gridFocusStack: ['[data-grid-focus-indicator-variant="stack"]'],
62
- },
63
- aliases: {
64
- noLine: { fine: ['focusOffset'] },
65
- hairLine: { fine: ['modalLine', 'landmarkLine', 'positionedLine', 'gridGap', 'gridFocusIndicatorWidth'] },
66
- thickLine: { fine: ['focusLine'], gridFocusStack: ['gridFocusIndicatorWidth'] },
67
- inputFine: { fine: ['iconButtonPadding'] },
68
- inputCoarse: { coarse: ['iconButtonPadding'] },
69
-
70
- trimXs: { fine: ['cardSpacingChrome', 'labelSpacingBlock', 'inputSpacingBlock'] },
71
- // TODO(burdon): Remove?
72
- trimSm: { fine: ['cardSpacingInline', 'cardSpacingBlock', 'cardSpacingGap'] },
73
- trimMd: { coarse: ['cardSpacingInline', 'cardSpacingBlock', 'cardSpacingGap'] },
74
- },
75
- },
76
- } satisfies Facet;
77
-
78
- export const maxSizesFacet = {
79
- physical: {
80
- namespace: 'dx-',
81
- conditions: { root: [':root'] },
82
- series: {
83
- size: {
84
- root: {
85
- unit: 'rem',
86
- initial: 0,
87
- slope: 1,
88
- },
89
- },
90
- },
91
- } satisfies LinearPhysicalLayer,
92
-
93
- semantic: {
94
- namespace: 'dx-',
95
- conditions: { root: [':root'] },
96
- sememes: {
97
- 'prose-max-width': { root: ['size', 50] },
98
- 'container-max-width': { root: ['size', 50] },
99
- 'card-default-width': { root: ['size', cardDefaultInlineSize] },
100
- 'card-min-width': { root: ['size', cardMinInlineSize] },
101
- 'card-max-width': { root: ['size', cardMaxInlineSize] },
102
- 'card-min-height': { root: ['size', cardMinBlockSize] },
103
- 'card-max-height': { root: ['size', cardMaxBlockSize] },
104
- },
105
- },
106
- } 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
- };
@@ -1,50 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import { type ColorSememes } from './types';
6
-
7
- export const codemirrorSememes = {
8
- // NOTE: background styles for the main content area must have transparency otherwise they will mask the selection.
9
- cmCodeblock: {
10
- light: ['neutral', '500/.1'],
11
- dark: ['neutral', '500/.1'],
12
- },
13
- cmActiveLine: {
14
- light: ['neutral', '200/.5'],
15
- dark: ['neutral', '800/.5'],
16
- },
17
- cmSeparator: {
18
- light: ['primary', 500],
19
- dark: ['primary', 500],
20
- },
21
- cmCursor: {
22
- light: ['neutral', 900],
23
- dark: ['neutral', 100],
24
- },
25
- cmSelection: {
26
- light: ['primary', '400/.5'],
27
- dark: ['primary', '600/.5'],
28
- },
29
- cmFocusedSelection: {
30
- light: ['primary', 400],
31
- dark: ['primary', 600],
32
- },
33
- cmHighlight: {
34
- light: ['neutral', 950],
35
- dark: ['neutral', 50],
36
- },
37
- cmHighlightSurface: {
38
- light: ['sky', 200],
39
- dark: ['cyan', 600],
40
- },
41
- // TODO(burdon): Factor out defs in common with sheet.
42
- cmCommentText: {
43
- light: ['neutral', 50],
44
- dark: ['neutral', 950],
45
- },
46
- cmCommentSurface: {
47
- light: ['amber', 700],
48
- dark: ['amber', 200],
49
- },
50
- } satisfies ColorSememes;
@@ -1,54 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import { huePalettes } from './physical-colors';
6
- import { type ColorAliases, type ColorSememes } from './types';
7
-
8
- export const hueSememes: ColorSememes = [...Object.keys(huePalettes), 'neutral', 'primary'].reduce(
9
- (acc: ColorSememes, palette) => {
10
- acc[`${palette}Cursor`] = {
11
- light: [palette, 400],
12
- dark: [palette, 300],
13
- };
14
- acc[`${palette}Text`] = {
15
- light: [palette, 550],
16
- dark: [palette, 300],
17
- };
18
- acc[`${palette}Fill`] = {
19
- light: [palette, 500],
20
- dark: [palette, 500],
21
- };
22
- acc[`${palette}Surface`] = {
23
- light: [palette, 200],
24
- dark: [palette, 700],
25
- };
26
- acc[`${palette}SurfaceText`] = {
27
- light: [palette, 700],
28
- dark: [palette, 200],
29
- };
30
- acc[`${palette}Screen`] = {
31
- light: [palette, 100],
32
- dark: [palette, 800],
33
- };
34
- return acc;
35
- },
36
- {},
37
- );
38
-
39
- const valenceAliasSememeStems = ['Text', 'Surface', 'SurfaceText', 'Fill', 'Cursor'];
40
- const valenceMapping = {
41
- emerald: ['success'],
42
- cyan: ['info'],
43
- amber: ['warning'],
44
- rose: ['error'],
45
- primary: ['current'],
46
- fuchsia: ['internal'],
47
- };
48
-
49
- export const valenceAliases: ColorAliases = valenceAliasSememeStems.reduce((acc: ColorAliases, stem) => {
50
- return Object.entries(valenceMapping).reduce((acc: ColorAliases, [hue, valences]) => {
51
- acc[`${hue}${stem}`] = { root: valences.map((valence) => `${valence}${stem}`) };
52
- return acc;
53
- }, acc);
54
- }, {});