sanity 5.25.0-next.25 → 5.25.0-next.26
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.
|
@@ -15013,7 +15013,7 @@ interface DocumentFormValue extends Pick<NodeChronologyProps, 'hasUpstreamVersio
|
|
|
15013
15013
|
openPath: Path;
|
|
15014
15014
|
ready: boolean;
|
|
15015
15015
|
value: SanityDocumentLike;
|
|
15016
|
-
formState: FormState;
|
|
15016
|
+
formState: FormState | null;
|
|
15017
15017
|
focusPath: Path;
|
|
15018
15018
|
validation: ValidationMarker[];
|
|
15019
15019
|
permissions: PermissionCheckResult | undefined;
|
|
@@ -15026,7 +15026,7 @@ interface DocumentFormValue extends Pick<NodeChronologyProps, 'hasUpstreamVersio
|
|
|
15026
15026
|
onChange: (event: PatchEvent) => void;
|
|
15027
15027
|
onPathOpen: (path: Path) => void;
|
|
15028
15028
|
onProgrammaticFocus: (nextPath: Path) => void;
|
|
15029
|
-
formStateRef: RefObject<FormState>;
|
|
15029
|
+
formStateRef: RefObject<FormState | null>;
|
|
15030
15030
|
schemaType: ObjectSchemaType;
|
|
15031
15031
|
}
|
|
15032
15032
|
/**
|
|
@@ -7905,7 +7905,7 @@ function _temp$k(err) {
|
|
|
7905
7905
|
throw new Error(`An error was thrown while trying to get your preview url: ${message}`);
|
|
7906
7906
|
}
|
|
7907
7907
|
function DocumentPaneProvider(props) {
|
|
7908
|
-
const $ = c(
|
|
7908
|
+
const $ = c(248), {
|
|
7909
7909
|
children,
|
|
7910
7910
|
index,
|
|
7911
7911
|
pane,
|
|
@@ -8305,21 +8305,33 @@ function DocumentPaneProvider(props) {
|
|
|
8305
8305
|
}, $[216] = paramPath, $[217] = ready, $[218] = syncPathFromUrl, $[219] = t50) : t50 = $[219];
|
|
8306
8306
|
let t51;
|
|
8307
8307
|
$[220] !== paramPath || $[221] !== ready ? (t51 = [paramPath, ready], $[220] = paramPath, $[221] = ready, $[222] = t51) : t51 = $[222], useEffect(t50, t51);
|
|
8308
|
-
const
|
|
8308
|
+
const isDivergencesEnabled = !!((useContext(DocumentDivergencesContext)?.enabled ?? advancedVersionControlEnabled) && formState && schemaType);
|
|
8309
|
+
let t52;
|
|
8310
|
+
$[223] !== editState_1 || $[224] !== formState || $[225] !== isDivergencesEnabled || $[226] !== schemaType || $[227] !== upstreamEditState_0 || $[228] !== value_0._id ? (t52 = isDivergencesEnabled && formState && schemaType ? {
|
|
8311
|
+
enabled: !0,
|
|
8312
|
+
upstreamEditState: upstreamEditState_0,
|
|
8313
|
+
editState: editState_1,
|
|
8314
|
+
subjectId: value_0._id,
|
|
8315
|
+
schemaType,
|
|
8316
|
+
formState
|
|
8317
|
+
} : {
|
|
8318
|
+
enabled: !1
|
|
8319
|
+
}, $[223] = editState_1, $[224] = formState, $[225] = isDivergencesEnabled, $[226] = schemaType, $[227] = upstreamEditState_0, $[228] = value_0._id, $[229] = t52) : t52 = $[229];
|
|
8320
|
+
const divergencesProps = t52;
|
|
8309
8321
|
let t53;
|
|
8310
|
-
$[
|
|
8322
|
+
$[230] !== onProgrammaticFocus ? (t53 = /* @__PURE__ */ jsx(DivergenceAutofocus, { onProgrammaticFocus }), $[230] = onProgrammaticFocus, $[231] = t53) : t53 = $[231];
|
|
8311
8323
|
let t54;
|
|
8312
|
-
$[
|
|
8324
|
+
$[232] !== displayed || $[233] !== isDeleted_1 || $[234] !== ready || $[235] !== schemaType ? (t54 = /* @__PURE__ */ jsx(DocumentTitle, { isDeleted: isDeleted_1, displayed, ready, schemaType }), $[232] = displayed, $[233] = isDeleted_1, $[234] = ready, $[235] = schemaType, $[236] = t54) : t54 = $[236];
|
|
8313
8325
|
let t55;
|
|
8314
|
-
$[
|
|
8326
|
+
$[237] !== children || $[238] !== divergencesProps || $[239] !== t53 || $[240] !== t54 ? (t55 = /* @__PURE__ */ jsxs(DivergencesProvider, { ...divergencesProps, children: [
|
|
8315
8327
|
t53,
|
|
8316
8328
|
t54,
|
|
8317
8329
|
children
|
|
8318
|
-
] }), $[
|
|
8330
|
+
] }), $[237] = children, $[238] = divergencesProps, $[239] = t53, $[240] = t54, $[241] = t55) : t55 = $[241];
|
|
8319
8331
|
let t56;
|
|
8320
|
-
$[
|
|
8332
|
+
$[242] !== documentPane || $[243] !== t55 ? (t56 = /* @__PURE__ */ jsx(DocumentPaneContext.Provider, { value: documentPane, children: t55 }), $[242] = documentPane, $[243] = t55, $[244] = t56) : t56 = $[244];
|
|
8321
8333
|
let t57;
|
|
8322
|
-
return $[
|
|
8334
|
+
return $[245] !== documentPaneInfo || $[246] !== t56 ? (t57 = /* @__PURE__ */ jsx(DocumentPaneInfoContext.Provider, { value: documentPaneInfo, children: t56 }), $[245] = documentPaneInfo, $[246] = t56, $[247] = t57) : t57 = $[247], t57;
|
|
8323
8335
|
}
|
|
8324
8336
|
function getDocumentVersionType(params, selectedReleaseId, value, selectedPerspectiveName, draftsEnabled, releases) {
|
|
8325
8337
|
let version;
|