Skip to content

Commit

Permalink
chore(vision): use react 18 compatible dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Dec 16, 2022
1 parent f7eb4b3 commit 401f08a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 41 deletions.
2 changes: 1 addition & 1 deletion dev/test-studio/package.json
Expand Up @@ -27,7 +27,7 @@
"@sanity/ui-workshop": "^1.0.0",
"@sanity/util": "3.0.6",
"@sanity/uuid": "^3.0.1",
"@sanity/vision": "3.0.1",
"@sanity/vision": "3.0.6",
"@turf/helpers": "^6.0.1",
"@turf/points-within-polygon": "^5.1.5",
"@types/three": "^0.144.0",
Expand Down
7 changes: 2 additions & 5 deletions packages/@sanity/vision/package.json
Expand Up @@ -41,27 +41,24 @@
"@juggle/resize-observer": "^3.3.1",
"@lezer/highlight": "^1.0.0",
"@rexxars/react-json-inspector": "^8.0.1",
"@rexxars/react-split-pane": "^0.1.93",
"@sanity/color": "^2.1.20",
"@sanity/icons": "^2.1.0",
"@sanity/ui": "^1.0.0",
"@uiw/react-codemirror": "^4.11.4",
"hashlru": "^2.3.0",
"is-hotkey": "^0.1.6",
"json5": "^1.0.1",
"lodash": "^4.17.21",
"react-split-pane": "^0.1.84"
"lodash": "^4.17.21"
},
"devDependencies": {
"@sanity/client": "^3.4.1",
"react": "^18.2.0",
"rxjs": "^6.5.3",
"sanity": "3.0.6",
"styled-components": "^5.2.0"
},
"peerDependencies": {
"@sanity/client": "^3.4.1",
"react": "^18",
"rxjs": "^6.5.3",
"styled-components": "^5.2"
},
"repository": {
Expand Down
7 changes: 5 additions & 2 deletions packages/@sanity/vision/src/components/VisionGui.tsx
@@ -1,6 +1,6 @@
/* eslint-disable complexity */
import React, {ChangeEvent, type RefObject} from 'react'
import SplitPane from 'react-split-pane'
import SplitPane from '@rexxars/react-split-pane'
import type {ListenEvent, MutationEvent, SanityClient} from '@sanity/client'
import {PlayIcon, StopIcon, CopyIcon, ErrorOutlineIcon} from '@sanity/icons'
import isHotkey from 'is-hotkey'
Expand All @@ -18,7 +18,6 @@ import {
Button,
ToastContextValue,
} from '@sanity/ui'
import type {Subscription} from 'rxjs'
import {VisionCodeMirror} from '../codemirror/VisionCodeMirror'
import {getLocalStorage, LocalStorageish} from '../util/localStorage'
import {parseApiQueryString, ParsedApiQueryString} from '../util/parseApiQueryString'
Expand Down Expand Up @@ -85,6 +84,10 @@ function calculatePaneSizeOptions(rootHeight: number): PaneSizeOptions {
}
}

interface Subscription {
unsubscribe: () => void
}

interface VisionGuiProps extends VisionProps {
toast: ToastContextValue
datasets: string[]
Expand Down
42 changes: 9 additions & 33 deletions yarn.lock
Expand Up @@ -3461,6 +3461,15 @@
debounce "1.0.0"
md5-o-matic "^0.1.1"

"@rexxars/react-split-pane@^0.1.93":
version "0.1.93"
resolved "https://registry.yarnpkg.com/@rexxars/react-split-pane/-/react-split-pane-0.1.93.tgz#d9e00eb5d91cfb49f3e8ca30f6c8d450bf85d6ff"
integrity sha512-Pok8zATwd5ZpWnccJeSA/JM2MPmi3D04duYtrbMNRgzeAU2ANtq3r4w7ldbjpGyfJqggqn0wDNjRqaevXqSxQg==
dependencies:
prop-types "^15.7.2"
react-lifecycles-compat "^3.0.4"
react-style-proptype "^3.2.2"

"@rollup/plugin-alias@^3.1.9":
version "3.1.9"
resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-3.1.9.tgz#a5d267548fe48441f34be8323fb64d1d4a1b3fdf"
Expand Down Expand Up @@ -3835,30 +3844,6 @@
"@types/uuid" "^8.0.0"
uuid "^8.0.0"

"@sanity/vision@3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@sanity/vision/-/vision-3.0.1.tgz#87827d99c03d3a58f3196a70c00e9f5576750d3e"
integrity sha512-LdpEHUio4cSq3AW+6XK/FyUhbEWgVLWJC5FeJ4lActxkLn2ftnVwrXhF8uDjgGLOEPjJ3Oq4O7uWfEhPgyjhqA==
dependencies:
"@codemirror/autocomplete" "^6.1.0"
"@codemirror/commands" "^6.0.1"
"@codemirror/lang-javascript" "^6.0.2"
"@codemirror/language" "^6.2.1"
"@codemirror/search" "^6.0.1"
"@codemirror/view" "^6.1.1"
"@juggle/resize-observer" "^3.3.1"
"@lezer/highlight" "^1.0.0"
"@rexxars/react-json-inspector" "^8.0.1"
"@sanity/color" "^2.1.20"
"@sanity/icons" "^2.1.0"
"@sanity/ui" "^1.0.0"
"@uiw/react-codemirror" "^4.11.4"
hashlru "^2.3.0"
is-hotkey "^0.1.6"
json5 "^1.0.1"
lodash "^4.17.21"
react-split-pane "^0.1.84"

"@sideway/address@^4.1.3":
version "4.1.4"
resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0"
Expand Down Expand Up @@ -16016,15 +16001,6 @@ react-scripts@^5.0.0:
optionalDependencies:
fsevents "^2.3.2"

react-split-pane@^0.1.84:
version "0.1.92"
resolved "https://registry.yarnpkg.com/react-split-pane/-/react-split-pane-0.1.92.tgz#68242f72138aed95dd5910eeb9d99822c4fc3a41"
integrity sha512-GfXP1xSzLMcLJI5BM36Vh7GgZBpy+U/X0no+VM3fxayv+p1Jly5HpMofZJraeaMl73b3hvlr+N9zJKvLB/uz9w==
dependencies:
prop-types "^15.7.2"
react-lifecycles-compat "^3.0.4"
react-style-proptype "^3.2.2"

react-style-proptype@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/react-style-proptype/-/react-style-proptype-3.2.2.tgz#d8e998e62ce79ec35b087252b90f19f1c33968a0"
Expand Down

1 comment on commit 401f08a

@vercel
Copy link

@vercel vercel bot commented on 401f08a Dec 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

test-studio – ./

test-studio.sanity.build
test-studio-git-next.sanity.build

Please sign in to comment.