@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/index.mjs
CHANGED
|
@@ -23992,9 +23992,6 @@ var BUILT_IN_SELECTORS = [
|
|
|
23992
23992
|
// ARIA roles
|
|
23993
23993
|
'[role="alert"]',
|
|
23994
23994
|
'[role="status"]',
|
|
23995
|
-
// ARIA live regions
|
|
23996
|
-
'[aria-live="polite"]',
|
|
23997
|
-
'[aria-live="assertive"]',
|
|
23998
23995
|
// Sonner
|
|
23999
23996
|
"[data-sonner-toast]",
|
|
24000
23997
|
// Radix (children of viewport)
|
|
@@ -24016,6 +24013,7 @@ var BUILT_IN_SELECTORS = [
|
|
|
24016
24013
|
"[data-toast]",
|
|
24017
24014
|
"[data-notification]"
|
|
24018
24015
|
];
|
|
24016
|
+
var MAX_TOAST_AGE_MS = 6e4;
|
|
24019
24017
|
var CLASS_LEVEL_MAP = [
|
|
24020
24018
|
[/\bsuccess\b/i, "success"],
|
|
24021
24019
|
[/\berror\b/i, "error"],
|
|
@@ -24159,7 +24157,8 @@ var ToastCapture = class {
|
|
|
24159
24157
|
maxRecent: config?.maxRecent ?? 20,
|
|
24160
24158
|
customSelectors: config?.customSelectors ?? [],
|
|
24161
24159
|
recentRetention: config?.recentRetention ?? 6e4,
|
|
24162
|
-
pollInterval: config?.pollInterval ?? 500
|
|
24160
|
+
pollInterval: config?.pollInterval ?? 500,
|
|
24161
|
+
maxToastAgeMs: config?.maxToastAgeMs ?? MAX_TOAST_AGE_MS
|
|
24163
24162
|
};
|
|
24164
24163
|
this.allSelectors = [...BUILT_IN_SELECTORS, ...this.config.customSelectors];
|
|
24165
24164
|
}
|
|
@@ -24296,8 +24295,12 @@ var ToastCapture = class {
|
|
|
24296
24295
|
for (const [id, entry] of this.activeToasts) {
|
|
24297
24296
|
if (!isElementVisible2(entry.element)) {
|
|
24298
24297
|
toDismiss.push(id);
|
|
24299
|
-
|
|
24300
|
-
|
|
24298
|
+
continue;
|
|
24299
|
+
}
|
|
24300
|
+
const age = now - entry.toast.appearedAt;
|
|
24301
|
+
entry.toast.durationMs = age;
|
|
24302
|
+
if (age > this.config.maxToastAgeMs) {
|
|
24303
|
+
toDismiss.push(id);
|
|
24301
24304
|
}
|
|
24302
24305
|
}
|
|
24303
24306
|
for (const id of toDismiss) {
|
|
@@ -25775,7 +25778,7 @@ function exposeProviderOnWindow(internals) {
|
|
|
25775
25778
|
if (typeof window === "undefined") return;
|
|
25776
25779
|
const w = window;
|
|
25777
25780
|
const root = w.__UI_BRIDGE__ ?? (w.__UI_BRIDGE__ = {});
|
|
25778
|
-
root.version = "0.8.
|
|
25781
|
+
root.version = "0.8.5";
|
|
25779
25782
|
root.specs = { getGlobalSpecStore };
|
|
25780
25783
|
root.registry = internals.registry;
|
|
25781
25784
|
root.browserCapture = internals.browserCapture;
|
|
@@ -33969,6 +33972,64 @@ async function awaitDOMSettledRelay(timeout = 500) {
|
|
|
33969
33972
|
} catch {
|
|
33970
33973
|
}
|
|
33971
33974
|
}
|
|
33975
|
+
function dispatchRealClick(el) {
|
|
33976
|
+
try {
|
|
33977
|
+
el.focus?.();
|
|
33978
|
+
} catch {
|
|
33979
|
+
}
|
|
33980
|
+
const rect = (() => {
|
|
33981
|
+
try {
|
|
33982
|
+
return el.getBoundingClientRect();
|
|
33983
|
+
} catch {
|
|
33984
|
+
return { left: 0, top: 0, width: 0, height: 0 };
|
|
33985
|
+
}
|
|
33986
|
+
})();
|
|
33987
|
+
const clientX = rect.left + rect.width / 2;
|
|
33988
|
+
const clientY = rect.top + rect.height / 2;
|
|
33989
|
+
const pointerInit = {
|
|
33990
|
+
bubbles: true,
|
|
33991
|
+
cancelable: true,
|
|
33992
|
+
composed: true,
|
|
33993
|
+
pointerId: 1,
|
|
33994
|
+
button: 0,
|
|
33995
|
+
buttons: 1,
|
|
33996
|
+
isPrimary: true,
|
|
33997
|
+
pointerType: "mouse",
|
|
33998
|
+
clientX,
|
|
33999
|
+
clientY
|
|
34000
|
+
};
|
|
34001
|
+
const mouseInit = {
|
|
34002
|
+
bubbles: true,
|
|
34003
|
+
cancelable: true,
|
|
34004
|
+
composed: true,
|
|
34005
|
+
button: 0,
|
|
34006
|
+
buttons: 1,
|
|
34007
|
+
clientX,
|
|
34008
|
+
clientY
|
|
34009
|
+
};
|
|
34010
|
+
const makePointer = (type) => {
|
|
34011
|
+
try {
|
|
34012
|
+
if (typeof PointerEvent === "function") {
|
|
34013
|
+
return new PointerEvent(type, pointerInit);
|
|
34014
|
+
}
|
|
34015
|
+
} catch {
|
|
34016
|
+
}
|
|
34017
|
+
return new MouseEvent(type, mouseInit);
|
|
34018
|
+
};
|
|
34019
|
+
const makeMouse = (type) => new MouseEvent(type, mouseInit);
|
|
34020
|
+
try {
|
|
34021
|
+
el.dispatchEvent(makePointer("pointerdown"));
|
|
34022
|
+
el.dispatchEvent(makeMouse("mousedown"));
|
|
34023
|
+
el.dispatchEvent(makePointer("pointerup"));
|
|
34024
|
+
el.dispatchEvent(makeMouse("mouseup"));
|
|
34025
|
+
el.dispatchEvent(makeMouse("click"));
|
|
34026
|
+
} catch {
|
|
34027
|
+
}
|
|
34028
|
+
try {
|
|
34029
|
+
el.click();
|
|
34030
|
+
} catch {
|
|
34031
|
+
}
|
|
34032
|
+
}
|
|
33972
34033
|
async function getAnnotationStore() {
|
|
33973
34034
|
try {
|
|
33974
34035
|
const { getGlobalAnnotationStore: getGlobalAnnotationStore2 } = await Promise.resolve().then(() => (init_store(), store_exports));
|
|
@@ -34264,7 +34325,7 @@ async function executeCommand(action, payload, bridge) {
|
|
|
34264
34325
|
try {
|
|
34265
34326
|
switch (request.action) {
|
|
34266
34327
|
case "click":
|
|
34267
|
-
dom
|
|
34328
|
+
dispatchRealClick(dom);
|
|
34268
34329
|
break;
|
|
34269
34330
|
case "focus":
|
|
34270
34331
|
dom.focus();
|
|
@@ -34365,9 +34426,9 @@ async function executeCommand(action, payload, bridge) {
|
|
|
34365
34426
|
dom.checked = !dom.checked;
|
|
34366
34427
|
dom.dispatchEvent(new Event("change", { bubbles: true }));
|
|
34367
34428
|
} else if (dom.getAttribute("role") === "switch") {
|
|
34368
|
-
dom
|
|
34429
|
+
dispatchRealClick(dom);
|
|
34369
34430
|
} else {
|
|
34370
|
-
dom
|
|
34431
|
+
dispatchRealClick(dom);
|
|
34371
34432
|
}
|
|
34372
34433
|
break;
|
|
34373
34434
|
}
|
|
@@ -34536,7 +34597,7 @@ async function executeCommand(action, payload, bridge) {
|
|
|
34536
34597
|
case "submit": {
|
|
34537
34598
|
const form = dom.closest("form");
|
|
34538
34599
|
if (form) form.requestSubmit();
|
|
34539
|
-
else dom
|
|
34600
|
+
else dispatchRealClick(dom);
|
|
34540
34601
|
break;
|
|
34541
34602
|
}
|
|
34542
34603
|
case "reset": {
|
|
@@ -34757,7 +34818,7 @@ async function executeCommand(action, payload, bridge) {
|
|
|
34757
34818
|
return { success: false, error: `No element found with text "${text}"` };
|
|
34758
34819
|
}
|
|
34759
34820
|
const el = matches[0];
|
|
34760
|
-
el
|
|
34821
|
+
dispatchRealClick(el);
|
|
34761
34822
|
return {
|
|
34762
34823
|
clicked: true,
|
|
34763
34824
|
element: {
|
|
@@ -34776,7 +34837,7 @@ async function executeCommand(action, payload, bridge) {
|
|
|
34776
34837
|
if (!el) {
|
|
34777
34838
|
return { success: false, error: `No element found for selector "${selector}"` };
|
|
34778
34839
|
}
|
|
34779
|
-
el
|
|
34840
|
+
dispatchRealClick(el);
|
|
34780
34841
|
return {
|
|
34781
34842
|
clicked: true,
|
|
34782
34843
|
element: {
|
|
@@ -35197,7 +35258,7 @@ async function executeCommand(action, payload, bridge) {
|
|
|
35197
35258
|
try {
|
|
35198
35259
|
switch (parsed.action) {
|
|
35199
35260
|
case "click":
|
|
35200
|
-
dom
|
|
35261
|
+
dispatchRealClick(dom);
|
|
35201
35262
|
break;
|
|
35202
35263
|
case "type":
|
|
35203
35264
|
if (dom instanceof HTMLInputElement || dom instanceof HTMLTextAreaElement) {
|