sanity-plugin-mux-input 2.0.2 → 2.0.4

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 (49) hide show
  1. package/LICENSE +1 -1
  2. package/lib/_chunks/Input-4e0aa2ef.js +2652 -0
  3. package/lib/_chunks/Input-4e0aa2ef.js.map +1 -0
  4. package/lib/_chunks/Input-7fb0dcd2.js +2682 -0
  5. package/lib/_chunks/Input-7fb0dcd2.js.map +1 -0
  6. package/lib/_chunks/Preview-3e4c2ec9.js +26 -0
  7. package/lib/_chunks/{Preview-3195237b.js.map → Preview-3e4c2ec9.js.map} +1 -1
  8. package/lib/_chunks/Preview-e6f7e765.js +28 -0
  9. package/lib/_chunks/Preview-e6f7e765.js.map +1 -0
  10. package/lib/_chunks/VideoSource.styled-70d38762.js +336 -0
  11. package/lib/_chunks/VideoSource.styled-70d38762.js.map +1 -0
  12. package/lib/_chunks/VideoSource.styled-e880b6e4.js +318 -0
  13. package/lib/_chunks/VideoSource.styled-e880b6e4.js.map +1 -0
  14. package/lib/_chunks/index-a9d40189.js +248 -0
  15. package/lib/_chunks/index-a9d40189.js.map +1 -0
  16. package/lib/_chunks/index-adfcd166.js +265 -0
  17. package/lib/_chunks/index-adfcd166.js.map +1 -0
  18. package/lib/{src/index.d.ts → index.d.ts} +0 -0
  19. package/lib/index.esm.js +2 -1
  20. package/lib/index.esm.js.map +1 -1
  21. package/lib/index.js +9 -1
  22. package/lib/index.js.map +1 -1
  23. package/package.json +28 -35
  24. package/src/actions/assets.ts +1 -1
  25. package/src/actions/secrets.ts +12 -3
  26. package/src/actions/upload.ts +1 -1
  27. package/src/components/__legacy__Uploader.tsx +1 -1
  28. package/src/hooks/useSaveSecrets.ts +1 -1
  29. package/src/util/generateJwt.ts +1 -1
  30. package/src/util/getAnimatedPosterSrc.ts +1 -1
  31. package/src/util/getPosterSrc.ts +1 -1
  32. package/src/util/getStoryboardSrc.ts +1 -1
  33. package/src/util/getVideoSrc.ts +1 -1
  34. package/src/util/readSecrets.ts +1 -1
  35. package/lib/_chunks/Input-2ba004d3.js +0 -2
  36. package/lib/_chunks/Input-2ba004d3.js.map +0 -1
  37. package/lib/_chunks/Input-af5a0a66.esm.js +0 -2
  38. package/lib/_chunks/Input-af5a0a66.esm.js.map +0 -1
  39. package/lib/_chunks/Preview-3195237b.js +0 -2
  40. package/lib/_chunks/Preview-bb256342.esm.js +0 -2
  41. package/lib/_chunks/Preview-bb256342.esm.js.map +0 -1
  42. package/lib/_chunks/VideoSource.styled-1b994d90.js +0 -2
  43. package/lib/_chunks/VideoSource.styled-1b994d90.js.map +0 -1
  44. package/lib/_chunks/VideoSource.styled-f92259cd.esm.js +0 -2
  45. package/lib/_chunks/VideoSource.styled-f92259cd.esm.js.map +0 -1
  46. package/lib/_chunks/index-3d8d7583.esm.js +0 -2
  47. package/lib/_chunks/index-3d8d7583.esm.js.map +0 -1
  48. package/lib/_chunks/index-efe6ce48.js +0 -2
  49. package/lib/_chunks/index-efe6ce48.js.map +0 -1
@@ -0,0 +1,265 @@
1
+ 'use strict';
2
+
3
+ var _templateObject;
4
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
5
+ var sanity = require('sanity');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var React = require('react');
8
+ var ui = require('@sanity/ui');
9
+ var scrollIntoView = require('scroll-into-view-if-needed');
10
+ var suspendReact = require('suspend-react');
11
+ var useErrorBoundary = require('use-error-boundary');
12
+ var styled = require('styled-components');
13
+ function _interopDefaultCompat(e) {
14
+ return e && typeof e === 'object' && 'default' in e ? e : {
15
+ default: e
16
+ };
17
+ }
18
+ var scrollIntoView__default = /*#__PURE__*/_interopDefaultCompat(scrollIntoView);
19
+ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
20
+ function isMuxInputProps(props) {
21
+ var _a;
22
+ return sanity.isObjectInputProps(props) && ((_a = props.schemaType.type) == null ? void 0 : _a.name) === "mux.video";
23
+ }
24
+ function isMuxInputPreviewProps(props) {
25
+ var _a, _b;
26
+ return ((_b = (_a = props.schemaType) == null ? void 0 : _a.type) == null ? void 0 : _b.name) === "mux.video";
27
+ }
28
+ const name = "mux-input";
29
+ const cacheNs = "sanity-plugin-mux-input";
30
+ const muxSecretsDocumentId = "secrets.mux";
31
+ function ErrorBoundaryCard(props) {
32
+ const {
33
+ children,
34
+ schemaType
35
+ } = props;
36
+ const {
37
+ push: pushToast
38
+ } = ui.useToast();
39
+ const errorRef = React.useRef(null);
40
+ const {
41
+ ErrorBoundary,
42
+ didCatch,
43
+ error,
44
+ reset
45
+ } = useErrorBoundary.useErrorBoundary({
46
+ onDidCatch: (err, errorInfo) => {
47
+ console.group(err.toString());
48
+ console.groupCollapsed("console.error");
49
+ console.error(err);
50
+ console.groupEnd();
51
+ if (err.stack) {
52
+ console.groupCollapsed("error.stack");
53
+ console.log(err.stack);
54
+ console.groupEnd();
55
+ }
56
+ if (errorInfo == null ? void 0 : errorInfo.componentStack) {
57
+ console.groupCollapsed("errorInfo.componentStack");
58
+ console.log(errorInfo.componentStack);
59
+ console.groupEnd();
60
+ }
61
+ console.groupEnd();
62
+ pushToast({
63
+ status: "error",
64
+ title: "Plugin crashed",
65
+ description: /* @__PURE__ */jsxRuntime.jsx(ui.Flex, {
66
+ align: "center",
67
+ children: /* @__PURE__ */jsxRuntime.jsxs(ui.Inline, {
68
+ space: 1,
69
+ children: ["An error happened while rendering", /* @__PURE__ */jsxRuntime.jsx(ui.Button, {
70
+ padding: 1,
71
+ fontSize: 1,
72
+ style: {
73
+ transform: "translateY(1px)"
74
+ },
75
+ mode: "ghost",
76
+ text: schemaType.title,
77
+ onClick: () => {
78
+ if (errorRef.current) {
79
+ scrollIntoView__default.default(errorRef.current, {
80
+ behavior: "smooth",
81
+ scrollMode: "if-needed",
82
+ block: "center"
83
+ });
84
+ }
85
+ }
86
+ })]
87
+ })
88
+ })
89
+ });
90
+ }
91
+ });
92
+ const handleRetry = React.useCallback(() => {
93
+ suspendReact.clear([name]);
94
+ reset();
95
+ }, [reset]);
96
+ if (didCatch) {
97
+ return /* @__PURE__ */jsxRuntime.jsx(ui.Card, {
98
+ ref: errorRef,
99
+ paddingX: [2, 3, 4, 4],
100
+ height: "fill",
101
+ shadow: 1,
102
+ overflow: "auto",
103
+ children: /* @__PURE__ */jsxRuntime.jsx(ui.Flex, {
104
+ justify: "flex-start",
105
+ align: "center",
106
+ height: "fill",
107
+ children: /* @__PURE__ */jsxRuntime.jsxs(ui.Grid, {
108
+ columns: 1,
109
+ gap: [2, 3, 4, 4],
110
+ children: [/* @__PURE__ */jsxRuntime.jsxs(ui.Heading, {
111
+ as: "h1",
112
+ children: ["The ", /* @__PURE__ */jsxRuntime.jsx("code", {
113
+ children: name
114
+ }), " plugin crashed"]
115
+ }), (error == null ? void 0 : error.message) && /* @__PURE__ */jsxRuntime.jsx(ui.Card, {
116
+ padding: 3,
117
+ tone: "critical",
118
+ shadow: 1,
119
+ radius: 2,
120
+ children: /* @__PURE__ */jsxRuntime.jsx(ui.Text, {
121
+ children: error.message
122
+ })
123
+ }), /* @__PURE__ */jsxRuntime.jsx(ui.Inline, {
124
+ children: /* @__PURE__ */jsxRuntime.jsx(ui.Button, {
125
+ onClick: handleRetry,
126
+ text: "Retry"
127
+ })
128
+ })]
129
+ })
130
+ })
131
+ });
132
+ }
133
+ return /* @__PURE__ */jsxRuntime.jsx(ErrorBoundary, {
134
+ children
135
+ });
136
+ }
137
+ var ErrorBoundaryCard$1 = React.memo(ErrorBoundaryCard);
138
+ const AspectRatioCard = styled__default.default(ui.Card)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n aspect-ratio: 16 / 9;\n position: relative;\n width: 100%;\n"])));
139
+ const InputFallback = () => {
140
+ return /* @__PURE__ */jsxRuntime.jsx("div", {
141
+ style: {
142
+ padding: 1
143
+ },
144
+ children: /* @__PURE__ */jsxRuntime.jsx(ui.Card, {
145
+ shadow: 1,
146
+ sizing: "border",
147
+ style: {
148
+ aspectRatio: "16/9",
149
+ width: "100%",
150
+ borderRadius: "1px"
151
+ },
152
+ children: /* @__PURE__ */jsxRuntime.jsxs(ui.Flex, {
153
+ align: "center",
154
+ direction: "column",
155
+ height: "fill",
156
+ justify: "center",
157
+ children: [/* @__PURE__ */jsxRuntime.jsx(ui.Spinner, {
158
+ muted: true
159
+ }), /* @__PURE__ */jsxRuntime.jsx(ui.Box, {
160
+ marginTop: 3,
161
+ children: /* @__PURE__ */jsxRuntime.jsx(ui.Text, {
162
+ align: "center",
163
+ muted: true,
164
+ size: 1,
165
+ children: "Loading\u2026"
166
+ })
167
+ })]
168
+ })
169
+ })
170
+ });
171
+ };
172
+ const Input = React.lazy(() => Promise.resolve().then(function () {
173
+ return require('./Input-7fb0dcd2.js');
174
+ }));
175
+ var createFormInput = config => React.memo(function FormInput(props) {
176
+ if (isMuxInputProps(props)) {
177
+ return /* @__PURE__ */jsxRuntime.jsx(AspectRatioCard, {
178
+ children: /* @__PURE__ */jsxRuntime.jsx(ErrorBoundaryCard$1, {
179
+ schemaType: props.schemaType,
180
+ children: /* @__PURE__ */jsxRuntime.jsx(React.Suspense, {
181
+ fallback: /* @__PURE__ */jsxRuntime.jsx(InputFallback, {}),
182
+ children: /* @__PURE__ */jsxRuntime.jsx(Input, {
183
+ config,
184
+ ...props
185
+ })
186
+ })
187
+ })
188
+ });
189
+ }
190
+ return props.renderDefault(props);
191
+ });
192
+ const Preview = React.lazy(() => Promise.resolve().then(function () {
193
+ return require('./Preview-e6f7e765.js');
194
+ }));
195
+ var FormPreview = React.memo(function FormPreview(props) {
196
+ if (isMuxInputPreviewProps(props)) {
197
+ return /* @__PURE__ */jsxRuntime.jsx(AspectRatioCard, {
198
+ children: /* @__PURE__ */jsxRuntime.jsx(Preview, {
199
+ ...props
200
+ })
201
+ });
202
+ }
203
+ return props.renderDefault(props);
204
+ });
205
+ const defaultConfig = {
206
+ mp4_support: "none"
207
+ };
208
+ const muxInput = sanity.definePlugin(userConfig => {
209
+ const config = {
210
+ ...defaultConfig,
211
+ ...userConfig
212
+ };
213
+ const InputComponent = createFormInput(config);
214
+ return {
215
+ name: "mux-input",
216
+ form: {
217
+ components: {
218
+ input: InputComponent,
219
+ preview: FormPreview
220
+ }
221
+ },
222
+ schema: {
223
+ types: [{
224
+ name: "mux.video",
225
+ type: "object",
226
+ title: "Video asset reference",
227
+ fields: [{
228
+ title: "Video",
229
+ name: "asset",
230
+ type: "reference",
231
+ weak: true,
232
+ to: [{
233
+ type: "mux.videoAsset"
234
+ }]
235
+ }]
236
+ }, {
237
+ name: "mux.videoAsset",
238
+ type: "object",
239
+ title: "Video asset",
240
+ fields: [{
241
+ type: "string",
242
+ name: "status"
243
+ }, {
244
+ type: "string",
245
+ name: "assetId"
246
+ }, {
247
+ type: "string",
248
+ name: "playbackId"
249
+ }, {
250
+ type: "string",
251
+ name: "filename"
252
+ }, {
253
+ type: "number",
254
+ name: "thumbTime"
255
+ }]
256
+ }]
257
+ }
258
+ };
259
+ });
260
+ exports.InputFallback = InputFallback;
261
+ exports.cacheNs = cacheNs;
262
+ exports.defaultConfig = defaultConfig;
263
+ exports.muxInput = muxInput;
264
+ exports.muxSecretsDocumentId = muxSecretsDocumentId;
265
+ //# sourceMappingURL=index-adfcd166.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-adfcd166.js","sources":["../../src/util/asserters.ts","../../src/util/constants.ts","../../src/components/ErrorBoundaryCard.tsx","../../src/components/Input.styled.tsx","../../src/components/FormInput.tsx","../../src/components/FormPreview.tsx","../../src/index.ts"],"sourcesContent":["import {type InputProps, type PreviewLayoutKey, type PreviewProps, isObjectInputProps} from 'sanity'\n\nimport type {MuxInputPreviewProps, MuxInputProps} from './types'\n\nexport function isMuxInputProps(props: InputProps): props is MuxInputProps {\n return isObjectInputProps(props) && props.schemaType.type?.name === 'mux.video'\n}\n\nexport function isMuxInputPreviewProps(\n props: PreviewProps<PreviewLayoutKey>\n): props is MuxInputPreviewProps {\n return props.schemaType?.type?.name === 'mux.video'\n}\n","export const name = 'mux-input' as const\n\n// Caching namespace, as suspend-react might be in use by other components on the page we must ensure we don't collide\nexport const cacheNs = 'sanity-plugin-mux-input' as const\n\nexport const muxSecretsDocumentId = 'secrets.mux' as const\n","/* eslint-disable no-console */\nimport {Button, Card, Flex, Grid, Heading, Inline, Text, useToast} from '@sanity/ui'\nimport React, {memo, useCallback, useRef} from 'react'\nimport scrollIntoView from 'scroll-into-view-if-needed'\nimport {clear} from 'suspend-react'\nimport {useErrorBoundary} from 'use-error-boundary'\n\nimport {name} from '../util/constants'\nimport {type MuxInputProps} from '../util/types'\n\nexport interface Props extends Pick<MuxInputProps, 'schemaType'> {\n children: React.ReactNode\n}\nfunction ErrorBoundaryCard(props: Props) {\n const {children, schemaType} = props\n const {push: pushToast} = useToast()\n const errorRef = useRef(null)\n const {ErrorBoundary, didCatch, error, reset} = useErrorBoundary({\n onDidCatch: (err, errorInfo) => {\n console.group(err.toString())\n console.groupCollapsed('console.error')\n console.error(err)\n console.groupEnd()\n if (err.stack) {\n console.groupCollapsed('error.stack')\n console.log(err.stack)\n console.groupEnd()\n }\n if (errorInfo?.componentStack) {\n console.groupCollapsed('errorInfo.componentStack')\n console.log(errorInfo.componentStack)\n console.groupEnd()\n }\n console.groupEnd()\n pushToast({\n status: 'error',\n title: 'Plugin crashed',\n description: (\n <Flex align=\"center\">\n <Inline space={1}>\n An error happened while rendering\n <Button\n padding={1}\n fontSize={1}\n style={{transform: 'translateY(1px)'}}\n mode=\"ghost\"\n text={schemaType.title}\n onClick={() => {\n if (errorRef.current) {\n scrollIntoView(errorRef.current, {\n behavior: 'smooth',\n scrollMode: 'if-needed',\n block: 'center',\n })\n }\n }}\n />\n </Inline>\n </Flex>\n ),\n })\n },\n })\n const handleRetry = useCallback(() => {\n // Purge request cache before retrying, otherwise the cached errors will rethrow\n clear([name])\n\n reset()\n }, [reset])\n\n if (didCatch) {\n return (\n <Card ref={errorRef} paddingX={[2, 3, 4, 4]} height=\"fill\" shadow={1} overflow=\"auto\">\n <Flex justify=\"flex-start\" align=\"center\" height=\"fill\">\n <Grid columns={1} gap={[2, 3, 4, 4]}>\n <Heading as=\"h1\">\n The <code>{name}</code> plugin crashed\n </Heading>\n {error?.message && (\n <Card padding={3} tone=\"critical\" shadow={1} radius={2}>\n <Text>{error.message}</Text>\n </Card>\n )}\n <Inline>\n <Button onClick={handleRetry} text=\"Retry\" />\n </Inline>\n </Grid>\n </Flex>\n </Card>\n )\n }\n\n return <ErrorBoundary>{children}</ErrorBoundary>\n}\n\nexport default memo(ErrorBoundaryCard)\n","import {Box, Card, Flex, Spinner, Text} from '@sanity/ui'\nimport React from 'react'\nimport styled from 'styled-components'\n\n// This container base container ensures everything uses the same aspect ratio, avoids layout shifts and stuff jumping around\nexport const AspectRatioCard = styled(Card)`\n aspect-ratio: 16 / 9;\n position: relative;\n width: 100%;\n`\n\nexport const InputFallback = () => {\n return (\n <div style={{padding: 1}}>\n <Card\n shadow={1}\n sizing=\"border\"\n style={{aspectRatio: '16/9', width: '100%', borderRadius: '1px'}}\n >\n <Flex align=\"center\" direction=\"column\" height=\"fill\" justify=\"center\">\n <Spinner muted />\n <Box marginTop={3}>\n <Text align=\"center\" muted size={1}>\n Loading…\n </Text>\n </Box>\n </Flex>\n </Card>\n </div>\n )\n}\n","import React, {lazy, memo, Suspense} from 'react'\nimport {type InputProps} from 'sanity'\n\nimport {isMuxInputProps} from '../util/asserters'\nimport {type Config} from '../util/types'\nimport ErrorBoundaryCard from './ErrorBoundaryCard'\nimport {AspectRatioCard, InputFallback} from './Input.styled'\n\nconst Input = lazy(() => import('./Input'))\n\n// eslint-disable-next-line import/no-anonymous-default-export\nexport default (config: Config) =>\n memo(function FormInput(props: InputProps) {\n if (isMuxInputProps(props)) {\n return (\n <AspectRatioCard>\n <ErrorBoundaryCard schemaType={props.schemaType}>\n <Suspense fallback={<InputFallback />}>\n <Input config={config} {...props} />\n </Suspense>\n </ErrorBoundaryCard>\n </AspectRatioCard>\n )\n }\n return props.renderDefault(props)\n })\n","import React, {lazy, memo} from 'react'\nimport {PreviewLayoutKey, PreviewProps} from 'sanity'\n\nimport {isMuxInputPreviewProps} from '../util/asserters'\nimport {AspectRatioCard} from './Input.styled'\n\nconst Preview = lazy(() => import('./Preview'))\n\nexport default memo(function FormPreview(props: PreviewProps<PreviewLayoutKey>) {\n if (isMuxInputPreviewProps(props)) {\n return (\n <AspectRatioCard>\n {/* @ts-expect-error */}\n <Preview {...props} />\n </AspectRatioCard>\n )\n }\n return props.renderDefault(props)\n})\n","import {definePlugin} from 'sanity'\n\nimport createFormInput from './components/FormInput'\nimport FormPreview from './components/FormPreview'\nimport {type Config} from './util/types'\n\nexport const defaultConfig: Config = {\n mp4_support: 'none',\n}\n\nexport const muxInput = definePlugin<Partial<Config> | void>((userConfig) => {\n const config: Config = {...defaultConfig, ...userConfig}\n const InputComponent = createFormInput(config)\n return {\n name: 'mux-input',\n form: {\n components: {\n input: InputComponent,\n preview: FormPreview,\n },\n },\n schema: {\n types: [\n {\n name: 'mux.video',\n type: 'object',\n title: 'Video asset reference',\n fields: [\n {\n title: 'Video',\n name: 'asset',\n type: 'reference',\n weak: true,\n to: [{type: 'mux.videoAsset'}],\n },\n ],\n },\n {\n name: 'mux.videoAsset',\n type: 'object',\n title: 'Video asset',\n fields: [\n {\n type: 'string',\n name: 'status',\n },\n {\n type: 'string',\n name: 'assetId',\n },\n {\n type: 'string',\n name: 'playbackId',\n },\n {\n type: 'string',\n name: 'filename',\n },\n {\n type: 'number',\n name: 'thumbTime',\n },\n ],\n },\n ],\n },\n }\n})\n"],"names":["isMuxInputProps","props","_a","isObjectInputProps","schemaType","type","name","isMuxInputPreviewProps","_b","cacheNs","muxSecretsDocumentId","ErrorBoundaryCard","children","push","pushToast","useToast","errorRef","useRef","ErrorBoundary","didCatch","error","reset","useErrorBoundary","onDidCatch","err","errorInfo","console","group","toString","groupCollapsed","groupEnd","stack","log","componentStack","status","title","description","Flex","align","jsxs","Inline","space","jsx","Button","padding","fontSize","style","transform","mode","text","onClick","current","scrollIntoView","default","behavior","scrollMode","block","handleRetry","useCallback","clear","Card","ref","paddingX","height","shadow","overflow","justify","Grid","columns","gap","Heading","as","message","tone","radius","Text","memo","AspectRatioCard","styled","InputFallback","sizing","aspectRatio","width","borderRadius","direction","Spinner","muted","Box","marginTop","size","Input","lazy","Promise","resolve","then","require","createFormInput","config","FormInput","Suspense","fallback","renderDefault","Preview","FormPreview","defaultConfig","mp4_support","muxInput","definePlugin","userConfig","InputComponent","form","components","input","preview","schema","types","fields","weak","to"],"mappings":";;;;;;;;;;;;;;;;;;;AAIO,SAASA,gBAAgBC,KAA2C,EAAA;EAJ3E,IAAAC,EAAA;EAKE,OAAOC,0BAAmBF,KAAK,CAAA,IAAA,CAAA,CAAKC,WAAME,UAAW,CAAAC,IAAA,KAAjB,mBAAuBC,IAAS,MAAA,WAAA;AACtE;AAEO,SAASC,uBACdN,KAC+B,EAAA;EAVjC,IAAAC,EAAA,EAAAM,EAAA;EAWE,OAAA,CAAA,CAAOA,EAAM,GAAA,CAAAN,EAAA,GAAAD,KAAA,CAAAG,UAAA,KAAN,IAAkB,GAAA,KAAA,CAAA,GAAAF,EAAA,CAAAG,IAAA,KAAlB,mBAAwBC,IAAS,MAAA,WAAA;AAC1C;ACZO,MAAMA,IAAO,GAAA,WAAA;AAGb,MAAMG,OAAU,GAAA,yBAAA;AAEhB,MAAMC,oBAAuB,GAAA,aAAA;ACQpC,SAASC,kBAAkBV,KAAc,EAAA;EACjC,MAAA;IAACW,QAAU;IAAAR;EAAc,CAAA,GAAAH,KAAA;EAC/B,MAAM;IAACY,IAAA,EAAMC;EAAS,CAAA,GAAIC,EAAS,CAAAA,QAAA,EAAA;EAC7B,MAAAC,QAAA,GAAWC,aAAO,IAAI,CAAA;EAC5B,MAAM;IAACC,aAAe;IAAAC,QAAA;IAAUC,KAAO;IAAAC;EAAA,IAASC,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AM,EAAA,QAAA;UACNC,IAAM,EAAA;QACR,CAAA,EACA;UACED,IAAM,EAAA,QAAA;UACNC,IAAM,EAAA;QACR,CAAA,EACA;UACED,IAAM,EAAA,QAAA;UACNC,IAAM,EAAA;QACR,CAAA,EACA;UACED,IAAM,EAAA,QAAA;UACNC,IAAM,EAAA;QACR,CAAA;MAEJ,CAAA;IAEJ;EAAA,CACF;AACF,CAAC,CAAA;;;;;"}
File without changes
package/lib/index.esm.js CHANGED
@@ -1,2 +1,3 @@
1
- import"sanity";export{d as defaultConfig,a as muxInput}from"./_chunks/index-3d8d7583.esm.js";import"react/jsx-runtime";import"react";import"@sanity/ui";import"scroll-into-view-if-needed";import"suspend-react";import"use-error-boundary";import"styled-components";
1
+ import 'sanity';
2
+ export { defaultConfig, muxInput } from './_chunks/index-a9d40189.js';
2
3
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/lib/index.js CHANGED
@@ -1,2 +1,10 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("sanity");var e=require("./_chunks/index-efe6ce48.js");require("react/jsx-runtime"),require("react"),require("@sanity/ui"),require("scroll-into-view-if-needed"),require("suspend-react"),require("use-error-boundary"),require("styled-components"),exports.defaultConfig=e.defaultConfig,exports.muxInput=e.muxInput;
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ });
6
+ require('sanity');
7
+ var index = require('./_chunks/index-adfcd166.js');
8
+ exports.defaultConfig = index.defaultConfig;
9
+ exports.muxInput = index.muxInput;
2
10
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sanity-plugin-mux-input",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "An input component that integrates Sanity Studio with Mux video encoding/hosting service.",
5
5
  "keywords": [
6
6
  "sanity",
@@ -23,7 +23,7 @@
23
23
  "author": "Sanity.io <hello@sanity.io>",
24
24
  "exports": {
25
25
  ".": {
26
- "types": "./lib/src/index.d.ts",
26
+ "types": "./lib/index.d.ts",
27
27
  "source": "./src/index.ts",
28
28
  "import": "./lib/index.esm.js",
29
29
  "require": "./lib/index.js",
@@ -34,46 +34,39 @@
34
34
  "main": "./lib/index.js",
35
35
  "module": "./lib/index.esm.js",
36
36
  "source": "./src/index.ts",
37
- "types": "./lib/src/index.d.ts",
37
+ "types": "./lib/index.d.ts",
38
38
  "files": [
39
- "src",
40
39
  "lib",
41
- "v2-incompatible.js",
42
- "sanity.json"
40
+ "sanity.json",
41
+ "src",
42
+ "v2-incompatible.js"
43
43
  ],
44
44
  "scripts": {
45
45
  "prebuild": "npm run clean && plugin-kit verify-package --silent && pkg-utils",
46
- "build": "pkg-utils build --strict",
46
+ "build": "run-s clean && plugin-kit verify-package --silent && pkg-utils build --strict && pkg-utils --strict",
47
47
  "clean": "rimraf lib",
48
48
  "dev": "next dev",
49
49
  "link-watch": "plugin-kit link-watch",
50
50
  "lint": "eslint .",
51
51
  "prepare": "husky install || true",
52
- "prepublishOnly": "npm run build",
52
+ "prepublishOnly": "run-s build",
53
53
  "test": "npm run lint && npm run type-check && npm run build",
54
54
  "type-check": "tsc --noEmit",
55
- "watch": "pkg-utils watch"
56
- },
57
- "prettier": {
58
- "arrowParens": "always",
59
- "bracketSpacing": false,
60
- "printWidth": 100,
61
- "semi": false,
62
- "singleQuote": true,
63
- "trailingComma": "es5"
55
+ "watch": "pkg-utils watch --strict",
56
+ "format": "prettier --write --cache --ignore-unknown ."
64
57
  },
65
58
  "dependencies": {
66
59
  "@mux/playback-core": "^0.11.0",
67
60
  "@mux/upchunk": "^3.0.0",
68
- "@sanity/icons": "^2.1.0",
69
- "@sanity/incompatible-plugin": "^1.0.4",
70
- "@sanity/ui": "^1.0.0",
71
- "@sanity/uuid": "^3.0.1",
61
+ "@sanity/icons": "^2",
62
+ "@sanity/incompatible-plugin": "^1",
63
+ "@sanity/ui": "^1",
64
+ "@sanity/uuid": "^3",
72
65
  "classnames": "^2.3.2",
73
66
  "jsonwebtoken-esm": "^1.0.3",
74
67
  "media-chrome": "^0.16.0",
75
68
  "motion": "^10.14.3",
76
- "rxjs": "^6",
69
+ "rxjs": "^7",
77
70
  "scroll-into-view-if-needed": "^3.0.3",
78
71
  "suspend-react": "^0.0.8",
79
72
  "swr": "^1.3.0",
@@ -83,44 +76,44 @@
83
76
  "devDependencies": {
84
77
  "@commitlint/cli": "^17.2.0",
85
78
  "@commitlint/config-conventional": "^17.2.0",
86
- "@sanity/eslint-config-no-v2-imports": "0.0.1-studio-v3.3",
87
- "@sanity/pkg-utils": "^1.20.1",
88
- "@sanity/plugin-kit": "^2.1.19",
79
+ "@sanity/pkg-utils": "^2.1.0",
80
+ "@sanity/plugin-kit": "^3.1.1",
89
81
  "@sanity/semantic-release-preset": "^2.0.2",
90
82
  "@sanity/vision": "^3.0.0",
91
- "@types/react": "^18.0.25",
83
+ "@types/react": "^18.0.26",
92
84
  "@types/styled-components": "^5.1.26",
93
- "@typescript-eslint/eslint-plugin": "^5.42.1",
94
- "@typescript-eslint/parser": "^5.42.1",
85
+ "@typescript-eslint/eslint-plugin": "^5.48.0",
86
+ "@typescript-eslint/parser": "^5.48.0",
95
87
  "cz-conventional-changelog": "^3.3.0",
96
- "eslint": "^8.27.0",
97
- "eslint-config-prettier": "^8.5.0",
88
+ "eslint": "^8.31.0",
89
+ "eslint-config-prettier": "^8.6.0",
98
90
  "eslint-config-react-app": "^7.0.1",
99
91
  "eslint-config-sanity": "^6.0.0",
100
92
  "eslint-plugin-import": "^2.26.0",
101
93
  "eslint-plugin-prettier": "^4.2.1",
102
- "eslint-plugin-react": "^7.31.10",
94
+ "eslint-plugin-react": "^7.31.11",
103
95
  "eslint-plugin-react-hooks": "^4.6.0",
104
96
  "eslint-plugin-simple-import-sort": "^8.0.0",
105
97
  "husky": "^8.0.2",
106
98
  "lint-staged": "^13.0.3",
107
99
  "next": "^13.0.2",
108
100
  "next-sanity": "^1.0.9",
109
- "prettier": "^2.7.1",
101
+ "npm-run-all": "^4.1.5",
102
+ "prettier": "^2.8.1",
110
103
  "prettier-plugin-packagejson": "^2.3.0",
111
104
  "react": "^18.2.0",
112
105
  "react-dom": "^18.2.0",
113
106
  "react-is": "^18.2.0",
114
107
  "rimraf": "^3.0.2",
115
- "sanity": "^3.0.0",
108
+ "sanity": "^3.1.4",
116
109
  "styled-components": "^5.3.6",
117
110
  "type-fest": "^3.2.0",
118
- "typescript": "^4.8.4"
111
+ "typescript": "^4.9.4"
119
112
  },
120
113
  "peerDependencies": {
121
114
  "react": "^18",
122
115
  "react-is": "^18",
123
- "sanity": "^3.0.0",
116
+ "sanity": "^3",
124
117
  "styled-components": "^5.2"
125
118
  },
126
119
  "engines": {
@@ -1,4 +1,4 @@
1
- import type {SanityClient} from '@sanity/client'
1
+ import type {SanityClient} from 'sanity'
2
2
 
3
3
  import type {MuxAsset} from '../util/types'
4
4
 
@@ -1,6 +1,15 @@
1
- import type {SanityClient} from '@sanity/client'
1
+ import type {SanityClient} from 'sanity'
2
2
  import {defer} from 'rxjs'
3
3
 
4
+ interface SecretsDocument {
5
+ _id: 'secrets.mux'
6
+ _type: 'mux.apiKey'
7
+ token: string
8
+ secretKey: string
9
+ enableSignedUrls: boolean
10
+ signingKeyId: string
11
+ signingKeyPrivate: string
12
+ }
4
13
  // eslint-disable-next-line max-params
5
14
  export function saveSecrets(
6
15
  client: SanityClient,
@@ -9,8 +18,8 @@ export function saveSecrets(
9
18
  enableSignedUrls: boolean,
10
19
  signingKeyId: string,
11
20
  signingKeyPrivate: string
12
- ) {
13
- const doc = {
21
+ ): Promise<SecretsDocument> {
22
+ const doc: SecretsDocument = {
14
23
  _id: 'secrets.mux',
15
24
  _type: 'mux.apiKey',
16
25
  token,
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable camelcase */
2
- import type {SanityClient} from '@sanity/client'
2
+ import type {SanityClient} from 'sanity'
3
3
  import {uuid as generateUuid} from '@sanity/uuid'
4
4
  import {type Observable, concat, defer, from, of, throwError} from 'rxjs'
5
5
  import {catchError, mergeMap, mergeMapTo, switchMap} from 'rxjs/operators'
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-nested-ternary */
2
2
  // This component needs to be refactored into a functional component
3
3
 
4
- import type {SanityClient} from '@sanity/client'
4
+ import type {SanityClient} from 'sanity'
5
5
  import React, {Component} from 'react'
6
6
  import {type Observable, Subject} from 'rxjs'
7
7
  import {takeUntil, tap} from 'rxjs/operators'
@@ -1,4 +1,4 @@
1
- import type {SanityClient} from '@sanity/client'
1
+ import type {SanityClient} from 'sanity'
2
2
  import {useCallback} from 'react'
3
3
 
4
4
  import {createSigningKeys, haveValidSigningKeys, saveSecrets, testSecrets} from '../actions/secrets'
@@ -1,4 +1,4 @@
1
- import type {SanityClient} from '@sanity/client'
1
+ import type {SanityClient} from 'sanity'
2
2
  import {suspend} from 'suspend-react'
3
3
 
4
4
  import {readSecrets} from './readSecrets'
@@ -1,4 +1,4 @@
1
- import type {SanityClient} from '@sanity/client'
1
+ import type {SanityClient} from 'sanity'
2
2
 
3
3
  import {generateJwt} from './generateJwt'
4
4
  import {getPlaybackId} from './getPlaybackId'
@@ -1,4 +1,4 @@
1
- import type {SanityClient} from '@sanity/client'
1
+ import type {SanityClient} from 'sanity'
2
2
 
3
3
  import {generateJwt} from './generateJwt'
4
4
  import {getPlaybackId} from './getPlaybackId'
@@ -1,4 +1,4 @@
1
- import type {SanityClient} from '@sanity/client'
1
+ import type {SanityClient} from 'sanity'
2
2
 
3
3
  import {generateJwt} from './generateJwt'
4
4
  import {getPlaybackId} from './getPlaybackId'
@@ -1,4 +1,4 @@
1
- import type {SanityClient} from '@sanity/client'
1
+ import type {SanityClient} from 'sanity'
2
2
 
3
3
  import {generateJwt} from './generateJwt'
4
4
  import {getPlaybackId} from './getPlaybackId'
@@ -4,7 +4,7 @@
4
4
 
5
5
  // @TODO rename to readSigningPair
6
6
 
7
- import type {SanityClient} from '@sanity/client'
7
+ import type {SanityClient} from 'sanity'
8
8
  import {suspend} from 'suspend-react'
9
9
 
10
10
  import {cacheNs} from '../util/constants'