@applitools/snippets 2.1.11 → 2.1.12

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 CHANGED
@@ -4,6 +4,10 @@
4
4
  ## Unreleased
5
5
 
6
6
 
7
+ ## 2.1.12 - 2021/12/22
8
+
9
+ - round fractional values in `getViewportSize`
10
+
7
11
  ## 2.1.11 - 2021/12/22
8
12
 
9
13
  - add neutral color border around marker in `addPageMarker`
@@ -21,7 +21,7 @@
21
21
  "getPixelRatio": "function(arg){var s=function(){\"use strict\";return function(){return window.devicePixelRatio}}();\nreturn s(arg)}",
22
22
  "getShadowRoot": "function(arg){var s=function(){\"use strict\";return function(t){return(void 0===t?[]:t)[0].shadowRoot}}();\nreturn s(arg)}",
23
23
  "getUserAgent": "function(arg){var s=function(){\"use strict\";return function(){return window.navigator.userAgent}}();\nreturn s(arg)}",
24
- "getViewportSize": "function(arg){var s=function(){\"use strict\";return function(){var e=0,t=0;return window.innerHeight?t=window.innerHeight:document.documentElement&&document.documentElement.clientHeight?t=document.documentElement.clientHeight:document.body&&document.body.clientHeight&&(t=document.body.clientHeight),window.innerWidth?e=window.innerWidth:document.documentElement&&document.documentElement.clientWidth?e=document.documentElement.clientWidth:document.body&&document.body.clientWidth&&(e=document.body.clientWidth),window.visualViewport&&(e*=window.visualViewport.scale,t*=window.visualViewport.scale),{width:e,height:t}}}();\nreturn s(arg)}",
24
+ "getViewportSize": "function(arg){var s=function(){\"use strict\";return function(){var e=0,t=0;return window.innerHeight?t=window.innerHeight:document.documentElement&&document.documentElement.clientHeight?t=document.documentElement.clientHeight:document.body&&document.body.clientHeight&&(t=document.body.clientHeight),window.innerWidth?e=window.innerWidth:document.documentElement&&document.documentElement.clientWidth?e=document.documentElement.clientWidth:document.body&&document.body.clientWidth&&(e=document.body.clientWidth),window.visualViewport&&(e=Math.round(e*window.visualViewport.scale),t=Math.round(t*window.visualViewport.scale)),{width:e,height:t}}}();\nreturn s(arg)}",
25
25
  "isElementScrollable": "function(arg){var s=function(){\"use strict\";return function(t){var i=(void 0===t?[]:t)[0];return i.scrollWidth>i.clientWidth||i.scrollHeight>i.clientHeight}}();\nreturn s(arg)}",
26
26
  "isEqualElements": "function(arg){var s=function(){\"use strict\";return function(r){var n=void 0===r?[]:r;return n[0]===n[1]}}();\nreturn s(arg)}",
27
27
  "scrollTo": "function(arg){var s=function(){\"use strict\";var t=function(t){var r=void 0===t?[]:t,o=r[0],e=r[1],l=Object.keys(e).sort(),n=l.reduce((function(t,r){return t[r]={value:o.style.getPropertyValue(r),important:Boolean(o.style.getPropertyPriority(r))},t}),{});return l.forEach((function(t){o.style.setProperty(t,\"string\"!=typeof e[t]&&e[t]?e[t].value:e[t],e[t]&&e[t].important?\"important\":\"\")})),n};return function(r){var o=void 0===r?[]:r,e=o[0],l=o[1];e=e||document.documentElement;var n=t([e,{\"scroll-behavior\":{value:\"auto\",important:!0}}]);return e.scrollTo?e.scrollTo(l.x,l.y):(e.scrollLeft=l.x,e.scrollTop=l.y),t([e,n]),{x:e.scrollLeft,y:e.scrollTop}}}();\nreturn s(arg)}",
package/dist/index.js CHANGED
@@ -87,7 +87,7 @@ var s=function(){"use strict";return function(){return window.navigator.userAgen
87
87
  return s(arg)
88
88
  }
89
89
  exports.getViewportSize=function(arg){
90
- var s=function(){"use strict";return function(){var e=0,t=0;return window.innerHeight?t=window.innerHeight:document.documentElement&&document.documentElement.clientHeight?t=document.documentElement.clientHeight:document.body&&document.body.clientHeight&&(t=document.body.clientHeight),window.innerWidth?e=window.innerWidth:document.documentElement&&document.documentElement.clientWidth?e=document.documentElement.clientWidth:document.body&&document.body.clientWidth&&(e=document.body.clientWidth),window.visualViewport&&(e*=window.visualViewport.scale,t*=window.visualViewport.scale),{width:e,height:t}}}();
90
+ var s=function(){"use strict";return function(){var e=0,t=0;return window.innerHeight?t=window.innerHeight:document.documentElement&&document.documentElement.clientHeight?t=document.documentElement.clientHeight:document.body&&document.body.clientHeight&&(t=document.body.clientHeight),window.innerWidth?e=window.innerWidth:document.documentElement&&document.documentElement.clientWidth?e=document.documentElement.clientWidth:document.body&&document.body.clientWidth&&(e=document.body.clientWidth),window.visualViewport&&(e=Math.round(e*window.visualViewport.scale),t=Math.round(t*window.visualViewport.scale)),{width:e,height:t}}}();
91
91
  return s(arg)
92
92
  }
93
93
  exports.isElementScrollable=function(arg){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/snippets",
3
- "version": "2.1.11",
3
+ "version": "2.1.12",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "main": "./dist/index.js",
6
6
  "files": [