@sanity/vision 6.11.0-next.68 → 6.11.0-next.70

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.
@@ -3,13 +3,14 @@ import { Component, Fragment, Suspense, use, useEffect, useImperativeHandle, use
3
3
  import { ContextMenuButton, Translate, UserAvatar, VARIANTS_STUDIO_CLIENT_OPTIONS, getReleaseIdFromReleaseDocumentId, getVariantTitle, isCardinalityOneRelease, sortReleases, useActiveReleases, useClient, useCurrentUser, useDataset, useDateTimeFormat, useKeyValueStore, usePerspective, useScheduledDraftsEnabled, useTranslation, useWorkspace } from "sanity";
4
4
  import { IntentLink } from "sanity/router";
5
5
  import { c } from "react/compiler-runtime";
6
- import { Badge, Box, Button, Card, Container, Dialog, Flex, Grid, Heading, Hotkeys, Inline, Label, Select, Spinner, Stack, Tab, TabList, Text, TextInput, rem, useClickOutsideEvent, useTheme, useTheme_v2 } from "@sanity/ui";
6
+ import { Badge, Button, Card, Container, Dialog, Flex, Grid, Heading, Hotkeys, Inline, Label, Select, Spinner, Stack, Tab, TabList, Text, TextInput, rem, useClickOutsideEvent, useTheme, useTheme_v2 } from "@sanity/ui";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { SplitPane } from "@rexxars/react-split-pane";
9
9
  import { ChevronLeftIcon } from "@sanity/icons/ChevronLeft";
10
10
  import { ChevronRightIcon } from "@sanity/icons/ChevronRight";
11
11
  import { useToast } from "@sanity/ui/toast";
12
12
  import { isHotkey } from "is-hotkey-esm";
13
+ import { Box } from "ui5";
13
14
  import { useEffectEvent } from "use-effect-event";
14
15
  import { closeBrackets } from "@codemirror/autocomplete";
15
16
  import { defaultKeymap, history, historyKeymap } from "@codemirror/commands";
@@ -816,7 +817,8 @@ function QueryList(props) {
816
817
  let $ = c(2), t0;
817
818
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Box, {
818
819
  ...props,
819
- flex: 1,
820
+ flexBasis: "0%",
821
+ flexGrow: 1,
820
822
  overflow: "auto",
821
823
  className: queryList
822
824
  }), $[0] = props, $[1] = t0), t0;
@@ -1493,7 +1495,8 @@ function VisionGuiControls(t0) {
1493
1495
  $[5] !== queryInProgress || $[6] !== t ? (t7 = t(queryInProgress ? "action.query-cancel" : "action.query-execute"), $[5] = queryInProgress, $[6] = t, $[7] = t7) : t7 = $[7];
1494
1496
  let t8;
1495
1497
  $[8] !== onQueryExecution || $[9] !== t4 || $[10] !== t5 || $[11] !== t6 || $[12] !== t7 ? (t8 = /* @__PURE__ */ jsx(Box, {
1496
- flex: 1,
1498
+ flexBasis: "0%",
1499
+ flexGrow: 1,
1497
1500
  children: /* @__PURE__ */ jsx(Tooltip, {
1498
1501
  content: t3,
1499
1502
  placement: "top",
@@ -1513,7 +1516,8 @@ function VisionGuiControls(t0) {
1513
1516
  $[14] !== listenInProgress || $[15] !== t ? (t10 = t(listenInProgress ? "action.listen-cancel" : "action.listen-execute"), $[14] = listenInProgress, $[15] = t, $[16] = t10) : t10 = $[16];
1514
1517
  let t11 = !hasValidParams, t12 = listenInProgress ? "positive" : "default", t13;
1515
1518
  $[17] !== onListenExecution || $[18] !== t10 || $[19] !== t11 || $[20] !== t12 || $[21] !== t9 ? (t13 = /* @__PURE__ */ jsx(Box, {
1516
- flex: 1,
1519
+ flexBasis: "0%",
1520
+ flexGrow: 1,
1517
1521
  marginLeft: 3,
1518
1522
  children: /* @__PURE__ */ jsx(Button, {
1519
1523
  width: "fill",
@@ -1699,7 +1703,7 @@ function VisionGuiHeader(t0) {
1699
1703
  12
1700
1704
  ], $[4] = t3) : t3 = $[4];
1701
1705
  let t4;
1702
- $[5] === Symbol.for("react.memo_cache_sentinel") ? (t4 = [1, 2], $[5] = t4) : t4 = $[5];
1706
+ $[5] === Symbol.for("react.memo_cache_sentinel") ? (t4 = ["span 1 / span 1", "span 2 / span 2"], $[5] = t4) : t4 = $[5];
1703
1707
  let t5;
1704
1708
  $[6] === t ? t5 = $[7] : (t5 = t("settings.dataset-label"), $[6] = t, $[7] = t5);
1705
1709
  let t6;
@@ -1723,7 +1727,7 @@ function VisionGuiHeader(t0) {
1723
1727
  children: /* @__PURE__ */ jsxs(Stack, { children: [t6, t8] })
1724
1728
  }), $[16] = t6, $[17] = t8, $[18] = t9) : t9 = $[18];
1725
1729
  let t10;
1726
- $[19] === Symbol.for("react.memo_cache_sentinel") ? (t10 = [1, 2], $[19] = t10) : t10 = $[19];
1730
+ $[19] === Symbol.for("react.memo_cache_sentinel") ? (t10 = ["span 1 / span 1", "span 2 / span 2"], $[19] = t10) : t10 = $[19];
1727
1731
  let t11;
1728
1732
  $[20] === t ? t11 = $[21] : (t11 = t("settings.api-version-label"), $[20] = t, $[21] = t11);
1729
1733
  let t12;
@@ -1776,7 +1780,7 @@ function VisionGuiHeader(t0) {
1776
1780
  let t23;
1777
1781
  $[45] !== customApiVersion || $[46] !== customApiVersionElementRef || $[47] !== isApiVersionLocked || $[48] !== isValidApiVersion || $[49] !== onCustomApiVersionChange || $[50] !== t ? (t23 = !isApiVersionLocked && customApiVersion !== !1 && /* @__PURE__ */ jsx(Box, {
1778
1782
  padding: 1,
1779
- gridColumn: [1, 2],
1783
+ gridColumn: ["span 1 / span 1", "span 2 / span 2"],
1780
1784
  children: /* @__PURE__ */ jsxs(Stack, { children: [/* @__PURE__ */ jsx(Card, {
1781
1785
  paddingTop: 2,
1782
1786
  paddingBottom: 3,
@@ -1793,7 +1797,7 @@ function VisionGuiHeader(t0) {
1793
1797
  })] })
1794
1798
  }), $[45] = customApiVersion, $[46] = customApiVersionElementRef, $[47] = isApiVersionLocked, $[48] = isValidApiVersion, $[49] = onCustomApiVersionChange, $[50] = t, $[51] = t23) : t23 = $[51];
1795
1799
  let t24;
1796
- $[52] === Symbol.for("react.memo_cache_sentinel") ? (t24 = [1, 2], $[52] = t24) : t24 = $[52];
1800
+ $[52] === Symbol.for("react.memo_cache_sentinel") ? (t24 = ["span 1 / span 1", "span 2 / span 2"], $[52] = t24) : t24 = $[52];
1797
1801
  let t25;
1798
1802
  $[53] === t ? t25 = $[54] : (t25 = t("settings.perspective-label"), $[53] = t, $[54] = t25);
1799
1803
  let t26;
@@ -1839,8 +1843,9 @@ function VisionGuiHeader(t0) {
1839
1843
  let t33;
1840
1844
  $[71] !== customApiVersion || $[72] !== t || $[73] !== url ? (t33 = typeof url == "string" ? /* @__PURE__ */ jsx(Box, {
1841
1845
  padding: 1,
1842
- flex: 1,
1843
- gridColumn: [1, customApiVersion === !1 ? 6 : 4],
1846
+ flexBasis: "0%",
1847
+ flexGrow: 1,
1848
+ gridColumn: ["span 1 / span 1", customApiVersion === !1 ? "span 6 / span 6" : "span 4 / span 4"],
1844
1849
  children: /* @__PURE__ */ jsxs(Stack, { children: [/* @__PURE__ */ jsx(Card, {
1845
1850
  paddingTop: 2,
1846
1851
  paddingBottom: 3,
@@ -1863,7 +1868,8 @@ function VisionGuiHeader(t0) {
1863
1868
  flex: 1,
1864
1869
  gap: 1,
1865
1870
  children: [/* @__PURE__ */ jsx(Box, {
1866
- flex: 1,
1871
+ flexBasis: "0%",
1872
+ flexGrow: 1,
1867
1873
  children: /* @__PURE__ */ jsx(TextInput, {
1868
1874
  "data-testid": "vision-query-url",
1869
1875
  readOnly: !0,
@@ -1882,7 +1888,10 @@ function VisionGuiHeader(t0) {
1882
1888
  })
1883
1889
  })]
1884
1890
  })] })
1885
- }) : /* @__PURE__ */ jsx(Box, { flex: 1 }), $[71] = customApiVersion, $[72] = t, $[73] = url, $[74] = t33) : t33 = $[74];
1891
+ }) : /* @__PURE__ */ jsx(Box, {
1892
+ flexBasis: "0%",
1893
+ flexGrow: 1
1894
+ }), $[71] = customApiVersion, $[72] = t, $[73] = url, $[74] = t33) : t33 = $[74];
1886
1895
  let t34;
1887
1896
  return $[75] !== t22 || $[76] !== t23 || $[77] !== t32 || $[78] !== t33 || $[79] !== t9 ? (t34 = /* @__PURE__ */ jsx(Header, {
1888
1897
  paddingX: 3,
@@ -2173,7 +2182,8 @@ function VisionGuiResult(t0) {
2173
2182
  }), $[29] = t12, $[30] = t7, $[31] = t13) : t13 = $[31];
2174
2183
  let t14;
2175
2184
  $[32] !== t13 || $[33] !== t4 || $[34] !== t5 ? (t14 = /* @__PURE__ */ jsx(ResultInnerContainer, {
2176
- flex: 1,
2185
+ flexBasis: "0%",
2186
+ flexGrow: 1,
2177
2187
  children: /* @__PURE__ */ jsx(ResultContainer, {
2178
2188
  flex: 1,
2179
2189
  overflow: "hidden",
@@ -2571,7 +2581,8 @@ function VisionGui(props) {
2571
2581
  display: "flex",
2572
2582
  "data-testid": "vision-query-editor",
2573
2583
  children: /* @__PURE__ */ jsxs(Box, {
2574
- flex: 1,
2584
+ flexBasis: "0%",
2585
+ flexGrow: 1,
2575
2586
  children: [t58, t59]
2576
2587
  })
2577
2588
  }), $[159] = t58, $[160] = t59, $[161] = t60) : t60 = $[161];
@@ -2599,7 +2610,8 @@ function VisionGui(props) {
2599
2610
  let t64;
2600
2611
  $[176] !== paneSizeOptions.allowResize || $[177] !== paneSizeOptions.maxSize || $[178] !== paneSizeOptions.size || $[179] !== t52 || $[180] !== t55 || $[181] !== t60 || $[182] !== t63 ? (t64 = /* @__PURE__ */ jsx(Box, {
2601
2612
  height: "stretch",
2602
- flex: 1,
2613
+ flexBasis: "0%",
2614
+ flexGrow: 1,
2603
2615
  children: /* @__PURE__ */ jsxs(SplitPane, {
2604
2616
  className: "sidebarPanes",
2605
2617
  split: "horizontal",
@@ -2626,7 +2638,8 @@ function VisionGui(props) {
2626
2638
  let t66;
2627
2639
  $[193] !== t51 || $[194] !== t64 || $[195] !== t65 ? (t66 = /* @__PURE__ */ jsx(Box, {
2628
2640
  height: "stretch",
2629
- flex: 1,
2641
+ flexBasis: "0%",
2642
+ flexGrow: 1,
2630
2643
  children: /* @__PURE__ */ jsxs(SplitPane, {
2631
2644
  className: "sidebarPanes",
2632
2645
  split: t51,
@@ -2679,7 +2692,9 @@ function VisionGui(props) {
2679
2692
  $[215] !== t71 || $[216] !== t73 ? (t74 = /* @__PURE__ */ jsxs(QueryRecallPaneContainer, { children: [t71, t73] }), $[215] = t71, $[216] = t73, $[217] = t74) : t74 = $[217];
2680
2693
  let t75;
2681
2694
  $[218] !== t50 || $[219] !== t66 || $[220] !== t74 ? (t75 = /* @__PURE__ */ jsx(SplitpaneContainer, {
2682
- flex: "auto",
2695
+ flexBasis: "auto",
2696
+ flexGrow: 1,
2697
+ flexShrink: 1,
2683
2698
  children: /* @__PURE__ */ jsxs(SplitPane, {
2684
2699
  minSize: 800,
2685
2700
  defaultSize: window.innerWidth - 275,
@@ -2855,4 +2870,4 @@ function SanityVision(props) {
2855
2870
  }
2856
2871
  export { SanityVision as default };
2857
2872
 
2858
- //# sourceMappingURL=SanityVision-DuaYJCFN.js.map
2873
+ //# sourceMappingURL=SanityVision-C2XWWKKM.js.map