@rango-dev/widget-embedded 0.21.1-next.1 → 0.21.1-next.2

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 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/store/slices/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAE1D,eAAO,MAAM,cAAc,EAAE,YAK5B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,YAAY,CAAC;IAErB,YAAY,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,2BAA2B,CACzD,YAAY,EACZ,WAAW,EACX,WAAW,CAiBZ,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/store/slices/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAE1D,eAAO,MAAM,cAAc,EAAE,YAM5B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,YAAY,CAAC;IAErB,YAAY,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,2BAA2B,CACzD,YAAY,EACZ,WAAW,EACX,WAAW,CAiBZ,CAAC"}
@@ -172,6 +172,7 @@ export type Features = Partial<Record<'theme' | 'language' | 'connectWalletButto
172
172
  export type WidgetConfig = {
173
173
  apiKey: string;
174
174
  apiUrl?: string;
175
+ title?: string;
175
176
  walletConnectProjectId?: string;
176
177
  affiliate?: WidgetAffiliate;
177
178
  am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C;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAChC,EAAE,CAAC,EAAE,wBAAwB,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,UAAU,GAAG,iBAAiB,CAAC,EAAE,CAAC;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAEtD;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAC3B,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,WAK5B;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAGvB,GAAG,UAS9B;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAGtE;AAED,eAAO,MAAM,YAAY,mBACkC,CAAC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAEtD;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAC3B,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,WAK5B;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAGvB,GAAG,UAS9B;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAGtE;AAED,eAAO,MAAM,YAAY,mBACyC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/widget-embedded",
3
- "version": "0.21.1-next.1",
3
+ "version": "0.21.1-next.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -25,7 +25,7 @@
25
25
  "@rango-dev/queue-manager-core": "^0.25.0",
26
26
  "@rango-dev/queue-manager-rango-preset": "^0.26.0",
27
27
  "@rango-dev/queue-manager-react": "^0.25.0",
28
- "@rango-dev/ui": "^0.27.1-next.0",
28
+ "@rango-dev/ui": "^0.27.1-next.1",
29
29
  "@rango-dev/wallets-react": "^0.12.0",
30
30
  "@rango-dev/wallets-shared": "^0.26.0",
31
31
  "bignumber.js": "^9.1.1",
@@ -47,4 +47,4 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  }
50
- }
50
+ }
@@ -18,7 +18,7 @@ import {
18
18
  import React, { useEffect, useState } from 'react';
19
19
  import { useNavigate } from 'react-router-dom';
20
20
 
21
- import { RANGO_SWAP_BOX_ID } from '../../constants';
21
+ import { WIDGET_UI_ID } from '../../constants';
22
22
  import { getQuoteErrorMessage } from '../../constants/errors';
23
23
  import { getQuoteUpdateWarningMessage } from '../../constants/warnings';
24
24
  import { useAppStore } from '../../store/AppStore';
@@ -228,7 +228,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
228
228
  }, [connectedWallets.length]);
229
229
 
230
230
  const modalContainer = document.getElementById(
231
- RANGO_SWAP_BOX_ID
231
+ WIDGET_UI_ID.SWAP_BOX_ID
232
232
  ) as HTMLDivElement;
233
233
 
234
234
  const navigate = useNavigate();
@@ -18,7 +18,7 @@ import {
18
18
  import React, { useEffect, useState } from 'react';
19
19
 
20
20
  import { useWallets } from '../..';
21
- import { RANGO_SWAP_BOX_ID } from '../../constants';
21
+ import { WIDGET_UI_ID } from '../../constants';
22
22
  import { useWalletList } from '../../hooks/useWalletList';
23
23
  import {
24
24
  TIME_TO_CLOSE_MODAL,
@@ -112,7 +112,7 @@ export function WalletList(props: PropTypes) {
112
112
  }, [JSON.stringify(list)]);
113
113
 
114
114
  const modalContainer = document.getElementById(
115
- RANGO_SWAP_BOX_ID
115
+ WIDGET_UI_ID.SWAP_BOX_ID
116
116
  ) as HTMLDivElement;
117
117
 
118
118
  useEffect(() => {
@@ -36,7 +36,6 @@ export const Content = styled('div', {
36
36
  overflowY: 'auto',
37
37
  });
38
38
  export const Footer = styled('div', {
39
- backgroundColor: '$background',
40
39
  '& .footer__content': {
41
40
  padding: '$0 $20',
42
41
  },
@@ -6,7 +6,7 @@ import { useManager } from '@rango-dev/queue-manager-react';
6
6
  import { BottomLogo, Divider, Header } from '@rango-dev/ui';
7
7
  import React, { useEffect, useRef } from 'react';
8
8
 
9
- import { RANGO_SWAP_BOX_ID } from '../../constants';
9
+ import { WIDGET_UI_ID } from '../../constants';
10
10
  import { useNavigateBack } from '../../hooks/useNavigateBack';
11
11
  import { useTheme } from '../../hooks/useTheme';
12
12
  import { useAppStore } from '../../store/AppStore';
@@ -76,7 +76,10 @@ function Layout(props: PropsWithChildren<PropTypes>) {
76
76
  }, []);
77
77
 
78
78
  return (
79
- <Container height={height} id={RANGO_SWAP_BOX_ID} className={activeTheme()}>
79
+ <Container
80
+ height={height}
81
+ id={WIDGET_UI_ID.SWAP_BOX_ID}
82
+ className={activeTheme()}>
80
83
  <Header
81
84
  prefix={<>{showBackButton && <BackButton onClick={navigateBack} />}</>}
82
85
  title={header.title}
@@ -12,7 +12,7 @@ import {
12
12
  import React from 'react';
13
13
  import { useNavigate } from 'react-router-dom';
14
14
 
15
- import { RANGO_SWAP_BOX_ID } from '../../constants';
15
+ import { WIDGET_UI_ID } from '../../constants';
16
16
  import { getContainer } from '../../utils/common';
17
17
 
18
18
  export function SwapDetailsCompleteModal(props: CompleteModalPropTypes) {
@@ -36,7 +36,9 @@ export function SwapDetailsCompleteModal(props: CompleteModalPropTypes) {
36
36
  <Modal
37
37
  open={open}
38
38
  onClose={onClose}
39
- container={document.getElementById(RANGO_SWAP_BOX_ID) || document.body}>
39
+ container={
40
+ document.getElementById(WIDGET_UI_ID.SWAP_BOX_ID) || document.body
41
+ }>
40
42
  {status === 'success' ? (
41
43
  <MessageBox type="success" title={i18n.t('Swap Successful')}>
42
44
  <TokenAmount
@@ -4,7 +4,7 @@ import { Modal } from '@rango-dev/ui';
4
4
  import { PendingSwapNetworkStatus } from 'rango-types';
5
5
  import React from 'react';
6
6
 
7
- import { RANGO_SWAP_BOX_ID } from '../../constants';
7
+ import { WIDGET_UI_ID } from '../../constants';
8
8
 
9
9
  import { CancelContent } from './SwapDetailsModal.Cancel';
10
10
  import { DeleteContent } from './SwapDetailsModal.Delete';
@@ -31,7 +31,9 @@ export function SwapDetailsModal(props: ModalPropTypes) {
31
31
  <Modal
32
32
  open={!!state}
33
33
  onClose={onClose}
34
- container={document.getElementById(RANGO_SWAP_BOX_ID) || document.body}>
34
+ container={
35
+ document.getElementById(WIDGET_UI_ID.SWAP_BOX_ID) || document.body
36
+ }>
35
37
  {showWalletStateContent && (
36
38
  <WalletStateContent
37
39
  type={modalNetworkValues[state].type}
@@ -3,7 +3,7 @@ import type { PropTypes } from './WalletModal.types';
3
3
  import { Divider, Modal } from '@rango-dev/ui';
4
4
  import React from 'react';
5
5
 
6
- import { RANGO_SWAP_BOX_ID } from '../../constants';
6
+ import { WIDGET_UI_ID } from '../../constants';
7
7
 
8
8
  import { ModalContent } from './WalletModalContent';
9
9
 
@@ -14,7 +14,9 @@ export function WalletModal(props: PropTypes) {
14
14
  <Modal
15
15
  open={open}
16
16
  onClose={onClose}
17
- container={document.getElementById(RANGO_SWAP_BOX_ID) || document.body}>
17
+ container={
18
+ document.getElementById(WIDGET_UI_ID.SWAP_BOX_ID) || document.body
19
+ }>
18
20
  <ModalContent {...otherProps} />
19
21
  <Divider direction="vertical" size={32} />
20
22
  </Modal>
@@ -1,4 +1,10 @@
1
+ import { UI_ID } from '@rango-dev/ui';
2
+
1
3
  export const RANGO_PUBLIC_API_KEY = 'c6381a79-2817-4602-83bf-6a641a409e32';
2
4
  export const DEFAULT_BASE_URL = 'https://api.rango.exchange';
3
- export const RANGO_SWAP_BOX_ID = 'rango-swap-box';
4
5
  export const SCANNER_BASE_URL = 'https://scan.rango.exchange';
6
+
7
+ export const WIDGET_UI_ID = {
8
+ SWAP_BOX_ID: 'rango-swap-box',
9
+ ...UI_ID,
10
+ };
package/src/index.ts CHANGED
@@ -55,6 +55,7 @@ import {
55
55
  import { Networks, WalletTypes } from '@rango-dev/wallets-shared';
56
56
  import { PendingSwapNetworkStatus } from 'rango-types';
57
57
 
58
+ import { WIDGET_UI_ID as UI_ID } from './constants';
58
59
  import { WidgetWallets } from './containers/Wallets';
59
60
  import { Widget } from './containers/Widget';
60
61
  import { useWidget } from './containers/WidgetInfo';
@@ -105,6 +106,7 @@ export {
105
106
  StepEventType,
106
107
  StepExecutionEventStatus,
107
108
  StepExecutionBlockedEventStatus,
109
+ UI_ID,
108
110
  };
109
111
 
110
112
  // Internal type exports for Rango
@@ -62,7 +62,7 @@ export function Home() {
62
62
  setQuoteWarningsConfirmed,
63
63
  } = useQuoteStore();
64
64
 
65
- const fetchMetaStatus = useAppStore().fetchStatus;
65
+ const { config, fetchStatus: fetchMetaStatus } = useAppStore();
66
66
 
67
67
  const { connectedWallets, getBalanceFor } = useWalletsStore();
68
68
  const { isActiveTab } = useUiStore();
@@ -152,7 +152,7 @@ export function Home() {
152
152
  navigate(navigationRoutes.wallets);
153
153
  },
154
154
  hasBackButton: false,
155
- title: i18n.t('Swap'),
155
+ title: config.title || i18n.t('Swap'),
156
156
  suffix: (
157
157
  <HomeButtons
158
158
  onClickRefresh={
@@ -3,6 +3,7 @@ import type { StateCreatorWithInitialData } from '../app';
3
3
 
4
4
  export const DEFAULT_CONFIG: WidgetConfig = {
5
5
  apiKey: '',
6
+ title: undefined,
6
7
  multiWallets: true,
7
8
  enableNewLiquiditySources: true,
8
9
  customDestination: true,
@@ -184,6 +184,7 @@ export type Features = Partial<
184
184
  export type WidgetConfig = {
185
185
  apiKey: string;
186
186
  apiUrl?: string;
187
+ title?: string;
187
188
  walletConnectProjectId?: string;
188
189
  affiliate?: WidgetAffiliate;
189
190
  amount?: number;
@@ -1,4 +1,4 @@
1
- import { RANGO_SWAP_BOX_ID } from '../constants';
1
+ import { WIDGET_UI_ID } from '../constants';
2
2
 
3
3
  export function removeDuplicateFrom<T>(array: T[]): T[] {
4
4
  return Array.from(new Set(array));
@@ -33,4 +33,4 @@ export function containsText(text: string, searchText: string): boolean {
33
33
  }
34
34
 
35
35
  export const getContainer = () =>
36
- document.getElementById(RANGO_SWAP_BOX_ID) as HTMLElement;
36
+ document.getElementById(WIDGET_UI_ID.SWAP_BOX_ID) as HTMLElement;