meno-core 1.0.53 → 1.0.54

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 (387) hide show
  1. package/.claude/settings.local.json +1 -3
  2. package/bin/cli.ts +48 -57
  3. package/build-astro.ts +131 -113
  4. package/build-next.ts +109 -96
  5. package/build-static.test.ts +39 -10
  6. package/build-static.ts +120 -122
  7. package/dist/bin/cli.js +34 -38
  8. package/dist/bin/cli.js.map +2 -2
  9. package/dist/build-static.js +12 -11
  10. package/dist/chunks/chunk-2AR55GYH.js +42 -0
  11. package/dist/chunks/chunk-2AR55GYH.js.map +7 -0
  12. package/dist/chunks/{chunk-IGYR22T6.js → chunk-2FN4UOVO.js} +512 -239
  13. package/dist/chunks/chunk-2FN4UOVO.js.map +7 -0
  14. package/dist/chunks/chunk-3XER4E5W.js +168 -0
  15. package/dist/chunks/chunk-3XER4E5W.js.map +7 -0
  16. package/dist/chunks/{chunk-X754AHS5.js → chunk-5ETZFREW.js} +9 -12
  17. package/dist/chunks/chunk-5ETZFREW.js.map +7 -0
  18. package/dist/chunks/{chunk-2MHDV5BF.js → chunk-7E4IF5L7.js} +15 -21
  19. package/dist/chunks/chunk-7E4IF5L7.js.map +7 -0
  20. package/dist/chunks/{chunk-JGWFTO6P.js → chunk-7HWQUVTU.js} +1578 -1349
  21. package/dist/chunks/chunk-7HWQUVTU.js.map +7 -0
  22. package/dist/chunks/{chunk-O3NAGJP4.js → chunk-AE3QK5QW.js} +110 -21
  23. package/dist/chunks/chunk-AE3QK5QW.js.map +7 -0
  24. package/dist/chunks/{chunk-GZHGVVW3.js → chunk-F6KTJYGV.js} +7 -7
  25. package/dist/chunks/chunk-F6KTJYGV.js.map +7 -0
  26. package/dist/chunks/{chunk-WQFG7PAH.js → chunk-FZITJSSS.js} +2 -6
  27. package/dist/chunks/chunk-FZITJSSS.js.map +7 -0
  28. package/dist/chunks/{chunk-QB2LNO4W.js → chunk-GSYYA5GX.js} +2 -2
  29. package/dist/chunks/chunk-GSYYA5GX.js.map +7 -0
  30. package/dist/chunks/{chunk-YBLHKYFF.js → chunk-HIZMY3EP.js} +1 -1
  31. package/dist/chunks/chunk-HIZMY3EP.js.map +7 -0
  32. package/dist/chunks/{chunk-AZQYF6KE.js → chunk-I2WEGYA7.js} +41 -176
  33. package/dist/chunks/chunk-I2WEGYA7.js.map +7 -0
  34. package/dist/chunks/{chunk-I7YIGZXT.js → chunk-JNO3CNLJ.js} +6 -9
  35. package/dist/chunks/chunk-JNO3CNLJ.js.map +7 -0
  36. package/dist/chunks/{chunk-UB44F4Z2.js → chunk-NVRBTSQG.js} +2 -4
  37. package/dist/chunks/chunk-NVRBTSQG.js.map +7 -0
  38. package/dist/chunks/{chunk-JGP5A3Y5.js → chunk-Q4OBWKXG.js} +40 -33
  39. package/dist/chunks/chunk-Q4OBWKXG.js.map +7 -0
  40. package/dist/chunks/{chunk-R6XHAFBF.js → chunk-QTE32Y53.js} +250 -242
  41. package/dist/chunks/chunk-QTE32Y53.js.map +7 -0
  42. package/dist/chunks/{chunk-H3GJ4H2U.js → chunk-STDY3OVM.js} +214 -85
  43. package/dist/chunks/chunk-STDY3OVM.js.map +7 -0
  44. package/dist/chunks/configService-PRJZF7Y6.js +14 -0
  45. package/dist/chunks/{constants-STK2YBIW.js → constants-KIQEYMAM.js} +2 -2
  46. package/dist/chunks/{fs-JGINUXGL.js → fs-ZI5JEU7V.js} +2 -2
  47. package/dist/entries/server-router.js +14 -19
  48. package/dist/entries/server-router.js.map +2 -2
  49. package/dist/lib/client/index.js +638 -332
  50. package/dist/lib/client/index.js.map +2 -2
  51. package/dist/lib/server/index.js +177 -235
  52. package/dist/lib/server/index.js.map +2 -2
  53. package/dist/lib/shared/index.js +80 -44
  54. package/dist/lib/shared/index.js.map +2 -2
  55. package/dist/lib/shared/richtext/index.js +1 -1
  56. package/dist/lib/test-utils/index.js +38 -60
  57. package/dist/lib/test-utils/index.js.map +2 -2
  58. package/entries/client-router.tsx +10 -8
  59. package/entries/server-router.tsx +1 -7
  60. package/lib/client/ClientInitializer.ts +8 -8
  61. package/lib/client/ErrorBoundary.test.tsx +146 -143
  62. package/lib/client/ErrorBoundary.tsx +175 -127
  63. package/lib/client/componentRegistry.test.ts +96 -108
  64. package/lib/client/componentRegistry.ts +1 -2
  65. package/lib/client/contexts/ThemeContext.tsx +3 -2
  66. package/lib/client/core/ComponentBuilder.test.ts +513 -560
  67. package/lib/client/core/ComponentBuilder.ts +318 -146
  68. package/lib/client/core/ComponentRenderer.test.tsx +1 -2
  69. package/lib/client/core/ComponentRenderer.tsx +46 -33
  70. package/lib/client/core/builders/embedBuilder.ts +241 -53
  71. package/lib/client/core/builders/linkBuilder.ts +71 -44
  72. package/lib/client/core/builders/linkNodeBuilder.ts +78 -53
  73. package/lib/client/core/builders/listBuilder.ts +115 -86
  74. package/lib/client/core/builders/localeListBuilder.ts +95 -60
  75. package/lib/client/core/builders/types.ts +5 -5
  76. package/lib/client/core/cmsTemplateProcessor.ts +7 -7
  77. package/lib/client/elementRegistry.ts +3 -3
  78. package/lib/client/fontFamiliesService.test.ts +2 -10
  79. package/lib/client/fontFamiliesService.ts +3 -3
  80. package/lib/client/hmr/HMRManager.tsx +8 -0
  81. package/lib/client/hmrCssReload.ts +14 -8
  82. package/lib/client/hmrWebSocket.ts +9 -14
  83. package/lib/client/hooks/useColorVariables.test.ts +21 -21
  84. package/lib/client/hooks/useColorVariables.ts +12 -10
  85. package/lib/client/hooks/usePropertyAutocomplete.ts +3 -5
  86. package/lib/client/hooks/useVariables.ts +4 -4
  87. package/lib/client/hydration/HydrationUtils.test.ts +24 -25
  88. package/lib/client/hydration/HydrationUtils.ts +3 -4
  89. package/lib/client/i18nConfigService.test.ts +2 -7
  90. package/lib/client/i18nConfigService.ts +2 -2
  91. package/lib/client/meno-filter/MenoFilter.test.ts +19 -21
  92. package/lib/client/meno-filter/MenoFilter.ts +5 -9
  93. package/lib/client/meno-filter/bindings.ts +15 -40
  94. package/lib/client/meno-filter/init.ts +1 -1
  95. package/lib/client/meno-filter/renderer.ts +23 -29
  96. package/lib/client/meno-filter/script.generated.ts +1 -3
  97. package/lib/client/meno-filter/ui.ts +3 -5
  98. package/lib/client/meno-filter/updates.ts +15 -21
  99. package/lib/client/navigation.test.ts +159 -159
  100. package/lib/client/navigation.ts +0 -1
  101. package/lib/client/responsiveStyleResolver.test.ts +230 -228
  102. package/lib/client/responsiveStyleResolver.ts +13 -16
  103. package/lib/client/routing/RouteLoader.test.ts +23 -24
  104. package/lib/client/routing/RouteLoader.ts +22 -35
  105. package/lib/client/routing/Router.tsx +31 -3
  106. package/lib/client/scripts/ScriptExecutor.test.ts +157 -158
  107. package/lib/client/scripts/ScriptExecutor.ts +15 -33
  108. package/lib/client/services/PrefetchService.test.ts +2 -2
  109. package/lib/client/services/PrefetchService.ts +10 -24
  110. package/lib/client/styleProcessor.test.ts +9 -9
  111. package/lib/client/styleProcessor.ts +18 -15
  112. package/lib/client/styles/StyleInjector.test.ts +122 -115
  113. package/lib/client/styles/StyleInjector.ts +9 -6
  114. package/lib/client/styles/UtilityClassCollector.ts +19 -26
  115. package/lib/client/styles/cspNonce.test.ts +2 -5
  116. package/lib/client/templateEngine.test.ts +554 -482
  117. package/lib/client/templateEngine.ts +200 -64
  118. package/lib/client/theme.ts +0 -1
  119. package/lib/client/utils/toast.ts +0 -1
  120. package/lib/server/__integration__/api-routes.test.ts +8 -4
  121. package/lib/server/__integration__/cms-integration.test.ts +1 -4
  122. package/lib/server/__integration__/server-lifecycle.test.ts +2 -5
  123. package/lib/server/__integration__/ssr-rendering.test.ts +47 -37
  124. package/lib/server/__integration__/static-assets.test.ts +1 -1
  125. package/lib/server/__integration__/test-helpers.ts +84 -70
  126. package/lib/server/ab/generateFunctions.ts +12 -10
  127. package/lib/server/astro/cmsPageEmitter.ts +23 -38
  128. package/lib/server/astro/componentEmitter.ts +25 -36
  129. package/lib/server/astro/cssCollector.ts +10 -26
  130. package/lib/server/astro/nodeToAstro.test.ts +1750 -30
  131. package/lib/server/astro/nodeToAstro.ts +198 -187
  132. package/lib/server/astro/normalizeOrphanTemplateProps.test.ts +105 -109
  133. package/lib/server/astro/normalizeOrphanTemplateProps.ts +4 -12
  134. package/lib/server/astro/pageEmitter.ts +9 -13
  135. package/lib/server/astro/tailwindMapper.test.ts +10 -37
  136. package/lib/server/astro/tailwindMapper.ts +33 -40
  137. package/lib/server/astro/templateTransformer.ts +14 -17
  138. package/lib/server/createServer.ts +5 -17
  139. package/lib/server/cssGenerator.test.ts +35 -44
  140. package/lib/server/cssGenerator.ts +6 -17
  141. package/lib/server/fileWatcher.test.ts +124 -10
  142. package/lib/server/fileWatcher.ts +124 -118
  143. package/lib/server/index.ts +7 -1
  144. package/lib/server/jsonLoader.test.ts +39 -2
  145. package/lib/server/jsonLoader.ts +33 -31
  146. package/lib/server/middleware/cors.test.ts +20 -20
  147. package/lib/server/middleware/cors.ts +28 -4
  148. package/lib/server/middleware/errorHandler.test.ts +5 -3
  149. package/lib/server/middleware/errorHandler.ts +3 -8
  150. package/lib/server/middleware/index.ts +0 -1
  151. package/lib/server/middleware/logger.test.ts +7 -5
  152. package/lib/server/middleware/logger.ts +10 -22
  153. package/lib/server/pageCache.test.ts +76 -77
  154. package/lib/server/pageCache.ts +0 -1
  155. package/lib/server/projectContext.ts +4 -3
  156. package/lib/server/providers/fileSystemCMSProvider.test.ts +124 -95
  157. package/lib/server/providers/fileSystemCMSProvider.ts +35 -20
  158. package/lib/server/providers/fileSystemPageProvider.test.ts +84 -0
  159. package/lib/server/providers/fileSystemPageProvider.ts +31 -12
  160. package/lib/server/routes/api/cms.test.ts +26 -14
  161. package/lib/server/routes/api/cms.ts +9 -14
  162. package/lib/server/routes/api/components.ts +30 -34
  163. package/lib/server/routes/api/config.ts +0 -1
  164. package/lib/server/routes/api/core-routes.ts +47 -74
  165. package/lib/server/routes/api/functions.ts +8 -16
  166. package/lib/server/routes/api/index.ts +3 -6
  167. package/lib/server/routes/api/pages.ts +8 -11
  168. package/lib/server/routes/api/shared.test.ts +1 -1
  169. package/lib/server/routes/api/shared.ts +12 -9
  170. package/lib/server/routes/api/variables.test.ts +1 -3
  171. package/lib/server/routes/api/variables.ts +1 -1
  172. package/lib/server/routes/index.ts +23 -26
  173. package/lib/server/routes/pages.ts +34 -29
  174. package/lib/server/routes/static.ts +16 -4
  175. package/lib/server/runtime/bundler.ts +47 -32
  176. package/lib/server/runtime/fs.ts +3 -13
  177. package/lib/server/runtime/httpServer.ts +5 -9
  178. package/lib/server/services/ColorService.ts +32 -27
  179. package/lib/server/services/EnumService.test.ts +2 -6
  180. package/lib/server/services/EnumService.ts +7 -2
  181. package/lib/server/services/VariableService.test.ts +1 -5
  182. package/lib/server/services/VariableService.ts +6 -1
  183. package/lib/server/services/cmsService.test.ts +116 -78
  184. package/lib/server/services/cmsService.ts +24 -54
  185. package/lib/server/services/componentService.test.ts +122 -36
  186. package/lib/server/services/componentService.ts +54 -38
  187. package/lib/server/services/configService.test.ts +9 -31
  188. package/lib/server/services/configService.ts +20 -27
  189. package/lib/server/services/fileWatcherService.ts +40 -6
  190. package/lib/server/services/index.ts +0 -1
  191. package/lib/server/services/pageService.test.ts +1 -3
  192. package/lib/server/services/pageService.ts +14 -13
  193. package/lib/server/ssr/attributeBuilder.ts +16 -6
  194. package/lib/server/ssr/buildErrorOverlay.ts +11 -12
  195. package/lib/server/ssr/clientDataInjector.ts +7 -21
  196. package/lib/server/ssr/cmsSSRProcessor.ts +3 -6
  197. package/lib/server/ssr/cssCollector.ts +1 -1
  198. package/lib/server/ssr/errorOverlay.test.ts +1 -1
  199. package/lib/server/ssr/errorOverlay.ts +3 -9
  200. package/lib/server/ssr/htmlGenerator.nonce.test.ts +3 -9
  201. package/lib/server/ssr/htmlGenerator.test.ts +120 -43
  202. package/lib/server/ssr/htmlGenerator.ts +120 -85
  203. package/lib/server/ssr/imageMetadata.test.ts +3 -1
  204. package/lib/server/ssr/imageMetadata.ts +25 -19
  205. package/lib/server/ssr/jsCollector.test.ts +3 -13
  206. package/lib/server/ssr/jsCollector.ts +3 -8
  207. package/lib/server/ssr/liveReloadIntegration.test.ts +69 -28
  208. package/lib/server/ssr/metaTagGenerator.ts +2 -2
  209. package/lib/server/ssr/ssrRenderer.branches.test.ts +1103 -0
  210. package/lib/server/ssr/ssrRenderer.test.ts +196 -246
  211. package/lib/server/ssr/ssrRenderer.ts +609 -225
  212. package/lib/server/ssrRenderer.test.ts +1044 -950
  213. package/lib/server/utils/jsonLineMapper.test.ts +28 -28
  214. package/lib/server/utils/jsonLineMapper.ts +1 -1
  215. package/lib/server/validateStyleCoverage.ts +18 -20
  216. package/lib/server/webflow/buildWebflow.ts +41 -53
  217. package/lib/server/webflow/nodeToWebflow.test.ts +150 -218
  218. package/lib/server/webflow/nodeToWebflow.ts +195 -258
  219. package/lib/server/webflow/styleMapper.test.ts +15 -56
  220. package/lib/server/webflow/styleMapper.ts +33 -41
  221. package/lib/server/webflow/types.ts +1 -8
  222. package/lib/server/websocketManager.ts +16 -19
  223. package/lib/shared/attributeNodeUtils.test.ts +15 -15
  224. package/lib/shared/attributeNodeUtils.ts +5 -12
  225. package/lib/shared/breakpoints.ts +4 -11
  226. package/lib/shared/cmsQueryParser.test.ts +50 -42
  227. package/lib/shared/cmsQueryParser.ts +49 -31
  228. package/lib/shared/colorVariableUtils.test.ts +5 -5
  229. package/lib/shared/colorVariableUtils.ts +3 -8
  230. package/lib/shared/componentRefs.ts +1 -5
  231. package/lib/shared/constants.test.ts +3 -3
  232. package/lib/shared/constants.ts +4 -8
  233. package/lib/shared/cssGeneration.test.ts +262 -144
  234. package/lib/shared/cssGeneration.ts +189 -516
  235. package/lib/shared/cssNamedColors.ts +152 -30
  236. package/lib/shared/cssProperties.test.ts +5 -6
  237. package/lib/shared/cssProperties.ts +296 -112
  238. package/lib/shared/elementClassName.test.ts +109 -109
  239. package/lib/shared/elementClassName.ts +1 -1
  240. package/lib/shared/elementUtils.ts +12 -16
  241. package/lib/shared/errorLogger.ts +2 -10
  242. package/lib/shared/errors.test.ts +2 -13
  243. package/lib/shared/errors.ts +2 -8
  244. package/lib/shared/expressionEvaluator.test.ts +119 -0
  245. package/lib/shared/expressionEvaluator.ts +43 -24
  246. package/lib/shared/fontLoader.test.ts +19 -5
  247. package/lib/shared/friendlyError.ts +2 -3
  248. package/lib/shared/gradientUtils.test.ts +1 -5
  249. package/lib/shared/gradientUtils.ts +2 -6
  250. package/lib/shared/hrefRefs.ts +2 -10
  251. package/lib/shared/i18n.test.ts +1 -1
  252. package/lib/shared/i18n.ts +13 -34
  253. package/lib/shared/index.ts +4 -0
  254. package/lib/shared/inlineSvgStyleRules.ts +2 -4
  255. package/lib/shared/interactiveStyleMappings.test.ts +11 -33
  256. package/lib/shared/interactiveStyleMappings.ts +9 -16
  257. package/lib/shared/interactiveStyles.test.ts +165 -188
  258. package/lib/shared/interfaces/contentProvider.ts +1 -1
  259. package/lib/shared/itemTemplateUtils.test.ts +6 -12
  260. package/lib/shared/itemTemplateUtils.ts +19 -35
  261. package/lib/shared/jsonRepair.ts +8 -2
  262. package/lib/shared/libraryLoader.test.ts +15 -49
  263. package/lib/shared/libraryLoader.ts +7 -22
  264. package/lib/shared/netlifyLocale404.test.ts +179 -0
  265. package/lib/shared/netlifyLocale404.ts +110 -0
  266. package/lib/shared/nodeUtils.test.ts +24 -16
  267. package/lib/shared/nodeUtils.ts +49 -19
  268. package/lib/shared/pathArrayUtils.test.ts +1 -2
  269. package/lib/shared/pathArrayUtils.ts +1 -1
  270. package/lib/shared/pathSecurity.ts +1 -1
  271. package/lib/shared/pathUtils.test.ts +4 -6
  272. package/lib/shared/pathUtils.ts +42 -48
  273. package/lib/shared/paths/Path.test.ts +2 -2
  274. package/lib/shared/paths/Path.ts +0 -1
  275. package/lib/shared/paths/PathConverter.test.ts +1 -1
  276. package/lib/shared/paths/PathConverter.ts +14 -17
  277. package/lib/shared/paths/PathUtils.ts +9 -10
  278. package/lib/shared/paths/PathValidator.test.ts +2 -15
  279. package/lib/shared/paths/PathValidator.ts +11 -9
  280. package/lib/shared/paths/index.ts +1 -2
  281. package/lib/shared/propResolver.test.ts +240 -244
  282. package/lib/shared/propResolver.ts +14 -25
  283. package/lib/shared/pxToRem.test.ts +7 -6
  284. package/lib/shared/pxToRem.ts +2 -5
  285. package/lib/shared/registry/BaseNodeTypeRegistry.test.ts +9 -5
  286. package/lib/shared/registry/ClientRegistry.ts +0 -1
  287. package/lib/shared/registry/ComponentRegistry.test.ts +43 -29
  288. package/lib/shared/registry/ComponentRegistry.ts +9 -11
  289. package/lib/shared/registry/NodeTypeDefinition.ts +15 -8
  290. package/lib/shared/registry/RegistryManager.ts +1 -2
  291. package/lib/shared/registry/SSRRegistry.ts +0 -1
  292. package/lib/shared/registry/createNodeType.ts +7 -9
  293. package/lib/shared/registry/defineNodeType.ts +2 -6
  294. package/lib/shared/registry/index.ts +0 -1
  295. package/lib/shared/registry/nodeTypes/ComponentInstanceNodeType.ts +14 -15
  296. package/lib/shared/registry/nodeTypes/EmbedNodeType.ts +18 -11
  297. package/lib/shared/registry/nodeTypes/HtmlNodeType.ts +47 -18
  298. package/lib/shared/registry/nodeTypes/LinkNodeType.ts +21 -19
  299. package/lib/shared/registry/nodeTypes/ListNodeType.ts +78 -74
  300. package/lib/shared/registry/nodeTypes/LocaleListNodeType.ts +27 -21
  301. package/lib/shared/registry/nodeTypes/SlotMarkerType.ts +6 -7
  302. package/lib/shared/registry/nodeTypes/index.ts +10 -2
  303. package/lib/shared/responsiveScaling.test.ts +15 -31
  304. package/lib/shared/responsiveScaling.ts +55 -37
  305. package/lib/shared/responsiveStyleUtils.ts +11 -13
  306. package/lib/shared/richtext/htmlToTiptap.test.ts +23 -14
  307. package/lib/shared/richtext/htmlToTiptap.ts +1 -3
  308. package/lib/shared/richtext/tiptapToHtml.test.ts +5 -6
  309. package/lib/shared/richtext/types.ts +1 -8
  310. package/lib/shared/slugTranslator.test.ts +13 -13
  311. package/lib/shared/slugTranslator.ts +12 -16
  312. package/lib/shared/slugify.ts +9 -15
  313. package/lib/shared/styleNodeUtils.test.ts +8 -8
  314. package/lib/shared/styleNodeUtils.ts +5 -10
  315. package/lib/shared/styleUtils.test.ts +87 -61
  316. package/lib/shared/styleUtils.ts +5 -6
  317. package/lib/shared/themeDefaults.test.ts +11 -11
  318. package/lib/shared/themeDefaults.ts +3 -4
  319. package/lib/shared/tree/PathBuilder.test.ts +62 -138
  320. package/lib/shared/tree/PathBuilder.ts +49 -39
  321. package/lib/shared/treePathUtils.test.ts +2 -10
  322. package/lib/shared/treePathUtils.ts +54 -59
  323. package/lib/shared/types/api.ts +1 -2
  324. package/lib/shared/types/cms.ts +25 -21
  325. package/lib/shared/types/comment.ts +49 -16
  326. package/lib/shared/types/components.ts +27 -25
  327. package/lib/shared/types/errors.test.ts +1 -6
  328. package/lib/shared/types/errors.ts +3 -7
  329. package/lib/shared/types/experiments.ts +28 -28
  330. package/lib/shared/types/index.ts +2 -2
  331. package/lib/shared/types/styles.ts +0 -1
  332. package/lib/shared/types/variables.test.ts +4 -13
  333. package/lib/shared/types/variables.ts +48 -27
  334. package/lib/shared/types.ts +1 -2
  335. package/lib/shared/utilityClassConfig.ts +648 -321
  336. package/lib/shared/utilityClassMapper.test.ts +203 -92
  337. package/lib/shared/utilityClassMapper.ts +188 -246
  338. package/lib/shared/utilityClassNames.ts +326 -0
  339. package/lib/shared/utils.test.ts +2 -10
  340. package/lib/shared/utils.ts +19 -10
  341. package/lib/shared/validation/cmsValidators.ts +2 -1
  342. package/lib/shared/validation/commentValidators.test.ts +53 -0
  343. package/lib/shared/validation/commentValidators.ts +12 -1
  344. package/lib/shared/validation/propValidator.test.ts +18 -20
  345. package/lib/shared/validation/propValidator.ts +12 -17
  346. package/lib/shared/validation/schemas.test.ts +24 -33
  347. package/lib/shared/validation/schemas.ts +469 -344
  348. package/lib/shared/validation/validators.test.ts +1 -6
  349. package/lib/shared/validation/validators.ts +89 -68
  350. package/lib/shared/viewportUnits.integration.test.ts +14 -10
  351. package/lib/shared/viewportUnits.test.ts +11 -23
  352. package/lib/test-utils/dom-setup.ts +1 -1
  353. package/lib/test-utils/factories/ConsoleMockFactory.ts +3 -7
  354. package/lib/test-utils/factories/DomMockFactory.ts +7 -19
  355. package/lib/test-utils/factories/EventMockFactory.ts +7 -13
  356. package/lib/test-utils/factories/FetchMockFactory.ts +39 -57
  357. package/lib/test-utils/factories/ServerMockFactory.ts +5 -9
  358. package/lib/test-utils/factories/StoreMockFactory.ts +14 -25
  359. package/lib/test-utils/fixtures.ts +45 -45
  360. package/lib/test-utils/helpers/asyncHelpers.test.ts +15 -18
  361. package/lib/test-utils/helpers/asyncHelpers.ts +11 -20
  362. package/lib/test-utils/helpers.ts +1 -5
  363. package/lib/test-utils/index.ts +0 -4
  364. package/lib/test-utils/mockFactories.ts +12 -18
  365. package/lib/test-utils/mocks.ts +4 -2
  366. package/package.json +1 -1
  367. package/scripts/build-meno-filter.ts +1 -4
  368. package/vite.config.ts +4 -4
  369. package/dist/chunks/chunk-2MHDV5BF.js.map +0 -7
  370. package/dist/chunks/chunk-AZQYF6KE.js.map +0 -7
  371. package/dist/chunks/chunk-GZHGVVW3.js.map +0 -7
  372. package/dist/chunks/chunk-H3GJ4H2U.js.map +0 -7
  373. package/dist/chunks/chunk-I7YIGZXT.js.map +0 -7
  374. package/dist/chunks/chunk-IGYR22T6.js.map +0 -7
  375. package/dist/chunks/chunk-JGP5A3Y5.js.map +0 -7
  376. package/dist/chunks/chunk-JGWFTO6P.js.map +0 -7
  377. package/dist/chunks/chunk-O3NAGJP4.js.map +0 -7
  378. package/dist/chunks/chunk-QB2LNO4W.js.map +0 -7
  379. package/dist/chunks/chunk-R6XHAFBF.js.map +0 -7
  380. package/dist/chunks/chunk-UB44F4Z2.js.map +0 -7
  381. package/dist/chunks/chunk-WQFG7PAH.js.map +0 -7
  382. package/dist/chunks/chunk-X754AHS5.js.map +0 -7
  383. package/dist/chunks/chunk-YBLHKYFF.js.map +0 -7
  384. package/dist/chunks/configService-R3OGU2UD.js +0 -13
  385. /package/dist/chunks/{configService-R3OGU2UD.js.map → configService-PRJZF7Y6.js.map} +0 -0
  386. /package/dist/chunks/{constants-STK2YBIW.js.map → constants-KIQEYMAM.js.map} +0 -0
  387. /package/dist/chunks/{fs-JGINUXGL.js.map → fs-ZI5JEU7V.js.map} +0 -0
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  DEFAULT_BREAKPOINTS,
3
3
  DEFAULT_FLUID_RANGE,
4
- DEFAULT_I18N_CONFIG,
5
4
  SCALABLE_CSS_PROPERTIES,
6
5
  applyRemConversion,
7
6
  buildFluidClampWithExplicitMin,
@@ -11,21 +10,24 @@ import {
11
10
  getBreakpointValues,
12
11
  getScaleMultiplier,
13
12
  getSmallestBreakpointName,
14
- isI18nValue,
15
13
  parseValue,
16
- resolveI18nInProps,
17
- resolveI18nValue,
18
14
  scalePropertyValue,
19
15
  shouldConvertProperty
20
- } from "./chunk-AZQYF6KE.js";
16
+ } from "./chunk-I2WEGYA7.js";
17
+ import {
18
+ DEFAULT_I18N_CONFIG,
19
+ isI18nValue,
20
+ resolveI18nInProps,
21
+ resolveI18nValue
22
+ } from "./chunk-3XER4E5W.js";
21
23
  import {
22
24
  isTiptapDocument,
23
25
  tiptapToHtml
24
- } from "./chunk-UB44F4Z2.js";
26
+ } from "./chunk-NVRBTSQG.js";
25
27
  import {
26
28
  NODE_TYPE,
27
29
  init_constants
28
- } from "./chunk-YBLHKYFF.js";
30
+ } from "./chunk-HIZMY3EP.js";
29
31
  import {
30
32
  __esm,
31
33
  __export,
@@ -39,8 +41,27 @@ var init_schemas = __esm({
39
41
  "lib/shared/validation/schemas.ts"() {
40
42
  "use strict";
41
43
  init_constants();
42
- BasePropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text", "embed"]);
43
- PropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text", "embed", "list"]);
44
+ BasePropTypeSchema = z.enum([
45
+ "string",
46
+ "select",
47
+ "boolean",
48
+ "number",
49
+ "link",
50
+ "file",
51
+ "rich-text",
52
+ "embed"
53
+ ]);
54
+ PropTypeSchema = z.enum([
55
+ "string",
56
+ "select",
57
+ "boolean",
58
+ "number",
59
+ "link",
60
+ "file",
61
+ "rich-text",
62
+ "embed",
63
+ "list"
64
+ ]);
44
65
  I18nValueObjectSchema = z.object({
45
66
  _i18n: z.literal(true)
46
67
  }).passthrough();
@@ -68,19 +89,21 @@ var init_schemas = __esm({
68
89
  itemSchema: ListItemSchemaSchema,
69
90
  // List-item field values can be any primitive, a link object, an `_i18n`
70
91
  // object (resolved by the SSR pipeline), or null.
71
- default: z.array(z.record(z.string(), z.union([
72
- z.string(),
73
- z.number(),
74
- z.boolean(),
75
- z.object({ href: z.string(), target: z.string().optional() }),
76
- I18nValueObjectSchema,
77
- z.null()
78
- ]))).optional()
92
+ default: z.array(
93
+ z.record(
94
+ z.string(),
95
+ z.union([
96
+ z.string(),
97
+ z.number(),
98
+ z.boolean(),
99
+ z.object({ href: z.string(), target: z.string().optional() }),
100
+ I18nValueObjectSchema,
101
+ z.null()
102
+ ])
103
+ )
104
+ ).optional()
79
105
  }).passthrough();
80
- PropDefinitionSchema = z.union([
81
- ListPropDefinitionSchema,
82
- BasePropDefinitionSchema
83
- ]);
106
+ PropDefinitionSchema = z.union([ListPropDefinitionSchema, BasePropDefinitionSchema]);
84
107
  StyleMappingSchema = z.object({
85
108
  _mapping: z.literal(true),
86
109
  prop: z.string(),
@@ -91,18 +114,17 @@ var init_schemas = __esm({
91
114
  prop: z.string(),
92
115
  values: z.record(z.string(), z.boolean())
93
116
  }).passthrough();
94
- IfConditionSchema = z.union([
95
- z.boolean(),
96
- z.string(),
97
- BooleanMappingSchema
98
- ]);
117
+ IfConditionSchema = z.union([z.boolean(), z.string(), BooleanMappingSchema]);
99
118
  LinkMappingSchema = z.object({
100
119
  _mapping: z.literal(true),
101
120
  prop: z.string(),
102
- values: z.record(z.string(), z.object({
103
- href: z.string(),
104
- target: z.string().optional()
105
- })).optional()
121
+ values: z.record(
122
+ z.string(),
123
+ z.object({
124
+ href: z.string(),
125
+ target: z.string().optional()
126
+ })
127
+ ).optional()
106
128
  }).passthrough();
107
129
  HtmlMappingSchema = z.object({
108
130
  _mapping: z.literal(true),
@@ -111,21 +133,14 @@ var init_schemas = __esm({
111
133
  }).passthrough();
112
134
  StyleObjectSchema = z.record(
113
135
  z.string(),
114
- z.union([
115
- z.string(),
116
- z.number(),
117
- StyleMappingSchema
118
- ])
136
+ z.union([z.string(), z.number(), StyleMappingSchema])
119
137
  );
120
138
  ResponsiveStyleObjectSchema = z.object({
121
139
  base: StyleObjectSchema.optional(),
122
140
  tablet: StyleObjectSchema.optional(),
123
141
  mobile: StyleObjectSchema.optional()
124
142
  }).passthrough();
125
- StyleValueSchema = z.union([
126
- StyleObjectSchema,
127
- ResponsiveStyleObjectSchema
128
- ]);
143
+ StyleValueSchema = z.union([StyleObjectSchema, ResponsiveStyleObjectSchema]);
129
144
  InteractiveStyleRuleSchema = z.object({
130
145
  name: z.string().optional(),
131
146
  prefix: z.string().optional(),
@@ -134,110 +149,124 @@ var init_schemas = __esm({
134
149
  previewProp: z.string().optional()
135
150
  });
136
151
  InteractiveStylesSchema = z.array(InteractiveStyleRuleSchema);
137
- SlotMarkerSchema = z.lazy(() => z.object({
138
- type: z.literal(NODE_TYPE.SLOT),
139
- default: z.union([
140
- z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
141
- z.string(),
142
- I18nValueObjectSchema
143
- ]).optional()
144
- }).passthrough());
145
- HtmlNodeSchema = z.lazy(() => z.object({
146
- type: z.literal(NODE_TYPE.NODE),
147
- tag: z.string(),
148
- label: z.string().optional(),
149
- if: IfConditionSchema.optional(),
150
- style: StyleValueSchema.optional(),
151
- interactiveStyles: InteractiveStylesSchema.optional(),
152
- generateElementClass: z.boolean().optional(),
153
- attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional(),
154
- props: z.record(z.string(), z.any()).optional(),
155
- // Allow props for backward compatibility
156
- children: z.union([
157
- z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
158
- z.string(),
159
- I18nValueObjectSchema
160
- ]).optional()
161
- }).passthrough());
162
- ComponentInstanceNodeSchema = z.lazy(() => z.object({
163
- type: z.literal(NODE_TYPE.COMPONENT),
164
- component: z.string(),
165
- label: z.string().optional(),
166
- if: IfConditionSchema.optional(),
167
- props: z.record(z.string(), z.any()).optional(),
168
- style: StyleValueSchema.optional(),
169
- interactiveStyles: InteractiveStylesSchema.optional(),
170
- generateElementClass: z.boolean().optional(),
171
- attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional(),
172
- children: z.union([
173
- z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
174
- z.string(),
175
- I18nValueObjectSchema
176
- ]).optional()
177
- }).passthrough());
178
- EmbedNodeSchema = z.lazy(() => z.object({
179
- type: z.literal(NODE_TYPE.EMBED),
180
- html: z.union([z.string(), HtmlMappingSchema, I18nValueObjectSchema]),
181
- label: z.string().optional(),
182
- if: IfConditionSchema.optional(),
183
- style: StyleValueSchema.optional(),
184
- interactiveStyles: InteractiveStylesSchema.optional(),
185
- generateElementClass: z.boolean().optional(),
186
- attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional()
187
- }).passthrough());
188
- LinkNodeSchema = z.lazy(() => z.object({
189
- type: z.literal(NODE_TYPE.LINK),
190
- href: z.union([z.string(), LinkMappingSchema, I18nValueObjectSchema]),
191
- label: z.string().optional(),
192
- if: IfConditionSchema.optional(),
193
- style: StyleValueSchema.optional(),
194
- interactiveStyles: InteractiveStylesSchema.optional(),
195
- generateElementClass: z.boolean().optional(),
196
- attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional(),
197
- children: z.union([
198
- z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
199
- z.string(),
200
- I18nValueObjectSchema
201
- ]).optional()
202
- }).passthrough());
203
- LocaleListNodeSchema = z.lazy(() => z.object({
204
- type: z.literal(NODE_TYPE.LOCALE_LIST),
205
- label: z.string().optional(),
206
- if: IfConditionSchema.optional(),
207
- style: StyleValueSchema.optional(),
208
- interactiveStyles: InteractiveStylesSchema.optional(),
209
- generateElementClass: z.boolean().optional(),
210
- itemStyle: StyleValueSchema.optional(),
211
- activeItemStyle: StyleValueSchema.optional(),
212
- separatorStyle: StyleValueSchema.optional(),
213
- showCurrent: z.boolean().optional(),
214
- showSeparator: z.boolean().optional(),
215
- showFlag: z.boolean().optional(),
216
- flagStyle: StyleValueSchema.optional(),
217
- attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional()
218
- }).passthrough());
219
- ListNodeSchemaBasic = z.lazy(() => z.object({
220
- type: z.union([z.literal(NODE_TYPE.LIST), z.literal("cms-list")]),
221
- // Support both for migration
222
- sourceType: z.enum(["prop", "collection"]).optional(),
223
- // defaults to 'prop'
224
- source: z.string().optional(),
225
- // Source prop name or collection name
226
- collection: z.string().optional(),
227
- // Legacy field for cms-list migration
228
- label: z.string().optional(),
229
- if: IfConditionSchema.optional(),
230
- itemAs: z.string().optional(),
231
- // Collection-specific options
232
- items: z.union([z.string(), z.array(z.string())]).optional(),
233
- filter: z.unknown().optional(),
234
- sort: z.unknown().optional(),
235
- limit: z.number().optional(),
236
- offset: z.number().optional(),
237
- excludeCurrentItem: z.boolean().optional(),
238
- emitTemplate: z.boolean().optional(),
239
- children: z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])).optional()
240
- }).passthrough());
152
+ SlotMarkerSchema = z.lazy(
153
+ () => z.object({
154
+ type: z.literal(NODE_TYPE.SLOT),
155
+ default: z.union([
156
+ z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
157
+ z.string(),
158
+ I18nValueObjectSchema
159
+ ]).optional()
160
+ }).passthrough()
161
+ );
162
+ HtmlNodeSchema = z.lazy(
163
+ () => z.object({
164
+ type: z.literal(NODE_TYPE.NODE),
165
+ tag: z.string(),
166
+ label: z.string().optional(),
167
+ if: IfConditionSchema.optional(),
168
+ style: StyleValueSchema.optional(),
169
+ interactiveStyles: InteractiveStylesSchema.optional(),
170
+ generateElementClass: z.boolean().optional(),
171
+ attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional(),
172
+ props: z.record(z.string(), z.any()).optional(),
173
+ // Allow props for backward compatibility
174
+ children: z.union([
175
+ z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
176
+ z.string(),
177
+ I18nValueObjectSchema
178
+ ]).optional()
179
+ }).passthrough()
180
+ );
181
+ ComponentInstanceNodeSchema = z.lazy(
182
+ () => z.object({
183
+ type: z.literal(NODE_TYPE.COMPONENT),
184
+ component: z.string(),
185
+ label: z.string().optional(),
186
+ if: IfConditionSchema.optional(),
187
+ props: z.record(z.string(), z.any()).optional(),
188
+ style: StyleValueSchema.optional(),
189
+ interactiveStyles: InteractiveStylesSchema.optional(),
190
+ generateElementClass: z.boolean().optional(),
191
+ attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional(),
192
+ children: z.union([
193
+ z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
194
+ z.string(),
195
+ I18nValueObjectSchema
196
+ ]).optional()
197
+ }).passthrough()
198
+ );
199
+ EmbedNodeSchema = z.lazy(
200
+ () => z.object({
201
+ type: z.literal(NODE_TYPE.EMBED),
202
+ html: z.union([z.string(), HtmlMappingSchema, I18nValueObjectSchema]),
203
+ label: z.string().optional(),
204
+ if: IfConditionSchema.optional(),
205
+ style: StyleValueSchema.optional(),
206
+ interactiveStyles: InteractiveStylesSchema.optional(),
207
+ generateElementClass: z.boolean().optional(),
208
+ attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional()
209
+ }).passthrough()
210
+ );
211
+ LinkNodeSchema = z.lazy(
212
+ () => z.object({
213
+ type: z.literal(NODE_TYPE.LINK),
214
+ href: z.union([z.string(), LinkMappingSchema, I18nValueObjectSchema]),
215
+ label: z.string().optional(),
216
+ if: IfConditionSchema.optional(),
217
+ style: StyleValueSchema.optional(),
218
+ interactiveStyles: InteractiveStylesSchema.optional(),
219
+ generateElementClass: z.boolean().optional(),
220
+ attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional(),
221
+ children: z.union([
222
+ z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
223
+ z.string(),
224
+ I18nValueObjectSchema
225
+ ]).optional()
226
+ }).passthrough()
227
+ );
228
+ LocaleListNodeSchema = z.lazy(
229
+ () => z.object({
230
+ type: z.literal(NODE_TYPE.LOCALE_LIST),
231
+ label: z.string().optional(),
232
+ if: IfConditionSchema.optional(),
233
+ style: StyleValueSchema.optional(),
234
+ interactiveStyles: InteractiveStylesSchema.optional(),
235
+ generateElementClass: z.boolean().optional(),
236
+ itemStyle: StyleValueSchema.optional(),
237
+ activeItemStyle: StyleValueSchema.optional(),
238
+ separatorStyle: StyleValueSchema.optional(),
239
+ showCurrent: z.boolean().optional(),
240
+ showSeparator: z.boolean().optional(),
241
+ showFlag: z.boolean().optional(),
242
+ flagStyle: StyleValueSchema.optional(),
243
+ attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional()
244
+ }).passthrough()
245
+ );
246
+ ListNodeSchemaBasic = z.lazy(
247
+ () => z.object({
248
+ type: z.union([z.literal(NODE_TYPE.LIST), z.literal("cms-list")]),
249
+ // Support both for migration
250
+ sourceType: z.enum(["prop", "collection"]).optional(),
251
+ // defaults to 'prop'
252
+ source: z.string().optional(),
253
+ // Source prop name or collection name
254
+ collection: z.string().optional(),
255
+ // Legacy field for cms-list migration
256
+ label: z.string().optional(),
257
+ if: IfConditionSchema.optional(),
258
+ itemAs: z.string().optional(),
259
+ // Collection-specific options
260
+ items: z.union([z.string(), z.array(z.string())]).optional(),
261
+ filter: z.unknown().optional(),
262
+ sort: z.unknown().optional(),
263
+ limit: z.number().optional(),
264
+ offset: z.number().optional(),
265
+ excludeCurrentItem: z.boolean().optional(),
266
+ emitTemplate: z.boolean().optional(),
267
+ children: z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])).optional()
268
+ }).passthrough()
269
+ );
241
270
  ComponentNodeSchema = z.union([
242
271
  HtmlNodeSchema,
243
272
  ComponentInstanceNodeSchema,
@@ -327,11 +356,14 @@ var init_schemas = __esm({
327
356
  root: ComponentNodeSchema.optional(),
328
357
  meta: PageMetaDataSchema.optional(),
329
358
  _lineMap: z.record(z.string(), LineRangeSchema).optional()
330
- }).passthrough().refine((data) => {
331
- return data.meta !== void 0 || data.components !== void 0 || data.root !== void 0;
332
- }, {
333
- message: "JSONPage must have at least one of: meta, components, or root"
334
- });
359
+ }).passthrough().refine(
360
+ (data) => {
361
+ return data.meta !== void 0 || data.components !== void 0 || data.root !== void 0;
362
+ },
363
+ {
364
+ message: "JSONPage must have at least one of: meta, components, or root"
365
+ }
366
+ );
335
367
  PageDataWithComponentSchema = z.object({
336
368
  component: z.object({
337
369
  structure: ComponentNodeSchema.optional(),
@@ -341,10 +373,7 @@ var init_schemas = __esm({
341
373
  acceptsStyles: z.boolean().optional()
342
374
  }).passthrough()
343
375
  }).passthrough();
344
- PageDataSchema = z.union([
345
- PageDataWithComponentSchema,
346
- JSONPageSchema
347
- ]);
376
+ PageDataSchema = z.union([PageDataWithComponentSchema, JSONPageSchema]);
348
377
  CMSFieldTypeSchema = z.enum([
349
378
  "string",
350
379
  "text",
@@ -406,11 +435,7 @@ var init_schemas = __esm({
406
435
  });
407
436
  CMSListQuerySchema = z.object({
408
437
  collection: z.string(),
409
- filter: z.union([
410
- CMSFilterConditionSchema,
411
- z.array(CMSFilterConditionSchema),
412
- z.record(z.unknown())
413
- ]).optional(),
438
+ filter: z.union([CMSFilterConditionSchema, z.array(CMSFilterConditionSchema), z.record(z.unknown())]).optional(),
414
439
  sort: z.union([CMSSortConfigSchema, z.array(CMSSortConfigSchema)]).optional(),
415
440
  limit: z.number().positive().optional(),
416
441
  offset: z.number().nonnegative().optional()
@@ -421,11 +446,7 @@ var init_schemas = __esm({
421
446
  if: IfConditionSchema.optional(),
422
447
  itemAs: z.string().optional(),
423
448
  items: z.union([z.string(), z.array(z.string())]).optional(),
424
- filter: z.union([
425
- CMSFilterConditionSchema,
426
- z.array(CMSFilterConditionSchema),
427
- z.record(z.unknown())
428
- ]).optional(),
449
+ filter: z.union([CMSFilterConditionSchema, z.array(CMSFilterConditionSchema), z.record(z.unknown())]).optional(),
429
450
  sort: z.union([CMSSortConfigSchema, z.array(CMSSortConfigSchema)]).optional(),
430
451
  limit: z.number().positive().optional(),
431
452
  offset: z.number().nonnegative().optional(),
@@ -1130,10 +1151,7 @@ var init_HtmlNodeType = __esm({
1130
1151
  attributes: z2.record(z2.string(), z2.union([z2.string(), z2.number(), z2.boolean()])).optional(),
1131
1152
  props: z2.record(z2.string(), z2.any()).optional(),
1132
1153
  // Backward compatibility
1133
- children: z2.union([
1134
- z2.array(z2.union([ComponentNodeSchemaRef, z2.string()])),
1135
- z2.string()
1136
- ]).optional()
1154
+ children: z2.union([z2.array(z2.union([ComponentNodeSchemaRef, z2.string()])), z2.string()]).optional()
1137
1155
  }).passthrough();
1138
1156
  HtmlNodeType = createNodeType({
1139
1157
  type: "node",
@@ -1154,7 +1172,22 @@ var init_HtmlNodeType = __esm({
1154
1172
  if (node.tag === "form") {
1155
1173
  props.onSubmit = (e) => e.preventDefault();
1156
1174
  }
1157
- const voidElements = ["img", "br", "hr", "input", "meta", "link", "area", "base", "col", "embed", "param", "source", "track", "wbr"];
1175
+ const voidElements = [
1176
+ "img",
1177
+ "br",
1178
+ "hr",
1179
+ "input",
1180
+ "meta",
1181
+ "link",
1182
+ "area",
1183
+ "base",
1184
+ "col",
1185
+ "embed",
1186
+ "param",
1187
+ "source",
1188
+ "track",
1189
+ "wbr"
1190
+ ];
1158
1191
  if (voidElements.includes(node.tag.toLowerCase())) {
1159
1192
  return h(node.tag, props);
1160
1193
  }
@@ -1168,7 +1201,22 @@ var init_HtmlNodeType = __esm({
1168
1201
  },
1169
1202
  ssrRenderer: (node, context) => {
1170
1203
  const childrenHTML = context.renderChildren(node.children, context);
1171
- const voidElements = ["img", "br", "hr", "input", "meta", "link", "area", "base", "col", "embed", "param", "source", "track", "wbr"];
1204
+ const voidElements = [
1205
+ "img",
1206
+ "br",
1207
+ "hr",
1208
+ "input",
1209
+ "meta",
1210
+ "link",
1211
+ "area",
1212
+ "base",
1213
+ "col",
1214
+ "embed",
1215
+ "param",
1216
+ "source",
1217
+ "track",
1218
+ "wbr"
1219
+ ];
1172
1220
  if (voidElements.includes(node.tag.toLowerCase())) {
1173
1221
  return `<${node.tag} />`;
1174
1222
  }
@@ -1206,10 +1254,7 @@ var init_ComponentInstanceNodeType = __esm({
1206
1254
  generateElementClass: z3.boolean().optional(),
1207
1255
  // Generate element class without styles (for custom CSS)
1208
1256
  attributes: z3.record(z3.string(), z3.union([z3.string(), z3.number(), z3.boolean()])).optional(),
1209
- children: z3.union([
1210
- z3.array(z3.union([ComponentNodeSchemaRef2, z3.string()])),
1211
- z3.string()
1212
- ]).optional()
1257
+ children: z3.union([z3.array(z3.union([ComponentNodeSchemaRef2, z3.string()])), z3.string()]).optional()
1213
1258
  }).passthrough();
1214
1259
  ComponentInstanceNodeType = createNodeType({
1215
1260
  type: "component",
@@ -1257,10 +1302,7 @@ var init_SlotMarkerType = __esm({
1257
1302
  init_createNodeType();
1258
1303
  SlotMarkerSchemaInternal = z4.object({
1259
1304
  type: z4.literal("slot"),
1260
- default: z4.union([
1261
- z4.array(z4.any()),
1262
- z4.string()
1263
- ]).optional()
1305
+ default: z4.union([z4.array(z4.any()), z4.string()]).optional()
1264
1306
  }).passthrough();
1265
1307
  SlotMarkerType = createNodeType({
1266
1308
  type: "slot",
@@ -1371,10 +1413,7 @@ var init_LinkNodeType = __esm({
1371
1413
  generateElementClass: z6.boolean().optional(),
1372
1414
  // Generate element class without styles (for custom CSS)
1373
1415
  attributes: z6.record(z6.string(), z6.union([z6.string(), z6.number(), z6.boolean()])).optional(),
1374
- children: z6.union([
1375
- z6.array(z6.union([ComponentNodeSchemaRef3, z6.string()])),
1376
- z6.string()
1377
- ]).optional()
1416
+ children: z6.union([z6.array(z6.union([ComponentNodeSchemaRef3, z6.string()])), z6.string()]).optional()
1378
1417
  }).passthrough();
1379
1418
  LinkNodeType = createNodeType({
1380
1419
  type: "link",
@@ -1390,9 +1429,7 @@ var init_LinkNodeType = __esm({
1390
1429
  icon: "LINK",
1391
1430
  getLabel: () => "Link"
1392
1431
  },
1393
- editableFields: [
1394
- urlField({ name: "href", label: "Link URL", required: true })
1395
- ],
1432
+ editableFields: [urlField({ name: "href", label: "Link URL", required: true })],
1396
1433
  clientRenderer: (node, context) => {
1397
1434
  const children = context.buildChildren(
1398
1435
  node.children,
@@ -1463,10 +1500,14 @@ var init_LocaleListNodeType = __esm({
1463
1500
  getLabel: () => "LocaleList"
1464
1501
  },
1465
1502
  clientRenderer: (_node, context) => {
1466
- return h5("div", {
1467
- key: context.key,
1468
- "data-locale-list": "true"
1469
- }, "[Locale List]");
1503
+ return h5(
1504
+ "div",
1505
+ {
1506
+ key: context.key,
1507
+ "data-locale-list": "true"
1508
+ },
1509
+ "[Locale List]"
1510
+ );
1470
1511
  },
1471
1512
  ssrRenderer: (_node, _context) => {
1472
1513
  return '<div class="locale-list">[Locale List]</div>';
@@ -1499,10 +1540,12 @@ var init_ListNodeType = __esm({
1499
1540
  field: z8.string(),
1500
1541
  order: z8.enum(["asc", "desc"]).optional()
1501
1542
  }),
1502
- z8.array(z8.object({
1503
- field: z8.string(),
1504
- order: z8.enum(["asc", "desc"]).optional()
1505
- }))
1543
+ z8.array(
1544
+ z8.object({
1545
+ field: z8.string(),
1546
+ order: z8.enum(["asc", "desc"]).optional()
1547
+ })
1548
+ )
1506
1549
  ]);
1507
1550
  ListNodeSchemaInternal = z8.object({
1508
1551
  type: z8.literal("list"),
@@ -1532,11 +1575,7 @@ var init_ListNodeType = __esm({
1532
1575
  /** Direct item IDs or template expression for referenced items (e.g., "{{post.authorId}}") */
1533
1576
  items: z8.union([z8.string(), z8.array(z8.string())]).optional(),
1534
1577
  /** Filter conditions */
1535
- filter: z8.union([
1536
- CMSFilterConditionSchema2,
1537
- z8.array(CMSFilterConditionSchema2),
1538
- z8.record(z8.unknown())
1539
- ]).optional(),
1578
+ filter: z8.union([CMSFilterConditionSchema2, z8.array(CMSFilterConditionSchema2), z8.record(z8.unknown())]).optional(),
1540
1579
  /** Sort configuration */
1541
1580
  sort: CMSSortConfigSchema2.optional(),
1542
1581
  /** Exclude the current CMS item from the list (useful for "related items" sections) */
@@ -1586,20 +1625,24 @@ var init_ListNodeType = __esm({
1586
1625
  const borderColor = isCollection ? "rgba(139, 92, 246, 0.5)" : "rgba(59, 130, 246, 0.5)";
1587
1626
  const textColor = isCollection ? "#8b5cf6" : "#3b82f6";
1588
1627
  const label = isCollection ? "CMS List" : "List";
1589
- return h6("div", {
1590
- key: context.key,
1591
- "data-list": "true",
1592
- "data-source-type": sourceType,
1593
- "data-source": listNode.source,
1594
- style: {
1595
- padding: "8px 12px",
1596
- background: bgColor,
1597
- border: `1px dashed ${borderColor}`,
1598
- borderRadius: "4px",
1599
- color: textColor,
1600
- fontSize: "12px"
1601
- }
1602
- }, `[${label}: ${listNode.source || "No source"}]`);
1628
+ return h6(
1629
+ "div",
1630
+ {
1631
+ key: context.key,
1632
+ "data-list": "true",
1633
+ "data-source-type": sourceType,
1634
+ "data-source": listNode.source,
1635
+ style: {
1636
+ padding: "8px 12px",
1637
+ background: bgColor,
1638
+ border: `1px dashed ${borderColor}`,
1639
+ borderRadius: "4px",
1640
+ color: textColor,
1641
+ fontSize: "12px"
1642
+ }
1643
+ },
1644
+ `[${label}: ${listNode.source || "No source"}]`
1645
+ );
1603
1646
  },
1604
1647
  ssrRenderer: (_node, _context) => {
1605
1648
  return "<!-- list rendered by processList -->";
@@ -1749,11 +1792,13 @@ function validatePropDefinition(propDef) {
1749
1792
  } catch (error) {
1750
1793
  return {
1751
1794
  valid: false,
1752
- errors: [{
1753
- path: "root",
1754
- message: error instanceof Error ? error.message : "Unknown validation error",
1755
- code: "UNKNOWN"
1756
- }]
1795
+ errors: [
1796
+ {
1797
+ path: "root",
1798
+ message: error instanceof Error ? error.message : "Unknown validation error",
1799
+ code: "UNKNOWN"
1800
+ }
1801
+ ]
1757
1802
  };
1758
1803
  }
1759
1804
  }
@@ -1767,11 +1812,13 @@ function validateComponentNode(node) {
1767
1812
  } catch (error) {
1768
1813
  return {
1769
1814
  valid: false,
1770
- errors: [{
1771
- path: "root",
1772
- message: error instanceof Error ? error.message : "Unknown validation error",
1773
- code: "UNKNOWN"
1774
- }]
1815
+ errors: [
1816
+ {
1817
+ path: "root",
1818
+ message: error instanceof Error ? error.message : "Unknown validation error",
1819
+ code: "UNKNOWN"
1820
+ }
1821
+ ]
1775
1822
  };
1776
1823
  }
1777
1824
  }
@@ -1785,11 +1832,13 @@ function validateStructuredComponentDefinition(def) {
1785
1832
  } catch (error) {
1786
1833
  return {
1787
1834
  valid: false,
1788
- errors: [{
1789
- path: "root",
1790
- message: error instanceof Error ? error.message : "Unknown validation error",
1791
- code: "UNKNOWN"
1792
- }]
1835
+ errors: [
1836
+ {
1837
+ path: "root",
1838
+ message: error instanceof Error ? error.message : "Unknown validation error",
1839
+ code: "UNKNOWN"
1840
+ }
1841
+ ]
1793
1842
  };
1794
1843
  }
1795
1844
  }
@@ -1803,11 +1852,13 @@ function validateComponentDefinition(def) {
1803
1852
  } catch (error) {
1804
1853
  return {
1805
1854
  valid: false,
1806
- errors: [{
1807
- path: "root",
1808
- message: error instanceof Error ? error.message : "Unknown validation error",
1809
- code: "UNKNOWN"
1810
- }]
1855
+ errors: [
1856
+ {
1857
+ path: "root",
1858
+ message: error instanceof Error ? error.message : "Unknown validation error",
1859
+ code: "UNKNOWN"
1860
+ }
1861
+ ]
1811
1862
  };
1812
1863
  }
1813
1864
  }
@@ -1821,11 +1872,13 @@ function validatePageData(data) {
1821
1872
  } catch (error) {
1822
1873
  return {
1823
1874
  valid: false,
1824
- errors: [{
1825
- path: "root",
1826
- message: error instanceof Error ? error.message : "Unknown validation error",
1827
- code: "UNKNOWN"
1828
- }]
1875
+ errors: [
1876
+ {
1877
+ path: "root",
1878
+ message: error instanceof Error ? error.message : "Unknown validation error",
1879
+ code: "UNKNOWN"
1880
+ }
1881
+ ]
1829
1882
  };
1830
1883
  }
1831
1884
  }
@@ -1839,11 +1892,13 @@ function validatePageDataWithComponent(data) {
1839
1892
  } catch (error) {
1840
1893
  return {
1841
1894
  valid: false,
1842
- errors: [{
1843
- path: "root",
1844
- message: error instanceof Error ? error.message : "Unknown validation error",
1845
- code: "UNKNOWN"
1846
- }]
1895
+ errors: [
1896
+ {
1897
+ path: "root",
1898
+ message: error instanceof Error ? error.message : "Unknown validation error",
1899
+ code: "UNKNOWN"
1900
+ }
1901
+ ]
1847
1902
  };
1848
1903
  }
1849
1904
  }
@@ -1857,11 +1912,13 @@ function validatePageMetaData(data) {
1857
1912
  } catch (error) {
1858
1913
  return {
1859
1914
  valid: false,
1860
- errors: [{
1861
- path: "root",
1862
- message: error instanceof Error ? error.message : "Unknown validation error",
1863
- code: "UNKNOWN"
1864
- }]
1915
+ errors: [
1916
+ {
1917
+ path: "root",
1918
+ message: error instanceof Error ? error.message : "Unknown validation error",
1919
+ code: "UNKNOWN"
1920
+ }
1921
+ ]
1865
1922
  };
1866
1923
  }
1867
1924
  }
@@ -1875,11 +1932,13 @@ function validateCMSSchema(data) {
1875
1932
  } catch (error) {
1876
1933
  return {
1877
1934
  valid: false,
1878
- errors: [{
1879
- path: "root",
1880
- message: error instanceof Error ? error.message : "Unknown validation error",
1881
- code: "UNKNOWN"
1882
- }]
1935
+ errors: [
1936
+ {
1937
+ path: "root",
1938
+ message: error instanceof Error ? error.message : "Unknown validation error",
1939
+ code: "UNKNOWN"
1940
+ }
1941
+ ]
1883
1942
  };
1884
1943
  }
1885
1944
  }
@@ -1893,11 +1952,13 @@ function validateCMSItem(data) {
1893
1952
  } catch (error) {
1894
1953
  return {
1895
1954
  valid: false,
1896
- errors: [{
1897
- path: "root",
1898
- message: error instanceof Error ? error.message : "Unknown validation error",
1899
- code: "UNKNOWN"
1900
- }]
1955
+ errors: [
1956
+ {
1957
+ path: "root",
1958
+ message: error instanceof Error ? error.message : "Unknown validation error",
1959
+ code: "UNKNOWN"
1960
+ }
1961
+ ]
1901
1962
  };
1902
1963
  }
1903
1964
  }
@@ -1911,11 +1972,13 @@ function validateCMSDraftItem(data) {
1911
1972
  } catch (error) {
1912
1973
  return {
1913
1974
  valid: false,
1914
- errors: [{
1915
- path: "root",
1916
- message: error instanceof Error ? error.message : "Unknown validation error",
1917
- code: "UNKNOWN"
1918
- }]
1975
+ errors: [
1976
+ {
1977
+ path: "root",
1978
+ message: error instanceof Error ? error.message : "Unknown validation error",
1979
+ code: "UNKNOWN"
1980
+ }
1981
+ ]
1919
1982
  };
1920
1983
  }
1921
1984
  }
@@ -2047,9 +2110,7 @@ function evaluateNode(node, context) {
2047
2110
  }
2048
2111
  case "ArrayExpression": {
2049
2112
  const arrayNode = node;
2050
- return arrayNode.elements.map(
2051
- (el) => el ? evaluateNode(el, context) : void 0
2052
- );
2113
+ return arrayNode.elements.map((el) => el ? evaluateNode(el, context) : void 0);
2053
2114
  }
2054
2115
  case "CallExpression": {
2055
2116
  throw new Error("Function calls are not supported in template expressions");
@@ -2169,7 +2230,7 @@ function buildEvalContext(ctx) {
2169
2230
  return evalContext;
2170
2231
  }
2171
2232
  function processItemTemplate(text, ctx, resolveValue) {
2172
- let result = text.replace(/\{\{([^}]+)\}\}/g, (match, expression) => {
2233
+ const result = text.replace(/\{\{([^}]+)\}\}/g, (match, expression) => {
2173
2234
  const trimmed = expression.trim();
2174
2235
  if (isComplexExpression(trimmed)) {
2175
2236
  const evalContext = buildEvalContext(ctx);
@@ -2861,453 +2922,868 @@ function resolvePropsFromDefinition(componentDef, passedProps = {}, children = [
2861
2922
  });
2862
2923
  }
2863
2924
 
2864
- // lib/shared/styleValueRegistry.ts
2865
- var registry = /* @__PURE__ */ new Map();
2866
- var dynamicRegistry = /* @__PURE__ */ new Map();
2867
- function registerStyleValue(className, value) {
2868
- registry.set(className, value);
2869
- }
2870
- function registerDynamicStyle(className, property, value) {
2871
- dynamicRegistry.set(className, { property, value });
2872
- }
2873
- function getStyleValue(className) {
2874
- return registry.get(className);
2875
- }
2876
- function getDynamicStyle(className) {
2877
- return dynamicRegistry.get(className);
2878
- }
2879
- function isDynamicClass(className) {
2880
- return dynamicRegistry.has(className);
2881
- }
2882
- function getAllDynamicClasses() {
2883
- return Array.from(dynamicRegistry.keys());
2884
- }
2885
- function clearRegistry() {
2886
- registry.clear();
2887
- dynamicRegistry.clear();
2888
- }
2889
- function serializeRegistry() {
2890
- return JSON.stringify({
2891
- standard: Array.from(registry.entries()),
2892
- dynamic: Array.from(dynamicRegistry.entries())
2893
- });
2894
- }
2895
- function hydrateRegistry(data) {
2896
- const parsed = JSON.parse(data);
2897
- if (Array.isArray(parsed)) {
2898
- for (const [key, value] of parsed) {
2899
- registry.set(key, value);
2900
- }
2901
- } else {
2902
- if (parsed.standard) {
2903
- for (const [key, value] of parsed.standard) {
2904
- registry.set(key, value);
2905
- }
2906
- }
2907
- if (parsed.dynamic) {
2908
- for (const [key, value] of parsed.dynamic) {
2909
- dynamicRegistry.set(key, value);
2910
- }
2911
- }
2912
- }
2913
- }
2914
-
2915
- // lib/shared/utilityClassConfig.ts
2916
- var propertyMap = {
2917
- // Padding
2918
- padding: "p",
2919
- paddingTop: "pt",
2920
- paddingRight: "pr",
2921
- paddingBottom: "pb",
2922
- paddingLeft: "pl",
2923
- paddingInline: "px",
2924
- paddingBlock: "py",
2925
- // Margin
2926
- margin: "m",
2927
- marginTop: "mt",
2928
- marginRight: "mr",
2929
- marginBottom: "mb",
2930
- marginLeft: "ml",
2931
- marginInline: "mx",
2932
- marginBlock: "my",
2933
- // Display & Layout
2934
- display: "d",
2935
- flexDirection: "fd",
2936
- justifyContent: "jc",
2937
- alignItems: "ai",
2938
- alignContent: "ac",
2939
- flex: "flex",
2940
- flexWrap: "fw",
2941
- gap: "g",
2942
- rowGap: "rg",
2943
- columnGap: "cg",
2944
- // Sizing
2945
- width: "w",
2946
- height: "h",
2947
- maxWidth: "mw",
2948
- maxHeight: "mh",
2949
- minWidth: "miw",
2950
- minHeight: "mih",
2951
- aspectRatio: "ar",
2952
- // Colors & Background
2953
- backgroundColor: "bgc",
2954
- background: "bg",
2955
- backgroundImage: "bgi",
2956
- color: "c",
2957
- // Borders & Radius
2958
- border: "b",
2959
- borderRadius: "br",
2960
- borderTop: "bt",
2961
- borderRight: "border-r",
2962
- borderBottom: "bb",
2963
- borderLeft: "bl",
2964
- borderTopLeftRadius: "brtl",
2965
- borderTopRightRadius: "brtr",
2966
- borderBottomLeftRadius: "brbl",
2967
- borderBottomRightRadius: "brbr",
2968
- borderColor: "bc",
2969
- // Text
2970
- fontSize: "fs",
2971
- fontWeight: "fe",
2972
- fontFamily: "ff",
2973
- textAlign: "ta",
2974
- textDecoration: "td",
2975
- textTransform: "tt",
2976
- lineHeight: "lh",
2977
- letterSpacing: "ls",
2978
- wordBreak: "wb",
2979
- overflowWrap: "ow",
2980
- textIndent: "ti",
2981
- verticalAlign: "va",
2982
- whiteSpace: "whs",
2983
- // Lists
2984
- listStyle: "lst",
2985
- listStyleType: "lstt",
2986
- listStylePosition: "lstp",
2987
- // Transform & Effects
2988
- opacity: "o",
2989
- transform: "tm",
2990
- transformOrigin: "tmo",
2991
- boxShadow: "bsh",
2992
- textShadow: "ts",
2993
- filter: "flt",
2994
- backdropFilter: "bdf",
2995
- backfaceVisibility: "bfv",
2996
- mixBlendMode: "mbm",
2997
- clipPath: "cp",
2998
- // Positioning
2999
- position: "pos",
3000
- top: "top",
3001
- right: "r",
3002
- bottom: "bo",
3003
- left: "l",
3004
- inset: "ins",
3005
- zIndex: "z",
3006
- // Grid Layout
3007
- gridTemplateColumns: "gtc",
3008
- gridTemplateRows: "gtr",
3009
- gridTemplateAreas: "gta",
3010
- gridGap: "gg",
3011
- gridAutoFlow: "gaf",
3012
- gridColumn: "gc",
3013
- gridRow: "gr",
3014
- gridArea: "ga",
3015
- gridAutoRows: "gar",
3016
- gridAutoColumns: "gac",
3017
- justifyItems: "ji",
3018
- justifySelf: "jse",
3019
- placeContent: "plc",
3020
- placeItems: "pli",
3021
- placeSelf: "pls",
3022
- // Flexbox extras
3023
- flexGrow: "fg",
3024
- flexShrink: "fsh",
3025
- flexBasis: "fb",
3026
- order: "ord",
3027
- alignSelf: "as",
3028
- // Outline
3029
- outline: "ol",
3030
- outlineWidth: "olw",
3031
- outlineStyle: "ols",
3032
- outlineColor: "olc",
3033
- outlineOffset: "olo",
3034
- // Other
3035
- overflow: "ov",
3036
- overflowX: "ovx",
3037
- overflowY: "ovy",
3038
- cursor: "cu",
3039
- pointerEvents: "pe",
3040
- userSelect: "us",
3041
- transition: "tn",
3042
- objectFit: "objf",
3043
- objectPosition: "objp",
3044
- boxSizing: "bsz",
3045
- visibility: "vis",
3046
- resize: "rsz",
3047
- scrollBehavior: "scb",
3048
- accentColor: "acc"
3049
- };
3050
- var prefixToCSSProperty = {
3051
- // Spacing
3052
- p: "padding",
3053
- pt: "padding-top",
3054
- pr: "padding-right",
3055
- pb: "padding-bottom",
3056
- pl: "padding-left",
3057
- px: "padding",
3058
- py: "padding",
3059
- m: "margin",
3060
- mt: "margin-top",
3061
- mr: "margin-right",
3062
- mb: "margin-bottom",
3063
- ml: "margin-left",
3064
- mx: "margin",
3065
- my: "margin",
3066
- g: "gap",
3067
- rg: "row-gap",
3068
- cg: "column-gap",
3069
- // Sizing
3070
- w: "width",
3071
- h: "height",
3072
- mw: "max-width",
3073
- mh: "max-height",
3074
- miw: "min-width",
3075
- mih: "min-height",
3076
- ar: "aspect-ratio",
3077
- // Colors & Background
3078
- bgc: "background-color",
3079
- bg: "background",
3080
- bgi: "background-image",
3081
- c: "color",
3082
- bc: "border-color",
3083
- // Borders
3084
- b: "border",
3085
- br: "border-radius",
3086
- brtl: "border-top-left-radius",
3087
- brtr: "border-top-right-radius",
3088
- brbl: "border-bottom-left-radius",
3089
- brbr: "border-bottom-right-radius",
3090
- bt: "border-top",
3091
- bb: "border-bottom",
3092
- bl: "border-left",
3093
- "border-r": "border-right",
3094
- // Text
3095
- fs: "font-size",
3096
- fe: "font-weight",
3097
- ff: "font-family",
3098
- ta: "text-align",
3099
- td: "text-decoration",
3100
- tt: "text-transform",
3101
- lh: "line-height",
3102
- ls: "letter-spacing",
3103
- wb: "word-break",
3104
- ow: "overflow-wrap",
3105
- ti: "text-indent",
3106
- va: "vertical-align",
3107
- whs: "white-space",
3108
- // Lists
3109
- lst: "list-style",
3110
- lstt: "list-style-type",
3111
- lstp: "list-style-position",
3112
- // Display
3113
- d: "display",
3114
- // Flexbox
3115
- fd: "flex-direction",
3116
- jc: "justify-content",
3117
- ai: "align-items",
3118
- ac: "align-content",
3119
- as: "align-self",
3120
- flex: "flex",
3121
- fw: "flex-wrap",
3122
- fg: "flex-grow",
3123
- fsh: "flex-shrink",
3124
- fb: "flex-basis",
3125
- ord: "order",
3126
- // Grid
3127
- gtc: "grid-template-columns",
3128
- gtr: "grid-template-rows",
3129
- gta: "grid-template-areas",
3130
- gg: "grid-gap",
3131
- gaf: "grid-auto-flow",
3132
- gc: "grid-column",
3133
- gr: "grid-row",
3134
- ga: "grid-area",
3135
- gar: "grid-auto-rows",
3136
- gac: "grid-auto-columns",
3137
- ji: "justify-items",
3138
- jse: "justify-self",
3139
- plc: "place-content",
3140
- pli: "place-items",
3141
- pls: "place-self",
3142
- // Effects
3143
- o: "opacity",
3144
- tm: "transform",
3145
- tmo: "transform-origin",
3146
- bsh: "box-shadow",
3147
- ts: "text-shadow",
3148
- flt: "filter",
3149
- bdf: "backdrop-filter",
3150
- bfv: "backface-visibility",
3151
- mbm: "mix-blend-mode",
3152
- cp: "clip-path",
3153
- // Positioning
3154
- pos: "position",
3155
- top: "top",
3156
- r: "right",
3157
- bo: "bottom",
3158
- l: "left",
3159
- ins: "inset",
3160
- z: "z-index",
3161
- // Outline
3162
- ol: "outline",
3163
- olw: "outline-width",
3164
- ols: "outline-style",
3165
- olc: "outline-color",
3166
- olo: "outline-offset",
2925
+ // lib/shared/cssNamedColors.ts
2926
+ var CSS_NAMED_COLORS = /* @__PURE__ */ new Set([
2927
+ // CSS Level 4 named colors
2928
+ "aliceblue",
2929
+ "antiquewhite",
2930
+ "aqua",
2931
+ "aquamarine",
2932
+ "azure",
2933
+ "beige",
2934
+ "bisque",
2935
+ "black",
2936
+ "blanchedalmond",
2937
+ "blue",
2938
+ "blueviolet",
2939
+ "brown",
2940
+ "burlywood",
2941
+ "cadetblue",
2942
+ "chartreuse",
2943
+ "chocolate",
2944
+ "coral",
2945
+ "cornflowerblue",
2946
+ "cornsilk",
2947
+ "crimson",
2948
+ "cyan",
2949
+ "darkblue",
2950
+ "darkcyan",
2951
+ "darkgoldenrod",
2952
+ "darkgray",
2953
+ "darkgreen",
2954
+ "darkgrey",
2955
+ "darkkhaki",
2956
+ "darkmagenta",
2957
+ "darkolivegreen",
2958
+ "darkorange",
2959
+ "darkorchid",
2960
+ "darkred",
2961
+ "darksalmon",
2962
+ "darkseagreen",
2963
+ "darkslateblue",
2964
+ "darkslategray",
2965
+ "darkslategrey",
2966
+ "darkturquoise",
2967
+ "darkviolet",
2968
+ "deeppink",
2969
+ "deepskyblue",
2970
+ "dimgray",
2971
+ "dimgrey",
2972
+ "dodgerblue",
2973
+ "firebrick",
2974
+ "floralwhite",
2975
+ "forestgreen",
2976
+ "fuchsia",
2977
+ "gainsboro",
2978
+ "ghostwhite",
2979
+ "gold",
2980
+ "goldenrod",
2981
+ "gray",
2982
+ "green",
2983
+ "greenyellow",
2984
+ "grey",
2985
+ "honeydew",
2986
+ "hotpink",
2987
+ "indianred",
2988
+ "indigo",
2989
+ "ivory",
2990
+ "khaki",
2991
+ "lavender",
2992
+ "lavenderblush",
2993
+ "lawngreen",
2994
+ "lemonchiffon",
2995
+ "lightblue",
2996
+ "lightcoral",
2997
+ "lightcyan",
2998
+ "lightgoldenrodyellow",
2999
+ "lightgray",
3000
+ "lightgreen",
3001
+ "lightgrey",
3002
+ "lightpink",
3003
+ "lightsalmon",
3004
+ "lightseagreen",
3005
+ "lightskyblue",
3006
+ "lightslategray",
3007
+ "lightslategrey",
3008
+ "lightsteelblue",
3009
+ "lightyellow",
3010
+ "lime",
3011
+ "limegreen",
3012
+ "linen",
3013
+ "magenta",
3014
+ "maroon",
3015
+ "mediumaquamarine",
3016
+ "mediumblue",
3017
+ "mediumorchid",
3018
+ "mediumpurple",
3019
+ "mediumseagreen",
3020
+ "mediumslateblue",
3021
+ "mediumspringgreen",
3022
+ "mediumturquoise",
3023
+ "mediumvioletred",
3024
+ "midnightblue",
3025
+ "mintcream",
3026
+ "mistyrose",
3027
+ "moccasin",
3028
+ "navajowhite",
3029
+ "navy",
3030
+ "oldlace",
3031
+ "olive",
3032
+ "olivedrab",
3033
+ "orange",
3034
+ "orangered",
3035
+ "orchid",
3036
+ "palegoldenrod",
3037
+ "palegreen",
3038
+ "paleturquoise",
3039
+ "palevioletred",
3040
+ "papayawhip",
3041
+ "peachpuff",
3042
+ "peru",
3043
+ "pink",
3044
+ "plum",
3045
+ "powderblue",
3046
+ "purple",
3047
+ "rebeccapurple",
3048
+ "red",
3049
+ "rosybrown",
3050
+ "royalblue",
3051
+ "saddlebrown",
3052
+ "salmon",
3053
+ "sandybrown",
3054
+ "seagreen",
3055
+ "seashell",
3056
+ "sienna",
3057
+ "silver",
3058
+ "skyblue",
3059
+ "slateblue",
3060
+ "slategray",
3061
+ "slategrey",
3062
+ "snow",
3063
+ "springgreen",
3064
+ "steelblue",
3065
+ "tan",
3066
+ "teal",
3067
+ "thistle",
3068
+ "tomato",
3069
+ "turquoise",
3070
+ "violet",
3071
+ "wheat",
3072
+ "white",
3073
+ "whitesmoke",
3074
+ "yellow",
3075
+ "yellowgreen",
3076
+ // CSS color keywords
3077
+ "transparent",
3078
+ "currentcolor",
3079
+ // CSS-wide keywords (should never be wrapped in var())
3080
+ "inherit",
3081
+ "initial",
3082
+ "unset",
3083
+ "revert"
3084
+ ]);
3085
+ function isCssNamedColor(value) {
3086
+ return CSS_NAMED_COLORS.has(value.toLowerCase());
3087
+ }
3088
+
3089
+ // lib/shared/styleValueRegistry.ts
3090
+ var registry = /* @__PURE__ */ new Map();
3091
+ var dynamicRegistry = /* @__PURE__ */ new Map();
3092
+ function registerStyleValue(className, value) {
3093
+ registry.set(className, value);
3094
+ }
3095
+ function registerDynamicStyle(className, property, value) {
3096
+ dynamicRegistry.set(className, { property, value });
3097
+ }
3098
+ function getStyleValue(className) {
3099
+ return registry.get(className);
3100
+ }
3101
+ function getDynamicStyle(className) {
3102
+ return dynamicRegistry.get(className);
3103
+ }
3104
+ function isDynamicClass(className) {
3105
+ return dynamicRegistry.has(className);
3106
+ }
3107
+ function getAllDynamicClasses() {
3108
+ return Array.from(dynamicRegistry.keys());
3109
+ }
3110
+ function clearRegistry() {
3111
+ registry.clear();
3112
+ dynamicRegistry.clear();
3113
+ }
3114
+ function serializeRegistry() {
3115
+ return JSON.stringify({
3116
+ standard: Array.from(registry.entries()),
3117
+ dynamic: Array.from(dynamicRegistry.entries())
3118
+ });
3119
+ }
3120
+ function hydrateRegistry(data) {
3121
+ const parsed = JSON.parse(data);
3122
+ if (Array.isArray(parsed)) {
3123
+ for (const [key, value] of parsed) {
3124
+ registry.set(key, value);
3125
+ }
3126
+ } else {
3127
+ if (parsed.standard) {
3128
+ for (const [key, value] of parsed.standard) {
3129
+ registry.set(key, value);
3130
+ }
3131
+ }
3132
+ if (parsed.dynamic) {
3133
+ for (const [key, value] of parsed.dynamic) {
3134
+ dynamicRegistry.set(key, value);
3135
+ }
3136
+ }
3137
+ }
3138
+ }
3139
+
3140
+ // lib/shared/utilityClassConfig.ts
3141
+ var propertyOrder = [
3142
+ // Padding
3143
+ "padding",
3144
+ "paddingTop",
3145
+ "paddingRight",
3146
+ "paddingBottom",
3147
+ "paddingLeft",
3148
+ "paddingInline",
3149
+ "paddingBlock",
3150
+ // Margin
3151
+ "margin",
3152
+ "marginTop",
3153
+ "marginRight",
3154
+ "marginBottom",
3155
+ "marginLeft",
3156
+ "marginInline",
3157
+ "marginBlock",
3158
+ // Display & Layout
3159
+ "display",
3160
+ "flexDirection",
3161
+ "justifyContent",
3162
+ "alignItems",
3163
+ "alignContent",
3164
+ "flex",
3165
+ "flexWrap",
3166
+ "gap",
3167
+ "rowGap",
3168
+ "columnGap",
3169
+ // Sizing
3170
+ "width",
3171
+ "height",
3172
+ "maxWidth",
3173
+ "maxHeight",
3174
+ "minWidth",
3175
+ "minHeight",
3176
+ "aspectRatio",
3177
+ // Colors & Background
3178
+ "backgroundColor",
3179
+ "background",
3180
+ "backgroundImage",
3181
+ "color",
3182
+ // Borders & Radius
3183
+ "border",
3184
+ "borderRadius",
3185
+ "borderTop",
3186
+ "borderRight",
3187
+ "borderBottom",
3188
+ "borderLeft",
3189
+ "borderTopLeftRadius",
3190
+ "borderTopRightRadius",
3191
+ "borderBottomLeftRadius",
3192
+ "borderBottomRightRadius",
3193
+ "borderColor",
3194
+ // Text
3195
+ "fontSize",
3196
+ "fontWeight",
3197
+ "fontFamily",
3198
+ "textAlign",
3199
+ "textDecoration",
3200
+ "textTransform",
3201
+ "lineHeight",
3202
+ "letterSpacing",
3203
+ "wordBreak",
3204
+ "overflowWrap",
3205
+ "textIndent",
3206
+ "verticalAlign",
3207
+ "whiteSpace",
3208
+ // Lists
3209
+ "listStyle",
3210
+ "listStyleType",
3211
+ "listStylePosition",
3212
+ // Transform & Effects
3213
+ "opacity",
3214
+ "transform",
3215
+ "transformOrigin",
3216
+ "boxShadow",
3217
+ "textShadow",
3218
+ "filter",
3219
+ "backdropFilter",
3220
+ "backfaceVisibility",
3221
+ "mixBlendMode",
3222
+ "clipPath",
3223
+ // Positioning
3224
+ "position",
3225
+ "top",
3226
+ "right",
3227
+ "bottom",
3228
+ "left",
3229
+ "inset",
3230
+ "zIndex",
3231
+ // Grid Layout
3232
+ "gridTemplateColumns",
3233
+ "gridTemplateRows",
3234
+ "gridTemplateAreas",
3235
+ "gridGap",
3236
+ "gridAutoFlow",
3237
+ "gridColumn",
3238
+ "gridRow",
3239
+ "gridArea",
3240
+ "gridAutoRows",
3241
+ "gridAutoColumns",
3242
+ "justifyItems",
3243
+ "justifySelf",
3244
+ "placeContent",
3245
+ "placeItems",
3246
+ "placeSelf",
3247
+ // Flexbox extras
3248
+ "flexGrow",
3249
+ "flexShrink",
3250
+ "flexBasis",
3251
+ "order",
3252
+ "alignSelf",
3253
+ // Outline
3254
+ "outline",
3255
+ "outlineWidth",
3256
+ "outlineStyle",
3257
+ "outlineColor",
3258
+ "outlineOffset",
3167
3259
  // Other
3168
- ov: "overflow",
3169
- ovx: "overflow-x",
3170
- ovy: "overflow-y",
3171
- cu: "cursor",
3172
- pe: "pointer-events",
3173
- us: "user-select",
3174
- tn: "transition",
3175
- objf: "object-fit",
3176
- objp: "object-position",
3177
- bsz: "box-sizing",
3178
- vis: "visibility",
3179
- rsz: "resize",
3180
- scb: "scroll-behavior",
3181
- acc: "accent-color"
3260
+ "overflow",
3261
+ "overflowX",
3262
+ "overflowY",
3263
+ "cursor",
3264
+ "pointerEvents",
3265
+ "userSelect",
3266
+ "transition",
3267
+ "objectFit",
3268
+ "objectPosition",
3269
+ "boxSizing",
3270
+ "visibility",
3271
+ "resize",
3272
+ "scrollBehavior",
3273
+ "accentColor"
3274
+ ];
3275
+ var propertyMap = {
3276
+ // Padding
3277
+ padding: "p",
3278
+ paddingTop: "pt",
3279
+ paddingRight: "pr",
3280
+ paddingBottom: "pb",
3281
+ paddingLeft: "pl",
3282
+ paddingInline: "px",
3283
+ paddingBlock: "py",
3284
+ // Margin
3285
+ margin: "m",
3286
+ marginTop: "mt",
3287
+ marginRight: "mr",
3288
+ marginBottom: "mb",
3289
+ marginLeft: "ml",
3290
+ marginInline: "mx",
3291
+ marginBlock: "my",
3292
+ // Flexbox
3293
+ flex: "flex",
3294
+ gap: "gap",
3295
+ rowGap: "gap-y",
3296
+ columnGap: "gap-x",
3297
+ flexGrow: "grow",
3298
+ flexShrink: "shrink",
3299
+ flexBasis: "basis",
3300
+ order: "order",
3301
+ // Sizing
3302
+ width: "w",
3303
+ height: "h",
3304
+ maxWidth: "max-w",
3305
+ maxHeight: "max-h",
3306
+ minWidth: "min-w",
3307
+ minHeight: "min-h",
3308
+ aspectRatio: "aspect",
3309
+ // Colors & Background
3310
+ backgroundColor: "bg",
3311
+ backgroundImage: "bg",
3312
+ color: "text",
3313
+ // Borders & Radius
3314
+ border: "border",
3315
+ borderColor: "border",
3316
+ borderTop: "border-t",
3317
+ borderRight: "border-r",
3318
+ borderBottom: "border-b",
3319
+ borderLeft: "border-l",
3320
+ borderRadius: "rounded",
3321
+ borderTopLeftRadius: "rounded-tl",
3322
+ borderTopRightRadius: "rounded-tr",
3323
+ borderBottomLeftRadius: "rounded-bl",
3324
+ borderBottomRightRadius: "rounded-br",
3325
+ // Text
3326
+ fontSize: "text",
3327
+ fontWeight: "font",
3328
+ fontFamily: "font",
3329
+ lineHeight: "leading",
3330
+ letterSpacing: "tracking",
3331
+ textIndent: "indent",
3332
+ verticalAlign: "align",
3333
+ // Lists
3334
+ listStyleType: "list",
3335
+ // Transform & Effects
3336
+ opacity: "opacity",
3337
+ transform: "transform",
3338
+ transformOrigin: "origin",
3339
+ boxShadow: "shadow",
3340
+ textShadow: "text-shadow",
3341
+ filter: "filter",
3342
+ backdropFilter: "backdrop-filter",
3343
+ // Positioning
3344
+ top: "top",
3345
+ right: "right",
3346
+ bottom: "bottom",
3347
+ left: "left",
3348
+ inset: "inset",
3349
+ zIndex: "z",
3350
+ // Grid Layout
3351
+ gridTemplateColumns: "grid-cols",
3352
+ gridTemplateRows: "grid-rows",
3353
+ gridColumn: "col",
3354
+ gridRow: "row",
3355
+ gridAutoRows: "auto-rows",
3356
+ gridAutoColumns: "auto-cols",
3357
+ // Outline
3358
+ outline: "outline",
3359
+ outlineWidth: "outline",
3360
+ outlineColor: "outline",
3361
+ outlineOffset: "outline-offset",
3362
+ // Other
3363
+ overflow: "overflow",
3364
+ overflowX: "overflow-x",
3365
+ overflowY: "overflow-y",
3366
+ cursor: "cursor",
3367
+ transition: "transition",
3368
+ objectPosition: "object",
3369
+ accentColor: "accent"
3370
+ };
3371
+ var prefixToCSSProperty = {
3372
+ // Spacing
3373
+ p: "padding",
3374
+ pt: "padding-top",
3375
+ pr: "padding-right",
3376
+ pb: "padding-bottom",
3377
+ pl: "padding-left",
3378
+ px: "padding",
3379
+ py: "padding",
3380
+ m: "margin",
3381
+ mt: "margin-top",
3382
+ mr: "margin-right",
3383
+ mb: "margin-bottom",
3384
+ ml: "margin-left",
3385
+ mx: "margin",
3386
+ my: "margin",
3387
+ gap: "gap",
3388
+ "gap-y": "row-gap",
3389
+ "gap-x": "column-gap",
3390
+ // Sizing
3391
+ w: "width",
3392
+ h: "height",
3393
+ "max-w": "max-width",
3394
+ "max-h": "max-height",
3395
+ "min-w": "min-width",
3396
+ "min-h": "min-height",
3397
+ aspect: "aspect-ratio",
3398
+ // Colors & Background
3399
+ bg: "background-color",
3400
+ text: "color",
3401
+ accent: "accent-color",
3402
+ // Borders
3403
+ border: "border",
3404
+ "border-t": "border-top",
3405
+ "border-r": "border-right",
3406
+ "border-b": "border-bottom",
3407
+ "border-l": "border-left",
3408
+ rounded: "border-radius",
3409
+ "rounded-tl": "border-top-left-radius",
3410
+ "rounded-tr": "border-top-right-radius",
3411
+ "rounded-bl": "border-bottom-left-radius",
3412
+ "rounded-br": "border-bottom-right-radius",
3413
+ // Text
3414
+ font: "font-weight",
3415
+ leading: "line-height",
3416
+ tracking: "letter-spacing",
3417
+ indent: "text-indent",
3418
+ align: "vertical-align",
3419
+ // Lists
3420
+ list: "list-style-type",
3421
+ // Flexbox
3422
+ flex: "flex",
3423
+ grow: "flex-grow",
3424
+ shrink: "flex-shrink",
3425
+ basis: "flex-basis",
3426
+ order: "order",
3427
+ // Grid
3428
+ "grid-cols": "grid-template-columns",
3429
+ "grid-rows": "grid-template-rows",
3430
+ col: "grid-column",
3431
+ row: "grid-row",
3432
+ "auto-rows": "grid-auto-rows",
3433
+ "auto-cols": "grid-auto-columns",
3434
+ // Effects
3435
+ opacity: "opacity",
3436
+ transform: "transform",
3437
+ origin: "transform-origin",
3438
+ shadow: "box-shadow",
3439
+ "text-shadow": "text-shadow",
3440
+ filter: "filter",
3441
+ "backdrop-filter": "backdrop-filter",
3442
+ // Positioning
3443
+ top: "top",
3444
+ right: "right",
3445
+ bottom: "bottom",
3446
+ left: "left",
3447
+ inset: "inset",
3448
+ z: "z-index",
3449
+ // Outline
3450
+ outline: "outline",
3451
+ "outline-offset": "outline-offset",
3452
+ // Other
3453
+ overflow: "overflow",
3454
+ "overflow-x": "overflow-x",
3455
+ "overflow-y": "overflow-y",
3456
+ cursor: "cursor",
3457
+ transition: "transition",
3458
+ object: "object-position"
3182
3459
  };
3183
- var specialValueMappings = {
3460
+ var staticUtilities = {
3184
3461
  display: {
3185
- flex: "f",
3186
- grid: "g",
3187
- block: "b",
3188
- inline: "i",
3189
- "inline-block": "ib",
3190
- none: "h",
3191
- "inline-flex": "if",
3192
- "inline-grid": "ig"
3462
+ flex: "flex",
3463
+ grid: "grid",
3464
+ block: "block",
3465
+ inline: "inline",
3466
+ "inline-block": "inline-block",
3467
+ none: "hidden",
3468
+ "inline-flex": "inline-flex",
3469
+ "inline-grid": "inline-grid",
3470
+ table: "table",
3471
+ contents: "contents",
3472
+ "flow-root": "flow-root",
3473
+ "list-item": "list-item"
3193
3474
  },
3194
3475
  flexDirection: {
3195
- column: "fd-col",
3196
- row: "fd-row"
3476
+ column: "flex-col",
3477
+ row: "flex-row",
3478
+ "column-reverse": "flex-col-reverse",
3479
+ "row-reverse": "flex-row-reverse"
3480
+ },
3481
+ flexWrap: {
3482
+ wrap: "flex-wrap",
3483
+ nowrap: "flex-nowrap",
3484
+ "wrap-reverse": "flex-wrap-reverse"
3485
+ },
3486
+ flex: {
3487
+ "1": "flex-1",
3488
+ auto: "flex-auto",
3489
+ none: "flex-none",
3490
+ initial: "flex-initial"
3491
+ },
3492
+ flexGrow: {
3493
+ "1": "grow",
3494
+ "0": "grow-0"
3495
+ },
3496
+ flexShrink: {
3497
+ "1": "shrink",
3498
+ "0": "shrink-0"
3197
3499
  },
3198
3500
  justifyContent: {
3199
- center: "jc-c",
3200
- "flex-start": "jc-s",
3201
- "flex-end": "jc-e",
3202
- "space-between": "jc-b",
3203
- "space-around": "jc-a",
3204
- "space-evenly": "jc-ev"
3501
+ center: "justify-center",
3502
+ "flex-start": "justify-start",
3503
+ start: "justify-start",
3504
+ "flex-end": "justify-end",
3505
+ end: "justify-end",
3506
+ "space-between": "justify-between",
3507
+ "space-around": "justify-around",
3508
+ "space-evenly": "justify-evenly",
3509
+ stretch: "justify-stretch",
3510
+ normal: "justify-normal"
3205
3511
  },
3206
3512
  alignItems: {
3207
- center: "ai-c",
3208
- "flex-start": "ai-s",
3209
- "flex-end": "ai-e",
3210
- stretch: "ai-st",
3211
- baseline: "ai-b"
3513
+ center: "items-center",
3514
+ "flex-start": "items-start",
3515
+ start: "items-start",
3516
+ "flex-end": "items-end",
3517
+ end: "items-end",
3518
+ stretch: "items-stretch",
3519
+ baseline: "items-baseline"
3520
+ },
3521
+ alignContent: {
3522
+ center: "content-center",
3523
+ "flex-start": "content-start",
3524
+ start: "content-start",
3525
+ "flex-end": "content-end",
3526
+ end: "content-end",
3527
+ "space-between": "content-between",
3528
+ "space-around": "content-around",
3529
+ "space-evenly": "content-evenly",
3530
+ stretch: "content-stretch",
3531
+ normal: "content-normal"
3532
+ },
3533
+ alignSelf: {
3534
+ auto: "self-auto",
3535
+ center: "self-center",
3536
+ "flex-start": "self-start",
3537
+ start: "self-start",
3538
+ "flex-end": "self-end",
3539
+ end: "self-end",
3540
+ stretch: "self-stretch",
3541
+ baseline: "self-baseline"
3542
+ },
3543
+ justifyItems: {
3544
+ center: "justify-items-center",
3545
+ start: "justify-items-start",
3546
+ end: "justify-items-end",
3547
+ stretch: "justify-items-stretch"
3548
+ },
3549
+ justifySelf: {
3550
+ auto: "justify-self-auto",
3551
+ center: "justify-self-center",
3552
+ start: "justify-self-start",
3553
+ end: "justify-self-end",
3554
+ stretch: "justify-self-stretch"
3555
+ },
3556
+ placeContent: {
3557
+ center: "place-content-center",
3558
+ start: "place-content-start",
3559
+ end: "place-content-end",
3560
+ "space-between": "place-content-between",
3561
+ "space-around": "place-content-around",
3562
+ "space-evenly": "place-content-evenly",
3563
+ stretch: "place-content-stretch"
3564
+ },
3565
+ placeItems: {
3566
+ center: "place-items-center",
3567
+ start: "place-items-start",
3568
+ end: "place-items-end",
3569
+ stretch: "place-items-stretch"
3570
+ },
3571
+ placeSelf: {
3572
+ auto: "place-self-auto",
3573
+ center: "place-self-center",
3574
+ start: "place-self-start",
3575
+ end: "place-self-end",
3576
+ stretch: "place-self-stretch"
3577
+ },
3578
+ position: {
3579
+ static: "static",
3580
+ fixed: "fixed",
3581
+ absolute: "absolute",
3582
+ relative: "relative",
3583
+ sticky: "sticky"
3212
3584
  },
3213
3585
  overflow: {
3214
- hidden: "o-h",
3215
- auto: "o-a",
3216
- scroll: "o-s",
3217
- visible: "o-v"
3586
+ hidden: "overflow-hidden",
3587
+ auto: "overflow-auto",
3588
+ scroll: "overflow-scroll",
3589
+ visible: "overflow-visible",
3590
+ clip: "overflow-clip"
3591
+ },
3592
+ overflowX: {
3593
+ hidden: "overflow-x-hidden",
3594
+ auto: "overflow-x-auto",
3595
+ scroll: "overflow-x-scroll",
3596
+ visible: "overflow-x-visible",
3597
+ clip: "overflow-x-clip"
3598
+ },
3599
+ overflowY: {
3600
+ hidden: "overflow-y-hidden",
3601
+ auto: "overflow-y-auto",
3602
+ scroll: "overflow-y-scroll",
3603
+ visible: "overflow-y-visible",
3604
+ clip: "overflow-y-clip"
3218
3605
  },
3219
- cursor: {
3220
- pointer: "cursor-pointer",
3221
- default: "cursor-default"
3606
+ textAlign: {
3607
+ left: "text-left",
3608
+ center: "text-center",
3609
+ right: "text-right",
3610
+ justify: "text-justify",
3611
+ start: "text-start",
3612
+ end: "text-end"
3613
+ },
3614
+ textDecoration: {
3615
+ underline: "underline",
3616
+ overline: "overline",
3617
+ "line-through": "line-through",
3618
+ none: "no-underline"
3619
+ },
3620
+ textTransform: {
3621
+ uppercase: "uppercase",
3622
+ lowercase: "lowercase",
3623
+ capitalize: "capitalize",
3624
+ none: "normal-case"
3625
+ },
3626
+ whiteSpace: {
3627
+ normal: "whitespace-normal",
3628
+ nowrap: "whitespace-nowrap",
3629
+ pre: "whitespace-pre",
3630
+ "pre-wrap": "whitespace-pre-wrap",
3631
+ "pre-line": "whitespace-pre-line",
3632
+ "break-spaces": "whitespace-break-spaces"
3633
+ },
3634
+ wordBreak: {
3635
+ normal: "break-normal",
3636
+ "break-all": "break-all",
3637
+ "keep-all": "break-keep",
3638
+ "break-word": "break-word"
3639
+ },
3640
+ overflowWrap: {
3641
+ normal: "wrap-normal",
3642
+ "break-word": "wrap-break-word",
3643
+ anywhere: "wrap-anywhere"
3644
+ },
3645
+ fontWeight: {
3646
+ normal: "font-normal",
3647
+ bold: "font-bold",
3648
+ bolder: "font-bolder",
3649
+ lighter: "font-lighter"
3650
+ },
3651
+ color: {
3652
+ transparent: "text-transparent",
3653
+ currentColor: "text-current",
3654
+ inherit: "text-inherit"
3655
+ },
3656
+ backgroundColor: {
3657
+ transparent: "bg-transparent",
3658
+ currentColor: "bg-current",
3659
+ inherit: "bg-inherit"
3660
+ },
3661
+ backgroundImage: {
3662
+ none: "bg-none"
3663
+ },
3664
+ borderColor: {
3665
+ transparent: "border-transparent",
3666
+ currentColor: "border-current",
3667
+ inherit: "border-inherit"
3222
3668
  },
3223
3669
  pointerEvents: {
3224
- none: "pe-none",
3225
- auto: "pe-auto"
3670
+ none: "pointer-events-none",
3671
+ auto: "pointer-events-auto"
3226
3672
  },
3227
3673
  userSelect: {
3228
- none: "us-none",
3229
- auto: "us-auto",
3230
- text: "us-text",
3231
- all: "us-all"
3674
+ none: "select-none",
3675
+ auto: "select-auto",
3676
+ text: "select-text",
3677
+ all: "select-all"
3232
3678
  },
3233
- whiteSpace: {
3234
- normal: "whs-normal",
3235
- nowrap: "whs-nowrap",
3236
- pre: "whs-pre",
3237
- "pre-wrap": "whs-pre-wrap",
3238
- "pre-line": "whs-pre-line"
3239
- }
3240
- // Note: CSS functions (blur, translateY, scale, rotate, repeat) are now handled
3241
- // dynamically in utilityClassMapper.ts - no need to hardcode specific values here
3679
+ objectFit: {
3680
+ contain: "object-contain",
3681
+ cover: "object-cover",
3682
+ fill: "object-fill",
3683
+ none: "object-none",
3684
+ "scale-down": "object-scale-down"
3685
+ },
3686
+ boxSizing: {
3687
+ "border-box": "box-border",
3688
+ "content-box": "box-content"
3689
+ },
3690
+ visibility: {
3691
+ visible: "visible",
3692
+ hidden: "invisible",
3693
+ collapse: "collapse"
3694
+ },
3695
+ resize: {
3696
+ both: "resize",
3697
+ horizontal: "resize-x",
3698
+ vertical: "resize-y",
3699
+ none: "resize-none"
3700
+ },
3701
+ scrollBehavior: {
3702
+ smooth: "scroll-smooth",
3703
+ auto: "scroll-auto"
3704
+ },
3705
+ gridAutoFlow: {
3706
+ row: "grid-flow-row",
3707
+ column: "grid-flow-col",
3708
+ dense: "grid-flow-dense",
3709
+ "row dense": "grid-flow-row-dense",
3710
+ "column dense": "grid-flow-col-dense"
3711
+ },
3712
+ listStyleType: {
3713
+ none: "list-none",
3714
+ disc: "list-disc",
3715
+ decimal: "list-decimal"
3716
+ },
3717
+ listStylePosition: {
3718
+ inside: "list-inside",
3719
+ outside: "list-outside"
3720
+ },
3721
+ backfaceVisibility: {
3722
+ visible: "backface-visible",
3723
+ hidden: "backface-hidden"
3724
+ },
3725
+ transition: {
3726
+ none: "transition-none"
3727
+ },
3728
+ transform: {
3729
+ none: "transform-none"
3730
+ },
3731
+ boxShadow: {
3732
+ none: "shadow-none"
3733
+ },
3734
+ outline: {
3735
+ none: "outline-none"
3736
+ }
3242
3737
  };
3243
- var classToStyleSpecialCases = {
3244
- f: { prop: "display", value: "flex" },
3245
- "fd-col": { prop: "flexDirection", value: "column" },
3246
- "fd-row": { prop: "flexDirection", value: "row" },
3247
- g: { prop: "display", value: "grid" },
3248
- b: { prop: "display", value: "block" },
3249
- i: { prop: "display", value: "inline" },
3250
- ib: { prop: "display", value: "inline-block" },
3251
- h: { prop: "display", value: "none" },
3252
- "if": { prop: "display", value: "inline-flex" },
3253
- ig: { prop: "display", value: "inline-grid" },
3254
- "jc-c": { prop: "justifyContent", value: "center" },
3255
- "jc-s": { prop: "justifyContent", value: "flex-start" },
3256
- "jc-e": { prop: "justifyContent", value: "flex-end" },
3257
- "jc-b": { prop: "justifyContent", value: "space-between" },
3258
- "jc-a": { prop: "justifyContent", value: "space-around" },
3259
- "jc-ev": { prop: "justifyContent", value: "space-evenly" },
3260
- "ai-c": { prop: "alignItems", value: "center" },
3261
- "ai-s": { prop: "alignItems", value: "flex-start" },
3262
- "ai-e": { prop: "alignItems", value: "flex-end" },
3263
- "ai-st": { prop: "alignItems", value: "stretch" },
3264
- "ai-b": { prop: "alignItems", value: "baseline" },
3265
- "o-h": { prop: "overflow", value: "hidden" },
3266
- "o-a": { prop: "overflow", value: "auto" },
3267
- "o-s": { prop: "overflow", value: "scroll" },
3268
- "o-v": { prop: "overflow", value: "visible" },
3269
- "cursor-pointer": { prop: "cursor", value: "pointer" },
3270
- "cursor-default": { prop: "cursor", value: "default" },
3271
- "pe-none": { prop: "pointerEvents", value: "none" },
3272
- "pe-auto": { prop: "pointerEvents", value: "auto" },
3273
- "us-none": { prop: "userSelect", value: "none" },
3274
- "us-auto": { prop: "userSelect", value: "auto" },
3275
- "us-text": { prop: "userSelect", value: "text" },
3276
- "us-all": { prop: "userSelect", value: "all" },
3277
- "whs-normal": { prop: "whiteSpace", value: "normal" },
3278
- "whs-nowrap": { prop: "whiteSpace", value: "nowrap" },
3279
- "whs-pre": { prop: "whiteSpace", value: "pre" },
3280
- "whs-pre-wrap": { prop: "whiteSpace", value: "pre-wrap" },
3281
- "whs-pre-line": { prop: "whiteSpace", value: "pre-line" },
3282
- // Grid template columns
3283
- "gtc-2": { prop: "gridTemplateColumns", value: "repeat(2, 1fr)" },
3284
- "gtc-3": { prop: "gridTemplateColumns", value: "repeat(3, 1fr)" },
3285
- "gtc-4": { prop: "gridTemplateColumns", value: "repeat(4, 1fr)" },
3286
- "gtc-5": { prop: "gridTemplateColumns", value: "repeat(5, 1fr)" },
3287
- "gtc-6": { prop: "gridTemplateColumns", value: "repeat(6, 1fr)" },
3288
- // Backdrop filter
3289
- "bdf-blur-4": { prop: "backdropFilter", value: "blur(4px)" },
3290
- "bdf-blur-8": { prop: "backdropFilter", value: "blur(8px)" },
3291
- "bdf-blur-10": { prop: "backdropFilter", value: "blur(10px)" },
3292
- // Transform
3293
- "tm-ty-0": { prop: "transform", value: "translateY(0)" },
3294
- "tm-ty-n10": { prop: "transform", value: "translateY(-10px)" },
3295
- "tm-ty-n50p": { prop: "transform", value: "translateY(-50%)" },
3296
- // Filter
3297
- "flt-blur-1": { prop: "filter", value: "blur(1px)" },
3298
- // Shadow presets (reverse mapping)
3299
- "sh-0": { prop: "boxShadow", value: "none" },
3300
- "sh-1": { prop: "boxShadow", value: "0 1px 2px rgba(0, 0, 0, 0.05)" },
3301
- "sh-2": { prop: "boxShadow", value: "0 4px 12px rgba(0, 0, 0, 0.1)" },
3302
- "sh-3": { prop: "boxShadow", value: "0 8px 24px rgba(0, 0, 0, 0.15)" },
3303
- "sh-4": { prop: "boxShadow", value: "0 12px 32px rgba(0, 0, 0, 0.2)" },
3304
- // Gradient presets (reverse mapping)
3305
- "gr-1": { prop: "background", value: "linear-gradient(90deg, rgba(10,22,40,0.85) 0%, rgba(10,22,40,0.2) 100%)" },
3306
- "gr-2": { prop: "background", value: "linear-gradient(0deg, #a9e8fd, #00aee8 25%, #0f1335 72%)" },
3307
- // Border presets (reverse mapping)
3308
- "bd-0": { prop: "border", value: "1px solid var(--border)" },
3309
- "bd-1": { prop: "border", value: "1px solid var(--border-light)" }
3738
+ var staticUtilityReverse = (() => {
3739
+ const reverse = {};
3740
+ for (const [prop, values] of Object.entries(staticUtilities)) {
3741
+ for (const [value, className] of Object.entries(values)) {
3742
+ if (!reverse[className]) {
3743
+ reverse[className] = { prop, value };
3744
+ }
3745
+ }
3746
+ }
3747
+ return reverse;
3748
+ })();
3749
+ var keywordValues = {
3750
+ w: { auto: "auto", full: "100%", screen: "100vw", fit: "fit-content", min: "min-content", max: "max-content" },
3751
+ h: { auto: "auto", full: "100%", screen: "100vh", fit: "fit-content", min: "min-content", max: "max-content" },
3752
+ "max-w": { full: "100%", none: "none", screen: "100vw", fit: "fit-content", min: "min-content", max: "max-content" },
3753
+ "max-h": { full: "100%", none: "none", screen: "100vh", fit: "fit-content", min: "min-content", max: "max-content" },
3754
+ "min-w": { auto: "auto", full: "100%", fit: "fit-content", min: "min-content", max: "max-content" },
3755
+ "min-h": { auto: "auto", full: "100%", screen: "100vh", fit: "fit-content", min: "min-content", max: "max-content" },
3756
+ m: { auto: "auto" },
3757
+ mt: { auto: "auto" },
3758
+ mr: { auto: "auto" },
3759
+ mb: { auto: "auto" },
3760
+ ml: { auto: "auto" },
3761
+ mx: { auto: "auto" },
3762
+ my: { auto: "auto" },
3763
+ top: { auto: "auto", full: "100%" },
3764
+ right: { auto: "auto", full: "100%" },
3765
+ bottom: { auto: "auto", full: "100%" },
3766
+ left: { auto: "auto", full: "100%" },
3767
+ inset: { auto: "auto", full: "100%" },
3768
+ basis: { auto: "auto", full: "100%" },
3769
+ rounded: { none: "0", full: "9999px" },
3770
+ "rounded-tl": { none: "0", full: "9999px" },
3771
+ "rounded-tr": { none: "0", full: "9999px" },
3772
+ "rounded-bl": { none: "0", full: "9999px" },
3773
+ "rounded-br": { none: "0", full: "9999px" },
3774
+ z: { auto: "auto" },
3775
+ leading: { normal: "normal" },
3776
+ tracking: { normal: "normal" }
3310
3777
  };
3778
+ var genericKeywordRoots = /* @__PURE__ */ new Set(["cursor", "align", "origin", "object", "list"]);
3779
+ var integerValueRoots = /* @__PURE__ */ new Set(["z", "order", "flex", "grow", "shrink"]);
3780
+ var colorTokenProps = /* @__PURE__ */ new Set([
3781
+ "color",
3782
+ "backgroundColor",
3783
+ "borderColor",
3784
+ "accentColor",
3785
+ "outlineColor"
3786
+ ]);
3311
3787
  var shadowPresets = {
3312
3788
  "0": "none",
3313
3789
  "1": "0 1px 2px rgba(0, 0, 0, 0.05)",
@@ -3323,30 +3799,216 @@ var borderPresets = {
3323
3799
  "0": "1px solid var(--border)",
3324
3800
  "1": "1px solid var(--border-light)"
3325
3801
  };
3802
+ var presetClassReverse = (() => {
3803
+ const reverse = {};
3804
+ for (const [key, value] of Object.entries(shadowPresets)) {
3805
+ reverse[`shadow-${key}`] = { prop: "boxShadow", value };
3806
+ }
3807
+ for (const [key, value] of Object.entries(gradientPresets)) {
3808
+ reverse[`bg-gradient-${key}`] = { prop: "background", value };
3809
+ }
3810
+ for (const [key, value] of Object.entries(borderPresets)) {
3811
+ reverse[`border-preset-${key}`] = { prop: "border", value };
3812
+ }
3813
+ return reverse;
3814
+ })();
3326
3815
 
3327
- // lib/shared/utilityClassMapper.ts
3328
- var functionAbbreviations = {
3329
- blur: "bl",
3330
- translateY: "ty",
3331
- translateX: "tx",
3332
- translate: "t",
3333
- scale: "sc",
3334
- scaleX: "scx",
3335
- scaleY: "scy",
3336
- rotate: "ro",
3337
- skew: "sk",
3338
- skewX: "skx",
3339
- skewY: "sky",
3340
- repeat: "re",
3341
- minmax: "mm",
3342
- calc: "ca"
3816
+ // lib/shared/utilityClassNames.ts
3817
+ var SORTED_ROOTS = Object.keys(prefixToCSSProperty).sort((a, b) => b.length - a.length);
3818
+ function camelToKebab(prop) {
3819
+ return prop.replace(/([A-Z])/g, "-$1").toLowerCase();
3820
+ }
3821
+ var kebabToCamelMap = (() => {
3822
+ const map = {};
3823
+ for (const prop of propertyOrder) {
3824
+ map[camelToKebab(prop)] = prop;
3825
+ }
3826
+ return map;
3827
+ })();
3828
+ function cssPropertyToCamel(property) {
3829
+ return kebabToCamelMap[property] ?? property.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
3830
+ }
3831
+ var ROOT_CAMEL_OVERRIDES = {
3832
+ px: "paddingInline",
3833
+ py: "paddingBlock",
3834
+ mx: "marginInline",
3835
+ my: "marginBlock"
3343
3836
  };
3837
+ function transformOutsideUrl(input, transform) {
3838
+ let result = "";
3839
+ let i = 0;
3840
+ const lower = input.toLowerCase();
3841
+ while (i < input.length) {
3842
+ const idx = lower.indexOf("url(", i);
3843
+ if (idx === -1) {
3844
+ result += transform(input.slice(i));
3845
+ break;
3846
+ }
3847
+ result += transform(input.slice(i, idx));
3848
+ let depth = 0;
3849
+ let j = idx + 3;
3850
+ for (; j < input.length; j++) {
3851
+ if (input[j] === "(") depth++;
3852
+ else if (input[j] === ")") {
3853
+ depth--;
3854
+ if (depth === 0) {
3855
+ j++;
3856
+ break;
3857
+ }
3858
+ }
3859
+ }
3860
+ result += input.slice(idx, j);
3861
+ i = j;
3862
+ }
3863
+ return result;
3864
+ }
3865
+ function encodeArbitraryValue(value) {
3866
+ let ok = true;
3867
+ const encoded = transformOutsideUrl(value, (segment) => {
3868
+ if (/[_"'\\[\]]/.test(segment)) ok = false;
3869
+ return segment.replace(/\s+/g, "_");
3870
+ });
3871
+ if (!ok) return null;
3872
+ if (/[\s"'\\[\]]/.test(encoded.replace(/^\[|\]$/g, ""))) return null;
3873
+ return encoded;
3874
+ }
3875
+ function decodeArbitraryValue(encoded) {
3876
+ return transformOutsideUrl(encoded, (segment) => segment.replace(/_/g, " "));
3877
+ }
3878
+ var FONT_SIZE_KEYWORDS = /* @__PURE__ */ new Set([
3879
+ "xx-small",
3880
+ "x-small",
3881
+ "small",
3882
+ "medium",
3883
+ "large",
3884
+ "x-large",
3885
+ "xx-large",
3886
+ "xxx-large",
3887
+ "larger",
3888
+ "smaller"
3889
+ ]);
3890
+ function isColorValue(value) {
3891
+ if (value.startsWith("#") || value.startsWith("var(")) return true;
3892
+ if (/^(rgb|rgba|hsl|hsla|oklch|oklab|lab|lch|hwb|color|color-mix)\(/i.test(value)) return true;
3893
+ if (value === "transparent" || value === "currentColor" || value === "currentcolor") return true;
3894
+ return isCssNamedColor(value);
3895
+ }
3896
+ function isFontSizeValue(value) {
3897
+ if (/^[\d.+-]/.test(value)) return true;
3898
+ if (/^(calc|clamp|min|max)\(/i.test(value)) return true;
3899
+ return FONT_SIZE_KEYWORDS.has(value);
3900
+ }
3901
+ function isFontWeightValue(value) {
3902
+ return /^\d+(\.\d+)?$/.test(value);
3903
+ }
3904
+ function isImageValue(value) {
3905
+ return /^(url|linear-gradient|radial-gradient|conic-gradient|repeating-linear-gradient|repeating-radial-gradient|repeating-conic-gradient|image-set|cross-fade|element)\(/i.test(
3906
+ value
3907
+ );
3908
+ }
3909
+ function isLengthValue(value) {
3910
+ return /^-?[\d.]+[a-z%]*$/i.test(value);
3911
+ }
3912
+ function resolveRootProperty(root, value) {
3913
+ switch (root) {
3914
+ case "text":
3915
+ return isFontSizeValue(value) ? "font-size" : "color";
3916
+ case "font":
3917
+ return isFontWeightValue(value) ? "font-weight" : "font-family";
3918
+ case "bg":
3919
+ return isImageValue(value) ? "background-image" : "background-color";
3920
+ case "border":
3921
+ return !value.includes(" ") && isColorValue(value) ? "border-color" : "border";
3922
+ case "outline": {
3923
+ if (value.includes(" ") || value === "none") return "outline";
3924
+ if (isColorValue(value)) return "outline-color";
3925
+ if (isLengthValue(value)) return "outline-width";
3926
+ return "outline";
3927
+ }
3928
+ default:
3929
+ return prefixToCSSProperty[root] ?? root;
3930
+ }
3931
+ }
3932
+ function splitVariantPrefix(className) {
3933
+ const match = className.match(/^([a-z][a-z0-9_-]*):(.+)$/);
3934
+ if (match) {
3935
+ return { breakpoint: match[1], base: match[2] };
3936
+ }
3937
+ return { breakpoint: null, base: className };
3938
+ }
3939
+ function breakpointClassPrefix(breakpointName) {
3940
+ return `${breakpointName.toLowerCase()}:`;
3941
+ }
3942
+ var HASH_VALUE_RE = /^h[0-9a-z]+$/;
3943
+ function parseUtilityClass(className) {
3944
+ const stat = staticUtilityReverse[className];
3945
+ if (stat) {
3946
+ return { property: camelToKebab(stat.prop), value: stat.value, root: null, kind: "static" };
3947
+ }
3948
+ const preset = presetClassReverse[className];
3949
+ if (preset) {
3950
+ return { property: camelToKebab(preset.prop), value: preset.value, root: null, kind: "preset" };
3951
+ }
3952
+ const arbProp = className.match(/^\[([a-z-]+):(.+)\]$/);
3953
+ if (arbProp) {
3954
+ return {
3955
+ property: arbProp[1],
3956
+ value: decodeArbitraryValue(arbProp[2]),
3957
+ root: null,
3958
+ kind: "arbitrary-property"
3959
+ };
3960
+ }
3961
+ for (const root of SORTED_ROOTS) {
3962
+ if (!className.startsWith(`${root}-`)) continue;
3963
+ const rest = className.slice(root.length + 1);
3964
+ if (!rest) continue;
3965
+ const parsed = parseRootValue(root, rest);
3966
+ if (parsed) return parsed;
3967
+ }
3968
+ return null;
3969
+ }
3970
+ function parseRootValue(root, rest) {
3971
+ if (rest.startsWith("[") && rest.endsWith("]") && rest.length > 2) {
3972
+ const value = decodeArbitraryValue(rest.slice(1, -1));
3973
+ return { property: resolveRootProperty(root, value), value, root, kind: "arbitrary" };
3974
+ }
3975
+ const varMatch = rest.match(/^\((?:([a-z-]+):)?(--[\w-]+)\)$/);
3976
+ if (varMatch) {
3977
+ const hint = varMatch[1];
3978
+ const value = `var(${varMatch[2]})`;
3979
+ let property;
3980
+ if (root === "text") {
3981
+ property = hint === "length" ? "font-size" : "color";
3982
+ } else if (root === "font") {
3983
+ property = hint === "number" ? "font-weight" : "font-family";
3984
+ } else {
3985
+ property = resolveRootProperty(root, value);
3986
+ }
3987
+ return { property, value, root, kind: "var" };
3988
+ }
3989
+ const keyword = keywordValues[root]?.[rest];
3990
+ if (keyword !== void 0) {
3991
+ return { property: resolveRootProperty(root, keyword), value: keyword, root, kind: "keyword" };
3992
+ }
3993
+ if (genericKeywordRoots.has(root) && /^[a-z][a-z-]*$/.test(rest)) {
3994
+ return { property: resolveRootProperty(root, rest), value: rest, root, kind: "keyword" };
3995
+ }
3996
+ if (integerValueRoots.has(root) && /^-?\d+$/.test(rest)) {
3997
+ return { property: prefixToCSSProperty[root], value: rest, root, kind: "numeric" };
3998
+ }
3999
+ if (root === "opacity" && /^\d{1,3}$/.test(rest)) {
4000
+ return { property: "opacity", value: String(Number(rest) / 100), root, kind: "numeric" };
4001
+ }
4002
+ if (HASH_VALUE_RE.test(rest)) {
4003
+ return { property: prefixToCSSProperty[root], value: null, root, kind: "hash" };
4004
+ }
4005
+ return null;
4006
+ }
4007
+
4008
+ // lib/shared/utilityClassMapper.ts
3344
4009
  function isStyleMapping(value) {
3345
4010
  return typeof value === "object" && value !== null && "_mapping" in value && value._mapping === true;
3346
4011
  }
3347
- function sanitizeClassValue(value) {
3348
- return value.replace(/\s+/g, "-").replace(/[()]/g, "").replace(/,/g, "_").replace(/%/g, "p").replace(/\./g, "d").replace(/[^\w-]/g, "");
3349
- }
3350
4012
  function shortHash(input) {
3351
4013
  let hash = 2166136261;
3352
4014
  for (let i = 0; i < input.length; i++) {
@@ -3355,20 +4017,12 @@ function shortHash(input) {
3355
4017
  }
3356
4018
  return (hash >>> 0).toString(36);
3357
4019
  }
3358
- function hasIllegalClassChars(className) {
3359
- return /[^\w-]/.test(className);
4020
+ function isBareColorToken(value) {
4021
+ if (!/^[a-zA-Z][\w-]*$/.test(value)) return false;
4022
+ if (isColorValue(value)) return false;
4023
+ return true;
3360
4024
  }
3361
4025
  function propertyValueToClass(prop, value) {
3362
- const prefix = propertyMap[prop];
3363
- if (!prefix) {
3364
- const stringValue2 = String(value);
3365
- const dynamicPrefix = prop.replace(/([A-Z])/g, "-$1").toLowerCase().split("-").filter(Boolean).map((word) => word.slice(0, 2)).join("");
3366
- const sanitizedValue = sanitizeClassValue(stringValue2);
3367
- const className2 = `${dynamicPrefix}-${sanitizedValue}`;
3368
- const cssProperty = prop.replace(/([A-Z])/g, "-$1").toLowerCase();
3369
- registerDynamicStyle(className2, cssProperty, value);
3370
- return className2;
3371
- }
3372
4026
  let stringValue = String(value);
3373
4027
  if (prop === "fontFamily") {
3374
4028
  stringValue = stringValue.split(",").map((font) => {
@@ -3379,69 +4033,82 @@ function propertyValueToClass(prop, value) {
3379
4033
  return trimmed;
3380
4034
  }).join(", ");
3381
4035
  }
3382
- let className = null;
3383
- if (specialValueMappings[prop]) {
3384
- const mapping = specialValueMappings[prop];
3385
- if (mapping[stringValue]) {
3386
- className = mapping[stringValue];
3387
- }
3388
- }
3389
- if (!className && prop === "boxShadow" && shadowPresets[stringValue]) {
3390
- className = `sh-${stringValue}`;
4036
+ const staticClass = staticUtilities[prop]?.[stringValue];
4037
+ if (staticClass) {
4038
+ registerStyleValue(staticClass, stringValue);
4039
+ return staticClass;
3391
4040
  }
3392
- if (!className && (prop === "background" || prop === "backgroundImage") && gradientPresets[stringValue]) {
3393
- className = `gr-${stringValue}`;
4041
+ if (prop === "boxShadow" && shadowPresets[stringValue]) {
4042
+ const className2 = `shadow-${stringValue}`;
4043
+ registerStyleValue(className2, shadowPresets[stringValue]);
4044
+ return className2;
3394
4045
  }
3395
- if (!className && prop === "border" && borderPresets[stringValue]) {
3396
- className = `bd-${stringValue}`;
4046
+ if ((prop === "background" || prop === "backgroundImage") && gradientPresets[stringValue]) {
4047
+ const className2 = `bg-gradient-${stringValue}`;
4048
+ registerStyleValue(className2, gradientPresets[stringValue]);
4049
+ return className2;
3397
4050
  }
3398
- if (!className && stringValue.includes("(") && stringValue.includes(")")) {
3399
- const funcMatch = stringValue.match(/^([a-zA-Z]+)\((.+)\)$/);
3400
- if (funcMatch) {
3401
- const [, funcName, args] = funcMatch;
3402
- const abbrev = functionAbbreviations[funcName] || funcName.slice(0, 2);
3403
- const argNormalized = args.replace(/,\s*/g, "-").replace(/\s+/g, "").replace(/-(\d)/g, "n$1").replace(/px$/i, "").replace(/%$/, "p");
3404
- className = `${prefix}-${abbrev}${argNormalized}`;
3405
- }
4051
+ if (prop === "border" && borderPresets[stringValue]) {
4052
+ const className2 = `border-preset-${stringValue}`;
4053
+ registerStyleValue(className2, borderPresets[stringValue]);
4054
+ return className2;
3406
4055
  }
3407
- if (!className && stringValue.includes("var(")) {
3408
- const varMatch = stringValue.match(/var\((--[\w-]+)\)/);
3409
- if (varMatch) {
3410
- const varName = varMatch[1].replace("--", "");
3411
- className = `${prefix}-${varName}`;
3412
- }
4056
+ const root = propertyMap[prop];
4057
+ if (!root) {
4058
+ const cssProperty = camelToKebab(prop);
4059
+ const encoded = encodeArbitraryValue(stringValue);
4060
+ const className2 = encoded != null ? `[${cssProperty}:${encoded}]` : `${cssProperty}-h${shortHash(stringValue)}`;
4061
+ registerDynamicStyle(className2, cssProperty, value);
4062
+ return className2;
3413
4063
  }
3414
- if (!className && (prop === "color" || prop === "backgroundColor" || prop === "borderColor") && !stringValue.match(/^\d/) && !stringValue.includes("#") && !stringValue.includes("rgb")) {
3415
- className = `${prefix}-${stringValue}`;
4064
+ let className = null;
4065
+ const kwTable = keywordValues[root];
4066
+ if (kwTable) {
4067
+ for (const [keyword, cssValue] of Object.entries(kwTable)) {
4068
+ if (cssValue === stringValue) {
4069
+ className = `${root}-${keyword}`;
4070
+ break;
4071
+ }
4072
+ }
3416
4073
  }
3417
- if (!className && (stringValue.match(/^\d+px$/) || stringValue.match(/^\d+em$/))) {
3418
- className = `${prefix}-${stringValue}`;
4074
+ if (!className && genericKeywordRoots.has(root) && /^[a-z][a-z-]*$/.test(stringValue)) {
4075
+ className = `${root}-${stringValue}`;
3419
4076
  }
3420
- if (!className && stringValue.match(/^\d+%$/)) {
3421
- const percentValue = stringValue.replace("%", "p");
3422
- className = `${prefix}-${percentValue}`;
4077
+ if (!className && integerValueRoots.has(root) && /^-?\d+$/.test(stringValue)) {
4078
+ className = `${root}-${stringValue}`;
3423
4079
  }
3424
- if (!className && stringValue.includes(" ")) {
3425
- const spacedValue = stringValue.replace(/\s+/g, "-");
3426
- className = `${prefix}-${spacedValue}`;
4080
+ if (!className && prop === "opacity") {
4081
+ const num = Number(stringValue);
4082
+ if (Number.isFinite(num) && num >= 0 && num <= 1) {
4083
+ const scaled = Math.round(num * 100);
4084
+ if (Math.abs(num * 100 - scaled) < 1e-9) {
4085
+ className = `opacity-${scaled}`;
4086
+ }
4087
+ }
3427
4088
  }
3428
- if (!className && stringValue === "auto") {
3429
- className = `${prefix}-auto`;
4089
+ if (!className) {
4090
+ const varMatch = stringValue.match(/^var\((--[\w-]+)\)$/);
4091
+ if (varMatch) {
4092
+ if (prop === "fontSize") className = `text-(length:${varMatch[1]})`;
4093
+ else if (prop === "fontWeight") className = `font-(number:${varMatch[1]})`;
4094
+ else className = `${root}-(${varMatch[1]})`;
4095
+ }
3430
4096
  }
3431
- if (!className && stringValue.includes("/")) {
3432
- const slashValue = stringValue.replace(/\//g, "s");
3433
- className = `${prefix}-${slashValue}`;
4097
+ if (!className && colorTokenProps.has(prop) && isBareColorToken(stringValue)) {
4098
+ className = `${root}-(--${stringValue})`;
3434
4099
  }
3435
4100
  if (!className) {
3436
- className = `${prefix}-${stringValue}`;
4101
+ const encoded = encodeArbitraryValue(stringValue);
4102
+ if (encoded != null) {
4103
+ className = `${root}-[${encoded}]`;
4104
+ }
3437
4105
  }
3438
- if (hasIllegalClassChars(className)) {
3439
- className = `${prefix}-h${shortHash(stringValue)}`;
4106
+ if (!className) {
4107
+ className = `${root}-h${shortHash(stringValue)}`;
3440
4108
  }
3441
4109
  registerStyleValue(className, value);
3442
4110
  return className;
3443
4111
  }
3444
- var propertyOrder = Object.keys(propertyMap);
3445
4112
  function stylesToClasses(styles) {
3446
4113
  if (!styles) return [];
3447
4114
  const sortedProps = Object.keys(styles).sort((a, b) => {
@@ -3516,11 +4183,7 @@ function responsiveStylesToClasses(styles, options) {
3516
4183
  let baseSource = responsiveStyles.base;
3517
4184
  let mobileSource = responsiveStyles.mobile;
3518
4185
  if (fluidActive && responsiveScales?.enabled === true && baseSource && mobileSource) {
3519
- const { patchedBase, patchedMobile } = consumeMobileIntoBaseClamp(
3520
- baseSource,
3521
- mobileSource,
3522
- responsiveScales
3523
- );
4186
+ const { patchedBase, patchedMobile } = consumeMobileIntoBaseClamp(baseSource, mobileSource, responsiveScales);
3524
4187
  baseSource = patchedBase;
3525
4188
  mobileSource = patchedMobile;
3526
4189
  }
@@ -3531,12 +4194,14 @@ function responsiveStylesToClasses(styles, options) {
3531
4194
  if (responsiveStyles.tablet) {
3532
4195
  const tablet = fluidActive ? transformContainerIntent(responsiveStyles.tablet) : responsiveStyles.tablet;
3533
4196
  const tabletClasses = stylesToClasses(tablet);
3534
- classes.push(...tabletClasses.map((cls) => `t-${cls}`));
4197
+ const prefix = breakpointClassPrefix("tablet");
4198
+ classes.push(...tabletClasses.map((cls) => `${prefix}${cls}`));
3535
4199
  }
3536
4200
  if (mobileSource && Object.keys(mobileSource).length > 0) {
3537
4201
  const mobile = fluidActive ? transformContainerIntent(mobileSource) : mobileSource;
3538
4202
  const mobileClasses = stylesToClasses(mobile);
3539
- classes.push(...mobileClasses.map((cls) => `mob-${cls}`));
4203
+ const prefix = breakpointClassPrefix("mobile");
4204
+ classes.push(...mobileClasses.map((cls) => `${prefix}${cls}`));
3540
4205
  }
3541
4206
  } else {
3542
4207
  const flat = fluidActive ? transformContainerIntent(styles) : styles;
@@ -3545,52 +4210,45 @@ function responsiveStylesToClasses(styles, options) {
3545
4210
  return classes;
3546
4211
  }
3547
4212
  function classToStyle(className) {
3548
- let cleanClass = className;
3549
- let responsivePrefix = "";
3550
- if (className.startsWith("t-")) {
3551
- responsivePrefix = "t";
3552
- cleanClass = className.slice(2);
3553
- } else if (className.startsWith("mob-")) {
3554
- responsivePrefix = "mob";
3555
- cleanClass = className.slice(4);
3556
- }
3557
- if (classToStyleSpecialCases[cleanClass]) {
3558
- return classToStyleSpecialCases[cleanClass];
3559
- }
3560
- const match = cleanClass.match(/^([a-z-]+)-(.*?)$/);
3561
- if (!match) return null;
3562
- const [, prefix, value] = match;
3563
- let prop = "";
3564
- for (const [key, val] of Object.entries(propertyMap)) {
3565
- if (val === prefix) {
3566
- prop = key;
3567
- break;
4213
+ const { base: cleanClass } = splitVariantPrefix(className);
4214
+ if (staticUtilityReverse[cleanClass]) {
4215
+ return staticUtilityReverse[cleanClass];
4216
+ }
4217
+ if (presetClassReverse[cleanClass]) {
4218
+ return presetClassReverse[cleanClass];
4219
+ }
4220
+ const parsed = parseUtilityClass(cleanClass);
4221
+ if (!parsed) {
4222
+ const dynamic = getDynamicStyle(cleanClass);
4223
+ if (dynamic) {
4224
+ return { prop: cssPropertyToCamel(dynamic.property), value: String(dynamic.value) };
3568
4225
  }
4226
+ return null;
3569
4227
  }
3570
- if (!prop) return null;
3571
- if (/^h[0-9a-z]+$/.test(value)) {
3572
- const registered = getStyleValue(cleanClass);
3573
- if (registered != null) {
3574
- return { prop, value: String(registered) };
3575
- }
4228
+ if (parsed.kind === "arbitrary-property") {
4229
+ return { prop: cssPropertyToCamel(parsed.property), value: parsed.value };
3576
4230
  }
3577
- if (value.includes("background") || value.includes("text") || value.includes("border")) {
3578
- return { prop, value: `var(--${value})` };
4231
+ if (parsed.kind === "hash") {
4232
+ const registered = getStyleValue(cleanClass);
4233
+ if (registered == null) return null;
4234
+ const value2 = String(registered);
4235
+ const root2 = parsed.root;
4236
+ const prop2 = ROOT_CAMEL_OVERRIDES[root2] ?? cssPropertyToCamel(resolveRootProperty(root2, value2));
4237
+ return { prop: prop2, value: value2 };
4238
+ }
4239
+ const root = parsed.root;
4240
+ const prop = root && ROOT_CAMEL_OVERRIDES[root] ? ROOT_CAMEL_OVERRIDES[root] : cssPropertyToCamel(parsed.property);
4241
+ let value = parsed.value;
4242
+ if (parsed.kind === "var" && colorTokenProps.has(prop)) {
4243
+ value = value.replace(/^var\(--([\w-]+)\)$/, "$1");
3579
4244
  }
3580
4245
  return { prop, value };
3581
4246
  }
3582
4247
  function classesToStyles(classes) {
3583
4248
  const styles = { base: {}, tablet: {}, mobile: {} };
3584
4249
  for (const className of classes) {
3585
- let breakpoint = "base";
3586
- let cleanClass = className;
3587
- if (className.startsWith("t-")) {
3588
- breakpoint = "tablet";
3589
- cleanClass = className.slice(2);
3590
- } else if (className.startsWith("mob-")) {
3591
- breakpoint = "mobile";
3592
- cleanClass = className.slice(4);
3593
- }
4250
+ const { breakpoint: variant, base: cleanClass } = splitVariantPrefix(className);
4251
+ const breakpoint = variant === "tablet" ? "tablet" : variant === "mobile" ? "mobile" : "base";
3594
4252
  const styleEntry = classToStyle(cleanClass);
3595
4253
  if (styleEntry) {
3596
4254
  if (!styles[breakpoint]) {
@@ -3635,11 +4293,7 @@ function validatePath(path) {
3635
4293
  for (let i = 0; i < path.length; i++) {
3636
4294
  const value = path[i];
3637
4295
  if (typeof value !== "number" || isNaN(value) || !isFinite(value)) {
3638
- throw new InvalidPathError(
3639
- `Invalid path value at index ${i}: expected number, got ${typeof value}`,
3640
- path,
3641
- i
3642
- );
4296
+ throw new InvalidPathError(`Invalid path value at index ${i}: expected number, got ${typeof value}`, path, i);
3643
4297
  }
3644
4298
  }
3645
4299
  }
@@ -3858,9 +4512,7 @@ function getVariableName(index) {
3858
4512
  return `--is-${index}`;
3859
4513
  }
3860
4514
  function hasAnyMappings(style) {
3861
- const isResponsive = "base" in style || Object.keys(style).some(
3862
- (key) => key === "base" || key === "tablet" || key === "mobile"
3863
- );
4515
+ const isResponsive = "base" in style || Object.keys(style).some((key) => key === "base" || key === "tablet" || key === "mobile");
3864
4516
  if (isResponsive) {
3865
4517
  const responsive = style;
3866
4518
  for (const breakpointStyle of Object.values(responsive)) {
@@ -3889,9 +4541,7 @@ function extractInteractiveStyleMappings(interactiveStyles) {
3889
4541
  let variableIndex = 0;
3890
4542
  const resolvedStyles = interactiveStyles.map((rule, ruleIndex) => {
3891
4543
  const style = rule.style;
3892
- const isResponsive = "base" in style || Object.keys(style).some(
3893
- (key) => key === "base" || key === "tablet" || key === "mobile"
3894
- );
4544
+ const isResponsive = "base" in style || Object.keys(style).some((key) => key === "base" || key === "tablet" || key === "mobile");
3895
4545
  if (isResponsive) {
3896
4546
  const responsive = style;
3897
4547
  const resolvedResponsive = {};
@@ -4100,195 +4750,21 @@ function toFriendlyError(input) {
4100
4750
  };
4101
4751
  }
4102
4752
 
4103
- // lib/shared/cssNamedColors.ts
4104
- var CSS_NAMED_COLORS = /* @__PURE__ */ new Set([
4105
- // CSS Level 4 named colors
4106
- "aliceblue",
4107
- "antiquewhite",
4108
- "aqua",
4109
- "aquamarine",
4110
- "azure",
4111
- "beige",
4112
- "bisque",
4113
- "black",
4114
- "blanchedalmond",
4115
- "blue",
4116
- "blueviolet",
4117
- "brown",
4118
- "burlywood",
4119
- "cadetblue",
4120
- "chartreuse",
4121
- "chocolate",
4122
- "coral",
4123
- "cornflowerblue",
4124
- "cornsilk",
4125
- "crimson",
4126
- "cyan",
4127
- "darkblue",
4128
- "darkcyan",
4129
- "darkgoldenrod",
4130
- "darkgray",
4131
- "darkgreen",
4132
- "darkgrey",
4133
- "darkkhaki",
4134
- "darkmagenta",
4135
- "darkolivegreen",
4136
- "darkorange",
4137
- "darkorchid",
4138
- "darkred",
4139
- "darksalmon",
4140
- "darkseagreen",
4141
- "darkslateblue",
4142
- "darkslategray",
4143
- "darkslategrey",
4144
- "darkturquoise",
4145
- "darkviolet",
4146
- "deeppink",
4147
- "deepskyblue",
4148
- "dimgray",
4149
- "dimgrey",
4150
- "dodgerblue",
4151
- "firebrick",
4152
- "floralwhite",
4153
- "forestgreen",
4154
- "fuchsia",
4155
- "gainsboro",
4156
- "ghostwhite",
4157
- "gold",
4158
- "goldenrod",
4159
- "gray",
4160
- "green",
4161
- "greenyellow",
4162
- "grey",
4163
- "honeydew",
4164
- "hotpink",
4165
- "indianred",
4166
- "indigo",
4167
- "ivory",
4168
- "khaki",
4169
- "lavender",
4170
- "lavenderblush",
4171
- "lawngreen",
4172
- "lemonchiffon",
4173
- "lightblue",
4174
- "lightcoral",
4175
- "lightcyan",
4176
- "lightgoldenrodyellow",
4177
- "lightgray",
4178
- "lightgreen",
4179
- "lightgrey",
4180
- "lightpink",
4181
- "lightsalmon",
4182
- "lightseagreen",
4183
- "lightskyblue",
4184
- "lightslategray",
4185
- "lightslategrey",
4186
- "lightsteelblue",
4187
- "lightyellow",
4188
- "lime",
4189
- "limegreen",
4190
- "linen",
4191
- "magenta",
4192
- "maroon",
4193
- "mediumaquamarine",
4194
- "mediumblue",
4195
- "mediumorchid",
4196
- "mediumpurple",
4197
- "mediumseagreen",
4198
- "mediumslateblue",
4199
- "mediumspringgreen",
4200
- "mediumturquoise",
4201
- "mediumvioletred",
4202
- "midnightblue",
4203
- "mintcream",
4204
- "mistyrose",
4205
- "moccasin",
4206
- "navajowhite",
4207
- "navy",
4208
- "oldlace",
4209
- "olive",
4210
- "olivedrab",
4211
- "orange",
4212
- "orangered",
4213
- "orchid",
4214
- "palegoldenrod",
4215
- "palegreen",
4216
- "paleturquoise",
4217
- "palevioletred",
4218
- "papayawhip",
4219
- "peachpuff",
4220
- "peru",
4221
- "pink",
4222
- "plum",
4223
- "powderblue",
4224
- "purple",
4225
- "rebeccapurple",
4226
- "red",
4227
- "rosybrown",
4228
- "royalblue",
4229
- "saddlebrown",
4230
- "salmon",
4231
- "sandybrown",
4232
- "seagreen",
4233
- "seashell",
4234
- "sienna",
4235
- "silver",
4236
- "skyblue",
4237
- "slateblue",
4238
- "slategray",
4239
- "slategrey",
4240
- "snow",
4241
- "springgreen",
4242
- "steelblue",
4243
- "tan",
4244
- "teal",
4245
- "thistle",
4246
- "tomato",
4247
- "turquoise",
4248
- "violet",
4249
- "wheat",
4250
- "white",
4251
- "whitesmoke",
4252
- "yellow",
4253
- "yellowgreen",
4254
- // CSS color keywords
4255
- "transparent",
4256
- "currentcolor",
4257
- // CSS-wide keywords (should never be wrapped in var())
4258
- "inherit",
4259
- "initial",
4260
- "unset",
4261
- "revert"
4262
- ]);
4263
- function isCssNamedColor(value) {
4264
- return CSS_NAMED_COLORS.has(value.toLowerCase());
4265
- }
4266
-
4267
4753
  // lib/shared/cssGeneration.ts
4268
- var SORTED_PREFIXES = Object.keys(prefixToCSSProperty).sort((a, b) => b.length - a.length);
4269
4754
  var cssPropertyOrderMap = (() => {
4270
4755
  const map = /* @__PURE__ */ new Map();
4271
- const props = Object.keys(propertyMap);
4272
- for (let i = 0; i < props.length; i++) {
4273
- const kebab = props[i].replace(/([A-Z])/g, "-$1").toLowerCase();
4274
- map.set(kebab, i);
4756
+ for (let i = 0; i < propertyOrder.length; i++) {
4757
+ const kebab = camelToKebab(propertyOrder[i]);
4758
+ if (!map.has(kebab)) map.set(kebab, i);
4275
4759
  }
4276
4760
  return map;
4277
4761
  })();
4278
4762
  function getClassPropertyOrder(className) {
4279
- const extracted = extractPropertyAndValue(className);
4280
- if (extracted) {
4281
- const idx = cssPropertyOrderMap.get(extracted.property);
4763
+ const parsed = parseUtilityClass(className);
4764
+ if (parsed) {
4765
+ const idx = cssPropertyOrderMap.get(parsed.property);
4282
4766
  if (idx !== void 0) return idx;
4283
4767
  }
4284
- const rule = utilityClassRules[className];
4285
- if (rule) {
4286
- const propMatch = rule.match(/^([a-z-]+):/);
4287
- if (propMatch) {
4288
- const idx = cssPropertyOrderMap.get(propMatch[1]);
4289
- if (idx !== void 0) return idx;
4290
- }
4291
- }
4292
4768
  return Infinity;
4293
4769
  }
4294
4770
  function sortClassesByPropertyOrder(classes) {
@@ -4298,18 +4774,18 @@ function getResponsiveMode(scales) {
4298
4774
  return scales?.mode ?? "breakpoints";
4299
4775
  }
4300
4776
  var AUTO_RESPONSIVE_TYPE_MAP = {
4301
- "padding": "padding",
4777
+ padding: "padding",
4302
4778
  "padding-left": "padding",
4303
4779
  "padding-right": "padding",
4304
4780
  "padding-top": "padding",
4305
4781
  "padding-bottom": "padding",
4306
- "margin": "margin",
4782
+ margin: "margin",
4307
4783
  "margin-left": "margin",
4308
4784
  "margin-right": "margin",
4309
4785
  "margin-top": "margin",
4310
4786
  "margin-bottom": "margin",
4311
4787
  "font-size": "fontSize",
4312
- "gap": "gap",
4788
+ gap: "gap",
4313
4789
  "row-gap": "gap",
4314
4790
  "column-gap": "gap",
4315
4791
  "border-radius": "borderRadius",
@@ -4317,239 +4793,98 @@ var AUTO_RESPONSIVE_TYPE_MAP = {
4317
4793
  "border-top-right-radius": "borderRadius",
4318
4794
  "border-bottom-left-radius": "borderRadius",
4319
4795
  "border-bottom-right-radius": "borderRadius",
4320
- "width": "size",
4321
- "height": "size",
4796
+ width: "size",
4797
+ height: "size",
4322
4798
  "max-width": "size",
4323
4799
  "max-height": "size",
4324
4800
  "min-width": "size",
4325
4801
  "min-height": "size"
4326
4802
  };
4327
4803
  function escapeCSSClassName(className) {
4328
- return className.replace(/[.#[\](){};<>+~:,%\/\s]/g, "\\$&");
4329
- }
4330
- var utilityClassRules = {
4331
- // Display utilities (short forms from specialValueMappings)
4332
- f: "display: flex;",
4333
- "fd-col": "flex-direction: column;",
4334
- "fd-row": "flex-direction: row;",
4335
- g: "display: grid;",
4336
- b: "display: block;",
4337
- i: "display: inline;",
4338
- ib: "display: inline-block;",
4339
- h: "display: none;",
4340
- "if": "display: inline-flex;",
4341
- ig: "display: inline-grid;",
4342
- // Justify Content (short forms)
4343
- "jc-c": "justify-content: center;",
4344
- "jc-s": "justify-content: flex-start;",
4345
- "jc-e": "justify-content: flex-end;",
4346
- "jc-b": "justify-content: space-between;",
4347
- "jc-a": "justify-content: space-around;",
4348
- "jc-ev": "justify-content: space-evenly;",
4349
- // Align Items (short forms)
4350
- "ai-c": "align-items: center;",
4351
- "ai-s": "align-items: flex-start;",
4352
- "ai-e": "align-items: flex-end;",
4353
- "ai-st": "align-items: stretch;",
4354
- "ai-b": "align-items: baseline;",
4355
- // Overflow (short forms)
4356
- "o-h": "overflow: hidden;",
4357
- "o-a": "overflow: auto;",
4358
- "o-s": "overflow: scroll;",
4359
- "o-v": "overflow: visible;",
4360
- // Cursor (full forms)
4361
- "cursor-pointer": "cursor: pointer;",
4362
- "cursor-default": "cursor: default;",
4363
- // Pointer events
4364
- "pe-none": "pointer-events: none;",
4365
- "pe-auto": "pointer-events: auto;",
4366
- // User select
4367
- "us-none": "user-select: none;",
4368
- "us-auto": "user-select: auto;",
4369
- "us-text": "user-select: text;",
4370
- "us-all": "user-select: all;",
4371
- // White space
4372
- "whs-normal": "white-space: normal;",
4373
- "whs-nowrap": "white-space: nowrap;",
4374
- "whs-pre": "white-space: pre;",
4375
- "whs-pre-wrap": "white-space: pre-wrap;",
4376
- "whs-pre-line": "white-space: pre-line;",
4377
- // Shadow presets
4378
- "sh-0": "box-shadow: none;",
4379
- "sh-1": "box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);",
4380
- "sh-2": "box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);",
4381
- "sh-3": "box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);",
4382
- "sh-4": "box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);",
4383
- // Gradient presets
4384
- "gr-1": "background: linear-gradient(90deg, rgba(10,22,40,0.85) 0%, rgba(10,22,40,0.2) 100%);",
4385
- "gr-2": "background: linear-gradient(0deg, #a9e8fd, #00aee8 25%, #0f1335 72%);",
4386
- // Border presets
4387
- "bd-0": "border: 1px solid var(--border);",
4388
- "bd-1": "border: 1px solid var(--border-light);"
4389
- // Note: CSS functions (blur, translateY, scale, rotate, repeat) are now handled
4390
- // dynamically via the styleValueRegistry - no need to hardcode specific values here
4391
- };
4392
- function extractPropertyAndValue(className) {
4393
- for (const knownPrefix of SORTED_PREFIXES) {
4394
- if (className.startsWith(knownPrefix + "-")) {
4395
- const classValue = className.substring(knownPrefix.length + 1);
4396
- const cssProp = prefixToCSSProperty[knownPrefix];
4397
- if (cssProp) {
4398
- if (/^h[0-9a-z]+$/.test(classValue)) {
4399
- return null;
4400
- }
4401
- return { property: cssProp, value: classValue };
4402
- }
4403
- }
4404
- }
4405
- return null;
4804
+ return className.replace(/[^a-zA-Z0-9_-]/g, "\\$&");
4406
4805
  }
4407
- function resolveScalablePropertyValue(className) {
4408
- const direct = extractPropertyAndValue(className);
4409
- if (direct) return direct;
4410
- for (const knownPrefix of SORTED_PREFIXES) {
4411
- if (!className.startsWith(knownPrefix + "-")) continue;
4412
- const classValue = className.substring(knownPrefix.length + 1);
4413
- if (!/^h[0-9a-z]+$/.test(classValue)) continue;
4414
- const cssProp = prefixToCSSProperty[knownPrefix];
4415
- if (!cssProp) continue;
4416
- const registered = getStyleValue(className);
4417
- if (registered == null || registered === "") continue;
4418
- return { property: cssProp, value: String(registered) };
4806
+ var utilityClassRules = (() => {
4807
+ const rules = {};
4808
+ for (const [className, entry] of Object.entries(staticUtilityReverse)) {
4809
+ rules[className] = `${camelToKebab(entry.prop)}: ${entry.value};`;
4419
4810
  }
4420
- return null;
4421
- }
4811
+ for (const [className, entry] of Object.entries(presetClassReverse)) {
4812
+ rules[className] = `${camelToKebab(entry.prop)}: ${entry.value};`;
4813
+ }
4814
+ return rules;
4815
+ })();
4816
+ function resolveScalablePropertyValue(className) {
4817
+ const parsed = parseUtilityClass(className);
4818
+ if (!parsed) return null;
4819
+ if (parsed.value != null) return { property: parsed.property, value: parsed.value };
4820
+ const registered = getStyleValue(className);
4821
+ if (registered == null || registered === "") return null;
4822
+ const value = String(registered);
4823
+ const property = parsed.root ? resolveRootProperty(parsed.root, value) : parsed.property;
4824
+ return { property, value };
4825
+ }
4826
+ var borderSideMap = {
4827
+ "border-t": "border-top",
4828
+ "border-r": "border-right",
4829
+ "border-b": "border-bottom",
4830
+ "border-l": "border-left"
4831
+ };
4422
4832
  function generateRuleForClass(className) {
4423
4833
  if (utilityClassRules[className]) {
4424
4834
  return utilityClassRules[className];
4425
4835
  }
4426
- let prefix = "";
4427
- let classValue = "";
4428
- for (const knownPrefix of SORTED_PREFIXES) {
4429
- if (className.startsWith(knownPrefix + "-")) {
4430
- prefix = knownPrefix;
4431
- classValue = className.substring(knownPrefix.length + 1);
4432
- break;
4433
- }
4434
- }
4435
- if (!prefix || !classValue) {
4836
+ const parsed = parseUtilityClass(className);
4837
+ if (!parsed) {
4436
4838
  const dynamicStyle = getDynamicStyle(className);
4437
4839
  if (dynamicStyle) {
4438
4840
  return `${dynamicStyle.property}: ${dynamicStyle.value};`;
4439
4841
  }
4440
4842
  return null;
4441
4843
  }
4442
- const cssProp = prefixToCSSProperty[prefix];
4443
- if (!cssProp) {
4844
+ if (parsed.kind === "arbitrary-property") {
4444
4845
  const dynamicStyle = getDynamicStyle(className);
4445
- if (dynamicStyle) {
4446
- return `${dynamicStyle.property}: ${dynamicStyle.value};`;
4447
- }
4448
- return null;
4846
+ const value2 = dynamicStyle ? dynamicStyle.value : parsed.value;
4847
+ return `${parsed.property}: ${value2};`;
4449
4848
  }
4450
- const borderSideMap = {
4451
- "bt": "border-top",
4452
- "bb": "border-bottom",
4453
- "bl": "border-left",
4454
- "border-r": "border-right"
4455
- };
4456
- if (borderSideMap[prefix] && classValue.includes("-")) {
4457
- const parts = classValue.split("-");
4458
- const width = parts[0];
4459
- const borderStyle = parts[1] || "solid";
4460
- const side = borderSideMap[prefix];
4461
- return `${side}-width: ${width}; ${side}-style: ${borderStyle};`;
4462
- }
4463
- const originalValue = getStyleValue(className);
4464
- if (originalValue !== void 0) {
4465
- return `${cssProp}: ${originalValue};`;
4466
- }
4467
- if (prefix === "b" && classValue.includes("-")) {
4468
- const parts = classValue.split("-");
4469
- const width = parts[0];
4470
- const borderStyle = parts[1] || "solid";
4471
- const borderColor = parts[2] ? `var(--${parts[2]})` : "currentColor";
4472
- return `border: ${width} ${borderStyle} ${borderColor};`;
4473
- }
4474
- if (prefix === "br" && classValue.includes("-") && !classValue.match(/^\d+px$/)) {
4475
- return `border-radius: var(--${classValue});`;
4476
- }
4477
- let value = classValue;
4478
- const valuePattern = /\d|auto|inherit|initial|unset|solid|dashed|dotted|double|groove|ridge|inset|outset|none|hidden|minmax|repeat|clamp|calc|min|max|fit-content|var/;
4479
- const hasParentheses = value.includes("(");
4480
- if (hasParentheses) {
4481
- let result = "";
4482
- let depth = 0;
4483
- let afterComma = false;
4484
- for (let i = 0; i < value.length; i++) {
4485
- const char = value[i];
4486
- if (char === "(") {
4487
- depth++;
4488
- result += char;
4489
- afterComma = false;
4490
- } else if (char === ")") {
4491
- depth--;
4492
- result += char;
4493
- afterComma = false;
4494
- } else if (char === ",") {
4495
- result += char;
4496
- afterComma = true;
4497
- } else if (char === "-" && afterComma && depth > 0) {
4498
- if (value[i + 1] === "-") {
4499
- result += " ";
4500
- } else {
4501
- result += " ";
4502
- }
4503
- afterComma = false;
4504
- } else if (char === "-" && depth > 0 && i > 0) {
4505
- const rest = value.substring(i + 1);
4506
- if (valuePattern.test(rest[0] || "")) {
4507
- result += " ";
4508
- } else {
4509
- result += char;
4510
- }
4511
- afterComma = false;
4512
- } else if (char === "-" && depth === 0 && i > 0) {
4513
- const rest = value.substring(i + 1);
4514
- if (valuePattern.test(rest[0] || "")) {
4515
- result += " ";
4516
- } else {
4517
- result += char;
4518
- }
4519
- afterComma = false;
4520
- } else {
4521
- result += char;
4522
- afterComma = false;
4523
- }
4524
- }
4525
- value = result;
4526
- } else if (value.startsWith("-")) {
4527
- value = value[0] + value.substring(1).replace(new RegExp(`-(?=${valuePattern.source})`, "g"), " ");
4849
+ const root = parsed.root;
4850
+ let value;
4851
+ let property = parsed.property;
4852
+ if (parsed.kind === "hash") {
4853
+ const registered = getStyleValue(className);
4854
+ if (registered == null) return null;
4855
+ value = String(registered);
4856
+ if (root) property = resolveRootProperty(root, value);
4857
+ } else if (parsed.kind === "arbitrary") {
4858
+ const registered = getStyleValue(className);
4859
+ value = registered !== void 0 ? String(registered) : parsed.value;
4528
4860
  } else {
4529
- value = value.replace(new RegExp(`-(?=${valuePattern.source})`, "g"), " ");
4861
+ value = parsed.value;
4530
4862
  }
4531
- value = value.replace(/(\d+)p(?!\w)/g, "$1%");
4532
- if (prefix === "px") {
4863
+ if (root === "px") {
4533
4864
  return `padding-left: ${value}; padding-right: ${value};`;
4534
4865
  }
4535
- if (prefix === "py") {
4866
+ if (root === "py") {
4536
4867
  return `padding-top: ${value}; padding-bottom: ${value};`;
4537
4868
  }
4538
- if (prefix === "mx") {
4869
+ if (root === "mx") {
4539
4870
  return `margin-left: ${value}; margin-right: ${value};`;
4540
4871
  }
4541
- if (prefix === "my") {
4872
+ if (root === "my") {
4542
4873
  return `margin-top: ${value}; margin-bottom: ${value};`;
4543
4874
  }
4544
- if (prefix === "bgc" || prefix === "bg" || prefix === "c" || prefix === "bc") {
4545
- if (!value.startsWith("#") && !value.includes("rgb") && !value.includes("px")) {
4546
- if (isCssNamedColor(value)) {
4547
- return `${cssProp}: ${value};`;
4875
+ if (root && borderSideMap[root] && property !== "border-color") {
4876
+ const side = borderSideMap[root];
4877
+ const tokens = value.split(/\s+/).filter(Boolean);
4878
+ if (tokens.length >= 2) {
4879
+ const declarations = [`${side}-width: ${tokens[0]};`, `${side}-style: ${tokens[1]};`];
4880
+ if (tokens[2]) {
4881
+ declarations.push(`${side}-color: ${tokens.slice(2).join(" ")};`);
4548
4882
  }
4549
- return `${cssProp}: var(--${value});`;
4883
+ return declarations.join(" ");
4550
4884
  }
4885
+ return `${side}: ${value};`;
4551
4886
  }
4552
- return `${cssProp}: ${value};`;
4887
+ return `${property}: ${value};`;
4553
4888
  }
4554
4889
  function applyFluidToUtilityRule(rule, className, responsiveScales, breakpoints) {
4555
4890
  const propValue = resolveScalablePropertyValue(className);
@@ -4564,13 +4899,7 @@ function applyFluidToUtilityRule(rule, className, responsiveScales, breakpoints)
4564
4899
  if (scale == null || scale === 1) return rule;
4565
4900
  const range = responsiveScales.fluidRange ?? DEFAULT_FLUID_RANGE;
4566
4901
  const baseRef = responsiveScales.baseReference ?? 16;
4567
- const fluidValue = buildFluidPropertyValue(
4568
- propValue.value,
4569
- scale,
4570
- range.min,
4571
- range.max,
4572
- baseRef
4573
- );
4902
+ const fluidValue = buildFluidPropertyValue(propValue.value, scale, range.min, range.max, baseRef);
4574
4903
  if (!fluidValue) return rule;
4575
4904
  return `${propValue.property}: ${fluidValue};`;
4576
4905
  }
@@ -4589,22 +4918,12 @@ function applyFluidToStyle(style, responsiveScales, breakpoints) {
4589
4918
  out[prop] = value;
4590
4919
  continue;
4591
4920
  }
4592
- const scale = getScaleMultiplier(
4593
- responsiveScales,
4594
- prop,
4595
- smallest
4596
- );
4921
+ const scale = getScaleMultiplier(responsiveScales, prop, smallest);
4597
4922
  if (scale == null || scale === 1) {
4598
4923
  out[prop] = value;
4599
4924
  continue;
4600
4925
  }
4601
- const fluidValue = buildFluidPropertyValue(
4602
- String(value),
4603
- scale,
4604
- range.min,
4605
- range.max,
4606
- baseRef
4607
- );
4926
+ const fluidValue = buildFluidPropertyValue(String(value), scale, range.min, range.max, baseRef);
4608
4927
  out[prop] = fluidValue ?? value;
4609
4928
  }
4610
4929
  return out;
@@ -4632,10 +4951,7 @@ function generateUtilityCSS(usedClasses, breakpoints = DEFAULT_BREAKPOINTS, resp
4632
4951
  const breakpointValues = getBreakpointValues(breakpoints);
4633
4952
  const responsiveClasses = {};
4634
4953
  for (const [breakpointName, breakpointValue] of Object.entries(breakpointValues)) {
4635
- let prefix = breakpointName.charAt(0).toLowerCase();
4636
- if (breakpointName.toLowerCase() === "mobile") {
4637
- prefix = "mob";
4638
- }
4954
+ const prefix = breakpointClassPrefix(breakpointName);
4639
4955
  responsiveClasses[prefix] = {
4640
4956
  classes: /* @__PURE__ */ new Set(),
4641
4957
  breakpointName,
@@ -4645,10 +4961,10 @@ function generateUtilityCSS(usedClasses, breakpoints = DEFAULT_BREAKPOINTS, resp
4645
4961
  for (const className of usedClasses) {
4646
4962
  let matched = false;
4647
4963
  for (const prefix of Object.keys(responsiveClasses)) {
4648
- if (className.startsWith(`${prefix}-`) && className.length > prefix.length + 1) {
4649
- const potentialClass = className.substring(prefix.length + 1);
4964
+ if (className.startsWith(prefix) && className.length > prefix.length) {
4965
+ const potentialClass = className.substring(prefix.length);
4650
4966
  const rule = generateRuleForClass(potentialClass);
4651
- if (rule && !potentialClass.match(/^(auto|0|[\d.]+px|[\d.]+p)$/)) {
4967
+ if (rule) {
4652
4968
  responsiveClasses[prefix].classes.add(potentialClass);
4653
4969
  matched = true;
4654
4970
  break;
@@ -4683,7 +4999,7 @@ function generateUtilityCSS(usedClasses, breakpoints = DEFAULT_BREAKPOINTS, resp
4683
4999
  }
4684
5000
  const autoResponsiveMediaQueries = {};
4685
5001
  if (responsiveScales?.enabled && !fluidActive) {
4686
- for (const className of autoResponsiveClasses) {
5002
+ for (const className of sortClassesByPropertyOrder(autoResponsiveClasses)) {
4687
5003
  const propValue = resolveScalablePropertyValue(className);
4688
5004
  if (!propValue) continue;
4689
5005
  const category = AUTO_RESPONSIVE_TYPE_MAP[propValue.property];
@@ -4712,7 +5028,7 @@ function generateUtilityCSS(usedClasses, breakpoints = DEFAULT_BREAKPOINTS, resp
4712
5028
  }
4713
5029
  }
4714
5030
  const sortedAutoResponsive = Object.entries(autoResponsiveMediaQueries).sort(([, a], [, b]) => b.value - a.value);
4715
- for (const [breakpointName, mq] of sortedAutoResponsive) {
5031
+ for (const [, mq] of sortedAutoResponsive) {
4716
5032
  if (mq.classes.length === 0) continue;
4717
5033
  css.push(`@media (max-width: ${mq.value}px) {`);
4718
5034
  for (const { className, rule } of mq.classes) {
@@ -4723,12 +5039,12 @@ function generateUtilityCSS(usedClasses, breakpoints = DEFAULT_BREAKPOINTS, resp
4723
5039
  const sortedManualResponsive = Object.entries(responsiveClasses).filter(([, info]) => info.classes.size > 0).sort(([, a], [, b]) => b.value - a.value);
4724
5040
  for (const [prefix, breakpointInfo] of sortedManualResponsive) {
4725
5041
  const rules = [];
4726
- for (const className of breakpointInfo.classes) {
5042
+ for (const className of sortClassesByPropertyOrder(breakpointInfo.classes)) {
4727
5043
  const rule = generateRuleForClass(className);
4728
5044
  if (rule) {
4729
- const escapedClassName = escapeCSSClassName(className);
5045
+ const escapedClassName = escapeCSSClassName(`${prefix}${className}`);
4730
5046
  const finalRule = applyRemConversion(rule, remConfig);
4731
- rules.push(` .${prefix}-${escapedClassName} { ${finalRule} }`);
5047
+ rules.push(` .${escapedClassName} { ${finalRule} }`);
4732
5048
  }
4733
5049
  }
4734
5050
  if (rules.length > 0) {
@@ -4744,24 +5060,19 @@ function generateSingleClassCSS(className, breakpoints = DEFAULT_BREAKPOINTS, re
4744
5060
  const css = [];
4745
5061
  const responsivePrefixes = {};
4746
5062
  for (const [breakpointName, breakpointValue] of Object.entries(breakpointValues)) {
4747
- let prefix = breakpointName.charAt(0).toLowerCase();
4748
- if (breakpointName.toLowerCase() === "mobile") {
4749
- prefix = "mob";
4750
- }
4751
- responsivePrefixes[prefix] = { breakpointName, value: breakpointValue };
5063
+ responsivePrefixes[breakpointClassPrefix(breakpointName)] = { breakpointName, value: breakpointValue };
4752
5064
  }
4753
5065
  let matched = false;
4754
5066
  for (const prefix of Object.keys(responsivePrefixes)) {
4755
- if (className.startsWith(`${prefix}-`) && className.length > prefix.length + 1) {
4756
- const potentialClass = className.substring(prefix.length + 1);
5067
+ if (className.startsWith(prefix) && className.length > prefix.length) {
5068
+ const potentialClass = className.substring(prefix.length);
4757
5069
  const rule = generateRuleForClass(potentialClass);
4758
- if (rule && !potentialClass.match(/^(auto|0|[\d.]+px|[\d.]+p)$/)) {
5070
+ if (rule) {
4759
5071
  const escapedClassName = escapeCSSClassName(className);
4760
- const escapedInnerClass = escapeCSSClassName(potentialClass);
4761
5072
  const bpValue = responsivePrefixes[prefix].value;
4762
5073
  const finalRule = applyRemConversion(rule, remConfig);
4763
5074
  css.push(`@media (max-width: ${bpValue}px) {
4764
- .${prefix}-${escapedInnerClass} { ${finalRule} }
5075
+ .${escapedClassName} { ${finalRule} }
4765
5076
  }`);
4766
5077
  matched = true;
4767
5078
  break;
@@ -4797,9 +5108,11 @@ function generateSingleClassCSS(className, breakpoints = DEFAULT_BREAKPOINTS, re
4797
5108
  const scaledValue = scalePropertyValue(propValue.value, baseRef, scale);
4798
5109
  if (!scaledValue) continue;
4799
5110
  const finalScaledValue = remConfig?.enabled && shouldConvertProperty(propValue.property) ? convertPxToRem(scaledValue, remConfig.baseFontSize) : scaledValue;
4800
- css.push(`@media (max-width: ${breakpointValue}px) {
5111
+ css.push(
5112
+ `@media (max-width: ${breakpointValue}px) {
4801
5113
  .${escapedClassName} { ${propValue.property}: ${finalScaledValue}; }
4802
- }`);
5114
+ }`
5115
+ );
4803
5116
  }
4804
5117
  }
4805
5118
  }
@@ -4812,87 +5125,16 @@ function extractUtilityClassesFromHTML(html) {
4812
5125
  const classes = /* @__PURE__ */ new Set();
4813
5126
  const classRegex = /class="([^"]*)"/g;
4814
5127
  let match;
4815
- const knownPrefixes = new Set(Object.values(propertyMap));
4816
- const specialPrefixes = /* @__PURE__ */ new Set([
4817
- // Display short forms
4818
- "f",
4819
- "fd-col",
4820
- "fd-row",
4821
- "g",
4822
- "b",
4823
- "i",
4824
- "ib",
4825
- "h",
4826
- "if",
4827
- "ig",
4828
- // Justify content
4829
- "jc-c",
4830
- "jc-s",
4831
- "jc-e",
4832
- "jc-b",
4833
- "jc-a",
4834
- // Align items
4835
- "ai-c",
4836
- "ai-s",
4837
- "ai-e",
4838
- "ai-b",
4839
- // Overflow
4840
- "o-h",
4841
- "o-a",
4842
- "o-s",
4843
- "o-v",
4844
- // Cursor
4845
- "cursor-pointer",
4846
- "cursor-default",
4847
- // White space
4848
- "whs-normal",
4849
- "whs-nowrap",
4850
- "whs-pre",
4851
- "whs-pre-wrap",
4852
- "whs-pre-line"
4853
- ]);
4854
5128
  while ((match = classRegex.exec(html)) !== null) {
4855
- const classString = match[1];
4856
- const classList = classString.split(/\s+/);
5129
+ const classList = match[1].split(/\s+/);
4857
5130
  for (const className of classList) {
4858
- if (!className || className.length === 0) continue;
4859
- if (specialPrefixes.has(className)) {
5131
+ if (!className) continue;
5132
+ const { base } = splitVariantPrefix(className);
5133
+ if (parseUtilityClass(base)) {
4860
5134
  classes.add(className);
4861
5135
  continue;
4862
5136
  }
4863
- let classToCheck = className;
4864
- let hasResponsivePrefix = false;
4865
- if (className.startsWith("mob-") && className.length > 4) {
4866
- classToCheck = className.substring(4);
4867
- hasResponsivePrefix = true;
4868
- } else if (className.length > 2 && className.charAt(1) === "-" && className.match(/^[a-z]-/)) {
4869
- const firstChar = className.charAt(0);
4870
- if (["t", "s", "x", "u"].includes(firstChar)) {
4871
- classToCheck = className.substring(2);
4872
- hasResponsivePrefix = true;
4873
- }
4874
- }
4875
- for (const prefix of knownPrefixes) {
4876
- if (classToCheck === prefix) {
4877
- classes.add(className);
4878
- break;
4879
- } else if (classToCheck.startsWith(prefix + "-")) {
4880
- classes.add(className);
4881
- break;
4882
- }
4883
- }
4884
- if (hasResponsivePrefix && !classes.has(className)) {
4885
- for (const specialPrefix of specialPrefixes) {
4886
- if (classToCheck === specialPrefix) {
4887
- classes.add(className);
4888
- break;
4889
- } else if (classToCheck.startsWith(specialPrefix + "-")) {
4890
- classes.add(className);
4891
- break;
4892
- }
4893
- }
4894
- }
4895
- if (!classes.has(className) && isDynamicClass(className)) {
5137
+ if (isDynamicClass(className) || isDynamicClass(base)) {
4896
5138
  classes.add(className);
4897
5139
  }
4898
5140
  }
@@ -4926,9 +5168,7 @@ function generateInteractiveCSS(elementClass, interactiveStyles, breakpoints = D
4926
5168
  for (const rule of interactiveStyles) {
4927
5169
  const { prefix, postfix, style } = rule;
4928
5170
  const fullSelector = `${prefix || ""}.${elementClass}${postfix || ""}`;
4929
- const sortedBreakpoints = Object.entries(breakpointValues).sort(
4930
- ([, a], [, b]) => b - a
4931
- );
5171
+ const sortedBreakpoints = Object.entries(breakpointValues).sort(([, a], [, b]) => b - a);
4932
5172
  if (isResponsiveStyle2(style)) {
4933
5173
  const responsive = style;
4934
5174
  if (responsive.base && Object.keys(responsive.base).length > 0) {
@@ -4962,9 +5202,7 @@ function generateInteractiveCSS(elementClass, interactiveStyles, breakpoints = D
4962
5202
  if (merged && Object.keys(merged).length > 0) {
4963
5203
  const properties = applyRemConversion(styleObjectToCSS(merged), remConfig);
4964
5204
  if (properties) {
4965
- css.push(
4966
- `@media (max-width: ${breakpointValue}px) { ${fullSelector} { ${properties}; } }`
4967
- );
5205
+ css.push(`@media (max-width: ${breakpointValue}px) { ${fullSelector} { ${properties}; } }`);
4968
5206
  }
4969
5207
  }
4970
5208
  }
@@ -4982,18 +5220,11 @@ function generateInteractiveCSS(elementClass, interactiveStyles, breakpoints = D
4982
5220
  }
4983
5221
  if (scalingEnabled && !fluidActive) {
4984
5222
  for (const [breakpointName, breakpointValue] of sortedBreakpoints) {
4985
- const scaled = scaleStyleForBreakpoint(
4986
- flatStyle,
4987
- responsiveScales,
4988
- breakpointName,
4989
- /* @__PURE__ */ new Set()
4990
- );
5223
+ const scaled = scaleStyleForBreakpoint(flatStyle, responsiveScales, breakpointName, /* @__PURE__ */ new Set());
4991
5224
  if (Object.keys(scaled).length === 0) continue;
4992
5225
  const scaledProps = applyRemConversion(styleObjectToCSS(scaled), remConfig);
4993
5226
  if (!scaledProps) continue;
4994
- css.push(
4995
- `@media (max-width: ${breakpointValue}px) { ${fullSelector} { ${scaledProps}; } }`
4996
- );
5227
+ css.push(`@media (max-width: ${breakpointValue}px) { ${fullSelector} { ${scaledProps}; } }`);
4997
5228
  }
4998
5229
  }
4999
5230
  }
@@ -5010,11 +5241,7 @@ function scaleStyleForBreakpoint(baseStyle, responsiveScales, breakpointName, sk
5010
5241
  if (value == null) continue;
5011
5242
  const strValue = String(value);
5012
5243
  if (strValue === "") continue;
5013
- const scale = getScaleMultiplier(
5014
- responsiveScales,
5015
- property,
5016
- breakpointName
5017
- );
5244
+ const scale = getScaleMultiplier(responsiveScales, property, breakpointName);
5018
5245
  if (scale == null) continue;
5019
5246
  const scaledValue = scalePropertyValue(strValue, baseRef, scale);
5020
5247
  if (scaledValue == null || scaledValue === strValue) continue;
@@ -5154,6 +5381,9 @@ export {
5154
5381
  isRichTextMarker,
5155
5382
  richTextMarkerToHtml,
5156
5383
  resolvePropsFromDefinition,
5384
+ CSS_NAMED_COLORS,
5385
+ isCssNamedColor,
5386
+ breakpointClassPrefix,
5157
5387
  registerStyleValue,
5158
5388
  registerDynamicStyle,
5159
5389
  getStyleValue,
@@ -5203,15 +5433,14 @@ export {
5203
5433
  rewriteViewportUnits,
5204
5434
  DESIGN_VIEWPORT_VARS,
5205
5435
  toFriendlyError,
5206
- CSS_NAMED_COLORS,
5207
- isCssNamedColor,
5208
5436
  sortClassesByPropertyOrder,
5209
5437
  generateRuleForClass,
5210
5438
  applyContainerPattern,
5211
5439
  generateUtilityCSS,
5212
5440
  generateSingleClassCSS,
5213
5441
  extractUtilityClassesFromHTML,
5442
+ styleObjectToCSS,
5214
5443
  generateInteractiveCSS,
5215
5444
  generateAllInteractiveCSS
5216
5445
  };
5217
- //# sourceMappingURL=chunk-JGWFTO6P.js.map
5446
+ //# sourceMappingURL=chunk-7HWQUVTU.js.map