@qontinui/ui-bridge 0.8.3 → 0.8.5
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/ai/index.d.mts +5 -5
- package/dist/ai/index.d.ts +5 -5
- package/dist/artifacts/index.d.mts +6 -6
- package/dist/artifacts/index.d.ts +6 -6
- package/dist/{assertions-DZFxmWqR.d.ts → assertions-9y_goPX8.d.ts} +1 -1
- package/dist/{assertions-DWBEmaTc.d.mts → assertions-BkFdgS11.d.mts} +1 -1
- package/dist/{browser-capture-7970YWEJ.d.mts → browser-capture-BFY4Ai_b.d.mts} +1 -1
- package/dist/{browser-capture-Dsc1ghBH.d.ts → browser-capture-DQIZJK8u.d.ts} +1 -1
- package/dist/{change-observer-QqBw54NG.d.ts → change-observer-BCFsf_3w.d.ts} +1 -1
- package/dist/{change-observer-Bj0ij6eZ.d.mts → change-observer-DMV48Rsi.d.mts} +1 -1
- package/dist/contracts/index.d.mts +5 -5
- package/dist/contracts/index.d.ts +5 -5
- package/dist/control/index.d.mts +3 -3
- package/dist/control/index.d.ts +3 -3
- package/dist/core/index.d.mts +8 -8
- package/dist/core/index.d.ts +8 -8
- package/dist/ctr/index.d.mts +4 -4
- package/dist/ctr/index.d.ts +4 -4
- package/dist/ctr/migrate.d.mts +3 -3
- package/dist/ctr/migrate.d.ts +3 -3
- package/dist/debug/index.d.mts +6 -6
- package/dist/debug/index.d.ts +6 -6
- package/dist/{drag-drop-detector-DZtkbaBK.d.mts → drag-drop-detector-B42P2r0E.d.mts} +1 -1
- package/dist/{drag-drop-detector-eWUPfj6J.d.ts → drag-drop-detector-Cryu0UJ4.d.ts} +1 -1
- package/dist/{error-snapshot-Bevw5R3b.d.mts → error-snapshot--J267oBc.d.mts} +1 -1
- package/dist/{error-snapshot-CeivHpv3.d.ts → error-snapshot-loiODvPI.d.ts} +1 -1
- package/dist/{find-B9bMv3Ym.d.mts → find-B3PZpTYx.d.mts} +1 -1
- package/dist/{find-CWg7f7ej.d.ts → find-BxBh1Vaz.d.ts} +1 -1
- package/dist/index.d.mts +19 -19
- package/dist/index.d.ts +19 -19
- package/dist/index.js +75 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -14
- package/dist/index.mjs.map +1 -1
- package/dist/{metrics-C1vyvEnE.d.mts → metrics-CptGGSyd.d.mts} +1 -1
- package/dist/{metrics-CyfiJzRI.d.ts → metrics-djC7QIe4.d.ts} +1 -1
- package/dist/{migrate-specs-to-ctr-DJbRDrAj.d.ts → migrate-specs-to-ctr-DI66X0o1.d.ts} +2 -2
- package/dist/{migrate-specs-to-ctr-RBbUuYsq.d.mts → migrate-specs-to-ctr-VKlW-C3q.d.mts} +2 -2
- package/dist/{nextjs-B4TCPAfS.d.mts → nextjs-BLz9SI7m.d.mts} +2 -2
- package/dist/{nextjs-BnIOtNt6.d.ts → nextjs-C4JKs35V.d.ts} +2 -2
- package/dist/react/index.d.mts +4 -4
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +75 -14
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +75 -14
- package/dist/react/index.mjs.map +1 -1
- package/dist/render-log/index.d.mts +1 -1
- package/dist/render-log/index.d.ts +1 -1
- package/dist/server/express.d.mts +6 -6
- package/dist/server/express.d.ts +6 -6
- package/dist/server/handlers.d.mts +8 -8
- package/dist/server/handlers.d.ts +8 -8
- package/dist/server/index.d.mts +16 -16
- package/dist/server/index.d.ts +16 -16
- package/dist/server/nextjs.d.mts +7 -7
- package/dist/server/nextjs.d.ts +7 -7
- package/dist/server/standalone.d.mts +8 -8
- package/dist/server/standalone.d.ts +8 -8
- package/dist/specs/index.d.mts +10 -10
- package/dist/specs/index.d.ts +10 -10
- package/dist/{sse-handler-Ck6QgKIV.d.ts → sse-handler-Cowd3Zwy.d.ts} +1 -1
- package/dist/{sse-handler-BygF1ZRx.d.mts → sse-handler-z28jXpCY.d.mts} +1 -1
- package/dist/{standalone-BUCA1URn.d.ts → standalone-CTnUKDxL.d.ts} +4 -4
- package/dist/{standalone-B6QFUHF_.d.mts → standalone-Defu4jNT.d.mts} +4 -4
- package/dist/{store-xvmPv43F.d.mts → store-D8m5aeL-.d.mts} +1 -1
- package/dist/{store-D-30BOJP.d.ts → store-Dr-TpWW8.d.ts} +1 -1
- package/dist/{style-types-C24doi8T.d.ts → style-types-B0hdmwUq.d.ts} +1 -1
- package/dist/{style-types-B7dWqyuR.d.mts → style-types-BSLL9Jcs.d.mts} +1 -1
- package/dist/{types-BNQe-q_K.d.mts → types-0sp8HcIS.d.mts} +1 -1
- package/dist/{types-DTeaTrmK.d.mts → types-Bb5MsD5H.d.mts} +4 -4
- package/dist/{types-DuUJTWXo.d.ts → types-Bh8GMnD9.d.ts} +6 -0
- package/dist/{types-C8pdSnnK.d.mts → types-BkNCY6t1.d.mts} +1 -1
- package/dist/{types-C7s_LDdD.d.ts → types-Br-GPusu.d.ts} +4 -4
- package/dist/{types-CzK_r8H4.d.mts → types-Bue5gWo6.d.mts} +6 -0
- package/dist/{types-BdO-09O2.d.mts → types-CkH1wKcK.d.mts} +3 -3
- package/dist/{types-CrOuvKu2.d.mts → types-Dr_hw724.d.mts} +1 -1
- package/dist/{types-BhfLqg6l.d.ts → types-DrppiBPa.d.ts} +1 -1
- package/dist/{types-BOUIY27W.d.ts → types-W3MqPYCq.d.ts} +3 -3
- package/dist/{types-CbA7tgIc.d.ts → types-oJBZEuse.d.ts} +1 -1
- package/dist/{types-VP101wBw.d.ts → types-ySMpVt-F.d.ts} +1 -1
- package/dist/verification-layers/index.d.mts +5 -5
- package/dist/verification-layers/index.d.ts +5 -5
- package/dist/{websocket-client-DhuSBD2g.d.mts → websocket-client-BBhjsJ3h.d.mts} +1 -1
- package/dist/{websocket-client-Drao-vSQ.d.ts → websocket-client-gcofyYd7.d.ts} +1 -1
- package/dist/{ws-streaming-DkEM6oR3.d.ts → ws-streaming-B_3_d29k.d.ts} +1 -1
- package/dist/{ws-streaming-DNKqrGhh.d.mts → ws-streaming-CPXT_jYk.d.mts} +1 -1
- package/package.json +1 -1
package/dist/react/index.mjs
CHANGED
|
@@ -23043,9 +23043,6 @@ var BUILT_IN_SELECTORS = [
|
|
|
23043
23043
|
// ARIA roles
|
|
23044
23044
|
'[role="alert"]',
|
|
23045
23045
|
'[role="status"]',
|
|
23046
|
-
// ARIA live regions
|
|
23047
|
-
'[aria-live="polite"]',
|
|
23048
|
-
'[aria-live="assertive"]',
|
|
23049
23046
|
// Sonner
|
|
23050
23047
|
"[data-sonner-toast]",
|
|
23051
23048
|
// Radix (children of viewport)
|
|
@@ -23067,6 +23064,7 @@ var BUILT_IN_SELECTORS = [
|
|
|
23067
23064
|
"[data-toast]",
|
|
23068
23065
|
"[data-notification]"
|
|
23069
23066
|
];
|
|
23067
|
+
var MAX_TOAST_AGE_MS = 6e4;
|
|
23070
23068
|
var CLASS_LEVEL_MAP = [
|
|
23071
23069
|
[/\bsuccess\b/i, "success"],
|
|
23072
23070
|
[/\berror\b/i, "error"],
|
|
@@ -23210,7 +23208,8 @@ var ToastCapture = class {
|
|
|
23210
23208
|
maxRecent: config?.maxRecent ?? 20,
|
|
23211
23209
|
customSelectors: config?.customSelectors ?? [],
|
|
23212
23210
|
recentRetention: config?.recentRetention ?? 6e4,
|
|
23213
|
-
pollInterval: config?.pollInterval ?? 500
|
|
23211
|
+
pollInterval: config?.pollInterval ?? 500,
|
|
23212
|
+
maxToastAgeMs: config?.maxToastAgeMs ?? MAX_TOAST_AGE_MS
|
|
23214
23213
|
};
|
|
23215
23214
|
this.allSelectors = [...BUILT_IN_SELECTORS, ...this.config.customSelectors];
|
|
23216
23215
|
}
|
|
@@ -23347,8 +23346,12 @@ var ToastCapture = class {
|
|
|
23347
23346
|
for (const [id, entry] of this.activeToasts) {
|
|
23348
23347
|
if (!isElementVisible2(entry.element)) {
|
|
23349
23348
|
toDismiss.push(id);
|
|
23350
|
-
|
|
23351
|
-
|
|
23349
|
+
continue;
|
|
23350
|
+
}
|
|
23351
|
+
const age = now - entry.toast.appearedAt;
|
|
23352
|
+
entry.toast.durationMs = age;
|
|
23353
|
+
if (age > this.config.maxToastAgeMs) {
|
|
23354
|
+
toDismiss.push(id);
|
|
23352
23355
|
}
|
|
23353
23356
|
}
|
|
23354
23357
|
for (const id of toDismiss) {
|
|
@@ -24922,7 +24925,7 @@ function exposeProviderOnWindow(internals) {
|
|
|
24922
24925
|
if (typeof window === "undefined") return;
|
|
24923
24926
|
const w = window;
|
|
24924
24927
|
const root = w.__UI_BRIDGE__ ?? (w.__UI_BRIDGE__ = {});
|
|
24925
|
-
root.version = "0.8.
|
|
24928
|
+
root.version = "0.8.5";
|
|
24926
24929
|
root.specs = { getGlobalSpecStore };
|
|
24927
24930
|
root.registry = internals.registry;
|
|
24928
24931
|
root.browserCapture = internals.browserCapture;
|
|
@@ -29359,6 +29362,64 @@ async function awaitDOMSettledRelay(timeout = 500) {
|
|
|
29359
29362
|
} catch {
|
|
29360
29363
|
}
|
|
29361
29364
|
}
|
|
29365
|
+
function dispatchRealClick(el) {
|
|
29366
|
+
try {
|
|
29367
|
+
el.focus?.();
|
|
29368
|
+
} catch {
|
|
29369
|
+
}
|
|
29370
|
+
const rect = (() => {
|
|
29371
|
+
try {
|
|
29372
|
+
return el.getBoundingClientRect();
|
|
29373
|
+
} catch {
|
|
29374
|
+
return { left: 0, top: 0, width: 0, height: 0 };
|
|
29375
|
+
}
|
|
29376
|
+
})();
|
|
29377
|
+
const clientX = rect.left + rect.width / 2;
|
|
29378
|
+
const clientY = rect.top + rect.height / 2;
|
|
29379
|
+
const pointerInit = {
|
|
29380
|
+
bubbles: true,
|
|
29381
|
+
cancelable: true,
|
|
29382
|
+
composed: true,
|
|
29383
|
+
pointerId: 1,
|
|
29384
|
+
button: 0,
|
|
29385
|
+
buttons: 1,
|
|
29386
|
+
isPrimary: true,
|
|
29387
|
+
pointerType: "mouse",
|
|
29388
|
+
clientX,
|
|
29389
|
+
clientY
|
|
29390
|
+
};
|
|
29391
|
+
const mouseInit = {
|
|
29392
|
+
bubbles: true,
|
|
29393
|
+
cancelable: true,
|
|
29394
|
+
composed: true,
|
|
29395
|
+
button: 0,
|
|
29396
|
+
buttons: 1,
|
|
29397
|
+
clientX,
|
|
29398
|
+
clientY
|
|
29399
|
+
};
|
|
29400
|
+
const makePointer = (type) => {
|
|
29401
|
+
try {
|
|
29402
|
+
if (typeof PointerEvent === "function") {
|
|
29403
|
+
return new PointerEvent(type, pointerInit);
|
|
29404
|
+
}
|
|
29405
|
+
} catch {
|
|
29406
|
+
}
|
|
29407
|
+
return new MouseEvent(type, mouseInit);
|
|
29408
|
+
};
|
|
29409
|
+
const makeMouse = (type) => new MouseEvent(type, mouseInit);
|
|
29410
|
+
try {
|
|
29411
|
+
el.dispatchEvent(makePointer("pointerdown"));
|
|
29412
|
+
el.dispatchEvent(makeMouse("mousedown"));
|
|
29413
|
+
el.dispatchEvent(makePointer("pointerup"));
|
|
29414
|
+
el.dispatchEvent(makeMouse("mouseup"));
|
|
29415
|
+
el.dispatchEvent(makeMouse("click"));
|
|
29416
|
+
} catch {
|
|
29417
|
+
}
|
|
29418
|
+
try {
|
|
29419
|
+
el.click();
|
|
29420
|
+
} catch {
|
|
29421
|
+
}
|
|
29422
|
+
}
|
|
29362
29423
|
async function getAnnotationStore() {
|
|
29363
29424
|
try {
|
|
29364
29425
|
const { getGlobalAnnotationStore: getGlobalAnnotationStore2 } = await Promise.resolve().then(() => (init_store(), store_exports));
|
|
@@ -29654,7 +29715,7 @@ async function executeCommand(action, payload, bridge) {
|
|
|
29654
29715
|
try {
|
|
29655
29716
|
switch (request.action) {
|
|
29656
29717
|
case "click":
|
|
29657
|
-
dom
|
|
29718
|
+
dispatchRealClick(dom);
|
|
29658
29719
|
break;
|
|
29659
29720
|
case "focus":
|
|
29660
29721
|
dom.focus();
|
|
@@ -29755,9 +29816,9 @@ async function executeCommand(action, payload, bridge) {
|
|
|
29755
29816
|
dom.checked = !dom.checked;
|
|
29756
29817
|
dom.dispatchEvent(new Event("change", { bubbles: true }));
|
|
29757
29818
|
} else if (dom.getAttribute("role") === "switch") {
|
|
29758
|
-
dom
|
|
29819
|
+
dispatchRealClick(dom);
|
|
29759
29820
|
} else {
|
|
29760
|
-
dom
|
|
29821
|
+
dispatchRealClick(dom);
|
|
29761
29822
|
}
|
|
29762
29823
|
break;
|
|
29763
29824
|
}
|
|
@@ -29926,7 +29987,7 @@ async function executeCommand(action, payload, bridge) {
|
|
|
29926
29987
|
case "submit": {
|
|
29927
29988
|
const form = dom.closest("form");
|
|
29928
29989
|
if (form) form.requestSubmit();
|
|
29929
|
-
else dom
|
|
29990
|
+
else dispatchRealClick(dom);
|
|
29930
29991
|
break;
|
|
29931
29992
|
}
|
|
29932
29993
|
case "reset": {
|
|
@@ -30147,7 +30208,7 @@ async function executeCommand(action, payload, bridge) {
|
|
|
30147
30208
|
return { success: false, error: `No element found with text "${text}"` };
|
|
30148
30209
|
}
|
|
30149
30210
|
const el = matches[0];
|
|
30150
|
-
el
|
|
30211
|
+
dispatchRealClick(el);
|
|
30151
30212
|
return {
|
|
30152
30213
|
clicked: true,
|
|
30153
30214
|
element: {
|
|
@@ -30166,7 +30227,7 @@ async function executeCommand(action, payload, bridge) {
|
|
|
30166
30227
|
if (!el) {
|
|
30167
30228
|
return { success: false, error: `No element found for selector "${selector}"` };
|
|
30168
30229
|
}
|
|
30169
|
-
el
|
|
30230
|
+
dispatchRealClick(el);
|
|
30170
30231
|
return {
|
|
30171
30232
|
clicked: true,
|
|
30172
30233
|
element: {
|
|
@@ -30587,7 +30648,7 @@ async function executeCommand(action, payload, bridge) {
|
|
|
30587
30648
|
try {
|
|
30588
30649
|
switch (parsed.action) {
|
|
30589
30650
|
case "click":
|
|
30590
|
-
dom
|
|
30651
|
+
dispatchRealClick(dom);
|
|
30591
30652
|
break;
|
|
30592
30653
|
case "type":
|
|
30593
30654
|
if (dom instanceof HTMLInputElement || dom instanceof HTMLTextAreaElement) {
|