@sanity/vision 6.20.0 → 6.21.0-next.103

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,4 +1,4 @@
1
- import { t as visionLocaleNamespace } from "./i18n-JS8KzGj8.js";
1
+ import { t as visionLocaleNamespace } from "./i18n-BGSN3nAJ.js";
2
2
  import { Component, Fragment, Suspense, createContext, lazy, use, useEffect, useImperativeHandle, useRef, useState, useSyncExternalStore } from "react";
3
3
  import { ContextMenuButton, RELEASES_STUDIO_CLIENT_OPTIONS, Translate, UserAvatar, VARIANTS_STUDIO_CLIENT_OPTIONS, getDefaultVariant, getReleaseIdFromReleaseDocumentId, getVariantTitle, isCardinalityOneRelease, sortReleases, useActiveReleases, useClient, useCurrentUser, useDataset, useDateTimeFormat, useKeyValueStore, usePerspective, useScheduledDraftsEnabled, useTranslation, useWorkspace } from "sanity";
4
4
  import { IntentLink } from "sanity/router";
@@ -20,7 +20,6 @@ import { EditorState } from "@codemirror/state";
20
20
  import { EditorView, drawSelection, highlightActiveLine, highlightActiveLineGutter, highlightSpecialChars, keymap, lineNumbers } from "@codemirror/view";
21
21
  import { groq } from "@sanity/lezer-groq";
22
22
  import CodeMirror, { EditorSelection as EditorSelection$1 } from "@uiw/react-codemirror";
23
- import { assignInlineVars } from "@vanilla-extract/dynamic";
24
23
  import { tags } from "@lezer/highlight";
25
24
  import { hues } from "@sanity/color";
26
25
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -294,26 +293,26 @@ function getVisibleColumns(view, { lines, scrollbarWidth } = {}) {
294
293
  let { scrollDOM, contentDOM, defaultCharacterWidth, defaultLineHeight } = view, gutters = scrollDOM.querySelector(".cm-gutters"), line = contentDOM.querySelector(".cm-line"), currentLines = view.state.doc.lines, nextLines = lines ?? currentLines, gutterGrowth = (lineNumberDigits(nextLines) - lineNumberDigits(currentLines)) * defaultCharacterWidth, willOverflowVertically = nextLines * defaultLineHeight + insets(contentDOM, ["Top", "Bottom"]) > scrollDOM.clientHeight, hasVerticalScrollbar = scrollDOM.scrollHeight > scrollDOM.clientHeight, scrollbarReserve = willOverflowVertically && !hasVerticalScrollbar ? scrollbarWidth ?? getScrollbarWidth() : 0, width = scrollDOM.clientWidth - (gutters instanceof HTMLElement ? gutters.offsetWidth : 0) - gutterGrowth - insets(contentDOM, ["Left", "Right"]) - (line ? insets(line, ["Left", "Right"]) : 0) - scrollbarReserve, columns = Math.floor(width / defaultCharacterWidth);
295
294
  return Number.isFinite(columns) && columns > 0 ? columns : void 0;
296
295
  }
297
- var contentBorderRightWidthVar = "var(--_2nm9wj1)", contentPaddingTopVar = "var(--_2nm9wj2)", editorRoot = "_2nm9wj3", editorRootAutoHeight = "_2nm9wj4", linePaddingLeftVar = "var(--_2nm9wj0)";
296
+ const _key0$5 = "HSFWEW_editorRoot";
298
297
  function EditorRoot(t0) {
299
- let $ = c(14), { autoHeight, underHeader, children } = t0, { sanity } = useTheme(), t1 = autoHeight ? `${editorRoot} ${editorRootAutoHeight}` : editorRoot, t2;
300
- $[0] === sanity.space[3] ? t2 = $[1] : (t2 = rem(sanity.space[3]), $[0] = sanity.space[3], $[1] = t2);
301
- let t3 = `${t2}`, t4;
302
- $[2] === sanity.space[4] ? t4 = $[3] : (t4 = rem(sanity.space[4]), $[2] = sanity.space[4], $[3] = t4);
303
- let t5 = `${t4}`, t6 = sanity.space[underHeader ? 3 : 5], t7;
304
- $[4] === t6 ? t7 = $[5] : (t7 = rem(t6), $[4] = t6, $[5] = t7);
305
- let t8 = `${t7}`, t9;
306
- $[6] !== t3 || $[7] !== t5 || $[8] !== t8 ? (t9 = assignInlineVars({
307
- [linePaddingLeftVar]: t3,
308
- [contentBorderRightWidthVar]: t5,
309
- [contentPaddingTopVar]: t8
310
- }), $[6] = t3, $[7] = t5, $[8] = t8, $[9] = t9) : t9 = $[9];
311
- let t10;
312
- return $[10] !== children || $[11] !== t1 || $[12] !== t9 ? (t10 = /* @__PURE__ */ jsx("div", {
313
- className: t1,
314
- style: t9,
298
+ let $ = c(14), { autoHeight, underHeader, children } = t0, { sanity } = useTheme(), t1;
299
+ $[0] === sanity.space[3] ? t1 = $[1] : (t1 = rem(sanity.space[3]), $[0] = sanity.space[3], $[1] = t1);
300
+ let t2 = `${t1}`, t3;
301
+ $[2] === sanity.space[4] ? t3 = $[3] : (t3 = rem(sanity.space[4]), $[2] = sanity.space[4], $[3] = t3);
302
+ let t4 = `${t3}`, t5 = sanity.space[underHeader ? 3 : 5], t6;
303
+ $[4] === t5 ? t6 = $[5] : (t6 = rem(t5), $[4] = t5, $[5] = t6);
304
+ let t7 = `${t6}`, t8;
305
+ $[6] !== t2 || $[7] !== t4 || $[8] !== t7 ? (t8 = {
306
+ "--vision-editor-line-padding-left": t2,
307
+ "--vision-editor-content-border-right-width": t4,
308
+ "--vision-editor-content-padding-top": t7
309
+ }, $[6] = t2, $[7] = t4, $[8] = t7, $[9] = t8) : t8 = $[9];
310
+ let style = t8, t9 = autoHeight ? `${_key0$5} HSFWEW_editorRootAutoHeight` : _key0$5, t10;
311
+ return $[10] !== children || $[11] !== style || $[12] !== t9 ? (t10 = /* @__PURE__ */ jsx("div", {
312
+ className: t9,
313
+ style,
315
314
  children
316
- }), $[10] = children, $[11] = t1, $[12] = t9, $[13] = t10) : t10 = $[13], t10;
315
+ }), $[10] = children, $[11] = style, $[12] = t9, $[13] = t10) : t10 = $[13], t10;
317
316
  }
318
317
  function VisionCodeMirror(t0) {
319
318
  let $ = c(21), { ref, onChange, initialValue: initialValueProp, extensions, autoHeight: t1, underHeader: t2 } = t0, autoHeight = t1 !== void 0 && t1, underHeader = t2 === void 0 ? autoHeight : t2, [value, setValue] = useState(initialValueProp), [hasView, setHasView] = useState(!1), [seenInitialValue, setSeenInitialValue] = useState(initialValueProp);
@@ -399,6 +398,14 @@ function VisionCodeMirror(t0) {
399
398
  children: t14
400
399
  }), $[17] = autoHeight, $[18] = t14, $[19] = underHeader, $[20] = t15) : t15 = $[20], t15;
401
400
  }
401
+ /**
402
+ * Whether the workspace has variants switched on (`beta.variants.enabled`). The studio gates its
403
+ * own variant UI on this flag, the navbar's variant selector included, so Vision shows and sends
404
+ * variants only where the navbar does.
405
+ */
406
+ function useVariantsEnabled() {
407
+ return !!useWorkspace().beta?.variants?.enabled;
408
+ }
402
409
  const SUPPORTED_PERSPECTIVES = [
403
410
  "pinnedRelease",
404
411
  "scheduledDrafts",
@@ -595,7 +602,7 @@ function tryParseParams(val, t) {
595
602
  return err.message = `${t("params.error.params-invalid-json")}:\n\n${err.message.replace("JSON5:", "")}`, err;
596
603
  }
597
604
  }
598
- var controlsContainer = "_168md2ym", downloadsCard = "_168md2yj", header = "_168md2y3", inputBackgroundContainer = "_168md2y7", inputBackgroundContainerLeft = "_168md2y8", inputContainer = "_168md2y9", queryCopyLink = "_168md2y6", queryRecallPaneContainer = "_168md2y1", queryRecallPaneWrapper = "_168md2y2", result = "_168md2ye", resultContainer = "_168md2yc", resultContainerInvalid = "_168md2yd", resultFooter = "_168md2yf", resultInnerContainer = "_168md2yb", resultOuterContainer = "_168md2ya", root = "_168md2y0", saveResultLabel = "_168md2yl", saveResultSpanGapVar = "var(--_168md2yk)", splitpaneContainer = "_168md2y5", styledLabel = "_168md2y4", timingsCard = "_168md2yg", timingsTextContainer = "_168md2yi", timingsTextMinHeightVar = "var(--_168md2yh)";
605
+ const _key3 = "lBV0cq_inputBackgroundContainer", _key10 = "lBV0cq_resultContainer";
599
606
  function Root(t0) {
600
607
  let $ = c(6), props, ref;
601
608
  $[0] === t0 ? (props = $[1], ref = $[2]) : ({ref, ...props} = t0, $[0] = t0, $[1] = props, $[2] = ref);
@@ -603,28 +610,28 @@ function Root(t0) {
603
610
  return $[3] !== props || $[4] !== ref ? (t1 = /* @__PURE__ */ jsx(Flex, {
604
611
  ...props,
605
612
  ref,
606
- className: root
613
+ className: "lBV0cq_root"
607
614
  }), $[3] = props, $[4] = ref, $[5] = t1) : t1 = $[5], t1;
608
615
  }
609
616
  function Header(props) {
610
617
  let $ = c(2), t0;
611
618
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Card, {
612
619
  ...props,
613
- className: header
620
+ className: "lBV0cq_header"
614
621
  }), $[0] = props, $[1] = t0), t0;
615
622
  }
616
623
  function StyledLabel(props) {
617
624
  let $ = c(2), t0;
618
625
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Label, {
619
626
  ...props,
620
- className: styledLabel
627
+ className: "lBV0cq_styledLabel"
621
628
  }), $[0] = props, $[1] = t0), t0;
622
629
  }
623
630
  function SplitpaneContainer(props) {
624
631
  let $ = c(2), t0;
625
632
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Box, {
626
633
  ...props,
627
- className: splitpaneContainer
634
+ className: "lBV0cq_splitpaneContainer"
628
635
  }), $[0] = props, $[1] = t0), t0;
629
636
  }
630
637
  function QueryRecallPaneContainer(props) {
@@ -632,7 +639,7 @@ function QueryRecallPaneContainer(props) {
632
639
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Flex, {
633
640
  ...props,
634
641
  flexDirection: "column",
635
- className: queryRecallPaneContainer
642
+ className: "lBV0cq_queryRecallPaneContainer"
636
643
  }), $[0] = props, $[1] = t0), t0;
637
644
  }
638
645
  function QueryRecallPaneWrapper(props) {
@@ -643,55 +650,55 @@ function QueryRecallPaneWrapper(props) {
643
650
  flexBasis: "0%",
644
651
  flexGrow: 1,
645
652
  overflow: "hidden",
646
- className: queryRecallPaneWrapper
653
+ className: "lBV0cq_queryRecallPaneWrapper"
647
654
  }), $[0] = props, $[1] = t0), t0;
648
655
  }
649
656
  function QueryCopyLink(props) {
650
657
  let $ = c(2), t0;
651
658
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx("a", {
652
659
  ...props,
653
- className: queryCopyLink
660
+ className: "lBV0cq_queryCopyLink"
654
661
  }), $[0] = props, $[1] = t0), t0;
655
662
  }
656
663
  function InputBackgroundContainer(props) {
657
664
  let $ = c(2), t0;
658
665
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Box, {
659
666
  ...props,
660
- className: inputBackgroundContainer
667
+ className: _key3
661
668
  }), $[0] = props, $[1] = t0), t0;
662
669
  }
663
670
  function InputBackgroundContainerLeft(props) {
664
671
  let $ = c(2), t0;
665
672
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Box, {
666
673
  ...props,
667
- className: `${inputBackgroundContainer} ${inputBackgroundContainerLeft}`
674
+ className: `${_key3} lBV0cq_inputBackgroundContainerLeft`
668
675
  }), $[0] = props, $[1] = t0), t0;
669
676
  }
670
677
  function InputContainer(props) {
671
678
  let $ = c(2), t0;
672
679
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Card, {
673
680
  ...props,
674
- className: inputContainer
681
+ className: "lBV0cq_inputContainer"
675
682
  }), $[0] = props, $[1] = t0), t0;
676
683
  }
677
684
  function ResultOuterContainer(props) {
678
685
  let $ = c(2), t0;
679
686
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Flex, {
680
687
  ...props,
681
- className: resultOuterContainer
688
+ className: "lBV0cq_resultOuterContainer"
682
689
  }), $[0] = props, $[1] = t0), t0;
683
690
  }
684
691
  function ResultInnerContainer(props) {
685
692
  let $ = c(2), t0;
686
693
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Box, {
687
694
  ...props,
688
- className: resultInnerContainer
695
+ className: "lBV0cq_resultInnerContainer"
689
696
  }), $[0] = props, $[1] = t0), t0;
690
697
  }
691
698
  function ResultContainer(t0) {
692
699
  let $ = c(6), isInvalid, props;
693
700
  $[0] === t0 ? (isInvalid = $[1], props = $[2]) : ({isInvalid, ...props} = t0, $[0] = t0, $[1] = isInvalid, $[2] = props);
694
- let t1 = isInvalid ? `${resultContainer} ${resultContainerInvalid}` : resultContainer, t2;
701
+ let t1 = isInvalid ? `${_key10} lBV0cq_resultContainerInvalid` : _key10, t2;
695
702
  return $[3] !== props || $[4] !== t1 ? (t2 = /* @__PURE__ */ jsx(Card, {
696
703
  ...props,
697
704
  className: t1
@@ -701,59 +708,59 @@ function Result(props) {
701
708
  let $ = c(2), t0;
702
709
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Box, {
703
710
  ...props,
704
- className: result
711
+ className: "lBV0cq_result"
705
712
  }), $[0] = props, $[1] = t0), t0;
706
713
  }
707
714
  function ResultFooter(props) {
708
715
  let $ = c(2), t0;
709
716
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Flex, {
710
717
  ...props,
711
- className: resultFooter
718
+ className: "lBV0cq_resultFooter"
712
719
  }), $[0] = props, $[1] = t0), t0;
713
720
  }
714
721
  function TimingsCard(props) {
715
722
  let $ = c(2), t0;
716
723
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Card, {
717
724
  ...props,
718
- className: timingsCard
725
+ className: "lBV0cq_timingsCard"
719
726
  }), $[0] = props, $[1] = t0), t0;
720
727
  }
721
728
  function TimingsTextContainer(props) {
722
729
  let $ = c(7), { space, font } = useTheme_v2(), textSize = font.text.sizes[2], t0 = space[3] * 2 + textSize.lineHeight - textSize.ascenderHeight - textSize.descenderHeight, t1;
723
730
  $[0] === t0 ? t1 = $[1] : (t1 = rem(t0), $[0] = t0, $[1] = t1);
724
731
  let t2 = `${t1}`, t3;
725
- $[2] === t2 ? t3 = $[3] : (t3 = assignInlineVars({ [timingsTextMinHeightVar]: t2 }), $[2] = t2, $[3] = t3);
726
- let t4;
727
- return $[4] !== props || $[5] !== t3 ? (t4 = /* @__PURE__ */ jsx(Flex, {
732
+ $[2] === t2 ? t3 = $[3] : (t3 = { "--vision-timings-text-min-height": t2 }, $[2] = t2, $[3] = t3);
733
+ let style = t3, t4;
734
+ return $[4] !== props || $[5] !== style ? (t4 = /* @__PURE__ */ jsx(Flex, {
728
735
  ...props,
729
- className: timingsTextContainer,
730
- style: t3
731
- }), $[4] = props, $[5] = t3, $[6] = t4) : t4 = $[6], t4;
736
+ className: "lBV0cq_timingsTextContainer",
737
+ style
738
+ }), $[4] = props, $[5] = style, $[6] = t4) : t4 = $[6], t4;
732
739
  }
733
740
  function DownloadsCard(props) {
734
741
  let $ = c(2), t0;
735
742
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Card, {
736
743
  ...props,
737
- className: downloadsCard
744
+ className: "lBV0cq_downloadsCard"
738
745
  }), $[0] = props, $[1] = t0), t0;
739
746
  }
740
747
  function SaveResultLabel(props) {
741
748
  let $ = c(7), { space } = useTheme_v2(), t0;
742
749
  $[0] === space[3] ? t0 = $[1] : (t0 = rem(space[3]), $[0] = space[3], $[1] = t0);
743
750
  let t1 = `${t0}`, t2;
744
- $[2] === t1 ? t2 = $[3] : (t2 = assignInlineVars({ [saveResultSpanGapVar]: t1 }), $[2] = t1, $[3] = t2);
745
- let t3;
746
- return $[4] !== props || $[5] !== t2 ? (t3 = /* @__PURE__ */ jsx(Text, {
751
+ $[2] === t1 ? t2 = $[3] : (t2 = { "--vision-save-result-gap": t1 }, $[2] = t1, $[3] = t2);
752
+ let style = t2, t3;
753
+ return $[4] !== props || $[5] !== style ? (t3 = /* @__PURE__ */ jsx(Text, {
747
754
  ...props,
748
- className: saveResultLabel,
749
- style: t2
750
- }), $[4] = props, $[5] = t2, $[6] = t3) : t3 = $[6], t3;
755
+ className: "lBV0cq_saveResultLabel",
756
+ style
757
+ }), $[4] = props, $[5] = style, $[6] = t3) : t3 = $[6], t3;
751
758
  }
752
759
  function ControlsContainer(props) {
753
760
  let $ = c(2), t0;
754
761
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Box, {
755
762
  ...props,
756
- className: controlsContainer
763
+ className: "lBV0cq_controlsContainer"
757
764
  }), $[0] = props, $[1] = t0), t0;
758
765
  }
759
766
  function ParamsEditor(props) {
@@ -1109,12 +1116,11 @@ function _temp2$4(a, b) {
1109
1116
  return new Date(b.savedAt || 0).getTime() - new Date(a.savedAt || 0).getTime();
1110
1117
  }
1111
1118
  function _temp$6() {}
1112
- var fixedHeader = "_2440ks0", queryList = "_2440ks2", scrollContainer = "_2440ks1";
1113
1119
  function FixedHeader(props) {
1114
1120
  let $ = c(2), t0;
1115
1121
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(VStack, {
1116
1122
  ...props,
1117
- className: fixedHeader
1123
+ className: "A8N59q_fixedHeader"
1118
1124
  }), $[0] = props, $[1] = t0), t0;
1119
1125
  }
1120
1126
  function ScrollContainer(props) {
@@ -1125,7 +1131,7 @@ function ScrollContainer(props) {
1125
1131
  flexBasis: "0%",
1126
1132
  flexGrow: 1,
1127
1133
  overflow: "hidden",
1128
- className: scrollContainer
1134
+ className: "A8N59q_scrollContainer"
1129
1135
  }), $[0] = props, $[1] = t0), t0;
1130
1136
  }
1131
1137
  function QueryList(props) {
@@ -1135,7 +1141,7 @@ function QueryList(props) {
1135
1141
  flexBasis: "0%",
1136
1142
  flexGrow: 1,
1137
1143
  overflow: "auto",
1138
- className: queryList
1144
+ className: "A8N59q_queryList"
1139
1145
  }), $[0] = props, $[1] = t0), t0;
1140
1146
  }
1141
1147
  function QueryRecall(t0) {
@@ -1879,25 +1885,24 @@ function VisionGuiControls(t0) {
1879
1885
  })
1880
1886
  }) }), $[30] = hasValidParams, $[31] = t15, $[32] = t2, $[33] = t16) : t16 = $[33], t16;
1881
1887
  }
1882
- var dot = "c29iyq2", perspectivePopoverContent = "c29iyq0", perspectivePopoverLink = "c29iyq1";
1883
1888
  function PerspectivePopoverContent(props) {
1884
1889
  let $ = c(2), t0;
1885
1890
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Box, {
1886
1891
  ...props,
1887
- className: perspectivePopoverContent
1892
+ className: "BsYI2a_perspectivePopoverContent"
1888
1893
  }), $[0] = props, $[1] = t0), t0;
1889
1894
  }
1890
1895
  function PerspectivePopoverLink(props) {
1891
1896
  let $ = c(2), t0;
1892
1897
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx("a", {
1893
1898
  ...props,
1894
- className: perspectivePopoverLink
1899
+ className: "BsYI2a_perspectivePopoverLink"
1895
1900
  }), $[0] = props, $[1] = t0), t0;
1896
1901
  }
1897
1902
  function Dot(t0) {
1898
1903
  let $ = c(2), { tone } = t0, t1 = `var(--card-badge-${tone}-dot-color)`, t2;
1899
1904
  return $[0] === t1 ? t2 = $[1] : (t2 = /* @__PURE__ */ jsx("div", {
1900
- className: dot,
1905
+ className: "BsYI2a_dot",
1901
1906
  style: { backgroundColor: t1 }
1902
1907
  }), $[0] = t1, $[1] = t2), t2;
1903
1908
  }
@@ -1996,125 +2001,123 @@ function _temp$4(o) {
1996
2001
  return !o;
1997
2002
  }
1998
2003
  const PinnedReleasePerspectiveOption = (t0) => {
1999
- let $ = c(17), { pinnedPerspective, t } = t0, name = typeof pinnedPerspective.selectedPerspective == "object" ? pinnedPerspective.selectedPerspective.metadata.title : pinnedPerspective.selectedPerspectiveName, t1;
2000
- if ($[0] !== pinnedPerspective.selectedVariantNames || $[1] !== pinnedPerspective.selectedVariants) {
2001
- let variant = getDefaultVariant(pinnedPerspective.selectedVariants), t2;
2002
- $[3] === pinnedPerspective.selectedVariantNames ? t2 = $[4] : (t2 = getDefaultVariant(pinnedPerspective.selectedVariantNames), $[3] = pinnedPerspective.selectedVariantNames, $[4] = t2), t1 = variant ? getVariantTitle(variant) : t2, $[0] = pinnedPerspective.selectedVariantNames, $[1] = pinnedPerspective.selectedVariants, $[2] = t1;
2003
- } else t1 = $[2];
2004
- let variantTitle = t1, t2;
2005
- $[5] !== pinnedPerspective || $[6] !== t ? (t2 = hasPinnedPerspective(pinnedPerspective) ? `(${t("settings.perspectives.pinned-release-label")})` : t("settings.perspectives.pinned-release-label"), $[5] = pinnedPerspective, $[6] = t, $[7] = t2) : t2 = $[7];
2006
- let label = t2, t3 = variantTitle ? `· ${variantTitle}` : void 0, t4;
2007
- $[8] !== label || $[9] !== name || $[10] !== t3 ? (t4 = [
2004
+ let $ = c(12), { pinnedPerspective, variantTitle, t } = t0, name = typeof pinnedPerspective.selectedPerspective == "object" ? pinnedPerspective.selectedPerspective.metadata.title : pinnedPerspective.selectedPerspectiveName, t1;
2005
+ $[0] !== pinnedPerspective || $[1] !== t ? (t1 = hasPinnedPerspective(pinnedPerspective) ? `(${t("settings.perspectives.pinned-release-label")})` : t("settings.perspectives.pinned-release-label"), $[0] = pinnedPerspective, $[1] = t, $[2] = t1) : t1 = $[2];
2006
+ let label = t1, t2 = variantTitle ? `· ${variantTitle}` : void 0, t3;
2007
+ $[3] !== label || $[4] !== name || $[5] !== t2 ? (t3 = [
2008
2008
  name,
2009
- t3,
2009
+ t2,
2010
2010
  label
2011
- ].filter(_temp$3), $[8] = label, $[9] = name, $[10] = t3, $[11] = t4) : t4 = $[11];
2012
- let text = t4.join(" "), t5;
2013
- $[12] === pinnedPerspective ? t5 = $[13] : (t5 = hasPinnedPerspective(pinnedPerspective), $[12] = pinnedPerspective, $[13] = t5);
2014
- let t6 = !t5, t7;
2015
- return $[14] !== t6 || $[15] !== text ? (t7 = /* @__PURE__ */ jsx("option", {
2011
+ ].filter(_temp$3), $[3] = label, $[4] = name, $[5] = t2, $[6] = t3) : t3 = $[6];
2012
+ let text = t3.join(" "), t4;
2013
+ $[7] === pinnedPerspective ? t4 = $[8] : (t4 = hasPinnedPerspective(pinnedPerspective), $[7] = pinnedPerspective, $[8] = t4);
2014
+ let t5 = !t4, t6;
2015
+ return $[9] !== t5 || $[10] !== text ? (t6 = /* @__PURE__ */ jsx("option", {
2016
2016
  value: "pinnedRelease",
2017
- disabled: t6,
2017
+ disabled: t5,
2018
2018
  children: text
2019
- }), $[14] = t6, $[15] = text, $[16] = t7) : t7 = $[16], t7;
2019
+ }), $[9] = t5, $[10] = text, $[11] = t6) : t6 = $[11], t6;
2020
2020
  };
2021
2021
  function VisionGuiHeader(t0) {
2022
- let $ = c(81), { onChangeDataset, dataset, customApiVersion, apiVersion, onChangeApiVersion, datasets, customApiVersionElementRef, onCustomApiVersionChange, isValidApiVersion, onChangePerspective, url, perspective, isScheduledDraftsEnabled } = t0, pinnedPerspective = usePerspective(), t1;
2023
- $[0] !== perspective || $[1] !== pinnedPerspective.selectedVariantNames ? (t1 = getActiveVariant(perspective, getDefaultVariant(pinnedPerspective.selectedVariantNames)), $[0] = perspective, $[1] = pinnedPerspective.selectedVariantNames, $[2] = t1) : t1 = $[2];
2024
- let isApiVersionLocked = !!t1, { t } = useTranslation(visionLocaleNamespace), operationUrlElement = useRef(null), t2;
2025
- $[3] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => {
2022
+ let $ = c(85), { onChangeDataset, dataset, customApiVersion, apiVersion, onChangeApiVersion, datasets, customApiVersionElementRef, onCustomApiVersionChange, isValidApiVersion, onChangePerspective, url, perspective, isScheduledDraftsEnabled } = t0, pinnedPerspective = usePerspective(), isVariantsEnabled = useVariantsEnabled(), navbarVariantTitle, t1, t2;
2023
+ if ($[0] !== isVariantsEnabled || $[1] !== perspective || $[2] !== pinnedPerspective) {
2024
+ let navbarVariantName = isVariantsEnabled ? getDefaultVariant(pinnedPerspective.selectedVariantNames) : void 0, navbarVariant = isVariantsEnabled ? getDefaultVariant(pinnedPerspective.selectedVariants) : void 0;
2025
+ navbarVariantTitle = navbarVariant ? getVariantTitle(navbarVariant) : navbarVariantName, t1 = Boolean, t2 = getActiveVariant(perspective, navbarVariantName), $[0] = isVariantsEnabled, $[1] = perspective, $[2] = pinnedPerspective, $[3] = navbarVariantTitle, $[4] = t1, $[5] = t2;
2026
+ } else navbarVariantTitle = $[3], t1 = $[4], t2 = $[5];
2027
+ let isApiVersionLocked = t1(t2), { t } = useTranslation(visionLocaleNamespace), operationUrlElement = useRef(null), t3;
2028
+ $[6] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
2026
2029
  let el = operationUrlElement.current;
2027
2030
  if (el) try {
2028
2031
  el.select(), document.execCommand("copy");
2029
2032
  } catch {
2030
2033
  console.error("Unable to copy to clipboard :(");
2031
2034
  }
2032
- }, $[3] = t2) : t2 = $[3];
2033
- let handleCopyUrl = t2, t3;
2034
- $[4] === Symbol.for("react.memo_cache_sentinel") ? (t3 = [
2035
+ }, $[6] = t3) : t3 = $[6];
2036
+ let handleCopyUrl = t3, t4;
2037
+ $[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = [
2035
2038
  "repeat(1, minmax(0, 1fr))",
2036
2039
  "repeat(4, minmax(0, 1fr))",
2037
2040
  "repeat(8, minmax(0, 1fr))",
2038
2041
  "repeat(12, minmax(0, 1fr))"
2039
- ], $[4] = t3) : t3 = $[4];
2040
- let t4;
2041
- $[5] === Symbol.for("react.memo_cache_sentinel") ? (t4 = ["span 1 / span 1", "span 2 / span 2"], $[5] = t4) : t4 = $[5];
2042
+ ], $[7] = t4) : t4 = $[7];
2042
2043
  let t5;
2043
- $[6] === t ? t5 = $[7] : (t5 = t("settings.dataset-label"), $[6] = t, $[7] = t5);
2044
+ $[8] === Symbol.for("react.memo_cache_sentinel") ? (t5 = ["span 1 / span 1", "span 2 / span 2"], $[8] = t5) : t5 = $[8];
2044
2045
  let t6;
2045
- $[8] === t5 ? t6 = $[9] : (t6 = /* @__PURE__ */ jsx(Card, {
2046
+ $[9] === t ? t6 = $[10] : (t6 = t("settings.dataset-label"), $[9] = t, $[10] = t6);
2047
+ let t7;
2048
+ $[11] === t6 ? t7 = $[12] : (t7 = /* @__PURE__ */ jsx(Card, {
2046
2049
  paddingTop: 2,
2047
2050
  paddingBottom: 3,
2048
- children: /* @__PURE__ */ jsx(StyledLabel, { children: t5 })
2049
- }), $[8] = t5, $[9] = t6);
2050
- let t7;
2051
- $[10] === datasets ? t7 = $[11] : (t7 = datasets.map(_temp2$2), $[10] = datasets, $[11] = t7);
2051
+ children: /* @__PURE__ */ jsx(StyledLabel, { children: t6 })
2052
+ }), $[11] = t6, $[12] = t7);
2052
2053
  let t8;
2053
- $[12] !== dataset || $[13] !== onChangeDataset || $[14] !== t7 ? (t8 = /* @__PURE__ */ jsx(Select, {
2054
+ $[13] === datasets ? t8 = $[14] : (t8 = datasets.map(_temp2$2), $[13] = datasets, $[14] = t8);
2055
+ let t9;
2056
+ $[15] !== dataset || $[16] !== onChangeDataset || $[17] !== t8 ? (t9 = /* @__PURE__ */ jsx(Select, {
2054
2057
  value: dataset,
2055
2058
  onChange: onChangeDataset,
2056
- children: t7
2057
- }), $[12] = dataset, $[13] = onChangeDataset, $[14] = t7, $[15] = t8) : t8 = $[15];
2058
- let t9;
2059
- $[16] !== t6 || $[17] !== t8 ? (t9 = /* @__PURE__ */ jsx(Box, {
2060
- padding: 1,
2061
- gridColumn: t4,
2062
- children: /* @__PURE__ */ jsxs(VStack, { children: [t6, t8] })
2063
- }), $[16] = t6, $[17] = t8, $[18] = t9) : t9 = $[18];
2059
+ children: t8
2060
+ }), $[15] = dataset, $[16] = onChangeDataset, $[17] = t8, $[18] = t9) : t9 = $[18];
2064
2061
  let t10;
2065
- $[19] === Symbol.for("react.memo_cache_sentinel") ? (t10 = ["span 1 / span 1", "span 2 / span 2"], $[19] = t10) : t10 = $[19];
2062
+ $[19] !== t7 || $[20] !== t9 ? (t10 = /* @__PURE__ */ jsx(Box, {
2063
+ padding: 1,
2064
+ gridColumn: t5,
2065
+ children: /* @__PURE__ */ jsxs(VStack, { children: [t7, t9] })
2066
+ }), $[19] = t7, $[20] = t9, $[21] = t10) : t10 = $[21];
2066
2067
  let t11;
2067
- $[20] === t ? t11 = $[21] : (t11 = t("settings.api-version-label"), $[20] = t, $[21] = t11);
2068
+ $[22] === Symbol.for("react.memo_cache_sentinel") ? (t11 = ["span 1 / span 1", "span 2 / span 2"], $[22] = t11) : t11 = $[22];
2068
2069
  let t12;
2069
- $[22] === t11 ? t12 = $[23] : (t12 = /* @__PURE__ */ jsx(Card, {
2070
+ $[23] === t ? t12 = $[24] : (t12 = t("settings.api-version-label"), $[23] = t, $[24] = t12);
2071
+ let t13;
2072
+ $[25] === t12 ? t13 = $[26] : (t13 = /* @__PURE__ */ jsx(Card, {
2070
2073
  paddingTop: 2,
2071
2074
  paddingBottom: 3,
2072
- children: /* @__PURE__ */ jsx(StyledLabel, { children: t11 })
2073
- }), $[22] = t11, $[23] = t12);
2074
- let t13;
2075
- $[24] === t ? t13 = $[25] : (t13 = t("settings.api-version-locked-for-variant"), $[24] = t, $[25] = t13);
2075
+ children: /* @__PURE__ */ jsx(StyledLabel, { children: t12 })
2076
+ }), $[25] = t12, $[26] = t13);
2076
2077
  let t14;
2077
- $[26] === t13 ? t14 = $[27] : (t14 = /* @__PURE__ */ jsx(Text, {
2078
+ $[27] === t ? t14 = $[28] : (t14 = t("settings.api-version-locked-for-variant"), $[27] = t, $[28] = t14);
2079
+ let t15;
2080
+ $[29] === t14 ? t15 = $[30] : (t15 = /* @__PURE__ */ jsx(Text, {
2078
2081
  size: 1,
2079
- children: t13
2080
- }), $[26] = t13, $[27] = t14);
2081
- let t15 = !isApiVersionLocked, t16 = customApiVersion === !1 ? apiVersion : "other", t17;
2082
- $[28] === Symbol.for("react.memo_cache_sentinel") ? (t17 = API_VERSIONS.map(_temp3$1), $[28] = t17) : t17 = $[28];
2083
- let t18;
2084
- $[29] === t ? t18 = $[30] : (t18 = t("settings.other-api-version-label"), $[29] = t, $[30] = t18);
2082
+ children: t14
2083
+ }), $[29] = t14, $[30] = t15);
2084
+ let t16 = !isApiVersionLocked, t17 = customApiVersion === !1 ? apiVersion : "other", t18;
2085
+ $[31] === Symbol.for("react.memo_cache_sentinel") ? (t18 = API_VERSIONS.map(_temp3$1), $[31] = t18) : t18 = $[31];
2085
2086
  let t19;
2086
- $[31] === t18 ? t19 = $[32] : (t19 = /* @__PURE__ */ jsx("option", {
2087
- value: "other",
2088
- children: t18
2089
- }, "other"), $[31] = t18, $[32] = t19);
2087
+ $[32] === t ? t19 = $[33] : (t19 = t("settings.other-api-version-label"), $[32] = t, $[33] = t19);
2090
2088
  let t20;
2091
- $[33] !== isApiVersionLocked || $[34] !== onChangeApiVersion || $[35] !== t16 || $[36] !== t19 ? (t20 = /* @__PURE__ */ jsx(Box, {
2089
+ $[34] === t19 ? t20 = $[35] : (t20 = /* @__PURE__ */ jsx("option", {
2090
+ value: "other",
2091
+ children: t19
2092
+ }, "other"), $[34] = t19, $[35] = t20);
2093
+ let t21;
2094
+ $[36] !== isApiVersionLocked || $[37] !== onChangeApiVersion || $[38] !== t17 || $[39] !== t20 ? (t21 = /* @__PURE__ */ jsx(Box, {
2092
2095
  "data-testid": "api-version-selector-wrap",
2093
2096
  children: /* @__PURE__ */ jsxs(Select, {
2094
2097
  "data-testid": "api-version-selector",
2095
- value: t16,
2098
+ value: t17,
2096
2099
  onChange: onChangeApiVersion,
2097
2100
  disabled: isApiVersionLocked,
2098
- children: [t17, t19]
2101
+ children: [t18, t20]
2099
2102
  })
2100
- }), $[33] = isApiVersionLocked, $[34] = onChangeApiVersion, $[35] = t16, $[36] = t19, $[37] = t20) : t20 = $[37];
2101
- let t21;
2102
- $[38] !== t14 || $[39] !== t15 || $[40] !== t20 ? (t21 = /* @__PURE__ */ jsx(Tooltip, {
2103
+ }), $[36] = isApiVersionLocked, $[37] = onChangeApiVersion, $[38] = t17, $[39] = t20, $[40] = t21) : t21 = $[40];
2104
+ let t22;
2105
+ $[41] !== t15 || $[42] !== t16 || $[43] !== t21 ? (t22 = /* @__PURE__ */ jsx(Tooltip, {
2103
2106
  animate: !0,
2104
- content: t14,
2105
- disabled: t15,
2107
+ content: t15,
2108
+ disabled: t16,
2106
2109
  placement: "bottom",
2107
2110
  portal: !0,
2108
- children: t20
2109
- }), $[38] = t14, $[39] = t15, $[40] = t20, $[41] = t21) : t21 = $[41];
2110
- let t22;
2111
- $[42] !== t12 || $[43] !== t21 ? (t22 = /* @__PURE__ */ jsx(Box, {
2112
- padding: 1,
2113
- gridColumn: t10,
2114
- children: /* @__PURE__ */ jsxs(VStack, { children: [t12, t21] })
2115
- }), $[42] = t12, $[43] = t21, $[44] = t22) : t22 = $[44];
2111
+ children: t21
2112
+ }), $[41] = t15, $[42] = t16, $[43] = t21, $[44] = t22) : t22 = $[44];
2116
2113
  let t23;
2117
- $[45] !== customApiVersion || $[46] !== customApiVersionElementRef || $[47] !== isApiVersionLocked || $[48] !== isValidApiVersion || $[49] !== onCustomApiVersionChange || $[50] !== t ? (t23 = !isApiVersionLocked && customApiVersion !== !1 && /* @__PURE__ */ jsx(Box, {
2114
+ $[45] !== t13 || $[46] !== t22 ? (t23 = /* @__PURE__ */ jsx(Box, {
2115
+ padding: 1,
2116
+ gridColumn: t11,
2117
+ children: /* @__PURE__ */ jsxs(VStack, { children: [t13, t22] })
2118
+ }), $[45] = t13, $[46] = t22, $[47] = t23) : t23 = $[47];
2119
+ let t24;
2120
+ $[48] !== customApiVersion || $[49] !== customApiVersionElementRef || $[50] !== isApiVersionLocked || $[51] !== isValidApiVersion || $[52] !== onCustomApiVersionChange || $[53] !== t ? (t24 = !isApiVersionLocked && customApiVersion !== !1 && /* @__PURE__ */ jsx(Box, {
2118
2121
  padding: 1,
2119
2122
  gridColumn: ["span 1 / span 1", "span 2 / span 2"],
2120
2123
  children: /* @__PURE__ */ jsxs(VStack, { children: [/* @__PURE__ */ jsx(Card, {
@@ -2131,28 +2134,29 @@ function VisionGuiHeader(t0) {
2131
2134
  customValidity: isValidApiVersion ? void 0 : t("settings.error.invalid-api-version"),
2132
2135
  maxLength: 11
2133
2136
  })] })
2134
- }), $[45] = customApiVersion, $[46] = customApiVersionElementRef, $[47] = isApiVersionLocked, $[48] = isValidApiVersion, $[49] = onCustomApiVersionChange, $[50] = t, $[51] = t23) : t23 = $[51];
2135
- let t24;
2136
- $[52] === Symbol.for("react.memo_cache_sentinel") ? (t24 = ["span 1 / span 1", "span 2 / span 2"], $[52] = t24) : t24 = $[52];
2137
+ }), $[48] = customApiVersion, $[49] = customApiVersionElementRef, $[50] = isApiVersionLocked, $[51] = isValidApiVersion, $[52] = onCustomApiVersionChange, $[53] = t, $[54] = t24) : t24 = $[54];
2137
2138
  let t25;
2138
- $[53] === t ? t25 = $[54] : (t25 = t("settings.perspective-label"), $[53] = t, $[54] = t25);
2139
+ $[55] === Symbol.for("react.memo_cache_sentinel") ? (t25 = ["span 1 / span 1", "span 2 / span 2"], $[55] = t25) : t25 = $[55];
2139
2140
  let t26;
2140
- $[55] === t25 ? t26 = $[56] : (t26 = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(StyledLabel, { children: t25 }) }), $[55] = t25, $[56] = t26);
2141
+ $[56] === t ? t26 = $[57] : (t26 = t("settings.perspective-label"), $[56] = t, $[57] = t26);
2141
2142
  let t27;
2142
- $[57] === Symbol.for("react.memo_cache_sentinel") ? (t27 = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(PerspectivePopover, {}) }), $[57] = t27) : t27 = $[57];
2143
+ $[58] === t26 ? t27 = $[59] : (t27 = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(StyledLabel, { children: t26 }) }), $[58] = t26, $[59] = t27);
2143
2144
  let t28;
2144
- $[58] === t26 ? t28 = $[59] : (t28 = /* @__PURE__ */ jsx(Card, {
2145
+ $[60] === Symbol.for("react.memo_cache_sentinel") ? (t28 = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(PerspectivePopover, {}) }), $[60] = t28) : t28 = $[60];
2146
+ let t29;
2147
+ $[61] === t27 ? t29 = $[62] : (t29 = /* @__PURE__ */ jsx(Card, {
2145
2148
  paddingBottom: 1,
2146
2149
  children: /* @__PURE__ */ jsxs(Inline, {
2147
2150
  gap: 1,
2148
- children: [t26, t27]
2151
+ children: [t27, t28]
2149
2152
  })
2150
- }), $[58] = t26, $[59] = t28);
2151
- let t29 = perspective || "default", t30;
2152
- $[60] !== isScheduledDraftsEnabled || $[61] !== pinnedPerspective || $[62] !== t ? (t30 = SUPPORTED_PERSPECTIVES.map((perspectiveName) => perspectiveName === "pinnedRelease" ? /* @__PURE__ */ jsxs(Fragment, { children: [
2153
+ }), $[61] = t27, $[62] = t29);
2154
+ let t30 = perspective || "default", t31;
2155
+ $[63] !== isScheduledDraftsEnabled || $[64] !== navbarVariantTitle || $[65] !== pinnedPerspective || $[66] !== t ? (t31 = SUPPORTED_PERSPECTIVES.map((perspectiveName) => perspectiveName === "pinnedRelease" ? /* @__PURE__ */ jsxs(Fragment, { children: [
2153
2156
  /* @__PURE__ */ jsx(PinnedReleasePerspectiveOption, {
2154
2157
  pinnedPerspective,
2155
- t
2158
+ t,
2159
+ variantTitle: navbarVariantTitle
2156
2160
  }),
2157
2161
  /* @__PURE__ */ jsx("option", {
2158
2162
  value: "default",
@@ -2162,22 +2166,22 @@ function VisionGuiHeader(t0) {
2162
2166
  ] }, "pinnedRelease") : perspectiveName === "scheduledDrafts" ? isScheduledDraftsEnabled ? /* @__PURE__ */ jsx("option", {
2163
2167
  value: "scheduledDrafts",
2164
2168
  children: t("settings.perspectives.scheduled-drafts")
2165
- }, "scheduledDrafts") : null : /* @__PURE__ */ jsx("option", { children: perspectiveName }, perspectiveName)), $[60] = isScheduledDraftsEnabled, $[61] = pinnedPerspective, $[62] = t, $[63] = t30) : t30 = $[63];
2166
- let t31;
2167
- $[64] !== onChangePerspective || $[65] !== t29 || $[66] !== t30 ? (t31 = /* @__PURE__ */ jsx(Select, {
2169
+ }, "scheduledDrafts") : null : /* @__PURE__ */ jsx("option", { children: perspectiveName }, perspectiveName)), $[63] = isScheduledDraftsEnabled, $[64] = navbarVariantTitle, $[65] = pinnedPerspective, $[66] = t, $[67] = t31) : t31 = $[67];
2170
+ let t32;
2171
+ $[68] !== onChangePerspective || $[69] !== t30 || $[70] !== t31 ? (t32 = /* @__PURE__ */ jsx(Select, {
2168
2172
  "data-testid": "perspective-selector",
2169
- value: t29,
2173
+ value: t30,
2170
2174
  onChange: onChangePerspective,
2171
- children: t30
2172
- }), $[64] = onChangePerspective, $[65] = t29, $[66] = t30, $[67] = t31) : t31 = $[67];
2173
- let t32;
2174
- $[68] !== t28 || $[69] !== t31 ? (t32 = /* @__PURE__ */ jsx(Box, {
2175
- padding: 1,
2176
- gridColumn: t24,
2177
- children: /* @__PURE__ */ jsxs(VStack, { children: [t28, t31] })
2178
- }), $[68] = t28, $[69] = t31, $[70] = t32) : t32 = $[70];
2175
+ children: t31
2176
+ }), $[68] = onChangePerspective, $[69] = t30, $[70] = t31, $[71] = t32) : t32 = $[71];
2179
2177
  let t33;
2180
- $[71] !== customApiVersion || $[72] !== t || $[73] !== url ? (t33 = typeof url == "string" ? /* @__PURE__ */ jsx(Box, {
2178
+ $[72] !== t29 || $[73] !== t32 ? (t33 = /* @__PURE__ */ jsx(Box, {
2179
+ padding: 1,
2180
+ gridColumn: t25,
2181
+ children: /* @__PURE__ */ jsxs(VStack, { children: [t29, t32] })
2182
+ }), $[72] = t29, $[73] = t32, $[74] = t33) : t33 = $[74];
2183
+ let t34;
2184
+ $[75] !== customApiVersion || $[76] !== t || $[77] !== url ? (t34 = typeof url == "string" ? /* @__PURE__ */ jsx(Box, {
2181
2185
  padding: 1,
2182
2186
  flexBasis: "0%",
2183
2187
  flexGrow: 1,
@@ -2229,22 +2233,22 @@ function VisionGuiHeader(t0) {
2229
2233
  }) : /* @__PURE__ */ jsx(Box, {
2230
2234
  flexBasis: "0%",
2231
2235
  flexGrow: 1
2232
- }), $[71] = customApiVersion, $[72] = t, $[73] = url, $[74] = t33) : t33 = $[74];
2233
- let t34;
2234
- return $[75] !== t22 || $[76] !== t23 || $[77] !== t32 || $[78] !== t33 || $[79] !== t9 ? (t34 = /* @__PURE__ */ jsx(Header, {
2236
+ }), $[75] = customApiVersion, $[76] = t, $[77] = url, $[78] = t34) : t34 = $[78];
2237
+ let t35;
2238
+ return $[79] !== t10 || $[80] !== t23 || $[81] !== t24 || $[82] !== t33 || $[83] !== t34 ? (t35 = /* @__PURE__ */ jsx(Header, {
2235
2239
  paddingX: 3,
2236
2240
  paddingY: 2,
2237
2241
  children: /* @__PURE__ */ jsxs(Grid, {
2238
- gridTemplateColumns: t3,
2242
+ gridTemplateColumns: t4,
2239
2243
  children: [
2240
- t9,
2241
- t22,
2244
+ t10,
2242
2245
  t23,
2243
- t32,
2244
- t33
2246
+ t24,
2247
+ t33,
2248
+ t34
2245
2249
  ]
2246
2250
  })
2247
- }), $[75] = t22, $[76] = t23, $[77] = t32, $[78] = t33, $[79] = t9, $[80] = t34) : t34 = $[80], t34;
2251
+ }), $[79] = t10, $[80] = t23, $[81] = t24, $[82] = t33, $[83] = t34, $[84] = t35) : t35 = $[84], t35;
2248
2252
  }
2249
2253
  function _temp3$1(version) {
2250
2254
  return /* @__PURE__ */ jsx("option", { children: version }, version);
@@ -2336,12 +2340,11 @@ function hasReleaseInPerspective(perspective) {
2336
2340
  function getUnsatisfiedApiVersionCapability(context, capabilities = API_VERSION_CAPABILITIES) {
2337
2341
  if (context.statusCode === 400) return capabilities.find((capability) => capability.applies(context) && isApiVersionBelow(context.apiVersion, capability.requiredApiVersion));
2338
2342
  }
2339
- var errorCode = "pae7z70";
2340
2343
  function ErrorCode(props) {
2341
2344
  let $ = c(2), t0;
2342
2345
  return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(Code, {
2343
2346
  ...props,
2344
- className: errorCode
2347
+ className: "_7y6tDG_errorCode"
2345
2348
  }), $[0] = props, $[1] = t0), t0;
2346
2349
  }
2347
2350
  function QueryErrorDetails(t0) {
@@ -2452,38 +2455,37 @@ function getAtKeypath(data, keypath) {
2452
2455
  }
2453
2456
  return { value: current };
2454
2457
  }
2455
- var codeFamilyVar = "var(--l3n7s00)", codeFontSizeVar = "var(--l3n7s01)", codeLineHeightVar = "var(--l3n7s02)", copyNodeButton = "l3n7s0e", copyableResult = "l3n7s0d", resultViewWrapper = "l3n7s0c", space0Var = "var(--l3n7s03)", space2Var = "var(--l3n7s04)", space4HalfVar = "var(--l3n7s06)", space4Var = "var(--l3n7s05)", syntaxBooleanVar = "var(--l3n7s0a)", syntaxConstantVar = "var(--l3n7s08)", syntaxNumberVar = "var(--l3n7s0b)", syntaxPropertyVar = "var(--l3n7s07)", syntaxStringVar = "var(--l3n7s09)";
2456
- const lru = new LRU({ maxSize: 5e4 });
2458
+ const _key2 = "VsSQ8q_resultViewWrapper", lru = new LRU({ maxSize: 5e4 });
2457
2459
  function ResultViewWrapper(t0) {
2458
- let $ = c(25), { children, copyable } = t0, { color, font, space } = useTheme_v2(), codeSize = font.code.sizes[2], t1 = copyable ? `${resultViewWrapper} ${copyableResult}` : resultViewWrapper, t2 = font.code.family, t3 = `${codeSize.fontSize}px`, t4 = `${codeSize.lineHeight}px`, t5;
2459
- $[0] === space[0] ? t5 = $[1] : (t5 = rem(space[0]), $[0] = space[0], $[1] = t5);
2460
- let t6 = `${t5}`, t7;
2461
- $[2] === space[2] ? t7 = $[3] : (t7 = rem(space[2]), $[2] = space[2], $[3] = t7);
2462
- let t8 = `${t7}`, t9;
2463
- $[4] === space[4] ? t9 = $[5] : (t9 = rem(space[4]), $[4] = space[4], $[5] = t9);
2464
- let t10 = `${t9}`, t11 = space[4] / 2, t12;
2465
- $[6] === t11 ? t12 = $[7] : (t12 = rem(t11), $[6] = t11, $[7] = t12);
2466
- let t13 = `${t12}`, t14;
2467
- $[8] !== color.syntax.boolean || $[9] !== color.syntax.constant || $[10] !== color.syntax.number || $[11] !== color.syntax.property || $[12] !== color.syntax.string || $[13] !== font.code.family || $[14] !== t10 || $[15] !== t13 || $[16] !== t3 || $[17] !== t4 || $[18] !== t6 || $[19] !== t8 ? (t14 = assignInlineVars({
2468
- [codeFamilyVar]: t2,
2469
- [codeFontSizeVar]: t3,
2470
- [codeLineHeightVar]: t4,
2471
- [space0Var]: t6,
2472
- [space2Var]: t8,
2473
- [space4Var]: t10,
2474
- [space4HalfVar]: t13,
2475
- [syntaxPropertyVar]: color.syntax.property,
2476
- [syntaxConstantVar]: color.syntax.constant,
2477
- [syntaxStringVar]: color.syntax.string,
2478
- [syntaxBooleanVar]: color.syntax.boolean,
2479
- [syntaxNumberVar]: color.syntax.number
2480
- }), $[8] = color.syntax.boolean, $[9] = color.syntax.constant, $[10] = color.syntax.number, $[11] = color.syntax.property, $[12] = color.syntax.string, $[13] = font.code.family, $[14] = t10, $[15] = t13, $[16] = t3, $[17] = t4, $[18] = t6, $[19] = t8, $[20] = t14) : t14 = $[20];
2481
- let t15;
2482
- return $[21] !== children || $[22] !== t1 || $[23] !== t14 ? (t15 = /* @__PURE__ */ jsx("div", {
2483
- className: t1,
2484
- style: t14,
2460
+ let $ = c(25), { children, copyable } = t0, { color, font, space } = useTheme_v2(), codeSize = font.code.sizes[2], t1 = font.code.family, t2 = `${codeSize.fontSize}px`, t3 = `${codeSize.lineHeight}px`, t4;
2461
+ $[0] === space[0] ? t4 = $[1] : (t4 = rem(space[0]), $[0] = space[0], $[1] = t4);
2462
+ let t5 = `${t4}`, t6;
2463
+ $[2] === space[2] ? t6 = $[3] : (t6 = rem(space[2]), $[2] = space[2], $[3] = t6);
2464
+ let t7 = `${t6}`, t8;
2465
+ $[4] === space[4] ? t8 = $[5] : (t8 = rem(space[4]), $[4] = space[4], $[5] = t8);
2466
+ let t9 = `${t8}`, t10 = space[4] / 2, t11;
2467
+ $[6] === t10 ? t11 = $[7] : (t11 = rem(t10), $[6] = t10, $[7] = t11);
2468
+ let t12 = `${t11}`, t13;
2469
+ $[8] !== color.syntax.boolean || $[9] !== color.syntax.constant || $[10] !== color.syntax.number || $[11] !== color.syntax.property || $[12] !== color.syntax.string || $[13] !== font.code.family || $[14] !== t12 || $[15] !== t2 || $[16] !== t3 || $[17] !== t5 || $[18] !== t7 || $[19] !== t9 ? (t13 = {
2470
+ "--vision-result-code-family": t1,
2471
+ "--vision-result-code-font-size": t2,
2472
+ "--vision-result-code-line-height": t3,
2473
+ "--vision-result-space-0": t5,
2474
+ "--vision-result-space-2": t7,
2475
+ "--vision-result-space-4": t9,
2476
+ "--vision-result-space-4-half": t12,
2477
+ "--vision-result-syntax-property": color.syntax.property,
2478
+ "--vision-result-syntax-constant": color.syntax.constant,
2479
+ "--vision-result-syntax-string": color.syntax.string,
2480
+ "--vision-result-syntax-boolean": color.syntax.boolean,
2481
+ "--vision-result-syntax-number": color.syntax.number
2482
+ }, $[8] = color.syntax.boolean, $[9] = color.syntax.constant, $[10] = color.syntax.number, $[11] = color.syntax.property, $[12] = color.syntax.string, $[13] = font.code.family, $[14] = t12, $[15] = t2, $[16] = t3, $[17] = t5, $[18] = t7, $[19] = t9, $[20] = t13) : t13 = $[20];
2483
+ let style = t13, t14 = copyable ? `${_key2} VsSQ8q_copyableResult` : _key2, t15;
2484
+ return $[21] !== children || $[22] !== style || $[23] !== t14 ? (t15 = /* @__PURE__ */ jsx("div", {
2485
+ className: t14,
2486
+ style,
2485
2487
  children
2486
- }), $[21] = children, $[22] = t1, $[23] = t14, $[24] = t15) : t15 = $[24], t15;
2488
+ }), $[21] = children, $[22] = style, $[23] = t14, $[24] = t15) : t15 = $[24], t15;
2487
2489
  }
2488
2490
  const ResultLabelContext = createContext(null);
2489
2491
  function ResultView(props) {
@@ -2547,7 +2549,7 @@ function CopyNodeButton(props) {
2547
2549
  let t2;
2548
2550
  return $[5] !== copy.label || $[6] !== t0 ? (t2 = /* @__PURE__ */ jsx("button", {
2549
2551
  "aria-label": copy.label,
2550
- className: copyNodeButton,
2552
+ className: "VsSQ8q_copyNodeButton",
2551
2553
  "data-testid": "result-copy-node",
2552
2554
  onClick: t0,
2553
2555
  title: copy.label,
@@ -2798,7 +2800,7 @@ function nodeContains(node, other) {
2798
2800
  }
2799
2801
  const isRunHotkey = (event) => isHotkey("ctrl+enter", event) || isHotkey("mod+enter", event);
2800
2802
  function VisionGui(props) {
2801
- let $ = c(234), { datasets, config, projectId, defaultDataset, onSwitchToRedesign } = props, toast = useToast(), { t } = useTranslation(visionLocaleNamespace), { perspectiveStack, selectedVariantNames } = usePerspective(), selectedVariantName = getDefaultVariant(selectedVariantNames), isScheduledDraftsEnabled = useScheduledDraftsEnabled(), { data: t0 } = useActiveReleases(), t1;
2803
+ let $ = c(234), { datasets, config, projectId, defaultDataset, onSwitchToRedesign } = props, toast = useToast(), { t } = useTranslation(visionLocaleNamespace), { perspectiveStack, selectedVariantNames } = usePerspective(), selectedVariantName = useVariantsEnabled() ? getDefaultVariant(selectedVariantNames) : void 0, isScheduledDraftsEnabled = useScheduledDraftsEnabled(), { data: t0 } = useActiveReleases(), t1;
2802
2804
  $[0] === t0 ? t1 = $[1] : (t1 = t0 === void 0 ? [] : t0, $[0] = t0, $[1] = t1);
2803
2805
  let releases = t1, isDraftModelEnabled = useWorkspace().document.drafts.enabled, editorQueryRef = useRef(null), editorParamsRef = useRef(null), visionRootRef = useRef(null), customApiVersionElementRef = useRef(null), querySubscriptionRef = useRef(void 0), listenSubscriptionRef = useRef(void 0), t2;
2804
2806
  $[2] === projectId ? t2 = $[3] : (t2 = () => getLocalStorage(projectId || "default"), $[2] = projectId, $[3] = t2);
@@ -3531,7 +3533,7 @@ function _temp() {
3531
3533
  return DEFAULT_PREFERENCE;
3532
3534
  }
3533
3535
  var SanityVision_exports = /* @__PURE__ */ __exportAll({ default: () => SanityVision });
3534
- const vistaGui = createRetryableLazy(() => import("./VistaGui-DmXZyJ6k.js").then((module) => ({ default: module.VistaGui }))), VistaGuiLoader = vistaGui.Component;
3536
+ const vistaGui = createRetryableLazy(() => import("./VistaGui-D3NHSIsK.js").then((module) => ({ default: module.VistaGui }))), VistaGuiLoader = vistaGui.Component;
3535
3537
  function SanityVision(props) {
3536
3538
  let $ = c(31), t0;
3537
3539
  $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = { apiVersion: "1" }, $[0] = t0) : t0 = $[0];
@@ -3582,6 +3584,6 @@ function SanityVision(props) {
3582
3584
  children: [t7, t8]
3583
3585
  }), $[28] = t7, $[29] = t8, $[30] = t9) : t9 = $[30], t9;
3584
3586
  }
3585
- export { VARIANTS_API_VERSION as A, getActivePerspective as C, resultJsonExtensions as D, paramsExtensions as E, API_VERSIONS as O, encodeQueryString as S, groqExtensions as T, VISION_STORAGE_KEY_PREFIX as _, getAtKeypath as a, isPlainObject as b, DelayedSpinner as c, getJsonBlobUrl as d, SanityVision as default, useSavedQueries as f, validateApiVersion as g, parseQueryUrl as h, describeKeypath as i, prefixApiVersion as j, DEFAULT_API_VERSION as k, canEncodeCsv as l, isApiCdnHost as m, createRetryableLazy as n, QueryErrorDialog as o, parseParams as p, ResultView as r, isApiVersionBelow as s, SanityVision_exports as t, getCsvBlobUrl as u, getStorage as v, VisionCodeMirror as w, isVisionPasteTarget as x, onLocalStorageCleared as y };
3587
+ export { DEFAULT_API_VERSION as A, getActivePerspective as C, paramsExtensions as D, groqExtensions as E, prefixApiVersion as M, resultJsonExtensions as O, encodeQueryString as S, VisionCodeMirror as T, VISION_STORAGE_KEY_PREFIX as _, getAtKeypath as a, isPlainObject as b, DelayedSpinner as c, getJsonBlobUrl as d, SanityVision as default, useSavedQueries as f, validateApiVersion as g, parseQueryUrl as h, describeKeypath as i, VARIANTS_API_VERSION as j, API_VERSIONS as k, canEncodeCsv as l, isApiCdnHost as m, createRetryableLazy as n, QueryErrorDialog as o, parseParams as p, ResultView as r, isApiVersionBelow as s, SanityVision_exports as t, getCsvBlobUrl as u, getStorage as v, useVariantsEnabled as w, isVisionPasteTarget as x, onLocalStorageCleared as y };
3586
3588
 
3587
- //# sourceMappingURL=SanityVision-ePOzvdmp.js.map
3589
+ //# sourceMappingURL=SanityVision-tHhBPbsg.js.map