@mablhq/mabl-cli 1.12.6 → 1.12.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mablhq/mabl-cli",
3
- "version": "1.12.6",
3
+ "version": "1.12.24",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "The official mabl command line interface tool",
6
6
  "main": "index.js",
@@ -55,6 +55,7 @@
55
55
  "js-yaml": "^3.13.1",
56
56
  "jsesc": "^3.0.2",
57
57
  "jwt-decode": "^2.2.0",
58
+ "fastest-levenshtein": "^1.0.10",
58
59
  "lodash.get": "^4.4.2",
59
60
  "markdown-table": "^2.0.0",
60
61
  "mime-types": "^2.1.26",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.elementsInFrontCount = exports.detectAndDismissPopupCandidates = exports.elementsByHigherZIndex = void 0;
3
+ exports.elementsInFrontCount = exports.detectAndDismissPopupCandidates = exports.getAllElementsAbove = exports.elementsByHigherZIndex = void 0;
4
4
  const DISMISSAL_WAIT_TIME_MS = 750;
5
5
  const ZINDEX_AUTO = 'auto';
6
6
  const MINIMUM_POPUP_DISPLAY_COVERAGE_PX = 0.95;
@@ -36,8 +36,8 @@ function elementsByHigherZIndex(aboveIndex) {
36
36
  }, new Map());
37
37
  }
38
38
  exports.elementsByHigherZIndex = elementsByHigherZIndex;
39
- function getEffectiveZIndex(element, replaceAutoWithValue) {
40
- const isRootElement = (element) => element !== undefined && element.tagName.toLowerCase() !== 'html';
39
+ function getEffectiveZIndex(element) {
40
+ const isRootElement = (element) => element === undefined || element.tagName.toLowerCase() === 'html';
41
41
  let current = element;
42
42
  while (!isRootElement(current)) {
43
43
  const zIndex = window.getComputedStyle(element).zIndex;
@@ -46,7 +46,7 @@ function getEffectiveZIndex(element, replaceAutoWithValue) {
46
46
  }
47
47
  current = (current === null || current === void 0 ? void 0 : current.parentElement) ? current.parentElement : undefined;
48
48
  }
49
- return replaceAutoWithValue;
49
+ return 0;
50
50
  }
51
51
  function getDescendantElements(childElement) {
52
52
  let children = [childElement];
@@ -159,7 +159,7 @@ function getBoundingClientRectWithXY(element) {
159
159
  };
160
160
  }
161
161
  function getAllElementsAbove(elements) {
162
- const zIndexAboveTarget = getEffectiveZIndex(elements[elements.length - 1], 0);
162
+ const zIndexAboveTarget = getEffectiveZIndex(elements[elements.length - 1]);
163
163
  const higherElementsByZIndex = elementsByHigherZIndex(zIndexAboveTarget);
164
164
  const allElementsByZIndex = Array.from(higherElementsByZIndex).map(([item, higherElements]) => {
165
165
  const allElements = higherElements
@@ -170,6 +170,7 @@ function getAllElementsAbove(elements) {
170
170
  allElementsByZIndex.sort((a, b) => b.zIndex - a.zIndex);
171
171
  return allElementsByZIndex;
172
172
  }
173
+ exports.getAllElementsAbove = getAllElementsAbove;
173
174
  async function detectAndDismissPopupCandidates(element) {
174
175
  const elementBoundingBox = getBoundingClientRectWithXY(element);
175
176
  try {