@sanity/vision 6.3.0-next.39 → 6.3.0-next.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_chunks-es/SanityVision.js +230 -254
- package/lib/_chunks-es/SanityVision.js.map +1 -1
- package/lib/bundle.css +1 -1
- package/lib/bundle.css.map +1 -1
- package/package.json +8 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useTranslation, useKeyValueStore, useClient, useCurrentUser, useDateTimeFormat, ContextMenuButton, UserAvatar, Translate, usePerspective, useDataset, useScheduledDraftsEnabled, useActiveReleases, useWorkspace, sortReleases, isCardinalityOneRelease, getReleaseIdFromReleaseDocumentId } from "sanity";
|
|
4
|
-
import { Spinner, rem, useTheme, Flex,
|
|
4
|
+
import { Spinner, rem, useTheme, Flex, Box, Label, Card, useTheme_v2, Text, Tooltip, useToast, Stack, TextInput, MenuButton, Menu, MenuItem, Code, Badge, Button, Dialog, Tab, TabList, Hotkeys, useClickOutsideEvent, Popover, Inline, Grid, Select, Container, Heading } from "@sanity/ui";
|
|
5
5
|
import { useState, useEffect, forwardRef, useRef, useImperativeHandle, Fragment, useEffectEvent, Component } from "react";
|
|
6
6
|
import { SplitPane } from "@rexxars/react-split-pane";
|
|
7
7
|
import { ErrorOutlineIcon, UsersIcon, UnpublishIcon, TrashIcon, LockIcon, AddIcon, SearchIcon, StopIcon, PlayIcon, HelpCircleIcon, CopyIcon, LinkIcon, DocumentSheetIcon, ChevronLeftIcon, ChevronRightIcon } from "@sanity/icons";
|
|
@@ -14,9 +14,9 @@ import { highlightSelectionMatches } from "@codemirror/search";
|
|
|
14
14
|
import { lineNumbers, highlightActiveLine, highlightActiveLineGutter, highlightSpecialChars, drawSelection, keymap, EditorView } from "@codemirror/view";
|
|
15
15
|
import { groq } from "@sanity/lezer-groq";
|
|
16
16
|
import CodeMirror, { EditorSelection } from "@uiw/react-codemirror";
|
|
17
|
+
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
17
18
|
import { tags } from "@lezer/highlight";
|
|
18
19
|
import { hues } from "@sanity/color";
|
|
19
|
-
import { styled, css } from "styled-components";
|
|
20
20
|
import { visionLocaleNamespace } from "./index.js";
|
|
21
21
|
import debounce from "lodash-es/debounce.js";
|
|
22
22
|
import JSON5 from "json5";
|
|
@@ -151,16 +151,32 @@ function createHighlight(theme) {
|
|
|
151
151
|
color: c2.fg
|
|
152
152
|
}]);
|
|
153
153
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
154
|
+
var contentBorderRightWidthVar = "var(--_116kdfx1)", contentPaddingTopVar = "var(--_116kdfx2)", editorRoot = "_116kdfx3", linePaddingLeftVar = "var(--_116kdfx0)";
|
|
155
|
+
function EditorRoot(t0) {
|
|
156
|
+
const $ = c(13), {
|
|
157
|
+
children
|
|
158
|
+
} = t0, {
|
|
159
|
+
sanity
|
|
160
|
+
} = useTheme();
|
|
161
|
+
let t1;
|
|
162
|
+
$[0] !== sanity.space[3] ? (t1 = rem(sanity.space[3]), $[0] = sanity.space[3], $[1] = t1) : t1 = $[1];
|
|
163
|
+
const t2 = `${t1}`;
|
|
164
|
+
let t3;
|
|
165
|
+
$[2] !== sanity.space[4] ? (t3 = rem(sanity.space[4]), $[2] = sanity.space[4], $[3] = t3) : t3 = $[3];
|
|
166
|
+
const t4 = `${t3}`;
|
|
167
|
+
let t5;
|
|
168
|
+
$[4] !== sanity.space[5] ? (t5 = rem(sanity.space[5]), $[4] = sanity.space[5], $[5] = t5) : t5 = $[5];
|
|
169
|
+
const t6 = `${t5}`;
|
|
170
|
+
let t7;
|
|
171
|
+
$[6] !== t2 || $[7] !== t4 || $[8] !== t6 ? (t7 = assignInlineVars({
|
|
172
|
+
[linePaddingLeftVar]: t2,
|
|
173
|
+
[contentBorderRightWidthVar]: t4,
|
|
174
|
+
[contentPaddingTopVar]: t6
|
|
175
|
+
}), $[6] = t2, $[7] = t4, $[8] = t6, $[9] = t7) : t7 = $[9];
|
|
176
|
+
let t8;
|
|
177
|
+
return $[10] !== children || $[11] !== t7 ? (t8 = /* @__PURE__ */ jsx("div", { className: editorRoot, style: t7, children }), $[10] = children, $[11] = t7, $[12] = t8) : t8 = $[12], t8;
|
|
178
|
+
}
|
|
179
|
+
const VisionCodeMirror = forwardRef((props, ref) => {
|
|
164
180
|
const $ = c(8), [initialValue] = useState(props.initialValue), sanityTheme = useTheme(), theme = useCodemirrorTheme(sanityTheme), codeMirrorRef = useRef(null);
|
|
165
181
|
let t0;
|
|
166
182
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = (newContent) => {
|
|
@@ -305,79 +321,123 @@ function tryParseParams(val, t) {
|
|
|
305
321
|
${err.message.replace("JSON5:", "")}`, err;
|
|
306
322
|
}
|
|
307
323
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
})
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
})
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
324
|
+
var controlsContainer = "ior2o0k", downloadsCard = "ior2o0h", header = "ior2o01", inputBackgroundContainer = "ior2o05", inputBackgroundContainerLeft = "ior2o06", inputContainer = "ior2o07", queryCopyLink = "ior2o04", result = "ior2o0c", resultContainer = "ior2o0a", resultContainerInvalid = "ior2o0b", resultFooter = "ior2o0d", resultInnerContainer = "ior2o09", resultOuterContainer = "ior2o08", root = "ior2o00", saveResultLabel = "ior2o0j", saveResultSpanGapVar = "var(--ior2o0i)", splitpaneContainer = "ior2o03", styledLabel = "ior2o02", timingsCard = "ior2o0e", timingsTextContainer = "ior2o0g", timingsTextMinHeightVar = "var(--ior2o0f)";
|
|
325
|
+
const Root = forwardRef(function(props, ref) {
|
|
326
|
+
const $ = c(3);
|
|
327
|
+
let t0;
|
|
328
|
+
return $[0] !== props || $[1] !== ref ? (t0 = /* @__PURE__ */ jsx(Flex, { ...props, ref, className: root }), $[0] = props, $[1] = ref, $[2] = t0) : t0 = $[2], t0;
|
|
329
|
+
});
|
|
330
|
+
function Header(props) {
|
|
331
|
+
const $ = c(2);
|
|
332
|
+
let t0;
|
|
333
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Card, { ...props, className: header }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
334
|
+
}
|
|
335
|
+
function StyledLabel(props) {
|
|
336
|
+
const $ = c(2);
|
|
337
|
+
let t0;
|
|
338
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Label, { ...props, className: styledLabel }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
339
|
+
}
|
|
340
|
+
function SplitpaneContainer(props) {
|
|
341
|
+
const $ = c(2);
|
|
342
|
+
let t0;
|
|
343
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Box, { ...props, className: splitpaneContainer }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
344
|
+
}
|
|
345
|
+
function QueryCopyLink(props) {
|
|
346
|
+
const $ = c(2);
|
|
347
|
+
let t0;
|
|
348
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx("a", { ...props, className: queryCopyLink }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
349
|
+
}
|
|
350
|
+
function InputBackgroundContainer(props) {
|
|
351
|
+
const $ = c(2);
|
|
352
|
+
let t0;
|
|
353
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Box, { ...props, className: inputBackgroundContainer }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
354
|
+
}
|
|
355
|
+
function InputBackgroundContainerLeft(props) {
|
|
356
|
+
const $ = c(2);
|
|
357
|
+
let t0;
|
|
358
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Box, { ...props, className: `${inputBackgroundContainer} ${inputBackgroundContainerLeft}` }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
359
|
+
}
|
|
360
|
+
function InputContainer(props) {
|
|
361
|
+
const $ = c(2);
|
|
362
|
+
let t0;
|
|
363
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Card, { ...props, className: inputContainer }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
364
|
+
}
|
|
365
|
+
function ResultOuterContainer(props) {
|
|
366
|
+
const $ = c(2);
|
|
367
|
+
let t0;
|
|
368
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Flex, { ...props, className: resultOuterContainer }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
369
|
+
}
|
|
370
|
+
function ResultInnerContainer(props) {
|
|
371
|
+
const $ = c(2);
|
|
372
|
+
let t0;
|
|
373
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Box, { ...props, className: resultInnerContainer }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
374
|
+
}
|
|
375
|
+
function ResultContainer(t0) {
|
|
376
|
+
const $ = c(6);
|
|
377
|
+
let isInvalid, props;
|
|
378
|
+
$[0] !== t0 ? ({
|
|
379
|
+
isInvalid,
|
|
380
|
+
...props
|
|
381
|
+
} = t0, $[0] = t0, $[1] = isInvalid, $[2] = props) : (isInvalid = $[1], props = $[2]);
|
|
382
|
+
const t1 = isInvalid ? `${resultContainer} ${resultContainerInvalid}` : resultContainer;
|
|
383
|
+
let t2;
|
|
384
|
+
return $[3] !== props || $[4] !== t1 ? (t2 = /* @__PURE__ */ jsx(Card, { ...props, className: t1 }), $[3] = props, $[4] = t1, $[5] = t2) : t2 = $[5], t2;
|
|
385
|
+
}
|
|
386
|
+
function Result(props) {
|
|
387
|
+
const $ = c(2);
|
|
388
|
+
let t0;
|
|
389
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Box, { ...props, className: result }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
390
|
+
}
|
|
391
|
+
function ResultFooter(props) {
|
|
392
|
+
const $ = c(2);
|
|
393
|
+
let t0;
|
|
394
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Flex, { ...props, className: resultFooter }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
395
|
+
}
|
|
396
|
+
function TimingsCard(props) {
|
|
397
|
+
const $ = c(2);
|
|
398
|
+
let t0;
|
|
399
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Card, { ...props, className: timingsCard }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
400
|
+
}
|
|
401
|
+
function TimingsTextContainer(props) {
|
|
402
|
+
const $ = c(7), {
|
|
403
|
+
space,
|
|
404
|
+
font
|
|
405
|
+
} = useTheme_v2(), textSize = font.text.sizes[2], t0 = space[3] * 2 + textSize.lineHeight - textSize.ascenderHeight - textSize.descenderHeight;
|
|
406
|
+
let t1;
|
|
407
|
+
$[0] !== t0 ? (t1 = rem(t0), $[0] = t0, $[1] = t1) : t1 = $[1];
|
|
408
|
+
const t2 = `${t1}`;
|
|
409
|
+
let t3;
|
|
410
|
+
$[2] !== t2 ? (t3 = assignInlineVars({
|
|
411
|
+
[timingsTextMinHeightVar]: t2
|
|
412
|
+
}), $[2] = t2, $[3] = t3) : t3 = $[3];
|
|
413
|
+
let t4;
|
|
414
|
+
return $[4] !== props || $[5] !== t3 ? (t4 = /* @__PURE__ */ jsx(Flex, { ...props, className: timingsTextContainer, style: t3 }), $[4] = props, $[5] = t3, $[6] = t4) : t4 = $[6], t4;
|
|
415
|
+
}
|
|
416
|
+
function DownloadsCard(props) {
|
|
417
|
+
const $ = c(2);
|
|
418
|
+
let t0;
|
|
419
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Card, { ...props, className: downloadsCard }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
420
|
+
}
|
|
421
|
+
function SaveResultLabel(props) {
|
|
422
|
+
const $ = c(7), {
|
|
423
|
+
space
|
|
424
|
+
} = useTheme_v2();
|
|
425
|
+
let t0;
|
|
426
|
+
$[0] !== space[3] ? (t0 = rem(space[3]), $[0] = space[3], $[1] = t0) : t0 = $[1];
|
|
427
|
+
const t1 = `${t0}`;
|
|
428
|
+
let t2;
|
|
429
|
+
$[2] !== t1 ? (t2 = assignInlineVars({
|
|
430
|
+
[saveResultSpanGapVar]: t1
|
|
431
|
+
}), $[2] = t1, $[3] = t2) : t2 = $[3];
|
|
432
|
+
let t3;
|
|
433
|
+
return $[4] !== props || $[5] !== t2 ? (t3 = /* @__PURE__ */ jsx(Text, { ...props, className: saveResultLabel, style: t2 }), $[4] = props, $[5] = t2, $[6] = t3) : t3 = $[6], t3;
|
|
434
|
+
}
|
|
435
|
+
function ControlsContainer(props) {
|
|
436
|
+
const $ = c(2);
|
|
437
|
+
let t0;
|
|
438
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Box, { ...props, className: controlsContainer }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
439
|
+
}
|
|
440
|
+
const defaultValue$1 = `{
|
|
381
441
|
|
|
382
442
|
}`;
|
|
383
443
|
function ParamsEditor(props) {
|
|
@@ -633,15 +693,17 @@ function _temp2$4(a, b) {
|
|
|
633
693
|
function _temp$5(data) {
|
|
634
694
|
return data || defaultValue;
|
|
635
695
|
}
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
696
|
+
var fixedHeader = "_15lckbo0", scrollContainer = "_15lckbo1";
|
|
697
|
+
function FixedHeader(props) {
|
|
698
|
+
const $ = c(2);
|
|
699
|
+
let t0;
|
|
700
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Stack, { ...props, className: fixedHeader }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
701
|
+
}
|
|
702
|
+
function ScrollContainer(props) {
|
|
703
|
+
const $ = c(2);
|
|
704
|
+
let t0;
|
|
705
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Box, { ...props, className: scrollContainer }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
706
|
+
}
|
|
645
707
|
function QueryRecall(t0) {
|
|
646
708
|
const $ = c(130), {
|
|
647
709
|
url,
|
|
@@ -1165,18 +1227,26 @@ function VisionGuiControls(t0) {
|
|
|
1165
1227
|
let t15;
|
|
1166
1228
|
return $[26] !== hasValidParams || $[27] !== t14 || $[28] !== t2 ? (t15 = /* @__PURE__ */ jsx(ControlsContainer, { children: /* @__PURE__ */ jsx(Card, { padding: 3, paddingX: 3, children: /* @__PURE__ */ jsx(Tooltip, { content: t2, placement: "top", disabled: hasValidParams, portal: !0, children: t14 }) }) }), $[26] = hasValidParams, $[27] = t14, $[28] = t2, $[29] = t15) : t15 = $[29], t15;
|
|
1167
1229
|
}
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
})
|
|
1178
|
-
|
|
1179
|
-
|
|
1230
|
+
var dot = "_1i6jn8t2", perspectivePopoverContent = "_1i6jn8t0", perspectivePopoverLink = "_1i6jn8t1";
|
|
1231
|
+
function PerspectivePopoverContent(props) {
|
|
1232
|
+
const $ = c(2);
|
|
1233
|
+
let t0;
|
|
1234
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Box, { ...props, className: perspectivePopoverContent }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
1235
|
+
}
|
|
1236
|
+
function PerspectivePopoverLink(props) {
|
|
1237
|
+
const $ = c(2);
|
|
1238
|
+
let t0;
|
|
1239
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx("a", { ...props, className: perspectivePopoverLink }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
1240
|
+
}
|
|
1241
|
+
function Dot(t0) {
|
|
1242
|
+
const $ = c(2), {
|
|
1243
|
+
tone
|
|
1244
|
+
} = t0, t1 = `var(--card-badge-${tone}-dot-color)`;
|
|
1245
|
+
let t2;
|
|
1246
|
+
return $[0] !== t1 ? (t2 = /* @__PURE__ */ jsx("div", { className: dot, style: {
|
|
1247
|
+
backgroundColor: t1
|
|
1248
|
+
} }), $[0] = t1, $[1] = t2) : t2 = $[1], t2;
|
|
1249
|
+
}
|
|
1180
1250
|
function PerspectivePopover() {
|
|
1181
1251
|
const $ = c(39), [open, setOpen] = useState(!1), buttonRef = useRef(null), popoverRef = useRef(null);
|
|
1182
1252
|
let t0;
|
|
@@ -1210,7 +1280,7 @@ function PerspectivePopover() {
|
|
|
1210
1280
|
let t12;
|
|
1211
1281
|
$[22] !== t ? (t12 = t("settings.perspectives.action.docs-link"), $[22] = t, $[23] = t12) : t12 = $[23];
|
|
1212
1282
|
let t13;
|
|
1213
|
-
$[24] !== t12 ? (t13 = /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsxs(PerspectivePopoverLink, { href: "https://www.sanity.io/docs/perspectives", target: "_blank", children: [
|
|
1283
|
+
$[24] !== t12 ? (t13 = /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsxs(PerspectivePopoverLink, { href: "https://www.sanity.io/docs/perspectives", target: "_blank", rel: "noopener noreferrer", children: [
|
|
1214
1284
|
t12,
|
|
1215
1285
|
" \u2192"
|
|
1216
1286
|
] }) }) }), $[24] = t12, $[25] = t13) : t13 = $[25];
|
|
@@ -1223,7 +1293,7 @@ function PerspectivePopover() {
|
|
|
1223
1293
|
t13
|
|
1224
1294
|
] }) }), $[26] = t10, $[27] = t11, $[28] = t13, $[29] = t4, $[30] = t6, $[31] = t14) : t14 = $[31];
|
|
1225
1295
|
let t15;
|
|
1226
|
-
$[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t15 = /* @__PURE__ */ jsx(Dot, {
|
|
1296
|
+
$[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t15 = /* @__PURE__ */ jsx(Dot, { tone: "primary" }), $[32] = t15) : t15 = $[32];
|
|
1227
1297
|
let t16;
|
|
1228
1298
|
$[33] !== open ? (t16 = /* @__PURE__ */ jsx(Button, { icon: HelpCircleIcon, mode: "bleed", padding: 2, paddingRight: 1, tone: "primary", fontSize: 1, ref: buttonRef, onClick: handleClick, selected: open, children: t15 }), $[33] = open, $[34] = t16) : t16 = $[34];
|
|
1229
1299
|
let t17;
|
|
@@ -1355,7 +1425,9 @@ function VisionGuiHeader(t0) {
|
|
|
1355
1425
|
/* @__PURE__ */ jsx(Card, { paddingTop: 2, paddingBottom: 3, children: /* @__PURE__ */ jsxs(StyledLabel, { children: [
|
|
1356
1426
|
t("query.url"),
|
|
1357
1427
|
"\xA0",
|
|
1358
|
-
/* @__PURE__ */ jsxs(QueryCopyLink, {
|
|
1428
|
+
/* @__PURE__ */ jsxs(QueryCopyLink, { href: url, onClick: (event) => {
|
|
1429
|
+
event.preventDefault(), handleCopyUrl();
|
|
1430
|
+
}, children: [
|
|
1359
1431
|
"[",
|
|
1360
1432
|
t("action.copy-url-to-clipboard"),
|
|
1361
1433
|
"]"
|
|
@@ -1399,12 +1471,13 @@ function getMemoizedBlobUrlResolver(mimeType, stringEncoder) {
|
|
|
1399
1471
|
};
|
|
1400
1472
|
})();
|
|
1401
1473
|
}
|
|
1402
|
-
const getJsonBlobUrl = getMemoizedBlobUrlResolver("application/json", (input) => JSON.stringify(input, null, 2)), getCsvBlobUrl = getMemoizedBlobUrlResolver("text/csv", (input) => json2csv(Array.isArray(input) ? input : [input]).trim())
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
})
|
|
1474
|
+
const getJsonBlobUrl = getMemoizedBlobUrlResolver("application/json", (input) => JSON.stringify(input, null, 2)), getCsvBlobUrl = getMemoizedBlobUrlResolver("text/csv", (input) => json2csv(Array.isArray(input) ? input : [input]).trim());
|
|
1475
|
+
var errorCode = "vgszcp0";
|
|
1476
|
+
function ErrorCode(props) {
|
|
1477
|
+
const $ = c(2);
|
|
1478
|
+
let t0;
|
|
1479
|
+
return $[0] !== props ? (t0 = /* @__PURE__ */ jsx(Code, { ...props, className: errorCode }), $[0] = props, $[1] = t0) : t0 = $[1], t0;
|
|
1480
|
+
}
|
|
1408
1481
|
function QueryErrorDetails(t0) {
|
|
1409
1482
|
const $ = c(20), {
|
|
1410
1483
|
error
|
|
@@ -1484,145 +1557,48 @@ function QueryErrorDialog(props) {
|
|
|
1484
1557
|
t1
|
|
1485
1558
|
] }), $[4] = t0, $[5] = t1, $[6] = t2) : t2 = $[6], t2;
|
|
1486
1559
|
}
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
componentId: "sc-nbqtaq-0"
|
|
1490
|
-
})(({
|
|
1491
|
-
theme
|
|
1492
|
-
}) => {
|
|
1493
|
-
const {
|
|
1494
|
-
color,
|
|
1495
|
-
fonts,
|
|
1496
|
-
space
|
|
1497
|
-
} = theme.sanity;
|
|
1498
|
-
return css`
|
|
1499
|
-
& .json-inspector,
|
|
1500
|
-
& .json-inspector .json-inspector__selection {
|
|
1501
|
-
font-family: ${fonts.code.family};
|
|
1502
|
-
font-size: ${fonts.code.sizes[2].fontSize}px;
|
|
1503
|
-
line-height: ${fonts.code.sizes[2].lineHeight}px;
|
|
1504
|
-
color: var(--card-code-fg-color);
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
& .json-inspector .json-inspector__leaf {
|
|
1508
|
-
padding-left: ${rem(space[4])};
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
& .json-inspector .json-inspector__leaf.json-inspector__leaf_root {
|
|
1512
|
-
padding-top: ${rem(space[0])};
|
|
1513
|
-
padding-left: 0;
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
& .json-inspector > .json-inspector__leaf_root > .json-inspector__line > .json-inspector__key {
|
|
1517
|
-
display: none;
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
& .json-inspector .json-inspector__line {
|
|
1521
|
-
display: block;
|
|
1522
|
-
position: relative;
|
|
1523
|
-
cursor: default;
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
& .json-inspector .json-inspector__line::after {
|
|
1527
|
-
content: '';
|
|
1528
|
-
position: absolute;
|
|
1529
|
-
top: 0;
|
|
1530
|
-
left: -200px;
|
|
1531
|
-
right: -50px;
|
|
1532
|
-
bottom: 0;
|
|
1533
|
-
z-index: -1;
|
|
1534
|
-
pointer-events: none;
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
& .json-inspector .json-inspector__line:hover::after {
|
|
1538
|
-
background: var(--card-code-bg-color);
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
& .json-inspector .json-inspector__leaf_composite > .json-inspector__line {
|
|
1542
|
-
cursor: pointer;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
& .json-inspector .json-inspector__leaf_composite > .json-inspector__line::before {
|
|
1546
|
-
content: '▸ ';
|
|
1547
|
-
margin-left: calc(0px - ${rem(space[4])});
|
|
1548
|
-
font-size: ${fonts.code.sizes[2].fontSize}px;
|
|
1549
|
-
line-height: ${fonts.code.sizes[2].lineHeight}px;
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
&
|
|
1553
|
-
.json-inspector
|
|
1554
|
-
.json-inspector__leaf_expanded.json-inspector__leaf_composite
|
|
1555
|
-
> .json-inspector__line::before {
|
|
1556
|
-
content: '▾ ';
|
|
1557
|
-
font-size: ${fonts.code.sizes[2].fontSize}px;
|
|
1558
|
-
line-height: ${fonts.code.sizes[2].lineHeight}px;
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
& .json-inspector .json-inspector__radio,
|
|
1562
|
-
& .json-inspector .json-inspector__flatpath {
|
|
1563
|
-
display: none;
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
& .json-inspector .json-inspector__value {
|
|
1567
|
-
margin-left: ${rem(space[4] / 2)};
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
&
|
|
1571
|
-
.json-inspector
|
|
1572
|
-
> .json-inspector__leaf_root
|
|
1573
|
-
> .json-inspector__line
|
|
1574
|
-
> .json-inspector__key
|
|
1575
|
-
+ .json-inspector__value {
|
|
1576
|
-
margin: 0;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
& .json-inspector .json-inspector__key {
|
|
1580
|
-
color: ${color.syntax.property};
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
& .json-inspector .json-inspector__value_helper,
|
|
1584
|
-
& .json-inspector .json-inspector__value_null {
|
|
1585
|
-
color: ${color.syntax.constant};
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
& .json-inspector .json-inspector__not-found {
|
|
1589
|
-
padding-top: ${rem(space[2])};
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
& .json-inspector .json-inspector__value_string {
|
|
1593
|
-
color: ${color.syntax.string};
|
|
1594
|
-
word-break: break-word;
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
& .json-inspector .json-inspector__value_boolean {
|
|
1598
|
-
color: ${color.syntax.boolean};
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
& .json-inspector .json-inspector__value_number {
|
|
1602
|
-
color: ${color.syntax.number};
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
& .json-inspector .json-inspector__show-original {
|
|
1606
|
-
display: inline-block;
|
|
1607
|
-
padding: 0 6px;
|
|
1608
|
-
cursor: pointer;
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
& .json-inspector .json-inspector__show-original:hover {
|
|
1612
|
-
color: inherit;
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
|
-
& .json-inspector .json-inspector__show-original::before {
|
|
1616
|
-
content: '↔';
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
& .json-inspector .json-inspector__show-original:hover::after {
|
|
1620
|
-
content: ' expand';
|
|
1621
|
-
}
|
|
1622
|
-
`;
|
|
1623
|
-
}), lru = new LRU({
|
|
1560
|
+
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)";
|
|
1561
|
+
const lru = new LRU({
|
|
1624
1562
|
maxSize: 5e4
|
|
1625
1563
|
});
|
|
1564
|
+
function ResultViewWrapper(t0) {
|
|
1565
|
+
const $ = c(24), {
|
|
1566
|
+
children
|
|
1567
|
+
} = t0, {
|
|
1568
|
+
color,
|
|
1569
|
+
font,
|
|
1570
|
+
space
|
|
1571
|
+
} = useTheme_v2(), codeSize = font.code.sizes[2], t1 = font.code.family, t2 = `${codeSize.fontSize}px`, t3 = `${codeSize.lineHeight}px`;
|
|
1572
|
+
let t4;
|
|
1573
|
+
$[0] !== space[0] ? (t4 = rem(space[0]), $[0] = space[0], $[1] = t4) : t4 = $[1];
|
|
1574
|
+
const t5 = `${t4}`;
|
|
1575
|
+
let t6;
|
|
1576
|
+
$[2] !== space[2] ? (t6 = rem(space[2]), $[2] = space[2], $[3] = t6) : t6 = $[3];
|
|
1577
|
+
const t7 = `${t6}`;
|
|
1578
|
+
let t8;
|
|
1579
|
+
$[4] !== space[4] ? (t8 = rem(space[4]), $[4] = space[4], $[5] = t8) : t8 = $[5];
|
|
1580
|
+
const t9 = `${t8}`, t10 = space[4] / 2;
|
|
1581
|
+
let t11;
|
|
1582
|
+
$[6] !== t10 ? (t11 = rem(t10), $[6] = t10, $[7] = t11) : t11 = $[7];
|
|
1583
|
+
const t12 = `${t11}`;
|
|
1584
|
+
let t13;
|
|
1585
|
+
$[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 = assignInlineVars({
|
|
1586
|
+
[codeFamilyVar]: t1,
|
|
1587
|
+
[codeFontSizeVar]: t2,
|
|
1588
|
+
[codeLineHeightVar]: t3,
|
|
1589
|
+
[space0Var]: t5,
|
|
1590
|
+
[space2Var]: t7,
|
|
1591
|
+
[space4Var]: t9,
|
|
1592
|
+
[space4HalfVar]: t12,
|
|
1593
|
+
[syntaxPropertyVar]: color.syntax.property,
|
|
1594
|
+
[syntaxConstantVar]: color.syntax.constant,
|
|
1595
|
+
[syntaxStringVar]: color.syntax.string,
|
|
1596
|
+
[syntaxBooleanVar]: color.syntax.boolean,
|
|
1597
|
+
[syntaxNumberVar]: color.syntax.number
|
|
1598
|
+
}), $[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];
|
|
1599
|
+
let t14;
|
|
1600
|
+
return $[21] !== children || $[22] !== t13 ? (t14 = /* @__PURE__ */ jsx("div", { className: resultViewWrapper, style: t13, children }), $[21] = children, $[22] = t13, $[23] = t14) : t14 = $[23], t14;
|
|
1601
|
+
}
|
|
1626
1602
|
function ResultView(props) {
|
|
1627
1603
|
const $ = c(7), {
|
|
1628
1604
|
data,
|
|
@@ -1738,7 +1714,7 @@ function VisionGuiResult(t0) {
|
|
|
1738
1714
|
t12
|
|
1739
1715
|
] }), $[29] = t12, $[30] = t7, $[31] = t13) : t13 = $[31];
|
|
1740
1716
|
let t14;
|
|
1741
|
-
$[32] !== t13 || $[33] !== t4 || $[34] !== t5 ? (t14 = /* @__PURE__ */ jsx(ResultInnerContainer, { flex: 1, children: /* @__PURE__ */ jsx(ResultContainer, { flex: 1, overflow: "hidden", tone: t4,
|
|
1717
|
+
$[32] !== t13 || $[33] !== t4 || $[34] !== t5 ? (t14 = /* @__PURE__ */ jsx(ResultInnerContainer, { flex: 1, children: /* @__PURE__ */ jsx(ResultContainer, { flex: 1, overflow: "hidden", tone: t4, isInvalid: t5, children: t13 }) }), $[32] = t13, $[33] = t4, $[34] = t5, $[35] = t14) : t14 = $[35];
|
|
1742
1718
|
const t15 = compactFooter ? "flex-start" : "space-between", t16 = compactFooter ? "stretch" : void 0;
|
|
1743
1719
|
let t17;
|
|
1744
1720
|
$[36] !== compactFooter ? (t17 = compactFooter ? "column" : ["column", "column", "row"], $[36] = compactFooter, $[37] = t17) : t17 = $[37];
|
|
@@ -2224,7 +2200,7 @@ function useDatasets(t0) {
|
|
|
2224
2200
|
let t2;
|
|
2225
2201
|
if ($[2] !== client.observable.datasets || $[3] !== configDatasets) {
|
|
2226
2202
|
let t3;
|
|
2227
|
-
$[5] !== configDatasets ? (t3 = (
|
|
2203
|
+
$[5] !== configDatasets ? (t3 = (result2) => typeof configDatasets == "function" ? configDatasets(result2).map(_temp) : result2.map(_temp2), $[5] = configDatasets, $[6] = t3) : t3 = $[6], t2 = client.observable.datasets.list().pipe(map$1(t3), catchError(_temp3)), $[2] = client.observable.datasets, $[3] = configDatasets, $[4] = t2;
|
|
2228
2204
|
} else
|
|
2229
2205
|
t2 = $[4];
|
|
2230
2206
|
t1 = t2;
|