@quanta-intellect/vessel-browser 0.1.45 → 0.1.46

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.
@@ -2763,16 +2763,30 @@ function getElementRole(el) {
2763
2763
  function getElementDescription(el) {
2764
2764
  return getTrimmedText(el.getAttribute("aria-description")) || getNodeTextByIds(el.getAttribute("aria-describedby")) || getTrimmedText(el.getAttribute("title")) || void 0;
2765
2765
  }
2766
- function getElementValue(el) {
2767
- if (el instanceof HTMLSelectElement) {
2768
- return getTrimmedText(el.value);
2766
+ function shouldExposeFieldValue(el) {
2767
+ if (!(el instanceof HTMLInputElement)) {
2768
+ return false;
2769
2769
  }
2770
+ const type = (el.type || "").toLowerCase();
2771
+ if (type !== "number") {
2772
+ return false;
2773
+ }
2774
+ const label = getInputLabelWithSource(el).label;
2775
+ const signals = [
2776
+ el.name,
2777
+ el.id,
2778
+ el.getAttribute("placeholder"),
2779
+ el.getAttribute("aria-label"),
2780
+ label
2781
+ ].filter(Boolean).join(" ").toLowerCase();
2782
+ return /\b(qty|quantity|count|items?)\b/.test(signals);
2783
+ }
2784
+ function getElementValue(el) {
2770
2785
  if (el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement) {
2771
- if (el.type === "password") return void 0;
2772
- if (el.type === "checkbox" || el.type === "radio") {
2786
+ if (el.type === "password" || el.type === "checkbox" || el.type === "radio") {
2773
2787
  return void 0;
2774
2788
  }
2775
- return getTrimmedText(el.value);
2789
+ return shouldExposeFieldValue(el) ? getTrimmedText(el.value) : void 0;
2776
2790
  }
2777
2791
  return void 0;
2778
2792
  }
@@ -82,7 +82,8 @@ const Channels = {
82
82
  HISTORY_UPDATE: "history:update",
83
83
  // Premium
84
84
  PREMIUM_GET_STATE: "premium:get-state",
85
- PREMIUM_ACTIVATE: "premium:activate",
85
+ PREMIUM_ACTIVATION_START: "premium:activation-start",
86
+ PREMIUM_ACTIVATION_VERIFY: "premium:activation-verify",
86
87
  PREMIUM_CHECKOUT: "premium:checkout",
87
88
  PREMIUM_PORTAL: "premium:portal",
88
89
  PREMIUM_RESET: "premium:reset",
@@ -285,7 +286,13 @@ const api = {
285
286
  },
286
287
  premium: {
287
288
  getState: () => electron.ipcRenderer.invoke(Channels.PREMIUM_GET_STATE),
288
- activate: (email) => electron.ipcRenderer.invoke(Channels.PREMIUM_ACTIVATE, email),
289
+ requestCode: (email) => electron.ipcRenderer.invoke(Channels.PREMIUM_ACTIVATION_START, email),
290
+ verifyCode: (email, code, challengeToken) => electron.ipcRenderer.invoke(
291
+ Channels.PREMIUM_ACTIVATION_VERIFY,
292
+ email,
293
+ code,
294
+ challengeToken
295
+ ),
289
296
  checkout: (email) => electron.ipcRenderer.invoke(Channels.PREMIUM_CHECKOUT, email),
290
297
  portal: () => electron.ipcRenderer.invoke(Channels.PREMIUM_PORTAL),
291
298
  reset: () => electron.ipcRenderer.invoke(Channels.PREMIUM_RESET),