sanity 6.3.0-next.46 → 6.3.0-next.49

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.
@@ -2508,7 +2508,8 @@ declare const studioLocaleStrings: {
2508
2508
  'asset-source.dialog.button.select': string;
2509
2509
  /** Keys shared between both image asset source and file asset source */
2510
2510
  /** Insert asset error */
2511
- 'asset-source.dialog.insert-asset-error': string; /** Select asset dialog load more items */
2511
+ 'asset-source.dialog.insert-asset-error': string; /** Toast title shown when the list of assets failed to load */
2512
+ 'asset-source.dialog.load-error': string; /** Select asset dialog load more items */
2512
2513
  'asset-source.dialog.load-more': string;
2513
2514
  /** Text shown when selecting a file but there's no files to select from
2514
2515
  * @deprecated no longer in use
@@ -6729,6 +6730,8 @@ interface ScrollContextValue {
6729
6730
  declare const DocumentGroupInventoryAction: ComponentType<PropsWithChildren<{
6730
6731
  documentId: string;
6731
6732
  portalElementName: string;
6733
+ isDocumentGroupInventoryActive: boolean;
6734
+ setIsDocumentGroupInventoryActive: (active: boolean) => void;
6732
6735
  }>>;
6733
6736
  /**
6734
6737
  * @internal
@@ -528,7 +528,8 @@ declare const structureLocaleStrings: {
528
528
  'default-definition.content-title': string; /** The text shown if there was an error while getting the document's title via a preview value */
529
529
  'doc-title.error.text': string; /** The text shown if the preview value for a document is non-existent or empty */
530
530
  'doc-title.fallback.text': string; /** The text shown if a document's title via a preview value cannot be determined due to an unknown schema type */
531
- 'doc-title.unknown-schema-type.text': string; /** Tooltip text shown for the close button of the document inspector */
531
+ 'doc-title.unknown-schema-type.text': string; /** Hint shown to help guide users to the new document group inventory */
532
+ 'document-group-inventory.onboarding-hint': string; /** Tooltip text shown for the close button of the document inspector */
532
533
  'document-inspector.close-button.tooltip': string; /** The title shown in the dialog header, when inspecting a valid document */
533
534
  'document-inspector.dialog.title': string; /** The title shown in the dialog header, when the document being inspected is not created yet/has no value */
534
535
  'document-inspector.dialog.title-no-value': string; /** Title shown for menu item that opens the "Inspect" dialog */
@@ -2569,6 +2569,8 @@ interface DocumentPaneContextValue extends Pick<NodeChronologyProps, 'hasUpstrea
2569
2569
  timelineMode?: undefined;
2570
2570
  setTimelineRange(since: string | null, rev: string | null): void;
2571
2571
  setIsDeleting: (state: boolean) => void;
2572
+ isDocumentGroupInventoryActive: boolean;
2573
+ setIsDocumentGroupInventoryActive: (active: boolean) => void;
2572
2574
  timelineError: Error | null;
2573
2575
  /**
2574
2576
  * Soon to be deprecated with the upcoming `releases` changes.
@@ -644,11 +644,19 @@ class DividerBuilder {
644
644
  }
645
645
  }
646
646
  async function resolveTypeForDocument(getClient, id) {
647
- return await getClient(DEFAULT_STUDIO_CLIENT_OPTIONS).fetch("*[sanity::versionOf($publishedId)][0]._type", {
648
- publishedId: getPublishedId(id)
649
- }, {
650
- tag: "structure.resolve-type"
651
- });
647
+ const query = "*[sanity::versionOf($publishedId)][0]._type";
648
+ try {
649
+ return await getClient(DEFAULT_STUDIO_CLIENT_OPTIONS).fetch(query, {
650
+ publishedId: getPublishedId(id)
651
+ }, {
652
+ tag: "structure.resolve-type"
653
+ }) ?? void 0;
654
+ } catch (err) {
655
+ console.error(new Error(`Failed to resolve document type for "${id}"`, {
656
+ cause: err
657
+ }));
658
+ return;
659
+ }
652
660
  }
653
661
  class GenericViewBuilder {
654
662
  /** Generic view option object */