sanity-plugin-mux-input 2.3.0 → 2.3.1

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/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"), lodash = require("lodash"), 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"), 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"), 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");
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), styled__default = /* @__PURE__ */ _interopDefaultCompat(styled), MuxPlayer__default = /* @__PURE__ */ _interopDefaultCompat(MuxPlayer), 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), 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);
27
27
  const ToolIcon = () => /* @__PURE__ */ jsxRuntime.jsx(
28
28
  "svg",
29
29
  {
@@ -49,7 +49,7 @@ function toGroqParams(terms) {
49
49
  return terms.reduce((acc, term, i) => (acc[`t${i}`] = `*${term}*`, acc), params);
50
50
  }
51
51
  function extractTermsFromQuery(query) {
52
- const quotedQueries = [], unquotedQuery = query.replace(/("[^"]*")/g, (match) => lodash.words(match).length > 1 ? (quotedQueries.push(match), "") : match), quotedTerms = quotedQueries.map((str) => lodash.trim(lodash.toLower(str))), remainingTerms = lodash.uniq(lodash.compact(tokenize(lodash.toLower(unquotedQuery))));
52
+ const quotedQueries = [], unquotedQuery = query.replace(/("[^"]*")/g, (match) => words__default.default(match).length > 1 ? (quotedQueries.push(match), "") : match), quotedTerms = quotedQueries.map((str) => trim__default.default(toLower__default.default(str))), remainingTerms = uniq__default.default(compact__default.default(tokenize(toLower__default.default(unquotedQuery))));
53
53
  return [...quotedTerms, ...remainingTerms];
54
54
  }
55
55
  function createConstraints(terms, includeAssetId) {
@@ -767,7 +767,7 @@ function getVideoSrc({ asset, client }) {
767
767
  }
768
768
  return `https://stream.mux.com/${playbackId}.m3u8?${searchParams}`;
769
769
  }
770
- var name = "sanity-plugin-mux-input", version = "2.3.0", description = "An input component that integrates Sanity Studio with Mux video encoding/hosting service.", keywords = [
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
771
  "sanity",
772
772
  "video",
773
773
  "mux",
@@ -806,11 +806,11 @@ var name = "sanity-plugin-mux-input", version = "2.3.0", description = "An input
806
806
  "type-check": "tsc --noEmit",
807
807
  watch: "pkg-utils watch --strict"
808
808
  }, dependencies = {
809
- "@mux/mux-player-react": "^2.3.3",
809
+ "@mux/mux-player-react": "^2.4.1",
810
810
  "@mux/upchunk": "^3.3.2",
811
- "@sanity/icons": "^2.10.2",
811
+ "@sanity/icons": "^2.11.7",
812
812
  "@sanity/incompatible-plugin": "^1.0.4",
813
- "@sanity/ui": "^2.0.3",
813
+ "@sanity/ui": "^2.1.0",
814
814
  "@sanity/uuid": "^3.0.2",
815
815
  "iso-639-1": "^3.1.2",
816
816
  "jsonwebtoken-esm": "^1.0.5",
@@ -823,20 +823,20 @@ var name = "sanity-plugin-mux-input", version = "2.3.0", description = "An input
823
823
  "type-fest": "^4.10.2",
824
824
  "use-error-boundary": "^2.0.6"
825
825
  }, devDependencies = {
826
- "@commitlint/cli": "^18.6.1",
827
- "@commitlint/config-conventional": "^18.6.2",
828
- "@sanity/client": "^6.14.0",
829
- "@sanity/pkg-utils": "^5.1.12",
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
830
  "@sanity/plugin-kit": "^3.1.10",
831
831
  "@sanity/semantic-release-preset": "^4.1.7",
832
- "@sanity/vision": "^3.30.0",
833
- "@types/lodash": "^4.14.202",
834
- "@types/react": "^18.2.57",
832
+ "@sanity/vision": "^3.36.4",
833
+ "@types/lodash": "^4.17.0",
834
+ "@types/react": "^18.2.74",
835
835
  "@types/react-is": "^18.2.4",
836
- "@typescript-eslint/eslint-plugin": "^7.5.0",
837
- "@typescript-eslint/parser": "^7.5.0",
836
+ "@typescript-eslint/eslint-plugin": "^7.6.0",
837
+ "@typescript-eslint/parser": "^7.6.0",
838
838
  "cz-conventional-changelog": "^3.3.0",
839
- eslint: "^8.56.0",
839
+ eslint: "^8.57.0",
840
840
  "eslint-config-prettier": "^9.1.0",
841
841
  "eslint-config-sanity": "^7.1.2",
842
842
  "eslint-plugin-import": "^2.29.1",
@@ -845,14 +845,14 @@ var name = "sanity-plugin-mux-input", version = "2.3.0", description = "An input
845
845
  "eslint-plugin-simple-import-sort": "^12.0.0",
846
846
  husky: "^9.0.11",
847
847
  "lint-staged": "^15.2.2",
848
- "npm-run-all": "^4.1.5",
848
+ "npm-run-all2": "^5.0.0",
849
849
  prettier: "^3.2.5",
850
- "prettier-plugin-packagejson": "^2.4.11",
850
+ "prettier-plugin-packagejson": "^2.4.14",
851
851
  react: "^18.2.0",
852
852
  "react-dom": "^18.2.0",
853
853
  "react-is": "^18.2.0",
854
854
  rimraf: "^5.0.5",
855
- sanity: "^3.30.0",
855
+ sanity: "^3.36.4",
856
856
  "semantic-release": "^23.0.7",
857
857
  "styled-components": "^6.1.8",
858
858
  typescript: "5.4.2",
@@ -1044,7 +1044,7 @@ function PublishedStatus(props) {
1044
1044
  );
1045
1045
  }
1046
1046
  function PaneItemPreview(props) {
1047
- const { icon, layout, presence, schemaType, value } = props, title = sanity.isRecord(value.title) && React.isValidElement(value.title) || lodash.isString(value.title) || lodash.isNumber(value.title) ? value.title : null, { draft, published, isLoading } = reactRx.useMemoObservable(
1047
+ const { icon, layout, presence, schemaType, value } = props, title = sanity.isRecord(value.title) && React.isValidElement(value.title) || isString__default.default(value.title) || isNumber__default.default(value.title) ? value.title : null, { draft, published, isLoading } = reactRx.useMemoObservable(
1048
1048
  () => sanity.getPreviewStateObservable(props.documentPreviewStore, schemaType, value._id, title),
1049
1049
  [props.documentPreviewStore, schemaType, value._id, title]
1050
1050
  ), status = isLoading ? null : /* @__PURE__ */ jsxRuntime.jsxs(ui.Inline, { space: 4, children: [