@fluentic/style 0.1.0-beta.2 → 0.1.0-beta.20

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 (888) hide show
  1. package/CHANGELOG.md +228 -16
  2. package/README.md +182 -49
  3. package/atomic/className.ts +33 -12
  4. package/atomic/debug/className/className.ts +10 -15
  5. package/atomic/element.ts +2 -2
  6. package/atomic/layer/layer.ts +7 -3
  7. package/atomic/rule.ts +20 -6
  8. package/atomic/scope.ts +19 -0
  9. package/atomic/theme.ts +41 -2
  10. package/atomic/token.ts +13 -3
  11. package/atomic/utils/{css.ts → cssIdent.ts} +0 -20
  12. package/atomic/utils/cssVar.ts +19 -0
  13. package/atomic/utils/debug.ts +1 -1
  14. package/atomic/utils/hash.ts +1 -65
  15. package/atomic/utils/selector.ts +40 -1
  16. package/atomic/utils/types.ts +4 -2
  17. package/builder/classname/class_name_builder.ts +68 -24
  18. package/builder/classname/fns.ts +2 -2
  19. package/builder/classname/types.ts +7 -0
  20. package/builder/data/const.ts +10 -1
  21. package/builder/data/create.ts +46 -0
  22. package/builder/data/data.ts +26 -1
  23. package/builder/data/index.ts +0 -1
  24. package/builder/data/is.ts +23 -0
  25. package/builder/data/merge/scope.ts +27 -19
  26. package/builder/data/merge/style.ts +115 -46
  27. package/builder/data/state.ts +17 -2
  28. package/builder/extract/index.ts +1 -0
  29. package/builder/extract/sheet.ts +30 -0
  30. package/builder/extract/token.ts +40 -14
  31. package/builder/extract/utils.ts +2 -0
  32. package/builder/extract/withTokens.ts +2 -1
  33. package/builder/selector_override.noop.ts +11 -0
  34. package/builder/selector_override.ts +31 -0
  35. package/builder/selector_override_core.ts +99 -0
  36. package/builder/style_builder.ts +127 -3
  37. package/builder/style_data.ts +25 -0
  38. package/builder/style_fns.ts +24 -24
  39. package/builder/token/data.ts +30 -0
  40. package/builder/token/index.ts +3 -0
  41. package/builder/token/name.ts +54 -0
  42. package/builder/token/symbols.ts +6 -0
  43. package/builder/types/alias.ts +34 -6
  44. package/builder/types/fns.ts +13 -5
  45. package/builder/types/types.ts +32 -2
  46. package/builder/utils.ts +1 -0
  47. package/compiler/compiler/cache_identity.ts +115 -0
  48. package/compiler/compiler/compiler.ts +123 -18
  49. package/compiler/compiler/constants.ts +6 -0
  50. package/compiler/compiler/index.ts +1 -0
  51. package/compiler/compiler/persistent_cache.ts +310 -0
  52. package/compiler/compiler/types.ts +16 -1
  53. package/compiler/cssProp.ts +21 -0
  54. package/compiler/extract/collector.ts +2 -2
  55. package/compiler/extract/extract.ts +24 -45
  56. package/compiler/extract/types.ts +6 -0
  57. package/compiler/index.ts +1 -0
  58. package/compiler/transform/cssProp/index.ts +1 -0
  59. package/compiler/transform/cssProp/plugin.ts +161 -0
  60. package/compiler/transform/debug/plugin.ts +107 -1
  61. package/compiler/transform/debug/transform.ts +2 -1
  62. package/compiler/transform/evaluator/evaluator.ts +223 -38
  63. package/compiler/transform/evaluator/lazy_bindings.ts +63 -0
  64. package/compiler/transform/evaluator/metadata_cache.ts +124 -0
  65. package/compiler/transform/evaluator/tracer.ts +151 -89
  66. package/compiler/transform/extract/chain/chain.ts +794 -84
  67. package/compiler/transform/extract/chain/extract_chain.ts +28 -4
  68. package/compiler/transform/extract/chain/types.ts +3 -1
  69. package/compiler/transform/extract/plugin.ts +159 -42
  70. package/compiler/transform/extract/transform.ts +2 -1
  71. package/compiler/transform/extract/utils/imports.ts +8 -1
  72. package/compiler/transform/extract/utils/replacement.ts +92 -5
  73. package/compiler/transform/extract/utils/state.ts +8 -2
  74. package/compiler/transform/extract/utils/theme.ts +6 -6
  75. package/compiler/transform/extract/utils/token.ts +107 -0
  76. package/compiler/transform/index.ts +1 -0
  77. package/compiler/transform/syntax/isStaticStyleValue.ts +15 -9
  78. package/compiler/transform/syntax/static_ids.ts +1 -1
  79. package/compiler/transform/utils/babel.ts +1 -1
  80. package/compiler/utils/check_diagnostics.ts +18 -0
  81. package/compiler/utils/constants.ts +10 -5
  82. package/compiler/utils/file_resolver.ts +27 -1
  83. package/compiler/utils/import_source.ts +17 -7
  84. package/compiler/utils/imports.ts +11 -1
  85. package/config/build.ts +9 -2
  86. package/config/config/check.ts +25 -0
  87. package/config/config/css.ts +36 -1
  88. package/config/config/debug.ts +24 -1
  89. package/config/config/dev.ts +8 -0
  90. package/config/configure.ts +23 -2
  91. package/config/document.ts +23 -0
  92. package/css/globalSheet.ts +66 -0
  93. package/css/index.ts +5 -0
  94. package/css/sheet.ts +173 -0
  95. package/css/styleTarget.ts +251 -0
  96. package/dev/config.ts +2 -3
  97. package/dev/utils.ts +3 -3
  98. package/dialect/namedTokens.ts +30 -8
  99. package/dist/adapter/preact.js +2 -0
  100. package/dist/adapter/react.js +2 -0
  101. package/dist/adapter/solid.js +2 -0
  102. package/dist/className-CC5PHcXI.js +311 -0
  103. package/dist/className-CC5PHcXI.js.map +1 -0
  104. package/dist/{style-DUztHzBz.js → combine-CtR6MyD4.js} +402 -733
  105. package/dist/combine-CtR6MyD4.js.map +1 -0
  106. package/dist/compiler/index.mjs +2 -2
  107. package/dist/{compiler-BXcGyZUP.mjs → compiler-oXXProzz.mjs} +3092 -850
  108. package/dist/compiler-oXXProzz.mjs.map +1 -0
  109. package/dist/config/index.js +2 -2
  110. package/dist/config-BK7oK4Hx.js +57 -0
  111. package/dist/config-BK7oK4Hx.js.map +1 -0
  112. package/dist/config-BWFlaJ_v.js +6 -0
  113. package/dist/config-BWFlaJ_v.js.map +1 -0
  114. package/dist/config-BsF-QRgz.js +6 -0
  115. package/dist/{config-DcYrUB-M.js.map → config-BsF-QRgz.js.map} +1 -1
  116. package/dist/{config-C1k9vUrM.js → config-DKaGtG9O.js} +9 -7
  117. package/dist/config-DKaGtG9O.js.map +1 -0
  118. package/dist/config-IFmsTOQp.js +1 -0
  119. package/dist/css-B-7-Do-J.js +4541 -0
  120. package/dist/css-B-7-Do-J.js.map +1 -0
  121. package/dist/{css-CohHH2tn.js → css-BmIytNon.js} +185 -14
  122. package/dist/css-BmIytNon.js.map +1 -0
  123. package/dist/css-CYnQKnPu.js +563 -0
  124. package/dist/css-CYnQKnPu.js.map +1 -0
  125. package/dist/css.js +2 -2
  126. package/dist/{css_extra-DQdCrYoC.js → css_extra-Br7eDCrf.js} +2 -2
  127. package/dist/{css_extra-9BZ_jVET.js.map → css_extra-Br7eDCrf.js.map} +1 -1
  128. package/dist/{css_extra-9BZ_jVET.js → css_extra-qzi_eFFf.js} +2 -2
  129. package/dist/{css_extra-DQdCrYoC.js.map → css_extra-qzi_eFFf.js.map} +1 -1
  130. package/dist/data-D6dD67li.js +786 -0
  131. package/dist/data-D6dD67li.js.map +1 -0
  132. package/dist/debug-Bo43rBKc.js +73 -0
  133. package/dist/debug-Bo43rBKc.js.map +1 -0
  134. package/dist/dev/rsc.js +138 -28
  135. package/dist/dev/rsc.js.map +1 -1
  136. package/dist/{dev-C2u78xuv.js → dev-_DW5n4U4.js} +9 -10
  137. package/dist/dev-_DW5n4U4.js.map +1 -0
  138. package/dist/dev.js +1 -1
  139. package/dist/dialect/extracted/index.js +1 -1
  140. package/dist/dialect/index.js +1 -1
  141. package/dist/{elementMarker-BKzZyg5V.js → elementMarker-u0d2LH8r.js} +582 -61
  142. package/dist/elementMarker-u0d2LH8r.js.map +1 -0
  143. package/dist/entry/dev/adapter/preact.js +12 -0
  144. package/dist/entry/dev/adapter/preact.js.map +1 -0
  145. package/dist/entry/dev/adapter/react.js +12 -0
  146. package/dist/entry/dev/adapter/react.js.map +1 -0
  147. package/dist/entry/dev/adapter/solid.js +12 -0
  148. package/dist/entry/dev/adapter/solid.js.map +1 -0
  149. package/dist/entry/dev/css.js +3 -3
  150. package/dist/entry/dev/jsx-dev-runtime.js +2 -2
  151. package/dist/entry/dev/jsx-runtime.js +2 -2
  152. package/dist/entry/dev.js +13 -12
  153. package/dist/entry/prod/adapter/preact.js +12 -0
  154. package/dist/entry/prod/adapter/preact.js.map +1 -0
  155. package/dist/entry/prod/adapter/react.js +12 -0
  156. package/dist/entry/prod/adapter/react.js.map +1 -0
  157. package/dist/entry/prod/adapter/solid.js +12 -0
  158. package/dist/entry/prod/adapter/solid.js.map +1 -0
  159. package/dist/entry/prod/css.js +3 -3
  160. package/dist/entry/prod/extract.js +251 -3
  161. package/dist/entry/prod/extract.js.map +1 -0
  162. package/dist/entry/prod/jsx-dev-runtime.js +2 -2
  163. package/dist/entry/prod/jsx-runtime.js +2 -2
  164. package/dist/entry/prod/runtime.js +3 -4
  165. package/dist/entry/prod.js +84 -1201
  166. package/dist/entry/prod.js.map +1 -1
  167. package/dist/entry/rsc-dev/adapter/preact.js +13 -0
  168. package/dist/entry/rsc-dev/adapter/preact.js.map +1 -0
  169. package/dist/entry/rsc-dev/adapter/react.js +13 -0
  170. package/dist/entry/rsc-dev/adapter/react.js.map +1 -0
  171. package/dist/entry/rsc-dev/adapter/solid.js +13 -0
  172. package/dist/entry/rsc-dev/adapter/solid.js.map +1 -0
  173. package/dist/entry/rsc-dev/css.js +4 -3
  174. package/dist/entry/rsc-dev/dev.js +135 -32
  175. package/dist/entry/rsc-dev/dev.js.map +1 -1
  176. package/dist/entry/rsc-dev/jsx-dev-runtime.js +5 -4
  177. package/dist/entry/rsc-dev/jsx-dev-runtime.js.map +1 -1
  178. package/dist/entry/rsc-dev/jsx-runtime.js +2 -2
  179. package/dist/entry/rsc-dev.js +298 -616
  180. package/dist/entry/rsc-dev.js.map +1 -1
  181. package/dist/entry/rsc-prod/adapter/preact.js +2 -0
  182. package/dist/entry/rsc-prod/adapter/react.js +2 -0
  183. package/dist/entry/rsc-prod/adapter/solid.js +2 -0
  184. package/dist/entry/rsc-prod/css.js +9 -3
  185. package/dist/entry/rsc-prod/css.js.map +1 -0
  186. package/dist/entry/rsc-prod/jsx-dev-runtime.js +2 -2
  187. package/dist/entry/rsc-prod/jsx-runtime.js +2 -2
  188. package/dist/entry/rsc-prod/runtime.js +3 -4
  189. package/dist/entry/rsc-prod.js +251 -10
  190. package/dist/entry/rsc-prod.js.map +1 -0
  191. package/dist/{rules-Dz7Pu2K6.js → env-C8lKN1dB.js} +727 -147
  192. package/dist/env-C8lKN1dB.js.map +1 -0
  193. package/dist/{getClassName-C6690_nr.js → getClassName-BraU01Hd.js} +60 -15
  194. package/dist/getClassName-BraU01Hd.js.map +1 -0
  195. package/dist/getClassName-C35yO40s.js +548 -0
  196. package/dist/getClassName-C35yO40s.js.map +1 -0
  197. package/dist/getClassName-CfkGcBZy.js +49 -0
  198. package/dist/getClassName-CfkGcBZy.js.map +1 -0
  199. package/dist/{utils-D4YWF2K0.js → getClassName-i4oy2Up_.js} +27 -65
  200. package/dist/getClassName-i4oy2Up_.js.map +1 -0
  201. package/dist/{global-zaCE-g1C.js → global-DGcWZODV.js} +7 -8
  202. package/dist/global-DGcWZODV.js.map +1 -0
  203. package/dist/globalSheet-2ozCV1Zm.js +1091 -0
  204. package/dist/globalSheet-2ozCV1Zm.js.map +1 -0
  205. package/dist/hash-CGO13tOn.js +407 -0
  206. package/dist/hash-CGO13tOn.js.map +1 -0
  207. package/dist/index.js +10 -10
  208. package/dist/jsx/jsx-dev-runtime.js +2 -2
  209. package/dist/jsx/jsx-dev-runtime.server.js +3 -3
  210. package/dist/jsx/jsx-dev-runtime.server.js.map +1 -1
  211. package/dist/jsx/jsx-runtime.js +2 -2
  212. package/dist/jsx/jsx-runtime.server.js +4 -4
  213. package/dist/jsx/jsx-runtime.server.js.map +1 -1
  214. package/dist/jsx-C-v1b99-.js +39 -0
  215. package/dist/jsx-C-v1b99-.js.map +1 -0
  216. package/dist/{jsx_dev_runtime-DXlSD6kV.js → jsx_dev_runtime-Bd7FO7C1.js} +2 -3
  217. package/dist/{jsx_dev_runtime-DXlSD6kV.js.map → jsx_dev_runtime-Bd7FO7C1.js.map} +1 -1
  218. package/dist/jsx_runtime-BxumFGUy.js +13 -0
  219. package/dist/jsx_runtime-BxumFGUy.js.map +1 -0
  220. package/dist/{jsx_runtime-DPWo5qvV.js → jsx_runtime-gO4GQFcW.js} +3 -3
  221. package/dist/{jsx_runtime-CMdEXGNZ.js.map → jsx_runtime-gO4GQFcW.js.map} +1 -1
  222. package/dist/{loader-DCT1Q9yi.mjs → loader-A15L-NVK.mjs} +13 -14
  223. package/dist/loader-A15L-NVK.mjs.map +1 -0
  224. package/dist/{misc-o8pviMUi.mjs → misc-CRRQr1DT.mjs} +35 -8
  225. package/dist/misc-CRRQr1DT.mjs.map +1 -0
  226. package/dist/{namedTokens-BUa6raTb.js → namedTokens-paLD-Pdk.js} +15 -9
  227. package/dist/namedTokens-paLD-Pdk.js.map +1 -0
  228. package/dist/plugin/farm/index.mjs +5 -4
  229. package/dist/plugin/farm/index.mjs.map +1 -1
  230. package/dist/plugin/nextjs/index.mjs +153 -33
  231. package/dist/plugin/nextjs/index.mjs.map +1 -1
  232. package/dist/plugin/nextjs/loader.mjs +7 -5
  233. package/dist/plugin/nextjs/loader.mjs.map +1 -1
  234. package/dist/plugin/parcel/index.cjs +2 -0
  235. package/dist/plugin/parcel/index.mjs +3 -1
  236. package/dist/plugin/parcel/optimizer.cjs +3 -2
  237. package/dist/plugin/parcel/optimizer.cjs.map +1 -1
  238. package/dist/plugin/parcel/optimizer.mjs +3 -2
  239. package/dist/plugin/parcel/optimizer.mjs.map +1 -1
  240. package/dist/plugin/parcel/resolver.cjs +1 -1
  241. package/dist/plugin/parcel/resolver.mjs +2 -2
  242. package/dist/plugin/parcel/runtime.cjs +1 -1
  243. package/dist/plugin/parcel/runtime.mjs +1 -1
  244. package/dist/plugin/parcel/transformer.cjs +1 -1
  245. package/dist/plugin/parcel/transformer.mjs +2 -2
  246. package/dist/plugin/rspack/index.mjs +3 -2
  247. package/dist/plugin/rspack/index.mjs.map +1 -1
  248. package/dist/plugin/vite/index.mjs +26 -23
  249. package/dist/plugin/vite/index.mjs.map +1 -1
  250. package/dist/plugin/webpack/index.mjs +3 -2
  251. package/dist/plugin/webpack/loader.mjs +2 -2
  252. package/dist/presets/tailwind/index.js +32 -8
  253. package/dist/presets/tailwind/index.js.map +1 -1
  254. package/dist/{assert-BGdigdr5.js → presets-DSanixJV.js} +106 -2
  255. package/dist/presets-DSanixJV.js.map +1 -0
  256. package/dist/{registry-D3x1EDJm.mjs → registry-D2C6hTdx.mjs} +2 -2
  257. package/dist/{registry-D3x1EDJm.mjs.map → registry-D2C6hTdx.mjs.map} +1 -1
  258. package/dist/resolveClassNameRuntime-Cp8_UcxF.js +63 -0
  259. package/dist/resolveClassNameRuntime-Cp8_UcxF.js.map +1 -0
  260. package/dist/scope-Dg83Az-2.js +601 -0
  261. package/dist/scope-Dg83Az-2.js.map +1 -0
  262. package/dist/selector/index.js +1 -2
  263. package/dist/server.js +91 -17
  264. package/dist/server.js.map +1 -1
  265. package/dist/{shared-B_gJf5uj.cjs → shared-B7Nw_dcx.cjs} +3152 -891
  266. package/dist/shared-B7Nw_dcx.cjs.map +1 -0
  267. package/dist/{shared-uAzFeq0x.mjs → shared-BmJmaxu8.mjs} +5 -5
  268. package/dist/shared-BmJmaxu8.mjs.map +1 -0
  269. package/dist/sheet-CHnDkjn4.js +56 -0
  270. package/dist/sheet-CHnDkjn4.js.map +1 -0
  271. package/dist/sheet-PVxRQrOp.js +7 -0
  272. package/dist/sheet-PVxRQrOp.js.map +1 -0
  273. package/dist/sheet-ueNBw_2u.js +1 -0
  274. package/dist/{sidecar-BUO1hKXu.mjs → sidecar-DVegwGec.mjs} +3 -3
  275. package/dist/{sidecar-BUO1hKXu.mjs.map → sidecar-DVegwGec.mjs.map} +1 -1
  276. package/dist/{style-BkeAZl0n.js → style-B1tkE8zl.js} +329 -129
  277. package/dist/style-B1tkE8zl.js.map +1 -0
  278. package/dist/styleStore-BK2XBS8n.js +45 -0
  279. package/dist/styleStore-BK2XBS8n.js.map +1 -0
  280. package/dist/styleStore-D4umgIwQ.js +3457 -0
  281. package/dist/styleStore-D4umgIwQ.js.map +1 -0
  282. package/dist/token-BX5jRxMb.js +110 -0
  283. package/dist/token-BX5jRxMb.js.map +1 -0
  284. package/dist/token-CS0iRIIa.js +140 -0
  285. package/dist/token-CS0iRIIa.js.map +1 -0
  286. package/dist/{trace-D0IL6JT8.js → trace-DZYKSwdB.js} +2 -2
  287. package/dist/{trace-D0IL6JT8.js.map → trace-DZYKSwdB.js.map} +1 -1
  288. package/dist/{trace-DR7_Rpkg.js → trace-EEKXwKSr.js} +3 -3
  289. package/dist/{trace-DR7_Rpkg.js.map → trace-EEKXwKSr.js.map} +1 -1
  290. package/dist/{transform-BTJOg8Hg.js → transform-BZ4jPwy3.js} +2 -2
  291. package/dist/transform-BZ4jPwy3.js.map +1 -0
  292. package/dist/types/adapter/preact.d.ts +1 -0
  293. package/dist/types/adapter/react.d.ts +1 -0
  294. package/dist/types/adapter/solid.d.ts +1 -0
  295. package/dist/types/atomic/atRule/counterStyle.d.ts +10 -0
  296. package/dist/types/atomic/atRule/fontFace.d.ts +10 -0
  297. package/dist/types/atomic/atRule/fontPaletteValues.d.ts +10 -0
  298. package/dist/types/atomic/atRule/fontSrc.d.ts +1 -0
  299. package/dist/types/atomic/atRule/keyframes.d.ts +13 -0
  300. package/dist/types/atomic/atRule/positionTry.d.ts +13 -0
  301. package/dist/types/atomic/atRule/property.d.ts +13 -0
  302. package/dist/types/atomic/atRule/utils.d.ts +5 -0
  303. package/dist/types/atomic/className.d.ts +11 -0
  304. package/dist/types/atomic/debug/className/className.d.ts +9 -0
  305. package/dist/types/atomic/debug/className/index.d.ts +1 -0
  306. package/dist/types/atomic/debug/property/data.d.ts +3 -0
  307. package/dist/types/atomic/debug/property/index.d.ts +1 -0
  308. package/dist/types/atomic/debug/property/property.d.ts +5 -0
  309. package/dist/types/atomic/debug/selector.d.ts +2 -0
  310. package/dist/types/atomic/debug/value.d.ts +5 -0
  311. package/dist/types/atomic/element.d.ts +5 -0
  312. package/dist/types/atomic/layer/index.d.ts +3 -0
  313. package/dist/types/atomic/layer/layer.d.ts +12 -0
  314. package/dist/types/atomic/layer/types.d.ts +30 -0
  315. package/dist/types/atomic/layer/utils.d.ts +4 -0
  316. package/dist/types/atomic/property/index.d.ts +2 -0
  317. package/dist/types/atomic/property/presets.d.ts +4 -0
  318. package/dist/types/atomic/property/property.d.ts +3 -0
  319. package/dist/types/atomic/property/type_maps.d.ts +31 -0
  320. package/dist/types/atomic/property/types.d.ts +4 -0
  321. package/dist/types/atomic/rule.d.ts +5 -0
  322. package/dist/types/atomic/scope.d.ts +3 -0
  323. package/dist/types/atomic/theme.d.ts +7 -0
  324. package/dist/types/atomic/token.d.ts +7 -0
  325. package/dist/types/atomic/utils/cssIdent.d.ts +2 -0
  326. package/dist/types/atomic/utils/cssVar.d.ts +3 -0
  327. package/dist/types/atomic/utils/debug.d.ts +4 -0
  328. package/dist/types/atomic/utils/format.d.ts +5 -0
  329. package/dist/types/atomic/utils/hash.d.ts +1 -0
  330. package/dist/types/atomic/utils/selector.d.ts +7 -0
  331. package/dist/types/atomic/utils/types.d.ts +8 -0
  332. package/dist/types/atomic/value/index.d.ts +2 -0
  333. package/dist/types/atomic/value/unitless.d.ts +1 -0
  334. package/dist/types/atomic/value/value.d.ts +2 -0
  335. package/dist/types/atomic/var.d.ts +4 -0
  336. package/dist/types/builder/classname/class_name_builder.d.ts +4 -0
  337. package/dist/types/builder/classname/fns.d.ts +48 -0
  338. package/dist/types/builder/classname/index.d.ts +3 -0
  339. package/dist/types/builder/classname/types.d.ts +18 -0
  340. package/dist/types/builder/data/check_selector.d.ts +2 -0
  341. package/dist/types/builder/data/const.d.ts +27 -0
  342. package/dist/types/builder/data/create.d.ts +13 -0
  343. package/dist/types/builder/data/data.d.ts +44 -0
  344. package/dist/types/builder/data/debug.d.ts +38 -0
  345. package/dist/types/builder/data/index.d.ts +8 -0
  346. package/dist/types/builder/data/is.d.ts +16 -0
  347. package/dist/types/builder/data/merge/index.d.ts +2 -0
  348. package/dist/types/builder/data/merge/scope.d.ts +7 -0
  349. package/dist/types/builder/data/merge/style.d.ts +6 -0
  350. package/dist/types/builder/data/merge/utils.d.ts +10 -0
  351. package/dist/types/builder/data/selector.d.ts +8 -0
  352. package/dist/types/builder/data/state.d.ts +100 -0
  353. package/dist/types/builder/extract/index.d.ts +7 -0
  354. package/dist/types/builder/extract/scope.d.ts +14 -0
  355. package/dist/types/builder/extract/sheet.d.ts +10 -0
  356. package/dist/types/builder/extract/slot.d.ts +9 -0
  357. package/dist/types/builder/extract/style.d.ts +11 -0
  358. package/dist/types/builder/extract/theme.d.ts +2 -0
  359. package/dist/types/builder/extract/token.d.ts +12 -0
  360. package/dist/types/builder/extract/utils.d.ts +28 -0
  361. package/dist/types/builder/extract/withTokens.d.ts +10 -0
  362. package/dist/types/builder/index.d.ts +2 -0
  363. package/dist/types/builder/selector_override.d.ts +5 -0
  364. package/dist/types/builder/selector_override_core.d.ts +8 -0
  365. package/dist/types/builder/style_builder.d.ts +15 -0
  366. package/dist/types/builder/style_data.d.ts +8 -0
  367. package/dist/types/builder/style_fns.d.ts +14 -0
  368. package/dist/types/builder/token/data.d.ts +10 -0
  369. package/dist/types/builder/token/name.d.ts +3 -0
  370. package/dist/types/builder/token/symbols.d.ts +4 -0
  371. package/dist/types/builder/types/alias.d.ts +59 -0
  372. package/dist/types/builder/types/fns.d.ts +115 -0
  373. package/dist/types/builder/types/index.d.ts +1 -0
  374. package/dist/types/builder/types/types.d.ts +22 -0
  375. package/dist/types/builder/utils.d.ts +9 -0
  376. package/dist/types/compiler/compiler/cache.d.ts +24 -0
  377. package/dist/types/compiler/compiler/cache_identity.d.ts +4 -0
  378. package/dist/types/compiler/compiler/compiler.d.ts +40 -0
  379. package/dist/types/compiler/compiler/constants.d.ts +6 -0
  380. package/dist/types/compiler/compiler/index.d.ts +4 -0
  381. package/dist/types/compiler/compiler/persistent_cache.d.ts +14 -0
  382. package/dist/types/compiler/compiler/types.d.ts +64 -0
  383. package/dist/types/compiler/cssProp.d.ts +8 -0
  384. package/dist/types/compiler/extract/collector.d.ts +8 -0
  385. package/dist/types/compiler/extract/extract.d.ts +6 -0
  386. package/dist/types/compiler/extract/index.d.ts +3 -0
  387. package/dist/types/compiler/extract/types.d.ts +29 -0
  388. package/dist/types/compiler/index.d.ts +3 -0
  389. package/dist/types/compiler/transform/cssProp/index.d.ts +1 -0
  390. package/dist/types/compiler/transform/cssProp/plugin.d.ts +13 -0
  391. package/dist/types/compiler/transform/debug/index.d.ts +2 -0
  392. package/dist/types/compiler/transform/debug/plugin.d.ts +34 -0
  393. package/dist/types/compiler/transform/debug/transform.d.ts +7 -0
  394. package/dist/types/compiler/transform/debug/utils/debug_data.d.ts +11 -0
  395. package/dist/types/compiler/transform/debug/utils/source_url.d.ts +2 -0
  396. package/dist/types/compiler/transform/evaluator/evaluator.d.ts +58 -0
  397. package/dist/types/compiler/transform/evaluator/index.d.ts +3 -0
  398. package/dist/types/compiler/transform/evaluator/lazy_bindings.d.ts +22 -0
  399. package/dist/types/compiler/transform/evaluator/metadata_cache.d.ts +13 -0
  400. package/dist/types/compiler/transform/evaluator/tracer.d.ts +15 -0
  401. package/dist/types/compiler/transform/evaluator/types.d.ts +21 -0
  402. package/dist/types/compiler/transform/extract/chain/chain.d.ts +18 -0
  403. package/dist/types/compiler/transform/extract/chain/extract_chain.d.ts +21 -0
  404. package/dist/types/compiler/transform/extract/chain/index.d.ts +3 -0
  405. package/dist/types/compiler/transform/extract/chain/types.d.ts +32 -0
  406. package/dist/types/compiler/transform/extract/index.d.ts +2 -0
  407. package/dist/types/compiler/transform/extract/plugin.d.ts +20 -0
  408. package/dist/types/compiler/transform/extract/transform.d.ts +10 -0
  409. package/dist/types/compiler/transform/extract/utils/imports.d.ts +3 -0
  410. package/dist/types/compiler/transform/extract/utils/replacement.d.ts +11 -0
  411. package/dist/types/compiler/transform/extract/utils/slot.d.ts +4 -0
  412. package/dist/types/compiler/transform/extract/utils/state.d.ts +36 -0
  413. package/dist/types/compiler/transform/extract/utils/theme.d.ts +9 -0
  414. package/dist/types/compiler/transform/extract/utils/token.d.ts +4 -0
  415. package/dist/types/compiler/transform/index.d.ts +5 -0
  416. package/dist/types/compiler/transform/syntax/index.d.ts +5 -0
  417. package/dist/types/compiler/transform/syntax/isStaticStyleValue.d.ts +2 -0
  418. package/dist/types/compiler/transform/syntax/isStyleChainCall.d.ts +2 -0
  419. package/dist/types/compiler/transform/syntax/static_ids.d.ts +16 -0
  420. package/dist/types/compiler/transform/syntax/types.d.ts +4 -0
  421. package/dist/types/compiler/transform/syntax/utils.d.ts +5 -0
  422. package/dist/types/compiler/transform/utils/babel.d.ts +21 -0
  423. package/dist/types/compiler/transform/utils/import.d.ts +2 -0
  424. package/dist/types/compiler/transform/utils/path.d.ts +1 -0
  425. package/dist/types/compiler/transform/utils/selector.d.ts +18 -0
  426. package/dist/types/compiler/utils/check_diagnostics.d.ts +7 -0
  427. package/dist/types/compiler/utils/constants.d.ts +70 -0
  428. package/dist/types/compiler/utils/file_resolver.d.ts +16 -0
  429. package/dist/types/compiler/utils/import_source.d.ts +34 -0
  430. package/dist/types/compiler/utils/imports.d.ts +6 -0
  431. package/dist/types/compiler/utils/path.d.ts +4 -0
  432. package/dist/types/compiler/utils/sourcemap.d.ts +36 -0
  433. package/dist/types/config/build.d.ts +20 -0
  434. package/dist/types/config/config/check.d.ts +11 -0
  435. package/dist/types/config/config/css.d.ts +29 -0
  436. package/dist/types/config/config/css_extra.d.ts +13 -0
  437. package/dist/types/config/config/debug.d.ts +14 -0
  438. package/dist/types/config/config/dev.d.ts +36 -0
  439. package/dist/types/config/config/runtime.d.ts +10 -0
  440. package/dist/types/config/configure.d.ts +14 -0
  441. package/dist/types/config/constants.d.ts +1 -0
  442. package/dist/types/config/document.d.ts +3 -0
  443. package/dist/types/config/index.d.ts +2 -0
  444. package/dist/types/config/types.d.ts +47 -0
  445. package/dist/types/config/utils.d.ts +2 -0
  446. package/dist/types/css/counterStyle.d.ts +4 -0
  447. package/dist/types/css/fontFace.d.ts +5 -0
  448. package/dist/types/css/fontPaletteValues.d.ts +4 -0
  449. package/dist/types/css/globalSheet.d.ts +24 -0
  450. package/dist/types/css/index.d.ts +12 -0
  451. package/dist/types/css/keyframes.d.ts +4 -0
  452. package/dist/types/css/positionTry.d.ts +4 -0
  453. package/dist/types/css/property.d.ts +7 -0
  454. package/dist/types/css/sheet.d.ts +8 -0
  455. package/dist/types/css/styleTarget.d.ts +9 -0
  456. package/dist/types/css/utils.d.ts +19 -0
  457. package/dist/types/dev/config.d.ts +6 -0
  458. package/dist/types/dev/fns.d.ts +14 -0
  459. package/dist/types/dev/index.d.ts +2 -0
  460. package/dist/types/dev/trace.d.ts +8 -0
  461. package/dist/types/dev/utils.d.ts +5 -0
  462. package/dist/types/dialect/extracted/index.d.ts +1 -0
  463. package/dist/types/dialect/index.d.ts +1 -0
  464. package/dist/types/dialect/namedTokens.d.ts +9 -0
  465. package/dist/types/entry/dev/adapter/preact.d.ts +1 -0
  466. package/dist/types/entry/dev/adapter/react.d.ts +1 -0
  467. package/dist/types/entry/dev/adapter/solid.d.ts +1 -0
  468. package/dist/types/entry/dev/config.d.ts +2 -0
  469. package/dist/types/entry/dev/css.d.ts +2 -0
  470. package/dist/types/entry/dev/index.d.ts +3 -0
  471. package/dist/types/entry/dev/jsx_dev_runtime.d.ts +3 -0
  472. package/dist/types/entry/dev/sheet.d.ts +1 -0
  473. package/dist/types/entry/prod/adapter/preact.d.ts +1 -0
  474. package/dist/types/entry/prod/adapter/react.d.ts +1 -0
  475. package/dist/types/entry/prod/adapter/solid.d.ts +1 -0
  476. package/dist/types/entry/prod/config.d.ts +2 -0
  477. package/dist/types/entry/prod/config_debug.d.ts +2 -0
  478. package/dist/types/entry/prod/css.d.ts +2 -0
  479. package/dist/types/entry/prod/extract.d.ts +1 -0
  480. package/dist/types/entry/prod/index.d.ts +2 -0
  481. package/dist/types/entry/prod/jsx_runtime.d.ts +2 -0
  482. package/dist/types/entry/prod/runtime.d.ts +8 -0
  483. package/dist/types/entry/rsc_dev/adapter/preact.d.ts +1 -0
  484. package/dist/types/entry/rsc_dev/adapter/react.d.ts +1 -0
  485. package/dist/types/entry/rsc_dev/adapter/solid.d.ts +1 -0
  486. package/dist/types/entry/rsc_dev/config.d.ts +2 -0
  487. package/dist/types/entry/rsc_dev/css.d.ts +3 -0
  488. package/dist/types/entry/rsc_dev/index.d.ts +2 -0
  489. package/dist/types/entry/rsc_dev/server.d.ts +10 -0
  490. package/dist/types/entry/rsc_prod/adapter/preact.d.ts +1 -0
  491. package/dist/types/entry/rsc_prod/adapter/react.d.ts +1 -0
  492. package/dist/types/entry/rsc_prod/adapter/solid.d.ts +1 -0
  493. package/dist/types/entry/rsc_prod/config.d.ts +2 -0
  494. package/dist/types/entry/rsc_prod/config_debug.d.ts +2 -0
  495. package/dist/types/entry/rsc_prod/css.d.ts +2 -0
  496. package/dist/types/entry/rsc_prod/index.d.ts +2 -0
  497. package/dist/types/entry/rsc_prod/jsx_runtime.d.ts +2 -0
  498. package/dist/types/entry/rsc_prod/runtime.d.ts +4 -0
  499. package/dist/types/entry/rsc_prod/server.d.ts +6 -0
  500. package/dist/types/entry/shared/config.d.ts +1 -0
  501. package/dist/types/entry/shared/config_debug.d.ts +1 -0
  502. package/dist/types/entry/shared/config_dev.d.ts +1 -0
  503. package/dist/types/entry/shared/dev.d.ts +1 -0
  504. package/dist/types/entry/shared/prod.d.ts +1 -0
  505. package/dist/types/entry/shared/utils.d.ts +2 -0
  506. package/dist/types/index.d.ts +9 -0
  507. package/dist/types/jsx/extracted/jsx_runtime.d.ts +7 -0
  508. package/dist/types/jsx/rsc/jsx_runtime.d.ts +7 -0
  509. package/dist/types/jsx/rsc_extracted/jsx_runtime.d.ts +2 -0
  510. package/dist/types/jsx/runtime/jsx_dev_runtime.d.ts +6 -0
  511. package/dist/types/jsx/runtime/jsx_runtime.d.ts +7 -0
  512. package/dist/types/jsx/types/index.d.ts +1 -0
  513. package/dist/types/jsx/types/preact.d.ts +12 -0
  514. package/dist/types/jsx/types/react.d.ts +10 -0
  515. package/dist/types/jsx/types/solid.d.ts +12 -0
  516. package/dist/types/jsx/utils.d.ts +19 -0
  517. package/dist/types/plugin/bundler/farm/index.d.ts +1 -0
  518. package/dist/types/plugin/bundler/farm/plugin.d.ts +97 -0
  519. package/dist/types/plugin/bundler/parcel/index.d.ts +1 -0
  520. package/dist/types/plugin/bundler/parcel/optimizer.d.ts +3 -0
  521. package/dist/types/plugin/bundler/parcel/plugin.d.ts +6 -0
  522. package/dist/types/plugin/bundler/parcel/resolver.d.ts +3 -0
  523. package/dist/types/plugin/bundler/parcel/runtime.d.ts +3 -0
  524. package/dist/types/plugin/bundler/parcel/shared.d.ts +37 -0
  525. package/dist/types/plugin/bundler/parcel/transformer.d.ts +3 -0
  526. package/dist/types/plugin/bundler/rspack/index.d.ts +1 -0
  527. package/dist/types/plugin/bundler/rspack/plugin.d.ts +7 -0
  528. package/dist/types/plugin/bundler/vite/index.d.ts +1 -0
  529. package/dist/types/plugin/bundler/vite/plugin.d.ts +6 -0
  530. package/dist/types/plugin/bundler/vite/state.d.ts +79 -0
  531. package/dist/types/plugin/bundler/webpack/index.d.ts +1 -0
  532. package/dist/types/plugin/bundler/webpack/loader.d.ts +2 -0
  533. package/dist/types/plugin/bundler/webpack/plugin.d.ts +11 -0
  534. package/dist/types/plugin/bundler/webpack/shared/loader.d.ts +31 -0
  535. package/dist/types/plugin/bundler/webpack/shared/registry.d.ts +4 -0
  536. package/dist/types/plugin/bundler/webpack/utils.d.ts +18 -0
  537. package/dist/types/plugin/nextjs/constants.d.ts +3 -0
  538. package/dist/types/plugin/nextjs/html.d.ts +1 -0
  539. package/dist/types/plugin/nextjs/index.d.ts +2 -0
  540. package/dist/types/plugin/nextjs/loader.d.ts +3 -0
  541. package/dist/types/plugin/nextjs/plugin.d.ts +5 -0
  542. package/dist/types/plugin/nextjs/types.d.ts +21 -0
  543. package/dist/types/plugin/nextjs/utils.d.ts +59 -0
  544. package/dist/types/plugin/utils/cache/css_cache.d.ts +34 -0
  545. package/dist/types/plugin/utils/cache/file.d.ts +4 -0
  546. package/dist/types/plugin/utils/cache/index.d.ts +2 -0
  547. package/dist/types/plugin/utils/compiler.d.ts +51 -0
  548. package/dist/types/plugin/utils/constants.d.ts +4 -0
  549. package/dist/types/plugin/utils/cssMarker.d.ts +4 -0
  550. package/dist/types/plugin/utils/cssOutput.d.ts +10 -0
  551. package/dist/types/plugin/utils/filter.d.ts +25 -0
  552. package/dist/types/plugin/utils/imports.d.ts +3 -0
  553. package/dist/types/plugin/utils/index.d.ts +10 -0
  554. package/dist/types/plugin/utils/injection.d.ts +3 -0
  555. package/dist/types/plugin/utils/misc.d.ts +1 -0
  556. package/dist/types/plugin/utils/runtimeEntry.d.ts +8 -0
  557. package/dist/types/plugin/utils/sidecar/index.d.ts +1 -0
  558. package/dist/types/plugin/utils/sidecar/server.d.ts +19 -0
  559. package/dist/types/plugin/utils/sidecar/sidecar.d.ts +17 -0
  560. package/dist/types/plugin/utils/sidecar/utils.d.ts +33 -0
  561. package/dist/types/plugin/utils/sourcemap.d.ts +9 -0
  562. package/dist/types/plugin/utils/virtual.d.ts +12 -0
  563. package/dist/types/presets/tailwind/classname/index.d.ts +2 -0
  564. package/dist/types/presets/tailwind/classname/transform.d.ts +8 -0
  565. package/dist/types/presets/tailwind/classname/types.d.ts +27 -0
  566. package/dist/types/presets/tailwind/index.d.ts +5 -0
  567. package/dist/types/presets/tailwind/selectors.d.ts +68 -0
  568. package/dist/types/presets/tailwind/style/index.d.ts +2 -0
  569. package/dist/types/presets/tailwind/style/transform.d.ts +8 -0
  570. package/dist/types/presets/tailwind/style/types.d.ts +149 -0
  571. package/dist/types/presets/tailwind/theme.d.ts +477 -0
  572. package/dist/types/presets/tailwind/types.d.ts +53 -0
  573. package/dist/types/runtime/adapter/utils.d.ts +12 -0
  574. package/dist/types/runtime/core/cache/combine.d.ts +6 -0
  575. package/dist/types/runtime/core/cache/combineRuntime.d.ts +1 -0
  576. package/dist/types/runtime/core/cache/item.d.ts +15 -0
  577. package/dist/types/runtime/core/cache/itemWithResolver.d.ts +4 -0
  578. package/dist/types/runtime/core/cache/pool.d.ts +16 -0
  579. package/dist/types/runtime/core/cache/prop.d.ts +19 -0
  580. package/dist/types/runtime/core/cache/propCache.d.ts +12 -0
  581. package/dist/types/runtime/core/cache/resolvedItem.d.ts +5 -0
  582. package/dist/types/runtime/core/cache/result.d.ts +9 -0
  583. package/dist/types/runtime/core/cache/stateItem.d.ts +14 -0
  584. package/dist/types/runtime/core/cache/token.d.ts +2 -0
  585. package/dist/types/runtime/core/cache/tokenValues.d.ts +26 -0
  586. package/dist/types/runtime/core/cache/utils/tree.d.ts +12 -0
  587. package/dist/types/runtime/core/cache/utils/walk.d.ts +1 -0
  588. package/dist/types/runtime/core/className.d.ts +18 -0
  589. package/dist/types/runtime/core/combinedStyle.d.ts +20 -0
  590. package/dist/types/runtime/core/createTransformElement.d.ts +4 -0
  591. package/dist/types/runtime/core/elementMarker.d.ts +12 -0
  592. package/dist/types/runtime/core/elementMarkerData.d.ts +7 -0
  593. package/dist/types/runtime/core/getClassName.d.ts +4 -0
  594. package/dist/types/runtime/core/getSheetRules.d.ts +3 -0
  595. package/dist/types/runtime/core/getToken.d.ts +3 -0
  596. package/dist/types/runtime/core/index.d.ts +5 -0
  597. package/dist/types/runtime/core/jsx.d.ts +1 -0
  598. package/dist/types/runtime/core/resolveClassNameRuntime.d.ts +8 -0
  599. package/dist/types/runtime/env.d.ts +2 -0
  600. package/dist/types/runtime/extract/combineStyle.d.ts +27 -0
  601. package/dist/types/runtime/extract/getClassName.d.ts +10 -0
  602. package/dist/types/runtime/extract/index.d.ts +6 -0
  603. package/dist/types/runtime/extract/jsx.d.ts +10 -0
  604. package/dist/types/runtime/extract/token.d.ts +5 -0
  605. package/dist/types/runtime/extract/tokenResolver.d.ts +2 -0
  606. package/dist/types/runtime/rsc/constants.d.ts +6 -0
  607. package/dist/types/runtime/rsc/dev.d.ts +11 -0
  608. package/dist/types/runtime/rsc/getClassName.d.ts +27 -0
  609. package/dist/types/runtime/rsc/globalSheet.d.ts +22 -0
  610. package/dist/types/runtime/rsc/index.d.ts +1 -0
  611. package/dist/types/runtime/rsc/jsx.d.ts +1 -0
  612. package/dist/types/runtime/rsc/observer.d.ts +10 -0
  613. package/dist/types/runtime/rsc/styleStore.d.ts +7 -0
  614. package/dist/types/runtime/sheet/document.d.ts +3 -0
  615. package/dist/types/runtime/sheet/element.d.ts +2 -0
  616. package/dist/types/runtime/sheet/global.d.ts +3 -0
  617. package/dist/types/runtime/sheet/index.d.ts +3 -0
  618. package/dist/types/runtime/sheet/insert.d.ts +5 -0
  619. package/dist/types/runtime/sheet/rule.d.ts +8 -0
  620. package/dist/types/runtime/sheet/rules.d.ts +10 -0
  621. package/dist/types/runtime/sheet/theme.d.ts +5 -0
  622. package/dist/types/runtime/style/index.d.ts +3 -0
  623. package/dist/types/runtime/style/scope.d.ts +4 -0
  624. package/dist/types/runtime/style/style.d.ts +27 -0
  625. package/dist/types/runtime/style/token.d.ts +1 -0
  626. package/dist/types/runtime/types.d.ts +31 -0
  627. package/dist/types/selector/assert.d.ts +13 -0
  628. package/dist/types/selector/index.d.ts +5 -0
  629. package/dist/types/selector/presets/default.d.ts +108 -0
  630. package/dist/types/selector/presets/index.d.ts +3 -0
  631. package/dist/types/selector/presets/minimal.d.ts +46 -0
  632. package/dist/types/selector/presets/selectors.d.ts +62 -0
  633. package/dist/types/selector/selector.d.ts +25 -0
  634. package/dist/types/selector/types.d.ts +12 -0
  635. package/dist/types/selector/validate.d.ts +5 -0
  636. package/dist/types/sheet/dev/dev_layer.d.ts +4 -0
  637. package/dist/types/sheet/dev/dev_sort.d.ts +2 -0
  638. package/dist/types/sheet/dev/index.d.ts +5 -0
  639. package/dist/types/sheet/dev/utils.d.ts +26 -0
  640. package/dist/types/sheet/index.d.ts +4 -0
  641. package/dist/types/sheet/ordered.d.ts +4 -0
  642. package/dist/types/sheet/ordering.d.ts +15 -0
  643. package/dist/types/sheet/prod.d.ts +2 -0
  644. package/dist/types/sheet/sheet.d.ts +2 -0
  645. package/dist/types/sheet/sourcemap.d.ts +11 -0
  646. package/dist/types/sheet/types.d.ts +37 -0
  647. package/dist/types/sheet/utils/dom.d.ts +5 -0
  648. package/dist/types/sheet/utils/index.d.ts +4 -0
  649. package/dist/types/sheet/utils/layer.d.ts +10 -0
  650. package/dist/types/sheet/utils/noop.d.ts +2 -0
  651. package/dist/types/sheet/utils/rule.d.ts +3 -0
  652. package/dist/types/sheet/utils/sourcemap.d.ts +12 -0
  653. package/dist/types/style/classname.d.ts +15 -0
  654. package/dist/types/style/important.d.ts +9 -0
  655. package/dist/types/style/index.d.ts +12 -0
  656. package/dist/types/style/keyframes.d.ts +10 -0
  657. package/dist/types/style/style.d.ts +426 -0
  658. package/dist/types/style/theme.d.ts +5 -0
  659. package/dist/types/style/token.d.ts +29 -0
  660. package/dist/types/style/tokens.d.ts +10 -0
  661. package/dist/types/style/transform.d.ts +22 -0
  662. package/dist/types/style/types.d.ts +22 -0
  663. package/dist/types/style/utils/expose.d.ts +8 -0
  664. package/dist/types/style/utils/index.d.ts +1 -0
  665. package/dist/types/style/value.d.ts +12 -0
  666. package/dist/types/style/valueRef.d.ts +13 -0
  667. package/dist/types/style/weight.d.ts +9 -0
  668. package/dist/types/utils/global.d.ts +4 -0
  669. package/dist/types/utils/hash.d.ts +3 -0
  670. package/dist/types/utils/id.d.ts +12 -0
  671. package/dist/types/utils/object.d.ts +10 -0
  672. package/dist/types/utils/symbol.d.ts +1 -0
  673. package/dist/types/utils/trace.d.ts +21 -0
  674. package/dist/types/utils/type.d.ts +11 -0
  675. package/dist/utils-0UTYm294.js +42 -0
  676. package/dist/utils-0UTYm294.js.map +1 -0
  677. package/dist/utils-CO1ZXzKK.mjs +182 -0
  678. package/dist/utils-CO1ZXzKK.mjs.map +1 -0
  679. package/dist/{utils-DQGa0uzS.mjs → utils-CxYxZSSk.mjs} +3 -3
  680. package/dist/{utils-DQGa0uzS.mjs.map → utils-CxYxZSSk.mjs.map} +1 -1
  681. package/dist/utils-D1duUYV9.js +72 -0
  682. package/dist/utils-D1duUYV9.js.map +1 -0
  683. package/dist/utils-DxCpyV2E.js +62 -0
  684. package/dist/utils-DxCpyV2E.js.map +1 -0
  685. package/dist/{utils-BsbfH6cd.js → utils-ymEmGz-T.js} +1274 -608
  686. package/dist/utils-ymEmGz-T.js.map +1 -0
  687. package/dist/utils.js +4 -4
  688. package/dist/utils.js.map +1 -1
  689. package/dist/{webpack-Fb9xF5jS.mjs → webpack-DF165M2x.mjs} +7 -7
  690. package/dist/webpack-DF165M2x.mjs.map +1 -0
  691. package/entry/dev/adapter/preact.ts +8 -0
  692. package/entry/dev/adapter/react.ts +8 -0
  693. package/entry/dev/adapter/solid.ts +8 -0
  694. package/entry/dev/sheet.ts +4 -2
  695. package/entry/prod/adapter/preact.ts +8 -0
  696. package/entry/prod/adapter/react.ts +8 -0
  697. package/entry/prod/adapter/solid.ts +8 -0
  698. package/entry/prod/config_debug.ts +2 -0
  699. package/entry/prod/index.ts +1 -1
  700. package/entry/prod/runtime.ts +3 -1
  701. package/entry/rsc_dev/adapter/preact.ts +9 -0
  702. package/entry/rsc_dev/adapter/react.ts +9 -0
  703. package/entry/rsc_dev/adapter/solid.ts +9 -0
  704. package/entry/rsc_dev/css.ts +2 -0
  705. package/entry/rsc_prod/adapter/preact.ts +1 -0
  706. package/entry/rsc_prod/adapter/react.ts +1 -0
  707. package/entry/rsc_prod/adapter/solid.ts +1 -0
  708. package/entry/rsc_prod/config_debug.ts +6 -0
  709. package/entry/rsc_prod/index.ts +1 -1
  710. package/entry/shared/config_debug.ts +9 -0
  711. package/entry/shared/config_dev.ts +9 -7
  712. package/index.ts +1 -0
  713. package/jsx/rsc/jsx_dev_runtime.ts +11 -2
  714. package/jsx/rsc/jsx_runtime.ts +14 -3
  715. package/jsx/types/index.ts +1 -0
  716. package/jsx/types/preact.ts +14 -0
  717. package/jsx/{types.ts → types/react.ts} +2 -2
  718. package/jsx/types/solid.ts +15 -0
  719. package/package.json +179 -74
  720. package/plugin/bundler/farm/plugin.ts +3 -1
  721. package/plugin/bundler/parcel/optimizer.ts +1 -0
  722. package/plugin/bundler/parcel/plugin.ts +2 -0
  723. package/plugin/bundler/parcel/shared.ts +1 -1
  724. package/plugin/bundler/rspack/plugin.ts +1 -0
  725. package/plugin/bundler/vite/plugin.ts +23 -25
  726. package/plugin/bundler/vite/state.ts +7 -8
  727. package/plugin/bundler/webpack/plugin.ts +4 -3
  728. package/plugin/bundler/webpack/shared/loader.ts +13 -7
  729. package/plugin/nextjs/loader.ts +18 -2
  730. package/plugin/nextjs/plugin.ts +248 -35
  731. package/plugin/nextjs/types.ts +1 -2
  732. package/plugin/nextjs/utils.ts +122 -1
  733. package/plugin/utils/compiler.ts +3 -2
  734. package/plugin/utils/filter.ts +65 -1
  735. package/plugin/utils/runtimeEntry.ts +3 -2
  736. package/presets/tailwind/classname/transform.ts +32 -1
  737. package/presets/tailwind/style/transform.ts +9 -3
  738. package/runtime/adapter/utils.ts +120 -0
  739. package/runtime/core/cache/combine.ts +76 -28
  740. package/runtime/core/cache/combineRuntime.ts +4 -0
  741. package/runtime/core/cache/index.ts +2 -1
  742. package/runtime/core/cache/item.ts +32 -13
  743. package/runtime/core/cache/itemWithResolver.ts +44 -0
  744. package/runtime/core/cache/pool.ts +15 -30
  745. package/runtime/core/cache/prop.ts +10 -8
  746. package/runtime/core/cache/result.ts +2 -2
  747. package/runtime/core/cache/stateItem.ts +19 -1
  748. package/runtime/core/cache/token.ts +20 -0
  749. package/runtime/core/cache/tokenValues.ts +19 -11
  750. package/runtime/core/combinedStyle.ts +4 -4
  751. package/runtime/core/elementMarker.ts +9 -3
  752. package/runtime/extract/combineStyle.ts +211 -0
  753. package/runtime/extract/getClassName.ts +61 -16
  754. package/runtime/extract/index.ts +3 -1
  755. package/runtime/extract/token.ts +41 -0
  756. package/runtime/extract/tokenResolver.ts +17 -0
  757. package/runtime/rsc/constants.ts +3 -0
  758. package/runtime/rsc/dev.ts +31 -15
  759. package/runtime/rsc/getClassName.ts +10 -0
  760. package/runtime/rsc/globalSheet.ts +130 -0
  761. package/runtime/rsc/observer.ts +125 -15
  762. package/runtime/rsc/styleStore.ts +10 -19
  763. package/runtime/sheet/document.ts +28 -0
  764. package/runtime/sheet/global-prod.ts +3 -5
  765. package/runtime/sheet/global.ts +3 -5
  766. package/runtime/sheet/rule.ts +18 -12
  767. package/runtime/sheet/rules.ts +11 -3
  768. package/runtime/style/scope.ts +0 -24
  769. package/runtime/style/style.ts +181 -6
  770. package/runtime/types.ts +3 -3
  771. package/sheet/dev/dev_layer.ts +76 -17
  772. package/sheet/dev/dev_sort.ts +70 -18
  773. package/sheet/dev/index.ts +23 -3
  774. package/sheet/ordered.ts +225 -0
  775. package/sheet/ordering.ts +156 -0
  776. package/sheet/prod.ts +39 -12
  777. package/sheet/types.ts +7 -0
  778. package/sheet/utils/layer.ts +34 -0
  779. package/style/classname.ts +12 -6
  780. package/style/important.ts +21 -0
  781. package/style/index.ts +2 -0
  782. package/style/style.ts +17 -5
  783. package/style/theme.ts +0 -1
  784. package/style/token.ts +28 -21
  785. package/style/tokens.ts +20 -13
  786. package/style/transform.ts +5 -4
  787. package/style/types.ts +6 -4
  788. package/style/utils/expose.ts +4 -3
  789. package/style/value.ts +26 -11
  790. package/style/valueRef.ts +1 -1
  791. package/style/weight.ts +21 -0
  792. package/utils/global.ts +1 -3
  793. package/utils/symbol.ts +3 -0
  794. package/utils/trace.ts +1 -0
  795. package/dist/assert-BGdigdr5.js.map +0 -1
  796. package/dist/className-Cuh2JNxO.js +0 -263
  797. package/dist/className-Cuh2JNxO.js.map +0 -1
  798. package/dist/className-W2kDyeVl.js +0 -144
  799. package/dist/className-W2kDyeVl.js.map +0 -1
  800. package/dist/compiler-BXcGyZUP.mjs.map +0 -1
  801. package/dist/config-C1k9vUrM.js.map +0 -1
  802. package/dist/config-CLYMN3_p.js +0 -26
  803. package/dist/config-CLYMN3_p.js.map +0 -1
  804. package/dist/config-DcYrUB-M.js +0 -6
  805. package/dist/config-oI_yS50f.js +0 -1
  806. package/dist/css-CELBp6Gu.js +0 -58
  807. package/dist/css-CELBp6Gu.js.map +0 -1
  808. package/dist/css-CohHH2tn.js.map +0 -1
  809. package/dist/css-D_DL1yOz.js +0 -237
  810. package/dist/css-D_DL1yOz.js.map +0 -1
  811. package/dist/css-DfH4Gb1c.js +0 -805
  812. package/dist/css-DfH4Gb1c.js.map +0 -1
  813. package/dist/data-Ze8GNiJm.js +0 -483
  814. package/dist/data-Ze8GNiJm.js.map +0 -1
  815. package/dist/debug-BefbXMq1.js +0 -15
  816. package/dist/debug-BefbXMq1.js.map +0 -1
  817. package/dist/debug-DLmUG3Vh.js +0 -172
  818. package/dist/debug-DLmUG3Vh.js.map +0 -1
  819. package/dist/debug-OG2wSB5R.js +0 -15
  820. package/dist/debug-OG2wSB5R.js.map +0 -1
  821. package/dist/dev-4TqJORRn.js +0 -75
  822. package/dist/dev-4TqJORRn.js.map +0 -1
  823. package/dist/dev-C2u78xuv.js.map +0 -1
  824. package/dist/elementMarker-BKzZyg5V.js.map +0 -1
  825. package/dist/extract-B9j4TBkU.js +0 -2
  826. package/dist/extract-CzWJeQi8.js +0 -121
  827. package/dist/extract-CzWJeQi8.js.map +0 -1
  828. package/dist/getClassName-C6690_nr.js.map +0 -1
  829. package/dist/global-C7GsCW6Y.js +0 -14
  830. package/dist/global-C7GsCW6Y.js.map +0 -1
  831. package/dist/global-zaCE-g1C.js.map +0 -1
  832. package/dist/hash-Bycpk3MR.js +0 -160
  833. package/dist/hash-Bycpk3MR.js.map +0 -1
  834. package/dist/jsx-Berx-L-r.js +0 -39
  835. package/dist/jsx-Berx-L-r.js.map +0 -1
  836. package/dist/jsx-DsMajv_M.js +0 -38
  837. package/dist/jsx-DsMajv_M.js.map +0 -1
  838. package/dist/jsx_runtime-CMdEXGNZ.js +0 -13
  839. package/dist/jsx_runtime-DPWo5qvV.js.map +0 -1
  840. package/dist/layer-DiNeeTgG.js +0 -94
  841. package/dist/layer-DiNeeTgG.js.map +0 -1
  842. package/dist/loader-DCT1Q9yi.mjs.map +0 -1
  843. package/dist/misc-o8pviMUi.mjs.map +0 -1
  844. package/dist/namedTokens-BUa6raTb.js.map +0 -1
  845. package/dist/presets-BhXa232U.js +0 -108
  846. package/dist/presets-BhXa232U.js.map +0 -1
  847. package/dist/property-BzZSTVIh.js +0 -406
  848. package/dist/property-BzZSTVIh.js.map +0 -1
  849. package/dist/rules-Dz7Pu2K6.js.map +0 -1
  850. package/dist/runtime-B3jHW9B1.js +0 -32
  851. package/dist/runtime-B3jHW9B1.js.map +0 -1
  852. package/dist/shared-B_gJf5uj.cjs.map +0 -1
  853. package/dist/shared-uAzFeq0x.mjs.map +0 -1
  854. package/dist/sheet-DasbRnvy.js +0 -7
  855. package/dist/sheet-DasbRnvy.js.map +0 -1
  856. package/dist/style-B0F1sgRZ.js +0 -5
  857. package/dist/style-BkeAZl0n.js.map +0 -1
  858. package/dist/style-CYXTs1iu.js +0 -771
  859. package/dist/style-CYXTs1iu.js.map +0 -1
  860. package/dist/style-DUztHzBz.js.map +0 -1
  861. package/dist/styleStore-BGJ2ZYtK.js +0 -2009
  862. package/dist/styleStore-BGJ2ZYtK.js.map +0 -1
  863. package/dist/styleStore-DVDp-gI-.js +0 -55
  864. package/dist/styleStore-DVDp-gI-.js.map +0 -1
  865. package/dist/token-CA1j7suG.js +0 -273
  866. package/dist/token-CA1j7suG.js.map +0 -1
  867. package/dist/token-CKXUECuU.js +0 -76
  868. package/dist/token-CKXUECuU.js.map +0 -1
  869. package/dist/token-DTOyFLmp.js +0 -58
  870. package/dist/token-DTOyFLmp.js.map +0 -1
  871. package/dist/transform-BTJOg8Hg.js.map +0 -1
  872. package/dist/utils-BsbfH6cd.js.map +0 -1
  873. package/dist/utils-CpA-dSpY.mjs +0 -97
  874. package/dist/utils-CpA-dSpY.mjs.map +0 -1
  875. package/dist/utils-D4YWF2K0.js.map +0 -1
  876. package/dist/utils-R6QadAsY.js +0 -170
  877. package/dist/utils-R6QadAsY.js.map +0 -1
  878. package/dist/value-CJG6EWe8.js +0 -85
  879. package/dist/value-CJG6EWe8.js.map +0 -1
  880. package/dist/value-D-ZcRzLA.js +0 -42
  881. package/dist/value-D-ZcRzLA.js.map +0 -1
  882. package/dist/value-DBtSe-9B.js +0 -1000
  883. package/dist/value-DBtSe-9B.js.map +0 -1
  884. package/dist/valueRef-CsLVJwjA.js +0 -16
  885. package/dist/valueRef-CsLVJwjA.js.map +0 -1
  886. package/dist/webpack-Fb9xF5jS.mjs.map +0 -1
  887. package/dist/withTokens-LRidu3Vc.js +0 -95
  888. package/dist/withTokens-LRidu3Vc.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-Ze8GNiJm.js","names":["withDebugSource"],"sources":["../builder/data/check_selector.ts","../builder/data/create.ts","../builder/data/merge/utils.ts","../builder/data/merge/scope.ts","../builder/data/merge/style.ts","../builder/data/selector.ts"],"sourcesContent":["import { assertSelector } from '../../selector/assert';\nimport type { Selector } from '../../selector/types';\nimport { traceError } from '../../utils/trace';\n\nexport function checkSelector(\n fnPrefix: string,\n fnName: string,\n fnSelector: Selector,\n arg: string,\n) {\n let message: string | null = null;\n\n try {\n assertSelector(fnSelector.assert, arg);\n } catch (error) {\n if (typeof error === 'string' && error.trim()) {\n message = error;\n } else if (typeof error === 'object' && error && error instanceof Error) {\n message = (error.message || '').trim();\n } else {\n message = 'selector is invalid: ' + arg;\n }\n }\n\n if (!message) return;\n\n const error = `${fnPrefix}${fnName}(${arg || ''}): ${message}`;\n\n throw traceError(error);\n}\n","import type { StyleTokenOverride } from '../../style/token';\nimport {\n BUILDER_CALLSITE,\n BUILDER_SCOPE,\n BUILDER_SCOPE_ID,\n BUILDER_SLOT_ID,\n BUILDER_STATE,\n BUILDER_TYPE,\n BUILDER_TYPE_SCOPE,\n BUILDER_TYPE_SCOPE_TARGET,\n BUILDER_TYPE_SLOT,\n BUILDER_TYPE_SLOT_OVERRIDE,\n BUILDER_TYPE_STYLE,\n BUILDER_TYPE_THEME,\n} from './const';\nimport type {\n BuilderCallsite,\n BuilderData,\n ScopeData,\n ScopeTargetData,\n SlotData,\n SlotOverrideData,\n StyleData,\n ThemeData,\n} from './data';\n\nexport function createStyleData<Style>(\n callsite: BuilderCallsite | null,\n): StyleData<Style> {\n return {\n [BUILDER_TYPE]: BUILDER_TYPE_STYLE,\n [BUILDER_STATE]: { items: [], lookup: {} },\n [BUILDER_CALLSITE]: callsite,\n };\n}\n\nexport function createSlotData<Style>(\n callsite: BuilderCallsite | null,\n slotId: string,\n): SlotData<Style> {\n return {\n [BUILDER_TYPE]: BUILDER_TYPE_SLOT,\n [BUILDER_STATE]: { items: [], lookup: {} },\n [BUILDER_CALLSITE]: callsite,\n [BUILDER_SLOT_ID]: slotId,\n };\n}\n\nexport function createSlotOverrideData<Style>(\n callsite: BuilderCallsite | null,\n slotId: string,\n): SlotOverrideData<Style> {\n return {\n [BUILDER_TYPE]: BUILDER_TYPE_SLOT_OVERRIDE,\n [BUILDER_STATE]: { items: [], lookup: {} },\n [BUILDER_CALLSITE]: callsite,\n [BUILDER_SLOT_ID]: slotId,\n };\n}\n\nexport function createScopeData(\n callsite: BuilderCallsite | null,\n): BuilderData<unknown, typeof BUILDER_TYPE_SCOPE> {\n return {\n [BUILDER_TYPE]: BUILDER_TYPE_SCOPE,\n [BUILDER_STATE]: { items: [], lookup: {} },\n [BUILDER_CALLSITE]: callsite,\n };\n}\n\nexport function createScopeTargetData(\n scope: ScopeData,\n slot: SlotData<any>,\n): ScopeTargetData {\n return {\n [BUILDER_TYPE]: BUILDER_TYPE_SCOPE_TARGET,\n [BUILDER_SCOPE]: scope,\n [BUILDER_SCOPE_ID]: slot[BUILDER_SLOT_ID],\n };\n}\n\nexport function createThemeData(\n callsite: BuilderCallsite | null,\n id: string,\n className: string,\n tokens: readonly StyleTokenOverride[],\n): ThemeData {\n return {\n [BUILDER_TYPE]: BUILDER_TYPE_THEME,\n [BUILDER_STATE]: { items: [], lookup: {} },\n [BUILDER_CALLSITE]: callsite,\n id,\n className,\n tokens,\n };\n}\n","import { DEV_CONFIG } from '../../../config/config/dev';\nimport { traceError } from '../../../utils/trace';\nimport { BUILDER_STATE, ITEM_RUNTIME_DEV, ITEM_RUNTIME_DEV_PLUGIN, ITEM_RUNTIME_PROD } from '../const';\nimport type { BuilderData } from '../data';\nimport type { DebugData } from '../debug';\nimport type { ItemRuntimeType, StateItem, StateLookup } from '../state';\n\nexport function cloneData<Data extends BuilderData, Source extends BuilderData>(\n data: Data,\n source: Source,\n debug: DebugData | null,\n merge = true,\n): [runtimeType: ItemRuntimeType, data: Data, items: StateItem[], lookup: StateLookup] {\n const runtimeType = DEV_CONFIG.isDev\n ? (debug ? ITEM_RUNTIME_DEV_PLUGIN : ITEM_RUNTIME_DEV)\n : ITEM_RUNTIME_PROD;\n\n const state = data[BUILDER_STATE];\n\n state.items = merge ? source[BUILDER_STATE].items.slice() : [];\n\n state.lookup = Object.assign(\n Object.create(null),\n merge ? source[BUILDER_STATE].lookup : null,\n );\n\n const lookup = state.lookup!;\n const items = state.items;\n\n return [runtimeType, data, items, lookup];\n}\n\nexport function logInvalidData(message: string, data: object) {\n console.log(traceError(message), 'data:', data);\n}\n","import { getAtomicClassName, getClassNameDedupe } from '../../../atomic/className';\nimport { CSS_CONFIG } from '../../../config/config/css';\nimport { DEBUG_CONFIG } from '../../../config/config/debug';\nimport { DEV_CONFIG } from '../../../config/config/dev';\nimport { getStyleTokenId, isStyleTokenOverrideData, type StyleTokenOverride } from '../../../style/token';\nimport { BUILDER_SLOT_ID, BUILDER_STATE, BUILDER_TYPE_SCOPE, BUILDER_TYPE_SLOT_OVERRIDE } from '../const';\nimport type { BuilderCallsite, ScopeData, SlotOverrideData } from '../data';\nimport { type DebugData, type DebugLoc, getDebugFieldCallsite, TRACE_STYLE, TRACE_VALUE } from '../debug';\nimport { isScopeData, isSlotOverrideData } from '../is';\nimport type { ItemSelector, ItemValue, RuntimeScopeItem, RuntimeSlotOverrideItem, StateItem } from '../state';\nimport { cloneData, logInvalidData } from './utils';\n\nexport type ScopeItem =\n | SlotOverrideData<any>\n | ScopeData\n | StyleTokenOverride\n | false\n | null\n | undefined;\n\nexport type ScopeItems =\n | ScopeItem\n | ScopeItem[];\n\nexport function mergeScopeData(\n scope: ScopeData,\n callsite: BuilderCallsite | null,\n items: ScopeItems | null,\n debug: DebugData | null,\n parentSelector: ItemSelector | null,\n scopeAtRule: ItemSelector | null,\n): ScopeData {\n if (!items) return scope;\n\n const sourceItems = Array.isArray(items) ? items : [items];\n const [runtimeType, data, styles, lookup] = cloneData(\n scope,\n scope,\n debug,\n );\n\n let source: ScopeItem;\n let item: StateItem;\n let lookupIndex: number;\n let priority: number | null;\n let value: ItemValue;\n let atRule: ItemSelector[] | null;\n let dedupe: string;\n let className: string;\n let itemDebug: DebugData | null | undefined;\n let itemCallsite: BuilderCallsite | null;\n\n for (let i = 0, len = sourceItems.length; i < len; i++) {\n source = sourceItems[i];\n if (!source) continue;\n\n if (isStyleTokenOverrideData(source)) {\n addTokenOverride(source, styles, lookup);\n continue;\n }\n\n if (isScopeData(source)) {\n const scopeItems = source[BUILDER_STATE].items;\n\n for (let j = 0, len = scopeItems.length; j < len; j++) {\n item = scopeItems[j];\n\n if (isStyleTokenOverrideData(item)) {\n addTokenOverride(item, styles, lookup);\n continue;\n }\n\n if (Array.isArray(item) || item.type !== BUILDER_TYPE_SCOPE) {\n logInvalidData('invalid scope data', { source, item });\n continue;\n }\n\n const sourceScopeItem = item as RuntimeScopeItem;\n\n atRule = scopeAtRule\n ? (sourceScopeItem.atRule ? [scopeAtRule].concat(sourceScopeItem.atRule) : [scopeAtRule])\n : sourceScopeItem.atRule;\n\n const scopeItem: RuntimeScopeItem = {\n ...sourceScopeItem,\n runtime: runtimeType,\n atRule,\n parentSelector: parentSelector ?? sourceScopeItem.parentSelector,\n };\n itemDebug = getMergedScopeDebug(debug, scopeItem);\n itemCallsite = getDebugFieldCallsite(itemDebug ?? null, scopeItem.property) ??\n callsite ??\n scopeItem.callsite;\n\n value = scopeItem.value;\n priority = null;\n\n if (Array.isArray(value)) {\n priority = value[1];\n value = value[0];\n }\n\n dedupe = getClassNameDedupe(\n scopeItem.property,\n priority,\n scopeItem.selector,\n scopeItem.parentSelector,\n scopeItem.atRule,\n );\n\n className = getAtomicClassName(\n scopeItem.property,\n priority,\n value,\n scopeItem.selector,\n scopeItem.parentSelector,\n scopeItem.atRule,\n itemCallsite,\n DEV_CONFIG.isLocalClassNameEnabled,\n DEBUG_CONFIG.isDebugClassNameEnabled,\n CSS_CONFIG.classNameFormat ?? null,\n scopeItem.transformClassName ?? null,\n CSS_CONFIG.transformClassNameFormat ?? null,\n );\n\n scopeItem.dedupe = dedupe;\n scopeItem.className = className;\n scopeItem.callsite = itemCallsite;\n scopeItem.debug = itemDebug ?? null;\n scopeItem.debugField = itemDebug ? scopeItem.property : null;\n\n const lookupKey = getScopeLookupKey(scopeItem.slotId, dedupe);\n lookupIndex = lookup[lookupKey];\n\n if (typeof lookupIndex === 'number') {\n styles[lookupIndex] = scopeItem;\n } else {\n lookup[lookupKey] = styles.push(scopeItem) - 1;\n }\n }\n\n continue;\n }\n\n if (!isSlotOverrideData(source)) {\n logInvalidData('invalid scope data', { source });\n continue;\n }\n\n const slotId = source[BUILDER_SLOT_ID];\n const overrideItems = source[BUILDER_STATE].items;\n\n for (let j = 0, len = overrideItems.length; j < len; j++) {\n item = overrideItems[j];\n\n if (Array.isArray(item) || isStyleTokenOverrideData(item) || item.type !== BUILDER_TYPE_SLOT_OVERRIDE) {\n logInvalidData('invalid scope data', { source, item });\n continue;\n }\n\n const overrideItem = item as RuntimeSlotOverrideItem;\n\n atRule = scopeAtRule\n ? (overrideItem.atRule ? [scopeAtRule].concat(overrideItem.atRule) : [scopeAtRule])\n : overrideItem.atRule;\n\n const scopeItem: RuntimeScopeItem = {\n type: BUILDER_TYPE_SCOPE,\n slotId,\n runtime: runtimeType,\n dedupe: '',\n className: '',\n property: overrideItem.property,\n value: overrideItem.value,\n transformClassName: overrideItem.transformClassName,\n token: overrideItem.token,\n selector: overrideItem.selector,\n atRule,\n callsite: overrideItem.callsite ?? callsite,\n debug: overrideItem.debug,\n debugField: overrideItem.debugField,\n parentSelector,\n };\n\n value = scopeItem.value;\n priority = null;\n\n if (Array.isArray(value)) {\n priority = value[1];\n value = value[0];\n }\n\n dedupe = getClassNameDedupe(\n scopeItem.property,\n priority,\n scopeItem.selector,\n parentSelector,\n scopeItem.atRule,\n );\n\n className = getAtomicClassName(\n scopeItem.property,\n priority,\n value,\n scopeItem.selector,\n parentSelector,\n scopeItem.atRule,\n scopeItem.callsite,\n DEV_CONFIG.isLocalClassNameEnabled,\n DEBUG_CONFIG.isDebugClassNameEnabled,\n CSS_CONFIG.classNameFormat ?? null,\n scopeItem.transformClassName ?? null,\n CSS_CONFIG.transformClassNameFormat ?? null,\n );\n\n scopeItem.dedupe = dedupe;\n scopeItem.className = className;\n\n const lookupKey = getScopeLookupKey(slotId, dedupe);\n lookupIndex = lookup[lookupKey];\n\n if (typeof lookupIndex === 'number') {\n styles[lookupIndex] = scopeItem;\n } else {\n lookup[lookupKey] = styles.push(scopeItem) - 1;\n }\n }\n }\n\n return data as ScopeData;\n}\n\nfunction addTokenOverride(\n item: StyleTokenOverride,\n styles: StateItem[],\n lookup: Record<string, number>,\n) {\n const lookupKey = getTokenLookupKey(getStyleTokenId(item));\n const lookupIndex = lookup[lookupKey];\n\n if (typeof lookupIndex === 'number') {\n styles[lookupIndex] = item;\n } else {\n lookup[lookupKey] = styles.push(item) - 1;\n }\n}\n\nfunction getMergedScopeDebug(\n debug: DebugData | null,\n item: RuntimeScopeItem,\n): DebugData | null | undefined {\n if (!debug) return item.debug;\n if (debug.fields?.[item.property]) return debug;\n\n const valueLoc = getRuntimeScopeItemValueLoc(item);\n if (!valueLoc) return debug;\n\n return {\n ...debug,\n fields: {\n ...debug.fields,\n [item.property]: {\n [TRACE_STYLE]: debug.loc,\n [TRACE_VALUE]: valueLoc,\n },\n },\n };\n}\n\nfunction getRuntimeScopeItemValueLoc(item: RuntimeScopeItem): DebugLoc | null {\n if (item.debug && item.debugField) {\n const loc = item.debug.fields?.[item.debugField];\n if (Array.isArray(loc)) return withDebugSource(loc, item.debug.sourceUrl, item.debug.code);\n if (loc) {\n const valueLoc = loc[TRACE_VALUE] ?? loc[TRACE_STYLE] ?? null;\n return valueLoc ? withDebugSource(valueLoc, item.debug.sourceUrl, item.debug.code) : null;\n }\n }\n\n return item.callsite\n ? [item.callsite.line, item.callsite.column, undefined, item.callsite.sourceUrl, item.callsite.sourceContent]\n : null;\n}\n\nfunction withDebugSource(\n loc: DebugLoc,\n sourceUrl: string,\n sourceContent: string | undefined,\n): DebugLoc {\n return loc[3] ? loc : [loc[0], loc[1], loc[2], sourceUrl, sourceContent];\n}\n\nfunction getScopeLookupKey(slotId: string, dedupe: string) {\n return slotId + '\\0' + dedupe;\n}\n\nfunction getTokenLookupKey(tokenId: string) {\n return 'token\\0' + tokenId;\n}\n","import { getAtomicClassName, getClassNameDedupe } from '../../../atomic/className';\nimport { getTokenVar } from '../../../atomic/token';\nimport { getCssVarRawFallback } from '../../../atomic/utils/css';\nimport { shouldAppendCssPx } from '../../../atomic/value';\nimport { CSS_CONFIG } from '../../../config/config/css';\nimport { DEBUG_CONFIG } from '../../../config/config/debug';\nimport { DEV_CONFIG } from '../../../config/config/dev';\nimport { isStyleTokenData, isStyleTokenOverrideData, type StyleTokenData } from '../../../style/token';\nimport { isClassNameValue } from '../../../style/transform';\nimport type { StyleObject, StyleValueTuple } from '../../../style/types';\nimport { type AtRuleRef, isAtRuleRef } from '../../../style/valueRef';\nimport {\n BUILDER_SLOT_ID,\n BUILDER_STATE,\n BUILDER_TYPE_SLOT,\n BUILDER_TYPE_SLOT_OVERRIDE,\n BUILDER_TYPE_STYLE,\n ITEM_VALUE_NUMBER_PX,\n ITEM_VALUE_TYPE_AT_RULE_REF,\n ITEM_VALUE_TYPE_VARIABLE,\n} from '../const';\nimport type { BuilderCallsite, BuilderData, StyleData } from '../data';\nimport {\n type DebugData,\n type DebugLoc,\n getDebugFieldCallsite,\n getDebugFieldVarName,\n TRACE_STYLE,\n TRACE_VALUE,\n} from '../debug';\nimport { isSlotData, isSlotOverrideData, isStyleData } from '../is';\nimport type { BuilderType, ItemSelector, ItemValue, RuntimeItem, RuntimeItemData, StateItem } from '../state';\nimport { cloneData, logInvalidData } from './utils';\n\nexport type CreateData<Data extends BuilderData> = (\n callsite: BuilderCallsite | null,\n data: Data,\n) => Data;\n\nexport function mergeBuilderData<Data extends BuilderData>(\n create: CreateData<Data>,\n callsite: BuilderCallsite | null,\n source: Data,\n style: StyleObject | StyleData | null,\n debug: DebugData | null,\n selector: ItemSelector | null,\n atRule: ItemSelector[] | null,\n type: BuilderType,\n): Data {\n if (!style) return source;\n\n const [runtimeType, data, styles, lookup] = cloneData(\n create(callsite, source),\n source,\n debug,\n );\n\n const slotId = isSlotData(source) || isSlotOverrideData(source)\n ? source[BUILDER_SLOT_ID]\n : null;\n\n const items: RuntimeItem[] = [];\n\n let item: StateItem;\n let itemData: RuntimeItemData;\n\n let valueRaw: unknown;\n let value: ItemValue;\n let priority: number | null;\n let itemCallsite: BuilderCallsite | null;\n let className: string;\n let dedupe: string;\n let token: StyleTokenData | null;\n let ref: AtRuleRef | null;\n let variableName: string | null;\n let transformClassName: string | null;\n let lookupIndex: number;\n\n if (isStyleData(style)) {\n const stylesItems = style[BUILDER_STATE].items;\n\n for (let i = 0, len = stylesItems.length; i < len; i++) {\n item = stylesItems[i];\n\n if (Array.isArray(item) || isStyleTokenOverrideData(item) || item.type !== BUILDER_TYPE_STYLE) {\n logInvalidData('invalid style data', { item, style });\n continue;\n }\n\n if (atRule) {\n item = Object.assign({}, item, {\n atRule: item.atRule ? atRule.concat(item.atRule) : atRule,\n });\n }\n\n // Re-type to SLOT/SLOT_OVERRIDE when this StyleData is used inside a slot context.\n // Without this, style.slot(...).media('...', style({...})) would keep the inner\n // items as BUILDER_TYPE_STYLE and they would not be resolved when the slot is used.\n if (type === BUILDER_TYPE_SLOT && slotId !== null) {\n item = Object.assign({}, item, { type: BUILDER_TYPE_SLOT, slotId });\n } else if (type === BUILDER_TYPE_SLOT_OVERRIDE && slotId !== null) {\n item = Object.assign({}, item, { type: BUILDER_TYPE_SLOT_OVERRIDE, slotId });\n }\n\n const itemDebug = getMergedStyleDebug(debug, item);\n const debugCallsite = getDebugFieldCallsite(itemDebug, item.property);\n if (debugCallsite) {\n item = Object.assign({}, item, {\n callsite: debugCallsite,\n debug: itemDebug,\n debugField: item.property,\n });\n }\n\n items.push(item);\n }\n } else {\n for (const property in style) {\n valueRaw = style[property as keyof typeof style];\n priority = null;\n\n if (Array.isArray(valueRaw) && valueRaw.length === 2 && typeof valueRaw[0] === 'number') {\n priority = (valueRaw as StyleValueTuple)[0];\n valueRaw = (valueRaw as StyleValueTuple)[1];\n }\n\n transformClassName = null;\n if (isClassNameValue(valueRaw)) {\n transformClassName = valueRaw.className;\n valueRaw = valueRaw.value;\n }\n\n ref = isAtRuleRef(valueRaw) ? valueRaw : null;\n if (ref) valueRaw = ref.value;\n\n token = isStyleTokenData(valueRaw) ? valueRaw : null;\n variableName = getDebugFieldVarName(debug, property);\n\n value = variableName && token\n ? getCssVarRawFallback(variableName, getTokenVar(token, CSS_CONFIG.tokenNameFormat ?? null))\n : token\n ? getTokenVar(token, CSS_CONFIG.tokenNameFormat ?? null)\n : String(valueRaw ?? '');\n\n value = priority !== null ? [value, priority] : value;\n itemCallsite = getDebugFieldCallsite(debug, property) ?? callsite;\n\n itemData = {\n runtime: runtimeType,\n debug,\n debugField: property,\n dedupe: '',\n className: '',\n property,\n value,\n transformClassName,\n variable: ref\n ? [ITEM_VALUE_TYPE_AT_RULE_REF, ref]\n : variableName && token\n ? [\n ITEM_VALUE_TYPE_VARIABLE,\n variableName,\n valueRaw,\n shouldAppendCssPx(property) ? ITEM_VALUE_NUMBER_PX : undefined,\n ]\n : ref\n ? [ITEM_VALUE_TYPE_AT_RULE_REF, ref]\n : undefined,\n token,\n selector,\n atRule,\n callsite: itemCallsite,\n };\n\n if (type === BUILDER_TYPE_STYLE) {\n items.push({ ...itemData, type: BUILDER_TYPE_STYLE });\n continue;\n }\n\n if (slotId === null) {\n logInvalidData('invalid style data', { property, style });\n continue;\n }\n\n if (type === BUILDER_TYPE_SLOT) {\n items.push({ ...itemData, type: BUILDER_TYPE_SLOT, slotId });\n continue;\n }\n\n if (type === BUILDER_TYPE_SLOT_OVERRIDE) {\n items.push({ ...itemData, type: BUILDER_TYPE_SLOT_OVERRIDE, slotId });\n continue;\n }\n\n logInvalidData('invalid style data', { property, style });\n }\n }\n\n if (!items.length) return data;\n\n for (let i = 0, len = items.length; i < len; i++) {\n item = items[i];\n\n if (Array.isArray(item) || isStyleTokenOverrideData(item)) {\n logInvalidData('invalid style data', { item, style });\n continue;\n }\n\n const runtimeItem = item as RuntimeItem;\n value = runtimeItem.value;\n priority = null;\n\n if (Array.isArray(value)) {\n priority = value[1];\n value = value[0];\n }\n\n dedupe = getClassNameDedupe(\n runtimeItem.property,\n priority,\n runtimeItem.selector,\n null,\n runtimeItem.atRule,\n );\n\n className = getAtomicClassName(\n runtimeItem.property,\n priority,\n value,\n runtimeItem.selector,\n null,\n runtimeItem.atRule,\n runtimeItem.callsite,\n DEV_CONFIG.isLocalClassNameEnabled,\n DEBUG_CONFIG.isDebugClassNameEnabled,\n CSS_CONFIG.classNameFormat ?? null,\n runtimeItem.transformClassName ?? null,\n CSS_CONFIG.transformClassNameFormat ?? null,\n );\n\n runtimeItem.dedupe = dedupe;\n runtimeItem.className = className;\n\n lookupIndex = lookup[dedupe];\n\n if (typeof lookupIndex === 'number') {\n styles[lookupIndex] = runtimeItem;\n } else {\n lookup[dedupe] = styles.push(runtimeItem) - 1;\n }\n }\n\n return data;\n}\n\nfunction getMergedStyleDebug(\n debug: DebugData | null,\n item: RuntimeItem,\n) {\n if (!debug) return null;\n if (debug.fields?.[item.property]) return debug;\n\n const valueLoc = getMergedItemValueLoc(item);\n if (!valueLoc) return debug;\n\n return {\n ...debug,\n fields: {\n ...debug.fields,\n [item.property]: {\n [TRACE_STYLE]: withDebugSource(debug.loc, debug),\n [TRACE_VALUE]: valueLoc,\n },\n },\n };\n}\n\nfunction getMergedItemValueLoc(item: RuntimeItem): DebugLoc | null {\n if (item.debug && item.debugField) {\n const loc = item.debug.fields?.[item.debugField];\n if (Array.isArray(loc)) return withDebugSource(loc, item.debug);\n if (loc) {\n const traceLoc = loc[TRACE_VALUE] ?? loc[TRACE_STYLE] ?? null;\n return traceLoc ? withDebugSource(traceLoc, item.debug) : null;\n }\n }\n\n return item.callsite\n ? [item.callsite.line, item.callsite.column, undefined, item.callsite.sourceUrl, item.callsite.sourceContent]\n : null;\n}\n\nfunction withDebugSource(loc: DebugLoc, debug: DebugData): DebugLoc {\n return loc[3] ? loc : [loc[0], loc[1], loc[2], debug.sourceUrl, debug.code];\n}\n","export const SELECTOR_BASE = '';\nexport const SELECTOR_ARG = '$';\nexport const SELECTOR_ARGS = '$$';\nexport const SELECTOR_MERGE = '...';\nexport const SELECTOR_AT_RULE = '@';\nexport const SELECTOR_MEDIA = '@media';\nexport const SELECTOR_CONTAINER = '@container';\n\nexport function normalizeSelectorArg(arg: string) {\n return arg.includes('\\n') ? arg.replace(/\\n/g, '') : arg;\n}\n"],"mappings":";;;;;;;;;;;;AAIA,SAAgB,cACd,UACA,QACA,YACA,KACA;CACA,IAAI,UAAyB;CAE7B,IAAI;EACF,eAAe,WAAW,QAAQ,GAAG;CACvC,SAAS,OAAO;EACd,IAAI,OAAO,UAAU,YAAY,MAAM,KAAK,GAC1C,UAAU;OACL,IAAI,OAAO,UAAU,YAAY,SAAS,iBAAiB,OAChE,WAAW,MAAM,WAAW,IAAI,KAAK;OAErC,UAAU,0BAA0B;CAExC;CAEA,IAAI,CAAC,SAAS;CAId,MAAM,WAAW,GAFA,WAAW,OAAO,GAAG,OAAO,GAAG,KAAK,SAE/B;AACxB;;;ACHA,SAAgB,gBACd,UACkB;CAClB,OAAO;GACJ,eAAA;GACA,gBAAgB;G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,15 +0,0 @@
1
- import { G as globalData } from "./value-DBtSe-9B.js";
2
- //#region config/config/debug.ts
3
- const DEFAULT_DEBUG_CONFIG = {
4
- isDebugClassNameEnabled: true,
5
- maxPropertyLength: 24,
6
- maxValueLength: 8,
7
- maxSelectorLength: 8,
8
- maxParentSelectorLength: 8,
9
- maxAtRuleLength: 10
10
- };
11
- const DEBUG_CONFIG = globalData("config.debug", () => ({ ...DEFAULT_DEBUG_CONFIG }));
12
- //#endregion
13
- export { DEBUG_CONFIG as t };
14
-
15
- //# sourceMappingURL=debug-BefbXMq1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug-BefbXMq1.js","names":[],"sources":["../config/config/debug.ts"],"sourcesContent":["import { globalData } from '../../utils/global';\n\nexport type DebugConfig = {\n isDebugClassNameEnabled: boolean;\n\n maxPropertyLength: number;\n maxValueLength: number;\n maxSelectorLength: number;\n maxParentSelectorLength: number;\n maxAtRuleLength: number;\n};\n\nexport const DEFAULT_DEBUG_CONFIG: DebugConfig = {\n isDebugClassNameEnabled: true,\n\n maxPropertyLength: 24,\n maxValueLength: 8,\n maxSelectorLength: 8,\n maxParentSelectorLength: 8,\n maxAtRuleLength: 10,\n};\n\nexport const DEBUG_CONFIG = globalData<DebugConfig>(\n 'config.debug',\n () => ({ ...DEFAULT_DEBUG_CONFIG }),\n);\n"],"mappings":";;AAYA,MAAa,uBAAoC;CAC/C,yBAAyB;CAEzB,mBAAmB;CACnB,gBAAgB;CAChB,mBAAmB;CACnB,yBAAyB;CACzB,iBAAiB;AACnB;AAEA,MAAa,eAAe,WAC1B,uBACO,EAAE,GAAG,qBAAqB,EACnC"}
@@ -1,172 +0,0 @@
1
- import { a as sanitizeCssIdentName, o as hashString } from "./css-CELBp6Gu.js";
2
- import { t as DEV_CONFIG } from "./dev-4TqJORRn.js";
3
- //#region utils/trace.ts
4
- const FN_MARKER = "$fn_";
5
- function traceMarker(fn, name) {
6
- Object.defineProperty(fn, "name", {
7
- value: FN_MARKER + name,
8
- configurable: true
9
- });
10
- }
11
- const CALLSITE_REGEX = /(.+):(\d+):(\d+)$/;
12
- function traceCallsite() {
13
- const lines = (traceAdjustError(/* @__PURE__ */ new Error()).stack || "").split("\n");
14
- const parsedFrames = lines.slice(1).map(parseStackFrame).filter((frame) => frame !== null);
15
- if (!parsedFrames.length) return null;
16
- const targetFrame = parsedFrames.find((frame) => !isInternalCallsite(frame.filePath)) ?? parsedFrames[0];
17
- return {
18
- stack: [lines[0] || "Error", createStackFrameLine(targetFrame)].join("\n"),
19
- filePath: targetFrame.filePath,
20
- sourceUrl: targetFrame.sourceUrl,
21
- line: targetFrame.line,
22
- column: targetFrame.column
23
- };
24
- }
25
- function parseStackFrame(lineText) {
26
- const match = getStackFrameLocationText(lineText).match(CALLSITE_REGEX);
27
- if (!match) return null;
28
- const rawFilePath = normalizeCallsiteSourceUrl(match[1]);
29
- return {
30
- filePath: normalizeCallsiteFilePath(rawFilePath),
31
- sourceUrl: isFetchableCallsiteSourceUrl(rawFilePath) ? rawFilePath : void 0,
32
- line: parseInt(match[2], 10),
33
- column: parseInt(match[3], 10)
34
- };
35
- }
36
- function getStackFrameLocationText(lineText) {
37
- let frame = lineText.trim().replace(/^at\s+/, "");
38
- if (frame.endsWith(")")) {
39
- const parenIndex = frame.lastIndexOf("(");
40
- if (parenIndex !== -1) frame = frame.slice(parenIndex + 1, -1);
41
- }
42
- return frame;
43
- }
44
- function normalizeCallsiteSourceUrl(source) {
45
- let filePath = source.trim();
46
- try {
47
- filePath = decodeURI(filePath);
48
- } catch {}
49
- if (filePath.startsWith("source:///at ") || filePath.startsWith("source:///at%20")) filePath = filePath.slice(10);
50
- const strayAtMatch = filePath.match(/(?:^|\/)at\s+([a-zA-Z][a-zA-Z\d+.-]*:\/\/.+|\/.+)$/);
51
- return strayAtMatch ? strayAtMatch[1] : filePath.replace(/^at\s+/, "");
52
- }
53
- function normalizeCallsiteFilePath(filePath) {
54
- filePath = normalizeCallsiteSourceUrl(filePath);
55
- const queryIndex = findFirstIndex(filePath, ["?", "#"]);
56
- if (queryIndex !== -1) filePath = filePath.substring(0, queryIndex);
57
- filePath = filePath.replace(/^file:\/\/\/?/, "");
58
- if (filePath.startsWith("/@fs/")) filePath = "/" + filePath.slice(5);
59
- const webpackInternalMatch = filePath.match(/^webpack-internal:\/\/\/(?:\([^)]+\)\/)?(.+)$/);
60
- if (webpackInternalMatch) filePath = webpackInternalMatch[1];
61
- const webpackSourceMatch = filePath.match(/^webpack:\/\/[^/]+\/(.+)$/);
62
- if (webpackSourceMatch) filePath = webpackSourceMatch[1];
63
- return filePath;
64
- }
65
- function isFetchableCallsiteSourceUrl(filePath) {
66
- return /^https?:\/\//.test(filePath) || filePath.startsWith("/");
67
- }
68
- function findFirstIndex(text, needles) {
69
- let index = -1;
70
- for (const needle of needles) {
71
- const next = text.indexOf(needle);
72
- if (next !== -1 && (index === -1 || next < index)) index = next;
73
- }
74
- return index;
75
- }
76
- function createStackFrameLine(frame) {
77
- return ` at ${frame.filePath}:${frame.line}:${frame.column}`;
78
- }
79
- function isInternalCallsite(filePath) {
80
- const normalized = filePath.replace(/\\/g, "/");
81
- return normalized.startsWith("node:") || normalized.startsWith("internal/") || normalized.includes("/node_modules/") || normalized.includes("/packages/style/dist/") || normalized.includes("/packages/style/builder/") || normalized.includes("/packages/style/runtime/") || normalized.includes("/packages/style/utils/trace.");
82
- }
83
- function traceError(message, options = {}) {
84
- const error = new Error(message || "");
85
- error.name = options.name || "StyleError";
86
- if (typeof options.stack === "string") {
87
- error.stack = options.stack;
88
- return error;
89
- }
90
- return traceAdjustError(error, options);
91
- }
92
- function traceAdjustError(error, options = {}) {
93
- const offset = options.offset ?? 0;
94
- const stack = error.stack;
95
- if (!stack) return error;
96
- const lines = stack.split("\n");
97
- const markerIndex = lines.findIndex((line) => line.includes(FN_MARKER));
98
- if (markerIndex === -1) return error;
99
- const traced = new Error(error.message);
100
- traced.name = error.name;
101
- const frameStartIndex = Math.max(markerIndex + 1 + offset, 1);
102
- let frames = lines.slice(frameStartIndex);
103
- if (options.limit) frames = frames.slice(0, options.limit);
104
- traced.stack = [lines[0], ...frames].join("\n");
105
- return traced;
106
- }
107
- function isDebugData(value) {
108
- if (!value || typeof value !== "object") return false;
109
- const data = value;
110
- return data.$$debug === true && Array.isArray(data.loc) && Array.isArray(data.label);
111
- }
112
- function getDebugCallsiteId(debug) {
113
- const label = debug.label[0] || debug.label[1];
114
- if (!label) return null;
115
- const hash = debug.sourceUrl + "\n" + debug.loc[0] + ":" + debug.loc[1] + "\n" + (debug.label[1] || label);
116
- return label + "_" + hashString(hash);
117
- }
118
- function getTraceCallsiteId(callsite) {
119
- return hashString(callsite.filePath + "\n" + callsite.line + ":" + callsite.column);
120
- }
121
- function getDebugCallsite(debug) {
122
- return createDebugCallsite(debug.loc, debug);
123
- }
124
- function getDebugFieldCallsite(debug, field) {
125
- if (!debug) return null;
126
- const loc = getDebugFieldLoc(debug, field);
127
- return loc ? createDebugCallsite(loc, debug) : null;
128
- }
129
- function getDebugFieldVarName(debug, field) {
130
- return debug?.vars?.[field] ?? null;
131
- }
132
- function getDebugFieldLoc(debug, field) {
133
- const loc = debug?.fields?.[field];
134
- if (!loc) return null;
135
- if (Array.isArray(loc)) return loc;
136
- return loc[DEV_CONFIG.sourcemapLocationMode === "value" ? 1 : 0] ?? loc[0] ?? loc[1] ?? null;
137
- }
138
- function createDebugCallsite(loc, debug) {
139
- const [line, column] = loc;
140
- const sourceUrl = loc[3] ?? debug.sourceUrl;
141
- const sourceContent = loc[4] ?? debug.code;
142
- return {
143
- stack: `Error\n at ${sourceUrl}:${line}:${column}`,
144
- filePath: sourceUrl,
145
- sourceUrl,
146
- sourceContent,
147
- line,
148
- column
149
- };
150
- }
151
- //#endregion
152
- //#region atomic/utils/debug.ts
153
- function normalizeDebugKeywordValue(value) {
154
- const normalized = value.trim().toLowerCase();
155
- return /^[a-z][a-z0-9-]*$/.test(normalized) ? normalized : null;
156
- }
157
- function sanitizeDebugName(value) {
158
- if (!value) return "";
159
- return sanitizeCssIdentName(value.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), "");
160
- }
161
- function normalizePropertyName(property) {
162
- return property.trim().replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/_/g, "-").toLowerCase();
163
- }
164
- function sanitizeDebugPropertyName(property) {
165
- let name = property;
166
- if (name.charCodeAt(0) === 45 && name.charCodeAt(1) === 45) name = name.slice(2);
167
- return name.replace(/[^a-z0-9_-]+/g, "-").replace(/[-_]+/g, "-").replace(/^-+|-+$/g, "");
168
- }
169
- //#endregion
170
- export { getDebugCallsite as a, getDebugFieldLoc as c, isDebugData as d, normalizeCallsiteSourceUrl as f, traceMarker as h, sanitizeDebugPropertyName as i, getDebugFieldVarName as l, traceError as m, normalizePropertyName as n, getDebugCallsiteId as o, traceCallsite as p, sanitizeDebugName as r, getDebugFieldCallsite as s, normalizeDebugKeywordValue as t, getTraceCallsiteId as u };
171
-
172
- //# sourceMappingURL=debug-DLmUG3Vh.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug-DLmUG3Vh.js","names":[],"sources":["../utils/trace.ts","../builder/data/debug.ts","../atomic/utils/debug.ts"],"sourcesContent":["const FN_MARKER = '$fn_';\n\nexport function traceMarker(fn: unknown, name: string) {\n Object.defineProperty(fn, 'name', {\n value: FN_MARKER + name,\n configurable: true,\n });\n}\n\n// Regex to capture file paths, line numbers, and column numbers from stack frames.\n// Handles standard paths and URLs after parenthesized frame labels are removed.\nconst CALLSITE_REGEX = /(.+):(\\d+):(\\d+)$/;\n\nexport type TraceCallsite = {\n stack: string;\n filePath: string;\n sourceUrl?: string;\n sourceContent?: string;\n line: number;\n column: number;\n};\n\nexport function traceCallsite(): TraceCallsite | null {\n const error = new Error();\n\n const adjustedError = traceAdjustError(error);\n const stack = adjustedError.stack || '';\n const lines = stack.split('\\n');\n\n const frames = lines.slice(1);\n const parsedFrames = frames.map(parseStackFrame).filter((frame) => frame !== null);\n if (!parsedFrames.length) return null;\n\n const targetFrame = parsedFrames.find((frame) => !isInternalCallsite(frame.filePath)) ??\n parsedFrames[0];\n\n return {\n stack: [lines[0] || 'Error', createStackFrameLine(targetFrame)].join('\\n'),\n filePath: targetFrame.filePath,\n sourceUrl: targetFrame.sourceUrl,\n line: targetFrame.line,\n column: targetFrame.column,\n };\n}\n\ntype ParsedStackFrame = {\n filePath: string;\n sourceUrl?: string;\n line: number;\n column: number;\n};\n\nfunction parseStackFrame(lineText: string): ParsedStackFrame | null {\n const match = getStackFrameLocationText(lineText).match(CALLSITE_REGEX);\n if (!match) return null;\n const rawFilePath = normalizeCallsiteSourceUrl(match[1]);\n\n return {\n filePath: normalizeCallsiteFilePath(rawFilePath),\n sourceUrl: isFetchableCallsiteSourceUrl(rawFilePath) ? rawFilePath : undefined,\n line: parseInt(match[2], 10),\n column: parseInt(match[3], 10),\n };\n}\n\nfunction getStackFrameLocationText(lineText: string) {\n let frame = lineText.trim().replace(/^at\\s+/, '');\n\n if (frame.endsWith(')')) {\n const parenIndex = frame.lastIndexOf('(');\n\n if (parenIndex !== -1) {\n frame = frame.slice(parenIndex + 1, -1);\n }\n }\n\n return frame;\n}\n\nexport function normalizeCallsiteSourceUrl(source: string) {\n let filePath = source.trim();\n\n try {\n filePath = decodeURI(filePath);\n } catch {\n // Keep the raw path if a bundler produced a partially escaped URL.\n }\n\n if (filePath.startsWith('source:///at ') || filePath.startsWith('source:///at%20')) {\n filePath = filePath.slice('source:///'.length);\n }\n\n const strayAtMatch = filePath.match(/(?:^|\\/)at\\s+([a-zA-Z][a-zA-Z\\d+.-]*:\\/\\/.+|\\/.+)$/);\n\n return strayAtMatch ? strayAtMatch[1] : filePath.replace(/^at\\s+/, '');\n}\n\nfunction normalizeCallsiteFilePath(filePath: string) {\n filePath = normalizeCallsiteSourceUrl(filePath);\n\n // strip query strings (e.g., file.ts?vue&type=script or file.js?v=123)\n const queryIndex = findFirstIndex(filePath, ['?', '#']);\n if (queryIndex !== -1) {\n filePath = filePath.substring(0, queryIndex);\n }\n\n // clean up potential absolute URL schemes left over by web bundlers (e.g., file:///)\n filePath = filePath.replace(/^file:\\/\\/\\/?/, '');\n\n if (filePath.startsWith('/@fs/')) {\n filePath = '/' + filePath.slice('/@fs/'.length);\n }\n\n const webpackInternalMatch = filePath.match(/^webpack-internal:\\/\\/\\/(?:\\([^)]+\\)\\/)?(.+)$/);\n if (webpackInternalMatch) {\n filePath = webpackInternalMatch[1];\n }\n\n const webpackSourceMatch = filePath.match(/^webpack:\\/\\/[^/]+\\/(.+)$/);\n if (webpackSourceMatch) {\n filePath = webpackSourceMatch[1];\n }\n\n return filePath;\n}\n\nfunction isFetchableCallsiteSourceUrl(filePath: string) {\n return /^https?:\\/\\//.test(filePath) || filePath.startsWith('/');\n}\n\nfunction findFirstIndex(text: string, needles: string[]) {\n let index = -1;\n\n for (const needle of needles) {\n const next = text.indexOf(needle);\n if (next !== -1 && (index === -1 || next < index)) index = next;\n }\n\n return index;\n}\n\nfunction createStackFrameLine(frame: ParsedStackFrame) {\n return ` at ${frame.filePath}:${frame.line}:${frame.column}`;\n}\n\nfunction isInternalCallsite(filePath: string) {\n const normalized = filePath.replace(/\\\\/g, '/');\n\n return normalized.startsWith('node:') ||\n normalized.startsWith('internal/') ||\n normalized.includes('/node_modules/') ||\n normalized.includes('/packages/style/dist/') ||\n normalized.includes('/packages/style/builder/') ||\n normalized.includes('/packages/style/runtime/') ||\n normalized.includes('/packages/style/utils/trace.');\n}\n\nexport type TraceErrorOptions = TraceAdjustErrorOptions & {\n stack?: string | null;\n name?: string | null;\n};\n\nexport function traceError(message: string | null, options: TraceErrorOptions = {}) {\n const error = new Error(message || '');\n\n error.name = options.name || 'StyleError';\n\n if (typeof options.stack === 'string') {\n error.stack = options.stack;\n return error;\n }\n\n return traceAdjustError(error, options);\n}\n\nexport type TraceAdjustErrorOptions = {\n offset?: number;\n limit?: number;\n};\n\nexport function traceAdjustError(error: Error, options: TraceAdjustErrorOptions = {}) {\n const offset = options.offset ?? 0;\n\n const stack = error.stack;\n\n if (!stack) return error;\n\n const lines = stack.split('\\n');\n\n const markerIndex = lines.findIndex((line) => line.includes(FN_MARKER));\n\n // marker not found\n if (markerIndex === -1) {\n return error;\n }\n\n const traced = new Error(error.message);\n traced.name = error.name;\n\n const frameStartIndex = Math.max(markerIndex + 1 + offset, 1);\n\n let frames = lines.slice(frameStartIndex);\n\n if (options.limit) {\n frames = frames.slice(0, options.limit);\n }\n\n traced.stack = [lines[0], ...frames].join('\\n');\n\n return traced;\n}\n","import { DEV_CONFIG } from '../../config/config/dev';\nimport { hashString } from '../../utils/hash';\nimport { type TraceCallsite } from '../../utils/trace';\n\nexport const LOC_LINE = 0;\nexport const LOC_COL = 1;\n\nexport const TRACE_STYLE = 0;\nexport const TRACE_VALUE = 1;\n\nexport const LABEL_SHORT = 0;\nexport const LABEL_LONG = 1;\nexport const LABEL_FILE = 2;\n\nexport type DebugLoc = [\n line: number,\n column: number,\n trace?: number,\n sourceUrl?: string,\n sourceContent?: string,\n];\n\ntype DebugLabel = [\n short: string,\n long: string,\n file: string,\n];\n\nexport type DebugData = {\n $$debug: true;\n loc: DebugLoc;\n label: DebugLabel;\n fields?: Record<string, DebugLoc | Record<number, DebugLoc>>;\n classNames?: Record<string, DebugLoc>;\n vars?: Record<string, string>;\n sourceUrl: string;\n code?: string;\n};\n\nexport function isDebugData(value: unknown): value is DebugData {\n if (!value || typeof value !== 'object') return false;\n\n const data = value as Partial<DebugData>;\n return data.$$debug === true && Array.isArray(data.loc) && Array.isArray(data.label);\n}\n\nexport function getDebugCallsiteId(debug: DebugData) {\n const label = debug.label[LABEL_SHORT] || debug.label[LABEL_LONG];\n\n if (!label) return null;\n\n const hash = debug.sourceUrl + '\\n' + debug.loc[LOC_LINE] + ':' + debug.loc[LOC_COL] + '\\n' +\n (debug.label[LABEL_LONG] || label);\n\n return label + '_' + hashString(hash);\n}\n\nexport function getTraceCallsiteId(callsite: TraceCallsite) {\n const hash = callsite.filePath + '\\n' + callsite.line + ':' + callsite.column;\n\n return hashString(hash);\n}\n\nexport function getDebugCallsite(debug: DebugData): TraceCallsite {\n return createDebugCallsite(debug.loc, debug);\n}\n\nexport function getDebugFieldCallsite(\n debug: DebugData | null,\n field: string,\n): TraceCallsite | null {\n if (!debug) return null;\n\n const loc = getDebugFieldLoc(debug, field);\n\n return loc ? createDebugCallsite(loc, debug) : null;\n}\n\nexport function getDebugFieldVarName(\n debug: DebugData | null,\n field: string,\n) {\n return debug?.vars?.[field] ?? null;\n}\n\nexport function getDebugFieldLoc(\n debug: DebugData | null,\n field: string,\n) {\n const loc = debug?.fields?.[field];\n if (!loc) return null;\n if (Array.isArray(loc)) return loc;\n\n const trace = DEV_CONFIG.sourcemapLocationMode === 'value'\n ? TRACE_VALUE\n : TRACE_STYLE;\n\n return loc[trace] ?? loc[TRACE_STYLE] ?? loc[TRACE_VALUE] ?? null;\n}\n\nfunction createDebugCallsite(loc: DebugLoc, debug: DebugData): TraceCallsite {\n const [line, column] = loc;\n const sourceUrl = loc[3] ?? debug.sourceUrl;\n const sourceContent = loc[4] ?? debug.code;\n\n return {\n stack: `Error\\n at ${sourceUrl}:${line}:${column}`,\n filePath: sourceUrl,\n sourceUrl,\n sourceContent,\n line,\n column,\n };\n}\n","import { sanitizeCssIdentName } from './css';\n\nexport function normalizeDebugKeywordValue(value: string) {\n const normalized = value.trim().toLowerCase();\n return /^[a-z][a-z0-9-]*$/.test(normalized) ? normalized : null;\n}\n\nexport function sanitizeDebugName(value: string | undefined) {\n if (!value) return '';\n\n const normalized = value\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .toLowerCase();\n\n return sanitizeCssIdentName(normalized, '');\n}\n\nexport function normalizePropertyName(property: string) {\n return property\n .trim()\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .replace(/_/g, '-')\n .toLowerCase();\n}\n\nexport function sanitizeDebugPropertyName(property: string) {\n let name = property;\n\n if (name.charCodeAt(0) === 45 && name.charCodeAt(1) === 45) {\n name =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,IAAI,aAAa;AAC7D;AAEA,SAAgB,kBAAkB,OAA2B;CAC3D,IAAI,CAAC,OAAO,OAAO;CAMnB,OAAO,qBAJY,MAChB,QAAQ,sBAAsB,OAAO,EACrC,YAEkC,GAAG,EAAE;AAC5C;AAEA,SAAgB,sBAAsB,UAAkB;CACtD,OAAO,SACJ,KAAK,EACL,QAAQ,sBAAsB,OAAO,EACrC,QAAQ,MAAM,GAAG,EACjB,YAAY;AACjB;AAEA,SAAgB,0BAA0B,UAAkB;CAC1D,IAAI,OAAO;CAEX,IAAI,KAAK,WAAW,CAAC,MAAM,MAAM,KAAK,WAAW,CAAC,MAAM,IACtD,OAAO,KAAK,MAAM,CAAC;CAGrB,OAAO,KACJ,QAAQ,iBAAiB,GAAG,EAC5B,QAAQ,UAAU,GAAG,EACrB,QAAQ,YAAY,EAAE;AAC3B"}
@@ -1,15 +0,0 @@
1
- import { n as globalData } from "./global-zaCE-g1C.js";
2
- //#region config/config/debug.ts
3
- const DEFAULT_DEBUG_CONFIG = {
4
- isDebugClassNameEnabled: true,
5
- maxPropertyLength: 24,
6
- maxValueLength: 8,
7
- maxSelectorLength: 8,
8
- maxParentSelectorLength: 8,
9
- maxAtRuleLength: 10
10
- };
11
- const DEBUG_CONFIG = globalData("config.debug", () => ({ ...DEFAULT_DEBUG_CONFIG }));
12
- //#endregion
13
- export { DEBUG_CONFIG as t };
14
-
15
- //# sourceMappingURL=debug-OG2wSB5R.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug-OG2wSB5R.js","names":[],"sources":["../config/config/debug.ts"],"sourcesContent":["import { globalData } from '../../utils/global';\n\nexport type DebugConfig = {\n isDebugClassNameEnabled: boolean;\n\n maxPropertyLength: number;\n maxValueLength: number;\n maxSelectorLength: number;\n maxParentSelectorLength: number;\n maxAtRuleLength: number;\n};\n\nexport const DEFAULT_DEBUG_CONFIG: DebugConfig = {\n isDebugClassNameEnabled: true,\n\n maxPropertyLength: 24,\n maxValueLength: 8,\n maxSelectorLength: 8,\n maxParentSelectorLength: 8,\n maxAtRuleLength: 10,\n};\n\nexport const DEBUG_CONFIG = globalData<DebugConfig>(\n 'config.debug',\n () => ({ ...DEFAULT_DEBUG_CONFIG }),\n);\n"],"mappings":";;AAYA,MAAa,uBAAoC;CAC/C,yBAAyB;CAEzB,mBAAmB;CACnB,gBAAgB;CAChB,mBAAmB;CACnB,yBAAyB;CACzB,iBAAiB;AACnB;AAEA,MAAa,eAAe,WAC1B,uBACO,EAAE,GAAG,qBAAqB,EACnC"}
@@ -1,75 +0,0 @@
1
- import { n as globalData } from "./global-zaCE-g1C.js";
2
- import { t as RUNTIME_CONFIG } from "./runtime-B3jHW9B1.js";
3
- import { s as normalizeHashLength } from "./css-CELBp6Gu.js";
4
- //#region utils/object.ts
5
- function set(target, field, data) {
6
- target[field] = data;
7
- }
8
- function unsetAll(obj) {
9
- for (const key of Object.keys(obj)) delete obj[key];
10
- }
11
- function hasOwn(target, field) {
12
- return Object.prototype.hasOwnProperty.call(target, field);
13
- }
14
- //#endregion
15
- //#region config/config/dev.ts
16
- const DEV_CONFIG_DEFAULT = {
17
- isDev: false,
18
- isCheckSelectorEnabled: true,
19
- isSourcemapEnabled: true,
20
- isLocalClassNameEnabled: true,
21
- sheetMaxRules: 1e3,
22
- sheetStyleTagNonce: null,
23
- hashLength: null,
24
- stylePriorityMode: "sort",
25
- sourcemapLocationMode: "style",
26
- isElementClassNameEnabled: true
27
- };
28
- const IS_DEV = globalData("config.dev.isDev", () => ({ isDev: false }));
29
- const DEV_CONFIG = globalData("config.dev", () => ({ ...DEV_CONFIG_DEFAULT }));
30
- const configPlugin = globalData("config.dev.plugin", () => ({ config: null }));
31
- const configBase = globalData("config.dev.base", () => ({ config: null }));
32
- const configUtils = globalData("config.dev.utils", () => ({ config: null }));
33
- function getBuildDevConfig() {
34
- return configPlugin.config;
35
- }
36
- function setBuildDevConfig(config) {
37
- const checkSelector = config.checkSelector === "force" ? false : config.checkSelector;
38
- IS_DEV.isDev = true;
39
- setOptions(configPlugin, {
40
- ...config,
41
- checkSelector
42
- }, null);
43
- rebuildDevConfig();
44
- }
45
- function setDevUtilsRuntimeOptions(options) {
46
- setOptions(configUtils, options, null);
47
- rebuildDevConfig();
48
- }
49
- function setDevRuntimeOptions(options) {
50
- setOptions(configBase, options, { ...DEV_CONFIG_DEFAULT });
51
- rebuildDevConfig();
52
- }
53
- function rebuildDevConfig() {
54
- unsetAll(DEV_CONFIG);
55
- Object.assign(DEV_CONFIG, DEV_CONFIG_DEFAULT, configBase.config, configPlugin.config, configUtils.config);
56
- DEV_CONFIG.isDev = IS_DEV.isDev;
57
- RUNTIME_CONFIG.changes += 1;
58
- }
59
- function setOptions(partialConfig, options, defaultConfig) {
60
- if (!options) {
61
- partialConfig.config = defaultConfig;
62
- return;
63
- }
64
- if (!partialConfig.config) partialConfig.config = defaultConfig || {};
65
- const config = partialConfig.config;
66
- if (options.priorityMode) config.stylePriorityMode = options.priorityMode;
67
- if (options.sourcemapMode) config.sourcemapLocationMode = options.sourcemapMode;
68
- if (typeof options.elementClassName === "boolean") config.isElementClassNameEnabled = options.elementClassName;
69
- if (typeof options.checkSelector === "boolean") config.isCheckSelectorEnabled = options.checkSelector;
70
- if (typeof options.hashLength === "number") config.hashLength = normalizeHashLength(options.hashLength);
71
- }
72
- //#endregion
73
- export { setDevUtilsRuntimeOptions as a, setDevRuntimeOptions as i, getBuildDevConfig as n, hasOwn as o, setBuildDevConfig as r, set as s, DEV_CONFIG as t };
74
-
75
- //# sourceMappingURL=dev-4TqJORRn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dev-4TqJORRn.js","names":[],"sources":["../utils/object.ts","../config/config/dev.ts"],"sourcesContent":["export function clone<T>(\n data: T | null | undefined,\n) {\n let cloned: Record<string, unknown> = {};\n\n for (let key in data) {\n cloned[key] = data[key];\n }\n\n return cloned as T;\n}\n\nexport function merge<T>(\n data1: T | null | undefined,\n data2: T | null | undefined,\n) {\n let merged: Record<string, unknown> = {};\n\n if (data1) {\n for (let key in data1) {\n merged[key] = data1[key];\n }\n }\n\n if (data2) {\n for (let key in data2) {\n merged[key] = data2[key];\n }\n }\n\n return merged as T;\n}\n\nexport function assign(\n target: unknown,\n data: object,\n) {\n for (let key in data) {\n (target as any)[key] = (data as any)[key];\n }\n}\n\nexport function set(\n target: unknown,\n field: string | symbol,\n data: unknown,\n) {\n (target as any)[field] = data;\n}\n\nexport function get(\n target: unknown,\n field: string | symbol,\n): unknown {\n return (target as any)[field] ?? null;\n}\n\nexport function unsetAll(obj: object) {\n for (const key of Object.keys(obj)) {\n delete (obj as any)[key];\n }\n}\n\nexport function hasOwn(\n target: object,\n field: PropertyKey,\n) {\n return Object.prototype.hasOwnProperty.call(target, field);\n}\n\nexport function toArray<T>(\n value: T | T[] | null | undefined,\n): T[] {\n return Array.isArray(value) ? value : (value ? [value] : []);\n}\n\nexport function isFunction(\n value: unknown,\n): value is Function {\n return typeof value === 'function';\n}\n\nexport function isPromiseLike<T>(\n value: T | Promise<T>,\n): value is Promise<T> {\n return typeof value === 'object' && value !== null && 'then' in value;\n}\n","import { globalData } from '../../utils/global';\nimport { normalizeHashLength } from '../../utils/hash';\nimport { unsetAll } from '../../utils/object';\nimport type { BuildDevConfig } from '../build';\nimport type { SourcemapLocationMode, StylePriorityMode } from '../types';\nimport { RUNTIME_CONFIG } from './runtime';\n\nexport type DevConfig = {\n isDev: boolean;\n\n isCheckSelectorEnabled: boolean;\n isSourcemapEnabled: boolean;\n isLocalClassNameEnabled: boolean;\n\n sheetMaxRules: number;\n sheetStyleTagNonce: string | null;\n hashLength: number | null;\n\n stylePriorityMode: StylePriorityMode;\n sourcemapLocationMode: SourcemapLocationMode;\n\n isElementClassNameEnabled: boolean;\n};\n\nexport const DEV_CONFIG_DEFAULT: DevConfig = {\n isDev: false,\n\n isCheckSelectorEnabled: true,\n isSourcemapEnabled: true,\n isLocalClassNameEnabled: true,\n\n sheetMaxRules: 1000,\n sheetStyleTagNonce: null,\n hashLength: null,\n\n stylePriorityMode: 'sort',\n sourcemapLocationMode: 'style',\n\n isElementClassNameEnabled: true,\n};\n\ntype PartialDevConfig = {\n config: Partial<DevConfig> | null;\n};\n\nexport const IS_DEV = globalData<{ isDev: boolean; }>(\n 'config.dev.isDev',\n () => ({ isDev: false }),\n);\n\nexport const DEV_CONFIG = globalData<DevConfig>(\n 'config.dev',\n () => ({ ...DEV_CONFIG_DEFAULT }),\n);\n\nexport const configPlugin = globalData<PartialDevConfig>(\n 'config.dev.plugin',\n () => ({ config: null }),\n);\n\nconst configBase = globalData<PartialDevConfig>(\n 'config.dev.base',\n () => ({ config: null }),\n);\n\nconst configUtils = globalData<PartialDevConfig>(\n 'config.dev.utils',\n () => ({ config: null }),\n);\n\nexport type DevRuntimeOptions = {\n priorityMode?: StylePriorityMode | null;\n sourcemapMode?: SourcemapLocationMode | null;\n elementClassName?: boolean | null;\n checkSelector?: boolean | null;\n hashLength?: number | null;\n};\n\nexport function getBuildDevConfig() {\n return configPlugin.config;\n}\n\nexport function setBuildDevConfig(config: BuildDevConfig) {\n const checkSelector = config.checkSelector === 'force' ? false : config.checkSelector;\n\n IS_DEV.isDev = true;\n\n setOptions(configPlugin, { ...config, checkSelector }, null);\n rebuildDevConfig();\n}\n\nexport function setDevUtilsRuntimeOptions(options: DevRuntimeOptions | null) {\n setOptions(configUtils, options, null);\n rebuildDevConfig();\n}\n\nexport function setDevRuntimeOptions(options: DevRuntimeOptions | null) {\n setOptions(configBase, options, { ...DEV_CONFIG_DEFAULT });\n rebuildDevConfig();\n}\n\nfunction rebuildDevConfig() {\n unsetAll(DEV_CONFIG);\n\n Object.assign(\n DEV_CONFIG,\n DEV_CONFIG_DEFAULT,\n configBase.config,\n configPlugin.config,\n configUtils.config,\n );\n\n DEV_CONFIG.isDev = IS_DEV.isDev;\n\n RUNTIME_CONFIG.changes += 1;\n}\n\nfunction setOptions(\n partialConfig: PartialDevConfig,\n options: DevRuntimeOptions | null,\n defaultConfig: DevConfig | null,\n) {\n if (!options) {\n partialConfig.config = defaultConfig;\n return;\n }\n\n if (!partialConfig.config) {\n partialConfig.config = defaultConfig || {};\n }\n\n const config = partialConfig.config;\n\n if (options.priorityMode) {\n config.stylePriorityMode = options.priorityMode;\n }\n\n if (options.sourcemapMode) {\n config.sourcemapLocationMode = options.sourcemapMode;\n }\n\n if (typeof options.elementClassName === 'boolean') {\n config.isElementClassNameEnabled = options.elementClassName;\n }\n\n if (typeof options.checkSelector === 'boolean') {\n config.isCheckSelectorEnabled = options.checkSelector;\n }\n\n if (typeof options.hashLength === 'number') {\n config.hashLength = normalizeHashLength(options.hashLength);\n }\n}\n"],"mappings":";;;;AA0CA,SAAgB,IACd,QACA,OACA,MACA;CACA,OAAgB,SAAS;AAC3B;AASA,SAAgB,SAAS,KAAa;CACpC,KAAK,MAAM,OAAO,OAAO,KAAK,GAAG,GAC/B,OAAQ,IAAY;AAExB;AAEA,SAAgB,OACd,QACA,OACA;CACA,OAAO,OAAO,UAAU,eAAe,KAAK,QAAQ,KAAK;AAC3D;;;AC5CA,MAAa,qBAAgC;CAC3C,OAAO;CAEP,wBAAwB;CACxB,oBAAoB;CACpB,yBAAyB;CAEzB,eAAe;CACf,oBAAoB;CACpB,YAAY;CAEZ,mBAAmB;CACnB,uBAAuB;CAEvB,2BAA2B;AAC7B;AAMA,MAAa,SAAS,WACpB,2BACO,EAAE,OAAO,MAAM,EACxB;AAEA,MAAa,aAAa,WACxB,qBACO,EAAE,GAAG,mBAAmB,EACjC;AAEA,MAAa,eAAe,WAC1B,4BACO,EAAE,QAAQ,KAAK,EACxB;AAEA,MAAM,aAAa,WACjB,0BACO,EAAE,QAAQ,KAAK,EACxB;AAEA,MAAM,cAAc,WAClB,2BACO,EAAE,QAAQ,KAAK,EACxB;AAUA,SAAgB,oBAAoB;CAClC,OAAO,aAAa;AACtB;AAEA,SAAgB,kBAAkB,QAAwB;CACxD,MAAM,gBAAgB,OAAO,kBAAkB,UAAU,QAAQ,OAAO;CAExE,OAAO,QAAQ;CAEf,WAAW,cAAc;EAAE,GAAG;EAAQ;CAAc,GAAG,IAAI;CAC3D,iBAAiB;AACnB;AAEA,SAAgB,0BAA0B,SAAmC;CAC3E,WAAW,aAAa,SAAS,IAAI;CACrC,iBAAiB;AACnB;AAEA,SAAgB,qBAAqB,SAAmC;CACtE,WAAW,YAAY,SAAS,EAAE,GAAG,mBAAmB,CAAC;CACzD,iBAAiB;AACnB;AAEA,SAAS,mBAAmB;CAC1B,SAAS,UAAU;CAEnB,OAAO,OACL,YACA,oBACA,WAAW,QACX,aAAa,QACb,YAAY,MACd;CAEA,WAAW,QAAQ,OAAO;CAE1B,eAAe,WAAW;AAC5B;AAEA,SAAS,WACP,eACA,SACA,eACA;CACA,IAAI,CAAC,SAAS;EACZ,cAAc,SAAS;EACvB;CACF;CAEA,IAAI,CAAC,cAAc,QACjB,cAAc,SAAS,iBAAiB,CAAC;CAG3C,MAAM,SAAS,cAAc;CAE7B,IAAI,QAAQ,cACV,OAAO,oBAAoB,QAAQ;CAGrC,IAAI,QAAQ,eACV,OAAO,wBAAwB,QAAQ;CAGzC,IAAI,OAAO,QAAQ,qBAAqB,WACtC,OAAO,4BAA4B,QAAQ;CAG7C,IAAI,OAAO,QAAQ,kBAAkB,WACnC,OAAO,yBAAyB,QAAQ;CAG1C,IAAI,OAAO,QAAQ,eAAe,UAChC,OAAO,aAAa,oBAAoB,QAAQ,UAAU;AAE9D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dev-C2u78xuv.js","names":["parseSourcemapMode"],"sources":["../dev/fns.ts","../dev/utils.ts","../dev/config.ts"],"sourcesContent":["import type { SourcemapLocationMode, StylePriorityMode } from '../config/types';\n\nconst StoragePrefix = '@fluentic/style.dev';\n\nexport const DefaultUtilsName = 'StyleDevUtils';\n\nexport const StorageKeys = {\n priorityMode: StoragePrefix + '.priorityMode',\n sourcemapMode: StoragePrefix + '.sourcemapTrace',\n elementMarker: StoragePrefix + '.elementMarker',\n startupMessage: StoragePrefix + '.startupMessage',\n};\n\nexport function createDevUtilsObject<T extends Record<string, unknown>>(object: T): T {\n return Object.assign(Object.create(null), object);\n}\n\nexport function getDevUtilsTarget(): Record<string, unknown> {\n return typeof globalThis.window === 'undefined'\n ? globalThis\n : globalThis.window as {};\n}\n\nexport function parsePriorityMode(value: string | null): StylePriorityMode | null {\n return value === 'layer' || value === 'sort' ? value : null;\n}\n\nexport function parseSourcemapTrace(value: string | null): SourcemapLocationMode | null {\n return value === 'style' || value === 'value' ? value : null;\n}\n\nexport function parseElementMarker(value: string | null): boolean | null {\n return value ? value === 'true' : null;\n}\n\nexport function getTraceStartMessage() {\n const items = [\n 'O_o [ tracing... ]',\n '(-_-) [ mapping... ]',\n '(^_-) [ decoding... ]',\n 'p(^_^)q [ hunting... ]',\n 'B-) [ analyzing... ]',\n ];\n\n const index = Math.floor(Math.random() * items.length);\n\n return items[index];\n}\n","import { CSS_CONFIG } from '../config/config/css';\nimport { CSS_EXTRA_CONFIG } from '../config/config/css_extra';\nimport { DEBUG_CONFIG } from '../config/config/debug';\nimport { DEV_CONFIG, getBuildDevConfig, setDevUtilsRuntimeOptions } from '../config/config/dev';\nimport { RUNTIME_CONFIG } from '../config/config/runtime';\nimport type { SourcemapLocationMode, StylePriorityMode } from '../config/types';\nimport { clearElementMarkers } from '../runtime/core/elementMarker';\nimport { refreshDevSourcemapTags, refreshDevStyleTags } from '../sheet/dev';\nimport {\n createDevUtilsObject,\n DefaultUtilsName,\n getDevUtilsTarget,\n getTraceStartMessage,\n parseElementMarker,\n parsePriorityMode,\n parseSourcemapTrace as parseSourcemapMode,\n StorageKeys,\n} from './fns';\n\nconst noopStorage = {\n getItem: () => null,\n removeItem: () => undefined,\n setItem: () => undefined,\n};\n\nconst getStorage = () => {\n const storage = globalThis.localStorage as Storage | undefined;\n\n return storage && typeof storage.getItem === 'function'\n ? storage\n : noopStorage;\n};\n\nexport type StyleDevUtilsOptions = {\n name?: string;\n silent?: boolean;\n};\n\nexport function enableStyleDevUtils(options: StyleDevUtilsOptions = {}) {\n const name = options.name ?? DefaultUtilsName;\n if (!name) return;\n\n applyPersistentDevConfig();\n\n const target = getDevUtilsTarget();\n if (!target) return;\n\n target[name] = getUtils(name);\n\n if (!options.silent) logCssDevUtilsEnabled(name);\n}\n\nfunction getUtils(displayName: string) {\n const setPriorityModeUtils = createDevUtilsObject({\n toLayer() {\n setPriorityMode('layer');\n return null;\n },\n\n toSort() {\n setPriorityMode('sort');\n return null;\n },\n });\n\n const setSourcemapModeUtils = createDevUtilsObject({\n toStyle() {\n setSourcemapMode('style');\n return null;\n },\n\n toValue() {\n setSourcemapMode('value');\n return null;\n },\n });\n\n const setElementMarkerUtils = createDevUtilsObject({\n toOn() {\n setElementMarkerMode(true);\n return null;\n },\n\n toOff() {\n setElementMarkerMode(false);\n return null;\n },\n });\n\n const startupMessageUtils = createDevUtilsObject({\n on() {\n getStorage().removeItem(StorageKeys.startupMessage);\n return null;\n },\n\n off() {\n getStorage().setItem(StorageKeys.startupMessage, 'off');\n return null;\n },\n });\n\n const baseUtils = createDevUtilsObject({\n usage() {\n logUsage(displayName);\n return null;\n },\n\n info() {\n logInfo(displayName);\n return null;\n },\n\n getConfig() {\n const config = {\n runtime: RUNTIME_CONFIG,\n dev: DEV_CONFIG,\n debug: DEBUG_CONFIG,\n css: CSS_CONFIG,\n cssExtra: CSS_EXTRA_CONFIG,\n };\n\n console.log(config);\n return null;\n },\n\n reset() {\n resetDevUtils();\n return null;\n },\n\n setPriorityMode: setPriorityModeUtils,\n\n setElementMarker: setElementMarkerUtils,\n\n startupMessage: startupMessageUtils,\n });\n\n const pluginUtils = createDevUtilsObject({\n ...baseUtils,\n setSourcemapMode: setSourcemapModeUtils,\n });\n\n if (enableRuntimeTraceSourcemap()) {\n return createDevUtilsObject({\n ...baseUtils,\n traceSourcemap() {\n traceSourcemap();\n return logTraceStart();\n },\n });\n }\n\n return pluginUtils;\n}\n\nfunction enableRuntimeTraceSourcemap() {\n return DEV_CONFIG.isDev && !RUNTIME_CONFIG.isPlugin;\n}\n\nfunction setSourcemapMode(mode: SourcemapLocationMode) {\n setDevUtilsRuntimeOptions({ sourcemapMode: mode });\n\n saveDevConfig();\n refreshDevSourcemapTags();\n\n logSourcemapMode(mode);\n}\n\nfunction setPriorityMode(mode: StylePriorityMode) {\n setDevUtilsRuntimeOptions({ priorityMode: mode });\n\n saveDevConfig();\n refreshDevStyleTags();\n\n logPriorityMode(mode);\n}\n\nfunction setElementMarkerMode(enabled: boolean) {\n const wasEnabled = DEV_CONFIG.isElementClassNameEnabled;\n\n if (enabled && isElementMarkerDisabledByPlugin()) {\n logElementMarkerDisabledByPlugin();\n return;\n }\n\n setDevUtilsRuntimeOptions({ elementClassName: enabled });\n\n if (!enabled) clearElementMarkers();\n saveDevConfig();\n\n logElementMarkerMode(enabled);\n\n if (enabled && !wasEnabled) {\n logElementMarkerReload();\n }\n}\n\nfunction applyPersistentDevConfig() {\n const storage = getStorage();\n\n const priorityMode = parsePriorityMode(storage.getItem(StorageKeys.priorityMode));\n const sourcemapMode = parseSourcemapMode(storage.getItem(StorageKeys.sourcemapMode));\n const elementClassName = parseElementMarker(storage.getItem(StorageKeys.elementMarker));\n const isDisabledByPlugin = isElementMarkerDisabledByPlugin();\n\n if (elementClassName === true && isDisabledByPlugin) {\n logElementMarkerDisabledByPlugin();\n }\n\n if (\n !priorityMode &&\n !sourcemapMode &&\n elementClassName === null\n ) return;\n\n setDevUtilsRuntimeOptions({\n priorityMode,\n sourcemapMode,\n elementClassName: elementClassName === true && isDisabledByPlugin ? null : elementClassName,\n });\n\n if (elementClassName === false) clearElementMarkers();\n}\n\nfunction writeStoredDevConfig() {\n const storage = getStorage();\n\n storage.setItem(\n StorageKeys.priorityMode,\n DEV_CONFIG.stylePriorityMode,\n );\n\n storage.setItem(\n StorageKeys.sourcemapMode,\n DEV_CONFIG.sourcemapLocationMode,\n );\n\n storage.setItem(\n StorageKeys.elementMarker,\n DEV_CONFIG.isElementClassNameEnabled ? 'true' : 'false',\n );\n}\n\nfunction removeStoredDevConfig() {\n const storage = getStorage();\n\n storage.removeItem(StorageKeys.priorityMode);\n storage.removeItem(StorageKeys.sourcemapMode);\n storage.removeItem(StorageKeys.elementMarker);\n}\n\nfunction saveDevConfig() {\n writeStoredDevConfig();\n}\n\nfunction resetDevUtils() {\n removeStoredDevConfig();\n setDevUtilsRuntimeOptions(null);\n\n refreshDevStyleTags();\n refreshDevSourcemapTags();\n clearElementMarkers();\n logReset();\n}\n\nasync function traceSourcemap() {\n const trace = await import('./trace');\n\n const result = await trace.traceDevSourcemaps();\n\n logTraceCompleted(result);\n\n return result;\n}\n\nfunction logTraceStart() {\n return getTraceStartMessage();\n}\n\nfunction logTraceCompleted(result: {\n tags: number;\n rules: number;\n remapped: number;\n unresolved: number;\n}) {\n console.log(\n '\\x1b[32m✔\\x1b[0m \\x1b[1m\\x1b[36m[sourcemap]\\x1b[0m trace completed ' +\n `\\x1b[2m(tags:${result.tags} rules:${result.rules} remapped:${result.remapped} unresolved:${result.unresolved})\\x1b[0m`,\n );\n}\n\nfunction logSourcemapMode(mode: SourcemapLocationMode) {\n const message = `sourcemap trace mode: ${mode}`;\n\n console.log(\n `\\x1b[32m✔\\x1b[0m \\x1b[1m\\x1b[36m[sourcemap]\\x1b[0m ${message}`,\n );\n}\n\nfunction logPriorityMode(mode: StylePriorityMode) {\n const message = `priority mode: ${mode}`;\n\n console.log(\n `\\x1b[32m✔\\x1b[0m \\x1b[1m\\x1b[36m[priority]\\x1b[0m ${message}`,\n );\n}\n\nfunction logElementMarkerMode(enabled: boolean) {\n console.log(\n `\\x1b[32m✔\\x1b[0m \\x1b[1m\\x1b[36m[element-marker]\\x1b[0m ${enabled ? 'on' : 'off'}`,\n );\n}\n\nfunction logElementMarkerReload() {\n console.log(\n '\\x1b[33m!\\x1b[0m \\x1b[1m\\x1b[36m[element-marker]\\x1b[0m reload the page to mark already-rendered elements',\n );\n}\n\nfunction logElementMarkerDisabledByPlugin() {\n console.log(\n '\\x1b[33m!\\x1b[0m \\x1b[1m\\x1b[36m[element-marker]\\x1b[0m disabled by plugin options',\n );\n}\n\nfunction logReset() {\n console.log(\n '\\x1b[32m✔\\x1b[0m \\x1b[1m\\x1b[36m[dev-utils]\\x1b[0m reset saved preferences',\n );\n}\n\nfunction logUsage(displayName: string) {\n console.group(`%c[${displayName}] usage`, 'font-weight:700;color:#a21caf');\n logUsageRows(displayName);\n console.groupEnd();\n}\n\nfunction logInfo(displayName: string) {\n console.group(`%c[${displayName}] info`, 'font-weight:700;color:#7c3aed');\n logInfoRows();\n console.groupEnd();\n}\n\nfunction logUsageRows(displayName: string) {\n const commands = getUsageCommands(displayName);\n\n for (const [command, description] of commands) {\n console.log(`%c${command}%c // ${description}`, 'color:#0891b2', 'color:#64748b');\n }\n}\n\nfunction logInfoRows() {\n const rows: string[][] = [\n ['Priority', getPriorityModeValue(), getPriorityModeDetail()],\n ['Sourcemap', getSourcemapLabel(), getSourcemapDetail()],\n ['ClassNames', getClassNameLabel(), getClassNameDetail()],\n ['ElementMark', getElementMarkerLabel(), getElementMarkerDetail()],\n ['CSS', getCssModeLabel(), getCssModeDetail()],\n ['Runtime', getRuntimeModeLabel(), getRuntimeDetail()],\n ['Plugin', getPluginLabel(), getPluginDetail()],\n ];\n\n for (const [label, value, detail] of rows) {\n if (!detail) {\n console.log(\n `%c${label.padEnd(12)}%c${value}`,\n 'font-weight:700;color:#7c3aed',\n 'font-weight:700;color:#111827',\n );\n continue;\n }\n\n console.log(\n `%c${label.padEnd(12)}%c${value}%c ${detail}`,\n 'font-weight:700;color:#7c3aed',\n 'font-weight:700;color:#111827',\n 'color:#64748b',\n );\n }\n}\n\nfunction getRuntimeModeLabel() {\n return DEV_CONFIG.isDev ? 'dev' : 'prod';\n}\n\nfunction getRuntimeDetail() {\n const details = [\n RUNTIME_CONFIG.isRSC ? 'RSC runtime.' : 'Client runtime.',\n RUNTIME_CONFIG.isHoist ? 'Hoisting is enabled.' : 'Hoisting is disabled.',\n ];\n\n return details.join(' / ');\n}\n\nfunction getPluginLabel() {\n return RUNTIME_CONFIG.isPlugin ? 'active' : 'none';\n}\n\nfunction getPluginDetail() {\n return RUNTIME_CONFIG.isPlugin\n ? 'Build metadata is available.'\n : 'Only runtime helpers are available.';\n}\n\nfunction getCssModeLabel() {\n return RUNTIME_CONFIG.isExtracted ? 'extracted' : 'runtime';\n}\n\nfunction getCssModeDetail() {\n if (DEV_CONFIG.stylePriorityMode === 'layer') {\n const layer = CSS_CONFIG.layer\n ? 'Rules are wrapped in the configured CSS layer.'\n : 'Rules are not wrapped in an output CSS layer.';\n\n return `${layer} Priority sublayers control order.`;\n }\n\n return CSS_CONFIG.layer\n ? 'Sorted rules are wrapped in the configured CSS layer.'\n : 'Sorted rules are emitted without an output CSS layer.';\n}\n\nfunction getPriorityModeValue() {\n return DEV_CONFIG.stylePriorityMode;\n}\n\nfunction getPriorityModeDetail() {\n return DEV_CONFIG.stylePriorityMode === 'layer'\n ? 'Cascade layers control priority.'\n : 'Rules are ordered by priority.';\n}\n\nfunction getSourcemapLabel() {\n return DEV_CONFIG.isSourcemapEnabled ? DEV_CONFIG.sourcemapLocationMode : 'off';\n}\n\nfunction getSourcemapDetail() {\n if (!DEV_CONFIG.isSourcemapEnabled) {\n return 'Sourcemaps are disabled.';\n }\n\n if (enableRuntimeTraceSourcemap()) {\n return 'Run traceSourcemap() to trace runtime callsites.';\n }\n\n return DEV_CONFIG.sourcemapLocationMode === 'style'\n ? 'Spread or merged values trace to the style site.'\n : 'Spread or merged values trace to the value source.';\n}\n\nfunction getClassNameLabel() {\n const labels = [\n DEBUG_CONFIG.isDebugClassNameEnabled ? 'debug' : '',\n DEV_CONFIG.isLocalClassNameEnabled ? 'local' : '',\n ].filter(Boolean);\n\n return labels.length > 0 ? labels.join(' + ') : 'hashed';\n}\n\nfunction getClassNameDetail() {\n return [\n DEBUG_CONFIG.isDebugClassNameEnabled ? 'Friendly names are enabled.' : 'Compact names are enabled.',\n DEV_CONFIG.isLocalClassNameEnabled ? 'Names are callsite-scoped.' : 'Names use global hashes.',\n ].join(' / ');\n}\n\nfunction getElementMarkerLabel() {\n return DEV_CONFIG.isElementClassNameEnabled ? 'on' : 'off';\n}\n\nfunction getElementMarkerDetail() {\n if (isElementMarkerDisabledByPlugin()) return 'Disabled by plugin options.';\n if (!DEV_CONFIG.isElementClassNameEnabled) return 'Element marker classes are disabled.';\n\n return CSS_CONFIG.elementClassNameFormat\n ? `Format ${CSS_CONFIG.elementClassNameFormat}`\n : '';\n}\n\nfunction isElementMarkerDisabledByPlugin() {\n return getBuildDevConfig()?.isElementClassNameEnabled === false;\n}\n\nfunction getUsageCommands(displayName: string) {\n const commands = [\n [`${displayName}.usage()`, 'Print this help text'],\n [`${displayName}.info()`, 'Print current debug status'],\n [`${displayName}.getConfig()`, 'Print current runtime config'],\n [`${displayName}.reset()`, 'Reset saved local debug preferences'],\n [`${displayName}.startupMessage.on()`, 'Show the initial helper message'],\n [`${displayName}.startupMessage.off()`, 'Hide the initial helper message'],\n [`${displayName}.setElementMarker.toOn()`, 'Add element source marker classes'],\n [`${displayName}.setElementMarker.toOff()`, 'Stop adding element source marker classes'],\n [`${displayName}.setPriorityMode.toLayer()`, 'Use layer priority mode'],\n [`${displayName}.setPriorityMode.toSort()`, 'Use sorted priority mode'],\n ];\n\n if (!enableRuntimeTraceSourcemap()) {\n commands.push(\n [`${displayName}.setSourcemapMode.toStyle()`, 'Map spread or merged values to the style site'],\n [`${displayName}.setSourcemapMode.toValue()`, 'Map spread or merged values to the value source'],\n );\n } else {\n commands.push([`${displayName}.traceSourcemap()`, 'Trace runtime sourcemaps']);\n }\n\n return commands;\n}\n\nfunction logCssDevUtilsEnabled(displayName: string) {\n console.groupCollapsed(\n `%c✨ %c[${displayName}] %cpriority=%c${DEV_CONFIG.stylePriorityMode}%c sourcemap=%c${DEV_CONFIG.sourcemapLocationMode}%c marker=%c${getElementMarkerLabel()}%c │ %cFor usage run %c${displayName}.usage()`,\n 'color:#eab308',\n 'font-weight:700;color:#a21caf',\n 'font-weight:700;color:#475569',\n 'font-weight:800;color:#d97706',\n 'font-weight:700;color:#475569',\n 'font-weight:800;color:#059669',\n 'font-weight:700;color:#475569',\n 'font-weight:800;color:#0f766e',\n 'color:#94a3b8',\n 'font-weight:700;color:#475569',\n 'font-weight:800;color:#0891b2',\n );\n\n logInfoRows();\n console.groupEnd();\n}\n","import { DEV_CONFIG, type DevRuntimeOptions, setDevRuntimeOptions } from '../config/config/dev';\nimport { enableStyleDevUtils, type StyleDevUtilsOptions } from './utils';\n\nexport type ConfigureStyleDevOptions = DevRuntimeOptions & {\n utils?: StyleDevUtilsOptions;\n};\n\nexport function configureStyleDev(options: ConfigureStyleDevOptions = {}) {\n const { utils, ...devOptions } = options;\n\n DEV_CONFIG.isDev = true;\n\n setDevRuntimeOptions(devOptions);\n\n if (utils) enableStyleDevUtils(utils);\n}\n"],"mappings":";;;;;AAMA,MAAa,cAAc;CACzB,cAAc;CACd,eAAe;CACf,eAAe;CACf,gBAAgB;AAClB;AAEA,SAAgB,qBAAwD,QAAc;CACpF,OAAO,OAAO,OAAO,OAAO,OAAO,IAAI,GAAG,MAAM;AAClD;AAEA,SAAgB,oBAA6C;CAC3D,OAAO,OAAO,WAAW,WAAW,cAChC,aACA,WAAW;AACjB;AAEA,SAAgB,kBAAkB,OAAgD;CAChF,OAAO,UAAU,WAAW,UAAU,SAAS,QAAQ;AACzD;AAEA,SAAgB,oBAAoB,OAAoD;CACtF,OAAO,UAAU,WAAW,UAAU,UAAU,QAAQ;AAC1D;AAEA,SAAgB,mBAAmB,OAAsC;CACvE,OAAO,QAAQ,UAAU,SAAS;AACpC;AAEA,SAAgB,uBAAuB;CACrC,MAAM,QAAQ;EACZ;EACA;EACA;EACA;EACA;CACF;CAIA,OAAO,MAFO,KAAK,MAAM,KAAK,OAAO,IAAI,MAAM,MAE9B;AACnB;;;AC5BA,MAAM,cAAc;CAClB,eAAe;CACf,kBAAkB,KAAA;CAClB,eAAe,KAAA;AACjB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