sanity-plugin-media 6.3.4 → 6.4.0

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 CHANGED
@@ -1941,7 +1941,7 @@ const ButtonAssetCopy = (t0) => {
1941
1941
  children: [t2, t4]
1942
1942
  }), $[6] = t2, $[7] = t4, $[8] = t5) : t5 = $[8], t5;
1943
1943
  }, AssetMetadata = (props) => {
1944
- let $ = c(35), { asset, item } = props, exif = asset?.metadata?.exif, t0;
1944
+ let $ = c(40), { asset, item } = props, exif = asset?.metadata?.exif, t0;
1945
1945
  $[0] !== asset.originalFilename || $[1] !== asset.url ? (t0 = () => {
1946
1946
  window.location.href = `${asset.url}?dl=${asset.originalFilename}`;
1947
1947
  }, $[0] = asset.originalFilename, $[1] = asset.url, $[2] = t0) : t0 = $[2];
@@ -1973,17 +1973,25 @@ const ButtonAssetCopy = (t0) => {
1973
1973
  value: getAssetResolution(asset)
1974
1974
  }), $[13] = asset, $[14] = t8);
1975
1975
  let t9;
1976
- $[15] !== t3 || $[16] !== t5 || $[17] !== t7 || $[18] !== t8 ? (t9 = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Stack, {
1976
+ $[15] === asset._createdAt ? t9 = $[16] : (t9 = format(new Date(asset._createdAt), "PPp"), $[15] = asset._createdAt, $[16] = t9);
1977
+ let t10;
1978
+ $[17] === t9 ? t10 = $[18] : (t10 = /* @__PURE__ */ jsx(Row, {
1979
+ label: "Uploaded",
1980
+ value: t9
1981
+ }), $[17] = t9, $[18] = t10);
1982
+ let t11;
1983
+ $[19] !== t10 || $[20] !== t3 || $[21] !== t5 || $[22] !== t7 || $[23] !== t8 ? (t11 = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Stack, {
1977
1984
  gap: 3,
1978
1985
  children: [
1979
1986
  t3,
1980
1987
  t5,
1981
1988
  t7,
1982
- t8
1989
+ t8,
1990
+ t10
1983
1991
  ]
1984
- }) }), $[15] = t3, $[16] = t5, $[17] = t7, $[18] = t8, $[19] = t9) : t9 = $[19];
1985
- let t10;
1986
- $[20] === exif ? t10 = $[21] : (t10 = exif && (exif.DateTimeOriginal || exif.FNumber || exif.FocalLength || exif.ExposureTime || exif.ISO) && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Box, {
1992
+ }) }), $[19] = t10, $[20] = t3, $[21] = t5, $[22] = t7, $[23] = t8, $[24] = t11) : t11 = $[24];
1993
+ let t12;
1994
+ $[25] === exif ? t12 = $[26] : (t12 = exif && (exif.DateTimeOriginal || exif.FNumber || exif.FocalLength || exif.ExposureTime || exif.ISO) && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Box, {
1987
1995
  marginY: 4,
1988
1996
  style: {
1989
1997
  background: "var(--card-border-color)",
@@ -2014,38 +2022,38 @@ const ButtonAssetCopy = (t0) => {
2014
2022
  value: format(new Date(exif.DateTimeOriginal), "PPp")
2015
2023
  })
2016
2024
  ]
2017
- }) })] }), $[20] = exif, $[21] = t10);
2018
- let t11 = !item || item?.updating, t12;
2019
- $[22] !== handleDownload || $[23] !== t11 ? (t12 = /* @__PURE__ */ jsx(Button, {
2020
- disabled: t11,
2025
+ }) })] }), $[25] = exif, $[26] = t12);
2026
+ let t13 = !item || item?.updating, t14;
2027
+ $[27] !== handleDownload || $[28] !== t13 ? (t14 = /* @__PURE__ */ jsx(Button, {
2028
+ disabled: t13,
2021
2029
  fontSize: 1,
2022
2030
  icon: DownloadIcon,
2023
2031
  mode: "ghost",
2024
2032
  onClick: handleDownload,
2025
2033
  text: "Download"
2026
- }), $[22] = handleDownload, $[23] = t11, $[24] = t12) : t12 = $[24];
2027
- let t13 = !item || item?.updating, t14;
2028
- $[25] !== asset.url || $[26] !== t13 ? (t14 = /* @__PURE__ */ jsx(ButtonAssetCopy, {
2029
- disabled: t13,
2034
+ }), $[27] = handleDownload, $[28] = t13, $[29] = t14) : t14 = $[29];
2035
+ let t15 = !item || item?.updating, t16;
2036
+ $[30] !== asset.url || $[31] !== t15 ? (t16 = /* @__PURE__ */ jsx(ButtonAssetCopy, {
2037
+ disabled: t15,
2030
2038
  url: asset.url
2031
- }), $[25] = asset.url, $[26] = t13, $[27] = t14) : t14 = $[27];
2032
- let t15;
2033
- $[28] !== t12 || $[29] !== t14 ? (t15 = /* @__PURE__ */ jsx(Box, {
2039
+ }), $[30] = asset.url, $[31] = t15, $[32] = t16) : t16 = $[32];
2040
+ let t17;
2041
+ $[33] !== t14 || $[34] !== t16 ? (t17 = /* @__PURE__ */ jsx(Box, {
2034
2042
  marginTop: 5,
2035
2043
  children: /* @__PURE__ */ jsxs(Inline, {
2036
2044
  gap: 2,
2037
- children: [t12, t14]
2045
+ children: [t14, t16]
2038
2046
  })
2039
- }), $[28] = t12, $[29] = t14, $[30] = t15) : t15 = $[30];
2040
- let t16;
2041
- return $[31] !== t10 || $[32] !== t15 || $[33] !== t9 ? (t16 = /* @__PURE__ */ jsxs(Box, {
2047
+ }), $[33] = t14, $[34] = t16, $[35] = t17) : t17 = $[35];
2048
+ let t18;
2049
+ return $[36] !== t11 || $[37] !== t12 || $[38] !== t17 ? (t18 = /* @__PURE__ */ jsxs(Box, {
2042
2050
  marginTop: 3,
2043
2051
  children: [
2044
- t9,
2045
- t10,
2046
- t15
2052
+ t11,
2053
+ t12,
2054
+ t17
2047
2055
  ]
2048
- }), $[31] = t10, $[32] = t15, $[33] = t9, $[34] = t16) : t16 = $[34], t16;
2056
+ }), $[36] = t11, $[37] = t12, $[38] = t17, $[39] = t18) : t18 = $[39], t18;
2049
2057
  }, Dialog$1 = (props) => {
2050
2058
  let $ = c(3), t0;
2051
2059
  $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = { position: "fixed" }, $[0] = t0) : t0 = $[0];
@@ -3926,7 +3934,7 @@ const CardWrapper = styled(Flex).withConfig({
3926
3934
  return null;
3927
3935
  }), StyledItemContainer = styled.div.withConfig({
3928
3936
  displayName: "StyledItemContainer",
3929
- componentId: "sc-2rsg9t-0"
3937
+ componentId: "sc-fjxrlv-0"
3930
3938
  })`height:${220}px;width:${240}px;`, ItemContainer = (props) => {
3931
3939
  let $ = c(6), ref, rest;
3932
3940
  if ($[0] !== props) {
@@ -3940,7 +3948,7 @@ const CardWrapper = styled(Flex).withConfig({
3940
3948
  }), $[3] = ref, $[4] = rest, $[5] = t0) : t0 = $[5], t0;
3941
3949
  }, StyledListContainer = styled.div.withConfig({
3942
3950
  displayName: "StyledListContainer",
3943
- componentId: "sc-2rsg9t-1"
3951
+ componentId: "sc-fjxrlv-1"
3944
3952
  })`display:grid;grid-template-columns:repeat(auto-fill,${240}px);grid-template-rows:repeat(auto-fill,${220}px);justify-content:center;margin:0 auto;`, ListContainer = (props) => {
3945
3953
  let $ = c(6), ref, rest;
3946
3954
  if ($[0] !== props) {
@@ -3975,6 +3983,7 @@ const CardWrapper = styled(Flex).withConfig({
3975
3983
  }, $[5] = items, $[6] = selectedIds, $[7] = source, $[8] = t3) : t3 = $[8];
3976
3984
  let t4;
3977
3985
  $[9] === Symbol.for("react.memo_cache_sentinel") ? (t4 = {
3986
+ overflowAnchor: "none",
3978
3987
  overflowX: "hidden",
3979
3988
  overflowY: "scroll"
3980
3989
  }, $[9] = t4) : t4 = $[9];