@midscene/recorder 0.26.2 → 0.26.3-beta-20250813075706.0
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/LICENSE +21 -0
- package/dist/Button.js +2 -2
- package/dist/RecordTimeline.js +51 -51
- package/dist/components/shiny-text.js +2 -2
- package/dist/index.js +4 -8
- package/dist/recorder-iife-index.js +2 -2
- package/dist/recorder-iife.js +413 -1659
- package/dist/recorder.js +5 -5
- package/package.json +5 -5
- package/dist/recorder-iife.js.LICENSE.txt +0 -8
- /package/dist/{Button.d.ts → types/src/Button.d.ts} +0 -0
- /package/dist/{RecordTimeline.d.ts → types/src/RecordTimeline.d.ts} +0 -0
- /package/dist/{components → types/src/components}/shiny-text.d.ts +0 -0
- /package/dist/{index.d.ts → types/src/index.d.ts} +0 -0
- /package/dist/{recorder-iife-index.d.ts → types/src/recorder-iife-index.d.ts} +0 -0
- /package/dist/{recorder.d.ts → types/src/recorder.d.ts} +0 -0
package/dist/recorder.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { getElementXpath, isNotContainerElement } from "@midscene/shared/extractor";
|
|
2
2
|
const DEBUG = 'true' === localStorage.getItem('DEBUG');
|
|
3
3
|
function debugLog(...args) {
|
|
4
4
|
if (DEBUG) console.log('[EventRecorder]', ...args);
|
|
@@ -116,8 +116,8 @@ class EventRecorder {
|
|
|
116
116
|
x: Number(event.clientX.toFixed(2)),
|
|
117
117
|
y: Number(event.clientY.toFixed(2))
|
|
118
118
|
};
|
|
119
|
-
console.log('isNotContainerElement',
|
|
120
|
-
if (
|
|
119
|
+
console.log('isNotContainerElement', isNotContainerElement(target));
|
|
120
|
+
if (isNotContainerElement(target)) {
|
|
121
121
|
elementRect.left = Number(rect.left.toFixed(2));
|
|
122
122
|
elementRect.top = Number(rect.top.toFixed(2));
|
|
123
123
|
elementRect.width = Number(rect.width.toFixed(2));
|
|
@@ -233,7 +233,7 @@ class EventRecorder {
|
|
|
233
233
|
labelInfo = {
|
|
234
234
|
htmlFor: target.htmlFor,
|
|
235
235
|
textContent: target.textContent?.trim(),
|
|
236
|
-
xpath:
|
|
236
|
+
xpath: getElementXpath(target)
|
|
237
237
|
};
|
|
238
238
|
} else {
|
|
239
239
|
let parent = target.parentElement;
|
|
@@ -243,7 +243,7 @@ class EventRecorder {
|
|
|
243
243
|
labelInfo = {
|
|
244
244
|
htmlFor: parent.htmlFor,
|
|
245
245
|
textContent: parent.textContent?.trim(),
|
|
246
|
-
xpath:
|
|
246
|
+
xpath: getElementXpath(parent)
|
|
247
247
|
};
|
|
248
248
|
break;
|
|
249
249
|
}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/recorder",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.3-beta-20250813075706.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
7
|
+
"types": "./dist/types/src/index.d.ts",
|
|
8
8
|
"import": "./dist/index.js"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
11
|
+
"types": "./dist/types/src/index.d.ts",
|
|
12
12
|
"files": [
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@rsbuild/plugin-react": "^1.3.1",
|
|
17
|
-
"@rslib/core": "^0.
|
|
17
|
+
"@rslib/core": "^0.11.2",
|
|
18
18
|
"@types/react": "^18.3.1",
|
|
19
19
|
"react": "18.3.1",
|
|
20
20
|
"typescript": "^5.8.3"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"antd": "^5.21.6",
|
|
25
25
|
"dayjs": "^1.11.11",
|
|
26
26
|
"react-dom": "18.3.1",
|
|
27
|
-
"@midscene/shared": "0.26.
|
|
27
|
+
"@midscene/shared": "0.26.3-beta-20250813075706.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "18.3.1",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|