sanity 6.4.0 → 6.4.1-next.2

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.
@@ -48741,24 +48741,29 @@ const bundleDocumentsCache = /* @__PURE__ */ Object.create(null), buildBundleDoc
48741
48741
  ...options
48742
48742
  }) => (bundleDocumentsCache[cacheKey2] || (bundleDocumentsCache[cacheKey2] = buildBundleDocumentsObservable(options).pipe(finalize$1(() => {
48743
48743
  delete bundleDocumentsCache[cacheKey2];
48744
- }), shareReplay(1))), bundleDocumentsCache[cacheKey2]), BUNDLE_DOCUMENTS_INITIAL_STATE = {
48744
+ }), shareReplay(1))), bundleDocumentsCache[cacheKey2]), BUNDLE_DOCUMENTS_EMPTY = {
48745
+ loading: !1,
48746
+ results: [],
48747
+ error: null
48748
+ }, BUNDLE_DOCUMENTS_LOADING = {
48745
48749
  loading: !0,
48746
48750
  results: [],
48747
48751
  error: null
48748
48752
  };
48749
48753
  function useBundleDocuments(options) {
48750
- const $ = c(10), {
48754
+ const $ = c(11), {
48751
48755
  groqFilter,
48752
48756
  params,
48753
48757
  cacheKey: cacheKey2,
48754
- skipValidation
48755
- } = options, documentPreviewStore = useDocumentPreviewStore(), {
48758
+ skipValidation,
48759
+ enabled: t0
48760
+ } = options, enabled = t0 === void 0 ? !0 : t0, documentPreviewStore = useDocumentPreviewStore(), {
48756
48761
  getClient: getClient2,
48757
48762
  i18n,
48758
48763
  currentUser
48759
48764
  } = useSource(), schema2 = useSchema();
48760
- let t0;
48761
- return $[0] !== cacheKey2 || $[1] !== currentUser || $[2] !== documentPreviewStore || $[3] !== getClient2 || $[4] !== groqFilter || $[5] !== i18n || $[6] !== params || $[7] !== schema2 || $[8] !== skipValidation ? (t0 = getBundleDocumentsObservable({
48765
+ let t1;
48766
+ return $[0] !== cacheKey2 || $[1] !== currentUser || $[2] !== documentPreviewStore || $[3] !== enabled || $[4] !== getClient2 || $[5] !== groqFilter || $[6] !== i18n || $[7] !== params || $[8] !== schema2 || $[9] !== skipValidation ? (t1 = enabled ? getBundleDocumentsObservable({
48762
48767
  schema: schema2,
48763
48768
  documentPreviewStore,
48764
48769
  getClient: getClient2,
@@ -48768,7 +48773,7 @@ function useBundleDocuments(options) {
48768
48773
  params,
48769
48774
  cacheKey: cacheKey2,
48770
48775
  skipValidation
48771
- }), $[0] = cacheKey2, $[1] = currentUser, $[2] = documentPreviewStore, $[3] = getClient2, $[4] = groqFilter, $[5] = i18n, $[6] = params, $[7] = schema2, $[8] = skipValidation, $[9] = t0) : t0 = $[9], useObservable(t0, BUNDLE_DOCUMENTS_INITIAL_STATE);
48776
+ }) : of(BUNDLE_DOCUMENTS_EMPTY), $[0] = cacheKey2, $[1] = currentUser, $[2] = documentPreviewStore, $[3] = enabled, $[4] = getClient2, $[5] = groqFilter, $[6] = i18n, $[7] = params, $[8] = schema2, $[9] = skipValidation, $[10] = t1) : t1 = $[10], useObservable(t1, enabled ? BUNDLE_DOCUMENTS_LOADING : BUNDLE_DOCUMENTS_EMPTY);
48772
48777
  }
48773
48778
  const getReleaseDocumentsObservable = ({
48774
48779
  schema: schema2,
@@ -77501,6 +77506,12 @@ function useAllVariants() {
77501
77506
  }, $[3] = error, $[4] = t0, $[5] = t2, $[6] = variants2, $[7] = t3) : t3 = $[7], t3;
77502
77507
  }
77503
77508
  const VARIANT_ID_PREFIX = `${VARIANT_DOCUMENTS_PATH}.`;
77509
+ function isPublishedBundleId(bundleId) {
77510
+ return bundleId === void 0 || bundleId === "published";
77511
+ }
77512
+ function isReleaseBundle(bundleId) {
77513
+ return !isPublishedBundleId(bundleId) && bundleId !== "drafts";
77514
+ }
77504
77515
  function getVariantId(variantDocumentId) {
77505
77516
  return variantDocumentId.startsWith(VARIANT_ID_PREFIX) ? variantDocumentId.slice(VARIANT_ID_PREFIX.length) : variantDocumentId;
77506
77517
  }
@@ -88136,6 +88147,7 @@ export {
88136
88147
  DEFAULT_STUDIO_CLIENT_OPTIONS,
88137
88148
  DEFAULT_WEEK_DAY_NAMES,
88138
88149
  DOCUMENT_HAS_ERRORS_TEXT,
88150
+ DOCUMENT_SYSTEM_FIELD,
88139
88151
  DateInput,
88140
88152
  DatePicker$2 as DatePicker,
88141
88153
  DateTimeInput$3 as DateTimeInput,
@@ -88485,7 +88497,6 @@ export {
88485
88497
  getReleaseDefaults,
88486
88498
  getReleaseDocumentIdFromReleaseId,
88487
88499
  getReleaseIdFromReleaseDocumentId,
88488
- getReleaseTitleDetails,
88489
88500
  getReleaseTone,
88490
88501
  getSchemaTypeTitle,
88491
88502
  getSearchableTypes,
@@ -88547,9 +88558,11 @@ export {
88547
88558
  isPerspectiveWriteable,
88548
88559
  isProd,
88549
88560
  isPublishDocumentVersionEvent,
88561
+ isPublishedBundleId,
88550
88562
  isPublishedPerspective,
88551
88563
  isPublishedVersion,
88552
88564
  isRecord$4 as isRecord,
88565
+ isReleaseBundle,
88553
88566
  isReleaseDocument,
88554
88567
  isReleaseLimitError,
88555
88568
  isReleasePerspective,