@ckb-ccc/connector-react 0.0.9-alpha.2 → 0.0.10-alpha.0
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,7 +1,6 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/connector";
|
|
2
|
-
import { EventName } from "@lit/react";
|
|
3
2
|
export declare const Connector: import("@lit/react").ReactWebComponent<ccc.WebComponentConnector, {
|
|
4
|
-
onWillUpdate:
|
|
5
|
-
|
|
3
|
+
onWillUpdate: string;
|
|
4
|
+
onClose: string;
|
|
6
5
|
}>;
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAIzC,eAAO,MAAM,SAAS;;;EAQpB,CAAC"}
|
package/dist/components/index.js
CHANGED
package/dist/hooks/useCcc.js
CHANGED
|
@@ -26,7 +26,7 @@ export function Provider({ children, connectorProps, name, icon, signerFilter, d
|
|
|
26
26
|
wallet: ref?.wallet,
|
|
27
27
|
signerInfo: ref?.signer,
|
|
28
28
|
} },
|
|
29
|
-
React.createElement(Connector, { name: name, icon: icon, signerFilter: signerFilter, ref: setRef, onWillUpdate: () => setFlag((f) => f + 1),
|
|
29
|
+
React.createElement(Connector, { name: name, icon: icon, signerFilter: signerFilter, ref: setRef, onWillUpdate: () => setFlag((f) => f + 1), onClose: () => setIsOpen(false), preferredNetworks: preferredNetworks, ...connectorProps,
|
|
30
30
|
style: {
|
|
31
31
|
...connectorProps?.style,
|
|
32
32
|
zIndex: connectorProps?.style?.zIndex ?? 999,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckb-ccc/connector-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10-alpha.0",
|
|
4
4
|
"description": "CCC - CKBer's Codebase. Common Chains Connector UI Component for React",
|
|
5
5
|
"author": "Hanssen0 <hanssen0@hanssen0.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@ckb-ccc/connector": "0.0.
|
|
41
|
+
"@ckb-ccc/connector": "0.0.10-alpha.0",
|
|
42
42
|
"@lit/react": "^1.0.5",
|
|
43
43
|
"react": "^18"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "8a4c789419f5e12e1f230cead213c59373834a1a"
|
|
46
46
|
}
|
package/src/components/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { ccc } from "@ckb-ccc/connector";
|
|
4
|
-
import {
|
|
4
|
+
import { createComponent } from "@lit/react";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
|
|
7
7
|
export const Connector = createComponent({
|
|
@@ -9,7 +9,7 @@ export const Connector = createComponent({
|
|
|
9
9
|
elementClass: ccc.WebComponentConnector,
|
|
10
10
|
react: React,
|
|
11
11
|
events: {
|
|
12
|
-
onWillUpdate: "willUpdate"
|
|
13
|
-
|
|
12
|
+
onWillUpdate: "willUpdate",
|
|
13
|
+
onClose: "close",
|
|
14
14
|
},
|
|
15
15
|
});
|
package/src/hooks/useCcc.tsx
CHANGED
|
@@ -85,7 +85,7 @@ export function Provider({
|
|
|
85
85
|
signerFilter={signerFilter}
|
|
86
86
|
ref={setRef}
|
|
87
87
|
onWillUpdate={() => setFlag((f) => f + 1)}
|
|
88
|
-
|
|
88
|
+
onClose={() => setIsOpen(false)}
|
|
89
89
|
preferredNetworks={preferredNetworks}
|
|
90
90
|
{...{
|
|
91
91
|
...connectorProps,
|