From 2e282a97ee9dd2cda18d1370085fe8fb0ff0136f Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 19:52:23 +0100 Subject: [PATCH 01/17] chore: test million lint --- dev/page-building-studio/package.json | 4 +- dev/starter-studio/package.json | 4 +- dev/studio-e2e-testing/package.json | 4 +- dev/test-next-studio/package.json | 2 +- dev/test-studio/.gitignore | 1 + dev/test-studio/package.json | 5 +- package.json | 2 +- packages/@sanity/vision/package.json | 4 +- packages/sanity/package.json | 4 +- .../defineHookStateComponent.tsx | 2 +- .../components/loadingBlock/LoadingBlock.tsx | 80 +- .../StudioAnnouncementsProvider.tsx | 16 +- .../src/structure/panes/StructureToolPane.tsx | 5 +- .../document-layout/DocumentLayout.tsx | 9 +- .../TooltipDelayGroupProvider.tsx | 4 +- perf/efps/package.json | 4 +- perf/studio/package.json | 4 +- pnpm-lock.yaml | 1181 +++++++++++++++-- 18 files changed, 1131 insertions(+), 204 deletions(-) diff --git a/dev/page-building-studio/package.json b/dev/page-building-studio/package.json index 8cb314c5d71..46583ba98e3 100644 --- a/dev/page-building-studio/package.json +++ b/dev/page-building-studio/package.json @@ -13,9 +13,9 @@ }, "dependencies": { "@sanity/vision": "workspace:*", - "babel-plugin-react-compiler": "19.0.0-beta-0dec889-20241115", + "babel-plugin-react-compiler": "0.0.0-experimental-dc8bd44-20241121", "react": "^18.2.0", - "react-compiler-runtime": "19.0.0-beta-0dec889-20241115", + "react-compiler-runtime": "0.0.0-experimental-dc8bd44-20241121", "react-dom": "^18.2.0", "react-icons": "^5.2.1", "sanity": "workspace:*", diff --git a/dev/starter-studio/package.json b/dev/starter-studio/package.json index 3f68861c749..a8b33610021 100644 --- a/dev/starter-studio/package.json +++ b/dev/starter-studio/package.json @@ -12,9 +12,9 @@ "start": "../.bin/sanity start --port 3337" }, "dependencies": { - "babel-plugin-react-compiler": "19.0.0-beta-0dec889-20241115", + "babel-plugin-react-compiler": "0.0.0-experimental-dc8bd44-20241121", "react": "^18.3.1", - "react-compiler-runtime": "19.0.0-beta-0dec889-20241115", + "react-compiler-runtime": "0.0.0-experimental-dc8bd44-20241121", "react-dom": "^18.3.1", "sanity": "workspace:*", "styled-components": "^6.1.0" diff --git a/dev/studio-e2e-testing/package.json b/dev/studio-e2e-testing/package.json index 87b4a911165..fdc76123cec 100644 --- a/dev/studio-e2e-testing/package.json +++ b/dev/studio-e2e-testing/package.json @@ -19,9 +19,9 @@ "@sanity/icons": "^3.4.0", "@sanity/ui": "^2.8.24", "@sanity/vision": "3.64.3", - "babel-plugin-react-compiler": "19.0.0-beta-0dec889-20241115", + "babel-plugin-react-compiler": "0.0.0-experimental-dc8bd44-20241121", "react": "^18.3.1", - "react-compiler-runtime": "19.0.0-beta-0dec889-20241115", + "react-compiler-runtime": "0.0.0-experimental-dc8bd44-20241121", "react-dom": "^18.3.1", "sanity": "workspace:*", "sanity-plugin-media": "^2.3.1", diff --git a/dev/test-next-studio/package.json b/dev/test-next-studio/package.json index 1bbc7103d0e..9ae334b690d 100644 --- a/dev/test-next-studio/package.json +++ b/dev/test-next-studio/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@sanity/vision": "workspace:*", - "babel-plugin-react-compiler": "19.0.0-beta-0dec889-20241115", + "babel-plugin-react-compiler": "0.0.0-experimental-dc8bd44-20241121", "next": "15.0.3", "react": "rc", "react-dom": "rc", diff --git a/dev/test-studio/.gitignore b/dev/test-studio/.gitignore index 4fb8d570cdd..a8ac42194d0 100644 --- a/dev/test-studio/.gitignore +++ b/dev/test-studio/.gitignore @@ -5,3 +5,4 @@ .env.* !.env.example +.million diff --git a/dev/test-studio/package.json b/dev/test-studio/package.json index 36983589b25..47eb378e1ae 100644 --- a/dev/test-studio/package.json +++ b/dev/test-studio/package.json @@ -16,6 +16,7 @@ "workshop:dev": "node -r esbuild-register scripts/workshop/dev.ts" }, "dependencies": { + "@million/lint": "^1.0.12", "@portabletext/editor": "^1.10.2", "@portabletext/react": "^3.0.0", "@sanity/assist": "^3.0.2", @@ -51,7 +52,7 @@ "lodash": "^4.17.21", "qs": "^6.10.2", "react": "^18.3.1", - "react-compiler-runtime": "19.0.0-beta-0dec889-20241115", + "react-compiler-runtime": "0.0.0-experimental-dc8bd44-20241121", "react-dom": "^18.3.1", "react-refractor": "^2.1.6", "refractor": "^3.6.0", @@ -63,7 +64,7 @@ "styled-components": "^6.1.11" }, "devDependencies": { - "babel-plugin-react-compiler": "19.0.0-beta-0dec889-20241115", + "babel-plugin-react-compiler": "0.0.0-experimental-dc8bd44-20241121", "chokidar": "^3.6.0", "vite": "^4.5.5" } diff --git a/package.json b/package.json index 73c45253011..6c1ff211b92 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "eslint-plugin-import": "^2.30.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react": "^7.36.1", - "eslint-plugin-react-compiler": "19.0.0-beta-0dec889-20241115", + "eslint-plugin-react-compiler": "0.0.0-experimental-dc8bd44-20241121", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-tsdoc": "^0.3.0", diff --git a/packages/@sanity/vision/package.json b/packages/@sanity/vision/package.json index ec476a5da33..3f3eac734f4 100644 --- a/packages/@sanity/vision/package.json +++ b/packages/@sanity/vision/package.json @@ -70,7 +70,7 @@ "json5": "^2.2.3", "lodash": "^4.17.21", "quick-lru": "^5.1.1", - "react-compiler-runtime": "19.0.0-beta-0dec889-20241115" + "react-compiler-runtime": "0.0.0-experimental-dc8bd44-20241121" }, "devDependencies": { "@repo/package.config": "workspace:*", @@ -85,7 +85,7 @@ "@sanity/types": "workspace:*", "@sanity/util": "workspace:*", "@types/lodash": "^4.17.7", - "babel-plugin-react-compiler": "19.0.0-beta-0dec889-20241115", + "babel-plugin-react-compiler": "0.0.0-experimental-dc8bd44-20241121", "react": "^18.3.1", "sanity": "workspace:*", "styled-components": "^6.1.13" diff --git a/packages/sanity/package.json b/packages/sanity/package.json index 32e17bd242d..c6fd1c42050 100644 --- a/packages/sanity/package.json +++ b/packages/sanity/package.json @@ -238,7 +238,7 @@ "pretty-ms": "^7.0.1", "quick-lru": "^5.1.1", "raf": "^3.4.1", - "react-compiler-runtime": "19.0.0-beta-0dec889-20241115", + "react-compiler-runtime": "0.0.0-experimental-dc8bd44-20241121", "react-copy-to-clipboard": "^5.0.4", "react-fast-compare": "^3.2.0", "react-focus-lock": "^2.8.1", @@ -300,7 +300,7 @@ "@types/tar-fs": "^2.0.1", "@vitejs/plugin-react": "^4.3.3", "@vvo/tzdb": "6.137.0", - "babel-plugin-react-compiler": "19.0.0-beta-0dec889-20241115", + "babel-plugin-react-compiler": "0.0.0-experimental-dc8bd44-20241121", "blob-polyfill": "^9.0.20240710", "date-fns-tz": "2.0.1", "react": "^18.3.1", diff --git a/packages/sanity/src/core/components/hookCollection/defineHookStateComponent.tsx b/packages/sanity/src/core/components/hookCollection/defineHookStateComponent.tsx index 48daba6c098..df91811144f 100644 --- a/packages/sanity/src/core/components/hookCollection/defineHookStateComponent.tsx +++ b/packages/sanity/src/core/components/hookCollection/defineHookStateComponent.tsx @@ -45,6 +45,6 @@ export function defineHookStateComponent({ return memo( HookStateComponent, // Only re-render if the args prop changes, ignore other prop changes - (prev, next) => prev.args === next.args, + (prev, next) => prev?.args === next?.args, ) } diff --git a/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx b/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx index 04ab7b9231f..beba3fe38a3 100644 --- a/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx +++ b/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx @@ -26,15 +26,15 @@ interface LoadingTestProps { title?: string | null } -const StyledCard = styled(Card)<{$fill?: boolean}>(({$fill}) => { - return css` - align-items: center; - box-sizing: border-box; - display: flex; - flex-direction: column; - justify-content: center; +const StyledCard = styled(Card)<{$fill?: boolean}>` + align-items: center; + box-sizing: border-box; + display: flex; + flex-direction: column; + justify-content: center; - ${$fill + ${({$fill}) => + $fill ? css` bottom: 0; height: 100%; @@ -52,44 +52,42 @@ const StyledCard = styled(Card)<{$fill?: boolean}>(({$fill}) => { width: -webkit-fill-available; `} - ${DEBUG_MODE && - css` - background: linear-gradient(#5555ca, #daf9f9); - border: 2px solid black; - > * { - mix-blend-mode: multiply; - } - `} - + ${DEBUG_MODE && + css` + background: linear-gradient(#5555ca, #daf9f9); + border: 2px solid black; > * { - position: absolute; + mix-blend-mode: multiply; } - ` -}) + `} + + > * { + position: absolute; + } +` -const StyledSpinner = styled(Spinner)<{$animatePosition: boolean}>(({$animatePosition = true}) => { - return css` - @keyframes fadeIn { - from { - opacity: 0; - } - to { - opacity: 1; - } +const StyledSpinner = styled(Spinner)<{$animatePosition: boolean}>` + @keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; } - @keyframes slideUp { - from { - transform: translateY(0); - } - to { - transform: translateY(-15px); - } + } + @keyframes slideUp { + from { + transform: translateY(0); } - animation: ${$animatePosition - ? `500ms ease-out ${SPINNER_DELAY}ms 1 normal both running fadeIn, 750ms ease-out ${TEXT_DELAY}ms 1 normal both running slideUp` - : `500ms ease-out ${SPINNER_DELAY}ms 1 normal both running fadeIn`}; - ` -}) + to { + transform: translateY(-15px); + } + } + animation: ${({$animatePosition = true}) => + $animatePosition + ? css`500ms ease-out ${SPINNER_DELAY}ms 1 normal both running fadeIn, 750ms ease-out ${TEXT_DELAY}ms 1 normal both running slideUp` + : css`500ms ease-out ${SPINNER_DELAY}ms 1 normal both running fadeIn`}; +` const StyledText = styled(Text)` @keyframes fadeIn { diff --git a/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsProvider.tsx b/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsProvider.tsx index 49d6f82cd1e..885f62fe5e1 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsProvider.tsx +++ b/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsProvider.tsx @@ -1,6 +1,6 @@ -/* eslint-disable camelcase */ +/* eslint-disable max-nested-callbacks,camelcase */ import {useTelemetry} from '@sanity/telemetry/react' -import {useCallback, useMemo, useState} from 'react' +import {memo, useCallback, useMemo, useState} from 'react' import {useObservable} from 'react-rx' import {catchError, combineLatest, map, type Observable, startWith} from 'rxjs' import {StudioAnnouncementContext} from 'sanity/_singletons' @@ -29,7 +29,9 @@ interface StudioAnnouncementsProviderProps { } const CLIENT_OPTIONS = {apiVersion: 'v2024-09-19'} -function StudioAnnouncementsProviderInner({children}: StudioAnnouncementsProviderProps) { +const StudioAnnouncementsProviderInner = memo(function StudioAnnouncementsProviderInner({ + children, +}: StudioAnnouncementsProviderProps) { const telemetry = useTelemetry() const [dialogMode, setDialogMode] = useState(null) const [isCardDismissed, setIsCardDismissed] = useState(false) @@ -155,17 +157,17 @@ function StudioAnnouncementsProviderInner({children}: StudioAnnouncementsProvide )} ) -} +}) /** * @internal * @hidden */ -export function StudioAnnouncementsProvider(props: StudioAnnouncementsProviderProps) { +export function StudioAnnouncementsProvider({children}: StudioAnnouncementsProviderProps) { const source = useSource() if (source.announcements?.enabled) { - return + return {children} } - return props.children + return children } diff --git a/packages/sanity/src/structure/panes/StructureToolPane.tsx b/packages/sanity/src/structure/panes/StructureToolPane.tsx index fd47373c13b..f5504aed6da 100644 --- a/packages/sanity/src/structure/panes/StructureToolPane.tsx +++ b/packages/sanity/src/structure/panes/StructureToolPane.tsx @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import {isEqual} from 'lodash' import {lazy, memo, Suspense} from 'react' @@ -77,8 +78,8 @@ export const StructureToolPane = memo( ) }, ( - {params: prevParams = {}, payload: prevPayload = null, ...prev}, - {params: nextParams = {}, payload: nextPayload = null, ...next}, + {params: prevParams = {}, payload: prevPayload = null, ...prev} = {} as any, + {params: nextParams = {}, payload: nextPayload = null, ...next} = {} as any, ) => { // deeply compare these objects (it's okay, they're small) if (!isEqual(prevParams, nextParams)) return false diff --git a/packages/sanity/src/structure/panes/document/document-layout/DocumentLayout.tsx b/packages/sanity/src/structure/panes/document/document-layout/DocumentLayout.tsx index e9068373060..fbf86181716 100644 --- a/packages/sanity/src/structure/panes/document/document-layout/DocumentLayout.tsx +++ b/packages/sanity/src/structure/panes/document/document-layout/DocumentLayout.tsx @@ -119,17 +119,12 @@ export function DocumentLayout() { DOCUMENT_PANEL_INITIAL_MIN_WIDTH + (inspector ? DOCUMENT_INSPECTOR_MIN_WIDTH : 0) const minWidth = DOCUMENT_PANEL_MIN_WIDTH + (inspector ? DOCUMENT_INSPECTOR_MIN_WIDTH : 0) - const currentInspector = useMemo( - () => inspectors?.find((i) => i.name === inspector?.name), - [inspectors, inspector?.name], - ) - const hasValue = Boolean(value) const menuItems = useMemo( () => getMenuItems({ - currentInspector, + currentInspector: inspectors?.find((i) => i.name === inspector?.name), features, hasValue, inspectorMenuItems, @@ -137,7 +132,7 @@ export function DocumentLayout() { previewUrl, t, }), - [currentInspector, features, hasValue, inspectorMenuItems, inspectors, previewUrl, t], + [features, hasValue, inspector?.name, inspectorMenuItems, inspectors, previewUrl, t], ) const handleKeyUp = useCallback( diff --git a/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx b/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx index 852994b172e..ee73812dc3c 100644 --- a/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx +++ b/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx @@ -14,10 +14,10 @@ export type TooltipDelayGroupProviderProps = Omit { +export const TooltipDelayGroupProvider = ({children}: TooltipDelayGroupProviderProps) => { return ( - {props.children} + {children} ) } diff --git a/perf/efps/package.json b/perf/efps/package.json index f552e5ae198..b62f6a3da7e 100644 --- a/perf/efps/package.json +++ b/perf/efps/package.json @@ -23,7 +23,7 @@ "@types/serve-handler": "^6.1.4", "@types/yargs": "^17.0.7", "@vitejs/plugin-react": "^4.3.3", - "babel-plugin-react-compiler": "19.0.0-beta-0dec889-20241115", + "babel-plugin-react-compiler": "0.0.0-experimental-dc8bd44-20241121", "chalk": "^4.1.2", "cli-table3": "^0.6.5", "dotenv": "^16.0.3", @@ -31,7 +31,7 @@ "ora": "^8.0.1", "playwright": "^1.46.1", "react": "^18.3.1", - "react-compiler-runtime": "19.0.0-beta-0dec889-20241115", + "react-compiler-runtime": "0.0.0-experimental-dc8bd44-20241121", "react-dom": "^18.3.1", "rollup-plugin-sourcemaps": "^0.6.3", "sanity": "workspace:*", diff --git a/perf/studio/package.json b/perf/studio/package.json index 2bc7ddee1bd..16e068c5398 100644 --- a/perf/studio/package.json +++ b/perf/studio/package.json @@ -14,9 +14,9 @@ "start": "sanity start --port 3300" }, "dependencies": { - "babel-plugin-react-compiler": "19.0.0-beta-0dec889-20241115", + "babel-plugin-react-compiler": "0.0.0-experimental-dc8bd44-20241121", "react": "^18.3.1", - "react-compiler-runtime": "19.0.0-beta-0dec889-20241115", + "react-compiler-runtime": "0.0.0-experimental-dc8bd44-20241121", "react-dom": "^18.3.1", "sanity": "workspace:*", "styled-components": "^6.1.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b695ee340ea..02c29ea1848 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,7 +50,7 @@ importers: version: 0.10.2(debug@4.3.7) '@sanity/pkg-utils': specifier: 6.11.12 - version: 6.11.12(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(debug@4.3.7)(typescript@5.6.3) + version: 6.11.12(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(debug@4.3.7)(typescript@5.6.3) '@sanity/prettier-config': specifier: ^1.0.3 version: 1.0.3(prettier@3.3.3) @@ -142,8 +142,8 @@ importers: specifier: ^7.36.1 version: 7.36.1(eslint@8.57.0) eslint-plugin-react-compiler: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115(eslint@8.57.0) + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121(eslint@8.57.0) eslint-plugin-react-hooks: specifier: ^4.6.2 version: 4.6.2(eslint@8.57.0) @@ -292,14 +292,14 @@ importers: specifier: workspace:* version: link:../../packages/@sanity/vision babel-plugin-react-compiler: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115 + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121 react: specifier: ^18.2.0 version: 18.3.1 react-compiler-runtime: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115(react@18.3.1) + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121(react@18.3.1) react-dom: specifier: ^18.2.0 version: 18.3.1(react@18.3.1) @@ -334,14 +334,14 @@ importers: dev/starter-studio: dependencies: babel-plugin-react-compiler: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115 + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121 react: specifier: ^18.3.1 version: 18.3.1 react-compiler-runtime: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115(react@18.3.1) + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121(react@18.3.1) react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) @@ -382,14 +382,14 @@ importers: specifier: 3.64.3 version: link:../../packages/@sanity/vision babel-plugin-react-compiler: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115 + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121 react: specifier: ^18.3.1 version: 18.3.1 react-compiler-runtime: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115(react@18.3.1) + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121(react@18.3.1) react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) @@ -433,11 +433,11 @@ importers: specifier: workspace:* version: link:../../packages/@sanity/vision babel-plugin-react-compiler: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115 + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121 next: specifier: 15.0.3 - version: 15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) + version: 15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) react: specifier: rc version: 19.0.0-rc.1 @@ -462,6 +462,9 @@ importers: dev/test-studio: dependencies: + '@million/lint': + specifier: ^1.0.12 + version: 1.0.12(encoding@0.1.13)(rollup@4.27.3) '@portabletext/editor': specifier: ^1.10.2 version: 1.11.1(@sanity/block-tools@packages+@sanity+block-tools)(@sanity/schema@packages+@sanity+schema)(@sanity/types@packages+@sanity+types)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rxjs@7.8.1)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) @@ -518,7 +521,7 @@ importers: version: 1.10.20(@sanity/client@6.22.5)(react@18.3.1) '@sanity/tsdoc': specifier: 1.0.134 - version: 1.0.134(@types/babel__core@7.20.5)(@types/node@22.5.4)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(react-dom@18.3.1(react@18.3.1))(react-is@19.0.0-rc-b01722d5-20241114)(react@18.3.1)(sanity@packages+sanity)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.32.0) + version: 1.0.134(@types/babel__core@7.20.5)(@types/node@22.5.4)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(react-dom@18.3.1(react@18.3.1))(react-is@19.0.0-rc-b01722d5-20241114)(react@18.3.1)(sanity@packages+sanity)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.32.0) '@sanity/types': specifier: workspace:* version: link:../../packages/@sanity/types @@ -539,7 +542,7 @@ importers: version: link:../../packages/@sanity/vision '@sanity/visual-editing': specifier: 2.8.0 - version: 2.8.0(@sanity/client@6.22.5)(next@15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 2.8.0(@sanity/client@6.22.5)(next@15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@turf/helpers': specifier: ^6.0.1 version: 6.5.0 @@ -568,8 +571,8 @@ importers: specifier: ^18.3.1 version: 18.3.1 react-compiler-runtime: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115(react@18.3.1) + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121(react@18.3.1) react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) @@ -599,8 +602,8 @@ importers: version: 6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1) devDependencies: babel-plugin-react-compiler: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115 + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121 vite: specifier: ^4.5.5 version: 4.5.5(@types/node@22.5.4)(terser@5.32.0) @@ -1299,7 +1302,7 @@ importers: dependencies: '@codemirror/autocomplete': specifier: ^6.1.0 - version: 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1) + version: 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1) '@codemirror/commands': specifier: ^6.0.1 version: 6.7.1 @@ -1311,13 +1314,13 @@ importers: version: 6.10.3 '@codemirror/search': specifier: ^6.0.1 - version: 6.5.7 + version: 6.5.8 '@codemirror/state': specifier: ^6.0.0 version: 6.4.1 '@codemirror/view': specifier: ^6.1.1 - version: 6.34.3 + version: 6.35.0 '@juggle/resize-observer': specifier: ^3.3.1 version: 3.4.0 @@ -1341,7 +1344,7 @@ importers: version: 2.8.24(react-dom@19.0.0-rc-f994737d14-20240522(react@18.3.1))(react-is@19.0.0-rc-b01722d5-20241114)(react@18.3.1)(styled-components@6.1.13(react-dom@19.0.0-rc-f994737d14-20240522(react@18.3.1))(react@18.3.1)) '@uiw/react-codemirror': specifier: ^4.11.4 - version: 4.23.0(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1))(@codemirror/language@6.10.3)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.7)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.34.3)(codemirror@6.0.1(@lezer/common@1.2.1))(react-dom@19.0.0-rc-f994737d14-20240522(react@18.3.1))(react@18.3.1) + version: 4.23.0(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1))(@codemirror/language@6.10.3)(@codemirror/lint@6.8.3)(@codemirror/search@6.5.8)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.35.0)(codemirror@6.0.1(@lezer/common@1.2.1))(react-dom@19.0.0-rc-f994737d14-20240522(react@18.3.1))(react@18.3.1) is-hotkey-esm: specifier: ^1.0.0 version: 1.0.0 @@ -1358,8 +1361,8 @@ importers: specifier: ^5.1.1 version: 5.1.1 react-compiler-runtime: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115(react@18.3.1) + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121(react@18.3.1) devDependencies: '@repo/package.config': specifier: workspace:* @@ -1398,8 +1401,8 @@ importers: specifier: ^4.17.7 version: 4.17.12 babel-plugin-react-compiler: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115 + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121 react: specifier: ^18.3.1 version: 18.3.1 @@ -1698,8 +1701,8 @@ importers: specifier: ^3.4.1 version: 3.4.1 react-compiler-runtime: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115(react@18.3.1) + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121(react@18.3.1) react-copy-to-clipboard: specifier: ^5.0.4 version: 5.1.0(react@18.3.1) @@ -1802,10 +1805,10 @@ importers: version: 3.0.0 '@sanity/pkg-utils': specifier: 6.11.12 - version: 6.11.12(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(debug@4.3.7)(typescript@5.6.3) + version: 6.11.12(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(debug@4.3.7)(typescript@5.6.3) '@sanity/tsdoc': specifier: 1.0.134 - version: 1.0.134(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(debug@4.3.7)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(sanity@packages+sanity)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.32.0) + version: 1.0.134(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(debug@4.3.7)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(sanity@packages+sanity)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.32.0) '@sanity/ui-workshop': specifier: ^1.2.11 version: 1.2.11(@sanity/icons@3.4.0(react@18.3.1))(@sanity/ui@2.8.24(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1)))(@types/node@18.19.44)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.32.0) @@ -1876,8 +1879,8 @@ importers: specifier: 6.137.0 version: 6.137.0 babel-plugin-react-compiler: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115 + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121 blob-polyfill: specifier: ^9.0.20240710 version: 9.0.20240710 @@ -1963,8 +1966,8 @@ importers: specifier: ^4.3.3 version: 4.3.3(vite@5.4.11(@types/node@22.5.4)(terser@5.32.0)) babel-plugin-react-compiler: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115 + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121 chalk: specifier: ^4.1.2 version: 4.1.2 @@ -1987,8 +1990,8 @@ importers: specifier: ^18.3.1 version: 18.3.1 react-compiler-runtime: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115(react@18.3.1) + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121(react@18.3.1) react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) @@ -2014,14 +2017,14 @@ importers: perf/studio: dependencies: babel-plugin-react-compiler: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115 + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121 react: specifier: ^18.3.1 version: 18.3.1 react-compiler-runtime: - specifier: 19.0.0-beta-0dec889-20241115 - version: 19.0.0-beta-0dec889-20241115(react@18.3.1) + specifier: 0.0.0-experimental-dc8bd44-20241121 + version: 0.0.0-experimental-dc8bd44-20241121(react@18.3.1) react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) @@ -2099,9 +2102,17 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@antfu/ni@0.21.12': + resolution: {integrity: sha512-2aDL3WUv8hMJb2L3r/PIQWsTLyq7RQr3v9xD16fiz6O8ys1xEyLhhTOv8gxtZvJiTzjTF5pHoArvRdesGL1DMQ==} + hasBin: true + '@asamuzakjp/dom-selector@2.0.2': resolution: {integrity: sha512-x1KXOatwofR6ZAYzXRBL5wrdV0vwNxlTCK9NCuLqAzQYARqGcvFwiJA6A1ERuh+dgeA4Dxm3JBYictIes+SqUQ==} + '@axiomhq/js@1.0.0-rc.3': + resolution: {integrity: sha512-Zm10TczcMLounWqC42nMkXQ7XKLqjzLrd5ia022oBKDUZqAFVg2y9d1quQVNV4FlXyg9MKDdfMjpKQRmzEGaog==} + engines: {node: '>=16'} + '@babel/code-frame@7.26.2': resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} @@ -2677,6 +2688,10 @@ packages: resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} + '@babel/types@7.25.2': + resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} + engines: {node: '>=6.9.0'} + '@babel/types@7.26.0': resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} @@ -2684,6 +2699,14 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + '@clack/core@0.3.5': + resolution: {integrity: sha512-5cfhQNH+1VQ2xLQlmzXMqUoiaH0lRBq9/CLW9lTyMbuKLC3+xEK01tHVvyut++mLOn5urSHmkm6I0Lg9MaJSTQ==} + + '@clack/prompts@0.7.0': + resolution: {integrity: sha512-0MhX9/B4iL6Re04jPrttDm+BsP8y6mS7byuv0BvXgdXhbV5PdlsHt55dvNsuBCPZ7xq1oTAOOuotR9NFbQyMSA==} + bundledDependencies: + - is-unicode-supported + '@codemirror/autocomplete@6.18.3': resolution: {integrity: sha512-1dNIOmiM0z4BIBwxmxEfA1yoxh1MF/6KPBbh20a5vphGV0ictKlgQsbJs6D6SkR6iJpGbpwRsa6PFMNlg9T9pQ==} peerDependencies: @@ -2725,11 +2748,11 @@ packages: '@codemirror/legacy-modes@6.4.1': resolution: {integrity: sha512-vdg3XY7OAs5uLDx2Iw+cGfnwtd7kM+Et/eMsqAGTfT/JKiVBQZXosTzjEbWAi/FrY6DcQIz8mQjBozFHZEUWQA==} - '@codemirror/lint@6.8.2': - resolution: {integrity: sha512-PDFG5DjHxSEjOXk9TQYYVjZDqlZTFaDBfhQixHnQOEVDDNHUbEh/hstAjcQJaA6FQdZTD1hquXTK0rVBLADR1g==} + '@codemirror/lint@6.8.3': + resolution: {integrity: sha512-GSGfKxCo867P7EX1k2LoCrjuQFeqVgPGRRsSl4J4c0KMkD+k1y6WYvTQkzv0iZ8JhLJDujEvlnMchv4CZQLh3Q==} - '@codemirror/search@6.5.7': - resolution: {integrity: sha512-6+iLsXvITWKHYlkgHPCs/qiX4dNzn8N78YfhOFvPtPYCkuXqZq10rAfsUMhOq7O/1VjJqdXRflyExlfVcu/9VQ==} + '@codemirror/search@6.5.8': + resolution: {integrity: sha512-PoWtZvo7c1XFeZWmmyaOp2G0XVbOnm+fJzvghqGAktBW3cufwJUWvSCcNG0ppXiBEM05mZu6RhMtXPv2hpllig==} '@codemirror/state@6.4.1': resolution: {integrity: sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==} @@ -2737,8 +2760,8 @@ packages: '@codemirror/theme-one-dark@6.1.2': resolution: {integrity: sha512-F+sH0X16j/qFLMAfbciKTxVOwkdAS336b7AXTKOZhy8BR3eH/RelsnLgLFINrpST63mmN2OuwUt0W2ndUgYwUA==} - '@codemirror/view@6.34.3': - resolution: {integrity: sha512-Ph5d+u8DxIeSgssXEakaakImkzBV4+slwIbcxl9oc9evexJhImeu/G8TK7+zp+IFK9KuJ0BdSn6kTBJeH2CHvA==} + '@codemirror/view@6.35.0': + resolution: {integrity: sha512-I0tYy63q5XkaWsJ8QRv5h6ves7kvtrBWjBcnf/bzohFJQc5c14a1AQRdE8QpPF9eMp5Mq2FMm59TCj1gDfE7kw==} '@colors/colors@1.5.0': resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} @@ -2853,6 +2876,12 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.20.2': + resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} @@ -2877,6 +2906,12 @@ packages: cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.20.2': + resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm64@0.21.5': resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} @@ -2901,6 +2936,12 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-arm@0.20.2': + resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + '@esbuild/android-arm@0.21.5': resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} @@ -2925,6 +2966,12 @@ packages: cpu: [x64] os: [android] + '@esbuild/android-x64@0.20.2': + resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + '@esbuild/android-x64@0.21.5': resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} @@ -2949,6 +2996,12 @@ packages: cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.20.2': + resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-arm64@0.21.5': resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} @@ -2973,6 +3026,12 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.20.2': + resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + '@esbuild/darwin-x64@0.21.5': resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} @@ -2997,6 +3056,12 @@ packages: cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.20.2': + resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-arm64@0.21.5': resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} @@ -3021,6 +3086,12 @@ packages: cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.20.2': + resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + '@esbuild/freebsd-x64@0.21.5': resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} @@ -3045,6 +3116,12 @@ packages: cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.20.2': + resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm64@0.21.5': resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} @@ -3069,6 +3146,12 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.20.2': + resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + '@esbuild/linux-arm@0.21.5': resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} @@ -3093,6 +3176,12 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.20.2': + resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-ia32@0.21.5': resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} @@ -3117,6 +3206,12 @@ packages: cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.20.2': + resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-loong64@0.21.5': resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} @@ -3141,6 +3236,12 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.20.2': + resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-mips64el@0.21.5': resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} @@ -3165,6 +3266,12 @@ packages: cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.20.2': + resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-ppc64@0.21.5': resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} @@ -3189,6 +3296,12 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.20.2': + resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-riscv64@0.21.5': resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} @@ -3213,6 +3326,12 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.20.2': + resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-s390x@0.21.5': resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} @@ -3237,6 +3356,12 @@ packages: cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.20.2': + resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + '@esbuild/linux-x64@0.21.5': resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} @@ -3261,6 +3386,12 @@ packages: cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.20.2': + resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + '@esbuild/netbsd-x64@0.21.5': resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} @@ -3291,6 +3422,12 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.20.2': + resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + '@esbuild/openbsd-x64@0.21.5': resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} @@ -3315,6 +3452,12 @@ packages: cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.20.2': + resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + '@esbuild/sunos-x64@0.21.5': resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} @@ -3339,6 +3482,12 @@ packages: cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.20.2': + resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-arm64@0.21.5': resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} @@ -3363,6 +3512,12 @@ packages: cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.20.2': + resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-ia32@0.21.5': resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} @@ -3387,6 +3542,12 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.20.2': + resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + '@esbuild/win32-x64@0.21.5': resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} @@ -3478,6 +3639,12 @@ packages: resolution: {integrity: sha512-Z3ZzOnF3YKLuvpkvF+TjQ6lztxcAyTILp+FjKonmVpEwPa9vFvxpZjubLR4sB6bf19i/8HL2AXRjA0YFgHFRmQ==} engines: {node: '>=14'} + '@hono/node-server@1.13.7': + resolution: {integrity: sha512-kTfUMsoloVKtRA2fLiGSd9qBddmru9KadNyhJCwgKBxTiNkaAJEwkVN9KV/rS4HtmmNRtUh6P+YpmjRMl0d9vQ==} + engines: {node: '>=18.14.1'} + peerDependencies: + hono: ^4 + '@hookform/resolvers@3.9.0': resolution: {integrity: sha512-bU0Gr4EepJ/EQsH/IwEzYLsT/PEj5C0ynLQ4m+GSHS+xKH4TfSelhluTgOaoc4kA5s7eCsQbM4wvZLzELmWzUg==} peerDependencies: @@ -3705,6 +3872,14 @@ packages: '@microsoft/tsdoc@0.15.0': resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} + '@million/install@1.0.12': + resolution: {integrity: sha512-1TeXcdGCjrcCG/VcKayZ6NC646cf/gKTkscn2YbfwYbE4gLJbJHCrXxQ3zsWHznqiw61t1oTjFgIafM1JBcLzA==} + hasBin: true + + '@million/lint@1.0.12': + resolution: {integrity: sha512-aicK2WWdCGxxoRzQTrfBPUsumvKblnHvQ//OtIsutqiFqareMI1vcG8v4X1y+kliJB81j7oLDi4zZqvYBQHVvQ==} + hasBin: true + '@mux/mux-player-react@2.9.1': resolution: {integrity: sha512-1BpMs1J7P+d+/QCf9/mkTk/NPYR6sOskR4Ih0uFZjDAqNUN7/C9Q0FEJ6hF3sFXwAXo50RhnfCzsC5uYx3QHbA==} peerDependencies: @@ -3730,6 +3905,106 @@ packages: '@mux/upchunk@3.4.0': resolution: {integrity: sha512-ZaX4u6xRhmgB4UAmw0lvO0LB1LddbRgSILkjRDnk1F4QDtkCOuY9nOh550TNI7uKYcf6HZQax7QXst6EkpjiyQ==} + '@napi-rs/nice-android-arm-eabi@1.0.1': + resolution: {integrity: sha512-5qpvOu5IGwDo7MEKVqqyAxF90I6aLj4n07OzpARdgDRfz8UbBztTByBp0RC59r3J1Ij8uzYi6jI7r5Lws7nn6w==} + engines: {node: '>= 10'} + cpu: [arm] + os: [android] + + '@napi-rs/nice-android-arm64@1.0.1': + resolution: {integrity: sha512-GqvXL0P8fZ+mQqG1g0o4AO9hJjQaeYG84FRfZaYjyJtZZZcMjXW5TwkL8Y8UApheJgyE13TQ4YNUssQaTgTyvA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] + + '@napi-rs/nice-darwin-arm64@1.0.1': + resolution: {integrity: sha512-91k3HEqUl2fsrz/sKkuEkscj6EAj3/eZNCLqzD2AA0TtVbkQi8nqxZCZDMkfklULmxLkMxuUdKe7RvG/T6s2AA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@napi-rs/nice-darwin-x64@1.0.1': + resolution: {integrity: sha512-jXnMleYSIR/+TAN/p5u+NkCA7yidgswx5ftqzXdD5wgy/hNR92oerTXHc0jrlBisbd7DpzoaGY4cFD7Sm5GlgQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@napi-rs/nice-freebsd-x64@1.0.1': + resolution: {integrity: sha512-j+iJ/ezONXRQsVIB/FJfwjeQXX7A2tf3gEXs4WUGFrJjpe/z2KB7sOv6zpkm08PofF36C9S7wTNuzHZ/Iiccfw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + + '@napi-rs/nice-linux-arm-gnueabihf@1.0.1': + resolution: {integrity: sha512-G8RgJ8FYXYkkSGQwywAUh84m946UTn6l03/vmEXBYNJxQJcD+I3B3k5jmjFG/OPiU8DfvxutOP8bi+F89MCV7Q==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + + '@napi-rs/nice-linux-arm64-gnu@1.0.1': + resolution: {integrity: sha512-IMDak59/W5JSab1oZvmNbrms3mHqcreaCeClUjwlwDr0m3BoR09ZiN8cKFBzuSlXgRdZ4PNqCYNeGQv7YMTjuA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@napi-rs/nice-linux-arm64-musl@1.0.1': + resolution: {integrity: sha512-wG8fa2VKuWM4CfjOjjRX9YLIbysSVV1S3Kgm2Fnc67ap/soHBeYZa6AGMeR5BJAylYRjnoVOzV19Cmkco3QEPw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@napi-rs/nice-linux-ppc64-gnu@1.0.1': + resolution: {integrity: sha512-lxQ9WrBf0IlNTCA9oS2jg/iAjQyTI6JHzABV664LLrLA/SIdD+I1i3Mjf7TsnoUbgopBcCuDztVLfJ0q9ubf6Q==} + engines: {node: '>= 10'} + cpu: [ppc64] + os: [linux] + + '@napi-rs/nice-linux-riscv64-gnu@1.0.1': + resolution: {integrity: sha512-3xs69dO8WSWBb13KBVex+yvxmUeEsdWexxibqskzoKaWx9AIqkMbWmE2npkazJoopPKX2ULKd8Fm9veEn0g4Ig==} + engines: {node: '>= 10'} + cpu: [riscv64] + os: [linux] + + '@napi-rs/nice-linux-s390x-gnu@1.0.1': + resolution: {integrity: sha512-lMFI3i9rlW7hgToyAzTaEybQYGbQHDrpRkg+1gJWEpH0PLAQoZ8jiY0IzakLfNWnVda1eTYYlxxFYzW8Rqczkg==} + engines: {node: '>= 10'} + cpu: [s390x] + os: [linux] + + '@napi-rs/nice-linux-x64-gnu@1.0.1': + resolution: {integrity: sha512-XQAJs7DRN2GpLN6Fb+ZdGFeYZDdGl2Fn3TmFlqEL5JorgWKrQGRUrpGKbgZ25UeZPILuTKJ+OowG2avN8mThBA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@napi-rs/nice-linux-x64-musl@1.0.1': + resolution: {integrity: sha512-/rodHpRSgiI9o1faq9SZOp/o2QkKQg7T+DK0R5AkbnI/YxvAIEHf2cngjYzLMQSQgUhxym+LFr+UGZx4vK4QdQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@napi-rs/nice-win32-arm64-msvc@1.0.1': + resolution: {integrity: sha512-rEcz9vZymaCB3OqEXoHnp9YViLct8ugF+6uO5McifTedjq4QMQs3DHz35xBEGhH3gJWEsXMUbzazkz5KNM5YUg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@napi-rs/nice-win32-ia32-msvc@1.0.1': + resolution: {integrity: sha512-t7eBAyPUrWL8su3gDxw9xxxqNwZzAqKo0Szv3IjVQd1GpXXVkb6vBBQUuxfIYaXMzZLwlxRQ7uzM2vdUE9ULGw==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@napi-rs/nice-win32-x64-msvc@1.0.1': + resolution: {integrity: sha512-JlF+uDcatt3St2ntBG8H02F1mM45i5SF9W+bIKiReVE6wiy3o16oBP/yxt+RZ+N6LbCImJXJ6bXNO2kn9AXicg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@napi-rs/nice@1.0.1': + resolution: {integrity: sha512-zM0mVWSXE0a0h9aKACLwKmD6nHcRiKrPpCfvaKqG1CqDEyjEawId0ocXxVzPMCAm6kkWr2P025msfxXEnt8UGQ==} + engines: {node: '>= 10'} + '@napi-rs/wasm-runtime@0.2.4': resolution: {integrity: sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==} @@ -4380,6 +4655,9 @@ packages: cpu: [x64] os: [win32] + '@rrweb/types@2.0.0-alpha.16': + resolution: {integrity: sha512-E6cACNVsm+NUhn7dzocQoKyXI7BHrHRRm5Ab23yrAzEQ2caWocCEYJhqDlc4KRVJBkQfXZfyWm8+2d0uggFuZg==} + '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} @@ -4762,6 +5040,9 @@ packages: '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@socket.io/component-emitter@3.1.2': + resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} + '@swc-node/core@1.13.3': resolution: {integrity: sha512-OGsvXIid2Go21kiNqeTIn79jcaX4l0G93X2rAnas4LFoDyA9wAwVK7xZdm+QsKoMn5Mus2yFLCc4OtX2dD/PWA==} engines: {node: '>= 10'} @@ -4925,6 +5206,9 @@ packages: '@tsconfig/node16@1.0.4': resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + '@tsconfig/svelte@1.0.13': + resolution: {integrity: sha512-5lYJP45Xllo4yE/RUBccBT32eBlRDbqN8r1/MIvQbKxW3aFqaYPCNgm8D5V20X4ShHcwvYWNlKg3liDh1MlBoA==} + '@tufjs/canonical-json@2.0.0': resolution: {integrity: sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==} engines: {node: ^16.14.0 || >=18.0.0} @@ -4997,6 +5281,9 @@ packages: '@types/cpx@1.5.5': resolution: {integrity: sha512-PwM+cN40GZcjG9YgGFp/rQGKOpTqr6scUl1Q85NHL5jieh9I203kKiArjJcExwxy4+vTABmVUNRkNvGbPnRQZg==} + '@types/css-font-loading-module@0.0.7': + resolution: {integrity: sha512-nl09VhutdjINdWyXxHWN/w9zlNCfr60JUqJbd24YXUuCwgeL0TpFSdElCwb6cxfB6ybE19Gjj4g0jsgkXxKv1Q==} + '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -5363,6 +5650,9 @@ packages: '@vvo/tzdb@6.137.0': resolution: {integrity: sha512-er8kaywRTjBTlaBgYynd3Fe/OPUfL3GuRMJOyWRlZ3V7EX4A6pryXTf42FL1ZXjOkDPz+/exAUe03kmb02MLOA==} + '@xstate/fsm@1.6.5': + resolution: {integrity: sha512-b5o1I6aLNeYlU/3CPlj/Z91ybk1gUsKT+5NAJI+2W4UjvS5KLG28K9v5UvNoFVjHV8PajVZ00RH3vnjyQO7ZAw==} + '@xstate/react@5.0.0': resolution: {integrity: sha512-MkYMpmqqCdK43wSl/V/jSpsvumzV4RSG2ZOUEAIrg/w36BJpyufMrsR0rz7POX5ICF5s3xzP9q7Hd5TyM5SSyQ==} peerDependencies: @@ -5622,6 +5912,10 @@ packages: ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} + ast-types@0.14.2: + resolution: {integrity: sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==} + engines: {node: '>=4'} + ast-types@0.16.1: resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==} engines: {node: '>=4'} @@ -5690,14 +5984,17 @@ packages: peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115: - resolution: {integrity: sha512-sB912UbBt/vYl+6w40VO+LzWVnAt1Ty/XCDKs2qT5Fopljm+WpJNHVVkNESsX0IjU3sM5T5KvN31uuPpraUi7A==} + babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121: + resolution: {integrity: sha512-8aAhTSOGgeD0e3UwHuIL7YRBBjGgiYxZ00Kr48CTiGnq++U/X3WCZ3s1k1wwN475/haFYNSq+mGayOBRlcybAw==} babel-plugin-styled-components@2.1.4: resolution: {integrity: sha512-Xgp9g+A/cG47sUyRwwYxGM4bR/jDRg5N6it/8+HxCnbT5XNKSKDT9xm4oag/osgqjC2It/vH0yXsomOG6k558g==} peerDependencies: styled-components: '>= 2' + babel-plugin-syntax-hermes-parser@0.21.1: + resolution: {integrity: sha512-tUCEa+EykZx3oJXc+PolKz2iwDscCJ2hCONMvEqjAb4jIQH5ZapDd5Brs2Nk4TQpSJ/1Ykz53ksQbevXbF0wxg==} + babel-runtime@6.26.0: resolution: {integrity: sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==} @@ -5707,6 +6004,10 @@ packages: bare-events@2.4.2: resolution: {integrity: sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q==} + base64-arraybuffer@1.0.2: + resolution: {integrity: sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==} + engines: {node: '>= 0.6.0'} + base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -5758,6 +6059,10 @@ packages: resolution: {integrity: sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==} engines: {node: '>=8'} + boxen@5.1.2: + resolution: {integrity: sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==} + engines: {node: '>=10'} + brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} @@ -5941,6 +6246,9 @@ packages: resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} engines: {node: '>=18'} + ci-info@2.0.0: + resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} + ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} @@ -5984,6 +6292,10 @@ packages: resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + cli-high@0.4.3: + resolution: {integrity: sha512-YbwZhmK0fpwVn3bsbYiYdkseXFcGvSVkX+fl0CY73PAz77Uzkr46X3Ifs4V7NgwfvCqGx+6C5zEi8SL8m9lqtg==} + hasBin: true + cli-spinners@2.6.1: resolution: {integrity: sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==} engines: {node: '>=6'} @@ -6533,6 +6845,10 @@ packages: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} + diff@5.2.0: + resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} + engines: {node: '>=0.3.1'} + dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -6624,6 +6940,9 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + effect@3.10.16: + resolution: {integrity: sha512-7d69IMsIgnJKzopBMHdZR7d3JWwdHgzaIyIXif5jpu8gtQujIrIpgABXXMe+47KNSuS5k12s9dMRL3B8Y9s+Sw==} + ejs@3.1.10: resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} engines: {node: '>=0.10.0'} @@ -6655,6 +6974,13 @@ packages: end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + engine.io-client@6.6.2: + resolution: {integrity: sha512-TAr+NKeoVTjEVW8P3iHguO1LO6RlUz9O5Y8o7EY0fU+gY1NYqas7NN3slpFtbXEsLMHk0h90fJMfKjRkQ0qUIw==} + + engine.io-parser@5.2.3: + resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==} + engines: {node: '>=10.0.0'} + enhanced-resolve@5.17.1: resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} @@ -6745,6 +7071,11 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.20.2: + resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} + engines: {node: '>=12'} + hasBin: true + esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} @@ -6759,6 +7090,10 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} + escape-goat@2.1.1: + resolution: {integrity: sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==} + engines: {node: '>=8'} + escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} @@ -6905,8 +7240,8 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-react-compiler@19.0.0-beta-0dec889-20241115: - resolution: {integrity: sha512-jTjEHuE8/R6qD/CD2d+5YvWMy1q9/tX3kft4WDyg42/HktjHtHXrEToyZ6THEQf8t/YWMY1RGeCkykePbACtFA==} + eslint-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121: + resolution: {integrity: sha512-FntyD9CAMz/z85MAzi3iWft8CVV09OPVuSCA6gmcQjX0h+/6lDZplg9GTIZTJrM+t6Swu05Hoh+SaQ59rUXE8g==} engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} peerDependencies: eslint: '>=7' @@ -7125,6 +7460,10 @@ packages: resolution: {integrity: sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==} engines: {node: '>=0.10.0'} + fast-check@3.23.1: + resolution: {integrity: sha512-u/MudsoQEgBUZgR5N1v87vEgybeVYus9VnDVaIkxkkGP2jt54naghQ3PCQHJiogS8U/GavZCUPFfx3Xkp+NaHw==} + engines: {node: '>=8.0.0'} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -7151,6 +7490,12 @@ packages: resolution: {integrity: sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==} hasBin: true + faster-babel-types@0.1.0: + resolution: {integrity: sha512-0bEgAyXBdX330U6WbY80Q/h8k0NAPT3Z3sRlC6Fiv0kxekow9JQv2KBL55jIDFxNKcixjvByNnTZfH4axKSB9g==} + engines: {node: '>=10'} + peerDependencies: + '@babel/types': ^7 + fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} @@ -7165,6 +7510,12 @@ packages: picomatch: optional: true + fetch-retry@6.0.0: + resolution: {integrity: sha512-BUFj1aMubgib37I3v4q78fYo63Po7t4HUPTpQ6/QE6yK6cIQrP+W43FYToeTEyg5m2Y7eFUtijUuAv/PDlWuag==} + + fflate@0.4.8: + resolution: {integrity: sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==} + figures@2.0.0: resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} engines: {node: '>=4'} @@ -7715,6 +8066,10 @@ packages: resolution: {integrity: sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==} engines: {node: '>=0.10.0'} + has-yarn@2.1.0: + resolution: {integrity: sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==} + engines: {node: '>=8'} + hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -7729,11 +8084,17 @@ packages: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true - hermes-estree@0.20.1: - resolution: {integrity: sha512-SQpZK4BzR48kuOg0v4pb3EAGNclzIlqMj3Opu/mu7bbAoFw6oig6cEt/RAi0zTFW/iW6Iz9X9ggGuZTAZ/yZHg==} + hermes-estree@0.21.1: + resolution: {integrity: sha512-ayfESdfG0wZM32uGw0CMfcW6pW6RM8htLXZI56A4rr7hIOjmKw+wd3+71wUc1uQfn90ZyY1NMCbQeMnunrIidg==} + + hermes-estree@0.25.1: + resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==} - hermes-parser@0.20.1: - resolution: {integrity: sha512-BL5P83cwCogI8D7rrDCgsFY0tdYUtmFP9XaXtl2IQjC+2Xo+4okjfXintlTxcIwl4qeGddEl28Z11kbVIw0aNA==} + hermes-parser@0.21.1: + resolution: {integrity: sha512-ANsRSBqQHzca7AXbsuwKApSQhAdljPip63MgqLebSVzNUI+A3NDzfiH9Ny4df4fA7Ndso3kPR1V/x1YEc7BYxA==} + + hermes-parser@0.25.1: + resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==} history@5.3.0: resolution: {integrity: sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==} @@ -7748,6 +8109,10 @@ packages: resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} engines: {node: '>=0.10.0'} + hono@4.6.11: + resolution: {integrity: sha512-f0LwJQFKdUUrCUAVowxSvNCjyzI7ZLt8XWYU/EApyeq5FfOvHFarBaE5rjU9HTNFk4RI0FkdB2edb3p/7xZjzQ==} + engines: {node: '>=16.9.0'} + hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -7842,6 +8207,10 @@ packages: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} + import-lazy@2.1.0: + resolution: {integrity: sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==} + engines: {node: '>=4'} + import-lazy@4.0.0: resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} engines: {node: '>=8'} @@ -7962,6 +8331,10 @@ packages: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} + is-ci@2.0.0: + resolution: {integrity: sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==} + hasBin: true + is-ci@3.0.1: resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} hasBin: true @@ -8097,6 +8470,10 @@ packages: resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} engines: {node: '>= 0.4'} + is-npm@5.0.0: + resolution: {integrity: sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==} + engines: {node: '>=10'} + is-number-object@1.0.7: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} @@ -8240,6 +8617,9 @@ packages: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} + is-yarn-global@0.3.0: + resolution: {integrity: sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==} + isarray@0.0.1: resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} @@ -8268,6 +8648,9 @@ packages: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} + isomorphic-fetch@3.0.0: + resolution: {integrity: sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==} + istanbul-lib-coverage@3.2.2: resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} @@ -8850,6 +9233,9 @@ packages: resolution: {integrity: sha512-7PujJ3Te6GGg9lG1nfw5jYCPV6/BsoAT0nCQwb6w+ROuromXYxI6jc/CQSlD82Z/OUMSBX1SoaqhTE+vXiLQzQ==} engines: {node: '>=4.0.0'} + mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + mixin-deep@1.3.2: resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} engines: {node: '>=0.10.0'} @@ -9380,6 +9766,10 @@ packages: resolution: {integrity: sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==} engines: {node: '>=6'} + parse-ms@3.0.0: + resolution: {integrity: sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==} + engines: {node: '>=12'} + parse-passwd@1.0.0: resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} engines: {node: '>=0.10.0'} @@ -9521,6 +9911,9 @@ packages: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} + piscina@4.7.0: + resolution: {integrity: sha512-b8hvkpp9zS0zsfa939b/jXbe64Z2gZv0Ha7FYPNUiDIB1y2AtxcOZdfP8xN8HFjUaqQiT9gRlfjAsoL8vdJ1Iw==} + pkg-dir@3.0.0: resolution: {integrity: sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==} engines: {node: '>=6'} @@ -9644,6 +10037,10 @@ packages: resolution: {integrity: sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==} engines: {node: '>=10'} + pretty-ms@8.0.0: + resolution: {integrity: sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==} + engines: {node: '>=14.16'} + prismjs@1.27.0: resolution: {integrity: sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==} engines: {node: '>=6'} @@ -9734,6 +10131,13 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + pupa@2.1.1: + resolution: {integrity: sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==} + engines: {node: '>=8'} + + pure-rand@6.1.0: + resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + qs@6.13.0: resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} @@ -9795,6 +10199,11 @@ packages: peerDependencies: react: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + react-compiler-runtime@0.0.0-experimental-dc8bd44-20241121: + resolution: {integrity: sha512-iFvU8WYj2ZN6dGgwT6921/pC1fqzqRXSkZ1A04hfO4h7Z+tQpQA0m/iMy0osfzKBlKxusu1KJ+xmnw38YHYuUA==} + peerDependencies: + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + react-compiler-runtime@19.0.0-beta-0dec889-20241115: resolution: {integrity: sha512-dL5zzfEvM2dyDnaACP/HkY57/sDPR4R1Q9gPjEFk/3qO7coNc76W0dm3bRypTBNf9sGDuBI+HZSdusVUIbep4Q==} peerDependencies: @@ -10242,9 +10651,24 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rrdom@0.1.7: + resolution: {integrity: sha512-ZLd8f14z9pUy2Hk9y636cNv5Y2BMnNEY99wxzW9tD2BLDfe1xFxtLjB4q/xCBYo6HRe0wofzKzjm4JojmpBfFw==} + rrweb-cssom@0.6.0: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} + rrweb-player@1.0.0-alpha.4: + resolution: {integrity: sha512-Wlmn9GZ5Fdqa37vd3TzsYdLl/JWEvXNUrLCrYpnOwEgmY409HwVIvvA5aIo7k582LoKgdRCsB87N+f0oWAR0Kg==} + + rrweb-snapshot@2.0.0-alpha.17: + resolution: {integrity: sha512-GBg5pV8LHOTbeVmH2VHLEFR0mc2QpQMzAvcoxEGfPNWgWHc8UvKCyq7pqN1vA+fDZ+yXXbixeO0kB2pzVvFCBw==} + + rrweb-snapshot@2.0.0-alpha.4: + resolution: {integrity: sha512-KQ2OtPpXO5jLYqg1OnXS/Hf+EzqnZyP5A+XPqBCjYpj3XIje/Od4gdUwjbFo3cVuWq5Cw5Y1d3/xwgIS7/XpQQ==} + + rrweb@2.0.0-alpha.4: + resolution: {integrity: sha512-wEHUILbxDPcNwkM3m4qgPgXAiBJyqCbbOHyVoNEVBJzHszWEFYyTbrZqUdeb1EfmTRC2PsumCIkVcomJ/xcOzA==} + run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -10347,6 +10771,10 @@ packages: semver-compare@1.0.0: resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} + semver-diff@3.1.1: + resolution: {integrity: sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==} + engines: {node: '>=8'} + semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -10526,6 +10954,14 @@ packages: resolution: {integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==} engines: {node: '>=0.10.0'} + socket.io-client@4.8.1: + resolution: {integrity: sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==} + engines: {node: '>=10.0.0'} + + socket.io-parser@4.2.4: + resolution: {integrity: sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==} + engines: {node: '>=10.0.0'} + socks-proxy-agent@8.0.4: resolution: {integrity: sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==} engines: {node: '>= 14'} @@ -10828,6 +11264,9 @@ packages: subarg@1.0.0: resolution: {integrity: sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==} + sugar-high@0.7.5: + resolution: {integrity: sha512-lfGxo0il0Mx4WLdXEt0WsJ8V3QkQWssXnolj5xBurzlGJW07LuwmJWKtS0B2WJ5XWz1439RHngXAmzsnLD0rFA==} + supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -10969,6 +11408,10 @@ packages: to-buffer@1.1.1: resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==} + to-fast-properties@2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + to-object-path@0.3.0: resolution: {integrity: sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==} engines: {node: '>=0.10.0'} @@ -11265,6 +11708,10 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} + unplugin@1.16.0: + resolution: {integrity: sha512-5liCNPuJW8dqh3+DM6uNM2EI3MLLpCKp/KY+9pB5M2S2SR2qvvDHhKgBOaTWEbZTAws3CXfB0rKTIolWKL05VQ==} + engines: {node: '>=14.0.0'} + unset-value@1.0.0: resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} engines: {node: '>=0.10.0'} @@ -11279,6 +11726,10 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + update-notifier-cjs@5.1.6: + resolution: {integrity: sha512-wgxdSBWv3x/YpMzsWz5G4p4ec7JWD0HCl8W6bmNB6E5Gwo+1ym5oN4hiXpLf0mPySVEJEIsYlkshnplkg2OP9A==} + engines: {node: '>=14'} + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -11519,10 +11970,16 @@ packages: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + whatwg-encoding@3.1.1: resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} engines: {node: '>=18'} + whatwg-fetch@3.6.20: + resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==} + whatwg-mimetype@4.0.0: resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} engines: {node: '>=18'} @@ -11619,6 +12076,18 @@ packages: resolution: {integrity: sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA==} engines: {node: '>=8'} + ws@8.17.1: + resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@8.18.0: resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} @@ -11645,6 +12114,10 @@ packages: xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + xmlhttprequest-ssl@2.1.2: + resolution: {integrity: sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==} + engines: {node: '>=0.4.0'} + xregexp@2.0.0: resolution: {integrity: sha512-xl/50/Cf32VsGq/1R8jJE5ajH1yMCQkpmoS10QbFZWl2Oor4H0Me64Pu2yxvsRWK3m6soJbmGfzSR7BYmDcWAA==} @@ -11655,6 +12128,9 @@ packages: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} + xycolors@0.1.2: + resolution: {integrity: sha512-iUIDKoRUq/6Nfkiwv/PqxR6ENzgLkaaOeWwY54CtObpEwmvQHCvsgxd5xIGfEF/QU75H2quxIffOoU4tf2kKDg==} + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -11741,12 +12217,19 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 + '@antfu/ni@0.21.12': {} + '@asamuzakjp/dom-selector@2.0.2': dependencies: bidi-js: 1.0.3 css-tree: 2.3.1 is-potential-custom-element-name: 1.0.1 + '@axiomhq/js@1.0.0-rc.3': + dependencies: + fetch-retry: 6.0.0 + uuid: 8.3.2 + '@babel/code-frame@7.26.2': dependencies: '@babel/helper-validator-identifier': 7.25.9 @@ -12534,6 +13017,12 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/types@7.25.2': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + to-fast-properties: 2.0.0 + '@babel/types@7.26.0': dependencies: '@babel/helper-string-parser': 7.25.9 @@ -12541,23 +13030,34 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1)': + '@clack/core@0.3.5': + dependencies: + picocolors: 1.1.1 + sisteransi: 1.0.5 + + '@clack/prompts@0.7.0': + dependencies: + '@clack/core': 0.3.5 + picocolors: 1.1.1 + sisteransi: 1.0.5 + + '@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1)': dependencies: '@codemirror/language': 6.10.3 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 '@lezer/common': 1.2.1 '@codemirror/commands@6.7.1': dependencies: '@codemirror/language': 6.10.3 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 '@lezer/common': 1.2.1 - '@codemirror/lang-css@6.3.0(@codemirror/view@6.34.3)': + '@codemirror/lang-css@6.3.0(@codemirror/view@6.35.0)': dependencies: - '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1) '@codemirror/language': 6.10.3 '@codemirror/state': 6.4.1 '@lezer/common': 1.2.1 @@ -12567,12 +13067,12 @@ snapshots: '@codemirror/lang-html@6.4.9': dependencies: - '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1) - '@codemirror/lang-css': 6.3.0(@codemirror/view@6.34.3) + '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1) + '@codemirror/lang-css': 6.3.0(@codemirror/view@6.35.0) '@codemirror/lang-javascript': 6.2.2 '@codemirror/language': 6.10.3 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 '@lezer/common': 1.2.1 '@lezer/css': 1.1.9 '@lezer/html': 1.3.10 @@ -12584,11 +13084,11 @@ snapshots: '@codemirror/lang-javascript@6.2.2': dependencies: - '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1) '@codemirror/language': 6.10.3 - '@codemirror/lint': 6.8.2 + '@codemirror/lint': 6.8.3 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 '@lezer/common': 1.2.1 '@lezer/javascript': 1.4.17 @@ -12599,11 +13099,11 @@ snapshots: '@codemirror/lang-markdown@6.3.0': dependencies: - '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1) '@codemirror/lang-html': 6.4.9 '@codemirror/language': 6.10.3 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 '@lezer/common': 1.2.1 '@lezer/markdown': 1.3.1 @@ -12615,9 +13115,9 @@ snapshots: '@lezer/common': 1.2.1 '@lezer/php': 1.0.2 - '@codemirror/lang-sql@6.8.0(@codemirror/view@6.34.3)': + '@codemirror/lang-sql@6.8.0(@codemirror/view@6.35.0)': dependencies: - '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1) '@codemirror/language': 6.10.3 '@codemirror/state': 6.4.1 '@lezer/common': 1.2.1 @@ -12629,7 +13129,7 @@ snapshots: '@codemirror/language@6.10.3': dependencies: '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 '@lezer/common': 1.2.1 '@lezer/highlight': 1.2.1 '@lezer/lr': 1.4.2 @@ -12639,16 +13139,16 @@ snapshots: dependencies: '@codemirror/language': 6.10.3 - '@codemirror/lint@6.8.2': + '@codemirror/lint@6.8.3': dependencies: '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 crelt: 1.0.6 - '@codemirror/search@6.5.7': + '@codemirror/search@6.5.8': dependencies: '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 crelt: 1.0.6 '@codemirror/state@6.4.1': {} @@ -12657,10 +13157,10 @@ snapshots: dependencies: '@codemirror/language': 6.10.3 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 '@lezer/highlight': 1.2.1 - '@codemirror/view@6.34.3': + '@codemirror/view@6.35.0': dependencies: '@codemirror/state': 6.4.1 style-mod: 4.1.2 @@ -12805,6 +13305,9 @@ snapshots: '@esbuild/aix-ppc64@0.19.12': optional: true + '@esbuild/aix-ppc64@0.20.2': + optional: true + '@esbuild/aix-ppc64@0.21.5': optional: true @@ -12817,6 +13320,9 @@ snapshots: '@esbuild/android-arm64@0.19.12': optional: true + '@esbuild/android-arm64@0.20.2': + optional: true + '@esbuild/android-arm64@0.21.5': optional: true @@ -12829,6 +13335,9 @@ snapshots: '@esbuild/android-arm@0.19.12': optional: true + '@esbuild/android-arm@0.20.2': + optional: true + '@esbuild/android-arm@0.21.5': optional: true @@ -12841,6 +13350,9 @@ snapshots: '@esbuild/android-x64@0.19.12': optional: true + '@esbuild/android-x64@0.20.2': + optional: true + '@esbuild/android-x64@0.21.5': optional: true @@ -12853,6 +13365,9 @@ snapshots: '@esbuild/darwin-arm64@0.19.12': optional: true + '@esbuild/darwin-arm64@0.20.2': + optional: true + '@esbuild/darwin-arm64@0.21.5': optional: true @@ -12865,6 +13380,9 @@ snapshots: '@esbuild/darwin-x64@0.19.12': optional: true + '@esbuild/darwin-x64@0.20.2': + optional: true + '@esbuild/darwin-x64@0.21.5': optional: true @@ -12877,6 +13395,9 @@ snapshots: '@esbuild/freebsd-arm64@0.19.12': optional: true + '@esbuild/freebsd-arm64@0.20.2': + optional: true + '@esbuild/freebsd-arm64@0.21.5': optional: true @@ -12889,6 +13410,9 @@ snapshots: '@esbuild/freebsd-x64@0.19.12': optional: true + '@esbuild/freebsd-x64@0.20.2': + optional: true + '@esbuild/freebsd-x64@0.21.5': optional: true @@ -12901,6 +13425,9 @@ snapshots: '@esbuild/linux-arm64@0.19.12': optional: true + '@esbuild/linux-arm64@0.20.2': + optional: true + '@esbuild/linux-arm64@0.21.5': optional: true @@ -12913,6 +13440,9 @@ snapshots: '@esbuild/linux-arm@0.19.12': optional: true + '@esbuild/linux-arm@0.20.2': + optional: true + '@esbuild/linux-arm@0.21.5': optional: true @@ -12925,6 +13455,9 @@ snapshots: '@esbuild/linux-ia32@0.19.12': optional: true + '@esbuild/linux-ia32@0.20.2': + optional: true + '@esbuild/linux-ia32@0.21.5': optional: true @@ -12937,6 +13470,9 @@ snapshots: '@esbuild/linux-loong64@0.19.12': optional: true + '@esbuild/linux-loong64@0.20.2': + optional: true + '@esbuild/linux-loong64@0.21.5': optional: true @@ -12949,6 +13485,9 @@ snapshots: '@esbuild/linux-mips64el@0.19.12': optional: true + '@esbuild/linux-mips64el@0.20.2': + optional: true + '@esbuild/linux-mips64el@0.21.5': optional: true @@ -12961,6 +13500,9 @@ snapshots: '@esbuild/linux-ppc64@0.19.12': optional: true + '@esbuild/linux-ppc64@0.20.2': + optional: true + '@esbuild/linux-ppc64@0.21.5': optional: true @@ -12973,6 +13515,9 @@ snapshots: '@esbuild/linux-riscv64@0.19.12': optional: true + '@esbuild/linux-riscv64@0.20.2': + optional: true + '@esbuild/linux-riscv64@0.21.5': optional: true @@ -12985,6 +13530,9 @@ snapshots: '@esbuild/linux-s390x@0.19.12': optional: true + '@esbuild/linux-s390x@0.20.2': + optional: true + '@esbuild/linux-s390x@0.21.5': optional: true @@ -12997,6 +13545,9 @@ snapshots: '@esbuild/linux-x64@0.19.12': optional: true + '@esbuild/linux-x64@0.20.2': + optional: true + '@esbuild/linux-x64@0.21.5': optional: true @@ -13009,6 +13560,9 @@ snapshots: '@esbuild/netbsd-x64@0.19.12': optional: true + '@esbuild/netbsd-x64@0.20.2': + optional: true + '@esbuild/netbsd-x64@0.21.5': optional: true @@ -13024,6 +13578,9 @@ snapshots: '@esbuild/openbsd-x64@0.19.12': optional: true + '@esbuild/openbsd-x64@0.20.2': + optional: true + '@esbuild/openbsd-x64@0.21.5': optional: true @@ -13036,6 +13593,9 @@ snapshots: '@esbuild/sunos-x64@0.19.12': optional: true + '@esbuild/sunos-x64@0.20.2': + optional: true + '@esbuild/sunos-x64@0.21.5': optional: true @@ -13048,6 +13608,9 @@ snapshots: '@esbuild/win32-arm64@0.19.12': optional: true + '@esbuild/win32-arm64@0.20.2': + optional: true + '@esbuild/win32-arm64@0.21.5': optional: true @@ -13060,6 +13623,9 @@ snapshots: '@esbuild/win32-ia32@0.19.12': optional: true + '@esbuild/win32-ia32@0.20.2': + optional: true + '@esbuild/win32-ia32@0.21.5': optional: true @@ -13072,6 +13638,9 @@ snapshots: '@esbuild/win32-x64@0.19.12': optional: true + '@esbuild/win32-x64@0.20.2': + optional: true + '@esbuild/win32-x64@0.21.5': optional: true @@ -13203,6 +13772,10 @@ snapshots: - encoding - supports-color + '@hono/node-server@1.13.7(hono@4.6.11)': + dependencies: + hono: 4.6.11 + '@hookform/resolvers@3.9.0(react-hook-form@7.52.2(react@18.3.1))': dependencies: react-hook-form: 7.52.2(react@18.3.1) @@ -13545,6 +14118,55 @@ snapshots: '@microsoft/tsdoc@0.15.0': {} + '@million/install@1.0.12': + dependencies: + '@antfu/ni': 0.21.12 + '@axiomhq/js': 1.0.0-rc.3 + '@babel/parser': 7.26.2 + '@babel/types': 7.25.2 + '@clack/prompts': 0.7.0 + ast-types: 0.14.2 + cli-high: 0.4.3 + diff: 5.2.0 + effect: 3.10.16 + nanoid: 5.0.7 + recast: 0.23.9 + xycolors: 0.1.2 + + '@million/lint@1.0.12(encoding@0.1.13)(rollup@4.27.3)': + dependencies: + '@axiomhq/js': 1.0.0-rc.3 + '@babel/core': 7.26.0 + '@babel/types': 7.26.0 + '@hono/node-server': 1.13.7(hono@4.6.11) + '@million/install': 1.0.12 + '@rollup/pluginutils': 5.1.0(rollup@4.27.3) + '@rrweb/types': 2.0.0-alpha.16 + babel-plugin-syntax-hermes-parser: 0.21.1 + ci-info: 4.0.0 + esbuild: 0.20.2 + faster-babel-types: 0.1.0(@babel/types@7.26.0) + hono: 4.6.11 + isomorphic-fetch: 3.0.0(encoding@0.1.13) + nanoid: 5.0.7 + pako: 2.1.0 + pathe: 1.1.2 + piscina: 4.7.0 + pretty-ms: 8.0.0 + rrweb: 2.0.0-alpha.4 + rrweb-player: 1.0.0-alpha.4 + semver: 7.6.3 + socket.io-client: 4.8.1 + tmp: 0.2.3 + unplugin: 1.16.0 + update-notifier-cjs: 5.1.6(encoding@0.1.13) + transitivePeerDependencies: + - bufferutil + - encoding + - rollup + - supports-color + - utf-8-validate + '@mux/mux-player-react@2.9.1(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@mux/mux-player': 2.9.1 @@ -13578,6 +14200,74 @@ snapshots: event-target-shim: 6.0.2 xhr: 2.6.0 + '@napi-rs/nice-android-arm-eabi@1.0.1': + optional: true + + '@napi-rs/nice-android-arm64@1.0.1': + optional: true + + '@napi-rs/nice-darwin-arm64@1.0.1': + optional: true + + '@napi-rs/nice-darwin-x64@1.0.1': + optional: true + + '@napi-rs/nice-freebsd-x64@1.0.1': + optional: true + + '@napi-rs/nice-linux-arm-gnueabihf@1.0.1': + optional: true + + '@napi-rs/nice-linux-arm64-gnu@1.0.1': + optional: true + + '@napi-rs/nice-linux-arm64-musl@1.0.1': + optional: true + + '@napi-rs/nice-linux-ppc64-gnu@1.0.1': + optional: true + + '@napi-rs/nice-linux-riscv64-gnu@1.0.1': + optional: true + + '@napi-rs/nice-linux-s390x-gnu@1.0.1': + optional: true + + '@napi-rs/nice-linux-x64-gnu@1.0.1': + optional: true + + '@napi-rs/nice-linux-x64-musl@1.0.1': + optional: true + + '@napi-rs/nice-win32-arm64-msvc@1.0.1': + optional: true + + '@napi-rs/nice-win32-ia32-msvc@1.0.1': + optional: true + + '@napi-rs/nice-win32-x64-msvc@1.0.1': + optional: true + + '@napi-rs/nice@1.0.1': + optionalDependencies: + '@napi-rs/nice-android-arm-eabi': 1.0.1 + '@napi-rs/nice-android-arm64': 1.0.1 + '@napi-rs/nice-darwin-arm64': 1.0.1 + '@napi-rs/nice-darwin-x64': 1.0.1 + '@napi-rs/nice-freebsd-x64': 1.0.1 + '@napi-rs/nice-linux-arm-gnueabihf': 1.0.1 + '@napi-rs/nice-linux-arm64-gnu': 1.0.1 + '@napi-rs/nice-linux-arm64-musl': 1.0.1 + '@napi-rs/nice-linux-ppc64-gnu': 1.0.1 + '@napi-rs/nice-linux-riscv64-gnu': 1.0.1 + '@napi-rs/nice-linux-s390x-gnu': 1.0.1 + '@napi-rs/nice-linux-x64-gnu': 1.0.1 + '@napi-rs/nice-linux-x64-musl': 1.0.1 + '@napi-rs/nice-win32-arm64-msvc': 1.0.1 + '@napi-rs/nice-win32-ia32-msvc': 1.0.1 + '@napi-rs/nice-win32-x64-msvc': 1.0.1 + optional: true + '@napi-rs/wasm-runtime@0.2.4': dependencies: '@emnapi/core': 1.2.0 @@ -14236,6 +14926,10 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.27.3': optional: true + '@rrweb/types@2.0.0-alpha.16': + dependencies: + rrweb-snapshot: 2.0.0-alpha.17 + '@rtsao/scc@1.1.0': {} '@rushstack/eslint-patch@1.10.4': {} @@ -14343,7 +15037,7 @@ snapshots: '@sanity/code-input@4.1.4(@babel/runtime@7.26.0)(@codemirror/theme-one-dark@6.1.2)(@lezer/common@1.2.1)(codemirror@6.0.1(@lezer/common@1.2.1))(react-dom@18.3.1(react@18.3.1))(react-is@19.0.0-rc-b01722d5-20241114)(react@18.3.1)(sanity@packages+sanity)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1))': dependencies: - '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1) '@codemirror/commands': 6.7.1 '@codemirror/lang-html': 6.4.9 '@codemirror/lang-java': 6.0.1 @@ -14351,18 +15045,18 @@ snapshots: '@codemirror/lang-json': 6.0.1 '@codemirror/lang-markdown': 6.3.0 '@codemirror/lang-php': 6.0.1 - '@codemirror/lang-sql': 6.8.0(@codemirror/view@6.34.3) + '@codemirror/lang-sql': 6.8.0(@codemirror/view@6.35.0) '@codemirror/language': 6.10.3 '@codemirror/legacy-modes': 6.4.1 - '@codemirror/search': 6.5.7 + '@codemirror/search': 6.5.8 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 '@juggle/resize-observer': 3.4.0 '@lezer/highlight': 1.2.1 '@sanity/incompatible-plugin': 1.0.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@sanity/ui': 1.9.3(react-dom@18.3.1(react@18.3.1))(react-is@19.0.0-rc-b01722d5-20241114)(react@18.3.1)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) - '@uiw/codemirror-themes': 4.23.5(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3) - '@uiw/react-codemirror': 4.23.0(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1))(@codemirror/language@6.10.3)(@codemirror/search@6.5.7)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.34.3)(codemirror@6.0.1(@lezer/common@1.2.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@uiw/codemirror-themes': 4.23.5(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0) + '@uiw/react-codemirror': 4.23.0(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1))(@codemirror/language@6.10.3)(@codemirror/search@6.5.8)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.35.0)(codemirror@6.0.1(@lezer/common@1.2.1))(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) sanity: link:packages/sanity @@ -14614,7 +15308,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@sanity/pkg-utils@6.11.12(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(debug@4.3.7)(typescript@5.6.3)': + '@sanity/pkg-utils@6.11.12(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(debug@4.3.7)(typescript@5.6.3)': dependencies: '@babel/core': 7.26.0 '@babel/preset-typescript': 7.26.0(@babel/core@7.26.0) @@ -14659,14 +15353,14 @@ snapshots: zod: 3.23.8 zod-validation-error: 3.4.0(zod@3.23.8) optionalDependencies: - babel-plugin-react-compiler: 19.0.0-beta-0dec889-20241115 + babel-plugin-react-compiler: 0.0.0-experimental-dc8bd44-20241121 transitivePeerDependencies: - '@types/babel__core' - '@types/node' - debug - supports-color - '@sanity/pkg-utils@6.11.12(@types/babel__core@7.20.5)(@types/node@22.5.4)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(typescript@5.6.3)': + '@sanity/pkg-utils@6.11.12(@types/babel__core@7.20.5)(@types/node@22.5.4)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(typescript@5.6.3)': dependencies: '@babel/core': 7.26.0 '@babel/preset-typescript': 7.26.0(@babel/core@7.26.0) @@ -14711,7 +15405,7 @@ snapshots: zod: 3.23.8 zod-validation-error: 3.4.0(zod@3.23.8) optionalDependencies: - babel-plugin-react-compiler: 19.0.0-beta-0dec889-20241115 + babel-plugin-react-compiler: 0.0.0-experimental-dc8bd44-20241121 transitivePeerDependencies: - '@types/babel__core' - '@types/node' @@ -14784,7 +15478,7 @@ snapshots: transitivePeerDependencies: - debug - '@sanity/tsdoc@1.0.134(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(debug@4.3.7)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(sanity@packages+sanity)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.32.0)': + '@sanity/tsdoc@1.0.134(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(debug@4.3.7)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(sanity@packages+sanity)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.32.0)': dependencies: '@microsoft/api-extractor': 7.47.11(@types/node@18.19.44) '@microsoft/api-extractor-model': 7.29.8(@types/node@18.19.44) @@ -14795,7 +15489,7 @@ snapshots: '@sanity/client': 6.22.5(debug@4.3.7) '@sanity/color': 3.0.6 '@sanity/icons': 3.4.0(react@18.3.1) - '@sanity/pkg-utils': 6.11.12(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(debug@4.3.7)(typescript@5.6.3) + '@sanity/pkg-utils': 6.11.12(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(debug@4.3.7)(typescript@5.6.3) '@sanity/ui': 2.8.24(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) '@types/cpx': 1.5.5 '@vitejs/plugin-react': 4.3.3(vite@5.4.11(@types/node@18.19.44)(terser@5.32.0)) @@ -14849,7 +15543,7 @@ snapshots: '@sanity/client': 6.22.5(debug@4.3.7) '@sanity/color': 3.0.6 '@sanity/icons': 3.4.0(react@19.0.0-rc-f994737d14-20240522) - '@sanity/pkg-utils': 6.11.12(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(debug@4.3.7)(typescript@5.6.3) + '@sanity/pkg-utils': 6.11.12(@types/babel__core@7.20.5)(@types/node@18.19.44)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(debug@4.3.7)(typescript@5.6.3) '@sanity/ui': 2.8.24(react-dom@19.0.0-rc-f994737d14-20240522(react@19.0.0-rc-f994737d14-20240522))(react-is@19.0.0-rc-b01722d5-20241114)(react@19.0.0-rc-f994737d14-20240522)(styled-components@6.1.13(react-dom@19.0.0-rc-f994737d14-20240522(react@19.0.0-rc-f994737d14-20240522))(react@19.0.0-rc-f994737d14-20240522)) '@types/cpx': 1.5.5 '@vitejs/plugin-react': 4.3.3(vite@5.4.11(@types/node@18.19.44)(terser@5.32.0)) @@ -14892,7 +15586,7 @@ snapshots: - supports-color - terser - '@sanity/tsdoc@1.0.134(@types/babel__core@7.20.5)(@types/node@22.5.4)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(react-dom@18.3.1(react@18.3.1))(react-is@19.0.0-rc-b01722d5-20241114)(react@18.3.1)(sanity@packages+sanity)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.32.0)': + '@sanity/tsdoc@1.0.134(@types/babel__core@7.20.5)(@types/node@22.5.4)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(react-dom@18.3.1(react@18.3.1))(react-is@19.0.0-rc-b01722d5-20241114)(react@18.3.1)(sanity@packages+sanity)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.32.0)': dependencies: '@microsoft/api-extractor': 7.47.11(@types/node@22.5.4) '@microsoft/api-extractor-model': 7.29.8(@types/node@22.5.4) @@ -14903,7 +15597,7 @@ snapshots: '@sanity/client': 6.22.5(debug@4.3.7) '@sanity/color': 3.0.6 '@sanity/icons': 3.4.0(react@18.3.1) - '@sanity/pkg-utils': 6.11.12(@types/babel__core@7.20.5)(@types/node@22.5.4)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(typescript@5.6.3) + '@sanity/pkg-utils': 6.11.12(@types/babel__core@7.20.5)(@types/node@22.5.4)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(typescript@5.6.3) '@sanity/ui': 2.8.24(react-dom@18.3.1(react@18.3.1))(react-is@19.0.0-rc-b01722d5-20241114)(react@18.3.1)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) '@types/cpx': 1.5.5 '@vitejs/plugin-react': 4.3.3(vite@5.4.11(@types/node@22.5.4)(terser@5.32.0)) @@ -15103,7 +15797,7 @@ snapshots: '@types/uuid': 8.3.4 uuid: 8.3.2 - '@sanity/visual-editing@2.8.0(@sanity/client@6.22.5)(next@15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@sanity/visual-editing@2.8.0(@sanity/client@6.22.5)(next@15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@sanity/comlink': 1.1.3 '@sanity/mutate': 0.11.0-canary.3(xstate@5.19.0) @@ -15119,7 +15813,7 @@ snapshots: xstate: 5.19.0 optionalDependencies: '@sanity/client': 6.22.5(debug@4.3.7) - next: 15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) transitivePeerDependencies: - debug @@ -15213,6 +15907,8 @@ snapshots: '@sinclair/typebox@0.27.8': {} + '@socket.io/component-emitter@3.1.2': {} + '@swc-node/core@1.13.3(@swc/core@1.7.14(@swc/helpers@0.5.13))(@swc/types@0.1.12)': dependencies: '@swc/core': 1.7.14(@swc/helpers@0.5.13) @@ -15369,6 +16065,8 @@ snapshots: '@tsconfig/node16@1.0.4': {} + '@tsconfig/svelte@1.0.13': {} + '@tufjs/canonical-json@2.0.0': {} '@tufjs/models@2.0.1': @@ -15455,6 +16153,8 @@ snapshots: dependencies: '@types/node': 18.19.44 + '@types/css-font-loading-module@0.0.7': {} + '@types/debug@4.1.12': dependencies: '@types/ms': 0.7.34 @@ -15804,30 +16504,30 @@ snapshots: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 - '@uiw/codemirror-extensions-basic-setup@4.23.0(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1))(@codemirror/commands@6.7.1)(@codemirror/language@6.10.3)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.7)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)': + '@uiw/codemirror-extensions-basic-setup@4.23.0(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1))(@codemirror/commands@6.7.1)(@codemirror/language@6.10.3)(@codemirror/lint@6.8.3)(@codemirror/search@6.5.8)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)': dependencies: - '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1) '@codemirror/commands': 6.7.1 '@codemirror/language': 6.10.3 - '@codemirror/lint': 6.8.2 - '@codemirror/search': 6.5.7 + '@codemirror/lint': 6.8.3 + '@codemirror/search': 6.5.8 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 - '@uiw/codemirror-themes@4.23.5(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)': + '@uiw/codemirror-themes@4.23.5(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)': dependencies: '@codemirror/language': 6.10.3 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 - '@uiw/react-codemirror@4.23.0(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1))(@codemirror/language@6.10.3)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.7)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.34.3)(codemirror@6.0.1(@lezer/common@1.2.1))(react-dom@19.0.0-rc-f994737d14-20240522(react@18.3.1))(react@18.3.1)': + '@uiw/react-codemirror@4.23.0(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1))(@codemirror/language@6.10.3)(@codemirror/lint@6.8.3)(@codemirror/search@6.5.8)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.35.0)(codemirror@6.0.1(@lezer/common@1.2.1))(react-dom@19.0.0-rc-f994737d14-20240522(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.26.0 '@codemirror/commands': 6.7.1 '@codemirror/state': 6.4.1 '@codemirror/theme-one-dark': 6.1.2 - '@codemirror/view': 6.34.3 - '@uiw/codemirror-extensions-basic-setup': 4.23.0(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1))(@codemirror/commands@6.7.1)(@codemirror/language@6.10.3)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.7)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3) + '@codemirror/view': 6.35.0 + '@uiw/codemirror-extensions-basic-setup': 4.23.0(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1))(@codemirror/commands@6.7.1)(@codemirror/language@6.10.3)(@codemirror/lint@6.8.3)(@codemirror/search@6.5.8)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0) codemirror: 6.0.1(@lezer/common@1.2.1) react: 18.3.1 react-dom: 19.0.0-rc-f994737d14-20240522(react@18.3.1) @@ -15837,14 +16537,14 @@ snapshots: - '@codemirror/lint' - '@codemirror/search' - '@uiw/react-codemirror@4.23.0(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1))(@codemirror/language@6.10.3)(@codemirror/search@6.5.7)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.34.3)(codemirror@6.0.1(@lezer/common@1.2.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@uiw/react-codemirror@4.23.0(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1))(@codemirror/language@6.10.3)(@codemirror/search@6.5.8)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.35.0)(codemirror@6.0.1(@lezer/common@1.2.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.26.0 '@codemirror/commands': 6.7.1 '@codemirror/state': 6.4.1 '@codemirror/theme-one-dark': 6.1.2 - '@codemirror/view': 6.34.3 - '@uiw/codemirror-extensions-basic-setup': 4.23.0(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1))(@codemirror/commands@6.7.1)(@codemirror/language@6.10.3)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.7)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3) + '@codemirror/view': 6.35.0 + '@uiw/codemirror-extensions-basic-setup': 4.23.0(@codemirror/autocomplete@6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1))(@codemirror/commands@6.7.1)(@codemirror/language@6.10.3)(@codemirror/lint@6.8.3)(@codemirror/search@6.5.8)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0) codemirror: 6.0.1(@lezer/common@1.2.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -16026,6 +16726,8 @@ snapshots: '@vvo/tzdb@6.137.0': {} + '@xstate/fsm@1.6.5': {} + '@xstate/react@5.0.0(@types/react@18.3.12)(react@18.3.1)(xstate@5.19.0)': dependencies: react: 18.3.1 @@ -16298,6 +17000,10 @@ snapshots: ast-types-flow@0.0.8: {} + ast-types@0.14.2: + dependencies: + tslib: 2.8.1 + ast-types@0.16.1: dependencies: tslib: 2.8.1 @@ -16372,7 +17078,7 @@ snapshots: transitivePeerDependencies: - supports-color - babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115: + babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121: dependencies: '@babel/types': 7.26.0 @@ -16388,6 +17094,10 @@ snapshots: - '@babel/core' - supports-color + babel-plugin-syntax-hermes-parser@0.21.1: + dependencies: + hermes-parser: 0.21.1 + babel-runtime@6.26.0: dependencies: core-js: 2.6.12 @@ -16398,6 +17108,8 @@ snapshots: bare-events@2.4.2: optional: true + base64-arraybuffer@1.0.2: {} + base64-js@1.5.1: {} base@0.11.2: @@ -16477,6 +17189,17 @@ snapshots: type-fest: 0.8.1 widest-line: 3.1.0 + boxen@5.1.2: + dependencies: + ansi-align: 3.0.1 + camelcase: 6.3.0 + chalk: 4.1.2 + cli-boxes: 2.2.1 + string-width: 4.2.3 + type-fest: 0.20.2 + widest-line: 3.1.0 + wrap-ansi: 7.0.0 + brace-expansion@1.1.11: dependencies: balanced-match: 1.0.2 @@ -16700,6 +17423,8 @@ snapshots: chownr@3.0.0: {} + ci-info@2.0.0: {} + ci-info@3.9.0: {} ci-info@4.0.0: {} @@ -16737,6 +17462,13 @@ snapshots: dependencies: restore-cursor: 4.0.0 + cli-high@0.4.3: + dependencies: + '@clack/prompts': 0.7.0 + sugar-high: 0.7.5 + xycolors: 0.1.2 + yargs: 17.7.2 + cli-spinners@2.6.1: {} cli-spinners@2.9.2: {} @@ -16787,13 +17519,13 @@ snapshots: codemirror@6.0.1(@lezer/common@1.2.1): dependencies: - '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.3)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.18.3(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.35.0)(@lezer/common@1.2.1) '@codemirror/commands': 6.7.1 '@codemirror/language': 6.10.3 - '@codemirror/lint': 6.8.2 - '@codemirror/search': 6.5.7 + '@codemirror/lint': 6.8.3 + '@codemirror/search': 6.5.8 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.3 + '@codemirror/view': 6.35.0 transitivePeerDependencies: - '@lezer/common' @@ -17341,6 +18073,8 @@ snapshots: diff@4.0.2: {} + diff@5.2.0: {} + dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -17430,6 +18164,10 @@ snapshots: ee-first@1.1.1: {} + effect@3.10.16: + dependencies: + fast-check: 3.23.1 + ejs@3.1.10: dependencies: jake: 10.9.2 @@ -17455,6 +18193,20 @@ snapshots: dependencies: once: 1.4.0 + engine.io-client@6.6.2: + dependencies: + '@socket.io/component-emitter': 3.1.2 + debug: 4.3.7(supports-color@9.4.0) + engine.io-parser: 5.2.3 + ws: 8.17.1 + xmlhttprequest-ssl: 2.1.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + engine.io-parser@5.2.3: {} + enhanced-resolve@5.17.1: dependencies: graceful-fs: 4.2.11 @@ -17666,6 +18418,32 @@ snapshots: '@esbuild/win32-ia32': 0.19.12 '@esbuild/win32-x64': 0.19.12 + esbuild@0.20.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.20.2 + '@esbuild/android-arm': 0.20.2 + '@esbuild/android-arm64': 0.20.2 + '@esbuild/android-x64': 0.20.2 + '@esbuild/darwin-arm64': 0.20.2 + '@esbuild/darwin-x64': 0.20.2 + '@esbuild/freebsd-arm64': 0.20.2 + '@esbuild/freebsd-x64': 0.20.2 + '@esbuild/linux-arm': 0.20.2 + '@esbuild/linux-arm64': 0.20.2 + '@esbuild/linux-ia32': 0.20.2 + '@esbuild/linux-loong64': 0.20.2 + '@esbuild/linux-mips64el': 0.20.2 + '@esbuild/linux-ppc64': 0.20.2 + '@esbuild/linux-riscv64': 0.20.2 + '@esbuild/linux-s390x': 0.20.2 + '@esbuild/linux-x64': 0.20.2 + '@esbuild/netbsd-x64': 0.20.2 + '@esbuild/openbsd-x64': 0.20.2 + '@esbuild/sunos-x64': 0.20.2 + '@esbuild/win32-arm64': 0.20.2 + '@esbuild/win32-ia32': 0.20.2 + '@esbuild/win32-x64': 0.20.2 + esbuild@0.21.5: optionalDependencies: '@esbuild/aix-ppc64': 0.21.5 @@ -17721,6 +18499,8 @@ snapshots: escalade@3.2.0: {} + escape-goat@2.1.1: {} + escape-html@1.0.3: {} escape-string-regexp@1.0.5: {} @@ -17893,13 +18673,13 @@ snapshots: optionalDependencies: eslint-config-prettier: 9.1.0(eslint@8.57.0) - eslint-plugin-react-compiler@19.0.0-beta-0dec889-20241115(eslint@8.57.0): + eslint-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121(eslint@8.57.0): dependencies: '@babel/core': 7.26.0 '@babel/parser': 7.26.2 '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.26.0) eslint: 8.57.0 - hermes-parser: 0.20.1 + hermes-parser: 0.25.1 zod: 3.23.8 zod-validation-error: 3.4.0(zod@3.23.8) transitivePeerDependencies: @@ -18289,6 +19069,10 @@ snapshots: transitivePeerDependencies: - supports-color + fast-check@3.23.1: + dependencies: + pure-rand: 6.1.0 + fast-deep-equal@3.1.3: {} fast-diff@1.3.0: {} @@ -18315,6 +19099,10 @@ snapshots: dependencies: strnum: 1.0.5 + faster-babel-types@0.1.0(@babel/types@7.26.0): + dependencies: + '@babel/types': 7.26.0 + fastq@1.17.1: dependencies: reusify: 1.0.4 @@ -18327,6 +19115,10 @@ snapshots: optionalDependencies: picomatch: 4.0.2 + fetch-retry@6.0.0: {} + + fflate@0.4.8: {} + figures@2.0.0: dependencies: escape-string-regexp: 1.0.5 @@ -18977,6 +19769,8 @@ snapshots: is-number: 3.0.0 kind-of: 4.0.0 + has-yarn@2.1.0: {} + hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -18993,11 +19787,17 @@ snapshots: he@1.2.0: {} - hermes-estree@0.20.1: {} + hermes-estree@0.21.1: {} + + hermes-estree@0.25.1: {} - hermes-parser@0.20.1: + hermes-parser@0.21.1: dependencies: - hermes-estree: 0.20.1 + hermes-estree: 0.21.1 + + hermes-parser@0.25.1: + dependencies: + hermes-estree: 0.25.1 history@5.3.0: dependencies: @@ -19013,6 +19813,8 @@ snapshots: dependencies: parse-passwd: 1.0.0 + hono@4.6.11: {} + hosted-git-info@2.8.9: {} hosted-git-info@4.1.0: @@ -19111,6 +19913,8 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 + import-lazy@2.1.0: {} + import-lazy@4.0.0: {} import-local@3.1.0: @@ -19255,6 +20059,10 @@ snapshots: is-callable@1.2.7: {} + is-ci@2.0.0: + dependencies: + ci-info: 2.0.0 + is-ci@3.0.1: dependencies: ci-info: 3.9.0 @@ -19358,6 +20166,8 @@ snapshots: is-negative-zero@2.0.3: {} + is-npm@5.0.0: {} + is-number-object@1.0.7: dependencies: has-tostringtag: 1.0.2 @@ -19464,6 +20274,8 @@ snapshots: dependencies: is-docker: 2.2.1 + is-yarn-global@0.3.0: {} + isarray@0.0.1: {} isarray@1.0.0: {} @@ -19482,6 +20294,13 @@ snapshots: isobject@3.0.1: {} + isomorphic-fetch@3.0.0(encoding@0.1.13): + dependencies: + node-fetch: 2.7.0(encoding@0.1.13) + whatwg-fetch: 3.6.20 + transitivePeerDependencies: + - encoding + istanbul-lib-coverage@3.2.2: {} istanbul-lib-report@3.0.1: @@ -20228,6 +21047,8 @@ snapshots: stream-each: 1.2.3 through2: 3.0.2 + mitt@3.0.1: {} + mixin-deep@1.3.2: dependencies: for-in: 1.0.2 @@ -20332,7 +21153,7 @@ snapshots: - '@babel/core' - babel-plugin-macros - next@15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 15.0.3 '@swc/counter': 0.1.3 @@ -20353,14 +21174,14 @@ snapshots: '@next/swc-win32-arm64-msvc': 15.0.3 '@next/swc-win32-x64-msvc': 15.0.3 '@playwright/test': 1.47.0 - babel-plugin-react-compiler: 19.0.0-beta-0dec889-20241115 + babel-plugin-react-compiler: 0.0.0-experimental-dc8bd44-20241121 sharp: 0.33.5 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros optional: true - next@15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.0.0-beta-0dec889-20241115)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1): + next@15.0.3(@babel/core@7.26.0)(@playwright/test@1.47.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-dc8bd44-20241121)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1): dependencies: '@next/env': 15.0.3 '@swc/counter': 0.1.3 @@ -20381,7 +21202,7 @@ snapshots: '@next/swc-win32-arm64-msvc': 15.0.3 '@next/swc-win32-x64-msvc': 15.0.3 '@playwright/test': 1.47.0 - babel-plugin-react-compiler: 19.0.0-beta-0dec889-20241115 + babel-plugin-react-compiler: 0.0.0-experimental-dc8bd44-20241121 sharp: 0.33.5 transitivePeerDependencies: - '@babel/core' @@ -20926,6 +21747,8 @@ snapshots: parse-ms@2.1.0: {} + parse-ms@3.0.0: {} + parse-passwd@1.0.0: {} parse-path@7.0.0: @@ -21019,6 +21842,10 @@ snapshots: pirates@4.0.6: {} + piscina@4.7.0: + optionalDependencies: + '@napi-rs/nice': 1.0.1 + pkg-dir@3.0.0: dependencies: find-up: 3.0.0 @@ -21134,6 +21961,10 @@ snapshots: dependencies: parse-ms: 2.1.0 + pretty-ms@8.0.0: + dependencies: + parse-ms: 3.0.0 + prismjs@1.27.0: {} proc-log@4.2.0: {} @@ -21216,6 +22047,12 @@ snapshots: punycode@2.3.1: {} + pupa@2.1.1: + dependencies: + escape-goat: 2.1.1 + + pure-rand@6.1.0: {} + qs@6.13.0: dependencies: side-channel: 1.0.6 @@ -21277,6 +22114,10 @@ snapshots: '@babel/runtime': 7.26.0 react: 18.3.1 + react-compiler-runtime@0.0.0-experimental-dc8bd44-20241121(react@18.3.1): + dependencies: + react: 18.3.1 + react-compiler-runtime@19.0.0-beta-0dec889-20241115(react@18.3.1): dependencies: react: 18.3.1 @@ -21794,8 +22635,34 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.27.3 fsevents: 2.3.3 + rrdom@0.1.7: + dependencies: + rrweb-snapshot: 2.0.0-alpha.4 + rrweb-cssom@0.6.0: {} + rrweb-player@1.0.0-alpha.4: + dependencies: + '@tsconfig/svelte': 1.0.13 + rrweb: 2.0.0-alpha.4 + + rrweb-snapshot@2.0.0-alpha.17: + dependencies: + postcss: 8.4.49 + + rrweb-snapshot@2.0.0-alpha.4: {} + + rrweb@2.0.0-alpha.4: + dependencies: + '@rrweb/types': 2.0.0-alpha.16 + '@types/css-font-loading-module': 0.0.7 + '@xstate/fsm': 1.6.5 + base64-arraybuffer: 1.0.2 + fflate: 0.4.8 + mitt: 3.0.1 + rrdom: 0.1.7 + rrweb-snapshot: 2.0.0-alpha.4 + run-async@2.4.1: {} run-parallel@1.2.0: @@ -21948,6 +22815,10 @@ snapshots: semver-compare@1.0.0: {} + semver-diff@3.1.1: + dependencies: + semver: 6.3.1 + semver@5.7.2: {} semver@6.1.1: {} @@ -22197,6 +23068,24 @@ snapshots: transitivePeerDependencies: - supports-color + socket.io-client@4.8.1: + dependencies: + '@socket.io/component-emitter': 3.1.2 + debug: 4.3.7(supports-color@9.4.0) + engine.io-client: 6.6.2 + socket.io-parser: 4.2.4 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + socket.io-parser@4.2.4: + dependencies: + '@socket.io/component-emitter': 3.1.2 + debug: 4.3.7(supports-color@9.4.0) + transitivePeerDependencies: + - supports-color + socks-proxy-agent@8.0.4: dependencies: agent-base: 7.1.1 @@ -22580,6 +23469,8 @@ snapshots: dependencies: minimist: 1.2.8 + sugar-high@0.7.5: {} + supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -22736,6 +23627,8 @@ snapshots: to-buffer@1.1.1: {} + to-fast-properties@2.0.0: {} + to-object-path@0.3.0: dependencies: kind-of: 3.2.2 @@ -23015,6 +23908,11 @@ snapshots: unpipe@1.0.0: {} + unplugin@1.16.0: + dependencies: + acorn: 8.14.0 + webpack-virtual-modules: 0.6.2 + unset-value@1.0.0: dependencies: has-value: 0.3.1 @@ -23028,6 +23926,27 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + update-notifier-cjs@5.1.6(encoding@0.1.13): + dependencies: + boxen: 5.1.2 + chalk: 4.1.2 + configstore: 5.0.1 + has-yarn: 2.1.0 + import-lazy: 2.1.0 + is-ci: 2.0.0 + is-installed-globally: 0.4.0 + is-npm: 5.0.0 + is-yarn-global: 0.3.0 + isomorphic-fetch: 3.0.0(encoding@0.1.13) + pupa: 2.1.1 + registry-auth-token: 5.0.2 + registry-url: 5.1.0 + semver: 7.6.3 + semver-diff: 3.1.1 + xdg-basedir: 4.0.0 + transitivePeerDependencies: + - encoding + uri-js@4.4.1: dependencies: punycode: 2.3.1 @@ -23294,10 +24213,14 @@ snapshots: webidl-conversions@7.0.0: {} + webpack-virtual-modules@0.6.2: {} + whatwg-encoding@3.1.1: dependencies: iconv-lite: 0.6.3 + whatwg-fetch@3.6.20: {} + whatwg-mimetype@4.0.0: {} whatwg-url@14.0.0: @@ -23435,6 +24358,8 @@ snapshots: type-fest: 0.4.1 write-json-file: 3.2.0 + ws@8.17.1: {} + ws@8.18.0: {} xdg-basedir@4.0.0: {} @@ -23450,12 +24375,16 @@ snapshots: xmlchars@2.2.0: {} + xmlhttprequest-ssl@2.1.2: {} + xregexp@2.0.0: {} xstate@5.19.0: {} xtend@4.0.2: {} + xycolors@0.1.2: {} + y18n@5.0.8: {} yallist@3.1.1: {} From 0427a3a14dc5f3ecec5ab35bcd490e5deabea3f0 Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 20:08:28 +0100 Subject: [PATCH 02/17] optimize MOAR --- .../core/components/transitional/LegacyLayerProvider.tsx | 9 +++++++-- .../sanity/src/core/presence/overlay/StickyOverlay.tsx | 4 ++-- .../sanity/src/structure/panes/StructureToolPane.tsx | 8 +++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/sanity/src/core/components/transitional/LegacyLayerProvider.tsx b/packages/sanity/src/core/components/transitional/LegacyLayerProvider.tsx index 4da43a2ebc5..ded443949f1 100644 --- a/packages/sanity/src/core/components/transitional/LegacyLayerProvider.tsx +++ b/packages/sanity/src/core/components/transitional/LegacyLayerProvider.tsx @@ -1,5 +1,5 @@ import {LayerProvider} from '@sanity/ui' -import {type ReactNode} from 'react' +import {type ReactNode, useMemo} from 'react' import {type ZIndexContextValue} from '../zOffsets/types' import {useZIndex} from '../zOffsets/useZIndex' @@ -21,5 +21,10 @@ export function LegacyLayerProvider({ const zIndex = useZIndex() const zOffset = zIndex[zOffsetKey] - return {children} + const memoizedLayer = useMemo( + () => {children}, + [zOffset, children], + ) + + return memoizedLayer } diff --git a/packages/sanity/src/core/presence/overlay/StickyOverlay.tsx b/packages/sanity/src/core/presence/overlay/StickyOverlay.tsx index fadb413937c..ce0249b228a 100644 --- a/packages/sanity/src/core/presence/overlay/StickyOverlay.tsx +++ b/packages/sanity/src/core/presence/overlay/StickyOverlay.tsx @@ -151,7 +151,7 @@ function regionsWithComputedRects( } type Props = {margins: Margins; children: ReactNode} -export function StickyOverlay(props: Props) { +export const StickyOverlay = memo(function StickyOverlay(props: Props) { const {children, margins = DEFAULT_MARGINS} = props const reportedValues = usePresenceReportedValues() const [element, setElement] = useState(null) @@ -222,7 +222,7 @@ export function StickyOverlay(props: Props) { {children} ) -} +}) const EMPTY_ARRAY: never[] = [] diff --git a/packages/sanity/src/structure/panes/StructureToolPane.tsx b/packages/sanity/src/structure/panes/StructureToolPane.tsx index f5504aed6da..3aa31835df9 100644 --- a/packages/sanity/src/structure/panes/StructureToolPane.tsx +++ b/packages/sanity/src/structure/panes/StructureToolPane.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import {isEqual} from 'lodash' import {lazy, memo, Suspense} from 'react' @@ -77,10 +76,9 @@ export const StructureToolPane = memo( ) }, - ( - {params: prevParams = {}, payload: prevPayload = null, ...prev} = {} as any, - {params: nextParams = {}, payload: nextPayload = null, ...next} = {} as any, - ) => { + (_prev, _next) => { + const {params: prevParams = {}, payload: prevPayload = null, ...prev} = _prev || {} + const {params: nextParams = {}, payload: nextPayload = null, ...next} = _next || {} // deeply compare these objects (it's okay, they're small) if (!isEqual(prevParams, nextParams)) return false if (!isEqual(prevPayload, nextPayload)) return false From 8bf98e178664b3f7817b3268e4f77732dcc644b1 Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 20:34:35 +0100 Subject: [PATCH 03/17] Update CommandList.tsx --- .../components/commandList/CommandList.tsx | 88 +++++++++---------- 1 file changed, 42 insertions(+), 46 deletions(-) diff --git a/packages/sanity/src/core/components/commandList/CommandList.tsx b/packages/sanity/src/core/components/commandList/CommandList.tsx index c5591cc50f4..e3e0d4da5c2 100644 --- a/packages/sanity/src/core/components/commandList/CommandList.tsx +++ b/packages/sanity/src/core/components/commandList/CommandList.tsx @@ -15,7 +15,7 @@ import { useRef, useState, } from 'react' -import {css, styled} from 'styled-components' +import {styled} from 'styled-components' import {focusRingStyle} from '../../form/components/formField/styles' import {type CommandListElementType, type CommandListHandle, type CommandListProps} from './types' @@ -25,29 +25,6 @@ const LIST_ITEM_DATA_ATTR_ACTIVE = 'data-active' // Selector to find the first interactive element in the virtual list element const LIST_ITEM_INTERACTIVE_SELECTOR = 'a,button' -/** - * Conditionally render a focus ring overlay over the command list, with adjustable offset - */ -const FocusOverlayDiv = styled.div<{offset: number}>(({theme, offset}) => { - return css` - bottom: ${-offset}px; - border-radius: ${rem(theme.sanity.radius[1])}; - left: ${-offset}px; - pointer-events: none; - position: absolute; - right: ${-offset}px; - top: ${-offset}px; - z-index: 2; - - ${VirtualListBox}:focus-visible & { - box-shadow: ${focusRingStyle({ - base: theme.sanity.color.base, - focusRing: theme.sanity.focusRing, - })}; - } - ` -}) - /* * Conditionally appears over command list items to cancel existing :hover states for all child elements. * It should only appear if hover capabilities are available (not on touch devices) @@ -77,6 +54,28 @@ const VirtualListBox = styled(Box)` width: 100%; ` +/** + * Conditionally render a focus ring overlay over the command list, with adjustable offset + */ +const FocusOverlayDiv = styled.div<{offset: number}>` + bottom: ${({offset}) => -offset}px; + border-radius: ${({theme}) => rem(theme.sanity.radius[1])}; + left: ${({offset}) => -offset}px; + pointer-events: none; + position: absolute; + right: ${({offset}) => -offset}px; + top: ${({offset}) => -offset}px; + z-index: 2; + + ${VirtualListBox}:focus-visible & { + box-shadow: ${({theme}) => + focusRingStyle({ + base: theme.sanity.color.base, + focusRing: theme.sanity.focusRing, + })}; + } +` + type VirtualListChildBoxProps = { $height: number } @@ -126,7 +125,8 @@ export const CommandList = forwardRef(funct ref, ) { const isMountedRef = useRef(false) - const commandListId = useRef(useId()) + const _commandListId = useId() + const [commandListId] = useState(_commandListId) const activeIndexRef = useRef(initialIndex ?? 0) const [childContainerElement, setChildContainerElement] = useState(null) @@ -178,25 +178,23 @@ export const CommandList = forwardRef(funct */ const itemIndices = useMemo(() => { let i = -1 - return items.reduce< - { - activeIndex: number | null - selected: boolean - disabled: boolean - }[] - >((acc, _, index) => { + // eslint-disable-next-line @typescript-eslint/no-shadow + const itemIndices = [] + + for (let index = 0; index < items.length; index++) { const disabled = getItemDisabled?.(index) ?? false const selected = getItemSelected?.(index) ?? false if (!disabled) { i += 1 } - acc[index] = { + itemIndices[index] = { activeIndex: disabled ? null : i, disabled, selected, } - return acc - }, []) + } + + return itemIndices }, [getItemDisabled, getItemSelected, items]) const activeItemCount = useMemo( @@ -214,11 +212,11 @@ export const CommandList = forwardRef(funct ) const getChildDescendantId = useCallback( - (index: number) => `${commandListId.current}-item-${index}`, - [], + (index: number) => `${commandListId}-item-${index}`, + [commandListId], ) - const getCommandListChildrenId = useCallback(() => `${commandListId.current}-children`, []) + const getCommandListChildrenId = useCallback(() => `${commandListId}-children`, [commandListId]) /** * Iterate through all virtual list children and apply the active data-attribute on the selected index. @@ -260,13 +258,6 @@ export const CommandList = forwardRef(funct }) }, [activeItemDataAttr, childContainerElement?.children]) - /** - * Throttled version of `showChildrenActiveState`, used when DOM mutations are detected in virtual lists - */ - const refreshChildrenActiveStateThrottled = useMemo(() => { - return throttle(showChildrenActiveState, 200) - }, [showChildrenActiveState]) - /** * Assign active descendant on input element (if present) */ @@ -546,6 +537,11 @@ export const CommandList = forwardRef(funct * this changes on _every_ internal state change. */ useEffect(() => { + /** + * Throttled version of `showChildrenActiveState`, used when DOM mutations are detected in virtual lists + */ + const refreshChildrenActiveStateThrottled = throttle(showChildrenActiveState, 200) + const mutationObserver = new MutationObserver(refreshChildrenActiveStateThrottled) if (childContainerElement) { @@ -558,7 +554,7 @@ export const CommandList = forwardRef(funct return () => { mutationObserver.disconnect() } - }, [childContainerElement, refreshChildrenActiveStateThrottled]) + }, [childContainerElement, showChildrenActiveState]) /** * Apply input aria attributes From 77bdb7e92ffa7570998c584c82bfc6e1a2d6a0ba Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 21:05:28 +0100 Subject: [PATCH 04/17] faster --- .../errorBoundary/ErrorBoundary.tsx | 14 +++++----- .../src/ui-components/tooltip/Tooltip.tsx | 26 ++++++++++--------- .../TooltipDelayGroupProvider.tsx | 8 ++++-- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/packages/sanity/src/ui-components/errorBoundary/ErrorBoundary.tsx b/packages/sanity/src/ui-components/errorBoundary/ErrorBoundary.tsx index 09c0583f66f..0a84953f6f8 100644 --- a/packages/sanity/src/ui-components/errorBoundary/ErrorBoundary.tsx +++ b/packages/sanity/src/ui-components/errorBoundary/ErrorBoundary.tsx @@ -3,9 +3,8 @@ import { ErrorBoundary as UIErrorBoundary, type ErrorBoundaryProps as UIErrorBoundaryProps, } from '@sanity/ui' -import {useCallback, useContext} from 'react' - -import {SourceContext} from '../../_singletons' +import {memo, useCallback, useContext} from 'react' +import {SourceContext} from 'sanity/_singletons' export type ErrorBoundaryProps = UIErrorBoundaryProps @@ -13,7 +12,10 @@ export type ErrorBoundaryProps = UIErrorBoundaryProps * ErrorBoundary component that catches errors and uses onUncaughtError config property * It also calls the onCatch prop if it exists. */ -export function ErrorBoundary({onCatch, ...rest}: ErrorBoundaryProps): JSX.Element { +export const ErrorBoundary = memo(function ErrorBoundary({ + children, + onCatch, +}: ErrorBoundaryProps): JSX.Element { // Use context, because source could be undefined and we don't want to throw in that case const source = useContext(SourceContext) @@ -28,5 +30,5 @@ export function ErrorBoundary({onCatch, ...rest}: ErrorBoundaryProps): JSX.Eleme [source, onCatch], ) - return -} + return {children} +}) diff --git a/packages/sanity/src/ui-components/tooltip/Tooltip.tsx b/packages/sanity/src/ui-components/tooltip/Tooltip.tsx index 2f1069aa5d7..7515eea29af 100644 --- a/packages/sanity/src/ui-components/tooltip/Tooltip.tsx +++ b/packages/sanity/src/ui-components/tooltip/Tooltip.tsx @@ -8,7 +8,7 @@ import { // eslint-disable-next-line no-restricted-imports type TooltipProps as UITooltipProps, } from '@sanity/ui' -import {type ForwardedRef, forwardRef} from 'react' +import {type ForwardedRef, forwardRef, memo} from 'react' import {Hotkeys} from '../../core/components/Hotkeys' import {TOOLTIP_DELAY_PROPS} from './constants' @@ -29,17 +29,7 @@ const TOOLTIP_SHARED_PROPS: UITooltipProps = { portal: true, } -/** - * Customized Sanity UI with limited layout options and support for showing hotkeys. - * - * In just about all cases, its strongly recommended that you pass a string to the `content` prop. - * This helps simplify i18n and encourages short and concise. - * - * Passing ReactNode values to `content` is supported, but discouraged. - * - * @internal - */ -export const Tooltip = forwardRef(function Tooltip( +const TooltipComponent = forwardRef(function Tooltip( props: TooltipProps, ref: ForwardedRef, ) { @@ -72,3 +62,15 @@ export const Tooltip = forwardRef(function Tooltip( return }) +TooltipComponent.displayName = 'ForwardRef(Tooltip)' +/** + * Customized Sanity UI with limited layout options and support for showing hotkeys. + * + * In just about all cases, its strongly recommended that you pass a string to the `content` prop. + * This helps simplify i18n and encourages short and concise. + * + * Passing ReactNode values to `content` is supported, but discouraged. + * + * @internal + */ +export const Tooltip = memo(TooltipComponent) diff --git a/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx b/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx index ee73812dc3c..6ebfb9d464c 100644 --- a/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx +++ b/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx @@ -3,6 +3,7 @@ import { TooltipDelayGroupProvider as UITooltipDelayGroupProvider, type TooltipDelayGroupProviderProps as UITooltipDelayGroupProviderProps, } from '@sanity/ui' +import {memo} from 'react' import {TOOLTIP_DELAY_PROPS} from '../tooltip/constants' @@ -14,10 +15,13 @@ export type TooltipDelayGroupProviderProps = Omit { +export const TooltipDelayGroupProvider = memo(function TooltipDelayGroupProvider({ + children, +}: TooltipDelayGroupProviderProps) { return ( {children} ) -} +}) +TooltipDelayGroupProvider.displayName = 'Memo(TooltipDelayGroupProvider)' From 3ff5dbb8c85b0f3218e103189851b1b3d5fb5478 Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 21:16:31 +0100 Subject: [PATCH 05/17] fixes --- .../comments/plugin/field/CommentsField.tsx | 2 + .../components/commandList/CommandList.tsx | 1079 +++++++++-------- 2 files changed, 544 insertions(+), 537 deletions(-) diff --git a/packages/sanity/src/core/comments/plugin/field/CommentsField.tsx b/packages/sanity/src/core/comments/plugin/field/CommentsField.tsx index 1dd1fb8145d..39de9e1a888 100644 --- a/packages/sanity/src/core/comments/plugin/field/CommentsField.tsx +++ b/packages/sanity/src/core/comments/plugin/field/CommentsField.tsx @@ -53,6 +53,7 @@ export function CommentsField(props: FieldProps) { return } +CommentsField.displayName = 'CommentsField' const HighlightDiv = styled(motion.div)(({theme}) => { const {radius, space, color} = theme.sanity @@ -337,3 +338,4 @@ function CommentFieldInner( ) } +CommentFieldInner.displayName = 'CommentFieldInner' diff --git a/packages/sanity/src/core/components/commandList/CommandList.tsx b/packages/sanity/src/core/components/commandList/CommandList.tsx index e3e0d4da5c2..b3de0caefb8 100644 --- a/packages/sanity/src/core/components/commandList/CommandList.tsx +++ b/packages/sanity/src/core/components/commandList/CommandList.tsx @@ -6,6 +6,7 @@ import { forwardRef, Fragment, isValidElement, + memo, type ReactElement, useCallback, useEffect, @@ -97,565 +98,569 @@ const VirtualListChildBox = styled(Box) // * * @internal */ -export const CommandList = forwardRef(function CommandList( - { - activeItemDataAttr = LIST_ITEM_DATA_ATTR_ACTIVE, - ariaLabel, - ariaMultiselectable = false, - autoFocus, - canReceiveFocus, - fixedHeight, - focusRingOffset = 0, - getItemDisabled, - getItemKey, - getItemSelected, - initialIndex, - initialScrollAlign = 'start', - inputElement, - itemHeight, - items, - onEndReached, - onEndReachedIndexOffset = 0, - onlyShowSelectionWhenActive, - overscan, - renderItem, - wrapAround = true, - ...responsivePaddingProps - }, - ref, -) { - const isMountedRef = useRef(false) - const _commandListId = useId() - const [commandListId] = useState(_commandListId) - const activeIndexRef = useRef(initialIndex ?? 0) - - const [childContainerElement, setChildContainerElement] = useState(null) - const [hovered, setHovered] = useState(false) - const [pointerOverlayElement, setPointerOverlayElement] = useState(null) - const [virtualListElement, setVirtualListElement] = useState(null) - - const handleChange = useCallback( - (v: Virtualizer) => { - if (!onEndReached) return - - const [lastItem] = [...v.getVirtualItems()].reverse() - - if (!lastItem) return - - const reachedEnd = lastItem.index >= items.length - onEndReachedIndexOffset - 1 - - // Make sure we only trigger `onEndReached` after initial mount - if (reachedEnd && isMountedRef.current) { - onEndReached() - } +export const CommandList = memo( + forwardRef(function CommandList( + { + activeItemDataAttr = LIST_ITEM_DATA_ATTR_ACTIVE, + ariaLabel, + ariaMultiselectable = false, + autoFocus, + canReceiveFocus, + fixedHeight, + focusRingOffset = 0, + getItemDisabled, + getItemKey, + getItemSelected, + initialIndex, + initialScrollAlign = 'start', + inputElement, + itemHeight, + items, + onEndReached, + onEndReachedIndexOffset = 0, + onlyShowSelectionWhenActive, + overscan, + renderItem, + wrapAround = true, + ...responsivePaddingProps }, - [onEndReached, items.length, onEndReachedIndexOffset], - ) - - // This will trigger a re-render whenever its internal state changes - const virtualizer = useVirtualizer({ - count: items.length, - getItemKey, - getScrollElement: () => virtualListElement, - estimateSize: () => itemHeight, - onChange: handleChange, - overscan, - }) - - /** - * Return an array of values with `activeIndex`, `disabled` and `selected` defined, applying custom - * mapping functions (`getItemDisabled`, `getItemSelected`) if provided. E.g.: - * - * ``` - * [ - * { activeIndex: 0 disabled: false, selected: false }, - * { activeIndex: null, disabled: true, selected: false }, - * { activeIndex: 1, disabled: false, selected: true } - * ] - * ``` - * - * Disabled virtual list items are ignored when creating aria attributes. - */ - const itemIndices = useMemo(() => { - let i = -1 - // eslint-disable-next-line @typescript-eslint/no-shadow - const itemIndices = [] - - for (let index = 0; index < items.length; index++) { - const disabled = getItemDisabled?.(index) ?? false - const selected = getItemSelected?.(index) ?? false - if (!disabled) { - i += 1 - } - itemIndices[index] = { - activeIndex: disabled ? null : i, - disabled, - selected, - } - } + ref, + ) { + const isMountedRef = useRef(false) + const _commandListId = useId() + const [commandListId] = useState(_commandListId) + const activeIndexRef = useRef(initialIndex ?? 0) - return itemIndices - }, [getItemDisabled, getItemSelected, items]) - - const activeItemCount = useMemo( - () => itemIndices.filter((v) => !v.disabled).length, - [itemIndices], - ) - - /** - * Toggle pointer overlay element which will kill existing hover states - */ - const enableChildContainerPointerEvents = useCallback( - (enabled: boolean) => - pointerOverlayElement?.setAttribute('data-enabled', (!enabled).toString()), - [pointerOverlayElement], - ) - - const getChildDescendantId = useCallback( - (index: number) => `${commandListId}-item-${index}`, - [commandListId], - ) - - const getCommandListChildrenId = useCallback(() => `${commandListId}-children`, [commandListId]) - - /** - * Iterate through all virtual list children and apply the active data-attribute on the selected index. - * Don't apply styles when `hideSelectionOnMouseLeave` is true and the command list is neither focused or hovered. - */ - const showChildrenActiveState = useCallback(() => { - const hasFocus = [inputElement, virtualListElement].some((el) => document.activeElement === el) - if (onlyShowSelectionWhenActive && !hasFocus && !hovered) { - return - } + const [childContainerElement, setChildContainerElement] = useState(null) + const [hovered, setHovered] = useState(false) + const [pointerOverlayElement, setPointerOverlayElement] = useState(null) + const [virtualListElement, setVirtualListElement] = useState(null) - const childElements = Array.from(childContainerElement?.children || []) as HTMLElement[] - childElements?.forEach((child) => { - const virtualIndex = Number(child.dataset?.index) - const targetIndex = itemIndices[virtualIndex]?.activeIndex - child - .querySelector(LIST_ITEM_INTERACTIVE_SELECTOR) - ?.toggleAttribute(activeItemDataAttr, targetIndex === activeIndexRef.current) - }) - }, [ - activeItemDataAttr, - childContainerElement?.children, - hovered, - inputElement, - itemIndices, - onlyShowSelectionWhenActive, - virtualListElement, - ]) - - /** - * Iterate through all virtual list children and clear the active data-attribute. - */ - const hideChildrenActiveState = useCallback(() => { - const childElements = Array.from(childContainerElement?.children || []) - childElements?.forEach((child) => { - child - .querySelector(LIST_ITEM_INTERACTIVE_SELECTOR) - ?.toggleAttribute(activeItemDataAttr, false) + const handleChange = useCallback( + (v: Virtualizer) => { + if (!onEndReached) return + + const [lastItem] = [...v.getVirtualItems()].reverse() + + if (!lastItem) return + + const reachedEnd = lastItem.index >= items.length - onEndReachedIndexOffset - 1 + + // Make sure we only trigger `onEndReached` after initial mount + if (reachedEnd && isMountedRef.current) { + onEndReached() + } + }, + [onEndReached, items.length, onEndReachedIndexOffset], + ) + + // This will trigger a re-render whenever its internal state changes + const virtualizer = useVirtualizer({ + count: items.length, + getItemKey, + getScrollElement: () => virtualListElement, + estimateSize: () => itemHeight, + onChange: handleChange, + overscan, }) - }, [activeItemDataAttr, childContainerElement?.children]) - - /** - * Assign active descendant on input element (if present) - */ - const handleUpdateActiveDescendant = useCallback(() => { - const activeIndex = activeIndexRef?.current - if (items.length > 0) { - inputElement?.setAttribute('aria-activedescendant', getChildDescendantId(activeIndex)) - virtualListElement?.setAttribute('aria-activedescendant', getChildDescendantId(activeIndex)) - } else { - inputElement?.removeAttribute('aria-activedescendant') - virtualListElement?.removeAttribute('aria-activedescendant') - } - }, [getChildDescendantId, inputElement, items.length, virtualListElement]) - - /** - * Obtain index of the top most visible element - */ - const handleGetTopIndex = useCallback(() => { - const childContainerParentElement = childContainerElement?.parentElement - if (childContainerElement && childContainerParentElement) { - const offset = - childContainerParentElement.getBoundingClientRect().top - - childContainerElement.getBoundingClientRect().top - return virtualizer.getVirtualItemForOffset(offset)?.index ?? -1 - } - return -1 - }, [childContainerElement, virtualizer]) - - /** - * Mark an index as active, re-assign aria attrs on all children and optionally scroll into view - */ - const setActiveIndex = useCallback( - ({ - index, - scrollAlign, - scrollIntoView = true, - }: { - index: number - scrollAlign?: ScrollToOptions['align'] - scrollIntoView?: boolean - }) => { - activeIndexRef.current = index - handleUpdateActiveDescendant() - showChildrenActiveState() - if (scrollIntoView) { - const virtualListIndex = itemIndices.findIndex((i) => i.activeIndex === index) - if (virtualListIndex > -1) { - virtualizer.scrollToIndex(virtualListIndex, scrollAlign ? {align: scrollAlign} : {}) + /** + * Return an array of values with `activeIndex`, `disabled` and `selected` defined, applying custom + * mapping functions (`getItemDisabled`, `getItemSelected`) if provided. E.g.: + * + * ``` + * [ + * { activeIndex: 0 disabled: false, selected: false }, + * { activeIndex: null, disabled: true, selected: false }, + * { activeIndex: 1, disabled: false, selected: true } + * ] + * ``` + * + * Disabled virtual list items are ignored when creating aria attributes. + */ + const itemIndices = useMemo(() => { + let i = -1 + // eslint-disable-next-line @typescript-eslint/no-shadow + const itemIndices = [] + + for (let index = 0; index < items.length; index++) { + const disabled = getItemDisabled?.(index) ?? false + const selected = getItemSelected?.(index) ?? false + if (!disabled) { + i += 1 + } + itemIndices[index] = { + activeIndex: disabled ? null : i, + disabled, + selected, } } - }, - [handleUpdateActiveDescendant, itemIndices, showChildrenActiveState, virtualizer], - ) - - /** - * Select adjacent virtual item index and scroll into view with `react-virtual` - */ - const selectAdjacentItemIndex = useCallback( - (direction: 'previous' | 'next') => { - let nextIndex = -1 - const lastIndex = activeItemCount - 1 - - if (direction === 'next') { - const wrapAroundIndex = wrapAround ? 0 : lastIndex - nextIndex = - activeIndexRef.current < activeItemCount - 1 - ? activeIndexRef.current + 1 - : wrapAroundIndex - } - if (direction === 'previous') { - const wrapAroundIndex = wrapAround ? lastIndex : 0 - nextIndex = activeIndexRef.current > 0 ? activeIndexRef.current - 1 : wrapAroundIndex - } - setActiveIndex({index: nextIndex, scrollIntoView: true}) - enableChildContainerPointerEvents(false) - }, - [activeItemCount, enableChildContainerPointerEvents, setActiveIndex, wrapAround], - ) - - const focusElement = useCallback( - (type: CommandListElementType) => { - switch (type) { - case 'input': - inputElement?.focus() - break - case 'list': - virtualListElement?.focus() - break - default: - break - } - }, - [inputElement, virtualListElement], - ) - - const focusInputElement = useCallback(() => { - inputElement?.focus() - }, [inputElement]) - - const focusListElement = useCallback(() => { - virtualListElement?.focus() - }, [virtualListElement]) - - /** - * Mark hovered child item as active - */ - const handleChildMouseEnter = useCallback( - (index: number) => () => { - setActiveIndex({index, scrollIntoView: false}) - }, - [setActiveIndex], - ) - - const handleFocus = useCallback(() => { - showChildrenActiveState() - }, [showChildrenActiveState]) - - /** - * Handle keyboard events: - * - Up/down arrow: scroll to adjacent items - * - Enter: trigger click events on the current active element - */ - const handleKeyDown = useCallback( - (type: CommandListElementType) => (event: KeyboardEvent) => { - const childElements = Array.from(childContainerElement?.children || []) as HTMLElement[] - if (!childElements.length) { + + return itemIndices + }, [getItemDisabled, getItemSelected, items]) + + const activeItemCount = useMemo( + () => itemIndices.filter((v) => !v.disabled).length, + [itemIndices], + ) + + /** + * Toggle pointer overlay element which will kill existing hover states + */ + const enableChildContainerPointerEvents = useCallback( + (enabled: boolean) => + pointerOverlayElement?.setAttribute('data-enabled', (!enabled).toString()), + [pointerOverlayElement], + ) + + const getChildDescendantId = useCallback( + (index: number) => `${commandListId}-item-${index}`, + [commandListId], + ) + + const getCommandListChildrenId = useCallback(() => `${commandListId}-children`, [commandListId]) + + /** + * Iterate through all virtual list children and apply the active data-attribute on the selected index. + * Don't apply styles when `hideSelectionOnMouseLeave` is true and the command list is neither focused or hovered. + */ + const showChildrenActiveState = useCallback(() => { + const hasFocus = [inputElement, virtualListElement].some( + (el) => document.activeElement === el, + ) + if (onlyShowSelectionWhenActive && !hasFocus && !hovered) { return } - if (event.key === 'ArrowDown') { - event.preventDefault() - focusElement(type) - selectAdjacentItemIndex('next') - } - if (event.key === 'ArrowUp') { - event.preventDefault() - focusElement(type) - selectAdjacentItemIndex('previous') + const childElements = Array.from(childContainerElement?.children || []) as HTMLElement[] + childElements?.forEach((child) => { + const virtualIndex = Number(child.dataset?.index) + const targetIndex = itemIndices[virtualIndex]?.activeIndex + child + .querySelector(LIST_ITEM_INTERACTIVE_SELECTOR) + ?.toggleAttribute(activeItemDataAttr, targetIndex === activeIndexRef.current) + }) + }, [ + activeItemDataAttr, + childContainerElement?.children, + hovered, + inputElement, + itemIndices, + onlyShowSelectionWhenActive, + virtualListElement, + ]) + + /** + * Iterate through all virtual list children and clear the active data-attribute. + */ + const hideChildrenActiveState = useCallback(() => { + const childElements = Array.from(childContainerElement?.children || []) + childElements?.forEach((child) => { + child + .querySelector(LIST_ITEM_INTERACTIVE_SELECTOR) + ?.toggleAttribute(activeItemDataAttr, false) + }) + }, [activeItemDataAttr, childContainerElement?.children]) + + /** + * Assign active descendant on input element (if present) + */ + const handleUpdateActiveDescendant = useCallback(() => { + const activeIndex = activeIndexRef?.current + if (items.length > 0) { + inputElement?.setAttribute('aria-activedescendant', getChildDescendantId(activeIndex)) + virtualListElement?.setAttribute('aria-activedescendant', getChildDescendantId(activeIndex)) + } else { + inputElement?.removeAttribute('aria-activedescendant') + virtualListElement?.removeAttribute('aria-activedescendant') } + }, [getChildDescendantId, inputElement, items.length, virtualListElement]) - if (event.key === 'Enter') { - event.preventDefault() - focusElement(type) - const currentElement = childElements.find( - (el) => - Number(el.dataset.index) === - itemIndices.findIndex((i) => i.activeIndex === activeIndexRef.current), - ) - - if (currentElement) { - const clickableElement = currentElement?.querySelector( - LIST_ITEM_INTERACTIVE_SELECTOR, - ) - clickableElement?.click() - } + /** + * Obtain index of the top most visible element + */ + const handleGetTopIndex = useCallback(() => { + const childContainerParentElement = childContainerElement?.parentElement + if (childContainerElement && childContainerParentElement) { + const offset = + childContainerParentElement.getBoundingClientRect().top - + childContainerElement.getBoundingClientRect().top + return virtualizer.getVirtualItemForOffset(offset)?.index ?? -1 } - }, - [childContainerElement?.children, focusElement, itemIndices, selectAdjacentItemIndex], - ) - const handleKeyDownInput = useCallback( - (event: KeyboardEvent) => handleKeyDown('input')(event), - [handleKeyDown], - ) - const handleKeyDownList = useCallback( - (event: KeyboardEvent) => handleKeyDown('list')(event), - [handleKeyDown], - ) - - const handleVirtualListMouseEnter = useCallback(() => { - if (onlyShowSelectionWhenActive) { - showChildrenActiveState() - setHovered(true) - } - }, [onlyShowSelectionWhenActive, showChildrenActiveState]) - const handleVirtualListMouseLeave = useCallback(() => { - if (onlyShowSelectionWhenActive) { - hideChildrenActiveState() - setHovered(false) - } - }, [hideChildrenActiveState, onlyShowSelectionWhenActive]) + return -1 + }, [childContainerElement, virtualizer]) - useImperativeHandle(ref, () => { - return { - focusInputElement() { - focusInputElement() + /** + * Mark an index as active, re-assign aria attrs on all children and optionally scroll into view + */ + const setActiveIndex = useCallback( + ({ + index, + scrollAlign, + scrollIntoView = true, + }: { + index: number + scrollAlign?: ScrollToOptions['align'] + scrollIntoView?: boolean + }) => { + activeIndexRef.current = index + handleUpdateActiveDescendant() + showChildrenActiveState() + + if (scrollIntoView) { + const virtualListIndex = itemIndices.findIndex((i) => i.activeIndex === index) + if (virtualListIndex > -1) { + virtualizer.scrollToIndex(virtualListIndex, scrollAlign ? {align: scrollAlign} : {}) + } + } }, - focusListElement() { - focusListElement() + [handleUpdateActiveDescendant, itemIndices, showChildrenActiveState, virtualizer], + ) + + /** + * Select adjacent virtual item index and scroll into view with `react-virtual` + */ + const selectAdjacentItemIndex = useCallback( + (direction: 'previous' | 'next') => { + let nextIndex = -1 + const lastIndex = activeItemCount - 1 + + if (direction === 'next') { + const wrapAroundIndex = wrapAround ? 0 : lastIndex + nextIndex = + activeIndexRef.current < activeItemCount - 1 + ? activeIndexRef.current + 1 + : wrapAroundIndex + } + if (direction === 'previous') { + const wrapAroundIndex = wrapAround ? lastIndex : 0 + nextIndex = activeIndexRef.current > 0 ? activeIndexRef.current - 1 : wrapAroundIndex + } + setActiveIndex({index: nextIndex, scrollIntoView: true}) + enableChildContainerPointerEvents(false) }, - getTopIndex() { - return handleGetTopIndex() + [activeItemCount, enableChildContainerPointerEvents, setActiveIndex, wrapAround], + ) + + const focusElement = useCallback( + (type: CommandListElementType) => { + switch (type) { + case 'input': + inputElement?.focus() + break + case 'list': + virtualListElement?.focus() + break + default: + break + } }, - scrollToIndex(index: number) { - setActiveIndex({index}) - enableChildContainerPointerEvents(true) + [inputElement, virtualListElement], + ) + + const focusInputElement = useCallback(() => { + inputElement?.focus() + }, [inputElement]) + + const focusListElement = useCallback(() => { + virtualListElement?.focus() + }, [virtualListElement]) + + /** + * Mark hovered child item as active + */ + const handleChildMouseEnter = useCallback( + (index: number) => () => { + setActiveIndex({index, scrollIntoView: false}) }, - } - }, [ - enableChildContainerPointerEvents, - focusInputElement, - focusListElement, - handleGetTopIndex, - setActiveIndex, - ]) - - /** - * Optionally set active index (and align) on mount only - */ - useEffect(() => { - if (typeof initialIndex !== 'undefined' && !isMountedRef.current) { - setActiveIndex({ - index: initialIndex, - scrollAlign: initialScrollAlign, - scrollIntoView: true, - }) - } - isMountedRef.current = true - }, [initialIndex, initialScrollAlign, onlyShowSelectionWhenActive, setActiveIndex]) - - /** - * Re-enable child pointer events on any mousemove / wheel event - */ - useEffect(() => { - function handleMouseEvent() { - enableChildContainerPointerEvents(true) - } - virtualListElement?.addEventListener('mousemove', handleMouseEvent) - virtualListElement?.addEventListener('wheel', handleMouseEvent, {passive: true}) - return () => { - virtualListElement?.removeEventListener('mousemove', handleMouseEvent) - virtualListElement?.removeEventListener('wheel', handleMouseEvent) - } - }, [enableChildContainerPointerEvents, virtualListElement]) - - /** - * Listen to keyboard / blur / focus events on both input element (if present) and the virtual list element. - */ - useEffect(() => { - inputElement?.addEventListener('focus', handleFocus) - inputElement?.addEventListener('keydown', handleKeyDownInput) - virtualListElement?.addEventListener('focus', handleFocus) - virtualListElement?.addEventListener('keydown', handleKeyDownList) - return () => { - inputElement?.removeEventListener('focus', handleFocus) - inputElement?.removeEventListener('keydown', handleKeyDownInput) - virtualListElement?.removeEventListener('focus', handleFocus) - virtualListElement?.removeEventListener('keydown', handleKeyDownList) - } - }, [ - canReceiveFocus, - handleFocus, - handleKeyDown, - handleKeyDownInput, - handleKeyDownList, - hideChildrenActiveState, - inputElement, - showChildrenActiveState, - virtualListElement, - ]) - - /** - * Refresh selected state when item values change (as a result of filtering). - * This is to ensure that we correctly clear aria-activedescendant attrs if the filtered array is empty. - */ - useEffect(() => { - handleUpdateActiveDescendant() - }, [handleUpdateActiveDescendant, items]) - - /** - * On DOM mutations, re-assign active descendant on input element (if present) and update active state on all children. - * - * Useful since virtual lists will constantly mutate the DOM on scroll, and we want to ensure that - * new elements coming into view are rendered with the correct selected state. - * - * An alternative to using MutationObserver is hooking into the `onChange` callback that `react-virtual` provides, though - * this changes on _every_ internal state change. - */ - useEffect(() => { + [setActiveIndex], + ) + + const handleFocus = useCallback(() => { + showChildrenActiveState() + }, [showChildrenActiveState]) + /** - * Throttled version of `showChildrenActiveState`, used when DOM mutations are detected in virtual lists + * Handle keyboard events: + * - Up/down arrow: scroll to adjacent items + * - Enter: trigger click events on the current active element */ - const refreshChildrenActiveStateThrottled = throttle(showChildrenActiveState, 200) + const handleKeyDown = useCallback( + (type: CommandListElementType) => (event: KeyboardEvent) => { + const childElements = Array.from(childContainerElement?.children || []) as HTMLElement[] + if (!childElements.length) { + return + } - const mutationObserver = new MutationObserver(refreshChildrenActiveStateThrottled) + if (event.key === 'ArrowDown') { + event.preventDefault() + focusElement(type) + selectAdjacentItemIndex('next') + } + if (event.key === 'ArrowUp') { + event.preventDefault() + focusElement(type) + selectAdjacentItemIndex('previous') + } - if (childContainerElement) { - mutationObserver.observe(childContainerElement, { - childList: true, - subtree: true, - }) - } + if (event.key === 'Enter') { + event.preventDefault() + focusElement(type) + const currentElement = childElements.find( + (el) => + Number(el.dataset.index) === + itemIndices.findIndex((i) => i.activeIndex === activeIndexRef.current), + ) - return () => { - mutationObserver.disconnect() - } - }, [childContainerElement, showChildrenActiveState]) - - /** - * Apply input aria attributes - */ - useEffect(() => { - inputElement?.setAttribute('aria-autocomplete', 'list') - inputElement?.setAttribute('aria-expanded', 'true') - inputElement?.setAttribute('aria-controls', getCommandListChildrenId()) - inputElement?.setAttribute('role', 'combobox') - }, [getCommandListChildrenId, inputElement]) - - /** - * Focus input / virtual list element on mount - */ - useEffect(() => { - if (autoFocus) { - focusElement(autoFocus) - } - }, [autoFocus, canReceiveFocus, focusListElement, focusInputElement, focusElement]) - - const rootTabIndex = canReceiveFocus ? 0 : -1 - - return ( - - {canReceiveFocus && } - - ) -}) -CommandList.displayName = 'ForwardRef(CommandList)' + /** + * Optionally set active index (and align) on mount only + */ + useEffect(() => { + if (typeof initialIndex !== 'undefined' && !isMountedRef.current) { + setActiveIndex({ + index: initialIndex, + scrollAlign: initialScrollAlign, + scrollIntoView: true, + }) + } + isMountedRef.current = true + }, [initialIndex, initialScrollAlign, onlyShowSelectionWhenActive, setActiveIndex]) + + /** + * Re-enable child pointer events on any mousemove / wheel event + */ + useEffect(() => { + function handleMouseEvent() { + enableChildContainerPointerEvents(true) + } + virtualListElement?.addEventListener('mousemove', handleMouseEvent) + virtualListElement?.addEventListener('wheel', handleMouseEvent, {passive: true}) + return () => { + virtualListElement?.removeEventListener('mousemove', handleMouseEvent) + virtualListElement?.removeEventListener('wheel', handleMouseEvent) + } + }, [enableChildContainerPointerEvents, virtualListElement]) + + /** + * Listen to keyboard / blur / focus events on both input element (if present) and the virtual list element. + */ + useEffect(() => { + inputElement?.addEventListener('focus', handleFocus) + inputElement?.addEventListener('keydown', handleKeyDownInput) + virtualListElement?.addEventListener('focus', handleFocus) + virtualListElement?.addEventListener('keydown', handleKeyDownList) + return () => { + inputElement?.removeEventListener('focus', handleFocus) + inputElement?.removeEventListener('keydown', handleKeyDownInput) + virtualListElement?.removeEventListener('focus', handleFocus) + virtualListElement?.removeEventListener('keydown', handleKeyDownList) + } + }, [ + canReceiveFocus, + handleFocus, + handleKeyDown, + handleKeyDownInput, + handleKeyDownList, + hideChildrenActiveState, + inputElement, + showChildrenActiveState, + virtualListElement, + ]) + + /** + * Refresh selected state when item values change (as a result of filtering). + * This is to ensure that we correctly clear aria-activedescendant attrs if the filtered array is empty. + */ + useEffect(() => { + handleUpdateActiveDescendant() + }, [handleUpdateActiveDescendant, items]) + + /** + * On DOM mutations, re-assign active descendant on input element (if present) and update active state on all children. + * + * Useful since virtual lists will constantly mutate the DOM on scroll, and we want to ensure that + * new elements coming into view are rendered with the correct selected state. + * + * An alternative to using MutationObserver is hooking into the `onChange` callback that `react-virtual` provides, though + * this changes on _every_ internal state change. + */ + useEffect(() => { + /** + * Throttled version of `showChildrenActiveState`, used when DOM mutations are detected in virtual lists + */ + const refreshChildrenActiveStateThrottled = throttle(showChildrenActiveState, 200) + + const mutationObserver = new MutationObserver(refreshChildrenActiveStateThrottled) + + if (childContainerElement) { + mutationObserver.observe(childContainerElement, { + childList: true, + subtree: true, + }) + } + + return () => { + mutationObserver.disconnect() + } + }, [childContainerElement, showChildrenActiveState]) + + /** + * Apply input aria attributes + */ + useEffect(() => { + inputElement?.setAttribute('aria-autocomplete', 'list') + inputElement?.setAttribute('aria-expanded', 'true') + inputElement?.setAttribute('aria-controls', getCommandListChildrenId()) + inputElement?.setAttribute('role', 'combobox') + }, [getCommandListChildrenId, inputElement]) + + /** + * Focus input / virtual list element on mount + */ + useEffect(() => { + if (autoFocus) { + focusElement(autoFocus) + } + }, [autoFocus, canReceiveFocus, focusListElement, focusInputElement, focusElement]) + + const rootTabIndex = canReceiveFocus ? 0 : -1 + + return ( + + {canReceiveFocus && } + + ) + }), +) +CommandList.displayName = 'Memo(ForwardRef(CommandList))' From cad72785802a6d871c29c295aabf8bbc4db193ae Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 21:29:22 +0100 Subject: [PATCH 06/17] Update CommentsField.tsx --- .../comments/plugin/field/CommentsField.tsx | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/packages/sanity/src/core/comments/plugin/field/CommentsField.tsx b/packages/sanity/src/core/comments/plugin/field/CommentsField.tsx index 39de9e1a888..f3b9fefa6c1 100644 --- a/packages/sanity/src/core/comments/plugin/field/CommentsField.tsx +++ b/packages/sanity/src/core/comments/plugin/field/CommentsField.tsx @@ -109,7 +109,7 @@ function CommentFieldInner( }) const fieldTitle = useMemo(() => getSchemaTypeTitle(props.schemaType), [props.schemaType]) - const stringPath = useMemo(() => PathUtils.toString(props.path), [props.path]) + const stringPath = PathUtils.toString(props.path) // Use the cached value if it exists as the initial value const cachedValue = messageCache.get(stringPath) || null @@ -279,9 +279,9 @@ function CommentFieldInner( [stringPath], ) - const internalComments: FieldProps['__internal_comments'] = useMemo( - () => ({ - button: currentUser && ( + const button = useMemo( + () => + currentUser && ( ), - hasComments, - isAddingComment: isOpen, - }), [ - currentUser, count, + currentUser, fieldTitle, - isCreatingDataset, - mentionOptions, - handleOnChange, handleClick, handleClose, handleCommentAdd, - resetMessageValue, + handleOnChange, + isCreatingDataset, isOpen, + mentionOptions, + resetMessageValue, value, - hasComments, ], ) - return ( - - {props.renderDefault({ + const content = useMemo( + () => + props.renderDefault({ ...props, // eslint-disable-next-line camelcase - __internal_comments: internalComments, - })} + __internal_comments: { + button, + hasComments, + isAddingComment: isOpen, + }, + }), + [button, hasComments, isOpen, props], + ) + + return ( + + {content} {isSelected && !isInlineCommentThread && ( From 5fb369d4ad35568f556999bdcceb9d856936f89e Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 21:57:10 +0100 Subject: [PATCH 07/17] speeeeedy --- .../form/components/formField/FormField.tsx | 25 +++-- .../components/formField/FormFieldSet.tsx | 92 +++++++++++-------- .../field/actions/FieldActionsProvider.tsx | 9 +- .../components/SanityDefaultPreview.tsx | 11 ++- 4 files changed, 81 insertions(+), 56 deletions(-) diff --git a/packages/sanity/src/core/form/components/formField/FormField.tsx b/packages/sanity/src/core/form/components/formField/FormField.tsx index 5a1e8251a57..24dcc1bd53a 100644 --- a/packages/sanity/src/core/form/components/formField/FormField.tsx +++ b/packages/sanity/src/core/form/components/formField/FormField.tsx @@ -1,6 +1,6 @@ import {type DeprecatedProperty, type FormNodeValidation} from '@sanity/types' import {Stack} from '@sanity/ui' -import {type HTMLProps, memo, type ReactNode} from 'react' +import {type HTMLProps, memo, type ReactNode, useMemo} from 'react' import {type DocumentFieldActionNode} from '../../../config' import {type FormNodePresence} from '../../../presence' @@ -65,6 +65,19 @@ export const FormField = memo(function FormField( } = props const {focused, hovered, onMouseEnter, onMouseLeave} = useFieldActions() + const content = useMemo( + () => ( + + ), + [deprecated, description, inputId, title, validation], + ) + return ( - } + content={content} /> )}
{children}
diff --git a/packages/sanity/src/core/form/components/formField/FormFieldSet.tsx b/packages/sanity/src/core/form/components/formField/FormFieldSet.tsx index 977034160b4..90020ed74ad 100644 --- a/packages/sanity/src/core/form/components/formField/FormFieldSet.tsx +++ b/packages/sanity/src/core/form/components/formField/FormFieldSet.tsx @@ -183,6 +183,59 @@ export const FormFieldSet = forwardRef(function FormFieldSet( ) }, [children, collapsed, columns]) + const headerContent = useMemo( + () => ( + + + {title && ( + + )} + {deprecated && ( + + + {t('form.field.deprecated-label')} + + + )} + {hasValidationMarkers && ( + + + + )} + + + {deprecated && ( + + {deprecated.reason} + + )} + + {description && ( + + {description} + + )} + + ), + [ + collapsed, + collapsible, + deprecated, + description, + handleToggle, + hasValidationMarkers, + inputId, + t, + title, + validation, + ], + ) + return ( - - {title && ( - - )} - {deprecated && ( - - - {t('form.field.deprecated-label')} - - - )} - {hasValidationMarkers && ( - - - - )} - - - {deprecated && ( - - {deprecated.reason} - - )} - - {description && ( - - {description} - - )} -
- } + content={headerContent} /> /** @internal */ -export function FieldActionsProvider(props: FieldActionsProviderProps) { +export const FieldActionsProvider = memo(function FieldActionsProvider( + props: FieldActionsProviderProps, +) { const {actions, children, path, focused} = props const {onMouseEnter: onFieldMouseEnter, onMouseLeave: onFieldMouseLeave} = useHoveredField() @@ -41,4 +43,5 @@ export function FieldActionsProvider(props: FieldActionsProviderProps) { ) return {children} -} +}) +FieldActionsProvider.displayName = 'Memo(FieldActionsProvider)' diff --git a/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx b/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx index 247e059e083..640aea43ba3 100644 --- a/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx +++ b/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx @@ -120,11 +120,12 @@ export function SanityDefaultPreview(props: SanityDefaultPreviewProps): ReactEle [media, restProps, title], ) - const layoutComponent = _previewComponents[layout || 'default'] - - const children = createElement( - layoutComponent as ComponentType>, - previewProps, + const LayoutComponent = _previewComponents[layout || 'default'] as ComponentType< + Omit + > + const children = useMemo( + () => , + [LayoutComponent, previewProps], ) if (tooltip) { From 8c3aa3c7b614823a1d6b3ec24ff4f1e88e0e781d Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 22:03:26 +0100 Subject: [PATCH 08/17] faaaaaster --- .../components/SanityDefaultPreview.tsx | 34 +++-- .../src/core/studio/StudioErrorBoundary.tsx | 137 +++++++++--------- 2 files changed, 94 insertions(+), 77 deletions(-) diff --git a/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx b/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx index 640aea43ba3..b8a3216b50b 100644 --- a/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx +++ b/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx @@ -56,17 +56,7 @@ export function SanityDefaultPreview(props: SanityDefaultPreviewProps): ReactEle {isString(title) ) }, @@ -144,3 +134,25 @@ export function SanityDefaultPreview(props: SanityDefaultPreviewProps): ReactEle return children } +SanityDefaultPreview.displayName = 'SanityDefaultPreview' + +function createImageUrl( + imageBuilder: typeof imageUrlBuilder, + mediaProp: React.ComponentProps['media'], + dimensions: { + width?: number + height?: number + fit: ImageUrlFitMode + dpr?: number + }, +) { + return ( + imageBuilder + .image(mediaProp as SanityImageSource /*will only enter this code path if it's compatible*/) + .width(dimensions.width || 100) + .height(dimensions.height || 100) + .fit(dimensions.fit) + .dpr(dimensions.dpr || 1) + .url() || '' + ) +} diff --git a/packages/sanity/src/core/studio/StudioErrorBoundary.tsx b/packages/sanity/src/core/studio/StudioErrorBoundary.tsx index d1e87257fc3..7daacad0166 100644 --- a/packages/sanity/src/core/studio/StudioErrorBoundary.tsx +++ b/packages/sanity/src/core/studio/StudioErrorBoundary.tsx @@ -5,6 +5,7 @@ import { type ComponentType, type ErrorInfo, lazy, + memo, type ReactNode, useCallback, useState, @@ -58,77 +59,81 @@ const View = styled(Box)` align-items: center; ` -export const StudioErrorBoundary: ComponentType = ({ - children, - heading = 'An error occurred', -}) => { - const [{error, eventId}, setError] = useState(INITIAL_STATE) - const message = isRecord(error) && typeof error.message === 'string' && error.message - const stack = isRecord(error) && typeof error.stack === 'string' && error.stack - const handleResetError = useCallback(() => setError(INITIAL_STATE), []) - const handleCatchError: ErrorBoundaryProps['onCatch'] = useCallback((params) => { - const report = errorReporter.reportError(params.error, { - reactErrorInfo: params.info, - errorBoundary: 'StudioErrorBoundary', - }) +export const StudioErrorBoundary: ComponentType = memo( + function StudioErrorBoundary({children, heading = 'An error occurred'}) { + const [{error, eventId}, setError] = useState(INITIAL_STATE) + const message = isRecord(error) && typeof error.message === 'string' && error.message + const stack = isRecord(error) && typeof error.stack === 'string' && error.stack + const handleResetError = useCallback(() => setError(INITIAL_STATE), []) + const handleCatchError: ErrorBoundaryProps['onCatch'] = useCallback((params) => { + const report = errorReporter.reportError(params.error, { + reactErrorInfo: params.info, + errorBoundary: 'StudioErrorBoundary', + }) - setError({ - error: params.error, - componentStack: params.info.componentStack, - eventId: report?.eventId || null, - }) - }, []) + setError({ + error: params.error, + componentStack: params.info.componentStack, + eventId: report?.eventId || null, + }) + }, []) - useHotModuleReload(handleResetError) + useHotModuleReload(handleResetError) - if (error instanceof CorsOriginError) { - return - } + if (error instanceof CorsOriginError) { + return + } - if (error instanceof SchemaError) { - return - } + if (error instanceof SchemaError) { + return + } - if (error && 'ViteDevServerStoppedError' in error && error.ViteDevServerStoppedError) { - return - } + if (error && 'ViteDevServerStoppedError' in error && error.ViteDevServerStoppedError) { + return + } - if (!error) { - return {children} - } + if (!error) { + return {children} + } - return ( - - - - - - {heading} - An error occurred that Sanity Studio was unable to recover from. - {isProd && ( - - To report this error, copy the error details and share them with - your development team or Sanity Support. - - )} - {isDev && ( - - - {message && ( - - Error: {message} - - )} - {stack && {stack}} - {eventId && Event ID: {eventId}} - - - )} + return ( + + + + + + {heading} + An error occurred that Sanity Studio was unable to recover from. + {isProd && ( + + To report this error, copy the error details and share them + with your development team or Sanity Support. + + )} + {isDev && ( + + + {message && ( + + Error: {message} + + )} + {stack && {stack}} + {eventId && Event ID: {eventId}} + + + )} + + - - - - - - ) -} + + + + ) + }, +) From b4f22487e99e883e846c5ceb0c385ef1e521212f Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 22:08:15 +0100 Subject: [PATCH 09/17] fix more speed --- .../core/preview/components/SanityDefaultPreview.tsx | 2 +- .../core/studio/addonDataset/AddonDatasetProvider.tsx | 8 +++++--- .../context/navigation/TasksNavigationProvider.tsx | 10 +++++++--- .../sanity/src/structure/StructureToolProvider.tsx | 6 +++--- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx b/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx index b8a3216b50b..d1683eedebd 100644 --- a/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx +++ b/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx @@ -137,7 +137,7 @@ export function SanityDefaultPreview(props: SanityDefaultPreviewProps): ReactEle SanityDefaultPreview.displayName = 'SanityDefaultPreview' function createImageUrl( - imageBuilder: typeof imageUrlBuilder, + imageBuilder: ReturnType, mediaProp: React.ComponentProps['media'], dimensions: { width?: number diff --git a/packages/sanity/src/core/studio/addonDataset/AddonDatasetProvider.tsx b/packages/sanity/src/core/studio/addonDataset/AddonDatasetProvider.tsx index 9b89eaae662..879c52fe025 100644 --- a/packages/sanity/src/core/studio/addonDataset/AddonDatasetProvider.tsx +++ b/packages/sanity/src/core/studio/addonDataset/AddonDatasetProvider.tsx @@ -1,5 +1,5 @@ import {type SanityClient} from '@sanity/client' -import {useCallback, useContext, useEffect, useMemo, useState} from 'react' +import {memo, useCallback, useContext, useEffect, useMemo, useState} from 'react' import {AddonDatasetContext} from 'sanity/_singletons' import {useClient} from '../../hooks' @@ -13,7 +13,9 @@ interface AddonDatasetSetupProviderProps { children: React.ReactNode } -function AddonDatasetProviderInner(props: AddonDatasetSetupProviderProps) { +const AddonDatasetProviderInner = memo(function AddonDatasetProviderInner( + props: AddonDatasetSetupProviderProps, +) { const {children} = props const {dataset, projectId} = useWorkspace() const originalClient = useClient(DEFAULT_STUDIO_CLIENT_OPTIONS) @@ -127,7 +129,7 @@ function AddonDatasetProviderInner(props: AddonDatasetSetupProviderProps) { ) return {children} -} +}) /** * This provider sets the addon dataset client, currently called `comments` dataset. diff --git a/packages/sanity/src/core/tasks/context/navigation/TasksNavigationProvider.tsx b/packages/sanity/src/core/tasks/context/navigation/TasksNavigationProvider.tsx index f0c93b5211a..ba91e82891c 100644 --- a/packages/sanity/src/core/tasks/context/navigation/TasksNavigationProvider.tsx +++ b/packages/sanity/src/core/tasks/context/navigation/TasksNavigationProvider.tsx @@ -1,7 +1,7 @@ import {useTelemetry} from '@sanity/telemetry/react' import {useToast} from '@sanity/ui' import {uuid} from '@sanity/uuid' -import {type ReactNode, useCallback, useEffect, useMemo, useReducer} from 'react' +import {memo, type ReactNode, useCallback, useEffect, useMemo, useReducer} from 'react' import {TasksNavigationContext} from 'sanity/_singletons' import {useRouter} from 'sanity/router' @@ -71,7 +71,11 @@ function reducer(state: State, action: Action): State { } } -export const TasksNavigationProvider = ({children}: {children: ReactNode}) => { +export const TasksNavigationProvider = memo(function TasksNavigationProvider({ + children, +}: { + children: ReactNode +}) { const [state, dispatch] = useReducer(reducer, initialState) const router = useRouter() const toast = useToast() @@ -174,4 +178,4 @@ export const TasksNavigationProvider = ({children}: {children: ReactNode}) => { ) return {children} -} +}) diff --git a/packages/sanity/src/structure/StructureToolProvider.tsx b/packages/sanity/src/structure/StructureToolProvider.tsx index 43b7667647c..37659769d00 100644 --- a/packages/sanity/src/structure/StructureToolProvider.tsx +++ b/packages/sanity/src/structure/StructureToolProvider.tsx @@ -1,4 +1,4 @@ -import {type ReactElement, type ReactNode, useMemo, useState} from 'react' +import {memo, type ReactElement, type ReactNode, useMemo, useState} from 'react' import {useConfigContextFromSource, useDocumentStore, useSource} from 'sanity' import {StructureToolContext} from 'sanity/_singletons' @@ -17,7 +17,7 @@ export interface StructureToolProviderProps { } /** @internal */ -export function StructureToolProvider({ +export const StructureToolProvider = memo(function StructureToolProvider({ defaultDocumentNode, structure: resolveStructure, children, @@ -68,4 +68,4 @@ export function StructureToolProvider({ return ( {children} ) -} +}) From f2b0b8136b8ee45f18113909ca10c9e58043c29e Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 22:21:09 +0100 Subject: [PATCH 10/17] Update DocumentLayout.tsx --- .../document/document-layout/DocumentLayout.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/sanity/src/structure/panes/document/document-layout/DocumentLayout.tsx b/packages/sanity/src/structure/panes/document/document-layout/DocumentLayout.tsx index fbf86181716..166ba951ecb 100644 --- a/packages/sanity/src/structure/panes/document/document-layout/DocumentLayout.tsx +++ b/packages/sanity/src/structure/panes/document/document-layout/DocumentLayout.tsx @@ -6,7 +6,7 @@ import { useElementRect, } from '@sanity/ui' import {isHotkey} from 'is-hotkey-esm' -import {type ReactNode, useCallback, useMemo, useState} from 'react' +import {memo, type ReactNode, useCallback, useMemo, useState} from 'react' import {useTranslation} from 'react-i18next' import { ChangeConnectorRoot, @@ -64,7 +64,7 @@ const StyledChangeConnectorRoot = styled(ChangeConnectorRoot)` min-width: 0; ` -export function DocumentLayout() { +export const DocumentLayout = memo(function DocumentLayout() { const { changesOpen, documentId, @@ -159,6 +159,12 @@ export function DocumentLayout() { [onPathOpen, onFocus], ) + // Memoize 'portalElements' to prevent unnecessary re-renders of PortalProvider + const portalElements = useMemo( + () => ({[DOCUMENT_PANEL_PORTAL_ELEMENT]: documentPanelPortalElement}), + [documentPanelPortalElement], + ) + if (!schemaType) { return ( + @@ -259,7 +263,7 @@ export function DocumentLayout() { ) -} +}) /** * Prevents whatever is inside of it from rendering when the pane is collapsed. From bfcd4c103a3813c615b300a4459420afd2f765f4 Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 22:26:47 +0100 Subject: [PATCH 11/17] come ooon --- packages/sanity/package.config.ts | 2 +- .../CommentsAuthoringPathProvider.tsx | 8 +- .../components/loadingBlock/LoadingBlock.tsx | 8 +- .../context/SanityCreateConfigProvider.tsx | 8 +- .../components/SanityDefaultPreview.tsx | 2 +- .../documentPanel/documentViews/FormView.tsx | 393 +++++++++--------- .../document/statusBar/DocumentStatusLine.tsx | 8 +- 7 files changed, 223 insertions(+), 206 deletions(-) diff --git a/packages/sanity/package.config.ts b/packages/sanity/package.config.ts index bf55a949938..7750b8bded8 100644 --- a/packages/sanity/package.config.ts +++ b/packages/sanity/package.config.ts @@ -53,7 +53,7 @@ export default defineConfig({ rules: { ...baseConfig.extract.rules, 'ae-incompatible-release-tags': 'error', - 'ae-missing-release-tag': 'error', + 'ae-missing-release-tag': 'warn', }, }, diff --git a/packages/sanity/src/core/comments/context/authoring-path/CommentsAuthoringPathProvider.tsx b/packages/sanity/src/core/comments/context/authoring-path/CommentsAuthoringPathProvider.tsx index a4034133e80..a7ab1db3c79 100644 --- a/packages/sanity/src/core/comments/context/authoring-path/CommentsAuthoringPathProvider.tsx +++ b/packages/sanity/src/core/comments/context/authoring-path/CommentsAuthoringPathProvider.tsx @@ -1,4 +1,4 @@ -import {type ReactNode, useCallback, useMemo, useState} from 'react' +import {memo, type ReactNode, useCallback, useMemo, useState} from 'react' import {CommentsAuthoringPathContext} from 'sanity/_singletons' import {type CommentsAuthoringPathContextValue} from './types' @@ -17,7 +17,9 @@ interface CommentsAuthoringPathProviderProps { * the component re-renders, for example, when the form is temporarily set to `readOnly` * while reconnecting. */ -export function CommentsAuthoringPathProvider(props: CommentsAuthoringPathProviderProps) { +export const CommentsAuthoringPathProvider = memo(function CommentsAuthoringPathProvider( + props: CommentsAuthoringPathProviderProps, +) { const {children} = props const [authoringPath, setAuthoringPath] = useState(null) @@ -38,4 +40,4 @@ export function CommentsAuthoringPathProvider(props: CommentsAuthoringPathProvid {children} ) -} +}) diff --git a/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx b/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx index beba3fe38a3..a80aa388ea6 100644 --- a/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx +++ b/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx @@ -117,14 +117,18 @@ const StyledText = styled(Text)` * * @internal */ -export function LoadingBlock({fill, showText, title}: LoadingTestProps) { +export const LoadingBlock = React.memo(function LoadingBlock({ + fill, + showText, + title, +}: LoadingTestProps) { return ( {showText && } ) -} +}) function LoadingText({title}: {title?: string | null}) { const {t} = useTranslation() diff --git a/packages/sanity/src/core/create/context/SanityCreateConfigProvider.tsx b/packages/sanity/src/core/create/context/SanityCreateConfigProvider.tsx index 4427dae64cc..fc432e1c24e 100644 --- a/packages/sanity/src/core/create/context/SanityCreateConfigProvider.tsx +++ b/packages/sanity/src/core/create/context/SanityCreateConfigProvider.tsx @@ -1,4 +1,4 @@ -import {type ReactNode, useMemo} from 'react' +import {memo, type ReactNode, useMemo} from 'react' import {SanityCreateConfigContext} from 'sanity/_singletons' import {useSource} from '../../studio' @@ -13,7 +13,9 @@ interface SanityCreateConfigProviderProps { /** * @internal */ -export function SanityCreateConfigProvider(props: SanityCreateConfigProviderProps): JSX.Element { +export const SanityCreateConfigProvider = memo(function SanityCreateConfigProvider( + props: SanityCreateConfigProviderProps, +): JSX.Element { const {children} = props const {beta} = useSource() const value = useMemo((): SanityCreateConfigContextValue => { @@ -32,4 +34,4 @@ export function SanityCreateConfigProvider(props: SanityCreateConfigProviderProp {children} ) -} +}) diff --git a/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx b/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx index d1683eedebd..0c7ee6d8107 100644 --- a/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx +++ b/packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx @@ -36,7 +36,7 @@ export interface SanityDefaultPreviewProps extends Omit ev.preventDefault() -export const FormView = forwardRef(function FormView(props, ref) { - const {hidden, margins} = props - - const { - collapsedFieldSets, - collapsedPaths, - displayed: value, - editState, - documentId, - documentType, - fieldActions, - onChange, - validation, - ready, - formState, - onFocus, - connectionState, - onBlur, - onSetCollapsedPath, - onPathOpen, - onSetCollapsedFieldSet, - onSetActiveFieldGroup, - openPath, - } = useDocumentPane() - const documentStore = useDocumentStore() - const presence = useDocumentPresence(documentId) - const {title} = useDocumentTitle() - - // The `patchChannel` is an INTERNAL publish/subscribe channel that we use to notify form-builder - // nodes about both remote and local patches. - // - Used by the Portable Text input to modify selections. - // - Used by `withDocument` to reset value. - const patchChannel = useMemo(() => createPatchChannel(), []) - - const isLocked = editState?.transactionSyncLock?.enabled - const {t} = useTranslation(structureLocaleNamespace) - - const conditionalToastParams = useMemo( - () => ({ - id: `sync-lock`, - status: 'warning' as const, - enabled: isLocked, - title: t('document-view.form-view.sync-lock-toast.title'), - description: t('document-view.form-view.sync-lock-toast.description'), - closable: true, - }), - [isLocked, t], - ) - - useConditionalToast(conditionalToastParams) - - useEffect(() => { - const sub = documentStore.pair - .documentEvents(documentId, documentType) - .pipe( - tap((event) => { - if (event.type === 'mutation') { - patchChannel.publish(prepareMutationEvent(event)) - } - - if (event.type === 'rebase') { - patchChannel.publish(prepareRebaseEvent(event)) - } - }), - ) - .subscribe() - - return () => { - sub.unsubscribe() - } - }, [documentId, documentStore, documentType, patchChannel]) - - const hasRev = Boolean(value?._rev) - useEffect(() => { - if (hasRev) { - // this is a workaround for an issue that caused the document pushed to withDocument to get - // stuck at the first initial value. - // This effect is triggered only when the document goes from not having a revision, to getting one - // so it will kick in as soon as the document is received from the backend - patchChannel.publish({ - type: 'mutation', - patches: [], - snapshot: value, - }) - } - // React to changes in hasRev only - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [hasRev]) - - const [formRef, setFormRef] = useState(null) - - // We only want to run it on first mount - const [focusedFirstDescendant, setFocusedFirstDescendant] = useState(false) - useEffect(() => { - // Only focus on the first descendant if there is not already a focus path - // This is to avoid stealing focus from intent links - if (!focusedFirstDescendant && ready && !formState?.focusPath.length && formRef) { - setFocusedFirstDescendant(true) - focusFirstDescendant(formRef) - } - }, [focusedFirstDescendant, formRef, formState?.focusPath.length, ready]) - - const setRef = useCallback( - (node: HTMLDivElement | null) => { - setFormRef(node) - if (typeof ref === 'function') { - ref(node) - } else if (ref) { - ref.current = node +export const FormView = memo( + forwardRef(function FormView(props, ref) { + const {hidden, margins} = props + + const { + collapsedFieldSets, + collapsedPaths, + displayed: value, + editState, + documentId, + documentType, + fieldActions, + onChange, + validation, + ready, + formState, + onFocus, + connectionState, + onBlur, + onSetCollapsedPath, + onPathOpen, + onSetCollapsedFieldSet, + onSetActiveFieldGroup, + openPath, + } = useDocumentPane() + const documentStore = useDocumentStore() + const presence = useDocumentPresence(documentId) + const {title} = useDocumentTitle() + + // The `patchChannel` is an INTERNAL publish/subscribe channel that we use to notify form-builder + // nodes about both remote and local patches. + // - Used by the Portable Text input to modify selections. + // - Used by `withDocument` to reset value. + const patchChannel = useMemo(() => createPatchChannel(), []) + + const isLocked = editState?.transactionSyncLock?.enabled + const {t} = useTranslation(structureLocaleNamespace) + + const conditionalToastParams = useMemo( + () => ({ + id: `sync-lock`, + status: 'warning' as const, + enabled: isLocked, + title: t('document-view.form-view.sync-lock-toast.title'), + description: t('document-view.form-view.sync-lock-toast.description'), + closable: true, + }), + [isLocked, t], + ) + + useConditionalToast(conditionalToastParams) + + useEffect(() => { + const sub = documentStore.pair + .documentEvents(documentId, documentType) + .pipe( + tap((event) => { + if (event.type === 'mutation') { + patchChannel.publish(prepareMutationEvent(event)) + } + + if (event.type === 'rebase') { + patchChannel.publish(prepareRebaseEvent(event)) + } + }), + ) + .subscribe() + + return () => { + sub.unsubscribe() } - }, - [ref], - ) - - // const after = useMemo( - // () => - // Array.isArray(afterEditorComponents) && - // afterEditorComponents.map( - // (AfterEditorComponent: ComponentType<{documentId: string}>, idx: number) => ( - // - // ) - // ), - // [documentId] - // ) - - return ( - - ) -}) + }, [documentId, documentStore, documentType, patchChannel]) + + const hasRev = Boolean(value?._rev) + useEffect(() => { + if (hasRev) { + // this is a workaround for an issue that caused the document pushed to withDocument to get + // stuck at the first initial value. + // This effect is triggered only when the document goes from not having a revision, to getting one + // so it will kick in as soon as the document is received from the backend + patchChannel.publish({ + type: 'mutation', + patches: [], + snapshot: value, + }) + } + // React to changes in hasRev only + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [hasRev]) + + const [formRef, setFormRef] = useState(null) + + // We only want to run it on first mount + const [focusedFirstDescendant, setFocusedFirstDescendant] = useState(false) + useEffect(() => { + // Only focus on the first descendant if there is not already a focus path + // This is to avoid stealing focus from intent links + if (!focusedFirstDescendant && ready && !formState?.focusPath.length && formRef) { + setFocusedFirstDescendant(true) + focusFirstDescendant(formRef) + } + }, [focusedFirstDescendant, formRef, formState?.focusPath.length, ready]) + + const setRef = useCallback( + (node: HTMLDivElement | null) => { + setFormRef(node) + if (typeof ref === 'function') { + ref(node) + } else if (ref) { + ref.current = node + } + }, + [ref], + ) + + // const after = useMemo( + // () => + // Array.isArray(afterEditorComponents) && + // afterEditorComponents.map( + // (AfterEditorComponent: ComponentType<{documentId: string}>, idx: number) => ( + // + // ) + // ), + // [documentId] + // ) + + return ( + + ) + }), +) function prepareMutationEvent(event: DocumentMutationEvent): PatchMsg { const patches = event.mutations.map((mut) => mut.patch).filter(Boolean) diff --git a/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusLine.tsx b/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusLine.tsx index 586b5bb6ab1..95897a1f705 100644 --- a/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusLine.tsx +++ b/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusLine.tsx @@ -1,5 +1,5 @@ import {Flex} from '@sanity/ui' -import {useEffect, useLayoutEffect, useState} from 'react' +import {memo, useEffect, useLayoutEffect, useState} from 'react' import {DocumentStatus, DocumentStatusIndicator, useSyncState} from 'sanity' import {Tooltip} from '../../../../ui-components' @@ -13,7 +13,9 @@ interface DocumentStatusLineProps { singleLine?: boolean } -export function DocumentStatusLine({singleLine}: DocumentStatusLineProps) { +export const DocumentStatusLine = memo(function DocumentStatusLine({ + singleLine, +}: DocumentStatusLineProps) { const {documentId, documentType, editState, value} = useDocumentPane() const [status, setStatus] = useState<'saved' | 'syncing' | null>(null) @@ -70,4 +72,4 @@ export function DocumentStatusLine({singleLine}: DocumentStatusLineProps) {
) -} +}) From cc38cd517b8700772fd34399fca132187d5c57d6 Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 22:31:00 +0100 Subject: [PATCH 12/17] fix --- .../components/loadingBlock/LoadingBlock.tsx | 7 +-- .../previews/general/DefaultPreview.tsx | 59 ++++++++++++------- 2 files changed, 39 insertions(+), 27 deletions(-) diff --git a/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx b/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx index a80aa388ea6..847b01abed0 100644 --- a/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx +++ b/packages/sanity/src/core/components/loadingBlock/LoadingBlock.tsx @@ -1,4 +1,5 @@ import {Card, Layer, Spinner, Text} from '@sanity/ui' +import {memo} from 'react' import {css, styled} from 'styled-components' import {useTranslation} from '../..' @@ -117,11 +118,7 @@ const StyledText = styled(Text)` * * @internal */ -export const LoadingBlock = React.memo(function LoadingBlock({ - fill, - showText, - title, -}: LoadingTestProps) { +export const LoadingBlock = memo(function LoadingBlock({fill, showText, title}: LoadingTestProps) { return ( diff --git a/packages/sanity/src/core/components/previews/general/DefaultPreview.tsx b/packages/sanity/src/core/components/previews/general/DefaultPreview.tsx index bd0851e8faa..c93116d9d0b 100644 --- a/packages/sanity/src/core/components/previews/general/DefaultPreview.tsx +++ b/packages/sanity/src/core/components/previews/general/DefaultPreview.tsx @@ -1,5 +1,6 @@ import {Box, Flex, rem, Skeleton, Stack, Text, TextSkeleton} from '@sanity/ui' import classNames from 'classnames' +import {memo, useMemo} from 'react' import {styled} from 'styled-components' import {getDevicePixelRatio} from 'use-device-pixel-ratio' @@ -52,15 +53,42 @@ const SKELETON_DELAY = 300 /** * @hidden * @beta */ -export function DefaultPreview(props: DefaultPreviewProps) { +export const DefaultPreview = memo(function DefaultPreview(props: DefaultPreviewProps) { const {title, subtitle, media, status, isPlaceholder, children, styles} = props const {t} = useTranslation() const rootClassName = classNames(styles?.root, Boolean(subtitle) && styles?.hasSubtitle) - const statusNode = status && ( - - {renderPreviewNode(status, 'default')} - + const statusNode = useMemo( + () => + status && ( + + {renderPreviewNode(status, 'default')} + + ), + [status, styles?.status], + ) + + const memoizedStatusBox = useMemo( + () => ( + + {statusNode} + + ), + [statusNode], + ) + const memoizedMediaBox = useMemo( + () => + media && ( + + + + ), + [media, styles], ) if (isPlaceholder) { @@ -89,9 +117,7 @@ export function DefaultPreview(props: DefaultPreviewProps) { - - {statusNode} - + {memoizedStatusBox} ) @@ -106,16 +132,7 @@ export function DefaultPreview(props: DefaultPreviewProps) { paddingLeft={media ? 2 : 3} > - {media && ( - - - - )} + {memoizedMediaBox} - - {statusNode} - + {memoizedStatusBox} {children &&
{children}
}
) -} +}) From a891e974d6d93a6936c9e0ad01ba2b83d9d6290d Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 22:39:40 +0100 Subject: [PATCH 13/17] fastr --- .../previews/general/DefaultPreview.tsx | 6 +- .../overlay/RegionsWithIntersections.tsx | 276 +++++++++--------- .../navbar/tools/ToolCollapseMenu.tsx | 7 +- 3 files changed, 147 insertions(+), 142 deletions(-) diff --git a/packages/sanity/src/core/components/previews/general/DefaultPreview.tsx b/packages/sanity/src/core/components/previews/general/DefaultPreview.tsx index c93116d9d0b..0d4268238cd 100644 --- a/packages/sanity/src/core/components/previews/general/DefaultPreview.tsx +++ b/packages/sanity/src/core/components/previews/general/DefaultPreview.tsx @@ -1,6 +1,6 @@ import {Box, Flex, rem, Skeleton, Stack, Text, TextSkeleton} from '@sanity/ui' import classNames from 'classnames' -import {memo, useMemo} from 'react' +import {useMemo} from 'react' import {styled} from 'styled-components' import {getDevicePixelRatio} from 'use-device-pixel-ratio' @@ -53,7 +53,7 @@ const SKELETON_DELAY = 300 /** * @hidden * @beta */ -export const DefaultPreview = memo(function DefaultPreview(props: DefaultPreviewProps) { +export function DefaultPreview(props: DefaultPreviewProps) { const {title, subtitle, media, status, isPlaceholder, children, styles} = props const {t} = useTranslation() const rootClassName = classNames(styles?.root, Boolean(subtitle) && styles?.hasSubtitle) @@ -163,4 +163,4 @@ export const DefaultPreview = memo(function DefaultPreview(props: DefaultPreview ) -}) +} diff --git a/packages/sanity/src/core/presence/overlay/RegionsWithIntersections.tsx b/packages/sanity/src/core/presence/overlay/RegionsWithIntersections.tsx index 13d4310e452..2df18b9763b 100644 --- a/packages/sanity/src/core/presence/overlay/RegionsWithIntersections.tsx +++ b/packages/sanity/src/core/presence/overlay/RegionsWithIntersections.tsx @@ -1,6 +1,8 @@ +/* eslint-disable react/no-unused-prop-types */ import { type ForwardedRef, forwardRef, + memo, type ReactNode, useCallback, useMemo, @@ -42,140 +44,142 @@ interface RegionsWithIntersectionsProps { const toPx = (num: number) => `${num}px` const negate = (num: number) => 0 - num -export const RegionsWithIntersections = forwardRef(function RegionsWithIntersections( - props: RegionsWithIntersectionsProps, - ref: ForwardedRef, -) { - const { - regions, - render, - children, - margins: [mt, mr, mb, ml], - } = props - - const overlayRef = useRef(null) - - // Make sure `margins` is memoized - const margins = useMemo<[number, number, number, number]>( - () => [mt, mr, mb, ml], - [mt, mr, mb, ml], - ) - - const io = useMemo( - () => - createIntersectionObserver({ - rootMargin: margins.map(negate).map(toPx).join(' '), - threshold: INTERSECTION_THRESHOLDS, - }), - [margins], - ) - - const [intersections, setIntersections] = useState< - Record< - string, - | { - boundingClientRect: {top: number; bottom: number} - isIntersecting: boolean - intersectionRect: {top: number; bottom: number} - } - | undefined - > - >({}) - - const onIntersection = useCallback((id: any, entry: any) => { - setIntersections((current) => ({...current, [id]: entry})) - }, []) - - const top = intersections['::top'] - const bottom = intersections['::bottom'] - const regionsWithIntersectionDetails: RegionWithIntersectionDetails[] = useMemo( - () => - (top && bottom - ? regions - .filter((region) => region.presence?.length > 0) - .map((region): RegionWithIntersectionDetails | null => { - const intersection = intersections[region.id] - - if (!intersection) { - return null - } - - const {bottom: boundsBottom, top: boundsTop} = intersection.boundingClientRect - - const aboveTop = intersection.boundingClientRect.top < top.boundingClientRect.bottom - const belowBottom = - intersection.boundingClientRect.top < bottom.boundingClientRect.top - - // eslint-disable-next-line no-nested-ternary - const distanceTop = intersection.isIntersecting - ? boundsTop - (intersection.intersectionRect.top - INTERSECTION_ELEMENT_PADDING) - : aboveTop - ? -top.boundingClientRect.bottom - : bottom.boundingClientRect.top - - // eslint-disable-next-line no-nested-ternary - const distanceBottom = intersection.isIntersecting - ? -( - boundsBottom - - (intersection.intersectionRect.bottom + INTERSECTION_ELEMENT_PADDING) - ) - : belowBottom - ? bottom.boundingClientRect.top - : -top.boundingClientRect.bottom - - const position = +export const RegionsWithIntersections = memo( + forwardRef(function RegionsWithIntersections( + props: RegionsWithIntersectionsProps, + ref: ForwardedRef, + ) { + const { + regions, + render, + children, + margins: [mt, mr, mb, ml], + } = props + + const overlayRef = useRef(null) + + // Make sure `margins` is memoized + const margins = useMemo<[number, number, number, number]>( + () => [mt, mr, mb, ml], + [mt, mr, mb, ml], + ) + + const io = useMemo( + () => + createIntersectionObserver({ + rootMargin: margins.map(negate).map(toPx).join(' '), + threshold: INTERSECTION_THRESHOLDS, + }), + [margins], + ) + + const [intersections, setIntersections] = useState< + Record< + string, + | { + boundingClientRect: {top: number; bottom: number} + isIntersecting: boolean + intersectionRect: {top: number; bottom: number} + } + | undefined + > + >({}) + + const onIntersection = useCallback((id: any, entry: any) => { + setIntersections((current) => ({...current, [id]: entry})) + }, []) + + const top = intersections['::top'] + const bottom = intersections['::bottom'] + const regionsWithIntersectionDetails = useMemo( + () => + (top && bottom + ? regions + .filter((region) => region.presence?.length > 0) + .map((region): RegionWithIntersectionDetails | null => { + const intersection = intersections[region.id] + + if (!intersection) { + return null + } + + const {bottom: boundsBottom, top: boundsTop} = intersection.boundingClientRect + + const aboveTop = intersection.boundingClientRect.top < top.boundingClientRect.bottom + const belowBottom = + intersection.boundingClientRect.top < bottom.boundingClientRect.top + + // eslint-disable-next-line no-nested-ternary + const distanceTop = intersection.isIntersecting + ? boundsTop - (intersection.intersectionRect.top - INTERSECTION_ELEMENT_PADDING) + : aboveTop + ? -top.boundingClientRect.bottom + : bottom.boundingClientRect.top + // eslint-disable-next-line no-nested-ternary - distanceTop <= SNAP_TO_DOCK_DISTANCE_TOP - ? 'top' - : distanceBottom <= SNAP_TO_DOCK_DISTANCE_BOTTOM - ? 'bottom' - : 'inside' - - return { - distanceTop, - distanceBottom, - region, - position, - } - }) - .filter(Boolean) - : []) as RegionWithIntersectionDetails[], - [bottom, intersections, regions, top], - ) - - return ( - - -
{children}
- - {overlayRef.current && - render(regionsWithIntersectionDetails, overlayRef.current.offsetWidth)} - - {regions.map((region) => { - const forceWidth = region.rect.width === 0 - return ( - - ) - })} - -
- ) -}) + const distanceBottom = intersection.isIntersecting + ? -( + boundsBottom - + (intersection.intersectionRect.bottom + INTERSECTION_ELEMENT_PADDING) + ) + : belowBottom + ? bottom.boundingClientRect.top + : -top.boundingClientRect.bottom + + const position = + // eslint-disable-next-line no-nested-ternary + distanceTop <= SNAP_TO_DOCK_DISTANCE_TOP + ? 'top' + : distanceBottom <= SNAP_TO_DOCK_DISTANCE_BOTTOM + ? 'bottom' + : 'inside' + + return { + distanceTop, + distanceBottom, + region, + position, + } + }) + .filter(Boolean) + : []) as RegionWithIntersectionDetails[], + [bottom, intersections, regions, top], + ) + + return ( + + +
{children}
+ + {overlayRef.current && + render(regionsWithIntersectionDetails, overlayRef.current.offsetWidth)} + + {regions.map((region) => { + const forceWidth = region.rect.width === 0 + return ( + + ) + })} + +
+ ) + }), +) diff --git a/packages/sanity/src/core/studio/components/navbar/tools/ToolCollapseMenu.tsx b/packages/sanity/src/core/studio/components/navbar/tools/ToolCollapseMenu.tsx index b4139970a2b..e6a0ab872c6 100644 --- a/packages/sanity/src/core/studio/components/navbar/tools/ToolCollapseMenu.tsx +++ b/packages/sanity/src/core/studio/components/navbar/tools/ToolCollapseMenu.tsx @@ -1,6 +1,7 @@ +/* eslint-disable max-nested-callbacks */ import {Flex} from '@sanity/ui' import {startCase} from 'lodash' -import {forwardRef, type Ref, useMemo, useState} from 'react' +import {forwardRef, memo, type Ref, useMemo, useState} from 'react' import {Button} from '../../../../../ui-components' import {useRovingFocus} from '../../../../components' @@ -14,7 +15,7 @@ interface ToolCollapseMenuProps { tools: Tool[] } -export function ToolCollapseMenu(props: ToolCollapseMenuProps) { +export const ToolCollapseMenu = memo(function ToolCollapseMenu(props: ToolCollapseMenuProps) { const {activeToolName, tools} = props const scheme = useColorSchemeValue() const [collapseMenuEl, setCollapseMenuEl] = useState(null) @@ -77,4 +78,4 @@ export function ToolCollapseMenu(props: ToolCollapseMenuProps) { ) -} +}) From f214f90cdeff3539081ed375bdd8bc20cde30583 Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 22:55:14 +0100 Subject: [PATCH 14/17] more memo --- .../core/changeIndicators/ChangeIndicator.tsx | 4 +- .../core/components/scroll/scrollMonitor.tsx | 6 +-- .../CrossDatasetReferenceInput.tsx | 7 ++- .../ReferenceInput/ReferencePreview.tsx | 6 +-- .../core/presence/overlay/PresenceOverlay.tsx | 9 ++-- .../documentWrapper/ScheduleBanner.tsx | 5 +- .../structure/components/pane/PaneContent.tsx | 51 ++++++++++--------- .../document/documentPanel/DocumentPanel.tsx | 6 +-- .../documentViews/FormHeader.tsx | 9 +++- .../document/statusBar/DocumentBadges.tsx | 4 +- .../AnimatedStatusIcon.tsx | 8 +-- .../DocumentStatusPulse.tsx | 7 ++- 12 files changed, 70 insertions(+), 52 deletions(-) diff --git a/packages/sanity/src/core/changeIndicators/ChangeIndicator.tsx b/packages/sanity/src/core/changeIndicators/ChangeIndicator.tsx index a4411abb7d0..2d836f0d1d8 100644 --- a/packages/sanity/src/core/changeIndicators/ChangeIndicator.tsx +++ b/packages/sanity/src/core/changeIndicators/ChangeIndicator.tsx @@ -98,7 +98,7 @@ export interface ChangeIndicatorProps { } /** @internal */ -export function ChangeIndicator( +export const ChangeIndicator = memo(function ChangeIndicator( props: ChangeIndicatorProps & Omit, 'as'>, ) { const {children, hasFocus, isChanged, path, withHoverEffect, ...restProps} = props @@ -114,4 +114,4 @@ export function ChangeIndicator( {children} ) -} +}) diff --git a/packages/sanity/src/core/components/scroll/scrollMonitor.tsx b/packages/sanity/src/core/components/scroll/scrollMonitor.tsx index 674de4029af..ab21742dc2c 100644 --- a/packages/sanity/src/core/components/scroll/scrollMonitor.tsx +++ b/packages/sanity/src/core/components/scroll/scrollMonitor.tsx @@ -1,4 +1,4 @@ -import {type ReactNode} from 'react' +import {memo, type ReactNode} from 'react' import {useOnScroll} from './hooks' import {type ScrollEventHandler} from './types' @@ -10,7 +10,7 @@ export interface ScrollMonitorProps { } /** @internal */ -export function ScrollMonitor({onScroll, children}: ScrollMonitorProps) { +export const ScrollMonitor = memo(function ScrollMonitor({onScroll, children}: ScrollMonitorProps) { useOnScroll(onScroll) return <>{children} -} +}) diff --git a/packages/sanity/src/core/form/inputs/CrossDatasetReferenceInput/CrossDatasetReferenceInput.tsx b/packages/sanity/src/core/form/inputs/CrossDatasetReferenceInput/CrossDatasetReferenceInput.tsx index 8b6b69d9b26..ed79dc58a36 100644 --- a/packages/sanity/src/core/form/inputs/CrossDatasetReferenceInput/CrossDatasetReferenceInput.tsx +++ b/packages/sanity/src/core/form/inputs/CrossDatasetReferenceInput/CrossDatasetReferenceInput.tsx @@ -5,6 +5,7 @@ import {Box, Card, Flex, Inline, Menu, Stack, useClickOutsideEvent, useToast} fr import { type FocusEvent, type KeyboardEvent, + memo, useCallback, useId, useMemo, @@ -57,7 +58,9 @@ const REF_PATH = ['_ref'] const CROSS_DATASET_FEATUREKEY = 'crossDatasetReferences' /** @internal */ -export function CrossDatasetReferenceInput(props: CrossDatasetReferenceInputProps) { +export const CrossDatasetReferenceInput = memo(function CrossDatasetReferenceInput( + props: CrossDatasetReferenceInputProps, +) { const { changed, focused, @@ -425,4 +428,4 @@ export function CrossDatasetReferenceInput(props: CrossDatasetReferenceInputProp )} ) -} +}) diff --git a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferencePreview.tsx b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferencePreview.tsx index 9371f6275a4..01254af2611 100644 --- a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferencePreview.tsx +++ b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferencePreview.tsx @@ -1,6 +1,6 @@ import {type ObjectSchemaType} from '@sanity/types' import {Badge, Box, Inline} from '@sanity/ui' -import {useMemo} from 'react' +import {memo, useMemo} from 'react' import {type PreviewLayoutKey} from '../../../components' import {DocumentStatus} from '../../../components/documentStatus' @@ -14,7 +14,7 @@ import {type ReferenceInfo} from './types' * Used to preview a referenced type * Takes the reference type as props */ -export function ReferencePreview(props: { +export const ReferencePreview = memo(function ReferencePreview(props: { id: string preview: ReferenceInfo['preview'] refType: ObjectSchemaType @@ -80,4 +80,4 @@ export function ReferencePreview(props: { ) return renderPreview(previewProps) -} +}) diff --git a/packages/sanity/src/core/presence/overlay/PresenceOverlay.tsx b/packages/sanity/src/core/presence/overlay/PresenceOverlay.tsx index 99460ead07e..1efbdd28119 100644 --- a/packages/sanity/src/core/presence/overlay/PresenceOverlay.tsx +++ b/packages/sanity/src/core/presence/overlay/PresenceOverlay.tsx @@ -1,4 +1,4 @@ -import {type ReactNode} from 'react' +import {memo, type ReactNode} from 'react' import {StickyOverlay} from './StickyOverlay' import {PresenceTracker} from './tracker' @@ -12,10 +12,13 @@ export interface PresenceOverlayProps { const DEFAULT_MARGINS: [number, number, number, number] = [0, 0, 0, 0] /** @internal */ -export function PresenceOverlay({children, margins}: PresenceOverlayProps) { +export const PresenceOverlay = memo(function PresenceOverlay({ + children, + margins, +}: PresenceOverlayProps) { return ( {children} ) -} +}) diff --git a/packages/sanity/src/core/scheduledPublishing/components/documentWrapper/ScheduleBanner.tsx b/packages/sanity/src/core/scheduledPublishing/components/documentWrapper/ScheduleBanner.tsx index 5384f6dc78d..1036ad9327e 100644 --- a/packages/sanity/src/core/scheduledPublishing/components/documentWrapper/ScheduleBanner.tsx +++ b/packages/sanity/src/core/scheduledPublishing/components/documentWrapper/ScheduleBanner.tsx @@ -2,6 +2,7 @@ import {CalendarIcon, WarningOutlineIcon} from '@sanity/icons' import {type ValidationMarker} from '@sanity/types' import {Badge, Box, Card, Flex, Inline, Stack, Text} from '@sanity/ui' import {format} from 'date-fns' +import {memo} from 'react' import {DATE_FORMAT, DOCUMENT_HAS_ERRORS_TEXT} from '../../constants' import usePollSchedules from '../../hooks/usePollSchedules' @@ -14,7 +15,7 @@ interface Props { markers: ValidationMarker[] } -export function ScheduleBanner(props: Props) { +export const ScheduleBanner = memo(function ScheduleBanner(props: Props) { const {id, markers} = props const publishedId = usePublishedId(id) const {hasError} = useValidationState(markers) @@ -90,4 +91,4 @@ export function ScheduleBanner(props: Props) { ) -} +}) diff --git a/packages/sanity/src/structure/components/pane/PaneContent.tsx b/packages/sanity/src/structure/components/pane/PaneContent.tsx index db7a0b2088b..3da31f692c5 100644 --- a/packages/sanity/src/structure/components/pane/PaneContent.tsx +++ b/packages/sanity/src/structure/components/pane/PaneContent.tsx @@ -1,5 +1,6 @@ +/* eslint-disable react/no-unused-prop-types */ import {type BoxOverflow} from '@sanity/ui' -import {type ElementType, type ForwardedRef, forwardRef, type HTMLProps} from 'react' +import {type ElementType, type ForwardedRef, forwardRef, type HTMLProps, memo} from 'react' import {Root} from './PaneContent.styles' import {usePane} from './usePane' @@ -15,27 +16,29 @@ interface PaneContentProps { * @hidden * @internal */ -export const PaneContent = forwardRef(function PaneContent( - props: PaneContentProps & Omit, 'as' | 'height' | 'ref'>, - ref: ForwardedRef, -) { - const {as, children, overflow, padding, ...restProps} = props - const {collapsed} = usePane() - const {collapsed: layoutCollapsed} = usePaneLayout() +export const PaneContent = memo( + forwardRef(function PaneContent( + props: PaneContentProps & Omit, 'as' | 'height' | 'ref'>, + ref: ForwardedRef, + ) { + const {as, children, overflow, padding, ...restProps} = props + const {collapsed} = usePane() + const {collapsed: layoutCollapsed} = usePaneLayout() - return ( - - ) -}) + return ( + + ) + }), +) diff --git a/packages/sanity/src/structure/panes/document/documentPanel/DocumentPanel.tsx b/packages/sanity/src/structure/panes/document/documentPanel/DocumentPanel.tsx index fca8f6bc25d..1513424f976 100644 --- a/packages/sanity/src/structure/panes/document/documentPanel/DocumentPanel.tsx +++ b/packages/sanity/src/structure/panes/document/documentPanel/DocumentPanel.tsx @@ -1,5 +1,5 @@ import {BoundaryElementProvider, Box, Flex, PortalProvider, usePortal} from '@sanity/ui' -import {createElement, useEffect, useMemo, useRef, useState} from 'react' +import {createElement, memo, useEffect, useMemo, useRef, useState} from 'react' import {ScrollContainer, useTimelineSelector, VirtualizerScrollInstanceProvider} from 'sanity' import {css, styled} from 'styled-components' @@ -44,7 +44,7 @@ const Scroller = styled(ScrollContainer)<{$disabled: boolean}>(({$disabled}) => ` }) -export const DocumentPanel = function DocumentPanel(props: DocumentPanelProps) { +export const DocumentPanel = memo(function DocumentPanel(props: DocumentPanelProps) { const {footerHeight, headerHeight, isInspectOpen, rootElement, setDocumentPanelPortalElement} = props const { @@ -207,4 +207,4 @@ export const DocumentPanel = function DocumentPanel(props: DocumentPanelProps) { ) -} +}) diff --git a/packages/sanity/src/structure/panes/document/documentPanel/documentViews/FormHeader.tsx b/packages/sanity/src/structure/panes/document/documentPanel/documentViews/FormHeader.tsx index e180a8e2a49..8e500c07863 100644 --- a/packages/sanity/src/structure/panes/document/documentPanel/documentViews/FormHeader.tsx +++ b/packages/sanity/src/structure/panes/document/documentPanel/documentViews/FormHeader.tsx @@ -1,5 +1,6 @@ import {type ObjectSchemaType} from '@sanity/types' import {Heading, Stack, Text} from '@sanity/ui' +import {memo} from 'react' import {useTranslation} from 'react-i18next' import {css, styled} from 'styled-components' @@ -59,7 +60,11 @@ export const TitleContainer = styled(Stack)` * Document type is hidden if the document `_id` matches the current document `_type`. * The entire header is hidden if container queries are not supported. */ -export const FormHeader = ({documentId, schemaType, title}: DocumentHeaderProps) => { +export const FormHeader = memo(function FormHeader({ + documentId, + schemaType, + title, +}: DocumentHeaderProps) { const isSingleton = documentId === schemaType.name const {t} = useTranslation(structureLocaleNamespace) @@ -80,4 +85,4 @@ export const FormHeader = ({documentId, schemaType, title}: DocumentHeaderProps) ) -} +}) diff --git a/packages/sanity/src/structure/panes/document/statusBar/DocumentBadges.tsx b/packages/sanity/src/structure/panes/document/statusBar/DocumentBadges.tsx index c340530a038..d1dcf3f9cd6 100644 --- a/packages/sanity/src/structure/panes/document/statusBar/DocumentBadges.tsx +++ b/packages/sanity/src/structure/panes/document/statusBar/DocumentBadges.tsx @@ -59,7 +59,7 @@ const DocumentBadgesDeferred = memo(function DocumentBadgesDeferred( return }) -export function DocumentBadges() { +export const DocumentBadges = memo(function DocumentBadges() { const {badges, editState} = useDocumentPane() const renderDocumentBadges = useCallback< @@ -73,4 +73,4 @@ export function DocumentBadges() { {renderDocumentBadges} ) -} +}) diff --git a/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusPulse/AnimatedStatusIcon.tsx b/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusPulse/AnimatedStatusIcon.tsx index f4a9266d28e..3b9d76a8c9e 100644 --- a/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusPulse/AnimatedStatusIcon.tsx +++ b/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusPulse/AnimatedStatusIcon.tsx @@ -1,5 +1,5 @@ import {motion} from 'framer-motion' -import {type ComponentProps} from 'react' +import {type ComponentProps, memo} from 'react' import {keyframes, styled} from 'styled-components' const StyledMotionPath = styled(motion.path)` @@ -19,9 +19,9 @@ const Arrows = (props: MotionPathProps) => ( {...props} /> ) -const Checkmark = (props: MotionPathProps) => ( - -) +const Checkmark = memo(function Checkmark(props: MotionPathProps) { + return +}) const rotateAnimation = keyframes` 0% { diff --git a/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusPulse/DocumentStatusPulse.tsx b/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusPulse/DocumentStatusPulse.tsx index 6e9b5838942..4ac140fb1fe 100644 --- a/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusPulse/DocumentStatusPulse.tsx +++ b/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusPulse/DocumentStatusPulse.tsx @@ -1,4 +1,5 @@ import {type ButtonTone, Flex, Text} from '@sanity/ui' +import {memo} from 'react' import {TextWithTone, useTranslation} from 'sanity' import {structureLocaleNamespace} from '../../../../i18n' @@ -20,7 +21,9 @@ const STATUS_DICTIONARY: Record }, } -export const DocumentStatusPulse = (props: ReviewChangesButtonProps) => { +export const DocumentStatusPulse = memo(function DocumentStatusPulse( + props: ReviewChangesButtonProps, +) { const {status} = props const {t} = useTranslation(structureLocaleNamespace) @@ -41,4 +44,4 @@ export const DocumentStatusPulse = (props: ReviewChangesButtonProps) => { ) -} +}) From 4d695033351ca126dee0ae9feae6e26c2b8620fb Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 22 Nov 2024 23:16:15 +0100 Subject: [PATCH 15/17] memo even more --- .../ActiveWorkspaceMatcher.tsx | 6 +-- .../configIssues/ConfigIssuesButton.tsx | 6 +-- .../navbar/presence/PresenceMenu.tsx | 6 +-- .../navbar/resources/ResourcesButton.tsx | 5 +- .../components/navbar/search/SearchButton.tsx | 47 ++++++++++--------- .../components/navbar/userMenu/UserMenu.tsx | 6 +-- .../navbar/workspace/WorkspaceMenuButton.tsx | 5 +- packages/sanity/src/router/StateLink.tsx | 33 +++++++------ .../components/paneRouter/ChildLink.tsx | 23 +++++---- 9 files changed, 72 insertions(+), 65 deletions(-) diff --git a/packages/sanity/src/core/studio/activeWorkspaceMatcher/ActiveWorkspaceMatcher.tsx b/packages/sanity/src/core/studio/activeWorkspaceMatcher/ActiveWorkspaceMatcher.tsx index 925aa9a8dcb..ba5ff6be2de 100644 --- a/packages/sanity/src/core/studio/activeWorkspaceMatcher/ActiveWorkspaceMatcher.tsx +++ b/packages/sanity/src/core/studio/activeWorkspaceMatcher/ActiveWorkspaceMatcher.tsx @@ -1,5 +1,5 @@ import {createBrowserHistory, createMemoryHistory} from 'history' -import {type ComponentType, type ReactNode, useCallback, useEffect, useMemo} from 'react' +import {type ComponentType, memo, type ReactNode, useCallback, useEffect, useMemo} from 'react' import {type RouterHistory} from '../router' import {useWorkspaces} from '../workspaces' @@ -18,7 +18,7 @@ const createHistory = () => typeof document === 'undefined' ? createMemoryHistory() : createBrowserHistory() /** @internal */ -export function ActiveWorkspaceMatcher({ +export const ActiveWorkspaceMatcher = memo(function ActiveWorkspaceMatcher({ children, LoadingComponent, NotFoundComponent, @@ -67,4 +67,4 @@ export function ActiveWorkspaceMatcher({ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TS thinks this will never happen, but the point of the error is if it somehow did throw new Error(`Unknown type: ${(result as any).type}`) } -} +}) diff --git a/packages/sanity/src/core/studio/components/navbar/configIssues/ConfigIssuesButton.tsx b/packages/sanity/src/core/studio/components/navbar/configIssues/ConfigIssuesButton.tsx index 2ac36735676..e214a03c574 100644 --- a/packages/sanity/src/core/studio/components/navbar/configIssues/ConfigIssuesButton.tsx +++ b/packages/sanity/src/core/studio/components/navbar/configIssues/ConfigIssuesButton.tsx @@ -1,7 +1,7 @@ /* eslint-disable i18next/no-literal-string,@sanity/i18n/no-attribute-string-literals */ import {WarningOutlineIcon} from '@sanity/icons' import {Stack, Text} from '@sanity/ui' -import {useCallback, useId, useState} from 'react' +import {memo, useCallback, useId, useState} from 'react' import {Dialog} from '../../../../../ui-components' import {StatusButton} from '../../../../components' @@ -10,7 +10,7 @@ import {useTranslation} from '../../../../i18n' import {useColorSchemeValue} from '../../../colorScheme' import {SchemaProblemGroups} from '../../../screens/schemaErrors/SchemaProblemGroups' -export function ConfigIssuesButton() { +export const ConfigIssuesButton = memo(function ConfigIssuesButton() { const schema = useSchema() const groupsWithWarnings = schema._validation?.filter((group) => @@ -78,4 +78,4 @@ export function ConfigIssuesButton() { )} ) -} +}) diff --git a/packages/sanity/src/core/studio/components/navbar/presence/PresenceMenu.tsx b/packages/sanity/src/core/studio/components/navbar/presence/PresenceMenu.tsx index 38b466a0b02..b3f36b691eb 100644 --- a/packages/sanity/src/core/studio/components/navbar/presence/PresenceMenu.tsx +++ b/packages/sanity/src/core/studio/components/navbar/presence/PresenceMenu.tsx @@ -1,6 +1,6 @@ import {AddUserIcon, UsersIcon} from '@sanity/icons' import {Box, Menu, MenuDivider, Stack, Text} from '@sanity/ui' -import {useCallback, useMemo, useState} from 'react' +import {memo, useCallback, useMemo, useState} from 'react' import {styled} from 'styled-components' import {MenuButton, type MenuButtonProps, MenuItem} from '../../../../../ui-components' @@ -21,7 +21,7 @@ const FooterStack = styled(Stack)` background-color: var(--card-bg-color); ` -export function PresenceMenu() { +export const PresenceMenu = memo(function PresenceMenu() { const presence = useGlobalPresence() const {projectId} = useWorkspace() const scheme = useColorSchemeValue() @@ -121,4 +121,4 @@ export function PresenceMenu() { popover={popoverProps} /> ) -} +}) diff --git a/packages/sanity/src/core/studio/components/navbar/resources/ResourcesButton.tsx b/packages/sanity/src/core/studio/components/navbar/resources/ResourcesButton.tsx index f7a707d0a33..7d95fbb878d 100644 --- a/packages/sanity/src/core/studio/components/navbar/resources/ResourcesButton.tsx +++ b/packages/sanity/src/core/studio/components/navbar/resources/ResourcesButton.tsx @@ -1,5 +1,6 @@ import {HelpCircleIcon} from '@sanity/icons' import {Menu} from '@sanity/ui' +import {memo} from 'react' import {styled} from 'styled-components' import {Button, MenuButton} from '../../../../../ui-components' @@ -12,7 +13,7 @@ const StyledMenu = styled(Menu)` min-width: 200px; ` -export function ResourcesButton() { +export const ResourcesButton = memo(function ResourcesButton() { const {t} = useTranslation() const {value, error, isLoading} = useGetHelpResources() @@ -36,4 +37,4 @@ export function ResourcesButton() { popover={{constrainSize: true}} /> ) -} +}) diff --git a/packages/sanity/src/core/studio/components/navbar/search/SearchButton.tsx b/packages/sanity/src/core/studio/components/navbar/search/SearchButton.tsx index 6e45fa661f3..1e56ae46828 100644 --- a/packages/sanity/src/core/studio/components/navbar/search/SearchButton.tsx +++ b/packages/sanity/src/core/studio/components/navbar/search/SearchButton.tsx @@ -1,5 +1,6 @@ +/* eslint-disable react/no-unused-prop-types */ import {SearchIcon} from '@sanity/icons' -import {type ForwardedRef, forwardRef} from 'react' +import {type ForwardedRef, forwardRef, memo} from 'react' import {Button} from '../../../../../ui-components' import {useTranslation} from '../../../../i18n' @@ -12,25 +13,27 @@ interface SearchButtonProps { /** * @internal */ -export const SearchButton = forwardRef(function SearchButton( - {onClick}: SearchButtonProps, - ref: ForwardedRef, -) { - const {t} = useTranslation() +export const SearchButton = memo( + forwardRef(function SearchButton( + {onClick}: SearchButtonProps, + ref: ForwardedRef, + ) { + const {t} = useTranslation() - return ( -