sanity 5.2.1-next.1 → 5.2.1-next.3

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.
@@ -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.1-next.1+c00ddbc984";
10
+ "5.2.1-next.3+2b0bffac7d";
11
11
  } catch {
12
12
  }
13
13
  const SANITY_VERSION = buildVersion || `${version}-dev`;
package/lib/index.d.ts CHANGED
@@ -7128,6 +7128,7 @@ export declare function getPreviewStateObservable(
7128
7128
  schemaType: SchemaType,
7129
7129
  documentId: string,
7130
7130
  perspective?: PerspectiveStack,
7131
+ viewOptions?: PrepareViewOptions,
7131
7132
  ): Observable<PreviewState>
7132
7133
 
7133
7134
  /**
package/lib/index.js CHANGED
@@ -43856,15 +43856,17 @@ function _temp$2h(document2) {
43856
43856
  document: document2
43857
43857
  };
43858
43858
  }
43859
- function getPreviewStateObservable$1(documentPreviewStore, schemaType, documentId, perspective) {
43859
+ function getPreviewStateObservable$1(documentPreviewStore, schemaType, documentId, perspective, viewOptions) {
43860
43860
  const perspectiveSnapshot = documentPreviewStore.observeForPreview({
43861
43861
  _id: getPublishedId(documentId)
43862
43862
  }, schemaType, {
43863
- perspective
43863
+ perspective,
43864
+ viewOptions
43864
43865
  }), versionOrDraftId = isVersionId(documentId) ? getVersionFromId(documentId) : "drafts", preparedVersionSnapshot = versionOrDraftId ? documentPreviewStore.observeForPreview({
43865
43866
  _id: getPublishedId(documentId)
43866
43867
  }, schemaType, {
43867
- perspective: [versionOrDraftId]
43868
+ perspective: [versionOrDraftId],
43869
+ viewOptions
43868
43870
  }) : of(null);
43869
43871
  return combineLatest([perspectiveSnapshot, preparedVersionSnapshot]).pipe(map(([main, version2]) => ({
43870
43872
  isLoading: !1,