sanity 6.3.0-next.32 → 6.3.0-next.34
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-dts/ActiveWorkspaceMatcherContext.d.ts +7 -0
- package/lib/_chunks-dts/index.d.ts +12 -1
- package/lib/_chunks-es/index2.js +3 -2
- package/lib/_chunks-es/index2.js.map +1 -1
- package/lib/_chunks-es/structureTool.js +207 -174
- package/lib/_chunks-es/structureTool.js.map +1 -1
- package/lib/_chunks-es/version.js +2 -2
- package/package.json +10 -10
|
@@ -15308,6 +15308,13 @@ interface DocumentFormOptions {
|
|
|
15308
15308
|
*/
|
|
15309
15309
|
getFormDocumentValue?: (value: SanityDocumentLike) => SanityDocumentLike;
|
|
15310
15310
|
displayInlineChanges?: boolean;
|
|
15311
|
+
/**
|
|
15312
|
+
* Whether the form is displaying a historical revision (e.g. via "Review
|
|
15313
|
+
* changes"). When `true`, the live document's validation markers are not
|
|
15314
|
+
* applied, since they describe the editable draft/published document rather
|
|
15315
|
+
* than the read-only revision being viewed.
|
|
15316
|
+
*/
|
|
15317
|
+
isOlderRevision?: boolean;
|
|
15311
15318
|
}
|
|
15312
15319
|
interface DocumentFormValue extends Pick<NodeChronologyProps, 'hasUpstreamVersion'> {
|
|
15313
15320
|
/**
|
|
@@ -31,6 +31,17 @@ interface BaseStructureToolPaneProps<T extends PaneNode['type']> {
|
|
|
31
31
|
*/
|
|
32
32
|
key?: string;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* The reference counts known at the point a delete is confirmed, surfaced so
|
|
36
|
+
* callers can record telemetry about how heavily referenced a document was.
|
|
37
|
+
*
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
interface DeleteReferenceCounts {
|
|
41
|
+
totalReferenceCount: number;
|
|
42
|
+
internalReferenceCount: number;
|
|
43
|
+
crossDatasetReferenceCount: number;
|
|
44
|
+
}
|
|
34
45
|
/** @internal */
|
|
35
46
|
interface ConfirmDeleteDialogProps {
|
|
36
47
|
/**
|
|
@@ -49,7 +60,7 @@ interface ConfirmDeleteDialogProps {
|
|
|
49
60
|
*/
|
|
50
61
|
action?: 'delete' | 'unpublish';
|
|
51
62
|
onCancel: () => void;
|
|
52
|
-
onConfirm: (versions: string[]) => void;
|
|
63
|
+
onConfirm: (versions: string[], referenceCounts: DeleteReferenceCounts) => void;
|
|
53
64
|
}
|
|
54
65
|
/** @internal */
|
|
55
66
|
declare function ConfirmDeleteDialogContainer(props: ConfirmDeleteDialogProps): import("react").JSX.Element;
|
package/lib/_chunks-es/index2.js
CHANGED
|
@@ -51804,7 +51804,8 @@ function useDocumentForm(options) {
|
|
|
51804
51804
|
selectedPerspectiveName,
|
|
51805
51805
|
readOnly: readOnlyProp,
|
|
51806
51806
|
onFocusPath,
|
|
51807
|
-
displayInlineChanges
|
|
51807
|
+
displayInlineChanges,
|
|
51808
|
+
isOlderRevision
|
|
51808
51809
|
} = options, changesOpen = t0 === void 0 ? !1 : t0, schema2 = useSchema(), presenceStore = usePresenceStore(), {
|
|
51809
51810
|
data: releases2
|
|
51810
51811
|
} = useActiveReleases();
|
|
@@ -51891,7 +51892,7 @@ function useDocumentForm(options) {
|
|
|
51891
51892
|
}
|
|
51892
51893
|
const value = t7, {
|
|
51893
51894
|
validation: validationRaw
|
|
51894
|
-
} = useValidationStatus(value._id, documentType, !releaseId), validation2 = useUnique(validationRaw);
|
|
51895
|
+
} = useValidationStatus(value._id, documentType, !releaseId), validation2 = useUnique(isOlderRevision ? EMPTY_ARRAY$u : validationRaw);
|
|
51895
51896
|
let t8;
|
|
51896
51897
|
$[25] !== documentId || $[26] !== editState2 || $[27] !== value ? (t8 = {
|
|
51897
51898
|
strict: !0,
|