@unocss/language-server 66.6.8 → 66.7.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/dist/babel.cjs +38 -27
- package/dist/index.d.mts +49 -11
- package/dist/index.mjs +718 -310
- package/dist/jiti-o72O9uTJ.cjs +5458 -0
- package/dist/{loader-DsXvVy9i.mjs → loader-Cc0WuaWv.mjs} +78 -159
- package/dist/{multipart-parser-DiNB_U8f.cjs → multipart-parser-Bpu87U00.cjs} +1 -1
- package/dist/{multipart-parser-KkZpcbcp.mjs → multipart-parser-CsdWXQgI.mjs} +1 -1
- package/dist/{node-Cd2HRubI.mjs → node-4QtI8xnG.mjs} +2 -2
- package/dist/{node-BM09n__k.cjs → node-B8rcTbx-.cjs} +5 -5
- package/dist/{node-3wiZdXIz.cjs → node-DVy0NdU2.cjs} +182 -9
- package/dist/node-loader-CKcohGec.mjs +2177 -0
- package/dist/node-loader-D9n8Xz5R.cjs +2184 -0
- package/dist/{node-D23LglTq.mjs → node-oThp98aD.mjs} +178 -5
- package/dist/{prompt-jldWOuck.cjs → prompt-DFgjooUU.cjs} +6 -4
- package/dist/server.cjs +21226 -31429
- package/package.json +18 -17
- package/dist/chunk-CBBoxR_p.mjs +0 -26
- package/dist/dist-DJp734Em.mjs +0 -173
- package/dist/dist-FL7p7uq2.cjs +0 -190
- package/dist/jiti-du6HSta6.cjs +0 -4474
- package/dist/node-loader-BJV6yUBJ.cjs +0 -7138
- package/dist/node-loader-ZSa5xzQw.mjs +0 -7131
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$_unocss_core0 from "@unocss/core";
|
|
2
1
|
import { UnoGenerator, UnocssPluginContext, UserConfig } from "@unocss/core";
|
|
3
2
|
import { Connection } from "vscode-languageserver";
|
|
4
3
|
|
|
@@ -20,7 +19,7 @@ declare class ContextManager {
|
|
|
20
19
|
private discoveredConfigs;
|
|
21
20
|
private readonly defaultUnocssConfig;
|
|
22
21
|
private readonly workspaceRoots;
|
|
23
|
-
events:
|
|
22
|
+
events: import("@unocss/core").Emitter<{
|
|
24
23
|
reload: () => void;
|
|
25
24
|
unload: (context: UnocssPluginContext<UserConfig<any>>) => void;
|
|
26
25
|
contextLoaded: (context: UnocssPluginContext<UserConfig<any>>) => void;
|
|
@@ -78,6 +77,51 @@ interface MatchedPosition {
|
|
|
78
77
|
text: string;
|
|
79
78
|
}
|
|
80
79
|
//#endregion
|
|
80
|
+
//#region ../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.d.ts
|
|
81
|
+
/**
|
|
82
|
+
* Defines a decimal number. Since decimal numbers are very
|
|
83
|
+
* rare in the language server specification we denote the
|
|
84
|
+
* exact range with every decimal using the mathematics
|
|
85
|
+
* interval notations (e.g. [0, 1] denotes all decimals d with
|
|
86
|
+
* 0 <= d <= 1.
|
|
87
|
+
*/
|
|
88
|
+
type decimal = number;
|
|
89
|
+
/**
|
|
90
|
+
* Represents a color in RGBA space.
|
|
91
|
+
*/
|
|
92
|
+
interface Color {
|
|
93
|
+
/**
|
|
94
|
+
* The red component of this color in the range [0-1].
|
|
95
|
+
*/
|
|
96
|
+
readonly red: decimal;
|
|
97
|
+
/**
|
|
98
|
+
* The green component of this color in the range [0-1].
|
|
99
|
+
*/
|
|
100
|
+
readonly green: decimal;
|
|
101
|
+
/**
|
|
102
|
+
* The blue component of this color in the range [0-1].
|
|
103
|
+
*/
|
|
104
|
+
readonly blue: decimal;
|
|
105
|
+
/**
|
|
106
|
+
* The alpha component of this color in the range [0-1].
|
|
107
|
+
*/
|
|
108
|
+
readonly alpha: decimal;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The Color namespace provides helper functions to work with
|
|
112
|
+
* {@link Color} literals.
|
|
113
|
+
*/
|
|
114
|
+
declare namespace Color {
|
|
115
|
+
/**
|
|
116
|
+
* Creates a new Color literal.
|
|
117
|
+
*/
|
|
118
|
+
function create(red: decimal, green: decimal, blue: decimal, alpha: decimal): Color;
|
|
119
|
+
/**
|
|
120
|
+
* Checks whether the given literal conforms to the {@link Color} interface.
|
|
121
|
+
*/
|
|
122
|
+
function is(value: any): value is Color;
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
81
125
|
//#region src/utils/color.d.ts
|
|
82
126
|
/**
|
|
83
127
|
* Get CSS color string from CSS string
|
|
@@ -111,13 +155,7 @@ interface MatchedPosition {
|
|
|
111
155
|
* @returns The **first** CSS color string (hex, rgb[a], hsl[a]) or `undefined`
|
|
112
156
|
*/
|
|
113
157
|
declare function getColorString(str: string): string | undefined;
|
|
114
|
-
declare function
|
|
115
|
-
declare function parseColorToRGBA(colorString: string): {
|
|
116
|
-
red: number;
|
|
117
|
-
green: number;
|
|
118
|
-
blue: number;
|
|
119
|
-
alpha: number;
|
|
120
|
-
} | undefined;
|
|
158
|
+
declare function parseColorToRGBA(colorString: string): Color | undefined;
|
|
121
159
|
//#endregion
|
|
122
160
|
//#region src/utils/css.d.ts
|
|
123
161
|
/**
|
|
@@ -127,7 +165,7 @@ declare function parseColorToRGBA(colorString: string): {
|
|
|
127
165
|
* @param str
|
|
128
166
|
*/
|
|
129
167
|
declare function addRemToPxComment(str?: string, remToPixel?: number): string;
|
|
130
|
-
declare function getCSS(uno: UnoGenerator, utilName: string | string[]): Promise<string>;
|
|
168
|
+
declare function getCSS(uno: UnoGenerator, utilName: string | string[], preflights?: boolean): Promise<string>;
|
|
131
169
|
declare function getPrettiedCSS(uno: UnoGenerator, util: string | string[], remToPxRatio: number): Promise<{
|
|
132
170
|
prettified: string;
|
|
133
171
|
css: string;
|
|
@@ -158,4 +196,4 @@ declare function shouldProvideAutocomplete(code: string, id: string, offset: num
|
|
|
158
196
|
declare function isVueWithPug(code: string, id: string): boolean;
|
|
159
197
|
declare function isSubdir(parent: string, child: string): boolean | "";
|
|
160
198
|
//#endregion
|
|
161
|
-
export { ContextManager, type MatchedPosition, type ServerSettings, type UnoContext, addRemToPxComment, clearDocumentCache,
|
|
199
|
+
export { ContextManager, type MatchedPosition, type ServerSettings, type UnoContext, addRemToPxComment, clearDocumentCache, defaultSettings, getCSS, getColorString, getMatchedPositionsFromCode, getMatchedPositionsFromDoc, getPrettiedCSS, getPrettiedMarkdown, isSubdir, isVueWithPug, parseColorToRGBA, shouldProvideAutocomplete };
|