Skip to content

Commit 4508d9c

Browse files
authored
Merge pull request #6 from TanStack/feat/document-devtools-in-readme
chore: cleanup package exports and add basic docs
2 parents 80745ca + e258bfd commit 4508d9c

File tree

32 files changed

+531
-111
lines changed

32 files changed

+531
-111
lines changed

.changeset/ninety-badgers-feel.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@tanstack/react-devtools': minor
3+
'@tanstack/solid-devtools': minor
4+
'@tanstack/devtools': minor
5+
---
6+
7+
Initial alpha release of @tanstack/devtools

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,40 @@ Install one of the following packages based on your framework of choice:
6565
```bash
6666
# Npm
6767
npm install @tanstack/react-devtools
68+
npm install @tanstack/solid-devtools
6869
npm install @tanstack/devtools # no framework, just vanilla js
6970
```
7071

72+
## Usage
73+
74+
### React
75+
76+
```tsx
77+
import { TanstackDevtools } from '@tanstack/react-devtools'
78+
import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools'
79+
import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools'
80+
81+
function App() {
82+
return (
83+
<div>
84+
<h1>My App</h1>
85+
<TanstackDevtools
86+
plugins={[
87+
{
88+
name: 'Tanstack Query',
89+
render: <ReactQueryDevtoolsPanel />,
90+
},
91+
{
92+
name: 'Tanstack Router',
93+
render: <TanStackRouterDevtoolsPanel router={router} />,
94+
},
95+
]}
96+
/>
97+
</div>
98+
)
99+
}
100+
```
101+
71102
## Development
72103

73104
To contribute to the development of TanStack Devtools, you can clone the repository and run the following commands:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
id: TanstackDevtools
3+
title: TanstackDevtools
4+
---
5+
6+
<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7+
8+
# Function: TanstackDevtools()
9+
10+
```ts
11+
function TanstackDevtools(__namedParameters): Element
12+
```
13+
14+
Defined in: [devtools.tsx:32](https://github.com/TanStack/devtools/blob/main/packages/solid-devtools/src/devtools.tsx#L32)
15+
16+
## Parameters
17+
18+
### \_\_namedParameters
19+
20+
`TanstackDevtoolsInit`
21+
22+
## Returns
23+
24+
`Element`

docs/framework/solid/reference/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,11 @@ title: "@tanstack/solid-devtools"
66
<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
77

88
# @tanstack/solid-devtools
9+
10+
## Type Aliases
11+
12+
- [TanStackDevtoolsSolidPlugin](type-aliases/tanstackdevtoolssolidplugin.md)
13+
14+
## Functions
15+
16+
- [TanstackDevtools](functions/tanstackdevtools.md)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
id: TanStackDevtoolsSolidPlugin
3+
title: TanStackDevtoolsSolidPlugin
4+
---
5+
6+
<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7+
8+
# Type Alias: TanStackDevtoolsSolidPlugin
9+
10+
```ts
11+
type TanStackDevtoolsSolidPlugin = Omit<TanStackDevtoolsPlugin, "render" | "name"> & object;
12+
```
13+
14+
Defined in: [devtools.tsx:20](https://github.com/TanStack/devtools/blob/main/packages/solid-devtools/src/devtools.tsx#L20)
15+
16+
## Type declaration
17+
18+
### name
19+
20+
```ts
21+
name: string | SolidPluginRender;
22+
```
23+
24+
### render
25+
26+
```ts
27+
render: SolidPluginRender;
28+
```
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
id: TanStackDevtoolsCore
3+
title: TanStackDevtoolsCore
4+
---
5+
6+
<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7+
8+
# Class: TanStackDevtoolsCore
9+
10+
Defined in: [core.tsx:15](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/core.tsx#L15)
11+
12+
## Constructors
13+
14+
### new TanStackDevtoolsCore()
15+
16+
```ts
17+
new TanStackDevtoolsCore(init): TanStackDevtoolsCore
18+
```
19+
20+
Defined in: [core.tsx:24](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/core.tsx#L24)
21+
22+
#### Parameters
23+
24+
##### init
25+
26+
[`TanStackDevtoolsInit`](../interfaces/tanstackdevtoolsinit.md)
27+
28+
#### Returns
29+
30+
[`TanStackDevtoolsCore`](tanstackdevtoolscore.md)
31+
32+
## Methods
33+
34+
### mount()
35+
36+
```ts
37+
mount<T>(el): void
38+
```
39+
40+
Defined in: [core.tsx:32](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/core.tsx#L32)
41+
42+
#### Type Parameters
43+
44+
**T** *extends* `HTMLElement`
45+
46+
#### Parameters
47+
48+
##### el
49+
50+
`T`
51+
52+
#### Returns
53+
54+
`void`
55+
56+
***
57+
58+
### setConfig()
59+
60+
```ts
61+
setConfig(config): void
62+
```
63+
64+
Defined in: [core.tsx:63](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/core.tsx#L63)
65+
66+
#### Parameters
67+
68+
##### config
69+
70+
`Partial`\<[`TanStackDevtoolsInit`](../interfaces/tanstackdevtoolsinit.md)\>
71+
72+
#### Returns
73+
74+
`void`
75+
76+
***
77+
78+
### unmount()
79+
80+
```ts
81+
unmount(): void
82+
```
83+
84+
Defined in: [core.tsx:55](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/core.tsx#L55)
85+
86+
#### Returns
87+
88+
`void`

docs/reference/index.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ title: "@tanstack/devtools"
77

88
# @tanstack/devtools
99

10+
## Classes
11+
12+
- [TanStackDevtoolsCore](classes/tanstackdevtoolscore.md)
13+
14+
## Interfaces
15+
16+
- [TanStackDevtoolsInit](interfaces/tanstackdevtoolsinit.md)
17+
- [TanStackDevtoolsPlugin](interfaces/tanstackdevtoolsplugin.md)
18+
19+
## Type Aliases
20+
21+
- [TanStackDevtoolsConfig](type-aliases/tanstackdevtoolsconfig.md)
22+
1023
## Variables
1124

12-
- [devtools](variables/devtools.md)
25+
- [PLUGIN\_CONTAINER\_ID](variables/plugin_container_id.md)
26+
- [PLUGIN\_TITLE\_CONTAINER\_ID](variables/plugin_title_container_id.md)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
id: TanStackDevtoolsInit
3+
title: TanStackDevtoolsInit
4+
---
5+
6+
<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7+
8+
# Interface: TanStackDevtoolsInit
9+
10+
Defined in: [core.tsx:10](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/core.tsx#L10)
11+
12+
## Properties
13+
14+
### config?
15+
16+
```ts
17+
optional config: Partial<{
18+
defaultOpen: boolean;
19+
hideUntilHover: boolean;
20+
openHotkey: KeyboardKey[];
21+
panelLocation: "top" | "bottom";
22+
position: TriggerPosition;
23+
requireUrlFlag: boolean;
24+
urlFlag: string;
25+
}>;
26+
```
27+
28+
Defined in: [core.tsx:11](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/core.tsx#L11)
29+
30+
***
31+
32+
### plugins?
33+
34+
```ts
35+
optional plugins: TanStackDevtoolsPlugin[];
36+
```
37+
38+
Defined in: [core.tsx:12](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/core.tsx#L12)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
id: TanStackDevtoolsPlugin
3+
title: TanStackDevtoolsPlugin
4+
---
5+
6+
<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7+
8+
# Interface: TanStackDevtoolsPlugin
9+
10+
Defined in: [context/devtools-context.tsx:15](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L15)
11+
12+
## Properties
13+
14+
### id?
15+
16+
```ts
17+
optional id: string;
18+
```
19+
20+
Defined in: [context/devtools-context.tsx:17](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L17)
21+
22+
***
23+
24+
### name
25+
26+
```ts
27+
name: string | (el) => void;
28+
```
29+
30+
Defined in: [context/devtools-context.tsx:16](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L16)
31+
32+
***
33+
34+
### render()
35+
36+
```ts
37+
render: (el) => void;
38+
```
39+
40+
Defined in: [context/devtools-context.tsx:18](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L18)
41+
42+
#### Parameters
43+
44+
##### el
45+
46+
`HTMLDivElement`
47+
48+
#### Returns
49+
50+
`void`
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
id: TanStackDevtoolsConfig
3+
title: TanStackDevtoolsConfig
4+
---
5+
6+
<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7+
8+
# Type Alias: TanStackDevtoolsConfig
9+
10+
```ts
11+
type TanStackDevtoolsConfig = DevtoolsStore["settings"];
12+
```
13+
14+
Defined in: [context/devtools-context.tsx:82](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L82)

0 commit comments

Comments
 (0)