@geekapps/silo-elements-nextjs 0.3.8 → 0.3.10

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.
@@ -1,7 +1,6 @@
1
1
  import { useState, useCallback, useRef } from 'react';
2
2
  import { useMultipartUpload, useBatchUpload } from '@geekapps/silo-nextjs';
3
3
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
- import MediaInfoFactory from 'mediainfo.js';
5
4
 
6
5
  // src/utils/theme.ts
7
6
  var defaultTheme = {
@@ -761,6 +760,8 @@ function Chip({ label, color }) {
761
760
  const s = color === "purple" ? { background: "rgba(168,85,247,0.12)", border: "1px solid rgba(168,85,247,0.25)", color: "#c084fc" } : { background: "rgba(255,255,255,0.05)", border: "1px solid rgba(255,255,255,0.1)", color: "rgba(255,255,255,0.6)" };
762
761
  return /* @__PURE__ */ jsx("span", { style: { ...s, fontSize: 11, fontWeight: 600, borderRadius: 6, padding: "2px 8px", display: "inline-block" }, children: label });
763
762
  }
763
+
764
+ // src/utils/videoInfo.ts
764
765
  var UNSUPPORTED_CODECS = ["AV1", "VP8", "VP9", "MPEG-1 Video", "MPEG-2 Video", "Theora", "RealVideo"];
765
766
  var UNSUPPORTED_CONTAINERS = ["FLV", "Flash Video", "RealMedia", "ASF"];
766
767
  function getCompatIssues(info) {
@@ -775,6 +776,7 @@ function getCompatIssues(info) {
775
776
  }
776
777
  async function analyzeVideoFile(file) {
777
778
  const wasmUrl = `https://cdn.jsdelivr.net/npm/mediainfo.js@0.3.7/dist/MediaInfoModule.wasm`;
779
+ const { default: MediaInfoFactory } = await import('mediainfo.js');
778
780
  const mediainfo = await MediaInfoFactory({ format: "object", locateFile: () => wasmUrl });
779
781
  const getSize = () => file.size;
780
782
  const readChunk = (chunkSize, offset) => new Promise((resolve, reject) => {