@env-hopper/frontend-core 2.0.1-alpha
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/LICENSE +21 -0
- package/dist/apple-touch-180x180.png +0 -0
- package/dist/disable.well-known/appspecific/com.chrome.devtools.json +6 -0
- package/dist/env-hopper-16x16.png +0 -0
- package/dist/env-hopper-192x192.png +0 -0
- package/dist/env-hopper-32x32.png +0 -0
- package/dist/env-hopper-48x48.png +0 -0
- package/dist/env-hopper-512x512.png +0 -0
- package/dist/env-hopper-square.svg +114 -0
- package/dist/esm/App.d.ts +12 -0
- package/dist/esm/App.js +12 -0
- package/dist/esm/App.js.map +1 -0
- package/dist/esm/__tests__/modules/fuzzyMatchLogic/autoCompleteFilter.test.d.ts +1 -0
- package/dist/esm/__tests__/modules/fuzzyMatchLogic/features/prefixFracTokenMiddles.test.d.ts +1 -0
- package/dist/esm/__tests__/modules/fuzzyMatchLogic/fixLayout.test.d.ts +1 -0
- package/dist/esm/__tests__/modules/fuzzyMatchLogic/postFiltration.test.d.ts +1 -0
- package/dist/esm/__tests__/modules/fuzzyMatchLogic/testUtils.d.ts +2 -0
- package/dist/esm/__tests__/modules/fuzzyMatchLogic/tokenize.test.d.ts +1 -0
- package/dist/esm/__tests__/modules/resouceJump/findBestMatchByUrl.test.d.ts +1 -0
- package/dist/esm/__tests__/setupTests.d.ts +0 -0
- package/dist/esm/__tests__/util/availabilityMatrixUtils.test.d.ts +1 -0
- package/dist/esm/api/ApiQueryMagazine.d.ts +12 -0
- package/dist/esm/api/ApiQueryMagazine.js +16 -0
- package/dist/esm/api/ApiQueryMagazine.js.map +1 -0
- package/dist/esm/api/data/useQueryBootstrapConfig.d.ts +3 -0
- package/dist/esm/api/data/useQueryBootstrapConfig.js +14 -0
- package/dist/esm/api/data/useQueryBootstrapConfig.js.map +1 -0
- package/dist/esm/api/infra/createQueryClient.d.ts +7 -0
- package/dist/esm/api/infra/createQueryClient.js +23 -0
- package/dist/esm/api/infra/createQueryClient.js.map +1 -0
- package/dist/esm/api/infra/trpc.d.ts +93 -0
- package/dist/esm/api/infra/trpc.js +8 -0
- package/dist/esm/api/infra/trpc.js.map +1 -0
- package/dist/esm/api/unsorted/indexDataFetcher.d.ts +11 -0
- package/dist/esm/api/unsorted/indexDataFetcher.js +35 -0
- package/dist/esm/api/unsorted/indexDataFetcher.js.map +1 -0
- package/dist/esm/appPropsFactory.d.ts +2 -0
- package/dist/esm/appPropsFactory.js +32 -0
- package/dist/esm/appPropsFactory.js.map +1 -0
- package/dist/esm/assets/env-hopper-logo.svg.js +16 -0
- package/dist/esm/assets/env-hopper-logo.svg.js.map +1 -0
- package/dist/esm/components/ThemeSwitcher.d.ts +1 -0
- package/dist/esm/components/ThemeSwitcher.js +25 -0
- package/dist/esm/components/ThemeSwitcher.js.map +1 -0
- package/dist/esm/components/theme-provider.d.ts +2 -0
- package/dist/esm/components/theme-provider.js +10 -0
- package/dist/esm/components/theme-provider.js.map +1 -0
- package/dist/esm/components/ui/badge.d.ts +9 -0
- package/dist/esm/components/ui/breadcrumb.d.ts +46 -0
- package/dist/esm/components/ui/button.d.ts +16 -0
- package/dist/esm/components/ui/button.js +52 -0
- package/dist/esm/components/ui/button.js.map +1 -0
- package/dist/esm/components/ui/card.d.ts +38 -0
- package/dist/esm/components/ui/collapsible.d.ts +5 -0
- package/dist/esm/components/ui/dialog.d.ts +21 -0
- package/dist/esm/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/esm/components/ui/input.d.ts +10 -0
- package/dist/esm/components/ui/popover.d.ts +7 -0
- package/dist/esm/components/ui/popover.js +14 -0
- package/dist/esm/components/ui/popover.js.map +1 -0
- package/dist/esm/components/ui/scroll-area.d.ts +5 -0
- package/dist/esm/components/ui/separator.d.ts +4 -0
- package/dist/esm/components/ui/separator.js +27 -0
- package/dist/esm/components/ui/separator.js.map +1 -0
- package/dist/esm/components/ui/tabs.d.ts +7 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/utils.d.ts +2 -0
- package/dist/esm/lib/utils.js +9 -0
- package/dist/esm/lib/utils.js.map +1 -0
- package/dist/esm/main.d.ts +0 -0
- package/dist/esm/modules/config/BootstrapConfigContext.d.ts +9 -0
- package/dist/esm/modules/config/BootstrapConfigContext.js +25 -0
- package/dist/esm/modules/config/BootstrapConfigContext.js.map +1 -0
- package/dist/esm/modules/config/GlobalConfigContext.d.ts +14 -0
- package/dist/esm/modules/config/GlobalConfigContext.js +21 -0
- package/dist/esm/modules/config/GlobalConfigContext.js.map +1 -0
- package/dist/esm/modules/environment/ApiQueryMagazineEnvironment.d.ts +12 -0
- package/dist/esm/modules/environment/ApiQueryMagazineEnvironment.js +13 -0
- package/dist/esm/modules/environment/ApiQueryMagazineEnvironment.js.map +1 -0
- package/dist/esm/modules/environment/EnvironmentContext.d.ts +15 -0
- package/dist/esm/modules/environment/EnvironmentContext.js +67 -0
- package/dist/esm/modules/environment/EnvironmentContext.js.map +1 -0
- package/dist/esm/modules/environment/types.d.ts +4 -0
- package/dist/esm/modules/environment/ui/EhEnvSelector.d.ts +9 -0
- package/dist/esm/modules/environment/ui/EhEnvSelector.js +167 -0
- package/dist/esm/modules/environment/ui/EhEnvSelector.js.map +1 -0
- package/dist/esm/modules/fuzzyMatchLogic/autoCompleteFilter.d.ts +3 -0
- package/dist/esm/modules/fuzzyMatchLogic/autoCompleteFilter.js +43 -0
- package/dist/esm/modules/fuzzyMatchLogic/autoCompleteFilter.js.map +1 -0
- package/dist/esm/modules/fuzzyMatchLogic/features/prefixFrac.d.ts +1 -0
- package/dist/esm/modules/fuzzyMatchLogic/features/prefixFrac.js +12 -0
- package/dist/esm/modules/fuzzyMatchLogic/features/prefixFrac.js.map +1 -0
- package/dist/esm/modules/fuzzyMatchLogic/features/prefixFracTokenMiddles.d.ts +2 -0
- package/dist/esm/modules/fuzzyMatchLogic/fixLayout.d.ts +2 -0
- package/dist/esm/modules/fuzzyMatchLogic/postFiltration.d.ts +2 -0
- package/dist/esm/modules/fuzzyMatchLogic/scoring.d.ts +2 -0
- package/dist/esm/modules/fuzzyMatchLogic/scoring.js +23 -0
- package/dist/esm/modules/fuzzyMatchLogic/scoring.js.map +1 -0
- package/dist/esm/modules/fuzzyMatchLogic/tokenize.d.ts +3 -0
- package/dist/esm/modules/fuzzyMatchLogic/types.d.ts +25 -0
- package/dist/esm/modules/fuzzyMatchLogic/utils.d.ts +2 -0
- package/dist/esm/modules/fuzzyMatchLogic/utils.js +12 -0
- package/dist/esm/modules/fuzzyMatchLogic/utils.js.map +1 -0
- package/dist/esm/modules/pluginCore/PluginManagerContext.d.ts +24 -0
- package/dist/esm/modules/pluginCore/PluginManagerContext.js +62 -0
- package/dist/esm/modules/pluginCore/PluginManagerContext.js.map +1 -0
- package/dist/esm/modules/pluginCore/makePluginManagerContext.d.ts +7 -0
- package/dist/esm/modules/pluginCore/makePluginManagerContext.js +27 -0
- package/dist/esm/modules/pluginCore/makePluginManagerContext.js.map +1 -0
- package/dist/esm/modules/pluginCore/types.d.ts +36 -0
- package/dist/esm/modules/pluginCore/types.js +7 -0
- package/dist/esm/modules/pluginCore/types.js.map +1 -0
- package/dist/esm/modules/resourceJump/ApiQueryMagazineResourceJump.d.ts +27 -0
- package/dist/esm/modules/resourceJump/ApiQueryMagazineResourceJump.js +26 -0
- package/dist/esm/modules/resourceJump/ApiQueryMagazineResourceJump.js.map +1 -0
- package/dist/esm/modules/resourceJump/ResourceJumpContext.d.ts +17 -0
- package/dist/esm/modules/resourceJump/ResourceJumpContext.js +88 -0
- package/dist/esm/modules/resourceJump/ResourceJumpContext.js.map +1 -0
- package/dist/esm/modules/resourceJump/buildJumpUrl.d.ts +2 -0
- package/dist/esm/modules/resourceJump/buildJumpUrl.js +32 -0
- package/dist/esm/modules/resourceJump/buildJumpUrl.js.map +1 -0
- package/dist/esm/modules/resourceJump/findBestMatchByUrl.d.ts +17 -0
- package/dist/esm/modules/resourceJump/findBestMatchByUrl.js +85 -0
- package/dist/esm/modules/resourceJump/findBestMatchByUrl.js.map +1 -0
- package/dist/esm/modules/resourceJump/helpers.d.ts +28 -0
- package/dist/esm/modules/resourceJump/helpers.js +19 -0
- package/dist/esm/modules/resourceJump/helpers.js.map +1 -0
- package/dist/esm/modules/resourceJump/routeLoader.d.ts +11 -0
- package/dist/esm/modules/resourceJump/routeLoader.js +43 -0
- package/dist/esm/modules/resourceJump/routeLoader.js.map +1 -0
- package/dist/esm/modules/resourceJump/types.d.ts +18 -0
- package/dist/esm/modules/resourceJump/ui/EhJumpResourceSelector.d.ts +20 -0
- package/dist/esm/modules/resourceJump/ui/EhJumpResourceSelector.js +209 -0
- package/dist/esm/modules/resourceJump/ui/EhJumpResourceSelector.js.map +1 -0
- package/dist/esm/modules/resourceJump/ui/JumpALink.d.ts +14 -0
- package/dist/esm/modules/resourceJump/ui/JumpALink.js +38 -0
- package/dist/esm/modules/resourceJump/ui/JumpALink.js.map +1 -0
- package/dist/esm/modules/resourceJump/ui/JumpMainButton.d.ts +5 -0
- package/dist/esm/modules/resourceJump/ui/JumpMainButton.js +66 -0
- package/dist/esm/modules/resourceJump/ui/JumpMainButton.js.map +1 -0
- package/dist/esm/modules/resourceJump/ui/ResouceJumpLayout.d.ts +5 -0
- package/dist/esm/modules/resourceJump/ui/ResouceJumpLayout.js +42 -0
- package/dist/esm/modules/resourceJump/ui/ResouceJumpLayout.js.map +1 -0
- package/dist/esm/plugins/builtin/pageUrl/PageUrlPluginContext.d.ts +9 -0
- package/dist/esm/plugins/builtin/pageUrl/PageUrlPluginContext.js +36 -0
- package/dist/esm/plugins/builtin/pageUrl/PageUrlPluginContext.js.map +1 -0
- package/dist/esm/plugins/builtin/pageUrl/pageUrlAutoCompletePlugin.d.ts +11 -0
- package/dist/esm/plugins/builtin/pageUrl/pageUrlAutoCompletePlugin.js +44 -0
- package/dist/esm/plugins/builtin/pageUrl/pageUrlAutoCompletePlugin.js.map +1 -0
- package/dist/esm/plugins/builtin/pageUrl/pageUrlJumpPlugin.d.ts +7 -0
- package/dist/esm/plugins/builtin/pageUrl/pageUrlJumpPlugin.js +29 -0
- package/dist/esm/plugins/builtin/pageUrl/pageUrlJumpPlugin.js.map +1 -0
- package/dist/esm/plugins/builtin/pageUrl/pageUrlTypes.d.ts +11 -0
- package/dist/esm/routeTree.gen.d.ts +142 -0
- package/dist/esm/routeTree.gen.js +77 -0
- package/dist/esm/routeTree.gen.js.map +1 -0
- package/dist/esm/routes/__root.d.ts +2 -0
- package/dist/esm/routes/__root.js +22 -0
- package/dist/esm/routes/__root.js.map +1 -0
- package/dist/esm/routes/_layout/app/$appSlug/sub/$subValue.d.ts +1 -0
- package/dist/esm/routes/_layout/app/$appSlug.d.ts +1 -0
- package/dist/esm/routes/_layout/app/_appSlug/sub/_subValue.js +18 -0
- package/dist/esm/routes/_layout/app/_appSlug/sub/_subValue.js.map +1 -0
- package/dist/esm/routes/_layout/app/_appSlug.js +18 -0
- package/dist/esm/routes/_layout/app/_appSlug.js.map +1 -0
- package/dist/esm/routes/_layout/env/$envSlug/app/$appSlug/sub/$subValue.d.ts +1 -0
- package/dist/esm/routes/_layout/env/$envSlug/app/$appSlug.d.ts +1 -0
- package/dist/esm/routes/_layout/env/$envSlug/sub/$subValue.d.ts +1 -0
- package/dist/esm/routes/_layout/env/$envSlug.d.ts +1 -0
- package/dist/esm/routes/_layout/env/_envSlug/app/_appSlug/sub/_subValue.js +20 -0
- package/dist/esm/routes/_layout/env/_envSlug/app/_appSlug/sub/_subValue.js.map +1 -0
- package/dist/esm/routes/_layout/env/_envSlug/app/_appSlug.js +18 -0
- package/dist/esm/routes/_layout/env/_envSlug/app/_appSlug.js.map +1 -0
- package/dist/esm/routes/_layout/env/_envSlug/sub/_subValue.js +18 -0
- package/dist/esm/routes/_layout/env/_envSlug/sub/_subValue.js.map +1 -0
- package/dist/esm/routes/_layout/env/_envSlug.js +18 -0
- package/dist/esm/routes/_layout/env/_envSlug.js.map +1 -0
- package/dist/esm/routes/_layout/index.d.ts +1 -0
- package/dist/esm/routes/_layout/index.js +18 -0
- package/dist/esm/routes/_layout/index.js.map +1 -0
- package/dist/esm/routes/_layout.d.ts +1 -0
- package/dist/esm/routes/_layout.js +12 -0
- package/dist/esm/routes/_layout.js.map +1 -0
- package/dist/esm/types/ehTypes.d.ts +31 -0
- package/dist/esm/types/slateTypes.d.ts +28 -0
- package/dist/esm/types/tanstackQuery.d.ts +11 -0
- package/dist/esm/types/types.d.ts +16 -0
- package/dist/esm/types/userBehaviourTypes.d.ts +76 -0
- package/dist/esm/types/utilityTypes.d.ts +1 -0
- package/dist/esm/ui/components/ActionCard.d.ts +9 -0
- package/dist/esm/ui/components/AppIcon.d.ts +7 -0
- package/dist/esm/ui/components/commandInput/EhBaseSelector.d.ts +6 -0
- package/dist/esm/ui/components/commandInput/EhBaseSelector.js +22 -0
- package/dist/esm/ui/components/commandInput/EhBaseSelector.js.map +1 -0
- package/dist/esm/ui/components/commandInput/types.d.ts +13 -0
- package/dist/esm/ui/components/contextDebug.d.ts +2 -0
- package/dist/esm/ui/components/contextDebug.js +12 -0
- package/dist/esm/ui/components/contextDebug.js.map +1 -0
- package/dist/esm/ui/components/controlPanel/BaseDropdownSelector.d.ts +11 -0
- package/dist/esm/ui/components/controlPanel/env/EnvDropdownContent.d.ts +5 -0
- package/dist/esm/ui/components/controlPanel/env/EnvDropdownSelector.d.ts +1 -0
- package/dist/esm/ui/components/error/DefaultErrorComponent.d.ts +2 -0
- package/dist/esm/ui/components/error/DefaultErrorComponent.js +13 -0
- package/dist/esm/ui/components/error/DefaultErrorComponent.js.map +1 -0
- package/dist/esm/ui/components/error/RooutErrorPage.d.ts +2 -0
- package/dist/esm/ui/components/error/RooutErrorPage.js +12 -0
- package/dist/esm/ui/components/error/RooutErrorPage.js.map +1 -0
- package/dist/esm/ui/components/footer/Footer.d.ts +1 -0
- package/dist/esm/ui/components/footer/Footer.js +38 -0
- package/dist/esm/ui/components/footer/Footer.js.map +1 -0
- package/dist/esm/ui/components/header/PlaygroundHeader.d.ts +1 -0
- package/dist/esm/ui/components/header/PlaygroundHeader.js +23 -0
- package/dist/esm/ui/components/header/PlaygroundHeader.js.map +1 -0
- package/dist/esm/ui/components/leftPanel/LeftPanel.d.ts +5 -0
- package/dist/esm/ui/components/quickBar/EnvQuickJumpBar.d.ts +5 -0
- package/dist/esm/ui/components/quickBar/EnvQuickJumpBar.js +52 -0
- package/dist/esm/ui/components/quickBar/EnvQuickJumpBar.js.map +1 -0
- package/dist/esm/ui/components/quickBar/QuickJumpBar.d.ts +5 -0
- package/dist/esm/ui/components/widgetPanel/AddWidgetCard.d.ts +5 -0
- package/dist/esm/ui/components/widgetPanel/WidgetGrid.d.ts +6 -0
- package/dist/esm/ui/components/widgets/CredentialsWidget.d.ts +11 -0
- package/dist/esm/ui/components/widgets/VersionWidget.d.ts +7 -0
- package/dist/esm/ui/error/NotFoundError.d.ts +1 -0
- package/dist/esm/ui/error/NotFoundError.js +16 -0
- package/dist/esm/ui/error/NotFoundError.js.map +1 -0
- package/dist/esm/ui/layout/Footer.d.ts +1 -0
- package/dist/esm/ui/layout/Header.d.ts +1 -0
- package/dist/esm/ui/layout/LoadingScreen.d.ts +4 -0
- package/dist/esm/ui/layout/LoadingScreen.js +14 -0
- package/dist/esm/ui/layout/LoadingScreen.js.map +1 -0
- package/dist/esm/ui/layout/MainLayout.d.ts +5 -0
- package/dist/esm/ui/layout/MainLayout.js +18 -0
- package/dist/esm/ui/layout/MainLayout.js.map +1 -0
- package/dist/esm/ui/layout/SideColumn.d.ts +1 -0
- package/dist/esm/ui/layout/TopLevelProviders.d.ts +5 -0
- package/dist/esm/ui/layout/TopLevelProviders.js +42 -0
- package/dist/esm/ui/layout/TopLevelProviders.js.map +1 -0
- package/dist/esm/ui/main/JumpTabContent.d.ts +1 -0
- package/dist/esm/ui/main/Tabs.d.ts +4 -0
- package/dist/esm/userDb/DbContext.d.ts +9 -0
- package/dist/esm/userDb/DbContext.js +18 -0
- package/dist/esm/userDb/DbContext.js.map +1 -0
- package/dist/esm/userDb/EhDb.d.ts +12 -0
- package/dist/esm/userDb/EhDb.js +20 -0
- package/dist/esm/userDb/EhDb.js.map +1 -0
- package/dist/esm/util/availabilityMatrixUtils.d.ts +12 -0
- package/dist/esm/util/availabilityMatrixUtils.js +57 -0
- package/dist/esm/util/availabilityMatrixUtils.js.map +1 -0
- package/dist/esm/util/createEhRouter.d.ts +7 -0
- package/dist/esm/util/createEhRouter.js +16 -0
- package/dist/esm/util/createEhRouter.js.map +1 -0
- package/dist/esm/util/highlightMatches.d.ts +2 -0
- package/dist/esm/util/highlightMatches.js +19 -0
- package/dist/esm/util/highlightMatches.js.map +1 -0
- package/dist/esm/util/reactQueryUtils.d.ts +6 -0
- package/dist/esm/util/reactQueryUtils.js +10 -0
- package/dist/esm/util/reactQueryUtils.js.map +1 -0
- package/dist/esm/util/route-utils.d.ts +6 -0
- package/dist/esm/util/route-utils.js +72 -0
- package/dist/esm/util/route-utils.js.map +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/robots.txt +2 -0
- package/package.json +110 -0
- package/src/App.tsx +28 -0
- package/src/__tests__/modules/fuzzyMatchLogic/autoCompleteFilter.test.ts +185 -0
- package/src/__tests__/modules/fuzzyMatchLogic/features/prefixFracTokenMiddles.test.ts +23 -0
- package/src/__tests__/modules/fuzzyMatchLogic/fixLayout.test.ts +11 -0
- package/src/__tests__/modules/fuzzyMatchLogic/postFiltration.test.ts +15 -0
- package/src/__tests__/modules/fuzzyMatchLogic/testUtils.ts +8 -0
- package/src/__tests__/modules/fuzzyMatchLogic/tokenize.test.ts +65 -0
- package/src/__tests__/modules/resouceJump/findBestMatchByUrl.test.ts +234 -0
- package/src/__tests__/setupTests.tsx +0 -0
- package/src/__tests__/util/availabilityMatrixUtils.test.ts +61 -0
- package/src/api/ApiQueryMagazine.ts +15 -0
- package/src/api/data/useQueryBootstrapConfig.ts +17 -0
- package/src/api/infra/createQueryClient.ts +25 -0
- package/src/api/infra/trpc.ts +6 -0
- package/src/api/unsorted/indexDataFetcher.ts +46 -0
- package/src/appPropsFactory.ts +35 -0
- package/src/assets/env-hopper-logo.svg +114 -0
- package/src/components/ThemeSwitcher.tsx +22 -0
- package/src/components/theme-provider.tsx +8 -0
- package/src/components/ui/badge.tsx +37 -0
- package/src/components/ui/breadcrumb.tsx +128 -0
- package/src/components/ui/button.tsx +60 -0
- package/src/components/ui/card.tsx +95 -0
- package/src/components/ui/collapsible.tsx +31 -0
- package/src/components/ui/dialog.tsx +182 -0
- package/src/components/ui/dropdown-menu.tsx +257 -0
- package/src/components/ui/input.tsx +28 -0
- package/src/components/ui/popover.tsx +48 -0
- package/src/components/ui/scroll-area.tsx +58 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/tabs.tsx +65 -0
- package/src/index.css +211 -0
- package/src/index.tsx +3 -0
- package/src/lib/utils.ts +7 -0
- package/src/main.tsx +53 -0
- package/src/modules/config/BootstrapConfigContext.tsx +33 -0
- package/src/modules/config/GlobalConfigContext.tsx +42 -0
- package/src/modules/environment/ApiQueryMagazineEnvironment.ts +12 -0
- package/src/modules/environment/EnvironmentContext.tsx +115 -0
- package/src/modules/environment/types.ts +4 -0
- package/src/modules/environment/ui/EhEnvSelector.tsx +191 -0
- package/src/modules/fuzzyMatchLogic/autoCompleteFilter.ts +186 -0
- package/src/modules/fuzzyMatchLogic/features/prefixFrac.ts +13 -0
- package/src/modules/fuzzyMatchLogic/features/prefixFracTokenMiddles.ts +29 -0
- package/src/modules/fuzzyMatchLogic/fixLayout.ts +24 -0
- package/src/modules/fuzzyMatchLogic/postFiltration.ts +35 -0
- package/src/modules/fuzzyMatchLogic/scoring.ts +42 -0
- package/src/modules/fuzzyMatchLogic/tokenize.ts +32 -0
- package/src/modules/fuzzyMatchLogic/types.ts +33 -0
- package/src/modules/fuzzyMatchLogic/utils.ts +18 -0
- package/src/modules/pluginCore/PluginManagerContext.tsx +107 -0
- package/src/modules/pluginCore/makePluginManagerContext.ts +35 -0
- package/src/modules/pluginCore/types.ts +54 -0
- package/src/modules/resourceJump/ApiQueryMagazineResourceJump.ts +31 -0
- package/src/modules/resourceJump/ResourceJumpContext.tsx +142 -0
- package/src/modules/resourceJump/buildJumpUrl.ts +40 -0
- package/src/modules/resourceJump/findBestMatchByUrl.ts +121 -0
- package/src/modules/resourceJump/helpers.ts +117 -0
- package/src/modules/resourceJump/routeLoader.ts +58 -0
- package/src/modules/resourceJump/types.ts +21 -0
- package/src/modules/resourceJump/ui/EhJumpResourceSelector.tsx +259 -0
- package/src/modules/resourceJump/ui/JumpALink.tsx +54 -0
- package/src/modules/resourceJump/ui/JumpMainButton.tsx +97 -0
- package/src/modules/resourceJump/ui/ResouceJumpLayout.tsx +73 -0
- package/src/plugins/builtin/pageUrl/PageUrlPluginContext.tsx +55 -0
- package/src/plugins/builtin/pageUrl/pageUrlAutoCompletePlugin.ts +66 -0
- package/src/plugins/builtin/pageUrl/pageUrlJumpPlugin.ts +36 -0
- package/src/plugins/builtin/pageUrl/pageUrlTypes.ts +17 -0
- package/src/routeTree.gen.ts +249 -0
- package/src/routes/__root.tsx +23 -0
- package/src/routes/_layout/app/$appSlug/sub/$subValue.tsx +15 -0
- package/src/routes/_layout/app/$appSlug.tsx +15 -0
- package/src/routes/_layout/env/$envSlug/app/$appSlug/sub/$subValue.tsx +17 -0
- package/src/routes/_layout/env/$envSlug/app/$appSlug.tsx +15 -0
- package/src/routes/_layout/env/$envSlug/sub/$subValue.tsx +15 -0
- package/src/routes/_layout/env/$envSlug.tsx +15 -0
- package/src/routes/_layout/index.tsx +16 -0
- package/src/routes/_layout.tsx +9 -0
- package/src/types/ehTypes.ts +40 -0
- package/src/types/slateTypes.ts +22 -0
- package/src/types/tanstackQuery.ts +14 -0
- package/src/types/types.ts +20 -0
- package/src/types/userBehaviourTypes.ts +100 -0
- package/src/types/utilityTypes.ts +1 -0
- package/src/types/vite-env.d.ts +1 -0
- package/src/ui/components/ActionCard.tsx +30 -0
- package/src/ui/components/AppIcon.tsx +48 -0
- package/src/ui/components/commandInput/EhBaseSelector.tsx +51 -0
- package/src/ui/components/commandInput/types.ts +22 -0
- package/src/ui/components/contextDebug.tsx +13 -0
- package/src/ui/components/controlPanel/BaseDropdownSelector.tsx +163 -0
- package/src/ui/components/controlPanel/env/EnvDropdownContent.tsx +114 -0
- package/src/ui/components/controlPanel/env/EnvDropdownSelector.tsx +21 -0
- package/src/ui/components/error/DefaultErrorComponent.tsx +38 -0
- package/src/ui/components/error/RooutErrorPage.tsx +10 -0
- package/src/ui/components/footer/Footer.tsx +32 -0
- package/src/ui/components/header/PlaygroundHeader.tsx +26 -0
- package/src/ui/components/leftPanel/LeftPanel.tsx +194 -0
- package/src/ui/components/quickBar/EnvQuickJumpBar.tsx +65 -0
- package/src/ui/components/quickBar/QuickJumpBar.tsx +101 -0
- package/src/ui/components/widgetPanel/AddWidgetCard.tsx +17 -0
- package/src/ui/components/widgetPanel/WidgetGrid.tsx +18 -0
- package/src/ui/components/widgets/CredentialsWidget.tsx +55 -0
- package/src/ui/components/widgets/VersionWidget.tsx +29 -0
- package/src/ui/error/NotFoundError.tsx +13 -0
- package/src/ui/layout/Footer.tsx +16 -0
- package/src/ui/layout/Header.tsx +14 -0
- package/src/ui/layout/LoadingScreen.tsx +17 -0
- package/src/ui/layout/MainLayout.tsx +27 -0
- package/src/ui/layout/SideColumn.tsx +3 -0
- package/src/ui/layout/TopLevelProviders.tsx +52 -0
- package/src/ui/main/JumpTabContent.tsx +12 -0
- package/src/ui/main/Tabs.tsx +29 -0
- package/src/userDb/DbContext.tsx +22 -0
- package/src/userDb/EhDb.ts +22 -0
- package/src/util/availabilityMatrixUtils.ts +80 -0
- package/src/util/createEhRouter.ts +20 -0
- package/src/util/highlightMatches.tsx +29 -0
- package/src/util/reactQueryUtils.ts +12 -0
- package/src/util/route-utils.ts +71 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query'
|
|
2
|
+
import type { TRPCRouter } from '@env-hopper/backend-core'
|
|
3
|
+
import type { TRPCClient } from '@trpc/client'
|
|
4
|
+
|
|
5
|
+
export interface CreateQueryParams {
|
|
6
|
+
trpcClient: TRPCClient<TRPCRouter>
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function createQueryClient({ trpcClient }: CreateQueryParams) {
|
|
10
|
+
return new QueryClient({
|
|
11
|
+
defaultOptions: {
|
|
12
|
+
queries: {
|
|
13
|
+
gcTime: 1000 * 60 * 60 * 24 * 7, // 7 days
|
|
14
|
+
meta: {
|
|
15
|
+
trpcClient,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
mutations: {
|
|
19
|
+
meta: {
|
|
20
|
+
trpcClient,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { QueryClient, QueryKey } from '@tanstack/react-query'
|
|
2
|
+
import type { TRPCClient } from '@trpc/client'
|
|
3
|
+
import type { BootstrapConfigData, TRPCRouter } from '@env-hopper/backend-core'
|
|
4
|
+
import type { EhDb } from '~/userDb/EhDb'
|
|
5
|
+
import { dbCacheDbKeys } from '~/userDb/EhDb'
|
|
6
|
+
|
|
7
|
+
export const queryKey: QueryKey = ['bootstrapConfig']
|
|
8
|
+
|
|
9
|
+
export interface IndexDataFetcherParams {
|
|
10
|
+
trpcClient: TRPCClient<TRPCRouter>
|
|
11
|
+
queryClient: QueryClient
|
|
12
|
+
db: EhDb
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function indexDataFetcher({
|
|
16
|
+
queryClient,
|
|
17
|
+
trpcClient,
|
|
18
|
+
db,
|
|
19
|
+
}: IndexDataFetcherParams): () => Promise<BootstrapConfigData> {
|
|
20
|
+
return async () => {
|
|
21
|
+
try {
|
|
22
|
+
const cached = await db.bootstrap.get(dbCacheDbKeys.Bootstrap)
|
|
23
|
+
if (cached) {
|
|
24
|
+
void syncFromNetwork({ queryClient, trpcClient, db })
|
|
25
|
+
return cached
|
|
26
|
+
}
|
|
27
|
+
} catch (e) {
|
|
28
|
+
console.log('Error fetching cached index data:', e)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return await syncFromNetwork({ queryClient, trpcClient, db })
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function syncFromNetwork({
|
|
36
|
+
queryClient,
|
|
37
|
+
trpcClient,
|
|
38
|
+
db,
|
|
39
|
+
}: IndexDataFetcherParams): Promise<BootstrapConfigData> {
|
|
40
|
+
const fresh: BootstrapConfigData = await trpcClient.bootstrap.query()
|
|
41
|
+
|
|
42
|
+
await db.bootstrap.put(fresh, dbCacheDbKeys.Bootstrap)
|
|
43
|
+
queryClient.setQueryData([queryKey], fresh)
|
|
44
|
+
|
|
45
|
+
return fresh
|
|
46
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createBrowserHistory } from '@tanstack/react-router'
|
|
2
|
+
import { createTRPCClient, httpBatchLink } from '@trpc/client'
|
|
3
|
+
import { PageUrlJumpPlugin } from './plugins/builtin/pageUrl/pageUrlJumpPlugin'
|
|
4
|
+
import { EhDb } from './userDb/EhDb'
|
|
5
|
+
import type { AppProps } from './App'
|
|
6
|
+
import type { EhPlugin } from './modules/pluginCore/types'
|
|
7
|
+
import type { TRPCRouter } from '@env-hopper/backend-core'
|
|
8
|
+
import { createEhRouter } from '~/util/createEhRouter'
|
|
9
|
+
import { createQueryClient } from '~/api/infra/createQueryClient'
|
|
10
|
+
|
|
11
|
+
// registerSW();
|
|
12
|
+
export function appPropsFactory(): AppProps {
|
|
13
|
+
const trpcClient = createTRPCClient<TRPCRouter>({
|
|
14
|
+
links: [
|
|
15
|
+
httpBatchLink({
|
|
16
|
+
url: 'http://localhost:4000/trpc',
|
|
17
|
+
}),
|
|
18
|
+
],
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const db = new EhDb()
|
|
22
|
+
const queryClient = createQueryClient({ trpcClient })
|
|
23
|
+
const plugins: Array<EhPlugin> = [new PageUrlJumpPlugin()]
|
|
24
|
+
const router = createEhRouter({
|
|
25
|
+
history: createBrowserHistory(),
|
|
26
|
+
context: {
|
|
27
|
+
queryClient,
|
|
28
|
+
trpcClient,
|
|
29
|
+
db,
|
|
30
|
+
plugins,
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
return { router, queryClient, trpcClient, db }
|
|
35
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 375.9 244.9" style="enable-background:new 0 0 375.9 244.9;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{opacity:0.05;}
|
|
7
|
+
.st1{fill:#A78256;}
|
|
8
|
+
.st2{fill:#8BC143;}
|
|
9
|
+
.st3{fill:#25572C;}
|
|
10
|
+
.st4{fill:#367F3D;}
|
|
11
|
+
.st5{clip-path:url(#SVGID_00000004530938209597365300000002644174144295954342_);fill:#FFFFFF;}
|
|
12
|
+
.st6{fill:#D5DA38;}
|
|
13
|
+
.st7{fill:#DCB78B;}
|
|
14
|
+
.st8{fill:#A68356;}
|
|
15
|
+
.st9{fill:none;}
|
|
16
|
+
.st10{fill:#296A35;}
|
|
17
|
+
.st11{fill:#24572C;}
|
|
18
|
+
.st12{fill:#56B347;}
|
|
19
|
+
.st13{fill:#2E753A;}
|
|
20
|
+
.st14{fill:#FFFFFF;}
|
|
21
|
+
.st15{fill:#78983D;}
|
|
22
|
+
.st16{fill:#38803E;}
|
|
23
|
+
</style>
|
|
24
|
+
<g id="Layer_4">
|
|
25
|
+
<path class="st0" d="M348.07,224.58c0,13.58-76.31,16.29-168.48,13.91c-85.51-2.21-167.67-12.7-167.67-26.28
|
|
26
|
+
c0-13.58,75.86-16.6,168-13.55C251.54,201.04,348.07,211,348.07,224.58z"/>
|
|
27
|
+
</g>
|
|
28
|
+
<g id="Layer_5">
|
|
29
|
+
<path class="st1" d="M191.33,63.44c-4.71-1.27-9.7,3.77-11.78,5.44c-22.75,18.26-65.08,108.22-68.32,110.8
|
|
30
|
+
c-2.65,2.11-12.55-4.77-26.06,6.99c-2.28,1.99,17.71-3.94,27.35,4.79c4.31,3.9,22.67-31.3,43.4-74.21
|
|
31
|
+
c7.89-16.33,16.66-28.67,29.37-41.6c3.95-4.02,9.74-6.99,9.13-9.83C194.07,64.16,191.67,63.53,191.33,63.44z"/>
|
|
32
|
+
<path class="st2" d="M315.5,185.71c19.53-4.58,25.95-33.16,23.08-54.88c-3.64-27.61-17.56-34.28-34.67-33.9
|
|
33
|
+
c-19.88,0.44-44.11,22.97-32.88,51.46C277.76,165.5,296.2,190.24,315.5,185.71z"/>
|
|
34
|
+
<path class="st3" d="M317.37,92.95c-1.19,0.17-6.89-0.13-6.55-0.52c16.19-18.5,39.73-46.86,55.69-73.93
|
|
35
|
+
c0.14-0.24,1.75,7.27-24.68,43.19C341.84,61.7,317.94,92.87,317.37,92.95z"/>
|
|
36
|
+
<path class="st4" d="M295.82,101.2c-2.01-0.96,43.56-73.4,51-101.15c0.27-1.02-0.95,15.86-12.52,38.58
|
|
37
|
+
C315.28,76,306.48,92.6,301.71,101.2C301.06,102.37,297.81,102.14,295.82,101.2z"/>
|
|
38
|
+
<g>
|
|
39
|
+
<defs>
|
|
40
|
+
<path id="SVGID_1_" d="M337.53,110.9c4.31-1.33,15.13,4.96,15.29,15.68c0.13,8.83-8.71,15.46-11.6,15.57
|
|
41
|
+
c-1.01,0.04,0.03-4.88-0.72-15.7C340.01,119.23,335.7,111.46,337.53,110.9z"/>
|
|
42
|
+
</defs>
|
|
43
|
+
<use xlink:href="#SVGID_1_" style="overflow:visible;fill:#8BC143;"/>
|
|
44
|
+
<clipPath id="SVGID_00000141425935757089766400000014964260461132888230_">
|
|
45
|
+
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
|
|
46
|
+
</clipPath>
|
|
47
|
+
|
|
48
|
+
<circle style="clip-path:url(#SVGID_00000141425935757089766400000014964260461132888230_);fill:#FFFFFF;" cx="337.66" cy="125.78" r="12.55"/>
|
|
49
|
+
</g>
|
|
50
|
+
<path class="st4" d="M72,148.17c12.3-16.8,133.34-31.43,144.28-31.28c0.4,0.01,0.69,4.28,22.94,13.64
|
|
51
|
+
c2.33,0.98,10.66,4.72,16.04,13.86c2.43,4.12,4.42,10.67,4.47,15.71c0.01,1.33-56.06,5.28-103.07,4.71
|
|
52
|
+
C96.02,164.07,68.08,153.52,72,148.17z"/>
|
|
53
|
+
<path class="st6" d="M113.86,186.55c-5.06-0.46-27.13-8.1-29.26-21.47c-0.61-3.81,0.35-6.85,0.8-8.08
|
|
54
|
+
c0.59-1.6,23.41,9.72,87.9,8.39c64.06-1.32,85.65-5.83,86.01-5.03C261.99,166.36,217.6,195.93,113.86,186.55z"/>
|
|
55
|
+
<path class="st2" d="M223.03,117.14c0.76-3.5,10.69-5.08,18.2-5.08c8.44,0,13.29-0.15,19.65-0.89c12.74-1.48,18.97-6.96,16.62-4.53
|
|
56
|
+
c-9.94,10.29-9.77,18.79-8.5,32.04c1.43,14.96,14.3,27.99,13.47,28.38c-4.47,2.09-10.28,6.04-15.14,4.32
|
|
57
|
+
c-9.04-3.19-4.77-21.85-13.13-32.7C246.81,129.06,222,121.89,223.03,117.14z"/>
|
|
58
|
+
<path d="M282.17,152.19c-0.5,4.28,0.64,14.39,6.17,20.99c6.21,7.43,5.99,7.21,12.31,9.99c0,0,0.01,0,0.01,0
|
|
59
|
+
c0.38-0.14-16.24-8.73-16.42-31.1C284.23,150.94,282.22,151.73,282.17,152.19z"/>
|
|
60
|
+
<path class="st7" d="M45.22,202.22c6.4-10.37,14.58-24.72,24.79-41.13c0,0,21.09-33.2,24.52-37.55c0,0,3.69-5.56,18.22-23.3
|
|
61
|
+
c0,0,2.49-3.04,9.72-9.39c3.36-2.95,4.91-4.03,7.18-4.42c2.76-0.47,6.2,0.15,8.83,1.99c0.61,0.42,1.07,0.8,1.1,0.88
|
|
62
|
+
c1.06,2.57,1.99,6.55-1.88,7.07c-2.91,0.39-4.38-0.83-6.43-0.18c-7.92,2.5-29.4,29.72-54.03,76.49
|
|
63
|
+
c-3.25,6.17-19.82,35.14-27.33,40.86c-0.17,0.13-0.66,0.66-3.12-0.63c-13.53-7.14-29.12-3.25-29.21-3.95
|
|
64
|
+
c-0.06-0.49,10.19-7.43,18.55-6.93C37.99,202.14,45.53,202.14,45.22,202.22z"/>
|
|
65
|
+
<path class="st7" d="M233.42,187.34c-2.31-1.13-4.34,0.53-5.99,1.85c0,0-6.49,4.43-3.04,9.36c6.54,9.33,19.97,19.12,50.58,34.48
|
|
66
|
+
c6.93,3.48,15.18,1.56,14.55,0.75c-3.2-4.11-39.95-19.08-51.05-29.73c-3.94-3.78-7.05-6.27-6.02-8.78
|
|
67
|
+
c0.66-1.61,2.83-2.06,3.31-3.64C236.28,189.94,235.32,188.95,233.42,187.34z"/>
|
|
68
|
+
<path class="st8" d="M263.01,192.63c-1.5-1.35-2.61-2.35-6.44,2.21c-2.22,2.64-3.78,5.85-3.24,8.5
|
|
69
|
+
c0.99,4.86,21.45,8.27,38.69,13.14c37.25,10.53,37.8,2.69,36.99,1.8c-0.24-0.27-25.47-3.5-49.47-9.42
|
|
70
|
+
c-14.27-3.52-18.08-5.91-17.15-10.56C262.86,195.91,266,195.32,263.01,192.63z"/>
|
|
71
|
+
<path class="st9" d="M71.78,148.17c2.54-10.82,106.81-31.18,144.37-31.18c0.44,0,0.86,0.75,1.89,1.97c2.9,3.43,6.53,4.52,7.57,4.99
|
|
72
|
+
c6.46,2.94,19.64,8.94,26.12,15.55c3.31,3.37,7.27,9.35,8.34,20.49C235.66,168.76,67.45,166.6,71.78,148.17z"/>
|
|
73
|
+
<path class="st10" d="M230.47,186.52c-2.04-2.62,11.48-19.13,25.95-22.56c1.88-0.45,5.96-0.11,7.34,1.93
|
|
74
|
+
c2.6,3.84-1.44,12.39-10.1,17.84c-8.87,5.59-16.41,9.16-17.23,8.33c-1.01-1.01-0.23-2.89-1.77-4.47
|
|
75
|
+
C233.1,185.98,231.17,187.41,230.47,186.52z"/>
|
|
76
|
+
<path class="st11" d="M264.81,194.71c-1.66-0.94-1.79-3.5-3.48-3.59c-2.06-0.11-3.41,3.84-4.91,3.48c-0.82-0.2-1.3-1.54-1.33-2.37
|
|
77
|
+
c-0.22-6.52,3.26-20.26,6.63-23.47c2.17-2.06,3.76,2.9,8.12,3.09c3.75,0.17,11.88-5.24,13.86-3.59c2.65,2.21-2.86,8.62-3.48,9.72
|
|
78
|
+
C275.33,186.72,265.69,195.21,264.81,194.71z"/>
|
|
79
|
+
<path class="st12" d="M228.92,187.2c1.07-0.44-0.94-5.63,7.67-13.25c6.51-5.76,10.78-6.24,11.82-8.56
|
|
80
|
+
c0.72-1.61-20.78-17.36-41.36-21.92c-11.26-2.5-61.01-55.21-63-56.21c-1.79-0.9-13.79,7.06-13.42,10.21
|
|
81
|
+
c0.35,2.92,13.91,9.77,35.89,27C183.86,138.07,211.31,194.44,228.92,187.2z"/>
|
|
82
|
+
<path class="st13" d="M199.73,65.27c0.65-0.11,36.98,40.09,41.89,43.44c0.85,0.58-14.58,2.12-14.94,1.47
|
|
83
|
+
c-7.27-12.72-38.41-29.6-38.98-35.91C187.4,71.04,196.38,65.84,199.73,65.27z"/>
|
|
84
|
+
<path class="st14" d="M313.18,126.49c0,8.27-6.71,14.98-14.98,14.98c-5.19,0-8.11-3.24-8.94-3.95c-0.44-0.38-6.18-4.4-6.04-11.03
|
|
85
|
+
c0.15-7.14,6.13-14.98,14.98-14.98C306.47,111.5,313.18,118.21,313.18,126.49z"/>
|
|
86
|
+
<path d="M339.38,121.61c-0.26-1.14,6.55,3.28,6.55,8.28c0,6.29-4.95,9.39-5.12,6.37C340.64,133.11,341.42,130.66,339.38,121.61z"/>
|
|
87
|
+
<path d="M277.61,148.06c0.1-0.43,2.35,1.42,5.98,1.9c3.27,0.43,5.79-0.08,5.77,0.07c-0.07,0.54-2.51,2.97-6.17,2.54
|
|
88
|
+
C278.34,152,277.5,148.53,277.61,148.06z"/>
|
|
89
|
+
<circle cx="296.71" cy="131.43" r="8.53"/>
|
|
90
|
+
<path d="M290.02,104.95c-4.8,1.75-12.41,8.08-11.71,9.17c1.25,1.95,17.54-5.95,17.02-8.23
|
|
91
|
+
C295.06,104.68,293.99,103.51,290.02,104.95z"/>
|
|
92
|
+
<circle class="st14" cx="297.94" cy="127.11" r="2.21"/>
|
|
93
|
+
<path class="st15" d="M92.76,178.11c-0.22-0.28-0.39-8.02,4-10.96c0.11-0.07,3.48-0.08,3.64-0.03c0.39,0.11-3.98,5.51-4.72,12.58
|
|
94
|
+
C95.63,180.22,92.86,178.23,92.76,178.11z"/>
|
|
95
|
+
<path class="st15" d="M113.67,185.95c-0.22-0.28-1.35-14.46,3.87-15.24c0.97-0.14,3.13-0.09,2.97,0.01
|
|
96
|
+
c-0.35,0.21-3.53,4.43-3.45,15.73C117.06,186.98,113.77,186.07,113.67,185.95z"/>
|
|
97
|
+
<path class="st15" d="M138.4,188.86c-0.22-0.28-3.66-13.37,0.43-15.95c0.83-0.52,3.35-0.99,3.18-0.89
|
|
98
|
+
c-0.35,0.21-0.78,5.37-0.7,16.67C141.32,189.22,138.49,188.98,138.4,188.86z"/>
|
|
99
|
+
<path class="st15" d="M161.4,188.79c-0.35-0.04-5.78-13.76-1.69-16.34c0.8-0.51,3.18-1.24,3.19-1.2c0,0-0.01,0.01-0.01,0.01
|
|
100
|
+
c-0.23,0.15-0.44,1.64-0.63,3.7c-0.11,1.24-0.05,3.87,0.07,4.9c0.77,6.19,2.5,8.5,2.15,8.69
|
|
101
|
+
C163.62,188.99,162.35,188.9,161.4,188.79z"/>
|
|
102
|
+
<path class="st15" d="M180.03,187.6c-0.35-0.04-6.32-13.45-2.23-16.03c0.8-0.51,3.18-1.24,3.19-1.2c0,0-0.5,0.13-0.5,0.13
|
|
103
|
+
c-0.23,0.15-0.32,1.46-0.5,3.52c-0.11,1.24,0.31,3.92,0.44,4.95c0.77,6.19,2.64,8.55,2.38,8.57
|
|
104
|
+
C181.95,187.6,180.97,187.71,180.03,187.6z"/>
|
|
105
|
+
<path class="st15" d="M198.4,185.28c-0.35-0.04-8.12-13.29-4.02-15.87c0.8-0.51,2.21-1.68,2.22-1.64c0,0,0.55,0,0.55,0
|
|
106
|
+
c-0.23,0.15,0.04,3.79,0.14,4.39c0.22,1.23,0.93,4.64,1.74,6.57c2.39,5.76,3.39,6.47,3.13,6.49
|
|
107
|
+
C201.31,185.29,199.35,185.39,198.4,185.28z"/>
|
|
108
|
+
</g>
|
|
109
|
+
<g id="Layer_3">
|
|
110
|
+
<path class="st16" d="M277.43,106.34c1.1-0.86-7.15,2.43-7.98,3.2c-7.37,6.87-7.84,21.06-5.39,31.28
|
|
111
|
+
c3.23,13.47,9.18,28.71,14.36,28.52c0.93-0.03,2.76-0.77,3.31-1.63c0.25-0.39-11.13-8.17-14.05-34.12
|
|
112
|
+
C265.92,117.99,274.28,108.78,277.43,106.34z"/>
|
|
113
|
+
</g>
|
|
114
|
+
</svg>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { Moon, Sun } from 'lucide-react'
|
|
4
|
+
import { useTheme } from 'next-themes'
|
|
5
|
+
|
|
6
|
+
import { Button } from '~/components/ui/button'
|
|
7
|
+
|
|
8
|
+
export function ThemeSwitcher() {
|
|
9
|
+
const { setTheme, theme } = useTheme()
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Button
|
|
13
|
+
variant="outline"
|
|
14
|
+
size="sm"
|
|
15
|
+
onClick={() => (theme === 'dark' ? setTheme('light') : setTheme('dark'))}
|
|
16
|
+
>
|
|
17
|
+
<Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
|
|
18
|
+
<Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
|
|
19
|
+
<span className="sr-only">Toggle theme</span>
|
|
20
|
+
</Button>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { ThemeProvider as NextThemesProvider } from 'next-themes'
|
|
4
|
+
import type { ThemeProviderProps } from 'next-themes'
|
|
5
|
+
|
|
6
|
+
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
|
|
7
|
+
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
|
|
8
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { cva } from 'class-variance-authority'
|
|
3
|
+
import type { VariantProps } from 'class-variance-authority'
|
|
4
|
+
|
|
5
|
+
import { cn } from '~/lib/utils'
|
|
6
|
+
|
|
7
|
+
const badgeVariants = cva(
|
|
8
|
+
'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default:
|
|
13
|
+
'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
|
|
14
|
+
secondary:
|
|
15
|
+
'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
16
|
+
destructive:
|
|
17
|
+
'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
|
|
18
|
+
outline: 'text-foreground',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: 'default',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
export interface BadgeProps
|
|
28
|
+
extends React.HTMLAttributes<HTMLDivElement>,
|
|
29
|
+
VariantProps<typeof badgeVariants> {}
|
|
30
|
+
|
|
31
|
+
function Badge({ className, variant, ...props }: BadgeProps) {
|
|
32
|
+
return (
|
|
33
|
+
<div className={cn(badgeVariants({ variant }), className)} {...props} />
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { Badge, badgeVariants }
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot'
|
|
3
|
+
import { ChevronRight, MoreHorizontal } from 'lucide-react'
|
|
4
|
+
|
|
5
|
+
import { cn } from '~/lib/utils'
|
|
6
|
+
|
|
7
|
+
const Breadcrumb = ({
|
|
8
|
+
ref,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentPropsWithoutRef<'nav'> & {
|
|
11
|
+
separator?: React.ComponentType<{ className?: string }>
|
|
12
|
+
} & { ref?: React.RefObject<HTMLElement | null> }) => (
|
|
13
|
+
<nav ref={ref} aria-label="breadcrumb" {...props} />
|
|
14
|
+
)
|
|
15
|
+
Breadcrumb.displayName = 'Breadcrumb'
|
|
16
|
+
|
|
17
|
+
const BreadcrumbList = ({
|
|
18
|
+
ref,
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentPropsWithoutRef<'ol'> & {
|
|
22
|
+
ref?: React.RefObject<HTMLOListElement | null>
|
|
23
|
+
}) => (
|
|
24
|
+
<ol
|
|
25
|
+
ref={ref}
|
|
26
|
+
className={cn(
|
|
27
|
+
'flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5',
|
|
28
|
+
className,
|
|
29
|
+
)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
BreadcrumbList.displayName = 'BreadcrumbList'
|
|
34
|
+
|
|
35
|
+
const BreadcrumbItem = ({
|
|
36
|
+
ref,
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentPropsWithoutRef<'li'> & {
|
|
40
|
+
ref?: React.RefObject<HTMLLIElement | null>
|
|
41
|
+
}) => (
|
|
42
|
+
<li
|
|
43
|
+
ref={ref}
|
|
44
|
+
className={cn('inline-flex items-center gap-1.5', className)}
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
)
|
|
48
|
+
BreadcrumbItem.displayName = 'BreadcrumbItem'
|
|
49
|
+
|
|
50
|
+
const BreadcrumbLink = ({
|
|
51
|
+
ref,
|
|
52
|
+
asChild,
|
|
53
|
+
className,
|
|
54
|
+
...props
|
|
55
|
+
}: React.ComponentPropsWithoutRef<'a'> & {
|
|
56
|
+
asChild?: boolean
|
|
57
|
+
} & { ref?: React.RefObject<HTMLAnchorElement | null> }) => {
|
|
58
|
+
const Comp = asChild ? Slot : 'a'
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<Comp
|
|
62
|
+
ref={ref}
|
|
63
|
+
className={cn('transition-colors hover:text-foreground', className)}
|
|
64
|
+
{...props}
|
|
65
|
+
/>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
BreadcrumbLink.displayName = 'BreadcrumbLink'
|
|
69
|
+
|
|
70
|
+
const BreadcrumbPage = ({
|
|
71
|
+
ref,
|
|
72
|
+
className,
|
|
73
|
+
...props
|
|
74
|
+
}: React.ComponentPropsWithoutRef<'span'> & {
|
|
75
|
+
ref?: React.RefObject<HTMLSpanElement | null>
|
|
76
|
+
}) => (
|
|
77
|
+
<span
|
|
78
|
+
ref={ref}
|
|
79
|
+
role="link"
|
|
80
|
+
aria-disabled="true"
|
|
81
|
+
aria-current="page"
|
|
82
|
+
className={cn('font-normal text-foreground', className)}
|
|
83
|
+
{...props}
|
|
84
|
+
/>
|
|
85
|
+
)
|
|
86
|
+
BreadcrumbPage.displayName = 'BreadcrumbPage'
|
|
87
|
+
|
|
88
|
+
const BreadcrumbSeparator = ({
|
|
89
|
+
children,
|
|
90
|
+
className,
|
|
91
|
+
...props
|
|
92
|
+
}: React.ComponentProps<'li'>) => (
|
|
93
|
+
<li
|
|
94
|
+
role="presentation"
|
|
95
|
+
aria-hidden="true"
|
|
96
|
+
className={cn('[&>svg]:size-3.5', className)}
|
|
97
|
+
{...props}
|
|
98
|
+
>
|
|
99
|
+
{children ?? <ChevronRight />}
|
|
100
|
+
</li>
|
|
101
|
+
)
|
|
102
|
+
BreadcrumbSeparator.displayName = 'BreadcrumbSeparator'
|
|
103
|
+
|
|
104
|
+
const BreadcrumbEllipsis = ({
|
|
105
|
+
className,
|
|
106
|
+
...props
|
|
107
|
+
}: React.ComponentProps<'span'>) => (
|
|
108
|
+
<span
|
|
109
|
+
role="presentation"
|
|
110
|
+
aria-hidden="true"
|
|
111
|
+
className={cn('flex h-9 w-9 items-center justify-center', className)}
|
|
112
|
+
{...props}
|
|
113
|
+
>
|
|
114
|
+
<MoreHorizontal className="h-4 w-4" />
|
|
115
|
+
<span className="sr-only">More</span>
|
|
116
|
+
</span>
|
|
117
|
+
)
|
|
118
|
+
BreadcrumbEllipsis.displayName = 'BreadcrumbEllipsis'
|
|
119
|
+
|
|
120
|
+
export {
|
|
121
|
+
Breadcrumb,
|
|
122
|
+
BreadcrumbList,
|
|
123
|
+
BreadcrumbItem,
|
|
124
|
+
BreadcrumbLink,
|
|
125
|
+
BreadcrumbPage,
|
|
126
|
+
BreadcrumbSeparator,
|
|
127
|
+
BreadcrumbEllipsis,
|
|
128
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot'
|
|
3
|
+
import { cva } from 'class-variance-authority'
|
|
4
|
+
import type { VariantProps } from 'class-variance-authority'
|
|
5
|
+
|
|
6
|
+
const buttonVariants = cva(
|
|
7
|
+
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
12
|
+
destructive:
|
|
13
|
+
'bg-destructive text-destructive-foreground hover:bg-destructive/90',
|
|
14
|
+
outline:
|
|
15
|
+
'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
|
|
16
|
+
secondary:
|
|
17
|
+
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
18
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
19
|
+
link: 'text-primary underline-offset-4 hover:underline',
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
default: 'h-10 px-4 py-2',
|
|
23
|
+
sm: 'h-9 rounded-md px-3',
|
|
24
|
+
lg: 'h-11 rounded-md px-8',
|
|
25
|
+
icon: 'h-10 w-10',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
variant: 'default',
|
|
30
|
+
size: 'default',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
export interface ButtonProps
|
|
36
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
37
|
+
VariantProps<typeof buttonVariants> {
|
|
38
|
+
asChild?: boolean
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const Button = ({
|
|
42
|
+
ref,
|
|
43
|
+
className,
|
|
44
|
+
variant,
|
|
45
|
+
size,
|
|
46
|
+
asChild = false,
|
|
47
|
+
...props
|
|
48
|
+
}: ButtonProps & { ref?: React.RefObject<HTMLButtonElement | null> }) => {
|
|
49
|
+
const Comp = asChild ? Slot : 'button'
|
|
50
|
+
return (
|
|
51
|
+
<Comp
|
|
52
|
+
className={buttonVariants({ variant, size, className })}
|
|
53
|
+
ref={ref}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
Button.displayName = 'Button'
|
|
59
|
+
|
|
60
|
+
export { Button, buttonVariants }
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
|
|
3
|
+
import { cn } from '~/lib/utils'
|
|
4
|
+
|
|
5
|
+
const Card = ({
|
|
6
|
+
ref,
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.HTMLAttributes<HTMLDivElement> & {
|
|
10
|
+
ref?: React.RefObject<HTMLDivElement | null>
|
|
11
|
+
}) => (
|
|
12
|
+
<div
|
|
13
|
+
ref={ref}
|
|
14
|
+
className={cn(
|
|
15
|
+
'rounded-lg border bg-card text-card-foreground shadow-sm',
|
|
16
|
+
className,
|
|
17
|
+
)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
)
|
|
21
|
+
Card.displayName = 'Card'
|
|
22
|
+
|
|
23
|
+
const CardHeader = ({
|
|
24
|
+
ref,
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: React.HTMLAttributes<HTMLDivElement> & {
|
|
28
|
+
ref?: React.RefObject<HTMLDivElement | null>
|
|
29
|
+
}) => (
|
|
30
|
+
<div
|
|
31
|
+
ref={ref}
|
|
32
|
+
className={cn('flex flex-col space-y-1.5 p-6', className)}
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
)
|
|
36
|
+
CardHeader.displayName = 'CardHeader'
|
|
37
|
+
|
|
38
|
+
const CardTitle = ({
|
|
39
|
+
ref,
|
|
40
|
+
className,
|
|
41
|
+
...props
|
|
42
|
+
}: React.HTMLAttributes<HTMLDivElement> & {
|
|
43
|
+
ref?: React.RefObject<HTMLDivElement | null>
|
|
44
|
+
}) => (
|
|
45
|
+
<div
|
|
46
|
+
ref={ref}
|
|
47
|
+
className={cn(
|
|
48
|
+
'text-2xl font-semibold leading-none tracking-tight',
|
|
49
|
+
className,
|
|
50
|
+
)}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
)
|
|
54
|
+
CardTitle.displayName = 'CardTitle'
|
|
55
|
+
|
|
56
|
+
const CardDescription = ({
|
|
57
|
+
ref,
|
|
58
|
+
className,
|
|
59
|
+
...props
|
|
60
|
+
}: React.HTMLAttributes<HTMLDivElement> & {
|
|
61
|
+
ref?: React.RefObject<HTMLDivElement | null>
|
|
62
|
+
}) => (
|
|
63
|
+
<div
|
|
64
|
+
ref={ref}
|
|
65
|
+
className={cn('text-sm text-muted-foreground', className)}
|
|
66
|
+
{...props}
|
|
67
|
+
/>
|
|
68
|
+
)
|
|
69
|
+
CardDescription.displayName = 'CardDescription'
|
|
70
|
+
|
|
71
|
+
const CardContent = ({
|
|
72
|
+
ref,
|
|
73
|
+
className,
|
|
74
|
+
...props
|
|
75
|
+
}: React.HTMLAttributes<HTMLDivElement> & {
|
|
76
|
+
ref?: React.RefObject<HTMLDivElement | null>
|
|
77
|
+
}) => <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />
|
|
78
|
+
CardContent.displayName = 'CardContent'
|
|
79
|
+
|
|
80
|
+
const CardFooter = ({
|
|
81
|
+
ref,
|
|
82
|
+
className,
|
|
83
|
+
...props
|
|
84
|
+
}: React.HTMLAttributes<HTMLDivElement> & {
|
|
85
|
+
ref?: React.RefObject<HTMLDivElement | null>
|
|
86
|
+
}) => (
|
|
87
|
+
<div
|
|
88
|
+
ref={ref}
|
|
89
|
+
className={cn('flex items-center p-6 pt-0', className)}
|
|
90
|
+
{...props}
|
|
91
|
+
/>
|
|
92
|
+
)
|
|
93
|
+
CardFooter.displayName = 'CardFooter'
|
|
94
|
+
|
|
95
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'
|
|
2
|
+
|
|
3
|
+
function Collapsible({
|
|
4
|
+
...props
|
|
5
|
+
}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
|
|
6
|
+
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function CollapsibleTrigger({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
|
|
12
|
+
return (
|
|
13
|
+
<CollapsiblePrimitive.CollapsibleTrigger
|
|
14
|
+
data-slot="collapsible-trigger"
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function CollapsibleContent({
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
|
|
23
|
+
return (
|
|
24
|
+
<CollapsiblePrimitive.CollapsibleContent
|
|
25
|
+
data-slot="collapsible-content"
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
|