@fluentic/style 0.1.0-beta.11 → 0.1.0-beta.13

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 (556) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/atomic/layer/layer.ts +7 -3
  3. package/builder/data/data.ts +1 -1
  4. package/builder/selector_override_core.ts +7 -1
  5. package/compiler/compiler/compiler.ts +8 -4
  6. package/compiler/extract/extract.ts +14 -9
  7. package/compiler/extract/types.ts +2 -1
  8. package/compiler/transform/extract/chain/chain.ts +7 -4
  9. package/compiler/transform/extract/chain/extract_chain.ts +14 -0
  10. package/compiler/transform/extract/utils/replacement.ts +6 -1
  11. package/compiler/utils/file_resolver.ts +2 -1
  12. package/config/config/css.ts +19 -0
  13. package/css/sheet.ts +3 -2
  14. package/dist/{combine-Bww7VnSr.js → combine-yuoQ_qpx.js} +2 -2
  15. package/dist/{combine-Bww7VnSr.js.map → combine-yuoQ_qpx.js.map} +1 -1
  16. package/dist/compiler/index.mjs +1 -1
  17. package/dist/{compiler-C3CEGGtI.mjs → compiler-BEHxZYjz.mjs} +35 -16
  18. package/dist/compiler-BEHxZYjz.mjs.map +1 -0
  19. package/dist/config/index.js +2 -2
  20. package/dist/{config-CDjbHwb-.js → config-B5nEd-TV.js} +2 -2
  21. package/dist/{config-CDjbHwb-.js.map → config-B5nEd-TV.js.map} +1 -1
  22. package/dist/{config-C5VWvTav.js → config-BWGBkVrM.js} +4 -4
  23. package/dist/{config-C5VWvTav.js.map → config-BWGBkVrM.js.map} +1 -1
  24. package/dist/{config-BKP5LOkt.js → config-Bqe8Y-4_.js} +2 -2
  25. package/dist/{config-BKP5LOkt.js.map → config-Bqe8Y-4_.js.map} +1 -1
  26. package/dist/{config-DNEnHEf3.js → config-DggQEE-4.js} +3 -3
  27. package/dist/{config-DNEnHEf3.js.map → config-DggQEE-4.js.map} +1 -1
  28. package/dist/{createTransformElement-D8fXZ3wA.js → createTransformElement-B2jSnugo.js} +2 -2
  29. package/dist/{createTransformElement-D8fXZ3wA.js.map → createTransformElement-B2jSnugo.js.map} +1 -1
  30. package/dist/{css-CFxNrYt3.js → css-BQRIvzwZ.js} +41 -20
  31. package/dist/css-BQRIvzwZ.js.map +1 -0
  32. package/dist/{css-BDn0epJ8.js → css-CGMAis1n.js} +7 -7
  33. package/dist/css-CGMAis1n.js.map +1 -0
  34. package/dist/{css-DWBWsyxZ.js → css-D7eTqvMH.js} +9 -2
  35. package/dist/{css-DWBWsyxZ.js.map → css-D7eTqvMH.js.map} +1 -1
  36. package/dist/{css-DEYgrj76.js → css-p_5ZNny_.js} +12 -12
  37. package/dist/css-p_5ZNny_.js.map +1 -0
  38. package/dist/css.js +1 -1
  39. package/dist/{css_extra-nTq_Gw0E.js → css_extra-DuVzUIYx.js} +2 -2
  40. package/dist/{css_extra-nTq_Gw0E.js.map → css_extra-DuVzUIYx.js.map} +1 -1
  41. package/dist/{data-CDrS1Bq4.js → data-QXDBLlWs.js} +7 -7
  42. package/dist/{data-CDrS1Bq4.js.map → data-QXDBLlWs.js.map} +1 -1
  43. package/dist/{debug-YuhEIQVO.js → debug-0iaVEC7z.js} +3 -3
  44. package/dist/{debug-YuhEIQVO.js.map → debug-0iaVEC7z.js.map} +1 -1
  45. package/dist/{debug-BkVbf0Cz.js → debug-CkgcZDaX.js} +2 -2
  46. package/dist/{debug-BkVbf0Cz.js.map → debug-CkgcZDaX.js.map} +1 -1
  47. package/dist/dev/rsc.js +7 -7
  48. package/dist/dev/rsc.js.map +1 -1
  49. package/dist/{dev-0imWmSVb.js → dev-DocaGP3_.js} +7 -7
  50. package/dist/{dev-0imWmSVb.js.map → dev-DocaGP3_.js.map} +1 -1
  51. package/dist/dev.js +1 -1
  52. package/dist/dialect/extracted/index.js +1 -1
  53. package/dist/dialect/index.js +1 -1
  54. package/dist/{elementMarker-kvpMjB49.js → elementMarker-DZjd1NuA.js} +35 -21
  55. package/dist/elementMarker-DZjd1NuA.js.map +1 -0
  56. package/dist/entry/dev/adapter/preact.js +1 -1
  57. package/dist/entry/dev/adapter/react.js +1 -1
  58. package/dist/entry/dev/adapter/solid.js +1 -1
  59. package/dist/entry/dev/css.js +2 -2
  60. package/dist/entry/dev/jsx-dev-runtime.js +2 -2
  61. package/dist/entry/dev/jsx-runtime.js +2 -2
  62. package/dist/entry/dev.js +11 -11
  63. package/dist/entry/prod/css.js +2 -2
  64. package/dist/entry/prod.js +2 -2
  65. package/dist/entry/rsc-dev/adapter/preact.js +1 -1
  66. package/dist/entry/rsc-dev/adapter/react.js +1 -1
  67. package/dist/entry/rsc-dev/adapter/solid.js +1 -1
  68. package/dist/entry/rsc-dev/css.js +2 -2
  69. package/dist/entry/rsc-dev/dev.js +6 -6
  70. package/dist/entry/rsc-dev/dev.js.map +1 -1
  71. package/dist/entry/rsc-dev/jsx-dev-runtime.js +2 -2
  72. package/dist/entry/rsc-dev/jsx-runtime.js +2 -2
  73. package/dist/entry/rsc-dev.js +5 -5
  74. package/dist/entry/rsc-prod/css.js +2 -2
  75. package/dist/entry/rsc-prod.js +2 -2
  76. package/dist/{env-Cz8frh6e.js → env-DJyXPJ9q.js} +40 -19
  77. package/dist/env-DJyXPJ9q.js.map +1 -0
  78. package/dist/getClassName-9CsXbNls.js.map +1 -1
  79. package/dist/{getClassName-DGm-VNDo.js → getClassName-BB_L7U_v.js} +5 -5
  80. package/dist/{getClassName-DGm-VNDo.js.map → getClassName-BB_L7U_v.js.map} +1 -1
  81. package/dist/{getClassName-Dtc4yyYI.js → getClassName-BIqt1S41.js} +4 -4
  82. package/dist/{getClassName-Dtc4yyYI.js.map → getClassName-BIqt1S41.js.map} +1 -1
  83. package/dist/{global-CAc9OjKx.js → global-CBQGormL.js} +2 -2
  84. package/dist/{global-CAc9OjKx.js.map → global-CBQGormL.js.map} +1 -1
  85. package/dist/index.js +9 -9
  86. package/dist/jsx/jsx-dev-runtime.js +1 -1
  87. package/dist/jsx/jsx-dev-runtime.server.js +1 -1
  88. package/dist/jsx/jsx-runtime.js +1 -1
  89. package/dist/jsx/jsx-runtime.server.js +1 -1
  90. package/dist/{jsx-CVxpkS04.js → jsx-BCufpzdb.js} +4 -4
  91. package/dist/{jsx-CVxpkS04.js.map → jsx-BCufpzdb.js.map} +1 -1
  92. package/dist/{jsx_runtime-6Qa1lmz2.js → jsx_runtime-Bu_A8mr4.js} +2 -2
  93. package/dist/{jsx_runtime-6Qa1lmz2.js.map → jsx_runtime-Bu_A8mr4.js.map} +1 -1
  94. package/dist/{loader-_-VjzlrX.mjs → loader-vMHuD1zT.mjs} +3 -3
  95. package/dist/loader-vMHuD1zT.mjs.map +1 -0
  96. package/dist/{misc-B76PUnWe.mjs → misc-9EGKYkZo.mjs} +2 -2
  97. package/dist/{misc-B76PUnWe.mjs.map → misc-9EGKYkZo.mjs.map} +1 -1
  98. package/dist/{namedTokens-5AayGokX.js → namedTokens-DnpyC5XT.js} +3 -3
  99. package/dist/{namedTokens-5AayGokX.js.map → namedTokens-DnpyC5XT.js.map} +1 -1
  100. package/dist/plugin/farm/index.mjs +3 -3
  101. package/dist/plugin/nextjs/index.mjs +4 -4
  102. package/dist/plugin/nextjs/index.mjs.map +1 -1
  103. package/dist/plugin/nextjs/loader.mjs +4 -4
  104. package/dist/plugin/parcel/index.cjs +1 -1
  105. package/dist/plugin/parcel/index.mjs +2 -2
  106. package/dist/plugin/parcel/optimizer.cjs +1 -1
  107. package/dist/plugin/parcel/optimizer.mjs +2 -2
  108. package/dist/plugin/parcel/resolver.cjs +1 -1
  109. package/dist/plugin/parcel/resolver.mjs +2 -2
  110. package/dist/plugin/parcel/runtime.cjs +1 -1
  111. package/dist/plugin/parcel/runtime.mjs +1 -1
  112. package/dist/plugin/parcel/transformer.cjs +1 -1
  113. package/dist/plugin/parcel/transformer.mjs +2 -2
  114. package/dist/plugin/rspack/index.mjs +2 -2
  115. package/dist/plugin/vite/index.mjs +3 -3
  116. package/dist/plugin/webpack/index.mjs +2 -2
  117. package/dist/plugin/webpack/loader.mjs +2 -2
  118. package/dist/presets/tailwind/index.js +3 -3
  119. package/dist/{registry-w8ET5R7v.mjs → registry-DVB7n6V-.mjs} +2 -2
  120. package/dist/{registry-w8ET5R7v.mjs.map → registry-DVB7n6V-.mjs.map} +1 -1
  121. package/dist/{resolveClassNameRuntime-CJjlUP93.js → resolveClassNameRuntime-DvH6j_4N.js} +2 -2
  122. package/dist/{resolveClassNameRuntime-CJjlUP93.js.map → resolveClassNameRuntime-DvH6j_4N.js.map} +1 -1
  123. package/dist/{rules-DaMaMHgb.js → rules-znG9bsKI.js} +8 -8
  124. package/dist/{rules-DaMaMHgb.js.map → rules-znG9bsKI.js.map} +1 -1
  125. package/dist/server.js +13 -13
  126. package/dist/{shared-PK52rW6T.cjs → shared-DaEDCb8I.cjs} +35 -16
  127. package/dist/shared-DaEDCb8I.cjs.map +1 -0
  128. package/dist/{shared-C_cYxNzz.mjs → shared-O-5Fcsxa.mjs} +4 -4
  129. package/dist/{shared-C_cYxNzz.mjs.map → shared-O-5Fcsxa.mjs.map} +1 -1
  130. package/dist/sheet-SlZRjOmw.js +7 -0
  131. package/dist/{sheet-CxkO1Hwt.js.map → sheet-SlZRjOmw.js.map} +1 -1
  132. package/dist/{sidecar-BhvmXYsD.mjs → sidecar-DiYLwXbk.mjs} +3 -3
  133. package/dist/{sidecar-BhvmXYsD.mjs.map → sidecar-DiYLwXbk.mjs.map} +1 -1
  134. package/dist/{style-CAhAnRni.js → style-CtXEZqgx.js} +10 -10
  135. package/dist/{style-CAhAnRni.js.map → style-CtXEZqgx.js.map} +1 -1
  136. package/dist/{styleStore-BzLZwpwy.js → styleStore-BImBZdt6.js} +6 -4
  137. package/dist/styleStore-BImBZdt6.js.map +1 -0
  138. package/dist/{styleStore-DaIJ4OPV.js → styleStore-CBan0gHQ.js} +9 -7
  139. package/dist/styleStore-CBan0gHQ.js.map +1 -0
  140. package/dist/{token-D33mKTka.js → token-DyLO6Hnf.js} +2 -2
  141. package/dist/{token-D33mKTka.js.map → token-DyLO6Hnf.js.map} +1 -1
  142. package/dist/{trace-c2WmBbmX.js → trace-Bsh-Kkg_.js} +2 -2
  143. package/dist/{trace-c2WmBbmX.js.map → trace-Bsh-Kkg_.js.map} +1 -1
  144. package/dist/{trace-B3dpTRJp.js → trace-C1_6fM21.js} +3 -3
  145. package/dist/{trace-B3dpTRJp.js.map → trace-C1_6fM21.js.map} +1 -1
  146. package/dist/{transform-DSpimwwC.js → transform-8TIMiF5A.js} +2 -2
  147. package/dist/{transform-DSpimwwC.js.map → transform-8TIMiF5A.js.map} +1 -1
  148. package/dist/types/adapter/preact.d.ts +1 -0
  149. package/dist/types/adapter/react.d.ts +1 -0
  150. package/dist/types/adapter/solid.d.ts +1 -0
  151. package/dist/types/atomic/atRule/counterStyle.d.ts +10 -0
  152. package/dist/types/atomic/atRule/fontFace.d.ts +10 -0
  153. package/dist/types/atomic/atRule/fontPaletteValues.d.ts +10 -0
  154. package/dist/types/atomic/atRule/fontSrc.d.ts +1 -0
  155. package/dist/types/atomic/atRule/keyframes.d.ts +13 -0
  156. package/dist/types/atomic/atRule/positionTry.d.ts +13 -0
  157. package/dist/types/atomic/atRule/property.d.ts +13 -0
  158. package/dist/types/atomic/atRule/utils.d.ts +5 -0
  159. package/dist/types/atomic/className.d.ts +11 -0
  160. package/dist/types/atomic/debug/className/className.d.ts +9 -0
  161. package/dist/types/atomic/debug/className/index.d.ts +1 -0
  162. package/dist/types/atomic/debug/property/data.d.ts +3 -0
  163. package/dist/types/atomic/debug/property/index.d.ts +1 -0
  164. package/dist/types/atomic/debug/property/property.d.ts +5 -0
  165. package/dist/types/atomic/debug/selector.d.ts +2 -0
  166. package/dist/types/atomic/debug/value.d.ts +5 -0
  167. package/dist/types/atomic/element.d.ts +5 -0
  168. package/dist/types/atomic/layer/index.d.ts +3 -0
  169. package/dist/types/atomic/layer/layer.d.ts +12 -0
  170. package/dist/types/atomic/layer/types.d.ts +30 -0
  171. package/dist/types/atomic/layer/utils.d.ts +4 -0
  172. package/dist/types/atomic/property/index.d.ts +2 -0
  173. package/dist/types/atomic/property/presets.d.ts +4 -0
  174. package/dist/types/atomic/property/property.d.ts +3 -0
  175. package/dist/types/atomic/property/type_maps.d.ts +31 -0
  176. package/dist/types/atomic/property/types.d.ts +4 -0
  177. package/dist/types/atomic/rule.d.ts +5 -0
  178. package/dist/types/atomic/scope.d.ts +3 -0
  179. package/dist/types/atomic/theme.d.ts +7 -0
  180. package/dist/types/atomic/token.d.ts +7 -0
  181. package/dist/types/atomic/utils/cssIdent.d.ts +2 -0
  182. package/dist/types/atomic/utils/cssVar.d.ts +3 -0
  183. package/dist/types/atomic/utils/debug.d.ts +4 -0
  184. package/dist/types/atomic/utils/format.d.ts +5 -0
  185. package/dist/types/atomic/utils/hash.d.ts +1 -0
  186. package/dist/types/atomic/utils/selector.d.ts +6 -0
  187. package/dist/types/atomic/utils/types.d.ts +7 -0
  188. package/dist/types/atomic/value/index.d.ts +2 -0
  189. package/dist/types/atomic/value/unitless.d.ts +1 -0
  190. package/dist/types/atomic/value/value.d.ts +2 -0
  191. package/dist/types/atomic/var.d.ts +4 -0
  192. package/dist/types/builder/classname/class_name_builder.d.ts +4 -0
  193. package/dist/types/builder/classname/fns.d.ts +48 -0
  194. package/dist/types/builder/classname/index.d.ts +3 -0
  195. package/dist/types/builder/classname/types.d.ts +18 -0
  196. package/dist/types/builder/data/check_selector.d.ts +2 -0
  197. package/dist/types/builder/data/const.d.ts +26 -0
  198. package/dist/types/builder/data/create.d.ts +13 -0
  199. package/dist/types/builder/data/data.d.ts +44 -0
  200. package/dist/types/builder/data/debug.d.ts +38 -0
  201. package/dist/types/builder/data/index.d.ts +8 -0
  202. package/dist/types/builder/data/is.d.ts +16 -0
  203. package/dist/types/builder/data/merge/index.d.ts +2 -0
  204. package/dist/types/builder/data/merge/scope.d.ts +7 -0
  205. package/dist/types/builder/data/merge/style.d.ts +6 -0
  206. package/dist/types/builder/data/merge/utils.d.ts +5 -0
  207. package/dist/types/builder/data/selector.d.ts +8 -0
  208. package/dist/types/builder/data/state.d.ts +85 -0
  209. package/dist/types/builder/extract/index.d.ts +7 -0
  210. package/dist/types/builder/extract/scope.d.ts +14 -0
  211. package/dist/types/builder/extract/sheet.d.ts +10 -0
  212. package/dist/types/builder/extract/slot.d.ts +9 -0
  213. package/dist/types/builder/extract/style.d.ts +11 -0
  214. package/dist/types/builder/extract/theme.d.ts +2 -0
  215. package/dist/types/builder/extract/token.d.ts +7 -0
  216. package/dist/types/builder/extract/utils.d.ts +28 -0
  217. package/dist/types/builder/extract/withTokens.d.ts +10 -0
  218. package/dist/types/builder/index.d.ts +2 -0
  219. package/dist/types/builder/selector_override.d.ts +5 -0
  220. package/dist/types/builder/selector_override_core.d.ts +6 -0
  221. package/dist/types/builder/style_builder.d.ts +15 -0
  222. package/dist/types/builder/style_data.d.ts +8 -0
  223. package/dist/types/builder/style_fns.d.ts +14 -0
  224. package/dist/types/builder/token/data.d.ts +10 -0
  225. package/dist/types/builder/token/name.d.ts +3 -0
  226. package/dist/types/builder/token/symbols.d.ts +4 -0
  227. package/dist/types/builder/types/alias.d.ts +59 -0
  228. package/dist/types/builder/types/fns.d.ts +115 -0
  229. package/dist/types/builder/types/index.d.ts +1 -0
  230. package/dist/types/builder/types/types.d.ts +22 -0
  231. package/dist/types/builder/utils.d.ts +9 -0
  232. package/dist/types/compiler/compiler/cache.d.ts +24 -0
  233. package/dist/types/compiler/compiler/compiler.d.ts +28 -0
  234. package/dist/types/compiler/compiler/constants.d.ts +6 -0
  235. package/dist/types/compiler/compiler/index.d.ts +4 -0
  236. package/dist/types/compiler/compiler/types.d.ts +53 -0
  237. package/dist/types/compiler/cssProp.d.ts +8 -0
  238. package/dist/types/compiler/extract/collector.d.ts +8 -0
  239. package/dist/types/compiler/extract/extract.d.ts +6 -0
  240. package/dist/types/compiler/extract/index.d.ts +3 -0
  241. package/dist/types/compiler/extract/types.d.ts +23 -0
  242. package/dist/types/compiler/index.d.ts +3 -0
  243. package/dist/types/compiler/transform/cssProp/index.d.ts +1 -0
  244. package/dist/types/compiler/transform/cssProp/plugin.d.ts +13 -0
  245. package/dist/types/compiler/transform/debug/index.d.ts +2 -0
  246. package/dist/types/compiler/transform/debug/plugin.d.ts +34 -0
  247. package/dist/types/compiler/transform/debug/transform.d.ts +7 -0
  248. package/dist/types/compiler/transform/debug/utils/debug_data.d.ts +11 -0
  249. package/dist/types/compiler/transform/debug/utils/source_url.d.ts +2 -0
  250. package/dist/types/compiler/transform/evaluator/evaluator.d.ts +41 -0
  251. package/dist/types/compiler/transform/evaluator/index.d.ts +3 -0
  252. package/dist/types/compiler/transform/evaluator/tracer.d.ts +8 -0
  253. package/dist/types/compiler/transform/evaluator/types.d.ts +21 -0
  254. package/dist/types/compiler/transform/extract/chain/chain.d.ts +18 -0
  255. package/dist/types/compiler/transform/extract/chain/extract_chain.d.ts +19 -0
  256. package/dist/types/compiler/transform/extract/chain/index.d.ts +3 -0
  257. package/dist/types/compiler/transform/extract/chain/types.d.ts +32 -0
  258. package/dist/types/compiler/transform/extract/index.d.ts +2 -0
  259. package/dist/types/compiler/transform/extract/plugin.d.ts +20 -0
  260. package/dist/types/compiler/transform/extract/transform.d.ts +10 -0
  261. package/dist/types/compiler/transform/extract/utils/imports.d.ts +3 -0
  262. package/dist/types/compiler/transform/extract/utils/replacement.d.ts +9 -0
  263. package/dist/types/compiler/transform/extract/utils/slot.d.ts +4 -0
  264. package/dist/types/compiler/transform/extract/utils/state.d.ts +34 -0
  265. package/dist/types/compiler/transform/extract/utils/theme.d.ts +9 -0
  266. package/dist/types/compiler/transform/extract/utils/token.d.ts +1 -0
  267. package/dist/types/compiler/transform/index.d.ts +5 -0
  268. package/dist/types/compiler/transform/syntax/index.d.ts +5 -0
  269. package/dist/types/compiler/transform/syntax/isStaticStyleValue.d.ts +2 -0
  270. package/dist/types/compiler/transform/syntax/isStyleChainCall.d.ts +2 -0
  271. package/dist/types/compiler/transform/syntax/static_ids.d.ts +16 -0
  272. package/dist/types/compiler/transform/syntax/types.d.ts +4 -0
  273. package/dist/types/compiler/transform/syntax/utils.d.ts +5 -0
  274. package/dist/types/compiler/transform/utils/babel.d.ts +21 -0
  275. package/dist/types/compiler/transform/utils/import.d.ts +2 -0
  276. package/dist/types/compiler/transform/utils/path.d.ts +1 -0
  277. package/dist/types/compiler/transform/utils/selector.d.ts +18 -0
  278. package/dist/types/compiler/utils/constants.d.ts +68 -0
  279. package/dist/types/compiler/utils/file_resolver.d.ts +12 -0
  280. package/dist/types/compiler/utils/import_source.d.ts +28 -0
  281. package/dist/types/compiler/utils/imports.d.ts +6 -0
  282. package/dist/types/compiler/utils/path.d.ts +4 -0
  283. package/dist/types/compiler/utils/sourcemap.d.ts +36 -0
  284. package/dist/types/config/build.d.ts +20 -0
  285. package/dist/types/config/config/check.d.ts +11 -0
  286. package/dist/types/config/config/css.d.ts +28 -0
  287. package/dist/types/config/config/css_extra.d.ts +13 -0
  288. package/dist/types/config/config/debug.d.ts +14 -0
  289. package/dist/types/config/config/dev.d.ts +36 -0
  290. package/dist/types/config/config/runtime.d.ts +10 -0
  291. package/dist/types/config/configure.d.ts +12 -0
  292. package/dist/types/config/constants.d.ts +1 -0
  293. package/dist/types/config/index.d.ts +2 -0
  294. package/dist/types/config/types.d.ts +47 -0
  295. package/dist/types/config/utils.d.ts +2 -0
  296. package/dist/types/css/counterStyle.d.ts +4 -0
  297. package/dist/types/css/fontFace.d.ts +5 -0
  298. package/dist/types/css/fontPaletteValues.d.ts +4 -0
  299. package/dist/types/css/index.d.ts +9 -0
  300. package/dist/types/css/keyframes.d.ts +4 -0
  301. package/dist/types/css/positionTry.d.ts +4 -0
  302. package/dist/types/css/property.d.ts +7 -0
  303. package/dist/types/css/sheet.d.ts +7 -0
  304. package/dist/types/css/styleTarget.d.ts +9 -0
  305. package/dist/types/css/utils.d.ts +19 -0
  306. package/dist/types/dev/config.d.ts +6 -0
  307. package/dist/types/dev/fns.d.ts +14 -0
  308. package/dist/types/dev/index.d.ts +2 -0
  309. package/dist/types/dev/trace.d.ts +8 -0
  310. package/dist/types/dev/utils.d.ts +5 -0
  311. package/dist/types/dialect/extracted/index.d.ts +1 -0
  312. package/dist/types/dialect/index.d.ts +1 -0
  313. package/dist/types/dialect/namedTokens.d.ts +9 -0
  314. package/dist/types/entry/dev/adapter/preact.d.ts +1 -0
  315. package/dist/types/entry/dev/adapter/react.d.ts +1 -0
  316. package/dist/types/entry/dev/adapter/solid.d.ts +1 -0
  317. package/dist/types/entry/dev/config.d.ts +2 -0
  318. package/dist/types/entry/dev/css.d.ts +2 -0
  319. package/dist/types/entry/dev/index.d.ts +3 -0
  320. package/dist/types/entry/dev/jsx_dev_runtime.d.ts +3 -0
  321. package/dist/types/entry/dev/sheet.d.ts +1 -0
  322. package/dist/types/entry/prod/adapter/preact.d.ts +1 -0
  323. package/dist/types/entry/prod/adapter/react.d.ts +1 -0
  324. package/dist/types/entry/prod/adapter/solid.d.ts +1 -0
  325. package/dist/types/entry/prod/config.d.ts +2 -0
  326. package/dist/types/entry/prod/config_debug.d.ts +2 -0
  327. package/dist/types/entry/prod/css.d.ts +2 -0
  328. package/dist/types/entry/prod/extract.d.ts +1 -0
  329. package/dist/types/entry/prod/index.d.ts +2 -0
  330. package/dist/types/entry/prod/jsx_runtime.d.ts +2 -0
  331. package/dist/types/entry/prod/runtime.d.ts +8 -0
  332. package/dist/types/entry/rsc_dev/adapter/preact.d.ts +1 -0
  333. package/dist/types/entry/rsc_dev/adapter/react.d.ts +1 -0
  334. package/dist/types/entry/rsc_dev/adapter/solid.d.ts +1 -0
  335. package/dist/types/entry/rsc_dev/config.d.ts +2 -0
  336. package/dist/types/entry/rsc_dev/css.d.ts +2 -0
  337. package/dist/types/entry/rsc_dev/index.d.ts +2 -0
  338. package/dist/types/entry/rsc_dev/server.d.ts +10 -0
  339. package/dist/types/entry/rsc_prod/adapter/preact.d.ts +1 -0
  340. package/dist/types/entry/rsc_prod/adapter/react.d.ts +1 -0
  341. package/dist/types/entry/rsc_prod/adapter/solid.d.ts +1 -0
  342. package/dist/types/entry/rsc_prod/config.d.ts +2 -0
  343. package/dist/types/entry/rsc_prod/config_debug.d.ts +2 -0
  344. package/dist/types/entry/rsc_prod/css.d.ts +2 -0
  345. package/dist/types/entry/rsc_prod/index.d.ts +2 -0
  346. package/dist/types/entry/rsc_prod/jsx_runtime.d.ts +2 -0
  347. package/dist/types/entry/rsc_prod/runtime.d.ts +4 -0
  348. package/dist/types/entry/rsc_prod/server.d.ts +6 -0
  349. package/dist/types/entry/shared/config.d.ts +1 -0
  350. package/dist/types/entry/shared/config_debug.d.ts +1 -0
  351. package/dist/types/entry/shared/config_dev.d.ts +1 -0
  352. package/dist/types/entry/shared/dev.d.ts +1 -0
  353. package/dist/types/entry/shared/prod.d.ts +1 -0
  354. package/dist/types/entry/shared/utils.d.ts +2 -0
  355. package/dist/types/index.d.ts +9 -0
  356. package/dist/types/jsx/extracted/jsx_runtime.d.ts +7 -0
  357. package/dist/types/jsx/rsc/jsx_runtime.d.ts +7 -0
  358. package/dist/types/jsx/rsc_extracted/jsx_runtime.d.ts +2 -0
  359. package/dist/types/jsx/runtime/jsx_dev_runtime.d.ts +6 -0
  360. package/dist/types/jsx/runtime/jsx_runtime.d.ts +7 -0
  361. package/dist/types/jsx/types/index.d.ts +1 -0
  362. package/dist/types/jsx/types/preact.d.ts +12 -0
  363. package/dist/types/jsx/types/react.d.ts +10 -0
  364. package/dist/types/jsx/types/solid.d.ts +12 -0
  365. package/dist/types/jsx/utils.d.ts +19 -0
  366. package/dist/types/plugin/bundler/farm/index.d.ts +1 -0
  367. package/dist/types/plugin/bundler/farm/plugin.d.ts +91 -0
  368. package/dist/types/plugin/bundler/parcel/index.d.ts +1 -0
  369. package/dist/types/plugin/bundler/parcel/optimizer.d.ts +3 -0
  370. package/dist/types/plugin/bundler/parcel/plugin.d.ts +6 -0
  371. package/dist/types/plugin/bundler/parcel/resolver.d.ts +3 -0
  372. package/dist/types/plugin/bundler/parcel/runtime.d.ts +3 -0
  373. package/dist/types/plugin/bundler/parcel/shared.d.ts +37 -0
  374. package/dist/types/plugin/bundler/parcel/transformer.d.ts +3 -0
  375. package/dist/types/plugin/bundler/rspack/index.d.ts +1 -0
  376. package/dist/types/plugin/bundler/rspack/plugin.d.ts +7 -0
  377. package/dist/types/plugin/bundler/vite/index.d.ts +1 -0
  378. package/dist/types/plugin/bundler/vite/plugin.d.ts +6 -0
  379. package/dist/types/plugin/bundler/vite/state.d.ts +55 -0
  380. package/dist/types/plugin/bundler/webpack/index.d.ts +1 -0
  381. package/dist/types/plugin/bundler/webpack/loader.d.ts +2 -0
  382. package/dist/types/plugin/bundler/webpack/plugin.d.ts +11 -0
  383. package/dist/types/plugin/bundler/webpack/shared/loader.d.ts +31 -0
  384. package/dist/types/plugin/bundler/webpack/shared/registry.d.ts +4 -0
  385. package/dist/types/plugin/bundler/webpack/utils.d.ts +18 -0
  386. package/dist/types/plugin/nextjs/constants.d.ts +3 -0
  387. package/dist/types/plugin/nextjs/html.d.ts +1 -0
  388. package/dist/types/plugin/nextjs/index.d.ts +2 -0
  389. package/dist/types/plugin/nextjs/loader.d.ts +3 -0
  390. package/dist/types/plugin/nextjs/plugin.d.ts +5 -0
  391. package/dist/types/plugin/nextjs/types.d.ts +21 -0
  392. package/dist/types/plugin/nextjs/utils.d.ts +59 -0
  393. package/dist/types/plugin/utils/cache/css_cache.d.ts +34 -0
  394. package/dist/types/plugin/utils/cache/file.d.ts +4 -0
  395. package/dist/types/plugin/utils/cache/index.d.ts +2 -0
  396. package/dist/types/plugin/utils/compiler.d.ts +40 -0
  397. package/dist/types/plugin/utils/constants.d.ts +4 -0
  398. package/dist/types/plugin/utils/cssMarker.d.ts +4 -0
  399. package/dist/types/plugin/utils/cssOutput.d.ts +10 -0
  400. package/dist/types/plugin/utils/filter.d.ts +14 -0
  401. package/dist/types/plugin/utils/imports.d.ts +3 -0
  402. package/dist/types/plugin/utils/index.d.ts +10 -0
  403. package/dist/types/plugin/utils/injection.d.ts +3 -0
  404. package/dist/types/plugin/utils/misc.d.ts +1 -0
  405. package/dist/types/plugin/utils/runtimeEntry.d.ts +8 -0
  406. package/dist/types/plugin/utils/sidecar/index.d.ts +1 -0
  407. package/dist/types/plugin/utils/sidecar/server.d.ts +19 -0
  408. package/dist/types/plugin/utils/sidecar/sidecar.d.ts +17 -0
  409. package/dist/types/plugin/utils/sidecar/utils.d.ts +33 -0
  410. package/dist/types/plugin/utils/sourcemap.d.ts +9 -0
  411. package/dist/types/plugin/utils/virtual.d.ts +12 -0
  412. package/dist/types/presets/tailwind/classname/index.d.ts +2 -0
  413. package/dist/types/presets/tailwind/classname/transform.d.ts +8 -0
  414. package/dist/types/presets/tailwind/classname/types.d.ts +27 -0
  415. package/dist/types/presets/tailwind/index.d.ts +5 -0
  416. package/dist/types/presets/tailwind/selectors.d.ts +68 -0
  417. package/dist/types/presets/tailwind/style/index.d.ts +2 -0
  418. package/dist/types/presets/tailwind/style/transform.d.ts +8 -0
  419. package/dist/types/presets/tailwind/style/types.d.ts +149 -0
  420. package/dist/types/presets/tailwind/theme.d.ts +477 -0
  421. package/dist/types/presets/tailwind/types.d.ts +53 -0
  422. package/dist/types/runtime/adapter/utils.d.ts +12 -0
  423. package/dist/types/runtime/core/cache/combine.d.ts +6 -0
  424. package/dist/types/runtime/core/cache/combineRuntime.d.ts +1 -0
  425. package/dist/types/runtime/core/cache/item.d.ts +15 -0
  426. package/dist/types/runtime/core/cache/itemWithResolver.d.ts +4 -0
  427. package/dist/types/runtime/core/cache/pool.d.ts +16 -0
  428. package/dist/types/runtime/core/cache/prop.d.ts +19 -0
  429. package/dist/types/runtime/core/cache/propCache.d.ts +12 -0
  430. package/dist/types/runtime/core/cache/resolvedItem.d.ts +5 -0
  431. package/dist/types/runtime/core/cache/result.d.ts +9 -0
  432. package/dist/types/runtime/core/cache/stateItem.d.ts +8 -0
  433. package/dist/types/runtime/core/cache/token.d.ts +2 -0
  434. package/dist/types/runtime/core/cache/tokenValues.d.ts +26 -0
  435. package/dist/types/runtime/core/cache/utils/tree.d.ts +12 -0
  436. package/dist/types/runtime/core/cache/utils/walk.d.ts +1 -0
  437. package/dist/types/runtime/core/className.d.ts +18 -0
  438. package/dist/types/runtime/core/combinedStyle.d.ts +20 -0
  439. package/dist/types/runtime/core/createTransformElement.d.ts +4 -0
  440. package/dist/types/runtime/core/elementMarker.d.ts +12 -0
  441. package/dist/types/runtime/core/elementMarkerData.d.ts +7 -0
  442. package/dist/types/runtime/core/getClassName.d.ts +4 -0
  443. package/dist/types/runtime/core/getSheetRules.d.ts +3 -0
  444. package/dist/types/runtime/core/getToken.d.ts +3 -0
  445. package/dist/types/runtime/core/index.d.ts +5 -0
  446. package/dist/types/runtime/core/jsx.d.ts +1 -0
  447. package/dist/types/runtime/core/resolveClassNameRuntime.d.ts +8 -0
  448. package/dist/types/runtime/env.d.ts +2 -0
  449. package/dist/types/runtime/extract/combineStyle.d.ts +27 -0
  450. package/dist/types/runtime/extract/getClassName.d.ts +10 -0
  451. package/dist/types/runtime/extract/index.d.ts +6 -0
  452. package/dist/types/runtime/extract/jsx.d.ts +10 -0
  453. package/dist/types/runtime/extract/token.d.ts +5 -0
  454. package/dist/types/runtime/extract/tokenResolver.d.ts +2 -0
  455. package/dist/types/runtime/rsc/constants.d.ts +4 -0
  456. package/dist/types/runtime/rsc/dev.d.ts +6 -0
  457. package/dist/types/runtime/rsc/getClassName.d.ts +24 -0
  458. package/dist/types/runtime/rsc/index.d.ts +1 -0
  459. package/dist/types/runtime/rsc/jsx.d.ts +1 -0
  460. package/dist/types/runtime/rsc/observer.d.ts +5 -0
  461. package/dist/types/runtime/rsc/styleStore.d.ts +5 -0
  462. package/dist/types/runtime/sheet/element.d.ts +2 -0
  463. package/dist/types/runtime/sheet/global.d.ts +3 -0
  464. package/dist/types/runtime/sheet/index.d.ts +3 -0
  465. package/dist/types/runtime/sheet/insert.d.ts +5 -0
  466. package/dist/types/runtime/sheet/rule.d.ts +8 -0
  467. package/dist/types/runtime/sheet/rules.d.ts +10 -0
  468. package/dist/types/runtime/sheet/theme.d.ts +5 -0
  469. package/dist/types/runtime/style/index.d.ts +3 -0
  470. package/dist/types/runtime/style/scope.d.ts +4 -0
  471. package/dist/types/runtime/style/style.d.ts +27 -0
  472. package/dist/types/runtime/style/token.d.ts +1 -0
  473. package/dist/types/runtime/types.d.ts +28 -0
  474. package/dist/types/selector/assert.d.ts +13 -0
  475. package/dist/types/selector/index.d.ts +5 -0
  476. package/dist/types/selector/presets/default.d.ts +108 -0
  477. package/dist/types/selector/presets/index.d.ts +3 -0
  478. package/dist/types/selector/presets/minimal.d.ts +46 -0
  479. package/dist/types/selector/presets/selectors.d.ts +62 -0
  480. package/dist/types/selector/selector.d.ts +12 -0
  481. package/dist/types/selector/types.d.ts +12 -0
  482. package/dist/types/selector/validate.d.ts +5 -0
  483. package/dist/types/sheet/dev/dev_layer.d.ts +4 -0
  484. package/dist/types/sheet/dev/dev_sort.d.ts +2 -0
  485. package/dist/types/sheet/dev/index.d.ts +5 -0
  486. package/dist/types/sheet/dev/utils.d.ts +26 -0
  487. package/dist/types/sheet/index.d.ts +4 -0
  488. package/dist/types/sheet/prod.d.ts +2 -0
  489. package/dist/types/sheet/sheet.d.ts +2 -0
  490. package/dist/types/sheet/sourcemap.d.ts +11 -0
  491. package/dist/types/sheet/types.d.ts +30 -0
  492. package/dist/types/sheet/utils/dom.d.ts +5 -0
  493. package/dist/types/sheet/utils/index.d.ts +4 -0
  494. package/dist/types/sheet/utils/layer.d.ts +10 -0
  495. package/dist/types/sheet/utils/noop.d.ts +2 -0
  496. package/dist/types/sheet/utils/rule.d.ts +3 -0
  497. package/dist/types/sheet/utils/sourcemap.d.ts +12 -0
  498. package/dist/types/style/classname.d.ts +15 -0
  499. package/dist/types/style/important.d.ts +8 -0
  500. package/dist/types/style/index.d.ts +12 -0
  501. package/dist/types/style/keyframes.d.ts +10 -0
  502. package/dist/types/style/style.d.ts +426 -0
  503. package/dist/types/style/theme.d.ts +5 -0
  504. package/dist/types/style/token.d.ts +29 -0
  505. package/dist/types/style/tokens.d.ts +10 -0
  506. package/dist/types/style/transform.d.ts +21 -0
  507. package/dist/types/style/types.d.ts +22 -0
  508. package/dist/types/style/utils/expose.d.ts +8 -0
  509. package/dist/types/style/utils/index.d.ts +1 -0
  510. package/dist/types/style/value.d.ts +12 -0
  511. package/dist/types/style/valueRef.d.ts +13 -0
  512. package/dist/types/style/weight.d.ts +9 -0
  513. package/dist/types/utils/global.d.ts +4 -0
  514. package/dist/types/utils/hash.d.ts +3 -0
  515. package/dist/types/utils/id.d.ts +12 -0
  516. package/dist/types/utils/object.d.ts +10 -0
  517. package/dist/types/utils/symbol.d.ts +1 -0
  518. package/dist/types/utils/trace.d.ts +21 -0
  519. package/dist/types/utils/type.d.ts +11 -0
  520. package/dist/{utils-H1VInWpd.js → utils-10MTZOuB.js} +31 -15
  521. package/dist/utils-10MTZOuB.js.map +1 -0
  522. package/dist/{utils-NdisireF.mjs → utils-BBN9msTv.mjs} +4 -4
  523. package/dist/{utils-NdisireF.mjs.map → utils-BBN9msTv.mjs.map} +1 -1
  524. package/dist/{utils-DND33M6y.mjs → utils-Bjh9pO87.mjs} +3 -3
  525. package/dist/{utils-DND33M6y.mjs.map → utils-Bjh9pO87.mjs.map} +1 -1
  526. package/dist/{utils-DZK0mfmY.js → utils-DoKJnvxk.js} +3 -3
  527. package/dist/{utils-DZK0mfmY.js.map → utils-DoKJnvxk.js.map} +1 -1
  528. package/dist/utils.js +3 -3
  529. package/dist/{value-CK0-Xbov.js → value-Dg6ALjjj.js} +2 -2
  530. package/dist/{value-CK0-Xbov.js.map → value-Dg6ALjjj.js.map} +1 -1
  531. package/dist/{webpack-D7QO0bKN.mjs → webpack-C1j49Psk.mjs} +5 -5
  532. package/dist/{webpack-D7QO0bKN.mjs.map → webpack-C1j49Psk.mjs.map} +1 -1
  533. package/jsx/types/solid.ts +8 -25
  534. package/package.json +76 -72
  535. package/plugin/bundler/webpack/shared/loader.ts +4 -0
  536. package/plugin/nextjs/plugin.ts +7 -8
  537. package/runtime/rsc/observer.ts +4 -1
  538. package/runtime/rsc/styleStore.ts +6 -2
  539. package/runtime/sheet/rule.ts +2 -2
  540. package/sheet/dev/dev_layer.ts +7 -3
  541. package/sheet/dev/dev_sort.ts +18 -11
  542. package/sheet/prod.ts +7 -3
  543. package/sheet/types.ts +2 -1
  544. package/sheet/utils/layer.ts +2 -1
  545. package/dist/compiler-C3CEGGtI.mjs.map +0 -1
  546. package/dist/css-BDn0epJ8.js.map +0 -1
  547. package/dist/css-CFxNrYt3.js.map +0 -1
  548. package/dist/css-DEYgrj76.js.map +0 -1
  549. package/dist/elementMarker-kvpMjB49.js.map +0 -1
  550. package/dist/env-Cz8frh6e.js.map +0 -1
  551. package/dist/loader-_-VjzlrX.mjs.map +0 -1
  552. package/dist/shared-PK52rW6T.cjs.map +0 -1
  553. package/dist/sheet-CxkO1Hwt.js +0 -7
  554. package/dist/styleStore-BzLZwpwy.js.map +0 -1
  555. package/dist/styleStore-DaIJ4OPV.js.map +0 -1
  556. package/dist/utils-H1VInWpd.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"utils-NdisireF.mjs","names":[],"sources":["../plugin/nextjs/constants.ts","../plugin/nextjs/utils.ts"],"sourcesContent":["import { STYLE_IMPORTS } from '../utils/imports';\n\nexport const DEV_CSS_ROUTE = '/__fluentic/dev.css';\n\nexport const LOADER_IMPORT_PATH = STYLE_IMPORTS.Plugin + '/nextjs/loader';\n\nexport const CSS_ENTRY_IMPORT_PATH = STYLE_IMPORTS.Plugin + '/nextjs/bundle.css';\n","import { createHash } from 'node:crypto';\nimport fs from 'node:fs';\nimport { createRequire } from 'node:module';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport type { Compilation, Compiler, WebpackPluginInstance } from 'webpack';\nimport type { Compiler as PluginCompiler } from '../../compiler';\nimport type { ImportSource } from '../../compiler/utils/import_source';\nimport { normalizePath } from '../../compiler/utils/path';\nimport type { BuildConfig, BuildDevConfig } from '../../config/build';\nimport { getStyleFnMeta } from '../../style/style';\nimport { createWebpackRegistry } from '../bundler/webpack/shared/registry';\nimport type { FileCssCache } from '../utils/cache';\nimport type { PluginOptions as BasePluginOptions } from '../utils/compiler';\nimport type { TransformFilter } from '../utils/filter';\nimport { getPluginBuildConfig, getPluginBuildDevConfig } from '../utils/runtimeEntry';\nimport type { SourcemapSidecar } from '../utils/sidecar';\nimport { resolvePluginSourcemapOptions } from '../utils/sourcemap';\nimport { LOADER_IMPORT_PATH } from './constants';\nimport type { PluginOptions, WebpackConfiguration } from './types';\n\nexport const nextRegistry = createWebpackRegistry('nextjs.registry');\n\nexport const PRECOLLECT_CACHE_DIRS = {\n dev: 'nextjs/precollect/dev',\n prod: 'nextjs/precollect/prod',\n};\n\nexport const NEXT_COMPILER_IDS = {\n turbopack: 'nextjs:turbopack',\n webpackServer: 'nextjs:webpack-server',\n webpackClient: 'nextjs:webpack-client',\n};\n\nexport type { PluginCompiler };\n\nexport type NextLoaderState = {\n compiler: PluginCompiler;\n filter: TransformFilter;\n dev: boolean;\n isServer: boolean;\n configHash: string;\n devCssHref: string | null;\n cssEntryImportPath: string;\n cssCache: Pick<FileCssCache, 'setFileCss'> | null;\n};\n\nexport type NextWebpackEntryValue = string | string[] | {\n import?: string | string[];\n [key: string]: unknown;\n};\n\nexport function getTransformLoaderPath() {\n return createRequire(import.meta.url).resolve(LOADER_IMPORT_PATH);\n}\n\nexport function getNextCacheDir(rootDir: string, cacheDir?: string) {\n return cacheDir ?? path.join(rootDir, '.next/cache/fluentic-style');\n}\n\nexport function getNextPrecollectCacheSubdir(dev: boolean) {\n return dev ? PRECOLLECT_CACHE_DIRS.dev : PRECOLLECT_CACHE_DIRS.prod;\n}\n\nexport function createNextBuildConfig(options: PluginOptions): BuildConfig {\n return getPluginBuildConfig(options);\n}\n\nexport function createNextBuildDevConfig(options: PluginOptions): BuildDevConfig | null {\n return getPluginBuildDevConfig(options);\n}\n\nexport function createNextConfigHash(\n buildConfig: BuildConfig,\n dev: boolean,\n importSources?: readonly ImportSource[] | null,\n) {\n const values = [\n createPackageCacheIdentity(),\n dev ? 'dev' : 'prod',\n buildConfig.hoist ? 'hoist' : 'no-hoist',\n JSON.stringify(createSerializableImportSources(importSources)),\n ];\n\n return createHash('sha256').update(values.join('\\0')).digest('hex');\n}\n\nfunction createPackageCacheIdentity() {\n const require = createRequire(import.meta.url);\n let entryPath = '';\n\n try {\n entryPath = require.resolve('@fluentic/style/plugin/nextjs');\n } catch {\n entryPath = fileURLToPath(import.meta.url);\n }\n\n const packageInfo = findPackageInfo(entryPath);\n const parts = [\n packageInfo.version,\n normalizePath(packageInfo.packageRoot),\n normalizePath(entryPath),\n getStatIdentity(packageInfo.packageJsonPath),\n getStatIdentity(entryPath),\n ];\n\n return parts.join('\\0');\n}\n\nfunction findPackageInfo(entryPath: string) {\n let current = path.dirname(entryPath);\n\n while (true) {\n const packageJsonPath = path.join(current, 'package.json');\n\n try {\n const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')) as {\n name?: string;\n version?: string;\n };\n\n if (pkg.name === '@fluentic/style') {\n return {\n packageRoot: current,\n packageJsonPath,\n version: pkg.version ?? '',\n };\n }\n } catch {\n // Keep walking toward the filesystem root.\n }\n\n const parent = path.dirname(current);\n if (parent === current) break;\n current = parent;\n }\n\n return {\n packageRoot: path.dirname(entryPath),\n packageJsonPath: '',\n version: '',\n };\n}\n\nfunction getStatIdentity(filePath: string) {\n if (!filePath) return '';\n\n try {\n const stat = fs.statSync(filePath);\n return `${stat.size}:${stat.mtimeMs}`;\n } catch {\n return '';\n }\n}\n\nexport function createSerializableImportSources(\n importSources: readonly ImportSource[] | null | undefined,\n): ImportSource[] | undefined {\n if (!importSources?.length) return undefined;\n\n const result: ImportSource[] = [];\n\n for (const entry of importSources) {\n if (entry.check) continue;\n\n const source = serializeImportSourcePattern(entry.source);\n const name = entry.name;\n const meta = entry.meta ?? (entry.styleFn ? getStyleFnMeta(entry.styleFn) : null);\n\n if (!meta) continue;\n if (entry.source !== undefined && source === undefined) continue;\n\n result.push(removeUndefinedValues({\n source,\n name,\n meta,\n }));\n }\n\n return result.length ? result : undefined;\n}\n\nfunction serializeImportSourcePattern(\n source: ImportSource['source'],\n): string | string[] | undefined {\n if (source === undefined) return undefined;\n\n if (Array.isArray(source)) {\n const result: string[] = [];\n\n for (const item of source) {\n if (typeof item !== 'string') return undefined;\n result.push(item);\n }\n\n return result;\n }\n\n return typeof source === 'string' ? source : undefined;\n}\n\nexport function resolveNextCompilerOptions(\n options: PluginOptions,\n sidecar: SourcemapSidecar | null,\n buildConfig: BuildConfig,\n buildDevConfig: BuildDevConfig | null,\n dev: boolean,\n): BasePluginOptions {\n const resolved = resolvePluginSourcemapOptions({\n ...options,\n devSourcemap: dev ? 'sidecarServer' : 'sourceUrl',\n }, sidecar);\n\n return {\n ...resolved,\n css: {\n ...resolved.css,\n ...buildConfig.css,\n },\n dev: {\n ...resolved.dev,\n ...buildDevConfig,\n },\n };\n}\n\nexport function removeUndefinedValues<T>(value: T): T {\n if (Array.isArray(value)) {\n return value.map((item) => removeUndefinedValues(item)) as T;\n }\n\n if (!value || typeof value !== 'object') {\n return value;\n }\n\n const result: Record<string, unknown> = {};\n\n for (const [key, item] of Object.entries(value)) {\n if (item !== undefined) {\n result[key] = removeUndefinedValues(item);\n }\n }\n\n return result as T;\n}\n\nexport function prependClientEntry(entry: unknown, moduleId: string) {\n if (typeof entry === 'function') {\n return async () => prependClientEntry(await entry(), moduleId);\n }\n\n if (!entry || typeof entry !== 'object') return entry;\n\n const result: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(entry)) {\n result[key] = prependEntryValue(value as NextWebpackEntryValue, moduleId);\n }\n\n return result;\n}\n\nexport function prependEntryValue(entry: NextWebpackEntryValue, moduleId: string): NextWebpackEntryValue {\n if (typeof entry === 'string') {\n return entry === moduleId ? entry : [moduleId, entry];\n }\n\n if (Array.isArray(entry)) {\n return entry.includes(moduleId) ? entry : [moduleId, ...entry];\n }\n\n const imports = entry.import;\n if (!imports) return { ...entry, import: moduleId };\n\n return {\n ...entry,\n import: Array.isArray(imports)\n ? imports.includes(moduleId) ? imports : [moduleId, ...imports]\n : imports === moduleId\n ? imports\n : [moduleId, imports],\n };\n}\n\nexport function isAppLayoutFile(filePath: string) {\n return /\\/app\\/(?:[^/]+\\/)*layout\\.[cm]?[jt]sx?$/.test(normalizePath(filePath));\n}\n\nexport function hasCssMarker(source: string, marker: string) {\n return source.includes(marker);\n}\n\nexport function replaceCssMarker(source: string, marker: string, css: string) {\n return source.split(marker).join(css);\n}\n\nexport function addAliases(config: WebpackConfiguration, aliases: Record<string, string>) {\n if (!config.resolve) config.resolve = {};\n if (!config.resolve.alias) config.resolve.alias = {};\n Object.assign(config.resolve.alias, aliases);\n}\n\nexport function addWebpackPlugin(config: WebpackConfiguration, plugin: WebpackPluginInstance) {\n if (!config.plugins) config.plugins = [];\n config.plugins.push(plugin);\n}\n\nexport function replaceCssMarkerAsset(args: {\n compiler: Compiler;\n compilation: Compilation;\n css: string;\n marker: string;\n}) {\n for (const asset of args.compilation.getAssets()) {\n if (!asset.name.endsWith('.css')) continue;\n\n const source = asset.source.source().toString();\n if (!hasCssMarker(source, args.marker)) continue;\n\n args.compilation.updateAsset(\n asset.name,\n new args.compiler.webpack.sources.RawSource(\n replaceCssMarker(source, args.marker, args.css),\n ),\n );\n\n return true;\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;AAEA,MAAa,gBAAgB;AAE7B,MAAa,qBAAqB,cAAc,SAAS;AAEzD,MAAa,wBAAwB,cAAc,SAAS;;;ACe5D,MAAa,eAAe,sBAAsB,iBAAiB;AAEnE,MAAa,wBAAwB;CACnC,KAAK;CACL,MAAM;AACR;AAEA,MAAa,oBAAoB;CAC/B,WAAW;CACX,eAAe;CACf,eAAe;AACjB;AAoBA,SAAgB,yBAAyB;CACvC,OAAO,cAAc,OAAO,KAAK,GAAG,EAAE,QAAQ,kBAAkB;AAClE;AAEA,SAA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MACN,IAAI,KAAK,SAAS,QAAQ,QAAQ,UAChC,iBAAiB,QAAQ,KAAK,QAAQ,KAAK,GAAG,CAChD,CACF;EAEA,OAAO;CACT;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"utils-BBN9msTv.mjs","names":[],"sources":["../plugin/nextjs/constants.ts","../plugin/nextjs/utils.ts"],"sourcesContent":["import { STYLE_IMPORTS } from '../utils/imports';\n\nexport const DEV_CSS_ROUTE = '/__fluentic/dev.css';\n\nexport const LOADER_IMPORT_PATH = STYLE_IMPORTS.Plugin + '/nextjs/loader';\n\nexport const CSS_ENTRY_IMPORT_PATH = STYLE_IMPORTS.Plugin + '/nextjs/bundle.css';\n","import { createHash } from 'node:crypto';\nimport fs from 'node:fs';\nimport { createRequire } from 'node:module';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport type { Compilation, Compiler, WebpackPluginInstance } from 'webpack';\nimport type { Compiler as PluginCompiler } from '../../compiler';\nimport type { ImportSource } from '../../compiler/utils/import_source';\nimport { normalizePath } from '../../compiler/utils/path';\nimport type { BuildConfig, BuildDevConfig } from '../../config/build';\nimport { getStyleFnMeta } from '../../style/style';\nimport { createWebpackRegistry } from '../bundler/webpack/shared/registry';\nimport type { FileCssCache } from '../utils/cache';\nimport type { PluginOptions as BasePluginOptions } from '../utils/compiler';\nimport type { TransformFilter } from '../utils/filter';\nimport { getPluginBuildConfig, getPluginBuildDevConfig } from '../utils/runtimeEntry';\nimport type { SourcemapSidecar } from '../utils/sidecar';\nimport { resolvePluginSourcemapOptions } from '../utils/sourcemap';\nimport { LOADER_IMPORT_PATH } from './constants';\nimport type { PluginOptions, WebpackConfiguration } from './types';\n\nexport const nextRegistry = createWebpackRegistry('nextjs.registry');\n\nexport const PRECOLLECT_CACHE_DIRS = {\n dev: 'nextjs/precollect/dev',\n prod: 'nextjs/precollect/prod',\n};\n\nexport const NEXT_COMPILER_IDS = {\n turbopack: 'nextjs:turbopack',\n webpackServer: 'nextjs:webpack-server',\n webpackClient: 'nextjs:webpack-client',\n};\n\nexport type { PluginCompiler };\n\nexport type NextLoaderState = {\n compiler: PluginCompiler;\n filter: TransformFilter;\n dev: boolean;\n isServer: boolean;\n configHash: string;\n devCssHref: string | null;\n cssEntryImportPath: string;\n cssCache: Pick<FileCssCache, 'setFileCss'> | null;\n};\n\nexport type NextWebpackEntryValue = string | string[] | {\n import?: string | string[];\n [key: string]: unknown;\n};\n\nexport function getTransformLoaderPath() {\n return createRequire(import.meta.url).resolve(LOADER_IMPORT_PATH);\n}\n\nexport function getNextCacheDir(rootDir: string, cacheDir?: string) {\n return cacheDir ?? path.join(rootDir, '.next/cache/fluentic-style');\n}\n\nexport function getNextPrecollectCacheSubdir(dev: boolean) {\n return dev ? PRECOLLECT_CACHE_DIRS.dev : PRECOLLECT_CACHE_DIRS.prod;\n}\n\nexport function createNextBuildConfig(options: PluginOptions): BuildConfig {\n return getPluginBuildConfig(options);\n}\n\nexport function createNextBuildDevConfig(options: PluginOptions): BuildDevConfig | null {\n return getPluginBuildDevConfig(options);\n}\n\nexport function createNextConfigHash(\n buildConfig: BuildConfig,\n dev: boolean,\n importSources?: readonly ImportSource[] | null,\n) {\n const values = [\n createPackageCacheIdentity(),\n dev ? 'dev' : 'prod',\n buildConfig.hoist ? 'hoist' : 'no-hoist',\n JSON.stringify(createSerializableImportSources(importSources)),\n ];\n\n return createHash('sha256').update(values.join('\\0')).digest('hex');\n}\n\nfunction createPackageCacheIdentity() {\n const require = createRequire(import.meta.url);\n let entryPath = '';\n\n try {\n entryPath = require.resolve('@fluentic/style/plugin/nextjs');\n } catch {\n entryPath = fileURLToPath(import.meta.url);\n }\n\n const packageInfo = findPackageInfo(entryPath);\n const parts = [\n packageInfo.version,\n normalizePath(packageInfo.packageRoot),\n normalizePath(entryPath),\n getStatIdentity(packageInfo.packageJsonPath),\n getStatIdentity(entryPath),\n ];\n\n return parts.join('\\0');\n}\n\nfunction findPackageInfo(entryPath: string) {\n let current = path.dirname(entryPath);\n\n while (true) {\n const packageJsonPath = path.join(current, 'package.json');\n\n try {\n const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')) as {\n name?: string;\n version?: string;\n };\n\n if (pkg.name === '@fluentic/style') {\n return {\n packageRoot: current,\n packageJsonPath,\n version: pkg.version ?? '',\n };\n }\n } catch {\n // Keep walking toward the filesystem root.\n }\n\n const parent = path.dirname(current);\n if (parent === current) break;\n current = parent;\n }\n\n return {\n packageRoot: path.dirname(entryPath),\n packageJsonPath: '',\n version: '',\n };\n}\n\nfunction getStatIdentity(filePath: string) {\n if (!filePath) return '';\n\n try {\n const stat = fs.statSync(filePath);\n return `${stat.size}:${stat.mtimeMs}`;\n } catch {\n return '';\n }\n}\n\nexport function createSerializableImportSources(\n importSources: readonly ImportSource[] | null | undefined,\n): ImportSource[] | undefined {\n if (!importSources?.length) return undefined;\n\n const result: ImportSource[] = [];\n\n for (const entry of importSources) {\n if (entry.check) continue;\n\n const source = serializeImportSourcePattern(entry.source);\n const name = entry.name;\n const meta = entry.meta ?? (entry.styleFn ? getStyleFnMeta(entry.styleFn) : null);\n\n if (!meta) continue;\n if (entry.source !== undefined && source === undefined) continue;\n\n result.push(removeUndefinedValues({\n source,\n name,\n meta,\n }));\n }\n\n return result.length ? result : undefined;\n}\n\nfunction serializeImportSourcePattern(\n source: ImportSource['source'],\n): string | string[] | undefined {\n if (source === undefined) return undefined;\n\n if (Array.isArray(source)) {\n const result: string[] = [];\n\n for (const item of source) {\n if (typeof item !== 'string') return undefined;\n result.push(item);\n }\n\n return result;\n }\n\n return typeof source === 'string' ? source : undefined;\n}\n\nexport function resolveNextCompilerOptions(\n options: PluginOptions,\n sidecar: SourcemapSidecar | null,\n buildConfig: BuildConfig,\n buildDevConfig: BuildDevConfig | null,\n dev: boolean,\n): BasePluginOptions {\n const resolved = resolvePluginSourcemapOptions({\n ...options,\n devSourcemap: dev ? 'sidecarServer' : 'sourceUrl',\n }, sidecar);\n\n return {\n ...resolved,\n css: {\n ...resolved.css,\n ...buildConfig.css,\n },\n dev: {\n ...resolved.dev,\n ...buildDevConfig,\n },\n };\n}\n\nexport function removeUndefinedValues<T>(value: T): T {\n if (Array.isArray(value)) {\n return value.map((item) => removeUndefinedValues(item)) as T;\n }\n\n if (!value || typeof value !== 'object') {\n return value;\n }\n\n const result: Record<string, unknown> = {};\n\n for (const [key, item] of Object.entries(value)) {\n if (item !== undefined) {\n result[key] = removeUndefinedValues(item);\n }\n }\n\n return result as T;\n}\n\nexport function prependClientEntry(entry: unknown, moduleId: string) {\n if (typeof entry === 'function') {\n return async () => prependClientEntry(await entry(), moduleId);\n }\n\n if (!entry || typeof entry !== 'object') return entry;\n\n const result: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(entry)) {\n result[key] = prependEntryValue(value as NextWebpackEntryValue, moduleId);\n }\n\n return result;\n}\n\nexport function prependEntryValue(entry: NextWebpackEntryValue, moduleId: string): NextWebpackEntryValue {\n if (typeof entry === 'string') {\n return entry === moduleId ? entry : [moduleId, entry];\n }\n\n if (Array.isArray(entry)) {\n return entry.includes(moduleId) ? entry : [moduleId, ...entry];\n }\n\n const imports = entry.import;\n if (!imports) return { ...entry, import: moduleId };\n\n return {\n ...entry,\n import: Array.isArray(imports)\n ? imports.includes(moduleId) ? imports : [moduleId, ...imports]\n : imports === moduleId\n ? imports\n : [moduleId, imports],\n };\n}\n\nexport function isAppLayoutFile(filePath: string) {\n return /\\/app\\/(?:[^/]+\\/)*layout\\.[cm]?[jt]sx?$/.test(normalizePath(filePath));\n}\n\nexport function hasCssMarker(source: string, marker: string) {\n return source.includes(marker);\n}\n\nexport function replaceCssMarker(source: string, marker: string, css: string) {\n return source.split(marker).join(css);\n}\n\nexport function addAliases(config: WebpackConfiguration, aliases: Record<string, string>) {\n if (!config.resolve) config.resolve = {};\n if (!config.resolve.alias) config.resolve.alias = {};\n Object.assign(config.resolve.alias, aliases);\n}\n\nexport function addWebpackPlugin(config: WebpackConfiguration, plugin: WebpackPluginInstance) {\n if (!config.plugins) config.plugins = [];\n config.plugins.push(plugin);\n}\n\nexport function replaceCssMarkerAsset(args: {\n compiler: Compiler;\n compilation: Compilation;\n css: string;\n marker: string;\n}) {\n for (const asset of args.compilation.getAssets()) {\n if (!asset.name.endsWith('.css')) continue;\n\n const source = asset.source.source().toString();\n if (!hasCssMarker(source, args.marker)) continue;\n\n args.compilation.updateAsset(\n asset.name,\n new args.compiler.webpack.sources.RawSource(\n replaceCssMarker(source, args.marker, args.css),\n ),\n );\n\n return true;\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;AAEA,MAAa,gBAAgB;AAE7B,MAAa,qBAAqB,cAAc,SAAS;AAEzD,MAAa,wBAAwB,cAAc,SAAS;;;ACe5D,MAAa,eAAe,sBAAsB,iBAAiB;AAEnE,MAAa,wBAAwB;CACnC,KAAK;CACL,MAAM;AACR;AAEA,MAAa,oBAAoB;CAC/B,WAAW;CACX,eAAe;CACf,eAAe;AACjB;AAoBA,SAAgB,yBAAyB;CACvC,OAAO,cAAc,OAAO,KAAK,GAAG,EAAE,QAAQ,kBAAkB;AAClE;AAEA,SAAgB,gBAAgB,SAAiB,UAAmB;CAClE,OAAO,YAAY,KAAK,KAAK,SAAS,4BAA4B;AACpE;AAEA,SAAgB,6BAA6B,KAAc;CACzD,OAAO,MAAM,sBAAsB,MAAM,sBAAsB;AACjE;AAEA,SAAgB,sBAAsB,SAAqC;CACzE,OAAO,qBAAqB,OAAO;AACrC;AAEA,SAAgB,yBAAyB,SAA+C;CACtF,OAAO,wBAAwB,OAAO;AACxC;AAEA,SAAgB,qBACd,aACA,KACA,eACA;CACA,MAAM,SAAS;EACb,2BAA2B;EAC3B,MAAM,QAAQ;EACd,YAAY,QAAQ,UAAU;EAC9B,KAAK,UAAU,gCAAgC,aAAa,CAAC;CAC/D;CAEA,OAAO,WAAW,QAAQ,EAAE,OAAO,OAAO,KAAK,IAAI,CAAC,EAAE,OAAO,KAAK;AACpE;AAEA,SAAS,6BAA6B;CACpC,MAAM,UAAU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AM;AAC/B;AAEA,SAAgB,iBAAiB,QAAgB,QAAgB,KAAa;CAC5E,OAAO,OAAO,MAAM,MAAM,EAAE,KAAK,GAAG;AACtC;AAEA,SAAgB,WAAW,QAA8B,SAAiC;CACxF,IAAI,CAAC,OAAO,SAAS,OAAO,UAAU,CAAC;CACvC,IAAI,CAAC,OAAO,QAAQ,OAAO,OAAO,QAAQ,QAAQ,CAAC;CACnD,OAAO,OAAO,OAAO,QAAQ,OAAO,OAAO;AAC7C;AAEA,SAAgB,iBAAiB,QAA8B,QAA+B;CAC5F,IAAI,CAAC,OAAO,SAAS,OAAO,UAAU,CAAC;CACvC,OAAO,QAAQ,KAAK,MAAM;AAC5B;AAEA,SAAgB,sBAAsB,MAKnC;CACD,KAAK,MAAM,SAAS,KAAK,YAAY,UAAU,GAAG;EAChD,IAAI,CAAC,MAAM,KAAK,SAAS,MAAM,GAAG;EAElC,MAAM,SAAS,MAAM,OAAO,OAAO,EAAE,SAAS;EAC9C,IAAI,CAAC,aAAa,QAAQ,KAAK,MAAM,GAAG;EAExC,KAAK,YAAY,YACf,MAAM,MACN,IAAI,KAAK,SAAS,QAAQ,QAAQ,UAChC,iBAAiB,QAAQ,KAAK,QAAQ,KAAK,GAAG,CAChD,CACF;EAEA,OAAO;CACT;CAEA,OAAO;AACT"}
@@ -1,5 +1,5 @@
1
- import { s as normalizePath } from "./compiler-C3CEGGtI.mjs";
2
- import { n as STYLE_IMPORTS, t as createWebpackRegistry } from "./registry-w8ET5R7v.mjs";
1
+ import { s as normalizePath } from "./compiler-BEHxZYjz.mjs";
2
+ import { n as STYLE_IMPORTS, t as createWebpackRegistry } from "./registry-DVB7n6V-.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import path from "node:path";
5
5
  //#region plugin/bundler/webpack/utils.ts
@@ -46,4 +46,4 @@ function prependEntryImport(entryImport, runtimeFilePath) {
46
46
  //#endregion
47
47
  export { prependWebpackRuntimeEntry as a, hasWebpackCssMarker as i, getStylePackageDistPath as n, replaceWebpackCssMarker as o, getTransformLoaderPath as r, webpackRegistry as s, createWebpackRuntimeModuleSource as t };
48
48
 
49
- //# sourceMappingURL=utils-DND33M6y.mjs.map
49
+ //# sourceMappingURL=utils-Bjh9pO87.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils-DND33M6y.mjs","names":[],"sources":["../plugin/bundler/webpack/utils.ts"],"sourcesContent":["import { createRequire } from 'node:module';\nimport path from 'node:path';\nimport type { EntryNormalized } from 'webpack';\nimport { normalizePath } from '../../../compiler/utils/path';\nimport { SIDECAR_URL_GLOBAL_SYMBOL } from '../../../config/utils';\nimport type { PluginCompiler } from '../../utils';\nimport { STYLE_IMPORTS } from '../../utils/imports';\nimport { createWebpackRegistry } from './shared/registry';\n\ntype WebpackStaticEntry = Exclude<EntryNormalized, () => Promise<unknown>>;\ntype WebpackEntryDescription = WebpackStaticEntry[string];\n\nexport type WebpackLoaderState = {\n transform: PluginCompiler['transform'];\n};\n\nexport const webpackRegistry = createWebpackRegistry('webpack.registry');\n\nexport function getTransformLoaderPath() {\n return createRequire(import.meta.url).resolve(STYLE_IMPORTS.Plugin + '/webpack/loader');\n}\n\nexport function getStylePackageDistPath() {\n return path.resolve(path.dirname(getTransformLoaderPath()), '../..');\n}\n\nexport function createWebpackRuntimeModuleSource(\n extract: boolean,\n cssFilePath: string | null,\n options: {\n runtimeImportPath?: string | null;\n sidecarUrl?: string | null;\n } = {},\n) {\n return [\n extract && cssFilePath && `import ${JSON.stringify(normalizePath(cssFilePath))};`,\n options.sidecarUrl && options.runtimeImportPath && `import ${JSON.stringify(options.runtimeImportPath)};`,\n options.sidecarUrl &&\n `globalThis[Symbol.for(${JSON.stringify(SIDECAR_URL_GLOBAL_SYMBOL)})] = ${JSON.stringify(options.sidecarUrl)};`,\n '',\n ].filter(Boolean).join('\\n');\n}\n\nexport function replaceWebpackCssMarker(\n source: string,\n marker: string,\n css: string,\n) {\n return source.replace(marker, css);\n}\n\nexport function hasWebpackCssMarker(source: string, marker: string) {\n return source.includes(marker);\n}\n\nexport function prependWebpackRuntimeEntry(\n entry: EntryNormalized,\n runtimeFilePath: string,\n): EntryNormalized {\n if (typeof entry === 'function') {\n return async () => prependWebpackRuntimeStaticEntry(await entry(), runtimeFilePath);\n }\n\n return prependWebpackRuntimeStaticEntry(entry, runtimeFilePath);\n}\n\nfunction prependWebpackRuntimeStaticEntry(\n entry: WebpackStaticEntry,\n runtimeFilePath: string,\n): WebpackStaticEntry {\n const result: WebpackStaticEntry = {};\n\n for (const [key, value] of Object.entries(entry)) {\n result[key] = prependWebpackRuntimeEntryDescription(value, runtimeFilePath);\n }\n\n return result;\n}\n\nfunction prependWebpackRuntimeEntryDescription(\n entry: WebpackEntryDescription,\n runtimeFilePath: string,\n): WebpackEntryDescription {\n if (!entry.import) return entry;\n\n return {\n ...entry,\n import: prependEntryImport(entry.import, runtimeFilePath),\n };\n}\n\nfunction prependEntryImport(entryImport: string[], runtimeFilePath: string) {\n return entryImport.includes(runtimeFilePath)\n ? entryImport\n : [runtimeFilePath, ...entryImport];\n}\n"],"mappings":";;;;;AAgBA,MAAa,kBAAkB,sBAAsB,kBAAkB;AAEvE,SAAgB,yBAAyB;CACvC,OAAO,cAAc,OAAO,KAAK,GAAG,EAAE,QAAQ,cAAc,SAAS,iBAAiB;AACxF;AAEA,SAAgB,0BAA0B;CACxC,OAAO,KAAK,QAAQ,KAAK,QAAQ,uBAAuB,CAAC,GAAG,OAAO;AACrE;AAEA,SAAgB,iCACd,SACA,aACA,UAGI,CAAC,GACL;CACA,OAAO;EACL,WAAW,eAAe,UAAU,KAAK,UAAU,cAAc,WAAW,CAAC,EAAE;EAC/E,QAAQ,cAAc,QAAQ,qBAAqB,UAAU,KAAK,UAAU,QAAQ,iBAAiB,EAAE;EACvG,QAAQ,cACR,yBAAyB,KAAK,UAAA,4BAAmC,EAAE,OAAO,KAAK,UAAU,QAAQ,UAAU,EAAE;EAC7G;CACF,EAAE,OAAO,OAAO,EAAE,KAAK,IAAI;AAC7B;AAEA,SAAgB,wBACd,QACA,QACA,KACA;CACA,OAAO,OAAO,QAAQ,QAAQ,GAAG;AACnC;AAEA,SAAgB,oBAAoB,QAAgB,QAAgB;CAClE,OAAO,OAAO,SAAS,MAAM;AAC/B;AAEA,SAAgB,2BACd,OACA,iBACiB;CACjB,IAAI,OAAO,UAAU,YACnB,OAAO,YAAY,iCAAiC,MAAM,MAAM,GAAG,eAAe;CAGpF,OAAO,iCAAiC,OAAO,eAAe;AAChE;AAEA,SAAS,iCACP,OACA,iBACoB;CACpB,MAAM,SAA6B,CAAC;CAEpC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,KAAK,GAC7C,OAAO,OAAO,sCAAsC,OAAO,eAAe;CAG5E,OAAO;AACT;AAEA,SAAS,sCACP,OACA,iBACyB;CACzB,IAAI,CAAC,MAAM,QAAQ,OAAO;CAE1B,OAAO;EACL,GAAG;EACH,QAAQ,mBAAmB,MAAM,QAAQ,eAAe;CAC1D;AACF;AAEA,SAAS,mBAAmB,aAAuB,iBAAyB;CAC1E,OAAO,YAAY,SAAS,eAAe,IACvC,cACA,CAAC,iBAAiB,GAAG,WAAW;AACtC"}
1
+ {"version":3,"file":"utils-Bjh9pO87.mjs","names":[],"sources":["../plugin/bundler/webpack/utils.ts"],"sourcesContent":["import { createRequire } from 'node:module';\nimport path from 'node:path';\nimport type { EntryNormalized } from 'webpack';\nimport { normalizePath } from '../../../compiler/utils/path';\nimport { SIDECAR_URL_GLOBAL_SYMBOL } from '../../../config/utils';\nimport type { PluginCompiler } from '../../utils';\nimport { STYLE_IMPORTS } from '../../utils/imports';\nimport { createWebpackRegistry } from './shared/registry';\n\ntype WebpackStaticEntry = Exclude<EntryNormalized, () => Promise<unknown>>;\ntype WebpackEntryDescription = WebpackStaticEntry[string];\n\nexport type WebpackLoaderState = {\n transform: PluginCompiler['transform'];\n};\n\nexport const webpackRegistry = createWebpackRegistry('webpack.registry');\n\nexport function getTransformLoaderPath() {\n return createRequire(import.meta.url).resolve(STYLE_IMPORTS.Plugin + '/webpack/loader');\n}\n\nexport function getStylePackageDistPath() {\n return path.resolve(path.dirname(getTransformLoaderPath()), '../..');\n}\n\nexport function createWebpackRuntimeModuleSource(\n extract: boolean,\n cssFilePath: string | null,\n options: {\n runtimeImportPath?: string | null;\n sidecarUrl?: string | null;\n } = {},\n) {\n return [\n extract && cssFilePath && `import ${JSON.stringify(normalizePath(cssFilePath))};`,\n options.sidecarUrl && options.runtimeImportPath && `import ${JSON.stringify(options.runtimeImportPath)};`,\n options.sidecarUrl &&\n `globalThis[Symbol.for(${JSON.stringify(SIDECAR_URL_GLOBAL_SYMBOL)})] = ${JSON.stringify(options.sidecarUrl)};`,\n '',\n ].filter(Boolean).join('\\n');\n}\n\nexport function replaceWebpackCssMarker(\n source: string,\n marker: string,\n css: string,\n) {\n return source.replace(marker, css);\n}\n\nexport function hasWebpackCssMarker(source: string, marker: string) {\n return source.includes(marker);\n}\n\nexport function prependWebpackRuntimeEntry(\n entry: EntryNormalized,\n runtimeFilePath: string,\n): EntryNormalized {\n if (typeof entry === 'function') {\n return async () => prependWebpackRuntimeStaticEntry(await entry(), runtimeFilePath);\n }\n\n return prependWebpackRuntimeStaticEntry(entry, runtimeFilePath);\n}\n\nfunction prependWebpackRuntimeStaticEntry(\n entry: WebpackStaticEntry,\n runtimeFilePath: string,\n): WebpackStaticEntry {\n const result: WebpackStaticEntry = {};\n\n for (const [key, value] of Object.entries(entry)) {\n result[key] = prependWebpackRuntimeEntryDescription(value, runtimeFilePath);\n }\n\n return result;\n}\n\nfunction prependWebpackRuntimeEntryDescription(\n entry: WebpackEntryDescription,\n runtimeFilePath: string,\n): WebpackEntryDescription {\n if (!entry.import) return entry;\n\n return {\n ...entry,\n import: prependEntryImport(entry.import, runtimeFilePath),\n };\n}\n\nfunction prependEntryImport(entryImport: string[], runtimeFilePath: string) {\n return entryImport.includes(runtimeFilePath)\n ? entryImport\n : [runtimeFilePath, ...entryImport];\n}\n"],"mappings":";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AY,SAAS,eAAe,IACvC,cACA,CAAC,iBAAiB,GAAG,WAAW;AACtC"}
@@ -1,5 +1,5 @@
1
- import { t as getClassName } from "./getClassName-Dtc4yyYI.js";
2
- import { t as createTransformElement } from "./createTransformElement-D8fXZ3wA.js";
1
+ import { t as getClassName } from "./getClassName-BIqt1S41.js";
2
+ import { t as createTransformElement } from "./createTransformElement-B2jSnugo.js";
3
3
  //#region runtime/rsc/jsx.ts
4
4
  const transformElement = createTransformElement(getClassName);
5
5
  //#endregion
@@ -39,4 +39,4 @@ function createJsx(fn, transformElement) {
39
39
  //#endregion
40
40
  export { transformElement as a, wrapFragment as i, createJsxDEV as n, wrapCreateElement as r, createJsx as t };
41
41
 
42
- //# sourceMappingURL=utils-DZK0mfmY.js.map
42
+ //# sourceMappingURL=utils-DoKJnvxk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils-DZK0mfmY.js","names":[],"sources":["../runtime/rsc/jsx.ts","../jsx/utils.ts"],"sourcesContent":["import { createTransformElement } from '../core/createTransformElement';\nimport { getClassName } from './getClassName';\n\nexport const transformElement = createTransformElement(getClassName);\n","import type { createElement, ElementType, Fragment } from 'react';\nimport type { jsxDEV } from 'react/jsx-dev-runtime';\nimport type { jsx, jsxs } from 'react/jsx-runtime';\n\nexport type FnJsxDEV = typeof jsxDEV;\nexport type FnJsx = typeof jsx;\nexport type FnJsxs = typeof jsxs;\nexport type FnCreateElement = typeof createElement;\n\nexport type TransformElementArgs = {\n type: ElementType;\n props: unknown;\n source?: unknown;\n};\n\nexport type TransformElement = {\n (args: TransformElementArgs): TransformElementArgs;\n};\n\nexport function wrapCreateElement(\n createElement: FnCreateElement,\n transformElement: TransformElement,\n): FnCreateElement {\n const fn = (type: ElementType, props: unknown, ...children: []) => {\n const result = transformElement({ type, props });\n\n return createElement(result.type, result.props, ...children);\n };\n\n return fn as FnCreateElement;\n}\n\nexport function wrapFragment(\n fragment: typeof Fragment,\n) {\n return fragment;\n}\n\nexport function createJsxDEV(\n fn: FnJsxDEV,\n transformElement: TransformElement,\n): FnJsxDEV {\n return (type, props, key, isStatic, source, self) => {\n const result = transformElement({ type, props, source });\n\n return fn(result.type, result.props, key, isStatic, source, self);\n };\n}\n\nexport function createJsx(\n fn: FnJsx,\n transformElement: TransformElement,\n): FnJsx {\n return (type, props, key) => {\n const result = transformElement({ type, props });\n\n return fn(result.type, result.props, key);\n };\n}\n"],"mappings":";;;AAGA,MAAa,mBAAmB,uBAAuB,YAAY;;;ACgBnE,SAAgB,kBACd,eACA,kBACiB;CACjB,MAAM,MAAM,MAAmB,OAAgB,GAAG,aAAiB;EACjE,MAAM,SAAS,iBAAiB;GAAE;GAAM;EAAM,CAAC;EAE/C,OAAO,cAAc,OAAO,MAAM,OAAO,OAAO,GAAG,QAAQ;CAC7D;CAEA,OAAO;AACT;AAEA,SAAgB,aACd,UACA;CACA,OAAO;AACT;AAEA,SAAgB,aACd,IACA,kBACU;CACV,QAAQ,MAAM,OAAO,KAAK,UAAU,QAAQ,SAAS;EACnD,MAAM,SAAS,iBAAiB;GAAE;GAAM;GAAO;EAAO,CAAC;EAEvD,OAAO,GAAG,OAAO,MAAM,OAAO,OAAO,KAAK,UAAU,QAAQ,IAAI;CAClE;AACF;AAEA,SAAgB,UACd,IACA,kBACO;CACP,QAAQ,MAAM,OAAO,QAAQ;EAC3B,MAAM,SAAS,iBAAiB;GAAE;GAAM;EAAM,CAAC;EAE/C,OAAO,GAAG,OAAO,MAAM,OAAO,OAAO,GAAG;CAC1C;AACF"}
1
+ {"version":3,"file":"utils-DoKJnvxk.js","names":[],"sources":["../runtime/rsc/jsx.ts","../jsx/utils.ts"],"sourcesContent":["import { createTransformElement } from '../core/createTransformElement';\nimport { getClassName } from './getClassName';\n\nexport const transformElement = createTransformElement(getClassName);\n","import type { createElement, ElementType, Fragment } from 'react';\nimport type { jsxDEV } from 'react/jsx-dev-runtime';\nimport type { jsx, jsxs } from 'react/jsx-runtime';\n\nexport type FnJsxDEV = typeof jsxDEV;\nexport type FnJsx = typeof jsx;\nexport type FnJsxs = typeof jsxs;\nexport type FnCreateElement = typeof createElement;\n\nexport type TransformElementArgs = {\n type: ElementType;\n props: unknown;\n source?: unknown;\n};\n\nexport type TransformElement = {\n (args: TransformElementArgs): TransformElementArgs;\n};\n\nexport function wrapCreateElement(\n createElement: FnCreateElement,\n transformElement: TransformElement,\n): FnCreateElement {\n const fn = (type: ElementType, props: unknown, ...children: []) => {\n const result = transformElement({ type, props });\n\n return createElement(result.type, result.props, ...children);\n };\n\n return fn as FnCreateElement;\n}\n\nexport function wrapFragment(\n fragment: typeof Fragment,\n) {\n return fragment;\n}\n\nexport function createJsxDEV(\n fn: FnJsxDEV,\n transformElement: TransformElement,\n): FnJsxDEV {\n return (type, props, key, isStatic, source, self) => {\n const result = transformElement({ type, props, source });\n\n return fn(result.type, result.props, key, isStatic, source, self);\n };\n}\n\nexport function createJsx(\n fn: FnJsx,\n transformElement: TransformElement,\n): FnJsx {\n return (type, props, key) => {\n const result = transformElement({ type, props });\n\n return fn(result.type, result.props, key);\n };\n}\n"],"mappings":";;;AAGA,MAAa,mBAAmB,uBAAuB,YAAY;;;ACgBnE,SAAgB,kBACd,eACA,kBACiB;CACjB,MAAM,MAAM,MAAmB,OAAgB,GAAG,aAAiB;EACjE,MAAM,SAAS,iBAAiB;GAAE;GAAM;EAAM,CAAC;EAE/C,OAAO,cAAc,OAAO,MAAM,OAAO,OAAO,GAAG,QAAQ;CAC7D;CAEA,OAAO;AACT;AAEA,SAAgB,aACd,UACA;CACA,OAAO;AACT;AAEA,SAAgB,aACd,IACA,kBACU;CACV,QAAQ,MAAM,OAAO,KAAK,UAAU,QAAQ,SAAS;EACnD,MAAM,SAAS,iBAAiB;GAAE;GAAM;GAAO;EAAO,CAAC;EAEvD,OAAO,GAAG,OAAO,MAAM,OAAO,OAAO,KAAK,UAAU,QAAQ,IAAI;CAClE;AACF;AAEA,SAAgB,UACd,IACA,kBACO;CACP,QAAQ,MAAM,OAAO,QAAQ;EAC3B,MAAM,SAAS,iBAAiB;GAAE;GAAM;EAAM,CAAC;EAE/C,OAAO,GAAG,OAAO,MAAM,OAAO,OAAO,GAAG;CAC1C;AACF"}
package/dist/utils.js CHANGED
@@ -1,6 +1,6 @@
1
- import "./data-CDrS1Bq4.js";
2
- import { h as isSelectorData, v as isSlotData } from "./value-CK0-Xbov.js";
3
- import { h as isStyleTokenData } from "./token-D33mKTka.js";
1
+ import "./data-QXDBLlWs.js";
2
+ import { h as isSelectorData, v as isSlotData } from "./value-Dg6ALjjj.js";
3
+ import { h as isStyleTokenData } from "./token-DyLO6Hnf.js";
4
4
  //#region style/utils/expose.ts
5
5
  function exposeStyle(styles) {
6
6
  return exposeStyleObject(styles);
@@ -1,4 +1,4 @@
1
- import { l as symbol } from "./css-DWBWsyxZ.js";
1
+ import { d as symbol } from "./css-D7eTqvMH.js";
2
2
  //#region builder/data/const.ts
3
3
  const BUILDER_TYPE = symbol("builder.type");
4
4
  const BUILDER_STATE = symbol("builder.state");
@@ -157,4 +157,4 @@ function shouldAppendCssPx(property) {
157
157
  //#endregion
158
158
  export { SHEET_SELECTOR_ANCHOR as A, BUILDER_SCOPE as C, BUILDER_SLOT_ID as D, BUILDER_SHEET_OPTIONS as E, BUILDER_STATE as O, BUILDER_CALLSITE as S, BUILDER_SELECTOR as T, isSheetData as _, getSelectorText as a, isStyleData as b, getScopeClassName as c, getSelectorSelectors as d, getSlotId as f, isSelectorOverrideData as g, isSelectorData as h, getSelectorPriority as i, BUILDER_TYPE as k, getScopeTargetScope as l, isScopeTargetData as m, shouldAppendCssPx as n, getSheetSelectorWeight as o, isScopeData as p, getSelectorHash as r, hasSheetSelectorAnchor as s, getCssPropertyValue as t, getScopeTargetSlotId as u, isSlotData as v, BUILDER_SCOPE_ID as w, isThemeData as x, isSlotOverrideData as y };
159
159
 
160
- //# sourceMappingURL=value-CK0-Xbov.js.map
160
+ //# sourceMappingURL=value-Dg6ALjjj.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"value-CK0-Xbov.js","names":[],"sources":["../builder/data/const.ts","../builder/data/is.ts","../atomic/scope.ts","../atomic/utils/selector.ts","../atomic/value/unitless.ts","../atomic/value/value.ts"],"sourcesContent":["import { symbol } from '../../utils/symbol';\n\nexport const BUILDER_TYPE: unique symbol = symbol('builder.type');\nexport const BUILDER_STATE: unique symbol = symbol('builder.state');\nexport const BUILDER_CALLSITE: unique symbol = symbol('builder.callsite');\nexport const BUILDER_SLOT_ID: unique symbol = symbol('builder.slotId');\nexport const BUILDER_SCOPE_ID: unique symbol = symbol('builder.scopeId');\nexport const BUILDER_SCOPE: unique symbol = symbol('builder.scope');\nexport const BUILDER_SELECTOR: unique symbol = symbol('builder.selector');\nexport const BUILDER_SHEET_OPTIONS: unique symbol = symbol('builder.sheetOptions');\n\nexport const BUILDER_TYPE_STYLE = 1;\nexport const BUILDER_TYPE_SLOT = 2;\nexport const BUILDER_TYPE_SLOT_OVERRIDE = 3;\nexport const BUILDER_TYPE_SCOPE = 4;\nexport const BUILDER_TYPE_SCOPE_TARGET = 5;\nexport const BUILDER_TYPE_THEME = 6;\nexport const BUILDER_TYPE_SELECTOR = 7;\nexport const BUILDER_TYPE_SELECTOR_OVERRIDE = 8;\nexport const BUILDER_TYPE_SHEET = 9;\n\nexport const ITEM_RUNTIME_DEV = -1;\nexport const ITEM_RUNTIME_DEV_PLUGIN = -2;\nexport const ITEM_RUNTIME_PROD = -3;\nexport const ITEM_RUNTIME_PROD_PLUGIN = -4;\n\nexport const ITEM_VALUE_TYPE_VARIABLE = 1;\nexport const ITEM_VALUE_TYPE_STYLE_DATA = 2;\nexport const ITEM_VALUE_NUMBER_PX = 1;\nexport const ITEM_VALUE_TYPE_AT_RULE_REF = 3;\n\nexport const SHEET_SELECTOR_ANCHOR = '\\0sheet';\n","import type { StyleValue } from '../../style/types';\nimport {\n BUILDER_SCOPE,\n BUILDER_SCOPE_ID,\n BUILDER_SELECTOR,\n BUILDER_SLOT_ID,\n BUILDER_TYPE,\n BUILDER_TYPE_SCOPE,\n BUILDER_TYPE_SCOPE_TARGET,\n BUILDER_TYPE_SELECTOR,\n BUILDER_TYPE_SELECTOR_OVERRIDE,\n BUILDER_TYPE_SHEET,\n BUILDER_TYPE_SLOT,\n BUILDER_TYPE_SLOT_OVERRIDE,\n BUILDER_TYPE_STYLE,\n BUILDER_TYPE_THEME,\n} from './const';\nimport {\n type BuilderData,\n type ScopeData,\n type ScopeTargetData,\n type SelectorData,\n type SelectorOverrideData,\n type SheetData,\n type SlotData,\n type SlotOverrideData,\n type StyleData,\n type ThemeData,\n} from './data';\n\nexport function getSlotId(data: SlotData | SlotOverrideData) {\n return data[BUILDER_SLOT_ID];\n}\n\nexport function getScopeTargetSlotId(data: ScopeTargetData) {\n return data[BUILDER_SCOPE_ID];\n}\n\nexport function getScopeTargetScope(data: ScopeTargetData) {\n return data[BUILDER_SCOPE];\n}\n\nexport function getSelectorSelectors(data: SelectorData | SelectorOverrideData) {\n return data[BUILDER_SELECTOR];\n}\n\nexport function isStyleValue<T>(value: unknown): value is StyleValue<T> {\n return Array.isArray(value);\n}\n\nexport function isStyleData<Style>(value: unknown): value is StyleData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_STYLE;\n}\n\nexport function isSlotData<Style>(value: unknown): value is SlotData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_SLOT;\n}\n\nexport function isSlotOverrideData<Style>(value: unknown): value is SlotOverrideData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_SLOT_OVERRIDE;\n}\n\nexport function isSelectorData<Style>(value: unknown): value is SelectorData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_SELECTOR;\n}\n\nexport function isSelectorOverrideData<Style>(value: unknown): value is SelectorOverrideData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_SELECTOR_OVERRIDE;\n}\n\nexport function isSheetData<Style>(value: unknown): value is SheetData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_SHEET;\n}\n\nexport function isScopeData(value: unknown): value is ScopeData {\n return getBuilderType(value) === BUILDER_TYPE_SCOPE;\n}\n\nexport function isScopeTargetData(value: unknown): value is ScopeTargetData {\n return getBuilderType(value) === BUILDER_TYPE_SCOPE_TARGET;\n}\n\nexport function isThemeData(value: unknown): value is ThemeData {\n return getBuilderType(value) === BUILDER_TYPE_THEME;\n}\n\nfunction getBuilderType(value: unknown) {\n if (!value || (typeof value !== 'object' && typeof value !== 'function')) return null;\n\n return (value as BuilderData)[BUILDER_TYPE];\n}\n","import type { ScopeClassNameFormat, ScopeClassNameInfo } from '../config/types';\n\nexport const SCOPE_CLASS_NAME_FORMAT = '-(className)';\n\nexport function getScopeClassName(\n className: string,\n scopeClassNameFormat: ScopeClassNameFormat | null,\n) {\n return formatScopeClassName(scopeClassNameFormat || SCOPE_CLASS_NAME_FORMAT, { className });\n}\n\nfunction formatScopeClassName(\n format: ScopeClassNameFormat,\n info: ScopeClassNameInfo,\n) {\n if (typeof format === 'function') return format(info);\n\n return format.replace(/\\[|\\]/g, '').replace(/\\(className\\)/g, info.className);\n}\n","import { SHEET_SELECTOR_ANCHOR } from '../../builder/data/const';\nimport type { ItemSelector } from '../../builder/data/state';\n\nexport function getSelectorText(selector: ItemSelector): string {\n const text = Array.isArray(selector) ? selector[0] : selector;\n return stripSheetSelectorAnchor(text);\n}\n\nexport function getSelectorHash(selector: ItemSelector): string {\n return Array.isArray(selector) ? selector.join('|') : selector;\n}\n\nexport function getSelectorPriority(selector: ItemSelector | null): number {\n if (!selector) return 0;\n return Array.isArray(selector) ? selector[1] : 0;\n}\n\nexport function hasSheetSelectorAnchor(selector: ItemSelector | null): boolean {\n const text = selector ? Array.isArray(selector) ? selector[0] : selector : '';\n return text.startsWith(SHEET_SELECTOR_ANCHOR);\n}\n\nexport function getSheetSelectorWeight(selector: ItemSelector | null): number | null {\n const text = selector ? Array.isArray(selector) ? selector[0] : selector : '';\n if (!text.startsWith(SHEET_SELECTOR_ANCHOR + ':')) return null;\n\n const end = text.indexOf('\\0', SHEET_SELECTOR_ANCHOR.length);\n if (end < 0) return null;\n\n const [weightValue] = text.slice(SHEET_SELECTOR_ANCHOR.length + 1, end).split(':');\n const weight = Number(weightValue);\n return Number.isInteger(weight) && weight > 0 ? weight : null;\n}\n\nfunction stripSheetSelectorAnchor(selector: string) {\n if (!selector.startsWith(SHEET_SELECTOR_ANCHOR)) return selector;\n\n if (selector.startsWith(SHEET_SELECTOR_ANCHOR + ':')) {\n const end = selector.indexOf('\\0', SHEET_SELECTOR_ANCHOR.length);\n if (end >= 0) return selector.slice(end + 1);\n }\n\n return selector.slice(SHEET_SELECTOR_ANCHOR.length);\n}\n","export const UnitlessProperties = [\n 'animationIterationCount',\n 'aspectRatio',\n 'borderImageOutset',\n 'borderImageSlice',\n 'borderImageWidth',\n 'boxFlex',\n 'boxFlexGroup',\n 'boxOrdinalGroup',\n 'columnCount',\n 'columns',\n 'fillOpacity',\n 'flex',\n 'flexGrow',\n 'flexNegative',\n 'flexOrder',\n 'flexPositive',\n 'flexShrink',\n 'floodOpacity',\n 'fontWeight',\n 'gridArea',\n 'gridColumn',\n 'gridColumnEnd',\n 'gridColumnSpan',\n 'gridColumnStart',\n 'gridRow',\n 'gridRowEnd',\n 'gridRowSpan',\n 'gridRowStart',\n 'imageOrientation',\n 'lineClamp',\n 'lineHeight',\n 'opacity',\n 'order',\n 'orphans',\n 'scale',\n 'stopOpacity',\n 'strokeDasharray',\n 'strokeDashoffset',\n 'strokeMiterlimit',\n 'strokeOpacity',\n 'strokeWidth',\n 'tabSize',\n 'widows',\n 'zIndex',\n 'zoom',\n];\n","import { UnitlessProperties } from './unitless';\n\nconst CSS_NUMBER_VALUE = /^-?(\\d+\\.?\\d*|\\.\\d+)$/;\n\nconst UNITLESS = new Set(UnitlessProperties);\n\nexport function getCssPropertyValue(property: string, value: string): string {\n if (!value || !shouldAppendCssPx(property)) return value;\n\n if (CSS_NUMBER_VALUE.test(value)) return value + 'px';\n\n return value;\n}\n\nexport function shouldAppendCssPx(property: string): boolean {\n return !UN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CAA4B;EAC/D,IAAI,OAAO,GAAG,OAAO,SAAS,MAAM,MAAM,CAAC;CAC7C;CAEA,OAAO,SAAS,MAAM,CAA4B;AACpD;;;AC3CA,MAAa,qBAAqB;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;AC5CA,MAAM,mBAAmB;AAEzB,MAAM,WAAW,IAAI,IAAI,kBAAkB;AAE3C,SAAgB,oBAAoB,UAAkB,OAAuB;CAC3E,IAAI,CAAC,SAAS,CAAC,kBAAkB,QAAQ,GAAG,OAAO;CAEnD,IAAI,iBAAiB,KAAK,KAAK,GAAG,OAAO,QAAQ;CAEjD,OAAO;AACT;AAEA,SAAgB,kBAAkB,UAA2B;CAC3D,OAAO,CAAC,SAAS,IAAI,QAAQ;AAC/B"}
1
+ {"version":3,"file":"value-Dg6ALjjj.js","names":[],"sources":["../builder/data/const.ts","../builder/data/is.ts","../atomic/scope.ts","../atomic/utils/selector.ts","../atomic/value/unitless.ts","../atomic/value/value.ts"],"sourcesContent":["import { symbol } from '../../utils/symbol';\n\nexport const BUILDER_TYPE: unique symbol = symbol('builder.type');\nexport const BUILDER_STATE: unique symbol = symbol('builder.state');\nexport const BUILDER_CALLSITE: unique symbol = symbol('builder.callsite');\nexport const BUILDER_SLOT_ID: unique symbol = symbol('builder.slotId');\nexport const BUILDER_SCOPE_ID: unique symbol = symbol('builder.scopeId');\nexport const BUILDER_SCOPE: unique symbol = symbol('builder.scope');\nexport const BUILDER_SELECTOR: unique symbol = symbol('builder.selector');\nexport const BUILDER_SHEET_OPTIONS: unique symbol = symbol('builder.sheetOptions');\n\nexport const BUILDER_TYPE_STYLE = 1;\nexport const BUILDER_TYPE_SLOT = 2;\nexport const BUILDER_TYPE_SLOT_OVERRIDE = 3;\nexport const BUILDER_TYPE_SCOPE = 4;\nexport const BUILDER_TYPE_SCOPE_TARGET = 5;\nexport const BUILDER_TYPE_THEME = 6;\nexport const BUILDER_TYPE_SELECTOR = 7;\nexport const BUILDER_TYPE_SELECTOR_OVERRIDE = 8;\nexport const BUILDER_TYPE_SHEET = 9;\n\nexport const ITEM_RUNTIME_DEV = -1;\nexport const ITEM_RUNTIME_DEV_PLUGIN = -2;\nexport const ITEM_RUNTIME_PROD = -3;\nexport const ITEM_RUNTIME_PROD_PLUGIN = -4;\n\nexport const ITEM_VALUE_TYPE_VARIABLE = 1;\nexport const ITEM_VALUE_TYPE_STYLE_DATA = 2;\nexport const ITEM_VALUE_NUMBER_PX = 1;\nexport const ITEM_VALUE_TYPE_AT_RULE_REF = 3;\n\nexport const SHEET_SELECTOR_ANCHOR = '\\0sheet';\n","import type { StyleValue } from '../../style/types';\nimport {\n BUILDER_SCOPE,\n BUILDER_SCOPE_ID,\n BUILDER_SELECTOR,\n BUILDER_SLOT_ID,\n BUILDER_TYPE,\n BUILDER_TYPE_SCOPE,\n BUILDER_TYPE_SCOPE_TARGET,\n BUILDER_TYPE_SELECTOR,\n BUILDER_TYPE_SELECTOR_OVERRIDE,\n BUILDER_TYPE_SHEET,\n BUILDER_TYPE_SLOT,\n BUILDER_TYPE_SLOT_OVERRIDE,\n BUILDER_TYPE_STYLE,\n BUILDER_TYPE_THEME,\n} from './const';\nimport {\n type BuilderData,\n type ScopeData,\n type ScopeTargetData,\n type SelectorData,\n type SelectorOverrideData,\n type SheetData,\n type SlotData,\n type SlotOverrideData,\n type StyleData,\n type ThemeData,\n} from './data';\n\nexport function getSlotId(data: SlotData | SlotOverrideData) {\n return data[BUILDER_SLOT_ID];\n}\n\nexport function getScopeTargetSlotId(data: ScopeTargetData) {\n return data[BUILDER_SCOPE_ID];\n}\n\nexport function getScopeTargetScope(data: ScopeTargetData) {\n return data[BUILDER_SCOPE];\n}\n\nexport function getSelectorSelectors(data: SelectorData | SelectorOverrideData) {\n return data[BUILDER_SELECTOR];\n}\n\nexport function isStyleValue<T>(value: unknown): value is StyleValue<T> {\n return Array.isArray(value);\n}\n\nexport function isStyleData<Style>(value: unknown): value is StyleData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_STYLE;\n}\n\nexport function isSlotData<Style>(value: unknown): value is SlotData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_SLOT;\n}\n\nexport function isSlotOverrideData<Style>(value: unknown): value is SlotOverrideData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_SLOT_OVERRIDE;\n}\n\nexport function isSelectorData<Style>(value: unknown): value is SelectorData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_SELECTOR;\n}\n\nexport function isSelectorOverrideData<Style>(value: unknown): value is SelectorOverrideData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_SELECTOR_OVERRIDE;\n}\n\nexport function isSheetData<Style>(value: unknown): value is SheetData<Style> {\n return getBuilderType(value) === BUILDER_TYPE_SHEET;\n}\n\nexport function isScopeData(value: unknown): value is ScopeData {\n return getBuilderType(value) === BUILDER_TYPE_SCOPE;\n}\n\nexport function isScopeTargetData(value: unknown): value is ScopeTargetData {\n return getBuilderType(value) === BUILDER_TYPE_SCOPE_TARGET;\n}\n\nexport function isThemeData(value: unknown): value is ThemeData {\n return getBuilderType(value) === BUILDER_TYPE_THEME;\n}\n\nfunction getBuilderType(value: unknown) {\n if (!value || (typeof value !== 'object' && typeof value !== 'function')) return null;\n\n return (value as BuilderData)[BUILDER_TYPE];\n}\n","import type { ScopeClassNameFormat, ScopeClassNameInfo } from '../config/types';\n\nexport const SCOPE_CLASS_NAME_FORMAT = '-(className)';\n\nexport function getScopeClassName(\n className: string,\n scopeClassNameFormat: ScopeClassNameFormat | null,\n) {\n return formatScopeClassName(scopeClassNameFormat || SCOPE_CLASS_NAME_FORMAT, { className });\n}\n\nfunction formatScopeClassName(\n format: ScopeClassNameFormat,\n info: ScopeClassNameInfo,\n) {\n if (typeof format === 'function') return format(info);\n\n return format.replace(/\\[|\\]/g, '').replace(/\\(className\\)/g, info.className);\n}\n","import { SHEET_SELECTOR_ANCHOR } from '../../builder/data/const';\nimport type { ItemSelector } from '../../builder/data/state';\n\nexport function getSelectorText(selector: ItemSelector): string {\n const text = Array.isArray(selector) ? selector[0] : selector;\n return stripSheetSelectorAnchor(text);\n}\n\nexport function getSelectorHash(selector: ItemSelector): string {\n return Array.isArray(selector) ? selector.join('|') : selector;\n}\n\nexport function getSelectorPriority(selector: ItemSelector | null): number {\n if (!selector) return 0;\n return Array.isArray(selector) ? selector[1] : 0;\n}\n\nexport function hasSheetSelectorAnchor(selector: ItemSelector | null): boolean {\n const text = selector ? Array.isArray(selector) ? selector[0] : selector : '';\n return text.startsWith(SHEET_SELECTOR_ANCHOR);\n}\n\nexport function getSheetSelectorWeight(selector: ItemSelector | null): number | null {\n const text = selector ? Array.isArray(selector) ? selector[0] : selector : '';\n if (!text.startsWith(SHEET_SELECTOR_ANCHOR + ':')) return null;\n\n const end = text.indexOf('\\0', SHEET_SELECTOR_ANCHOR.length);\n if (end < 0) return null;\n\n const [weightValue] = text.slice(SHEET_SELECTOR_ANCHOR.length + 1, end).split(':');\n const weight = Number(weightValue);\n return Number.isInteger(weight) && weight > 0 ? weight : null;\n}\n\nfunction stripSheetSelectorAnchor(selector: string) {\n if (!selector.startsWith(SHEET_SELECTOR_ANCHOR)) return selector;\n\n if (selector.startsWith(SHEET_SELECTOR_ANCHOR + ':')) {\n const end = selector.indexOf('\\0', SHEET_SELECTOR_ANCHOR.length);\n if (end >= 0) return selector.slice(end + 1);\n }\n\n return selector.slice(SHEET_SELECTOR_ANCHOR.length);\n}\n","export const UnitlessProperties = [\n 'animationIterationCount',\n 'aspectRatio',\n 'borderImageOutset',\n 'borderImageSlice',\n 'borderImageWidth',\n 'boxFlex',\n 'boxFlexGroup',\n 'boxOrdinalGroup',\n 'columnCount',\n 'columns',\n 'fillOpacity',\n 'flex',\n 'flexGrow',\n 'flexNegative',\n 'flexOrder',\n 'flexPositive',\n 'flexShrink',\n 'floodOpacity',\n 'fontWeight',\n 'gridArea',\n 'gridColumn',\n 'gridColumnEnd',\n 'gridColumnSpan',\n 'gridColumnStart',\n 'gridRow',\n 'gridRowEnd',\n 'gridRowSpan',\n 'gridRowStart',\n 'imageOrientation',\n 'lineClamp',\n 'lineHeight',\n 'opacity',\n 'order',\n 'orphans',\n 'scale',\n 'stopOpacity',\n 'strokeDasharray',\n 'strokeDashoffset',\n 'strokeMiterlimit',\n 'strokeOpacity',\n 'strokeWidth',\n 'tabSize',\n 'widows',\n 'zIndex',\n 'zoom',\n];\n","import { UnitlessProperties } from './unitless';\n\nconst CSS_NUMBER_VALUE = /^-?(\\d+\\.?\\d*|\\.\\d+)$/;\n\nconst UNITLESS = new Set(UnitlessProperties);\n\nexport function getCssPropertyValue(property: string, value: string): string {\n if (!value || !shouldAppendCssPx(property)) return value;\n\n if (CSS_NUMBER_VALUE.test(value)) return value + 'px';\n\n return value;\n}\n\nexport function shouldAppendCssPx(property: string): boolean {\n return !UNITLESS.has(property);\n}\n"],"mappings":";;AAEA,MAAa,eAA8B,OAAO,cAAc;AAChE,MAAa,gBAA+B,OAAO,eAAe;AAClE,MAAa,mBAAkC,OAAO,kBAAkB;AACxE,MAAa,kBAAiC,OAAO,gBAAgB;AACrE,MAAa,mBAAkC,OAAO,iBAAiB;AACvE,MAAa,gBAA+B,OAAO,eAAe;AAClE,MAAa,mBAAkC,OAAO,kBAAkB;AACxE,MAAa,wBAAuC,OAAO,sBAAsB;AAsBjF,MAAa,wBAAwB;;;ACDrC,SAAgB,UAAU,MAAmC;CAC3D,OAAO,KAAK;AACd;AAEA,SAAgB,qBAAqB,MAAuB;CAC1D,OAAO,KAAK;AACd;AAEA,SAAgB,oBAAoB,MAAuB;CACzD,OAAO,KAAK;AACd;AAEA,SAAgB,qBAAqB,MAA2C;CAC9E,OAAO,KAAK;AACd;AAMA,SAAgB,YAAmB,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OAAO,QAAQ;CAEjD,OAAO;AACT;AAEA,SAAgB,kBAAkB,UAA2B;CAC3D,OAAO,CAAC,SAAS,IAAI,QAAQ;AAC/B"}
@@ -1,7 +1,7 @@
1
- import { r as getStyleRuntimeImportPath } from "./compiler-C3CEGGtI.mjs";
2
- import { C as createPluginCompiler, D as DEFAULT_TRANSFORM_INCLUDE, E as DEFAULT_TRANSFORM_EXCLUDE, I as writePluginCacheFile, M as EXTRACTED_CSS_MARKER, P as PLUGIN_NAME, S as createCompilerId, T as invalidateFiles, _ as getStyleRuntimeMode, d as resolvePluginSourcemapFilePath, g as getStyleEntryDefines, h as getPluginBuildDevConfig, j as BUNDLE_CSS_FILE, m as getPluginBuildConfig, t as formatError, u as resolveDevSourcemapMode, w as getPluginCacheDir, y as transformCssOutput } from "./misc-B76PUnWe.mjs";
3
- import { t as getSourcemapSidecar } from "./sidecar-BhvmXYsD.mjs";
4
- import { a as prependWebpackRuntimeEntry, i as hasWebpackCssMarker, n as getStylePackageDistPath, o as replaceWebpackCssMarker, r as getTransformLoaderPath, s as webpackRegistry, t as createWebpackRuntimeModuleSource } from "./utils-DND33M6y.mjs";
1
+ import { r as getStyleRuntimeImportPath } from "./compiler-BEHxZYjz.mjs";
2
+ import { C as createPluginCompiler, D as DEFAULT_TRANSFORM_INCLUDE, E as DEFAULT_TRANSFORM_EXCLUDE, I as writePluginCacheFile, M as EXTRACTED_CSS_MARKER, P as PLUGIN_NAME, S as createCompilerId, T as invalidateFiles, _ as getStyleRuntimeMode, d as resolvePluginSourcemapFilePath, g as getStyleEntryDefines, h as getPluginBuildDevConfig, j as BUNDLE_CSS_FILE, m as getPluginBuildConfig, t as formatError, u as resolveDevSourcemapMode, w as getPluginCacheDir, y as transformCssOutput } from "./misc-9EGKYkZo.mjs";
3
+ import { t as getSourcemapSidecar } from "./sidecar-DiYLwXbk.mjs";
4
+ import { a as prependWebpackRuntimeEntry, i as hasWebpackCssMarker, n as getStylePackageDistPath, o as replaceWebpackCssMarker, r as getTransformLoaderPath, s as webpackRegistry, t as createWebpackRuntimeModuleSource } from "./utils-Bjh9pO87.mjs";
5
5
  //#region plugin/bundler/webpack/plugin.ts
6
6
  const WEBPACK_RUNTIME_FILE = "webpack-runtime.js";
7
7
  function plugin(options = {}) {
@@ -104,4 +104,4 @@ function isRspackCompiler(compiler) {
104
104
  //#endregion
105
105
  export { plugin as t };
106
106
 
107
- //# sourceMappingURL=webpack-D7QO0bKN.mjs.map
107
+ //# sourceMappingURL=webpack-C1j49Psk.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-D7QO0bKN.mjs","names":[],"sources":["../plugin/bundler/webpack/plugin.ts"],"sourcesContent":["import type { Compiler, RuleSetRule, WebpackPluginInstance } from 'webpack';\nimport { getStyleRuntimeImportPath } from '../../../compiler/utils/imports';\nimport {\n BUNDLE_CSS_FILE,\n createCompilerId,\n createPluginCompiler,\n DEFAULT_TRANSFORM_EXCLUDE,\n DEFAULT_TRANSFORM_INCLUDE,\n EXTRACTED_CSS_MARKER,\n getPluginCacheDir,\n invalidateFiles,\n PLUGIN_NAME,\n type PluginOptions,\n resolvePluginSourcemapFilePath,\n transformCssOutput,\n writePluginCacheFile,\n} from '../../utils';\nimport { formatError } from '../../utils/misc';\nimport {\n getPluginBuildConfig,\n getPluginBuildDevConfig,\n getStyleEntryDefines,\n getStyleRuntimeMode,\n} from '../../utils/runtimeEntry';\nimport { getSourcemapSidecar } from '../../utils/sidecar';\nimport { resolveDevSourcemapMode } from '../../utils/sourcemap';\nimport {\n createWebpackRuntimeModuleSource,\n getStylePackageDistPath,\n getTransformLoaderPath,\n hasWebpackCssMarker,\n prependWebpackRuntimeEntry,\n replaceWebpackCssMarker,\n type WebpackLoaderState,\n webpackRegistry,\n} from './utils';\n\nexport { CssPropPresets } from '../../utils';\nexport type { CompilerCssPropOptions, PluginOptions } from '../../utils';\n\nconst WEBPACK_RUNTIME_FILE = 'webpack-runtime.js';\n\nexport default plugin;\n\nexport function plugin(options: PluginOptions = {}) {\n return new WebpackPlugin(options);\n}\n\nclass WebpackPlugin implements WebpackPluginInstance {\n private readonly options: PluginOptions;\n\n constructor(options: PluginOptions = {}) {\n this.options = options;\n }\n\n apply(compiler: Compiler) {\n const dev = compiler.options.mode === 'development';\n const extract = !dev;\n\n const buildConfig = getPluginBuildConfig(this.options);\n const buildDevConfig = getPluginBuildDevConfig(this.options);\n const cacheDir = getPluginCacheDir(compiler.context, this.options.cacheDir);\n const devSourcemap = resolveDevSourcemapMode(this.options.devSourcemap, dev);\n\n const sourcemapSidecar = devSourcemap === 'sidecarServer'\n ? getSourcemapSidecar({ projectDir: compiler.context, cacheDir })\n : null;\n\n const getSourcemapFilePath = resolvePluginSourcemapFilePath(\n this.options.getSourcemapFilePath,\n sourcemapSidecar,\n );\n\n const runtimeMode = getStyleRuntimeMode(dev);\n const useRuntimeSidecarUrl = isRspackCompiler(compiler) && devSourcemap === 'sidecarServer';\n\n const createRuntimeSource = (sidecarUrl: string | null = null) =>\n createWebpackRuntimeModuleSource(\n extract,\n cssFilePath,\n useRuntimeSidecarUrl\n ? {\n runtimeImportPath: getStyleRuntimeImportPath(runtimeMode),\n sidecarUrl,\n }\n : undefined,\n );\n\n const state = createPluginCompiler({\n projectDir: compiler.context,\n cacheDir,\n dev,\n options: { ...this.options, devSourcemap, getSourcemapFilePath },\n runtimeMode,\n });\n\n const cssFilePath = extract\n ? writePluginCacheFile(state, BUNDLE_CSS_FILE, EXTRACTED_CSS_MARKER)\n : null;\n\n const runtimeFilePath = writePluginCacheFile(\n state,\n WEBPACK_RUNTIME_FILE,\n createRuntimeSource(),\n );\n\n const compilerId = createCompilerId('webpack');\n\n webpackRegistry.setEntry<WebpackLoaderState>(compilerId, {\n transform: state.transform,\n });\n\n compiler.options.entry = prependWebpackRuntimeEntry(\n compiler.options.entry,\n runtimeFilePath,\n );\n\n addTransformLoader(compiler, this.options, compilerId);\n\n const entryDefines = getStyleEntryDefines(buildConfig, buildDevConfig, null);\n\n compiler.options.plugins ??= [];\n compiler.options.plugins.push(\n new compiler.webpack.DefinePlugin(entryDefines),\n );\n\n compiler.hooks.beforeRun.tapPromise(PLUGIN_NAME, async () => {\n await sourcemapSidecar?.ensureStarted();\n\n Object.assign(\n entryDefines,\n getStyleEntryDefines(\n buildConfig,\n buildDevConfig,\n sourcemapSidecar?.getBaseUrl() || null,\n ),\n );\n writePluginCacheFile(\n state,\n WEBPACK_RUNTIME_FILE,\n createRuntimeSource(sourcemapSidecar?.getBaseUrl() || null),\n );\n });\n\n compiler.hooks.watchRun.tapPromise(PLUGIN_NAME, async (watchCompiler) => {\n await sourcemapSidecar?.ensureStarted();\n Object.assign(\n entryDefines,\n getStyleEntryDefines(\n buildConfig,\n buildDevConfig,\n sourcemapSidecar?.getBaseUrl() || null,\n ),\n );\n writePluginCacheFile(\n state,\n WEBPACK_RUNTIME_FILE,\n createRuntimeSource(sourcemapSidecar?.getBaseUrl() || null),\n );\n\n const files = watchCompiler.modifiedFiles;\n if (!files || !files.size) return;\n\n invalidateFiles(state.compiler, files);\n state.filter.clear();\n });\n\n compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {\n if (dev) return;\n\n compilation.hooks.processAssets.tapPromise(\n {\n name: PLUGIN_NAME,\n stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,\n },\n async () => {\n const css = await transformCssOutput(\n state.compiler.getExtractedCss(),\n this.options.cssOutput,\n BUNDLE_CSS_FILE,\n );\n if (!css) return;\n\n for (const asset of compilation.getAssets()) {\n if (!asset.name.endsWith('.css')) continue;\n\n const source = asset.source.source().toString();\n if (!hasWebpackCssMarker(source, EXTRACTED_CSS_MARKER)) continue;\n\n compilation.updateAsset(\n asset.name,\n new compiler.webpack.sources.RawSource(\n replaceWebpackCssMarker(source, EXTRACTED_CSS_MARKER, css),\n ),\n );\n\n return;\n }\n\n compilation.warnings.push(\n new Error(formatError(\n 'No CSS asset containing the Fluentic marker was emitted by Webpack, so extracted CSS could not be attached. ' +\n 'Make sure your Webpack config handles CSS imports so Webpack owns the output filename, hashing, and runtime loading.',\n )),\n );\n },\n );\n });\n }\n}\n\nfunction addTransformLoader(\n compiler: Compiler,\n options: PluginOptions,\n compilerId: string,\n) {\n const loader = {\n loader: getTransformLoaderPath(),\n options: { ...options, compilerId },\n };\n\n const rule: RuleSetRule = {\n use: [loader],\n enforce: 'pre',\n test: DEFAULT_TRANSFORM_INCLUDE,\n exclude: options.include ? undefined : [\n DEFAULT_TRANSFORM_EXCLUDE,\n getStylePackageDistPath(),\n ],\n };\n\n compiler.options.module.rules.unshift(rule);\n}\n\nfunction isRspackCompiler(compiler: Compiler) {\n const webpack = compiler.webpack as typeof compiler.webpack & {\n rspackVersion?: unknown;\n };\n\n return typeof webpack.rspackVersion === 'string';\n}\n"],"mappings":";;;;;AAwCA,MAAM,uBAAuB;AAI7B,SAAgB,OAAO,UAAyB,CAAC,GAAG;CAClD,OAAO,IAAI,cAAc,OAAO;AAClC;AAEA,IAAM,gBAAN,MAAqD;CAGnD,YAAY,UAAyB,CAAC,GAAG;EACvC,KAAK,UAAU;CACjB;CAEA,MAAM,UAAoB;EACxB,MAAM,MAAM,SAAS,QAAQ,SAAS;EACtC,MAAM,UAAU,CAAC;EAEjB,MAAM,cAAc,qBAAqB,KAAK,OAAO;EACrD,MAAM,iBAAiB,wBAAwB,KAAK,OAAO;EAC3D,MAAM,WAAW,kBAAkB,SAAS,SAAS,KAAK,QAAQ,QAAQ;EAC1E,MAAM,eAAe,wBAAwB,KAAK,QAAQ,cAAc,GAAG;EAE3E,MAAM,mBAAmB,iBAAiB,kBACtC,oBAAoB;GAAE,YAAY,SAAS;GAAS;EAAS,CAAC,IAC9D;EAEJ,MAAM,uBAAuB,+BAC3B,KAAK,QAAQ,sBACb,gBACF;EAEA,MAAM,cAAc,oBAAoB,GAAG;EAC3C,MAAM,uBAAuB,iBAAiB,QAAQ,KAAK,iBAAiB;EAE5E,MAAM,uBAAuB,aAA4B,SACvD,iCACE,SACA,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,cAAc,gBAAgB;GAC/D,IAAI,KAAK;GAET,YAAY,MAAM,cAAc,WAC9B;IACE,MAAM;IACN,OAAO,SAAS,QAAQ,YAAY;GACtC,GACA,YAAY;IACV,MAAM,MAAM,MAAM,mBAChB,MAAM,SAAS,gBAAgB,GAC/B,KAAK,QAAQ,WACb,eACF;IACA,IAAI,CAAC,KAAK;IAEV,KAAK,MAAM,SAAS,YAAY,UAAU,GAAG;KAC3C,IAAI,CAAC,MAAM,KAAK,SAAS,MAAM,GAAG;KAElC,MAAM,SAAS,MAAM,OAAO,OAAO,EAAE,SAAS;KAC9C,IAAI,CAAC,oBAAoB,QAAA,oDAA4B,GAAG;KAExD,YAAY,YACV,MAAM,MACN,IAAI,SAAS,QAAQ,QAAQ,UAC3B,wBAAwB,QAAQ,sBAAsB,GAAG,CAC3D,CACF;KAEA;IACF;IAEA,YAAY,SAAS,KACnB,IAAI,MAAM,YACR,kOAEF,CAAC,CACH;GACF,CACF;EACF,CAAC;CACH;AACF;AAEA,SAAS,mBACP,UACA,SACA,YACA;CAMA,MAAM,OAAoB;EACxB,KAAK,CAAC;GALN,QAAQ,uBAAuB;GAC/B,SAAS;IAAE,GAAG;IAAS;GAAW;EAIvB,CAAC;EACZ,SAAS;EACT,MAAM;EACN,SAAS,QAAQ,UAAU,KAAA,IAAY,CACrC,2BACA,wBAAwB,CAC1B;CACF;CAEA,SAAS,QAAQ,OAAO,MAAM,QAAQ,IAAI;AAC5C;AAEA,SAAS,iBAAiB,UAAoB;CAK5C,OAAO,OAJS,SAAS,QAIH,kBAAkB;AAC1C"}
1
+ {"version":3,"file":"webpack-C1j49Psk.mjs","names":[],"sources":["../plugin/bundler/webpack/plugin.ts"],"sourcesContent":["import type { Compiler, RuleSetRule, WebpackPluginInstance } from 'webpack';\nimport { getStyleRuntimeImportPath } from '../../../compiler/utils/imports';\nimport {\n BUNDLE_CSS_FILE,\n createCompilerId,\n createPluginCompiler,\n DEFAULT_TRANSFORM_EXCLUDE,\n DEFAULT_TRANSFORM_INCLUDE,\n EXTRACTED_CSS_MARKER,\n getPluginCacheDir,\n invalidateFiles,\n PLUGIN_NAME,\n type PluginOptions,\n resolvePluginSourcemapFilePath,\n transformCssOutput,\n writePluginCacheFile,\n} from '../../utils';\nimport { formatError } from '../../utils/misc';\nimport {\n getPluginBuildConfig,\n getPluginBuildDevConfig,\n getStyleEntryDefines,\n getStyleRuntimeMode,\n} from '../../utils/runtimeEntry';\nimport { getSourcemapSidecar } from '../../utils/sidecar';\nimport { resolveDevSourcemapMode } from '../../utils/sourcemap';\nimport {\n createWebpackRuntimeModuleSource,\n getStylePackageDistPath,\n getTransformLoaderPath,\n hasWebpackCssMarker,\n prependWebpackRuntimeEntry,\n replaceWebpackCssMarker,\n type WebpackLoaderState,\n webpackRegistry,\n} from './utils';\n\nexport { CssPropPresets } from '../../utils';\nexport type { CompilerCssPropOptions, PluginOptions } from '../../utils';\n\nconst WEBPACK_RUNTIME_FILE = 'webpack-runtime.js';\n\nexport default plugin;\n\nexport function plugin(options: PluginOptions = {}) {\n return new WebpackPlugin(options);\n}\n\nclass WebpackPlugin implements WebpackPluginInstance {\n private readonly options: PluginOptions;\n\n constructor(options: PluginOptions = {}) {\n this.options = options;\n }\n\n apply(compiler: Compiler) {\n const dev = compiler.options.mode === 'development';\n const extract = !dev;\n\n const buildConfig = getPluginBuildConfig(this.options);\n const buildDevConfig = getPluginBuildDevConfig(this.options);\n const cacheDir = getPluginCacheDir(compiler.context, this.options.cacheDir);\n const devSourcemap = resolveDevSourcemapMode(this.options.devSourcemap, dev);\n\n const sourcemapSidecar = devSourcemap === 'sidecarServer'\n ? getSourcemapSidecar({ projectDir: compiler.context, cacheDir })\n : null;\n\n const getSourcemapFilePath = resolvePluginSourcemapFilePath(\n this.options.getSourcemapFilePath,\n sourcemapSidecar,\n );\n\n const runtimeMode = getStyleRuntimeMode(dev);\n const useRuntimeSidecarUrl = isRspackCompiler(compiler) && devSourcemap === 'sidecarServer';\n\n const createRuntimeSource = (sidecarUrl: string | null = null) =>\n createWebpackRuntimeModuleSource(\n extract,\n cssFilePath,\n useRuntimeSidecarUrl\n ? {\n runtimeImportPath: getStyleRuntimeImportPath(runtimeMode),\n sidecarUrl,\n }\n : undefined,\n );\n\n const state = createPluginCompiler({\n projectDir: compiler.context,\n cacheDir,\n dev,\n options: { ...this.options, devSourcemap, getSourcemapFilePath },\n runtimeMode,\n });\n\n const cssFilePath = extract\n ? writePluginCacheFile(state, BUNDLE_CSS_FILE, EXTRACTED_CSS_MARKER)\n : null;\n\n const runtimeFilePath = writePluginCacheFile(\n state,\n WEBPACK_RUNTIME_FILE,\n createRuntimeSource(),\n );\n\n const compilerId = createCompilerId('webpack');\n\n webpackRegistry.setEntry<WebpackLoaderState>(compilerId, {\n transform: state.transform,\n });\n\n compiler.options.entry = prependWebpackRuntimeEntry(\n compiler.options.entry,\n runtimeFilePath,\n );\n\n addTransformLoader(compiler, this.options, compilerId);\n\n const entryDefines = getStyleEntryDefines(buildConfig, buildDevConfig, null);\n\n compiler.options.plugins ??= [];\n compiler.options.plugins.push(\n new compiler.webpack.DefinePlugin(entryDefines),\n );\n\n compiler.hooks.beforeRun.tapPromise(PLUGIN_NAME, async () => {\n await sourcemapSidecar?.ensureStarted();\n\n Object.assign(\n entryDefines,\n getStyleEntryDefines(\n buildConfig,\n buildDevConfig,\n sourcemapSidecar?.getBaseUrl() || null,\n ),\n );\n writePluginCacheFile(\n state,\n WEBPACK_RUNTIME_FILE,\n createRuntimeSource(sourcemapSidecar?.getBaseUrl() || null),\n );\n });\n\n compiler.hooks.watchRun.tapPromise(PLUGIN_NAME, async (watchCompiler) => {\n await sourcemapSidecar?.ensureStarted();\n Object.assign(\n entryDefines,\n getStyleEntryDefines(\n buildConfig,\n buildDevConfig,\n sourcemapSidecar?.getBaseUrl() || null,\n ),\n );\n writePluginCacheFile(\n state,\n WEBPACK_RUNTIME_FILE,\n createRuntimeSource(sourcemapSidecar?.getBaseUrl() || null),\n );\n\n const files = watchCompiler.modifiedFiles;\n if (!files || !files.size) return;\n\n invalidateFiles(state.compiler, files);\n state.filter.clear();\n });\n\n compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {\n if (dev) return;\n\n compilation.hooks.processAssets.tapPromise(\n {\n name: PLUGIN_NAME,\n stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,\n },\n async () => {\n const css = await transformCssOutput(\n state.compiler.getExtractedCss(),\n this.options.cssOutput,\n BUNDLE_CSS_FILE,\n );\n if (!css) return;\n\n for (const asset of compilation.getAssets()) {\n if (!asset.name.endsWith('.css')) continue;\n\n const source = asset.source.source().toString();\n if (!hasWebpackCssMarker(source, EXTRACTED_CSS_MARKER)) continue;\n\n compilation.updateAsset(\n asset.name,\n new compiler.webpack.sources.RawSource(\n replaceWebpackCssMarker(source, EXTRACTED_CSS_MARKER, css),\n ),\n );\n\n return;\n }\n\n compilation.warnings.push(\n new Error(formatError(\n 'No CSS asset containing the Fluentic marker was emitted by Webpack, so extracted CSS could not be attached. ' +\n 'Make sure your Webpack config handles CSS imports so Webpack owns the output filename, hashing, and runtime loading.',\n )),\n );\n },\n );\n });\n }\n}\n\nfunction addTransformLoader(\n compiler: Compiler,\n options: PluginOptions,\n compilerId: string,\n) {\n const loader = {\n loader: getTransformLoaderPath(),\n options: { ...options, compilerId },\n };\n\n const rule: RuleSetRule = {\n use: [loader],\n enforce: 'pre',\n test: DEFAULT_TRANSFORM_INCLUDE,\n exclude: options.include ? undefined : [\n DEFAULT_TRANSFORM_EXCLUDE,\n getStylePackageDistPath(),\n ],\n };\n\n compiler.options.module.rules.unshift(rule);\n}\n\nfunction isRspackCompiler(compiler: Compiler) {\n const webpack = compiler.webpack as typeof compiler.webpack & {\n rspackVersion?: unknown;\n };\n\n return typeof webpack.rspackVersion === 'string';\n}\n"],"mappings":";;;;;AAwCA,MAAM,uBAAuB;AAI7B,SAAgB,OAAO,UAAyB,CAAC,GAAG;CAClD,OAAO,IAAI,cAAc,OAAO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ACF;EACF,CAAC;CACH;AACF;AAEA,SAAS,mBACP,UACA,SACA,YACA;CAMA,MAAM,OAAoB;EACxB,KAAK,CAAC;GALN,QAAQ,uBAAuB;GAC/B,SAAS;IAAE,GAAG;IAAS;GAAW;EAIvB,CAAC;EACZ,SAAS;EACT,MAAM;EACN,SAAS,QAAQ,UAAU,KAAA,IAAY,CACrC,2BACA,wBAAwB,CAC1B;CACF;CAEA,SAAS,QAAQ,OAAO,MAAM,QAAQ,IAAI;AAC5C;AAEA,SAAS,iBAAiB,UAAoB;CAK5C,OAAO,OAJS,SAAS,QAIH,kBAAkB;AAC1C"}
@@ -1,32 +1,15 @@
1
- declare module 'solid-js/types/jsx' {
2
- namespace JSX {
3
- interface RuntimeAttributes {
4
- css?: import('../../runtime/types').StyleProp;
5
- }
6
-
7
- interface HTMLAttributes<_T> extends RuntimeAttributes {}
8
- interface SVGAttributes<_T> extends RuntimeAttributes {}
9
- }
10
- }
1
+ import 'solid-js/jsx-runtime';
2
+ import type { StyleProp } from '../../runtime/types';
11
3
 
12
4
  declare module 'solid-js/jsx-runtime' {
13
5
  namespace JSX {
14
- interface RuntimeAttributes {
15
- css?: import('../../runtime/types').StyleProp;
6
+ // oxlint-disable-next-line no-unused-vars
7
+ interface HTMLAttributes<T> {
8
+ css?: StyleProp;
16
9
  }
17
-
18
- interface HTMLAttributes<_T> extends RuntimeAttributes {}
19
- interface SVGAttributes<_T> extends RuntimeAttributes {}
20
- }
21
- }
22
-
23
- declare module 'solid-js' {
24
- namespace JSX {
25
- interface RuntimeAttributes {
26
- css?: import('../../runtime/types').StyleProp;
10
+ // oxlint-disable-next-line no-unused-vars
11
+ interface CoreSVGAttributes<T> {
12
+ css?: StyleProp;
27
13
  }
28
-
29
- interface HTMLAttributes<_T> extends RuntimeAttributes {}
30
- interface SVGAttributes<_T> extends RuntimeAttributes {}
31
14
  }
32
15
  }