@getpara/wagmi-v2-integration 2.0.0-dev.14 → 2.0.0-dev.2
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/connectorModal.d.ts +1 -4
- package/dist/index.js +15 -20
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/paraConnector.d.ts +1 -3
- package/package.json +3 -4
package/dist/connectorModal.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import ParaWeb from '@getpara/react-sdk';
|
|
2
2
|
import { ParaModalPropsForInit } from './paraConnector.js';
|
|
3
|
-
|
|
4
|
-
export declare function renderModal(para: ParaWeb, modalProps: Partial<ParaModalPropsForInit>, onCloseArg: () => void, queryClient: QueryClient): {
|
|
5
|
-
openModal: () => void;
|
|
6
|
-
};
|
|
3
|
+
export declare function renderModal(para: ParaWeb, modalProps: Partial<ParaModalPropsForInit>, onCloseArg: () => void): void;
|
package/dist/index.js
CHANGED
|
@@ -52,17 +52,19 @@ var __async = (__this, __arguments, generator) => {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
// src/paraConnector.ts
|
|
55
|
+
import { setIsOpen as setIsOpen2 } from "@getpara/react-sdk";
|
|
55
56
|
import { createParaConnector } from "@getpara/wagmi-v2-connector";
|
|
56
57
|
|
|
57
58
|
// src/connectorModal.tsx
|
|
58
59
|
import { ParaProvider, setIsOpen } from "@getpara/react-sdk";
|
|
59
|
-
import { QueryClientProvider } from "@tanstack/react-query";
|
|
60
60
|
import { jsx } from "react/jsx-runtime";
|
|
61
61
|
var Root;
|
|
62
|
-
function renderModal(para, modalProps, onCloseArg
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
function renderModal(para, modalProps, onCloseArg) {
|
|
63
|
+
const existingContainer = document.getElementById("para-modal");
|
|
64
|
+
const container = existingContainer != null ? existingContainer : document.createElement("div");
|
|
65
|
+
container.id = "para-modal";
|
|
66
|
+
if (!existingContainer) {
|
|
67
|
+
document.body.appendChild(container);
|
|
66
68
|
}
|
|
67
69
|
const onClose = () => {
|
|
68
70
|
onCloseArg();
|
|
@@ -71,21 +73,14 @@ function renderModal(para, modalProps, onCloseArg, queryClient) {
|
|
|
71
73
|
};
|
|
72
74
|
const render = () => __async(this, null, function* () {
|
|
73
75
|
var _a;
|
|
74
|
-
|
|
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
|
-
}
|
|
81
|
-
const Modal = /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(
|
|
76
|
+
const Modal = /* @__PURE__ */ jsx(
|
|
82
77
|
ParaProvider,
|
|
83
78
|
{
|
|
84
79
|
paraClientConfig: para,
|
|
85
80
|
config: { appName: (_a = modalProps.appName) != null ? _a : "" },
|
|
86
81
|
paraModalConfig: __spreadProps(__spreadValues({}, modalProps), { onClose })
|
|
87
82
|
}
|
|
88
|
-
)
|
|
83
|
+
);
|
|
89
84
|
try {
|
|
90
85
|
const client = yield import("react-dom/client");
|
|
91
86
|
if (!Root) {
|
|
@@ -98,7 +93,6 @@ function renderModal(para, modalProps, onCloseArg, queryClient) {
|
|
|
98
93
|
}
|
|
99
94
|
});
|
|
100
95
|
render();
|
|
101
|
-
return { openModal: () => setIsOpen(true) };
|
|
102
96
|
}
|
|
103
97
|
|
|
104
98
|
// src/paraConnector.ts
|
|
@@ -113,8 +107,7 @@ var paraConnector = (_a) => {
|
|
|
113
107
|
nameOverride,
|
|
114
108
|
idOverride,
|
|
115
109
|
transports,
|
|
116
|
-
appName
|
|
117
|
-
queryClient
|
|
110
|
+
appName
|
|
118
111
|
} = _b, modalProps = __objRest(_b, [
|
|
119
112
|
"para",
|
|
120
113
|
"chains",
|
|
@@ -125,8 +118,7 @@ var paraConnector = (_a) => {
|
|
|
125
118
|
"nameOverride",
|
|
126
119
|
"idOverride",
|
|
127
120
|
"transports",
|
|
128
|
-
"appName"
|
|
129
|
-
"queryClient"
|
|
121
|
+
"appName"
|
|
130
122
|
]);
|
|
131
123
|
return createParaConnector({
|
|
132
124
|
para,
|
|
@@ -139,7 +131,10 @@ var paraConnector = (_a) => {
|
|
|
139
131
|
idOverride,
|
|
140
132
|
transports,
|
|
141
133
|
appName,
|
|
142
|
-
renderModal: (onClose) => renderModal(para, __spreadProps(__spreadValues({}, modalProps), { appName }), onClose,
|
|
134
|
+
renderModal: (onClose) => renderModal(para, __spreadProps(__spreadValues({}, modalProps), { appName }), onClose),
|
|
135
|
+
openModal: () => {
|
|
136
|
+
setIsOpen2(true);
|
|
137
|
+
}
|
|
143
138
|
});
|
|
144
139
|
};
|
|
145
140
|
export {
|
package/dist/index.js.br
CHANGED
|
Binary file
|
package/dist/index.js.gz
CHANGED
|
Binary file
|
package/dist/paraConnector.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ParaModalProps } from '@getpara/react-sdk';
|
|
2
2
|
import { ParaConnectorOpts as ParaConnectorOptsBase } from '@getpara/wagmi-v2-connector';
|
|
3
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
4
3
|
export type ParaModalPropsForInit = Omit<ParaModalProps, 'isOpen' | 'para'> & {
|
|
5
4
|
appName: string;
|
|
6
|
-
queryClient: QueryClient;
|
|
7
5
|
};
|
|
8
6
|
type ParaConnectorOpts = Partial<ParaModalPropsForInit> & ParaConnectorOptsBase;
|
|
9
|
-
export declare const paraConnector: ({ para, chains: _chains, disableModal, storageOverride, options, iconOverride, nameOverride, idOverride, transports, appName,
|
|
7
|
+
export declare const paraConnector: ({ para, chains: _chains, disableModal, storageOverride, options, iconOverride, nameOverride, idOverride, transports, appName, ...modalProps }: ParaConnectorOpts) => import("wagmi").CreateConnectorFn<unknown, {
|
|
10
8
|
type: string;
|
|
11
9
|
name: string;
|
|
12
10
|
icon: string;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/wagmi-v2-integration",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@getpara/react-sdk": "2.0.0-dev.
|
|
10
|
-
"@getpara/wagmi-v2-connector": "2.0.0-dev.
|
|
9
|
+
"@getpara/react-sdk": "2.0.0-dev.1",
|
|
10
|
+
"@getpara/wagmi-v2-connector": "2.0.0-dev.1"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"typescript": "5.1.6"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@tanstack/react-query": ">=5.0.0",
|
|
21
20
|
"react": "*",
|
|
22
21
|
"react-dom": "*"
|
|
23
22
|
},
|