stillwind 0.7.0 → 0.9.0

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 (232) hide show
  1. package/CHANGELOG.md +193 -0
  2. package/css/builtin-variants/sw-conditional.css +10 -1
  3. package/css/builtin-variants/tw-relationship.css +4 -4
  4. package/css/builtins.css +1 -1
  5. package/dist/{class-object-D7ZGJOf_.d.ts → class-object-BaK8uudd.d.ts} +2 -2
  6. package/dist/class-object-DNcjzcfH.js +6 -0
  7. package/dist/{class-object-D24FFYqO.js.map → class-object-DNcjzcfH.js.map} +1 -1
  8. package/dist/{class-string-CQHnc9GN.d.ts → class-string-C5YFtXQn.d.ts} +2 -2
  9. package/dist/class-string-KnYInbiw.js +6 -0
  10. package/dist/{class-string-Db8-oI4q.js.map → class-string-KnYInbiw.js.map} +1 -1
  11. package/dist/{cva-BwX07CFw.js → formats-Ctf2WFc-.js} +87 -2
  12. package/dist/formats-Ctf2WFc-.js.map +1 -0
  13. package/dist/formats-aeLCNAXl.d.ts +73 -0
  14. package/dist/frameworks/alpine.d.ts +3 -3
  15. package/dist/frameworks/alpine.js +1 -1
  16. package/dist/frameworks/alpine.js.map +1 -1
  17. package/dist/frameworks/astro.d.ts +3 -3
  18. package/dist/frameworks/astro.js +1 -1
  19. package/dist/frameworks/lit.d.ts +3 -3
  20. package/dist/frameworks/lit.js +1 -1
  21. package/dist/frameworks/lit.js.map +1 -1
  22. package/dist/frameworks/preact.d.ts +3 -3
  23. package/dist/frameworks/preact.js +1 -1
  24. package/dist/frameworks/qwik.d.ts +3 -3
  25. package/dist/frameworks/qwik.js +1 -1
  26. package/dist/frameworks/react.d.ts +2 -2
  27. package/dist/frameworks/react.js +1 -1
  28. package/dist/frameworks/solid.d.ts +3 -3
  29. package/dist/frameworks/solid.js +1 -1
  30. package/dist/frameworks/svelte.d.ts +3 -3
  31. package/dist/frameworks/svelte.js +1 -1
  32. package/dist/frameworks/vanilla.d.ts +3 -3
  33. package/dist/frameworks/vanilla.js +1 -1
  34. package/dist/frameworks/vue.d.ts +3 -3
  35. package/dist/frameworks/vue.js +1 -1
  36. package/dist/{index-RwVFpxhE.d.ts → index-DBpgaaD7.d.ts} +54 -5
  37. package/dist/macro/index.d.ts +2 -2
  38. package/dist/macro/index.js +1 -1
  39. package/dist/runtime/development.d.ts +47 -0
  40. package/dist/{development-J-JCSIm0.js → runtime/development.js} +41 -5
  41. package/dist/runtime/development.js.map +1 -0
  42. package/dist/runtime/index.d.ts +2 -0
  43. package/dist/runtime/index.js +1 -0
  44. package/dist/{style-fTQbsVWZ.js → style-BE8vuLiO.js} +4 -1
  45. package/dist/style-BE8vuLiO.js.map +1 -0
  46. package/docs/at-rules/apply.md +5 -5
  47. package/docs/at-rules/custom-variant.md +12 -12
  48. package/docs/at-rules/index.md +19 -19
  49. package/docs/at-rules/plugin.md +7 -7
  50. package/docs/at-rules/registry-directives.md +9 -9
  51. package/docs/at-rules/slot.md +6 -6
  52. package/docs/at-rules/stillwind-css-template.md +7 -7
  53. package/docs/at-rules/stillwind-property.md +10 -10
  54. package/docs/at-rules/stillwind-registry.md +18 -18
  55. package/docs/at-rules/stillwind-require-properties.md +9 -9
  56. package/docs/at-rules/stillwind-slot.md +6 -6
  57. package/docs/at-rules/stillwind-undef-arbitrary-property.md +9 -9
  58. package/docs/at-rules/stillwind-undef-utility.md +10 -10
  59. package/docs/at-rules/stillwind-undef-variant.md +6 -6
  60. package/docs/at-rules/theme.md +23 -23
  61. package/docs/at-rules/utility.md +30 -30
  62. package/docs/at-rules/variant.md +6 -6
  63. package/docs/cli.md +11 -8
  64. package/docs/concepts/css-ordering.md +19 -19
  65. package/docs/concepts/how-styles-compile.md +17 -17
  66. package/docs/concepts/stylesheets.md +4 -4
  67. package/docs/configuration.md +34 -34
  68. package/docs/editors.md +9 -8
  69. package/docs/errors/SW01003.md +1 -1
  70. package/docs/errors/SW10001.md +1 -1
  71. package/docs/errors/SW10002.md +1 -1
  72. package/docs/errors/SW10004.md +7 -6
  73. package/docs/errors/SW10005.md +1 -1
  74. package/docs/errors/SW11001.md +1 -1
  75. package/docs/errors/SW11003.md +1 -1
  76. package/docs/errors/SW12001.md +2 -2
  77. package/docs/errors/SW12002.md +1 -1
  78. package/docs/errors/SW13001.md +1 -1
  79. package/docs/errors/SW13003.md +2 -2
  80. package/docs/errors/SW14001.md +1 -1
  81. package/docs/errors/SW14003.md +4 -4
  82. package/docs/errors/SW14004.md +2 -2
  83. package/docs/errors/SW14005.md +1 -1
  84. package/docs/errors/SW14006.md +1 -1
  85. package/docs/errors/SW14007.md +2 -2
  86. package/docs/errors/SW14008.md +1 -1
  87. package/docs/errors/SW30001.md +1 -1
  88. package/docs/errors/SW31001.md +1 -1
  89. package/docs/errors/SW31004.md +1 -1
  90. package/docs/errors/SW33005.md +1 -1
  91. package/docs/errors/SW34002.md +1 -1
  92. package/docs/errors/SW90001.md +1 -1
  93. package/docs/errors/SW90005.md +1 -1
  94. package/docs/errors/SW90006.md +1 -1
  95. package/docs/errors/index.md +72 -72
  96. package/docs/formatters.md +5 -5
  97. package/docs/guides/animations.md +7 -8
  98. package/docs/guides/design-systems.md +7 -7
  99. package/docs/guides/element-relationships.md +15 -19
  100. package/docs/guides/lint-adoption.md +5 -5
  101. package/docs/guides/migrating-from-css.md +11 -11
  102. package/docs/guides/migrating-from-tailwind.md +16 -16
  103. package/docs/guides/recommended-practices.md +18 -18
  104. package/docs/guides/responsive-styles.md +7 -7
  105. package/docs/guides/reusable-styles.md +10 -5
  106. package/docs/guides/runtime-conditions.md +6 -6
  107. package/docs/guides/style.md +42 -10
  108. package/docs/guides/tailwind-compatibility.md +23 -22
  109. package/docs/guides/view-transitions.md +9 -11
  110. package/docs/guides/web-components.md +4 -4
  111. package/docs/index.md +14 -12
  112. package/docs/integrations.md +3 -3
  113. package/docs/lints/ambiguous-style-base-order.md +4 -2
  114. package/docs/lints/bypassed-undefinition.md +3 -3
  115. package/docs/lints/clamped-value.md +1 -1
  116. package/docs/lints/conflicting-provider-properties.md +2 -2
  117. package/docs/lints/conflicting-utilities.md +45 -3
  118. package/docs/lints/document-scoped-selector.md +1 -1
  119. package/docs/lints/duplicate-definition.md +3 -3
  120. package/docs/lints/duplicate-utility.md +2 -2
  121. package/docs/lints/duplicate-view-transition-name.md +3 -3
  122. package/docs/lints/ignored-definition-condition.md +2 -2
  123. package/docs/lints/ignored-tailwind-feature.md +3 -3
  124. package/docs/lints/implicit-nesting-selector.md +2 -2
  125. package/docs/lints/incompatible-property-value.md +3 -3
  126. package/docs/lints/incompatible-theme-value.md +1 -1
  127. package/docs/lints/index.md +74 -73
  128. package/docs/lints/ineffective-anchor-scope.md +2 -2
  129. package/docs/lints/interfering-imported-style-base.md +22 -4
  130. package/docs/lints/invalid-animation-option.md +3 -3
  131. package/docs/lints/invalid-css-directive.md +3 -3
  132. package/docs/lints/invalid-css-import.md +2 -2
  133. package/docs/lints/invalid-css-input.md +4 -4
  134. package/docs/lints/invalid-cva-config.md +2 -2
  135. package/docs/lints/invalid-cva-input.md +4 -4
  136. package/docs/lints/invalid-keyframes-definition.md +2 -2
  137. package/docs/lints/invalid-keyframes-use.md +2 -2
  138. package/docs/lints/invalid-keyframes-variant.md +4 -4
  139. package/docs/lints/invalid-lint-suppression.md +3 -3
  140. package/docs/lints/invalid-marker-use.md +2 -2
  141. package/docs/lints/invalid-media-query.md +4 -4
  142. package/docs/lints/invalid-ref-input.md +4 -4
  143. package/docs/lints/invalid-rule-group-input.md +2 -2
  144. package/docs/lints/invalid-runtime-condition.md +3 -3
  145. package/docs/lints/invalid-stored-variant.md +52 -0
  146. package/docs/lints/invalid-style-composition.md +2 -2
  147. package/docs/lints/invalid-style-input.md +2 -2
  148. package/docs/lints/invalid-theme-reference.md +3 -3
  149. package/docs/lints/invalid-utility.md +3 -3
  150. package/docs/lints/invalid-variant.md +2 -2
  151. package/docs/lints/invalid-view-transition-definition.md +2 -2
  152. package/docs/lints/invalid-view-transition-use.md +2 -2
  153. package/docs/lints/invalid-view-transition-variant.md +3 -3
  154. package/docs/lints/mismatched-framework-import.md +3 -3
  155. package/docs/lints/missing-document-target.md +2 -2
  156. package/docs/lints/missing-ref-attachment.md +4 -4
  157. package/docs/lints/missing-view-transition-name.md +3 -3
  158. package/docs/lints/mutating-macro-argument.md +2 -2
  159. package/docs/lints/no-arbitrary-breakpoints.md +2 -2
  160. package/docs/lints/no-arbitrary-colors.md +2 -2
  161. package/docs/lints/no-arbitrary-spacing.md +1 -1
  162. package/docs/lints/no-class-property.md +3 -3
  163. package/docs/lints/no-important.md +2 -2
  164. package/docs/lints/no-restricted-declarations.md +1 -1
  165. package/docs/lints/no-restricted-length-units.md +1 -1
  166. package/docs/lints/no-restricted-theme-tokens.md +1 -1
  167. package/docs/lints/no-restricted-utilities.md +2 -2
  168. package/docs/lints/prefer-canonical-utilities.md +2 -2
  169. package/docs/lints/prefer-direct-styling.md +3 -3
  170. package/docs/lints/prefer-logical-properties.md +3 -3
  171. package/docs/lints/prefer-sorted-utilities.md +2 -2
  172. package/docs/lints/prefer-typed-relationships.md +3 -3
  173. package/docs/lints/prefer-typed-variables.md +1 -1
  174. package/docs/lints/prefer-variant-directive.md +3 -3
  175. package/docs/lints/redundant-variant.md +2 -2
  176. package/docs/lints/repeated-nesting-selector.md +2 -2
  177. package/docs/lints/runtime-condition-requires-css-if.md +3 -3
  178. package/docs/lints/split-view-transition-class.md +3 -3
  179. package/docs/lints/suspending-macro-argument.md +2 -2
  180. package/docs/lints/unknown-utility.md +4 -4
  181. package/docs/lints/unknown-variant.md +2 -2
  182. package/docs/lints/unmatched-host-selector.md +2 -2
  183. package/docs/lints/unsatisfiable-variants.md +1 -1
  184. package/docs/lints/unused-lint-suppression.md +1 -1
  185. package/docs/lints/unverified-style-base.md +2 -2
  186. package/docs/macros/anchor-scope.md +13 -13
  187. package/docs/macros/css.md +7 -7
  188. package/docs/macros/cva.md +17 -16
  189. package/docs/macros/index.md +10 -9
  190. package/docs/macros/keyframes.md +9 -9
  191. package/docs/macros/media.md +2 -2
  192. package/docs/macros/ref/as-anchor.md +11 -11
  193. package/docs/macros/ref/as-container.md +8 -8
  194. package/docs/macros/ref/at.md +10 -10
  195. package/docs/macros/ref/condition.md +9 -8
  196. package/docs/macros/ref/in.md +11 -11
  197. package/docs/macros/ref/index.md +17 -16
  198. package/docs/macros/ref/position-anchor.md +9 -9
  199. package/docs/macros/style.md +53 -27
  200. package/docs/macros/view-transition.md +17 -17
  201. package/docs/macros/when.md +129 -0
  202. package/docs/plugins/iconify.md +5 -5
  203. package/docs/plugins/index.md +4 -4
  204. package/docs/utilities-and-variants.md +6 -6
  205. package/docs/why.md +13 -15
  206. package/package.json +14 -28
  207. package/dist/class-object-D24FFYqO.js +0 -6
  208. package/dist/class-string-Db8-oI4q.js +0 -6
  209. package/dist/cva-BwX07CFw.js.map +0 -1
  210. package/dist/cva-DSpDNBYi.d.ts +0 -9
  211. package/dist/development-DttPQc71.d.ts +0 -27
  212. package/dist/development-J-JCSIm0.js.map +0 -1
  213. package/dist/runtime/class-name-object-development.d.ts +0 -10
  214. package/dist/runtime/class-name-object-development.js +0 -18
  215. package/dist/runtime/class-name-object-development.js.map +0 -1
  216. package/dist/runtime/class-name-object.d.ts +0 -16
  217. package/dist/runtime/class-name-object.js +0 -31
  218. package/dist/runtime/class-name-object.js.map +0 -1
  219. package/dist/runtime/class-object-development.d.ts +0 -10
  220. package/dist/runtime/class-object-development.js +0 -18
  221. package/dist/runtime/class-object-development.js.map +0 -1
  222. package/dist/runtime/class-object.d.ts +0 -16
  223. package/dist/runtime/class-object.js +0 -31
  224. package/dist/runtime/class-object.js.map +0 -1
  225. package/dist/runtime/class-string-development.d.ts +0 -10
  226. package/dist/runtime/class-string-development.js +0 -18
  227. package/dist/runtime/class-string-development.js.map +0 -1
  228. package/dist/runtime/class-string.d.ts +0 -16
  229. package/dist/runtime/class-string.js +0 -31
  230. package/dist/runtime/class-string.js.map +0 -1
  231. package/dist/shared-B9IQXU6P.d.ts +0 -32
  232. package/dist/style-fTQbsVWZ.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"cva-BwX07CFw.js","names":[],"sources":["../src/runtime/fragment.ts","../src/runtime/shared.ts","../src/runtime/cva.ts"],"sourcesContent":["/**\n * Framework conventions and private channels used to materialize fragments.\n * The three keys must be distinct and belong to the runtime that created the fragments.\n */\nexport type FragmentRuntimeOptions = readonly [\n /** Element prop that receives the combined class text. */\n classProperty: \"class\" | \"className\",\n /** Whether style records become objects or semicolon-separated declaration text. */\n styleFormat: \"object\" | \"string\",\n /** Own fragment property containing class text. */\n stillwindClassKey: symbol,\n /** Own fragment property containing the last authored style payload. */\n stillwindStyleKey: symbol,\n /** Own fragment property containing generated custom properties applied last. */\n stillwindCustomPropertiesKey: symbol,\n];\n\nexport function isObject(value: unknown): value is Record<PropertyKey, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\n/**\n * Converts a style payload using the framework's style convention.\n *\n * @param payload - Arbitrary payload. String mode accepts text and objects whose entries become declarations.\n * @param styleFormat - Object mode returns the payload unchanged; string mode serializes object entries in order.\n * @returns The payload, declaration text, or undefined for an unsupported string-mode payload.\n */\nexport function serializeStyle(payload: unknown, styleFormat: \"object\" | \"string\"): unknown {\n if (styleFormat === \"string\") {\n if (typeof payload === \"string\") {\n return payload;\n }\n if (isObject(payload)) {\n return Object.entries(payload)\n .map(([name, value]) => `${name}:${String(value)}`)\n .join(\";\");\n }\n return undefined;\n }\n return payload;\n}\n\n/**\n * Materializes class and style fragments without mutating the inputs.\n *\n * @param options - Framework conventions and the keys of the runtime that created the fragments.\n * @param values - Fragments or nested arrays.\n * Nonobjects are ignored. Materialized bases must first be converted with `toFragment`.\n * @returns Props with classes joined in traversal order. The last non-null fragment\n * style supplies inline style, and generated custom properties are combined and applied\n * last. Fragment symbol channels do not appear in the result.\n */\nexport function mergeFragments(\n options: FragmentRuntimeOptions,\n values: readonly unknown[],\n): Record<string, unknown> {\n const [\n classProperty,\n styleFormat,\n stillwindClassKey,\n stillwindStyleKey,\n stillwindCustomPropertiesKey,\n ] = options;\n const classes: string[] = [];\n const customProperties: Record<string, string> = {};\n let style: unknown;\n let hasStyle = false;\n\n const collect = (value: unknown): void => {\n if (!value) {\n return;\n }\n if (Array.isArray(value)) {\n for (const element of value) {\n collect(element);\n }\n return;\n }\n if (!isObject(value)) {\n return;\n }\n const fragment =\n Object.hasOwn(value, stillwindClassKey) ||\n Object.hasOwn(value, stillwindStyleKey) ||\n Object.hasOwn(value, stillwindCustomPropertiesKey);\n if (fragment) {\n const custom = value[stillwindCustomPropertiesKey];\n if (isObject(custom)) {\n Object.assign(customProperties, custom);\n }\n const contribution = value[stillwindClassKey];\n if (typeof contribution === \"string\" && contribution.length > 0) {\n classes.push(contribution);\n }\n if (Object.hasOwn(value, stillwindStyleKey)) {\n const payload = value[stillwindStyleKey];\n if (payload !== undefined && payload !== null) {\n style = payload;\n hasStyle = true;\n }\n }\n }\n };\n\n for (const value of values) {\n collect(value);\n }\n\n const result: Record<string, unknown> = {};\n if (classes.length > 0) {\n result[classProperty] = classes.join(\" \");\n }\n if (hasStyle) {\n const materialized = serializeStyle(style, styleFormat);\n if (materialized !== undefined) {\n result.style = materialized;\n }\n }\n if (Object.keys(customProperties).length > 0) {\n result.style =\n styleFormat === \"string\"\n ? [serializeStyle(result.style, styleFormat), serializeStyle(customProperties, styleFormat)]\n .filter(Boolean)\n .join(\";\")\n : { ...(isObject(result.style) ? result.style : {}), ...customProperties };\n }\n return result;\n}\n\n/**\n * Converts a composition base to a fragment that contributes only its class.\n *\n * A base contributes either `class` or `className`, or the class channel of a fragment\n * from this runtime. The receiving output's prop takes precedence unless it is null or\n * undefined. Style payloads and custom properties are ignored.\n *\n * @param options - The receiving framework's prop conventions and fragment keys.\n * @param value - A non-null object containing materialized props or this runtime's\n * fragment channels.\n * @returns A new fragment whose class channel holds the base's class value.\n */\nexport function toFragment(\n options: FragmentRuntimeOptions,\n value: Record<PropertyKey, unknown>,\n): Record<PropertyKey, unknown> {\n const [classProperty, , stillwindClassKey] = options;\n return {\n [stillwindClassKey]: Object.hasOwn(value, stillwindClassKey)\n ? value[stillwindClassKey]\n : (value[classProperty] ?? value[classProperty === \"class\" ? \"className\" : \"class\"]),\n };\n}\n","/**\n * Converts a dynamic value into text for a generated CSS declaration.\n *\n * @param value - CSS text, a number, a URL, or a boolean. URLs are quoted and CSS-escaped. True\n * becomes a space and false becomes `initial`.\n * @returns CSS value text. Strings and numbers are converted with `String`.\n */\nexport function stillwindCssValue(value: URL | string | number | boolean): string {\n if (typeof value === \"boolean\") {\n return value ? \" \" : \"initial\";\n }\n if (value instanceof URL) {\n const escaped = value.href.replace(\n /[\"\\\\\\n\\r\\f]/g,\n (character) => `\\\\${character.codePointAt(0)!.toString(16)} `,\n );\n return `url(\"${escaped}\")`;\n }\n return String(value);\n}\n\n/**\n * Flattens class contributions and joins nonempty values with spaces.\n *\n * @param values - Strings, numbers, bigints, nested arrays, or objects whose truthy values enable\n * their keys. Other values are ignored.\n * @returns Class text in contribution order, without deduplication.\n */\nexport function stillwindClsx(...values: readonly unknown[]): string {\n return values.flatMap(flatten).filter(Boolean).join(\" \");\n}\n\n/**\n * Escapes text for use as one CSS identifier.\n *\n * @param value - Unescaped identifier text.\n * @returns `CSS.escape` output when available, otherwise escaped text with NUL replaced by U+FFFD.\n */\nexport function stillwindEscapedIdentifier(value: string): string {\n if (typeof CSS !== \"undefined\" && typeof CSS.escape === \"function\") {\n return CSS.escape(value);\n }\n const characters = Array.from(value);\n let escaped = \"\";\n for (const [index, character] of characters.entries()) {\n const code = character.codePointAt(0)!;\n const isDigit = code >= 48 && code <= 57;\n const isControl = (code >= 1 && code <= 31) || code === 127;\n if (code === 0) {\n escaped += \"\\uFFFD\";\n } else if (isControl) {\n escaped += `\\\\${code.toString(16)} `;\n } else if (index === 0 && isDigit) {\n escaped += `\\\\${code.toString(16)} `;\n } else if (index === 0 && character === \"-\" && characters.length === 1) {\n escaped += \"\\\\-\";\n } else if (index === 1 && isDigit && characters[0] === \"-\") {\n escaped += `\\\\${code.toString(16)} `;\n } else if (\n isDigit ||\n (code >= 65 && code <= 90) ||\n (code >= 97 && code <= 122) ||\n code === 45 ||\n code === 95 ||\n code >= 128\n ) {\n escaped += character;\n } else {\n escaped += `\\\\${character}`;\n }\n }\n return escaped;\n}\n\n/**\n * Builds a CSS identifier for one keyed view transition.\n *\n * @param value - Nonempty class token or an object whose `v` property contains that token.\n * @param key - Key appended to the token after a hyphen using `String`.\n * @returns The combined token and key escaped as a CSS identifier.\n */\nexport function stillwindViewTransitionName(value: unknown, key: string | number): string {\n const token = typeof value === \"string\" ? value : (value as { v: string }).v;\n return stillwindEscapedIdentifier(`${token}-${String(key)}`);\n}\n\n/**\n * Expands one class contribution into strings without splitting class text.\n *\n * @param value - Class text, a number, a bigint, a nested array, or an object with enabled class\n * keys.\n * @returns Strings in traversal or object-entry order. Unsupported values produce an empty list.\n */\nfunction flatten(value: unknown): string[] {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"bigint\") {\n return [String(value)];\n }\n if (Array.isArray(value)) {\n return value.flatMap(flatten);\n }\n if (value && typeof value === \"object\") {\n return Object.entries(value as Record<string, unknown>)\n .filter(([, enabled]) => Boolean(enabled))\n .map(([name]) => name);\n }\n return [];\n}\n","import { mergeFragments, type FragmentRuntimeOptions } from \"./fragment.ts\";\nimport { stillwindClsx } from \"./shared.ts\";\n\n/** Compiler-produced class text, fragment channels, or nested fragment arrays. */\nexport type CvaValue = string | boolean | null | undefined | object;\n\n/** Compiled configuration whose structure is immutable after factory creation. */\nexport interface CompiledCvaConfig {\n readonly variants?: Readonly<Record<string, Readonly<Record<string, CvaValue>>>>;\n readonly defaultVariants?: Readonly<Record<string, string | number | boolean | null | undefined>>;\n readonly compoundVariants?: readonly Readonly<Record<string, unknown>>[];\n}\n\nfunction optionKey(value: unknown): unknown {\n return typeof value === \"boolean\" ? String(value) : value === 0 ? \"0\" : value;\n}\n\n/**\n * Creates a selector over compiler-produced values using the supplied framework channels.\n * Values are captured at creation. Each call returns fresh props without mutating inputs.\n * Undefined selections keep defaults; null suppresses an option. Matching compounds\n * contribute in array order, followed by external class and className inputs.\n *\n * @param options - Framework conventions and the keys used by compiled fragments.\n * @param base - Compiled styles included in every selection.\n * @param config - Immutable compiled option maps, defaults, and compound conditions.\n * @param classes - Concatenates external class inputs. Development calls supply validation.\n * @param merge - Materializes selected fragments. Development calls supply validation.\n * @returns A selector that materializes class and optional style props without private symbols.\n */\nexport function createCva(\n options: FragmentRuntimeOptions,\n base: CvaValue,\n config: CompiledCvaConfig = {},\n classes: typeof stillwindClsx = stillwindClsx,\n merge: typeof mergeFragments = mergeFragments,\n): (props?: Readonly<Record<string, unknown>>) => Record<string, unknown> {\n const axes = Object.keys(config.variants ?? {});\n const compounds = (config.compoundVariants ?? []).map((compound) => ({\n conditions: Object.entries(compound).filter(([key]) => key !== \"class\" && key !== \"className\"),\n class: compound.class as CvaValue,\n className: compound.className as CvaValue,\n }));\n const fragment = (value: CvaValue): unknown =>\n typeof value === \"string\" ? { [options[2]]: value } : value;\n\n return (props = {}) => {\n const values: unknown[] = [fragment(base)];\n const variants = config.variants;\n if (variants) {\n for (const axis of axes) {\n const supplied = props[axis];\n if (supplied === null) {\n continue;\n }\n const key = optionKey(supplied) || optionKey(config.defaultVariants?.[axis]);\n const choices = variants[axis]!;\n if ((typeof key === \"string\" || typeof key === \"number\") && Object.hasOwn(choices, key)) {\n values.push(fragment(choices[key]));\n }\n }\n const resolved = {\n ...config.defaultVariants,\n ...Object.fromEntries(Object.entries(props).filter(([, value]) => value !== undefined)),\n };\n for (const compound of compounds) {\n if (\n compound.conditions.every(([key, expected]) =>\n Array.isArray(expected) ? expected.includes(resolved[key]) : expected === resolved[key],\n )\n ) {\n values.push(fragment(compound.class), fragment(compound.className));\n }\n }\n }\n values.push({ [options[2]]: classes(props.class, props.className) });\n return merge(options, values);\n };\n}\n"],"mappings":";AAiBA,SAAgB,SAAS,OAAuD;CAC9E,OAA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9B;AACF"}
@@ -1,9 +0,0 @@
1
- /** Compiler-produced class text, fragment channels, or nested fragment arrays. */
2
- export type CvaValue = string | boolean | null | undefined | object;
3
- /** Compiled configuration whose structure is immutable after factory creation. */
4
- export interface CompiledCvaConfig {
5
- readonly variants?: Readonly<Record<string, Readonly<Record<string, CvaValue>>>>;
6
- readonly defaultVariants?: Readonly<Record<string, string | number | boolean | null | undefined>>;
7
- readonly compoundVariants?: readonly Readonly<Record<string, unknown>>[];
8
- }
9
- //# sourceMappingURL=cva-DSpDNBYi.d.ts.map
@@ -1,27 +0,0 @@
1
- /**
2
- * Reads a compiled ref's class token once.
3
- *
4
- * @param value - A ref record whose `.c` property contains a nonempty string.
5
- * @returns The class token.
6
- * @throws TypeError if the record or token is missing, or the token is empty or not a string.
7
- */
8
- export declare function stillwindRefClassChecked(value: unknown): string;
9
- /**
10
- * Validates external class inputs before concatenating them.
11
- *
12
- * @param values - Strings, numbers, bigints, nested arrays, or objects whose truthy entries enable their keys.
13
- * Booleans, null, and undefined add no text.
14
- * @returns Class text in contribution order without deduplication.
15
- * @throws TypeError when an input or nested array contains a function or symbol.
16
- */
17
- export declare function stillwindClsxChecked(...values: readonly unknown[]): string;
18
- /**
19
- * Names a keyed view transition after reading its token once.
20
- *
21
- * @param value - A nonempty class token or a record whose `.v` contains that token.
22
- * @param key - A key appended after a hyphen using `String`.
23
- * @returns The token and key escaped as one CSS identifier.
24
- * @throws TypeError when the token is missing, empty, or not a string.
25
- */
26
- export declare function stillwindViewTransitionNameChecked(value: unknown, key: string | number): string;
27
- //# sourceMappingURL=development-DttPQc71.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"development-J-JCSIm0.js","names":[],"sources":["../src/runtime/development.ts"],"sourcesContent":["/** Runtime validation selected explicitly by development compilations. */\n\nimport { createCva, type CompiledCvaConfig, type CvaValue } from \"./cva.ts\";\nimport { isObject, mergeFragments, toFragment, type FragmentRuntimeOptions } from \"./fragment.ts\";\nimport { stillwindClsx, stillwindViewTransitionName } from \"./shared.ts\";\n\n/**\n * Reads a compiled ref's class token once.\n *\n * @param value - A ref record whose `.c` property contains a nonempty string.\n * @returns The class token.\n * @throws TypeError if the record or token is missing, or the token is empty or not a string.\n */\nexport function stillwindRefClassChecked(value: unknown): string {\n const token = isObject(value) ? value.c : undefined;\n if (typeof token !== \"string\" || !token) {\n throw new TypeError(\"Stillwind received a ref without a class token in .c.\");\n }\n return token;\n}\n\n/**\n * Validates external class inputs before concatenating them.\n *\n * @param values - Strings, numbers, bigints, nested arrays, or objects whose truthy entries enable their keys.\n * Booleans, null, and undefined add no text.\n * @returns Class text in contribution order without deduplication.\n * @throws TypeError when an input or nested array contains a function or symbol.\n */\nexport function stillwindClsxChecked(...values: readonly unknown[]): string {\n function check(value: unknown): void {\n if (value == null || [\"string\", \"number\", \"bigint\", \"boolean\"].includes(typeof value)) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach(check);\n return;\n }\n if (isObject(value)) {\n return;\n }\n throw new TypeError(`Stillwind received an unsupported class value: ${typeof value}.`);\n }\n values.forEach(check);\n return stillwindClsx(...values);\n}\n\n/**\n * Creates a CVA selector that validates external classes and selected fragment channels.\n * The selector throws TypeError for inputs rejected by `stillwindClsxChecked` or `mergeFragmentsChecked`.\n *\n * @param options - Framework conventions and the keys of the runtime that created the fragments.\n * @param base - Compiled styles included in every selection.\n * @param config - Immutable compiled option maps, defaults, and compound conditions.\n * @returns A selector with the same selection and props behavior as `createCva`.\n */\nexport function createCvaChecked(\n options: FragmentRuntimeOptions,\n base?: CvaValue,\n config?: CompiledCvaConfig,\n) {\n return createCva(options, base, config, stillwindClsxChecked, mergeFragmentsChecked);\n}\n\n/**\n * Validates fragment channels before materializing framework props.\n *\n * @param options - The receiving framework's conventions and distinct fragment keys.\n * @param values - Inputs accepted by `mergeFragments`.\n * @returns The same props as `mergeFragments` for valid inputs.\n * @throws TypeError for foreign symbol keys, unconverted class props, or a non-null class channel that is not a string.\n */\nexport function mergeFragmentsChecked(\n options: FragmentRuntimeOptions,\n values: readonly unknown[],\n): Record<string, unknown> {\n const [, , stillwindClassKey, stillwindStyleKey, stillwindCustomPropertiesKey] = options;\n const keys = [stillwindClassKey, stillwindStyleKey, stillwindCustomPropertiesKey];\n\n function check(value: unknown): void {\n if (Array.isArray(value)) {\n value.forEach(check);\n return;\n }\n if (!isObject(value)) {\n return;\n }\n const symbols = Object.getOwnPropertySymbols(value);\n if (symbols.some((key) => !keys.includes(key))) {\n throw new TypeError(\"Stillwind received a fragment from a different runtime instance.\");\n }\n if (\n !symbols.some((key) => keys.includes(key)) &&\n (Object.hasOwn(value, \"class\") || Object.hasOwn(value, \"className\"))\n ) {\n throw new TypeError(\n \"Stillwind received a materialized props object; convert it with stillwindToFragment() first.\",\n );\n }\n const classes = value[stillwindClassKey];\n if (classes != null && typeof classes !== \"string\") {\n throw new TypeError(\"Stillwind received a fragment with a non-string class value.\");\n }\n }\n\n values.forEach(check);\n return mergeFragments(options, values);\n}\n\n/**\n * Validates a composition base before converting it to a class-only fragment.\n *\n * @param options - The receiving framework's conventions and distinct fragment keys.\n * @param value - A non-null props object or a fragment belonging to this runtime.\n * @returns The result of `toFragment` for the object.\n * @throws TypeError when the value is null or is not an object.\n */\nexport function toFragmentChecked(\n options: FragmentRuntimeOptions,\n value: unknown,\n): Record<PropertyKey, unknown> {\n if (!isObject(value)) {\n throw new TypeError(\"Stillwind expected a materialized props object.\");\n }\n return toFragment(options, value);\n}\n\n/**\n * Names a keyed view transition after reading its token once.\n *\n * @param value - A nonempty class token or a record whose `.v` contains that token.\n * @param key - A key appended after a hyphen using `String`.\n * @returns The token and key escaped as one CSS identifier.\n * @throws TypeError when the token is missing, empty, or not a string.\n */\nexport function stillwindViewTransitionNameChecked(value: unknown, key: string | number): string {\n const token = typeof value === \"string\" ? value : isObject(value) ? value.v : undefined;\n if (typeof token !== \"string\" || !token) {\n throw new TypeError(\"Stillwind received a view transition without a class token.\");\n }\n return stillwindViewTransitionName(token, key);\n}\n"],"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AM,UAAU,MAAM;EACtB,IAAI,WAAW,QAAQ,OAAO,YAAY,UACxC,MAAM,IAAI,UAAU,8DAA8D;CAEtF;CAEA,OAAO,QAAQ,KAAK;CACpB,OAAO,eAAe,SAAS,MAAM;AACvC;;;;;;;;;AAUA,SAAgB,kBACd,SACA,OAC8B;CAC9B,IAAI,CAAC,SAAS,KAAK,GACjB,MAAM,IAAI,UAAU,iDAAiD;CAEvE,OAAO,WAAW,SAAS,KAAK;AAClC;;;;;;;;;AAUA,SAAgB,mCAAmC,OAAgB,KAA8B;CAC/F,MAAM,QAAQ,OAAO,UAAU,WAAW,QAAQ,SAAS,KAAK,IAAI,MAAM,IAAI,KAAA;CAC9E,IAAI,OAAO,UAAU,YAAY,CAAC,OAChC,MAAM,IAAI,UAAU,6DAA6D;CAEnF,OAAO,4BAA4B,OAAO,GAAG;AAC/C"}
@@ -1,10 +0,0 @@
1
- import { CompiledCvaConfig, CvaValue } from "../cva-DSpDNBYi.js";
2
- import { stillwindClsxChecked, stillwindRefClassChecked, stillwindViewTransitionNameChecked } from "../development-DttPQc71.js";
3
- /** Checks fragment ownership and class contributions before materializing `className` and object styles. */
4
- export declare function stillwindMergeChecked(...values: readonly unknown[]): Record<string, unknown>;
5
- /** Rejects nonobjects before converting either class prop to a class-only fragment. */
6
- export declare function stillwindToFragmentChecked(value: unknown): Record<PropertyKey, unknown>;
7
- /** Checks external classes and selected fragments before materializing CVA props with `className` and object styles. */
8
- export declare function stillwindCvaChecked(base?: CvaValue, config?: CompiledCvaConfig): (props?: Readonly<Record<string, unknown>>) => Record<string, unknown>;
9
- export { stillwindClsxChecked, stillwindRefClassChecked, stillwindViewTransitionNameChecked };
10
- //# sourceMappingURL=class-name-object-development.d.ts.map
@@ -1,18 +0,0 @@
1
- import { options } from "./class-name-object.js";
2
- import { createCvaChecked, mergeFragmentsChecked, stillwindClsxChecked, stillwindRefClassChecked, stillwindViewTransitionNameChecked, toFragmentChecked } from "../development-J-JCSIm0.js";
3
- // src/runtime/class-name-object-development.ts
4
- /** Checks fragment ownership and class contributions before materializing `className` and object styles. */
5
- function stillwindMergeChecked(...values) {
6
- return mergeFragmentsChecked(options, values);
7
- }
8
- /** Rejects nonobjects before converting either class prop to a class-only fragment. */
9
- function stillwindToFragmentChecked(value) {
10
- return toFragmentChecked(options, value);
11
- }
12
- /** Checks external classes and selected fragments before materializing CVA props with `className` and object styles. */
13
- function stillwindCvaChecked(base, config) {
14
- return createCvaChecked(options, base, config);
15
- }
16
- export { stillwindClsxChecked, stillwindCvaChecked, stillwindMergeChecked, stillwindRefClassChecked, stillwindToFragmentChecked, stillwindViewTransitionNameChecked };
17
-
18
- //# sourceMappingURL=class-name-object-development.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-name-object-development.js","names":[],"sources":["../../src/runtime/class-name-object-development.ts"],"sourcesContent":["import { options } from \"./class-name-object.ts\";\nimport type { CompiledCvaConfig, CvaValue } from \"./cva.ts\";\nimport { createCvaChecked, mergeFragmentsChecked, toFragmentChecked } from \"./development.ts\";\n\nexport {\n stillwindClsxChecked,\n stillwindRefClassChecked,\n stillwindViewTransitionNameChecked,\n} from \"./development.ts\";\n\n/** Checks fragment ownership and class contributions before materializing `className` and object styles. */\nexport function stillwindMergeChecked(...values: readonly unknown[]): Record<string, unknown> {\n return mergeFragmentsChecked(options, values);\n}\n\n/** Rejects nonobjects before converting either class prop to a class-only fragment. */\nexport function stillwindToFragmentChecked(value: unknown): Record<PropertyKey, unknown> {\n return toFragmentChecked(options, value);\n}\n\n/** Checks external classes and selected fragments before materializing CVA props with `className` and object styles. */\nexport function stillwindCvaChecked(base?: CvaValue, config?: CompiledCvaConfig) {\n return createCvaChecked(options, base, config);\n}\n"],"mappings":";;;;AAWA,SAAgB,sBAAsB,GAAG,QAAqD;CAC5F,OAAO,sBAAsB,SAAS,MAAM;AAC9C;;AAGA,SAAgB,2BAA2B,OAA8C;CACvF,OAAO,kBAAkB,SAAS,KAAK;AACzC;;AAGA,SAAgB,oBAAoB,MAAiB,QAA4B;CAC/E,OAAO,iBAAiB,SAAS,MAAM,MAAM;AAC/C"}
@@ -1,16 +0,0 @@
1
- import { stillwindClsx, stillwindCssValue, stillwindEscapedIdentifier, stillwindViewTransitionName } from "../shared-B9IQXU6P.js";
2
- import { CompiledCvaConfig, CvaValue } from "../cva-DSpDNBYi.js";
3
- export declare const stillwindClassKey: unique symbol;
4
- export declare const stillwindStyleKey: unique symbol;
5
- export declare const stillwindCustomPropertiesKey: unique symbol;
6
- export declare const options: readonly ["className", "object", typeof stillwindClassKey, typeof stillwindStyleKey, typeof stillwindCustomPropertiesKey];
7
- /** Materializes ordered fragments with `className` and object styles. */
8
- export declare function stillwindMerge(...values: readonly unknown[]): Record<string, unknown>;
9
- /** Converts either class prop of a composition base to a class-only fragment. */
10
- export declare function stillwindToFragment(value: Record<PropertyKey, unknown>): Record<PropertyKey, unknown>;
11
- /** Returns the supplied style payload, or undefined for null or undefined. */
12
- export declare function stillwindStyleValue(value: unknown): unknown;
13
- /** Selects compiled CVA values and returns fresh props with `className` and object styles. */
14
- export declare function stillwindCva(base?: CvaValue, config?: CompiledCvaConfig): (props?: Readonly<Record<string, unknown>>) => Record<string, unknown>;
15
- export { stillwindClsx, stillwindCssValue, stillwindEscapedIdentifier, stillwindViewTransitionName };
16
- //# sourceMappingURL=class-name-object.d.ts.map
@@ -1,31 +0,0 @@
1
- import { createCva, mergeFragments, serializeStyle, stillwindClsx, stillwindCssValue, stillwindEscapedIdentifier, stillwindViewTransitionName, toFragment } from "../cva-BwX07CFw.js";
2
- // src/runtime/class-name-object.ts
3
- const stillwindClassKey = /* @__PURE__ */ Symbol("stillwind.class-name-object.class");
4
- const stillwindStyleKey = /* @__PURE__ */ Symbol("stillwind.class-name-object.style");
5
- const stillwindCustomPropertiesKey = /* @__PURE__ */ Symbol("stillwind.class-name-object.custom-properties");
6
- const options = [
7
- "className",
8
- "object",
9
- stillwindClassKey,
10
- stillwindStyleKey,
11
- stillwindCustomPropertiesKey
12
- ];
13
- /** Materializes ordered fragments with `className` and object styles. */
14
- function stillwindMerge(...values) {
15
- return mergeFragments(options, values);
16
- }
17
- /** Converts either class prop of a composition base to a class-only fragment. */
18
- function stillwindToFragment(value) {
19
- return toFragment(options, value);
20
- }
21
- /** Returns the supplied style payload, or undefined for null or undefined. */
22
- function stillwindStyleValue(value) {
23
- return value == null ? void 0 : serializeStyle(value, "object");
24
- }
25
- /** Selects compiled CVA values and returns fresh props with `className` and object styles. */
26
- function stillwindCva(base, config) {
27
- return createCva(options, base, config);
28
- }
29
- export { options, stillwindClassKey, stillwindClsx, stillwindCssValue, stillwindCustomPropertiesKey, stillwindCva, stillwindEscapedIdentifier, stillwindMerge, stillwindStyleKey, stillwindStyleValue, stillwindToFragment, stillwindViewTransitionName };
30
-
31
- //# sourceMappingURL=class-name-object.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-name-object.js","names":[],"sources":["../../src/runtime/class-name-object.ts"],"sourcesContent":["import { createCva, type CompiledCvaConfig, type CvaValue } from \"./cva.ts\";\nimport { mergeFragments, serializeStyle, toFragment } from \"./fragment.ts\";\n\nexport * from \"./shared.ts\";\n\nexport const stillwindClassKey = /* @__PURE__ */ Symbol(\"stillwind.class-name-object.class\");\n\nexport const stillwindStyleKey = /* @__PURE__ */ Symbol(\"stillwind.class-name-object.style\");\n\nexport const stillwindCustomPropertiesKey = /* @__PURE__ */ Symbol(\n \"stillwind.class-name-object.custom-properties\",\n);\n\nexport const options = [\n \"className\",\n \"object\",\n stillwindClassKey,\n stillwindStyleKey,\n stillwindCustomPropertiesKey,\n] as const;\n\n/** Materializes ordered fragments with `className` and object styles. */\nexport function stillwindMerge(...values: readonly unknown[]): Record<string, unknown> {\n return mergeFragments(options, values);\n}\n\n/** Converts either class prop of a composition base to a class-only fragment. */\nexport function stillwindToFragment(\n value: Record<PropertyKey, unknown>,\n): Record<PropertyKey, unknown> {\n return toFragment(options, value);\n}\n\n/** Returns the supplied style payload, or undefined for null or undefined. */\nexport function stillwindStyleValue(value: unknown): unknown {\n return value == null ? undefined : serializeStyle(value, \"object\");\n}\n\n/** Selects compiled CVA values and returns fresh props with `className` and object styles. */\nexport function stillwindCva(base?: CvaValue, config?: CompiledCvaConfig) {\n return createCva(options, base, config);\n}\n"],"mappings":";;AAKA,MAAa,oBAAoC,uBAAO,mCAAmC;AAE3F,MAAa,oBAAoC,uBAAO,mCAAmC;AAE3F,MAAa,+BAA+C,uBAC1D,+CACF;AAEA,MAAa,UAAU;CACrB;CACA;CACA;CACA;CACA;AACF;;AAGA,SAAgB,eAAe,GAAG,QAAqD;CACrF,OAAO,eAAe,SAAS,MAAM;AACvC;;AAGA,SAAgB,oBACd,OAC8B;CAC9B,OAAO,WAAW,SAAS,KAAK;AAClC;;AAGA,SAAgB,oBAAoB,OAAyB;CAC3D,OAAO,SAAS,OAAO,KAAA,IAAY,eAAe,OAAO,QAAQ;AACnE;;AAGA,SAAgB,aAAa,MAAiB,QAA4B;CACxE,OAAO,UAAU,SAAS,MAAM,MAAM;AACxC"}
@@ -1,10 +0,0 @@
1
- import { CompiledCvaConfig, CvaValue } from "../cva-DSpDNBYi.js";
2
- import { stillwindClsxChecked, stillwindRefClassChecked, stillwindViewTransitionNameChecked } from "../development-DttPQc71.js";
3
- /** Checks fragment ownership and class contributions before materializing `class` and object styles. */
4
- export declare function stillwindMergeChecked(...values: readonly unknown[]): Record<string, unknown>;
5
- /** Rejects nonobjects before converting either class prop to a class-only fragment. */
6
- export declare function stillwindToFragmentChecked(value: unknown): Record<PropertyKey, unknown>;
7
- /** Checks external classes and selected fragments before materializing CVA props with `class` and object styles. */
8
- export declare function stillwindCvaChecked(base?: CvaValue, config?: CompiledCvaConfig): (props?: Readonly<Record<string, unknown>>) => Record<string, unknown>;
9
- export { stillwindClsxChecked, stillwindRefClassChecked, stillwindViewTransitionNameChecked };
10
- //# sourceMappingURL=class-object-development.d.ts.map
@@ -1,18 +0,0 @@
1
- import { createCvaChecked, mergeFragmentsChecked, stillwindClsxChecked, stillwindRefClassChecked, stillwindViewTransitionNameChecked, toFragmentChecked } from "../development-J-JCSIm0.js";
2
- import { options } from "./class-object.js";
3
- // src/runtime/class-object-development.ts
4
- /** Checks fragment ownership and class contributions before materializing `class` and object styles. */
5
- function stillwindMergeChecked(...values) {
6
- return mergeFragmentsChecked(options, values);
7
- }
8
- /** Rejects nonobjects before converting either class prop to a class-only fragment. */
9
- function stillwindToFragmentChecked(value) {
10
- return toFragmentChecked(options, value);
11
- }
12
- /** Checks external classes and selected fragments before materializing CVA props with `class` and object styles. */
13
- function stillwindCvaChecked(base, config) {
14
- return createCvaChecked(options, base, config);
15
- }
16
- export { stillwindClsxChecked, stillwindCvaChecked, stillwindMergeChecked, stillwindRefClassChecked, stillwindToFragmentChecked, stillwindViewTransitionNameChecked };
17
-
18
- //# sourceMappingURL=class-object-development.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-object-development.js","names":[],"sources":["../../src/runtime/class-object-development.ts"],"sourcesContent":["import { options } from \"./class-object.ts\";\nimport type { CompiledCvaConfig, CvaValue } from \"./cva.ts\";\nimport { createCvaChecked, mergeFragmentsChecked, toFragmentChecked } from \"./development.ts\";\n\nexport {\n stillwindClsxChecked,\n stillwindRefClassChecked,\n stillwindViewTransitionNameChecked,\n} from \"./development.ts\";\n\n/** Checks fragment ownership and class contributions before materializing `class` and object styles. */\nexport function stillwindMergeChecked(...values: readonly unknown[]): Record<string, unknown> {\n return mergeFragmentsChecked(options, values);\n}\n\n/** Rejects nonobjects before converting either class prop to a class-only fragment. */\nexport function stillwindToFragmentChecked(value: unknown): Record<PropertyKey, unknown> {\n return toFragmentChecked(options, value);\n}\n\n/** Checks external classes and selected fragments before materializing CVA props with `class` and object styles. */\nexport function stillwindCvaChecked(base?: CvaValue, config?: CompiledCvaConfig) {\n return createCvaChecked(options, base, config);\n}\n"],"mappings":";;;;AAWA,SAAgB,sBAAsB,GAAG,QAAqD;CAC5F,OAAO,sBAAsB,SAAS,MAAM;AAC9C;;AAGA,SAAgB,2BAA2B,OAA8C;CACvF,OAAO,kBAAkB,SAAS,KAAK;AACzC;;AAGA,SAAgB,oBAAoB,MAAiB,QAA4B;CAC/E,OAAO,iBAAiB,SAAS,MAAM,MAAM;AAC/C"}
@@ -1,16 +0,0 @@
1
- import { stillwindClsx, stillwindCssValue, stillwindEscapedIdentifier, stillwindViewTransitionName } from "../shared-B9IQXU6P.js";
2
- import { CompiledCvaConfig, CvaValue } from "../cva-DSpDNBYi.js";
3
- export declare const stillwindClassKey: unique symbol;
4
- export declare const stillwindStyleKey: unique symbol;
5
- export declare const stillwindCustomPropertiesKey: unique symbol;
6
- export declare const options: readonly ["class", "object", typeof stillwindClassKey, typeof stillwindStyleKey, typeof stillwindCustomPropertiesKey];
7
- /** Materializes ordered fragments with `class` and object styles. */
8
- export declare function stillwindMerge(...values: readonly unknown[]): Record<string, unknown>;
9
- /** Converts either class prop of a composition base to a class-only fragment. */
10
- export declare function stillwindToFragment(value: Record<PropertyKey, unknown>): Record<PropertyKey, unknown>;
11
- /** Returns the supplied style payload, or undefined for null or undefined. */
12
- export declare function stillwindStyleValue(value: unknown): unknown;
13
- /** Selects compiled CVA values and returns fresh props with `class` and object styles. */
14
- export declare function stillwindCva(base?: CvaValue, config?: CompiledCvaConfig): (props?: Readonly<Record<string, unknown>>) => Record<string, unknown>;
15
- export { stillwindClsx, stillwindCssValue, stillwindEscapedIdentifier, stillwindViewTransitionName };
16
- //# sourceMappingURL=class-object.d.ts.map
@@ -1,31 +0,0 @@
1
- import { createCva, mergeFragments, serializeStyle, stillwindClsx, stillwindCssValue, stillwindEscapedIdentifier, stillwindViewTransitionName, toFragment } from "../cva-BwX07CFw.js";
2
- // src/runtime/class-object.ts
3
- const stillwindClassKey = /* @__PURE__ */ Symbol("stillwind.class-object.class");
4
- const stillwindStyleKey = /* @__PURE__ */ Symbol("stillwind.class-object.style");
5
- const stillwindCustomPropertiesKey = /* @__PURE__ */ Symbol("stillwind.class-object.custom-properties");
6
- const options = [
7
- "class",
8
- "object",
9
- stillwindClassKey,
10
- stillwindStyleKey,
11
- stillwindCustomPropertiesKey
12
- ];
13
- /** Materializes ordered fragments with `class` and object styles. */
14
- function stillwindMerge(...values) {
15
- return mergeFragments(options, values);
16
- }
17
- /** Converts either class prop of a composition base to a class-only fragment. */
18
- function stillwindToFragment(value) {
19
- return toFragment(options, value);
20
- }
21
- /** Returns the supplied style payload, or undefined for null or undefined. */
22
- function stillwindStyleValue(value) {
23
- return value == null ? void 0 : serializeStyle(value, "object");
24
- }
25
- /** Selects compiled CVA values and returns fresh props with `class` and object styles. */
26
- function stillwindCva(base, config) {
27
- return createCva(options, base, config);
28
- }
29
- export { options, stillwindClassKey, stillwindClsx, stillwindCssValue, stillwindCustomPropertiesKey, stillwindCva, stillwindEscapedIdentifier, stillwindMerge, stillwindStyleKey, stillwindStyleValue, stillwindToFragment, stillwindViewTransitionName };
30
-
31
- //# sourceMappingURL=class-object.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-object.js","names":[],"sources":["../../src/runtime/class-object.ts"],"sourcesContent":["import { createCva, type CompiledCvaConfig, type CvaValue } from \"./cva.ts\";\nimport { mergeFragments, serializeStyle, toFragment } from \"./fragment.ts\";\n\nexport * from \"./shared.ts\";\n\nexport const stillwindClassKey = /* @__PURE__ */ Symbol(\"stillwind.class-object.class\");\n\nexport const stillwindStyleKey = /* @__PURE__ */ Symbol(\"stillwind.class-object.style\");\n\nexport const stillwindCustomPropertiesKey = /* @__PURE__ */ Symbol(\n \"stillwind.class-object.custom-properties\",\n);\n\nexport const options = [\n \"class\",\n \"object\",\n stillwindClassKey,\n stillwindStyleKey,\n stillwindCustomPropertiesKey,\n] as const;\n\n/** Materializes ordered fragments with `class` and object styles. */\nexport function stillwindMerge(...values: readonly unknown[]): Record<string, unknown> {\n return mergeFragments(options, values);\n}\n\n/** Converts either class prop of a composition base to a class-only fragment. */\nexport function stillwindToFragment(\n value: Record<PropertyKey, unknown>,\n): Record<PropertyKey, unknown> {\n return toFragment(options, value);\n}\n\n/** Returns the supplied style payload, or undefined for null or undefined. */\nexport function stillwindStyleValue(value: unknown): unknown {\n return value == null ? undefined : serializeStyle(value, \"object\");\n}\n\n/** Selects compiled CVA values and returns fresh props with `class` and object styles. */\nexport function stillwindCva(base?: CvaValue, config?: CompiledCvaConfig) {\n return createCva(options, base, config);\n}\n"],"mappings":";;AAKA,MAAa,oBAAoC,uBAAO,8BAA8B;AAEtF,MAAa,oBAAoC,uBAAO,8BAA8B;AAEtF,MAAa,+BAA+C,uBAC1D,0CACF;AAEA,MAAa,UAAU;CACrB;CACA;CACA;CACA;CACA;AACF;;AAGA,SAAgB,eAAe,GAAG,QAAqD;CACrF,OAAO,eAAe,SAAS,MAAM;AACvC;;AAGA,SAAgB,oBACd,OAC8B;CAC9B,OAAO,WAAW,SAAS,KAAK;AAClC;;AAGA,SAAgB,oBAAoB,OAAyB;CAC3D,OAAO,SAAS,OAAO,KAAA,IAAY,eAAe,OAAO,QAAQ;AACnE;;AAGA,SAAgB,aAAa,MAAiB,QAA4B;CACxE,OAAO,UAAU,SAAS,MAAM,MAAM;AACxC"}
@@ -1,10 +0,0 @@
1
- import { CompiledCvaConfig, CvaValue } from "../cva-DSpDNBYi.js";
2
- import { stillwindClsxChecked, stillwindRefClassChecked, stillwindViewTransitionNameChecked } from "../development-DttPQc71.js";
3
- /** Checks fragment ownership and class contributions before materializing `class` and string styles. */
4
- export declare function stillwindMergeChecked(...values: readonly unknown[]): Record<string, unknown>;
5
- /** Rejects nonobjects before converting either class prop to a class-only fragment. */
6
- export declare function stillwindToFragmentChecked(value: unknown): Record<PropertyKey, unknown>;
7
- /** Checks external classes and selected fragments before materializing CVA props with `class` and string styles. */
8
- export declare function stillwindCvaChecked(base?: CvaValue, config?: CompiledCvaConfig): (props?: Readonly<Record<string, unknown>>) => Record<string, unknown>;
9
- export { stillwindClsxChecked, stillwindRefClassChecked, stillwindViewTransitionNameChecked };
10
- //# sourceMappingURL=class-string-development.d.ts.map
@@ -1,18 +0,0 @@
1
- import { createCvaChecked, mergeFragmentsChecked, stillwindClsxChecked, stillwindRefClassChecked, stillwindViewTransitionNameChecked, toFragmentChecked } from "../development-J-JCSIm0.js";
2
- import { options } from "./class-string.js";
3
- // src/runtime/class-string-development.ts
4
- /** Checks fragment ownership and class contributions before materializing `class` and string styles. */
5
- function stillwindMergeChecked(...values) {
6
- return mergeFragmentsChecked(options, values);
7
- }
8
- /** Rejects nonobjects before converting either class prop to a class-only fragment. */
9
- function stillwindToFragmentChecked(value) {
10
- return toFragmentChecked(options, value);
11
- }
12
- /** Checks external classes and selected fragments before materializing CVA props with `class` and string styles. */
13
- function stillwindCvaChecked(base, config) {
14
- return createCvaChecked(options, base, config);
15
- }
16
- export { stillwindClsxChecked, stillwindCvaChecked, stillwindMergeChecked, stillwindRefClassChecked, stillwindToFragmentChecked, stillwindViewTransitionNameChecked };
17
-
18
- //# sourceMappingURL=class-string-development.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-string-development.js","names":[],"sources":["../../src/runtime/class-string-development.ts"],"sourcesContent":["import { options } from \"./class-string.ts\";\nimport type { CompiledCvaConfig, CvaValue } from \"./cva.ts\";\nimport { createCvaChecked, mergeFragmentsChecked, toFragmentChecked } from \"./development.ts\";\n\nexport {\n stillwindClsxChecked,\n stillwindRefClassChecked,\n stillwindViewTransitionNameChecked,\n} from \"./development.ts\";\n\n/** Checks fragment ownership and class contributions before materializing `class` and string styles. */\nexport function stillwindMergeChecked(...values: readonly unknown[]): Record<string, unknown> {\n return mergeFragmentsChecked(options, values);\n}\n\n/** Rejects nonobjects before converting either class prop to a class-only fragment. */\nexport function stillwindToFragmentChecked(value: unknown): Record<PropertyKey, unknown> {\n return toFragmentChecked(options, value);\n}\n\n/** Checks external classes and selected fragments before materializing CVA props with `class` and string styles. */\nexport function stillwindCvaChecked(base?: CvaValue, config?: CompiledCvaConfig) {\n return createCvaChecked(options, base, config);\n}\n"],"mappings":";;;;AAWA,SAAgB,sBAAsB,GAAG,QAAqD;CAC5F,OAAO,sBAAsB,SAAS,MAAM;AAC9C;;AAGA,SAAgB,2BAA2B,OAA8C;CACvF,OAAO,kBAAkB,SAAS,KAAK;AACzC;;AAGA,SAAgB,oBAAoB,MAAiB,QAA4B;CAC/E,OAAO,iBAAiB,SAAS,MAAM,MAAM;AAC/C"}
@@ -1,16 +0,0 @@
1
- import { stillwindClsx, stillwindCssValue, stillwindEscapedIdentifier, stillwindViewTransitionName } from "../shared-B9IQXU6P.js";
2
- import { CompiledCvaConfig, CvaValue } from "../cva-DSpDNBYi.js";
3
- export declare const stillwindClassKey: unique symbol;
4
- export declare const stillwindStyleKey: unique symbol;
5
- export declare const stillwindCustomPropertiesKey: unique symbol;
6
- export declare const options: readonly ["class", "string", typeof stillwindClassKey, typeof stillwindStyleKey, typeof stillwindCustomPropertiesKey];
7
- /** Materializes ordered fragments with `class` and string styles. */
8
- export declare function stillwindMerge(...values: readonly unknown[]): Record<string, unknown>;
9
- /** Converts either class prop of a composition base to a class-only fragment. */
10
- export declare function stillwindToFragment(value: Record<PropertyKey, unknown>): Record<PropertyKey, unknown>;
11
- /** Serializes object style declarations or preserves a string. Other inputs omit style. */
12
- export declare function stillwindStyleValue(value: unknown): unknown;
13
- /** Selects compiled CVA values and returns fresh props with `class` and string styles. */
14
- export declare function stillwindCva(base?: CvaValue, config?: CompiledCvaConfig): (props?: Readonly<Record<string, unknown>>) => Record<string, unknown>;
15
- export { stillwindClsx, stillwindCssValue, stillwindEscapedIdentifier, stillwindViewTransitionName };
16
- //# sourceMappingURL=class-string.d.ts.map
@@ -1,31 +0,0 @@
1
- import { createCva, mergeFragments, serializeStyle, stillwindClsx, stillwindCssValue, stillwindEscapedIdentifier, stillwindViewTransitionName, toFragment } from "../cva-BwX07CFw.js";
2
- // src/runtime/class-string.ts
3
- const stillwindClassKey = /* @__PURE__ */ Symbol("stillwind.class-string.class");
4
- const stillwindStyleKey = /* @__PURE__ */ Symbol("stillwind.class-string.style");
5
- const stillwindCustomPropertiesKey = /* @__PURE__ */ Symbol("stillwind.class-string.custom-properties");
6
- const options = [
7
- "class",
8
- "string",
9
- stillwindClassKey,
10
- stillwindStyleKey,
11
- stillwindCustomPropertiesKey
12
- ];
13
- /** Materializes ordered fragments with `class` and string styles. */
14
- function stillwindMerge(...values) {
15
- return mergeFragments(options, values);
16
- }
17
- /** Converts either class prop of a composition base to a class-only fragment. */
18
- function stillwindToFragment(value) {
19
- return toFragment(options, value);
20
- }
21
- /** Serializes object style declarations or preserves a string. Other inputs omit style. */
22
- function stillwindStyleValue(value) {
23
- return value == null ? void 0 : serializeStyle(value, "string");
24
- }
25
- /** Selects compiled CVA values and returns fresh props with `class` and string styles. */
26
- function stillwindCva(base, config) {
27
- return createCva(options, base, config);
28
- }
29
- export { options, stillwindClassKey, stillwindClsx, stillwindCssValue, stillwindCustomPropertiesKey, stillwindCva, stillwindEscapedIdentifier, stillwindMerge, stillwindStyleKey, stillwindStyleValue, stillwindToFragment, stillwindViewTransitionName };
30
-
31
- //# sourceMappingURL=class-string.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-string.js","names":[],"sources":["../../src/runtime/class-string.ts"],"sourcesContent":["import { createCva, type CompiledCvaConfig, type CvaValue } from \"./cva.ts\";\nimport { mergeFragments, serializeStyle, toFragment } from \"./fragment.ts\";\n\nexport * from \"./shared.ts\";\n\nexport const stillwindClassKey = /* @__PURE__ */ Symbol(\"stillwind.class-string.class\");\n\nexport const stillwindStyleKey = /* @__PURE__ */ Symbol(\"stillwind.class-string.style\");\n\nexport const stillwindCustomPropertiesKey = /* @__PURE__ */ Symbol(\n \"stillwind.class-string.custom-properties\",\n);\n\nexport const options = [\n \"class\",\n \"string\",\n stillwindClassKey,\n stillwindStyleKey,\n stillwindCustomPropertiesKey,\n] as const;\n\n/** Materializes ordered fragments with `class` and string styles. */\nexport function stillwindMerge(...values: readonly unknown[]): Record<string, unknown> {\n return mergeFragments(options, values);\n}\n\n/** Converts either class prop of a composition base to a class-only fragment. */\nexport function stillwindToFragment(\n value: Record<PropertyKey, unknown>,\n): Record<PropertyKey, unknown> {\n return toFragment(options, value);\n}\n\n/** Serializes object style declarations or preserves a string. Other inputs omit style. */\nexport function stillwindStyleValue(value: unknown): unknown {\n return value == null ? undefined : serializeStyle(value, \"string\");\n}\n\n/** Selects compiled CVA values and returns fresh props with `class` and string styles. */\nexport function stillwindCva(base?: CvaValue, config?: CompiledCvaConfig) {\n return createCva(options, base, config);\n}\n"],"mappings":";;AAKA,MAAa,oBAAoC,uBAAO,8BAA8B;AAEtF,MAAa,oBAAoC,uBAAO,8BAA8B;AAEtF,MAAa,+BAA+C,uBAC1D,0CACF;AAEA,MAAa,UAAU;CACrB;CACA;CACA;CACA;CACA;AACF;;AAGA,SAAgB,eAAe,GAAG,QAAqD;CACrF,OAAO,eAAe,SAAS,MAAM;AACvC;;AAGA,SAAgB,oBACd,OAC8B;CAC9B,OAAO,WAAW,SAAS,KAAK;AAClC;;AAGA,SAAgB,oBAAoB,OAAyB;CAC3D,OAAO,SAAS,OAAO,KAAA,IAAY,eAAe,OAAO,QAAQ;AACnE;;AAGA,SAAgB,aAAa,MAAiB,QAA4B;CACxE,OAAO,UAAU,SAAS,MAAM,MAAM;AACxC"}
@@ -1,32 +0,0 @@
1
- /**
2
- * Converts a dynamic value into text for a generated CSS declaration.
3
- *
4
- * @param value - CSS text, a number, a URL, or a boolean. URLs are quoted and CSS-escaped. True
5
- * becomes a space and false becomes `initial`.
6
- * @returns CSS value text. Strings and numbers are converted with `String`.
7
- */
8
- export declare function stillwindCssValue(value: URL | string | number | boolean): string;
9
- /**
10
- * Flattens class contributions and joins nonempty values with spaces.
11
- *
12
- * @param values - Strings, numbers, bigints, nested arrays, or objects whose truthy values enable
13
- * their keys. Other values are ignored.
14
- * @returns Class text in contribution order, without deduplication.
15
- */
16
- export declare function stillwindClsx(...values: readonly unknown[]): string;
17
- /**
18
- * Escapes text for use as one CSS identifier.
19
- *
20
- * @param value - Unescaped identifier text.
21
- * @returns `CSS.escape` output when available, otherwise escaped text with NUL replaced by U+FFFD.
22
- */
23
- export declare function stillwindEscapedIdentifier(value: string): string;
24
- /**
25
- * Builds a CSS identifier for one keyed view transition.
26
- *
27
- * @param value - Nonempty class token or an object whose `v` property contains that token.
28
- * @param key - Key appended to the token after a hyphen using `String`.
29
- * @returns The combined token and key escaped as a CSS identifier.
30
- */
31
- export declare function stillwindViewTransitionName(value: unknown, key: string | number): string;
32
- //# sourceMappingURL=shared-B9IQXU6P.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style-fTQbsVWZ.js","names":[],"sources":["../src/macro/style.ts"],"sourcesContent":["/** Framework macros and the placeholders that the compiler replaces. */\n\nimport type { StyleCssInput, StyleCssOptions } from \"./css.ts\";\nimport type {\n CvaClassProps,\n CvaConfig,\n CvaInput,\n CvaResult,\n CvaSelection,\n CvaVariants,\n} from \"./cva.ts\";\nimport type { CheckedStyleInputs, StyleArgument } from \"./input.ts\";\nimport type { StyleKeyframes, StyleKeyframesDefinition } from \"./keyframes.ts\";\nimport type { StyleOutput, StyleResult } from \"./output.ts\";\nimport type { StyleRefProjection } from \"./projection.ts\";\nimport type { AnchorScope, StyleRef } from \"./refs.ts\";\nimport type { StyleViewTransition, StyleViewTransitionDefinition } from \"./view-transition.ts\";\n\n/**\n * Internal use only. The compiler inserts this identity argument in source used by the\n * TypeScript checker. Application code must not construct or pass it.\n *\n * @internal\n */\nexport type StillwindDeclarationIdentity<Id extends string> = {\n readonly __stillwindDeclarationIdentity: Id;\n};\n\n/**\n * Compile-time UI declarations with pure value expressions.\n *\n * Only completed style calls and declaration macros produce reusable values.\n * Projections require their supported style input positions. Ref variants require\n * computed variant keys or utility template substitutions.\n *\n * Each argument expression must return an equivalent value for the same inputs and must\n * not mutate shared data or perform observable effects, including through callees,\n * getters, or value conversion. Calls need no PURE annotation. Functions may mutate\n * fresh local data used only to compute their result.\n *\n * Evaluation order and count are not API guarantees: unused expressions may be omitted\n * and class/value conversions may be combined. Do not rely on exceptions from unused\n * expressions. Read time/randomness and perform I/O, state updates, Hooks, await/yield,\n * imports, JSX, and class initialization outside the macro. Pass their resulting\n * values. Reactive reads stay in the current computation scope and must not be used\n * only to establish a subscription.\n *\n * Names, utility definitions, animation options, and selector/query arguments are\n * static declarations. Dynamic identity selectors and view-transition keys obey the\n * same value-expression contract. Declaration-identity overloads are internal checker\n * metadata.\n */\nexport type StyleMacro<Props = object> = {\n /**\n * Internal use only. The checker supplies the final identity argument to track the\n * completed props value. Application code must use the overload without it.\n *\n * @param inputs - Style inputs followed by the declaration identity inserted by the compiler.\n * The public overload validates authored inputs. This overload adds identity tracking for the checker.\n * @returns The composed style props with the supplied declaration identity.\n * @internal\n */\n <Inputs extends readonly StyleArgument[], Id extends string>(\n ...inputs: [...Inputs, StillwindDeclarationIdentity<Id>]\n ): StyleResult<Id, StyleOutput<Props, Inputs>>;\n\n /**\n * Compiles static utility branches and combines them with inline custom\n * properties, external classes, and completed style props.\n *\n * Value expressions must obey the purity contract of {@link StyleMacro}. Projection\n * and animation-use calls must appear directly at supported input positions. Ref\n * variants require computed keys or utility template substitutions.\n *\n * @param inputs - Rule and class inputs in composition order. Custom properties\n * replace earlier values, and classes are concatenated. Utility construction must be\n * static, and invalid utilities or unsupported syntax cause compilation errors.\n * @returns Framework props that may be stored, exported, passed, returned, or spread\n * onto an element. Store this result before passing it to another `style()` call.\n * Direct nested calls are rejected. The class prop is optional. The optional style\n * prop is present in the type when inputs include custom properties, participant\n * naming, or composed props that may contain inline style. CSS is emitted at build\n * time.\n */\n <Inputs extends readonly StyleArgument[]>(\n ...inputs: Inputs & CheckedStyleInputs<Inputs>\n ): StyleResult<string, StyleOutput<Props, Inputs>>;\n\n /**\n * Declares an unlabeled DOM identity in a binding initializer.\n * Passing the declaration to `style()` attaches its marker to that element.\n *\n * @returns A reusable ref declaration that may be stored, exported, passed, returned,\n * or conditionally selected. Its identity belongs to the declaration site. Repeated\n * evaluation does not allocate new CSS identities.\n */\n ref(): StyleRef;\n\n /**\n * Declares a labeled DOM identity in a binding initializer.\n * Passing the declaration to `style()` attaches its marker to that element.\n *\n * @param label - A string literal used in generated names. Empty text omits the\n * label. Labels do not determine declaration identity.\n * @returns A reusable ref declaration that may be stored, exported, passed, returned,\n * or conditionally selected. Repeated evaluation keeps its identity.\n */\n ref(label: string): StyleRef;\n\n /**\n * Internal use only. The checker supplies identity for an unlabeled ref declaration.\n * Application code must use `ref()` without this argument.\n *\n * @internal\n */\n ref<const Id extends string>(identity: StillwindDeclarationIdentity<Id>): StyleRef<Id>;\n\n /**\n * Internal use only. The checker supplies identity for a labeled ref declaration.\n * Application code must use `ref(label)` without the identity argument.\n *\n * @internal\n */\n ref<const Id extends string>(\n label: string,\n identity: StillwindDeclarationIdentity<Id>,\n ): StyleRef<Id>;\n\n /**\n * Declares a local animation in a binding initializer and assigns its CSS name.\n *\n * Apply it by calling the returned declaration with literal options directly inside\n * `style()`. The animation use cannot be stored for later consumption.\n *\n * @param definition - A direct static object with frame utility strings, optional\n * media/supports replacement bodies, and an optional literal label. Invalid frame\n * syntax or utilities cause compilation errors.\n * @returns A reusable keyframes declaration that may be stored, exported, passed,\n * returned, or conditionally selected. Its identity belongs to the declaration site.\n */\n keyframes(definition: StyleKeyframesDefinition): StyleKeyframes;\n\n /**\n * Internal use only. The checker supplies identity for a keyframes declaration.\n * Application code must use `keyframes(definition)` without the identity argument.\n *\n * @internal\n */\n keyframes<const Id extends string>(\n definition: StyleKeyframesDefinition,\n identity: StillwindDeclarationIdentity<Id>,\n ): StyleKeyframes<Id>;\n\n /**\n * Declares view transition phases in a binding initializer and assigns their class.\n *\n * Pass the declaration to `style()` to mark participants, or call `.for(key)`\n * directly inside `style()` to also name them. The naming use cannot be stored.\n *\n * @param definition - A direct static object with at least one literal phase\n * string and an optional literal label. Invalid phases, utilities, or condition\n * variants cause compilation errors.\n * @returns A reusable transition declaration that may be stored, exported, passed,\n * returned, or conditionally selected. Its identity belongs to the declaration site.\n */\n viewTransition(definition: StyleViewTransitionDefinition): StyleViewTransition;\n\n /**\n * Internal use only. The checker supplies identity for a view transition declaration.\n * Application code must use `viewTransition(definition)` without the identity argument.\n *\n * @internal\n */\n viewTransition<const Id extends string>(\n definition: StyleViewTransitionDefinition,\n identity: StillwindDeclarationIdentity<Id>,\n ): StyleViewTransition<Id>;\n\n /**\n * Adds anchor-scope without requiring a ref marker on the element.\n *\n * Use this call directly in a style input. The argument follows the same literal\n * keyword or array rules as `ref.asAnchor`. An empty array emits no declaration.\n * The returned projection cannot be stored, exported, passed, or returned for later\n * consumption.\n *\n * @param scope - A literal `\"all\"`, `\"none\"`, or array of refs. All possible\n * identities of each entry are included. Empty arrays and duplicate identities\n * produce lint findings.\n * @returns Rule input that supplies anchor-scope when consumed by `style()`.\n */\n anchorScope(scope: AnchorScope): StyleRefProjection;\n\n /**\n * Returns the media query list of variants, such as for `window.matchMedia()`.\n *\n * The compiler replaces the call with a string, so the result can be stored, exported,\n * and passed. The string has no `@media` or braces. Write the call outside other macro\n * calls.\n *\n * @param variants - String literals of variants whose definitions contain only media\n * conditions, with an optional final `:`. The variants of one argument must all hold,\n * and the arguments are alternatives: `media(\"sm:motion-reduce\", \"print\")` matches a\n * wide screen with reduced motion, or print. An argument that does not resolve or that\n * contains another kind of condition, such as `hover`, matches nothing and produces a\n * lint finding.\n * @returns A media query list. It is `\"not all\"` when no argument can match.\n */\n media(...variants: [string, ...string[]]): string;\n\n /**\n * Returns a stylesheet built from utilities, such as for a shadow root.\n *\n * The compiler replaces the call with a string, so the result can be stored,\n * exported, and passed, for example to `CSSStyleSheet.replaceSync()`. The call adds\n * nothing to the document stylesheet. The string contains the rules and the theme\n * values, keyframes, and custom-property support that they need, placed by the\n * selected `@stillwind-css-template`. It never contains preflight.\n *\n * A selector-replacing variant, such as `host:`, `[:host]:`, or `[button]:`, selects\n * the element that a utility styles. Utilities without one need the `selector`\n * option, or are omitted with a lint finding. Write the call outside other macro\n * calls.\n *\n * @param inputs - Static utility strings, arrays, and variant groups. A final\n * object whose keys are only `template` and `selector` is the options.\n * @returns Stylesheet text.\n */\n css(...inputs: StyleCssInput[]): string;\n\n /**\n * Returns a stylesheet built from utilities, with the options in the last argument.\n *\n * @param inputs - Static utility inputs followed by the options object.\n * @returns Stylesheet text.\n */\n css(...inputs: [...StyleCssInput[], StyleCssOptions]): string;\n\n /**\n * Compiles a CVA definition and returns a function that selects element props.\n * Write the configuration and utility inputs directly in the call. Utility inputs\n * cannot contain `&&` or ternary expressions. Pass runtime conditions as variant\n * selections. Custom properties remain inline and value expressions obey this\n * macro's purity contract.\n *\n * @param base - Optional styles included in every selection.\n * @param config - Static variants, defaults, and compound conditions.\n * @returns A reusable factory returning fresh framework class and style props.\n * Its results cannot be passed to style() for composition.\n */\n cva<Variants extends CvaVariants = Record<never, never>>(\n base?: CvaInput,\n config?: CvaConfig<Variants>,\n ): (props?: CvaSelection<Variants> & CvaClassProps) => CvaResult<Props>;\n};\n\n/**\n * Internal use only. Builds the placeholder exported by each framework entrypoint.\n * The compiler replaces supported macro calls before the application runs.\n *\n * @returns A fresh callable object with declaration and scope methods. Calling the\n * object or any of these methods throws an Error about missing integration. Creating\n * the placeholder itself does not execute any macro or generate CSS.\n *\n * @internal\n */\nexport function createStyleMacro<Props>(): StyleMacro<Props> {\n return Object.assign(\n (): never => {\n throw new Error(\n \"Stillwind style() is a compile-time macro. Configure the Stillwind integration for your build tool.\",\n );\n },\n {\n anchorScope(): never {\n throw new Error(\"Stillwind style.anchorScope() is a compile-time macro.\");\n },\n ref(): never {\n throw new Error(\"Stillwind style.ref() is a compile-time macro.\");\n },\n keyframes(): never {\n throw new Error(\"Stillwind style.keyframes() is a compile-time macro.\");\n },\n viewTransition(): never {\n throw new Error(\"Stillwind style.viewTransition() is a compile-time macro.\");\n },\n cva(): never {\n throw new Error(\"Stillwind style.cva() is a compile-time macro.\");\n },\n media(): never {\n throw new Error(\"Stillwind style.media() is a compile-time macro.\");\n },\n css(): never {\n throw new Error(\"Stillwind style.css() is a compile-time macro.\");\n },\n },\n );\n}\n"],"mappings":";;;;;;;;;;;AA0QA,SAAgB,mBAA6C;CAC3D,OAAO,OAAO,aACC;EACX,MAAM,IAAI,MACR,qGACF;CACF,GACA;EACE,cAAqB;GACnB,MAAM,IAAI,MAAM,wDAAwD;EAC1E;EACA,MAAa;GACX,MAAM,IAAI,MAAM,gDAAgD;EAClE;EACA,YAAmB;GACjB,MAAM,IAAI,MAAM,sDAAsD;EACxE;EACA,iBAAwB;GACtB,MAAM,IAAI,MAAM,2DAA2D;EAC7E;EACA,MAAa;GACX,MAAM,IAAI,MAAM,gDAAgD;EAClE;EACA,QAAe;GACb,MAAM,IAAI,MAAM,kDAAkD;EACpE;EACA,MAAa;GACX,MAAM,IAAI,MAAM,gDAAgD;EAClE;CACF,CACF;AACF"}