sanity-plugin-media 3.0.1 → 3.0.3
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 +6 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -13
- package/src/components/AssetGridVirtualized/index.tsx +8 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sanity-plugin-media",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "This version of `sanity-plugin-media` is for Sanity Studio V3.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@sanity/uuid": "^3.0.1",
|
|
64
64
|
"@tanem/react-nprogress": "^5.0.55",
|
|
65
65
|
"copy-to-clipboard": "^3.3.1",
|
|
66
|
-
"date-fns": "^
|
|
66
|
+
"date-fns": "^4.0.0",
|
|
67
67
|
"filesize": "^9.0.0",
|
|
68
68
|
"groq": "^3.0.0",
|
|
69
69
|
"is-hotkey-esm": "^1.0.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"react-file-icon": "^1.6.0",
|
|
74
74
|
"react-hook-form": "^7.54.2",
|
|
75
75
|
"react-redux": "^9.2.0",
|
|
76
|
-
"react-select": "^5.
|
|
76
|
+
"react-select": "^5.10.1",
|
|
77
77
|
"react-virtuoso": "^4.12.5",
|
|
78
78
|
"redux": "^5.0.1",
|
|
79
79
|
"redux-observable": "3.0.0-rc.2",
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@commitlint/cli": "^17.8.1",
|
|
85
85
|
"@commitlint/config-conventional": "^17.8.1",
|
|
86
|
-
"@sanity/pkg-utils": "^7.
|
|
86
|
+
"@sanity/pkg-utils": "^7.1.1",
|
|
87
87
|
"@sanity/plugin-kit": "^4.0.19",
|
|
88
88
|
"@sanity/semantic-release-preset": "^2.0.5",
|
|
89
|
-
"@sanity/vision": "^3.
|
|
89
|
+
"@sanity/vision": "^3.80.1",
|
|
90
90
|
"@types/is-hotkey": "^0.1.10",
|
|
91
91
|
"@types/pluralize": "^0.0.33",
|
|
92
|
-
"@types/react": "^19.0.
|
|
92
|
+
"@types/react": "^19.0.12",
|
|
93
93
|
"@types/react-dom": "^19.0.4",
|
|
94
94
|
"@types/react-file-icon": "^1.0.4",
|
|
95
95
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
@@ -109,10 +109,10 @@
|
|
|
109
109
|
"react-dom": "^19.0.0",
|
|
110
110
|
"react-is": "^19.0.0",
|
|
111
111
|
"rimraf": "^3.0.2",
|
|
112
|
-
"sanity": "^3.
|
|
112
|
+
"sanity": "^3.80.1",
|
|
113
113
|
"standard-version": "^9.5.0",
|
|
114
|
-
"styled-components": "^6.1.
|
|
115
|
-
"typescript": "5.
|
|
114
|
+
"styled-components": "^6.1.16",
|
|
115
|
+
"typescript": "5.8.2"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"@sanity/ui": "^2.15",
|
|
@@ -122,10 +122,6 @@
|
|
|
122
122
|
"sanity": "^3.78",
|
|
123
123
|
"styled-components": "^6.1"
|
|
124
124
|
},
|
|
125
|
-
"overrides": {
|
|
126
|
-
"react": "$react",
|
|
127
|
-
"react-dom": "$react-dom"
|
|
128
|
-
},
|
|
129
125
|
"engines": {
|
|
130
126
|
"node": ">=18"
|
|
131
127
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type {CardAssetData, CardUploadData} from '../../types'
|
|
2
|
-
import {memo} from 'react'
|
|
2
|
+
import {memo, forwardRef} from 'react'
|
|
3
3
|
import {VirtuosoGrid} from 'react-virtuoso'
|
|
4
4
|
import {styled} from 'styled-components'
|
|
5
5
|
import useTypedSelector from '../../hooks/useTypedSelector'
|
|
@@ -33,11 +33,11 @@ const StyledItemContainer = styled.div`
|
|
|
33
33
|
width: ${CARD_WIDTH}px;
|
|
34
34
|
`
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
const ItemContainer = forwardRef<HTMLDivElement, any>((props, ref) => {
|
|
37
37
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- we're doing this to avoid sc warnings about `context` passed as an attribute
|
|
38
38
|
const {context, ...rest} = props
|
|
39
|
-
return <StyledItemContainer {...rest} />
|
|
40
|
-
}
|
|
39
|
+
return <StyledItemContainer ref={ref} {...rest} />
|
|
40
|
+
})
|
|
41
41
|
|
|
42
42
|
const StyledListContainer = styled.div`
|
|
43
43
|
display: grid;
|
|
@@ -46,11 +46,12 @@ const StyledListContainer = styled.div`
|
|
|
46
46
|
justify-content: center;
|
|
47
47
|
margin: 0 auto;
|
|
48
48
|
`
|
|
49
|
-
|
|
49
|
+
|
|
50
|
+
const ListContainer = forwardRef<HTMLDivElement, any>((props, ref) => {
|
|
50
51
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- we're doing this to avoid sc warnings about `context` passed as an attribute
|
|
51
52
|
const {context, ...rest} = props
|
|
52
|
-
return <StyledListContainer {...rest} />
|
|
53
|
-
}
|
|
53
|
+
return <StyledListContainer ref={ref} {...rest} />
|
|
54
|
+
})
|
|
54
55
|
|
|
55
56
|
const AssetGridVirtualized = (props: Props) => {
|
|
56
57
|
const {items, onLoadMore} = props
|