@sanity/ui 2.8.22 → 2.8.23

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.8.22",
3
+ "version": "2.8.23",
4
4
  "keywords": [
5
5
  "sanity",
6
6
  "ui",
@@ -110,7 +110,7 @@
110
110
  "@sanity/icons": "^3.4.0",
111
111
  "csstype": "^3.1.3",
112
112
  "framer-motion": "11.0.8",
113
- "react-compiler-runtime": "19.0.0-beta-63b359f-20241101",
113
+ "react-compiler-runtime": "19.0.0-beta-a7bf2bd-20241110",
114
114
  "react-refractor": "^2.2.0",
115
115
  "use-effect-event": "^1.0.2"
116
116
  },
@@ -123,7 +123,7 @@
123
123
  "@commitlint/config-conventional": "^19.2.2",
124
124
  "@juggle/resize-observer": "^3.4.0",
125
125
  "@sanity/pkg-utils": "^6.11.9",
126
- "@sanity/prettier-config": "^1.0.2",
126
+ "@sanity/prettier-config": "^1.0.3",
127
127
  "@sanity/semantic-release-preset": "^5.0.0",
128
128
  "@sanity/ui-workshop": "^2.0.16",
129
129
  "@storybook/addon-a11y": "^8.4.2",
@@ -154,7 +154,7 @@
154
154
  "@typescript-eslint/eslint-plugin": "^7.18.0",
155
155
  "@typescript-eslint/parser": "^7.18.0",
156
156
  "@vitejs/plugin-react": "^4.3.3",
157
- "babel-plugin-react-compiler": "19.0.0-beta-63b359f-20241101",
157
+ "babel-plugin-react-compiler": "19.0.0-beta-a7bf2bd-20241110",
158
158
  "commitizen": "^4.3.0",
159
159
  "cypress": "^13.13.2",
160
160
  "cypress-real-events": "^1.13.0",
@@ -166,7 +166,7 @@
166
166
  "eslint-plugin-jsx-a11y": "^6.10.2",
167
167
  "eslint-plugin-prettier": "^5.2.1",
168
168
  "eslint-plugin-react": "^7.37.2",
169
- "eslint-plugin-react-compiler": "19.0.0-beta-63b359f-20241101",
169
+ "eslint-plugin-react-compiler": "19.0.0-beta-a7bf2bd-20241110",
170
170
  "eslint-plugin-react-hooks": "^5.0.0",
171
171
  "eslint-plugin-storybook": "^0.11.0",
172
172
  "http-server": "^14.1.1",
@@ -1,11 +1,11 @@
1
1
  import {Box, Card, Code, Container, Stack, Text, useElementRect} from '@sanity/ui'
2
- import {useMemo, useState} from 'react'
2
+ import {useState} from 'react'
3
3
  import {Grid} from '../../../primitives'
4
4
 
5
5
  export default function ExampleStory() {
6
6
  const [element, setElement] = useState<HTMLElement | null>(null)
7
7
  const rect = useElementRect(element)
8
- const size = useMemo(() => ({width: rect?.width || 0, height: rect?.height || 0}), [rect])
8
+ const size = {width: rect?.width || 0, height: rect?.height || 0}
9
9
 
10
10
  return (
11
11
  <Box padding={[3, 4, 5]}>
@@ -12,7 +12,7 @@ import {
12
12
  ThemeColorState_v2,
13
13
  } from '@sanity/ui/theme'
14
14
  import {useBoolean, useSelect} from '@sanity/ui-workshop'
15
- import {CSSProperties, useMemo} from 'react'
15
+ import {CSSProperties} from 'react'
16
16
  import {Badge, Box, Flex, KBD, Stack, Text} from '../../../primitives'
17
17
  import {useRootTheme} from '../../useRootTheme'
18
18
 
@@ -50,16 +50,13 @@ export default function DebugStory() {
50
50
  const button = useBoolean('Button', false, 'Props') || false
51
51
  const selectable = useBoolean('Selectable', false, 'Props') || false
52
52
 
53
- const features: Features = useMemo(
54
- () => ({
55
- base,
56
- button,
57
- schemes: scheme == 'all' ? ['light', 'dark'] : [scheme],
58
- selectable,
59
- tones: tone == 'all' ? ['transparent', 'default'] : [tone],
60
- }),
61
- [base, button, scheme, selectable, tone],
62
- )
53
+ const features: Features = {
54
+ base,
55
+ button,
56
+ schemes: scheme == 'all' ? ['light', 'dark'] : [scheme],
57
+ selectable,
58
+ tones: tone == 'all' ? ['transparent', 'default'] : [tone],
59
+ }
63
60
 
64
61
  return (
65
62
  <Flex>