@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.
Files changed (385) hide show
  1. package/LICENSE +21 -0
  2. package/dist/apple-touch-180x180.png +0 -0
  3. package/dist/disable.well-known/appspecific/com.chrome.devtools.json +6 -0
  4. package/dist/env-hopper-16x16.png +0 -0
  5. package/dist/env-hopper-192x192.png +0 -0
  6. package/dist/env-hopper-32x32.png +0 -0
  7. package/dist/env-hopper-48x48.png +0 -0
  8. package/dist/env-hopper-512x512.png +0 -0
  9. package/dist/env-hopper-square.svg +114 -0
  10. package/dist/esm/App.d.ts +12 -0
  11. package/dist/esm/App.js +12 -0
  12. package/dist/esm/App.js.map +1 -0
  13. package/dist/esm/__tests__/modules/fuzzyMatchLogic/autoCompleteFilter.test.d.ts +1 -0
  14. package/dist/esm/__tests__/modules/fuzzyMatchLogic/features/prefixFracTokenMiddles.test.d.ts +1 -0
  15. package/dist/esm/__tests__/modules/fuzzyMatchLogic/fixLayout.test.d.ts +1 -0
  16. package/dist/esm/__tests__/modules/fuzzyMatchLogic/postFiltration.test.d.ts +1 -0
  17. package/dist/esm/__tests__/modules/fuzzyMatchLogic/testUtils.d.ts +2 -0
  18. package/dist/esm/__tests__/modules/fuzzyMatchLogic/tokenize.test.d.ts +1 -0
  19. package/dist/esm/__tests__/modules/resouceJump/findBestMatchByUrl.test.d.ts +1 -0
  20. package/dist/esm/__tests__/setupTests.d.ts +0 -0
  21. package/dist/esm/__tests__/util/availabilityMatrixUtils.test.d.ts +1 -0
  22. package/dist/esm/api/ApiQueryMagazine.d.ts +12 -0
  23. package/dist/esm/api/ApiQueryMagazine.js +16 -0
  24. package/dist/esm/api/ApiQueryMagazine.js.map +1 -0
  25. package/dist/esm/api/data/useQueryBootstrapConfig.d.ts +3 -0
  26. package/dist/esm/api/data/useQueryBootstrapConfig.js +14 -0
  27. package/dist/esm/api/data/useQueryBootstrapConfig.js.map +1 -0
  28. package/dist/esm/api/infra/createQueryClient.d.ts +7 -0
  29. package/dist/esm/api/infra/createQueryClient.js +23 -0
  30. package/dist/esm/api/infra/createQueryClient.js.map +1 -0
  31. package/dist/esm/api/infra/trpc.d.ts +93 -0
  32. package/dist/esm/api/infra/trpc.js +8 -0
  33. package/dist/esm/api/infra/trpc.js.map +1 -0
  34. package/dist/esm/api/unsorted/indexDataFetcher.d.ts +11 -0
  35. package/dist/esm/api/unsorted/indexDataFetcher.js +35 -0
  36. package/dist/esm/api/unsorted/indexDataFetcher.js.map +1 -0
  37. package/dist/esm/appPropsFactory.d.ts +2 -0
  38. package/dist/esm/appPropsFactory.js +32 -0
  39. package/dist/esm/appPropsFactory.js.map +1 -0
  40. package/dist/esm/assets/env-hopper-logo.svg.js +16 -0
  41. package/dist/esm/assets/env-hopper-logo.svg.js.map +1 -0
  42. package/dist/esm/components/ThemeSwitcher.d.ts +1 -0
  43. package/dist/esm/components/ThemeSwitcher.js +25 -0
  44. package/dist/esm/components/ThemeSwitcher.js.map +1 -0
  45. package/dist/esm/components/theme-provider.d.ts +2 -0
  46. package/dist/esm/components/theme-provider.js +10 -0
  47. package/dist/esm/components/theme-provider.js.map +1 -0
  48. package/dist/esm/components/ui/badge.d.ts +9 -0
  49. package/dist/esm/components/ui/breadcrumb.d.ts +46 -0
  50. package/dist/esm/components/ui/button.d.ts +16 -0
  51. package/dist/esm/components/ui/button.js +52 -0
  52. package/dist/esm/components/ui/button.js.map +1 -0
  53. package/dist/esm/components/ui/card.d.ts +38 -0
  54. package/dist/esm/components/ui/collapsible.d.ts +5 -0
  55. package/dist/esm/components/ui/dialog.d.ts +21 -0
  56. package/dist/esm/components/ui/dropdown-menu.d.ts +25 -0
  57. package/dist/esm/components/ui/input.d.ts +10 -0
  58. package/dist/esm/components/ui/popover.d.ts +7 -0
  59. package/dist/esm/components/ui/popover.js +14 -0
  60. package/dist/esm/components/ui/popover.js.map +1 -0
  61. package/dist/esm/components/ui/scroll-area.d.ts +5 -0
  62. package/dist/esm/components/ui/separator.d.ts +4 -0
  63. package/dist/esm/components/ui/separator.js +27 -0
  64. package/dist/esm/components/ui/separator.js.map +1 -0
  65. package/dist/esm/components/ui/tabs.d.ts +7 -0
  66. package/dist/esm/index.d.ts +3 -0
  67. package/dist/esm/index.js +7 -0
  68. package/dist/esm/index.js.map +1 -0
  69. package/dist/esm/lib/utils.d.ts +2 -0
  70. package/dist/esm/lib/utils.js +9 -0
  71. package/dist/esm/lib/utils.js.map +1 -0
  72. package/dist/esm/main.d.ts +0 -0
  73. package/dist/esm/modules/config/BootstrapConfigContext.d.ts +9 -0
  74. package/dist/esm/modules/config/BootstrapConfigContext.js +25 -0
  75. package/dist/esm/modules/config/BootstrapConfigContext.js.map +1 -0
  76. package/dist/esm/modules/config/GlobalConfigContext.d.ts +14 -0
  77. package/dist/esm/modules/config/GlobalConfigContext.js +21 -0
  78. package/dist/esm/modules/config/GlobalConfigContext.js.map +1 -0
  79. package/dist/esm/modules/environment/ApiQueryMagazineEnvironment.d.ts +12 -0
  80. package/dist/esm/modules/environment/ApiQueryMagazineEnvironment.js +13 -0
  81. package/dist/esm/modules/environment/ApiQueryMagazineEnvironment.js.map +1 -0
  82. package/dist/esm/modules/environment/EnvironmentContext.d.ts +15 -0
  83. package/dist/esm/modules/environment/EnvironmentContext.js +67 -0
  84. package/dist/esm/modules/environment/EnvironmentContext.js.map +1 -0
  85. package/dist/esm/modules/environment/types.d.ts +4 -0
  86. package/dist/esm/modules/environment/ui/EhEnvSelector.d.ts +9 -0
  87. package/dist/esm/modules/environment/ui/EhEnvSelector.js +167 -0
  88. package/dist/esm/modules/environment/ui/EhEnvSelector.js.map +1 -0
  89. package/dist/esm/modules/fuzzyMatchLogic/autoCompleteFilter.d.ts +3 -0
  90. package/dist/esm/modules/fuzzyMatchLogic/autoCompleteFilter.js +43 -0
  91. package/dist/esm/modules/fuzzyMatchLogic/autoCompleteFilter.js.map +1 -0
  92. package/dist/esm/modules/fuzzyMatchLogic/features/prefixFrac.d.ts +1 -0
  93. package/dist/esm/modules/fuzzyMatchLogic/features/prefixFrac.js +12 -0
  94. package/dist/esm/modules/fuzzyMatchLogic/features/prefixFrac.js.map +1 -0
  95. package/dist/esm/modules/fuzzyMatchLogic/features/prefixFracTokenMiddles.d.ts +2 -0
  96. package/dist/esm/modules/fuzzyMatchLogic/fixLayout.d.ts +2 -0
  97. package/dist/esm/modules/fuzzyMatchLogic/postFiltration.d.ts +2 -0
  98. package/dist/esm/modules/fuzzyMatchLogic/scoring.d.ts +2 -0
  99. package/dist/esm/modules/fuzzyMatchLogic/scoring.js +23 -0
  100. package/dist/esm/modules/fuzzyMatchLogic/scoring.js.map +1 -0
  101. package/dist/esm/modules/fuzzyMatchLogic/tokenize.d.ts +3 -0
  102. package/dist/esm/modules/fuzzyMatchLogic/types.d.ts +25 -0
  103. package/dist/esm/modules/fuzzyMatchLogic/utils.d.ts +2 -0
  104. package/dist/esm/modules/fuzzyMatchLogic/utils.js +12 -0
  105. package/dist/esm/modules/fuzzyMatchLogic/utils.js.map +1 -0
  106. package/dist/esm/modules/pluginCore/PluginManagerContext.d.ts +24 -0
  107. package/dist/esm/modules/pluginCore/PluginManagerContext.js +62 -0
  108. package/dist/esm/modules/pluginCore/PluginManagerContext.js.map +1 -0
  109. package/dist/esm/modules/pluginCore/makePluginManagerContext.d.ts +7 -0
  110. package/dist/esm/modules/pluginCore/makePluginManagerContext.js +27 -0
  111. package/dist/esm/modules/pluginCore/makePluginManagerContext.js.map +1 -0
  112. package/dist/esm/modules/pluginCore/types.d.ts +36 -0
  113. package/dist/esm/modules/pluginCore/types.js +7 -0
  114. package/dist/esm/modules/pluginCore/types.js.map +1 -0
  115. package/dist/esm/modules/resourceJump/ApiQueryMagazineResourceJump.d.ts +27 -0
  116. package/dist/esm/modules/resourceJump/ApiQueryMagazineResourceJump.js +26 -0
  117. package/dist/esm/modules/resourceJump/ApiQueryMagazineResourceJump.js.map +1 -0
  118. package/dist/esm/modules/resourceJump/ResourceJumpContext.d.ts +17 -0
  119. package/dist/esm/modules/resourceJump/ResourceJumpContext.js +88 -0
  120. package/dist/esm/modules/resourceJump/ResourceJumpContext.js.map +1 -0
  121. package/dist/esm/modules/resourceJump/buildJumpUrl.d.ts +2 -0
  122. package/dist/esm/modules/resourceJump/buildJumpUrl.js +32 -0
  123. package/dist/esm/modules/resourceJump/buildJumpUrl.js.map +1 -0
  124. package/dist/esm/modules/resourceJump/findBestMatchByUrl.d.ts +17 -0
  125. package/dist/esm/modules/resourceJump/findBestMatchByUrl.js +85 -0
  126. package/dist/esm/modules/resourceJump/findBestMatchByUrl.js.map +1 -0
  127. package/dist/esm/modules/resourceJump/helpers.d.ts +28 -0
  128. package/dist/esm/modules/resourceJump/helpers.js +19 -0
  129. package/dist/esm/modules/resourceJump/helpers.js.map +1 -0
  130. package/dist/esm/modules/resourceJump/routeLoader.d.ts +11 -0
  131. package/dist/esm/modules/resourceJump/routeLoader.js +43 -0
  132. package/dist/esm/modules/resourceJump/routeLoader.js.map +1 -0
  133. package/dist/esm/modules/resourceJump/types.d.ts +18 -0
  134. package/dist/esm/modules/resourceJump/ui/EhJumpResourceSelector.d.ts +20 -0
  135. package/dist/esm/modules/resourceJump/ui/EhJumpResourceSelector.js +209 -0
  136. package/dist/esm/modules/resourceJump/ui/EhJumpResourceSelector.js.map +1 -0
  137. package/dist/esm/modules/resourceJump/ui/JumpALink.d.ts +14 -0
  138. package/dist/esm/modules/resourceJump/ui/JumpALink.js +38 -0
  139. package/dist/esm/modules/resourceJump/ui/JumpALink.js.map +1 -0
  140. package/dist/esm/modules/resourceJump/ui/JumpMainButton.d.ts +5 -0
  141. package/dist/esm/modules/resourceJump/ui/JumpMainButton.js +66 -0
  142. package/dist/esm/modules/resourceJump/ui/JumpMainButton.js.map +1 -0
  143. package/dist/esm/modules/resourceJump/ui/ResouceJumpLayout.d.ts +5 -0
  144. package/dist/esm/modules/resourceJump/ui/ResouceJumpLayout.js +42 -0
  145. package/dist/esm/modules/resourceJump/ui/ResouceJumpLayout.js.map +1 -0
  146. package/dist/esm/plugins/builtin/pageUrl/PageUrlPluginContext.d.ts +9 -0
  147. package/dist/esm/plugins/builtin/pageUrl/PageUrlPluginContext.js +36 -0
  148. package/dist/esm/plugins/builtin/pageUrl/PageUrlPluginContext.js.map +1 -0
  149. package/dist/esm/plugins/builtin/pageUrl/pageUrlAutoCompletePlugin.d.ts +11 -0
  150. package/dist/esm/plugins/builtin/pageUrl/pageUrlAutoCompletePlugin.js +44 -0
  151. package/dist/esm/plugins/builtin/pageUrl/pageUrlAutoCompletePlugin.js.map +1 -0
  152. package/dist/esm/plugins/builtin/pageUrl/pageUrlJumpPlugin.d.ts +7 -0
  153. package/dist/esm/plugins/builtin/pageUrl/pageUrlJumpPlugin.js +29 -0
  154. package/dist/esm/plugins/builtin/pageUrl/pageUrlJumpPlugin.js.map +1 -0
  155. package/dist/esm/plugins/builtin/pageUrl/pageUrlTypes.d.ts +11 -0
  156. package/dist/esm/routeTree.gen.d.ts +142 -0
  157. package/dist/esm/routeTree.gen.js +77 -0
  158. package/dist/esm/routeTree.gen.js.map +1 -0
  159. package/dist/esm/routes/__root.d.ts +2 -0
  160. package/dist/esm/routes/__root.js +22 -0
  161. package/dist/esm/routes/__root.js.map +1 -0
  162. package/dist/esm/routes/_layout/app/$appSlug/sub/$subValue.d.ts +1 -0
  163. package/dist/esm/routes/_layout/app/$appSlug.d.ts +1 -0
  164. package/dist/esm/routes/_layout/app/_appSlug/sub/_subValue.js +18 -0
  165. package/dist/esm/routes/_layout/app/_appSlug/sub/_subValue.js.map +1 -0
  166. package/dist/esm/routes/_layout/app/_appSlug.js +18 -0
  167. package/dist/esm/routes/_layout/app/_appSlug.js.map +1 -0
  168. package/dist/esm/routes/_layout/env/$envSlug/app/$appSlug/sub/$subValue.d.ts +1 -0
  169. package/dist/esm/routes/_layout/env/$envSlug/app/$appSlug.d.ts +1 -0
  170. package/dist/esm/routes/_layout/env/$envSlug/sub/$subValue.d.ts +1 -0
  171. package/dist/esm/routes/_layout/env/$envSlug.d.ts +1 -0
  172. package/dist/esm/routes/_layout/env/_envSlug/app/_appSlug/sub/_subValue.js +20 -0
  173. package/dist/esm/routes/_layout/env/_envSlug/app/_appSlug/sub/_subValue.js.map +1 -0
  174. package/dist/esm/routes/_layout/env/_envSlug/app/_appSlug.js +18 -0
  175. package/dist/esm/routes/_layout/env/_envSlug/app/_appSlug.js.map +1 -0
  176. package/dist/esm/routes/_layout/env/_envSlug/sub/_subValue.js +18 -0
  177. package/dist/esm/routes/_layout/env/_envSlug/sub/_subValue.js.map +1 -0
  178. package/dist/esm/routes/_layout/env/_envSlug.js +18 -0
  179. package/dist/esm/routes/_layout/env/_envSlug.js.map +1 -0
  180. package/dist/esm/routes/_layout/index.d.ts +1 -0
  181. package/dist/esm/routes/_layout/index.js +18 -0
  182. package/dist/esm/routes/_layout/index.js.map +1 -0
  183. package/dist/esm/routes/_layout.d.ts +1 -0
  184. package/dist/esm/routes/_layout.js +12 -0
  185. package/dist/esm/routes/_layout.js.map +1 -0
  186. package/dist/esm/types/ehTypes.d.ts +31 -0
  187. package/dist/esm/types/slateTypes.d.ts +28 -0
  188. package/dist/esm/types/tanstackQuery.d.ts +11 -0
  189. package/dist/esm/types/types.d.ts +16 -0
  190. package/dist/esm/types/userBehaviourTypes.d.ts +76 -0
  191. package/dist/esm/types/utilityTypes.d.ts +1 -0
  192. package/dist/esm/ui/components/ActionCard.d.ts +9 -0
  193. package/dist/esm/ui/components/AppIcon.d.ts +7 -0
  194. package/dist/esm/ui/components/commandInput/EhBaseSelector.d.ts +6 -0
  195. package/dist/esm/ui/components/commandInput/EhBaseSelector.js +22 -0
  196. package/dist/esm/ui/components/commandInput/EhBaseSelector.js.map +1 -0
  197. package/dist/esm/ui/components/commandInput/types.d.ts +13 -0
  198. package/dist/esm/ui/components/contextDebug.d.ts +2 -0
  199. package/dist/esm/ui/components/contextDebug.js +12 -0
  200. package/dist/esm/ui/components/contextDebug.js.map +1 -0
  201. package/dist/esm/ui/components/controlPanel/BaseDropdownSelector.d.ts +11 -0
  202. package/dist/esm/ui/components/controlPanel/env/EnvDropdownContent.d.ts +5 -0
  203. package/dist/esm/ui/components/controlPanel/env/EnvDropdownSelector.d.ts +1 -0
  204. package/dist/esm/ui/components/error/DefaultErrorComponent.d.ts +2 -0
  205. package/dist/esm/ui/components/error/DefaultErrorComponent.js +13 -0
  206. package/dist/esm/ui/components/error/DefaultErrorComponent.js.map +1 -0
  207. package/dist/esm/ui/components/error/RooutErrorPage.d.ts +2 -0
  208. package/dist/esm/ui/components/error/RooutErrorPage.js +12 -0
  209. package/dist/esm/ui/components/error/RooutErrorPage.js.map +1 -0
  210. package/dist/esm/ui/components/footer/Footer.d.ts +1 -0
  211. package/dist/esm/ui/components/footer/Footer.js +38 -0
  212. package/dist/esm/ui/components/footer/Footer.js.map +1 -0
  213. package/dist/esm/ui/components/header/PlaygroundHeader.d.ts +1 -0
  214. package/dist/esm/ui/components/header/PlaygroundHeader.js +23 -0
  215. package/dist/esm/ui/components/header/PlaygroundHeader.js.map +1 -0
  216. package/dist/esm/ui/components/leftPanel/LeftPanel.d.ts +5 -0
  217. package/dist/esm/ui/components/quickBar/EnvQuickJumpBar.d.ts +5 -0
  218. package/dist/esm/ui/components/quickBar/EnvQuickJumpBar.js +52 -0
  219. package/dist/esm/ui/components/quickBar/EnvQuickJumpBar.js.map +1 -0
  220. package/dist/esm/ui/components/quickBar/QuickJumpBar.d.ts +5 -0
  221. package/dist/esm/ui/components/widgetPanel/AddWidgetCard.d.ts +5 -0
  222. package/dist/esm/ui/components/widgetPanel/WidgetGrid.d.ts +6 -0
  223. package/dist/esm/ui/components/widgets/CredentialsWidget.d.ts +11 -0
  224. package/dist/esm/ui/components/widgets/VersionWidget.d.ts +7 -0
  225. package/dist/esm/ui/error/NotFoundError.d.ts +1 -0
  226. package/dist/esm/ui/error/NotFoundError.js +16 -0
  227. package/dist/esm/ui/error/NotFoundError.js.map +1 -0
  228. package/dist/esm/ui/layout/Footer.d.ts +1 -0
  229. package/dist/esm/ui/layout/Header.d.ts +1 -0
  230. package/dist/esm/ui/layout/LoadingScreen.d.ts +4 -0
  231. package/dist/esm/ui/layout/LoadingScreen.js +14 -0
  232. package/dist/esm/ui/layout/LoadingScreen.js.map +1 -0
  233. package/dist/esm/ui/layout/MainLayout.d.ts +5 -0
  234. package/dist/esm/ui/layout/MainLayout.js +18 -0
  235. package/dist/esm/ui/layout/MainLayout.js.map +1 -0
  236. package/dist/esm/ui/layout/SideColumn.d.ts +1 -0
  237. package/dist/esm/ui/layout/TopLevelProviders.d.ts +5 -0
  238. package/dist/esm/ui/layout/TopLevelProviders.js +42 -0
  239. package/dist/esm/ui/layout/TopLevelProviders.js.map +1 -0
  240. package/dist/esm/ui/main/JumpTabContent.d.ts +1 -0
  241. package/dist/esm/ui/main/Tabs.d.ts +4 -0
  242. package/dist/esm/userDb/DbContext.d.ts +9 -0
  243. package/dist/esm/userDb/DbContext.js +18 -0
  244. package/dist/esm/userDb/DbContext.js.map +1 -0
  245. package/dist/esm/userDb/EhDb.d.ts +12 -0
  246. package/dist/esm/userDb/EhDb.js +20 -0
  247. package/dist/esm/userDb/EhDb.js.map +1 -0
  248. package/dist/esm/util/availabilityMatrixUtils.d.ts +12 -0
  249. package/dist/esm/util/availabilityMatrixUtils.js +57 -0
  250. package/dist/esm/util/availabilityMatrixUtils.js.map +1 -0
  251. package/dist/esm/util/createEhRouter.d.ts +7 -0
  252. package/dist/esm/util/createEhRouter.js +16 -0
  253. package/dist/esm/util/createEhRouter.js.map +1 -0
  254. package/dist/esm/util/highlightMatches.d.ts +2 -0
  255. package/dist/esm/util/highlightMatches.js +19 -0
  256. package/dist/esm/util/highlightMatches.js.map +1 -0
  257. package/dist/esm/util/reactQueryUtils.d.ts +6 -0
  258. package/dist/esm/util/reactQueryUtils.js +10 -0
  259. package/dist/esm/util/reactQueryUtils.js.map +1 -0
  260. package/dist/esm/util/route-utils.d.ts +6 -0
  261. package/dist/esm/util/route-utils.js +72 -0
  262. package/dist/esm/util/route-utils.js.map +1 -0
  263. package/dist/favicon.ico +0 -0
  264. package/dist/robots.txt +2 -0
  265. package/package.json +110 -0
  266. package/src/App.tsx +28 -0
  267. package/src/__tests__/modules/fuzzyMatchLogic/autoCompleteFilter.test.ts +185 -0
  268. package/src/__tests__/modules/fuzzyMatchLogic/features/prefixFracTokenMiddles.test.ts +23 -0
  269. package/src/__tests__/modules/fuzzyMatchLogic/fixLayout.test.ts +11 -0
  270. package/src/__tests__/modules/fuzzyMatchLogic/postFiltration.test.ts +15 -0
  271. package/src/__tests__/modules/fuzzyMatchLogic/testUtils.ts +8 -0
  272. package/src/__tests__/modules/fuzzyMatchLogic/tokenize.test.ts +65 -0
  273. package/src/__tests__/modules/resouceJump/findBestMatchByUrl.test.ts +234 -0
  274. package/src/__tests__/setupTests.tsx +0 -0
  275. package/src/__tests__/util/availabilityMatrixUtils.test.ts +61 -0
  276. package/src/api/ApiQueryMagazine.ts +15 -0
  277. package/src/api/data/useQueryBootstrapConfig.ts +17 -0
  278. package/src/api/infra/createQueryClient.ts +25 -0
  279. package/src/api/infra/trpc.ts +6 -0
  280. package/src/api/unsorted/indexDataFetcher.ts +46 -0
  281. package/src/appPropsFactory.ts +35 -0
  282. package/src/assets/env-hopper-logo.svg +114 -0
  283. package/src/components/ThemeSwitcher.tsx +22 -0
  284. package/src/components/theme-provider.tsx +8 -0
  285. package/src/components/ui/badge.tsx +37 -0
  286. package/src/components/ui/breadcrumb.tsx +128 -0
  287. package/src/components/ui/button.tsx +60 -0
  288. package/src/components/ui/card.tsx +95 -0
  289. package/src/components/ui/collapsible.tsx +31 -0
  290. package/src/components/ui/dialog.tsx +182 -0
  291. package/src/components/ui/dropdown-menu.tsx +257 -0
  292. package/src/components/ui/input.tsx +28 -0
  293. package/src/components/ui/popover.tsx +48 -0
  294. package/src/components/ui/scroll-area.tsx +58 -0
  295. package/src/components/ui/separator.tsx +26 -0
  296. package/src/components/ui/tabs.tsx +65 -0
  297. package/src/index.css +211 -0
  298. package/src/index.tsx +3 -0
  299. package/src/lib/utils.ts +7 -0
  300. package/src/main.tsx +53 -0
  301. package/src/modules/config/BootstrapConfigContext.tsx +33 -0
  302. package/src/modules/config/GlobalConfigContext.tsx +42 -0
  303. package/src/modules/environment/ApiQueryMagazineEnvironment.ts +12 -0
  304. package/src/modules/environment/EnvironmentContext.tsx +115 -0
  305. package/src/modules/environment/types.ts +4 -0
  306. package/src/modules/environment/ui/EhEnvSelector.tsx +191 -0
  307. package/src/modules/fuzzyMatchLogic/autoCompleteFilter.ts +186 -0
  308. package/src/modules/fuzzyMatchLogic/features/prefixFrac.ts +13 -0
  309. package/src/modules/fuzzyMatchLogic/features/prefixFracTokenMiddles.ts +29 -0
  310. package/src/modules/fuzzyMatchLogic/fixLayout.ts +24 -0
  311. package/src/modules/fuzzyMatchLogic/postFiltration.ts +35 -0
  312. package/src/modules/fuzzyMatchLogic/scoring.ts +42 -0
  313. package/src/modules/fuzzyMatchLogic/tokenize.ts +32 -0
  314. package/src/modules/fuzzyMatchLogic/types.ts +33 -0
  315. package/src/modules/fuzzyMatchLogic/utils.ts +18 -0
  316. package/src/modules/pluginCore/PluginManagerContext.tsx +107 -0
  317. package/src/modules/pluginCore/makePluginManagerContext.ts +35 -0
  318. package/src/modules/pluginCore/types.ts +54 -0
  319. package/src/modules/resourceJump/ApiQueryMagazineResourceJump.ts +31 -0
  320. package/src/modules/resourceJump/ResourceJumpContext.tsx +142 -0
  321. package/src/modules/resourceJump/buildJumpUrl.ts +40 -0
  322. package/src/modules/resourceJump/findBestMatchByUrl.ts +121 -0
  323. package/src/modules/resourceJump/helpers.ts +117 -0
  324. package/src/modules/resourceJump/routeLoader.ts +58 -0
  325. package/src/modules/resourceJump/types.ts +21 -0
  326. package/src/modules/resourceJump/ui/EhJumpResourceSelector.tsx +259 -0
  327. package/src/modules/resourceJump/ui/JumpALink.tsx +54 -0
  328. package/src/modules/resourceJump/ui/JumpMainButton.tsx +97 -0
  329. package/src/modules/resourceJump/ui/ResouceJumpLayout.tsx +73 -0
  330. package/src/plugins/builtin/pageUrl/PageUrlPluginContext.tsx +55 -0
  331. package/src/plugins/builtin/pageUrl/pageUrlAutoCompletePlugin.ts +66 -0
  332. package/src/plugins/builtin/pageUrl/pageUrlJumpPlugin.ts +36 -0
  333. package/src/plugins/builtin/pageUrl/pageUrlTypes.ts +17 -0
  334. package/src/routeTree.gen.ts +249 -0
  335. package/src/routes/__root.tsx +23 -0
  336. package/src/routes/_layout/app/$appSlug/sub/$subValue.tsx +15 -0
  337. package/src/routes/_layout/app/$appSlug.tsx +15 -0
  338. package/src/routes/_layout/env/$envSlug/app/$appSlug/sub/$subValue.tsx +17 -0
  339. package/src/routes/_layout/env/$envSlug/app/$appSlug.tsx +15 -0
  340. package/src/routes/_layout/env/$envSlug/sub/$subValue.tsx +15 -0
  341. package/src/routes/_layout/env/$envSlug.tsx +15 -0
  342. package/src/routes/_layout/index.tsx +16 -0
  343. package/src/routes/_layout.tsx +9 -0
  344. package/src/types/ehTypes.ts +40 -0
  345. package/src/types/slateTypes.ts +22 -0
  346. package/src/types/tanstackQuery.ts +14 -0
  347. package/src/types/types.ts +20 -0
  348. package/src/types/userBehaviourTypes.ts +100 -0
  349. package/src/types/utilityTypes.ts +1 -0
  350. package/src/types/vite-env.d.ts +1 -0
  351. package/src/ui/components/ActionCard.tsx +30 -0
  352. package/src/ui/components/AppIcon.tsx +48 -0
  353. package/src/ui/components/commandInput/EhBaseSelector.tsx +51 -0
  354. package/src/ui/components/commandInput/types.ts +22 -0
  355. package/src/ui/components/contextDebug.tsx +13 -0
  356. package/src/ui/components/controlPanel/BaseDropdownSelector.tsx +163 -0
  357. package/src/ui/components/controlPanel/env/EnvDropdownContent.tsx +114 -0
  358. package/src/ui/components/controlPanel/env/EnvDropdownSelector.tsx +21 -0
  359. package/src/ui/components/error/DefaultErrorComponent.tsx +38 -0
  360. package/src/ui/components/error/RooutErrorPage.tsx +10 -0
  361. package/src/ui/components/footer/Footer.tsx +32 -0
  362. package/src/ui/components/header/PlaygroundHeader.tsx +26 -0
  363. package/src/ui/components/leftPanel/LeftPanel.tsx +194 -0
  364. package/src/ui/components/quickBar/EnvQuickJumpBar.tsx +65 -0
  365. package/src/ui/components/quickBar/QuickJumpBar.tsx +101 -0
  366. package/src/ui/components/widgetPanel/AddWidgetCard.tsx +17 -0
  367. package/src/ui/components/widgetPanel/WidgetGrid.tsx +18 -0
  368. package/src/ui/components/widgets/CredentialsWidget.tsx +55 -0
  369. package/src/ui/components/widgets/VersionWidget.tsx +29 -0
  370. package/src/ui/error/NotFoundError.tsx +13 -0
  371. package/src/ui/layout/Footer.tsx +16 -0
  372. package/src/ui/layout/Header.tsx +14 -0
  373. package/src/ui/layout/LoadingScreen.tsx +17 -0
  374. package/src/ui/layout/MainLayout.tsx +27 -0
  375. package/src/ui/layout/SideColumn.tsx +3 -0
  376. package/src/ui/layout/TopLevelProviders.tsx +52 -0
  377. package/src/ui/main/JumpTabContent.tsx +12 -0
  378. package/src/ui/main/Tabs.tsx +29 -0
  379. package/src/userDb/DbContext.tsx +22 -0
  380. package/src/userDb/EhDb.ts +22 -0
  381. package/src/util/availabilityMatrixUtils.ts +80 -0
  382. package/src/util/createEhRouter.ts +20 -0
  383. package/src/util/highlightMatches.tsx +29 -0
  384. package/src/util/reactQueryUtils.ts +12 -0
  385. package/src/util/route-utils.ts +71 -0
@@ -0,0 +1,194 @@
1
+ import { useState } from 'react'
2
+ import {
3
+ FileText,
4
+ FolderOpen,
5
+ Package,
6
+ PanelLeftClose,
7
+ PanelLeftOpen,
8
+ Server,
9
+ } from 'lucide-react'
10
+ import { Button } from '~/components/ui/button'
11
+ import { ScrollArea } from '~/components/ui/scroll-area'
12
+ import { cn } from '~/lib/utils'
13
+ import { useBootstrapConfig } from '~/modules/config/BootstrapConfigContext'
14
+
15
+ interface HierarchyNode {
16
+ id: string
17
+ label: string
18
+ type: 'env' | 'app' | 'group' | 'page'
19
+ children?: Array<HierarchyNode>
20
+ }
21
+
22
+ interface LeftPanelProps {
23
+ className?: string
24
+ }
25
+
26
+ // Function to build hierarchy data from real context data (most visited)
27
+ function buildHierarchyFromContext(indexData: any): Array<HierarchyNode> {
28
+ const hierarchyData: Array<HierarchyNode> = []
29
+
30
+ // Take a subset of environments representing most visited
31
+ const envs = Object.values(indexData.envs).slice(0, 3) // Take first 3 environments
32
+
33
+ envs.forEach((env: any) => {
34
+ const envNode: HierarchyNode = {
35
+ id: `env-${env.slug}`,
36
+ label: env.displayName || env.slug,
37
+ type: 'env',
38
+ children: [],
39
+ }
40
+
41
+ // Take a subset of apps for each environment (most visited)
42
+ const apps = Object.values(indexData.apps).slice(0, 3) // Take first 3 apps per env
43
+
44
+ apps.forEach((app: any) => {
45
+ const appNode: HierarchyNode = {
46
+ id: `env-${env.slug}-app-${app.slug}`,
47
+ label: app.displayName || app.slug,
48
+ type: 'app',
49
+ children: [],
50
+ }
51
+
52
+ // Add a few top pages if the app has UI structure
53
+ if (app.ui && app.ui.groups && app.ui.groups.length > 0) {
54
+ // Take the first group and show some pages directly under the app
55
+ const firstGroup = app.ui.groups[0]
56
+ if (firstGroup.pages && firstGroup.pages.length > 0) {
57
+ firstGroup.pages.slice(0, 2).forEach((page: any) => {
58
+ // Limit to 2 pages per app
59
+ appNode.children!.push({
60
+ id: `env-${env.slug}-app-${app.slug}-page-${page.slug}`,
61
+ label: page.title || page.slug,
62
+ type: 'page',
63
+ })
64
+ })
65
+ }
66
+ } else {
67
+ // If no groups, create a main page
68
+ appNode.children!.push({
69
+ id: `env-${env.slug}-app-${app.slug}-page-main`,
70
+ label: 'Dashboard',
71
+ type: 'page',
72
+ })
73
+ }
74
+
75
+ envNode.children!.push(appNode)
76
+ })
77
+
78
+ hierarchyData.push(envNode)
79
+ })
80
+
81
+ return hierarchyData
82
+ }
83
+
84
+ function getIconForType(type: HierarchyNode['type']) {
85
+ switch (type) {
86
+ case 'env':
87
+ return <Server className="w-4 h-4" />
88
+ case 'app':
89
+ return <Package className="w-4 h-4" />
90
+ case 'group':
91
+ return <FolderOpen className="w-4 h-4" />
92
+ case 'page':
93
+ return <FileText className="w-4 h-4" />
94
+ default:
95
+ return null
96
+ }
97
+ }
98
+
99
+ interface HierarchyItemProps {
100
+ node: HierarchyNode
101
+ level: number
102
+ }
103
+
104
+ function HierarchyItem({ node, level }: HierarchyItemProps) {
105
+ const hasChildren = node.children && node.children.length > 0
106
+ const indent = level * 20 // 20px per level for better visual hierarchy
107
+
108
+ return (
109
+ <div>
110
+ <div
111
+ className={cn(
112
+ 'flex items-center gap-3 py-1.5 px-2 rounded-md hover:bg-accent/50 hover:text-accent-foreground transition-colors',
113
+ level === 0 && 'font-semibold text-sm',
114
+ level === 1 && 'font-medium text-sm',
115
+ level === 2 && 'text-sm text-muted-foreground',
116
+ )}
117
+ style={{ paddingLeft: `${8 + indent}px` }}
118
+ >
119
+ <div className="flex items-center gap-2">
120
+ <div className="text-muted-foreground">
121
+ {getIconForType(node.type)}
122
+ </div>
123
+ <span className="truncate">{node.label}</span>
124
+ </div>
125
+ </div>
126
+
127
+ {hasChildren && (
128
+ <div>
129
+ {node.children!.map((child) => (
130
+ <HierarchyItem key={child.id} node={child} level={level + 1} />
131
+ ))}
132
+ </div>
133
+ )}
134
+ </div>
135
+ )
136
+ }
137
+
138
+ export function LeftPanel({ className }: LeftPanelProps) {
139
+ const [isCollapsed, setIsCollapsed] = useState(false)
140
+ const indexData = useBootstrapConfig()
141
+
142
+ // Build hierarchy data from real context data
143
+ const hierarchyData = buildHierarchyFromContext(indexData)
144
+
145
+ return (
146
+ <div className={cn('flex', className)}>
147
+ {/* Collapse/Expand Button */}
148
+ {isCollapsed && (
149
+ <div className="flex items-center justify-center w-8 bg-background border-r">
150
+ <Button
151
+ variant="ghost"
152
+ size="sm"
153
+ onClick={() => setIsCollapsed(false)}
154
+ className="h-6 w-6 p-0"
155
+ >
156
+ <PanelLeftOpen className="h-4 w-4" />
157
+ </Button>
158
+ </div>
159
+ )}
160
+
161
+ {/* Panel */}
162
+ <div
163
+ className={cn(
164
+ 'bg-background border-r transition-all duration-300 ease-in-out',
165
+ isCollapsed ? 'w-0 overflow-hidden' : 'w-80',
166
+ )}
167
+ >
168
+ <div className="h-full flex flex-col">
169
+ {/* Header */}
170
+ <div className="flex items-center justify-between p-4 border-b">
171
+ <h2 className="text-sm font-semibold">Most Visited</h2>
172
+ <Button
173
+ variant="ghost"
174
+ size="sm"
175
+ onClick={() => setIsCollapsed(true)}
176
+ className="h-6 w-6 p-0"
177
+ >
178
+ <PanelLeftClose className="h-4 w-4" />
179
+ </Button>
180
+ </div>
181
+
182
+ {/* Hierarchy Content */}
183
+ <ScrollArea className="flex-1 p-3">
184
+ <div className="space-y-0.5">
185
+ {hierarchyData.map((node) => (
186
+ <HierarchyItem key={node.id} node={node} level={0} />
187
+ ))}
188
+ </div>
189
+ </ScrollArea>
190
+ </div>
191
+ </div>
192
+ </div>
193
+ )
194
+ }
@@ -0,0 +1,65 @@
1
+ import { Globe, Package, Server } from 'lucide-react'
2
+ import { Button } from '~/components/ui/button'
3
+ import { useBootstrapConfig } from '~/modules/config/BootstrapConfigContext'
4
+ import { useEnvironmentContext } from '~/modules/environment/EnvironmentContext'
5
+
6
+ interface EnvQuickJumpBarProps {
7
+ className?: string
8
+ }
9
+
10
+ // Environment color mapping
11
+ const getEnvironmentColor = (envSlug: string) => {
12
+ if (envSlug.includes('cross')) return 'text-blue-600'
13
+ if (envSlug.includes('preprod')) return 'text-orange-600'
14
+ if (envSlug.includes('g64')) return 'text-violet-600'
15
+ return 'text-gray-600'
16
+ }
17
+
18
+ // Environment icon mapping
19
+ const getEnvironmentIcon = (envSlug: string) => {
20
+ if (envSlug.includes('cross')) return Package
21
+ if (envSlug.includes('prod')) return Globe
22
+ return Server
23
+ }
24
+
25
+ export function EnvQuickJumpBar({ className }: EnvQuickJumpBarProps) {
26
+ const indexData = useBootstrapConfig()
27
+ const { setCurrentEnv, currentEnv } = useEnvironmentContext()
28
+
29
+ // Get first 3-4 real environments from context data
30
+ const environments = Object.values(indexData.envs)
31
+ .slice(0, 4)
32
+ .map((env) => ({
33
+ slug: env.slug,
34
+ label: env.displayName || env.slug,
35
+ icon: getEnvironmentIcon(env.slug),
36
+ color: getEnvironmentColor(env.slug),
37
+ }))
38
+
39
+ const onClick = (environment: string) => {
40
+ setCurrentEnv(environment)
41
+ }
42
+
43
+ return (
44
+ <div className={`flex flex-col gap-1 ${className}`}>
45
+ {environments.map((env) => {
46
+ const Icon = env.icon
47
+ const isActive = env.slug === currentEnv?.slug
48
+
49
+ return (
50
+ <Button
51
+ key={env.slug}
52
+ variant={'ghost'}
53
+ onClick={() => onClick(env.slug)}
54
+ className={`justify-start
55
+ ${isActive ? 'bg-accent text-accent-foreground font-medium' : ''}
56
+ `}
57
+ >
58
+ <Icon className={`w-4 h-4 ${env.color} flex-shrink-0`} />
59
+ {env.label}
60
+ </Button>
61
+ )
62
+ })}
63
+ </div>
64
+ )
65
+ }
@@ -0,0 +1,101 @@
1
+ interface QuickJumpBarProps {
2
+ className?: string
3
+ }
4
+
5
+ export function QuickJumpBar(_: QuickJumpBarProps) {
6
+ return null
7
+ // const indexData = useBootstrapConfig()
8
+
9
+ // const { setCurrentResourceJumpSlug } = useResourceJumpContext();
10
+ // const { setCurrentEnv, currentEnv } = useEnvironmentContext();
11
+
12
+ // // Get first 6 pages from real data
13
+ // const getFirstSixPages = () => {
14
+ // const allPages = []
15
+ // for (const app of Object.values(indexData.apps)) {
16
+ // if (app.ui?.pages) {
17
+ // for (const page of app.ui?.pages) {
18
+ // allPages.push({ app, page })
19
+ // if (allPages.length >= 6) break
20
+ // }
21
+ // if (allPages.length >= 6) break
22
+ // }
23
+ // if (allPages.length >= 6) break
24
+ // }
25
+ // return allPages
26
+ // }
27
+
28
+ // const firstSixPages = getFirstSixPages()
29
+
30
+ // // Get first 3-4 real environments from context data
31
+ // const environments = Object.values(indexData.envs)
32
+ // .slice(0, 4)
33
+ // .map((env) => ({
34
+ // id: env.slug,
35
+ // label: env.displayName || env.slug,
36
+ // icon: getEnvironmentIcon(env.slug),
37
+ // color: getEnvironmentColor(env.slug),
38
+ // }))
39
+
40
+ // const handleEnvironmentChange = (environment: string) => {
41
+ // setCurrentEnv(environment)
42
+ // }
43
+
44
+ // const handlePageSelect = (
45
+ // app: EhAppIndexed,
46
+ // page: { slug: string; title?: string; url: string },
47
+ // ) => {
48
+ // setCurrentResourceJumpSlug(app.slug)
49
+ // // Could navigate to page here in the future
50
+ // console.log(`Navigate to ${app.slug}/${page.slug}`)
51
+ // }
52
+
53
+ // return (
54
+ // <div className={`flex mb-6 gap-3 ${className}`}>
55
+ // {/* Left Column - Simplified Environment Switcher */}
56
+ // <div className="flex flex-col gap-1">
57
+ // {environments.map((env) => {
58
+ // const Icon = env.icon
59
+ // const isActive = env.id === currentEnv?.slug
60
+
61
+ // return (
62
+ // <Button
63
+ // key={env.id}
64
+ // variant={'ghost'}
65
+ // onClick={() => handleEnvironmentChange(env.id)}
66
+ // className={`justify-start
67
+ // ${isActive ? 'bg-accent text-accent-foreground font-medium' : ''}
68
+ // `}
69
+ // >
70
+ // <Icon className={`w-4 h-4 ${env.color} flex-shrink-0`} />
71
+ // {env.label}
72
+ // </Button>
73
+ // )
74
+ // })}
75
+
76
+ // <div className="mt-2">
77
+ // <Button className="w-full">Environment...</Button>
78
+ // </div>
79
+ // </div>
80
+
81
+ // {/* Vertical Divider with padding */}
82
+ // <div>
83
+ // <Separator orientation="vertical" />
84
+ // </div>
85
+
86
+ // {/* Right Column - 2x3 Grid of Pages */}
87
+ // <div className="flex-1 p-4">
88
+ // <div className="grid grid-cols-2 gap-3">
89
+ // {firstSixPages.map(({ app, page}, index) => (
90
+ // <ActionCard
91
+ // key={`${app.slug}-${page.slug}-${index}`}
92
+ // app={app}
93
+ // actionName={getShortPageName(app, page)}
94
+ // onClick={() => handlePageSelect(app, page)}
95
+ // />
96
+ // ))}
97
+ // </div>
98
+ // </div>
99
+ // </div>
100
+ // )
101
+ }
@@ -0,0 +1,17 @@
1
+ import { Plus } from 'lucide-react'
2
+
3
+ interface AddWidgetCardProps {
4
+ onClick?: () => void
5
+ }
6
+
7
+ export function AddWidgetCard({ onClick }: AddWidgetCardProps) {
8
+ return (
9
+ <div
10
+ className="border-2 border-dashed border-muted h-32 rounded-md flex flex-col items-center justify-center cursor-pointer text-muted-foreground hover:text-foreground"
11
+ onClick={onClick}
12
+ >
13
+ <Plus className="h-5 w-5 mb-1" />
14
+ <span className="text-xs">Add widget…</span>
15
+ </div>
16
+ )
17
+ }
@@ -0,0 +1,18 @@
1
+ import { CredentialsWidget } from '../widgets/CredentialsWidget'
2
+ import { VersionWidget } from '../widgets/VersionWidget'
3
+ import { AddWidgetCard } from './AddWidgetCard'
4
+
5
+ interface WidgetGridProps {
6
+ widgets: ReadonlyArray<string>
7
+ onAddWidget?: () => void
8
+ }
9
+
10
+ export function WidgetGrid({ widgets, onAddWidget }: WidgetGridProps) {
11
+ return (
12
+ <div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-6 gap-4">
13
+ {widgets.includes('creds') && <CredentialsWidget />}
14
+ {widgets.includes('version') && <VersionWidget />}
15
+ <AddWidgetCard onClick={onAddWidget} />
16
+ </div>
17
+ )
18
+ }
@@ -0,0 +1,55 @@
1
+ import { Copy, KeyRound } from 'lucide-react'
2
+ import { Button } from '~/components/ui/button'
3
+ import { Card, CardContent, CardHeader, CardTitle } from '~/components/ui/card'
4
+ import { Badge } from '~/components/ui/badge'
5
+
6
+ interface Credential {
7
+ slug: string
8
+ desc: string
9
+ user: string
10
+ pwd: string
11
+ }
12
+
13
+ interface CredentialsWidgetProps {
14
+ credentials?: Array<Credential>
15
+ }
16
+
17
+ const defaultCredentials: Array<Credential> = [
18
+ { slug: 'SC', desc: 'San‑Carlos', user: 'test@company.com', pwd: 'password' },
19
+ { slug: 'AU', desc: 'Austin', user: 'austin@company.com', pwd: 'password' },
20
+ ]
21
+
22
+ export function CredentialsWidget({
23
+ credentials = defaultCredentials,
24
+ }: CredentialsWidgetProps) {
25
+ const copy = (text: string) => navigator.clipboard.writeText(text)
26
+
27
+ return (
28
+ <Card className="h-32">
29
+ <CardHeader className="py-2">
30
+ <CardTitle className="text-sm">Credentials</CardTitle>
31
+ </CardHeader>
32
+ <CardContent className="space-y-1 px-3 pb-3">
33
+ {credentials.map((cred) => (
34
+ <div
35
+ key={cred.slug}
36
+ className="flex items-center justify-between text-xs"
37
+ >
38
+ <Badge variant="secondary" className="mr-1 px-1.5 py-0.5">
39
+ {cred.slug}
40
+ </Badge>
41
+ <span className="truncate flex-1" title={cred.desc}>
42
+ {cred.desc}
43
+ </span>
44
+ <Button variant="ghost" size="icon" onClick={() => copy(cred.user)}>
45
+ <Copy className="h-3 w-3" />
46
+ </Button>
47
+ <Button variant="ghost" size="icon" onClick={() => copy(cred.pwd)}>
48
+ <KeyRound className="h-3 w-3" />
49
+ </Button>
50
+ </div>
51
+ ))}
52
+ </CardContent>
53
+ </Card>
54
+ )
55
+ }
@@ -0,0 +1,29 @@
1
+ import { ArrowUpRight } from 'lucide-react'
2
+ import { Card, CardContent, CardHeader, CardTitle } from '~/components/ui/card'
3
+
4
+ interface VersionWidgetProps {
5
+ version?: string
6
+ diffCommits?: number
7
+ diffDays?: number
8
+ }
9
+
10
+ export function VersionWidget({
11
+ version = 'v1.13.0',
12
+ diffCommits = 2,
13
+ diffDays = 5,
14
+ }: VersionWidgetProps) {
15
+ return (
16
+ <Card className="h-32">
17
+ <CardHeader className="py-2">
18
+ <CardTitle className="text-sm">Version</CardTitle>
19
+ </CardHeader>
20
+ <CardContent className="flex flex-col justify-between h-full px-3 pb-3">
21
+ <p className="text-lg font-semibold">{version}</p>
22
+ <p className="text-xs flex items-center text-muted-foreground">
23
+ <ArrowUpRight className="h-4 w-4 mr-1 text-green-600" />+{diffCommits}{' '}
24
+ commits • {diffDays}d ahead
25
+ </p>
26
+ </CardContent>
27
+ </Card>
28
+ )
29
+ }
@@ -0,0 +1,13 @@
1
+ import { Link } from '@tanstack/react-router'
2
+
3
+ export function NotFoundError() {
4
+ return (
5
+ <main className={'mt-8 text-center'}>
6
+ <h1>404 Not Found</h1>
7
+ <p>Sorry, I don't recognize this URL. Probably this was old link?</p>
8
+ <p>
9
+ Navigate to <Link to={'/'}>Home page</Link>
10
+ </p>
11
+ </main>
12
+ )
13
+ }
@@ -0,0 +1,16 @@
1
+ export function Footer() {
2
+ return (
3
+ <footer className="footer items-center p-4 bg-base-200 text-base-content mt-8">
4
+ <div className="items-center grid-flow-col">
5
+ <a
6
+ href="https://github.com/lislon/env-hopper"
7
+ target="_blank"
8
+ rel="noopener noreferrer"
9
+ className="link link-hover"
10
+ >
11
+ GitHub: lislon/env-hopper
12
+ </a>
13
+ </div>
14
+ </footer>
15
+ )
16
+ }
@@ -0,0 +1,14 @@
1
+ import { Button } from '~/components/ui/button'
2
+
3
+ export function Header() {
4
+ return (
5
+ <header className="flex items-center justify-between bg-background shadow border-b px-4 py-2 mb-4">
6
+ <div className="flex-1">
7
+ <a className="text-xl font-semibold text-foreground">EnvHopper</a>
8
+ </div>
9
+ <div className="flex-none">
10
+ <Button variant={'outline'}>Login</Button>
11
+ </div>
12
+ </header>
13
+ )
14
+ }
@@ -0,0 +1,17 @@
1
+ export interface LoadingFallbackProps {
2
+ failureCount?: number
3
+ }
4
+
5
+ export function LoadingScreen({ failureCount }: LoadingFallbackProps) {
6
+ return (
7
+ <>
8
+ <div className="flex flex-col items-center w-full h-full">
9
+ {/* <span className="loading loading-bars loading-lg"></span> */}
10
+ <div>Loading...</div>
11
+ {failureCount && failureCount > 1 ? (
12
+ <div className={'mt-2 text-xs'}>Attempt {failureCount}</div>
13
+ ) : null}
14
+ </div>
15
+ </>
16
+ )
17
+ }
@@ -0,0 +1,27 @@
1
+ import React from 'react'
2
+ import { PlaygroundHeader } from '../components/header/PlaygroundHeader'
3
+
4
+ import ContextDebug from '../components/contextDebug'
5
+ import { Footer } from '../components/footer/Footer'
6
+
7
+ export interface MainLayoutProps {
8
+ children: React.ReactNode
9
+ }
10
+
11
+ export function MainLayout({ children }: MainLayoutProps) {
12
+ return (
13
+ <div className="min-h-screen flex flex-col">
14
+ <div className="flex-1 flex">
15
+ {/* <LeftPanel className="h-screen" /> */}
16
+ <main className="flex-1 w-full flex justify-center font-sans p-6">
17
+ <div className="w-full max-w-4xl lg:max-w-5xl xl:max-w-6xl 2xl:max-w-7xl space-y-6">
18
+ <PlaygroundHeader />
19
+ {children}
20
+ </div>
21
+ </main>
22
+ </div>
23
+ <ContextDebug />
24
+ <Footer />
25
+ </div>
26
+ )
27
+ }
@@ -0,0 +1,3 @@
1
+ export function SideColumn() {
2
+ return <div className="h-full">SideColumn</div>
3
+ }
@@ -0,0 +1,52 @@
1
+ import React, { Suspense, useMemo, useState } from 'react'
2
+
3
+ import { LoadingScreen } from './LoadingScreen'
4
+ import { useQueryBootstrapConfig } from '~/api/data/useQueryBootstrapConfig'
5
+ import { ThemeProvider } from '~/components/theme-provider'
6
+ import { PluginManagerContextProvider } from '~/modules/pluginCore/PluginManagerContext'
7
+ import { PageUrlPluginContextProvider } from '~/plugins/builtin/pageUrl/PageUrlPluginContext'
8
+ import { PageUrlJumpPlugin } from '~/plugins/builtin/pageUrl/pageUrlJumpPlugin'
9
+ import { BootstrapConfigProvider } from '~/modules/config/BootstrapConfigContext'
10
+ import { GlobalConfigProvider } from '~/modules/config/GlobalConfigContext'
11
+ import { makePluginInterfaceForCore } from '~/modules/pluginCore/makePluginManagerContext'
12
+
13
+ export interface MainLayoutProps {
14
+ children: React.ReactNode
15
+ }
16
+
17
+ export function TopLevelProviders({ children }: MainLayoutProps) {
18
+ const { data, isPending } = useQueryBootstrapConfig()
19
+ const [plugins] = useState(() => [new PageUrlJumpPlugin()])
20
+
21
+ const pluginInterfaceForCore = useMemo(() => {
22
+ return data ? makePluginInterfaceForCore(plugins) : null
23
+ }, [plugins, data])
24
+
25
+ if (isPending || !data || !pluginInterfaceForCore) {
26
+ return <LoadingScreen />
27
+ }
28
+
29
+ return (
30
+ <ThemeProvider
31
+ attribute="class"
32
+ defaultTheme="system"
33
+ enableSystem
34
+ disableTransitionOnChange
35
+ >
36
+ <Suspense fallback={<LoadingScreen />}>
37
+ <BootstrapConfigProvider bootstrapConfig={data}>
38
+ <GlobalConfigProvider>
39
+ <PluginManagerContextProvider
40
+ plugins={plugins}
41
+ pluginInterfaceForCore={pluginInterfaceForCore}
42
+ >
43
+ <PageUrlPluginContextProvider>
44
+ {children}
45
+ </PageUrlPluginContextProvider>
46
+ </PluginManagerContextProvider>
47
+ </GlobalConfigProvider>
48
+ </BootstrapConfigProvider>
49
+ </Suspense>
50
+ </ThemeProvider>
51
+ )
52
+ }
@@ -0,0 +1,12 @@
1
+ import { Button } from '~/components/ui/button'
2
+
3
+ export function JumpTabContent() {
4
+ return (
5
+ <Button
6
+ size="lg"
7
+ className="w-full bg-green-600 hover:bg-green-700 text-white"
8
+ >
9
+ JUMP
10
+ </Button>
11
+ )
12
+ }
@@ -0,0 +1,29 @@
1
+ import React from 'react'
2
+
3
+ const tabList = [
4
+ { label: 'Jump', value: 'jump' },
5
+ { label: 'Logs', value: 'logs' },
6
+ ]
7
+
8
+ export function Tabs({ children }: { children: Array<React.ReactNode> }) {
9
+ const [active, setActive] = React.useState('jump')
10
+ return (
11
+ <div className="mb-4">
12
+ <div role="tablist" className="tabs tabs-boxed">
13
+ {tabList.map((tab) => (
14
+ <a
15
+ key={tab.value}
16
+ role="tab"
17
+ className={`tab${active === tab.value ? ' tab-active' : ''}`}
18
+ onClick={() => setActive(tab.value)}
19
+ >
20
+ {tab.label}
21
+ </a>
22
+ ))}
23
+ </div>
24
+ <div className="mt-4">
25
+ {active === 'jump' ? children[0] : children[1]}
26
+ </div>
27
+ </div>
28
+ )
29
+ }