@thinkingos/vsl-sdk 1.1.2 → 1.1.4
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/index.mjs +11 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
// node_modules/tsup/assets/esm_shims.js
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
var getFilename = () => fileURLToPath(import.meta.url);
|
|
5
|
+
var getDirname = () => path.dirname(getFilename());
|
|
6
|
+
var __dirname = /* @__PURE__ */ getDirname();
|
|
7
|
+
|
|
1
8
|
// src/utils/idGenerator.ts
|
|
2
9
|
var TYPE_ABBREVIATIONS = {
|
|
3
10
|
button: "btn",
|
|
@@ -677,24 +684,24 @@ function hasZeroBox(rect) {
|
|
|
677
684
|
function collectVisibleChildren(parent, parentPath, url) {
|
|
678
685
|
const result = [];
|
|
679
686
|
Array.from(parent.children).forEach((child, index) => {
|
|
680
|
-
const
|
|
687
|
+
const path2 = [...parentPath, index];
|
|
681
688
|
const tag = child.tagName.toLowerCase();
|
|
682
689
|
if (NON_RENDERABLE_TAGS.has(tag) || isDisplayNone(child)) {
|
|
683
690
|
return;
|
|
684
691
|
}
|
|
685
692
|
const rect = toRect(child.getBoundingClientRect());
|
|
686
693
|
if (isVisibilityHidden(child) || hasZeroBox(rect)) {
|
|
687
|
-
result.push(...collectVisibleChildren(child,
|
|
694
|
+
result.push(...collectVisibleChildren(child, path2, url));
|
|
688
695
|
return;
|
|
689
696
|
}
|
|
690
697
|
result.push({
|
|
691
698
|
tag,
|
|
692
|
-
indexPath:
|
|
699
|
+
indexPath: path2,
|
|
693
700
|
rect,
|
|
694
701
|
text: filteredOwnText(child, url) || null,
|
|
695
702
|
attributes: extractAttributes(child),
|
|
696
703
|
css: captureCss(child),
|
|
697
|
-
children: collectVisibleChildren(child,
|
|
704
|
+
children: collectVisibleChildren(child, path2, url)
|
|
698
705
|
});
|
|
699
706
|
});
|
|
700
707
|
return result;
|