@tonconnect/ui 0.0.16 → 0.0.17
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/tonconnect-ui.min.js +5 -5
- package/dist/tonconnect-ui.min.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +14 -6
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +14 -6
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ declare type ColorsSet = {
|
|
|
27
27
|
secondary: Color$1;
|
|
28
28
|
tertiary: Color$1;
|
|
29
29
|
success: Color$1;
|
|
30
|
+
error: Color$1;
|
|
30
31
|
};
|
|
31
32
|
background: {
|
|
32
33
|
primary: Color$1;
|
|
@@ -52,6 +53,7 @@ declare type PartialColorsSet = {
|
|
|
52
53
|
secondary?: Color$1;
|
|
53
54
|
tertiary?: Color$1;
|
|
54
55
|
success?: Color$1;
|
|
56
|
+
error?: Color$1;
|
|
55
57
|
};
|
|
56
58
|
background?: {
|
|
57
59
|
primary?: Color$1;
|
package/lib/index.js
CHANGED
|
@@ -3076,7 +3076,7 @@ class BridgeProvider {
|
|
|
3076
3076
|
this.storage = storage;
|
|
3077
3077
|
this.walletConnectionSource = walletConnectionSource;
|
|
3078
3078
|
this.type = "http";
|
|
3079
|
-
this.standardUniversalLink = "
|
|
3079
|
+
this.standardUniversalLink = "tc://";
|
|
3080
3080
|
this.pendingRequests = /* @__PURE__ */ new Map();
|
|
3081
3081
|
this.nextRequestId = 0;
|
|
3082
3082
|
this.session = null;
|
|
@@ -5846,7 +5846,8 @@ const defaultLightColorsSet = {
|
|
|
5846
5846
|
primary: "#0F0F0F",
|
|
5847
5847
|
secondary: "#7A8999",
|
|
5848
5848
|
tertiary: "#C1CAD2",
|
|
5849
|
-
success: "#29CC6A"
|
|
5849
|
+
success: "#29CC6A",
|
|
5850
|
+
error: "#F5A73B"
|
|
5850
5851
|
},
|
|
5851
5852
|
background: {
|
|
5852
5853
|
primary: "#FFFFFF",
|
|
@@ -5871,7 +5872,8 @@ const defaultDarkColorsSet = {
|
|
|
5871
5872
|
primary: "#E5E5EA",
|
|
5872
5873
|
secondary: "#909099",
|
|
5873
5874
|
tertiary: "#434347",
|
|
5874
|
-
success: "#29CC6A"
|
|
5875
|
+
success: "#29CC6A",
|
|
5876
|
+
error: "#F5A73B"
|
|
5875
5877
|
},
|
|
5876
5878
|
background: {
|
|
5877
5879
|
primary: "#121214",
|
|
@@ -6970,7 +6972,7 @@ const SuccessIcon = (props) => {
|
|
|
6970
6972
|
const _tmpl$$a = /* @__PURE__ */ template$1(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="11"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M7.86358 9.13637C7.51211 8.7849 7.51211 8.21505 7.86358 7.86358C8.21505 7.51211 8.7849 7.51211 9.13637 7.86358L12 10.7272L14.8636 7.86358C15.2151 7.51211 15.7849 7.51211 16.1364 7.86358C16.4878 8.21505 16.4878 8.7849 16.1364 9.13637L13.2728 12L16.1364 14.8636C16.4878 15.2151 16.4878 15.7849 16.1364 16.1364C15.7849 16.4878 15.2151 16.4878 14.8636 16.1364L12 13.2728L9.13637 16.1364C8.7849 16.4878 8.21505 16.4878 7.86358 16.1364C7.51211 15.7849 7.51211 15.2151 7.86358 14.8636L10.7272 12L7.86358 9.13637Z"></path></svg>`);
|
|
6971
6973
|
const ErrorIcon = (props) => {
|
|
6972
6974
|
const theme = useTheme();
|
|
6973
|
-
const fill = () => props.fill || theme.colors.icon.
|
|
6975
|
+
const fill = () => props.fill || theme.colors.icon.error;
|
|
6974
6976
|
return (() => {
|
|
6975
6977
|
const _el$ = _tmpl$$a.cloneNode(true), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
6976
6978
|
createRenderEffect((_p$) => {
|
|
@@ -7135,6 +7137,7 @@ const AccountButtonDropdown = (props) => {
|
|
|
7135
7137
|
setTimeout(() => setIsCopiedShown(false), 1e3);
|
|
7136
7138
|
});
|
|
7137
7139
|
const onDisconnect = () => {
|
|
7140
|
+
setAction(null);
|
|
7138
7141
|
connector.disconnect();
|
|
7139
7142
|
props.onClose();
|
|
7140
7143
|
};
|
|
@@ -7325,9 +7328,10 @@ const NotificationClass = u`
|
|
|
7325
7328
|
`;
|
|
7326
7329
|
const _tmpl$$4 = /* @__PURE__ */ template$1(`<div></div>`);
|
|
7327
7330
|
const Notifications = (props) => {
|
|
7331
|
+
const timeouts = [];
|
|
7332
|
+
const [openedNotifications, setOpenedNotifications] = createSignal([]);
|
|
7328
7333
|
let lastId = -1;
|
|
7329
7334
|
const liveTimeoutMs = 4500;
|
|
7330
|
-
const [openedNotifications, setOpenedNotifications] = createSignal([]);
|
|
7331
7335
|
createEffect(on(action, (action2) => {
|
|
7332
7336
|
if (action2 && action2.showNotification) {
|
|
7333
7337
|
lastId++;
|
|
@@ -7336,9 +7340,12 @@ const Notifications = (props) => {
|
|
|
7336
7340
|
id,
|
|
7337
7341
|
action: action2.name
|
|
7338
7342
|
}));
|
|
7339
|
-
setTimeout(() => setOpenedNotifications((notifications2) => notifications2.filter((notification) => notification.id !== id)), liveTimeoutMs);
|
|
7343
|
+
timeouts.push(setTimeout(() => setOpenedNotifications((notifications2) => notifications2.filter((notification) => notification.id !== id)), liveTimeoutMs));
|
|
7340
7344
|
}
|
|
7341
7345
|
}));
|
|
7346
|
+
onCleanup(() => {
|
|
7347
|
+
timeouts.forEach(clearTimeout);
|
|
7348
|
+
});
|
|
7342
7349
|
return (() => {
|
|
7343
7350
|
const _el$ = _tmpl$$4.cloneNode(true);
|
|
7344
7351
|
insert(_el$, createComponent(TransitionGroup, {
|
|
@@ -11051,6 +11058,7 @@ class TonConnectUI {
|
|
|
11051
11058
|
});
|
|
11052
11059
|
}
|
|
11053
11060
|
disconnect() {
|
|
11061
|
+
widgetController.clearAction();
|
|
11054
11062
|
this.walletInfoStorage.removeWalletInfo();
|
|
11055
11063
|
return this.connector.disconnect();
|
|
11056
11064
|
}
|