@factorim/monotui 0.1.0
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/.github/workflows/ci.yml +36 -0
- package/.github/workflows/publish-to-npm.yml +36 -0
- package/.husky/commit-msg +2 -0
- package/.husky/pre-commit +2 -0
- package/.vscode/settings.json +34 -0
- package/LICENSE +21 -0
- package/README.md +78 -0
- package/biome.json +37 -0
- package/commitlint.config.cjs +3 -0
- package/dist/app/App.d.ts +2 -0
- package/dist/app/App.d.ts.map +1 -0
- package/dist/app/App.js +15 -0
- package/dist/app/App.js.map +1 -0
- package/dist/app/Layout.d.ts +2 -0
- package/dist/app/Layout.d.ts.map +1 -0
- package/dist/app/Layout.js +25 -0
- package/dist/app/Layout.js.map +1 -0
- package/dist/app/pages/About.d.ts +2 -0
- package/dist/app/pages/About.d.ts.map +1 -0
- package/dist/app/pages/About.js +6 -0
- package/dist/app/pages/About.js.map +1 -0
- package/dist/app/pages/AboutPage.d.ts +2 -0
- package/dist/app/pages/AboutPage.d.ts.map +1 -0
- package/dist/app/pages/AboutPage.js +6 -0
- package/dist/app/pages/AboutPage.js.map +1 -0
- package/dist/app/pages/Exit.d.ts +2 -0
- package/dist/app/pages/Exit.d.ts.map +1 -0
- package/dist/app/pages/Exit.js +6 -0
- package/dist/app/pages/Exit.js.map +1 -0
- package/dist/app/pages/ProjectPage.d.ts +2 -0
- package/dist/app/pages/ProjectPage.d.ts.map +1 -0
- package/dist/app/pages/ProjectPage.js +20 -0
- package/dist/app/pages/ProjectPage.js.map +1 -0
- package/dist/app/pages/Workspace.d.ts +2 -0
- package/dist/app/pages/Workspace.d.ts.map +1 -0
- package/dist/app/pages/Workspace.js +14 -0
- package/dist/app/pages/Workspace.js.map +1 -0
- package/dist/app/pages/WorkspacePage.d.ts +2 -0
- package/dist/app/pages/WorkspacePage.d.ts.map +1 -0
- package/dist/app/pages/WorkspacePage.js +16 -0
- package/dist/app/pages/WorkspacePage.js.map +1 -0
- package/dist/app/pages/Workspaces.d.ts +2 -0
- package/dist/app/pages/Workspaces.d.ts.map +1 -0
- package/dist/app/pages/Workspaces.js +16 -0
- package/dist/app/pages/Workspaces.js.map +1 -0
- package/dist/app/pages/WorkspacesPage.d.ts +2 -0
- package/dist/app/pages/WorkspacesPage.d.ts.map +1 -0
- package/dist/app/pages/WorkspacesPage.js +15 -0
- package/dist/app/pages/WorkspacesPage.js.map +1 -0
- package/dist/bin/init.d.ts +3 -0
- package/dist/bin/init.d.ts.map +1 -0
- package/dist/bin/init.js +7 -0
- package/dist/bin/init.js.map +1 -0
- package/dist/bin/trace-warnings.d.ts +3 -0
- package/dist/bin/trace-warnings.d.ts.map +1 -0
- package/dist/bin/trace-warnings.js +17 -0
- package/dist/bin/trace-warnings.js.map +1 -0
- package/dist/commands/init.d.ts +5 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +65 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/components/features/ProjectGrid/ColCompose.d.ts +12 -0
- package/dist/components/features/ProjectGrid/ColCompose.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ColCompose.js +16 -0
- package/dist/components/features/ProjectGrid/ColCompose.js.map +1 -0
- package/dist/components/features/ProjectGrid/ColMakefile.d.ts +9 -0
- package/dist/components/features/ProjectGrid/ColMakefile.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ColMakefile.js +8 -0
- package/dist/components/features/ProjectGrid/ColMakefile.js.map +1 -0
- package/dist/components/features/ProjectGrid/ColPackageJson.d.ts +11 -0
- package/dist/components/features/ProjectGrid/ColPackageJson.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ColPackageJson.js +8 -0
- package/dist/components/features/ProjectGrid/ColPackageJson.js.map +1 -0
- package/dist/components/features/ProjectGrid/EmptyCol.d.ts +2 -0
- package/dist/components/features/ProjectGrid/EmptyCol.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/EmptyCol.js +8 -0
- package/dist/components/features/ProjectGrid/EmptyCol.js.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectCommands.d.ts +2 -0
- package/dist/components/features/ProjectGrid/ProjectCommands.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectCommands.js +6 -0
- package/dist/components/features/ProjectGrid/ProjectCommands.js.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectGrid.d.ts +2 -0
- package/dist/components/features/ProjectGrid/ProjectGrid.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectGrid.js +25 -0
- package/dist/components/features/ProjectGrid/ProjectGrid.js.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectInfo.d.ts +2 -0
- package/dist/components/features/ProjectGrid/ProjectInfo.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectInfo.js +13 -0
- package/dist/components/features/ProjectGrid/ProjectInfo.js.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceCommands.d.ts +2 -0
- package/dist/components/features/ProjectGrid/WorkspaceCommands.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceCommands.js +6 -0
- package/dist/components/features/ProjectGrid/WorkspaceCommands.js.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceDetail.d.ts +2 -0
- package/dist/components/features/ProjectGrid/WorkspaceDetail.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceDetail.js +16 -0
- package/dist/components/features/ProjectGrid/WorkspaceDetail.js.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceInfo.d.ts +2 -0
- package/dist/components/features/ProjectGrid/WorkspaceInfo.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceInfo.js +11 -0
- package/dist/components/features/ProjectGrid/WorkspaceInfo.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColCompose.d.ts +10 -0
- package/dist/components/features/WorkspaceDetail/ColCompose.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColCompose.js +6 -0
- package/dist/components/features/WorkspaceDetail/ColCompose.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColMakefile.d.ts +9 -0
- package/dist/components/features/WorkspaceDetail/ColMakefile.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColMakefile.js +6 -0
- package/dist/components/features/WorkspaceDetail/ColMakefile.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColPackageJson.d.ts +11 -0
- package/dist/components/features/WorkspaceDetail/ColPackageJson.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColPackageJson.js +6 -0
- package/dist/components/features/WorkspaceDetail/ColPackageJson.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.d.ts +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.js +2 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy.d.ts +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy.js +2 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol.d.ts +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol.js +2 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/EmptyCol.d.ts +2 -0
- package/dist/components/features/WorkspaceDetail/EmptyCol.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/EmptyCol.js +6 -0
- package/dist/components/features/WorkspaceDetail/EmptyCol.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/EmptyRow.d.ts +2 -0
- package/dist/components/features/WorkspaceDetail/EmptyRow.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/EmptyRow.js +6 -0
- package/dist/components/features/WorkspaceDetail/EmptyRow.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/PackageJsonCol.d.ts +1 -0
- package/dist/components/features/WorkspaceDetail/PackageJsonCol.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/PackageJsonCol.js +2 -0
- package/dist/components/features/WorkspaceDetail/PackageJsonCol.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.d.ts +2 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.js +12 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail.d.ts +2 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail.js +16 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceInfo.d.ts +2 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceInfo.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceInfo.js +11 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceInfo.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceCommands.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceCommands.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceCommands.js +6 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceCommands.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceGrid.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceGrid.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceGrid.js +15 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceGrid.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.js +11 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo.js +13 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceRow.d.ts +9 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceRow.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceRow.js +18 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceRow.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesGrid.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesGrid.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesGrid.js +10 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesGrid.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesInfo.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesInfo.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesInfo.js +11 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesInfo.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesRow.d.ts +8 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesRow.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesRow.js +18 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesRow.js.map +1 -0
- package/dist/components/features/WorkspaceList/WorkspaceList.d.ts +2 -0
- package/dist/components/features/WorkspaceList/WorkspaceList.d.ts.map +1 -0
- package/dist/components/features/WorkspaceList/WorkspaceList.js +10 -0
- package/dist/components/features/WorkspaceList/WorkspaceList.js.map +1 -0
- package/dist/components/features/WorkspaceList/WorkspacesRow.d.ts +8 -0
- package/dist/components/features/WorkspaceList/WorkspacesRow.d.ts.map +1 -0
- package/dist/components/features/WorkspaceList/WorkspacesRow.js +15 -0
- package/dist/components/features/WorkspaceList/WorkspacesRow.js.map +1 -0
- package/dist/components/features/WorkspaceList/responsiveColumnWidths.d.ts +4 -0
- package/dist/components/features/WorkspaceList/responsiveColumnWidths.d.ts.map +1 -0
- package/dist/components/features/WorkspaceList/responsiveColumnWidths.js +11 -0
- package/dist/components/features/WorkspaceList/responsiveColumnWidths.js.map +1 -0
- package/dist/components/features/WorkspaceList/responsiveWidth.d.ts +4 -0
- package/dist/components/features/WorkspaceList/responsiveWidth.d.ts.map +1 -0
- package/dist/components/features/WorkspaceList/responsiveWidth.js +11 -0
- package/dist/components/features/WorkspaceList/responsiveWidth.js.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceInfo.d.ts +2 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceInfo.d.ts.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceInfo.js +13 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceInfo.js.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceList.d.ts +2 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceList.d.ts.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceList.js +10 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceList.js.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesGrid.d.ts +2 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesGrid.d.ts.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesGrid.js +10 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesGrid.js.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesInfo.d.ts +2 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesInfo.d.ts.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesInfo.js +11 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesInfo.js.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesRow.d.ts +8 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesRow.d.ts.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesRow.js +18 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesRow.js.map +1 -0
- package/dist/components/layouts/Footer/Footer.d.ts +2 -0
- package/dist/components/layouts/Footer/Footer.d.ts.map +1 -0
- package/dist/components/layouts/Footer/Footer.js +7 -0
- package/dist/components/layouts/Footer/Footer.js.map +1 -0
- package/dist/components/layouts/Header/Header.d.ts +2 -0
- package/dist/components/layouts/Header/Header.d.ts.map +1 -0
- package/dist/components/layouts/Header/Header.js +22 -0
- package/dist/components/layouts/Header/Header.js.map +1 -0
- package/dist/components/layouts/Header/ProjectCommands.d.ts +2 -0
- package/dist/components/layouts/Header/ProjectCommands.d.ts.map +1 -0
- package/dist/components/layouts/Header/ProjectCommands.js +8 -0
- package/dist/components/layouts/Header/ProjectCommands.js.map +1 -0
- package/dist/components/layouts/Header/WorkspaceCommands copy.d.ts +2 -0
- package/dist/components/layouts/Header/WorkspaceCommands copy.d.ts.map +1 -0
- package/dist/components/layouts/Header/WorkspaceCommands copy.js +6 -0
- package/dist/components/layouts/Header/WorkspaceCommands copy.js.map +1 -0
- package/dist/components/layouts/Header/WorkspaceCommands.d.ts +2 -0
- package/dist/components/layouts/Header/WorkspaceCommands.d.ts.map +1 -0
- package/dist/components/layouts/Header/WorkspaceCommands.js +13 -0
- package/dist/components/layouts/Header/WorkspaceCommands.js.map +1 -0
- package/dist/config/config.d.ts +8 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +39 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/defaults.d.ts +10 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +43 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/contexts/NavigationContext.d.ts +27 -0
- package/dist/contexts/NavigationContext.d.ts.map +1 -0
- package/dist/contexts/NavigationContext.js +33 -0
- package/dist/contexts/NavigationContext.js.map +1 -0
- package/dist/contexts/PageNavigationContext.d.ts +15 -0
- package/dist/contexts/PageNavigationContext.d.ts.map +1 -0
- package/dist/contexts/PageNavigationContext.js +16 -0
- package/dist/contexts/PageNavigationContext.js.map +1 -0
- package/dist/contexts/ProjectGridContext.d.ts +20 -0
- package/dist/contexts/ProjectGridContext.d.ts.map +1 -0
- package/dist/contexts/ProjectGridContext.js +40 -0
- package/dist/contexts/ProjectGridContext.js.map +1 -0
- package/dist/contexts/ProjectNavigationContext.d.ts +20 -0
- package/dist/contexts/ProjectNavigationContext.d.ts.map +1 -0
- package/dist/contexts/ProjectNavigationContext.js +35 -0
- package/dist/contexts/ProjectNavigationContext.js.map +1 -0
- package/dist/contexts/ResponsizeContext.d.ts +14 -0
- package/dist/contexts/ResponsizeContext.d.ts.map +1 -0
- package/dist/contexts/ResponsizeContext.js +34 -0
- package/dist/contexts/ResponsizeContext.js.map +1 -0
- package/dist/contexts/WorkspaceDiscoveryContext.d.ts +15 -0
- package/dist/contexts/WorkspaceDiscoveryContext.d.ts.map +1 -0
- package/dist/contexts/WorkspaceDiscoveryContext.js +14 -0
- package/dist/contexts/WorkspaceDiscoveryContext.js.map +1 -0
- package/dist/contexts/WorkspaceGridContext.d.ts +29 -0
- package/dist/contexts/WorkspaceGridContext.d.ts.map +1 -0
- package/dist/contexts/WorkspaceGridContext.js +47 -0
- package/dist/contexts/WorkspaceGridContext.js.map +1 -0
- package/dist/contexts/WorkspaceNavigationContext.d.ts +29 -0
- package/dist/contexts/WorkspaceNavigationContext.d.ts.map +1 -0
- package/dist/contexts/WorkspaceNavigationContext.js +41 -0
- package/dist/contexts/WorkspaceNavigationContext.js.map +1 -0
- package/dist/contexts/WorkspacesNavigationContext.d.ts +29 -0
- package/dist/contexts/WorkspacesNavigationContext.d.ts.map +1 -0
- package/dist/contexts/WorkspacesNavigationContext.js +37 -0
- package/dist/contexts/WorkspacesNavigationContext.js.map +1 -0
- package/dist/hooks/useDisovery.d.ts +7 -0
- package/dist/hooks/useDisovery.d.ts.map +1 -0
- package/dist/hooks/useDisovery.js +38 -0
- package/dist/hooks/useDisovery.js.map +1 -0
- package/dist/hooks/useGridNavigation.d.ts +19 -0
- package/dist/hooks/useGridNavigation.d.ts.map +1 -0
- package/dist/hooks/useGridNavigation.js +52 -0
- package/dist/hooks/useGridNavigation.js.map +1 -0
- package/dist/hooks/useNavigation.d.ts +10 -0
- package/dist/hooks/useNavigation.d.ts.map +1 -0
- package/dist/hooks/useNavigation.js +43 -0
- package/dist/hooks/useNavigation.js.map +1 -0
- package/dist/hooks/useNavigationMatrix.d.ts +6 -0
- package/dist/hooks/useNavigationMatrix.d.ts.map +1 -0
- package/dist/hooks/useNavigationMatrix.js +34 -0
- package/dist/hooks/useNavigationMatrix.js.map +1 -0
- package/dist/hooks/useProjectGrid.d.ts +12 -0
- package/dist/hooks/useProjectGrid.d.ts.map +1 -0
- package/dist/hooks/useProjectGrid.js +62 -0
- package/dist/hooks/useProjectGrid.js.map +1 -0
- package/dist/hooks/useRuntime.d.ts +1 -0
- package/dist/hooks/useRuntime.d.ts.map +1 -0
- package/dist/hooks/useRuntime.js +2 -0
- package/dist/hooks/useRuntime.js.map +1 -0
- package/dist/hooks/useWorkspaceDiscovery.d.ts +11 -0
- package/dist/hooks/useWorkspaceDiscovery.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceDiscovery.js +48 -0
- package/dist/hooks/useWorkspaceDiscovery.js.map +1 -0
- package/dist/hooks/useWorkspaceGrid.d.ts +11 -0
- package/dist/hooks/useWorkspaceGrid.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceGrid.js +59 -0
- package/dist/hooks/useWorkspaceGrid.js.map +1 -0
- package/dist/hooks/useWorkspaceNavigation.d.ts +10 -0
- package/dist/hooks/useWorkspaceNavigation.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceNavigation.js +31 -0
- package/dist/hooks/useWorkspaceNavigation.js.map +1 -0
- package/dist/hooks/useWorkspaceQuickActions.d.ts +4 -0
- package/dist/hooks/useWorkspaceQuickActions.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceQuickActions.js +100 -0
- package/dist/hooks/useWorkspaceQuickActions.js.map +1 -0
- package/dist/hooks/useWorkspaceQuickActionts.d.ts +4 -0
- package/dist/hooks/useWorkspaceQuickActionts.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceQuickActionts.js +28 -0
- package/dist/hooks/useWorkspaceQuickActionts.js.map +1 -0
- package/dist/hooks/useWorkspaceRuntime.d.ts +4 -0
- package/dist/hooks/useWorkspaceRuntime.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceRuntime.js +65 -0
- package/dist/hooks/useWorkspaceRuntime.js.map +1 -0
- package/dist/hooks/useWorkspacesGrid copy.d.ts +10 -0
- package/dist/hooks/useWorkspacesGrid copy.d.ts.map +1 -0
- package/dist/hooks/useWorkspacesGrid copy.js +31 -0
- package/dist/hooks/useWorkspacesGrid copy.js.map +1 -0
- package/dist/hooks/useWorkspacesGrid.d.ts +11 -0
- package/dist/hooks/useWorkspacesGrid.d.ts.map +1 -0
- package/dist/hooks/useWorkspacesGrid.js +31 -0
- package/dist/hooks/useWorkspacesGrid.js.map +1 -0
- package/dist/hooks/useWorkspacesNavigation.d.ts +10 -0
- package/dist/hooks/useWorkspacesNavigation.d.ts.map +1 -0
- package/dist/hooks/useWorkspacesNavigation.js +31 -0
- package/dist/hooks/useWorkspacesNavigation.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/services/discovery/facets/biome-parser.d.ts +3 -0
- package/dist/services/discovery/facets/biome-parser.d.ts.map +1 -0
- package/dist/services/discovery/facets/biome-parser.js +73 -0
- package/dist/services/discovery/facets/biome-parser.js.map +1 -0
- package/dist/services/discovery/facets/compose-parser.d.ts +17 -0
- package/dist/services/discovery/facets/compose-parser.d.ts.map +1 -0
- package/dist/services/discovery/facets/compose-parser.js +168 -0
- package/dist/services/discovery/facets/compose-parser.js.map +1 -0
- package/dist/services/discovery/facets/composeParser.d.ts +1 -0
- package/dist/services/discovery/facets/composeParser.d.ts.map +1 -0
- package/dist/services/discovery/facets/composeParser.js +2 -0
- package/dist/services/discovery/facets/composeParser.js.map +1 -0
- package/dist/services/discovery/facets/makefile-parser.d.ts +8 -0
- package/dist/services/discovery/facets/makefile-parser.d.ts.map +1 -0
- package/dist/services/discovery/facets/makefile-parser.js +143 -0
- package/dist/services/discovery/facets/makefile-parser.js.map +1 -0
- package/dist/services/discovery/facets/makefileParser.d.ts +1 -0
- package/dist/services/discovery/facets/makefileParser.d.ts.map +1 -0
- package/dist/services/discovery/facets/makefileParser.js +2 -0
- package/dist/services/discovery/facets/makefileParser.js.map +1 -0
- package/dist/services/discovery/facets/manifest-parser.d.ts +7 -0
- package/dist/services/discovery/facets/manifest-parser.d.ts.map +1 -0
- package/dist/services/discovery/facets/manifest-parser.js +43 -0
- package/dist/services/discovery/facets/manifest-parser.js.map +1 -0
- package/dist/services/discovery/facets/manifestParser.d.ts +1 -0
- package/dist/services/discovery/facets/manifestParser.d.ts.map +1 -0
- package/dist/services/discovery/facets/manifestParser.js +2 -0
- package/dist/services/discovery/facets/manifestParser.js.map +1 -0
- package/dist/services/discovery/facets/package-json-parser.d.ts +7 -0
- package/dist/services/discovery/facets/package-json-parser.d.ts.map +1 -0
- package/dist/services/discovery/facets/package-json-parser.js +118 -0
- package/dist/services/discovery/facets/package-json-parser.js.map +1 -0
- package/dist/services/discovery/index.d.ts +2 -0
- package/dist/services/discovery/index.d.ts.map +1 -0
- package/dist/services/discovery/index.js +2 -0
- package/dist/services/discovery/index.js.map +1 -0
- package/dist/services/discovery/workspace-discovery.d.ts +4 -0
- package/dist/services/discovery/workspace-discovery.d.ts.map +1 -0
- package/dist/services/discovery/workspace-discovery.js +86 -0
- package/dist/services/discovery/workspace-discovery.js.map +1 -0
- package/dist/services/discovery/workspaceDiscovery.d.ts +3 -0
- package/dist/services/discovery/workspaceDiscovery.d.ts.map +1 -0
- package/dist/services/discovery/workspaceDiscovery.js +17 -0
- package/dist/services/discovery/workspaceDiscovery.js.map +1 -0
- package/dist/services/runtime/command-runner.d.ts +17 -0
- package/dist/services/runtime/command-runner.d.ts.map +1 -0
- package/dist/services/runtime/command-runner.js +70 -0
- package/dist/services/runtime/command-runner.js.map +1 -0
- package/dist/services/runtime/docker-runtime.d.ts +15 -0
- package/dist/services/runtime/docker-runtime.d.ts.map +1 -0
- package/dist/services/runtime/docker-runtime.js +133 -0
- package/dist/services/runtime/docker-runtime.js.map +1 -0
- package/dist/services/runtime/node-runtime.d.ts +4 -0
- package/dist/services/runtime/node-runtime.d.ts.map +1 -0
- package/dist/services/runtime/node-runtime.js +210 -0
- package/dist/services/runtime/node-runtime.js.map +1 -0
- package/dist/services/runtime/resolve-runtime-conflicts.d.ts +15 -0
- package/dist/services/runtime/resolve-runtime-conflicts.d.ts.map +1 -0
- package/dist/services/runtime/resolve-runtime-conflicts.js +36 -0
- package/dist/services/runtime/resolve-runtime-conflicts.js.map +1 -0
- package/dist/services/runtime/resolve-runtime.d.ts +15 -0
- package/dist/services/runtime/resolve-runtime.d.ts.map +1 -0
- package/dist/services/runtime/resolve-runtime.js +36 -0
- package/dist/services/runtime/resolve-runtime.js.map +1 -0
- package/dist/services/runtime/stop-runtime.d.ts +14 -0
- package/dist/services/runtime/stop-runtime.d.ts.map +1 -0
- package/dist/services/runtime/stop-runtime.js +48 -0
- package/dist/services/runtime/stop-runtime.js.map +1 -0
- package/dist/theme/theme.d.ts +33 -0
- package/dist/theme/theme.d.ts.map +1 -0
- package/dist/theme/theme.js +61 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/types/config.d.ts +44 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/navigation.d.ts +10 -0
- package/dist/types/navigation.d.ts.map +1 -0
- package/dist/types/navigation.js +59 -0
- package/dist/types/navigation.js.map +1 -0
- package/dist/types/page.d.ts +6 -0
- package/dist/types/page.d.ts.map +1 -0
- package/dist/types/page.js +7 -0
- package/dist/types/page.js.map +1 -0
- package/dist/types/project-grid.d.ts +48 -0
- package/dist/types/project-grid.d.ts.map +1 -0
- package/dist/types/project-grid.js +9 -0
- package/dist/types/project-grid.js.map +1 -0
- package/dist/types/project.d.ts +64 -0
- package/dist/types/project.d.ts.map +1 -0
- package/dist/types/project.js +2 -0
- package/dist/types/project.js.map +1 -0
- package/dist/types/projects-grid.d.ts +32 -0
- package/dist/types/projects-grid.d.ts.map +1 -0
- package/dist/types/projects-grid.js +2 -0
- package/dist/types/projects-grid.js.map +1 -0
- package/dist/types/quick-actions.d.ts +7 -0
- package/dist/types/quick-actions.d.ts.map +1 -0
- package/dist/types/quick-actions.js +2 -0
- package/dist/types/quick-actions.js.map +1 -0
- package/dist/types/runtime.d.ts +16 -0
- package/dist/types/runtime.d.ts.map +1 -0
- package/dist/types/runtime.js +2 -0
- package/dist/types/runtime.js.map +1 -0
- package/dist/types/workpace-grid.d.ts +32 -0
- package/dist/types/workpace-grid.d.ts.map +1 -0
- package/dist/types/workpace-grid.js +2 -0
- package/dist/types/workpace-grid.js.map +1 -0
- package/dist/types/workspace-grid.d.ts +32 -0
- package/dist/types/workspace-grid.d.ts.map +1 -0
- package/dist/types/workspace-grid.js +2 -0
- package/dist/types/workspace-grid.js.map +1 -0
- package/dist/types/workspace-navigation.d.ts +37 -0
- package/dist/types/workspace-navigation.d.ts.map +1 -0
- package/dist/types/workspace-navigation.js +7 -0
- package/dist/types/workspace-navigation.js.map +1 -0
- package/dist/types/workspace-quick-actions.d.ts +12 -0
- package/dist/types/workspace-quick-actions.d.ts.map +1 -0
- package/dist/types/workspace-quick-actions.js +2 -0
- package/dist/types/workspace-quick-actions.js.map +1 -0
- package/dist/types/workspace-runtime.d.ts +21 -0
- package/dist/types/workspace-runtime.d.ts.map +1 -0
- package/dist/types/workspace-runtime.js +2 -0
- package/dist/types/workspace-runtime.js.map +1 -0
- package/dist/types/workspace.d.ts +63 -0
- package/dist/types/workspace.d.ts.map +1 -0
- package/dist/types/workspace.js +2 -0
- package/dist/types/workspace.js.map +1 -0
- package/dist/types/workspaces-grid copy.d.ts +37 -0
- package/dist/types/workspaces-grid copy.d.ts.map +1 -0
- package/dist/types/workspaces-grid copy.js +7 -0
- package/dist/types/workspaces-grid copy.js.map +1 -0
- package/dist/types/workspaces-grid.d.ts +37 -0
- package/dist/types/workspaces-grid.d.ts.map +1 -0
- package/dist/types/workspaces-grid.js +7 -0
- package/dist/types/workspaces-grid.js.map +1 -0
- package/dist/types/worspace-state.d.ts +19 -0
- package/dist/types/worspace-state.d.ts.map +1 -0
- package/dist/types/worspace-state.js +2 -0
- package/dist/types/worspace-state.js.map +1 -0
- package/dist/utils/framework-detector.d.ts +7 -0
- package/dist/utils/framework-detector.d.ts.map +1 -0
- package/dist/utils/framework-detector.js +111 -0
- package/dist/utils/framework-detector.js.map +1 -0
- package/dist/utils/fs/directories.d.ts +7 -0
- package/dist/utils/fs/directories.d.ts.map +1 -0
- package/dist/utils/fs/directories.js +41 -0
- package/dist/utils/fs/directories.js.map +1 -0
- package/dist/utils/fs/file.d.ts +8 -0
- package/dist/utils/fs/file.d.ts.map +1 -0
- package/dist/utils/fs/file.js +31 -0
- package/dist/utils/fs/file.js.map +1 -0
- package/dist/utils/fs/package-json.d.ts +2 -0
- package/dist/utils/fs/package-json.d.ts.map +1 -0
- package/dist/utils/fs/package-json.js +11 -0
- package/dist/utils/fs/package-json.js.map +1 -0
- package/dist/utils/fs/scanner.d.ts +6 -0
- package/dist/utils/fs/scanner.d.ts.map +1 -0
- package/dist/utils/fs/scanner.js +32 -0
- package/dist/utils/fs/scanner.js.map +1 -0
- package/dist/utils/getPackageVersion.d.ts +2 -0
- package/dist/utils/getPackageVersion.d.ts.map +1 -0
- package/dist/utils/getPackageVersion.js +6 -0
- package/dist/utils/getPackageVersion.js.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +99 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/logging/logger.d.ts +14 -0
- package/dist/utils/logging/logger.d.ts.map +1 -0
- package/dist/utils/logging/logger.js +99 -0
- package/dist/utils/logging/logger.js.map +1 -0
- package/dist/utils/navigation/grid-navigation.d.ts +9 -0
- package/dist/utils/navigation/grid-navigation.d.ts.map +1 -0
- package/dist/utils/navigation/grid-navigation.js +53 -0
- package/dist/utils/navigation/grid-navigation.js.map +1 -0
- package/dist/utils/navigation/navigation-helper.d.ts +19 -0
- package/dist/utils/navigation/navigation-helper.d.ts.map +1 -0
- package/dist/utils/navigation/navigation-helper.js +66 -0
- package/dist/utils/navigation/navigation-helper.js.map +1 -0
- package/dist/utils/navigation-helper.d.ts +9 -0
- package/dist/utils/navigation-helper.d.ts.map +1 -0
- package/dist/utils/navigation-helper.js +53 -0
- package/dist/utils/navigation-helper.js.map +1 -0
- package/dist/utils/package-json.d.ts +2 -0
- package/dist/utils/package-json.d.ts.map +1 -0
- package/dist/utils/package-json.js +11 -0
- package/dist/utils/package-json.js.map +1 -0
- package/dist/utils/port.d.ts +6 -0
- package/dist/utils/port.d.ts.map +1 -0
- package/dist/utils/port.js +24 -0
- package/dist/utils/port.js.map +1 -0
- package/dist/utils/project/project-grid.d.ts +17 -0
- package/dist/utils/project/project-grid.d.ts.map +1 -0
- package/dist/utils/project/project-grid.js +121 -0
- package/dist/utils/project/project-grid.js.map +1 -0
- package/dist/utils/project/workspace-grid.d.ts +17 -0
- package/dist/utils/project/workspace-grid.d.ts.map +1 -0
- package/dist/utils/project/workspace-grid.js +121 -0
- package/dist/utils/project/workspace-grid.js.map +1 -0
- package/dist/utils/runtime/port.d.ts +6 -0
- package/dist/utils/runtime/port.d.ts.map +1 -0
- package/dist/utils/runtime/port.js +24 -0
- package/dist/utils/runtime/port.js.map +1 -0
- package/dist/utils/workpace/workspace-grid.d.ts +17 -0
- package/dist/utils/workpace/workspace-grid.d.ts.map +1 -0
- package/dist/utils/workpace/workspace-grid.js +121 -0
- package/dist/utils/workpace/workspace-grid.js.map +1 -0
- package/dist/utils/workpace/workspace-helper.d.ts +7 -0
- package/dist/utils/workpace/workspace-helper.d.ts.map +1 -0
- package/dist/utils/workpace/workspace-helper.js +10 -0
- package/dist/utils/workpace/workspace-helper.js.map +1 -0
- package/dist/utils/workpace/workspace-navigation.d.ts +17 -0
- package/dist/utils/workpace/workspace-navigation.d.ts.map +1 -0
- package/dist/utils/workpace/workspace-navigation.js +123 -0
- package/dist/utils/workpace/workspace-navigation.js.map +1 -0
- package/dist/utils/workpace/workspaces-grid copy.d.ts +30 -0
- package/dist/utils/workpace/workspaces-grid copy.d.ts.map +1 -0
- package/dist/utils/workpace/workspaces-grid copy.js +97 -0
- package/dist/utils/workpace/workspaces-grid copy.js.map +1 -0
- package/dist/utils/workpace/workspaces-grid.d.ts +22 -0
- package/dist/utils/workpace/workspaces-grid.d.ts.map +1 -0
- package/dist/utils/workpace/workspaces-grid.js +123 -0
- package/dist/utils/workpace/workspaces-grid.js.map +1 -0
- package/dist/utils/workpace/worspace-state.d.ts +18 -0
- package/dist/utils/workpace/worspace-state.d.ts.map +1 -0
- package/dist/utils/workpace/worspace-state.js +2 -0
- package/dist/utils/workpace/worspace-state.js.map +1 -0
- package/dist/utils/workspace/framework-detector.d.ts +7 -0
- package/dist/utils/workspace/framework-detector.d.ts.map +1 -0
- package/dist/utils/workspace/framework-detector.js +111 -0
- package/dist/utils/workspace/framework-detector.js.map +1 -0
- package/dist/utils/workspace/workspace-grid.d.ts +22 -0
- package/dist/utils/workspace/workspace-grid.d.ts.map +1 -0
- package/dist/utils/workspace/workspace-grid.js +123 -0
- package/dist/utils/workspace/workspace-grid.js.map +1 -0
- package/dist/utils/workspace/workspace-helper.d.ts +7 -0
- package/dist/utils/workspace/workspace-helper.d.ts.map +1 -0
- package/dist/utils/workspace/workspace-helper.js +10 -0
- package/dist/utils/workspace/workspace-helper.js.map +1 -0
- package/dist/utils/workspace/workspaces-grid.d.ts +22 -0
- package/dist/utils/workspace/workspaces-grid.d.ts.map +1 -0
- package/dist/utils/workspace/workspaces-grid.js +123 -0
- package/dist/utils/workspace/workspaces-grid.js.map +1 -0
- package/dist/utils/workspace-helper.d.ts +10 -0
- package/dist/utils/workspace-helper.d.ts.map +1 -0
- package/dist/utils/workspace-helper.js +46 -0
- package/dist/utils/workspace-helper.js.map +1 -0
- package/dist/utils/workspace-navigation.d.ts +1 -0
- package/dist/utils/workspace-navigation.d.ts.map +1 -0
- package/dist/utils/workspace-navigation.js +2 -0
- package/dist/utils/workspace-navigation.js.map +1 -0
- package/jest.config.mjs +31 -0
- package/package.json +69 -0
- package/scripts/run-commitlint.sh +48 -0
- package/src/app/App.tsx +25 -0
- package/src/app/Layout.tsx +37 -0
- package/src/app/pages/Exit.tsx +9 -0
- package/src/app/pages/ProjectPage.tsx +37 -0
- package/src/app/pages/WorkspacePage.tsx +33 -0
- package/src/bin/init.ts +7 -0
- package/src/bin/trace-warnings.ts +25 -0
- package/src/commands/init.ts +80 -0
- package/src/components/features/ProjectGrid/ColCompose.tsx +99 -0
- package/src/components/features/ProjectGrid/ColMakefile.tsx +44 -0
- package/src/components/features/ProjectGrid/ColPackageJson.tsx +54 -0
- package/src/components/features/ProjectGrid/EmptyCol.tsx +28 -0
- package/src/components/features/ProjectGrid/ProjectGrid.tsx +94 -0
- package/src/components/features/ProjectGrid/ProjectInfo.tsx +67 -0
- package/src/components/features/WorkspaceGrid/WorkspaceGrid.tsx +52 -0
- package/src/components/features/WorkspaceGrid/WorkspaceInfo.tsx +89 -0
- package/src/components/features/WorkspaceGrid/WorkspaceRow.tsx +115 -0
- package/src/components/layouts/Header/Header.tsx +51 -0
- package/src/components/layouts/Header/ProjectCommands.tsx +17 -0
- package/src/components/layouts/Header/WorkspaceCommands.tsx +60 -0
- package/src/config/config.ts +46 -0
- package/src/config/defaults.ts +44 -0
- package/src/contexts/PageNavigationContext.tsx +39 -0
- package/src/contexts/ProjectGridContext.tsx +92 -0
- package/src/contexts/WorkspaceDiscoveryContext.tsx +46 -0
- package/src/contexts/WorkspaceGridContext.tsx +113 -0
- package/src/hooks/useProjectGrid.ts +77 -0
- package/src/hooks/useWorkspaceDiscovery.ts +61 -0
- package/src/hooks/useWorkspaceGrid.ts +85 -0
- package/src/hooks/useWorkspaceQuickActions.ts +114 -0
- package/src/hooks/useWorkspaceRuntime.ts +92 -0
- package/src/index.ts +10 -0
- package/src/services/discovery/facets/compose-parser.ts +236 -0
- package/src/services/discovery/facets/makefile-parser.ts +196 -0
- package/src/services/discovery/facets/package-json-parser.ts +151 -0
- package/src/services/discovery/index.ts +1 -0
- package/src/services/discovery/workspace-discovery.ts +105 -0
- package/src/services/runtime/command-runner.ts +87 -0
- package/src/services/runtime/docker-runtime.ts +171 -0
- package/src/services/runtime/node-runtime.ts +253 -0
- package/src/services/runtime/resolve-runtime.ts +45 -0
- package/src/services/runtime/stop-runtime.ts +52 -0
- package/src/theme/theme.ts +72 -0
- package/src/types/config.ts +50 -0
- package/src/types/page.ts +5 -0
- package/src/types/project-grid.ts +73 -0
- package/src/types/project.ts +81 -0
- package/src/types/workspace-grid.ts +41 -0
- package/src/types/workspace-quick-actions.ts +12 -0
- package/src/types/workspace-runtime.ts +28 -0
- package/src/utils/fs/directories.test.ts +60 -0
- package/src/utils/fs/directories.ts +54 -0
- package/src/utils/fs/file.test.ts +90 -0
- package/src/utils/fs/file.ts +32 -0
- package/src/utils/fs/package-json.ts +12 -0
- package/src/utils/logging/logger.ts +103 -0
- package/src/utils/navigation/grid-navigation.ts +60 -0
- package/src/utils/navigation/navigation-helper.ts +84 -0
- package/src/utils/project/project-grid.ts +165 -0
- package/src/utils/runtime/port.test.ts +34 -0
- package/src/utils/runtime/port.ts +26 -0
- package/src/utils/workspace/framework-detector.ts +77 -0
- package/src/utils/workspace/workspace-grid.ts +161 -0
- package/src/utils/workspace/workspace-helper.ts +21 -0
- package/tsconfig.json +23 -0
- package/workspace-cli.mjs +18 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { useComponentTheme } from "@inkjs/ui"
|
|
2
|
+
import { Box, Text } from "ink"
|
|
3
|
+
import { useContext } from "react"
|
|
4
|
+
|
|
5
|
+
import { ProjectGridContext } from "../../../contexts/ProjectGridContext.js"
|
|
6
|
+
import { WorkspaceDiscoveryContext } from "../../../contexts/WorkspaceDiscoveryContext.js"
|
|
7
|
+
import type { GridTheme } from "../../../theme/theme.js"
|
|
8
|
+
import type { RuntimeStatus } from "../../../types/workspace-runtime.js"
|
|
9
|
+
import { ColCompose } from "./ColCompose.js"
|
|
10
|
+
import { ColMakefile } from "./ColMakefile.js"
|
|
11
|
+
import { ColPackageJson } from "./ColPackageJson.js"
|
|
12
|
+
import { EmptyCol } from "./EmptyCol.js"
|
|
13
|
+
|
|
14
|
+
export function ProjectGrid() {
|
|
15
|
+
const { project, workspaceRuntimes } = useContext(WorkspaceDiscoveryContext)
|
|
16
|
+
const { workspaceNavigationGrid, row, col } = useContext(ProjectGridContext)
|
|
17
|
+
const { styles } = useComponentTheme<GridTheme>("GridTheme")
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
makefileCells,
|
|
21
|
+
packageJsonCells,
|
|
22
|
+
composeCommandCells,
|
|
23
|
+
composeServiceCells,
|
|
24
|
+
} = workspaceNavigationGrid
|
|
25
|
+
|
|
26
|
+
const composeServiceStatuses: Record<string, RuntimeStatus> =
|
|
27
|
+
workspaceRuntimes
|
|
28
|
+
.find(
|
|
29
|
+
(workspaceRuntime) => workspaceRuntime.workspacePath === project?.path,
|
|
30
|
+
)
|
|
31
|
+
?.runStates.filter((runState) => runState.type === "service")
|
|
32
|
+
.reduce<Record<string, RuntimeStatus>>((acc, runState) => {
|
|
33
|
+
acc[runState.name] = runState.status
|
|
34
|
+
return acc
|
|
35
|
+
}, {}) ?? {}
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Box flexDirection="column" width="100%">
|
|
39
|
+
<Box width="100%" {...styles.border()}>
|
|
40
|
+
<Box flexDirection="column" width="4%">
|
|
41
|
+
<Box
|
|
42
|
+
flexDirection="column"
|
|
43
|
+
width="100%"
|
|
44
|
+
borderStyle="single"
|
|
45
|
+
borderTop={false}
|
|
46
|
+
borderBottom={true}
|
|
47
|
+
borderLeft={false}
|
|
48
|
+
borderRight={false}
|
|
49
|
+
{...styles.border()}
|
|
50
|
+
>
|
|
51
|
+
<Box width="100%">
|
|
52
|
+
<Text> </Text>
|
|
53
|
+
</Box>
|
|
54
|
+
<Box width="100%">
|
|
55
|
+
<Text> </Text>
|
|
56
|
+
</Box>
|
|
57
|
+
</Box>
|
|
58
|
+
<Box width="100%">
|
|
59
|
+
<Text {...styles.action()}>{" < "}</Text>
|
|
60
|
+
</Box>
|
|
61
|
+
</Box>
|
|
62
|
+
|
|
63
|
+
{makefileCells.length > 0 && (
|
|
64
|
+
<ColMakefile makefileCells={makefileCells} row={row} col={col} />
|
|
65
|
+
)}
|
|
66
|
+
|
|
67
|
+
{packageJsonCells.length > 0 && project && (
|
|
68
|
+
<ColPackageJson
|
|
69
|
+
project={project}
|
|
70
|
+
packageJsonCells={packageJsonCells}
|
|
71
|
+
row={row}
|
|
72
|
+
col={col}
|
|
73
|
+
/>
|
|
74
|
+
)}
|
|
75
|
+
|
|
76
|
+
{composeServiceCells.length > 0 && (
|
|
77
|
+
<ColCompose
|
|
78
|
+
composeCommandCells={composeCommandCells}
|
|
79
|
+
composeServiceCells={composeServiceCells}
|
|
80
|
+
composeServiceStatuses={composeServiceStatuses}
|
|
81
|
+
row={row}
|
|
82
|
+
col={col}
|
|
83
|
+
/>
|
|
84
|
+
)}
|
|
85
|
+
|
|
86
|
+
{packageJsonCells.length === 0 && <EmptyCol />}
|
|
87
|
+
|
|
88
|
+
{makefileCells.length === 0 && <EmptyCol />}
|
|
89
|
+
|
|
90
|
+
{composeServiceCells.length === 0 && <EmptyCol />}
|
|
91
|
+
</Box>
|
|
92
|
+
</Box>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { useComponentTheme } from "@inkjs/ui"
|
|
2
|
+
import { Box, Text } from "ink"
|
|
3
|
+
import { useContext } from "react"
|
|
4
|
+
|
|
5
|
+
import { ProjectGridContext } from "../../../contexts/ProjectGridContext.js"
|
|
6
|
+
import type { GridTheme } from "../../../theme/theme.js"
|
|
7
|
+
import {
|
|
8
|
+
getCellLabel,
|
|
9
|
+
getProjectCellByPosition,
|
|
10
|
+
} from "../../../utils/project/project-grid.js"
|
|
11
|
+
|
|
12
|
+
export function ProjectInfo() {
|
|
13
|
+
const { workspaceNavigationGrid, row, col } = useContext(ProjectGridContext)
|
|
14
|
+
const { styles } = useComponentTheme<GridTheme>("GridTheme")
|
|
15
|
+
|
|
16
|
+
const selectedCell = getProjectCellByPosition(
|
|
17
|
+
workspaceNavigationGrid,
|
|
18
|
+
row,
|
|
19
|
+
col,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Box
|
|
24
|
+
flexDirection="column"
|
|
25
|
+
width="100%"
|
|
26
|
+
borderStyle="single"
|
|
27
|
+
borderTop={true}
|
|
28
|
+
borderBottom={false}
|
|
29
|
+
borderLeft={false}
|
|
30
|
+
borderRight={false}
|
|
31
|
+
{...styles.border()}
|
|
32
|
+
>
|
|
33
|
+
{selectedCell && (
|
|
34
|
+
<Box width="100%" flexDirection="column">
|
|
35
|
+
<Text {...styles.info()}>{getCellLabel(selectedCell)}</Text>
|
|
36
|
+
|
|
37
|
+
<Box>
|
|
38
|
+
{selectedCell.type === "makefile" && (
|
|
39
|
+
<Box>
|
|
40
|
+
<Text {...styles.action()}>{selectedCell.command.name}</Text>
|
|
41
|
+
<Text dimColor> → </Text>
|
|
42
|
+
<Text>{selectedCell.command.exec}</Text>
|
|
43
|
+
</Box>
|
|
44
|
+
)}
|
|
45
|
+
{selectedCell.type === "packageJson" && (
|
|
46
|
+
<Box>
|
|
47
|
+
<Text {...styles.action()}>{selectedCell.script.name}</Text>
|
|
48
|
+
<Text dimColor> → </Text>
|
|
49
|
+
<Text>{selectedCell.script.exec}</Text>
|
|
50
|
+
</Box>
|
|
51
|
+
)}
|
|
52
|
+
{selectedCell.type === "composeCommand" && (
|
|
53
|
+
<Box>
|
|
54
|
+
<Text {...styles.action()}>{selectedCell.action.name}</Text>
|
|
55
|
+
<Text dimColor> → </Text>
|
|
56
|
+
<Text>{selectedCell.action.command}</Text>
|
|
57
|
+
</Box>
|
|
58
|
+
)}
|
|
59
|
+
{selectedCell.type === "composeService" && (
|
|
60
|
+
<Text>Service: {selectedCell.service.name}</Text>
|
|
61
|
+
)}
|
|
62
|
+
</Box>
|
|
63
|
+
</Box>
|
|
64
|
+
)}
|
|
65
|
+
</Box>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useComponentTheme } from "@inkjs/ui"
|
|
2
|
+
import { Box, Text } from "ink"
|
|
3
|
+
import { useContext } from "react"
|
|
4
|
+
|
|
5
|
+
import { WorkspaceGridContext } from "../../../contexts/WorkspaceGridContext.js"
|
|
6
|
+
import type { GridTheme } from "../../../theme/theme.js"
|
|
7
|
+
import { getQuickActionColumnMaxSizes } from "../../../utils/navigation/navigation-helper.js"
|
|
8
|
+
import { getWorkspaceQuickActionCells } from "../../../utils/workspace/workspace-grid.js"
|
|
9
|
+
import { WorkspaceRow } from "./WorkspaceRow.js"
|
|
10
|
+
|
|
11
|
+
export function WorkspaceGrid() {
|
|
12
|
+
const { workspacesNavigationGrid } = useContext(WorkspaceGridContext)
|
|
13
|
+
const { styles } = useComponentTheme<GridTheme>("GridTheme")
|
|
14
|
+
const quickActionColSizes = getQuickActionColumnMaxSizes(
|
|
15
|
+
workspacesNavigationGrid.map((row) =>
|
|
16
|
+
getWorkspaceQuickActionCells(row.cells),
|
|
17
|
+
),
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Box flexDirection="column" width="100%">
|
|
22
|
+
<Box width="100%" borderColor="gray">
|
|
23
|
+
<Box width="3%">
|
|
24
|
+
<Text {...styles.headerText()}>#</Text>
|
|
25
|
+
</Box>
|
|
26
|
+
<Box width="17%">
|
|
27
|
+
<Text {...styles.headerText()}>Name</Text>
|
|
28
|
+
</Box>
|
|
29
|
+
<Box width="10%">
|
|
30
|
+
<Text {...styles.headerText()}>Type</Text>
|
|
31
|
+
</Box>
|
|
32
|
+
<Box width="20%">
|
|
33
|
+
<Text {...styles.headerText()}>Path</Text>
|
|
34
|
+
</Box>
|
|
35
|
+
<Box width="20%">
|
|
36
|
+
<Text {...styles.headerText()}>Quick Actions</Text>
|
|
37
|
+
</Box>
|
|
38
|
+
<Box width="30%">
|
|
39
|
+
<Text {...styles.headerText()}>State</Text>
|
|
40
|
+
</Box>
|
|
41
|
+
</Box>
|
|
42
|
+
{workspacesNavigationGrid.map((row, rowNb) => (
|
|
43
|
+
<WorkspaceRow
|
|
44
|
+
key={row.id}
|
|
45
|
+
cells={row.cells}
|
|
46
|
+
rowNb={rowNb}
|
|
47
|
+
quickActionColSizes={quickActionColSizes}
|
|
48
|
+
/>
|
|
49
|
+
))}
|
|
50
|
+
</Box>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { useComponentTheme } from "@inkjs/ui"
|
|
2
|
+
import { Box, Text } from "ink"
|
|
3
|
+
import { useContext } from "react"
|
|
4
|
+
|
|
5
|
+
import { WorkspaceGridContext } from "../../../contexts/WorkspaceGridContext.js"
|
|
6
|
+
import type { GridTheme } from "../../../theme/theme.js"
|
|
7
|
+
import { getWorkspaceCellByPosition } from "../../../utils/workspace/workspace-grid.js"
|
|
8
|
+
|
|
9
|
+
export function WorkspaceInfo() {
|
|
10
|
+
const { workspacesNavigationGrid, row, col } =
|
|
11
|
+
useContext(WorkspaceGridContext)
|
|
12
|
+
const { styles } = useComponentTheme<GridTheme>("GridTheme")
|
|
13
|
+
|
|
14
|
+
const selectedCell = getWorkspaceCellByPosition(
|
|
15
|
+
workspacesNavigationGrid,
|
|
16
|
+
row,
|
|
17
|
+
col,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Box
|
|
22
|
+
flexDirection="column"
|
|
23
|
+
width="100%"
|
|
24
|
+
borderStyle="single"
|
|
25
|
+
borderTop={true}
|
|
26
|
+
borderBottom={false}
|
|
27
|
+
borderLeft={false}
|
|
28
|
+
borderRight={false}
|
|
29
|
+
{...styles.border()}
|
|
30
|
+
>
|
|
31
|
+
{selectedCell && selectedCell.type === "workspace" && (
|
|
32
|
+
<Box flexDirection="column">
|
|
33
|
+
<Text {...styles.info()}>{selectedCell.workspace.path}</Text>
|
|
34
|
+
<Box gap={2}>
|
|
35
|
+
{Array.isArray(
|
|
36
|
+
selectedCell.workspace.facets.makefile?.commands,
|
|
37
|
+
) && (
|
|
38
|
+
<Text {...styles.text()} dimColor>
|
|
39
|
+
makefile commands:
|
|
40
|
+
{selectedCell.workspace.facets.makefile.commands.length}
|
|
41
|
+
</Text>
|
|
42
|
+
)}
|
|
43
|
+
{Array.isArray(
|
|
44
|
+
selectedCell.workspace.facets.packageJson?.scripts,
|
|
45
|
+
) && (
|
|
46
|
+
<Text {...styles.text()} dimColor>
|
|
47
|
+
package.json scripts:
|
|
48
|
+
{selectedCell.workspace.facets.packageJson.scripts.length}
|
|
49
|
+
</Text>
|
|
50
|
+
)}
|
|
51
|
+
{Array.isArray(selectedCell.workspace.facets.compose?.services) && (
|
|
52
|
+
<Text {...styles.text()} dimColor>
|
|
53
|
+
docker compose services:
|
|
54
|
+
{selectedCell.workspace.facets.compose.services.length}
|
|
55
|
+
</Text>
|
|
56
|
+
)}
|
|
57
|
+
</Box>
|
|
58
|
+
</Box>
|
|
59
|
+
)}
|
|
60
|
+
{selectedCell && selectedCell.type === "quickAction" && (
|
|
61
|
+
<Box flexDirection="column">
|
|
62
|
+
<Box>
|
|
63
|
+
<Text {...styles.info()}>{selectedCell.action.facetPath}</Text>
|
|
64
|
+
</Box>
|
|
65
|
+
<Box gap={1}>
|
|
66
|
+
<Text {...styles.action()}>{selectedCell.action.name}</Text>
|
|
67
|
+
<Text dimColor> → </Text>
|
|
68
|
+
<Text {...styles.text()} dimColor>
|
|
69
|
+
{selectedCell.action.command}
|
|
70
|
+
</Text>
|
|
71
|
+
</Box>
|
|
72
|
+
</Box>
|
|
73
|
+
)}
|
|
74
|
+
{selectedCell && selectedCell.type === "runtime" && (
|
|
75
|
+
<Box flexDirection="column">
|
|
76
|
+
<Box gap={1}>
|
|
77
|
+
<Text {...styles.info()}>{selectedCell.runState.name}</Text>
|
|
78
|
+
{selectedCell.runState.statusMessage && (
|
|
79
|
+
<Text {...styles.error()}>
|
|
80
|
+
{selectedCell.runState.statusMessage}
|
|
81
|
+
</Text>
|
|
82
|
+
)}
|
|
83
|
+
</Box>
|
|
84
|
+
<Text {...styles.action()}>{selectedCell.runState.command}</Text>
|
|
85
|
+
</Box>
|
|
86
|
+
)}
|
|
87
|
+
</Box>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { useComponentTheme } from "@inkjs/ui"
|
|
2
|
+
import { Box, Text } from "ink"
|
|
3
|
+
import { useContext } from "react"
|
|
4
|
+
|
|
5
|
+
import { WorkspaceGridContext } from "../../../contexts/WorkspaceGridContext.js"
|
|
6
|
+
import type { GridTheme } from "../../../theme/theme.js"
|
|
7
|
+
import type { WorkspacesNavigationCell } from "../../../types/workspace-grid.js"
|
|
8
|
+
import {
|
|
9
|
+
getWorkspaceCell,
|
|
10
|
+
getWorkspaceQuickActionCells,
|
|
11
|
+
getWorkspaceRuntimeCells,
|
|
12
|
+
} from "../../../utils/workspace/workspace-grid.js"
|
|
13
|
+
|
|
14
|
+
interface WorkspaceRowProps {
|
|
15
|
+
cells: (WorkspacesNavigationCell | null)[]
|
|
16
|
+
rowNb: number
|
|
17
|
+
quickActionColSizes: number[]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function WorkspaceRow({
|
|
21
|
+
cells,
|
|
22
|
+
rowNb,
|
|
23
|
+
quickActionColSizes,
|
|
24
|
+
}: WorkspaceRowProps) {
|
|
25
|
+
const { row, col } = useContext(WorkspaceGridContext)
|
|
26
|
+
const { styles } = useComponentTheme<GridTheme>("GridTheme")
|
|
27
|
+
|
|
28
|
+
const workspaceCell = getWorkspaceCell(cells)
|
|
29
|
+
const quickActionCells = getWorkspaceQuickActionCells(cells)
|
|
30
|
+
const runtimeCells = getWorkspaceRuntimeCells(cells)
|
|
31
|
+
|
|
32
|
+
const packageJsonFacet = workspaceCell?.workspace.facets.packageJson
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Box
|
|
36
|
+
width="100%"
|
|
37
|
+
borderColor={"gray"}
|
|
38
|
+
backgroundColor={row === rowNb ? "#0b1515" : undefined}
|
|
39
|
+
>
|
|
40
|
+
<Box width="3%">
|
|
41
|
+
<Text {...styles.text()}>{rowNb + 1}</Text>
|
|
42
|
+
</Box>
|
|
43
|
+
<Box width="17%">
|
|
44
|
+
<Text
|
|
45
|
+
{...styles.action()}
|
|
46
|
+
inverse={row === workspaceCell?.row && col === workspaceCell?.col}
|
|
47
|
+
>
|
|
48
|
+
{workspaceCell?.workspace.folder}
|
|
49
|
+
</Text>
|
|
50
|
+
{packageJsonFacet?.framework && (
|
|
51
|
+
<Text {...styles.text()} dimColor>
|
|
52
|
+
{" "}
|
|
53
|
+
({packageJsonFacet?.framework})
|
|
54
|
+
</Text>
|
|
55
|
+
)}
|
|
56
|
+
</Box>
|
|
57
|
+
<Box width="10%">
|
|
58
|
+
<Text {...styles.text()} dimColor>
|
|
59
|
+
{workspaceCell?.workspace.type}
|
|
60
|
+
</Text>
|
|
61
|
+
</Box>
|
|
62
|
+
<Box width="20%">
|
|
63
|
+
<Text {...styles.text()} dimColor>
|
|
64
|
+
{workspaceCell?.workspace.path}
|
|
65
|
+
</Text>
|
|
66
|
+
</Box>
|
|
67
|
+
<Box width="20%" gap={2}>
|
|
68
|
+
{quickActionCells.map((actionCell, index) => (
|
|
69
|
+
<Box
|
|
70
|
+
key={`qa-${actionCell.col}-${actionCell.row}`}
|
|
71
|
+
flexDirection="row"
|
|
72
|
+
width={quickActionColSizes[index] ?? actionCell.action.name.length}
|
|
73
|
+
>
|
|
74
|
+
<Box>
|
|
75
|
+
<Text
|
|
76
|
+
{...styles.action()}
|
|
77
|
+
inverse={row === actionCell?.row && col === actionCell?.col}
|
|
78
|
+
>
|
|
79
|
+
{actionCell.action.name}
|
|
80
|
+
</Text>
|
|
81
|
+
</Box>
|
|
82
|
+
</Box>
|
|
83
|
+
))}
|
|
84
|
+
</Box>
|
|
85
|
+
|
|
86
|
+
<Box width="30%" gap={1}>
|
|
87
|
+
{runtimeCells.map((runtimeCell, index) => (
|
|
88
|
+
<Box
|
|
89
|
+
key={`rt-${runtimeCell.col}-${runtimeCell.row}`}
|
|
90
|
+
flexDirection="row"
|
|
91
|
+
>
|
|
92
|
+
<Box>
|
|
93
|
+
<Text
|
|
94
|
+
{...styles.runtime({ status: runtimeCell.runState.status })}
|
|
95
|
+
inverse={row === runtimeCell?.row && col === runtimeCell?.col}
|
|
96
|
+
>
|
|
97
|
+
{runtimeCell.runState.name}
|
|
98
|
+
{Number.isInteger(runtimeCell.runState.port) &&
|
|
99
|
+
runtimeCell.runState.port !== 0 &&
|
|
100
|
+
`:${runtimeCell.runState.port}`}
|
|
101
|
+
</Text>
|
|
102
|
+
</Box>
|
|
103
|
+
{index < runtimeCells.length - 1 && (
|
|
104
|
+
<Box width={1} justifyContent="center" alignItems="center">
|
|
105
|
+
<Text {...styles.text()} dimColor>
|
|
106
|
+
{" "}
|
|
107
|
+
</Text>
|
|
108
|
+
</Box>
|
|
109
|
+
)}
|
|
110
|
+
</Box>
|
|
111
|
+
))}
|
|
112
|
+
</Box>
|
|
113
|
+
</Box>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useComponentTheme } from "@inkjs/ui"
|
|
2
|
+
import { Box, Text } from "ink"
|
|
3
|
+
import { useContext, useEffect, useState } from "react"
|
|
4
|
+
|
|
5
|
+
import { WorkspaceDiscoveryContext } from "../../../contexts/WorkspaceDiscoveryContext.js"
|
|
6
|
+
import type { GridTheme } from "../../../theme/theme.js"
|
|
7
|
+
import { getPackageVersion } from "../../../utils/fs/package-json.js"
|
|
8
|
+
import { getRootWorkspace } from "../../../utils/workspace/workspace-helper.js"
|
|
9
|
+
import { ProjectCommands } from "./ProjectCommands.js"
|
|
10
|
+
import { WorkspaceCommands } from "./WorkspaceCommands.js"
|
|
11
|
+
|
|
12
|
+
export function Header() {
|
|
13
|
+
const { projects, project } = useContext(WorkspaceDiscoveryContext)
|
|
14
|
+
const rootWorkspace = getRootWorkspace(projects)
|
|
15
|
+
const [version, setVersion] = useState<string>("")
|
|
16
|
+
const { styles } = useComponentTheme<GridTheme>("GridTheme")
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
getPackageVersion().then(setVersion)
|
|
20
|
+
}, [])
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Box
|
|
24
|
+
width="100%"
|
|
25
|
+
paddingX={1}
|
|
26
|
+
justifyContent="space-between"
|
|
27
|
+
borderStyle="single"
|
|
28
|
+
borderTop={false}
|
|
29
|
+
borderBottom={true}
|
|
30
|
+
borderLeft={false}
|
|
31
|
+
borderRight={false}
|
|
32
|
+
{...styles.border()}
|
|
33
|
+
>
|
|
34
|
+
<Text {...styles.title()}>
|
|
35
|
+
{rootWorkspace?.folder}
|
|
36
|
+
{project && project.folder !== rootWorkspace?.folder
|
|
37
|
+
? ` - ${project.folder}`
|
|
38
|
+
: ""}
|
|
39
|
+
</Text>
|
|
40
|
+
|
|
41
|
+
<Box paddingX={1}>
|
|
42
|
+
{project ? <ProjectCommands /> : <WorkspaceCommands />}
|
|
43
|
+
</Box>
|
|
44
|
+
<Box paddingX={1}>
|
|
45
|
+
<Text {...styles.title()} inverse>
|
|
46
|
+
{` MonoTUI v${version} `}
|
|
47
|
+
</Text>
|
|
48
|
+
</Box>
|
|
49
|
+
</Box>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useComponentTheme } from "@inkjs/ui"
|
|
2
|
+
import { Box, Text } from "ink"
|
|
3
|
+
|
|
4
|
+
import type { GridTheme } from "../../../theme/theme.js"
|
|
5
|
+
|
|
6
|
+
export function ProjectCommands() {
|
|
7
|
+
const { styles } = useComponentTheme<GridTheme>("GridTheme")
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<Box gap={1}>
|
|
11
|
+
<Text {...styles.action()}><enter></Text>
|
|
12
|
+
<Text {...styles.text()}>Execute</Text>
|
|
13
|
+
<Text {...styles.action()}><esc></Text>
|
|
14
|
+
<Text {...styles.text()}>Quit</Text>
|
|
15
|
+
</Box>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { useComponentTheme } from "@inkjs/ui"
|
|
2
|
+
import { Box, Text } from "ink"
|
|
3
|
+
import { useContext } from "react"
|
|
4
|
+
|
|
5
|
+
import { WorkspaceGridContext } from "../../../contexts/WorkspaceGridContext.js"
|
|
6
|
+
import type { GridTheme } from "../../../theme/theme.js"
|
|
7
|
+
import { getWorkspaceCellByPosition } from "../../../utils/workspace/workspace-grid.js"
|
|
8
|
+
|
|
9
|
+
export function WorkspaceCommands() {
|
|
10
|
+
const { workspacesNavigationGrid, row, col } =
|
|
11
|
+
useContext(WorkspaceGridContext)
|
|
12
|
+
const { styles } = useComponentTheme<GridTheme>("GridTheme")
|
|
13
|
+
|
|
14
|
+
const selectedCell = getWorkspaceCellByPosition(
|
|
15
|
+
workspacesNavigationGrid,
|
|
16
|
+
row,
|
|
17
|
+
col,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
{selectedCell && selectedCell.type === "workspace" && (
|
|
23
|
+
<Box gap={2}>
|
|
24
|
+
<Box gap={1}>
|
|
25
|
+
<Text {...styles.action()}><enter></Text>
|
|
26
|
+
<Text {...styles.text()}>Select</Text>
|
|
27
|
+
</Box>
|
|
28
|
+
<Box gap={1}>
|
|
29
|
+
<Text {...styles.action()}><esc></Text>
|
|
30
|
+
<Text {...styles.text()}>Quit</Text>
|
|
31
|
+
</Box>
|
|
32
|
+
</Box>
|
|
33
|
+
)}
|
|
34
|
+
{selectedCell && selectedCell.type === "quickAction" && (
|
|
35
|
+
<Box gap={2}>
|
|
36
|
+
<Box gap={1}>
|
|
37
|
+
<Text {...styles.action()}><enter></Text>
|
|
38
|
+
<Text {...styles.text()}>Execute</Text>
|
|
39
|
+
</Box>
|
|
40
|
+
<Box gap={1}>
|
|
41
|
+
<Text {...styles.action()}><esc></Text>
|
|
42
|
+
<Text {...styles.text()}>Quit</Text>
|
|
43
|
+
</Box>
|
|
44
|
+
</Box>
|
|
45
|
+
)}
|
|
46
|
+
{selectedCell && selectedCell.type === "runtime" && (
|
|
47
|
+
<Box gap={2}>
|
|
48
|
+
<Box gap={1}>
|
|
49
|
+
<Text {...styles.action()}><s></Text>
|
|
50
|
+
<Text {...styles.text()}>stop</Text>
|
|
51
|
+
</Box>
|
|
52
|
+
<Box gap={1}>
|
|
53
|
+
<Text {...styles.action()}><esc></Text>
|
|
54
|
+
<Text {...styles.text()}>Quit</Text>
|
|
55
|
+
</Box>
|
|
56
|
+
</Box>
|
|
57
|
+
)}
|
|
58
|
+
</>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { join } from "node:path"
|
|
2
|
+
|
|
3
|
+
import type { Config } from "../types/config.js"
|
|
4
|
+
import { DEFAULT_CONFIG } from "./defaults.js"
|
|
5
|
+
|
|
6
|
+
let cachedConfig: Config | null = null
|
|
7
|
+
|
|
8
|
+
export async function loadConfig(rootDir: string): Promise<Config> {
|
|
9
|
+
try {
|
|
10
|
+
const configPath = join(rootDir, "workspace-cli.mjs")
|
|
11
|
+
const configModule = await import(configPath)
|
|
12
|
+
const userConfig = configModule.default as Config
|
|
13
|
+
|
|
14
|
+
cachedConfig = {
|
|
15
|
+
...DEFAULT_CONFIG,
|
|
16
|
+
...userConfig,
|
|
17
|
+
discovery: {
|
|
18
|
+
...DEFAULT_CONFIG.discovery,
|
|
19
|
+
...userConfig.discovery,
|
|
20
|
+
},
|
|
21
|
+
execution: {
|
|
22
|
+
...DEFAULT_CONFIG.execution,
|
|
23
|
+
...userConfig.execution,
|
|
24
|
+
},
|
|
25
|
+
theme: DEFAULT_CONFIG.theme,
|
|
26
|
+
}
|
|
27
|
+
} catch {
|
|
28
|
+
// Config file doesn't exist, use defaults
|
|
29
|
+
cachedConfig = DEFAULT_CONFIG
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return cachedConfig
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get the already-loaded config.
|
|
37
|
+
* Throws if called before loadConfig().
|
|
38
|
+
*/
|
|
39
|
+
export function getConfig(): Config {
|
|
40
|
+
if (!cachedConfig) {
|
|
41
|
+
throw new Error(
|
|
42
|
+
"Config not loaded yet. Call loadConfig() first at startup.",
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
return cachedConfig
|
|
46
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Config } from "../types/config.js"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Default configuration for workspace-cli
|
|
5
|
+
* This is the single source of truth for default values
|
|
6
|
+
* Used by:
|
|
7
|
+
* - loadConfig() as fallback when no user config exists
|
|
8
|
+
* - init command to generate config.json
|
|
9
|
+
*/
|
|
10
|
+
export const DEFAULT_CONFIG: Config = {
|
|
11
|
+
discovery: {
|
|
12
|
+
maxDepth: 4,
|
|
13
|
+
ignore: ["node_modules", ".git", "dist", "build"],
|
|
14
|
+
folders: {
|
|
15
|
+
app: ["apps"],
|
|
16
|
+
package: ["packages"],
|
|
17
|
+
infra: ["infra"],
|
|
18
|
+
contract: ["contracts"],
|
|
19
|
+
},
|
|
20
|
+
scripts: {
|
|
21
|
+
exclude: [],
|
|
22
|
+
},
|
|
23
|
+
env: {
|
|
24
|
+
files: [".env.local", ".env.development", ".env", ".env.example"],
|
|
25
|
+
portKeys: ["PORT", "APP_PORT", "VITE_PORT", "NEXT_PUBLIC_PORT"],
|
|
26
|
+
},
|
|
27
|
+
order: ["workspace", "app", "contract", "infra", "package"],
|
|
28
|
+
makefile: {
|
|
29
|
+
showDefault: false,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
execution: {
|
|
33
|
+
useTmux: true,
|
|
34
|
+
},
|
|
35
|
+
quickActions: [],
|
|
36
|
+
logging: {
|
|
37
|
+
level: "info",
|
|
38
|
+
file: false,
|
|
39
|
+
logDir: "./logs",
|
|
40
|
+
prettyPrint: true,
|
|
41
|
+
truncateOnStart: true,
|
|
42
|
+
},
|
|
43
|
+
theme: "dark",
|
|
44
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createContext, type JSX, type ReactNode, useState } from "react"
|
|
2
|
+
|
|
3
|
+
import { Page } from "../types/page.js"
|
|
4
|
+
import type { CursorPosition } from "../types/workspace-grid"
|
|
5
|
+
|
|
6
|
+
interface PageNavigationContextType {
|
|
7
|
+
currentPage: Page
|
|
8
|
+
workspacesGridPosition: CursorPosition
|
|
9
|
+
setPage: (page: Page) => void
|
|
10
|
+
setWorkspacesGridPosition: (position: CursorPosition) => void
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const PageNavigationContext = createContext<PageNavigationContextType>(
|
|
14
|
+
{} as PageNavigationContextType,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
const Provider = PageNavigationContext as unknown as (props: {
|
|
18
|
+
value: PageNavigationContextType
|
|
19
|
+
children: ReactNode
|
|
20
|
+
}) => JSX.Element
|
|
21
|
+
|
|
22
|
+
export function PageNavigationProvider({ children }: { children: ReactNode }) {
|
|
23
|
+
const [currentPage, setPage] = useState<Page>(Page.Workspace)
|
|
24
|
+
const [workspacesGridPosition, setWorkspacesGridPosition] =
|
|
25
|
+
useState<CursorPosition>({ row: 0, col: 0 })
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Provider
|
|
29
|
+
value={{
|
|
30
|
+
currentPage,
|
|
31
|
+
workspacesGridPosition,
|
|
32
|
+
setPage,
|
|
33
|
+
setWorkspacesGridPosition,
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
{children}
|
|
37
|
+
</Provider>
|
|
38
|
+
)
|
|
39
|
+
}
|