sanity-plugin-mux-input 1.1.7 → 1.2.0-main.3

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 (96) hide show
  1. package/README.md +16 -10
  2. package/lib/cjs/Input.832bb406.js +3585 -0
  3. package/lib/cjs/Input.832bb406.js.map +1 -0
  4. package/lib/cjs/Input.f632a169.js +410 -0
  5. package/lib/cjs/Input.f632a169.js.map +1 -0
  6. package/lib/cjs/Preview.3e13819d.js +53 -0
  7. package/lib/cjs/Preview.3e13819d.js.map +1 -0
  8. package/lib/cjs/index.js +381 -0
  9. package/lib/cjs/index.js.map +1 -0
  10. package/lib/esm/Input.8f661c56.js +3582 -0
  11. package/lib/esm/Input.8f661c56.js.map +1 -0
  12. package/lib/esm/Input.e91a8018.js +407 -0
  13. package/lib/esm/Input.e91a8018.js.map +1 -0
  14. package/lib/esm/Preview.0ca0dc85.js +53 -0
  15. package/lib/esm/Preview.0ca0dc85.js.map +1 -0
  16. package/lib/esm/index.js +374 -0
  17. package/lib/esm/index.js.map +1 -0
  18. package/lib/types/index.d.ts +15 -0
  19. package/lib/types/index.d.ts.map +1 -0
  20. package/package.json +62 -27
  21. package/sanity.json +2 -10
  22. package/v2-incompatible.js +11 -0
  23. package/build/actions/assets.js +0 -30
  24. package/build/actions/assets.js.map +0 -1
  25. package/build/actions/secrets.js +0 -125
  26. package/build/actions/secrets.js.map +0 -1
  27. package/build/actions/upload.js +0 -268
  28. package/build/actions/upload.js.map +0 -1
  29. package/build/clients/SanityClient.js +0 -20
  30. package/build/clients/SanityClient.js.map +0 -1
  31. package/build/clients/upChunkObservable.js +0 -66
  32. package/build/clients/upChunkObservable.js.map +0 -1
  33. package/build/components/EditThumbnailDialog.js +0 -123
  34. package/build/components/EditThumbnailDialog.js.map +0 -1
  35. package/build/components/FileInputButton.js +0 -75
  36. package/build/components/FileInputButton.js.map +0 -1
  37. package/build/components/Input.css +0 -30
  38. package/build/components/Input.js +0 -537
  39. package/build/components/Input.js.map +0 -1
  40. package/build/components/InputBrowser.js +0 -34
  41. package/build/components/InputBrowser.js.map +0 -1
  42. package/build/components/InputError.js +0 -28
  43. package/build/components/InputError.js.map +0 -1
  44. package/build/components/MuxLogo.js +0 -437
  45. package/build/components/MuxLogo.js.map +0 -1
  46. package/build/components/Player.js +0 -292
  47. package/build/components/Player.js.map +0 -1
  48. package/build/components/Preview.js +0 -80
  49. package/build/components/Preview.js.map +0 -1
  50. package/build/components/SelectAsset.js +0 -94
  51. package/build/components/SelectAsset.js.map +0 -1
  52. package/build/components/Setup.js +0 -247
  53. package/build/components/Setup.js.map +0 -1
  54. package/build/components/SetupButton.js +0 -45
  55. package/build/components/SetupButton.js.map +0 -1
  56. package/build/components/SetupDialog.js +0 -34
  57. package/build/components/SetupDialog.js.map +0 -1
  58. package/build/components/SetupNotice.js +0 -38
  59. package/build/components/SetupNotice.js.map +0 -1
  60. package/build/components/Uploader.js +0 -319
  61. package/build/components/Uploader.js.map +0 -1
  62. package/build/components/Uploader.styles.js +0 -306
  63. package/build/components/Uploader.styles.js.map +0 -1
  64. package/build/components/VideoSource.js +0 -82
  65. package/build/components/VideoSource.js.map +0 -1
  66. package/build/components/VideoSource.styles.js +0 -165
  67. package/build/components/VideoSource.styles.js.map +0 -1
  68. package/build/config.js +0 -17
  69. package/build/config.js.map +0 -1
  70. package/build/index.js +0 -22
  71. package/build/index.js.map +0 -1
  72. package/build/schema/mux.video.js +0 -41
  73. package/build/schema/mux.video.js.map +0 -1
  74. package/build/schema/mux.videoAsset.js +0 -29
  75. package/build/schema/mux.videoAsset.js.map +0 -1
  76. package/build/util/areSecretsSignable.js +0 -11
  77. package/build/util/areSecretsSignable.js.map +0 -1
  78. package/build/util/extractFiles.js +0 -76
  79. package/build/util/extractFiles.js.map +0 -1
  80. package/build/util/generateJwt.js +0 -21
  81. package/build/util/generateJwt.js.map +0 -1
  82. package/build/util/getPlaybackId.js +0 -18
  83. package/build/util/getPlaybackId.js.map +0 -1
  84. package/build/util/getPlaybackPolicy.js +0 -13
  85. package/build/util/getPlaybackPolicy.js.map +0 -1
  86. package/build/util/getPosterSrc.js +0 -42
  87. package/build/util/getPosterSrc.js.map +0 -1
  88. package/build/util/getStoryboardSrc.js +0 -29
  89. package/build/util/getStoryboardSrc.js.map +0 -1
  90. package/build/util/getVideoSrc.js +0 -29
  91. package/build/util/getVideoSrc.js.map +0 -1
  92. package/build/util/isSigned.js +0 -28
  93. package/build/util/isSigned.js.map +0 -1
  94. package/build/util/types.js +0 -2
  95. package/build/util/types.js.map +0 -1
  96. package/config.dist.json +0 -3
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  > **NOTE**
4
4
  >
5
- > This is the **Sanity Studio v2 version** of sanity-plugin-mux-input.
5
+ > This is the **Sanity Studio v3 version** of sanity-plugin-mux-input.
6
6
  >
7
- > For the v3 version, please refer to the [main branch](https://github.com/sanity-io/sanity-plugin-mux-input).
7
+ > For the v2 version, please refer to the [studio-v2 branch](https://github.com/sanity-io/sanity-plugin-mux-input).
8
8
 
9
9
  This is a plugin that let you use [Mux](https://www.mux.com) video assets in your Sanity studio.
10
10
 
@@ -16,8 +16,8 @@ Not familiar with Sanity? [Visit www.sanity.io](https://www.sanity.io/)
16
16
 
17
17
  ## Quick start
18
18
 
19
- - While in your project folder, run `sanity install mux-input`.
20
- Read more about [using plugins in Sanity here](https://www.sanity.io/docs/plugins).
19
+ - While in your project folder, run `npm i sanity-plugin-mux-input`.
20
+ Read more about [using plugins in Sanity here](https://beta.sanity.io/docs/platform/studio/plugin).
21
21
 
22
22
  * Make a schema type that uses the plugin's type `mux.video`, for example:
23
23
 
@@ -67,12 +67,17 @@ More information for this feature of the plugin can be found on Mux's [documenta
67
67
 
68
68
  # Enabling MP4 support
69
69
 
70
- To enable [static MP4 renditions](https://docs.mux.com/guides/video/enable-static-mp4-renditions), create or open the config file found in `config/mux-input.json` in your studio folder. This file is automatically created the first time the studio starts after adding the plugin.
70
+ To enable [static MP4 renditions](https://docs.mux.com/guides/video/enable-static-mp4-renditions), add `mp4_support: 'standard'` to the `options` of your `mux.video` schema type.
71
+
72
+ js```
73
+ import {muxInput} from 'sanity-plugin-mux-input'
74
+
75
+ export deafult createConfig({
76
+ plugins: [muxInput({
77
+ mp4_support: "standard"
78
+ })]
79
+ })
71
80
 
72
- ```
73
- {
74
- "mp4_support": "standard"
75
- }
76
81
  ```
77
82
 
78
83
  Currently, `mp4_support` is the only supported MUX option and this supports a value of either `standard` or `none` (the default).
@@ -82,7 +87,7 @@ Currently, `mp4_support` is the only supported MUX option and this supports a va
82
87
  Issues are actively monitored and PRs are welcome. When developing this plugin the easiest setup is:
83
88
 
84
89
  1. Fork this repo.
85
- 1. Install the sanity cli and create a sanity project: `npm install -g @sanity/cli && sanity init`. Follow the prompts, starting out with the blog template is a good way to go.
90
+ 1. Create a studio v3 project: `npm create sanity@dev-preview`. Follow the prompts, starting out with the blog template is a good way to go.
86
91
  1. `cd` into your project directory, run `npm install && npm start` - your sanity studio should be running on http://localhost:3333.
87
92
  1. `cd` into the `plugins` directory of your project.
88
93
  1. Fork this repo and clone your fork into the `plugins` directory inside your project `git clone git@github.com:your-fork/sanity-plugin-mux-input.git`.
@@ -110,3 +115,4 @@ After Studio v3 turns stable this behavior will change. The v2 version will then
110
115
  # Test
111
116
 
112
117
  `npm test`
118
+ ```