@tonconnect/ui-react 0.0.13 → 0.0.14
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/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 +2 -2
package/lib/index.js
CHANGED
|
@@ -4053,7 +4053,7 @@ class BridgeProvider {
|
|
|
4053
4053
|
this.storage = storage;
|
|
4054
4054
|
this.walletConnectionSource = walletConnectionSource;
|
|
4055
4055
|
this.type = "http";
|
|
4056
|
-
this.standardUniversalLink = "
|
|
4056
|
+
this.standardUniversalLink = "tc://";
|
|
4057
4057
|
this.pendingRequests = /* @__PURE__ */ new Map();
|
|
4058
4058
|
this.nextRequestId = 0;
|
|
4059
4059
|
this.session = null;
|
|
@@ -6822,7 +6822,8 @@ const defaultLightColorsSet = {
|
|
|
6822
6822
|
primary: "#0F0F0F",
|
|
6823
6823
|
secondary: "#7A8999",
|
|
6824
6824
|
tertiary: "#C1CAD2",
|
|
6825
|
-
success: "#29CC6A"
|
|
6825
|
+
success: "#29CC6A",
|
|
6826
|
+
error: "#F5A73B"
|
|
6826
6827
|
},
|
|
6827
6828
|
background: {
|
|
6828
6829
|
primary: "#FFFFFF",
|
|
@@ -6847,7 +6848,8 @@ const defaultDarkColorsSet = {
|
|
|
6847
6848
|
primary: "#E5E5EA",
|
|
6848
6849
|
secondary: "#909099",
|
|
6849
6850
|
tertiary: "#434347",
|
|
6850
|
-
success: "#29CC6A"
|
|
6851
|
+
success: "#29CC6A",
|
|
6852
|
+
error: "#F5A73B"
|
|
6851
6853
|
},
|
|
6852
6854
|
background: {
|
|
6853
6855
|
primary: "#121214",
|
|
@@ -7946,7 +7948,7 @@ const SuccessIcon = (props) => {
|
|
|
7946
7948
|
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>`);
|
|
7947
7949
|
const ErrorIcon = (props) => {
|
|
7948
7950
|
const theme = useTheme();
|
|
7949
|
-
const fill = () => props.fill || theme.colors.icon.
|
|
7951
|
+
const fill = () => props.fill || theme.colors.icon.error;
|
|
7950
7952
|
return (() => {
|
|
7951
7953
|
const _el$ = _tmpl$$a.cloneNode(true), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
7952
7954
|
createRenderEffect((_p$) => {
|
|
@@ -8111,6 +8113,7 @@ const AccountButtonDropdown = (props) => {
|
|
|
8111
8113
|
setTimeout(() => setIsCopiedShown(false), 1e3);
|
|
8112
8114
|
});
|
|
8113
8115
|
const onDisconnect = () => {
|
|
8116
|
+
setAction(null);
|
|
8114
8117
|
connector.disconnect();
|
|
8115
8118
|
props.onClose();
|
|
8116
8119
|
};
|
|
@@ -8301,9 +8304,10 @@ const NotificationClass = u`
|
|
|
8301
8304
|
`;
|
|
8302
8305
|
const _tmpl$$4 = /* @__PURE__ */ template$1(`<div></div>`);
|
|
8303
8306
|
const Notifications = (props) => {
|
|
8307
|
+
const timeouts = [];
|
|
8308
|
+
const [openedNotifications, setOpenedNotifications] = createSignal([]);
|
|
8304
8309
|
let lastId = -1;
|
|
8305
8310
|
const liveTimeoutMs = 4500;
|
|
8306
|
-
const [openedNotifications, setOpenedNotifications] = createSignal([]);
|
|
8307
8311
|
createEffect(on(action, (action2) => {
|
|
8308
8312
|
if (action2 && action2.showNotification) {
|
|
8309
8313
|
lastId++;
|
|
@@ -8312,9 +8316,12 @@ const Notifications = (props) => {
|
|
|
8312
8316
|
id,
|
|
8313
8317
|
action: action2.name
|
|
8314
8318
|
}));
|
|
8315
|
-
setTimeout(() => setOpenedNotifications((notifications2) => notifications2.filter((notification) => notification.id !== id)), liveTimeoutMs);
|
|
8319
|
+
timeouts.push(setTimeout(() => setOpenedNotifications((notifications2) => notifications2.filter((notification) => notification.id !== id)), liveTimeoutMs));
|
|
8316
8320
|
}
|
|
8317
8321
|
}));
|
|
8322
|
+
onCleanup(() => {
|
|
8323
|
+
timeouts.forEach(clearTimeout);
|
|
8324
|
+
});
|
|
8318
8325
|
return (() => {
|
|
8319
8326
|
const _el$ = _tmpl$$4.cloneNode(true);
|
|
8320
8327
|
insert(_el$, createComponent(TransitionGroup, {
|
|
@@ -12027,6 +12034,7 @@ class TonConnectUI {
|
|
|
12027
12034
|
});
|
|
12028
12035
|
}
|
|
12029
12036
|
disconnect() {
|
|
12037
|
+
widgetController.clearAction();
|
|
12030
12038
|
this.walletInfoStorage.removeWalletInfo();
|
|
12031
12039
|
return this.connector.disconnect();
|
|
12032
12040
|
}
|