Skip to content

Commit 74a89f2

Browse files
React 19, react-aria-components 1.7, framer-motion 12, tanstack query 5.72
1 parent ccee660 commit 74a89f2

File tree

83 files changed

+2442
-4318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2442
-4318
lines changed

app/common/package.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,25 @@
2222
"lint": "eslint ./src --cache --max-warnings=0"
2323
},
2424
"peerDependencies": {
25-
"@tanstack/query-core": "5.59.20",
26-
"@tanstack/vue-query": "5.59.20",
27-
"zod": "^3.23.0"
25+
"@tanstack/query-core": "5.72.2",
26+
"@tanstack/vue-query": "5.73.0",
27+
"zod": "^3.24.1",
28+
"react": "^19.1.0",
29+
"react-dom": "^19.1.0",
30+
"@internationalized/date": "3.7.0"
2831
},
2932
"dependencies": {
30-
"@internationalized/date": "3.7.0",
31-
"@tanstack/query-persist-client-core": "5.59.20",
32-
"@tanstack/vue-query": "5.59.20",
33+
"@tanstack/query-persist-client-core": "5.73.1",
3334
"@types/node": "^20.11.21",
3435
"lib0": "^0.2.99",
35-
"react": "^18.3.1",
3636
"vitest": "3.0.5"
37+
},
38+
"devDependencies": {
39+
"@internationalized/date": "3.7.0",
40+
"@types/react": "^19.1.1",
41+
"@types/react-dom": "^19.1.2",
42+
"@tanstack/vue-query": "5.73.0",
43+
"react": "^19.1.0",
44+
"react-dom": "^19.1.0"
3745
}
3846
}

app/gui/package.json

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -68,33 +68,32 @@
6868
"@lexical/markdown": "^0.21.0",
6969
"@lezer/common": "^1.2.3",
7070
"@lezer/highlight": "^1.2.1",
71-
"@monaco-editor/react": "4.6.0",
71+
"@monaco-editor/react": "4.7.0",
7272
"@noble/hashes": "^1.6.1",
7373
"@react-aria/collections": "3.0.0-alpha.7",
7474
"@react-aria/interactions": "3.23.0",
75-
"@sentry/vue": "^7.120.2",
76-
"@sentry/vite-plugin": "^2.22.7",
77-
"@stripe/react-stripe-js": "^2.9.0",
78-
"@stripe/stripe-js": "^3.5.0",
79-
"@tanstack/react-query": "5.59.20",
80-
"@tanstack/vue-query": "5.59.20",
75+
"@sentry/vue": "9.12.0",
76+
"@sentry/vite-plugin": "3.3.1",
77+
"@stripe/react-stripe-js": "3.6.0",
78+
"@stripe/stripe-js": "7.0.0",
79+
"@tanstack/react-query": "5.72.2",
80+
"@tanstack/vue-query": "5.73.0",
8181
"@vueuse/core": "^13.0.0",
8282
"@vueuse/gesture": "^2.0.0",
8383
"ag-grid-community": "^32.3.3",
8484
"ag-grid-enterprise": "^32.3.3",
8585
"ajv": "^8.17.1",
8686
"amazon-cognito-identity-js": "6.3.6",
87-
"babel-plugin-react-compiler": "19.0.0-beta-63e3235-20250105",
88-
"clsx": "^2.1.1",
87+
"babel-plugin-react-compiler": "19.0.0-beta-e993439-20250405",
8988
"codemirror": "^6.0.1",
9089
"culori": "^3.3.0",
9190
"dotenv": "^16.4.7",
9291
"enso-common": "workspace:*",
9392
"events": "^3.3.0",
94-
"framer-motion": "11.3.0",
93+
"framer-motion": "12.6.5",
9594
"hash-sum": "^2.0.0",
9695
"idb-keyval": "^6.2.1",
97-
"input-otp": "1.2.4",
96+
"input-otp": "1.4.2",
9897
"install": "^0.13.0",
9998
"is-network-error": "^1.1.0",
10099
"lexical": "^0.21.0",
@@ -107,15 +106,14 @@
107106
"papaparse": "^5.4.1",
108107
"postcss-inline-svg": "^6.0.0",
109108
"postcss-nesting": "^12.1.5",
110-
"qrcode.react": "3.1.0",
111-
"react": "^18.3.1",
109+
"qrcode.react": "4.2.0",
110+
"react": "^19.1.0",
112111
"react-aria": "3.37.0",
113112
"react-aria-components": "1.6.0",
114-
"react-compiler-runtime": "19.0.0-beta-decd7b8-20250118",
115-
"react-dom": "^18.3.1",
116-
"react-error-boundary": "4.0.13",
113+
"react-keyed-flatten-children": "5.0.0",
114+
"react-dom": "^19.1.0",
115+
"react-error-boundary": "5.0.0",
117116
"react-hook-form": "^7.54.2",
118-
"react-keyed-flatten-children": "3.0.2",
119117
"react-stately": "3.35.0",
120118
"react-toastify": "^9.1.3",
121119
"sucrase": "^3.35.0",
@@ -124,7 +122,7 @@
124122
"tiny-invariant": "^1.3.3",
125123
"ts-results": "^3.3.0",
126124
"validator": "^13.12.0",
127-
"veaury": "=2.4.4",
125+
"veaury": "2.6.2",
128126
"motion-v": "^1.0.0-beta.1",
129127
"vue": "^3.5.13",
130128
"vue-router": "^4.5.0",
@@ -135,7 +133,7 @@
135133
"ydoc-shared": "workspace:*",
136134
"yjs": "^13.6.21",
137135
"zod": "^3.24.1",
138-
"zustand": "^4.5.5"
136+
"zustand": "5.0.3"
139137
},
140138
"devDependencies": {
141139
"@babel/plugin-syntax-import-attributes": "^7.26.0",
@@ -155,11 +153,10 @@
155153
"@storybook/test": "8.5.0",
156154
"@storybook/vue3": "8.5.0",
157155
"@storybook/vue3-vite": "8.5.0",
158-
"@tanstack/react-query-devtools": "5.59.20",
156+
"@tanstack/react-query-devtools": "5.72.2",
159157
"@testing-library/jest-dom": "6.6.3",
160-
"@testing-library/react": "16.0.1",
161-
"@testing-library/react-hooks": "8.0.1",
162-
"@testing-library/user-event": "14.5.2",
158+
"@testing-library/react": "16.3.0",
159+
"@testing-library/user-event": "14.6.1",
163160
"@tsconfig/node20": "^20.1.4",
164161
"@types/css.escape": "^1.5.2",
165162
"@types/culori": "^2.1.1",
@@ -169,8 +166,8 @@
169166
"@types/mapbox-gl": "^3.4.1",
170167
"@types/node": "^22.10.4",
171168
"@types/papaparse": "^5.3.15",
172-
"@types/react": "^18.3.18",
173-
"@types/react-dom": "^18.3.5",
169+
"@types/react": "^19.1.1",
170+
"@types/react-dom": "^19.1.2",
174171
"@types/shuffle-seed": "^1.1.3",
175172
"@types/tar": "^6.1.13",
176173
"@types/validator": "^13.12.2",

app/gui/src/App.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ import { registerAutoBlurHandler, registerGlobalBlurHandler } from '@/util/autoB
1616
import { baseConfig, configValue, mergeConfig, type ApplicationConfigValue } from '@/util/config'
1717
import { urlParams } from '@/util/urlParams'
1818
import { useQueryClient } from '@tanstack/vue-query'
19-
import { applyPureReactInVue } from 'veaury'
19+
import { createRoot } from 'react-dom/client'
20+
import { applyPureReactInVue, setVeauryOptions } from 'veaury'
2021
import { computed, onMounted } from 'vue'
2122
import { ComponentProps } from 'vue-component-type-helpers'
2223
24+
setVeauryOptions({ react: { createRoot } })
25+
26+
const ReactRootInVue = applyPureReactInVue(ReactRoot)
27+
2328
const { projectViewOnly, onAuthenticated } = defineProps<{
2429
// Used in Project View integration tests. Once both test projects will be merged, this should be
2530
// removed
@@ -43,7 +48,6 @@ const appConfig = computed(() =>
4348
)
4449
const appConfigValue = computed((): ApplicationConfigValue => configValue(appConfig.value))
4550
46-
const ReactRootWrapper = applyPureReactInVue(ReactRoot)
4751
const queryClient = useQueryClient()
4852
4953
provideKeyboard()

app/gui/src/ReactRoot.tsx

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import HttpClient from '#/utilities/HttpClient'
1313
import { QueryClientProvider } from '@tanstack/react-query'
1414
import { QueryClient } from '@tanstack/vue-query'
1515
import { IS_DEV_MODE, isOnElectron, isOnLinux } from 'enso-common/src/detect'
16-
import { PropsWithChildren, StrictMode } from 'react'
16+
import { PropsWithChildren } from 'react'
1717
import invariant from 'tiny-invariant'
1818

1919
interface ReactRootProps {
2020
queryClient: QueryClient
21-
classSet: Map<string, number>
2221
onAuthenticated: (accessToken: string | null) => void
22+
classSet?: Map<string, number>
2323
}
2424

2525
function generateSessionID() {
@@ -57,30 +57,29 @@ export default function ReactRoot(props: PropsWithChildren<ReactRootProps>) {
5757
const isCloudBuild = $config.CLOUD_BUILD === 'true'
5858

5959
return (
60-
<StrictMode>
61-
<QueryClientProvider client={queryClient}>
60+
<QueryClientProvider client={queryClient}>
61+
<UIProviders locale="en-US" portalRoot={portalRoot} appRoot={appRoot}>
6262
<ErrorBoundary>
63-
<UIProviders locale="en-US" portalRoot={portalRoot} appRoot={appRoot}>
64-
<Suspense fallback={<LoadingScreen />}>
65-
<OfflineNotificationManager>
66-
<LoggerProvider logger={console}>
67-
<HttpClientProvider httpClient={httpClient}>
68-
<App
69-
supportsDeepLinks={supportsDeepLinks}
70-
supportsLocalBackend={!isCloudBuild}
71-
onAuthenticated={onAuthenticated}
72-
>
63+
<Suspense fallback={<LoadingScreen />}>
64+
<OfflineNotificationManager>
65+
<LoggerProvider logger={console}>
66+
<HttpClientProvider httpClient={httpClient}>
67+
<App
68+
supportsDeepLinks={supportsDeepLinks}
69+
supportsLocalBackend={!isCloudBuild}
70+
71+
onAuthenticated={onAuthenticated}
72+
>
7373
{children}
7474
</App>
75-
</HttpClientProvider>
76-
</LoggerProvider>
77-
</OfflineNotificationManager>
78-
</Suspense>
75+
</HttpClientProvider>
76+
</LoggerProvider>
77+
</OfflineNotificationManager>
78+
</Suspense>
7979

80-
<ReactQueryDevtools />
81-
</UIProviders>
80+
<ReactQueryDevtools />
8281
</ErrorBoundary>
83-
</QueryClientProvider>
84-
</StrictMode>
82+
</UIProviders>
83+
</QueryClientProvider>
8584
)
8685
}

app/gui/src/dashboard/App.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ export default function App(props: React.PropsWithChildren<AppProps>) {
148148
projectManagerInstance: new ProjectManager(config.projectManagerUrl, rootDirectory),
149149
projectManagerRootDirectory: rootDirectory,
150150
}
151-
} else {
152-
return {
153-
projectManagerInstance: null,
154-
projectManagerRootDirectory: null,
155-
}
151+
}
152+
153+
return {
154+
projectManagerInstance: null,
155+
projectManagerRootDirectory: null,
156156
}
157157
},
158158
})

app/gui/src/dashboard/components/Activity.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
* This component is used to suspend the rendering of a subtree until a promise is resolved.
55
*/
66
import { unsafeWriteValue } from '#/utilities/write'
7-
import { startTransition, Suspense, useEffect, useLayoutEffect, useRef, useState } from 'react'
8-
import { useAwait } from './Await'
7+
import { startTransition, Suspense, use, useEffect, useLayoutEffect, useRef, useState } from 'react'
98

109
/**
1110
* Props for {@link Activity}
@@ -88,8 +87,10 @@ interface ActivityInnerProps {
8887
function ActivityInner(props: ActivityInnerProps) {
8988
const { promise, children } = props
9089

91-
// Suspend the subtree
92-
useAwait(promise)
90+
if (promise != null) {
91+
// Suspend the subtree
92+
use(promise)
93+
}
9394

9495
return children
9596
}
@@ -98,7 +99,7 @@ function ActivityInner(props: ActivityInnerProps) {
9899
* Props for {@link UnhideSuspendedTree}
99100
*/
100101
interface UnhideSuspendedTreeProps {
101-
readonly contentRef: React.RefObject<HTMLDivElement>
102+
readonly contentRef: React.RefObject<HTMLDivElement | null>
102103
}
103104

104105
/**

app/gui/src/dashboard/components/AriaComponents/Alert/Alert.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/** @file Alert component. */
2-
import { type ForwardedRef, type HTMLAttributes, type PropsWithChildren } from 'react'
2+
import { type HTMLAttributes, type PropsWithChildren } from 'react'
33

4-
import { forwardRef } from '#/utilities/react'
54
import { tv, type VariantProps } from '#/utilities/tailwindVariants'
65
import { Icon } from '../../Icon'
7-
import type { IconProp } from '../types'
6+
import type { IconProp, PropsWithRef } from '../types'
7+
88
// eslint-disable-next-line react-refresh/only-export-components
99
export const ALERT_STYLES = tv({
1010
base: 'flex items-stretch gap-2',
@@ -51,16 +51,14 @@ export const ALERT_STYLES = tv({
5151
export interface AlertProps<IconType extends string = string>
5252
extends PropsWithChildren,
5353
VariantProps<typeof ALERT_STYLES>,
54+
PropsWithRef<HTMLDivElement>,
5455
HTMLAttributes<HTMLDivElement> {
5556
/** The icon to display in the Alert */
5657
readonly icon?: IconProp<IconType> | null | undefined
5758
}
5859

5960
/** Alert component. */
60-
export const Alert = forwardRef(function Alert<IconType extends string = string>(
61-
props: AlertProps<IconType>,
62-
ref: ForwardedRef<HTMLDivElement>,
63-
) {
61+
export function Alert<IconType extends string = string>(props: AlertProps<IconType>) {
6462
const {
6563
children,
6664
className,
@@ -72,6 +70,7 @@ export const Alert = forwardRef(function Alert<IconType extends string = string>
7270
variants = ALERT_STYLES,
7371
tabIndex: rawTabIndex,
7472
role: rawRole,
73+
ref,
7574
...containerProps
7675
} = props
7776

@@ -98,4 +97,4 @@ export const Alert = forwardRef(function Alert<IconType extends string = string>
9897
<div className={classes.children()}>{children}</div>
9998
</div>
10099
)
101-
})
100+
}

0 commit comments

Comments
 (0)