From a0f51c6d7664824543ad3f2a6ab672d01ca0a91b Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 10 Sep 2024 17:17:54 +0200 Subject: [PATCH 1/4] fix: make internal explorer optional --- packages/widget/src/types/widget.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/widget/src/types/widget.ts b/packages/widget/src/types/widget.ts index 9790b41eb..09000abf3 100644 --- a/packages/widget/src/types/widget.ts +++ b/packages/widget/src/types/widget.ts @@ -224,7 +224,8 @@ export interface WidgetConfig { tokens?: WidgetTokens; languages?: WidgetLanguages; languageResources?: LanguageResources; - explorerUrls?: Record; + explorerUrls?: Record & + Partial>; } export interface WidgetConfigProps { From 87e3ba44ccb9199dbbfb3fb37eb099c91cdc43f2 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 10 Sep 2024 17:20:59 +0200 Subject: [PATCH 2/4] chore(release): 3.5.1 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- packages/widget-embedded/package.json | 4 ++-- packages/widget-playground-next/package.json | 6 +++--- packages/widget-playground-vite/package.json | 6 +++--- packages/widget-playground/package.json | 2 +- packages/widget/package.json | 2 +- packages/widget/src/config/version.ts | 2 +- yarn.lock | 14 +++++++------- 9 files changed, 26 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2fd95113..fad7c96e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.5.1](https://github.com/lifinance/widget/compare/v3.5.0...v3.5.1) (2024-09-10) + + +### Bug Fixes + +* make internal explorer optional ([a0f51c6](https://github.com/lifinance/widget/commit/a0f51c6d7664824543ad3f2a6ab672d01ca0a91b)) + ## [3.5.0](https://github.com/lifinance/widget/compare/v3.4.4...v3.5.0) (2024-09-10) diff --git a/package.json b/package.json index 723bbc118..4be2356b1 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "3.5.0", + "version": "3.5.1", "private": true, "sideEffects": false, "type": "module", diff --git a/packages/widget-embedded/package.json b/packages/widget-embedded/package.json index df4df1b7a..11b8171d9 100644 --- a/packages/widget-embedded/package.json +++ b/packages/widget-embedded/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/widget-embedded", - "version": "1.0.218", + "version": "1.0.219", "type": "module", "scripts": { "analyze": "source-map-explorer 'dist/assets/*.js' --no-border-checks", @@ -21,7 +21,7 @@ "dependencies": { "@lifi/sdk": "^3.2.0", "@lifi/wallet-management": "^3.1.4", - "@lifi/widget": "^3.5.0", + "@lifi/widget": "^3.5.1", "@mui/icons-material": "^5.16.7", "@mui/lab": "^5.0.0-alpha.173", "@mui/material": "^5.16.7", diff --git a/packages/widget-playground-next/package.json b/packages/widget-playground-next/package.json index b755a4766..d448d3614 100644 --- a/packages/widget-playground-next/package.json +++ b/packages/widget-playground-next/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/widget-playground-next", - "version": "1.0.218", + "version": "1.0.219", "scripts": { "dev": "next dev -p 3001", "build": "next build", @@ -18,8 +18,8 @@ "@emotion/styled": "^11.13.0", "@lifi/sdk": "^3.2.0", "@lifi/wallet-management": "^3.1.4", - "@lifi/widget": "^3.5.0", - "@lifi/widget-playground": "^1.0.218", + "@lifi/widget": "^3.5.1", + "@lifi/widget-playground": "^1.0.219", "@mui/icons-material": "^5.16.7", "@mui/material": "^5.16.7", "@mui/material-nextjs": "^5.16.6", diff --git a/packages/widget-playground-vite/package.json b/packages/widget-playground-vite/package.json index d8901deb4..862685d27 100644 --- a/packages/widget-playground-vite/package.json +++ b/packages/widget-playground-vite/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/widget-playground-vite", - "version": "1.0.218", + "version": "1.0.219", "type": "module", "scripts": { "analyze": "source-map-explorer 'dist/assets/*.js' --no-border-checks", @@ -20,8 +20,8 @@ "dependencies": { "@lifi/sdk": "^3.2.0", "@lifi/wallet-management": "^3.1.4", - "@lifi/widget": "^3.5.0", - "@lifi/widget-playground": "^1.0.218", + "@lifi/widget": "^3.5.1", + "@lifi/widget-playground": "^1.0.219", "@mui/icons-material": "^5.16.7", "@mui/material": "^5.16.7", "@rainbow-me/rainbowkit": "^2.1.6", diff --git a/packages/widget-playground/package.json b/packages/widget-playground/package.json index 53ecedd1f..8376ae1a0 100644 --- a/packages/widget-playground/package.json +++ b/packages/widget-playground/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/widget-playground", - "version": "1.0.218", + "version": "1.0.219", "type": "module", "main": "./src/index.ts", "types": "./src/index.d.ts", diff --git a/packages/widget/package.json b/packages/widget/package.json index d731aee20..40eb0c9de 100644 --- a/packages/widget/package.json +++ b/packages/widget/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/widget", - "version": "3.5.0", + "version": "3.5.1", "description": "LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.", "type": "module", "main": "./src/index.ts", diff --git a/packages/widget/src/config/version.ts b/packages/widget/src/config/version.ts index d53cf213d..0e7ccab32 100644 --- a/packages/widget/src/config/version.ts +++ b/packages/widget/src/config/version.ts @@ -1,2 +1,2 @@ export const name = '@lifi/widget'; -export const version = '3.5.0'; +export const version = '3.5.1'; diff --git a/yarn.lock b/yarn.lock index 3070ecaa5..cf21155cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2538,7 +2538,7 @@ __metadata: "@esbuild-plugins/node-globals-polyfill": "npm:^0.2.3" "@lifi/sdk": "npm:^3.2.0" "@lifi/wallet-management": "npm:^3.1.4" - "@lifi/widget": "npm:^3.5.0" + "@lifi/widget": "npm:^3.5.1" "@mui/icons-material": "npm:^5.16.7" "@mui/lab": "npm:^5.0.0-alpha.173" "@mui/material": "npm:^5.16.7" @@ -2569,8 +2569,8 @@ __metadata: "@emotion/styled": "npm:^11.13.0" "@lifi/sdk": "npm:^3.2.0" "@lifi/wallet-management": "npm:^3.1.4" - "@lifi/widget": "npm:^3.5.0" - "@lifi/widget-playground": "npm:^1.0.218" + "@lifi/widget": "npm:^3.5.1" + "@lifi/widget-playground": "npm:^1.0.219" "@mui/icons-material": "npm:^5.16.7" "@mui/material": "npm:^5.16.7" "@mui/material-nextjs": "npm:^5.16.6" @@ -2604,8 +2604,8 @@ __metadata: "@esbuild-plugins/node-globals-polyfill": "npm:^0.2.3" "@lifi/sdk": "npm:^3.2.0" "@lifi/wallet-management": "npm:^3.1.4" - "@lifi/widget": "npm:^3.5.0" - "@lifi/widget-playground": "npm:^1.0.218" + "@lifi/widget": "npm:^3.5.1" + "@lifi/widget-playground": "npm:^1.0.219" "@mui/icons-material": "npm:^5.16.7" "@mui/material": "npm:^5.16.7" "@rainbow-me/rainbowkit": "npm:^2.1.6" @@ -2631,7 +2631,7 @@ __metadata: languageName: unknown linkType: soft -"@lifi/widget-playground@npm:^1.0.218, @lifi/widget-playground@workspace:packages/widget-playground": +"@lifi/widget-playground@npm:^1.0.219, @lifi/widget-playground@workspace:packages/widget-playground": version: 0.0.0-use.local resolution: "@lifi/widget-playground@workspace:packages/widget-playground" dependencies: @@ -2667,7 +2667,7 @@ __metadata: languageName: unknown linkType: soft -"@lifi/widget@npm:^3.5.0, @lifi/widget@workspace:packages/widget": +"@lifi/widget@npm:^3.5.1, @lifi/widget@workspace:packages/widget": version: 0.0.0-use.local resolution: "@lifi/widget@workspace:packages/widget" dependencies: From c33d42abcabaa80c533caae915384dd6d2bc36ab Mon Sep 17 00:00:00 2001 From: Nathan Richards Date: Wed, 11 Sep 2024 12:52:39 +0200 Subject: [PATCH 3/4] fix: widget header with subvariant split (#298) --- .../widget/src/components/AppContainer.tsx | 15 ++++---------- .../widget/src/components/Header/Header.tsx | 11 ++-------- packages/widget/src/hooks/useHeaderHeight.ts | 20 +++++++++++++++++++ 3 files changed, 26 insertions(+), 20 deletions(-) create mode 100644 packages/widget/src/hooks/useHeaderHeight.ts diff --git a/packages/widget/src/components/AppContainer.tsx b/packages/widget/src/components/AppContainer.tsx index 6c6854fb7..12d2bd734 100644 --- a/packages/widget/src/components/AppContainer.tsx +++ b/packages/widget/src/components/AppContainer.tsx @@ -1,10 +1,7 @@ import { Box, Container, ScopedCssBaseline, styled } from '@mui/material'; import type { PropsWithChildren } from 'react'; -import { - maxHeaderHeight, - minHeaderHeight, -} from '../components/Header/Header.js'; import { defaultMaxHeight } from '../config/constants.js'; +import { useHeaderHeight } from '../hooks/useHeaderHeight.js'; import { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js'; import type { WidgetVariant } from '../types/widget.js'; import { ElementId, createElementId } from '../utils/elements.js'; @@ -103,14 +100,10 @@ export const FlexContainer = styled(Container)(({ theme }) => ({ export const AppContainer: React.FC> = ({ children }) => { // const ref = useRef(null); - const { variant, elementId, hiddenUI, theme } = useWidgetConfig(); - + const { variant, elementId, theme } = useWidgetConfig(); + const { headerHeight } = useHeaderHeight(); const positionFixedAdjustment = - theme?.header?.position === 'fixed' - ? hiddenUI?.includes('walletMenu') - ? minHeaderHeight - : maxHeaderHeight - : 0; + theme?.header?.position === 'fixed' ? headerHeight : 0; return ( > = ({ children }) => { const { pathname } = useLocation(); const elementId = useDefaultElementId(); - const { hiddenUI } = useWidgetConfig(); - - const headerHeight = hiddenUI?.includes('walletMenu') - ? minHeaderHeight - : maxHeaderHeight; + const { headerHeight } = useHeaderHeight(); return ( { + const { hiddenUI, subvariant } = useWidgetConfig(); + + const headerHeight = + subvariant === 'split' + ? maxHeaderHeightSubvariantSplit + : hiddenUI?.includes('walletMenu') + ? minHeaderHeight + : maxHeaderHeight; + + return { + headerHeight, + }; +}; From d2845b9e0dd482c7f5d0f9169198d0055da7364b Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Wed, 11 Sep 2024 13:19:58 +0200 Subject: [PATCH 4/4] chore(release): 3.5.2 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- packages/widget-embedded/package.json | 4 ++-- packages/widget-playground-next/package.json | 6 +++--- packages/widget-playground-vite/package.json | 6 +++--- packages/widget-playground/package.json | 2 +- packages/widget/package.json | 2 +- packages/widget/src/config/version.ts | 2 +- yarn.lock | 14 +++++++------- 9 files changed, 26 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fad7c96e5..13307aee9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.5.2](https://github.com/lifinance/widget/compare/v3.5.1...v3.5.2) (2024-09-11) + + +### Bug Fixes + +* widget header with subvariant split ([#298](https://github.com/lifinance/widget/issues/298)) ([c33d42a](https://github.com/lifinance/widget/commit/c33d42abcabaa80c533caae915384dd6d2bc36ab)) + ### [3.5.1](https://github.com/lifinance/widget/compare/v3.5.0...v3.5.1) (2024-09-10) diff --git a/package.json b/package.json index 4be2356b1..8a5ca5c45 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "3.5.1", + "version": "3.5.2", "private": true, "sideEffects": false, "type": "module", diff --git a/packages/widget-embedded/package.json b/packages/widget-embedded/package.json index 11b8171d9..a69bd8e82 100644 --- a/packages/widget-embedded/package.json +++ b/packages/widget-embedded/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/widget-embedded", - "version": "1.0.219", + "version": "1.0.220", "type": "module", "scripts": { "analyze": "source-map-explorer 'dist/assets/*.js' --no-border-checks", @@ -21,7 +21,7 @@ "dependencies": { "@lifi/sdk": "^3.2.0", "@lifi/wallet-management": "^3.1.4", - "@lifi/widget": "^3.5.1", + "@lifi/widget": "^3.5.2", "@mui/icons-material": "^5.16.7", "@mui/lab": "^5.0.0-alpha.173", "@mui/material": "^5.16.7", diff --git a/packages/widget-playground-next/package.json b/packages/widget-playground-next/package.json index d448d3614..eefb98385 100644 --- a/packages/widget-playground-next/package.json +++ b/packages/widget-playground-next/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/widget-playground-next", - "version": "1.0.219", + "version": "1.0.220", "scripts": { "dev": "next dev -p 3001", "build": "next build", @@ -18,8 +18,8 @@ "@emotion/styled": "^11.13.0", "@lifi/sdk": "^3.2.0", "@lifi/wallet-management": "^3.1.4", - "@lifi/widget": "^3.5.1", - "@lifi/widget-playground": "^1.0.219", + "@lifi/widget": "^3.5.2", + "@lifi/widget-playground": "^1.0.220", "@mui/icons-material": "^5.16.7", "@mui/material": "^5.16.7", "@mui/material-nextjs": "^5.16.6", diff --git a/packages/widget-playground-vite/package.json b/packages/widget-playground-vite/package.json index 862685d27..5e5c03bcf 100644 --- a/packages/widget-playground-vite/package.json +++ b/packages/widget-playground-vite/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/widget-playground-vite", - "version": "1.0.219", + "version": "1.0.220", "type": "module", "scripts": { "analyze": "source-map-explorer 'dist/assets/*.js' --no-border-checks", @@ -20,8 +20,8 @@ "dependencies": { "@lifi/sdk": "^3.2.0", "@lifi/wallet-management": "^3.1.4", - "@lifi/widget": "^3.5.1", - "@lifi/widget-playground": "^1.0.219", + "@lifi/widget": "^3.5.2", + "@lifi/widget-playground": "^1.0.220", "@mui/icons-material": "^5.16.7", "@mui/material": "^5.16.7", "@rainbow-me/rainbowkit": "^2.1.6", diff --git a/packages/widget-playground/package.json b/packages/widget-playground/package.json index 8376ae1a0..c9e0d9e9f 100644 --- a/packages/widget-playground/package.json +++ b/packages/widget-playground/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/widget-playground", - "version": "1.0.219", + "version": "1.0.220", "type": "module", "main": "./src/index.ts", "types": "./src/index.d.ts", diff --git a/packages/widget/package.json b/packages/widget/package.json index 40eb0c9de..e3c03ba54 100644 --- a/packages/widget/package.json +++ b/packages/widget/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/widget", - "version": "3.5.1", + "version": "3.5.2", "description": "LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.", "type": "module", "main": "./src/index.ts", diff --git a/packages/widget/src/config/version.ts b/packages/widget/src/config/version.ts index 0e7ccab32..6c06accd3 100644 --- a/packages/widget/src/config/version.ts +++ b/packages/widget/src/config/version.ts @@ -1,2 +1,2 @@ export const name = '@lifi/widget'; -export const version = '3.5.1'; +export const version = '3.5.2'; diff --git a/yarn.lock b/yarn.lock index cf21155cf..ef63b18df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2538,7 +2538,7 @@ __metadata: "@esbuild-plugins/node-globals-polyfill": "npm:^0.2.3" "@lifi/sdk": "npm:^3.2.0" "@lifi/wallet-management": "npm:^3.1.4" - "@lifi/widget": "npm:^3.5.1" + "@lifi/widget": "npm:^3.5.2" "@mui/icons-material": "npm:^5.16.7" "@mui/lab": "npm:^5.0.0-alpha.173" "@mui/material": "npm:^5.16.7" @@ -2569,8 +2569,8 @@ __metadata: "@emotion/styled": "npm:^11.13.0" "@lifi/sdk": "npm:^3.2.0" "@lifi/wallet-management": "npm:^3.1.4" - "@lifi/widget": "npm:^3.5.1" - "@lifi/widget-playground": "npm:^1.0.219" + "@lifi/widget": "npm:^3.5.2" + "@lifi/widget-playground": "npm:^1.0.220" "@mui/icons-material": "npm:^5.16.7" "@mui/material": "npm:^5.16.7" "@mui/material-nextjs": "npm:^5.16.6" @@ -2604,8 +2604,8 @@ __metadata: "@esbuild-plugins/node-globals-polyfill": "npm:^0.2.3" "@lifi/sdk": "npm:^3.2.0" "@lifi/wallet-management": "npm:^3.1.4" - "@lifi/widget": "npm:^3.5.1" - "@lifi/widget-playground": "npm:^1.0.219" + "@lifi/widget": "npm:^3.5.2" + "@lifi/widget-playground": "npm:^1.0.220" "@mui/icons-material": "npm:^5.16.7" "@mui/material": "npm:^5.16.7" "@rainbow-me/rainbowkit": "npm:^2.1.6" @@ -2631,7 +2631,7 @@ __metadata: languageName: unknown linkType: soft -"@lifi/widget-playground@npm:^1.0.219, @lifi/widget-playground@workspace:packages/widget-playground": +"@lifi/widget-playground@npm:^1.0.220, @lifi/widget-playground@workspace:packages/widget-playground": version: 0.0.0-use.local resolution: "@lifi/widget-playground@workspace:packages/widget-playground" dependencies: @@ -2667,7 +2667,7 @@ __metadata: languageName: unknown linkType: soft -"@lifi/widget@npm:^3.5.1, @lifi/widget@workspace:packages/widget": +"@lifi/widget@npm:^3.5.2, @lifi/widget@workspace:packages/widget": version: 0.0.0-use.local resolution: "@lifi/widget@workspace:packages/widget" dependencies: