sanity-plugin-media 2.3.2 → 2.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.
Files changed (83) hide show
  1. package/LICENSE +1 -1
  2. package/dist/index.d.mts +19 -0
  3. package/dist/index.d.ts +3 -9
  4. package/dist/index.js +4228 -10784
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +5341 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/package.json +18 -24
  9. package/src/components/AssetGridVirtualized/index.tsx +2 -2
  10. package/src/components/AssetMetadata/index.tsx +2 -2
  11. package/src/components/AssetTableVirtualized/index.tsx +2 -2
  12. package/src/components/Browser/index.tsx +2 -2
  13. package/src/components/ButtonAssetCopy/index.tsx +1 -1
  14. package/src/components/CardAsset/index.tsx +3 -3
  15. package/src/components/DebugControls/index.tsx +1 -1
  16. package/src/components/Dialog/index.tsx +1 -1
  17. package/src/components/DialogAssetEdit/index.tsx +3 -3
  18. package/src/components/DialogConfirm/index.tsx +2 -2
  19. package/src/components/DialogSearchFacets/index.tsx +2 -2
  20. package/src/components/DialogTagCreate/index.tsx +3 -3
  21. package/src/components/DialogTagEdit/index.tsx +3 -3
  22. package/src/components/DialogTags/index.tsx +2 -2
  23. package/src/components/Dialogs/index.tsx +1 -1
  24. package/src/components/DocumentList/index.tsx +1 -1
  25. package/src/components/FileAssetPreview/index.tsx +1 -1
  26. package/src/components/FileIcon/index.tsx +2 -2
  27. package/src/components/FormBuilderTool/index.tsx +2 -2
  28. package/src/components/FormFieldInputText/index.tsx +1 -1
  29. package/src/components/FormFieldInputTextarea/index.tsx +1 -1
  30. package/src/components/FormSubmitButton/index.tsx +1 -1
  31. package/src/components/Image/index.tsx +2 -2
  32. package/src/components/Items/index.tsx +1 -1
  33. package/src/components/ReduxProvider/index.tsx +4 -4
  34. package/src/components/SearchFacet/index.tsx +3 -3
  35. package/src/components/SearchFacetNumber/index.tsx +1 -1
  36. package/src/components/SearchFacetSelect/index.tsx +1 -1
  37. package/src/components/SearchFacetString/index.tsx +2 -2
  38. package/src/components/SearchFacetTags/index.tsx +1 -1
  39. package/src/components/SearchFacets/index.tsx +1 -1
  40. package/src/components/SearchFacetsControl/index.tsx +1 -1
  41. package/src/components/TableHeader/index.tsx +2 -2
  42. package/src/components/TableRowAsset/index.tsx +10 -2
  43. package/src/components/Tag/index.tsx +2 -2
  44. package/src/components/TagsVirtualized/index.tsx +2 -2
  45. package/src/components/TextInputNumber/index.tsx +1 -1
  46. package/src/components/TextInputSearch/index.tsx +1 -1
  47. package/src/components/UploadDropzone/index.tsx +2 -2
  48. package/src/config/searchFacets.ts +1 -1
  49. package/src/constants.ts +6 -1
  50. package/src/contexts/AssetSourceDispatchContext.tsx +1 -1
  51. package/src/contexts/DropzoneDispatchContext.tsx +1 -1
  52. package/src/contexts/ToolOptionsContext.tsx +3 -3
  53. package/src/hooks/useKeyPress.ts +1 -1
  54. package/src/hooks/useOnScreen.ts +1 -1
  55. package/src/hooks/usePortalPopoverProps.ts +1 -1
  56. package/src/hooks/useTypedSelector.ts +2 -2
  57. package/src/modules/assets/actions.ts +1 -1
  58. package/src/modules/assets/index.ts +3 -3
  59. package/src/modules/debug/index.ts +1 -1
  60. package/src/modules/dialog/index.ts +2 -2
  61. package/src/modules/index.ts +3 -3
  62. package/src/modules/notifications/index.ts +1 -1
  63. package/src/modules/search/index.ts +1 -1
  64. package/src/modules/selectors.ts +2 -2
  65. package/src/modules/tags/index.ts +2 -2
  66. package/src/modules/uploads/index.ts +2 -2
  67. package/src/operators/debugThrottle.ts +1 -1
  68. package/src/plugin.tsx +5 -3
  69. package/src/styled/react-select/creatable.tsx +2 -2
  70. package/src/styled/react-select/single.tsx +2 -2
  71. package/src/types/index.ts +2 -2
  72. package/src/utils/blocksToText.ts +1 -1
  73. package/src/utils/constructFilter.ts +1 -1
  74. package/src/utils/getAssetResolution.ts +1 -1
  75. package/src/utils/getSchemeColor.ts +1 -1
  76. package/src/utils/getTagSelectOptions.ts +1 -1
  77. package/src/utils/getUniqueDocuments.ts +1 -1
  78. package/src/utils/imageDprUrl.ts +1 -1
  79. package/src/utils/typeGuards.ts +1 -1
  80. package/src/utils/uploadSanityAsset.ts +1 -1
  81. package/dist/index.cjs.mjs +0 -5
  82. package/dist/index.esm.js +0 -11850
  83. package/dist/index.esm.js.map +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Sanity.io
3
+ Copyright (c) 2025 Sanity.io
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,19 @@
1
+ import {AssetSourceComponentProps} from 'sanity'
2
+ import {MediaToolOptions} from '@types'
3
+ import {Plugin as Plugin_2} from 'sanity'
4
+ import {default as React_2} from 'react'
5
+
6
+ export declare const media: Plugin_2<void | MediaToolOptions>
7
+
8
+ export declare const mediaAssetSource: {
9
+ component: (props: AssetSourceComponentProps) => React_2.JSX.Element
10
+ icon: React_2.ForwardRefExoticComponent<
11
+ Omit<React_2.SVGProps<SVGSVGElement>, 'ref'> & React_2.RefAttributes<SVGSVGElement>
12
+ >
13
+ name: string
14
+ title: string
15
+ }
16
+
17
+ export {MediaToolOptions}
18
+
19
+ export {}
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import {AssetSourceComponentProps} from 'sanity'
2
- import {JSX as JSX_2} from 'react/jsx-runtime'
2
+ import {MediaToolOptions} from '@types'
3
3
  import {Plugin as Plugin_2} from 'sanity'
4
4
  import {default as React_2} from 'react'
5
5
 
6
6
  export declare const media: Plugin_2<void | MediaToolOptions>
7
7
 
8
8
  export declare const mediaAssetSource: {
9
- component: (props: AssetSourceComponentProps) => JSX_2.Element
9
+ component: (props: AssetSourceComponentProps) => React_2.JSX.Element
10
10
  icon: React_2.ForwardRefExoticComponent<
11
11
  Omit<React_2.SVGProps<SVGSVGElement>, 'ref'> & React_2.RefAttributes<SVGSVGElement>
12
12
  >
@@ -14,12 +14,6 @@ export declare const mediaAssetSource: {
14
14
  title: string
15
15
  }
16
16
 
17
- export declare type MediaToolOptions = {
18
- maximumUploadSize?: number
19
- creditLine: {
20
- enabled: boolean
21
- excludeSources?: string | string[]
22
- }
23
- }
17
+ export {MediaToolOptions}
24
18
 
25
19
  export {}