@tanstack/devtools 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/devtools",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "TanStack Devtools is a set of tools for building advanced devtools for your application.",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -43,7 +43,7 @@
43
43
  "goober": "^2.1.16",
44
44
  "solid-js": "^1.9.7",
45
45
  "@tanstack/devtools-event-bus": "0.3.0",
46
- "@tanstack/devtools-ui": "0.3.1"
46
+ "@tanstack/devtools-ui": "0.3.2"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "solid-js": ">=1.9.7"
@@ -43,7 +43,6 @@ const stylesFactory = () => {
43
43
  display: flex;
44
44
  flex-direction: column;
45
45
  gap: 0.5rem;
46
- margin: 1.5rem;
47
46
  margin-bottom: 2rem;
48
47
  border-radius: 0.75rem;
49
48
  `,
@@ -407,42 +406,6 @@ const stylesFactory = () => {
407
406
  overflow-y: auto;
408
407
  `,
409
408
 
410
- settingsContainer: css`
411
- padding: 1.5rem;
412
- height: 100%;
413
- overflow-y: auto;
414
- background-color: ${colors.darkGray[700]};
415
- `,
416
- settingsSection: css`
417
- margin-bottom: 2rem;
418
- padding: 1.5rem;
419
- background-color: ${colors.darkGray[800]};
420
- border: 1px solid ${colors.gray[700]};
421
- border-radius: 0.75rem;
422
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
423
- `,
424
- sectionTitle: css`
425
- font-size: 1.125rem;
426
- font-weight: 600;
427
- color: ${colors.gray[100]};
428
- margin: 0 0 1rem 0;
429
- padding-bottom: 0.5rem;
430
- border-bottom: 1px solid ${colors.gray[700]};
431
- display: flex;
432
- align-items: center;
433
- gap: 0.5rem;
434
- text-align: left;
435
- `,
436
- sectionIcon: css`
437
- color: ${colors.purple[400]};
438
- `,
439
- sectionDescription: css`
440
- color: ${colors.gray[400]};
441
- font-size: 0.875rem;
442
- margin: 0 0 1.5rem 0;
443
- line-height: 1.5;
444
- text-align: left;
445
- `,
446
409
  settingsGroup: css`
447
410
  display: flex;
448
411
  flex-direction: column;
@@ -1,4 +1,11 @@
1
1
  import { For, createSignal } from 'solid-js'
2
+ import {
3
+ MainPanel,
4
+ Section,
5
+ SectionDescription,
6
+ SectionIcon,
7
+ SectionTitle,
8
+ } from '@tanstack/devtools-ui'
2
9
  import { useStyles } from '../styles/use-styles'
3
10
  import { useHeadChanges } from '../hooks/use-head-changes'
4
11
 
@@ -174,32 +181,33 @@ export const SeoTab = () => {
174
181
  })
175
182
 
176
183
  return (
177
- <div class={styles().seoTabContainer}>
178
- <section class={styles().seoTabSection}>
179
- <h3 class={styles().sectionTitle}>
180
- <svg
181
- class={styles().sectionIcon}
182
- xmlns="http://www.w3.org/2000/svg"
183
- width="24"
184
- height="24"
185
- viewBox="0 0 24 24"
186
- fill="none"
187
- stroke="currentColor"
188
- stroke-width="2"
189
- stroke-linecap="round"
190
- stroke-linejoin="round"
191
- >
192
- <path d="m10 9-3 3 3 3" />
193
- <path d="m14 15 3-3-3-3" />
194
- <path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" />
195
- </svg>
184
+ <MainPanel withPadding>
185
+ <Section>
186
+ <SectionTitle>
187
+ <SectionIcon>
188
+ <svg
189
+ xmlns="http://www.w3.org/2000/svg"
190
+ width="20"
191
+ height="20"
192
+ viewBox="0 0 24 24"
193
+ fill="none"
194
+ stroke="currentColor"
195
+ stroke-width="2"
196
+ stroke-linecap="round"
197
+ stroke-linejoin="round"
198
+ >
199
+ <path d="m10 9-3 3 3 3" />
200
+ <path d="m14 15 3-3-3-3" />
201
+ <path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" />
202
+ </svg>
203
+ </SectionIcon>
196
204
  Social previews
197
- </h3>
198
- <p class={styles().sectionDescription}>
205
+ </SectionTitle>
206
+ <SectionDescription>
199
207
  See how your current page will look when shared on popular social
200
208
  networks. The tool checks for essential meta tags and highlights any
201
209
  that are missing.
202
- </p>
210
+ </SectionDescription>
203
211
  <div class={styles().seoPreviewSection}>
204
212
  <For each={reports()}>
205
213
  {(report, i) => {
@@ -231,8 +239,7 @@ export const SeoTab = () => {
231
239
  }}
232
240
  </For>
233
241
  </div>
234
- </section>
235
- {/* Future sections can be added here as <section class={styles().seoTabSection}>...</section> */}
236
- </div>
242
+ </Section>
243
+ </MainPanel>
237
244
  )
238
245
  }
@@ -1,5 +1,15 @@
1
1
  import { Show, createMemo } from 'solid-js'
2
- import { Button, Checkbox, Input, Select } from '@tanstack/devtools-ui'
2
+ import {
3
+ Button,
4
+ Checkbox,
5
+ Input,
6
+ MainPanel,
7
+ Section,
8
+ SectionDescription,
9
+ SectionIcon,
10
+ SectionTitle,
11
+ Select,
12
+ } from '@tanstack/devtools-ui'
3
13
  import { useDevtoolsSettings } from '../context/use-devtools-context'
4
14
  import { uppercaseFirstLetter } from '../utils/sanitize'
5
15
  import { useStyles } from '../styles/use-styles'
@@ -27,30 +37,31 @@ export const SettingsTab = () => {
27
37
  })
28
38
  }
29
39
  return (
30
- <div class={styles().settingsContainer}>
40
+ <MainPanel withPadding>
31
41
  {/* General Settings */}
32
- <div class={styles().settingsSection}>
33
- <h3 class={styles().sectionTitle}>
34
- <svg
35
- xmlns="http://www.w3.org/2000/svg"
36
- width="20"
37
- height="20"
38
- viewBox="0 0 24 24"
39
- fill="none"
40
- stroke="currentColor"
41
- stroke-width="2"
42
- stroke-linecap="round"
43
- stroke-linejoin="round"
44
- class={styles().sectionIcon}
45
- >
46
- <path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" />
47
- <circle cx="12" cy="12" r="3" />
48
- </svg>
42
+ <Section>
43
+ <SectionTitle>
44
+ <SectionIcon>
45
+ <svg
46
+ xmlns="http://www.w3.org/2000/svg"
47
+ width="20"
48
+ height="20"
49
+ viewBox="0 0 24 24"
50
+ fill="none"
51
+ stroke="currentColor"
52
+ stroke-width="2"
53
+ stroke-linecap="round"
54
+ stroke-linejoin="round"
55
+ >
56
+ <path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" />
57
+ <circle cx="12" cy="12" r="3" />
58
+ </svg>
59
+ </SectionIcon>
49
60
  General
50
- </h3>
51
- <p class={styles().sectionDescription}>
61
+ </SectionTitle>
62
+ <SectionDescription>
52
63
  Configure general behavior of the devtools panel.
53
- </p>
64
+ </SectionDescription>
54
65
  <div class={styles().settingsGroup}>
55
66
  <Checkbox
56
67
  label="Default open"
@@ -69,32 +80,33 @@ export const SettingsTab = () => {
69
80
  checked={settings().hideUntilHover}
70
81
  />
71
82
  </div>
72
- </div>
83
+ </Section>
73
84
 
74
85
  {/* URL Flag Settings */}
75
- <div class={styles().settingsSection}>
76
- <h3 class={styles().sectionTitle}>
77
- <svg
78
- class={styles().sectionIcon}
79
- xmlns="http://www.w3.org/2000/svg"
80
- width="20"
81
- height="20"
82
- viewBox="0 0 24 24"
83
- fill="none"
84
- stroke="currentColor"
85
- stroke-width="2"
86
- stroke-linecap="round"
87
- stroke-linejoin="round"
88
- >
89
- <path d="M9 17H7A5 5 0 0 1 7 7h2" />
90
- <path d="M15 7h2a5 5 0 1 1 0 10h-2" />
91
- <line x1="8" x2="16" y1="12" y2="12" />
92
- </svg>
86
+ <Section>
87
+ <SectionTitle>
88
+ <SectionIcon>
89
+ <svg
90
+ xmlns="http://www.w3.org/2000/svg"
91
+ width="20"
92
+ height="20"
93
+ viewBox="0 0 24 24"
94
+ fill="none"
95
+ stroke="currentColor"
96
+ stroke-width="2"
97
+ stroke-linecap="round"
98
+ stroke-linejoin="round"
99
+ >
100
+ <path d="M9 17H7A5 5 0 0 1 7 7h2" />
101
+ <path d="M15 7h2a5 5 0 1 1 0 10h-2" />
102
+ <line x1="8" x2="16" y1="12" y2="12" />
103
+ </svg>
104
+ </SectionIcon>
93
105
  URL Configuration
94
- </h3>
95
- <p class={styles().sectionDescription}>
106
+ </SectionTitle>
107
+ <SectionDescription>
96
108
  Control when devtools are available based on URL parameters.
97
- </p>
109
+ </SectionDescription>
98
110
  <div class={styles().settingsGroup}>
99
111
  <Checkbox
100
112
  label="Require URL Flag"
@@ -122,38 +134,39 @@ export const SettingsTab = () => {
122
134
  </div>
123
135
  </Show>
124
136
  </div>
125
- </div>
137
+ </Section>
126
138
 
127
139
  {/* Keyboard Settings */}
128
- <div class={styles().settingsSection}>
129
- <h3 class={styles().sectionTitle}>
130
- <svg
131
- class={styles().sectionIcon}
132
- xmlns="http://www.w3.org/2000/svg"
133
- width="20"
134
- height="20"
135
- viewBox="0 0 24 24"
136
- fill="none"
137
- stroke="currentColor"
138
- stroke-width="2"
139
- stroke-linecap="round"
140
- stroke-linejoin="round"
141
- >
142
- <path d="M10 8h.01" />
143
- <path d="M12 12h.01" />
144
- <path d="M14 8h.01" />
145
- <path d="M16 12h.01" />
146
- <path d="M18 8h.01" />
147
- <path d="M6 8h.01" />
148
- <path d="M7 16h10" />
149
- <path d="M8 12h.01" />
150
- <rect width="20" height="16" x="2" y="4" rx="2" />
151
- </svg>
140
+ <Section>
141
+ <SectionTitle>
142
+ <SectionIcon>
143
+ <svg
144
+ xmlns="http://www.w3.org/2000/svg"
145
+ width="20"
146
+ height="20"
147
+ viewBox="0 0 24 24"
148
+ fill="none"
149
+ stroke="currentColor"
150
+ stroke-width="2"
151
+ stroke-linecap="round"
152
+ stroke-linejoin="round"
153
+ >
154
+ <path d="M10 8h.01" />
155
+ <path d="M12 12h.01" />
156
+ <path d="M14 8h.01" />
157
+ <path d="M16 12h.01" />
158
+ <path d="M18 8h.01" />
159
+ <path d="M6 8h.01" />
160
+ <path d="M7 16h10" />
161
+ <path d="M8 12h.01" />
162
+ <rect width="20" height="16" x="2" y="4" rx="2" />
163
+ </svg>
164
+ </SectionIcon>
152
165
  Keyboard
153
- </h3>
154
- <p class={styles().sectionDescription}>
166
+ </SectionTitle>
167
+ <SectionDescription>
155
168
  Customize keyboard shortcuts for quick access.
156
- </p>
169
+ </SectionDescription>
157
170
  <div class={styles().settingsGroup}>
158
171
  <div class={styles().settingsModifiers}>
159
172
  <Show keyed when={hotkey()}>
@@ -220,31 +233,32 @@ export const SettingsTab = () => {
220
233
  />
221
234
  Final shortcut is: {hotkey().join(' + ')}
222
235
  </div>
223
- </div>
236
+ </Section>
224
237
 
225
238
  {/* Position Settings */}
226
- <div class={styles().settingsSection}>
227
- <h3 class={styles().sectionTitle}>
228
- <svg
229
- class={styles().sectionIcon}
230
- xmlns="http://www.w3.org/2000/svg"
231
- width="20"
232
- height="20"
233
- viewBox="0 0 24 24"
234
- fill="none"
235
- stroke="currentColor"
236
- stroke-width="2"
237
- stroke-linecap="round"
238
- stroke-linejoin="round"
239
- >
240
- <path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" />
241
- <circle cx="12" cy="10" r="3" />
242
- </svg>
239
+ <Section>
240
+ <SectionTitle>
241
+ <SectionIcon>
242
+ <svg
243
+ xmlns="http://www.w3.org/2000/svg"
244
+ width="20"
245
+ height="20"
246
+ viewBox="0 0 24 24"
247
+ fill="none"
248
+ stroke="currentColor"
249
+ stroke-width="2"
250
+ stroke-linecap="round"
251
+ stroke-linejoin="round"
252
+ >
253
+ <path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" />
254
+ <circle cx="12" cy="10" r="3" />
255
+ </svg>
256
+ </SectionIcon>
243
257
  Position
244
- </h3>
245
- <p class={styles().sectionDescription}>
258
+ </SectionTitle>
259
+ <SectionDescription>
246
260
  Adjust the position of the trigger button and devtools panel.
247
- </p>
261
+ </SectionDescription>
248
262
  <div class={styles().settingsGroup}>
249
263
  <div class={styles().settingRow}>
250
264
  <Select
@@ -279,7 +293,7 @@ export const SettingsTab = () => {
279
293
  />
280
294
  </div>
281
295
  </div>
282
- </div>
283
- </div>
296
+ </Section>
297
+ </MainPanel>
284
298
  )
285
299
  }