@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
|
@@ -104,7 +104,7 @@ export declare const BROWSER_FRAME_WORLD_NAME = "__orkestrelBrowserFrame";
|
|
|
104
104
|
*/
|
|
105
105
|
export declare const BROWSER_HAR_CREATOR: Readonly<{
|
|
106
106
|
name: "@orkestrel/browser";
|
|
107
|
-
version: "0.0.
|
|
107
|
+
version: "0.0.21";
|
|
108
108
|
}>;
|
|
109
109
|
|
|
110
110
|
/** Names accessibility roles that receive actionable outline references. */
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ export declare const BROWSER_FRAME_WORLD_NAME = "__orkestrelBrowserFrame";
|
|
|
104
104
|
*/
|
|
105
105
|
export declare const BROWSER_HAR_CREATOR: Readonly<{
|
|
106
106
|
name: "@orkestrel/browser";
|
|
107
|
-
version: "0.0.
|
|
107
|
+
version: "0.0.21";
|
|
108
108
|
}>;
|
|
109
109
|
|
|
110
110
|
/** Names accessibility roles that receive actionable outline references. */
|
package/dist/src/core/index.js
CHANGED
|
@@ -152,7 +152,7 @@ var BROWSER_MOUSE_BUTTON_MASKS = Object.freeze({
|
|
|
152
152
|
*/
|
|
153
153
|
var BROWSER_HAR_CREATOR = Object.freeze({
|
|
154
154
|
name: "@orkestrel/browser",
|
|
155
|
-
version: "0.0.
|
|
155
|
+
version: "0.0.21"
|
|
156
156
|
});
|
|
157
157
|
/** Names the attribute that tags temporary screenshot styles and masks. */
|
|
158
158
|
var BROWSER_SCREENSHOT_ATTRIBUTE = "data-orkestrel-screenshot";
|
|
@@ -1635,6 +1635,15 @@ function filterBrowserOutline(nodes, query) {
|
|
|
1635
1635
|
*/
|
|
1636
1636
|
function renderBrowserOutline(url, title, nodes, limit) {
|
|
1637
1637
|
const rows = [`page ${JSON.stringify(title)} ${url}`];
|
|
1638
|
+
const sessions = /* @__PURE__ */ new Map();
|
|
1639
|
+
for (const node of nodes) {
|
|
1640
|
+
let parents = sessions.get(node.session);
|
|
1641
|
+
if (parents === void 0) {
|
|
1642
|
+
parents = /* @__PURE__ */ new Map();
|
|
1643
|
+
sessions.set(node.session, parents);
|
|
1644
|
+
}
|
|
1645
|
+
if (!parents.has(node.id)) parents.set(node.id, node);
|
|
1646
|
+
}
|
|
1638
1647
|
let count = 0;
|
|
1639
1648
|
let total = 0;
|
|
1640
1649
|
for (const node of nodes) {
|
|
@@ -1645,7 +1654,7 @@ function renderBrowserOutline(url, title, nodes, limit) {
|
|
|
1645
1654
|
continue;
|
|
1646
1655
|
}
|
|
1647
1656
|
if (node.role === "StaticText") {
|
|
1648
|
-
const parent =
|
|
1657
|
+
const parent = node.parent === void 0 ? void 0 : sessions.get(node.session)?.get(node.parent);
|
|
1649
1658
|
if (name !== "" && name !== normalizeBrowserName(parent?.name ?? "")) rows.push(name);
|
|
1650
1659
|
continue;
|
|
1651
1660
|
}
|