vscode-html-languageservice
Advanced tools
Comparing version 2.1.11-next.6 to 2.1.11-next.7
@@ -104,9 +104,2 @@ import { TextDocument, Position, Range } from 'vscode-languageserver-types'; | ||
} | ||
export interface IHTMLDataProvider { | ||
getId(): string; | ||
isApplicable(languageId: string): boolean; | ||
provideTags(): ITagData[]; | ||
provideAttributes(tag: string): IAttributeData[]; | ||
provideValues(tag: string, attribute: string): IValueData[]; | ||
} | ||
export interface ITagData { | ||
@@ -127,1 +120,18 @@ name: string; | ||
} | ||
export interface IValueSet { | ||
name: string; | ||
values: IValueData[]; | ||
} | ||
export interface HTMLDataV1 { | ||
version: 1; | ||
tags?: ITagData[]; | ||
globalAttributes?: IAttributeData[]; | ||
valueSets?: IValueSet[]; | ||
} | ||
export interface IHTMLDataProvider { | ||
getId(): string; | ||
isApplicable(languageId: string): boolean; | ||
provideTags(): ITagData[]; | ||
provideAttributes(tag: string): IAttributeData[]; | ||
provideValues(tag: string, attribute: string): IValueData[]; | ||
} |
@@ -8,101 +8,6 @@ import { HTMLDataProvider } from '../dataProvider'; | ||
export declare const HTML5_VALUE_MAP: { | ||
b: { | ||
name: string; | ||
values: { | ||
name: string; | ||
}[]; | ||
u: { | ||
name: string; | ||
}[]; | ||
o: { | ||
name: string; | ||
}[]; | ||
y: { | ||
name: string; | ||
}[]; | ||
w: { | ||
name: string; | ||
}[]; | ||
d: { | ||
name: string; | ||
}[]; | ||
m: { | ||
name: string; | ||
}[]; | ||
fm: { | ||
name: string; | ||
}[]; | ||
s: { | ||
name: string; | ||
}[]; | ||
t: { | ||
name: string; | ||
}[]; | ||
im: { | ||
name: string; | ||
}[]; | ||
bt: { | ||
name: string; | ||
}[]; | ||
lt: { | ||
name: string; | ||
}[]; | ||
mt: { | ||
name: string; | ||
}[]; | ||
mit: { | ||
name: string; | ||
}[]; | ||
et: { | ||
name: string; | ||
}[]; | ||
tk: { | ||
name: string; | ||
}[]; | ||
pl: { | ||
name: string; | ||
}[]; | ||
sh: { | ||
name: string; | ||
}[]; | ||
xo: { | ||
name: string; | ||
}[]; | ||
sb: { | ||
name: string; | ||
}[]; | ||
tristate: { | ||
name: string; | ||
}[]; | ||
inputautocomplete: { | ||
name: string; | ||
}[]; | ||
autocomplete: { | ||
name: string; | ||
}[]; | ||
current: { | ||
name: string; | ||
}[]; | ||
dropeffect: { | ||
name: string; | ||
}[]; | ||
invalid: { | ||
name: string; | ||
}[]; | ||
live: { | ||
name: string; | ||
}[]; | ||
orientation: { | ||
name: string; | ||
}[]; | ||
relevant: { | ||
name: string; | ||
}[]; | ||
sort: { | ||
name: string; | ||
}[]; | ||
roles: { | ||
name: string; | ||
}[]; | ||
metanames: { | ||
name: string; | ||
}[]; | ||
}; | ||
}[]; |
@@ -7,2 +7,7 @@ /*--------------------------------------------------------------------------------------------- | ||
var HTMLDataProvider = /** @class */ (function () { | ||
/** | ||
* Currently, unversioned data uses the V1 implementation | ||
* In the future when the provider handles multiple versions of HTML custom data, | ||
* use the latest implementation for unversioned data | ||
*/ | ||
function HTMLDataProvider(id, customData) { | ||
@@ -13,3 +18,3 @@ var _this = this; | ||
this._attributeMap = {}; | ||
this._valueSets = {}; | ||
this._valueSetMap = {}; | ||
this._tags = customData.tags || []; | ||
@@ -27,3 +32,5 @@ this._globalAttributes = customData.globalAttributes || []; | ||
if (customData.valueSets) { | ||
this._valueSets = customData.valueSets; | ||
customData.valueSets.forEach(function (vs) { | ||
_this._valueSetMap[vs.name] = vs.values; | ||
}); | ||
} | ||
@@ -71,4 +78,4 @@ } | ||
if (a.valueSet) { | ||
if (_this._valueSets[a.valueSet]) { | ||
_this._valueSets[a.valueSet].forEach(function (v) { | ||
if (_this._valueSetMap[a.valueSet]) { | ||
_this._valueSetMap[a.valueSet].forEach(function (v) { | ||
values.push(v); | ||
@@ -75,0 +82,0 @@ }); |
@@ -104,9 +104,2 @@ import { TextDocument, Position, Range } from 'vscode-languageserver-types'; | ||
} | ||
export interface IHTMLDataProvider { | ||
getId(): string; | ||
isApplicable(languageId: string): boolean; | ||
provideTags(): ITagData[]; | ||
provideAttributes(tag: string): IAttributeData[]; | ||
provideValues(tag: string, attribute: string): IValueData[]; | ||
} | ||
export interface ITagData { | ||
@@ -127,1 +120,18 @@ name: string; | ||
} | ||
export interface IValueSet { | ||
name: string; | ||
values: IValueData[]; | ||
} | ||
export interface HTMLDataV1 { | ||
version: 1; | ||
tags?: ITagData[]; | ||
globalAttributes?: IAttributeData[]; | ||
valueSets?: IValueSet[]; | ||
} | ||
export interface IHTMLDataProvider { | ||
getId(): string; | ||
isApplicable(languageId: string): boolean; | ||
provideTags(): ITagData[]; | ||
provideAttributes(tag: string): IAttributeData[]; | ||
provideValues(tag: string, attribute: string): IValueData[]; | ||
} |
@@ -8,101 +8,6 @@ import { HTMLDataProvider } from '../dataProvider'; | ||
export declare const HTML5_VALUE_MAP: { | ||
b: { | ||
name: string; | ||
values: { | ||
name: string; | ||
}[]; | ||
u: { | ||
name: string; | ||
}[]; | ||
o: { | ||
name: string; | ||
}[]; | ||
y: { | ||
name: string; | ||
}[]; | ||
w: { | ||
name: string; | ||
}[]; | ||
d: { | ||
name: string; | ||
}[]; | ||
m: { | ||
name: string; | ||
}[]; | ||
fm: { | ||
name: string; | ||
}[]; | ||
s: { | ||
name: string; | ||
}[]; | ||
t: { | ||
name: string; | ||
}[]; | ||
im: { | ||
name: string; | ||
}[]; | ||
bt: { | ||
name: string; | ||
}[]; | ||
lt: { | ||
name: string; | ||
}[]; | ||
mt: { | ||
name: string; | ||
}[]; | ||
mit: { | ||
name: string; | ||
}[]; | ||
et: { | ||
name: string; | ||
}[]; | ||
tk: { | ||
name: string; | ||
}[]; | ||
pl: { | ||
name: string; | ||
}[]; | ||
sh: { | ||
name: string; | ||
}[]; | ||
xo: { | ||
name: string; | ||
}[]; | ||
sb: { | ||
name: string; | ||
}[]; | ||
tristate: { | ||
name: string; | ||
}[]; | ||
inputautocomplete: { | ||
name: string; | ||
}[]; | ||
autocomplete: { | ||
name: string; | ||
}[]; | ||
current: { | ||
name: string; | ||
}[]; | ||
dropeffect: { | ||
name: string; | ||
}[]; | ||
invalid: { | ||
name: string; | ||
}[]; | ||
live: { | ||
name: string; | ||
}[]; | ||
orientation: { | ||
name: string; | ||
}[]; | ||
relevant: { | ||
name: string; | ||
}[]; | ||
sort: { | ||
name: string; | ||
}[]; | ||
roles: { | ||
name: string; | ||
}[]; | ||
metanames: { | ||
name: string; | ||
}[]; | ||
}; | ||
}[]; |
@@ -17,2 +17,7 @@ (function (factory) { | ||
var HTMLDataProvider = /** @class */ (function () { | ||
/** | ||
* Currently, unversioned data uses the V1 implementation | ||
* In the future when the provider handles multiple versions of HTML custom data, | ||
* use the latest implementation for unversioned data | ||
*/ | ||
function HTMLDataProvider(id, customData) { | ||
@@ -23,3 +28,3 @@ var _this = this; | ||
this._attributeMap = {}; | ||
this._valueSets = {}; | ||
this._valueSetMap = {}; | ||
this._tags = customData.tags || []; | ||
@@ -37,3 +42,5 @@ this._globalAttributes = customData.globalAttributes || []; | ||
if (customData.valueSets) { | ||
this._valueSets = customData.valueSets; | ||
customData.valueSets.forEach(function (vs) { | ||
_this._valueSetMap[vs.name] = vs.values; | ||
}); | ||
} | ||
@@ -81,4 +88,4 @@ } | ||
if (a.valueSet) { | ||
if (_this._valueSets[a.valueSet]) { | ||
_this._valueSets[a.valueSet].forEach(function (v) { | ||
if (_this._valueSetMap[a.valueSet]) { | ||
_this._valueSetMap[a.valueSet].forEach(function (v) { | ||
values.push(v); | ||
@@ -85,0 +92,0 @@ }); |
{ | ||
"name": "vscode-html-languageservice", | ||
"version": "2.1.11-next.6", | ||
"version": "2.1.11-next.7", | ||
"description": "Language service for HTML", | ||
@@ -5,0 +5,0 @@ "main": "./lib/umd/htmlLanguageService.js", |
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
784554
21357