@tenphi/tasty 0.0.0-snapshot.d5c5a10 → 0.0.0-snapshot.d656d18

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 (356) hide show
  1. package/README.md +197 -141
  2. package/dist/babel-_RVkw0iE.d.ts +83 -0
  3. package/dist/{ssr/async-storage.js → chunks/async-storage-DKK-wTD4.js} +17 -8
  4. package/dist/chunks/async-storage-DKK-wTD4.js.map +1 -0
  5. package/dist/chunks/collector-DBGcmUEq.js +326 -0
  6. package/dist/chunks/collector-DBGcmUEq.js.map +1 -0
  7. package/dist/chunks/css-resources-Cyl_axbI.js +149 -0
  8. package/dist/chunks/css-resources-Cyl_axbI.js.map +1 -0
  9. package/dist/{zero/extractor.js → chunks/css-writer-PFzrSPeu.js} +149 -26
  10. package/dist/chunks/css-writer-PFzrSPeu.js.map +1 -0
  11. package/dist/{debug.js → chunks/debug-BUwqo6vC.js} +193 -65
  12. package/dist/chunks/debug-BUwqo6vC.js.map +1 -0
  13. package/dist/chunks/dsl-CXvoaLnj.js +2097 -0
  14. package/dist/chunks/dsl-CXvoaLnj.js.map +1 -0
  15. package/dist/chunks/hydrate-6YoHZP6A.js +37 -0
  16. package/dist/chunks/hydrate-6YoHZP6A.js.map +1 -0
  17. package/dist/chunks/react-runtime-B3CmvDEQ.js +1525 -0
  18. package/dist/chunks/react-runtime-B3CmvDEQ.js.map +1 -0
  19. package/dist/chunks/runtime-engine-Y00VWjrS.js +4719 -0
  20. package/dist/chunks/runtime-engine-Y00VWjrS.js.map +1 -0
  21. package/dist/{utils/merge-styles.js → chunks/shared-utils-OIg0N_dp.js} +43 -6
  22. package/dist/chunks/shared-utils-OIg0N_dp.js.map +1 -0
  23. package/dist/chunks/style-engine-CqSmIlud.js +7196 -0
  24. package/dist/chunks/style-engine-CqSmIlud.js.map +1 -0
  25. package/dist/collector-CVdVIy7s.d.ts +163 -0
  26. package/dist/config-BI0y21JV.d.ts +1367 -0
  27. package/dist/core/index.d.ts +5 -34
  28. package/dist/core/index.js +7 -27
  29. package/dist/index-BzAC3p06.d.ts +1616 -0
  30. package/dist/index-CrT0bsiI.d.ts +1980 -0
  31. package/dist/index.d.ts +5 -51
  32. package/dist/index.js +8 -36
  33. package/dist/{utils/merge-styles.d.ts → merge-styles-BFktNP8J.d.ts} +3 -3
  34. package/dist/ssr/astro-client.d.ts +1 -0
  35. package/dist/ssr/astro-client.js +19 -0
  36. package/dist/ssr/astro-client.js.map +1 -0
  37. package/dist/ssr/astro-middleware-extract-static.d.ts +11 -0
  38. package/dist/ssr/astro-middleware-extract-static.js +9 -0
  39. package/dist/ssr/astro-middleware-extract-static.js.map +1 -0
  40. package/dist/ssr/astro-middleware-extract.d.ts +11 -0
  41. package/dist/ssr/astro-middleware-extract.js +9 -0
  42. package/dist/ssr/astro-middleware-extract.js.map +1 -0
  43. package/dist/ssr/astro-middleware-static.d.ts +18 -0
  44. package/dist/ssr/astro-middleware-static.js +18 -0
  45. package/dist/ssr/astro-middleware-static.js.map +1 -0
  46. package/dist/ssr/astro-middleware.d.ts +19 -0
  47. package/dist/ssr/astro-middleware.js +19 -0
  48. package/dist/ssr/astro-middleware.js.map +1 -0
  49. package/dist/ssr/astro.d.ts +117 -11
  50. package/dist/ssr/astro.js +268 -33
  51. package/dist/ssr/astro.js.map +1 -1
  52. package/dist/ssr/index.d.ts +37 -5
  53. package/dist/ssr/index.js +7 -9
  54. package/dist/ssr/index.js.map +1 -1
  55. package/dist/ssr/next-config.d.ts +66 -0
  56. package/dist/ssr/next-config.js +115 -0
  57. package/dist/ssr/next-config.js.map +1 -0
  58. package/dist/ssr/next.d.ts +14 -7
  59. package/dist/ssr/next.js +39 -20
  60. package/dist/ssr/next.js.map +1 -1
  61. package/dist/static/index.d.ts +91 -5
  62. package/dist/static/index.js +49 -4
  63. package/dist/static/index.js.map +1 -0
  64. package/dist/static/inject.d.ts +5 -0
  65. package/dist/static/inject.js +17 -0
  66. package/dist/static/inject.js.map +1 -0
  67. package/dist/zero/babel.d.ts +2 -167
  68. package/dist/zero/babel.js +160 -57
  69. package/dist/zero/babel.js.map +1 -1
  70. package/dist/zero/index.d.ts +81 -3
  71. package/dist/zero/index.js +2 -4
  72. package/dist/zero/next.d.ts +13 -1
  73. package/dist/zero/next.js +6 -5
  74. package/dist/zero/next.js.map +1 -1
  75. package/docs/README.md +20 -12
  76. package/docs/adoption.md +59 -32
  77. package/docs/ai-agents.md +229 -0
  78. package/docs/comparison.md +76 -48
  79. package/docs/configuration.md +566 -69
  80. package/docs/debug.md +37 -23
  81. package/docs/design-system.md +63 -32
  82. package/docs/dsl.md +527 -180
  83. package/docs/getting-started.md +62 -41
  84. package/docs/injector.md +157 -51
  85. package/docs/methodology.md +116 -35
  86. package/docs/migration-v3.md +285 -0
  87. package/docs/pipeline.md +741 -0
  88. package/docs/plugins.md +353 -0
  89. package/docs/react-api.md +681 -0
  90. package/docs/runtime-benchmarks.md +351 -0
  91. package/docs/ssr.md +356 -130
  92. package/docs/styles.md +127 -26
  93. package/docs/tasty-static.md +219 -70
  94. package/package.json +108 -23
  95. package/tasty.config.ts +6 -0
  96. package/dist/_virtual/_rolldown/runtime.js +0 -8
  97. package/dist/chunks/cacheKey.js +0 -78
  98. package/dist/chunks/cacheKey.js.map +0 -1
  99. package/dist/chunks/definitions.d.ts +0 -37
  100. package/dist/chunks/definitions.js +0 -259
  101. package/dist/chunks/definitions.js.map +0 -1
  102. package/dist/chunks/renderChunk.js +0 -60
  103. package/dist/chunks/renderChunk.js.map +0 -1
  104. package/dist/config.d.ts +0 -366
  105. package/dist/config.js +0 -504
  106. package/dist/config.js.map +0 -1
  107. package/dist/counter-style/index.js +0 -51
  108. package/dist/counter-style/index.js.map +0 -1
  109. package/dist/debug.d.ts +0 -89
  110. package/dist/debug.js.map +0 -1
  111. package/dist/font-face/index.js +0 -63
  112. package/dist/font-face/index.js.map +0 -1
  113. package/dist/hooks/resolve-ssr-collector.js +0 -15
  114. package/dist/hooks/resolve-ssr-collector.js.map +0 -1
  115. package/dist/hooks/useCounterStyle.d.ts +0 -50
  116. package/dist/hooks/useCounterStyle.js +0 -47
  117. package/dist/hooks/useCounterStyle.js.map +0 -1
  118. package/dist/hooks/useFontFace.d.ts +0 -43
  119. package/dist/hooks/useFontFace.js +0 -71
  120. package/dist/hooks/useFontFace.js.map +0 -1
  121. package/dist/hooks/useGlobalStyles.d.ts +0 -30
  122. package/dist/hooks/useGlobalStyles.js +0 -79
  123. package/dist/hooks/useGlobalStyles.js.map +0 -1
  124. package/dist/hooks/useKeyframes.d.ts +0 -56
  125. package/dist/hooks/useKeyframes.js +0 -65
  126. package/dist/hooks/useKeyframes.js.map +0 -1
  127. package/dist/hooks/useProperty.d.ts +0 -79
  128. package/dist/hooks/useProperty.js +0 -110
  129. package/dist/hooks/useProperty.js.map +0 -1
  130. package/dist/hooks/useRawCSS.d.ts +0 -53
  131. package/dist/hooks/useRawCSS.js +0 -36
  132. package/dist/hooks/useRawCSS.js.map +0 -1
  133. package/dist/hooks/useStyles.d.ts +0 -45
  134. package/dist/hooks/useStyles.js +0 -270
  135. package/dist/hooks/useStyles.js.map +0 -1
  136. package/dist/injector/index.d.ts +0 -183
  137. package/dist/injector/index.js +0 -180
  138. package/dist/injector/index.js.map +0 -1
  139. package/dist/injector/injector.d.ts +0 -166
  140. package/dist/injector/injector.js +0 -465
  141. package/dist/injector/injector.js.map +0 -1
  142. package/dist/injector/sheet-manager.d.ts +0 -136
  143. package/dist/injector/sheet-manager.js +0 -731
  144. package/dist/injector/sheet-manager.js.map +0 -1
  145. package/dist/injector/types.d.ts +0 -204
  146. package/dist/keyframes/index.js +0 -206
  147. package/dist/keyframes/index.js.map +0 -1
  148. package/dist/parser/classify.js +0 -320
  149. package/dist/parser/classify.js.map +0 -1
  150. package/dist/parser/const.js +0 -33
  151. package/dist/parser/const.js.map +0 -1
  152. package/dist/parser/lru.js +0 -109
  153. package/dist/parser/lru.js.map +0 -1
  154. package/dist/parser/parser.d.ts +0 -25
  155. package/dist/parser/parser.js +0 -116
  156. package/dist/parser/parser.js.map +0 -1
  157. package/dist/parser/tokenizer.js +0 -69
  158. package/dist/parser/tokenizer.js.map +0 -1
  159. package/dist/parser/types.d.ts +0 -51
  160. package/dist/parser/types.js +0 -46
  161. package/dist/parser/types.js.map +0 -1
  162. package/dist/pipeline/conditions.d.ts +0 -134
  163. package/dist/pipeline/conditions.js +0 -406
  164. package/dist/pipeline/conditions.js.map +0 -1
  165. package/dist/pipeline/exclusive.js +0 -231
  166. package/dist/pipeline/exclusive.js.map +0 -1
  167. package/dist/pipeline/index.d.ts +0 -53
  168. package/dist/pipeline/index.js +0 -699
  169. package/dist/pipeline/index.js.map +0 -1
  170. package/dist/pipeline/materialize.js +0 -1105
  171. package/dist/pipeline/materialize.js.map +0 -1
  172. package/dist/pipeline/parseStateKey.d.ts +0 -15
  173. package/dist/pipeline/parseStateKey.js +0 -447
  174. package/dist/pipeline/parseStateKey.js.map +0 -1
  175. package/dist/pipeline/simplify.js +0 -516
  176. package/dist/pipeline/simplify.js.map +0 -1
  177. package/dist/pipeline/warnings.js +0 -18
  178. package/dist/pipeline/warnings.js.map +0 -1
  179. package/dist/plugins/okhsl-plugin.d.ts +0 -35
  180. package/dist/plugins/okhsl-plugin.js +0 -98
  181. package/dist/plugins/okhsl-plugin.js.map +0 -1
  182. package/dist/plugins/types.d.ts +0 -76
  183. package/dist/properties/index.js +0 -223
  184. package/dist/properties/index.js.map +0 -1
  185. package/dist/properties/property-type-resolver.d.ts +0 -24
  186. package/dist/properties/property-type-resolver.js +0 -91
  187. package/dist/properties/property-type-resolver.js.map +0 -1
  188. package/dist/ssr/async-storage.d.ts +0 -17
  189. package/dist/ssr/async-storage.js.map +0 -1
  190. package/dist/ssr/collect-auto-properties.js +0 -40
  191. package/dist/ssr/collect-auto-properties.js.map +0 -1
  192. package/dist/ssr/collector.d.ts +0 -102
  193. package/dist/ssr/collector.js +0 -227
  194. package/dist/ssr/collector.js.map +0 -1
  195. package/dist/ssr/context.d.ts +0 -8
  196. package/dist/ssr/context.js +0 -14
  197. package/dist/ssr/context.js.map +0 -1
  198. package/dist/ssr/format-global-rules.js +0 -22
  199. package/dist/ssr/format-global-rules.js.map +0 -1
  200. package/dist/ssr/format-keyframes.js +0 -70
  201. package/dist/ssr/format-keyframes.js.map +0 -1
  202. package/dist/ssr/format-property.js +0 -50
  203. package/dist/ssr/format-property.js.map +0 -1
  204. package/dist/ssr/format-rules.js +0 -70
  205. package/dist/ssr/format-rules.js.map +0 -1
  206. package/dist/ssr/hydrate.d.ts +0 -22
  207. package/dist/ssr/hydrate.js +0 -50
  208. package/dist/ssr/hydrate.js.map +0 -1
  209. package/dist/ssr/ssr-collector-ref.js +0 -12
  210. package/dist/ssr/ssr-collector-ref.js.map +0 -1
  211. package/dist/states/index.d.ts +0 -49
  212. package/dist/states/index.js +0 -171
  213. package/dist/states/index.js.map +0 -1
  214. package/dist/static/tastyStatic.d.ts +0 -46
  215. package/dist/static/tastyStatic.js +0 -31
  216. package/dist/static/tastyStatic.js.map +0 -1
  217. package/dist/static/types.d.ts +0 -49
  218. package/dist/static/types.js +0 -24
  219. package/dist/static/types.js.map +0 -1
  220. package/dist/styles/align.d.ts +0 -15
  221. package/dist/styles/align.js +0 -14
  222. package/dist/styles/align.js.map +0 -1
  223. package/dist/styles/border.d.ts +0 -25
  224. package/dist/styles/border.js +0 -114
  225. package/dist/styles/border.js.map +0 -1
  226. package/dist/styles/color.d.ts +0 -14
  227. package/dist/styles/color.js +0 -27
  228. package/dist/styles/color.js.map +0 -1
  229. package/dist/styles/createStyle.js +0 -80
  230. package/dist/styles/createStyle.js.map +0 -1
  231. package/dist/styles/dimension.js +0 -97
  232. package/dist/styles/dimension.js.map +0 -1
  233. package/dist/styles/display.d.ts +0 -37
  234. package/dist/styles/display.js +0 -67
  235. package/dist/styles/display.js.map +0 -1
  236. package/dist/styles/fade.d.ts +0 -15
  237. package/dist/styles/fade.js +0 -58
  238. package/dist/styles/fade.js.map +0 -1
  239. package/dist/styles/fill.d.ts +0 -42
  240. package/dist/styles/fill.js +0 -52
  241. package/dist/styles/fill.js.map +0 -1
  242. package/dist/styles/flow.d.ts +0 -16
  243. package/dist/styles/flow.js +0 -12
  244. package/dist/styles/flow.js.map +0 -1
  245. package/dist/styles/gap.d.ts +0 -31
  246. package/dist/styles/gap.js +0 -37
  247. package/dist/styles/gap.js.map +0 -1
  248. package/dist/styles/height.d.ts +0 -17
  249. package/dist/styles/height.js +0 -20
  250. package/dist/styles/height.js.map +0 -1
  251. package/dist/styles/index.d.ts +0 -2
  252. package/dist/styles/index.js +0 -9
  253. package/dist/styles/index.js.map +0 -1
  254. package/dist/styles/inset.d.ts +0 -52
  255. package/dist/styles/inset.js +0 -150
  256. package/dist/styles/inset.js.map +0 -1
  257. package/dist/styles/justify.d.ts +0 -15
  258. package/dist/styles/justify.js +0 -14
  259. package/dist/styles/justify.js.map +0 -1
  260. package/dist/styles/list.d.ts +0 -16
  261. package/dist/styles/list.js +0 -98
  262. package/dist/styles/list.js.map +0 -1
  263. package/dist/styles/margin.d.ts +0 -24
  264. package/dist/styles/margin.js +0 -104
  265. package/dist/styles/margin.js.map +0 -1
  266. package/dist/styles/outline.d.ts +0 -29
  267. package/dist/styles/outline.js +0 -65
  268. package/dist/styles/outline.js.map +0 -1
  269. package/dist/styles/padding.d.ts +0 -24
  270. package/dist/styles/padding.js +0 -104
  271. package/dist/styles/padding.js.map +0 -1
  272. package/dist/styles/predefined.d.ts +0 -71
  273. package/dist/styles/predefined.js +0 -238
  274. package/dist/styles/predefined.js.map +0 -1
  275. package/dist/styles/preset.d.ts +0 -47
  276. package/dist/styles/preset.js +0 -112
  277. package/dist/styles/preset.js.map +0 -1
  278. package/dist/styles/radius.d.ts +0 -14
  279. package/dist/styles/radius.js +0 -51
  280. package/dist/styles/radius.js.map +0 -1
  281. package/dist/styles/scrollbar.d.ts +0 -25
  282. package/dist/styles/scrollbar.js +0 -48
  283. package/dist/styles/scrollbar.js.map +0 -1
  284. package/dist/styles/shadow.d.ts +0 -14
  285. package/dist/styles/shadow.js +0 -24
  286. package/dist/styles/shadow.js.map +0 -1
  287. package/dist/styles/transition.d.ts +0 -14
  288. package/dist/styles/transition.js +0 -158
  289. package/dist/styles/transition.js.map +0 -1
  290. package/dist/styles/types.d.ts +0 -545
  291. package/dist/styles/width.d.ts +0 -17
  292. package/dist/styles/width.js +0 -20
  293. package/dist/styles/width.js.map +0 -1
  294. package/dist/tasty.d.ts +0 -119
  295. package/dist/tasty.js +0 -232
  296. package/dist/tasty.js.map +0 -1
  297. package/dist/types.d.ts +0 -184
  298. package/dist/utils/cache-wrapper.js +0 -22
  299. package/dist/utils/cache-wrapper.js.map +0 -1
  300. package/dist/utils/case-converter.js +0 -8
  301. package/dist/utils/case-converter.js.map +0 -1
  302. package/dist/utils/color-math.d.ts +0 -46
  303. package/dist/utils/color-math.js +0 -749
  304. package/dist/utils/color-math.js.map +0 -1
  305. package/dist/utils/color-space.d.ts +0 -5
  306. package/dist/utils/color-space.js +0 -229
  307. package/dist/utils/color-space.js.map +0 -1
  308. package/dist/utils/colors.d.ts +0 -5
  309. package/dist/utils/colors.js +0 -11
  310. package/dist/utils/colors.js.map +0 -1
  311. package/dist/utils/css-types.d.ts +0 -7
  312. package/dist/utils/dotize.d.ts +0 -26
  313. package/dist/utils/dotize.js +0 -122
  314. package/dist/utils/dotize.js.map +0 -1
  315. package/dist/utils/filter-base-props.d.ts +0 -15
  316. package/dist/utils/filter-base-props.js +0 -45
  317. package/dist/utils/filter-base-props.js.map +0 -1
  318. package/dist/utils/get-display-name.d.ts +0 -7
  319. package/dist/utils/get-display-name.js +0 -10
  320. package/dist/utils/get-display-name.js.map +0 -1
  321. package/dist/utils/has-keys.js +0 -13
  322. package/dist/utils/has-keys.js.map +0 -1
  323. package/dist/utils/is-dev-env.js +0 -19
  324. package/dist/utils/is-dev-env.js.map +0 -1
  325. package/dist/utils/is-valid-element-type.js +0 -15
  326. package/dist/utils/is-valid-element-type.js.map +0 -1
  327. package/dist/utils/merge-styles.js.map +0 -1
  328. package/dist/utils/mod-attrs.d.ts +0 -8
  329. package/dist/utils/mod-attrs.js +0 -21
  330. package/dist/utils/mod-attrs.js.map +0 -1
  331. package/dist/utils/process-tokens.d.ts +0 -21
  332. package/dist/utils/process-tokens.js +0 -91
  333. package/dist/utils/process-tokens.js.map +0 -1
  334. package/dist/utils/resolve-recipes.d.ts +0 -17
  335. package/dist/utils/resolve-recipes.js +0 -147
  336. package/dist/utils/resolve-recipes.js.map +0 -1
  337. package/dist/utils/selector-transform.js +0 -32
  338. package/dist/utils/selector-transform.js.map +0 -1
  339. package/dist/utils/string.js +0 -8
  340. package/dist/utils/string.js.map +0 -1
  341. package/dist/utils/styles.d.ts +0 -100
  342. package/dist/utils/styles.js +0 -222
  343. package/dist/utils/styles.js.map +0 -1
  344. package/dist/utils/typography.d.ts +0 -47
  345. package/dist/utils/typography.js +0 -43
  346. package/dist/utils/typography.js.map +0 -1
  347. package/dist/utils/warnings.d.ts +0 -16
  348. package/dist/utils/warnings.js +0 -16
  349. package/dist/utils/warnings.js.map +0 -1
  350. package/dist/zero/css-writer.d.ts +0 -45
  351. package/dist/zero/css-writer.js +0 -74
  352. package/dist/zero/css-writer.js.map +0 -1
  353. package/dist/zero/extractor.d.ts +0 -24
  354. package/dist/zero/extractor.js.map +0 -1
  355. package/docs/PIPELINE.md +0 -519
  356. package/docs/runtime.md +0 -485
@@ -1,46 +0,0 @@
1
- import { Styles } from "../styles/types.js";
2
- import { StaticStyle } from "./types.js";
3
-
4
- //#region src/static/tastyStatic.d.ts
5
- /**
6
- * Generate styles and return a StaticStyle object.
7
- * The object has `className`, `styles`, and `toString()`.
8
- *
9
- * @example
10
- * ```typescript
11
- * const button = tastyStatic({
12
- * fill: '#blue',
13
- * padding: '2x',
14
- * });
15
- * // After build: { className: 'ts3f2a1b', styles: {...}, toString() }
16
- *
17
- * <div className={button} /> // Works via toString()
18
- * ```
19
- */
20
- declare function tastyStatic(styles: Styles): StaticStyle;
21
- /**
22
- * Extend an existing StaticStyle with additional styles.
23
- * Uses mergeStyles() internally for proper nested selector handling.
24
- *
25
- * @example
26
- * ```typescript
27
- * const button = tastyStatic({ fill: '#blue' });
28
- * const primary = tastyStatic(button, { fill: '#purple' });
29
- * // After build: { className: 'ts8c4d2e', styles: {...merged...}, toString() }
30
- * ```
31
- */
32
- declare function tastyStatic(base: StaticStyle, styles: Styles): StaticStyle;
33
- /**
34
- * Generate styles for a specific CSS selector.
35
- * The call is completely removed after build transformation.
36
- *
37
- * @example
38
- * ```typescript
39
- * tastyStatic('.heading', { preset: 'h1', color: '#primary' });
40
- * // After build: (removed)
41
- * ```
42
- */
43
- declare function tastyStatic(selector: string, styles: Styles): void;
44
- //#endregion
45
- export { tastyStatic };
46
- //# sourceMappingURL=tastyStatic.d.ts.map
@@ -1,31 +0,0 @@
1
- import { mergeStyles } from "../utils/merge-styles.js";
2
- import { createStaticStyle, isStaticStyle } from "./types.js";
3
-
4
- //#region src/static/tastyStatic.ts
5
- /**
6
- * Build-time only function for zero-runtime static site generation.
7
- *
8
- * This function is transformed by the Babel plugin:
9
- * - `tastyStatic(styles)` → StaticStyle object with className
10
- * - `tastyStatic(base, styles)` → StaticStyle object with merged styles
11
- * - `tastyStatic(selector, styles)` → removed entirely
12
- *
13
- * At runtime (during development/build), this function returns a placeholder.
14
- * In production, all calls are replaced/removed by the build plugin.
15
- */
16
- function tastyStatic(stylesOrBaseOrSelector, styles) {
17
- if (typeof stylesOrBaseOrSelector === "string") {
18
- console.warn(`[tasty] tastyStatic('${stylesOrBaseOrSelector}', styles) was called at runtime. This indicates the Babel plugin is not configured. Add @tenphi/tasty/babel-plugin to your Babel config.`);
19
- return;
20
- }
21
- if (isStaticStyle(stylesOrBaseOrSelector)) {
22
- console.warn("[tasty] tastyStatic(base, styles) was called at runtime. This indicates the Babel plugin is not configured. Add @tenphi/tasty/babel-plugin to your Babel config.");
23
- return createStaticStyle("__TASTY_STATIC_NOT_TRANSFORMED__", mergeStyles(stylesOrBaseOrSelector.styles, styles || {}));
24
- }
25
- console.warn("[tasty] tastyStatic(styles) was called at runtime. This indicates the Babel plugin is not configured. Add @tenphi/tasty/babel-plugin to your Babel config.");
26
- return createStaticStyle("__TASTY_STATIC_NOT_TRANSFORMED__", stylesOrBaseOrSelector);
27
- }
28
-
29
- //#endregion
30
- export { tastyStatic };
31
- //# sourceMappingURL=tastyStatic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tastyStatic.js","names":[],"sources":["../../src/static/tastyStatic.ts"],"sourcesContent":["import type { Styles } from '../styles/types';\nimport { mergeStyles } from '../utils/merge-styles';\n\nimport type { StaticStyle } from './types';\nimport { createStaticStyle, isStaticStyle } from './types';\n\n/**\n * Generate styles and return a StaticStyle object.\n * The object has `className`, `styles`, and `toString()`.\n *\n * @example\n * ```typescript\n * const button = tastyStatic({\n * fill: '#blue',\n * padding: '2x',\n * });\n * // After build: { className: 'ts3f2a1b', styles: {...}, toString() }\n *\n * <div className={button} /> // Works via toString()\n * ```\n */\nexport function tastyStatic(styles: Styles): StaticStyle;\n\n/**\n * Extend an existing StaticStyle with additional styles.\n * Uses mergeStyles() internally for proper nested selector handling.\n *\n * @example\n * ```typescript\n * const button = tastyStatic({ fill: '#blue' });\n * const primary = tastyStatic(button, { fill: '#purple' });\n * // After build: { className: 'ts8c4d2e', styles: {...merged...}, toString() }\n * ```\n */\nexport function tastyStatic(base: StaticStyle, styles: Styles): StaticStyle;\n\n/**\n * Generate styles for a specific CSS selector.\n * The call is completely removed after build transformation.\n *\n * @example\n * ```typescript\n * tastyStatic('.heading', { preset: 'h1', color: '#primary' });\n * // After build: (removed)\n * ```\n */\nexport function tastyStatic(selector: string, styles: Styles): void;\n\n/**\n * Build-time only function for zero-runtime static site generation.\n *\n * This function is transformed by the Babel plugin:\n * - `tastyStatic(styles)` → StaticStyle object with className\n * - `tastyStatic(base, styles)` → StaticStyle object with merged styles\n * - `tastyStatic(selector, styles)` → removed entirely\n *\n * At runtime (during development/build), this function returns a placeholder.\n * In production, all calls are replaced/removed by the build plugin.\n */\nexport function tastyStatic(\n stylesOrBaseOrSelector: Styles | StaticStyle | string,\n styles?: Styles,\n): StaticStyle | void {\n // This code only executes if the Babel plugin hasn't processed the file yet.\n // In a properly configured build, this function is never called at runtime.\n\n if (typeof stylesOrBaseOrSelector === 'string') {\n // Selector mode: tastyStatic(selector, styles)\n // The plugin will remove this call entirely\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `[tasty] tastyStatic('${stylesOrBaseOrSelector}', styles) was called at runtime. ` +\n 'This indicates the Babel plugin is not configured. ' +\n 'Add @tenphi/tasty/babel-plugin to your Babel config.',\n );\n }\n return; // void\n }\n\n if (isStaticStyle(stylesOrBaseOrSelector)) {\n // Extension mode: tastyStatic(base, styles)\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n '[tasty] tastyStatic(base, styles) was called at runtime. ' +\n 'This indicates the Babel plugin is not configured. ' +\n 'Add @tenphi/tasty/babel-plugin to your Babel config.',\n );\n }\n // Merge styles for dev mode preview (won't have real classNames)\n const mergedStyles = mergeStyles(\n stylesOrBaseOrSelector.styles,\n styles || {},\n );\n return createStaticStyle('__TASTY_STATIC_NOT_TRANSFORMED__', mergedStyles);\n }\n\n // Styles mode: tastyStatic(styles)\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n '[tasty] tastyStatic(styles) was called at runtime. ' +\n 'This indicates the Babel plugin is not configured. ' +\n 'Add @tenphi/tasty/babel-plugin to your Babel config.',\n );\n }\n\n // Return placeholder - styles won't be applied without the plugin\n return createStaticStyle(\n '__TASTY_STATIC_NOT_TRANSFORMED__',\n stylesOrBaseOrSelector,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA2DA,SAAgB,YACd,wBACA,QACoB;AAIpB,KAAI,OAAO,2BAA2B,UAAU;AAI5C,UAAQ,KACN,wBAAwB,uBAAuB,2IAGhD;AAEH;;AAGF,KAAI,cAAc,uBAAuB,EAAE;AAGvC,UAAQ,KACN,mKAGD;AAOH,SAAO,kBAAkB,oCAJJ,YACnB,uBAAuB,QACvB,UAAU,EAAE,CACb,CACyE;;AAK1E,SAAQ,KACN,6JAGD;AAIH,QAAO,kBACL,oCACA,uBACD"}
@@ -1,49 +0,0 @@
1
- import { Styles } from "../styles/types.js";
2
-
3
- //#region src/static/types.d.ts
4
- /**
5
- * Static style definition returned by tastyStatic().
6
- *
7
- * Supports both explicit className access and implicit string coercion via toString().
8
- *
9
- * @example
10
- * ```typescript
11
- * const button = tastyStatic({ fill: '#blue' });
12
- *
13
- * // Both work in JSX:
14
- * <div className={button} /> // Uses toString()
15
- * <div className={button.className} /> // Explicit
16
- *
17
- * // Extension:
18
- * const primary = tastyStatic(button, { fill: '#purple' });
19
- * ```
20
- */
21
- interface StaticStyle {
22
- /**
23
- * Generated className(s) for use in JSX.
24
- * May contain multiple space-separated class names due to chunking.
25
- */
26
- className: string;
27
- /**
28
- * The original (or merged) styles object.
29
- * Available for extension via tastyStatic(base, overrides).
30
- */
31
- styles: Styles;
32
- /**
33
- * Returns className for implicit string coercion.
34
- * Enables `<div className={button} />` syntax.
35
- */
36
- toString(): string;
37
- }
38
- /**
39
- * Create a StaticStyle object.
40
- * Used internally by the Babel plugin to generate output.
41
- */
42
- declare function createStaticStyle(className: string, styles: Styles): StaticStyle;
43
- /**
44
- * Type guard to check if a value is a StaticStyle object.
45
- */
46
- declare function isStaticStyle(value: unknown): value is StaticStyle;
47
- //#endregion
48
- export { StaticStyle, createStaticStyle, isStaticStyle };
49
- //# sourceMappingURL=types.d.ts.map
@@ -1,24 +0,0 @@
1
- //#region src/static/types.ts
2
- /**
3
- * Create a StaticStyle object.
4
- * Used internally by the Babel plugin to generate output.
5
- */
6
- function createStaticStyle(className, styles) {
7
- return {
8
- className,
9
- styles,
10
- toString() {
11
- return this.className;
12
- }
13
- };
14
- }
15
- /**
16
- * Type guard to check if a value is a StaticStyle object.
17
- */
18
- function isStaticStyle(value) {
19
- return typeof value === "object" && value !== null && "className" in value && "styles" in value && "toString" in value && typeof value.className === "string" && typeof value.styles === "object";
20
- }
21
-
22
- //#endregion
23
- export { createStaticStyle, isStaticStyle };
24
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/static/types.ts"],"sourcesContent":["import type { Styles } from '../styles/types';\n\n/**\n * Static style definition returned by tastyStatic().\n *\n * Supports both explicit className access and implicit string coercion via toString().\n *\n * @example\n * ```typescript\n * const button = tastyStatic({ fill: '#blue' });\n *\n * // Both work in JSX:\n * <div className={button} /> // Uses toString()\n * <div className={button.className} /> // Explicit\n *\n * // Extension:\n * const primary = tastyStatic(button, { fill: '#purple' });\n * ```\n */\nexport interface StaticStyle {\n /**\n * Generated className(s) for use in JSX.\n * May contain multiple space-separated class names due to chunking.\n */\n className: string;\n\n /**\n * The original (or merged) styles object.\n * Available for extension via tastyStatic(base, overrides).\n */\n styles: Styles;\n\n /**\n * Returns className for implicit string coercion.\n * Enables `<div className={button} />` syntax.\n */\n toString(): string;\n}\n\n/**\n * Create a StaticStyle object.\n * Used internally by the Babel plugin to generate output.\n */\nexport function createStaticStyle(\n className: string,\n styles: Styles,\n): StaticStyle {\n return {\n className,\n styles,\n toString() {\n return this.className;\n },\n };\n}\n\n/**\n * Type guard to check if a value is a StaticStyle object.\n */\nexport function isStaticStyle(value: unknown): value is StaticStyle {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'className' in value &&\n 'styles' in value &&\n 'toString' in value &&\n typeof (value as StaticStyle).className === 'string' &&\n typeof (value as StaticStyle).styles === 'object'\n );\n}\n"],"mappings":";;;;;AA2CA,SAAgB,kBACd,WACA,QACa;AACb,QAAO;EACL;EACA;EACA,WAAW;AACT,UAAO,KAAK;;EAEf;;;;;AAMH,SAAgB,cAAc,OAAsC;AAClE,QACE,OAAO,UAAU,YACjB,UAAU,QACV,eAAe,SACf,YAAY,SACZ,cAAc,SACd,OAAQ,MAAsB,cAAc,YAC5C,OAAQ,MAAsB,WAAW"}
@@ -1,15 +0,0 @@
1
- //#region src/styles/align.d.ts
2
- declare function alignStyle({
3
- align
4
- }: {
5
- align?: string;
6
- }): {
7
- 'align-items': string;
8
- 'align-content': string;
9
- } | undefined;
10
- declare namespace alignStyle {
11
- var __lookupStyles: string[];
12
- }
13
- //#endregion
14
- export { alignStyle };
15
- //# sourceMappingURL=align.d.ts.map
@@ -1,14 +0,0 @@
1
- //#region src/styles/align.ts
2
- function alignStyle({ align }) {
3
- if (typeof align !== "string") return;
4
- if (!align) return;
5
- return {
6
- "align-items": align,
7
- "align-content": align
8
- };
9
- }
10
- alignStyle.__lookupStyles = ["align"];
11
-
12
- //#endregion
13
- export { alignStyle };
14
- //# sourceMappingURL=align.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"align.js","names":[],"sources":["../../src/styles/align.ts"],"sourcesContent":["export function alignStyle({ align }: { align?: string }) {\n if (typeof align !== 'string') return;\n\n if (!align) return;\n\n return {\n 'align-items': align,\n 'align-content': align,\n };\n}\n\nalignStyle.__lookupStyles = ['align'];\n"],"mappings":";AAAA,SAAgB,WAAW,EAAE,SAA6B;AACxD,KAAI,OAAO,UAAU,SAAU;AAE/B,KAAI,CAAC,MAAO;AAEZ,QAAO;EACL,eAAe;EACf,iBAAiB;EAClB;;AAGH,WAAW,iBAAiB,CAAC,QAAQ"}
@@ -1,25 +0,0 @@
1
- //#region src/styles/border.d.ts
2
- /**
3
- * Border style handler with multi-group support.
4
- *
5
- * Single group (backward compatible):
6
- * - `border="1bw solid #red"` - all sides
7
- * - `border="1bw solid #red top left"` - only top and left
8
- *
9
- * Multi-group (new):
10
- * - `border="1bw #red, 2bw #blue top"` - all sides red 1bw, then top overridden to blue 2bw
11
- * - `border="1bw, dashed top bottom, #purple left right"` - base 1bw, dashed on top/bottom, purple on left/right
12
- *
13
- * Later groups override earlier groups for conflicting directions.
14
- */
15
- declare function borderStyle({
16
- border
17
- }: {
18
- border?: string | number | boolean;
19
- }): Record<string, string> | undefined;
20
- declare namespace borderStyle {
21
- var __lookupStyles: string[];
22
- }
23
- //#endregion
24
- export { borderStyle };
25
- //# sourceMappingURL=border.d.ts.map
@@ -1,114 +0,0 @@
1
- import { DIRECTIONS, filterMods, parseStyle } from "../utils/styles.js";
2
-
3
- //#region src/styles/border.ts
4
- const BORDER_STYLES = [
5
- "none",
6
- "hidden",
7
- "dotted",
8
- "dashed",
9
- "solid",
10
- "double",
11
- "groove",
12
- "ridge",
13
- "inset",
14
- "outset"
15
- ];
16
- /**
17
- * Process a single group and return border values for its directions.
18
- * @returns Object with directions as keys and border values, or null for "all directions"
19
- */
20
- function processGroup(group) {
21
- const { values, mods, colors } = group;
22
- const directions = filterMods(mods, DIRECTIONS);
23
- const typeMods = filterMods(mods, BORDER_STYLES);
24
- return {
25
- directions,
26
- borderValue: {
27
- width: values[0] || "var(--border-width)",
28
- style: typeMods[0] || "solid",
29
- color: colors?.[0] || "var(--border-color, currentColor)"
30
- }
31
- };
32
- }
33
- /**
34
- * Format a border value to CSS string.
35
- */
36
- function formatBorderValue(value) {
37
- return `${value.width} ${value.style} ${value.color}`;
38
- }
39
- /**
40
- * Border style handler with multi-group support.
41
- *
42
- * Single group (backward compatible):
43
- * - `border="1bw solid #red"` - all sides
44
- * - `border="1bw solid #red top left"` - only top and left
45
- *
46
- * Multi-group (new):
47
- * - `border="1bw #red, 2bw #blue top"` - all sides red 1bw, then top overridden to blue 2bw
48
- * - `border="1bw, dashed top bottom, #purple left right"` - base 1bw, dashed on top/bottom, purple on left/right
49
- *
50
- * Later groups override earlier groups for conflicting directions.
51
- */
52
- function borderStyle({ border }) {
53
- if (!border && border !== 0) return;
54
- if (border === true) border = "1bw";
55
- const groups = parseStyle(String(border)).groups ?? [];
56
- if (!groups.length) return;
57
- if (groups.length === 1) {
58
- const { directions, borderValue } = processGroup({
59
- values: groups[0].values ?? [],
60
- mods: groups[0].mods ?? [],
61
- colors: groups[0].colors ?? []
62
- });
63
- const styleValue = formatBorderValue(borderValue);
64
- if (!directions.length) return { border: styleValue };
65
- const zeroValue = `0 ${borderValue.style} ${borderValue.color}`;
66
- return DIRECTIONS.reduce((styles, dir) => {
67
- if (directions.includes(dir)) styles[`border-${dir}`] = styleValue;
68
- else styles[`border-${dir}`] = zeroValue;
69
- return styles;
70
- }, {});
71
- }
72
- let hasAnyDirections = false;
73
- const directionMap = {
74
- top: null,
75
- right: null,
76
- bottom: null,
77
- left: null
78
- };
79
- let allDirectionsValue = null;
80
- for (const group of groups) {
81
- const { directions, borderValue } = processGroup({
82
- values: group.values ?? [],
83
- mods: group.mods ?? [],
84
- colors: group.colors ?? []
85
- });
86
- if (directions.length === 0) {
87
- allDirectionsValue = borderValue;
88
- for (const dir of DIRECTIONS) directionMap[dir] = borderValue;
89
- } else {
90
- hasAnyDirections = true;
91
- for (const dir of directions) directionMap[dir] = borderValue;
92
- }
93
- }
94
- if (!hasAnyDirections && allDirectionsValue) return { border: formatBorderValue(allDirectionsValue) };
95
- const result = {};
96
- for (const dir of DIRECTIONS) {
97
- const value = directionMap[dir];
98
- if (value) result[`border-${dir}`] = formatBorderValue(value);
99
- else {
100
- const fallback = allDirectionsValue || {
101
- width: "0",
102
- style: "solid",
103
- color: "var(--border-color, currentColor)"
104
- };
105
- result[`border-${dir}`] = `0 ${fallback.style} ${fallback.color}`;
106
- }
107
- }
108
- return result;
109
- }
110
- borderStyle.__lookupStyles = ["border"];
111
-
112
- //#endregion
113
- export { borderStyle };
114
- //# sourceMappingURL=border.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"border.js","names":[],"sources":["../../src/styles/border.ts"],"sourcesContent":["import { DIRECTIONS, filterMods, parseStyle } from '../utils/styles';\n\nconst BORDER_STYLES = [\n 'none',\n 'hidden',\n 'dotted',\n 'dashed',\n 'solid',\n 'double',\n 'groove',\n 'ridge',\n 'inset',\n 'outset',\n] as const;\n\ntype Direction = (typeof DIRECTIONS)[number];\n\ninterface GroupData {\n values: string[];\n mods: string[];\n colors: string[];\n}\n\ninterface BorderValue {\n width: string;\n style: string;\n color: string;\n}\n\n/**\n * Process a single group and return border values for its directions.\n * @returns Object with directions as keys and border values, or null for \"all directions\"\n */\nfunction processGroup(group: GroupData): {\n directions: Direction[];\n borderValue: BorderValue;\n} {\n const { values, mods, colors } = group;\n\n const directions = filterMods(mods, DIRECTIONS) as Direction[];\n const typeMods = filterMods(mods, BORDER_STYLES as unknown as string[]);\n\n const width = values[0] || 'var(--border-width)';\n const style = typeMods[0] || 'solid';\n const color = colors?.[0] || 'var(--border-color, currentColor)';\n\n return {\n directions,\n borderValue: { width, style, color },\n };\n}\n\n/**\n * Format a border value to CSS string.\n */\nfunction formatBorderValue(value: BorderValue): string {\n return `${value.width} ${value.style} ${value.color}`;\n}\n\n/**\n * Border style handler with multi-group support.\n *\n * Single group (backward compatible):\n * - `border=\"1bw solid #red\"` - all sides\n * - `border=\"1bw solid #red top left\"` - only top and left\n *\n * Multi-group (new):\n * - `border=\"1bw #red, 2bw #blue top\"` - all sides red 1bw, then top overridden to blue 2bw\n * - `border=\"1bw, dashed top bottom, #purple left right\"` - base 1bw, dashed on top/bottom, purple on left/right\n *\n * Later groups override earlier groups for conflicting directions.\n */\nexport function borderStyle({\n border,\n}: {\n border?: string | number | boolean;\n}) {\n if (!border && border !== 0) return;\n\n if (border === true) border = '1bw';\n\n const processed = parseStyle(String(border));\n const groups: GroupData[] = processed.groups ?? [];\n\n if (!groups.length) return;\n\n // Single group - use original logic for backward compatibility\n if (groups.length === 1) {\n const { directions, borderValue } = processGroup({\n values: groups[0].values ?? [],\n mods: groups[0].mods ?? [],\n colors: groups[0].colors ?? [],\n });\n\n const styleValue = formatBorderValue(borderValue);\n\n if (!directions.length) {\n return { border: styleValue };\n }\n\n const zeroValue = `0 ${borderValue.style} ${borderValue.color}`;\n\n return DIRECTIONS.reduce(\n (styles, dir) => {\n if (directions.includes(dir)) {\n styles[`border-${dir}`] = styleValue;\n } else {\n styles[`border-${dir}`] = zeroValue;\n }\n return styles;\n },\n {} as Record<string, string>,\n );\n }\n\n // Multi-group - process groups in order, later groups override earlier\n // Track whether any group specifies directions\n let hasAnyDirections = false;\n\n // Build a map of direction -> border value\n // Start with undefined (no border set)\n const directionMap: Record<Direction, BorderValue | null> = {\n top: null,\n right: null,\n bottom: null,\n left: null,\n };\n\n // Track the last \"all directions\" value for fallback\n let allDirectionsValue: BorderValue | null = null;\n\n // Process groups in order (first to last)\n for (const group of groups) {\n const { directions, borderValue } = processGroup({\n values: group.values ?? [],\n mods: group.mods ?? [],\n colors: group.colors ?? [],\n });\n\n if (directions.length === 0) {\n // No specific directions - applies to all\n allDirectionsValue = borderValue;\n // Set all directions\n for (const dir of DIRECTIONS) {\n directionMap[dir] = borderValue;\n }\n } else {\n // Specific directions - override only those\n hasAnyDirections = true;\n for (const dir of directions) {\n directionMap[dir] = borderValue;\n }\n }\n }\n\n // If no group specified any directions and we have an all-directions value,\n // return the simple `border` shorthand\n if (!hasAnyDirections && allDirectionsValue) {\n return { border: formatBorderValue(allDirectionsValue) };\n }\n\n // Otherwise, output individual border-* properties\n const result: Record<string, string> = {};\n\n for (const dir of DIRECTIONS) {\n const value = directionMap[dir];\n if (value) {\n result[`border-${dir}`] = formatBorderValue(value);\n } else {\n // No border for this direction - set to 0\n // Use the last all-directions value for style/color consistency, or defaults\n const fallback = allDirectionsValue || {\n width: '0',\n style: 'solid',\n color: 'var(--border-color, currentColor)',\n };\n result[`border-${dir}`] = `0 ${fallback.style} ${fallback.color}`;\n }\n }\n\n return result;\n}\n\nborderStyle.__lookupStyles = ['border'];\n"],"mappings":";;;AAEA,MAAM,gBAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;AAoBD,SAAS,aAAa,OAGpB;CACA,MAAM,EAAE,QAAQ,MAAM,WAAW;CAEjC,MAAM,aAAa,WAAW,MAAM,WAAW;CAC/C,MAAM,WAAW,WAAW,MAAM,cAAqC;AAMvE,QAAO;EACL;EACA,aAAa;GAAE,OANH,OAAO,MAAM;GAMH,OALV,SAAS,MAAM;GAKE,OAJjB,SAAS,MAAM;GAIS;EACrC;;;;;AAMH,SAAS,kBAAkB,OAA4B;AACrD,QAAO,GAAG,MAAM,MAAM,GAAG,MAAM,MAAM,GAAG,MAAM;;;;;;;;;;;;;;;AAgBhD,SAAgB,YAAY,EAC1B,UAGC;AACD,KAAI,CAAC,UAAU,WAAW,EAAG;AAE7B,KAAI,WAAW,KAAM,UAAS;CAG9B,MAAM,SADY,WAAW,OAAO,OAAO,CAAC,CACN,UAAU,EAAE;AAElD,KAAI,CAAC,OAAO,OAAQ;AAGpB,KAAI,OAAO,WAAW,GAAG;EACvB,MAAM,EAAE,YAAY,gBAAgB,aAAa;GAC/C,QAAQ,OAAO,GAAG,UAAU,EAAE;GAC9B,MAAM,OAAO,GAAG,QAAQ,EAAE;GAC1B,QAAQ,OAAO,GAAG,UAAU,EAAE;GAC/B,CAAC;EAEF,MAAM,aAAa,kBAAkB,YAAY;AAEjD,MAAI,CAAC,WAAW,OACd,QAAO,EAAE,QAAQ,YAAY;EAG/B,MAAM,YAAY,KAAK,YAAY,MAAM,GAAG,YAAY;AAExD,SAAO,WAAW,QACf,QAAQ,QAAQ;AACf,OAAI,WAAW,SAAS,IAAI,CAC1B,QAAO,UAAU,SAAS;OAE1B,QAAO,UAAU,SAAS;AAE5B,UAAO;KAET,EAAE,CACH;;CAKH,IAAI,mBAAmB;CAIvB,MAAM,eAAsD;EAC1D,KAAK;EACL,OAAO;EACP,QAAQ;EACR,MAAM;EACP;CAGD,IAAI,qBAAyC;AAG7C,MAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,EAAE,YAAY,gBAAgB,aAAa;GAC/C,QAAQ,MAAM,UAAU,EAAE;GAC1B,MAAM,MAAM,QAAQ,EAAE;GACtB,QAAQ,MAAM,UAAU,EAAE;GAC3B,CAAC;AAEF,MAAI,WAAW,WAAW,GAAG;AAE3B,wBAAqB;AAErB,QAAK,MAAM,OAAO,WAChB,cAAa,OAAO;SAEjB;AAEL,sBAAmB;AACnB,QAAK,MAAM,OAAO,WAChB,cAAa,OAAO;;;AAO1B,KAAI,CAAC,oBAAoB,mBACvB,QAAO,EAAE,QAAQ,kBAAkB,mBAAmB,EAAE;CAI1D,MAAM,SAAiC,EAAE;AAEzC,MAAK,MAAM,OAAO,YAAY;EAC5B,MAAM,QAAQ,aAAa;AAC3B,MAAI,MACF,QAAO,UAAU,SAAS,kBAAkB,MAAM;OAC7C;GAGL,MAAM,WAAW,sBAAsB;IACrC,OAAO;IACP,OAAO;IACP,OAAO;IACR;AACD,UAAO,UAAU,SAAS,KAAK,SAAS,MAAM,GAAG,SAAS;;;AAI9D,QAAO;;AAGT,YAAY,iBAAiB,CAAC,SAAS"}
@@ -1,14 +0,0 @@
1
- //#region src/styles/color.d.ts
2
- declare function colorStyle({
3
- color
4
- }: {
5
- color?: string | boolean;
6
- }): {
7
- color: string;
8
- } | undefined;
9
- declare namespace colorStyle {
10
- var __lookupStyles: string[];
11
- }
12
- //#endregion
13
- export { colorStyle };
14
- //# sourceMappingURL=color.d.ts.map
@@ -1,27 +0,0 @@
1
- import { getColorSpaceSuffix } from "../utils/color-space.js";
2
- import { parseColor } from "../utils/styles.js";
3
- import { convertColorChainToComponentChain } from "./createStyle.js";
4
-
5
- //#region src/styles/color.ts
6
- function colorStyle({ color }) {
7
- if (!color) return;
8
- if (color === true) color = "currentColor";
9
- if (typeof color === "string" && (color.startsWith("#") || color.startsWith("(#"))) color = parseColor(color).color || color;
10
- const match = color.match(/var\(--(.+?)-color/);
11
- let name = "";
12
- if (match) name = match[1];
13
- const styles = { color };
14
- if (name && name !== "current") {
15
- const suffix = getColorSpaceSuffix();
16
- Object.assign(styles, {
17
- "--current-color": color,
18
- [`--current-color-${suffix}`]: convertColorChainToComponentChain(color)
19
- });
20
- }
21
- return styles;
22
- }
23
- colorStyle.__lookupStyles = ["color"];
24
-
25
- //#endregion
26
- export { colorStyle };
27
- //# sourceMappingURL=color.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"color.js","names":[],"sources":["../../src/styles/color.ts"],"sourcesContent":["import { getColorSpaceSuffix } from '../utils/color-space';\nimport { parseColor } from '../utils/styles';\n\nimport { convertColorChainToComponentChain } from './createStyle';\n\nexport function colorStyle({ color }: { color?: string | boolean }) {\n if (!color) return;\n\n if (color === true) color = 'currentColor';\n\n if (\n typeof color === 'string' &&\n (color.startsWith('#') || color.startsWith('(#'))\n ) {\n color = parseColor(color).color || color;\n }\n\n const match = color.match(/var\\(--(.+?)-color/);\n let name = '';\n\n if (match) {\n name = match[1];\n }\n\n const styles = {\n color: color,\n };\n\n if (name && name !== 'current') {\n const suffix = getColorSpaceSuffix();\n Object.assign(styles, {\n '--current-color': color,\n [`--current-color-${suffix}`]: convertColorChainToComponentChain(color),\n });\n }\n\n return styles;\n}\n\ncolorStyle.__lookupStyles = ['color'];\n"],"mappings":";;;;;AAKA,SAAgB,WAAW,EAAE,SAAuC;AAClE,KAAI,CAAC,MAAO;AAEZ,KAAI,UAAU,KAAM,SAAQ;AAE5B,KACE,OAAO,UAAU,aAChB,MAAM,WAAW,IAAI,IAAI,MAAM,WAAW,KAAK,EAEhD,SAAQ,WAAW,MAAM,CAAC,SAAS;CAGrC,MAAM,QAAQ,MAAM,MAAM,qBAAqB;CAC/C,IAAI,OAAO;AAEX,KAAI,MACF,QAAO,MAAM;CAGf,MAAM,SAAS,EACN,OACR;AAED,KAAI,QAAQ,SAAS,WAAW;EAC9B,MAAM,SAAS,qBAAqB;AACpC,SAAO,OAAO,QAAQ;GACpB,mBAAmB;IAClB,mBAAmB,WAAW,kCAAkC,MAAM;GACxE,CAAC;;AAGJ,QAAO;;AAGT,WAAW,iBAAiB,CAAC,QAAQ"}
@@ -1,80 +0,0 @@
1
- import { getColorSpaceComponents, getColorSpaceSuffix, strToColorSpace } from "../utils/color-space.js";
2
- import { normalizeColorTokenValue, parseColor, parseStyle } from "../utils/styles.js";
3
- import { toSnakeCase } from "../utils/string.js";
4
-
5
- //#region src/styles/createStyle.ts
6
- const CACHE = {};
7
- /**
8
- * Convert color fallback chain to component fallback chain.
9
- * Example: var(--primary-color, var(--secondary-color))
10
- * → var(--primary-color-oklch, var(--secondary-color-oklch))
11
- */
12
- function convertColorChainToComponentChain(colorValue) {
13
- const suffix = getColorSpaceSuffix();
14
- const componentVarMatch = colorValue.match(/^(?:rgb|hsl|oklch)a?\(\s*(var\(--[a-z0-9-]+-color-(?:rgb|hsl|oklch)\))\s*\//);
15
- if (componentVarMatch) return componentVarMatch[1];
16
- const match = colorValue.match(/var\(--([a-z0-9-]+)-color\s*(?:,\s*(.+))?\)/);
17
- if (!match) {
18
- const components = getColorSpaceComponents(colorValue);
19
- if (components !== colorValue) return components;
20
- return colorValue;
21
- }
22
- const [, name, fallback] = match;
23
- if (!fallback) return `var(--${name}-color-${suffix})`;
24
- return `var(--${name}-color-${suffix}, ${convertColorChainToComponentChain(fallback.trim())})`;
25
- }
26
- function createStyle(styleName, cssStyle, converter) {
27
- const key = `${styleName}.${cssStyle ?? ""}`;
28
- if (!CACHE[key]) {
29
- const styleHandler = (styleMap) => {
30
- let styleValue = styleMap[styleName];
31
- if (styleValue == null || styleValue === false) return;
32
- let finalCssStyle;
33
- const isColorToken = !cssStyle && typeof styleName === "string" && styleName.startsWith("#");
34
- if (isColorToken) finalCssStyle = `--${toSnakeCase(styleName.slice(1)).replace(/^-+/, "")}-color`;
35
- else finalCssStyle = cssStyle || toSnakeCase(styleName).replace(/^\$/, "--");
36
- if (isColorToken) {
37
- const normalized = normalizeColorTokenValue(styleValue);
38
- if (normalized === null) return;
39
- styleValue = normalized;
40
- }
41
- if (converter && typeof styleValue !== "string") {
42
- styleValue = converter(styleValue);
43
- if (!styleValue) return;
44
- }
45
- if (typeof styleValue === "string" && finalCssStyle.startsWith("--") && finalCssStyle.endsWith("-color")) {
46
- styleValue = styleValue.trim();
47
- const suffix = getColorSpaceSuffix();
48
- const colorSpaceStr = strToColorSpace(styleValue);
49
- const { color, name } = parseColor(styleValue);
50
- if (name && colorSpaceStr) return {
51
- [finalCssStyle]: `var(--${name}-color, ${colorSpaceStr})`,
52
- [`${finalCssStyle}-${suffix}`]: `var(--${name}-color-${suffix}, ${getColorSpaceComponents(colorSpaceStr)})`
53
- };
54
- else if (name) {
55
- if (color) return {
56
- [finalCssStyle]: color,
57
- [`${finalCssStyle}-${suffix}`]: convertColorChainToComponentChain(color)
58
- };
59
- return {
60
- [finalCssStyle]: `var(--${name}-color)`,
61
- [`${finalCssStyle}-${suffix}`]: `var(--${name}-color-${suffix})`
62
- };
63
- } else if (colorSpaceStr) return {
64
- [finalCssStyle]: colorSpaceStr,
65
- [`${finalCssStyle}-${suffix}`]: getColorSpaceComponents(colorSpaceStr)
66
- };
67
- return { [finalCssStyle]: color ?? "" };
68
- }
69
- const processed = parseStyle(styleValue);
70
- return { [finalCssStyle]: processed.output };
71
- };
72
- styleHandler.__lookupStyles = [styleName];
73
- CACHE[key] = styleHandler;
74
- }
75
- return CACHE[key];
76
- }
77
-
78
- //#endregion
79
- export { convertColorChainToComponentChain, createStyle };
80
- //# sourceMappingURL=createStyle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createStyle.js","names":[],"sources":["../../src/styles/createStyle.ts"],"sourcesContent":["import {\n getColorSpaceComponents,\n getColorSpaceSuffix,\n strToColorSpace,\n} from '../utils/color-space';\nimport { toSnakeCase } from '../utils/string';\nimport {\n normalizeColorTokenValue,\n parseColor,\n parseStyle,\n} from '../utils/styles';\nimport type {\n CSSMap,\n StyleHandler,\n StyleValue,\n StyleValueStateMap,\n} from '../utils/styles';\n\nconst CACHE: Record<string, StyleHandler> = {};\n\n/**\n * Convert color fallback chain to component fallback chain.\n * Example: var(--primary-color, var(--secondary-color))\n * → var(--primary-color-oklch, var(--secondary-color-oklch))\n */\nexport function convertColorChainToComponentChain(colorValue: string): string {\n const suffix = getColorSpaceSuffix();\n\n // Handle func(var(--name-color-{suffix}) / alpha) pattern.\n // When #name.opacity is parsed, the classifier produces e.g.\n // oklch(var(--name-color-oklch) / .opacity).\n // The component chain should be just the inner var() reference.\n const componentVarMatch = colorValue.match(\n /^(?:rgb|hsl|oklch)a?\\(\\s*(var\\(--[a-z0-9-]+-color-(?:rgb|hsl|oklch)\\))\\s*\\//,\n );\n if (componentVarMatch) {\n return componentVarMatch[1];\n }\n\n // Match var(--name-color, ...) pattern\n const varPattern = /var\\(--([a-z0-9-]+)-color\\s*(?:,\\s*(.+))?\\)/;\n const match = colorValue.match(varPattern);\n\n if (!match) {\n // Not a color variable — try to convert to components\n const components = getColorSpaceComponents(colorValue);\n if (components !== colorValue) return components;\n return colorValue;\n }\n\n const [, name, fallback] = match;\n\n if (!fallback) {\n return `var(--${name}-color-${suffix})`;\n }\n\n const processedFallback = convertColorChainToComponentChain(fallback.trim());\n return `var(--${name}-color-${suffix}, ${processedFallback})`;\n}\n\nexport function createStyle(\n styleName: string,\n cssStyle?: string,\n converter?: (styleValue: string | number | true) => string | undefined,\n) {\n const key = `${styleName}.${cssStyle ?? ''}`;\n\n if (!CACHE[key]) {\n const styleHandler = (styleMap: StyleValueStateMap): CSSMap | void => {\n let styleValue = styleMap[styleName];\n\n if (styleValue == null || styleValue === false) return;\n\n let finalCssStyle: string;\n const isColorToken =\n !cssStyle && typeof styleName === 'string' && styleName.startsWith('#');\n\n if (isColorToken) {\n const raw = styleName.slice(1);\n const name = toSnakeCase(raw).replace(/^-+/, '');\n finalCssStyle = `--${name}-color`;\n } else {\n finalCssStyle = cssStyle || toSnakeCase(styleName).replace(/^\\$/, '--');\n }\n\n if (isColorToken) {\n const normalized = normalizeColorTokenValue(styleValue);\n if (normalized === null) return;\n styleValue = normalized;\n }\n\n if (converter && typeof styleValue !== 'string') {\n styleValue = converter(styleValue as string | number | true);\n\n if (!styleValue) return;\n }\n\n if (\n typeof styleValue === 'string' &&\n finalCssStyle.startsWith('--') &&\n finalCssStyle.endsWith('-color')\n ) {\n styleValue = styleValue.trim();\n const suffix = getColorSpaceSuffix();\n\n const colorSpaceStr = strToColorSpace(styleValue as string);\n\n const { color, name } = parseColor(styleValue as string);\n\n if (name && colorSpaceStr) {\n return {\n [finalCssStyle]: `var(--${name}-color, ${colorSpaceStr})`,\n [`${finalCssStyle}-${suffix}`]: `var(--${name}-color-${suffix}, ${getColorSpaceComponents(\n colorSpaceStr,\n )})`,\n };\n } else if (name) {\n if (color) {\n return {\n [finalCssStyle]: color,\n [`${finalCssStyle}-${suffix}`]:\n convertColorChainToComponentChain(color),\n };\n }\n\n return {\n [finalCssStyle]: `var(--${name}-color)`,\n [`${finalCssStyle}-${suffix}`]: `var(--${name}-color-${suffix})`,\n };\n } else if (colorSpaceStr) {\n return {\n [finalCssStyle]: colorSpaceStr,\n [`${finalCssStyle}-${suffix}`]:\n getColorSpaceComponents(colorSpaceStr),\n };\n }\n\n return {\n [finalCssStyle]: color ?? '',\n };\n }\n\n const processed = parseStyle(styleValue as StyleValue);\n return { [finalCssStyle]: processed.output };\n };\n\n styleHandler.__lookupStyles = [styleName];\n\n CACHE[key] = styleHandler;\n }\n\n return CACHE[key];\n}\n"],"mappings":";;;;;AAkBA,MAAM,QAAsC,EAAE;;;;;;AAO9C,SAAgB,kCAAkC,YAA4B;CAC5E,MAAM,SAAS,qBAAqB;CAMpC,MAAM,oBAAoB,WAAW,MACnC,8EACD;AACD,KAAI,kBACF,QAAO,kBAAkB;CAK3B,MAAM,QAAQ,WAAW,MADN,8CACuB;AAE1C,KAAI,CAAC,OAAO;EAEV,MAAM,aAAa,wBAAwB,WAAW;AACtD,MAAI,eAAe,WAAY,QAAO;AACtC,SAAO;;CAGT,MAAM,GAAG,MAAM,YAAY;AAE3B,KAAI,CAAC,SACH,QAAO,SAAS,KAAK,SAAS,OAAO;AAIvC,QAAO,SAAS,KAAK,SAAS,OAAO,IADX,kCAAkC,SAAS,MAAM,CAAC,CACjB;;AAG7D,SAAgB,YACd,WACA,UACA,WACA;CACA,MAAM,MAAM,GAAG,UAAU,GAAG,YAAY;AAExC,KAAI,CAAC,MAAM,MAAM;EACf,MAAM,gBAAgB,aAAgD;GACpE,IAAI,aAAa,SAAS;AAE1B,OAAI,cAAc,QAAQ,eAAe,MAAO;GAEhD,IAAI;GACJ,MAAM,eACJ,CAAC,YAAY,OAAO,cAAc,YAAY,UAAU,WAAW,IAAI;AAEzE,OAAI,aAGF,iBAAgB,KADH,YADD,UAAU,MAAM,EAAE,CACD,CAAC,QAAQ,OAAO,GAAG,CACtB;OAE1B,iBAAgB,YAAY,YAAY,UAAU,CAAC,QAAQ,OAAO,KAAK;AAGzE,OAAI,cAAc;IAChB,MAAM,aAAa,yBAAyB,WAAW;AACvD,QAAI,eAAe,KAAM;AACzB,iBAAa;;AAGf,OAAI,aAAa,OAAO,eAAe,UAAU;AAC/C,iBAAa,UAAU,WAAqC;AAE5D,QAAI,CAAC,WAAY;;AAGnB,OACE,OAAO,eAAe,YACtB,cAAc,WAAW,KAAK,IAC9B,cAAc,SAAS,SAAS,EAChC;AACA,iBAAa,WAAW,MAAM;IAC9B,MAAM,SAAS,qBAAqB;IAEpC,MAAM,gBAAgB,gBAAgB,WAAqB;IAE3D,MAAM,EAAE,OAAO,SAAS,WAAW,WAAqB;AAExD,QAAI,QAAQ,cACV,QAAO;MACJ,gBAAgB,SAAS,KAAK,UAAU,cAAc;MACtD,GAAG,cAAc,GAAG,WAAW,SAAS,KAAK,SAAS,OAAO,IAAI,wBAChE,cACD,CAAC;KACH;aACQ,MAAM;AACf,SAAI,MACF,QAAO;OACJ,gBAAgB;OAChB,GAAG,cAAc,GAAG,WACnB,kCAAkC,MAAM;MAC3C;AAGH,YAAO;OACJ,gBAAgB,SAAS,KAAK;OAC9B,GAAG,cAAc,GAAG,WAAW,SAAS,KAAK,SAAS,OAAO;MAC/D;eACQ,cACT,QAAO;MACJ,gBAAgB;MAChB,GAAG,cAAc,GAAG,WACnB,wBAAwB,cAAc;KACzC;AAGH,WAAO,GACJ,gBAAgB,SAAS,IAC3B;;GAGH,MAAM,YAAY,WAAW,WAAyB;AACtD,UAAO,GAAG,gBAAgB,UAAU,QAAQ;;AAG9C,eAAa,iBAAiB,CAAC,UAAU;AAEzC,QAAM,OAAO;;AAGf,QAAO,MAAM"}
@@ -1,97 +0,0 @@
1
- import { makeEmptyDetails } from "../parser/types.js";
2
- import { parseStyle } from "../utils/styles.js";
3
-
4
- //#region src/styles/dimension.ts
5
- const DEFAULT_MIN_SIZE = "var(--gap)";
6
- const DEFAULT_MAX_SIZE = "100%";
7
- /**
8
- * Parse a dimension value (string, number, or boolean) into a CSS value
9
- */
10
- function parseDimensionValue(val) {
11
- if (val == null) return null;
12
- if (typeof val === "number") return `${val}px`;
13
- if (val === true) return "initial";
14
- return parseStyle(String(val)).groups[0]?.values[0] || null;
15
- }
16
- /**
17
- * Creates a dimension style handler for width or height.
18
- *
19
- * Supports:
20
- * - Main dimension prop (width/height) with syntax for min/max
21
- * - Separate min/max props (minWidth/maxWidth or minHeight/maxHeight)
22
- *
23
- * Priority: Individual min/max props override values from main prop syntax
24
- */
25
- function dimensionStyle(name) {
26
- const minStyle = `min-${name}`;
27
- const maxStyle = `max-${name}`;
28
- return ({ value, min, max }) => {
29
- if (value == null && min == null && max == null) return;
30
- if (value === true) {
31
- const styles = {
32
- [name]: "auto",
33
- [minStyle]: "initial",
34
- [maxStyle]: "initial"
35
- };
36
- const minVal = parseDimensionValue(min);
37
- const maxVal = parseDimensionValue(max);
38
- if (minVal) styles[minStyle] = minVal;
39
- if (maxVal) styles[maxStyle] = maxVal;
40
- return styles;
41
- }
42
- const styles = {
43
- [name]: "auto",
44
- [minStyle]: "initial",
45
- [maxStyle]: "initial"
46
- };
47
- if (value != null) {
48
- let val = value;
49
- if (typeof val === "number") val = `${val}px`;
50
- val = String(val);
51
- const { mods, values } = parseStyle(val).groups[0] ?? makeEmptyDetails();
52
- let flag = false;
53
- for (const mod of mods) switch (mod) {
54
- case "min":
55
- styles[minStyle] = values[0] || DEFAULT_MIN_SIZE;
56
- flag = true;
57
- break;
58
- case "max":
59
- styles[maxStyle] = values[0] || DEFAULT_MAX_SIZE;
60
- flag = true;
61
- break;
62
- case "fixed": {
63
- const fixedValue = values[0] || "max-content";
64
- styles[minStyle] = fixedValue;
65
- styles[name] = fixedValue;
66
- styles[maxStyle] = fixedValue;
67
- flag = true;
68
- break;
69
- }
70
- default: break;
71
- }
72
- if (!flag || !mods.length) if (values.length === 2) {
73
- styles[minStyle] = values[0];
74
- styles[maxStyle] = values[1];
75
- } else if (values.length === 3) {
76
- styles[minStyle] = values[0];
77
- styles[name] = values[1];
78
- styles[maxStyle] = values[2];
79
- } else styles[name] = values[0] || "auto";
80
- if (styles[name] === "stretch") if (name === "width") styles[name] = [
81
- "stretch",
82
- "-webkit-fill-available",
83
- "-moz-available"
84
- ];
85
- else styles[name] = "auto";
86
- }
87
- const minVal = parseDimensionValue(min);
88
- const maxVal = parseDimensionValue(max);
89
- if (minVal) styles[minStyle] = minVal;
90
- if (maxVal) styles[maxStyle] = maxVal;
91
- return styles;
92
- };
93
- }
94
-
95
- //#endregion
96
- export { dimensionStyle };
97
- //# sourceMappingURL=dimension.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dimension.js","names":[],"sources":["../../src/styles/dimension.ts"],"sourcesContent":["import { makeEmptyDetails } from '../parser/types';\nimport { parseStyle } from '../utils/styles';\n\nconst DEFAULT_MIN_SIZE = 'var(--gap)';\nconst DEFAULT_MAX_SIZE = '100%';\n\n/**\n * Parse a dimension value (string, number, or boolean) into a CSS value\n */\nfunction parseDimensionValue(\n val: string | number | boolean | undefined,\n): string | null {\n if (val == null) return null;\n if (typeof val === 'number') return `${val}px`;\n if (val === true) return 'initial';\n\n const processed = parseStyle(String(val));\n return processed.groups[0]?.values[0] || null;\n}\n\ninterface DimensionProps {\n value?: string | number | boolean;\n min?: string | number | boolean;\n max?: string | number | boolean;\n}\n\n/**\n * Creates a dimension style handler for width or height.\n *\n * Supports:\n * - Main dimension prop (width/height) with syntax for min/max\n * - Separate min/max props (minWidth/maxWidth or minHeight/maxHeight)\n *\n * Priority: Individual min/max props override values from main prop syntax\n */\nexport function dimensionStyle(name: 'width' | 'height') {\n const minStyle = `min-${name}`;\n const maxStyle = `max-${name}`;\n\n return ({ value, min, max }: DimensionProps) => {\n // If nothing is defined, return undefined\n if (value == null && min == null && max == null) return;\n\n // Handle boolean true on main value - reset all to initial\n if (value === true) {\n const styles: Record<string, string | string[]> = {\n [name]: 'auto',\n [minStyle]: 'initial',\n [maxStyle]: 'initial',\n };\n\n // Apply individual min/max overrides\n const minVal = parseDimensionValue(min);\n const maxVal = parseDimensionValue(max);\n if (minVal) styles[minStyle] = minVal;\n if (maxVal) styles[maxStyle] = maxVal;\n\n return styles;\n }\n\n const styles: Record<string, string | string[]> = {\n [name]: 'auto',\n [minStyle]: 'initial',\n [maxStyle]: 'initial',\n };\n\n // Process main dimension value\n if (value != null) {\n let val = value;\n if (typeof val === 'number') {\n val = `${val}px`;\n }\n\n val = String(val);\n\n const processed = parseStyle(val);\n const { mods, values } = processed.groups[0] ?? makeEmptyDetails();\n\n let flag = false;\n\n for (const mod of mods) {\n switch (mod) {\n case 'min':\n styles[minStyle] = values[0] || DEFAULT_MIN_SIZE;\n flag = true;\n break;\n case 'max':\n styles[maxStyle] = values[0] || DEFAULT_MAX_SIZE;\n flag = true;\n break;\n case 'fixed': {\n // Fixed modifier: set all three dimensions to the same value\n const fixedValue = values[0] || 'max-content';\n styles[minStyle] = fixedValue;\n styles[name] = fixedValue;\n styles[maxStyle] = fixedValue;\n flag = true;\n break;\n }\n default:\n break;\n }\n }\n\n if (!flag || !mods.length) {\n if (values.length === 2) {\n styles[minStyle] = values[0];\n styles[maxStyle] = values[1];\n } else if (values.length === 3) {\n styles[minStyle] = values[0];\n styles[name] = values[1];\n styles[maxStyle] = values[2];\n } else {\n styles[name] = values[0] || 'auto';\n }\n }\n\n if (styles[name] === 'stretch') {\n if (name === 'width') {\n styles[name] = [\n 'stretch',\n '-webkit-fill-available',\n '-moz-available',\n ];\n } else {\n styles[name] = 'auto';\n }\n }\n }\n\n // Apply individual min/max props (higher priority, override main prop syntax)\n const minVal = parseDimensionValue(min);\n const maxVal = parseDimensionValue(max);\n if (minVal) styles[minStyle] = minVal;\n if (maxVal) styles[maxStyle] = maxVal;\n\n return styles;\n };\n}\n"],"mappings":";;;;AAGA,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;;;;AAKzB,SAAS,oBACP,KACe;AACf,KAAI,OAAO,KAAM,QAAO;AACxB,KAAI,OAAO,QAAQ,SAAU,QAAO,GAAG,IAAI;AAC3C,KAAI,QAAQ,KAAM,QAAO;AAGzB,QADkB,WAAW,OAAO,IAAI,CAAC,CACxB,OAAO,IAAI,OAAO,MAAM;;;;;;;;;;;AAkB3C,SAAgB,eAAe,MAA0B;CACvD,MAAM,WAAW,OAAO;CACxB,MAAM,WAAW,OAAO;AAExB,SAAQ,EAAE,OAAO,KAAK,UAA0B;AAE9C,MAAI,SAAS,QAAQ,OAAO,QAAQ,OAAO,KAAM;AAGjD,MAAI,UAAU,MAAM;GAClB,MAAM,SAA4C;KAC/C,OAAO;KACP,WAAW;KACX,WAAW;IACb;GAGD,MAAM,SAAS,oBAAoB,IAAI;GACvC,MAAM,SAAS,oBAAoB,IAAI;AACvC,OAAI,OAAQ,QAAO,YAAY;AAC/B,OAAI,OAAQ,QAAO,YAAY;AAE/B,UAAO;;EAGT,MAAM,SAA4C;IAC/C,OAAO;IACP,WAAW;IACX,WAAW;GACb;AAGD,MAAI,SAAS,MAAM;GACjB,IAAI,MAAM;AACV,OAAI,OAAO,QAAQ,SACjB,OAAM,GAAG,IAAI;AAGf,SAAM,OAAO,IAAI;GAGjB,MAAM,EAAE,MAAM,WADI,WAAW,IAAI,CACE,OAAO,MAAM,kBAAkB;GAElE,IAAI,OAAO;AAEX,QAAK,MAAM,OAAO,KAChB,SAAQ,KAAR;IACE,KAAK;AACH,YAAO,YAAY,OAAO,MAAM;AAChC,YAAO;AACP;IACF,KAAK;AACH,YAAO,YAAY,OAAO,MAAM;AAChC,YAAO;AACP;IACF,KAAK,SAAS;KAEZ,MAAM,aAAa,OAAO,MAAM;AAChC,YAAO,YAAY;AACnB,YAAO,QAAQ;AACf,YAAO,YAAY;AACnB,YAAO;AACP;;IAEF,QACE;;AAIN,OAAI,CAAC,QAAQ,CAAC,KAAK,OACjB,KAAI,OAAO,WAAW,GAAG;AACvB,WAAO,YAAY,OAAO;AAC1B,WAAO,YAAY,OAAO;cACjB,OAAO,WAAW,GAAG;AAC9B,WAAO,YAAY,OAAO;AAC1B,WAAO,QAAQ,OAAO;AACtB,WAAO,YAAY,OAAO;SAE1B,QAAO,QAAQ,OAAO,MAAM;AAIhC,OAAI,OAAO,UAAU,UACnB,KAAI,SAAS,QACX,QAAO,QAAQ;IACb;IACA;IACA;IACD;OAED,QAAO,QAAQ;;EAMrB,MAAM,SAAS,oBAAoB,IAAI;EACvC,MAAM,SAAS,oBAAoB,IAAI;AACvC,MAAI,OAAQ,QAAO,YAAY;AAC/B,MAAI,OAAQ,QAAO,YAAY;AAE/B,SAAO"}