@reef-knot/wallet-adapter-dapp-browser-injected 4.2.0 → 5.0.0-alpha.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/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import 'viem/window';
1
2
  import { WalletAdapterType } from '@reef-knot/types';
2
3
  export declare const id = "dappBrowserInjected";
3
4
  export declare const name = "DAppBrowser";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIrD,eAAO,MAAM,EAAE,wBAAwB,CAAC;AACxC,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAWlC,eAAO,MAAM,mBAAmB,EAAE,iBAOhC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIrD,eAAO,MAAM,EAAE,wBAAwB,CAAC;AACxC,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAWlC,eAAO,MAAM,mBAAmB,EAAE,iBAOhC,CAAC"}
package/dist/index.js CHANGED
@@ -1,28 +1,23 @@
1
- import { injected } from 'wagmi/connectors';
2
- import { isMobileOrTablet } from '@reef-knot/wallets-helpers';
1
+ import "viem/window";
2
+ import { injected } from "wagmi/connectors";
3
+ import { isMobileOrTablet } from "@reef-knot/wallets-helpers";
3
4
 
4
- const id = 'dappBrowserInjected';
5
- const name = 'DAppBrowser';
6
- const getDAppBrowserInjectedConnector = () => injected({
7
- target: () => ({
8
- id,
9
- name,
10
- provider: () => {
11
- var _a;
12
- return (_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.ethereum;
13
- }
14
- })
15
- });
5
+ //#region src/index.ts
6
+ const id = "dappBrowserInjected";
7
+ const name = "DAppBrowser";
8
+ const getDAppBrowserInjectedConnector = () => injected({ target: () => ({
9
+ id,
10
+ name,
11
+ provider: () => globalThis.window?.ethereum
12
+ }) });
16
13
  const DAppBrowserInjected = () => ({
17
- walletName: name,
18
- walletId: id,
19
- type: injected.type,
20
- autoConnectOnly: true,
21
- detector: () => {
22
- var _a;
23
- return !!((_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.ethereum) && isMobileOrTablet;
24
- },
25
- createConnectorFn: getDAppBrowserInjectedConnector()
14
+ walletName: name,
15
+ walletId: id,
16
+ type: injected.type,
17
+ autoConnectOnly: true,
18
+ detector: () => !!globalThis.window?.ethereum && isMobileOrTablet,
19
+ createConnectorFn: getDAppBrowserInjectedConnector()
26
20
  });
27
21
 
28
- export { DAppBrowserInjected, id, name };
22
+ //#endregion
23
+ export { DAppBrowserInjected, id, name };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/wallet-adapter-dapp-browser-injected",
3
- "version": "4.2.0",
3
+ "version": "5.0.0-alpha.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "https://github.com/lidofinance/reef-knot.git",
27
+ "url": "git+https://github.com/lidofinance/reef-knot.git",
28
28
  "directory": "packages/wallets/dappBrowserInjected"
29
29
  },
30
30
  "publishConfig": {
@@ -32,20 +32,21 @@
32
32
  "access": "public"
33
33
  },
34
34
  "scripts": {
35
- "build": "rollup -c",
36
- "dev": "dev=on rollup -c -w",
37
- "lint": "eslint --ext ts,tsx,js,mjs ."
35
+ "build": "yarn run -T tsdown",
36
+ "dev": "yarn run -T tsdown --watch",
37
+ "lint": "eslint --ext ts,tsx,js,mjs .",
38
+ "typecheck": "tsc --noEmit"
38
39
  },
39
40
  "devDependencies": {
40
- "@reef-knot/types": "4.2.0",
41
- "@reef-knot/wallets-helpers": "2.3.0",
42
- "@svgr/rollup": "^6.5.1",
41
+ "@reef-knot/types": "5.0.0-alpha.2",
42
+ "@reef-knot/wallets-helpers": "3.0.0-alpha.2",
43
+ "build-config": "*",
43
44
  "eslint-config-custom": "*"
44
45
  },
45
46
  "peerDependencies": {
46
- "@reef-knot/types": "4.2.0",
47
- "@reef-knot/wallets-helpers": "2.3.0",
47
+ "@reef-knot/types": "5.0.0-alpha.2",
48
+ "@reef-knot/wallets-helpers": "3.0.0-alpha.2",
48
49
  "@tanstack/react-query": "^5.29.0",
49
- "wagmi": ">=2.14"
50
+ "wagmi": ">=3.3"
50
51
  }
51
52
  }