@sanity/ui 2.16.20 → 2.16.22

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/ui",
3
- "version": "2.16.20",
3
+ "version": "2.16.22",
4
4
  "keywords": [
5
5
  "sanity",
6
6
  "ui",
@@ -119,8 +119,8 @@
119
119
  "@sanity/color": "^3.0.6",
120
120
  "@sanity/icons": "^3.7.4",
121
121
  "csstype": "^3.1.3",
122
- "framer-motion": "^12.23.24",
123
- "react-compiler-runtime": "19.1.0-rc.3",
122
+ "motion": "^12.23.24",
123
+ "react-compiler-runtime": "1.0.0",
124
124
  "react-refractor": "^2.2.0",
125
125
  "use-effect-event": "^2.0.3"
126
126
  },
@@ -132,7 +132,7 @@
132
132
  "@commitlint/cli": "^19.8.1",
133
133
  "@commitlint/config-conventional": "^19.8.1",
134
134
  "@eslint/js": "^9.37.0",
135
- "@sanity/pkg-utils": "^8.1.19",
135
+ "@sanity/pkg-utils": "^8.1.24",
136
136
  "@sanity/prettier-config": "^2.0.1",
137
137
  "@sanity/semantic-release-preset": "^5.0.0",
138
138
  "@sanity/ui-workshop": "^2.1.6",
@@ -161,7 +161,7 @@
161
161
  "@types/react-dom": "^19.2.1",
162
162
  "@types/react-is": "^19.2.0",
163
163
  "@vitejs/plugin-react": "^5.0.4",
164
- "babel-plugin-react-compiler": "19.1.0-rc.3",
164
+ "babel-plugin-react-compiler": "1.0.0",
165
165
  "babel-plugin-styled-components": "^2.1.4",
166
166
  "commitizen": "^4.3.1",
167
167
  "cypress": "^13.17.0",
@@ -174,8 +174,7 @@
174
174
  "eslint-plugin-import": "^2.32.0",
175
175
  "eslint-plugin-jsx-a11y": "^6.10.2",
176
176
  "eslint-plugin-react": "^7.37.5",
177
- "eslint-plugin-react-hooks": "6.0.0-rc.2",
178
- "eslint-plugin-react-hooks-with-use-effect-event": "npm:eslint-plugin-react-hooks@0.0.0-experimental-3302d1f7-20250903",
177
+ "eslint-plugin-react-hooks": "7.0.0",
179
178
  "eslint-plugin-react-refresh": "^0.4.23",
180
179
  "eslint-plugin-simple-import-sort": "^12.1.1",
181
180
  "eslint-plugin-storybook": "^0.12.0",
@@ -1,5 +1,5 @@
1
1
  import {CloseIcon} from '@sanity/icons'
2
- import {motion, type Variant, type Variants} from 'framer-motion'
2
+ import {motion, type Variant, type Variants} from 'motion/react'
3
3
 
4
4
  import {usePrefersReducedMotion} from '../../hooks/usePrefersReducedMotion'
5
5
  import {Box, Button, Flex, Stack, Text} from '../../primitives'
@@ -1,4 +1,4 @@
1
- import {AnimatePresence} from 'framer-motion'
1
+ import {AnimatePresence} from 'motion/react'
2
2
  import {startTransition, useMemo, useState} from 'react'
3
3
 
4
4
  import {useMounted} from '../../hooks/useMounted'
@@ -213,7 +213,6 @@ export const Tree = memo(
213
213
  ref.current.querySelectorAll('[data-ui="TreeItem"]'),
214
214
  ) as HTMLElement[]
215
215
 
216
- // eslint-disable-next-line react-hooks/set-state-in-effect
217
216
  setItemElements(_itemElements)
218
217
  }, [children])
219
218
 
@@ -1,4 +1,4 @@
1
- import type {Transition, Variant} from 'framer-motion'
1
+ import type {Transition, Variant} from 'motion/react'
2
2
 
3
3
  /**
4
4
  * @internal
@@ -13,7 +13,7 @@ export const EMPTY_RECORD: Record<string, never> = {}
13
13
  const POPOVER_MOTION_DURATION = 0.2
14
14
 
15
15
  /**
16
- * Shared `framer-motion` variants used by `Popover` and `Tooltip` components.
16
+ * Shared `motion` variants used by `Popover` and `Tooltip` components.
17
17
  * @internal
18
18
  */
19
19
  export const POPOVER_MOTION_PROPS: {
@@ -441,7 +441,7 @@ describe('useClickOutside', () => {
441
441
  const useBoundaryElementFromRef = (ref: React.MutableRefObject<HTMLElement | null>) => {
442
442
  const [element, setElement] = useState(() => ref.current)
443
443
 
444
- // eslint-disable-next-line react-hooks-with-use-effect-event/exhaustive-deps
444
+ // eslint-disable-next-line react-hooks/exhaustive-deps
445
445
  useEffect(() => {
446
446
  // If the ref has mutated since the last render, update the state and schedule a re-render
447
447
  if (ref.current !== element) {
@@ -11,7 +11,7 @@ import {
11
11
  useFloating,
12
12
  } from '@floating-ui/react-dom'
13
13
  import {ThemeColorSchemeKey} from '@sanity/ui/theme'
14
- import {AnimatePresence} from 'framer-motion'
14
+ import {AnimatePresence} from 'motion/react'
15
15
  import {
16
16
  cloneElement,
17
17
  forwardRef,
@@ -1,6 +1,6 @@
1
1
  import {Strategy} from '@floating-ui/react-dom'
2
2
  import {ThemeColorSchemeKey} from '@sanity/ui/theme'
3
- import {motion, type MotionProps} from 'framer-motion'
3
+ import {motion, type MotionProps} from 'motion/react'
4
4
  import React, {CSSProperties, forwardRef, memo, useMemo} from 'react'
5
5
  import {styled} from 'styled-components'
6
6
 
@@ -9,7 +9,7 @@ import {
9
9
  useFloating,
10
10
  } from '@floating-ui/react-dom'
11
11
  import type {ThemeColorSchemeKey} from '@sanity/ui/theme'
12
- import {AnimatePresence} from 'framer-motion'
12
+ import {AnimatePresence} from 'motion/react'
13
13
  import {
14
14
  cloneElement,
15
15
  forwardRef,
@@ -1,5 +1,5 @@
1
1
  import {ThemeColorSchemeKey} from '@sanity/ui/theme'
2
- import {motion, type MotionProps} from 'framer-motion'
2
+ import {motion, type MotionProps} from 'motion/react'
3
3
  import React, {CSSProperties, forwardRef, memo, useMemo} from 'react'
4
4
  import {styled} from 'styled-components'
5
5
 
@@ -66,7 +66,6 @@ export const VirtualList = forwardRef(function VirtualList(
66
66
  const firstElement = wrapperRef.current.firstChild
67
67
 
68
68
  if (firstElement instanceof HTMLElement) {
69
- // eslint-disable-next-line react-hooks/set-state-in-effect
70
69
  setItemHeight(firstElement.offsetHeight)
71
70
  }
72
71
  }, [renderItem])