@dynamic-labs/sdk-react-core 4.18.6 → 4.18.8

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +12 -12
  5. package/src/lib/components/Button/Button.d.ts +1 -1
  6. package/src/lib/components/ModalHeader/ModalHeader.cjs +2 -1
  7. package/src/lib/components/ModalHeader/ModalHeader.js +2 -1
  8. package/src/lib/components/ModalHeader/ModalHeader.types.d.ts +3 -1
  9. package/src/lib/components/TypographyButton/TypographyButton.cjs +2 -0
  10. package/src/lib/components/TypographyButton/TypographyButton.js +2 -0
  11. package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.cjs +7 -1
  12. package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.js +8 -2
  13. package/src/lib/context/UserWalletsContext/UserWalletsContext.cjs +26 -3
  14. package/src/lib/context/UserWalletsContext/UserWalletsContext.js +27 -4
  15. package/src/lib/locale/en/translation.cjs +92 -0
  16. package/src/lib/locale/en/translation.d.ts +92 -0
  17. package/src/lib/locale/en/translation.js +92 -0
  18. package/src/lib/shared/assets/index.d.ts +1 -0
  19. package/src/lib/shared/assets/session.cjs +54 -0
  20. package/src/lib/shared/assets/session.js +30 -0
  21. package/src/lib/styles/index.shadow.cjs +1 -1
  22. package/src/lib/styles/index.shadow.js +1 -1
  23. package/src/lib/utils/functions/index.d.ts +1 -0
  24. package/src/lib/utils/functions/isZKSyncEnabled/index.d.ts +1 -0
  25. package/src/lib/utils/functions/isZKSyncEnabled/isZKSyncEnabled.cjs +11 -0
  26. package/src/lib/utils/functions/isZKSyncEnabled/isZKSyncEnabled.d.ts +2 -0
  27. package/src/lib/utils/functions/isZKSyncEnabled/isZKSyncEnabled.js +7 -0
  28. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +2 -0
  29. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +2 -0
  30. package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.cjs +92 -4
  31. package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.js +92 -4
  32. package/src/lib/utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs +3 -90
  33. package/src/lib/utils/hooks/useSubdomainCheck/useSubdomainCheck.js +3 -90
  34. package/src/lib/views/UserDeleteAccountView/UserDeleteAccountView.cjs +1 -3
  35. package/src/lib/views/UserDeleteAccountView/UserDeleteAccountView.js +1 -3
  36. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +6 -0
  37. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.d.ts +3 -0
  38. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +6 -0
  39. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +3 -1
  40. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.cjs +5 -1
  41. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.js +6 -2
  42. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/EmptySessionsView.cjs +15 -0
  43. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/EmptySessionsView.d.ts +2 -0
  44. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/EmptySessionsView.js +11 -0
  45. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/index.d.ts +1 -0
  46. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/RevokeAccessView/RevokeAccessView.cjs +37 -0
  47. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/RevokeAccessView/RevokeAccessView.d.ts +2 -0
  48. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/RevokeAccessView/RevokeAccessView.js +33 -0
  49. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/RevokeAccessView/index.d.ts +1 -0
  50. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionListItem/SessionListItem.cjs +30 -0
  51. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionListItem/SessionListItem.d.ts +10 -0
  52. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionListItem/SessionListItem.js +26 -0
  53. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionListItem/index.d.ts +1 -0
  54. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.cjs +28 -0
  55. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.d.ts +2 -0
  56. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.js +24 -0
  57. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/index.d.ts +1 -0
  58. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementView.cjs +56 -0
  59. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementView.d.ts +8 -0
  60. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementView.js +52 -0
  61. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/index.d.ts +1 -0
  62. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +5 -1
  63. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +5 -1
  64. package/src/lib/widgets/DynamicWidget/views/index.d.ts +1 -0
@@ -956,6 +956,24 @@ const translation = {
956
956
  empty_screen: {
957
957
  title: 'Nothing to see here yet!',
958
958
  },
959
+ delete_account: {
960
+ title: 'Delete My Account',
961
+ description:
962
+ 'Deleting your account will permanently remove all data, including wallet details and linked smart contract wallets. This action cannot be undone.',
963
+ backup_confirmation_embedded:
964
+ "I confirm I've backed up my wallet keys. If I proceed, a new wallet will be created. Any wallets or assets not backed up will be lost permanently.",
965
+ backup_confirmation_no_embedded:
966
+ 'I confirm that all of my information will be deleted. If I return, a new user profile will be created. These changes cannot be undone.',
967
+ type_delete: 'Enter DELETE in the box below to confirm this action.',
968
+ cancel: 'Cancel',
969
+ confirm: 'Delete Account',
970
+ deleting: 'Deleting...',
971
+ type_delete_label: 'Type to confirm',
972
+ },
973
+ session_management: {
974
+ title: 'Security Settings',
975
+ session_management_button: 'Session Management',
976
+ },
959
977
  }
960
978
  */
961
979
  dyn_settings: {
@@ -999,6 +1017,10 @@ const translation = {
999
1017
  deleting: 'Deleting...',
1000
1018
  type_delete_label: 'Type to confirm',
1001
1019
  },
1020
+ session_management: {
1021
+ title: 'Security Settings',
1022
+ session_management_button: 'Session Management',
1023
+ },
1002
1024
  },
1003
1025
  /**
1004
1026
  * @description copy keys for global wallet view
@@ -1980,6 +2002,76 @@ const translation = {
1980
2002
  using_hardware_wallet_toggle_label: 'Using Ledger with {{chainName}}',
1981
2003
  button: 'Connect',
1982
2004
  },
2005
+ /**
2006
+ * @description copy keys for session management view
2007
+ * @default
2008
+ * {
2009
+ aria: {
2010
+ back_button_label: 'Back',
2011
+ info_button_label: 'Info',
2012
+ },
2013
+ title: 'Session Management',
2014
+ empty_sessions_view: {
2015
+ title: 'No active sessions found',
2016
+ },
2017
+ info_view: {
2018
+ title: 'Connected App Sessions',
2019
+ description_bold: 'Easily manage which apps have access to your wallet. ',
2020
+ description_2:
2021
+ "Each session represents a connection you've made with a site or app.",
2022
+ description_3:
2023
+ 'You can revoke access anytime to stay in control of where and how your wallet is used.',
2024
+ continue_button: 'Continue',
2025
+ },
2026
+ revoke_access_view: {
2027
+ title: 'Revoke Access',
2028
+ description:
2029
+ "You're removing this site's permissions. Confirm to revoke access.",
2030
+ cancel_button: 'Cancel',
2031
+ revoke_button: 'Revoke',
2032
+ },
2033
+ session_component: {
2034
+ aria: {
2035
+ collapse_permissions: 'Collapse',
2036
+ expand_permissions: 'Expand',
2037
+ },
2038
+ permission_details: 'Permission details',
2039
+ revoke_button: 'Revoke',
2040
+ },
2041
+ }
2042
+ */
2043
+ dyn_session_management: {
2044
+ aria: {
2045
+ back_button_label: 'Back',
2046
+ info_button_label: 'Info',
2047
+ close_button_label: 'Close',
2048
+ },
2049
+ title: 'Session Management',
2050
+ empty_sessions_view: {
2051
+ title: 'No active sessions found',
2052
+ },
2053
+ info_view: {
2054
+ title: 'Connected App Sessions',
2055
+ description_bold: 'Easily manage which apps have access to your wallet. ',
2056
+ description_2: "Each session represents a connection you've made with a site or app.",
2057
+ description_3: 'You can revoke access anytime to stay in control of where and how your wallet is used.',
2058
+ continue_button: 'Continue',
2059
+ },
2060
+ revoke_access_view: {
2061
+ title: 'Revoke Access',
2062
+ description: "You're removing this site's permissions. Confirm to revoke access.",
2063
+ cancel_button: 'Cancel',
2064
+ revoke_button: 'Revoke',
2065
+ },
2066
+ session_component: {
2067
+ aria: {
2068
+ collapse_permissions: 'Collapse',
2069
+ expand_permissions: 'Expand',
2070
+ },
2071
+ permission_details: 'Permission details',
2072
+ revoke_button: 'Revoke',
2073
+ },
2074
+ },
1983
2075
  /**
1984
2076
  * @description copy keys for sign message flow views
1985
2077
  * @default
@@ -86,6 +86,7 @@ export { ReactComponent as QuestionMarkIcon } from './question-mark.svg';
86
86
  export { ReactComponent as SavePasswordHeroIcon } from './save-password-hero.svg';
87
87
  export { ReactComponent as SecureActionIcon } from './secure-action.svg';
88
88
  export { ReactComponent as SendIcon } from './send.svg';
89
+ export { ReactComponent as SessionIcon } from './session.svg';
89
90
  export { ReactComponent as SettingsIconOutline } from './settings-outline.svg';
90
91
  export { ReactComponent as SettingsIcon } from './settings.svg';
91
92
  export { ReactComponent as ShieldIcon } from './shield.svg';
@@ -0,0 +1,54 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var React = require('react');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n["default"] = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
+
28
+ var _path;
29
+ var _excluded = ["title", "titleId"];
30
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
31
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) { o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
32
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } } return t; }
33
+ var SvgSession = function SvgSession(_ref) {
34
+ var title = _ref.title,
35
+ titleId = _ref.titleId,
36
+ props = _objectWithoutProperties(_ref, _excluded);
37
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
38
+ width: 24,
39
+ height: 24,
40
+ viewBox: "0 0 24 24",
41
+ fill: "none",
42
+ xmlns: "http://www.w3.org/2000/svg",
43
+ "aria-labelledby": titleId
44
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
45
+ id: titleId
46
+ }, title) : null, _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
47
+ fillRule: "evenodd",
48
+ clipRule: "evenodd",
49
+ d: "M12 4a8 8 0 1 0 7.791 9.823l-.384.384a1 1 0 0 1-1.414-1.414l2-2a1 1 0 0 1 1.415 0l2 2a1 1 0 0 1-1.415 1.414l-.195-.195C20.867 18.57 16.834 22 12 22 6.477 22 2 17.523 2 12S6.477 2 12 2a9.996 9.996 0 0 1 8.616 4.92 1 1 0 0 1-1.723 1.018A7.996 7.996 0 0 0 12 4Zm0 2a1 1 0 0 1 1 1v4.465l2.555 1.703a1 1 0 0 1-1.11 1.664l-3-2A1 1 0 0 1 11 12V7a1 1 0 0 1 1-1Z",
50
+ fill: "#ABACB2"
51
+ })));
52
+ };
53
+
54
+ exports.ReactComponent = SvgSession;
@@ -0,0 +1,30 @@
1
+ 'use client'
2
+ import * as React from 'react';
3
+
4
+ var _path;
5
+ var _excluded = ["title", "titleId"];
6
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
7
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) { o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
8
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } } return t; }
9
+ var SvgSession = function SvgSession(_ref) {
10
+ var title = _ref.title,
11
+ titleId = _ref.titleId,
12
+ props = _objectWithoutProperties(_ref, _excluded);
13
+ return /*#__PURE__*/React.createElement("svg", _extends({
14
+ width: 24,
15
+ height: 24,
16
+ viewBox: "0 0 24 24",
17
+ fill: "none",
18
+ xmlns: "http://www.w3.org/2000/svg",
19
+ "aria-labelledby": titleId
20
+ }, props), title ? /*#__PURE__*/React.createElement("title", {
21
+ id: titleId
22
+ }, title) : null, _path || (_path = /*#__PURE__*/React.createElement("path", {
23
+ fillRule: "evenodd",
24
+ clipRule: "evenodd",
25
+ d: "M12 4a8 8 0 1 0 7.791 9.823l-.384.384a1 1 0 0 1-1.414-1.414l2-2a1 1 0 0 1 1.415 0l2 2a1 1 0 0 1-1.415 1.414l-.195-.195C20.867 18.57 16.834 22 12 22 6.477 22 2 17.523 2 12S6.477 2 12 2a9.996 9.996 0 0 1 8.616 4.92 1 1 0 0 1-1.723 1.018A7.996 7.996 0 0 0 12 4Zm0 2a1 1 0 0 1 1 1v4.465l2.555 1.703a1 1 0 0 1-1.11 1.664l-3-2A1 1 0 0 1 11 12V7a1 1 0 0 1 1-1Z",
26
+ fill: "#ABACB2"
27
+ })));
28
+ };
29
+
30
+ export { SvgSession as ReactComponent };