@sanity/vision 6.17.0-next.97 → 6.17.1-next.1
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,8 +3,8 @@ import { Component, Fragment, Suspense, use, useEffect, useImperativeHandle, use
|
|
|
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";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { Box, Container, Flex, Grid } from "ui5";
|
|
7
|
-
import { Badge, Button, Card, Dialog, Heading, Hotkeys, Inline, Label, Select, Spinner,
|
|
6
|
+
import { Box, Container, Flex, Grid, VStack } from "ui5";
|
|
7
|
+
import { Badge, Button, Card, Dialog, Heading, Hotkeys, Inline, Label, Select, Spinner, Tab, TabList, Text, TextInput, rem, useClickOutsideEvent, useTheme, useTheme_v2 } from "@sanity/ui";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { SplitPane } from "@rexxars/react-split-pane";
|
|
10
10
|
import { ChevronLeftIcon } from "@sanity/icons/ChevronLeft";
|
|
@@ -247,8 +247,12 @@ function EditorRoot(t0) {
|
|
|
247
247
|
}), $[10] = children, $[11] = t7, $[12] = t8) : t8 = $[12], t8;
|
|
248
248
|
}
|
|
249
249
|
function VisionCodeMirror(t0) {
|
|
250
|
-
let $ = c(
|
|
251
|
-
$[0] ===
|
|
250
|
+
let $ = c(10), { ref, onChange, initialValue: initialValueProp, extensions } = t0, [value, setValue] = useState(initialValueProp), t1;
|
|
251
|
+
$[0] === onChange ? t1 = $[1] : (t1 = (nextValue, viewUpdate) => {
|
|
252
|
+
setValue(nextValue), onChange?.(nextValue, viewUpdate);
|
|
253
|
+
}, $[0] = onChange, $[1] = t1);
|
|
254
|
+
let handleChange = t1, theme = useCodemirrorTheme(useTheme()), codeMirrorRef = useRef(null), t2;
|
|
255
|
+
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t2 = (newContent) => {
|
|
252
256
|
let editorView = codeMirrorRef.current?.view;
|
|
253
257
|
if (!editorView) return;
|
|
254
258
|
let currentDoc = editorView.state.doc.toString();
|
|
@@ -260,18 +264,18 @@ function VisionCodeMirror(t0) {
|
|
|
260
264
|
},
|
|
261
265
|
selection: EditorSelection.cursor(newContent.length)
|
|
262
266
|
});
|
|
263
|
-
}, $[
|
|
264
|
-
let resetEditorContent =
|
|
265
|
-
$[
|
|
266
|
-
let
|
|
267
|
-
return $[
|
|
267
|
+
}, $[2] = t2) : t2 = $[2];
|
|
268
|
+
let resetEditorContent = t2, t3, t4;
|
|
269
|
+
$[3] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => ({ resetEditorContent }), t4 = [resetEditorContent], $[3] = t3, $[4] = t4) : (t3 = $[3], t4 = $[4]), useImperativeHandle(ref, t3, t4);
|
|
270
|
+
let t5;
|
|
271
|
+
return $[5] !== extensions || $[6] !== handleChange || $[7] !== theme || $[8] !== value ? (t5 = /* @__PURE__ */ jsx(EditorRoot, { children: /* @__PURE__ */ jsx(CodeMirror, {
|
|
268
272
|
ref: codeMirrorRef,
|
|
269
273
|
basicSetup: !1,
|
|
270
274
|
theme,
|
|
271
275
|
extensions,
|
|
272
|
-
value
|
|
273
|
-
onChange
|
|
274
|
-
}) }), $[
|
|
276
|
+
value,
|
|
277
|
+
onChange: handleChange
|
|
278
|
+
}) }), $[5] = extensions, $[6] = handleChange, $[7] = theme, $[8] = value, $[9] = t5) : t5 = $[9], t5;
|
|
275
279
|
}
|
|
276
280
|
const SUPPORTED_PERSPECTIVES = [
|
|
277
281
|
"pinnedRelease",
|
|
@@ -800,7 +804,7 @@ function _temp$5(data) {
|
|
|
800
804
|
var fixedHeader = "_15lckbo0", queryList = "_15lckbo2", scrollContainer = "_15lckbo1";
|
|
801
805
|
function FixedHeader(props) {
|
|
802
806
|
let $ = c(2), t0;
|
|
803
|
-
return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(
|
|
807
|
+
return $[0] === props ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(VStack, {
|
|
804
808
|
...props,
|
|
805
809
|
className: fixedHeader
|
|
806
810
|
}), $[0] = props, $[1] = t0), t0;
|
|
@@ -827,7 +831,7 @@ function QueryList(props) {
|
|
|
827
831
|
}), $[0] = props, $[1] = t0), t0;
|
|
828
832
|
}
|
|
829
833
|
function QueryRecall(t0) {
|
|
830
|
-
let $ = c(
|
|
834
|
+
let $ = c(136), { url, getStateFromUrl, setStateFromParsedUrl, currentQuery, currentParams, generateUrl, compactMode: t1 } = t0, compactMode = t1 !== void 0 && t1, toast = useToast(), { saveQuery, updateQuery, queries, deleteQuery, saving } = useSavedQueries(), { t } = useTranslation(visionLocaleNamespace), t2;
|
|
831
835
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t2 = {
|
|
832
836
|
month: "short",
|
|
833
837
|
day: "numeric",
|
|
@@ -1018,112 +1022,112 @@ function QueryRecall(t0) {
|
|
|
1018
1022
|
});
|
|
1019
1023
|
}
|
|
1020
1024
|
}, $[32] = currentParams, $[33] = currentQuery, $[34] = formatDate, $[35] = generateUrl, $[36] = getStateFromUrl, $[37] = queries, $[38] = t, $[39] = toast, $[40] = updateQuery, $[41] = t10) : t10 = $[41];
|
|
1021
|
-
let handleUpdate = t10, T0, T1, T2, t11, t12, t13, t14;
|
|
1025
|
+
let handleUpdate = t10, T0, T1, T2, t11, t12, t13, t14, t15;
|
|
1022
1026
|
if ($[42] !== compactMode || $[43] !== currentParams || $[44] !== currentQuery || $[45] !== deleteQuery || $[46] !== editingKey || $[47] !== editingTitle || $[48] !== formatDate || $[49] !== getStateFromUrl || $[50] !== handleSave || $[51] !== handleTitleSave || $[52] !== handleUnshareQuery || $[53] !== handleUpdate || $[54] !== optimisticTitles || $[55] !== pendingUnshareKeys || $[56] !== queries || $[57] !== queryFilter || $[58] !== saving || $[59] !== searchQuery || $[60] !== selectedUrl || $[61] !== setStateFromParsedUrl || $[62] !== t) {
|
|
1023
1027
|
let filteredQueries = (queries?.filter((q_3) => !pendingUnshareKeys.includes(q_3._key)))?.filter((q_4) => {
|
|
1024
1028
|
let matchesSearch = (q_4.title ?? "").toLowerCase().includes(searchQuery.toLowerCase()), matchesFilter = queryFilter === "all" || queryFilter === "personal" && !q_4.shared || queryFilter === "shared" && q_4.shared;
|
|
1025
1029
|
return matchesSearch && matchesFilter;
|
|
1026
1030
|
});
|
|
1027
1031
|
T2 = ScrollContainer;
|
|
1028
|
-
let t15;
|
|
1029
|
-
$[70] === t ? t15 = $[71] : (t15 = t("label.saved-queries"), $[70] = t, $[71] = t15);
|
|
1030
1032
|
let t16;
|
|
1031
|
-
$[
|
|
1032
|
-
muted: !0,
|
|
1033
|
-
children: t15
|
|
1034
|
-
}), $[72] = t15, $[73] = t16);
|
|
1033
|
+
$[71] === t ? t16 = $[72] : (t16 = t("label.saved-queries"), $[71] = t, $[72] = t16);
|
|
1035
1034
|
let t17;
|
|
1036
|
-
$[
|
|
1035
|
+
$[73] === t16 ? t17 = $[74] : (t17 = /* @__PURE__ */ jsx(StyledLabel, {
|
|
1036
|
+
muted: !0,
|
|
1037
|
+
children: t16
|
|
1038
|
+
}), $[73] = t16, $[74] = t17);
|
|
1037
1039
|
let t18;
|
|
1038
|
-
$[
|
|
1040
|
+
$[75] === t ? t18 = $[76] : (t18 = t("action.save-query"), $[75] = t, $[76] = t18);
|
|
1039
1041
|
let t19;
|
|
1040
|
-
$[
|
|
1041
|
-
|
|
1042
|
+
$[77] === handleSave ? t19 = $[78] : (t19 = () => void handleSave(), $[77] = handleSave, $[78] = t19);
|
|
1043
|
+
let t20;
|
|
1044
|
+
$[79] !== saving || $[80] !== t18 || $[81] !== t19 ? (t20 = /* @__PURE__ */ jsx(Button, {
|
|
1045
|
+
"aria-label": t18,
|
|
1042
1046
|
icon: AddIcon,
|
|
1043
1047
|
disabled: saving,
|
|
1044
|
-
onClick:
|
|
1048
|
+
onClick: t19,
|
|
1045
1049
|
mode: "bleed"
|
|
1046
|
-
}), $[
|
|
1047
|
-
let
|
|
1048
|
-
$[
|
|
1050
|
+
}), $[79] = saving, $[80] = t18, $[81] = t19, $[82] = t20) : t20 = $[82];
|
|
1051
|
+
let t21;
|
|
1052
|
+
$[83] !== t17 || $[84] !== t20 ? (t21 = /* @__PURE__ */ jsxs(Flex, {
|
|
1049
1053
|
padding: 3,
|
|
1050
1054
|
paddingTop: 2,
|
|
1051
1055
|
paddingBottom: 0,
|
|
1052
1056
|
justifyContent: "space-between",
|
|
1053
1057
|
alignItems: "center",
|
|
1054
|
-
children: [
|
|
1055
|
-
}), $[
|
|
1056
|
-
let t21;
|
|
1057
|
-
$[85] === t ? t21 = $[86] : (t21 = t("label.search-queries"), $[85] = t, $[86] = t21);
|
|
1058
|
+
children: [t17, t20]
|
|
1059
|
+
}), $[83] = t17, $[84] = t20, $[85] = t21) : t21 = $[85];
|
|
1058
1060
|
let t22;
|
|
1059
|
-
$[
|
|
1061
|
+
$[86] === t ? t22 = $[87] : (t22 = t("label.search-queries"), $[86] = t, $[87] = t22);
|
|
1060
1062
|
let t23;
|
|
1061
|
-
$[88]
|
|
1063
|
+
$[88] === Symbol.for("react.memo_cache_sentinel") ? (t23 = (event) => setSearchQuery(event.currentTarget.value), $[88] = t23) : t23 = $[88];
|
|
1064
|
+
let t24;
|
|
1065
|
+
$[89] !== searchQuery || $[90] !== t22 ? (t24 = /* @__PURE__ */ jsx(Box, {
|
|
1062
1066
|
padding: 3,
|
|
1063
1067
|
paddingTop: 0,
|
|
1064
1068
|
children: /* @__PURE__ */ jsx(TextInput, {
|
|
1065
|
-
placeholder:
|
|
1069
|
+
placeholder: t22,
|
|
1066
1070
|
icon: SearchIcon,
|
|
1067
1071
|
value: searchQuery,
|
|
1068
|
-
onChange:
|
|
1072
|
+
onChange: t23
|
|
1069
1073
|
})
|
|
1070
|
-
}), $[
|
|
1071
|
-
let
|
|
1072
|
-
$[
|
|
1073
|
-
let
|
|
1074
|
-
$[
|
|
1075
|
-
let
|
|
1076
|
-
$[
|
|
1074
|
+
}), $[89] = searchQuery, $[90] = t22, $[91] = t24) : t24 = $[91];
|
|
1075
|
+
let t25;
|
|
1076
|
+
$[92] === t ? t25 = $[93] : (t25 = t("label.all"), $[92] = t, $[93] = t25);
|
|
1077
|
+
let t26 = queryFilter === "all", t27;
|
|
1078
|
+
$[94] === Symbol.for("react.memo_cache_sentinel") ? (t27 = () => setQueryFilter("all"), $[94] = t27) : t27 = $[94];
|
|
1079
|
+
let t28;
|
|
1080
|
+
$[95] !== t25 || $[96] !== t26 ? (t28 = /* @__PURE__ */ jsx(Tab, {
|
|
1077
1081
|
id: "query-filter-all",
|
|
1078
1082
|
"aria-controls": "vision-query-recall-list",
|
|
1079
|
-
label:
|
|
1080
|
-
selected:
|
|
1081
|
-
onClick:
|
|
1082
|
-
}), $[
|
|
1083
|
-
let
|
|
1084
|
-
$[
|
|
1085
|
-
let
|
|
1086
|
-
$[
|
|
1087
|
-
let
|
|
1088
|
-
$[
|
|
1083
|
+
label: t25,
|
|
1084
|
+
selected: t26,
|
|
1085
|
+
onClick: t27
|
|
1086
|
+
}), $[95] = t25, $[96] = t26, $[97] = t28) : t28 = $[97];
|
|
1087
|
+
let t29;
|
|
1088
|
+
$[98] === t ? t29 = $[99] : (t29 = t("label.personal"), $[98] = t, $[99] = t29);
|
|
1089
|
+
let t30 = queryFilter === "personal", t31;
|
|
1090
|
+
$[100] === Symbol.for("react.memo_cache_sentinel") ? (t31 = () => setQueryFilter("personal"), $[100] = t31) : t31 = $[100];
|
|
1091
|
+
let t32;
|
|
1092
|
+
$[101] !== t29 || $[102] !== t30 ? (t32 = /* @__PURE__ */ jsx(Tab, {
|
|
1089
1093
|
id: "query-filter-personal",
|
|
1090
1094
|
"aria-controls": "vision-query-recall-list",
|
|
1091
|
-
label:
|
|
1092
|
-
selected:
|
|
1093
|
-
onClick:
|
|
1094
|
-
}), $[
|
|
1095
|
-
let
|
|
1096
|
-
$[
|
|
1097
|
-
let
|
|
1098
|
-
$[
|
|
1099
|
-
let
|
|
1100
|
-
$[
|
|
1095
|
+
label: t29,
|
|
1096
|
+
selected: t30,
|
|
1097
|
+
onClick: t31
|
|
1098
|
+
}), $[101] = t29, $[102] = t30, $[103] = t32) : t32 = $[103];
|
|
1099
|
+
let t33;
|
|
1100
|
+
$[104] === t ? t33 = $[105] : (t33 = t("label.shared"), $[104] = t, $[105] = t33);
|
|
1101
|
+
let t34 = queryFilter === "shared", t35;
|
|
1102
|
+
$[106] === Symbol.for("react.memo_cache_sentinel") ? (t35 = () => setQueryFilter("shared"), $[106] = t35) : t35 = $[106];
|
|
1103
|
+
let t36;
|
|
1104
|
+
$[107] !== t33 || $[108] !== t34 ? (t36 = /* @__PURE__ */ jsx(Tab, {
|
|
1101
1105
|
id: "query-filter-shared",
|
|
1102
1106
|
"aria-controls": "vision-query-recall-list",
|
|
1103
|
-
label:
|
|
1104
|
-
selected:
|
|
1105
|
-
onClick:
|
|
1106
|
-
}), $[
|
|
1107
|
-
let
|
|
1108
|
-
$[
|
|
1107
|
+
label: t33,
|
|
1108
|
+
selected: t34,
|
|
1109
|
+
onClick: t35
|
|
1110
|
+
}), $[107] = t33, $[108] = t34, $[109] = t36) : t36 = $[109];
|
|
1111
|
+
let t37;
|
|
1112
|
+
$[110] !== t28 || $[111] !== t32 || $[112] !== t36 ? (t37 = /* @__PURE__ */ jsx(Box, {
|
|
1109
1113
|
paddingX: 3,
|
|
1110
1114
|
paddingBottom: 2,
|
|
1111
1115
|
children: /* @__PURE__ */ jsxs(TabList, {
|
|
1112
1116
|
gap: 1,
|
|
1113
1117
|
children: [
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1118
|
+
t28,
|
|
1119
|
+
t32,
|
|
1120
|
+
t36
|
|
1117
1121
|
]
|
|
1118
1122
|
})
|
|
1119
|
-
}), $[
|
|
1123
|
+
}), $[110] = t28, $[111] = t32, $[112] = t36, $[113] = t37) : t37 = $[113], $[114] !== t21 || $[115] !== t24 || $[116] !== t37 ? (t15 = /* @__PURE__ */ jsxs(FixedHeader, {
|
|
1120
1124
|
gap: 3,
|
|
1121
1125
|
children: [
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1126
|
+
t21,
|
|
1127
|
+
t24,
|
|
1128
|
+
t37
|
|
1125
1129
|
]
|
|
1126
|
-
}), $[
|
|
1130
|
+
}), $[114] = t21, $[115] = t24, $[116] = t37, $[117] = t15) : t15 = $[117], T1 = QueryList, t14 = "vision-query-recall-list", T0 = Flex, t11 = 3, t12 = "column", t13 = filteredQueries?.map((q_5, index) => {
|
|
1127
1131
|
let queryObj = getStateFromUrl(q_5.url), fullQueryPreview = queryObj?.query || "", shortQueryPreview = fullQueryPreview.split("{")[0], isSelected = selectedUrl === q_5.url, canMutateQuery = !q_5.shared || q_5.isOwnedByCurrentUser, areQueriesEqual = queryObj && currentQuery === queryObj.query && dequal(currentParams, queryObj.params), isEdited = isSelected && !areQueriesEqual && canMutateQuery;
|
|
1128
1132
|
return /* @__PURE__ */ jsx(Card, {
|
|
1129
1133
|
paddingX: compactMode ? 3 : 4,
|
|
@@ -1142,7 +1146,7 @@ function QueryRecall(t0) {
|
|
|
1142
1146
|
borderLeft: isSelected ? "2px solid var(--card-muted-fg-color)" : "2px solid transparent",
|
|
1143
1147
|
cursor: "pointer"
|
|
1144
1148
|
},
|
|
1145
|
-
children: /* @__PURE__ */ jsxs(
|
|
1149
|
+
children: /* @__PURE__ */ jsxs(VStack, {
|
|
1146
1150
|
gap: compactMode ? 2 : 3,
|
|
1147
1151
|
children: [
|
|
1148
1152
|
/* @__PURE__ */ jsxs(Flex, {
|
|
@@ -1256,7 +1260,7 @@ function QueryRecall(t0) {
|
|
|
1256
1260
|
children: shortQueryPreview
|
|
1257
1261
|
})
|
|
1258
1262
|
}) : /* @__PURE__ */ jsx(Code, {}),
|
|
1259
|
-
compactMode ? /* @__PURE__ */ jsxs(
|
|
1263
|
+
compactMode ? /* @__PURE__ */ jsxs(VStack, {
|
|
1260
1264
|
gap: 1,
|
|
1261
1265
|
style: {
|
|
1262
1266
|
paddingTop: 0,
|
|
@@ -1373,20 +1377,21 @@ function QueryRecall(t0) {
|
|
|
1373
1377
|
]
|
|
1374
1378
|
})
|
|
1375
1379
|
}, q_5._key);
|
|
1376
|
-
}), $[42] = compactMode, $[43] = currentParams, $[44] = currentQuery, $[45] = deleteQuery, $[46] = editingKey, $[47] = editingTitle, $[48] = formatDate, $[49] = getStateFromUrl, $[50] = handleSave, $[51] = handleTitleSave, $[52] = handleUnshareQuery, $[53] = handleUpdate, $[54] = optimisticTitles, $[55] = pendingUnshareKeys, $[56] = queries, $[57] = queryFilter, $[58] = saving, $[59] = searchQuery, $[60] = selectedUrl, $[61] = setStateFromParsedUrl, $[62] = t, $[63] = T0, $[64] = T1, $[65] = T2, $[66] = t11, $[67] = t12, $[68] = t13, $[69] = t14;
|
|
1377
|
-
} else T0 = $[63], T1 = $[64], T2 = $[65], t11 = $[66], t12 = $[67], t13 = $[68], t14 = $[69];
|
|
1378
|
-
let t15;
|
|
1379
|
-
$[117] !== T0 || $[118] !== t11 || $[119] !== t12 ? (t15 = /* @__PURE__ */ jsx(T0, {
|
|
1380
|
-
paddingY: t11,
|
|
1381
|
-
children: t12
|
|
1382
|
-
}), $[117] = T0, $[118] = t11, $[119] = t12, $[120] = t15) : t15 = $[120];
|
|
1380
|
+
}), $[42] = compactMode, $[43] = currentParams, $[44] = currentQuery, $[45] = deleteQuery, $[46] = editingKey, $[47] = editingTitle, $[48] = formatDate, $[49] = getStateFromUrl, $[50] = handleSave, $[51] = handleTitleSave, $[52] = handleUnshareQuery, $[53] = handleUpdate, $[54] = optimisticTitles, $[55] = pendingUnshareKeys, $[56] = queries, $[57] = queryFilter, $[58] = saving, $[59] = searchQuery, $[60] = selectedUrl, $[61] = setStateFromParsedUrl, $[62] = t, $[63] = T0, $[64] = T1, $[65] = T2, $[66] = t11, $[67] = t12, $[68] = t13, $[69] = t14, $[70] = t15;
|
|
1381
|
+
} else T0 = $[63], T1 = $[64], T2 = $[65], t11 = $[66], t12 = $[67], t13 = $[68], t14 = $[69], t15 = $[70];
|
|
1383
1382
|
let t16;
|
|
1384
|
-
$[
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1383
|
+
$[118] !== T0 || $[119] !== t11 || $[120] !== t12 || $[121] !== t13 ? (t16 = /* @__PURE__ */ jsx(T0, {
|
|
1384
|
+
paddingY: t11,
|
|
1385
|
+
flexDirection: t12,
|
|
1386
|
+
children: t13
|
|
1387
|
+
}), $[118] = T0, $[119] = t11, $[120] = t12, $[121] = t13, $[122] = t16) : t16 = $[122];
|
|
1388
1388
|
let t17;
|
|
1389
|
-
$[
|
|
1389
|
+
$[123] !== T1 || $[124] !== t14 || $[125] !== t16 ? (t17 = /* @__PURE__ */ jsx(T1, {
|
|
1390
|
+
id: t14,
|
|
1391
|
+
children: t16
|
|
1392
|
+
}), $[123] = T1, $[124] = t14, $[125] = t16, $[126] = t17) : t17 = $[126];
|
|
1393
|
+
let t18;
|
|
1394
|
+
$[127] !== handleConfirmShareQuery || $[128] !== shareDialogQuery || $[129] !== t ? (t18 = shareDialogQuery && /* @__PURE__ */ jsx(Dialog, {
|
|
1390
1395
|
id: "vision-query-recall-share-dialog",
|
|
1391
1396
|
width: 1,
|
|
1392
1397
|
header: t("label.share"),
|
|
@@ -1415,13 +1420,13 @@ function QueryRecall(t0) {
|
|
|
1415
1420
|
children: t("save-query.share-warning")
|
|
1416
1421
|
})
|
|
1417
1422
|
})
|
|
1418
|
-
}), $[
|
|
1419
|
-
let
|
|
1420
|
-
return $[
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
] }), $[
|
|
1423
|
+
}), $[127] = handleConfirmShareQuery, $[128] = shareDialogQuery, $[129] = t, $[130] = t18) : t18 = $[130];
|
|
1424
|
+
let t19;
|
|
1425
|
+
return $[131] !== T2 || $[132] !== t15 || $[133] !== t17 || $[134] !== t18 ? (t19 = /* @__PURE__ */ jsxs(T2, { children: [
|
|
1426
|
+
t15,
|
|
1427
|
+
t17,
|
|
1428
|
+
t18
|
|
1429
|
+
] }), $[131] = T2, $[132] = t15, $[133] = t17, $[134] = t18, $[135] = t19) : t19 = $[135], t19;
|
|
1425
1430
|
}
|
|
1426
1431
|
function narrowBreakpoint() {
|
|
1427
1432
|
return typeof window < "u" && window.innerWidth > 600;
|
|
@@ -1608,7 +1613,7 @@ function PerspectivePopover() {
|
|
|
1608
1613
|
})
|
|
1609
1614
|
}), $[15] = t, $[16] = t9);
|
|
1610
1615
|
let t10;
|
|
1611
|
-
$[17] !== t8 || $[18] !== t9 ? (t10 = /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(
|
|
1616
|
+
$[17] !== t8 || $[18] !== t9 ? (t10 = /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(VStack, {
|
|
1612
1617
|
gap: 2,
|
|
1613
1618
|
children: [t8, t9]
|
|
1614
1619
|
}) }), $[17] = t8, $[18] = t9, $[19] = t10) : t10 = $[19];
|
|
@@ -1624,7 +1629,7 @@ function PerspectivePopover() {
|
|
|
1624
1629
|
children: [t12, " →"]
|
|
1625
1630
|
}) }) }), $[24] = t12, $[25] = t13);
|
|
1626
1631
|
let t14;
|
|
1627
|
-
$[26] !== t10 || $[27] !== t11 || $[28] !== t13 || $[29] !== t4 || $[30] !== t6 ? (t14 = /* @__PURE__ */ jsx(PerspectivePopoverContent, { children: /* @__PURE__ */ jsxs(
|
|
1632
|
+
$[26] !== t10 || $[27] !== t11 || $[28] !== t13 || $[29] !== t4 || $[30] !== t6 ? (t14 = /* @__PURE__ */ jsx(PerspectivePopoverContent, { children: /* @__PURE__ */ jsxs(VStack, {
|
|
1628
1633
|
gap: 4,
|
|
1629
1634
|
children: [
|
|
1630
1635
|
t4,
|
|
@@ -1727,7 +1732,7 @@ function VisionGuiHeader(t0) {
|
|
|
1727
1732
|
$[16] !== t6 || $[17] !== t8 ? (t9 = /* @__PURE__ */ jsx(Box, {
|
|
1728
1733
|
padding: 1,
|
|
1729
1734
|
gridColumn: t4,
|
|
1730
|
-
children: /* @__PURE__ */ jsxs(
|
|
1735
|
+
children: /* @__PURE__ */ jsxs(VStack, { children: [t6, t8] })
|
|
1731
1736
|
}), $[16] = t6, $[17] = t8, $[18] = t9) : t9 = $[18];
|
|
1732
1737
|
let t10;
|
|
1733
1738
|
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t10 = ["span 1 / span 1", "span 2 / span 2"], $[19] = t10) : t10 = $[19];
|
|
@@ -1778,13 +1783,13 @@ function VisionGuiHeader(t0) {
|
|
|
1778
1783
|
$[42] !== t12 || $[43] !== t21 ? (t22 = /* @__PURE__ */ jsx(Box, {
|
|
1779
1784
|
padding: 1,
|
|
1780
1785
|
gridColumn: t10,
|
|
1781
|
-
children: /* @__PURE__ */ jsxs(
|
|
1786
|
+
children: /* @__PURE__ */ jsxs(VStack, { children: [t12, t21] })
|
|
1782
1787
|
}), $[42] = t12, $[43] = t21, $[44] = t22) : t22 = $[44];
|
|
1783
1788
|
let t23;
|
|
1784
1789
|
$[45] !== customApiVersion || $[46] !== customApiVersionElementRef || $[47] !== isApiVersionLocked || $[48] !== isValidApiVersion || $[49] !== onCustomApiVersionChange || $[50] !== t ? (t23 = !isApiVersionLocked && customApiVersion !== !1 && /* @__PURE__ */ jsx(Box, {
|
|
1785
1790
|
padding: 1,
|
|
1786
1791
|
gridColumn: ["span 1 / span 1", "span 2 / span 2"],
|
|
1787
|
-
children: /* @__PURE__ */ jsxs(
|
|
1792
|
+
children: /* @__PURE__ */ jsxs(VStack, { children: [/* @__PURE__ */ jsx(Card, {
|
|
1788
1793
|
paddingTop: 2,
|
|
1789
1794
|
paddingBottom: 3,
|
|
1790
1795
|
children: /* @__PURE__ */ jsx(StyledLabel, {
|
|
@@ -1841,7 +1846,7 @@ function VisionGuiHeader(t0) {
|
|
|
1841
1846
|
$[68] !== t28 || $[69] !== t31 ? (t32 = /* @__PURE__ */ jsx(Box, {
|
|
1842
1847
|
padding: 1,
|
|
1843
1848
|
gridColumn: t24,
|
|
1844
|
-
children: /* @__PURE__ */ jsxs(
|
|
1849
|
+
children: /* @__PURE__ */ jsxs(VStack, { children: [t28, t31] })
|
|
1845
1850
|
}), $[68] = t28, $[69] = t31, $[70] = t32) : t32 = $[70];
|
|
1846
1851
|
let t33;
|
|
1847
1852
|
$[71] !== customApiVersion || $[72] !== t || $[73] !== url ? (t33 = typeof url == "string" ? /* @__PURE__ */ jsx(Box, {
|
|
@@ -1849,7 +1854,7 @@ function VisionGuiHeader(t0) {
|
|
|
1849
1854
|
flexBasis: "0%",
|
|
1850
1855
|
flexGrow: 1,
|
|
1851
1856
|
gridColumn: ["span 1 / span 1", customApiVersion === !1 ? "span 6 / span 6" : "span 4 / span 4"],
|
|
1852
|
-
children: /* @__PURE__ */ jsxs(
|
|
1857
|
+
children: /* @__PURE__ */ jsxs(VStack, { children: [/* @__PURE__ */ jsx(Card, {
|
|
1853
1858
|
paddingTop: 2,
|
|
1854
1859
|
paddingBottom: 3,
|
|
1855
1860
|
children: /* @__PURE__ */ jsxs(StyledLabel, { children: [
|
|
@@ -2035,7 +2040,7 @@ function dashLine(column, columnEnd) {
|
|
|
2035
2040
|
return `${"-".repeat(column)}${"^".repeat(columnEnd ? columnEnd - column : 1)}`;
|
|
2036
2041
|
}
|
|
2037
2042
|
function QueryErrorDialog(props) {
|
|
2038
|
-
let $ = c(
|
|
2043
|
+
let $ = c(22), { error, apiVersion, perspective, variant } = props, { t } = useTranslation(visionLocaleNamespace), T0, t0, t1, t2, t3;
|
|
2039
2044
|
if ($[0] !== apiVersion || $[1] !== error || $[2] !== perspective || $[3] !== t || $[4] !== variant) {
|
|
2040
2045
|
let unsatisfiedCapability = getUnsatisfiedApiVersionCapability({
|
|
2041
2046
|
statusCode: isHttpError(error) ? error.statusCode : void 0,
|
|
@@ -2043,29 +2048,30 @@ function QueryErrorDialog(props) {
|
|
|
2043
2048
|
perspective,
|
|
2044
2049
|
variant
|
|
2045
2050
|
});
|
|
2046
|
-
T0 =
|
|
2051
|
+
T0 = Flex, t0 = 5, t1 = 2, t2 = "column", t3 = unsatisfiedCapability ? /* @__PURE__ */ jsx(Text, {
|
|
2047
2052
|
"data-testid": "query-error-api-version-capability-hint",
|
|
2048
2053
|
size: 1,
|
|
2049
2054
|
children: t(unsatisfiedCapability.explanationKey, { apiVersion: prefixApiVersion(unsatisfiedCapability.requiredApiVersion) })
|
|
2050
|
-
}) : null, $[0] = apiVersion, $[1] = error, $[2] = perspective, $[3] = t, $[4] = variant, $[5] = T0, $[6] = t0, $[7] = t1, $[8] = t2;
|
|
2051
|
-
} else T0 = $[5], t0 = $[6], t1 = $[7], t2 = $[8];
|
|
2052
|
-
let
|
|
2053
|
-
$[
|
|
2055
|
+
}) : null, $[0] = apiVersion, $[1] = error, $[2] = perspective, $[3] = t, $[4] = variant, $[5] = T0, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3;
|
|
2056
|
+
} else T0 = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9];
|
|
2057
|
+
let t4;
|
|
2058
|
+
$[10] === error.message ? t4 = $[11] : (t4 = /* @__PURE__ */ jsx(ErrorCode, {
|
|
2054
2059
|
size: 1,
|
|
2055
2060
|
children: error.message
|
|
2056
|
-
}), $[
|
|
2057
|
-
let t4;
|
|
2058
|
-
$[11] === error ? t4 = $[12] : (t4 = /* @__PURE__ */ jsx(QueryErrorDetails, { error }), $[11] = error, $[12] = t4);
|
|
2061
|
+
}), $[10] = error.message, $[11] = t4);
|
|
2059
2062
|
let t5;
|
|
2060
|
-
|
|
2063
|
+
$[12] === error ? t5 = $[13] : (t5 = /* @__PURE__ */ jsx(QueryErrorDetails, { error }), $[12] = error, $[13] = t5);
|
|
2064
|
+
let t6;
|
|
2065
|
+
return $[14] !== T0 || $[15] !== t0 || $[16] !== t1 || $[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsxs(T0, {
|
|
2061
2066
|
gap: t0,
|
|
2062
2067
|
marginTop: t1,
|
|
2068
|
+
flexDirection: t2,
|
|
2063
2069
|
children: [
|
|
2064
|
-
t2,
|
|
2065
2070
|
t3,
|
|
2066
|
-
t4
|
|
2071
|
+
t4,
|
|
2072
|
+
t5
|
|
2067
2073
|
]
|
|
2068
|
-
}), $[
|
|
2074
|
+
}), $[14] = T0, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6) : t6 = $[21], t6;
|
|
2069
2075
|
}
|
|
2070
2076
|
var codeFamilyVar = "var(--_1rvgeh0)", codeFontSizeVar = "var(--_1rvgeh1)", codeLineHeightVar = "var(--_1rvgeh2)", resultViewWrapper = "_1rvgehc", space0Var = "var(--_1rvgeh3)", space2Var = "var(--_1rvgeh4)", space4HalfVar = "var(--_1rvgeh6)", space4Var = "var(--_1rvgeh5)", syntaxBooleanVar = "var(--_1rvgeha)", syntaxConstantVar = "var(--_1rvgeh8)", syntaxNumberVar = "var(--_1rvgehb)", syntaxPropertyVar = "var(--_1rvgeh7)", syntaxStringVar = "var(--_1rvgeh9)";
|
|
2071
2077
|
const lru = new LRU({ maxSize: 5e4 });
|
|
@@ -2907,7 +2913,7 @@ var VisionErrorBoundary = class extends Component {
|
|
|
2907
2913
|
tone: "critical",
|
|
2908
2914
|
children: /* @__PURE__ */ jsx(Container, {
|
|
2909
2915
|
size: 3,
|
|
2910
|
-
children: /* @__PURE__ */ jsxs(
|
|
2916
|
+
children: /* @__PURE__ */ jsxs(VStack, {
|
|
2911
2917
|
gap: 4,
|
|
2912
2918
|
children: [
|
|
2913
2919
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, {
|
|
@@ -2922,7 +2928,7 @@ var VisionErrorBoundary = class extends Component {
|
|
|
2922
2928
|
overflow: "auto",
|
|
2923
2929
|
padding: 4,
|
|
2924
2930
|
tone: "inherit",
|
|
2925
|
-
children: /* @__PURE__ */ jsx(
|
|
2931
|
+
children: /* @__PURE__ */ jsx(VStack, {
|
|
2926
2932
|
gap: 4,
|
|
2927
2933
|
children: message && /* @__PURE__ */ jsx(Code, {
|
|
2928
2934
|
size: 1,
|
|
@@ -2952,4 +2958,4 @@ function SanityVision(props) {
|
|
|
2952
2958
|
}
|
|
2953
2959
|
export { SanityVision as default };
|
|
2954
2960
|
|
|
2955
|
-
//# sourceMappingURL=SanityVision-
|
|
2961
|
+
//# sourceMappingURL=SanityVision-DJT-CXvq.js.map
|