Skip to content

Commit

Permalink
Merge pull request #19 from iway1/feature/search
Browse files Browse the repository at this point in the history
Feature/search
  • Loading branch information
iway1 authored Dec 21, 2022
2 parents 14fb0b4 + 9f5cdac commit 8d700eb
Show file tree
Hide file tree
Showing 23 changed files with 845 additions and 502 deletions.
243 changes: 0 additions & 243 deletions packages/dev-app/src/router.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/test-app/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export const testRouter = t.router({
enum: z.enum(["One", "Two"]),
optionalEnum: z.enum(["Three", "Four"]).optional(),
stringArray: z.string().array(),
boolean: z.boolean(),
union: z.discriminatedUnion("disc", [
z.object({
disc: z.literal("one"),
Expand Down
2 changes: 1 addition & 1 deletion packages/trpc-panel/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ module.exports = {
moduleNameMapper: {
"@src/(.*)": "<rootDir>/src/$1",
},
modulePathIgnorePatterns: ["src/render.ts", "src/index.ts", "utils"],
modulePathIgnorePatterns: ["src/render.ts", "src/index.ts", "utils", "lib"],
};
5 changes: 4 additions & 1 deletion packages/trpc-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"react-dom": "^18.2.0",
"react-hook-form": "^7.39.5",
"react-hot-toast": "^2.4.0",
"react-hotkeys-hook": "^4.0.6",
"rollup": "^3.7.4",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-livereload": "^2.0.5",
Expand All @@ -81,10 +82,12 @@
"tslib": "^2.4.1",
"typescript": "^4.9.3",
"url": "^0.11.0",
"zod": "^3.19.1"
"zod": "^3.19.1",
"zustand": "^4.1.5"
},
"dependencies": {
"fs": "^0.0.1-security",
"fuzzysort": "^2.0.4",
"path": "^0.12.7",
"url": "^0.11.0",
"zod-to-json-schema": "^3.20.0"
Expand Down
33 changes: 21 additions & 12 deletions packages/trpc-panel/src/react-app/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ import {
} from "@src/react-app/components/contexts/HeadersContext";
import { HeadersPopup } from "@src/react-app/components/HeadersPopup";
import { Toaster } from "react-hot-toast";
import { CollapsableContextProvider } from "@src/react-app/components/CollapsableContext";
import { SideNav } from "./SideNav";
import { TopBar } from "./TopBar";
import { SiteNavigationContextProvider } from "@src/react-app/components/contexts/SiteNavigationContext";
import { SideNav } from "./components/SideNav";
import { TopBar } from "./components/TopBar";
import superjson from "superjson";
import { AllPathsContextProvider } from "@src/react-app/components/contexts/AllPathsContext";
import { HotKeysContextProvider } from "@src/react-app/components/contexts/HotKeysContext";
import { SearchOverlay } from "@src/react-app/components/SearchInputOverlay";

export function RootComponent({
rootRouter,
Expand All @@ -26,15 +29,21 @@ export function RootComponent({
}) {
const headers = useHeaders();
return (
<CollapsableContextProvider>
<HeadersContext.Provider value={headers}>
<ClientProviders trpc={trpc} options={options}>
<div className="flex flex-col w-full h-full flex-1 relative">
<AppInnards rootRouter={rootRouter} />
</div>
</ClientProviders>
</HeadersContext.Provider>
</CollapsableContextProvider>
<SiteNavigationContextProvider>
<AllPathsContextProvider rootRouter={rootRouter}>
<HeadersContext.Provider value={headers}>
<ClientProviders trpc={trpc} options={options}>
<HotKeysContextProvider>
<SearchOverlay>
<div className="flex flex-col w-full h-full flex-1 relative">
<AppInnards rootRouter={rootRouter} />
</div>
</SearchOverlay>
</HotKeysContextProvider>
</ClientProviders>
</HeadersContext.Provider>
</AllPathsContextProvider>
</SiteNavigationContextProvider>
);
}

Expand Down
Loading

0 comments on commit 8d700eb

Please sign in to comment.