@tenphi/tasty 0.0.0-snapshot.275370e → 0.0.0-snapshot.27b6708

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 +175 -109
  2. package/dist/{ssr/async-storage.js → async-storage-DKK-wTD4.js} +2 -2
  3. package/dist/async-storage-DKK-wTD4.js.map +1 -0
  4. package/dist/babel-BUQGeOXA.d.ts +83 -0
  5. package/dist/{ssr/collector.js → collector-DTahQUiV.js} +97 -28
  6. package/dist/collector-DTahQUiV.js.map +1 -0
  7. package/dist/{ssr/collector.d.ts → collector-DUaHCcTS.d.ts} +54 -7
  8. package/dist/config-B5kHzuNz.js +12269 -0
  9. package/dist/config-B5kHzuNz.js.map +1 -0
  10. package/dist/config-YsxGv4tq.d.ts +1263 -0
  11. package/dist/{ssr/context.js → context-CA8YKeMn.js} +11 -3
  12. package/dist/context-CA8YKeMn.js.map +1 -0
  13. package/dist/core/index.d.ts +5 -34
  14. package/dist/core/index.js +6 -27
  15. package/dist/core-Dr4u1NVD.js +1566 -0
  16. package/dist/core-Dr4u1NVD.js.map +1 -0
  17. package/dist/{zero/extractor.js → css-writer-B-J87ncv.js} +148 -24
  18. package/dist/css-writer-B-J87ncv.js.map +1 -0
  19. package/dist/{ssr/format-global-rules.js → format-global-rules-DklyaXv-.js} +2 -2
  20. package/dist/format-global-rules-DklyaXv-.js.map +1 -0
  21. package/dist/{ssr/format-rules.js → format-rules-DKOA-6qu.js} +59 -2
  22. package/dist/format-rules-DKOA-6qu.js.map +1 -0
  23. package/dist/{ssr/hydrate.js → hydrate-OeMX99We.js} +3 -11
  24. package/dist/hydrate-OeMX99We.js.map +1 -0
  25. package/dist/index-Cd45t5NM.d.ts +1521 -0
  26. package/dist/index-PqN-DIpn.d.ts +1911 -0
  27. package/dist/index.d.ts +5 -51
  28. package/dist/index.js +922 -36
  29. package/dist/index.js.map +1 -0
  30. package/dist/keyframes-CV8azJf3.js +493 -0
  31. package/dist/keyframes-CV8azJf3.js.map +1 -0
  32. package/dist/{utils/merge-styles.d.ts → merge-styles-CU7JbEwg.d.ts} +3 -3
  33. package/dist/{utils/merge-styles.js → merge-styles-oklji0KB.js} +3 -4
  34. package/dist/merge-styles-oklji0KB.js.map +1 -0
  35. package/dist/{utils/resolve-recipes.js → resolve-recipes-DTG81rzl.js} +4 -6
  36. package/dist/resolve-recipes-DTG81rzl.js.map +1 -0
  37. package/dist/ssr/astro-client.js +1 -1
  38. package/dist/ssr/astro-client.js.map +1 -1
  39. package/dist/ssr/astro-middleware-static.d.ts +16 -0
  40. package/dist/ssr/astro-middleware-static.js +18 -0
  41. package/dist/ssr/astro-middleware-static.js.map +1 -0
  42. package/dist/ssr/astro-middleware.d.ts +8 -6
  43. package/dist/ssr/astro-middleware.js +10 -10
  44. package/dist/ssr/astro-middleware.js.map +1 -1
  45. package/dist/ssr/astro.d.ts +2 -17
  46. package/dist/ssr/astro.js +29 -21
  47. package/dist/ssr/astro.js.map +1 -1
  48. package/dist/ssr/index.d.ts +37 -4
  49. package/dist/ssr/index.js +5 -5
  50. package/dist/ssr/index.js.map +1 -1
  51. package/dist/ssr/next.d.ts +2 -3
  52. package/dist/ssr/next.js +7 -8
  53. package/dist/ssr/next.js.map +1 -1
  54. package/dist/static/index.d.ts +91 -5
  55. package/dist/static/index.js +49 -3
  56. package/dist/static/index.js.map +1 -0
  57. package/dist/static/inject.js.map +1 -1
  58. package/dist/zero/babel.d.ts +2 -81
  59. package/dist/zero/babel.js +45 -29
  60. package/dist/zero/babel.js.map +1 -1
  61. package/dist/zero/index.d.ts +81 -3
  62. package/dist/zero/index.js +2 -3
  63. package/dist/zero/next.d.ts +1 -1
  64. package/dist/zero/next.js +1 -1
  65. package/dist/zero/next.js.map +1 -1
  66. package/docs/README.md +13 -7
  67. package/docs/adoption.md +53 -28
  68. package/docs/ai-agents.md +224 -0
  69. package/docs/comparison.md +59 -30
  70. package/docs/configuration.md +498 -69
  71. package/docs/debug.md +18 -16
  72. package/docs/design-system.md +43 -24
  73. package/docs/dsl.md +510 -177
  74. package/docs/getting-started.md +55 -34
  75. package/docs/injector.md +60 -7
  76. package/docs/methodology.md +68 -36
  77. package/docs/migration-v3.md +285 -0
  78. package/docs/pipeline.md +741 -0
  79. package/docs/plugins.md +349 -0
  80. package/docs/react-api.md +162 -38
  81. package/docs/ssr.md +45 -35
  82. package/docs/styles.md +65 -16
  83. package/docs/tasty-static.md +25 -8
  84. package/package.json +44 -21
  85. package/tasty.config.ts +6 -0
  86. package/dist/_virtual/_rolldown/runtime.js +0 -7
  87. package/dist/chunks/cacheKey.d.ts +0 -1
  88. package/dist/chunks/cacheKey.js +0 -77
  89. package/dist/chunks/cacheKey.js.map +0 -1
  90. package/dist/chunks/definitions.d.ts +0 -37
  91. package/dist/chunks/definitions.js +0 -258
  92. package/dist/chunks/definitions.js.map +0 -1
  93. package/dist/chunks/index.d.ts +0 -1
  94. package/dist/chunks/renderChunk.d.ts +0 -1
  95. package/dist/chunks/renderChunk.js +0 -59
  96. package/dist/chunks/renderChunk.js.map +0 -1
  97. package/dist/compute-styles.d.ts +0 -31
  98. package/dist/compute-styles.js +0 -322
  99. package/dist/compute-styles.js.map +0 -1
  100. package/dist/config.d.ts +0 -407
  101. package/dist/config.js +0 -591
  102. package/dist/config.js.map +0 -1
  103. package/dist/counter-style/index.js +0 -51
  104. package/dist/counter-style/index.js.map +0 -1
  105. package/dist/debug.d.ts +0 -89
  106. package/dist/debug.js +0 -453
  107. package/dist/debug.js.map +0 -1
  108. package/dist/font-face/index.js +0 -63
  109. package/dist/font-face/index.js.map +0 -1
  110. package/dist/hooks/index.d.ts +0 -7
  111. package/dist/hooks/useCounterStyle.d.ts +0 -36
  112. package/dist/hooks/useCounterStyle.js +0 -65
  113. package/dist/hooks/useCounterStyle.js.map +0 -1
  114. package/dist/hooks/useFontFace.d.ts +0 -45
  115. package/dist/hooks/useFontFace.js +0 -66
  116. package/dist/hooks/useFontFace.js.map +0 -1
  117. package/dist/hooks/useGlobalStyles.d.ts +0 -46
  118. package/dist/hooks/useGlobalStyles.js +0 -88
  119. package/dist/hooks/useGlobalStyles.js.map +0 -1
  120. package/dist/hooks/useKeyframes.d.ts +0 -58
  121. package/dist/hooks/useKeyframes.js +0 -55
  122. package/dist/hooks/useKeyframes.js.map +0 -1
  123. package/dist/hooks/useProperty.d.ts +0 -81
  124. package/dist/hooks/useProperty.js +0 -96
  125. package/dist/hooks/useProperty.js.map +0 -1
  126. package/dist/hooks/useRawCSS.d.ts +0 -22
  127. package/dist/hooks/useRawCSS.js +0 -103
  128. package/dist/hooks/useRawCSS.js.map +0 -1
  129. package/dist/hooks/useStyles.d.ts +0 -40
  130. package/dist/hooks/useStyles.js +0 -31
  131. package/dist/hooks/useStyles.js.map +0 -1
  132. package/dist/injector/index.d.ts +0 -182
  133. package/dist/injector/index.js +0 -185
  134. package/dist/injector/index.js.map +0 -1
  135. package/dist/injector/injector.d.ts +0 -198
  136. package/dist/injector/injector.js +0 -651
  137. package/dist/injector/injector.js.map +0 -1
  138. package/dist/injector/sheet-manager.d.ts +0 -132
  139. package/dist/injector/sheet-manager.js +0 -699
  140. package/dist/injector/sheet-manager.js.map +0 -1
  141. package/dist/injector/types.d.ts +0 -235
  142. package/dist/keyframes/index.js +0 -206
  143. package/dist/keyframes/index.js.map +0 -1
  144. package/dist/parser/classify.js +0 -319
  145. package/dist/parser/classify.js.map +0 -1
  146. package/dist/parser/const.js +0 -60
  147. package/dist/parser/const.js.map +0 -1
  148. package/dist/parser/lru.js +0 -109
  149. package/dist/parser/lru.js.map +0 -1
  150. package/dist/parser/parser.d.ts +0 -25
  151. package/dist/parser/parser.js +0 -115
  152. package/dist/parser/parser.js.map +0 -1
  153. package/dist/parser/tokenizer.js +0 -69
  154. package/dist/parser/tokenizer.js.map +0 -1
  155. package/dist/parser/types.d.ts +0 -51
  156. package/dist/parser/types.js +0 -46
  157. package/dist/parser/types.js.map +0 -1
  158. package/dist/pipeline/conditions.d.ts +0 -134
  159. package/dist/pipeline/conditions.js +0 -406
  160. package/dist/pipeline/conditions.js.map +0 -1
  161. package/dist/pipeline/exclusive.js +0 -285
  162. package/dist/pipeline/exclusive.js.map +0 -1
  163. package/dist/pipeline/index.d.ts +0 -55
  164. package/dist/pipeline/index.js +0 -708
  165. package/dist/pipeline/index.js.map +0 -1
  166. package/dist/pipeline/materialize.js +0 -1157
  167. package/dist/pipeline/materialize.js.map +0 -1
  168. package/dist/pipeline/parseStateKey.d.ts +0 -15
  169. package/dist/pipeline/parseStateKey.js +0 -446
  170. package/dist/pipeline/parseStateKey.js.map +0 -1
  171. package/dist/pipeline/simplify.js +0 -690
  172. package/dist/pipeline/simplify.js.map +0 -1
  173. package/dist/pipeline/warnings.js +0 -18
  174. package/dist/pipeline/warnings.js.map +0 -1
  175. package/dist/plugins/index.d.ts +0 -2
  176. package/dist/plugins/okhsl-plugin.d.ts +0 -35
  177. package/dist/plugins/okhsl-plugin.js +0 -97
  178. package/dist/plugins/okhsl-plugin.js.map +0 -1
  179. package/dist/plugins/types.d.ts +0 -87
  180. package/dist/properties/index.js +0 -222
  181. package/dist/properties/index.js.map +0 -1
  182. package/dist/properties/property-type-resolver.d.ts +0 -24
  183. package/dist/properties/property-type-resolver.js +0 -90
  184. package/dist/properties/property-type-resolver.js.map +0 -1
  185. package/dist/rsc-cache.js +0 -79
  186. package/dist/rsc-cache.js.map +0 -1
  187. package/dist/ssr/async-storage.d.ts +0 -17
  188. package/dist/ssr/async-storage.js.map +0 -1
  189. package/dist/ssr/collect-auto-properties.js +0 -58
  190. package/dist/ssr/collect-auto-properties.js.map +0 -1
  191. package/dist/ssr/collector.js.map +0 -1
  192. package/dist/ssr/context.js.map +0 -1
  193. package/dist/ssr/format-global-rules.js.map +0 -1
  194. package/dist/ssr/format-keyframes.js +0 -69
  195. package/dist/ssr/format-keyframes.js.map +0 -1
  196. package/dist/ssr/format-property.js +0 -49
  197. package/dist/ssr/format-property.js.map +0 -1
  198. package/dist/ssr/format-rules.js.map +0 -1
  199. package/dist/ssr/hydrate.d.ts +0 -29
  200. package/dist/ssr/hydrate.js.map +0 -1
  201. package/dist/ssr/ssr-collector-ref.js +0 -29
  202. package/dist/ssr/ssr-collector-ref.js.map +0 -1
  203. package/dist/states/index.d.ts +0 -49
  204. package/dist/states/index.js +0 -170
  205. package/dist/states/index.js.map +0 -1
  206. package/dist/static/tastyStatic.d.ts +0 -46
  207. package/dist/static/tastyStatic.js +0 -30
  208. package/dist/static/tastyStatic.js.map +0 -1
  209. package/dist/static/types.d.ts +0 -49
  210. package/dist/static/types.js +0 -24
  211. package/dist/static/types.js.map +0 -1
  212. package/dist/styles/border.d.ts +0 -25
  213. package/dist/styles/border.js +0 -120
  214. package/dist/styles/border.js.map +0 -1
  215. package/dist/styles/color.d.ts +0 -14
  216. package/dist/styles/color.js +0 -26
  217. package/dist/styles/color.js.map +0 -1
  218. package/dist/styles/const.js +0 -17
  219. package/dist/styles/const.js.map +0 -1
  220. package/dist/styles/createStyle.js +0 -79
  221. package/dist/styles/createStyle.js.map +0 -1
  222. package/dist/styles/dimension.js +0 -109
  223. package/dist/styles/dimension.js.map +0 -1
  224. package/dist/styles/directional.js +0 -133
  225. package/dist/styles/directional.js.map +0 -1
  226. package/dist/styles/display.d.ts +0 -30
  227. package/dist/styles/display.js +0 -73
  228. package/dist/styles/display.js.map +0 -1
  229. package/dist/styles/fade.d.ts +0 -15
  230. package/dist/styles/fade.js +0 -62
  231. package/dist/styles/fade.js.map +0 -1
  232. package/dist/styles/fill.d.ts +0 -42
  233. package/dist/styles/fill.js +0 -51
  234. package/dist/styles/fill.js.map +0 -1
  235. package/dist/styles/flow.d.ts +0 -16
  236. package/dist/styles/flow.js +0 -12
  237. package/dist/styles/flow.js.map +0 -1
  238. package/dist/styles/gap.d.ts +0 -31
  239. package/dist/styles/gap.js +0 -38
  240. package/dist/styles/gap.js.map +0 -1
  241. package/dist/styles/height.d.ts +0 -17
  242. package/dist/styles/height.js +0 -19
  243. package/dist/styles/height.js.map +0 -1
  244. package/dist/styles/index.d.ts +0 -1
  245. package/dist/styles/index.js +0 -8
  246. package/dist/styles/index.js.map +0 -1
  247. package/dist/styles/inset.d.ts +0 -24
  248. package/dist/styles/inset.js +0 -34
  249. package/dist/styles/inset.js.map +0 -1
  250. package/dist/styles/list.d.ts +0 -16
  251. package/dist/styles/list.js +0 -100
  252. package/dist/styles/list.js.map +0 -1
  253. package/dist/styles/margin.d.ts +0 -24
  254. package/dist/styles/margin.js +0 -32
  255. package/dist/styles/margin.js.map +0 -1
  256. package/dist/styles/outline.d.ts +0 -29
  257. package/dist/styles/outline.js +0 -55
  258. package/dist/styles/outline.js.map +0 -1
  259. package/dist/styles/padding.d.ts +0 -24
  260. package/dist/styles/padding.js +0 -32
  261. package/dist/styles/padding.js.map +0 -1
  262. package/dist/styles/placement.d.ts +0 -37
  263. package/dist/styles/placement.js +0 -74
  264. package/dist/styles/placement.js.map +0 -1
  265. package/dist/styles/predefined.d.ts +0 -71
  266. package/dist/styles/predefined.js +0 -237
  267. package/dist/styles/predefined.js.map +0 -1
  268. package/dist/styles/preset.d.ts +0 -52
  269. package/dist/styles/preset.js +0 -127
  270. package/dist/styles/preset.js.map +0 -1
  271. package/dist/styles/radius.d.ts +0 -12
  272. package/dist/styles/radius.js +0 -83
  273. package/dist/styles/radius.js.map +0 -1
  274. package/dist/styles/scrollMargin.d.ts +0 -24
  275. package/dist/styles/scrollMargin.js +0 -32
  276. package/dist/styles/scrollMargin.js.map +0 -1
  277. package/dist/styles/scrollbar.d.ts +0 -25
  278. package/dist/styles/scrollbar.js +0 -51
  279. package/dist/styles/scrollbar.js.map +0 -1
  280. package/dist/styles/shadow.d.ts +0 -14
  281. package/dist/styles/shadow.js +0 -25
  282. package/dist/styles/shadow.js.map +0 -1
  283. package/dist/styles/shared.js +0 -17
  284. package/dist/styles/shared.js.map +0 -1
  285. package/dist/styles/transition.d.ts +0 -14
  286. package/dist/styles/transition.js +0 -159
  287. package/dist/styles/transition.js.map +0 -1
  288. package/dist/styles/types.d.ts +0 -564
  289. package/dist/styles/width.d.ts +0 -17
  290. package/dist/styles/width.js +0 -19
  291. package/dist/styles/width.js.map +0 -1
  292. package/dist/tasty.d.ts +0 -134
  293. package/dist/tasty.js +0 -248
  294. package/dist/tasty.js.map +0 -1
  295. package/dist/types.d.ts +0 -184
  296. package/dist/utils/cache-wrapper.js +0 -21
  297. package/dist/utils/cache-wrapper.js.map +0 -1
  298. package/dist/utils/case-converter.js +0 -8
  299. package/dist/utils/case-converter.js.map +0 -1
  300. package/dist/utils/color-math.d.ts +0 -46
  301. package/dist/utils/color-math.js +0 -749
  302. package/dist/utils/color-math.js.map +0 -1
  303. package/dist/utils/color-space.d.ts +0 -5
  304. package/dist/utils/color-space.js +0 -228
  305. package/dist/utils/color-space.js.map +0 -1
  306. package/dist/utils/colors.d.ts +0 -5
  307. package/dist/utils/colors.js +0 -10
  308. package/dist/utils/colors.js.map +0 -1
  309. package/dist/utils/css-types.d.ts +0 -7
  310. package/dist/utils/deps-equal.js +0 -15
  311. package/dist/utils/deps-equal.js.map +0 -1
  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/hash.js +0 -14
  324. package/dist/utils/hash.js.map +0 -1
  325. package/dist/utils/is-dev-env.js +0 -19
  326. package/dist/utils/is-dev-env.js.map +0 -1
  327. package/dist/utils/is-valid-element-type.js +0 -15
  328. package/dist/utils/is-valid-element-type.js.map +0 -1
  329. package/dist/utils/merge-styles.js.map +0 -1
  330. package/dist/utils/mod-attrs.d.ts +0 -6
  331. package/dist/utils/mod-attrs.js +0 -20
  332. package/dist/utils/mod-attrs.js.map +0 -1
  333. package/dist/utils/process-tokens.d.ts +0 -17
  334. package/dist/utils/process-tokens.js +0 -83
  335. package/dist/utils/process-tokens.js.map +0 -1
  336. package/dist/utils/resolve-recipes.d.ts +0 -17
  337. package/dist/utils/resolve-recipes.js.map +0 -1
  338. package/dist/utils/selector-transform.js +0 -32
  339. package/dist/utils/selector-transform.js.map +0 -1
  340. package/dist/utils/string.js +0 -8
  341. package/dist/utils/string.js.map +0 -1
  342. package/dist/utils/styles.d.ts +0 -99
  343. package/dist/utils/styles.js +0 -220
  344. package/dist/utils/styles.js.map +0 -1
  345. package/dist/utils/typography.d.ts +0 -58
  346. package/dist/utils/typography.js +0 -51
  347. package/dist/utils/typography.js.map +0 -1
  348. package/dist/utils/warnings.d.ts +0 -16
  349. package/dist/utils/warnings.js +0 -16
  350. package/dist/utils/warnings.js.map +0 -1
  351. package/dist/zero/css-writer.d.ts +0 -45
  352. package/dist/zero/css-writer.js +0 -73
  353. package/dist/zero/css-writer.js.map +0 -1
  354. package/dist/zero/extractor.d.ts +0 -24
  355. package/dist/zero/extractor.js.map +0 -1
  356. package/docs/PIPELINE.md +0 -519
@@ -1,42 +0,0 @@
1
- //#region src/styles/fill.d.ts
2
- declare function fillStyle({
3
- fill,
4
- backgroundColor,
5
- image,
6
- backgroundImage,
7
- backgroundPosition,
8
- backgroundSize,
9
- backgroundRepeat,
10
- backgroundAttachment,
11
- backgroundOrigin,
12
- backgroundClip,
13
- background
14
- }: {
15
- fill?: string;
16
- backgroundColor?: string;
17
- image?: string;
18
- backgroundImage?: string;
19
- backgroundPosition?: string;
20
- backgroundSize?: string;
21
- backgroundRepeat?: string;
22
- backgroundAttachment?: string;
23
- backgroundOrigin?: string;
24
- backgroundClip?: string;
25
- background?: string;
26
- }): Record<string, string> | null;
27
- declare namespace fillStyle {
28
- var __lookupStyles: string[];
29
- }
30
- declare function svgFillStyle({
31
- svgFill
32
- }: {
33
- svgFill?: string;
34
- }): {
35
- fill: string;
36
- } | null;
37
- declare namespace svgFillStyle {
38
- var __lookupStyles: string[];
39
- }
40
- //#endregion
41
- export { fillStyle, svgFillStyle };
42
- //# sourceMappingURL=fill.d.ts.map
@@ -1,51 +0,0 @@
1
- import { parseStyle } from "../utils/styles.js";
2
- //#region src/styles/fill.ts
3
- function fillStyle({ fill, backgroundColor, image, backgroundImage, backgroundPosition, backgroundSize, backgroundRepeat, backgroundAttachment, backgroundOrigin, backgroundClip, background }) {
4
- if (background) return { background: parseStyle(background).output || background };
5
- const result = {};
6
- const colorValue = backgroundColor ?? fill;
7
- if (colorValue) {
8
- const parsed = parseStyle(colorValue);
9
- const firstColor = parsed.groups[0]?.colors[0];
10
- const secondColor = parsed.groups[0]?.colors[1];
11
- result["background-color"] = firstColor || colorValue;
12
- if (secondColor) result["--tasty-second-fill-color"] = secondColor;
13
- }
14
- const gradientLayer = result["--tasty-second-fill-color"] ? "linear-gradient(var(--tasty-second-fill-color), var(--tasty-second-fill-color))" : null;
15
- const imageValue = backgroundImage ?? image;
16
- if (imageValue) {
17
- const imgCss = parseStyle(imageValue).output || imageValue;
18
- result["background-image"] = gradientLayer ? `${imgCss}, ${gradientLayer}` : imgCss;
19
- } else if (gradientLayer) result["background-image"] = gradientLayer;
20
- if (backgroundPosition) result["background-position"] = parseStyle(backgroundPosition).output || backgroundPosition;
21
- if (backgroundSize) result["background-size"] = parseStyle(backgroundSize).output || backgroundSize;
22
- if (backgroundRepeat) result["background-repeat"] = backgroundRepeat;
23
- if (backgroundAttachment) result["background-attachment"] = backgroundAttachment;
24
- if (backgroundOrigin) result["background-origin"] = backgroundOrigin;
25
- if (backgroundClip) result["background-clip"] = backgroundClip;
26
- if (Object.keys(result).length === 0) return null;
27
- return result;
28
- }
29
- fillStyle.__lookupStyles = [
30
- "fill",
31
- "backgroundColor",
32
- "image",
33
- "backgroundImage",
34
- "backgroundPosition",
35
- "backgroundSize",
36
- "backgroundRepeat",
37
- "backgroundAttachment",
38
- "backgroundOrigin",
39
- "backgroundClip",
40
- "background"
41
- ];
42
- function svgFillStyle({ svgFill }) {
43
- if (!svgFill) return null;
44
- svgFill = parseStyle(svgFill).groups[0]?.colors[0] || svgFill;
45
- return { fill: svgFill };
46
- }
47
- svgFillStyle.__lookupStyles = ["svgFill"];
48
- //#endregion
49
- export { fillStyle, svgFillStyle };
50
-
51
- //# sourceMappingURL=fill.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fill.js","names":[],"sources":["../../src/styles/fill.ts"],"sourcesContent":["import { parseStyle } from '../utils/styles';\n\nexport function fillStyle({\n fill,\n backgroundColor,\n image,\n backgroundImage,\n backgroundPosition,\n backgroundSize,\n backgroundRepeat,\n backgroundAttachment,\n backgroundOrigin,\n backgroundClip,\n background,\n}: {\n fill?: string;\n backgroundColor?: string;\n image?: string;\n backgroundImage?: string;\n backgroundPosition?: string;\n backgroundSize?: string;\n backgroundRepeat?: string;\n backgroundAttachment?: string;\n backgroundOrigin?: string;\n backgroundClip?: string;\n background?: string;\n}) {\n // If background is set, it overrides everything\n if (background) {\n const processed = parseStyle(background);\n return { background: processed.output || background };\n }\n\n const result: Record<string, string> = {};\n\n // Priority: backgroundColor > fill\n const colorValue = backgroundColor ?? fill;\n if (colorValue) {\n const parsed = parseStyle(colorValue);\n const firstColor = parsed.groups[0]?.colors[0];\n const secondColor = parsed.groups[0]?.colors[1];\n\n result['background-color'] = firstColor || colorValue;\n\n if (secondColor) {\n result['--tasty-second-fill-color'] = secondColor;\n }\n }\n\n const gradientLayer = result['--tasty-second-fill-color']\n ? 'linear-gradient(var(--tasty-second-fill-color), var(--tasty-second-fill-color))'\n : null;\n\n // Priority: backgroundImage > image\n const imageValue = backgroundImage ?? image;\n if (imageValue) {\n const parsed = parseStyle(imageValue);\n const imgCss = parsed.output || imageValue;\n\n result['background-image'] = gradientLayer\n ? `${imgCss}, ${gradientLayer}`\n : imgCss;\n } else if (gradientLayer) {\n result['background-image'] = gradientLayer;\n }\n\n // Other background properties (pass through with parseStyle for token support)\n if (backgroundPosition) {\n result['background-position'] =\n parseStyle(backgroundPosition).output || backgroundPosition;\n }\n if (backgroundSize) {\n result['background-size'] =\n parseStyle(backgroundSize).output || backgroundSize;\n }\n if (backgroundRepeat) {\n result['background-repeat'] = backgroundRepeat;\n }\n if (backgroundAttachment) {\n result['background-attachment'] = backgroundAttachment;\n }\n if (backgroundOrigin) {\n result['background-origin'] = backgroundOrigin;\n }\n if (backgroundClip) {\n result['background-clip'] = backgroundClip;\n }\n\n if (Object.keys(result).length === 0) return null;\n return result;\n}\n\nfillStyle.__lookupStyles = [\n 'fill',\n 'backgroundColor',\n 'image',\n 'backgroundImage',\n 'backgroundPosition',\n 'backgroundSize',\n 'backgroundRepeat',\n 'backgroundAttachment',\n 'backgroundOrigin',\n 'backgroundClip',\n 'background',\n];\n\nexport function svgFillStyle({ svgFill }: { svgFill?: string }) {\n if (!svgFill) return null;\n\n const processed = parseStyle(svgFill);\n svgFill = processed.groups[0]?.colors[0] || svgFill;\n\n return { fill: svgFill };\n}\n\nsvgFillStyle.__lookupStyles = ['svgFill'];\n"],"mappings":";;AAEA,SAAgB,UAAU,EACxB,MACA,iBACA,OACA,iBACA,oBACA,gBACA,kBACA,sBACA,kBACA,gBACA,cAaC;AAED,KAAI,WAEF,QAAO,EAAE,YADS,WAAW,WAAW,CACT,UAAU,YAAY;CAGvD,MAAM,SAAiC,EAAE;CAGzC,MAAM,aAAa,mBAAmB;AACtC,KAAI,YAAY;EACd,MAAM,SAAS,WAAW,WAAW;EACrC,MAAM,aAAa,OAAO,OAAO,IAAI,OAAO;EAC5C,MAAM,cAAc,OAAO,OAAO,IAAI,OAAO;AAE7C,SAAO,sBAAsB,cAAc;AAE3C,MAAI,YACF,QAAO,+BAA+B;;CAI1C,MAAM,gBAAgB,OAAO,+BACzB,oFACA;CAGJ,MAAM,aAAa,mBAAmB;AACtC,KAAI,YAAY;EAEd,MAAM,SADS,WAAW,WAAW,CACf,UAAU;AAEhC,SAAO,sBAAsB,gBACzB,GAAG,OAAO,IAAI,kBACd;YACK,cACT,QAAO,sBAAsB;AAI/B,KAAI,mBACF,QAAO,yBACL,WAAW,mBAAmB,CAAC,UAAU;AAE7C,KAAI,eACF,QAAO,qBACL,WAAW,eAAe,CAAC,UAAU;AAEzC,KAAI,iBACF,QAAO,uBAAuB;AAEhC,KAAI,qBACF,QAAO,2BAA2B;AAEpC,KAAI,iBACF,QAAO,uBAAuB;AAEhC,KAAI,eACF,QAAO,qBAAqB;AAG9B,KAAI,OAAO,KAAK,OAAO,CAAC,WAAW,EAAG,QAAO;AAC7C,QAAO;;AAGT,UAAU,iBAAiB;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,SAAgB,aAAa,EAAE,WAAiC;AAC9D,KAAI,CAAC,QAAS,QAAO;AAGrB,WADkB,WAAW,QAAQ,CACjB,OAAO,IAAI,OAAO,MAAM;AAE5C,QAAO,EAAE,MAAM,SAAS;;AAG1B,aAAa,iBAAiB,CAAC,UAAU"}
@@ -1,16 +0,0 @@
1
- //#region src/styles/flow.d.ts
2
- declare function flowStyle({
3
- display,
4
- flow
5
- }: {
6
- display?: string;
7
- flow?: string;
8
- }): {
9
- [x: string]: string | undefined;
10
- } | null;
11
- declare namespace flowStyle {
12
- var __lookupStyles: string[];
13
- }
14
- //#endregion
15
- export { flowStyle };
16
- //# sourceMappingURL=flow.d.ts.map
@@ -1,12 +0,0 @@
1
- //#region src/styles/flow.ts
2
- function flowStyle({ display = "block", flow }) {
3
- let style;
4
- if (display.includes("grid")) style = "grid-auto-flow";
5
- else if (display.includes("flex")) style = "flex-flow";
6
- return style ? { [style]: flow } : null;
7
- }
8
- flowStyle.__lookupStyles = ["display", "flow"];
9
- //#endregion
10
- export { flowStyle };
11
-
12
- //# sourceMappingURL=flow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flow.js","names":[],"sources":["../../src/styles/flow.ts"],"sourcesContent":["export function flowStyle({\n display = 'block',\n flow,\n}: {\n display?: string;\n flow?: string;\n}) {\n let style;\n\n if (display.includes('grid')) {\n style = 'grid-auto-flow';\n } else if (display.includes('flex')) {\n style = 'flex-flow';\n }\n\n return style ? { [style]: flow } : null;\n}\n\nflowStyle.__lookupStyles = ['display', 'flow'];\n"],"mappings":";AAAA,SAAgB,UAAU,EACxB,UAAU,SACV,QAIC;CACD,IAAI;AAEJ,KAAI,QAAQ,SAAS,OAAO,CAC1B,SAAQ;UACC,QAAQ,SAAS,OAAO,CACjC,SAAQ;AAGV,QAAO,QAAQ,GAAG,QAAQ,MAAM,GAAG;;AAGrC,UAAU,iBAAiB,CAAC,WAAW,OAAO"}
@@ -1,31 +0,0 @@
1
- //#region src/styles/gap.d.ts
2
- declare function gapStyle({
3
- display,
4
- flow,
5
- gap
6
- }: {
7
- display?: string;
8
- flow?: string;
9
- gap?: string | number | boolean;
10
- }): {
11
- gap: string;
12
- $?: undefined;
13
- } | ({
14
- 'margin-right': string;
15
- 'margin-bottom': string;
16
- $?: undefined;
17
- } | {
18
- $: string;
19
- 'margin-right': string;
20
- 'margin-bottom': string;
21
- })[] | {
22
- [x: string]: string;
23
- $: string;
24
- gap?: undefined;
25
- } | null;
26
- declare namespace gapStyle {
27
- var __lookupStyles: string[];
28
- }
29
- //#endregion
30
- export { gapStyle };
31
- //# sourceMappingURL=gap.d.ts.map
@@ -1,38 +0,0 @@
1
- import { CSS_WIDE_KEYWORDS } from "../parser/const.js";
2
- import { makeEmptyDetails } from "../parser/types.js";
3
- import { parseStyle } from "../utils/styles.js";
4
- //#region src/styles/gap.ts
5
- function gapStyle({ display = "block", flow, gap }) {
6
- if (typeof gap === "number") gap = `${gap}px`;
7
- if (!gap) return null;
8
- if (gap === true) gap = "1x";
9
- if (CSS_WIDE_KEYWORDS.has(String(gap))) return { gap: String(gap) };
10
- const isGrid = display.includes("grid");
11
- const isFlex = display.includes("flex");
12
- const isWrap = flow ? flow.includes("wrap") && !flow.includes("nowrap") : false;
13
- if (!isGrid && flow == null) flow = isFlex ? "row" : "column";
14
- const { values } = parseStyle(gap).groups[0] ?? makeEmptyDetails();
15
- gap = values.join(" ");
16
- if (isGrid || isFlex) return { gap };
17
- const gapDir = flow?.includes("row") ? "right" : "bottom";
18
- return isWrap ? [{
19
- "margin-right": `calc(-1 * ${values[1] || values[0]})`,
20
- "margin-bottom": `calc(-1 * ${values[0]})`
21
- }, {
22
- $: "& > *",
23
- "margin-right": values[1] || values[0],
24
- "margin-bottom": values[0]
25
- }] : {
26
- $: "& > *:not(:last-child)",
27
- [`margin-${gapDir}`]: gap
28
- };
29
- }
30
- gapStyle.__lookupStyles = [
31
- "display",
32
- "flow",
33
- "gap"
34
- ];
35
- //#endregion
36
- export { gapStyle };
37
-
38
- //# sourceMappingURL=gap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gap.js","names":[],"sources":["../../src/styles/gap.ts"],"sourcesContent":["import { CSS_WIDE_KEYWORDS } from '../parser/const';\nimport { makeEmptyDetails } from '../parser/types';\nimport { parseStyle } from '../utils/styles';\n\nexport function gapStyle({\n display = 'block',\n flow,\n gap,\n}: {\n display?: string;\n flow?: string;\n gap?: string | number | boolean;\n}) {\n if (typeof gap === 'number') {\n gap = `${gap}px`;\n }\n\n if (!gap) {\n return null;\n }\n\n if (gap === true) {\n gap = '1x';\n }\n\n if (CSS_WIDE_KEYWORDS.has(String(gap))) {\n return { gap: String(gap) };\n }\n\n const isGrid = display.includes('grid');\n const isFlex = display.includes('flex');\n const isWrap = flow\n ? flow.includes('wrap') && !flow.includes('nowrap')\n : false;\n\n if (!isGrid && flow == null) {\n flow = isFlex ? 'row' : 'column';\n }\n\n const processed = parseStyle(gap);\n const { values } = processed.groups[0] ?? makeEmptyDetails();\n\n gap = values.join(' ');\n\n if (isGrid || isFlex) {\n return { gap };\n }\n\n const gapDir = flow?.includes('row') ? 'right' : 'bottom';\n\n return isWrap\n ? [\n {\n 'margin-right': `calc(-1 * ${values[1] || values[0]})`,\n 'margin-bottom': `calc(-1 * ${values[0]})`,\n },\n {\n $: '& > *',\n 'margin-right': values[1] || values[0],\n 'margin-bottom': values[0],\n },\n ]\n : {\n $: '& > *:not(:last-child)',\n [`margin-${gapDir}`]: gap,\n };\n}\n\ngapStyle.__lookupStyles = ['display', 'flow', 'gap'];\n"],"mappings":";;;;AAIA,SAAgB,SAAS,EACvB,UAAU,SACV,MACA,OAKC;AACD,KAAI,OAAO,QAAQ,SACjB,OAAM,GAAG,IAAI;AAGf,KAAI,CAAC,IACH,QAAO;AAGT,KAAI,QAAQ,KACV,OAAM;AAGR,KAAI,kBAAkB,IAAI,OAAO,IAAI,CAAC,CACpC,QAAO,EAAE,KAAK,OAAO,IAAI,EAAE;CAG7B,MAAM,SAAS,QAAQ,SAAS,OAAO;CACvC,MAAM,SAAS,QAAQ,SAAS,OAAO;CACvC,MAAM,SAAS,OACX,KAAK,SAAS,OAAO,IAAI,CAAC,KAAK,SAAS,SAAS,GACjD;AAEJ,KAAI,CAAC,UAAU,QAAQ,KACrB,QAAO,SAAS,QAAQ;CAI1B,MAAM,EAAE,WADU,WAAW,IAAI,CACJ,OAAO,MAAM,kBAAkB;AAE5D,OAAM,OAAO,KAAK,IAAI;AAEtB,KAAI,UAAU,OACZ,QAAO,EAAE,KAAK;CAGhB,MAAM,SAAS,MAAM,SAAS,MAAM,GAAG,UAAU;AAEjD,QAAO,SACH,CACE;EACE,gBAAgB,aAAa,OAAO,MAAM,OAAO,GAAG;EACpD,iBAAiB,aAAa,OAAO,GAAG;EACzC,EACD;EACE,GAAG;EACH,gBAAgB,OAAO,MAAM,OAAO;EACpC,iBAAiB,OAAO;EACzB,CACF,GACD;EACE,GAAG;GACF,UAAU,WAAW;EACvB;;AAGP,SAAS,iBAAiB;CAAC;CAAW;CAAQ;CAAM"}
@@ -1,17 +0,0 @@
1
- //#region src/styles/height.d.ts
2
- interface HeightStyleProps {
3
- height?: string | number | boolean;
4
- minHeight?: string | number | boolean;
5
- maxHeight?: string | number | boolean;
6
- }
7
- declare function heightStyle({
8
- height,
9
- minHeight,
10
- maxHeight
11
- }: HeightStyleProps): Record<string, string | string[]> | null;
12
- declare namespace heightStyle {
13
- var __lookupStyles: string[];
14
- }
15
- //#endregion
16
- export { heightStyle };
17
- //# sourceMappingURL=height.d.ts.map
@@ -1,19 +0,0 @@
1
- import { dimensionStyle } from "./dimension.js";
2
- //#region src/styles/height.ts
3
- const dimension = dimensionStyle("height");
4
- function heightStyle({ height, minHeight, maxHeight }) {
5
- return dimension({
6
- value: height,
7
- min: minHeight,
8
- max: maxHeight
9
- });
10
- }
11
- heightStyle.__lookupStyles = [
12
- "height",
13
- "minHeight",
14
- "maxHeight"
15
- ];
16
- //#endregion
17
- export { heightStyle };
18
-
19
- //# sourceMappingURL=height.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"height.js","names":[],"sources":["../../src/styles/height.ts"],"sourcesContent":["import { dimensionStyle } from './dimension';\n\nconst dimension = dimensionStyle('height');\n\ninterface HeightStyleProps {\n height?: string | number | boolean;\n minHeight?: string | number | boolean;\n maxHeight?: string | number | boolean;\n}\n\nexport function heightStyle({\n height,\n minHeight,\n maxHeight,\n}: HeightStyleProps) {\n return dimension({ value: height, min: minHeight, max: maxHeight });\n}\n\nheightStyle.__lookupStyles = ['height', 'minHeight', 'maxHeight'];\n"],"mappings":";;AAEA,MAAM,YAAY,eAAe,SAAS;AAQ1C,SAAgB,YAAY,EAC1B,QACA,WACA,aACmB;AACnB,QAAO,UAAU;EAAE,OAAO;EAAQ,KAAK;EAAW,KAAK;EAAW,CAAC;;AAGrE,YAAY,iBAAiB;CAAC;CAAU;CAAa;CAAY"}
@@ -1 +0,0 @@
1
- import { styleHandlers } from "./predefined.js";
@@ -1,8 +0,0 @@
1
- import "./createStyle.js";
2
- import { predefine } from "./predefined.js";
3
- //#region src/styles/index.ts
4
- const { STYLE_HANDLER_MAP, defineCustomStyle, defineStyleAlias } = predefine();
5
- //#endregion
6
- export { STYLE_HANDLER_MAP };
7
-
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/styles/index.ts"],"sourcesContent":["import { predefine, styleHandlers } from './predefined';\n\nconst { STYLE_HANDLER_MAP, defineCustomStyle, defineStyleAlias } = predefine();\n\nexport {\n STYLE_HANDLER_MAP,\n defineCustomStyle,\n defineStyleAlias,\n styleHandlers,\n};\nexport * from './createStyle';\nexport {\n normalizeHandlerDefinition,\n registerHandler,\n resetHandlers,\n validateHandlerResult,\n} from './predefined';\n"],"mappings":";;;AAEA,MAAM,EAAE,mBAAmB,mBAAmB,qBAAqB,WAAW"}
@@ -1,24 +0,0 @@
1
- //#region src/styles/inset.d.ts
2
- declare function insetStyle({
3
- inset,
4
- insetBlock,
5
- insetInline,
6
- top,
7
- right,
8
- bottom,
9
- left
10
- }: {
11
- inset?: string | number | boolean;
12
- insetBlock?: string | number | boolean;
13
- insetInline?: string | number | boolean;
14
- top?: string | number | boolean;
15
- right?: string | number | boolean;
16
- bottom?: string | number | boolean;
17
- left?: string | number | boolean;
18
- }): Record<string, string> | null;
19
- declare namespace insetStyle {
20
- var __lookupStyles: string[];
21
- }
22
- //#endregion
23
- export { insetStyle };
24
- //# sourceMappingURL=inset.d.ts.map
@@ -1,34 +0,0 @@
1
- import { processDirectionalStyle } from "./directional.js";
2
- //#region src/styles/inset.ts
3
- const INSET_CONFIG = {
4
- property: "inset",
5
- defaultValue: "0",
6
- trueValue: "0",
7
- defaultInit: "auto",
8
- individualOnly: true,
9
- directionProperty: (dir) => dir
10
- };
11
- function insetStyle({ inset, insetBlock, insetInline, top, right, bottom, left }) {
12
- return processDirectionalStyle(INSET_CONFIG, {
13
- main: inset,
14
- block: insetBlock,
15
- inline: insetInline,
16
- top,
17
- right,
18
- bottom,
19
- left
20
- });
21
- }
22
- insetStyle.__lookupStyles = [
23
- "inset",
24
- "insetBlock",
25
- "insetInline",
26
- "top",
27
- "right",
28
- "bottom",
29
- "left"
30
- ];
31
- //#endregion
32
- export { insetStyle };
33
-
34
- //# sourceMappingURL=inset.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inset.js","names":[],"sources":["../../src/styles/inset.ts"],"sourcesContent":["import { type DirectionalConfig, processDirectionalStyle } from './directional';\n\nconst INSET_CONFIG: DirectionalConfig = {\n property: 'inset',\n defaultValue: '0',\n trueValue: '0',\n defaultInit: 'auto',\n individualOnly: true,\n directionProperty: (dir) => dir,\n};\n\nexport function insetStyle({\n inset,\n insetBlock,\n insetInline,\n top,\n right,\n bottom,\n left,\n}: {\n inset?: string | number | boolean;\n insetBlock?: string | number | boolean;\n insetInline?: string | number | boolean;\n top?: string | number | boolean;\n right?: string | number | boolean;\n bottom?: string | number | boolean;\n left?: string | number | boolean;\n}) {\n return processDirectionalStyle(INSET_CONFIG, {\n main: inset,\n block: insetBlock,\n inline: insetInline,\n top,\n right,\n bottom,\n left,\n });\n}\n\ninsetStyle.__lookupStyles = [\n 'inset',\n 'insetBlock',\n 'insetInline',\n 'top',\n 'right',\n 'bottom',\n 'left',\n];\n"],"mappings":";;AAEA,MAAM,eAAkC;CACtC,UAAU;CACV,cAAc;CACd,WAAW;CACX,aAAa;CACb,gBAAgB;CAChB,oBAAoB,QAAQ;CAC7B;AAED,SAAgB,WAAW,EACzB,OACA,YACA,aACA,KACA,OACA,QACA,QASC;AACD,QAAO,wBAAwB,cAAc;EAC3C,MAAM;EACN,OAAO;EACP,QAAQ;EACR;EACA;EACA;EACA;EACD,CAAC;;AAGJ,WAAW,iBAAiB;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
@@ -1,16 +0,0 @@
1
- //#region src/styles/list.d.ts
2
- declare const BASE_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition"];
3
- declare const POSITION_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin"];
4
- declare const BLOCK_INNER_STYLES: readonly ["padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign"];
5
- declare const BLOCK_OUTER_STYLES: readonly ["border", "radius", "shadow", "outline"];
6
- declare const BLOCK_STYLES: readonly ["padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign", "border", "radius", "shadow", "outline"];
7
- declare const COLOR_STYLES: readonly ["color", "fill", "fade", "image"];
8
- declare const TEXT_STYLES: readonly ["textTransform", "fontWeight", "fontStyle"];
9
- declare const DIMENSION_STYLES: readonly ["width", "height", "flexBasis", "flexGrow", "flexShrink", "flex"];
10
- declare const FLOW_STYLES: readonly ["flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
11
- declare const CONTAINER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "width", "height", "flexBasis", "flexGrow", "flexShrink", "flex", "gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin", "padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign", "border", "radius", "shadow", "outline", "flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
12
- declare const OUTER_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin", "width", "height", "flexBasis", "flexGrow", "flexShrink", "flex", "border", "radius", "shadow", "outline"];
13
- declare const INNER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign", "flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
14
- //#endregion
15
- export { BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, COLOR_STYLES, CONTAINER_STYLES, DIMENSION_STYLES, FLOW_STYLES, INNER_STYLES, OUTER_STYLES, POSITION_STYLES, TEXT_STYLES };
16
- //# sourceMappingURL=list.d.ts.map
@@ -1,100 +0,0 @@
1
- //#region src/styles/list.ts
2
- const BASE_STYLES = [
3
- "display",
4
- "font",
5
- "preset",
6
- "hide",
7
- "whiteSpace",
8
- "opacity",
9
- "transition"
10
- ];
11
- const POSITION_STYLES = [
12
- "gridArea",
13
- "order",
14
- "gridColumn",
15
- "gridRow",
16
- "placeSelf",
17
- "alignSelf",
18
- "justifySelf",
19
- "zIndex",
20
- "margin",
21
- "inset",
22
- "position",
23
- "scrollMargin"
24
- ];
25
- const BLOCK_INNER_STYLES = [
26
- "padding",
27
- "paddingInline",
28
- "paddingBlock",
29
- "overflow",
30
- "scrollbar",
31
- "textAlign"
32
- ];
33
- const BLOCK_OUTER_STYLES = [
34
- "border",
35
- "radius",
36
- "shadow",
37
- "outline"
38
- ];
39
- const BLOCK_STYLES = [...BLOCK_INNER_STYLES, ...BLOCK_OUTER_STYLES];
40
- const COLOR_STYLES = [
41
- "color",
42
- "fill",
43
- "fade",
44
- "image"
45
- ];
46
- const TEXT_STYLES = [
47
- "textTransform",
48
- "fontWeight",
49
- "fontStyle"
50
- ];
51
- const DIMENSION_STYLES = [
52
- "width",
53
- "height",
54
- "flexBasis",
55
- "flexGrow",
56
- "flexShrink",
57
- "flex"
58
- ];
59
- const FLOW_STYLES = [
60
- "flow",
61
- "place",
62
- "placeItems",
63
- "placeContent",
64
- "alignItems",
65
- "alignContent",
66
- "justifyItems",
67
- "justifyContent",
68
- "align",
69
- "justify",
70
- "gap",
71
- "columnGap",
72
- "rowGap",
73
- "gridColumns",
74
- "gridRows",
75
- "gridTemplate",
76
- "gridAreas"
77
- ];
78
- const CONTAINER_STYLES = [
79
- ...BASE_STYLES,
80
- ...COLOR_STYLES,
81
- ...DIMENSION_STYLES,
82
- ...POSITION_STYLES,
83
- ...BLOCK_STYLES,
84
- ...FLOW_STYLES
85
- ];
86
- const OUTER_STYLES = [
87
- ...POSITION_STYLES,
88
- ...DIMENSION_STYLES,
89
- ...BLOCK_OUTER_STYLES
90
- ];
91
- const INNER_STYLES = [
92
- ...BASE_STYLES,
93
- ...COLOR_STYLES,
94
- ...BLOCK_INNER_STYLES,
95
- ...FLOW_STYLES
96
- ];
97
- //#endregion
98
- export { BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, COLOR_STYLES, CONTAINER_STYLES, DIMENSION_STYLES, FLOW_STYLES, INNER_STYLES, OUTER_STYLES, POSITION_STYLES, TEXT_STYLES };
99
-
100
- //# sourceMappingURL=list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.js","names":[],"sources":["../../src/styles/list.ts"],"sourcesContent":["export const BASE_STYLES = [\n 'display',\n 'font',\n 'preset',\n 'hide',\n 'whiteSpace',\n 'opacity',\n 'transition',\n] as const;\n\nexport const POSITION_STYLES = [\n 'gridArea',\n 'order',\n 'gridColumn',\n 'gridRow',\n 'placeSelf',\n 'alignSelf',\n 'justifySelf',\n 'zIndex',\n 'margin',\n 'inset',\n 'position',\n 'scrollMargin',\n] as const;\n\nexport const BLOCK_INNER_STYLES = [\n 'padding',\n 'paddingInline',\n 'paddingBlock',\n 'overflow',\n 'scrollbar',\n 'textAlign',\n] as const;\n\nexport const BLOCK_OUTER_STYLES = [\n 'border',\n 'radius',\n 'shadow',\n 'outline',\n] as const;\n\nexport const BLOCK_STYLES = [\n ...BLOCK_INNER_STYLES,\n ...BLOCK_OUTER_STYLES,\n] as const;\n\nexport const COLOR_STYLES = ['color', 'fill', 'fade', 'image'] as const;\n\nexport const TEXT_STYLES = [\n 'textTransform',\n 'fontWeight',\n 'fontStyle',\n] as const;\n\nexport const DIMENSION_STYLES = [\n 'width',\n 'height',\n 'flexBasis',\n 'flexGrow',\n 'flexShrink',\n 'flex',\n] as const;\n\nexport const FLOW_STYLES = [\n 'flow',\n 'place',\n 'placeItems',\n 'placeContent',\n 'alignItems',\n 'alignContent',\n 'justifyItems',\n 'justifyContent',\n 'align',\n 'justify',\n 'gap',\n 'columnGap',\n 'rowGap',\n 'gridColumns',\n 'gridRows',\n 'gridTemplate',\n 'gridAreas',\n] as const;\n\nexport const CONTAINER_STYLES = [\n ...BASE_STYLES,\n ...COLOR_STYLES,\n ...DIMENSION_STYLES,\n ...POSITION_STYLES,\n ...BLOCK_STYLES,\n ...FLOW_STYLES,\n] as const;\n\nexport const OUTER_STYLES = [\n ...POSITION_STYLES,\n ...DIMENSION_STYLES,\n ...BLOCK_OUTER_STYLES,\n] as const;\n\nexport const INNER_STYLES = [\n ...BASE_STYLES,\n ...COLOR_STYLES,\n ...BLOCK_INNER_STYLES,\n ...FLOW_STYLES,\n] as const;\n"],"mappings":";AAAA,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,qBAAqB;CAChC;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,qBAAqB;CAChC;CACA;CACA;CACA;CACD;AAED,MAAa,eAAe,CAC1B,GAAG,oBACH,GAAG,mBACJ;AAED,MAAa,eAAe;CAAC;CAAS;CAAQ;CAAQ;CAAQ;AAE9D,MAAa,cAAc;CACzB;CACA;CACA;CACD;AAED,MAAa,mBAAmB;CAC9B;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,mBAAmB;CAC9B,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ;AAED,MAAa,eAAe;CAC1B,GAAG;CACH,GAAG;CACH,GAAG;CACJ;AAED,MAAa,eAAe;CAC1B,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ"}
@@ -1,24 +0,0 @@
1
- //#region src/styles/margin.d.ts
2
- declare function marginStyle({
3
- margin,
4
- marginBlock,
5
- marginInline,
6
- marginTop,
7
- marginRight,
8
- marginBottom,
9
- marginLeft
10
- }: {
11
- margin?: string | number | boolean;
12
- marginBlock?: string | number | boolean;
13
- marginInline?: string | number | boolean;
14
- marginTop?: string | number | boolean;
15
- marginRight?: string | number | boolean;
16
- marginBottom?: string | number | boolean;
17
- marginLeft?: string | number | boolean;
18
- }): Record<string, string> | null;
19
- declare namespace marginStyle {
20
- var __lookupStyles: string[];
21
- }
22
- //#endregion
23
- export { marginStyle };
24
- //# sourceMappingURL=margin.d.ts.map
@@ -1,32 +0,0 @@
1
- import { processDirectionalStyle } from "./directional.js";
2
- //#region src/styles/margin.ts
3
- const MARGIN_CONFIG = {
4
- property: "margin",
5
- defaultValue: "var(--gap)",
6
- trueValue: "1x",
7
- defaultInit: "0"
8
- };
9
- function marginStyle({ margin, marginBlock, marginInline, marginTop, marginRight, marginBottom, marginLeft }) {
10
- return processDirectionalStyle(MARGIN_CONFIG, {
11
- main: margin,
12
- block: marginBlock,
13
- inline: marginInline,
14
- top: marginTop,
15
- right: marginRight,
16
- bottom: marginBottom,
17
- left: marginLeft
18
- });
19
- }
20
- marginStyle.__lookupStyles = [
21
- "margin",
22
- "marginTop",
23
- "marginRight",
24
- "marginBottom",
25
- "marginLeft",
26
- "marginBlock",
27
- "marginInline"
28
- ];
29
- //#endregion
30
- export { marginStyle };
31
-
32
- //# sourceMappingURL=margin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"margin.js","names":[],"sources":["../../src/styles/margin.ts"],"sourcesContent":["import { processDirectionalStyle } from './directional';\n\nconst MARGIN_CONFIG = {\n property: 'margin',\n defaultValue: 'var(--gap)',\n trueValue: '1x',\n defaultInit: '0',\n} as const;\n\nexport function marginStyle({\n margin,\n marginBlock,\n marginInline,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n}: {\n margin?: string | number | boolean;\n marginBlock?: string | number | boolean;\n marginInline?: string | number | boolean;\n marginTop?: string | number | boolean;\n marginRight?: string | number | boolean;\n marginBottom?: string | number | boolean;\n marginLeft?: string | number | boolean;\n}) {\n return processDirectionalStyle(MARGIN_CONFIG, {\n main: margin,\n block: marginBlock,\n inline: marginInline,\n top: marginTop,\n right: marginRight,\n bottom: marginBottom,\n left: marginLeft,\n });\n}\n\nmarginStyle.__lookupStyles = [\n 'margin',\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'marginBlock',\n 'marginInline',\n];\n"],"mappings":";;AAEA,MAAM,gBAAgB;CACpB,UAAU;CACV,cAAc;CACd,WAAW;CACX,aAAa;CACd;AAED,SAAgB,YAAY,EAC1B,QACA,aACA,cACA,WACA,aACA,cACA,cASC;AACD,QAAO,wBAAwB,eAAe;EAC5C,MAAM;EACN,OAAO;EACP,QAAQ;EACR,KAAK;EACL,OAAO;EACP,QAAQ;EACR,MAAM;EACP,CAAC;;AAGJ,YAAY,iBAAiB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
@@ -1,29 +0,0 @@
1
- //#region src/styles/outline.d.ts
2
- interface OutlineStyleProps {
3
- outline?: string | boolean | number;
4
- outlineOffset?: string | number;
5
- }
6
- /**
7
- * Generates CSS for outline property with optional offset.
8
- *
9
- * Syntax:
10
- * - `outline="2px solid #red"` - outline only
11
- * - `outline="2px solid #red / 4px"` - outline with offset (slash separator)
12
- * - `outline="2px / 4px"` - width with offset (simpler form)
13
- * - `outline={true}` - default 1ow solid outline
14
- * - `outlineOffset="4px"` - offset as separate prop (can be combined with outline)
15
- *
16
- * Priority: slash syntax in outline takes precedence over outlineOffset prop
17
- *
18
- * @return CSS properties for outline and optionally outline-offset
19
- */
20
- declare function outlineStyle({
21
- outline,
22
- outlineOffset
23
- }: OutlineStyleProps): Record<string, string> | null;
24
- declare namespace outlineStyle {
25
- var __lookupStyles: string[];
26
- }
27
- //#endregion
28
- export { outlineStyle };
29
- //# sourceMappingURL=outline.d.ts.map
@@ -1,55 +0,0 @@
1
- import { CSS_WIDE_KEYWORDS } from "../parser/const.js";
2
- import { filterMods, parseStyle } from "../utils/styles.js";
3
- import { BORDER_STYLES } from "./const.js";
4
- //#region src/styles/outline.ts
5
- /**
6
- * Generates CSS for outline property with optional offset.
7
- *
8
- * Syntax:
9
- * - `outline="2px solid #red"` - outline only
10
- * - `outline="2px solid #red / 4px"` - outline with offset (slash separator)
11
- * - `outline="2px / 4px"` - width with offset (simpler form)
12
- * - `outline={true}` - default 1ow solid outline
13
- * - `outlineOffset="4px"` - offset as separate prop (can be combined with outline)
14
- *
15
- * Priority: slash syntax in outline takes precedence over outlineOffset prop
16
- *
17
- * @return CSS properties for outline and optionally outline-offset
18
- */
19
- function outlineStyle({ outline, outlineOffset }) {
20
- const result = {};
21
- if (outline != null && outline !== false) if (typeof outline === "string" && CSS_WIDE_KEYWORDS.has(outline)) result["outline"] = outline;
22
- else {
23
- let outlineValue = outline;
24
- if (outline === true) outlineValue = "1ow";
25
- if (outline === 0) outlineValue = "0";
26
- const group = parseStyle(String(outlineValue)).groups[0];
27
- if (group) {
28
- const { parts } = group;
29
- const outlinePart = parts[0] ?? {
30
- values: [],
31
- mods: [],
32
- colors: []
33
- };
34
- const offsetPart = parts[1];
35
- const typeMods = filterMods(outlinePart.mods, BORDER_STYLES);
36
- result["outline"] = [
37
- outlinePart.values[0] || "var(--outline-width)",
38
- typeMods[0] || "solid",
39
- outlinePart.colors[0] || "var(--outline-color)"
40
- ].join(" ");
41
- if (offsetPart?.values[0]) result["outline-offset"] = offsetPart.values[0];
42
- }
43
- }
44
- if (outlineOffset != null && !result["outline-offset"]) {
45
- const offsetValue = typeof outlineOffset === "number" ? `${outlineOffset}px` : outlineOffset;
46
- result["outline-offset"] = parseStyle(offsetValue).groups[0]?.values[0] || offsetValue;
47
- }
48
- if (Object.keys(result).length === 0) return null;
49
- return result;
50
- }
51
- outlineStyle.__lookupStyles = ["outline", "outlineOffset"];
52
- //#endregion
53
- export { outlineStyle };
54
-
55
- //# sourceMappingURL=outline.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"outline.js","names":[],"sources":["../../src/styles/outline.ts"],"sourcesContent":["import { CSS_WIDE_KEYWORDS } from '../parser/const';\nimport { filterMods, parseStyle } from '../utils/styles';\nimport { BORDER_STYLES } from './const';\n\ninterface OutlineStyleProps {\n outline?: string | boolean | number;\n outlineOffset?: string | number;\n}\n\n/**\n * Generates CSS for outline property with optional offset.\n *\n * Syntax:\n * - `outline=\"2px solid #red\"` - outline only\n * - `outline=\"2px solid #red / 4px\"` - outline with offset (slash separator)\n * - `outline=\"2px / 4px\"` - width with offset (simpler form)\n * - `outline={true}` - default 1ow solid outline\n * - `outlineOffset=\"4px\"` - offset as separate prop (can be combined with outline)\n *\n * Priority: slash syntax in outline takes precedence over outlineOffset prop\n *\n * @return CSS properties for outline and optionally outline-offset\n */\nexport function outlineStyle({ outline, outlineOffset }: OutlineStyleProps) {\n const result: Record<string, string> = {};\n\n // Handle outline (0 is valid - means no outline)\n if (outline != null && outline !== false) {\n if (typeof outline === 'string' && CSS_WIDE_KEYWORDS.has(outline)) {\n result['outline'] = outline;\n } else {\n let outlineValue: string | boolean | number = outline;\n if (outline === true) outlineValue = '1ow';\n if (outline === 0) outlineValue = '0';\n\n const processed = parseStyle(String(outlineValue));\n const group = processed.groups[0];\n\n if (group) {\n const { parts } = group;\n const outlinePart = parts[0] ?? { values: [], mods: [], colors: [] };\n const offsetPart = parts[1];\n\n const typeMods = filterMods(\n outlinePart.mods,\n BORDER_STYLES as unknown as string[],\n );\n\n const value = outlinePart.values[0] || 'var(--outline-width)';\n const type = typeMods[0] || 'solid';\n const outlineColor = outlinePart.colors[0] || 'var(--outline-color)';\n\n result['outline'] = [value, type, outlineColor].join(' ');\n\n if (offsetPart?.values[0]) {\n result['outline-offset'] = offsetPart.values[0];\n }\n }\n }\n }\n\n // Handle outlineOffset prop (only if not already set by slash syntax)\n if (outlineOffset != null && !result['outline-offset']) {\n const offsetValue =\n typeof outlineOffset === 'number' ? `${outlineOffset}px` : outlineOffset;\n const processed = parseStyle(offsetValue);\n result['outline-offset'] = processed.groups[0]?.values[0] || offsetValue;\n }\n\n if (Object.keys(result).length === 0) {\n return null;\n }\n\n return result;\n}\n\noutlineStyle.__lookupStyles = ['outline', 'outlineOffset'];\n"],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,SAAgB,aAAa,EAAE,SAAS,iBAAoC;CAC1E,MAAM,SAAiC,EAAE;AAGzC,KAAI,WAAW,QAAQ,YAAY,MACjC,KAAI,OAAO,YAAY,YAAY,kBAAkB,IAAI,QAAQ,CAC/D,QAAO,aAAa;MACf;EACL,IAAI,eAA0C;AAC9C,MAAI,YAAY,KAAM,gBAAe;AACrC,MAAI,YAAY,EAAG,gBAAe;EAGlC,MAAM,QADY,WAAW,OAAO,aAAa,CAAC,CAC1B,OAAO;AAE/B,MAAI,OAAO;GACT,MAAM,EAAE,UAAU;GAClB,MAAM,cAAc,MAAM,MAAM;IAAE,QAAQ,EAAE;IAAE,MAAM,EAAE;IAAE,QAAQ,EAAE;IAAE;GACpE,MAAM,aAAa,MAAM;GAEzB,MAAM,WAAW,WACf,YAAY,MACZ,cACD;AAMD,UAAO,aAAa;IAJN,YAAY,OAAO,MAAM;IAC1B,SAAS,MAAM;IACP,YAAY,OAAO,MAAM;IAEC,CAAC,KAAK,IAAI;AAEzD,OAAI,YAAY,OAAO,GACrB,QAAO,oBAAoB,WAAW,OAAO;;;AAOrD,KAAI,iBAAiB,QAAQ,CAAC,OAAO,mBAAmB;EACtD,MAAM,cACJ,OAAO,kBAAkB,WAAW,GAAG,cAAc,MAAM;AAE7D,SAAO,oBADW,WAAW,YAAY,CACJ,OAAO,IAAI,OAAO,MAAM;;AAG/D,KAAI,OAAO,KAAK,OAAO,CAAC,WAAW,EACjC,QAAO;AAGT,QAAO;;AAGT,aAAa,iBAAiB,CAAC,WAAW,gBAAgB"}