@swype-org/react-sdk 0.1.213 → 0.1.215

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
@@ -17,6 +17,19 @@ var __export = (target, all) => {
17
17
  __defProp(target, name, { get: all[name], enumerable: true });
18
18
  };
19
19
 
20
+ // src/contentsquare.ts
21
+ var SCRIPT_SRC = "https://t.contentsquare.net/uxa/9537de3817f8f.js";
22
+ var injected = false;
23
+ function loadContentsquare() {
24
+ if (injected) return;
25
+ if (typeof document === "undefined") return;
26
+ injected = true;
27
+ const script = document.createElement("script");
28
+ script.src = SCRIPT_SRC;
29
+ script.async = true;
30
+ document.head.appendChild(script);
31
+ }
32
+
20
33
  // src/theme.ts
21
34
  var darkTheme = {
22
35
  bg: "#071216",
@@ -97,6 +110,9 @@ function BlinkProvider({
97
110
  if (!queryClientRef.current) {
98
111
  queryClientRef.current = new reactQuery.QueryClient();
99
112
  }
113
+ react.useEffect(() => {
114
+ loadContentsquare();
115
+ }, []);
100
116
  const [depositAmount, setDepositAmountRaw] = react.useState(null);
101
117
  const setDepositAmount = react.useCallback((amount) => {
102
118
  setDepositAmountRaw(amount);
@@ -2510,32 +2526,20 @@ var rowStyle = {
2510
2526
  alignItems: "center",
2511
2527
  gap: 6
2512
2528
  };
2513
- function PrimaryButton({ children, onClick, href, disabled, loading, icon }) {
2529
+ function PrimaryButton({ children, onClick, disabled, loading, icon }) {
2514
2530
  const { tokens } = useBlinkConfig();
2515
2531
  const isDisabled = disabled || loading;
2516
- const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2517
- icon && /* @__PURE__ */ jsxRuntime.jsx("span", { style: iconWrapStyle, children: icon }),
2518
- loading ? "Please wait..." : children
2519
- ] });
2520
- if (href && !isDisabled) {
2521
- return /* @__PURE__ */ jsxRuntime.jsx(
2522
- "a",
2523
- {
2524
- href,
2525
- onClick,
2526
- style: linkButtonStyle(tokens),
2527
- children: content
2528
- }
2529
- );
2530
- }
2531
- return /* @__PURE__ */ jsxRuntime.jsx(
2532
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2532
2533
  "button",
2533
2534
  {
2534
2535
  type: "button",
2535
2536
  onClick,
2536
2537
  disabled: isDisabled,
2537
2538
  style: buttonStyle(tokens, isDisabled),
2538
- children: content
2539
+ children: [
2540
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { style: iconWrapStyle, children: icon }),
2541
+ loading ? "Please wait..." : children
2542
+ ]
2539
2543
  }
2540
2544
  );
2541
2545
  }
@@ -2558,10 +2562,6 @@ var buttonStyle = (tokens, disabled) => ({
2558
2562
  justifyContent: "center",
2559
2563
  gap: 8
2560
2564
  });
2561
- var linkButtonStyle = (tokens) => ({
2562
- ...buttonStyle(tokens, false),
2563
- textDecoration: "none"
2564
- });
2565
2565
  var iconWrapStyle = {
2566
2566
  display: "flex",
2567
2567
  alignItems: "center"
@@ -4999,13 +4999,10 @@ function OpenWalletScreen({
4999
4999
  {
5000
5000
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: footerContentStyle, children: [
5001
5001
  error && /* @__PURE__ */ jsxRuntime.jsx(InfoBanner, { children: error }),
5002
- !loading && (isCustomSchemeUri(deeplinkUri) ? /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { onClick: handleOpen, children: [
5003
- "Open ",
5004
- displayName
5005
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { href: deeplinkUri, children: [
5002
+ !loading && /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { onClick: handleOpen, children: [
5006
5003
  "Open ",
5007
5004
  displayName
5008
- ] })),
5005
+ ] }),
5009
5006
  error && onRetryStatus && /* @__PURE__ */ jsxRuntime.jsx(OutlineButton, { onClick: onRetryStatus, children: "Retry status check" }),
5010
5007
  /* @__PURE__ */ jsxRuntime.jsx("p", { style: hintStyle(tokens.textMuted), children: loading ? "Preparing authorization..." : error ? "Retry the status check after returning to the browser, or reopen your wallet if needed." : "If your wallet didn't open automatically, tap the button above" }),
5011
5008
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})