@stylable/dom-test-kit
Advanced tools
Comparing version 2.3.1-alpha.2 to 2.3.1-alpha.3
@@ -34,2 +34,5 @@ import { RuntimeStylesheet, StateValue } from '@stylable/runtime'; | ||
} | ||
export declare class StylableDOMUtilCompat extends StylableDOMUtilV2 { | ||
getStyleState(element: PartialElement, stateName: string): string | null; | ||
} | ||
//# sourceMappingURL=stylable-dom-util.d.ts.map |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -15,3 +28,3 @@ var core_1 = require("@stylable/core"); | ||
else if (mode === 'compat') { | ||
this.internal = new StylableDOMUtilV2(this.stylesheet.originStylesheet, this.root); | ||
this.internal = new StylableDOMUtilCompat(this.stylesheet.originStylesheet, this.root); | ||
} | ||
@@ -142,2 +155,14 @@ else { | ||
exports.StylableDOMUtilV2 = StylableDOMUtilV2; | ||
var StylableDOMUtilCompat = /** @class */ (function (_super) { | ||
__extends(StylableDOMUtilCompat, _super); | ||
function StylableDOMUtilCompat() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
StylableDOMUtilCompat.prototype.getStyleState = function (element, stateName) { | ||
var state = _super.prototype.getStyleState.call(this, element, stateName); | ||
return state === null ? null : state.toString(); | ||
}; | ||
return StylableDOMUtilCompat; | ||
}(StylableDOMUtilV2)); | ||
exports.StylableDOMUtilCompat = StylableDOMUtilCompat; | ||
//# sourceMappingURL=stylable-dom-util.js.map |
{ | ||
"name": "@stylable/dom-test-kit", | ||
"version": "2.3.1-alpha.2", | ||
"version": "2.3.1-alpha.3", | ||
"description": "Stylable DOM testing utilities", | ||
@@ -32,3 +32,3 @@ "main": "./cjs/index.js", | ||
"license": "BSD-3-Clause", | ||
"gitHead": "a5787185832344c7629e820404656f32c87dfd50" | ||
"gitHead": "ba1a684d7340621090d866463477a5b872674b9f" | ||
} |
@@ -28,3 +28,3 @@ import { | ||
} else if (mode === 'compat') { | ||
this.internal = new StylableDOMUtilV2( | ||
this.internal = new StylableDOMUtilCompat( | ||
(this.stylesheet as any).originStylesheet, | ||
@@ -164,1 +164,8 @@ this.root | ||
export class StylableDOMUtilCompat extends StylableDOMUtilV2 { | ||
public getStyleState(element: PartialElement, stateName: string): string | null { | ||
const state = super.getStyleState(element, stateName); | ||
return state === null ? null : state.toString(); | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
39508
562