@stillwind/config 0.1.0-rc.0 → 0.3.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolution-DCwmb-pa.js","names":[],"sources":["../src/lint-presets.ts","../src/lint-rules.ts","../src/validation.ts","../src/lint.ts","../src/compiler.ts","../src/configuration.ts","../src/merge.ts","../src/resolution.ts"],"sourcesContent":["// Generated by tools/workspace/lint-rules.ts from the Rust lint presets.\n\n/** Default checks also inherited by the strict preset. The same object is shared by all consumers. */\nconst recommended = {\n name: \"stillwind/recommended\",\n rules: {\n \"invalid-lint-suppression\": \"warn\",\n \"duplicate-utility\": \"warn\",\n \"conflicting-utilities\": \"warn\",\n \"mismatched-framework-import\": \"warn\",\n \"mutating-macro-argument\": \"deny\",\n \"suspending-macro-argument\": \"deny\",\n \"invalid-rule-group-input\": \"deny\",\n \"invalid-style-input\": \"deny\",\n \"invalid-cva-config\": \"deny\",\n \"invalid-cva-input\": \"deny\",\n \"invalid-keyframes-use\": \"deny\",\n \"invalid-keyframes-definition\": \"deny\",\n \"invalid-keyframes-variant\": \"deny\",\n \"invalid-view-transition-use\": \"deny\",\n \"invalid-view-transition-definition\": \"deny\",\n \"invalid-view-transition-variant\": \"deny\",\n \"invalid-media-query\": \"deny\",\n \"invalid-css-input\": \"deny\",\n \"invalid-ref-input\": \"deny\",\n \"invalid-animation-option\": \"deny\",\n \"invalid-style-composition\": \"deny\",\n \"runtime-condition-requires-css-if\": \"deny\",\n \"unverified-style-base\": \"warn\",\n \"ineffective-anchor-scope\": \"warn\",\n \"missing-ref-attachment\": \"warn\",\n \"conflicting-provider-properties\": \"warn\",\n \"document-scoped-selector\": \"deny\",\n \"repeated-nesting-selector\": \"warn\",\n \"missing-view-transition-name\": \"warn\",\n \"duplicate-view-transition-name\": \"warn\",\n \"split-view-transition-class\": \"warn\",\n \"ambiguous-style-base-order\": \"warn\",\n \"interfering-imported-style-base\": \"warn\",\n \"incompatible-property-value\": \"deny\",\n \"invalid-utility\": \"deny\",\n \"unknown-utility\": \"deny\",\n \"invalid-marker-use\": \"warn\",\n \"invalid-variant\": \"deny\",\n \"unknown-variant\": \"deny\",\n \"missing-document-target\": \"deny\",\n \"prefer-canonical-utilities\": \"warn\",\n \"redundant-variant\": \"warn\",\n \"unsatisfiable-variants\": \"warn\",\n \"clamped-value\": \"warn\",\n \"invalid-theme-reference\": \"deny\",\n \"invalid-css-import\": \"deny\",\n \"invalid-css-directive\": \"deny\",\n \"invalid-runtime-condition\": \"deny\",\n \"duplicate-definition\": \"warn\",\n \"bypassed-undefinition\": \"warn\",\n \"ignored-definition-condition\": \"deny\",\n \"incompatible-theme-value\": \"deny\",\n \"ignored-tailwind-feature\": \"warn\",\n \"implicit-nesting-selector\": \"warn\",\n },\n} as const;\n\n/**\n * Built-in lint policies for ordered preset composition. Treat their shared objects as readonly.\n * Recommended supplies the omitted-lint default. Strict denies every recommended rule and adds\n * further denied checks. Stylistic enables optional rewrites and utility sorting.\n */\nexport const lintPresets = {\n recommended,\n strict: {\n name: \"stillwind/strict\",\n extends: [recommended],\n rules: {\n \"invalid-lint-suppression\": \"deny\",\n \"duplicate-utility\": \"deny\",\n \"conflicting-utilities\": \"deny\",\n \"mismatched-framework-import\": \"deny\",\n \"mutating-macro-argument\": \"deny\",\n \"suspending-macro-argument\": \"deny\",\n \"invalid-rule-group-input\": \"deny\",\n \"invalid-style-input\": \"deny\",\n \"invalid-cva-config\": \"deny\",\n \"invalid-cva-input\": \"deny\",\n \"invalid-keyframes-use\": \"deny\",\n \"invalid-keyframes-definition\": \"deny\",\n \"invalid-keyframes-variant\": \"deny\",\n \"invalid-view-transition-use\": \"deny\",\n \"invalid-view-transition-definition\": \"deny\",\n \"invalid-view-transition-variant\": \"deny\",\n \"invalid-media-query\": \"deny\",\n \"invalid-css-input\": \"deny\",\n \"invalid-ref-input\": \"deny\",\n \"invalid-animation-option\": \"deny\",\n \"invalid-style-composition\": \"deny\",\n \"runtime-condition-requires-css-if\": \"deny\",\n \"unverified-style-base\": \"deny\",\n \"ineffective-anchor-scope\": \"deny\",\n \"missing-ref-attachment\": \"deny\",\n \"conflicting-provider-properties\": \"deny\",\n \"document-scoped-selector\": \"deny\",\n \"repeated-nesting-selector\": \"deny\",\n \"missing-view-transition-name\": \"deny\",\n \"duplicate-view-transition-name\": \"deny\",\n \"split-view-transition-class\": \"deny\",\n \"ambiguous-style-base-order\": \"deny\",\n \"interfering-imported-style-base\": \"deny\",\n \"incompatible-property-value\": \"deny\",\n \"invalid-utility\": \"deny\",\n \"unknown-utility\": \"deny\",\n \"invalid-marker-use\": \"deny\",\n \"invalid-variant\": \"deny\",\n \"unknown-variant\": \"deny\",\n \"missing-document-target\": \"deny\",\n \"prefer-canonical-utilities\": \"deny\",\n \"redundant-variant\": \"deny\",\n \"unsatisfiable-variants\": \"deny\",\n \"clamped-value\": \"deny\",\n \"invalid-theme-reference\": \"deny\",\n \"invalid-css-import\": \"deny\",\n \"invalid-css-directive\": \"deny\",\n \"invalid-runtime-condition\": \"deny\",\n \"duplicate-definition\": \"deny\",\n \"bypassed-undefinition\": \"deny\",\n \"ignored-definition-condition\": \"deny\",\n \"incompatible-theme-value\": \"deny\",\n \"ignored-tailwind-feature\": \"deny\",\n \"implicit-nesting-selector\": \"deny\",\n \"unused-lint-suppression\": \"deny\",\n },\n },\n stylistic: {\n name: \"stillwind/stylistic\",\n rules: {\n \"prefer-direct-styling\": \"warn\",\n \"prefer-logical-properties\": \"warn\",\n \"prefer-typed-relationships\": \"warn\",\n \"prefer-sorted-utilities\": \"warn\",\n \"prefer-typed-variables\": \"warn\",\n \"prefer-variant-directive\": \"warn\",\n },\n },\n} as const;\n","// Generated by tools/workspace/lint-rules.ts from the Rust lint catalog.\n\n/**\n * Maps public rule IDs to categories, native option names, and default detection settings.\n * Each entry's category names the kind of problem the rule reports, and its nativeName\n * identifies its field in the compiler binding. Null options indicate\n * a severity-only rule. Other entries list accepted fields in options and initial values in defaults.\n * Treat these shared catalog entries as readonly.\n */\nexport const lintRules = {\n \"invalid-rule-group-input\": {\n category: \"input\",\n nativeName: \"invalidRuleGroupInput\",\n defaults: null,\n options: null,\n },\n \"invalid-style-input\": {\n category: \"input\",\n nativeName: \"invalidStyleInput\",\n defaults: null,\n options: null,\n },\n \"invalid-cva-config\": {\n category: \"input\",\n nativeName: \"invalidCvaConfig\",\n defaults: null,\n options: null,\n },\n \"invalid-cva-input\": {\n category: \"input\",\n nativeName: \"invalidCvaInput\",\n defaults: null,\n options: null,\n },\n \"invalid-keyframes-use\": {\n category: \"input\",\n nativeName: \"invalidKeyframesUse\",\n defaults: null,\n options: null,\n },\n \"invalid-keyframes-definition\": {\n category: \"input\",\n nativeName: \"invalidKeyframesDefinition\",\n defaults: null,\n options: null,\n },\n \"invalid-keyframes-variant\": {\n category: \"input\",\n nativeName: \"invalidKeyframesVariant\",\n defaults: null,\n options: null,\n },\n \"invalid-view-transition-use\": {\n category: \"input\",\n nativeName: \"invalidViewTransitionUse\",\n defaults: null,\n options: null,\n },\n \"invalid-view-transition-definition\": {\n category: \"input\",\n nativeName: \"invalidViewTransitionDefinition\",\n defaults: null,\n options: null,\n },\n \"invalid-view-transition-variant\": {\n category: \"input\",\n nativeName: \"invalidViewTransitionVariant\",\n defaults: null,\n options: null,\n },\n \"invalid-media-query\": {\n category: \"input\",\n nativeName: \"invalidMediaQuery\",\n defaults: null,\n options: null,\n },\n \"invalid-css-input\": {\n category: \"input\",\n nativeName: \"invalidCssInput\",\n defaults: null,\n options: null,\n },\n \"invalid-ref-input\": {\n category: \"input\",\n nativeName: \"invalidRefInput\",\n defaults: null,\n options: null,\n },\n \"invalid-animation-option\": {\n category: \"input\",\n nativeName: \"invalidAnimationOption\",\n defaults: null,\n options: null,\n },\n \"invalid-style-composition\": {\n category: \"input\",\n nativeName: \"invalidStyleComposition\",\n defaults: null,\n options: null,\n },\n \"runtime-condition-requires-css-if\": {\n category: \"input\",\n nativeName: \"runtimeConditionRequiresCssIf\",\n defaults: null,\n options: null,\n },\n \"invalid-utility\": {\n category: \"input\",\n nativeName: \"invalidUtility\",\n defaults: null,\n options: null,\n },\n \"unknown-utility\": {\n category: \"input\",\n nativeName: \"unknownUtility\",\n defaults: null,\n options: null,\n },\n \"invalid-marker-use\": {\n category: \"input\",\n nativeName: \"invalidMarkerUse\",\n defaults: {\n severity: \"warn\",\n ignoredClasses: [],\n },\n options: [\"severity\", \"ignoredClasses\"],\n },\n \"invalid-variant\": {\n category: \"input\",\n nativeName: \"invalidVariant\",\n defaults: null,\n options: null,\n },\n \"unknown-variant\": {\n category: \"input\",\n nativeName: \"unknownVariant\",\n defaults: null,\n options: null,\n },\n \"missing-document-target\": {\n category: \"input\",\n nativeName: \"missingDocumentTarget\",\n defaults: null,\n options: null,\n },\n \"invalid-theme-reference\": {\n category: \"input\",\n nativeName: \"invalidThemeReference\",\n defaults: null,\n options: null,\n },\n \"invalid-css-import\": {\n category: \"input\",\n nativeName: \"invalidCssImport\",\n defaults: null,\n options: null,\n },\n \"invalid-css-directive\": {\n category: \"input\",\n nativeName: \"invalidCssDirective\",\n defaults: null,\n options: null,\n },\n \"invalid-runtime-condition\": {\n category: \"input\",\n nativeName: \"invalidRuntimeCondition\",\n defaults: null,\n options: null,\n },\n \"mutating-macro-argument\": {\n category: \"contract\",\n nativeName: \"mutatingMacroArgument\",\n defaults: null,\n options: null,\n },\n \"suspending-macro-argument\": {\n category: \"contract\",\n nativeName: \"suspendingMacroArgument\",\n defaults: null,\n options: null,\n },\n \"mismatched-framework-import\": {\n category: \"contract\",\n nativeName: \"mismatchedFrameworkImport\",\n defaults: null,\n options: null,\n },\n \"duplicate-utility\": {\n category: \"hazard\",\n nativeName: \"duplicateUtility\",\n defaults: null,\n options: null,\n },\n \"conflicting-utilities\": {\n category: \"hazard\",\n nativeName: \"conflictingUtilities\",\n defaults: {\n severity: \"warn\",\n allowShorthandOverrides: false,\n },\n options: [\"severity\", \"allowShorthandOverrides\"],\n },\n \"conflicting-provider-properties\": {\n category: \"hazard\",\n nativeName: \"conflictingProviderProperties\",\n defaults: null,\n options: null,\n },\n \"unverified-style-base\": {\n category: \"hazard\",\n nativeName: \"unverifiedStyleBase\",\n defaults: null,\n options: null,\n },\n \"ambiguous-style-base-order\": {\n category: \"hazard\",\n nativeName: \"ambiguousStyleBaseOrder\",\n defaults: null,\n options: null,\n },\n \"interfering-imported-style-base\": {\n category: \"hazard\",\n nativeName: \"interferingImportedStyleBase\",\n defaults: null,\n options: null,\n },\n \"missing-ref-attachment\": {\n category: \"hazard\",\n nativeName: \"missingRefAttachment\",\n defaults: null,\n options: null,\n },\n \"document-scoped-selector\": {\n category: \"hazard\",\n nativeName: \"documentScopedSelector\",\n defaults: null,\n options: null,\n },\n \"repeated-nesting-selector\": {\n category: \"hazard\",\n nativeName: \"repeatedNestingSelector\",\n defaults: null,\n options: null,\n },\n \"missing-view-transition-name\": {\n category: \"hazard\",\n nativeName: \"missingViewTransitionName\",\n defaults: null,\n options: null,\n },\n \"duplicate-view-transition-name\": {\n category: \"hazard\",\n nativeName: \"duplicateViewTransitionName\",\n defaults: null,\n options: null,\n },\n \"split-view-transition-class\": {\n category: \"hazard\",\n nativeName: \"splitViewTransitionClass\",\n defaults: null,\n options: null,\n },\n \"ineffective-anchor-scope\": {\n category: \"hazard\",\n nativeName: \"ineffectiveAnchorScope\",\n defaults: null,\n options: null,\n },\n \"incompatible-property-value\": {\n category: \"hazard\",\n nativeName: \"incompatiblePropertyValue\",\n defaults: null,\n options: null,\n },\n \"unsatisfiable-variants\": {\n category: \"hazard\",\n nativeName: \"unsatisfiableVariants\",\n defaults: null,\n options: null,\n },\n \"clamped-value\": {\n category: \"hazard\",\n nativeName: \"clampedValue\",\n defaults: null,\n options: null,\n },\n \"duplicate-definition\": {\n category: \"hazard\",\n nativeName: \"duplicateDefinition\",\n defaults: null,\n options: null,\n },\n \"bypassed-undefinition\": {\n category: \"hazard\",\n nativeName: \"bypassedUndefinition\",\n defaults: null,\n options: null,\n },\n \"ignored-definition-condition\": {\n category: \"hazard\",\n nativeName: \"ignoredDefinitionCondition\",\n defaults: null,\n options: null,\n },\n \"incompatible-theme-value\": {\n category: \"hazard\",\n nativeName: \"incompatibleThemeValue\",\n defaults: null,\n options: null,\n },\n \"ignored-tailwind-feature\": {\n category: \"hazard\",\n nativeName: \"ignoredTailwindFeature\",\n defaults: null,\n options: null,\n },\n \"implicit-nesting-selector\": {\n category: \"hazard\",\n nativeName: \"implicitNestingSelector\",\n defaults: null,\n options: null,\n },\n \"no-arbitrary-colors\": {\n category: \"restriction\",\n nativeName: \"noArbitraryColors\",\n defaults: null,\n options: null,\n },\n \"no-arbitrary-spacing\": {\n category: \"restriction\",\n nativeName: \"noArbitrarySpacing\",\n defaults: {\n severity: \"warn\",\n properties: [],\n },\n options: [\"severity\", \"properties\"],\n },\n \"no-class-property\": {\n category: \"restriction\",\n nativeName: \"noClassProperty\",\n defaults: null,\n options: null,\n },\n \"no-restricted-utilities\": {\n category: \"restriction\",\n nativeName: \"noRestrictedUtilities\",\n defaults: {\n severity: \"warn\",\n utilities: [],\n },\n options: [\"severity\", \"utilities\"],\n },\n \"no-restricted-declarations\": {\n category: \"restriction\",\n nativeName: \"noRestrictedDeclarations\",\n defaults: {\n severity: \"warn\",\n checkImplementation: true,\n rules: [],\n },\n options: [\"severity\", \"checkImplementation\", \"rules\"],\n },\n \"no-important\": {\n category: \"restriction\",\n nativeName: \"noImportant\",\n defaults: {\n severity: \"warn\",\n checkImplementation: true,\n },\n options: [\"severity\", \"checkImplementation\"],\n },\n \"no-restricted-length-units\": {\n category: \"restriction\",\n nativeName: \"noRestrictedLengthUnits\",\n defaults: {\n severity: \"warn\",\n checkImplementation: false,\n rules: [],\n },\n options: [\"severity\", \"checkImplementation\", \"rules\"],\n },\n \"no-restricted-theme-tokens\": {\n category: \"restriction\",\n nativeName: \"noRestrictedThemeTokens\",\n defaults: {\n severity: \"warn\",\n checkImplementation: true,\n tokens: [],\n },\n options: [\"severity\", \"checkImplementation\", \"tokens\"],\n },\n \"no-arbitrary-breakpoints\": {\n category: \"restriction\",\n nativeName: \"noArbitraryBreakpoints\",\n defaults: null,\n options: null,\n },\n \"prefer-direct-styling\": {\n category: \"style\",\n nativeName: \"preferDirectStyling\",\n defaults: null,\n options: null,\n },\n \"prefer-logical-properties\": {\n category: \"style\",\n nativeName: \"preferLogicalProperties\",\n defaults: {\n severity: \"warn\",\n checkImplementation: false,\n },\n options: [\"severity\", \"checkImplementation\"],\n },\n \"prefer-typed-relationships\": {\n category: \"style\",\n nativeName: \"preferTypedRelationships\",\n defaults: null,\n options: null,\n },\n \"prefer-canonical-utilities\": {\n category: \"style\",\n nativeName: \"preferCanonicalUtilities\",\n defaults: {\n severity: \"warn\",\n pxToRem: true,\n collapse: true,\n logicalToPhysical: false,\n preserveSpecificity: true,\n },\n options: [\"severity\", \"pxToRem\", \"collapse\", \"logicalToPhysical\", \"preserveSpecificity\"],\n },\n \"prefer-sorted-utilities\": {\n category: \"style\",\n nativeName: \"preferSortedUtilities\",\n defaults: null,\n options: null,\n },\n \"redundant-variant\": {\n category: \"style\",\n nativeName: \"redundantVariant\",\n defaults: null,\n options: null,\n },\n \"prefer-typed-variables\": {\n category: \"style\",\n nativeName: \"preferTypedVariables\",\n defaults: null,\n options: null,\n },\n \"prefer-variant-directive\": {\n category: \"style\",\n nativeName: \"preferVariantDirective\",\n defaults: {\n severity: \"warn\",\n pxToRem: false,\n },\n options: [\"severity\", \"pxToRem\"],\n },\n \"invalid-lint-suppression\": {\n category: \"suppression\",\n nativeName: \"invalidLintSuppression\",\n defaults: null,\n options: null,\n },\n \"unused-lint-suppression\": {\n category: \"suppression\",\n nativeName: \"unusedLintSuppression\",\n defaults: null,\n options: null,\n },\n} as const;\n\n/** Lowercase CSS length units accepted by lint validation, which also accepts case variations. */\nexport const lengthUnits = [\n \"px\",\n \"cm\",\n \"mm\",\n \"q\",\n \"in\",\n \"pt\",\n \"pc\",\n \"em\",\n \"rem\",\n \"ex\",\n \"rex\",\n \"cap\",\n \"rcap\",\n \"ch\",\n \"rch\",\n \"ic\",\n \"ric\",\n \"lh\",\n \"rlh\",\n \"vw\",\n \"vh\",\n \"vi\",\n \"vb\",\n \"vmin\",\n \"vmax\",\n \"svw\",\n \"svh\",\n \"svi\",\n \"svb\",\n \"svmin\",\n \"svmax\",\n \"lvw\",\n \"lvh\",\n \"lvi\",\n \"lvb\",\n \"lvmin\",\n \"lvmax\",\n \"dvw\",\n \"dvh\",\n \"dvi\",\n \"dvb\",\n \"dvmin\",\n \"dvmax\",\n \"cqw\",\n \"cqh\",\n \"cqi\",\n \"cqb\",\n \"cqmin\",\n \"cqmax\",\n] as const;\n\n/** Public kebab-case rule IDs used as keys in lint configuration. */\nexport type LintRule = keyof typeof lintRules;\n\n/** Kind of problem a rule reports, as declared by the Rust lint catalog. */\nexport type LintCategory = (typeof lintRules)[LintRule][\"category\"];\n\n/** Rules that accept only a severity string because their catalog entries have no option fields. */\nexport type SimpleLintRule = {\n [K in LintRule]: (typeof lintRules)[K][\"options\"] extends null ? K : never;\n}[LintRule];\n","/** Schema validation that reports authored field paths and keeps supplied objects unchanged. */\n\nimport * as v from \"valibot\";\n\n/** Accepts strings with non-whitespace content while preserving all authored whitespace. */\nexport const nonemptyText = v.pipe(\n v.string(),\n v.check((value) => Boolean(value.trim()), \"must be a nonempty string\"),\n);\n\n/** Accepts arrays of strings with non-whitespace content. Arrays can be empty, and entries are not trimmed. */\nexport const nonemptyStrings = v.array(nonemptyText);\n\n/** Requires at least one string with non-whitespace content, without trimming entries. */\nexport const nonemptyStringList = v.pipe(\n nonemptyStrings,\n v.minLength(1, \"must be an array of nonempty strings\"),\n);\n\n/**\n * Checks a schema and narrows the supplied value without replacing it with parsed output.\n * @param schema - Synchronous schema whose output type describes the input's existing shape.\n * Parsed replacements are discarded, so narrowing must not depend on a transformation.\n * @param value - Value to validate. Objects, arrays, and callbacks retain their original identities.\n * @param location - Root field path prepended to the first validation issue's property and array path.\n * @throws If validation fails. The error includes the first issue's field path and message.\n */\nexport function validate<T extends v.GenericSchema>(\n schema: T,\n value: unknown,\n location: string,\n): asserts value is v.InferOutput<T> {\n const result = v.safeParse(schema, value, { abortEarly: true });\n if (result.success) {\n return;\n }\n\n const issue = result.issues[0];\n const suffix =\n issue.path\n ?.map(({ key }) => (typeof key === \"number\" ? `[${key}]` : `.${String(key)}`))\n .join(\"\") ?? \"\";\n throw new Error(`${location}${suffix}: ${issue.message}`);\n}\n\n/**\n * Constructs a schema that requires an object and rejects undeclared keys.\n * @param entries - Field names and synchronous schemas used to validate their values.\n * @returns A schema that validates declared fields on non-null, non-array objects and rejects unknown keys.\n */\nexport function strictObject<T extends v.ObjectEntries>(entries: T) {\n return v.pipe(\n v.custom<Record<string, unknown>>(object, \"must be an object\"),\n v.strictObject(entries),\n );\n}\n\n/**\n * Checks whether a value can supply configuration fields.\n * @param value - Any runtime value. Objects with custom prototypes are accepted.\n * @returns Whether the value is a non-null object other than an array.\n */\nexport function object(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n","/** Ordered lint preset composition and validation for all configuration hosts. */\n\nimport * as v from \"valibot\";\n\nimport { lintPresets } from \"./lint-presets.ts\";\nimport { lengthUnits, lintRules, type LintRule, type SimpleLintRule } from \"./lint-rules.ts\";\nimport { nonemptyStringList, nonemptyText, object, strictObject, validate } from \"./validation.ts\";\n\n/**\n * Reporting policy for a lint rule. Off disables its diagnostics and automatic fixes.\n */\nexport type LintSeverity = \"warn\" | \"deny\" | \"off\";\n\n/**\n * Detection and reporting policies for source utilities and compiler ordering.\n */\nexport type LintRules = Partial<Record<SimpleLintRule, LintSeverity>> & {\n /** Severity or additional CSS property domains checked for arbitrary spacing. */\n \"no-arbitrary-spacing\"?: LintSeverity | ArbitrarySpacingOptions;\n /** Severity or patterns restricting authored utility spellings. */\n \"no-restricted-utilities\"?: LintSeverity | RestrictedUtilitiesOptions;\n /** Severity or restrictions on resolved CSS properties and values. */\n \"no-restricted-declarations\"?: LintSeverity | RestrictedDeclarationsOptions;\n /** Severity or checks of fixed implementation declarations for importance. */\n \"no-important\"?: LintSeverity | ImportantOptions;\n /** Severity or exceptions for a narrower property overriding a shorthand. */\n \"conflicting-utilities\"?: LintSeverity | ConflictingUtilitiesOptions;\n /** Severity or marker class names whose misuse is not reported. */\n \"invalid-marker-use\"?: LintSeverity | MarkerUseOptions;\n /** Severity or ordered restrictions on nonzero CSS length units. */\n \"no-restricted-length-units\"?: LintSeverity | LengthUnitsOptions;\n /** Severity or checks of fixed implementation declarations for physical properties. */\n \"prefer-logical-properties\"?: LintSeverity | LogicalPropertiesOptions;\n /** Severity or patterns restricting direct references to theme custom properties. */\n \"no-restricted-theme-tokens\"?: LintSeverity | RestrictedThemeTokensOptions;\n /** Severity and conversion settings for canonical utility replacements. */\n \"prefer-canonical-utilities\"?: LintSeverity | CanonicalUtilitiesOptions;\n /** Severity or length-conversion settings for `@variant` replacements in stylesheets. */\n \"prefer-variant-directive\"?: LintSeverity | VariantDirectiveOptions;\n};\n\n/**\n * A named, shareable lint configuration. Extended presets apply in order before rules.\n */\nexport interface LintPreset {\n /** Optional display name used to identify this preset in configuration errors. */\n readonly name?: string;\n /** Earlier entries apply first. Omission adds no presets. Cycles are invalid. */\n readonly extends?: readonly LintPreset[];\n /** Rule overrides. Severity-only overrides preserve inherited detection options. */\n readonly rules?: LintRules;\n}\n\n/**\n * Packages or plugins whose utility definitions lint checks, in addition to the user's own\n * definitions: true for all, false for none, or case-sensitive name globs using `*` and `?`.\n */\nexport type DefinitionScope = boolean | readonly string[];\n\n/**\n * Project-level lint settings that presets cannot supply.\n */\nexport interface LintScope {\n /**\n * Packages whose utility definitions lint checks, matched by package name, such as\n * `stillwind` or `@scope/name`. Defaults to false.\n */\n readonly checkLibraries?: DefinitionScope;\n /**\n * Plugins whose utility definitions lint checks, matched by the name in the `@plugin`\n * statement. A plugin file that your stylesheet loads by path is your own code. Defaults\n * to false.\n */\n readonly checkPlugins?: DefinitionScope;\n}\n\n/**\n * Project lint configuration. False disables all rules. An object with omitted extends uses no presets.\n */\nexport type LintConfig = (LintPreset & LintScope) | false;\n\n/**\n * Complete reporting settings with default detection options applied.\n */\nexport type ResolvedLintRules = {\n [K in keyof LintRules]-?: Exclude<LintRules[K], LintSeverity | undefined> extends never\n ? LintSeverity\n : Required<Exclude<LintRules[K], LintSeverity | undefined>> & {\n /** Effective reporting policy after preset composition and rule defaults. */\n severity: LintSeverity;\n };\n};\n\n/**\n * Selects additional domains beyond margin, padding, and gap.\n */\nexport type ArbitrarySpacingOptions = {\n /** Omission preserves inherited severity, or uses warn for a newly configured rule. */\n severity?: LintSeverity;\n /** Complete property globs using `*` and `?`, with no whitespace and comparison that ignores ASCII case. */\n properties?: readonly string[];\n};\n\n/**\n * Forbids utility spellings independently of CSS resolution.\n */\nexport type RestrictedUtilitiesOptions = {\n /** Omission preserves inherited severity, or uses warn for a newly configured rule. */\n severity?: LintSeverity;\n /** Restrictions on authored utility spellings. Each matching entry can supply an explanation. */\n utilities?: readonly {\n /** Nonempty, case-sensitive full utility glob without whitespace, enclosing variants, or important modifiers. */\n pattern: string;\n /** Optional project-specific diagnostic explanation, preserved without trimming. */\n message?: string;\n }[];\n};\n\n/**\n * Forbids resolved declarations, including parsed shorthand components.\n */\nexport type RestrictedDeclarationsOptions = {\n /** Omission preserves inherited severity, or uses warn for a newly configured rule. */\n severity?: LintSeverity;\n /**\n * Include fixed `(implementation)` declarations. Omission preserves an inherited\n * setting, or uses true. Captured candidate values and unmarked extensions remain checked.\n */\n checkImplementation?: boolean;\n /** Every matching declaration restriction applies. Later entries do not override earlier entries. */\n rules?: readonly {\n /** Nonempty list of complete property globs with no whitespace. Comparison ignores ASCII case. */\n properties: readonly string[];\n /** Nonempty list of complete serialized value globs. Comparison ignores ASCII case, and whitespace, strings, and URLs remain CSS text. */\n values: readonly string[];\n /** Optional project-specific diagnostic explanation, preserved without trimming. */\n message?: string;\n }[];\n};\n\n/**\n * Controls overlap between direct utility contributions.\n */\nexport type ConflictingUtilitiesOptions = {\n /** Omission preserves inherited severity, or uses warn for a newly configured rule. */\n severity?: LintSeverity;\n /** Allows a narrower property to override part of a shorthand. Defaults to false. */\n allowShorthandOverrides?: boolean;\n};\n\n/**\n * Controls reports of candidates that cannot add the marker class that they name.\n */\nexport type MarkerUseOptions = {\n /** Omission preserves inherited severity, or uses warn for a newly configured rule. */\n severity?: LintSeverity;\n /** Exact decoded marker class names, such as `group` or `foo/bar`, whose findings are not reported. */\n ignoredClasses?: readonly string[];\n};\n\n/**\n * Controls nonzero CSS lengths; later matching rules replace earlier restrictions.\n */\nexport type LengthUnitsOptions = {\n /** Omission preserves inherited severity, or uses warn for a newly configured rule. */\n severity?: LintSeverity;\n /**\n * Include fixed `(implementation)` declarations. Omission preserves an inherited\n * setting, or uses false. Captured candidate values remain checked.\n */\n checkImplementation?: boolean;\n /** Restrictions in precedence order. The last matching entry determines the forbidden units. */\n rules?: readonly {\n /** Nonempty list of complete property globs supporting `*` and `?`, without whitespace. Comparison ignores ASCII case. */\n properties: readonly string[];\n /** CSS length unit names compared without ASCII case. An empty list clears restrictions for matching properties. */\n disallow: readonly string[];\n }[];\n};\n\n/**\n * Controls physical-property checks at utility use sites.\n */\nexport type LogicalPropertiesOptions = {\n /** Omission preserves inherited severity, or uses warn for a newly configured rule. */\n severity?: LintSeverity;\n /**\n * Include fixed `(implementation)` declarations. Omission preserves an inherited\n * setting, or uses false. Captured candidate values remain checked.\n */\n checkImplementation?: boolean;\n};\n\n/**\n * Selects theme token names without restricting semantic aliases of those tokens.\n */\nexport type RestrictedThemeTokensOptions = {\n /** Omission preserves inherited severity, or uses warn for a newly configured rule. */\n severity?: LintSeverity;\n /**\n * Include token uses from fixed `(implementation)` declarations. Omission preserves\n * an inherited setting, or uses true. Tokens selected through placeholders or variant arguments remain checked.\n */\n checkImplementation?: boolean;\n /** Case-sensitive full custom-property name globs with `*` and `?`. */\n tokens?: readonly string[];\n};\n\n/**\n * Controls importance restrictions on declarations and source modifiers.\n */\nexport type ImportantOptions = {\n /** Omission preserves inherited severity, or uses warn for a newly configured rule. */\n severity?: LintSeverity;\n /**\n * Include fixed `(implementation)` declarations. Omission preserves an inherited\n * setting, or uses true. Source `!` modifiers and declarations with executable placeholders remain checked.\n */\n checkImplementation?: boolean;\n};\n\n/**\n * Controls replacement of equivalent utility spellings.\n */\nexport type CanonicalUtilitiesOptions = {\n /** Omission preserves inherited severity, or uses warn for a newly configured rule. */\n severity?: LintSeverity;\n /** Compares px and rem lengths using rootFontSize. Defaults to true. */\n pxToRem?: boolean;\n /** Combines equivalent utilities within one source container. Defaults to true. */\n collapse?: boolean;\n /** Allows logical and physical properties to share a shorthand. Defaults to false. */\n logicalToPhysical?: boolean;\n /** Keeps selector specificity. Set false to allow Tailwind's ancestor migrations. Defaults to true. */\n preserveSpecificity?: boolean;\n};\n\n/**\n * Controls replacement of nested rules and conditional at-rules with `@variant`.\n */\nexport type VariantDirectiveOptions = {\n /** Omission preserves inherited severity, or uses warn for a newly configured rule. */\n severity?: LintSeverity;\n /**\n * Lets `px` lengths in `@media` conditions match `rem` variants at 16px = 1rem. Defaults to false.\n * `rem` in a media query follows the browser's default font size, so the replacement can switch at another width.\n */\n pxToRem?: boolean;\n};\n\n/**\n * Applies an inline override to project lint settings without expanding presets.\n * Omitted extends preserves the project's list; a supplied list replaces it.\n * Omitted project settings select recommended. Rule fields merge and arrays replace.\n * False replaces all settings. An object override of false enables only its own rules and presets.\n * Neither input is modified.\n *\n * @param base - Project settings, or undefined to use recommended.\n * @param override - Inline settings; undefined preserves the project settings.\n * @returns False when lint remains disabled, or settings with inherited rule options preserved.\n */\nexport function mergeLintConfig(\n base: LintConfig | undefined,\n override: LintConfig | undefined,\n): LintConfig {\n if (override === undefined) {\n return (\n base ?? {\n extends: [lintPresets.recommended],\n }\n );\n }\n if (override === false) {\n return false;\n }\n\n const previous: LintPreset & LintScope =\n base === false\n ? {}\n : (base ?? {\n extends: [lintPresets.recommended],\n });\n return {\n ...previous,\n ...(override.name === undefined ? {} : { name: override.name }),\n ...(override.extends === undefined ? {} : { extends: override.extends }),\n ...(override.checkLibraries === undefined ? {} : { checkLibraries: override.checkLibraries }),\n ...(override.checkPlugins === undefined ? {} : { checkPlugins: override.checkPlugins }),\n rules: mergeRules(previous.rules ?? {}, override.rules ?? {}),\n };\n}\n\n/**\n * Expands presets in order and applies rule defaults without modifying the input.\n *\n * @param config - Project lint settings. Undefined selects recommended; false or an empty object disables all rules.\n * @param location - Field path used in configuration errors.\n * @returns Every rule's severity and detection options, wrapped in rules for repeatable normalization.\n * @throws If a preset has a cycle, an unknown field, or invalid effective rule options.\n */\nexport function resolveLintConfig(\n config?: LintConfig,\n location = \"config.lint\",\n): {\n /** Complete lint policies with cloned detection options and default values. */\n rules: ResolvedLintRules;\n /** Packages whose utility definitions lint checks. */\n checkLibraries: DefinitionScope;\n /** Plugins whose utility definitions lint checks. */\n checkPlugins: DefinitionScope;\n} {\n const value =\n config === false\n ? {}\n : (config ?? {\n extends: [lintPresets.recommended],\n });\n const preset = validateScope(value, location);\n validatePreset(preset, location, new Set());\n const rules = resolvedRules(preset);\n validateResolvedRules(rules, `${location}.rules`);\n return {\n rules,\n checkLibraries: (value as LintScope).checkLibraries ?? false,\n checkPlugins: (value as LintScope).checkPlugins ?? false,\n };\n}\n\n/**\n * Validates the project-level scope fields of lint settings.\n *\n * @param value - Project lint settings object.\n * @param location - Field path used in configuration errors.\n * @returns The settings without the scope fields, for preset validation.\n * @throws If a scope field is neither a boolean nor a list of name globs.\n */\nfunction validateScope(value: unknown, location: string): unknown {\n if (!object(value)) {\n return value;\n }\n const { checkLibraries, checkPlugins, ...preset } = value;\n validate(definitionScopeSchema, checkLibraries, `${location}.checkLibraries`);\n validate(definitionScopeSchema, checkPlugins, `${location}.checkPlugins`);\n return preset;\n}\n\n/**\n * Validates lint settings and preset ancestry before or after composition.\n *\n * @param value - False to disable lint, or a preset object with optional parents and rules.\n * @param location - Field path used to identify invalid values and cyclic extends lists.\n * @param partial - Whether to defer required effective options until presets and overrides are composed.\n * @throws If preset fields or rule options are invalid, ancestry has a cycle, or complete settings\n * enable a theme restriction without token patterns.\n */\nexport function validateLintConfig(value: unknown, location: string, partial: boolean): void {\n if (value === false) {\n return;\n }\n\n const preset = validateScope(value, location);\n validatePreset(preset, location, new Set());\n if (!partial) {\n validateResolvedRules(resolvedRules(preset), `${location}.rules`);\n }\n}\n\nconst severitySchema = v.picklist([\"warn\", \"deny\", \"off\"]);\n\nconst glob = v.pipe(nonemptyText, v.regex(/^\\S+$/, \"must contain valid complete globs\"));\n\nconst propertyGlobs = v.pipe(v.array(glob), v.minLength(1));\n\nconst definitionScopeSchema = v.optional(\n v.union([v.boolean(), v.array(glob)], \"must be a boolean or an array of name globs\"),\n);\n\nconst tokenGlob = v.pipe(\n glob,\n v.check(\n (value) => value.startsWith(\"--\") && value.length > 2,\n \"must contain custom-property patterns\",\n ),\n);\n\nconst ruleOptions = {\n \"no-important\": strictObject({\n severity: v.optional(severitySchema),\n checkImplementation: v.optional(v.boolean()),\n }),\n \"no-arbitrary-spacing\": strictObject({\n severity: v.optional(severitySchema),\n properties: v.optional(v.array(glob)),\n }),\n \"no-restricted-utilities\": strictObject({\n severity: v.optional(severitySchema),\n utilities: v.optional(\n v.array(strictObject({ pattern: glob, message: v.optional(v.string()) })),\n ),\n }),\n \"no-restricted-declarations\": strictObject({\n severity: v.optional(severitySchema),\n checkImplementation: v.optional(v.boolean()),\n rules: v.optional(\n v.array(\n strictObject({\n properties: propertyGlobs,\n values: nonemptyStringList,\n message: v.optional(v.string()),\n }),\n ),\n ),\n }),\n \"conflicting-utilities\": strictObject({\n severity: v.optional(severitySchema),\n allowShorthandOverrides: v.optional(v.boolean()),\n }),\n \"invalid-marker-use\": strictObject({\n severity: v.optional(severitySchema),\n ignoredClasses: v.optional(v.array(nonemptyText)),\n }),\n \"no-restricted-length-units\": strictObject({\n severity: v.optional(severitySchema),\n checkImplementation: v.optional(v.boolean()),\n rules: v.optional(\n v.array(\n strictObject({\n properties: propertyGlobs,\n disallow: v.array(\n v.pipe(\n nonemptyText,\n v.check(\n (value) => lengthUnits.some((unit) => unit === value.toLowerCase()),\n \"must contain CSS length unit names\",\n ),\n ),\n ),\n }),\n ),\n ),\n }),\n \"prefer-logical-properties\": strictObject({\n severity: v.optional(severitySchema),\n checkImplementation: v.optional(v.boolean()),\n }),\n \"no-restricted-theme-tokens\": strictObject({\n severity: v.optional(severitySchema),\n checkImplementation: v.optional(v.boolean()),\n tokens: v.optional(v.array(tokenGlob)),\n }),\n \"prefer-canonical-utilities\": strictObject({\n severity: v.optional(severitySchema),\n pxToRem: v.optional(v.boolean()),\n collapse: v.optional(v.boolean()),\n logicalToPhysical: v.optional(v.boolean()),\n preserveSpecificity: v.optional(v.boolean()),\n }),\n \"prefer-variant-directive\": strictObject({\n severity: v.optional(severitySchema),\n pxToRem: v.optional(v.boolean()),\n }),\n} satisfies Record<Exclude<LintRule, SimpleLintRule>, v.GenericSchema>;\n\nconst lintRulesSchema = strictObject(\n Object.fromEntries(\n Object.keys(lintRules).map((name) => [\n name,\n v.optional(\n name in ruleOptions\n ? v.lazy((value) =>\n typeof value === \"string\"\n ? severitySchema\n : ruleOptions[name as keyof typeof ruleOptions],\n )\n : severitySchema,\n ),\n ]),\n ),\n);\n\nconst presetSchema = strictObject({\n name: v.optional(nonemptyText),\n extends: v.optional(v.array(v.unknown(), \"must be an array of presets\")),\n rules: v.optional(lintRulesSchema),\n});\n\n/**\n * Validates preset fields and rejects cycles along the current ancestry while allowing shared parents.\n *\n * @param value - Preset object to check without modifying it or invoking callbacks.\n * @param location - Authored field path, extended with parent indexes and supplied display names.\n * @param active - Objects on the current ancestry. Success restores the previous contents.\n * A failure can leave objects from the failing ancestry in this set.\n * @throws If fields are invalid or a preset already belongs to active.\n */\nfunction validatePreset(\n value: unknown,\n location: string,\n active: Set<object>,\n): asserts value is LintPreset {\n validate(presetSchema, value, location);\n\n if (active.has(value)) {\n throw new Error(`${location}: cyclic lint preset extends`);\n }\n active.add(value);\n for (const [index, preset] of (value.extends ?? []).entries()) {\n const name =\n object(preset) && typeof preset.name === \"string\" && preset.name.trim()\n ? ` (${preset.name})`\n : \"\";\n validatePreset(preset, `${location}.extends[${index}]${name}`, active);\n }\n active.delete(value);\n}\n\n/**\n * Expands a validated preset and supplies reporting and detection defaults for every catalog rule.\n *\n * @param config - Validated preset with acyclic ancestry.\n * @returns Complete rule settings. Detection options and their arrays are cloned, unconfigured\n * rules are off, and configured option objects without a severity use warn.\n * @throws If a detection option cannot be cloned.\n */\nfunction resolvedRules(config: LintPreset): ResolvedLintRules {\n const expanded = expand(config);\n return Object.fromEntries(\n Object.entries(lintRules).map(([name, rule]) => {\n const setting = expanded[name as LintRule];\n return [\n name,\n rule.defaults === null\n ? (setting ?? \"off\")\n : {\n ...structuredClone(rule.defaults),\n ...(typeof setting === \"object\" ? structuredClone(setting) : {}),\n severity:\n typeof setting === \"string\"\n ? setting\n : (setting?.severity ?? (setting === undefined ? \"off\" : \"warn\")),\n },\n ];\n }),\n ) as ResolvedLintRules;\n}\n\n/**\n * Composes parent presets from left to right before applying the preset's own rule overrides.\n *\n * @param config - Validated preset with acyclic ancestry. The input is not modified.\n * @returns A new rule map whose option arrays can still share references with the presets.\n */\nfunction expand(config: LintPreset): LintRules {\n let rules: LintRules = {};\n for (const preset of config.extends ?? []) {\n rules = mergeRules(rules, expand(preset));\n }\n return mergeRules(rules, config.rules ?? {});\n}\n\n/**\n * Merges rule overrides while retaining inherited options for severity-only settings.\n *\n * @param base - Rules using validated catalog names and option fields.\n * @param overrides - Validated fields. Undefined values preserve prior values, and arrays replace them.\n * @returns A new rule map without mutating either input. Retained or replacement arrays can share input references.\n */\nfunction mergeRules(base: LintRules, overrides: LintRules): LintRules {\n const rules = { ...base };\n for (const [name, setting] of Object.entries(overrides)) {\n if (setting === undefined) {\n continue;\n }\n const key = name as LintRule;\n const previous = base[key];\n const merged =\n lintRules[key].defaults === null\n ? setting\n : {\n ...(typeof previous === \"string\" ? { severity: previous } : previous),\n ...(typeof setting === \"string\"\n ? { severity: setting }\n : Object.fromEntries(\n Object.entries(setting).filter(([, value]) => value !== undefined),\n )),\n };\n Object.assign(rules, { [key]: merged });\n }\n return rules;\n}\n\n/**\n * Checks effective rule settings after all presets, overrides, and defaults have been applied.\n *\n * @param value - Complete rules whose required options can now be checked.\n * @param location - Field path for the rules object in validation errors.\n * @throws If rule settings are invalid or an active theme restriction has no token patterns.\n */\nfunction validateResolvedRules(value: ResolvedLintRules, location: string) {\n validate(lintRulesSchema, value, location);\n validate(\n v.pipe(\n ruleOptions[\"no-restricted-theme-tokens\"],\n v.forward(\n v.check(\n (setting) => setting.severity === \"off\" || Boolean(setting.tokens?.length),\n \"must contain custom-property patterns when the rule is active\",\n ),\n [\"tokens\"],\n ),\n ),\n value[\"no-restricted-theme-tokens\"],\n `${location}.no-restricted-theme-tokens`,\n );\n}\n","/** Compiler settings, validation, and default normalization for build and analysis hosts. */\n\nimport type { NativeIdentifierNaming } from \"@stillwind/native\";\nimport type { Config } from \"tailwindcss\";\nimport * as v from \"valibot\";\n\nimport {\n resolveLintConfig,\n validateLintConfig,\n type DefinitionScope,\n type LintConfig,\n type ResolvedLintRules,\n} from \"./lint.ts\";\nimport type { StillwindPlugin } from \"./plugins.ts\";\nimport { nonemptyText, object, strictObject, validate } from \"./validation.ts\";\n\n/** Tailwind CSS configuration, with the keys of a file that Tailwind's `@config` loads. */\nexport type TailwindConfig = Config;\n\n/** Controls independent sorting targets in scripts and stylesheets. */\nexport type UtilitySortOptions = {\n /** Sorts utilities within each static string or template segment. Defaults to true. */\n stringLiterals?: boolean;\n /**\n * Groups arrays, argument lists, and object entries by input kind. Defaults to true.\n * Each ref's marker precedes its projections. Bases, utilities, and custom\n * properties follow. Each group retains its original order.\n */\n arrays?: boolean;\n /** Sorts utilities within each CSS `@apply` statement. Defaults to true. */\n applyUtilities?: boolean;\n /** Orders adjacent CSS `@apply` statements while preserving competing writes. Defaults to false. */\n applyStatements?: boolean;\n /** Orders adjacent applied CSS `@variant` blocks while preserving competing writes. Defaults to false. */\n variantBlocks?: boolean;\n};\n\n/** Controls document CSS delivery through build integrations. */\nexport interface BuildOptions {\n /** Applies producer CSS to the document. Defaults to true. */\n automatic?: boolean;\n}\n\n/**\n * Compiler and design-system settings shared by build integrations and analysis services.\n */\nexport interface BaseConfig {\n /**\n * Lint presets and rule overrides. Omission uses recommended.\n * False or an empty object disables lint rules and fixes while retaining compiler diagnostics.\n */\n lint?: LintConfig;\n /** Targets for Stillwind sorting. False disables explicit sorting and its diagnostics and fixes. */\n sort?: UtilitySortOptions | false;\n /**\n * Project directory, absolute or relative to the configuration file's directory.\n * An inline override uses the application's build root instead. Defaults to that base directory.\n */\n root?: string;\n /**\n * TypeScript configuration path, absolute or relative to the adapter project root. Omission\n * selects an existing root `tsconfig.json`. False uses isolated checker defaults. Semantic\n * resolution uses these same settings. Backends capture them when created. Recreate the backend\n * to apply changed settings.\n */\n tsconfig?: string | false;\n /** Design-system stylesheet, absolute or relative to the project root. */\n css?: string;\n /**\n * Orders utilities by authored definition positions or Tailwind property metadata.\n * Defaults to authored.\n */\n utilityOrder?: \"authored\" | \"tailwind\";\n /**\n * Minimum browser versions, such as [\"chrome111\", \"firefox113\", \"safari17\"].\n * A single string is accepted. An empty list keeps color fallbacks.\n * Omission uses adapter defaults, or keeps fallbacks when the host supplies none.\n * Removes generated compatibility branches only when every target supports the value.\n */\n target?: string | readonly string[];\n /**\n * Namespace for Stillwind-owned CSS identifiers.\n * Starts with --, ends with -, and contains no whitespace.\n * Defaults to --sw-.\n */\n prefix?: string;\n /**\n * Namespace for Tailwind-compatible custom properties.\n * Uses the same format as prefix and may equal it.\n * Defaults to --tw-.\n */\n tailwindPrefix?: string;\n /**\n * Replaces the leading -- of theme variables in generated CSS. Uses the same format as\n * prefix and may equal the other prefixes. Omission keeps the authored names.\n */\n themePrefix?: string;\n /**\n * Stable namespace included in generated class identities. Use the same value for\n * client and server builds. Changing it changes those identities. Defaults to empty.\n */\n classNamespace?: string;\n /**\n * Emit native CSS if() for experimental values and variants. False uses fallback helpers.\n * Defaults to false. Comparisons, negated variants, and CSS-wide helper branches require true.\n */\n useCssIf?: boolean;\n /**\n * Host name generators, one optional function per identifier family. A function\n * returns the name to write, or `undefined` to keep the compiler's own name. A\n * generator must be pure: the same request has to produce the same name. Keep the\n * functions stable for the life of the session, and update `namingRevision` with them.\n */\n naming?: NativeIdentifierNaming;\n /**\n * Caller-supplied revision of naming callbacks, included in artifact cache keys. Update it when\n * callbacks change. The compiler does not derive it from functions. Defaults to an empty string.\n */\n namingRevision?: string;\n /**\n * Number of base-36 hash digits kept in built-in generated names. Defaults to 5.\n * Integer values from 1 to 50 are accepted. Raising it lowers the chance of a collision.\n */\n hashLength?: number;\n /**\n * Plugins that `@plugin` statements of the design-system stylesheet select by name. An entry\n * takes precedence over a package of the same name. A plugin without a matching statement is\n * not loaded.\n */\n plugins?: readonly StillwindPlugin[];\n /**\n * Tailwind CSS configuration, or a promise for one, in place of Tailwind's `@config`. The host\n * awaits it when it loads the design-system stylesheet, which requires the `tailwindcss`\n * package.\n *\n * Its keys replace the same keys of the configurations that `@plugin` statements supply, as\n * the keys of a `@config` file do in Tailwind. `theme`, `presets`, `plugins`, `darkMode`, and\n * `important` apply as in Tailwind. A stylesheet's `@custom-variant dark` replaces the variant\n * that `darkMode` defines. Plugins can read `prefix` and `blocklist` through `config()`, but\n * these keys do not change output. Other keys have no effect.\n */\n tailwind?: TailwindConfig | Promise<TailwindConfig>;\n /**\n * Makes class utilities important, as Tailwind's `important` configuration key does. True\n * marks every declaration of a class utility `!important`. A selector nests each class utility\n * rule in a rule with that selector. Neither form changes `@apply`. Setting both this field and\n * `tailwind.important` is an error.\n */\n important?: true | string;\n /**\n * Positive finite number of pixels per rem in the documents that use the CSS. Defaults to 16.\n * Canonical lint converts pixel spacing with it, and editor previews annotate rem values with it.\n * Media and container query annotations always use 16 because browsers evaluate rem there\n * against the initial font size.\n */\n rootFontSize?: number;\n}\n\n/** Compiler and document CSS delivery settings shared by build adapters. */\nexport interface BuildConfig extends BaseConfig, BuildOptions {}\n\nconst cssPath = v.pipe(\n v.string(\"must specify CSS as a nonempty path\"),\n v.check((value) => Boolean(value.trim()), \"must specify CSS as a nonempty path\"),\n);\n\nconst namespace = v.pipe(\n v.string(),\n v.regex(/^--\\S+-$/, \"must start with --, end with -, and contain no whitespace\"),\n);\n\nconst sortOptionsSchema = strictObject({\n stringLiterals: v.optional(v.boolean()),\n arrays: v.optional(v.boolean()),\n applyUtilities: v.optional(v.boolean()),\n applyStatements: v.optional(v.boolean()),\n variantBlocks: v.optional(v.boolean()),\n});\n\nconst browserTarget = v.pipe(\n v.string(),\n v.regex(\n /^(?:android|chrome|edge|firefox|ie|ios|opera|safari|samsung)\\d+(?:\\.\\d+){0,2}$/,\n \"must name a browser followed by one to three decimal version components\",\n ),\n v.check(\n (value) =>\n value\n .replace(/^[a-z]+/, \"\")\n .split(\".\")\n .every((part) => Number(part) <= 65535),\n \"version components must not exceed 65535\",\n ),\n);\n\n/** Shared schemas for compiler fields, excluding delivery options and analysis scope. Lint is validated separately. */\nexport const compilerEntries = {\n root: v.optional(v.string()),\n css: v.optional(cssPath),\n tsconfig: v.optional(v.union([nonemptyText, v.literal(false)])),\n prefix: v.optional(namespace),\n tailwindPrefix: v.optional(namespace),\n themePrefix: v.optional(namespace),\n classNamespace: v.optional(v.string()),\n utilityOrder: v.optional(v.picklist([\"authored\", \"tailwind\"])),\n target: v.optional(v.union([browserTarget, v.array(browserTarget)])),\n useCssIf: v.optional(v.boolean()),\n namingRevision: v.optional(v.string()),\n hashLength: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(50))),\n rootFontSize: v.optional(\n v.pipe(\n v.number(),\n v.finite(),\n v.check((value) => value > 0, \"must be positive and finite\"),\n ),\n ),\n sort: v.optional(v.lazy((value) => (value === false ? v.literal(false) : sortOptionsSchema))),\n naming: v.optional(\n strictObject({\n utilityClass: v.optional(v.function()),\n refMarker: v.optional(v.function()),\n anchorName: v.optional(v.function()),\n containerName: v.optional(v.function()),\n keyframesName: v.optional(v.function()),\n viewTransitionClass: v.optional(v.function()),\n viewTransitionSlot: v.optional(v.function()),\n conditionHelper: v.optional(v.function()),\n layerName: v.optional(v.function()),\n }),\n ),\n plugins: v.optional(\n v.array(\n v.object({\n name: nonemptyText,\n css: v.function(),\n resolve: v.optional(v.function()),\n catalog: v.optional(v.function()),\n }),\n ),\n ),\n tailwind: v.optional(\n v.custom<TailwindConfig | Promise<TailwindConfig>>(\n object,\n \"must be a Tailwind configuration object or a promise for one\",\n ),\n ),\n important: v.optional(v.union([v.literal(true), nonemptyText])),\n lint: v.optional(v.unknown()),\n};\n\nconst compilerSchema = strictObject(compilerEntries);\n\n/**\n * Rejects an `important` field together with `important` in a Tailwind configuration object.\n * A promised configuration is checked after the host awaits it.\n */\nconst singleImportant = v.forward(\n v.check(\n (value: v.InferOutput<typeof compilerSchema>) =>\n value.important === undefined ||\n !object(value.tailwind) ||\n typeof value.tailwind.then === \"function\" ||\n value.tailwind.important === undefined,\n \"must not be set together with tailwind.important\",\n ),\n [\"important\"],\n);\n\n/**\n * Validates compiler fields and lint policies without resolving paths or invoking naming callbacks.\n * @param value - Compiler settings with no analysis or delivery fields. CSS is optional here.\n * @param location - Field path prepended to validation errors. Defaults to `config`.\n * @param partial - Whether incomplete overrides can defer namespace collisions and required lint\n * options until they are merged with project settings.\n * @throws If a field is unknown or invalid, namespaces collide, or lint presets or effective options are invalid.\n */\nexport function validateCompilerConfig(\n value: unknown,\n location = \"config\",\n partial = false,\n): asserts value is BaseConfig {\n validate(v.pipe(compilerSchema, singleImportant), value, location);\n if (value.lint !== undefined) {\n validateLintConfig(value.lint, `${location}.lint`, partial);\n }\n}\n\n/** Compiler and delivery settings after defaults are applied. Authored paths remain unresolved. */\nexport interface NormalizedCompilerConfig extends BaseConfig, BuildOptions {\n /** Validated Stillwind namespace, defaulting to --sw-. */\n prefix: string;\n /** Validated Tailwind namespace, defaulting to --tw-. */\n tailwindPrefix: string;\n /** Validated theme variable namespace. Omission keeps authored names. */\n themePrefix?: string;\n /** Namespace shared by client and server class identities, defaulting to an empty string. */\n classNamespace: string;\n /** Ordering policy after applying the authored-order default. */\n utilityOrder: \"authored\" | \"tailwind\";\n /** Captured minimum browser versions. An empty list keeps color fallbacks. */\n target: string[];\n /** Whether native CSS if() features are enabled. Defaults to false. */\n useCssIf: boolean;\n /** Caller-supplied revision of naming callbacks, defaulting to an empty string. */\n namingRevision: string;\n /** Number of base-36 digits in generated hashes, between 1 and 50 inclusive. Defaults to 5. */\n hashLength: number;\n /** Positive finite number of pixels per rem. Defaults to 16. */\n rootFontSize: number;\n /** Explicit flags for every sorting target. A disabled sort setting makes every flag false. */\n sort: Required<UtilitySortOptions>;\n /** Expanded lint settings with a severity and default detection options for every rule. */\n lint: {\n /** Complete rules after ordered preset composition. Unconfigured rules are off. */\n rules: ResolvedLintRules;\n /** Packages whose utility definitions lint checks. Defaults to false. */\n checkLibraries: DefinitionScope;\n /** Plugins whose utility definitions lint checks. Defaults to false. */\n checkPlugins: DefinitionScope;\n };\n /** Whether producer CSS applies to the document. Defaults to true. */\n automatic: boolean;\n}\n\n/**\n * Validates compiler fields and applies defaults without resolving paths.\n * @param config - Compiler and delivery settings. Other fields are discarded before validation.\n * @returns A new object containing compiler and delivery settings with explicit sort flags and\n * expanded lint rules. Naming callbacks and other unchanged objects can retain input references.\n * @throws If compiler fields, delivery settings, namespace combinations, or effective lint policies are invalid.\n */\nexport function normalizeCompilerConfig(\n config: BaseConfig & BuildOptions,\n): NormalizedCompilerConfig {\n const { automatic } = config;\n\n const compiler = Object.fromEntries(compilerKeys.map((key) => [key, config[key]]));\n validateCompilerConfig(compiler);\n\n if (automatic !== undefined) {\n validate(v.boolean(), automatic, \"config.automatic\");\n }\n\n const lint = resolveLintConfig(config.lint);\n\n return {\n ...compiler,\n prefix: config.prefix ?? \"--sw-\",\n tailwindPrefix: config.tailwindPrefix ?? \"--tw-\",\n ...(config.themePrefix === undefined ? {} : { themePrefix: config.themePrefix }),\n classNamespace: config.classNamespace ?? \"\",\n utilityOrder: config.utilityOrder ?? \"authored\",\n target: typeof config.target === \"string\" ? [config.target] : [...(config.target ?? [])],\n useCssIf: config.useCssIf ?? false,\n namingRevision: config.namingRevision ?? \"\",\n hashLength: config.hashLength ?? 5,\n rootFontSize: config.rootFontSize ?? 16,\n automatic: automatic ?? true,\n sort:\n config.sort === false\n ? {\n stringLiterals: false,\n arrays: false,\n applyUtilities: false,\n applyStatements: false,\n variantBlocks: false,\n }\n : {\n stringLiterals: config.sort?.stringLiterals ?? true,\n arrays: config.sort?.arrays ?? true,\n applyUtilities: config.sort?.applyUtilities ?? true,\n applyStatements: config.sort?.applyStatements ?? false,\n variantBlocks: config.sort?.variantBlocks ?? false,\n },\n lint,\n };\n}\n\n/** Compiler field names used to discard analysis and delivery fields before compiler validation. */\nexport const compilerKeys = Object.keys(compilerEntries) as (keyof BaseConfig)[];\n","/** Configuration exports and analysis projects, validated before paths or providers are evaluated. */\n\nimport type { PreparedSource, ProjectInput } from \"@stillwind/projection\";\nimport * as v from \"valibot\";\n\nimport {\n compilerEntries,\n validateCompilerConfig,\n type BaseConfig,\n type BuildOptions,\n} from \"./compiler.ts\";\nimport {\n nonemptyStringList,\n nonemptyStrings,\n nonemptyText,\n object,\n strictObject,\n validate,\n} from \"./validation.ts\";\n\n/** One project's compiler settings, analysis scope, and source preparation operations. */\nexport interface AnalysisProjectConfig extends BaseConfig, BuildOptions {\n /** Nonempty design-system stylesheet path, absolute or relative to root. Authored whitespace is preserved. */\n css: string;\n /** Optional nonempty identifier used to select this project. Names must be unique, and authored whitespace is preserved. */\n name?: string;\n /**\n * Nonempty list of globs relative to root. Analysis enumerates these targets and filters reports\n * to their scope. Imported dependencies and global declarations can lie outside this scope.\n */\n files: readonly string[];\n /** Globs relative to root that remove analysis targets. node_modules and .git are always excluded. */\n exclude?: readonly string[];\n /** Omission reads files and prepares supported framework documents. */\n sources?: SourceProvider;\n /** Omission uses built-in framework converters. Custom preparation applies to unprepared inputs only. */\n projection?: ProjectionProvider;\n /** False skips checker queries while retaining locally determined diagnostics. */\n typeFacts?: false;\n /** Comments that editor previews add after values. Omission uses the defaults of each field. */\n preview?: PreviewOptions;\n}\n\n/** Selects the comments that editor previews add after CSS values. */\nexport interface PreviewOptions {\n /**\n * Adds the resolved value after each theme `var()` and after each `calc()` that evaluates to one\n * value. Defaults to true.\n */\n themeValues?: boolean;\n /**\n * Adds pixel equivalents for rem values, using the project's rootFontSize. Media and container\n * queries use 16 pixels per rem. Defaults to true.\n */\n pixelEquivalents?: boolean;\n /**\n * Adds hexadecimal sRGB equivalents for colors. \"exact\" skips colors outside the sRGB gamut.\n * \"approximate\" maps those colors into the gamut and marks the result with `≈`. False adds no\n * color comments. Defaults to \"approximate\".\n */\n colorEquivalents?: \"approximate\" | \"exact\" | false;\n}\n\ntype Captured<T> = T extends (...arguments_: never[]) => unknown\n ? T\n : T extends object\n ? {\n readonly [K in keyof T]: Captured<T[K]>;\n }\n : T;\n\n/**\n * Project settings fixed for a service's lifetime, with provider functions preserved. The Tailwind\n * configuration keeps the caller's object or promise.\n */\nexport type CapturedProjectConfig = Captured<Omit<AnalysisProjectConfig, \"tailwind\">> &\n Pick<AnalysisProjectConfig, \"tailwind\">;\n\nconst capturedProjects = new WeakSet<object>();\n\n/**\n * Captures configuration data and callback registries without changing the caller's objects.\n * @param config - Evaluated project settings. Provider methods retain their original receivers.\n * @returns Fixed settings. A previously captured configuration is shared without copying it again.\n */\nexport function captureProjectConfig(config: AnalysisProjectConfig): CapturedProjectConfig {\n if (capturedProjects.has(config)) {\n return config;\n }\n\n const { naming, sources, projection, plugins, tailwind, ...settings } = config;\n const data = structuredClone(settings);\n\n const capturedSources =\n sources?.kind === \"custom\"\n ? {\n kind: sources.kind,\n supports: sources.supports.bind(sources),\n load: sources.load.bind(sources),\n ...(sources.resolve ? { resolve: sources.resolve.bind(sources) } : {}),\n }\n : sources && { kind: sources.kind };\n const capturedProjection =\n projection?.kind === \"custom\"\n ? { kind: projection.kind, prepare: projection.prepare.bind(projection) }\n : projection && { kind: projection.kind };\n\n const captured: CapturedProjectConfig = {\n ...data,\n ...(plugins\n ? {\n plugins: [...plugins],\n }\n : {}),\n // A Tailwind configuration can contain plugin functions, which `structuredClone` rejects.\n ...(tailwind\n ? {\n tailwind,\n }\n : {}),\n ...(naming\n ? {\n naming: {\n utilityClass: naming.utilityClass,\n refMarker: naming.refMarker,\n anchorName: naming.anchorName,\n containerName: naming.containerName,\n keyframesName: naming.keyframesName,\n viewTransitionClass: naming.viewTransitionClass,\n viewTransitionSlot: naming.viewTransitionSlot,\n conditionHelper: naming.conditionHelper,\n layerName: naming.layerName,\n },\n }\n : {}),\n ...(capturedSources ? { sources: capturedSources } : {}),\n ...(capturedProjection ? { projection: capturedProjection } : {}),\n };\n capturedProjects.add(captured);\n return captured;\n}\n\n/** Supplies original or prepared sources without starting a bundler. */\nexport type SourceProvider =\n | {\n /** Reads original files through the analysis host, including captured unsaved buffers. */\n kind: \"filesystem\";\n }\n | {\n /** Delegates source support, loading, and optional dependency metadata to the caller. */\n kind: \"custom\";\n /**\n * Determines whether the host can analyze a resolved source.\n *\n * @param id - Full source identity used for loading and dependency traversal.\n * @returns Whether this provider supplies analyzable source for the identity.\n */\n supports(id: string): boolean;\n /**\n * Supplies source before or after preparation, preserving the requested resolver identity.\n *\n * @param id - Resolved source identity. The returned resolverId must equal this value.\n * @param context - Project root and buffers captured for this analysis. Consult these buffers\n * when loading unsaved documents.\n * @returns Original input for preparation, or prepared input with checker correspondences.\n * @throws If the source cannot be loaded or prepared.\n */\n load(id: string, context: SourceProviderContext): Promise<ProjectInput | PreparedSource>;\n /**\n * Supplies a source implementation resolution that takes precedence over checker resolution.\n *\n * @param specifier - Authored import request.\n * @param importer - Resolved identity of the importing source.\n * @param context - Root and captured buffers for the same analysis.\n * @returns A source identity, or null when this provider cannot resolve the request.\n * @throws If resolution fails for reasons other than an unknown request.\n */\n resolve?(\n specifier: string,\n importer: string,\n context: SourceProviderContext,\n ): Promise<string | null>;\n };\n\n/** Captured buffers shared by source reads, projections, and semantic queries. */\nexport interface SourceProviderContext {\n /** Absolute project directory used for relative compiler and checker identities. */\n root: string;\n /** Original source text keyed by absolute file path, captured before asynchronous analysis. */\n documents: ReadonlyMap<string, string>;\n}\n\n/** Selects framework converters or a caller-supplied preparation operation. */\nexport type ProjectionProvider =\n | {\n /** Uses the built-in converter selected by the input's framework metadata. */\n kind: \"framework\";\n }\n | {\n /** Delegates preparation of original inputs to the caller. */\n kind: \"custom\";\n /**\n * Prepares original source for scanning and checker queries.\n *\n * @param input - Source input with its resolver, compiler, checker, and document identities.\n * @returns Prepared source preserving those identities and original source correspondences.\n * @throws If conversion or validation of source correspondences fails.\n */\n prepare(input: ProjectInput): Promise<PreparedSource>;\n };\n\n/** Configuration file settings evaluated by build integrations and analysis hosts. */\nexport interface StillwindConfig {\n /**\n * Nonempty list of projects and references. Projects keep independent scopes and design systems.\n * Supplied names must be unique. A string references other configuration files, relative to this\n * file: a file path, a directory that contains stillwind.config.*, or a glob that selects those\n * files or directories. A `!` prefix removes paths from glob matches. Referenced files must list\n * project objects only, and a relative project root in them uses their own directory.\n */\n projects: (AnalysisProjectConfig | string)[];\n}\n\n/** Called without arguments during configuration evaluation. Returns settings directly or asynchronously. */\nexport type StillwindConfigFactory = () => StillwindConfig | Promise<StillwindConfig>;\n\n/** Configuration module export accepted by Node hosts and build configuration consumers. */\nexport type StillwindConfigExport =\n | StillwindConfig\n | Promise<StillwindConfig>\n | StillwindConfigFactory;\n\n/**\n * Provides contextual types and returns the supplied export unchanged. Factories run and promises\n * are awaited when the consumer calls resolveConfig. Definition does not validate their results.\n *\n * @param config - Settings, a promise for settings, or a factory returning either form.\n * @returns The same object, promise, or function with its inferred type preserved.\n */\nexport function defineConfig<T extends StillwindConfigExport>(config: T): T {\n return config;\n}\n\n/**\n * Awaits a configuration export, calls a factory once without arguments when supplied, and\n * validates the resulting settings. Factory exceptions and rejected promises propagate.\n *\n * @param value - Settings, a promise, or a factory from a configuration module's default export.\n * @returns The validated settings object without copying it.\n * @throws If evaluation fails or the resulting settings are invalid.\n */\nexport async function resolveConfig(value: unknown): Promise<StillwindConfig> {\n const config = await value;\n return validateConfig(typeof config === \"function\" ? await config() : config);\n}\n\nconst projectSchema = strictObject({\n ...compilerEntries,\n css: v.nonOptional(compilerEntries.css, \"must specify CSS as a nonempty path\"),\n automatic: v.optional(v.boolean()),\n name: v.optional(nonemptyText),\n files: nonemptyStringList,\n exclude: v.optional(nonemptyStrings),\n typeFacts: v.optional(v.literal(false)),\n preview: v.optional(\n strictObject({\n themeValues: v.optional(v.boolean()),\n pixelEquivalents: v.optional(v.boolean()),\n colorEquivalents: v.optional(\n v.union([v.picklist([\"approximate\", \"exact\"]), v.literal(false)]),\n ),\n }),\n ),\n sources: v.optional(\n v.pipe(\n v.custom<Record<string, unknown>>(object, \"must be an object\"),\n v.variant(\"kind\", [\n v.strictObject({\n kind: v.literal(\"filesystem\"),\n }),\n v.strictObject({\n kind: v.literal(\"custom\"),\n supports: v.function(),\n load: v.function(),\n resolve: v.optional(v.function()),\n }),\n ]),\n ),\n ),\n projection: v.optional(\n v.pipe(\n v.custom<Record<string, unknown>>(object, \"must be an object\"),\n v.variant(\"kind\", [\n v.strictObject({\n kind: v.literal(\"framework\"),\n }),\n v.strictObject({\n kind: v.literal(\"custom\"),\n prepare: v.function(),\n }),\n ]),\n ),\n ),\n});\n\nconst configurationSchema = v.pipe(\n strictObject({\n projects: v.pipe(\n v.array(\n // A union would replace the field paths of project issues with one generic message.\n v.lazy((entry): v.GenericSchema<unknown, string | v.InferOutput<typeof projectSchema>> =>\n typeof entry === \"string\" ? nonemptyText : projectSchema,\n ),\n ),\n v.minLength(1, \"must be a nonempty projects array\"),\n ),\n }),\n v.rawCheck(({ dataset, addIssue }) => {\n if (!dataset.typed) {\n return;\n }\n const names = new Set<string>();\n for (const [index, project] of dataset.value.projects.entries()) {\n if (typeof project === \"string\" || project.name === undefined) {\n continue;\n }\n if (names.has(project.name)) {\n addIssue({\n message: `Duplicate Stillwind project name: ${project.name}`,\n path: [\n {\n type: \"object\",\n origin: \"value\",\n input: dataset.value,\n key: \"projects\",\n value: dataset.value.projects,\n },\n {\n type: \"array\",\n origin: \"value\",\n input: dataset.value.projects,\n key: index,\n value: project,\n },\n {\n type: \"object\",\n origin: \"value\",\n input: project,\n key: \"name\",\n value: project.name,\n },\n ],\n });\n }\n names.add(project.name);\n }\n }),\n);\n\n/**\n * Validates evaluated projects and their compiler settings without running providers, resolving\n * paths, or reading referenced configuration files.\n * @param value - Evaluated settings with a nonempty list of projects and references, required CSS\n * paths and file globs, and unique names when names are supplied.\n * @returns The supplied settings with object and callback identities preserved.\n * @throws If a field, project name, effective lint policy, or compiler namespace is invalid.\n * Validation errors include the authored field path.\n */\nexport function validateConfig(value: unknown): StillwindConfig {\n validate(configurationSchema, value, \"config\");\n\n for (const [index, project] of value.projects.entries()) {\n if (typeof project === \"string\") {\n continue;\n }\n const {\n automatic: _automatic,\n name: _name,\n files: _files,\n exclude: _exclude,\n sources: _sources,\n projection: _projection,\n typeFacts: _typeFacts,\n ...compiler\n } = project;\n validateCompilerConfig(compiler, `projects[${index}]`);\n }\n\n return value as StillwindConfig;\n}\n","import { object } from \"./validation.ts\";\n\n/**\n * Merges objects recursively. Undefined preserves previous values, arrays and promises are\n * replaced, and a changed provider kind replaces that provider's complete configuration.\n *\n * @param base - Settings to preserve where overrides omit a value.\n * @param overrides - Fields to merge or replace. Neither input is modified.\n * @returns Merged settings. Unchanged values and replacement arrays can share input references.\n */\nexport function mergeConfig<T extends object>(base: T, overrides: Partial<T>): T {\n return mergeValue(base, overrides) as T;\n}\n\n/**\n * Merges object fields recursively while treating other values as replacements.\n * @param base - Existing value. It is retained when the override is undefined.\n * @param override - Replacement or fields to merge. A changed, defined `kind` replaces the whole object.\n * @returns The original value, replacement value, or a new merged object. Nested values may share\n * input references, and neither input is mutated.\n */\nfunction mergeValue(base: unknown, override: unknown): unknown {\n if (override === undefined) {\n return base;\n }\n if (\n !object(base) ||\n !object(override) ||\n typeof base.then === \"function\" ||\n typeof override.then === \"function\" ||\n (override.kind !== undefined && base.kind !== override.kind)\n ) {\n return override;\n }\n const result = { ...base };\n for (const [key, value] of Object.entries(override)) {\n if (value !== undefined) {\n result[key] = mergeValue(base[key], value);\n }\n }\n return result;\n}\n","/**\n * Selects projects and resolves compiler settings through host-supplied path operations, without reading files.\n */\n\nimport * as v from \"valibot\";\n\nimport {\n compilerEntries,\n normalizeCompilerConfig,\n validateCompilerConfig,\n type BaseConfig,\n type BuildConfig,\n type BuildOptions,\n type NormalizedCompilerConfig,\n} from \"./compiler.ts\";\nimport type { AnalysisProjectConfig, StillwindConfig } from \"./configuration.ts\";\nimport { mergeLintConfig } from \"./lint.ts\";\nimport { mergeConfig } from \"./merge.ts\";\nimport { nonemptyText, strictObject, validate } from \"./validation.ts\";\n\n/**\n * Inline options that can pass through isolated loader workers.\n */\nexport type SerializableInlineConfig = Omit<InlineConfig, \"naming\" | \"plugins\" | \"tailwind\">;\n\n/**\n * Build overrides and the selection of a configuration file and project.\n */\nexport interface InlineConfig extends BuildConfig {\n /**\n * Configuration file path, absolute or relative to the application root. An explicit path must\n * exist. Omission searches upward for stillwind.config.*. False disables file loading.\n */\n configFile?: string | false;\n /**\n * Exact configured project name. Omission selects the sole project or the unique project whose\n * root most closely contains the application root. Ambiguous selection fails during evaluation.\n */\n project?: string;\n}\n\n/**\n * Path operations supplied by the host's filesystem or virtual workspace.\n */\nexport interface ConfigPaths {\n /**\n * Combines path segments and removes relative traversal segments.\n *\n * @param paths - Path segments interpreted using the host's path syntax and working directory.\n * @returns A normalized absolute path. An absolute segment replaces preceding segments.\n */\n resolve(...paths: string[]): string;\n /**\n * Gets the parent directory used to walk configuration candidates.\n *\n * @param path - Normalized absolute path in the same syntax accepted by resolve.\n * @returns Its absolute parent directory. A filesystem root must return itself to end traversal.\n */\n dirname(path: string): string;\n /**\n * Computes the path used to determine project containment.\n *\n * @param from - Absolute project root.\n * @param to - Absolute application directory.\n * @returns A relative path, or an absolute path when the host cannot express a relative path.\n * The same location returns an empty string.\n */\n relative(from: string, to: string): string;\n /**\n * Recognizes absolute paths using the same syntax as the other operations.\n *\n * @param path - Path returned by a path operation or supplied by configuration.\n * @returns Whether the path is absolute for this host.\n */\n isAbsolute(path: string): boolean;\n}\n\n/** Filenames in precedence order within each searched directory. */\nexport const configurationFiles = [\"ts\", \"mts\", \"cts\", \"js\", \"mjs\", \"cjs\", \"json\"].map(\n (extension) => `stillwind.config.${extension}`,\n);\n\n/**\n * Enumerates configuration candidates from the nearest directory to the host's root.\n *\n * @param directory - Starting directory, normalized with the supplied resolve operation.\n * @param paths - Consistent host path operations. dirname must return the root unchanged.\n * @returns Absolute candidate paths in directory order, then configurationFiles order within each\n * directory. Existence is not checked.\n */\nexport function configurationCandidates(directory: string, paths: ConfigPaths): string[] {\n const candidates: string[] = [];\n let current = paths.resolve(directory);\n for (;;) {\n candidates.push(...configurationFiles.map((file) => paths.resolve(current, file)));\n const parent = paths.dirname(current);\n if (parent === current) {\n return candidates;\n }\n current = parent;\n }\n}\n\n/**\n * Tests whether a directory contains a path.\n *\n * @param directory - Absolute directory.\n * @param target - Absolute path in the same syntax.\n * @param paths - Host path operations.\n * @returns True for the directory itself and for its descendants.\n */\nfunction containsPath(directory: string, target: string, paths: ConfigPaths): boolean {\n const relative = paths.relative(directory, target).replaceAll(\"\\\\\", \"/\");\n return (\n relative === \"\" ||\n (!paths.isAbsolute(relative) && relative !== \"..\" && !relative.startsWith(\"../\"))\n );\n}\n\n/**\n * Finds the nearest configuration of a document in a workspace folder. Evaluating a configuration\n * runs its code, so this skips files that the user did not place in the workspace.\n *\n * @param file - Absolute document path.\n * @param folders - Absolute workspace folders.\n * @param exists - Tests whether a file exists.\n * @param paths - Host path operations.\n * @returns The nearest configuration path inside the folder that contains the document, or\n * undefined when the document lies outside the folders or in `node_modules`, or no such file exists.\n */\nexport function documentConfiguration(\n file: string,\n folders: readonly string[],\n exists: (file: string) => boolean,\n paths: ConfigPaths,\n): string | undefined {\n const folder = folders.find((candidate) => containsPath(candidate, file, paths));\n if (\n !folder ||\n paths.relative(folder, file).replaceAll(\"\\\\\", \"/\").split(\"/\").includes(\"node_modules\")\n ) {\n return undefined;\n }\n const found = configurationCandidates(paths.dirname(file), paths).find(exists);\n return found && containsPath(folder, found, paths) ? found : undefined;\n}\n\n/**\n * File access that expandProjects uses to follow references in a host's filesystem or virtual workspace.\n */\nexport interface ProjectReferenceHost {\n /**\n * Tests whether a path identifies an existing file.\n *\n * @param file - Normalized absolute path.\n * @returns False for directories and missing paths.\n */\n isFile(file: string): boolean;\n /**\n * Enumerates existing files that match any pattern.\n *\n * @param patterns - Globs relative to directory. Dotted path segments do not match wildcards.\n * @param ignore - Globs relative to directory that remove matches.\n * @param directory - Absolute directory of the configuration that declares the patterns.\n * @returns Absolute paths in the syntax that the host's path operations produce.\n */\n glob(\n patterns: readonly string[],\n ignore: readonly string[],\n directory: string,\n ): Promise<string[]>;\n /**\n * Evaluates and validates a referenced configuration file.\n *\n * @param file - Existing absolute path.\n * @returns Validated settings.\n * @throws If evaluation or validation fails.\n */\n load(file: string): Promise<StillwindConfig>;\n}\n\n/**\n * Finds the configuration files that a reference string selects.\n *\n * @param reference - Path or glob relative to directory, without a `!` prefix. An existing path\n * takes precedence over its glob meaning, so a directory such as `apps/(web)` stays usable.\n * @param negated - Paths and globs from `!` entries, relative to directory.\n * @param directory - Absolute directory of the configuration that declares the reference.\n * @param host - File access for the configuration's filesystem or virtual workspace.\n * @param paths - Host path operations.\n * @returns Absolute configuration paths. A glob returns at most one file per directory, chosen in\n * configurationFiles order, and skips directories that have no configuration file.\n * @throws If a reference without glob syntax does not identify a file or a configured directory.\n */\nasync function referencedFiles(\n reference: string,\n negated: readonly string[],\n directory: string,\n host: ProjectReferenceHost,\n paths: ConfigPaths,\n): Promise<string[]> {\n const target = paths.resolve(directory, reference);\n const direct = [target, ...configurationFiles.map((file) => paths.resolve(target, file))].find(\n (file) => host.isFile(file),\n );\n if (direct) {\n return [direct];\n }\n if (!/[*?[\\]{}()]/.test(reference)) {\n throw new Error(`Cannot find Stillwind configuration: ${target}`);\n }\n\n const pattern = globPath(reference);\n const matches = new Set(\n await host.glob(\n [pattern, ...configurationFiles.map((file) => `${pattern}/${file}`)],\n [\n \"**/node_modules/**\",\n \"**/.git/**\",\n ...negated.flatMap((path) => [globPath(path), `${globPath(path)}/**`]),\n ],\n directory,\n ),\n );\n return [...new Set([...matches].map((file) => paths.dirname(file)))].sort().flatMap((match) => {\n const file = configurationFiles\n .map((name) => paths.resolve(match, name))\n .find((candidate) => matches.has(candidate));\n return file ? [file] : [];\n });\n}\n\n/**\n * Removes path spellings that glob matchers would treat as literal segments.\n *\n * @param path - Authored relative path or glob.\n * @returns The path without leading `./` segments or trailing slashes.\n */\nfunction globPath(path: string): string {\n return path.replace(/^(?:\\.\\/)+/, \"\").replace(/\\/+$/, \"\");\n}\n\n/**\n * Replaces references with the projects of the files that they select.\n *\n * @param config - Validated settings of the configuration file.\n * @param file - Normalized absolute path of the configuration file.\n * @param host - File access for following references.\n * @param paths - Host path operations.\n * @returns Projects in authored order. Project objects of config keep their identity and relative\n * paths. Referenced projects are copies with an absolute root, so their relative paths stay valid\n * against any configuration directory. Each file contributes once, even if several references\n * select it, and a reference to file itself adds nothing.\n * @throws If a reference selects no file, a referenced file contains references, evaluation fails,\n * no project remains, or two projects share a name.\n */\nexport async function expandProjects(\n config: StillwindConfig,\n file: string,\n host: ProjectReferenceHost,\n paths: ConfigPaths,\n): Promise<AnalysisProjectConfig[]> {\n const directory = paths.dirname(file);\n const negated = config.projects.flatMap((entry) =>\n typeof entry === \"string\" && entry.startsWith(\"!\") ? [entry.slice(1)] : [],\n );\n const visited = new Set([file]);\n const projects: AnalysisProjectConfig[] = [];\n for (const entry of config.projects) {\n if (typeof entry !== \"string\") {\n projects.push(entry);\n continue;\n }\n if (entry.startsWith(\"!\")) {\n continue;\n }\n for (const referenced of await referencedFiles(entry, negated, directory, host, paths)) {\n if (visited.has(referenced)) {\n continue;\n }\n visited.add(referenced);\n const base = paths.dirname(referenced);\n for (const project of (await host.load(referenced)).projects) {\n if (typeof project === \"string\") {\n throw new Error(\n `Stillwind configuration ${referenced} cannot contain references because ${file} references it`,\n );\n }\n projects.push({ ...project, root: paths.resolve(base, project.root ?? \".\") });\n }\n }\n }\n\n if (!projects.length) {\n throw new Error(`Stillwind configuration ${file}: projects selects no project`);\n }\n const names = new Set<string>();\n for (const { name } of projects) {\n if (name !== undefined && names.has(name)) {\n throw new Error(`Duplicate Stillwind project name: ${name}`);\n }\n if (name !== undefined) {\n names.add(name);\n }\n }\n return projects;\n}\n\n/**\n * Resolves project paths from their authored root without changing the supplied settings.\n *\n * @param project - Validated project with a required CSS path and optional root and tsconfig paths.\n * @param directory - Absolute configuration directory used for a relative or omitted project root.\n * @param paths - Host operations used to resolve each path.\n * @returns A copied project with absolute root and CSS paths. A string tsconfig path is resolved\n * against that root, while false and omission are preserved. Other values retain input references.\n */\nexport function resolveProjectPaths(\n project: AnalysisProjectConfig,\n directory: string,\n paths: ConfigPaths,\n): AnalysisProjectConfig & {\n /** Normalized absolute project directory. */\n root: string;\n} {\n const root = paths.resolve(directory, project.root ?? \".\");\n return {\n ...project,\n root,\n css: paths.resolve(root, project.css),\n ...(typeof project.tsconfig === \"string\"\n ? {\n tsconfig: paths.resolve(root, project.tsconfig),\n }\n : {}),\n };\n}\n\n/**\n * Removes analysis scope and providers while preserving compiler and delivery settings.\n *\n * @param project - Evaluated project whose names, file scopes, and providers are no longer needed.\n * @returns A shallow copy containing compiler fields and automatic CSS delivery settings. Paths\n * and retained nested objects are unchanged.\n */\nexport function compilerConfig(project: AnalysisProjectConfig): BaseConfig & BuildOptions {\n const {\n name: _name,\n files: _files,\n exclude: _exclude,\n sources: _sources,\n projection: _projection,\n typeFacts: _typeFacts,\n ...config\n } = project;\n return config;\n}\n\nconst inlineSchema = strictObject({\n ...compilerEntries,\n configFile: v.optional(v.union([nonemptyText, v.literal(false)])),\n project: v.optional(nonemptyText),\n automatic: v.optional(v.boolean()),\n});\n\n/**\n * Validates inline selectors and compiler overrides before selection or path resolution.\n *\n * @param inline - File and project selectors with compiler and delivery overrides.\n * @throws If a field is unknown or invalid, or a lint preset has a cycle. Namespace collisions\n * and required effective lint options can remain deferred until settings are merged.\n */\nexport function validateInlineConfig(inline: InlineConfig): void {\n validate(inlineSchema, inline, \"config\");\n\n const { configFile: _configFile, project: _project, automatic: _automatic, ...compiler } = inline;\n validateCompilerConfig(compiler, \"config\", true);\n}\n\n/**\n * Selects a named project, the sole project, or the unique deepest containing project root.\n *\n * @param projects - Evaluated projects with normalized absolute roots. Entries are not modified.\n * @param applicationRoot - Absolute application directory used for containment when no name is supplied.\n * @param inline - Project name and optional root override. The override changes the directory tested for containment.\n * @param paths - Host operations used to resolve the target and compare it with project roots.\n * @returns The selected input project object. A sole project is selected regardless of containment.\n * @throws If the requested name or containing root does not identify exactly one project.\n */\nexport function selectProject(\n projects: (AnalysisProjectConfig & {\n /** Normalized absolute root used for containment and depth comparison. */\n root: string;\n })[],\n applicationRoot: string,\n inline: InlineConfig,\n paths: ConfigPaths,\n): AnalysisProjectConfig & {\n /** Absolute root retained from the selected input project. */\n root: string;\n} {\n let selected;\n if (inline.project !== undefined) {\n selected = projects.filter((project) => project.name === inline.project);\n } else if (projects.length === 1) {\n selected = projects;\n } else {\n const target = paths.resolve(applicationRoot, inline.root ?? \".\");\n const matches = projects.filter((project) => containsPath(project.root, target, paths));\n const depth = Math.max(...matches.map((project) => project.root.length));\n selected = matches.filter((project) => project.root.length === depth);\n }\n if (selected.length !== 1) {\n throw new Error(\n inline.project !== undefined\n ? `Cannot select Stillwind project ${JSON.stringify(inline.project)}: expected one matching project`\n : \"Cannot select one Stillwind project; specify project by name or use a distinct project root\",\n );\n }\n return selected[0];\n}\n\n/**\n * Applies overrides and defaults, then resolves inline paths from the resulting project root.\n *\n * @param base - Project settings with file-authored root, CSS, and tsconfig paths already resolved.\n * @param inline - Validated selectors and compiler overrides. Selectors are discarded before merging.\n * @param applicationRoot - Absolute base directory for an inline root override or omitted project root.\n * @param paths - Host operations used to resolve paths without checking whether files exist.\n * @returns Normalized compiler and delivery settings with absolute root and CSS paths. Absolute\n * file-authored CSS and tsconfig paths retain their original locations when root is overridden.\n * @throws If effective compiler settings are invalid or no nonempty CSS path is supplied.\n */\nexport function resolveCompilerSettings(\n base: BaseConfig & BuildOptions,\n inline: InlineConfig,\n applicationRoot: string,\n paths: ConfigPaths,\n): NormalizedCompilerConfig & {\n /** Absolute project directory after applying any inline root override. */\n root: string;\n /** Absolute design-system stylesheet path. Existence has not been checked. */\n css: string;\n} {\n const { configFile: _file, project: _project, ...overrides } = inline;\n const root =\n overrides.root !== undefined\n ? paths.resolve(applicationRoot, overrides.root)\n : (base.root ?? applicationRoot);\n const config = normalizeCompilerConfig({\n ...mergeConfig(base, overrides),\n lint: mergeLintConfig(base.lint, overrides.lint),\n });\n if (!config.css) {\n throw new Error(\"config.css: must specify CSS as a nonempty path\");\n }\n\n return {\n ...config,\n root,\n css: paths.resolve(root, config.css),\n ...(typeof config.tsconfig === \"string\"\n ? {\n tsconfig: paths.resolve(root, config.tsconfig),\n }\n : {}),\n };\n}\n"],"mappings":";;;AAGA,MAAM,cAAc;CAClB,MAAM;CACN,OAAO;EACL,4BAA4B;EAC5B,qBAAqB;EACrB,yBAAyB;EACzB,+BAA+B;EAC/B,2BAA2B;EAC3B,6BAA6B;EAC7B,4BAA4B;EAC5B,uBAAuB;EACvB,sBAAsB;EACtB,qBAAqB;EACrB,yBAAyB;EACzB,gCAAgC;EAChC,6BAA6B;EAC7B,+BAA+B;EAC/B,sCAAsC;EACtC,mCAAmC;EACnC,uBAAuB;EACvB,qBAAqB;EACr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C;CACA,8BAA8B;EAC5B,UAAU;EACV,YAAY;EACZ,UAAU;EACV,SAAS;CACX;CACA,8BAA8B;EAC5B,UAAU;EACV,YAAY;EACZ,UAAU;GACR,UAAU;GACV,SAAS;GACT,UAAU;GACV,mBAAmB;GACnB,qBAAqB;EACvB;EACA,SAAS;GAAC;GAAY;GAAW;GAAY;GAAqB;EAAqB;CACzF;CACA,2BAA2B;EACzB,UAAU;EACV,YAAY;EACZ,UAAU;EACV,SAAS;CACX;CACA,qBAAqB;EACnB,UAAU;EACV,YAAY;EACZ,UAAU;EACV,SAAS;CACX;CACA,0BAA0B;EACxB,UAAU;EACV,YAAY;EACZ,UAAU;EACV,SAAS;CACX;CACA,4BAA4B;EAC1B,UAAU;EACV,YAAY;EACZ,UAAU;GACR,UAAU;GACV,SAAS;EACX;EACA,SAAS,CAAC,YAAY,SAAS;CACjC;CACA,4BAA4B;EAC1B,UAAU;EACV,YAAY;EACZ,UAAU;EACV,SAAS;CACX;CACA,2BAA2B;EACzB,UAAU;EACV,YAAY;EACZ,UAAU;EACV,SAAS;CACX;AACF;;AAGA,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;ACrgBA,MAAa,eAAe,EAAE,KAC5B,EAAE,OAAO,GACT,EAAE,OAAO,UAAU,QAAQ,MAAM,KAAK,CAAC,GAAG,2BAA2B,CACvE;;AAGA,MAAa,kBAAkB,EAAE,MAAM,YAAY;;AAGnD,MAAa,qBAAqB,EAAE,KAClC,iBACA,EAAE,UAAU,GAAG,sCAAsC,CACvD;;;;;;;;;AAUA,SAAgB,SACd,QACA,OACA,UACmC;CACnC,MAAM,SAAS,EAAE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AI,OAAO,YAAY,KAAA,GACrB,WAAW,SAAS,QAAQ,YAAY,QAAQ,SAAS,OAAO,OAAO;MAClE,IAAI,SAAS,WAAW,GAC7B,WAAW;MACN;EACL,MAAM,SAAS,MAAM,QAAQ,iBAAiB,OAAO,QAAQ,GAAG;EAChE,MAAM,UAAU,SAAS,QAAQ,YAAY,aAAa,QAAQ,MAAM,QAAQ,KAAK,CAAC;EACtF,MAAM,QAAQ,KAAK,IAAI,GAAG,QAAQ,KAAK,YAAY,QAAQ,KAAK,MAAM,CAAC;EACvE,WAAW,QAAQ,QAAQ,YAAY,QAAQ,KAAK,WAAW,KAAK;CACtE;CACA,IAAI,SAAS,WAAW,GACtB,MAAM,IAAI,MACR,OAAO,YAAY,KAAA,IACf,mCAAmC,KAAK,UAAU,OAAO,OAAO,EAAE,mCAClE,6FACN;CAEF,OAAO,SAAS;AAClB;;;;;;;;;;;;AAaA,SAAgB,wBACd,MACA,QACA,iBACA,OAMA;CACA,MAAM,EAAE,YAAY,OAAO,SAAS,UAAU,GAAG,cAAc;CAC/D,MAAM,OACJ,UAAU,SAAS,KAAA,IACf,MAAM,QAAQ,iBAAiB,UAAU,IAAI,IAC5C,KAAK,QAAQ;CACpB,MAAM,SAAS,wBAAwB;EACrC,GAAG,YAAY,MAAM,SAAS;EAC9B,MAAM,gBAAgB,KAAK,MAAM,UAAU,IAAI;CACjD,CAAC;CACD,IAAI,CAAC,OAAO,KACV,MAAM,IAAI,MAAM,iDAAiD;CAGnE,OAAO;EACL,GAAG;EACH;EACA,KAAK,MAAM,QAAQ,MAAM,OAAO,GAAG;EACnC,GAAI,OAAO,OAAO,aAAa,WAC3B,EACE,UAAU,MAAM,QAAQ,MAAM,OAAO,QAAQ,EAC/C,IACA,CAAC;CACP;AACF"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@stillwind/config",
3
- "version": "0.1.0-rc.0",
3
+ "version": "0.3.0",
4
4
  "description": "Shared configuration for Stillwind builds and analysis",
5
- "homepage": "https://stillwind.dev/",
5
+ "homepage": "https://stillwind.dev",
6
6
  "bugs": {
7
7
  "url": "https://github.com/SegaraRai/stillwind/issues"
8
8
  },
@@ -35,16 +35,18 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "@stillwind/native": "0.1.0-rc.0",
39
- "@stillwind/projection": "0.1.0-rc.0",
38
+ "@stillwind/native": "0.3.0",
39
+ "@stillwind/projection": "0.3.0",
40
40
  "jiti": "^2.7.0",
41
+ "minimatch": "^11.0.3",
41
42
  "pathe": "^2.0.3",
42
- "rolldown": "^1.2.15",
43
+ "rolldown": "^1.2.16",
44
+ "tinyglobby": "^0.2.17",
43
45
  "valibot": "^1.5.0"
44
46
  },
45
47
  "devDependencies": {
46
48
  "@stillwind-internal/tools-workspace": "0.0.0",
47
- "@types/node": "^26.6.5",
49
+ "@types/node": "^26.6.6",
48
50
  "tailwindcss": "4.3.3",
49
51
  "typescript": "^6.0.3",
50
52
  "vite-plus": "1.4.0"