sanity-plugin-mux-input 4.1.1 → 4.1.2
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 +37 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useClient as useClient$1, createHookFromObservableFactory, useDocumentStore, collate, useDocumentValues, truncateString, useFormattedDuration, SanityDefaultPreview, useTimeAgo, TextWithTone, isRecord, getPreviewStateObservable, DocumentPreviewPresence, getPreviewValueWithFallback, useDocumentPreviewStore, useSchema, useDocumentPresence, PreviewCard, useCurrentUser, isReference, useProjectId, useDataset, PatchEvent, unset, setIfMissing, set, LinearProgress, FormField as FormField$2, definePlugin } from "sanity";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { SearchIcon } from "@sanity/icons/Search";
|
|
4
4
|
import { Dialog, Stack, Card, Text, Button, useTheme_v2, Flex, Box, TextInput, Checkbox, Code, Inline, Spinner, Heading, Label as Label$1, Radio, MenuButton, Menu, MenuItem, useToast, Autocomplete, Tooltip, TabList, Tab, TabPanel, Grid, useClickOutsideEvent, Popover, MenuDivider, rem } from "@sanity/ui";
|
|
5
5
|
import { createContext, useState, useCallback, useMemo, useContext, useReducer, useId, memo, useRef, useEffect, Suspense, isValidElement } from "react";
|
|
6
6
|
import compact from "lodash/compact.js";
|
|
@@ -11,20 +11,54 @@ import words from "lodash/words.js";
|
|
|
11
11
|
import { suspend, clear, preload } from "suspend-react";
|
|
12
12
|
import { defer, timer, of, Observable, concat, throwError, from, Subject } from "rxjs";
|
|
13
13
|
import { styled, css } from "styled-components";
|
|
14
|
+
import { CheckmarkCircleIcon } from "@sanity/icons/CheckmarkCircle";
|
|
15
|
+
import { ErrorOutlineIcon } from "@sanity/icons/ErrorOutline";
|
|
16
|
+
import { InfoOutlineIcon } from "@sanity/icons/InfoOutline";
|
|
17
|
+
import { RetrieveIcon } from "@sanity/icons/Retrieve";
|
|
18
|
+
import { RetryIcon } from "@sanity/icons/Retry";
|
|
14
19
|
import { uuid } from "@sanity/uuid";
|
|
15
20
|
import { expand, concatMap, tap, switchMap, mergeMap, catchError, mergeMapTo, takeUntil } from "rxjs/operators";
|
|
21
|
+
import { ChevronLeftIcon } from "@sanity/icons/ChevronLeft";
|
|
22
|
+
import { ChevronRightIcon } from "@sanity/icons/ChevronRight";
|
|
23
|
+
import { SyncIcon } from "@sanity/icons/Sync";
|
|
24
|
+
import { SortIcon } from "@sanity/icons/Sort";
|
|
25
|
+
import { CalendarIcon } from "@sanity/icons/Calendar";
|
|
26
|
+
import { CheckmarkIcon } from "@sanity/icons/Checkmark";
|
|
27
|
+
import { ClockIcon } from "@sanity/icons/Clock";
|
|
28
|
+
import { CropIcon } from "@sanity/icons/Crop";
|
|
29
|
+
import { EditIcon } from "@sanity/icons/Edit";
|
|
30
|
+
import { RevertIcon } from "@sanity/icons/Revert";
|
|
31
|
+
import { TagIcon } from "@sanity/icons/Tag";
|
|
32
|
+
import { TrashIcon } from "@sanity/icons/Trash";
|
|
33
|
+
import { DownloadIcon } from "@sanity/icons/Download";
|
|
34
|
+
import { AddIcon } from "@sanity/icons/Add";
|
|
35
|
+
import { ChevronDownIcon } from "@sanity/icons/ChevronDown";
|
|
36
|
+
import { ChevronUpIcon } from "@sanity/icons/ChevronUp";
|
|
37
|
+
import { TranslateIcon } from "@sanity/icons/Translate";
|
|
38
|
+
import { UploadIcon } from "@sanity/icons/Upload";
|
|
16
39
|
import LanguagesList from "iso-639-1";
|
|
17
40
|
import MuxPlayer from "@mux/mux-player-react/lazy";
|
|
18
41
|
import { getDevicePixelRatio } from "use-device-pixel-ratio";
|
|
42
|
+
import { DocumentIcon } from "@sanity/icons/Document";
|
|
19
43
|
import { IntentLink } from "sanity/router";
|
|
44
|
+
import { WarningOutlineIcon } from "@sanity/icons/WarningOutline";
|
|
20
45
|
import isNumber from "lodash/isNumber.js";
|
|
21
46
|
import isString from "lodash/isString.js";
|
|
22
47
|
import { useObservable } from "react-rx";
|
|
48
|
+
import { PublishIcon } from "@sanity/icons/Publish";
|
|
49
|
+
import { LockIcon } from "@sanity/icons/Lock";
|
|
50
|
+
import { PlayIcon } from "@sanity/icons/Play";
|
|
23
51
|
import useSWR from "swr";
|
|
24
52
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
25
53
|
import { useErrorBoundary } from "use-error-boundary";
|
|
54
|
+
import { PlugIcon } from "@sanity/icons/Plug";
|
|
26
55
|
import { UpChunk } from "@mux/upchunk";
|
|
56
|
+
import { EllipsisHorizontalIcon } from "@sanity/icons/EllipsisHorizontal";
|
|
57
|
+
import { ImageIcon } from "@sanity/icons/Image";
|
|
58
|
+
import { ResetIcon } from "@sanity/icons/Reset";
|
|
27
59
|
import { isValidElementType } from "react-is";
|
|
60
|
+
import { DocumentVideoIcon } from "@sanity/icons/DocumentVideo";
|
|
61
|
+
import { WarningFilledIcon } from "@sanity/icons/WarningFilled";
|
|
28
62
|
const ToolIcon = () => /* @__PURE__ */ jsx("svg", { stroke: "currentColor", fill: "currentColor", strokeWidth: "0", viewBox: "0 0 24 24", height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-6l-7 4V7z" }) }), LOCAL_STORAGE_HAS_SHOWN_WARNING_KEY = "mux-plugin-has-shown-drm-playback-warning", DrmPlaybackWarningContext = createContext({
|
|
29
63
|
hasShownWarning: !1,
|
|
30
64
|
setHasWarnedAboutDrmPlayback: () => null
|
|
@@ -142,7 +176,7 @@ function useDialogState() {
|
|
|
142
176
|
const PLUGIN_VERSION_QUERY = {
|
|
143
177
|
sanityVersion: (
|
|
144
178
|
// @ts-expect-error - this constant is search/replaced so must be exact, not accessed with an index signature
|
|
145
|
-
"4.1.
|
|
179
|
+
"4.1.2"
|
|
146
180
|
)
|
|
147
181
|
};
|
|
148
182
|
function saveSecrets(client, token, secretKey, enableSignedUrls, signingKeyId, signingKeyPrivate, drmConfigId) {
|
|
@@ -2730,7 +2764,7 @@ function VideoPlayer({
|
|
|
2730
2764
|
/* @__PURE__ */ jsx(MuxPlayer, { poster: isAudio ? void 0 : poster, ref: muxPlayer, ...props, playsInline: !0, playbackId, tokens, preload: "metadata", crossOrigin: "anonymous", metadata: {
|
|
2731
2765
|
player_name: "Sanity Admin Dashboard",
|
|
2732
2766
|
// @ts-expect-error - this constant is search/replaced so must be exact, not accessed with an index signature
|
|
2733
|
-
player_version: "4.1.
|
|
2767
|
+
player_version: "4.1.2",
|
|
2734
2768
|
page_type: "Preview Player"
|
|
2735
2769
|
}, audio: isAudio, _hlsConfig: hlsConfig, style: {
|
|
2736
2770
|
...!isAudio && {
|