@novasamatech/host-papp-react-ui 0.7.5 → 0.7.7

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.
@@ -1,14 +1,14 @@
1
1
  import { jsx as a, jsxs as T } from "react/jsx-runtime";
2
2
  import { c as A } from "react/compiler-runtime";
3
3
  import * as x from "@radix-ui/react-popover";
4
- import { memo as K, useEffect as w } from "react";
4
+ import { memo as _, useEffect as w } from "react";
5
5
  import { useAuthStatus as G } from "../hooks/authStatus.js";
6
- import { useAuthentication as B } from "../providers/AuthProvider.js";
7
- import { useTranslations as $ } from "../providers/TranslationProvider.js";
6
+ import { useAuthentication as I } from "../providers/AuthProvider.js";
7
+ import { useTranslations as j } from "../providers/TranslationProvider.js";
8
8
  import { LogoSmall as M } from "../ui/LogoSmall.js";
9
9
  import { QrCode as Q } from "../ui/QrCode.js";
10
10
  import g from "./Pairing.module.css.js";
11
- const ie = K((o) => {
11
+ const ie = _((o) => {
12
12
  const e = A(46), {
13
13
  theme: n,
14
14
  size: c,
@@ -17,25 +17,23 @@ const ie = K((o) => {
17
17
  alignOffset: s,
18
18
  sizeOffset: p,
19
19
  children: l
20
- } = o, m = n === void 0 ? "dark" : n, f = c === void 0 ? 240 : c, v = p === void 0 ? 4 : p, d = B(), {
20
+ } = o, m = n === void 0 ? "dark" : n, d = c === void 0 ? 240 : c, v = p === void 0 ? 4 : p, f = I(), {
21
21
  status: t
22
- } = G(), I = typeof process < "u" && process.env?.STORYBOOK === "true", H = d.authUIMode === "popover" && (I || t.step !== "none");
23
- let b;
24
- e[0] !== d || e[1] !== t.step ? (b = () => {
25
- t.step === "none" && d.authenticate("popover");
26
- }, e[0] = d, e[1] = t.step, e[2] = b) : b = e[2];
27
- const R = b;
22
+ } = G(), K = typeof process < "u" && process.env?.STORYBOOK === "true", H = f.authUIMode === "popover" && (K || t.step !== "none");
28
23
  let D;
29
- e[3] !== d || e[4] !== t.step ? (D = (E) => {
30
- !E && t.step !== "attestation" && d.abortAuthentication();
31
- }, e[3] = d, e[4] = t.step, e[5] = D) : D = e[5];
32
- const _ = D;
33
- let z;
34
- e[6] !== d ? (z = () => () => {
35
- d.abortAuthentication();
36
- }, e[6] = d, e[7] = z) : z = e[7];
37
- let W;
38
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (W = [], e[8] = W) : W = e[8], w(z, W);
24
+ e[0] !== f || e[1] !== t.step ? (D = () => {
25
+ t.step === "none" && f.authenticate("popover");
26
+ }, e[0] = f, e[1] = t.step, e[2] = D) : D = e[2];
27
+ const R = D;
28
+ let b;
29
+ e[3] !== f || e[4] !== t.step ? (b = (E) => {
30
+ !E && t.step !== "attestation" && f.abortAuthentication();
31
+ }, e[3] = f, e[4] = t.step, e[5] = b) : b = e[5];
32
+ const $ = b;
33
+ let z, W;
34
+ e[6] !== f ? (z = () => () => {
35
+ f.abortAuthentication();
36
+ }, W = [f], e[6] = f, e[7] = z, e[8] = W) : (z = e[7], W = e[8]), w(z, W);
39
37
  let h;
40
38
  e[9] !== l || e[10] !== R ? (h = /* @__PURE__ */ a(x.Trigger, { asChild: !0, onClick: R, children: l }), e[9] = l, e[10] = R, e[11] = h) : h = e[11];
41
39
  let u, P;
@@ -45,13 +43,13 @@ const ie = K((o) => {
45
43
  t.step === "attestation" && E.preventDefault();
46
44
  }, e[12] = t.step, e[13] = u, e[14] = P) : (u = e[13], P = e[14]);
47
45
  let y;
48
- e[15] !== f || e[16] !== t.payload || e[17] !== t.step || e[18] !== m ? (y = t.step === "pairing" && /* @__PURE__ */ a(U, { theme: m, size: f, payload: t.payload }), e[15] = f, e[16] = t.payload, e[17] = t.step, e[18] = m, e[19] = y) : y = e[19];
46
+ e[15] !== d || e[16] !== t.payload || e[17] !== t.step || e[18] !== m ? (y = t.step === "pairing" && /* @__PURE__ */ a(U, { theme: m, size: d, payload: t.payload }), e[15] = d, e[16] = t.payload, e[17] = t.step, e[18] = m, e[19] = y) : y = e[19];
49
47
  let N;
50
- e[20] !== t.message || e[21] !== t.step ? (N = t.step === "pairingError" && /* @__PURE__ */ a(j, { message: t.message }), e[20] = t.message, e[21] = t.step, e[22] = N) : N = e[22];
48
+ e[20] !== t.message || e[21] !== t.step ? (N = t.step === "pairingError" && /* @__PURE__ */ a(B, { message: t.message }), e[20] = t.message, e[21] = t.step, e[22] = N) : N = e[22];
51
49
  let C;
52
50
  e[23] !== t.step ? (C = t.step === "attestation" && /* @__PURE__ */ a(Y, {}), e[23] = t.step, e[24] = C) : C = e[24];
53
51
  let S;
54
- e[25] !== t.message || e[26] !== t.step ? (S = t.step === "attestationError" && /* @__PURE__ */ a(j, { message: t.message }), e[25] = t.message, e[26] = t.step, e[27] = S) : S = e[27];
52
+ e[25] !== t.message || e[26] !== t.step ? (S = t.step === "attestationError" && /* @__PURE__ */ a(B, { message: t.message }), e[25] = t.message, e[26] = t.step, e[27] = S) : S = e[27];
55
53
  let L;
56
54
  e[28] !== y || e[29] !== N || e[30] !== C || e[31] !== S ? (L = /* @__PURE__ */ T("div", { className: g.popoverContainer, children: [
57
55
  y,
@@ -62,33 +60,33 @@ const ie = K((o) => {
62
60
  let O;
63
61
  e[33] !== i || e[34] !== s || e[35] !== r || e[36] !== v || e[37] !== u || e[38] !== L || e[39] !== P ? (O = /* @__PURE__ */ a(x.Portal, { children: /* @__PURE__ */ a(x.Content, { side: r, align: i, sideOffset: v, alignOffset: s, className: g.popoverContent, onInteractOutside: P, onEscapeKeyDown: u, children: L }) }), e[33] = i, e[34] = s, e[35] = r, e[36] = v, e[37] = u, e[38] = L, e[39] = P, e[40] = O) : O = e[40];
64
62
  let k;
65
- return e[41] !== H || e[42] !== O || e[43] !== h || e[44] !== _ ? (k = /* @__PURE__ */ T(x.Root, { open: H, onOpenChange: _, children: [
63
+ return e[41] !== H || e[42] !== O || e[43] !== h || e[44] !== $ ? (k = /* @__PURE__ */ T(x.Root, { open: H, onOpenChange: $, children: [
66
64
  h,
67
65
  O
68
- ] }), e[41] = H, e[42] = O, e[43] = h, e[44] = _, e[45] = k) : k = e[45], k;
66
+ ] }), e[41] = H, e[42] = O, e[43] = h, e[44] = $, e[45] = k) : k = e[45], k;
69
67
  }), U = (o) => {
70
68
  const e = A(15), {
71
69
  payload: n,
72
70
  size: c,
73
71
  theme: i
74
- } = o, r = i === void 0 ? "light" : i, s = $();
72
+ } = o, r = i === void 0 ? "light" : i, s = j();
75
73
  let p;
76
74
  e[0] !== s.pairingPopoverWelcome ? (p = /* @__PURE__ */ a("span", { className: g.pairingPopoverHeader, children: s.pairingPopoverWelcome }), e[0] = s.pairingPopoverWelcome, e[1] = p) : p = e[1];
77
75
  let l;
78
76
  e[2] !== n || e[3] !== c || e[4] !== r ? (l = /* @__PURE__ */ a(Q, { value: n, size: c, theme: r }), e[2] = n, e[3] = c, e[4] = r, e[5] = l) : l = e[5];
79
77
  let m;
80
78
  e[6] !== s.pairingPopoverLoginHeading ? (m = /* @__PURE__ */ a("span", { className: g.scanCallToActionPopover, children: s.pairingPopoverLoginHeading }), e[6] = s.pairingPopoverLoginHeading, e[7] = m) : m = e[7];
81
- let f;
82
- e[8] !== s.pairingPopoverScanDescription ? (f = /* @__PURE__ */ a("span", { className: g.pairingDescriptionPopover, children: s.pairingPopoverScanDescription }), e[8] = s.pairingPopoverScanDescription, e[9] = f) : f = e[9];
79
+ let d;
80
+ e[8] !== s.pairingPopoverScanDescription ? (d = /* @__PURE__ */ a("span", { className: g.pairingDescriptionPopover, children: s.pairingPopoverScanDescription }), e[8] = s.pairingPopoverScanDescription, e[9] = d) : d = e[9];
83
81
  let v;
84
- return e[10] !== p || e[11] !== l || e[12] !== m || e[13] !== f ? (v = /* @__PURE__ */ T("div", { className: g.pairingPopoverContainer, children: [
82
+ return e[10] !== p || e[11] !== l || e[12] !== m || e[13] !== d ? (v = /* @__PURE__ */ T("div", { className: g.pairingPopoverContainer, children: [
85
83
  p,
86
84
  l,
87
85
  m,
88
- f
89
- ] }), e[10] = p, e[11] = l, e[12] = m, e[13] = f, e[14] = v) : v = e[14], v;
86
+ d
87
+ ] }), e[10] = p, e[11] = l, e[12] = m, e[13] = d, e[14] = v) : v = e[14], v;
90
88
  }, Y = () => {
91
- const o = A(8), e = $();
89
+ const o = A(8), e = j();
92
90
  let n;
93
91
  o[0] !== e.pairingPopoverWelcome ? (n = /* @__PURE__ */ a("span", { className: g.pairingPopoverHeader, children: e.pairingPopoverWelcome }), o[0] = e.pairingPopoverWelcome, o[1] = n) : n = o[1];
94
92
  let c;
@@ -101,10 +99,10 @@ const ie = K((o) => {
101
99
  c,
102
100
  i
103
101
  ] }), o[5] = n, o[6] = i, o[7] = r) : r = o[7], r;
104
- }, j = (o) => {
102
+ }, B = (o) => {
105
103
  const e = A(13), {
106
104
  message: n
107
- } = o, c = B(), i = $();
105
+ } = o, c = I(), i = j();
108
106
  let r;
109
107
  e[0] !== i.pairingError ? (r = /* @__PURE__ */ a("span", { className: g.errorTitlePopover, children: i.pairingError }), e[0] = i.pairingError, e[1] = r) : r = e[1];
110
108
  let s;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@novasamatech/host-papp-react-ui",
3
3
  "type": "module",
4
- "version": "0.7.5",
4
+ "version": "0.7.7",
5
5
  "description": "Polkadot app UI Flow",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -30,8 +30,8 @@
30
30
  "react-dom": ">=18"
31
31
  },
32
32
  "dependencies": {
33
- "@novasamatech/host-papp": "0.7.5",
34
- "@novasamatech/statement-store": "0.7.5",
33
+ "@novasamatech/host-papp": "0.7.7",
34
+ "@novasamatech/statement-store": "0.7.7",
35
35
  "@polkadot-api/utils": "^0.4.0",
36
36
  "@radix-ui/react-dialog": "1.1.15",
37
37
  "@radix-ui/react-popover": "1.1.15",