@sanity/vision 5.8.0-next.52 → 5.8.0-next.53

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.
@@ -149,41 +149,16 @@ function createHighlight(theme) {
149
149
  color: c2.fg
150
150
  }]);
151
151
  }
152
- const EditorRoot = styled.div`
153
- width: 100%;
154
- box-sizing: border-box;
155
- height: 100%;
156
- overflow: hidden;
157
- overflow: clip;
158
- position: relative;
159
- display: flex;
160
-
161
- & .cm-theme {
162
- width: 100%;
163
- }
164
-
165
- & .cm-editor {
166
- height: 100%;
167
-
168
- font-size: 16px;
169
- line-height: 21px;
170
- }
171
-
172
- & .cm-line {
173
- padding-left: ${({
152
+ const EditorRoot = styled.div.withConfig({
153
+ displayName: "EditorRoot",
154
+ componentId: "sc-1e01cjn-0"
155
+ })`width:100%;box-sizing:border-box;height:100%;overflow:hidden;overflow:clip;position:relative;display:flex;& .cm-theme{width:100%;}& .cm-editor{height:100%;font-size:16px;line-height:21px;}& .cm-line{padding-left:${({
174
156
  theme
175
- }) => rem(theme.sanity.space[3])};
176
- }
177
-
178
- & .cm-content {
179
- border-right-width: ${({
157
+ }) => rem(theme.sanity.space[3])};}& .cm-content{border-right-width:${({
180
158
  theme
181
- }) => rem(theme.sanity.space[4])} !important;
182
- padding-top: ${({
159
+ }) => rem(theme.sanity.space[4])} !important;padding-top:${({
183
160
  theme
184
- }) => rem(theme.sanity.space[5])};
185
- }
186
- `, VisionCodeMirror = forwardRef((props, ref) => {
161
+ }) => rem(theme.sanity.space[5])};}`, VisionCodeMirror = forwardRef((props, ref) => {
187
162
  const $ = c(7), [initialValue] = useState(props.initialValue), sanityTheme = useTheme(), theme = useCodemirrorTheme(sanityTheme), codeMirrorRef = useRef(null);
188
163
  let t0;
189
164
  $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = (newContent) => {
@@ -328,91 +303,42 @@ function tryParseParams(val, t) {
328
303
  ${err.message.replace("JSON5:", "")}`, err;
329
304
  }
330
305
  }
331
- const Root = styled(Flex)`
332
- .sidebarPanes .Pane {
333
- overflow-y: auto;
334
- overflow-x: hidden;
335
- }
336
-
337
- & .Resizer {
338
- background: var(--card-border-color);
339
- opacity: 1;
340
- z-index: 1;
341
- box-sizing: border-box;
342
- background-clip: padding-box;
343
- border: solid transparent;
344
- }
345
-
346
- & .Resizer:hover {
347
- border-color: var(--card-shadow-ambient-color);
348
- }
349
-
350
- & .Resizer.horizontal {
351
- height: 11px;
352
- margin: -5px 0;
353
- border-width: 5px 0;
354
- cursor: row-resize;
355
- width: 100%;
356
- z-index: 4;
357
- }
358
-
359
- & .Resizer.vertical {
360
- width: 11px;
361
- margin: 0 -5px;
362
- border-width: 0 5px;
363
- cursor: col-resize;
364
- z-index: 2; /* To prevent the resizer from being hidden behind CodeMirror scroll area */
365
- }
366
-
367
- .Resizer.disabled {
368
- cursor: not-allowed;
369
- }
370
-
371
- .Resizer.disabled:hover {
372
- border-color: transparent;
373
- }
374
- `;
306
+ const Root = styled(Flex).withConfig({
307
+ displayName: "Root",
308
+ componentId: "sc-r315za-0"
309
+ })`.sidebarPanes .Pane{overflow-y:auto;overflow-x:hidden;}& .Resizer{background:var(--card-border-color);opacity:1;z-index:1;box-sizing:border-box;background-clip:padding-box;border:solid transparent;}& .Resizer:hover{border-color:var(--card-shadow-ambient-color);}& .Resizer.horizontal{height:11px;margin:-5px 0;border-width:5px 0;cursor:row-resize;width:100%;z-index:4;}& .Resizer.vertical{width:11px;margin:0 -5px;border-width:0 5px;cursor:col-resize;z-index:2;}.Resizer.disabled{cursor:not-allowed;}.Resizer.disabled:hover{border-color:transparent;}`;
375
310
  Root.displayName = "Root";
376
- const Header = styled(Card)`
377
- border-bottom: 1px solid var(--card-border-color);
378
- `, StyledLabel = styled(Label)`
379
- flex: 1;
380
- `, SplitpaneContainer = styled(Box)`
381
- position: relative;
382
- `, QueryCopyLink = styled.a`
383
- cursor: pointer;
384
- margin-right: auto;
385
- `, InputBackgroundContainer = styled(Box)`
386
- position: absolute;
387
- top: 1rem;
388
- left: 0;
389
- padding: 0;
390
- margin: 0;
391
- z-index: 10;
392
- right: 0;
393
-
394
- ${StyledLabel} {
395
- user-select: none;
396
- }
397
- `, InputBackgroundContainerLeft = styled(InputBackgroundContainer)`
398
- // This is so its aligned with the gutters of CodeMirror
399
- left: 33px;
400
- `, InputContainer = styled(Card)`
401
- width: 100%;
402
- height: 100%;
403
- position: relative;
404
- flex-direction: column;
405
- `, ResultOuterContainer = styled(Flex)`
406
- height: 100%;
407
- `, ResultInnerContainer = styled(Box)`
408
- position: relative;
409
- `, ResultContainer = styled(Card)`
410
- height: 100%;
411
- width: 100%;
412
- position: absolute;
413
- max-width: 100%;
414
-
415
- ${({
311
+ const Header = styled(Card).withConfig({
312
+ displayName: "Header",
313
+ componentId: "sc-r315za-1"
314
+ })`border-bottom:1px solid var(--card-border-color);`, StyledLabel = styled(Label).withConfig({
315
+ displayName: "StyledLabel",
316
+ componentId: "sc-r315za-2"
317
+ })`flex:1;`, SplitpaneContainer = styled(Box).withConfig({
318
+ displayName: "SplitpaneContainer",
319
+ componentId: "sc-r315za-3"
320
+ })`position:relative;`, QueryCopyLink = styled.a.withConfig({
321
+ displayName: "QueryCopyLink",
322
+ componentId: "sc-r315za-4"
323
+ })`cursor:pointer;margin-right:auto;`, InputBackgroundContainer = styled(Box).withConfig({
324
+ displayName: "InputBackgroundContainer",
325
+ componentId: "sc-r315za-5"
326
+ })`position:absolute;top:1rem;left:0;padding:0;margin:0;z-index:10;right:0;${StyledLabel}{user-select:none;}`, InputBackgroundContainerLeft = styled(InputBackgroundContainer).withConfig({
327
+ displayName: "InputBackgroundContainerLeft",
328
+ componentId: "sc-r315za-6"
329
+ })`left:33px;`, InputContainer = styled(Card).withConfig({
330
+ displayName: "InputContainer",
331
+ componentId: "sc-r315za-7"
332
+ })`width:100%;height:100%;position:relative;flex-direction:column;`, ResultOuterContainer = styled(Flex).withConfig({
333
+ displayName: "ResultOuterContainer",
334
+ componentId: "sc-r315za-8"
335
+ })`height:100%;`, ResultInnerContainer = styled(Box).withConfig({
336
+ displayName: "ResultInnerContainer",
337
+ componentId: "sc-r315za-9"
338
+ })`position:relative;`, ResultContainer = styled(Card).withConfig({
339
+ displayName: "ResultContainer",
340
+ componentId: "sc-r315za-10"
341
+ })`height:100%;width:100%;position:absolute;max-width:100%;${({
416
342
  $isInvalid
417
343
  }) => $isInvalid && css`
418
344
  &:after {
@@ -424,44 +350,37 @@ const Header = styled(Card)`
424
350
  left: 0;
425
351
  width: 100%;
426
352
  }
427
- `}
428
- `, Result = styled(Box)`
429
- position: relative;
430
- width: 100%;
431
- height: 100%;
432
- z-index: 20;
433
- `, ResultFooter = styled(Flex)`
434
- border-top: 1px solid var(--card-border-color);
435
- `, TimingsCard = styled(Card)`
436
- position: relative;
437
- `;
438
- styled(Box)`
439
- width: 100%;
440
- height: 100%;
441
- `;
442
- const TimingsTextContainer = styled(Flex)`
443
- height: 100%;
444
- min-height: ${({
353
+ `}`, Result = styled(Box).withConfig({
354
+ displayName: "Result",
355
+ componentId: "sc-r315za-11"
356
+ })`position:relative;width:100%;height:100%;z-index:20;`, ResultFooter = styled(Flex).withConfig({
357
+ displayName: "ResultFooter",
358
+ componentId: "sc-r315za-12"
359
+ })`border-top:1px solid var(--card-border-color);`, TimingsCard = styled(Card).withConfig({
360
+ displayName: "TimingsCard",
361
+ componentId: "sc-r315za-13"
362
+ })`position:relative;`;
363
+ styled(Box).withConfig({
364
+ displayName: "TimingsContainer",
365
+ componentId: "sc-r315za-14"
366
+ })`width:100%;height:100%;`;
367
+ const TimingsTextContainer = styled(Flex).withConfig({
368
+ displayName: "TimingsTextContainer",
369
+ componentId: "sc-r315za-15"
370
+ })`height:100%;min-height:${({
445
371
  theme
446
- }) => rem(theme.sanity.space[3] * 2 + theme.sanity.fonts.text.sizes[2].lineHeight - theme.sanity.fonts.text.sizes[2].ascenderHeight - theme.sanity.fonts.text.sizes[2].descenderHeight)};
447
- `, DownloadsCard = styled(Card)`
448
- position: relative;
449
- `, SaveResultLabel = styled(Text)`
450
- transform: initial;
451
- &:before,
452
- &:after {
453
- content: none;
454
- }
455
- > span {
456
- display: flex !important;
457
- gap: ${({
372
+ }) => rem(theme.sanity.space[3] * 2 + theme.sanity.fonts.text.sizes[2].lineHeight - theme.sanity.fonts.text.sizes[2].ascenderHeight - theme.sanity.fonts.text.sizes[2].descenderHeight)};`, DownloadsCard = styled(Card).withConfig({
373
+ displayName: "DownloadsCard",
374
+ componentId: "sc-r315za-16"
375
+ })`position:relative;`, SaveResultLabel = styled(Text).withConfig({
376
+ displayName: "SaveResultLabel",
377
+ componentId: "sc-r315za-17"
378
+ })`transform:initial;&:before,&:after{content:none;}> span{display:flex !important;gap:${({
458
379
  theme
459
- }) => rem(theme.sanity.space[3])};
460
- align-items: center;
461
- }
462
- `, ControlsContainer = styled(Box)`
463
- border-top: 1px solid var(--card-border-color);
464
- `, defaultValue$1 = `{
380
+ }) => rem(theme.sanity.space[3])};align-items:center;}`, ControlsContainer = styled(Box).withConfig({
381
+ displayName: "ControlsContainer",
382
+ componentId: "sc-r315za-18"
383
+ })`border-top:1px solid var(--card-border-color);`, defaultValue$1 = `{
465
384
 
466
385
  }`;
467
386
  function ParamsEditor(props) {
@@ -601,33 +520,17 @@ function useSavedQueries() {
601
520
  function _temp$5(data) {
602
521
  return data || defaultValue;
603
522
  }
604
- const FixedHeader = styled(Stack)`
605
- position: sticky;
606
- top: 0;
607
- background: ${({
523
+ const FixedHeader = styled(Stack).withConfig({
524
+ displayName: "FixedHeader",
525
+ componentId: "sc-14q7beb-0"
526
+ })`position:sticky;top:0;background:${({
608
527
  theme
609
- }) => theme.sanity.color.base.bg};
610
- z-index: 1;
611
- `, ScrollContainer = styled(Box)`
612
- height: 100%;
613
- overflow-y: auto;
614
- overflow-x: hidden;
615
-
616
- &::-webkit-scrollbar {
617
- width: 8px;
618
- }
619
-
620
- &::-webkit-scrollbar-track {
621
- background: transparent;
622
- }
623
-
624
- &::-webkit-scrollbar-thumb {
625
- background: ${({
528
+ }) => theme.sanity.color.base.bg};z-index:1;`, ScrollContainer = styled(Box).withConfig({
529
+ displayName: "ScrollContainer",
530
+ componentId: "sc-14q7beb-1"
531
+ })`height:100%;overflow-y:auto;overflow-x:hidden;&::-webkit-scrollbar{width:8px;}&::-webkit-scrollbar-track{background:transparent;}&::-webkit-scrollbar-thumb{background:${({
626
532
  theme
627
- }) => theme.sanity.color.base.border};
628
- border-radius: 4px;
629
- }
630
- `;
533
+ }) => theme.sanity.color.base.border};border-radius:4px;}`;
631
534
  function QueryRecall(t0) {
632
535
  const $ = c(80), {
633
536
  url,
@@ -937,21 +840,18 @@ function VisionGuiControls(t0) {
937
840
  let t15;
938
841
  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;
939
842
  }
940
- const PerspectivePopoverContent = styled(Box)`
941
- /* This limits the width of the popover content */
942
- max-width: 240px;
943
- `, PerspectivePopoverLink = styled.a`
944
- cursor: pointer;
945
- margin-right: auto;
946
- `, Dot = styled.div`
947
- width: 4px;
948
- height: 4px;
949
- border-radius: 3px;
950
- box-shadow: 0 0 0 1px var(--card-bg-color);
951
- background-color: ${({
843
+ const PerspectivePopoverContent = styled(Box).withConfig({
844
+ displayName: "PerspectivePopoverContent",
845
+ componentId: "sc-ls0jfp-0"
846
+ })`max-width:240px;`, PerspectivePopoverLink = styled.a.withConfig({
847
+ displayName: "PerspectivePopoverLink",
848
+ componentId: "sc-ls0jfp-1"
849
+ })`cursor:pointer;margin-right:auto;`, Dot = styled.div.withConfig({
850
+ displayName: "Dot",
851
+ componentId: "sc-y1ykk8-0"
852
+ })`width:4px;height:4px;border-radius:3px;box-shadow:0 0 0 1px var(--card-bg-color);background-color:${({
952
853
  $tone
953
- }) => `var(--card-badge-${$tone}-dot-color)`};
954
- `;
854
+ }) => `var(--card-badge-${$tone}-dot-color)`};`;
955
855
  function PerspectivePopover() {
956
856
  const $ = c(39), [open, setOpen] = useState(!1), buttonRef = useRef(null), popoverRef = useRef(null);
957
857
  let t0;
@@ -1168,11 +1068,12 @@ function getMemoizedBlobUrlResolver(mimeType, stringEncoder) {
1168
1068
  };
1169
1069
  })();
1170
1070
  }
1171
- const getJsonBlobUrl = getMemoizedBlobUrlResolver("application/json", (input) => JSON.stringify(input, null, 2)), getCsvBlobUrl = getMemoizedBlobUrlResolver("text/csv", (input) => json2csv(Array.isArray(input) ? input : [input]).trim()), ErrorCode = styled(Code)`
1172
- color: ${({
1071
+ const getJsonBlobUrl = getMemoizedBlobUrlResolver("application/json", (input) => JSON.stringify(input, null, 2)), getCsvBlobUrl = getMemoizedBlobUrlResolver("text/csv", (input) => json2csv(Array.isArray(input) ? input : [input]).trim()), ErrorCode = styled(Code).withConfig({
1072
+ displayName: "ErrorCode",
1073
+ componentId: "sc-14lyn64-0"
1074
+ })`color:${({
1173
1075
  theme
1174
- }) => theme.sanity.color.muted.critical.enabled.fg};
1175
- `;
1076
+ }) => theme.sanity.color.muted.critical.enabled.fg};`;
1176
1077
  function QueryErrorDetails(t0) {
1177
1078
  const $ = c(20), {
1178
1079
  error
@@ -1252,7 +1153,10 @@ function QueryErrorDialog(props) {
1252
1153
  t1
1253
1154
  ] }), $[4] = t0, $[5] = t1, $[6] = t2) : t2 = $[6], t2;
1254
1155
  }
1255
- const ResultViewWrapper = styled.div(({
1156
+ const ResultViewWrapper = /* @__PURE__ */ styled.div.withConfig({
1157
+ displayName: "ResultViewWrapper",
1158
+ componentId: "sc-nbqtaq-0"
1159
+ })(({
1256
1160
  theme
1257
1161
  }) => {
1258
1162
  const {