@ohos-ports/dxos-react-ui-theme 0.8.3-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +25 -0
  3. package/README.yml +1 -0
  4. package/dist/lib/browser/index.mjs +3199 -0
  5. package/dist/lib/browser/index.mjs.map +7 -0
  6. package/dist/lib/browser/meta.json +1 -0
  7. package/dist/plugin/node/chunk-3IKFINB6.cjs +1500 -0
  8. package/dist/plugin/node/chunk-3IKFINB6.cjs.map +7 -0
  9. package/dist/plugin/node/chunk-QA5KMUXP.cjs +70 -0
  10. package/dist/plugin/node/chunk-QA5KMUXP.cjs.map +7 -0
  11. package/dist/plugin/node/config/tailwind.cjs +29 -0
  12. package/dist/plugin/node/config/tailwind.cjs.map +7 -0
  13. package/dist/plugin/node/meta.json +1 -0
  14. package/dist/plugin/node/plugins/esbuild-plugin.cjs +90 -0
  15. package/dist/plugin/node/plugins/esbuild-plugin.cjs.map +7 -0
  16. package/dist/plugin/node/plugins/plugin.cjs +123 -0
  17. package/dist/plugin/node/plugins/plugin.cjs.map +7 -0
  18. package/dist/plugin/node/theme.css +1223 -0
  19. package/dist/plugin/node/theme.css.map +7 -0
  20. package/dist/plugin/node-esm/chunk-LNTZCFPD.mjs +1493 -0
  21. package/dist/plugin/node-esm/chunk-LNTZCFPD.mjs.map +7 -0
  22. package/dist/plugin/node-esm/chunk-TFKSVC5U.mjs +50 -0
  23. package/dist/plugin/node-esm/chunk-TFKSVC5U.mjs.map +7 -0
  24. package/dist/plugin/node-esm/config/tailwind.mjs +8 -0
  25. package/dist/plugin/node-esm/config/tailwind.mjs.map +7 -0
  26. package/dist/plugin/node-esm/meta.json +1 -0
  27. package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs +63 -0
  28. package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs.map +7 -0
  29. package/dist/plugin/node-esm/plugins/plugin.mjs +97 -0
  30. package/dist/plugin/node-esm/plugins/plugin.mjs.map +7 -0
  31. package/dist/plugin/node-esm/theme.css +1223 -0
  32. package/dist/plugin/node-esm/theme.css.map +7 -0
  33. package/dist/types/src/config/index.d.ts +3 -0
  34. package/dist/types/src/config/index.d.ts.map +1 -0
  35. package/dist/types/src/config/tailwind.d.ts +9 -0
  36. package/dist/types/src/config/tailwind.d.ts.map +1 -0
  37. package/dist/types/src/config/tokens/Tokens.stories.d.ts +7 -0
  38. package/dist/types/src/config/tokens/Tokens.stories.d.ts.map +1 -0
  39. package/dist/types/src/config/tokens/alias-colors.d.ts +14 -0
  40. package/dist/types/src/config/tokens/alias-colors.d.ts.map +1 -0
  41. package/dist/types/src/config/tokens/index.d.ts +438 -0
  42. package/dist/types/src/config/tokens/index.d.ts.map +1 -0
  43. package/dist/types/src/config/tokens/lengths.d.ts +116 -0
  44. package/dist/types/src/config/tokens/lengths.d.ts.map +1 -0
  45. package/dist/types/src/config/tokens/physical-colors.d.ts +23 -0
  46. package/dist/types/src/config/tokens/physical-colors.d.ts.map +1 -0
  47. package/dist/types/src/config/tokens/semantic-colors.d.ts +179 -0
  48. package/dist/types/src/config/tokens/semantic-colors.d.ts.map +1 -0
  49. package/dist/types/src/config/tokens/sememes-calls.d.ts +3 -0
  50. package/dist/types/src/config/tokens/sememes-calls.d.ts.map +1 -0
  51. package/dist/types/src/config/tokens/sememes-codemirror.d.ts +43 -0
  52. package/dist/types/src/config/tokens/sememes-codemirror.d.ts.map +1 -0
  53. package/dist/types/src/config/tokens/sememes-hue.d.ts +4 -0
  54. package/dist/types/src/config/tokens/sememes-hue.d.ts.map +1 -0
  55. package/dist/types/src/config/tokens/sememes-sheet.d.ts +52 -0
  56. package/dist/types/src/config/tokens/sememes-sheet.d.ts.map +1 -0
  57. package/dist/types/src/config/tokens/sememes-system.d.ts +91 -0
  58. package/dist/types/src/config/tokens/sememes-system.d.ts.map +1 -0
  59. package/dist/types/src/config/tokens/types.d.ts +5 -0
  60. package/dist/types/src/config/tokens/types.d.ts.map +1 -0
  61. package/dist/types/src/index.d.ts +8 -0
  62. package/dist/types/src/index.d.ts.map +1 -0
  63. package/dist/types/src/plugins/esbuild-plugin.d.ts +9 -0
  64. package/dist/types/src/plugins/esbuild-plugin.d.ts.map +1 -0
  65. package/dist/types/src/plugins/plugin.d.ts +17 -0
  66. package/dist/types/src/plugins/plugin.d.ts.map +1 -0
  67. package/dist/types/src/plugins/resolveContent.d.ts +2 -0
  68. package/dist/types/src/plugins/resolveContent.d.ts.map +1 -0
  69. package/dist/types/src/styles/components/anchored-overflow.d.ts +6 -0
  70. package/dist/types/src/styles/components/anchored-overflow.d.ts.map +1 -0
  71. package/dist/types/src/styles/components/avatar.d.ts +21 -0
  72. package/dist/types/src/styles/components/avatar.d.ts.map +1 -0
  73. package/dist/types/src/styles/components/breadcrumb.d.ts +9 -0
  74. package/dist/types/src/styles/components/breadcrumb.d.ts.map +1 -0
  75. package/dist/types/src/styles/components/button.d.ts +19 -0
  76. package/dist/types/src/styles/components/button.d.ts.map +1 -0
  77. package/dist/types/src/styles/components/dialog.d.ts +12 -0
  78. package/dist/types/src/styles/components/dialog.d.ts.map +1 -0
  79. package/dist/types/src/styles/components/icon-button.d.ts +5 -0
  80. package/dist/types/src/styles/components/icon-button.d.ts.map +1 -0
  81. package/dist/types/src/styles/components/icon.d.ts +7 -0
  82. package/dist/types/src/styles/components/icon.d.ts.map +1 -0
  83. package/dist/types/src/styles/components/index.d.ts +24 -0
  84. package/dist/types/src/styles/components/index.d.ts.map +1 -0
  85. package/dist/types/src/styles/components/input.d.ts +111 -0
  86. package/dist/types/src/styles/components/input.d.ts.map +1 -0
  87. package/dist/types/src/styles/components/link.d.ts +7 -0
  88. package/dist/types/src/styles/components/link.d.ts.map +1 -0
  89. package/dist/types/src/styles/components/list.d.ts +14 -0
  90. package/dist/types/src/styles/components/list.d.ts.map +1 -0
  91. package/dist/types/src/styles/components/main.d.ts +28 -0
  92. package/dist/types/src/styles/components/main.d.ts.map +1 -0
  93. package/dist/types/src/styles/components/menu.d.ts +13 -0
  94. package/dist/types/src/styles/components/menu.d.ts.map +1 -0
  95. package/dist/types/src/styles/components/message.d.ts +11 -0
  96. package/dist/types/src/styles/components/message.d.ts.map +1 -0
  97. package/dist/types/src/styles/components/popover.d.ts +11 -0
  98. package/dist/types/src/styles/components/popover.d.ts.map +1 -0
  99. package/dist/types/src/styles/components/scroll-area.d.ts +9 -0
  100. package/dist/types/src/styles/components/scroll-area.d.ts.map +1 -0
  101. package/dist/types/src/styles/components/select.d.ts +14 -0
  102. package/dist/types/src/styles/components/select.d.ts.map +1 -0
  103. package/dist/types/src/styles/components/separator.d.ts +8 -0
  104. package/dist/types/src/styles/components/separator.d.ts.map +1 -0
  105. package/dist/types/src/styles/components/status.d.ts +9 -0
  106. package/dist/types/src/styles/components/status.d.ts.map +1 -0
  107. package/dist/types/src/styles/components/tag.d.ts +7 -0
  108. package/dist/types/src/styles/components/tag.d.ts.map +1 -0
  109. package/dist/types/src/styles/components/toast.d.ts +12 -0
  110. package/dist/types/src/styles/components/toast.d.ts.map +1 -0
  111. package/dist/types/src/styles/components/toolbar.d.ts +8 -0
  112. package/dist/types/src/styles/components/toolbar.d.ts.map +1 -0
  113. package/dist/types/src/styles/components/tooltip.d.ts +8 -0
  114. package/dist/types/src/styles/components/tooltip.d.ts.map +1 -0
  115. package/dist/types/src/styles/components/treegrid.d.ts +10 -0
  116. package/dist/types/src/styles/components/treegrid.d.ts.map +1 -0
  117. package/dist/types/src/styles/fragments/density.d.ts +13 -0
  118. package/dist/types/src/styles/fragments/density.d.ts.map +1 -0
  119. package/dist/types/src/styles/fragments/dimension.d.ts +5 -0
  120. package/dist/types/src/styles/fragments/dimension.d.ts.map +1 -0
  121. package/dist/types/src/styles/fragments/disabled.d.ts +3 -0
  122. package/dist/types/src/styles/fragments/disabled.d.ts.map +1 -0
  123. package/dist/types/src/styles/fragments/elevation.d.ts +15 -0
  124. package/dist/types/src/styles/fragments/elevation.d.ts.map +1 -0
  125. package/dist/types/src/styles/fragments/focus.d.ts +6 -0
  126. package/dist/types/src/styles/fragments/focus.d.ts.map +1 -0
  127. package/dist/types/src/styles/fragments/group.d.ts +5 -0
  128. package/dist/types/src/styles/fragments/group.d.ts.map +1 -0
  129. package/dist/types/src/styles/fragments/hover.d.ts +16 -0
  130. package/dist/types/src/styles/fragments/hover.d.ts.map +1 -0
  131. package/dist/types/src/styles/fragments/index.d.ts +17 -0
  132. package/dist/types/src/styles/fragments/index.d.ts.map +1 -0
  133. package/dist/types/src/styles/fragments/layout.d.ts +3 -0
  134. package/dist/types/src/styles/fragments/layout.d.ts.map +1 -0
  135. package/dist/types/src/styles/fragments/motion.d.ts +2 -0
  136. package/dist/types/src/styles/fragments/motion.d.ts.map +1 -0
  137. package/dist/types/src/styles/fragments/ornament.d.ts +5 -0
  138. package/dist/types/src/styles/fragments/ornament.d.ts.map +1 -0
  139. package/dist/types/src/styles/fragments/selected.d.ts +13 -0
  140. package/dist/types/src/styles/fragments/selected.d.ts.map +1 -0
  141. package/dist/types/src/styles/fragments/shimmer.d.ts +3 -0
  142. package/dist/types/src/styles/fragments/shimmer.d.ts.map +1 -0
  143. package/dist/types/src/styles/fragments/size.d.ts +9 -0
  144. package/dist/types/src/styles/fragments/size.d.ts.map +1 -0
  145. package/dist/types/src/styles/fragments/surface.d.ts +9 -0
  146. package/dist/types/src/styles/fragments/surface.d.ts.map +1 -0
  147. package/dist/types/src/styles/fragments/text.d.ts +7 -0
  148. package/dist/types/src/styles/fragments/text.d.ts.map +1 -0
  149. package/dist/types/src/styles/fragments/valence.d.ts +13 -0
  150. package/dist/types/src/styles/fragments/valence.d.ts.map +1 -0
  151. package/dist/types/src/styles/index.d.ts +4 -0
  152. package/dist/types/src/styles/index.d.ts.map +1 -0
  153. package/dist/types/src/styles/theme.d.ts +5 -0
  154. package/dist/types/src/styles/theme.d.ts.map +1 -0
  155. package/dist/types/src/tailwind.d.ts +1 -0
  156. package/dist/types/src/tailwind.d.ts.map +1 -0
  157. package/dist/types/src/types.d.ts +3 -0
  158. package/dist/types/src/types.d.ts.map +1 -0
  159. package/dist/types/src/util/hash.d.ts +8 -0
  160. package/dist/types/src/util/hash.d.ts.map +1 -0
  161. package/dist/types/src/util/index.d.ts +3 -0
  162. package/dist/types/src/util/index.d.ts.map +1 -0
  163. package/dist/types/src/util/mx.d.ts +2 -0
  164. package/dist/types/src/util/mx.d.ts.map +1 -0
  165. package/dist/types/src/util/withLogical.d.ts +164 -0
  166. package/dist/types/src/util/withLogical.d.ts.map +1 -0
  167. package/dist/types/tsconfig.tsbuildinfo +1 -0
  168. package/package.json +58 -0
  169. package/plugin.d.ts +7 -0
  170. package/plugin.js +10 -0
  171. package/src/config/index.ts +6 -0
  172. package/src/config/tailwind.ts +236 -0
  173. package/src/config/tokens/Tokens.stories.tsx +94 -0
  174. package/src/config/tokens/alias-colors.ts +38 -0
  175. package/src/config/tokens/index.ts +90 -0
  176. package/src/config/tokens/lengths.ts +87 -0
  177. package/src/config/tokens/physical-colors.ts +125 -0
  178. package/src/config/tokens/semantic-colors.ts +27 -0
  179. package/src/config/tokens/sememes-calls.ts +17 -0
  180. package/src/config/tokens/sememes-codemirror.ts +50 -0
  181. package/src/config/tokens/sememes-hue.ts +54 -0
  182. package/src/config/tokens/sememes-sheet.ts +60 -0
  183. package/src/config/tokens/sememes-system.ts +255 -0
  184. package/src/config/tokens/types.ts +9 -0
  185. package/src/index.ts +15 -0
  186. package/src/plugins/esbuild-plugin.ts +60 -0
  187. package/src/plugins/plugin.ts +127 -0
  188. package/src/plugins/resolveContent.ts +55 -0
  189. package/src/styles/components/README.md +6 -0
  190. package/src/styles/components/anchored-overflow.ts +20 -0
  191. package/src/styles/components/avatar.ts +96 -0
  192. package/src/styles/components/breadcrumb.ts +29 -0
  193. package/src/styles/components/button.ts +48 -0
  194. package/src/styles/components/dialog.ts +36 -0
  195. package/src/styles/components/icon-button.ts +17 -0
  196. package/src/styles/components/icon.ts +19 -0
  197. package/src/styles/components/index.ts +27 -0
  198. package/src/styles/components/input.ts +176 -0
  199. package/src/styles/components/link.ts +26 -0
  200. package/src/styles/components/list.ts +46 -0
  201. package/src/styles/components/main.ts +36 -0
  202. package/src/styles/components/menu.ts +60 -0
  203. package/src/styles/components/message.ts +36 -0
  204. package/src/styles/components/popover.ts +40 -0
  205. package/src/styles/components/scroll-area.ts +42 -0
  206. package/src/styles/components/select.ts +64 -0
  207. package/src/styles/components/separator.ts +24 -0
  208. package/src/styles/components/status.ts +32 -0
  209. package/src/styles/components/tag.ts +23 -0
  210. package/src/styles/components/toast.ts +55 -0
  211. package/src/styles/components/toolbar.ts +20 -0
  212. package/src/styles/components/tooltip.ts +29 -0
  213. package/src/styles/components/treegrid.ts +37 -0
  214. package/src/styles/fragments/density.ts +17 -0
  215. package/src/styles/fragments/dimension.ts +8 -0
  216. package/src/styles/fragments/disabled.ts +6 -0
  217. package/src/styles/fragments/elevation.ts +29 -0
  218. package/src/styles/fragments/focus.ts +16 -0
  219. package/src/styles/fragments/group.ts +12 -0
  220. package/src/styles/fragments/hover.ts +24 -0
  221. package/src/styles/fragments/index.ts +20 -0
  222. package/src/styles/fragments/layout.ts +7 -0
  223. package/src/styles/fragments/motion.ts +6 -0
  224. package/src/styles/fragments/ornament.ts +10 -0
  225. package/src/styles/fragments/selected.ts +45 -0
  226. package/src/styles/fragments/shimmer.ts +9 -0
  227. package/src/styles/fragments/size.ts +117 -0
  228. package/src/styles/fragments/surface.ts +29 -0
  229. package/src/styles/fragments/text.ts +13 -0
  230. package/src/styles/fragments/valence.ts +48 -0
  231. package/src/styles/index.ts +7 -0
  232. package/src/styles/layers/anchored-overflow.css +9 -0
  233. package/src/styles/layers/attention.css +8 -0
  234. package/src/styles/layers/base.css +25 -0
  235. package/src/styles/layers/button.css +76 -0
  236. package/src/styles/layers/can-scroll.css +26 -0
  237. package/src/styles/layers/checkbox.css +50 -0
  238. package/src/styles/layers/dialog.css +42 -0
  239. package/src/styles/layers/drag-preview.css +18 -0
  240. package/src/styles/layers/focus-ring.css +129 -0
  241. package/src/styles/layers/hues.css +110 -0
  242. package/src/styles/layers/index.css +21 -0
  243. package/src/styles/layers/main.css +162 -0
  244. package/src/styles/layers/native.css +14 -0
  245. package/src/styles/layers/positioning.css +23 -0
  246. package/src/styles/layers/size.css +299 -0
  247. package/src/styles/layers/surfaces.css +31 -0
  248. package/src/styles/layers/tag.css +123 -0
  249. package/src/styles/layers/tldraw.css +91 -0
  250. package/src/styles/layers/tokens.css +44 -0
  251. package/src/styles/layers/typography.css +152 -0
  252. package/src/styles/theme.ts +69 -0
  253. package/src/tailwind.ts +5 -0
  254. package/src/theme.css +5 -0
  255. package/src/types.ts +7 -0
  256. package/src/typings.d.ts +8 -0
  257. package/src/util/hash.ts +39 -0
  258. package/src/util/index.ts +6 -0
  259. package/src/util/mx.ts +34 -0
  260. package/src/util/withLogical.ts +114 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/config/tailwind.ts", "../../../src/config/tokens/index.ts", "../../../src/config/tokens/physical-colors.ts", "../../../src/config/tokens/sememes-hue.ts", "../../../src/config/tokens/sememes-sheet.ts", "../../../src/config/tokens/sememes-system.ts", "../../../src/config/tokens/alias-colors.ts", "../../../src/config/tokens/lengths.ts", "../../../src/config/tokens/sememes-calls.ts", "../../../src/config/tokens/sememes-codemirror.ts", "../../../src/config/tokens/semantic-colors.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport tailwindContainers from '@tailwindcss/container-queries';\nimport tailwindcssForms from '@tailwindcss/forms';\nimport merge from 'lodash.merge';\nimport tailwindScrollbar from 'tailwind-scrollbar';\nimport defaultConfig from 'tailwindcss/stubs/config.full.js';\nimport { type Config, type ThemeConfig } from 'tailwindcss/types/config';\nimport tailwindcssLogical from 'tailwindcss-logical';\nimport tailwindcssRadix from 'tailwindcss-radix';\n\nimport { tokensTailwindConfig } from './tokens';\n\nexport type TailwindConfig = Config;\nexport type TailwindThemeConfig = ThemeConfig;\n\nconst { extend: extendTokens, ...overrideTokens } = tokensTailwindConfig;\n\nexport const tailwindConfig = ({\n env = 'production',\n content = [],\n extensions = [],\n}: {\n env?: string;\n content?: string[];\n extensions?: Partial<TailwindThemeConfig>[];\n}): TailwindConfig => ({\n darkMode: 'class',\n theme: {\n // Configure fonts in theme.css and package.json.\n fontFamily: {\n body: ['Inter Variable', ...defaultConfig.theme.fontFamily.sans],\n mono: ['JetBrains Mono Variable', ...defaultConfig.theme.fontFamily.mono],\n },\n extend: merge(\n {\n spacing: {\n prose: 'var(--dx-prose)',\n containerMaxWidth: 'var(--dx-containerMaxWidth)',\n popoverMaxWidth: 'var(--dx-popoverMaxWidth)',\n },\n borderRadius: {\n none: '0',\n sm: '0.25rem',\n DEFAULT: '0.5rem',\n md: '.75rem',\n lg: '1rem',\n },\n screens: {\n 'pointer-fine': { raw: '(pointer: fine)' },\n 'hover-hover': { raw: '(hover: hover)' },\n },\n fontSize: {\n // Base size 16px\n // Scale 1.125\n xs: ['0.790rem', { lineHeight: '1rem' }],\n sm: ['0.889rem', { lineHeight: '1.25rem' }],\n base: ['1rem', { lineHeight: '1.5rem' }],\n lg: ['1.125rem', { lineHeight: '1.75rem' }],\n xl: ['1.266rem', { lineHeight: '1.75rem' }],\n '2xl': ['1.424rem', { lineHeight: '2rem' }],\n '3xl': ['1.602rem', { lineHeight: '2.25rem' }],\n '4xl': ['1.802rem', { lineHeight: '2.5rem' }],\n '5xl': ['2.027rem', { lineHeight: '2.5rem' }],\n '6xl': ['2.281rem', { lineHeight: '2.5rem' }],\n '7xl': ['2.566rem', { lineHeight: '2.75rem' }],\n '8xl': ['2.887rem', { lineHeight: '3rem' }],\n '9xl': ['3.247rem', { lineHeight: '3.25rem' }],\n },\n boxShadow: {\n slider: '0 0 0 5px rgba(0, 0, 0, 0.3)',\n },\n transitionProperty: {\n 'max-height': 'max-height',\n },\n transitionTimingFunction: {\n 'in-out-symmetric': 'cubic-bezier(0.5,0,0.5,1)',\n },\n keyframes: {\n // Popper chrome\n slideDownAndFade: {\n from: { opacity: 0, transform: 'translateY(-2px)' },\n to: { opacity: 1, transform: 'translateY(0)' },\n },\n slideLeftAndFade: {\n from: { opacity: 0, transform: 'translateX(2px)' },\n to: { opacity: 1, transform: 'translateX(0)' },\n },\n slideUpAndFade: {\n from: { opacity: 0, transform: 'translateY(2px)' },\n to: { opacity: 1, transform: 'translateY(0)' },\n },\n slideRightAndFade: {\n from: { opacity: 0, transform: 'translateX(-2px)' },\n to: { opacity: 1, transform: 'translateX(0)' },\n },\n fadeIn: {\n from: { opacity: 0 },\n to: { opacity: 1 },\n },\n // Accordion\n slideDown: {\n from: { height: '0px' },\n to: { height: 'var(--radix-accordion-content-height)' },\n },\n slideUp: {\n from: { height: 'var(--radix-accordion-content-height)' },\n to: { height: '0px' },\n },\n\n // Toast\n 'toast-hide': {\n '0%': { opacity: '1' },\n '100%': { opacity: '0' },\n },\n 'toast-slide-in-right': {\n '0%': { transform: 'translateX(calc(100% + 1rem))' },\n '100%': { transform: 'translateX(0)' },\n },\n 'toast-slide-in-bottom': {\n '0%': { transform: 'translateY(calc(100% + 1rem))' },\n '100%': { transform: 'translateY(0)' },\n },\n 'toast-swipe-out': {\n '0%': {\n transform: 'translateX(var(--radix-toast-swipe-end-x))',\n },\n '100%': {\n transform: 'translateX(calc(100% + 1rem))',\n },\n },\n\n // Shimmer\n 'shimmer-loop': {\n '100%': {\n transform: 'translateX(100%)',\n },\n },\n\n 'halo-pulse': {\n '0%': {\n opacity: 0.3,\n },\n '5%': {\n opacity: 1,\n },\n '100%': {\n opacity: 0.3,\n },\n },\n\n 'progress-indeterminate': {\n '0%': {\n left: 0,\n width: '0%',\n },\n '25%': {\n left: '25%',\n width: '50%',\n },\n '75%': {\n left: '50%',\n width: '100%',\n },\n '100%': {\n left: '100%',\n width: '0%',\n },\n },\n\n 'progress-linear': {\n '0%': {\n transform: 'translateX(-100%)',\n },\n '85%, 100%': {\n transform: `translateX(${(100 / 28) * 100}%)`,\n },\n },\n },\n animation: {\n 'fade-in': 'fadeIn 100ms ease-in forwards',\n\n // Popper chrome\n slideDownAndFade: 'slideDownAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',\n slideLeftAndFade: 'slideLeftAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',\n slideUpAndFade: 'slideUpAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',\n slideRightAndFade: 'slideRightAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',\n\n // Toast\n 'toast-hide': 'toast-hide 100ms ease-in forwards',\n 'toast-slide-in-right': 'toast-slide-in-right 150ms cubic-bezier(0.16, 1, 0.3, 1)',\n 'toast-slide-in-bottom': 'toast-slide-in-bottom 150ms cubic-bezier(0.16, 1, 0.3, 1)',\n 'toast-swipe-out': 'toast-swipe-out 100ms ease-out forwards',\n\n // Accordion\n slideDown: 'slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1)',\n slideUp: 'slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1)',\n\n spin: 'spin 1.5s linear infinite',\n 'spin-slow': 'spin 3s linear infinite',\n\n shimmer: 'shimmer-loop 2s infinite',\n 'halo-pulse': 'halo-pulse 2s ease-out infinite',\n 'progress-indeterminate': 'progress-indeterminate 2s ease-out infinite',\n 'progress-linear': 'progress-linear 2s ease-out infinite',\n },\n },\n extendTokens,\n ...extensions,\n ),\n ...overrideTokens,\n colors: {\n ...overrideTokens.colors,\n inherit: 'inherit',\n current: 'currentColor',\n transparent: 'transparent',\n black: 'black',\n white: 'white',\n },\n },\n plugins: [\n tailwindcssLogical,\n tailwindcssForms,\n tailwindcssRadix(),\n tailwindContainers,\n // https://adoxography.github.io/tailwind-scrollbar/utilities\n tailwindScrollbar,\n ],\n ...(env === 'development' && { mode: 'jit' }),\n content,\n future: {\n hoverOnlyWhenSupported: true,\n },\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type TailwindAdapterConfig } from '@ch-ui/tailwind-tokens';\nimport adapter from '@ch-ui/tailwind-tokens';\nimport { type TokenSet } from '@ch-ui/tokens';\n\nimport { aliasColors } from './alias-colors';\nimport { lengthsFacet, maxSizesFacet } from './lengths';\nimport { huePalettes, physicalColors } from './physical-colors';\nimport { semanticColors } from './semantic-colors';\nimport { systemAliases, systemSememes } from './sememes-system';\n\nexport const tokenSet = {\n colors: {\n physical: physicalColors,\n semantic: semanticColors,\n alias: aliasColors,\n },\n lengths: lengthsFacet,\n maxSizes: maxSizesFacet,\n} satisfies TokenSet;\n\nexport const hues = Object.keys(huePalettes);\n\nconst adapterConfig: TailwindAdapterConfig = {\n colors: {\n facet: 'colors',\n disposition: 'overwrite',\n tokenization: 'recursive',\n },\n borderWidth: {\n facet: 'lengths',\n disposition: 'extend',\n tokenization: 'omit-series',\n },\n ringWidth: {\n facet: 'lengths',\n disposition: 'extend',\n tokenization: 'omit-series',\n },\n ringOffsetWidth: {\n facet: 'lengths',\n disposition: 'extend',\n tokenization: 'omit-series',\n },\n outlineWidth: {\n facet: 'lengths',\n disposition: 'extend',\n tokenization: 'omit-series',\n },\n spacing: {\n facet: 'lengths',\n disposition: 'extend',\n tokenization: 'keep-series',\n },\n};\n\nexport const userDefaultTokenSet = {\n colors: {\n physical: {\n definitions: {\n series: {\n neutral: physicalColors.definitions!.series!.neutral,\n primary: physicalColors.definitions!.series!.primary,\n },\n accompanyingSeries: physicalColors.definitions!.accompanyingSeries,\n },\n conditions: physicalColors.conditions,\n series: {\n neutral: physicalColors.series.neutral,\n primary: physicalColors.series.primary,\n },\n namespace: physicalColors.namespace,\n },\n semantic: {\n conditions: semanticColors.conditions,\n sememes: systemSememes,\n namespace: semanticColors.namespace,\n },\n alias: {\n conditions: aliasColors.conditions,\n aliases: systemAliases,\n namespace: aliasColors.namespace,\n },\n },\n} satisfies TokenSet;\n\nexport const tokensTailwindConfig = adapter(tokenSet, adapterConfig);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { AccompanyingSeries, ColorsPhysicalLayer, Gamut, HelicalArcSeries, PhysicalSeries } from '@ch-ui/tokens';\n\nimport { type PhysicalPalette } from './types';\n\nconst reflectiveRelation = {\n initial: 1_000,\n slope: -1_000,\n method: 'floor',\n} satisfies AccompanyingSeries;\n\nconst gamuts: (Gamut & string)[] = ['srgb', 'p3', 'rec2020'];\n\nconst DEG_RAD = Math.PI / 180;\n\n/**\n * Creates a color palette configuration for a given hue value.\n *\n * @param hue - A number from 0-16 representing different hue angles\n * @returns A PhysicalPalette configuration with:\n * - keyPoint: [lightness, chroma, hue] in LCH color space\n * - lightness: Fixed at 0.5 (50%)\n * - chroma: Varies sinusoidally around 0.13 based on hue angle\n * - hue: Calculated by mapping input 0-16 to 26-386 degrees\n * - Control points and torsion for color interpolation\n */\nconst hueKeyPoint = (hue: number): PhysicalPalette => {\n const hueDeg = (360 * (hue / 17) + 26) % 360;\n return {\n keyPoint: [0.5, 0.13 + 0.024 * Math.sin((hueDeg - 15) * DEG_RAD), hueDeg],\n lowerCp: 1,\n upperCp: 1,\n torsion: 0,\n };\n};\n\nexport const huePalettes = {\n red: hueKeyPoint(0),\n orange: hueKeyPoint(1),\n amber: hueKeyPoint(2),\n yellow: hueKeyPoint(3),\n lime: hueKeyPoint(4),\n green: hueKeyPoint(5),\n emerald: hueKeyPoint(6),\n teal: hueKeyPoint(7),\n cyan: hueKeyPoint(8),\n sky: hueKeyPoint(9),\n blue: hueKeyPoint(10),\n indigo: hueKeyPoint(11),\n violet: hueKeyPoint(12),\n purple: hueKeyPoint(13),\n fuchsia: hueKeyPoint(14),\n pink: hueKeyPoint(15),\n rose: hueKeyPoint(16),\n};\n\n/**\n * The keyPoint represents the LCH value:\n * - Lightness: 0-1, should usually set the keyPoint at or near 0.5\n * - Chroma: min 0, max 0.08–0.5 depending on hue and gamut, theme will clamp final value to within gamut’s range\n * - Hue: 0-360 (~26 “red”, ~141 “green”, ~262 “blue”)\n *\n * NOTE: Rebuild the theme and restart the dev server to see changes.\n *\n * Theme references:\n * https://oklch.com\n * https://colorsublime.github.io\n * https://github.com/microsoft/vscode-docs/blob/main/api/extension-guides/color-theme.md#create-a-new-color-theme\n * https://raw.githubusercontent.com/microsoft/vscode/main/src/vs/workbench/services/themes/common/colorThemeSchema.ts\n * https://tailwindcss.com/docs/colors\n */\nconst systemPalettes = {\n neutral: {\n keyPoint: [0.5, 0.001, 260],\n lowerCp: 0,\n upperCp: 0,\n torsion: 0,\n // Values used directly.\n // TODO(burdon): Audit.\n values: [25, 50, 75, 100, 150, 200, 250, 300, 400, 500, 600, 700, 750, 800, 850, 900],\n } satisfies PhysicalPalette,\n\n // https://oklch.com/#0.5,0.2,260,100 (#0559d2)\n primary: {\n keyPoint: [0.5, 0.2, 260],\n lowerCp: 0.86,\n upperCp: 1,\n torsion: -30,\n // Values used directly.\n // TODO(burdon): Audit.\n values: [100, 150, 200, 350, 400, 450, 500, 750, 800, 850],\n } satisfies PhysicalPalette,\n};\n\nconst physicalSeries = {\n ...huePalettes,\n ...systemPalettes,\n};\n\nexport const physicalColors: ColorsPhysicalLayer = {\n namespace: 'dx-',\n definitions: {\n // @ts-ignore\n series: physicalSeries,\n accompanyingSeries: { reflectiveRelation },\n },\n conditions: {\n srgb: [':root, .dark'],\n p3: ['@media (color-gamut: p3)', ':root, .dark'],\n rec2020: ['@media (color-gamut: rec2020)', ':root, .dark'],\n },\n series: Object.entries(physicalSeries).reduce((acc: ColorsPhysicalLayer['series'], [id]) => {\n acc[id] = gamuts.reduce((acc: PhysicalSeries<Gamut & string, HelicalArcSeries>, gamut) => {\n acc[gamut] = {\n extends: id,\n physicalValueRelation: { extends: 'reflectiveRelation' },\n };\n return acc;\n }, {});\n return acc;\n }, {}),\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { huePalettes } from './physical-colors';\nimport { type ColorAliases, type ColorSememes } from './types';\n\nexport const hueSememes: ColorSememes = [...Object.keys(huePalettes), 'neutral', 'primary'].reduce(\n (acc: ColorSememes, palette) => {\n acc[`${palette}Cursor`] = {\n light: [palette, 400],\n dark: [palette, 300],\n };\n acc[`${palette}Text`] = {\n light: [palette, 550],\n dark: [palette, 300],\n };\n acc[`${palette}Fill`] = {\n light: [palette, 500],\n dark: [palette, 500],\n };\n acc[`${palette}Surface`] = {\n light: [palette, 200],\n dark: [palette, 700],\n };\n acc[`${palette}SurfaceText`] = {\n light: [palette, 700],\n dark: [palette, 200],\n };\n acc[`${palette}Screen`] = {\n light: [palette, 100],\n dark: [palette, 800],\n };\n return acc;\n },\n {},\n);\n\nconst valenceAliasSememeStems = ['Text', 'Surface', 'SurfaceText', 'Fill', 'Cursor'];\nconst valenceMapping = {\n emerald: ['success'],\n cyan: ['info'],\n amber: ['warning'],\n rose: ['error'],\n primary: ['current'],\n fuchsia: ['internal'],\n};\n\nexport const valenceAliases: ColorAliases = valenceAliasSememeStems.reduce((acc: ColorAliases, stem) => {\n return Object.entries(valenceMapping).reduce((acc: ColorAliases, [hue, valences]) => {\n acc[`${hue}${stem}`] = { root: valences.map((valence) => `${valence}${stem}`) };\n return acc;\n }, acc);\n}, {});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { ColorAliases, ColorSememes } from './types';\n\nexport const sheetSememes = {\n // NOTE: background styles for the main content area must have transparency otherwise they will mask the selection.\n axisSurface: {\n light: ['neutral', 50],\n dark: ['neutral', 800],\n },\n axisText: {\n light: ['neutral', 800],\n dark: ['neutral', 200],\n },\n axisSelectedSurface: {\n light: ['neutral', 100],\n dark: ['neutral', 900],\n },\n axisSelectedText: {\n light: ['neutral', 100],\n dark: ['neutral', 900],\n },\n gridCell: {\n // TODO(thure): Why override only dark?\n light: ['neutral', '50/0'],\n dark: ['neutral', 850],\n },\n gridCellSelected: {\n // TODO(thure): Can this not just use `attention`?\n light: ['neutral', 50],\n dark: ['neutral', 800],\n },\n gridOverlay: {\n light: ['primary', '500/.5'],\n dark: ['primary', '500/.5'],\n },\n gridSelectionOverlay: {\n light: ['primary', '500/.2'],\n dark: ['primary', '500/.2'],\n },\n gridHighlight: {\n light: ['emerald', '500/.5'],\n dark: ['emerald', '500/.5'],\n },\n // TODO(burdon): Factor out def (in common with editor).\n gridCommented: {\n light: ['green', 200],\n dark: ['green', 600],\n },\n gridCommentedActive: {\n light: ['green', '200/.5'],\n dark: ['green', '600/.5'],\n },\n} satisfies ColorSememes;\n\nexport const sheetAliases = {\n activeSurface: { root: ['gridLine'] },\n} satisfies ColorAliases;\n", "//\n// Copyright 2024 DXOS.org\n//\n\n// TODO(thure): TS2742\n/* eslint-disable unused-imports/no-unused-imports */\nimport * as _colors from '@ch-ui/colors';\n\nimport { type ColorAliases, type ColorSememes } from './types';\n\n// TODO(burdon): Move to util.\nconst getMapValue = <T>(map: Record<string, T>, key: string, defaultValue: () => T): T => {\n let value = map[key];\n if (!value) {\n value = defaultValue();\n map[key] = value;\n }\n return value;\n};\n\ntype Sememe = ColorSememes[string];\n\nconst applyAlpha = (sememe: Sememe, alpha: number): Sememe => {\n if (alpha >= 1) {\n return sememe;\n } else {\n return {\n light: [sememe.light![0], `${sememe.light![1]}/${alpha}`],\n dark: [sememe.dark![0], `${sememe.dark![1]}/${alpha}`],\n };\n }\n};\n\n// Luminosity extrema and key points.\n\n// Both elevation cadences go from darker to lighter from “elevation” 0 to `ELEVATION_SCALE`,\n// whereas both contrast cadences go from highest contrast at 0 to lowest contrast at `CONTRAST_SCALE`.\n\nconst DARK_ELEVATION_MIN = 855;\nconst DARK_ELEVATION_MAX = 731;\n\nconst DARK_CONTRAST_MIN = 750;\nconst DARK_CONTRAST_MAX = 665;\n\nconst LIGHT_ELEVATION_MIN = 0;\nconst LIGHT_ELEVATION_MAX = 0;\n\nconst LIGHT_CONTRAST_MIN = 82;\nconst LIGHT_CONTRAST_MAX = 24;\n\nconst ELEVATION_SCALE = 2;\nconst CONTRAST_SCALE = 3;\n\nconst darkElevationCadence = (depth: number) =>\n Math.round(\n DARK_ELEVATION_MAX + (DARK_ELEVATION_MIN - DARK_ELEVATION_MAX) * ((ELEVATION_SCALE - depth) / ELEVATION_SCALE),\n );\nconst darkContrastCadence = (depth: number) =>\n Math.round(\n DARK_CONTRAST_MAX + (DARK_CONTRAST_MIN - DARK_CONTRAST_MAX) * ((ELEVATION_SCALE - depth) / ELEVATION_SCALE),\n );\n\nconst lightElevationCadence = (depth: number) =>\n Math.round(\n LIGHT_ELEVATION_MIN + (LIGHT_ELEVATION_MAX - LIGHT_ELEVATION_MIN) * ((CONTRAST_SCALE - depth) / CONTRAST_SCALE),\n );\nconst lightContrastCadence = (depth: number) =>\n Math.round(LIGHT_CONTRAST_MAX + (LIGHT_CONTRAST_MIN - LIGHT_CONTRAST_MAX) * (depth / CONTRAST_SCALE));\n\nconst elevationCadence = (lightDepth: number, darkDepth: number = lightDepth, alpha: number = 1): Sememe =>\n applyAlpha(\n {\n light: ['neutral', lightElevationCadence(lightDepth)],\n dark: ['neutral', darkElevationCadence(darkDepth)],\n },\n alpha,\n );\n\nconst contrastCadence = (lightDepth: number, darkDepth: number = lightDepth, alpha: number = 1): Sememe =>\n applyAlpha(\n {\n light: ['neutral', lightContrastCadence(lightDepth)],\n dark: ['neutral', darkContrastCadence(darkDepth)],\n },\n alpha,\n );\n\nexport const systemSememes = {\n //\n // Elevation cadence tokens\n //\n baseSurface: elevationCadence(0),\n groupSurface: elevationCadence(1),\n modalSurface: elevationCadence(2, 1.7),\n\n //\n // Contrast cadence tokens\n //\n\n textInputSurfaceBase: contrastCadence(0, 0),\n textInputSurfaceGroup: contrastCadence(0, 0.5),\n textInputSurfaceModal: contrastCadence(0, 1),\n\n inputSurfaceBase: contrastCadence(1, 0.5),\n inputSurfaceGroup: contrastCadence(1, 1),\n inputSurfaceModal: contrastCadence(1, 1.5),\n\n hoverSurfaceBase: contrastCadence(2, 1.5),\n hoverSurfaceGroup: contrastCadence(2, 2),\n hoverSurfaceModal: contrastCadence(2, 2.5),\n\n separatorBase: contrastCadence(3, 2),\n separatorGroup: contrastCadence(3, 2.5),\n separatorModal: contrastCadence(3, 3),\n\n subduedSeparator: contrastCadence(3, 1),\n\n unAccent: {\n light: ['neutral', 400],\n dark: ['neutral', 400],\n },\n unAccentHover: {\n light: ['neutral', 450],\n dark: ['neutral', 450],\n },\n hoverOverlay: {\n light: ['neutral', '450/.1'],\n dark: ['neutral', '450/.1'],\n },\n\n //\n // Special surfaces.\n //\n\n // Screen overlay for modal dialogs.\n scrimSurface: applyAlpha({ light: ['neutral', LIGHT_CONTRAST_MAX], dark: ['neutral', DARK_ELEVATION_MIN] }, 0.65),\n\n // High contrast for focused interactive elements. (Technically this is part of the surface cadence, but the contrast cadence is on the opposite side of the elevation cadence as this point.)\n focusSurface: {\n light: ['neutral', 0],\n dark: ['neutral', 1000],\n },\n\n // For tooltips only; the highest elevation from the opposite theme\n inverseSurface: {\n light: ['neutral', DARK_ELEVATION_MIN],\n dark: ['neutral', LIGHT_ELEVATION_MIN],\n },\n\n //\n // Accent surfaces\n //\n\n accentSurfaceRelated: {\n light: ['primary', '300/.1'],\n dark: ['primary', '400/.1'],\n },\n accentSurfaceHover: {\n light: ['primary', 600],\n dark: ['primary', 475],\n },\n accentSurface: {\n light: ['primary', 500],\n dark: ['primary', 500],\n },\n\n //\n // Text (text-) and other foregrounds\n // TODO(thure): Establish contrast-order cadence for text.\n //\n\n baseText: {\n light: ['neutral', 1000],\n dark: ['neutral', 50],\n },\n inverseSurfaceText: {\n light: ['neutral', 50],\n dark: ['neutral', 1000],\n },\n description: {\n light: ['neutral', 500],\n dark: ['neutral', 400],\n },\n subdued: {\n light: ['neutral', 700],\n dark: ['neutral', 300],\n },\n accentText: {\n light: ['primary', 550],\n dark: ['primary', 400],\n },\n accentTextHover: {\n light: ['primary', 500],\n dark: ['primary', 350],\n },\n neutralFocusIndicator: {\n light: ['neutral', 300],\n dark: ['neutral', 450],\n },\n accentFocusIndicator: {\n light: ['primary', 300],\n dark: ['primary', 450],\n },\n accentSurfaceText: {\n light: ['neutral', 0],\n dark: ['neutral', 0],\n },\n} satisfies ColorSememes;\n\ntype SememeName = keyof typeof systemSememes;\n\n/**\n * Alias map.\n */\nconst aliasDefs: Record<string, Record<string, SememeName>> = {\n // The background color appearing in overscroll and between planks when Deck is enabled.\n deckSurface: { root: 'groupSurface' },\n\n // Secondary aliases\n textInputSurface: { root: 'textInputSurfaceBase', group: 'textInputSurfaceGroup', modal: 'textInputSurfaceModal' },\n inputSurface: { root: 'inputSurfaceBase', group: 'inputSurfaceGroup', modal: 'inputSurfaceModal' },\n hoverSurface: { root: 'hoverSurfaceBase', group: 'hoverSurfaceGroup', modal: 'hoverSurfaceModal' },\n separator: { root: 'separatorBase', group: 'separatorGroup', modal: 'separatorModal' },\n\n // Selected items, current items, other surfaces needing special contrast against baseSurface.\n activeSurface: { root: 'inputSurface' as any /* TODO(thure): strongly type secondary aliases. */ },\n\n // Main sidebar panel.\n sidebarSurface: { root: 'groupSurface' },\n\n // Plank header.\n headerSurface: { root: 'groupSurface' },\n\n // Forms, cards, etc.\n cardSurface: { root: 'groupSurface' },\n\n // Toolbars, table/sheet headers, etc.\n toolbarSurface: { root: 'groupSurface' },\n\n // TODO: rename uses of this token to `focusSurface` and remove this alias.\n attention: { root: 'focusSurface' },\n\n // In “master-detail” patterns, the background of the item in the list which is enumerated in the adjacent view.\n currentRelated: { root: 'accentSurfaceRelated' },\n};\n\nexport const systemAliases: ColorAliases = Object.entries(aliasDefs).reduce((aliases, [alias, values]) => {\n Object.entries(values).forEach(([key, sememe]) => {\n const record = getMapValue(aliases, sememe, () => ({}));\n const list = getMapValue<string[]>(record, key, () => []);\n list.push(alias);\n });\n\n return aliases;\n}, {} as ColorAliases);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AliasLayer } from '@ch-ui/tokens';\n\nimport { valenceAliases } from './sememes-hue';\nimport { sheetAliases } from './sememes-sheet';\nimport { systemAliases } from './sememes-system';\n\nconst groupAliases = ['groupSurface', ...(systemAliases.groupSurface?.root ?? [])];\nconst modalAliases = ['modalSurface', ...(systemAliases.modalSurface?.root ?? [])];\n\nexport const aliasColors = {\n conditions: {\n root: [':root, .dark'],\n group: [\n [\n '.sidebar-surface, .dark .sidebar-surface',\n ...groupAliases.map((alias) => `.bg-${alias}, .dark .bg-${alias}`),\n ].join(', '),\n ],\n modal: [\n [\n '.modal-surface, .dark .modal-surface',\n ...modalAliases.map((alias) => `.bg-${alias}, .dark .bg-${alias}`),\n //\n ].join(', '),\n ],\n },\n aliases: {\n // TODO(thure): Aliases should be merged more elegantly, this causes overwrites.\n ...sheetAliases,\n ...systemAliases,\n ...valenceAliases,\n },\n namespace: 'dx-',\n} satisfies AliasLayer<string>;\n", "//\n\n// Copyright 2025 DXOS.org\n//\n\nimport { type Facet, type LinearPhysicalLayer } from '@ch-ui/tokens';\n\nexport const lengthsFacet = {\n physical: {\n namespace: 'dx-',\n conditions: { root: [':root'] },\n series: {\n line: {\n root: {\n unit: 'px',\n initial: 0,\n slope: 1,\n },\n },\n lacuna: {\n root: {\n unit: 'rem',\n initial: 0,\n slope: 0.125,\n },\n },\n },\n } satisfies LinearPhysicalLayer,\n\n semantic: {\n namespace: 'dx-',\n conditions: { root: [':root'] },\n sememes: {\n noLine: { root: ['line', 0] },\n hairLine: { root: ['line', 1] },\n thickLine: { root: ['line', 2] },\n // TODO(burdon): Can/should these be hyphenated?\n trimXs: { root: ['lacuna', 3] },\n trimSm: { root: ['lacuna', 6] },\n trimMd: { root: ['lacuna', 9] },\n trimLg: { root: ['lacuna', 12] },\n },\n },\n\n alias: {\n namespace: 'dx-',\n conditions: {\n fine: [':root, .density-fine, [data-density=\"fine\"]'],\n coarse: ['.density-coarse, [data-density=\"coarse\"]'],\n flush: ['.density-flush, [data-density=\"flush\"]'],\n },\n aliases: {\n noLine: { fine: ['focusOffset'] },\n hairLine: { fine: ['modalLine', 'landmarkLine', 'positionedLine', 'gridGap'] },\n thickLine: { fine: ['focusLine'] },\n trimXs: { fine: ['cardSpacingChrome', 'labelSpacingBlock'] },\n trimSm: { fine: ['cardSpacingInline', 'cardSpacingBlock', 'inputSpacingBlock'] },\n trimMd: { coarse: ['cardSpacingInline', 'cardSpacingBlock'] },\n },\n },\n} satisfies Facet;\n\nexport const maxSizesFacet = {\n physical: {\n namespace: 'dx-',\n conditions: { root: [':root'] },\n series: {\n size: {\n root: {\n unit: 'rem',\n initial: 0,\n slope: 10,\n },\n },\n },\n } satisfies LinearPhysicalLayer,\n\n semantic: {\n namespace: 'dx-',\n conditions: { root: [':root'] },\n sememes: {\n prose: { root: ['size', 5] },\n containerMaxWidth: { root: ['size', 5] },\n popoverMaxWidth: { root: ['size', 2] },\n },\n },\n} satisfies Facet;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type ColorSememes } from './types';\n\n// TODO(burdon): This should be broader than just calls.\nexport const callsSememes: ColorSememes = {\n callActive: {\n light: ['green', '500'],\n dark: ['green', '500'],\n },\n callAlert: {\n light: ['rose', '500'],\n dark: ['rose', '500'],\n },\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type ColorSememes } from './types';\n\nexport const codemirrorSememes = {\n // NOTE: background styles for the main content area must have transparency otherwise they will mask the selection.\n cmCodeblock: {\n light: ['neutral', '500/.1'],\n dark: ['neutral', '500/.1'],\n },\n cmActiveLine: {\n light: ['neutral', '200/.5'],\n dark: ['neutral', '800/.5'],\n },\n cmSeparator: {\n light: ['primary', 500],\n dark: ['primary', 500],\n },\n cmCursor: {\n light: ['neutral', 900],\n dark: ['neutral', 100],\n },\n cmSelection: {\n light: ['primary', '400/.5'],\n dark: ['primary', '600/.5'],\n },\n cmFocusedSelection: {\n light: ['primary', 400],\n dark: ['primary', 600],\n },\n cmHighlight: {\n light: ['neutral', 950],\n dark: ['neutral', 50],\n },\n cmHighlightSurface: {\n light: ['sky', 200],\n dark: ['cyan', 600],\n },\n // TODO(burdon): Factor out def (in common with sheet).\n cmComment: {\n light: ['neutral', 950],\n dark: ['neutral', 50],\n },\n cmCommentSurface: {\n light: ['green', 200],\n dark: ['green', 600],\n },\n} satisfies ColorSememes;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { HelicalArcValue, SemanticLayer } from '@ch-ui/tokens';\n\nimport { callsSememes } from './sememes-calls';\nimport { codemirrorSememes } from './sememes-codemirror';\nimport { hueSememes } from './sememes-hue';\nimport { sheetSememes } from './sememes-sheet';\nimport { systemSememes } from './sememes-system';\n\nexport const semanticColors = {\n conditions: {\n light: [':root'],\n dark: ['.dark'],\n },\n sememes: {\n // Please define each set of sememes in its own file.\n ...callsSememes,\n ...codemirrorSememes,\n ...sheetSememes,\n ...hueSememes,\n ...systemSememes,\n },\n namespace: 'dx-',\n} satisfies SemanticLayer<string, string, HelicalArcValue>;\n"],
5
+ "mappings": ";;;AAIA,OAAOA,wBAAwB;AAC/B,OAAOC,sBAAsB;AAC7B,OAAOC,WAAW;AAClB,OAAOC,uBAAuB;AAC9B,OAAOC,mBAAmB;AAE1B,OAAOC,wBAAwB;AAC/B,OAAOC,sBAAsB;;;ACN7B,OAAOC,aAAa;;;ACGpB,IAAMC,qBAAqB;EACzBC,SAAS;EACTC,OAAO;EACPC,QAAQ;AACV;AAEA,IAAMC,SAA6B;EAAC;EAAQ;EAAM;;AAElD,IAAMC,UAAUC,KAAKC,KAAK;AAa1B,IAAMC,cAAc,CAACC,QAAAA;AACnB,QAAMC,UAAU,OAAOD,MAAM,MAAM,MAAM;AACzC,SAAO;IACLE,UAAU;MAAC;MAAK,OAAO,QAAQL,KAAKM,KAAKF,SAAS,MAAML,OAAAA;MAAUK;;IAClEG,SAAS;IACTC,SAAS;IACTC,SAAS;EACX;AACF;AAEO,IAAMC,cAAc;EACzBC,KAAKT,YAAY,CAAA;EACjBU,QAAQV,YAAY,CAAA;EACpBW,OAAOX,YAAY,CAAA;EACnBY,QAAQZ,YAAY,CAAA;EACpBa,MAAMb,YAAY,CAAA;EAClBc,OAAOd,YAAY,CAAA;EACnBe,SAASf,YAAY,CAAA;EACrBgB,MAAMhB,YAAY,CAAA;EAClBiB,MAAMjB,YAAY,CAAA;EA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AAkB;QAClBK,kBAAkB;QAClBC,gBAAgB;QAChBC,mBAAmB;;QAGnB,cAAc;QACd,wBAAwB;QACxB,yBAAyB;QACzB,mBAAmB;;QAGnBE,WAAW;QACXE,SAAS;QAETI,MAAM;QACN,aAAa;QAEbC,SAAS;QACT,cAAc;QACd,0BAA0B;QAC1B,mBAAmB;MACrB;IACF,GACArD,cAAAA,GACGM,UAAAA;IAEL,GAAGL;IACHqD,QAAQ;MACN,GAAGrD,eAAeqD;MAClBC,SAAS;MACTC,SAAS;MACTC,aAAa;MACbC,OAAO;MACPC,OAAO;IACT;EACF;EACAC,SAAS;IACPC;IACAC;IACAC,iBAAAA;IACAC;;IAEAC;;EAEF,GAAI7D,QAAQ,iBAAiB;IAAE8D,MAAM;EAAM;EAC3C7D;EACA8D,QAAQ;IACNC,wBAAwB;EAC1B;AACF;",
6
+ "names": ["tailwindContainers", "tailwindcssForms", "merge", "tailwindScrollbar", "defaultConfig", "tailwindcssLogical", "tailwindcssRadix", "adapter", "reflectiveRelation", "initial", "slope", "method", "gamuts", "DEG_RAD", "Math", "PI", "hueKeyPoint", "hue", "hueDeg", "keyPoint", "sin", "lowerCp", "upperCp", "torsion", "huePalettes", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "systemPalettes", "neutral", "values", "primary", "physicalSeries", "physicalColors", "namespace", "definitions", "series", "accompanyingSeries", "conditions", "srgb", "p3", "rec2020", "Object", "entries", "reduce", "acc", "id", "gamut", "extends", "physicalValueRelation", "hueSememes", "Object", "keys", "huePalettes", "reduce", "acc", "palette", "light", "dark", "valenceAliasSememeStems", "valenceMapping", "emerald", "cyan", "amber", "rose", "primary", "fuchsia", "valenceAliases", "stem", "entries", "hue", "valences", "root", "map", "valence", "sheetSememes", "axisSurface", "light", "dark", "axisText", "axisSelectedSurface", "axisSelectedText", "gridCell", "gridCellSelected", "gridOverlay", "gridSelectionOverlay", "gridHighlight", "gridCommented", "gridCommentedActive", "sheetAliases", "activeSurface", "root", "getMapValue", "map", "key", "defaultValue", "value", "applyAlpha", "sememe", "alpha", "light", "dark", "DARK_ELEVATION_MIN", "DARK_ELEVATION_MAX", "DARK_CONTRAST_MIN", "DARK_CONTRAST_MAX", "LIGHT_ELEVATION_MIN", "LIGHT_ELEVATION_MAX", "LIGHT_CONTRAST_MIN", "LIGHT_CONTRAST_MAX", "ELEVATION_SCALE", "CONTRAST_SCALE", "darkElevationCadence", "depth", "Math", "round", "darkContrastCadence", "lightElevationCadence", "lightContrastCadence", "elevationCadence", "lightDepth", "darkDepth", "contrastCadence", "systemSememes", "baseSurface", "groupSurface", "modalSurface", "textInputSurfaceBase", "textInputSurfaceGroup", "textInputSurfaceModal", "inputSurfaceBase", "inputSurfaceGroup", "inputSurfaceModal", "hoverSurfaceBase", "hoverSurfaceGroup", "hoverSurfaceModal", "separatorBase", "separatorGroup", "separatorModal", "subduedSeparator", "unAccent", "unAccentHover", "hoverOverlay", "scrimSurface", "focusSurface", "inverseSurface", "accentSurfaceRelated", "accentSurfaceHover", "accentSurface", "baseText", "inverseSurfaceText", "description", "subdued", "accentText", "accentTextHover", "neutralFocusIndicator", "accentFocusIndicator", "accentSurfaceText", "aliasDefs", "deckSurface", "root", "textInputSurface", "group", "modal", "inputSurface", "hoverSurface", "separator", "activeSurface", "sidebarSurface", "headerSurface", "cardSurface", "toolbarSurface", "attention", "currentRelated", "systemAliases", "Object", "entries", "reduce", "aliases", "alias", "values", "forEach", "record", "list", "push", "groupAliases", "systemAliases", "groupSurface", "root", "modalAliases", "modalSurface", "aliasColors", "conditions", "group", "map", "alias", "join", "modal", "aliases", "sheetAliases", "valenceAliases", "namespace", "lengthsFacet", "physical", "namespace", "conditions", "root", "series", "line", "unit", "initial", "slope", "lacuna", "semantic", "sememes", "noLine", "hairLine", "thickLine", "trimXs", "trimSm", "trimMd", "trimLg", "alias", "fine", "coarse", "flush", "aliases", "maxSizesFacet", "size", "prose", "containerMaxWidth", "popoverMaxWidth", "callsSememes", "callActive", "light", "dark", "callAlert", "codemirrorSememes", "cmCodeblock", "light", "dark", "cmActiveLine", "cmSeparator", "cmCursor", "cmSelection", "cmFocusedSelection", "cmHighlight", "cmHighlightSurface", "cmComment", "cmCommentSurface", "semanticColors", "conditions", "light", "dark", "sememes", "callsSememes", "codemirrorSememes", "sheetSememes", "hueSememes", "systemSememes", "namespace", "tokenSet", "colors", "physical", "physicalColors", "semantic", "semanticColors", "alias", "aliasColors", "lengths", "lengthsFacet", "maxSizes", "maxSizesFacet", "hues", "Object", "keys", "huePalettes", "adapterConfig", "facet", "disposition", "tokenization", "borderWidth", "ringWidth", "ringOffsetWidth", "outlineWidth", "spacing", "userDefaultTokenSet", "definitions", "series", "neutral", "primary", "accompanyingSeries", "conditions", "namespace", "sememes", "systemSememes", "aliases", "systemAliases", "tokensTailwindConfig", "adapter", "extend", "extendTokens", "overrideTokens", "tokensTailwindConfig", "tailwindConfig", "env", "content", "extensions", "darkMode", "theme", "fontFamily", "body", "defaultConfig", "sans", "mono", "merge", "spacing", "prose", "containerMaxWidth", "popoverMaxWidth", "borderRadius", "none", "sm", "DEFAULT", "md", "lg", "screens", "raw", "fontSize", "xs", "lineHeight", "base", "xl", "boxShadow", "slider", "transitionProperty", "transitionTimingFunction", "keyframes", "slideDownAndFade", "from", "opacity", "transform", "to", "slideLeftAndFade", "slideUpAndFade", "slideRightAndFade", "fadeIn", "slideDown", "height", "slideUp", "left", "width", "animation", "spin", "shimmer", "colors", "inherit", "current", "transparent", "black", "white", "plugins", "tailwindcssLogical", "tailwindcssForms", "tailwindcssRadix", "tailwindContainers", "tailwindScrollbar", "mode", "future", "hoverOnlyWhenSupported"]
7
+ }
@@ -0,0 +1,50 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // packages/ui/react-ui-theme/src/plugins/resolveContent.ts
4
+ import { glob as globCb } from "glob";
5
+ import { promisify } from "node:util";
6
+ var glob = promisify(globCb);
7
+ var knownIndirectPeers = [
8
+ "@dxos/gem-*",
9
+ "@dxos/react-*",
10
+ "@dxos/react-ui-*",
11
+ "@dxos/devtools",
12
+ "@dxos/shell",
13
+ // TODO(thure): glob v7 runs out of memory if we do a `**` search, and this is (hopefully) the only L3 content package; find a better solution.
14
+ "@dxos/react-ui-table/node_modules/@dxos/react-ui-searchlist"
15
+ ];
16
+ var knownDirectPeers = [
17
+ "@dxos/plugin-*",
18
+ ...knownIndirectPeers
19
+ ];
20
+ var packageNamePattern = /.*node_modules\/(.+?)$/;
21
+ var packageName = (path) => path.match(packageNamePattern)?.[1];
22
+ var flatten = (acc, group) => [
23
+ ...acc,
24
+ ...group
25
+ ];
26
+ var dedupe = (acc, path) => {
27
+ const name = packageName(path);
28
+ if (name && !acc[name]) {
29
+ acc[name] = path;
30
+ }
31
+ return acc;
32
+ };
33
+ var resolveKnownPeers = async (content, cwd) => {
34
+ const globOptions = {
35
+ cwd,
36
+ absolute: true
37
+ };
38
+ const directPeers = await Promise.all(knownDirectPeers.map((peer) => glob(`./node_modules/${peer}`, globOptions)));
39
+ const indirectPeers = await Promise.all(knownIndirectPeers.map((peer) => glob(`./node_modules/@dxos/plugin-*/node_modules/${peer}`, globOptions)));
40
+ const knownPeerContent = Object.values(indirectPeers.reduce(flatten, []).reduce(dedupe, directPeers.reduce(flatten, []).reduce(dedupe, {}))).map((value) => `${value}/dist/lib/**/*.mjs`);
41
+ return [
42
+ ...content,
43
+ ...knownPeerContent
44
+ ];
45
+ };
46
+
47
+ export {
48
+ resolveKnownPeers
49
+ };
50
+ //# sourceMappingURL=chunk-TFKSVC5U.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/plugins/resolveContent.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { glob as globCb } from 'glob';\nimport { promisify } from 'node:util';\n\nconst glob = promisify(globCb);\n\n/**\n *\n */\n// TODO(burdon): Comment.\nconst knownIndirectPeers = [\n '@dxos/gem-*',\n '@dxos/react-*',\n '@dxos/react-ui-*',\n '@dxos/devtools',\n '@dxos/shell',\n // TODO(thure): glob v7 runs out of memory if we do a `**` search, and this is (hopefully) the only L3 content package; find a better solution.\n '@dxos/react-ui-table/node_modules/@dxos/react-ui-searchlist',\n];\n\nconst knownDirectPeers = ['@dxos/plugin-*', ...knownIndirectPeers];\n\nconst packageNamePattern = /.*node_modules\\/(.+?)$/;\nconst packageName = (path: string) => path.match(packageNamePattern)?.[1];\n\nconst flatten = (acc: string[], group: string[]) => [...acc, ...group];\nconst dedupe = (acc: Record<string, string>, path: string) => {\n const name = packageName(path);\n if (name && !acc[name]) {\n acc[name] = path;\n }\n return acc;\n};\n\nexport const resolveKnownPeers = async (content: string[], cwd: string): Promise<string[]> => {\n const globOptions = { cwd, absolute: true };\n\n const directPeers = await Promise.all(knownDirectPeers.map((peer) => glob(`./node_modules/${peer}`, globOptions)));\n\n // NOTE(thure): With glob v7, JS runs out of memory if `**` is used, so this limits the search to @dxos/plugin-*/node_modules\n const indirectPeers = await Promise.all(\n knownIndirectPeers.map((peer) => glob(`./node_modules/@dxos/plugin-*/node_modules/${peer}`, globOptions)),\n );\n\n const knownPeerContent = Object.values(\n indirectPeers.reduce(flatten, []).reduce(dedupe, directPeers.reduce(flatten, []).reduce(dedupe, {})),\n ).map((value) => `${value}/dist/lib/**/*.mjs`);\n\n // console.log('[found known peer content paths]', knownPeerContent);\n\n return [...content, ...knownPeerContent];\n};\n"],
5
+ "mappings": ";;;AAIA,SAASA,QAAQC,cAAc;AAC/B,SAASC,iBAAiB;AAE1B,IAAMC,OAAOC,UAAUC,MAAAA;AAMvB,IAAMC,qBAAqB;EACzB;EACA;EACA;EACA;EACA;;EAEA;;AAGF,IAAMC,mBAAmB;EAAC;KAAqBD;;AAE/C,IAAME,qBAAqB;AAC3B,IAAMC,cAAc,CAACC,SAAiBA,KAAKC,MAAMH,kBAAAA,IAAsB,CAAA;AAEvE,IAAMI,UAAU,CAACC,KAAeC,UAAoB;KAAID;KAAQC;;AAChE,IAAMC,SAAS,CAACF,KAA6BH,SAAAA;AAC3C,QAAMM,OAAOP,YAAYC,IAAAA;AACzB,MAAIM,QAAQ,CAACH,IAAIG,IAAAA,GAAO;AACtBH,QAAIG,IAAAA,IAAQN;EACd;AACA,SAAOG;AACT;AAEO,IAAMI,oBAAoB,OAAOC,SAAmBC,QAAAA;AACzD,QAAMC,cAAc;IAAED;IAAKE,UAAU;EAAK;AAE1C,QAAMC,cAAc,MAAMC,QAAQC,IAAIjB,iBAAiBkB,IAAI,CAACC,SAASvB,KAAK,kBAAkBuB,IAAAA,IAAQN,WAAAA,CAAAA,CAAAA;AAGpG,QAAMO,gBAAgB,MAAMJ,QAAQC,IAClClB,mBAAmBmB,IAAI,CAACC,SAASvB,KAAK,8CAA8CuB,IAAAA,IAAQN,WAAAA,CAAAA,CAAAA;AAG9F,QAAMQ,mBAAmBC,OAAOC,OAC9BH,cAAcI,OAAOnB,SAAS,CAAA,CAAE,EAAEmB,OAAOhB,QAAQO,YAAYS,OAAOnB,SAAS,CAAA,CAAE,EAAEmB,OAAOhB,QAAQ,CAAC,CAAA,CAAA,CAAA,EACjGU,IAAI,CAACO,UAAU,GAAGA,KAAAA,oBAAyB;AAI7C,SAAO;OAAId;OAAYU;;AACzB;",
6
+ "names": ["glob", "globCb", "promisify", "glob", "promisify", "globCb", "knownIndirectPeers", "knownDirectPeers", "packageNamePattern", "packageName", "path", "match", "flatten", "acc", "group", "dedupe", "name", "resolveKnownPeers", "content", "cwd", "globOptions", "absolute", "directPeers", "Promise", "all", "map", "peer", "indirectPeers", "knownPeerContent", "Object", "values", "reduce", "value"]
7
+ }
@@ -0,0 +1,8 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ tailwindConfig
4
+ } from "../chunk-LNTZCFPD.mjs";
5
+ export {
6
+ tailwindConfig
7
+ };
8
+ //# sourceMappingURL=tailwind.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1 @@
1
+ {"inputs":{"packages/ui/react-ui-theme/src/config/tokens/physical-colors.ts":{"bytes":12642,"imports":[],"format":"esm"},"packages/ui/react-ui-theme/src/config/tokens/sememes-hue.ts":{"bytes":6282,"imports":[{"path":"packages/ui/react-ui-theme/src/config/tokens/physical-colors.ts","kind":"import-statement","original":"./physical-colors"}],"format":"esm"},"packages/ui/react-ui-theme/src/config/tokens/sememes-sheet.ts":{"bytes":6217,"imports":[],"format":"esm"},"packages/ui/react-ui-theme/src/config/tokens/sememes-system.ts":{"bytes":26887,"imports":[],"format":"esm"},"packages/ui/react-ui-theme/src/config/tokens/alias-colors.ts":{"bytes":3964,"imports":[{"path":"packages/ui/react-ui-theme/src/config/tokens/sememes-hue.ts","kind":"import-statement","original":"./sememes-hue"},{"path":"packages/ui/react-ui-theme/src/config/tokens/sememes-sheet.ts","kind":"import-statement","original":"./sememes-sheet"},{"path":"packages/ui/react-ui-theme/src/config/tokens/sememes-system.ts","kind":"import-statement","original":"./sememes-system"}],"format":"esm"},"packages/ui/react-ui-theme/src/config/tokens/lengths.ts":{"bytes":9766,"imports":[],"format":"esm"},"packages/ui/react-ui-theme/src/config/tokens/sememes-calls.ts":{"bytes":1556,"imports":[],"format":"esm"},"packages/ui/react-ui-theme/src/config/tokens/sememes-codemirror.ts":{"bytes":5066,"imports":[],"format":"esm"},"packages/ui/react-ui-theme/src/config/tokens/semantic-colors.ts":{"bytes":2673,"imports":[{"path":"packages/ui/react-ui-theme/src/config/tokens/sememes-calls.ts","kind":"import-statement","original":"./sememes-calls"},{"path":"packages/ui/react-ui-theme/src/config/tokens/sememes-codemirror.ts","kind":"import-statement","original":"./sememes-codemirror"},{"path":"packages/ui/react-ui-theme/src/config/tokens/sememes-hue.ts","kind":"import-statement","original":"./sememes-hue"},{"path":"packages/ui/react-ui-theme/src/config/tokens/sememes-sheet.ts","kind":"import-statement","original":"./sememes-sheet"},{"path":"packages/ui/react-ui-theme/src/config/tokens/sememes-system.ts","kind":"import-statement","original":"./sememes-system"}],"format":"esm"},"packages/ui/react-ui-theme/src/config/tokens/index.ts":{"bytes":8281,"imports":[{"path":"@ch-ui/tailwind-tokens","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-theme/src/config/tokens/alias-colors.ts","kind":"import-statement","original":"./alias-colors"},{"path":"packages/ui/react-ui-theme/src/config/tokens/lengths.ts","kind":"import-statement","original":"./lengths"},{"path":"packages/ui/react-ui-theme/src/config/tokens/physical-colors.ts","kind":"import-statement","original":"./physical-colors"},{"path":"packages/ui/react-ui-theme/src/config/tokens/semantic-colors.ts","kind":"import-statement","original":"./semantic-colors"},{"path":"packages/ui/react-ui-theme/src/config/tokens/sememes-system.ts","kind":"import-statement","original":"./sememes-system"}],"format":"esm"},"packages/ui/react-ui-theme/src/config/tailwind.ts":{"bytes":28754,"imports":[{"path":"@tailwindcss/container-queries","kind":"import-statement","external":true},{"path":"@tailwindcss/forms","kind":"import-statement","external":true},{"path":"lodash.merge","kind":"import-statement","external":true},{"path":"tailwind-scrollbar","kind":"import-statement","external":true},{"path":"tailwindcss/stubs/config.full.js","kind":"import-statement","external":true},{"path":"tailwindcss-logical","kind":"import-statement","external":true},{"path":"tailwindcss-radix","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-theme/src/config/tokens/index.ts","kind":"import-statement","original":"./tokens"}],"format":"esm"},"packages/ui/react-ui-theme/src/plugins/resolveContent.ts":{"bytes":6490,"imports":[{"path":"glob","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-theme/src/config/index.ts":{"bytes":559,"imports":[{"path":"packages/ui/react-ui-theme/src/config/tokens/index.ts","kind":"import-statement","original":"./tokens"},{"path":"packages/ui/react-ui-theme/src/config/tailwind.ts","kind":"import-statement","original":"./tailwind"}],"format":"esm"},"packages/ui/react-ui-theme/src/plugins/esbuild-plugin.ts":{"bytes":8495,"imports":[{"path":"autoprefixer","kind":"import-statement","external":true},{"path":"esbuild-style-plugin","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"tailwindcss","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-theme/src/plugins/resolveContent.ts","kind":"import-statement","original":"./resolveContent"},{"path":"packages/ui/react-ui-theme/src/config/index.ts","kind":"import-statement","original":"../config"}],"format":"esm"},"packages/ui/react-ui-theme/src/plugins/plugin.ts":{"bytes":12829,"imports":[{"path":"@ch-ui/tokens","kind":"import-statement","external":true},{"path":"autoprefixer","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"postcss","kind":"import-statement","external":true},{"path":"postcss-import","kind":"import-statement","external":true},{"path":"tailwindcss","kind":"import-statement","external":true},{"path":"tailwindcss/nesting","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-theme/src/plugins/resolveContent.ts","kind":"import-statement","original":"./resolveContent"},{"path":"packages/ui/react-ui-theme/src/config/index.ts","kind":"import-statement","original":"../config"}],"format":"esm"},"packages/ui/react-ui-theme/src/styles/layers/anchored-overflow.css":{"bytes":130,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/attention.css":{"bytes":263,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/base.css":{"bytes":589,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/button.css":{"bytes":2198,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/can-scroll.css":{"bytes":612,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/checkbox.css":{"bytes":1630,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/dialog.css":{"bytes":1302,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/drag-preview.css":{"bytes":307,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/focus-ring.css":{"bytes":2857,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/hues.css":{"bytes":1948,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/positioning.css":{"bytes":467,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/main.css":{"bytes":5162,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/native.css":{"bytes":208,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/size.css":{"bytes":5077,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/surfaces.css":{"bytes":716,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/tag.css":{"bytes":2566,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/tldraw.css":{"bytes":3480,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/tokens.css":{"bytes":1535,"imports":[]},"packages/ui/react-ui-theme/src/styles/layers/typography.css":{"bytes":3186,"imports":[{"path":"@fontsource-variable/jetbrains-mono/wght-italic.css","kind":"import-rule","external":true},{"path":"@fontsource-variable/jetbrains-mono/wght.css","kind":"import-rule","external":true},{"path":"@fontsource-variable/inter/slnt.css","kind":"import-rule","external":true}]},"packages/ui/react-ui-theme/src/styles/layers/index.css":{"bytes":577,"imports":[{"path":"packages/ui/react-ui-theme/src/styles/layers/anchored-overflow.css","kind":"import-rule","original":"./anchored-overflow.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/attention.css","kind":"import-rule","original":"./attention.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/base.css","kind":"import-rule","original":"./base.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/button.css","kind":"import-rule","original":"./button.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/can-scroll.css","kind":"import-rule","original":"./can-scroll.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/checkbox.css","kind":"import-rule","original":"./checkbox.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/dialog.css","kind":"import-rule","original":"./dialog.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/drag-preview.css","kind":"import-rule","original":"./drag-preview.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/focus-ring.css","kind":"import-rule","original":"./focus-ring.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/hues.css","kind":"import-rule","original":"./hues.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/positioning.css","kind":"import-rule","original":"./positioning.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/main.css","kind":"import-rule","original":"./main.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/native.css","kind":"import-rule","original":"./native.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/size.css","kind":"import-rule","original":"./size.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/surfaces.css","kind":"import-rule","original":"./surfaces.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/tag.css","kind":"import-rule","original":"./tag.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/tldraw.css","kind":"import-rule","original":"./tldraw.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/tokens.css","kind":"import-rule","original":"./tokens.css"},{"path":"packages/ui/react-ui-theme/src/styles/layers/typography.css","kind":"import-rule","original":"./typography.css"}]},"packages/ui/react-ui-theme/src/theme.css":{"bytes":169,"imports":[{"path":"tailwindcss/base","kind":"import-rule","external":true},{"path":"tailwindcss/utilities","kind":"import-rule","external":true},{"path":"tailwindcss/components","kind":"import-rule","external":true},{"path":"packages/ui/react-ui-theme/src/styles/layers/index.css","kind":"import-rule","original":"./styles/layers/index.css"}]}},"outputs":{"packages/ui/react-ui-theme/dist/plugin/node-esm/config/tailwind.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/ui/react-ui-theme/dist/plugin/node-esm/config/tailwind.mjs":{"imports":[{"path":"packages/ui/react-ui-theme/dist/plugin/node-esm/chunk-LNTZCFPD.mjs","kind":"import-statement"}],"exports":["tailwindConfig"],"entryPoint":"packages/ui/react-ui-theme/src/config/tailwind.ts","inputs":{},"bytes":217},"packages/ui/react-ui-theme/dist/plugin/node-esm/plugins/esbuild-plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4188},"packages/ui/react-ui-theme/dist/plugin/node-esm/plugins/esbuild-plugin.mjs":{"imports":[{"path":"packages/ui/react-ui-theme/dist/plugin/node-esm/chunk-TFKSVC5U.mjs","kind":"import-statement"},{"path":"packages/ui/react-ui-theme/dist/plugin/node-esm/chunk-LNTZCFPD.mjs","kind":"import-statement"},{"path":"autoprefixer","kind":"import-statement","external":true},{"path":"esbuild-style-plugin","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"tailwindcss","kind":"import-statement","external":true}],"exports":["ThemePlugins"],"entryPoint":"packages/ui/react-ui-theme/src/plugins/esbuild-plugin.ts","inputs":{"packages/ui/react-ui-theme/src/plugins/esbuild-plugin.ts":{"bytesInOutput":2253}},"bytes":2596},"packages/ui/react-ui-theme/dist/plugin/node-esm/plugins/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6421},"packages/ui/react-ui-theme/dist/plugin/node-esm/plugins/plugin.mjs":{"imports":[{"path":"packages/ui/react-ui-theme/dist/plugin/node-esm/chunk-TFKSVC5U.mjs","kind":"import-statement"},{"path":"packages/ui/react-ui-theme/dist/plugin/node-esm/chunk-LNTZCFPD.mjs","kind":"import-statement"},{"path":"@ch-ui/tokens","kind":"import-statement","external":true},{"path":"autoprefixer","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"postcss","kind":"import-statement","external":true},{"path":"postcss-import","kind":"import-statement","external":true},{"path":"tailwindcss","kind":"import-statement","external":true},{"path":"tailwindcss/nesting","kind":"import-statement","external":true}],"exports":["ThemePlugin"],"entryPoint":"packages/ui/react-ui-theme/src/plugins/plugin.ts","inputs":{"packages/ui/react-ui-theme/src/plugins/plugin.ts":{"bytesInOutput":2558}},"bytes":2896},"packages/ui/react-ui-theme/dist/plugin/node-esm/chunk-TFKSVC5U.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3363},"packages/ui/react-ui-theme/dist/plugin/node-esm/chunk-TFKSVC5U.mjs":{"imports":[{"path":"glob","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true}],"exports":["resolveKnownPeers"],"inputs":{"packages/ui/react-ui-theme/src/plugins/resolveContent.ts":{"bytesInOutput":1445},"packages/ui/react-ui-theme/src/config/index.ts":{"bytesInOutput":0}},"bytes":1675},"packages/ui/react-ui-theme/dist/plugin/node-esm/chunk-LNTZCFPD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":49977},"packages/ui/react-ui-theme/dist/plugin/node-esm/chunk-LNTZCFPD.mjs":{"imports":[{"path":"@tailwindcss/container-queries","kind":"import-statement","external":true},{"path":"@tailwindcss/forms","kind":"import-statement","external":true},{"path":"lodash.merge","kind":"import-statement","external":true},{"path":"tailwind-scrollbar","kind":"import-statement","external":true},{"path":"tailwindcss/stubs/config.full.js","kind":"import-statement","external":true},{"path":"tailwindcss-logical","kind":"import-statement","external":true},{"path":"tailwindcss-radix","kind":"import-statement","external":true},{"path":"@ch-ui/tailwind-tokens","kind":"import-statement","external":true}],"exports":["tailwindConfig","tokenSet"],"inputs":{"packages/ui/react-ui-theme/src/config/tailwind.ts":{"bytesInOutput":8018},"packages/ui/react-ui-theme/src/config/tokens/index.ts":{"bytesInOutput":1754},"packages/ui/react-ui-theme/src/config/tokens/physical-colors.ts":{"bytesInOutput":2365},"packages/ui/react-ui-theme/src/config/tokens/sememes-hue.ts":{"bytesInOutput":1444},"packages/ui/react-ui-theme/src/config/tokens/sememes-sheet.ts":{"bytesInOutput":1701},"packages/ui/react-ui-theme/src/config/tokens/sememes-system.ts":{"bytesInOutput":6993},"packages/ui/react-ui-theme/src/config/tokens/alias-colors.ts":{"bytesInOutput":786},"packages/ui/react-ui-theme/src/config/tokens/lengths.ts":{"bytesInOutput":2760},"packages/ui/react-ui-theme/src/config/tokens/sememes-calls.ts":{"bytesInOutput":246},"packages/ui/react-ui-theme/src/config/tokens/sememes-codemirror.ts":{"bytesInOutput":1376},"packages/ui/react-ui-theme/src/config/tokens/semantic-colors.ts":{"bytesInOutput":316}},"bytes":28756},"packages/ui/react-ui-theme/dist/plugin/node-esm/theme.css.map":{"imports":[],"exports":[],"inputs":{},"bytes":54354},"packages/ui/react-ui-theme/dist/plugin/node-esm/theme.css":{"imports":[{"path":"tailwindcss/base","kind":"import-rule","external":true},{"path":"tailwindcss/utilities","kind":"import-rule","external":true},{"path":"tailwindcss/components","kind":"import-rule","external":true},{"path":"@fontsource-variable/jetbrains-mono/wght-italic.css","kind":"import-rule","external":true},{"path":"@fontsource-variable/jetbrains-mono/wght.css","kind":"import-rule","external":true},{"path":"@fontsource-variable/inter/slnt.css","kind":"import-rule","external":true}],"entryPoint":"packages/ui/react-ui-theme/src/theme.css","inputs":{"packages/ui/react-ui-theme/src/styles/layers/anchored-overflow.css":{"bytesInOutput":129},"packages/ui/react-ui-theme/src/styles/layers/attention.css":{"bytesInOutput":170},"packages/ui/react-ui-theme/src/styles/layers/base.css":{"bytesInOutput":588},"packages/ui/react-ui-theme/src/styles/layers/button.css":{"bytesInOutput":1714},"packages/ui/react-ui-theme/src/styles/layers/can-scroll.css":{"bytesInOutput":605},"packages/ui/react-ui-theme/src/styles/layers/checkbox.css":{"bytesInOutput":1325},"packages/ui/react-ui-theme/src/styles/layers/dialog.css":{"bytesInOutput":1246},"packages/ui/react-ui-theme/src/styles/layers/drag-preview.css":{"bytesInOutput":307},"packages/ui/react-ui-theme/src/styles/layers/focus-ring.css":{"bytesInOutput":2815},"packages/ui/react-ui-theme/src/styles/layers/hues.css":{"bytesInOutput":1855},"packages/ui/react-ui-theme/src/styles/layers/positioning.css":{"bytesInOutput":466},"packages/ui/react-ui-theme/src/styles/layers/main.css":{"bytesInOutput":5082},"packages/ui/react-ui-theme/src/styles/layers/native.css":{"bytesInOutput":205},"packages/ui/react-ui-theme/src/styles/layers/size.css":{"bytesInOutput":5094},"packages/ui/react-ui-theme/src/styles/layers/surfaces.css":{"bytesInOutput":711},"packages/ui/react-ui-theme/src/styles/layers/tag.css":{"bytesInOutput":2499},"packages/ui/react-ui-theme/src/styles/layers/tldraw.css":{"bytesInOutput":553},"packages/ui/react-ui-theme/src/styles/layers/tokens.css":{"bytesInOutput":1254},"packages/ui/react-ui-theme/src/styles/layers/typography.css":{"bytesInOutput":2738},"packages/ui/react-ui-theme/src/styles/layers/index.css":{"bytesInOutput":90},"packages/ui/react-ui-theme/src/theme.css":{"bytesInOutput":0}},"bytes":31118}}}
@@ -0,0 +1,63 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ resolveKnownPeers
4
+ } from "../chunk-TFKSVC5U.mjs";
5
+ import {
6
+ tailwindConfig
7
+ } from "../chunk-LNTZCFPD.mjs";
8
+
9
+ // packages/ui/react-ui-theme/src/plugins/esbuild-plugin.ts
10
+ import autoprefixer from "autoprefixer";
11
+ import stylePlugin from "esbuild-style-plugin";
12
+ import { mkdir, cp } from "node:fs/promises";
13
+ import { resolve, relative, join, basename } from "node:path";
14
+ import tailwindcss from "tailwindcss";
15
+ var ThemePlugins = async (options) => {
16
+ const resolvedContent = options.root ? await resolveKnownPeers(options.content, options.root) : options.content;
17
+ return [
18
+ // TODO(thure): This really shouldn’t be this way, but after hours of searching for a reasonable way to do this I came up empty. The prior art I found was mainly this thread, though it’s only tangentially related: https://github.com/evanw/esbuild/issues/800#issuecomment-786151076
19
+ {
20
+ name: "esbuild-plugin-dxos-ui-theme-resolvers",
21
+ setup: async (build) => {
22
+ const fontsDir = join(options.outdir, "node_modules/@dxos/react-ui-theme/fonts");
23
+ try {
24
+ await mkdir(fontsDir);
25
+ } catch (_err) {
26
+ }
27
+ build.onResolve({
28
+ filter: /\.woff2$/
29
+ }, async (args) => {
30
+ const depPath = resolve(args.resolveDir, args.path);
31
+ const destPath = join(fontsDir, basename(args.path));
32
+ try {
33
+ await cp(depPath, destPath);
34
+ } catch (_err) {
35
+ }
36
+ return {
37
+ path: `./${relative(options.outdir, join("fonts", basename(args.path)))}`,
38
+ external: true
39
+ };
40
+ });
41
+ }
42
+ },
43
+ // TODO(thure): theme.css must be part of entryPoints in order to be processed with `stylePlugin`, but this should not be necessary. ESBuild would not load theme.css using stylePlugin if referenced within index.ts(x) as with the Vite plugin.
44
+ // TODO(thure): Note also that because it is an entryPoint, the developer has to reference the built theme.css from `index.html`, which is inflexible and possibly inconvenient.
45
+ // TODO(zhenyasav): autoprefixer version misalignment with esbuild-style-plugin requires the `as any`
46
+ stylePlugin({
47
+ postcss: {
48
+ plugins: [
49
+ tailwindcss(tailwindConfig({
50
+ env: process.env.NODE_ENV,
51
+ content: resolvedContent,
52
+ extensions: options.extensions
53
+ })),
54
+ autoprefixer
55
+ ]
56
+ }
57
+ })
58
+ ];
59
+ };
60
+ export {
61
+ ThemePlugins
62
+ };
63
+ //# sourceMappingURL=esbuild-plugin.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/plugins/esbuild-plugin.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport autoprefixer from 'autoprefixer';\nimport type { Plugin } from 'esbuild';\nimport stylePlugin from 'esbuild-style-plugin';\nimport { mkdir, cp } from 'node:fs/promises';\nimport { resolve, relative, join, basename } from 'node:path';\nimport tailwindcss from 'tailwindcss';\nimport type { ThemeConfig } from 'tailwindcss/types/config';\n\nimport { resolveKnownPeers } from './resolveContent';\nimport { tailwindConfig } from '../config';\n\nexport const ThemePlugins = async (options: {\n content: string[];\n root?: string;\n outdir: string;\n extensions?: Partial<ThemeConfig>[];\n}): Promise<Plugin[]> => {\n const resolvedContent = options.root ? await resolveKnownPeers(options.content, options.root) : options.content;\n return [\n // TODO(thure): This really shouldn’t be this way, but after hours of searching for a reasonable way to do this I came up empty. The prior art I found was mainly this thread, though it’s only tangentially related: https://github.com/evanw/esbuild/issues/800#issuecomment-786151076\n {\n name: 'esbuild-plugin-dxos-ui-theme-resolvers',\n setup: async (build) => {\n const fontsDir = join(options.outdir, 'node_modules/@dxos/react-ui-theme/fonts');\n try {\n await mkdir(fontsDir);\n } catch (_err) {}\n build.onResolve({ filter: /\\.woff2$/ }, async (args) => {\n const depPath = resolve(args.resolveDir, args.path);\n const destPath = join(fontsDir, basename(args.path));\n try {\n await cp(depPath, destPath);\n } catch (_err) {}\n return { path: `./${relative(options.outdir, join('fonts', basename(args.path)))}`, external: true };\n });\n },\n },\n // TODO(thure): theme.css must be part of entryPoints in order to be processed with `stylePlugin`, but this should not be necessary. ESBuild would not load theme.css using stylePlugin if referenced within index.ts(x) as with the Vite plugin.\n // TODO(thure): Note also that because it is an entryPoint, the developer has to reference the built theme.css from `index.html`, which is inflexible and possibly inconvenient.\n // TODO(zhenyasav): autoprefixer version misalignment with esbuild-style-plugin requires the `as any`\n stylePlugin({\n postcss: {\n plugins: [\n tailwindcss(\n tailwindConfig({\n env: process.env.NODE_ENV,\n content: resolvedContent,\n extensions: options.extensions,\n }),\n ),\n autoprefixer as any,\n ],\n },\n }),\n ];\n};\n"],
5
+ "mappings": ";;;;;;;;;AAIA,OAAOA,kBAAkB;AAEzB,OAAOC,iBAAiB;AACxB,SAASC,OAAOC,UAAU;AAC1B,SAASC,SAASC,UAAUC,MAAMC,gBAAgB;AAClD,OAAOC,iBAAiB;AAMjB,IAAMC,eAAe,OAAOC,YAAAA;AAMjC,QAAMC,kBAAkBD,QAAQE,OAAO,MAAMC,kBAAkBH,QAAQI,SAASJ,QAAQE,IAAI,IAAIF,QAAQI;AACxG,SAAO;;IAEL;MACEC,MAAM;MACNC,OAAO,OAAOC,UAAAA;AACZ,cAAMC,WAAWC,KAAKT,QAAQU,QAAQ,yCAAA;AACtC,YAAI;AACF,gBAAMC,MAAMH,QAAAA;QACd,SAASI,MAAM;QAAC;AAChBL,cAAMM,UAAU;UAAEC,QAAQ;QAAW,GAAG,OAAOC,SAAAA;AAC7C,gBAAMC,UAAUC,QAAQF,KAAKG,YAAYH,KAAKI,IAAI;AAClD,gBAAMC,WAAWX,KAAKD,UAAUa,SAASN,KAAKI,IAAI,CAAA;AAClD,cAAI;AACF,kBAAMG,GAAGN,SAASI,QAAAA;UACpB,SAASR,MAAM;UAAC;AAChB,iBAAO;YAAEO,MAAM,KAAKI,SAASvB,QAAQU,QAAQD,KAAK,SAASY,SAASN,KAAKI,IAAI,CAAA,CAAA,CAAA;YAAOK,UAAU;UAAK;QACrG,CAAA;MACF;IACF;;;;IAIAC,YAAY;MACVC,SAAS;QACPC,SAAS;UACPC,YACEC,eAAe;YACbC,KAAKC,QAAQD,IAAIE;YACjB5B,SAASH;YACTgC,YAAYjC,QAAQiC;UACtB,CAAA,CAAA;UAEFC;;MAEJ;IACF,CAAA;;AAEJ;",
6
+ "names": ["autoprefixer", "stylePlugin", "mkdir", "cp", "resolve", "relative", "join", "basename", "tailwindcss", "ThemePlugins", "options", "resolvedContent", "root", "resolveKnownPeers", "content", "name", "setup", "build", "fontsDir", "join", "outdir", "mkdir", "_err", "onResolve", "filter", "args", "depPath", "resolve", "resolveDir", "path", "destPath", "basename", "cp", "relative", "external", "stylePlugin", "postcss", "plugins", "tailwindcss", "tailwindConfig", "env", "process", "NODE_ENV", "extensions", "autoprefixer"]
7
+ }
@@ -0,0 +1,97 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ resolveKnownPeers
4
+ } from "../chunk-TFKSVC5U.mjs";
5
+ import {
6
+ tailwindConfig,
7
+ tokenSet
8
+ } from "../chunk-LNTZCFPD.mjs";
9
+
10
+ // packages/ui/react-ui-theme/src/plugins/plugin.ts
11
+ import chTokens from "@ch-ui/tokens";
12
+ import autoprefixer from "autoprefixer";
13
+ import { readFile, writeFile } from "node:fs/promises";
14
+ import { resolve } from "node:path";
15
+ import postcss from "postcss";
16
+ import postcssImport from "postcss-import";
17
+ import tailwindcss from "tailwindcss";
18
+ import nesting from "tailwindcss/nesting";
19
+ var environment;
20
+ var createPostCSSPipeline = (environment2, config) => [
21
+ // Handles @import statements in CSS.
22
+ postcssImport(),
23
+ // Processes CSS nesting syntax.
24
+ nesting,
25
+ // Processes custom design tokens.
26
+ chTokens({
27
+ config: () => tokenSet
28
+ }),
29
+ // Processes Tailwind directives and utilities.
30
+ tailwindcss(tailwindConfig({
31
+ env: environment2,
32
+ content: config.content,
33
+ extensions: config.extensions
34
+ })),
35
+ // Adds vendor prefixes.
36
+ autoprefixer
37
+ ];
38
+ var ThemePlugin = (options) => {
39
+ const config = {
40
+ jit: true,
41
+ cssPath: resolve(__dirname, "../theme.css"),
42
+ srcCssPath: resolve(__dirname, "../../../../src/theme.css"),
43
+ virtualFileId: "@dxos-theme",
44
+ ...options
45
+ };
46
+ if (process.env.DEBUG) {
47
+ console.log("ThemePlugin config:\n", JSON.stringify(config, null, 2));
48
+ }
49
+ return {
50
+ name: "vite-plugin-dxos-ui-theme",
51
+ config: async ({ root }, env) => {
52
+ environment = env.mode;
53
+ const content = root ? await resolveKnownPeers(config.content ?? [], root) : config.content;
54
+ if (options.verbose) {
55
+ console.log("content", content);
56
+ }
57
+ return {
58
+ css: {
59
+ postcss: {
60
+ plugins: createPostCSSPipeline(environment, config)
61
+ }
62
+ }
63
+ };
64
+ },
65
+ resolveId: (id) => {
66
+ if (id === config.virtualFileId) {
67
+ return config.cssPath;
68
+ }
69
+ },
70
+ handleHotUpdate: async ({ file, server }) => {
71
+ if (file.endsWith(".css") && file !== config.cssPath) {
72
+ try {
73
+ const module = server.moduleGraph.getModuleById(config.cssPath);
74
+ if (module) {
75
+ const css = await readFile(config.srcCssPath, "utf8");
76
+ const processor = postcss(createPostCSSPipeline(environment, config));
77
+ console.log("[theme-plugin] Reprocessing CSS with PostCSS.");
78
+ const result = await processor.process(css, {
79
+ from: config.srcCssPath,
80
+ to: config.cssPath
81
+ });
82
+ if (result.css) {
83
+ await writeFile(config.cssPath, result.css);
84
+ return [];
85
+ }
86
+ }
87
+ } catch (err) {
88
+ console.error("[theme-plugin] Error:", err);
89
+ }
90
+ }
91
+ }
92
+ };
93
+ };
94
+ export {
95
+ ThemePlugin
96
+ };
97
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/plugins/plugin.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\n/* eslint-disable no-console */\n\nimport chTokens from '@ch-ui/tokens';\nimport autoprefixer from 'autoprefixer';\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\nimport postcss from 'postcss';\nimport postcssImport from 'postcss-import';\nimport tailwindcss from 'tailwindcss';\nimport nesting from 'tailwindcss/nesting';\nimport { type ThemeConfig } from 'tailwindcss/types/config';\nimport { type UserConfig, type Plugin } from 'vite';\n\nimport { resolveKnownPeers } from './resolveContent';\nimport { tailwindConfig, tokenSet } from '../config';\n\nexport type ThemePluginOptions = {\n jit?: boolean;\n cssPath?: string;\n srcCssPath?: string;\n virtualFileId?: string;\n content?: string[];\n root?: string;\n verbose?: boolean;\n extensions?: Partial<ThemeConfig>[];\n};\n\nlet environment!: string;\n\n/**\n * Configures PostCSS pipeline for theme.css processing.\n * @param environment - The current environment (development/production).\n * @param config - Theme plugin configuration options.\n * @returns Array of PostCSS plugins.\n */\nconst createPostCSSPipeline = (environment: string, config: ThemePluginOptions): postcss.Transformer[] => [\n // Handles @import statements in CSS.\n postcssImport(),\n // Processes CSS nesting syntax.\n nesting,\n // Processes custom design tokens.\n chTokens({ config: () => tokenSet }),\n // Processes Tailwind directives and utilities.\n tailwindcss(\n tailwindConfig({\n env: environment,\n content: config.content,\n extensions: config.extensions,\n }),\n ),\n // Adds vendor prefixes.\n autoprefixer as any,\n];\n\n/**\n * Vite plugin to configure theme.\n */\nexport const ThemePlugin = (options: ThemePluginOptions): Plugin => {\n const config: ThemePluginOptions = {\n jit: true,\n cssPath: resolve(__dirname, '../theme.css'),\n srcCssPath: resolve(__dirname, '../../../../src/theme.css'),\n virtualFileId: '@dxos-theme',\n ...options,\n };\n\n if (process.env.DEBUG) {\n console.log('ThemePlugin config:\\n', JSON.stringify(config, null, 2));\n }\n\n return {\n name: 'vite-plugin-dxos-ui-theme',\n config: async ({ root }, env): Promise<UserConfig> => {\n environment = env.mode;\n const content = root ? await resolveKnownPeers(config.content ?? [], root) : config.content;\n if (options.verbose) {\n console.log('content', content);\n }\n\n return {\n css: {\n postcss: {\n plugins: createPostCSSPipeline(environment, config),\n },\n },\n };\n },\n resolveId: (id) => {\n if (id === config.virtualFileId) {\n return config.cssPath;\n }\n },\n handleHotUpdate: async ({ file, server }) => {\n // NOTE(ZaymonFC): Changes to *any* CSS file triggers this step. We might want to refine this.\n // Ignore the output file to prevent infinite loops.\n if (file.endsWith('.css') && file !== config.cssPath) {\n try {\n // Get reference to the theme virtual module.\n const module = server.moduleGraph.getModuleById(config.cssPath!);\n\n if (module) {\n // Read the source theme file that imports all other CSS files.\n const css = await readFile(config.srcCssPath!, 'utf8');\n const processor = postcss(createPostCSSPipeline(environment, config));\n console.log('[theme-plugin] Reprocessing CSS with PostCSS.');\n const result = await processor.process(css, {\n from: config.srcCssPath,\n to: config.cssPath,\n });\n\n if (result.css) {\n await writeFile(config.cssPath!, result.css);\n // Return the module to trigger HMR update.\n return [];\n }\n }\n } catch (err) {\n console.error('[theme-plugin] Error:', err);\n }\n }\n },\n };\n};\n"],
5
+ "mappings": ";;;;;;;;;;AAMA,OAAOA,cAAc;AACrB,OAAOC,kBAAkB;AACzB,SAASC,UAAUC,iBAAiB;AACpC,SAASC,eAAe;AACxB,OAAOC,aAAa;AACpB,OAAOC,mBAAmB;AAC1B,OAAOC,iBAAiB;AACxB,OAAOC,aAAa;AAkBpB,IAAIC;AAQJ,IAAMC,wBAAwB,CAACD,cAAqBE,WAAsD;;EAExGC,cAAAA;;EAEAC;;EAEAC,SAAS;IAAEH,QAAQ,MAAMI;EAAS,CAAA;;EAElCC,Y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K;cAC1Ce,MAAM7C,OAAOiB;cACb6B,IAAI9C,OAAOc;YACb,CAAA;AAEA,gBAAI8B,OAAOd,KAAK;AACd,oBAAMiB,UAAU/C,OAAOc,SAAU8B,OAAOd,GAAG;AAE3C,qBAAO,CAAA;YACT;UACF;QACF,SAASkB,KAAK;AACZ3B,kBAAQ4B,MAAM,yBAAyBD,GAAAA;QACzC;MACF;IACF;EACF;AACF;",
6
+ "names": ["chTokens", "autoprefixer", "readFile", "writeFile", "resolve", "postcss", "postcssImport", "tailwindcss", "nesting", "environment", "createPostCSSPipeline", "config", "postcssImport", "nesting", "chTokens", "tokenSet", "tailwindcss", "tailwindConfig", "env", "content", "extensions", "autoprefixer", "ThemePlugin", "options", "jit", "cssPath", "resolve", "__dirname", "srcCssPath", "virtualFileId", "process", "DEBUG", "console", "log", "JSON", "stringify", "name", "root", "mode", "resolveKnownPeers", "verbose", "css", "postcss", "plugins", "resolveId", "id", "handleHotUpdate", "file", "server", "endsWith", "module", "moduleGraph", "getModuleById", "readFile", "processor", "result", "from", "to", "writeFile", "err", "error"]
7
+ }