@orkestrel/browser 0.0.20 → 0.0.21
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/src/core/index.cjs +11 -2
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +1 -1
- package/dist/src/core/index.d.ts +1 -1
- package/dist/src/core/index.js +11 -2
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +1 -1
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.js +1 -1
- package/dist/src/server/index.js.map +1 -1
- package/package.json +4 -4
package/dist/src/core/index.cjs
CHANGED
|
@@ -153,7 +153,7 @@ var BROWSER_MOUSE_BUTTON_MASKS = Object.freeze({
|
|
|
153
153
|
*/
|
|
154
154
|
var BROWSER_HAR_CREATOR = Object.freeze({
|
|
155
155
|
name: "@orkestrel/browser",
|
|
156
|
-
version: "0.0.
|
|
156
|
+
version: "0.0.21"
|
|
157
157
|
});
|
|
158
158
|
/** Names the attribute that tags temporary screenshot styles and masks. */
|
|
159
159
|
var BROWSER_SCREENSHOT_ATTRIBUTE = "data-orkestrel-screenshot";
|
|
@@ -1636,6 +1636,15 @@ function filterBrowserOutline(nodes, query) {
|
|
|
1636
1636
|
*/
|
|
1637
1637
|
function renderBrowserOutline(url, title, nodes, limit) {
|
|
1638
1638
|
const rows = [`page ${JSON.stringify(title)} ${url}`];
|
|
1639
|
+
const sessions = /* @__PURE__ */ new Map();
|
|
1640
|
+
for (const node of nodes) {
|
|
1641
|
+
let parents = sessions.get(node.session);
|
|
1642
|
+
if (parents === void 0) {
|
|
1643
|
+
parents = /* @__PURE__ */ new Map();
|
|
1644
|
+
sessions.set(node.session, parents);
|
|
1645
|
+
}
|
|
1646
|
+
if (!parents.has(node.id)) parents.set(node.id, node);
|
|
1647
|
+
}
|
|
1639
1648
|
let count = 0;
|
|
1640
1649
|
let total = 0;
|
|
1641
1650
|
for (const node of nodes) {
|
|
@@ -1646,7 +1655,7 @@ function renderBrowserOutline(url, title, nodes, limit) {
|
|
|
1646
1655
|
continue;
|
|
1647
1656
|
}
|
|
1648
1657
|
if (node.role === "StaticText") {
|
|
1649
|
-
const parent =
|
|
1658
|
+
const parent = node.parent === void 0 ? void 0 : sessions.get(node.session)?.get(node.parent);
|
|
1650
1659
|
if (name !== "" && name !== normalizeBrowserName(parent?.name ?? "")) rows.push(name);
|
|
1651
1660
|
continue;
|
|
1652
1661
|
}
|