vscode-css-languageservice 6.0.1 → 6.1.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/SECURITY.md +41 -0
  3. package/lib/esm/beautify/beautify-css.js +11 -4
  4. package/lib/esm/cssLanguageService.d.ts +38 -37
  5. package/lib/esm/cssLanguageService.js +73 -72
  6. package/lib/esm/cssLanguageTypes.d.ts +238 -238
  7. package/lib/esm/cssLanguageTypes.js +42 -42
  8. package/lib/esm/data/webCustomData.js +22089 -21959
  9. package/lib/esm/languageFacts/builtinData.js +142 -142
  10. package/lib/esm/languageFacts/colors.js +469 -469
  11. package/lib/esm/languageFacts/dataManager.js +88 -88
  12. package/lib/esm/languageFacts/dataProvider.js +73 -73
  13. package/lib/esm/languageFacts/entry.js +137 -137
  14. package/lib/esm/languageFacts/facts.js +8 -8
  15. package/lib/esm/parser/cssErrors.js +48 -48
  16. package/lib/esm/parser/cssNodes.js +1511 -1502
  17. package/lib/esm/parser/cssParser.js +1606 -1534
  18. package/lib/esm/parser/cssScanner.js +592 -592
  19. package/lib/esm/parser/cssSymbolScope.js +311 -311
  20. package/lib/esm/parser/lessParser.js +715 -714
  21. package/lib/esm/parser/lessScanner.js +57 -57
  22. package/lib/esm/parser/scssErrors.js +18 -18
  23. package/lib/esm/parser/scssParser.js +806 -796
  24. package/lib/esm/parser/scssScanner.js +95 -95
  25. package/lib/esm/services/cssCodeActions.js +77 -77
  26. package/lib/esm/services/cssCompletion.js +1054 -1054
  27. package/lib/esm/services/cssFolding.js +190 -190
  28. package/lib/esm/services/cssFormatter.js +136 -136
  29. package/lib/esm/services/cssHover.js +148 -148
  30. package/lib/esm/services/cssNavigation.js +441 -378
  31. package/lib/esm/services/cssSelectionRange.js +47 -47
  32. package/lib/esm/services/cssValidation.js +41 -41
  33. package/lib/esm/services/lessCompletion.js +378 -378
  34. package/lib/esm/services/lint.js +518 -518
  35. package/lib/esm/services/lintRules.js +76 -76
  36. package/lib/esm/services/lintUtil.js +196 -196
  37. package/lib/esm/services/pathCompletion.js +157 -157
  38. package/lib/esm/services/scssCompletion.js +354 -354
  39. package/lib/esm/services/scssNavigation.js +82 -82
  40. package/lib/esm/services/selectorPrinting.js +492 -492
  41. package/lib/esm/utils/arrays.js +40 -40
  42. package/lib/esm/utils/objects.js +11 -11
  43. package/lib/esm/utils/resources.js +11 -11
  44. package/lib/esm/utils/strings.js +102 -102
  45. package/lib/umd/beautify/beautify-css.js +11 -4
  46. package/lib/umd/cssLanguageService.d.ts +38 -37
  47. package/lib/umd/cssLanguageService.js +104 -99
  48. package/lib/umd/cssLanguageTypes.d.ts +238 -238
  49. package/lib/umd/cssLanguageTypes.js +89 -89
  50. package/lib/umd/data/webCustomData.js +22102 -21972
  51. package/lib/umd/languageFacts/builtinData.js +154 -154
  52. package/lib/umd/languageFacts/colors.js +492 -492
  53. package/lib/umd/languageFacts/dataManager.js +101 -101
  54. package/lib/umd/languageFacts/dataProvider.js +86 -86
  55. package/lib/umd/languageFacts/entry.js +152 -152
  56. package/lib/umd/languageFacts/facts.js +33 -29
  57. package/lib/umd/parser/cssErrors.js +61 -61
  58. package/lib/umd/parser/cssNodes.js +1597 -1587
  59. package/lib/umd/parser/cssParser.js +1619 -1547
  60. package/lib/umd/parser/cssScanner.js +606 -606
  61. package/lib/umd/parser/cssSymbolScope.js +328 -328
  62. package/lib/umd/parser/lessParser.js +728 -727
  63. package/lib/umd/parser/lessScanner.js +70 -70
  64. package/lib/umd/parser/scssErrors.js +31 -31
  65. package/lib/umd/parser/scssParser.js +819 -809
  66. package/lib/umd/parser/scssScanner.js +108 -108
  67. package/lib/umd/services/cssCodeActions.js +90 -90
  68. package/lib/umd/services/cssCompletion.js +1067 -1067
  69. package/lib/umd/services/cssFolding.js +203 -203
  70. package/lib/umd/services/cssFormatter.js +150 -150
  71. package/lib/umd/services/cssHover.js +161 -161
  72. package/lib/umd/services/cssNavigation.js +454 -391
  73. package/lib/umd/services/cssSelectionRange.js +60 -60
  74. package/lib/umd/services/cssValidation.js +54 -54
  75. package/lib/umd/services/lessCompletion.js +391 -391
  76. package/lib/umd/services/lint.js +531 -531
  77. package/lib/umd/services/lintRules.js +91 -91
  78. package/lib/umd/services/lintUtil.js +210 -210
  79. package/lib/umd/services/pathCompletion.js +171 -171
  80. package/lib/umd/services/scssCompletion.js +367 -367
  81. package/lib/umd/services/scssNavigation.js +95 -95
  82. package/lib/umd/services/selectorPrinting.js +510 -510
  83. package/lib/umd/utils/arrays.js +55 -55
  84. package/lib/umd/utils/objects.js +25 -25
  85. package/lib/umd/utils/resources.js +26 -26
  86. package/lib/umd/utils/strings.js +120 -120
  87. package/package.json +13 -12
@@ -1,70 +1,70 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "./cssScanner"], factory);
8
- }
9
- })(function (require, exports) {
10
- /*---------------------------------------------------------------------------------------------
11
- * Copyright (c) Microsoft Corporation. All rights reserved.
12
- * Licensed under the MIT License. See License.txt in the project root for license information.
13
- *--------------------------------------------------------------------------------------------*/
14
- 'use strict';
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.LESSScanner = exports.Ellipsis = void 0;
17
- const scanner = require("./cssScanner");
18
- const _FSL = '/'.charCodeAt(0);
19
- const _NWL = '\n'.charCodeAt(0);
20
- const _CAR = '\r'.charCodeAt(0);
21
- const _LFD = '\f'.charCodeAt(0);
22
- const _TIC = '`'.charCodeAt(0);
23
- const _DOT = '.'.charCodeAt(0);
24
- let customTokenValue = scanner.TokenType.CustomToken;
25
- exports.Ellipsis = customTokenValue++;
26
- class LESSScanner extends scanner.Scanner {
27
- scanNext(offset) {
28
- // LESS: escaped JavaScript code `const a = "dddd"`
29
- const tokenType = this.escapedJavaScript();
30
- if (tokenType !== null) {
31
- return this.finishToken(offset, tokenType);
32
- }
33
- if (this.stream.advanceIfChars([_DOT, _DOT, _DOT])) {
34
- return this.finishToken(offset, exports.Ellipsis);
35
- }
36
- return super.scanNext(offset);
37
- }
38
- comment() {
39
- if (super.comment()) {
40
- return true;
41
- }
42
- if (!this.inURL && this.stream.advanceIfChars([_FSL, _FSL])) {
43
- this.stream.advanceWhileChar((ch) => {
44
- switch (ch) {
45
- case _NWL:
46
- case _CAR:
47
- case _LFD:
48
- return false;
49
- default:
50
- return true;
51
- }
52
- });
53
- return true;
54
- }
55
- else {
56
- return false;
57
- }
58
- }
59
- escapedJavaScript() {
60
- const ch = this.stream.peekChar();
61
- if (ch === _TIC) {
62
- this.stream.advance(1);
63
- this.stream.advanceWhileChar((ch) => { return ch !== _TIC; });
64
- return this.stream.advanceIfChar(_TIC) ? scanner.TokenType.EscapedJavaScript : scanner.TokenType.BadEscapedJavaScript;
65
- }
66
- return null;
67
- }
68
- }
69
- exports.LESSScanner = LESSScanner;
70
- });
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./cssScanner"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ /*---------------------------------------------------------------------------------------------
11
+ * Copyright (c) Microsoft Corporation. All rights reserved.
12
+ * Licensed under the MIT License. See License.txt in the project root for license information.
13
+ *--------------------------------------------------------------------------------------------*/
14
+ 'use strict';
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LESSScanner = exports.Ellipsis = void 0;
17
+ const scanner = require("./cssScanner");
18
+ const _FSL = '/'.charCodeAt(0);
19
+ const _NWL = '\n'.charCodeAt(0);
20
+ const _CAR = '\r'.charCodeAt(0);
21
+ const _LFD = '\f'.charCodeAt(0);
22
+ const _TIC = '`'.charCodeAt(0);
23
+ const _DOT = '.'.charCodeAt(0);
24
+ let customTokenValue = scanner.TokenType.CustomToken;
25
+ exports.Ellipsis = customTokenValue++;
26
+ class LESSScanner extends scanner.Scanner {
27
+ scanNext(offset) {
28
+ // LESS: escaped JavaScript code `const a = "dddd"`
29
+ const tokenType = this.escapedJavaScript();
30
+ if (tokenType !== null) {
31
+ return this.finishToken(offset, tokenType);
32
+ }
33
+ if (this.stream.advanceIfChars([_DOT, _DOT, _DOT])) {
34
+ return this.finishToken(offset, exports.Ellipsis);
35
+ }
36
+ return super.scanNext(offset);
37
+ }
38
+ comment() {
39
+ if (super.comment()) {
40
+ return true;
41
+ }
42
+ if (!this.inURL && this.stream.advanceIfChars([_FSL, _FSL])) {
43
+ this.stream.advanceWhileChar((ch) => {
44
+ switch (ch) {
45
+ case _NWL:
46
+ case _CAR:
47
+ case _LFD:
48
+ return false;
49
+ default:
50
+ return true;
51
+ }
52
+ });
53
+ return true;
54
+ }
55
+ else {
56
+ return false;
57
+ }
58
+ }
59
+ escapedJavaScript() {
60
+ const ch = this.stream.peekChar();
61
+ if (ch === _TIC) {
62
+ this.stream.advance(1);
63
+ this.stream.advanceWhileChar((ch) => { return ch !== _TIC; });
64
+ return this.stream.advanceIfChar(_TIC) ? scanner.TokenType.EscapedJavaScript : scanner.TokenType.BadEscapedJavaScript;
65
+ }
66
+ return null;
67
+ }
68
+ }
69
+ exports.LESSScanner = LESSScanner;
70
+ });
@@ -1,31 +1,31 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "vscode-nls"], factory);
8
- }
9
- })(function (require, exports) {
10
- /*---------------------------------------------------------------------------------------------
11
- * Copyright (c) Microsoft Corporation. All rights reserved.
12
- * Licensed under the MIT License. See License.txt in the project root for license information.
13
- *--------------------------------------------------------------------------------------------*/
14
- 'use strict';
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.SCSSParseError = exports.SCSSIssueType = void 0;
17
- const nls = require("vscode-nls");
18
- const localize = nls.loadMessageBundle();
19
- class SCSSIssueType {
20
- constructor(id, message) {
21
- this.id = id;
22
- this.message = message;
23
- }
24
- }
25
- exports.SCSSIssueType = SCSSIssueType;
26
- exports.SCSSParseError = {
27
- FromExpected: new SCSSIssueType('scss-fromexpected', localize('expected.from', "'from' expected")),
28
- ThroughOrToExpected: new SCSSIssueType('scss-throughexpected', localize('expected.through', "'through' or 'to' expected")),
29
- InExpected: new SCSSIssueType('scss-fromexpected', localize('expected.in', "'in' expected")),
30
- };
31
- });
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "vscode-nls"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ /*---------------------------------------------------------------------------------------------
11
+ * Copyright (c) Microsoft Corporation. All rights reserved.
12
+ * Licensed under the MIT License. See License.txt in the project root for license information.
13
+ *--------------------------------------------------------------------------------------------*/
14
+ 'use strict';
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.SCSSParseError = exports.SCSSIssueType = void 0;
17
+ const nls = require("vscode-nls");
18
+ const localize = nls.loadMessageBundle();
19
+ class SCSSIssueType {
20
+ constructor(id, message) {
21
+ this.id = id;
22
+ this.message = message;
23
+ }
24
+ }
25
+ exports.SCSSIssueType = SCSSIssueType;
26
+ exports.SCSSParseError = {
27
+ FromExpected: new SCSSIssueType('scss-fromexpected', localize('expected.from', "'from' expected")),
28
+ ThroughOrToExpected: new SCSSIssueType('scss-throughexpected', localize('expected.through', "'through' or 'to' expected")),
29
+ InExpected: new SCSSIssueType('scss-fromexpected', localize('expected.in', "'in' expected")),
30
+ };
31
+ });