koneck 2.114.0 → 2.115.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-client.d.ts","sourceRoot":"","sources":["../../src/web/ui-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"ui-client.d.ts","sourceRoot":"","sources":["../../src/web/ui-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAyqNrC"}
|
package/dist/web/ui-client.js
CHANGED
|
@@ -4892,6 +4892,40 @@ const preview = { stage: null, img: null, cursor: null, hint: null, chips: null,
|
|
|
4892
4892
|
* and fades, so watching the panel tells you where the agent went and whether it hit the thing it
|
|
4893
4893
|
* meant to.
|
|
4894
4894
|
*/
|
|
4895
|
+
/*
|
|
4896
|
+
* The pointer walking down a form as it is filled.
|
|
4897
|
+
*
|
|
4898
|
+
* The fill happens server-side in one call, so the panel only ever saw the finished form — "I don't
|
|
4899
|
+
* see it filling fields". This moves the pointer to each field in turn, presses it, then presses the
|
|
4900
|
+
* button, on a short timer so it reads as a hand working rather than a jump. Pure animation over the
|
|
4901
|
+
* control boxes from the last read: no extra request, no cost to the fill's speed.
|
|
4902
|
+
*
|
|
4903
|
+
* Guarded by a token so a second action cancels a replay still in flight — a click arriving mid-fill
|
|
4904
|
+
* should not fight the pointer.
|
|
4905
|
+
*/
|
|
4906
|
+
let replayToken = 0;
|
|
4907
|
+
function replayFill(fields, then) {
|
|
4908
|
+
const token = ++replayToken;
|
|
4909
|
+
const stops = [];
|
|
4910
|
+
for (const f of fields) {
|
|
4911
|
+
const at = boxOfControl(f);
|
|
4912
|
+
if (at) stops.push({ at: at, press: true });
|
|
4913
|
+
}
|
|
4914
|
+
if (then) {
|
|
4915
|
+
const b = boxOfControl(then);
|
|
4916
|
+
if (b) stops.push({ at: b, press: true });
|
|
4917
|
+
}
|
|
4918
|
+
if (stops.length === 0) return;
|
|
4919
|
+
const STEP = 420;
|
|
4920
|
+
stops.forEach((s, i) => {
|
|
4921
|
+
setTimeout(() => {
|
|
4922
|
+
if (token !== replayToken) return; // a newer action took over
|
|
4923
|
+
showPointer(s.at.x, s.at.y, 'move');
|
|
4924
|
+
setTimeout(() => { if (token === replayToken) showPointer(s.at.x, s.at.y, 'press'); }, 160);
|
|
4925
|
+
}, i * STEP);
|
|
4926
|
+
});
|
|
4927
|
+
}
|
|
4928
|
+
|
|
4895
4929
|
function showPointer(pageX, pageY, kind) {
|
|
4896
4930
|
const img = preview.img;
|
|
4897
4931
|
const cursor = preview.cursor;
|
|
@@ -5578,15 +5612,17 @@ function watchTool(e, done) {
|
|
|
5578
5612
|
if (!done) {
|
|
5579
5613
|
let asked = null;
|
|
5580
5614
|
try { asked = e.args ? JSON.parse(e.args) : null; } catch (err) { asked = null; }
|
|
5581
|
-
|
|
5615
|
+
const action = asked ? String(asked.action ?? '') : '';
|
|
5616
|
+
if (action === 'fill' && Array.isArray(asked.fields)) {
|
|
5617
|
+
// A fill is a hand moving down the form. Point at each field in turn, press it, then the
|
|
5618
|
+
// button — so it is watched being filled rather than found already filled. Client-side over
|
|
5619
|
+
// the boxes from the last read, so it costs no round trip and does not slow the fill.
|
|
5620
|
+
replayFill(asked.fields, asked.then);
|
|
5621
|
+
} else if (/^(click|type)$/.test(action)) {
|
|
5582
5622
|
const at = typeof asked.x === 'number' && typeof asked.y === 'number'
|
|
5583
5623
|
? { x: asked.x, y: asked.y }
|
|
5584
|
-
: boxOfControl({ ref: asked.ref, label: asked.label, selector: asked.selector })
|
|
5585
|
-
|
|
5586
|
-
?? (Array.isArray(asked.fields)
|
|
5587
|
-
? asked.fields.map((f) => boxOfControl(f)).find(Boolean) ?? null
|
|
5588
|
-
: null);
|
|
5589
|
-
if (at) showPointer(at.x, at.y, asked.action === 'click' ? 'press' : 'move');
|
|
5624
|
+
: boxOfControl({ ref: asked.ref, label: asked.label, selector: asked.selector });
|
|
5625
|
+
if (at) showPointer(at.x, at.y, action === 'click' ? 'press' : 'move');
|
|
5590
5626
|
}
|
|
5591
5627
|
}
|
|
5592
5628
|
watchHead(verb, t.url || 'the page');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-client.js","sourceRoot":"","sources":["../../src/web/ui-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"ui-client.js","sourceRoot":"","sources":["../../src/web/ui-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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