New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vscode-css-languageservice

Package Overview
Dependencies
Maintainers
6
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-css-languageservice - npm Package Compare versions

Comparing version 5.0.3 to 5.1.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

5.1.0 / 2021-02-05
==================
* new API `LanguageSettings.hover`
* New parameter `CompletionSettings` for `LanguageService.doComplete` and `LanguageService.doComplete2`
5.0.0 / 2020-12-14

@@ -2,0 +8,0 @@ ==================

6

lib/esm/cssLanguageService.d.ts

@@ -1,2 +0,2 @@

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 } from './cssLanguageTypes';
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 } from './cssLanguageTypes';
export declare type Stylesheet = {};

@@ -9,4 +9,4 @@ export * from './cssLanguageTypes';

parseStylesheet(document: TextDocument): Stylesheet;
doComplete(document: TextDocument, position: Position, stylesheet: Stylesheet): CompletionList;
doComplete2(document: TextDocument, position: Position, stylesheet: Stylesheet, documentContext: DocumentContext): Promise<CompletionList>;
doComplete(document: TextDocument, position: Position, stylesheet: Stylesheet, settings?: CompletionSettings): CompletionList;
doComplete2(document: TextDocument, position: Position, stylesheet: Stylesheet, documentContext: DocumentContext, settings?: CompletionSettings): Promise<CompletionList>;
setCompletionParticipants(registeredCompletionParticipants: ICompletionParticipant[]): void;

@@ -13,0 +13,0 @@ doHover(document: TextDocument, position: Position, stylesheet: Stylesheet, settings?: HoverSettings): Hover | null;

@@ -33,3 +33,4 @@ /*---------------------------------------------------------------------------------------------

validation.configure(settings);
completion.configure(settings);
completion.configure(settings === null || settings === void 0 ? void 0 : settings.completion);
hover.configure(settings === null || settings === void 0 ? void 0 : settings.hover);
},

@@ -36,0 +37,0 @@ setDataProviders: cssDataManager.setDataProviders.bind(cssDataManager),

@@ -1,4 +0,4 @@

import { Range, Position, DocumentUri, MarkupContent, MarkupKind } from 'vscode-languageserver-types';
export { TextDocument } from 'vscode-languageserver-textdocument';
export * from 'vscode-languageserver-types';
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';
import { TextDocument } from 'vscode-languageserver-textdocument';
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 };
export declare type LintSettings = {

@@ -15,2 +15,3 @@ [key: string]: any;

completion?: CompletionSettings;
hover?: HoverSettings;
}

@@ -17,0 +18,0 @@ export interface HoverSettings {

@@ -6,5 +6,5 @@ /*---------------------------------------------------------------------------------------------

'use strict';
import { MarkupKind } from 'vscode-languageserver-types';
export { TextDocument } from 'vscode-languageserver-textdocument';
export * from 'vscode-languageserver-types';
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';
import { TextDocument } from 'vscode-languageserver-textdocument';
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 };
export var ClientCapabilities;

@@ -11,0 +11,0 @@ (function (ClientCapabilities) {

@@ -14,2 +14,4 @@ /*---------------------------------------------------------------------------------------------

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -16,0 +18,0 @@ function __() { this.constructor = d; }

@@ -14,2 +14,4 @@ /*---------------------------------------------------------------------------------------------

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -16,0 +18,0 @@ function __() { this.constructor = d; }

@@ -14,2 +14,4 @@ /*---------------------------------------------------------------------------------------------

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -16,0 +18,0 @@ function __() { this.constructor = d; }

@@ -14,2 +14,4 @@ /*---------------------------------------------------------------------------------------------

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -16,0 +18,0 @@ function __() { this.constructor = d; }

@@ -14,2 +14,4 @@ /*---------------------------------------------------------------------------------------------

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -16,0 +18,0 @@ function __() { this.constructor = d; }

@@ -70,3 +70,3 @@ /*---------------------------------------------------------------------------------------------

CSSCompletion.prototype.configure = function (settings) {
this.settings = settings;
this.defaultSettings = settings;
};

@@ -82,3 +82,4 @@ CSSCompletion.prototype.getSymbolContext = function () {

};
CSSCompletion.prototype.doComplete2 = function (document, position, styleSheet, documentContext) {
CSSCompletion.prototype.doComplete2 = function (document, position, styleSheet, documentContext, completionSettings) {
if (completionSettings === void 0) { completionSettings = this.defaultSettings; }
return __awaiter(this, void 0, void 0, function () {

@@ -90,3 +91,3 @@ var participant, contributedParticipants, result, pathCompletionResult;

if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) {
return [2 /*return*/, this.doComplete(document, position, styleSheet)];
return [2 /*return*/, this.doComplete(document, position, styleSheet, completionSettings)];
}

@@ -96,3 +97,3 @@ participant = new PathCompletionParticipant(this.lsOptions.fileSystemProvider.readDirectory);

this.completionParticipants = [participant].concat(contributedParticipants);
result = this.doComplete(document, position, styleSheet);
result = this.doComplete(document, position, styleSheet, completionSettings);
_a.label = 1;

@@ -116,3 +117,3 @@ case 1:

};
CSSCompletion.prototype.doComplete = function (document, position, styleSheet) {
CSSCompletion.prototype.doComplete = function (document, position, styleSheet, documentSettings) {
this.offset = document.offsetAt(position);

@@ -124,2 +125,3 @@ this.position = position;

this.styleSheet = styleSheet;
this.documentSettings = documentSettings;
try {

@@ -312,8 +314,4 @@ var result = { isIncomplete: false, items: [] };

get: function () {
if (!this.settings ||
!this.settings.completion ||
this.settings.completion.triggerPropertyValueCompletion === undefined) {
return true;
}
return this.settings.completion.triggerPropertyValueCompletion;
var _a, _b;
return (_b = (_a = this.documentSettings) === null || _a === void 0 ? void 0 : _a.triggerPropertyValueCompletion) !== null && _b !== void 0 ? _b : true;
},

@@ -325,8 +323,4 @@ enumerable: false,

get: function () {
if (!this.settings ||
!this.settings.completion ||
this.settings.completion.completePropertyWithSemicolon === undefined) {
return true;
}
return this.settings.completion.completePropertyWithSemicolon;
var _a, _b;
return (_b = (_a = this.documentSettings) === null || _a === void 0 ? void 0 : _a.completePropertyWithSemicolon) !== null && _b !== void 0 ? _b : true;
},

@@ -333,0 +327,0 @@ enumerable: false,

@@ -18,3 +18,7 @@ /*---------------------------------------------------------------------------------------------

}
CSSHover.prototype.configure = function (settings) {
this.defaultSettings = settings;
};
CSSHover.prototype.doHover = function (document, position, stylesheet, settings) {
if (settings === void 0) { settings = this.defaultSettings; }
function getRange(node) {

@@ -21,0 +25,0 @@ return Range.create(document.positionAt(node.offset), document.positionAt(node.end));

@@ -14,2 +14,4 @@ /*---------------------------------------------------------------------------------------------

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -16,0 +18,0 @@ function __() { this.constructor = d; }

@@ -527,3 +527,4 @@ /*---------------------------------------------------------------------------------------------

LintVisitor.prefixes = [
'-ms-', '-moz-', '-o-', '-webkit-',
'-ms-', '-moz-', '-o-', '-webkit-', // Quite common
// '-xv-', '-atsc-', '-wap-', '-khtml-', 'mso-', 'prince-', '-ah-', '-hp-', '-ro-', '-rim-', '-tc-' // Quite un-common
];

@@ -530,0 +531,0 @@ return LintVisitor;

@@ -14,2 +14,4 @@ /*---------------------------------------------------------------------------------------------

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -16,0 +18,0 @@ function __() { this.constructor = d; }

@@ -14,2 +14,4 @@ /*---------------------------------------------------------------------------------------------

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -16,0 +18,0 @@ function __() { this.constructor = d; }

@@ -14,2 +14,4 @@ /*---------------------------------------------------------------------------------------------

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -16,0 +18,0 @@ function __() { this.constructor = d; }

@@ -5,8 +5,6 @@ /*---------------------------------------------------------------------------------------------

*--------------------------------------------------------------------------------------------*/
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};

@@ -22,3 +20,3 @@ import { URI, Utils } from 'vscode-uri';

}
return Utils.joinPath.apply(Utils, __spreadArrays([URI.parse(uriString)], paths)).toString();
return Utils.joinPath.apply(Utils, __spreadArray([URI.parse(uriString)], paths)).toString();
}

@@ -1,2 +0,2 @@

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 } from './cssLanguageTypes';
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 } from './cssLanguageTypes';
export declare type Stylesheet = {};

@@ -9,4 +9,4 @@ export * from './cssLanguageTypes';

parseStylesheet(document: TextDocument): Stylesheet;
doComplete(document: TextDocument, position: Position, stylesheet: Stylesheet): CompletionList;
doComplete2(document: TextDocument, position: Position, stylesheet: Stylesheet, documentContext: DocumentContext): Promise<CompletionList>;
doComplete(document: TextDocument, position: Position, stylesheet: Stylesheet, settings?: CompletionSettings): CompletionList;
doComplete2(document: TextDocument, position: Position, stylesheet: Stylesheet, documentContext: DocumentContext, settings?: CompletionSettings): Promise<CompletionList>;
setCompletionParticipants(registeredCompletionParticipants: ICompletionParticipant[]): void;

@@ -13,0 +13,0 @@ doHover(document: TextDocument, position: Position, stylesheet: Stylesheet, settings?: HoverSettings): Hover | null;

@@ -56,3 +56,4 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {

validation.configure(settings);
completion.configure(settings);
completion.configure(settings === null || settings === void 0 ? void 0 : settings.completion);
hover.configure(settings === null || settings === void 0 ? void 0 : settings.hover);
},

@@ -59,0 +60,0 @@ setDataProviders: cssDataManager.setDataProviders.bind(cssDataManager),

@@ -1,4 +0,4 @@

import { Range, Position, DocumentUri, MarkupContent, MarkupKind } from 'vscode-languageserver-types';
export { TextDocument } from 'vscode-languageserver-textdocument';
export * from 'vscode-languageserver-types';
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';
import { TextDocument } from 'vscode-languageserver-textdocument';
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 };
export declare type LintSettings = {

@@ -15,2 +15,3 @@ [key: string]: any;

completion?: CompletionSettings;
hover?: HoverSettings;
}

@@ -17,0 +18,0 @@ export interface HoverSettings {

@@ -1,11 +0,1 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
(function (factory) {

@@ -17,3 +7,3 @@ if (typeof module === "object" && typeof module.exports === "object") {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "vscode-languageserver-types", "vscode-languageserver-textdocument", "vscode-languageserver-types"], factory);
define(["require", "exports", "vscode-languageserver-types", "vscode-languageserver-textdocument"], factory);
}

@@ -27,7 +17,40 @@ })(function (require, exports) {

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileType = exports.ClientCapabilities = exports.TextDocument = void 0;
exports.FileType = exports.ClientCapabilities = exports.DocumentHighlightKind = exports.VersionedTextDocumentIdentifier = exports.TextDocumentEdit = exports.CodeActionKind = exports.TextEdit = exports.WorkspaceEdit = exports.DocumentLink = exports.DocumentHighlight = exports.CodeAction = exports.Command = exports.CodeActionContext = exports.MarkedString = exports.Hover = exports.Location = exports.DocumentSymbol = exports.SymbolKind = exports.SymbolInformation = exports.InsertTextFormat = exports.CompletionItemTag = exports.CompletionList = exports.CompletionItemKind = exports.CompletionItem = exports.DiagnosticSeverity = exports.Diagnostic = exports.SelectionRange = exports.FoldingRangeKind = exports.FoldingRange = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.MarkupKind = exports.MarkupContent = exports.Position = exports.Range = exports.TextDocument = void 0;
var vscode_languageserver_types_1 = require("vscode-languageserver-types");
Object.defineProperty(exports, "Range", { enumerable: true, get: function () { return vscode_languageserver_types_1.Range; } });
Object.defineProperty(exports, "Position", { enumerable: true, get: function () { return vscode_languageserver_types_1.Position; } });
Object.defineProperty(exports, "MarkupContent", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkupContent; } });
Object.defineProperty(exports, "MarkupKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkupKind; } });
Object.defineProperty(exports, "Color", { enumerable: true, get: function () { return vscode_languageserver_types_1.Color; } });
Object.defineProperty(exports, "ColorInformation", { enumerable: true, get: function () { return vscode_languageserver_types_1.ColorInformation; } });
Object.defineProperty(exports, "ColorPresentation", { enumerable: true, get: function () { return vscode_languageserver_types_1.ColorPresentation; } });
Object.defineProperty(exports, "FoldingRange", { enumerable: true, get: function () { return vscode_languageserver_types_1.FoldingRange; } });
Object.defineProperty(exports, "FoldingRangeKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.FoldingRangeKind; } });
Object.defineProperty(exports, "SelectionRange", { enumerable: true, get: function () { return vscode_languageserver_types_1.SelectionRange; } });
Object.defineProperty(exports, "Diagnostic", { enumerable: true, get: function () { return vscode_languageserver_types_1.Diagnostic; } });
Object.defineProperty(exports, "DiagnosticSeverity", { enumerable: true, get: function () { return vscode_languageserver_types_1.DiagnosticSeverity; } });
Object.defineProperty(exports, "CompletionItem", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItem; } });
Object.defineProperty(exports, "CompletionItemKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItemKind; } });
Object.defineProperty(exports, "CompletionList", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionList; } });
Object.defineProperty(exports, "CompletionItemTag", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItemTag; } });
Object.defineProperty(exports, "InsertTextFormat", { enumerable: true, get: function () { return vscode_languageserver_types_1.InsertTextFormat; } });
Object.defineProperty(exports, "SymbolInformation", { enumerable: true, get: function () { return vscode_languageserver_types_1.SymbolInformation; } });
Object.defineProperty(exports, "SymbolKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.SymbolKind; } });
Object.defineProperty(exports, "DocumentSymbol", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentSymbol; } });
Object.defineProperty(exports, "Location", { enumerable: true, get: function () { return vscode_languageserver_types_1.Location; } });
Object.defineProperty(exports, "Hover", { enumerable: true, get: function () { return vscode_languageserver_types_1.Hover; } });
Object.defineProperty(exports, "MarkedString", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkedString; } });
Object.defineProperty(exports, "CodeActionContext", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeActionContext; } });
Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return vscode_languageserver_types_1.Command; } });
Object.defineProperty(exports, "CodeAction", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeAction; } });
Object.defineProperty(exports, "DocumentHighlight", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentHighlight; } });
Object.defineProperty(exports, "DocumentLink", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentLink; } });
Object.defineProperty(exports, "WorkspaceEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.WorkspaceEdit; } });
Object.defineProperty(exports, "TextEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.TextEdit; } });
Object.defineProperty(exports, "CodeActionKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeActionKind; } });
Object.defineProperty(exports, "TextDocumentEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.TextDocumentEdit; } });
Object.defineProperty(exports, "VersionedTextDocumentIdentifier", { enumerable: true, get: function () { return vscode_languageserver_types_1.VersionedTextDocumentIdentifier; } });
Object.defineProperty(exports, "DocumentHighlightKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentHighlightKind; } });
var vscode_languageserver_textdocument_1 = require("vscode-languageserver-textdocument");
Object.defineProperty(exports, "TextDocument", { enumerable: true, get: function () { return vscode_languageserver_textdocument_1.TextDocument; } });
__exportStar(require("vscode-languageserver-types"), exports);
var ClientCapabilities;

@@ -34,0 +57,0 @@ (function (ClientCapabilities) {

@@ -9,2 +9,4 @@ var __extends = (this && this.__extends) || (function () {

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -11,0 +13,0 @@ function __() { this.constructor = d; }

@@ -9,2 +9,4 @@ var __extends = (this && this.__extends) || (function () {

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -11,0 +13,0 @@ function __() { this.constructor = d; }

@@ -9,2 +9,4 @@ var __extends = (this && this.__extends) || (function () {

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -11,0 +13,0 @@ function __() { this.constructor = d; }

@@ -9,2 +9,4 @@ var __extends = (this && this.__extends) || (function () {

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -11,0 +13,0 @@ function __() { this.constructor = d; }

@@ -9,2 +9,4 @@ var __extends = (this && this.__extends) || (function () {

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -11,0 +13,0 @@ function __() { this.constructor = d; }

@@ -81,3 +81,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

CSSCompletion.prototype.configure = function (settings) {
this.settings = settings;
this.defaultSettings = settings;
};

@@ -93,3 +93,4 @@ CSSCompletion.prototype.getSymbolContext = function () {

};
CSSCompletion.prototype.doComplete2 = function (document, position, styleSheet, documentContext) {
CSSCompletion.prototype.doComplete2 = function (document, position, styleSheet, documentContext, completionSettings) {
if (completionSettings === void 0) { completionSettings = this.defaultSettings; }
return __awaiter(this, void 0, void 0, function () {

@@ -101,3 +102,3 @@ var participant, contributedParticipants, result, pathCompletionResult;

if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) {
return [2 /*return*/, this.doComplete(document, position, styleSheet)];
return [2 /*return*/, this.doComplete(document, position, styleSheet, completionSettings)];
}

@@ -107,3 +108,3 @@ participant = new pathCompletion_1.PathCompletionParticipant(this.lsOptions.fileSystemProvider.readDirectory);

this.completionParticipants = [participant].concat(contributedParticipants);
result = this.doComplete(document, position, styleSheet);
result = this.doComplete(document, position, styleSheet, completionSettings);
_a.label = 1;

@@ -127,3 +128,3 @@ case 1:

};
CSSCompletion.prototype.doComplete = function (document, position, styleSheet) {
CSSCompletion.prototype.doComplete = function (document, position, styleSheet, documentSettings) {
this.offset = document.offsetAt(position);

@@ -135,2 +136,3 @@ this.position = position;

this.styleSheet = styleSheet;
this.documentSettings = documentSettings;
try {

@@ -323,8 +325,4 @@ var result = { isIncomplete: false, items: [] };

get: function () {
if (!this.settings ||
!this.settings.completion ||
this.settings.completion.triggerPropertyValueCompletion === undefined) {
return true;
}
return this.settings.completion.triggerPropertyValueCompletion;
var _a, _b;
return (_b = (_a = this.documentSettings) === null || _a === void 0 ? void 0 : _a.triggerPropertyValueCompletion) !== null && _b !== void 0 ? _b : true;
},

@@ -336,8 +334,4 @@ enumerable: false,

get: function () {
if (!this.settings ||
!this.settings.completion ||
this.settings.completion.completePropertyWithSemicolon === undefined) {
return true;
}
return this.settings.completion.completePropertyWithSemicolon;
var _a, _b;
return (_b = (_a = this.documentSettings) === null || _a === void 0 ? void 0 : _a.completePropertyWithSemicolon) !== null && _b !== void 0 ? _b : true;
},

@@ -344,0 +338,0 @@ enumerable: false,

@@ -29,3 +29,7 @@ (function (factory) {

}
CSSHover.prototype.configure = function (settings) {
this.defaultSettings = settings;
};
CSSHover.prototype.doHover = function (document, position, stylesheet, settings) {
if (settings === void 0) { settings = this.defaultSettings; }
function getRange(node) {

@@ -32,0 +36,0 @@ return cssLanguageTypes_1.Range.create(document.positionAt(node.offset), document.positionAt(node.end));

@@ -9,2 +9,4 @@ var __extends = (this && this.__extends) || (function () {

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -11,0 +13,0 @@ function __() { this.constructor = d; }

@@ -538,3 +538,4 @@ (function (factory) {

LintVisitor.prefixes = [
'-ms-', '-moz-', '-o-', '-webkit-',
'-ms-', '-moz-', '-o-', '-webkit-', // Quite common
// '-xv-', '-atsc-', '-wap-', '-khtml-', 'mso-', 'prince-', '-ah-', '-hp-', '-ro-', '-rim-', '-tc-' // Quite un-common
];

@@ -541,0 +542,0 @@ return LintVisitor;

@@ -9,2 +9,4 @@ var __extends = (this && this.__extends) || (function () {

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -11,0 +13,0 @@ function __() { this.constructor = d; }

@@ -9,2 +9,4 @@ var __extends = (this && this.__extends) || (function () {

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -11,0 +13,0 @@ function __() { this.constructor = d; }

@@ -9,2 +9,4 @@ var __extends = (this && this.__extends) || (function () {

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -11,0 +13,0 @@ function __() { this.constructor = d; }

@@ -5,8 +5,6 @@ /*---------------------------------------------------------------------------------------------

*--------------------------------------------------------------------------------------------*/
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};

@@ -35,5 +33,5 @@ (function (factory) {

}
return vscode_uri_1.Utils.joinPath.apply(vscode_uri_1.Utils, __spreadArrays([vscode_uri_1.URI.parse(uriString)], paths)).toString();
return vscode_uri_1.Utils.joinPath.apply(vscode_uri_1.Utils, __spreadArray([vscode_uri_1.URI.parse(uriString)], paths)).toString();
}
exports.joinPath = joinPath;
});
{
"name": "vscode-css-languageservice",
"version": "5.0.3",
"version": "5.1.0",
"description": "Language service for CSS, LESS and SCSS",

@@ -5,0 +5,0 @@ "main": "./lib/umd/cssLanguageService.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc