@sanity/vision 6.21.0 → 6.21.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.
- package/lib/{SanityVision-tHhBPbsg.js → SanityVision-Cr8Er2s4.js} +8 -6
- package/lib/SanityVision-Cr8Er2s4.js.map +1 -0
- package/lib/{VistaGui-D3NHSIsK.js → VistaGui-0nZ5Zsoe.js} +8 -8
- package/lib/VistaGui-0nZ5Zsoe.js.map +1 -0
- package/lib/{i18n-BGSN3nAJ.js → i18n-DFRqoJ_F.js} +2 -2
- package/lib/{i18n-BGSN3nAJ.js.map → i18n-DFRqoJ_F.js.map} +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.js +2 -2
- package/lib/{resources-DpvWKOpU.js → resources-VRZHPMVB.js} +5 -5
- package/lib/resources-VRZHPMVB.js.map +1 -0
- package/package.json +4 -4
- package/lib/SanityVision-tHhBPbsg.js.map +0 -1
- package/lib/VistaGui-D3NHSIsK.js.map +0 -1
- package/lib/resources-DpvWKOpU.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as visionLocaleNamespace } from "./i18n-
|
|
2
|
-
import { A as DEFAULT_API_VERSION, C as getActivePerspective, D as paramsExtensions, E as groqExtensions, M as prefixApiVersion, O as resultJsonExtensions, S as encodeQueryString, T as VisionCodeMirror, _ as VISION_STORAGE_KEY_PREFIX, a as getAtKeypath, b as isPlainObject, c as DelayedSpinner, d as getJsonBlobUrl, f as useSavedQueries, g as validateApiVersion, h as parseQueryUrl, i as describeKeypath, j as VARIANTS_API_VERSION, k as API_VERSIONS, l as canEncodeCsv, m as isApiCdnHost, n as createRetryableLazy, o as QueryErrorDialog, p as parseParams, r as ResultView, s as isApiVersionBelow, u as getCsvBlobUrl, v as getStorage, w as useVariantsEnabled, x as isVisionPasteTarget, y as onLocalStorageCleared } from "./SanityVision-
|
|
1
|
+
import { t as visionLocaleNamespace } from "./i18n-DFRqoJ_F.js";
|
|
2
|
+
import { A as DEFAULT_API_VERSION, C as getActivePerspective, D as paramsExtensions, E as groqExtensions, M as prefixApiVersion, O as resultJsonExtensions, S as encodeQueryString, T as VisionCodeMirror, _ as VISION_STORAGE_KEY_PREFIX, a as getAtKeypath, b as isPlainObject, c as DelayedSpinner, d as getJsonBlobUrl, f as useSavedQueries, g as validateApiVersion, h as parseQueryUrl, i as describeKeypath, j as VARIANTS_API_VERSION, k as API_VERSIONS, l as canEncodeCsv, m as isApiCdnHost, n as createRetryableLazy, o as QueryErrorDialog, p as parseParams, r as ResultView, s as isApiVersionBelow, u as getCsvBlobUrl, v as getStorage, w as useVariantsEnabled, x as isVisionPasteTarget, y as onLocalStorageCleared } from "./SanityVision-Cr8Er2s4.js";
|
|
3
3
|
import { Component, Suspense, createContext, memo, use, useContext, useEffect, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
4
4
|
import { ContextMenuButton, UserAvatar, getDefaultVariant, getReleaseIdFromReleaseDocumentId, getVariantTitle, isCardinalityOneRelease, sortReleases, useActiveReleases, useClient, useDateTimeFormat, useNumberFormat, usePerspective, useProjectStore, useScheduledDraftsEnabled, useSchema, useTranslation, useWorkspace } from "sanity";
|
|
5
5
|
import { useRouter } from "sanity/router";
|
|
@@ -1265,7 +1265,7 @@ function _temp$23(release) {
|
|
|
1265
1265
|
/**
|
|
1266
1266
|
* Resolves a tab's options against the studio state: a followed workspace dataset, the `global`
|
|
1267
1267
|
* and `scheduledDrafts` perspectives becoming real perspective stacks, and the navbar variant,
|
|
1268
|
-
* which locks the API version to the
|
|
1268
|
+
* which locks the API version to the one variants need (where the workspace has variants at all).
|
|
1269
1269
|
*/
|
|
1270
1270
|
function resolveRequestOptions(options, environment) {
|
|
1271
1271
|
let { workspaceDataset, perspectiveStack, selectedVariantNames, isVariantsEnabled, scheduledDraftsStack } = environment, dataset = getTabDataset(options, workspaceDataset), variant = isVariantsEnabled && options.variant === "global" ? getDefaultVariant(selectedVariantNames) : void 0, isValidApiVersion = validateApiVersion(options.apiVersion), userApiVersion = isValidApiVersion ? prefixApiVersion(options.apiVersion) : DEFAULT_API_VERSION, apiVersion = variant ? VARIANTS_API_VERSION : userApiVersion, tabPerspective = getEffectivePerspective(options.perspective, environment.isScheduledDraftsEnabled), perspective = withoutPublishedStack(getActivePerspective({
|
|
@@ -1452,7 +1452,7 @@ function savedQueryToTabInit(saved, parsed) {
|
|
|
1452
1452
|
* source map as it did, through the API CDN or not as it was. A saved URL is the request the tab
|
|
1453
1453
|
* sent, so the tab is compared through the request it would send now, not through its options: a
|
|
1454
1454
|
* tab on the `global` perspective saved `perspective=drafts` while the navbar was on drafts, and
|
|
1455
|
-
* a tab with a navbar variant selected saved
|
|
1455
|
+
* a tab with a navbar variant selected saved the variants API version and `variant=…` whatever its own API version.
|
|
1456
1456
|
*/
|
|
1457
1457
|
function tabMatchesParsedQuery(tab, parsed, effective) {
|
|
1458
1458
|
return tab.query === parsed.query && haveSameParams(tab.rawParams, parsed.rawParams) && parsed.dataset === effective.dataset && (parsed.apiVersion === void 0 || parsed.apiVersion === effective.apiVersion) && parsed.urlPerspective === toUrlPerspective(effective.perspective) && parsed.variant === effective.variant && parsed.includeSourceMap === tab.options.includeSourceMap && parsed.useCdn === effective.useCdn;
|
|
@@ -2024,7 +2024,7 @@ function ApiVersionField(t0) {
|
|
|
2024
2024
|
children: t4
|
|
2025
2025
|
}), $[8] = id, $[9] = t4, $[10] = t5) : t5 = $[10];
|
|
2026
2026
|
let t6;
|
|
2027
|
-
$[11] === t ? t6 = $[12] : (t6 = t("settings.api-version-locked-for-variant"), $[11] = t, $[12] = t6);
|
|
2027
|
+
$[11] === t ? t6 = $[12] : (t6 = t("settings.api-version-locked-for-variant", { apiVersion: VARIANTS_API_VERSION }), $[11] = t, $[12] = t6);
|
|
2028
2028
|
let t7;
|
|
2029
2029
|
$[13] === t6 ? t7 = $[14] : (t7 = /* @__PURE__ */ jsx(Text, {
|
|
2030
2030
|
size: 1,
|
|
@@ -2035,9 +2035,9 @@ function ApiVersionField(t0) {
|
|
|
2035
2035
|
let t11 = `${id}-wrap`, t12 = locked ? "group" : void 0, t13 = locked ? 0 : void 0, t14;
|
|
2036
2036
|
$[18] !== locked || $[19] !== lockedHintId || $[20] !== t ? (t14 = locked && /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
2037
2037
|
id: lockedHintId,
|
|
2038
|
-
children: t("settings.api-version-locked-for-variant")
|
|
2038
|
+
children: t("settings.api-version-locked-for-variant", { apiVersion: VARIANTS_API_VERSION })
|
|
2039
2039
|
}), $[18] = locked, $[19] = lockedHintId, $[20] = t, $[21] = t14) : t14 = $[21];
|
|
2040
|
-
let t15 = `${id}-select`, t16 = locked ?
|
|
2040
|
+
let t15 = `${id}-select`, t16 = locked ? VARIANTS_API_VERSION : isCustom ? "other" : value, t17;
|
|
2041
2041
|
$[22] === Symbol.for("react.memo_cache_sentinel") ? (t17 = API_VERSIONS.map(_temp2$11), $[22] = t17) : t17 = $[22];
|
|
2042
2042
|
let t18;
|
|
2043
2043
|
$[23] === t ? t18 = $[24] : (t18 = t("settings.other-api-version-label"), $[23] = t, $[24] = t18);
|
|
@@ -14445,4 +14445,4 @@ function VistaGui(props) {
|
|
|
14445
14445
|
}
|
|
14446
14446
|
export { VistaGui };
|
|
14447
14447
|
|
|
14448
|
-
//# sourceMappingURL=VistaGui-
|
|
14448
|
+
//# sourceMappingURL=VistaGui-0nZ5Zsoe.js.map
|