sanity-plugin-mux-input 4.1.2 → 4.1.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.
package/dist/index.js CHANGED
@@ -176,7 +176,7 @@ function useDialogState() {
176
176
  const PLUGIN_VERSION_QUERY = {
177
177
  sanityVersion: (
178
178
  // @ts-expect-error - this constant is search/replaced so must be exact, not accessed with an index signature
179
- "4.1.2"
179
+ "4.1.3"
180
180
  )
181
181
  };
182
182
  function saveSecrets(client, token, secretKey, enableSignedUrls, signingKeyId, signingKeyPrivate, drmConfigId) {
@@ -397,10 +397,10 @@ function MuxLogo({
397
397
  /* @__PURE__ */ jsx("path", { d: "M437.511,468.521c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m23.915,-463.762c-23.348,-9.672 -50.226,-4.327 -68.096,13.544l-143.331,143.329l-143.33,-143.329c-17.871,-17.871 -44.747,-23.216 -68.096,-13.544c-23.349,9.671 -38.574,32.455 -38.574,57.729l0,375.026c0,34.51 27.977,62.486 62.487,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-224.173l80.843,80.844c24.404,24.402 63.965,24.402 88.369,-0l80.843,-80.844l0,224.173c0,34.51 27.976,62.486 62.486,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-375.026c0,-25.274 -15.224,-48.058 -38.573,-57.729", style: pathStyle })
398
398
  ] }) });
399
399
  }
400
- const Logo = styled.span.withConfig({
400
+ const Logo = /* @__PURE__ */ styled.span.withConfig({
401
401
  displayName: "Logo",
402
402
  componentId: "sc-1tybprx-0"
403
- })`display:inline-block;height:0.8em;margin-right:1em;transform:translate(0.3em,-0.2em);`, Header = () => /* @__PURE__ */ jsxs(Fragment, { children: [
403
+ })(["display:inline-block;height:0.8em;margin-right:1em;transform:translate(0.3em,-0.2em);"]), Header = () => /* @__PURE__ */ jsxs(Fragment, { children: [
404
404
  /* @__PURE__ */ jsx(Logo, { children: /* @__PURE__ */ jsx(MuxLogo, { height: 13 }) }),
405
405
  "API Credentials"
406
406
  ] });
@@ -965,10 +965,10 @@ function tryWithSuspend(block, onError) {
965
965
  return onError ? onError(errorOrPromise) : void 0;
966
966
  }
967
967
  }
968
- const Image$1 = styled.img.withConfig({
968
+ const Image$1 = /* @__PURE__ */ styled.img.withConfig({
969
969
  displayName: "Image",
970
970
  componentId: "sc-ul2n6m-0"
971
- })`transition:opacity 0.175s ease-out 0s;display:block;width:100%;height:100%;object-fit:contain;object-position:center center;`, STATUS_TO_TONE = {
971
+ })(["transition:opacity 0.175s ease-out 0s;display:block;width:100%;height:100%;object-fit:contain;object-position:center center;"]), STATUS_TO_TONE = {
972
972
  loading: "transparent",
973
973
  error: "critical",
974
974
  loaded: "default"
@@ -1029,10 +1029,10 @@ function VideoThumbnail({
1029
1029
  } })
1030
1030
  ] }) : null }) });
1031
1031
  }
1032
- const MissingAssetCheckbox = styled(Checkbox).withConfig({
1032
+ const MissingAssetCheckbox = /* @__PURE__ */ styled(Checkbox).withConfig({
1033
1033
  displayName: "MissingAssetCheckbox",
1034
1034
  componentId: "sc-b02pvs-0"
1035
- })`position:static !important;input::after{content:'';position:absolute;inset:0;display:block;cursor:pointer;z-index:1000;}`;
1035
+ })(["position:static !important;input::after{content:'';position:absolute;inset:0;display:block;cursor:pointer;z-index:1000;}"]);
1036
1036
  function MissingAsset({
1037
1037
  asset,
1038
1038
  selectAsset,
@@ -2764,7 +2764,7 @@ function VideoPlayer({
2764
2764
  /* @__PURE__ */ jsx(MuxPlayer, { poster: isAudio ? void 0 : poster, ref: muxPlayer, ...props, playsInline: !0, playbackId, tokens, preload: "metadata", crossOrigin: "anonymous", metadata: {
2765
2765
  player_name: "Sanity Admin Dashboard",
2766
2766
  // @ts-expect-error - this constant is search/replaced so must be exact, not accessed with an index signature
2767
- player_version: "4.1.2",
2767
+ player_version: "4.1.3",
2768
2768
  page_type: "Preview Player"
2769
2769
  }, audio: isAudio, _hlsConfig: hlsConfig, style: {
2770
2770
  ...!isAudio && {
@@ -2907,10 +2907,10 @@ function DocumentPreview(props) {
2907
2907
  }
2908
2908
  );
2909
2909
  }
2910
- const Container = styled(Box).withConfig({
2910
+ const Container = /* @__PURE__ */ styled(Box).withConfig({
2911
2911
  displayName: "Container",
2912
2912
  componentId: "sc-a58zkj-0"
2913
- })`*{color:${(props) => props.theme.sanity.color.base.fg};}a{text-decoration:none;}h2{font-size:${(props) => props.theme.sanity.fonts.text.sizes[1]};}`, VideoReferences = (props) => {
2913
+ })(["*{color:", ";}a{text-decoration:none;}h2{font-size:", ";}"], (props) => props.theme.sanity.color.base.fg, (props) => props.theme.sanity.fonts.text.sizes[1]), VideoReferences = (props) => {
2914
2914
  const schema = useSchema();
2915
2915
  if (!props.isLoaded)
2916
2916
  return /* @__PURE__ */ jsx(SpinnerBox, {});
@@ -3211,10 +3211,10 @@ ${displayInfo.id}`, icon: TagIcon, size: 2 }),
3211
3211
  displayInfo.title != displayInfo.id.slice(0, 12) && /* @__PURE__ */ jsx(IconInfo, { text: displayInfo.id.slice(0, 12), icon: TagIcon, size: 1, muted: !0 })
3212
3212
  ] })
3213
3213
  ] });
3214
- }, PlayButton = styled.button.withConfig({
3214
+ }, PlayButton = /* @__PURE__ */ styled.button.withConfig({
3215
3215
  displayName: "PlayButton",
3216
3216
  componentId: "sc-8aoab-0"
3217
- })`display:block;padding:0;margin:0;border:none;border-radius:0.1875rem;position:relative;cursor:pointer;&::after{content:'';background:var(--card-fg-color);opacity:0;display:block;position:absolute;inset:0;z-index:10;transition:0.15s ease-out;border-radius:inherit;}> div[data-play]{z-index:11;opacity:0;transition:0.15s 0.05s ease-out;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:var(--card-fg-color);background:var(--card-bg-color);width:auto;height:30%;aspect-ratio:1;border-radius:100%;display:flex;justify-content:center;align-items:center;box-sizing:border-box;> svg{display:block;width:70%;height:auto;transform:translateX(5%);}}&:hover,&:focus{&::after{opacity:0.3;}> div[data-play]{opacity:1;}}`;
3217
+ })(["display:block;padding:0;margin:0;border:none;border-radius:0.1875rem;position:relative;cursor:pointer;&::after{content:'';background:var(--card-fg-color);opacity:0;display:block;position:absolute;inset:0;z-index:10;transition:0.15s ease-out;border-radius:inherit;}> div[data-play]{z-index:11;opacity:0;transition:0.15s 0.05s ease-out;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:var(--card-fg-color);background:var(--card-bg-color);width:auto;height:30%;aspect-ratio:1;border-radius:100%;display:flex;justify-content:center;align-items:center;box-sizing:border-box;> svg{display:block;width:70%;height:auto;transform:translateX(5%);}}&:hover,&:focus{&::after{opacity:0.3;}> div[data-play]{opacity:1;}}"]);
3218
3218
  function VideoInBrowser({
3219
3219
  onSelect,
3220
3220
  onEdit,
@@ -3765,10 +3765,10 @@ function SelectAssets({
3765
3765
  }, [onChange, setDialogState, selectedAsset]);
3766
3766
  return /* @__PURE__ */ jsx(VideosBrowser, { onSelect: handleSelect, config });
3767
3767
  }
3768
- const StyledDialog = styled(Dialog).withConfig({
3768
+ const StyledDialog = /* @__PURE__ */ styled(Dialog).withConfig({
3769
3769
  displayName: "StyledDialog",
3770
3770
  componentId: "sc-w5w8ee-0"
3771
- })`> div[data-ui='DialogCard'] > div[data-ui='Card']{height:100%;}`;
3771
+ })(["> div[data-ui='DialogCard'] > div[data-ui='Card']{height:100%;}"]);
3772
3772
  function InputBrowser({
3773
3773
  setDialogState,
3774
3774
  asset,
@@ -3783,22 +3783,22 @@ const useCancelUpload = (asset, onChange) => {
3783
3783
  return useCallback(() => {
3784
3784
  asset && (onChange(PatchEvent.from(unset())), asset.assetId && deleteAssetOnMux(client, asset.assetId), asset._id && client.delete(asset._id));
3785
3785
  }, [asset, client, onChange]);
3786
- }, TopControls = styled.div.withConfig({
3786
+ }, TopControls = /* @__PURE__ */ styled.div.withConfig({
3787
3787
  displayName: "TopControls",
3788
3788
  componentId: "sc-1drlf9e-0"
3789
- })`position:absolute;top:0;right:0;justify-content:flex-end;button{height:auto;}`, CardWrapper = styled(Card).withConfig({
3789
+ })(["position:absolute;top:0;right:0;justify-content:flex-end;button{height:auto;}"]), CardWrapper = /* @__PURE__ */ styled(Card).withConfig({
3790
3790
  displayName: "CardWrapper",
3791
3791
  componentId: "sc-1mfzr0o-0"
3792
- })`min-height:82px;box-sizing:border-box;`, FlexWrapper = styled(Flex).withConfig({
3792
+ })(["min-height:82px;box-sizing:border-box;"]), FlexWrapper = /* @__PURE__ */ styled(Flex).withConfig({
3793
3793
  displayName: "FlexWrapper",
3794
3794
  componentId: "sc-1mfzr0o-1"
3795
- })`text-overflow:ellipsis;overflow:hidden;`, LeftSection = styled(Stack).withConfig({
3795
+ })(["text-overflow:ellipsis;overflow:hidden;"]), LeftSection = /* @__PURE__ */ styled(Stack).withConfig({
3796
3796
  displayName: "LeftSection",
3797
3797
  componentId: "sc-1mfzr0o-2"
3798
- })`position:relative;width:60%;`, CodeWrapper = styled(Code).withConfig({
3798
+ })(["position:relative;width:60%;"]), CodeWrapper = /* @__PURE__ */ styled(Code).withConfig({
3799
3799
  displayName: "CodeWrapper",
3800
3800
  componentId: "sc-1mfzr0o-3"
3801
- })`position:relative;width:100%;code{overflow:hidden;text-overflow:ellipsis;position:relative;max-width:200px;}`, UploadProgress = ({
3801
+ })(["position:relative;width:100%;code{overflow:hidden;text-overflow:ellipsis;position:relative;max-width:200px;}"]), UploadProgress = ({
3802
3802
  progress = 100,
3803
3803
  onCancel,
3804
3804
  filename,
@@ -3928,13 +3928,13 @@ function FileInputMenuItem(props) {
3928
3928
  /* @__PURE__ */ jsx("input", { "data-testid": "file-button-input", accept, capture, id, multiple, onChange: handleChange, type: "file", value: "", disabled })
3929
3929
  ] });
3930
3930
  }
3931
- const LockCard = styled(Card).withConfig({
3931
+ const LockCard = /* @__PURE__ */ styled(Card).withConfig({
3932
3932
  displayName: "LockCard",
3933
3933
  componentId: "sc-aimiq6-0"
3934
- })`position:absolute;top:0;left:0;opacity:0.6;mix-blend-mode:screen;background:transparent;`, LockButton = styled(Button).withConfig({
3934
+ })(["position:absolute;top:0;left:0;opacity:0.6;mix-blend-mode:screen;background:transparent;"]), LockButton = /* @__PURE__ */ styled(Button).withConfig({
3935
3935
  displayName: "LockButton",
3936
3936
  componentId: "sc-aimiq6-1"
3937
- })`background:transparent;color:white;`, isVideoAsset = (asset) => asset._type === "mux.videoAsset";
3937
+ })(["background:transparent;color:white;"]), isVideoAsset = (asset) => asset._type === "mux.videoAsset";
3938
3938
  function PlayerActionsMenu$1(props) {
3939
3939
  const {
3940
3940
  asset,
@@ -4103,13 +4103,13 @@ function formatBytes(bytes, si = !1, dp = 1) {
4103
4103
  while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
4104
4104
  return bytes.toFixed(dp) + " " + units[u];
4105
4105
  }
4106
- const RangeInput = styled.input.withConfig({
4106
+ const RangeInput = /* @__PURE__ */ styled.input.withConfig({
4107
4107
  displayName: "RangeInput",
4108
4108
  componentId: "sc-8lzhot-0"
4109
- })`width:100%;height:4px;border-radius:2px;background:var(--card-border-color);outline:none;-webkit-appearance:none;appearance:none;&::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background:var(--card-focus-ring-color,#2276fc);cursor:pointer;border:2px solid white;box-shadow:0 1px 3px rgba(0,0,0,0.2);}&::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--card-focus-ring-color,#2276fc);cursor:pointer;border:2px solid white;box-shadow:0 1px 3px rgba(0,0,0,0.2);}&:hover::-webkit-slider-thumb{background:var(--card-focus-ring-color,#1a5fc7);}&:hover::-moz-range-thumb{background:var(--card-focus-ring-color,#1a5fc7);}`, WatermarkOverlay = styled.div.withConfig({
4109
+ })(["width:100%;height:4px;border-radius:2px;background:var(--card-border-color);outline:none;-webkit-appearance:none;appearance:none;&::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background:var(--card-focus-ring-color,#2276fc);cursor:pointer;border:2px solid white;box-shadow:0 1px 3px rgba(0,0,0,0.2);}&::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--card-focus-ring-color,#2276fc);cursor:pointer;border:2px solid white;box-shadow:0 1px 3px rgba(0,0,0,0.2);}&:hover::-webkit-slider-thumb{background:var(--card-focus-ring-color,#1a5fc7);}&:hover::-moz-range-thumb{background:var(--card-focus-ring-color,#1a5fc7);}"]), WatermarkOverlay = /* @__PURE__ */ styled.div.withConfig({
4110
4110
  displayName: "WatermarkOverlay",
4111
4111
  componentId: "sc-8lzhot-1"
4112
- })`position:absolute;max-width:200px;opacity:${(props) => props.$opacity};cursor:move;user-select:none;z-index:10;pointer-events:auto;img{width:100%;height:auto;display:block;pointer-events:none;}&:hover{outline:2px dashed rgba(255,255,255,0.8);outline-offset:4px;}`;
4112
+ })(["position:absolute;max-width:200px;opacity:", ";cursor:move;user-select:none;z-index:10;pointer-events:auto;img{width:100%;height:auto;display:block;pointer-events:none;}&:hover{outline:2px dashed rgba(255,255,255,0.8);outline-offset:4px;}"], (props) => props.$opacity);
4113
4113
  function DraggableWatermark({
4114
4114
  watermark,
4115
4115
  onChange,
@@ -5291,18 +5291,18 @@ function UploadCard({
5291
5291
  children
5292
5292
  ] });
5293
5293
  }
5294
- const HiddenInput$1 = styled.input.attrs({
5294
+ const HiddenInput$1 = /* @__PURE__ */ styled.input.attrs({
5295
5295
  type: "text"
5296
5296
  }).withConfig({
5297
5297
  displayName: "HiddenInput",
5298
5298
  componentId: "sc-1u4yc6p-0"
5299
- })`position:absolute;border:0;color:white;opacity:0;&:focus{outline:none;}`, HiddenInput = styled.input.withConfig({
5299
+ })(["position:absolute;border:0;color:white;opacity:0;&:focus{outline:none;}"]), HiddenInput = /* @__PURE__ */ styled.input.withConfig({
5300
5300
  displayName: "HiddenInput",
5301
5301
  componentId: "sc-15tkwq4-0"
5302
- })`overflow:hidden;width:0.1px;height:0.1px;opacity:0;position:absolute;z-index:-1;`, Label = styled.label.withConfig({
5302
+ })(["overflow:hidden;width:0.1px;height:0.1px;opacity:0;position:absolute;z-index:-1;"]), Label = /* @__PURE__ */ styled.label.withConfig({
5303
5303
  displayName: "Label",
5304
5304
  componentId: "sc-15tkwq4-1"
5305
- })`position:relative;`, FileInputButton = ({
5305
+ })(["position:relative;"]), FileInputButton = ({
5306
5306
  onSelect,
5307
5307
  accept,
5308
5308
  ...props