@stillwind/host 0.10.1 → 0.12.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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # @stillwind/host
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - `stillwind utilities` and `stillwind variants` now accept `--names-only` to list matching names without formatting CSS previews. Pattern searches in `stillwind utilities` now also include placeholder patterns for functional utilities' non-enumerable domains, such as `p-<number>` and `p-[<length-percentage>]` (`kind: "pattern"` in JSON). `stillwind theme` now includes resolved values for tokens that reference other theme variables (`resolvedValue` in JSON, and inline comments in text output).
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies:
12
+ - @stillwind/config@0.12.0
13
+ - @stillwind/native@0.12.0
14
+ - @stillwind/projection@0.12.0
15
+
16
+ ## 0.11.0
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies:
21
+ - @stillwind/config@0.11.0
22
+ - @stillwind/native@0.11.0
23
+ - @stillwind/projection@0.11.0
24
+
3
25
  ## 0.10.1
4
26
 
5
27
  ### Patch Changes
package/dist/browser.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as PluginPathCompletion, C as TypeFactSource, D as PluginHost, E as UnverifiedRange, F as EditorResult, M as EditorCompletion, N as EditorEdit, P as EditorRequest, S as SemanticInputs, T as TypeFactsError, a as DesignSystemResult, b as AvailableFacts, c as queryDesignSystem, i as DesignSystemRequest, j as EditorColor, k as defaultPluginExport, n as DesignCandidate, o as DesignToken, r as DesignSystemContext, s as DesignTokenSource, t as EditorSnapshot, u as ModuleAnalysis, w as TypeFactsBackend } from "./index-DdFR_SNl.js";
1
+ import { A as PluginPathCompletion, C as TypeFactSource, D as PluginHost, E as UnverifiedRange, F as EditorResult, M as EditorCompletion, N as EditorEdit, P as EditorRequest, S as SemanticInputs, T as TypeFactsError, a as DesignSystemResult, b as AvailableFacts, c as queryDesignSystem, i as DesignSystemRequest, j as EditorColor, k as defaultPluginExport, n as DesignCandidate, o as DesignToken, r as DesignSystemContext, s as DesignTokenSource, t as EditorSnapshot, u as ModuleAnalysis, w as TypeFactsBackend } from "./index-vMSKY1Nh.js";
2
2
  import { t as resolveVirtualModule } from "./resolution-C7e21ept.js";
3
3
  import { BindingRejectedIdentifier, BindingReport, NativeAssetRecord, NativeTypeFact } from "@stillwind/native";
4
4
  import ts from "typescript-6";
package/dist/browser.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as fileSourceKind, E as CompilationProject, F as prepareSourcePlugins, M as attachPlugins, _ as defaultPluginExport, a as pluginDirectory, b as analyzeModule, c as CheckerSource, d as queryDesignSystem, f as isStylesheet, h as loadEditorCssGraph, i as completePluginPaths, j as TypeFactsError, l as checkerId, m as loadCssGraph, n as cssEntrypoint, o as queryPluginPaths, r as StylesheetEditor, s as EditorSnapshot, t as compilerOptions, u as withRequestedProbes, y as finalizeCss } from "./options-CHkqG1Gc.js";
1
+ import { D as CompilationProject, I as prepareSourcePlugins, M as TypeFactsError, N as attachPlugins, _ as defaultPluginExport, a as pluginDirectory, b as analyzeModule, c as CheckerSource, d as queryDesignSystem, f as isStylesheet, h as loadEditorCssGraph, i as completePluginPaths, j as fileSourceKind, l as checkerId, m as loadCssGraph, n as cssEntrypoint, o as queryPluginPaths, r as StylesheetEditor, s as EditorSnapshot, t as compilerOptions, u as withRequestedProbes, y as finalizeCss } from "./options-Cc-SlJed.js";
2
2
  import { t as resolveVirtualModule } from "./resolution-C5o_tmY3.js";
3
3
  import { NativeProjectSession, fingerprint } from "@stillwind/native";
4
4
  import ts from "typescript-6";
@@ -30,6 +30,11 @@ interface EditorCompletion extends EditorEdit {
30
30
  snippet?: string;
31
31
  /** Requests another completion after the client inserts this item. */
32
32
  retrigger?: boolean;
33
+ /**
34
+ * Concrete color of a color utility as `#rrggbb` or `#rrggbbaa`. Absent for other candidates
35
+ * and for colors that depend on the color scheme.
36
+ */
37
+ color?: string;
33
38
  /** Completion category for host-resolved plugin names, files, and directories. */
34
39
  category?: "module" | "file" | "directory";
35
40
  /** Lexical priority key supplied by the semantic catalog. Omission sorts by label. */
@@ -189,6 +194,11 @@ interface EditorResult {
189
194
  }[];
190
195
  /** Prefix-matching candidates with their full replacement ranges. CSS loads on resolve. */
191
196
  completions?: EditorCompletion[];
197
+ /**
198
+ * True when the plugin catalog had more matching names than one request lists, so a longer
199
+ * prefix can produce other completions.
200
+ */
201
+ completionsIncomplete?: boolean;
192
202
  /** Concrete colors resolved against the active design system. */
193
203
  colors?: EditorColor[];
194
204
  /** Nonoverlapping replacements in ascending original offset order. */
@@ -842,6 +852,8 @@ type DesignSystemRequest = {
842
852
  kind: "utilities" | "variants";
843
853
  /** Decoded candidates. A `*` outside brackets and parentheses makes a pattern. */
844
854
  targets: readonly string[];
855
+ /** Omits formatted CSS previews from returned candidates. */
856
+ namesOnly?: boolean;
845
857
  };
846
858
  /**
847
859
  * Origin of a token: the project's `@theme`, or a default that `@theme` can override.
@@ -855,22 +867,24 @@ interface DesignToken {
855
867
  name: string;
856
868
  /** CSS value as written, including references to other tokens. */
857
869
  value: string;
870
+ /** CSS value with known theme `var()` references substituted. Absent when unchanged. */
871
+ resolvedValue?: string;
858
872
  /** Origin of the active definition. */
859
873
  source: DesignTokenSource;
860
874
  /** Whether utilities write the value of the token instead of a reference to it. */
861
875
  inline: boolean;
862
876
  }
863
877
  /**
864
- * One utility, variant, or marker class, with its CSS.
878
+ * One utility, variant, marker class, or functional utility pattern, with its CSS.
865
879
  */
866
880
  interface DesignCandidate {
867
881
  /** Decoded candidate. Variant names have no trailing colon. */
868
882
  name: string;
869
883
  /** Kind of input that the name selects. */
870
- kind: "utility" | "variant" | "marker";
884
+ kind: "utility" | "variant" | "marker" | "pattern";
871
885
  /** Whether the name resolves in this design system. */
872
886
  valid: boolean;
873
- /** Formatted CSS. It is empty for an invalid name and for a marker without CSS. */
887
+ /** Formatted CSS. It is empty for an invalid name, a pattern, a marker without CSS, or namesOnly. */
874
888
  css: string;
875
889
  /** Closest valid spelling of an invalid name. Absent when no spelling is close enough. */
876
890
  suggestion?: string;
@@ -968,4 +982,4 @@ declare class EditorSnapshot {
968
982
  query(id: string, request: EditorRequest): EditorResult | undefined;
969
983
  }
970
984
  export { PluginPathCompletion as A, TypeFactSource as C, PluginHost as D, UnverifiedRange as E, EditorResult as F, EditorCompletion as M, EditorEdit as N, TailwindSettings as O, EditorRequest as P, SemanticInputs as S, TypeFactsError as T, TypeFactsInputs as _, DesignSystemResult as a, AvailableFacts as b, queryDesignSystem as c, ModuleCompileOptions as d, SemanticDependency as f, TypeFactsEnvironment as g, TypeScriptFactsStats as h, DesignSystemRequest as i, EditorColor as j, defaultPluginExport as k, PluginRuntime as l, TypeScriptFactsService as m, DesignCandidate as n, DesignToken as o, TypeFact as p, DesignSystemContext as r, DesignTokenSource as s, EditorSnapshot as t, ModuleAnalysis as u, TypeScriptProject as v, TypeFactsBackend as w, CheckerSpan as x, resolveTypeFactsEnvironment as y };
971
- //# sourceMappingURL=index-DdFR_SNl.d.ts.map
985
+ //# sourceMappingURL=index-vMSKY1Nh.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as PluginPathCompletion, C as TypeFactSource, D as PluginHost, E as UnverifiedRange, F as EditorResult, M as EditorCompletion, N as EditorEdit, O as TailwindSettings, P as EditorRequest, S as SemanticInputs, T as TypeFactsError, _ as TypeFactsInputs, a as DesignSystemResult, b as AvailableFacts, c as queryDesignSystem, d as ModuleCompileOptions, f as SemanticDependency, g as TypeFactsEnvironment, h as TypeScriptFactsStats, i as DesignSystemRequest, j as EditorColor, k as defaultPluginExport, l as PluginRuntime, m as TypeScriptFactsService, n as DesignCandidate, o as DesignToken, p as TypeFact, r as DesignSystemContext, s as DesignTokenSource, t as EditorSnapshot, u as ModuleAnalysis, v as TypeScriptProject, w as TypeFactsBackend, x as CheckerSpan, y as resolveTypeFactsEnvironment } from "./index-DdFR_SNl.js";
1
+ import { A as PluginPathCompletion, C as TypeFactSource, D as PluginHost, E as UnverifiedRange, F as EditorResult, M as EditorCompletion, N as EditorEdit, O as TailwindSettings, P as EditorRequest, S as SemanticInputs, T as TypeFactsError, _ as TypeFactsInputs, a as DesignSystemResult, b as AvailableFacts, c as queryDesignSystem, d as ModuleCompileOptions, f as SemanticDependency, g as TypeFactsEnvironment, h as TypeScriptFactsStats, i as DesignSystemRequest, j as EditorColor, k as defaultPluginExport, l as PluginRuntime, m as TypeScriptFactsService, n as DesignCandidate, o as DesignToken, p as TypeFact, r as DesignSystemContext, s as DesignTokenSource, t as EditorSnapshot, u as ModuleAnalysis, v as TypeScriptProject, w as TypeFactsBackend, x as CheckerSpan, y as resolveTypeFactsEnvironment } from "./index-vMSKY1Nh.js";
2
2
  import { BindingDiagnostic, BindingOutput, BindingRejectedIdentifier, BindingReport, NativeAssetRecord, NativeCompilerOptions, NativeCssResource, NativeDesignSystemLoader, NativeDiagnosticBatch, NativeEditorQuery, NativeModuleSummary, NativeProjectSession, NativeSkippedCss, NativeTypeFact } from "@stillwind/native";
3
3
  import { PreparedSource as PreparedSource$1, ProjectInput, ScriptSyntax, SourceDocument } from "@stillwind/projection";
4
4
  import { EncodedSourceMap } from "@jridgewell/gen-mapping";
@@ -417,6 +417,19 @@ export declare class CompilationFailure extends Error {
417
417
  */
418
418
  constructor(batches: readonly NativeDiagnosticBatch[], cause?: unknown);
419
419
  }
420
+ /**
421
+ * Formats a compiler report for an Error message or terminal output.
422
+ *
423
+ * @param report - Structured report with a primary label, related labels, and notes.
424
+ * @param options - `primaryLocation: false` omits the primary path and range, for hosts that
425
+ * display the primary location separately, such as the Vite error overlay.
426
+ * @returns Text with one-based line and column ranges for source labels, followed by related labels
427
+ * and notes. Document-scoped primary labels use only the path.
428
+ */
429
+ export declare function formatReport(report: BindingReport, options?: {
430
+ /** False omits the primary path and range. Omission includes them. */
431
+ primaryLocation?: boolean;
432
+ }): string;
420
433
  /**
421
434
  * Prepared direct or projected source with optional semantic facts in original UTF-8 coordinates.
422
435
  * The host attaches these facts before native compilation.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as fileSourceKind, C as CompilationFailure, D as ResolutionMismatchError, E as CompilationProject, F as prepareSourcePlugins, M as attachPlugins, N as compileWithPlugins, O as sourceKey, P as pluginLoader, S as warnRejectedNames, T as tracePhase, _ as defaultPluginExport, a as pluginDirectory, b as analyzeModule, c as CheckerSource, d as queryDesignSystem, f as isStylesheet, g as PluginRuntime, h as loadEditorCssGraph, i as completePluginPaths, j as TypeFactsError, k as cleanModuleId, l as checkerId, m as loadCssGraph, n as cssEntrypoint, o as queryPluginPaths, p as lintsStylesheet, r as StylesheetEditor, s as EditorSnapshot, t as compilerOptions, u as withRequestedProbes, v as cssBannerPrefix, w as startPhase, x as compileModule, y as finalizeCss } from "./options-CHkqG1Gc.js";
1
+ import { A as cleanModuleId, C as CompilationFailure, D as CompilationProject, E as tracePhase, F as pluginLoader, I as prepareSourcePlugins, M as TypeFactsError, N as attachPlugins, O as ResolutionMismatchError, P as compileWithPlugins, S as warnRejectedNames, T as startPhase, _ as defaultPluginExport, a as pluginDirectory, b as analyzeModule, c as CheckerSource, d as queryDesignSystem, f as isStylesheet, g as PluginRuntime, h as loadEditorCssGraph, i as completePluginPaths, j as fileSourceKind, k as sourceKey, l as checkerId, m as loadCssGraph, n as cssEntrypoint, o as queryPluginPaths, p as lintsStylesheet, r as StylesheetEditor, s as EditorSnapshot, t as compilerOptions, u as withRequestedProbes, v as cssBannerPrefix, w as formatReport, x as compileModule, y as finalizeCss } from "./options-Cc-SlJed.js";
2
2
  import { createRequire, syncBuiltinESMExports } from "node:module";
3
3
  import { NativeProjectSession, fingerprint } from "@stillwind/native";
4
4
  import path, { isAbsolute, relative, resolve } from "node:path";
@@ -3026,6 +3026,6 @@ var AnalysisWorkspace = class AnalysisWorkspace {
3026
3026
  if (errors.length) throw new AggregateError(errors, "Failed to close Stillwind analysis hosts");
3027
3027
  }
3028
3028
  };
3029
- export { AnalysisProject, AnalysisWorkspace, CompilationFailure, CompilationProject, EditorProject, EditorSnapshot, PluginRuntime, ResolutionMismatchError, TypeFactsError, TypeScriptFactsService, analyzeModule, attachPlugins, cleanModuleId, compileModule, compileWithPlugins, compilerModuleId, compilerOptions, composeCarrierSourceMap, composeFrameworkSourceMap, composeModuleSourceMap, createFileSystemAnalysisHost, createStylesheetResolver, cssEntrypoint, cssWithSourceMap, decodeCssSourceMap, defaultPluginExport, fileModuleDescriptor, fileSourceKind, finalizeCss, finalizeModuleWithMap, isStylesheet, lintsStylesheet, loadCssGraph, loadEditorCssGraph, moduleSourceMap, nodePluginHost, pluginLoader, queryDesignSystem, resolveTypeFactsEnvironment, startPhase, tracePhase, warnRejectedNames };
3029
+ export { AnalysisProject, AnalysisWorkspace, CompilationFailure, CompilationProject, EditorProject, EditorSnapshot, PluginRuntime, ResolutionMismatchError, TypeFactsError, TypeScriptFactsService, analyzeModule, attachPlugins, cleanModuleId, compileModule, compileWithPlugins, compilerModuleId, compilerOptions, composeCarrierSourceMap, composeFrameworkSourceMap, composeModuleSourceMap, createFileSystemAnalysisHost, createStylesheetResolver, cssEntrypoint, cssWithSourceMap, decodeCssSourceMap, defaultPluginExport, fileModuleDescriptor, fileSourceKind, finalizeCss, finalizeModuleWithMap, formatReport, isStylesheet, lintsStylesheet, loadCssGraph, loadEditorCssGraph, moduleSourceMap, nodePluginHost, pluginLoader, queryDesignSystem, resolveTypeFactsEnvironment, startPhase, tracePhase, warnRejectedNames };
3030
3030
 
3031
3031
  //# sourceMappingURL=index.js.map