volar-service-css 0.0.34 → 0.0.35

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.
Files changed (3) hide show
  1. package/index.d.ts +6 -6
  2. package/index.js +2 -1
  3. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Disposable, DocumentSelector, FormattingOptions, Result, ServiceContext, ServicePlugin } from '@volar/language-service';
1
+ import type { Disposable, DocumentSelector, FormattingOptions, ProviderResult, ServiceContext, LanguageServicePlugin } from '@volar/language-service';
2
2
  import * as css from 'vscode-css-languageservice';
3
3
  import { TextDocument } from 'vscode-languageserver-textdocument';
4
4
  export interface Provide {
@@ -11,10 +11,10 @@ export declare function create({ cssDocumentSelector, scssDocumentSelector, less
11
11
  lessDocumentSelector?: DocumentSelector;
12
12
  useDefaultDataProvider?: boolean;
13
13
  getDocumentContext?(context: ServiceContext): css.DocumentContext;
14
- isFormattingEnabled?(document: TextDocument, context: ServiceContext): Result<boolean>;
15
- getFormattingOptions?(document: TextDocument, options: FormattingOptions, context: ServiceContext): Result<css.CSSFormatConfiguration>;
16
- getLanguageSettings?(document: TextDocument, context: ServiceContext): Result<css.LanguageSettings | undefined>;
17
- getCustomData?(context: ServiceContext): Result<css.ICSSDataProvider[]>;
14
+ isFormattingEnabled?(document: TextDocument, context: ServiceContext): ProviderResult<boolean>;
15
+ getFormattingOptions?(document: TextDocument, options: FormattingOptions, context: ServiceContext): ProviderResult<css.CSSFormatConfiguration>;
16
+ getLanguageSettings?(document: TextDocument, context: ServiceContext): ProviderResult<css.LanguageSettings | undefined>;
17
+ getCustomData?(context: ServiceContext): ProviderResult<css.ICSSDataProvider[]>;
18
18
  onDidChangeCustomData?(listener: () => void, context: ServiceContext): Disposable;
19
- }): ServicePlugin;
19
+ }): LanguageServicePlugin;
20
20
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -294,8 +294,9 @@ function create({ cssDocumentSelector = ['css'], scssDocumentSelector = ['scss']
294
294
  }
295
295
  async function worker(document, callback) {
296
296
  const cssLs = getCssLs(document);
297
- if (!cssLs)
297
+ if (!cssLs) {
298
298
  return;
299
+ }
299
300
  await (initializing ??= initialize());
300
301
  return callback(getStylesheet(document, cssLs), cssLs);
301
302
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volar-service-css",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "Integrate vscode-css-languageservice into Volar",
5
5
  "homepage": "https://github.com/volarjs/services/tree/master/packages/css",
6
6
  "bugs": "https://github.com/volarjs/services/issues",
@@ -32,12 +32,12 @@
32
32
  "@types/node": "latest"
33
33
  },
34
34
  "peerDependencies": {
35
- "@volar/language-service": "~2.1.0"
35
+ "@volar/language-service": "~2.2.0-alpha.0"
36
36
  },
37
37
  "peerDependenciesMeta": {
38
38
  "@volar/language-service": {
39
39
  "optional": true
40
40
  }
41
41
  },
42
- "gitHead": "aafefd1d65541462b3e99208f14dbb2cd8477ae9"
42
+ "gitHead": "cbd8ef0ada6eae9656286535599c9b289134d1e3"
43
43
  }