stillwind 0.6.0 → 0.8.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.
- package/css/builtin-variants/sw-conditional.css +10 -1
- package/dist/{class-object-D7ZGJOf_.d.ts → class-object-BaK8uudd.d.ts} +2 -2
- package/dist/class-object-DNcjzcfH.js +6 -0
- package/dist/{class-object-D24FFYqO.js.map → class-object-DNcjzcfH.js.map} +1 -1
- package/dist/{class-string-CQHnc9GN.d.ts → class-string-C5YFtXQn.d.ts} +2 -2
- package/dist/class-string-KnYInbiw.js +6 -0
- package/dist/{class-string-Db8-oI4q.js.map → class-string-KnYInbiw.js.map} +1 -1
- package/dist/{cva-BwX07CFw.js → formats-Ctf2WFc-.js} +87 -2
- package/dist/formats-Ctf2WFc-.js.map +1 -0
- package/dist/formats-aeLCNAXl.d.ts +73 -0
- package/dist/frameworks/alpine.d.ts +3 -3
- package/dist/frameworks/alpine.js +1 -1
- package/dist/frameworks/alpine.js.map +1 -1
- package/dist/frameworks/astro.d.ts +3 -3
- package/dist/frameworks/astro.js +1 -1
- package/dist/frameworks/lit.d.ts +3 -3
- package/dist/frameworks/lit.js +1 -1
- package/dist/frameworks/lit.js.map +1 -1
- package/dist/frameworks/preact.d.ts +3 -3
- package/dist/frameworks/preact.js +1 -1
- package/dist/frameworks/qwik.d.ts +3 -3
- package/dist/frameworks/qwik.js +1 -1
- package/dist/frameworks/react.d.ts +2 -2
- package/dist/frameworks/react.js +1 -1
- package/dist/frameworks/solid.d.ts +3 -3
- package/dist/frameworks/solid.js +1 -1
- package/dist/frameworks/svelte.d.ts +3 -3
- package/dist/frameworks/svelte.js +1 -1
- package/dist/frameworks/vanilla.d.ts +3 -3
- package/dist/frameworks/vanilla.js +1 -1
- package/dist/frameworks/vue.d.ts +3 -3
- package/dist/frameworks/vue.js +1 -1
- package/dist/{index-RwVFpxhE.d.ts → index-DBpgaaD7.d.ts} +54 -5
- package/dist/macro/index.d.ts +2 -2
- package/dist/macro/index.js +1 -1
- package/dist/runtime/development.d.ts +47 -0
- package/dist/{development-J-JCSIm0.js → runtime/development.js} +41 -5
- package/dist/runtime/development.js.map +1 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +1 -0
- package/dist/{style-fTQbsVWZ.js → style-BE8vuLiO.js} +4 -1
- package/dist/style-BE8vuLiO.js.map +1 -0
- package/docs/at-rules/apply.md +1 -1
- package/docs/at-rules/custom-variant.md +2 -2
- package/docs/at-rules/plugin.md +7 -0
- package/docs/at-rules/slot.md +1 -1
- package/docs/at-rules/stillwind-css-template.md +2 -2
- package/docs/at-rules/stillwind-property.md +1 -1
- package/docs/at-rules/stillwind-registry.md +1 -1
- package/docs/at-rules/stillwind-require-properties.md +1 -1
- package/docs/at-rules/stillwind-undef-arbitrary-property.md +1 -1
- package/docs/at-rules/stillwind-undef-utility.md +1 -1
- package/docs/at-rules/stillwind-undef-variant.md +1 -1
- package/docs/at-rules/theme.md +5 -5
- package/docs/at-rules/utility.md +4 -4
- package/docs/at-rules/variant.md +1 -1
- package/docs/cli.md +4 -1
- package/docs/concepts/css-ordering.md +4 -4
- package/docs/concepts/how-styles-compile.md +3 -3
- package/docs/configuration.md +16 -16
- package/docs/editors.md +2 -1
- package/docs/errors/SW10004.md +2 -1
- package/docs/guides/reusable-styles.md +5 -0
- package/docs/guides/style.md +32 -0
- package/docs/guides/tailwind-compatibility.md +10 -9
- package/docs/lints/ambiguous-style-base-order.md +2 -0
- package/docs/lints/conflicting-utilities.md +43 -1
- package/docs/lints/index.md +1 -0
- package/docs/lints/interfering-imported-style-base.md +21 -3
- package/docs/lints/invalid-stored-variant.md +52 -0
- package/docs/macros/css.md +2 -1
- package/docs/macros/cva.md +5 -4
- package/docs/macros/index.md +1 -0
- package/docs/macros/ref/at.md +1 -1
- package/docs/macros/ref/condition.md +2 -1
- package/docs/macros/ref/in.md +1 -1
- package/docs/macros/ref/index.md +2 -1
- package/docs/macros/style.md +34 -8
- package/docs/macros/view-transition.md +1 -1
- package/docs/macros/when.md +129 -0
- package/index.d.ts +2 -0
- package/package.json +12 -26
- package/dist/class-object-D24FFYqO.js +0 -6
- package/dist/class-string-Db8-oI4q.js +0 -6
- package/dist/cva-BwX07CFw.js.map +0 -1
- package/dist/cva-DSpDNBYi.d.ts +0 -9
- package/dist/development-DttPQc71.d.ts +0 -27
- package/dist/development-J-JCSIm0.js.map +0 -1
- package/dist/runtime/class-name-object-development.d.ts +0 -10
- package/dist/runtime/class-name-object-development.js +0 -18
- package/dist/runtime/class-name-object-development.js.map +0 -1
- package/dist/runtime/class-name-object.d.ts +0 -16
- package/dist/runtime/class-name-object.js +0 -31
- package/dist/runtime/class-name-object.js.map +0 -1
- package/dist/runtime/class-object-development.d.ts +0 -10
- package/dist/runtime/class-object-development.js +0 -18
- package/dist/runtime/class-object-development.js.map +0 -1
- package/dist/runtime/class-object.d.ts +0 -16
- package/dist/runtime/class-object.js +0 -31
- package/dist/runtime/class-object.js.map +0 -1
- package/dist/runtime/class-string-development.d.ts +0 -10
- package/dist/runtime/class-string-development.js +0 -18
- package/dist/runtime/class-string-development.js.map +0 -1
- package/dist/runtime/class-string.d.ts +0 -16
- package/dist/runtime/class-string.js +0 -31
- package/dist/runtime/class-string.js.map +0 -1
- package/dist/shared-B9IQXU6P.d.ts +0 -32
- package/dist/style-fTQbsVWZ.js.map +0 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "style.when()"
|
|
3
|
+
description: "Store a variant sequence or alternatives, such as a ref condition, and use them in several style() calls."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# style.when()
|
|
7
|
+
|
|
8
|
+
`style.when(...variants)` stores a sequence of variants in a variable. Use the
|
|
9
|
+
variable in [`style()`](style.md) where you would write the variants.
|
|
10
|
+
This helps when several elements need the same
|
|
11
|
+
[ref condition](ref/condition.md), because a ref call must otherwise
|
|
12
|
+
be repeated in each `style()` call.
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
### Source
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { style } from "stillwind/react";
|
|
20
|
+
|
|
21
|
+
const card = style.ref("card");
|
|
22
|
+
const cardHover = style.when(card("hover"));
|
|
23
|
+
|
|
24
|
+
export const root = style(card, "rounded-lg border");
|
|
25
|
+
export const title = style({ [cardHover]: "text-blue-600" });
|
|
26
|
+
export const arrow = style(`${cardHover}:translate-x-1`);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Compiled code
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
const card = undefined;
|
|
33
|
+
const cardHover = undefined;
|
|
34
|
+
|
|
35
|
+
export const root = {className:"sw_hd4rc sw_card_uryy0"};
|
|
36
|
+
export const title = {className:"sw_fqux0"};
|
|
37
|
+
export const arrow = {className:"sw_zu1vf"};
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Generated CSS
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
```css
|
|
44
|
+
.sw_hd4rc {
|
|
45
|
+
border-radius: var(--radius-lg);
|
|
46
|
+
border-style: var(--tw-border-style);
|
|
47
|
+
border-width: 1px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (hover: hover) {
|
|
51
|
+
.sw_fqux0:is(:where(.sw_card_uryy0):hover *) {
|
|
52
|
+
color: var(--color-blue-600);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media (hover: hover) {
|
|
57
|
+
.sw_zu1vf:is(:where(.sw_card_uryy0):hover *) {
|
|
58
|
+
--tw-translate-x: calc(var(--spacing) * 1);
|
|
59
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`title` and `arrow` change while the card is hovered, as if each one wrote
|
|
65
|
+
`card("hover")` itself.
|
|
66
|
+
|
|
67
|
+
## Inputs
|
|
68
|
+
|
|
69
|
+
Each argument is one sequence of variants, and every variant in it must match.
|
|
70
|
+
The final colon is optional.
|
|
71
|
+
|
|
72
|
+
| Form | Example |
|
|
73
|
+
| ------------------------------------------------------------- | --------------------------------------- |
|
|
74
|
+
| A string literal of variants | `style.when("hover:md")` |
|
|
75
|
+
| A [ref condition](ref/condition.md), with `.in()` | `style.when(card("hover").in(list))` |
|
|
76
|
+
| A [container query](ref/at.md) | `style.when(card.at("width >= 40rem"))` |
|
|
77
|
+
| A template literal whose interpolations are complete variants | ``style.when(`md:${card("hover")}`)`` |
|
|
78
|
+
| Another stored variant | `style.when(cardHover)` |
|
|
79
|
+
|
|
80
|
+
The rules for each variant are the same as when you write it directly in
|
|
81
|
+
`style()`. An interpolation in a template literal must be a ref condition, a
|
|
82
|
+
container query, or a stored variant, followed by `:` or at the end.
|
|
83
|
+
|
|
84
|
+
Write the call as the initial value of a variable, outside other Stillwind
|
|
85
|
+
calls. Declare a stored variant before another `style.when()` call uses it.
|
|
86
|
+
A `style()` call can use one that is declared later in the module.
|
|
87
|
+
|
|
88
|
+
[invalid-stored-variant](../lints/invalid-stored-variant.md) reports an
|
|
89
|
+
argument that is not a sequence of variants.
|
|
90
|
+
|
|
91
|
+
## Alternatives
|
|
92
|
+
|
|
93
|
+
With several arguments, the stored variant matches when any argument matches:
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
const card = style.ref("card");
|
|
97
|
+
const active = style.when("hover", card("focus-within"));
|
|
98
|
+
|
|
99
|
+
export const title = style({ [active]: "text-blue-600" });
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
A use means the same as writing the use once for each argument, in argument
|
|
103
|
+
order. `title` is equal to
|
|
104
|
+
`style({ "hover:": "text-blue-600", [card("focus-within")]: "text-blue-600" })`.
|
|
105
|
+
Unlike an [`or(...)`](../guides/style.md#match-any-of-several-variants)
|
|
106
|
+
variant, the arguments can be ref conditions and container queries.
|
|
107
|
+
|
|
108
|
+
## Uses
|
|
109
|
+
|
|
110
|
+
Use a stored variant in these positions:
|
|
111
|
+
|
|
112
|
+
- a computed key in a `style()` object, such as `{ [cardHover]: "underline" }`;
|
|
113
|
+
- an interpolation in a utility template, followed by `:`, such as
|
|
114
|
+
`` `${cardHover}:underline` ``;
|
|
115
|
+
- the argument of another `style.when()`.
|
|
116
|
+
|
|
117
|
+
You can export the variable and import it in another module. Each use must
|
|
118
|
+
refer to one stored variant. A choice at runtime, such as
|
|
119
|
+
`[active ? cardHover : cardFocus]`, does not work, because the compiler
|
|
120
|
+
expands the variants at build time. Write a key for each stored variant instead.
|
|
121
|
+
|
|
122
|
+
[`style.cva()`](cva.md) values and [`.in()`](ref/in.md)
|
|
123
|
+
do not accept a stored variant.
|
|
124
|
+
|
|
125
|
+
## Output
|
|
126
|
+
|
|
127
|
+
The compiler replaces the call with `undefined`, and each use with the stored
|
|
128
|
+
variants. The call adds no CSS by itself. JavaScript that reads the variable at
|
|
129
|
+
runtime gets `undefined`.
|
package/index.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stillwind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.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",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"files": [
|
|
40
40
|
"dist",
|
|
41
41
|
"index.css",
|
|
42
|
+
"index.d.ts",
|
|
42
43
|
"css",
|
|
43
44
|
"docs",
|
|
44
45
|
"skills",
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
"sideEffects": [
|
|
50
51
|
"**/*.css"
|
|
51
52
|
],
|
|
53
|
+
"types": "./index.d.ts",
|
|
52
54
|
"exports": {
|
|
53
55
|
".": "./index.css",
|
|
54
56
|
"./builtins.css": "./css/builtins.css",
|
|
@@ -117,36 +119,20 @@
|
|
|
117
119
|
"types": "./dist/frameworks/vue.d.ts",
|
|
118
120
|
"default": "./dist/frameworks/vue.js"
|
|
119
121
|
},
|
|
120
|
-
"./runtime
|
|
121
|
-
"types": "./dist/runtime/
|
|
122
|
-
"default": "./dist/runtime/
|
|
122
|
+
"./runtime": {
|
|
123
|
+
"types": "./dist/runtime/index.d.ts",
|
|
124
|
+
"default": "./dist/runtime/index.js"
|
|
123
125
|
},
|
|
124
|
-
"./runtime/
|
|
125
|
-
"types": "./dist/runtime/
|
|
126
|
-
"default": "./dist/runtime/
|
|
127
|
-
},
|
|
128
|
-
"./runtime/class-object": {
|
|
129
|
-
"types": "./dist/runtime/class-object.d.ts",
|
|
130
|
-
"default": "./dist/runtime/class-object.js"
|
|
131
|
-
},
|
|
132
|
-
"./runtime/class-object-development": {
|
|
133
|
-
"types": "./dist/runtime/class-object-development.d.ts",
|
|
134
|
-
"default": "./dist/runtime/class-object-development.js"
|
|
135
|
-
},
|
|
136
|
-
"./runtime/class-string": {
|
|
137
|
-
"types": "./dist/runtime/class-string.d.ts",
|
|
138
|
-
"default": "./dist/runtime/class-string.js"
|
|
139
|
-
},
|
|
140
|
-
"./runtime/class-string-development": {
|
|
141
|
-
"types": "./dist/runtime/class-string-development.d.ts",
|
|
142
|
-
"default": "./dist/runtime/class-string-development.js"
|
|
126
|
+
"./runtime/development": {
|
|
127
|
+
"types": "./dist/runtime/development.d.ts",
|
|
128
|
+
"default": "./dist/runtime/development.js"
|
|
143
129
|
},
|
|
144
130
|
"./package.json": "./package.json"
|
|
145
131
|
},
|
|
146
132
|
"dependencies": {
|
|
147
|
-
"@stillwind/config": "0.
|
|
148
|
-
"@stillwind/native": "0.
|
|
149
|
-
"@stillwind/projection": "0.
|
|
133
|
+
"@stillwind/config": "0.8.0",
|
|
134
|
+
"@stillwind/native": "0.8.0",
|
|
135
|
+
"@stillwind/projection": "0.8.0"
|
|
150
136
|
},
|
|
151
137
|
"devDependencies": {
|
|
152
138
|
"@stillwind-internal/tools-workspace": "0.0.0",
|
package/dist/cva-BwX07CFw.js.map
DELETED
|
@@ -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;CAC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AM;CAC9B;AACF"}
|
package/dist/cva-DSpDNBYi.d.ts
DELETED
|
@@ -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"],"mappings":";;;;;;;;;;AAaA,SAAgB,yBAAyB,OAAwB;CAC/D,MAAM,QAAQ,SAAS,KAAK,IAAI,MAAM,IAAI,KAAA;CAC1C,IAAI,OAAO,UAAU,YAAY,CAAC,OAChC,MAAM,IAAI,UAAU,uDAAuD;CAE7E,OAAO;AACT;;;;;;;;;AAUA,SAAgB,qBAAqB,GAAG,QAAoC;CAC1E,SAAS,MAAM,OAAsB;EACnC,IAAI,SAAS,QAAQ;GAAC;GAAU;GAAU;GAAU;EAAS,CAAC,CAAC,SAAS,OAAO,KAAK,GAClF;EAEF,IAAI,MAAM,QAAQ,KAAK,GAAG;GACxB,MAAM,QAAQ,KAAK;GACnB;EACF;EACA,IAAI,SAAS,KAAK,GAChB;EAEF,MAAM,IAAI,UAAU,kDAAkD,OAAO,MAAM,EAAE;CACvF;CACA,OAAO,QAAQ,KAAK;CACpB,OAAO,cAAc,GAAG,MAAM;AAChC;;;;;;;;;;AAWA,SAAgB,iBACd,SACA,MACA,QACA;CACA,OAAO,UAAU,SAAS,MAAM,QAAQ,sBAAsB,qBAAqB;AACrF;;;;;;;;;AAUA,SAAgB,sBACd,SACA,QACyB;CACzB,MAAM,KAAK,mBAAmB,mBAAmB,gCAAgC;CACjF,MAAM,OAAO;EAAC;EAAmB;EAAmB;CAA4B;CAEhF,SAAS,MAAM,OAAsB;EACnC,IAAI,MAAM,QAAQ,KAAK,GAAG;GACxB,MAAM,QAAQ,KAAK;GACnB;EACF;EACA,IAAI,CAAC,SAAS,KAAK,GACjB;EAEF,MAAM,UAAU,OAAO,sBAAsB,KAAK;EAClD,IAAI,QAAQ,MAAM,QAAQ,CAAC,KAAK,SAAS,GAAG,CAAC,GAC3C,MAAM,IAAI,UAAU,kEAAkE;EAExF,IACE,CAAC,QAAQ,MAAM,QAAQ,KAAK,SAAS,GAAG,CAAC,MACxC,OAAO,OAAO,OAAO,OAAO,KAAK,OAAO,OAAO,OAAO,WAAW,IAElE,MAAM,IAAI,UACR,8FACF;EAEF,MAAM,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"}
|