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

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 (281) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +1 -1
  3. package/atomic/className.ts +3 -9
  4. package/atomic/debug/className/className.ts +0 -15
  5. package/atomic/element.ts +1 -1
  6. package/atomic/rule.ts +2 -2
  7. package/atomic/scope.ts +19 -0
  8. package/atomic/theme.ts +41 -2
  9. package/atomic/token.ts +4 -3
  10. package/atomic/utils/{css.ts → cssIdent.ts} +0 -20
  11. package/atomic/utils/cssVar.ts +19 -0
  12. package/atomic/utils/debug.ts +1 -1
  13. package/builder/data/const.ts +1 -1
  14. package/builder/data/merge/style.ts +1 -1
  15. package/builder/extract/token.ts +30 -14
  16. package/builder/token/data.ts +30 -0
  17. package/builder/token/index.ts +3 -0
  18. package/builder/token/name.ts +54 -0
  19. package/builder/token/symbols.ts +6 -0
  20. package/compiler/transform/debug/plugin.ts +79 -1
  21. package/compiler/transform/evaluator/evaluator.ts +74 -26
  22. package/compiler/transform/extract/chain/chain.ts +1 -1
  23. package/compiler/transform/extract/utils/replacement.ts +6 -1
  24. package/compiler/transform/extract/utils/theme.ts +6 -6
  25. package/compiler/transform/syntax/static_ids.ts +1 -1
  26. package/config/build.ts +1 -8
  27. package/config/config/debug.ts +11 -0
  28. package/dialect/namedTokens.ts +22 -5
  29. package/dist/{className-CKo4TxuT.js → className-Do2Crx4b.js} +2 -3
  30. package/dist/{className-CKo4TxuT.js.map → className-Do2Crx4b.js.map} +1 -1
  31. package/dist/{style-91J0B5ef.js → combine-C9vjpKCs.js} +45 -304
  32. package/dist/combine-C9vjpKCs.js.map +1 -0
  33. package/dist/combineStyle-DwAhsOmS.js +26 -0
  34. package/dist/combineStyle-DwAhsOmS.js.map +1 -0
  35. package/dist/compiler/index.mjs +1 -1
  36. package/dist/{compiler-D5v5tJXI.mjs → compiler-CE0ZgkdH.mjs} +231 -84
  37. package/dist/compiler-CE0ZgkdH.mjs.map +1 -0
  38. package/dist/config/index.js +2 -2
  39. package/dist/config-BE5D5x2N.js +2 -0
  40. package/dist/{config-BEvP7108.js → config-BtANtGAh.js} +4 -6
  41. package/dist/config-BtANtGAh.js.map +1 -0
  42. package/dist/{config-FIfi5aJ8.js → config-CduqubI8.js} +8 -6
  43. package/dist/config-CduqubI8.js.map +1 -0
  44. package/dist/config-lJNLh7eM.js +6 -0
  45. package/dist/config-lJNLh7eM.js.map +1 -0
  46. package/dist/config-oKOjOTWi.js +7 -0
  47. package/dist/{config-OXHoDUIo.js.map → config-oKOjOTWi.js.map} +1 -1
  48. package/dist/{css-DcuJ_jSH.js → css-BewrRz3_.js} +3 -3
  49. package/dist/{css-DcuJ_jSH.js.map → css-BewrRz3_.js.map} +1 -1
  50. package/dist/{css-dPoZJDQH.js → css-CiTI58yl.js} +291 -4
  51. package/dist/css-CiTI58yl.js.map +1 -0
  52. package/dist/{global-zaCE-g1C.js → css-GtUPEO9U.js} +16 -3
  53. package/dist/css-GtUPEO9U.js.map +1 -0
  54. package/dist/{css-oOt6ZR54.js → css-Rc7ILf-3.js} +8 -9
  55. package/dist/{css-oOt6ZR54.js.map → css-Rc7ILf-3.js.map} +1 -1
  56. package/dist/css.js +1 -1
  57. package/dist/{css-CELBp6Gu.js → cssIdent-BsyUXNNk.js} +3 -23
  58. package/dist/cssIdent-BsyUXNNk.js.map +1 -0
  59. package/dist/cssVar-DGgQ2GIK.js +92 -0
  60. package/dist/cssVar-DGgQ2GIK.js.map +1 -0
  61. package/dist/{css_extra-DeTuIlcO.js → css_extra-BiG57TKN.js} +2 -2
  62. package/dist/{css_extra-DQdCrYoC.js.map → css_extra-BiG57TKN.js.map} +1 -1
  63. package/dist/{css_extra-DQdCrYoC.js → css_extra-DYtS3g6Z.js} +2 -2
  64. package/dist/{css_extra-DeTuIlcO.js.map → css_extra-DYtS3g6Z.js.map} +1 -1
  65. package/dist/{data-CeYstKMP.js → data-D7NFt4JG.js} +205 -10
  66. package/dist/data-D7NFt4JG.js.map +1 -0
  67. package/dist/{debug-D96KGgpH.js → debug-Cvpo5cVu.js} +4 -3
  68. package/dist/{debug-D96KGgpH.js.map → debug-Cvpo5cVu.js.map} +1 -1
  69. package/dist/{runtime-BKChZZ2-.js → debug-DycdGrul.js} +20 -27
  70. package/dist/debug-DycdGrul.js.map +1 -0
  71. package/dist/dev/rsc.js +9 -9
  72. package/dist/{dev-fOtWB5K3.js → dev-DdRWa6dJ.js} +7 -6
  73. package/dist/{dev-fOtWB5K3.js.map → dev-DdRWa6dJ.js.map} +1 -1
  74. package/dist/{dev-p8tW7X-A.js → dev-px0_6TNq.js} +4 -4
  75. package/dist/{dev-p8tW7X-A.js.map → dev-px0_6TNq.js.map} +1 -1
  76. package/dist/dev.js +1 -1
  77. package/dist/dialect/extracted/index.js +1 -1
  78. package/dist/dialect/index.js +1 -1
  79. package/dist/{elementMarker-CvqqIb7J.js → elementMarker-ng0y3fN0.js} +8 -8
  80. package/dist/{elementMarker-CvqqIb7J.js.map → elementMarker-ng0y3fN0.js.map} +1 -1
  81. package/dist/entry/dev/css.js +2 -2
  82. package/dist/entry/dev/jsx-dev-runtime.js +2 -2
  83. package/dist/entry/dev/jsx-runtime.js +2 -2
  84. package/dist/entry/dev.js +11 -12
  85. package/dist/entry/prod/css.js +2 -2
  86. package/dist/entry/prod/extract.js +2 -2
  87. package/dist/entry/prod/jsx-dev-runtime.js +2 -2
  88. package/dist/entry/prod/jsx-runtime.js +2 -2
  89. package/dist/entry/prod/runtime.js +5 -4
  90. package/dist/entry/prod.js +40 -11
  91. package/dist/entry/prod.js.map +1 -1
  92. package/dist/entry/rsc-dev/css.js +2 -2
  93. package/dist/entry/rsc-dev/dev.js +4 -4
  94. package/dist/entry/rsc-dev/jsx-dev-runtime.js +2 -2
  95. package/dist/entry/rsc-dev/jsx-runtime.js +2 -2
  96. package/dist/entry/rsc-dev.js +274 -68
  97. package/dist/entry/rsc-dev.js.map +1 -1
  98. package/dist/entry/rsc-prod/css.js +2 -2
  99. package/dist/entry/rsc-prod/jsx-dev-runtime.js +2 -2
  100. package/dist/entry/rsc-prod/jsx-runtime.js +2 -2
  101. package/dist/entry/rsc-prod/runtime.js +5 -4
  102. package/dist/entry/rsc-prod.js +16 -10
  103. package/dist/entry/rsc-prod.js.map +1 -0
  104. package/dist/extract-B-Vs88ME.js +3 -0
  105. package/dist/{extract-CzWJeQi8.js → extract-CM8Fk2eK.js} +24 -15
  106. package/dist/{extract-CzWJeQi8.js.map → extract-CM8Fk2eK.js.map} +1 -1
  107. package/dist/{getClassName-oiQ8CnkS.js → getClassName-CrNVjAoJ.js} +29 -8
  108. package/dist/getClassName-CrNVjAoJ.js.map +1 -0
  109. package/dist/{global-Cul1dX8k.js → global-CZBlA9E7.js} +3 -3
  110. package/dist/{global-Cul1dX8k.js.map → global-CZBlA9E7.js.map} +1 -1
  111. package/dist/{hash-Bycpk3MR.js → hash-BfeJDf5U.js} +13 -4
  112. package/dist/hash-BfeJDf5U.js.map +1 -0
  113. package/dist/index.js +9 -10
  114. package/dist/jsx/jsx-dev-runtime.js +2 -2
  115. package/dist/jsx/jsx-dev-runtime.server.js +1 -1
  116. package/dist/jsx/jsx-runtime.js +2 -2
  117. package/dist/jsx/jsx-runtime.server.js +1 -1
  118. package/dist/{jsx-Ba-XV33u.js → jsx-BY1iFewe.js} +3 -3
  119. package/dist/{jsx-Ba-XV33u.js.map → jsx-BY1iFewe.js.map} +1 -1
  120. package/dist/{jsx-A4cK517J.js → jsx-DL-DEAz8.js} +8 -7
  121. package/dist/{jsx-A4cK517J.js.map → jsx-DL-DEAz8.js.map} +1 -1
  122. package/dist/{jsx_dev_runtime-BQcRzl5D.js → jsx_dev_runtime-aAhNYDeS.js} +2 -2
  123. package/dist/{jsx_dev_runtime-BQcRzl5D.js.map → jsx_dev_runtime-aAhNYDeS.js.map} +1 -1
  124. package/dist/{jsx_runtime-B9KEoAQN.js → jsx_runtime-C6i1bWlu.js} +2 -2
  125. package/dist/{jsx_runtime-B9KEoAQN.js.map → jsx_runtime-C6i1bWlu.js.map} +1 -1
  126. package/dist/{jsx_runtime-BXcbW8Yp.js → jsx_runtime-D7Y5up6H.js} +2 -2
  127. package/dist/{jsx_runtime-BXcbW8Yp.js.map → jsx_runtime-D7Y5up6H.js.map} +1 -1
  128. package/dist/{layer-CbQzwZF-.js → layer-BSxAr-hy.js} +4 -4
  129. package/dist/{layer-CbQzwZF-.js.map → layer-BSxAr-hy.js.map} +1 -1
  130. package/dist/{loader-BAth2yZ1.mjs → loader-BmYS_Rju.mjs} +3 -3
  131. package/dist/{loader-BAth2yZ1.mjs.map → loader-BmYS_Rju.mjs.map} +1 -1
  132. package/dist/{misc-DFBKJGLT.mjs → misc-BIS_c7BJ.mjs} +2 -2
  133. package/dist/{misc-DFBKJGLT.mjs.map → misc-BIS_c7BJ.mjs.map} +1 -1
  134. package/dist/{namedTokens-BUa6raTb.js → namedTokens-CN_yhhik.js} +8 -6
  135. package/dist/namedTokens-CN_yhhik.js.map +1 -0
  136. package/dist/plugin/farm/index.mjs +2 -2
  137. package/dist/plugin/nextjs/index.mjs +4 -4
  138. package/dist/plugin/nextjs/loader.mjs +4 -4
  139. package/dist/plugin/parcel/optimizer.cjs +3 -2
  140. package/dist/plugin/parcel/optimizer.cjs.map +1 -1
  141. package/dist/plugin/parcel/optimizer.mjs +3 -2
  142. package/dist/plugin/parcel/optimizer.mjs.map +1 -1
  143. package/dist/plugin/parcel/resolver.cjs +1 -1
  144. package/dist/plugin/parcel/resolver.mjs +2 -2
  145. package/dist/plugin/parcel/runtime.cjs +1 -1
  146. package/dist/plugin/parcel/runtime.mjs +1 -1
  147. package/dist/plugin/parcel/transformer.cjs +1 -1
  148. package/dist/plugin/parcel/transformer.mjs +2 -2
  149. package/dist/plugin/rspack/index.mjs +1 -1
  150. package/dist/plugin/vite/index.mjs +3 -3
  151. package/dist/plugin/webpack/index.mjs +1 -1
  152. package/dist/plugin/webpack/loader.mjs +2 -2
  153. package/dist/presets/tailwind/index.js +8 -5
  154. package/dist/presets/tailwind/index.js.map +1 -1
  155. package/dist/{property-CF6JgpTq.js → property-BuLbzviK.js} +2 -2
  156. package/dist/{property-CF6JgpTq.js.map → property-BuLbzviK.js.map} +1 -1
  157. package/dist/{registry-CiwvMfx8.mjs → registry-IaXmLQzA.mjs} +2 -2
  158. package/dist/{registry-CiwvMfx8.mjs.map → registry-IaXmLQzA.mjs.map} +1 -1
  159. package/dist/{rules-DlXcch7-.js → rules-CxVzovt-.js} +60 -23
  160. package/dist/rules-CxVzovt-.js.map +1 -0
  161. package/dist/selector-A-mRmMnI.js +64 -0
  162. package/dist/selector-A-mRmMnI.js.map +1 -0
  163. package/dist/server.js +12 -13
  164. package/dist/server.js.map +1 -1
  165. package/dist/{shared-yDD0nfm1.cjs → shared-CaJuvw03.cjs} +231 -84
  166. package/dist/shared-CaJuvw03.cjs.map +1 -0
  167. package/dist/{shared-x59dI2NW.mjs → shared-DdPTZ0O3.mjs} +4 -4
  168. package/dist/{shared-x59dI2NW.mjs.map → shared-DdPTZ0O3.mjs.map} +1 -1
  169. package/dist/sheet-BWBzuy4D.js +7 -0
  170. package/dist/{sheet-B-uJfHRY.js.map → sheet-BWBzuy4D.js.map} +1 -1
  171. package/dist/{sidecar-CJ6i4wmn.mjs → sidecar-B3oCK9vC.mjs} +3 -3
  172. package/dist/{sidecar-CJ6i4wmn.mjs.map → sidecar-B3oCK9vC.mjs.map} +1 -1
  173. package/dist/{style-DFFK06Of.js → style-CGaJndOl.js} +102 -54
  174. package/dist/style-CGaJndOl.js.map +1 -0
  175. package/dist/{style-Bw5ka-Nq.js → style-DDxjKdX0.js} +356 -39
  176. package/dist/style-DDxjKdX0.js.map +1 -0
  177. package/dist/style-S7LTQbRu.js +5 -0
  178. package/dist/{styleStore-DJ0Msgkh.js → styleStore-0fARJlZV.js} +6 -6
  179. package/dist/{styleStore-DJ0Msgkh.js.map → styleStore-0fARJlZV.js.map} +1 -1
  180. package/dist/{styleStore-ydQcDBD4.js → styleStore-CajcAEPO.js} +101 -223
  181. package/dist/styleStore-CajcAEPO.js.map +1 -0
  182. package/dist/symbols-Cp4ymzKF.js +14 -0
  183. package/dist/symbols-Cp4ymzKF.js.map +1 -0
  184. package/dist/token-D-S-4_mN.js +138 -0
  185. package/dist/token-D-S-4_mN.js.map +1 -0
  186. package/dist/{trace-D8j96G57.js → trace-CFnhyCVf.js} +2 -2
  187. package/dist/{trace-D8j96G57.js.map → trace-CFnhyCVf.js.map} +1 -1
  188. package/dist/{trace-CO36aenp.js → trace-ZtgeY-8s.js} +3 -3
  189. package/dist/{trace-CO36aenp.js.map → trace-ZtgeY-8s.js.map} +1 -1
  190. package/dist/{transform-BTJOg8Hg.js → transform-BkrLIiIR.js} +2 -2
  191. package/dist/{transform-BTJOg8Hg.js.map → transform-BkrLIiIR.js.map} +1 -1
  192. package/dist/{utils-D2fygyTm.mjs → utils-B5Xqf1lV.mjs} +4 -4
  193. package/dist/{utils-D2fygyTm.mjs.map → utils-B5Xqf1lV.mjs.map} +1 -1
  194. package/dist/{utils-hoYnMiA7.js → utils-B_VhPBHH.js} +4 -4
  195. package/dist/{utils-hoYnMiA7.js.map → utils-B_VhPBHH.js.map} +1 -1
  196. package/dist/{utils-Bmw655wa.js → utils-CDUaX81o.js} +3 -3
  197. package/dist/{utils-Bmw655wa.js.map → utils-CDUaX81o.js.map} +1 -1
  198. package/dist/{utils-DTXCTUlS.mjs → utils-DaAiEEIG.mjs} +3 -3
  199. package/dist/{utils-DTXCTUlS.mjs.map → utils-DaAiEEIG.mjs.map} +1 -1
  200. package/dist/{utils-DVFxZnVC.js → utils-DzydRwYo.js} +65 -49
  201. package/dist/utils-DzydRwYo.js.map +1 -0
  202. package/dist/utils.js +3 -3
  203. package/dist/value-C0JRsyax.js +64 -0
  204. package/dist/value-C0JRsyax.js.map +1 -0
  205. package/dist/{value-DvFkGBy2.js → value-D08AocUs.js} +96 -72
  206. package/dist/value-D08AocUs.js.map +1 -0
  207. package/dist/{valueRef-CsLVJwjA.js → valueRef-M3E1oza7.js} +2 -2
  208. package/dist/{valueRef-CsLVJwjA.js.map → valueRef-M3E1oza7.js.map} +1 -1
  209. package/dist/{webpack-BOU7_xld.mjs → webpack-CHydnRXB.mjs} +5 -5
  210. package/dist/{webpack-BOU7_xld.mjs.map → webpack-CHydnRXB.mjs.map} +1 -1
  211. package/dist/{withTokens-LRidu3Vc.js → withTokens-DAzUIPvA.js} +2 -2
  212. package/dist/{withTokens-LRidu3Vc.js.map → withTokens-DAzUIPvA.js.map} +1 -1
  213. package/entry/prod/config_debug.ts +2 -0
  214. package/entry/prod/index.ts +1 -1
  215. package/entry/prod/runtime.ts +3 -1
  216. package/entry/rsc_prod/config_debug.ts +6 -0
  217. package/entry/rsc_prod/index.ts +1 -1
  218. package/entry/shared/config_debug.ts +9 -0
  219. package/entry/shared/config_dev.ts +9 -7
  220. package/package.json +1 -1
  221. package/plugin/bundler/parcel/optimizer.ts +1 -0
  222. package/presets/tailwind/style/transform.ts +9 -3
  223. package/runtime/core/cache/combine.ts +44 -25
  224. package/runtime/core/cache/combineRuntime.ts +4 -0
  225. package/runtime/core/cache/index.ts +2 -1
  226. package/runtime/core/cache/item.ts +2 -2
  227. package/runtime/core/cache/pool.ts +15 -30
  228. package/runtime/core/cache/prop.ts +3 -2
  229. package/runtime/core/cache/token.ts +20 -0
  230. package/runtime/core/cache/tokenValues.ts +19 -11
  231. package/runtime/extract/combineStyle.ts +37 -0
  232. package/runtime/extract/getClassName.ts +5 -11
  233. package/runtime/extract/index.ts +3 -1
  234. package/runtime/extract/token.ts +41 -0
  235. package/runtime/extract/tokenResolver.ts +17 -0
  236. package/runtime/style/style.ts +2 -1
  237. package/style/style.ts +1 -1
  238. package/style/theme.ts +0 -1
  239. package/style/token.ts +26 -21
  240. package/style/tokens.ts +18 -12
  241. package/style/transform.ts +1 -1
  242. package/style/value.ts +26 -11
  243. package/style/valueRef.ts +1 -1
  244. package/utils/global.ts +1 -3
  245. package/utils/symbol.ts +3 -0
  246. package/dist/className-ZJ5pBA-o.js +0 -263
  247. package/dist/className-ZJ5pBA-o.js.map +0 -1
  248. package/dist/compiler-D5v5tJXI.mjs.map +0 -1
  249. package/dist/config-BEvP7108.js.map +0 -1
  250. package/dist/config-B_cbG3S6.js +0 -1
  251. package/dist/config-FIfi5aJ8.js.map +0 -1
  252. package/dist/config-OXHoDUIo.js +0 -6
  253. package/dist/css-CELBp6Gu.js.map +0 -1
  254. package/dist/css-dPoZJDQH.js.map +0 -1
  255. package/dist/data-CeYstKMP.js.map +0 -1
  256. package/dist/extract-DeOytHKW.js +0 -2
  257. package/dist/getClassName-oiQ8CnkS.js.map +0 -1
  258. package/dist/global-zaCE-g1C.js.map +0 -1
  259. package/dist/hash-Bycpk3MR.js.map +0 -1
  260. package/dist/namedTokens-BUa6raTb.js.map +0 -1
  261. package/dist/rules-DlXcch7-.js.map +0 -1
  262. package/dist/runtime-BKChZZ2-.js.map +0 -1
  263. package/dist/shared-yDD0nfm1.cjs.map +0 -1
  264. package/dist/sheet-B-uJfHRY.js +0 -7
  265. package/dist/style-91J0B5ef.js.map +0 -1
  266. package/dist/style-Bw5ka-Nq.js.map +0 -1
  267. package/dist/style-DFFK06Of.js.map +0 -1
  268. package/dist/style-pz8e5To1.js +0 -5
  269. package/dist/styleStore-ydQcDBD4.js.map +0 -1
  270. package/dist/token-CKXUECuU.js +0 -76
  271. package/dist/token-CKXUECuU.js.map +0 -1
  272. package/dist/token-DTOyFLmp.js +0 -58
  273. package/dist/token-DTOyFLmp.js.map +0 -1
  274. package/dist/token-DT_sCPtm.js +0 -298
  275. package/dist/token-DT_sCPtm.js.map +0 -1
  276. package/dist/utils-DVFxZnVC.js.map +0 -1
  277. package/dist/value-D-ZcRzLA.js +0 -42
  278. package/dist/value-D-ZcRzLA.js.map +0 -1
  279. package/dist/value-DvFkGBy2.js.map +0 -1
  280. package/dist/value-dG9LK0Gq.js +0 -85
  281. package/dist/value-dG9LK0Gq.js.map +0 -1
@@ -1,9 +1,33 @@
1
- import { c as isStyleTokenData, f as symbol, i as createStyleToken, l as isStyleTokenOverrideData, o as getStyleTokenId } from "./token-CKXUECuU.js";
2
- import { _ as CSS_CONFIG, a as escapeCssIdent, h as DEBUG_CONFIG, i as getIdentifierSafeHash, l as createNameFormatter, n as getTokenVar, o as escapeCssValue, r as getTokenVarName, s as getCssVarRawFallback, t as getTokenOverrideValue, u as hashString } from "./token-DT_sCPtm.js";
3
- import { S as isAtRuleRef, c as createIdCounter, l as getId, r as createKeyframes, w as shouldAppendCssPx } from "./css-dPoZJDQH.js";
4
- import { S as isStyleData, b as isSlotData, f as getAtomicClassName, p as getClassNameDedupe, v as isScopeData, w as DEV_CONFIG, x as isSlotOverrideData } from "./style-91J0B5ef.js";
5
- import { c as BUILDER_CALLSITE, d as BUILDER_SLOT_ID, f as BUILDER_STATE, l as BUILDER_SCOPE, p as BUILDER_TYPE, u as BUILDER_SCOPE_ID } from "./withTokens-LRidu3Vc.js";
1
+ import { a as symbol } from "./symbols-Cp4ymzKF.js";
2
+ import { _ as globalData, c as isStyleTokenOverrideData, i as getStyleTokenId, m as CSS_CONFIG, r as getCssVarRawFallback, s as isStyleTokenData, t as escapeCssValue, u as setBuildConfig } from "./cssVar-DGgQ2GIK.js";
3
+ import { D as getTokenVarName, E as getTokenVar, F as createNameFormatter, I as hashString, N as getChildStyleTokenName, P as getIdentifierSafeHash, R as DEBUG_CONFIG, S as isAtRuleRef, T as getTokenOverrideValue, c as createIdCounter, k as createStyleToken, l as getId, r as createKeyframes, w as shouldAppendCssPx, z as setBuildDebugClassName } from "./css-CiTI58yl.js";
4
+ import { c as BUILDER_CALLSITE, d as BUILDER_SLOT_ID, f as BUILDER_STATE, l as BUILDER_SCOPE, p as BUILDER_TYPE, u as BUILDER_SCOPE_ID } from "./withTokens-DAzUIPvA.js";
5
+ import { f as isScopeData, g as isStyleData, h as isSlotOverrideData, m as isSlotData } from "./combine-C9vjpKCs.js";
6
6
  import { SelectorType, parse } from "css-what";
7
+ //#region entry/shared/config_debug.ts
8
+ const buildConfig = JSON.parse(FLUENTIC_STYLE_BUILD_CONFIG);
9
+ setBuildConfig(buildConfig);
10
+ setBuildDebugClassName(buildConfig.css?.debugClassName, false);
11
+ //#endregion
12
+ //#region config/config/dev.ts
13
+ const DEV_CONFIG_DEFAULT = {
14
+ isDev: false,
15
+ isCheckSelectorEnabled: true,
16
+ isSourcemapEnabled: true,
17
+ isLocalClassNameEnabled: true,
18
+ sheetMaxRules: 1e3,
19
+ sheetStyleTagNonce: null,
20
+ hashLength: null,
21
+ stylePriorityMode: "sort",
22
+ sourcemapLocationMode: "style",
23
+ isElementClassNameEnabled: true
24
+ };
25
+ globalData("config.dev.isDev", () => ({ isDev: false }));
26
+ const DEV_CONFIG = globalData("config.dev", () => ({ ...DEV_CONFIG_DEFAULT }));
27
+ globalData("config.dev.plugin", () => ({ config: null }));
28
+ globalData("config.dev.base", () => ({ config: null }));
29
+ globalData("config.dev.utils", () => ({ config: null }));
30
+ //#endregion
7
31
  //#region utils/trace.ts
8
32
  const FN_MARKER = "$fn_";
9
33
  function traceMarker(fn, name) {
@@ -359,6 +383,265 @@ function createDebugCallsite(loc, debug) {
359
383
  column
360
384
  };
361
385
  }
386
+ const formatClassName = createNameFormatter([
387
+ "atRule",
388
+ "scopeSelector",
389
+ "property",
390
+ "selector",
391
+ "value"
392
+ ]);
393
+ const formatTransformClassName = createNameFormatter(["className"]);
394
+ function getDebugClassName(format, hash, info) {
395
+ return formatClassName(format || "[(atRule)-][(scopeSelector)-](property)[-(selector)][-(value)]--$hash", hash, info);
396
+ }
397
+ function getDebugTransformClassName(format, hash, info) {
398
+ return formatTransformClassName(format || "(className)--$hash", hash, info);
399
+ }
400
+ //#endregion
401
+ //#region atomic/utils/cssIdent.ts
402
+ function escapeCssIdent(ident) {
403
+ let result = "";
404
+ for (let i = 0; i < ident.length; i++) {
405
+ const char = ident.charAt(i);
406
+ const code = ident.charCodeAt(i);
407
+ const nextCode = ident.charCodeAt(i + 1);
408
+ if (code === 0) {
409
+ result += "�";
410
+ continue;
411
+ }
412
+ if (code >= 1 && code <= 31 || code === 127 || i === 0 && code >= 48 && code <= 57 || i === 1 && code >= 48 && code <= 57 && ident.charCodeAt(0) === 45) {
413
+ result += "\\" + code.toString(16) + " ";
414
+ continue;
415
+ }
416
+ if (i === 0 && code === 45 && ident.length === 1) {
417
+ result += "\\-";
418
+ continue;
419
+ }
420
+ if (code >= 55296 && code <= 56319 && nextCode >= 56320 && nextCode <= 57343) {
421
+ result += char + ident.charAt(++i);
422
+ continue;
423
+ }
424
+ if (code >= 128 || code === 45 || code === 95 || code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122) {
425
+ result += char;
426
+ continue;
427
+ }
428
+ result += "\\" + char;
429
+ }
430
+ return result;
431
+ }
432
+ function sanitizeCssIdentName(value, fallback = "") {
433
+ return value.replace(/[^a-zA-Z0-9_-]+/g, "-").replace(/^-+|-+$/g, "") || fallback;
434
+ }
435
+ //#endregion
436
+ //#region atomic/utils/debug.ts
437
+ function normalizeDebugKeywordValue(value) {
438
+ const normalized = value.trim().toLowerCase();
439
+ return /^[a-z][a-z0-9-]*$/.test(normalized) ? normalized : null;
440
+ }
441
+ function sanitizeDebugName$1(value) {
442
+ if (!value) return "";
443
+ return sanitizeCssIdentName(value.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), "");
444
+ }
445
+ function normalizePropertyName(property) {
446
+ return property.trim().replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/_/g, "-").toLowerCase();
447
+ }
448
+ function sanitizeDebugPropertyName(property) {
449
+ let name = property;
450
+ if (name.charCodeAt(0) === 45 && name.charCodeAt(1) === 45) name = name.slice(2);
451
+ return name.replace(/[^a-z0-9_-]+/g, "-").replace(/[-_]+/g, "-").replace(/^-+|-+$/g, "");
452
+ }
453
+ //#endregion
454
+ //#region atomic/debug/value.ts
455
+ function getDebugValueName(value) {
456
+ if (!value) return {
457
+ value: null,
458
+ arbitraryValue: null
459
+ };
460
+ const normalized = value.trim().toLowerCase();
461
+ if (!normalized) return {
462
+ value: null,
463
+ arbitraryValue: null
464
+ };
465
+ if (normalized.startsWith("url") || normalized.includes("gradient") || normalized.startsWith("image") || normalized.startsWith("calc(") || normalized.startsWith("var(") || normalized.startsWith("env(") || normalized.startsWith("rgb") || normalized.startsWith("hsl")) return {
466
+ value: null,
467
+ arbitraryValue: null
468
+ };
469
+ if (/^[a-z][a-z0-9-]*$/.test(normalized)) return {
470
+ value: normalized,
471
+ arbitraryValue: null
472
+ };
473
+ const name = normalized.replace(/px/g, "").replace(/rem/g, "rem").replace(/em/g, "em").replace(/%/g, "pct").replace(/fr/g, "fr").replace(/[,()"'#]/g, "-").replace(/\s+/g, "-").replace(/[^a-z0-9._%-]+/g, "-").replace(/[-_]+/g, "-").replace(/^-+|-+$/g, "");
474
+ if (!name) return {
475
+ value: null,
476
+ arbitraryValue: null
477
+ };
478
+ return {
479
+ value: null,
480
+ arbitraryValue: name
481
+ };
482
+ }
483
+ //#endregion
484
+ //#region atomic/debug/property/data.ts
485
+ const PROPERTY_ALIASES = {
486
+ "border-radius": "radius",
487
+ "flex-direction": "flex",
488
+ "font-style": "font",
489
+ "font-weight": "font",
490
+ "grid-template-columns": "grid-cols",
491
+ "grid-template-rows": "grid-rows",
492
+ "align-items": "items",
493
+ "justify-content": "justify",
494
+ "z-index": "zindex",
495
+ "pointer-events": "pointer"
496
+ };
497
+ const KEYWORD_VALUE_PROPERTIES = new Set([
498
+ "align-content",
499
+ "align-items",
500
+ "align-self",
501
+ "background-repeat",
502
+ "background-size",
503
+ "border-collapse",
504
+ "border-style",
505
+ "box-sizing",
506
+ "clear",
507
+ "cursor",
508
+ "display",
509
+ "flex-direction",
510
+ "flex-wrap",
511
+ "float",
512
+ "font-weight",
513
+ "font-style",
514
+ "justify-content",
515
+ "justify-items",
516
+ "justify-self",
517
+ "list-style-position",
518
+ "list-style-type",
519
+ "object-fit",
520
+ "object-position",
521
+ "overflow",
522
+ "overflow-x",
523
+ "overflow-y",
524
+ "pointer-events",
525
+ "place-content",
526
+ "place-items",
527
+ "place-self",
528
+ "position",
529
+ "resize",
530
+ "table-layout",
531
+ "text-align",
532
+ "text-decoration-line",
533
+ "text-transform",
534
+ "user-select",
535
+ "vertical-align",
536
+ "visibility",
537
+ "white-space"
538
+ ]);
539
+ const ARBITRARY_VALUE_PROPERTIES = new Set(["font-weight"]);
540
+ //#endregion
541
+ //#region atomic/debug/property/property.ts
542
+ function getDebugPropertyName(property, value) {
543
+ if (!property) return null;
544
+ const normalized = normalizePropertyName(property);
545
+ const name = PROPERTY_ALIASES[normalized] || sanitizeDebugPropertyName(normalized);
546
+ if (!name) return null;
547
+ return {
548
+ property: name,
549
+ ...withKeywordValueFallback(normalized, value, withArbitraryValueFallback(normalized, getDebugValueName(value)))
550
+ };
551
+ }
552
+ function withArbitraryValueFallback(property, valueName) {
553
+ if (!valueName.arbitraryValue || ARBITRARY_VALUE_PROPERTIES.has(property)) return valueName;
554
+ return {
555
+ value: valueName.value,
556
+ arbitraryValue: null
557
+ };
558
+ }
559
+ function withKeywordValueFallback(property, value, valueName) {
560
+ if (valueName.value || valueName.arbitraryValue) return valueName;
561
+ if (!KEYWORD_VALUE_PROPERTIES.has(property)) return valueName;
562
+ const normalized = normalizeDebugKeywordValue(value);
563
+ if (!normalized) return valueName;
564
+ return {
565
+ value: normalized,
566
+ arbitraryValue: null
567
+ };
568
+ }
569
+ //#endregion
570
+ //#region atomic/debug/selector.ts
571
+ function getDebugSelectorName(selector) {
572
+ if (!selector) return null;
573
+ const normalized = selector.trim().toLowerCase();
574
+ if (/^[a-z0-9]+$/.test(normalized)) return null;
575
+ return validateName(normalized.replace(/\$\$/g, "args").replace(/\$/g, "arg").replace(/\.\.\./g, "merge").replace(/:not\(/g, "not-").replace(/:(is|where|has)\(/g, "$1-").replace(/:nth-(child|of-type)\(/g, "nth-").replace(/[.#]/g, "-").replace(/[[\]()]/g, "-").replace(/:+/g, "-").replace(/\s+/g, "-").replace(/[^a-z0-9_-]+/g, "-").replace(/[-_]+/g, "-").replace(/^-+|-+$/g, ""));
576
+ }
577
+ function getDebugAtRuleName(selector) {
578
+ if (!selector || Array.isArray(selector) && selector.length === 0) return null;
579
+ return validateName((Array.isArray(selector) ? selector.map(parseAtRule).filter(Boolean).join("-") : parseAtRule(selector)).replace(/[-_]+/g, "-").replace(/^-+|-+$/g, ""));
580
+ }
581
+ function compressQuery(query) {
582
+ return query.trim().toLowerCase().replace(/prefers-color-scheme\s*:\s*dark/g, "dark").replace(/prefers-color-scheme\s*:\s*light/g, "light").replace(/min-width\s*:\s*/g, "min-").replace(/max-width\s*:\s*/g, "max-").replace(/min-height\s*:\s*/g, "minh-").replace(/max-height\s*:\s*/g, "maxh-").replace(/inline-size/g, "inline").replace(/\b(and|or|only|not)\b/g, "").replace(/>=/g, "-gte-").replace(/<=/g, "-lte-").replace(/>/g, "-gt-").replace(/</g, "-lt-").replace(/[():=\s]+/g, "-").replace(/[-_]+/g, "-").replace(/^-+|-+$/g, "");
583
+ }
584
+ function validateName(name) {
585
+ if (!name || name === "selector" || name.length < 2) return null;
586
+ return name;
587
+ }
588
+ function parseAtRule(rule) {
589
+ const normalized = rule.trim().toLowerCase();
590
+ if (normalized.startsWith("@media")) return compressQuery(normalized.slice(6));
591
+ if (normalized.startsWith("@container")) return compressQuery(normalized.slice(10));
592
+ if (normalized.startsWith("@supports")) return compressQuery(normalized.slice(9));
593
+ return compressQuery(normalized);
594
+ }
595
+ //#endregion
596
+ //#region atomic/utils/selector.ts
597
+ function getSelectorText(selector) {
598
+ return Array.isArray(selector) ? selector[0] : selector;
599
+ }
600
+ function getSelectorHash(selector) {
601
+ return Array.isArray(selector) ? selector.join("|") : selector;
602
+ }
603
+ function getSelectorPriority(selector) {
604
+ if (!selector) return 0;
605
+ return Array.isArray(selector) ? selector[1] : 0;
606
+ }
607
+ //#endregion
608
+ //#region atomic/className.ts
609
+ function getAtomicClassName(property, priority, value, selector, parentSelector, atRule, callsite, localClassName, debugClassName, classNameFormat, transformClassName, transformClassNameFormat, hashLength = null) {
610
+ let hash = property;
611
+ hash += "\n" + (priority || "");
612
+ hash += "\n" + value;
613
+ hash += "\n" + (selector ? getSelectorHash(selector) : "");
614
+ hash += "\n" + (parentSelector ? getSelectorHash(parentSelector) : "");
615
+ hash += "\n" + (atRule ? atRule.map(getSelectorHash).join("\n") : "");
616
+ hash += "\n" + getCallsiteHash(callsite, localClassName);
617
+ hash = getIdentifierSafeHash(hash, hashLength ?? getRuntimeClassNameHashLength(debugClassName));
618
+ if (!debugClassName) return hash;
619
+ if (transformClassName) return getDebugTransformClassName(transformClassNameFormat, hash, { className: transformClassName });
620
+ const propertyName = getDebugPropertyName(property, value);
621
+ return getDebugClassName(classNameFormat, hash, {
622
+ atRule: atRule ? getDebugAtRuleName(atRule.map(getSelectorText)) : null,
623
+ scopeSelector: parentSelector ? getDebugSelectorName(getSelectorText(parentSelector)) : null,
624
+ selector: selector ? getDebugSelectorName(getSelectorText(selector)) : null,
625
+ property: propertyName ? propertyName.property : property,
626
+ value: propertyName ? propertyName.value ?? propertyName.arbitraryValue : null
627
+ });
628
+ }
629
+ function getRuntimeClassNameHashLength(debugClassName) {
630
+ if (debugClassName && DEV_CONFIG.isDev) return DEV_CONFIG.hashLength ?? CSS_CONFIG.hashLength ?? 3;
631
+ return CSS_CONFIG.hashLength ?? 7;
632
+ }
633
+ function getClassNameDedupe(property, priority, selector, parentSelector, atRule) {
634
+ let hash = property;
635
+ hash += "\n" + (priority || "");
636
+ hash += "\n" + (selector ? getSelectorHash(selector) : "");
637
+ hash += "\n" + (parentSelector ? getSelectorHash(parentSelector) : "");
638
+ hash += "\n" + (atRule ? atRule.map(getSelectorHash).join("\n") : "");
639
+ return hashString(hash);
640
+ }
641
+ function getCallsiteHash(callsite, localClassName) {
642
+ if (!localClassName || !callsite) return "";
643
+ return callsite.filePath + "\n" + callsite.line + ":" + callsite.column;
644
+ }
362
645
  //#endregion
363
646
  //#region builder/data/merge/utils.ts
364
647
  function cloneData(data, source, debug, merge = true) {
@@ -1481,7 +1764,7 @@ function createClassNameFn(args) {
1481
1764
  }
1482
1765
  const formatThemeName = createNameFormatter(["name"]);
1483
1766
  function createThemeClassName(name, id, themeNameFormat) {
1484
- return formatThemeName(themeNameFormat || "theme[-(name)]-$hash", getIdentifierSafeHash(id, CSS_CONFIG.hashLength), { name });
1767
+ return formatThemeName(themeNameFormat || "theme[-(name)]-$hash", getIdentifierSafeHash(id, CSS_CONFIG.hashLength), { name: normalizeThemeName(name) });
1485
1768
  }
1486
1769
  function getThemeRuleCss(className, tokens, tokenNameFormat) {
1487
1770
  const declarations = [];
@@ -1493,6 +1776,29 @@ function getThemeDeclaration(token, tokenNameFormat) {
1493
1776
  const value = token.ref ? getTokenOverrideValue(token, tokenNameFormat) : escapeCssValue(String(token.value ?? ""));
1494
1777
  return name + ":" + value;
1495
1778
  }
1779
+ function normalizeThemeName(value) {
1780
+ if (!value) return null;
1781
+ value = value.trim();
1782
+ if (!value) return null;
1783
+ if (/^\d+$/.test(value)) return null;
1784
+ if (isGeneratedNameHash(value)) return null;
1785
+ const stableSuffix = value.match(/^(.+)-[a-z0-9]{7}$/);
1786
+ if (stableSuffix?.[1] && isGeneratedNameHash(value.slice(-7))) return normalizeThemeName(stableSuffix[1]);
1787
+ value = stripGenericThemePrefix(value);
1788
+ if (!value) return null;
1789
+ return value;
1790
+ }
1791
+ function stripGenericThemePrefix(value) {
1792
+ const parts = value.split("--");
1793
+ while (parts[0] === "theme" || parts[0] === "themes") parts.shift();
1794
+ value = parts.join("--");
1795
+ if (value.startsWith("theme-")) return value.slice(6);
1796
+ if (value.startsWith("themes-")) return value.slice(7);
1797
+ return value;
1798
+ }
1799
+ function isGeneratedNameHash(value) {
1800
+ return /^[a-z0-9]{7}$/.test(value) && /\d/.test(value);
1801
+ }
1496
1802
  //#endregion
1497
1803
  //#region style/theme.ts
1498
1804
  const idCounter = createIdCounter("theme");
@@ -1508,22 +1814,47 @@ function createTheme(tokens, stableId, callsite) {
1508
1814
  return createThemeData(callsite ?? null, id, className, tokens);
1509
1815
  }
1510
1816
  //#endregion
1817
+ //#region style/tokens.ts
1818
+ function createTokens(values, stableId) {
1819
+ const tokens = {};
1820
+ if (Array.isArray(values)) for (let i = 0, len = values.length; i < len; i++) {
1821
+ const value = values[i];
1822
+ tokens[value] = createStyleToken(value, getChildStableId$1(stableId, String(i)), getChildStyleTokenName(stableId, String(i)));
1823
+ }
1824
+ else assignTokenRecord(tokens, values, stableId, stableId ?? null);
1825
+ return tokens;
1826
+ }
1827
+ function assignTokenRecord(target, values, stableId, debugName) {
1828
+ for (let key in values) {
1829
+ const value = values[key];
1830
+ const childName = getChildStyleTokenName(debugName, key);
1831
+ if (value && typeof value === "object" && !Array.isArray(value)) {
1832
+ const child = {};
1833
+ target[key] = child;
1834
+ assignTokenRecord(child, value, getChildStableId$1(stableId, key), childName);
1835
+ } else target[key] = createStyleToken(value, getChildStableId$1(stableId, key), childName);
1836
+ }
1837
+ }
1838
+ function getChildStableId$1(stableId, child) {
1839
+ return stableId ? stableId + "--" + child : void 0;
1840
+ }
1841
+ //#endregion
1511
1842
  //#region style/value.ts
1512
- function createToken(value, debugId) {
1513
- return createStyleToken(value, debugId);
1843
+ function createToken(value, stableId) {
1844
+ return createStyleToken(value, stableId);
1514
1845
  }
1515
1846
  function createValues(...args) {
1516
1847
  let values = args[0];
1517
1848
  let isNumber = false;
1518
- let debugId = args[1];
1849
+ let stableId = args[1];
1519
1850
  if (args[0] === Number) {
1520
1851
  values = args[1];
1521
- debugId = args[2];
1852
+ stableId = args[2];
1522
1853
  isNumber = true;
1523
1854
  }
1524
1855
  if (!values.length) throw new Error("[Style.values] NO_VALUES");
1525
1856
  const tokens = /* @__PURE__ */ new Map();
1526
- for (let value of values) tokens.set(value, createToken(parseValue(value, isNumber), getChildDebugId$1(debugId, hashString(String(value)))));
1857
+ for (let value of values) tokens.set(value, createStyleToken(parseValue(value, isNumber), getChildStableId(stableId, hashString(String(value))), getChildStyleTokenName(stableId ?? null, getValueDebugName(value))));
1527
1858
  return function ValueFn(...args) {
1528
1859
  const [value, provide, debug] = args;
1529
1860
  const token = tokens.get(value);
@@ -1533,8 +1864,18 @@ function createValues(...args) {
1533
1864
  return token;
1534
1865
  };
1535
1866
  }
1536
- function getChildDebugId$1(debugId, child) {
1537
- return debugId ? debugId + "--" + child : void 0;
1867
+ function getChildStableId(stableId, child) {
1868
+ return stableId ? stableId + "--" + child : void 0;
1869
+ }
1870
+ function getValueDebugName(value) {
1871
+ if (typeof value === "number") return String(value);
1872
+ const parts = String(value).split(/[;|]/);
1873
+ const label = parts[1]?.trim();
1874
+ if (label) return sanitizeDebugName(label);
1875
+ return sanitizeDebugName(parts[0]?.trim() ?? "");
1876
+ }
1877
+ function sanitizeDebugName(value) {
1878
+ return value.replace(/[^a-zA-Z0-9_-]+/g, "-").replace(/^-+|-+$/g, "") || null;
1538
1879
  }
1539
1880
  function parseValue(value, isNumber) {
1540
1881
  if (typeof value === "number" && Number.isFinite(value)) return value;
@@ -1545,30 +1886,6 @@ function parseValue(value, isNumber) {
1545
1886
  return number;
1546
1887
  }
1547
1888
  //#endregion
1548
- //#region style/tokens.ts
1549
- function createTokens(values, debugId) {
1550
- const tokens = {};
1551
- if (Array.isArray(values)) for (let i = 0, len = values.length; i < len; i++) {
1552
- const value = values[i];
1553
- tokens[value] = createToken(value, getChildDebugId(debugId, String(i)));
1554
- }
1555
- else assignTokenRecord(tokens, values, debugId);
1556
- return tokens;
1557
- }
1558
- function assignTokenRecord(target, values, debugId) {
1559
- for (let key in values) {
1560
- const value = values[key];
1561
- if (value && typeof value === "object" && !Array.isArray(value)) {
1562
- const child = {};
1563
- target[key] = child;
1564
- assignTokenRecord(child, value, getChildDebugId(debugId, key));
1565
- } else target[key] = createToken(value, getChildDebugId(debugId, key));
1566
- }
1567
- }
1568
- function getChildDebugId(debugId, child) {
1569
- return debugId ? debugId + "--" + child : void 0;
1570
- }
1571
- //#endregion
1572
- export { isClassNameValue as _, resetStyleThemeIdCounter as a, normalizeCallsiteSourceUrl as b, assignStyleFnMeta as c, style as d, createStyleKeyframes as f, classNameValue as g, classNameTransform as h, createTheme as i, createStyleFn as l, type as m, createToken as n, getThemeRuleCss as o, transformKeyframes as p, createValues as r, createClassNameFn as s, createTokens as t, getStyleFnMeta as u, styleTransform as v, getDebugFieldLoc as y };
1889
+ export { getDebugFieldLoc as C, escapeCssIdent as S, DEV_CONFIG as T, isClassNameValue as _, resetStyleThemeIdCounter as a, getSelectorText as b, assignStyleFnMeta as c, style as d, createStyleKeyframes as f, classNameValue as g, classNameTransform as h, createTheme as i, createStyleFn as l, type as m, createValues as n, getThemeRuleCss as o, transformKeyframes as p, createTokens as r, createClassNameFn as s, createToken as t, getStyleFnMeta as u, styleTransform as v, normalizeCallsiteSourceUrl as w, sanitizeDebugName$1 as x, getSelectorPriority as y };
1573
1890
 
1574
- //# sourceMappingURL=style-Bw5ka-Nq.js.map
1891
+ //# sourceMappingURL=style-DDxjKdX0.js.map