sanity-plugin-mux-input 2.8.1 → 2.9.0

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.mjs CHANGED
@@ -256,7 +256,7 @@ function muxAssetToSanityDocument(asset) {
256
256
  _createdAt: parseMuxDate(asset.created_at).toISOString(),
257
257
  assetId: asset.id,
258
258
  playbackId,
259
- filename: `Asset #${truncateString(asset.id, 15)}`,
259
+ filename: asset.meta?.title ?? `Asset #${truncateString(asset.id, 15)}`,
260
260
  status: asset.status,
261
261
  data: asset
262
262
  };
@@ -915,7 +915,7 @@ function VideoPlayer({
915
915
  crossOrigin: "anonymous",
916
916
  metadata: {
917
917
  player_name: "Sanity Admin Dashboard",
918
- player_version: "2.8.1",
918
+ player_version: "2.9.0",
919
919
  page_type: "Preview Player"
920
920
  },
921
921
  audio: isAudio,
@@ -2309,7 +2309,7 @@ const InputFallback = () => /* @__PURE__ */ jsx("div", { style: { padding: 1 },
2309
2309
  }
2310
2310
  ) }), useAccessControl = (config) => {
2311
2311
  const user = useCurrentUser();
2312
- return { hasConfigAccess: !config?.allowedRolesForConfiguration || user?.roles?.some((role) => config.allowedRolesForConfiguration.includes(role.name)) };
2312
+ return { hasConfigAccess: !config?.allowedRolesForConfiguration?.length || user?.roles?.some((role) => config.allowedRolesForConfiguration.includes(role.name)) };
2313
2313
  };
2314
2314
  function Onboard(props) {
2315
2315
  const { setDialogState } = props, handleOpen = useCallback(() => setDialogState("secrets"), [setDialogState]), { hasConfigAccess } = useAccessControl(props.config);