@eko-ai/eko 3.0.1-alpha.5 → 3.0.2
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/dist/agent/browser/build_dom_tree.d.ts.map +1 -1
- package/dist/index.cjs.js +28 -34
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +28 -34
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"build_dom_tree.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/build_dom_tree.ts"],"names":[],"mappings":"AACA,wBAAgB,kBAAkB,SAgqBjC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -36922,9 +36922,7 @@ function run_build_dom_tree() {
|
|
|
36922
36922
|
// Get computed style
|
|
36923
36923
|
const style = window.getComputedStyle(element);
|
|
36924
36924
|
// Check if element has click-like styling
|
|
36925
|
-
|
|
36926
|
-
// element.style.cursor === 'pointer' ||
|
|
36927
|
-
// style.pointerEvents !== 'none';
|
|
36925
|
+
const hasClickStyling = style.cursor === 'pointer' || element.style.cursor === 'pointer';
|
|
36928
36926
|
// Check for event listeners
|
|
36929
36927
|
const hasClickHandler = element.onclick !== null ||
|
|
36930
36928
|
element.getAttribute('onclick') !== null ||
|
|
@@ -36933,38 +36931,34 @@ function run_build_dom_tree() {
|
|
|
36933
36931
|
element.hasAttribute('v-on:click');
|
|
36934
36932
|
// Helper function to safely get event listeners
|
|
36935
36933
|
function getEventListeners(el) {
|
|
36936
|
-
|
|
36937
|
-
|
|
36938
|
-
|
|
36939
|
-
|
|
36940
|
-
|
|
36941
|
-
|
|
36942
|
-
|
|
36943
|
-
|
|
36944
|
-
|
|
36945
|
-
|
|
36946
|
-
|
|
36947
|
-
|
|
36948
|
-
|
|
36949
|
-
|
|
36950
|
-
|
|
36951
|
-
|
|
36952
|
-
|
|
36953
|
-
|
|
36954
|
-
|
|
36955
|
-
|
|
36956
|
-
|
|
36957
|
-
|
|
36958
|
-
|
|
36959
|
-
|
|
36960
|
-
|
|
36961
|
-
useCapture: false,
|
|
36962
|
-
},
|
|
36963
|
-
];
|
|
36964
|
-
}
|
|
36934
|
+
// if (window.getEventListeners) {
|
|
36935
|
+
// return window.getEventListeners?.(el) || {};
|
|
36936
|
+
// }
|
|
36937
|
+
// List of common event types to check
|
|
36938
|
+
const listeners = {};
|
|
36939
|
+
const eventTypes = [
|
|
36940
|
+
'click',
|
|
36941
|
+
'mousedown',
|
|
36942
|
+
'mouseup',
|
|
36943
|
+
'touchstart',
|
|
36944
|
+
'touchend',
|
|
36945
|
+
'keydown',
|
|
36946
|
+
'keyup',
|
|
36947
|
+
'focus',
|
|
36948
|
+
'blur',
|
|
36949
|
+
];
|
|
36950
|
+
for (const type of eventTypes) {
|
|
36951
|
+
const handler = el[`on${type}`];
|
|
36952
|
+
if (handler) {
|
|
36953
|
+
listeners[type] = [
|
|
36954
|
+
{
|
|
36955
|
+
listener: handler,
|
|
36956
|
+
useCapture: false,
|
|
36957
|
+
},
|
|
36958
|
+
];
|
|
36965
36959
|
}
|
|
36966
|
-
return listeners;
|
|
36967
36960
|
}
|
|
36961
|
+
return listeners;
|
|
36968
36962
|
}
|
|
36969
36963
|
// Check for click-related events on the element itself
|
|
36970
36964
|
const listeners = getEventListeners(element);
|
|
@@ -36986,7 +36980,7 @@ function run_build_dom_tree() {
|
|
|
36986
36980
|
// Check if element is draggable
|
|
36987
36981
|
const isDraggable = element.draggable || element.getAttribute('draggable') === 'true';
|
|
36988
36982
|
return (hasAriaProps ||
|
|
36989
|
-
|
|
36983
|
+
hasClickStyling ||
|
|
36990
36984
|
hasClickHandler ||
|
|
36991
36985
|
hasClickListeners ||
|
|
36992
36986
|
// isFormRelated ||
|