@getpara/rainbowkit-wallet 2.0.0-dev.1 → 2.0.0-dev.3

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.
@@ -0,0 +1,5 @@
1
+ @import url('@getpara/react-sdk-lite/styles.css');
2
+
3
+ #para-modal > cpsl-auth-modal {
4
+ z-index: 9999999999;
5
+ }
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from '@getpara/react-sdk-lite';
1
2
  export * from './paraWallet.js';
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  "use client";
2
+ export * from "@getpara/react-sdk-lite";
2
3
  export * from "./paraWallet.js";
@@ -1,4 +1,4 @@
1
- import { ConstructorOpts, Environment, ParaModalProps } from '@getpara/react-sdk';
1
+ import ParaWeb, { ConstructorOpts, Environment, ParaModalProps } from '@getpara/react-sdk-lite';
2
2
  import type { Wallet } from '@rainbow-me/rainbowkit';
3
3
  import type { QueryClient } from '@tanstack/react-query';
4
4
  export interface GetParaOpts extends Partial<Omit<ParaModalProps, 'para'>> {
@@ -6,7 +6,7 @@ export interface GetParaOpts extends Partial<Omit<ParaModalProps, 'para'>> {
6
6
  environment?: Environment;
7
7
  apiKey: string;
8
8
  constructorOpts?: ConstructorOpts;
9
- };
9
+ } | ParaWeb;
10
10
  queryClient: QueryClient;
11
11
  appName: string;
12
12
  }
@@ -4,12 +4,19 @@ import {
4
4
  __objRest,
5
5
  __spreadValues
6
6
  } from "./chunk-WKEZUW5P.js";
7
- import ParaWeb from "@getpara/react-sdk";
7
+ import ParaWeb from "@getpara/react-sdk-lite";
8
8
  import { paraConnector } from "@getpara/wagmi-v2-integration";
9
9
  import { createConnector } from "wagmi";
10
10
  function getParaWallet(opts) {
11
11
  const _a = opts, { para, queryClient } = _a, modalProps = __objRest(_a, ["para", "queryClient"]);
12
- const paraClass = new ParaWeb(para.environment, para.apiKey, para.constructorOpts);
12
+ let paraClass;
13
+ if (opts.para instanceof ParaWeb) {
14
+ paraClass = opts.para;
15
+ } else if (para && typeof para === "object" && "apiKey" in para) {
16
+ paraClass = new ParaWeb(para.environment, para.apiKey, para.constructorOpts);
17
+ } else {
18
+ throw new Error("Invalid para configuration: must be either a ParaWeb instance or an object with apiKey");
19
+ }
13
20
  return (_opts) => ({
14
21
  id: "para",
15
22
  name: "Para",
package/package.json CHANGED
@@ -1,16 +1,21 @@
1
1
  {
2
2
  "name": "@getpara/rainbowkit-wallet",
3
- "version": "2.0.0-dev.1",
3
+ "version": "2.0.0-dev.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
7
7
  "sideEffects": false,
8
+ "exports": {
9
+ ".": "./dist/index.js",
10
+ "./styles.css": "./dist/css/modal.css"
11
+ },
8
12
  "scripts": {
9
- "build": "rm -rf dist && yarn typegen && node scripts/buildSVG.cjs && cp src/paraWalletImage.js dist && node ./scripts/build.mjs",
10
- "typegen": "tsc --emitDeclarationOnly"
13
+ "build": "rm -rf dist && yarn typegen && node scripts/buildSVG.cjs && cp src/paraWalletImage.js dist && node ./scripts/build.mjs && yarn post-build",
14
+ "typegen": "tsc --emitDeclarationOnly",
15
+ "post-build": "./scripts/post-build.sh"
11
16
  },
12
17
  "dependencies": {
13
- "@getpara/react-sdk": "2.0.0",
18
+ "@getpara/react-sdk-lite": "2.0.0",
14
19
  "@getpara/wagmi-v2-integration": "2.0.0"
15
20
  },
16
21
  "devDependencies": {