@couch-kit/devtools 0.2.7 → 0.2.9
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/CHANGELOG.md +14 -0
- package/README.md +23 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @couch-kit/devtools
|
|
2
2
|
|
|
3
|
+
## 0.2.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @couch-kit/client@0.8.8
|
|
9
|
+
|
|
10
|
+
## 0.2.8
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`7897e88`](https://github.com/faluciano/react-native-couch-kit/commit/7897e887967c440b5b973c8dc753bf1fa705b993)]:
|
|
15
|
+
- @couch-kit/client@0.8.7
|
|
16
|
+
|
|
3
17
|
## 0.2.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @couch-kit/devtools
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Debug overlay component for Couch Kit web controllers. Displays connection status, game state, and action history in a collapsible panel.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -8,17 +8,37 @@ Developer tooling and debug overlay for Couch Kit games.
|
|
|
8
8
|
bun add @couch-kit/devtools
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
Requires `@couch-kit/client` as a peer dependency (provides the `useDebugPanel` hook that feeds data to the overlay).
|
|
12
|
+
|
|
11
13
|
## Usage
|
|
12
14
|
|
|
15
|
+
Wire `useDebugPanel` (from `@couch-kit/client`) to the `DebugOverlay` component:
|
|
16
|
+
|
|
13
17
|
```tsx
|
|
18
|
+
import { useGameClient, useDebugPanel } from "@couch-kit/client";
|
|
14
19
|
import { DebugOverlay } from "@couch-kit/devtools";
|
|
20
|
+
import { gameReducer, initialState } from "./shared/types";
|
|
15
21
|
|
|
16
22
|
function App() {
|
|
23
|
+
const client = useGameClient({ reducer: gameReducer, initialState });
|
|
24
|
+
const debugData = useDebugPanel(client);
|
|
25
|
+
|
|
17
26
|
return (
|
|
18
27
|
<div>
|
|
19
|
-
<Game />
|
|
20
|
-
<DebugOverlay />
|
|
28
|
+
<Game {...client} />
|
|
29
|
+
{import.meta.env.DEV && <DebugOverlay data={debugData} />}
|
|
21
30
|
</div>
|
|
22
31
|
);
|
|
23
32
|
}
|
|
24
33
|
```
|
|
34
|
+
|
|
35
|
+
## Props
|
|
36
|
+
|
|
37
|
+
| Prop | Type | Default | Description |
|
|
38
|
+
| ------------------ | ------------------------------------------------------------- | --------------- | ---------------------------------------- |
|
|
39
|
+
| `data` | `DebugPanelData` (from `@couch-kit/client`) | **required** | Debug data from `useDebugPanel` |
|
|
40
|
+
| `defaultCollapsed` | `boolean` | `false` | Start collapsed |
|
|
41
|
+
| `position` | `"top-left" \| "top-right" \| "bottom-left" \| "bottom-right"` | `"bottom-right"` | Screen corner to anchor the panel |
|
|
42
|
+
| `maxHeight` | `number` | `400` | Maximum pixel height of the panel body |
|
|
43
|
+
|
|
44
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@couch-kit/devtools",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Developer tooling and debug overlay for Couch Kit games",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@couch-kit/client": "0.8.
|
|
32
|
-
"@couch-kit/core": "0.9.
|
|
33
|
-
"@types/react": "^19.
|
|
31
|
+
"@couch-kit/client": "0.8.8",
|
|
32
|
+
"@couch-kit/core": "0.9.2",
|
|
33
|
+
"@types/react": "^19.2.17",
|
|
34
34
|
"react": "^18.2.0",
|
|
35
|
-
"typescript": "^
|
|
35
|
+
"typescript": "^6.0.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@couch-kit/client": "0.8.
|
|
38
|
+
"@couch-kit/client": "0.8.8",
|
|
39
39
|
"react": ">=18.0.0"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|