veo-sdk 0.6.4 → 0.6.6

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/index.mjs CHANGED
@@ -5,10 +5,10 @@ export { closeGuidePreview, previewGuide } from './chunk-CMPOHTUM.mjs';
5
5
  import './chunk-PTG3BTJE.mjs';
6
6
 
7
7
  // src/contract/v1.ts
8
- var SDK_VERSION = "0.6.4";
8
+ var SDK_VERSION = "0.6.6";
9
9
  var DEFAULT_FLUSH_INTERVAL_MS = 5e3;
10
10
  var DEFAULT_FLUSH_BATCH_SIZE = 20;
11
- var DEFAULT_API_URL = "https://veo-backend-production-8c78.up.railway.app";
11
+ var DEFAULT_API_URL = "https://back.onuser.io";
12
12
 
13
13
  // src/core/api-url.ts
14
14
  function resolveApiUrl(config) {
@@ -530,13 +530,23 @@ var DomListener = class {
530
530
  if (!this.throttle.shouldFire(target)) return;
531
531
  this.emit("change", target);
532
532
  }
533
- /** Busca hacia arriba un ancestro "interactivo". Devuelve null si no hay ninguno. */
533
+ /**
534
+ * Busca hacia arriba un ancestro "interactivo". Devuelve null si no hay ninguno.
535
+ *
536
+ * Además de los controles nativos, reconoce los patrones de las apps modernas
537
+ * (React/Vue/Radix), donde el handler NO está en el HTML: acordeones, menús
538
+ * desplegables y tabs marcados con `aria-expanded`/`aria-haspopup`/`aria-controls`/
539
+ * `aria-pressed`/`aria-selected`/`data-state`, elementos enfocables por
540
+ * `tabindex`, y cualquier elemento cuyo cursor COMPUTADO sea `pointer` (antes
541
+ * solo se miraba el inline, que casi nadie usa: el cursor viene por clase).
542
+ */
534
543
  findMeaningfulAncestor(element) {
535
544
  let current = element;
536
545
  let depth = 0;
537
546
  while (current && current !== document.documentElement && depth < 5) {
538
547
  const tag = current.tagName.toLowerCase();
539
- const isInteractive = tag === "button" || tag === "a" || tag === "input" || tag === "select" || tag === "textarea" || current.hasAttribute("data-veo-tag") || current.hasAttribute("role") || current.hasAttribute("onclick") || current instanceof HTMLElement && current.style.cursor === "pointer";
548
+ const tabindex = current.getAttribute("tabindex");
549
+ const isInteractive = 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);
540
550
  if (isInteractive) return current;
541
551
  current = current.parentElement;
542
552
  depth++;
@@ -548,6 +558,16 @@ var DomListener = class {
548
558
  this.client.track("$autocapture", payload);
549
559
  }
550
560
  };
561
+ function hasPointerCursor(element) {
562
+ if (!(element instanceof HTMLElement)) return false;
563
+ if (element.style.cursor === "pointer") return true;
564
+ try {
565
+ const win = element.ownerDocument.defaultView;
566
+ return win ? win.getComputedStyle(element).cursor === "pointer" : false;
567
+ } catch {
568
+ return false;
569
+ }
570
+ }
551
571
 
552
572
  // src/plugins/autocapture/index.ts
553
573
  function autocapturePlugin(config = {}) {
@@ -1267,7 +1287,7 @@ function init(config) {
1267
1287
  // Fallback de carga del builder para bundlers: `import()` dinámico → el bundler
1268
1288
  // lo code-splitea (solo se descarga en modo builder). Así el consumidor por
1269
1289
  // bundler NO necesita copiar `veo-builder.js` ni setear `builderUrl`.
1270
- () => import('./builder-5F2EFT4X.mjs').then((m) => m.initBuilderMode()),
1290
+ () => import('./builder-O75QIFKQ.mjs').then((m) => m.initBuilderMode()),
1271
1291
  // Detector de tema: también por `import()` dinámico → chunk aparte que el
1272
1292
  // bundler solo descarga cuando toca detectar (como mucho una vez al día).
1273
1293
  () => import('./detect-theme-X4K3TLUL.mjs')