stillwind 0.12.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.
- package/CHANGELOG.md +55 -0
- package/README.md +1 -1
- package/css/builtin-utilities/tw-borders.css +59 -59
- package/css/builtin-utilities/tw-effects.css +53 -53
- package/css/builtin-utilities/tw-typography.css +13 -13
- package/dist/class-object-C87DR3v2.js +6 -0
- package/dist/class-object-C87DR3v2.js.map +1 -0
- package/dist/class-object-CR0QHoF9.d.ts +10 -0
- package/dist/{class-string-DQmH4PZX.d.ts → class-string-BlClX8JK.d.ts} +2 -2
- package/dist/class-string-CiNTVHYm.js +6 -0
- package/dist/{class-string-CrQnTRvI.js.map → class-string-CiNTVHYm.js.map} +1 -1
- package/dist/{formats-Ctf2WFc-.js → formats-DP9B9SG6.js} +228 -113
- package/dist/formats-DP9B9SG6.js.map +1 -0
- package/dist/{formats-aeLCNAXl.d.ts → formats-NBNjMP5R.d.ts} +34 -12
- package/dist/frameworks/alpine.d.ts +5 -3
- package/dist/frameworks/alpine.js +3 -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 +5 -3
- package/dist/frameworks/lit.js +3 -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 +5 -3
- package/dist/frameworks/vanilla.js +6 -1
- package/dist/frameworks/vanilla.js.map +1 -0
- package/dist/frameworks/vue.d.ts +3 -3
- package/dist/frameworks/vue.js +1 -1
- package/dist/{index-uw1R9t_P.d.ts → index-DpaDcczW.d.ts} +150 -50
- package/dist/macro/index.d.ts +2 -2
- package/dist/macro/index.js +1 -1
- package/dist/runtime/development.d.ts +16 -8
- package/dist/runtime/development.js +57 -21
- package/dist/runtime/development.js.map +1 -1
- package/dist/runtime/index.d.ts +2 -2
- package/dist/runtime/index.js +1 -1
- package/dist/{style-Bzuux32Y.js → style-dMBm8aX_.js} +6 -3
- package/dist/style-dMBm8aX_.js.map +1 -0
- package/docs/at-rules/apply.md +1 -1
- package/docs/at-rules/custom-variant.md +1 -1
- package/docs/at-rules/slot.md +1 -1
- package/docs/at-rules/stillwind-property.md +1 -1
- package/docs/at-rules/stillwind-registry.md +7 -7
- 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 +43 -4
- package/docs/at-rules/variant.md +1 -1
- package/docs/concepts/css-ordering.md +46 -7
- package/docs/concepts/how-styles-compile.md +8 -8
- package/docs/errors/SW10006.md +34 -0
- package/docs/errors/index.md +1 -0
- package/docs/guides/migrating-from-tailwind.md +52 -9
- package/docs/guides/reusable-styles.md +2 -2
- package/docs/integrations.md +20 -1
- package/docs/lints/conflicting-utilities.md +9 -0
- package/docs/lints/cyclic-style-order.md +61 -0
- package/docs/lints/index.md +14 -10
- package/docs/lints/{invalid-cva-config.md → invalid-recipe-config.md} +8 -8
- package/docs/lints/{invalid-cva-input.md → invalid-recipe-input.md} +9 -9
- package/docs/lints/multiple-style-forwards.md +59 -0
- package/docs/lints/partial-utility-override.md +77 -0
- package/docs/lints/utility-class-selector.md +72 -0
- package/docs/llms.txt +8 -3
- package/docs/macros/index.md +1 -1
- package/docs/macros/recipe.md +246 -0
- package/docs/macros/style.md +62 -0
- package/docs/macros/when.md +1 -1
- package/package.json +6 -6
- package/skills/stillwind/SKILL.md +1 -1
- package/dist/class-object-CXvJOi2z.d.ts +0 -9
- package/dist/class-object-CzD1oMD_.js +0 -6
- package/dist/class-object-CzD1oMD_.js.map +0 -1
- package/dist/class-string-CrQnTRvI.js +0 -6
- package/dist/formats-Ctf2WFc-.js.map +0 -1
- package/dist/style-Bzuux32Y.js.map +0 -1
- package/docs/macros/cva.md +0 -155
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { applyStyle, clearStyle } from "../style-BV4ctkni.js";
|
|
2
|
-
import { style } from "../class-object-
|
|
2
|
+
import { style as style$1 } from "../class-object-C87DR3v2.js";
|
|
3
3
|
// src/frameworks/alpine.ts
|
|
4
|
+
/** The `style` macro. Elements here receive no component props, so it has no `forward()`. */
|
|
5
|
+
const style = style$1;
|
|
4
6
|
/**
|
|
5
7
|
* Registers `x-sw` for reactive compiled props. Install with `Alpine.plugin(stillwind)`
|
|
6
8
|
* before `Alpine.start()`. The expression must return a Stillwind props object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpine.js","names":[],"sources":["../../src/frameworks/alpine.ts"],"sourcesContent":["import { applyStyle, clearStyle } from \"../dom/style.ts\";\nimport type
|
|
1
|
+
{"version":3,"file":"alpine.js","names":["classObjectStyle"],"sources":["../../src/frameworks/alpine.ts"],"sourcesContent":["import { applyStyle, clearStyle } from \"../dom/style.ts\";\nimport {\n style as classObjectStyle,\n type StyleMacroWithoutForward,\n type StyleProps,\n} from \"../outputs/class-object.ts\";\n\nexport type * from \"../macro/index.ts\";\nexport type { StyleResult as StyleResultOf } from \"../macro/output.ts\";\nexport type {\n StyleMacroWithoutForward as StyleMacro,\n StyleProps,\n StyleResult,\n} from \"../outputs/class-object.ts\";\n\n/** The `style` macro. Elements here receive no component props, so it has no `forward()`. */\nexport const style: StyleMacroWithoutForward = classObjectStyle;\n\ntype Alpine = {\n directive(\n name: string,\n handler: (\n element: HTMLElement,\n directive: {\n expression: string;\n },\n utilities: {\n evaluateLater(expression: string): (receive: (props: Readonly<StyleProps>) => void) => void;\n effect(callback: () => void): void;\n cleanup(callback: () => void): void;\n },\n ) => void,\n ): unknown;\n mutateDom<T>(callback: () => T): T;\n};\n\n/**\n * Registers `x-sw` for reactive compiled props. Install with `Alpine.plugin(stillwind)`\n * before `Alpine.start()`. The expression must return a Stillwind props object.\n * Updates replace the directive's contribution, and directive removal clears it.\n */\nexport function stillwind(alpine: Alpine): void {\n alpine.directive(\"sw\", (element, { expression }, utilities) => {\n const evaluate = utilities.evaluateLater(expression);\n utilities.effect(() => evaluate((props) => alpine.mutateDom(() => applyStyle(element, props))));\n utilities.cleanup(() => alpine.mutateDom(() => clearStyle(element)));\n });\n}\n"],"mappings":";;;;AAgBA,MAAa,QAAkCA;;;;;;AAyB/C,SAAgB,UAAU,QAAsB;CAC9C,OAAO,UAAU,OAAO,SAAS,EAAE,cAAc,cAAc;EAC7D,MAAM,WAAW,UAAU,cAAc,UAAU;EACnD,UAAU,aAAa,UAAU,UAAU,OAAO,gBAAgB,WAAW,SAAS,KAAK,CAAC,CAAC,CAAC;EAC9F,UAAU,cAAc,OAAO,gBAAgB,WAAW,OAAO,CAAC,CAAC;CACrE,CAAC;AACH"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StyleMacro, StyleProps, StyleResult, style } from "../class-string-
|
|
2
|
-
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword,
|
|
3
|
-
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type
|
|
1
|
+
import { StyleMacro, StyleProps, StyleResult, style } from "../class-string-BlClX8JK.js";
|
|
2
|
+
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacroWithoutForward, StyleRef, StyleRefProjection, StyleResult as StyleResult$1, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro } from "../index-DpaDcczW.js";
|
|
3
|
+
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type RecipeClassProps, type RecipeCompound, type RecipeConditions, type RecipeConfig, type RecipeInput, type RecipeResult, type RecipeRuleInput, type RecipeSelection, type RecipeSlotConfig, type RecipeSlotInput, type RecipeSlotName, type RecipeSlotVariants, type RecipeSlotVariantsOf, type RecipeSlots, type RecipeVariants, type RefScope, type RefVariant, type ScopedRefVariant, type StillwindClassValue, type StillwindDeclarationIdentity, type StyleArgument, type StyleCssGroup, type StyleCssInput, type StyleCssOptions, type StyleCustomProperties, type StyleCustomPropertyValue, type StyleForward, type StyleForwardProps, type StyleKeyframes, type StyleKeyframesDefinition, type StyleKeyframesFrames, type StyleKeyframesUse, type StyleMacro, type StyleMacroWithoutForward, type StyleProps, type StyleRef, type StyleRefProjection, type StyleResult, type StyleResult$1 as StyleResultOf, type StyleStoredVariant, type StyleVariant, type StyleVariantKey, type StyleVariantObject, type StyleVariantValue, type StyleViewTransition, type StyleViewTransitionDefinition, type StyleViewTransitionUse, type VariantProps, type createStyleMacro, style };
|
package/dist/frameworks/astro.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { style } from "../class-string-
|
|
1
|
+
export { style } from "../class-string-CiNTVHYm.js";
|
package/dist/frameworks/lit.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword,
|
|
1
|
+
import { StyleMacroWithoutForward, StyleProps, StyleResult } from "../class-object-CR0QHoF9.js";
|
|
2
|
+
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacroWithoutForward as StyleMacroWithoutForward$1, StyleRef, StyleRefProjection, StyleResult as StyleResult$1, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro } from "../index-DpaDcczW.js";
|
|
3
3
|
import { nothing } from "lit";
|
|
4
4
|
import { AsyncDirective } from "lit/async-directive.js";
|
|
5
5
|
import { ElementPart, PartInfo } from "lit/directive.js";
|
|
6
|
+
/** The `style` macro. Elements here receive no component props, so it has no `forward()`. */
|
|
7
|
+
export declare const style: StyleMacroWithoutForward;
|
|
6
8
|
declare class StyleDirective extends AsyncDirective {
|
|
7
9
|
#private;
|
|
8
10
|
constructor(part: PartInfo);
|
|
@@ -17,5 +19,5 @@ declare class StyleDirective extends AsyncDirective {
|
|
|
17
19
|
* the latest props. Server rendering of this directive is unsupported.
|
|
18
20
|
*/
|
|
19
21
|
export declare const applyStyle: (_props: Readonly<StyleProps>) => import("lit/async-directive.js").DirectiveResult<typeof StyleDirective>;
|
|
20
|
-
export {
|
|
22
|
+
export type { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacroWithoutForward as StyleMacro, StyleMacroWithoutForward$1 as StyleMacroWithoutForward, StyleProps, StyleRef, StyleRefProjection, StyleResult, StyleResult$1 as StyleResultOf, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro };
|
|
21
23
|
//# sourceMappingURL=lit.d.ts.map
|
package/dist/frameworks/lit.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { applyStyle as applyStyle$1, clearStyle } from "../style-BV4ctkni.js";
|
|
2
|
-
import { style } from "../class-object-
|
|
2
|
+
import { style as style$1 } from "../class-object-C87DR3v2.js";
|
|
3
3
|
import { nothing } from "lit";
|
|
4
4
|
import { AsyncDirective } from "lit/async-directive.js";
|
|
5
5
|
import { PartType, directive } from "lit/directive.js";
|
|
6
6
|
// src/frameworks/lit.ts
|
|
7
|
+
/** The `style` macro. Elements here receive no component props, so it has no `forward()`. */
|
|
8
|
+
const style = style$1;
|
|
7
9
|
var StyleDirective = class extends AsyncDirective {
|
|
8
10
|
#element;
|
|
9
11
|
#props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lit.js","names":[],"sources":["../../src/frameworks/lit.ts"],"sourcesContent":["import { nothing } from \"lit\";\nimport { AsyncDirective } from \"lit/async-directive.js\";\nimport { directive, PartType, type ElementPart, type PartInfo } from \"lit/directive.js\";\n\nimport { applyStyle as apply, clearStyle, type StyleElement } from \"../dom/style.ts\";\nimport type
|
|
1
|
+
{"version":3,"file":"lit.js","names":["classObjectStyle"],"sources":["../../src/frameworks/lit.ts"],"sourcesContent":["import { nothing } from \"lit\";\nimport { AsyncDirective } from \"lit/async-directive.js\";\nimport { directive, PartType, type ElementPart, type PartInfo } from \"lit/directive.js\";\n\nimport { applyStyle as apply, clearStyle, type StyleElement } from \"../dom/style.ts\";\nimport {\n style as classObjectStyle,\n type StyleMacroWithoutForward,\n type StyleProps,\n} from \"../outputs/class-object.ts\";\n\nexport type * from \"../macro/index.ts\";\nexport type { StyleResult as StyleResultOf } from \"../macro/output.ts\";\nexport type {\n StyleMacroWithoutForward as StyleMacro,\n StyleProps,\n StyleResult,\n} from \"../outputs/class-object.ts\";\n\n/** The `style` macro. Elements here receive no component props, so it has no `forward()`. */\nexport const style: StyleMacroWithoutForward = classObjectStyle;\n\nclass StyleDirective extends AsyncDirective {\n #element?: StyleElement;\n #props?: Readonly<StyleProps>;\n\n constructor(part: PartInfo) {\n super(part);\n if (part.type !== PartType.ELEMENT) {\n throw new Error(\"Stillwind applyStyle must be used in a Lit element binding\");\n }\n }\n\n override render(_props: Readonly<StyleProps>): typeof nothing {\n return nothing;\n }\n\n override update(part: ElementPart, [props]: [Readonly<StyleProps>]): typeof nothing {\n this.#element = part.element as StyleElement;\n this.#props = props;\n if (this.isConnected) {\n apply(this.#element, props);\n }\n return nothing;\n }\n\n protected override disconnected(): void {\n if (this.#element) {\n clearStyle(this.#element);\n }\n }\n\n protected override reconnected(): void {\n if (this.#element && this.#props) {\n apply(this.#element, this.#props);\n }\n }\n}\n\n/**\n * Applies compiled props in a browser Lit element binding: `<div ${applyStyle(props)}>`.\n * Updates replace its contribution and disconnection clears it. Reconnection reapplies\n * the latest props. Server rendering of this directive is unsupported.\n */\nexport const applyStyle = directive(StyleDirective);\n"],"mappings":";;;;;;;AAoBA,MAAa,QAAkCA;AAE/C,IAAM,iBAAN,cAA6B,eAAe;CAC1C;CACA;CAEA,YAAY,MAAgB;EAC1B,MAAM,IAAI;EACV,IAAI,KAAK,SAAS,SAAS,SACzB,MAAM,IAAI,MAAM,4DAA4D;CAEhF;CAEA,OAAgB,QAA8C;EAC5D,OAAO;CACT;CAEA,OAAgB,MAAmB,CAAC,QAAgD;EAClF,KAAK,WAAW,KAAK;EACrB,KAAK,SAAS;EACd,IAAI,KAAK,aACP,aAAM,KAAK,UAAU,KAAK;EAE5B,OAAO;CACT;CAEA,eAAwC;EACtC,IAAI,KAAK,UACP,WAAW,KAAK,QAAQ;CAE5B;CAEA,cAAuC;EACrC,IAAI,KAAK,YAAY,KAAK,QACxB,aAAM,KAAK,UAAU,KAAK,MAAM;CAEpC;AACF;;;;;;AAOA,MAAa,aAAa,UAAU,cAAc"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StyleMacro, StyleProps, StyleResult, style } from "../class-object-
|
|
2
|
-
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword,
|
|
3
|
-
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type
|
|
1
|
+
import { StyleMacro, StyleProps, StyleResult, style } from "../class-object-CR0QHoF9.js";
|
|
2
|
+
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacroWithoutForward, StyleRef, StyleRefProjection, StyleResult as StyleResult$1, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro } from "../index-DpaDcczW.js";
|
|
3
|
+
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type RecipeClassProps, type RecipeCompound, type RecipeConditions, type RecipeConfig, type RecipeInput, type RecipeResult, type RecipeRuleInput, type RecipeSelection, type RecipeSlotConfig, type RecipeSlotInput, type RecipeSlotName, type RecipeSlotVariants, type RecipeSlotVariantsOf, type RecipeSlots, type RecipeVariants, type RefScope, type RefVariant, type ScopedRefVariant, type StillwindClassValue, type StillwindDeclarationIdentity, type StyleArgument, type StyleCssGroup, type StyleCssInput, type StyleCssOptions, type StyleCustomProperties, type StyleCustomPropertyValue, type StyleForward, type StyleForwardProps, type StyleKeyframes, type StyleKeyframesDefinition, type StyleKeyframesFrames, type StyleKeyframesUse, type StyleMacro, type StyleMacroWithoutForward, type StyleProps, type StyleRef, type StyleRefProjection, type StyleResult, type StyleResult$1 as StyleResultOf, type StyleStoredVariant, type StyleVariant, type StyleVariantKey, type StyleVariantObject, type StyleVariantValue, type StyleViewTransition, type StyleViewTransitionDefinition, type StyleViewTransitionUse, type VariantProps, type createStyleMacro, style };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { style } from "../class-object-
|
|
1
|
+
export { style } from "../class-object-C87DR3v2.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StyleMacro, StyleProps, StyleResult, style } from "../class-object-
|
|
2
|
-
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword,
|
|
3
|
-
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type
|
|
1
|
+
import { StyleMacro, StyleProps, StyleResult, style } from "../class-object-CR0QHoF9.js";
|
|
2
|
+
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacroWithoutForward, StyleRef, StyleRefProjection, StyleResult as StyleResult$1, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro } from "../index-DpaDcczW.js";
|
|
3
|
+
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type RecipeClassProps, type RecipeCompound, type RecipeConditions, type RecipeConfig, type RecipeInput, type RecipeResult, type RecipeRuleInput, type RecipeSelection, type RecipeSlotConfig, type RecipeSlotInput, type RecipeSlotName, type RecipeSlotVariants, type RecipeSlotVariantsOf, type RecipeSlots, type RecipeVariants, type RefScope, type RefVariant, type ScopedRefVariant, type StillwindClassValue, type StillwindDeclarationIdentity, type StyleArgument, type StyleCssGroup, type StyleCssInput, type StyleCssOptions, type StyleCustomProperties, type StyleCustomPropertyValue, type StyleForward, type StyleForwardProps, type StyleKeyframes, type StyleKeyframesDefinition, type StyleKeyframesFrames, type StyleKeyframesUse, type StyleMacro, type StyleMacroWithoutForward, type StyleProps, type StyleRef, type StyleRefProjection, type StyleResult, type StyleResult$1 as StyleResultOf, type StyleStoredVariant, type StyleVariant, type StyleVariantKey, type StyleVariantObject, type StyleVariantValue, type StyleViewTransition, type StyleViewTransitionDefinition, type StyleViewTransitionUse, type VariantProps, type createStyleMacro, style };
|
package/dist/frameworks/qwik.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { style } from "../class-object-
|
|
1
|
+
export { style } from "../class-object-C87DR3v2.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword,
|
|
1
|
+
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacro as StyleMacro$1, StyleMacroWithoutForward, StyleRef, StyleRefProjection, StyleResult as StyleResult$1, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro } from "../index-DpaDcczW.js";
|
|
2
2
|
type StyleProps = {
|
|
3
3
|
className?: string;
|
|
4
4
|
style?: Record<string, string>;
|
|
@@ -6,5 +6,5 @@ type StyleProps = {
|
|
|
6
6
|
type StyleResult<Id extends string = string> = StyleResult$1<Id, StyleProps>;
|
|
7
7
|
type StyleMacro = StyleMacro$1<StyleProps>;
|
|
8
8
|
export declare const style: StyleMacro;
|
|
9
|
-
export type { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword,
|
|
9
|
+
export type { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacro, StyleMacroWithoutForward, StyleProps, StyleRef, StyleRefProjection, StyleResult, StyleResult$1 as StyleResultOf, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro };
|
|
10
10
|
//# sourceMappingURL=react.d.ts.map
|
package/dist/frameworks/react.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StyleMacro, StyleProps, StyleResult, style } from "../class-object-
|
|
2
|
-
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword,
|
|
3
|
-
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type
|
|
1
|
+
import { StyleMacro, StyleProps, StyleResult, style } from "../class-object-CR0QHoF9.js";
|
|
2
|
+
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacroWithoutForward, StyleRef, StyleRefProjection, StyleResult as StyleResult$1, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro } from "../index-DpaDcczW.js";
|
|
3
|
+
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type RecipeClassProps, type RecipeCompound, type RecipeConditions, type RecipeConfig, type RecipeInput, type RecipeResult, type RecipeRuleInput, type RecipeSelection, type RecipeSlotConfig, type RecipeSlotInput, type RecipeSlotName, type RecipeSlotVariants, type RecipeSlotVariantsOf, type RecipeSlots, type RecipeVariants, type RefScope, type RefVariant, type ScopedRefVariant, type StillwindClassValue, type StillwindDeclarationIdentity, type StyleArgument, type StyleCssGroup, type StyleCssInput, type StyleCssOptions, type StyleCustomProperties, type StyleCustomPropertyValue, type StyleForward, type StyleForwardProps, type StyleKeyframes, type StyleKeyframesDefinition, type StyleKeyframesFrames, type StyleKeyframesUse, type StyleMacro, type StyleMacroWithoutForward, type StyleProps, type StyleRef, type StyleRefProjection, type StyleResult, type StyleResult$1 as StyleResultOf, type StyleStoredVariant, type StyleVariant, type StyleVariantKey, type StyleVariantObject, type StyleVariantValue, type StyleViewTransition, type StyleViewTransitionDefinition, type StyleViewTransitionUse, type VariantProps, type createStyleMacro, style };
|
package/dist/frameworks/solid.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { style } from "../class-object-
|
|
1
|
+
export { style } from "../class-object-C87DR3v2.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StyleMacro, StyleProps, StyleResult, style } from "../class-string-
|
|
2
|
-
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword,
|
|
3
|
-
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type
|
|
1
|
+
import { StyleMacro, StyleProps, StyleResult, style } from "../class-string-BlClX8JK.js";
|
|
2
|
+
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacroWithoutForward, StyleRef, StyleRefProjection, StyleResult as StyleResult$1, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro } from "../index-DpaDcczW.js";
|
|
3
|
+
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type RecipeClassProps, type RecipeCompound, type RecipeConditions, type RecipeConfig, type RecipeInput, type RecipeResult, type RecipeRuleInput, type RecipeSelection, type RecipeSlotConfig, type RecipeSlotInput, type RecipeSlotName, type RecipeSlotVariants, type RecipeSlotVariantsOf, type RecipeSlots, type RecipeVariants, type RefScope, type RefVariant, type ScopedRefVariant, type StillwindClassValue, type StillwindDeclarationIdentity, type StyleArgument, type StyleCssGroup, type StyleCssInput, type StyleCssOptions, type StyleCustomProperties, type StyleCustomPropertyValue, type StyleForward, type StyleForwardProps, type StyleKeyframes, type StyleKeyframesDefinition, type StyleKeyframesFrames, type StyleKeyframesUse, type StyleMacro, type StyleMacroWithoutForward, type StyleProps, type StyleRef, type StyleRefProjection, type StyleResult, type StyleResult$1 as StyleResultOf, type StyleStoredVariant, type StyleVariant, type StyleVariantKey, type StyleVariantObject, type StyleVariantValue, type StyleViewTransition, type StyleViewTransitionDefinition, type StyleViewTransitionUse, type VariantProps, type createStyleMacro, style };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { style } from "../class-string-
|
|
1
|
+
export { style } from "../class-string-CiNTVHYm.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword,
|
|
1
|
+
import { StyleMacroWithoutForward, StyleProps, StyleResult } from "../class-object-CR0QHoF9.js";
|
|
2
|
+
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacroWithoutForward as StyleMacroWithoutForward$1, StyleRef, StyleRefProjection, StyleResult as StyleResult$1, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro } from "../index-DpaDcczW.js";
|
|
3
3
|
type StyleElement = Element & ElementCSSInlineStyle;
|
|
4
4
|
/**
|
|
5
5
|
* Applies compiled props to an HTML, SVG, or other element with inline CSS support.
|
|
@@ -23,5 +23,7 @@ export declare function applyStyle(element: StyleElement, props: Readonly<StyleP
|
|
|
23
23
|
* @param element - Element previously passed to `applyStyle`. Other elements are unchanged.
|
|
24
24
|
*/
|
|
25
25
|
export declare function clearStyle(element: StyleElement): void;
|
|
26
|
-
|
|
26
|
+
/** The `style` macro. Elements here receive no component props, so it has no `forward()`. */
|
|
27
|
+
export declare const style: StyleMacroWithoutForward;
|
|
28
|
+
export type { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacroWithoutForward as StyleMacro, StyleMacroWithoutForward$1 as StyleMacroWithoutForward, StyleProps, StyleRef, StyleRefProjection, StyleResult, StyleResult$1 as StyleResultOf, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro };
|
|
27
29
|
//# sourceMappingURL=vanilla.d.ts.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { style as style$1 } from "../class-object-C87DR3v2.js";
|
|
1
2
|
import { applyStyle, clearStyle } from "../style-BV4ctkni.js";
|
|
2
|
-
|
|
3
|
+
// src/frameworks/vanilla.ts
|
|
4
|
+
/** The `style` macro. Elements here receive no component props, so it has no `forward()`. */
|
|
5
|
+
const style = style$1;
|
|
3
6
|
export { applyStyle, clearStyle, style };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=vanilla.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vanilla.js","names":["classObjectStyle"],"sources":["../../src/frameworks/vanilla.ts"],"sourcesContent":["import {\n style as classObjectStyle,\n type StyleMacroWithoutForward,\n} from \"../outputs/class-object.ts\";\n\nexport { applyStyle, clearStyle } from \"../dom/style.ts\";\nexport type * from \"../macro/index.ts\";\nexport type { StyleResult as StyleResultOf } from \"../macro/output.ts\";\nexport type {\n StyleMacroWithoutForward as StyleMacro,\n StyleProps,\n StyleResult,\n} from \"../outputs/class-object.ts\";\n\n/** The `style` macro. Elements here receive no component props, so it has no `forward()`. */\nexport const style: StyleMacroWithoutForward = classObjectStyle;\n"],"mappings":";;;;AAeA,MAAa,QAAkCA"}
|
package/dist/frameworks/vue.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StyleMacro, StyleProps, StyleResult, style } from "../class-object-
|
|
2
|
-
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword,
|
|
3
|
-
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type
|
|
1
|
+
import { StyleMacro, StyleProps, StyleResult, style } from "../class-object-CR0QHoF9.js";
|
|
2
|
+
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacroWithoutForward, StyleRef, StyleRefProjection, StyleResult as StyleResult$1, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro } from "../index-DpaDcczW.js";
|
|
3
|
+
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type RecipeClassProps, type RecipeCompound, type RecipeConditions, type RecipeConfig, type RecipeInput, type RecipeResult, type RecipeRuleInput, type RecipeSelection, type RecipeSlotConfig, type RecipeSlotInput, type RecipeSlotName, type RecipeSlotVariants, type RecipeSlotVariantsOf, type RecipeSlots, type RecipeVariants, type RefScope, type RefVariant, type ScopedRefVariant, type StillwindClassValue, type StillwindDeclarationIdentity, type StyleArgument, type StyleCssGroup, type StyleCssInput, type StyleCssOptions, type StyleCustomProperties, type StyleCustomPropertyValue, type StyleForward, type StyleForwardProps, type StyleKeyframes, type StyleKeyframesDefinition, type StyleKeyframesFrames, type StyleKeyframesUse, type StyleMacro, type StyleMacroWithoutForward, type StyleProps, type StyleRef, type StyleRefProjection, type StyleResult, type StyleResult$1 as StyleResultOf, type StyleStoredVariant, type StyleVariant, type StyleVariantKey, type StyleVariantObject, type StyleVariantValue, type StyleViewTransition, type StyleViewTransitionDefinition, type StyleViewTransitionUse, type VariantProps, type createStyleMacro, style };
|
package/dist/frameworks/vue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { style } from "../class-object-
|
|
1
|
+
export { style } from "../class-object-C87DR3v2.js";
|
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A static variant prefix used as an object key in `style()`, including its final `:`.
|
|
3
|
+
* Nested keys compose from outermost to innermost. Raw selector keys must use
|
|
4
|
+
* arbitrary-variant syntax, such as `[&:hover]:`.
|
|
5
|
+
*/
|
|
6
|
+
export type StyleVariant = `${string}:`;
|
|
7
|
+
/**
|
|
8
|
+
* Ordinary values for the external-class entry `{ class: value }` in `style()`.
|
|
9
|
+
*
|
|
10
|
+
* Strings, numbers, and bigints become class text. Arrays are flattened, and object
|
|
11
|
+
* keys are included when their values are truthy. Booleans, null, and undefined add no
|
|
12
|
+
* class text. These values may be stored and passed to other functions.
|
|
13
|
+
*/
|
|
14
|
+
export type StillwindClassValue = string | number | bigint | boolean | null | undefined | readonly StillwindClassValue[] | Readonly<Record<string, unknown>>;
|
|
15
|
+
/**
|
|
16
|
+
* Ordinary values for inline custom properties.
|
|
17
|
+
*
|
|
18
|
+
* These may be stored and passed between functions. Strings are CSS text, numbers have
|
|
19
|
+
* no unit, and URL objects become escaped `url("...")` values. True becomes one space,
|
|
20
|
+
* and false becomes `initial`.
|
|
21
|
+
*/
|
|
22
|
+
export type StyleCustomPropertyValue = URL | string | number | boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The class and style props that `style.forward()` reads. Other props of the object are
|
|
25
|
+
* ignored, so a component can pass all of its props.
|
|
26
|
+
*/
|
|
27
|
+
export type StyleForwardProps = {
|
|
28
|
+
/** Class values, joined as `stillwindClsx` joins them. */
|
|
29
|
+
readonly class?: StillwindClassValue;
|
|
30
|
+
/** Class values, joined after `class` as `stillwindClsx` joins them. */
|
|
31
|
+
readonly className?: StillwindClassValue;
|
|
32
|
+
/**
|
|
33
|
+
* Inline style in the form that the framework accepts: declaration text, an object, or,
|
|
34
|
+
* in frameworks that accept them, an array of these values.
|
|
35
|
+
*/
|
|
36
|
+
readonly style?: string | object | null;
|
|
37
|
+
};
|
|
38
|
+
declare const styleForwardBrand: unique symbol;
|
|
39
|
+
/**
|
|
40
|
+
* Props that a caller forwarded. Pass the value directly to `style()` or as the second
|
|
41
|
+
* argument of a `style.recipe()` factory. It cannot be stored for later use.
|
|
42
|
+
*/
|
|
43
|
+
export interface StyleForward {
|
|
44
|
+
readonly [styleForwardBrand]: true;
|
|
45
|
+
}
|
|
1
46
|
/** Identity markers and rule syntax for ref projections. */
|
|
2
47
|
declare const refProjection: unique symbol;
|
|
3
48
|
declare const refIdentity: unique symbol;
|
|
@@ -345,28 +390,6 @@ export type ContainerVariant<RefId extends string = string> = StyleVariantKey &
|
|
|
345
390
|
readonly ref: RefId;
|
|
346
391
|
};
|
|
347
392
|
};
|
|
348
|
-
/**
|
|
349
|
-
* A static variant prefix used as an object key in `style()`, including its final `:`.
|
|
350
|
-
* Nested keys compose from outermost to innermost. Raw selector keys must use
|
|
351
|
-
* arbitrary-variant syntax, such as `[&:hover]:`.
|
|
352
|
-
*/
|
|
353
|
-
export type StyleVariant = `${string}:`;
|
|
354
|
-
/**
|
|
355
|
-
* Ordinary values for the external-class entry `{ class: value }` in `style()`.
|
|
356
|
-
*
|
|
357
|
-
* Strings, numbers, and bigints become class text. Arrays are flattened, and object
|
|
358
|
-
* keys are included when their values are truthy. Booleans, null, and undefined add no
|
|
359
|
-
* class text. These values may be stored and passed to other functions.
|
|
360
|
-
*/
|
|
361
|
-
export type StillwindClassValue = string | number | bigint | boolean | null | undefined | readonly StillwindClassValue[] | Readonly<Record<string, unknown>>;
|
|
362
|
-
/**
|
|
363
|
-
* Ordinary values for inline custom properties.
|
|
364
|
-
*
|
|
365
|
-
* These may be stored and passed between functions. Strings are CSS text, numbers have
|
|
366
|
-
* no unit, and URL objects become escaped `url("...")` values. True becomes one space,
|
|
367
|
-
* and false becomes `initial`.
|
|
368
|
-
*/
|
|
369
|
-
export type StyleCustomPropertyValue = URL | string | number | boolean;
|
|
370
393
|
declare const viewTransitionIdentity: unique symbol;
|
|
371
394
|
/**
|
|
372
395
|
* Participant naming syntax returned by `transition.for()`.
|
|
@@ -489,7 +512,7 @@ type StyleObject = (StyleVariantObject | (StyleVariantObject & Partial<StyleCust
|
|
|
489
512
|
* uses require direct calls, and ref variants require computed keys or utility template
|
|
490
513
|
* substitutions. This union does not make every member a portable value.
|
|
491
514
|
*/
|
|
492
|
-
export type StyleArgument = StyleResult<string, object> | string | false | null | undefined | readonly StyleArgument[] | StyleObject | StyleRef | StyleRefProjection | StyleVariantKey | StyleKeyframesUse | StyleViewTransition | StyleViewTransitionUse;
|
|
515
|
+
export type StyleArgument = StyleResult<string, object> | string | false | null | undefined | readonly StyleArgument[] | StyleObject | StyleRef | StyleRefProjection | StyleVariantKey | StyleKeyframesUse | StyleViewTransition | StyleViewTransitionUse | StyleForward;
|
|
493
516
|
declare const utilityStringCompletion: unique symbol;
|
|
494
517
|
type UtilityString = string & {
|
|
495
518
|
readonly [utilityStringCompletion]?: never;
|
|
@@ -498,7 +521,7 @@ type CheckedString<Input extends string> = {} extends Record<Input, never> ? Inp
|
|
|
498
521
|
type CheckedVariantInput<Input> = StyleVariantValue extends Input ? StyleVariantValue : Input extends readonly unknown[] ? { [Key in keyof Input]: CheckedVariantInput<Input[Key]>; } : Input extends string | false | null | undefined | StyleRefProjection | StyleKeyframesUse | StyleViewTransition | StyleViewTransitionUse ? Input extends string ? CheckedString<Input> : StyleVariantValue : Input extends object ? { [Key in keyof Input]: string extends Key ? StyleVariantValue : Key extends "" | StyleVariant | StyleVariantKey ? CheckedVariantInput<Input[Key]> : never; } : StyleVariantValue;
|
|
499
522
|
type StyleBaseProperties<Input> = Input extends StyleResult ? Extract<keyof Input, "style"> : never;
|
|
500
523
|
type CheckedStyleInput<Input> = StyleArgument extends Input ? StyleArgument : [StyleBaseProperties<Input>] extends [never] ? CheckedClassInput<Input> : never;
|
|
501
|
-
type CheckedClassInput<Input> = Input extends readonly unknown[] ? { [Key in keyof Input]: CheckedStyleInput<Input[Key]>; } : Input extends StyleResult ? StyleArgument : Input extends StyleRef | StyleRefProjection | StyleKeyframesUse | StyleViewTransition | StyleViewTransitionUse | string | false | null | undefined ? Input extends string ? CheckedString<Input> : StyleArgument : Input extends ((...args: never[]) => unknown) ? never : Input extends object ? { [Key in keyof Input]: string extends Key ? StyleVariantValue : Key extends "" | StyleVariant | StyleVariantKey ? CheckedVariantInput<Input[Key]> : Key extends `--${string}` ? StyleCustomPropertyValue : Key extends "class" ? StillwindClassValue : never; } : StyleArgument;
|
|
524
|
+
type CheckedClassInput<Input> = Input extends readonly unknown[] ? { [Key in keyof Input]: CheckedStyleInput<Input[Key]>; } : Input extends StyleResult ? StyleArgument : Input extends StyleForward | StyleRef | StyleRefProjection | StyleKeyframesUse | StyleViewTransition | StyleViewTransitionUse | string | false | null | undefined ? Input extends string ? CheckedString<Input> : StyleArgument : Input extends ((...args: never[]) => unknown) ? never : Input extends object ? { [Key in keyof Input]: string extends Key ? StyleVariantValue : Key extends "" | StyleVariant | StyleVariantKey ? CheckedVariantInput<Input[Key]> : Key extends `--${string}` ? StyleCustomPropertyValue : Key extends "class" ? StillwindClassValue : never; } : StyleArgument;
|
|
502
525
|
type CheckedStyleInputs<Inputs extends readonly unknown[]> = { [Key in keyof Inputs]: CheckedStyleInput<Inputs[Key]>; };
|
|
503
526
|
/**
|
|
504
527
|
* Materialized framework props returned by a completed `style()` call.
|
|
@@ -555,10 +578,10 @@ export interface StyleCssOptions {
|
|
|
555
578
|
*/
|
|
556
579
|
readonly selector?: string;
|
|
557
580
|
}
|
|
558
|
-
/** Static rule inputs accepted by variant keys and the keys `""` and `":"` in a
|
|
559
|
-
export type
|
|
560
|
-
readonly ""?:
|
|
561
|
-
readonly [variant: StyleVariant]:
|
|
581
|
+
/** Static rule inputs accepted by variant keys and the keys `""` and `":"` in a recipe definition. */
|
|
582
|
+
export type RecipeRuleInput = string | boolean | null | undefined | readonly RecipeRuleInput[] | {
|
|
583
|
+
readonly ""?: RecipeRuleInput;
|
|
584
|
+
readonly [variant: StyleVariant]: RecipeRuleInput;
|
|
562
585
|
};
|
|
563
586
|
/**
|
|
564
587
|
* Statically written utilities, arrays, CSS variants, and custom properties.
|
|
@@ -568,39 +591,76 @@ export type CvaRuleInput = string | boolean | null | undefined | readonly CvaRul
|
|
|
568
591
|
* Custom properties remain inline, including literal values. Stored input objects,
|
|
569
592
|
* spreads, declaration uses, and composed style results are unsupported.
|
|
570
593
|
*/
|
|
571
|
-
export type
|
|
572
|
-
readonly ""?:
|
|
573
|
-
readonly [variant: StyleVariant]:
|
|
594
|
+
export type RecipeInput = string | boolean | null | undefined | readonly RecipeInput[] | {
|
|
595
|
+
readonly ""?: RecipeRuleInput;
|
|
596
|
+
readonly [variant: StyleVariant]: RecipeRuleInput;
|
|
574
597
|
readonly [property: `--${string}`]: StyleCustomPropertyValue;
|
|
575
598
|
};
|
|
576
|
-
/** Finite option maps written directly in a
|
|
577
|
-
export type
|
|
599
|
+
/** Finite option maps written directly in a recipe configuration. */
|
|
600
|
+
export type RecipeVariants = Readonly<Record<string, Readonly<Record<string, RecipeInput>>>>;
|
|
578
601
|
type Option<Key> = Key extends "true" | "false" ? boolean : Key;
|
|
602
|
+
/**
|
|
603
|
+
* Option maps of a recipe with slots. The compiler checks each option value: an object whose keys
|
|
604
|
+
* all name slots selects inputs by slot, and any other input applies to the `base` slot.
|
|
605
|
+
*/
|
|
606
|
+
export type RecipeSlotVariants = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
607
|
+
/** Option maps whose values are inputs for the `base` slot or inputs keyed by slot name. */
|
|
608
|
+
export type RecipeSlotVariantsOf<Slots extends RecipeSlots> = Readonly<Record<string, Readonly<Record<string, RecipeSlotInput<Slots>>>>>;
|
|
609
|
+
/** Named element parts of a recipe and the inputs that every selection adds to them. */
|
|
610
|
+
export type RecipeSlots = Readonly<Record<string, RecipeInput>>;
|
|
611
|
+
/** A slot of a recipe, including the `base` slot that every recipe with slots has. */
|
|
612
|
+
export type RecipeSlotName<Slots extends RecipeSlots> = (keyof Slots & string) | "base";
|
|
613
|
+
/** An input for the `base` slot, or inputs keyed by slot name. */
|
|
614
|
+
export type RecipeSlotInput<Slots extends RecipeSlots> = RecipeInput | { readonly [Slot in RecipeSlotName<Slots>]?: RecipeInput; };
|
|
579
615
|
/** Variant choices; undefined keeps the default, and null suppresses the option. */
|
|
580
|
-
export type
|
|
616
|
+
export type RecipeSelection<Variants extends RecipeSlotVariants> = { readonly [Key in keyof Variants]?: Option<keyof Variants[Key]> | null | undefined; };
|
|
581
617
|
/** External classes appended after selected options and compound variants. */
|
|
582
|
-
export type
|
|
618
|
+
export type RecipeClassProps = {
|
|
583
619
|
readonly class?: StillwindClassValue;
|
|
584
620
|
readonly className?: StillwindClassValue;
|
|
585
621
|
};
|
|
622
|
+
/** Option conditions of a compound entry. An array matches any of its options. */
|
|
623
|
+
export type RecipeConditions<Variants extends RecipeSlotVariants> = { readonly [Key in keyof Variants]?: Option<keyof Variants[Key]> | null | undefined | readonly (Option<keyof Variants[Key]> | null | undefined)[]; };
|
|
586
624
|
/** A conjunction of option conditions and the styles added when all conditions match. */
|
|
587
|
-
export type
|
|
588
|
-
readonly class?:
|
|
589
|
-
readonly className?:
|
|
625
|
+
export type RecipeCompound<Variants extends RecipeVariants> = RecipeConditions<Variants> & {
|
|
626
|
+
readonly class?: RecipeInput;
|
|
627
|
+
readonly className?: RecipeInput;
|
|
590
628
|
};
|
|
591
|
-
/** Static configuration for a
|
|
592
|
-
export type
|
|
629
|
+
/** Static configuration for a recipe factory. The class prop names cannot be variant axes. */
|
|
630
|
+
export type RecipeConfig<Variants extends RecipeVariants> = {
|
|
593
631
|
readonly variants?: Variants & {
|
|
594
632
|
readonly class?: never;
|
|
595
633
|
readonly className?: never;
|
|
596
634
|
};
|
|
597
|
-
readonly defaultVariants?:
|
|
598
|
-
readonly compoundVariants?: readonly
|
|
635
|
+
readonly defaultVariants?: RecipeSelection<Variants>;
|
|
636
|
+
readonly compoundVariants?: readonly RecipeCompound<Variants>[];
|
|
599
637
|
};
|
|
600
|
-
/** Framework props for an element;
|
|
601
|
-
export type
|
|
602
|
-
/** Extracts variant choices from a
|
|
638
|
+
/** Framework props for an element; recipe results cannot be composed through style(). */
|
|
639
|
+
export type RecipeResult<Props> = Pick<Props, Extract<keyof Props, "class" | "className" | "style">>;
|
|
640
|
+
/** Extracts variant choices from a recipe factory, excluding external class inputs. */
|
|
603
641
|
export type VariantProps<Factory extends (...args: never[]) => unknown> = Omit<Exclude<Parameters<Factory>[0], undefined>, "class" | "className">;
|
|
642
|
+
/**
|
|
643
|
+
* Static configuration for a recipe factory with slots. Option values and compound class inputs
|
|
644
|
+
* may select inputs by slot. `compoundSlots` entries add their class inputs to every listed slot
|
|
645
|
+
* when all conditions match.
|
|
646
|
+
*/
|
|
647
|
+
export type RecipeSlotConfig<Slots extends RecipeSlots, Variants extends RecipeSlotVariantsOf<Slots>> = {
|
|
648
|
+
readonly slots: Slots;
|
|
649
|
+
readonly variants?: Variants & {
|
|
650
|
+
readonly class?: never;
|
|
651
|
+
readonly className?: never;
|
|
652
|
+
};
|
|
653
|
+
readonly defaultVariants?: RecipeSelection<Variants>;
|
|
654
|
+
readonly compoundVariants?: readonly (RecipeConditions<Variants> & {
|
|
655
|
+
readonly class?: RecipeSlotInput<Slots>;
|
|
656
|
+
readonly className?: RecipeSlotInput<Slots>;
|
|
657
|
+
})[];
|
|
658
|
+
readonly compoundSlots?: readonly (RecipeConditions<Variants> & {
|
|
659
|
+
readonly slots: readonly RecipeSlotName<Slots>[];
|
|
660
|
+
readonly class?: RecipeInput;
|
|
661
|
+
readonly className?: RecipeInput;
|
|
662
|
+
})[];
|
|
663
|
+
};
|
|
604
664
|
declare const storedVariantIdentity: unique symbol;
|
|
605
665
|
/**
|
|
606
666
|
* A variant sequence stored by `style.when()`.
|
|
@@ -649,7 +709,32 @@ export type StillwindDeclarationIdentity<Id extends string> = {
|
|
|
649
709
|
* same value-expression contract. Declaration-identity overloads are internal checker
|
|
650
710
|
* metadata.
|
|
651
711
|
*/
|
|
652
|
-
export type StyleMacro<Props = object> = {
|
|
712
|
+
export type StyleMacro<Props = object> = StyleMacroWithoutForward<Props> & {
|
|
713
|
+
/**
|
|
714
|
+
* Passes the class and style props that a component received to one of its `style()`
|
|
715
|
+
* calls, so the caller's styles override the component's own styles.
|
|
716
|
+
*
|
|
717
|
+
* Write the call directly as an argument of `style()` or as the second argument of a
|
|
718
|
+
* `style.recipe()` factory. The forwarded classes come after the call's classes, and the
|
|
719
|
+
* forwarded style applies after the call's style and custom properties, whatever the
|
|
720
|
+
* argument position. Several forwarded values apply their styles in argument order, and
|
|
721
|
+
* CSS order, not argument order, decides which of their classes wins. In the CSS, the
|
|
722
|
+
* caller's module follows the module that declares the component.
|
|
723
|
+
*
|
|
724
|
+
* @param props - The received props, such as `{ className, style }` or the whole props
|
|
725
|
+
* object. Null and undefined forward nothing. When the whole props object is passed, do
|
|
726
|
+
* not spread the same props onto the element after the result, because they would
|
|
727
|
+
* replace its class and style.
|
|
728
|
+
* @returns A value that only `style()` and `style.recipe()` factories accept.
|
|
729
|
+
*/
|
|
730
|
+
forward(props: StyleForwardProps | null | undefined): StyleForward;
|
|
731
|
+
};
|
|
732
|
+
/**
|
|
733
|
+
* The `style` macro of an entrypoint whose framework has no component props, such as
|
|
734
|
+
* Lit, Alpine, and vanilla DOM code. It has every member of {@link StyleMacro} except
|
|
735
|
+
* `forward()`.
|
|
736
|
+
*/
|
|
737
|
+
export type StyleMacroWithoutForward<Props = object> = {
|
|
653
738
|
/**
|
|
654
739
|
* Compiles static utility branches and combines them with inline custom
|
|
655
740
|
* properties, external classes, and completed style props.
|
|
@@ -836,7 +921,20 @@ export type StyleMacro<Props = object> = {
|
|
|
836
921
|
*/
|
|
837
922
|
css(...inputs: [...StyleCssInput[], StyleCssOptions]): string;
|
|
838
923
|
/**
|
|
839
|
-
* Compiles a
|
|
924
|
+
* Compiles a recipe definition with slots and returns a function that selects props for each
|
|
925
|
+
* slot. The first argument adds styles to the `base` slot. Calling the factory returns one
|
|
926
|
+
* function for each slot in `slots` and for `base`. The classes and the `style.forward()`
|
|
927
|
+
* value passed to the factory apply to the `base` slot. A slot function accepts variant
|
|
928
|
+
* choices that replace the factory's choices, its own classes, and its own `style.forward()`
|
|
929
|
+
* value.
|
|
930
|
+
*
|
|
931
|
+
* @param base - Styles included in the `base` slot of every selection.
|
|
932
|
+
* @param config - Static slots, variants, defaults, compound variants, and compound slots.
|
|
933
|
+
* @returns A reusable factory returning an object of slot functions.
|
|
934
|
+
*/
|
|
935
|
+
recipe<Slots extends RecipeSlots, Variants extends RecipeSlotVariantsOf<Slots> = Record<never, never>>(base: RecipeInput, config: RecipeSlotConfig<Slots, Variants>): (props?: RecipeSelection<Variants> & RecipeClassProps, forwarded?: StyleForward) => { readonly [Slot in RecipeSlotName<Slots>]: (props?: RecipeSelection<Variants> & RecipeClassProps, forwarded?: StyleForward) => RecipeResult<Props>; };
|
|
936
|
+
/**
|
|
937
|
+
* Compiles a recipe definition and returns a function that selects element props.
|
|
840
938
|
* Write the configuration and utility inputs directly in the call. Utility inputs
|
|
841
939
|
* cannot contain `&&` or ternary expressions. Pass runtime conditions as variant
|
|
842
940
|
* selections. Custom properties remain inline and value expressions obey this
|
|
@@ -845,9 +943,11 @@ export type StyleMacro<Props = object> = {
|
|
|
845
943
|
* @param base - Optional styles included in every selection.
|
|
846
944
|
* @param config - Static variants, defaults, and compound conditions.
|
|
847
945
|
* @returns A reusable factory returning fresh framework class and style props.
|
|
848
|
-
* Its results cannot be passed to style() for composition.
|
|
946
|
+
* Its results cannot be passed to style() for composition. The factory's optional
|
|
947
|
+
* second argument is a `style.forward()` value, which applies after the selected
|
|
948
|
+
* styles.
|
|
849
949
|
*/
|
|
850
|
-
|
|
950
|
+
recipe<Variants extends RecipeVariants = Record<never, never>>(base?: RecipeInput, config?: RecipeConfig<Variants>): (props?: RecipeSelection<Variants> & RecipeClassProps, forwarded?: StyleForward) => RecipeResult<Props>;
|
|
851
951
|
};
|
|
852
952
|
/**
|
|
853
953
|
* Internal use only. Builds the placeholder exported by each framework entrypoint.
|
|
@@ -861,4 +961,4 @@ export type StyleMacro<Props = object> = {
|
|
|
861
961
|
*/
|
|
862
962
|
export declare function createStyleMacro<Props>(): StyleMacro<Props>;
|
|
863
963
|
export {};
|
|
864
|
-
//# sourceMappingURL=index-
|
|
964
|
+
//# sourceMappingURL=index-DpaDcczW.d.ts.map
|
package/dist/macro/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword,
|
|
2
|
-
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type
|
|
1
|
+
import { AnchorScope, ContainerType, ContainerVariant, CssWideKeyword, RecipeClassProps, RecipeCompound, RecipeConditions, RecipeConfig, RecipeInput, RecipeResult, RecipeRuleInput, RecipeSelection, RecipeSlotConfig, RecipeSlotInput, RecipeSlotName, RecipeSlotVariants, RecipeSlotVariantsOf, RecipeSlots, RecipeVariants, RefScope, RefVariant, ScopedRefVariant, StillwindClassValue, StillwindDeclarationIdentity, StyleArgument, StyleCssGroup, StyleCssInput, StyleCssOptions, StyleCustomProperties, StyleCustomPropertyValue, StyleForward, StyleForwardProps, StyleKeyframes, StyleKeyframesDefinition, StyleKeyframesFrames, StyleKeyframesUse, StyleMacro, StyleMacroWithoutForward, StyleRef, StyleRefProjection, StyleResult, StyleStoredVariant, StyleVariant, StyleVariantKey, StyleVariantObject, StyleVariantValue, StyleViewTransition, StyleViewTransitionDefinition, StyleViewTransitionUse, VariantProps, createStyleMacro } from "../index-DpaDcczW.js";
|
|
2
|
+
export { type AnchorScope, type ContainerType, type ContainerVariant, type CssWideKeyword, type RecipeClassProps, type RecipeCompound, type RecipeConditions, type RecipeConfig, type RecipeInput, type RecipeResult, type RecipeRuleInput, type RecipeSelection, type RecipeSlotConfig, type RecipeSlotInput, type RecipeSlotName, type RecipeSlotVariants, type RecipeSlotVariantsOf, type RecipeSlots, type RecipeVariants, type RefScope, type RefVariant, type ScopedRefVariant, type StillwindClassValue, type StillwindDeclarationIdentity, type StyleArgument, type StyleCssGroup, type StyleCssInput, type StyleCssOptions, type StyleCustomProperties, type StyleCustomPropertyValue, type StyleForward, type StyleForwardProps, type StyleKeyframes, type StyleKeyframesDefinition, type StyleKeyframesFrames, type StyleKeyframesUse, type StyleMacro, type StyleMacroWithoutForward, type StyleRef, type StyleRefProjection, type StyleResult, type StyleStoredVariant, type StyleVariant, type StyleVariantKey, type StyleVariantObject, type StyleVariantValue, type StyleViewTransition, type StyleViewTransitionDefinition, type StyleViewTransitionUse, type VariantProps, createStyleMacro };
|
package/dist/macro/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createStyleMacro } from "../style-
|
|
1
|
+
export { createStyleMacro } from "../style-dMBm8aX_.js";
|