From 2612a3ab957a21b279afaa29e9acd6e76dd47894 Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Wed, 12 Mar 2025 15:35:30 -0400 Subject: [PATCH 1/6] chore(clerk-js): Bump floating-ui packages to latest --- packages/clerk-js/package.json | 4 ++-- pnpm-lock.yaml | 35 +++++++++++++++++++--------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/packages/clerk-js/package.json b/packages/clerk-js/package.json index 1bd43fe38ce..3ea9b88099d 100644 --- a/packages/clerk-js/package.json +++ b/packages/clerk-js/package.json @@ -60,8 +60,8 @@ "@coinbase/wallet-sdk": "4.3.0", "@emotion/cache": "11.11.0", "@emotion/react": "11.11.1", - "@floating-ui/react": "0.25.4", - "@floating-ui/react-dom": "^2.0.2", + "@floating-ui/react": "0.27.5", + "@floating-ui/react-dom": "^2.1.2", "@formkit/auto-animate": "^0.8.1", "@swc/helpers": "^0.5.13", "@zxcvbn-ts/core": "3.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cd5c0b2352f..08f71d76b18 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -441,11 +441,11 @@ importers: specifier: 11.11.1 version: 11.11.1(@types/react@18.3.12)(react@18.3.1) '@floating-ui/react': - specifier: 0.25.4 - version: 0.25.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 0.27.5 + version: 0.27.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@floating-ui/react-dom': - specifier: ^2.0.2 - version: 2.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^2.1.2 + version: 2.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@formkit/auto-animate': specifier: ^0.8.1 version: 0.8.2 @@ -2804,7 +2804,7 @@ packages: '@expo/bunyan@4.0.1': resolution: {integrity: sha512-+Lla7nYSiHZirgK+U/uYzsLv/X+HaJienbD5AKX1UQZHYfWaP+9uuQluRB4GrEVWF0GZ7vEVp/jzaOT9k/SQlg==} - engines: {node: '>=0.10.0'} + engines: {'0': node >=0.10.0} '@expo/cli@0.18.30': resolution: {integrity: sha512-V90TUJh9Ly8stYo8nwqIqNWCsYjE28GlVFWEhAFCUOp99foiQr8HSTpiiX5GIrprcPoWmlGoY+J5fQA29R4lFg==} @@ -2913,21 +2913,24 @@ packages: '@floating-ui/dom@1.5.2': resolution: {integrity: sha512-6ArmenS6qJEWmwzczWyhvrXRdI/rI78poBcW0h/456+onlabit+2G+QxHx5xTOX60NBJQXjsCLFbW2CmsXpUog==} - '@floating-ui/react-dom@2.0.2': - resolution: {integrity: sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==} + '@floating-ui/react-dom@2.1.2': + resolution: {integrity: sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==} peerDependencies: react: '>=16.8.0' react-dom: '>=16.8.0' - '@floating-ui/react@0.25.4': - resolution: {integrity: sha512-lWRQ/UiTvSIBxohn0/2HFHEmnmOVRjl7j6XcRJuLH0ls6f/9AyHMWVzkAJFuwx0n9gaEeCmg9VccCSCJzbEJig==} + '@floating-ui/react@0.27.5': + resolution: {integrity: sha512-BX3jKxo39Ba05pflcQmqPPwc0qdNsdNi/eweAFtoIdrJWNen2sVEWMEac3i6jU55Qfx+lOcdMNKYn2CtWmlnOQ==} peerDependencies: - react: '>=16.8.0' - react-dom: '>=16.8.0' + react: '>=17.0.0' + react-dom: '>=17.0.0' '@floating-ui/utils@0.1.2': resolution: {integrity: sha512-ou3elfqG/hZsbmF4bxeJhPHIf3G2pm0ujc39hYEZrfVqt7Vk/Zji6CXc3W0pmYM8BW1g40U+akTl9DKZhFhInQ==} + '@floating-ui/utils@0.2.9': + resolution: {integrity: sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==} + '@formkit/auto-animate@0.8.2': resolution: {integrity: sha512-SwPWfeRa5veb1hOIBMdzI+73te5puUBHmqqaF1Bu7FjvxlYSz/kJcZKSa9Cg60zL0uRNeJL2SbRxV6Jp6Q1nFQ==} @@ -16700,22 +16703,24 @@ snapshots: '@floating-ui/core': 1.4.1 '@floating-ui/utils': 0.1.2 - '@floating-ui/react-dom@2.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@floating-ui/react-dom@2.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@floating-ui/dom': 1.5.2 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@floating-ui/react@0.25.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@floating-ui/react@0.27.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@floating-ui/react-dom': 2.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@floating-ui/utils': 0.1.2 + '@floating-ui/react-dom': 2.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@floating-ui/utils': 0.2.9 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) tabbable: 6.2.0 '@floating-ui/utils@0.1.2': {} + '@floating-ui/utils@0.2.9': {} + '@formkit/auto-animate@0.8.2': {} '@gerrit0/mini-shiki@1.27.2': From 21ece99bb635267062cd501afbecc10a51b95afc Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Wed, 12 Mar 2025 15:37:42 -0400 Subject: [PATCH 2/6] add changeset --- .changeset/neat-hotels-brush.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/neat-hotels-brush.md diff --git a/.changeset/neat-hotels-brush.md b/.changeset/neat-hotels-brush.md new file mode 100644 index 00000000000..74889c7c8d8 --- /dev/null +++ b/.changeset/neat-hotels-brush.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Update floating-ui packages to latest. From a25e04af6204c68d73250989e3b8038bacb22ed0 Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Wed, 12 Mar 2025 15:41:18 -0400 Subject: [PATCH 3/6] dedupe --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 08f71d76b18..196c91f3b45 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2804,7 +2804,7 @@ packages: '@expo/bunyan@4.0.1': resolution: {integrity: sha512-+Lla7nYSiHZirgK+U/uYzsLv/X+HaJienbD5AKX1UQZHYfWaP+9uuQluRB4GrEVWF0GZ7vEVp/jzaOT9k/SQlg==} - engines: {'0': node >=0.10.0} + engines: {node: '>=0.10.0'} '@expo/cli@0.18.30': resolution: {integrity: sha512-V90TUJh9Ly8stYo8nwqIqNWCsYjE28GlVFWEhAFCUOp99foiQr8HSTpiiX5GIrprcPoWmlGoY+J5fQA29R4lFg==} From a13fddae44c675b3c40c2b003221a2597cc22a8f Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Wed, 12 Mar 2025 16:08:43 -0400 Subject: [PATCH 4/6] fix type issues --- packages/clerk-js/src/ui/elements/Popover.tsx | 2 +- packages/clerk-js/src/ui/hooks/usePopover.ts | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/clerk-js/src/ui/elements/Popover.tsx b/packages/clerk-js/src/ui/elements/Popover.tsx index d3f5ab43bf5..f01544783c0 100644 --- a/packages/clerk-js/src/ui/elements/Popover.tsx +++ b/packages/clerk-js/src/ui/elements/Popover.tsx @@ -5,7 +5,7 @@ import React from 'react'; type PopoverProps = PropsWithChildren<{ context: FloatingContext; - nodeId: string; + nodeId?: string; isOpen?: boolean; initialFocus?: number | React.MutableRefObject; order?: Array<'reference' | 'floating' | 'content'>; diff --git a/packages/clerk-js/src/ui/hooks/usePopover.ts b/packages/clerk-js/src/ui/hooks/usePopover.ts index 323cf4adc14..9439120615a 100644 --- a/packages/clerk-js/src/ui/hooks/usePopover.ts +++ b/packages/clerk-js/src/ui/hooks/usePopover.ts @@ -56,10 +56,6 @@ export const usePopover = (props: UsePopoverProps = {}) => { }), ], }); - // Names are aliased because in @floating-ui/react-dom@2.0.0 the top-level elements were removed - // This keeps the API shape for consumers of usePopover - // @see https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui%2Freact-dom%402.0.0 - const { setReference: reference, setFloating: floating } = refs; useDismiss(context, { enabled: canCloseModal !== false, @@ -78,8 +74,8 @@ export const usePopover = (props: UsePopoverProps = {}) => { const close = React.useCallback(() => setIsOpen(false), [setIsOpen]); return { - reference, - floating, + reference: refs.setReference, + floating: refs.setFloating, toggle, open, nodeId, From 2d3a186e342ad86e86a178fddceb895f0b0addc3 Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Wed, 12 Mar 2025 16:13:20 -0400 Subject: [PATCH 5/6] Update bundlewatch.config.json --- packages/clerk-js/bundlewatch.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/clerk-js/bundlewatch.config.json b/packages/clerk-js/bundlewatch.config.json index 657dc3f9b11..23d08e87b4c 100644 --- a/packages/clerk-js/bundlewatch.config.json +++ b/packages/clerk-js/bundlewatch.config.json @@ -4,7 +4,7 @@ { "path": "./dist/clerk.browser.js", "maxSize": "75kB" }, { "path": "./dist/clerk.headless.js", "maxSize": "48.3KB" }, { "path": "./dist/ui-common*.js", "maxSize": "89KB" }, - { "path": "./dist/vendors*.js", "maxSize": "25.1KB" }, + { "path": "./dist/vendors*.js", "maxSize": "26.5KB" }, { "path": "./dist/coinbase*.js", "maxSize": "35.5KB" }, { "path": "./dist/createorganization*.js", "maxSize": "5KB" }, { "path": "./dist/impersonationfab*.js", "maxSize": "5KB" }, From 556e98be678bba6436212a7bf0b048a0db38cc5f Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Thu, 13 Mar 2025 13:51:23 -0400 Subject: [PATCH 6/6] Update bundlewatch.config.json --- packages/clerk-js/bundlewatch.config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/clerk-js/bundlewatch.config.json b/packages/clerk-js/bundlewatch.config.json index d5015e80235..338aceb7db7 100644 --- a/packages/clerk-js/bundlewatch.config.json +++ b/packages/clerk-js/bundlewatch.config.json @@ -1,10 +1,10 @@ { "files": [ - { "path": "./dist/clerk.js", "maxSize": "572kB" }, + { "path": "./dist/clerk.js", "maxSize": "573kB" }, { "path": "./dist/clerk.browser.js", "maxSize": "78kB" }, { "path": "./dist/clerk.headless.js", "maxSize": "50KB" }, { "path": "./dist/ui-common*.js", "maxSize": "92KB" }, - { "path": "./dist/vendors*.js", "maxSize": "26.5KB" }, + { "path": "./dist/vendors*.js", "maxSize": "28.5KB" }, { "path": "./dist/coinbase*.js", "maxSize": "35.5KB" }, { "path": "./dist/createorganization*.js", "maxSize": "5KB" }, { "path": "./dist/impersonationfab*.js", "maxSize": "5KB" },