sanity-plugin-mux-input 2.1.0 → 2.2.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/lib/index.cjs +4037 -4
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +14 -1
- package/lib/index.js +4026 -2
- package/lib/index.js.map +1 -1
- package/package.json +27 -28
- package/src/actions/assets.ts +30 -2
- package/src/clients/upChunkObservable.ts +1 -1
- package/src/components/ConfigureApi.tsx +9 -1
- package/src/components/FormField.tsx +8 -10
- package/src/components/IconInfo.tsx +23 -0
- package/src/components/Input.styled.tsx +0 -8
- package/src/components/Input.tsx +4 -3
- package/src/components/InputBrowser.tsx +1 -8
- package/src/components/Player.styled.tsx +5 -144
- package/src/components/Player.tsx +23 -109
- package/src/components/PlayerActionsMenu.tsx +0 -4
- package/src/components/SelectAsset.tsx +18 -58
- package/src/components/SelectSortOptions.tsx +45 -0
- package/src/components/SpinnerBox.tsx +17 -0
- package/src/components/StudioTool.tsx +20 -0
- package/src/components/VideoDetails/DeleteDialog.tsx +156 -0
- package/src/components/VideoDetails/VideoDetails.tsx +298 -0
- package/src/components/VideoDetails/VideoReferences.tsx +70 -0
- package/src/components/VideoDetails/useVideoDetails.ts +85 -0
- package/src/components/VideoInBrowser.tsx +183 -0
- package/src/components/VideoMetadata.tsx +43 -0
- package/src/components/VideoPlayer.tsx +69 -0
- package/src/components/VideoThumbnail.tsx +106 -0
- package/src/components/VideosBrowser.tsx +83 -0
- package/src/components/__legacy__Uploader.tsx +2 -9
- package/src/components/documentPreview/DocumentPreview.tsx +107 -0
- package/src/components/documentPreview/DraftStatus.tsx +34 -0
- package/src/components/documentPreview/MissingSchemaType.tsx +33 -0
- package/src/components/documentPreview/PaneItemPreview.tsx +71 -0
- package/src/components/documentPreview/PublishedStatus.tsx +35 -0
- package/src/components/documentPreview/TimeAgo.tsx +13 -0
- package/src/components/documentPreview/paneItemTypes.ts +7 -0
- package/src/components/icons/Resolution.tsx +12 -0
- package/src/components/icons/StopWatch.tsx +20 -0
- package/src/components/icons/ToolIcon.tsx +21 -0
- package/src/hooks/useAssets.ts +61 -0
- package/src/hooks/useCancelUpload.ts +2 -2
- package/src/hooks/useClient.ts +3 -1
- package/src/hooks/useDocReferences.ts +21 -0
- package/src/hooks/useInView.ts +45 -0
- package/src/index.ts +2 -0
- package/src/plugin.tsx +1 -1
- package/src/util/constants.ts +7 -0
- package/src/util/createSearchFilter.ts +78 -0
- package/src/util/formatSeconds.ts +22 -0
- package/src/util/getAnimatedPosterSrc.ts +1 -1
- package/src/util/getPlaybackId.ts +1 -1
- package/src/util/getPlaybackPolicy.ts +1 -1
- package/src/util/getVideoMetadata.ts +18 -0
- package/src/util/types.ts +16 -1
- package/lib/_chunks/Player-d8f163ed.cjs +0 -474
- package/lib/_chunks/Player-d8f163ed.cjs.map +0 -1
- package/lib/_chunks/Player-fb9712c0.js +0 -465
- package/lib/_chunks/Player-fb9712c0.js.map +0 -1
- package/lib/_chunks/index-0656ede8.js +0 -3229
- package/lib/_chunks/index-0656ede8.js.map +0 -1
- package/lib/_chunks/index-9cd542f1.cjs +0 -3271
- package/lib/_chunks/index-9cd542f1.cjs.map +0 -1
- package/src/components/EditThumbnailDialog.tsx +0 -74
- package/src/components/VideoSource.styled.tsx +0 -235
- package/src/components/VideoSource.tsx +0 -318
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
|
|
1
3
|
import type {PartialDeep} from 'type-fest'
|
|
2
4
|
import {Plugin as Plugin_2} from 'sanity'
|
|
3
5
|
import type {SanityDocument} from 'sanity'
|
|
@@ -9,6 +11,17 @@ declare interface Config {
|
|
|
9
11
|
* @defaultValue 'none'
|
|
10
12
|
*/
|
|
11
13
|
mp4_support: 'none' | 'standard'
|
|
14
|
+
/**
|
|
15
|
+
* How the videos browser should appear as a studio tool in Sanity's top navigation
|
|
16
|
+
*
|
|
17
|
+
* Pass `false` if you want to disable it.
|
|
18
|
+
**/
|
|
19
|
+
tool?:
|
|
20
|
+
| false
|
|
21
|
+
| {
|
|
22
|
+
title?: string
|
|
23
|
+
icon?: React.ComponentType
|
|
24
|
+
}
|
|
12
25
|
}
|
|
13
26
|
|
|
14
27
|
export declare const defaultConfig: Config
|
|
@@ -100,7 +113,7 @@ declare interface MuxVideoTrack {
|
|
|
100
113
|
|
|
101
114
|
declare type PlaybackPolicy = 'signed' | 'public'
|
|
102
115
|
|
|
103
|
-
export declare interface VideoAssetDocument extends
|
|
116
|
+
export declare interface VideoAssetDocument extends SanityDocument {
|
|
104
117
|
type?: 'mux.videoAsset'
|
|
105
118
|
status?: string
|
|
106
119
|
assetId?: string
|