sanity-plugin-media 5.0.7 → 5.0.9
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.d.ts +13 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -28
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -32,9 +32,9 @@ declare const tagOptionSchema: z.ZodObject<{
|
|
|
32
32
|
declare function getAssetFormSchema(locales?: {
|
|
33
33
|
id: string;
|
|
34
34
|
}[]): z.ZodObject<{
|
|
35
|
-
altText: z.
|
|
36
|
-
creditLine: z.
|
|
37
|
-
description: z.
|
|
35
|
+
altText: z.ZodObject<Record<string, z.ZodTypeAny>, "passthrough", z.ZodTypeAny, z.objectOutputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough">, z.objectInputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough">> | z.ZodOptional<z.ZodString>;
|
|
36
|
+
creditLine: z.ZodObject<Record<string, z.ZodTypeAny>, "passthrough", z.ZodTypeAny, z.objectOutputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough">, z.objectInputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough">> | z.ZodOptional<z.ZodString>;
|
|
37
|
+
description: z.ZodObject<Record<string, z.ZodTypeAny>, "passthrough", z.ZodTypeAny, z.objectOutputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough">, z.objectInputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough">> | z.ZodOptional<z.ZodString>;
|
|
38
38
|
opt: z.ZodObject<{
|
|
39
39
|
media: z.ZodObject<{
|
|
40
40
|
tags: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
@@ -74,9 +74,11 @@ declare function getAssetFormSchema(locales?: {
|
|
|
74
74
|
};
|
|
75
75
|
}>;
|
|
76
76
|
originalFilename: z.ZodString;
|
|
77
|
-
title: z.
|
|
77
|
+
title: z.ZodObject<Record<string, z.ZodTypeAny>, "passthrough", z.ZodTypeAny, z.objectOutputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough">, z.objectInputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough">> | z.ZodOptional<z.ZodString>;
|
|
78
78
|
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
|
|
79
|
+
altText?: string | z.objectOutputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
80
|
+
creditLine?: string | z.objectOutputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
81
|
+
description?: string | z.objectOutputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
80
82
|
opt: {
|
|
81
83
|
media: {
|
|
82
84
|
tags: {
|
|
@@ -85,12 +87,12 @@ declare function getAssetFormSchema(locales?: {
|
|
|
85
87
|
}[] | null;
|
|
86
88
|
};
|
|
87
89
|
};
|
|
90
|
+
originalFilename: string;
|
|
88
91
|
title?: string | z.objectOutputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
89
|
-
altText?: string | z.objectOutputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
90
|
-
description?: string | z.objectOutputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
91
|
-
creditLine?: string | z.objectOutputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
92
92
|
}, {
|
|
93
|
-
|
|
93
|
+
altText?: string | z.objectInputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
94
|
+
creditLine?: string | z.objectInputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
95
|
+
description?: string | z.objectInputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
94
96
|
opt: {
|
|
95
97
|
media: {
|
|
96
98
|
tags: {
|
|
@@ -99,10 +101,8 @@ declare function getAssetFormSchema(locales?: {
|
|
|
99
101
|
}[] | null;
|
|
100
102
|
};
|
|
101
103
|
};
|
|
104
|
+
originalFilename: string;
|
|
102
105
|
title?: string | z.objectInputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
103
|
-
altText?: string | z.objectInputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
104
|
-
description?: string | z.objectInputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
105
|
-
creditLine?: string | z.objectInputType<Record<string, z.ZodTypeAny>, z.ZodTypeAny, "passthrough"> | undefined;
|
|
106
106
|
}>;
|
|
107
107
|
type MediaTagsOptions = {
|
|
108
108
|
mediaTags?: string[];
|
|
@@ -158,10 +158,10 @@ type SanityReference = {
|
|
|
158
158
|
};
|
|
159
159
|
type TagSelectOption = z.infer<typeof tagOptionSchema>;
|
|
160
160
|
declare const mediaAssetSource: {
|
|
161
|
-
component: (props: import("sanity").AssetSourceComponentProps) => import("react").JSX.Element;
|
|
162
161
|
icon: typeof ImageIcon;
|
|
163
162
|
name: string;
|
|
164
163
|
title: string;
|
|
164
|
+
component: (props: import("sanity").AssetSourceComponentProps) => import("react").JSX.Element;
|
|
165
165
|
};
|
|
166
166
|
declare const media: import("sanity").Plugin<void | MediaToolOptions>;
|
|
167
167
|
type AutoTagInputProps = InputProps & {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/DialogAssetEdit/Details.tsx","../src/formSchema/index.ts","../src/types/index.ts","../src/plugin.tsx","../src/components/AutoTagInputWrapper/index.tsx","../src/utils/mediaField.ts"],"mappings":";;;;;;KAqBY,YAAA;EACV,YAAA;EACA,eAAA,GAAkB,KAAA;EAClB,O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UAAA,GAAa,eAAA;AAAA;AAAA,KAqBL,eAAA;EACV,IAAA;EACA,KAAA;EACA,KAAA;AAAA;AAAA,KAuIU,eAAA,GAAkB,CAAA,CAAE,KAAK,QAAQ,eAAA;AAAA,cC3ThC,gBAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/DialogAssetEdit/Details.tsx","../src/formSchema/index.ts","../src/types/index.ts","../src/plugin.tsx","../src/components/AutoTagInputWrapper/index.tsx","../src/utils/mediaField.ts"],"mappings":";;;;;;KAqBY,YAAA;EACV,YAAA;EACA,eAAA,GAAkB,KAAA;EAClB,OAAA,EAAS,OAAA,CAAQ,aAAA;EACjB,MAAA,EAAQ,WAAA,CAAY,aAAA;EACpB,QAAA,EAAU,eAAA,CAAgB,aAAA;EAC1B,aAAA,EAAe,eAAA;EACf,eAAA,EAAiB,eAAA;EACjB,YAAA,EAAc,KAAA;EACd,UAAA;IACE,OAAA;IACA,cAAA;EAAA;EAEF,OAAA,GAAU,MAAA;AAAA;AAAA,cCpBC,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;;;;iBAKZ,kBAAA,CAAmB,OAAA;EAAW,EAAA;AAAA,MAAa,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCJ/C,gBAAA;EACV,SAAS;AAAA;AAAA,KAGC,gBAAA;EACV,iBAAA;EACA,kBAAA;EACA,UAAA;IACE,OAAA,GAAU,aAAA,CACR,YAAA;MAAgB,oBAAA,GAAuB,KAAA,EAAO,YAAA,KAAiB,GAAA,CAAI,OAAA;IAAA;EAAA;EAGvE,UAAA;IACE,OAAA;IACA,cAAA;EAAA;EAEF,aAAA;EFTA;;;;EEcA,OAAA,GAAU,MAAA;AAAA;AAAA,KAGA,MAAA;EACV,KAAA;EACA,EAAA;EAAA,CACC,GAAA;AAAA;AAAA,KAGE,eAAA,YAA2B,MAAM;AAA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AAA;EAAA;EACvC,UAAA;IAAa,KAAA,SAAc,YAAA;EAAA;AAAA,IACzB,eAAA,GACJ,iBAAA;;;;;;;;;;;;;;;;;;;;;ALFgB;iBKyBF,UAAA,CAAW,MAAA,EAAQ,qBAAA,GAAwB,qBAAqB;AAAA,iBAChE,UAAA,CAAW,MAAA,EAAQ,oBAAA,GAAuB,oBAAoB"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useClient, useColorSchemeValue, useSchema, Preview, useDocumentStore, W
|
|
|
4
4
|
import { Inline, Button, usePortal, MenuButton, Menu as Menu$2, MenuItem, MenuDivider, Box, studioTheme, Flex, Label, Text, rem, TextInput, Card, MenuGroup, useMediaIndex, Tooltip, Switch, Popover, Stack, Dialog as Dialog$1, TextArea, TabList, Tab, TabPanel, Container as Container$2, Spinner, Checkbox, Grid, useToast, PortalProvider, useLayer, Portal } from "@sanity/ui";
|
|
5
5
|
import { useRef, useCallback, useEffect, createContext, useContext, useMemo, useState, memo, Component } from "react";
|
|
6
6
|
import { isHotkey } from "is-hotkey-esm";
|
|
7
|
-
import {
|
|
7
|
+
import { createGlobalStyle, css, styled } from "styled-components";
|
|
8
8
|
import { useSelector, useDispatch, Provider } from "react-redux";
|
|
9
9
|
import { createAction, createSlice, isAnyOf, createSelector, combineReducers, configureStore } from "@reduxjs/toolkit";
|
|
10
10
|
import pluralize from "pluralize";
|
|
@@ -45,7 +45,7 @@ import { ArrowUpIcon } from "@sanity/icons/ArrowUp";
|
|
|
45
45
|
import { EditIcon } from "@sanity/icons/Edit";
|
|
46
46
|
import { TrashIcon } from "@sanity/icons/Trash";
|
|
47
47
|
import { ComposeIcon } from "@sanity/icons/Compose";
|
|
48
|
-
import {
|
|
48
|
+
import { ArrowRightIcon } from "@sanity/icons/ArrowRight";
|
|
49
49
|
import { UploadIcon } from "@sanity/icons/Upload";
|
|
50
50
|
import { CheckmarkCircleIcon } from "@sanity/icons/CheckmarkCircle";
|
|
51
51
|
import { WarningFilledIcon } from "@sanity/icons/WarningFilled";
|
|
@@ -75,7 +75,7 @@ const useKeyPress = (hotkey, onPress) => {
|
|
|
75
75
|
return context;
|
|
76
76
|
}, useVersionedClient = () => useClient({
|
|
77
77
|
apiVersion: "2025-10-02"
|
|
78
|
-
}), customScrollbar = css
|
|
78
|
+
}), customScrollbar = /* @__PURE__ */ css(["::-webkit-scrollbar{width:14px;}::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid rgba(0,0,0,0);background:var(--card-border-color);background-clip:padding-box;&:hover{background:var(--card-muted-fg-color);background-clip:padding-box;}}"]), GlobalStyle = /* @__PURE__ */ createGlobalStyle([".media__custom-scrollbar{", '}div[data-ui="Box"]{', '}div[data-ui="Dialog"]{background-color:rgba(15,17,18,0.9);}'], customScrollbar, customScrollbar), useTypedSelector = useSelector, ORDER_DICTIONARY = {
|
|
79
79
|
_createdAt: {
|
|
80
80
|
asc: "Last created: Oldest first",
|
|
81
81
|
desc: "Last created: Newest first"
|
|
@@ -1729,7 +1729,7 @@ const Container$1 = /* @__PURE__ */ styled(Box).withConfig({
|
|
|
1729
1729
|
})(({
|
|
1730
1730
|
$scheme,
|
|
1731
1731
|
theme
|
|
1732
|
-
}) => css
|
|
1732
|
+
}) => css(["background:", ";border-radius:", ";"], getSchemeColor($scheme, "bg"), rem(theme.sanity.radius[2]))), SearchFacet = (props) => {
|
|
1733
1733
|
const {
|
|
1734
1734
|
children,
|
|
1735
1735
|
facet
|
|
@@ -1972,7 +1972,7 @@ const Container$1 = /* @__PURE__ */ styled(Box).withConfig({
|
|
|
1972
1972
|
componentId: "sc-cuu8kf-0"
|
|
1973
1973
|
})(({
|
|
1974
1974
|
theme
|
|
1975
|
-
}) => css
|
|
1975
|
+
}) => css(["> *{margin-bottom:", ";}"], rem(theme.sanity.space[2]))), SearchFacets = (props) => {
|
|
1976
1976
|
const {
|
|
1977
1977
|
layout = "inline"
|
|
1978
1978
|
} = props, searchFacets = useTypedSelector((state) => state.search.facets), Items2 = searchFacets.map((facet) => {
|
|
@@ -2308,7 +2308,7 @@ const getAssetResolution = (asset) => `${asset.metadata.dimensions.width}x${asse
|
|
|
2308
2308
|
componentId: "sc-19eu02y-0"
|
|
2309
2309
|
})(({
|
|
2310
2310
|
theme
|
|
2311
|
-
}) => css
|
|
2311
|
+
}) => css(["text{font-family:", " !important;font-size:8px !important;font-weight:500 !important;}"], theme.sanity.fonts.text.family)), FileIcon = (props) => {
|
|
2312
2312
|
const {
|
|
2313
2313
|
extension,
|
|
2314
2314
|
onClick,
|
|
@@ -2347,10 +2347,10 @@ const getAssetResolution = (asset) => `${asset.metadata.dimensions.width}x${asse
|
|
|
2347
2347
|
] }) : content = "No unpublished changes" : content = "There are validation errors that need to be fixed before this document can be published", /* @__PURE__ */ jsx(Tooltip, { animate: !0, content: /* @__PURE__ */ jsx(Box, { padding: 3, style: {
|
|
2348
2348
|
maxWidth: "185px"
|
|
2349
2349
|
}, children: /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: content }) }), disabled: "ontouchstart" in window, placement: "top", portal: !0, children: /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Button, { disabled, fontSize: 1, onClick, text: "Save and close", tone: "primary" }) }) });
|
|
2350
|
-
}, Image$1 = styled.img.withConfig({
|
|
2350
|
+
}, Image$1 = /* @__PURE__ */ styled.img.withConfig({
|
|
2351
2351
|
displayName: "Image",
|
|
2352
2352
|
componentId: "sc-hf3ld2-0"
|
|
2353
|
-
})
|
|
2353
|
+
})(["--checkerboard-color:", ";display:block;width:100%;height:100%;object-fit:contain;", ""], (props) => props.$scheme ? getSchemeColor(props.$scheme, "bg2") : "inherit", (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;"])), {
|
|
2354
2354
|
radius: themeRadius,
|
|
2355
2355
|
space: themeSpace
|
|
2356
2356
|
} = studioTheme, reactSelectStyles = (scheme) => ({
|
|
@@ -3058,13 +3058,13 @@ const DialogAssetEdit = (props) => {
|
|
|
3058
3058
|
]
|
|
3059
3059
|
}
|
|
3060
3060
|
) : null;
|
|
3061
|
-
}, TagContainer = styled(Flex).withConfig({
|
|
3061
|
+
}, TagContainer = /* @__PURE__ */ styled(Flex).withConfig({
|
|
3062
3062
|
displayName: "TagContainer",
|
|
3063
3063
|
componentId: "sc-sujhn-0"
|
|
3064
|
-
})
|
|
3064
|
+
})(["height:", "px;"], PANEL_HEIGHT), ButtonContainer = /* @__PURE__ */ styled(Flex).withConfig({
|
|
3065
3065
|
displayName: "ButtonContainer",
|
|
3066
3066
|
componentId: "sc-sujhn-1"
|
|
3067
|
-
})
|
|
3067
|
+
})(["@media (pointer:fine){visibility:hidden;}@media (hover:hover) and (pointer:fine){", ":hover &{visibility:visible;}}"], TagContainer), TagButton = (props) => {
|
|
3068
3068
|
const {
|
|
3069
3069
|
disabled,
|
|
3070
3070
|
icon,
|
|
@@ -3276,7 +3276,7 @@ const DialogAssetEdit = (props) => {
|
|
|
3276
3276
|
selectedDocument && /* @__PURE__ */ jsx(Box, { display: ["none", "none", "block"], children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
3277
3277
|
/* @__PURE__ */ jsx("span", { style: {
|
|
3278
3278
|
margin: "0 0.5em"
|
|
3279
|
-
}, children: /* @__PURE__ */ jsx(
|
|
3279
|
+
}, children: /* @__PURE__ */ jsx(ArrowRightIcon, {}) }),
|
|
3280
3280
|
/* @__PURE__ */ jsx("span", { style: {
|
|
3281
3281
|
textTransform: "capitalize"
|
|
3282
3282
|
}, children: selectedDocument._type })
|
|
@@ -3324,22 +3324,22 @@ const DialogAssetEdit = (props) => {
|
|
|
3324
3324
|
id,
|
|
3325
3325
|
type: "upload"
|
|
3326
3326
|
})), ...assetItems];
|
|
3327
|
-
}), CardWrapper$1 = styled(Flex).withConfig({
|
|
3327
|
+
}), CardWrapper$1 = /* @__PURE__ */ styled(Flex).withConfig({
|
|
3328
3328
|
displayName: "CardWrapper",
|
|
3329
3329
|
componentId: "sc-88amzd-0"
|
|
3330
|
-
})
|
|
3330
|
+
})(["box-sizing:border-box;height:100%;overflow:hidden;position:relative;width:100%;"]), CardContainer = /* @__PURE__ */ styled(Flex).withConfig({
|
|
3331
3331
|
displayName: "CardContainer",
|
|
3332
3332
|
componentId: "sc-88amzd-1"
|
|
3333
3333
|
})(({
|
|
3334
3334
|
$picked,
|
|
3335
3335
|
theme,
|
|
3336
3336
|
$updating
|
|
3337
|
-
}) => css
|
|
3337
|
+
}) => css(["border:1px solid transparent;height:100%;pointer-events:", ";position:relative;transition:all 300ms;user-select:none;width:100%;border:", ";", ""], $updating ? "none" : "auto", $picked ? `1px solid ${theme.sanity.color.spot.orange} !important` : "1px solid inherit", !$updating && css(["@media (hover:hover) and (pointer:fine){&:hover{border:1px solid var(--card-border-color);}}"]))), ContextActionContainer$2 = /* @__PURE__ */ styled(Flex).withConfig({
|
|
3338
3338
|
displayName: "ContextActionContainer",
|
|
3339
3339
|
componentId: "sc-88amzd-2"
|
|
3340
3340
|
})(({
|
|
3341
3341
|
$scheme
|
|
3342
|
-
}) => css
|
|
3342
|
+
}) => css(["cursor:pointer;height:", "px;transition:all 300ms;@media (hover:hover) and (pointer:fine){&:hover{background:", ";}}"], PANEL_HEIGHT, getSchemeColor($scheme, "bg"))), StyledWarningOutlineIcon = /* @__PURE__ */ styled(WarningFilledIcon).withConfig({
|
|
3343
3343
|
displayName: "StyledWarningOutlineIcon",
|
|
3344
3344
|
componentId: "sc-88amzd-3"
|
|
3345
3345
|
})(({
|
|
@@ -3670,10 +3670,10 @@ const createThrottler = (concurrency = DEFAULT_CONCURRENCY) => {
|
|
|
3670
3670
|
...uploadsSlice.actions
|
|
3671
3671
|
};
|
|
3672
3672
|
var uploadsReducer = uploadsSlice.reducer;
|
|
3673
|
-
const CardWrapper = styled(Flex).withConfig({
|
|
3673
|
+
const CardWrapper = /* @__PURE__ */ styled(Flex).withConfig({
|
|
3674
3674
|
displayName: "CardWrapper",
|
|
3675
3675
|
componentId: "sc-11n35er-0"
|
|
3676
|
-
})
|
|
3676
|
+
})(["box-sizing:border-box;height:100%;overflow:hidden;position:relative;width:100%;"]), CardUpload = (props) => {
|
|
3677
3677
|
const {
|
|
3678
3678
|
id
|
|
3679
3679
|
} = props, scheme = useColorSchemeValue(), dispatch = useDispatch(), item = useTypedSelector((state) => selectUploadById(state, id));
|
|
@@ -3745,20 +3745,20 @@ const CardWrapper = styled(Flex).withConfig({
|
|
|
3745
3745
|
}, CARD_HEIGHT = 220, CARD_WIDTH = 240, VirtualCell = memo(({
|
|
3746
3746
|
item,
|
|
3747
3747
|
selected
|
|
3748
|
-
}) => item?.type === "asset" ? /* @__PURE__ */ jsx(CardAsset, { id: item.id, selected }) : item?.type === "upload" ? /* @__PURE__ */ jsx(CardUpload, { id: item.id }) : null), StyledItemContainer = styled.div.withConfig({
|
|
3748
|
+
}) => item?.type === "asset" ? /* @__PURE__ */ jsx(CardAsset, { id: item.id, selected }) : item?.type === "upload" ? /* @__PURE__ */ jsx(CardUpload, { id: item.id }) : null), StyledItemContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
3749
3749
|
displayName: "StyledItemContainer",
|
|
3750
3750
|
componentId: "sc-9owt7i-0"
|
|
3751
|
-
})
|
|
3751
|
+
})(["height:", "px;width:", "px;"], CARD_HEIGHT, CARD_WIDTH), ItemContainer = (props) => {
|
|
3752
3752
|
const {
|
|
3753
3753
|
context,
|
|
3754
3754
|
ref,
|
|
3755
3755
|
...rest
|
|
3756
3756
|
} = props;
|
|
3757
3757
|
return /* @__PURE__ */ jsx(StyledItemContainer, { ref, ...rest });
|
|
3758
|
-
}, StyledListContainer = styled.div.withConfig({
|
|
3758
|
+
}, StyledListContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
3759
3759
|
displayName: "StyledListContainer",
|
|
3760
3760
|
componentId: "sc-9owt7i-1"
|
|
3761
|
-
})
|
|
3761
|
+
})(["display:grid;grid-template-columns:repeat(auto-fill,", "px);grid-template-rows:repeat(auto-fill,", "px);justify-content:center;margin:0 auto;"], CARD_WIDTH, CARD_HEIGHT), ListContainer = (props) => {
|
|
3762
3762
|
const {
|
|
3763
3763
|
context,
|
|
3764
3764
|
ref,
|
|
@@ -3818,7 +3818,7 @@ const CardWrapper = styled(Flex).withConfig({
|
|
|
3818
3818
|
componentId: "sc-i9fhtm-0"
|
|
3819
3819
|
})(({
|
|
3820
3820
|
$scheme
|
|
3821
|
-
}) => css
|
|
3821
|
+
}) => css(["cursor:pointer;@media (hover:hover) and (pointer:fine){&:hover{background:", ";}}"], getSchemeColor($scheme, "bg"))), TableHeader = () => {
|
|
3822
3822
|
const scheme = useColorSchemeValue(), dispatch = useDispatch(), fetching = useTypedSelector((state) => state.assets.fetching), itemsLength = useTypedSelector(selectAssetsLength), numPickedAssets = useTypedSelector(selectAssetsPickedLength), mediaIndex = useMediaIndex(), {
|
|
3823
3823
|
onSelect
|
|
3824
3824
|
} = useAssetSourceActions(), allSelected = numPickedAssets === itemsLength, handleContextActionClick = (e) => {
|
|
@@ -3864,12 +3864,12 @@ const CardWrapper = styled(Flex).withConfig({
|
|
|
3864
3864
|
$scheme,
|
|
3865
3865
|
$selected,
|
|
3866
3866
|
$updating
|
|
3867
|
-
}) => css
|
|
3867
|
+
}) => css(["align-items:center;cursor:", ";height:100%;pointer-events:", ";user-select:none;white-space:nowrap;", ""], $selected ? "default" : "pointer", $updating ? "none" : "auto", !$updating && css(["@media (hover:hover) and (pointer:fine){&:hover{background:", ";}}"], getSchemeColor($scheme, "bg")))), ContextActionContainer = /* @__PURE__ */ styled(Flex).withConfig({
|
|
3868
3868
|
displayName: "ContextActionContainer",
|
|
3869
3869
|
componentId: "sc-1nb1qw9-1"
|
|
3870
3870
|
})(({
|
|
3871
3871
|
$scheme
|
|
3872
|
-
}) => css
|
|
3872
|
+
}) => css(["cursor:pointer;@media (hover:hover) and (pointer:fine){&:hover{background:", ";}}"], getSchemeColor($scheme, "bg2"))), StyledWarningIcon = /* @__PURE__ */ styled(WarningFilledIcon).withConfig({
|
|
3873
3873
|
displayName: "StyledWarningIcon",
|
|
3874
3874
|
componentId: "sc-1nb1qw9-2"
|
|
3875
3875
|
})(({
|
|
@@ -4373,13 +4373,13 @@ const TagsPanel = () => useTypedSelector((state) => state.tags.panelVisible) ? /
|
|
|
4373
4373
|
right: 0,
|
|
4374
4374
|
top: 0,
|
|
4375
4375
|
width: "100%"
|
|
4376
|
-
}, children: /* @__PURE__ */ jsx(TagView, {}) }) }) : null, UploadContainer = styled.div.withConfig({
|
|
4376
|
+
}, children: /* @__PURE__ */ jsx(TagView, {}) }) }) : null, UploadContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
4377
4377
|
displayName: "UploadContainer",
|
|
4378
4378
|
componentId: "sc-1wiv2t5-0"
|
|
4379
|
-
})
|
|
4379
|
+
})(["color:white;height:100%;min-height:100%;right:0;top:0;width:100%;&:focus{outline:none;}"]), DragActiveContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
4380
4380
|
displayName: "DragActiveContainer",
|
|
4381
4381
|
componentId: "sc-1wiv2t5-1"
|
|
4382
|
-
})
|
|
4382
|
+
})(["align-items:center;background:rgba(0,0,0,0.75);display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;width:100%;z-index:3;"]);
|
|
4383
4383
|
async function filterFiles(fileList) {
|
|
4384
4384
|
const files = Array.from(fileList), filteredFiles = [];
|
|
4385
4385
|
for (const file of files)
|