@sanity/vision 6.20.0 → 6.21.0-next.13

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.
@@ -1,5 +1,5 @@
1
1
  import { t as visionLocaleNamespace } from "./i18n-JS8KzGj8.js";
2
- import { A as VARIANTS_API_VERSION, C as getActivePerspective, D as resultJsonExtensions, E as paramsExtensions, O as API_VERSIONS, S as encodeQueryString, T as groqExtensions, _ 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 prefixApiVersion, k as DEFAULT_API_VERSION, 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 VisionCodeMirror, x as isVisionPasteTarget, y as onLocalStorageCleared } from "./SanityVision-ePOzvdmp.js";
2
+ import { A as VARIANTS_API_VERSION, C as getActivePerspective, D as resultJsonExtensions, E as paramsExtensions, O as API_VERSIONS, S as encodeQueryString, T as groqExtensions, _ 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 prefixApiVersion, k as DEFAULT_API_VERSION, 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 VisionCodeMirror, x as isVisionPasteTarget, y as onLocalStorageCleared } from "./SanityVision-ChzZ1_pc.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, usePerspective, useScheduledDraftsEnabled, useSchema, useTranslation, useWorkspace } from "sanity";
5
5
  import { useRouter } from "sanity/router";
@@ -1184,7 +1184,7 @@ function useOnValueChange(value, onChange) {
1184
1184
  function cx(...classNames) {
1185
1185
  return classNames.filter(Boolean).join(" ");
1186
1186
  }
1187
- var codeBlock = "_1anxzyv1c", collapsibleSection = "_1anxzyvj", drawerScroller = "_1anxzyvg", editorContainer = "_1anxzyvr", editorLabel = "_1anxzyvb", jsonEditorBox = "_1anxzyvf", labelActions = "_1anxzyvd", lintFindingButton = "_1anxzyv1e", listItemButton = "_1anxzyv1g", optionsGrid = "_1anxzyvp", optionsSection = "_1anxzyvm", paneFill = "_1anxzyv9", panelTabs = "_1anxzyvh", paramsSection = "_1anxzyvk", previewCode = "_1anxzyv1d", querySection = "_1anxzyvi", resultContainer = "_1anxzyv1b", resultJson = "_1anxzyve", resultLabel = "_1anxzyvc _1anxzyvb", root = "_1anxzyv0", scrollArea = "_1anxzyvs", shrinkable = "_1anxzyv1f", sidebarDrawer = "_1anxzyv11", sidebarItem = "_1anxzyvx", sidebarRail = "_1anxzyvt", sidebarRailCollapsed = "_1anxzyvu", sidebarRailExpanded = "_1anxzyvv", sidebarSlot = "_1anxzyv10", splitHandle = "_1anxzyv5", splitHandleHorizontal = "_1anxzyv7", splitHandleVertical = "_1anxzyv6", splitPane = "_1anxzyv4", splitPaneContainer = "_1anxzyva", splitRoot = "_1anxzyv1", splitRootColumn = "_1anxzyv3", splitRootRow = "_1anxzyv2", tab = "_1anxzyv17", tabBar = "_1anxzyv14", tabCloseButton = "_1anxzyv19", tabItem = "_1anxzyv16", tabList = "_1anxzyv15", tabTitleButton = "_1anxzyv18", tabTitleInput = "_1anxzyv1a";
1187
+ var codeBlock = "_5xvqrz1c", collapsibleSection = "_5xvqrzj", drawerScroller = "_5xvqrzg", editorContainer = "_5xvqrzr", editorLabel = "_5xvqrzb", jsonEditorBox = "_5xvqrzf", labelActions = "_5xvqrzd", lintFindingButton = "_5xvqrz1e", listItemButton = "_5xvqrz1g", optionsGrid = "_5xvqrzp", optionsSection = "_5xvqrzm", paneFill = "_5xvqrz9", panelTabs = "_5xvqrzh", paramsSection = "_5xvqrzk", previewCode = "_5xvqrz1d", querySection = "_5xvqrzi", resultContainer = "_5xvqrz1b", resultJson = "_5xvqrze", resultLabel = "_5xvqrzc _5xvqrzb", root = "_5xvqrz0", scrollArea = "_5xvqrzs", shrinkable = "_5xvqrz1f", sidebarDrawer = "_5xvqrz11", sidebarItem = "_5xvqrzx", sidebarRail = "_5xvqrzt", sidebarRailCollapsed = "_5xvqrzu", sidebarRailExpanded = "_5xvqrzv", sidebarSlot = "_5xvqrz10", splitHandle = "_5xvqrz5", splitHandleHorizontal = "_5xvqrz7", splitHandleVertical = "_5xvqrz6", splitPane = "_5xvqrz4", splitPaneContainer = "_5xvqrza", splitRoot = "_5xvqrz1", splitRootColumn = "_5xvqrz3", splitRootRow = "_5xvqrz2", tab = "_5xvqrz17", tabBar = "_5xvqrz14", tabCloseButton = "_5xvqrz19", tabItem = "_5xvqrz16", tabList = "_5xvqrz15", tabTitleButton = "_5xvqrz18", tabTitleInput = "_5xvqrz1a";
1188
1188
  /** The dataset a tab queries: the workspace's while following it, otherwise the pinned one */
1189
1189
  function getTabDataset(options, workspaceDataset) {
1190
1190
  return options.datasetMode === "workspace" ? workspaceDataset : options.dataset;
@@ -1708,7 +1708,7 @@ function QueryListPanel(t0) {
1708
1708
  children: query_7.title || t("label.untitled-query")
1709
1709
  }),
1710
1710
  preview_0 && /* @__PURE__ */ jsx(Box, {
1711
- className: "_1anxzyv1d",
1711
+ className: "_5xvqrz1d",
1712
1712
  children: /* @__PURE__ */ jsx(Code, {
1713
1713
  size: 0,
1714
1714
  children: preview_0
@@ -2613,7 +2613,7 @@ function SidebarDrawer(t0) {
2613
2613
  $[5] !== close || $[6] !== overlay ? (t3 = (event) => {
2614
2614
  overlay && event.key === "Escape" && (event.preventDefault(), close());
2615
2615
  }, $[5] = close, $[6] = overlay, $[7] = t3) : t3 = $[7];
2616
- let handleKeyDown = t3, t4 = !overlay, t5 = overlay ? title : void 0, t6 = overlay || void 0, t7 = drawer !== "saved" && drawer !== "shared" && "_1anxzyv12", t8 = overlay && "_1anxzyv13", t9;
2616
+ let handleKeyDown = t3, t4 = !overlay, t5 = overlay ? title : void 0, t6 = overlay || void 0, t7 = drawer !== "saved" && drawer !== "shared" && "_5xvqrz12", t8 = overlay && "_5xvqrz13", t9;
2617
2617
  $[8] !== t7 || $[9] !== t8 ? (t9 = cx(sidebarDrawer, t7, t8), $[8] = t7, $[9] = t8, $[10] = t9) : t9 = $[10];
2618
2618
  let t10 = `vista-drawer-${drawer}`, t11 = overlay ? "dialog" : void 0, t12;
2619
2619
  $[11] === title ? t12 = $[12] : (t12 = /* @__PURE__ */ jsx(Text, {
@@ -2670,7 +2670,7 @@ function SidebarItem(t0) {
2670
2670
  let $ = c(28), { icon, label, expanded, selected, badge, testId, onClick } = t0, name = badge ? `${label} (${badge.count})` : label, t1;
2671
2671
  $[0] !== badge || $[1] !== expanded || $[2] !== testId ? (t1 = badge && /* @__PURE__ */ jsx(Badge, {
2672
2672
  "aria-hidden": !0,
2673
- className: cx("_1anxzyvy", expanded && "_1anxzyvz"),
2673
+ className: cx("_5xvqrzy", expanded && "_5xvqrzz"),
2674
2674
  "data-testid": `${testId}-badge`,
2675
2675
  fontSize: 0,
2676
2676
  tone: badge.tone,
@@ -2738,7 +2738,7 @@ function VistaSidebar() {
2738
2738
  }, $[3] = t1) : t1 = $[3], useOnValueChange(drawer, t1);
2739
2739
  let t2;
2740
2740
  $[4] === t ? t2 = $[5] : (t2 = t("vista.sidebar.label"), $[4] = t, $[5] = t2);
2741
- let t3 = expanded ? sidebarRailExpanded : sidebarRailCollapsed, t4 = isMobile && expanded && "_1anxzyvw", t5;
2741
+ let t3 = expanded ? sidebarRailExpanded : sidebarRailCollapsed, t4 = isMobile && expanded && "_5xvqrzw", t5;
2742
2742
  $[6] !== t3 || $[7] !== t4 ? (t5 = cx(sidebarRail, t3, t4), $[6] = t3, $[7] = t4, $[8] = t5) : t5 = $[8];
2743
2743
  let t6 = isMobile && drawer !== null, t7;
2744
2744
  $[9] === t ? t7 = $[10] : (t7 = t("vista.sidebar.shared-queries"), $[9] = t, $[10] = t7);
@@ -5236,7 +5236,7 @@ function CollapsibleSection(props) {
5236
5236
  let t11;
5237
5237
  $[18] !== children || $[19] !== expanded || $[20] !== id ? (t11 = expanded && /* @__PURE__ */ jsx(Box, {
5238
5238
  "aria-labelledby": `${id}-toggle`,
5239
- className: "_1anxzyvn",
5239
+ className: "_5xvqrzn",
5240
5240
  id: `${id}-content`,
5241
5241
  role: "region",
5242
5242
  children
@@ -7416,7 +7416,7 @@ function RequestPanel(props) {
7416
7416
  className: querySection,
7417
7417
  children: [t13, t21]
7418
7418
  }), $[57] = t13, $[58] = t21, $[59] = t22) : t22 = $[59];
7419
- let t23 = paramsResize.height !== null && "_1anxzyvl", t24;
7419
+ let t23 = paramsResize.height !== null && "_5xvqrzl", t24;
7420
7420
  $[60] === t23 ? t24 = $[61] : (t24 = cx(paramsSection, t23), $[60] = t23, $[61] = t24);
7421
7421
  let t25;
7422
7422
  $[62] !== paramsExpanded || $[63] !== paramsHeightNow || $[64] !== paramsResize.dragging || $[65] !== paramsResize.height || $[66] !== paramsResize.measured?.max || $[67] !== paramsResize.onFocus || $[68] !== paramsResize.onKeyDown || $[69] !== paramsResize.onPointerDown || $[70] !== paramsResize.reset || $[71] !== t ? (t25 = paramsExpanded && /* @__PURE__ */ jsx("div", {
@@ -7426,7 +7426,7 @@ function RequestPanel(props) {
7426
7426
  "aria-valuemin": 98,
7427
7427
  "aria-valuenow": paramsHeightNow,
7428
7428
  "aria-valuetext": paramsResize.height === null && paramsHeightNow !== void 0 ? t("vista.params.fit-height", { height: paramsHeightNow }) : void 0,
7429
- className: "_1anxzyvo",
7429
+ className: "_5xvqrzo",
7430
7430
  "data-dragging": paramsResize.dragging,
7431
7431
  "data-testid": "vista-request-params-resizer",
7432
7432
  onDoubleClick: paramsResize.reset,
@@ -7688,7 +7688,7 @@ function ResizableSplit(props) {
7688
7688
  style: t10,
7689
7689
  children: children[0]
7690
7690
  }), $[26] = children[0], $[27] = t10, $[28] = t11) : t11 = $[28];
7691
- let t12 = !allowResize || void 0, t13 = bounds?.max, t14 = split === "vertical" ? splitHandleVertical : splitHandleHorizontal, t15 = !allowResize && "_1anxzyv8", t16;
7691
+ let t12 = !allowResize || void 0, t13 = bounds?.max, t14 = split === "vertical" ? splitHandleVertical : splitHandleHorizontal, t15 = !allowResize && "_5xvqrz8", t16;
7692
7692
  $[29] !== t14 || $[30] !== t15 ? (t16 = cx(splitHandle, t14, t15), $[29] = t14, $[30] = t15, $[31] = t16) : t16 = $[31];
7693
7693
  let t17 = testId && `${testId}-handle`, t18 = allowResize ? 0 : -1, t19;
7694
7694
  $[32] !== dragging || $[33] !== label || $[34] !== minSize || $[35] !== onKeyDown || $[36] !== onPointerDown || $[37] !== shownSize || $[38] !== split || $[39] !== t12 || $[40] !== t13 || $[41] !== t16 || $[42] !== t17 || $[43] !== t18 ? (t19 = /* @__PURE__ */ jsx("div", {
@@ -8438,7 +8438,7 @@ function DeltaResult(props) {
8438
8438
  let t9;
8439
8439
  $[29] !== evaluation.status || $[30] !== evaluation.value ? (t9 = evaluation.status === "done" && typeof evaluation.value != "boolean" && /* @__PURE__ */ jsx(Card, {
8440
8440
  border: !0,
8441
- className: "_1anxzyvg",
8441
+ className: "_5xvqrzg",
8442
8442
  padding: 3,
8443
8443
  radius: 2,
8444
8444
  children: /* @__PURE__ */ jsx(Code, {
@@ -11624,7 +11624,7 @@ function ExportTypesDialog(t0) {
11624
11624
  let t6;
11625
11625
  $[25] !== copyToClipboard || $[26] !== output.code || $[27] !== t ? (t6 = output.code && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Card, {
11626
11626
  border: !0,
11627
- className: "_1anxzyv1c",
11627
+ className: "_5xvqrz1c",
11628
11628
  overflow: "auto",
11629
11629
  padding: 3,
11630
11630
  radius: 2,
@@ -11924,7 +11924,7 @@ function layoutResultGraph(graph, { collapsed, charWidth }) {
11924
11924
  height
11925
11925
  };
11926
11926
  }
11927
- var graphBooleanVar = "var(--ofyam95)", graphCodeFamilyVar = "var(--ofyam90)", graphCodeSizeVar = "var(--ofyam91)", graphConstantVar = "var(--ofyam96)", graphControls = "ofyam9j", graphEdges = "ofyam99", graphNode = "ofyam9a", graphNodeButton = "ofyam9e", graphNodeHeader = "ofyam9b", graphNodeTitle = "ofyam9c", graphNumberVar = "var(--ofyam94)", graphPropertyVar = "var(--ofyam92)", graphRow = "ofyam9f", graphRowKey = "ofyam9g", graphRowValue = "ofyam9h", graphStringVar = "var(--ofyam93)", graphViewport = "ofyam97";
11927
+ var graphBooleanVar = "var(--_1nhmana5)", graphCodeFamilyVar = "var(--_1nhmana0)", graphCodeSizeVar = "var(--_1nhmana1)", graphConstantVar = "var(--_1nhmana6)", graphControls = "_1nhmanaj", graphEdges = "_1nhmana9", graphNode = "_1nhmanaa", graphNodeButton = "_1nhmanae", graphNodeHeader = "_1nhmanab", graphNodeTitle = "_1nhmanac", graphNumberVar = "var(--_1nhmana4)", graphPropertyVar = "var(--_1nhmana2)", graphRow = "_1nhmanaf", graphRowKey = "_1nhmanag", graphRowValue = "_1nhmanah", graphStringVar = "var(--_1nhmana3)", graphViewport = "_1nhmana7";
11928
11928
  const FIRST_VIEW_SCALE = .8, ZOOM_STEP = 1.25;
11929
11929
  /** What the graph leaves out of this result, or `undefined` when it shows all of it */
11930
11930
  function describeLeftOut(graph, t) {
@@ -11980,7 +11980,7 @@ function RowContent(t0) {
11980
11980
  case "value": {
11981
11981
  let t1;
11982
11982
  $[0] === row.key ? t1 = $[1] : (t1 = row.key && /* @__PURE__ */ jsx("span", {
11983
- className: "ofyam9g",
11983
+ className: "_1nhmanag",
11984
11984
  children: row.key
11985
11985
  }), $[0] = row.key, $[1] = t1);
11986
11986
  let t2;
@@ -12005,7 +12005,7 @@ function RowContent(t0) {
12005
12005
  children: row.summary
12006
12006
  }), $[10] = row.summary, $[11] = t2);
12007
12007
  let t3;
12008
- $[12] === row.child ? t3 = $[13] : (t3 = row.child !== void 0 && /* @__PURE__ */ jsx("span", { className: "ofyam9i" }), $[12] = row.child, $[13] = t3);
12008
+ $[12] === row.child ? t3 = $[13] : (t3 = row.child !== void 0 && /* @__PURE__ */ jsx("span", { className: "_1nhmanai" }), $[12] = row.child, $[13] = t3);
12009
12009
  let t4;
12010
12010
  return $[14] !== t1 || $[15] !== t2 || $[16] !== t3 ? (t4 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
12011
12011
  t1,
@@ -12060,14 +12060,14 @@ function GraphNodes(t0) {
12060
12060
  /* @__PURE__ */ jsxs("span", {
12061
12061
  className: graphNodeTitle,
12062
12062
  children: [title, node.summary && /* @__PURE__ */ jsx("span", {
12063
- className: "ofyam9d",
12063
+ className: "_1nhmanad",
12064
12064
  children: node.summary
12065
12065
  })]
12066
12066
  }),
12067
12067
  childCount > 0 && /* @__PURE__ */ jsxs("button", {
12068
12068
  "aria-expanded": !collapsed,
12069
12069
  "aria-label": collapsed ? t("vista.result.graph.expand", { count: childCount }) : t("vista.result.graph.collapse"),
12070
- className: "ofyam9e",
12070
+ className: "_1nhmanae",
12071
12071
  "data-testid": "vista-graph-toggle",
12072
12072
  onClick: () => onToggle(node.id),
12073
12073
  type: "button",
@@ -12251,7 +12251,7 @@ function ResultGraph(t0) {
12251
12251
  }), $[72] = color.syntax.boolean, $[73] = color.syntax.constant, $[74] = color.syntax.number, $[75] = color.syntax.property, $[76] = color.syntax.string, $[77] = font.code.family, $[78] = t27, $[79] = t28) : t28 = $[79];
12252
12252
  let t29;
12253
12253
  $[80] !== copy || $[81] !== layout || $[82] !== onCopy || $[83] !== view ? (t29 = view && /* @__PURE__ */ jsx("div", {
12254
- className: "ofyam98",
12254
+ className: "_1nhmana8",
12255
12255
  "data-testid": "vista-graph-canvas",
12256
12256
  style: {
12257
12257
  width: layout.width,
@@ -12267,7 +12267,7 @@ function ResultGraph(t0) {
12267
12267
  }), $[80] = copy, $[81] = layout, $[82] = onCopy, $[83] = view, $[84] = t29) : t29 = $[84];
12268
12268
  let t30;
12269
12269
  $[85] === leftOut ? t30 = $[86] : (t30 = leftOut && /* @__PURE__ */ jsx("div", {
12270
- className: "ofyam9k",
12270
+ className: "_1nhmanak",
12271
12271
  "data-testid": "vista-graph-left-out",
12272
12272
  children: /* @__PURE__ */ jsx(Text, {
12273
12273
  muted: !0,
@@ -12632,7 +12632,7 @@ function ResponsePanel(props) {
12632
12632
  let t53;
12633
12633
  $[156] !== copyResult || $[157] !== hasResult || $[158] !== resultView || $[159] !== setResultView || $[160] !== t ? (t53 = hasResult && /* @__PURE__ */ jsxs(Flex, {
12634
12634
  alignItems: "center",
12635
- className: "_1anxzyvd",
12635
+ className: "_5xvqrzd",
12636
12636
  gap: 1,
12637
12637
  children: [/* @__PURE__ */ jsxs(TabList, {
12638
12638
  "aria-label": t("vista.result.view.label"),
@@ -13418,7 +13418,7 @@ function QueryTab(t0) {
13418
13418
  children: [t54, t58]
13419
13419
  })
13420
13420
  }), $[174] = t54, $[175] = t58, $[176] = t59) : t59 = $[176];
13421
- let t60 = mobilePane !== "request" && "_1anxzyvq", t61;
13421
+ let t60 = mobilePane !== "request" && "_5xvqrzq", t61;
13422
13422
  $[177] === t60 ? t61 = $[178] : (t61 = cx(paneFill, t60), $[177] = t60, $[178] = t61);
13423
13423
  let t62;
13424
13424
  $[179] !== requestPanel || $[180] !== t61 ? (t62 = /* @__PURE__ */ jsx(Box, {
@@ -13430,7 +13430,7 @@ function QueryTab(t0) {
13430
13430
  role: "tabpanel",
13431
13431
  children: requestPanel
13432
13432
  }), $[179] = requestPanel, $[180] = t61, $[181] = t62) : t62 = $[181];
13433
- let t63 = mobilePane !== "response" && "_1anxzyvq", t64;
13433
+ let t63 = mobilePane !== "response" && "_5xvqrzq", t64;
13434
13434
  $[182] === t63 ? t64 = $[183] : (t64 = cx(paneFill, t63), $[182] = t63, $[183] = t64);
13435
13435
  let t65;
13436
13436
  $[184] !== responsePanel || $[185] !== t64 ? (t65 = /* @__PURE__ */ jsx(Box, {
@@ -13986,4 +13986,4 @@ function VistaGui(props) {
13986
13986
  }
13987
13987
  export { VistaGui };
13988
13988
 
13989
- //# sourceMappingURL=VistaGui-DmXZyJ6k.js.map
13989
+ //# sourceMappingURL=VistaGui-Dhrex2gL.js.map