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.esm.js CHANGED
@@ -8,7 +8,7 @@ import toLower from "lodash/toLower.js";
8
8
  import trim from "lodash/trim.js";
9
9
  import uniq from "lodash/uniq.js";
10
10
  import words from "lodash/words.js";
11
- import styled, { css } from "styled-components";
11
+ import { styled, css } from "styled-components";
12
12
  import { uuid } from "@sanity/uuid";
13
13
  import { defer, timer, of, Observable, concat, throwError, from, Subject } from "rxjs";
14
14
  import { expand, concatMap, tap, switchMap, mergeMap, catchError, mergeMapTo, takeUntil } from "rxjs/operators";
@@ -191,7 +191,7 @@ function useMuxAssets({ secrets, enabled }) {
191
191
  return () => subscription.unsubscribe();
192
192
  }, [enabled]), state;
193
193
  }
194
- 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 = () => {
194
+ 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 = () => {
195
195
  const { error, isLoading, value } = useDocumentValues(
196
196
  muxSecretsDocumentId,
197
197
  path$1
@@ -540,6 +540,7 @@ function ImportVideosDialog(props) {
540
540
  return /* @__PURE__ */ jsx(
541
541
  Dialog,
542
542
  {
543
+ animate: !0,
543
544
  header: "Import videos from Mux",
544
545
  zOffset: DIALOGS_Z_INDEX,
545
546
  id: "video-details-dialog",
@@ -682,17 +683,17 @@ function SelectSortOptions(props) {
682
683
  {
683
684
  button: /* @__PURE__ */ jsx(Button, { text: "Sort", icon: SortIcon, mode: "bleed", padding: 3, style: { cursor: "pointer" } }),
684
685
  id,
685
- menu: /* @__PURE__ */ jsx(Menu, { children: Object.entries(ASSET_SORT_OPTIONS).map(([type2, { label }]) => /* @__PURE__ */ jsx(
686
+ menu: /* @__PURE__ */ jsx(Menu, { children: Object.entries(ASSET_SORT_OPTIONS).map(([type, { label }]) => /* @__PURE__ */ jsx(
686
687
  MenuItem,
687
688
  {
688
689
  "data-as": "button",
689
- onClick: () => props.setSort(type2),
690
+ onClick: () => props.setSort(type),
690
691
  padding: 3,
691
692
  tone: "default",
692
693
  text: label,
693
- pressed: type2 === props.sort
694
+ pressed: type === props.sort
694
695
  },
695
- type2
696
+ type
696
697
  )) }),
697
698
  popover: CONTEXT_MENU_POPOVER_PROPS
698
699
  }
@@ -711,11 +712,11 @@ const SpinnerBox = () => /* @__PURE__ */ jsx(
711
712
  }
712
713
  );
713
714
  function FormField(props) {
714
- const { children, title, description: description2, inputId } = props;
715
+ const { children, title, description, inputId } = props;
715
716
  return /* @__PURE__ */ jsxs(Stack, { space: 1, children: [
716
717
  /* @__PURE__ */ jsx(Flex, { align: "flex-end", children: /* @__PURE__ */ jsx(Box, { flex: 1, paddingY: 2, children: /* @__PURE__ */ jsxs(Stack, { space: 2, children: [
717
718
  /* @__PURE__ */ jsx(Text, { as: "label", htmlFor: inputId, weight: "semibold", size: 1, children: title || /* @__PURE__ */ jsx("em", { children: "Untitled" }) }),
718
- description2 && /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: description2 })
719
+ description && /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: description })
719
720
  ] }) }) }),
720
721
  /* @__PURE__ */ jsx("div", { children })
721
722
  ] });
@@ -768,132 +769,6 @@ function getVideoSrc({ asset, client }) {
768
769
  }
769
770
  return `https://stream.mux.com/${playbackId}.m3u8?${searchParams}`;
770
771
  }
771
- 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 = [
772
- "sanity",
773
- "video",
774
- "mux",
775
- "input",
776
- "plugin",
777
- "sanity-plugin",
778
- "media"
779
- ], homepage = "https://github.com/sanity-io/sanity-plugin-mux-input#readme", bugs = {
780
- url: "https://github.com/sanity-io/sanity-plugin-mux-input/issues"
781
- }, repository = {
782
- type: "git",
783
- url: "git@github.com:sanity-io/sanity-plugin-mux-input.git"
784
- }, license = "MIT", author = "Sanity.io <hello@sanity.io>", sideEffects = !1, type = "module", exports = {
785
- ".": {
786
- source: "./src/_exports/index.ts",
787
- import: "./lib/index.js",
788
- require: "./lib/index.cjs",
789
- default: "./lib/index.js"
790
- },
791
- "./package.json": "./package.json"
792
- }, main = "./lib/index.cjs", module = "./lib/index.esm.js", source = "./src/_exports/index.ts", types = "./lib/index.d.ts", files = [
793
- "src",
794
- "lib",
795
- "sanity.json",
796
- "v2-incompatible.js"
797
- ], scripts = {
798
- build: "run-s clean && pkg-utils build --strict && pkg-utils --strict",
799
- clean: "rimraf lib",
800
- dev: "plugin-kit link-watch",
801
- format: "prettier --write --cache --ignore-unknown .",
802
- "link-watch": "plugin-kit link-watch",
803
- lint: "eslint .",
804
- prepare: "husky install || true",
805
- prepublishOnly: "run-s build",
806
- test: "npm run lint && npm run type-check && npm run build",
807
- "type-check": "tsc --noEmit",
808
- watch: "pkg-utils watch --strict"
809
- }, dependencies = {
810
- "@mux/mux-player-react": "^2.4.1",
811
- "@mux/upchunk": "^3.3.2",
812
- "@sanity/icons": "^2.11.7",
813
- "@sanity/incompatible-plugin": "^1.0.4",
814
- "@sanity/ui": "^2.1.0",
815
- "@sanity/uuid": "^3.0.2",
816
- "iso-639-1": "^3.1.2",
817
- "jsonwebtoken-esm": "^1.0.5",
818
- lodash: "^4.17.21",
819
- "react-rx": "^2.1.3",
820
- rxjs: "^7.8.1",
821
- "scroll-into-view-if-needed": "^3.1.0",
822
- "suspend-react": "^0.1.3",
823
- swr: "^2.2.5",
824
- "type-fest": "^4.10.2",
825
- "use-error-boundary": "^2.0.6"
826
- }, devDependencies = {
827
- "@commitlint/cli": "^19.2.1",
828
- "@commitlint/config-conventional": "^19.1.0",
829
- "@sanity/client": "^6.15.11",
830
- "@sanity/pkg-utils": "^6.0.1",
831
- "@sanity/plugin-kit": "^3.1.10",
832
- "@sanity/semantic-release-preset": "^4.1.7",
833
- "@sanity/vision": "^3.36.4",
834
- "@types/lodash": "^4.17.0",
835
- "@types/react": "^18.2.74",
836
- "@types/react-is": "^18.2.4",
837
- "@typescript-eslint/eslint-plugin": "^7.6.0",
838
- "@typescript-eslint/parser": "^7.6.0",
839
- "cz-conventional-changelog": "^3.3.0",
840
- eslint: "^8.57.0",
841
- "eslint-config-prettier": "^9.1.0",
842
- "eslint-config-sanity": "^7.1.2",
843
- "eslint-plugin-import": "^2.29.1",
844
- "eslint-plugin-prettier": "^5.1.3",
845
- "eslint-plugin-react-hooks": "^4.6.0",
846
- "eslint-plugin-simple-import-sort": "^12.0.0",
847
- husky: "^9.0.11",
848
- "lint-staged": "^15.2.2",
849
- "npm-run-all2": "^5.0.0",
850
- prettier: "^3.2.5",
851
- "prettier-plugin-packagejson": "^2.4.14",
852
- react: "^18.2.0",
853
- "react-dom": "^18.2.0",
854
- "react-is": "^18.2.0",
855
- rimraf: "^5.0.5",
856
- sanity: "^3.36.4",
857
- "semantic-release": "^23.0.7",
858
- "styled-components": "^6.1.8",
859
- typescript: "5.4.2",
860
- yalc: "1.0.0-pre.53"
861
- }, peerDependencies = {
862
- react: "^18",
863
- "react-is": "^18",
864
- sanity: "^3",
865
- "styled-components": "^6"
866
- }, engines = {
867
- node: ">=14"
868
- }, publishConfig = {
869
- access: "public",
870
- provenance: !0
871
- }, sanityExchangeUrl = "https://www.sanity.io/plugins/sanity-plugin-mux-input", pluginPkg = {
872
- name,
873
- version,
874
- description,
875
- keywords,
876
- homepage,
877
- bugs,
878
- repository,
879
- license,
880
- author,
881
- sideEffects,
882
- type,
883
- exports,
884
- main,
885
- module,
886
- source,
887
- types,
888
- files,
889
- scripts,
890
- dependencies,
891
- devDependencies,
892
- peerDependencies,
893
- engines,
894
- publishConfig,
895
- sanityExchangeUrl
896
- };
897
772
  function VideoPlayer({
898
773
  asset,
899
774
  children,
@@ -927,7 +802,7 @@ function VideoPlayer({
927
802
  crossOrigin: "anonymous",
928
803
  metadata: {
929
804
  player_name: "Sanity Admin Dashboard",
930
- player_version: pluginPkg.version,
805
+ player_version: "2.3.3",
931
806
  page_type: "Preview Player"
932
807
  },
933
808
  style: {
@@ -1021,6 +896,7 @@ function DraftStatus(props) {
1021
896
  return /* @__PURE__ */ jsx(
1022
897
  Tooltip,
1023
898
  {
899
+ animate: !0,
1024
900
  portal: !0,
1025
901
  content: /* @__PURE__ */ jsx(Box, { padding: 2, children: /* @__PURE__ */ jsx(Text, { size: 1, children: document2 ? /* @__PURE__ */ jsxs(Fragment, { children: [
1026
902
  "Edited ",
@@ -1035,6 +911,7 @@ function PublishedStatus(props) {
1035
911
  return /* @__PURE__ */ jsx(
1036
912
  Tooltip,
1037
913
  {
914
+ animate: !0,
1038
915
  portal: !0,
1039
916
  content: /* @__PURE__ */ jsx(Box, { padding: 2, children: /* @__PURE__ */ jsx(Text, { size: 1, children: document2 ? /* @__PURE__ */ jsxs(Fragment, { children: [
1040
917
  "Published ",
@@ -1174,6 +1051,7 @@ function DeleteDialog({
1174
1051
  return /* @__PURE__ */ jsx(
1175
1052
  Dialog,
1176
1053
  {
1054
+ animate: !0,
1177
1055
  header: "Delete video",
1178
1056
  zOffset: DIALOGS_Z_INDEX,
1179
1057
  id: "deleting-video-details-dialog",
@@ -1369,6 +1247,7 @@ const AssetInput = (props) => /* @__PURE__ */ jsx(FormField$1, { title: props.la
1369
1247
  }, []), /* @__PURE__ */ jsxs(
1370
1248
  Dialog,
1371
1249
  {
1250
+ animate: !0,
1372
1251
  header: displayInfo.title,
1373
1252
  zOffset: DIALOGS_Z_INDEX,
1374
1253
  id: "video-details-dialog",
@@ -1422,6 +1301,7 @@ const AssetInput = (props) => /* @__PURE__ */ jsx(FormField$1, { title: props.la
1422
1301
  state === "closing" && /* @__PURE__ */ jsx(
1423
1302
  Dialog,
1424
1303
  {
1304
+ animate: !0,
1425
1305
  header: "You have unsaved changes",
1426
1306
  zOffset: DIALOGS_Z_INDEX,
1427
1307
  id: "closing-video-details-dialog",
@@ -1714,6 +1594,7 @@ function VideoInBrowser({
1714
1594
  playbackPolicy === "signed" && /* @__PURE__ */ jsx(
1715
1595
  Tooltip,
1716
1596
  {
1597
+ animate: !0,
1717
1598
  content: /* @__PURE__ */ jsx(Card, { padding: 2, radius: 2, children: /* @__PURE__ */ jsx(IconInfo, { icon: LockIcon, text: "Signed playback policy", size: 2 }) }),
1718
1599
  placement: "right",
1719
1600
  fallbackPlacements: ["top", "bottom"],
@@ -1797,7 +1678,7 @@ function VideoInBrowser({
1797
1678
  );
1798
1679
  }
1799
1680
  function VideosBrowser({ onSelect }) {
1800
- const { assets, isLoading, searchQuery, setSearchQuery, setSort, sort } = useAssets(), [editedAsset, setEditedAsset] = React.useState(null), freshEditedAsset = React.useMemo(
1681
+ const { assets, isLoading, searchQuery, setSearchQuery, setSort, sort } = useAssets(), [editedAsset, setEditedAsset] = useState(null), freshEditedAsset = useMemo(
1801
1682
  () => assets.find((a) => a._id === (editedAsset == null ? void 0 : editedAsset._id)) || editedAsset,
1802
1683
  [editedAsset, assets]
1803
1684
  ), placement = onSelect ? "input" : "tool";
@@ -2679,6 +2560,7 @@ function ConfigureApi({ secrets, setDialogState }) {
2679
2560
  }, [firstField]), /* @__PURE__ */ jsx(
2680
2561
  Dialog,
2681
2562
  {
2563
+ animate: !0,
2682
2564
  id,
2683
2565
  onClose: handleClose,
2684
2566
  header: /* @__PURE__ */ jsx(Header, {}),
@@ -2813,12 +2695,12 @@ function ErrorBoundaryCard(props) {
2813
2695
  });
2814
2696
  }
2815
2697
  }), handleRetry = useCallback(() => {
2816
- clear([name$1]), reset();
2698
+ clear([name]), reset();
2817
2699
  }, [reset]);
2818
2700
  return didCatch ? /* @__PURE__ */ jsx(Card, { ref: errorRef, paddingX: [2, 3, 4, 4], height: "fill", shadow: 1, overflow: "auto", children: /* @__PURE__ */ jsx(Flex, { justify: "flex-start", align: "center", height: "fill", children: /* @__PURE__ */ jsxs(Grid, { columns: 1, gap: [2, 3, 4, 4], children: [
2819
2701
  /* @__PURE__ */ jsxs(Heading, { as: "h1", children: [
2820
2702
  "The ",
2821
- /* @__PURE__ */ jsx("code", { children: name$1 }),
2703
+ /* @__PURE__ */ jsx("code", { children: name }),
2822
2704
  " plugin crashed"
2823
2705
  ] }),
2824
2706
  (error == null ? void 0 : error.message) && /* @__PURE__ */ jsx(Card, { padding: 3, tone: "critical", shadow: 1, radius: 2, children: /* @__PURE__ */ jsx(Text, { children: error.message }) }),
@@ -2861,11 +2743,11 @@ function Onboard(props) {
2861
2743
  }
2862
2744
  ) }) });
2863
2745
  }
2864
- function createUpChunkObservable(uuid2, uploadUrl2, source2) {
2746
+ function createUpChunkObservable(uuid2, uploadUrl2, source) {
2865
2747
  return new Observable((subscriber) => {
2866
2748
  const upchunk = UpChunk.createUpload({
2867
2749
  endpoint: uploadUrl2,
2868
- file: source2,
2750
+ file: source,
2869
2751
  dynamicChunkSize: !0
2870
2752
  // changes the chunk size based on network speeds
2871
2753
  }), successHandler = () => {
@@ -3059,8 +2941,8 @@ function isValidUrl(url) {
3059
2941
  }
3060
2942
  }
3061
2943
  function extractDroppedFiles(dataTransfer) {
3062
- const files2 = Array.from(dataTransfer.files || []), items = Array.from(dataTransfer.items || []);
3063
- return files2 && files2.length > 0 ? Promise.resolve(files2) : normalizeItems(items).then((arr) => arr.flat());
2944
+ const files = Array.from(dataTransfer.files || []), items = Array.from(dataTransfer.items || []);
2945
+ return files && files.length > 0 ? Promise.resolve(files) : normalizeItems(items).then((arr) => arr.flat());
3064
2946
  }
3065
2947
  function normalizeItems(items) {
3066
2948
  return Promise.all(
@@ -3355,6 +3237,7 @@ function PlayerActionsMenu(props) {
3355
3237
  isSigned && /* @__PURE__ */ jsx(
3356
3238
  Tooltip,
3357
3239
  {
3240
+ animate: !0,
3358
3241
  content: /* @__PURE__ */ jsx(Box, { padding: 2, children: /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: "Signed playback policy" }) }),
3359
3242
  placement: "right",
3360
3243
  portal: !0,
@@ -3364,6 +3247,7 @@ function PlayerActionsMenu(props) {
3364
3247
  /* @__PURE__ */ jsx(
3365
3248
  Popover,
3366
3249
  {
3250
+ animate: !0,
3367
3251
  content: /* @__PURE__ */ jsxs(Menu, { ref: setMenuRef, children: [
3368
3252
  /* @__PURE__ */ jsx(Box, { padding: 2, children: /* @__PURE__ */ jsx(Label$1, { muted: !0, size: 1, children: "Replace" }) }),
3369
3253
  /* @__PURE__ */ jsx(
@@ -3486,7 +3370,7 @@ function TrackEditor({
3486
3370
  track,
3487
3371
  dispatch
3488
3372
  }) {
3489
- const { _id: id, type: type2 } = track, dispatchTrackAction = (args) => dispatch({ action: "track", id, ...args }), trackTypes = TRACK_TYPES.filter(
3373
+ const { _id: id, type } = track, dispatchTrackAction = (args) => dispatch({ action: "track", id, ...args }), trackTypes = TRACK_TYPES.filter(
3490
3374
  ({ value }) => !(value === "autogenerated" && !canAutoGenerate)
3491
3375
  );
3492
3376
  return trackTypes.length === 0 ? null : /* @__PURE__ */ jsx(Card, { border: !0, padding: 3, radius: 2, style: { position: "relative" }, children: /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
@@ -3496,7 +3380,7 @@ function TrackEditor({
3496
3380
  /* @__PURE__ */ jsx(
3497
3381
  Radio,
3498
3382
  {
3499
- checked: type2 === value,
3383
+ checked: type === value,
3500
3384
  name: "track-type",
3501
3385
  onChange: (e) => dispatchTrackAction({
3502
3386
  subAction: "update",
@@ -3621,7 +3505,7 @@ function UploadConfiguration({
3621
3505
  encoding_tier: action.value,
3622
3506
  mp4_support: "none",
3623
3507
  max_resolution_tier: "1080p",
3624
- text_tracks: (_a2 = prev.text_tracks) == null ? void 0 : _a2.filter(({ type: type2 }) => type2 !== "autogenerated")
3508
+ text_tracks: (_a2 = prev.text_tracks) == null ? void 0 : _a2.filter(({ type }) => type !== "autogenerated")
3625
3509
  }) : Object.assign({}, prev, {
3626
3510
  encoding_tier: action.value,
3627
3511
  mp4_support: pluginConfig.mp4_support,
@@ -3682,6 +3566,7 @@ function UploadConfiguration({
3682
3566
  return /* @__PURE__ */ jsx(
3683
3567
  Dialog,
3684
3568
  {
3569
+ animate: !0,
3685
3570
  open: !0,
3686
3571
  id: "upload-configuration",
3687
3572
  zOffset: 1e3,
@@ -4061,7 +3946,7 @@ function Uploader(props) {
4061
3946
  case "commitUpload":
4062
3947
  return Object.assign({}, prev, { uploadStatus: { progress: 0 } });
4063
3948
  case "progressInfo": {
4064
- const { type: type2, action: _, ...payload } = action;
3949
+ const { type, action: _, ...payload } = action;
4065
3950
  return Object.assign({}, prev, {
4066
3951
  uploadStatus: {
4067
3952
  ...prev.uploadStatus,
@@ -4150,10 +4035,10 @@ function Uploader(props) {
4150
4035
  complete: () => dispatch({ action: "complete" }),
4151
4036
  error: (error) => dispatch({ action: "error", error })
4152
4037
  });
4153
- }, handleUpload = (files2) => {
4038
+ }, handleUpload = (files) => {
4154
4039
  dispatch({
4155
4040
  action: "stageUpload",
4156
- input: { type: "file", files: files2 }
4041
+ input: { type: "file", files }
4157
4042
  });
4158
4043
  }, handlePaste = (event) => {
4159
4044
  event.preventDefault(), event.stopPropagation();
@@ -4164,10 +4049,10 @@ function Uploader(props) {
4164
4049
  }
4165
4050
  dispatch({ action: "stageUpload", input: { type: "url", url } });
4166
4051
  }, handleDrop = (event) => {
4167
- setDragState(null), event.preventDefault(), event.stopPropagation(), extractDroppedFiles(event.nativeEvent.dataTransfer).then((files2) => {
4052
+ setDragState(null), event.preventDefault(), event.stopPropagation(), extractDroppedFiles(event.nativeEvent.dataTransfer).then((files) => {
4168
4053
  dispatch({
4169
4054
  action: "stageUpload",
4170
- input: { type: "file", files: files2 }
4055
+ input: { type: "file", files }
4171
4056
  });
4172
4057
  });
4173
4058
  }, handleDragOver = (event) => {
@@ -4175,8 +4060,8 @@ function Uploader(props) {
4175
4060
  }, handleDragEnter = (event) => {
4176
4061
  var _a2, _b;
4177
4062
  event.stopPropagation(), dragEnteredEls.current.push(event.target);
4178
- const type2 = (_b = (_a2 = event.dataTransfer.items) == null ? void 0 : _a2[0]) == null ? void 0 : _b.type;
4179
- setDragState(type2 != null && type2.startsWith("video/") ? "valid" : "invalid");
4063
+ const type = (_b = (_a2 = event.dataTransfer.items) == null ? void 0 : _a2[0]) == null ? void 0 : _b.type;
4064
+ setDragState(type != null && type.startsWith("video/") ? "valid" : "invalid");
4180
4065
  }, handleDragLeave = (event) => {
4181
4066
  event.stopPropagation();
4182
4067
  const idx = dragEnteredEls.current.indexOf(event.target);