@master/css-language-service 2.0.0-rc.45 → 2.0.0-rc.47
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/core.cjs +1 -3
- package/dist/core.d.ts +2 -3
- package/dist/core.mjs +1 -3
- package/dist/settings.d.ts +2 -2
- package/package.json +1 -1
package/dist/core.cjs
CHANGED
|
@@ -17,8 +17,7 @@ class CSSLanguageService extends EventEmitter {
|
|
|
17
17
|
css;
|
|
18
18
|
settings;
|
|
19
19
|
constructor(customSettings){
|
|
20
|
-
super();
|
|
21
|
-
this.customSettings = customSettings;
|
|
20
|
+
super(), this.customSettings = customSettings;
|
|
22
21
|
this.settings = extend(settings, customSettings);
|
|
23
22
|
this.css = new css.MasterCSS(this.settings.config);
|
|
24
23
|
}
|
|
@@ -79,7 +78,6 @@ class CSSLanguageService extends EventEmitter {
|
|
|
79
78
|
};
|
|
80
79
|
const resolve = (classMatchers, handle)=>{
|
|
81
80
|
for (const eachClassMatcher of classMatchers){
|
|
82
|
-
// eslint-disable-next-line prefer-const
|
|
83
81
|
let [eachPattern, start, end] = eachClassMatcher;
|
|
84
82
|
end = end ?? start;
|
|
85
83
|
for (const eachClassPostioinMatch of text.matchAll(new RegExp(`(?:\\s|\\.)${eachPattern}${escapeRegexp(start)}`, 'g'))){
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { MasterCSS } from '@master/css';
|
|
3
2
|
import EventEmitter from 'node:events';
|
|
4
3
|
import type { Position } from 'vscode-languageserver-protocol';
|
|
@@ -8,14 +7,14 @@ import renderSyntaxColors from './features/render-syntax-colors';
|
|
|
8
7
|
import editSyntaxColors from './features/edit-syntax-colors';
|
|
9
8
|
import suggestSyntax from './features/suggest-syntax';
|
|
10
9
|
import { TextDocument } from 'vscode-languageserver-textdocument';
|
|
11
|
-
export
|
|
10
|
+
export interface ClassPosition {
|
|
12
11
|
range: {
|
|
13
12
|
start: number;
|
|
14
13
|
end: number;
|
|
15
14
|
};
|
|
16
15
|
raw: string;
|
|
17
16
|
token: string;
|
|
18
|
-
}
|
|
17
|
+
}
|
|
19
18
|
export default class CSSLanguageService extends EventEmitter {
|
|
20
19
|
customSettings?: Settings | undefined;
|
|
21
20
|
css: MasterCSS;
|
package/dist/core.mjs
CHANGED
|
@@ -15,8 +15,7 @@ class CSSLanguageService extends EventEmitter {
|
|
|
15
15
|
css;
|
|
16
16
|
settings;
|
|
17
17
|
constructor(customSettings){
|
|
18
|
-
super();
|
|
19
|
-
this.customSettings = customSettings;
|
|
18
|
+
super(), this.customSettings = customSettings;
|
|
20
19
|
this.settings = extend(settings, customSettings);
|
|
21
20
|
this.css = new MasterCSS(this.settings.config);
|
|
22
21
|
}
|
|
@@ -77,7 +76,6 @@ class CSSLanguageService extends EventEmitter {
|
|
|
77
76
|
};
|
|
78
77
|
const resolve = (classMatchers, handle)=>{
|
|
79
78
|
for (const eachClassMatcher of classMatchers){
|
|
80
|
-
// eslint-disable-next-line prefer-const
|
|
81
79
|
let [eachPattern, start, end] = eachClassMatcher;
|
|
82
80
|
end = end ?? start;
|
|
83
81
|
for (const eachClassPostioinMatch of text.matchAll(new RegExp(`(?:\\s|\\.)${eachPattern}${escapeRegexp(start)}`, 'g'))){
|
package/dist/settings.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Config } from '@master/css';
|
|
|
4
4
|
**/
|
|
5
5
|
declare const settings: Settings;
|
|
6
6
|
export default settings;
|
|
7
|
-
export declare
|
|
7
|
+
export declare interface Settings {
|
|
8
8
|
includedLanguages?: string[];
|
|
9
9
|
classAttributes?: string[];
|
|
10
10
|
classFunctions?: string[];
|
|
@@ -16,4 +16,4 @@ export declare type Settings = {
|
|
|
16
16
|
inspectSyntax?: boolean;
|
|
17
17
|
renderSyntaxColors?: boolean;
|
|
18
18
|
editSyntaxColors?: boolean;
|
|
19
|
-
}
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@master/css-language-service","type":"module","scripts":{"build":"techor build \"src/**/*.ts\"","dev":"pnpm build --watch","type-check":"tsc --noEmit","lint":"eslint
|
|
1
|
+
{"name":"@master/css-language-service","type":"module","scripts":{"build":"techor build \"src/**/*.ts\"","dev":"pnpm build --watch","type-check":"tsc --noEmit","lint":"eslint","test":"vitest"},"description":"Master CSS Language Service","author":"Aoyue Design LLC.","license":"MIT","repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/language-service"},"dependencies":{"@babel/parser":"^7.26.3","@master/css":"^2.0.0-rc.47","@techor/extend":"^3.1.7","color-convert":"^2.0.1","color-rgba":"^3.0.0","color-space":"^2.0.1","culori":"^4.0.1","js-beautify":"^1.15.1","lodash.escaperegexp":"^4.1.2","minimatch":"^10.0.1","pex-color":"^2.2.0","vscode-css-languageservice":"^6.3.2","vscode-languageserver-protocol":"^3.17.5","vscode-languageserver-textdocument":"^1.0.12"},"devDependencies":{"@types/chroma-js":"^2.4.5","@types/color-convert":"^2.0.4","@types/color-rgba":"^2.1.3","@types/culori":"^2.1.1","@types/lodash.escaperegexp":"^4.1.9","@types/vscode":"^1.96.0","shared":"^2.0.0-rc.47","vscode-languageserver":"^9.0.1"},"sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.mjs","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"files":["dist"],"publishConfig":{"access":"public","provenance":true},"version":"2.0.0-rc.47"}
|