@stylable/language-service
Advanced tools
Comparing version 3.8.4 to 3.9.0
@@ -11,2 +11,3 @@ "use strict"; | ||
const postcss_value_parser_1 = __importDefault(require("postcss-value-parser")); | ||
const css_selector_tokenizer_1 = __importDefault(require("css-selector-tokenizer")); | ||
const core_1 = require("@stylable/core"); | ||
@@ -18,3 +19,2 @@ const vscode_uri_1 = require("vscode-uri"); | ||
const selector_analyzer_1 = require("./utils/selector-analyzer"); | ||
const selectorTokenizer = require('css-selector-tokenizer'); | ||
function findLast(arr, predicate) { | ||
@@ -405,3 +405,3 @@ for (let index = arr.length - 1; index >= 0; index--) { | ||
const posChar = pos.character + 1; | ||
const parsed = selectorTokenizer.parse(line); | ||
const parsed = css_selector_tokenizer_1.default.parse(line); | ||
if (parsed.nodes[0].type === 'selector') { | ||
@@ -416,6 +416,7 @@ let length = 0; | ||
} | ||
else { | ||
else if (node.name !== undefined) { | ||
length += node.name.length + 1; | ||
if (node.type === 'pseudo-class' && | ||
posChar > length + 1 && | ||
node.content !== undefined && | ||
posChar <= length + 2 + node.content.length) { | ||
@@ -422,0 +423,0 @@ word = node.name; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseSelector = exports.isSelectorInternalChunk = exports.isSelectorChunk = exports.createSelectorDirectChild = exports.createSelectorInternalChunk = exports.createSelectorChunk = void 0; | ||
const selectorTokenizer = require('css-selector-tokenizer'); | ||
const css_selector_tokenizer_1 = __importDefault(require("css-selector-tokenizer")); | ||
function createSelectorChunk(value) { | ||
@@ -37,3 +40,3 @@ return { | ||
let cursorTarget = { focusChunk: {}, text: textArr, index: -1, internalIndex: 0 }; | ||
const tokenizedSelectors = selectorTokenizer.parse(inputSelector); | ||
const tokenizedSelectors = css_selector_tokenizer_1.default.parse(inputSelector); | ||
if (tokenizedSelectors.type !== 'selectors') { | ||
@@ -40,0 +43,0 @@ throw new Error('not handled'); |
{ | ||
"name": "@stylable/language-service", | ||
"version": "3.8.4", | ||
"version": "3.9.0", | ||
"description": "Stylable Language Services - syntax highlighting, completions, hinting and more for the Stylable CSS preprocessor.", | ||
@@ -20,8 +20,8 @@ "main": "./cjs/index.js", | ||
"@file-services/typescript": "^3.1.1", | ||
"@stylable/core": "^3.8.4", | ||
"@stylable/core": "^3.9.0", | ||
"css-selector-tokenizer": "^0.7.3", | ||
"js-beautify": "^1.11.0", | ||
"js-beautify": "^1.12.0", | ||
"postcss": "^7.0.32", | ||
"postcss-value-parser": "^4.1.0", | ||
"vscode-css-languageservice": "^4.3.0", | ||
"vscode-css-languageservice": "^4.3.1", | ||
"vscode-languageserver": "^6.1.1", | ||
@@ -28,0 +28,0 @@ "vscode-languageserver-textdocument": "^1.0.1", |
@@ -1,2 +0,2 @@ | ||
const selectorTokenizer = require('css-selector-tokenizer'); | ||
import cssSelectorTokenizer from 'css-selector-tokenizer'; | ||
@@ -62,3 +62,3 @@ export interface SelectorQuery { | ||
let cursorTarget = { focusChunk: {} as any, text: textArr, index: -1, internalIndex: 0 }; | ||
const tokenizedSelectors = selectorTokenizer.parse(inputSelector); | ||
const tokenizedSelectors = cssSelectorTokenizer.parse(inputSelector); | ||
@@ -65,0 +65,0 @@ if (tokenizedSelectors.type !== 'selectors') { |
import ts from 'typescript'; | ||
declare module 'typescript' { | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface NamedTupleMember {} | ||
// needed for custom readDirectory | ||
@@ -5,0 +8,0 @@ export function matchFiles( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
519038
8427
Updated@stylable/core@^3.9.0
Updatedjs-beautify@^1.12.0