@nocturnium/svelte-ide 1.0.0-rc.1

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 (330) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +251 -0
  3. package/dist/components/agents/AgentActivityPanel.svelte +565 -0
  4. package/dist/components/agents/AgentActivityPanel.svelte.d.ts +24 -0
  5. package/dist/components/agents/AgentAvatar.svelte +417 -0
  6. package/dist/components/agents/AgentAvatar.svelte.d.ts +23 -0
  7. package/dist/components/agents/AgentCursor.svelte +224 -0
  8. package/dist/components/agents/AgentCursor.svelte.d.ts +35 -0
  9. package/dist/components/agents/AgentPresenceBar.svelte +261 -0
  10. package/dist/components/agents/AgentPresenceBar.svelte.d.ts +20 -0
  11. package/dist/components/agents/index.d.ts +4 -0
  12. package/dist/components/agents/index.js +5 -0
  13. package/dist/components/ai/AIConversationList.svelte +524 -0
  14. package/dist/components/ai/AIConversationList.svelte.d.ts +17 -0
  15. package/dist/components/ai/AIEditPreview.svelte +132 -0
  16. package/dist/components/ai/AIEditPreview.svelte.d.ts +8 -0
  17. package/dist/components/ai/AIInlineEdit.svelte +155 -0
  18. package/dist/components/ai/AIInlineEdit.svelte.d.ts +10 -0
  19. package/dist/components/ai/AIMessage.svelte +239 -0
  20. package/dist/components/ai/AIMessage.svelte.d.ts +13 -0
  21. package/dist/components/ai/AIMessageActions.svelte +176 -0
  22. package/dist/components/ai/AIMessageActions.svelte.d.ts +12 -0
  23. package/dist/components/ai/AIMessageContent.svelte +355 -0
  24. package/dist/components/ai/AIMessageContent.svelte.d.ts +7 -0
  25. package/dist/components/ai/AIPanel.svelte +561 -0
  26. package/dist/components/ai/AIPanel.svelte.d.ts +7 -0
  27. package/dist/components/ai/AISuggestionWidget.svelte +132 -0
  28. package/dist/components/ai/AISuggestionWidget.svelte.d.ts +10 -0
  29. package/dist/components/ai/AIToolCallDisplay.svelte +317 -0
  30. package/dist/components/ai/AIToolCallDisplay.svelte.d.ts +12 -0
  31. package/dist/components/ai/index.d.ts +9 -0
  32. package/dist/components/ai/index.js +10 -0
  33. package/dist/components/core/Avatar.svelte +110 -0
  34. package/dist/components/core/Avatar.svelte.d.ts +12 -0
  35. package/dist/components/core/Badge.svelte +98 -0
  36. package/dist/components/core/Badge.svelte.d.ts +11 -0
  37. package/dist/components/core/Button.svelte +175 -0
  38. package/dist/components/core/Button.svelte.d.ts +18 -0
  39. package/dist/components/core/ConnectionStatus.svelte +294 -0
  40. package/dist/components/core/ConnectionStatus.svelte.d.ts +20 -0
  41. package/dist/components/core/ContextMenu.svelte +176 -0
  42. package/dist/components/core/ContextMenu.svelte.d.ts +19 -0
  43. package/dist/components/core/ErrorBoundary.svelte +277 -0
  44. package/dist/components/core/ErrorBoundary.svelte.d.ts +23 -0
  45. package/dist/components/core/Icon.svelte +107 -0
  46. package/dist/components/core/Icon.svelte.d.ts +8 -0
  47. package/dist/components/core/Input.svelte +138 -0
  48. package/dist/components/core/Input.svelte.d.ts +20 -0
  49. package/dist/components/core/Kbd.svelte +34 -0
  50. package/dist/components/core/Kbd.svelte.d.ts +7 -0
  51. package/dist/components/core/ResizeHandle.svelte +200 -0
  52. package/dist/components/core/ResizeHandle.svelte.d.ts +23 -0
  53. package/dist/components/core/Spinner.svelte +35 -0
  54. package/dist/components/core/Spinner.svelte.d.ts +7 -0
  55. package/dist/components/core/Textarea.svelte +112 -0
  56. package/dist/components/core/Textarea.svelte.d.ts +18 -0
  57. package/dist/components/core/Tooltip.svelte +103 -0
  58. package/dist/components/core/Tooltip.svelte.d.ts +11 -0
  59. package/dist/components/core/index.d.ts +13 -0
  60. package/dist/components/core/index.js +14 -0
  61. package/dist/components/editor/AIFocusLayer.svelte +430 -0
  62. package/dist/components/editor/AIFocusLayer.svelte.d.ts +32 -0
  63. package/dist/components/editor/Breadcrumbs.svelte +435 -0
  64. package/dist/components/editor/Breadcrumbs.svelte.d.ts +33 -0
  65. package/dist/components/editor/BreakpointLayer.svelte +642 -0
  66. package/dist/components/editor/BreakpointLayer.svelte.d.ts +20 -0
  67. package/dist/components/editor/CognitiveLoadMeter.svelte +324 -0
  68. package/dist/components/editor/CognitiveLoadMeter.svelte.d.ts +18 -0
  69. package/dist/components/editor/CollaborativeEditor.svelte +218 -0
  70. package/dist/components/editor/CollaborativeEditor.svelte.d.ts +32 -0
  71. package/dist/components/editor/CommandPalette.svelte +434 -0
  72. package/dist/components/editor/CommandPalette.svelte.d.ts +11 -0
  73. package/dist/components/editor/ComplexityLayer.svelte +293 -0
  74. package/dist/components/editor/ComplexityLayer.svelte.d.ts +23 -0
  75. package/dist/components/editor/ConflictZoneLayer.svelte +441 -0
  76. package/dist/components/editor/ConflictZoneLayer.svelte.d.ts +25 -0
  77. package/dist/components/editor/ContextLens.svelte +262 -0
  78. package/dist/components/editor/ContextLens.svelte.d.ts +27 -0
  79. package/dist/components/editor/CustomEditor.svelte +1242 -0
  80. package/dist/components/editor/CustomEditor.svelte.d.ts +37 -0
  81. package/dist/components/editor/DebugConsole.svelte +646 -0
  82. package/dist/components/editor/DebugConsole.svelte.d.ts +41 -0
  83. package/dist/components/editor/EchoCursorLayer.svelte +363 -0
  84. package/dist/components/editor/EchoCursorLayer.svelte.d.ts +24 -0
  85. package/dist/components/editor/Editor.svelte +61 -0
  86. package/dist/components/editor/Editor.svelte.d.ts +22 -0
  87. package/dist/components/editor/EditorGutter.svelte +119 -0
  88. package/dist/components/editor/EditorGutter.svelte.d.ts +19 -0
  89. package/dist/components/editor/EditorLines.svelte +182 -0
  90. package/dist/components/editor/EditorLines.svelte.d.ts +43 -0
  91. package/dist/components/editor/EditorPane.svelte +134 -0
  92. package/dist/components/editor/EditorPane.svelte.d.ts +9 -0
  93. package/dist/components/editor/EditorSelections.svelte +186 -0
  94. package/dist/components/editor/EditorSelections.svelte.d.ts +25 -0
  95. package/dist/components/editor/EditorTabs.svelte +170 -0
  96. package/dist/components/editor/EditorTabs.svelte.d.ts +12 -0
  97. package/dist/components/editor/FileExplorer.svelte +811 -0
  98. package/dist/components/editor/FileExplorer.svelte.d.ts +67 -0
  99. package/dist/components/editor/FileIcon.svelte +110 -0
  100. package/dist/components/editor/FileIcon.svelte.d.ts +10 -0
  101. package/dist/components/editor/FindReplace.svelte +448 -0
  102. package/dist/components/editor/FindReplace.svelte.d.ts +40 -0
  103. package/dist/components/editor/GhostBracketLayer.svelte +391 -0
  104. package/dist/components/editor/GhostBracketLayer.svelte.d.ts +24 -0
  105. package/dist/components/editor/GitBlameLayer.svelte +436 -0
  106. package/dist/components/editor/GitBlameLayer.svelte.d.ts +18 -0
  107. package/dist/components/editor/InlineDiagnosticsLayer.svelte +540 -0
  108. package/dist/components/editor/InlineDiagnosticsLayer.svelte.d.ts +35 -0
  109. package/dist/components/editor/InlineDiffLayer.svelte +337 -0
  110. package/dist/components/editor/InlineDiffLayer.svelte.d.ts +31 -0
  111. package/dist/components/editor/MinimalEditor.svelte +75 -0
  112. package/dist/components/editor/MinimalEditor.svelte.d.ts +6 -0
  113. package/dist/components/editor/MinimalEditor2.svelte +84 -0
  114. package/dist/components/editor/MinimalEditor2.svelte.d.ts +6 -0
  115. package/dist/components/editor/Minimap.svelte +327 -0
  116. package/dist/components/editor/Minimap.svelte.d.ts +34 -0
  117. package/dist/components/editor/PluginPreviewSandbox.svelte +793 -0
  118. package/dist/components/editor/PluginPreviewSandbox.svelte.d.ts +49 -0
  119. package/dist/components/editor/ProblemsPanel.svelte +628 -0
  120. package/dist/components/editor/ProblemsPanel.svelte.d.ts +25 -0
  121. package/dist/components/editor/QuickActionsMenu.svelte +403 -0
  122. package/dist/components/editor/QuickActionsMenu.svelte.d.ts +18 -0
  123. package/dist/components/editor/SnippetPalette.svelte +530 -0
  124. package/dist/components/editor/SnippetPalette.svelte.d.ts +16 -0
  125. package/dist/components/editor/StructureMap.svelte +431 -0
  126. package/dist/components/editor/StructureMap.svelte.d.ts +37 -0
  127. package/dist/components/editor/SymbolOutline.svelte +722 -0
  128. package/dist/components/editor/SymbolOutline.svelte.d.ts +44 -0
  129. package/dist/components/editor/TimelineScrubber.svelte +470 -0
  130. package/dist/components/editor/TimelineScrubber.svelte.d.ts +40 -0
  131. package/dist/components/editor/TokenRenderer.svelte +69 -0
  132. package/dist/components/editor/TokenRenderer.svelte.d.ts +15 -0
  133. package/dist/components/editor/constants.d.ts +32 -0
  134. package/dist/components/editor/constants.js +36 -0
  135. package/dist/components/editor/core/ai-awareness.d.ts +176 -0
  136. package/dist/components/editor/core/ai-awareness.js +210 -0
  137. package/dist/components/editor/core/bracket-healer.d.ts +189 -0
  138. package/dist/components/editor/core/bracket-healer.js +406 -0
  139. package/dist/components/editor/core/breakpoints.d.ts +203 -0
  140. package/dist/components/editor/core/breakpoints.js +414 -0
  141. package/dist/components/editor/core/commands.d.ts +108 -0
  142. package/dist/components/editor/core/commands.js +246 -0
  143. package/dist/components/editor/core/complexity-analyzer.d.ts +123 -0
  144. package/dist/components/editor/core/complexity-analyzer.js +376 -0
  145. package/dist/components/editor/core/conflict-predictor.d.ts +135 -0
  146. package/dist/components/editor/core/conflict-predictor.js +316 -0
  147. package/dist/components/editor/core/crdt-binding.d.ts +118 -0
  148. package/dist/components/editor/core/crdt-binding.js +286 -0
  149. package/dist/components/editor/core/diagnostics.d.ts +210 -0
  150. package/dist/components/editor/core/diagnostics.js +335 -0
  151. package/dist/components/editor/core/echo-cursor.d.ts +201 -0
  152. package/dist/components/editor/core/echo-cursor.js +267 -0
  153. package/dist/components/editor/core/folding.d.ts +124 -0
  154. package/dist/components/editor/core/folding.js +672 -0
  155. package/dist/components/editor/core/ghost-pair.d.ts +122 -0
  156. package/dist/components/editor/core/ghost-pair.js +221 -0
  157. package/dist/components/editor/core/git-blame.d.ts +170 -0
  158. package/dist/components/editor/core/git-blame.js +324 -0
  159. package/dist/components/editor/core/index.d.ts +26 -0
  160. package/dist/components/editor/core/index.js +24 -0
  161. package/dist/components/editor/core/keybindings.d.ts +79 -0
  162. package/dist/components/editor/core/keybindings.js +357 -0
  163. package/dist/components/editor/core/multi-cursor.d.ts +196 -0
  164. package/dist/components/editor/core/multi-cursor.js +521 -0
  165. package/dist/components/editor/core/navigation.d.ts +107 -0
  166. package/dist/components/editor/core/navigation.js +408 -0
  167. package/dist/components/editor/core/quick-actions.d.ts +189 -0
  168. package/dist/components/editor/core/quick-actions.js +427 -0
  169. package/dist/components/editor/core/search.d.ts +88 -0
  170. package/dist/components/editor/core/search.js +192 -0
  171. package/dist/components/editor/core/semantic-analyzer.d.ts +77 -0
  172. package/dist/components/editor/core/semantic-analyzer.js +424 -0
  173. package/dist/components/editor/core/snippet-manager.d.ts +202 -0
  174. package/dist/components/editor/core/snippet-manager.js +565 -0
  175. package/dist/components/editor/core/state.d.ts +367 -0
  176. package/dist/components/editor/core/state.js +900 -0
  177. package/dist/components/editor/core/timeline.d.ts +204 -0
  178. package/dist/components/editor/core/timeline.js +349 -0
  179. package/dist/components/editor/editor-find.d.ts +56 -0
  180. package/dist/components/editor/editor-find.js +148 -0
  181. package/dist/components/editor/editor-input.d.ts +77 -0
  182. package/dist/components/editor/editor-input.js +445 -0
  183. package/dist/components/editor/editor-multicursor.d.ts +21 -0
  184. package/dist/components/editor/editor-multicursor.js +196 -0
  185. package/dist/components/editor/editor-scroll.d.ts +14 -0
  186. package/dist/components/editor/editor-scroll.js +34 -0
  187. package/dist/components/editor/index.d.ts +15 -0
  188. package/dist/components/editor/index.js +21 -0
  189. package/dist/components/editor/languages.d.ts +62 -0
  190. package/dist/components/editor/languages.js +285 -0
  191. package/dist/components/editor/theme.d.ts +88 -0
  192. package/dist/components/editor/theme.js +139 -0
  193. package/dist/components/editor/tokenizer/base.d.ts +40 -0
  194. package/dist/components/editor/tokenizer/base.js +203 -0
  195. package/dist/components/editor/tokenizer/index.d.ts +56 -0
  196. package/dist/components/editor/tokenizer/index.js +215 -0
  197. package/dist/components/editor/tokenizer/languages/css.d.ts +17 -0
  198. package/dist/components/editor/tokenizer/languages/css.js +194 -0
  199. package/dist/components/editor/tokenizer/languages/go.d.ts +17 -0
  200. package/dist/components/editor/tokenizer/languages/go.js +220 -0
  201. package/dist/components/editor/tokenizer/languages/html.d.ts +24 -0
  202. package/dist/components/editor/tokenizer/languages/html.js +145 -0
  203. package/dist/components/editor/tokenizer/languages/javascript.d.ts +56 -0
  204. package/dist/components/editor/tokenizer/languages/javascript.js +452 -0
  205. package/dist/components/editor/tokenizer/languages/json.d.ts +12 -0
  206. package/dist/components/editor/tokenizer/languages/json.js +91 -0
  207. package/dist/components/editor/tokenizer/languages/markdown.d.ts +16 -0
  208. package/dist/components/editor/tokenizer/languages/markdown.js +156 -0
  209. package/dist/components/editor/tokenizer/languages/python.d.ts +20 -0
  210. package/dist/components/editor/tokenizer/languages/python.js +227 -0
  211. package/dist/components/editor/tokenizer/languages/svelte.d.ts +40 -0
  212. package/dist/components/editor/tokenizer/languages/svelte.js +326 -0
  213. package/dist/components/editor/tokenizer/types.d.ts +86 -0
  214. package/dist/components/editor/tokenizer/types.js +4 -0
  215. package/dist/components/layout/IDELayout.svelte +274 -0
  216. package/dist/components/layout/IDELayout.svelte.d.ts +29 -0
  217. package/dist/components/layout/StatusBar.svelte +511 -0
  218. package/dist/components/layout/StatusBar.svelte.d.ts +47 -0
  219. package/dist/components/layout/index.d.ts +2 -0
  220. package/dist/components/layout/index.js +3 -0
  221. package/dist/components/lsp/AutocompleteWidget.svelte +364 -0
  222. package/dist/components/lsp/AutocompleteWidget.svelte.d.ts +33 -0
  223. package/dist/components/lsp/DiagnosticMarker.svelte +166 -0
  224. package/dist/components/lsp/DiagnosticMarker.svelte.d.ts +19 -0
  225. package/dist/components/lsp/DiagnosticsPanel.svelte +388 -0
  226. package/dist/components/lsp/DiagnosticsPanel.svelte.d.ts +21 -0
  227. package/dist/components/lsp/HoverTooltip.svelte +274 -0
  228. package/dist/components/lsp/HoverTooltip.svelte.d.ts +24 -0
  229. package/dist/components/lsp/LSPEditor.svelte +486 -0
  230. package/dist/components/lsp/LSPEditor.svelte.d.ts +39 -0
  231. package/dist/components/lsp/SignatureHelpWidget.svelte +216 -0
  232. package/dist/components/lsp/SignatureHelpWidget.svelte.d.ts +22 -0
  233. package/dist/components/lsp/index.d.ts +6 -0
  234. package/dist/components/lsp/index.js +7 -0
  235. package/dist/components/plugins/PluginCard.svelte +153 -0
  236. package/dist/components/plugins/PluginCard.svelte.d.ts +19 -0
  237. package/dist/components/plugins/PluginPanel.svelte +280 -0
  238. package/dist/components/plugins/PluginPanel.svelte.d.ts +8 -0
  239. package/dist/components/plugins/PluginProposalForm.svelte +250 -0
  240. package/dist/components/plugins/PluginProposalForm.svelte.d.ts +6 -0
  241. package/dist/components/plugins/PluginStatusBadge.svelte +14 -0
  242. package/dist/components/plugins/PluginStatusBadge.svelte.d.ts +8 -0
  243. package/dist/components/plugins/index.d.ts +4 -0
  244. package/dist/components/plugins/index.js +5 -0
  245. package/dist/components/vfs/LockConflictDialog.svelte +705 -0
  246. package/dist/components/vfs/LockConflictDialog.svelte.d.ts +21 -0
  247. package/dist/components/vfs/LockIndicator.svelte +194 -0
  248. package/dist/components/vfs/LockIndicator.svelte.d.ts +29 -0
  249. package/dist/components/vfs/LockOverlay.svelte +344 -0
  250. package/dist/components/vfs/LockOverlay.svelte.d.ts +17 -0
  251. package/dist/components/vfs/VersionConflictDialog.svelte +549 -0
  252. package/dist/components/vfs/VersionConflictDialog.svelte.d.ts +24 -0
  253. package/dist/components/vfs/index.d.ts +4 -0
  254. package/dist/components/vfs/index.js +5 -0
  255. package/dist/crdt/awareness.d.ts +42 -0
  256. package/dist/crdt/awareness.js +109 -0
  257. package/dist/crdt/document.d.ts +101 -0
  258. package/dist/crdt/document.js +187 -0
  259. package/dist/crdt/index.d.ts +9 -0
  260. package/dist/crdt/index.js +8 -0
  261. package/dist/crdt/provider.d.ts +85 -0
  262. package/dist/crdt/provider.js +150 -0
  263. package/dist/crdt/types.d.ts +61 -0
  264. package/dist/crdt/types.js +4 -0
  265. package/dist/crdt/undo.d.ts +34 -0
  266. package/dist/crdt/undo.js +70 -0
  267. package/dist/index.d.ts +277 -0
  268. package/dist/index.js +280 -0
  269. package/dist/plugins/index.d.ts +103 -0
  270. package/dist/plugins/index.js +153 -0
  271. package/dist/services/error-handling.d.ts +95 -0
  272. package/dist/services/error-handling.js +413 -0
  273. package/dist/services/ide-integration.d.ts +83 -0
  274. package/dist/services/ide-integration.js +367 -0
  275. package/dist/services/lsp-client.d.ts +69 -0
  276. package/dist/services/lsp-client.js +667 -0
  277. package/dist/services/mock-ai.d.ts +37 -0
  278. package/dist/services/mock-ai.js +318 -0
  279. package/dist/services/optimistic.d.ts +141 -0
  280. package/dist/services/optimistic.js +367 -0
  281. package/dist/services/vfs-client.d.ts +81 -0
  282. package/dist/services/vfs-client.js +348 -0
  283. package/dist/stores/agents.svelte.d.ts +85 -0
  284. package/dist/stores/agents.svelte.js +459 -0
  285. package/dist/stores/ai-persistence.svelte.d.ts +76 -0
  286. package/dist/stores/ai-persistence.svelte.js +334 -0
  287. package/dist/stores/ai.svelte.d.ts +140 -0
  288. package/dist/stores/ai.svelte.js +383 -0
  289. package/dist/stores/collaboration.svelte.d.ts +164 -0
  290. package/dist/stores/collaboration.svelte.js +334 -0
  291. package/dist/stores/editor.svelte.d.ts +131 -0
  292. package/dist/stores/editor.svelte.js +250 -0
  293. package/dist/stores/index.d.ts +10 -0
  294. package/dist/stores/index.js +29 -0
  295. package/dist/stores/layout.svelte.d.ts +171 -0
  296. package/dist/stores/layout.svelte.js +351 -0
  297. package/dist/stores/plugin.svelte.d.ts +121 -0
  298. package/dist/stores/plugin.svelte.js +410 -0
  299. package/dist/stores/vfs.svelte.d.ts +123 -0
  300. package/dist/stores/vfs.svelte.js +680 -0
  301. package/dist/styles/theme.css +623 -0
  302. package/dist/types/agents.d.ts +127 -0
  303. package/dist/types/agents.js +5 -0
  304. package/dist/types/ai.d.ts +137 -0
  305. package/dist/types/ai.js +4 -0
  306. package/dist/types/crdt.d.ts +222 -0
  307. package/dist/types/crdt.js +5 -0
  308. package/dist/types/editor.d.ts +52 -0
  309. package/dist/types/editor.js +18 -0
  310. package/dist/types/events.d.ts +133 -0
  311. package/dist/types/events.js +4 -0
  312. package/dist/types/filesystem.d.ts +77 -0
  313. package/dist/types/filesystem.js +4 -0
  314. package/dist/types/index.d.ts +9 -0
  315. package/dist/types/index.js +12 -0
  316. package/dist/types/lsp.d.ts +691 -0
  317. package/dist/types/lsp.js +108 -0
  318. package/dist/types/plugin.d.ts +239 -0
  319. package/dist/types/plugin.js +5 -0
  320. package/dist/types/vfs.d.ts +191 -0
  321. package/dist/types/vfs.js +18 -0
  322. package/dist/utils/format.d.ts +55 -0
  323. package/dist/utils/format.js +152 -0
  324. package/dist/utils/index.d.ts +3 -0
  325. package/dist/utils/index.js +4 -0
  326. package/dist/utils/keybindings.d.ts +33 -0
  327. package/dist/utils/keybindings.js +171 -0
  328. package/dist/utils/language.d.ts +27 -0
  329. package/dist/utils/language.js +222 -0
  330. package/package.json +178 -0
@@ -0,0 +1,29 @@
1
+ interface Props {
2
+ /** Additional CSS class */
3
+ class?: string;
4
+ }
5
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
6
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
7
+ $$bindings?: Bindings;
8
+ } & Exports;
9
+ (internal: unknown, props: Props & {
10
+ $$events?: Events;
11
+ $$slots?: Slots;
12
+ }): Exports & {
13
+ $set?: any;
14
+ $on?: any;
15
+ };
16
+ z_$$bindings?: Bindings;
17
+ }
18
+ declare const IDELayout: $$__sveltets_2_IsomorphicComponent<Props, {
19
+ [evt: string]: CustomEvent<any>;
20
+ }, {
21
+ 'activity-bar': {};
22
+ 'left-sidebar': {};
23
+ editor: {};
24
+ 'bottom-panel': {};
25
+ 'right-sidebar': {};
26
+ 'status-bar': {};
27
+ }, {}, "">;
28
+ type IDELayout = InstanceType<typeof IDELayout>;
29
+ export default IDELayout;
@@ -0,0 +1,511 @@
1
+ <script lang="ts">
2
+ /**
3
+ * StatusBar - Contextual IDE status bar
4
+ *
5
+ * Design principle: Show CONTEXT, not just counts
6
+ * - "Claude (editing)" not "2 agents"
7
+ * - "Lock expires 2:34" not "1 lock"
8
+ * - Communicate state at a glance
9
+ */
10
+
11
+ import { Icon, Tooltip, Spinner } from '../core';
12
+ import CognitiveLoadMeter from '../editor/CognitiveLoadMeter.svelte';
13
+ import type { ComplexityMetrics } from '../editor/core/complexity-analyzer';
14
+ import type { Agent, VFSFileLock } from '../../types';
15
+
16
+ interface Props {
17
+ /** Current git branch */
18
+ branch?: string;
19
+ /** List of agents */
20
+ agents?: Agent[];
21
+ /** List of active locks */
22
+ locks?: VFSFileLock[];
23
+ /** Current file path (to show relevant lock info) */
24
+ currentFilePath?: string;
25
+ /** Current user ID (to identify your locks) */
26
+ userId?: string;
27
+ /** Current cursor line */
28
+ cursorLine?: number;
29
+ /** Current cursor column */
30
+ cursorColumn?: number;
31
+ /** Current file language */
32
+ language?: string;
33
+ /** Current file encoding */
34
+ encoding?: string;
35
+ /** Current file line ending */
36
+ lineEnding?: 'LF' | 'CRLF';
37
+ /** Whether syncing with server */
38
+ syncing?: boolean;
39
+ /** Whether connected to server */
40
+ connected?: boolean;
41
+ /** Number of unsaved files */
42
+ dirtyCount?: number;
43
+ /** Current file complexity metrics */
44
+ complexityMetrics?: ComplexityMetrics | null;
45
+ /** Called when branch is clicked */
46
+ onBranchClick?: () => void;
47
+ /** Called when agents indicator is clicked */
48
+ onAgentsClick?: () => void;
49
+ /** Called when locks indicator is clicked */
50
+ onLocksClick?: () => void;
51
+ /** Called when language is clicked */
52
+ onLanguageClick?: () => void;
53
+ /** Called when complexity meter is clicked */
54
+ onComplexityClick?: () => void;
55
+ /** Additional CSS class */
56
+ class?: string;
57
+ }
58
+
59
+ let {
60
+ branch,
61
+ agents = [],
62
+ locks = [],
63
+ currentFilePath,
64
+ userId,
65
+ cursorLine = 1,
66
+ cursorColumn = 1,
67
+ language = 'Plain Text',
68
+ encoding = 'UTF-8',
69
+ lineEnding = 'LF',
70
+ syncing = false,
71
+ connected = true,
72
+ dirtyCount = 0,
73
+ complexityMetrics = null,
74
+ onBranchClick,
75
+ onAgentsClick,
76
+ onLocksClick,
77
+ onLanguageClick,
78
+ onComplexityClick,
79
+ class: className = ''
80
+ }: Props = $props();
81
+
82
+ // Agent context
83
+ let onlineAgents = $derived(agents.filter((a) => a.status === 'online' || a.status === 'busy'));
84
+ let busyAgents = $derived(agents.filter((a) => a.status === 'busy'));
85
+ let idleAgents = $derived(agents.filter((a) => a.status === 'online'));
86
+
87
+ // Find the "featured" busy agent to highlight
88
+ let featuredAgent = $derived.by(() => {
89
+ // Prefer agent working on current file
90
+ if (currentFilePath) {
91
+ const agentOnFile = busyAgents.find(a =>
92
+ a.currentTask?.files?.includes(currentFilePath)
93
+ );
94
+ if (agentOnFile) return agentOnFile;
95
+ }
96
+ // Otherwise show first busy agent
97
+ return busyAgents[0];
98
+ });
99
+
100
+ // Agent activity description
101
+ let agentActivityLabel = $derived.by(() => {
102
+ if (!featuredAgent) {
103
+ if (idleAgents.length === 0) return null;
104
+ if (idleAgents.length === 1) return `${idleAgents[0].name} idle`;
105
+ return `${idleAgents.length} agents idle`;
106
+ }
107
+
108
+ const phase = featuredAgent.currentTask?.progress?.phase;
109
+ let action = 'working';
110
+ switch (phase) {
111
+ case 'planning': action = 'planning'; break;
112
+ case 'implementing': action = 'coding'; break;
113
+ case 'testing': action = 'testing'; break;
114
+ case 'complete': action = 'done'; break;
115
+ }
116
+
117
+ const otherBusy = busyAgents.length - 1;
118
+ const suffix = otherBusy > 0 ? ` +${otherBusy}` : '';
119
+ return `${featuredAgent.name} (${action})${suffix}`;
120
+ });
121
+
122
+ // Lock context for current file
123
+ let currentFileLock = $derived(
124
+ currentFilePath ? locks.find(l => l.path === currentFilePath) : undefined
125
+ );
126
+ let isMyLock = $derived(
127
+ currentFileLock && userId ? currentFileLock.holder === userId : false
128
+ );
129
+ let otherLocks = $derived(
130
+ locks.filter(l => l.path !== currentFilePath)
131
+ );
132
+
133
+ // Lock expiry countdown
134
+ let lockExpiryText = $state<string | null>(null);
135
+
136
+ $effect(() => {
137
+ if (!currentFileLock) {
138
+ lockExpiryText = null;
139
+ return;
140
+ }
141
+
142
+ const updateExpiry = () => {
143
+ const expiresAt = new Date(currentFileLock!.expiresAt).getTime();
144
+ const now = Date.now();
145
+ const remaining = Math.max(0, expiresAt - now);
146
+
147
+ if (remaining === 0) {
148
+ lockExpiryText = 'expired';
149
+ return;
150
+ }
151
+
152
+ const minutes = Math.floor(remaining / 60000);
153
+ const seconds = Math.floor((remaining % 60000) / 1000);
154
+ lockExpiryText = `${minutes}:${seconds.toString().padStart(2, '0')}`;
155
+ };
156
+
157
+ updateExpiry();
158
+ const interval = setInterval(updateExpiry, 1000);
159
+ return () => clearInterval(interval);
160
+ });
161
+
162
+ // Lock status label
163
+ let lockLabel = $derived.by(() => {
164
+ if (currentFileLock) {
165
+ if (isMyLock) {
166
+ return `Locked by you (${lockExpiryText})`;
167
+ }
168
+ return `Locked by ${currentFileLock.holder}`;
169
+ }
170
+ if (otherLocks.length === 0) return null;
171
+ if (otherLocks.length === 1) {
172
+ return `1 file locked`;
173
+ }
174
+ return `${otherLocks.length} files locked`;
175
+ });
176
+
177
+ // Tooltip details
178
+ let agentTooltip = $derived.by(() => {
179
+ if (busyAgents.length === 0 && idleAgents.length === 0) {
180
+ return 'No agents online';
181
+ }
182
+ const parts: string[] = [];
183
+ if (busyAgents.length > 0) {
184
+ parts.push(`${busyAgents.length} working`);
185
+ }
186
+ if (idleAgents.length > 0) {
187
+ parts.push(`${idleAgents.length} idle`);
188
+ }
189
+ return parts.join(', ');
190
+ });
191
+
192
+ let lockTooltip = $derived.by(() => {
193
+ if (currentFileLock) {
194
+ if (isMyLock) {
195
+ return `You hold the lock. Expires in ${lockExpiryText}.`;
196
+ }
197
+ return `${currentFileLock.holder} is editing this file.`;
198
+ }
199
+ if (locks.length === 0) return 'No files locked';
200
+ const holders = [...new Set(locks.map(l => l.holder))];
201
+ return `Locked by: ${holders.join(', ')}`;
202
+ });
203
+ </script>
204
+
205
+ <footer class="status-bar {className}">
206
+ <!-- Left section: Git + Sync -->
207
+ <div class="status-bar__left">
208
+ {#if branch}
209
+ <Tooltip content="Current branch (click to switch)">
210
+ <button class="status-bar__item status-bar__item--clickable" onclick={onBranchClick}>
211
+ <Icon name="git-branch" size={12} />
212
+ <span>{branch}</span>
213
+ </button>
214
+ </Tooltip>
215
+ {/if}
216
+
217
+ {#if syncing}
218
+ <Tooltip content="Syncing changes...">
219
+ <span class="status-bar__item status-bar__item--syncing">
220
+ <Spinner size="xs" />
221
+ <span>Syncing</span>
222
+ </span>
223
+ </Tooltip>
224
+ {:else if dirtyCount > 0}
225
+ <Tooltip content="{dirtyCount} unsaved file{dirtyCount > 1 ? 's' : ''}">
226
+ <span class="status-bar__item status-bar__item--dirty">
227
+ <Icon name="circle" size={8} />
228
+ <span>{dirtyCount} unsaved</span>
229
+ </span>
230
+ </Tooltip>
231
+ {/if}
232
+ </div>
233
+
234
+ <!-- Center section: Contextual Agent & Lock Info -->
235
+ <div class="status-bar__center">
236
+ <!-- Agent activity (contextual) -->
237
+ {#if agentActivityLabel}
238
+ <Tooltip content={agentTooltip}>
239
+ <button
240
+ class="status-bar__item status-bar__item--clickable status-bar__agent-activity"
241
+ class:status-bar__agent-activity--busy={featuredAgent}
242
+ onclick={onAgentsClick}
243
+ >
244
+ {#if featuredAgent}
245
+ <!-- AI indicator for busy agent -->
246
+ <span class="status-bar__ai-dot" aria-hidden="true"></span>
247
+ {:else}
248
+ <Icon name="users" size={12} />
249
+ {/if}
250
+ <span>{agentActivityLabel}</span>
251
+ </button>
252
+ </Tooltip>
253
+ {/if}
254
+
255
+ <!-- Lock status (contextual with countdown) -->
256
+ {#if lockLabel}
257
+ <Tooltip content={lockTooltip}>
258
+ <button
259
+ class="status-bar__item status-bar__item--clickable status-bar__lock"
260
+ class:status-bar__lock--mine={isMyLock}
261
+ class:status-bar__lock--other={currentFileLock && !isMyLock}
262
+ onclick={onLocksClick}
263
+ >
264
+ <Icon name="lock" size={12} />
265
+ <span>{lockLabel}</span>
266
+ {#if isMyLock && lockExpiryText}
267
+ <span
268
+ class="status-bar__expiry"
269
+ class:status-bar__expiry--warning={lockExpiryText && parseInt(lockExpiryText) < 2}
270
+ >
271
+ {lockExpiryText}
272
+ </span>
273
+ {/if}
274
+ </button>
275
+ </Tooltip>
276
+ {/if}
277
+ </div>
278
+
279
+ <!-- Right section: Editor info -->
280
+ <div class="status-bar__right">
281
+ <!-- Cognitive complexity meter -->
282
+ {#if complexityMetrics}
283
+ <CognitiveLoadMeter
284
+ metrics={complexityMetrics}
285
+ showDetails={true}
286
+ onclick={onComplexityClick}
287
+ />
288
+ <span class="status-bar__separator"></span>
289
+ {/if}
290
+
291
+ <Tooltip content="Cursor position">
292
+ <span class="status-bar__item">
293
+ Ln {cursorLine}, Col {cursorColumn}
294
+ </span>
295
+ </Tooltip>
296
+
297
+ <span class="status-bar__separator"></span>
298
+
299
+ <Tooltip content="Line ending">
300
+ <span class="status-bar__item">
301
+ {lineEnding}
302
+ </span>
303
+ </Tooltip>
304
+
305
+ <Tooltip content="File encoding">
306
+ <span class="status-bar__item">
307
+ {encoding}
308
+ </span>
309
+ </Tooltip>
310
+
311
+ <Tooltip content="Language mode (click to change)">
312
+ <button class="status-bar__item status-bar__item--clickable" onclick={onLanguageClick}>
313
+ {language}
314
+ </button>
315
+ </Tooltip>
316
+
317
+ <span class="status-bar__separator"></span>
318
+
319
+ <Tooltip content={connected ? 'Connected to server' : 'Disconnected'}>
320
+ <span
321
+ class="status-bar__item status-bar__connection"
322
+ class:status-bar__connection--connected={connected}
323
+ class:status-bar__connection--disconnected={!connected}
324
+ >
325
+ {#if connected}
326
+ <Icon name="wifi" size={12} />
327
+ {:else}
328
+ <Icon name="wifi-off" size={12} />
329
+ {/if}
330
+ </span>
331
+ </Tooltip>
332
+ </div>
333
+ </footer>
334
+
335
+ <style>
336
+ .status-bar {
337
+ display: flex;
338
+ align-items: center;
339
+ justify-content: space-between;
340
+ height: var(--ide-status-bar-height, 24px);
341
+ padding: 0 var(--ide-spacing-sm);
342
+ background: var(--ide-bg-tertiary);
343
+ border-top: 1px solid var(--ide-border);
344
+ font-size: var(--ide-font-size-xs);
345
+ color: var(--ide-text-secondary);
346
+ user-select: none;
347
+ }
348
+
349
+ .status-bar__left,
350
+ .status-bar__center,
351
+ .status-bar__right {
352
+ display: flex;
353
+ align-items: center;
354
+ gap: var(--ide-spacing-sm);
355
+ }
356
+
357
+ .status-bar__left {
358
+ flex: 1;
359
+ justify-content: flex-start;
360
+ }
361
+
362
+ .status-bar__center {
363
+ flex: 0 0 auto;
364
+ gap: var(--ide-spacing-md);
365
+ }
366
+
367
+ .status-bar__right {
368
+ flex: 1;
369
+ justify-content: flex-end;
370
+ }
371
+
372
+ .status-bar__item {
373
+ display: flex;
374
+ align-items: center;
375
+ gap: 4px;
376
+ padding: 2px var(--ide-spacing-xs);
377
+ border-radius: var(--ide-radius-sm);
378
+ transition: all var(--ide-transition-fast);
379
+ min-height: 20px;
380
+ }
381
+
382
+ .status-bar__item--clickable {
383
+ background: transparent;
384
+ border: none;
385
+ font: inherit;
386
+ color: inherit;
387
+ cursor: pointer;
388
+ }
389
+
390
+ .status-bar__item--clickable:hover {
391
+ background: var(--ide-bg-hover);
392
+ color: var(--ide-text-primary);
393
+ }
394
+
395
+ /* Focus states for accessibility */
396
+ .status-bar__item--clickable:focus-visible {
397
+ outline: 2px solid var(--ide-focus-ring);
398
+ outline-offset: 1px;
399
+ }
400
+
401
+ .status-bar__item--syncing {
402
+ color: var(--ide-info);
403
+ }
404
+
405
+ .status-bar__item--dirty {
406
+ color: var(--ide-warning);
407
+ }
408
+
409
+ .status-bar__item--dirty :global(.icon) {
410
+ fill: currentColor;
411
+ }
412
+
413
+ /* AI Activity Indicator */
414
+ .status-bar__agent-activity {
415
+ font-weight: 500;
416
+ }
417
+
418
+ .status-bar__agent-activity--busy {
419
+ color: var(--ide-agent-ai-primary, var(--ide-info));
420
+ }
421
+
422
+ .status-bar__ai-dot {
423
+ width: 8px;
424
+ height: 8px;
425
+ border-radius: 50%;
426
+ background: linear-gradient(
427
+ 135deg,
428
+ var(--ide-agent-ai-primary) 0%,
429
+ var(--color-nocturnium-flame) 50%,
430
+ var(--ide-agent-ai-secondary) 100%
431
+ );
432
+ background-size: 200% 200%;
433
+ animation: ai-dot-shimmer 2s ease-in-out infinite;
434
+ box-shadow: 0 0 6px color-mix(in srgb, var(--ide-agent-ai-primary) 50%, transparent);
435
+ }
436
+
437
+ @keyframes ai-dot-shimmer {
438
+ 0%, 100% { background-position: 0% 50%; }
439
+ 50% { background-position: 100% 50%; }
440
+ }
441
+
442
+ /* Lock Status */
443
+ .status-bar__lock {
444
+ font-weight: 500;
445
+ }
446
+
447
+ .status-bar__lock--mine {
448
+ color: var(--ide-lock-owned, var(--ide-success));
449
+ }
450
+
451
+ .status-bar__lock--other {
452
+ color: var(--ide-lock-other, var(--ide-warning));
453
+ }
454
+
455
+ /* Lock Expiry Countdown */
456
+ .status-bar__expiry {
457
+ font-family: var(--ide-font-mono);
458
+ font-size: 10px;
459
+ padding: 1px 4px;
460
+ border-radius: var(--ide-radius-sm);
461
+ background: color-mix(in srgb, var(--ide-lock-owned) 20%, transparent);
462
+ color: var(--ide-lock-owned);
463
+ }
464
+
465
+ .status-bar__expiry--warning {
466
+ background: color-mix(in srgb, var(--ide-warning) 20%, transparent);
467
+ color: var(--ide-warning);
468
+ animation: expiry-pulse 1s ease-in-out infinite;
469
+ }
470
+
471
+ @keyframes expiry-pulse {
472
+ 0%, 100% { opacity: 1; }
473
+ 50% { opacity: 0.6; }
474
+ }
475
+
476
+ .status-bar__separator {
477
+ width: 1px;
478
+ height: 12px;
479
+ background: var(--ide-border);
480
+ }
481
+
482
+ .status-bar__connection {
483
+ padding: 2px 4px;
484
+ }
485
+
486
+ .status-bar__connection--connected {
487
+ color: var(--ide-success);
488
+ }
489
+
490
+ .status-bar__connection--disconnected {
491
+ color: var(--ide-error);
492
+ animation: ide-pulse 1s infinite;
493
+ }
494
+
495
+ /* Responsive: hide less important info on narrow screens */
496
+ @media (max-width: 600px) {
497
+ .status-bar__right > :nth-child(n+3):nth-child(-n+5) {
498
+ display: none;
499
+ }
500
+ }
501
+
502
+ @media (max-width: 400px) {
503
+ .status-bar__left {
504
+ display: none;
505
+ }
506
+ .status-bar__center {
507
+ flex: 1;
508
+ justify-content: flex-start;
509
+ }
510
+ }
511
+ </style>
@@ -0,0 +1,47 @@
1
+ import type { ComplexityMetrics } from '../editor/core/complexity-analyzer';
2
+ import type { Agent, VFSFileLock } from '../../types';
3
+ interface Props {
4
+ /** Current git branch */
5
+ branch?: string;
6
+ /** List of agents */
7
+ agents?: Agent[];
8
+ /** List of active locks */
9
+ locks?: VFSFileLock[];
10
+ /** Current file path (to show relevant lock info) */
11
+ currentFilePath?: string;
12
+ /** Current user ID (to identify your locks) */
13
+ userId?: string;
14
+ /** Current cursor line */
15
+ cursorLine?: number;
16
+ /** Current cursor column */
17
+ cursorColumn?: number;
18
+ /** Current file language */
19
+ language?: string;
20
+ /** Current file encoding */
21
+ encoding?: string;
22
+ /** Current file line ending */
23
+ lineEnding?: 'LF' | 'CRLF';
24
+ /** Whether syncing with server */
25
+ syncing?: boolean;
26
+ /** Whether connected to server */
27
+ connected?: boolean;
28
+ /** Number of unsaved files */
29
+ dirtyCount?: number;
30
+ /** Current file complexity metrics */
31
+ complexityMetrics?: ComplexityMetrics | null;
32
+ /** Called when branch is clicked */
33
+ onBranchClick?: () => void;
34
+ /** Called when agents indicator is clicked */
35
+ onAgentsClick?: () => void;
36
+ /** Called when locks indicator is clicked */
37
+ onLocksClick?: () => void;
38
+ /** Called when language is clicked */
39
+ onLanguageClick?: () => void;
40
+ /** Called when complexity meter is clicked */
41
+ onComplexityClick?: () => void;
42
+ /** Additional CSS class */
43
+ class?: string;
44
+ }
45
+ declare const StatusBar: import("svelte").Component<Props, {}, "">;
46
+ type StatusBar = ReturnType<typeof StatusBar>;
47
+ export default StatusBar;
@@ -0,0 +1,2 @@
1
+ export { default as IDELayout } from './IDELayout.svelte';
2
+ export { default as StatusBar } from './StatusBar.svelte';
@@ -0,0 +1,3 @@
1
+ // Layout components
2
+ export { default as IDELayout } from './IDELayout.svelte';
3
+ export { default as StatusBar } from './StatusBar.svelte';