@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,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Undo manager for CRDT documents
|
|
3
|
+
*/
|
|
4
|
+
import * as Y from 'yjs';
|
|
5
|
+
import type { CollaborativeDocument } from './document';
|
|
6
|
+
export interface UndoManagerOptions {
|
|
7
|
+
captureTimeout?: number;
|
|
8
|
+
trackedOrigins?: Set<unknown>;
|
|
9
|
+
deleteFilter?: (item: Y.Item) => boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface UndoManagerState {
|
|
12
|
+
canUndo: boolean;
|
|
13
|
+
canRedo: boolean;
|
|
14
|
+
undoStackSize: number;
|
|
15
|
+
redoStackSize: number;
|
|
16
|
+
}
|
|
17
|
+
export interface UndoManagerInstance {
|
|
18
|
+
undo(): boolean;
|
|
19
|
+
redo(): boolean;
|
|
20
|
+
clear(): void;
|
|
21
|
+
stopCapturing(): void;
|
|
22
|
+
getState(): UndoManagerState;
|
|
23
|
+
onStateChange(callback: (state: UndoManagerState) => void): () => void;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Create an undo manager for a collaborative document
|
|
28
|
+
*/
|
|
29
|
+
export declare function createUndoManager(document: CollaborativeDocument, options?: UndoManagerOptions): UndoManagerInstance;
|
|
30
|
+
/**
|
|
31
|
+
* Create an undo manager that tracks multiple users
|
|
32
|
+
* Useful for collaborative editing where you want to undo only your own changes
|
|
33
|
+
*/
|
|
34
|
+
export declare function createUserUndoManager(document: CollaborativeDocument, userId: string, options?: Omit<UndoManagerOptions, 'trackedOrigins'>): UndoManagerInstance;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Undo manager for CRDT documents
|
|
3
|
+
*/
|
|
4
|
+
import * as Y from 'yjs';
|
|
5
|
+
/**
|
|
6
|
+
* Create an undo manager for a collaborative document
|
|
7
|
+
*/
|
|
8
|
+
export function createUndoManager(document, options = {}) {
|
|
9
|
+
const { captureTimeout = 500, trackedOrigins = new Set([null, 'local']), deleteFilter } = options;
|
|
10
|
+
const text = document.getText();
|
|
11
|
+
const manager = new Y.UndoManager(text, {
|
|
12
|
+
captureTimeout,
|
|
13
|
+
trackedOrigins,
|
|
14
|
+
deleteFilter
|
|
15
|
+
});
|
|
16
|
+
const stateCallbacks = new Set();
|
|
17
|
+
function getState() {
|
|
18
|
+
return {
|
|
19
|
+
canUndo: manager.canUndo(),
|
|
20
|
+
canRedo: manager.canRedo(),
|
|
21
|
+
undoStackSize: manager.undoStack.length,
|
|
22
|
+
redoStackSize: manager.redoStack.length
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function notifyStateChange() {
|
|
26
|
+
const state = getState();
|
|
27
|
+
stateCallbacks.forEach((cb) => cb(state));
|
|
28
|
+
}
|
|
29
|
+
// Listen for stack changes
|
|
30
|
+
manager.on('stack-item-added', notifyStateChange);
|
|
31
|
+
manager.on('stack-item-popped', notifyStateChange);
|
|
32
|
+
manager.on('stack-cleared', notifyStateChange);
|
|
33
|
+
return {
|
|
34
|
+
undo() {
|
|
35
|
+
const result = manager.undo();
|
|
36
|
+
return result !== null;
|
|
37
|
+
},
|
|
38
|
+
redo() {
|
|
39
|
+
const result = manager.redo();
|
|
40
|
+
return result !== null;
|
|
41
|
+
},
|
|
42
|
+
clear() {
|
|
43
|
+
manager.clear();
|
|
44
|
+
},
|
|
45
|
+
stopCapturing() {
|
|
46
|
+
manager.stopCapturing();
|
|
47
|
+
},
|
|
48
|
+
getState,
|
|
49
|
+
onStateChange(callback) {
|
|
50
|
+
stateCallbacks.add(callback);
|
|
51
|
+
// Immediately call with current state
|
|
52
|
+
callback(getState());
|
|
53
|
+
return () => stateCallbacks.delete(callback);
|
|
54
|
+
},
|
|
55
|
+
destroy() {
|
|
56
|
+
manager.destroy();
|
|
57
|
+
stateCallbacks.clear();
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Create an undo manager that tracks multiple users
|
|
63
|
+
* Useful for collaborative editing where you want to undo only your own changes
|
|
64
|
+
*/
|
|
65
|
+
export function createUserUndoManager(document, userId, options = {}) {
|
|
66
|
+
return createUndoManager(document, {
|
|
67
|
+
...options,
|
|
68
|
+
trackedOrigins: new Set([userId])
|
|
69
|
+
});
|
|
70
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @nocturnium/svelte-ide
|
|
3
|
+
*
|
|
4
|
+
* Zero-dependency IDE component library for Svelte 5.
|
|
5
|
+
* A lightweight, framework-native alternative to CodeMirror.
|
|
6
|
+
*
|
|
7
|
+
* Core Philosophy:
|
|
8
|
+
* - All UI components built from scratch (no UI libraries)
|
|
9
|
+
* - Native Svelte 5 runes for state management
|
|
10
|
+
* - Custom code editor (no CodeMirror dependency)
|
|
11
|
+
* - Yjs for CRDT collaboration (optional, tree-shakeable)
|
|
12
|
+
*
|
|
13
|
+
* ============================================================================
|
|
14
|
+
* PUBLIC API SURFACE — what belongs in this root barrel
|
|
15
|
+
* ============================================================================
|
|
16
|
+
*
|
|
17
|
+
* The root entry point (`@nocturnium/svelte-ide`) exposes ONLY the stable,
|
|
18
|
+
* self-contained core: the editors, layout shell, file explorer, core UI
|
|
19
|
+
* primitives, the editor/language/tokenizer/theme utilities, the LSP client,
|
|
20
|
+
* the curated layout-store functions, and the public type surface.
|
|
21
|
+
*
|
|
22
|
+
* Backend-dependent or experimental subsystems are intentionally NOT in the
|
|
23
|
+
* root. They remain fully reachable through their dedicated subpath entries so
|
|
24
|
+
* that intent is explicit and tree-shaking stays clean:
|
|
25
|
+
*
|
|
26
|
+
* - Agent presence UI ........ `@nocturnium/svelte-ide/components/agents`
|
|
27
|
+
* - VFS lock/conflict UI ..... `@nocturnium/svelte-ide/components/vfs`
|
|
28
|
+
* - Plugin UI components ...... `@nocturnium/svelte-ide/components/plugins`
|
|
29
|
+
* - Plugin runtime/loader .... `@nocturnium/svelte-ide/plugins`
|
|
30
|
+
* - CRDT collaboration ....... `@nocturnium/svelte-ide/crdt`
|
|
31
|
+
* - Backend services ......... `@nocturnium/svelte-ide/services/*`
|
|
32
|
+
* - Full store surface ....... `@nocturnium/svelte-ide/stores`
|
|
33
|
+
* - Full type/util surface ... `@nocturnium/svelte-ide/types`, `.../utils`
|
|
34
|
+
*
|
|
35
|
+
* Rule of thumb: stable core ships in the root; backend-dependent and
|
|
36
|
+
* experimental subsystems ship via subpath entries and may change in minor
|
|
37
|
+
* versions. See README "API Stability".
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Core UI primitives - Button
|
|
41
|
+
* @public - Stable API
|
|
42
|
+
*/
|
|
43
|
+
export { default as Button } from './components/core/Button.svelte';
|
|
44
|
+
/**
|
|
45
|
+
* Core UI primitives - Icon
|
|
46
|
+
* @public - Stable API
|
|
47
|
+
*/
|
|
48
|
+
export { default as Icon } from './components/core/Icon.svelte';
|
|
49
|
+
/**
|
|
50
|
+
* Core UI primitives - Input
|
|
51
|
+
* @public - Stable API
|
|
52
|
+
*/
|
|
53
|
+
export { default as Input } from './components/core/Input.svelte';
|
|
54
|
+
/**
|
|
55
|
+
* Core UI primitives - Textarea
|
|
56
|
+
* @public - Stable API
|
|
57
|
+
*/
|
|
58
|
+
export { default as Textarea } from './components/core/Textarea.svelte';
|
|
59
|
+
/**
|
|
60
|
+
* Core UI primitives - Tooltip
|
|
61
|
+
* @public - Stable API
|
|
62
|
+
*/
|
|
63
|
+
export { default as Tooltip } from './components/core/Tooltip.svelte';
|
|
64
|
+
/**
|
|
65
|
+
* Core UI primitives - Kbd
|
|
66
|
+
* @public - Stable API
|
|
67
|
+
*/
|
|
68
|
+
export { default as Kbd } from './components/core/Kbd.svelte';
|
|
69
|
+
/**
|
|
70
|
+
* Core UI primitives - Badge
|
|
71
|
+
* @public - Stable API
|
|
72
|
+
*/
|
|
73
|
+
export { default as Badge } from './components/core/Badge.svelte';
|
|
74
|
+
/**
|
|
75
|
+
* Core UI primitives - Spinner
|
|
76
|
+
* @public - Stable API
|
|
77
|
+
*/
|
|
78
|
+
export { default as Spinner } from './components/core/Spinner.svelte';
|
|
79
|
+
/**
|
|
80
|
+
* Core UI primitives - Avatar
|
|
81
|
+
* @public - Stable API
|
|
82
|
+
*/
|
|
83
|
+
export { default as Avatar } from './components/core/Avatar.svelte';
|
|
84
|
+
/**
|
|
85
|
+
* Core UI primitives - ContextMenu
|
|
86
|
+
* @public - Stable API
|
|
87
|
+
*/
|
|
88
|
+
export { default as ContextMenu } from './components/core/ContextMenu.svelte';
|
|
89
|
+
/**
|
|
90
|
+
* Core UI primitives - ResizeHandle
|
|
91
|
+
* @public - Stable API
|
|
92
|
+
*/
|
|
93
|
+
export { default as ResizeHandle } from './components/core/ResizeHandle.svelte';
|
|
94
|
+
/**
|
|
95
|
+
* Core UI primitives - ErrorBoundary
|
|
96
|
+
* @public - Stable API
|
|
97
|
+
*/
|
|
98
|
+
export { default as ErrorBoundary } from './components/core/ErrorBoundary.svelte';
|
|
99
|
+
/**
|
|
100
|
+
* Core UI primitives - ConnectionStatus
|
|
101
|
+
* @public - Stable API
|
|
102
|
+
*/
|
|
103
|
+
export { default as ConnectionStatus } from './components/core/ConnectionStatus.svelte';
|
|
104
|
+
/**
|
|
105
|
+
* Core editor component
|
|
106
|
+
* @public - Stable API
|
|
107
|
+
*/
|
|
108
|
+
export { default as Editor } from './components/editor/Editor.svelte';
|
|
109
|
+
/**
|
|
110
|
+
* Custom editor with full keyboard/mouse handling
|
|
111
|
+
* @public - Stable API
|
|
112
|
+
*/
|
|
113
|
+
export { default as CustomEditor } from './components/editor/CustomEditor.svelte';
|
|
114
|
+
/**
|
|
115
|
+
* Collaborative editor with CRDT support
|
|
116
|
+
* @experimental - requires the optional yjs peers; API may change in future versions
|
|
117
|
+
*/
|
|
118
|
+
export { default as CollaborativeEditor } from './components/editor/CollaborativeEditor.svelte';
|
|
119
|
+
/**
|
|
120
|
+
* Editor tab bar component
|
|
121
|
+
* @public - Stable API
|
|
122
|
+
*/
|
|
123
|
+
export { default as EditorTabs } from './components/editor/EditorTabs.svelte';
|
|
124
|
+
/**
|
|
125
|
+
* Editor pane container
|
|
126
|
+
* @public - Stable API
|
|
127
|
+
*/
|
|
128
|
+
export { default as EditorPane } from './components/editor/EditorPane.svelte';
|
|
129
|
+
/**
|
|
130
|
+
* File icon component
|
|
131
|
+
* @public - Stable API
|
|
132
|
+
*/
|
|
133
|
+
export { default as FileIcon } from './components/editor/FileIcon.svelte';
|
|
134
|
+
/**
|
|
135
|
+
* File explorer sidebar component and associated types
|
|
136
|
+
* @public - Stable API (FileExplorer, FileChangeStatus)
|
|
137
|
+
* @experimental - GitFileStatus type may change in future versions
|
|
138
|
+
*/
|
|
139
|
+
export { default as FileExplorer, type FileChangeStatus, type GitFileStatus } from './components/editor/FileExplorer.svelte';
|
|
140
|
+
/**
|
|
141
|
+
* Editor core utilities and types
|
|
142
|
+
*
|
|
143
|
+
* Functions and types marked below:
|
|
144
|
+
* createEditorState, createNavigation, createKeyboardHandler,
|
|
145
|
+
* createDefaultKeybindings, createCRDTBinding,
|
|
146
|
+
* EditorState, Position, Selection, Line, ChangeEvent,
|
|
147
|
+
* Navigation, KeyboardHandler, Keybinding, CRDTBinding,
|
|
148
|
+
* Cursor, CursorManager, CursorManagerConfig
|
|
149
|
+
*
|
|
150
|
+
* @public - Stable API
|
|
151
|
+
*/
|
|
152
|
+
export { createEditorState, createNavigation, createKeyboardHandler, createDefaultKeybindings, createCRDTBinding, type EditorState, type Position, type Selection, type Line, type ChangeEvent, type Navigation, type KeyboardHandler, type Keybinding, type CRDTBinding, type Cursor, type CursorManager, type CursorManagerConfig } from './components/editor/core';
|
|
153
|
+
/**
|
|
154
|
+
* Editor theme utilities and types
|
|
155
|
+
* @public - Stable API
|
|
156
|
+
*/
|
|
157
|
+
export { nocturniumTheme, tokenColors, editorColors, getThemeCSS, type EditorTheme } from './components/editor/theme';
|
|
158
|
+
/**
|
|
159
|
+
* Language configuration utilities and types
|
|
160
|
+
* @public - Stable API
|
|
161
|
+
*/
|
|
162
|
+
export { getLanguageExtension, getSupportedLanguages, isLanguageSupported, getLanguageConfig, getLanguageFromExtension, getLanguageFromFilename, resolveLanguage, type LanguageConfig } from './components/editor/languages';
|
|
163
|
+
/**
|
|
164
|
+
* Tokenizer utilities and types
|
|
165
|
+
* @public - Stable API
|
|
166
|
+
*/
|
|
167
|
+
export { getTokenizer, tokenize, getTokenClass, tokensToHTML, type Token, type TokenizedLine, type TokenizerState, type TokenType, type LanguageTokenizer } from './components/editor/tokenizer';
|
|
168
|
+
/**
|
|
169
|
+
* AI assistant panel
|
|
170
|
+
* @public - Stable API
|
|
171
|
+
*/
|
|
172
|
+
export { default as AIPanel } from './components/ai/AIPanel.svelte';
|
|
173
|
+
/**
|
|
174
|
+
* AI message display component
|
|
175
|
+
* @public - Stable API
|
|
176
|
+
*/
|
|
177
|
+
export { default as AIMessage } from './components/ai/AIMessage.svelte';
|
|
178
|
+
/**
|
|
179
|
+
* AI tool call display component
|
|
180
|
+
* @public - Stable API
|
|
181
|
+
*/
|
|
182
|
+
export { default as AIToolCallDisplay } from './components/ai/AIToolCallDisplay.svelte';
|
|
183
|
+
/**
|
|
184
|
+
* AI edit preview component
|
|
185
|
+
* @public - Stable API
|
|
186
|
+
*/
|
|
187
|
+
export { default as AIEditPreview } from './components/ai/AIEditPreview.svelte';
|
|
188
|
+
/**
|
|
189
|
+
* AI inline edit component
|
|
190
|
+
* @public - Stable API
|
|
191
|
+
*/
|
|
192
|
+
export { default as AIInlineEdit } from './components/ai/AIInlineEdit.svelte';
|
|
193
|
+
/**
|
|
194
|
+
* AI suggestion widget component
|
|
195
|
+
* @public - Stable API
|
|
196
|
+
*/
|
|
197
|
+
export { default as AISuggestionWidget } from './components/ai/AISuggestionWidget.svelte';
|
|
198
|
+
/**
|
|
199
|
+
* Main IDE layout shell
|
|
200
|
+
* @public - Stable API
|
|
201
|
+
*/
|
|
202
|
+
export { default as IDELayout } from './components/layout/IDELayout.svelte';
|
|
203
|
+
/**
|
|
204
|
+
* Status bar component
|
|
205
|
+
* @public - Stable API
|
|
206
|
+
*/
|
|
207
|
+
export { default as StatusBar } from './components/layout/StatusBar.svelte';
|
|
208
|
+
/**
|
|
209
|
+
* LSP-integrated editor component
|
|
210
|
+
* @public - Stable API
|
|
211
|
+
*/
|
|
212
|
+
export { default as LSPEditor } from './components/lsp/LSPEditor.svelte';
|
|
213
|
+
/**
|
|
214
|
+
* Autocomplete widget for LSP completions
|
|
215
|
+
* @public - Stable API
|
|
216
|
+
*/
|
|
217
|
+
export { default as AutocompleteWidget } from './components/lsp/AutocompleteWidget.svelte';
|
|
218
|
+
/**
|
|
219
|
+
* Hover tooltip for LSP hover information
|
|
220
|
+
* @public - Stable API
|
|
221
|
+
*/
|
|
222
|
+
export { default as HoverTooltip } from './components/lsp/HoverTooltip.svelte';
|
|
223
|
+
/**
|
|
224
|
+
* Signature help widget for LSP signature information
|
|
225
|
+
* @public - Stable API
|
|
226
|
+
*/
|
|
227
|
+
export { default as SignatureHelpWidget } from './components/lsp/SignatureHelpWidget.svelte';
|
|
228
|
+
/**
|
|
229
|
+
* Diagnostics panel for LSP diagnostic display
|
|
230
|
+
* @public - Stable API
|
|
231
|
+
*/
|
|
232
|
+
export { default as DiagnosticsPanel } from './components/lsp/DiagnosticsPanel.svelte';
|
|
233
|
+
/**
|
|
234
|
+
* Diagnostic marker for inline LSP diagnostic display
|
|
235
|
+
* @public - Stable API
|
|
236
|
+
*/
|
|
237
|
+
export { default as DiagnosticMarker } from './components/lsp/DiagnosticMarker.svelte';
|
|
238
|
+
/**
|
|
239
|
+
* LSP client service
|
|
240
|
+
*
|
|
241
|
+
* Exports: LSPClient, createLSPClient, positionToOffset, offsetToPosition, rangeToOffsets
|
|
242
|
+
*
|
|
243
|
+
* @public - Stable API
|
|
244
|
+
*/
|
|
245
|
+
export { LSPClient, createLSPClient, positionToOffset, offsetToPosition, rangeToOffsets } from './services/lsp-client';
|
|
246
|
+
/**
|
|
247
|
+
* Public LSP types
|
|
248
|
+
* @public - Diagnostic, LSPConnectionState, ServerCapabilities are part of the stable API
|
|
249
|
+
*/
|
|
250
|
+
export type { Diagnostic, LSPConnectionState, ServerCapabilities } from './types/lsp';
|
|
251
|
+
/**
|
|
252
|
+
* Layout store functions — the curated, stable store surface for the root.
|
|
253
|
+
*
|
|
254
|
+
* Only these layout-store functions are part of the @public root API. The full
|
|
255
|
+
* store surface (editor, AI, plugin, collaboration, VFS, agents — including
|
|
256
|
+
* internal setters, getters, and mock/reset helpers) remains available via the
|
|
257
|
+
* dedicated `@nocturnium/svelte-ide/stores` subpath entry for callers that opt
|
|
258
|
+
* into it.
|
|
259
|
+
*
|
|
260
|
+
* @public - Stable API
|
|
261
|
+
*/
|
|
262
|
+
export { toggleLeftSidebar, toggleRightSidebar, toggleBottomPanel, setLeftSidebarPanel, setRightSidebarPanel, setBottomPanelTab, getLeftSidebarVisible, getLeftSidebarActivePanel, getRightSidebarVisible, getRightSidebarActivePanel, getBottomPanelVisible, getBottomPanelActiveTab, openCommandPalette, closeCommandPalette, getCommandPaletteOpen, focusAIPanel, focusTerminal, focusExplorer } from './stores/layout.svelte';
|
|
263
|
+
/**
|
|
264
|
+
* Editor types
|
|
265
|
+
* @public - Stable API
|
|
266
|
+
*/
|
|
267
|
+
export type * from './types/editor';
|
|
268
|
+
/**
|
|
269
|
+
* Filesystem types
|
|
270
|
+
* @public - Stable API
|
|
271
|
+
*/
|
|
272
|
+
export type * from './types/filesystem';
|
|
273
|
+
/**
|
|
274
|
+
* AI types
|
|
275
|
+
* @public - Stable API
|
|
276
|
+
*/
|
|
277
|
+
export type * from './types/ai';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @nocturnium/svelte-ide
|
|
3
|
+
*
|
|
4
|
+
* Zero-dependency IDE component library for Svelte 5.
|
|
5
|
+
* A lightweight, framework-native alternative to CodeMirror.
|
|
6
|
+
*
|
|
7
|
+
* Core Philosophy:
|
|
8
|
+
* - All UI components built from scratch (no UI libraries)
|
|
9
|
+
* - Native Svelte 5 runes for state management
|
|
10
|
+
* - Custom code editor (no CodeMirror dependency)
|
|
11
|
+
* - Yjs for CRDT collaboration (optional, tree-shakeable)
|
|
12
|
+
*
|
|
13
|
+
* ============================================================================
|
|
14
|
+
* PUBLIC API SURFACE — what belongs in this root barrel
|
|
15
|
+
* ============================================================================
|
|
16
|
+
*
|
|
17
|
+
* The root entry point (`@nocturnium/svelte-ide`) exposes ONLY the stable,
|
|
18
|
+
* self-contained core: the editors, layout shell, file explorer, core UI
|
|
19
|
+
* primitives, the editor/language/tokenizer/theme utilities, the LSP client,
|
|
20
|
+
* the curated layout-store functions, and the public type surface.
|
|
21
|
+
*
|
|
22
|
+
* Backend-dependent or experimental subsystems are intentionally NOT in the
|
|
23
|
+
* root. They remain fully reachable through their dedicated subpath entries so
|
|
24
|
+
* that intent is explicit and tree-shaking stays clean:
|
|
25
|
+
*
|
|
26
|
+
* - Agent presence UI ........ `@nocturnium/svelte-ide/components/agents`
|
|
27
|
+
* - VFS lock/conflict UI ..... `@nocturnium/svelte-ide/components/vfs`
|
|
28
|
+
* - Plugin UI components ...... `@nocturnium/svelte-ide/components/plugins`
|
|
29
|
+
* - Plugin runtime/loader .... `@nocturnium/svelte-ide/plugins`
|
|
30
|
+
* - CRDT collaboration ....... `@nocturnium/svelte-ide/crdt`
|
|
31
|
+
* - Backend services ......... `@nocturnium/svelte-ide/services/*`
|
|
32
|
+
* - Full store surface ....... `@nocturnium/svelte-ide/stores`
|
|
33
|
+
* - Full type/util surface ... `@nocturnium/svelte-ide/types`, `.../utils`
|
|
34
|
+
*
|
|
35
|
+
* Rule of thumb: stable core ships in the root; backend-dependent and
|
|
36
|
+
* experimental subsystems ship via subpath entries and may change in minor
|
|
37
|
+
* versions. See README "API Stability".
|
|
38
|
+
*/
|
|
39
|
+
// ============================================
|
|
40
|
+
// Core UI Components (Zero external dependencies)
|
|
41
|
+
// ============================================
|
|
42
|
+
/**
|
|
43
|
+
* Core UI primitives - Button
|
|
44
|
+
* @public - Stable API
|
|
45
|
+
*/
|
|
46
|
+
export { default as Button } from './components/core/Button.svelte';
|
|
47
|
+
/**
|
|
48
|
+
* Core UI primitives - Icon
|
|
49
|
+
* @public - Stable API
|
|
50
|
+
*/
|
|
51
|
+
export { default as Icon } from './components/core/Icon.svelte';
|
|
52
|
+
/**
|
|
53
|
+
* Core UI primitives - Input
|
|
54
|
+
* @public - Stable API
|
|
55
|
+
*/
|
|
56
|
+
export { default as Input } from './components/core/Input.svelte';
|
|
57
|
+
/**
|
|
58
|
+
* Core UI primitives - Textarea
|
|
59
|
+
* @public - Stable API
|
|
60
|
+
*/
|
|
61
|
+
export { default as Textarea } from './components/core/Textarea.svelte';
|
|
62
|
+
/**
|
|
63
|
+
* Core UI primitives - Tooltip
|
|
64
|
+
* @public - Stable API
|
|
65
|
+
*/
|
|
66
|
+
export { default as Tooltip } from './components/core/Tooltip.svelte';
|
|
67
|
+
/**
|
|
68
|
+
* Core UI primitives - Kbd
|
|
69
|
+
* @public - Stable API
|
|
70
|
+
*/
|
|
71
|
+
export { default as Kbd } from './components/core/Kbd.svelte';
|
|
72
|
+
/**
|
|
73
|
+
* Core UI primitives - Badge
|
|
74
|
+
* @public - Stable API
|
|
75
|
+
*/
|
|
76
|
+
export { default as Badge } from './components/core/Badge.svelte';
|
|
77
|
+
/**
|
|
78
|
+
* Core UI primitives - Spinner
|
|
79
|
+
* @public - Stable API
|
|
80
|
+
*/
|
|
81
|
+
export { default as Spinner } from './components/core/Spinner.svelte';
|
|
82
|
+
/**
|
|
83
|
+
* Core UI primitives - Avatar
|
|
84
|
+
* @public - Stable API
|
|
85
|
+
*/
|
|
86
|
+
export { default as Avatar } from './components/core/Avatar.svelte';
|
|
87
|
+
/**
|
|
88
|
+
* Core UI primitives - ContextMenu
|
|
89
|
+
* @public - Stable API
|
|
90
|
+
*/
|
|
91
|
+
export { default as ContextMenu } from './components/core/ContextMenu.svelte';
|
|
92
|
+
/**
|
|
93
|
+
* Core UI primitives - ResizeHandle
|
|
94
|
+
* @public - Stable API
|
|
95
|
+
*/
|
|
96
|
+
export { default as ResizeHandle } from './components/core/ResizeHandle.svelte';
|
|
97
|
+
/**
|
|
98
|
+
* Core UI primitives - ErrorBoundary
|
|
99
|
+
* @public - Stable API
|
|
100
|
+
*/
|
|
101
|
+
export { default as ErrorBoundary } from './components/core/ErrorBoundary.svelte';
|
|
102
|
+
/**
|
|
103
|
+
* Core UI primitives - ConnectionStatus
|
|
104
|
+
* @public - Stable API
|
|
105
|
+
*/
|
|
106
|
+
export { default as ConnectionStatus } from './components/core/ConnectionStatus.svelte';
|
|
107
|
+
// ============================================
|
|
108
|
+
// Editor Components (Zero external dependencies)
|
|
109
|
+
// ============================================
|
|
110
|
+
/**
|
|
111
|
+
* Core editor component
|
|
112
|
+
* @public - Stable API
|
|
113
|
+
*/
|
|
114
|
+
export { default as Editor } from './components/editor/Editor.svelte';
|
|
115
|
+
/**
|
|
116
|
+
* Custom editor with full keyboard/mouse handling
|
|
117
|
+
* @public - Stable API
|
|
118
|
+
*/
|
|
119
|
+
export { default as CustomEditor } from './components/editor/CustomEditor.svelte';
|
|
120
|
+
/**
|
|
121
|
+
* Collaborative editor with CRDT support
|
|
122
|
+
* @experimental - requires the optional yjs peers; API may change in future versions
|
|
123
|
+
*/
|
|
124
|
+
export { default as CollaborativeEditor } from './components/editor/CollaborativeEditor.svelte';
|
|
125
|
+
/**
|
|
126
|
+
* Editor tab bar component
|
|
127
|
+
* @public - Stable API
|
|
128
|
+
*/
|
|
129
|
+
export { default as EditorTabs } from './components/editor/EditorTabs.svelte';
|
|
130
|
+
/**
|
|
131
|
+
* Editor pane container
|
|
132
|
+
* @public - Stable API
|
|
133
|
+
*/
|
|
134
|
+
export { default as EditorPane } from './components/editor/EditorPane.svelte';
|
|
135
|
+
/**
|
|
136
|
+
* File icon component
|
|
137
|
+
* @public - Stable API
|
|
138
|
+
*/
|
|
139
|
+
export { default as FileIcon } from './components/editor/FileIcon.svelte';
|
|
140
|
+
/**
|
|
141
|
+
* File explorer sidebar component and associated types
|
|
142
|
+
* @public - Stable API (FileExplorer, FileChangeStatus)
|
|
143
|
+
* @experimental - GitFileStatus type may change in future versions
|
|
144
|
+
*/
|
|
145
|
+
export { default as FileExplorer } from './components/editor/FileExplorer.svelte';
|
|
146
|
+
/**
|
|
147
|
+
* Editor core utilities and types
|
|
148
|
+
*
|
|
149
|
+
* Functions and types marked below:
|
|
150
|
+
* createEditorState, createNavigation, createKeyboardHandler,
|
|
151
|
+
* createDefaultKeybindings, createCRDTBinding,
|
|
152
|
+
* EditorState, Position, Selection, Line, ChangeEvent,
|
|
153
|
+
* Navigation, KeyboardHandler, Keybinding, CRDTBinding,
|
|
154
|
+
* Cursor, CursorManager, CursorManagerConfig
|
|
155
|
+
*
|
|
156
|
+
* @public - Stable API
|
|
157
|
+
*/
|
|
158
|
+
export { createEditorState, createNavigation, createKeyboardHandler, createDefaultKeybindings, createCRDTBinding } from './components/editor/core';
|
|
159
|
+
/**
|
|
160
|
+
* Editor theme utilities and types
|
|
161
|
+
* @public - Stable API
|
|
162
|
+
*/
|
|
163
|
+
export { nocturniumTheme, tokenColors, editorColors, getThemeCSS } from './components/editor/theme';
|
|
164
|
+
/**
|
|
165
|
+
* Language configuration utilities and types
|
|
166
|
+
* @public - Stable API
|
|
167
|
+
*/
|
|
168
|
+
export { getLanguageExtension, getSupportedLanguages, isLanguageSupported, getLanguageConfig, getLanguageFromExtension, getLanguageFromFilename, resolveLanguage } from './components/editor/languages';
|
|
169
|
+
/**
|
|
170
|
+
* Tokenizer utilities and types
|
|
171
|
+
* @public - Stable API
|
|
172
|
+
*/
|
|
173
|
+
export { getTokenizer, tokenize, getTokenClass, tokensToHTML } from './components/editor/tokenizer';
|
|
174
|
+
// ============================================
|
|
175
|
+
// AI Components (Zero external dependencies)
|
|
176
|
+
// ============================================
|
|
177
|
+
/**
|
|
178
|
+
* AI assistant panel
|
|
179
|
+
* @public - Stable API
|
|
180
|
+
*/
|
|
181
|
+
export { default as AIPanel } from './components/ai/AIPanel.svelte';
|
|
182
|
+
/**
|
|
183
|
+
* AI message display component
|
|
184
|
+
* @public - Stable API
|
|
185
|
+
*/
|
|
186
|
+
export { default as AIMessage } from './components/ai/AIMessage.svelte';
|
|
187
|
+
/**
|
|
188
|
+
* AI tool call display component
|
|
189
|
+
* @public - Stable API
|
|
190
|
+
*/
|
|
191
|
+
export { default as AIToolCallDisplay } from './components/ai/AIToolCallDisplay.svelte';
|
|
192
|
+
/**
|
|
193
|
+
* AI edit preview component
|
|
194
|
+
* @public - Stable API
|
|
195
|
+
*/
|
|
196
|
+
export { default as AIEditPreview } from './components/ai/AIEditPreview.svelte';
|
|
197
|
+
/**
|
|
198
|
+
* AI inline edit component
|
|
199
|
+
* @public - Stable API
|
|
200
|
+
*/
|
|
201
|
+
export { default as AIInlineEdit } from './components/ai/AIInlineEdit.svelte';
|
|
202
|
+
/**
|
|
203
|
+
* AI suggestion widget component
|
|
204
|
+
* @public - Stable API
|
|
205
|
+
*/
|
|
206
|
+
export { default as AISuggestionWidget } from './components/ai/AISuggestionWidget.svelte';
|
|
207
|
+
// ============================================
|
|
208
|
+
// Layout Components (Zero external dependencies)
|
|
209
|
+
// ============================================
|
|
210
|
+
/**
|
|
211
|
+
* Main IDE layout shell
|
|
212
|
+
* @public - Stable API
|
|
213
|
+
*/
|
|
214
|
+
export { default as IDELayout } from './components/layout/IDELayout.svelte';
|
|
215
|
+
/**
|
|
216
|
+
* Status bar component
|
|
217
|
+
* @public - Stable API
|
|
218
|
+
*/
|
|
219
|
+
export { default as StatusBar } from './components/layout/StatusBar.svelte';
|
|
220
|
+
// ============================================
|
|
221
|
+
// LSP Components (Zero external dependencies)
|
|
222
|
+
// ============================================
|
|
223
|
+
/**
|
|
224
|
+
* LSP-integrated editor component
|
|
225
|
+
* @public - Stable API
|
|
226
|
+
*/
|
|
227
|
+
export { default as LSPEditor } from './components/lsp/LSPEditor.svelte';
|
|
228
|
+
/**
|
|
229
|
+
* Autocomplete widget for LSP completions
|
|
230
|
+
* @public - Stable API
|
|
231
|
+
*/
|
|
232
|
+
export { default as AutocompleteWidget } from './components/lsp/AutocompleteWidget.svelte';
|
|
233
|
+
/**
|
|
234
|
+
* Hover tooltip for LSP hover information
|
|
235
|
+
* @public - Stable API
|
|
236
|
+
*/
|
|
237
|
+
export { default as HoverTooltip } from './components/lsp/HoverTooltip.svelte';
|
|
238
|
+
/**
|
|
239
|
+
* Signature help widget for LSP signature information
|
|
240
|
+
* @public - Stable API
|
|
241
|
+
*/
|
|
242
|
+
export { default as SignatureHelpWidget } from './components/lsp/SignatureHelpWidget.svelte';
|
|
243
|
+
/**
|
|
244
|
+
* Diagnostics panel for LSP diagnostic display
|
|
245
|
+
* @public - Stable API
|
|
246
|
+
*/
|
|
247
|
+
export { default as DiagnosticsPanel } from './components/lsp/DiagnosticsPanel.svelte';
|
|
248
|
+
/**
|
|
249
|
+
* Diagnostic marker for inline LSP diagnostic display
|
|
250
|
+
* @public - Stable API
|
|
251
|
+
*/
|
|
252
|
+
export { default as DiagnosticMarker } from './components/lsp/DiagnosticMarker.svelte';
|
|
253
|
+
/**
|
|
254
|
+
* LSP client service
|
|
255
|
+
*
|
|
256
|
+
* Exports: LSPClient, createLSPClient, positionToOffset, offsetToPosition, rangeToOffsets
|
|
257
|
+
*
|
|
258
|
+
* @public - Stable API
|
|
259
|
+
*/
|
|
260
|
+
export { LSPClient, createLSPClient, positionToOffset, offsetToPosition, rangeToOffsets } from './services/lsp-client';
|
|
261
|
+
// ============================================
|
|
262
|
+
// Stores (Svelte 5 runes, zero external dependencies)
|
|
263
|
+
// ============================================
|
|
264
|
+
/**
|
|
265
|
+
* Layout store functions — the curated, stable store surface for the root.
|
|
266
|
+
*
|
|
267
|
+
* Only these layout-store functions are part of the @public root API. The full
|
|
268
|
+
* store surface (editor, AI, plugin, collaboration, VFS, agents — including
|
|
269
|
+
* internal setters, getters, and mock/reset helpers) remains available via the
|
|
270
|
+
* dedicated `@nocturnium/svelte-ide/stores` subpath entry for callers that opt
|
|
271
|
+
* into it.
|
|
272
|
+
*
|
|
273
|
+
* @public - Stable API
|
|
274
|
+
*/
|
|
275
|
+
export { toggleLeftSidebar, toggleRightSidebar, toggleBottomPanel, setLeftSidebarPanel, setRightSidebarPanel, setBottomPanelTab, getLeftSidebarVisible, getLeftSidebarActivePanel, getRightSidebarVisible, getRightSidebarActivePanel, getBottomPanelVisible, getBottomPanelActiveTab, openCommandPalette, closeCommandPalette, getCommandPaletteOpen, focusAIPanel, focusTerminal, focusExplorer } from './stores/layout.svelte';
|
|
276
|
+
// ============================================
|
|
277
|
+
// CRDT Module (requires yjs, y-websocket)
|
|
278
|
+
// Import separately: import { ... } from '@nocturnium/svelte-ide/crdt'
|
|
279
|
+
// ============================================
|
|
280
|
+
// See: ./crdt/index.ts
|