@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
package/dist/index.d.ts CHANGED
@@ -1,51 +1,5 @@
1
- import { CacheMetrics, CounterStyleDescriptors, DisposeFunction, FontFaceDescriptors, FontFaceInput, InjectResult, KeyframesCacheEntry, KeyframesInfo, KeyframesResult, KeyframesSteps, PropertyDefinition, RawCSSResult, RootRegistry, RuleInfo, SheetInfo, StyleInjectorConfig, StyleRule } from "./injector/types.js";
2
- import { CSSProperties } from "./utils/css-types.js";
3
- import { Bucket, ParserOptions, ProcessedStyle, StyleDetails, StyleDetailsPart, UnitHandler } from "./parser/types.js";
4
- import { StyleParser } from "./parser/parser.js";
5
- import { getNamedColorHex, getRgbValuesFromRgbaString, hexToRgb, hslToRgbValues, strToRgb } from "./utils/color-math.js";
6
- import { CSSMap, CUSTOM_UNITS, DIRECTIONS, ParsedColor, RawStyleHandler, StyleHandler, StyleHandlerDefinition, StyleHandlerResult, StyleMap, StylePropValue, StyleValue, StyleValueStateMap, customFunc, filterMods, getGlobalFuncs, getGlobalParser, getGlobalPredefinedTokens, normalizeColorTokenValue, parseColor, parseStyle, resetGlobalPredefinedTokens, setGlobalPredefinedTokens, stringifyStyles } from "./utils/styles.js";
7
- import { ConfigTokenValue, ConfigTokens, NoType, NotSelector, RecipeStyles, Selector, Styles, StylesInterface, StylesWithoutSelectors, SuffixForSelector, TastyNamedColors, TastyPresetNames } from "./styles/types.js";
8
- import { ConditionNode } from "./pipeline/conditions.js";
9
- import { AtRuleContext, ParsedAdvancedState, StateParserContext, createStateParserContext, getGlobalPredefinedStates, setGlobalPredefinedStates } from "./states/index.js";
10
- import { ParseStateKeyOptions, parseStateKey } from "./pipeline/parseStateKey.js";
11
- import { RenderResult, StyleResult, isSelector, renderStyles } from "./pipeline/index.js";
12
- import { SheetManager } from "./injector/sheet-manager.js";
13
- import { StyleInjector } from "./injector/injector.js";
14
- import { ColorSpace } from "./utils/color-space.js";
15
- import { TastyPlugin, TastyPluginFactory } from "./plugins/types.js";
16
- import { TastyConfig, configure, getConfig, getGlobalCounterStyle, getGlobalFontFace, getGlobalKeyframes, getGlobalRecipes, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, isConfigLocked, isTestEnvironment, resetConfig } from "./config.js";
17
- import { okhslFunc, okhslPlugin } from "./plugins/okhsl-plugin.js";
18
- import { CHUNK_NAMES, ChunkInfo, ChunkName, STYLE_TO_CHUNK, categorizeStyleKeys } from "./chunks/definitions.js";
19
- import { 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 } from "./styles/list.js";
20
- import { AllBaseProps, BaseProps, BasePropsWithoutChildren, BaseStyleProps, BlockInnerStyleProps, BlockOuterStyleProps, BlockStyleProps, ColorStyleProps, ContainerStyleProps, DimensionStyleProps, FlowStyleProps, GlobalStyledProps, InnerStyleProps, ModValue, Mods, OuterStyleProps, PositionStyleProps, Props, ShortGridStyles, TagName, TastyExtensionConfig, TastyThemeNames, TextStyleProps, TokenValue, Tokens } from "./types.js";
21
- import { AllBasePropsWithMods, Element, ElementsDefinition, ModPropDef, ModPropsInput, ResolveModPropDef, ResolveModProps, SubElementDefinition, SubElementProps, TastyElementOptions, TastyElementProps, TastyProps, VariantMap, WithVariant, tasty } from "./tasty.js";
22
- import { UseStylesOptions, UseStylesResult, useStyles } from "./hooks/useStyles.js";
23
- import { useGlobalStyles } from "./hooks/useGlobalStyles.js";
24
- import { useRawCSS } from "./hooks/useRawCSS.js";
25
- import { useKeyframes } from "./hooks/useKeyframes.js";
26
- import { UsePropertyOptions, useProperty } from "./hooks/useProperty.js";
27
- import { useFontFace } from "./hooks/useFontFace.js";
28
- import { useCounterStyle } from "./hooks/useCounterStyle.js";
29
- import { getDisplayName } from "./utils/get-display-name.js";
30
- import { styleHandlers } from "./styles/predefined.js";
31
- import { PropertyOptions, allocateClassName, cleanup, counterStyle, createInjector, destroy, fontFace, getCssText, getCssTextForNode, getIsTestEnvironment, getRawCSSText, inject, injectGlobal, injectRawCSS, injector, isPropertyDefined, keyframes, property, trackRef } from "./injector/index.js";
32
- import { filterBaseProps } from "./utils/filter-base-props.js";
33
- import { color } from "./utils/colors.js";
34
- import { _modAttrs } from "./utils/mod-attrs.js";
35
- import { dotize } from "./utils/dotize.js";
36
- import { mergeStyles } from "./utils/merge-styles.js";
37
- import { resolveRecipes } from "./utils/resolve-recipes.js";
38
- import { deprecationWarning, warn } from "./utils/warnings.js";
39
- import { processTokens, stringifyTokens } from "./utils/process-tokens.js";
40
- import { TypographyPreset, generateTypographyTokens } from "./utils/typography.js";
41
- import { tastyDebug } from "./debug.js";
42
- import "./core/index.js";
43
- import { CSSProperties as CSSProperties$1 } from "react";
44
-
45
- //#region src/index.d.ts
46
- declare module './utils/css-types' {
47
- interface CSSProperties extends CSSProperties$1 {}
48
- }
49
- //#endregion
50
- export { type AllBaseProps, type AllBasePropsWithMods, AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, type BaseProps, type BasePropsWithoutChildren, BaseStyleProps, BlockInnerStyleProps, BlockOuterStyleProps, BlockStyleProps, Bucket, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CSSMap, CSSProperties, CUSTOM_UNITS, CacheMetrics, ChunkInfo, ChunkName, ColorSpace, ColorStyleProps, ConditionNode, ConfigTokenValue, ConfigTokens, ContainerStyleProps, CounterStyleDescriptors, DIMENSION_STYLES, DIRECTIONS, DimensionStyleProps, DisposeFunction, Element, type ElementsDefinition, FLOW_STYLES, FlowStyleProps, FontFaceDescriptors, FontFaceInput, GlobalStyledProps, INNER_STYLES, InjectResult, InnerStyleProps, KeyframesCacheEntry, KeyframesInfo, KeyframesResult, KeyframesSteps, type ModPropDef, type ModPropsInput, ModValue, Mods, NoType, NotSelector, OUTER_STYLES, OuterStyleProps, POSITION_STYLES, ParseStateKeyOptions, ParsedAdvancedState, ParsedColor, ParserOptions, PositionStyleProps, ProcessedStyle, PropertyDefinition, PropertyOptions, Props, RawCSSResult, RawStyleHandler, RecipeStyles, RenderResult, type ResolveModPropDef, type ResolveModProps, RootRegistry, RuleInfo, STYLE_TO_CHUNK, Selector, SheetInfo, SheetManager, ShortGridStyles, StateParserContext, StyleDetails, StyleDetailsPart, StyleHandler, StyleHandlerDefinition, StyleHandlerResult, StyleInjector, StyleInjectorConfig, StyleMap, StyleParser, StylePropValue, StyleResult, StyleRule, StyleValue, StyleValueStateMap, Styles, StylesInterface, StylesWithoutSelectors, type SubElementDefinition, type SubElementProps, SuffixForSelector, TEXT_STYLES, TagName, TastyConfig, type TastyElementOptions, type TastyElementProps, TastyExtensionConfig, TastyNamedColors, TastyPlugin, TastyPluginFactory, TastyPresetNames, type TastyProps, TastyThemeNames, TextStyleProps, TokenValue, Tokens, TypographyPreset, UnitHandler, type UsePropertyOptions, type UseStylesOptions, type UseStylesResult, type VariantMap, type WithVariant, allocateClassName, categorizeStyleKeys, cleanup, color, configure, counterStyle, createInjector, createStateParserContext, customFunc, deprecationWarning, destroy, dotize, filterBaseProps, filterMods, fontFace, generateTypographyTokens, getConfig, getCssText, getCssTextForNode, getDisplayName, getGlobalCounterStyle, getGlobalFontFace, getGlobalFuncs, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getIsTestEnvironment, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, hexToRgb, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunc, okhslPlugin, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetGlobalPredefinedTokens, resolveRecipes, setGlobalPredefinedStates, setGlobalPredefinedTokens, strToRgb, stringifyStyles, stringifyTokens, styleHandlers, tasty, tastyDebug, trackRef, useCounterStyle, useFontFace, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles, warn };
51
- //# sourceMappingURL=index.d.ts.map
1
+ import { C as ParseFunction, D as PropHandlerDefinition, E as PropHandler, O as PropHandlerProps, S as FunctionsConfig, T as SheetManager, _ as TastyPluginFactory, a as getGlobalFontFaces, b as generateTypographyTokens, c as getGlobalRecipes, d as hasGlobalRecipes, f as isConfigLocked, g as TastyPlugin, h as hasStylesGenerated, i as getGlobalCounterStyles, l as getNamePrefix, m as resetConfig, n as configure, o as getGlobalFunctions, p as isTestEnvironment, r as getConfig, s as getGlobalKeyframes, t as TastyConfig, u as hasGlobalKeyframes, v as TypographyPreset, w as StyleInjector, x as ColorSpace, y as TypographyTokenValue } from "./config-BI0y21JV.js";
2
+ import { $ as StyleParser, A as ParsedColor, At as StyleRule, B as StyleValueStateMap, C as SuffixForSelector, Ct as PropertyDefinition, D as CSSMap, Dt as RuleInfo, E as AnyStyleHandler, Et as RootRegistry, F as StyleHandlerProps, Ft as resetStyleBatch, G as parseColor, H as getGlobalParser, I as StyleHandlerResult, J as getNamedColorHex, K as parseStyle, L as StyleMap, M as ResolvedStyleValue, Mt as QueuedWrite, N as StyleHandler, Nt as flushStyles, O as CUSTOM_UNITS, Ot as SheetInfo, P as StyleHandlerDefinition, Pt as hasPendingStyleWrites, Q as strToRgb, R as StylePropValue, S as StylesWithoutSelectors, St as KeyframesSteps, T as TastyPresetNames, Tt as RawCSSResult, U as getGlobalPredefinedTokens, V as filterMods, W as normalizeColorTokenValue, X as hexToRgb, Y as getRgbValuesFromRgbaString, Z as hslToRgbValues, _ as NotSelector, _t as InjectResult, a as parseStateKey, at as CSSProperties, b as Styles, bt as KeyframesInfo, c as StateParserContext, ct as DisposeFunction, d as setGlobalPredefinedStates, dt as FunctionDefinition, et as ParserOptions, f as ConditionNode, ft as FunctionParameter, g as NoType, gt as InjectOptions, h as ConfigTokens, i as ParseStateKeyOptions, it as UnitHandler, j as RawStyleHandler, jt as StyleUsage, k as DIRECTIONS, kt as StyleInjectorConfig, l as createStateParserContext, lt as FontFaceDescriptors, m as ConfigTokenValue, mt as GCOptions, n as StyleResult, nt as StyleDetails, o as AtRuleContext, ot as CacheMetrics, p as isSelector, pt as GCConfig, q as stringifyStyles, r as renderStyles, rt as StyleDetailsPart, s as ParsedAdvancedState, st as CounterStyleDescriptors, t as RenderResult, tt as ProcessedStyle, u as getGlobalPredefinedStates, ut as FontFaceInput, v as RecipeStyles, vt as InjectionMode, w as TastyNamedColors, wt as PropertyOptions, x as StylesInterface, xt as KeyframesResult, y as Selector, yt as KeyframesCacheEntry, z as StyleValue } from "./index-BzAC3p06.js";
3
+ import { $ as resolveFunctionColor, $t as Mods, A as isPropertyDefined, At as TastyComponentPropsWithDefaults, B as defineHandler, Bt as BaseProps, C as getCSSTextForNode, Cn as DEFAULT_NAME_PREFIX, Ct as ModPropsInput, D as injectGlobal, Dt as ResolveTokenProps, E as inject, Et as ResolveModProps, F as ChunkSheetRegistry, Ft as TokenPropsInput, G as CHUNK_NAMES, Gt as BlockStyleProps, H as ChunkInfo, Ht as BaseStyleProps, I as chunkSheetRegistry, It as VariantMap, J as DISPLAY_CHUNK_STYLES, Jt as DimensionStyleProps, K as ChunkName, Kt as ColorStyleProps, L as ComputeStylesOptions, Lt as WithVariant, M as ownKeyframes, Mt as TastyElementProps, N as property, Nt as TastyPolymorphicComponent, O as injectRawCSS, Ot as SubElementDefinition, P as touch, Pt as TastyProps, Q as STYLE_TO_CHUNK, Qt as ModValue, R as ComputeStylesResult, Rt as tasty, S as getCSSText, Sn as TEXT_STYLES, St as ModPropDef, T as holdKeyframes, Tt as ResolveModPropDef, U as categorizeStyleKeys, Ut as BlockInnerStyleProps, V as styleHandlers, Vt as BasePropsWithoutChildren, W as APPEARANCE_CHUNK_STYLES, Wt as BlockOuterStyleProps, X as LAYOUT_CHUNK_STYLES, Xt as FlowStyleProps, Y as FONT_CHUNK_STYLES, Yt as ExtraBaseStyleProps, Z as POSITION_CHUNK_STYLES, Zt as InnerStyleProps, _ as createInjector, _n as DIMENSION_STYLES, _t as UseStylesResult, a as DebugOptions, an as TastyCustomProps, at as getDisplayName, b as func, bn as OUTER_STYLES, bt as Element, c as tastyDebug, cn as TextStyleProps, ct as UseFunctionOptions, d as dotize, dn as BASE_STYLES, dt as useFontFace, en as OuterStyleProps, et as createColorFunc, f as _modAttrs, fn as BLOCK_INNER_STYLES, ft as UsePropertyOptions, g as counterStyle, gn as CONTAINER_STYLES, gt as useGlobalStyles, h as cleanup, hn as COLOR_STYLES, ht as useRawCSS, i as DebugChunkInfo, in as TastyBaseStylePropNames, it as okhslPlugin, j as keyframes, jt as TastyElementOptions, k as injector, kt as SubElementProps, l as processTokens, ln as TokenValue, lt as useFunction, m as filterBaseProps, mn as BLOCK_STYLES, mt as useKeyframes, n as CacheStatus, nn as ShortGridStyles, nt as okhstPlugin, o as InspectResult, on as TastyExtensionConfig, ot as TastyBatchProvider, p as color, pn as BLOCK_OUTER_STYLES, pt as useProperty, q as DIMENSION_CHUNK_STYLES, qt as ContainerStyleProps, r as ChunkBreakdown, rn as TagName, rt as okhslFunction, s as Summary, sn as TastyThemeNames, st as TastyBatchProviderProps, t as CSSOptions, tn as PositionStyleProps, tt as okhstFunction, u as resolveRecipes, un as Tokens, ut as useCounterStyle, v as destroy, vn as FLOW_STYLES, vt as useStyles, w as getRawCSSText, wn as DEFAULT_ZERO_NAME_PREFIX, wt as ResolveAsProps, x as gc, xn as POSITION_STYLES, xt as ElementsDefinition, y as fontFace, yn as INNER_STYLES, yt as AllBasePropsWithMods, z as computeStyles, zt as AllBaseProps } from "./index-CrT0bsiI.js";
4
+ import { t as mergeStyles } from "./merge-styles-BFktNP8J.js";
5
+ export { APPEARANCE_CHUNK_STYLES, type AllBaseProps, type AllBasePropsWithMods, type AnyStyleHandler, type AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, type BaseProps, type BasePropsWithoutChildren, type BaseStyleProps, type BlockInnerStyleProps, type BlockOuterStyleProps, type BlockStyleProps, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, type CSSMap, CSSOptions, type CSSProperties, CUSTOM_UNITS, type CacheMetrics, CacheStatus, ChunkBreakdown, type ChunkInfo, type ChunkName, ChunkSheetRegistry, type ColorSpace, type ColorStyleProps, type ComputeStylesOptions, type ComputeStylesResult, type ConditionNode, type ConfigTokenValue, type ConfigTokens, type ContainerStyleProps, type CounterStyleDescriptors, DEFAULT_NAME_PREFIX, DEFAULT_ZERO_NAME_PREFIX, DIMENSION_CHUNK_STYLES, DIMENSION_STYLES, DIRECTIONS, DISPLAY_CHUNK_STYLES, DebugChunkInfo, DebugOptions, type DimensionStyleProps, type DisposeFunction, Element, type ElementsDefinition, type ExtraBaseStyleProps, FLOW_STYLES, FONT_CHUNK_STYLES, type FlowStyleProps, type FontFaceDescriptors, type FontFaceInput, type FunctionDefinition, type FunctionParameter, type FunctionsConfig, type GCConfig, type GCOptions, INNER_STYLES, type InjectOptions, type InjectResult, type InjectionMode, type InnerStyleProps, InspectResult, type KeyframesCacheEntry, type KeyframesInfo, type KeyframesResult, type KeyframesSteps, LAYOUT_CHUNK_STYLES, type ModPropDef, type ModPropsInput, type ModValue, type Mods, type NoType, type NotSelector, OUTER_STYLES, type OuterStyleProps, POSITION_CHUNK_STYLES, POSITION_STYLES, type ParseFunction, type ParseStateKeyOptions, type ParsedAdvancedState, type ParsedColor, type ParserOptions, type PositionStyleProps, type ProcessedStyle, type PropHandler, type PropHandlerDefinition, type PropHandlerProps, type PropertyDefinition, type PropertyOptions, type QueuedWrite, type RawCSSResult, type RawStyleHandler, type RecipeStyles, type RenderResult, type ResolveAsProps, type ResolveModPropDef, type ResolveModProps, type ResolveTokenProps, type ResolvedStyleValue, type RootRegistry, type RuleInfo, STYLE_TO_CHUNK, type Selector, type SheetInfo, SheetManager, type ShortGridStyles, type StateParserContext, type StyleDetails, type StyleDetailsPart, type StyleHandler, type StyleHandlerDefinition, type StyleHandlerProps, type StyleHandlerResult, StyleInjector, type StyleInjectorConfig, type StyleMap, StyleParser, type StylePropValue, type StyleResult, type StyleRule, type StyleUsage, type StyleValue, type StyleValueStateMap, type Styles, type StylesInterface, type StylesWithoutSelectors, type SubElementDefinition, type SubElementProps, type SuffixForSelector, Summary, TEXT_STYLES, type TagName, type TastyBaseStylePropNames, TastyBatchProvider, type TastyBatchProviderProps, type TastyComponentPropsWithDefaults, type TastyConfig, type TastyCustomProps, type TastyElementOptions, type TastyElementProps, type TastyExtensionConfig, type TastyNamedColors, type TastyPlugin, type TastyPluginFactory, type TastyPolymorphicComponent, type TastyPresetNames, type TastyProps, type TastyThemeNames, type TextStyleProps, type TokenPropsInput, type TokenValue, type Tokens, TypographyPreset, TypographyTokenValue, type UnitHandler, type UseFunctionOptions, type UsePropertyOptions, type UseStylesResult, type VariantMap, type WithVariant, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, dotize, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getDisplayName, getGlobalCounterStyles, getGlobalFontFaces, getGlobalFunctions, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getNamePrefix, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasPendingStyleWrites, hasStylesGenerated, hexToRgb, holdKeyframes, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunction, okhslPlugin, okhstFunction, okhstPlugin, ownKeyframes, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetStyleBatch, resolveFunctionColor, resolveRecipes, setGlobalPredefinedStates, strToRgb, stringifyStyles, styleHandlers, tasty, tastyDebug, touch, useCounterStyle, useFontFace, useFunction, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles };
package/dist/index.js CHANGED
@@ -1,36 +1,8 @@
1
- import { getNamedColorHex, getRgbValuesFromRgbaString, hexToRgb, hslToRgbValues, strToRgb } from "./utils/color-math.js";
2
- import { Bucket } from "./parser/types.js";
3
- import { StyleParser } from "./parser/parser.js";
4
- import { okhslFunc, okhslPlugin } from "./plugins/okhsl-plugin.js";
5
- import { CUSTOM_UNITS, DIRECTIONS, customFunc, filterMods, getGlobalFuncs, getGlobalParser, getGlobalPredefinedTokens, normalizeColorTokenValue, parseColor, parseStyle, resetGlobalPredefinedTokens, setGlobalPredefinedTokens, stringifyStyles } from "./utils/styles.js";
6
- import { deprecationWarning, warn } from "./utils/warnings.js";
7
- import { styleHandlers } from "./styles/predefined.js";
8
- import { SheetManager } from "./injector/sheet-manager.js";
9
- import { StyleInjector } from "./injector/injector.js";
10
- import { createStateParserContext, getGlobalPredefinedStates, setGlobalPredefinedStates } from "./states/index.js";
11
- import { parseStateKey } from "./pipeline/parseStateKey.js";
12
- import { isSelector, renderStyles } from "./pipeline/index.js";
13
- import { configure, getConfig, getGlobalCounterStyle, getGlobalFontFace, getGlobalKeyframes, getGlobalRecipes, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, isConfigLocked, isTestEnvironment, resetConfig } from "./config.js";
14
- import { CHUNK_NAMES, STYLE_TO_CHUNK, categorizeStyleKeys } from "./chunks/definitions.js";
15
- import { 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 } from "./styles/list.js";
16
- import { allocateClassName, cleanup, counterStyle, createInjector, destroy, fontFace, getCssText, getCssTextForNode, getIsTestEnvironment, getRawCSSText, inject, injectGlobal, injectRawCSS, injector, isPropertyDefined, keyframes, property, trackRef } from "./injector/index.js";
17
- import { filterBaseProps } from "./utils/filter-base-props.js";
18
- import { color } from "./utils/colors.js";
19
- import { _modAttrs } from "./utils/mod-attrs.js";
20
- import { dotize } from "./utils/dotize.js";
21
- import { mergeStyles } from "./utils/merge-styles.js";
22
- import { resolveRecipes } from "./utils/resolve-recipes.js";
23
- import { processTokens, stringifyTokens } from "./utils/process-tokens.js";
24
- import { generateTypographyTokens } from "./utils/typography.js";
25
- import { tastyDebug } from "./debug.js";
26
- import { useStyles } from "./hooks/useStyles.js";
27
- import { getDisplayName } from "./utils/get-display-name.js";
28
- import { Element, tasty } from "./tasty.js";
29
- import { useGlobalStyles } from "./hooks/useGlobalStyles.js";
30
- import { useRawCSS } from "./hooks/useRawCSS.js";
31
- import { useKeyframes } from "./hooks/useKeyframes.js";
32
- import { useProperty } from "./hooks/useProperty.js";
33
- import { useFontFace } from "./hooks/useFontFace.js";
34
- import { useCounterStyle } from "./hooks/useCounterStyle.js";
35
-
36
- export { BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, Bucket, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CUSTOM_UNITS, DIMENSION_STYLES, DIRECTIONS, Element, FLOW_STYLES, INNER_STYLES, OUTER_STYLES, POSITION_STYLES, STYLE_TO_CHUNK, SheetManager, StyleInjector, StyleParser, TEXT_STYLES, allocateClassName, categorizeStyleKeys, cleanup, color, configure, counterStyle, createInjector, createStateParserContext, customFunc, deprecationWarning, destroy, dotize, filterBaseProps, filterMods, fontFace, generateTypographyTokens, getConfig, getCssText, getCssTextForNode, getDisplayName, getGlobalCounterStyle, getGlobalFontFace, getGlobalFuncs, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getIsTestEnvironment, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, hexToRgb, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunc, okhslPlugin, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetGlobalPredefinedTokens, resolveRecipes, setGlobalPredefinedStates, setGlobalPredefinedTokens, strToRgb, stringifyStyles, stringifyTokens, styleHandlers, tasty, tastyDebug, trackRef, useCounterStyle, useFontFace, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles, warn };
1
+ import { A as hslToRgbValues, C as createColorFunc, D as getNamedColorHex, O as getRgbValuesFromRgbaString, S as okhslPlugin, a as DIRECTIONS, b as okhstPlugin, d as normalizeColorTokenValue, f as parseColor, i as CUSTOM_UNITS, j as strToRgb, k as hexToRgb, l as getGlobalParser, n as color, p as parseStyle, r as resolveFunctionColor, s as filterMods, t as dotize, u as getGlobalPredefinedTokens, v as stringifyStyles, w as StyleParser, x as okhslFunction, y as okhstFunction } from "./chunks/dsl-CXvoaLnj.js";
2
+ import { n as isSelector, t as mergeStyles } from "./chunks/shared-utils-OIg0N_dp.js";
3
+ import { $ as getNamePrefix, A as holdKeyframes, B as ChunkSheetRegistry, C as destroy, Ct as DEFAULT_ZERO_NAME_PREFIX, D as getCSSText, E as gc, F as isPropertyDefined, H as configure, I as keyframes, J as getGlobalFunctions, K as getGlobalCounterStyles, L as ownKeyframes, M as injectGlobal, N as injectRawCSS, O as getCSSTextForNode, P as injector, R as property, S as createInjector, St as DEFAULT_NAME_PREFIX, T as func, U as getConfig, V as chunkSheetRegistry, X as getGlobalKeyframes, Z as getGlobalRecipes, a as resolveRecipes, at as resetConfig, b as cleanup, et as hasGlobalKeyframes, ht as SheetManager, it as isTestEnvironment, j as inject, k as getRawCSSText, nt as isConfigLocked, ot as generateTypographyTokens, q as getGlobalFontFaces, st as StyleInjector, tt as hasGlobalRecipes, vt as flushStyles, w as fontFace, x as counterStyle, xt as resetStyleBatch, yt as hasPendingStyleWrites, z as touch } from "./chunks/runtime-engine-Y00VWjrS.js";
4
+ import { B as STYLE_TO_CHUNK, C as createStateParserContext, D as defineHandler, F as DIMENSION_CHUNK_STYLES, H as hasStylesGenerated, I as DISPLAY_CHUNK_STYLES, L as FONT_CHUNK_STYLES, N as APPEARANCE_CHUNK_STYLES, P as CHUNK_NAMES, R as LAYOUT_CHUNK_STYLES, T as setGlobalPredefinedStates, _ as POSITION_STYLES, b as renderStyles, c as BLOCK_INNER_STYLES, d as COLOR_STYLES, f as CONTAINER_STYLES, g as OUTER_STYLES, h as INNER_STYLES, j as styleHandlers, l as BLOCK_OUTER_STYLES, m as FLOW_STYLES, p as DIMENSION_STYLES, r as categorizeStyleKeys, s as BASE_STYLES, u as BLOCK_STYLES, v as TEXT_STYLES, w as getGlobalPredefinedStates, x as parseStateKey, z as POSITION_CHUNK_STYLES } from "./chunks/style-engine-CqSmIlud.js";
5
+ import { _ as computeStyles, a as useProperty, c as useGlobalStyles, d as Element, f as tasty, g as filterBaseProps, h as _modAttrs, i as useFontFace, l as useStyles, m as processTokens, n as useFunction, o as useKeyframes, p as getDisplayName, r as useCounterStyle, s as useRawCSS, t as TastyBatchProvider } from "./chunks/react-runtime-B3CmvDEQ.js";
6
+ import { t as tastyDebug } from "./chunks/debug-BUwqo6vC.js";
7
+ import "./core/index.js";
8
+ export { APPEARANCE_CHUNK_STYLES, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CUSTOM_UNITS, ChunkSheetRegistry, DEFAULT_NAME_PREFIX, DEFAULT_ZERO_NAME_PREFIX, DIMENSION_CHUNK_STYLES, DIMENSION_STYLES, DIRECTIONS, DISPLAY_CHUNK_STYLES, Element, FLOW_STYLES, FONT_CHUNK_STYLES, INNER_STYLES, LAYOUT_CHUNK_STYLES, OUTER_STYLES, POSITION_CHUNK_STYLES, POSITION_STYLES, STYLE_TO_CHUNK, SheetManager, StyleInjector, StyleParser, TEXT_STYLES, TastyBatchProvider, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, dotize, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getDisplayName, getGlobalCounterStyles, getGlobalFontFaces, getGlobalFunctions, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getNamePrefix, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasPendingStyleWrites, hasStylesGenerated, hexToRgb, holdKeyframes, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunction, okhslPlugin, okhstFunction, okhstPlugin, ownKeyframes, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetStyleBatch, resolveFunctionColor, resolveRecipes, setGlobalPredefinedStates, strToRgb, stringifyStyles, styleHandlers, tasty, tastyDebug, touch, useCounterStyle, useFontFace, useFunction, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles };
@@ -1,7 +1,7 @@
1
- import { Styles } from "../styles/types.js";
1
+ import { b as Styles } from "./index-BzAC3p06.js";
2
2
 
3
3
  //#region src/utils/merge-styles.d.ts
4
4
  declare function mergeStyles(...objects: (Styles | undefined | null)[]): Styles;
5
5
  //#endregion
6
- export { mergeStyles };
7
- //# sourceMappingURL=merge-styles.d.ts.map
6
+ export { mergeStyles as t };
7
+ //# sourceMappingURL=merge-styles-BFktNP8J.d.ts.map
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,19 @@
1
+ import { t as hydrateTastyClasses } from "../chunks/hydrate-6YoHZP6A.js";
2
+ //#region src/ssr/astro-client.ts
3
+ /**
4
+ * Client-side cache hydration for Astro islands.
5
+ *
6
+ * Reads the class name list from `window.__TASTY__` (populated by
7
+ * inline scripts emitted during SSR) and pre-populates the injector
8
+ * so island hydration skips the style pipeline entirely.
9
+ *
10
+ * This module is browser-safe — it does NOT import node:async_hooks.
11
+ *
12
+ * Usage:
13
+ * - Automatically injected by tastyIntegration() via injectScript('before-hydration')
14
+ * - Can be imported manually: `import '@tenphi/tasty/ssr/astro-client'`
15
+ */
16
+ if (typeof window !== "undefined") hydrateTastyClasses();
17
+ //#endregion
18
+
19
+ //# sourceMappingURL=astro-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astro-client.js","names":[],"sources":["../../src/ssr/astro-client.ts"],"sourcesContent":["/**\n * Client-side cache hydration for Astro islands.\n *\n * Reads the class name list from `window.__TASTY__` (populated by\n * inline scripts emitted during SSR) and pre-populates the injector\n * so island hydration skips the style pipeline entirely.\n *\n * This module is browser-safe — it does NOT import node:async_hooks.\n *\n * Usage:\n * - Automatically injected by tastyIntegration() via injectScript('before-hydration')\n * - Can be imported manually: `import '@tenphi/tasty/ssr/astro-client'`\n */\n\nimport { hydrateTastyClasses } from './hydrate';\n\nif (typeof window !== 'undefined') {\n hydrateTastyClasses();\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAI,OAAO,WAAW,aACpB,oBAAoB"}
@@ -0,0 +1,11 @@
1
+ //#region src/ssr/astro-middleware-extract-static.d.ts
2
+ /**
3
+ * Prerender-extraction middleware entrypoint for sites without islands.
4
+ * Exported only so Astro can resolve it through the package exports map.
5
+ */
6
+ declare const onRequest: (context: {
7
+ isPrerendered?: boolean;
8
+ }, next: () => Promise<Response>) => Promise<Response>;
9
+ //#endregion
10
+ export { onRequest };
11
+ //# sourceMappingURL=astro-middleware-extract-static.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { tastyMiddleware } from "./astro.js";
2
+ const onRequest = tastyMiddleware({
3
+ transferCache: false,
4
+ extractionMetadata: true
5
+ });
6
+ //#endregion
7
+ export { onRequest };
8
+
9
+ //# sourceMappingURL=astro-middleware-extract-static.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astro-middleware-extract-static.js","names":[],"sources":["../../src/ssr/astro-middleware-extract-static.ts"],"sourcesContent":["/**\n * Prerender-extraction middleware entrypoint for sites without islands.\n * Exported only so Astro can resolve it through the package exports map.\n */\n\nimport { tastyMiddleware } from './astro';\n\nconst options = {\n transferCache: false,\n extractionMetadata: true,\n};\n\nexport const onRequest = tastyMiddleware(options);\n"],"mappings":";AAYA,MAAa,YAAY,gBAAgB;CAJvC,eAAe;CACf,oBAAoB;AAGmB,CAAO"}
@@ -0,0 +1,11 @@
1
+ //#region src/ssr/astro-middleware-extract.d.ts
2
+ /**
3
+ * Prerender-extraction middleware entrypoint with island cache transfer.
4
+ * Exported only so Astro can resolve it through the package exports map.
5
+ */
6
+ declare const onRequest: (context: {
7
+ isPrerendered?: boolean;
8
+ }, next: () => Promise<Response>) => Promise<Response>;
9
+ //#endregion
10
+ export { onRequest };
11
+ //# sourceMappingURL=astro-middleware-extract.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { tastyMiddleware } from "./astro.js";
2
+ const onRequest = tastyMiddleware({
3
+ transferCache: true,
4
+ extractionMetadata: true
5
+ });
6
+ //#endregion
7
+ export { onRequest };
8
+
9
+ //# sourceMappingURL=astro-middleware-extract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astro-middleware-extract.js","names":[],"sources":["../../src/ssr/astro-middleware-extract.ts"],"sourcesContent":["/**\n * Prerender-extraction middleware entrypoint with island cache transfer.\n * Exported only so Astro can resolve it through the package exports map.\n */\n\nimport { tastyMiddleware } from './astro';\n\nconst options = {\n transferCache: true,\n extractionMetadata: true,\n};\n\nexport const onRequest = tastyMiddleware(options);\n"],"mappings":";AAYA,MAAa,YAAY,gBAAgB;CAJvC,eAAe;CACf,oBAAoB;AAGmB,CAAO"}
@@ -0,0 +1,18 @@
1
+ //#region src/ssr/astro-middleware-static.d.ts
2
+ /**
3
+ * Astro middleware entrypoint for `tastyIntegration({ islands: false })`.
4
+ *
5
+ * Registered via `addMiddleware()` as
6
+ * `@tenphi/tasty/ssr/astro-middleware-static`. Exposed as a package subpath
7
+ * only so Astro can resolve it — use `tastyMiddleware({ transferCache: false })`
8
+ * directly if you need manual middleware composition.
9
+ *
10
+ * Identical to `./astro-middleware` except that no class-list `<script>` is
11
+ * emitted, so a site without `client:*` islands ships zero client JavaScript.
12
+ */
13
+ declare const onRequest: (context: {
14
+ isPrerendered?: boolean;
15
+ }, next: () => Promise<Response>) => Promise<Response>;
16
+ //#endregion
17
+ export { onRequest };
18
+ //# sourceMappingURL=astro-middleware-static.d.ts.map
@@ -0,0 +1,18 @@
1
+ import { tastyMiddleware } from "./astro.js";
2
+ //#region src/ssr/astro-middleware-static.ts
3
+ /**
4
+ * Astro middleware entrypoint for `tastyIntegration({ islands: false })`.
5
+ *
6
+ * Registered via `addMiddleware()` as
7
+ * `@tenphi/tasty/ssr/astro-middleware-static`. Exposed as a package subpath
8
+ * only so Astro can resolve it — use `tastyMiddleware({ transferCache: false })`
9
+ * directly if you need manual middleware composition.
10
+ *
11
+ * Identical to `./astro-middleware` except that no class-list `<script>` is
12
+ * emitted, so a site without `client:*` islands ships zero client JavaScript.
13
+ */
14
+ const onRequest = tastyMiddleware({ transferCache: false });
15
+ //#endregion
16
+ export { onRequest };
17
+
18
+ //# sourceMappingURL=astro-middleware-static.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astro-middleware-static.js","names":[],"sources":["../../src/ssr/astro-middleware-static.ts"],"sourcesContent":["/**\n * Astro middleware entrypoint for `tastyIntegration({ islands: false })`.\n *\n * Registered via `addMiddleware()` as\n * `@tenphi/tasty/ssr/astro-middleware-static`. Exposed as a package subpath\n * only so Astro can resolve it — use `tastyMiddleware({ transferCache: false })`\n * directly if you need manual middleware composition.\n *\n * Identical to `./astro-middleware` except that no class-list `<script>` is\n * emitted, so a site without `client:*` islands ships zero client JavaScript.\n */\n\nimport { tastyMiddleware } from './astro';\n\nexport const onRequest = tastyMiddleware({ transferCache: false });\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAa,YAAY,gBAAgB,EAAE,eAAe,MAAM,CAAC"}
@@ -0,0 +1,19 @@
1
+ //#region src/ssr/astro-middleware.d.ts
2
+ /**
3
+ * Astro middleware entrypoint for `tastyIntegration()`.
4
+ *
5
+ * Registered via `addMiddleware()` as `@tenphi/tasty/ssr/astro-middleware`.
6
+ * Exposed as a package subpath only so Astro can resolve it — use
7
+ * `tastyMiddleware()` directly if you need manual middleware composition.
8
+ *
9
+ * This is the islands variant: the rendered class list is transferred to the
10
+ * client so hydrating islands skip the style pipeline. See
11
+ * `./astro-middleware-static` for the variant used by
12
+ * `tastyIntegration({ islands: false })`.
13
+ */
14
+ declare const onRequest: (context: {
15
+ isPrerendered?: boolean;
16
+ }, next: () => Promise<Response>) => Promise<Response>;
17
+ //#endregion
18
+ export { onRequest };
19
+ //# sourceMappingURL=astro-middleware.d.ts.map
@@ -0,0 +1,19 @@
1
+ import { tastyMiddleware } from "./astro.js";
2
+ //#region src/ssr/astro-middleware.ts
3
+ /**
4
+ * Astro middleware entrypoint for `tastyIntegration()`.
5
+ *
6
+ * Registered via `addMiddleware()` as `@tenphi/tasty/ssr/astro-middleware`.
7
+ * Exposed as a package subpath only so Astro can resolve it — use
8
+ * `tastyMiddleware()` directly if you need manual middleware composition.
9
+ *
10
+ * This is the islands variant: the rendered class list is transferred to the
11
+ * client so hydrating islands skip the style pipeline. See
12
+ * `./astro-middleware-static` for the variant used by
13
+ * `tastyIntegration({ islands: false })`.
14
+ */
15
+ const onRequest = tastyMiddleware({ transferCache: true });
16
+ //#endregion
17
+ export { onRequest };
18
+
19
+ //# sourceMappingURL=astro-middleware.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astro-middleware.js","names":[],"sources":["../../src/ssr/astro-middleware.ts"],"sourcesContent":["/**\n * Astro middleware entrypoint for `tastyIntegration()`.\n *\n * Registered via `addMiddleware()` as `@tenphi/tasty/ssr/astro-middleware`.\n * Exposed as a package subpath only so Astro can resolve it — use\n * `tastyMiddleware()` directly if you need manual middleware composition.\n *\n * This is the islands variant: the rendered class list is transferred to the\n * client so hydrating islands skip the style pipeline. See\n * `./astro-middleware-static` for the variant used by\n * `tastyIntegration({ islands: false })`.\n */\n\nimport { tastyMiddleware } from './astro';\n\nexport const onRequest = tastyMiddleware({ transferCache: true });\n"],"mappings":";;;;;;;;;;;;;;AAeA,MAAa,YAAY,gBAAgB,EAAE,eAAe,KAAK,CAAC"}
@@ -1,29 +1,135 @@
1
- import { hydrateTastyCache } from "./hydrate.js";
2
-
3
1
  //#region src/ssr/astro.d.ts
2
+ /**
3
+ * Astro integration for Tasty SSR.
4
+ *
5
+ * Provides:
6
+ * - tastyIntegration() — Astro Integration API (recommended)
7
+ * - tastyMiddleware() — manual middleware for advanced composition
8
+ *
9
+ * Import from '@tenphi/tasty/ssr/astro'.
10
+ */
4
11
  interface TastyMiddlewareOptions {
5
12
  /**
6
- * Whether to embed the cache state script for client hydration.
7
- * Set to false to skip cache transfer. Default: true.
13
+ * Whether to embed the class-list script for client hydration.
14
+ * Set to false to skip class transfer (e.g. for CSP restrictions).
15
+ * Without it, client components may re-inject CSS that already exists
16
+ * in server-rendered `<style>` tags. Default: true.
8
17
  */
9
18
  transferCache?: boolean;
10
19
  }
11
20
  /**
12
21
  * Create an Astro middleware that collects Tasty styles during SSR.
13
22
  *
14
- * All React components rendered during the request (both static
15
- * and islands) will have their useStyles() calls captured by the
16
- * collector via AsyncLocalStorage. After rendering, the middleware
17
- * injects the collected CSS into </head>.
23
+ * All React components rendered during the request will have their
24
+ * computeStyles() calls captured by the collector via AsyncLocalStorage.
25
+ * After rendering, the middleware injects the collected CSS into </head>.
18
26
  *
19
- * @example
27
+ * @example Manual middleware setup
20
28
  * ```ts
21
29
  * // src/middleware.ts
22
30
  * import { tastyMiddleware } from '@tenphi/tasty/ssr/astro';
23
31
  * export const onRequest = tastyMiddleware();
24
32
  * ```
33
+ *
34
+ * @example Composing with other middleware
35
+ * ```ts
36
+ * // src/middleware.ts
37
+ * import { sequence } from 'astro:middleware';
38
+ * import { tastyMiddleware } from '@tenphi/tasty/ssr/astro';
39
+ *
40
+ * export const onRequest = sequence(
41
+ * tastyMiddleware(),
42
+ * myOtherMiddleware,
43
+ * );
44
+ * ```
45
+ */
46
+ declare function tastyMiddleware(options?: TastyMiddlewareOptions): (context: {
47
+ isPrerendered?: boolean;
48
+ }, next: () => Promise<Response>) => Promise<Response>;
49
+ interface TastyIntegrationCSSOptions {
50
+ /**
51
+ * CSS delivery mode. Extraction only applies to prerendered builds.
52
+ * Extracted CSS preserves resource URLs verbatim, so use absolute URLs or
53
+ * data URLs. Root-relative URLs are also supported unless `assetsPrefix`
54
+ * sends CSS to an external origin. The build rejects resource URLs whose
55
+ * targets would change after extraction.
56
+ */
57
+ mode?: 'inline' | 'extract';
58
+ }
59
+ interface TastyIntegrationOptions {
60
+ /**
61
+ * Enable island hydration support.
62
+ *
63
+ * When `true` (default): injects a client hydration script via
64
+ * `injectScript('before-hydration')` and sets `transferCache: true`
65
+ * on the middleware. Islands skip the style pipeline during hydration.
66
+ *
67
+ * When `false`: no client JS is shipped and `transferCache` is set
68
+ * to `false`. Use this for fully static sites without `client:*`
69
+ * directives.
70
+ */
71
+ islands?: boolean;
72
+ /** Configure inline or build-wide extracted CSS delivery. */
73
+ css?: TastyIntegrationCSSOptions;
74
+ }
75
+ /**
76
+ * Astro integration that automatically sets up Tasty SSR.
77
+ *
78
+ * Registers middleware for cross-component CSS deduplication and
79
+ * optionally injects a client hydration script for island support.
80
+ *
81
+ * @example Basic setup (with islands)
82
+ * ```ts
83
+ * // astro.config.mjs
84
+ * import { tastyIntegration } from '@tenphi/tasty/ssr/astro';
85
+ *
86
+ * export default defineConfig({
87
+ * integrations: [tastyIntegration()],
88
+ * });
89
+ * ```
90
+ *
91
+ * @example Static-only (no client JS)
92
+ * ```ts
93
+ * // astro.config.mjs
94
+ * import { tastyIntegration } from '@tenphi/tasty/ssr/astro';
95
+ *
96
+ * export default defineConfig({
97
+ * integrations: [tastyIntegration({ islands: false })],
98
+ * });
99
+ * ```
25
100
  */
26
- declare function tastyMiddleware(options?: TastyMiddlewareOptions): (_context: unknown, next: () => Promise<Response>) => Promise<Response>;
101
+ declare function tastyIntegration(options?: TastyIntegrationOptions): {
102
+ name: string;
103
+ hooks: {
104
+ 'astro:config:setup': ({
105
+ addMiddleware,
106
+ injectScript
107
+ }: {
108
+ addMiddleware: (middleware: {
109
+ entrypoint: string | URL;
110
+ order: "pre" | "post";
111
+ }) => void;
112
+ injectScript: (stage: "head-inline" | "before-hydration" | "page" | "page-ssr", content: string) => void;
113
+ }) => void;
114
+ 'astro:config:done': ({
115
+ config
116
+ }: {
117
+ config: {
118
+ base?: string;
119
+ site?: URL;
120
+ build?: {
121
+ assets?: string;
122
+ assetsPrefix?: string | Record<string, string>;
123
+ };
124
+ };
125
+ }) => void;
126
+ 'astro:build:done': ({
127
+ dir
128
+ }: {
129
+ dir: URL;
130
+ }) => Promise<void>;
131
+ };
132
+ };
27
133
  //#endregion
28
- export { TastyMiddlewareOptions, hydrateTastyCache, tastyMiddleware };
134
+ export { TastyIntegrationCSSOptions, TastyIntegrationOptions, TastyMiddlewareOptions, tastyIntegration, tastyMiddleware };
29
135
  //# sourceMappingURL=astro.d.ts.map