@fluentic/style 0.1.0-beta.1 → 0.1.0-beta.3

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 (297) hide show
  1. package/CHANGELOG.md +31 -2
  2. package/README.md +80 -23
  3. package/atomic/atRule/utils.ts +3 -2
  4. package/atomic/className.ts +25 -4
  5. package/atomic/debug/className/className.ts +23 -2
  6. package/atomic/element.ts +5 -2
  7. package/atomic/theme.ts +4 -2
  8. package/atomic/token.ts +4 -2
  9. package/atomic/utils/css.ts +44 -19
  10. package/atomic/utils/format.ts +1 -1
  11. package/atomic/utils/hash.ts +78 -0
  12. package/atomic/var.ts +3 -2
  13. package/builder/classname/class_name_builder.ts +447 -0
  14. package/builder/classname/fns.ts +77 -0
  15. package/builder/classname/index.ts +3 -0
  16. package/builder/classname/types.ts +34 -0
  17. package/builder/data/create.ts +6 -6
  18. package/builder/data/data.ts +7 -7
  19. package/builder/data/debug.ts +1 -0
  20. package/builder/data/is.ts +3 -3
  21. package/builder/data/merge/scope.ts +18 -19
  22. package/builder/data/merge/style.ts +11 -0
  23. package/builder/data/state.ts +1 -0
  24. package/builder/style_builder.ts +17 -17
  25. package/builder/style_fns.ts +33 -33
  26. package/builder/types/alias.ts +10 -10
  27. package/builder/types/fns.ts +11 -11
  28. package/builder/types/types.ts +5 -5
  29. package/compiler/compiler/types.ts +0 -1
  30. package/compiler/transform/debug/plugin.ts +8 -3
  31. package/compiler/transform/debug/utils/debug_data.ts +73 -0
  32. package/compiler/transform/evaluator/evaluator.ts +33 -2
  33. package/compiler/transform/evaluator/tracer.ts +13 -9
  34. package/compiler/transform/extract/chain/chain.ts +596 -28
  35. package/compiler/transform/extract/plugin.ts +5 -2
  36. package/compiler/transform/extract/utils/state.ts +1 -0
  37. package/compiler/utils/constants.ts +4 -4
  38. package/compiler/utils/file_resolver.ts +1 -0
  39. package/compiler/utils/import_source.ts +3 -2
  40. package/config/build.ts +12 -2
  41. package/config/config/css.ts +3 -0
  42. package/config/config/debug.ts +13 -1
  43. package/config/config/dev.ts +17 -1
  44. package/config/configure.ts +10 -2
  45. package/config/types.ts +7 -0
  46. package/dev/config.ts +2 -3
  47. package/dialect/extracted/index.ts +5 -0
  48. package/dialect/index.ts +1 -0
  49. package/dialect/namedTokens.ts +136 -0
  50. package/dist/{className-C1Ht5Wvv.js → className-CKo4TxuT.js} +2 -2
  51. package/dist/{className-C1Ht5Wvv.js.map → className-CKo4TxuT.js.map} +1 -1
  52. package/dist/{className-DC2Cq8p3.js → className-ZJ5pBA-o.js} +19 -7
  53. package/dist/className-ZJ5pBA-o.js.map +1 -0
  54. package/dist/compiler/index.mjs +1 -1
  55. package/dist/{compiler-DENc3a2R.mjs → compiler-D5v5tJXI.mjs} +607 -114
  56. package/dist/compiler-D5v5tJXI.mjs.map +1 -0
  57. package/dist/config/index.js +2 -2
  58. package/dist/{config-BryWDfQX.js → config-BEvP7108.js} +12 -4
  59. package/dist/config-BEvP7108.js.map +1 -0
  60. package/dist/config-B_cbG3S6.js +1 -0
  61. package/dist/config-FIfi5aJ8.js +32 -0
  62. package/dist/config-FIfi5aJ8.js.map +1 -0
  63. package/dist/config-OXHoDUIo.js +6 -0
  64. package/dist/{config-Di2VYYKV.js.map → config-OXHoDUIo.js.map} +1 -1
  65. package/dist/css-CELBp6Gu.js +58 -0
  66. package/dist/css-CELBp6Gu.js.map +1 -0
  67. package/dist/{css-BowBszUt.js → css-DcuJ_jSH.js} +17 -17
  68. package/dist/css-DcuJ_jSH.js.map +1 -0
  69. package/dist/{css-ByOrugEX.js → css-dPoZJDQH.js} +80 -78
  70. package/dist/css-dPoZJDQH.js.map +1 -0
  71. package/dist/{css-DcazYor9.js → css-oOt6ZR54.js} +10 -8
  72. package/dist/css-oOt6ZR54.js.map +1 -0
  73. package/dist/css.js +1 -1
  74. package/dist/{css_extra-DlOnsnR1.js → css_extra-DQdCrYoC.js} +2 -2
  75. package/dist/{css_extra-DlOnsnR1.js.map → css_extra-DQdCrYoC.js.map} +1 -1
  76. package/dist/{css_extra-oIi3UEPK.js → css_extra-DeTuIlcO.js} +2 -2
  77. package/dist/{css_extra-oIi3UEPK.js.map → css_extra-DeTuIlcO.js.map} +1 -1
  78. package/dist/{data-BsqOa5br.js → data-CeYstKMP.js} +21 -12
  79. package/dist/data-CeYstKMP.js.map +1 -0
  80. package/dist/{debug-n2aZQBSa.js → debug-D96KGgpH.js} +3 -3
  81. package/dist/debug-D96KGgpH.js.map +1 -0
  82. package/dist/dev/rsc.js +9 -9
  83. package/dist/{dev-CcphAa3R.js → dev-fOtWB5K3.js} +7 -8
  84. package/dist/{dev-CcphAa3R.js.map → dev-fOtWB5K3.js.map} +1 -1
  85. package/dist/{dev-DfBbuLeE.js → dev-p8tW7X-A.js} +14 -4
  86. package/dist/dev-p8tW7X-A.js.map +1 -0
  87. package/dist/dev.js +1 -1
  88. package/dist/dialect/extracted/index.js +2 -0
  89. package/dist/dialect/index.js +2 -0
  90. package/dist/{elementMarker-Bu7gDAkE.js → elementMarker-CvqqIb7J.js} +10 -8
  91. package/dist/{elementMarker-Bu7gDAkE.js.map → elementMarker-CvqqIb7J.js.map} +1 -1
  92. package/dist/entry/dev/css.js +2 -2
  93. package/dist/entry/dev/jsx-dev-runtime.js +2 -1
  94. package/dist/entry/dev/jsx-runtime.js +2 -1
  95. package/dist/entry/dev.js +12 -9
  96. package/dist/entry/prod/css.js +2 -2
  97. package/dist/entry/prod/jsx-dev-runtime.js +2 -2
  98. package/dist/entry/prod/jsx-runtime.js +2 -2
  99. package/dist/entry/prod/runtime.js +4 -4
  100. package/dist/entry/prod.js +8 -8
  101. package/dist/entry/prod.js.map +1 -1
  102. package/dist/entry/rsc-dev/css.js +2 -2
  103. package/dist/entry/rsc-dev/dev.js +4 -5
  104. package/dist/entry/rsc-dev/dev.js.map +1 -1
  105. package/dist/entry/rsc-dev/jsx-dev-runtime.js +2 -2
  106. package/dist/entry/rsc-dev/jsx-runtime.js +2 -2
  107. package/dist/entry/rsc-dev.js +341 -105
  108. package/dist/entry/rsc-dev.js.map +1 -1
  109. package/dist/entry/rsc-prod/css.js +2 -2
  110. package/dist/entry/rsc-prod/jsx-dev-runtime.js +2 -2
  111. package/dist/entry/rsc-prod/jsx-runtime.js +2 -2
  112. package/dist/entry/rsc-prod/runtime.js +4 -4
  113. package/dist/entry/rsc-prod.js +7 -7
  114. package/dist/extract-DeOytHKW.js +2 -0
  115. package/dist/{getClassName-BlvXHYuf.js → getClassName-oiQ8CnkS.js} +3 -3
  116. package/dist/getClassName-oiQ8CnkS.js.map +1 -0
  117. package/dist/global-Cul1dX8k.js +14 -0
  118. package/dist/{global-CvfmFLsK.js.map → global-Cul1dX8k.js.map} +1 -1
  119. package/dist/global-zaCE-g1C.js +31 -0
  120. package/dist/global-zaCE-g1C.js.map +1 -0
  121. package/dist/{format-3nKBE_5t.js → hash-Bycpk3MR.js} +53 -37
  122. package/dist/hash-Bycpk3MR.js.map +1 -0
  123. package/dist/index.js +10 -8
  124. package/dist/jsx/jsx-dev-runtime.js +2 -2
  125. package/dist/jsx/jsx-dev-runtime.server.js +1 -1
  126. package/dist/jsx/jsx-runtime.js +2 -2
  127. package/dist/jsx/jsx-runtime.server.js +1 -1
  128. package/dist/{jsx-D2BksHSv.js → jsx-A4cK517J.js} +7 -7
  129. package/dist/{jsx-D2BksHSv.js.map → jsx-A4cK517J.js.map} +1 -1
  130. package/dist/{jsx-CwTeyUxr.js → jsx-Ba-XV33u.js} +3 -3
  131. package/dist/{jsx-CwTeyUxr.js.map → jsx-Ba-XV33u.js.map} +1 -1
  132. package/dist/{jsx_dev_runtime-B6xs4by8.js → jsx_dev_runtime-BQcRzl5D.js} +2 -2
  133. package/dist/{jsx_dev_runtime-B6xs4by8.js.map → jsx_dev_runtime-BQcRzl5D.js.map} +1 -1
  134. package/dist/{jsx_runtime-iHLDwpcW.js → jsx_runtime-B9KEoAQN.js} +2 -2
  135. package/dist/{jsx_runtime-iHLDwpcW.js.map → jsx_runtime-B9KEoAQN.js.map} +1 -1
  136. package/dist/{jsx_runtime-04xfnsi7.js → jsx_runtime-BXcbW8Yp.js} +2 -2
  137. package/dist/{jsx_runtime-04xfnsi7.js.map → jsx_runtime-BXcbW8Yp.js.map} +1 -1
  138. package/dist/{layer-D1SaH07m.js → layer-CbQzwZF-.js} +4 -4
  139. package/dist/{layer-D1SaH07m.js.map → layer-CbQzwZF-.js.map} +1 -1
  140. package/dist/{loader-B5Kw0DD-.mjs → loader-BAth2yZ1.mjs} +3 -3
  141. package/dist/{loader-B5Kw0DD-.mjs.map → loader-BAth2yZ1.mjs.map} +1 -1
  142. package/dist/{misc-DCdYYyhK.mjs → misc-DFBKJGLT.mjs} +7 -3
  143. package/dist/{misc-DCdYYyhK.mjs.map → misc-DFBKJGLT.mjs.map} +1 -1
  144. package/dist/namedTokens-BUa6raTb.js +83 -0
  145. package/dist/namedTokens-BUa6raTb.js.map +1 -0
  146. package/dist/plugin/farm/index.mjs +2 -2
  147. package/dist/plugin/nextjs/index.mjs +4 -4
  148. package/dist/plugin/nextjs/loader.mjs +4 -4
  149. package/dist/plugin/parcel/optimizer.cjs +1 -1
  150. package/dist/plugin/parcel/optimizer.mjs +2 -2
  151. package/dist/plugin/parcel/resolver.cjs +1 -1
  152. package/dist/plugin/parcel/resolver.mjs +2 -2
  153. package/dist/plugin/parcel/runtime.cjs +1 -1
  154. package/dist/plugin/parcel/runtime.mjs +1 -1
  155. package/dist/plugin/parcel/transformer.cjs +1 -1
  156. package/dist/plugin/parcel/transformer.mjs +2 -2
  157. package/dist/plugin/rspack/index.mjs +1 -1
  158. package/dist/plugin/vite/index.mjs +11 -8
  159. package/dist/plugin/vite/index.mjs.map +1 -1
  160. package/dist/plugin/webpack/index.mjs +1 -1
  161. package/dist/plugin/webpack/loader.mjs +2 -2
  162. package/dist/presets/tailwind/index.js +971 -0
  163. package/dist/presets/tailwind/index.js.map +1 -0
  164. package/dist/{property-CnLFt5kx.js → property-CF6JgpTq.js} +2 -2
  165. package/dist/{property-CnLFt5kx.js.map → property-CF6JgpTq.js.map} +1 -1
  166. package/dist/{registry-yHLRxyoo.mjs → registry-CiwvMfx8.mjs} +2 -2
  167. package/dist/{registry-yHLRxyoo.mjs.map → registry-CiwvMfx8.mjs.map} +1 -1
  168. package/dist/{rules-9HSO1pxL.js → rules-DlXcch7-.js} +13 -10
  169. package/dist/rules-DlXcch7-.js.map +1 -0
  170. package/dist/runtime-BKChZZ2-.js +52 -0
  171. package/dist/runtime-BKChZZ2-.js.map +1 -0
  172. package/dist/server.js +13 -11
  173. package/dist/server.js.map +1 -1
  174. package/dist/{shared-CxbHR89f.mjs → shared-x59dI2NW.mjs} +4 -4
  175. package/dist/{shared-CxbHR89f.mjs.map → shared-x59dI2NW.mjs.map} +1 -1
  176. package/dist/{shared-CBArHB9-.cjs → shared-yDD0nfm1.cjs} +603 -110
  177. package/dist/shared-yDD0nfm1.cjs.map +1 -0
  178. package/dist/sheet-B-uJfHRY.js +7 -0
  179. package/dist/sheet-B-uJfHRY.js.map +1 -0
  180. package/dist/{sidecar-BFakLl0X.mjs → sidecar-CJ6i4wmn.mjs} +3 -3
  181. package/dist/{sidecar-BFakLl0X.mjs.map → sidecar-CJ6i4wmn.mjs.map} +1 -1
  182. package/dist/{style-B1UUqjj5.js → style-91J0B5ef.js} +35 -7
  183. package/dist/style-91J0B5ef.js.map +1 -0
  184. package/dist/{style-v2bf70TZ.js → style-Bw5ka-Nq.js} +440 -135
  185. package/dist/style-Bw5ka-Nq.js.map +1 -0
  186. package/dist/{style-DgHbdbdF.js → style-DFFK06Of.js} +258 -82
  187. package/dist/style-DFFK06Of.js.map +1 -0
  188. package/dist/style-pz8e5To1.js +5 -0
  189. package/dist/{styleStore-DyNXBcUK.js → styleStore-DJ0Msgkh.js} +6 -5
  190. package/dist/{styleStore-DyNXBcUK.js.map → styleStore-DJ0Msgkh.js.map} +1 -1
  191. package/dist/{styleStore-Dea_WVbr.js → styleStore-ydQcDBD4.js} +16 -7
  192. package/dist/styleStore-ydQcDBD4.js.map +1 -0
  193. package/dist/token-DTOyFLmp.js +58 -0
  194. package/dist/token-DTOyFLmp.js.map +1 -0
  195. package/dist/{token-u_tM-mtg.js → token-DT_sCPtm.js} +125 -31
  196. package/dist/token-DT_sCPtm.js.map +1 -0
  197. package/dist/{trace-Bu_qOqRy.js → trace-CO36aenp.js} +3 -3
  198. package/dist/{trace-Bu_qOqRy.js.map → trace-CO36aenp.js.map} +1 -1
  199. package/dist/{trace-CU0rvNYr.js → trace-D8j96G57.js} +2 -2
  200. package/dist/{trace-CU0rvNYr.js.map → trace-D8j96G57.js.map} +1 -1
  201. package/dist/transform-BTJOg8Hg.js +23 -0
  202. package/dist/transform-BTJOg8Hg.js.map +1 -0
  203. package/dist/{utils-CWNHx4EC.js → utils-Bmw655wa.js} +3 -3
  204. package/dist/{utils-CWNHx4EC.js.map → utils-Bmw655wa.js.map} +1 -1
  205. package/dist/{utils-CEaq_c-A.mjs → utils-D2fygyTm.mjs} +4 -4
  206. package/dist/{utils-CEaq_c-A.mjs.map → utils-D2fygyTm.mjs.map} +1 -1
  207. package/dist/{utils-Bdbqn0f8.mjs → utils-DTXCTUlS.mjs} +3 -3
  208. package/dist/{utils-Bdbqn0f8.mjs.map → utils-DTXCTUlS.mjs.map} +1 -1
  209. package/dist/{utils-BbehLOby.js → utils-DVFxZnVC.js} +159 -76
  210. package/dist/utils-DVFxZnVC.js.map +1 -0
  211. package/dist/{utils-D7FAOyg6.js → utils-hoYnMiA7.js} +4 -4
  212. package/dist/{utils-D7FAOyg6.js.map → utils-hoYnMiA7.js.map} +1 -1
  213. package/dist/utils.js +3 -3
  214. package/dist/value-D-ZcRzLA.js +42 -0
  215. package/dist/value-D-ZcRzLA.js.map +1 -0
  216. package/dist/{value-BR4e2MKt.js → value-DvFkGBy2.js} +147 -28
  217. package/dist/value-DvFkGBy2.js.map +1 -0
  218. package/dist/value-dG9LK0Gq.js +85 -0
  219. package/dist/value-dG9LK0Gq.js.map +1 -0
  220. package/dist/{valueRef-lshFk1Cs.js → valueRef-CsLVJwjA.js} +2 -2
  221. package/dist/{valueRef-lshFk1Cs.js.map → valueRef-CsLVJwjA.js.map} +1 -1
  222. package/dist/{webpack-Dh6lox2l.mjs → webpack-BOU7_xld.mjs} +5 -5
  223. package/dist/{webpack-Dh6lox2l.mjs.map → webpack-BOU7_xld.mjs.map} +1 -1
  224. package/entry/dev/config.ts +1 -1
  225. package/entry/dev/index.ts +1 -0
  226. package/entry/dev/jsx_dev_runtime.ts +1 -0
  227. package/entry/dev/jsx_runtime.ts +1 -0
  228. package/entry/dev/sheet.ts +4 -0
  229. package/entry/prod/runtime.ts +1 -1
  230. package/entry/rsc_dev/config.ts +1 -1
  231. package/entry/rsc_dev/server.ts +1 -1
  232. package/entry/rsc_prod/runtime.ts +1 -1
  233. package/entry/rsc_prod/server.ts +1 -1
  234. package/entry/shared/config_dev.ts +12 -0
  235. package/entry/shared/dev.ts +11 -2
  236. package/entry/shared/utils.ts +28 -0
  237. package/package.json +26 -9
  238. package/plugin/bundler/vite/plugin.ts +2 -1
  239. package/plugin/bundler/vite/state.ts +10 -5
  240. package/plugin/utils/runtimeEntry.ts +12 -0
  241. package/presets/tailwind/classname/index.ts +2 -0
  242. package/presets/tailwind/classname/transform.ts +208 -0
  243. package/presets/tailwind/classname/types.ts +124 -0
  244. package/presets/tailwind/index.ts +5 -0
  245. package/presets/tailwind/selectors.ts +27 -0
  246. package/presets/tailwind/style/index.ts +2 -0
  247. package/presets/tailwind/style/transform.ts +430 -0
  248. package/presets/tailwind/style/types.ts +346 -0
  249. package/presets/tailwind/theme.ts +479 -0
  250. package/presets/tailwind/types.ts +147 -0
  251. package/runtime/core/cache/pool.ts +1 -1
  252. package/runtime/extract/getClassName.ts +1 -6
  253. package/runtime/extract/index.ts +1 -1
  254. package/runtime/index.ts +8 -1
  255. package/runtime/types.ts +4 -2
  256. package/style/classname.ts +41 -0
  257. package/style/index.ts +1 -0
  258. package/style/style.ts +30 -11
  259. package/style/theme.ts +4 -2
  260. package/style/transform.ts +41 -2
  261. package/utils/hash.ts +4 -0
  262. package/atomic/layer/README.md +0 -116
  263. package/dist/className-DC2Cq8p3.js.map +0 -1
  264. package/dist/compiler-DENc3a2R.mjs.map +0 -1
  265. package/dist/config-BryWDfQX.js.map +0 -1
  266. package/dist/config-DKHXWhe1.js +0 -1
  267. package/dist/config-Di2VYYKV.js +0 -6
  268. package/dist/config-DloHOG6I.js +0 -13
  269. package/dist/config-DloHOG6I.js.map +0 -1
  270. package/dist/css-BowBszUt.js.map +0 -1
  271. package/dist/css-ByOrugEX.js.map +0 -1
  272. package/dist/css-DcazYor9.js.map +0 -1
  273. package/dist/data-BsqOa5br.js.map +0 -1
  274. package/dist/debug-BAw63qX6.js +0 -15
  275. package/dist/debug-BAw63qX6.js.map +0 -1
  276. package/dist/debug-DGki_v7g.js +0 -15
  277. package/dist/debug-DGki_v7g.js.map +0 -1
  278. package/dist/debug-n2aZQBSa.js.map +0 -1
  279. package/dist/dev-DfBbuLeE.js.map +0 -1
  280. package/dist/extract-DEwSDJ9Z.js +0 -2
  281. package/dist/format-3nKBE_5t.js.map +0 -1
  282. package/dist/getClassName-BlvXHYuf.js.map +0 -1
  283. package/dist/global-CvfmFLsK.js +0 -11
  284. package/dist/rules-9HSO1pxL.js.map +0 -1
  285. package/dist/runtime-CYqNCiaM.js +0 -53
  286. package/dist/runtime-CYqNCiaM.js.map +0 -1
  287. package/dist/shared-CBArHB9-.cjs.map +0 -1
  288. package/dist/style-B-6jHipw.js +0 -5
  289. package/dist/style-B1UUqjj5.js.map +0 -1
  290. package/dist/style-DgHbdbdF.js.map +0 -1
  291. package/dist/style-v2bf70TZ.js.map +0 -1
  292. package/dist/styleStore-Dea_WVbr.js.map +0 -1
  293. package/dist/token-u_tM-mtg.js.map +0 -1
  294. package/dist/utils-BbehLOby.js.map +0 -1
  295. package/dist/value-BR4e2MKt.js.map +0 -1
  296. package/dist/value-E8rEv2Oe.js +0 -136
  297. package/dist/value-E8rEv2Oe.js.map +0 -1
@@ -0,0 +1,971 @@
1
+ import { v as selector, y as selectorPriority } from "../../assert-BGdigdr5.js";
2
+ import { c as isStyleTokenData } from "../../token-DTOyFLmp.js";
3
+ import { i as styleTransform, t as classNameTransform } from "../../transform-BTJOg8Hg.js";
4
+ import { r as PrioritySelectors } from "../../presets-BhXa232U.js";
5
+ import "../../selector/index.js";
6
+ import { i as getNamedToken } from "../../namedTokens-BUa6raTb.js";
7
+ import "../../dialect/index.js";
8
+ //#region presets/tailwind/selectors.ts
9
+ const TailwindResponsiveSelectors = {
10
+ sm: selector("@media (min-width: 640px)", "media"),
11
+ md: selector("@media (min-width: 768px)", "media"),
12
+ lg: selector("@media (min-width: 1024px)", "media"),
13
+ xl: selector("@media (min-width: 1280px)", "media"),
14
+ xxl: selector("@media (min-width: 1536px)", "media")
15
+ };
16
+ const TailwindDarkSelector = selector(":where(.dark, .dark *)");
17
+ const TailwindSelectors = selectorPriority({
18
+ ...PrioritySelectors,
19
+ ...TailwindResponsiveSelectors,
20
+ dark: TailwindDarkSelector
21
+ }, [
22
+ "link",
23
+ "visited",
24
+ "hover",
25
+ "focusWithin",
26
+ "focus",
27
+ "focusVisible",
28
+ "active",
29
+ "disabled"
30
+ ]);
31
+ //#endregion
32
+ //#region presets/tailwind/theme.ts
33
+ const defaultTailwindTheme = {
34
+ spacing: {
35
+ 0: 0,
36
+ px: "1px",
37
+ .5: "0.125rem",
38
+ 1: "0.25rem",
39
+ 1.5: "0.375rem",
40
+ 2: "0.5rem",
41
+ 2.5: "0.625rem",
42
+ 3: "0.75rem",
43
+ 3.5: "0.875rem",
44
+ 4: "1rem",
45
+ 5: "1.25rem",
46
+ 6: "1.5rem",
47
+ 7: "1.75rem",
48
+ 8: "2rem",
49
+ 9: "2.25rem",
50
+ 10: "2.5rem",
51
+ 11: "2.75rem",
52
+ 12: "3rem",
53
+ 14: "3.5rem",
54
+ 16: "4rem",
55
+ 20: "5rem",
56
+ 24: "6rem",
57
+ 28: "7rem",
58
+ 32: "8rem",
59
+ 36: "9rem",
60
+ 40: "10rem",
61
+ 44: "11rem",
62
+ 48: "12rem",
63
+ 52: "13rem",
64
+ 56: "14rem",
65
+ 60: "15rem",
66
+ 64: "16rem",
67
+ 72: "18rem",
68
+ 80: "20rem",
69
+ 96: "24rem"
70
+ },
71
+ colors: {
72
+ transparent: "transparent",
73
+ current: "currentColor",
74
+ red: {
75
+ 50: "oklch(97.1% 0.013 17.38)",
76
+ 100: "oklch(93.6% 0.032 17.717)",
77
+ 200: "oklch(88.5% 0.062 18.334)",
78
+ 300: "oklch(80.8% 0.114 19.571)",
79
+ 400: "oklch(70.4% 0.191 22.216)",
80
+ 500: "oklch(63.7% 0.237 25.331)",
81
+ 600: "oklch(57.7% 0.245 27.325)",
82
+ 700: "oklch(50.5% 0.213 27.518)",
83
+ 800: "oklch(44.4% 0.177 26.899)",
84
+ 900: "oklch(39.6% 0.141 25.723)",
85
+ 950: "oklch(25.8% 0.092 26.042)"
86
+ },
87
+ orange: {
88
+ 50: "oklch(98% 0.016 73.684)",
89
+ 100: "oklch(95.4% 0.038 75.164)",
90
+ 200: "oklch(90.1% 0.076 70.697)",
91
+ 300: "oklch(83.7% 0.128 66.29)",
92
+ 400: "oklch(75% 0.183 55.934)",
93
+ 500: "oklch(70.5% 0.213 47.604)",
94
+ 600: "oklch(64.6% 0.222 41.116)",
95
+ 700: "oklch(55.3% 0.195 38.402)",
96
+ 800: "oklch(47% 0.157 37.304)",
97
+ 900: "oklch(40.8% 0.123 38.172)",
98
+ 950: "oklch(26.6% 0.079 36.259)"
99
+ },
100
+ amber: {
101
+ 50: "oklch(98.7% 0.022 95.277)",
102
+ 100: "oklch(96.2% 0.059 95.617)",
103
+ 200: "oklch(92.4% 0.12 95.746)",
104
+ 300: "oklch(87.9% 0.169 91.605)",
105
+ 400: "oklch(82.8% 0.189 84.429)",
106
+ 500: "oklch(76.9% 0.188 70.08)",
107
+ 600: "oklch(66.6% 0.179 58.318)",
108
+ 700: "oklch(55.5% 0.163 48.998)",
109
+ 800: "oklch(47.3% 0.137 46.201)",
110
+ 900: "oklch(41.4% 0.112 45.904)",
111
+ 950: "oklch(27.9% 0.077 45.635)"
112
+ },
113
+ yellow: {
114
+ 50: "oklch(98.7% 0.026 102.212)",
115
+ 100: "oklch(97.3% 0.071 103.193)",
116
+ 200: "oklch(94.5% 0.129 101.54)",
117
+ 300: "oklch(90.5% 0.182 98.111)",
118
+ 400: "oklch(85.2% 0.199 91.936)",
119
+ 500: "oklch(79.5% 0.184 86.047)",
120
+ 600: "oklch(68.1% 0.162 75.834)",
121
+ 700: "oklch(55.4% 0.135 66.442)",
122
+ 800: "oklch(47.6% 0.114 61.907)",
123
+ 900: "oklch(42.1% 0.095 57.708)",
124
+ 950: "oklch(28.6% 0.066 53.813)"
125
+ },
126
+ lime: {
127
+ 50: "oklch(98.6% 0.031 120.757)",
128
+ 100: "oklch(96.7% 0.067 122.328)",
129
+ 200: "oklch(93.8% 0.127 124.321)",
130
+ 300: "oklch(89.7% 0.196 126.665)",
131
+ 400: "oklch(84.1% 0.238 128.85)",
132
+ 500: "oklch(76.8% 0.233 130.85)",
133
+ 600: "oklch(64.8% 0.2 131.684)",
134
+ 700: "oklch(53.2% 0.157 131.589)",
135
+ 800: "oklch(45.3% 0.124 130.933)",
136
+ 900: "oklch(40.5% 0.101 131.063)",
137
+ 950: "oklch(27.4% 0.072 132.109)"
138
+ },
139
+ green: {
140
+ 50: "oklch(98.2% 0.018 155.826)",
141
+ 100: "oklch(96.2% 0.044 156.743)",
142
+ 200: "oklch(92.5% 0.084 155.995)",
143
+ 300: "oklch(87.1% 0.15 154.449)",
144
+ 400: "oklch(79.2% 0.209 151.711)",
145
+ 500: "oklch(72.3% 0.219 149.579)",
146
+ 600: "oklch(62.7% 0.194 149.214)",
147
+ 700: "oklch(52.7% 0.154 150.069)",
148
+ 800: "oklch(44.8% 0.119 151.328)",
149
+ 900: "oklch(39.3% 0.095 152.535)",
150
+ 950: "oklch(26.6% 0.065 152.934)"
151
+ },
152
+ emerald: {
153
+ 50: "oklch(97.9% 0.021 166.113)",
154
+ 100: "oklch(95% 0.052 163.051)",
155
+ 200: "oklch(90.5% 0.093 164.15)",
156
+ 300: "oklch(84.5% 0.143 164.978)",
157
+ 400: "oklch(76.5% 0.177 163.223)",
158
+ 500: "oklch(69.6% 0.17 162.48)",
159
+ 600: "oklch(59.6% 0.145 163.225)",
160
+ 700: "oklch(50.8% 0.118 165.612)",
161
+ 800: "oklch(43.2% 0.095 166.913)",
162
+ 900: "oklch(37.8% 0.077 168.94)",
163
+ 950: "oklch(26.2% 0.051 172.552)"
164
+ },
165
+ teal: {
166
+ 50: "oklch(98.4% 0.014 180.72)",
167
+ 100: "oklch(95.3% 0.051 180.801)",
168
+ 200: "oklch(91% 0.096 180.426)",
169
+ 300: "oklch(85.5% 0.138 181.071)",
170
+ 400: "oklch(77.7% 0.152 181.912)",
171
+ 500: "oklch(70.4% 0.14 182.503)",
172
+ 600: "oklch(60% 0.118 184.704)",
173
+ 700: "oklch(51.1% 0.096 186.391)",
174
+ 800: "oklch(43.7% 0.078 188.216)",
175
+ 900: "oklch(38.6% 0.063 188.416)",
176
+ 950: "oklch(27.7% 0.046 192.524)"
177
+ },
178
+ cyan: {
179
+ 50: "oklch(98.4% 0.019 200.873)",
180
+ 100: "oklch(95.6% 0.045 203.388)",
181
+ 200: "oklch(91.7% 0.08 205.041)",
182
+ 300: "oklch(86.5% 0.127 207.078)",
183
+ 400: "oklch(78.9% 0.154 211.53)",
184
+ 500: "oklch(71.5% 0.143 215.221)",
185
+ 600: "oklch(60.9% 0.126 221.723)",
186
+ 700: "oklch(52% 0.105 223.128)",
187
+ 800: "oklch(45% 0.085 224.283)",
188
+ 900: "oklch(39.8% 0.07 227.392)",
189
+ 950: "oklch(30.2% 0.056 229.695)"
190
+ },
191
+ sky: {
192
+ 50: "oklch(97.7% 0.013 236.62)",
193
+ 100: "oklch(95.1% 0.026 236.824)",
194
+ 200: "oklch(90.1% 0.058 230.902)",
195
+ 300: "oklch(82.8% 0.111 230.318)",
196
+ 400: "oklch(74.6% 0.16 232.661)",
197
+ 500: "oklch(68.5% 0.169 237.323)",
198
+ 600: "oklch(58.8% 0.158 241.966)",
199
+ 700: "oklch(50% 0.134 242.749)",
200
+ 800: "oklch(44.3% 0.11 240.79)",
201
+ 900: "oklch(39.1% 0.09 240.876)",
202
+ 950: "oklch(29.3% 0.066 243.157)"
203
+ },
204
+ blue: {
205
+ 50: "oklch(97% 0.014 254.604)",
206
+ 100: "oklch(93.2% 0.032 255.585)",
207
+ 200: "oklch(88.2% 0.059 254.128)",
208
+ 300: "oklch(80.9% 0.105 251.813)",
209
+ 400: "oklch(70.7% 0.165 254.624)",
210
+ 500: "oklch(62.3% 0.214 259.815)",
211
+ 600: "oklch(54.6% 0.245 262.881)",
212
+ 700: "oklch(48.8% 0.243 264.376)",
213
+ 800: "oklch(42.4% 0.199 265.638)",
214
+ 900: "oklch(37.9% 0.146 265.522)",
215
+ 950: "oklch(28.2% 0.091 267.935)"
216
+ },
217
+ indigo: {
218
+ 50: "oklch(96.2% 0.018 272.314)",
219
+ 100: "oklch(93% 0.034 272.788)",
220
+ 200: "oklch(87% 0.065 274.039)",
221
+ 300: "oklch(78.5% 0.115 274.713)",
222
+ 400: "oklch(67.3% 0.182 276.935)",
223
+ 500: "oklch(58.5% 0.233 277.117)",
224
+ 600: "oklch(51.1% 0.262 276.966)",
225
+ 700: "oklch(45.7% 0.24 277.023)",
226
+ 800: "oklch(39.8% 0.195 277.366)",
227
+ 900: "oklch(35.9% 0.144 278.697)",
228
+ 950: "oklch(25.7% 0.09 281.288)"
229
+ },
230
+ violet: {
231
+ 50: "oklch(96.9% 0.016 293.756)",
232
+ 100: "oklch(94.3% 0.029 294.588)",
233
+ 200: "oklch(89.4% 0.057 293.283)",
234
+ 300: "oklch(81.1% 0.111 293.571)",
235
+ 400: "oklch(70.2% 0.183 293.541)",
236
+ 500: "oklch(60.6% 0.25 292.717)",
237
+ 600: "oklch(54.1% 0.281 293.009)",
238
+ 700: "oklch(49.1% 0.27 292.581)",
239
+ 800: "oklch(43.2% 0.232 292.759)",
240
+ 900: "oklch(38% 0.189 293.745)",
241
+ 950: "oklch(28.3% 0.141 291.089)"
242
+ },
243
+ purple: {
244
+ 50: "oklch(97.7% 0.014 308.299)",
245
+ 100: "oklch(94.6% 0.033 307.174)",
246
+ 200: "oklch(90.2% 0.063 306.703)",
247
+ 300: "oklch(82.7% 0.119 306.383)",
248
+ 400: "oklch(71.4% 0.203 305.504)",
249
+ 500: "oklch(62.7% 0.265 303.9)",
250
+ 600: "oklch(55.8% 0.288 302.321)",
251
+ 700: "oklch(49.6% 0.265 301.924)",
252
+ 800: "oklch(43.8% 0.218 303.724)",
253
+ 900: "oklch(38.1% 0.176 304.987)",
254
+ 950: "oklch(29.1% 0.149 302.717)"
255
+ },
256
+ fuchsia: {
257
+ 50: "oklch(97.7% 0.017 320.058)",
258
+ 100: "oklch(95.2% 0.037 318.852)",
259
+ 200: "oklch(90.3% 0.076 319.62)",
260
+ 300: "oklch(83.3% 0.145 321.434)",
261
+ 400: "oklch(74% 0.238 322.16)",
262
+ 500: "oklch(66.7% 0.295 322.15)",
263
+ 600: "oklch(59.1% 0.293 322.896)",
264
+ 700: "oklch(51.8% 0.253 323.949)",
265
+ 800: "oklch(45.2% 0.211 324.591)",
266
+ 900: "oklch(40.1% 0.17 325.612)",
267
+ 950: "oklch(29.3% 0.136 325.661)"
268
+ },
269
+ pink: {
270
+ 50: "oklch(97.1% 0.014 343.198)",
271
+ 100: "oklch(94.8% 0.028 342.258)",
272
+ 200: "oklch(89.9% 0.061 343.231)",
273
+ 300: "oklch(82.3% 0.12 346.018)",
274
+ 400: "oklch(71.8% 0.202 349.761)",
275
+ 500: "oklch(65.6% 0.241 354.308)",
276
+ 600: "oklch(59.2% 0.249 0.584)",
277
+ 700: "oklch(52.5% 0.223 3.958)",
278
+ 800: "oklch(45.9% 0.187 3.815)",
279
+ 900: "oklch(40.8% 0.153 2.432)",
280
+ 950: "oklch(28.4% 0.109 3.907)"
281
+ },
282
+ rose: {
283
+ 50: "oklch(96.9% 0.015 12.422)",
284
+ 100: "oklch(94.1% 0.03 12.58)",
285
+ 200: "oklch(89.2% 0.058 10.001)",
286
+ 300: "oklch(81% 0.117 11.638)",
287
+ 400: "oklch(71.2% 0.194 13.428)",
288
+ 500: "oklch(64.5% 0.246 16.439)",
289
+ 600: "oklch(58.6% 0.253 17.585)",
290
+ 700: "oklch(51.4% 0.222 16.935)",
291
+ 800: "oklch(45.5% 0.188 13.697)",
292
+ 900: "oklch(41% 0.159 10.272)",
293
+ 950: "oklch(27.1% 0.105 12.094)"
294
+ },
295
+ slate: {
296
+ 50: "oklch(98.4% 0.003 247.858)",
297
+ 100: "oklch(96.8% 0.007 247.896)",
298
+ 200: "oklch(92.9% 0.013 255.508)",
299
+ 300: "oklch(86.9% 0.022 252.894)",
300
+ 400: "oklch(70.4% 0.04 256.788)",
301
+ 500: "oklch(55.4% 0.046 257.417)",
302
+ 600: "oklch(44.6% 0.043 257.281)",
303
+ 700: "oklch(37.2% 0.044 257.287)",
304
+ 800: "oklch(27.9% 0.041 260.031)",
305
+ 900: "oklch(20.8% 0.042 265.755)",
306
+ 950: "oklch(12.9% 0.042 264.695)"
307
+ },
308
+ gray: {
309
+ 50: "oklch(98.5% 0.002 247.839)",
310
+ 100: "oklch(96.7% 0.003 264.542)",
311
+ 200: "oklch(92.8% 0.006 264.531)",
312
+ 300: "oklch(87.2% 0.01 258.338)",
313
+ 400: "oklch(70.7% 0.022 261.325)",
314
+ 500: "oklch(55.1% 0.027 264.364)",
315
+ 600: "oklch(44.6% 0.03 256.802)",
316
+ 700: "oklch(37.3% 0.034 259.733)",
317
+ 800: "oklch(27.8% 0.033 256.848)",
318
+ 900: "oklch(21% 0.034 264.665)",
319
+ 950: "oklch(13% 0.028 261.692)"
320
+ },
321
+ zinc: {
322
+ 50: "oklch(98.5% 0 0)",
323
+ 100: "oklch(96.7% 0.001 286.375)",
324
+ 200: "oklch(92% 0.004 286.32)",
325
+ 300: "oklch(87.1% 0.006 286.286)",
326
+ 400: "oklch(70.5% 0.015 286.067)",
327
+ 500: "oklch(55.2% 0.016 285.938)",
328
+ 600: "oklch(44.2% 0.017 285.786)",
329
+ 700: "oklch(37% 0.013 285.805)",
330
+ 800: "oklch(27.4% 0.006 286.033)",
331
+ 900: "oklch(21% 0.006 285.885)",
332
+ 950: "oklch(14.1% 0.005 285.823)"
333
+ },
334
+ neutral: {
335
+ 50: "oklch(98.5% 0 0)",
336
+ 100: "oklch(97% 0 0)",
337
+ 200: "oklch(92.2% 0 0)",
338
+ 300: "oklch(87% 0 0)",
339
+ 400: "oklch(70.8% 0 0)",
340
+ 500: "oklch(55.6% 0 0)",
341
+ 600: "oklch(43.9% 0 0)",
342
+ 700: "oklch(37.1% 0 0)",
343
+ 800: "oklch(26.9% 0 0)",
344
+ 900: "oklch(20.5% 0 0)",
345
+ 950: "oklch(14.5% 0 0)"
346
+ },
347
+ stone: {
348
+ 50: "oklch(98.5% 0.001 106.423)",
349
+ 100: "oklch(97% 0.001 106.424)",
350
+ 200: "oklch(92.3% 0.003 48.717)",
351
+ 300: "oklch(86.9% 0.005 56.366)",
352
+ 400: "oklch(70.9% 0.01 56.259)",
353
+ 500: "oklch(55.3% 0.013 58.071)",
354
+ 600: "oklch(44.4% 0.011 73.639)",
355
+ 700: "oklch(37.4% 0.01 67.558)",
356
+ 800: "oklch(26.8% 0.007 34.298)",
357
+ 900: "oklch(21.6% 0.006 56.043)",
358
+ 950: "oklch(14.7% 0.004 49.25)"
359
+ },
360
+ mauve: {
361
+ 50: "oklch(98.5% 0 0)",
362
+ 100: "oklch(96% 0.003 325.6)",
363
+ 200: "oklch(92.2% 0.005 325.62)",
364
+ 300: "oklch(86.5% 0.012 325.68)",
365
+ 400: "oklch(71.1% 0.019 323.02)",
366
+ 500: "oklch(54.2% 0.034 322.5)",
367
+ 600: "oklch(43.5% 0.029 321.78)",
368
+ 700: "oklch(36.4% 0.029 323.89)",
369
+ 800: "oklch(26.3% 0.024 320.12)",
370
+ 900: "oklch(21.2% 0.019 322.12)",
371
+ 950: "oklch(14.5% 0.008 326)"
372
+ },
373
+ olive: {
374
+ 50: "oklch(98.8% 0.003 106.5)",
375
+ 100: "oklch(96.6% 0.005 106.5)",
376
+ 200: "oklch(93% 0.007 106.5)",
377
+ 300: "oklch(88% 0.011 106.6)",
378
+ 400: "oklch(73.7% 0.021 106.9)",
379
+ 500: "oklch(58% 0.031 107.3)",
380
+ 600: "oklch(46.6% 0.025 107.3)",
381
+ 700: "oklch(39.4% 0.023 107.4)",
382
+ 800: "oklch(28.6% 0.016 107.4)",
383
+ 900: "oklch(22.8% 0.013 107.4)",
384
+ 950: "oklch(15.3% 0.006 107.1)"
385
+ },
386
+ mist: {
387
+ 50: "oklch(98.7% 0.002 197.1)",
388
+ 100: "oklch(96.3% 0.002 197.1)",
389
+ 200: "oklch(92.5% 0.005 214.3)",
390
+ 300: "oklch(87.2% 0.007 219.6)",
391
+ 400: "oklch(72.3% 0.014 214.4)",
392
+ 500: "oklch(56% 0.021 213.5)",
393
+ 600: "oklch(45% 0.017 213.2)",
394
+ 700: "oklch(37.8% 0.015 216)",
395
+ 800: "oklch(27.5% 0.011 216.9)",
396
+ 900: "oklch(21.8% 0.008 223.9)",
397
+ 950: "oklch(14.8% 0.004 228.8)"
398
+ },
399
+ taupe: {
400
+ 50: "oklch(98.6% 0.002 67.8)",
401
+ 100: "oklch(96% 0.002 17.2)",
402
+ 200: "oklch(92.2% 0.005 34.3)",
403
+ 300: "oklch(86.8% 0.007 39.5)",
404
+ 400: "oklch(71.4% 0.014 41.2)",
405
+ 500: "oklch(54.7% 0.021 43.1)",
406
+ 600: "oklch(43.8% 0.017 39.3)",
407
+ 700: "oklch(36.7% 0.016 35.7)",
408
+ 800: "oklch(26.8% 0.011 36.5)",
409
+ 900: "oklch(21.4% 0.009 43.1)",
410
+ 950: "oklch(14.7% 0.004 49.3)"
411
+ },
412
+ black: "#000",
413
+ white: "#fff"
414
+ },
415
+ radii: {
416
+ none: 0,
417
+ sm: "0.125rem",
418
+ DEFAULT: "0.25rem",
419
+ md: "0.375rem",
420
+ lg: "0.5rem",
421
+ xl: "0.75rem",
422
+ "2xl": "1rem",
423
+ "3xl": "1.5rem",
424
+ full: "9999px"
425
+ },
426
+ fontSizes: {
427
+ xs: "0.75rem",
428
+ sm: "0.875rem",
429
+ base: "1rem",
430
+ lg: "1.125rem",
431
+ xl: "1.25rem",
432
+ "2xl": "1.5rem",
433
+ "3xl": "1.875rem",
434
+ "4xl": "2.25rem",
435
+ "5xl": "3rem",
436
+ "6xl": "3.75rem"
437
+ },
438
+ fontWeights: {
439
+ thin: 100,
440
+ extralight: 200,
441
+ light: 300,
442
+ normal: 400,
443
+ medium: 500,
444
+ semibold: 600,
445
+ bold: 700,
446
+ extrabold: 800,
447
+ black: 900
448
+ },
449
+ lineHeights: {
450
+ none: 1,
451
+ tight: 1.25,
452
+ snug: 1.375,
453
+ normal: 1.5,
454
+ relaxed: 1.625,
455
+ loose: 2
456
+ },
457
+ letterSpacings: {
458
+ tighter: "-0.05em",
459
+ tight: "-0.025em",
460
+ normal: "0em",
461
+ wide: "0.025em",
462
+ wider: "0.05em",
463
+ widest: "0.1em"
464
+ },
465
+ shadows: {
466
+ sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
467
+ DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
468
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
469
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
470
+ xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
471
+ none: "none"
472
+ },
473
+ sizes: {
474
+ auto: "auto",
475
+ full: "100%",
476
+ screen: "100vw",
477
+ min: "min-content",
478
+ max: "max-content",
479
+ fit: "fit-content"
480
+ },
481
+ opacity: {
482
+ 0: 0,
483
+ 5: .05,
484
+ 10: .1,
485
+ 20: .2,
486
+ 25: .25,
487
+ 30: .3,
488
+ 40: .4,
489
+ 50: .5,
490
+ 60: .6,
491
+ 70: .7,
492
+ 75: .75,
493
+ 80: .8,
494
+ 90: .9,
495
+ 95: .95,
496
+ 100: 1
497
+ },
498
+ zIndices: {
499
+ auto: "auto",
500
+ 0: 0,
501
+ 10: 10,
502
+ 20: 20,
503
+ 30: 30,
504
+ 40: 40,
505
+ 50: 50
506
+ }
507
+ };
508
+ const defaultTailwindColors = defaultTailwindTheme.colors;
509
+ //#endregion
510
+ //#region presets/tailwind/style/transform.ts
511
+ function createTailwindStyleTransform(config = createTailwindStyleConfig({})) {
512
+ return createTailwindTransform(config);
513
+ }
514
+ function createTailwindExtendedStyleTransform(config = createTailwindStyleConfig({})) {
515
+ return createTailwindTransform(config);
516
+ }
517
+ function createTailwindTransform(config) {
518
+ const theme = config.theme;
519
+ const utilities = createTailwindUtilities();
520
+ return styleTransform({ transform(style) {
521
+ const css = {};
522
+ for (const property in style) {
523
+ const value = style[property];
524
+ const utility = utilities[property];
525
+ if (utility) {
526
+ utility(value, css, theme);
527
+ continue;
528
+ }
529
+ css[property] = value;
530
+ }
531
+ return css;
532
+ } });
533
+ }
534
+ const { colors: _defaultTailwindColors, ...defaultTailwindNonColorTheme } = defaultTailwindTheme;
535
+ const defaultTailwindStyleConfig = { theme: defaultTailwindNonColorTheme };
536
+ function createTailwindStyleConfig(options) {
537
+ return { theme: options.theme ?? {} };
538
+ }
539
+ function createDefaultedTailwindStyleConfig(options) {
540
+ return mergeTailwindStyleConfig(defaultTailwindStyleConfig, createTailwindStyleConfig(options));
541
+ }
542
+ function mergeTailwindStyleConfig(base, override) {
543
+ return { theme: mergeTailwindTheme(base.theme, override.theme) };
544
+ }
545
+ function mergeTailwindTheme(base, override) {
546
+ return {
547
+ ...base,
548
+ ...override,
549
+ spacing: mergeScale(base.spacing, override.spacing),
550
+ colors: mergeScale(base.colors, override.colors),
551
+ radii: mergeScale(base.radii, override.radii),
552
+ fontSizes: mergeScale(base.fontSizes, override.fontSizes),
553
+ fontWeights: mergeScale(base.fontWeights, override.fontWeights),
554
+ lineHeights: mergeScale(base.lineHeights, override.lineHeights),
555
+ letterSpacings: mergeScale(base.letterSpacings, override.letterSpacings),
556
+ shadows: mergeScale(base.shadows, override.shadows),
557
+ sizes: mergeScale(base.sizes, override.sizes),
558
+ zIndices: mergeScale(base.zIndices, override.zIndices),
559
+ opacity: mergeScale(base.opacity, override.opacity)
560
+ };
561
+ }
562
+ function mergeScale(base, override) {
563
+ if (!override) return base;
564
+ if (!base || !isMergeableScale(base)) return override;
565
+ if (!isMergeableScale(override)) return [override, base];
566
+ return {
567
+ ...base,
568
+ ...override
569
+ };
570
+ }
571
+ function isMergeableScale(scale) {
572
+ return !!scale && typeof scale === "object" && !Array.isArray(scale);
573
+ }
574
+ function createTailwindUtilities() {
575
+ return {
576
+ block: displayUtility("block"),
577
+ inlineBlock: displayUtility("inline-block"),
578
+ inlineFlex: displayUtility("inline-flex"),
579
+ grid: displayUtility("grid"),
580
+ hidden: displayUtility("none"),
581
+ flex: flexUtility,
582
+ direction: mapUtility("flexDirection", {
583
+ row: "row",
584
+ rowReverse: "row-reverse",
585
+ col: "column",
586
+ colReverse: "column-reverse"
587
+ }),
588
+ wrap: mapUtility("flexWrap", {
589
+ true: "wrap",
590
+ reverse: "wrap-reverse"
591
+ }),
592
+ items: mapUtility("alignItems", alignmentMap),
593
+ justify: mapUtility("justifyContent", justifyMap),
594
+ content: mapUtility("alignContent", justifyMap),
595
+ self: mapUtility("alignSelf", alignmentMap),
596
+ p: scaleUtility("spacing", "padding"),
597
+ px: scaleUtility("spacing", "paddingInline"),
598
+ py: scaleUtility("spacing", "paddingBlock"),
599
+ pt: scaleUtility("spacing", "paddingTop"),
600
+ pr: scaleUtility("spacing", "paddingRight"),
601
+ pb: scaleUtility("spacing", "paddingBottom"),
602
+ pl: scaleUtility("spacing", "paddingLeft"),
603
+ ps: scaleUtility("spacing", "paddingInlineStart"),
604
+ pe: scaleUtility("spacing", "paddingInlineEnd"),
605
+ m: scaleUtility("spacing", "margin"),
606
+ mx: scaleUtility("spacing", "marginInline"),
607
+ my: scaleUtility("spacing", "marginBlock"),
608
+ mt: scaleUtility("spacing", "marginTop"),
609
+ mr: scaleUtility("spacing", "marginRight"),
610
+ mb: scaleUtility("spacing", "marginBottom"),
611
+ ml: scaleUtility("spacing", "marginLeft"),
612
+ ms: scaleUtility("spacing", "marginInlineStart"),
613
+ me: scaleUtility("spacing", "marginInlineEnd"),
614
+ gap: scaleUtility("spacing", "gap"),
615
+ gapX: scaleUtility("spacing", "columnGap"),
616
+ gapY: scaleUtility("spacing", "rowGap"),
617
+ w: sizeUtility("width"),
618
+ minW: sizeUtility("minWidth"),
619
+ maxW: sizeUtility("maxWidth"),
620
+ h: sizeUtility("height"),
621
+ minH: sizeUtility("minHeight"),
622
+ maxH: sizeUtility("maxHeight"),
623
+ size: sizePairUtility,
624
+ bg: colorUtility("backgroundColor"),
625
+ text: textUtility,
626
+ borderColor: colorUtility("borderColor"),
627
+ outlineColor: colorUtility("outlineColor"),
628
+ ringColor: colorUtility("--tw-ring-color"),
629
+ textSize: scaleUtility("fontSizes", "fontSize"),
630
+ font: scaleUtility("fontWeights", "fontWeight"),
631
+ leading: scaleUtility("lineHeights", "lineHeight"),
632
+ tracking: scaleUtility("letterSpacings", "letterSpacing"),
633
+ align: propertyUtility("textAlign"),
634
+ rounded: scaleUtility("radii", "borderRadius"),
635
+ roundedT: multiScaleUtility("radii", ["borderTopLeftRadius", "borderTopRightRadius"]),
636
+ roundedR: multiScaleUtility("radii", ["borderTopRightRadius", "borderBottomRightRadius"]),
637
+ roundedB: multiScaleUtility("radii", ["borderBottomRightRadius", "borderBottomLeftRadius"]),
638
+ roundedL: multiScaleUtility("radii", ["borderTopLeftRadius", "borderBottomLeftRadius"]),
639
+ roundedTl: scaleUtility("radii", "borderTopLeftRadius"),
640
+ roundedTr: scaleUtility("radii", "borderTopRightRadius"),
641
+ roundedBr: scaleUtility("radii", "borderBottomRightRadius"),
642
+ roundedBl: scaleUtility("radii", "borderBottomLeftRadius"),
643
+ shadow: scaleUtility("shadows", "boxShadow"),
644
+ opacity: scaleUtility("opacity", "opacity"),
645
+ z: scaleUtility("zIndices", "zIndex"),
646
+ relative: positionUtility("relative"),
647
+ absolute: positionUtility("absolute"),
648
+ fixed: positionUtility("fixed"),
649
+ sticky: positionUtility("sticky"),
650
+ inset: scaleUtility("spacing", "inset"),
651
+ insetX: multiScaleUtility("spacing", ["left", "right"]),
652
+ insetY: multiScaleUtility("spacing", ["top", "bottom"]),
653
+ top: scaleUtility("spacing", "top"),
654
+ right: scaleUtility("spacing", "right"),
655
+ bottom: scaleUtility("spacing", "bottom"),
656
+ left: scaleUtility("spacing", "left"),
657
+ select: mapUtility("userSelect", {
658
+ none: "none",
659
+ text: "text",
660
+ all: "all",
661
+ auto: "auto"
662
+ }),
663
+ pointerEvents: mapUtility("pointerEvents", {
664
+ none: "none",
665
+ auto: "auto"
666
+ }),
667
+ cursor: propertyUtility("cursor"),
668
+ overflow: propertyUtility("overflow"),
669
+ overflowX: propertyUtility("overflowX"),
670
+ overflowY: propertyUtility("overflowY")
671
+ };
672
+ }
673
+ const alignmentMap = {
674
+ auto: "auto",
675
+ start: "flex-start",
676
+ end: "flex-end",
677
+ center: "center",
678
+ baseline: "baseline",
679
+ stretch: "stretch"
680
+ };
681
+ const justifyMap = {
682
+ start: "flex-start",
683
+ end: "flex-end",
684
+ center: "center",
685
+ between: "space-between",
686
+ around: "space-around",
687
+ evenly: "space-evenly",
688
+ stretch: "stretch"
689
+ };
690
+ function displayUtility(display) {
691
+ return (value, css) => {
692
+ if (value) css.display = display;
693
+ };
694
+ }
695
+ function flexUtility(value, css) {
696
+ if (value === true) {
697
+ css.display = "flex";
698
+ return;
699
+ }
700
+ if (value !== false && value !== void 0) css.flex = value;
701
+ }
702
+ function positionUtility(position) {
703
+ return (value, css) => {
704
+ if (value) css.position = position;
705
+ };
706
+ }
707
+ function propertyUtility(property) {
708
+ return (value, css) => {
709
+ if (value !== void 0) css[property] = value;
710
+ };
711
+ }
712
+ function scaleUtility(scaleName, property) {
713
+ return (value, css, theme) => {
714
+ if (value !== void 0) css[property] = resolveScale(theme[scaleName], value);
715
+ };
716
+ }
717
+ function colorUtility(property) {
718
+ return (value, css, theme) => {
719
+ if (value !== void 0) css[property] = resolveScale(theme.colors, value);
720
+ };
721
+ }
722
+ function textUtility(value, css, theme) {
723
+ if (value === void 0) return;
724
+ if (typeof value === "string" && textAlignValues.has(value)) {
725
+ css.textAlign = value;
726
+ return;
727
+ }
728
+ const fontSize = resolveScale(theme.fontSizes, value);
729
+ if (fontSize !== value) {
730
+ css.fontSize = fontSize;
731
+ return;
732
+ }
733
+ css.color = resolveScale(theme.colors, value);
734
+ }
735
+ function sizeUtility(property) {
736
+ return (value, css, theme) => {
737
+ if (value !== void 0) css[property] = resolveSize(property, theme, value);
738
+ };
739
+ }
740
+ function sizePairUtility(value, css, theme) {
741
+ if (value === void 0) return;
742
+ const resolved = resolveScales([theme.sizes, theme.spacing], value);
743
+ css.width = resolved;
744
+ css.height = resolved;
745
+ }
746
+ function resolveSize(property, theme, value) {
747
+ if (isHeightProperty(property) && value === "$screen") return "100vh";
748
+ return resolveScales([theme.sizes, theme.spacing], value);
749
+ }
750
+ function isHeightProperty(property) {
751
+ return property === "height" || property === "minHeight" || property === "maxHeight";
752
+ }
753
+ function multiScaleUtility(scaleName, properties) {
754
+ return (value, css, theme) => {
755
+ if (value === void 0) return;
756
+ const resolved = resolveScale(theme[scaleName], value);
757
+ for (let i = 0; i < properties.length; i++) css[properties[i]] = resolved;
758
+ };
759
+ }
760
+ function mapUtility(property, values) {
761
+ return (value, css) => {
762
+ if (value === void 0) return;
763
+ const key = String(value);
764
+ css[property] = key in values ? values[key] : value;
765
+ };
766
+ }
767
+ function resolveScale(scale, value) {
768
+ if (!scale || isStyleTokenData(value)) return value;
769
+ if (Array.isArray(scale)) return resolveScales(scale, value);
770
+ const key = getScaleRef(value);
771
+ if (key === null) return value;
772
+ const token = getNamedToken(scale, value);
773
+ if (token) return token;
774
+ const resolved = getScaleValue(scale, key);
775
+ if (resolved.found) return resolved.value;
776
+ return value;
777
+ }
778
+ function resolveScales(scales, value) {
779
+ if (isStyleTokenData(value)) return value;
780
+ const key = getScaleRef(value);
781
+ if (key === null) return value;
782
+ for (let i = 0; i < scales.length; i++) {
783
+ const scale = scales[i];
784
+ if (!scale) continue;
785
+ const token = getNamedToken(scale, value);
786
+ if (token) return token;
787
+ const resolved = getScaleValue(scale, key);
788
+ if (resolved.found) return resolved.value;
789
+ }
790
+ return value;
791
+ }
792
+ function getScaleValue(scale, key) {
793
+ if (key in scale) return {
794
+ found: true,
795
+ value: scale[key]
796
+ };
797
+ const path = key.split(".");
798
+ let current = scale;
799
+ for (let i = 0; i < path.length; i++) {
800
+ if (!current || typeof current !== "object") return {
801
+ found: false,
802
+ value: void 0
803
+ };
804
+ if (!(path[i] in current)) return {
805
+ found: false,
806
+ value: void 0
807
+ };
808
+ current = current[path[i]];
809
+ }
810
+ return {
811
+ found: true,
812
+ value: current
813
+ };
814
+ }
815
+ function getScaleRef(value) {
816
+ if (typeof value !== "string" || !value.startsWith("$")) return null;
817
+ return value.slice(1);
818
+ }
819
+ const textAlignValues = new Set([
820
+ "left",
821
+ "center",
822
+ "right",
823
+ "justify",
824
+ "start",
825
+ "end"
826
+ ]);
827
+ //#endregion
828
+ //#region presets/tailwind/classname/transform.ts
829
+ function createTailwindClassNamePreset(config) {
830
+ return {
831
+ selectors: TailwindSelectors,
832
+ transform: createTailwindClassNameTransform(config)
833
+ };
834
+ }
835
+ function createTailwindClassNameTransform(config = createTailwindStyleConfig({})) {
836
+ const objectTransform = createTailwindExtendedStyleTransform(config);
837
+ return classNameTransform({ transform(className) {
838
+ return objectTransform.transform(classNameToStyle(className, config.theme));
839
+ } });
840
+ }
841
+ function classNameToStyle(className, theme) {
842
+ const arbitrary = parseArbitraryClassName(className);
843
+ if (arbitrary) return arbitrary;
844
+ switch (className) {
845
+ case "block":
846
+ case "inline-block":
847
+ case "inline-flex":
848
+ case "flex":
849
+ case "grid":
850
+ case "hidden":
851
+ case "relative":
852
+ case "absolute":
853
+ case "fixed":
854
+ case "sticky": return { [toCamelCase(className)]: true };
855
+ case "items-start": return { items: "start" };
856
+ case "items-end": return { items: "end" };
857
+ case "items-center": return { items: "center" };
858
+ case "items-baseline": return { items: "baseline" };
859
+ case "items-stretch": return { items: "stretch" };
860
+ case "justify-start": return { justify: "start" };
861
+ case "justify-end": return { justify: "end" };
862
+ case "justify-center": return { justify: "center" };
863
+ case "justify-between": return { justify: "between" };
864
+ case "justify-around": return { justify: "around" };
865
+ case "justify-evenly": return { justify: "evenly" };
866
+ case "flex-row": return { direction: "row" };
867
+ case "flex-row-reverse": return { direction: "rowReverse" };
868
+ case "flex-col": return { direction: "col" };
869
+ case "flex-col-reverse": return { direction: "colReverse" };
870
+ case "flex-wrap": return { wrap: true };
871
+ case "flex-wrap-reverse": return { wrap: "reverse" };
872
+ case "shrink-0": return { flexShrink: 0 };
873
+ case "overflow-hidden": return { overflow: "hidden" };
874
+ case "overflow-auto": return { overflow: "auto" };
875
+ case "overflow-x-hidden": return { overflowX: "hidden" };
876
+ case "overflow-x-auto": return { overflowX: "auto" };
877
+ case "overflow-y-hidden": return { overflowY: "hidden" };
878
+ case "overflow-y-auto": return { overflowY: "auto" };
879
+ case "cursor-pointer": return { cursor: "pointer" };
880
+ case "outline-none": return { outline: "none" };
881
+ case "whitespace-nowrap": return { whiteSpace: "nowrap" };
882
+ case "min-w-0": return { minW: 0 };
883
+ case "justify-self-end": return { justifySelf: "end" };
884
+ }
885
+ if (className.startsWith("gap-x-")) return { gapX: ref(className, "gap-x-", theme.spacing) };
886
+ if (className.startsWith("gap-y-")) return { gapY: ref(className, "gap-y-", theme.spacing) };
887
+ if (className.startsWith("gap-")) return { gap: ref(className, "gap-", theme.spacing) };
888
+ if (className.startsWith("mt-")) return { mt: ref(className, "mt-", theme.spacing) };
889
+ if (className.startsWith("mx-")) return { mx: ref(className, "mx-", theme.spacing) };
890
+ if (className.startsWith("my-")) return { my: ref(className, "my-", theme.spacing) };
891
+ if (className.startsWith("m-")) return { m: ref(className, "m-", theme.spacing) };
892
+ if (className.startsWith("px-")) return { px: ref(className, "px-", theme.spacing) };
893
+ if (className.startsWith("py-")) return { py: ref(className, "py-", theme.spacing) };
894
+ if (className.startsWith("pt-")) return { pt: ref(className, "pt-", theme.spacing) };
895
+ if (className.startsWith("pr-")) return { pr: ref(className, "pr-", theme.spacing) };
896
+ if (className.startsWith("pb-")) return { pb: ref(className, "pb-", theme.spacing) };
897
+ if (className.startsWith("pl-")) return { pl: ref(className, "pl-", theme.spacing) };
898
+ if (className.startsWith("p-")) return { p: ref(className, "p-", theme.spacing) };
899
+ if (className.startsWith("max-w-")) return { maxW: ref(className, "max-w-", [theme.sizes, theme.spacing]) };
900
+ if (className.startsWith("min-w-")) return { minW: ref(className, "min-w-", [theme.sizes, theme.spacing]) };
901
+ if (className.startsWith("min-h-")) return { minH: ref(className, "min-h-", [theme.sizes, theme.spacing]) };
902
+ if (className.startsWith("size-")) return { size: ref(className, "size-", [theme.sizes, theme.spacing]) };
903
+ if (className.startsWith("w-")) return { w: ref(className, "w-", [theme.sizes, theme.spacing]) };
904
+ if (className.startsWith("h-")) return { h: ref(className, "h-", [theme.sizes, theme.spacing]) };
905
+ if (className.startsWith("bg-")) return { bg: ref(className, "bg-", theme.colors) };
906
+ if (className.startsWith("text-")) return { text: ref(className, "text-", [theme.fontSizes, theme.colors]) };
907
+ if (className.startsWith("font-")) return { font: ref(className, "font-", theme.fontWeights) };
908
+ if (className.startsWith("leading-")) return { leading: ref(className, "leading-", theme.lineHeights) };
909
+ if (className.startsWith("rounded-")) return { rounded: ref(className, "rounded-", theme.radii) };
910
+ if (className.startsWith("shadow-")) return { shadow: ref(className, "shadow-", theme.shadows) };
911
+ if (className.startsWith("border-")) return borderStyle(className.slice(7), theme);
912
+ if (className.startsWith("outline-")) return { outlineColor: ref(className, "outline-", theme.colors) };
913
+ return {};
914
+ }
915
+ function ref(className, prefix, scale) {
916
+ const value = className.slice(prefix.length);
917
+ if (value.startsWith("[") && value.endsWith("]")) return value.slice(1, -1).replace(/_/g, " ");
918
+ if (value === "auto") return value;
919
+ return scaleRef(value, scale);
920
+ }
921
+ function borderStyle(value, theme) {
922
+ if (value.startsWith("[") && value.endsWith("]")) return { border: value.slice(1, -1).replace(/_/g, " ") };
923
+ if (/^\d/.test(value)) return { border: value.replace(/_/g, " ") };
924
+ return { borderColor: scaleRef(value, theme.colors) };
925
+ }
926
+ function scaleRef(value, scale) {
927
+ const scales = Array.isArray(scale) ? scale : [scale];
928
+ const path = value.replace(/-/g, ".");
929
+ const camelPath = toCamelCase(value);
930
+ const candidates = value === path ? value === camelPath ? [value] : [value, camelPath] : camelPath === value ? [value, path] : [
931
+ value,
932
+ path,
933
+ camelPath
934
+ ];
935
+ for (let candidateIndex = 0; candidateIndex < candidates.length; candidateIndex++) {
936
+ const candidate = candidates[candidateIndex];
937
+ for (let scaleIndex = 0; scaleIndex < scales.length; scaleIndex++) {
938
+ const item = scales[scaleIndex];
939
+ if (item && hasScalePath(item, candidate)) return `$${candidate}`;
940
+ }
941
+ }
942
+ return `$${path}`;
943
+ }
944
+ function hasScalePath(scale, path) {
945
+ if (path in scale) return true;
946
+ if (getNamedToken(scale, `$${path}`)) return true;
947
+ const parts = path.split(".");
948
+ let current = scale;
949
+ for (let i = 0; i < parts.length; i++) {
950
+ if (!current || typeof current !== "object") return false;
951
+ if (!(parts[i] in current)) return false;
952
+ current = current[parts[i]];
953
+ }
954
+ return true;
955
+ }
956
+ function parseArbitraryClassName(className) {
957
+ if (!className.startsWith("[") || !className.endsWith("]")) return null;
958
+ const body = className.slice(1, -1);
959
+ const splitAt = body.indexOf(":");
960
+ if (splitAt < 1) return null;
961
+ const property = toCamelCase(body.slice(0, splitAt));
962
+ const value = body.slice(splitAt + 1).replace(/_/g, " ");
963
+ return { [property]: value };
964
+ }
965
+ function toCamelCase(value) {
966
+ return value.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
967
+ }
968
+ //#endregion
969
+ export { TailwindDarkSelector, TailwindResponsiveSelectors, TailwindSelectors, createDefaultedTailwindStyleConfig, createTailwindClassNamePreset, createTailwindClassNameTransform, createTailwindExtendedStyleTransform, createTailwindStyleConfig, createTailwindStyleTransform, defaultTailwindColors, defaultTailwindStyleConfig, defaultTailwindTheme, mergeTailwindStyleConfig };
970
+
971
+ //# sourceMappingURL=index.js.map