Skip to content

Commit

Permalink
Add bippy to the project (#175)
Browse files Browse the repository at this point in the history
* Add bippy to the project

* bippy added inspector

* version bump
  • Loading branch information
AlemTuzlak authored Jan 9, 2025
1 parent 4924449 commit 0ca795e
Show file tree
Hide file tree
Showing 11 changed files with 235 additions and 222 deletions.
11 changes: 9 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-router-devtools",
"description": "Devtools for React Router - debug, trace, find hydration errors, catch bugs and inspect server/client data with react-router-devtools",
"author": "Alem Tuzlak",
"version": "1.0.6",
"version": "1.1.0",
"license": "MIT",
"keywords": [
"react-router",
Expand Down Expand Up @@ -123,6 +123,7 @@
"@vitest/coverage-v8": "^2.1.5",
"@vitest/ui": "^2.1.5",
"autoprefixer": "^10.4.20",
"bippy": "^0.2.2",
"glob": "^11.0.0",
"happy-dom": "^15.7.4",
"jest-preview": "^0.3.1",
Expand Down
1 change: 1 addition & 0 deletions src/client/context/RDTContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export type RdtClientConfig = Pick<
| "requireUrlFlag"
| "openHotkey"
| "urlFlag"
| "enableInspector"
| "routeBoundaryGradient"
>

Expand Down
5 changes: 5 additions & 0 deletions src/client/context/rdtReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ export type ReactRouterDevtoolsState = {
timeline: TimelineEvent[]
terminals: Terminal[]
settings: {
/**
* Enables the bippy inspector to inspect react components
*/
enableInspector: boolean
/**
* The breakpoints to show in the corner so you can see the current breakpoint that you defined
*/
Expand Down Expand Up @@ -165,6 +169,7 @@ export const initialState: ReactRouterDevtoolsState = {
terminals: [{ id: 0, locked: false, output: [], history: [] }],
server: undefined,
settings: {
enableInspector: false,
showRouteBoundariesOn: "click",
breakpoints: [
{ name: "", min: 0, max: 639 },
Expand Down
4 changes: 2 additions & 2 deletions src/client/embedded-dev-tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect, useState } from "react"
import { useLocation } from "react-router"
import { RDTContextProvider } from "./context/RDTContext.js"
import { useSettingsContext } from "./context/useRDTContext.js"
import { useBorderedRoutes } from "./hooks/useBorderedRoutes.js"
import { useReactTreeListeners } from "./hooks/useReactTreeListeners.js"
import { useSetRouteBoundaries } from "./hooks/useSetRouteBoundaries.js"
import { useTimelineHandler } from "./hooks/useTimelineHandler.js"
import { ContentPanel } from "./layout/ContentPanel.js"
Expand All @@ -18,7 +18,7 @@ export interface EmbeddedDevToolsProps extends ReactRouterDevtoolsProps {
}
const Embedded = ({ plugins: pluginArray, mainPanelClassName, className }: EmbeddedDevToolsProps) => {
useTimelineHandler()
useBorderedRoutes()
useReactTreeListeners()
useSetRouteBoundaries()
const { settings } = useSettingsContext()
const { position } = settings
Expand Down
213 changes: 0 additions & 213 deletions src/client/hooks/useBorderedRoutes.ts

This file was deleted.

Loading

0 comments on commit 0ca795e

Please sign in to comment.