sanity-plugin-media 2.4.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -15
- package/src/components/AssetGridVirtualized/index.tsx +0 -1
- package/src/components/ButtonAssetCopy/index.tsx +1 -1
- package/src/components/Progress/index.tsx +0 -1
- package/src/components/SearchFacetTags/index.tsx +1 -1
- package/src/components/TableRowAsset/index.tsx +1 -1
- package/src/styled/react-select/creatable.tsx +0 -9
- package/src/styled/react-select/single.tsx +0 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sanity-plugin-media",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "This version of `sanity-plugin-media` is for Sanity Studio V3.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"@sanity/color": "^3.0.6",
|
|
60
60
|
"@sanity/icons": "^3.7.0",
|
|
61
61
|
"@sanity/incompatible-plugin": "^1.0.5",
|
|
62
|
-
"@sanity/ui": "^
|
|
62
|
+
"@sanity/ui": "^2.15",
|
|
63
63
|
"@sanity/uuid": "^3.0.1",
|
|
64
|
-
"@tanem/react-nprogress": "^5.0.
|
|
64
|
+
"@tanem/react-nprogress": "^5.0.55",
|
|
65
65
|
"copy-to-clipboard": "^3.3.1",
|
|
66
66
|
"date-fns": "^2.27.0",
|
|
67
67
|
"filesize": "^9.0.0",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"nanoid": "^3.3.8",
|
|
71
71
|
"pluralize": "^8.0.0",
|
|
72
72
|
"react-dropzone": "^11.3.1",
|
|
73
|
-
"react-file-icon": "^1.
|
|
74
|
-
"react-hook-form": "^7.
|
|
75
|
-
"react-redux": "^
|
|
73
|
+
"react-file-icon": "^1.6.0",
|
|
74
|
+
"react-hook-form": "^7.54.2",
|
|
75
|
+
"react-redux": "^9.2.0",
|
|
76
76
|
"react-select": "^5.3.2",
|
|
77
77
|
"react-virtuoso": "^4.3.11",
|
|
78
78
|
"redux": "^5.0.1",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"@sanity/vision": "^3.78.1",
|
|
90
90
|
"@types/is-hotkey": "^0.1.7",
|
|
91
91
|
"@types/pluralize": "^0.0.29",
|
|
92
|
-
"@types/react": "^
|
|
93
|
-
"@types/react-dom": "^
|
|
92
|
+
"@types/react": "^19.0.10",
|
|
93
|
+
"@types/react-dom": "^19.0.4",
|
|
94
94
|
"@types/react-file-icon": "^1.0.1",
|
|
95
95
|
"@typescript-eslint/eslint-plugin": "^5.42.0",
|
|
96
96
|
"@typescript-eslint/parser": "^5.42.0",
|
|
@@ -105,8 +105,9 @@
|
|
|
105
105
|
"lint-staged": "^13.0.3",
|
|
106
106
|
"prettier": "^2.7.1",
|
|
107
107
|
"prettier-plugin-packagejson": "^2.3.0",
|
|
108
|
-
"react": "^
|
|
109
|
-
"react-dom": "^
|
|
108
|
+
"react": "^19.0.0",
|
|
109
|
+
"react-dom": "^19.0.0",
|
|
110
|
+
"react-is": "^19.0.0",
|
|
110
111
|
"rimraf": "^3.0.2",
|
|
111
112
|
"sanity": "^3.78.1",
|
|
112
113
|
"standard-version": "^9.5.0",
|
|
@@ -114,11 +115,16 @@
|
|
|
114
115
|
"typescript": "5.7.3"
|
|
115
116
|
},
|
|
116
117
|
"peerDependencies": {
|
|
117
|
-
"@sanity/ui": "^
|
|
118
|
-
"react": "^18",
|
|
119
|
-
"react-dom": "^18",
|
|
120
|
-
"
|
|
121
|
-
"
|
|
118
|
+
"@sanity/ui": "^2.15",
|
|
119
|
+
"react": "^18.3 || ^19",
|
|
120
|
+
"react-dom": "^18.3 || ^19",
|
|
121
|
+
"react-is": "^18.3 || ^19",
|
|
122
|
+
"sanity": "^3.78",
|
|
123
|
+
"styled-components": "^6.1"
|
|
124
|
+
},
|
|
125
|
+
"overrides": {
|
|
126
|
+
"react": "$react",
|
|
127
|
+
"react-dom": "$react-dom"
|
|
122
128
|
},
|
|
123
129
|
"engines": {
|
|
124
130
|
"node": ">=18"
|
|
@@ -11,7 +11,7 @@ type Props = {
|
|
|
11
11
|
|
|
12
12
|
const ButtonAssetCopy = ({disabled, url}: Props) => {
|
|
13
13
|
const popoverProps = usePortalPopoverProps()
|
|
14
|
-
const refPopoverTimeout = useRef<ReturnType<typeof window.setTimeout>>()
|
|
14
|
+
const refPopoverTimeout = useRef<ReturnType<typeof window.setTimeout>>(null)
|
|
15
15
|
const [popoverVisible, setPopoverVisible] = useState(false)
|
|
16
16
|
|
|
17
17
|
const handleClick = () => {
|
|
@@ -105,7 +105,7 @@ const SearchFacetTags = ({facet}: Props) => {
|
|
|
105
105
|
isSearchable
|
|
106
106
|
name="tags"
|
|
107
107
|
noOptionsMessage={() => 'No tags'}
|
|
108
|
-
onChange={value => handleChange(value as TagSelectOption)}
|
|
108
|
+
onChange={(value: any) => handleChange(value as TagSelectOption)}
|
|
109
109
|
options={allTagOptions}
|
|
110
110
|
placeholder={tagsFetching ? 'Loading...' : 'Select...'}
|
|
111
111
|
styles={reactSelectStyles(scheme)}
|
|
@@ -105,7 +105,7 @@ const TableRowAsset = (props: Props) => {
|
|
|
105
105
|
const shiftPressed: RefObject<boolean> = useKeyPress('shift')
|
|
106
106
|
|
|
107
107
|
const [referenceCountVisible, setReferenceCountVisible] = useState(false)
|
|
108
|
-
const refCountVisibleTimeout = useRef<ReturnType<typeof window.setTimeout>>()
|
|
108
|
+
const refCountVisibleTimeout = useRef<ReturnType<typeof window.setTimeout>>(null)
|
|
109
109
|
|
|
110
110
|
const dispatch = useDispatch()
|
|
111
111
|
const lastPicked = useTypedSelector(state => state.assets.lastPicked)
|
|
@@ -8,7 +8,6 @@ const {radius: themeRadius, space: themeSpace} = studioTheme
|
|
|
8
8
|
|
|
9
9
|
export const reactSelectStyles = (scheme: ThemeColorSchemeKey): StylesConfig => {
|
|
10
10
|
return {
|
|
11
|
-
// @ts-expect-error - fix typings later
|
|
12
11
|
control: (styles, {isFocused}) => {
|
|
13
12
|
let boxShadow = `inset 0 0 0 1px var(--card-border-color)`
|
|
14
13
|
if (isFocused) {
|
|
@@ -34,12 +33,10 @@ export const reactSelectStyles = (scheme: ThemeColorSchemeKey): StylesConfig =>
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
},
|
|
37
|
-
// @ts-expect-error - fix typings later
|
|
38
36
|
indicatorsContainer: (styles, {isDisabled}) => ({
|
|
39
37
|
...styles,
|
|
40
38
|
opacity: isDisabled ? 0.25 : 1
|
|
41
39
|
}),
|
|
42
|
-
// @ts-expect-error - fix typings later
|
|
43
40
|
input: styles => ({
|
|
44
41
|
...styles,
|
|
45
42
|
color: 'var(--card-fg-color)',
|
|
@@ -49,7 +46,6 @@ export const reactSelectStyles = (scheme: ThemeColorSchemeKey): StylesConfig =>
|
|
|
49
46
|
menuList: styles => ({
|
|
50
47
|
...styles
|
|
51
48
|
}),
|
|
52
|
-
// @ts-expect-error - fix typings later
|
|
53
49
|
multiValue: (styles, {isDisabled}) => ({
|
|
54
50
|
...styles,
|
|
55
51
|
backgroundColor: getSchemeColor(scheme, 'mutedHoveredBg'),
|
|
@@ -61,7 +57,6 @@ export const reactSelectStyles = (scheme: ThemeColorSchemeKey): StylesConfig =>
|
|
|
61
57
|
fontSize: 'inherit',
|
|
62
58
|
padding: 0
|
|
63
59
|
}),
|
|
64
|
-
// @ts-expect-error - fix typings later
|
|
65
60
|
multiValueRemove: styles => ({
|
|
66
61
|
...styles,
|
|
67
62
|
borderTopLeftRadius: 0,
|
|
@@ -71,13 +66,11 @@ export const reactSelectStyles = (scheme: ThemeColorSchemeKey): StylesConfig =>
|
|
|
71
66
|
backgroundColor: getSchemeColor(scheme, 'mutedSelectedBg')
|
|
72
67
|
}
|
|
73
68
|
}),
|
|
74
|
-
// @ts-expect-error - fix typings later
|
|
75
69
|
noOptionsMessage: styles => ({
|
|
76
70
|
...styles,
|
|
77
71
|
fontFamily: studioTheme.fonts.text.family,
|
|
78
72
|
lineHeight: '1em'
|
|
79
73
|
}),
|
|
80
|
-
// @ts-expect-error - fix typings later
|
|
81
74
|
option: (styles, {isFocused}) => ({
|
|
82
75
|
...styles,
|
|
83
76
|
backgroundColor: isFocused ? getSchemeColor(scheme, 'spotBlue') : 'transparent',
|
|
@@ -89,12 +82,10 @@ export const reactSelectStyles = (scheme: ThemeColorSchemeKey): StylesConfig =>
|
|
|
89
82
|
color: getSchemeColor(scheme, 'bg')
|
|
90
83
|
}
|
|
91
84
|
}),
|
|
92
|
-
// @ts-expect-error - fix typings later
|
|
93
85
|
placeholder: styles => ({
|
|
94
86
|
...styles,
|
|
95
87
|
marginLeft: rem(themeSpace[2])
|
|
96
88
|
}),
|
|
97
|
-
// @ts-expect-error - fix typings later
|
|
98
89
|
valueContainer: styles => ({
|
|
99
90
|
...styles,
|
|
100
91
|
margin: 0,
|
|
@@ -14,7 +14,6 @@ const {
|
|
|
14
14
|
|
|
15
15
|
export const reactSelectStyles = (scheme: ThemeColorSchemeKey): StylesConfig => {
|
|
16
16
|
return {
|
|
17
|
-
// @ts-expect-error - fix typings later
|
|
18
17
|
control: (styles, {isDisabled, isFocused}) => {
|
|
19
18
|
let boxShadow = `inset 0 0 0 1px var(--card-border-color)`
|
|
20
19
|
if (isFocused) {
|
|
@@ -40,7 +39,6 @@ export const reactSelectStyles = (scheme: ThemeColorSchemeKey): StylesConfig =>
|
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
},
|
|
43
|
-
// @ts-expect-error - fix typings later
|
|
44
42
|
input: styles => ({
|
|
45
43
|
...styles,
|
|
46
44
|
color: 'var(--card-fg-color)',
|
|
@@ -48,19 +46,16 @@ export const reactSelectStyles = (scheme: ThemeColorSchemeKey): StylesConfig =>
|
|
|
48
46
|
fontSize: themeTextSizes[1].fontSize,
|
|
49
47
|
marginLeft: rem(themeSpace[2])
|
|
50
48
|
}),
|
|
51
|
-
// @ts-expect-error - fix typings later
|
|
52
49
|
menuList: styles => ({
|
|
53
50
|
...styles,
|
|
54
51
|
padding: 0
|
|
55
52
|
}),
|
|
56
|
-
// @ts-expect-error - fix typings later
|
|
57
53
|
noOptionsMessage: styles => ({
|
|
58
54
|
...styles,
|
|
59
55
|
fontFamily: studioTheme.fonts.text.family,
|
|
60
56
|
fontSize: themeTextSizes[1].fontSize,
|
|
61
57
|
lineHeight: '1em'
|
|
62
58
|
}),
|
|
63
|
-
// @ts-expect-error - fix typings later
|
|
64
59
|
option: (styles, {isFocused}) => ({
|
|
65
60
|
...styles,
|
|
66
61
|
backgroundColor: isFocused ? getSchemeColor(scheme, 'spotBlue') : 'transparent',
|
|
@@ -75,14 +70,12 @@ export const reactSelectStyles = (scheme: ThemeColorSchemeKey): StylesConfig =>
|
|
|
75
70
|
color: getSchemeColor(scheme, 'bg')
|
|
76
71
|
}
|
|
77
72
|
}),
|
|
78
|
-
// @ts-expect-error - fix typings later
|
|
79
73
|
placeholder: styles => ({
|
|
80
74
|
...styles,
|
|
81
75
|
fontSize: themeTextSizes[1].fontSize,
|
|
82
76
|
marginLeft: rem(themeSpace[2]),
|
|
83
77
|
paddingLeft: 0
|
|
84
78
|
}),
|
|
85
|
-
// @ts-expect-error - fix typings later
|
|
86
79
|
singleValue: styles => ({
|
|
87
80
|
...styles,
|
|
88
81
|
alignItems: 'center',
|
|
@@ -90,7 +83,6 @@ export const reactSelectStyles = (scheme: ThemeColorSchemeKey): StylesConfig =>
|
|
|
90
83
|
height: '100%',
|
|
91
84
|
marginLeft: rem(themeSpace[2])
|
|
92
85
|
}),
|
|
93
|
-
// @ts-expect-error - fix typings later
|
|
94
86
|
valueContainer: styles => ({
|
|
95
87
|
...styles,
|
|
96
88
|
margin: 0,
|