sanity-plugin-media 2.4.0 → 2.4.1

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.
Files changed (59) hide show
  1. package/dist/index.d.mts +7 -2
  2. package/dist/index.d.ts +7 -2
  3. package/dist/index.js +92 -61
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +66 -34
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +6 -6
  8. package/src/components/AssetGridVirtualized/index.tsx +3 -2
  9. package/src/components/AssetMetadata/index.tsx +1 -1
  10. package/src/components/AssetTableVirtualized/index.tsx +1 -1
  11. package/src/components/Browser/index.tsx +1 -1
  12. package/src/components/CardAsset/index.tsx +16 -12
  13. package/src/components/CardUpload/index.tsx +1 -1
  14. package/src/components/DialogAssetEdit/index.tsx +1 -1
  15. package/src/components/DialogConfirm/index.tsx +1 -1
  16. package/src/components/DialogSearchFacets/index.tsx +1 -1
  17. package/src/components/DialogTagCreate/index.tsx +1 -1
  18. package/src/components/DialogTagEdit/index.tsx +1 -1
  19. package/src/components/DialogTags/index.tsx +1 -1
  20. package/src/components/Dialogs/index.tsx +1 -1
  21. package/src/components/FileAssetPreview/index.tsx +1 -1
  22. package/src/components/FileIcon/index.tsx +1 -1
  23. package/src/components/FormFieldInputLabel/index.tsx +1 -1
  24. package/src/components/Image/index.tsx +1 -1
  25. package/src/components/SearchFacet/index.tsx +8 -3
  26. package/src/components/SearchFacetNumber/index.tsx +1 -1
  27. package/src/components/SearchFacetSelect/index.tsx +1 -1
  28. package/src/components/SearchFacetString/index.tsx +1 -1
  29. package/src/components/SearchFacetTags/index.tsx +1 -1
  30. package/src/components/SearchFacets/index.tsx +1 -1
  31. package/src/components/SearchFacetsControl/index.tsx +1 -1
  32. package/src/components/TableHeader/index.tsx +14 -10
  33. package/src/components/TableRowAsset/index.tsx +5 -1
  34. package/src/components/Tag/index.tsx +2 -2
  35. package/src/components/TagsVirtualized/index.tsx +1 -1
  36. package/src/components/UploadDropzone/index.tsx +1 -1
  37. package/src/config/searchFacets.ts +1 -1
  38. package/src/constants.ts +1 -1
  39. package/src/contexts/ToolOptionsContext.tsx +1 -1
  40. package/src/index.ts +1 -1
  41. package/src/modules/assets/index.ts +1 -1
  42. package/src/modules/dialog/index.ts +1 -1
  43. package/src/modules/notifications/index.ts +1 -1
  44. package/src/modules/search/index.ts +1 -1
  45. package/src/modules/selectors.ts +1 -1
  46. package/src/modules/tags/index.ts +1 -1
  47. package/src/modules/uploads/index.ts +1 -1
  48. package/src/operators/checkTagName.ts +1 -1
  49. package/src/plugin.tsx +1 -1
  50. package/src/styled/react-select/creatable.tsx +9 -1
  51. package/src/styled/react-select/single.tsx +8 -1
  52. package/src/types/sanity-ui.d.ts +6 -0
  53. package/src/utils/blocksToText.ts +1 -1
  54. package/src/utils/constructFilter.ts +1 -1
  55. package/src/utils/getAssetResolution.ts +1 -1
  56. package/src/utils/getTagSelectOptions.ts +1 -1
  57. package/src/utils/imageDprUrl.ts +1 -1
  58. package/src/utils/typeGuards.ts +1 -1
  59. package/src/utils/uploadSanityAsset.ts +1 -1
package/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import {AssetSourceComponentProps} from 'sanity'
2
- import {MediaToolOptions} from '@types'
3
2
  import {Plugin as Plugin_2} from 'sanity'
4
3
  import {default as React_2} from 'react'
5
4
 
@@ -14,6 +13,12 @@ export declare const mediaAssetSource: {
14
13
  title: string
15
14
  }
16
15
 
17
- export {MediaToolOptions}
16
+ export declare type MediaToolOptions = {
17
+ maximumUploadSize?: number
18
+ creditLine: {
19
+ enabled: boolean
20
+ excludeSources?: string | string[]
21
+ }
22
+ }
18
23
 
19
24
  export {}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import {AssetSourceComponentProps} from 'sanity'
2
- import {MediaToolOptions} from '@types'
3
2
  import {Plugin as Plugin_2} from 'sanity'
4
3
  import {default as React_2} from 'react'
5
4
 
@@ -14,6 +13,12 @@ export declare const mediaAssetSource: {
14
13
  title: string
15
14
  }
16
15
 
17
- export {MediaToolOptions}
16
+ export declare type MediaToolOptions = {
17
+ maximumUploadSize?: number
18
+ creditLine: {
19
+ enabled: boolean
20
+ excludeSources?: string | string[]
21
+ }
22
+ }
18
23
 
19
24
  export {}
package/dist/index.js CHANGED
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: !0 });
3
- var jsxRuntime = require("react/jsx-runtime"), sanity = require("sanity"), icons = require("@sanity/icons"), ui = require("@sanity/ui"), react = require("react"), isHotkey = require("is-hotkey"), groq = require("groq"), reactRedux = require("react-redux"), toolkit = require("@reduxjs/toolkit"), nanoid = require("nanoid"), reduxObservable = require("redux-observable"), rxjs = require("rxjs"), operators$1 = require("rxjs/operators"), uuid = require("@sanity/uuid"), styled = require("styled-components"), pluralize = require("pluralize"), reactNprogress = require("@tanem/react-nprogress"), color = require("@sanity/color"), Select = require("react-select"), reactVirtuoso = require("react-virtuoso"), zod = require("@hookform/resolvers/zod"), reactHookForm = require("react-hook-form"), z = require("zod"), format = require("date-fns/format"), filesize = require("filesize"), copy = require("copy-to-clipboard"), router = require("sanity/router"), reactFileIcon = require("react-file-icon"), CreatableSelect = require("react-select/creatable"), formatRelative = require("date-fns/formatRelative"), reactDropzone = require("react-dropzone");
3
+ var jsxRuntime = require("react/jsx-runtime"), sanity = require("sanity"), icons = require("@sanity/icons"), ui = require("@sanity/ui"), react = require("react"), isHotkey = require("is-hotkey"), groq = require("groq"), reactRedux = require("react-redux"), toolkit = require("@reduxjs/toolkit"), nanoid = require("nanoid"), reduxObservable = require("redux-observable"), rxjs = require("rxjs"), operators$1 = require("rxjs/operators"), uuid = require("@sanity/uuid"), styledComponents = require("styled-components"), pluralize = require("pluralize"), reactNprogress = require("@tanem/react-nprogress"), color = require("@sanity/color"), Select = require("react-select"), reactVirtuoso = require("react-virtuoso"), zod = require("@hookform/resolvers/zod"), reactHookForm = require("react-hook-form"), z = require("zod"), format = require("date-fns/format"), filesize = require("filesize"), copy = require("copy-to-clipboard"), router = require("sanity/router"), reactFileIcon = require("react-file-icon"), CreatableSelect = require("react-select/creatable"), formatRelative = require("date-fns/formatRelative"), reactDropzone = require("react-dropzone");
4
4
  function _interopDefaultCompat(e) {
5
5
  return e && typeof e == "object" && "default" in e ? e : { default: e };
6
6
  }
7
7
  function _interopNamespaceCompat(e) {
8
- if (e && typeof e == "object" && "default" in e)
9
- return e;
8
+ if (e && typeof e == "object" && "default" in e) return e;
10
9
  var n = /* @__PURE__ */ Object.create(null);
11
10
  return e && Object.keys(e).forEach(function(k) {
12
11
  if (k !== "default") {
@@ -20,7 +19,7 @@ function _interopNamespaceCompat(e) {
20
19
  }
21
20
  }), n.default = e, Object.freeze(n);
22
21
  }
23
- var isHotkey__default = /* @__PURE__ */ _interopDefaultCompat(isHotkey), groq__default = /* @__PURE__ */ _interopDefaultCompat(groq), styled__default = /* @__PURE__ */ _interopDefaultCompat(styled), pluralize__default = /* @__PURE__ */ _interopDefaultCompat(pluralize), Select__default = /* @__PURE__ */ _interopDefaultCompat(Select), z__namespace = /* @__PURE__ */ _interopNamespaceCompat(z), format__default = /* @__PURE__ */ _interopDefaultCompat(format), filesize__default = /* @__PURE__ */ _interopDefaultCompat(filesize), copy__default = /* @__PURE__ */ _interopDefaultCompat(copy), CreatableSelect__default = /* @__PURE__ */ _interopDefaultCompat(CreatableSelect), formatRelative__default = /* @__PURE__ */ _interopDefaultCompat(formatRelative);
22
+ var isHotkey__default = /* @__PURE__ */ _interopDefaultCompat(isHotkey), groq__default = /* @__PURE__ */ _interopDefaultCompat(groq), pluralize__default = /* @__PURE__ */ _interopDefaultCompat(pluralize), Select__default = /* @__PURE__ */ _interopDefaultCompat(Select), z__namespace = /* @__PURE__ */ _interopNamespaceCompat(z), format__default = /* @__PURE__ */ _interopDefaultCompat(format), filesize__default = /* @__PURE__ */ _interopDefaultCompat(filesize), copy__default = /* @__PURE__ */ _interopDefaultCompat(copy), CreatableSelect__default = /* @__PURE__ */ _interopDefaultCompat(CreatableSelect), formatRelative__default = /* @__PURE__ */ _interopDefaultCompat(formatRelative);
24
23
  const useKeyPress = (hotkey, onPress) => {
25
24
  const keyPressed = react.useRef(!1), downHandler = react.useCallback(
26
25
  (e) => {
@@ -1072,7 +1071,7 @@ const UPLOADS_ACTIONS = {
1072
1071
  },
1073
1072
  fetchComplete(state, action) {
1074
1073
  const assets = action.payload?.assets || [];
1075
- assets.forEach((asset) => {
1074
+ assets && assets.forEach((asset) => {
1076
1075
  state.allIds.includes(asset._id) || state.allIds.push(asset._id), state.byIds[asset._id] = {
1077
1076
  _type: "asset",
1078
1077
  asset,
@@ -1470,7 +1469,7 @@ const UPLOADS_ACTIONS = {
1470
1469
  (assetsPicked) => assetsPicked.length
1471
1470
  ), assetsActions = assetsSlice.actions;
1472
1471
  var assetsReducer = assetsSlice.reducer;
1473
- const customScrollbar = styled.css`
1472
+ const customScrollbar = styledComponents.css`
1474
1473
  ::-webkit-scrollbar {
1475
1474
  width: 14px;
1476
1475
  }
@@ -1486,7 +1485,7 @@ const customScrollbar = styled.css`
1486
1485
  background-clip: padding-box;
1487
1486
  }
1488
1487
  }
1489
- `, GlobalStyle = styled.createGlobalStyle`
1488
+ `, GlobalStyle = styledComponents.createGlobalStyle`
1490
1489
  .media__custom-scrollbar {
1491
1490
  ${customScrollbar}
1492
1491
  }
@@ -1805,29 +1804,36 @@ const OrderSelect = () => {
1805
1804
  function getSchemeColor(scheme, colorKey) {
1806
1805
  return SCHEME_COLORS[colorKey]?.[scheme];
1807
1806
  }
1808
- const Container$1 = styled__default.default(ui.Box)(({ scheme, theme }) => styled.css`
1807
+ const Container$1 = styledComponents.styled(ui.Box)(({ scheme, theme }) => styledComponents.css`
1809
1808
  background: ${getSchemeColor(scheme, "bg")};
1810
1809
  border-radius: ${ui.rem(theme.sanity.radius[2])};
1811
1810
  `), SearchFacet = (props) => {
1812
1811
  const { children, facet } = props, { scheme } = sanity.useColorScheme(), dispatch = reactRedux.useDispatch(), handleClose = () => {
1813
1812
  dispatch(searchActions.facetsRemoveById({ facetId: facet.id }));
1814
1813
  };
1815
- return /* @__PURE__ */ jsxRuntime.jsx(Container$1, { padding: [2, 2, 1], scheme, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { align: ["flex-start", "flex-start", "center"], direction: ["column", "column", "row"], children: [
1816
- /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { paddingBottom: [3, 3, 0], paddingLeft: 1, paddingRight: 2, paddingTop: [1, 1, 0], children: /* @__PURE__ */ jsxRuntime.jsx(
1817
- ui.Label,
1818
- {
1819
- size: 0,
1820
- style: {
1821
- whiteSpace: "nowrap"
1822
- },
1823
- children: facet.title
1824
- }
1825
- ) }),
1826
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { align: "center", children: [
1827
- children,
1828
- /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { marginLeft: 1, paddingX: 2, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { muted: !0, size: 0, children: /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, { onClick: handleClose }) }) })
1829
- ] })
1830
- ] }) });
1814
+ return /* @__PURE__ */ jsxRuntime.jsx(
1815
+ Container$1,
1816
+ {
1817
+ padding: [2, 2, 1],
1818
+ scheme,
1819
+ children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { align: ["flex-start", "flex-start", "center"], direction: ["column", "column", "row"], children: [
1820
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { paddingBottom: [3, 3, 0], paddingLeft: 1, paddingRight: 2, paddingTop: [1, 1, 0], children: /* @__PURE__ */ jsxRuntime.jsx(
1821
+ ui.Label,
1822
+ {
1823
+ size: 0,
1824
+ style: {
1825
+ whiteSpace: "nowrap"
1826
+ },
1827
+ children: facet.title
1828
+ }
1829
+ ) }),
1830
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { align: "center", children: [
1831
+ children,
1832
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { marginLeft: 1, paddingX: 2, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { muted: !0, size: 0, children: /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, { onClick: handleClose }) }) })
1833
+ ] })
1834
+ ] })
1835
+ }
1836
+ );
1831
1837
  }, TextInputNumber = (props) => {
1832
1838
  const { onValueChange, value, ...remainingProps } = props;
1833
1839
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -2029,6 +2035,7 @@ const Container$1 = styled__default.default(ui.Box)(({ scheme, theme }) => style
2029
2035
  radius: themeRadius$1,
2030
2036
  space: themeSpace$1
2031
2037
  } = ui.studioTheme, reactSelectStyles$1 = (scheme) => ({
2038
+ // @ts-expect-error - fix typings later
2032
2039
  control: (styles, { isDisabled, isFocused }) => {
2033
2040
  let boxShadow = "inset 0 0 0 1px var(--card-border-color)";
2034
2041
  return isFocused && (boxShadow = `inset 0 0 0 1px ${getSchemeColor(scheme, "inputEnabledBorder")},
@@ -2050,6 +2057,7 @@ const Container$1 = styled__default.default(ui.Box)(({ scheme, theme }) => style
2050
2057
  }
2051
2058
  };
2052
2059
  },
2060
+ // @ts-expect-error - fix typings later
2053
2061
  input: (styles) => ({
2054
2062
  ...styles,
2055
2063
  color: "var(--card-fg-color)",
@@ -2057,16 +2065,19 @@ const Container$1 = styled__default.default(ui.Box)(({ scheme, theme }) => style
2057
2065
  fontSize: themeTextSizes[1].fontSize,
2058
2066
  marginLeft: ui.rem(themeSpace$1[2])
2059
2067
  }),
2068
+ // @ts-expect-error - fix typings later
2060
2069
  menuList: (styles) => ({
2061
2070
  ...styles,
2062
2071
  padding: 0
2063
2072
  }),
2073
+ // @ts-expect-error - fix typings later
2064
2074
  noOptionsMessage: (styles) => ({
2065
2075
  ...styles,
2066
2076
  fontFamily: ui.studioTheme.fonts.text.family,
2067
2077
  fontSize: themeTextSizes[1].fontSize,
2068
2078
  lineHeight: "1em"
2069
2079
  }),
2080
+ // @ts-expect-error - fix typings later
2070
2081
  option: (styles, { isFocused }) => ({
2071
2082
  ...styles,
2072
2083
  backgroundColor: isFocused ? getSchemeColor(scheme, "spotBlue") : "transparent",
@@ -2081,12 +2092,14 @@ const Container$1 = styled__default.default(ui.Box)(({ scheme, theme }) => style
2081
2092
  color: getSchemeColor(scheme, "bg")
2082
2093
  }
2083
2094
  }),
2095
+ // @ts-expect-error - fix typings later
2084
2096
  placeholder: (styles) => ({
2085
2097
  ...styles,
2086
2098
  fontSize: themeTextSizes[1].fontSize,
2087
2099
  marginLeft: ui.rem(themeSpace$1[2]),
2088
2100
  paddingLeft: 0
2089
2101
  }),
2102
+ // @ts-expect-error - fix typings later
2090
2103
  singleValue: (styles) => ({
2091
2104
  ...styles,
2092
2105
  alignItems: "center",
@@ -2094,6 +2107,7 @@ const Container$1 = styled__default.default(ui.Box)(({ scheme, theme }) => style
2094
2107
  height: "100%",
2095
2108
  marginLeft: ui.rem(themeSpace$1[2])
2096
2109
  }),
2110
+ // @ts-expect-error - fix typings later
2097
2111
  valueContainer: (styles) => ({
2098
2112
  ...styles,
2099
2113
  margin: 0,
@@ -2199,7 +2213,7 @@ const Container$1 = styled__default.default(ui.Box)(({ scheme, theme }) => style
2199
2213
  }
2200
2214
  ) })
2201
2215
  ] });
2202
- }, StackContainer = styled__default.default(ui.Flex)(({ theme }) => styled.css`
2216
+ }, StackContainer = styledComponents.styled(ui.Flex)(({ theme }) => styledComponents.css`
2203
2217
  > * {
2204
2218
  margin-bottom: ${ui.rem(theme.sanity.space[2])};
2205
2219
  }
@@ -2656,7 +2670,7 @@ const imageDprUrl = (asset, options) => {
2656
2670
  "A document of the unknown type ",
2657
2671
  /* @__PURE__ */ jsxRuntime.jsx("em", { children: doc._type })
2658
2672
  ] }) });
2659
- }, Container = styled__default.default(ui.Box)(({ theme }) => styled.css`
2673
+ }, Container = styledComponents.styled(ui.Box)(({ theme }) => styledComponents.css`
2660
2674
  text {
2661
2675
  font-family: ${theme.sanity.fonts.text.family} !important;
2662
2676
  font-size: 8px !important;
@@ -2685,6 +2699,7 @@ const imageDprUrl = (asset, options) => {
2685
2699
  }
2686
2700
  ) : /* @__PURE__ */ jsxRuntime.jsx(FileIcon, { extension: asset.extension, width: "50%" });
2687
2701
  }, { radius: themeRadius, space: themeSpace } = ui.studioTheme, reactSelectStyles = (scheme) => ({
2702
+ // @ts-expect-error - fix typings later
2688
2703
  control: (styles, { isFocused }) => {
2689
2704
  let boxShadow = "inset 0 0 0 1px var(--card-border-color)";
2690
2705
  return isFocused && (boxShadow = `inset 0 0 0 1px ${getSchemeColor(scheme, "inputEnabledBorder")},
@@ -2706,10 +2721,12 @@ const imageDprUrl = (asset, options) => {
2706
2721
  }
2707
2722
  };
2708
2723
  },
2724
+ // @ts-expect-error - fix typings later
2709
2725
  indicatorsContainer: (styles, { isDisabled }) => ({
2710
2726
  ...styles,
2711
2727
  opacity: isDisabled ? 0.25 : 1
2712
2728
  }),
2729
+ // @ts-expect-error - fix typings later
2713
2730
  input: (styles) => ({
2714
2731
  ...styles,
2715
2732
  color: "var(--card-fg-color)",
@@ -2719,6 +2736,7 @@ const imageDprUrl = (asset, options) => {
2719
2736
  menuList: (styles) => ({
2720
2737
  ...styles
2721
2738
  }),
2739
+ // @ts-expect-error - fix typings later
2722
2740
  multiValue: (styles, { isDisabled }) => ({
2723
2741
  ...styles,
2724
2742
  backgroundColor: getSchemeColor(scheme, "mutedHoveredBg"),
@@ -2730,6 +2748,7 @@ const imageDprUrl = (asset, options) => {
2730
2748
  fontSize: "inherit",
2731
2749
  padding: 0
2732
2750
  }),
2751
+ // @ts-expect-error - fix typings later
2733
2752
  multiValueRemove: (styles) => ({
2734
2753
  ...styles,
2735
2754
  borderTopLeftRadius: 0,
@@ -2739,11 +2758,13 @@ const imageDprUrl = (asset, options) => {
2739
2758
  backgroundColor: getSchemeColor(scheme, "mutedSelectedBg")
2740
2759
  }
2741
2760
  }),
2761
+ // @ts-expect-error - fix typings later
2742
2762
  noOptionsMessage: (styles) => ({
2743
2763
  ...styles,
2744
2764
  fontFamily: ui.studioTheme.fonts.text.family,
2745
2765
  lineHeight: "1em"
2746
2766
  }),
2767
+ // @ts-expect-error - fix typings later
2747
2768
  option: (styles, { isFocused }) => ({
2748
2769
  ...styles,
2749
2770
  backgroundColor: isFocused ? getSchemeColor(scheme, "spotBlue") : "transparent",
@@ -2755,10 +2776,12 @@ const imageDprUrl = (asset, options) => {
2755
2776
  color: getSchemeColor(scheme, "bg")
2756
2777
  }
2757
2778
  }),
2779
+ // @ts-expect-error - fix typings later
2758
2780
  placeholder: (styles) => ({
2759
2781
  ...styles,
2760
2782
  marginLeft: ui.rem(themeSpace[2])
2761
2783
  }),
2784
+ // @ts-expect-error - fix typings later
2762
2785
  valueContainer: (styles) => ({
2763
2786
  ...styles,
2764
2787
  margin: 0,
@@ -2793,7 +2816,7 @@ const imageDprUrl = (asset, options) => {
2793
2816
  MultiValueLabel,
2794
2817
  MultiValueRemove,
2795
2818
  Option
2796
- }, StyledErrorOutlineIcon = styled__default.default(icons.ErrorOutlineIcon)(({ theme }) => ({
2819
+ }, StyledErrorOutlineIcon = styledComponents.styled(icons.ErrorOutlineIcon)(({ theme }) => ({
2797
2820
  color: theme.sanity.color.spot.red
2798
2821
  })), FormFieldInputLabel = (props) => {
2799
2822
  const { description, error, label, name } = props;
@@ -2934,7 +2957,7 @@ const imageDprUrl = (asset, options) => {
2934
2957
  ) })
2935
2958
  }
2936
2959
  );
2937
- }, Image$1 = styled__default.default.img`
2960
+ }, Image$1 = styledComponents.styled.img`
2938
2961
  --checkerboard-color: ${(props) => props.scheme ? getSchemeColor(props.scheme, "bg2") : "inherit"};
2939
2962
 
2940
2963
  display: block;
@@ -2942,7 +2965,7 @@ const imageDprUrl = (asset, options) => {
2942
2965
  height: 100%;
2943
2966
  object-fit: contain;
2944
2967
 
2945
- ${(props) => props.showCheckerboard && styled.css`
2968
+ ${(props) => props.showCheckerboard && styledComponents.css`
2946
2969
  background-image: linear-gradient(45deg, var(--checkerboard-color) 25%, transparent 25%),
2947
2970
  linear-gradient(-45deg, var(--checkerboard-color) 25%, transparent 25%),
2948
2971
  linear-gradient(45deg, transparent 75%, var(--checkerboard-color) 75%),
@@ -3409,9 +3432,9 @@ const imageDprUrl = (asset, options) => {
3409
3432
  ] }),
3410
3433
  children
3411
3434
  ] }) : null;
3412
- }, TagContainer = styled__default.default(ui.Flex)`
3435
+ }, TagContainer = styledComponents.styled(ui.Flex)`
3413
3436
  height: ${PANEL_HEIGHT}px;
3414
- `, ButtonContainer = styled__default.default(ui.Flex)`
3437
+ `, ButtonContainer = styledComponents.styled(ui.Flex)`
3415
3438
  @media (pointer: fine) {
3416
3439
  visibility: hidden;
3417
3440
  }
@@ -3765,14 +3788,14 @@ const imageDprUrl = (asset, options) => {
3765
3788
  const assetItems = assetIds.map((id) => ({ id, type: "asset" }));
3766
3789
  return [...uploadIds.map((id) => ({ id, type: "upload" })), ...assetItems];
3767
3790
  }
3768
- ), CardWrapper$1 = styled__default.default(ui.Flex)`
3791
+ ), CardWrapper$1 = styledComponents.styled(ui.Flex)`
3769
3792
  box-sizing: border-box;
3770
3793
  height: 100%;
3771
3794
  overflow: hidden;
3772
3795
  position: relative;
3773
3796
  width: 100%;
3774
- `, CardContainer = styled__default.default(ui.Flex)(
3775
- ({ picked, theme, updating }) => styled.css`
3797
+ `, CardContainer = styledComponents.styled(ui.Flex)(
3798
+ ({ picked, theme, updating }) => styledComponents.css`
3776
3799
  border: 1px solid transparent;
3777
3800
  height: 100%;
3778
3801
  pointer-events: ${updating ? "none" : "auto"};
@@ -3783,7 +3806,7 @@ const imageDprUrl = (asset, options) => {
3783
3806
 
3784
3807
  border: ${picked ? `1px solid ${theme.sanity.color.spot.orange} !important` : "1px solid inherit"};
3785
3808
 
3786
- ${!updating && styled.css`
3809
+ ${!updating && styledComponents.css`
3787
3810
  @media (hover: hover) and (pointer: fine) {
3788
3811
  &:hover {
3789
3812
  border: 1px solid var(--card-border-color);
@@ -3791,16 +3814,19 @@ const imageDprUrl = (asset, options) => {
3791
3814
  }
3792
3815
  `}
3793
3816
  `
3794
- ), ContextActionContainer$2 = styled__default.default(ui.Flex)(({ scheme }) => styled.css`
3795
- cursor: pointer;
3796
- height: ${PANEL_HEIGHT}px;
3797
- transition: all 300ms;
3798
- @media (hover: hover) and (pointer: fine) {
3799
- &:hover {
3800
- background: ${getSchemeColor(scheme, "bg")};
3817
+ ), ContextActionContainer$2 = styledComponents.styled(ui.Flex)(
3818
+ // @ts-expect-error - fix typings later
3819
+ ({ scheme }) => styledComponents.css`
3820
+ cursor: pointer;
3821
+ height: ${PANEL_HEIGHT}px;
3822
+ transition: all 300ms;
3823
+ @media (hover: hover) and (pointer: fine) {
3824
+ &:hover {
3825
+ background: ${getSchemeColor(scheme, "bg")};
3826
+ }
3801
3827
  }
3802
- }
3803
- `), StyledWarningOutlineIcon = styled__default.default(icons.WarningFilledIcon)(({ theme }) => ({
3828
+ `
3829
+ ), StyledWarningOutlineIcon = styledComponents.styled(icons.WarningFilledIcon)(({ theme }) => ({
3804
3830
  color: theme.sanity.color.spot.red
3805
3831
  })), CardAsset = (props) => {
3806
3832
  const { id, selected } = props, { scheme } = sanity.useColorScheme(), shiftPressed = useKeyPress("shift"), dispatch = reactRedux.useDispatch(), lastPicked = useTypedSelector((state) => state.assets.lastPicked), item = useTypedSelector((state) => selectAssetById(state, id)), asset = item?.asset, error = item?.error, isOpaque = item?.asset?.metadata?.isOpaque, picked = item?.picked, updating = item?.updating, { onSelect } = useAssetSourceActions();
@@ -4181,7 +4207,7 @@ toolkit.createSelector(
4181
4207
  );
4182
4208
  const uploadsActions = uploadsSlice.actions;
4183
4209
  var uploadsReducer = uploadsSlice.reducer;
4184
- const CardWrapper = styled__default.default(ui.Flex)`
4210
+ const CardWrapper = styledComponents.styled(ui.Flex)`
4185
4211
  box-sizing: border-box;
4186
4212
  height: 100%;
4187
4213
  overflow: hidden;
@@ -4289,10 +4315,10 @@ const CardWrapper = styled__default.default(ui.Flex)`
4289
4315
  ) });
4290
4316
  }, CARD_HEIGHT = 220, CARD_WIDTH = 240, VirtualCell = react.memo(
4291
4317
  ({ item, selected }) => item?.type === "asset" ? /* @__PURE__ */ jsxRuntime.jsx(CardAsset$1, { id: item.id, selected }) : item?.type === "upload" ? /* @__PURE__ */ jsxRuntime.jsx(CardUpload, { id: item.id }) : null
4292
- ), ItemContainer = styled__default.default.div`
4318
+ ), ItemContainer = styledComponents.styled.div`
4293
4319
  height: ${CARD_HEIGHT}px;
4294
4320
  width: ${CARD_WIDTH}px;
4295
- `, ListContainer = styled__default.default.div`
4321
+ `, ListContainer = styledComponents.styled.div`
4296
4322
  display: grid;
4297
4323
  grid-template-columns: repeat(auto-fill, ${CARD_WIDTH}px);
4298
4324
  grid-template-rows: repeat(auto-fill, ${CARD_HEIGHT}px);
@@ -4307,6 +4333,7 @@ const CardWrapper = styled__default.default(ui.Flex)`
4307
4333
  computeItemKey: (index) => items[index]?.id,
4308
4334
  components: {
4309
4335
  Item: ItemContainer,
4336
+ // @ts-expect-error - fix typings later
4310
4337
  List: ListContainer
4311
4338
  },
4312
4339
  endReached: onLoadMore,
@@ -4352,14 +4379,17 @@ const CardWrapper = styled__default.default(ui.Flex)`
4352
4379
  ]
4353
4380
  }
4354
4381
  ) });
4355
- }, ContextActionContainer$1 = styled__default.default(ui.Flex)(({ scheme }) => styled.css`
4356
- cursor: pointer;
4357
- @media (hover: hover) and (pointer: fine) {
4358
- &:hover {
4359
- background: ${getSchemeColor(scheme, "bg")};
4382
+ }, ContextActionContainer$1 = styledComponents.styled(ui.Flex)(
4383
+ // @ts-expect-error - fix typings later
4384
+ ({ scheme }) => styledComponents.css`
4385
+ cursor: pointer;
4386
+ @media (hover: hover) and (pointer: fine) {
4387
+ &:hover {
4388
+ background: ${getSchemeColor(scheme, "bg")};
4389
+ }
4360
4390
  }
4361
- }
4362
- `), TableHeader = () => {
4391
+ `
4392
+ ), TableHeader = () => {
4363
4393
  const { scheme } = sanity.useColorScheme(), dispatch = reactRedux.useDispatch(), fetching = useTypedSelector((state) => state.assets.fetching), itemsLength = useTypedSelector(selectAssetsLength), numPickedAssets = useTypedSelector(selectAssetsPickedLength), mediaIndex = ui.useMediaIndex(), { onSelect } = useAssetSourceActions(), allSelected = numPickedAssets === itemsLength, handleContextActionClick = (e) => {
4364
4394
  e.stopPropagation(), dispatch(allSelected ? assetsActions.pickClear() : assetsActions.pickAll());
4365
4395
  };
@@ -4419,12 +4449,13 @@ const CardWrapper = styled__default.default(ui.Flex)`
4419
4449
  ]
4420
4450
  }
4421
4451
  );
4422
- }, REFERENCE_COUNT_VISIBILITY_DELAY = 750, ContainerGrid = styled__default.default(ui.Grid)(
4452
+ }, REFERENCE_COUNT_VISIBILITY_DELAY = 750, ContainerGrid = styledComponents.styled(ui.Grid)(
4453
+ // @ts-expect-error - fix typings later
4423
4454
  ({
4424
4455
  scheme,
4425
4456
  selected,
4426
4457
  updating
4427
- }) => styled.css`
4458
+ }) => styledComponents.css`
4428
4459
  align-items: center;
4429
4460
  cursor: ${selected ? "default" : "pointer"};
4430
4461
  height: 100%;
@@ -4432,7 +4463,7 @@ const CardWrapper = styled__default.default(ui.Flex)`
4432
4463
  user-select: none;
4433
4464
  white-space: nowrap;
4434
4465
 
4435
- ${!updating && styled.css`
4466
+ ${!updating && styledComponents.css`
4436
4467
  @media (hover: hover) and (pointer: fine) {
4437
4468
  &:hover {
4438
4469
  background: ${getSchemeColor(scheme, "bg")};
@@ -4440,14 +4471,14 @@ const CardWrapper = styled__default.default(ui.Flex)`
4440
4471
  }
4441
4472
  `}
4442
4473
  `
4443
- ), ContextActionContainer = styled__default.default(ui.Flex)(({ scheme }) => styled.css`
4474
+ ), ContextActionContainer = styledComponents.styled(ui.Flex)(({ scheme }) => styledComponents.css`
4444
4475
  cursor: pointer;
4445
4476
  @media (hover: hover) and (pointer: fine) {
4446
4477
  &:hover {
4447
4478
  background: ${getSchemeColor(scheme, "bg2")};
4448
4479
  }
4449
4480
  }
4450
- `), StyledWarningIcon = styled__default.default(icons.WarningFilledIcon)(({ theme }) => ({
4481
+ `), StyledWarningIcon = styledComponents.styled(icons.WarningFilledIcon)(({ theme }) => ({
4451
4482
  color: theme.sanity.color.spot.red
4452
4483
  })), TableRowAsset = (props) => {
4453
4484
  const { id, selected } = props, { scheme } = sanity.useColorScheme(), shiftPressed = useKeyPress("shift"), [referenceCountVisible, setReferenceCountVisible] = react.useState(!1), refCountVisibleTimeout = react.useRef(), dispatch = reactRedux.useDispatch(), lastPicked = useTypedSelector((state) => state.assets.lastPicked), item = useTypedSelector((state) => selectAssetById(state, id)), mediaIndex = ui.useMediaIndex(), asset = item?.asset, error = item?.error, isOpaque = item?.asset?.metadata?.isOpaque, picked = item?.picked, updating = item?.updating, { onSelect } = useAssetSourceActions(), handleContextActionClick = react.useCallback(
@@ -5112,7 +5143,7 @@ const TagsPanel = () => useTypedSelector((state) => state.tags.panelVisible) ? /
5112
5143
  }
5113
5144
  )
5114
5145
  }
5115
- ) : null, UploadContainer = styled__default.default.div`
5146
+ ) : null, UploadContainer = styledComponents.styled.div`
5116
5147
  color: white;
5117
5148
  height: 100%;
5118
5149
  min-height: 100%;
@@ -5123,7 +5154,7 @@ const TagsPanel = () => useTypedSelector((state) => state.tags.panelVisible) ? /
5123
5154
  &:focus {
5124
5155
  outline: none;
5125
5156
  }
5126
- `, DragActiveContainer = styled__default.default.div`
5157
+ `, DragActiveContainer = styledComponents.styled.div`
5127
5158
  align-items: center;
5128
5159
  background: rgba(0, 0, 0, 0.75);
5129
5160
  display: flex;