veo-sdk 0.6.4 → 0.6.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/{builder-5F2EFT4X.mjs → builder-O75QIFKQ.mjs} +3 -3
- package/dist/{builder-5F2EFT4X.mjs.map → builder-O75QIFKQ.mjs.map} +1 -1
- package/dist/builder.cjs +22 -1
- package/dist/builder.cjs.map +1 -1
- package/dist/builder.mjs +2 -2
- package/dist/{chunk-YEKCBVNJ.mjs → chunk-POPDESAP.mjs} +24 -3
- package/dist/chunk-POPDESAP.mjs.map +1 -0
- package/dist/index.cjs +45 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +24 -4
- package/dist/index.mjs.map +1 -1
- package/dist/veo-builder.js +1 -1
- package/dist/veo-builder.js.map +1 -1
- package/dist/veo.js +2 -2
- package/dist/veo.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-YEKCBVNJ.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -6564,10 +6564,22 @@ function isInteractiveElement(element) {
|
|
|
6564
6564
|
}
|
|
6565
6565
|
function closestInteractive(element) {
|
|
6566
6566
|
try {
|
|
6567
|
-
|
|
6567
|
+
const bySelector = element.closest(INTERACTIVE_SELECTOR);
|
|
6568
|
+
if (bySelector) return bySelector;
|
|
6568
6569
|
} catch {
|
|
6569
6570
|
return null;
|
|
6570
6571
|
}
|
|
6572
|
+
let current = element;
|
|
6573
|
+
for (let depth = 0; current && depth < 5; depth++, current = current.parentElement) {
|
|
6574
|
+
if (current instanceof HTMLElement) {
|
|
6575
|
+
try {
|
|
6576
|
+
const win = current.ownerDocument.defaultView;
|
|
6577
|
+
if (win?.getComputedStyle(current).cursor === "pointer") return current;
|
|
6578
|
+
} catch {
|
|
6579
|
+
}
|
|
6580
|
+
}
|
|
6581
|
+
}
|
|
6582
|
+
return null;
|
|
6571
6583
|
}
|
|
6572
6584
|
function elementLabelText(element, max = 120) {
|
|
6573
6585
|
const clean = (raw) => (raw ?? "").replace(EMOJI_RE, "").replace(/\s+/g, " ").trim();
|
|
@@ -6607,6 +6619,15 @@ var init_interactive_elements = __esm({
|
|
|
6607
6619
|
'[contenteditable="true"]',
|
|
6608
6620
|
"[onclick]",
|
|
6609
6621
|
"[data-veo-tag]",
|
|
6622
|
+
// Acordeones, menús desplegables, tabs y toggles de apps modernas (React/Radix):
|
|
6623
|
+
// el handler no está en el HTML, pero estos atributos delatan el control.
|
|
6624
|
+
"[aria-expanded]",
|
|
6625
|
+
"[aria-haspopup]",
|
|
6626
|
+
"[aria-controls]",
|
|
6627
|
+
"[aria-pressed]",
|
|
6628
|
+
"[aria-selected]",
|
|
6629
|
+
"[data-state]",
|
|
6630
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
6610
6631
|
...INTERACTIVE_ROLES.map((r) => `[role="${r}"]`)
|
|
6611
6632
|
].join(", ");
|
|
6612
6633
|
EMOJI_RE = /\p{Extended_Pictographic}|\p{Emoji_Modifier}|\u{FE0F}|\u{200D}|\u{20E3}/gu;
|
|
@@ -8946,7 +8967,7 @@ var init_detect_theme = __esm({
|
|
|
8946
8967
|
});
|
|
8947
8968
|
|
|
8948
8969
|
// src/contract/v1.ts
|
|
8949
|
-
var SDK_VERSION = "0.6.
|
|
8970
|
+
var SDK_VERSION = "0.6.5";
|
|
8950
8971
|
var DEFAULT_FLUSH_INTERVAL_MS = 5e3;
|
|
8951
8972
|
var DEFAULT_FLUSH_BATCH_SIZE = 20;
|
|
8952
8973
|
var DEFAULT_API_URL = "https://veo-backend-production-8c78.up.railway.app";
|
|
@@ -9495,13 +9516,23 @@ var DomListener = class {
|
|
|
9495
9516
|
if (!this.throttle.shouldFire(target)) return;
|
|
9496
9517
|
this.emit("change", target);
|
|
9497
9518
|
}
|
|
9498
|
-
/**
|
|
9519
|
+
/**
|
|
9520
|
+
* Busca hacia arriba un ancestro "interactivo". Devuelve null si no hay ninguno.
|
|
9521
|
+
*
|
|
9522
|
+
* Además de los controles nativos, reconoce los patrones de las apps modernas
|
|
9523
|
+
* (React/Vue/Radix), donde el handler NO está en el HTML: acordeones, menús
|
|
9524
|
+
* desplegables y tabs marcados con `aria-expanded`/`aria-haspopup`/`aria-controls`/
|
|
9525
|
+
* `aria-pressed`/`aria-selected`/`data-state`, elementos enfocables por
|
|
9526
|
+
* `tabindex`, y cualquier elemento cuyo cursor COMPUTADO sea `pointer` (antes
|
|
9527
|
+
* solo se miraba el inline, que casi nadie usa: el cursor viene por clase).
|
|
9528
|
+
*/
|
|
9499
9529
|
findMeaningfulAncestor(element) {
|
|
9500
9530
|
let current = element;
|
|
9501
9531
|
let depth = 0;
|
|
9502
9532
|
while (current && current !== document.documentElement && depth < 5) {
|
|
9503
9533
|
const tag = current.tagName.toLowerCase();
|
|
9504
|
-
const
|
|
9534
|
+
const tabindex = current.getAttribute("tabindex");
|
|
9535
|
+
const isInteractive2 = tag === "button" || tag === "a" || tag === "input" || tag === "select" || tag === "textarea" || tag === "summary" || tag === "label" || current.hasAttribute("data-veo-tag") || current.hasAttribute("role") || current.hasAttribute("onclick") || current.hasAttribute("aria-expanded") || current.hasAttribute("aria-haspopup") || current.hasAttribute("aria-controls") || current.hasAttribute("aria-pressed") || current.hasAttribute("aria-selected") || current.hasAttribute("data-state") || current.hasAttribute("contenteditable") || tabindex !== null && tabindex !== "-1" || hasPointerCursor(current);
|
|
9505
9536
|
if (isInteractive2) return current;
|
|
9506
9537
|
current = current.parentElement;
|
|
9507
9538
|
depth++;
|
|
@@ -9513,6 +9544,16 @@ var DomListener = class {
|
|
|
9513
9544
|
this.client.track("$autocapture", payload);
|
|
9514
9545
|
}
|
|
9515
9546
|
};
|
|
9547
|
+
function hasPointerCursor(element) {
|
|
9548
|
+
if (!(element instanceof HTMLElement)) return false;
|
|
9549
|
+
if (element.style.cursor === "pointer") return true;
|
|
9550
|
+
try {
|
|
9551
|
+
const win = element.ownerDocument.defaultView;
|
|
9552
|
+
return win ? win.getComputedStyle(element).cursor === "pointer" : false;
|
|
9553
|
+
} catch {
|
|
9554
|
+
return false;
|
|
9555
|
+
}
|
|
9556
|
+
}
|
|
9516
9557
|
|
|
9517
9558
|
// src/plugins/autocapture/index.ts
|
|
9518
9559
|
function autocapturePlugin(config = {}) {
|