sanity-plugin-mux-input 2.3.1 → 2.3.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 (42) hide show
  1. package/lib/index.cjs +59 -174
  2. package/lib/index.cjs.map +1 -1
  3. package/lib/index.esm.js +37 -152
  4. package/lib/index.esm.js.map +1 -1
  5. package/lib/index.js +37 -152
  6. package/lib/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/components/ConfigureApi.styled.tsx +1 -2
  9. package/src/components/ConfigureApi.tsx +1 -0
  10. package/src/components/FileInputButton.tsx +1 -1
  11. package/src/components/FileInputMenuItem.styled.tsx +1 -1
  12. package/src/components/IconInfo.tsx +0 -1
  13. package/src/components/ImportVideosFromMux.tsx +2 -1
  14. package/src/components/Input.styled.tsx +0 -1
  15. package/src/components/InputBrowser.tsx +1 -1
  16. package/src/components/InputError.tsx +1 -1
  17. package/src/components/Player.styled.tsx +1 -1
  18. package/src/components/PlayerActionsMenu.tsx +3 -1
  19. package/src/components/SpinnerBox.tsx +0 -1
  20. package/src/components/StudioTool.tsx +2 -3
  21. package/src/components/UploadConfiguration.tsx +1 -0
  22. package/src/components/UploadPlaceholder.tsx +1 -1
  23. package/src/components/UploadProgress.tsx +1 -2
  24. package/src/components/Uploader.styled.tsx +1 -1
  25. package/src/components/VideoDetails/DeleteDialog.tsx +1 -0
  26. package/src/components/VideoDetails/VideoDetails.tsx +2 -0
  27. package/src/components/VideoDetails/VideoReferences.tsx +2 -3
  28. package/src/components/VideoInBrowser.tsx +2 -1
  29. package/src/components/VideoMetadata.tsx +1 -2
  30. package/src/components/VideoPlayer.tsx +1 -2
  31. package/src/components/VideoThumbnail.tsx +1 -1
  32. package/src/components/VideosBrowser.tsx +4 -4
  33. package/src/components/documentPreview/DraftStatus.tsx +1 -1
  34. package/src/components/documentPreview/MissingSchemaType.tsx +0 -1
  35. package/src/components/documentPreview/PaneItemPreview.tsx +5 -5
  36. package/src/components/documentPreview/PublishedStatus.tsx +1 -1
  37. package/src/components/documentPreview/TimeAgo.tsx +0 -1
  38. package/src/components/icons/Resolution.tsx +1 -1
  39. package/src/components/icons/StopWatch.tsx +1 -1
  40. package/src/components/icons/ToolIcon.tsx +0 -2
  41. package/src/components/withFocusRing/withFocusRing.ts +2 -2
  42. package/src/hooks/useImportMuxAssets.ts +2 -1
package/lib/index.cjs CHANGED
@@ -19,11 +19,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
19
19
  mod
20
20
  ));
21
21
  Object.defineProperty(exports, "__esModule", { value: !0 });
22
- var sanity = require("sanity"), jsxRuntime = require("react/jsx-runtime"), icons = require("@sanity/icons"), ui = require("@sanity/ui"), React = require("react"), compact = require("lodash/compact.js"), toLower = require("lodash/toLower.js"), trim = require("lodash/trim.js"), uniq = require("lodash/uniq.js"), words = require("lodash/words.js"), styled = require("styled-components"), uuid = require("@sanity/uuid"), rxjs = require("rxjs"), operators = require("rxjs/operators"), suspendReact = require("suspend-react"), MuxPlayer = require("@mux/mux-player-react"), desk = require("sanity/desk"), router = require("sanity/router"), isNumber = require("lodash/isNumber.js"), isString = require("lodash/isString.js"), reactRx = require("react-rx"), useSWR = require("swr"), scrollIntoView = require("scroll-into-view-if-needed"), useErrorBoundary = require("use-error-boundary"), upchunk = require("@mux/upchunk"), reactIs = require("react-is"), LanguagesList = require("iso-639-1");
22
+ var sanity = require("sanity"), jsxRuntime = require("react/jsx-runtime"), icons = require("@sanity/icons"), ui = require("@sanity/ui"), React = require("react"), compact = require("lodash/compact.js"), toLower = require("lodash/toLower.js"), trim = require("lodash/trim.js"), uniq = require("lodash/uniq.js"), words = require("lodash/words.js"), styledComponents = require("styled-components"), uuid = require("@sanity/uuid"), rxjs = require("rxjs"), operators = require("rxjs/operators"), suspendReact = require("suspend-react"), MuxPlayer = require("@mux/mux-player-react"), desk = require("sanity/desk"), router = require("sanity/router"), isNumber = require("lodash/isNumber.js"), isString = require("lodash/isString.js"), reactRx = require("react-rx"), useSWR = require("swr"), scrollIntoView = require("scroll-into-view-if-needed"), useErrorBoundary = require("use-error-boundary"), upchunk = require("@mux/upchunk"), reactIs = require("react-is"), LanguagesList = require("iso-639-1");
23
23
  function _interopDefaultCompat(e) {
24
24
  return e && typeof e == "object" && "default" in e ? e : { default: e };
25
25
  }
26
- var React__default = /* @__PURE__ */ _interopDefaultCompat(React), compact__default = /* @__PURE__ */ _interopDefaultCompat(compact), toLower__default = /* @__PURE__ */ _interopDefaultCompat(toLower), trim__default = /* @__PURE__ */ _interopDefaultCompat(trim), uniq__default = /* @__PURE__ */ _interopDefaultCompat(uniq), words__default = /* @__PURE__ */ _interopDefaultCompat(words), styled__default = /* @__PURE__ */ _interopDefaultCompat(styled), MuxPlayer__default = /* @__PURE__ */ _interopDefaultCompat(MuxPlayer), isNumber__default = /* @__PURE__ */ _interopDefaultCompat(isNumber), isString__default = /* @__PURE__ */ _interopDefaultCompat(isString), useSWR__default = /* @__PURE__ */ _interopDefaultCompat(useSWR), scrollIntoView__default = /* @__PURE__ */ _interopDefaultCompat(scrollIntoView), LanguagesList__default = /* @__PURE__ */ _interopDefaultCompat(LanguagesList);
26
+ var React__default = /* @__PURE__ */ _interopDefaultCompat(React), compact__default = /* @__PURE__ */ _interopDefaultCompat(compact), toLower__default = /* @__PURE__ */ _interopDefaultCompat(toLower), trim__default = /* @__PURE__ */ _interopDefaultCompat(trim), uniq__default = /* @__PURE__ */ _interopDefaultCompat(uniq), words__default = /* @__PURE__ */ _interopDefaultCompat(words), MuxPlayer__default = /* @__PURE__ */ _interopDefaultCompat(MuxPlayer), isNumber__default = /* @__PURE__ */ _interopDefaultCompat(isNumber), isString__default = /* @__PURE__ */ _interopDefaultCompat(isString), useSWR__default = /* @__PURE__ */ _interopDefaultCompat(useSWR), scrollIntoView__default = /* @__PURE__ */ _interopDefaultCompat(scrollIntoView), LanguagesList__default = /* @__PURE__ */ _interopDefaultCompat(LanguagesList);
27
27
  const ToolIcon = () => /* @__PURE__ */ jsxRuntime.jsx(
28
28
  "svg",
29
29
  {
@@ -190,7 +190,7 @@ function useMuxAssets({ secrets, enabled }) {
190
190
  return () => subscription.unsubscribe();
191
191
  }, [enabled]), state;
192
192
  }
193
- const name$1 = "mux-input", cacheNs = "sanity-plugin-mux-input", muxSecretsDocumentId = "secrets.mux", DIALOGS_Z_INDEX = 6e4, THUMBNAIL_ASPECT_RATIO = 1.7777777777777777, MIN_ASPECT_RATIO = 5 / 4, path$1 = ["token", "secretKey", "enableSignedUrls", "signingKeyId", "signingKeyPrivate"], useSecretsDocumentValues = () => {
193
+ const name = "mux-input", cacheNs = "sanity-plugin-mux-input", muxSecretsDocumentId = "secrets.mux", DIALOGS_Z_INDEX = 6e4, THUMBNAIL_ASPECT_RATIO = 1.7777777777777777, MIN_ASPECT_RATIO = 5 / 4, path$1 = ["token", "secretKey", "enableSignedUrls", "signingKeyId", "signingKeyPrivate"], useSecretsDocumentValues = () => {
194
194
  const { error, isLoading, value } = sanity.useDocumentValues(
195
195
  muxSecretsDocumentId,
196
196
  path$1
@@ -366,7 +366,7 @@ function getAnimatedPosterSrc({
366
366
  }
367
367
  return `https://image.mux.com/${playbackId}/animated.gif?${searchParams}`;
368
368
  }
369
- const Image = styled__default.default.img`
369
+ const Image = styledComponents.styled.img`
370
370
  transition: opacity 0.175s ease-out 0s;
371
371
  display: block;
372
372
  width: 100%;
@@ -457,7 +457,7 @@ function VideoThumbnail({
457
457
  }
458
458
  );
459
459
  }
460
- const MissingAssetCheckbox = styled__default.default(ui.Checkbox)`
460
+ const MissingAssetCheckbox = styledComponents.styled(ui.Checkbox)`
461
461
  position: static !important;
462
462
 
463
463
  input::after {
@@ -539,6 +539,7 @@ function ImportVideosDialog(props) {
539
539
  return /* @__PURE__ */ jsxRuntime.jsx(
540
540
  ui.Dialog,
541
541
  {
542
+ animate: !0,
542
543
  header: "Import videos from Mux",
543
544
  zOffset: DIALOGS_Z_INDEX,
544
545
  id: "video-details-dialog",
@@ -681,17 +682,17 @@ function SelectSortOptions(props) {
681
682
  {
682
683
  button: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { text: "Sort", icon: icons.SortIcon, mode: "bleed", padding: 3, style: { cursor: "pointer" } }),
683
684
  id,
684
- menu: /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, { children: Object.entries(ASSET_SORT_OPTIONS).map(([type2, { label }]) => /* @__PURE__ */ jsxRuntime.jsx(
685
+ menu: /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, { children: Object.entries(ASSET_SORT_OPTIONS).map(([type, { label }]) => /* @__PURE__ */ jsxRuntime.jsx(
685
686
  ui.MenuItem,
686
687
  {
687
688
  "data-as": "button",
688
- onClick: () => props.setSort(type2),
689
+ onClick: () => props.setSort(type),
689
690
  padding: 3,
690
691
  tone: "default",
691
692
  text: label,
692
- pressed: type2 === props.sort
693
+ pressed: type === props.sort
693
694
  },
694
- type2
695
+ type
695
696
  )) }),
696
697
  popover: CONTEXT_MENU_POPOVER_PROPS
697
698
  }
@@ -710,11 +711,11 @@ const SpinnerBox = () => /* @__PURE__ */ jsxRuntime.jsx(
710
711
  }
711
712
  );
712
713
  function FormField(props) {
713
- const { children, title, description: description2, inputId } = props;
714
+ const { children, title, description, inputId } = props;
714
715
  return /* @__PURE__ */ jsxRuntime.jsxs(ui.Stack, { space: 1, children: [
715
716
  /* @__PURE__ */ jsxRuntime.jsx(ui.Flex, { align: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { flex: 1, paddingY: 2, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Stack, { space: 2, children: [
716
717
  /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { as: "label", htmlFor: inputId, weight: "semibold", size: 1, children: title || /* @__PURE__ */ jsxRuntime.jsx("em", { children: "Untitled" }) }),
717
- description2 && /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { muted: !0, size: 1, children: description2 })
718
+ description && /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { muted: !0, size: 1, children: description })
718
719
  ] }) }) }),
719
720
  /* @__PURE__ */ jsxRuntime.jsx("div", { children })
720
721
  ] });
@@ -767,132 +768,6 @@ function getVideoSrc({ asset, client }) {
767
768
  }
768
769
  return `https://stream.mux.com/${playbackId}.m3u8?${searchParams}`;
769
770
  }
770
- var name = "sanity-plugin-mux-input", version = "2.3.1", description = "An input component that integrates Sanity Studio with Mux video encoding/hosting service.", keywords = [
771
- "sanity",
772
- "video",
773
- "mux",
774
- "input",
775
- "plugin",
776
- "sanity-plugin",
777
- "media"
778
- ], homepage = "https://github.com/sanity-io/sanity-plugin-mux-input#readme", bugs = {
779
- url: "https://github.com/sanity-io/sanity-plugin-mux-input/issues"
780
- }, repository = {
781
- type: "git",
782
- url: "git@github.com:sanity-io/sanity-plugin-mux-input.git"
783
- }, license = "MIT", author = "Sanity.io <hello@sanity.io>", sideEffects = !1, type = "module", exports$1 = {
784
- ".": {
785
- source: "./src/_exports/index.ts",
786
- import: "./lib/index.js",
787
- require: "./lib/index.cjs",
788
- default: "./lib/index.js"
789
- },
790
- "./package.json": "./package.json"
791
- }, main = "./lib/index.cjs", module$1 = "./lib/index.esm.js", source = "./src/_exports/index.ts", types = "./lib/index.d.ts", files = [
792
- "src",
793
- "lib",
794
- "sanity.json",
795
- "v2-incompatible.js"
796
- ], scripts = {
797
- build: "run-s clean && pkg-utils build --strict && pkg-utils --strict",
798
- clean: "rimraf lib",
799
- dev: "plugin-kit link-watch",
800
- format: "prettier --write --cache --ignore-unknown .",
801
- "link-watch": "plugin-kit link-watch",
802
- lint: "eslint .",
803
- prepare: "husky install || true",
804
- prepublishOnly: "run-s build",
805
- test: "npm run lint && npm run type-check && npm run build",
806
- "type-check": "tsc --noEmit",
807
- watch: "pkg-utils watch --strict"
808
- }, dependencies = {
809
- "@mux/mux-player-react": "^2.4.1",
810
- "@mux/upchunk": "^3.3.2",
811
- "@sanity/icons": "^2.11.7",
812
- "@sanity/incompatible-plugin": "^1.0.4",
813
- "@sanity/ui": "^2.1.0",
814
- "@sanity/uuid": "^3.0.2",
815
- "iso-639-1": "^3.1.2",
816
- "jsonwebtoken-esm": "^1.0.5",
817
- lodash: "^4.17.21",
818
- "react-rx": "^2.1.3",
819
- rxjs: "^7.8.1",
820
- "scroll-into-view-if-needed": "^3.1.0",
821
- "suspend-react": "^0.1.3",
822
- swr: "^2.2.5",
823
- "type-fest": "^4.10.2",
824
- "use-error-boundary": "^2.0.6"
825
- }, devDependencies = {
826
- "@commitlint/cli": "^19.2.1",
827
- "@commitlint/config-conventional": "^19.1.0",
828
- "@sanity/client": "^6.15.11",
829
- "@sanity/pkg-utils": "^6.0.1",
830
- "@sanity/plugin-kit": "^3.1.10",
831
- "@sanity/semantic-release-preset": "^4.1.7",
832
- "@sanity/vision": "^3.36.4",
833
- "@types/lodash": "^4.17.0",
834
- "@types/react": "^18.2.74",
835
- "@types/react-is": "^18.2.4",
836
- "@typescript-eslint/eslint-plugin": "^7.6.0",
837
- "@typescript-eslint/parser": "^7.6.0",
838
- "cz-conventional-changelog": "^3.3.0",
839
- eslint: "^8.57.0",
840
- "eslint-config-prettier": "^9.1.0",
841
- "eslint-config-sanity": "^7.1.2",
842
- "eslint-plugin-import": "^2.29.1",
843
- "eslint-plugin-prettier": "^5.1.3",
844
- "eslint-plugin-react-hooks": "^4.6.0",
845
- "eslint-plugin-simple-import-sort": "^12.0.0",
846
- husky: "^9.0.11",
847
- "lint-staged": "^15.2.2",
848
- "npm-run-all2": "^5.0.0",
849
- prettier: "^3.2.5",
850
- "prettier-plugin-packagejson": "^2.4.14",
851
- react: "^18.2.0",
852
- "react-dom": "^18.2.0",
853
- "react-is": "^18.2.0",
854
- rimraf: "^5.0.5",
855
- sanity: "^3.36.4",
856
- "semantic-release": "^23.0.7",
857
- "styled-components": "^6.1.8",
858
- typescript: "5.4.2",
859
- yalc: "1.0.0-pre.53"
860
- }, peerDependencies = {
861
- react: "^18",
862
- "react-is": "^18",
863
- sanity: "^3",
864
- "styled-components": "^6"
865
- }, engines = {
866
- node: ">=14"
867
- }, publishConfig = {
868
- access: "public",
869
- provenance: !0
870
- }, sanityExchangeUrl = "https://www.sanity.io/plugins/sanity-plugin-mux-input", pluginPkg = {
871
- name,
872
- version,
873
- description,
874
- keywords,
875
- homepage,
876
- bugs,
877
- repository,
878
- license,
879
- author,
880
- sideEffects,
881
- type,
882
- exports: exports$1,
883
- main,
884
- module: module$1,
885
- source,
886
- types,
887
- files,
888
- scripts,
889
- dependencies,
890
- devDependencies,
891
- peerDependencies,
892
- engines,
893
- publishConfig,
894
- sanityExchangeUrl
895
- };
896
771
  function VideoPlayer({
897
772
  asset,
898
773
  children,
@@ -926,7 +801,7 @@ function VideoPlayer({
926
801
  crossOrigin: "anonymous",
927
802
  metadata: {
928
803
  player_name: "Sanity Admin Dashboard",
929
- player_version: pluginPkg.version,
804
+ player_version: "2.3.3",
930
805
  page_type: "Preview Player"
931
806
  },
932
807
  style: {
@@ -1020,6 +895,7 @@ function DraftStatus(props) {
1020
895
  return /* @__PURE__ */ jsxRuntime.jsx(
1021
896
  ui.Tooltip,
1022
897
  {
898
+ animate: !0,
1023
899
  portal: !0,
1024
900
  content: /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { padding: 2, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: 1, children: document2 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1025
901
  "Edited ",
@@ -1034,6 +910,7 @@ function PublishedStatus(props) {
1034
910
  return /* @__PURE__ */ jsxRuntime.jsx(
1035
911
  ui.Tooltip,
1036
912
  {
913
+ animate: !0,
1037
914
  portal: !0,
1038
915
  content: /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { padding: 2, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: 1, children: document2 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1039
916
  "Published ",
@@ -1106,7 +983,7 @@ function DocumentPreview(props) {
1106
983
  }
1107
984
  );
1108
985
  }
1109
- const Container = styled__default.default(ui.Box)`
986
+ const Container = styledComponents.styled(ui.Box)`
1110
987
  * {
1111
988
  color: ${(props) => props.theme.sanity.color.base.fg};
1112
989
  }
@@ -1173,6 +1050,7 @@ function DeleteDialog({
1173
1050
  return /* @__PURE__ */ jsxRuntime.jsx(
1174
1051
  ui.Dialog,
1175
1052
  {
1053
+ animate: !0,
1176
1054
  header: "Delete video",
1177
1055
  zOffset: DIALOGS_Z_INDEX,
1178
1056
  id: "deleting-video-details-dialog",
@@ -1368,6 +1246,7 @@ const AssetInput = (props) => /* @__PURE__ */ jsxRuntime.jsx(FormField$1, { titl
1368
1246
  }, []), /* @__PURE__ */ jsxRuntime.jsxs(
1369
1247
  ui.Dialog,
1370
1248
  {
1249
+ animate: !0,
1371
1250
  header: displayInfo.title,
1372
1251
  zOffset: DIALOGS_Z_INDEX,
1373
1252
  id: "video-details-dialog",
@@ -1421,6 +1300,7 @@ const AssetInput = (props) => /* @__PURE__ */ jsxRuntime.jsx(FormField$1, { titl
1421
1300
  state === "closing" && /* @__PURE__ */ jsxRuntime.jsx(
1422
1301
  ui.Dialog,
1423
1302
  {
1303
+ animate: !0,
1424
1304
  header: "You have unsaved changes",
1425
1305
  zOffset: DIALOGS_Z_INDEX,
1426
1306
  id: "closing-video-details-dialog",
@@ -1632,7 +1512,7 @@ ${displayInfo.id}`, icon: icons.TagIcon, size: 2 })
1632
1512
  displayInfo.title != displayInfo.id.slice(0, 12) && /* @__PURE__ */ jsxRuntime.jsx(IconInfo, { text: displayInfo.id.slice(0, 12), icon: icons.TagIcon, size: 1, muted: !0 })
1633
1513
  ] })
1634
1514
  ] });
1635
- }, PlayButton = styled__default.default.button`
1515
+ }, PlayButton = styledComponents.styled.button`
1636
1516
  display: block;
1637
1517
  padding: 0;
1638
1518
  margin: 0;
@@ -1713,6 +1593,7 @@ function VideoInBrowser({
1713
1593
  playbackPolicy === "signed" && /* @__PURE__ */ jsxRuntime.jsx(
1714
1594
  ui.Tooltip,
1715
1595
  {
1596
+ animate: !0,
1716
1597
  content: /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { padding: 2, radius: 2, children: /* @__PURE__ */ jsxRuntime.jsx(IconInfo, { icon: icons.LockIcon, text: "Signed playback policy", size: 2 }) }),
1717
1598
  placement: "right",
1718
1599
  fallbackPlacements: ["top", "bottom"],
@@ -1796,7 +1677,7 @@ function VideoInBrowser({
1796
1677
  );
1797
1678
  }
1798
1679
  function VideosBrowser({ onSelect }) {
1799
- const { assets, isLoading, searchQuery, setSearchQuery, setSort, sort } = useAssets(), [editedAsset, setEditedAsset] = React__default.default.useState(null), freshEditedAsset = React__default.default.useMemo(
1680
+ const { assets, isLoading, searchQuery, setSearchQuery, setSort, sort } = useAssets(), [editedAsset, setEditedAsset] = React.useState(null), freshEditedAsset = React.useMemo(
1800
1681
  () => assets.find((a) => a._id === (editedAsset == null ? void 0 : editedAsset._id)) || editedAsset,
1801
1682
  [editedAsset, assets]
1802
1683
  ), placement = onSelect ? "input" : "tool";
@@ -2617,7 +2498,7 @@ function MuxLogo({ height = 26 }) {
2617
2498
  }
2618
2499
  );
2619
2500
  }
2620
- const Logo = styled__default.default.span`
2501
+ const Logo = styledComponents.styled.span`
2621
2502
  display: inline-block;
2622
2503
  height: 0.8em;
2623
2504
  margin-right: 1em;
@@ -2678,6 +2559,7 @@ function ConfigureApi({ secrets, setDialogState }) {
2678
2559
  }, [firstField]), /* @__PURE__ */ jsxRuntime.jsx(
2679
2560
  ui.Dialog,
2680
2561
  {
2562
+ animate: !0,
2681
2563
  id,
2682
2564
  onClose: handleClose,
2683
2565
  header: /* @__PURE__ */ jsxRuntime.jsx(Header, {}),
@@ -2812,12 +2694,12 @@ function ErrorBoundaryCard(props) {
2812
2694
  });
2813
2695
  }
2814
2696
  }), handleRetry = React.useCallback(() => {
2815
- suspendReact.clear([name$1]), reset();
2697
+ suspendReact.clear([name]), reset();
2816
2698
  }, [reset]);
2817
2699
  return didCatch ? /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { ref: errorRef, paddingX: [2, 3, 4, 4], height: "fill", shadow: 1, overflow: "auto", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Flex, { justify: "flex-start", align: "center", height: "fill", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Grid, { columns: 1, gap: [2, 3, 4, 4], children: [
2818
2700
  /* @__PURE__ */ jsxRuntime.jsxs(ui.Heading, { as: "h1", children: [
2819
2701
  "The ",
2820
- /* @__PURE__ */ jsxRuntime.jsx("code", { children: name$1 }),
2702
+ /* @__PURE__ */ jsxRuntime.jsx("code", { children: name }),
2821
2703
  " plugin crashed"
2822
2704
  ] }),
2823
2705
  (error == null ? void 0 : error.message) && /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { padding: 3, tone: "critical", shadow: 1, radius: 2, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { children: error.message }) }),
@@ -2860,11 +2742,11 @@ function Onboard(props) {
2860
2742
  }
2861
2743
  ) }) });
2862
2744
  }
2863
- function createUpChunkObservable(uuid2, uploadUrl2, source2) {
2745
+ function createUpChunkObservable(uuid2, uploadUrl2, source) {
2864
2746
  return new rxjs.Observable((subscriber) => {
2865
2747
  const upchunk$1 = upchunk.UpChunk.createUpload({
2866
2748
  endpoint: uploadUrl2,
2867
- file: source2,
2749
+ file: source,
2868
2750
  dynamicChunkSize: !0
2869
2751
  // changes the chunk size based on network speeds
2870
2752
  }), successHandler = () => {
@@ -3058,8 +2940,8 @@ function isValidUrl(url) {
3058
2940
  }
3059
2941
  }
3060
2942
  function extractDroppedFiles(dataTransfer) {
3061
- const files2 = Array.from(dataTransfer.files || []), items = Array.from(dataTransfer.items || []);
3062
- return files2 && files2.length > 0 ? Promise.resolve(files2) : normalizeItems(items).then((arr) => arr.flat());
2943
+ const files = Array.from(dataTransfer.files || []), items = Array.from(dataTransfer.items || []);
2944
+ return files && files.length > 0 ? Promise.resolve(files) : normalizeItems(items).then((arr) => arr.flat());
3063
2945
  }
3064
2946
  function normalizeItems(items) {
3065
2947
  return Promise.all(
@@ -3112,7 +2994,7 @@ function SelectAssets({ asset: selectedAsset, onChange, setDialogState }) {
3112
2994
  );
3113
2995
  return /* @__PURE__ */ jsxRuntime.jsx(VideosBrowser, { onSelect: handleSelect });
3114
2996
  }
3115
- const StyledDialog = styled__default.default(ui.Dialog)`
2997
+ const StyledDialog = styledComponents.styled(ui.Dialog)`
3116
2998
  > div[data-ui='DialogCard'] > div[data-ui='Card'] {
3117
2999
  height: 100%;
3118
3000
  }
@@ -3141,7 +3023,7 @@ const useCancelUpload = (asset, onChange) => {
3141
3023
  asset && (onChange(sanity.PatchEvent.from(sanity.unset())), asset.assetId && deleteAssetOnMux(client, asset.assetId), asset._id && client.delete(asset._id));
3142
3024
  }, [asset, client, onChange]);
3143
3025
  };
3144
- styled__default.default.div`
3026
+ styledComponents.styled.div`
3145
3027
  && {
3146
3028
  --media-background-color: transparent;
3147
3029
  --media-button-icon-width: 100%;
@@ -3160,7 +3042,7 @@ styled__default.default.div`
3160
3042
  }
3161
3043
  }
3162
3044
  `;
3163
- const TopControls = styled__default.default.div`
3045
+ const TopControls = styledComponents.styled.div`
3164
3046
  position: absolute;
3165
3047
  top: 0;
3166
3048
  right: 0;
@@ -3168,16 +3050,16 @@ const TopControls = styled__default.default.div`
3168
3050
  button {
3169
3051
  height: auto;
3170
3052
  }
3171
- `, CardWrapper = styled__default.default(ui.Card)`
3053
+ `, CardWrapper = styledComponents.styled(ui.Card)`
3172
3054
  min-height: 82px;
3173
3055
  box-sizing: border-box;
3174
- `, FlexWrapper = styled__default.default(ui.Flex)`
3056
+ `, FlexWrapper = styledComponents.styled(ui.Flex)`
3175
3057
  text-overflow: ellipsis;
3176
3058
  overflow: hidden;
3177
- `, LeftSection = styled__default.default(ui.Stack)`
3059
+ `, LeftSection = styledComponents.styled(ui.Stack)`
3178
3060
  position: relative;
3179
3061
  width: 60%;
3180
- `, CodeWrapper = styled__default.default(ui.Code)`
3062
+ `, CodeWrapper = styledComponents.styled(ui.Code)`
3181
3063
  position: relative;
3182
3064
  width: 100%;
3183
3065
 
@@ -3262,9 +3144,9 @@ function focusRingStyle(opts) {
3262
3144
  focusRingOutsetWidth > 0 && `0 0 0 ${focusRingOutsetWidth}px var(--card-focus-ring-color)`
3263
3145
  ].filter(Boolean).join(",");
3264
3146
  }
3265
- const FileButton = styled__default.default(ui.MenuItem)(({ theme }) => {
3147
+ const FileButton = styledComponents.styled(ui.MenuItem)(({ theme }) => {
3266
3148
  const { focusRing } = theme.sanity, base = theme.sanity.color.base;
3267
- return styled.css`
3149
+ return styledComponents.css`
3268
3150
  position: relative;
3269
3151
 
3270
3152
  &:not([data-disabled='true']) {
@@ -3332,14 +3214,14 @@ const FileButton = styled__default.default(ui.MenuItem)(({ theme }) => {
3332
3214
  }
3333
3215
  )
3334
3216
  ] });
3335
- }), LockCard = styled__default.default(ui.Card)`
3217
+ }), LockCard = styledComponents.styled(ui.Card)`
3336
3218
  position: absolute;
3337
3219
  top: 0;
3338
3220
  left: 0;
3339
3221
  opacity: 0.6;
3340
3222
  mix-blend-mode: screen;
3341
3223
  background: transparent;
3342
- `, LockButton = styled__default.default(ui.Button)`
3224
+ `, LockButton = styledComponents.styled(ui.Button)`
3343
3225
  background: transparent;
3344
3226
  color: white;
3345
3227
  `;
@@ -3354,6 +3236,7 @@ function PlayerActionsMenu(props) {
3354
3236
  isSigned && /* @__PURE__ */ jsxRuntime.jsx(
3355
3237
  ui.Tooltip,
3356
3238
  {
3239
+ animate: !0,
3357
3240
  content: /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { padding: 2, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { muted: !0, size: 1, children: "Signed playback policy" }) }),
3358
3241
  placement: "right",
3359
3242
  portal: !0,
@@ -3363,6 +3246,7 @@ function PlayerActionsMenu(props) {
3363
3246
  /* @__PURE__ */ jsxRuntime.jsx(
3364
3247
  ui.Popover,
3365
3248
  {
3249
+ animate: !0,
3366
3250
  content: /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, { ref: setMenuRef, children: [
3367
3251
  /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { padding: 2, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { muted: !0, size: 1, children: "Replace" }) }),
3368
3252
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3485,7 +3369,7 @@ function TrackEditor({
3485
3369
  track,
3486
3370
  dispatch
3487
3371
  }) {
3488
- const { _id: id, type: type2 } = track, dispatchTrackAction = (args) => dispatch({ action: "track", id, ...args }), trackTypes = TRACK_TYPES.filter(
3372
+ const { _id: id, type } = track, dispatchTrackAction = (args) => dispatch({ action: "track", id, ...args }), trackTypes = TRACK_TYPES.filter(
3489
3373
  ({ value }) => !(value === "autogenerated" && !canAutoGenerate)
3490
3374
  );
3491
3375
  return trackTypes.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { border: !0, padding: 3, radius: 2, style: { position: "relative" }, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Stack, { space: 3, children: [
@@ -3495,7 +3379,7 @@ function TrackEditor({
3495
3379
  /* @__PURE__ */ jsxRuntime.jsx(
3496
3380
  ui.Radio,
3497
3381
  {
3498
- checked: type2 === value,
3382
+ checked: type === value,
3499
3383
  name: "track-type",
3500
3384
  onChange: (e) => dispatchTrackAction({
3501
3385
  subAction: "update",
@@ -3620,7 +3504,7 @@ function UploadConfiguration({
3620
3504
  encoding_tier: action.value,
3621
3505
  mp4_support: "none",
3622
3506
  max_resolution_tier: "1080p",
3623
- text_tracks: (_a2 = prev.text_tracks) == null ? void 0 : _a2.filter(({ type: type2 }) => type2 !== "autogenerated")
3507
+ text_tracks: (_a2 = prev.text_tracks) == null ? void 0 : _a2.filter(({ type }) => type !== "autogenerated")
3624
3508
  }) : Object.assign({}, prev, {
3625
3509
  encoding_tier: action.value,
3626
3510
  mp4_support: pluginConfig.mp4_support,
@@ -3681,6 +3565,7 @@ function UploadConfiguration({
3681
3565
  return /* @__PURE__ */ jsxRuntime.jsx(
3682
3566
  ui.Dialog,
3683
3567
  {
3568
+ animate: !0,
3684
3569
  open: !0,
3685
3570
  id: "upload-configuration",
3686
3571
  zOffset: 1e3,
@@ -3874,12 +3759,12 @@ function formatUploadConfig(config) {
3874
3759
  };
3875
3760
  }
3876
3761
  function withFocusRing(component) {
3877
- return styled__default.default(component)((props) => {
3762
+ return styledComponents.styled(component)((props) => {
3878
3763
  const border = {
3879
3764
  width: props.$border ? 1 : 0,
3880
3765
  color: "var(--card-border-color)"
3881
3766
  };
3882
- return styled.css`
3767
+ return styledComponents.css`
3883
3768
  --card-focus-box-shadow: ${focusRingBorderStyle(border)};
3884
3769
 
3885
3770
  border-radius: ${ui.rem(props.theme.sanity.radius[1])};
@@ -3926,7 +3811,7 @@ const ctrlKey = 17, cmdKey = 91, UploadCardWithFocusRing = withFocusRing(ui.Card
3926
3811
  }
3927
3812
  );
3928
3813
  }
3929
- ), HiddenInput$1 = styled__default.default.input.attrs({ type: "text" })`
3814
+ ), HiddenInput$1 = styledComponents.styled.input.attrs({ type: "text" })`
3930
3815
  position: absolute;
3931
3816
  border: 0;
3932
3817
  color: white;
@@ -3935,14 +3820,14 @@ const ctrlKey = 17, cmdKey = 91, UploadCardWithFocusRing = withFocusRing(ui.Card
3935
3820
  &:focus {
3936
3821
  outline: none;
3937
3822
  }
3938
- `, HiddenInput = styled__default.default.input`
3823
+ `, HiddenInput = styledComponents.styled.input`
3939
3824
  overflow: hidden;
3940
3825
  width: 0.1px;
3941
3826
  height: 0.1px;
3942
3827
  opacity: 0;
3943
3828
  position: absolute;
3944
3829
  z-index: -1;
3945
- `, Label = styled__default.default.label`
3830
+ `, Label = styledComponents.styled.label`
3946
3831
  position: relative;
3947
3832
  `, FileInputButton = ({ onSelect, accept, ...props }) => {
3948
3833
  const inputId = `FileSelect${React.useId()}`, inputRef = React.useRef(null), handleSelect = React.useCallback(
@@ -4060,7 +3945,7 @@ function Uploader(props) {
4060
3945
  case "commitUpload":
4061
3946
  return Object.assign({}, prev, { uploadStatus: { progress: 0 } });
4062
3947
  case "progressInfo": {
4063
- const { type: type2, action: _, ...payload } = action;
3948
+ const { type, action: _, ...payload } = action;
4064
3949
  return Object.assign({}, prev, {
4065
3950
  uploadStatus: {
4066
3951
  ...prev.uploadStatus,
@@ -4149,10 +4034,10 @@ function Uploader(props) {
4149
4034
  complete: () => dispatch({ action: "complete" }),
4150
4035
  error: (error) => dispatch({ action: "error", error })
4151
4036
  });
4152
- }, handleUpload = (files2) => {
4037
+ }, handleUpload = (files) => {
4153
4038
  dispatch({
4154
4039
  action: "stageUpload",
4155
- input: { type: "file", files: files2 }
4040
+ input: { type: "file", files }
4156
4041
  });
4157
4042
  }, handlePaste = (event) => {
4158
4043
  event.preventDefault(), event.stopPropagation();
@@ -4163,10 +4048,10 @@ function Uploader(props) {
4163
4048
  }
4164
4049
  dispatch({ action: "stageUpload", input: { type: "url", url } });
4165
4050
  }, handleDrop = (event) => {
4166
- setDragState(null), event.preventDefault(), event.stopPropagation(), extractDroppedFiles(event.nativeEvent.dataTransfer).then((files2) => {
4051
+ setDragState(null), event.preventDefault(), event.stopPropagation(), extractDroppedFiles(event.nativeEvent.dataTransfer).then((files) => {
4167
4052
  dispatch({
4168
4053
  action: "stageUpload",
4169
- input: { type: "file", files: files2 }
4054
+ input: { type: "file", files }
4170
4055
  });
4171
4056
  });
4172
4057
  }, handleDragOver = (event) => {
@@ -4174,8 +4059,8 @@ function Uploader(props) {
4174
4059
  }, handleDragEnter = (event) => {
4175
4060
  var _a2, _b;
4176
4061
  event.stopPropagation(), dragEnteredEls.current.push(event.target);
4177
- const type2 = (_b = (_a2 = event.dataTransfer.items) == null ? void 0 : _a2[0]) == null ? void 0 : _b.type;
4178
- setDragState(type2 != null && type2.startsWith("video/") ? "valid" : "invalid");
4062
+ const type = (_b = (_a2 = event.dataTransfer.items) == null ? void 0 : _a2[0]) == null ? void 0 : _b.type;
4063
+ setDragState(type != null && type.startsWith("video/") ? "valid" : "invalid");
4179
4064
  }, handleDragLeave = (event) => {
4180
4065
  event.stopPropagation();
4181
4066
  const idx = dragEnteredEls.current.indexOf(event.target);