sanity 5.1.0-next.12 → 5.1.0-next.14
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/pane.js +3 -3
- package/lib/_chunks-es/pane.js.map +1 -1
- package/lib/_chunks-es/version.js +1 -1
- package/lib/_singletons.d.ts +3 -3
- package/lib/desk.d.ts +3 -3
- package/lib/index.d.ts +4 -3
- package/lib/index.js +33 -34
- package/lib/index.js.map +1 -1
- package/lib/presentation.d.ts +2 -2
- package/lib/structure.d.ts +2 -2
- package/package.json +14 -14
package/lib/_chunks-es/pane.js
CHANGED
|
@@ -2604,7 +2604,7 @@ function DeletedDocumentBanners() {
|
|
|
2604
2604
|
} = usePerspective();
|
|
2605
2605
|
if (!ready)
|
|
2606
2606
|
return null;
|
|
2607
|
-
if (!isPublishedPerspective(selectedPerspective) && !isDraftPerspective(selectedPerspective) && selectedPerspective.state === "archived") {
|
|
2607
|
+
if (!isPublishedPerspective(selectedPerspective) && !isDraftPerspective(selectedPerspective) && isReleaseDocument(selectedPerspective) && selectedPerspective.state === "archived") {
|
|
2608
2608
|
const t0 = selectedPerspective;
|
|
2609
2609
|
let t1;
|
|
2610
2610
|
return $[0] !== t0 ? (t1 = /* @__PURE__ */ jsx(ArchivedReleaseBanner, { release: t0 }), $[0] = t0, $[1] = t1) : t1 = $[1], t1;
|
|
@@ -5483,7 +5483,7 @@ const usePublishAction = (props) => {
|
|
|
5483
5483
|
documentId,
|
|
5484
5484
|
documentType,
|
|
5485
5485
|
value
|
|
5486
|
-
} = useDocumentPane(), validationStatus = useValidationStatus(value._id, type), syncState = useSyncState(id, type), editState = useEditState(documentId, documentType), {
|
|
5486
|
+
} = useDocumentPane(), validationStatus = useValidationStatus(value._id, type, !release), syncState = useSyncState(id, type), editState = useEditState(documentId, documentType), {
|
|
5487
5487
|
t
|
|
5488
5488
|
} = useTranslation(structureLocaleNamespace);
|
|
5489
5489
|
let t0;
|
|
@@ -12437,7 +12437,7 @@ function useMenuItem(props) {
|
|
|
12437
12437
|
value
|
|
12438
12438
|
} = useDocumentPane(), {
|
|
12439
12439
|
validation: validationMarkers
|
|
12440
|
-
} = useValidationStatus(value._id, documentType, selectedReleaseId);
|
|
12440
|
+
} = useValidationStatus(value._id, documentType, !selectedReleaseId);
|
|
12441
12441
|
let t0;
|
|
12442
12442
|
$[0] !== validationMarkers ? (t0 = validationMarkers.map(_temp), $[0] = validationMarkers, $[1] = t0) : t0 = $[1];
|
|
12443
12443
|
const validation = t0, hasErrors = validation.some(isValidationError), hasWarnings = validation.some(isValidationWarning);
|