@eko-ai/eko 3.1.4 → 3.1.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"build_dom_tree.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/build_dom_tree.ts"],"names":[],"mappings":"AACA,wBAAgB,kBAAkB,SAuxBjC"}
1
+ {"version":3,"file":"build_dom_tree.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/build_dom_tree.ts"],"names":[],"mappings":"AACA,wBAAgB,kBAAkB,SAoxBjC"}
package/dist/index.cjs.js CHANGED
@@ -36096,18 +36096,14 @@ function run_build_dom_tree() {
36096
36096
  }
36097
36097
  return false;
36098
36098
  }
36099
- // Helper function to check if element exists
36100
- function isElementExist(element) {
36101
- const style = getCachedComputedStyle(element);
36102
- return (style?.visibility !== 'hidden' &&
36103
- style?.display !== 'none');
36104
- }
36105
36099
  // Helper function to check if element is visible
36106
36100
  function isElementVisible(element) {
36107
36101
  if (element.offsetWidth === 0 && element.offsetHeight === 0) {
36108
36102
  return false;
36109
36103
  }
36110
- return isElementExist(element);
36104
+ const style = getCachedComputedStyle(element);
36105
+ return (style?.visibility !== 'hidden' &&
36106
+ style?.display !== 'none');
36111
36107
  }
36112
36108
  // Helper function to check if element is the top element at its position
36113
36109
  function isTopElement(element) {
@@ -36261,7 +36257,8 @@ function run_build_dom_tree() {
36261
36257
  }
36262
36258
  }
36263
36259
  else {
36264
- if (isElementExist(node)) {
36260
+ const style = getCachedComputedStyle(node);
36261
+ if (style && style.display !== 'none') {
36265
36262
  const children = Array.from(node.children).map((child) => buildDomTree(child, parentIframe)).filter(child => child !== null);
36266
36263
  nodeData.children.push(...children);
36267
36264
  }