@reticlehq/browser 3.4.0 → 3.6.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/dist/actions/actions-dom.js +44 -43
- package/dist/actions/actions-press.d.ts +10 -4
- package/dist/actions/actions-press.js +108 -17
- package/dist/actions/actions.d.ts +2 -1
- package/dist/actions/actions.js +25 -26
- package/dist/actions/danger-context.js +1 -1
- package/dist/commands/commands.js +2 -6
- package/dist/connect-options.d.ts +1 -0
- package/dist/dom/a11y.js +43 -11
- package/dist/dom/addressing/refs.js +2 -1
- package/dist/dom/addressing/testid-attr.d.ts +4 -0
- package/dist/dom/addressing/testid-attr.js +14 -0
- package/dist/dom/occlusion.js +5 -1
- package/dist/dom/query.d.ts +1 -0
- package/dist/dom/query.js +42 -15
- package/dist/dom/snapshot.js +1 -0
- package/dist/observers/departure.js +51 -9
- package/dist/observers/dom.js +3 -2
- package/dist/observers/field.js +5 -3
- package/dist/observers/health.js +63 -2
- package/dist/observers/network-stream.d.ts +1 -1
- package/dist/observers/network-stream.js +3 -3
- package/dist/observers/network.js +1 -1
- package/dist/observers/storage.js +6 -1
- package/dist/presenter/carousel/carousel.d.ts +5 -2
- package/dist/presenter/carousel/carousel.js +34 -7
- package/dist/presenter/carousel/offer-card.d.ts +2 -2
- package/dist/presenter/carousel/offer-card.js +2 -1
- package/dist/presenter/carousel/panel-slides.d.ts +4 -3
- package/dist/presenter/carousel/panel-slides.js +43 -6
- package/dist/presenter/carousel/talk-card.d.ts +1 -1
- package/dist/presenter/chrome/log-kinds.d.ts +5 -0
- package/dist/presenter/chrome/log-kinds.js +1 -0
- package/dist/presenter/chrome/log-memory.d.ts +12 -0
- package/dist/presenter/chrome/log-memory.js +39 -0
- package/dist/presenter/chrome/presenter-hud-chrome.d.ts +1 -0
- package/dist/presenter/chrome/presenter-hud-chrome.js +7 -1
- package/dist/presenter/chrome/presenter-log.d.ts +5 -4
- package/dist/presenter/chrome/presenter-log.js +55 -5
- package/dist/presenter/chrome/presenter-report-copy.d.ts +11 -1
- package/dist/presenter/chrome/presenter-report-copy.js +14 -1
- package/dist/presenter/hud-telemetry.js +31 -2
- package/dist/presenter/icons/presenter-heroicons-data.d.ts +1 -0
- package/dist/presenter/icons/presenter-heroicons-data.js +4 -3
- package/dist/presenter/icons/presenter-icons.d.ts +2 -0
- package/dist/presenter/icons/presenter-icons.js +2 -0
- package/dist/presenter/presenter-account.d.ts +5 -4
- package/dist/presenter/presenter-account.js +23 -10
- package/dist/presenter/presenter-chat-views.d.ts +21 -0
- package/dist/presenter/presenter-chat-views.js +382 -0
- package/dist/presenter/presenter-config.d.ts +3 -2
- package/dist/presenter/presenter-config.js +4 -3
- package/dist/presenter/presenter-controls.d.ts +4 -2
- package/dist/presenter/presenter-controls.js +231 -51
- package/dist/presenter/presenter-design-tokens.d.ts +1 -0
- package/dist/presenter/presenter-design-tokens.js +34 -0
- package/dist/presenter/presenter-dock-layout.js +1 -1
- package/dist/presenter/presenter-frame.d.ts +12 -0
- package/dist/presenter/presenter-frame.js +189 -0
- package/dist/presenter/presenter-plan.d.ts +10 -0
- package/dist/presenter/presenter-plan.js +185 -0
- package/dist/presenter/presenter-report-styles.js +7 -0
- package/dist/presenter/presenter-report.d.ts +1 -1
- package/dist/presenter/presenter-report.js +53 -16
- package/dist/presenter/presenter-settings-styles.js +10 -0
- package/dist/presenter/presenter-settings.d.ts +5 -0
- package/dist/presenter/presenter-settings.js +71 -11
- package/dist/presenter/presenter-shell-styles.js +39 -42
- package/dist/presenter/presenter-shell.d.ts +8 -1
- package/dist/presenter/presenter-shell.js +124 -72
- package/dist/presenter/presenter-styles.js +9 -1
- package/dist/presenter/presenter.d.ts +4 -3
- package/dist/presenter/presenter.js +101 -13
- package/dist/presenter/tour/tour.d.ts +4 -1
- package/dist/presenter/tour/tour.js +6 -4
- package/dist/recorder/recorder.js +2 -2
- package/dist/registry/auto-testids.js +3 -4
- package/dist/registry/declared-platform.js +2 -0
- package/dist/reticle-inject.js +880 -513
- package/dist/reticle.d.ts +10 -1
- package/dist/reticle.js +73 -9
- package/dist/review/annotator-styles.d.ts +1 -1
- package/dist/review/annotator.d.ts +7 -0
- package/dist/review/annotator.js +20 -2
- package/dist/review/mark-anchor.js +2 -2
- package/dist/session-continuity.js +2 -1
- package/dist/storage-keys.d.ts +14 -0
- package/dist/storage-keys.js +17 -0
- package/package.json +3 -2
|
@@ -2,7 +2,8 @@ import { COPIED_LABEL, COPY_FLASH_MS, COPY_LABEL, COPY_MANUAL_LABEL, TOUR_ATTR,
|
|
|
2
2
|
import { TourAnchor } from '@reticlehq/core/tour';
|
|
3
3
|
import { RETICLE_URL_PARAM } from '@reticlehq/core';
|
|
4
4
|
import { appModalOpen } from '../../dom/dom-ignore.js';
|
|
5
|
-
|
|
5
|
+
import { TOUR_SEEN_KEY_PREFIX } from '../../storage-keys.js';
|
|
6
|
+
export { TOUR_SEEN_KEY_PREFIX };
|
|
6
7
|
const APP_SELECTORS = ['main', '#root', '#app'];
|
|
7
8
|
const HUD_PARTS = ['[data-reticle-hud]', '[data-reticle-chat-panel]'];
|
|
8
9
|
function unionOfVisible(doc, selectors) {
|
|
@@ -23,10 +24,11 @@ function unionOfVisible(doc, selectors) {
|
|
|
23
24
|
return undefined;
|
|
24
25
|
return { left, top, width: right - left, height: bottom - top };
|
|
25
26
|
}
|
|
26
|
-
const HUD_CONTROL_SELECTORS = {
|
|
27
|
+
export const HUD_CONTROL_SELECTORS = {
|
|
27
28
|
[TourAnchor.HUD_CHAT]: '[data-reticle-chat-toggle]',
|
|
28
|
-
[TourAnchor.
|
|
29
|
-
[TourAnchor.
|
|
29
|
+
[TourAnchor.HUD_FLOWS]: '[data-reticle-chat-view-btn="flows"]',
|
|
30
|
+
[TourAnchor.HUD_ANNOTATE]: '[data-reticle-chat-view-btn="annotations"]',
|
|
31
|
+
[TourAnchor.HUD_IMPACT]: '[data-reticle-chat-impact]',
|
|
30
32
|
[TourAnchor.HUD_SETTINGS]: '[data-reticle-settings-btn]',
|
|
31
33
|
};
|
|
32
34
|
function anchorBox(doc, anchor) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { readTestId } from '../dom/addressing/testid-attr.js';
|
|
1
2
|
import { ActionType, AnchorKind, AnnotationKind, DEGRADED_ANCHOR_ROLE, EventType, FLOW_FILE_VERSION, FlowStepTool, RecorderPhase, PredicateKind, } from '@reticlehq/core';
|
|
2
3
|
import { REDACTED_VALUE } from '@reticlehq/core';
|
|
3
4
|
import { sourceFromDom } from '../dom/addressing/source.js';
|
|
@@ -9,7 +10,6 @@ export const RECORDER_EMPTY_MSG = 'recorded 0 steps';
|
|
|
9
10
|
const STATUS_RECORDING = 'recording…';
|
|
10
11
|
const STATUS_IDLE = 'ready';
|
|
11
12
|
const STATUS_ANNOTATE = 'pick an annotation';
|
|
12
|
-
const TESTID_ATTR = 'data-testid';
|
|
13
13
|
const TOOL = FlowStepTool.ACT;
|
|
14
14
|
const BUTTON_LABEL = {
|
|
15
15
|
record: 'Record',
|
|
@@ -31,7 +31,7 @@ const NEEDS_SIGNAL = new Set([
|
|
|
31
31
|
]);
|
|
32
32
|
const DEFAULT_NAME = 'recorded-flow';
|
|
33
33
|
export function anchorFor(el) {
|
|
34
|
-
const testid = el
|
|
34
|
+
const testid = readTestId(el);
|
|
35
35
|
if (testid !== null && testid.length > 0) {
|
|
36
36
|
return { anchor: { kind: AnchorKind.TESTID, value: testid }, degraded: false };
|
|
37
37
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const TESTID_SELECTOR = `[${TESTID_ATTR}]`;
|
|
1
|
+
import { getTestIdAttr, testIdSelector } from '../dom/addressing/testid-attr.js';
|
|
3
2
|
export const MAX_AUTO_TESTIDS = 200;
|
|
4
3
|
const RETICLE_OWN_PREFIX = 'reticle-';
|
|
5
4
|
export function domTestids(doc) {
|
|
@@ -7,13 +6,13 @@ export function domTestids(doc) {
|
|
|
7
6
|
const seen = new Set();
|
|
8
7
|
let nodes;
|
|
9
8
|
try {
|
|
10
|
-
nodes = doc.querySelectorAll(
|
|
9
|
+
nodes = doc.querySelectorAll(testIdSelector());
|
|
11
10
|
}
|
|
12
11
|
catch {
|
|
13
12
|
return out;
|
|
14
13
|
}
|
|
15
14
|
for (let i = 0; i < nodes.length && out.length < MAX_AUTO_TESTIDS; i += 1) {
|
|
16
|
-
const value = nodes[i]?.getAttribute(
|
|
15
|
+
const value = nodes[i]?.getAttribute(getTestIdAttr());
|
|
17
16
|
if (null === value || undefined === value)
|
|
18
17
|
continue;
|
|
19
18
|
const trimmed = value.trim();
|