@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.
- package/LICENSE +21 -0
- package/README.md +251 -0
- package/dist/components/agents/AgentActivityPanel.svelte +565 -0
- package/dist/components/agents/AgentActivityPanel.svelte.d.ts +24 -0
- package/dist/components/agents/AgentAvatar.svelte +417 -0
- package/dist/components/agents/AgentAvatar.svelte.d.ts +23 -0
- package/dist/components/agents/AgentCursor.svelte +224 -0
- package/dist/components/agents/AgentCursor.svelte.d.ts +35 -0
- package/dist/components/agents/AgentPresenceBar.svelte +261 -0
- package/dist/components/agents/AgentPresenceBar.svelte.d.ts +20 -0
- package/dist/components/agents/index.d.ts +4 -0
- package/dist/components/agents/index.js +5 -0
- package/dist/components/ai/AIConversationList.svelte +524 -0
- package/dist/components/ai/AIConversationList.svelte.d.ts +17 -0
- package/dist/components/ai/AIEditPreview.svelte +132 -0
- package/dist/components/ai/AIEditPreview.svelte.d.ts +8 -0
- package/dist/components/ai/AIInlineEdit.svelte +155 -0
- package/dist/components/ai/AIInlineEdit.svelte.d.ts +10 -0
- package/dist/components/ai/AIMessage.svelte +239 -0
- package/dist/components/ai/AIMessage.svelte.d.ts +13 -0
- package/dist/components/ai/AIMessageActions.svelte +176 -0
- package/dist/components/ai/AIMessageActions.svelte.d.ts +12 -0
- package/dist/components/ai/AIMessageContent.svelte +355 -0
- package/dist/components/ai/AIMessageContent.svelte.d.ts +7 -0
- package/dist/components/ai/AIPanel.svelte +561 -0
- package/dist/components/ai/AIPanel.svelte.d.ts +7 -0
- package/dist/components/ai/AISuggestionWidget.svelte +132 -0
- package/dist/components/ai/AISuggestionWidget.svelte.d.ts +10 -0
- package/dist/components/ai/AIToolCallDisplay.svelte +317 -0
- package/dist/components/ai/AIToolCallDisplay.svelte.d.ts +12 -0
- package/dist/components/ai/index.d.ts +9 -0
- package/dist/components/ai/index.js +10 -0
- package/dist/components/core/Avatar.svelte +110 -0
- package/dist/components/core/Avatar.svelte.d.ts +12 -0
- package/dist/components/core/Badge.svelte +98 -0
- package/dist/components/core/Badge.svelte.d.ts +11 -0
- package/dist/components/core/Button.svelte +175 -0
- package/dist/components/core/Button.svelte.d.ts +18 -0
- package/dist/components/core/ConnectionStatus.svelte +294 -0
- package/dist/components/core/ConnectionStatus.svelte.d.ts +20 -0
- package/dist/components/core/ContextMenu.svelte +176 -0
- package/dist/components/core/ContextMenu.svelte.d.ts +19 -0
- package/dist/components/core/ErrorBoundary.svelte +277 -0
- package/dist/components/core/ErrorBoundary.svelte.d.ts +23 -0
- package/dist/components/core/Icon.svelte +107 -0
- package/dist/components/core/Icon.svelte.d.ts +8 -0
- package/dist/components/core/Input.svelte +138 -0
- package/dist/components/core/Input.svelte.d.ts +20 -0
- package/dist/components/core/Kbd.svelte +34 -0
- package/dist/components/core/Kbd.svelte.d.ts +7 -0
- package/dist/components/core/ResizeHandle.svelte +200 -0
- package/dist/components/core/ResizeHandle.svelte.d.ts +23 -0
- package/dist/components/core/Spinner.svelte +35 -0
- package/dist/components/core/Spinner.svelte.d.ts +7 -0
- package/dist/components/core/Textarea.svelte +112 -0
- package/dist/components/core/Textarea.svelte.d.ts +18 -0
- package/dist/components/core/Tooltip.svelte +103 -0
- package/dist/components/core/Tooltip.svelte.d.ts +11 -0
- package/dist/components/core/index.d.ts +13 -0
- package/dist/components/core/index.js +14 -0
- package/dist/components/editor/AIFocusLayer.svelte +430 -0
- package/dist/components/editor/AIFocusLayer.svelte.d.ts +32 -0
- package/dist/components/editor/Breadcrumbs.svelte +435 -0
- package/dist/components/editor/Breadcrumbs.svelte.d.ts +33 -0
- package/dist/components/editor/BreakpointLayer.svelte +642 -0
- package/dist/components/editor/BreakpointLayer.svelte.d.ts +20 -0
- package/dist/components/editor/CognitiveLoadMeter.svelte +324 -0
- package/dist/components/editor/CognitiveLoadMeter.svelte.d.ts +18 -0
- package/dist/components/editor/CollaborativeEditor.svelte +218 -0
- package/dist/components/editor/CollaborativeEditor.svelte.d.ts +32 -0
- package/dist/components/editor/CommandPalette.svelte +434 -0
- package/dist/components/editor/CommandPalette.svelte.d.ts +11 -0
- package/dist/components/editor/ComplexityLayer.svelte +293 -0
- package/dist/components/editor/ComplexityLayer.svelte.d.ts +23 -0
- package/dist/components/editor/ConflictZoneLayer.svelte +441 -0
- package/dist/components/editor/ConflictZoneLayer.svelte.d.ts +25 -0
- package/dist/components/editor/ContextLens.svelte +262 -0
- package/dist/components/editor/ContextLens.svelte.d.ts +27 -0
- package/dist/components/editor/CustomEditor.svelte +1242 -0
- package/dist/components/editor/CustomEditor.svelte.d.ts +37 -0
- package/dist/components/editor/DebugConsole.svelte +646 -0
- package/dist/components/editor/DebugConsole.svelte.d.ts +41 -0
- package/dist/components/editor/EchoCursorLayer.svelte +363 -0
- package/dist/components/editor/EchoCursorLayer.svelte.d.ts +24 -0
- package/dist/components/editor/Editor.svelte +61 -0
- package/dist/components/editor/Editor.svelte.d.ts +22 -0
- package/dist/components/editor/EditorGutter.svelte +119 -0
- package/dist/components/editor/EditorGutter.svelte.d.ts +19 -0
- package/dist/components/editor/EditorLines.svelte +182 -0
- package/dist/components/editor/EditorLines.svelte.d.ts +43 -0
- package/dist/components/editor/EditorPane.svelte +134 -0
- package/dist/components/editor/EditorPane.svelte.d.ts +9 -0
- package/dist/components/editor/EditorSelections.svelte +186 -0
- package/dist/components/editor/EditorSelections.svelte.d.ts +25 -0
- package/dist/components/editor/EditorTabs.svelte +170 -0
- package/dist/components/editor/EditorTabs.svelte.d.ts +12 -0
- package/dist/components/editor/FileExplorer.svelte +811 -0
- package/dist/components/editor/FileExplorer.svelte.d.ts +67 -0
- package/dist/components/editor/FileIcon.svelte +110 -0
- package/dist/components/editor/FileIcon.svelte.d.ts +10 -0
- package/dist/components/editor/FindReplace.svelte +448 -0
- package/dist/components/editor/FindReplace.svelte.d.ts +40 -0
- package/dist/components/editor/GhostBracketLayer.svelte +391 -0
- package/dist/components/editor/GhostBracketLayer.svelte.d.ts +24 -0
- package/dist/components/editor/GitBlameLayer.svelte +436 -0
- package/dist/components/editor/GitBlameLayer.svelte.d.ts +18 -0
- package/dist/components/editor/InlineDiagnosticsLayer.svelte +540 -0
- package/dist/components/editor/InlineDiagnosticsLayer.svelte.d.ts +35 -0
- package/dist/components/editor/InlineDiffLayer.svelte +337 -0
- package/dist/components/editor/InlineDiffLayer.svelte.d.ts +31 -0
- package/dist/components/editor/MinimalEditor.svelte +75 -0
- package/dist/components/editor/MinimalEditor.svelte.d.ts +6 -0
- package/dist/components/editor/MinimalEditor2.svelte +84 -0
- package/dist/components/editor/MinimalEditor2.svelte.d.ts +6 -0
- package/dist/components/editor/Minimap.svelte +327 -0
- package/dist/components/editor/Minimap.svelte.d.ts +34 -0
- package/dist/components/editor/PluginPreviewSandbox.svelte +793 -0
- package/dist/components/editor/PluginPreviewSandbox.svelte.d.ts +49 -0
- package/dist/components/editor/ProblemsPanel.svelte +628 -0
- package/dist/components/editor/ProblemsPanel.svelte.d.ts +25 -0
- package/dist/components/editor/QuickActionsMenu.svelte +403 -0
- package/dist/components/editor/QuickActionsMenu.svelte.d.ts +18 -0
- package/dist/components/editor/SnippetPalette.svelte +530 -0
- package/dist/components/editor/SnippetPalette.svelte.d.ts +16 -0
- package/dist/components/editor/StructureMap.svelte +431 -0
- package/dist/components/editor/StructureMap.svelte.d.ts +37 -0
- package/dist/components/editor/SymbolOutline.svelte +722 -0
- package/dist/components/editor/SymbolOutline.svelte.d.ts +44 -0
- package/dist/components/editor/TimelineScrubber.svelte +470 -0
- package/dist/components/editor/TimelineScrubber.svelte.d.ts +40 -0
- package/dist/components/editor/TokenRenderer.svelte +69 -0
- package/dist/components/editor/TokenRenderer.svelte.d.ts +15 -0
- package/dist/components/editor/constants.d.ts +32 -0
- package/dist/components/editor/constants.js +36 -0
- package/dist/components/editor/core/ai-awareness.d.ts +176 -0
- package/dist/components/editor/core/ai-awareness.js +210 -0
- package/dist/components/editor/core/bracket-healer.d.ts +189 -0
- package/dist/components/editor/core/bracket-healer.js +406 -0
- package/dist/components/editor/core/breakpoints.d.ts +203 -0
- package/dist/components/editor/core/breakpoints.js +414 -0
- package/dist/components/editor/core/commands.d.ts +108 -0
- package/dist/components/editor/core/commands.js +246 -0
- package/dist/components/editor/core/complexity-analyzer.d.ts +123 -0
- package/dist/components/editor/core/complexity-analyzer.js +376 -0
- package/dist/components/editor/core/conflict-predictor.d.ts +135 -0
- package/dist/components/editor/core/conflict-predictor.js +316 -0
- package/dist/components/editor/core/crdt-binding.d.ts +118 -0
- package/dist/components/editor/core/crdt-binding.js +286 -0
- package/dist/components/editor/core/diagnostics.d.ts +210 -0
- package/dist/components/editor/core/diagnostics.js +335 -0
- package/dist/components/editor/core/echo-cursor.d.ts +201 -0
- package/dist/components/editor/core/echo-cursor.js +267 -0
- package/dist/components/editor/core/folding.d.ts +124 -0
- package/dist/components/editor/core/folding.js +672 -0
- package/dist/components/editor/core/ghost-pair.d.ts +122 -0
- package/dist/components/editor/core/ghost-pair.js +221 -0
- package/dist/components/editor/core/git-blame.d.ts +170 -0
- package/dist/components/editor/core/git-blame.js +324 -0
- package/dist/components/editor/core/index.d.ts +26 -0
- package/dist/components/editor/core/index.js +24 -0
- package/dist/components/editor/core/keybindings.d.ts +79 -0
- package/dist/components/editor/core/keybindings.js +357 -0
- package/dist/components/editor/core/multi-cursor.d.ts +196 -0
- package/dist/components/editor/core/multi-cursor.js +521 -0
- package/dist/components/editor/core/navigation.d.ts +107 -0
- package/dist/components/editor/core/navigation.js +408 -0
- package/dist/components/editor/core/quick-actions.d.ts +189 -0
- package/dist/components/editor/core/quick-actions.js +427 -0
- package/dist/components/editor/core/search.d.ts +88 -0
- package/dist/components/editor/core/search.js +192 -0
- package/dist/components/editor/core/semantic-analyzer.d.ts +77 -0
- package/dist/components/editor/core/semantic-analyzer.js +424 -0
- package/dist/components/editor/core/snippet-manager.d.ts +202 -0
- package/dist/components/editor/core/snippet-manager.js +565 -0
- package/dist/components/editor/core/state.d.ts +367 -0
- package/dist/components/editor/core/state.js +900 -0
- package/dist/components/editor/core/timeline.d.ts +204 -0
- package/dist/components/editor/core/timeline.js +349 -0
- package/dist/components/editor/editor-find.d.ts +56 -0
- package/dist/components/editor/editor-find.js +148 -0
- package/dist/components/editor/editor-input.d.ts +77 -0
- package/dist/components/editor/editor-input.js +445 -0
- package/dist/components/editor/editor-multicursor.d.ts +21 -0
- package/dist/components/editor/editor-multicursor.js +196 -0
- package/dist/components/editor/editor-scroll.d.ts +14 -0
- package/dist/components/editor/editor-scroll.js +34 -0
- package/dist/components/editor/index.d.ts +15 -0
- package/dist/components/editor/index.js +21 -0
- package/dist/components/editor/languages.d.ts +62 -0
- package/dist/components/editor/languages.js +285 -0
- package/dist/components/editor/theme.d.ts +88 -0
- package/dist/components/editor/theme.js +139 -0
- package/dist/components/editor/tokenizer/base.d.ts +40 -0
- package/dist/components/editor/tokenizer/base.js +203 -0
- package/dist/components/editor/tokenizer/index.d.ts +56 -0
- package/dist/components/editor/tokenizer/index.js +215 -0
- package/dist/components/editor/tokenizer/languages/css.d.ts +17 -0
- package/dist/components/editor/tokenizer/languages/css.js +194 -0
- package/dist/components/editor/tokenizer/languages/go.d.ts +17 -0
- package/dist/components/editor/tokenizer/languages/go.js +220 -0
- package/dist/components/editor/tokenizer/languages/html.d.ts +24 -0
- package/dist/components/editor/tokenizer/languages/html.js +145 -0
- package/dist/components/editor/tokenizer/languages/javascript.d.ts +56 -0
- package/dist/components/editor/tokenizer/languages/javascript.js +452 -0
- package/dist/components/editor/tokenizer/languages/json.d.ts +12 -0
- package/dist/components/editor/tokenizer/languages/json.js +91 -0
- package/dist/components/editor/tokenizer/languages/markdown.d.ts +16 -0
- package/dist/components/editor/tokenizer/languages/markdown.js +156 -0
- package/dist/components/editor/tokenizer/languages/python.d.ts +20 -0
- package/dist/components/editor/tokenizer/languages/python.js +227 -0
- package/dist/components/editor/tokenizer/languages/svelte.d.ts +40 -0
- package/dist/components/editor/tokenizer/languages/svelte.js +326 -0
- package/dist/components/editor/tokenizer/types.d.ts +86 -0
- package/dist/components/editor/tokenizer/types.js +4 -0
- package/dist/components/layout/IDELayout.svelte +274 -0
- package/dist/components/layout/IDELayout.svelte.d.ts +29 -0
- package/dist/components/layout/StatusBar.svelte +511 -0
- package/dist/components/layout/StatusBar.svelte.d.ts +47 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.js +3 -0
- package/dist/components/lsp/AutocompleteWidget.svelte +364 -0
- package/dist/components/lsp/AutocompleteWidget.svelte.d.ts +33 -0
- package/dist/components/lsp/DiagnosticMarker.svelte +166 -0
- package/dist/components/lsp/DiagnosticMarker.svelte.d.ts +19 -0
- package/dist/components/lsp/DiagnosticsPanel.svelte +388 -0
- package/dist/components/lsp/DiagnosticsPanel.svelte.d.ts +21 -0
- package/dist/components/lsp/HoverTooltip.svelte +274 -0
- package/dist/components/lsp/HoverTooltip.svelte.d.ts +24 -0
- package/dist/components/lsp/LSPEditor.svelte +486 -0
- package/dist/components/lsp/LSPEditor.svelte.d.ts +39 -0
- package/dist/components/lsp/SignatureHelpWidget.svelte +216 -0
- package/dist/components/lsp/SignatureHelpWidget.svelte.d.ts +22 -0
- package/dist/components/lsp/index.d.ts +6 -0
- package/dist/components/lsp/index.js +7 -0
- package/dist/components/plugins/PluginCard.svelte +153 -0
- package/dist/components/plugins/PluginCard.svelte.d.ts +19 -0
- package/dist/components/plugins/PluginPanel.svelte +280 -0
- package/dist/components/plugins/PluginPanel.svelte.d.ts +8 -0
- package/dist/components/plugins/PluginProposalForm.svelte +250 -0
- package/dist/components/plugins/PluginProposalForm.svelte.d.ts +6 -0
- package/dist/components/plugins/PluginStatusBadge.svelte +14 -0
- package/dist/components/plugins/PluginStatusBadge.svelte.d.ts +8 -0
- package/dist/components/plugins/index.d.ts +4 -0
- package/dist/components/plugins/index.js +5 -0
- package/dist/components/vfs/LockConflictDialog.svelte +705 -0
- package/dist/components/vfs/LockConflictDialog.svelte.d.ts +21 -0
- package/dist/components/vfs/LockIndicator.svelte +194 -0
- package/dist/components/vfs/LockIndicator.svelte.d.ts +29 -0
- package/dist/components/vfs/LockOverlay.svelte +344 -0
- package/dist/components/vfs/LockOverlay.svelte.d.ts +17 -0
- package/dist/components/vfs/VersionConflictDialog.svelte +549 -0
- package/dist/components/vfs/VersionConflictDialog.svelte.d.ts +24 -0
- package/dist/components/vfs/index.d.ts +4 -0
- package/dist/components/vfs/index.js +5 -0
- package/dist/crdt/awareness.d.ts +42 -0
- package/dist/crdt/awareness.js +109 -0
- package/dist/crdt/document.d.ts +101 -0
- package/dist/crdt/document.js +187 -0
- package/dist/crdt/index.d.ts +9 -0
- package/dist/crdt/index.js +8 -0
- package/dist/crdt/provider.d.ts +85 -0
- package/dist/crdt/provider.js +150 -0
- package/dist/crdt/types.d.ts +61 -0
- package/dist/crdt/types.js +4 -0
- package/dist/crdt/undo.d.ts +34 -0
- package/dist/crdt/undo.js +70 -0
- package/dist/index.d.ts +277 -0
- package/dist/index.js +280 -0
- package/dist/plugins/index.d.ts +103 -0
- package/dist/plugins/index.js +153 -0
- package/dist/services/error-handling.d.ts +95 -0
- package/dist/services/error-handling.js +413 -0
- package/dist/services/ide-integration.d.ts +83 -0
- package/dist/services/ide-integration.js +367 -0
- package/dist/services/lsp-client.d.ts +69 -0
- package/dist/services/lsp-client.js +667 -0
- package/dist/services/mock-ai.d.ts +37 -0
- package/dist/services/mock-ai.js +318 -0
- package/dist/services/optimistic.d.ts +141 -0
- package/dist/services/optimistic.js +367 -0
- package/dist/services/vfs-client.d.ts +81 -0
- package/dist/services/vfs-client.js +348 -0
- package/dist/stores/agents.svelte.d.ts +85 -0
- package/dist/stores/agents.svelte.js +459 -0
- package/dist/stores/ai-persistence.svelte.d.ts +76 -0
- package/dist/stores/ai-persistence.svelte.js +334 -0
- package/dist/stores/ai.svelte.d.ts +140 -0
- package/dist/stores/ai.svelte.js +383 -0
- package/dist/stores/collaboration.svelte.d.ts +164 -0
- package/dist/stores/collaboration.svelte.js +334 -0
- package/dist/stores/editor.svelte.d.ts +131 -0
- package/dist/stores/editor.svelte.js +250 -0
- package/dist/stores/index.d.ts +10 -0
- package/dist/stores/index.js +29 -0
- package/dist/stores/layout.svelte.d.ts +171 -0
- package/dist/stores/layout.svelte.js +351 -0
- package/dist/stores/plugin.svelte.d.ts +121 -0
- package/dist/stores/plugin.svelte.js +410 -0
- package/dist/stores/vfs.svelte.d.ts +123 -0
- package/dist/stores/vfs.svelte.js +680 -0
- package/dist/styles/theme.css +623 -0
- package/dist/types/agents.d.ts +127 -0
- package/dist/types/agents.js +5 -0
- package/dist/types/ai.d.ts +137 -0
- package/dist/types/ai.js +4 -0
- package/dist/types/crdt.d.ts +222 -0
- package/dist/types/crdt.js +5 -0
- package/dist/types/editor.d.ts +52 -0
- package/dist/types/editor.js +18 -0
- package/dist/types/events.d.ts +133 -0
- package/dist/types/events.js +4 -0
- package/dist/types/filesystem.d.ts +77 -0
- package/dist/types/filesystem.js +4 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.js +12 -0
- package/dist/types/lsp.d.ts +691 -0
- package/dist/types/lsp.js +108 -0
- package/dist/types/plugin.d.ts +239 -0
- package/dist/types/plugin.js +5 -0
- package/dist/types/vfs.d.ts +191 -0
- package/dist/types/vfs.js +18 -0
- package/dist/utils/format.d.ts +55 -0
- package/dist/utils/format.js +152 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/keybindings.d.ts +33 -0
- package/dist/utils/keybindings.js +171 -0
- package/dist/utils/language.d.ts +27 -0
- package/dist/utils/language.js +222 -0
- package/package.json +178 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
interface DiffHunk {
|
|
2
|
+
type: 'add' | 'remove' | 'unchanged';
|
|
3
|
+
content: string;
|
|
4
|
+
lineNumber: number;
|
|
5
|
+
}
|
|
6
|
+
interface PluginDefinition {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
icon?: string;
|
|
11
|
+
transform: (code: string) => string | Promise<string>;
|
|
12
|
+
}
|
|
13
|
+
interface PluginTransform {
|
|
14
|
+
/** Transform ID */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Plugin name */
|
|
17
|
+
pluginName: string;
|
|
18
|
+
/** Transform description */
|
|
19
|
+
description: string;
|
|
20
|
+
/** Original code */
|
|
21
|
+
original: string;
|
|
22
|
+
/** Transformed code */
|
|
23
|
+
transformed: string;
|
|
24
|
+
/** Diff hunks */
|
|
25
|
+
diffs: DiffHunk[];
|
|
26
|
+
/** Whether transform is valid */
|
|
27
|
+
isValid: boolean;
|
|
28
|
+
/** Error message if invalid */
|
|
29
|
+
error?: string;
|
|
30
|
+
/** Execution time in ms */
|
|
31
|
+
executionTime: number;
|
|
32
|
+
}
|
|
33
|
+
interface Props {
|
|
34
|
+
/** Code to transform */
|
|
35
|
+
code: string;
|
|
36
|
+
/** Language for syntax highlighting */
|
|
37
|
+
language?: string;
|
|
38
|
+
/** Available plugins */
|
|
39
|
+
plugins?: PluginDefinition[];
|
|
40
|
+
/** Whether sandbox is visible */
|
|
41
|
+
visible?: boolean;
|
|
42
|
+
/** Callback when transform is applied */
|
|
43
|
+
onApply?: (transform: PluginTransform) => void;
|
|
44
|
+
/** Callback when closed */
|
|
45
|
+
onClose?: () => void;
|
|
46
|
+
}
|
|
47
|
+
declare const PluginPreviewSandbox: import("svelte").Component<Props, {}, "">;
|
|
48
|
+
type PluginPreviewSandbox = ReturnType<typeof PluginPreviewSandbox>;
|
|
49
|
+
export default PluginPreviewSandbox;
|
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Problems Panel
|
|
4
|
+
*
|
|
5
|
+
* Lists all diagnostics across files with:
|
|
6
|
+
* - Filtering by severity, source, file
|
|
7
|
+
* - Grouping by file
|
|
8
|
+
* - Quick navigation
|
|
9
|
+
* - Batch actions
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type {
|
|
13
|
+
DiagnosticsManager,
|
|
14
|
+
Diagnostic,
|
|
15
|
+
DiagnosticSeverity
|
|
16
|
+
} from './core/diagnostics';
|
|
17
|
+
import {
|
|
18
|
+
getSeverityIcon,
|
|
19
|
+
getSeverityColor,
|
|
20
|
+
getSeverityLabel,
|
|
21
|
+
sortDiagnostics
|
|
22
|
+
} from './core/diagnostics';
|
|
23
|
+
|
|
24
|
+
interface Props {
|
|
25
|
+
/** Diagnostics manager */
|
|
26
|
+
manager: DiagnosticsManager;
|
|
27
|
+
/** Whether panel is open */
|
|
28
|
+
open?: boolean;
|
|
29
|
+
/** Panel height */
|
|
30
|
+
height?: number;
|
|
31
|
+
/** Callback when diagnostic is clicked */
|
|
32
|
+
onNavigate?: (filePath: string, diagnostic: Diagnostic) => void;
|
|
33
|
+
/** Callback when panel is closed */
|
|
34
|
+
onClose?: () => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let {
|
|
38
|
+
manager,
|
|
39
|
+
open = true,
|
|
40
|
+
height = 200,
|
|
41
|
+
onNavigate,
|
|
42
|
+
onClose
|
|
43
|
+
}: Props = $props();
|
|
44
|
+
|
|
45
|
+
let allDiagnostics = $state<Map<string, Diagnostic[]>>(new Map());
|
|
46
|
+
let searchQuery = $state('');
|
|
47
|
+
let severityFilter = $state<DiagnosticSeverity[]>(['error', 'warning', 'info', 'hint']);
|
|
48
|
+
let sourceFilter = $state<string | null>(null);
|
|
49
|
+
let collapsedFiles = $state<Set<string>>(new Set());
|
|
50
|
+
let groupByFile = $state(true);
|
|
51
|
+
|
|
52
|
+
// Subscribe to manager updates
|
|
53
|
+
$effect(() => {
|
|
54
|
+
const unsubscribe = manager.subscribe(() => {
|
|
55
|
+
allDiagnostics = manager.getAllDiagnostics();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// Initial load
|
|
59
|
+
allDiagnostics = manager.getAllDiagnostics();
|
|
60
|
+
|
|
61
|
+
return unsubscribe;
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// Get all unique sources
|
|
65
|
+
const allSources = $derived(() => {
|
|
66
|
+
const sources = new Set<string>();
|
|
67
|
+
for (const diagnostics of allDiagnostics.values()) {
|
|
68
|
+
for (const d of diagnostics) {
|
|
69
|
+
sources.add(d.source);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return [...sources].sort();
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Filter diagnostics
|
|
76
|
+
const filteredDiagnostics = $derived(() => {
|
|
77
|
+
const filtered = new Map<string, Diagnostic[]>();
|
|
78
|
+
|
|
79
|
+
for (const [filePath, diagnostics] of allDiagnostics) {
|
|
80
|
+
const filteredList = diagnostics.filter((d) => {
|
|
81
|
+
// Severity filter
|
|
82
|
+
if (!severityFilter.includes(d.severity)) return false;
|
|
83
|
+
|
|
84
|
+
// Source filter
|
|
85
|
+
if (sourceFilter && d.source !== sourceFilter) return false;
|
|
86
|
+
|
|
87
|
+
// Search filter
|
|
88
|
+
if (searchQuery) {
|
|
89
|
+
const query = searchQuery.toLowerCase();
|
|
90
|
+
const matchesMessage = d.message.toLowerCase().includes(query);
|
|
91
|
+
const matchesCode = d.code?.toString().toLowerCase().includes(query);
|
|
92
|
+
const matchesFile = filePath.toLowerCase().includes(query);
|
|
93
|
+
if (!matchesMessage && !matchesCode && !matchesFile) return false;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return true;
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
if (filteredList.length > 0) {
|
|
100
|
+
filtered.set(filePath, sortDiagnostics(filteredList));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return filtered;
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// Get counts
|
|
108
|
+
const counts = $derived(() => {
|
|
109
|
+
const c: Record<DiagnosticSeverity, number> = { error: 0, warning: 0, info: 0, hint: 0 };
|
|
110
|
+
for (const diagnostics of filteredDiagnostics().values()) {
|
|
111
|
+
for (const d of diagnostics) {
|
|
112
|
+
c[d.severity]++;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return c;
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
const totalCount = $derived(() => {
|
|
119
|
+
return counts().error + counts().warning + counts().info + counts().hint;
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Toggle severity filter
|
|
124
|
+
*/
|
|
125
|
+
function toggleSeverity(severity: DiagnosticSeverity) {
|
|
126
|
+
if (severityFilter.includes(severity)) {
|
|
127
|
+
severityFilter = severityFilter.filter((s) => s !== severity);
|
|
128
|
+
} else {
|
|
129
|
+
severityFilter = [...severityFilter, severity];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Toggle file collapse
|
|
135
|
+
*/
|
|
136
|
+
function toggleFileCollapse(filePath: string) {
|
|
137
|
+
const newCollapsed = new Set(collapsedFiles);
|
|
138
|
+
if (newCollapsed.has(filePath)) {
|
|
139
|
+
newCollapsed.delete(filePath);
|
|
140
|
+
} else {
|
|
141
|
+
newCollapsed.add(filePath);
|
|
142
|
+
}
|
|
143
|
+
collapsedFiles = newCollapsed;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Expand all files
|
|
148
|
+
*/
|
|
149
|
+
function expandAll() {
|
|
150
|
+
collapsedFiles = new Set();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Collapse all files
|
|
155
|
+
*/
|
|
156
|
+
function collapseAll() {
|
|
157
|
+
collapsedFiles = new Set(filteredDiagnostics().keys());
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Get file name from path
|
|
162
|
+
*/
|
|
163
|
+
function getFileName(path: string): string {
|
|
164
|
+
return path.split('/').pop() || path;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Get directory from path
|
|
169
|
+
*/
|
|
170
|
+
function getDirectory(path: string): string {
|
|
171
|
+
const parts = path.split('/');
|
|
172
|
+
parts.pop();
|
|
173
|
+
return parts.join('/') || '.';
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Handle diagnostic click
|
|
178
|
+
*/
|
|
179
|
+
function handleDiagnosticClick(filePath: string, diagnostic: Diagnostic) {
|
|
180
|
+
onNavigate?.(filePath, diagnostic);
|
|
181
|
+
}
|
|
182
|
+
</script>
|
|
183
|
+
|
|
184
|
+
{#if open}
|
|
185
|
+
<div class="problems-panel" style="height: {height}px;">
|
|
186
|
+
<!-- Header -->
|
|
187
|
+
<div class="panel-header">
|
|
188
|
+
<div class="header-left">
|
|
189
|
+
<h3 class="panel-title">Problems</h3>
|
|
190
|
+
<span class="panel-count">{totalCount()}</span>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<div class="header-filters">
|
|
194
|
+
<!-- Severity filters -->
|
|
195
|
+
{#each (['error', 'warning', 'info', 'hint'] as const) as severity}
|
|
196
|
+
{@const count = counts()[severity]}
|
|
197
|
+
<button
|
|
198
|
+
class="severity-filter"
|
|
199
|
+
class:active={severityFilter.includes(severity)}
|
|
200
|
+
class:has-items={count > 0}
|
|
201
|
+
style="--severity-color: {getSeverityColor(severity)};"
|
|
202
|
+
onclick={() => toggleSeverity(severity)}
|
|
203
|
+
title="{getSeverityLabel(severity)}s ({count})"
|
|
204
|
+
>
|
|
205
|
+
<span class="filter-icon">{getSeverityIcon(severity)}</span>
|
|
206
|
+
<span class="filter-count">{count}</span>
|
|
207
|
+
</button>
|
|
208
|
+
{/each}
|
|
209
|
+
|
|
210
|
+
<!-- Source filter -->
|
|
211
|
+
<select
|
|
212
|
+
class="source-filter"
|
|
213
|
+
bind:value={sourceFilter}
|
|
214
|
+
title="Filter by source"
|
|
215
|
+
>
|
|
216
|
+
<option value={null}>All sources</option>
|
|
217
|
+
{#each allSources() as source}
|
|
218
|
+
<option value={source}>{source}</option>
|
|
219
|
+
{/each}
|
|
220
|
+
</select>
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
<div class="header-actions">
|
|
224
|
+
<button class="action-btn" onclick={expandAll} title="Expand all">
|
|
225
|
+
⊞
|
|
226
|
+
</button>
|
|
227
|
+
<button class="action-btn" onclick={collapseAll} title="Collapse all">
|
|
228
|
+
⊟
|
|
229
|
+
</button>
|
|
230
|
+
<button
|
|
231
|
+
class="action-btn"
|
|
232
|
+
class:active={groupByFile}
|
|
233
|
+
onclick={() => (groupByFile = !groupByFile)}
|
|
234
|
+
title="Group by file"
|
|
235
|
+
>
|
|
236
|
+
📁
|
|
237
|
+
</button>
|
|
238
|
+
{#if onClose}
|
|
239
|
+
<button class="action-btn close-btn" onclick={onClose} title="Close panel">
|
|
240
|
+
×
|
|
241
|
+
</button>
|
|
242
|
+
{/if}
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
|
|
246
|
+
<!-- Search -->
|
|
247
|
+
<div class="panel-search">
|
|
248
|
+
<input
|
|
249
|
+
type="text"
|
|
250
|
+
class="search-input"
|
|
251
|
+
placeholder="Filter problems..."
|
|
252
|
+
bind:value={searchQuery}
|
|
253
|
+
/>
|
|
254
|
+
{#if searchQuery}
|
|
255
|
+
<button class="search-clear" onclick={() => (searchQuery = '')}>
|
|
256
|
+
×
|
|
257
|
+
</button>
|
|
258
|
+
{/if}
|
|
259
|
+
</div>
|
|
260
|
+
|
|
261
|
+
<!-- Problems list -->
|
|
262
|
+
<div class="panel-content">
|
|
263
|
+
{#if totalCount() === 0}
|
|
264
|
+
<div class="panel-empty">
|
|
265
|
+
{#if searchQuery || sourceFilter || severityFilter.length < 4}
|
|
266
|
+
No problems match the current filters
|
|
267
|
+
{:else}
|
|
268
|
+
No problems detected
|
|
269
|
+
{/if}
|
|
270
|
+
</div>
|
|
271
|
+
{:else if groupByFile}
|
|
272
|
+
<!-- Grouped by file -->
|
|
273
|
+
{#each [...filteredDiagnostics().entries()] as [filePath, diagnostics] (filePath)}
|
|
274
|
+
{@const isCollapsed = collapsedFiles.has(filePath)}
|
|
275
|
+
<div class="file-group">
|
|
276
|
+
<button class="file-header" onclick={() => toggleFileCollapse(filePath)}>
|
|
277
|
+
<span class="file-chevron" class:collapsed={isCollapsed}>▾</span>
|
|
278
|
+
<span class="file-icon">📄</span>
|
|
279
|
+
<span class="file-name">{getFileName(filePath)}</span>
|
|
280
|
+
<span class="file-path">{getDirectory(filePath)}</span>
|
|
281
|
+
<span class="file-count">{diagnostics.length}</span>
|
|
282
|
+
</button>
|
|
283
|
+
|
|
284
|
+
{#if !isCollapsed}
|
|
285
|
+
<div class="file-diagnostics">
|
|
286
|
+
{#each diagnostics as diagnostic (diagnostic.id)}
|
|
287
|
+
<button
|
|
288
|
+
class="diagnostic-item"
|
|
289
|
+
onclick={() => handleDiagnosticClick(filePath, diagnostic)}
|
|
290
|
+
>
|
|
291
|
+
<span
|
|
292
|
+
class="diagnostic-icon"
|
|
293
|
+
style="color: {getSeverityColor(diagnostic.severity)};"
|
|
294
|
+
>
|
|
295
|
+
{getSeverityIcon(diagnostic.severity)}
|
|
296
|
+
</span>
|
|
297
|
+
<span class="diagnostic-message">{diagnostic.message}</span>
|
|
298
|
+
<span class="diagnostic-source">{diagnostic.source}</span>
|
|
299
|
+
{#if diagnostic.code}
|
|
300
|
+
<span class="diagnostic-code">{diagnostic.code}</span>
|
|
301
|
+
{/if}
|
|
302
|
+
<span class="diagnostic-location">
|
|
303
|
+
[Ln {diagnostic.range.start.line + 1}, Col {diagnostic.range.start.column + 1}]
|
|
304
|
+
</span>
|
|
305
|
+
</button>
|
|
306
|
+
{/each}
|
|
307
|
+
</div>
|
|
308
|
+
{/if}
|
|
309
|
+
</div>
|
|
310
|
+
{/each}
|
|
311
|
+
{:else}
|
|
312
|
+
<!-- Flat list -->
|
|
313
|
+
{#each [...filteredDiagnostics().entries()] as [filePath, diagnostics]}
|
|
314
|
+
{#each diagnostics as diagnostic (diagnostic.id)}
|
|
315
|
+
<button
|
|
316
|
+
class="diagnostic-item diagnostic-item--flat"
|
|
317
|
+
onclick={() => handleDiagnosticClick(filePath, diagnostic)}
|
|
318
|
+
>
|
|
319
|
+
<span
|
|
320
|
+
class="diagnostic-icon"
|
|
321
|
+
style="color: {getSeverityColor(diagnostic.severity)};"
|
|
322
|
+
>
|
|
323
|
+
{getSeverityIcon(diagnostic.severity)}
|
|
324
|
+
</span>
|
|
325
|
+
<span class="diagnostic-message">{diagnostic.message}</span>
|
|
326
|
+
<span class="diagnostic-file">{getFileName(filePath)}</span>
|
|
327
|
+
<span class="diagnostic-source">{diagnostic.source}</span>
|
|
328
|
+
<span class="diagnostic-location">
|
|
329
|
+
[Ln {diagnostic.range.start.line + 1}]
|
|
330
|
+
</span>
|
|
331
|
+
</button>
|
|
332
|
+
{/each}
|
|
333
|
+
{/each}
|
|
334
|
+
{/if}
|
|
335
|
+
</div>
|
|
336
|
+
</div>
|
|
337
|
+
{/if}
|
|
338
|
+
|
|
339
|
+
<style>
|
|
340
|
+
.problems-panel {
|
|
341
|
+
display: flex;
|
|
342
|
+
flex-direction: column;
|
|
343
|
+
background: var(--ide-bg-secondary, #1e1e2e);
|
|
344
|
+
border-top: 1px solid var(--ide-border, #333);
|
|
345
|
+
overflow: hidden;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.panel-header {
|
|
349
|
+
display: flex;
|
|
350
|
+
align-items: center;
|
|
351
|
+
padding: 8px 12px;
|
|
352
|
+
background: rgba(0, 0, 0, 0.2);
|
|
353
|
+
border-bottom: 1px solid var(--ide-border, #333);
|
|
354
|
+
gap: 12px;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.header-left {
|
|
358
|
+
display: flex;
|
|
359
|
+
align-items: center;
|
|
360
|
+
gap: 8px;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.panel-title {
|
|
364
|
+
margin: 0;
|
|
365
|
+
font-size: 12px;
|
|
366
|
+
font-weight: 600;
|
|
367
|
+
color: var(--ide-text-primary, #e8e8f0);
|
|
368
|
+
text-transform: uppercase;
|
|
369
|
+
letter-spacing: 0.5px;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.panel-count {
|
|
373
|
+
padding: 2px 8px;
|
|
374
|
+
background: rgba(255, 255, 255, 0.1);
|
|
375
|
+
border-radius: 10px;
|
|
376
|
+
font-size: 11px;
|
|
377
|
+
font-weight: 500;
|
|
378
|
+
color: var(--ide-text-secondary, #aaa);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.header-filters {
|
|
382
|
+
display: flex;
|
|
383
|
+
align-items: center;
|
|
384
|
+
gap: 4px;
|
|
385
|
+
flex: 1;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.severity-filter {
|
|
389
|
+
display: flex;
|
|
390
|
+
align-items: center;
|
|
391
|
+
gap: 4px;
|
|
392
|
+
padding: 4px 8px;
|
|
393
|
+
background: transparent;
|
|
394
|
+
border: 1px solid transparent;
|
|
395
|
+
border-radius: 4px;
|
|
396
|
+
color: var(--ide-text-muted, #666);
|
|
397
|
+
font-size: 11px;
|
|
398
|
+
cursor: pointer;
|
|
399
|
+
transition: all 0.15s ease;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.severity-filter:hover {
|
|
403
|
+
background: rgba(255, 255, 255, 0.05);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.severity-filter.active {
|
|
407
|
+
border-color: var(--severity-color);
|
|
408
|
+
color: var(--severity-color);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.severity-filter.has-items .filter-count {
|
|
412
|
+
font-weight: 600;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.source-filter {
|
|
416
|
+
padding: 4px 8px;
|
|
417
|
+
background: rgba(0, 0, 0, 0.2);
|
|
418
|
+
border: 1px solid var(--ide-border, #333);
|
|
419
|
+
border-radius: 4px;
|
|
420
|
+
color: var(--ide-text-secondary, #aaa);
|
|
421
|
+
font-size: 11px;
|
|
422
|
+
outline: none;
|
|
423
|
+
cursor: pointer;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.header-actions {
|
|
427
|
+
display: flex;
|
|
428
|
+
gap: 4px;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.action-btn {
|
|
432
|
+
width: 24px;
|
|
433
|
+
height: 24px;
|
|
434
|
+
padding: 0;
|
|
435
|
+
background: transparent;
|
|
436
|
+
border: none;
|
|
437
|
+
border-radius: 4px;
|
|
438
|
+
color: var(--ide-text-muted, #666);
|
|
439
|
+
font-size: 12px;
|
|
440
|
+
cursor: pointer;
|
|
441
|
+
transition: all 0.1s ease;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.action-btn:hover {
|
|
445
|
+
background: rgba(255, 255, 255, 0.1);
|
|
446
|
+
color: var(--ide-text-primary, #e8e8f0);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.action-btn.active {
|
|
450
|
+
color: #a855f7;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.close-btn {
|
|
454
|
+
font-size: 16px;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.panel-search {
|
|
458
|
+
position: relative;
|
|
459
|
+
padding: 8px 12px;
|
|
460
|
+
border-bottom: 1px solid var(--ide-border, #333);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.search-input {
|
|
464
|
+
width: 100%;
|
|
465
|
+
padding: 6px 28px 6px 10px;
|
|
466
|
+
background: rgba(0, 0, 0, 0.2);
|
|
467
|
+
border: 1px solid var(--ide-border, #333);
|
|
468
|
+
border-radius: 4px;
|
|
469
|
+
color: var(--ide-text-primary, #e8e8f0);
|
|
470
|
+
font-size: 12px;
|
|
471
|
+
outline: none;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.search-input:focus {
|
|
475
|
+
border-color: var(--ide-interactive, #4f8cc9);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.search-clear {
|
|
479
|
+
position: absolute;
|
|
480
|
+
right: 18px;
|
|
481
|
+
top: 50%;
|
|
482
|
+
transform: translateY(-50%);
|
|
483
|
+
width: 18px;
|
|
484
|
+
height: 18px;
|
|
485
|
+
padding: 0;
|
|
486
|
+
background: transparent;
|
|
487
|
+
border: none;
|
|
488
|
+
color: var(--ide-text-muted, #666);
|
|
489
|
+
font-size: 14px;
|
|
490
|
+
cursor: pointer;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.panel-content {
|
|
494
|
+
flex: 1;
|
|
495
|
+
overflow-y: auto;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.panel-empty {
|
|
499
|
+
padding: 24px;
|
|
500
|
+
text-align: center;
|
|
501
|
+
color: var(--ide-text-muted, #666);
|
|
502
|
+
font-size: 13px;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/* File group */
|
|
506
|
+
.file-group {
|
|
507
|
+
border-bottom: 1px solid var(--ide-border, #333);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.file-header {
|
|
511
|
+
display: flex;
|
|
512
|
+
align-items: center;
|
|
513
|
+
width: 100%;
|
|
514
|
+
padding: 8px 12px;
|
|
515
|
+
background: rgba(0, 0, 0, 0.1);
|
|
516
|
+
border: none;
|
|
517
|
+
color: var(--ide-text-primary, #e8e8f0);
|
|
518
|
+
font-size: 12px;
|
|
519
|
+
text-align: left;
|
|
520
|
+
cursor: pointer;
|
|
521
|
+
gap: 8px;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.file-header:hover {
|
|
525
|
+
background: rgba(255, 255, 255, 0.05);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.file-chevron {
|
|
529
|
+
font-size: 10px;
|
|
530
|
+
color: var(--ide-text-muted, #666);
|
|
531
|
+
transition: transform 0.15s ease;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.file-chevron.collapsed {
|
|
535
|
+
transform: rotate(-90deg);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.file-icon {
|
|
539
|
+
font-size: 11px;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.file-name {
|
|
543
|
+
font-weight: 500;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.file-path {
|
|
547
|
+
flex: 1;
|
|
548
|
+
color: var(--ide-text-muted, #666);
|
|
549
|
+
font-size: 11px;
|
|
550
|
+
overflow: hidden;
|
|
551
|
+
text-overflow: ellipsis;
|
|
552
|
+
white-space: nowrap;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.file-count {
|
|
556
|
+
padding: 2px 6px;
|
|
557
|
+
background: rgba(255, 255, 255, 0.1);
|
|
558
|
+
border-radius: 8px;
|
|
559
|
+
font-size: 10px;
|
|
560
|
+
color: var(--ide-text-secondary, #aaa);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.file-diagnostics {
|
|
564
|
+
/* Container for diagnostics */
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/* Diagnostic item */
|
|
568
|
+
.diagnostic-item {
|
|
569
|
+
display: flex;
|
|
570
|
+
align-items: center;
|
|
571
|
+
width: 100%;
|
|
572
|
+
padding: 6px 12px 6px 36px;
|
|
573
|
+
background: transparent;
|
|
574
|
+
border: none;
|
|
575
|
+
color: var(--ide-text-secondary, #aaa);
|
|
576
|
+
font-size: 12px;
|
|
577
|
+
text-align: left;
|
|
578
|
+
cursor: pointer;
|
|
579
|
+
gap: 8px;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.diagnostic-item:hover {
|
|
583
|
+
background: rgba(255, 255, 255, 0.05);
|
|
584
|
+
color: var(--ide-text-primary, #e8e8f0);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.diagnostic-item--flat {
|
|
588
|
+
padding-left: 12px;
|
|
589
|
+
border-bottom: 1px solid var(--ide-border, #333);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.diagnostic-icon {
|
|
593
|
+
flex-shrink: 0;
|
|
594
|
+
font-size: 11px;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.diagnostic-message {
|
|
598
|
+
flex: 1;
|
|
599
|
+
overflow: hidden;
|
|
600
|
+
text-overflow: ellipsis;
|
|
601
|
+
white-space: nowrap;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.diagnostic-file {
|
|
605
|
+
font-weight: 500;
|
|
606
|
+
color: var(--ide-text-primary, #e8e8f0);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.diagnostic-source {
|
|
610
|
+
font-size: 10px;
|
|
611
|
+
padding: 1px 4px;
|
|
612
|
+
background: rgba(255, 255, 255, 0.1);
|
|
613
|
+
border-radius: 2px;
|
|
614
|
+
color: var(--ide-text-muted, #888);
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.diagnostic-code {
|
|
618
|
+
font-family: monospace;
|
|
619
|
+
font-size: 10px;
|
|
620
|
+
color: var(--ide-text-muted, #888);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.diagnostic-location {
|
|
624
|
+
font-family: monospace;
|
|
625
|
+
font-size: 10px;
|
|
626
|
+
color: var(--ide-text-muted, #666);
|
|
627
|
+
}
|
|
628
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Problems Panel
|
|
3
|
+
*
|
|
4
|
+
* Lists all diagnostics across files with:
|
|
5
|
+
* - Filtering by severity, source, file
|
|
6
|
+
* - Grouping by file
|
|
7
|
+
* - Quick navigation
|
|
8
|
+
* - Batch actions
|
|
9
|
+
*/
|
|
10
|
+
import type { DiagnosticsManager, Diagnostic } from './core/diagnostics';
|
|
11
|
+
interface Props {
|
|
12
|
+
/** Diagnostics manager */
|
|
13
|
+
manager: DiagnosticsManager;
|
|
14
|
+
/** Whether panel is open */
|
|
15
|
+
open?: boolean;
|
|
16
|
+
/** Panel height */
|
|
17
|
+
height?: number;
|
|
18
|
+
/** Callback when diagnostic is clicked */
|
|
19
|
+
onNavigate?: (filePath: string, diagnostic: Diagnostic) => void;
|
|
20
|
+
/** Callback when panel is closed */
|
|
21
|
+
onClose?: () => void;
|
|
22
|
+
}
|
|
23
|
+
declare const ProblemsPanel: import("svelte").Component<Props, {}, "">;
|
|
24
|
+
type ProblemsPanel = ReturnType<typeof ProblemsPanel>;
|
|
25
|
+
export default ProblemsPanel;
|