sanity-plugin-media 6.1.4 → 6.1.5
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.map +1 -1
- package/dist/index.js +46 -46
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/FormBuilderTool/index.tsx","../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":";;;;;;;;cAQM,kBAAe,OAAW,8CAAyB,IAAA;KCsB7C;EACV;EACA,kBAAkB;EAClB,SAAS,QAAQ;EACjB,QAAQ,YAAY;EACpB,UAAU,gBAAgB;EAC1B,eAAe;EACf,iBAAiB;EACjB,cAAc;EACd;EACA;EACA;EACA;EACA;IACE;IACA;;EAEF,UAAU;;cCjCC,iBAAe,EAAA;;;;;;;;;;iBAKZ,mBAAmB;EAAW;MAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCJ/C;EACV;;KAGU;EACV;EACA;EACA;IACE,UAAU,cACR;MAAgB,uBAAuB,OAAO,iBAAiB,IAAI;;;EAGvE;IACE;IACA;;EAEF;;;;;;;EAOA;;;;;EAKA,UAAU;;KAGA;EACV;EACA;GACC;;KAGE,2BAA2B;KAE3B;EACH,UAAU;EACV,cAAc;EACd;IACE;MACE,SAAS;MACT,OAAO;;;EAGX,QAAQ;;KAYE,QAAQ,YAAY;KAEpB,gBAAgB,EAAE,MAAM,kBAAkB;KAgJ1C,YAAY,sBACtB;EACE;;KAuBQ,aAAa,2BACvB;EACE;EACA,aAAa;;KAqBL;EACV;EACA;EACA;;KA0IU,kBAAkB,EAAE,aAAa;cCzYhC;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/FormBuilderTool/index.tsx","../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":";;;;;;;;cAQM,kBAAe,OAAW,8CAAyB,IAAA;KCsB7C;EACV;EACA,kBAAkB;EAClB,SAAS,QAAQ;EACjB,QAAQ,YAAY;EACpB,UAAU,gBAAgB;EAC1B,eAAe;EACf,iBAAiB;EACjB,cAAc;EACd;EACA;EACA;EACA;EACA;IACE;IACA;;EAEF,UAAU;;cCjCC,iBAAe,EAAA;;;;;;;;;;iBAKZ,mBAAmB;EAAW;MAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCJ/C;EACV;;KAGU;EACV;EACA;EACA;IACE,UAAU,cACR;MAAgB,uBAAuB,OAAO,iBAAiB,IAAI;;;EAGvE;IACE;IACA;;EAEF;;;;;;;EAOA;;;;;EAKA,UAAU;;KAGA;EACV;EACA;GACC;;KAGE,2BAA2B;KAE3B;EACH,UAAU;EACV,cAAc;EACd;IACE;MACE,SAAS;MACT,OAAO;;;EAGX,QAAQ;;KAYE,QAAQ,YAAY;KAEpB,gBAAgB,EAAE,MAAM,kBAAkB;KAgJ1C,YAAY,sBACtB;EACE;;KAuBQ,aAAa,2BACvB;EACE;EACA,aAAa;;KAqBL;EACV;EACA;EACA;;KA0IU,kBAAkB,EAAE,aAAa;cCzYhC;;;;;;cAmBA,wBAAK,cAAA;KCrBN,oBAAoB;EAC9B;;;;;;;;;;;;;;;;;;;;;iBAsBc,aAAa,OAAO,oCAAiB,IAAA;KC7BhD,wBAAwB,KAAK,8BAChC;EACE;EACA;EACA,UAAU;;KAGT,uBAAuB,KAAK,6BAC/B;EACE;EACA;EACA,UAAU;;KAGT,wBAAwB,KAAK,8BAChC;EACE,UAAU;IAA8B;;EACxC;IAAa,cAAc;;IACzB,kBACJ;KAEG,uBAAuB,KAAK,6BAC/B;EACE,UAAU;IAA6B;;EACvC;IAAa,cAAc;;IACzB,kBACJ;;;;;;;;;;;;;;;;;;;;;;iBAuBc,WAAW,QAAQ,wBAAwB;iBAC3C,WAAW,QAAQ,uBAAuB"}
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { combineReducers, configureStore, createAction, createSelector, createSl
|
|
|
11
11
|
import groq from "groq";
|
|
12
12
|
import { nanoid } from "nanoid";
|
|
13
13
|
import { combineEpics, createEpicMiddleware, ofType } from "redux-observable";
|
|
14
|
-
import { EMPTY, Observable, Subject,
|
|
14
|
+
import { EMPTY, Observable, Subject, from, iif, merge, of, throwError } from "rxjs";
|
|
15
15
|
import { bufferTime, catchError, concatMap, debounceTime, delay, filter, first, map, mergeMap, switchMap, takeUntil, withLatestFrom } from "rxjs/operators";
|
|
16
16
|
import { uuid } from "@sanity/uuid";
|
|
17
17
|
import pluralize from "pluralize";
|
|
@@ -494,10 +494,10 @@ const useTypedSelector = useSelector, useVersionedClient = () => {
|
|
|
494
494
|
SMALL: "3rem 100px auto 1.5rem",
|
|
495
495
|
LARGE: "3rem 100px auto 5.5rem 5.5rem 3.5rem 8.5rem 4.75rem 2rem"
|
|
496
496
|
}, FOLDER_DOCUMENT_NAME = "media.folder", TAG_DOCUMENT_NAME = "media.tag", debugThrottle = (throttled) => function(source) {
|
|
497
|
-
return iif(() => !!throttled, source.pipe(delay(3e3), mergeMap((v) => Math.random() > .5 ? throwError({
|
|
497
|
+
return iif(() => !!throttled, source.pipe(delay(3e3), mergeMap((v) => Math.random() > .5 ? throwError(() => ({
|
|
498
498
|
message: "Test error",
|
|
499
499
|
statusCode: 500
|
|
500
|
-
}) : of(v))), source);
|
|
500
|
+
})) : of(v))), source);
|
|
501
501
|
}, buildExcludeTagsFragment = (excludeTagSlugs) => {
|
|
502
502
|
let serializedExcludeTagSlugs = excludeTagSlugs?.length ? JSON.stringify(excludeTagSlugs) : void 0;
|
|
503
503
|
return serializedExcludeTagSlugs ? groq`!(defined(opt.media.tags) && count(opt.media.tags[@._ref in *[_type == "${TAG_DOCUMENT_NAME}" && name.current in ${serializedExcludeTagSlugs}]._id]) > 0)` : void 0;
|
|
@@ -555,10 +555,10 @@ function repointNestedImages(node, newAsset, assetToReplaceId, topLevelField, ma
|
|
|
555
555
|
for (let [key, value] of Object.entries(node)) typeof value == "object" && value && repointNestedImages(value, newAsset, assetToReplaceId, topLevelField || key, matchedTopLevelFields);
|
|
556
556
|
}
|
|
557
557
|
const checkTagName = (client, name) => function(source) {
|
|
558
|
-
return source.pipe(mergeMap(() => from(client.fetch(groq`count(*[_type == "${TAG_DOCUMENT_NAME}" && name.current == $name])`, { name }))), mergeMap((existingTagCount) => existingTagCount > 0 ? throwError({
|
|
558
|
+
return source.pipe(mergeMap(() => from(client.fetch(groq`count(*[_type == "${TAG_DOCUMENT_NAME}" && name.current == $name])`, { name }))), mergeMap((existingTagCount) => existingTagCount > 0 ? throwError(() => ({
|
|
559
559
|
message: "Tag already exists",
|
|
560
560
|
statusCode: 409
|
|
561
|
-
}) : of(!0)));
|
|
561
|
+
})) : of(!0)));
|
|
562
562
|
}, getTagSelectOptions = (tags) => tags.reduce((acc, val) => {
|
|
563
563
|
let tag = val?.tag;
|
|
564
564
|
return tag && acc.push({
|
|
@@ -2110,7 +2110,7 @@ const ButtonAssetCopy = (t0) => {
|
|
|
2110
2110
|
}), $[2] = doc, $[3] = onClick, $[4] = schemaType, $[5] = t1) : t1 = $[5], t1;
|
|
2111
2111
|
}, Container$2 = /* @__PURE__ */ styled(Box).withConfig({
|
|
2112
2112
|
displayName: "Container",
|
|
2113
|
-
componentId: "sc-
|
|
2113
|
+
componentId: "sc-ov4bwf-0"
|
|
2114
2114
|
})(({ theme }) => css`text{font-family:${theme.sanity.fonts.text.family} !important;font-size:8px !important;font-weight:500 !important;}`), FileIcon$1 = (props) => {
|
|
2115
2115
|
let $ = c(11), { extension, onClick, width } = props, t0;
|
|
2116
2116
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = { height: "100%" }, $[0] = t0) : t0 = $[0];
|
|
@@ -2217,7 +2217,7 @@ const ButtonAssetCopy = (t0) => {
|
|
|
2217
2217
|
portal: !0,
|
|
2218
2218
|
children: t2
|
|
2219
2219
|
}), $[11] = t1, $[12] = t2, $[13] = t3) : t3 = $[13], t3;
|
|
2220
|
-
}, SCHEME_COLORS = {
|
|
2220
|
+
}, { color: themeColor } = studioTheme, SCHEME_COLORS = {
|
|
2221
2221
|
bg: {
|
|
2222
2222
|
dark: hues.gray[950].hex,
|
|
2223
2223
|
light: hues.gray[50].hex
|
|
@@ -2227,28 +2227,28 @@ const ButtonAssetCopy = (t0) => {
|
|
|
2227
2227
|
light: hues.gray[100].hex
|
|
2228
2228
|
},
|
|
2229
2229
|
inputEnabledBorder: {
|
|
2230
|
-
dark:
|
|
2231
|
-
light:
|
|
2230
|
+
dark: themeColor.dark.default.input.default.enabled.border,
|
|
2231
|
+
light: themeColor.light.default.input.default.enabled.border
|
|
2232
2232
|
},
|
|
2233
2233
|
inputHoveredBorder: {
|
|
2234
|
-
dark:
|
|
2235
|
-
light:
|
|
2234
|
+
dark: themeColor.dark.default.input.default.hovered.border,
|
|
2235
|
+
light: themeColor.light.default.input.default.hovered.border
|
|
2236
2236
|
},
|
|
2237
2237
|
mutedHoveredBg: {
|
|
2238
|
-
dark:
|
|
2239
|
-
light:
|
|
2238
|
+
dark: themeColor.dark.primary.muted.primary.hovered.bg,
|
|
2239
|
+
light: themeColor.light.primary.muted.primary.hovered.bg
|
|
2240
2240
|
},
|
|
2241
2241
|
mutedHoveredFg: {
|
|
2242
|
-
dark:
|
|
2243
|
-
light:
|
|
2242
|
+
dark: themeColor.dark.primary.muted.primary.hovered.fg,
|
|
2243
|
+
light: themeColor.light.primary.muted.primary.hovered.fg
|
|
2244
2244
|
},
|
|
2245
2245
|
mutedSelectedBg: {
|
|
2246
|
-
dark:
|
|
2247
|
-
light:
|
|
2246
|
+
dark: themeColor.dark.primary.muted.primary.selected.bg,
|
|
2247
|
+
light: themeColor.light.primary.muted.primary.selected.bg
|
|
2248
2248
|
},
|
|
2249
2249
|
spotBlue: {
|
|
2250
|
-
dark:
|
|
2251
|
-
light:
|
|
2250
|
+
dark: themeColor.dark.primary.spot.blue,
|
|
2251
|
+
light: themeColor.light.primary.spot.blue
|
|
2252
2252
|
}
|
|
2253
2253
|
};
|
|
2254
2254
|
function getSchemeColor(scheme, colorKey) {
|
|
@@ -2256,10 +2256,10 @@ function getSchemeColor(scheme, colorKey) {
|
|
|
2256
2256
|
}
|
|
2257
2257
|
const Image$1 = styled.img.attrs({ crossOrigin: "anonymous" }).withConfig({
|
|
2258
2258
|
displayName: "Image",
|
|
2259
|
-
componentId: "sc-
|
|
2259
|
+
componentId: "sc-nu8r0m-0"
|
|
2260
2260
|
})`--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({
|
|
2261
2261
|
displayName: "StyledErrorOutlineIcon",
|
|
2262
|
-
componentId: "sc-
|
|
2262
|
+
componentId: "sc-ec70oi-0"
|
|
2263
2263
|
})(({ theme }) => ({ color: theme.sanity.color.spot.red })), FormFieldInputLabel = (props) => {
|
|
2264
2264
|
let $ = c(14), { description, error, label, name } = props, t0;
|
|
2265
2265
|
$[0] !== label || $[1] !== name ? (t0 = /* @__PURE__ */ jsx(Text, {
|
|
@@ -3245,16 +3245,16 @@ const selectCombinedItems = createSelector([
|
|
|
3245
3245
|
}), t3 = [downHandler, upHandler], $[4] = downHandler, $[5] = t2, $[6] = t3), useEffect(t2, t3), keyPressed;
|
|
3246
3246
|
}, CardWrapper$2 = styled(Flex).withConfig({
|
|
3247
3247
|
displayName: "CardWrapper",
|
|
3248
|
-
componentId: "sc-
|
|
3248
|
+
componentId: "sc-e6odx5-0"
|
|
3249
3249
|
})`box-sizing:border-box;height:100%;overflow:hidden;position:relative;width:100%;`, CardContainer = /* @__PURE__ */ styled(Flex).withConfig({
|
|
3250
3250
|
displayName: "CardContainer",
|
|
3251
|
-
componentId: "sc-
|
|
3251
|
+
componentId: "sc-e6odx5-1"
|
|
3252
3252
|
})(({ $picked, theme, $updating }) => css`border:1px solid transparent;height:100%;pointer-events:${$updating ? "none" : "auto"};position:relative;transition:all 300ms;user-select:none;width:100%;border:${$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({
|
|
3253
3253
|
displayName: "ContextActionContainer",
|
|
3254
|
-
componentId: "sc-
|
|
3254
|
+
componentId: "sc-e6odx5-2"
|
|
3255
3255
|
})(({ $scheme }) => css`cursor:pointer;height:${32}px;transition:all 300ms;@media (hover:hover) and (pointer:fine){&:hover{background:${getSchemeColor($scheme, "bg")};}}`), StyledWarningOutlineIcon = /* @__PURE__ */ styled(WarningFilledIcon).withConfig({
|
|
3256
3256
|
displayName: "StyledWarningOutlineIcon",
|
|
3257
|
-
componentId: "sc-
|
|
3257
|
+
componentId: "sc-e6odx5-3"
|
|
3258
3258
|
})(({ theme }) => ({ color: theme.sanity.color.spot.red })), CardAsset = (props) => {
|
|
3259
3259
|
let $ = c(83), { id, selected, source } = props, scheme = useColorSchemeValue(), toast = useToast(), shiftPressed = useKeyPress("shift"), dispatch = useDispatch(), lastPicked = useTypedSelector(_temp$34), assetsPicked = useTypedSelector(selectAssetsPicked), t0;
|
|
3260
3260
|
$[0] === id ? t0 = $[1] : (t0 = (state_0) => selectAssetById(state_0, id), $[0] = id, $[1] = t0);
|
|
@@ -3475,13 +3475,13 @@ function _temp2$20(d) {
|
|
|
3475
3475
|
}
|
|
3476
3476
|
const CardWrapper$1 = styled(Flex).withConfig({
|
|
3477
3477
|
displayName: "CardWrapper",
|
|
3478
|
-
componentId: "sc-
|
|
3478
|
+
componentId: "sc-l04v0k-0"
|
|
3479
3479
|
})`box-sizing:border-box;height:100%;overflow:hidden;position:relative;width:100%;`, FolderCard = styled(Card).withConfig({
|
|
3480
3480
|
displayName: "FolderCard",
|
|
3481
|
-
componentId: "sc-
|
|
3481
|
+
componentId: "sc-l04v0k-1"
|
|
3482
3482
|
})`cursor:pointer;height:100%;transition:border-color 200ms ease;width:100%;@media (hover:hover) and (pointer:fine){&:hover{border-color:var(--card-border-color);}}`, FolderGlyph = /* @__PURE__ */ styled(Box).withConfig({
|
|
3483
3483
|
displayName: "FolderGlyph",
|
|
3484
|
-
componentId: "sc-
|
|
3484
|
+
componentId: "sc-l04v0k-2"
|
|
3485
3485
|
})(({ theme }) => css`align-items:flex-end;background:linear-gradient( 180deg,${theme.sanity.color.spot.yellow} 0%,${theme.sanity.color.spot.yellow} 100% );border-radius:8px;display:flex;height:72px;position:relative;width:96px;&::before{background:${theme.sanity.color.spot.yellow};border-radius:8px 8px 0 0;content:'';height:18px;left:0;position:absolute;top:-8px;width:38px;}`), CardFolder = (t0) => {
|
|
3486
3486
|
let $ = c(22), { folderId, name, totalCount } = t0, dispatch = useDispatch(), scheme = useColorSchemeValue(), t1;
|
|
3487
3487
|
$[0] !== dispatch || $[1] !== folderId ? (t1 = () => dispatch(foldersActions.currentFolderSet({ folderId })), $[0] = dispatch, $[1] = folderId, $[2] = t1) : t1 = $[2];
|
|
@@ -3598,13 +3598,13 @@ const createThrottler = (concurrency = 4) => {
|
|
|
3598
3598
|
}, reader.readAsArrayBuffer(file), () => {
|
|
3599
3599
|
reader.abort();
|
|
3600
3600
|
};
|
|
3601
|
-
}), hexFromBuffer = (buffer) => Array.prototype.map.call(new Uint8Array(buffer), (x) => `00${x.toString(16)}`.slice(-2)).join(""), hashFile$ = (file) => !window.crypto || !window.crypto.subtle || !window.FileReader ? throwError({
|
|
3601
|
+
}), hexFromBuffer = (buffer) => Array.prototype.map.call(new Uint8Array(buffer), (x) => `00${x.toString(16)}`.slice(-2)).join(""), hashFile$ = (file) => !window.crypto || !window.crypto.subtle || !window.FileReader ? throwError(() => ({
|
|
3602
3602
|
message: "Unable to generate hash: uploads are only allowed in secure contexts",
|
|
3603
3603
|
statusCode: 500
|
|
3604
|
-
}) : readFile$(file).pipe(mergeMap((arrayBuffer) => window.crypto.subtle.digest("SHA-1", arrayBuffer)), map(hexFromBuffer)), uploadSanityAsset$ = (client, assetType, file, hash) => of(null).pipe(mergeMap(() => fetchExisting$(client, `sanity.${assetType}Asset`, hash)), mergeMap((existingAsset) => existingAsset ? throwError({
|
|
3604
|
+
})) : readFile$(file).pipe(mergeMap((arrayBuffer) => window.crypto.subtle.digest("SHA-1", arrayBuffer)), map(hexFromBuffer)), uploadSanityAsset$ = (client, assetType, file, hash) => of(null).pipe(mergeMap(() => fetchExisting$(client, `sanity.${assetType}Asset`, hash)), mergeMap((existingAsset) => existingAsset ? throwError(() => ({
|
|
3605
3605
|
message: "Asset already exists",
|
|
3606
3606
|
statusCode: 409
|
|
3607
|
-
}) : of(null)), mergeMap(() => client.observable.assets.upload(assetType, file, {
|
|
3607
|
+
})) : of(null)), mergeMap(() => client.observable.assets.upload(assetType, file, {
|
|
3608
3608
|
extract: [
|
|
3609
3609
|
"blurhash",
|
|
3610
3610
|
"exif",
|
|
@@ -3681,7 +3681,7 @@ const createThrottler = (concurrency = 4) => {
|
|
|
3681
3681
|
return event?.type === "progress" && event?.stage === "upload" ? of(uploadsActions.uploadProgress({
|
|
3682
3682
|
event,
|
|
3683
3683
|
uploadHash: uploadItem.hash
|
|
3684
|
-
})) :
|
|
3684
|
+
})) : EMPTY;
|
|
3685
3685
|
}), catchError((error) => of(uploadsActions.uploadError({
|
|
3686
3686
|
error: {
|
|
3687
3687
|
message: error?.message || "Internal error",
|
|
@@ -4819,7 +4819,7 @@ const DialogFolders = (props) => {
|
|
|
4819
4819
|
}), $[3] = children, $[4] = handleClose, $[5] = id, $[6] = t3) : t3 = $[6], t3;
|
|
4820
4820
|
}, Container$1 = /* @__PURE__ */ styled(Box).withConfig({
|
|
4821
4821
|
displayName: "Container",
|
|
4822
|
-
componentId: "sc-
|
|
4822
|
+
componentId: "sc-iuc26f-0"
|
|
4823
4823
|
})(({ $scheme, theme }) => css`background:${getSchemeColor($scheme, "bg")};border-radius:${rem(theme.sanity.radius[2])};`), SearchFacet = (props) => {
|
|
4824
4824
|
let $ = c(22), { children, facet } = props, scheme = useColorSchemeValue(), dispatch = useDispatch(), t0;
|
|
4825
4825
|
$[0] !== dispatch || $[1] !== facet.id ? (t0 = () => {
|
|
@@ -5117,7 +5117,7 @@ const DialogFolders = (props) => {
|
|
|
5117
5117
|
facet,
|
|
5118
5118
|
children: [t3, t4]
|
|
5119
5119
|
}), $[15] = facet, $[16] = t3, $[17] = t4, $[18] = t5) : t5 = $[18], t5;
|
|
5120
|
-
}, { fonts
|
|
5120
|
+
}, { fonts, radius: themeRadius, space: themeSpace } = studioTheme, themeTextSizes = fonts.text.sizes, reactSelectStyles = (scheme) => ({
|
|
5121
5121
|
control: (styles, { isDisabled, isFocused }) => {
|
|
5122
5122
|
let boxShadow = "inset 0 0 0 1px var(--card-border-color)";
|
|
5123
5123
|
return isFocused && (boxShadow = `inset 0 0 0 1px ${getSchemeColor(scheme, "inputEnabledBorder")},
|
|
@@ -5362,7 +5362,7 @@ function _temp3$6() {
|
|
|
5362
5362
|
}
|
|
5363
5363
|
const StackContainer = /* @__PURE__ */ styled(Flex).withConfig({
|
|
5364
5364
|
displayName: "StackContainer",
|
|
5365
|
-
componentId: "sc-
|
|
5365
|
+
componentId: "sc-g9phkp-0"
|
|
5366
5366
|
})(({ theme }) => css`> *{margin-bottom:${rem(theme.sanity.space[2])};}`), SearchFacets = (props) => {
|
|
5367
5367
|
let $ = c(6), { layout: t0 } = props, layout = t0 === void 0 ? "inline" : t0, searchFacets = useTypedSelector(_temp$26), t1;
|
|
5368
5368
|
$[0] === searchFacets ? t1 = $[1] : (t1 = searchFacets.map(_temp2$13), $[0] = searchFacets, $[1] = t1);
|
|
@@ -7118,7 +7118,7 @@ function _temp$8(state) {
|
|
|
7118
7118
|
}
|
|
7119
7119
|
const ContextActionContainer$1 = /* @__PURE__ */ styled(Flex).withConfig({
|
|
7120
7120
|
displayName: "ContextActionContainer",
|
|
7121
|
-
componentId: "sc-
|
|
7121
|
+
componentId: "sc-00jl3m-0"
|
|
7122
7122
|
})(({ $scheme }) => css`cursor:pointer;@media (hover:hover) and (pointer:fine){&:hover{background:${getSchemeColor($scheme, "bg")};}}`), TableHeader = () => {
|
|
7123
7123
|
let $ = c(24), scheme = useColorSchemeValue(), dispatch = useDispatch(), fetching = useTypedSelector(_temp$7), itemsLength = useTypedSelector(selectAssetsLength), numPickedAssets = useTypedSelector(selectAssetsPickedLength), mediaIndex = useMediaIndex(), { onSelect } = useAssetSourceActions(), allSelected = numPickedAssets === itemsLength, t0;
|
|
7124
7124
|
$[0] !== allSelected || $[1] !== dispatch ? (t0 = (e) => {
|
|
@@ -7129,7 +7129,7 @@ const ContextActionContainer$1 = /* @__PURE__ */ styled(Flex).withConfig({
|
|
|
7129
7129
|
alignItems: "center",
|
|
7130
7130
|
background: "var(--card-bg-color)",
|
|
7131
7131
|
borderBottom: "1px solid var(--card-border-color)",
|
|
7132
|
-
|
|
7132
|
+
columnGap: t1,
|
|
7133
7133
|
gridTemplateColumns: GRID_TEMPLATE_COLUMNS.LARGE,
|
|
7134
7134
|
height: t2,
|
|
7135
7135
|
letterSpacing: "0.025em",
|
|
@@ -7194,13 +7194,13 @@ function _temp$7(state) {
|
|
|
7194
7194
|
}
|
|
7195
7195
|
const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
|
|
7196
7196
|
displayName: "ContainerGrid",
|
|
7197
|
-
componentId: "sc-
|
|
7197
|
+
componentId: "sc-phlfmf-0"
|
|
7198
7198
|
})(({ $scheme, $selected, $updating }) => css`align-items:center;cursor:${$selected ? "default" : "pointer"};height:100%;pointer-events:${$updating ? "none" : "auto"};user-select:none;white-space:nowrap;${!$updating && css`@media (hover:hover) and (pointer:fine){&:hover{background:${getSchemeColor($scheme, "bg")};}}`}`), ContextActionContainer = /* @__PURE__ */ styled(Flex).withConfig({
|
|
7199
7199
|
displayName: "ContextActionContainer",
|
|
7200
|
-
componentId: "sc-
|
|
7200
|
+
componentId: "sc-phlfmf-1"
|
|
7201
7201
|
})(({ $scheme }) => css`cursor:pointer;@media (hover:hover) and (pointer:fine){&:hover{background:${getSchemeColor($scheme, "bg2")};}}`), StyledWarningIcon = /* @__PURE__ */ styled(WarningFilledIcon).withConfig({
|
|
7202
7202
|
displayName: "StyledWarningIcon",
|
|
7203
|
-
componentId: "sc-
|
|
7203
|
+
componentId: "sc-phlfmf-2"
|
|
7204
7204
|
})(({ theme }) => ({ color: theme.sanity.color.spot.red })), TableRowAsset = (props) => {
|
|
7205
7205
|
let $ = c(150), { id, selected } = props, scheme = useColorSchemeValue(), shiftPressed = useKeyPress("shift"), [referenceCountVisible, setReferenceCountVisible] = useState(!1), refCountVisibleTimeout = useRef(null), dispatch = useDispatch(), lastPicked = useTypedSelector(_temp$6), t0;
|
|
7206
7206
|
$[0] === id ? t0 = $[1] : (t0 = (state_0) => selectAssetById(state_0, id), $[0] = id, $[1] = t0);
|
|
@@ -7239,8 +7239,8 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
|
|
|
7239
7239
|
}), t4 = [], $[20] = t3, $[21] = t4) : (t3 = $[20], t4 = $[21]), useEffect(t3, t4), !asset) return null;
|
|
7240
7240
|
let t5 = selected ? void 0 : handleClick, t6 = mediaIndex < 3 ? 0 : "16px", t7 = mediaIndex < 3 ? GRID_TEMPLATE_COLUMNS.SMALL : GRID_TEMPLATE_COLUMNS.LARGE, t8 = mediaIndex < 3 ? "auto" : "1fr", t9;
|
|
7241
7241
|
$[22] !== t6 || $[23] !== t7 || $[24] !== t8 ? (t9 = {
|
|
7242
|
-
|
|
7243
|
-
|
|
7242
|
+
columnGap: t6,
|
|
7243
|
+
rowGap: 0,
|
|
7244
7244
|
gridTemplateColumns: t7,
|
|
7245
7245
|
gridTemplateRows: t8
|
|
7246
7246
|
}, $[22] = t6, $[23] = t7, $[24] = t8, $[25] = t9) : t9 = $[25];
|
|
@@ -7565,10 +7565,10 @@ function _temp2$4(t0) {
|
|
|
7565
7565
|
}
|
|
7566
7566
|
const ContainerGrid = /* @__PURE__ */ styled(Grid).withConfig({
|
|
7567
7567
|
displayName: "ContainerGrid",
|
|
7568
|
-
componentId: "sc-
|
|
7568
|
+
componentId: "sc-j0br29-0"
|
|
7569
7569
|
})(({ theme }) => css`align-items:center;cursor:pointer;height:100%;user-select:none;white-space:nowrap;@media (hover:hover) and (pointer:fine){&:hover{background:${theme.sanity.color.card.enabled.bg};}}`), FolderBadge = /* @__PURE__ */ styled(Box).withConfig({
|
|
7570
7570
|
displayName: "FolderBadge",
|
|
7571
|
-
componentId: "sc-
|
|
7571
|
+
componentId: "sc-j0br29-1"
|
|
7572
7572
|
})(({ theme }) => css`background:${theme.sanity.color.spot.yellow};border-radius:6px;height:42px;position:relative;width:52px;&::before{background:${theme.sanity.color.spot.yellow};border-radius:6px 6px 0 0;content:'';height:12px;left:0;position:absolute;top:-6px;width:18px;}`), TableRowFolder = (t0) => {
|
|
7573
7573
|
let $ = c(45), { folderId, name, totalCount } = t0, dispatch = useDispatch(), mediaIndex = useMediaIndex(), scheme = useColorSchemeValue(), t1;
|
|
7574
7574
|
$[0] !== dispatch || $[1] !== folderId ? (t1 = () => dispatch(foldersActions.currentFolderSet({ folderId })), $[0] = dispatch, $[1] = folderId, $[2] = t1) : t1 = $[2];
|
|
@@ -7700,8 +7700,8 @@ const ContainerGrid = /* @__PURE__ */ styled(Grid).withConfig({
|
|
|
7700
7700
|
$[9] !== t3 || $[10] !== t4 || $[11] !== t5 || $[12] !== t6 ? (t7 = {
|
|
7701
7701
|
alignItems: "center",
|
|
7702
7702
|
background: t3,
|
|
7703
|
-
|
|
7704
|
-
|
|
7703
|
+
columnGap: t4,
|
|
7704
|
+
rowGap: 0,
|
|
7705
7705
|
gridTemplateColumns: t5,
|
|
7706
7706
|
gridTemplateRows: t6,
|
|
7707
7707
|
height: "100%",
|