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

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
@@ -9,7 +9,8 @@ import {
9
9
  onMount,
10
10
  } from 'solid-js'
11
11
  import { rankItem } from '@tanstack/match-sorter-utils'
12
- import { css, cx } from '@emotion/css'
12
+ import { css } from 'goober'
13
+ import { clsx as cx } from 'clsx'
13
14
  import { TransitionGroup } from 'solid-transition-group'
14
15
  import { Key } from '@solid-primitives/keyed'
15
16
  import { createLocalStorage } from '@solid-primitives/storage'
@@ -110,50 +111,56 @@ export const Devtools = () => {
110
111
  return localStore.position || useQueryDevtoolsContext().position || POSITION
111
112
  })
112
113
 
114
+ createEffect(() => {
115
+ const root = document.querySelector('.tsqd-parent-container') as HTMLElement
116
+ const height = localStore.height || DEFAULT_HEIGHT
117
+ const width = localStore.width || DEFAULT_WIDTH
118
+ const panelPosition = position()
119
+ root.style.setProperty(
120
+ '--tsqd-panel-height',
121
+ `${panelPosition === 'top' ? '-' : ''}${height}px`,
122
+ )
123
+ root.style.setProperty(
124
+ '--tsqd-panel-width',
125
+ `${panelPosition === 'left' ? '-' : ''}${width}px`,
126
+ )
127
+ })
128
+
113
129
  return (
114
130
  <div
115
131
  // styles for animating the panel in and out
116
- class={css`
117
- & .TSQD-panel-exit-active,
118
- & .TSQD-panel-enter-active {
119
- transition: opacity 0.3s, transform 0.3s;
120
- }
132
+ class={cx(
133
+ css`
134
+ & .tsqd-panel-transition-exit-active,
135
+ & .tsqd-panel-transition-enter-active {
136
+ transition: opacity 0.3s, transform 0.3s;
137
+ }
121
138
 
122
- & .TSQD-panel-exit-to,
123
- & .TSQD-panel-enter {
124
- ${position() === 'top'
125
- ? `transform: translateY(-${Number(
126
- localStore.height || DEFAULT_HEIGHT,
127
- )}px);`
128
- : position() === 'left'
129
- ? `transform: translateX(-${Number(
130
- localStore.width || DEFAULT_WIDTH,
131
- )}px);`
132
- : position() === 'right'
133
- ? `transform: translateX(${Number(
134
- localStore.width || DEFAULT_WIDTH,
135
- )}px);`
136
- : `transform: translateY(${Number(
137
- localStore.height || DEFAULT_HEIGHT,
138
- )}px);`}
139
- }
139
+ & .tsqd-panel-transition-exit-to,
140
+ & .tsqd-panel-transition-enter {
141
+ ${position() === 'top' || position() === 'bottom'
142
+ ? `transform: translateY(var(--tsqd-panel-height));`
143
+ : `transform: translateX(var(--tsqd-panel-width));`}
144
+ }
140
145
 
141
- & .TSQD-button-exit-active,
142
- & .TSQD-button-enter-active {
143
- transition: opacity 0.3s, transform 0.3s;
144
- }
146
+ & .tsqd-button-transition-exit-active,
147
+ & .tsqd-button-transition-enter-active {
148
+ transition: opacity 0.3s, transform 0.3s;
149
+ }
145
150
 
146
- & .TSQD-button-exit-to,
147
- & .TSQD-button-enter {
148
- transform: ${buttonPosition() === 'top-left'
149
- ? `translateX(-72px);`
150
- : buttonPosition() === 'top-right'
151
- ? `translateX(72px);`
152
- : `translateY(72px);`};
153
- }
154
- `}
151
+ & .tsqd-button-transition-exit-to,
152
+ & .tsqd-button-transition-enter {
153
+ transform: ${buttonPosition() === 'top-left'
154
+ ? `translateX(-72px);`
155
+ : buttonPosition() === 'top-right'
156
+ ? `translateX(72px);`
157
+ : `translateY(72px);`};
158
+ }
159
+ `,
160
+ 'tsqd-transitions-container',
161
+ )}
155
162
  >
156
- <TransitionGroup name="TSQD-panel">
163
+ <TransitionGroup name="tsqd-panel-transition">
157
164
  <Show when={isOpen()}>
158
165
  <DevtoolsPanel
159
166
  localStore={localStore}
@@ -161,7 +168,7 @@ export const Devtools = () => {
161
168
  />
162
169
  </Show>
163
170
  </TransitionGroup>
164
- <TransitionGroup name="TSQD-button">
171
+ <TransitionGroup name="tsqd-button-transition">
165
172
  <Show when={!isOpen()}>
166
173
  <div
167
174
  class={cx(
@@ -361,18 +368,24 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
361
368
  // -
362
369
  // min-width - When the panel is in the left or right position, the panel
363
370
  // width is set to min-content to allow the panel to shrink to the lowest possible width
364
- class={`${styles.panel} ${styles[`panel-position-${position()}`]} ${css`
365
- flex-direction: ${panelWidth() < secondBreakpoint ? 'column' : 'row'};
366
- background-color: ${panelWidth() < secondBreakpoint
367
- ? tokens.colors.gray[600]
368
- : tokens.colors.darkGray[900]};
369
- ${panelWidth() < thirdBreakpoint &&
370
- (position() === 'right' || position() === 'left')
371
- ? `
371
+ class={cx(
372
+ styles.panel,
373
+ styles[`panel-position-${position()}`],
374
+ css`
375
+ flex-direction: ${panelWidth() < secondBreakpoint ? 'column' : 'row'};
376
+ background-color: ${panelWidth() < secondBreakpoint
377
+ ? tokens.colors.gray[600]
378
+ : tokens.colors.darkGray[900]};
379
+ `,
380
+ {
381
+ [css`
372
382
  min-width: min-content;
373
- `
374
- : ''}
375
- `}`}
383
+ `]:
384
+ panelWidth() < thirdBreakpoint &&
385
+ (position() === 'right' || position() === 'left'),
386
+ },
387
+ 'tsqd-main-panel',
388
+ )}
376
389
  style={{
377
390
  height:
378
391
  position() === 'bottom' || position() === 'top'
@@ -390,12 +403,17 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
390
403
  class={cx(
391
404
  styles.dragHandle,
392
405
  styles[`dragHandle-position-${position()}`],
406
+ 'tsqd-drag-handle',
393
407
  )}
394
408
  onMouseDown={handleDragStart}
395
409
  ></div>
396
410
  <button
397
411
  aria-label="Close tanstack query devtools"
398
- class={cx(styles.closeBtn, styles[`closeBtn-position-${position()}`])}
412
+ class={cx(
413
+ styles.closeBtn,
414
+ styles[`closeBtn-position-${position()}`],
415
+ 'tsqd-minimize-btn',
416
+ )}
399
417
  onClick={() => props.setLocalStore('open', 'false')}
400
418
  >
401
419
  <ChevronDown />
@@ -404,23 +422,29 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
404
422
  ref={queriesContainerRef}
405
423
  // When the panels are stacked we use the height style
406
424
  // to divide the panels into two equal parts
407
- class={`${styles.queriesContainer} ${css`
408
- ${panelWidth() < secondBreakpoint && selectedQueryHash()
409
- ? `
410
- height: 50%;
411
- max-height: 50%;
412
- `
413
- : ''}
414
- `}`}
425
+ class={cx(
426
+ styles.queriesContainer,
427
+ panelWidth() < secondBreakpoint &&
428
+ selectedQueryHash() &&
429
+ css`
430
+ height: 50%;
431
+ max-height: 50%;
432
+ `,
433
+ 'tsqd-queries-container',
434
+ )}
415
435
  >
416
- <div class={cx(styles.row)}>
436
+ <div class={cx(styles.row, 'tsqd-header')}>
417
437
  <button
418
- class={styles.logo}
438
+ class={cx(styles.logo, 'tsqd-text-logo-container')}
419
439
  onClick={() => props.setLocalStore('open', 'false')}
420
440
  aria-label="Close Tanstack query devtools"
421
441
  >
422
- <span class={styles.tanstackLogo}>TANSTACK</span>
423
- <span class={styles.queryFlavorLogo}>
442
+ <span class={cx(styles.tanstackLogo, 'tsqd-text-logo-tanstack')}>
443
+ TANSTACK
444
+ </span>
445
+ <span
446
+ class={cx(styles.queryFlavorLogo, 'tsqd-text-logo-query-flavor')}
447
+ >
424
448
  {useQueryDevtoolsContext().queryFlavor} v
425
449
  {useQueryDevtoolsContext().version}
426
450
  </span>
@@ -433,10 +457,16 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
433
457
  css`
434
458
  gap: ${tokens.size[2.5]};
435
459
  `,
460
+ 'tsqd-filters-actions-container',
436
461
  )}
437
462
  >
438
- <div class={styles.filtersContainer}>
439
- <div class={styles.filterInput}>
463
+ <div class={cx(styles.filtersContainer, 'tsqd-filters-container')}>
464
+ <div
465
+ class={cx(
466
+ styles.filterInput,
467
+ 'tsqd-query-filter-textfield-container',
468
+ )}
469
+ >
440
470
  <Search />
441
471
  <input
442
472
  aria-label="Filter queries by query key"
@@ -445,10 +475,16 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
445
475
  onInput={(e) =>
446
476
  props.setLocalStore('filter', e.currentTarget.value)
447
477
  }
478
+ class="tsqd-query-filter-textfield"
448
479
  value={props.localStore.filter || ''}
449
480
  />
450
481
  </div>
451
- <div class={styles.filterSelect}>
482
+ <div
483
+ class={cx(
484
+ styles.filterSelect,
485
+ 'tsqd-query-filter-sort-container',
486
+ )}
487
+ >
452
488
  <select
453
489
  value={sort()}
454
490
  onChange={(e) =>
@@ -469,6 +505,7 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
469
505
  sortOrder() === -1 ? 'descending' : 'ascending'
470
506
  }`}
471
507
  aria-pressed={sortOrder() === -1}
508
+ class="tsqd-query-filter-sort-order-btn"
472
509
  >
473
510
  <Show when={sortOrder() === 1}>
474
511
  <span>Asc</span>
@@ -481,7 +518,7 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
481
518
  </button>
482
519
  </div>
483
520
 
484
- <div class={styles.actionsContainer}>
521
+ <div class={cx(styles.actionsContainer, 'tsqd-actions-container')}>
485
522
  <button
486
523
  onClick={() => {
487
524
  if (offline()) {
@@ -492,7 +529,11 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
492
529
  setOffline(true)
493
530
  }
494
531
  }}
495
- class={styles.actionsBtn}
532
+ class={cx(
533
+ styles.actionsBtn,
534
+ 'tsqd-actions-btn',
535
+ 'tsqd-action-mock-offline-behavior',
536
+ )}
496
537
  aria-label={`${
497
538
  offline()
498
539
  ? 'Unset offline mocking behavior'
@@ -505,13 +546,17 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
505
546
  <div style={{ position: 'relative' }}>
506
547
  <button
507
548
  onClick={() => setSettingsOpen((prev) => !prev)}
508
- class={styles.actionsBtn}
509
- id="TSQD-settings-menu-btn"
549
+ class={cx(
550
+ styles.actionsBtn,
551
+ 'tsqd-actions-btn',
552
+ 'tsqd-action-settings',
553
+ )}
554
+ id="tsqd-settings-menu-btn"
510
555
  aria-label={`${
511
556
  settingsOpen() ? 'Close' : 'Open'
512
557
  } settings menu`}
513
558
  aria-haspopup="true"
514
- aria-controls="TSQD-settings-menu"
559
+ aria-controls="tsqd-settings-menu"
515
560
  >
516
561
  <Settings />
517
562
  </button>
@@ -519,17 +564,30 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
519
564
  <div
520
565
  role="menu"
521
566
  tabindex="-1"
522
- aria-labelledby="TSQD-settings-menu-btn"
523
- id="TSQD-settings-menu"
524
- class={styles.settingsMenu}
567
+ aria-labelledby="tsqd-settings-menu-btn"
568
+ id="tsqd-settings-menu"
569
+ class={cx(styles.settingsMenu, 'tsqd-settings-menu')}
525
570
  >
526
- <div class={styles.settingsMenuHeader}>Position</div>
527
- <div class={styles.settingsMenuSection}>
571
+ <div
572
+ class={cx(
573
+ styles.settingsMenuHeader,
574
+ 'tsqd-settings-menu-header',
575
+ )}
576
+ >
577
+ Position
578
+ </div>
579
+ <div
580
+ class={cx(
581
+ styles.settingsMenuSection,
582
+ 'tsqd-settings-menu-section',
583
+ )}
584
+ >
528
585
  <button
529
586
  onClick={() => {
530
587
  setDevtoolsPosition('top')
531
588
  }}
532
589
  aria-label="Position top"
590
+ class="tsqd-settings-menu-position-btn tsqd-settings-menu-position-btn-top"
533
591
  >
534
592
  <ArrowUp />
535
593
  <span>Top</span>
@@ -539,6 +597,7 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
539
597
  setDevtoolsPosition('bottom')
540
598
  }}
541
599
  aria-label="Position bottom"
600
+ class="tsqd-settings-menu-position-btn tsqd-settings-menu-position-btn-bottom"
542
601
  >
543
602
  <ArrowDown />
544
603
  <span>Bottom</span>
@@ -548,6 +607,7 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
548
607
  setDevtoolsPosition('left')
549
608
  }}
550
609
  aria-label="Position left"
610
+ class="tsqd-settings-menu-position-btn tsqd-settings-menu-position-btn-left"
551
611
  >
552
612
  <ArrowDown />
553
613
  <span>Left</span>
@@ -557,6 +617,7 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
557
617
  setDevtoolsPosition('right')
558
618
  }}
559
619
  aria-label="Position right"
620
+ class="tsqd-settings-menu-position-btn tsqd-settings-menu-position-btn-right"
560
621
  >
561
622
  <ArrowDown />
562
623
  <span>Right</span>
@@ -567,8 +628,13 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
567
628
  </div>
568
629
  </div>
569
630
  </div>
570
- <div class={styles.overflowQueryContainer}>
571
- <div>
631
+ <div
632
+ class={cx(
633
+ styles.overflowQueryContainer,
634
+ 'tsqd-queries-overflow-container',
635
+ )}
636
+ >
637
+ <div class="tsqd-queries-container">
572
638
  <Key by={(q) => q.queryHash} each={queries()}>
573
639
  {(query) => <QueryRow query={query()} />}
574
640
  </Key>
@@ -641,12 +707,12 @@ export const QueryRow: Component<{ query: Query }> = (props) => {
641
707
  styles.queryRow,
642
708
  selectedQueryHash() === props.query.queryHash &&
643
709
  styles.selectedQueryRow,
710
+ 'tsqd-query-row',
644
711
  )}
645
712
  aria-label={`Query key ${props.query.queryHash}`}
646
713
  >
647
714
  <div
648
715
  class={cx(
649
- 'TSQDObserverCount',
650
716
  color() === 'gray'
651
717
  ? css`
652
718
  background-color: ${tokens.colors[color()][700]};
@@ -654,15 +720,16 @@ export const QueryRow: Component<{ query: Query }> = (props) => {
654
720
  `
655
721
  : css`
656
722
  background-color: ${tokens.colors[color()][900]};
657
- color: ${tokens.colors[color()][300]} !important;
723
+ color: ${tokens.colors[color()][300]};
658
724
  `,
725
+ 'tsqd-query-observer-count',
659
726
  )}
660
727
  >
661
728
  {observers()}
662
729
  </div>
663
- <code class="TSQDQueryHash">{props.query.queryHash}</code>
730
+ <code class="tsqd-query-hash">{props.query.queryHash}</code>
664
731
  <Show when={isDisabled()}>
665
- <div class="TSQDQueryDisabled">disabled</div>
732
+ <div class="tsqd-query-disabled-indicator">disabled</div>
666
733
  </Show>
667
734
  </button>
668
735
  </Show>
@@ -708,7 +775,7 @@ export const QueryStatusCount: Component = () => {
708
775
  const styles = getStyles()
709
776
 
710
777
  return (
711
- <div class={styles.queryStatusContainer}>
778
+ <div class={cx(styles.queryStatusContainer, 'tsqd-query-status-container')}>
712
779
  <QueryStatus label="Fresh" color="green" count={fresh()} />
713
780
  <QueryStatus label="Fetching" color="blue" count={fetching()} />
714
781
  <QueryStatus label="Paused" color="purple" count={paused()} />
@@ -752,40 +819,44 @@ export const QueryStatus: Component<QueryStatusProps> = (props) => {
752
819
  ref={tagRef}
753
820
  class={cx(
754
821
  styles.queryStatusTag,
755
- !showLabel()
756
- ? css`
757
- cursor: pointer;
758
- &:hover {
759
- background: ${tokens.colors.darkGray[400]}${tokens.alpha[80]};
760
- }
761
- `
762
- : null,
822
+ !showLabel() &&
823
+ css`
824
+ cursor: pointer;
825
+ &:hover {
826
+ background: ${tokens.colors.darkGray[400]}${tokens.alpha[80]};
827
+ }
828
+ `,
829
+ 'tsqd-query-status-tag',
830
+ `tsqd-query-status-tag-${props.label.toLowerCase()}`,
763
831
  )}
764
832
  {...(mouseOver() || focused()
765
833
  ? {
766
- 'aria-describedby': 'TSQD-status-tooltip',
834
+ 'aria-describedby': 'tsqd-status-tooltip',
767
835
  }
768
836
  : {})}
769
837
  >
770
838
  <Show when={!showLabel() && (mouseOver() || focused())}>
771
839
  <div
772
840
  role="tooltip"
773
- id="TSQD-status-tooltip"
774
- class={cx(styles.statusTooltip)}
841
+ id="tsqd-status-tooltip"
842
+ class={cx(styles.statusTooltip, 'tsqd-query-status-tooltip')}
775
843
  >
776
844
  {props.label}
777
845
  </div>
778
846
  </Show>
779
847
  <span
780
- class={css`
781
- width: ${tokens.size[2]};
782
- height: ${tokens.size[2]};
783
- border-radius: ${tokens.border.radius.full};
784
- background-color: ${tokens.colors[props.color][500]};
785
- `}
848
+ class={cx(
849
+ css`
850
+ width: ${tokens.size[2]};
851
+ height: ${tokens.size[2]};
852
+ border-radius: ${tokens.border.radius.full};
853
+ background-color: ${tokens.colors[props.color][500]};
854
+ `,
855
+ 'tsqd-query-status-tag-dot',
856
+ )}
786
857
  />
787
858
  <Show when={showLabel()}>
788
- <span>{props.label}</span>
859
+ <span class="tsqd-query-status-tag-label">{props.label}</span>
789
860
  </Show>
790
861
  <span
791
862
  class={cx(
@@ -793,11 +864,12 @@ export const QueryStatus: Component<QueryStatusProps> = (props) => {
793
864
  props.count > 0 && props.color !== 'gray'
794
865
  ? css`
795
866
  background-color: ${tokens.colors[props.color][900]};
796
- color: ${tokens.colors[props.color][300]} !important;
867
+ color: ${tokens.colors[props.color][300]};
797
868
  `
798
869
  : css`
799
- color: ${tokens.colors['gray'][400]} !important;
870
+ color: ${tokens.colors['gray'][400]};
800
871
  `,
872
+ 'tsqd-query-status-tag-count',
801
873
  )}
802
874
  >
803
875
  {props.count}
@@ -915,10 +987,14 @@ const QueryDetails = () => {
915
987
 
916
988
  return (
917
989
  <Show when={activeQuery() && activeQueryState()}>
918
- <div class={styles.detailsContainer}>
919
- <div class={styles.detailsHeader}>Query Details</div>
920
- <div class={styles.detailsBody}>
921
- <div>
990
+ <div class={cx(styles.detailsContainer, 'tsqd-query-details-container')}>
991
+ <div class={cx(styles.detailsHeader, 'tsqd-query-details-header')}>
992
+ Query Details
993
+ </div>
994
+ <div
995
+ class={cx(styles.detailsBody, 'tsqd-query-details-summary-container')}
996
+ >
997
+ <div class="tsqd-query-details-summary">
922
998
  <pre>
923
999
  <code>{displayValue(activeQuery()!.queryKey, true)}</code>
924
1000
  </pre>
@@ -941,23 +1017,31 @@ const QueryDetails = () => {
941
1017
  {statusLabel()}
942
1018
  </span>
943
1019
  </div>
944
- <div>
1020
+ <div class="tsqd-query-details-observers-count">
945
1021
  <span>Observers:</span>
946
1022
  <span>{observerCount()}</span>
947
1023
  </div>
948
- <div>
1024
+ <div class="tsqd-query-details-last-updated">
949
1025
  <span>Last Updated:</span>
950
1026
  <span>
951
1027
  {new Date(activeQueryState()!.dataUpdatedAt).toLocaleTimeString()}
952
1028
  </span>
953
1029
  </div>
954
1030
  </div>
955
- <div class={styles.detailsHeader}>Actions</div>
956
- <div class={styles.actionsBody}>
1031
+ <div class={cx(styles.detailsHeader, 'tsqd-query-details-header')}>
1032
+ Actions
1033
+ </div>
1034
+ <div
1035
+ class={cx(styles.actionsBody, 'tsqd-query-details-actions-container')}
1036
+ >
957
1037
  <button
958
- class={css`
959
- color: ${tokens.colors.blue[400]};
960
- `}
1038
+ class={cx(
1039
+ css`
1040
+ color: ${tokens.colors.blue[400]};
1041
+ `,
1042
+ 'tsqd-query-details-actions-btn',
1043
+ 'tsqd-query-details-action-refetch',
1044
+ )}
961
1045
  onClick={handleRefetch}
962
1046
  disabled={statusLabel() === 'fetching'}
963
1047
  >
@@ -969,9 +1053,13 @@ const QueryDetails = () => {
969
1053
  Refetch
970
1054
  </button>
971
1055
  <button
972
- class={css`
973
- color: ${tokens.colors.yellow[400]};
974
- `}
1056
+ class={cx(
1057
+ css`
1058
+ color: ${tokens.colors.yellow[400]};
1059
+ `,
1060
+ 'tsqd-query-details-actions-btn',
1061
+ 'tsqd-query-details-action-invalidate',
1062
+ )}
975
1063
  onClick={() => queryClient.invalidateQueries(activeQuery())}
976
1064
  disabled={queryStatus() === 'pending'}
977
1065
  >
@@ -983,9 +1071,13 @@ const QueryDetails = () => {
983
1071
  Invalidate
984
1072
  </button>
985
1073
  <button
986
- class={css`
987
- color: ${tokens.colors.gray[300]};
988
- `}
1074
+ class={cx(
1075
+ css`
1076
+ color: ${tokens.colors.gray[300]};
1077
+ `,
1078
+ 'tsqd-query-details-actions-btn',
1079
+ 'tsqd-query-details-action-reset',
1080
+ )}
989
1081
  onClick={() => queryClient.resetQueries(activeQuery())}
990
1082
  disabled={queryStatus() === 'pending'}
991
1083
  >
@@ -997,9 +1089,13 @@ const QueryDetails = () => {
997
1089
  Reset
998
1090
  </button>
999
1091
  <button
1000
- class={css`
1001
- color: ${tokens.colors.cyan[400]};
1002
- `}
1092
+ class={cx(
1093
+ css`
1094
+ color: ${tokens.colors.cyan[400]};
1095
+ `,
1096
+ 'tsqd-query-details-actions-btn',
1097
+ 'tsqd-query-details-action-loading',
1098
+ )}
1003
1099
  disabled={restoringLoading()}
1004
1100
  onClick={() => {
1005
1101
  if (activeQuery()?.state.data === undefined) {
@@ -1040,9 +1136,13 @@ const QueryDetails = () => {
1040
1136
  </button>
1041
1137
  <Show when={errorTypes().length === 0 || queryStatus() === 'error'}>
1042
1138
  <button
1043
- class={css`
1044
- color: ${tokens.colors.red[400]};
1045
- `}
1139
+ class={cx(
1140
+ css`
1141
+ color: ${tokens.colors.red[400]};
1142
+ `,
1143
+ 'tsqd-query-details-actions-btn',
1144
+ 'tsqd-query-details-action-error',
1145
+ )}
1046
1146
  onClick={() => {
1047
1147
  if (!activeQuery()!.state.error) {
1048
1148
  triggerError()
@@ -1063,7 +1163,13 @@ const QueryDetails = () => {
1063
1163
  <Show
1064
1164
  when={!(errorTypes().length === 0 || queryStatus() === 'error')}
1065
1165
  >
1066
- <div class={styles.actionsSelect}>
1166
+ <div
1167
+ class={cx(
1168
+ styles.actionsSelect,
1169
+ 'tsqd-query-details-actions-btn',
1170
+ 'tsqd-query-details-action-error-multiple',
1171
+ )}
1172
+ >
1067
1173
  <span
1068
1174
  class={css`
1069
1175
  background-color: ${tokens.colors.red[400]};
@@ -1091,11 +1197,14 @@ const QueryDetails = () => {
1091
1197
  </div>
1092
1198
  </Show>
1093
1199
  </div>
1094
- <div class={styles.detailsHeader}>Data Explorer</div>
1200
+ <div class={cx(styles.detailsHeader, 'tsqd-query-details-header')}>
1201
+ Data Explorer
1202
+ </div>
1095
1203
  <div
1096
1204
  style={{
1097
1205
  padding: '0.5rem',
1098
1206
  }}
1207
+ class="tsqd-query-details-explorer-container tsqd-query-details-data-explorer"
1099
1208
  >
1100
1209
  <Explorer
1101
1210
  label="Data"
@@ -1104,11 +1213,14 @@ const QueryDetails = () => {
1104
1213
  copyable={true}
1105
1214
  />
1106
1215
  </div>
1107
- <div class={styles.detailsHeader}>Query Explorer</div>
1216
+ <div class={cx(styles.detailsHeader, 'tsqd-query-details-header')}>
1217
+ Query Explorer
1218
+ </div>
1108
1219
  <div
1109
1220
  style={{
1110
1221
  padding: '0.5rem',
1111
1222
  }}
1223
+ class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
1112
1224
  >
1113
1225
  <Explorer
1114
1226
  label="Query"
@@ -1182,6 +1294,7 @@ const getStyles = () => {
1182
1294
  z-index: 100000;
1183
1295
  position: fixed;
1184
1296
  padding: 4px;
1297
+ text-align: left;
1185
1298
 
1186
1299
  display: flex;
1187
1300
  align-items: center;
@@ -1473,6 +1586,7 @@ const getStyles = () => {
1473
1586
  font-size: ${font.size.sm};
1474
1587
  background: linear-gradient(to right, #dd524b, #e9a03b);
1475
1588
  background-clip: text;
1589
+ -webkit-background-clip: text;
1476
1590
  line-height: ${font.lineHeight.xs};
1477
1591
  -webkit-text-fill-color: transparent;
1478
1592
  white-space: nowrap;
@@ -1656,8 +1770,8 @@ const getStyles = () => {
1656
1770
  actionsBtn: css`
1657
1771
  border-radius: ${tokens.border.radius.md};
1658
1772
  background-color: ${colors.darkGray[400]};
1659
- width: 2.125rem; // 34px
1660
- height: 2.125rem; // 34px
1773
+ width: 2.125rem;
1774
+ height: 2.125rem;
1661
1775
  justify-content: center;
1662
1776
  display: flex;
1663
1777
  align-items: center;
@@ -1694,20 +1808,23 @@ const getStyles = () => {
1694
1808
  background-color: inherit;
1695
1809
  border: none;
1696
1810
  cursor: pointer;
1811
+ &:focus {
1812
+ outline: none;
1813
+ }
1697
1814
  &:focus-visible {
1698
1815
  outline-offset: -2px;
1699
1816
  border-radius: ${border.radius.xs};
1700
1817
  outline: 2px solid ${colors.blue[800]};
1701
1818
  }
1702
- &:hover .TSQDQueryHash {
1819
+ &:hover .tsqd-query-hash {
1703
1820
  background-color: ${colors.darkGray[600]};
1704
1821
  }
1705
1822
 
1706
- & .TSQDObserverCount {
1823
+ & .tsqd-query-observer-count {
1707
1824
  padding: 0 ${tokens.size[1]};
1708
1825
  user-select: none;
1709
1826
  min-width: ${tokens.size[8]};
1710
- align-self: stretch !important;
1827
+ align-self: stretch;
1711
1828
  display: flex;
1712
1829
  align-items: center;
1713
1830
  justify-content: center;
@@ -1715,7 +1832,7 @@ const getStyles = () => {
1715
1832
  font-weight: ${font.weight.medium};
1716
1833
  border-bottom: 1px solid ${colors.darkGray[700]};
1717
1834
  }
1718
- & .TSQDQueryHash {
1835
+ & .tsqd-query-hash {
1719
1836
  user-select: text;
1720
1837
  font-size: ${font.size.sm};
1721
1838
  display: flex;
@@ -1723,16 +1840,15 @@ const getStyles = () => {
1723
1840
  min-height: ${tokens.size[8]};
1724
1841
  flex: 1;
1725
1842
  padding: ${tokens.size[1]} ${tokens.size[2]};
1726
- font-family: 'Menlo', 'Fira Code', monospace !important;
1843
+ font-family: 'Menlo', 'Fira Code', monospace;
1727
1844
  border-bottom: 1px solid ${colors.darkGray[400]};
1728
1845
  text-align: left;
1729
1846
  text-overflow: clip;
1730
1847
  word-break: break-word;
1731
1848
  }
1732
1849
 
1733
- & .TSQDQueryDisabled {
1850
+ & .tsqd-query-disabled-indicator {
1734
1851
  align-self: stretch;
1735
- align-self: stretch !important;
1736
1852
  display: flex;
1737
1853
  align-items: center;
1738
1854
  padding: 0 ${tokens.size[3]};
@@ -1749,6 +1865,7 @@ const getStyles = () => {
1749
1865
  flex-direction: column;
1750
1866
  overflow-y: auto;
1751
1867
  display: flex;
1868
+ text-align: left;
1752
1869
  `,
1753
1870
  detailsHeader: css`
1754
1871
  position: sticky;
@@ -1758,6 +1875,7 @@ const getStyles = () => {
1758
1875
  padding: ${tokens.size[2]} ${tokens.size[2]};
1759
1876
  font-weight: ${font.weight.medium};
1760
1877
  font-size: ${font.size.sm};
1878
+ text-align: left;
1761
1879
  `,
1762
1880
  detailsBody: css`
1763
1881
  margin: ${tokens.size[2]} 0px ${tokens.size[3]} 0px;
@@ -1780,7 +1898,7 @@ const getStyles = () => {
1780
1898
  }
1781
1899
 
1782
1900
  & code {
1783
- font-family: 'Menlo', 'Fira Code', monospace !important;
1901
+ font-family: 'Menlo', 'Fira Code', monospace;
1784
1902
  margin: 0;
1785
1903
  font-size: ${font.size.sm};
1786
1904
  line-height: ${font.lineHeight.sm};
@@ -1873,7 +1991,7 @@ const getStyles = () => {
1873
1991
  }
1874
1992
 
1875
1993
  & svg path {
1876
- stroke: ${tokens.colors.red[400]} !important;
1994
+ stroke: ${tokens.colors.red[400]};
1877
1995
  }
1878
1996
  `,
1879
1997
  settingsMenu: css`