@ckb-ccc/connector 0.0.9-alpha.1 → 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.
- package/dist/assets/chains/index.d.ts +1 -0
- package/dist/assets/chains/index.d.ts.map +1 -1
- package/dist/assets/chains/index.js +1 -0
- package/dist/barrel.d.ts +2 -1
- package/dist/barrel.d.ts.map +1 -1
- package/dist/barrel.js +2 -1
- package/dist/components/button-pill.d.ts +7 -0
- package/dist/components/button-pill.d.ts.map +1 -0
- package/dist/components/button-pill.js +54 -0
- package/dist/components/button.d.ts +7 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +60 -0
- package/dist/components/copy-button.d.ts +10 -0
- package/dist/components/copy-button.d.ts.map +1 -0
- package/dist/components/copy-button.js +76 -0
- package/dist/components/dialog.d.ts +8 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +103 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +4 -0
- package/dist/connector/index.d.ts +8 -21
- package/dist/connector/index.d.ts.map +1 -1
- package/dist/connector/index.js +59 -496
- package/dist/scenes/connected.d.ts +12 -1
- package/dist/scenes/connected.d.ts.map +1 -1
- package/dist/scenes/connected.js +204 -59
- package/dist/scenes/index.d.ts +2 -3
- package/dist/scenes/index.d.ts.map +1 -1
- package/dist/scenes/index.js +2 -3
- package/dist/scenes/{connecting.d.ts → selecting/connecting.d.ts} +1 -1
- package/dist/scenes/selecting/connecting.d.ts.map +1 -0
- package/dist/scenes/{connecting.js → selecting/connecting.js} +5 -5
- package/dist/scenes/selecting/index.d.ts +19 -0
- package/dist/scenes/selecting/index.d.ts.map +1 -0
- package/dist/scenes/selecting/index.js +164 -0
- package/dist/scenes/{signers.d.ts → selecting/signers.d.ts} +1 -1
- package/dist/scenes/selecting/signers.d.ts.map +1 -0
- package/dist/scenes/{signers.js → selecting/signers.js} +6 -7
- package/dist/scenes/{wallets.d.ts → selecting/wallets.d.ts} +1 -1
- package/dist/scenes/selecting/wallets.d.ts.map +1 -0
- package/dist/scenes/{wallets.js → selecting/wallets.js} +3 -3
- package/dist/signers/index.d.ts +28 -0
- package/dist/signers/index.d.ts.map +1 -0
- package/dist/signers/index.js +104 -0
- package/package.json +3 -3
- package/src/assets/chains/index.ts +1 -0
- package/src/barrel.ts +3 -1
- package/src/components/button-pill.ts +48 -0
- package/src/components/button.ts +54 -0
- package/src/components/copy-button.ts +69 -0
- package/src/components/dialog.ts +97 -0
- package/src/components/index.ts +4 -0
- package/src/connector/index.ts +67 -596
- package/src/scenes/connected.ts +197 -68
- package/src/scenes/index.ts +2 -3
- package/src/scenes/{connecting.ts → selecting/connecting.ts} +6 -6
- package/src/scenes/selecting/index.ts +181 -0
- package/src/scenes/{signers.ts → selecting/signers.ts} +7 -8
- package/src/scenes/{wallets.ts → selecting/wallets.ts} +4 -4
- package/src/signers/index.ts +186 -0
- package/dist/assets/chains/ckb.sm.svg.d.ts +0 -2
- package/dist/assets/chains/ckb.sm.svg.d.ts.map +0 -1
- package/dist/assets/chains/ckb.sm.svg.js +0 -2
- package/dist/assets/copy.svg.d.ts +0 -2
- package/dist/assets/copy.svg.d.ts.map +0 -1
- package/dist/assets/copy.svg.js +0 -2
- package/dist/events/index.d.ts +0 -7
- package/dist/events/index.d.ts.map +0 -1
- package/dist/events/index.js +0 -10
- package/dist/scenes/connecting.d.ts.map +0 -1
- package/dist/scenes/signers.d.ts.map +0 -1
- package/dist/scenes/wallets.d.ts.map +0 -1
- package/src/assets/chains/ckb.sm.svg.ts +0 -5
- package/src/assets/copy.svg.ts +0 -5
- package/src/events/index.ts +0 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assets/chains/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assets/chains/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
package/dist/barrel.d.ts
CHANGED
package/dist/barrel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barrel.d.ts","sourceRoot":"","sources":["../src/barrel.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"barrel.d.ts","sourceRoot":"","sources":["../src/barrel.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAE5B,OAAO,cAAc,CAAC;AACtB,OAAO,UAAU,CAAC"}
|
package/dist/barrel.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-pill.d.ts","sourceRoot":"","sources":["../../src/components/button-pill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAG5C,qBACa,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAC,MAAM,0BAiCX;IAEF,OAAO;IAIP,MAAM;CAGP"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, LitElement } from "lit";
|
|
8
|
+
import { customElement } from "lit/decorators.js";
|
|
9
|
+
let ButtonPill = class ButtonPill extends LitElement {
|
|
10
|
+
updated() {
|
|
11
|
+
this.dispatchEvent(new Event("updated", { bubbles: true, composed: true }));
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return html `<button><slot></slot></button>`;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
ButtonPill.styles = css `
|
|
18
|
+
button {
|
|
19
|
+
background: none;
|
|
20
|
+
color: inherit;
|
|
21
|
+
border: none;
|
|
22
|
+
padding: 0;
|
|
23
|
+
font: inherit;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
outline: inherit;
|
|
26
|
+
|
|
27
|
+
width: 100%;
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
padding: 0.25rem 1rem;
|
|
31
|
+
background: var(--btn-secondary);
|
|
32
|
+
border-radius: 9999px;
|
|
33
|
+
transition: background 0.15s ease-in-out;
|
|
34
|
+
}
|
|
35
|
+
button:hover {
|
|
36
|
+
background: var(--btn-secondary-hover);
|
|
37
|
+
}
|
|
38
|
+
button:disabled {
|
|
39
|
+
cursor: not-allowed;
|
|
40
|
+
}
|
|
41
|
+
button:disabled:hover {
|
|
42
|
+
background: var(--btn-secondary);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
button ::slotted(img) {
|
|
46
|
+
width: 0.8rem;
|
|
47
|
+
height: 0.8rem;
|
|
48
|
+
margin-right: 0.5rem;
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
ButtonPill = __decorate([
|
|
52
|
+
customElement("ccc-button-pill")
|
|
53
|
+
], ButtonPill);
|
|
54
|
+
export { ButtonPill };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAG5C,qBACa,MAAO,SAAQ,UAAU;IACpC,MAAM,CAAC,MAAM,0BAuCX;IAEF,OAAO;IAIP,MAAM;CAGP"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, LitElement } from "lit";
|
|
8
|
+
import { customElement } from "lit/decorators.js";
|
|
9
|
+
let Button = class Button extends LitElement {
|
|
10
|
+
updated() {
|
|
11
|
+
this.dispatchEvent(new Event("updated", { bubbles: true, composed: true }));
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return html `<button><slot></slot></button>`;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
Button.styles = css `
|
|
18
|
+
:host {
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
button {
|
|
23
|
+
background: none;
|
|
24
|
+
color: inherit;
|
|
25
|
+
border: none;
|
|
26
|
+
padding: 0;
|
|
27
|
+
font: inherit;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
outline: inherit;
|
|
30
|
+
|
|
31
|
+
width: 100%;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: start;
|
|
35
|
+
padding: 0.75rem 1rem;
|
|
36
|
+
background: var(--btn-primary);
|
|
37
|
+
border-radius: 0.4rem;
|
|
38
|
+
transition: background 0.15s ease-in-out;
|
|
39
|
+
}
|
|
40
|
+
button:hover {
|
|
41
|
+
background: var(--btn-primary-hover);
|
|
42
|
+
}
|
|
43
|
+
button:disabled {
|
|
44
|
+
cursor: not-allowed;
|
|
45
|
+
}
|
|
46
|
+
button:disabled:hover {
|
|
47
|
+
background: var(--btn-primary);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
button ::slotted(img) {
|
|
51
|
+
width: 2rem;
|
|
52
|
+
height: 2rem;
|
|
53
|
+
margin-right: 1rem;
|
|
54
|
+
border-radius: 0.4rem;
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
Button = __decorate([
|
|
58
|
+
customElement("ccc-button")
|
|
59
|
+
], Button);
|
|
60
|
+
export { Button };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
export declare class CopyButton extends LitElement {
|
|
3
|
+
value?: string;
|
|
4
|
+
private isCopied;
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
updated(): void;
|
|
7
|
+
onclick: () => Promise<void> | undefined;
|
|
8
|
+
render(): import("lit").TemplateResult<1>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=copy-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-button.d.ts","sourceRoot":"","sources":["../../src/components/copy-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAG5C,qBACa,UAAW,SAAQ,UAAU;IAEjC,KAAK,CAAC,EAAE,MAAM,CAAC;IAGtB,OAAO,CAAC,QAAQ,CAAS;IAEzB,MAAM,CAAC,MAAM,0BAiBX;IAEF,OAAO;IAIP,OAAO,kCASL;IAEF,MAAM;CAuBP"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, LitElement } from "lit";
|
|
8
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
9
|
+
let CopyButton = class CopyButton extends LitElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.isCopied = false;
|
|
13
|
+
this.onclick = () => {
|
|
14
|
+
if (!this.value) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
this.isCopied = true;
|
|
18
|
+
setTimeout(() => (this.isCopied = false), 3000);
|
|
19
|
+
return window.navigator.clipboard.writeText(this.value);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
updated() {
|
|
23
|
+
this.dispatchEvent(new Event("updated", { bubbles: true, composed: true }));
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return html `
|
|
27
|
+
<slot></slot>
|
|
28
|
+
${this.isCopied
|
|
29
|
+
? html `
|
|
30
|
+
<svg class="check" viewBox="0 0 17.837 17.837" alt="copied">
|
|
31
|
+
<path
|
|
32
|
+
d="M16.145,2.571c-0.272-0.273-0.718-0.273-0.99,0L6.92,10.804l-4.241-4.27c-0.272-0.274-0.715-0.274-0.989,0L0.204,8.019c-0.272,0.271-0.272,0.717,0,0.99l6.217,6.258c0.272,0.271,0.715,0.271,0.99,0L17.63,5.047c0.276-0.273,0.276-0.72,0-0.994L16.145,2.571z"
|
|
33
|
+
/>
|
|
34
|
+
</svg>
|
|
35
|
+
`
|
|
36
|
+
: html `
|
|
37
|
+
<svg class="copy" viewBox="0 0 24 24" alt="copy">
|
|
38
|
+
<path
|
|
39
|
+
d="M19 13.5657V6.10526C19 5.49737 18.5091 5 17.9091 5H10.5454C9.94543 5 9.45452 5.49737 9.45452 6.10526V13.5657C9.45452 14.1736 9.94543 14.671 10.5454 14.671H17.9091C18.5091 14.671 19 14.1736 19 13.5657Z"
|
|
40
|
+
/>
|
|
41
|
+
<path
|
|
42
|
+
d="M14.5455 15.8684H9.18183C8.58183 15.8684 8.09092 15.3711 8.09092 14.7632V9.329H6.09091C5.49091 9.329 5 9.82637 5 10.4343V17.8947C5 18.5026 5.49091 19 6.09091 19H13.4546C14.0546 19 14.5455 18.5026 14.5455 17.8947V15.8684Z"
|
|
43
|
+
/>
|
|
44
|
+
</svg>
|
|
45
|
+
`}
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
CopyButton.styles = css `
|
|
50
|
+
:host {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
}
|
|
55
|
+
.copy {
|
|
56
|
+
width: 1em;
|
|
57
|
+
height: 1em;
|
|
58
|
+
fill: currentColor;
|
|
59
|
+
}
|
|
60
|
+
.check {
|
|
61
|
+
width: 0.7em;
|
|
62
|
+
height: 0.7em;
|
|
63
|
+
margin-left: 0.15em;
|
|
64
|
+
fill: currentColor;
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
__decorate([
|
|
68
|
+
property()
|
|
69
|
+
], CopyButton.prototype, "value", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
state()
|
|
72
|
+
], CopyButton.prototype, "isCopied", void 0);
|
|
73
|
+
CopyButton = __decorate([
|
|
74
|
+
customElement("ccc-copy-button")
|
|
75
|
+
], CopyButton);
|
|
76
|
+
export { CopyButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAK5C,qBACa,MAAO,SAAQ,UAAU;IAE7B,OAAO,EAAE,GAAG,GAAG,SAAS,CAAC;IAEzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEvB,MAAM;IA6BN,MAAM,CAAC,MAAM,0BAsDX;CACH"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, LitElement } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import { CLOSE_SVG } from "../assets/close.svg";
|
|
10
|
+
import { LEFT_SVG } from "../assets/left.svg";
|
|
11
|
+
let Dialog = class Dialog extends LitElement {
|
|
12
|
+
render() {
|
|
13
|
+
return html `
|
|
14
|
+
<div
|
|
15
|
+
class="header text-bold fs-lg ${this.header ? "header-divider" : ""}"
|
|
16
|
+
>
|
|
17
|
+
<img
|
|
18
|
+
class="back ${this.canBack !== undefined ? "active" : ""}"
|
|
19
|
+
src=${LEFT_SVG}
|
|
20
|
+
@click=${() => {
|
|
21
|
+
this.dispatchEvent(new Event("back"));
|
|
22
|
+
}}
|
|
23
|
+
/>
|
|
24
|
+
${this.header}
|
|
25
|
+
<img
|
|
26
|
+
class="close active"
|
|
27
|
+
src=${CLOSE_SVG}
|
|
28
|
+
@click=${() => {
|
|
29
|
+
this.dispatchEvent(new Event("close", { bubbles: true, composed: true }));
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="body">
|
|
34
|
+
<slot></slot>
|
|
35
|
+
</div>
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
Dialog.styles = css `
|
|
40
|
+
.text-bold {
|
|
41
|
+
font-weight: bold;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.fs-lg {
|
|
45
|
+
font-size: 1.2rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.main {
|
|
49
|
+
position: fixed;
|
|
50
|
+
left: 50%;
|
|
51
|
+
top: 50%;
|
|
52
|
+
transform: translate(-50%, -50%);
|
|
53
|
+
background: var(--background);
|
|
54
|
+
border-radius: 1.2rem;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
transition: height 0.15s ease-out;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.header {
|
|
60
|
+
display: flex;
|
|
61
|
+
justify-content: space-between;
|
|
62
|
+
align-items: center;
|
|
63
|
+
padding: 1rem 1.3rem 0.5rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.header-divider {
|
|
67
|
+
padding-bottom: 1rem;
|
|
68
|
+
border-bottom: 1px solid var(--divider);
|
|
69
|
+
margin-bottom: 0.3rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.close,
|
|
73
|
+
.back {
|
|
74
|
+
width: 0.8rem;
|
|
75
|
+
height: 0.8rem;
|
|
76
|
+
opacity: 0;
|
|
77
|
+
transition: opacity 0.15s ease-in-out;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.close.active,
|
|
81
|
+
.back.active {
|
|
82
|
+
opacity: 1;
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.body {
|
|
87
|
+
padding: 0 1.3rem 1rem;
|
|
88
|
+
min-width: 20rem;
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
align-items: center;
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
94
|
+
__decorate([
|
|
95
|
+
property()
|
|
96
|
+
], Dialog.prototype, "canBack", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
property()
|
|
99
|
+
], Dialog.prototype, "header", void 0);
|
|
100
|
+
Dialog = __decorate([
|
|
101
|
+
customElement("ccc-dialog")
|
|
102
|
+
], Dialog);
|
|
103
|
+
export { Dialog };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,CAAC;AAClB,OAAO,eAAe,CAAC;AACvB,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,CAAC"}
|
|
@@ -1,42 +1,29 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/ccc";
|
|
2
2
|
import { LitElement, PropertyValues } from "lit";
|
|
3
|
-
import { Ref } from "lit/directives/ref.js";
|
|
4
3
|
export declare class WebComponentConnector extends LitElement {
|
|
5
|
-
private wallets;
|
|
6
|
-
signerFilter?: (signerInfo: ccc.SignerInfo, wallet: ccc.Wallet) => Promise<boolean>;
|
|
7
|
-
private resetListeners;
|
|
8
|
-
preferredNetworks?: ccc.NetworkPreference[];
|
|
9
4
|
name?: string;
|
|
10
5
|
icon?: string;
|
|
6
|
+
preferredNetworks?: ccc.NetworkPreference[];
|
|
7
|
+
signerFilter?: (signerInfo: ccc.SignerInfo, wallet: ccc.Wallet) => Promise<boolean>;
|
|
11
8
|
client: ccc.Client;
|
|
12
9
|
setClient(client: ccc.Client): void;
|
|
13
|
-
private
|
|
14
|
-
private selectedWallet?;
|
|
15
|
-
private selectedSigner?;
|
|
16
|
-
private connectingError?;
|
|
10
|
+
private signersController;
|
|
17
11
|
private walletName?;
|
|
18
12
|
private signerName?;
|
|
19
13
|
wallet?: ccc.Wallet;
|
|
20
14
|
signer?: ccc.SignerInfo;
|
|
21
|
-
private
|
|
22
|
-
private internalAddress?;
|
|
23
|
-
private balance?;
|
|
24
|
-
private updateSignerInfo;
|
|
25
|
-
private prepareSigner;
|
|
15
|
+
private unregisterSignerReplacer?;
|
|
26
16
|
disconnect(): void;
|
|
27
17
|
private loadConnection;
|
|
28
18
|
private saveConnection;
|
|
29
19
|
connectedCallback(): void;
|
|
30
20
|
willUpdate(changedProperties: PropertyValues): void;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
mainRef
|
|
34
|
-
|
|
35
|
-
bodyRef: Ref<HTMLDivElement>;
|
|
21
|
+
refreshSigner(): Promise<void>;
|
|
22
|
+
updateSigner(wallet: ccc.Wallet | undefined, signerInfo: ccc.SignerInfo | undefined): Promise<void>;
|
|
23
|
+
private readonly mainRef;
|
|
24
|
+
private readonly bodyRef;
|
|
36
25
|
render(): import("lit").TemplateResult<1>;
|
|
37
26
|
updated(): void;
|
|
38
|
-
private closedHandler;
|
|
39
|
-
private signerSelectedHandler;
|
|
40
27
|
static styles: import("lit").CSSResult;
|
|
41
28
|
}
|
|
42
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAM5D,qBACa,qBAAsB,SAAQ,UAAU;IAE5C,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC;IAE5C,YAAY,CAAC,EAAE,CACpB,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,KACf,OAAO,CAAC,OAAO,CAAC,CAAC;IAGf,MAAM,EAAE,GAAG,CAAC,MAAM,CAAiC;IACnD,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM;IAInC,OAAO,CAAC,iBAAiB,CAA+B;IAGxD,OAAO,CAAC,UAAU,CAAC,CAAS;IAE5B,OAAO,CAAC,UAAU,CAAC,CAAS;IAErB,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC;IAE/B,OAAO,CAAC,wBAAwB,CAAC,CAAa;IAEvC,UAAU;IAQjB,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,cAAc;IAUtB,iBAAiB,IAAI,IAAI;IAKzB,UAAU,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;IAoB7C,aAAa;IAQb,YAAY,CAChB,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,EAC9B,UAAU,EAAE,GAAG,CAAC,UAAU,GAAG,SAAS;IAsBxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAC5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CACV;IAEd,MAAM;IAuCN,OAAO;IASP,MAAM,CAAC,MAAM,0BAyBX;CACH"}
|