Skip to content

Commit 0ca795e

Browse files
authored
Add bippy to the project (#175)
* Add bippy to the project * bippy added inspector * version bump
1 parent 4924449 commit 0ca795e

File tree

11 files changed

+235
-222
lines changed

11 files changed

+235
-222
lines changed

package-lock.json

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-router-devtools",
33
"description": "Devtools for React Router - debug, trace, find hydration errors, catch bugs and inspect server/client data with react-router-devtools",
44
"author": "Alem Tuzlak",
5-
"version": "1.0.6",
5+
"version": "1.1.0",
66
"license": "MIT",
77
"keywords": [
88
"react-router",
@@ -123,6 +123,7 @@
123123
"@vitest/coverage-v8": "^2.1.5",
124124
"@vitest/ui": "^2.1.5",
125125
"autoprefixer": "^10.4.20",
126+
"bippy": "^0.2.2",
126127
"glob": "^11.0.0",
127128
"happy-dom": "^15.7.4",
128129
"jest-preview": "^0.3.1",

src/client/context/RDTContext.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export type RdtClientConfig = Pick<
110110
| "requireUrlFlag"
111111
| "openHotkey"
112112
| "urlFlag"
113+
| "enableInspector"
113114
| "routeBoundaryGradient"
114115
>
115116

src/client/context/rdtReducer.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ export type ReactRouterDevtoolsState = {
6363
timeline: TimelineEvent[]
6464
terminals: Terminal[]
6565
settings: {
66+
/**
67+
* Enables the bippy inspector to inspect react components
68+
*/
69+
enableInspector: boolean
6670
/**
6771
* The breakpoints to show in the corner so you can see the current breakpoint that you defined
6872
*/
@@ -165,6 +169,7 @@ export const initialState: ReactRouterDevtoolsState = {
165169
terminals: [{ id: 0, locked: false, output: [], history: [] }],
166170
server: undefined,
167171
settings: {
172+
enableInspector: false,
168173
showRouteBoundariesOn: "click",
169174
breakpoints: [
170175
{ name: "", min: 0, max: 639 },

src/client/embedded-dev-tools.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useEffect, useState } from "react"
33
import { useLocation } from "react-router"
44
import { RDTContextProvider } from "./context/RDTContext.js"
55
import { useSettingsContext } from "./context/useRDTContext.js"
6-
import { useBorderedRoutes } from "./hooks/useBorderedRoutes.js"
6+
import { useReactTreeListeners } from "./hooks/useReactTreeListeners.js"
77
import { useSetRouteBoundaries } from "./hooks/useSetRouteBoundaries.js"
88
import { useTimelineHandler } from "./hooks/useTimelineHandler.js"
99
import { ContentPanel } from "./layout/ContentPanel.js"
@@ -18,7 +18,7 @@ export interface EmbeddedDevToolsProps extends ReactRouterDevtoolsProps {
1818
}
1919
const Embedded = ({ plugins: pluginArray, mainPanelClassName, className }: EmbeddedDevToolsProps) => {
2020
useTimelineHandler()
21-
useBorderedRoutes()
21+
useReactTreeListeners()
2222
useSetRouteBoundaries()
2323
const { settings } = useSettingsContext()
2424
const { position } = settings

src/client/hooks/useBorderedRoutes.ts

Lines changed: 0 additions & 213 deletions
This file was deleted.

0 commit comments

Comments
 (0)