@stylable/dom-test-kit
Advanced tools
Comparing version 4.13.2 to 5.0.0-rc.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StylableDOMUtil = void 0; | ||
const core_1 = require("@stylable/core"); | ||
const index_internal_1 = require("@stylable/core/dist/index-internal"); | ||
const css_selector_parser_1 = require("@tokey/css-selector-parser"); | ||
@@ -42,7 +42,7 @@ function convertToClass(node) { | ||
if (!args) { | ||
convertToClass(node).value = core_1.pseudoStates.createBooleanStateClassName(node.value, namespace); | ||
convertToClass(node).value = index_internal_1.pseudoStates.createBooleanStateClassName(node.value, namespace); | ||
} | ||
else { | ||
const nestedContent = (0, css_selector_parser_1.stringifySelectorAst)(args); | ||
convertToClass(node).value = core_1.pseudoStates.createStateWithParamClassName(node.value, namespace, nestedContent); | ||
convertToClass(node).value = index_internal_1.pseudoStates.createStateWithParamClassName(node.value, namespace, nestedContent); | ||
} | ||
@@ -59,5 +59,5 @@ } | ||
if (typeof param === 'boolean') { | ||
return element.classList.contains(core_1.pseudoStates.createBooleanStateClassName(stateName, namespace)); | ||
return element.classList.contains(index_internal_1.pseudoStates.createBooleanStateClassName(stateName, namespace)); | ||
} | ||
return element.classList.contains(core_1.pseudoStates.createStateWithParamClassName(stateName, namespace, String(param))); | ||
return element.classList.contains(index_internal_1.pseudoStates.createStateWithParamClassName(stateName, namespace, String(param))); | ||
} | ||
@@ -68,3 +68,3 @@ getStyleState(element, stateName) { | ||
} | ||
const booleanState = core_1.pseudoStates.createBooleanStateClassName(stateName, this.stylesheet.namespace); | ||
const booleanState = index_internal_1.pseudoStates.createBooleanStateClassName(stateName, this.stylesheet.namespace); | ||
if (element.classList.contains(booleanState)) { | ||
@@ -85,3 +85,3 @@ return true; | ||
const param = cls.slice(baseState.length); | ||
const paramIndex = param.indexOf(core_1.pseudoStates.stateMiddleDelimiter); | ||
const paramIndex = param.indexOf(index_internal_1.pseudoStates.stateMiddleDelimiter); | ||
if (paramIndex !== -1) { | ||
@@ -95,3 +95,3 @@ return param.slice(paramIndex + 1); | ||
const singleCharState = 'x'; | ||
return core_1.pseudoStates | ||
return index_internal_1.pseudoStates | ||
.createStateWithParamClassName(stateName, this.stylesheet.namespace, singleCharState) | ||
@@ -98,0 +98,0 @@ .slice(0, -3); |
{ | ||
"name": "@stylable/dom-test-kit", | ||
"version": "4.13.2", | ||
"version": "5.0.0-rc.1", | ||
"description": "Stylable DOM testing utilities", | ||
@@ -11,4 +11,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@stylable/core": "^4.13.2", | ||
"@stylable/runtime": "^4.13.2", | ||
"@stylable/core": "^v5.0.0-rc.1", | ||
"@stylable/runtime": "^v5.0.0-rc.1", | ||
"@tokey/css-selector-parser": "^0.6.0" | ||
@@ -23,3 +23,3 @@ }, | ||
"engines": { | ||
"node": ">=12" | ||
"node": ">=14.14.0" | ||
}, | ||
@@ -26,0 +26,0 @@ "publishConfig": { |
@@ -1,2 +0,2 @@ | ||
import { pseudoStates } from '@stylable/core'; | ||
import { pseudoStates } from '@stylable/core/dist/index-internal'; | ||
import { | ||
@@ -3,0 +3,0 @@ parseCssSelector, |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
19467
2
+ Added@stylable/core@5.19.0(transitive)
+ Added@stylable/runtime@5.19.0(transitive)
+ Added@tokey/css-value-parser@0.1.4(transitive)
+ Added@tokey/imports-parser@1.0.0(transitive)
+ Addedpostcss-nested@6.2.0(transitive)
- Removed@stylable/core@4.15.1(transitive)
- Removed@stylable/runtime@4.15.1(transitive)
- Removed@tokey/imports-parser@0.1.2(transitive)
- Removeddeindent@0.1.0(transitive)
- Removedpostcss-nested@5.0.6(transitive)
Updated@stylable/core@^v5.0.0-rc.1