@getpara/wagmi-v2-integration 2.0.0-dev.13 → 2.0.0-dev.15

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,6 +1,6 @@
1
1
  import ParaWeb from '@getpara/react-sdk';
2
- import { ParaModalPropsForInit } from './paraConnector.js';
3
- import { QueryClient } from '@tanstack/react-query';
2
+ import { type ParaModalPropsForInit } from './paraConnector.js';
3
+ import { type QueryClient } from '@tanstack/react-query';
4
4
  export declare function renderModal(para: ParaWeb, modalProps: Partial<ParaModalPropsForInit>, onCloseArg: () => void, queryClient: QueryClient): {
5
5
  openModal: () => void;
6
6
  };
package/dist/index.js CHANGED
@@ -55,19 +55,13 @@ var __async = (__this, __arguments, generator) => {
55
55
  import { createParaConnector } from "@getpara/wagmi-v2-connector";
56
56
 
57
57
  // src/connectorModal.tsx
58
- import { ParaProvider, setIsOpen } from "@getpara/react-sdk";
59
- import { QueryClientProvider } from "@tanstack/react-query";
58
+ import { setIsOpen } from "@getpara/react-sdk";
60
59
  import { jsx } from "react/jsx-runtime";
61
60
  var Root;
62
61
  function renderModal(para, modalProps, onCloseArg, queryClient) {
63
- if (typeof document === "undefined") {
64
- return { openModal: () => setIsOpen(true) };
65
- }
66
- const existingContainer = document.getElementById("para-modal");
67
- const container = existingContainer != null ? existingContainer : document.createElement("div");
68
- container.id = "para-modal";
69
- if (!existingContainer) {
70
- document.body.insertAdjacentElement("beforeend", container);
62
+ if (typeof window === "undefined") {
63
+ return { openModal: () => {
64
+ } };
71
65
  }
72
66
  const onClose = () => {
73
67
  onCloseArg();
@@ -76,6 +70,14 @@ function renderModal(para, modalProps, onCloseArg, queryClient) {
76
70
  };
77
71
  const render = () => __async(this, null, function* () {
78
72
  var _a;
73
+ const { ParaProvider } = yield import("@getpara/react-sdk");
74
+ const { QueryClientProvider } = yield import("@tanstack/react-query");
75
+ const existingContainer = document.getElementById("para-modal");
76
+ const container = existingContainer != null ? existingContainer : document.createElement("div");
77
+ container.id = "para-modal";
78
+ if (!existingContainer) {
79
+ document.body.insertAdjacentElement("beforeend", container);
80
+ }
79
81
  const Modal = /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(
80
82
  ParaProvider,
81
83
  {
package/dist/index.js.br CHANGED
Binary file
package/dist/index.js.gz CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/wagmi-v2-integration",
3
- "version": "2.0.0-dev.13",
3
+ "version": "2.0.0-dev.15",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",