stillwind 0.11.0 → 0.13.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 (120) hide show
  1. package/AGENTS_TEMPLATE.md +3 -2
  2. package/CHANGELOG.md +80 -0
  3. package/README.md +3 -3
  4. package/css/builtin-utilities/tw-borders.css +59 -59
  5. package/css/builtin-utilities/tw-effects.css +53 -53
  6. package/css/builtin-utilities/tw-typography.css +13 -13
  7. package/dist/class-object-C87DR3v2.js +6 -0
  8. package/dist/class-object-C87DR3v2.js.map +1 -0
  9. package/dist/class-object-CR0QHoF9.d.ts +10 -0
  10. package/dist/{class-string-C5YFtXQn.d.ts → class-string-BlClX8JK.d.ts} +2 -2
  11. package/dist/class-string-CiNTVHYm.js +6 -0
  12. package/dist/{class-string-KnYInbiw.js.map → class-string-CiNTVHYm.js.map} +1 -1
  13. package/dist/{formats-Ctf2WFc-.js → formats-DP9B9SG6.js} +228 -113
  14. package/dist/formats-DP9B9SG6.js.map +1 -0
  15. package/dist/{formats-aeLCNAXl.d.ts → formats-NBNjMP5R.d.ts} +34 -12
  16. package/dist/frameworks/alpine.d.ts +5 -3
  17. package/dist/frameworks/alpine.js +3 -1
  18. package/dist/frameworks/alpine.js.map +1 -1
  19. package/dist/frameworks/astro.d.ts +3 -3
  20. package/dist/frameworks/astro.js +1 -1
  21. package/dist/frameworks/lit.d.ts +5 -3
  22. package/dist/frameworks/lit.js +3 -1
  23. package/dist/frameworks/lit.js.map +1 -1
  24. package/dist/frameworks/preact.d.ts +3 -3
  25. package/dist/frameworks/preact.js +1 -1
  26. package/dist/frameworks/qwik.d.ts +3 -3
  27. package/dist/frameworks/qwik.js +1 -1
  28. package/dist/frameworks/react.d.ts +2 -2
  29. package/dist/frameworks/react.js +1 -1
  30. package/dist/frameworks/solid.d.ts +3 -3
  31. package/dist/frameworks/solid.js +1 -1
  32. package/dist/frameworks/svelte.d.ts +3 -3
  33. package/dist/frameworks/svelte.js +1 -1
  34. package/dist/frameworks/vanilla.d.ts +5 -3
  35. package/dist/frameworks/vanilla.js +6 -1
  36. package/dist/frameworks/vanilla.js.map +1 -0
  37. package/dist/frameworks/vue.d.ts +3 -3
  38. package/dist/frameworks/vue.js +1 -1
  39. package/dist/{index-DBpgaaD7.d.ts → index-DpaDcczW.d.ts} +157 -57
  40. package/dist/macro/index.d.ts +2 -2
  41. package/dist/macro/index.js +1 -1
  42. package/dist/runtime/development.d.ts +16 -8
  43. package/dist/runtime/development.js +57 -21
  44. package/dist/runtime/development.js.map +1 -1
  45. package/dist/runtime/index.d.ts +2 -2
  46. package/dist/runtime/index.js +1 -1
  47. package/dist/style-dMBm8aX_.js +50 -0
  48. package/dist/style-dMBm8aX_.js.map +1 -0
  49. package/docs/agents.md +1 -0
  50. package/docs/at-rules/apply.md +1 -1
  51. package/docs/at-rules/custom-variant.md +1 -1
  52. package/docs/at-rules/slot.md +1 -1
  53. package/docs/at-rules/stillwind-property.md +1 -1
  54. package/docs/at-rules/stillwind-registry.md +7 -7
  55. package/docs/at-rules/stillwind-require-properties.md +1 -1
  56. package/docs/at-rules/stillwind-undef-arbitrary-property.md +1 -1
  57. package/docs/at-rules/stillwind-undef-utility.md +1 -1
  58. package/docs/at-rules/stillwind-undef-variant.md +1 -1
  59. package/docs/at-rules/theme.md +5 -5
  60. package/docs/at-rules/utility.md +43 -4
  61. package/docs/at-rules/variant.md +1 -1
  62. package/docs/cli.md +146 -51
  63. package/docs/concepts/css-ordering.md +46 -7
  64. package/docs/concepts/how-styles-compile.md +8 -8
  65. package/docs/configuration.md +63 -4
  66. package/docs/errors/SW01001.md +1 -1
  67. package/docs/errors/SW03001.md +1 -1
  68. package/docs/errors/SW10004.md +1 -1
  69. package/docs/errors/SW10005.md +1 -1
  70. package/docs/errors/SW10006.md +34 -0
  71. package/docs/errors/SW11001.md +1 -1
  72. package/docs/errors/SW12001.md +1 -1
  73. package/docs/errors/SW12002.md +1 -1
  74. package/docs/errors/SW13002.md +1 -1
  75. package/docs/errors/SW14001.md +1 -1
  76. package/docs/errors/SW14002.md +1 -1
  77. package/docs/errors/SW14003.md +1 -1
  78. package/docs/errors/SW14004.md +1 -1
  79. package/docs/errors/SW14007.md +1 -1
  80. package/docs/errors/SW32003.md +1 -1
  81. package/docs/errors/SW32005.md +1 -1
  82. package/docs/errors/index.md +1 -0
  83. package/docs/formatters.md +34 -2
  84. package/docs/guides/lint-adoption.md +2 -0
  85. package/docs/guides/migrating-from-tailwind.md +60 -9
  86. package/docs/guides/recommended-practices.md +18 -0
  87. package/docs/guides/reusable-styles.md +2 -2
  88. package/docs/guides/tailwind-compatibility.md +8 -0
  89. package/docs/index.md +4 -5
  90. package/docs/integrations.md +314 -79
  91. package/docs/lints/conflicting-utilities.md +9 -0
  92. package/docs/lints/cyclic-style-order.md +61 -0
  93. package/docs/lints/index.md +26 -10
  94. package/docs/lints/{invalid-cva-config.md → invalid-recipe-config.md} +8 -8
  95. package/docs/lints/{invalid-cva-input.md → invalid-recipe-input.md} +9 -9
  96. package/docs/lints/invalid-rule-group-input.md +1 -1
  97. package/docs/lints/missing-view-transition-name.md +1 -1
  98. package/docs/lints/multiple-style-forwards.md +59 -0
  99. package/docs/lints/partial-utility-override.md +77 -0
  100. package/docs/lints/prefer-direct-styling.md +1 -1
  101. package/docs/lints/suspending-macro-argument.md +1 -1
  102. package/docs/lints/utility-class-selector.md +72 -0
  103. package/docs/llms.txt +238 -0
  104. package/docs/macros/index.md +1 -1
  105. package/docs/macros/recipe.md +246 -0
  106. package/docs/macros/style.md +72 -0
  107. package/docs/macros/when.md +1 -1
  108. package/docs/plugins/iconify.md +2 -0
  109. package/docs/utilities-and-variants.md +2 -0
  110. package/package.json +6 -6
  111. package/skills/setup-stillwind/SKILL.md +1 -2
  112. package/skills/stillwind/SKILL.md +19 -12
  113. package/dist/class-object-BaK8uudd.d.ts +0 -9
  114. package/dist/class-object-DNcjzcfH.js +0 -6
  115. package/dist/class-object-DNcjzcfH.js.map +0 -1
  116. package/dist/class-string-KnYInbiw.js +0 -6
  117. package/dist/formats-Ctf2WFc-.js.map +0 -1
  118. package/dist/style-BE8vuLiO.js +0 -44
  119. package/dist/style-BE8vuLiO.js.map +0 -1
  120. package/docs/macros/cva.md +0 -155
@@ -0,0 +1,246 @@
1
+ ---
2
+ title: "style.recipe()"
3
+ description: "Create a factory that selects compiled styles by option, with the configuration of class-variance-authority."
4
+ ---
5
+
6
+ # style.recipe()
7
+
8
+ `style.recipe(base?, config?)` creates a factory with the configuration format
9
+ of `cva` from [Class Variance Authority](https://cva.style/). With `slots`, it
10
+ also accepts the slot configuration of
11
+ [tailwind-variants](https://www.tailwind-variants.org/). The compiler generates
12
+ the CSS for every option at build time. Calling the factory selects the
13
+ compiled classes for the chosen options and returns props for an element.
14
+
15
+ `style.recipe()` exists mainly to migrate existing CVA and tailwind-variants
16
+ components. For new
17
+ components, see [Reusable styles](https://stillwind.dev/docs/guides/reusable-styles).
18
+
19
+ ## Example
20
+
21
+ ### Source
22
+
23
+ ```tsx
24
+ import { style } from "stillwind/react";
25
+
26
+ export const button = style.recipe("inline-flex rounded-md", {
27
+ variants: {
28
+ size: {
29
+ small: "px-2 py-1",
30
+ large: "px-4 py-2",
31
+ },
32
+ },
33
+ defaultVariants: {
34
+ size: "small",
35
+ },
36
+ compoundVariants: [
37
+ {
38
+ size: "large",
39
+ class: "font-medium",
40
+ },
41
+ ],
42
+ });
43
+
44
+ export const props = button({ size: "large" });
45
+ ```
46
+
47
+ ### Compiled code
48
+
49
+ ```ts
50
+ import { stillwindClassNameObjectRecipe } from "stillwind/runtime";
51
+
52
+ export const button = stillwindClassNameObjectRecipe("sw_6tzpq", {
53
+ variants: {
54
+ size: {
55
+ small: "sw_gzwci",
56
+ large: "sw_w6696",
57
+ },
58
+ },
59
+ defaultVariants: {
60
+ size: "small",
61
+ },
62
+ compoundVariants: [
63
+ {
64
+ size: "large",
65
+ class: "sw_v1iw3",
66
+ },
67
+ ],
68
+ });
69
+
70
+ export const props = button({ size: "large" });
71
+ ```
72
+
73
+ ### Generated CSS
74
+
75
+
76
+ ```css
77
+ .sw_6tzpq {
78
+ display: inline-flex;
79
+ border-radius: var(--radius-md);
80
+ }
81
+
82
+ .sw_gzwci {
83
+ padding-inline: calc(var(--spacing) * 2);
84
+ padding-block: calc(var(--spacing) * 1);
85
+ }
86
+
87
+ .sw_w6696 {
88
+ padding-inline: calc(var(--spacing) * 4);
89
+ padding-block: calc(var(--spacing) * 2);
90
+ }
91
+
92
+ .sw_v1iw3 {
93
+ --tw-font-weight: var(--font-weight-medium);
94
+ font-weight: var(--font-weight-medium);
95
+ }
96
+ ```
97
+
98
+ ## Configuration
99
+
100
+ Write the configuration as an object literal in the call:
101
+
102
+ | Field | Value |
103
+ | ------------------ | ---------------------------------------------------------------------------------- |
104
+ | `variants` | Each option name maps each value to a style |
105
+ | `defaultVariants` | The value that each option uses when the call passes `undefined` |
106
+ | `compoundVariants` | Entries that add `class` when every listed option matches |
107
+ | `slots` | Each slot name maps to the style of that element part |
108
+ | `compoundSlots` | Entries that add `class` to every slot in `slots` when every listed option matches |
109
+
110
+ `class` and `className` cannot be option names, because the factory uses them
111
+ for classes from other stylesheets. An option with the values `true` and
112
+ `false` accepts booleans.
113
+
114
+ Use `VariantProps<typeof button>` from your framework's entrypoint to type the
115
+ options.
116
+
117
+ ## Style values
118
+
119
+ The base and each option value accept utility strings, arrays, objects with
120
+ variant keys, `true`, `false`, `null`, `undefined`, and custom properties.
121
+
122
+ They do not accept `&&`, ternaries, stored [`style()`](https://stillwind.dev/docs/macros/style)
123
+ results, refs, animations, or `class` fields. To choose a style at runtime,
124
+ pass a different option to the factory.
125
+ [invalid-recipe-input](https://stillwind.dev/docs/lints/invalid-recipe-input) reports these values, and
126
+ [invalid-recipe-config](https://stillwind.dev/docs/lints/invalid-recipe-config) reports a malformed
127
+ configuration.
128
+
129
+ A custom property value can be an expression. The factory evaluates it once,
130
+ when the factory is created. Custom properties stay in the inline style, so a
131
+ later option can replace them.
132
+
133
+ ## Calling the factory
134
+
135
+ | Option value | Result |
136
+ | ------------ | ------------------------------------- |
137
+ | `undefined` | Uses the value from `defaultVariants` |
138
+ | `null` | Adds nothing for that option |
139
+ | A value | Adds the style of that value |
140
+
141
+ The result combines, in order: the base, the selected values in the order of
142
+ the keys of `variants`, every matching compound variant in array order, and the
143
+ `class` or `className` from the call. The option values are not passed to the
144
+ element. Each call returns a new props object.
145
+
146
+ The factory takes a [`style.forward()`](https://stillwind.dev/docs/macros/style#forward-props-to-a-components-element)
147
+ value as its second argument. The forwarded classes come last, and the
148
+ forwarded inline style applies on top of the result:
149
+
150
+ ```tsx
151
+ export function Button({ variant, className, style: inline }: ButtonProps) {
152
+ return <button {...button({ variant }, style.forward({ className, style: inline }))} />;
153
+ }
154
+ ```
155
+
156
+ The factory does not merge utilities at runtime. When two selected styles set
157
+ the same property, the compiler's CSS order decides which one wins.
158
+
159
+ The props that the factory returns cannot be passed to `style()` as a base.
160
+
161
+ ## Slots
162
+
163
+ A component often styles several elements, such as a root, an icon, and a label.
164
+ `slots` names these parts. Each recipe with slots also has a `base` slot, which
165
+ receives the first argument of `style.recipe()`:
166
+
167
+ ```tsx
168
+ import { style } from "stillwind/react";
169
+
170
+ export const card = style.recipe("flex items-center rounded-md", {
171
+ slots: {
172
+ icon: "size-4",
173
+ label: "text-sm",
174
+ },
175
+ variants: {
176
+ size: {
177
+ small: {
178
+ base: "p-2",
179
+ icon: "size-3",
180
+ },
181
+ large: "p-4",
182
+ },
183
+ },
184
+ compoundVariants: [
185
+ {
186
+ size: "large",
187
+ class: {
188
+ label: "text-lg",
189
+ },
190
+ },
191
+ ],
192
+ compoundSlots: [
193
+ {
194
+ slots: ["icon", "label"],
195
+ size: "small",
196
+ class: "gap-1",
197
+ },
198
+ ],
199
+ });
200
+
201
+ export function Card({ size, className }: CardProps) {
202
+ const { base, icon, label } = card({ size, className });
203
+ return (
204
+ <div {...base()}>
205
+ <span {...icon()} />
206
+ <span {...label()}>Title</span>
207
+ </div>
208
+ );
209
+ }
210
+ ```
211
+
212
+ With `slots`, an option value or a compound `class` or `className` value can be
213
+ an object whose keys all name slots. Each key adds its style to that slot. Any
214
+ other value applies to the `base` slot. A slot name cannot be empty, cannot
215
+ start with `--` or end with `:`, and cannot be `class` or `className`, because
216
+ those keys have other meanings in a style value.
217
+
218
+ Calling the factory returns one function for each slot. Each slot function
219
+ returns props for its element. A slot receives, in order:
220
+
221
+ 1. For the `base` slot, the first argument of `style.recipe()`.
222
+ 2. Its value in `slots`.
223
+ 3. Its part of each selected option value.
224
+ 4. Its part of each matching compound variant.
225
+ 5. The `class` of each matching `compoundSlots` entry that lists it.
226
+ 6. For the `base` slot, the classes and the `style.forward()` value passed to
227
+ the factory.
228
+ 7. The classes and the `style.forward()` value passed to the slot function.
229
+
230
+ A slot function also accepts option values, which replace the values passed to
231
+ the factory for that slot only, as in `icon({ size: "large" })`.
232
+
233
+ `style.recipe()` does not support the `extend` field of tailwind-variants.
234
+ [invalid-recipe-config](https://stillwind.dev/docs/lints/invalid-recipe-config) reports it and unknown
235
+ slot names.
236
+
237
+ ## Generated code
238
+
239
+ The compiler creates the factory with a helper from `stillwind/runtime`, such as
240
+ `stillwindClassNameObjectRecipe` for React, together with the compiled class names.
241
+ Factory calls stay ordinary JavaScript.
242
+ The development build checks the selected values and the classes from other
243
+ stylesheets.
244
+
245
+ See [Migrating from Tailwind CSS](https://stillwind.dev/docs/guides/migrating-from-tailwind#cva) to
246
+ convert existing `cva` calls.
@@ -9,6 +9,17 @@ description: "Compile utilities, conditions, custom properties, and base styles
9
9
  for its utilities at build time. React receives `className` and `style`; the
10
10
  other frameworks receive `class` and `style`. Spread the result onto the element.
11
11
 
12
+ ## Contents
13
+
14
+ - [Inputs](#inputs)
15
+ - [Static input](#static-input)
16
+ - [Conditions and custom properties](#conditions-and-custom-properties)
17
+ - [Base styles](#base-styles)
18
+ - [Argument order](#argument-order)
19
+ - [How props combine at runtime](#how-props-combine-at-runtime)
20
+ - [Forward props to a component's element](#forward-props-to-a-components-element)
21
+ - [Side effects in arguments](#side-effects-in-arguments)
22
+
12
23
  ## Inputs
13
24
 
14
25
  | Input | Example | Effect |
@@ -198,6 +209,67 @@ combines the inputs:
198
209
  - A later custom property replaces an earlier one with the same name.
199
210
  - Custom properties apply on top of an inline style.
200
211
 
212
+ ## Forward props to a component's element
213
+
214
+ `style.forward()` passes the class and style props that a component receives to
215
+ the `style()` call of its element. Write it as one argument of the call:
216
+
217
+ ```tsx
218
+ import { style } from "stillwind/react";
219
+
220
+ export function Card({ className, style: inline, ...props }: CardProps) {
221
+ return <div {...props} {...style("rounded p-4", style.forward({ className, style: inline }))} />;
222
+ }
223
+ ```
224
+
225
+ The forwarded props apply after every other argument:
226
+
227
+ - Forwarded classes come after the component's own classes.
228
+ - Forwarded custom properties and inline style declarations replace the
229
+ component's ones with the same name.
230
+ - An inline style object is merged with an object, and a string is joined with
231
+ a string. When one is a string and the other is an object, Vue receives
232
+ both in an array. The other frameworks receive one string.
233
+
234
+ `style.forward()` reads the `class`, `className`, and `style` keys, so pass the
235
+ props under the names that your framework uses. When both class keys are
236
+ present, it joins them. Class values accept strings, arrays, and objects, as in
237
+ `style()`. Inline style strings are not parsed into objects.
238
+
239
+ You can also pass all props, as in `style.forward(props)`. In that form, make
240
+ sure that no prop that comes after the result replaces its `className` or
241
+ `style`:
242
+
243
+ ```tsx
244
+ // Wrong: props.className replaces the merged class.
245
+ <div {...style("p-4", style.forward(props))} {...props} />
246
+ ```
247
+
248
+ `style.forward()` cannot be inside a variant object. A
249
+ [`style.recipe()`](https://stillwind.dev/docs/macros/recipe) factory takes it as its second argument. The
250
+ Lit, Alpine, and vanilla entrypoints do not provide `style.forward()`.
251
+
252
+ A Vue component with one root element does not need `style.forward()`. Vue
253
+ adds the `class` and `style` attributes that the component receives to its root
254
+ element, after the root's own classes and styles. A `style()` result that is
255
+ passed to such a component therefore works like a forwarded one: the caller's
256
+ classes come after the component's classes, and the caller's inline styles and
257
+ custom properties replace the root's ones with the same name. Vue does not add
258
+ these attributes when the component sets `inheritAttrs: false` or renders
259
+ several root nodes. In those components, pass `useAttrs()` or `$attrs` to
260
+ `style.forward()` in the call of the element that should receive them.
261
+
262
+ A call can have several `style.forward()` arguments. Their inline styles and
263
+ custom properties apply in argument order, so a later value replaces an earlier
264
+ one. Their classes are joined, and as with several bases, the CSS order decides
265
+ which class wins, not the argument order.
266
+ [multiple-style-forwards](https://stillwind.dev/docs/lints/multiple-style-forwards) reports such
267
+ calls.
268
+
269
+ When a module passes a `style()` result to an imported component, the CSS of
270
+ the component's module comes first, so the caller's utilities win. See
271
+ [CSS ordering](https://stillwind.dev/docs/concepts/css-ordering#files-that-pass-styles-to-components).
272
+
201
273
  ## Side effects in arguments
202
274
 
203
275
  The compiler can evaluate arguments in any order, and it can skip arguments
@@ -119,7 +119,7 @@ refer to one stored variant. A choice at runtime, such as
119
119
  `[active ? cardHover : cardFocus]`, does not work, because the compiler
120
120
  expands the variants at build time. Write a key for each stored variant instead.
121
121
 
122
- [`style.cva()`](https://stillwind.dev/docs/macros/cva) values and [`.in()`](https://stillwind.dev/docs/macros/ref/in)
122
+ [`style.recipe()`](https://stillwind.dev/docs/macros/recipe) values and [`.in()`](https://stillwind.dev/docs/macros/ref/in)
123
123
  do not accept a stored variant.
124
124
 
125
125
  ## Output
@@ -5,6 +5,8 @@ description: "Use Iconify icons as utilities, and include only the icons that yo
5
5
 
6
6
  # Iconify icons
7
7
 
8
+ > Command examples use `vp` (Vite+); substitute your project's package manager (such as `pnpm`, `npm`, or `bun`).
9
+
8
10
  `@stillwind/plugin-iconify` adds Iconify icons as Stillwind utilities. Only the
9
11
  icons that you use reach your CSS.
10
12
 
@@ -5,6 +5,8 @@ description: "Look up the CSS of a utility or variant, or find the canonical uti
5
5
 
6
6
  # Built-in utilities and variants
7
7
 
8
+ > Command examples use `vp` (Vite+); substitute your project's package manager (such as `pnpm`, `npm`, or `bun`).
9
+
8
10
  Type a utility to see its CSS, or type CSS declarations to find the utility that
9
11
  produces them. Arbitrary values, such as `p-[16px]`, resolve to their canonical
10
12
  spelling. Arbitrary variants resolve too, so `[&:focus]` finds `focus:`. Part of
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stillwind",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "Write Tailwind CSS v4 utilities in components, enforce your design system, and ship static CSS",
5
5
  "keywords": [
6
6
  "alpinejs",
@@ -132,17 +132,17 @@
132
132
  "./package.json": "./package.json"
133
133
  },
134
134
  "dependencies": {
135
- "@stillwind/config": "0.11.0",
136
- "@stillwind/native": "0.11.0",
137
- "@stillwind/projection": "0.11.0"
135
+ "@stillwind/config": "0.13.0",
136
+ "@stillwind/native": "0.13.0",
137
+ "@stillwind/projection": "0.13.0"
138
138
  },
139
139
  "devDependencies": {
140
140
  "@stillwind-internal/tools-workspace": "0.0.0",
141
141
  "@types/node": "^26.6.6",
142
142
  "lit": "^3.3.3",
143
143
  "typescript": "^6.0.3",
144
- "vite": "npm:@voidzero-dev/vite-plus-core@1.6.0",
145
- "vite-plus": "1.6.0"
144
+ "vite": "npm:@voidzero-dev/vite-plus-core@8.3.8001",
145
+ "vite-plus": "1.8.0"
146
146
  },
147
147
  "peerDependencies": {
148
148
  "lit": "^3.3.0"
@@ -28,8 +28,7 @@ If the project already styles its pages with Tailwind CSS or other CSS, follow
28
28
  extensions of the frameworks that the project uses.
29
29
  5. Register the integration as the integration page describes. Keep the plugin
30
30
  order that it requires, such as Stillwind before the JSX transform.
31
- 6. Add `stillwind lint` and `stillwind fmt --check` to the project's check
32
- scripts or CI when the project has them.
31
+ 6. Add `stillwind check` to the project's check scripts or CI when the project has them.
33
32
  7. A starter template often includes demo styles, such as `App.css`. Ask the
34
33
  user whether to rewrite the demo components with `style()` or to remove the
35
34
  demo.
@@ -7,7 +7,8 @@ description: Write and fix styles in a project that uses Stillwind, by loading t
7
7
 
8
8
  Read only the pages that the task needs. Use the documentation of the installed package
9
9
  in `node_modules/stillwind/docs/`, so that it matches the project's
10
- Stillwind version. The `docs/` paths below are relative to the package root.
10
+ Stillwind version. The `docs/` paths below are relative to the package root, and
11
+ `docs/llms.txt` lists every bundled page.
11
12
  When this skill is installed without a local package, follow the skill's link to
12
13
  its real directory and use `../../docs/` in the same package. If the skill was copied
13
14
  without the package, start from https://stillwind.dev/docs/llms.txt, which lists the
@@ -18,10 +19,10 @@ Markdown version of each page.
18
19
  | Task | Pages |
19
20
  | ------------------------------------------------------ | ------------------------------------------------------------------- |
20
21
  | Set up a project, choose an integration | `docs/index.md`, `docs/integrations.md` |
21
- | Migrate existing styles | `../migrate-to-stillwind/SKILL.md` |
22
+ | Migrate existing styles | `node_modules/stillwind/skills/migrate-to-stillwind/SKILL.md` |
22
23
  | Recommended practices and mistakes that produce no CSS | `docs/guides/recommended-practices.md` |
23
24
  | Utilities, variants, conditions, runtime values | `docs/guides/style.md`, `docs/macros/style.md` |
24
- | Shared styles, states, and component options | `docs/guides/reusable-styles.md`, `docs/macros/cva.md` |
25
+ | Shared styles, states, and component options | `docs/guides/reusable-styles.md`, `docs/macros/recipe.md` |
25
26
  | Breakpoints and media queries in JavaScript | `docs/guides/responsive-styles.md`, `docs/macros/media.md` |
26
27
  | Styles that depend on a parent, sibling, or anchor | `docs/guides/element-relationships.md`, `docs/macros/ref/index.md` |
27
28
  | Animations | `docs/guides/animations.md`, `docs/macros/keyframes.md` |
@@ -48,8 +49,9 @@ Markdown version of each page.
48
49
  to read the tokens of the project. When a value is missing, ask the user before you
49
50
  add a token.
50
51
  - Run `stillwind utilities <name>` to check a utility before you use it, such as
51
- `stillwind utilities p-4 hover:bg-accent`. A `*` pattern searches names, but it omits
52
- numeric and arbitrary values. `stillwind variants` works in the same way.
52
+ `stillwind utilities p-4 hover:bg-accent`. A `*` pattern searches names and shows
53
+ functional shapes such as `p-<number>` and `p-[<length-percentage>]`; add `--names-only`
54
+ to list names without CSS previews. `stillwind variants` works in the same way.
53
55
  - When you know the CSS but not the utility, pass the declaration as an arbitrary property,
54
56
  such as `stillwind utilities '[padding:16px]' '[&:focus]:[display:flex]'`, and use the
55
57
  canonical spelling that the output names. An arbitrary property in the source is only an
@@ -57,17 +59,22 @@ Markdown version of each page.
57
59
  exists, the declaration has no equivalent utility.
58
60
  - Write custom utilities with `@apply` and variants, not with hand-written selectors or
59
61
  media queries.
60
- - After you change styles, run `stillwind lint --fix` and `stillwind fmt` through the
61
- project's package manager, such as `vp exec stillwind lint`. Add `--format json` when
62
- you parse the output.
62
+ - After you change styles, run `stillwind check --fix` through the project's package
63
+ manager, such as `vp exec stillwind check --fix`. Add `--format json` when you parse
64
+ the output.
63
65
  - Run `stillwind inspect <file>:<line> --format json` to check the CSS that a
64
66
  `style()` call generates. Paths, globs, and several targets also work.
65
67
  - Read the page of each remaining finding before you fix it. With `--format json`,
66
68
  the `docs` field of a finding names that page. Do not add a suppression comment or
67
69
  relax the `lint` setting unless the user agrees. A suppression comment names the rule
68
70
  and gives the reason after `--`.
69
- - When `conflicting-utilities` reports a pair of classes from a plugin or CSS package,
70
- follow "Conflicts with plugin classes" in `../migrate-to-stillwind/SKILL.md`. For a
71
- pair that the plugin intends, you can change the rule options without asking first,
72
- and you report the change.
71
+ - When `conflicting-utilities` reports a pair of classes from a plugin or CSS package
72
+ (or a plugin class and a core utility), check the installed plugin's documentation or
73
+ examples. If the plugin intends both classes on the same element (such as `btn` with
74
+ `btn-outline`, or `form-input` with `px-4`), update the `conflicting-utilities` options
75
+ in `stillwind.config.ts` without asking first and report the change: set
76
+ `allowShorthandOverrides: true` when the finding's note names it, or add the base class
77
+ to `ignoredUtilities`. See "Plugins" in `docs/lints/conflicting-utilities.md` for
78
+ examples. If the classes are alternatives or belong on different elements, fix the code;
79
+ if the plugin's usage is unclear, ask the user.
73
80
  - Check the result in the browser when a change can affect the layout.
@@ -1,9 +0,0 @@
1
- import { StyleMacro as StyleMacro$1, StyleResult as StyleResult$1 } from "./index-DBpgaaD7.js";
2
- export type StyleProps = {
3
- class?: string;
4
- style?: Record<string, string>;
5
- };
6
- export type StyleResult<Id extends string = string> = StyleResult$1<Id, StyleProps>;
7
- export type StyleMacro = StyleMacro$1<StyleProps>;
8
- export declare const style: StyleMacro;
9
- //# sourceMappingURL=class-object-BaK8uudd.d.ts.map
@@ -1,6 +0,0 @@
1
- import { createStyleMacro } from "./style-BE8vuLiO.js";
2
- // src/outputs/class-object.ts
3
- const style = createStyleMacro();
4
- export { style };
5
-
6
- //# sourceMappingURL=class-object-DNcjzcfH.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-object-DNcjzcfH.js","names":[],"sources":["../src/outputs/class-object.ts"],"sourcesContent":["import type { StyleResult as Result } from \"../macro/output.ts\";\nimport { createStyleMacro } from \"../macro/style.ts\";\nimport type { StyleMacro as Macro } from \"../macro/style.ts\";\n\nexport type StyleProps = {\n class?: string;\n style?: Record<string, string>;\n};\n\nexport type StyleResult<Id extends string = string> = Result<Id, StyleProps>;\n\nexport type StyleMacro = Macro<StyleProps>;\n\nexport const style: StyleMacro = createStyleMacro<StyleProps>();\n"],"mappings":";;AAaA,MAAa,QAAoB,iBAA6B"}
@@ -1,6 +0,0 @@
1
- import { createStyleMacro } from "./style-BE8vuLiO.js";
2
- // src/outputs/class-string.ts
3
- const style = createStyleMacro();
4
- export { style };
5
-
6
- //# sourceMappingURL=class-string-KnYInbiw.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formats-Ctf2WFc-.js","names":[],"sources":["../src/runtime/fragment.ts","../src/runtime/shared.ts","../src/runtime/cva.ts","../src/runtime/formats.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","/**\n * Fragment keys and production operations for each output format.\n *\n * Each format owns distinct symbol keys, so a fragment must be materialized by the format that\n * created it. Export names start with the format name because all formats share one entrypoint.\n */\n\nimport { createCva, type CompiledCvaConfig, type CvaValue } from \"./cva.ts\";\nimport {\n mergeFragments,\n serializeStyle,\n toFragment,\n type FragmentRuntimeOptions,\n} from \"./fragment.ts\";\n\nexport const stillwindClassObjectClassKey = /* @__PURE__ */ Symbol(\"stillwind.class-object.class\");\n\nexport const stillwindClassObjectStyleKey = /* @__PURE__ */ Symbol(\"stillwind.class-object.style\");\n\nexport const stillwindClassObjectCustomPropertiesKey = /* @__PURE__ */ Symbol(\n \"stillwind.class-object.custom-properties\",\n);\n\nexport const classObjectOptions: FragmentRuntimeOptions = [\n \"class\",\n \"object\",\n stillwindClassObjectClassKey,\n stillwindClassObjectStyleKey,\n stillwindClassObjectCustomPropertiesKey,\n];\n\n/** Materializes ordered fragments with `class` and object styles. */\nexport function stillwindClassObjectMerge(...values: readonly unknown[]): Record<string, unknown> {\n return mergeFragments(classObjectOptions, values);\n}\n\n/** Converts either class prop of a composition base to a class-only fragment. */\nexport function stillwindClassObjectToFragment(\n value: Record<PropertyKey, unknown>,\n): Record<PropertyKey, unknown> {\n return toFragment(classObjectOptions, value);\n}\n\n/** Returns the supplied style payload, or undefined for null or undefined. */\nexport function stillwindClassObjectStyleValue(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 stillwindClassObjectCva(base?: CvaValue, config?: CompiledCvaConfig) {\n return createCva(classObjectOptions, base, config);\n}\n\nexport const stillwindClassStringClassKey = /* @__PURE__ */ Symbol(\"stillwind.class-string.class\");\n\nexport const stillwindClassStringStyleKey = /* @__PURE__ */ Symbol(\"stillwind.class-string.style\");\n\nexport const stillwindClassStringCustomPropertiesKey = /* @__PURE__ */ Symbol(\n \"stillwind.class-string.custom-properties\",\n);\n\nexport const classStringOptions: FragmentRuntimeOptions = [\n \"class\",\n \"string\",\n stillwindClassStringClassKey,\n stillwindClassStringStyleKey,\n stillwindClassStringCustomPropertiesKey,\n];\n\n/** Materializes ordered fragments with `class` and string styles. */\nexport function stillwindClassStringMerge(...values: readonly unknown[]): Record<string, unknown> {\n return mergeFragments(classStringOptions, values);\n}\n\n/** Converts either class prop of a composition base to a class-only fragment. */\nexport function stillwindClassStringToFragment(\n value: Record<PropertyKey, unknown>,\n): Record<PropertyKey, unknown> {\n return toFragment(classStringOptions, value);\n}\n\n/** Serializes object style declarations or preserves a string. Other inputs omit style. */\nexport function stillwindClassStringStyleValue(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 stillwindClassStringCva(base?: CvaValue, config?: CompiledCvaConfig) {\n return createCva(classStringOptions, base, config);\n}\n\nexport const stillwindClassNameObjectClassKey = /* @__PURE__ */ Symbol(\n \"stillwind.class-name-object.class\",\n);\n\nexport const stillwindClassNameObjectStyleKey = /* @__PURE__ */ Symbol(\n \"stillwind.class-name-object.style\",\n);\n\nexport const stillwindClassNameObjectCustomPropertiesKey = /* @__PURE__ */ Symbol(\n \"stillwind.class-name-object.custom-properties\",\n);\n\nexport const classNameObjectOptions: FragmentRuntimeOptions = [\n \"className\",\n \"object\",\n stillwindClassNameObjectClassKey,\n stillwindClassNameObjectStyleKey,\n stillwindClassNameObjectCustomPropertiesKey,\n];\n\n/** Materializes ordered fragments with `className` and object styles. */\nexport function stillwindClassNameObjectMerge(\n ...values: readonly unknown[]\n): Record<string, unknown> {\n return mergeFragments(classNameObjectOptions, values);\n}\n\n/** Converts either class prop of a composition base to a class-only fragment. */\nexport function stillwindClassNameObjectToFragment(\n value: Record<PropertyKey, unknown>,\n): Record<PropertyKey, unknown> {\n return toFragment(classNameObjectOptions, value);\n}\n\n/** Returns the supplied style payload, or undefined for null or undefined. */\nexport function stillwindClassNameObjectStyleValue(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 stillwindClassNameObjectCva(base?: CvaValue, config?: CompiledCvaConfig) {\n return createCva(classNameObjectOptions, base, config);\n}\n"],"mappings":";AAiBA,SAAgB,SAAS,OAAuD;CAC9E,OAAO,OAAO,UAAU,YAAY,UAAU;AAChD;;;;;;;;AASA,SAAgB,eAAe,SAAkB,aAA2C;CAC1F,IAAI,gBAAgB,UAAU;EAC5B,IAAI,OAAO,YAAY,UACrB,OAAO;EAET,IAAI,SAAS,OAAO,GAClB,OAAO,OAAO,QAAQ,OAAO,CAAC,CAC3B,KAAK,CAAC,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,KA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internal use only. Builds the placeholder exported by each framework entrypoint.
4
- * The compiler replaces supported macro calls before the application runs.
5
- *
6
- * @returns A fresh callable object with declaration and scope methods. Calling the
7
- * object or any of these methods throws an Error about missing integration. Creating
8
- * the placeholder itself does not execute any macro or generate CSS.
9
- *
10
- * @internal
11
- */
12
- function createStyleMacro() {
13
- return Object.assign(() => {
14
- throw new Error("Stillwind style() is a compile-time macro. Configure the Stillwind integration for your build tool.");
15
- }, {
16
- anchorScope() {
17
- throw new Error("Stillwind style.anchorScope() is a compile-time macro.");
18
- },
19
- ref() {
20
- throw new Error("Stillwind style.ref() is a compile-time macro.");
21
- },
22
- keyframes() {
23
- throw new Error("Stillwind style.keyframes() is a compile-time macro.");
24
- },
25
- viewTransition() {
26
- throw new Error("Stillwind style.viewTransition() is a compile-time macro.");
27
- },
28
- when() {
29
- throw new Error("Stillwind style.when() is a compile-time macro.");
30
- },
31
- cva() {
32
- throw new Error("Stillwind style.cva() is a compile-time macro.");
33
- },
34
- media() {
35
- throw new Error("Stillwind style.media() is a compile-time macro.");
36
- },
37
- css() {
38
- throw new Error("Stillwind style.css() is a compile-time macro.");
39
- }
40
- });
41
- }
42
- export { createStyleMacro };
43
-
44
- //# sourceMappingURL=style-BE8vuLiO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style-BE8vuLiO.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, StyleVariantKey } from \"./refs.ts\";\nimport type { StyleViewTransition, StyleViewTransitionDefinition } from \"./view-transition.ts\";\nimport type { StyleStoredVariant } from \"./when.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 * Stores variant sequences in a binding initializer for later use in `style()`.\n *\n * Use the result as a computed variant key, as a variant segment followed by `:` in\n * a utility template, or in the argument of another `style.when()`. Each use means\n * the same as writing the sequence directly at that position, so the sequence obeys\n * the same rules as a variant key written in `style()`. A use must resolve to one\n * declaration. The compiler replaces the call with `undefined`.\n *\n * With several arguments, the stored variant matches when any argument matches. A\n * use means the same as writing the use once for each argument, in argument order.\n *\n * @param variants - Static variant sequences. Each one is a string literal such as\n * `\"hover:md\"`, a ref variant call or tag with optional `.in()` calls, a container\n * variant, another stored variant, or a template literal whose substitutions are\n * complete variant segments. The final `:` is optional. Invalid sequences produce\n * lint findings.\n * @returns A stored variant that may be stored, exported, imported, and passed.\n */\n when(\n ...variants: [string | StyleVariantKey, ...(string | StyleVariantKey)[]]\n ): StyleStoredVariant;\n\n /**\n * Internal use only. The checker supplies identity for a stored variant declaration.\n * Application code must use `when(...variants)` without the identity argument.\n *\n * @internal\n */\n when<const Id extends string>(\n ...variants: [\n string | StyleVariantKey,\n ...(string | StyleVariantKey)[],\n StillwindDeclarationIdentity<Id>,\n ]\n ): StyleStoredVariant<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 when(): never {\n throw new Error(\"Stillwind style.when() 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":";;;;;;;;;;;AAgTA,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,OAAc;GACZ,MAAM,IAAI,MAAM,iDAAiD;EACnE;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"}