@master/css-language-server 2.0.0-rc.72 → 2.0.0-rc.74

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.
@@ -1,8 +1,11 @@
1
- import { type Settings as CSSLanguageServiceSettings } from '@master/css-language-service';
2
- import type { Pattern } from 'fast-glob';
1
+ import { Settings as Settings$1 } from "@master/css-language-service";
2
+ import { Pattern } from "fast-glob";
3
+
4
+ //#region src/settings.d.ts
3
5
  declare const settings: Settings;
4
- export default settings;
5
- export declare type Settings = CSSLanguageServiceSettings & {
6
- workspaces?: Pattern[] | 'auto';
7
- verbose?: boolean;
6
+ declare type Settings = Settings$1 & {
7
+ workspaces?: Pattern[] | 'auto';
8
+ verbose?: boolean;
8
9
  };
10
+ //#endregion
11
+ export { Settings, settings as default };
@@ -0,0 +1,9 @@
1
+ import { settings as settings$1 } from "@master/css-language-service";
2
+ //#region src/settings.ts
3
+ const settings = {
4
+ ...settings$1,
5
+ workspaces: "auto",
6
+ verbose: false
7
+ };
8
+ //#endregion
9
+ export { settings as default };
@@ -1,5 +1,9 @@
1
- import { TextDocument } from 'vscode-languageserver-textdocument';
2
- export default function createDocument(text: string, options?: {
3
- lang?: string;
4
- dir?: string;
1
+ import { TextDocument } from "vscode-languageserver-textdocument";
2
+
3
+ //#region src/utils/create-document.d.ts
4
+ declare function createDocument(text: string, options?: {
5
+ lang?: string;
6
+ dir?: string;
5
7
  }): TextDocument;
8
+ //#endregion
9
+ export { createDocument as default };
@@ -0,0 +1,28 @@
1
+ import { TextDocument } from "vscode-languageserver-textdocument";
2
+ import { URI } from "vscode-uri";
3
+ import { nanoid } from "nanoid";
4
+ import path from "path";
5
+ //#region src/utils/create-document.ts
6
+ const extOfLang = {
7
+ typescript: "ts",
8
+ typescriptreact: "tsx",
9
+ javascript: "js",
10
+ javascriptreact: "jsx",
11
+ css: "css",
12
+ scss: "scss",
13
+ less: "less",
14
+ html: "html",
15
+ json: "json",
16
+ vue: "vue",
17
+ svelte: "svelte",
18
+ astro: "astro"
19
+ };
20
+ function createDocument(text, options) {
21
+ const lang = options?.lang || "html";
22
+ const dir = options?.dir || "./";
23
+ const filePath = path.join(dir, `${nanoid()}.${extOfLang[lang]}`);
24
+ const fileURI = URI.file(filePath).toString();
25
+ return TextDocument.create(fileURI, lang, 0, text);
26
+ }
27
+ //#endregion
28
+ export { createDocument as default };
package/package.json CHANGED
@@ -1 +1,60 @@
1
- {"name":"@master/css-language-server","type":"module","scripts":{"build":"techor build \"src/**/*.ts\" --formats esm","dev":"pnpm build --watch","type-check":"tsc --noEmit","lint":"eslint","test":"vitest"},"description":"Master CSS Language Server","author":"Aoyue Design LLC.","license":"MIT","repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/language-server"},"dependencies":{"@master/css":"^2.0.0-rc.72","@master/css-compiler":"^2.0.0-rc.72","@master/css-language":"^2.0.0-rc.72","@master/css-language-service":"^2.0.0-rc.72","@master/css-project":"^2.0.0-rc.72","@techor/extend":"^3.2.5","fast-glob":"^3.3.3","js-beautify":"^1.15.4","nanoid":"^5.1.15","vscode-languageserver":"^10.0.0","vscode-languageserver-textdocument":"^1.0.12","vscode-uri":"^3.1.0","@master/css-schema":"^2.0.0-rc.72"},"sideEffects":false,"main":"./dist/index.mjs","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","default":"./dist/index.mjs"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","default":"./dist/server.mjs"}},"files":["dist"],"publishConfig":{"access":"public","provenance":true},"version":"2.0.0-rc.72"}
1
+ {
2
+ "name": "@master/css-language-server",
3
+ "type": "module",
4
+ "description": "Master CSS Language Server",
5
+ "author": "Aoyue Design LLC.",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/master-co/css.git",
10
+ "directory": "packages/language-server"
11
+ },
12
+ "dependencies": {
13
+ "defu": "^6.1.7",
14
+ "fast-glob": "^3.3.3",
15
+ "js-beautify": "^1.15.4",
16
+ "nanoid": "^5.1.15",
17
+ "vscode-languageserver": "^10.0.0",
18
+ "vscode-languageserver-textdocument": "^1.0.12",
19
+ "vscode-uri": "^3.1.0",
20
+ "@master/css": "^2.0.0-rc.74",
21
+ "@master/css-compiler": "^2.0.0-rc.74",
22
+ "@master/css-language": "^2.0.0-rc.74",
23
+ "@master/css-project": "^2.0.0-rc.74",
24
+ "@master/css-language-service": "^2.0.0-rc.74",
25
+ "@master/css-schema": "^2.0.0-rc.74"
26
+ },
27
+ "sideEffects": false,
28
+ "main": "./dist/index.js",
29
+ "module": "./dist/index.js",
30
+ "jsnext:main": "./dist/index.js",
31
+ "esnext": "./dist/index.js",
32
+ "types": "./dist/index.d.ts",
33
+ "exports": {
34
+ ".": {
35
+ "types": "./dist/index.d.ts",
36
+ "import": "./dist/index.js",
37
+ "default": "./dist/index.js"
38
+ },
39
+ "./server": {
40
+ "types": "./dist/server.d.ts",
41
+ "import": "./dist/server.js",
42
+ "default": "./dist/server.js"
43
+ }
44
+ },
45
+ "files": [
46
+ "dist"
47
+ ],
48
+ "publishConfig": {
49
+ "access": "public",
50
+ "provenance": true
51
+ },
52
+ "version": "2.0.0-rc.74",
53
+ "scripts": {
54
+ "build": "tsdown --config ../../shared/tsdown-package.config.ts",
55
+ "dev": "tsdown --config ../../shared/tsdown-package.config.ts --watch",
56
+ "type-check": "tsc -b tsconfig.typecheck.json",
57
+ "lint": "eslint",
58
+ "test": "vitest"
59
+ }
60
+ }