@rango-dev/widget-embedded 0.28.1-next.3 → 0.28.1

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 (40) hide show
  1. package/dist/components/BlockchainList/BlockchainList.helpers.d.ts +2 -1
  2. package/dist/components/BlockchainList/BlockchainList.helpers.d.ts.map +1 -1
  3. package/dist/constants/fonts.d.ts +0 -5
  4. package/dist/constants/fonts.d.ts.map +1 -1
  5. package/dist/containers/WidgetProvider/WidgetProvider.d.ts.map +1 -1
  6. package/dist/globalStyles.d.ts.map +1 -1
  7. package/dist/hooks/useTheme.d.ts.map +1 -1
  8. package/dist/index.d.ts +1 -2
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +2 -2
  11. package/dist/index.js.map +4 -4
  12. package/dist/pages/WalletsPage.d.ts.map +1 -1
  13. package/dist/types/config.d.ts +1 -1
  14. package/dist/utils/common.d.ts +0 -3
  15. package/dist/utils/common.d.ts.map +1 -1
  16. package/dist/utils/configs.d.ts +1 -0
  17. package/dist/utils/configs.d.ts.map +1 -1
  18. package/dist/utils/wallets.d.ts +0 -2
  19. package/dist/utils/wallets.d.ts.map +1 -1
  20. package/package.json +5 -5
  21. package/src/components/BlockchainList/BlockchainList.helpers.ts +25 -6
  22. package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +4 -4
  23. package/src/components/HeaderButtons/HeaderButtons.styles.ts +1 -1
  24. package/src/components/Quote/Quote.styles.ts +1 -1
  25. package/src/components/Slippage/Slippage.tsx +1 -1
  26. package/src/constants/fonts.ts +0 -84
  27. package/src/containers/WidgetProvider/WidgetProvider.tsx +1 -12
  28. package/src/globalStyles.ts +3 -1
  29. package/src/hooks/useBootstrap/useBootstrap.ts +1 -1
  30. package/src/hooks/useTheme.ts +1 -1
  31. package/src/index.ts +0 -2
  32. package/src/pages/SelectBlockchainPage.tsx +3 -3
  33. package/src/pages/WalletsPage.tsx +2 -34
  34. package/src/types/config.ts +1 -1
  35. package/src/utils/common.ts +0 -29
  36. package/src/utils/configs.ts +1 -0
  37. package/src/utils/wallets.ts +2 -53
  38. package/dist/hooks/useFontLoader.d.ts +0 -5
  39. package/dist/hooks/useFontLoader.d.ts.map +0 -1
  40. package/src/hooks/useFontLoader.ts +0 -40
@@ -1 +1 @@
1
- {"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../../src/pages/WalletsPage.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAkCxC,eAAO,MAAM,mBAAmB,OAAQ,CAAC;AACzC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,wBAAgB,WAAW,sBAyH1B"}
1
+ {"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../../src/pages/WalletsPage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AA8BxC,eAAO,MAAM,mBAAmB,OAAQ,CAAC;AACzC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,wBAAgB,WAAW,sBAqG1B"}
@@ -25,7 +25,7 @@ export type WidgetColors = {
25
25
  * radius, width, and height.
26
26
  * @property {'auto' | 'light' | 'dark'} mode - The mode property is used to specify the default theme for
27
27
  * the widget.
28
- * @property {string} fontFamily - The font family to be used in the widget. If you want to do this, include the font of your choice in your HTML file.
28
+ * @property {string} fontFamily - The font family to be used in the widget.
29
29
  * @property {{ light?: WidgetColors; dark?: WidgetColors }} colors - The `colors` property is a sub-property of the `WidgetTheme` object that
30
30
  * defines the color scheme for the widget. It is of type `Colors`, which is likely another object that
31
31
  * contains specific color values for various parts of the widget (e.g. background color, text color,
@@ -1,5 +1,4 @@
1
1
  import type { Token } from 'rango-sdk';
2
- import { TransactionType } from 'rango-sdk';
3
2
  export declare function removeDuplicateFrom<T>(array: T[]): T[];
4
3
  export declare function areEqual(array1: (number | string)[], array2: (number | string)[]): boolean;
5
4
  export declare function debounce(fn: Function, time: number): (...args: any) => void;
@@ -9,6 +8,4 @@ export declare function startWithText(text: string, searchText: string): boolean
9
8
  export declare const getContainer: () => HTMLElement;
10
9
  export declare const getExpanded: () => HTMLElement;
11
10
  export declare function compareWithSearchFor(tokenA: Token, tokenB: Token, searchFor?: string): number;
12
- export declare const isBlockchainTypeInCategory: (blockchainType: TransactionType, category: string) => boolean;
13
- export declare const getFontUrlByName: (fontName: string) => string | undefined;
14
11
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAY5C,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,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAEvE;AAED,eAAO,MAAM,YAAY,mBACyC,CAAC;AAEnE,eAAO,MAAM,WAAW,mBAC8C,CAAC;AAsDvE,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,KAAK,EACb,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CA0GR;AAED,eAAO,MAAM,0BAA0B,mBACrB,eAAe,YACrB,MAAM,KACf,OAeF,CAAC;AAEF,eAAO,MAAM,gBAAgB,aAAc,MAAM,uBAGhD,CAAC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAWvC,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,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAEvE;AAED,eAAO,MAAM,YAAY,mBACyC,CAAC;AAEnE,eAAO,MAAM,WAAW,mBAC8C,CAAC;AAsDvE,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,KAAK,EACb,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CA0GR"}
@@ -15,6 +15,7 @@ export declare function setConfig(name: keyof Configs, value: any): any;
15
15
  export declare function initConfig(nextConfigs: Configs): Configs;
16
16
  export declare const DEFAULT_PRIMARY_RADIUS = 20;
17
17
  export declare const DEFAULT_SECONDARY_RADIUS = 25;
18
+ export declare const DEFAULT_FONT_FAMILY = "Roboto";
18
19
  export declare const THEME_CLASS_NAME_PREFIX = "theme-widget";
19
20
  export declare const isTokenExcludedInConfig: (token: Token | null, tokensConfig?: TokensConfig) => boolean;
20
21
  export declare const isBlockchainExcludedInConfig: (blockchain: BlockchainMeta | null, blockchainsConfig?: string[]) => boolean | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../src/utils/configs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAM9D,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,KAAK,YAAY,GACb,KAAK,EAAE,GACP;IACE,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B,CAAC;AAMN,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,UAE5C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,GAAG,OAIxD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,OAAO,WAS9C;AAED,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AAEtD,eAAO,MAAM,uBAAuB,UAC3B,KAAK,GAAG,IAAI,iBACJ,YAAY,YAe5B,CAAC;AAEF,eAAO,MAAM,4BAA4B,eAC3B,cAAc,GAAG,IAAI,sBACb,MAAM,EAAE,+BAO7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,kBACf,OAAO,sBACF,OAAO,YACjB,aAAa,YAMxB,CAAC"}
1
+ {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../src/utils/configs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAM9D,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,KAAK,YAAY,GACb,KAAK,EAAE,GACP;IACE,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B,CAAC;AAMN,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,UAE5C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,GAAG,OAIxD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,OAAO,WAS9C;AAED,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AAEtD,eAAO,MAAM,uBAAuB,UAC3B,KAAK,GAAG,IAAI,iBACJ,YAAY,YAe5B,CAAC;AAEF,eAAO,MAAM,4BAA4B,eAC3B,cAAc,GAAG,IAAI,sBACb,MAAM,EAAE,+BAO7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,kBACf,OAAO,sBACF,OAAO,YACjB,aAAa,YAMxB,CAAC"}
@@ -33,6 +33,4 @@ export declare function createTokenHash(token: Asset): TokenHash;
33
33
  export declare function makeTokensBalance(connectedWallets: ConnectedWallet[]): TokensBalance;
34
34
  export declare const isFetchingBalance: (connectedWallets: ConnectedWallet[], blockchain: string) => boolean;
35
35
  export declare function hashWalletsState(walletsInfo: ModalWalletInfo[]): string;
36
- export declare function filterBlockchainsByWalletTypes(wallets: ModalWalletInfo[], blockchains: BlockchainMeta[]): BlockchainMeta[];
37
- export declare function filterWalletsByCategory(wallets: WalletInfoWithNamespaces[], category: string): WalletInfoWithNamespaces[];
38
36
  //# sourceMappingURL=wallets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../src/utils/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,SAAS,EACT,aAAa,EACb,MAAM,EACN,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EACV,KAAK,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,UAAU,EAEX,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,cAAc,EACd,KAAK,EAEL,YAAY,EACb,MAAM,WAAW,CAAC;AAEnB,OAAO,EAEL,WAAW,IAAI,YAAY,EAC5B,MAAM,eAAe,CAAC;AAwBvB,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAWvE;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,WAAW,EAC3C,aAAa,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,UAAU,EAC/C,IAAI,EAAE,UAAU,EAAE,EAClB,KAAK,CAAC,EAAE,MAAM,GACb,wBAAwB,EAAE,CA8C5B;AAED,wBAAgB,6BAA6B,CAC3C,oBAAoB,EAAE,cAAc,EAAE,GACrC,OAAO,EAAE,GAAG,IAAI,CAUlB;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,MAAM,EAAE,EAClB,cAAc,EAAE,MAAM,EAAE,EACxB,mBAAmB,EAAE,OAAO,EAAE,GAAG,IAAI,EACrC,gBAAgB,EAAE,O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AE9D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/widget-embedded",
3
- "version": "0.28.1-next.3",
3
+ "version": "0.28.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -25,11 +25,11 @@
25
25
  "@lingui/core": "4.2.1",
26
26
  "@lingui/react": "4.2.1",
27
27
  "@rango-dev/logging-core": "^0.3.0",
28
- "@rango-dev/provider-all": "^0.33.0",
28
+ "@rango-dev/provider-all": "^0.33.1",
29
29
  "@rango-dev/queue-manager-core": "^0.26.0",
30
- "@rango-dev/queue-manager-rango-preset": "^0.33.0",
30
+ "@rango-dev/queue-manager-rango-preset": "^0.33.1",
31
31
  "@rango-dev/queue-manager-react": "^0.26.0",
32
- "@rango-dev/ui": "^0.34.1-next.1",
32
+ "@rango-dev/ui": "^0.34.0",
33
33
  "@rango-dev/wallets-react": "^0.19.0",
34
34
  "@rango-dev/wallets-shared": "^0.33.0",
35
35
  "bignumber.js": "^9.1.1",
@@ -52,4 +52,4 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  }
55
- }
55
+ }
@@ -1,16 +1,35 @@
1
- import { type BlockchainMeta } from 'rango-sdk';
1
+ import { BlockchainCategories } from '@rango-dev/ui';
2
+ import { type BlockchainMeta, TransactionType } from 'rango-sdk';
2
3
 
3
- import { containsText, isBlockchainTypeInCategory } from '../../utils/common';
4
+ import { containsText } from '../../utils/common';
5
+
6
+ export const filterByType = (
7
+ blockchain: BlockchainMeta,
8
+ type: string
9
+ ): boolean => {
10
+ switch (type) {
11
+ case BlockchainCategories.ALL:
12
+ return true;
13
+ case BlockchainCategories.UTXO:
14
+ return blockchain.type === TransactionType.TRANSFER;
15
+ case BlockchainCategories.OTHER:
16
+ return (
17
+ blockchain.type !== TransactionType.TRANSFER &&
18
+ blockchain.type !== TransactionType.COSMOS &&
19
+ blockchain.type !== TransactionType.EVM
20
+ );
21
+ default:
22
+ return blockchain.type === type;
23
+ }
24
+ };
4
25
 
5
26
  export const filterBlockchains = (
6
27
  list: BlockchainMeta[],
7
28
  searchedFor: string,
8
- blockchainCategory: string
29
+ blockchainType: string
9
30
  ) =>
10
31
  list
11
- .filter((blockchain) =>
12
- isBlockchainTypeInCategory(blockchain.type, blockchainCategory)
13
- )
32
+ .filter((blockchain) => filterByType(blockchain, blockchainType))
14
33
  .filter(
15
34
  (blockchain) =>
16
35
  containsText(blockchain.name, searchedFor) ||
@@ -34,7 +34,7 @@ export const WalletButton = styled('button', {
34
34
  position: 'relative',
35
35
 
36
36
  '&:hover': {
37
- $$color: '$colors$secondary100',
37
+ $$color: '$colors$info100',
38
38
  [`.${darkTheme} &`]: {
39
39
  $$color: '$colors$neutral100',
40
40
  },
@@ -42,7 +42,7 @@ export const WalletButton = styled('button', {
42
42
  },
43
43
 
44
44
  '&:focus-visible': {
45
- $$color: '$colors$secondary100',
45
+ $$color: '$colors$info100',
46
46
  [`.${darkTheme} &`]: {
47
47
  $$color: '$colors$info700',
48
48
  },
@@ -138,14 +138,14 @@ export const CustomDestinationButton = styled('div', {
138
138
  borderBottomRightRadius: '0',
139
139
  borderBottomLeftRadius: '0',
140
140
  '&:hover': {
141
- $$color: '$colors$secondary100',
141
+ $$color: '$colors$info100',
142
142
  [`.${darkTheme} &`]: {
143
143
  $$color: '$colors$neutral100',
144
144
  },
145
145
  backgroundColor: '$$color',
146
146
  },
147
147
  '&:focus-visible': {
148
- $$background: '$colors$secondary100',
148
+ $$background: '$colors$info100',
149
149
  [`.${darkTheme} &`]: {
150
150
  $$background: '$colors$info700',
151
151
  },
@@ -6,7 +6,7 @@ export const HeaderButton = styled(IconButton, {
6
6
  padding: '0',
7
7
  overflow: 'unset',
8
8
  '&:hover': {
9
- backgroundColor: '$secondary100',
9
+ backgroundColor: '$info100',
10
10
  [`.${darkTheme} &`]: {
11
11
  backgroundColor: '$neutral',
12
12
  },
@@ -147,7 +147,7 @@ export const SummaryContainer = styled('div', {
147
147
  listItem: false,
148
148
  selected: true,
149
149
  css: {
150
- $$color: '$colors$secondary100',
150
+ $$color: '$colors$info100',
151
151
  [`.${darkTheme} &`]: {
152
152
  $$color: '$colors$secondary600',
153
153
  },
@@ -67,7 +67,7 @@ export function Slippage() {
67
67
  step="0.01"
68
68
  fullWidth
69
69
  variant="contained"
70
- value={customSlippage === null ? '' : customSlippage}
70
+ value={customSlippage || ''}
71
71
  color="dark"
72
72
  onChange={(event) => {
73
73
  const value = event.target.value;
@@ -1,85 +1 @@
1
1
  export const DEFAULT_FONT_FAMILY = 'Roboto';
2
-
3
- export const SUPPORTED_FONTS = [
4
- {
5
- name: 'Roboto',
6
- value: 'Roboto',
7
- url: '',
8
- },
9
- {
10
- name: 'Times New Roman',
11
- value: 'Times New Roman',
12
- url: 'https://fonts.cdnfonts.com/css/times-new-roman',
13
- },
14
- {
15
- name: 'Arial',
16
- value: 'Arial',
17
- url: '',
18
- },
19
- {
20
- name: 'Open Sans',
21
- value: 'Open Sans',
22
- url: 'https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap',
23
- },
24
- {
25
- name: 'Noto Sans',
26
- value: 'Noto Sans',
27
- url: 'https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap',
28
- },
29
- {
30
- name: 'Montserrat',
31
- value: 'Montserrat',
32
- url: 'https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap',
33
- },
34
- {
35
- name: 'Poppins',
36
- value: 'Poppins',
37
- url: 'https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap',
38
- },
39
- {
40
- name: 'Roboto Condensed',
41
- value: 'Roboto Condensed',
42
- url: 'https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&display=swap',
43
- },
44
-
45
- {
46
- name: 'Roboto Mono',
47
- value: 'Roboto Mono',
48
- url: 'https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap',
49
- },
50
- {
51
- name: 'Oswald',
52
- value: 'Oswald',
53
- url: 'https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap',
54
- },
55
- {
56
- name: 'Raleway',
57
- value: 'Raleway',
58
- url: 'https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap',
59
- },
60
- {
61
- name: 'Sedan',
62
- value: 'Sedan',
63
- url: 'https://fonts.googleapis.com/css2?family=Sedan:ital@0;1&display=swap',
64
- },
65
- {
66
- name: 'Inter',
67
- value: 'Inter',
68
- url: 'https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap',
69
- },
70
- {
71
- name: 'Rubik',
72
- value: 'Rubik',
73
- url: 'https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap',
74
- },
75
- {
76
- name: 'Lora',
77
- value: 'Lora',
78
- url: 'https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap',
79
- },
80
- {
81
- name: 'Barlow Condensed',
82
- value: 'Barlow Condensed',
83
- url: 'https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap',
84
- },
85
- ];
@@ -1,10 +1,9 @@
1
1
  import type { PropTypes } from './WidgetProvider.types';
2
2
  import type { PropsWithChildren } from 'react';
3
3
 
4
- import React, { useEffect, useMemo } from 'react';
4
+ import React, { useMemo } from 'react';
5
5
 
6
6
  import { DEFAULT_BASE_URL, RANGO_PUBLIC_API_KEY } from '../../constants';
7
- import useFontLoader from '../../hooks/useFontLoader';
8
7
  import QueueManager from '../../QueueManager';
9
8
  import { initConfig } from '../../utils/configs';
10
9
  import { WidgetWallets } from '../Wallets';
@@ -20,16 +19,6 @@ export function WidgetProvider(props: PropsWithChildren<PropTypes>) {
20
19
  });
21
20
  }, [config.apiKey, config.apiUrl]);
22
21
 
23
- const fontFamily = props.config?.theme?.fontFamily;
24
-
25
- const { handleLoadCustomFont } = useFontLoader();
26
-
27
- useEffect(() => {
28
- if (fontFamily) {
29
- handleLoadCustomFont(fontFamily);
30
- }
31
- }, [fontFamily]);
32
-
33
22
  return (
34
23
  <WidgetWallets config={config} onUpdateState={onUpdateState}>
35
24
  <QueueManager apiKey={config.apiKey}>
@@ -2,6 +2,8 @@ import { globalCss } from '@rango-dev/ui';
2
2
 
3
3
  export const globalFont = () =>
4
4
  globalCss({
5
- '@import':
5
+ '@import': [
6
6
  "url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap')",
7
+ "url('https://fonts.cdnfonts.com/css/times-new-roman')",
8
+ ],
7
9
  })();
@@ -16,8 +16,8 @@ import { useForceAutoConnect } from '../useForceAutoConnect';
16
16
  import { useSubscribeToWidgetEvents } from '../useSubscribeToWidgetEvents';
17
17
 
18
18
  export function useBootstrap() {
19
- useForceAutoConnect();
20
19
  globalFont();
20
+ useForceAutoConnect();
21
21
  useSubscribeToWidgetEvents();
22
22
  const blockchains = useAppStore().blockchains();
23
23
  const { canSwitchNetworkTo } = useWallets();
@@ -6,10 +6,10 @@ import {
6
6
  } from '@rango-dev/ui';
7
7
  import { useEffect, useState } from 'react';
8
8
 
9
- import { DEFAULT_FONT_FAMILY } from '../constants/fonts';
10
9
  import { useAppStore } from '../store/AppStore';
11
10
  import { type WidgetTheme } from '../types';
12
11
  import {
12
+ DEFAULT_FONT_FAMILY,
13
13
  DEFAULT_PRIMARY_RADIUS,
14
14
  DEFAULT_SECONDARY_RADIUS,
15
15
  } from '../utils/configs';
package/src/index.ts CHANGED
@@ -59,7 +59,6 @@ import { Networks, WalletTypes } from '@rango-dev/wallets-shared';
59
59
  import { PendingSwapNetworkStatus } from 'rango-types';
60
60
 
61
61
  import { WIDGET_UI_ID as UI_ID } from './constants';
62
- import { SUPPORTED_FONTS } from './constants/fonts';
63
62
  import { WidgetWallets } from './containers/Wallets';
64
63
  import { Widget } from './containers/Widget';
65
64
  import { useWidget } from './containers/WidgetInfo';
@@ -114,7 +113,6 @@ export {
114
113
  StepExecutionEventStatus,
115
114
  StepExecutionBlockedEventStatus,
116
115
  UI_ID,
117
- SUPPORTED_FONTS,
118
116
  };
119
117
 
120
118
  // Internal type exports for Rango
@@ -1,7 +1,7 @@
1
1
  import { i18n } from '@lingui/core';
2
2
  import {
3
3
  Divider,
4
- getCategoriesCount,
4
+ getCountCategories,
5
5
  SelectableCategoryList,
6
6
  } from '@rango-dev/ui';
7
7
  import React, { useState } from 'react';
@@ -30,9 +30,9 @@ export function SelectBlockchainPage(props: PropTypes) {
30
30
  type,
31
31
  });
32
32
 
33
- const activeCategoriesCount = getCategoriesCount(blockchains);
33
+ const countActiveCategories = getCountCategories(blockchains);
34
34
 
35
- const showCategory = activeCategoriesCount !== 1;
35
+ const showCategory = countActiveCategories !== 1;
36
36
 
37
37
  return (
38
38
  <Layout
@@ -1,15 +1,7 @@
1
1
  import type { Namespace, WalletType } from '@rango-dev/wallets-shared';
2
2
 
3
3
  import { i18n } from '@lingui/core';
4
- import {
5
- Divider,
6
- getCategoriesCount,
7
- SelectableCategoryList,
8
- styled,
9
- Typography,
10
- Wallet,
11
- WalletState,
12
- } from '@rango-dev/ui';
4
+ import { styled, Typography, Wallet, WalletState } from '@rango-dev/ui';
13
5
  import React, { useState } from 'react';
14
6
 
15
7
  import { Layout, PageContainer } from '../components/Layout';
@@ -19,10 +11,6 @@ import { useWalletList } from '../hooks/useWalletList';
19
11
  import { useAppStore } from '../store/AppStore';
20
12
  import { useUiStore } from '../store/ui';
21
13
  import { getContainer } from '../utils/common';
22
- import {
23
- filterBlockchainsByWalletTypes,
24
- filterWalletsByCategory,
25
- } from '../utils/wallets';
26
14
 
27
15
  interface NamespacesModalState {
28
16
  providerType: string;
@@ -49,9 +37,6 @@ export const TIME_TO_IGNORE_MODAL = 300;
49
37
 
50
38
  export function WalletsPage() {
51
39
  const { fetchStatus: fetchMetaStatus } = useAppStore();
52
- const [blockchainCategory, setBlockchainCategory] = useState<string>('ALL');
53
- const blockchains = useAppStore().blockchains();
54
-
55
40
  const [openModal, setOpenModal] = useState(false);
56
41
  const [namespacesModalState, setNamespacesModalState] =
57
42
  useState<NamespacesModalState | null>(null);
@@ -89,34 +74,17 @@ export function WalletsPage() {
89
74
  const selectedWalletState =
90
75
  selectedWallet?.state || WalletState.NOT_INSTALLED;
91
76
 
92
- const filteredBlockchains = filterBlockchainsByWalletTypes(list, blockchains);
93
- const activeCategoriesCount = getCategoriesCount(filteredBlockchains);
94
- const showCategory = activeCategoriesCount !== 1;
95
-
96
- const filteredWallets = filterWalletsByCategory(list, blockchainCategory);
97
-
98
77
  return (
99
78
  <Layout
100
79
  header={{
101
80
  title: i18n.t('Connect Wallets'),
102
81
  }}>
103
82
  <Container>
104
- {showCategory && (
105
- <>
106
- <SelectableCategoryList
107
- setCategory={setBlockchainCategory}
108
- category={blockchainCategory}
109
- blockchains={filteredBlockchains}
110
- isLoading={fetchMetaStatus === 'loading'}
111
- />
112
- <Divider size={24} />
113
- </>
114
- )}
115
83
  <Typography variant="title" size="xmedium" align="center">
116
84
  {i18n.t('Choose a wallet to connect.')}
117
85
  </Typography>
118
86
  <ListContainer>
119
- {filteredWallets.map((wallet, index) => {
87
+ {list.map((wallet, index) => {
120
88
  const key = `wallet-${index}-${wallet.type}`;
121
89
  return (
122
90
  <Wallet
@@ -28,7 +28,7 @@ export type WidgetColors = {
28
28
  * radius, width, and height.
29
29
  * @property {'auto' | 'light' | 'dark'} mode - The mode property is used to specify the default theme for
30
30
  * the widget.
31
- * @property {string} fontFamily - The font family to be used in the widget. If you want to do this, include the font of your choice in your HTML file.
31
+ * @property {string} fontFamily - The font family to be used in the widget.
32
32
  * @property {{ light?: WidgetColors; dark?: WidgetColors }} colors - The `colors` property is a sub-property of the `WidgetTheme` object that
33
33
  * defines the color scheme for the widget. It is of type `Colors`, which is likely another object that
34
34
  * contains specific color values for various parts of the widget (e.g. background color, text color,
@@ -1,10 +1,6 @@
1
1
  import type { Token } from 'rango-sdk';
2
2
 
3
- import { BlockchainCategories } from '@rango-dev/ui';
4
- import { TransactionType } from 'rango-sdk';
5
-
6
3
  import { WIDGET_UI_ID } from '../constants';
7
- import { SUPPORTED_FONTS } from '../constants/fonts';
8
4
  import {
9
5
  MIN_LENGTH_SYMBOL_CONTAINS,
10
6
  MIN_LENGTH_SYMBOL_START_WITH,
@@ -222,28 +218,3 @@ export function compareWithSearchFor(
222
218
 
223
219
  return 0;
224
220
  }
225
-
226
- export const isBlockchainTypeInCategory = (
227
- blockchainType: TransactionType,
228
- category: string
229
- ): boolean => {
230
- switch (category) {
231
- case BlockchainCategories.ALL:
232
- return true;
233
- case BlockchainCategories.UTXO:
234
- return blockchainType === TransactionType.TRANSFER;
235
- case BlockchainCategories.OTHER:
236
- return (
237
- blockchainType !== TransactionType.TRANSFER &&
238
- blockchainType !== TransactionType.COSMOS &&
239
- blockchainType !== TransactionType.EVM
240
- );
241
- default:
242
- return blockchainType === category;
243
- }
244
- };
245
-
246
- export const getFontUrlByName = (fontName: string) => {
247
- const font = SUPPORTED_FONTS.find((font) => font.value === fontName);
248
- return font?.url;
249
- };
@@ -46,6 +46,7 @@ export function initConfig(nextConfigs: Configs) {
46
46
 
47
47
  export const DEFAULT_PRIMARY_RADIUS = 20;
48
48
  export const DEFAULT_SECONDARY_RADIUS = 25;
49
+ export const DEFAULT_FONT_FAMILY = 'Roboto';
49
50
 
50
51
  export const THEME_CLASS_NAME_PREFIX = `theme-widget`;
51
52
 
@@ -16,17 +16,9 @@ import type {
16
16
  WalletType,
17
17
  WalletTypes,
18
18
  } from '@rango-dev/wallets-shared';
19
- import type {
20
- BlockchainMeta,
21
- Token,
22
- TransactionType,
23
- WalletDetail,
24
- } from 'rango-sdk';
19
+ import type { BlockchainMeta, Token, WalletDetail } from 'rango-sdk';
25
20
 
26
- import {
27
- BlockchainCategories,
28
- WalletState as WalletStatus,
29
- } from '@rango-dev/ui';
21
+ import { WalletState as WalletStatus } from '@rango-dev/ui';
30
22
  import { readAccountAddress } from '@rango-dev/wallets-react';
31
23
  import {
32
24
  detectInstallLink,
@@ -47,7 +39,6 @@ import {
47
39
  } from '../constants/routing';
48
40
  import { EXCLUDED_WALLETS } from '../constants/wallets';
49
41
 
50
- import { isBlockchainTypeInCategory, removeDuplicateFrom } from './common';
51
42
  import { numberToString } from './numbers';
52
43
 
53
44
  export function mapStatusToWalletState(state: WalletState): WalletStatus {
@@ -73,7 +64,6 @@ export function mapWalletTypesToWalletInfo(
73
64
  .filter((wallet) => !EXCLUDED_WALLETS.includes(wallet as WalletTypes))
74
65
  .filter((wallet) => {
75
66
  const { supportedChains, isContractWallet } = getWalletInfo(wallet);
76
-
77
67
  const { installed, network } = getState(wallet);
78
68
  const filterContractWallets =
79
69
  isContractWallet && (!installed || (!!chain && network !== chain));
@@ -95,12 +85,7 @@ export function mapWalletTypesToWalletInfo(
95
85
  showOnMobile,
96
86
  namespaces,
97
87
  singleNamespace,
98
- supportedChains,
99
88
  } = getWalletInfo(type);
100
- const blockchainTypes = removeDuplicateFrom(
101
- supportedChains.map((item) => item.type)
102
- );
103
-
104
89
  const state = mapStatusToWalletState(getState(type));
105
90
  return {
106
91
  title: name,
@@ -111,7 +96,6 @@ export function mapWalletTypesToWalletInfo(
111
96
  showOnMobile,
112
97
  namespaces,
113
98
  singleNamespace,
114
- blockchainTypes,
115
99
  };
116
100
  });
117
101
  }
@@ -554,38 +538,3 @@ export const isFetchingBalance = (
554
538
  export function hashWalletsState(walletsInfo: ModalWalletInfo[]) {
555
539
  return walletsInfo.map((w) => w.state).join('-');
556
540
  }
557
-
558
- export function filterBlockchainsByWalletTypes(
559
- wallets: ModalWalletInfo[],
560
- blockchains: BlockchainMeta[]
561
- ) {
562
- const uniqueBlockchainTypes = new Set<TransactionType>();
563
- wallets.forEach((wallet) => {
564
- wallet.blockchainTypes.forEach((type) => {
565
- uniqueBlockchainTypes.add(type);
566
- });
567
- });
568
- const filteredBlockchains = blockchains.filter((blockchain) =>
569
- uniqueBlockchainTypes.has(blockchain.type)
570
- );
571
-
572
- return filteredBlockchains;
573
- }
574
-
575
- export function filterWalletsByCategory(
576
- wallets: WalletInfoWithNamespaces[],
577
- category: string
578
- ) {
579
- if (category === BlockchainCategories.ALL) {
580
- return wallets;
581
- }
582
-
583
- return wallets.filter((wallet) => {
584
- for (const type of wallet.blockchainTypes) {
585
- if (isBlockchainTypeInCategory(type, category)) {
586
- return true;
587
- }
588
- }
589
- return false;
590
- });
591
- }
@@ -1,5 +0,0 @@
1
- declare const useFontLoader: () => {
2
- handleLoadCustomFont: (fontName: string) => void;
3
- };
4
- export default useFontLoader;
5
- //# sourceMappingURL=useFontLoader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFontLoader.d.ts","sourceRoot":"","sources":["../../src/hooks/useFontLoader.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,aAAa;qCAkBuB,MAAM;CAU/C,CAAC;AAEF,eAAe,aAAa,CAAC"}