@tanstack/query-devtools 5.0.0-beta.34 → 5.0.0-beta.37

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/src/Devtools.tsx CHANGED
@@ -15,6 +15,7 @@ import { TransitionGroup } from 'solid-transition-group'
15
15
  import { Key } from '@solid-primitives/keyed'
16
16
  import { createLocalStorage } from '@solid-primitives/storage'
17
17
  import { createResizeObserver } from '@solid-primitives/resize-observer'
18
+ import { DropdownMenu } from '@kobalte/core'
18
19
  import { tokens } from './theme'
19
20
  import {
20
21
  convertRemToPixels,
@@ -27,12 +28,15 @@ import {
27
28
  } from './utils'
28
29
  import {
29
30
  ArrowDown,
31
+ ArrowLeft,
32
+ ArrowRight,
30
33
  ArrowUp,
31
34
  ChevronDown,
32
35
  Offline,
33
36
  Search,
34
37
  Settings,
35
38
  TanstackLogo,
39
+ Trash,
36
40
  Wifi,
37
41
  } from './icons'
38
42
  import Explorer from './Explorer'
@@ -202,7 +206,6 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
202
206
  ) as () => 1 | -1
203
207
 
204
208
  const [offline, setOffline] = createSignal(false)
205
- const [settingsOpen, setSettingsOpen] = createSignal(false)
206
209
 
207
210
  const position = createMemo(
208
211
  () =>
@@ -322,7 +325,6 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
322
325
 
323
326
  const setDevtoolsPosition = (pos: DevtoolsPosition) => {
324
327
  props.setLocalStore('position', pos)
325
- setSettingsOpen(false)
326
328
  }
327
329
 
328
330
  createEffect(() => {
@@ -519,6 +521,20 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
519
521
  </div>
520
522
 
521
523
  <div class={cx(styles.actionsContainer, 'tsqd-actions-container')}>
524
+ <button
525
+ onClick={() => {
526
+ cache().clear()
527
+ }}
528
+ class={cx(
529
+ styles.actionsBtn,
530
+ 'tsqd-actions-btn',
531
+ 'tsqd-action-clear-cache',
532
+ )}
533
+ aria-label="Clear query cache"
534
+ title="Clear query cache"
535
+ >
536
+ <Trash />
537
+ </button>
522
538
  <button
523
539
  onClick={() => {
524
540
  if (offline()) {
@@ -540,32 +556,27 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
540
556
  : 'Mock offline behavior'
541
557
  }`}
542
558
  aria-pressed={offline()}
559
+ title={`${
560
+ offline()
561
+ ? 'Unset offline mocking behavior'
562
+ : 'Mock offline behavior'
563
+ }`}
543
564
  >
544
565
  {offline() ? <Offline /> : <Wifi />}
545
566
  </button>
546
- <div style={{ position: 'relative' }}>
547
- <button
548
- onClick={() => setSettingsOpen((prev) => !prev)}
567
+
568
+ <DropdownMenu.Root gutter={4}>
569
+ <DropdownMenu.Trigger
549
570
  class={cx(
550
571
  styles.actionsBtn,
551
572
  'tsqd-actions-btn',
552
573
  'tsqd-action-settings',
553
574
  )}
554
- id="tsqd-settings-menu-btn"
555
- aria-label={`${
556
- settingsOpen() ? 'Close' : 'Open'
557
- } settings menu`}
558
- aria-haspopup="true"
559
- aria-controls="tsqd-settings-menu"
560
575
  >
561
576
  <Settings />
562
- </button>
563
- <Show when={settingsOpen()}>
564
- <div
565
- role="menu"
566
- tabindex="-1"
567
- aria-labelledby="tsqd-settings-menu-btn"
568
- id="tsqd-settings-menu"
577
+ </DropdownMenu.Trigger>
578
+ <DropdownMenu.Portal>
579
+ <DropdownMenu.Content
569
580
  class={cx(styles.settingsMenu, 'tsqd-settings-menu')}
570
581
  >
571
582
  <div
@@ -574,58 +585,85 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
574
585
  'tsqd-settings-menu-header',
575
586
  )}
576
587
  >
577
- Position
588
+ Settings
578
589
  </div>
579
- <div
580
- class={cx(
581
- styles.settingsMenuSection,
582
- 'tsqd-settings-menu-section',
583
- )}
584
- >
585
- <button
586
- onClick={() => {
587
- setDevtoolsPosition('top')
588
- }}
589
- aria-label="Position top"
590
- class="tsqd-settings-menu-position-btn tsqd-settings-menu-position-btn-top"
591
- >
592
- <ArrowUp />
593
- <span>Top</span>
594
- </button>
595
- <button
596
- onClick={() => {
597
- setDevtoolsPosition('bottom')
598
- }}
599
- aria-label="Position bottom"
600
- class="tsqd-settings-menu-position-btn tsqd-settings-menu-position-btn-bottom"
601
- >
602
- <ArrowDown />
603
- <span>Bottom</span>
604
- </button>
605
- <button
606
- onClick={() => {
607
- setDevtoolsPosition('left')
608
- }}
609
- aria-label="Position left"
610
- class="tsqd-settings-menu-position-btn tsqd-settings-menu-position-btn-left"
590
+ <DropdownMenu.Sub overlap gutter={8} shift={-4}>
591
+ <DropdownMenu.SubTrigger
592
+ class={cx(
593
+ styles.settingsSubTrigger,
594
+ 'tsqd-settings-menu-sub-trigger',
595
+ 'tsqd-settings-menu-sub-trigger-position',
596
+ )}
611
597
  >
612
- <ArrowDown />
613
- <span>Left</span>
614
- </button>
615
- <button
616
- onClick={() => {
617
- setDevtoolsPosition('right')
618
- }}
619
- aria-label="Position right"
620
- class="tsqd-settings-menu-position-btn tsqd-settings-menu-position-btn-right"
621
- >
622
- <ArrowDown />
623
- <span>Right</span>
624
- </button>
625
- </div>
626
- </div>
627
- </Show>
628
- </div>
598
+ <span>Position</span>
599
+ <ChevronDown />
600
+ </DropdownMenu.SubTrigger>
601
+ <DropdownMenu.Portal>
602
+ <DropdownMenu.SubContent
603
+ class={cx(styles.settingsMenu, 'tsqd-settings-submenu')}
604
+ >
605
+ <DropdownMenu.Item
606
+ onSelect={() => {
607
+ setDevtoolsPosition('top')
608
+ }}
609
+ as="button"
610
+ class={cx(
611
+ styles.settingsSubButton,
612
+ 'tsqd-settings-menu-position-btn',
613
+ 'tsqd-settings-menu-position-btn-top',
614
+ )}
615
+ >
616
+ <span>Top</span>
617
+ <ArrowUp />
618
+ </DropdownMenu.Item>
619
+ <DropdownMenu.Item
620
+ onSelect={() => {
621
+ setDevtoolsPosition('bottom')
622
+ }}
623
+ as="button"
624
+ class={cx(
625
+ styles.settingsSubButton,
626
+ 'tsqd-settings-menu-position-btn',
627
+ 'tsqd-settings-menu-position-btn-bottom',
628
+ )}
629
+ >
630
+ <span>Bottom</span>
631
+ <ArrowDown />
632
+ </DropdownMenu.Item>
633
+ <DropdownMenu.Item
634
+ onSelect={() => {
635
+ setDevtoolsPosition('left')
636
+ }}
637
+ as="button"
638
+ class={cx(
639
+ styles.settingsSubButton,
640
+ 'tsqd-settings-menu-position-btn',
641
+ 'tsqd-settings-menu-position-btn-left',
642
+ )}
643
+ >
644
+ <span>Left</span>
645
+ <ArrowLeft />
646
+ </DropdownMenu.Item>
647
+ <DropdownMenu.Item
648
+ onSelect={() => {
649
+ setDevtoolsPosition('right')
650
+ }}
651
+ as="button"
652
+ class={cx(
653
+ styles.settingsSubButton,
654
+ 'tsqd-settings-menu-position-btn',
655
+ 'tsqd-settings-menu-position-btn-right',
656
+ )}
657
+ >
658
+ <span>Right</span>
659
+ <ArrowRight />
660
+ </DropdownMenu.Item>
661
+ </DropdownMenu.SubContent>
662
+ </DropdownMenu.Portal>
663
+ </DropdownMenu.Sub>
664
+ </DropdownMenu.Content>
665
+ </DropdownMenu.Portal>
666
+ </DropdownMenu.Root>
629
667
  </div>
630
668
  </div>
631
669
  <div
@@ -847,8 +885,8 @@ export const QueryStatus: Component<QueryStatusProps> = (props) => {
847
885
  <span
848
886
  class={cx(
849
887
  css`
850
- width: ${tokens.size[2]};
851
- height: ${tokens.size[2]};
888
+ width: ${tokens.size[1.5]};
889
+ height: ${tokens.size[1.5]};
852
890
  border-radius: ${tokens.border.radius.full};
853
891
  background-color: ${tokens.colors[props.color][500]};
854
892
  `,
@@ -856,7 +894,11 @@ export const QueryStatus: Component<QueryStatusProps> = (props) => {
856
894
  )}
857
895
  />
858
896
  <Show when={showLabel()}>
859
- <span class="tsqd-query-status-tag-label">{props.label}</span>
897
+ <span
898
+ class={cx(styles.queryStatusTagLabel, 'tsqd-query-status-tag-label')}
899
+ >
900
+ {props.label}
901
+ </span>
860
902
  </Show>
861
903
  <span
862
904
  class={cx(
@@ -1088,6 +1130,27 @@ const QueryDetails = () => {
1088
1130
  ></span>
1089
1131
  Reset
1090
1132
  </button>
1133
+ <button
1134
+ class={cx(
1135
+ css`
1136
+ color: ${tokens.colors.pink[400]};
1137
+ `,
1138
+ 'tsqd-query-details-actions-btn',
1139
+ 'tsqd-query-details-action-remove',
1140
+ )}
1141
+ onClick={() => {
1142
+ queryClient.removeQueries(activeQuery())
1143
+ setSelectedQueryHash(null)
1144
+ }}
1145
+ disabled={statusLabel() === 'fetching'}
1146
+ >
1147
+ <span
1148
+ class={css`
1149
+ background-color: ${tokens.colors.pink[400]};
1150
+ `}
1151
+ ></span>
1152
+ Remove
1153
+ </button>
1091
1154
  <button
1092
1155
  class={cx(
1093
1156
  css`
@@ -1416,10 +1479,14 @@ const getStyles = () => {
1416
1479
  &:focus-visible {
1417
1480
  outline: 2px solid ${colors.blue[600]};
1418
1481
  }
1482
+ & svg {
1483
+ width: ${size[2]};
1484
+ height: ${size[2]};
1485
+ }
1419
1486
  `,
1420
1487
  'closeBtn-position-top': css`
1421
1488
  bottom: 0;
1422
- right: ${size[3]};
1489
+ right: ${size[2]};
1423
1490
  transform: translate(0, 100%);
1424
1491
  background-color: ${colors.darkGray[700]};
1425
1492
  border-right: ${colors.darkGray[300]} 1px solid;
@@ -1427,7 +1494,7 @@ const getStyles = () => {
1427
1494
  border-top: none;
1428
1495
  border-bottom: ${colors.darkGray[300]} 1px solid;
1429
1496
  border-radius: 0px 0px ${border.radius.sm} ${border.radius.sm};
1430
- padding: ${size[1.5]} ${size[2.5]} ${size[2]} ${size[2.5]};
1497
+ padding: ${size[0.5]} ${size[1.5]} ${size[1]} ${size[1.5]};
1431
1498
 
1432
1499
  &::after {
1433
1500
  content: ' ';
@@ -1444,7 +1511,7 @@ const getStyles = () => {
1444
1511
  `,
1445
1512
  'closeBtn-position-bottom': css`
1446
1513
  top: 0;
1447
- right: ${size[3]};
1514
+ right: ${size[2]};
1448
1515
  transform: translate(0, -100%);
1449
1516
  background-color: ${colors.darkGray[700]};
1450
1517
  border-right: ${colors.darkGray[300]} 1px solid;
@@ -1452,7 +1519,7 @@ const getStyles = () => {
1452
1519
  border-top: ${colors.darkGray[300]} 1px solid;
1453
1520
  border-bottom: none;
1454
1521
  border-radius: ${border.radius.sm} ${border.radius.sm} 0px 0px;
1455
- padding: ${size[2]} ${size[2.5]} ${size[1.5]} ${size[2.5]};
1522
+ padding: ${size[1]} ${size[1.5]} ${size[0.5]} ${size[1.5]};
1456
1523
 
1457
1524
  &::after {
1458
1525
  content: ' ';
@@ -1464,7 +1531,7 @@ const getStyles = () => {
1464
1531
  }
1465
1532
  `,
1466
1533
  'closeBtn-position-right': css`
1467
- bottom: ${size[3]};
1534
+ bottom: ${size[2]};
1468
1535
  left: 0;
1469
1536
  transform: translate(-100%, 0);
1470
1537
  background-color: ${colors.darkGray[700]};
@@ -1473,7 +1540,7 @@ const getStyles = () => {
1473
1540
  border-top: ${colors.darkGray[300]} 1px solid;
1474
1541
  border-bottom: ${colors.darkGray[300]} 1px solid;
1475
1542
  border-radius: ${border.radius.sm} 0px 0px ${border.radius.sm};
1476
- padding: ${size[2.5]} ${size[1]} ${size[2.5]} ${size[1.5]};
1543
+ padding: ${size[1.5]} ${size[0.5]} ${size[1.5]} ${size[1]};
1477
1544
 
1478
1545
  &::after {
1479
1546
  content: ' ';
@@ -1488,7 +1555,7 @@ const getStyles = () => {
1488
1555
  }
1489
1556
  `,
1490
1557
  'closeBtn-position-left': css`
1491
- bottom: ${size[3]};
1558
+ bottom: ${size[2]};
1492
1559
  right: 0;
1493
1560
  transform: translate(100%, 0);
1494
1561
  background-color: ${colors.darkGray[700]};
@@ -1497,7 +1564,7 @@ const getStyles = () => {
1497
1564
  border-top: ${colors.darkGray[300]} 1px solid;
1498
1565
  border-bottom: ${colors.darkGray[300]} 1px solid;
1499
1566
  border-radius: 0px ${border.radius.sm} ${border.radius.sm} 0px;
1500
- padding: ${size[2.5]} ${size[1.5]} ${size[2.5]} ${size[1]};
1567
+ padding: ${size[1.5]} ${size[1]} ${size[1.5]} ${size[0.5]};
1501
1568
 
1502
1569
  &::after {
1503
1570
  content: ' ';
@@ -1521,39 +1588,40 @@ const getStyles = () => {
1521
1588
  position: absolute;
1522
1589
  transition: background-color 0.125s ease;
1523
1590
  &:hover {
1524
- background-color: ${colors.gray[400]}${alpha[90]};
1591
+ background-color: ${colors.purple[400]}${alpha[90]};
1525
1592
  }
1526
1593
  z-index: 4;
1527
1594
  `,
1528
1595
  'dragHandle-position-top': css`
1529
1596
  bottom: 0;
1530
1597
  width: 100%;
1531
- height: ${tokens.size[1]};
1598
+ height: 3px;
1532
1599
  cursor: ns-resize;
1533
1600
  `,
1534
1601
  'dragHandle-position-bottom': css`
1535
1602
  top: 0;
1536
1603
  width: 100%;
1537
- height: ${tokens.size[1]};
1604
+ height: 3px;
1538
1605
  cursor: ns-resize;
1539
1606
  `,
1540
1607
  'dragHandle-position-right': css`
1541
1608
  left: 0;
1542
- width: ${tokens.size[1]};
1609
+ width: 3px;
1543
1610
  height: 100%;
1544
1611
  cursor: ew-resize;
1545
1612
  `,
1546
1613
  'dragHandle-position-left': css`
1547
1614
  right: 0;
1548
- width: ${tokens.size[1]};
1615
+ width: 3px;
1549
1616
  height: 100%;
1550
1617
  cursor: ew-resize;
1551
1618
  `,
1552
1619
  row: css`
1553
1620
  display: flex;
1554
1621
  justify-content: space-between;
1555
- padding: ${tokens.size[2.5]} ${tokens.size[3]};
1556
- gap: ${tokens.size[4]};
1622
+ align-items: center;
1623
+ padding: ${tokens.size[2]} ${tokens.size[2.5]};
1624
+ gap: ${tokens.size[3]};
1557
1625
  border-bottom: ${colors.darkGray[500]} 1px solid;
1558
1626
  align-items: center;
1559
1627
  & > button {
@@ -1561,6 +1629,7 @@ const getStyles = () => {
1561
1629
  background: transparent;
1562
1630
  border: none;
1563
1631
  display: flex;
1632
+ gap: ${size[0.5]};
1564
1633
  flex-direction: column;
1565
1634
  }
1566
1635
  `,
@@ -1576,18 +1645,18 @@ const getStyles = () => {
1576
1645
  }
1577
1646
  `,
1578
1647
  tanstackLogo: css`
1579
- font-size: ${font.size.lg};
1580
- font-weight: ${font.weight.extrabold};
1581
- line-height: ${font.lineHeight.sm};
1648
+ font-size: ${font.size.md};
1649
+ font-weight: ${font.weight.bold};
1650
+ line-height: ${font.lineHeight.xs};
1582
1651
  white-space: nowrap;
1583
1652
  `,
1584
1653
  queryFlavorLogo: css`
1585
1654
  font-weight: ${font.weight.semibold};
1586
- font-size: ${font.size.sm};
1655
+ font-size: ${font.size.xs};
1587
1656
  background: linear-gradient(to right, #dd524b, #e9a03b);
1588
1657
  background-clip: text;
1589
1658
  -webkit-background-clip: text;
1590
- line-height: ${font.lineHeight.xs};
1659
+ line-height: 1;
1591
1660
  -webkit-text-fill-color: transparent;
1592
1661
  white-space: nowrap;
1593
1662
  `,
@@ -1600,12 +1669,11 @@ const getStyles = () => {
1600
1669
  display: flex;
1601
1670
  gap: ${tokens.size[1.5]};
1602
1671
  background: ${colors.darkGray[500]};
1603
- border-radius: ${tokens.border.radius.md};
1672
+ border-radius: ${tokens.border.radius.sm};
1604
1673
  font-size: ${font.size.sm};
1605
1674
  padding: ${tokens.size[1]};
1606
- padding-left: ${tokens.size[2.5]};
1675
+ padding-left: ${tokens.size[2]};
1607
1676
  align-items: center;
1608
- line-height: ${font.lineHeight.md};
1609
1677
  font-weight: ${font.weight.medium};
1610
1678
  border: none;
1611
1679
  user-select: none;
@@ -1614,9 +1682,21 @@ const getStyles = () => {
1614
1682
  outline-offset: 2px;
1615
1683
  outline: 2px solid ${colors.blue[800]};
1616
1684
  }
1617
- & span:nth-child(2) {
1618
- color: ${colors.gray[300]}${alpha[80]};
1619
- }
1685
+ `,
1686
+ queryStatusTagLabel: css`
1687
+ font-size: ${font.size.xs};
1688
+ `,
1689
+ queryStatusCount: css`
1690
+ font-size: ${font.size.xs};
1691
+ padding: 0 5px;
1692
+ display: flex;
1693
+ align-items: center;
1694
+ justify-content: center;
1695
+ color: ${colors.gray[400]};
1696
+ background-color: ${colors.darkGray[300]};
1697
+ border-radius: 2px;
1698
+ font-variant-numeric: tabular-nums;
1699
+ height: ${tokens.size[4.5]};
1620
1700
  `,
1621
1701
  statusTooltip: css`
1622
1702
  position: absolute;
@@ -1625,10 +1705,10 @@ const getStyles = () => {
1625
1705
  top: 100%;
1626
1706
  left: 50%;
1627
1707
  transform: translate(-50%, calc(${tokens.size[2]}));
1628
- padding: ${tokens.size[0.5]} ${tokens.size[3]};
1708
+ padding: ${tokens.size[0.5]} ${tokens.size[2]};
1629
1709
  border-radius: ${tokens.border.radius.md};
1630
- font-size: ${font.size.sm};
1631
- border: 2px solid ${colors.gray[600]};
1710
+ font-size: ${font.size.xs};
1711
+ border: 1px solid ${colors.gray[600]};
1632
1712
  color: ${tokens.colors['gray'][300]};
1633
1713
 
1634
1714
  &::before {
@@ -1660,26 +1740,16 @@ const getStyles = () => {
1660
1740
  selectedQueryRow: css`
1661
1741
  background-color: ${colors.darkGray[500]};
1662
1742
  `,
1663
- queryStatusCount: css`
1664
- padding: 0 8px;
1665
- display: flex;
1666
- align-items: center;
1667
- justify-content: center;
1668
- color: ${colors.gray[400]};
1669
- background-color: ${colors.darkGray[300]};
1670
- border-radius: 3px;
1671
- font-variant-numeric: tabular-nums;
1672
- `,
1673
1743
  filtersContainer: css`
1674
1744
  display: flex;
1675
- gap: ${tokens.size[2.5]};
1745
+ gap: ${tokens.size[2]};
1676
1746
  & > button {
1677
1747
  cursor: pointer;
1678
- padding: ${tokens.size[1.5]} ${tokens.size[2.5]};
1748
+ padding: ${tokens.size[0.5]} ${tokens.size[2]};
1679
1749
  padding-right: ${tokens.size[1.5]};
1680
- border-radius: ${tokens.border.radius.md};
1750
+ border-radius: ${tokens.border.radius.sm};
1681
1751
  background-color: ${colors.darkGray[400]};
1682
- font-size: ${font.size.sm};
1752
+ font-size: ${font.size.xs};
1683
1753
  display: flex;
1684
1754
  align-items: center;
1685
1755
  line-height: ${font.lineHeight.sm};
@@ -1694,8 +1764,8 @@ const getStyles = () => {
1694
1764
  }
1695
1765
  `,
1696
1766
  filterInput: css`
1697
- padding: ${tokens.size[1.5]} ${tokens.size[2.5]};
1698
- border-radius: ${tokens.border.radius.md};
1767
+ padding: ${tokens.size[0.5]} ${tokens.size[2]};
1768
+ border-radius: ${tokens.border.radius.sm};
1699
1769
  background-color: ${colors.darkGray[400]};
1700
1770
  display: flex;
1701
1771
  box-sizing: content-box;
@@ -1706,11 +1776,11 @@ const getStyles = () => {
1706
1776
  border: 1px solid ${colors.darkGray[200]};
1707
1777
  height: min-content;
1708
1778
  & > svg {
1709
- width: ${tokens.size[3.5]};
1710
- height: ${tokens.size[3.5]};
1779
+ width: ${tokens.size[3]};
1780
+ height: ${tokens.size[3]};
1711
1781
  }
1712
1782
  & input {
1713
- font-size: ${font.size.sm};
1783
+ font-size: ${font.size.xs};
1714
1784
  width: 100%;
1715
1785
  background-color: ${colors.darkGray[400]};
1716
1786
  border: none;
@@ -1732,8 +1802,8 @@ const getStyles = () => {
1732
1802
  }
1733
1803
  `,
1734
1804
  filterSelect: css`
1735
- padding: ${tokens.size[1.5]} ${tokens.size[2.5]};
1736
- border-radius: ${tokens.border.radius.md};
1805
+ padding: ${tokens.size[0.5]} ${tokens.size[2]};
1806
+ border-radius: ${tokens.border.radius.sm};
1737
1807
  background-color: ${colors.darkGray[400]};
1738
1808
  display: flex;
1739
1809
  align-items: center;
@@ -1743,14 +1813,14 @@ const getStyles = () => {
1743
1813
  border: 1px solid ${colors.darkGray[200]};
1744
1814
  height: min-content;
1745
1815
  & > svg {
1746
- width: ${tokens.size[3]};
1747
- height: ${tokens.size[3]};
1816
+ width: ${tokens.size[2]};
1817
+ height: ${tokens.size[2]};
1748
1818
  }
1749
1819
  & > select {
1750
1820
  appearance: none;
1751
1821
  min-width: 100px;
1752
1822
  line-height: ${font.lineHeight.sm};
1753
- font-size: ${font.size.sm};
1823
+ font-size: ${font.size.xs};
1754
1824
  background-color: ${colors.darkGray[400]};
1755
1825
  border: none;
1756
1826
  &:focus {
@@ -1765,13 +1835,13 @@ const getStyles = () => {
1765
1835
  `,
1766
1836
  actionsContainer: css`
1767
1837
  display: flex;
1768
- gap: ${tokens.size[2.5]};
1838
+ gap: ${tokens.size[2]};
1769
1839
  `,
1770
1840
  actionsBtn: css`
1771
- border-radius: ${tokens.border.radius.md};
1841
+ border-radius: ${tokens.border.radius.sm};
1772
1842
  background-color: ${colors.darkGray[400]};
1773
- width: 2.125rem;
1774
- height: 2.125rem;
1843
+ width: 1.625rem;
1844
+ height: 1.625rem;
1775
1845
  justify-content: center;
1776
1846
  display: flex;
1777
1847
  align-items: center;
@@ -1784,8 +1854,8 @@ const getStyles = () => {
1784
1854
  background-color: ${colors.darkGray[500]};
1785
1855
  }
1786
1856
  & svg {
1787
- width: ${tokens.size[4]};
1788
- height: ${tokens.size[4]};
1857
+ width: ${tokens.size[3]};
1858
+ height: ${tokens.size[3]};
1789
1859
  }
1790
1860
  &:focus-visible {
1791
1861
  outline-offset: 2px;
@@ -1823,21 +1893,23 @@ const getStyles = () => {
1823
1893
  & .tsqd-query-observer-count {
1824
1894
  padding: 0 ${tokens.size[1]};
1825
1895
  user-select: none;
1826
- min-width: ${tokens.size[8]};
1896
+ min-width: ${tokens.size[6.5]};
1827
1897
  align-self: stretch;
1828
1898
  display: flex;
1829
1899
  align-items: center;
1830
1900
  justify-content: center;
1831
- font-size: ${font.size.sm};
1901
+ font-size: ${font.size.xs};
1832
1902
  font-weight: ${font.weight.medium};
1903
+ border-bottom-width: 1px;
1904
+ border-bottom-style: solid;
1833
1905
  border-bottom: 1px solid ${colors.darkGray[700]};
1834
1906
  }
1835
1907
  & .tsqd-query-hash {
1836
1908
  user-select: text;
1837
- font-size: ${font.size.sm};
1909
+ font-size: ${font.size.xs};
1838
1910
  display: flex;
1839
1911
  align-items: center;
1840
- min-height: ${tokens.size[8]};
1912
+ min-height: ${tokens.size[6]};
1841
1913
  flex: 1;
1842
1914
  padding: ${tokens.size[1]} ${tokens.size[2]};
1843
1915
  font-family: 'Menlo', 'Fira Code', monospace;
@@ -1851,11 +1923,11 @@ const getStyles = () => {
1851
1923
  align-self: stretch;
1852
1924
  display: flex;
1853
1925
  align-items: center;
1854
- padding: 0 ${tokens.size[3]};
1926
+ padding: 0 ${tokens.size[2]};
1855
1927
  color: ${colors.gray[300]};
1856
1928
  background-color: ${colors.darkGray[600]};
1857
1929
  border-bottom: 1px solid ${colors.darkGray[400]};
1858
- font-size: ${font.size.sm};
1930
+ font-size: ${font.size.xs};
1859
1931
  }
1860
1932
  `,
1861
1933
  detailsContainer: css`
@@ -1872,13 +1944,14 @@ const getStyles = () => {
1872
1944
  top: 0;
1873
1945
  z-index: 2;
1874
1946
  background-color: ${colors.darkGray[600]};
1875
- padding: ${tokens.size[2]} ${tokens.size[2]};
1947
+ padding: ${tokens.size[1.5]} ${tokens.size[2]};
1876
1948
  font-weight: ${font.weight.medium};
1877
- font-size: ${font.size.sm};
1949
+ font-size: ${font.size.xs};
1950
+ line-height: ${font.lineHeight.xs};
1878
1951
  text-align: left;
1879
1952
  `,
1880
1953
  detailsBody: css`
1881
- margin: ${tokens.size[2]} 0px ${tokens.size[3]} 0px;
1954
+ margin: ${tokens.size[1.5]} 0px ${tokens.size[2]} 0px;
1882
1955
  & > div {
1883
1956
  display: flex;
1884
1957
  align-items: stretch;
@@ -1886,7 +1959,7 @@ const getStyles = () => {
1886
1959
  line-height: ${font.lineHeight.sm};
1887
1960
  justify-content: space-between;
1888
1961
  & > span {
1889
- font-size: ${font.size.sm};
1962
+ font-size: ${font.size.xs};
1890
1963
  }
1891
1964
  & > span:nth-child(2) {
1892
1965
  font-variant-numeric: tabular-nums;
@@ -1894,39 +1967,39 @@ const getStyles = () => {
1894
1967
  }
1895
1968
 
1896
1969
  & > div:first-child {
1897
- margin-bottom: ${tokens.size[2]};
1970
+ margin-bottom: ${tokens.size[1.5]};
1898
1971
  }
1899
1972
 
1900
1973
  & code {
1901
1974
  font-family: 'Menlo', 'Fira Code', monospace;
1902
1975
  margin: 0;
1903
- font-size: ${font.size.sm};
1904
- line-height: ${font.lineHeight.sm};
1976
+ font-size: ${font.size.xs};
1977
+ line-height: ${font.lineHeight.xs};
1905
1978
  }
1906
1979
  `,
1907
1980
  queryDetailsStatus: css`
1908
1981
  border: 1px solid ${colors.darkGray[200]};
1909
- border-radius: ${tokens.border.radius.md};
1982
+ border-radius: ${tokens.border.radius.sm};
1910
1983
  font-weight: ${font.weight.medium};
1911
1984
  padding: ${tokens.size[1]} ${tokens.size[2.5]};
1912
1985
  `,
1913
1986
  actionsBody: css`
1914
1987
  flex-wrap: wrap;
1915
- margin: ${tokens.size[3]} 0px ${tokens.size[3]} 0px;
1988
+ margin: ${tokens.size[2]} 0px ${tokens.size[2]} 0px;
1916
1989
  display: flex;
1917
1990
  gap: ${tokens.size[2]};
1918
1991
  padding: 0px ${tokens.size[2]};
1919
1992
  & > button {
1920
- font-size: ${font.size.sm};
1921
- padding: ${tokens.size[2]} ${tokens.size[2]};
1993
+ font-size: ${font.size.xs};
1994
+ padding: ${tokens.size[1]} ${tokens.size[2]};
1922
1995
  display: flex;
1923
- border-radius: ${tokens.border.radius.md};
1996
+ border-radius: ${tokens.border.radius.sm};
1924
1997
  border: 1px solid ${colors.darkGray[400]};
1925
1998
  background-color: ${colors.darkGray[600]};
1926
1999
  align-items: center;
1927
2000
  gap: ${tokens.size[2]};
1928
2001
  font-weight: ${font.weight.medium};
1929
- line-height: ${font.lineHeight.sm};
2002
+ line-height: ${font.lineHeight.xs};
1930
2003
  cursor: pointer;
1931
2004
  &:focus-visible {
1932
2005
  outline-offset: 2px;
@@ -1943,17 +2016,17 @@ const getStyles = () => {
1943
2016
  }
1944
2017
 
1945
2018
  & > span {
1946
- width: ${size[2]};
1947
- height: ${size[2]};
2019
+ width: ${size[1.5]};
2020
+ height: ${size[1.5]};
1948
2021
  border-radius: ${tokens.border.radius.full};
1949
2022
  }
1950
2023
  }
1951
2024
  `,
1952
2025
  actionsSelect: css`
1953
- font-size: ${font.size.sm};
1954
- padding: ${tokens.size[2]} ${tokens.size[2]};
2026
+ font-size: ${font.size.xs};
2027
+ padding: ${tokens.size[0.5]} ${tokens.size[2]};
1955
2028
  display: flex;
1956
- border-radius: ${tokens.border.radius.md};
2029
+ border-radius: ${tokens.border.radius.sm};
1957
2030
  overflow: hidden;
1958
2031
  border: 1px solid ${colors.darkGray[400]};
1959
2032
  background-color: ${colors.darkGray[600]};
@@ -1968,8 +2041,8 @@ const getStyles = () => {
1968
2041
  background-color: ${colors.darkGray[500]};
1969
2042
  }
1970
2043
  & > span {
1971
- width: ${size[2]};
1972
- height: ${size[2]};
2044
+ width: ${size[1.5]};
2045
+ height: ${size[1.5]};
1973
2046
  border-radius: ${tokens.border.radius.full};
1974
2047
  }
1975
2048
  &:focus-within {
@@ -1993,57 +2066,77 @@ const getStyles = () => {
1993
2066
  & svg path {
1994
2067
  stroke: ${tokens.colors.red[400]};
1995
2068
  }
2069
+ & svg {
2070
+ width: ${tokens.size[2]};
2071
+ height: ${tokens.size[2]};
2072
+ }
1996
2073
  `,
1997
2074
  settingsMenu: css`
1998
- position: absolute;
1999
- top: calc(100% + ${tokens.size[2]});
2000
- border-radius: ${tokens.border.radius.lg};
2001
- border: 1px solid ${colors.gray[600]};
2002
- right: 0;
2003
- min-width: ${tokens.size[44]};
2004
- background-color: ${colors.darkGray[400]};
2005
- font-size: ${font.size.sm};
2006
- color: ${colors.gray[500]};
2007
- z-index: 7;
2075
+ display: flex;
2076
+ & * {
2077
+ font-family: 'Inter', sans-serif;
2078
+ }
2079
+ flex-direction: column;
2080
+ gap: ${size[0.5]};
2081
+ border-radius: ${tokens.border.radius.sm};
2082
+ border: 1px solid ${colors.gray[700]};
2083
+ background-color: ${colors.darkGray[600]};
2084
+ font-size: ${font.size.xs};
2085
+ color: ${colors.gray[300]};
2086
+ z-index: 99999;
2087
+ min-width: 120px;
2088
+ padding: ${size[0.5]};
2089
+ `,
2090
+ settingsSubTrigger: css`
2091
+ display: flex;
2092
+ align-items: center;
2093
+ justify-content: space-between;
2094
+ border-radius: ${tokens.border.radius.xs};
2095
+ padding: ${tokens.size[0.5]} ${tokens.size[1]};
2096
+ cursor: pointer;
2097
+ background-color: transparent;
2098
+ border: none;
2099
+ & svg {
2100
+ transform: rotate(-90deg);
2101
+ width: ${tokens.size[2]};
2102
+ height: ${tokens.size[2]};
2103
+ }
2104
+ &:hover {
2105
+ background-color: ${colors.darkGray[500]};
2106
+ }
2107
+ &:focus-visible {
2108
+ outline-offset: 2px;
2109
+ outline: 2px solid ${colors.blue[800]};
2110
+ }
2111
+ &.data-disabled {
2112
+ opacity: 0.6;
2113
+ cursor: not-allowed;
2114
+ }
2008
2115
  `,
2009
2116
  settingsMenuHeader: css`
2010
- padding: ${tokens.size[1.5]} ${tokens.size[2.5]};
2011
- color: ${colors.gray[300]};
2117
+ padding: ${tokens.size[0.5]} ${tokens.size[1]};
2012
2118
  font-weight: ${font.weight.medium};
2119
+ border-bottom: 1px solid ${colors.darkGray[400]};
2120
+ color: ${colors.gray[400]};
2121
+ font-size: ${font.size['xs']};
2013
2122
  `,
2014
- settingsMenuSection: css`
2015
- border-top: 1px solid ${colors.gray[600]};
2123
+ settingsSubButton: css`
2016
2124
  display: flex;
2017
- flex-direction: column;
2018
- padding: ${tokens.size[1]} ${tokens.size[1]};
2019
-
2020
- & > button {
2021
- cursor: pointer;
2022
- background-color: transparent;
2023
- border: none;
2024
- padding: ${tokens.size[2]} ${tokens.size[1.5]};
2025
- font-size: ${font.size.sm};
2026
- display: flex;
2027
- align-items: center;
2028
- justify-content: flex-start;
2029
- gap: ${tokens.size[2]};
2030
- border-radius: ${tokens.border.radius.md};
2031
- &:hover {
2032
- background-color: ${colors.darkGray[500]};
2033
- }
2034
-
2035
- &:focus-visible {
2036
- outline-offset: 2px;
2037
- outline: 2px solid ${colors.blue[800]};
2038
- }
2039
- }
2040
-
2041
- & button:nth-child(4) svg {
2042
- transform: rotate(-90deg);
2125
+ align-items: center;
2126
+ justify-content: space-between;
2127
+ color: ${colors.gray[300]};
2128
+ font-size: ${font.size['xs']};
2129
+ border-radius: ${tokens.border.radius.xs};
2130
+ padding: ${tokens.size[0.5]} ${tokens.size[1]};
2131
+ cursor: pointer;
2132
+ background-color: transparent;
2133
+ border: none;
2134
+ &:hover {
2135
+ background-color: ${colors.darkGray[500]};
2043
2136
  }
2044
-
2045
- & button:nth-child(3) svg {
2046
- transform: rotate(90deg);
2137
+ &:focus-visible {
2138
+ outline-offset: 2px;
2139
+ outline: 2px solid ${colors.blue[800]};
2047
2140
  }
2048
2141
  `,
2049
2142
  }