diff --git a/package.json b/package.json index 54aeae7b08..04cc146d47 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@typescript-eslint/eslint-plugin": "^7.12.0", "@typescript-eslint/parser": "^7.12.0", "@vitejs/plugin-react-swc": "^3.7.0", - "@w3ux/types": "^0.2.0", + "@w3ux/types": "0.2.1-beta.1", "eslint": "8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.3", diff --git a/packages/app/package.json b/packages/app/package.json index b690289ec3..4a00d9f6f3 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -30,7 +30,7 @@ "@substrate/connect": "^2.0.1", "@w3ux/extension-assets": "^0.4.0", "@w3ux/factories": "^1.0.0", - "@w3ux/hooks": "^1.2.1", + "@w3ux/hooks": "^1.3.1-beta.7", "@w3ux/react-connect-kit": "^1.8.0", "@w3ux/react-odometer": "^1.1.0", "@w3ux/react-polkicon": "^2.0.1-alpha.0", diff --git a/packages/app/src/canvas/PoolMembers/Prompts/UnbondMember.tsx b/packages/app/src/canvas/PoolMembers/Prompts/UnbondMember.tsx index bada696283..8a5bf09002 100644 --- a/packages/app/src/canvas/PoolMembers/Prompts/UnbondMember.tsx +++ b/packages/app/src/canvas/PoolMembers/Prompts/UnbondMember.tsx @@ -12,7 +12,7 @@ import { Warning } from 'library/Form/Warning'; import { useErasToTimeLeft } from 'hooks/useErasToTimeLeft'; import { useSignerWarnings } from 'hooks/useSignerWarnings'; import { useSubmitExtrinsic } from 'hooks/useSubmitExtrinsic'; -import { timeleftAsString } from 'hooks/useTimeLeft/utils'; +import { timeleftAsString, planckToUnitBn } from 'library/Utils'; import { SubmitTx } from 'library/SubmitTx'; import { StaticNote } from 'modals/Utils/StaticNote'; import { useNetwork } from 'contexts/Network'; @@ -23,7 +23,6 @@ import { Title } from 'library/Prompt/Title'; import { ModalPadding } from 'kits/Overlay/structure/ModalPadding'; import { ModalWarnings } from 'kits/Overlay/structure/ModalWarnings'; import { ModalNotes } from 'kits/Overlay/structure/ModalNotes'; -import { planckToUnitBn } from 'library/Utils'; export const UnbondMember = ({ who, diff --git a/packages/app/src/hooks/useTimeLeft/defaults.ts b/packages/app/src/hooks/useTimeLeft/defaults.ts deleted file mode 100644 index a89f0f045c..0000000000 --- a/packages/app/src/hooks/useTimeLeft/defaults.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2024 @polkadot-cloud/polkadot-staking-dashboard authors & contributors -// SPDX-License-Identifier: GPL-3.0-only - -import type { TimeleftDuration } from './types'; - -export const defaultDuration: TimeleftDuration = { - days: 0, - hours: 0, - minutes: 0, - seconds: 0, - lastMinute: false, -}; - -export const defaultRefreshInterval = 60; diff --git a/packages/app/src/hooks/useTimeLeft/index.tsx b/packages/app/src/hooks/useTimeLeft/index.tsx deleted file mode 100644 index ba0129de84..0000000000 --- a/packages/app/src/hooks/useTimeLeft/index.tsx +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2024 @polkadot-cloud/polkadot-staking-dashboard authors & contributors -// SPDX-License-Identifier: GPL-3.0-only - -import { setStateWithRef } from '@w3ux/utils'; -import { useEffect, useRef, useState } from 'react'; -import type { TimeLeftAll, TimeLeftRaw, TimeleftDuration } from './types'; -import { getDuration } from './utils'; - -export interface UseTimeleftProps { - // Dependencies to trigger re-calculation of timeleft. - depsTimeleft: unknown[]; - // Dependencies to trigger re-render of timeleft, e.g. if language switching occurs. - depsFormat: unknown[]; -} - -export const useTimeLeft = (props?: UseTimeleftProps) => { - const depsTimeleft = props?.depsTimeleft || []; - const depsFormat = props?.depsFormat || []; - - // check whether timeleft is within a minute of finishing. - const inLastHour = () => { - const { days, hours } = getDuration(toRef.current); - return !days && !hours; - }; - - // get the amount of seconds left if timeleft is in the last minute. - const lastMinuteCountdown = () => { - const { seconds } = getDuration(toRef.current); - if (!inLastHour()) { - return 60; - } - return seconds; - }; - - // calculate resulting timeleft object from latest duration. - const getTimeleft = (c?: TimeleftDuration): TimeLeftAll => { - const { days, hours, minutes, seconds } = c || getDuration(toRef.current); - const raw: TimeLeftRaw = { - days, - hours, - minutes, - }; - if (!days && !hours) { - raw.seconds = seconds; - } - return { - raw, - }; - }; - - // the end time as a date. - const [to, setTo] = useState(null); - const toRef = useRef(to); - - // resulting timeleft object to be returned. - const [timeleft, setTimeleft] = useState(getTimeleft()); - - // timeleft refresh intervals. - const [minInterval, setMinInterval] = useState< - ReturnType | undefined - >(undefined); - const minIntervalRef = useRef(minInterval); - - const [secInterval, setSecInterval] = useState< - ReturnType | undefined - >(undefined); - const secIntervalRef = useRef(secInterval); - - // refresh effects. - useEffect(() => { - setTimeleft(getTimeleft()); - if (inLastHour()) { - // refresh timeleft every second. - if (!secIntervalRef.current) { - const interval = setInterval(() => { - if (!inLastHour()) { - clearInterval(secIntervalRef.current); - setStateWithRef(undefined, setSecInterval, secIntervalRef); - } - setTimeleft(getTimeleft()); - }, 1000); - - setStateWithRef(interval, setSecInterval, secIntervalRef); - } - } - // refresh timeleft every minute. - else if (!minIntervalRef.current) { - const interval = setInterval(() => { - if (inLastHour()) { - clearInterval(minIntervalRef.current); - setStateWithRef(undefined, setMinInterval, minIntervalRef); - } - setTimeleft(getTimeleft()); - }, 60000); - setStateWithRef(interval, setMinInterval, minIntervalRef); - } - }, [to, inLastHour(), lastMinuteCountdown(), ...depsTimeleft]); - - // re-render the timeleft upon formatting changes. - useEffect(() => { - setTimeleft(getTimeleft()); - }, [...depsFormat]); - - // clear intervals on unmount - useEffect( - () => () => { - clearInterval(minInterval); - clearInterval(secInterval); - }, - [] - ); - - const setFromNow = (dateFrom: Date, dateTo: Date) => { - setTimeleft(getTimeleft(getDuration(dateFrom))); - setStateWithRef(dateTo, setTo, toRef); - }; - - return { - setFromNow, - timeleft, - }; -}; diff --git a/packages/app/src/hooks/useTimeLeft/types.ts b/packages/app/src/hooks/useTimeLeft/types.ts deleted file mode 100644 index 8f661063e7..0000000000 --- a/packages/app/src/hooks/useTimeLeft/types.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2024 @polkadot-cloud/polkadot-staking-dashboard authors & contributors -// SPDX-License-Identifier: GPL-3.0-only - -export interface TimeleftDuration { - days: number; - hours: number; - minutes: number; - seconds: number; - lastMinute: boolean; -} - -export interface TimeLeftRaw { - days: number; - hours: number; - minutes: number; - seconds?: number; -} - -export interface TimeLeftFormatted { - days: [number, string]; - hours: [number, string]; - minutes: [number, string]; - seconds?: [number, string]; -} - -export interface TimeLeftAll { - raw: TimeLeftRaw; -} - -export interface TimeleftHookProps { - refreshInterval: number; -} diff --git a/packages/app/src/hooks/useTimeLeft/utils.ts b/packages/app/src/hooks/useTimeLeft/utils.ts deleted file mode 100644 index c6a394d3be..0000000000 --- a/packages/app/src/hooks/useTimeLeft/utils.ts +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2024 @polkadot-cloud/polkadot-staking-dashboard authors & contributors -// SPDX-License-Identifier: GPL-3.0-only - -import { - differenceInDays, - fromUnixTime, - getUnixTime, - intervalToDuration, -} from 'date-fns'; -import type { AnyFunction } from '@w3ux/types'; -import { defaultDuration } from './defaults'; -import type { TimeleftDuration } from './types'; - -// adds `seconds` to the current time and returns the resulting date. -export const fromNow = (seconds: number): Date => { - const end = new Date(); - end.setSeconds(end.getSeconds() + seconds); - return end; -}; - -// calculates the current timeleft duration. -export const getDuration = (toDate: Date | null): TimeleftDuration => { - if (!toDate) { - return defaultDuration; - } - if (getUnixTime(toDate) <= getUnixTime(new Date())) { - return defaultDuration; - } - - toDate.setSeconds(toDate.getSeconds()); - const d = intervalToDuration({ - start: Date.now(), - end: toDate, - }); - - const days = differenceInDays(toDate, Date.now()); - const hours = d?.hours || 0; - const minutes = d?.minutes || 0; - const seconds = d?.seconds || 0; - const lastHour = days === 0 && hours === 0; - const lastMinute = lastHour && minutes === 0; - - return { - days, - hours, - minutes, - seconds, - lastMinute, - }; -}; - -// format the duration (from seconds) as a string. -export const timeleftAsString = ( - t: AnyFunction, - start: number, - duration: number, - full?: boolean -) => { - const { days, hours, minutes, seconds } = getDuration( - fromUnixTime(start + duration) || null - ); - - const tHour = `time.${full ? `hour` : `hr`}`; - const tMinute = `time.${full ? `minute` : `min`}`; - - let str = ''; - if (days > 0) { - str += `${days} ${t('time.day', { count: days, ns: 'base' })}`; - } - if (hours > 0) { - if (str) { - str += ', '; - } - str += ` ${hours} ${t(tHour, { count: hours, ns: 'base' })}`; - } - if (minutes > 0) { - if (str) { - str += ', '; - } - str += ` ${minutes} ${t(tMinute, { count: minutes, ns: 'base' })}`; - } - if (!days && !hours) { - if (str) { - str += ', '; - } - str += ` ${seconds}`; - } - return str; -}; diff --git a/packages/app/src/library/Countdown/types.ts b/packages/app/src/library/Countdown/types.ts index 47e46d1d16..306f787d88 100644 --- a/packages/app/src/library/Countdown/types.ts +++ b/packages/app/src/library/Countdown/types.ts @@ -1,7 +1,7 @@ // Copyright 2024 @polkadot-cloud/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { TimeLeftFormatted } from 'hooks/useTimeLeft/types'; +import type { TimeLeftFormatted } from '@w3ux/types'; export interface CountdownProps { timeleft: TimeLeftFormatted; diff --git a/packages/app/src/library/StatBoxList/types.ts b/packages/app/src/library/StatBoxList/types.ts index 547440f9e8..b448c8df98 100644 --- a/packages/app/src/library/StatBoxList/types.ts +++ b/packages/app/src/library/StatBoxList/types.ts @@ -1,7 +1,7 @@ // Copyright 2024 @polkadot-cloud/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { TimeLeftFormatted } from 'hooks/useTimeLeft/types'; +import type { TimeLeftFormatted } from '@w3ux/types'; export interface NumberProps { label: string; diff --git a/packages/app/src/library/Utils/index.ts b/packages/app/src/library/Utils/index.ts index 03f80a855c..e0854c0098 100644 --- a/packages/app/src/library/Utils/index.ts +++ b/packages/app/src/library/Utils/index.ts @@ -3,7 +3,9 @@ import { planckToUnit, rmCommas } from '@w3ux/utils'; import BigNumber from 'bignumber.js'; -import type { TimeLeftFormatted, TimeLeftRaw } from 'hooks/useTimeLeft/types'; +import { fromUnixTime } from 'date-fns'; +import type { TimeLeftFormatted, TimeLeftRaw } from '@w3ux/types'; +import { getDurationFromNow } from '@w3ux/hooks/util'; import type { TFunction } from 'i18next'; // Return `planckToUnit` as a `BigNumber`. @@ -37,3 +39,42 @@ export const formatTimeleft = ( } return formatted; }; + +// format the duration (from seconds) as a string. +export const timeleftAsString = ( + t: TFunction, + start: number, + duration: number, + full?: boolean +) => { + const { days, hours, minutes, seconds } = getDurationFromNow( + fromUnixTime(start + duration) || null + ); + + const tHour = `time.${full ? `hour` : `hr`}`; + const tMinute = `time.${full ? `minute` : `min`}`; + + let str = ''; + if (days > 0) { + str += `${days} ${t('time.day', { count: days, ns: 'base' })}`; + } + if (hours > 0) { + if (str) { + str += ', '; + } + str += ` ${hours} ${t(tHour, { count: hours, ns: 'base' })}`; + } + if (minutes > 0) { + if (str) { + str += ', '; + } + str += ` ${minutes} ${t(tMinute, { count: minutes, ns: 'base' })}`; + } + if (!days && !hours) { + if (str) { + str += ', '; + } + str += ` ${seconds}`; + } + return str; +}; diff --git a/packages/app/src/library/WithdrawPrompt/index.tsx b/packages/app/src/library/WithdrawPrompt/index.tsx index c553910bd3..1044740638 100644 --- a/packages/app/src/library/WithdrawPrompt/index.tsx +++ b/packages/app/src/library/WithdrawPrompt/index.tsx @@ -11,7 +11,7 @@ import { useNetwork } from 'contexts/Network'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { useSyncing } from 'hooks/useSyncing'; import { ButtonPrimary } from 'ui-buttons'; -import { timeleftAsString } from 'hooks/useTimeLeft/utils'; +import { timeleftAsString } from 'library/Utils'; import { getUnixTime } from 'date-fns'; import { useErasToTimeLeft } from 'hooks/useErasToTimeLeft'; import { useApi } from 'contexts/Api'; diff --git a/packages/app/src/modals/ManagePool/Forms/LeavePool/index.tsx b/packages/app/src/modals/ManagePool/Forms/LeavePool/index.tsx index 96f2fdc5bb..468189a323 100644 --- a/packages/app/src/modals/ManagePool/Forms/LeavePool/index.tsx +++ b/packages/app/src/modals/ManagePool/Forms/LeavePool/index.tsx @@ -14,7 +14,7 @@ import { Warning } from 'library/Form/Warning'; import { useErasToTimeLeft } from 'hooks/useErasToTimeLeft'; import { useSignerWarnings } from 'hooks/useSignerWarnings'; import { useSubmitExtrinsic } from 'hooks/useSubmitExtrinsic'; -import { timeleftAsString } from 'hooks/useTimeLeft/utils'; +import { timeleftAsString, planckToUnitBn } from 'library/Utils'; import { SubmitTx } from 'library/SubmitTx'; import { StaticNote } from 'modals/Utils/StaticNote'; import { useOverlay } from 'kits/Overlay/Provider'; @@ -24,7 +24,6 @@ import { ButtonSubmitInvert } from 'ui-buttons'; import { ModalPadding } from 'kits/Overlay/structure/ModalPadding'; import { ModalWarnings } from 'kits/Overlay/structure/ModalWarnings'; import { ActionItem } from 'library/ActionItem'; -import { planckToUnitBn } from 'library/Utils'; export const LeavePool = ({ setSection, diff --git a/packages/app/src/modals/Unbond/index.tsx b/packages/app/src/modals/Unbond/index.tsx index ccd85df538..28f7c3358a 100644 --- a/packages/app/src/modals/Unbond/index.tsx +++ b/packages/app/src/modals/Unbond/index.tsx @@ -16,7 +16,7 @@ import { Warning } from 'library/Form/Warning'; import { useErasToTimeLeft } from 'hooks/useErasToTimeLeft'; import { useSignerWarnings } from 'hooks/useSignerWarnings'; import { useSubmitExtrinsic } from 'hooks/useSubmitExtrinsic'; -import { timeleftAsString } from 'hooks/useTimeLeft/utils'; +import { timeleftAsString, planckToUnitBn } from 'library/Utils'; import { Close } from 'library/Modal/Close'; import { SubmitTx } from 'library/SubmitTx'; import { StaticNote } from 'modals/Utils/StaticNote'; @@ -26,7 +26,6 @@ import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { ModalPadding } from 'kits/Overlay/structure/ModalPadding'; import { ModalWarnings } from 'kits/Overlay/structure/ModalWarnings'; import { ModalNotes } from 'kits/Overlay/structure/ModalNotes'; -import { planckToUnitBn } from 'library/Utils'; export const Unbond = () => { const { t } = useTranslation('modals'); diff --git a/packages/app/src/modals/UnlockChunks/Chunk.tsx b/packages/app/src/modals/UnlockChunks/Chunk.tsx index 89f3d321ea..e2c3d2022a 100644 --- a/packages/app/src/modals/UnlockChunks/Chunk.tsx +++ b/packages/app/src/modals/UnlockChunks/Chunk.tsx @@ -7,7 +7,7 @@ import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { Countdown } from 'library/Countdown'; import { useErasToTimeLeft } from 'hooks/useErasToTimeLeft'; -import { useTimeLeft } from 'hooks/useTimeLeft'; +import { useTimeLeft } from '@w3ux/hooks'; import { useUnstaking } from 'hooks/useUnstaking'; import { useNetwork } from 'contexts/Network'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; diff --git a/packages/app/src/modals/UnlockChunks/Overview.tsx b/packages/app/src/modals/UnlockChunks/Overview.tsx index 56bf847342..71caa169b7 100644 --- a/packages/app/src/modals/UnlockChunks/Overview.tsx +++ b/packages/app/src/modals/UnlockChunks/Overview.tsx @@ -10,7 +10,7 @@ import { forwardRef } from 'react'; import { useTranslation } from 'react-i18next'; import { useApi } from 'contexts/Api'; import { useErasToTimeLeft } from 'hooks/useErasToTimeLeft'; -import { timeleftAsString } from 'hooks/useTimeLeft/utils'; +import { timeleftAsString, planckToUnitBn } from 'library/Utils'; import { useUnstaking } from 'hooks/useUnstaking'; import { StatWrapper, StatsWrapper } from 'library/Modal/Wrappers'; import { StaticNote } from 'modals/Utils/StaticNote'; @@ -22,7 +22,6 @@ import type { UnlockChunk } from 'contexts/Balances/types'; import { ButtonSubmit } from 'ui-buttons'; import { ModalPadding } from 'kits/Overlay/structure/ModalPadding'; import { ModalNotes } from 'kits/Overlay/structure/ModalNotes'; -import { planckToUnitBn } from 'library/Utils'; interface OverviewProps { unlocking: UnlockChunk[]; diff --git a/packages/app/src/modals/Unstake/index.tsx b/packages/app/src/modals/Unstake/index.tsx index 3907bda26d..4e113fbb20 100644 --- a/packages/app/src/modals/Unstake/index.tsx +++ b/packages/app/src/modals/Unstake/index.tsx @@ -13,7 +13,7 @@ import { useBatchCall } from 'hooks/useBatchCall'; import { useErasToTimeLeft } from 'hooks/useErasToTimeLeft'; import { useSignerWarnings } from 'hooks/useSignerWarnings'; import { useSubmitExtrinsic } from 'hooks/useSubmitExtrinsic'; -import { timeleftAsString } from 'hooks/useTimeLeft/utils'; +import { timeleftAsString, planckToUnitBn } from 'library/Utils'; import { Close } from 'library/Modal/Close'; import { SubmitTx } from 'library/SubmitTx'; import { StaticNote } from 'modals/Utils/StaticNote'; @@ -25,7 +25,6 @@ import { useBalances } from 'contexts/Balances'; import { ModalPadding } from 'kits/Overlay/structure/ModalPadding'; import { ModalWarnings } from 'kits/Overlay/structure/ModalWarnings'; import { ActionItem } from 'library/ActionItem'; -import { planckToUnitBn } from 'library/Utils'; export const Unstake = () => { const { t } = useTranslation('modals'); diff --git a/packages/app/src/pages/Overview/Stats/ActiveEraTimeLeft.tsx b/packages/app/src/pages/Overview/Stats/ActiveEraTimeLeft.tsx index f842846a8a..4cd390c0d5 100644 --- a/packages/app/src/pages/Overview/Stats/ActiveEraTimeLeft.tsx +++ b/packages/app/src/pages/Overview/Stats/ActiveEraTimeLeft.tsx @@ -6,8 +6,8 @@ import { fromUnixTime, getUnixTime } from 'date-fns'; import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { useEraTimeLeft } from 'hooks/useEraTimeLeft'; -import { useTimeLeft } from 'hooks/useTimeLeft'; -import { fromNow } from 'hooks/useTimeLeft/utils'; +import { useTimeLeft } from '@w3ux/hooks'; +import { secondsFromNow } from '@w3ux/hooks/util'; import { Timeleft } from 'library/StatBoxList/Timeleft'; import { useApi } from 'contexts/Api'; import { formatTimeleft } from 'library/Utils'; @@ -29,7 +29,7 @@ export const ActiveEraStat = () => { const timeleftResult = getEraTimeleft(); const dateFrom = fromUnixTime(Date.now() / 1000); const formatted = formatTimeleft(t, timeleft.raw); - const dateTo = fromNow(timeleftResult.timeleft.toNumber()); + const dateTo = secondsFromNow(timeleftResult.timeleft.toNumber()); const dateToUnix = getUnixTime(dateTo); // re-set timer on era change (also covers network change). diff --git a/yarn.lock b/yarn.lock index aeb8541cf3..134b75ff62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3792,7 +3792,7 @@ __metadata: languageName: node linkType: hard -"@w3ux/hooks@npm:^1.1.0, @w3ux/hooks@npm:^1.2.1": +"@w3ux/hooks@npm:^1.1.0": version: 1.2.1 resolution: "@w3ux/hooks@npm:1.2.1" peerDependencies: @@ -3801,6 +3801,18 @@ __metadata: languageName: node linkType: hard +"@w3ux/hooks@npm:^1.3.1-beta.7": + version: 1.3.1-beta.7 + resolution: "@w3ux/hooks@npm:1.3.1-beta.7" + dependencies: + "@w3ux/utils": "npm:^1.1.1-beta.9" + date-fns: "npm:^4.1.0" + peerDependencies: + react: ^18 + checksum: 10c0/e1b936275254901bff5432102a428c7b9d7f7b53791ae2e83e49079d7aaae0deeec2639f254d7857d8f8cef2141d554907fb1b1d36a739a8f3f78ee548658cfe + languageName: node + linkType: hard + "@w3ux/react-connect-kit@npm:^1.8.0": version: 1.8.0 resolution: "@w3ux/react-connect-kit@npm:1.8.0" @@ -3833,6 +3845,13 @@ __metadata: languageName: node linkType: hard +"@w3ux/types@npm:0.2.1-beta.1": + version: 0.2.1-beta.1 + resolution: "@w3ux/types@npm:0.2.1-beta.1" + checksum: 10c0/34336e708a7b4881476cc8b88c716d331a00cb44e32ba2a6223ded45efb30d1a574c4e3f92fc3449089196a3860c2740c1bf3c97e5ddf176b62addab6ff2628b + languageName: node + linkType: hard + "@w3ux/types@npm:^0.2.0": version: 0.2.0 resolution: "@w3ux/types@npm:0.2.0" @@ -4410,7 +4429,7 @@ __metadata: "@substrate/connect": "npm:^2.0.1" "@w3ux/extension-assets": "npm:^0.4.0" "@w3ux/factories": "npm:^1.0.0" - "@w3ux/hooks": "npm:^1.2.1" + "@w3ux/hooks": "npm:^1.3.1-beta.7" "@w3ux/react-connect-kit": "npm:^1.8.0" "@w3ux/react-odometer": "npm:^1.1.0" "@w3ux/react-polkicon": "npm:^2.0.1-alpha.0" @@ -8819,7 +8838,7 @@ __metadata: "@typescript-eslint/eslint-plugin": "npm:^7.12.0" "@typescript-eslint/parser": "npm:^7.12.0" "@vitejs/plugin-react-swc": "npm:^3.7.0" - "@w3ux/types": "npm:^0.2.0" + "@w3ux/types": "npm:0.2.1-beta.1" classnames: "npm:^2.5.1" eslint: "npm:8.57.0" eslint-config-prettier: "npm:^9.1.0"