sanity 3.68.4-corel.526 → 3.68.4-corel.527

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.
@@ -5760,7 +5760,7 @@ const DocumentPaneProvider = React.memo((props) => {
5760
5760
  pane: pane2,
5761
5761
  paneKey,
5762
5762
  onFocusPath,
5763
- matchGlobalVersion = !0
5763
+ forcedVersion
5764
5764
  } = props, schema = sanity.useSchema(), templates = sanity.useTemplates(), {
5765
5765
  setDocumentMeta
5766
5766
  } = sanity.useCopyPaste(), {
@@ -5785,24 +5785,11 @@ const DocumentPaneProvider = React.memo((props) => {
5785
5785
  isReleaseLocked,
5786
5786
  selectedReleaseId,
5787
5787
  selectedPerspectiveName
5788
- } = React.useMemo(() => {
5789
- if (!matchGlobalVersion)
5790
- return {
5791
- selectedPerspectiveName: void 0,
5792
- isReleaseLocked: !1,
5793
- selectedReleaseId: void 0
5794
- };
5795
- const historyVersion = params.historyVersion;
5796
- return historyVersion ? {
5797
- selectedPerspectiveName: historyVersion,
5798
- selectedReleaseId: historyVersion,
5799
- isReleaseLocked: !0
5800
- } : {
5801
- selectedPerspectiveName: perspective.selectedPerspectiveName,
5802
- selectedReleaseId: perspective.selectedReleaseId,
5803
- isReleaseLocked: sanity.isReleaseDocument(perspective.selectedPerspective) ? sanity.isReleaseScheduledOrScheduling(perspective.selectedPerspective) : !1
5804
- };
5805
- }, [matchGlobalVersion, params.historyVersion, perspective.selectedPerspectiveName, perspective.selectedReleaseId, perspective.selectedPerspective]), panePayload = sanity.useUnique(paneRouter.payload), {
5788
+ } = React.useMemo(() => forcedVersion || {
5789
+ selectedPerspectiveName: perspective.selectedPerspectiveName,
5790
+ selectedReleaseId: perspective.selectedReleaseId,
5791
+ isReleaseLocked: sanity.isReleaseDocument(perspective.selectedPerspective) ? sanity.isReleaseScheduledOrScheduling(perspective.selectedPerspective) : !1
5792
+ }, [forcedVersion, perspective.selectedPerspectiveName, perspective.selectedReleaseId, perspective.selectedPerspective]), panePayload = sanity.useUnique(paneRouter.payload), {
5806
5793
  templateName,
5807
5794
  templateParams
5808
5795
  } = React.useMemo(() => getInitialValueTemplateOpts(templates, {
@@ -6162,7 +6149,7 @@ const DocumentPaneProvider = React.memo((props) => {
6162
6149
  });
6163
6150
  DocumentPaneProvider.displayName = "Memo(DocumentPaneProvider)";
6164
6151
  const DocumentEventsPane = (props) => {
6165
- const $ = reactCompilerRuntime.c(32), {
6152
+ const $ = reactCompilerRuntime.c(35), {
6166
6153
  params: t0
6167
6154
  } = usePaneRouter(), params = t0 === void 0 ? EMPTY_PARAMS$1 : t0, options = usePaneOptions(props.pane.options, params), {
6168
6155
  selectedPerspectiveName
@@ -6170,9 +6157,8 @@ const DocumentEventsPane = (props) => {
6170
6157
  archivedReleases
6171
6158
  } = sanity.useReleases(), {
6172
6159
  rev,
6173
- since,
6174
- historyVersion
6175
- } = params;
6160
+ since
6161
+ } = params, historyVersion = params.historyVersion;
6176
6162
  let t1;
6177
6163
  bb0: {
6178
6164
  if (historyVersion && archivedReleases.some((release) => sanity.getReleaseIdFromReleaseDocumentId(release._id) === historyVersion)) {
@@ -6226,9 +6212,23 @@ const DocumentEventsPane = (props) => {
6226
6212
  t13 = eventsStore;
6227
6213
  const value = t13;
6228
6214
  let t14;
6229
- $[26] !== historyStoreProps || $[27] !== props ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(DocumentPaneProvider, { ...props, historyStore: historyStoreProps }), $[26] = historyStoreProps, $[27] = props, $[28] = t14) : t14 = $[28];
6215
+ bb1: {
6216
+ if (historyVersion) {
6217
+ let t152;
6218
+ $[26] !== historyVersion ? (t152 = {
6219
+ selectedPerspectiveName: historyVersion,
6220
+ selectedReleaseId: historyVersion,
6221
+ isReleaseLocked: !0
6222
+ }, $[26] = historyVersion, $[27] = t152) : t152 = $[27], t14 = t152;
6223
+ break bb1;
6224
+ }
6225
+ t14 = void 0;
6226
+ }
6227
+ const forcedProviderVersion = t14;
6230
6228
  let t15;
6231
- return $[29] !== t14 || $[30] !== value ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(sanity.EventsProvider, { value, children: t14 }), $[29] = t14, $[30] = value, $[31] = t15) : t15 = $[31], t15;
6229
+ $[28] !== forcedProviderVersion || $[29] !== historyStoreProps || $[30] !== props ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(DocumentPaneProvider, { ...props, historyStore: historyStoreProps, forcedVersion: forcedProviderVersion }), $[28] = forcedProviderVersion, $[29] = historyStoreProps, $[30] = props, $[31] = t15) : t15 = $[31];
6230
+ let t16;
6231
+ return $[32] !== t15 || $[33] !== value ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(sanity.EventsProvider, { value, children: t15 }), $[32] = t15, $[33] = value, $[34] = t16) : t16 = $[34], t16;
6232
6232
  };
6233
6233
  function _temp$6(e) {
6234
6234
  return !sanity.isDeleteDocumentGroupEvent(e) && !sanity.isDeleteDocumentVersionEvent(e);