@factorim/monotui 0.1.0 → 0.3.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.
Files changed (467) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +14 -0
  3. package/.github/workflows/ci.yml +5 -2
  4. package/.github/workflows/release.yml +77 -0
  5. package/.vscode/settings.json +1 -0
  6. package/CHANGELOG.md +9 -0
  7. package/README.md +2 -0
  8. package/dist/app/pages/WorkspacePage.d.ts.map +1 -1
  9. package/dist/app/pages/WorkspacePage.js +3 -3
  10. package/dist/app/pages/WorkspacePage.js.map +1 -1
  11. package/dist/commands/init.d.ts +1 -1
  12. package/dist/commands/init.d.ts.map +1 -1
  13. package/dist/commands/init.js +33 -4
  14. package/dist/commands/init.js.map +1 -1
  15. package/dist/components/features/ProjectGrid/ColPackageJson.d.ts +2 -2
  16. package/dist/components/features/ProjectGrid/ColPackageJson.d.ts.map +1 -1
  17. package/dist/components/features/ProjectGrid/ColPackageJson.js.map +1 -1
  18. package/dist/components/features/WorkspaceGrid/WorkspaceGrid.js +1 -1
  19. package/dist/components/features/WorkspaceGrid/WorkspaceInfo.d.ts.map +1 -1
  20. package/dist/components/features/WorkspaceGrid/WorkspaceInfo.js +1 -1
  21. package/dist/components/features/WorkspaceGrid/WorkspaceInfo.js.map +1 -1
  22. package/dist/components/features/WorkspaceGrid/WorkspaceRow.js +2 -2
  23. package/dist/components/features/WorkspaceGrid/WorkspaceRow.js.map +1 -1
  24. package/dist/components/layouts/Header/Header.d.ts.map +1 -1
  25. package/dist/components/layouts/Header/Header.js +3 -7
  26. package/dist/components/layouts/Header/Header.js.map +1 -1
  27. package/dist/config/config.d.ts.map +1 -1
  28. package/dist/config/config.js +21 -21
  29. package/dist/config/config.js.map +1 -1
  30. package/dist/config/defaults.d.ts +2 -2
  31. package/dist/config/defaults.js +2 -2
  32. package/dist/config/validation.d.ts +54 -0
  33. package/dist/config/validation.d.ts.map +1 -0
  34. package/dist/config/validation.js +79 -0
  35. package/dist/config/validation.js.map +1 -0
  36. package/dist/contexts/ProjectGridContext.d.ts +1 -1
  37. package/dist/contexts/ProjectGridContext.d.ts.map +1 -1
  38. package/dist/contexts/WorkspaceDiscoveryContext.d.ts +2 -2
  39. package/dist/contexts/WorkspaceDiscoveryContext.d.ts.map +1 -1
  40. package/dist/contexts/WorkspaceDiscoveryContext.js +3 -3
  41. package/dist/contexts/WorkspaceDiscoveryContext.js.map +1 -1
  42. package/dist/contexts/WorkspaceGridContext.d.ts +1 -1
  43. package/dist/contexts/WorkspaceGridContext.d.ts.map +1 -1
  44. package/dist/contexts/WorkspaceGridContext.js +1 -1
  45. package/dist/contexts/WorkspaceGridContext.js.map +1 -1
  46. package/dist/hooks/useInterval.d.ts +5 -0
  47. package/dist/hooks/useInterval.d.ts.map +1 -0
  48. package/dist/hooks/useInterval.js +19 -0
  49. package/dist/hooks/useInterval.js.map +1 -0
  50. package/dist/hooks/useWorkspaceDiscovery.d.ts +3 -3
  51. package/dist/hooks/useWorkspaceDiscovery.d.ts.map +1 -1
  52. package/dist/hooks/useWorkspaceDiscovery.js +8 -13
  53. package/dist/hooks/useWorkspaceDiscovery.js.map +1 -1
  54. package/dist/hooks/useWorkspaceQuickActions.d.ts +1 -1
  55. package/dist/hooks/useWorkspaceQuickActions.d.ts.map +1 -1
  56. package/dist/hooks/useWorkspaceRuntime.d.ts +1 -1
  57. package/dist/hooks/useWorkspaceRuntime.d.ts.map +1 -1
  58. package/dist/hooks/useWorkspaceRuntime.js +30 -8
  59. package/dist/hooks/useWorkspaceRuntime.js.map +1 -1
  60. package/dist/services/discovery/facets/compose-parser.d.ts +1 -1
  61. package/dist/services/discovery/facets/compose-parser.d.ts.map +1 -1
  62. package/dist/services/discovery/facets/makefile-parser.d.ts +1 -1
  63. package/dist/services/discovery/facets/makefile-parser.d.ts.map +1 -1
  64. package/dist/services/discovery/facets/package-json-parser.d.ts +1 -1
  65. package/dist/services/discovery/facets/package-json-parser.d.ts.map +1 -1
  66. package/dist/services/discovery/workspace-discovery.d.ts +3 -3
  67. package/dist/services/discovery/workspace-discovery.d.ts.map +1 -1
  68. package/dist/services/discovery/workspace-discovery.js +17 -7
  69. package/dist/services/discovery/workspace-discovery.js.map +1 -1
  70. package/dist/services/runtime/docker-runtime.d.ts +1 -1
  71. package/dist/services/runtime/docker-runtime.d.ts.map +1 -1
  72. package/dist/services/runtime/node-runtime.d.ts +2 -2
  73. package/dist/services/runtime/node-runtime.d.ts.map +1 -1
  74. package/dist/theme/theme.js +1 -1
  75. package/dist/theme/theme.js.map +1 -1
  76. package/dist/types/project-grid.d.ts +1 -1
  77. package/dist/types/project-grid.d.ts.map +1 -1
  78. package/dist/types/workspace-grid.d.ts +2 -2
  79. package/dist/types/workspace-grid.d.ts.map +1 -1
  80. package/dist/types/workspace.d.ts +9 -2
  81. package/dist/types/workspace.d.ts.map +1 -1
  82. package/dist/utils/logging/logger.js +2 -2
  83. package/dist/utils/logging/logger.js.map +1 -1
  84. package/dist/utils/project/project-grid.d.ts +1 -1
  85. package/dist/utils/project/project-grid.d.ts.map +1 -1
  86. package/dist/utils/project/project-grid.js.map +1 -1
  87. package/dist/utils/workspace/workspace-grid.d.ts +1 -1
  88. package/dist/utils/workspace/workspace-grid.d.ts.map +1 -1
  89. package/dist/utils/workspace/workspace-grid.js +5 -18
  90. package/dist/utils/workspace/workspace-grid.js.map +1 -1
  91. package/dist/utils/workspace/workspace-helper.d.ts +1 -1
  92. package/dist/utils/workspace/workspace-helper.d.ts.map +1 -1
  93. package/docs/images/monotui-screenshot-v0.2.0.png +0 -0
  94. package/package.json +11 -4
  95. package/src/app/pages/WorkspacePage.tsx +5 -3
  96. package/src/commands/init.ts +34 -4
  97. package/src/components/features/ProjectGrid/ColPackageJson.tsx +3 -2
  98. package/src/components/features/WorkspaceGrid/WorkspaceGrid.tsx +2 -2
  99. package/src/components/features/WorkspaceGrid/WorkspaceInfo.tsx +7 -9
  100. package/src/components/features/WorkspaceGrid/WorkspaceRow.tsx +6 -6
  101. package/src/components/layouts/Header/Header.tsx +2 -9
  102. package/src/config/config.ts +24 -21
  103. package/src/config/defaults.ts +2 -2
  104. package/src/config/validation.ts +90 -0
  105. package/src/contexts/ProjectGridContext.tsx +1 -1
  106. package/src/contexts/WorkspaceDiscoveryContext.tsx +5 -5
  107. package/src/contexts/WorkspaceGridContext.tsx +2 -2
  108. package/src/hooks/useWorkspaceDiscovery.ts +16 -17
  109. package/src/hooks/useWorkspaceQuickActions.ts +1 -1
  110. package/src/hooks/useWorkspaceRuntime.ts +52 -12
  111. package/src/services/discovery/facets/compose-parser.ts +1 -1
  112. package/src/services/discovery/facets/makefile-parser.ts +2 -2
  113. package/src/services/discovery/facets/package-json-parser.ts +1 -1
  114. package/src/services/discovery/workspace-discovery.ts +21 -11
  115. package/src/services/runtime/docker-runtime.ts +1 -1
  116. package/src/services/runtime/node-runtime.ts +2 -2
  117. package/src/theme/theme.ts +1 -1
  118. package/src/types/project-grid.ts +1 -1
  119. package/src/types/workspace-grid.ts +2 -2
  120. package/src/types/{project.ts → workspace.ts} +9 -2
  121. package/src/utils/logging/logger.ts +2 -2
  122. package/src/utils/project/project-grid.test.ts +175 -0
  123. package/src/utils/project/project-grid.ts +1 -2
  124. package/src/utils/workspace/workspace-grid.ts +6 -20
  125. package/src/utils/workspace/workspace-helper.ts +1 -1
  126. package/.github/workflows/publish-to-npm.yml +0 -36
  127. package/dist/app/pages/About.d.ts +0 -2
  128. package/dist/app/pages/About.d.ts.map +0 -1
  129. package/dist/app/pages/About.js +0 -6
  130. package/dist/app/pages/About.js.map +0 -1
  131. package/dist/app/pages/AboutPage.d.ts +0 -2
  132. package/dist/app/pages/AboutPage.d.ts.map +0 -1
  133. package/dist/app/pages/AboutPage.js +0 -6
  134. package/dist/app/pages/AboutPage.js.map +0 -1
  135. package/dist/app/pages/Workspace.d.ts +0 -2
  136. package/dist/app/pages/Workspace.d.ts.map +0 -1
  137. package/dist/app/pages/Workspace.js +0 -14
  138. package/dist/app/pages/Workspace.js.map +0 -1
  139. package/dist/app/pages/Workspaces.d.ts +0 -2
  140. package/dist/app/pages/Workspaces.d.ts.map +0 -1
  141. package/dist/app/pages/Workspaces.js +0 -16
  142. package/dist/app/pages/Workspaces.js.map +0 -1
  143. package/dist/app/pages/WorkspacesPage.d.ts +0 -2
  144. package/dist/app/pages/WorkspacesPage.d.ts.map +0 -1
  145. package/dist/app/pages/WorkspacesPage.js +0 -15
  146. package/dist/app/pages/WorkspacesPage.js.map +0 -1
  147. package/dist/components/features/ProjectGrid/ProjectCommands.d.ts +0 -2
  148. package/dist/components/features/ProjectGrid/ProjectCommands.d.ts.map +0 -1
  149. package/dist/components/features/ProjectGrid/ProjectCommands.js +0 -6
  150. package/dist/components/features/ProjectGrid/ProjectCommands.js.map +0 -1
  151. package/dist/components/features/ProjectGrid/WorkspaceCommands.d.ts +0 -2
  152. package/dist/components/features/ProjectGrid/WorkspaceCommands.d.ts.map +0 -1
  153. package/dist/components/features/ProjectGrid/WorkspaceCommands.js +0 -6
  154. package/dist/components/features/ProjectGrid/WorkspaceCommands.js.map +0 -1
  155. package/dist/components/features/ProjectGrid/WorkspaceDetail.d.ts +0 -2
  156. package/dist/components/features/ProjectGrid/WorkspaceDetail.d.ts.map +0 -1
  157. package/dist/components/features/ProjectGrid/WorkspaceDetail.js +0 -16
  158. package/dist/components/features/ProjectGrid/WorkspaceDetail.js.map +0 -1
  159. package/dist/components/features/ProjectGrid/WorkspaceInfo.d.ts +0 -2
  160. package/dist/components/features/ProjectGrid/WorkspaceInfo.d.ts.map +0 -1
  161. package/dist/components/features/ProjectGrid/WorkspaceInfo.js +0 -11
  162. package/dist/components/features/ProjectGrid/WorkspaceInfo.js.map +0 -1
  163. package/dist/components/features/WorkspaceDetail/ColCompose.d.ts +0 -10
  164. package/dist/components/features/WorkspaceDetail/ColCompose.d.ts.map +0 -1
  165. package/dist/components/features/WorkspaceDetail/ColCompose.js +0 -6
  166. package/dist/components/features/WorkspaceDetail/ColCompose.js.map +0 -1
  167. package/dist/components/features/WorkspaceDetail/ColMakefile.d.ts +0 -9
  168. package/dist/components/features/WorkspaceDetail/ColMakefile.d.ts.map +0 -1
  169. package/dist/components/features/WorkspaceDetail/ColMakefile.js +0 -6
  170. package/dist/components/features/WorkspaceDetail/ColMakefile.js.map +0 -1
  171. package/dist/components/features/WorkspaceDetail/ColPackageJson.d.ts +0 -11
  172. package/dist/components/features/WorkspaceDetail/ColPackageJson.d.ts.map +0 -1
  173. package/dist/components/features/WorkspaceDetail/ColPackageJson.js +0 -6
  174. package/dist/components/features/WorkspaceDetail/ColPackageJson.js.map +0 -1
  175. package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.d.ts +0 -1
  176. package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.d.ts.map +0 -1
  177. package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.js +0 -2
  178. package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.js.map +0 -1
  179. package/dist/components/features/WorkspaceDetail/ComposeCol copy.d.ts +0 -1
  180. package/dist/components/features/WorkspaceDetail/ComposeCol copy.d.ts.map +0 -1
  181. package/dist/components/features/WorkspaceDetail/ComposeCol copy.js +0 -2
  182. package/dist/components/features/WorkspaceDetail/ComposeCol copy.js.map +0 -1
  183. package/dist/components/features/WorkspaceDetail/ComposeCol.d.ts +0 -1
  184. package/dist/components/features/WorkspaceDetail/ComposeCol.d.ts.map +0 -1
  185. package/dist/components/features/WorkspaceDetail/ComposeCol.js +0 -2
  186. package/dist/components/features/WorkspaceDetail/ComposeCol.js.map +0 -1
  187. package/dist/components/features/WorkspaceDetail/EmptyCol.d.ts +0 -2
  188. package/dist/components/features/WorkspaceDetail/EmptyCol.d.ts.map +0 -1
  189. package/dist/components/features/WorkspaceDetail/EmptyCol.js +0 -6
  190. package/dist/components/features/WorkspaceDetail/EmptyCol.js.map +0 -1
  191. package/dist/components/features/WorkspaceDetail/EmptyRow.d.ts +0 -2
  192. package/dist/components/features/WorkspaceDetail/EmptyRow.d.ts.map +0 -1
  193. package/dist/components/features/WorkspaceDetail/EmptyRow.js +0 -6
  194. package/dist/components/features/WorkspaceDetail/EmptyRow.js.map +0 -1
  195. package/dist/components/features/WorkspaceDetail/PackageJsonCol.d.ts +0 -1
  196. package/dist/components/features/WorkspaceDetail/PackageJsonCol.d.ts.map +0 -1
  197. package/dist/components/features/WorkspaceDetail/PackageJsonCol.js +0 -2
  198. package/dist/components/features/WorkspaceDetail/PackageJsonCol.js.map +0 -1
  199. package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.d.ts +0 -2
  200. package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.d.ts.map +0 -1
  201. package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.js +0 -12
  202. package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.js.map +0 -1
  203. package/dist/components/features/WorkspaceDetail/WorkspaceDetail.d.ts +0 -2
  204. package/dist/components/features/WorkspaceDetail/WorkspaceDetail.d.ts.map +0 -1
  205. package/dist/components/features/WorkspaceDetail/WorkspaceDetail.js +0 -16
  206. package/dist/components/features/WorkspaceDetail/WorkspaceDetail.js.map +0 -1
  207. package/dist/components/features/WorkspaceDetail/WorkspaceInfo.d.ts +0 -2
  208. package/dist/components/features/WorkspaceDetail/WorkspaceInfo.d.ts.map +0 -1
  209. package/dist/components/features/WorkspaceDetail/WorkspaceInfo.js +0 -11
  210. package/dist/components/features/WorkspaceDetail/WorkspaceInfo.js.map +0 -1
  211. package/dist/components/features/WorkspaceGrid/WorkspaceCommands.d.ts +0 -2
  212. package/dist/components/features/WorkspaceGrid/WorkspaceCommands.d.ts.map +0 -1
  213. package/dist/components/features/WorkspaceGrid/WorkspaceCommands.js +0 -6
  214. package/dist/components/features/WorkspaceGrid/WorkspaceCommands.js.map +0 -1
  215. package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.d.ts +0 -2
  216. package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.d.ts.map +0 -1
  217. package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.js +0 -11
  218. package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.js.map +0 -1
  219. package/dist/components/features/WorkspaceGrid/WorkspacesGrid.d.ts +0 -2
  220. package/dist/components/features/WorkspaceGrid/WorkspacesGrid.d.ts.map +0 -1
  221. package/dist/components/features/WorkspaceGrid/WorkspacesGrid.js +0 -10
  222. package/dist/components/features/WorkspaceGrid/WorkspacesGrid.js.map +0 -1
  223. package/dist/components/features/WorkspaceGrid/WorkspacesInfo.d.ts +0 -2
  224. package/dist/components/features/WorkspaceGrid/WorkspacesInfo.d.ts.map +0 -1
  225. package/dist/components/features/WorkspaceGrid/WorkspacesInfo.js +0 -11
  226. package/dist/components/features/WorkspaceGrid/WorkspacesInfo.js.map +0 -1
  227. package/dist/components/features/WorkspaceGrid/WorkspacesRow.d.ts +0 -8
  228. package/dist/components/features/WorkspaceGrid/WorkspacesRow.d.ts.map +0 -1
  229. package/dist/components/features/WorkspaceGrid/WorkspacesRow.js +0 -18
  230. package/dist/components/features/WorkspaceGrid/WorkspacesRow.js.map +0 -1
  231. package/dist/components/features/WorkspaceList/WorkspaceList.d.ts +0 -2
  232. package/dist/components/features/WorkspaceList/WorkspaceList.d.ts.map +0 -1
  233. package/dist/components/features/WorkspaceList/WorkspaceList.js +0 -10
  234. package/dist/components/features/WorkspaceList/WorkspaceList.js.map +0 -1
  235. package/dist/components/features/WorkspaceList/WorkspacesRow.d.ts +0 -8
  236. package/dist/components/features/WorkspaceList/WorkspacesRow.d.ts.map +0 -1
  237. package/dist/components/features/WorkspaceList/WorkspacesRow.js +0 -15
  238. package/dist/components/features/WorkspaceList/WorkspacesRow.js.map +0 -1
  239. package/dist/components/features/WorkspaceList/responsiveColumnWidths.d.ts +0 -4
  240. package/dist/components/features/WorkspaceList/responsiveColumnWidths.d.ts.map +0 -1
  241. package/dist/components/features/WorkspaceList/responsiveColumnWidths.js +0 -11
  242. package/dist/components/features/WorkspaceList/responsiveColumnWidths.js.map +0 -1
  243. package/dist/components/features/WorkspaceList/responsiveWidth.d.ts +0 -4
  244. package/dist/components/features/WorkspaceList/responsiveWidth.d.ts.map +0 -1
  245. package/dist/components/features/WorkspaceList/responsiveWidth.js +0 -11
  246. package/dist/components/features/WorkspaceList/responsiveWidth.js.map +0 -1
  247. package/dist/components/features/WorkspacesGrid/WorkspaceInfo.d.ts +0 -2
  248. package/dist/components/features/WorkspacesGrid/WorkspaceInfo.d.ts.map +0 -1
  249. package/dist/components/features/WorkspacesGrid/WorkspaceInfo.js +0 -13
  250. package/dist/components/features/WorkspacesGrid/WorkspaceInfo.js.map +0 -1
  251. package/dist/components/features/WorkspacesGrid/WorkspaceList.d.ts +0 -2
  252. package/dist/components/features/WorkspacesGrid/WorkspaceList.d.ts.map +0 -1
  253. package/dist/components/features/WorkspacesGrid/WorkspaceList.js +0 -10
  254. package/dist/components/features/WorkspacesGrid/WorkspaceList.js.map +0 -1
  255. package/dist/components/features/WorkspacesGrid/WorkspacesGrid.d.ts +0 -2
  256. package/dist/components/features/WorkspacesGrid/WorkspacesGrid.d.ts.map +0 -1
  257. package/dist/components/features/WorkspacesGrid/WorkspacesGrid.js +0 -10
  258. package/dist/components/features/WorkspacesGrid/WorkspacesGrid.js.map +0 -1
  259. package/dist/components/features/WorkspacesGrid/WorkspacesInfo.d.ts +0 -2
  260. package/dist/components/features/WorkspacesGrid/WorkspacesInfo.d.ts.map +0 -1
  261. package/dist/components/features/WorkspacesGrid/WorkspacesInfo.js +0 -11
  262. package/dist/components/features/WorkspacesGrid/WorkspacesInfo.js.map +0 -1
  263. package/dist/components/features/WorkspacesGrid/WorkspacesRow.d.ts +0 -8
  264. package/dist/components/features/WorkspacesGrid/WorkspacesRow.d.ts.map +0 -1
  265. package/dist/components/features/WorkspacesGrid/WorkspacesRow.js +0 -18
  266. package/dist/components/features/WorkspacesGrid/WorkspacesRow.js.map +0 -1
  267. package/dist/components/layouts/Footer/Footer.d.ts +0 -2
  268. package/dist/components/layouts/Footer/Footer.d.ts.map +0 -1
  269. package/dist/components/layouts/Footer/Footer.js +0 -7
  270. package/dist/components/layouts/Footer/Footer.js.map +0 -1
  271. package/dist/components/layouts/Header/WorkspaceCommands copy.d.ts +0 -2
  272. package/dist/components/layouts/Header/WorkspaceCommands copy.d.ts.map +0 -1
  273. package/dist/components/layouts/Header/WorkspaceCommands copy.js +0 -6
  274. package/dist/components/layouts/Header/WorkspaceCommands copy.js.map +0 -1
  275. package/dist/contexts/NavigationContext.d.ts +0 -27
  276. package/dist/contexts/NavigationContext.d.ts.map +0 -1
  277. package/dist/contexts/NavigationContext.js +0 -33
  278. package/dist/contexts/NavigationContext.js.map +0 -1
  279. package/dist/contexts/ProjectNavigationContext.d.ts +0 -20
  280. package/dist/contexts/ProjectNavigationContext.d.ts.map +0 -1
  281. package/dist/contexts/ProjectNavigationContext.js +0 -35
  282. package/dist/contexts/ProjectNavigationContext.js.map +0 -1
  283. package/dist/contexts/ResponsizeContext.d.ts +0 -14
  284. package/dist/contexts/ResponsizeContext.d.ts.map +0 -1
  285. package/dist/contexts/ResponsizeContext.js +0 -34
  286. package/dist/contexts/ResponsizeContext.js.map +0 -1
  287. package/dist/contexts/WorkspaceNavigationContext.d.ts +0 -29
  288. package/dist/contexts/WorkspaceNavigationContext.d.ts.map +0 -1
  289. package/dist/contexts/WorkspaceNavigationContext.js +0 -41
  290. package/dist/contexts/WorkspaceNavigationContext.js.map +0 -1
  291. package/dist/contexts/WorkspacesNavigationContext.d.ts +0 -29
  292. package/dist/contexts/WorkspacesNavigationContext.d.ts.map +0 -1
  293. package/dist/contexts/WorkspacesNavigationContext.js +0 -37
  294. package/dist/contexts/WorkspacesNavigationContext.js.map +0 -1
  295. package/dist/hooks/useDisovery.d.ts +0 -7
  296. package/dist/hooks/useDisovery.d.ts.map +0 -1
  297. package/dist/hooks/useDisovery.js +0 -38
  298. package/dist/hooks/useDisovery.js.map +0 -1
  299. package/dist/hooks/useGridNavigation.d.ts +0 -19
  300. package/dist/hooks/useGridNavigation.d.ts.map +0 -1
  301. package/dist/hooks/useGridNavigation.js +0 -52
  302. package/dist/hooks/useGridNavigation.js.map +0 -1
  303. package/dist/hooks/useNavigation.d.ts +0 -10
  304. package/dist/hooks/useNavigation.d.ts.map +0 -1
  305. package/dist/hooks/useNavigation.js +0 -43
  306. package/dist/hooks/useNavigation.js.map +0 -1
  307. package/dist/hooks/useNavigationMatrix.d.ts +0 -6
  308. package/dist/hooks/useNavigationMatrix.d.ts.map +0 -1
  309. package/dist/hooks/useNavigationMatrix.js +0 -34
  310. package/dist/hooks/useNavigationMatrix.js.map +0 -1
  311. package/dist/hooks/useRuntime.d.ts +0 -1
  312. package/dist/hooks/useRuntime.d.ts.map +0 -1
  313. package/dist/hooks/useRuntime.js +0 -2
  314. package/dist/hooks/useRuntime.js.map +0 -1
  315. package/dist/hooks/useWorkspaceNavigation.d.ts +0 -10
  316. package/dist/hooks/useWorkspaceNavigation.d.ts.map +0 -1
  317. package/dist/hooks/useWorkspaceNavigation.js +0 -31
  318. package/dist/hooks/useWorkspaceNavigation.js.map +0 -1
  319. package/dist/hooks/useWorkspaceQuickActionts.d.ts +0 -4
  320. package/dist/hooks/useWorkspaceQuickActionts.d.ts.map +0 -1
  321. package/dist/hooks/useWorkspaceQuickActionts.js +0 -28
  322. package/dist/hooks/useWorkspaceQuickActionts.js.map +0 -1
  323. package/dist/hooks/useWorkspacesGrid copy.d.ts +0 -10
  324. package/dist/hooks/useWorkspacesGrid copy.d.ts.map +0 -1
  325. package/dist/hooks/useWorkspacesGrid copy.js +0 -31
  326. package/dist/hooks/useWorkspacesGrid copy.js.map +0 -1
  327. package/dist/hooks/useWorkspacesGrid.d.ts +0 -11
  328. package/dist/hooks/useWorkspacesGrid.d.ts.map +0 -1
  329. package/dist/hooks/useWorkspacesGrid.js +0 -31
  330. package/dist/hooks/useWorkspacesGrid.js.map +0 -1
  331. package/dist/hooks/useWorkspacesNavigation.d.ts +0 -10
  332. package/dist/hooks/useWorkspacesNavigation.d.ts.map +0 -1
  333. package/dist/hooks/useWorkspacesNavigation.js +0 -31
  334. package/dist/hooks/useWorkspacesNavigation.js.map +0 -1
  335. package/dist/services/discovery/facets/biome-parser.d.ts +0 -3
  336. package/dist/services/discovery/facets/biome-parser.d.ts.map +0 -1
  337. package/dist/services/discovery/facets/biome-parser.js +0 -73
  338. package/dist/services/discovery/facets/biome-parser.js.map +0 -1
  339. package/dist/services/discovery/facets/composeParser.d.ts +0 -1
  340. package/dist/services/discovery/facets/composeParser.d.ts.map +0 -1
  341. package/dist/services/discovery/facets/composeParser.js +0 -2
  342. package/dist/services/discovery/facets/composeParser.js.map +0 -1
  343. package/dist/services/discovery/facets/makefileParser.d.ts +0 -1
  344. package/dist/services/discovery/facets/makefileParser.d.ts.map +0 -1
  345. package/dist/services/discovery/facets/makefileParser.js +0 -2
  346. package/dist/services/discovery/facets/makefileParser.js.map +0 -1
  347. package/dist/services/discovery/facets/manifest-parser.d.ts +0 -7
  348. package/dist/services/discovery/facets/manifest-parser.d.ts.map +0 -1
  349. package/dist/services/discovery/facets/manifest-parser.js +0 -43
  350. package/dist/services/discovery/facets/manifest-parser.js.map +0 -1
  351. package/dist/services/discovery/facets/manifestParser.d.ts +0 -1
  352. package/dist/services/discovery/facets/manifestParser.d.ts.map +0 -1
  353. package/dist/services/discovery/facets/manifestParser.js +0 -2
  354. package/dist/services/discovery/facets/manifestParser.js.map +0 -1
  355. package/dist/services/discovery/workspaceDiscovery.d.ts +0 -3
  356. package/dist/services/discovery/workspaceDiscovery.d.ts.map +0 -1
  357. package/dist/services/discovery/workspaceDiscovery.js +0 -17
  358. package/dist/services/discovery/workspaceDiscovery.js.map +0 -1
  359. package/dist/services/runtime/resolve-runtime-conflicts.d.ts +0 -15
  360. package/dist/services/runtime/resolve-runtime-conflicts.d.ts.map +0 -1
  361. package/dist/services/runtime/resolve-runtime-conflicts.js +0 -36
  362. package/dist/services/runtime/resolve-runtime-conflicts.js.map +0 -1
  363. package/dist/types/navigation.d.ts +0 -10
  364. package/dist/types/navigation.d.ts.map +0 -1
  365. package/dist/types/navigation.js +0 -59
  366. package/dist/types/navigation.js.map +0 -1
  367. package/dist/types/projects-grid.d.ts +0 -32
  368. package/dist/types/projects-grid.d.ts.map +0 -1
  369. package/dist/types/projects-grid.js +0 -2
  370. package/dist/types/projects-grid.js.map +0 -1
  371. package/dist/types/quick-actions.d.ts +0 -7
  372. package/dist/types/quick-actions.d.ts.map +0 -1
  373. package/dist/types/quick-actions.js +0 -2
  374. package/dist/types/quick-actions.js.map +0 -1
  375. package/dist/types/runtime.d.ts +0 -16
  376. package/dist/types/runtime.d.ts.map +0 -1
  377. package/dist/types/runtime.js +0 -2
  378. package/dist/types/runtime.js.map +0 -1
  379. package/dist/types/workpace-grid.d.ts +0 -32
  380. package/dist/types/workpace-grid.d.ts.map +0 -1
  381. package/dist/types/workpace-grid.js +0 -2
  382. package/dist/types/workpace-grid.js.map +0 -1
  383. package/dist/types/workspace-navigation.d.ts +0 -37
  384. package/dist/types/workspace-navigation.d.ts.map +0 -1
  385. package/dist/types/workspace-navigation.js +0 -7
  386. package/dist/types/workspace-navigation.js.map +0 -1
  387. package/dist/types/workspaces-grid copy.d.ts +0 -37
  388. package/dist/types/workspaces-grid copy.d.ts.map +0 -1
  389. package/dist/types/workspaces-grid copy.js +0 -7
  390. package/dist/types/workspaces-grid copy.js.map +0 -1
  391. package/dist/types/workspaces-grid.d.ts +0 -37
  392. package/dist/types/workspaces-grid.d.ts.map +0 -1
  393. package/dist/types/workspaces-grid.js +0 -7
  394. package/dist/types/workspaces-grid.js.map +0 -1
  395. package/dist/types/worspace-state.d.ts +0 -19
  396. package/dist/types/worspace-state.d.ts.map +0 -1
  397. package/dist/types/worspace-state.js +0 -2
  398. package/dist/types/worspace-state.js.map +0 -1
  399. package/dist/utils/framework-detector.d.ts +0 -7
  400. package/dist/utils/framework-detector.d.ts.map +0 -1
  401. package/dist/utils/framework-detector.js +0 -111
  402. package/dist/utils/framework-detector.js.map +0 -1
  403. package/dist/utils/fs/scanner.d.ts +0 -6
  404. package/dist/utils/fs/scanner.d.ts.map +0 -1
  405. package/dist/utils/fs/scanner.js +0 -32
  406. package/dist/utils/fs/scanner.js.map +0 -1
  407. package/dist/utils/getPackageVersion.d.ts +0 -2
  408. package/dist/utils/getPackageVersion.d.ts.map +0 -1
  409. package/dist/utils/getPackageVersion.js +0 -6
  410. package/dist/utils/getPackageVersion.js.map +0 -1
  411. package/dist/utils/logger.d.ts +0 -14
  412. package/dist/utils/logger.d.ts.map +0 -1
  413. package/dist/utils/logger.js +0 -99
  414. package/dist/utils/logger.js.map +0 -1
  415. package/dist/utils/navigation-helper.d.ts +0 -9
  416. package/dist/utils/navigation-helper.d.ts.map +0 -1
  417. package/dist/utils/navigation-helper.js +0 -53
  418. package/dist/utils/navigation-helper.js.map +0 -1
  419. package/dist/utils/package-json.d.ts +0 -2
  420. package/dist/utils/package-json.d.ts.map +0 -1
  421. package/dist/utils/package-json.js +0 -11
  422. package/dist/utils/package-json.js.map +0 -1
  423. package/dist/utils/port.d.ts +0 -6
  424. package/dist/utils/port.d.ts.map +0 -1
  425. package/dist/utils/port.js +0 -24
  426. package/dist/utils/port.js.map +0 -1
  427. package/dist/utils/project/workspace-grid.d.ts +0 -17
  428. package/dist/utils/project/workspace-grid.d.ts.map +0 -1
  429. package/dist/utils/project/workspace-grid.js +0 -121
  430. package/dist/utils/project/workspace-grid.js.map +0 -1
  431. package/dist/utils/workpace/workspace-grid.d.ts +0 -17
  432. package/dist/utils/workpace/workspace-grid.d.ts.map +0 -1
  433. package/dist/utils/workpace/workspace-grid.js +0 -121
  434. package/dist/utils/workpace/workspace-grid.js.map +0 -1
  435. package/dist/utils/workpace/workspace-helper.d.ts +0 -7
  436. package/dist/utils/workpace/workspace-helper.d.ts.map +0 -1
  437. package/dist/utils/workpace/workspace-helper.js +0 -10
  438. package/dist/utils/workpace/workspace-helper.js.map +0 -1
  439. package/dist/utils/workpace/workspace-navigation.d.ts +0 -17
  440. package/dist/utils/workpace/workspace-navigation.d.ts.map +0 -1
  441. package/dist/utils/workpace/workspace-navigation.js +0 -123
  442. package/dist/utils/workpace/workspace-navigation.js.map +0 -1
  443. package/dist/utils/workpace/workspaces-grid copy.d.ts +0 -30
  444. package/dist/utils/workpace/workspaces-grid copy.d.ts.map +0 -1
  445. package/dist/utils/workpace/workspaces-grid copy.js +0 -97
  446. package/dist/utils/workpace/workspaces-grid copy.js.map +0 -1
  447. package/dist/utils/workpace/workspaces-grid.d.ts +0 -22
  448. package/dist/utils/workpace/workspaces-grid.d.ts.map +0 -1
  449. package/dist/utils/workpace/workspaces-grid.js +0 -123
  450. package/dist/utils/workpace/workspaces-grid.js.map +0 -1
  451. package/dist/utils/workpace/worspace-state.d.ts +0 -18
  452. package/dist/utils/workpace/worspace-state.d.ts.map +0 -1
  453. package/dist/utils/workpace/worspace-state.js +0 -2
  454. package/dist/utils/workpace/worspace-state.js.map +0 -1
  455. package/dist/utils/workspace/workspaces-grid.d.ts +0 -22
  456. package/dist/utils/workspace/workspaces-grid.d.ts.map +0 -1
  457. package/dist/utils/workspace/workspaces-grid.js +0 -123
  458. package/dist/utils/workspace/workspaces-grid.js.map +0 -1
  459. package/dist/utils/workspace-helper.d.ts +0 -10
  460. package/dist/utils/workspace-helper.d.ts.map +0 -1
  461. package/dist/utils/workspace-helper.js +0 -46
  462. package/dist/utils/workspace-helper.js.map +0 -1
  463. package/dist/utils/workspace-navigation.d.ts +0 -1
  464. package/dist/utils/workspace-navigation.d.ts.map +0 -1
  465. package/dist/utils/workspace-navigation.js +0 -2
  466. package/dist/utils/workspace-navigation.js.map +0 -1
  467. package/src/utils/navigation/grid-navigation.ts +0 -60
@@ -1,10 +0,0 @@
1
- export function getQuickActionByPath(quickActions, path) {
2
- return quickActions.find((action) => action.workspacePath === path);
3
- }
4
- export function getRuntimeByPath(runtimes, path) {
5
- return runtimes.find((runtime) => runtime.workspacePath === path);
6
- }
7
- export function getRootWorkspace(workspaces) {
8
- return workspaces.find((ws) => ws.type === "workspace");
9
- }
10
- //# sourceMappingURL=workspace-helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-helper.js","sourceRoot":"","sources":["../../../src/utils/workpace/workspace-helper.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,oBAAoB,CAClC,YAAoC,EACpC,IAAY;IAEZ,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,KAAK,IAAI,CAAC,CAAA;AACrE,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,QAAiC,EACjC,IAAY;IAEZ,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,KAAK,IAAI,CAAC,CAAA;AACnE,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,UAAqB;IACpD,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,WAAW,CAAC,CAAA;AACzD,CAAC"}
@@ -1,17 +0,0 @@
1
- import type { WorkspaceCell, WorkspaceQuickActionCell, WorkspaceRuntimeCell, WorkspacesNavigationGrid } from "../../types/workspace-navigation";
2
- import type { WorkspacesNavigationCell } from "../../types/workspace-navigation.js";
3
- import type { WorkspaceQuickAction } from "../../types/workspace-quick-actions.js";
4
- import type { WorkspaceRuntime } from "../../types/workspace-runtime.js";
5
- import type { Workspace } from "../../types/workspace.js";
6
- export declare function buildWorkspacesNavigationGrid(workspaces: Workspace[], quickActions: WorkspaceQuickAction[], runtimes: WorkspaceRuntime[]): WorkspacesNavigationGrid;
7
- /**
8
- * Returns the highest number of facets found in any item of the array.
9
- * Accepts any array of objects with a 'facets' property (array or undefined).
10
- */
11
- export declare function getMaxFacets(arr: {
12
- facets?: unknown[];
13
- }[]): number;
14
- export declare function getWorkspaceCell(cells: (WorkspacesNavigationCell | null)[]): WorkspaceCell;
15
- export declare function getWorkspaceQuickActionCells(cells: (WorkspacesNavigationCell | null)[]): WorkspaceQuickActionCell[];
16
- export declare function getWorkspaceRuntimeCells(cells: (WorkspacesNavigationCell | null)[]): WorkspaceRuntimeCell[];
17
- //# sourceMappingURL=workspace-navigation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-navigation.d.ts","sourceRoot":"","sources":["../../../src/utils/workpace/workspace-navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AACnF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAIzD,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,SAAS,EAAE,EACvB,YAAY,EAAE,oBAAoB,EAAE,EACpC,QAAQ,EAAE,gBAAgB,EAAE,GAC3B,wBAAwB,CAkD1B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA;CAAE,EAAE,GAAG,MAAM,CAKlE;AAGD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,aAAa,CAIf;AAGD,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,wBAAwB,EAAE,CAO5B;AAGD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,oBAAoB,EAAE,CAOxB"}
@@ -1,123 +0,0 @@
1
- import { logger } from "../../utils/logger.js";
2
- import { getQuickActionByPath, getRuntimeByPath } from "./workspace-helper.js";
3
- export function buildWorkspacesNavigationGrid(workspaces, quickActions, runtimes) {
4
- const maxQuickActionFacets = getMaxFacets(quickActions);
5
- const maxRuntimeFacets = getMaxFacets(runtimes);
6
- const grid = [];
7
- for (let rowIndex = 0; rowIndex < workspaces.length; rowIndex++) {
8
- const ws = workspaces[rowIndex];
9
- const row = [];
10
- // Workspace cell (col 0)
11
- row.push({ type: "workspace", workspace: ws, row: rowIndex, col: 0 });
12
- // Quick actions
13
- const quickAction = getQuickActionByPath(quickActions, ws.path);
14
- const qaFacets = quickAction?.facets ?? [];
15
- for (let i = 0; i < maxQuickActionFacets; i++) {
16
- if (qaFacets[i]) {
17
- row.push({
18
- type: "quickAction",
19
- action: qaFacets[i],
20
- row: rowIndex,
21
- col: i + 1,
22
- });
23
- }
24
- else {
25
- row.push(null);
26
- }
27
- }
28
- // Runtimes
29
- const runtime = getRuntimeByPath(runtimes, ws.path);
30
- const rtFacets = runtime?.facets ?? [];
31
- for (let i = 0; i < maxRuntimeFacets; i++) {
32
- if (rtFacets[i]) {
33
- row.push({
34
- type: "runtime",
35
- runtime: rtFacets[i],
36
- row: rowIndex,
37
- col: i + maxQuickActionFacets + 1,
38
- });
39
- }
40
- else {
41
- row.push(null);
42
- }
43
- }
44
- grid.push(row);
45
- }
46
- logger.debug("Navigation GridXOXO");
47
- logger.debug(JSON.stringify(grid, null, 2), "Navigation Gridxx");
48
- return grid;
49
- }
50
- /**
51
- * Returns the highest number of facets found in any item of the array.
52
- * Accepts any array of objects with a 'facets' property (array or undefined).
53
- */
54
- export function getMaxFacets(arr) {
55
- return arr.reduce((max, item) => {
56
- const count = Array.isArray(item.facets) ? item.facets.length : 0;
57
- return count > max ? count : max;
58
- }, 0);
59
- }
60
- // Returns the first WorkspaceCell found in a row
61
- export function getWorkspaceCell(cells) {
62
- return cells.find((cell) => cell && cell.type === "workspace");
63
- }
64
- // Returns all WorkspaceQuickActionCell in a row
65
- export function getWorkspaceQuickActionCells(cells) {
66
- const result = [];
67
- for (const cell of cells) {
68
- if (cell && cell.type === "quickAction")
69
- result.push(cell);
70
- }
71
- return result;
72
- }
73
- // Returns all WorkspaceRuntimeCell in a row
74
- export function getWorkspaceRuntimeCells(cells) {
75
- const result = [];
76
- for (const cell of cells) {
77
- if (cell && cell.type === "runtime")
78
- result.push(cell);
79
- }
80
- return result;
81
- }
82
- // Optional: Navigation helpers (also utils)
83
- /*
84
- export function navigateGrid(
85
- grid: WorkspaceNavigationGrid,
86
- position: NavigationPosition,
87
- direction: 'up' | 'down' | 'left' | 'right'
88
- ): NavigationPosition {
89
- const newPosition = { ...position }
90
-
91
- switch (direction) {
92
- case 'up':
93
- newPosition.row = Math.max(0, position.row - 1)
94
- break
95
-
96
- case 'down':
97
- newPosition.row = Math.min(grid.length - 1, position.row + 1)
98
- break
99
-
100
- case 'left':
101
- newPosition.col = Math.max(0, position.col - 1)
102
- break
103
-
104
- case 'right':
105
- const currentRow = grid[position.row]
106
- if (currentRow) {
107
- newPosition.col = Math.min(currentRow.length - 1, position.col + 1)
108
- }
109
- break
110
- }
111
-
112
- return newPosition
113
- }
114
- */
115
- /*
116
- export function getCellAt(
117
- grid: WorkspaceNavigationGrid,
118
- position: NavigationPosition
119
- ): WorkspaceNavigationCell | null {
120
- return grid[position.row]?.[position.col] ?? null
121
- }
122
- */
123
- //# sourceMappingURL=workspace-navigation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-navigation.js","sourceRoot":"","sources":["../../../src/utils/workpace/workspace-navigation.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE9E,MAAM,UAAU,6BAA6B,CAC3C,UAAuB,EACvB,YAAoC,EACpC,QAA4B;IAE5B,MAAM,oBAAoB,GAAG,YAAY,CAAC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AAW,CAC3B,CAAA;AACpB,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,4BAA4B,CAC1C,KAA0C;IAE1C,MAAM,MAAM,GAA+B,EAAE,CAAA;IAC7C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa;YACrC,MAAM,CAAC,IAAI,CAAC,IAAgC,CAAC,CAAA;IACjD,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,wBAAwB,CACtC,KAA0C;IAE1C,MAAM,MAAM,GAA2B,EAAE,CAAA;IACzC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YACjC,MAAM,CAAC,IAAI,CAAC,IAA4B,CAAC,CAAA;IAC7C,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,4CAA4C;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BE;AACF;;;;;;;IAOI"}
@@ -1,30 +0,0 @@
1
- import type { WorkspaceQuickAction } from "../../types/workspace-quick-actions.js";
2
- import type { WorkspaceRuntime } from "../../types/workspace-runtime.js";
3
- import type { Workspace } from "../../types/workspace.js";
4
- import type { WorkspaceCell, WorkspaceQuickActionCell, WorkspaceRuntimeCell, WorkspacesNavigationGrid } from "../../types/workspaces-grid";
5
- import type { WorkspacesNavigationCell } from "../../types/workspaces-grid.js";
6
- export declare function buildWorkspacesNavigationGrid(workspaces: Workspace[], quickActions: WorkspaceQuickAction[], runtimes: WorkspaceRuntime[]): WorkspacesNavigationGrid;
7
- /**
8
- * Returns the highest number of facets found in any item of the array.
9
- * Accepts any array of objects with a 'facets' property (array or undefined).
10
- */
11
- export declare function getMaxFacets(arr: {
12
- facets?: unknown[];
13
- }[]): number;
14
- /**
15
- * Returns the first WorkspaceCell found in a row
16
- */
17
- export declare function getWorkspaceCell(cells: (WorkspacesNavigationCell | null)[]): WorkspaceCell;
18
- /**
19
- * Returns all WorkspaceQuickActionCell in a row
20
- */
21
- export declare function getWorkspaceQuickActionCells(cells: (WorkspacesNavigationCell | null)[]): WorkspaceQuickActionCell[];
22
- /**
23
- * Returns all WorkspaceRuntimeCell in a row
24
- */
25
- export declare function getWorkspaceRuntimeCells(cells: (WorkspacesNavigationCell | null)[]): WorkspaceRuntimeCell[];
26
- /**
27
- * Returns the WorkspaceCell at the given cursor position (row, col) from the grid.
28
- */
29
- export declare function getWorkspaceCellByPosition(grid: WorkspacesNavigationGrid, row: number, col: number): WorkspaceCell | null;
30
- //# sourceMappingURL=workspaces-grid%20copy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspaces-grid copy.d.ts","sourceRoot":"","sources":["../../../src/utils/workpace/workspaces-grid copy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AAI9E,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,SAAS,EAAE,EACvB,YAAY,EAAE,oBAAoB,EAAE,EACpC,QAAQ,EAAE,gBAAgB,EAAE,GAC3B,wBAAwB,CAkD1B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA;CAAE,EAAE,GAAG,MAAM,CAKlE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,aAAa,CAIf;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,wBAAwB,EAAE,CAO5B;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,oBAAoB,EAAE,CAOxB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,wBAAwB,EAC9B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,aAAa,GAAG,IAAI,CAItB"}
@@ -1,97 +0,0 @@
1
- import { logger } from "../../utils/logger.js";
2
- import { getQuickActionByPath, getRuntimeByPath } from "./workspace-helper.js";
3
- export function buildWorkspacesNavigationGrid(workspaces, quickActions, runtimes) {
4
- const maxQuickActionFacets = getMaxFacets(quickActions);
5
- const maxRuntimeFacets = getMaxFacets(runtimes);
6
- const grid = [];
7
- for (let rowIndex = 0; rowIndex < workspaces.length; rowIndex++) {
8
- const ws = workspaces[rowIndex];
9
- const row = [];
10
- // Workspace cell (col 0)
11
- row.push({ type: "workspace", workspace: ws, row: rowIndex, col: 0 });
12
- // Quick actions
13
- const quickAction = getQuickActionByPath(quickActions, ws.path);
14
- const qaFacets = quickAction?.facets ?? [];
15
- for (let i = 0; i < maxQuickActionFacets; i++) {
16
- if (qaFacets[i]) {
17
- row.push({
18
- type: "quickAction",
19
- action: qaFacets[i],
20
- row: rowIndex,
21
- col: i + 1,
22
- });
23
- }
24
- else {
25
- row.push(null);
26
- }
27
- }
28
- // Runtimes
29
- const runtime = getRuntimeByPath(runtimes, ws.path);
30
- const rtFacets = runtime?.facets ?? [];
31
- for (let i = 0; i < maxRuntimeFacets; i++) {
32
- if (rtFacets[i]) {
33
- row.push({
34
- type: "runtime",
35
- runtime: rtFacets[i],
36
- row: rowIndex,
37
- col: i + maxQuickActionFacets + 1,
38
- });
39
- }
40
- else {
41
- row.push(null);
42
- }
43
- }
44
- grid.push(row);
45
- }
46
- logger.debug("Navigation GridXOXO");
47
- logger.debug(JSON.stringify(grid, null, 2), "Navigation Gridxx");
48
- return grid;
49
- }
50
- /**
51
- * Returns the highest number of facets found in any item of the array.
52
- * Accepts any array of objects with a 'facets' property (array or undefined).
53
- */
54
- export function getMaxFacets(arr) {
55
- return arr.reduce((max, item) => {
56
- const count = Array.isArray(item.facets) ? item.facets.length : 0;
57
- return count > max ? count : max;
58
- }, 0);
59
- }
60
- /**
61
- * Returns the first WorkspaceCell found in a row
62
- */
63
- export function getWorkspaceCell(cells) {
64
- return cells.find((cell) => cell && cell.type === "workspace");
65
- }
66
- /**
67
- * Returns all WorkspaceQuickActionCell in a row
68
- */
69
- export function getWorkspaceQuickActionCells(cells) {
70
- const result = [];
71
- for (const cell of cells) {
72
- if (cell && cell.type === "quickAction")
73
- result.push(cell);
74
- }
75
- return result;
76
- }
77
- /**
78
- * Returns all WorkspaceRuntimeCell in a row
79
- */
80
- export function getWorkspaceRuntimeCells(cells) {
81
- const result = [];
82
- for (const cell of cells) {
83
- if (cell && cell.type === "runtime")
84
- result.push(cell);
85
- }
86
- return result;
87
- }
88
- /**
89
- * Returns the WorkspaceCell at the given cursor position (row, col) from the grid.
90
- */
91
- export function getWorkspaceCellByPosition(grid, row, col) {
92
- if (!grid[row] || !grid[row][col])
93
- return null;
94
- const cell = grid[row][col];
95
- return cell && cell.type === "workspace" ? cell : null;
96
- }
97
- //# sourceMappingURL=workspaces-grid%20copy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspaces-grid copy.js","sourceRoot":"","sources":["../../../src/utils/workpace/workspaces-grid copy.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE9E,MAAM,UAAU,6BAA6B,CAC3C,UAAu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AC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,CAC3B,CAAA;AACpB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAC1C,KAA0C;IAE1C,MAAM,MAAM,GAA+B,EAAE,CAAA;IAC7C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa;YACrC,MAAM,CAAC,IAAI,CAAC,IAAgC,CAAC,CAAA;IACjD,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,KAA0C;IAE1C,MAAM,MAAM,GAA2B,EAAE,CAAA;IACzC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YACjC,MAAM,CAAC,IAAI,CAAC,IAA4B,CAAC,CAAA;IAC7C,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CACxC,IAA8B,EAC9B,GAAW,EACX,GAAW;IAEX,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;IAC3B,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAE,IAAsB,CAAC,CAAC,CAAC,IAAI,CAAA;AAC3E,CAAC"}
@@ -1,22 +0,0 @@
1
- import type { Project } from "../../types/project.js";
2
- import type { WorkspaceCell, WorkspaceQuickActionCell, WorkspaceRuntimeCell, WorkspacesNavigationCell, WorkspacesNavigationGrid } from "../../types/workspace-grid";
3
- import type { WorkspaceQuickAction } from "../../types/workspace-quick-actions.js";
4
- import type { WorkspaceRuntimeState } from "../../types/workspace-runtime.js";
5
- export declare function buildWorkspacesNavigationGrid(workspaces: Project[], quickActions: WorkspaceQuickAction[], runtimes: WorkspaceRuntimeState[]): WorkspacesNavigationGrid;
6
- /**
7
- * Returns the first WorkspaceCell found in a row
8
- */
9
- export declare function getWorkspaceCell(cells: (WorkspacesNavigationCell | null)[]): WorkspaceCell;
10
- /**
11
- * Returns all WorkspaceQuickActionCell in a row
12
- */
13
- export declare function getWorkspaceQuickActionCells(cells: (WorkspacesNavigationCell | null)[]): WorkspaceQuickActionCell[];
14
- /**
15
- * Returns all WorkspaceRuntimeCell in a row
16
- */
17
- export declare function getWorkspaceRuntimeCells(cells: (WorkspacesNavigationCell | null)[]): WorkspaceRuntimeCell[];
18
- /**
19
- * Returns the WorkspacesNavigationCell (any type) at the given row and col from the grid.
20
- */
21
- export declare function getWorkspacesNavigationCellByPosition(grid: WorkspacesNavigationGrid, row: number, col: number): WorkspacesNavigationCell | null;
22
- //# sourceMappingURL=workspaces-grid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspaces-grid.d.ts","sourceRoot":"","sources":["../../../src/utils/workpace/workspaces-grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EAEzB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AAI7E,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,OAAO,EAAE,EACrB,YAAY,EAAE,oBAAoB,EAAE,EACpC,QAAQ,EAAE,qBAAqB,EAAE,GAChC,wBAAwB,CAuD1B;AAsBD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,aAAa,CAIf;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,wBAAwB,EAAE,CAO5B;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,oBAAoB,EAAE,CAOxB;AAgBD;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,IAAI,EAAE,wBAAwB,EAC9B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,wBAAwB,GAAG,IAAI,CAKjC"}
@@ -1,123 +0,0 @@
1
- import { logger } from "../../utils/logger.js";
2
- import { getQuickActionByPath, getRuntimeByPath } from "./workspace-helper.js";
3
- export function buildWorkspacesNavigationGrid(workspaces, quickActions, runtimes) {
4
- const maxQuickActionFacets = getMaxQuickActionRowItems(quickActions);
5
- const maxRuntimeFacets = getMaxRuntimeRowItems(runtimes);
6
- const grid = [];
7
- for (let rowIndex = 0; rowIndex < workspaces.length; rowIndex++) {
8
- const ws = workspaces[rowIndex];
9
- const cells = [];
10
- // Workspace cell (col 0)
11
- cells.push({ type: "workspace", workspace: ws, row: rowIndex, col: 0 });
12
- // Quick actions
13
- const quickAction = getQuickActionByPath(quickActions, ws.path);
14
- const qaFacets = quickAction?.facets ?? [];
15
- for (let i = 0; i < maxQuickActionFacets; i++) {
16
- if (qaFacets[i]) {
17
- cells.push({
18
- type: "quickAction",
19
- action: qaFacets[i],
20
- row: rowIndex,
21
- col: i + 1,
22
- });
23
- }
24
- else {
25
- cells.push(null);
26
- }
27
- }
28
- // Runtimes
29
- const runtime = getRuntimeByPath(runtimes, ws.path);
30
- const rtFacets = runtime?.runStates?.filter((rs) => rs.status !== "stopped") ?? [];
31
- for (let i = 0; i < maxRuntimeFacets; i++) {
32
- if (rtFacets[i]) {
33
- cells.push({
34
- type: "runtime",
35
- runState: rtFacets[i],
36
- row: rowIndex,
37
- col: i + maxQuickActionFacets + 1,
38
- });
39
- }
40
- else {
41
- cells.push(null);
42
- }
43
- }
44
- const navRow = {
45
- id: ws.path,
46
- cells,
47
- };
48
- grid.push(navRow);
49
- }
50
- logger.debug("Workspaces Navigation Grid");
51
- logger.debug(JSON.stringify(grid, null, 2));
52
- return grid;
53
- }
54
- /**
55
- * Returns the highest number of items found in the array.
56
- */
57
- function getMaxQuickActionRowItems(arr) {
58
- return arr.reduce((max, item) => {
59
- const count = Array.isArray(item.facets) ? item.facets.length : 0;
60
- return count > max ? count : max;
61
- }, 0);
62
- }
63
- /**
64
- * Returns the highest number of items found in the array.
65
- */
66
- function getMaxRuntimeRowItems(arr) {
67
- return arr.reduce((max, item) => {
68
- const count = Array.isArray(item.runStates) ? item.runStates.length : 0;
69
- return count > max ? count : max;
70
- }, 0);
71
- }
72
- /**
73
- * Returns the first WorkspaceCell found in a row
74
- */
75
- export function getWorkspaceCell(cells) {
76
- return cells.find((cell) => cell && cell.type === "workspace");
77
- }
78
- /**
79
- * Returns all WorkspaceQuickActionCell in a row
80
- */
81
- export function getWorkspaceQuickActionCells(cells) {
82
- const result = [];
83
- for (const cell of cells) {
84
- if (cell && cell.type === "quickAction")
85
- result.push(cell);
86
- }
87
- return result;
88
- }
89
- /**
90
- * Returns all WorkspaceRuntimeCell in a row
91
- */
92
- export function getWorkspaceRuntimeCells(cells) {
93
- const result = [];
94
- for (const cell of cells) {
95
- if (cell && cell.type === "runtime")
96
- result.push(cell);
97
- }
98
- return result;
99
- }
100
- // /**
101
- // * Returns the WorkspaceCell at the given cursor position (row, col) from the grid.
102
- // */
103
- // export function getWorkspaceCellByPosition(
104
- // grid: WorkspacesNavigationGrid,
105
- // row: number,
106
- // col: number,
107
- // ): WorkspaceCell | null {
108
- // const navRow = grid[row]
109
- // if (!navRow || !navRow.cells[col]) return null
110
- // const cell = navRow.cells[col]
111
- // return cell && cell.type === "workspace" ? (cell as WorkspaceCell) : null
112
- // }
113
- /**
114
- * Returns the WorkspacesNavigationCell (any type) at the given row and col from the grid.
115
- */
116
- export function getWorkspacesNavigationCellByPosition(grid, row, col) {
117
- const navRow = grid[row];
118
- if (!navRow || !navRow.cells[col])
119
- return null;
120
- const cell = navRow.cells[col];
121
- return cell ? cell : null;
122
- }
123
- //# sourceMappingURL=workspaces-grid.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspaces-grid.js","sourceRoot":"","sources":["../../../src/utils/workpace/workspaces-grid.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE9E,MAAM,UAAU,6BAA6B,CAC3C,UAAqB,EACrB,YAAoC,EACpC,QAAiC;IAEjC,MAAM,oBAAoB,GAAG,yBAAyB,CAAC,YAAY,CAAC,CAAA;IACpE,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAA;IAExD,MAAM,IAAI,GAA6B,EAAE,CAAA;IACzC,KAAK,IAAI,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;QAChE,MAAM,EAAE,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAA;QAC/B,MAAM,KAAK,GAAwC,EAAE,CAAA;QAErD,yBAAyB;QACzB,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;QAEvE,gBAAgB;QAChB,MAAM,WAAW,GAAG,oBAAoB,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,CAAA;QAC/D,MAAM,QAAQ,GAAG,WAAW,EAAE,MAAM,IAAI,EAAE,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0C;IAE1C,MAAM,MAAM,GAA+B,EAAE,CAAA;IAC7C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa;YACrC,MAAM,CAAC,IAAI,CAAC,IAAgC,CAAC,CAAA;IACjD,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,KAA0C;IAE1C,MAAM,MAAM,GAA2B,EAAE,CAAA;IACzC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YACjC,MAAM,CAAC,IAAI,CAAC,IAA4B,CAAC,CAAA;IAC7C,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,MAAM;AACN,sFAAsF;AACtF,MAAM;AACN,8CAA8C;AAC9C,oCAAoC;AACpC,iBAAiB;AACjB,iBAAiB;AACjB,4BAA4B;AAC5B,6BAA6B;AAC7B,mDAAmD;AACnD,mCAAmC;AACnC,8EAA8E;AAC9E,IAAI;AAEJ;;GAEG;AACH,MAAM,UAAU,qCAAqC,CACnD,IAA8B,EAC9B,GAAW,EACX,GAAW;IAEX,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;IACxB,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IAC9C,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC9B,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;AAC3B,CAAC"}
@@ -1,18 +0,0 @@
1
- export type RuntimeStatus = "starting" | "running" | "stopping" | "stopped" | "failed";
2
- /**
3
- * Aggregated running state for an entire workspace
4
- */
5
- export interface WorkspaceRuntimeState {
6
- path: string;
7
- runStates: RunState[];
8
- }
9
- /**
10
- * Running state for a single run (script, command, or service)
11
- */
12
- export interface RunState {
13
- id: string;
14
- status: RuntimeStatus;
15
- command: string;
16
- port?: number;
17
- }
18
- //# sourceMappingURL=worspace-state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worspace-state.d.ts","sourceRoot":"","sources":["../../../src/utils/workpace/worspace-state.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,SAAS,GACT,UAAU,GACV,SAAS,GACT,QAAQ,CAAA;AAEZ;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,QAAQ,EAAE,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,aAAa,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=worspace-state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worspace-state.js","sourceRoot":"","sources":["../../../src/utils/workpace/worspace-state.ts"],"names":[],"mappings":""}
@@ -1,22 +0,0 @@
1
- import type { Project } from "../../types/project.js";
2
- import type { WorkspaceCell, WorkspaceQuickActionCell, WorkspaceRuntimeCell, WorkspacesNavigationCell, WorkspacesNavigationGrid } from "../../types/workspace-grid";
3
- import type { WorkspaceQuickAction } from "../../types/workspace-quick-actions.js";
4
- import type { WorkspaceRuntimeState } from "../../types/workspace-runtime.js";
5
- export declare function buildWorkspacesNavigationGrid(workspaces: Project[], quickActions: WorkspaceQuickAction[], runtimes: WorkspaceRuntimeState[]): WorkspacesNavigationGrid;
6
- /**
7
- * Returns the first WorkspaceCell found in a row
8
- */
9
- export declare function getWorkspaceCell(cells: (WorkspacesNavigationCell | null)[]): WorkspaceCell;
10
- /**
11
- * Returns all WorkspaceQuickActionCell in a row
12
- */
13
- export declare function getWorkspaceQuickActionCells(cells: (WorkspacesNavigationCell | null)[]): WorkspaceQuickActionCell[];
14
- /**
15
- * Returns all WorkspaceRuntimeCell in a row
16
- */
17
- export declare function getWorkspaceRuntimeCells(cells: (WorkspacesNavigationCell | null)[]): WorkspaceRuntimeCell[];
18
- /**
19
- * Returns the WorkspacesNavigationCell (any type) at the given row and col from the grid.
20
- */
21
- export declare function getWorkspacesNavigationCellByPosition(grid: WorkspacesNavigationGrid, row: number, col: number): WorkspacesNavigationCell | null;
22
- //# sourceMappingURL=workspaces-grid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspaces-grid.d.ts","sourceRoot":"","sources":["../../../src/utils/workspace/workspaces-grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EAEzB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AAI7E,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,OAAO,EAAE,EACrB,YAAY,EAAE,oBAAoB,EAAE,EACpC,QAAQ,EAAE,qBAAqB,EAAE,GAChC,wBAAwB,CAuD1B;AAsBD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,aAAa,CAIf;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,wBAAwB,EAAE,CAO5B;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,CAAC,wBAAwB,GAAG,IAAI,CAAC,EAAE,GACzC,oBAAoB,EAAE,CAOxB;AAgBD;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,IAAI,EAAE,wBAAwB,EAC9B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,wBAAwB,GAAG,IAAI,CAKjC"}
@@ -1,123 +0,0 @@
1
- import { logger } from "../../utils/logger.js";
2
- import { getQuickActionByPath, getRuntimeByPath } from "./workspace-helper.js";
3
- export function buildWorkspacesNavigationGrid(workspaces, quickActions, runtimes) {
4
- const maxQuickActionFacets = getMaxQuickActionRowItems(quickActions);
5
- const maxRuntimeFacets = getMaxRuntimeRowItems(runtimes);
6
- const grid = [];
7
- for (let rowIndex = 0; rowIndex < workspaces.length; rowIndex++) {
8
- const ws = workspaces[rowIndex];
9
- const cells = [];
10
- // Workspace cell (col 0)
11
- cells.push({ type: "workspace", workspace: ws, row: rowIndex, col: 0 });
12
- // Quick actions
13
- const quickAction = getQuickActionByPath(quickActions, ws.path);
14
- const qaFacets = quickAction?.facets ?? [];
15
- for (let i = 0; i < maxQuickActionFacets; i++) {
16
- if (qaFacets[i]) {
17
- cells.push({
18
- type: "quickAction",
19
- action: qaFacets[i],
20
- row: rowIndex,
21
- col: i + 1,
22
- });
23
- }
24
- else {
25
- cells.push(null);
26
- }
27
- }
28
- // Runtimes
29
- const runtime = getRuntimeByPath(runtimes, ws.path);
30
- const rtFacets = runtime?.runStates?.filter((rs) => rs.status !== "stopped") ?? [];
31
- for (let i = 0; i < maxRuntimeFacets; i++) {
32
- if (rtFacets[i]) {
33
- cells.push({
34
- type: "runtime",
35
- runState: rtFacets[i],
36
- row: rowIndex,
37
- col: i + maxQuickActionFacets + 1,
38
- });
39
- }
40
- else {
41
- cells.push(null);
42
- }
43
- }
44
- const navRow = {
45
- id: ws.path,
46
- cells,
47
- };
48
- grid.push(navRow);
49
- }
50
- logger.debug("Workspaces Navigation Grid");
51
- logger.debug(JSON.stringify(grid, null, 2));
52
- return grid;
53
- }
54
- /**
55
- * Returns the highest number of items found in the array.
56
- */
57
- function getMaxQuickActionRowItems(arr) {
58
- return arr.reduce((max, item) => {
59
- const count = Array.isArray(item.facets) ? item.facets.length : 0;
60
- return count > max ? count : max;
61
- }, 0);
62
- }
63
- /**
64
- * Returns the highest number of items found in the array.
65
- */
66
- function getMaxRuntimeRowItems(arr) {
67
- return arr.reduce((max, item) => {
68
- const count = Array.isArray(item.runStates) ? item.runStates.length : 0;
69
- return count > max ? count : max;
70
- }, 0);
71
- }
72
- /**
73
- * Returns the first WorkspaceCell found in a row
74
- */
75
- export function getWorkspaceCell(cells) {
76
- return cells.find((cell) => cell && cell.type === "workspace");
77
- }
78
- /**
79
- * Returns all WorkspaceQuickActionCell in a row
80
- */
81
- export function getWorkspaceQuickActionCells(cells) {
82
- const result = [];
83
- for (const cell of cells) {
84
- if (cell && cell.type === "quickAction")
85
- result.push(cell);
86
- }
87
- return result;
88
- }
89
- /**
90
- * Returns all WorkspaceRuntimeCell in a row
91
- */
92
- export function getWorkspaceRuntimeCells(cells) {
93
- const result = [];
94
- for (const cell of cells) {
95
- if (cell && cell.type === "runtime")
96
- result.push(cell);
97
- }
98
- return result;
99
- }
100
- // /**
101
- // * Returns the WorkspaceCell at the given cursor position (row, col) from the grid.
102
- // */
103
- // export function getWorkspaceCellByPosition(
104
- // grid: WorkspacesNavigationGrid,
105
- // row: number,
106
- // col: number,
107
- // ): WorkspaceCell | null {
108
- // const navRow = grid[row]
109
- // if (!navRow || !navRow.cells[col]) return null
110
- // const cell = navRow.cells[col]
111
- // return cell && cell.type === "workspace" ? (cell as WorkspaceCell) : null
112
- // }
113
- /**
114
- * Returns the WorkspacesNavigationCell (any type) at the given row and col from the grid.
115
- */
116
- export function getWorkspacesNavigationCellByPosition(grid, row, col) {
117
- const navRow = grid[row];
118
- if (!navRow || !navRow.cells[col])
119
- return null;
120
- const cell = navRow.cells[col];
121
- return cell ? cell : null;
122
- }
123
- //# sourceMappingURL=workspaces-grid.js.map