@stillwind/config 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,101 @@
1
+ # @stillwind/config
2
+
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Enumerate the target files of a project with `listProjectFiles` from `@stillwind/config/node`. `resolveIntegrationConfig` now also returns the `scope` of the selected project, which holds its root and its `files` and `exclude` globs.
8
+
9
+ - Generated utility class names now stay the same when an edit elsewhere in the module moves the `style()` call. A class name also no longer changes when only the generated name of an imported ref or container changes.
10
+
11
+ The `utilityClass` and `viewTransitionSlot` naming callbacks now receive `path` and `ordinal` instead of `call`. `path` lists the names of the declarations that enclose the `style()` call, from the outermost to the innermost, and `ordinal` counts the earlier calls of the module with the same path.
12
+
13
+ - Generated names of refs, anchors, containers, keyframes, and view transitions now stay the same when an edit elsewhere in the module moves the declaration. Type facts of consumers also stay the same, so such an edit in a dependency no longer changes the types that its consumers see.
14
+
15
+ Naming callbacks for these names now receive `path` and `ordinal` instead of `start` and `end`. `path` lists the names of the declarations that enclose the declaration, from the outermost to the innermost. `ordinal` counts the earlier declarations of the module with the same kind, path, and binding name. Composition identities and asset identities in compilation results carry `path` and `ordinal` instead of byte offsets.
16
+
17
+ ### Patch Changes
18
+
19
+ - Each published npm package and the VS Code extension now include `CHANGELOG.md`, so you can read the release notes of the installed version in `node_modules` or on the extension page.
20
+
21
+ - Updated dependencies:
22
+ - @stillwind/native@0.9.0
23
+ - @stillwind/projection@0.9.0
24
+
25
+ ## 0.8.0
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies:
30
+ - @stillwind/native@0.8.0
31
+ - @stillwind/projection@0.8.0
32
+
33
+ ## 0.7.0
34
+
35
+ ### Patch Changes
36
+
37
+ - The npm package page now shows that each package includes TypeScript declarations. Packages without a root JavaScript entry declare an empty root module, so TypeScript setups that ignore `exports` report a missing export instead of resolving unrelated types.
38
+
39
+ - Updated dependencies:
40
+ - @stillwind/native@0.7.0
41
+ - @stillwind/projection@0.7.0
42
+
43
+ ## 0.6.0
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies:
48
+ - @stillwind/native@0.6.0
49
+ - @stillwind/projection@0.6.0
50
+
51
+ ## 0.5.0
52
+
53
+ ### Patch Changes
54
+
55
+ - Updated dependencies:
56
+ - @stillwind/native@0.5.0
57
+ - @stillwind/projection@0.5.0
58
+
59
+ ## 0.4.1
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies:
64
+ - @stillwind/native@0.4.1
65
+ - @stillwind/projection@0.4.1
66
+
67
+ ## 0.4.0
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies:
72
+ - @stillwind/native@0.4.0
73
+ - @stillwind/projection@0.4.0
74
+
75
+ ## 0.3.0
76
+
77
+ ### Patch Changes
78
+
79
+ - Updated dependencies:
80
+ - @stillwind/native@0.3.0
81
+ - @stillwind/projection@0.3.0
82
+
83
+ ## 0.2.0
84
+
85
+ ### Minor Changes
86
+
87
+ - Reference configuration files, directories, and globs from `projects`, so each package in a monorepo can keep its own `stillwind.config.ts`.
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies:
92
+ - @stillwind/native@0.2.0
93
+ - @stillwind/projection@0.2.0
94
+
95
+ ## 0.1.0
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies:
100
+ - @stillwind/native@0.1.0
101
+ - @stillwind/projection@0.1.0
package/dist/browser.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as AnalysisProjectConfig, i as documentConfiguration, t as InlineConfig } from "./resolution-CFQmPWSU.js";
1
+ import { a as AnalysisProjectConfig, i as documentConfiguration, t as InlineConfig } from "./resolution-BBHe-RRW.js";
2
2
  /**
3
3
  * Reports the configuration file that failed to load, keeping the message of the original failure.
4
4
  */
package/dist/browser.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as expandProjects, c as selectProject, i as documentConfiguration, l as validateInlineConfig, n as configurationCandidates, o as resolveCompilerSettings, p as resolveConfig, s as resolveProjectPaths, t as compilerConfig } from "./resolution-C-sm0Ex1.js";
1
+ import { a as expandProjects, c as selectProject, i as documentConfiguration, l as validateInlineConfig, n as configurationCandidates, o as resolveCompilerSettings, p as resolveConfig, s as resolveProjectPaths, t as compilerConfig } from "./resolution-DfduNZJr.js";
2
2
  import { minimatch } from "minimatch";
3
3
  import * as paths from "pathe";
4
4
  import { dirname, relative, resolve } from "pathe";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as lintRules, A as definePlugin, B as LintScope, C as UtilitySortOptions, D as PluginDirectoryEntry, E as PluginContext, F as ImportantOptions, G as RestrictedDeclarationsOptions, H as LogicalPropertiesOptions, I as LengthUnitsOptions, J as VariantDirectiveOptions, K as RestrictedThemeTokensOptions, L as LintConfig, M as CanonicalUtilitiesOptions, N as ConflictingUtilitiesOptions, O as PluginWatchKind, P as DefinitionScope, Q as LintRule, R as LintPreset, S as TailwindConfig, T as validateCompilerConfig, U as MarkerUseOptions, V as LintSeverity, W as ResolvedLintRules, X as resolveLintConfig, Y as mergeLintConfig, Z as LintCategory, _ as validateConfig, a as AnalysisProjectConfig, b as BuildOptions, c as ProjectionProvider, d as StillwindConfig, f as StillwindConfigExport, g as resolveConfig, h as defineConfig, j as ArbitrarySpacingOptions, k as StillwindPlugin, l as SourceProvider, m as captureProjectConfig, n as SerializableInlineConfig, o as CapturedProjectConfig, p as StillwindConfigFactory, q as RestrictedUtilitiesOptions, r as configurationFiles, s as PreviewOptions, t as InlineConfig, u as SourceProviderContext, v as BaseConfig, w as normalizeCompilerConfig, x as NormalizedCompilerConfig, y as BuildConfig, z as LintRules } from "./resolution-CFQmPWSU.js";
1
+ import { $ as lintRules, A as definePlugin, B as LintScope, C as UtilitySortOptions, D as PluginDirectoryEntry, E as PluginContext, F as ImportantOptions, G as RestrictedDeclarationsOptions, H as LogicalPropertiesOptions, I as LengthUnitsOptions, J as VariantDirectiveOptions, K as RestrictedThemeTokensOptions, L as LintConfig, M as CanonicalUtilitiesOptions, N as ConflictingUtilitiesOptions, O as PluginWatchKind, P as DefinitionScope, Q as LintRule, R as LintPreset, S as TailwindConfig, T as validateCompilerConfig, U as MarkerUseOptions, V as LintSeverity, W as ResolvedLintRules, X as resolveLintConfig, Y as mergeLintConfig, Z as LintCategory, _ as validateConfig, a as AnalysisProjectConfig, b as BuildOptions, c as ProjectionProvider, d as StillwindConfig, f as StillwindConfigExport, g as resolveConfig, h as defineConfig, j as ArbitrarySpacingOptions, k as StillwindPlugin, l as SourceProvider, m as captureProjectConfig, n as SerializableInlineConfig, o as CapturedProjectConfig, p as StillwindConfigFactory, q as RestrictedUtilitiesOptions, r as configurationFiles, s as PreviewOptions, t as InlineConfig, u as SourceProviderContext, v as BaseConfig, w as normalizeCompilerConfig, x as NormalizedCompilerConfig, y as BuildConfig, z as LintRules } from "./resolution-BBHe-RRW.js";
2
2
  /**
3
3
  * Built-in lint policies for ordered preset composition. Treat their shared objects as readonly.
4
4
  * Recommended supplies the omitted-lint default. Strict denies every recommended rule and adds
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as mergeLintConfig, b as lintPresets, d as captureProjectConfig, f as defineConfig, g as validateCompilerConfig, h as normalizeCompilerConfig, m as validateConfig, p as resolveConfig, r as configurationFiles, u as mergeConfig, v as resolveLintConfig, y as lintRules } from "./resolution-C-sm0Ex1.js";
1
+ import { _ as mergeLintConfig, b as lintPresets, d as captureProjectConfig, f as defineConfig, g as validateCompilerConfig, h as normalizeCompilerConfig, m as validateConfig, p as resolveConfig, r as configurationFiles, u as mergeConfig, v as resolveLintConfig, y as lintRules } from "./resolution-DfduNZJr.js";
2
2
  // src/plugins.ts
3
3
  /**
4
4
  * Returns `plugin` unchanged with its type checked, for use in a configuration file.
package/dist/node.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as AnalysisProjectConfig, t as InlineConfig, v as BaseConfig, x as NormalizedCompilerConfig } from "./resolution-CFQmPWSU.js";
1
+ import { a as AnalysisProjectConfig, t as InlineConfig, v as BaseConfig, x as NormalizedCompilerConfig } from "./resolution-BBHe-RRW.js";
2
2
  /**
3
3
  * Evaluated settings and files that consumers must watch when retaining a compiler session.
4
4
  */
@@ -36,7 +36,27 @@ export interface ResolvedIntegrationConfig {
36
36
  dependencies: string[];
37
37
  /** Absolute missing candidate paths before the selected file, nearest directory first. Watch their creation. */
38
38
  missing: string[];
39
+ /** Target globs of the selected project. Undefined when no configuration file selects a project. */
40
+ scope?: ProjectScope;
39
41
  }
42
+ /** Target globs of one project, which {@link listProjectFiles} enumerates. */
43
+ export interface ProjectScope {
44
+ /** Absolute project directory that the globs are relative to. */
45
+ root: string;
46
+ /** Nonempty include globs from the project's `files` setting. */
47
+ files: readonly string[];
48
+ /** Globs from the project's `exclude` setting. */
49
+ exclude: readonly string[];
50
+ }
51
+ /**
52
+ * Lists the existing files that a project's target globs select.
53
+ *
54
+ * @param scope - Target globs and the directory that they are relative to.
55
+ * @returns Absolute paths with forward slashes, including dot files. Paths below `node_modules`
56
+ * and `.git` and paths that `exclude` matches are omitted. The order is unspecified.
57
+ * @throws If filesystem enumeration fails.
58
+ */
59
+ export declare function listProjectFiles(scope: ProjectScope): Promise<string[]>;
40
60
  /**
41
61
  * Finds the nearest supported stillwind.config.* file at or above an application directory.
42
62
  *
package/dist/node.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as expandProjects, c as selectProject, i as documentConfiguration, l as validateInlineConfig, n as configurationCandidates$1, o as resolveCompilerSettings, p as resolveConfig, s as resolveProjectPaths, t as compilerConfig } from "./resolution-C-sm0Ex1.js";
1
+ import { a as expandProjects, c as selectProject, i as documentConfiguration, l as validateInlineConfig, n as configurationCandidates$1, o as resolveCompilerSettings, p as resolveConfig, s as resolveProjectPaths, t as compilerConfig } from "./resolution-DfduNZJr.js";
2
2
  import { isBuiltin } from "node:module";
3
3
  import { existsSync, statSync } from "node:fs";
4
4
  import { readFile } from "node:fs/promises";
@@ -11,10 +11,32 @@ import { glob } from "tinyglobby";
11
11
  /**
12
12
  * Node configuration discovery, evaluation, and project selection. `loadConfiguration` opens an
13
13
  * explicit file. `resolveIntegrationConfig` also discovers files and applies build overrides.
14
+ * `listProjectFiles` enumerates the target files of a project.
14
15
  * `evaluateModule` bundles and evaluates other local modules, such as plugin files. Consumers
15
16
  * retaining compiler state use the returned dependency paths for change tracking.
16
17
  */
17
18
  /**
19
+ * Lists the existing files that a project's target globs select.
20
+ *
21
+ * @param scope - Target globs and the directory that they are relative to.
22
+ * @returns Absolute paths with forward slashes, including dot files. Paths below `node_modules`
23
+ * and `.git` and paths that `exclude` matches are omitted. The order is unspecified.
24
+ * @throws If filesystem enumeration fails.
25
+ */
26
+ function listProjectFiles(scope) {
27
+ return glob([...scope.files], {
28
+ cwd: scope.root,
29
+ absolute: true,
30
+ onlyFiles: true,
31
+ dot: true,
32
+ ignore: [
33
+ "**/node_modules/**",
34
+ "**/.git/**",
35
+ ...scope.exclude
36
+ ]
37
+ });
38
+ }
39
+ /**
18
40
  * Finds the nearest supported stillwind.config.* file at or above an application directory.
19
41
  *
20
42
  * @param directory - Directory to start from. Relative paths use the process working directory.
@@ -248,7 +270,12 @@ async function resolveIntegrationConfig(inline, applicationRoot, defaults = {})
248
270
  }, inline, applicationRoot, path),
249
271
  configFile: file,
250
272
  dependencies: loaded?.dependencies ?? [],
251
- missing
273
+ missing,
274
+ scope: selected && {
275
+ root: selected.root,
276
+ files: selected.files,
277
+ exclude: selected.exclude ?? []
278
+ }
252
279
  };
253
280
  }
254
281
  /**
@@ -261,6 +288,6 @@ async function resolveIntegrationConfig(inline, applicationRoot, defaults = {})
261
288
  function configurationCandidates(directory) {
262
289
  return configurationCandidates$1(directory, path);
263
290
  }
264
- export { evaluateModule, findConfiguration, findDocumentConfiguration, loadConfiguration, resolveIntegrationConfig, resolveProjectConfig };
291
+ export { evaluateModule, findConfiguration, findDocumentConfiguration, listProjectFiles, loadConfiguration, resolveIntegrationConfig, resolveProjectConfig };
265
292
 
266
293
  //# sourceMappingURL=node.js.map
package/dist/node.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"node.js","names":["candidates"],"sources":["../src/node.ts"],"sourcesContent":["/**\n * Node configuration discovery, evaluation, and project selection. `loadConfiguration` opens an\n * explicit file. `resolveIntegrationConfig` also discovers files and applies build overrides.\n * `evaluateModule` bundles and evaluates other local modules, such as plugin files. Consumers\n * retaining compiler state use the returned dependency paths for change tracking.\n */\n\nimport { existsSync, statSync } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport { isBuiltin } from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\n\nimport { createJiti } from \"jiti\";\nimport { rolldown } from \"rolldown\";\nimport { glob } from \"tinyglobby\";\n\nimport type { BaseConfig, NormalizedCompilerConfig } from \"./compiler.ts\";\nimport { resolveConfig, type AnalysisProjectConfig } from \"./configuration.ts\";\nimport {\n configurationCandidates as candidates,\n compilerConfig,\n documentConfiguration,\n expandProjects,\n resolveCompilerSettings,\n resolveProjectPaths,\n selectProject,\n validateInlineConfig,\n type InlineConfig,\n} from \"./resolution.ts\";\n\n/**\n * Evaluated settings and files that consumers must watch when retaining a compiler session.\n */\nexport interface LoadedConfiguration {\n /** Validated settings after awaiting the module export and invoking its factory, if supplied. */\n config: {\n /**\n * Projects in authored order with references replaced. Referenced projects have an absolute\n * root. Other projects keep their authored paths.\n */\n projects: AnalysisProjectConfig[];\n };\n /** Absolute path of the evaluated configuration file. */\n configFile: string;\n /**\n * Distinct absolute paths of the configuration, referenced configurations, bundled local imports,\n * and resolved external imports. A file that a glob reference would newly match is not included.\n */\n dependencies: string[];\n}\n\n/**\n * Settings for one build integration after project selection and inline overrides.\n */\nexport interface ResolvedIntegrationConfig {\n /** Selected compiler settings after inline overrides and defaults. Filesystem paths are absolute. */\n config: NormalizedCompilerConfig & {\n /** Absolute selected project directory after applying inline overrides. */\n root: string;\n /** Absolute design-system stylesheet path, without an existence check. */\n css: string;\n };\n /** Absolute evaluated configuration path, or undefined when no file was loaded. */\n configFile?: string;\n /** Existing configuration dependency paths to watch. Empty when settings are entirely inline. */\n dependencies: string[];\n /** Absolute missing candidate paths before the selected file, nearest directory first. Watch their creation. */\n missing: string[];\n}\n\n/**\n * Finds the nearest supported stillwind.config.* file at or above an application directory.\n *\n * @param directory - Directory to start from. Relative paths use the process working directory.\n * @returns The first existing candidate's absolute path, or undefined if none exists.\n */\nexport function findConfiguration(directory: string): string | undefined {\n return candidates(directory, path).find((file) => existsSync(file));\n}\n\n/**\n * Finds the nearest configuration of a document in a workspace folder, without evaluating it.\n *\n * @param file - Absolute document path.\n * @param folders - Absolute workspace folders.\n * @returns The configuration path, or undefined when the document lies outside the folders or in\n * `node_modules`, or the folder has no configuration at or above the document.\n */\nexport function findDocumentConfiguration(\n file: string,\n folders: readonly string[],\n): string | undefined {\n return documentConfiguration(file, folders, existsSync, path);\n}\n\n/**\n * An evaluated module and the files that its evaluation read.\n */\nexport interface EvaluatedModule {\n /** Default export, or the module value when it has no default export. */\n exported: unknown;\n /** Distinct absolute paths of the entry, bundled local imports, and resolved external imports. */\n dependencies: string[];\n /** Text of each bundled local file, keyed by absolute path, as the bundler read it. */\n sources: Map<string, string>;\n}\n\n/**\n * Bundles local imports of a module in memory and evaluates the bundle without module\n * caches. Local sources are read again on each call, so a changed local import takes\n * effect. External packages use runtime module loading, and Node keeps them cached. The\n * module runs as trusted Node code and can perform side effects. Evaluation is\n * available before a framework generates its TypeScript configuration.\n *\n * `import.meta.url`, `import.meta.filename`, `import.meta.dirname`, `__filename`, and\n * `__dirname` describe the original source file of each bundled module.\n *\n * @param file - JS, TS, or JSON module path. Relative paths use the process working\n * directory.\n * @returns The export and the file paths observed while resolving and bundling imports.\n * Runtime file reads and imports that cannot be statically resolved are not added to\n * dependencies.\n * @throws If a package cannot be resolved, or bundling or module evaluation fails.\n */\nexport async function evaluateModule(file: string): Promise<EvaluatedModule> {\n file = path.resolve(file);\n\n const dependencies = new Set([file]);\n const sources = new Map<string, string>();\n const bundle = await rolldown({\n input: file,\n cwd: path.dirname(file),\n logLevel: \"silent\",\n platform: \"node\",\n treeshake: false,\n tsconfig: false,\n transform: {\n target: \"node22\",\n define: {\n \"import.meta.url\": \"__stillwind_module_url\",\n \"import.meta.filename\": \"__stillwind_module_filename\",\n \"import.meta.dirname\": \"__stillwind_module_dirname\",\n __filename: \"__stillwind_module_filename\",\n __dirname: \"__stillwind_module_dirname\",\n },\n },\n plugins: [\n {\n name: \"stillwind-module\",\n /**\n * Resolves external packages from their importer and records their paths for watching.\n *\n * @param id - Import request before resolution.\n * @param importer - Importing file, or undefined for the entry.\n * @param options - Import kind used to select package export conditions.\n * @returns An external module URL or require path, or undefined for bundled local sources.\n * @throws If a package cannot be resolved.\n */\n async resolveId(id, importer, options) {\n if (!importer || id.startsWith(\".\") || path.isAbsolute(id)) {\n return;\n }\n if (isBuiltin(id)) {\n return {\n id,\n external: true,\n };\n }\n const resolved = await this.resolve(id, importer, {\n skipSelf: true,\n kind: options.kind,\n });\n if (!resolved) {\n throw new Error(`Cannot resolve import ${id} from ${importer}`);\n }\n dependencies.add(resolved.id);\n return {\n id: options.kind === \"require-call\" ? resolved.id : pathToFileURL(resolved.id).href,\n external: \"absolute\",\n };\n },\n /**\n * Reads a bundled local file and records its text.\n *\n * @param id - Absolute path of a local file, or a virtual module ID.\n * @returns The file's text, or undefined for a virtual module.\n */\n async load(id) {\n if (id.startsWith(\"\\0\")) {\n return;\n }\n const code = await readFile(id, \"utf8\");\n sources.set(id, code);\n return code;\n },\n transform: {\n filter: {\n id: /\\.[cm]?[jt]sx?$/,\n },\n /**\n * Keeps file location expressions relative to each original source.\n *\n * @param code - Local module source.\n * @param id - Absolute source path.\n * @returns Source with its file location constants before ordinary syntax lowering.\n */\n handler(code, id) {\n return `const __stillwind_module_url = ${JSON.stringify(pathToFileURL(id).href)};\nconst __stillwind_module_filename = ${JSON.stringify(id)};\nconst __stillwind_module_dirname = ${JSON.stringify(path.dirname(id))};\n${code}`;\n },\n },\n },\n ],\n });\n\n let code: string;\n try {\n const result = await bundle.generate({\n format: \"esm\",\n codeSplitting: false,\n });\n const entry = result.output.find((output) => output.type === \"chunk\" && output.isEntry);\n if (entry?.type !== \"chunk\") {\n throw new Error(`Module bundle has no entry: ${file}`);\n }\n for (const id of entry.moduleIds) {\n if (!id.startsWith(\"\\0\")) {\n dependencies.add(id);\n }\n }\n code = entry.code;\n } finally {\n await bundle.close();\n }\n\n const jiti = createJiti(pathToFileURL(file).href, {\n fsCache: false,\n moduleCache: false,\n });\n const value = await jiti.evalModule(code, {\n filename: file.replaceAll(\"\\\\\", \"/\"),\n async: true,\n forceTranspile: true,\n });\n return {\n exported:\n value !== null && typeof value === \"object\" && \"default\" in value ? value.default : value,\n dependencies: [...dependencies],\n sources,\n };\n}\n\n/**\n * Evaluates a configuration module with {@link evaluateModule}, validates its settings, and\n * evaluates the configuration files that it references. Configuration runs as trusted Node code\n * and can perform side effects.\n *\n * @param file - JS, TS, or JSON configuration path. Relative paths use the process working directory.\n * @returns Evaluated settings and the file paths observed while resolving and bundling imports.\n * Runtime file reads and imports that cannot be statically resolved are not added to dependencies.\n * @throws If bundling, module evaluation, factory execution, configuration validation, or reference\n * expansion fails.\n */\nexport async function loadConfiguration(file: string): Promise<LoadedConfiguration> {\n file = path.resolve(file);\n\n const dependencies = new Set<string>();\n /**\n * Evaluates one configuration file and records the files that its evaluation read.\n *\n * @param id - Absolute configuration path.\n * @returns Validated settings.\n * @throws If module evaluation or configuration validation fails.\n */\n const load = async (id: string) => {\n const evaluated = await evaluateModule(id);\n for (const dependency of evaluated.dependencies) {\n dependencies.add(dependency);\n }\n return resolveConfig(evaluated.exported);\n };\n\n const projects = await expandProjects(\n await load(file),\n file,\n {\n isFile: (id) => statSync(id, { throwIfNoEntry: false })?.isFile() ?? false,\n glob: async (patterns, ignore, directory) =>\n (\n await glob(patterns, {\n cwd: directory,\n absolute: true,\n expandDirectories: false,\n ignore,\n })\n ).map((match) => path.resolve(match)),\n load,\n },\n path,\n );\n return {\n config: {\n projects,\n },\n configFile: file,\n dependencies: [...dependencies],\n };\n}\n\n/**\n * Resolves project paths and removes analysis scope and provider settings.\n *\n * @param project - Evaluated project configuration with paths relative to its root.\n * @param directory - Base directory for a relative project root, normally the configuration directory.\n * @returns Compiler settings with absolute root, CSS, and tsconfig paths. The supplied project is not modified.\n * A false or omitted tsconfig setting is preserved.\n * @throws If compiler normalization fails or the project does not supply a valid CSS path.\n */\nexport function resolveProjectConfig(\n project: AnalysisProjectConfig,\n directory: string,\n): NormalizedCompilerConfig & {\n /** Absolute root resolved against directory. */\n root: string;\n /** Absolute CSS entrypoint resolved against the project's root. */\n css: string;\n} {\n const resolved = resolveProjectPaths(project, directory, path);\n return resolveCompilerSettings(compilerConfig(resolved), {}, resolved.root, path);\n}\n\n/**\n * Loads build settings and merges inline overrides into one selected project's compiler settings.\n * Without an explicit name, selection uses the sole project or the unique deepest root containing\n * the application directory after its inline root override. Arrays are replaced during merging.\n *\n * @param inline - File selection, optional project name, and compiler overrides. An inline root\n * uses applicationRoot. A configured root uses the configuration file's directory.\n * @param applicationRoot - Build directory used for discovery and relative inline paths.\n * Relative paths use the process working directory.\n * @param defaults - Browser targets used when the selected project and inline settings omit target.\n * @returns Validated compiler settings with an absolute root and paths to watch. When discovery\n * finds no file, inline settings must supply a CSS entrypoint.\n * @throws If an explicit file is missing, project selection is ambiguous or unsuccessful,\n * configuration evaluation fails, or merged compiler settings are invalid.\n */\nexport async function resolveIntegrationConfig(\n inline: InlineConfig,\n applicationRoot: string,\n defaults: Pick<BaseConfig, \"target\"> = {},\n): Promise<ResolvedIntegrationConfig> {\n applicationRoot = path.resolve(applicationRoot);\n\n validateInlineConfig(inline);\n const requested = inline.configFile;\n const candidates =\n requested === false\n ? []\n : requested\n ? [path.resolve(applicationRoot, requested)]\n : configurationCandidates(applicationRoot);\n const file = candidates.find((candidate) => existsSync(candidate));\n const missing = candidates.slice(0, file ? candidates.indexOf(file) : candidates.length);\n if (requested && !file) {\n throw new Error(`Cannot find Stillwind configuration: ${candidates[0]}`);\n }\n\n const loaded = file ? await loadConfiguration(file) : undefined;\n const projects = loaded?.config.projects.map((project) =>\n resolveProjectPaths(project, path.dirname(file!), path),\n );\n if (!projects && inline.project !== undefined) {\n throw new Error(\"Cannot select a Stillwind project without a configuration file\");\n }\n\n const selected = projects ? selectProject(projects, applicationRoot, inline, path) : undefined;\n const base = selected\n ? compilerConfig(selected)\n : {\n root: applicationRoot,\n lint: inline.lint,\n };\n const config = resolveCompilerSettings(\n { ...base, target: base.target ?? defaults.target },\n inline,\n applicationRoot,\n path,\n );\n\n return {\n config,\n configFile: file,\n dependencies: loaded?.dependencies ?? [],\n missing,\n };\n}\n\n/**\n * Enumerates Node configuration candidates without checking existence.\n *\n * @param directory - Starting directory. Relative paths use the process working directory.\n * @returns Absolute paths ordered from the nearest directory to the filesystem root, with\n * configurationFiles precedence within each directory.\n */\nfunction configurationCandidates(directory: string): string[] {\n return candidates(directory, path);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6EA,SAAgB,kBAAkB,WAAuC;CACvE,OAAOA,0BAAW,WAAW,IAAI,CAAC,CAAC,MAAM,SAAS,WAAW,IAAI,CAAC;AACpE;;;;;;;;;AAUA,SAAgB,0BACd,MACA,SACoB;CACpB,OAAO,sBAAsB,MAAM,SAAS,YAAY,IAAI;AAC9D;;;;;;;;;;;;;;;;;;AA+BA,eAAsB,eAAe,MAAwC;CAC3E,OAAO,KAAK,QAAQ,IAAI;CAExB,MAAM,+BAAe,IAAI,IAAI,CAAC,IAAI,CAAC;CACnC,MAAM,0BAAU,IAAI,IAAoB;CACxC,MAAM,SAAS,MAAM,SAAS;EAC5B,OAAO;EACP,KAAK,KAAK,QAAQ,IAAI;EACtB,UAAU;EACV,UAAU;EACV,WAAW;EACX,UAAU;EACV,WAAW;GACT,QAAQ;GACR,QAAQ;IACN,m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AG,CAAC,GAAG,SAAS,MAAM,IAAI;AAClF;;;;;;;;;;;;;;;;AAiBA,eAAsB,yBACpB,QACA,iBACA,WAAuC,CAAC,GACJ;CACpC,kBAAkB,KAAK,QAAQ,eAAe;CAE9C,qBAAqB,MAAM;CAC3B,MAAM,YAAY,OAAO;CACzB,MAAM,aACJ,cAAc,QACV,CAAC,IACD,YACE,CAAC,KAAK,QAAQ,iBAAiB,SAAS,CAAC,IACzC,wBAAwB,eAAe;CAC/C,MAAM,OAAO,WAAW,MAAM,cAAc,WAAW,SAAS,CAAC;CACjE,MAAM,UAAU,WAAW,MAAM,GAAG,OAAO,WAAW,QAAQ,IAAI,IAAI,WAAW,MAAM;CACvF,IAAI,aAAa,CAAC,MAChB,MAAM,IAAI,MAAM,wCAAwC,WAAW,IAAI;CAGzE,MAAM,SAAS,OAAO,MAAM,kBAAkB,IAAI,IAAI,KAAA;CACtD,MAAM,WAAW,QAAQ,OAAO,SAAS,KAAK,YAC5C,oBAAoB,SAAS,KAAK,QAAQ,IAAK,GAAG,IAAI,CACxD;CACA,IAAI,CAAC,YAAY,OAAO,YAAY,KAAA,GAClC,MAAM,IAAI,MAAM,gEAAgE;CAGlF,MAAM,WAAW,WAAW,cAAc,UAAU,iBAAiB,QAAQ,IAAI,IAAI,KAAA;CACrF,MAAM,OAAO,WACT,eAAe,QAAQ,IACvB;EACE,MAAM;EACN,MAAM,OAAO;CACf;CAQJ,OAAO;EACL,QARa,wBACb;GAAE,GAAG;GAAM,QAAQ,KAAK,UAAU,SAAS;EAAO,GAClD,QACA,iBACA,IAIK;EACL,YAAY;EACZ,cAAc,QAAQ,gBAAgB,CAAC;EACvC;CACF;AACF;;;;;;;;AASA,SAAS,wBAAwB,WAA6B;CAC5D,OAAOA,0BAAW,WAAW,IAAI;AACnC"}
1
+ {"version":3,"file":"node.js","names":["candidates"],"sources":["../src/node.ts"],"sourcesContent":["/**\n * Node configuration discovery, evaluation, and project selection. `loadConfiguration` opens an\n * explicit file. `resolveIntegrationConfig` also discovers files and applies build overrides.\n * `listProjectFiles` enumerates the target files of a project.\n * `evaluateModule` bundles and evaluates other local modules, such as plugin files. Consumers\n * retaining compiler state use the returned dependency paths for change tracking.\n */\n\nimport { existsSync, statSync } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport { isBuiltin } from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\n\nimport { createJiti } from \"jiti\";\nimport { rolldown } from \"rolldown\";\nimport { glob } from \"tinyglobby\";\n\nimport type { BaseConfig, NormalizedCompilerConfig } from \"./compiler.ts\";\nimport { resolveConfig, type AnalysisProjectConfig } from \"./configuration.ts\";\nimport {\n configurationCandidates as candidates,\n compilerConfig,\n documentConfiguration,\n expandProjects,\n resolveCompilerSettings,\n resolveProjectPaths,\n selectProject,\n validateInlineConfig,\n type InlineConfig,\n} from \"./resolution.ts\";\n\n/**\n * Evaluated settings and files that consumers must watch when retaining a compiler session.\n */\nexport interface LoadedConfiguration {\n /** Validated settings after awaiting the module export and invoking its factory, if supplied. */\n config: {\n /**\n * Projects in authored order with references replaced. Referenced projects have an absolute\n * root. Other projects keep their authored paths.\n */\n projects: AnalysisProjectConfig[];\n };\n /** Absolute path of the evaluated configuration file. */\n configFile: string;\n /**\n * Distinct absolute paths of the configuration, referenced configurations, bundled local imports,\n * and resolved external imports. A file that a glob reference would newly match is not included.\n */\n dependencies: string[];\n}\n\n/**\n * Settings for one build integration after project selection and inline overrides.\n */\nexport interface ResolvedIntegrationConfig {\n /** Selected compiler settings after inline overrides and defaults. Filesystem paths are absolute. */\n config: NormalizedCompilerConfig & {\n /** Absolute selected project directory after applying inline overrides. */\n root: string;\n /** Absolute design-system stylesheet path, without an existence check. */\n css: string;\n };\n /** Absolute evaluated configuration path, or undefined when no file was loaded. */\n configFile?: string;\n /** Existing configuration dependency paths to watch. Empty when settings are entirely inline. */\n dependencies: string[];\n /** Absolute missing candidate paths before the selected file, nearest directory first. Watch their creation. */\n missing: string[];\n /** Target globs of the selected project. Undefined when no configuration file selects a project. */\n scope?: ProjectScope;\n}\n\n/** Target globs of one project, which {@link listProjectFiles} enumerates. */\nexport interface ProjectScope {\n /** Absolute project directory that the globs are relative to. */\n root: string;\n /** Nonempty include globs from the project's `files` setting. */\n files: readonly string[];\n /** Globs from the project's `exclude` setting. */\n exclude: readonly string[];\n}\n\n/**\n * Lists the existing files that a project's target globs select.\n *\n * @param scope - Target globs and the directory that they are relative to.\n * @returns Absolute paths with forward slashes, including dot files. Paths below `node_modules`\n * and `.git` and paths that `exclude` matches are omitted. The order is unspecified.\n * @throws If filesystem enumeration fails.\n */\nexport function listProjectFiles(scope: ProjectScope): Promise<string[]> {\n return glob([...scope.files], {\n cwd: scope.root,\n absolute: true,\n onlyFiles: true,\n dot: true,\n ignore: [\"**/node_modules/**\", \"**/.git/**\", ...scope.exclude],\n });\n}\n\n/**\n * Finds the nearest supported stillwind.config.* file at or above an application directory.\n *\n * @param directory - Directory to start from. Relative paths use the process working directory.\n * @returns The first existing candidate's absolute path, or undefined if none exists.\n */\nexport function findConfiguration(directory: string): string | undefined {\n return candidates(directory, path).find((file) => existsSync(file));\n}\n\n/**\n * Finds the nearest configuration of a document in a workspace folder, without evaluating it.\n *\n * @param file - Absolute document path.\n * @param folders - Absolute workspace folders.\n * @returns The configuration path, or undefined when the document lies outside the folders or in\n * `node_modules`, or the folder has no configuration at or above the document.\n */\nexport function findDocumentConfiguration(\n file: string,\n folders: readonly string[],\n): string | undefined {\n return documentConfiguration(file, folders, existsSync, path);\n}\n\n/**\n * An evaluated module and the files that its evaluation read.\n */\nexport interface EvaluatedModule {\n /** Default export, or the module value when it has no default export. */\n exported: unknown;\n /** Distinct absolute paths of the entry, bundled local imports, and resolved external imports. */\n dependencies: string[];\n /** Text of each bundled local file, keyed by absolute path, as the bundler read it. */\n sources: Map<string, string>;\n}\n\n/**\n * Bundles local imports of a module in memory and evaluates the bundle without module\n * caches. Local sources are read again on each call, so a changed local import takes\n * effect. External packages use runtime module loading, and Node keeps them cached. The\n * module runs as trusted Node code and can perform side effects. Evaluation is\n * available before a framework generates its TypeScript configuration.\n *\n * `import.meta.url`, `import.meta.filename`, `import.meta.dirname`, `__filename`, and\n * `__dirname` describe the original source file of each bundled module.\n *\n * @param file - JS, TS, or JSON module path. Relative paths use the process working\n * directory.\n * @returns The export and the file paths observed while resolving and bundling imports.\n * Runtime file reads and imports that cannot be statically resolved are not added to\n * dependencies.\n * @throws If a package cannot be resolved, or bundling or module evaluation fails.\n */\nexport async function evaluateModule(file: string): Promise<EvaluatedModule> {\n file = path.resolve(file);\n\n const dependencies = new Set([file]);\n const sources = new Map<string, string>();\n const bundle = await rolldown({\n input: file,\n cwd: path.dirname(file),\n logLevel: \"silent\",\n platform: \"node\",\n treeshake: false,\n tsconfig: false,\n transform: {\n target: \"node22\",\n define: {\n \"import.meta.url\": \"__stillwind_module_url\",\n \"import.meta.filename\": \"__stillwind_module_filename\",\n \"import.meta.dirname\": \"__stillwind_module_dirname\",\n __filename: \"__stillwind_module_filename\",\n __dirname: \"__stillwind_module_dirname\",\n },\n },\n plugins: [\n {\n name: \"stillwind-module\",\n /**\n * Resolves external packages from their importer and records their paths for watching.\n *\n * @param id - Import request before resolution.\n * @param importer - Importing file, or undefined for the entry.\n * @param options - Import kind used to select package export conditions.\n * @returns An external module URL or require path, or undefined for bundled local sources.\n * @throws If a package cannot be resolved.\n */\n async resolveId(id, importer, options) {\n if (!importer || id.startsWith(\".\") || path.isAbsolute(id)) {\n return;\n }\n if (isBuiltin(id)) {\n return {\n id,\n external: true,\n };\n }\n const resolved = await this.resolve(id, importer, {\n skipSelf: true,\n kind: options.kind,\n });\n if (!resolved) {\n throw new Error(`Cannot resolve import ${id} from ${importer}`);\n }\n dependencies.add(resolved.id);\n return {\n id: options.kind === \"require-call\" ? resolved.id : pathToFileURL(resolved.id).href,\n external: \"absolute\",\n };\n },\n /**\n * Reads a bundled local file and records its text.\n *\n * @param id - Absolute path of a local file, or a virtual module ID.\n * @returns The file's text, or undefined for a virtual module.\n */\n async load(id) {\n if (id.startsWith(\"\\0\")) {\n return;\n }\n const code = await readFile(id, \"utf8\");\n sources.set(id, code);\n return code;\n },\n transform: {\n filter: {\n id: /\\.[cm]?[jt]sx?$/,\n },\n /**\n * Keeps file location expressions relative to each original source.\n *\n * @param code - Local module source.\n * @param id - Absolute source path.\n * @returns Source with its file location constants before ordinary syntax lowering.\n */\n handler(code, id) {\n return `const __stillwind_module_url = ${JSON.stringify(pathToFileURL(id).href)};\nconst __stillwind_module_filename = ${JSON.stringify(id)};\nconst __stillwind_module_dirname = ${JSON.stringify(path.dirname(id))};\n${code}`;\n },\n },\n },\n ],\n });\n\n let code: string;\n try {\n const result = await bundle.generate({\n format: \"esm\",\n codeSplitting: false,\n });\n const entry = result.output.find((output) => output.type === \"chunk\" && output.isEntry);\n if (entry?.type !== \"chunk\") {\n throw new Error(`Module bundle has no entry: ${file}`);\n }\n for (const id of entry.moduleIds) {\n if (!id.startsWith(\"\\0\")) {\n dependencies.add(id);\n }\n }\n code = entry.code;\n } finally {\n await bundle.close();\n }\n\n const jiti = createJiti(pathToFileURL(file).href, {\n fsCache: false,\n moduleCache: false,\n });\n const value = await jiti.evalModule(code, {\n filename: file.replaceAll(\"\\\\\", \"/\"),\n async: true,\n forceTranspile: true,\n });\n return {\n exported:\n value !== null && typeof value === \"object\" && \"default\" in value ? value.default : value,\n dependencies: [...dependencies],\n sources,\n };\n}\n\n/**\n * Evaluates a configuration module with {@link evaluateModule}, validates its settings, and\n * evaluates the configuration files that it references. Configuration runs as trusted Node code\n * and can perform side effects.\n *\n * @param file - JS, TS, or JSON configuration path. Relative paths use the process working directory.\n * @returns Evaluated settings and the file paths observed while resolving and bundling imports.\n * Runtime file reads and imports that cannot be statically resolved are not added to dependencies.\n * @throws If bundling, module evaluation, factory execution, configuration validation, or reference\n * expansion fails.\n */\nexport async function loadConfiguration(file: string): Promise<LoadedConfiguration> {\n file = path.resolve(file);\n\n const dependencies = new Set<string>();\n /**\n * Evaluates one configuration file and records the files that its evaluation read.\n *\n * @param id - Absolute configuration path.\n * @returns Validated settings.\n * @throws If module evaluation or configuration validation fails.\n */\n const load = async (id: string) => {\n const evaluated = await evaluateModule(id);\n for (const dependency of evaluated.dependencies) {\n dependencies.add(dependency);\n }\n return resolveConfig(evaluated.exported);\n };\n\n const projects = await expandProjects(\n await load(file),\n file,\n {\n isFile: (id) => statSync(id, { throwIfNoEntry: false })?.isFile() ?? false,\n glob: async (patterns, ignore, directory) =>\n (\n await glob(patterns, {\n cwd: directory,\n absolute: true,\n expandDirectories: false,\n ignore,\n })\n ).map((match) => path.resolve(match)),\n load,\n },\n path,\n );\n return {\n config: {\n projects,\n },\n configFile: file,\n dependencies: [...dependencies],\n };\n}\n\n/**\n * Resolves project paths and removes analysis scope and provider settings.\n *\n * @param project - Evaluated project configuration with paths relative to its root.\n * @param directory - Base directory for a relative project root, normally the configuration directory.\n * @returns Compiler settings with absolute root, CSS, and tsconfig paths. The supplied project is not modified.\n * A false or omitted tsconfig setting is preserved.\n * @throws If compiler normalization fails or the project does not supply a valid CSS path.\n */\nexport function resolveProjectConfig(\n project: AnalysisProjectConfig,\n directory: string,\n): NormalizedCompilerConfig & {\n /** Absolute root resolved against directory. */\n root: string;\n /** Absolute CSS entrypoint resolved against the project's root. */\n css: string;\n} {\n const resolved = resolveProjectPaths(project, directory, path);\n return resolveCompilerSettings(compilerConfig(resolved), {}, resolved.root, path);\n}\n\n/**\n * Loads build settings and merges inline overrides into one selected project's compiler settings.\n * Without an explicit name, selection uses the sole project or the unique deepest root containing\n * the application directory after its inline root override. Arrays are replaced during merging.\n *\n * @param inline - File selection, optional project name, and compiler overrides. An inline root\n * uses applicationRoot. A configured root uses the configuration file's directory.\n * @param applicationRoot - Build directory used for discovery and relative inline paths.\n * Relative paths use the process working directory.\n * @param defaults - Browser targets used when the selected project and inline settings omit target.\n * @returns Validated compiler settings with an absolute root and paths to watch. When discovery\n * finds no file, inline settings must supply a CSS entrypoint.\n * @throws If an explicit file is missing, project selection is ambiguous or unsuccessful,\n * configuration evaluation fails, or merged compiler settings are invalid.\n */\nexport async function resolveIntegrationConfig(\n inline: InlineConfig,\n applicationRoot: string,\n defaults: Pick<BaseConfig, \"target\"> = {},\n): Promise<ResolvedIntegrationConfig> {\n applicationRoot = path.resolve(applicationRoot);\n\n validateInlineConfig(inline);\n const requested = inline.configFile;\n const candidates =\n requested === false\n ? []\n : requested\n ? [path.resolve(applicationRoot, requested)]\n : configurationCandidates(applicationRoot);\n const file = candidates.find((candidate) => existsSync(candidate));\n const missing = candidates.slice(0, file ? candidates.indexOf(file) : candidates.length);\n if (requested && !file) {\n throw new Error(`Cannot find Stillwind configuration: ${candidates[0]}`);\n }\n\n const loaded = file ? await loadConfiguration(file) : undefined;\n const projects = loaded?.config.projects.map((project) =>\n resolveProjectPaths(project, path.dirname(file!), path),\n );\n if (!projects && inline.project !== undefined) {\n throw new Error(\"Cannot select a Stillwind project without a configuration file\");\n }\n\n const selected = projects ? selectProject(projects, applicationRoot, inline, path) : undefined;\n const base = selected\n ? compilerConfig(selected)\n : {\n root: applicationRoot,\n lint: inline.lint,\n };\n const config = resolveCompilerSettings(\n { ...base, target: base.target ?? defaults.target },\n inline,\n applicationRoot,\n path,\n );\n\n return {\n config,\n configFile: file,\n dependencies: loaded?.dependencies ?? [],\n missing,\n scope: selected && {\n root: selected.root,\n files: selected.files,\n exclude: selected.exclude ?? [],\n },\n };\n}\n\n/**\n * Enumerates Node configuration candidates without checking existence.\n *\n * @param directory - Starting directory. Relative paths use the process working directory.\n * @returns Absolute paths ordered from the nearest directory to the filesystem root, with\n * configurationFiles precedence within each directory.\n */\nfunction configurationCandidates(directory: string): string[] {\n return candidates(directory, path);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4FA,SAAgB,iBAAiB,OAAwC;CACvE,OAAO,KAAK,CAAC,GAAG,MAAM,KAAK,GAAG;EAC5B,KAAK,MAAM;EACX,UAAU;EACV,WAAW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AK,QAAQ,IAAK,GAAG,IAAI,CACxD;CACA,IAAI,CAAC,YAAY,OAAO,YAAY,KAAA,GAClC,MAAM,IAAI,MAAM,gEAAgE;CAGlF,MAAM,WAAW,WAAW,cAAc,UAAU,iBAAiB,QAAQ,IAAI,IAAI,KAAA;CACrF,MAAM,OAAO,WACT,eAAe,QAAQ,IACvB;EACE,MAAM;EACN,MAAM,OAAO;CACf;CAQJ,OAAO;EACL,QARa,wBACb;GAAE,GAAG;GAAM,QAAQ,KAAK,UAAU,SAAS;EAAO,GAClD,QACA,iBACA,IAIK;EACL,YAAY;EACZ,cAAc,QAAQ,gBAAgB,CAAC;EACvC;EACA,OAAO,YAAY;GACjB,MAAM,SAAS;GACf,OAAO,SAAS;GAChB,SAAS,SAAS,WAAW,CAAC;EAChC;CACF;AACF;;;;;;;;AASA,SAAS,wBAAwB,WAA6B;CAC5D,OAAOA,0BAAW,WAAW,IAAI;AACnC"}
@@ -871,9 +871,13 @@ interface PluginDirectoryEntry {
871
871
  * @returns The same object.
872
872
  */
873
873
  declare function definePlugin(plugin: StillwindPlugin): StillwindPlugin;
874
- /** Tailwind CSS configuration, with the keys of a file that Tailwind's `@config` loads. */
874
+ /**
875
+ * Tailwind CSS configuration, with the keys of a file that Tailwind's `@config` loads.
876
+ */
875
877
  type TailwindConfig = Config;
876
- /** Controls independent sorting targets in scripts and stylesheets. */
878
+ /**
879
+ * Controls independent sorting targets in scripts and stylesheets.
880
+ */
877
881
  type UtilitySortOptions = {
878
882
  /** Sorts utilities within each static string or template segment. Defaults to true. */
879
883
  stringLiterals?: boolean;
@@ -890,7 +894,9 @@ type UtilitySortOptions = {
890
894
  /** Orders adjacent applied CSS `@variant` blocks while preserving competing writes. Defaults to false. */
891
895
  variantBlocks?: boolean;
892
896
  };
893
- /** Controls document CSS delivery through build integrations. */
897
+ /**
898
+ * Controls document CSS delivery through build integrations.
899
+ */
894
900
  interface BuildOptions {
895
901
  /** Applies producer CSS to the document. Defaults to true. */
896
902
  automatic?: boolean;
@@ -1009,10 +1015,13 @@ interface BaseConfig {
1009
1015
  */
1010
1016
  rootFontSize?: number;
1011
1017
  }
1012
- /** Compiler and document CSS delivery settings shared by build adapters. */
1018
+ /**
1019
+ * Compiler and document CSS delivery settings shared by build adapters.
1020
+ */
1013
1021
  interface BuildConfig extends BaseConfig, BuildOptions {}
1014
1022
  /**
1015
1023
  * Validates compiler fields and lint policies without resolving paths or invoking naming callbacks.
1024
+ *
1016
1025
  * @param value - Compiler settings with no analysis or delivery fields. CSS is optional here.
1017
1026
  * @param location - Field path prepended to validation errors. Defaults to `config`.
1018
1027
  * @param partial - Whether incomplete overrides can defer namespace collisions and required lint
@@ -1020,7 +1029,9 @@ interface BuildConfig extends BaseConfig, BuildOptions {}
1020
1029
  * @throws If a field is unknown or invalid, namespaces collide, or lint presets or effective options are invalid.
1021
1030
  */
1022
1031
  declare function validateCompilerConfig(value: unknown, location?: string, partial?: boolean): asserts value is BaseConfig;
1023
- /** Compiler and delivery settings after defaults are applied. Authored paths remain unresolved. */
1032
+ /**
1033
+ * Compiler and delivery settings after defaults are applied. Authored paths remain unresolved.
1034
+ */
1024
1035
  interface NormalizedCompilerConfig extends BaseConfig, BuildOptions {
1025
1036
  /** Validated Stillwind namespace, defaulting to --sw-. */
1026
1037
  prefix: string;
@@ -1058,13 +1069,16 @@ interface NormalizedCompilerConfig extends BaseConfig, BuildOptions {
1058
1069
  }
1059
1070
  /**
1060
1071
  * Validates compiler fields and applies defaults without resolving paths.
1072
+ *
1061
1073
  * @param config - Compiler and delivery settings. Other fields are discarded before validation.
1062
1074
  * @returns A new object containing compiler and delivery settings with explicit sort flags and
1063
1075
  * expanded lint rules. Naming callbacks and other unchanged objects can retain input references.
1064
1076
  * @throws If compiler fields, delivery settings, namespace combinations, or effective lint policies are invalid.
1065
1077
  */
1066
1078
  declare function normalizeCompilerConfig(config: BaseConfig & BuildOptions): NormalizedCompilerConfig;
1067
- /** One project's compiler settings, analysis scope, and source preparation operations. */
1079
+ /**
1080
+ * One project's compiler settings, analysis scope, and source preparation operations.
1081
+ */
1068
1082
  interface AnalysisProjectConfig extends BaseConfig, BuildOptions {
1069
1083
  /** Nonempty design-system stylesheet path, absolute or relative to root. Authored whitespace is preserved. */
1070
1084
  css: string;
@@ -1073,6 +1087,8 @@ interface AnalysisProjectConfig extends BaseConfig, BuildOptions {
1073
1087
  /**
1074
1088
  * Nonempty list of globs relative to root. Analysis enumerates these targets and filters reports
1075
1089
  * to their scope. Imported dependencies and global declarations can lie outside this scope.
1090
+ * Builds of the bundler integrations give the selected targets to the checker before the first
1091
+ * compilation, so that a build opens one checker project for all of them.
1076
1092
  */
1077
1093
  files: readonly string[];
1078
1094
  /** Globs relative to root that remove analysis targets. node_modules and .git are always excluded. */
@@ -1086,7 +1102,9 @@ interface AnalysisProjectConfig extends BaseConfig, BuildOptions {
1086
1102
  /** Comments that editor previews add after values. Omission uses the defaults of each field. */
1087
1103
  preview?: PreviewOptions;
1088
1104
  }
1089
- /** Selects the comments that editor previews add after CSS values. */
1105
+ /**
1106
+ * Selects the comments that editor previews add after CSS values.
1107
+ */
1090
1108
  interface PreviewOptions {
1091
1109
  /**
1092
1110
  * Adds the resolved value after each theme `var()` and after each `calc()` that evaluates to one
@@ -1113,11 +1131,14 @@ type Captured<T> = T extends ((...arguments_: never[]) => unknown) ? T : T exten
1113
1131
  type CapturedProjectConfig = Captured<Omit<AnalysisProjectConfig, "tailwind">> & Pick<AnalysisProjectConfig, "tailwind">;
1114
1132
  /**
1115
1133
  * Captures configuration data and callback registries without changing the caller's objects.
1134
+ *
1116
1135
  * @param config - Evaluated project settings. Provider methods retain their original receivers.
1117
1136
  * @returns Fixed settings. A previously captured configuration is shared without copying it again.
1118
1137
  */
1119
1138
  declare function captureProjectConfig(config: AnalysisProjectConfig): CapturedProjectConfig;
1120
- /** Supplies original or prepared sources without starting a bundler. */
1139
+ /**
1140
+ * Supplies original or prepared sources without starting a bundler.
1141
+ */
1121
1142
  type SourceProvider = {
1122
1143
  /** Reads original files through the analysis host, including captured unsaved buffers. */
1123
1144
  kind: "filesystem";
@@ -1152,14 +1173,18 @@ type SourceProvider = {
1152
1173
  */
1153
1174
  resolve?(specifier: string, importer: string, context: SourceProviderContext): Promise<string | null>;
1154
1175
  };
1155
- /** Captured buffers shared by source reads, projections, and semantic queries. */
1176
+ /**
1177
+ * Captured buffers shared by source reads, projections, and semantic queries.
1178
+ */
1156
1179
  interface SourceProviderContext {
1157
1180
  /** Absolute project directory used for relative compiler and checker identities. */
1158
1181
  root: string;
1159
1182
  /** Original source text keyed by absolute file path, captured before asynchronous analysis. */
1160
1183
  documents: ReadonlyMap<string, string>;
1161
1184
  }
1162
- /** Selects framework converters or a caller-supplied preparation operation. */
1185
+ /**
1186
+ * Selects framework converters or a caller-supplied preparation operation.
1187
+ */
1163
1188
  type ProjectionProvider = {
1164
1189
  /** Uses the built-in converter selected by the input's framework metadata. */
1165
1190
  kind: "framework";
@@ -1175,7 +1200,9 @@ type ProjectionProvider = {
1175
1200
  */
1176
1201
  prepare(input: ProjectInput): Promise<PreparedSource>;
1177
1202
  };
1178
- /** Configuration file settings evaluated by build integrations and analysis hosts. */
1203
+ /**
1204
+ * Configuration file settings evaluated by build integrations and analysis hosts.
1205
+ */
1179
1206
  interface StillwindConfig {
1180
1207
  /**
1181
1208
  * Nonempty list of projects and references. Projects keep independent scopes and design systems.
@@ -1186,9 +1213,13 @@ interface StillwindConfig {
1186
1213
  */
1187
1214
  projects: (AnalysisProjectConfig | string)[];
1188
1215
  }
1189
- /** Called without arguments during configuration evaluation. Returns settings directly or asynchronously. */
1216
+ /**
1217
+ * Called without arguments during configuration evaluation. Returns settings directly or asynchronously.
1218
+ */
1190
1219
  type StillwindConfigFactory = () => StillwindConfig | Promise<StillwindConfig>;
1191
- /** Configuration module export accepted by Node hosts and build configuration consumers. */
1220
+ /**
1221
+ * Configuration module export accepted by Node hosts and build configuration consumers.
1222
+ */
1192
1223
  type StillwindConfigExport = StillwindConfig | Promise<StillwindConfig> | StillwindConfigFactory;
1193
1224
  /**
1194
1225
  * Provides contextual types and returns the supplied export unchanged. Factories run and promises
@@ -1210,6 +1241,7 @@ declare function resolveConfig(value: unknown): Promise<StillwindConfig>;
1210
1241
  /**
1211
1242
  * Validates evaluated projects and their compiler settings without running providers, resolving
1212
1243
  * paths, or reading referenced configuration files.
1244
+ *
1213
1245
  * @param value - Evaluated settings with a nonempty list of projects and references, required CSS
1214
1246
  * paths and file globs, and unique names when names are supplied.
1215
1247
  * @returns The supplied settings with object and callback identities preserved.
@@ -1286,4 +1318,4 @@ declare const configurationFiles: string[];
1286
1318
  */
1287
1319
  declare function documentConfiguration(file: string, folders: readonly string[], exists: (file: string) => boolean, paths: ConfigPaths): string | undefined;
1288
1320
  export { lintRules as $, definePlugin as A, LintScope as B, UtilitySortOptions as C, PluginDirectoryEntry as D, PluginContext as E, ImportantOptions as F, RestrictedDeclarationsOptions as G, LogicalPropertiesOptions as H, LengthUnitsOptions as I, VariantDirectiveOptions as J, RestrictedThemeTokensOptions as K, LintConfig as L, CanonicalUtilitiesOptions as M, ConflictingUtilitiesOptions as N, PluginWatchKind as O, DefinitionScope as P, LintRule as Q, LintPreset as R, TailwindConfig as S, validateCompilerConfig as T, MarkerUseOptions as U, LintSeverity as V, ResolvedLintRules as W, resolveLintConfig as X, mergeLintConfig as Y, LintCategory as Z, validateConfig as _, AnalysisProjectConfig as a, BuildOptions as b, ProjectionProvider as c, StillwindConfig as d, StillwindConfigExport as f, resolveConfig as g, defineConfig as h, documentConfiguration as i, ArbitrarySpacingOptions as j, StillwindPlugin as k, SourceProvider as l, captureProjectConfig as m, SerializableInlineConfig as n, CapturedProjectConfig as o, StillwindConfigFactory as p, RestrictedUtilitiesOptions as q, configurationFiles as r, PreviewOptions as s, InlineConfig as t, SourceProviderContext as u, BaseConfig as v, normalizeCompilerConfig as w, NormalizedCompilerConfig as x, BuildConfig as y, LintRules as z };
1289
- //# sourceMappingURL=resolution-CFQmPWSU.d.ts.map
1321
+ //# sourceMappingURL=resolution-BBHe-RRW.d.ts.map
@@ -707,7 +707,9 @@ const lengthUnits = [
707
707
  "cqmax"
708
708
  ];
709
709
  // src/validation.ts
710
- /** Schema validation that reports authored field paths and keeps supplied objects unchanged. */
710
+ /**
711
+ * Schema validation that reports authored field paths and keeps supplied objects unchanged.
712
+ */
711
713
  /** Accepts strings with non-whitespace content while preserving all authored whitespace. */
712
714
  const nonemptyText = v.pipe(v.string(), v.check((value) => Boolean(value.trim()), "must be a nonempty string"));
713
715
  /** Accepts arrays of strings with non-whitespace content. Arrays can be empty, and entries are not trimmed. */
@@ -716,6 +718,7 @@ const nonemptyStrings = v.array(nonemptyText);
716
718
  const nonemptyStringList = v.pipe(nonemptyStrings, v.minLength(1, "must be an array of nonempty strings"));
717
719
  /**
718
720
  * Checks a schema and narrows the supplied value without replacing it with parsed output.
721
+ *
719
722
  * @param schema - Synchronous schema whose output type describes the input's existing shape.
720
723
  * Parsed replacements are discarded, so narrowing must not depend on a transformation.
721
724
  * @param value - Value to validate. Objects, arrays, and callbacks retain their original identities.
@@ -731,6 +734,7 @@ function validate(schema, value, location) {
731
734
  }
732
735
  /**
733
736
  * Constructs a schema that requires an object and rejects undeclared keys.
737
+ *
734
738
  * @param entries - Field names and synchronous schemas used to validate their values.
735
739
  * @returns A schema that validates declared fields on non-null, non-array objects and rejects unknown keys.
736
740
  */
@@ -739,6 +743,7 @@ function strictObject(entries) {
739
743
  }
740
744
  /**
741
745
  * Checks whether a value can supply configuration fields.
746
+ *
742
747
  * @param value - Any runtime value. Objects with custom prototypes are accepted.
743
748
  * @returns Whether the value is a non-null object other than an array.
744
749
  */
@@ -1037,6 +1042,7 @@ const compilerSchema = strictObject(compilerEntries);
1037
1042
  const singleImportant = v.forward(v.check((value) => value.important === void 0 || !object(value.tailwind) || typeof value.tailwind.then === "function" || value.tailwind.important === void 0, "must not be set together with tailwind.important"), ["important"]);
1038
1043
  /**
1039
1044
  * Validates compiler fields and lint policies without resolving paths or invoking naming callbacks.
1045
+ *
1040
1046
  * @param value - Compiler settings with no analysis or delivery fields. CSS is optional here.
1041
1047
  * @param location - Field path prepended to validation errors. Defaults to `config`.
1042
1048
  * @param partial - Whether incomplete overrides can defer namespace collisions and required lint
@@ -1049,6 +1055,7 @@ function validateCompilerConfig(value, location = "config", partial = false) {
1049
1055
  }
1050
1056
  /**
1051
1057
  * Validates compiler fields and applies defaults without resolving paths.
1058
+ *
1052
1059
  * @param config - Compiler and delivery settings. Other fields are discarded before validation.
1053
1060
  * @returns A new object containing compiler and delivery settings with explicit sort flags and
1054
1061
  * expanded lint rules. Naming callbacks and other unchanged objects can retain input references.
@@ -1095,6 +1102,7 @@ const compilerKeys = Object.keys(compilerEntries);
1095
1102
  const capturedProjects = /* @__PURE__ */ new WeakSet();
1096
1103
  /**
1097
1104
  * Captures configuration data and callback registries without changing the caller's objects.
1105
+ *
1098
1106
  * @param config - Evaluated project settings. Provider methods retain their original receivers.
1099
1107
  * @returns Fixed settings. A previously captured configuration is shared without copying it again.
1100
1108
  */
@@ -1216,6 +1224,7 @@ const configurationSchema = v.pipe(strictObject({ projects: v.pipe(v.array(v.laz
1216
1224
  /**
1217
1225
  * Validates evaluated projects and their compiler settings without running providers, resolving
1218
1226
  * paths, or reading referenced configuration files.
1227
+ *
1219
1228
  * @param value - Evaluated settings with a nonempty list of projects and references, required CSS
1220
1229
  * paths and file globs, and unique names when names are supplied.
1221
1230
  * @returns The supplied settings with object and callback identities preserved.
@@ -1245,6 +1254,7 @@ function mergeConfig(base, overrides) {
1245
1254
  }
1246
1255
  /**
1247
1256
  * Merges object fields recursively while treating other values as replacements.
1257
+ *
1248
1258
  * @param base - Existing value. It is retained when the override is undefined.
1249
1259
  * @param override - Replacement or fields to merge. A changed, defined `kind` replaces the whole object.
1250
1260
  * @returns The original value, replacement value, or a new merged object. Nested values may share
@@ -1500,4 +1510,4 @@ function resolveCompilerSettings(base, inline, applicationRoot, paths) {
1500
1510
  }
1501
1511
  export { mergeLintConfig as _, expandProjects as a, lintPresets as b, selectProject as c, captureProjectConfig as d, defineConfig as f, validateCompilerConfig as g, normalizeCompilerConfig as h, documentConfiguration as i, validateInlineConfig as l, validateConfig as m, configurationCandidates as n, resolveCompilerSettings as o, resolveConfig as p, configurationFiles as r, resolveProjectPaths as s, compilerConfig as t, mergeConfig as u, resolveLintConfig as v, lintRules as y };
1502
1512
 
1503
- //# sourceMappingURL=resolution-C-sm0Ex1.js.map
1513
+ //# sourceMappingURL=resolution-DfduNZJr.js.map