voodoojs 0.4.6 → 0.6.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.
package/dist/index.cjs CHANGED
@@ -3349,7 +3349,7 @@ init_reactivity();
3349
3349
  // src/store/index.ts
3350
3350
  init_reactivity();
3351
3351
  var stores = /* @__PURE__ */ new Map();
3352
- var versao = ref(0);
3352
+ var version = ref(0);
3353
3353
  var persistHandles = /* @__PURE__ */ new Map();
3354
3354
  function store(name, definition, options = {}) {
3355
3355
  const existing = stores.get(name);
@@ -3366,30 +3366,30 @@ function store(name, definition, options = {}) {
3366
3366
  return existing;
3367
3367
  }
3368
3368
  const key = typeof options.persist === "string" ? options.persist : `voodoo:store:${name}`;
3369
- const descritores = Object.getOwnPropertyDescriptors(definition);
3370
- const initial = Object.defineProperties({}, descritores);
3369
+ const descriptors = Object.getOwnPropertyDescriptors(definition);
3370
+ const initial = Object.defineProperties({}, descriptors);
3371
3371
  if (options.persist && typeof localStorage !== "undefined") {
3372
3372
  try {
3373
3373
  const saved = localStorage.getItem(key);
3374
3374
  if (saved) {
3375
- const salvo = JSON.parse(saved);
3376
- for (const [chave, valor] of Object.entries(salvo)) {
3377
- if (descritores[chave] && !("value" in descritores[chave])) continue;
3378
- initial[chave] = valor;
3375
+ const parsed = JSON.parse(saved);
3376
+ for (const [field, value] of Object.entries(parsed)) {
3377
+ if (descriptors[field] && !("value" in descriptors[field])) continue;
3378
+ initial[field] = value;
3379
3379
  }
3380
3380
  }
3381
3381
  } catch {
3382
3382
  }
3383
3383
  }
3384
3384
  const created = reactive(initial);
3385
- for (const [prop, descritor] of Object.entries(descritores)) {
3386
- const value = descritor.value;
3385
+ for (const [prop, descriptor] of Object.entries(descriptors)) {
3386
+ const value = descriptor.value;
3387
3387
  if (typeof value === "function") {
3388
3388
  created[prop] = (...args) => value.apply(created, args);
3389
3389
  }
3390
3390
  }
3391
3391
  stores.set(name, created);
3392
- versao.value++;
3392
+ version.value++;
3393
3393
  if (options.persist && typeof localStorage !== "undefined") {
3394
3394
  const stop2 = watch(
3395
3395
  created,
@@ -3407,10 +3407,10 @@ function store(name, definition, options = {}) {
3407
3407
  }
3408
3408
  function stripFunctions(source) {
3409
3409
  const out = {};
3410
- const descritores = Object.getOwnPropertyDescriptors(toRaw(source));
3410
+ const descriptors = Object.getOwnPropertyDescriptors(toRaw(source));
3411
3411
  for (const [key, value] of Object.entries(source)) {
3412
3412
  if (typeof value === "function") continue;
3413
- if (descritores[key] && !("value" in descritores[key])) continue;
3413
+ if (descriptors[key] && !("value" in descriptors[key])) continue;
3414
3414
  out[key] = value;
3415
3415
  }
3416
3416
  return out;
@@ -3419,11 +3419,11 @@ var allStores = new Proxy(
3419
3419
  {},
3420
3420
  {
3421
3421
  get: (_t, key) => {
3422
- void versao.value;
3422
+ void version.value;
3423
3423
  return stores.get(key);
3424
3424
  },
3425
3425
  has: (_t, key) => {
3426
- void versao.value;
3426
+ void version.value;
3427
3427
  return stores.has(key);
3428
3428
  },
3429
3429
  ownKeys: () => [...stores.keys()],
@@ -4352,6 +4352,7 @@ function render(options) {
4352
4352
  element.setAttribute("data-type", type);
4353
4353
  element.setAttribute("role", type === "error" ? "alert" : "status");
4354
4354
  element.setAttribute("aria-live", type === "error" ? "assertive" : "polite");
4355
+ element.setAttribute("aria-atomic", "true");
4355
4356
  let closed = false;
4356
4357
  let timer = null;
4357
4358
  const close = () => {
@@ -4672,10 +4673,11 @@ var cache2 = {
4672
4673
  }
4673
4674
  };
4674
4675
  var THEME_KEY = "voodoo:theme";
4676
+ var picked = null;
4675
4677
  var theme = {
4676
4678
  /** Theme chosen by the user, or `system` when never set. */
4677
4679
  get current() {
4678
- return storage.get(THEME_KEY) ?? "system";
4680
+ return storage.get(THEME_KEY) ?? picked ?? "system";
4679
4681
  },
4680
4682
  /** Theme effectively applied, resolving `system`. */
4681
4683
  get resolved() {
@@ -4685,6 +4687,7 @@ var theme = {
4685
4687
  return matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
4686
4688
  },
4687
4689
  set(value) {
4690
+ picked = value;
4688
4691
  storage.set(THEME_KEY, value);
4689
4692
  this.apply();
4690
4693
  },
@@ -4695,7 +4698,7 @@ var theme = {
4695
4698
  },
4696
4699
  /** `true` once the visitor has actually picked a theme. */
4697
4700
  get chosen() {
4698
- return storage.get(THEME_KEY) != null;
4701
+ return picked !== null || storage.get(THEME_KEY) != null;
4699
4702
  },
4700
4703
  /** Writes `data-theme` on the root element and notifies the page. */
4701
4704
  apply() {
@@ -4719,7 +4722,8 @@ var theme = {
4719
4722
  init() {
4720
4723
  if (typeof document === "undefined") return;
4721
4724
  this.apply();
4722
- matchMedia?.("(prefers-color-scheme: dark)").addEventListener("change", () => {
4725
+ if (typeof matchMedia === "undefined") return;
4726
+ matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
4723
4727
  if (this.current === "system") this.apply();
4724
4728
  });
4725
4729
  }
@@ -5154,8 +5158,8 @@ function transitionOptions(el) {
5154
5158
  defineDirective("text", ({ el, effect: effect3, evaluate: ev }) => {
5155
5159
  effect3(() => {
5156
5160
  el.textContent = stringify(ev());
5157
- const primeiro = el.firstChild;
5158
- if (primeiro && primeiro.nodeType === 3) markInitialized(primeiro);
5161
+ const first = el.firstChild;
5162
+ if (first && first.nodeType === 3) markInitialized(first);
5159
5163
  });
5160
5164
  });
5161
5165
  defineDirective("html", (ctx) => {
@@ -5358,10 +5362,10 @@ defineDirective(
5358
5362
  next.push({ key, scope: childScope, nodes, data: childScope.data });
5359
5363
  });
5360
5364
  if (batch.fragment.firstChild) anchor.parentNode?.insertBefore(batch.fragment, anchor);
5361
- for (const [node, escopo] of batch.pending) walk(node, escopo);
5362
- const reaproveitados = new Set(next);
5365
+ for (const [node, rowScope] of batch.pending) walk(node, rowScope);
5366
+ const reused = new Set(next);
5363
5367
  for (const block2 of blocks) {
5364
- if (used.has(block2.key) && reaproveitados.has(block2)) continue;
5368
+ if (used.has(block2.key) && reused.has(block2)) continue;
5365
5369
  for (const node of block2.nodes) {
5366
5370
  destroy(node);
5367
5371
  node.remove();
@@ -5431,7 +5435,7 @@ var BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
5431
5435
  "novalidate",
5432
5436
  "inert"
5433
5437
  ]);
5434
- var ATRIBUTOS_DE_URL = /* @__PURE__ */ new Set([
5438
+ var URL_ATTRIBUTES = /* @__PURE__ */ new Set([
5435
5439
  "href",
5436
5440
  "src",
5437
5441
  "action",
@@ -5440,15 +5444,15 @@ var ATRIBUTOS_DE_URL = /* @__PURE__ */ new Set([
5440
5444
  "ping",
5441
5445
  "poster"
5442
5446
  ]);
5443
- var RUIDO_DE_ESQUEMA = /[\s\x00-\x1f]/g;
5444
- function urlPerigosa(valor) {
5445
- const limpo = valor.replace(RUIDO_DE_ESQUEMA, "").toLowerCase();
5446
- return limpo.startsWith("javascript:") || limpo.startsWith("vbscript:") || limpo.startsWith("data:text/html") || limpo.startsWith("data:application/xhtml");
5447
+ var SCHEME_NOISE = /[\s\x00-\x1f]/g;
5448
+ function isDangerousUrl(value) {
5449
+ const clean = value.replace(SCHEME_NOISE, "").toLowerCase();
5450
+ return clean.startsWith("javascript:") || clean.startsWith("vbscript:") || clean.startsWith("data:text/html") || clean.startsWith("data:application/xhtml");
5447
5451
  }
5448
- function applyBinding(el, name, value, asProp = false, perigoLiberado = false) {
5452
+ function applyBinding(el, name, value, asProp = false, allowDangerous = false) {
5449
5453
  if (name === "class") return applyClass(el, value);
5450
5454
  if (name === "style") return applyStyle(el, value);
5451
- if (exports.config.sanitizeUrls && !perigoLiberado && name === "srcdoc") {
5455
+ if (exports.config.sanitizeUrls && !allowDangerous && name === "srcdoc") {
5452
5456
  warn2(
5453
5457
  `:srcdoc refused in ${describeElement(el)}: the value becomes a document with active script inside the iframe, the same way v-html becomes markup. If the content is trusted, write :srcdoc.dangerous="..."; to turn off this protection on the entire application, set V.config.sanitizeUrls = false.`
5454
5458
  );
@@ -5456,7 +5460,7 @@ function applyBinding(el, name, value, asProp = false, perigoLiberado = false) {
5456
5460
  return;
5457
5461
  }
5458
5462
  if (exports.config.sanitizeUrls && !asProp) {
5459
- if (ATRIBUTOS_DE_URL.has(name) && typeof value === "string" && urlPerigosa(value)) {
5463
+ if (URL_ATTRIBUTES.has(name) && typeof value === "string" && isDangerousUrl(value)) {
5460
5464
  warn2(
5461
5465
  `value refused in :${name} of ${describeElement(el)}: "${value.slice(0, 60)}" uses a scheme that executes code. Use an http(s) or relative address. To turn off this protection, set V.config.sanitizeUrls = false.`
5462
5466
  );
@@ -5553,9 +5557,9 @@ defineDirective(
5553
5557
  }
5554
5558
  if (arg === "key") return;
5555
5559
  const asProp = !!modifiers.prop;
5556
- const perigoLiberado = !!modifiers.dangerous;
5560
+ const allowDangerous = !!modifiers.dangerous;
5557
5561
  effect3(() => {
5558
- applyBinding(el, arg, ev(), asProp, perigoLiberado);
5562
+ applyBinding(el, arg, ev(), asProp, allowDangerous);
5559
5563
  });
5560
5564
  },
5561
5565
  { priority: exports.PRIORITY.BIND }
@@ -6472,7 +6476,7 @@ function directive(name, definition) {
6472
6476
  name,
6473
6477
  (ctx) => {
6474
6478
  let oldValue;
6475
- let mounted = false;
6479
+ let mounted2 = false;
6476
6480
  const makeBinding = (value) => ({
6477
6481
  el: ctx.el,
6478
6482
  value,
@@ -6488,8 +6492,8 @@ function directive(name, definition) {
6488
6492
  hooks.beforeMount?.(ctx.el, makeBinding(initial));
6489
6493
  ctx.effect(() => {
6490
6494
  const value = hooks.raw ? ctx.expression : ctx.evaluate();
6491
- if (!mounted) {
6492
- mounted = true;
6495
+ if (!mounted2) {
6496
+ mounted2 = true;
6493
6497
  oldValue = value;
6494
6498
  hooks.mounted?.(ctx.el, makeBinding(value));
6495
6499
  return;
@@ -6512,11 +6516,11 @@ function data(values) {
6512
6516
  Object.defineProperties(rootScope.data, Object.getOwnPropertyDescriptors(values));
6513
6517
  return rootScope.data;
6514
6518
  }
6515
- var version = "0.4.6";
6519
+ var version2 = "0.4.6";
6516
6520
  var core = {
6517
6521
  // Utilities first: Voodoo's own names can override.
6518
6522
  ...utils_exports,
6519
- version,
6523
+ version: version2,
6520
6524
  config: exports.config,
6521
6525
  // Reactivity
6522
6526
  reactive,
@@ -9840,7 +9844,7 @@ defineDirective("tooltip", ({ el, expression, cleanup }) => {
9840
9844
  if (addedTabIndex) el.setAttribute("tabindex", "0");
9841
9845
  let bubble = null;
9842
9846
  let timer = null;
9843
- const build = () => {
9847
+ const build2 = () => {
9844
9848
  const node = document.createElement("div");
9845
9849
  node.className = "v-tooltip";
9846
9850
  node.setAttribute("role", "tooltip");
@@ -9854,7 +9858,7 @@ defineDirective("tooltip", ({ el, expression, cleanup }) => {
9854
9858
  };
9855
9859
  const open = () => {
9856
9860
  if (bubble) return;
9857
- bubble = build();
9861
+ bubble = build2();
9858
9862
  el.setAttribute("aria-describedby", bubble.id);
9859
9863
  reposition();
9860
9864
  requestAnimationFrame(() => bubble?.classList.add("v-in"));
@@ -11040,37 +11044,37 @@ init_reactivity();
11040
11044
  init_registry();
11041
11045
  init_style();
11042
11046
  var messages = {
11043
- required: "Preencha este campo.",
11044
- email: "Informe um e-mail valido.",
11045
- url: "Informe uma URL valida.",
11046
- number: "Informe um numero valido.",
11047
- integer: "Informe um numero inteiro.",
11048
- decimal: "Informe um numero decimal valido.",
11049
- alpha: "Use apenas letras.",
11050
- alphanumeric: "Use apenas letras e numeros.",
11051
- minlength: "Use no minimo {param} caracteres.",
11052
- maxlength: "Use no maximo {param} caracteres.",
11053
- min: "O valor minimo e {param}.",
11054
- max: "O valor maximo e {param}.",
11055
- between: "Informe um valor entre {min} e {max}.",
11056
- match: "Os campos nao conferem.",
11057
- regex: "O formato informado nao e valido.",
11058
- date: "Informe uma data valida.",
11059
- after: "A data precisa ser posterior a {param}.",
11060
- before: "A data precisa ser anterior a {param}.",
11061
- accepted: "E preciso marcar esta opcao para continuar.",
11062
- same: "Os valores precisam ser iguais.",
11063
- different: "Os valores precisam ser diferentes.",
11064
- in: "Escolha uma das opcoes permitidas.",
11065
- notin: "Este valor nao e permitido.",
11066
- phone: "Informe um telefone valido com DDD.",
11067
- cpf: "CPF invalido.",
11068
- cnpj: "CNPJ invalido.",
11069
- cep: "CEP invalido.",
11070
- creditcard: "Numero de cartao invalido.",
11071
- strongpassword: "Use {param} caracteres ou mais, com maiuscula, minuscula, numero e simbolo.",
11072
- unique: "Este valor ja esta em uso.",
11073
- invalid: "Valor invalido."
11047
+ required: "Please fill in this field.",
11048
+ email: "Enter a valid email address.",
11049
+ url: "Enter a valid URL.",
11050
+ number: "Enter a valid number.",
11051
+ integer: "Enter a whole number.",
11052
+ decimal: "Enter a valid decimal number.",
11053
+ alpha: "Use letters only.",
11054
+ alphanumeric: "Use letters and numbers only.",
11055
+ minlength: "Use at least {param} characters.",
11056
+ maxlength: "Use at most {param} characters.",
11057
+ min: "The smallest allowed value is {param}.",
11058
+ max: "The largest allowed value is {param}.",
11059
+ between: "Enter a value between {min} and {max}.",
11060
+ match: "The fields do not match.",
11061
+ regex: "That format is not valid.",
11062
+ date: "Enter a valid date.",
11063
+ after: "The date has to be later than {param}.",
11064
+ before: "The date has to be earlier than {param}.",
11065
+ accepted: "You have to tick this to continue.",
11066
+ same: "The values have to be the same.",
11067
+ different: "The values have to be different.",
11068
+ in: "Choose one of the allowed options.",
11069
+ notin: "That value is not allowed.",
11070
+ phone: "Enter a valid phone number, including the area code.",
11071
+ cpf: "Invalid CPF.",
11072
+ cnpj: "Invalid CNPJ.",
11073
+ cep: "Invalid postcode.",
11074
+ creditcard: "Invalid card number.",
11075
+ strongpassword: "Use {param} characters or more, with an upper case letter, a lower case letter, a number and a symbol.",
11076
+ unique: "That value is already taken.",
11077
+ invalid: "Invalid value."
11074
11078
  };
11075
11079
  function formatMessage(template, data2) {
11076
11080
  const param = data2.param ?? "";
@@ -14443,7 +14447,7 @@ function normalize2(options, type) {
14443
14447
  const labels2 = fromOptions ? options.labels.map((label) => String(label)) : [];
14444
14448
  const series = [];
14445
14449
  const raw = options.data;
14446
- const singleName = options.name ?? "Valor";
14450
+ const singleName = options.name ?? "Value";
14447
14451
  if (typeof raw === "number") {
14448
14452
  series.push({ name: singleName, values: [raw], xs: null, color: palette2[0] });
14449
14453
  } else if (Array.isArray(raw) && raw.length > 0) {
@@ -15173,7 +15177,7 @@ function draw(state2) {
15173
15177
  const palette2 = options.colors && options.colors.length > 0 ? options.colors : CHART_COLORS;
15174
15178
  const format = options.format ?? "number";
15175
15179
  const width = Math.max(160, Math.round(el.clientWidth || options.width || 640));
15176
- const height = Math.max(48, Math.round(options.height ?? defaultHeight(type)));
15180
+ const height = Math.max(48, Math.round(options.height ?? (el.clientHeight || defaultHeight(type))));
15177
15181
  state2.lastWidth = width;
15178
15182
  state2.viewWidth = width;
15179
15183
  state2.viewHeight = height;
@@ -16025,7 +16029,7 @@ var CSS5 = `
16025
16029
  @keyframes v-shimmer{0%{background-position:-180% 0}100%{background-position:180% 0}}
16026
16030
  @keyframes v-indeterminate{0%{transform:translateX(-100%)}100%{transform:translateX(340%)}}
16027
16031
 
16028
- /* ------------------------------------------------------------------ botao */
16032
+ /* ----------------------------------------------------------------- button */
16029
16033
  .v-btn{appearance:none;-webkit-appearance:none;position:relative;display:inline-flex;
16030
16034
  align-items:center;justify-content:center;gap:8px;vertical-align:middle;white-space:nowrap;
16031
16035
  font-family:var(--v-font-sans);font-weight:600;line-height:1;text-decoration:none;
@@ -16069,7 +16073,7 @@ var CSS5 = `
16069
16073
  .v-btn-spin{width:1em;height:1em;border-radius:50%;border:2px solid currentColor;
16070
16074
  border-top-color:transparent;animation:v-spin .7s linear infinite;flex:none}
16071
16075
 
16072
- /* ------------------------------------------------------- botao de icone */
16076
+ /* ------------------------------------------------------------ icon button */
16073
16077
  .v-icon-btn{appearance:none;-webkit-appearance:none;display:inline-grid;place-items:center;
16074
16078
  border:1px solid transparent;border-radius:var(--v-radius-sm);cursor:pointer;
16075
16079
  font-family:var(--v-font-sans);
@@ -16114,7 +16118,7 @@ var CSS5 = `
16114
16118
  .v-card-foot:empty{display:none}
16115
16119
  .v-card[data-padded="false"] .v-card-body{padding:0}
16116
16120
 
16117
- /* ------------------------------------------------------------ formulario */
16121
+ /* ------------------------------------------------------------------- form */
16118
16122
  .v-field{display:flex;flex-direction:column;gap:6px;font-family:var(--v-font-sans);min-width:0}
16119
16123
  .v-label{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:600;
16120
16124
  line-height:1.3;color:var(--v-text)}
@@ -16193,7 +16197,7 @@ var CSS5 = `
16193
16197
  .v-select-opt.is-selected .v-select-check{opacity:1}
16194
16198
  .v-select-empty{padding:14px 10px;text-align:center;font-size:13.5px;color:var(--v-text-muted)}
16195
16199
 
16196
- /* -------------------------------------------- caixa, radio e interruptor */
16200
+ /* --------------------------------------------- checkbox, radio and switch */
16197
16201
  .v-check{display:inline-flex;align-items:flex-start;gap:9px;cursor:pointer;
16198
16202
  font-family:var(--v-font-sans);font-size:14px;line-height:1.45;color:var(--v-text)}
16199
16203
  .v-check[data-disabled="true"]{cursor:not-allowed;opacity:.6}
@@ -16230,7 +16234,7 @@ var CSS5 = `
16230
16234
  .v-check[data-size="sm"] .v-switch-thumb{width:16px;height:16px}
16231
16235
  .v-check[data-size="sm"] .v-check-native:checked+.v-switch-track .v-switch-thumb{transform:translateX(14px)}
16232
16236
 
16233
- /* --------------------------------------------------- selo, etiqueta, alerta */
16237
+ /* ------------------------------------------------------ badge, tag, alert */
16234
16238
  .v-badge{display:inline-flex;align-items:center;gap:5px;font-family:var(--v-font-sans);
16235
16239
  font-weight:600;line-height:1;border-radius:var(--v-radius-full);border:1px solid transparent;
16236
16240
  white-space:nowrap;vertical-align:middle}
@@ -16307,7 +16311,7 @@ var CSS5 = `
16307
16311
  .v-avatar-status[data-status="busy"]{background:var(--v-danger)}
16308
16312
  .v-avatar-status[data-status="away"]{background:var(--v-warning)}
16309
16313
 
16310
- /* ------------------------------------------------- spinner e esqueleto */
16314
+ /* --------------------------------------------------- spinner and skeleton */
16311
16315
  .v-spinner{display:inline-block;border-radius:50%;border-style:solid;border-color:var(--v-border);
16312
16316
  border-top-color:var(--v-primary);animation:v-spin .7s linear infinite;vertical-align:middle}
16313
16317
  .v-spinner[data-tone="accent"]{border-top-color:var(--v-accent)}
@@ -16324,7 +16328,7 @@ var CSS5 = `
16324
16328
  .v-skeleton[data-circle="true"]{border-radius:var(--v-radius-full)}
16325
16329
  .v-skeleton-stack{display:flex;flex-direction:column;gap:8px}
16326
16330
 
16327
- /* ------------------------------------------------------------- progresso */
16331
+ /* --------------------------------------------------------------- progress */
16328
16332
  .v-progress{font-family:var(--v-font-sans);display:flex;flex-direction:column;gap:6px}
16329
16333
  .v-progress-head{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:var(--v-text-muted)}
16330
16334
  .v-progress-value{font-weight:650;color:var(--v-text)}
@@ -16341,7 +16345,7 @@ var CSS5 = `
16341
16345
  .v-progress[data-tone="danger"] .v-progress-bar{background:var(--v-danger)}
16342
16346
  .v-progress[data-indeterminate="true"] .v-progress-bar{width:30% !important;animation:v-indeterminate 1.3s var(--v-ease) infinite}
16343
16347
 
16344
- /* ------------------------------------------------------------- divisor */
16348
+ /* ---------------------------------------------------------------- divider */
16345
16349
  .v-divider{display:flex;align-items:center;gap:12px;color:var(--v-text-soft);
16346
16350
  font-family:var(--v-font-sans);font-size:12.5px;font-weight:600;margin:16px 0}
16347
16351
  .v-divider::before,.v-divider::after{content:"";flex:1;height:1px;background:var(--v-border)}
@@ -16349,7 +16353,7 @@ var CSS5 = `
16349
16353
  .v-divider[data-vertical="true"]{flex-direction:column;margin:0 16px;align-self:stretch;height:auto}
16350
16354
  .v-divider[data-vertical="true"]::before,.v-divider[data-vertical="true"]::after{width:1px;height:auto;flex:1}
16351
16355
 
16352
- /* -------------------------------------------------------------- tabela */
16356
+ /* ------------------------------------------------------------------ table */
16353
16357
  .v-table-wrap{width:100%;overflow-x:auto;background:var(--v-surface);border:1px solid var(--v-border);
16354
16358
  border-radius:var(--v-radius);font-family:var(--v-font-sans)}
16355
16359
  .v-table{width:100%;border-collapse:collapse;font-size:14px;color:var(--v-text)}
@@ -16370,7 +16374,7 @@ var CSS5 = `
16370
16374
  .v-th[aria-sort="ascending"] .v-th-arrow,.v-th[aria-sort="descending"] .v-th-arrow{opacity:1;color:var(--v-primary)}
16371
16375
  .v-table-empty{text-align:center;color:var(--v-text-muted);padding:34px 14px;font-size:14px}
16372
16376
 
16373
- /* ---------------------------------------------------------- paginacao */
16377
+ /* ------------------------------------------------------------- pagination */
16374
16378
  .v-pagination{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-family:var(--v-font-sans)}
16375
16379
  .v-page{appearance:none;min-width:34px;height:34px;padding:0 9px;display:inline-grid;place-items:center;
16376
16380
  background:transparent;border:1px solid transparent;border-radius:var(--v-radius-sm);
@@ -16382,7 +16386,7 @@ var CSS5 = `
16382
16386
  .v-page[aria-current="page"]{background:var(--v-primary);border-color:var(--v-primary);color:var(--v-primary-contrast)}
16383
16387
  .v-page-gap{min-width:24px;text-align:center;color:var(--v-text-soft);user-select:none}
16384
16388
 
16385
- /* ----------------------------------------------------------- migalhas */
16389
+ /* ------------------------------------------------------------- breadcrumb */
16386
16390
  .v-breadcrumb{font-family:var(--v-font-sans);font-size:13.5px}
16387
16391
  .v-breadcrumb-list{list-style:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0;padding:0}
16388
16392
  .v-breadcrumb-item{display:inline-flex;align-items:center;gap:6px;color:var(--v-text-muted)}
@@ -16392,7 +16396,7 @@ var CSS5 = `
16392
16396
  .v-breadcrumb-item[aria-current="page"]{color:var(--v-text);font-weight:600}
16393
16397
  .v-breadcrumb-sep{color:var(--v-text-soft);user-select:none}
16394
16398
 
16395
- /* ------------------------------------------------------------ metrica */
16399
+ /* ------------------------------------------------------------------- stat */
16396
16400
  .v-stat{display:flex;gap:14px;align-items:flex-start;padding:16px 18px;background:var(--v-surface);
16397
16401
  border:1px solid var(--v-border);border-radius:var(--v-radius);font-family:var(--v-font-sans)}
16398
16402
  .v-stat-icon{flex:none;width:40px;height:40px;display:grid;place-items:center;font-size:19px;
@@ -16410,7 +16414,7 @@ var CSS5 = `
16410
16414
  .v-stat-delta[data-dir="flat"]{background:var(--v-surface-3);color:var(--v-text-muted)}
16411
16415
  .v-stat-hint{font-size:12.5px;color:var(--v-text-muted)}
16412
16416
 
16413
- /* ------------------------------------------------------- estado vazio */
16417
+ /* ------------------------------------------------------------ empty state */
16414
16418
  .v-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;
16415
16419
  padding:44px 22px;font-family:var(--v-font-sans);color:var(--v-text)}
16416
16420
  .v-empty-icon{width:58px;height:58px;display:grid;place-items:center;font-size:27px;
@@ -16420,7 +16424,7 @@ var CSS5 = `
16420
16424
  .v-empty-actions{margin-top:6px;display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
16421
16425
  .v-empty-actions:empty{display:none}
16422
16426
 
16423
- /* ----------------------------------------------------------- linha do tempo */
16427
+ /* --------------------------------------------------------------- timeline */
16424
16428
  .v-timeline{list-style:none;margin:0;padding:0;font-family:var(--v-font-sans);
16425
16429
  display:flex;flex-direction:column}
16426
16430
  .v-timeline-item{position:relative;display:flex;gap:14px;padding-bottom:20px}
@@ -16440,7 +16444,7 @@ var CSS5 = `
16440
16444
  .v-timeline-desc{margin:3px 0 0;font-size:13.5px;line-height:1.55;color:var(--v-text-muted)}
16441
16445
  .v-timeline-time{display:block;margin-top:3px;font-size:12px;color:var(--v-text-soft)}
16442
16446
 
16443
- /* ---------------------------------------------------------------- passos */
16447
+ /* ------------------------------------------------------------------ steps */
16444
16448
  .v-steps{display:flex;gap:0;font-family:var(--v-font-sans);list-style:none;margin:0;padding:0}
16445
16449
  .v-steps[data-vertical="true"]{flex-direction:column;gap:4px}
16446
16450
  .v-step{flex:1;display:flex;align-items:flex-start;gap:10px;min-width:0;position:relative;padding-right:12px}
@@ -16459,7 +16463,7 @@ var CSS5 = `
16459
16463
  .v-steps[data-vertical="true"] .v-step-line{left:13px;right:auto;top:30px;bottom:2px;width:2px;height:auto}
16460
16464
  .v-step:last-child .v-step-line{display:none}
16461
16465
 
16462
- /* ------------------------------------------------------------ avaliacao */
16466
+ /* ----------------------------------------------------------------- rating */
16463
16467
  .v-rating{display:inline-flex;align-items:center;gap:6px;font-family:var(--v-font-sans)}
16464
16468
  .v-rating-stars{display:inline-flex;gap:2px}
16465
16469
  .v-star{appearance:none;background:none;border:0;padding:2px;cursor:pointer;line-height:0;
@@ -16486,7 +16490,7 @@ var CSS5 = `
16486
16490
  .v-tip[data-placement="right"]{left:calc(100% + 8px);top:50%;translate:0 -50%}
16487
16491
  .v-tipwrap:hover .v-tip,.v-tipwrap:focus-within .v-tip{opacity:1;transform:none}
16488
16492
 
16489
- /* ------------------------------------------------------------ codigo */
16493
+ /* ------------------------------------------------------------------- code */
16490
16494
  .v-code{position:relative;background:var(--v-surface-inset);border:1px solid var(--v-border);
16491
16495
  border-radius:var(--v-radius);overflow:hidden;font-family:var(--v-font-mono)}
16492
16496
  .v-code-head{display:flex;align-items:center;justify-content:space-between;gap:10px;
@@ -17487,7 +17491,7 @@ register("v-table", {
17487
17491
  props: {
17488
17492
  columns: { type: "any", default: "" },
17489
17493
  rows: { type: "any", default: "" },
17490
- empty: { type: "string", default: "Nenhum registro encontrado" },
17494
+ empty: { type: "string", default: "No records found" },
17491
17495
  sortable: { type: "any", default: true },
17492
17496
  dense: BOOL,
17493
17497
  striped: BOOL,
@@ -17597,9 +17601,9 @@ register("v-pagination", {
17597
17601
  total: { type: "number", default: 0 },
17598
17602
  perPage: { type: "number", default: 10 },
17599
17603
  siblings: { type: "number", default: 1 },
17600
- previousLabel: { type: "string", default: "Anterior" },
17601
- nextLabel: { type: "string", default: "Pr\xF3xima" },
17602
- ariaLabel: { type: "string", default: "Pagina\xE7\xE3o" }
17604
+ previousLabel: { type: "string", default: "Previous" },
17605
+ nextLabel: { type: "string", default: "Next" },
17606
+ ariaLabel: { type: "string", default: "Pagination" }
17603
17607
  },
17604
17608
  computed: {
17605
17609
  lastPage() {
@@ -17613,7 +17617,7 @@ register("v-pagination", {
17613
17617
  const value = Number(this.page) || 1;
17614
17618
  return Math.min(Math.max(1, Math.round(value)), this.lastPage);
17615
17619
  },
17616
- /** Numeros visiveis, com `0` marcando as reticencias. */
17620
+ /** Visible page numbers, with `0` marking the ellipsis. */
17617
17621
  items() {
17618
17622
  const last = this.lastPage;
17619
17623
  const current2 = this.currentPage;
@@ -17658,7 +17662,7 @@ register("v-pagination", {
17658
17662
  <template v-for="(item, index) in items" :key="index">
17659
17663
  <span class="v-page-gap" v-if="item === 0" aria-hidden="true">...</span>
17660
17664
  <button type="button" class="v-page" v-if="item !== 0" :aria-current="isCurrent(item)"
17661
- :aria-label="'P\xE1gina ' + item" v-click="go(item)" v-text="item"></button>
17665
+ :aria-label="'Page ' + item" v-click="go(item)" v-text="item"></button>
17662
17666
  </template>
17663
17667
  <button type="button" class="v-page" :disabled="currentPage >= lastPage"
17664
17668
  :aria-label="nextLabel" v-click="go(currentPage + 1)" v-html="svgIcon('chevron-right')"></button>
@@ -17690,7 +17694,7 @@ register("v-breadcrumb", {
17690
17694
  props: {
17691
17695
  items: { type: "any", default: "" },
17692
17696
  separator: { type: "string", default: "/" },
17693
- ariaLabel: { type: "string", default: "Trilha de navega\xE7\xE3o" }
17697
+ ariaLabel: { type: "string", default: "Breadcrumb" }
17694
17698
  },
17695
17699
  computed: {
17696
17700
  crumbs() {
@@ -17723,7 +17727,7 @@ register("v-stat", {
17723
17727
  hint: TEXT,
17724
17728
  icon: TEXT,
17725
17729
  suffix: { type: "string", default: "%" },
17726
- /** Quando `true`, uma variacao negativa e considerada positiva. */
17730
+ /** When `true`, a negative change counts as positive. */
17727
17731
  inverted: BOOL
17728
17732
  },
17729
17733
  computed: {
@@ -17776,7 +17780,7 @@ register("v-stat", {
17776
17780
  register("v-empty-state", {
17777
17781
  props: {
17778
17782
  icon: { type: "string", default: "inbox" },
17779
- title: { type: "string", default: "Nada por aqui" },
17783
+ title: { type: "string", default: "Nothing here yet" },
17780
17784
  description: TEXT
17781
17785
  },
17782
17786
  template: `
@@ -17847,7 +17851,7 @@ register("v-steps", {
17847
17851
  steps: { type: "any", default: "" },
17848
17852
  current: { type: "number", default: 0 },
17849
17853
  vertical: BOOL,
17850
- ariaLabel: { type: "string", default: "Etapas" }
17854
+ ariaLabel: { type: "string", default: "Steps" }
17851
17855
  },
17852
17856
  computed: {
17853
17857
  ...flags("vertical"),
@@ -17891,7 +17895,7 @@ register("v-rating", {
17891
17895
  value: { type: "number", default: 0 },
17892
17896
  max: { type: "number", default: 5 },
17893
17897
  size: { type: "string", default: "md" },
17894
- label: { type: "string", default: "Avalia\xE7\xE3o" },
17898
+ label: { type: "string", default: "Rating" },
17895
17899
  readonly: BOOL,
17896
17900
  disabled: BOOL,
17897
17901
  showValue: BOOL,
@@ -17917,7 +17921,7 @@ register("v-rating", {
17917
17921
  return this.hovered > 0 ? this.hovered : this.score;
17918
17922
  },
17919
17923
  valueText() {
17920
- return `${this.score} de ${this.total}`;
17924
+ return `${this.score} of ${this.total}`;
17921
17925
  }
17922
17926
  },
17923
17927
  methods: {
@@ -17973,7 +17977,7 @@ register("v-rating", {
17973
17977
  :tabindex="locked ? -1 : 0" :aria-readonly="locked" v-keydown="onKey" v-mouseleave="reset">
17974
17978
  <span class="v-rating-stars">
17975
17979
  <button type="button" class="v-star" v-for="index in total" :key="index"
17976
- :data-on="isOn(index)" :disabled="locked" :aria-label="index + ' de ' + total"
17980
+ :data-on="isOn(index)" :disabled="locked" :aria-label="index + ' of ' + total"
17977
17981
  :tabindex="-1" v-click="pick(index)" v-mouseenter="preview(index)"
17978
17982
  v-html="svgIcon('star')"></button>
17979
17983
  </span>
@@ -18041,8 +18045,8 @@ register("v-code-block", {
18041
18045
  code: TEXT,
18042
18046
  language: TEXT,
18043
18047
  filename: TEXT,
18044
- copyLabel: { type: "string", default: "Copiar" },
18045
- copiedLabel: { type: "string", default: "Copiado" },
18048
+ copyLabel: { type: "string", default: "Copy" },
18049
+ copiedLabel: { type: "string", default: "Copied" },
18046
18050
  wrap: BOOL
18047
18051
  },
18048
18052
  state() {
@@ -18382,7 +18386,7 @@ function openDialog(request2) {
18382
18386
  source.remove();
18383
18387
  }
18384
18388
  sourceAnchors.delete(source);
18385
- if (source.hasAttribute(`${exports.config.prefix}modal-content`) || source.hasAttribute("data-v-modal-content")) {
18389
+ if (hasDirective(source, "modal-content")) {
18386
18390
  source.setAttribute("hidden", "");
18387
18391
  }
18388
18392
  }
@@ -20384,14 +20388,14 @@ function xray(force) {
20384
20388
 
20385
20389
  // src/devtools/launcher.ts
20386
20390
  init_style();
20387
- var POSICAO_KEY = "voodoo:devtools:widget-position";
20388
- var ESCONDIDO_KEY = "voodoo:devtools:widget-hidden";
20389
- var LIMIAR_ARRASTO = 4;
20391
+ var POSITION_KEY = "voodoo:devtools:widget-position";
20392
+ var HIDDEN_KEY = "voodoo:devtools:widget-hidden";
20393
+ var DRAG_THRESHOLD = 4;
20390
20394
  var refs2 = null;
20391
- var montado = false;
20392
- var timerContador = 0;
20393
- var timerPulso = 0;
20394
- var desligar = [];
20395
+ var mounted = false;
20396
+ var counterTimer = 0;
20397
+ var pulseTimer = 0;
20398
+ var teardown2 = [];
20395
20399
  var WIDGET_CSS = `
20396
20400
  .v-devtools-widget{
20397
20401
  all: initial;
@@ -20524,220 +20528,220 @@ var WIDGET_CSS = `
20524
20528
  .v-devtools-btn:hover{transform:none}
20525
20529
  }
20526
20530
  `;
20527
- var MARCA = `<svg class="v-devtools-mark" viewBox="0 0 24 24" fill="none" aria-hidden="true">
20531
+ var MARK = `<svg class="v-devtools-mark" viewBox="0 0 24 24" fill="none" aria-hidden="true">
20528
20532
  <path d="M4 4l8 16 8-16" stroke="#6D3BF5" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/>
20529
20533
  <circle cx="12" cy="7.5" r="2" fill="#FF3D8B"/>
20530
20534
  </svg>`;
20531
- function lerPosicao() {
20535
+ function readPosition() {
20532
20536
  try {
20533
- const bruto = localStorage.getItem(POSICAO_KEY);
20534
- if (!bruto) return null;
20535
- const valor = JSON.parse(bruto);
20536
- if (typeof valor?.x !== "number" || typeof valor?.y !== "number") return null;
20537
- return valor;
20537
+ const raw = localStorage.getItem(POSITION_KEY);
20538
+ if (!raw) return null;
20539
+ const value = JSON.parse(raw);
20540
+ if (typeof value?.x !== "number" || typeof value?.y !== "number") return null;
20541
+ return value;
20538
20542
  } catch {
20539
20543
  return null;
20540
20544
  }
20541
20545
  }
20542
- function gravarPosicao(pos) {
20546
+ function writePosition(pos) {
20543
20547
  try {
20544
- localStorage.setItem(POSICAO_KEY, JSON.stringify(pos));
20548
+ localStorage.setItem(POSITION_KEY, JSON.stringify(pos));
20545
20549
  } catch {
20546
20550
  }
20547
20551
  }
20548
- function aplicarPosicao(raiz, pos) {
20549
- const largura = raiz.offsetWidth || 120;
20550
- const altura = raiz.offsetHeight || 38;
20551
- const x = Math.min(Math.max(8, pos.x), Math.max(8, window.innerWidth - largura - 8));
20552
- const y = Math.min(Math.max(8, pos.y), Math.max(8, window.innerHeight - altura - 8));
20553
- raiz.style.left = `${x}px`;
20554
- raiz.style.top = `${y}px`;
20555
- raiz.style.right = "auto";
20556
- raiz.style.bottom = "auto";
20557
- }
20558
- function construir() {
20559
- const raiz = document.createElement("div");
20560
- raiz.className = "v-devtools-widget";
20561
- raiz.setAttribute("data-voodoo-devtools", "widget");
20562
- const botao = document.createElement("button");
20563
- botao.type = "button";
20564
- botao.className = "v-devtools-btn";
20565
- botao.setAttribute("aria-label", "Open Voodoo devtools (Ctrl+Shift+X)");
20566
- botao.setAttribute("aria-pressed", "false");
20567
- botao.title = "Voodoo devtools \u2014 click to inspect, drag to move (Ctrl+Shift+X)";
20568
- botao.innerHTML = MARCA;
20569
- const rotulo = document.createElement("span");
20570
- rotulo.className = "v-devtools-label";
20571
- rotulo.textContent = "Voodoo";
20572
- const contador = document.createElement("span");
20573
- contador.className = "v-devtools-count";
20574
- contador.textContent = "0";
20575
- const pulso = document.createElement("span");
20576
- pulso.className = "v-devtools-pulse";
20577
- pulso.setAttribute("data-on", "false");
20578
- botao.append(rotulo, contador, pulso);
20579
- const fechar = document.createElement("button");
20580
- fechar.type = "button";
20581
- fechar.className = "v-devtools-close";
20582
- fechar.setAttribute("aria-label", "Hide the devtools widget in this tab");
20583
- fechar.title = "Hide in this tab";
20584
- fechar.textContent = "\xD7";
20585
- raiz.append(botao, fechar);
20586
- document.body.appendChild(raiz);
20587
- const salva = lerPosicao();
20588
- if (salva) {
20589
- aplicarPosicao(raiz, salva);
20552
+ function applyPosition(root, pos) {
20553
+ const width = root.offsetWidth || 120;
20554
+ const height = root.offsetHeight || 38;
20555
+ const x = Math.min(Math.max(8, pos.x), Math.max(8, window.innerWidth - width - 8));
20556
+ const y = Math.min(Math.max(8, pos.y), Math.max(8, window.innerHeight - height - 8));
20557
+ root.style.left = `${x}px`;
20558
+ root.style.top = `${y}px`;
20559
+ root.style.right = "auto";
20560
+ root.style.bottom = "auto";
20561
+ }
20562
+ function build() {
20563
+ const root = document.createElement("div");
20564
+ root.className = "v-devtools-widget";
20565
+ root.setAttribute("data-voodoo-devtools", "widget");
20566
+ const button = document.createElement("button");
20567
+ button.type = "button";
20568
+ button.className = "v-devtools-btn";
20569
+ button.setAttribute("aria-label", "Open Voodoo devtools (Ctrl+Shift+X)");
20570
+ button.setAttribute("aria-pressed", "false");
20571
+ button.title = "Voodoo devtools \u2014 click to inspect, drag to move (Ctrl+Shift+X)";
20572
+ button.innerHTML = MARK;
20573
+ const label = document.createElement("span");
20574
+ label.className = "v-devtools-label";
20575
+ label.textContent = "Voodoo";
20576
+ const counter2 = document.createElement("span");
20577
+ counter2.className = "v-devtools-count";
20578
+ counter2.textContent = "0";
20579
+ const pulse = document.createElement("span");
20580
+ pulse.className = "v-devtools-pulse";
20581
+ pulse.setAttribute("data-on", "false");
20582
+ button.append(label, counter2, pulse);
20583
+ const close = document.createElement("button");
20584
+ close.type = "button";
20585
+ close.className = "v-devtools-close";
20586
+ close.setAttribute("aria-label", "Hide the devtools widget in this tab");
20587
+ close.title = "Hide in this tab";
20588
+ close.textContent = "\xD7";
20589
+ root.append(button, close);
20590
+ document.body.appendChild(root);
20591
+ const saved = readPosition();
20592
+ if (saved) {
20593
+ applyPosition(root, saved);
20590
20594
  } else {
20591
- raiz.style.right = "16px";
20592
- raiz.style.bottom = "16px";
20593
- }
20594
- return { raiz, botao, pulso, contador, fechar };
20595
- }
20596
- function ligarArrasto(refs3, aoClicar) {
20597
- let arrastando = false;
20598
- let moveu = false;
20599
- let deslocX = 0;
20600
- let deslocY = 0;
20601
- let inicioX = 0;
20602
- let inicioY = 0;
20603
- const aoDescer = (evento) => {
20604
- if (evento.button !== 0) return;
20605
- const caixa = refs3.raiz.getBoundingClientRect();
20606
- arrastando = true;
20607
- moveu = false;
20608
- inicioX = evento.clientX;
20609
- inicioY = evento.clientY;
20610
- deslocX = evento.clientX - caixa.left;
20611
- deslocY = evento.clientY - caixa.top;
20612
- refs3.botao.setPointerCapture?.(evento.pointerId);
20595
+ root.style.right = "16px";
20596
+ root.style.bottom = "16px";
20597
+ }
20598
+ return { root, button, pulse, counter: counter2, close };
20599
+ }
20600
+ function enableDrag(refs3, onClick) {
20601
+ let dragging = false;
20602
+ let moved = false;
20603
+ let offsetX = 0;
20604
+ let offsetY = 0;
20605
+ let startX = 0;
20606
+ let startY = 0;
20607
+ const onPointerDown = (event) => {
20608
+ if (event.button !== 0) return;
20609
+ const box = refs3.root.getBoundingClientRect();
20610
+ dragging = true;
20611
+ moved = false;
20612
+ startX = event.clientX;
20613
+ startY = event.clientY;
20614
+ offsetX = event.clientX - box.left;
20615
+ offsetY = event.clientY - box.top;
20616
+ refs3.button.setPointerCapture?.(event.pointerId);
20613
20617
  };
20614
- const aoMover = (evento) => {
20615
- if (!arrastando) return;
20616
- const distancia = Math.hypot(evento.clientX - inicioX, evento.clientY - inicioY);
20617
- if (!moveu && distancia < LIMIAR_ARRASTO) return;
20618
- moveu = true;
20619
- evento.preventDefault();
20620
- aplicarPosicao(refs3.raiz, { x: evento.clientX - deslocX, y: evento.clientY - deslocY });
20618
+ const onPointerMove2 = (event) => {
20619
+ if (!dragging) return;
20620
+ const distance = Math.hypot(event.clientX - startX, event.clientY - startY);
20621
+ if (!moved && distance < DRAG_THRESHOLD) return;
20622
+ moved = true;
20623
+ event.preventDefault();
20624
+ applyPosition(refs3.root, { x: event.clientX - offsetX, y: event.clientY - offsetY });
20621
20625
  };
20622
- const aoSubir = (evento) => {
20623
- if (!arrastando) return;
20624
- arrastando = false;
20625
- refs3.botao.releasePointerCapture?.(evento.pointerId);
20626
- if (!moveu) {
20627
- aoClicar();
20626
+ const onPointerUp = (event) => {
20627
+ if (!dragging) return;
20628
+ dragging = false;
20629
+ refs3.button.releasePointerCapture?.(event.pointerId);
20630
+ if (!moved) {
20631
+ onClick();
20628
20632
  return;
20629
20633
  }
20630
- const caixa = refs3.raiz.getBoundingClientRect();
20631
- gravarPosicao({ x: caixa.left, y: caixa.top });
20634
+ const box = refs3.root.getBoundingClientRect();
20635
+ writePosition({ x: box.left, y: box.top });
20632
20636
  };
20633
- const aoTeclar = (evento) => {
20634
- if (evento.key !== "Enter" && evento.key !== " ") return;
20635
- evento.preventDefault();
20636
- aoClicar();
20637
+ const onKeyDown = (event) => {
20638
+ if (event.key !== "Enter" && event.key !== " ") return;
20639
+ event.preventDefault();
20640
+ onClick();
20637
20641
  };
20638
- const aoRedimensionar = () => {
20639
- const caixa = refs3.raiz.getBoundingClientRect();
20640
- if (refs3.raiz.style.left) aplicarPosicao(refs3.raiz, { x: caixa.left, y: caixa.top });
20642
+ const onResize = () => {
20643
+ const box = refs3.root.getBoundingClientRect();
20644
+ if (refs3.root.style.left) applyPosition(refs3.root, { x: box.left, y: box.top });
20641
20645
  };
20642
- refs3.botao.addEventListener("pointerdown", aoDescer);
20643
- refs3.botao.addEventListener("pointermove", aoMover);
20644
- refs3.botao.addEventListener("pointerup", aoSubir);
20645
- refs3.botao.addEventListener("pointercancel", aoSubir);
20646
- refs3.botao.addEventListener("keydown", aoTeclar);
20647
- window.addEventListener("resize", aoRedimensionar);
20646
+ refs3.button.addEventListener("pointerdown", onPointerDown);
20647
+ refs3.button.addEventListener("pointermove", onPointerMove2);
20648
+ refs3.button.addEventListener("pointerup", onPointerUp);
20649
+ refs3.button.addEventListener("pointercancel", onPointerUp);
20650
+ refs3.button.addEventListener("keydown", onKeyDown);
20651
+ window.addEventListener("resize", onResize);
20648
20652
  return () => {
20649
- refs3.botao.removeEventListener("pointerdown", aoDescer);
20650
- refs3.botao.removeEventListener("pointermove", aoMover);
20651
- refs3.botao.removeEventListener("pointerup", aoSubir);
20652
- refs3.botao.removeEventListener("pointercancel", aoSubir);
20653
- refs3.botao.removeEventListener("keydown", aoTeclar);
20654
- window.removeEventListener("resize", aoRedimensionar);
20653
+ refs3.button.removeEventListener("pointerdown", onPointerDown);
20654
+ refs3.button.removeEventListener("pointermove", onPointerMove2);
20655
+ refs3.button.removeEventListener("pointerup", onPointerUp);
20656
+ refs3.button.removeEventListener("pointercancel", onPointerUp);
20657
+ refs3.button.removeEventListener("keydown", onKeyDown);
20658
+ window.removeEventListener("resize", onResize);
20655
20659
  };
20656
20660
  }
20657
- function piscar() {
20661
+ function blink() {
20658
20662
  if (!refs2) return;
20659
- refs2.pulso.setAttribute("data-on", "true");
20660
- window.clearTimeout(timerPulso);
20661
- timerPulso = window.setTimeout(() => {
20662
- refs2?.pulso.setAttribute("data-on", "false");
20663
+ refs2.pulse.setAttribute("data-on", "true");
20664
+ window.clearTimeout(pulseTimer);
20665
+ pulseTimer = window.setTimeout(() => {
20666
+ refs2?.pulse.setAttribute("data-on", "false");
20663
20667
  }, 320);
20664
20668
  }
20665
- function atualizarContador() {
20669
+ function updateCounter() {
20666
20670
  if (!refs2) return;
20667
20671
  const total = instances.size;
20668
- const texto = total === 1 ? "1 component" : `${total} components`;
20669
- if (refs2.contador.textContent !== texto) refs2.contador.textContent = texto;
20672
+ const text = total === 1 ? "1 component" : `${total} components`;
20673
+ if (refs2.counter.textContent !== text) refs2.counter.textContent = text;
20670
20674
  }
20671
20675
  function mountDevtoolsWidget() {
20672
- if (montado || typeof document === "undefined" || !document.body) return;
20676
+ if (mounted || typeof document === "undefined" || !document.body) return;
20673
20677
  try {
20674
- if (sessionStorage.getItem(ESCONDIDO_KEY) === "1") return;
20678
+ if (sessionStorage.getItem(HIDDEN_KEY) === "1") return;
20675
20679
  } catch {
20676
20680
  }
20677
- montado = true;
20681
+ mounted = true;
20678
20682
  injectStyle("devtools-widget", WIDGET_CSS);
20679
- refs2 = construir();
20680
- const alternar = () => {
20681
- const ligado = xray();
20682
- refs2?.raiz.setAttribute("data-active", String(ligado));
20683
- refs2?.botao.setAttribute("aria-pressed", String(ligado));
20683
+ refs2 = build();
20684
+ const toggle = () => {
20685
+ const enabled2 = xray();
20686
+ refs2?.root.setAttribute("data-active", String(enabled2));
20687
+ refs2?.button.setAttribute("aria-pressed", String(enabled2));
20684
20688
  };
20685
- desligar.push(ligarArrasto(refs2, alternar));
20686
- const aoFechar = (evento) => {
20687
- evento.stopPropagation();
20689
+ teardown2.push(enableDrag(refs2, toggle));
20690
+ const onClose = (event) => {
20691
+ event.stopPropagation();
20688
20692
  try {
20689
- sessionStorage.setItem(ESCONDIDO_KEY, "1");
20693
+ sessionStorage.setItem(HIDDEN_KEY, "1");
20690
20694
  } catch {
20691
20695
  }
20692
20696
  unmountDevtoolsWidget();
20693
20697
  console.info("[Voodoo] devtools widget hidden. Use V.devtoolsWidget(true) to bring back.");
20694
20698
  };
20695
- refs2.fechar.addEventListener("click", aoFechar);
20696
- desligar.push(() => refs2?.fechar.removeEventListener("click", aoFechar));
20697
- const aoTeclarGlobal = () => {
20698
- const ligado = isXrayEnabled();
20699
- refs2?.raiz.setAttribute("data-active", String(ligado));
20700
- refs2?.botao.setAttribute("aria-pressed", String(ligado));
20699
+ refs2.close.addEventListener("click", onClose);
20700
+ teardown2.push(() => refs2?.close.removeEventListener("click", onClose));
20701
+ const onGlobalKeyUp = () => {
20702
+ const enabled2 = isXrayEnabled();
20703
+ refs2?.root.setAttribute("data-active", String(enabled2));
20704
+ refs2?.button.setAttribute("aria-pressed", String(enabled2));
20701
20705
  };
20702
- document.addEventListener("keyup", aoTeclarGlobal);
20703
- desligar.push(() => document.removeEventListener("keyup", aoTeclarGlobal));
20704
- for (const tipo of ["network", "event", "navigation", "update"]) {
20705
- desligar.push(devtoolsBus.on(tipo, piscar));
20706
+ document.addEventListener("keyup", onGlobalKeyUp);
20707
+ teardown2.push(() => document.removeEventListener("keyup", onGlobalKeyUp));
20708
+ for (const type of ["network", "event", "navigation", "update"]) {
20709
+ teardown2.push(devtoolsBus.on(type, blink));
20706
20710
  }
20707
- atualizarContador();
20708
- timerContador = window.setInterval(atualizarContador, 1e3);
20711
+ updateCounter();
20712
+ counterTimer = window.setInterval(updateCounter, 1e3);
20709
20713
  }
20710
20714
  function unmountDevtoolsWidget() {
20711
- if (!montado) return;
20712
- montado = false;
20713
- for (const fn of desligar.splice(0)) {
20715
+ if (!mounted) return;
20716
+ mounted = false;
20717
+ for (const fn of teardown2.splice(0)) {
20714
20718
  try {
20715
20719
  fn();
20716
20720
  } catch {
20717
20721
  }
20718
20722
  }
20719
- window.clearInterval(timerContador);
20720
- window.clearTimeout(timerPulso);
20721
- timerContador = 0;
20722
- timerPulso = 0;
20723
- refs2?.raiz.remove();
20723
+ window.clearInterval(counterTimer);
20724
+ window.clearTimeout(pulseTimer);
20725
+ counterTimer = 0;
20726
+ pulseTimer = 0;
20727
+ refs2?.root.remove();
20724
20728
  refs2 = null;
20725
20729
  }
20726
20730
  function isDevtoolsWidgetMounted() {
20727
- return montado;
20731
+ return mounted;
20728
20732
  }
20729
20733
  function devtoolsWidget(force) {
20730
- const alvo = force ?? !montado;
20731
- if (alvo) {
20734
+ const target2 = force ?? !mounted;
20735
+ if (target2) {
20732
20736
  try {
20733
- sessionStorage.removeItem(ESCONDIDO_KEY);
20737
+ sessionStorage.removeItem(HIDDEN_KEY);
20734
20738
  } catch {
20735
20739
  }
20736
20740
  mountDevtoolsWidget();
20737
20741
  } else {
20738
20742
  unmountDevtoolsWidget();
20739
20743
  }
20740
- return montado;
20744
+ return mounted;
20741
20745
  }
20742
20746
 
20743
20747
  // src/index.ts
@@ -22759,20 +22763,20 @@ function buildFrame2(gpu2, encoder, relogio) {
22759
22763
  };
22760
22764
  return frameObj;
22761
22765
  }
22762
- function frame(gpu2, build, relogio = EMPTY_CLOCK) {
22766
+ function frame(gpu2, build2, relogio = EMPTY_CLOCK) {
22763
22767
  if (!live(gpu2)) {
22764
- build(noFrame());
22768
+ build2(noFrame());
22765
22769
  return;
22766
22770
  }
22767
22771
  try {
22768
22772
  const encoder = gpu2.device.createCommandEncoder({ label: "voodoo-frame" });
22769
- build(buildFrame2(gpu2, encoder, relogio));
22773
+ build2(buildFrame2(gpu2, encoder, relogio));
22770
22774
  gpu2.queue.submit([encoder.finish()]);
22771
22775
  } catch (err) {
22772
22776
  handleError(err, "V.gpu.frame");
22773
22777
  }
22774
22778
  }
22775
- function frameLoop(gpu2, build) {
22779
+ function frameLoop(gpu2, build2) {
22776
22780
  if (!live(gpu2) || typeof requestAnimationFrame !== "function") return () => void 0;
22777
22781
  const relogio = clock();
22778
22782
  let handle = 0;
@@ -22781,7 +22785,7 @@ function frameLoop(gpu2, build) {
22781
22785
  handle = 0;
22782
22786
  if (!running || !live(gpu2)) return;
22783
22787
  relogio.tick(now2);
22784
- frame(gpu2, build, relogio);
22788
+ frame(gpu2, build2, relogio);
22785
22789
  if (running) handle = requestAnimationFrame(step2);
22786
22790
  };
22787
22791
  handle = requestAnimationFrame(step2);