recordable 0.3.0 → 0.5.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/README.md +198 -44
- package/dist/actions.d.ts +8 -0
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +11 -5
- package/dist/actions.js.map +1 -1
- package/dist/audio/track.d.ts +10 -0
- package/dist/audio/track.d.ts.map +1 -1
- package/dist/audio/track.js +19 -0
- package/dist/audio/track.js.map +1 -1
- package/dist/browser/cursor.d.ts +8 -6
- package/dist/browser/cursor.d.ts.map +1 -1
- package/dist/browser/cursor.js +32 -21
- package/dist/browser/cursor.js.map +1 -1
- package/dist/browser/dom.d.ts +33 -13
- package/dist/browser/dom.d.ts.map +1 -1
- package/dist/browser/dom.js +158 -56
- package/dist/browser/dom.js.map +1 -1
- package/dist/browser/page-zoom.d.ts +11 -0
- package/dist/browser/page-zoom.d.ts.map +1 -0
- package/dist/browser/page-zoom.js +37 -0
- package/dist/browser/page-zoom.js.map +1 -0
- package/dist/browser/play-button.d.ts.map +1 -1
- package/dist/browser/play-button.js.map +1 -1
- package/dist/browser/runtime.d.ts +1 -0
- package/dist/browser/runtime.d.ts.map +1 -1
- package/dist/browser/runtime.js +22 -14
- package/dist/browser/runtime.js.map +1 -1
- package/dist/browser/targets.d.ts.map +1 -0
- package/dist/{targets.js → browser/targets.js} +3 -2
- package/dist/browser/targets.js.map +1 -0
- package/dist/compose/boundaries.d.ts +13 -0
- package/dist/compose/boundaries.d.ts.map +1 -0
- package/dist/compose/boundaries.js +49 -0
- package/dist/compose/boundaries.js.map +1 -0
- package/dist/compose/mix.d.ts +3 -2
- package/dist/compose/mix.d.ts.map +1 -1
- package/dist/compose/mix.js +9 -4
- package/dist/compose/mix.js.map +1 -1
- package/dist/compose/recordable.d.ts +28 -3
- package/dist/compose/recordable.d.ts.map +1 -1
- package/dist/compose/recordable.js +75 -18
- package/dist/compose/recordable.js.map +1 -1
- package/dist/compose/session.d.ts +20 -8
- package/dist/compose/session.d.ts.map +1 -1
- package/dist/compose/session.js +120 -38
- package/dist/compose/session.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -3
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/ffmpeg.d.ts +3 -0
- package/dist/ffmpeg.d.ts.map +1 -1
- package/dist/ffmpeg.js +22 -4
- package/dist/ffmpeg.js.map +1 -1
- package/dist/formats/json.d.ts +2 -1
- package/dist/formats/json.d.ts.map +1 -1
- package/dist/formats/json.js.map +1 -1
- package/dist/formats/markdown/method.d.ts.map +1 -1
- package/dist/formats/markdown/method.js +4 -3
- package/dist/formats/markdown/method.js.map +1 -1
- package/dist/fs.d.ts +16 -0
- package/dist/fs.d.ts.map +1 -1
- package/dist/fs.js +33 -4
- package/dist/fs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +3 -1
- package/dist/logger.js.map +1 -1
- package/dist/result.d.ts +30 -0
- package/dist/result.d.ts.map +1 -0
- package/dist/result.js +8 -0
- package/dist/result.js.map +1 -0
- package/dist/timing.d.ts +2 -0
- package/dist/timing.d.ts.map +1 -1
- package/dist/timing.js +10 -4
- package/dist/timing.js.map +1 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +11 -10
- package/dist/validate.js.map +1 -1
- package/dist/video/recorder.d.ts +26 -3
- package/dist/video/recorder.d.ts.map +1 -1
- package/dist/video/recorder.js +50 -32
- package/dist/video/recorder.js.map +1 -1
- package/dist/video/stitch.js +3 -17
- package/dist/video/stitch.js.map +1 -1
- package/dist/voiceover/compile.d.ts.map +1 -1
- package/dist/voiceover/compile.js +42 -24
- package/dist/voiceover/compile.js.map +1 -1
- package/dist/voiceover/elevenlabs.d.ts.map +1 -1
- package/dist/voiceover/elevenlabs.js +41 -11
- package/dist/voiceover/elevenlabs.js.map +1 -1
- package/dist/voiceover/mock.d.ts.map +1 -1
- package/dist/voiceover/mock.js +38 -15
- package/dist/voiceover/mock.js.map +1 -1
- package/package.json +20 -6
- package/recordable.schema.json +81 -0
- package/dist/targets.d.ts.map +0 -1
- package/dist/targets.js.map +0 -1
- /package/dist/{targets.d.ts → browser/targets.d.ts} +0 -0
package/dist/browser/cursor.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { sleep } from "../utils.js";
|
|
2
|
-
import { cursorMoveMs, PRESS_DOWN_MS, PRESS_SETTLE_MS } from "../timing.js";
|
|
2
|
+
import { cursorMoveMs, PRESS_DOWN_MS, PRESS_SETTLE_MS, PRESS_TRANSITION_MS, } from "../timing.js";
|
|
3
3
|
const CURSOR_ID = "__recordable_cursor__";
|
|
4
4
|
const CURSOR_STYLE_ID = "__recordable_cursor_style__";
|
|
5
|
+
/** Press-dip scale — presentation only. */
|
|
6
|
+
const CURSOR_PRESS_SCALE = 0.88;
|
|
7
|
+
/** Base move transition (ms) — presentation only. */
|
|
8
|
+
const CURSOR_MOVE_TRANSITION_MS = 150;
|
|
5
9
|
/**
|
|
6
10
|
* An animated cursor overlay drawn into the page. Tracks its own position so
|
|
7
11
|
* each move can ease from where it last was, and dips on click for a tactile
|
|
@@ -22,12 +26,12 @@ export class Cursor {
|
|
|
22
26
|
}
|
|
23
27
|
/** Restore the parked position (if any) and re-inject — called on resume so the
|
|
24
28
|
* new segment opens with the cursor where the previous one ended. */
|
|
25
|
-
async unpark(page, zoom = { tx: 0, ty: 0, s: 1 }
|
|
29
|
+
async unpark(page, zoom = { tx: 0, ty: 0, s: 1 }) {
|
|
26
30
|
if (this.parked) {
|
|
27
31
|
this.pos = this.parked;
|
|
28
32
|
this.parked = null;
|
|
29
33
|
}
|
|
30
|
-
await this.inject(page, zoom
|
|
34
|
+
await this.inject(page, zoom);
|
|
31
35
|
}
|
|
32
36
|
/**
|
|
33
37
|
* Ensure the cursor overlay exists and sits at the carried position, then sync
|
|
@@ -36,15 +40,15 @@ export class Cursor {
|
|
|
36
40
|
* repositions it — so a resume() can restore the cursor even when the overlay
|
|
37
41
|
* survived the off-camera gap.
|
|
38
42
|
*/
|
|
39
|
-
async inject(page, zoom = { tx: 0, ty: 0, s: 1 }
|
|
43
|
+
async inject(page, zoom = { tx: 0, ty: 0, s: 1 }) {
|
|
40
44
|
// Can't draw into an iframe or before the document's <body> has parsed. A
|
|
41
45
|
// too-early call (e.g. from a navigation event) is a no-op; the next moveTo
|
|
42
46
|
// re-injects when ready.
|
|
43
47
|
const ready = await page.evaluate(() => window === window.parent && !!document.body);
|
|
44
48
|
if (!ready)
|
|
45
49
|
return;
|
|
46
|
-
const { cx, cy } = await this._toDocCoords(page, this.pos.x, this.pos.y, zoom
|
|
47
|
-
await page.evaluate(({ id, styleId, cx, cy }) => {
|
|
50
|
+
const { cx, cy } = await this._toDocCoords(page, this.pos.x, this.pos.y, zoom);
|
|
51
|
+
await page.evaluate(({ id, styleId, cx, cy, moveMs, pressScale, pressMs }) => {
|
|
48
52
|
// Note: we intentionally do NOT hide the native pointer. The screencast
|
|
49
53
|
// doesn't capture the OS cursor, so it never reaches the video; hiding it
|
|
50
54
|
// only blanked the real pointer in the live headful window (incl. during
|
|
@@ -60,12 +64,12 @@ export class Cursor {
|
|
|
60
64
|
z-index: 2147483647;
|
|
61
65
|
pointer-events: none;
|
|
62
66
|
will-change: transform;
|
|
63
|
-
transition: transform
|
|
67
|
+
transition: transform ${moveMs}ms;
|
|
64
68
|
filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
|
|
65
69
|
}
|
|
66
70
|
#${id}.pressing {
|
|
67
|
-
transform: var(--recordable-pos) scale(
|
|
68
|
-
transition: transform
|
|
71
|
+
transform: var(--recordable-pos) scale(${pressScale}) !important;
|
|
72
|
+
transition: transform ${pressMs}ms !important;
|
|
69
73
|
}
|
|
70
74
|
`;
|
|
71
75
|
document.head.appendChild(style);
|
|
@@ -85,20 +89,28 @@ export class Cursor {
|
|
|
85
89
|
cursor.style.transition = "none";
|
|
86
90
|
cursor.style.setProperty("--recordable-pos", `translate(${cx}px, ${cy}px)`);
|
|
87
91
|
cursor.style.transform = `translate(${cx}px, ${cy}px)`;
|
|
88
|
-
}, {
|
|
92
|
+
}, {
|
|
93
|
+
id: CURSOR_ID,
|
|
94
|
+
styleId: CURSOR_STYLE_ID,
|
|
95
|
+
cx,
|
|
96
|
+
cy,
|
|
97
|
+
moveMs: CURSOR_MOVE_TRANSITION_MS,
|
|
98
|
+
pressScale: CURSOR_PRESS_SCALE,
|
|
99
|
+
pressMs: PRESS_TRANSITION_MS,
|
|
100
|
+
});
|
|
89
101
|
await page.mouse.move(this.pos.x, this.pos.y);
|
|
90
102
|
}
|
|
91
103
|
/** Ease the overlay (and the real mouse) to viewport coords `toX,toY`. */
|
|
92
|
-
async moveTo(page, toX, toY, zoom
|
|
104
|
+
async moveTo(page, toX, toY, zoom) {
|
|
93
105
|
// Self-heal: a navigation (incl. click-triggered ones with no following
|
|
94
106
|
// visit/waitFor) wipes the overlay. Re-inject at the carried position before
|
|
95
107
|
// animating, so the move is always visible — never an instant, cursor-less jump.
|
|
96
|
-
await this.inject(page, zoom
|
|
108
|
+
await this.inject(page, zoom);
|
|
97
109
|
const dx = toX - this.pos.x;
|
|
98
110
|
const dy = toY - this.pos.y;
|
|
99
111
|
const dist = Math.sqrt(dx * dx + dy * dy);
|
|
100
112
|
const dur = cursorMoveMs(dist);
|
|
101
|
-
const { cx, cy } = await this._toDocCoords(page, toX, toY, zoom
|
|
113
|
+
const { cx, cy } = await this._toDocCoords(page, toX, toY, zoom);
|
|
102
114
|
await page.evaluate(({ id, cx, cy, dur }) => new Promise((resolve) => {
|
|
103
115
|
const cursor = document.getElementById(id);
|
|
104
116
|
if (!cursor) {
|
|
@@ -119,19 +131,18 @@ export class Cursor {
|
|
|
119
131
|
* are positioned relative to that ancestor (not the viewport) and scroll with
|
|
120
132
|
* the page, so we add scroll and apply the inverse zoom transform.
|
|
121
133
|
*
|
|
122
|
-
* `pageZoom`
|
|
123
|
-
*
|
|
124
|
-
*
|
|
134
|
+
* Note: the `pageZoom` config (genuine browser zoom via chrome.tabs.setZoom)
|
|
135
|
+
* needs no handling here. Page zoom rescales the CSS pixel itself, so the
|
|
136
|
+
* overlay, the content, and Puppeteer's `boundingBox()`/`mouse` coords all share
|
|
137
|
+
* one post-zoom coordinate space — feeding the overlay those raw coords keeps it
|
|
138
|
+
* aligned with the target automatically.
|
|
125
139
|
*/
|
|
126
|
-
async _toDocCoords(page, x, y, { tx, ty, s }
|
|
140
|
+
async _toDocCoords(page, x, y, { tx, ty, s }) {
|
|
127
141
|
const hasTransform = s !== 1 || tx !== 0 || ty !== 0;
|
|
128
142
|
const scroll = hasTransform
|
|
129
143
|
? await page.evaluate(() => ({ x: window.scrollX, y: window.scrollY }))
|
|
130
144
|
: { x: 0, y: 0 };
|
|
131
|
-
return {
|
|
132
|
-
cx: (x + scroll.x - tx) / s / pageZoom,
|
|
133
|
-
cy: (y + scroll.y - ty) / s / pageZoom,
|
|
134
|
-
};
|
|
145
|
+
return { cx: (x + scroll.x - tx) / s, cy: (y + scroll.y - ty) / s };
|
|
135
146
|
}
|
|
136
147
|
/** Briefly scale the cursor down to signal a press. */
|
|
137
148
|
async clickEffect(page) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/browser/cursor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/browser/cursor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,eAAe,EACf,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAC1C,M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,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACtE,CAAC;IAED,uDAAuD;IACvD,KAAK,CAAC,WAAW,CAAC,IAAU;QAC1B,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE;YACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YAC3C,IAAI,CAAC,MAAM;gBAAE,OAAO;YACpB,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACjC,KAAK,MAAM,CAAC,WAAW,CAAC;QAC1B,CAAC,EAAE,SAAS,CAAC,CAAC;QACd,MAAM,KAAK,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE;YACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5D,CAAC,EAAE,SAAS,CAAC,CAAC;QACd,MAAM,KAAK,CAAC,eAAe,CAAC,CAAC;IAC/B,CAAC;CACF"}
|
package/dist/browser/dom.d.ts
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
|
-
import { type Page } from "puppeteer";
|
|
1
|
+
import { type ElementHandle, type Page } from "puppeteer";
|
|
2
2
|
/** Coordinates in viewport pixels. */
|
|
3
3
|
export interface Point {
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
6
|
}
|
|
7
|
-
/** Resolve a target and wait for the element to
|
|
8
|
-
|
|
7
|
+
/** Resolve a target and wait for the element to be *visible* in any frame, then
|
|
8
|
+
* return its handle.
|
|
9
|
+
*
|
|
10
|
+
* Two reasons this is more than a bare `page.locator(...).waitHandle()`:
|
|
11
|
+
* - Visibility (not mere existence): callers immediately read `boundingBox()`
|
|
12
|
+
* to click/scroll, but Puppeteer's default locator resolves the instant the
|
|
13
|
+
* node enters the DOM (`waitForSelector(..., {visible:false})`) — so an
|
|
14
|
+
* element inserted-but-not-yet-laid-out yields a null box. `setVisibility`
|
|
15
|
+
* makes it wait for a real layout box.
|
|
16
|
+
* - Frames: modal dialogs (e.g. APEX `apex.navigation.dialog`) render their
|
|
17
|
+
* content in an `<iframe>`. The top frame can hold a hidden placeholder with
|
|
18
|
+
* the same id, so we race every frame and take the first *visible* match.
|
|
19
|
+
* An iframe element's `boundingBox()` is reported in main-frame coordinates,
|
|
20
|
+
* so the coordinate-based click still lands correctly. */
|
|
21
|
+
export declare function getHandle(page: Page, target: string): Promise<ElementHandle<Element>>;
|
|
9
22
|
/** Centre coords of a target element, jittered up to 20% of each dimension. */
|
|
10
23
|
export declare function getElementCenter(page: Page, target: string): Promise<Point>;
|
|
11
24
|
/**
|
|
@@ -13,19 +26,26 @@ export declare function getElementCenter(page: Page, target: string): Promise<Po
|
|
|
13
26
|
* Accepts CSS position keywords/percentages or an element selector.
|
|
14
27
|
*/
|
|
15
28
|
export declare function originToCoords(page: Page, origin: string): Promise<Point>;
|
|
16
|
-
/** Animate the page's scroll position to `targetY` over `duration` ms with an ease curve. */
|
|
17
|
-
export declare function smoothScroll(page: Page, targetY: number, duration: number): Promise<void>;
|
|
18
29
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* - CSS selector or `text:` prefix → element centred in the viewport
|
|
30
|
+
* Animate a scroller's vertical position to `targetTop` over `duration` ms with an
|
|
31
|
+
* ease curve. `container` null scrolls the window; a handle scrolls that element's
|
|
32
|
+
* `scrollTop`. The target is clamped to the scroller's range.
|
|
23
33
|
*/
|
|
24
|
-
export declare function
|
|
34
|
+
export declare function smoothScroll(page: Page, targetTop: number, duration: number, container?: ElementHandle<Element> | null): Promise<void>;
|
|
25
35
|
/**
|
|
26
|
-
*
|
|
27
|
-
* `
|
|
28
|
-
*
|
|
36
|
+
* Smooth-scroll to an element or position. Without `container` the window scrolls;
|
|
37
|
+
* with one, `target` is resolved against that scroll container instead:
|
|
38
|
+
* - `"top"` / `"bottom"` → scroller extremes
|
|
39
|
+
* - number → absolute scrollTop (px)
|
|
40
|
+
* - CSS selector or `text:` prefix → element centred within the scroller
|
|
41
|
+
*/
|
|
42
|
+
export declare function smoothScrollToTarget(page: Page, target: string | number, duration: number, container?: string): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Scroll `target` into view if it lies outside the visible area (keeping `margin`
|
|
45
|
+
* px clear on each side). No-op when already comfortably visible. `speed` (px/s)
|
|
46
|
+
* sets the scroll duration. Scrolls the target's nearest scrollable container
|
|
47
|
+
* first (so it's revealed inside a modal / sidebar / pane), then the window so the
|
|
48
|
+
* container itself is on screen.
|
|
29
49
|
*/
|
|
30
50
|
export declare function scrollIntoView(page: Page, target: string, margin: number, speed: number): Promise<void>;
|
|
31
51
|
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/browser/dom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/browser/dom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAW1D,sCAAsC;AACtC,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;;;;;;;;;;6DAa6D;AAC7D,wBAAsB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,mCAczD;AAED,+EAA+E;AAC/E,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,KAAK,CAAC,CAchB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,KAAK,CAAC,CA4BhB;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,aAAa,CAAC,OAAO,CAAC,GAAG,IAAW,GAC9C,OAAO,CAAC,IAAI,CAAC,CAgCf;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAmCf;AAqFD;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
package/dist/browser/dom.js
CHANGED
|
@@ -1,11 +1,34 @@
|
|
|
1
|
-
import { isPositionValue, resolveTarget } from "
|
|
2
|
-
|
|
1
|
+
import { isPositionValue, resolveTarget } from "./targets.js";
|
|
2
|
+
import { RecordableError } from "../errors.js";
|
|
3
|
+
/** Jitter spread as a fraction of an element's dimension (±20% of each side). */
|
|
4
|
+
const JITTER_FRACTION = 0.4;
|
|
5
|
+
/** Frame interval in ms (≈ one 60fps frame). */
|
|
6
|
+
const FRAME_MS = 16;
|
|
7
|
+
/** Default viewport height (px) when the page has no viewport set. */
|
|
8
|
+
const DEFAULT_VIEWPORT_HEIGHT = 900;
|
|
9
|
+
/** Resolve a target and wait for the element to be *visible* in any frame, then
|
|
10
|
+
* return its handle.
|
|
11
|
+
*
|
|
12
|
+
* Two reasons this is more than a bare `page.locator(...).waitHandle()`:
|
|
13
|
+
* - Visibility (not mere existence): callers immediately read `boundingBox()`
|
|
14
|
+
* to click/scroll, but Puppeteer's default locator resolves the instant the
|
|
15
|
+
* node enters the DOM (`waitForSelector(..., {visible:false})`) — so an
|
|
16
|
+
* element inserted-but-not-yet-laid-out yields a null box. `setVisibility`
|
|
17
|
+
* makes it wait for a real layout box.
|
|
18
|
+
* - Frames: modal dialogs (e.g. APEX `apex.navigation.dialog`) render their
|
|
19
|
+
* content in an `<iframe>`. The top frame can hold a hidden placeholder with
|
|
20
|
+
* the same id, so we race every frame and take the first *visible* match.
|
|
21
|
+
* An iframe element's `boundingBox()` is reported in main-frame coordinates,
|
|
22
|
+
* so the coordinate-based click still lands correctly. */
|
|
3
23
|
export async function getHandle(page, target) {
|
|
24
|
+
const selector = resolveTarget(target);
|
|
4
25
|
try {
|
|
5
|
-
return await
|
|
26
|
+
return await Promise.any(page
|
|
27
|
+
.frames()
|
|
28
|
+
.map((f) => f.locator(selector).setVisibility("visible").waitHandle()));
|
|
6
29
|
}
|
|
7
30
|
catch {
|
|
8
|
-
throw new
|
|
31
|
+
throw new RecordableError("TARGET_NOT_FOUND", `Could not find target: "${target}"`);
|
|
9
32
|
}
|
|
10
33
|
}
|
|
11
34
|
/** Centre coords of a target element, jittered up to 20% of each dimension. */
|
|
@@ -13,8 +36,8 @@ export async function getElementCenter(page, target) {
|
|
|
13
36
|
const handle = await getHandle(page, target);
|
|
14
37
|
const box = await handle.boundingBox();
|
|
15
38
|
if (!box)
|
|
16
|
-
throw new
|
|
17
|
-
const offset = (range) => (Math.random() - 0.5) * range *
|
|
39
|
+
throw new RecordableError("TARGET_NOT_FOUND", `No bounding box for "${target}"`);
|
|
40
|
+
const offset = (range) => (Math.random() - 0.5) * range * JITTER_FRACTION;
|
|
18
41
|
return {
|
|
19
42
|
x: box.x + box.width / 2 + offset(box.width),
|
|
20
43
|
y: box.y + box.height / 2 + offset(box.height),
|
|
@@ -54,81 +77,160 @@ export async function originToCoords(page, origin) {
|
|
|
54
77
|
return { x: (vw * px) / 100, y: (vh * py) / 100 };
|
|
55
78
|
}, origin);
|
|
56
79
|
}
|
|
57
|
-
/**
|
|
58
|
-
|
|
59
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Animate a scroller's vertical position to `targetTop` over `duration` ms with an
|
|
82
|
+
* ease curve. `container` null scrolls the window; a handle scrolls that element's
|
|
83
|
+
* `scrollTop`. The target is clamped to the scroller's range.
|
|
84
|
+
*/
|
|
85
|
+
export async function smoothScroll(page, targetTop, duration, container = null) {
|
|
86
|
+
await page.evaluate(
|
|
87
|
+
// frameMs is passed in: a module-level const isn't visible inside this
|
|
88
|
+
// browser-context closure.
|
|
89
|
+
(el, { targetTop, duration, frameMs }) => {
|
|
60
90
|
return new Promise((resolve) => {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
91
|
+
const max = el
|
|
92
|
+
? el.scrollHeight - el.clientHeight
|
|
93
|
+
: document.documentElement.scrollHeight - window.innerHeight;
|
|
94
|
+
const end = Math.max(0, Math.min(targetTop, max));
|
|
95
|
+
const startY = el ? el.scrollTop : window.scrollY;
|
|
96
|
+
const dist = end - startY;
|
|
97
|
+
const frames = Math.ceil(duration / frameMs);
|
|
64
98
|
let i = 0;
|
|
65
99
|
const id = setInterval(() => {
|
|
66
100
|
i++;
|
|
67
101
|
const p = Math.min(i / frames, 1);
|
|
68
102
|
const e = p < 0.5 ? 4 * p * p * p : (p - 1) * (2 * p - 2) * (2 * p - 2) + 1;
|
|
69
|
-
|
|
103
|
+
const y = startY + dist * e;
|
|
104
|
+
if (el)
|
|
105
|
+
el.scrollTop = y;
|
|
106
|
+
else
|
|
107
|
+
window.scrollTo(0, y);
|
|
70
108
|
if (p >= 1) {
|
|
71
109
|
clearInterval(id);
|
|
72
110
|
resolve();
|
|
73
111
|
}
|
|
74
|
-
},
|
|
112
|
+
}, frameMs);
|
|
75
113
|
});
|
|
76
|
-
}, {
|
|
114
|
+
}, container, { targetTop, duration, frameMs: FRAME_MS });
|
|
77
115
|
}
|
|
78
116
|
/**
|
|
79
|
-
* Smooth-scroll to an element or position
|
|
80
|
-
*
|
|
81
|
-
* -
|
|
82
|
-
* -
|
|
117
|
+
* Smooth-scroll to an element or position. Without `container` the window scrolls;
|
|
118
|
+
* with one, `target` is resolved against that scroll container instead:
|
|
119
|
+
* - `"top"` / `"bottom"` → scroller extremes
|
|
120
|
+
* - number → absolute scrollTop (px)
|
|
121
|
+
* - CSS selector or `text:` prefix → element centred within the scroller
|
|
83
122
|
*/
|
|
84
|
-
export async function smoothScrollToTarget(page, target, duration) {
|
|
123
|
+
export async function smoothScrollToTarget(page, target, duration, container) {
|
|
124
|
+
const scroller = container ? await getHandle(page, container) : null;
|
|
85
125
|
if (typeof target === "number")
|
|
86
|
-
return smoothScroll(page, target, duration);
|
|
126
|
+
return smoothScroll(page, target, duration, scroller);
|
|
87
127
|
if (target === "top")
|
|
88
|
-
return smoothScroll(page, 0, duration);
|
|
128
|
+
return smoothScroll(page, 0, duration, scroller);
|
|
89
129
|
if (target === "bottom") {
|
|
90
|
-
const bottom = await page.evaluate(() => document.body.scrollHeight);
|
|
91
|
-
return smoothScroll(page, bottom, duration);
|
|
130
|
+
const bottom = await page.evaluate((el) => (el ? el.scrollHeight : document.body.scrollHeight), scroller);
|
|
131
|
+
return smoothScroll(page, bottom, duration, scroller);
|
|
92
132
|
}
|
|
93
133
|
const handle = await getHandle(page, target);
|
|
94
|
-
const
|
|
134
|
+
const top = await page.evaluate((el, scrollEl, vh) => {
|
|
95
135
|
const rect = el.getBoundingClientRect();
|
|
136
|
+
if (scrollEl) {
|
|
137
|
+
// Centre the child within the container's visible area.
|
|
138
|
+
const box = scrollEl.getBoundingClientRect();
|
|
139
|
+
return (scrollEl.scrollTop +
|
|
140
|
+
(rect.top - box.top) +
|
|
141
|
+
rect.height / 2 -
|
|
142
|
+
scrollEl.clientHeight / 2);
|
|
143
|
+
}
|
|
96
144
|
return window.scrollY + rect.top + rect.height / 2 - vh / 2;
|
|
97
|
-
}, handle, page.viewport()?.height ??
|
|
98
|
-
return smoothScroll(page,
|
|
145
|
+
}, handle, scroller, page.viewport()?.height ?? DEFAULT_VIEWPORT_HEIGHT);
|
|
146
|
+
return smoothScroll(page, top, duration, scroller);
|
|
147
|
+
}
|
|
148
|
+
/** The scrollTop that brings the element comfortably into the scroller's view, or
|
|
149
|
+
* null when it's already comfortably visible. Pure geometry, shared by the window
|
|
150
|
+
* and container passes so both reveal an element the same way. */
|
|
151
|
+
function comfortTarget(m, margin) {
|
|
152
|
+
const { relTop, height, vh, scrollTop } = m;
|
|
153
|
+
const relBottom = relTop + height;
|
|
154
|
+
const comfort = margin * 2;
|
|
155
|
+
if (relTop >= comfort && relBottom <= vh - comfort)
|
|
156
|
+
return null;
|
|
157
|
+
// Tall element: top-align with margin.
|
|
158
|
+
if (height > vh - margin * 2)
|
|
159
|
+
return scrollTop + relTop - margin;
|
|
160
|
+
// Below the bottom comfort zone: scroll just enough to show it fully (centring
|
|
161
|
+
// would often overshoot the scroller's max and leave it pinned to the edge).
|
|
162
|
+
if (relBottom > vh - margin)
|
|
163
|
+
return scrollTop + relBottom - (vh - margin);
|
|
164
|
+
// Above the top comfort zone: scroll to show the top.
|
|
165
|
+
if (relTop < margin)
|
|
166
|
+
return scrollTop + relTop - margin;
|
|
167
|
+
// Within the comfort band but not comfortable: centre it.
|
|
168
|
+
return scrollTop + relTop + height / 2 - vh / 2;
|
|
169
|
+
}
|
|
170
|
+
/** Read the target's position within `container` (an element scroller) or, when
|
|
171
|
+
* null, within the window. */
|
|
172
|
+
function readMetrics(page, handle, container) {
|
|
173
|
+
return page.evaluate((el, c) => {
|
|
174
|
+
const r = el.getBoundingClientRect();
|
|
175
|
+
if (c) {
|
|
176
|
+
const b = c.getBoundingClientRect();
|
|
177
|
+
return {
|
|
178
|
+
relTop: r.top - b.top,
|
|
179
|
+
height: r.height,
|
|
180
|
+
vh: c.clientHeight,
|
|
181
|
+
scrollTop: c.scrollTop,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
relTop: r.top,
|
|
186
|
+
height: r.height,
|
|
187
|
+
vh: window.innerHeight,
|
|
188
|
+
scrollTop: window.scrollY,
|
|
189
|
+
};
|
|
190
|
+
}, handle, container);
|
|
191
|
+
}
|
|
192
|
+
/** The nearest ancestor that actually scrolls vertically (overflow auto/scroll +
|
|
193
|
+
* overflowing content), or null if none short of the document — in which case the
|
|
194
|
+
* window is the scroller. */
|
|
195
|
+
async function nearestScrollableAncestor(handle) {
|
|
196
|
+
const h = await handle.evaluateHandle((el) => {
|
|
197
|
+
let p = el.parentElement;
|
|
198
|
+
while (p && p !== document.body && p !== document.documentElement) {
|
|
199
|
+
const oy = getComputedStyle(p).overflowY;
|
|
200
|
+
if ((oy === "auto" || oy === "scroll" || oy === "overlay") &&
|
|
201
|
+
p.scrollHeight > p.clientHeight)
|
|
202
|
+
return p;
|
|
203
|
+
p = p.parentElement;
|
|
204
|
+
}
|
|
205
|
+
return null;
|
|
206
|
+
});
|
|
207
|
+
const el = h.asElement();
|
|
208
|
+
if (!el)
|
|
209
|
+
await h.dispose();
|
|
210
|
+
return el;
|
|
99
211
|
}
|
|
100
212
|
/**
|
|
101
|
-
* Scroll `target` into view if it lies outside the visible
|
|
102
|
-
*
|
|
103
|
-
*
|
|
213
|
+
* Scroll `target` into view if it lies outside the visible area (keeping `margin`
|
|
214
|
+
* px clear on each side). No-op when already comfortably visible. `speed` (px/s)
|
|
215
|
+
* sets the scroll duration. Scrolls the target's nearest scrollable container
|
|
216
|
+
* first (so it's revealed inside a modal / sidebar / pane), then the window so the
|
|
217
|
+
* container itself is on screen.
|
|
104
218
|
*/
|
|
105
219
|
export async function scrollIntoView(page, target, margin, speed) {
|
|
106
220
|
const handle = await getHandle(page, target);
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
112
|
-
return
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
// Element extends above the top comfort zone: scroll to show top
|
|
122
|
-
if (rect.top < margin)
|
|
123
|
-
return window.scrollY + rect.top - margin;
|
|
124
|
-
// In view but within the comfort band: centre it
|
|
125
|
-
return window.scrollY + rect.top + rect.height / 2 - vh / 2;
|
|
126
|
-
}, handle, margin);
|
|
127
|
-
if (scrollY === null)
|
|
128
|
-
return;
|
|
129
|
-
const currentY = await page.evaluate(() => window.scrollY);
|
|
130
|
-
const dist = Math.abs(scrollY - currentY);
|
|
131
|
-
const duration = Math.max(200, (dist / speed) * 1000);
|
|
132
|
-
await smoothScroll(page, scrollY, duration);
|
|
221
|
+
const container = await nearestScrollableAncestor(handle);
|
|
222
|
+
const reveal = async (scroller) => {
|
|
223
|
+
const metrics = await readMetrics(page, handle, scroller);
|
|
224
|
+
const top = comfortTarget(metrics, margin);
|
|
225
|
+
if (top === null)
|
|
226
|
+
return;
|
|
227
|
+
const dist = Math.abs(top - metrics.scrollTop);
|
|
228
|
+
const duration = Math.max(200, (dist / speed) * 1000);
|
|
229
|
+
await smoothScroll(page, top, duration, scroller);
|
|
230
|
+
};
|
|
231
|
+
if (container)
|
|
232
|
+
await reveal(container);
|
|
233
|
+
await reveal(null);
|
|
234
|
+
await container?.dispose();
|
|
133
235
|
}
|
|
134
236
|
//# sourceMappingURL=dom.js.map
|
package/dist/browser/dom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../src/browser/dom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../src/browser/dom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cA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,GAAG,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QACtD,MAAM,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACpD,CAAC,CAAC;IAEF,IAAI,SAAS;QAAE,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC;IACvC,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;IAEnB,MAAM,SAAS,EAAE,OAAO,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ZoomExtension {
|
|
2
|
+
/** Launch args that load the extension. */
|
|
3
|
+
args: string[];
|
|
4
|
+
/** Remove the generated temp directory. */
|
|
5
|
+
cleanup: () => void;
|
|
6
|
+
}
|
|
7
|
+
/** Generate the bundled page-zoom extension for `zoom` and return its launch args
|
|
8
|
+
* plus a cleanup. Caller adds `args` to `puppeteer.launch` and calls `cleanup`
|
|
9
|
+
* once the browser has closed. */
|
|
10
|
+
export declare function createZoomExtension(zoom: number): ZoomExtension;
|
|
11
|
+
//# sourceMappingURL=page-zoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-zoom.d.ts","sourceRoot":"","sources":["../../src/browser/page-zoom.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,2CAA2C;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAiBD;;mCAEmC;AACnC,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAkB/D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { mkdtempSync, writeFileSync, rmSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
// Registers its listeners synchronously at top level (MV3 requirement) and
|
|
5
|
+
// re-applies on create + every load — page zoom is per-origin persistent, so this
|
|
6
|
+
// covers same-origin navigations and any `followNewTab` tabs.
|
|
7
|
+
const background = (zoom) => `
|
|
8
|
+
const ZOOM = ${zoom};
|
|
9
|
+
const apply = (id) => chrome.tabs.setZoom(id, ZOOM).catch(() => {});
|
|
10
|
+
chrome.tabs.onCreated.addListener((t) => apply(t.id));
|
|
11
|
+
chrome.tabs.onUpdated.addListener((id, info) => {
|
|
12
|
+
if (info.status === "loading" || info.status === "complete") apply(id);
|
|
13
|
+
});
|
|
14
|
+
chrome.runtime.onInstalled.addListener(() =>
|
|
15
|
+
chrome.tabs.query({}, (tabs) => tabs.forEach((t) => apply(t.id))),
|
|
16
|
+
);
|
|
17
|
+
`;
|
|
18
|
+
/** Generate the bundled page-zoom extension for `zoom` and return its launch args
|
|
19
|
+
* plus a cleanup. Caller adds `args` to `puppeteer.launch` and calls `cleanup`
|
|
20
|
+
* once the browser has closed. */
|
|
21
|
+
export function createZoomExtension(zoom) {
|
|
22
|
+
const dir = mkdtempSync(join(tmpdir(), "recordable-zoom-"));
|
|
23
|
+
writeFileSync(join(dir, "manifest.json"), JSON.stringify({
|
|
24
|
+
manifest_version: 3,
|
|
25
|
+
name: "recordable-page-zoom",
|
|
26
|
+
version: "1.0",
|
|
27
|
+
permissions: ["tabs"],
|
|
28
|
+
host_permissions: ["<all_urls>"],
|
|
29
|
+
background: { service_worker: "bg.js" },
|
|
30
|
+
}));
|
|
31
|
+
writeFileSync(join(dir, "bg.js"), background(zoom));
|
|
32
|
+
return {
|
|
33
|
+
args: [`--disable-extensions-except=${dir}`, `--load-extension=${dir}`],
|
|
34
|
+
cleanup: () => rmSync(dir, { recursive: true, force: true }),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=page-zoom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-zoom.js","sourceRoot":"","sources":["../../src/browser/page-zoom.ts"],"names":[],"mappings":"AAAA,OA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AAO,MAAM,YAAY,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"play-button.d.ts","sourceRoot":"","sources":["../../src/browser/play-button.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,wBAAwB,CAAC;AACpD,eAAO,MAAM,YAAY,uBAAuB,CAAC;AAsEjD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,GACd,MAAM,CAGR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play-button.js","sourceRoot":"","sources":["../../src/browser/play-button.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AACpD,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAEjD;;;GAGG;AACH,SAAS,gBAAgB,
|
|
1
|
+
{"version":3,"file":"play-button.js","sourceRoot":"","sources":["../../src/browser/play-button.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AACpD,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAEjD;;;GAGG;AACH,SAAS,gBAAgB,CAAC,OAAe,EAAE,EAAU,EAAE,OAAe;IACpE,wDAAwD;IACxD,IAAI,MAAM,KAAK,MAAM,CAAC,MAAM;QAAE,OAAO;IACrC,MAAM,KAAK,GAAG,GAAG,EAAE;QACjB,IAAI,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;YAAE,OAAO;QACxC,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3C,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG;YACnB,gBAAgB;YAChB,UAAU;YACV,2EAA2E;YAC3E,iEAAiE;YACjE,UAAU;YACV,4BAA4B;YAC5B,oBAAoB;YACpB,q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