sanity 6.3.0-next.45 → 6.3.0-next.47
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.
- package/lib/_chunks-dts/ActiveWorkspaceMatcherContext.d.ts +2 -1
- package/lib/_chunks-es/StructureToolProvider.js +13 -5
- package/lib/_chunks-es/StructureToolProvider.js.map +1 -1
- package/lib/_chunks-es/index2.js +259 -224
- package/lib/_chunks-es/index2.js.map +1 -1
- package/lib/_chunks-es/structureTool.js +26 -5
- package/lib/_chunks-es/structureTool.js.map +1 -1
- package/lib/_chunks-es/version.js +2 -2
- package/lib/structure.js +65 -103
- package/lib/structure.js.map +1 -1
- package/package.json +10 -10
|
@@ -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; /**
|
|
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
|
|
@@ -644,11 +644,19 @@ class DividerBuilder {
|
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
646
|
async function resolveTypeForDocument(getClient, id) {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
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 */
|