sanity-plugin-media 6.3.0 → 6.3.2
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 +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1427,7 +1427,7 @@ const initialState = {
|
|
|
1427
1427
|
result.folders.forEach(({ _id, count }) => {
|
|
1428
1428
|
exactCountByFolderId[_id] = count;
|
|
1429
1429
|
});
|
|
1430
|
-
let folderIds = new Set(folders.map((folder) => folder._id)), clearedCurrentFolder =
|
|
1430
|
+
let folderIds = new Set(folders.map((folder) => folder._id)), clearedCurrentFolder = !(!state.folders.currentFolderId || folderIds.has(state.folders.currentFolderId));
|
|
1431
1431
|
return of(foldersSlice.actions.fetchComplete({
|
|
1432
1432
|
folders,
|
|
1433
1433
|
exactCountByFolderId,
|
|
@@ -2259,9 +2259,9 @@ const ButtonAssetCopy = (t0) => {
|
|
|
2259
2259
|
function getSchemeColor(scheme, colorKey) {
|
|
2260
2260
|
return SCHEME_COLORS[colorKey]?.[scheme];
|
|
2261
2261
|
}
|
|
2262
|
-
const Image$1 = styled.img.
|
|
2262
|
+
const Image$1 = styled.img.withConfig({
|
|
2263
2263
|
displayName: "Image",
|
|
2264
|
-
componentId: "sc-
|
|
2264
|
+
componentId: "sc-gwtcwh-0"
|
|
2265
2265
|
})`--checkerboard-color:${(props) => props.$scheme ? getSchemeColor(props.$scheme, "bg2") : "inherit"};display:block;width:100%;height:100%;object-fit:contain;${(props) => props.$showCheckerboard && css`background-image:linear-gradient(45deg,var(--checkerboard-color) 25%,transparent 25%),linear-gradient(-45deg,var(--checkerboard-color) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--checkerboard-color) 75%),linear-gradient(-45deg,transparent 75%,var(--checkerboard-color) 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0;`}`, StyledErrorOutlineIcon = /* @__PURE__ */ styled(ErrorOutlineIcon).withConfig({
|
|
2266
2266
|
displayName: "StyledErrorOutlineIcon",
|
|
2267
2267
|
componentId: "sc-3yqi4g-0"
|
|
@@ -2861,7 +2861,7 @@ const DialogAssetEdit = (props) => {
|
|
|
2861
2861
|
}, $[33] = assetItem, $[34] = currentFolderId, $[35] = dispatch, $[36] = t17) : t17 = $[36];
|
|
2862
2862
|
let handleChangeFolder = t17, t18;
|
|
2863
2863
|
$[37] !== assetItem || $[38] !== currentFolderId || $[39] !== dispatch ? (t18 = () => {
|
|
2864
|
-
|
|
2864
|
+
assetItem && currentFolderId && dispatch(assetsActions.folderSetRequest({
|
|
2865
2865
|
assets: [assetItem],
|
|
2866
2866
|
folderId: null
|
|
2867
2867
|
}));
|
|
@@ -3304,7 +3304,7 @@ const CardWrapper$2 = styled(Flex).withConfig({
|
|
|
3304
3304
|
if (!asset) return null;
|
|
3305
3305
|
let t3;
|
|
3306
3306
|
$[6] !== asset || $[7] !== assetToReplace?.updating || $[8] !== assetToReplaceId || $[9] !== dispatch || $[10] !== toast ? (t3 = () => {
|
|
3307
|
-
|
|
3307
|
+
assetToReplaceId && isImageAsset(asset) && !assetToReplace?.updating && (dispatch(assetsActions.updateImageReferences({
|
|
3308
3308
|
asset,
|
|
3309
3309
|
id: assetToReplaceId
|
|
3310
3310
|
})), toast.push({
|
|
@@ -4766,7 +4766,7 @@ const getExpandedIdSet = (folderId, byId) => {
|
|
|
4766
4766
|
};
|
|
4767
4767
|
let t20;
|
|
4768
4768
|
$[38] !== currentFolder || $[39] !== currentFolderId || $[40] !== dispatch ? (t20 = () => {
|
|
4769
|
-
|
|
4769
|
+
currentFolderId && currentFolder && dispatch(dialogActions.showConfirmDeleteFolder({
|
|
4770
4770
|
folderId: currentFolderId,
|
|
4771
4771
|
folderName: currentFolder.name
|
|
4772
4772
|
}));
|
|
@@ -7197,7 +7197,7 @@ function _temp2$6(state_0) {
|
|
|
7197
7197
|
const TableHeaderItem = (props) => {
|
|
7198
7198
|
let $ = c(26), { field, title } = props, dispatch = useDispatch(), order = useTypedSelector(_temp$9), isActive = order.field === field, t0;
|
|
7199
7199
|
$[0] !== dispatch || $[1] !== field || $[2] !== isActive || $[3] !== order.direction || $[4] !== title ? (t0 = () => {
|
|
7200
|
-
if (
|
|
7200
|
+
if (field && title) {
|
|
7201
7201
|
if (isActive) {
|
|
7202
7202
|
let direction = order.direction === "asc" ? "desc" : "asc";
|
|
7203
7203
|
dispatch(assetsActions.orderSet({ order: {
|
|
@@ -8754,7 +8754,7 @@ function AutoTagInput(props) {
|
|
|
8754
8754
|
return;
|
|
8755
8755
|
}
|
|
8756
8756
|
let previousRef = prevAssetRef.current;
|
|
8757
|
-
prevAssetRef.current = currentAssetRef,
|
|
8757
|
+
prevAssetRef.current = currentAssetRef, mediaTags?.length && currentAssetRef && currentAssetRef !== previousRef && applyMediaTags({
|
|
8758
8758
|
client,
|
|
8759
8759
|
assetId: currentAssetRef,
|
|
8760
8760
|
mediaTags,
|