sanity 5.2.0-next.65 → 5.2.0-next.68
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/_chunks-es/package.js +1 -1
- package/lib/_chunks-es/version.js +1 -1
- package/lib/index.js +40 -28
- package/lib/index.js.map +1 -1
- package/package.json +14 -14
|
@@ -7,7 +7,7 @@ try {
|
|
|
7
7
|
try {
|
|
8
8
|
buildVersion = buildVersion || // This is replaced by `@sanity/pkg-utils` at build time
|
|
9
9
|
// and must always be references by its full static name, e.g. no optional chaining, no `if (process && process.env)` etc.
|
|
10
|
-
"5.2.0-next.
|
|
10
|
+
"5.2.0-next.68+ef88ca91c1";
|
|
11
11
|
} catch {
|
|
12
12
|
}
|
|
13
13
|
const SANITY_VERSION = buildVersion || `${version}-dev`;
|
package/lib/index.js
CHANGED
|
@@ -2858,7 +2858,7 @@ function createHookFromObservableFactory(observableFactory, initialValue) {
|
|
|
2858
2858
|
return result.tuple;
|
|
2859
2859
|
};
|
|
2860
2860
|
}
|
|
2861
|
-
function isNonNullable$
|
|
2861
|
+
function isNonNullable$2(value) {
|
|
2862
2862
|
return value != null;
|
|
2863
2863
|
}
|
|
2864
2864
|
const PATH_SEPARATOR = ".", DRAFTS_PREFIX = `${DRAFTS_FOLDER}${PATH_SEPARATOR}`;
|
|
@@ -2925,7 +2925,7 @@ function collate(documents) {
|
|
|
2925
2925
|
return Array.from(byId.values());
|
|
2926
2926
|
}
|
|
2927
2927
|
function removeDupes$3(documents) {
|
|
2928
|
-
return collate(documents).map((entry) => entry.draft || entry.published || entry.versions[0]).filter(isNonNullable$
|
|
2928
|
+
return collate(documents).map((entry) => entry.draft || entry.published || entry.versions[0]).filter(isNonNullable$2);
|
|
2929
2929
|
}
|
|
2930
2930
|
const EMPTY_OBJECT = Object.freeze({}), EMPTY_ARRAY$z = Object.freeze([]), formatRelativeLocale = (...args) => {
|
|
2931
2931
|
const dateFnsRelative = formatRelative(...args);
|
|
@@ -3150,7 +3150,7 @@ function useGetI18nText(input) {
|
|
|
3150
3150
|
let t0;
|
|
3151
3151
|
if ($[0] !== input) {
|
|
3152
3152
|
const items = Array.isArray(input) ? input : [input];
|
|
3153
|
-
t0 = JSON.stringify(items.flatMap(_temp2$1I).filter(isNonNullable$
|
|
3153
|
+
t0 = JSON.stringify(items.flatMap(_temp2$1I).filter(isNonNullable$2).sort()), $[0] = input, $[1] = t0;
|
|
3154
3154
|
} else
|
|
3155
3155
|
t0 = $[1];
|
|
3156
3156
|
const stableNamespaces = t0;
|
|
@@ -4217,7 +4217,7 @@ function removeItem(key) {
|
|
|
4217
4217
|
supportsLocalStorage ? localStorage.removeItem(key) : delete memStore[key];
|
|
4218
4218
|
}
|
|
4219
4219
|
function createBroadcastChannel(namespace) {
|
|
4220
|
-
const storageEvents$ = typeof window > "u" ? of() : fromEvent(window, "storage"), storageKey = `__studio_local_storage_messaging_${namespace}`, broadcastedMessages$ = new Subject(), messages$ = merge(broadcastedMessages$, storageEvents$.pipe(filter((event) => event.key === storageKey), map((event) => event.newValue), filter(isNonNullable$
|
|
4220
|
+
const storageEvents$ = typeof window > "u" ? of() : fromEvent(window, "storage"), storageKey = `__studio_local_storage_messaging_${namespace}`, broadcastedMessages$ = new Subject(), messages$ = merge(broadcastedMessages$, storageEvents$.pipe(filter((event) => event.key === storageKey), map((event) => event.newValue), filter(isNonNullable$2), map((newValue) => JSON.parse(newValue)))).pipe(
|
|
4221
4221
|
// this is important to ensure all new subscribers get a message on subscribe
|
|
4222
4222
|
shareReplay(1)
|
|
4223
4223
|
);
|
|
@@ -5881,7 +5881,7 @@ function pathToString(path = []) {
|
|
|
5881
5881
|
throw new Error(`Unsupported path segment "${segment}"`);
|
|
5882
5882
|
}, "");
|
|
5883
5883
|
}
|
|
5884
|
-
function isNonNullable$
|
|
5884
|
+
function isNonNullable$1(t) {
|
|
5885
5885
|
return t !== null || t !== void 0;
|
|
5886
5886
|
}
|
|
5887
5887
|
function convertToValidationMarker(validatorResult, level, context) {
|
|
@@ -5889,7 +5889,7 @@ function convertToValidationMarker(validatorResult, level, context) {
|
|
|
5889
5889
|
throw new Error("missing context");
|
|
5890
5890
|
if (validatorResult === !0) return [];
|
|
5891
5891
|
if (Array.isArray(validatorResult))
|
|
5892
|
-
return validatorResult.flatMap((child) => convertToValidationMarker(child, level, context)).filter(isNonNullable$
|
|
5892
|
+
return validatorResult.flatMap((child) => convertToValidationMarker(child, level, context)).filter(isNonNullable$1);
|
|
5893
5893
|
if (typeof validatorResult == "string")
|
|
5894
5894
|
return convertToValidationMarker({
|
|
5895
5895
|
message: validatorResult
|
|
@@ -6703,7 +6703,19 @@ const requestIdleCallbackShim = function(callback, options) {
|
|
|
6703
6703
|
}));
|
|
6704
6704
|
}, DEFAULT_MAX_FETCH_CONCURRENCY = 25, DEFAULT_MAX_CUSTOM_VALIDATION_CONCURRENCY = 5;
|
|
6705
6705
|
let _limitConcurrency;
|
|
6706
|
-
const getConcurrencyLimiter = (maxConcurrency) => _limitConcurrency || (_limitConcurrency = createClientConcurrencyLimiter(maxConcurrency), _limitConcurrency), isRecord$2 = (maybeRecord) => typeof maybeRecord == "object" && maybeRecord !== null && !Array.isArray(maybeRecord)
|
|
6706
|
+
const getConcurrencyLimiter = (maxConcurrency) => _limitConcurrency || (_limitConcurrency = createClientConcurrencyLimiter(maxConcurrency), _limitConcurrency), isRecord$2 = (maybeRecord) => typeof maybeRecord == "object" && maybeRecord !== null && !Array.isArray(maybeRecord);
|
|
6707
|
+
function extractFieldRulesFromRule(rule) {
|
|
6708
|
+
const results = [];
|
|
6709
|
+
rule._fieldRules && results.push(rule._fieldRules);
|
|
6710
|
+
for (const ruleSpec of rule._rules)
|
|
6711
|
+
if (ruleSpec.flag === "all" || ruleSpec.flag === "either") {
|
|
6712
|
+
const childRules = ruleSpec.constraint;
|
|
6713
|
+
if (Array.isArray(childRules))
|
|
6714
|
+
for (const childRule of childRules)
|
|
6715
|
+
results.push(...extractFieldRulesFromRule(childRule));
|
|
6716
|
+
}
|
|
6717
|
+
return results;
|
|
6718
|
+
}
|
|
6707
6719
|
function resolveTypeForArrayItem(item, candidates) {
|
|
6708
6720
|
if (candidates.length === 1) return candidates[0];
|
|
6709
6721
|
const itemType = isTypedObject(item) && item._type, primitive = item == null || !itemType && typeString(item).toLowerCase();
|
|
@@ -6814,7 +6826,7 @@ function validateItemObservable({
|
|
|
6814
6826
|
value == null && selfIsRequired)
|
|
6815
6827
|
) {
|
|
6816
6828
|
const fieldTypes = type.fields.reduce((acc, field) => (acc[field.name] = field.type, acc), {});
|
|
6817
|
-
nestedChecks = nestedChecks.concat(rules.
|
|
6829
|
+
nestedChecks = nestedChecks.concat(rules.flatMap((rule) => extractFieldRulesFromRule(rule)).flatMap((fieldResults) => Object.entries(fieldResults)).flatMap(([name, validation2]) => {
|
|
6818
6830
|
const fieldType = fieldTypes[name];
|
|
6819
6831
|
return normalizeValidationRules({
|
|
6820
6832
|
...fieldType,
|
|
@@ -6852,7 +6864,7 @@ function validateItemObservable({
|
|
|
6852
6864
|
type: resolveTypeForArrayItem(item, type.of),
|
|
6853
6865
|
environment,
|
|
6854
6866
|
customValidationConcurrencyLimiter
|
|
6855
|
-
})))), defer(() => merge([...selfChecks, ...nestedChecks])).pipe(mergeMap((validateNode) => concat(idle(), validateNode), 40), mergeAll(), toArray$1(), map(flatten$1), map((results) => rules.some((rule) => rule.
|
|
6867
|
+
})))), defer(() => merge([...selfChecks, ...nestedChecks])).pipe(mergeMap((validateNode) => concat(idle(), validateNode), 40), mergeAll(), toArray$1(), map(flatten$1), map((results) => rules.some((rule) => extractFieldRulesFromRule(rule).length > 0) ? uniqBy(results, (rule) => JSON.stringify(rule)) : results));
|
|
6856
6868
|
}
|
|
6857
6869
|
function idle(timeout2) {
|
|
6858
6870
|
return new Observable((observer) => {
|
|
@@ -16530,7 +16542,7 @@ function deriveSearchWeightsFromType2024({
|
|
|
16530
16542
|
};
|
|
16531
16543
|
return CACHE.set(schemaType, result), result;
|
|
16532
16544
|
}
|
|
16533
|
-
const isDocumentType = (type) => !!(type.type && type.type.name === "document"), isObjectType = (type) => type.jsonType === "object", isIgnoredType = (type) => type.name.startsWith("sanity.") && type.name !== "sanity.previewUrlSecret", getSearchableTypes = (schema2, explicitlyAllowedTypes = []) => schema2.getTypeNames().map((typeName) => schema2.get(typeName)).filter(isNonNullable$
|
|
16545
|
+
const isDocumentType = (type) => !!(type.type && type.type.name === "document"), isObjectType = (type) => type.jsonType === "object", isIgnoredType = (type) => type.name.startsWith("sanity.") && type.name !== "sanity.previewUrlSecret", getSearchableTypes = (schema2, explicitlyAllowedTypes = []) => schema2.getTypeNames().map((typeName) => schema2.get(typeName)).filter(isNonNullable$2).filter((type) => isDocumentType(type) && !isIgnoredType(type) || explicitlyAllowedTypes.includes(type.name)).filter(isObjectType);
|
|
16534
16546
|
function isPerspectiveRaw(perspective) {
|
|
16535
16547
|
return perspective ? isString(perspective) ? perspective === "raw" : perspective.some((p) => p === "raw") : !1;
|
|
16536
16548
|
}
|
|
@@ -17857,7 +17869,7 @@ function useReferenceInput(options) {
|
|
|
17857
17869
|
let t72;
|
|
17858
17870
|
if ($[22] !== initialValueTemplateItems || $[23] !== schemaType.to) {
|
|
17859
17871
|
let t82;
|
|
17860
|
-
$[25] !== schemaType.to ? (t82 = (i) => schemaType.to.some((refType) => refType.name === i.template?.schemaType), $[25] = schemaType.to, $[26] = t82) : t82 = $[26], t72 = (initialValueTemplateItems || []).filter(t82).map(_temp$3E).filter(isNonNullable$
|
|
17872
|
+
$[25] !== schemaType.to ? (t82 = (i) => schemaType.to.some((refType) => refType.name === i.template?.schemaType), $[25] = schemaType.to, $[26] = t82) : t82 = $[26], t72 = (initialValueTemplateItems || []).filter(t82).map(_temp$3E).filter(isNonNullable$2), $[22] = initialValueTemplateItems, $[23] = schemaType.to, $[24] = t72;
|
|
17861
17873
|
} else
|
|
17862
17874
|
t72 = $[24];
|
|
17863
17875
|
t6 = t72;
|
|
@@ -18091,7 +18103,7 @@ function ReferenceInput(props2) {
|
|
|
18091
18103
|
type: option.type,
|
|
18092
18104
|
weak: schemaType.weak,
|
|
18093
18105
|
template: option.template
|
|
18094
|
-
}, ["_strengthenOnPublish"])], patches = [setIfMissing({}), set(schemaType.name, ["_type"]), set(newDocumentId, ["_ref"])].concat(strengthenOnPublishPatches, createInPlaceMetadataPatches).filter(isNonNullable$
|
|
18106
|
+
}, ["_strengthenOnPublish"])], patches = [setIfMissing({}), set(schemaType.name, ["_type"]), set(newDocumentId, ["_ref"])].concat(strengthenOnPublishPatches, createInPlaceMetadataPatches).filter(isNonNullable$2);
|
|
18095
18107
|
onChange(patches), onEditReference({
|
|
18096
18108
|
id: newDocumentId,
|
|
18097
18109
|
type: option.type,
|
|
@@ -18112,7 +18124,7 @@ function ReferenceInput(props2) {
|
|
|
18112
18124
|
const patches_0 = [setIfMissing({}), set(schemaType.name, ["_type"]), set(getPublishedId(nextId), ["_ref"]), hit.published && !schemaType.weak ? unset(["_weak"]) : set(!0, ["_weak"]), hit.published ? unset(["_strengthenOnPublish"]) : set({
|
|
18113
18125
|
type: hit?.type,
|
|
18114
18126
|
weak: schemaType.weak
|
|
18115
|
-
}, ["_strengthenOnPublish"])].filter(isNonNullable$
|
|
18127
|
+
}, ["_strengthenOnPublish"])].filter(isNonNullable$2);
|
|
18116
18128
|
onChange(patches_0), onPathFocus(path);
|
|
18117
18129
|
}, $[12] = onChange, $[13] = onPathFocus, $[14] = path, $[15] = schemaType.name, $[16] = schemaType.weak, $[17] = searchState.hits, $[18] = t2) : t2 = $[18];
|
|
18118
18130
|
const handleChange = t2;
|
|
@@ -18359,7 +18371,7 @@ function StudioReferenceInput(props2) {
|
|
|
18359
18371
|
let t92;
|
|
18360
18372
|
if ($[35] !== initialValueTemplateItems || $[36] !== schemaType.to) {
|
|
18361
18373
|
let t102;
|
|
18362
|
-
$[38] !== schemaType.to ? (t102 = (i) => schemaType.to.some((_refType) => _refType.name === i.template?.schemaType), $[38] = schemaType.to, $[39] = t102) : t102 = $[39], t92 = (initialValueTemplateItems || []).filter(t102).map(_temp3$G).filter(isNonNullable$
|
|
18374
|
+
$[38] !== schemaType.to ? (t102 = (i) => schemaType.to.some((_refType) => _refType.name === i.template?.schemaType), $[38] = schemaType.to, $[39] = t102) : t102 = $[39], t92 = (initialValueTemplateItems || []).filter(t102).map(_temp3$G).filter(isNonNullable$2), $[35] = initialValueTemplateItems, $[36] = schemaType.to, $[37] = t92;
|
|
18363
18375
|
} else
|
|
18364
18376
|
t92 = $[37];
|
|
18365
18377
|
t8 = t92;
|
|
@@ -18552,7 +18564,7 @@ function resolveInitialArrayValues(items, schemaType, resolver) {
|
|
|
18552
18564
|
return of(getMemberTypeOfItem$2(schemaType, item)).pipe(mergeMap((memberType) => memberType ? of(memberType) : EMPTY$5), mergeMap((memberType) => !isEmptyItem(item) || !resolver ? EMPTY$5 : concat(of({
|
|
18553
18565
|
type: "patch",
|
|
18554
18566
|
patches: [set(!0, [itemPathSegment, "_resolvingInitialValue"])]
|
|
18555
|
-
}), defer(() => resolver(memberType, item)).pipe(filter(isNonNullable$
|
|
18567
|
+
}), defer(() => resolver(memberType, item)).pipe(filter(isNonNullable$2), map((initial2) => ({
|
|
18556
18568
|
type: "patch",
|
|
18557
18569
|
patches: assign(initial2, [itemPathSegment])
|
|
18558
18570
|
})), catchError((error) => of({
|
|
@@ -33848,7 +33860,7 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
33848
33860
|
}, $[35] = onPathFocus, $[36] = t15) : t15 = $[36];
|
|
33849
33861
|
const handleReplace = t15, inputId = useId();
|
|
33850
33862
|
let t16;
|
|
33851
|
-
$[37] !== inputId || $[38] !== onSearch || $[39] !== push ? (t16 = (inputValue$) => inputValue$.pipe(filter(isNonNullable$
|
|
33863
|
+
$[37] !== inputId || $[38] !== onSearch || $[39] !== push ? (t16 = (inputValue$) => inputValue$.pipe(filter(isNonNullable$2), distinctUntilChanged(), switchMap((searchString) => concat(of({
|
|
33852
33864
|
isLoading: !0
|
|
33853
33865
|
}), onSearch(searchString).pipe(map((hits) => ({
|
|
33854
33866
|
hits,
|
|
@@ -34459,7 +34471,7 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
34459
34471
|
}, $[37] = onPathFocus, $[38] = t14) : t14 = $[38];
|
|
34460
34472
|
const handleReplace = t14, inputId = useId();
|
|
34461
34473
|
let t15;
|
|
34462
|
-
$[39] !== inputId || $[40] !== onSearch || $[41] !== push ? (t15 = (inputValue$) => inputValue$.pipe(filter(isNonNullable$
|
|
34474
|
+
$[39] !== inputId || $[40] !== onSearch || $[41] !== push ? (t15 = (inputValue$) => inputValue$.pipe(filter(isNonNullable$2), distinctUntilChanged(), switchMap((searchString) => concat(of({
|
|
34463
34475
|
isLoading: !0
|
|
34464
34476
|
}), onSearch(searchString).pipe(map((hits) => ({
|
|
34465
34477
|
hits,
|
|
@@ -43086,7 +43098,7 @@ function debounceCollect(fn, wait) {
|
|
|
43086
43098
|
const collectedArgs = queueItemIds.map((id2) => {
|
|
43087
43099
|
const queueItem = currentlyFlushingQueue[id2];
|
|
43088
43100
|
return queueItem && queueItem.args;
|
|
43089
|
-
}).filter(isNonNullable$
|
|
43101
|
+
}).filter(isNonNullable$2);
|
|
43090
43102
|
fn(collectedArgs).subscribe({
|
|
43091
43103
|
next(results) {
|
|
43092
43104
|
results.forEach((result, i) => {
|
|
@@ -47913,7 +47925,7 @@ function mapHooksToStates(states, {
|
|
|
47913
47925
|
return hooks.map((hook) => {
|
|
47914
47926
|
const id2 = getHookId(hook);
|
|
47915
47927
|
return states.get(id2);
|
|
47916
|
-
}).filter(isNonNullable$
|
|
47928
|
+
}).filter(isNonNullable$2);
|
|
47917
47929
|
}
|
|
47918
47930
|
function useHookCollectionStates(t0) {
|
|
47919
47931
|
const $ = c(12), {
|
|
@@ -48600,7 +48612,7 @@ function ReleaseStatusItems(t0) {
|
|
|
48600
48612
|
let t1;
|
|
48601
48613
|
if ($[0] !== events2) {
|
|
48602
48614
|
const createEvent = events2.find(isCreateReleaseEvent), extraEvent = events2.find(_temp$1W);
|
|
48603
|
-
t1 = [createEvent, extraEvent].filter(isNonNullable$
|
|
48615
|
+
t1 = [createEvent, extraEvent].filter(isNonNullable$2), $[0] = events2, $[1] = t1;
|
|
48604
48616
|
} else
|
|
48605
48617
|
t1 = $[1];
|
|
48606
48618
|
const footerEvents = t1;
|
|
@@ -49237,7 +49249,7 @@ function generateFilterQuery({
|
|
|
49237
49249
|
filterDefinitions: filterDefinitions2
|
|
49238
49250
|
}),
|
|
49239
49251
|
value: filter2?.value
|
|
49240
|
-
})).filter((filter2) => !isEmpty$1(filter2)).filter(isNonNullable$
|
|
49252
|
+
})).filter((filter2) => !isEmpty$1(filter2)).filter(isNonNullable$2).join(" && ");
|
|
49241
49253
|
}
|
|
49242
49254
|
function getFieldFromFilter(fields, filter2) {
|
|
49243
49255
|
return filter2?.fieldId ? fields[filter2.fieldId] : void 0;
|
|
@@ -49415,7 +49427,7 @@ function createFilterMenuItems({
|
|
|
49415
49427
|
const fieldFilters = Object.values(fieldDefinitions).filter((fieldDef) => includesTitleInFieldDefinition(fieldDef, titleFilter)).map((fieldDef) => {
|
|
49416
49428
|
const filterDef = getFilterDefinition(filterDefinitions2, fieldDef.filterName);
|
|
49417
49429
|
return filterDef ? buildSearchFilter(filterDef, fieldDef.id) : null;
|
|
49418
|
-
}).filter(isNonNullable$
|
|
49430
|
+
}).filter(isNonNullable$2), pinnedItems = buildPinnedMenuItems({
|
|
49419
49431
|
fieldDefinitions,
|
|
49420
49432
|
filterDefinitions: filterDefinitions2,
|
|
49421
49433
|
titleFilter
|
|
@@ -49696,7 +49708,7 @@ function FilterTooltip(t0) {
|
|
|
49696
49708
|
const fieldDefinitionDocumentTypeTitles = fieldDefinition?.documentTypes ? fieldDefinition.documentTypes.map((d) => {
|
|
49697
49709
|
const defType = schema2.get(d);
|
|
49698
49710
|
return defType?.title || startCase(defType?.name);
|
|
49699
|
-
}).filter(isNonNullable$
|
|
49711
|
+
}).filter(isNonNullable$2).sort() : EMPTY_ARRAY$z;
|
|
49700
49712
|
if ($[16] !== fieldDefinition || $[17] !== schema2 || $[18] !== t) {
|
|
49701
49713
|
let fieldDefinitionDescription;
|
|
49702
49714
|
if (fieldDefinition?.documentTypes) {
|
|
@@ -49711,7 +49723,7 @@ function FilterTooltip(t0) {
|
|
|
49711
49723
|
}
|
|
49712
49724
|
return null;
|
|
49713
49725
|
}, $[32] = fieldDefinition.fieldPath, $[33] = schema2, $[34] = t112) : t112 = $[34];
|
|
49714
|
-
const descriptions = fieldDefinition.documentTypes.map(t112).filter(isNonNullable$
|
|
49726
|
+
const descriptions = fieldDefinition.documentTypes.map(t112).filter(isNonNullable$2).sort();
|
|
49715
49727
|
t102 = uniq(descriptions), $[28] = fieldDefinition.documentTypes, $[29] = fieldDefinition.fieldPath, $[30] = schema2, $[31] = t102;
|
|
49716
49728
|
} else
|
|
49717
49729
|
t102 = $[31];
|
|
@@ -56894,7 +56906,7 @@ function DocumentPreviewPresence(props2) {
|
|
|
56894
56906
|
let t0;
|
|
56895
56907
|
$[0] !== presence ? (t0 = Array.from(new Set(presence.map(_temp$1y))), $[0] = presence, $[1] = t0) : t0 = $[1];
|
|
56896
56908
|
let t1;
|
|
56897
|
-
$[2] !== presence || $[3] !== t0 ? (t1 = t0.map((id2) => presence.find((a_0) => a_0.user.id === id2)).filter(isNonNullable$
|
|
56909
|
+
$[2] !== presence || $[3] !== t0 ? (t1 = t0.map((id2) => presence.find((a_0) => a_0.user.id === id2)).filter(isNonNullable$2), $[2] = presence, $[3] = t0, $[4] = t1) : t1 = $[4];
|
|
56898
56910
|
const uniquePresence = t1;
|
|
56899
56911
|
let t2;
|
|
56900
56912
|
bb0: {
|
|
@@ -61006,7 +61018,7 @@ function SearchFilterStringListInput(t0) {
|
|
|
61006
61018
|
$[8] !== fieldDefinition.fieldPath || $[9] !== schema2 ? (t52 = (type) => {
|
|
61007
61019
|
const schemaType = schema2.get(type);
|
|
61008
61020
|
return schemaType ? getSchemaField$2(schemaType, fieldDefinition.fieldPath)?.type.options : null;
|
|
61009
|
-
}, $[8] = fieldDefinition.fieldPath, $[9] = schema2, $[10] = t52) : t52 = $[10], t32 = fieldDefinition.documentTypes.filter(t42).map(t52).filter(isNonNullable$
|
|
61021
|
+
}, $[8] = fieldDefinition.fieldPath, $[9] = schema2, $[10] = t52) : t52 = $[10], t32 = fieldDefinition.documentTypes.filter(t42).map(t52).filter(isNonNullable$2).map(_temp$1l).flatMap(_temp3$g).filter(isNonNullable$2).reduce(_temp5$5, []), $[1] = documentTypesNarrowed, $[2] = fieldDefinition.documentTypes, $[3] = fieldDefinition.fieldPath, $[4] = schema2, $[5] = t32;
|
|
61010
61022
|
} else
|
|
61011
61023
|
t32 = $[5];
|
|
61012
61024
|
t2 = t32;
|
|
@@ -78411,7 +78423,7 @@ function resolveSource$1({
|
|
|
78411
78423
|
context,
|
|
78412
78424
|
propertyName: "schema.templates",
|
|
78413
78425
|
reducer: schemaTemplatesReducer,
|
|
78414
|
-
initialValue: schema2.getTypeNames().filter((typeName) => !typeName.startsWith("sanity.")).map((typeName) => schema2.get(typeName)).filter(isNonNullable$
|
|
78426
|
+
initialValue: schema2.getTypeNames().filter((typeName) => !typeName.startsWith("sanity.")).map((typeName) => schema2.get(typeName)).filter(isNonNullable$2).filter((schemaType) => schemaType.type?.name === "document").map((schemaType) => ({
|
|
78415
78427
|
id: schemaType.name,
|
|
78416
78428
|
schemaType: schemaType.name,
|
|
78417
78429
|
title: schemaType.title || schemaType.name,
|
|
@@ -90288,7 +90300,7 @@ export {
|
|
|
90288
90300
|
isGoingToUnpublish,
|
|
90289
90301
|
isGroupChange,
|
|
90290
90302
|
isNewDocument,
|
|
90291
|
-
isNonNullable$
|
|
90303
|
+
isNonNullable$2 as isNonNullable,
|
|
90292
90304
|
isNumberInputProps,
|
|
90293
90305
|
isObjectInputProps$1 as isObjectInputProps,
|
|
90294
90306
|
isObjectItemProps,
|