vscode-css-languageservice 6.1.0 → 6.2.1

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 (45) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +4 -3
  3. package/lib/esm/beautify/beautify-css.js +1 -1
  4. package/lib/esm/cssLanguageService.d.ts +2 -1
  5. package/lib/esm/cssLanguageService.js +1 -0
  6. package/lib/esm/cssLanguageTypes.d.ts +2 -2
  7. package/lib/esm/data/webCustomData.js +3502 -310
  8. package/lib/esm/languageFacts/colors.js +6 -7
  9. package/lib/esm/parser/cssErrors.js +34 -35
  10. package/lib/esm/parser/cssNodes.js +25 -4
  11. package/lib/esm/parser/cssParser.js +31 -16
  12. package/lib/esm/parser/lessParser.js +1 -0
  13. package/lib/esm/parser/scssErrors.js +4 -5
  14. package/lib/esm/parser/scssParser.js +4 -0
  15. package/lib/esm/services/cssCodeActions.js +2 -3
  16. package/lib/esm/services/cssCompletion.js +13 -4
  17. package/lib/esm/services/cssNavigation.js +44 -25
  18. package/lib/esm/services/lessCompletion.js +58 -59
  19. package/lib/esm/services/lint.js +64 -18
  20. package/lib/esm/services/lintRules.js +21 -22
  21. package/lib/esm/services/scssCompletion.js +107 -107
  22. package/lib/esm/services/scssNavigation.js +35 -57
  23. package/lib/esm/services/selectorPrinting.js +2 -3
  24. package/lib/umd/beautify/beautify-css.js +1 -1
  25. package/lib/umd/cssLanguageService.d.ts +2 -1
  26. package/lib/umd/cssLanguageService.js +1 -0
  27. package/lib/umd/cssLanguageTypes.d.ts +2 -2
  28. package/lib/umd/data/webCustomData.js +3502 -310
  29. package/lib/umd/languageFacts/colors.js +7 -8
  30. package/lib/umd/parser/cssErrors.js +35 -36
  31. package/lib/umd/parser/cssNodes.js +27 -5
  32. package/lib/umd/parser/cssParser.js +31 -16
  33. package/lib/umd/parser/lessParser.js +1 -0
  34. package/lib/umd/parser/scssErrors.js +5 -6
  35. package/lib/umd/parser/scssParser.js +4 -0
  36. package/lib/umd/services/cssCodeActions.js +3 -4
  37. package/lib/umd/services/cssCompletion.js +14 -5
  38. package/lib/umd/services/cssNavigation.js +45 -26
  39. package/lib/umd/services/lessCompletion.js +59 -60
  40. package/lib/umd/services/lint.js +65 -19
  41. package/lib/umd/services/lintRules.js +22 -23
  42. package/lib/umd/services/scssCompletion.js +108 -108
  43. package/lib/umd/services/scssNavigation.js +34 -56
  44. package/lib/umd/services/selectorPrinting.js +3 -4
  45. package/package.json +13 -16
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 6.2.0 / 2022-11-09
2
+ ================
3
+ * new API `LanguageService.prepareRename`, returning `Range`
4
+
1
5
  6.1.0 / 2022-09-02
2
6
  ================
3
7
  * new API `LanguageService.findDocumentSymbols2`, returning `DocumentSymbol[]`
package/README.md CHANGED
@@ -3,8 +3,8 @@ Language services for CSS, LESS and SCSS
3
3
 
4
4
  [![npm Package](https://img.shields.io/npm/v/vscode-css-languageservice.svg?style=flat-square)](https://www.npmjs.org/package/vscode-css-languageservice)
5
5
  [![NPM Downloads](https://img.shields.io/npm/dm/vscode-css-languageservice.svg)](https://npmjs.org/package/vscode-css-languageservice)
6
- [![Azure DevOps Build Status](https://img.shields.io/azure-devops/build/vscode/2377f926-a00b-46ed-9fb1-79465b3e998b/20.svg?label=Azure%20DevOps)](https://dev.azure.com/vscode/vscode-css-languageservice/_build?definitionId=20)
7
- [![Travis Build Status](https://img.shields.io/travis/microsoft/vscode-css-languageservice.svg?label=Travis)](https://travis-ci.org/Microsoft/vscode-css-languageservice)
6
+ [![Build Status](https://github.com/microsoft/vscode-css-languageservice/actions/workflows/node.js.yml/badge.svg)](https://github.com/microsoft/vscode-css-languageservice/actions)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
8
 
9
9
  Why?
10
10
  ----
@@ -20,7 +20,8 @@ and the Monaco editor.
20
20
  - *doCodeActions* evaluates code actions for the given location, typically to fix a problem.
21
21
  - *findColorSymbols* evaluates all color symbols in the given document
22
22
  - *doRename* renames all symbols connected to the given location.
23
- - *getFoldingRanges* returns folding ranges in the given document.
23
+ - *prepareRename* the range of the node that can be renamed
24
+ - *getFoldingRanges* returns folding ranges in the given document.
24
25
 
25
26
  Installation
26
27
  ------------
@@ -1,5 +1,5 @@
1
1
  // copied from js-beautify/js/lib/beautify-css.js
2
- // version: 1.14.6
2
+ // version: 1.14.7
3
3
  /* AUTO-GENERATED. DO NOT MODIFY. */
4
4
  /*
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { LanguageSettings, ICompletionParticipant, DocumentContext, LanguageServiceOptions, Diagnostic, Position, CompletionList, Hover, Location, DocumentHighlight, DocumentLink, SymbolInformation, Range, CodeActionContext, Command, CodeAction, ColorInformation, Color, ColorPresentation, WorkspaceEdit, FoldingRange, SelectionRange, TextDocument, ICSSDataProvider, CSSDataV1, HoverSettings, CompletionSettings, TextEdit, CSSFormatConfiguration, DocumentSymbol } from './cssLanguageTypes';
2
- export declare type Stylesheet = {};
2
+ export type Stylesheet = {};
3
3
  export * from './cssLanguageTypes';
4
4
  export interface LanguageService {
5
5
  configure(raw?: LanguageSettings): void;
@@ -24,6 +24,7 @@ export interface LanguageService {
24
24
  doCodeActions2(document: TextDocument, range: Range, context: CodeActionContext, stylesheet: Stylesheet): CodeAction[];
25
25
  findDocumentColors(document: TextDocument, stylesheet: Stylesheet): ColorInformation[];
26
26
  getColorPresentations(document: TextDocument, stylesheet: Stylesheet, color: Color, range: Range): ColorPresentation[];
27
+ prepareRename(document: TextDocument, position: Position, stylesheet: Stylesheet): Range | undefined;
27
28
  doRename(document: TextDocument, position: Position, newName: string, stylesheet: Stylesheet): WorkspaceEdit;
28
29
  getFoldingRanges(document: TextDocument, context?: {
29
30
  rangeLimit?: number;
@@ -53,6 +53,7 @@ function createFacade(parser, completion, hover, navigation, codeActions, valida
53
53
  doCodeActions2: codeActions.doCodeActions2.bind(codeActions),
54
54
  findDocumentColors: navigation.findDocumentColors.bind(navigation),
55
55
  getColorPresentations: navigation.getColorPresentations.bind(navigation),
56
+ prepareRename: navigation.prepareRename.bind(navigation),
56
57
  doRename: navigation.doRename.bind(navigation),
57
58
  getFoldingRanges,
58
59
  getSelectionRanges
@@ -1,7 +1,7 @@
1
1
  import { Range, Position, DocumentUri, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, DefinitionLink, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind } from 'vscode-languageserver-types';
2
2
  import { TextDocument } from 'vscode-languageserver-textdocument';
3
3
  export { TextDocument, Range, Position, DocumentUri, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, DefinitionLink, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind };
4
- export declare type LintSettings = {
4
+ export type LintSettings = {
5
5
  [key: string]: any;
6
6
  };
7
7
  export interface CompletionSettings {
@@ -112,7 +112,7 @@ export interface LanguageServiceOptions {
112
112
  */
113
113
  clientCapabilities?: ClientCapabilities;
114
114
  }
115
- export declare type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
115
+ export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
116
116
  export interface IReference {
117
117
  name: string;
118
118
  url: string;