@applitools/snippets 2.1.7 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/commands.json +1 -1
- package/dist/index.js +1 -1
- package/package.json +7 -2
package/CHANGELOG.md
CHANGED
package/dist/commands.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"addElementIds": "function(arg){var s=function(){\"use strict\";return function(t){var o=t[0],e=t[1];return o.map((function(t,o){var r=[t];if(t.getRootNode)for(var a=t.getRootNode();a!==document;a=a.host.getRootNode())r.push(a.host);var n=e[o];return r.map((function(t){var o=t.getAttribute(\"data-applitools-selector\"),e=o?o+\" \"+n:n;return t.setAttribute(\"data-applitools-selector\",e),'[data-applitools-selector~=\"'+n+'\"]'}))}))}}();\nreturn s(arg)}",
|
|
3
|
-
"addPageMarker": "function(arg){var s=function(){\"use strict\";var t=function(t){var e=void 0===t?[]:t,r=e[0],o=e[1],n=Object.keys(o).sort(),i=n.reduce((function(t,e){return t[e]={value:r.style.getPropertyValue(e),important:Boolean(r.style.getPropertyPriority(e))},t}),{});return n.forEach((function(t){r.style.setProperty(t,\"string\"!=typeof o[t]&&o[t]?o[t].value:o[t],o[t]&&o[t].important?\"important\":\"\")})),i};return function(){var e=
|
|
3
|
+
"addPageMarker": "function(arg){var s=function(){\"use strict\";var t=function(t){var e=void 0===t?[]:t,r=e[0],o=e[1],n=Object.keys(o).sort(),i=n.reduce((function(t,e){return t[e]={value:r.style.getPropertyValue(e),important:Boolean(r.style.getPropertyPriority(e))},t}),{});return n.forEach((function(t){r.style.setProperty(t,\"string\"!=typeof o[t]&&o[t]?o[t].value:o[t],o[t]&&o[t].important?\"important\":\"\")})),i};return function(){var e=[1,0,1,1,0,1,1,0,1,0,1,0,1,1,0,1,0,0,1,1,1],r={1:\"rgb(0, 0, 0)\",0:\"rgb(255, 255, 255)\"},o=Math.max(1,window.innerWidth/screen.availWidth),n=document.createElement(\"div\");n.setAttribute(\"data-applitools-marker\",\"\"),n.style.setProperty(\"position\",\"fixed\",\"important\"),n.style.setProperty(\"top\",\"0\",\"important\"),n.style.setProperty(\"left\",\"0\",\"important\"),n.style.setProperty(\"box-sizing\",\"content-box\",\"important\"),n.style.setProperty(\"padding\",\"1px\",\"important\"),n.style.setProperty(\"z-index\",\"2147483647\",\"important\"),e.forEach((function(t){var e=document.createElement(\"div\");e.style.setProperty(\"display\",\"block\",\"important\"),e.style.setProperty(\"float\",\"left\",\"important\"),e.style.setProperty(\"width\",o+\"px\",\"important\"),e.style.setProperty(\"height\",\"1px\",\"important\"),e.style.setProperty(\"background\",r[t],\"important\"),n.appendChild(e)}));var i={value:\"none\",important:!0},a=t([document.documentElement,{transform:i,\"-webkit-transform\":i}]),s=t([document.body,{transform:i,\"-webkit-transform\":i}]);return document.documentElement.setAttribute(\"data-applitools-original-transforms\",JSON.stringify(a)),document.body.setAttribute(\"data-applitools-original-transforms\",JSON.stringify(s)),document.body.appendChild(n),{mask:e,size:o,offset:1}}}();\nreturn s(arg)}",
|
|
4
4
|
"blurElement": "function(arg){var s=function(){\"use strict\";return function(t){var n=(void 0===t?[]:t)[0]||document.activeElement;return n&&n.blur(),n}}();\nreturn s(arg)}",
|
|
5
5
|
"cleanupElementIds": "function(arg){var s=function(){\"use strict\";return function(t){t[0].forEach((function(t){if(t.removeAttribute(\"data-applitools-selector\"),t.getRootNode)for(var o=t.getRootNode();o!==document;o=o.host.getRootNode())o.host.removeAttribute(\"data-applitools-selector\")}))}}();\nreturn s(arg)}",
|
|
6
6
|
"cleanupPageMarker": "function(arg){var s=function(){\"use strict\";var t=function(t){var e=void 0===t?[]:t,r=e[0],o=e[1],n=Object.keys(o).sort(),a=n.reduce((function(t,e){return t[e]={value:r.style.getPropertyValue(e),important:Boolean(r.style.getPropertyPriority(e))},t}),{});return n.forEach((function(t){r.style.setProperty(t,\"string\"!=typeof o[t]&&o[t]?o[t].value:o[t],o[t]&&o[t].important?\"important\":\"\")})),a};return function(){var e=document.querySelector(\"[data-applitools-marker]\");e&&document.body.removeChild(e);var r=document.documentElement.getAttribute(\"data-applitools-original-transforms\"),o=document.body.getAttribute(\"data-applitools-original-transforms\");r&&t([document.documentElement,JSON.parse(r)]),o&&t([document.body,JSON.parse(o)])}}();\nreturn s(arg)}",
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var s=function(){"use strict";return function(t){var o=t[0],e=t[1];return o.map(
|
|
|
3
3
|
return s(arg)
|
|
4
4
|
}
|
|
5
5
|
exports.addPageMarker=function(arg){
|
|
6
|
-
var s=function(){"use strict";var t=function(t){var e=void 0===t?[]:t,r=e[0],o=e[1],n=Object.keys(o).sort(),i=n.reduce((function(t,e){return t[e]={value:r.style.getPropertyValue(e),important:Boolean(r.style.getPropertyPriority(e))},t}),{});return n.forEach((function(t){r.style.setProperty(t,"string"!=typeof o[t]&&o[t]?o[t].value:o[t],o[t]&&o[t].important?"important":"")})),i};return function(){var e=
|
|
6
|
+
var s=function(){"use strict";var t=function(t){var e=void 0===t?[]:t,r=e[0],o=e[1],n=Object.keys(o).sort(),i=n.reduce((function(t,e){return t[e]={value:r.style.getPropertyValue(e),important:Boolean(r.style.getPropertyPriority(e))},t}),{});return n.forEach((function(t){r.style.setProperty(t,"string"!=typeof o[t]&&o[t]?o[t].value:o[t],o[t]&&o[t].important?"important":"")})),i};return function(){var e=[1,0,1,1,0,1,1,0,1,0,1,0,1,1,0,1,0,0,1,1,1],r={1:"rgb(0, 0, 0)",0:"rgb(255, 255, 255)"},o=Math.max(1,window.innerWidth/screen.availWidth),n=document.createElement("div");n.setAttribute("data-applitools-marker",""),n.style.setProperty("position","fixed","important"),n.style.setProperty("top","0","important"),n.style.setProperty("left","0","important"),n.style.setProperty("box-sizing","content-box","important"),n.style.setProperty("padding","1px","important"),n.style.setProperty("z-index","2147483647","important"),e.forEach((function(t){var e=document.createElement("div");e.style.setProperty("display","block","important"),e.style.setProperty("float","left","important"),e.style.setProperty("width",o+"px","important"),e.style.setProperty("height","1px","important"),e.style.setProperty("background",r[t],"important"),n.appendChild(e)}));var i={value:"none",important:!0},a=t([document.documentElement,{transform:i,"-webkit-transform":i}]),s=t([document.body,{transform:i,"-webkit-transform":i}]);return document.documentElement.setAttribute("data-applitools-original-transforms",JSON.stringify(a)),document.body.setAttribute("data-applitools-original-transforms",JSON.stringify(s)),document.body.appendChild(n),{mask:e,size:o,offset:1}}}();
|
|
7
7
|
return s(arg)
|
|
8
8
|
}
|
|
9
9
|
exports.blurElement=function(arg){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/snippets",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.8",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -24,6 +24,11 @@
|
|
|
24
24
|
"pre-push": "yarn bongo lint"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/applitools/eyes.sdk.javascript1.git",
|
|
30
|
+
"directory": "packages/snippets"
|
|
31
|
+
},
|
|
27
32
|
"dependencies": {},
|
|
28
33
|
"devDependencies": {
|
|
29
34
|
"@applitools/sdk-release-kit": "^0.3.3",
|
|
@@ -39,7 +44,7 @@
|
|
|
39
44
|
"glob": "^7.1.6",
|
|
40
45
|
"husky": "^4.3.7",
|
|
41
46
|
"mocha": "^8.1.3",
|
|
42
|
-
"playwright": "1.
|
|
47
|
+
"playwright": "1.16.3",
|
|
43
48
|
"prettier": "1.19.0",
|
|
44
49
|
"rollup": "^2.26.11",
|
|
45
50
|
"rollup-plugin-terser": "^7.0.2",
|