monaco-css
Advanced tools
Comparing version 3.8.1 to 3.9.0
{ | ||
"name": "monaco-css", | ||
"version": "3.8.1", | ||
"version": "3.9.0", | ||
"description": "CSS, LESS and SCSS plugin for the Monaco Editor", | ||
@@ -26,4 +26,4 @@ "scripts": { | ||
"husky": "^5.1.3", | ||
"monaco-editor-core": "0.28.1", | ||
"monaco-languages": "2.4.0", | ||
"monaco-editor-core": "0.30.0", | ||
"monaco-languages": "2.11.0", | ||
"monaco-plugin-helpers": "^1.0.3", | ||
@@ -35,5 +35,5 @@ "prettier": "^2.2.1", | ||
"terser": "^5.7.0", | ||
"vscode-css-languageservice": "^5.1.5", | ||
"vscode-css-languageservice": "^5.1.8", | ||
"vscode-languageserver-types": "3.16.0", | ||
"vscode-languageserver-textdocument": "^1.0.1" | ||
"vscode-languageserver-textdocument": "^1.0.2" | ||
}, | ||
@@ -40,0 +40,0 @@ "husky": { |
@@ -0,0 +0,0 @@ /*--------------------------------------------------------------------------------------------- |
@@ -6,4 +6,4 @@ /*--------------------------------------------------------------------------------------------- | ||
'use strict'; | ||
import { Range, Position, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind } from './../vscode-languageserver-types/main'; | ||
import { TextDocument } from './../vscode-languageserver-textdocument/lib/esm/main'; | ||
import { Range, Position, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind } from '../vscode-languageserver-types/main'; | ||
import { TextDocument } from '../vscode-languageserver-textdocument/lib/esm/main'; | ||
export { TextDocument, Range, Position, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind }; | ||
@@ -10,0 +10,0 @@ export var ClientCapabilities; |
@@ -50,2 +50,6 @@ /*--------------------------------------------------------------------------------------------- | ||
}; | ||
export var cssWideFunctions = { | ||
'var()': 'Evaluates the value of a custom variable.', | ||
'calc()': 'Evaluates an mathematical expression. The following operators can be used: + - * /.' | ||
}; | ||
export var imageFunctions = { | ||
@@ -52,0 +56,0 @@ 'url()': 'Reference an image file by URL', |
@@ -6,3 +6,3 @@ /*--------------------------------------------------------------------------------------------- | ||
import * as nodes from '../parser/cssNodes'; | ||
import * as nls from './../../../fillers/vscode-nls'; | ||
import * as nls from '../../../fillers/vscode-nls'; | ||
var localize = nls.loadMessageBundle(); | ||
@@ -9,0 +9,0 @@ export var colorFunctions = [ |
@@ -6,3 +6,3 @@ /*--------------------------------------------------------------------------------------------- | ||
'use strict'; | ||
import * as nls from './../../../fillers/vscode-nls'; | ||
import * as nls from '../../../fillers/vscode-nls'; | ||
var localize = nls.loadMessageBundle(); | ||
@@ -9,0 +9,0 @@ var CSSIssueType = /** @class */ (function () { |
@@ -6,2 +6,11 @@ /*--------------------------------------------------------------------------------------------- | ||
'use strict'; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
import { TokenType, Scanner } from './cssScanner'; | ||
@@ -37,3 +46,7 @@ import * as nodes from './cssNodes'; | ||
}; | ||
Parser.prototype.peekOne = function (types) { | ||
Parser.prototype.peekOne = function () { | ||
var types = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
types[_i] = arguments[_i]; | ||
} | ||
return types.indexOf(this.token.type) !== -1; | ||
@@ -447,9 +460,11 @@ }; | ||
} | ||
// try tp parse as expression | ||
// try to parse as expression | ||
var expression = this._parseExpr(); | ||
if (expression && !expression.isErroneous(true)) { | ||
this._parsePrio(); | ||
if (this.peekOne(stopTokens || [TokenType.SemiColon])) { | ||
if (this.peekOne.apply(this, __spreadArray(__spreadArray([], (stopTokens || []), false), [TokenType.SemiColon, TokenType.EOF], false))) { | ||
node.setValue(expression); | ||
node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist | ||
if (this.peek(TokenType.SemiColon)) { | ||
node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist | ||
} | ||
return this.finish(node); | ||
@@ -806,7 +821,7 @@ } | ||
var node = this.create(nodes.Medialist); | ||
if (!node.addChild(this._parseMediaQuery([TokenType.CurlyL]))) { | ||
if (!node.addChild(this._parseMediaQuery())) { | ||
return this.finish(node, ParseError.MediaQueryExpected); | ||
} | ||
while (this.accept(TokenType.Comma)) { | ||
if (!node.addChild(this._parseMediaQuery([TokenType.CurlyL]))) { | ||
if (!node.addChild(this._parseMediaQuery())) { | ||
return this.finish(node, ParseError.MediaQueryExpected); | ||
@@ -817,11 +832,9 @@ } | ||
}; | ||
Parser.prototype._parseMediaQuery = function (resyncStopToken) { | ||
// http://www.w3.org/TR/css3-mediaqueries/ | ||
// media_query : [ONLY | NOT]? S* IDENT S* [ AND S* expression ]* | expression [ AND S* expression ]* | ||
// expression : '(' S* IDENT S* [ ':' S* expr ]? ')' S* | ||
Parser.prototype._parseMediaQuery = function () { | ||
// <media-query> = <media-condition> | [ not | only ]? <media-type> [ and <media-condition-without-or> ]? | ||
var node = this.create(nodes.MediaQuery); | ||
var parseExpression = true; | ||
var hasContent = false; | ||
var pos = this.mark(); | ||
this.acceptIdent('not'); | ||
if (!this.peek(TokenType.ParenthesisL)) { | ||
if (this.acceptIdent('only') || this.acceptIdent('not')) { | ||
if (this.acceptIdent('only')) { | ||
// optional | ||
@@ -832,38 +845,119 @@ } | ||
} | ||
hasContent = true; | ||
parseExpression = this.acceptIdent('and'); | ||
if (this.acceptIdent('and')) { | ||
node.addChild(this._parseMediaCondition()); | ||
} | ||
} | ||
else { | ||
this.restoreAtMark(pos); // 'not' is part of the MediaCondition | ||
node.addChild(this._parseMediaCondition()); | ||
} | ||
return this.finish(node); | ||
}; | ||
Parser.prototype._parseRatio = function () { | ||
var pos = this.mark(); | ||
var node = this.create(nodes.RatioValue); | ||
if (!this._parseNumeric()) { | ||
return null; | ||
} | ||
if (!this.acceptDelim('/')) { | ||
this.restoreAtMark(pos); | ||
return null; | ||
} | ||
if (!this._parseNumeric()) { | ||
return this.finish(node, ParseError.NumberExpected); | ||
} | ||
return this.finish(node); | ||
}; | ||
Parser.prototype._parseMediaCondition = function () { | ||
// <media-condition> = <media-not> | <media-and> | <media-or> | <media-in-parens> | ||
// <media-not> = not <media-in-parens> | ||
// <media-and> = <media-in-parens> [ and <media-in-parens> ]+ | ||
// <media-or> = <media-in-parens> [ or <media-in-parens> ]+ | ||
// <media-in-parens> = ( <media-condition> ) | <media-feature> | <general-enclosed> | ||
var node = this.create(nodes.MediaCondition); | ||
this.acceptIdent('not'); | ||
var parseExpression = true; | ||
while (parseExpression) { | ||
// Allow short-circuting for other language constructs. | ||
if (node.addChild(this._parseMediaContentStart())) { | ||
parseExpression = this.acceptIdent('and'); | ||
continue; | ||
if (!this.accept(TokenType.ParenthesisL)) { | ||
return this.finish(node, ParseError.LeftParenthesisExpected, [], [TokenType.CurlyL]); | ||
} | ||
if (!this.accept(TokenType.ParenthesisL)) { | ||
if (hasContent) { | ||
return this.finish(node, ParseError.LeftParenthesisExpected, [], resyncStopToken); | ||
if (this.peek(TokenType.ParenthesisL) || this.peekIdent('not')) { | ||
// <media-condition> | ||
node.addChild(this._parseMediaCondition()); | ||
} | ||
else { | ||
node.addChild(this._parseMediaFeature()); | ||
} | ||
// not yet implemented: general enclosed | ||
if (!this.accept(TokenType.ParenthesisR)) { | ||
return this.finish(node, ParseError.RightParenthesisExpected, [], [TokenType.CurlyL]); | ||
} | ||
parseExpression = this.acceptIdent('and') || this.acceptIdent('or'); | ||
} | ||
return this.finish(node); | ||
}; | ||
Parser.prototype._parseMediaFeature = function () { | ||
var _this = this; | ||
var resyncStopToken = [TokenType.ParenthesisR]; | ||
var node = this.create(nodes.MediaFeature); | ||
// <media-feature> = ( [ <mf-plain> | <mf-boolean> | <mf-range> ] ) | ||
// <mf-plain> = <mf-name> : <mf-value> | ||
// <mf-boolean> = <mf-name> | ||
// <mf-range> = <mf-name> [ '<' | '>' ]? '='? <mf-value> | <mf-value> [ '<' | '>' ]? '='? <mf-name> | <mf-value> '<' '='? <mf-name> '<' '='? <mf-value> | <mf-value> '>' '='? <mf-name> '>' '='? <mf-value> | ||
var parseRangeOperator = function () { | ||
if (_this.acceptDelim('<') || _this.acceptDelim('>')) { | ||
if (!_this.hasWhitespace()) { | ||
_this.acceptDelim('='); | ||
} | ||
return null; | ||
return true; | ||
} | ||
if (!node.addChild(this._parseMediaFeatureName())) { | ||
return this.finish(node, ParseError.IdentifierExpected, [], resyncStopToken); | ||
else if (_this.acceptDelim('=')) { | ||
return true; | ||
} | ||
return false; | ||
}; | ||
if (node.addChild(this._parseMediaFeatureName())) { | ||
if (this.accept(TokenType.Colon)) { | ||
if (!node.addChild(this._parseExpr())) { | ||
if (!node.addChild(this._parseMediaFeatureValue())) { | ||
return this.finish(node, ParseError.TermExpected, [], resyncStopToken); | ||
} | ||
} | ||
if (!this.accept(TokenType.ParenthesisR)) { | ||
return this.finish(node, ParseError.RightParenthesisExpected, [], resyncStopToken); | ||
else if (parseRangeOperator()) { | ||
if (!node.addChild(this._parseMediaFeatureValue())) { | ||
return this.finish(node, ParseError.TermExpected, [], resyncStopToken); | ||
} | ||
if (parseRangeOperator()) { | ||
if (!node.addChild(this._parseMediaFeatureValue())) { | ||
return this.finish(node, ParseError.TermExpected, [], resyncStopToken); | ||
} | ||
} | ||
} | ||
parseExpression = this.acceptIdent('and'); | ||
else { | ||
// <mf-boolean> = <mf-name> | ||
} | ||
} | ||
else if (node.addChild(this._parseMediaFeatureValue())) { | ||
if (!parseRangeOperator()) { | ||
return this.finish(node, ParseError.OperatorExpected, [], resyncStopToken); | ||
} | ||
if (!node.addChild(this._parseMediaFeatureName())) { | ||
return this.finish(node, ParseError.IdentifierExpected, [], resyncStopToken); | ||
} | ||
if (parseRangeOperator()) { | ||
if (!node.addChild(this._parseMediaFeatureValue())) { | ||
return this.finish(node, ParseError.TermExpected, [], resyncStopToken); | ||
} | ||
} | ||
} | ||
else { | ||
return this.finish(node, ParseError.IdentifierExpected, [], resyncStopToken); | ||
} | ||
return this.finish(node); | ||
}; | ||
Parser.prototype._parseMediaContentStart = function () { | ||
return null; | ||
}; | ||
Parser.prototype._parseMediaFeatureName = function () { | ||
return this._parseIdent(); | ||
}; | ||
Parser.prototype._parseMediaFeatureValue = function () { | ||
return this._parseRatio() || this._parseTermExpression(); | ||
}; | ||
Parser.prototype._parseMedium = function () { | ||
@@ -870,0 +964,0 @@ var node = this.create(nodes.Node); |
@@ -509,4 +509,4 @@ /*--------------------------------------------------------------------------------------------- | ||
var hasMinus = this._minus(result); | ||
if (hasMinus && this._minus(result) /* -- */) { | ||
if (this._identFirstChar(result) || this._escape(result)) { | ||
if (hasMinus) { | ||
if (this._minus(result) /* -- */ || this._identFirstChar(result) || this._escape(result)) { | ||
while (this._identChar(result) || this._escape(result)) { | ||
@@ -513,0 +513,0 @@ // loop |
@@ -89,4 +89,4 @@ /*--------------------------------------------------------------------------------------------- | ||
}; | ||
LESSParser.prototype._parseMediaQuery = function (resyncStopToken) { | ||
var node = _super.prototype._parseMediaQuery.call(this, resyncStopToken); | ||
LESSParser.prototype._parseMediaQuery = function () { | ||
var node = _super.prototype._parseMediaQuery.call(this); | ||
if (!node) { | ||
@@ -93,0 +93,0 @@ var node_1 = this.create(nodes.MediaQuery); |
@@ -6,3 +6,3 @@ /*--------------------------------------------------------------------------------------------- | ||
'use strict'; | ||
import * as nls from './../../../fillers/vscode-nls'; | ||
import * as nls from '../../../fillers/vscode-nls'; | ||
var localize = nls.loadMessageBundle(); | ||
@@ -9,0 +9,0 @@ var SCSSIssueType = /** @class */ (function () { |
@@ -107,4 +107,4 @@ /*--------------------------------------------------------------------------------------------- | ||
}; | ||
SCSSParser.prototype._parseMediaContentStart = function () { | ||
return this._parseInterpolation(); | ||
SCSSParser.prototype._parseMediaCondition = function () { | ||
return this._parseInterpolation() || _super.prototype._parseMediaCondition.call(this); | ||
}; | ||
@@ -111,0 +111,0 @@ SCSSParser.prototype._parseMediaFeatureName = function () { |
@@ -10,3 +10,3 @@ /*--------------------------------------------------------------------------------------------- | ||
import { Command, TextEdit, CodeAction, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier } from '../cssLanguageTypes'; | ||
import * as nls from './../../../fillers/vscode-nls'; | ||
import * as nls from '../../../fillers/vscode-nls'; | ||
var localize = nls.loadMessageBundle(); | ||
@@ -13,0 +13,0 @@ var CSSCodeActions = /** @class */ (function () { |
@@ -47,3 +47,3 @@ /*--------------------------------------------------------------------------------------------- | ||
import { Position, CompletionItemKind, Range, TextEdit, InsertTextFormat, MarkupKind, CompletionItemTag } from '../cssLanguageTypes'; | ||
import * as nls from './../../../fillers/vscode-nls'; | ||
import * as nls from '../../../fillers/vscode-nls'; | ||
import { isDefined } from '../utils/objects'; | ||
@@ -53,2 +53,6 @@ import { PathCompletionParticipant } from './pathCompletion'; | ||
var SnippetFormat = InsertTextFormat.Snippet; | ||
var retriggerCommand = { | ||
title: 'Suggest', | ||
command: 'editor.action.triggerSuggest' | ||
}; | ||
var SortTexts; | ||
@@ -287,6 +291,3 @@ (function (SortTexts) { | ||
if (triggerPropertyValueCompletion && retrigger) { | ||
item.command = { | ||
title: 'Suggest', | ||
command: 'editor.action.triggerSuggest' | ||
}; | ||
item.command = retriggerCommand; | ||
} | ||
@@ -439,2 +440,13 @@ var relevance = typeof entry.relevance === 'number' ? Math.min(Math.max(entry.relevance, 0), 99) : 50; | ||
} | ||
for (var func in languageFacts.cssWideFunctions) { | ||
var insertText = moveCursorInsideParenthesis(func); | ||
result.items.push({ | ||
label: func, | ||
documentation: languageFacts.cssWideFunctions[func], | ||
textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertText), | ||
kind: CompletionItemKind.Function, | ||
insertTextFormat: SnippetFormat, | ||
command: strings.startsWith(func, 'var') ? retriggerCommand : undefined | ||
}); | ||
} | ||
return result; | ||
@@ -474,19 +486,32 @@ }; | ||
CSSCompletion.prototype.getVariableProposalsForCSSVarFunction = function (result) { | ||
var allReferencedVariables = new Set(); | ||
this.styleSheet.acceptVisitor(new VariableCollector(allReferencedVariables, this.offset)); | ||
var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, nodes.ReferenceType.Variable); | ||
symbols = symbols.filter(function (symbol) { | ||
return strings.startsWith(symbol.name, '--'); | ||
}); | ||
for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) { | ||
var symbol = symbols_2[_i]; | ||
var completionItem = { | ||
label: symbol.name, | ||
documentation: symbol.value ? strings.getLimitedString(symbol.value) : symbol.value, | ||
textEdit: TextEdit.replace(this.getCompletionRange(null), symbol.name), | ||
kind: CompletionItemKind.Variable | ||
}; | ||
if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) { | ||
completionItem.kind = CompletionItemKind.Color; | ||
if (strings.startsWith(symbol.name, '--')) { | ||
var completionItem = { | ||
label: symbol.name, | ||
documentation: symbol.value ? strings.getLimitedString(symbol.value) : symbol.value, | ||
textEdit: TextEdit.replace(this.getCompletionRange(null), symbol.name), | ||
kind: CompletionItemKind.Variable | ||
}; | ||
if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) { | ||
completionItem.kind = CompletionItemKind.Color; | ||
} | ||
result.items.push(completionItem); | ||
} | ||
result.items.push(completionItem); | ||
allReferencedVariables.remove(symbol.name); | ||
} | ||
for (var _a = 0, _b = allReferencedVariables.getEntries(); _a < _b.length; _a++) { | ||
var name = _b[_a]; | ||
if (strings.startsWith(name, '--')) { | ||
var completionItem = { | ||
label: name, | ||
textEdit: TextEdit.replace(this.getCompletionRange(null), name), | ||
kind: CompletionItemKind.Variable | ||
}; | ||
result.items.push(completionItem); | ||
} | ||
} | ||
return result; | ||
@@ -1041,20 +1066,2 @@ }; | ||
} | ||
/** | ||
* Rank number should all be same length strings | ||
*/ | ||
function computeRankNumber(n) { | ||
var nstr = n.toString(); | ||
switch (nstr.length) { | ||
case 4: | ||
return nstr; | ||
case 3: | ||
return '0' + nstr; | ||
case 2: | ||
return '00' + nstr; | ||
case 1: | ||
return '000' + nstr; | ||
default: | ||
return '0000'; | ||
} | ||
} | ||
var Set = /** @class */ (function () { | ||
@@ -1067,2 +1074,5 @@ function Set() { | ||
}; | ||
Set.prototype.remove = function (entry) { | ||
delete this.entries[entry]; | ||
}; | ||
Set.prototype.getEntries = function () { | ||
@@ -1119,2 +1129,18 @@ return Object.keys(this.entries); | ||
}()); | ||
var VariableCollector = /** @class */ (function () { | ||
function VariableCollector(entries, currentOffset) { | ||
this.entries = entries; | ||
this.currentOffset = currentOffset; | ||
// nothing to do | ||
} | ||
VariableCollector.prototype.visitNode = function (node) { | ||
if (node instanceof nodes.Identifier && node.isCustomProperty) { | ||
if (this.currentOffset < node.offset || node.end < this.currentOffset) { | ||
this.entries.add(node.getText()); | ||
} | ||
} | ||
return true; | ||
}; | ||
return VariableCollector; | ||
}()); | ||
function getCurrentWord(document, offset) { | ||
@@ -1121,0 +1147,0 @@ var i = offset - 1; |
@@ -43,3 +43,3 @@ /*--------------------------------------------------------------------------------------------- | ||
import { DocumentHighlightKind, Location, Range, SymbolKind, TextEdit, FileType } from '../cssLanguageTypes'; | ||
import * as nls from './../../../fillers/vscode-nls'; | ||
import * as nls from '../../../fillers/vscode-nls'; | ||
import * as nodes from '../parser/cssNodes'; | ||
@@ -46,0 +46,0 @@ import { Symbols } from '../parser/cssSymbolScope'; |
@@ -23,3 +23,3 @@ /*--------------------------------------------------------------------------------------------- | ||
import { CompletionItemKind, InsertTextFormat, TextEdit } from '../cssLanguageTypes'; | ||
import * as nls from './../../../fillers/vscode-nls'; | ||
import * as nls from '../../../fillers/vscode-nls'; | ||
var localize = nls.loadMessageBundle(); | ||
@@ -26,0 +26,0 @@ var LESSCompletion = /** @class */ (function (_super) { |
@@ -6,3 +6,3 @@ /*--------------------------------------------------------------------------------------------- | ||
'use strict'; | ||
import * as nls from './../../../fillers/vscode-nls'; | ||
import * as nls from '../../../fillers/vscode-nls'; | ||
import * as languageFacts from '../languageFacts/facts'; | ||
@@ -9,0 +9,0 @@ import * as nodes from '../parser/cssNodes'; |
@@ -7,3 +7,3 @@ /*--------------------------------------------------------------------------------------------- | ||
import * as nodes from '../parser/cssNodes'; | ||
import * as nls from './../../../fillers/vscode-nls'; | ||
import * as nls from '../../../fillers/vscode-nls'; | ||
var localize = nls.loadMessageBundle(); | ||
@@ -10,0 +10,0 @@ var Warning = nodes.Level.Warning; |
@@ -24,3 +24,3 @@ /*--------------------------------------------------------------------------------------------- | ||
import { CompletionItemKind, TextEdit, InsertTextFormat } from '../cssLanguageTypes'; | ||
import * as nls from './../../../fillers/vscode-nls'; | ||
import * as nls from '../../../fillers/vscode-nls'; | ||
var localize = nls.loadMessageBundle(); | ||
@@ -27,0 +27,0 @@ var SCSSCompletion = /** @class */ (function (_super) { |
@@ -59,3 +59,3 @@ /*--------------------------------------------------------------------------------------------- | ||
import * as nodes from '../parser/cssNodes'; | ||
import { URI } from './../../vscode-uri/index'; | ||
import { URI } from '../../vscode-uri/index'; | ||
import { startsWith } from '../utils/strings'; | ||
@@ -62,0 +62,0 @@ var SCSSNavigation = /** @class */ (function (_super) { |
@@ -23,3 +23,3 @@ /*--------------------------------------------------------------------------------------------- | ||
import { Scanner } from '../parser/cssScanner'; | ||
import * as nls from './../../../fillers/vscode-nls'; | ||
import * as nls from '../../../fillers/vscode-nls'; | ||
var localize = nls.loadMessageBundle(); | ||
@@ -26,0 +26,0 @@ var Element = /** @class */ (function () { |
@@ -14,3 +14,3 @@ /*--------------------------------------------------------------------------------------------- | ||
}; | ||
import { URI, Utils } from './../../vscode-uri/index'; | ||
import { URI, Utils } from '../../vscode-uri/index'; | ||
export function dirname(uriString) { | ||
@@ -17,0 +17,0 @@ return Utils.dirname(URI.parse(uriString)).toString(); |
@@ -6,2 +6,11 @@ /* -------------------------------------------------------------------------------------------- | ||
'use strict'; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
var FullTextDocument = /** @class */ (function () { | ||
@@ -19,3 +28,3 @@ function FullTextDocument(uri, languageId, version, content) { | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -27,3 +36,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -35,3 +44,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -69,3 +78,3 @@ }); | ||
if (addedLineOffsets.length < 10000) { | ||
lineOffsets.splice.apply(lineOffsets, [startLine + 1, endLine - startLine].concat(addedLineOffsets)); | ||
lineOffsets.splice.apply(lineOffsets, __spreadArray([startLine + 1, endLine - startLine], addedLineOffsets, false)); | ||
} | ||
@@ -136,3 +145,3 @@ else { // avoid too many arguments for splice | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -168,6 +177,7 @@ }); | ||
/** | ||
* Updates a TextDocument by modifing its content. | ||
* Updates a TextDocument by modifying its content. | ||
* | ||
* @param document the document to update. Only documents created by TextDocument.create are valid inputs. | ||
* @param changes the changes to apply to the document. | ||
* @param version the changes version for the document. | ||
* @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter. | ||
@@ -174,0 +184,0 @@ * |
@@ -0,0 +0,0 @@ /*--------------------------------------------------------------------------------------------- |
@@ -0,0 +0,0 @@ /*--------------------------------------------------------------------------------------------- |
@@ -0,0 +0,0 @@ /*--------------------------------------------------------------------------------------------- |
export * from 'monaco-editor-core'; |
@@ -0,0 +0,0 @@ /*--------------------------------------------------------------------------------------------- |
@@ -0,0 +0,0 @@ /*--------------------------------------------------------------------------------------------- |
@@ -16,3 +16,3 @@ /*--------------------------------------------------------------------------------------------- | ||
var onModelAdd = function (model) { | ||
var modeId = model.getModeId(); | ||
var modeId = model.getLanguageId(); | ||
if (modeId !== _this._languageId) { | ||
@@ -45,3 +45,3 @@ return; | ||
editor.getModels().forEach(function (model) { | ||
if (model.getModeId() === _this._languageId) { | ||
if (model.getLanguageId() === _this._languageId) { | ||
onModelRemoved(model); | ||
@@ -73,3 +73,3 @@ onModelAdd(model); | ||
var model = editor.getModel(resource); | ||
if (model && model.getModeId() === languageId) { | ||
if (model && model.getLanguageId() === languageId) { | ||
editor.setModelMarkers(model, languageId, markers); | ||
@@ -76,0 +76,0 @@ } |
@@ -0,0 +0,0 @@ import { IEvent } from './fillers/monaco-editor-core'; |
@@ -0,0 +0,0 @@ /*--------------------------------------------------------------------------------------------- |
@@ -0,0 +0,0 @@ /*--------------------------------------------------------------------------------------------- |
/*!----------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* monaco-css version: 3.8.1(1684631ef49ad4ba0e0e824f6a1507510015d99a) | ||
* monaco-css version: 3.9.0(153561d989325e5a237bf8e5e200723826696d7a) | ||
* Released under the MIT license | ||
@@ -5,0 +5,0 @@ * https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6487648
112697