diff --git a/packages/commonwealth/client/scripts/App.tsx b/packages/commonwealth/client/scripts/App.tsx index 0f2d2b0a47f..70d6ab5ccc9 100644 --- a/packages/commonwealth/client/scripts/App.tsx +++ b/packages/commonwealth/client/scripts/App.tsx @@ -15,6 +15,7 @@ import { openFeatureProvider } from './helpers/feature-flags'; import useAppStatus from './hooks/useAppStatus'; import { trpc, trpcClient } from './utils/trpcClient'; import { AddToHomeScreenPrompt } from './views/components/AddToHomeScreenPrompt'; +import { KnockFeedWrapper } from './views/components/KnockNotifications/KnockFeedWrapper'; import { Mava } from './views/components/Mava'; OpenFeature.setProvider(openFeatureProvider); @@ -31,23 +32,24 @@ const App = () => { {/*@ts-expect-error StrictNullChecks*/} - {isLoading ? ( - - ) : ( - <> - - - - {isAddedToHomeScreen || isMarketingPage ? null : ( - - )} - - )} - + + {isLoading ? ( + + ) : ( + <> + + + + {isAddedToHomeScreen || isMarketingPage ? null : ( + + )} + + )} + {import.meta.env.DEV && } diff --git a/packages/commonwealth/client/scripts/state/api/notifications/useFetchNotifications.ts b/packages/commonwealth/client/scripts/state/api/notifications/useFetchNotifications.ts new file mode 100644 index 00000000000..b88b1322e64 --- /dev/null +++ b/packages/commonwealth/client/scripts/state/api/notifications/useFetchNotifications.ts @@ -0,0 +1,32 @@ +import { + useKnockClient, + useNotifications, + useNotificationStore, +} from '@knocklabs/react'; +import { useEffect } from 'react'; + +const KNOCK_IN_APP_FEED_ID = + process.env.KNOCK_IN_APP_FEED_ID || 'fc6e68e5-b7b9-49c1-8fab-6dd7e3510ffb'; + +const useFetchNotifications = () => { + const knockClient = useKnockClient(); + const feedClient = useNotifications(knockClient, KNOCK_IN_APP_FEED_ID); + + const { items } = useNotificationStore(feedClient); + + useEffect(() => { + const fetchNotifications = async () => { + try { + await feedClient.fetch(); + } catch (error) { + console.error('Failed to fetch notifications:', error); + } + }; + + fetchNotifications(); // eslint-disable-line @typescript-eslint/no-floating-promises + }, [feedClient]); + + return { items }; +}; + +export default useFetchNotifications; diff --git a/packages/commonwealth/client/scripts/views/components/KnockNotifications/KnockFeedWrapper.tsx b/packages/commonwealth/client/scripts/views/components/KnockNotifications/KnockFeedWrapper.tsx new file mode 100644 index 00000000000..72639342621 --- /dev/null +++ b/packages/commonwealth/client/scripts/views/components/KnockNotifications/KnockFeedWrapper.tsx @@ -0,0 +1,57 @@ +import Knock from '@knocklabs/client'; +import { KnockFeedProvider, KnockProvider } from '@knocklabs/react'; +import React, { ReactNode, useEffect } from 'react'; +import useUserStore from 'state/ui/user'; + +const KNOCK_PUBLIC_API_KEY = + process.env.KNOCK_PUBLIC_API_KEY || + 'pk_test_Hd4ZpzlVcz9bqepJQoo9BvZHokgEqvj4T79fPdKqpYM'; + +const KNOCK_IN_APP_FEED_ID = + process.env.KNOCK_IN_APP_FEED_ID || 'fc6e68e5-b7b9-49c1-8fab-6dd7e3510ffb'; + +const knock = new Knock(KNOCK_PUBLIC_API_KEY); + +const getBrowserTimezone = (): string => { + return Intl.DateTimeFormat().resolvedOptions().timeZone; +}; + +interface KnockFeedWrapperProps { + children: ReactNode; +} + +export const KnockFeedWrapper = ({ children }: KnockFeedWrapperProps) => { + const user = useUserStore(); + + useEffect(() => { + if (!user.id || !user.isLoggedIn) return; + if (!user.knockJWT) { + console.warn('user knockJWT not set! Will not attempt to identify.'); + return; + } + + const timezone = getBrowserTimezone(); + async function doAsync() { + knock.authenticate(`${user.id}`, user.knockJWT); + await knock.user.identify({ + id: user.id, + email: user.email, + timezone, + }); + } + + doAsync().catch(console.error); + }, [user.email, user.id, user.isLoggedIn, user.knockJWT]); + + return ( + + + {children} + + + ); +}; diff --git a/packages/commonwealth/client/scripts/views/components/KnockNotifications/KnockNotifications.tsx b/packages/commonwealth/client/scripts/views/components/KnockNotifications/KnockNotifications.tsx index 8a7b033096f..3c86884d1b6 100644 --- a/packages/commonwealth/client/scripts/views/components/KnockNotifications/KnockNotifications.tsx +++ b/packages/commonwealth/client/scripts/views/components/KnockNotifications/KnockNotifications.tsx @@ -1,4 +1,3 @@ -import Knock from '@knocklabs/client'; import { KnockFeedProvider, KnockProvider, @@ -6,7 +5,7 @@ import { NotificationIconButton, } from '@knocklabs/react'; import '@knocklabs/react-notification-feed/dist/index.css'; -import React, { memo, useEffect, useRef, useState } from 'react'; +import React, { memo, useRef, useState } from 'react'; import useUserStore from 'state/ui/user'; import { handleIconClick, @@ -23,50 +22,12 @@ const KNOCK_PUBLIC_API_KEY = const KNOCK_IN_APP_FEED_ID = process.env.KNOCK_IN_APP_FEED_ID || 'fc6e68e5-b7b9-49c1-8fab-6dd7e3510ffb'; -const knock = new Knock(KNOCK_PUBLIC_API_KEY); - -const getBrowserTimezone = (): string => { - return Intl.DateTimeFormat().resolvedOptions().timeZone; -}; - export const KnockNotifications = memo(function KnockNotifications() { const user = useUserStore(); const [isVisible, setIsVisible] = useState(false); const notifButtonRef = useRef(null); - useEffect(() => { - if (!user.id || !user.isLoggedIn) { - return; - } - - if (!user.knockJWT) { - console.warn('user knockJWT not set! Will not attempt to identify.'); - return; - } - - const timezone = getBrowserTimezone(); - async function doAsync() { - knock.authenticate(`${user.id}`, user.knockJWT); - - await knock.user.identify({ - id: user.id, - email: user.email, - timezone, - }); - } - - doAsync().catch(console.error); - }, [user.email, user.id, user.isLoggedIn, user.knockJWT]); - - if (!user.id || !user.isLoggedIn) { - return null; - } - - if (!user.knockJWT) { - return null; - } - return (
- {/* Optionally, use the KnockFeedProvider to connect an in-app feed */}
void; size?: IconSize; showSkeleton?: boolean; + selectedCommunity?: string; }; const CWCommunityAvatarSkeleton = () => { @@ -26,7 +29,13 @@ const CWCommunityAvatarSkeleton = () => { // eslint-disable-next-line react/no-multi-comp export const CWCommunityAvatar = (props: CommunityAvatarProps) => { - const { community, onClick, size = 'large', showSkeleton } = props; + const { + community, + onClick, + size = 'large', + showSkeleton, + selectedCommunity, + } = props; if (showSkeleton) { return ; @@ -35,16 +44,24 @@ export const CWCommunityAvatar = (props: CommunityAvatarProps) => { const sizeIsAboveLarge = size !== 'small' && size !== 'medium' && size !== 'large'; + const isSelected = selectedCommunity === community.id; return (
( - { onClick: !!onClick, size }, + className={getClasses<{ + onClick: boolean; + size: IconSize; + isSelected: boolean; + }>( + { onClick: !!onClick, size, isSelected }, ComponentType.CommunityAvatar, )} onClick={onClick} > {community?.iconUrl ? ( - + ) : (
({ size }, 'no-image')}> ( +
+
+
+ + {unreadCount > 0 && ( + + {unreadCount > 99 ? '99+' : unreadCount} + + )} +
+
+
+); diff --git a/packages/commonwealth/client/scripts/views/components/sidebar/helpers.ts b/packages/commonwealth/client/scripts/views/components/sidebar/helpers.ts index 2cf9eab3a7c..fd11fc37fd1 100644 --- a/packages/commonwealth/client/scripts/views/components/sidebar/helpers.ts +++ b/packages/commonwealth/client/scripts/views/components/sidebar/helpers.ts @@ -1,5 +1,6 @@ import _ from 'lodash'; +import { FeedItem } from '@knocklabs/client'; import app from 'state'; import { Contest } from 'views/pages/CommunityManagement/Contests/ContestsList'; import { isContestActive } from 'views/pages/CommunityManagement/Contests/utils'; @@ -41,3 +42,11 @@ export const getUniqueTopicIdsIncludedInActiveContest = ( return [...new Set(topicIds)]; }; + +export const calculateUnreadCount = ( + communityName: string, + items: FeedItem[], +) => + items.filter( + (item) => !item.read_at && item?.data?.community_name === communityName, + ).length; diff --git a/packages/commonwealth/client/scripts/views/components/sidebar/sidebar_quick_switcher.scss b/packages/commonwealth/client/scripts/views/components/sidebar/sidebar_quick_switcher.scss index ba0b366d2fe..682dca91ec7 100644 --- a/packages/commonwealth/client/scripts/views/components/sidebar/sidebar_quick_switcher.scss +++ b/packages/commonwealth/client/scripts/views/components/sidebar/sidebar_quick_switcher.scss @@ -14,6 +14,26 @@ padding-top: 32px; } + .CommunityAvatar { + border-radius: $border-radius-corners-wider; + + .community-image { + width: 100%; + height: 100%; + border-radius: $border-radius-corners-wider; + + &.isSelected { + border-radius: $border-radius-round; + } + } + + &.isSelected { + border-radius: $border-radius-round; + border: 2px solid $primary-600; + padding: 2px; + } + } + .community-nav-bar { align-items: center; display: flex; @@ -36,5 +56,13 @@ overflow-y: auto; padding: 12px 0; width: 100%; + + &::-webkit-scrollbar { + width: 4px; + } + + .community-avatar-container { + position: relative; + } } } diff --git a/packages/commonwealth/client/scripts/views/components/sidebar/sidebar_quick_switcher.tsx b/packages/commonwealth/client/scripts/views/components/sidebar/sidebar_quick_switcher.tsx index 4a9d093aee4..9041e85ffc7 100644 --- a/packages/commonwealth/client/scripts/views/components/sidebar/sidebar_quick_switcher.tsx +++ b/packages/commonwealth/client/scripts/views/components/sidebar/sidebar_quick_switcher.tsx @@ -1,6 +1,8 @@ +import useFetchNotifications from 'client/scripts/state/api/notifications/useFetchNotifications'; import clsx from 'clsx'; import { navigateToCommunity, useCommonNavigate } from 'navigation/helpers'; import React from 'react'; +import { useLocation } from 'react-router-dom'; import useSidebarStore from 'state/ui/sidebar'; import useUserStore from 'state/ui/user'; import { CWCommunityAvatar } from '../component_kit/cw_community_avatar'; @@ -8,6 +10,8 @@ import { CWDivider } from '../component_kit/cw_divider'; import { CWIconButton } from '../component_kit/cw_icon_button'; import { isWindowSmallInclusive } from '../component_kit/helpers'; import { CWTooltip } from '../component_kit/new_designs/CWTooltip'; +import { SideBarNotificationIcon } from './SidebarNotificationIcon'; +import { calculateUnreadCount } from './helpers'; import './sidebar_quick_switcher.scss'; export const SidebarQuickSwitcher = ({ @@ -21,6 +25,12 @@ export const SidebarQuickSwitcher = ({ const { setMenu } = useSidebarStore(); const user = useUserStore(); + const { items } = useFetchNotifications(); + + const location = useLocation(); + const pathname = location.pathname; + const communityId = pathname.split('/')[1]; + return (
+ {user.communities.filter((x) => x.isStarred).length !== 0 && ( +
+ {user.communities + .filter((x) => x.isStarred) + .map((community) => ( +
+ + navigateToCommunity({ + navigate, + path: '', + chain: community.id, + }) + } + /> + +
+ ))} +
+ )} + {user.communities.filter((x) => x.isStarred).length !== 0 && ( + + )}
- {user.communities - .filter((x) => x.isStarred) - .map((community) => ( + {user.communities.map((community) => ( +
- ))} + +
+ ))}
); diff --git a/packages/commonwealth/package.json b/packages/commonwealth/package.json index 421b2ed7f38..92a3e220298 100644 --- a/packages/commonwealth/package.json +++ b/packages/commonwealth/package.json @@ -119,9 +119,9 @@ "@ipld/dag-json": "^10.2.0", "@keplr-wallet/types": "^0.12.23", "@keplr-wallet/unit": "^0.12.23", - "@knocklabs/client": "^0.10.13", + "@knocklabs/client": "^0.10.16", "@knocklabs/node": "^0.6.13", - "@knocklabs/react": "^0.2.15", + "@knocklabs/react": "^0.2.32", "@knocklabs/react-notification-feed": "^0.8.15", "@lexical/rich-text": "^0.17.0", "@libp2p/crypto": "^5.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d22c2ec8f06..9b6c00eaf7b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -912,14 +912,14 @@ importers: specifier: ^0.12.23 version: 0.12.86 '@knocklabs/client': - specifier: ^0.10.13 - version: 0.10.13(react@18.3.1) + specifier: ^0.10.16 + version: 0.10.16(react@18.3.1) '@knocklabs/node': specifier: ^0.6.13 version: 0.6.13 '@knocklabs/react': - specifier: ^0.2.15 - version: 0.2.17(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^0.2.32 + version: 0.2.32(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@knocklabs/react-notification-feed': specifier: ^0.8.15 version: 0.8.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -4349,8 +4349,8 @@ packages: '@keplr-wallet/unit@0.12.86': resolution: {integrity: sha512-0csxBbrxHbAJsjn5VQgyTMViVi0FF/wkIWAFvyhagagP+o/vkIM8oWRHXnHy2tJLyDboSsww83kiOPV5PiHbJw==} - '@knocklabs/client@0.10.13': - resolution: {integrity: sha512-h57WEYk/c0xUdFDWSVMbb/nJQ+ehstE8OtZcxb33autPbyzz4Fr6SIO/Zgw/nzw//EA/W33dYiHiChPWvIQH8A==} + '@knocklabs/client@0.10.16': + resolution: {integrity: sha512-cN7ksBmGbdX9pIuhg6t9D9JgXxjQ8lQLEpBXEtKFy3DTrCkVBrV+6hTqOpzGkRYCg5ESmuYej4RErJp1xlQPkg==} '@knocklabs/client@0.8.21': resolution: {integrity: sha512-uPaUAwbg9Bi0UIPIYOE4v4GiasKezZNQ/ge9KST2wlSHAfpKWrHf7s85H4mD7IGkVc0xkokF4RZ4lqr7cy48wg==} @@ -4359,8 +4359,8 @@ packages: resolution: {integrity: sha512-XA6HWxIvLiCpRt5GisTFYDZuTuyrRR34XnFwPFPXPNTO1cKQOHLkQvyy7FzAOTD6/PVj1DM2Ge9HHij+Z64Rtg==} engines: {node: '>=17.5.0'} - '@knocklabs/react-core@0.2.15': - resolution: {integrity: sha512-qDvsyT5J6hdFFEX4+VFdC3GT9xIIk8TNj3YAC4diqulqeArnVd8fEyrXOk+5HMbvZpHlgzW0LyBV40Yli9/vnA==} + '@knocklabs/react-core@0.2.28': + resolution: {integrity: sha512-8nBJxXyNGwEFvwzBt0c70MzGhjXqNAL/KLGuh3WMHj37I2HUgDyzyLrLbQ7wqfZs/ku2qs99S5QhBukJmlIq9g==} peerDependencies: react: ^16.11.0 || ^17.0.0 || ^18.0.0 @@ -4370,14 +4370,14 @@ packages: react: '>=16.8.0' react-dom: '>=16.8.0' - '@knocklabs/react@0.2.17': - resolution: {integrity: sha512-HqFWifzJBh8LpTy099zS8cIh4EaqGUNv/g6sWyEWiDk70bijd86ALQ51szOoWmhNRMSu2MUnGHgTGxa6A2te4g==} + '@knocklabs/react@0.2.32': + resolution: {integrity: sha512-piYBqzRgdeo8vzE9/ZsWGgMmKn8S6ppTtgoPUnGm/lVCXjqDFPpZ80sJk42ELmx5x74OHVvvdBOYO91VFZnxGA==} peerDependencies: react: ^16.11.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.11.0 || ^17.0.0 || ^18.0.0 - '@knocklabs/types@0.1.4': - resolution: {integrity: sha512-KdEESYtIYDaBy9CTNKco7MJ+PcX9wfWt3WVNBKHrrARX++Fa/gn1Zn8WQ5K39hckXm/c2AL6WhNjGv6ovkxwFw==} + '@knocklabs/types@0.1.5': + resolution: {integrity: sha512-Wu/0XsrTKBM2JO2eoazhz6MWpnmm6uCUsozPyg4aeJS7vndtqLPwniW6fzVn1gSrR7upWkWThrv5ZzokZ6BAHQ==} '@leichtgewicht/ip-codec@2.0.5': resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==} @@ -7788,8 +7788,8 @@ packages: '@types/pg@8.11.6': resolution: {integrity: sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==} - '@types/phoenix@1.6.4': - resolution: {integrity: sha512-B34A7uot1Cv0XtaHRYDATltAdKx0BvVKNgYNqE4WjtPUa4VQJM7kxeXcVKaH+KS+kCmZ+6w+QaUdcljiheiBJA==} + '@types/phoenix@1.6.6': + resolution: {integrity: sha512-PIzZZlEppgrpoT2QgbnDU+MMzuR6BbCjllj0bM70lWoejMeNJAxCchxnv7J3XFkI8MpygtRpzXrIlmWUBclP5A==} '@types/prop-types@15.7.12': resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} @@ -8864,6 +8864,11 @@ packages: axios-retry@3.9.1: resolution: {integrity: sha512-8PJDLJv7qTTMMwdnbMvrLYuvB47M81wRtxQmEdV5w4rgbTXTt+vtPkXwajOfOdSyv/wZICJOC+/UhXH4aQ/R+w==} + axios-retry@4.5.0: + resolution: {integrity: sha512-aR99oXhpEDGo0UuAlYcn2iGRds30k366Zfa05XWScR9QaQD4JYiP3/1Qt1u7YlefUOK+cn0CcwoL1oefavQUlQ==} + peerDependencies: + axios: 0.x || 1.x + axios@0.21.4: resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} @@ -9912,9 +9917,6 @@ packages: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} engines: {node: '>=0.11'} - date-fns@3.6.0: - resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} - date-fns@4.1.0: resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==} @@ -10727,6 +10729,7 @@ packages: ethereumjs-wallet@1.0.2: resolution: {integrity: sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA==} + deprecated: 'New package name format for new versions: @ethereumjs/wallet. Please update.' ethers@5.7.2: resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} @@ -14284,6 +14287,9 @@ packages: phoenix@1.6.16: resolution: {integrity: sha512-3vOfu5olbFg6eBNkF4pnwMzNm7unl/4vy24MW+zxKklVgjq1zLnO2EWq9wz6i6r4PbQ0CGxHGtqKJH2VSsnhaA==} + phoenix@1.7.14: + resolution: {integrity: sha512-3tZ76PiH/2g+Kyzhz8+GIFYrnx3lRnwi/Qt3ZUH04xpMxXL7Guerd5aaxtpWal73X+H8iLAjo2c+AgRy2KYQcQ==} + picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -16162,6 +16168,7 @@ packages: sudo-prompt@9.2.1: resolution: {integrity: sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. superagent@5.3.1: resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==} @@ -18014,8 +18021,8 @@ snapshots: '@aws-crypto/sha1-browser': 3.0.0 '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0) - '@aws-sdk/client-sts': 3.577.0 + '@aws-sdk/client-sso-oidc': 3.577.0 + '@aws-sdk/client-sts': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) '@aws-sdk/core': 3.576.0 '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0) '@aws-sdk/middleware-bucket-endpoint': 3.577.0 @@ -18072,11 +18079,11 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0)': + '@aws-sdk/client-sso-oidc@3.577.0': dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.577.0 + '@aws-sdk/client-sts': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) '@aws-sdk/core': 3.576.0 '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0) '@aws-sdk/middleware-host-header': 3.577.0 @@ -18115,7 +18122,6 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.7.0 transitivePeerDependencies: - - '@aws-sdk/client-sts' - aws-crt '@aws-sdk/client-sso@3.577.0': @@ -18161,11 +18167,11 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sts@3.577.0': + '@aws-sdk/client-sts@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)': dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0) + '@aws-sdk/client-sso-oidc': 3.577.0 '@aws-sdk/core': 3.576.0 '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0) '@aws-sdk/middleware-host-header': 3.577.0 @@ -18204,6 +18210,7 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.7.0 transitivePeerDependencies: + - '@aws-sdk/client-sso-oidc' - aws-crt '@aws-sdk/core@3.576.0': @@ -18237,7 +18244,7 @@ snapshots: '@aws-sdk/credential-provider-ini@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0)': dependencies: - '@aws-sdk/client-sts': 3.577.0 + '@aws-sdk/client-sts': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) '@aws-sdk/credential-provider-env': 3.577.0 '@aws-sdk/credential-provider-process': 3.577.0 '@aws-sdk/credential-provider-sso': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) @@ -18294,7 +18301,7 @@ snapshots: '@aws-sdk/credential-provider-web-identity@3.577.0(@aws-sdk/client-sts@3.577.0)': dependencies: - '@aws-sdk/client-sts': 3.577.0 + '@aws-sdk/client-sts': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) '@aws-sdk/types': 3.577.0 '@smithy/property-provider': 3.0.0 '@smithy/types': 3.0.0 @@ -18432,7 +18439,7 @@ snapshots: '@aws-sdk/token-providers@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)': dependencies: - '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0) + '@aws-sdk/client-sso-oidc': 3.577.0 '@aws-sdk/types': 3.577.0 '@smithy/property-provider': 3.0.0 '@smithy/shared-ini-file-loader': 3.0.0 @@ -22944,16 +22951,16 @@ snapshots: big-integer: 1.6.52 utility-types: 3.11.0 - '@knocklabs/client@0.10.13(react@18.3.1)': + '@knocklabs/client@0.10.16(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.7 - '@knocklabs/types': 0.1.4 - '@types/phoenix': 1.6.4 - axios: 1.7.5 - axios-retry: 3.9.1 + '@babel/runtime': 7.26.0 + '@knocklabs/types': 0.1.5 + '@types/phoenix': 1.6.6 + axios: 1.7.7 + axios-retry: 4.5.0(axios@1.7.7) eventemitter2: 6.4.9 jwt-decode: 4.0.0 - phoenix: 1.6.16 + phoenix: 1.7.14 zustand: 3.7.2(react@18.3.1) transitivePeerDependencies: - debug @@ -22976,10 +22983,10 @@ snapshots: dependencies: jose: 5.3.0 - '@knocklabs/react-core@0.2.15(react@18.3.1)': + '@knocklabs/react-core@0.2.28(react@18.3.1)': dependencies: - '@knocklabs/client': 0.10.13(react@18.3.1) - date-fns: 3.6.0 + '@knocklabs/client': 0.10.16(react@18.3.1) + date-fns: 4.1.0 react: 18.3.1 swr: 2.2.5(react@18.3.1) zustand: 3.7.2(react@18.3.1) @@ -23000,10 +23007,10 @@ snapshots: transitivePeerDependencies: - debug - '@knocklabs/react@0.2.17(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@knocklabs/react@0.2.32(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@knocklabs/client': 0.10.13(react@18.3.1) - '@knocklabs/react-core': 0.2.15(react@18.3.1) + '@knocklabs/client': 0.10.16(react@18.3.1) + '@knocklabs/react-core': 0.2.28(react@18.3.1) '@popperjs/core': 2.11.8 '@radix-ui/react-popover': 1.0.7(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-visually-hidden': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -23017,7 +23024,7 @@ snapshots: - '@types/react-dom' - debug - '@knocklabs/types@0.1.4': {} + '@knocklabs/types@0.1.5': {} '@leichtgewicht/ip-codec@2.0.5': {} @@ -25493,7 +25500,7 @@ snapshots: '@radix-ui/react-popover@1.0.7(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.26.0 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.3.3)(react@18.3.1) '@radix-ui/react-context': 1.0.1(@types/react@18.3.3)(react@18.3.1) @@ -25837,7 +25844,7 @@ snapshots: '@radix-ui/react-visually-hidden@1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.26.0 '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -28125,7 +28132,7 @@ snapshots: pg-protocol: 1.6.1 pg-types: 4.0.2 - '@types/phoenix@1.6.4': {} + '@types/phoenix@1.6.6': {} '@types/prop-types@15.7.12': {} @@ -30455,7 +30462,7 @@ snapshots: ast-types@0.15.2: dependencies: - tslib: 2.7.0 + tslib: 2.8.1 astral-regex@1.0.0: {} @@ -30499,7 +30506,12 @@ snapshots: axios-retry@3.9.1: dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.26.0 + is-retry-allowed: 2.2.0 + + axios-retry@4.5.0(axios@1.7.7): + dependencies: + axios: 1.7.7 is-retry-allowed: 2.2.0 axios@0.21.4: @@ -31881,8 +31893,6 @@ snapshots: dependencies: '@babel/runtime': 7.25.7 - date-fns@3.6.0: {} - date-fns@4.1.0: {} dateformat@4.6.3: {} @@ -37764,6 +37774,8 @@ snapshots: phoenix@1.6.16: {} + phoenix@1.7.14: {} + picocolors@1.0.0: {} picocolors@1.1.1: {} @@ -38729,7 +38741,7 @@ snapshots: react: 18.3.1 react-remove-scroll-bar: 2.3.6(@types/react@18.3.3)(react@18.3.1) react-style-singleton: 2.2.1(@types/react@18.3.3)(react@18.3.1) - tslib: 2.7.0 + tslib: 2.8.1 use-callback-ref: 1.3.2(@types/react@18.3.3)(react@18.3.1) use-sidecar: 1.1.2(@types/react@18.3.3)(react@18.3.1) optionalDependencies: