@sanity/schema
Advanced tools
Comparing version
@@ -850,8 +850,2 @@ import omit from "lodash/omit.js"; | ||
to: { type: "sanity.fileAsset" } | ||
}, MEDIA_LIBRARY_ASSET_FIELD$1 = { | ||
name: "media", | ||
type: "globalDocumentReference", | ||
hidden: !0, | ||
to: [] | ||
// Just have to be *something* to be valid | ||
}, OVERRIDABLE_FIELDS$7 = [...DEFAULT_OVERRIDEABLE_FIELDS], FILE_CORE = { | ||
@@ -869,3 +863,3 @@ name: "file", | ||
extend(rawSubTypeDef, createMemberType) { | ||
const options = { ...rawSubTypeDef.options || DEFAULT_OPTIONS$1 }, fields = [ASSET_FIELD$1, MEDIA_LIBRARY_ASSET_FIELD$1, ...rawSubTypeDef.fields || []], subTypeDef = { ...rawSubTypeDef, fields }, parsed = Object.assign(pick(FILE_CORE, OVERRIDABLE_FIELDS$7), subTypeDef, { | ||
const options = { ...rawSubTypeDef.options || DEFAULT_OPTIONS$1 }, fields = [ASSET_FIELD$1, ...rawSubTypeDef.fields || []], subTypeDef = { ...rawSubTypeDef, fields }, parsed = Object.assign(pick(FILE_CORE, OVERRIDABLE_FIELDS$7), subTypeDef, { | ||
type: FILE_CORE, | ||
@@ -981,24 +975,2 @@ title: subTypeDef.title || (subTypeDef.name ? startCase(subTypeDef.name) : FILE_CORE.title), | ||
type: "sanity.imageCrop" | ||
}, MEDIA_LIBRARY_ASSET_FIELD = { | ||
name: "media", | ||
type: "globalDocumentReference", | ||
hidden: !0, | ||
to: [ | ||
{ | ||
type: "sanity.asset" | ||
} | ||
] | ||
// resourceType: 'asset-library', | ||
// resourceId: 'al32RNT8lVAT', | ||
// weak: true, | ||
// to: [ | ||
// { | ||
// type: 'sanity.asset', | ||
// preview: { | ||
// select: { | ||
// title: 'title', | ||
// }, | ||
// }, | ||
// }, | ||
// ], | ||
}, OVERRIDABLE_FIELDS$5 = [...DEFAULT_OVERRIDEABLE_FIELDS], IMAGE_CORE = { | ||
@@ -1017,8 +989,3 @@ name: "image", | ||
options.hotspot || (hotspotFields = hotspotFields.map((field) => ({ ...field, hidden: !0 }))); | ||
const fields = [ | ||
ASSET_FIELD, | ||
MEDIA_LIBRARY_ASSET_FIELD, | ||
...hotspotFields, | ||
...rawSubTypeDef.fields || [] | ||
], subTypeDef = { ...rawSubTypeDef, fields }, parsed = Object.assign(pick(this.get(), OVERRIDABLE_FIELDS$5), subTypeDef, { | ||
const fields = [ASSET_FIELD, ...hotspotFields, ...rawSubTypeDef.fields || []], subTypeDef = { ...rawSubTypeDef, fields }, parsed = Object.assign(pick(this.get(), OVERRIDABLE_FIELDS$5), subTypeDef, { | ||
type: IMAGE_CORE, | ||
@@ -1025,0 +992,0 @@ title: subTypeDef.title || (subTypeDef.name ? startCase(subTypeDef.name) : IMAGE_CORE.title), |
@@ -845,8 +845,2 @@ "use strict"; | ||
to: { type: "sanity.fileAsset" } | ||
}, MEDIA_LIBRARY_ASSET_FIELD$1 = { | ||
name: "media", | ||
type: "globalDocumentReference", | ||
hidden: !0, | ||
to: [] | ||
// Just have to be *something* to be valid | ||
}, OVERRIDABLE_FIELDS$7 = [...DEFAULT_OVERRIDEABLE_FIELDS], FILE_CORE = { | ||
@@ -864,3 +858,3 @@ name: "file", | ||
extend(rawSubTypeDef, createMemberType) { | ||
const options = { ...rawSubTypeDef.options || DEFAULT_OPTIONS$1 }, fields = [ASSET_FIELD$1, MEDIA_LIBRARY_ASSET_FIELD$1, ...rawSubTypeDef.fields || []], subTypeDef = { ...rawSubTypeDef, fields }, parsed = Object.assign(pick__default.default(FILE_CORE, OVERRIDABLE_FIELDS$7), subTypeDef, { | ||
const options = { ...rawSubTypeDef.options || DEFAULT_OPTIONS$1 }, fields = [ASSET_FIELD$1, ...rawSubTypeDef.fields || []], subTypeDef = { ...rawSubTypeDef, fields }, parsed = Object.assign(pick__default.default(FILE_CORE, OVERRIDABLE_FIELDS$7), subTypeDef, { | ||
type: FILE_CORE, | ||
@@ -976,24 +970,2 @@ title: subTypeDef.title || (subTypeDef.name ? startCase__default.default(subTypeDef.name) : FILE_CORE.title), | ||
type: "sanity.imageCrop" | ||
}, MEDIA_LIBRARY_ASSET_FIELD = { | ||
name: "media", | ||
type: "globalDocumentReference", | ||
hidden: !0, | ||
to: [ | ||
{ | ||
type: "sanity.asset" | ||
} | ||
] | ||
// resourceType: 'asset-library', | ||
// resourceId: 'al32RNT8lVAT', | ||
// weak: true, | ||
// to: [ | ||
// { | ||
// type: 'sanity.asset', | ||
// preview: { | ||
// select: { | ||
// title: 'title', | ||
// }, | ||
// }, | ||
// }, | ||
// ], | ||
}, OVERRIDABLE_FIELDS$5 = [...DEFAULT_OVERRIDEABLE_FIELDS], IMAGE_CORE = { | ||
@@ -1012,8 +984,3 @@ name: "image", | ||
options.hotspot || (hotspotFields = hotspotFields.map((field) => ({ ...field, hidden: !0 }))); | ||
const fields = [ | ||
ASSET_FIELD, | ||
MEDIA_LIBRARY_ASSET_FIELD, | ||
...hotspotFields, | ||
...rawSubTypeDef.fields || [] | ||
], subTypeDef = { ...rawSubTypeDef, fields }, parsed = Object.assign(pick__default.default(this.get(), OVERRIDABLE_FIELDS$5), subTypeDef, { | ||
const fields = [ASSET_FIELD, ...hotspotFields, ...rawSubTypeDef.fields || []], subTypeDef = { ...rawSubTypeDef, fields }, parsed = Object.assign(pick__default.default(this.get(), OVERRIDABLE_FIELDS$5), subTypeDef, { | ||
type: IMAGE_CORE, | ||
@@ -1020,0 +987,0 @@ title: subTypeDef.title || (subTypeDef.name ? startCase__default.default(subTypeDef.name) : IMAGE_CORE.title), |
{ | ||
"name": "@sanity/schema", | ||
"version": "3.80.2-media-library.65+692bfc22b8", | ||
"version": "3.80.2-release-duplicate-action.44+a8e45b847e", | ||
"description": "", | ||
@@ -67,3 +67,3 @@ "keywords": [ | ||
"@sanity/generate-help-url": "^3.0.0", | ||
"@sanity/types": "3.80.2-media-library.65+692bfc22b8", | ||
"@sanity/types": "3.80.2-release-duplicate-action.44+a8e45b847e", | ||
"arrify": "^2.0.1", | ||
@@ -86,3 +86,3 @@ "groq-js": "^1.16.1", | ||
}, | ||
"gitHead": "692bfc22b8ee3c9ffb283654310c2493ca3f012a" | ||
"gitHead": "a8e45b847ecb23b55cbc117f4dc115fcae777573" | ||
} |
@@ -14,9 +14,2 @@ import {pick, startCase} from 'lodash' | ||
export const MEDIA_LIBRARY_ASSET_FIELD = { | ||
name: 'media', | ||
type: 'globalDocumentReference', | ||
hidden: true, | ||
to: [], // Just have to be *something* to be valid | ||
} | ||
const OVERRIDABLE_FIELDS = [...DEFAULT_OVERRIDEABLE_FIELDS] | ||
@@ -42,3 +35,3 @@ | ||
const fields = [ASSET_FIELD, MEDIA_LIBRARY_ASSET_FIELD, ...(rawSubTypeDef.fields || [])] | ||
const fields = [ASSET_FIELD, ...(rawSubTypeDef.fields || [])] | ||
@@ -45,0 +38,0 @@ const subTypeDef = {...rawSubTypeDef, fields} |
@@ -5,3 +5,3 @@ import {pick, startCase} from 'lodash' | ||
import {DEFAULT_OVERRIDEABLE_FIELDS} from './constants' | ||
import {ASSET_FIELD, CROP_FIELD, HOTSPOT_FIELD, MEDIA_LIBRARY_ASSET_FIELD} from './image/fieldDefs' | ||
import {ASSET_FIELD, CROP_FIELD, HOTSPOT_FIELD} from './image/fieldDefs' | ||
import {createFieldsets} from './object' | ||
@@ -33,8 +33,3 @@ import {lazyGetter} from './utils' | ||
const fields = [ | ||
ASSET_FIELD, | ||
MEDIA_LIBRARY_ASSET_FIELD, | ||
...hotspotFields, | ||
...(rawSubTypeDef.fields || []), | ||
] | ||
const fields = [ASSET_FIELD, ...hotspotFields, ...(rawSubTypeDef.fields || [])] | ||
const subTypeDef = {...rawSubTypeDef, fields} | ||
@@ -41,0 +36,0 @@ |
@@ -16,25 +16,1 @@ export const ASSET_FIELD = { | ||
} | ||
export const MEDIA_LIBRARY_ASSET_FIELD = { | ||
name: 'media', | ||
type: 'globalDocumentReference', | ||
hidden: true, | ||
to: [ | ||
{ | ||
type: 'sanity.asset', | ||
}, | ||
], | ||
// resourceType: 'asset-library', | ||
// resourceId: 'al32RNT8lVAT', | ||
// weak: true, | ||
// to: [ | ||
// { | ||
// type: 'sanity.asset', | ||
// preview: { | ||
// select: { | ||
// title: 'title', | ||
// }, | ||
// }, | ||
// }, | ||
// ], | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
1155318
-0.5%13312
-1%30
-11.76%