@stigmer/react 3.1.1 → 3.1.3
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/composer/SessionComposer.d.ts +25 -1
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +19 -8
- package/composer/SessionComposer.js.map +1 -1
- package/execution/ArtifactContentRenderer.d.ts +11 -1
- package/execution/ArtifactContentRenderer.d.ts.map +1 -1
- package/execution/ArtifactContentRenderer.js +39 -15
- package/execution/ArtifactContentRenderer.js.map +1 -1
- package/execution/ArtifactPreviewModal.d.ts +5 -5
- package/execution/ArtifactPreviewModal.js +4 -4
- package/execution/ArtifactPreviewModal.js.map +1 -1
- package/execution/FileChangeProgressBar.d.ts +47 -0
- package/execution/FileChangeProgressBar.d.ts.map +1 -0
- package/execution/FileChangeProgressBar.js +49 -0
- package/execution/FileChangeProgressBar.js.map +1 -0
- package/execution/FileChangesView.d.ts.map +1 -1
- package/execution/FileChangesView.js +19 -4
- package/execution/FileChangesView.js.map +1 -1
- package/execution/FilePathContext.d.ts +8 -1
- package/execution/FilePathContext.d.ts.map +1 -1
- package/execution/FilePathContext.js.map +1 -1
- package/execution/FilePathLink.d.ts.map +1 -1
- package/execution/FilePathLink.js +21 -6
- package/execution/FilePathLink.js.map +1 -1
- package/execution/FileReviewAtoms.d.ts +27 -0
- package/execution/FileReviewAtoms.d.ts.map +1 -0
- package/execution/FileReviewAtoms.js +64 -0
- package/execution/FileReviewAtoms.js.map +1 -0
- package/execution/FileReviewCard.d.ts +2 -2
- package/execution/FileReviewCard.d.ts.map +1 -1
- package/execution/FileReviewCard.js +32 -62
- package/execution/FileReviewCard.js.map +1 -1
- package/execution/MessageEntry.d.ts +20 -0
- package/execution/MessageEntry.d.ts.map +1 -1
- package/execution/MessageEntry.js +19 -5
- package/execution/MessageEntry.js.map +1 -1
- package/execution/MessageThread.d.ts +75 -13
- package/execution/MessageThread.d.ts.map +1 -1
- package/execution/MessageThread.js +195 -27
- package/execution/MessageThread.js.map +1 -1
- package/execution/PlanArtifactCard.d.ts +36 -21
- package/execution/PlanArtifactCard.d.ts.map +1 -1
- package/execution/PlanArtifactCard.js +39 -25
- package/execution/PlanArtifactCard.js.map +1 -1
- package/execution/PlanCompletionCard.d.ts +4 -4
- package/execution/PlanCompletionCard.d.ts.map +1 -1
- package/execution/PlanCompletionCard.js +4 -4
- package/execution/PlanCompletionCard.js.map +1 -1
- package/execution/PlanDocumentMessage.d.ts +32 -0
- package/execution/PlanDocumentMessage.d.ts.map +1 -0
- package/execution/PlanDocumentMessage.js +37 -0
- package/execution/PlanDocumentMessage.js.map +1 -0
- package/execution/PlanStreamingCard.d.ts +50 -0
- package/execution/PlanStreamingCard.d.ts.map +1 -0
- package/execution/PlanStreamingCard.js +40 -0
- package/execution/PlanStreamingCard.js.map +1 -0
- package/execution/index.d.ts +9 -1
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js +4 -0
- package/execution/index.js.map +1 -1
- package/execution/use-build-from-plan-hotkey.d.ts +1 -1
- package/execution/use-build-from-plan-hotkey.js +1 -1
- package/execution/useArtifactCopy.d.ts +51 -0
- package/execution/useArtifactCopy.d.ts.map +1 -0
- package/execution/useArtifactCopy.js +75 -0
- package/execution/useArtifactCopy.js.map +1 -0
- package/execution/useArtifactDownload.d.ts.map +1 -1
- package/execution/useArtifactDownload.js +17 -5
- package/execution/useArtifactDownload.js.map +1 -1
- package/execution/useCreateAgentExecution.d.ts +12 -0
- package/execution/useCreateAgentExecution.d.ts.map +1 -1
- package/execution/useCreateAgentExecution.js +5 -1
- package/execution/useCreateAgentExecution.js.map +1 -1
- package/github/decodeGitHubContent.d.ts +29 -0
- package/github/decodeGitHubContent.d.ts.map +1 -0
- package/github/decodeGitHubContent.js +72 -0
- package/github/decodeGitHubContent.js.map +1 -0
- package/github/index.d.ts +1 -0
- package/github/index.d.ts.map +1 -1
- package/github/index.js +1 -0
- package/github/index.js.map +1 -1
- package/github/useGitHubFileReader.d.ts +26 -0
- package/github/useGitHubFileReader.d.ts.map +1 -0
- package/github/useGitHubFileReader.js +106 -0
- package/github/useGitHubFileReader.js.map +1 -0
- package/github/useGitHubTreeLister.d.ts.map +1 -1
- package/github/useGitHubTreeLister.js +6 -2
- package/github/useGitHubTreeLister.js.map +1 -1
- package/index.d.ts +9 -9
- package/index.d.ts.map +1 -1
- package/index.js +5 -5
- package/index.js.map +1 -1
- package/internal/ResizableSplit.d.ts +72 -22
- package/internal/ResizableSplit.d.ts.map +1 -1
- package/internal/ResizableSplit.js +96 -38
- package/internal/ResizableSplit.js.map +1 -1
- package/internal/VirtualizedThread.d.ts +5 -3
- package/internal/VirtualizedThread.d.ts.map +1 -1
- package/internal/VirtualizedThread.js +6 -4
- package/internal/VirtualizedThread.js.map +1 -1
- package/internal/file-icons/index.d.ts +17 -0
- package/internal/file-icons/index.d.ts.map +1 -0
- package/internal/file-icons/index.js +60 -0
- package/internal/file-icons/index.js.map +1 -0
- package/internal/file-tree/FileTreeNode.d.ts +18 -1
- package/internal/file-tree/FileTreeNode.d.ts.map +1 -1
- package/internal/file-tree/FileTreeNode.js +11 -2
- package/internal/file-tree/FileTreeNode.js.map +1 -1
- package/internal/markdown-components.d.ts +38 -1
- package/internal/markdown-components.d.ts.map +1 -1
- package/internal/markdown-components.js +86 -11
- package/internal/markdown-components.js.map +1 -1
- package/{workflow → internal}/motion-preference.d.ts +7 -4
- package/internal/motion-preference.d.ts.map +1 -0
- package/{workflow → internal}/motion-preference.js +7 -4
- package/internal/motion-preference.js.map +1 -0
- package/internal/store/index.d.ts +33 -0
- package/internal/store/index.d.ts.map +1 -1
- package/internal/store/index.js +59 -0
- package/internal/store/index.js.map +1 -1
- package/internal/store/workspace-editors-store.d.ts +145 -0
- package/internal/store/workspace-editors-store.d.ts.map +1 -0
- package/internal/store/workspace-editors-store.js +208 -0
- package/internal/store/workspace-editors-store.js.map +1 -0
- package/internal/store/workspace-file-selection-store.d.ts +38 -0
- package/internal/store/workspace-file-selection-store.d.ts.map +1 -0
- package/internal/store/workspace-file-selection-store.js +62 -0
- package/internal/store/workspace-file-selection-store.js.map +1 -0
- package/internal/useRevealLine.d.ts +49 -0
- package/internal/useRevealLine.d.ts.map +1 -0
- package/internal/useRevealLine.js +43 -0
- package/internal/useRevealLine.js.map +1 -0
- package/library/detect-plan-artifact.d.ts +43 -4
- package/library/detect-plan-artifact.d.ts.map +1 -1
- package/library/detect-plan-artifact.js +45 -5
- package/library/detect-plan-artifact.js.map +1 -1
- package/library/detect-streaming-plan.d.ts +45 -0
- package/library/detect-streaming-plan.d.ts.map +1 -0
- package/library/detect-streaming-plan.js +83 -0
- package/library/detect-streaming-plan.js.map +1 -0
- package/library/index.d.ts +4 -1
- package/library/index.d.ts.map +1 -1
- package/library/index.js +2 -1
- package/library/index.js.map +1 -1
- package/package.json +4 -4
- package/session/NewSessionViewer.d.ts +19 -4
- package/session/NewSessionViewer.d.ts.map +1 -1
- package/session/NewSessionViewer.js +52 -25
- package/session/NewSessionViewer.js.map +1 -1
- package/session/PlanEditor.d.ts +55 -0
- package/session/PlanEditor.d.ts.map +1 -0
- package/session/PlanEditor.js +88 -0
- package/session/PlanEditor.js.map +1 -0
- package/session/PlanStreamingDocument.d.ts +30 -0
- package/session/PlanStreamingDocument.d.ts.map +1 -0
- package/session/PlanStreamingDocument.js +37 -0
- package/session/PlanStreamingDocument.js.map +1 -0
- package/session/SessionPanelChip.d.ts +26 -0
- package/session/SessionPanelChip.d.ts.map +1 -0
- package/session/SessionPanelChip.js +40 -0
- package/session/SessionPanelChip.js.map +1 -0
- package/session/SessionViewer.d.ts +34 -7
- package/session/SessionViewer.d.ts.map +1 -1
- package/session/SessionViewer.js +334 -33
- package/session/SessionViewer.js.map +1 -1
- package/session/{inspector → facets}/ArtifactsTab.d.ts +10 -2
- package/session/facets/ArtifactsTab.d.ts.map +1 -0
- package/session/{inspector → facets}/ArtifactsTab.js +8 -3
- package/session/facets/ArtifactsTab.js.map +1 -0
- package/session/{inspector → facets}/ChangesTab.d.ts +3 -3
- package/session/facets/ChangesTab.d.ts.map +1 -0
- package/session/{inspector → facets}/ChangesTab.js +3 -3
- package/session/facets/ChangesTab.js.map +1 -0
- package/session/facets/InspectTab.d.ts.map +1 -0
- package/session/facets/InspectTab.js.map +1 -0
- package/session/{inspector → facets}/SetupTab.d.ts +11 -2
- package/session/facets/SetupTab.d.ts.map +1 -0
- package/session/{inspector → facets}/SetupTab.js +4 -3
- package/session/facets/SetupTab.js.map +1 -0
- package/session/{inspector → facets}/UsageTab.d.ts +1 -1
- package/session/facets/UsageTab.d.ts.map +1 -0
- package/session/{inspector → facets}/UsageTab.js +1 -1
- package/session/facets/UsageTab.js.map +1 -0
- package/session/{inspector → facets}/index.d.ts +0 -6
- package/session/facets/index.d.ts.map +1 -0
- package/session/{inspector → facets}/index.js +0 -3
- package/session/facets/index.js.map +1 -0
- package/session/index.d.ts +11 -2
- package/session/index.d.ts.map +1 -1
- package/session/index.js +15 -2
- package/session/index.js.map +1 -1
- package/session/plan-document.d.ts +21 -0
- package/session/plan-document.d.ts.map +1 -0
- package/session/plan-document.js +28 -0
- package/session/plan-document.js.map +1 -0
- package/session/useOpenFileChange.d.ts +20 -0
- package/session/useOpenFileChange.d.ts.map +1 -0
- package/session/useOpenFileChange.js +31 -0
- package/session/useOpenFileChange.js.map +1 -0
- package/session/usePlanDraft.d.ts +52 -0
- package/session/usePlanDraft.d.ts.map +1 -0
- package/session/usePlanDraft.js +63 -0
- package/session/usePlanDraft.js.map +1 -0
- package/session/useSessionConversation.d.ts +14 -1
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +20 -2
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionPageFlow.d.ts.map +1 -1
- package/session/useSessionPageFlow.js +1 -0
- package/session/useSessionPageFlow.js.map +1 -1
- package/session/useSessionPanel.d.ts +120 -0
- package/session/useSessionPanel.d.ts.map +1 -0
- package/session/useSessionPanel.js +130 -0
- package/session/useSessionPanel.js.map +1 -0
- package/session/useSessionRailViews.d.ts +45 -0
- package/session/useSessionRailViews.d.ts.map +1 -0
- package/session/useSessionRailViews.js +105 -0
- package/session/useSessionRailViews.js.map +1 -0
- package/src/composer/SessionComposer.tsx +53 -10
- package/src/composer/__tests__/SessionComposer-contract.test.tsx +58 -4
- package/src/execution/ArtifactContentRenderer.tsx +101 -24
- package/src/execution/ArtifactPreviewModal.tsx +9 -9
- package/src/execution/FileChangeProgressBar.tsx +121 -0
- package/src/execution/FileChangesView.tsx +18 -4
- package/src/execution/FilePathContext.tsx +8 -1
- package/src/execution/FilePathLink.tsx +22 -6
- package/src/execution/FileReviewAtoms.tsx +89 -0
- package/src/execution/FileReviewCard.tsx +57 -90
- package/src/execution/MessageEntry.tsx +49 -1
- package/src/execution/MessageThread.tsx +308 -39
- package/src/execution/PlanArtifactCard.tsx +174 -64
- package/src/execution/PlanCompletionCard.tsx +5 -5
- package/src/execution/PlanDocumentMessage.tsx +96 -0
- package/src/execution/PlanStreamingCard.tsx +141 -0
- package/src/execution/__tests__/ArtifactContentRenderer.test.tsx +80 -1
- package/src/execution/__tests__/ArtifactPreviewModal.test.tsx +6 -6
- package/src/execution/__tests__/FileChangeProgressBar.test.tsx +125 -0
- package/src/execution/__tests__/FilePathLink.test.tsx +87 -0
- package/src/execution/__tests__/FileReviewCard.test.tsx +66 -7
- package/src/execution/__tests__/MessageThread.test.tsx +102 -1
- package/src/execution/__tests__/PlanArtifactCard.test.tsx +114 -26
- package/src/execution/__tests__/PlanCompletionCard.test.tsx +2 -2
- package/src/execution/__tests__/PlanDocumentMessage.test.tsx +55 -0
- package/src/execution/__tests__/PlanStreamingCard.test.tsx +56 -0
- package/src/execution/__tests__/buildThreadItems-plan-completion.test.ts +600 -22
- package/src/execution/__tests__/message-entry.test.tsx +17 -0
- package/src/execution/__tests__/useArtifactCopy.test.tsx +90 -0
- package/src/execution/__tests__/useArtifactDownload.test.tsx +2 -0
- package/src/execution/__tests__/useCreateAgentExecution.test.tsx +85 -0
- package/src/execution/index.ts +13 -1
- package/src/execution/use-build-from-plan-hotkey.ts +1 -1
- package/src/execution/useArtifactCopy.ts +109 -0
- package/src/execution/useArtifactDownload.ts +17 -5
- package/src/execution/useCreateAgentExecution.ts +18 -1
- package/src/github/__tests__/decodeGitHubContent.test.ts +102 -0
- package/src/github/__tests__/useGitHubFileReader.test.ts +183 -0
- package/src/github/decodeGitHubContent.ts +83 -0
- package/src/github/index.ts +1 -0
- package/src/github/useGitHubFileReader.ts +152 -0
- package/src/github/useGitHubTreeLister.ts +6 -2
- package/src/index.ts +69 -9
- package/src/internal/ResizableSplit.tsx +184 -51
- package/src/internal/VirtualizedThread.tsx +12 -4
- package/src/internal/__tests__/ResizableSplit.test.tsx +125 -3
- package/src/internal/__tests__/markdown-components.test.tsx +68 -0
- package/src/internal/__tests__/useRevealLine.test.tsx +97 -0
- package/src/internal/file-icons/__tests__/file-icons.test.tsx +35 -0
- package/src/internal/file-icons/index.tsx +137 -0
- package/src/internal/file-tree/FileTreeNode.tsx +56 -5
- package/src/internal/file-tree/__tests__/FileTreeNode-explorer.test.tsx +86 -0
- package/src/internal/markdown-components.tsx +116 -11
- package/src/{workflow → internal}/motion-preference.ts +7 -4
- package/src/internal/store/__tests__/workspace-editors-store.test.ts +216 -0
- package/src/internal/store/__tests__/workspace-file-selection-store.test.ts +118 -0
- package/src/internal/store/index.ts +94 -0
- package/src/internal/store/workspace-editors-store.ts +315 -0
- package/src/internal/store/workspace-file-selection-store.ts +88 -0
- package/src/internal/useRevealLine.ts +81 -0
- package/src/library/__tests__/detect-plan-artifact.test.ts +69 -0
- package/src/library/__tests__/detect-streaming-plan.test.ts +234 -0
- package/src/library/detect-plan-artifact.ts +62 -5
- package/src/library/detect-streaming-plan.ts +108 -0
- package/src/library/index.ts +7 -0
- package/src/session/NewSessionViewer.tsx +123 -55
- package/src/session/PlanEditor.tsx +361 -0
- package/src/session/PlanStreamingDocument.tsx +97 -0
- package/src/session/SessionPanelChip.tsx +103 -0
- package/src/session/SessionViewer.tsx +655 -96
- package/src/session/__tests__/NewSessionViewer.test.tsx +148 -0
- package/src/session/__tests__/PlanEditor.test.tsx +217 -0
- package/src/session/__tests__/PlanStreamingDocument.test.tsx +50 -0
- package/src/session/__tests__/SessionPanelChip.test.tsx +42 -0
- package/src/session/__tests__/SessionViewer-fileReviewDock.test.tsx +66 -4
- package/src/session/__tests__/SessionViewer-transcriptFileOpen.test.tsx +205 -0
- package/src/session/__tests__/audienceWiring.test.tsx +55 -19
- package/src/session/__tests__/useOpenFileChange.test.tsx +82 -0
- package/src/session/__tests__/usePlanDraft.test.ts +102 -0
- package/src/session/__tests__/useSessionConversation.test.tsx +44 -0
- package/src/session/__tests__/useSessionPanel.test.ts +298 -0
- package/src/session/__tests__/useSessionRailViews.test.tsx +124 -0
- package/src/session/{inspector → facets}/ArtifactsTab.tsx +27 -5
- package/src/session/{inspector → facets}/ChangesTab.tsx +3 -3
- package/src/session/{inspector → facets}/SetupTab.tsx +13 -1
- package/src/session/{inspector → facets}/UsageTab.tsx +1 -1
- package/src/session/{inspector → facets}/__tests__/ArtifactsTab.test.tsx +42 -8
- package/src/session/facets/__tests__/SetupTab.test.tsx +44 -0
- package/src/session/{inspector → facets}/index.ts +0 -16
- package/src/session/index.ts +30 -13
- package/src/session/plan-document.ts +30 -0
- package/src/session/useOpenFileChange.ts +53 -0
- package/src/session/usePlanDraft.ts +109 -0
- package/src/session/useSessionConversation.ts +38 -3
- package/src/session/useSessionPageFlow.ts +1 -0
- package/src/session/useSessionPanel.ts +288 -0
- package/src/session/useSessionRailViews.tsx +200 -0
- package/src/workflow/WorkflowExecutionGraph.tsx +1 -1
- package/src/workflow/index.ts +1 -1
- package/src/workflow/useFollowExecution.ts +1 -1
- package/src/workspace/EditorTabs.tsx +174 -0
- package/src/workspace/ExplorerTree.tsx +253 -0
- package/src/workspace/FileViewer.tsx +537 -0
- package/src/workspace/WorkspaceContentSearch.tsx +502 -0
- package/src/workspace/WorkspaceContentSearcher.ts +70 -0
- package/src/workspace/WorkspaceEditor.tsx +19 -16
- package/src/workspace/WorkspaceFileLister.ts +11 -0
- package/src/workspace/WorkspaceFileReader.ts +57 -0
- package/src/workspace/WorkspaceFileSearch.tsx +452 -0
- package/src/workspace/WorkspaceSurface.tsx +839 -0
- package/src/workspace/__tests__/EditorTabs.test.tsx +102 -0
- package/src/workspace/__tests__/ExplorerTree.test.tsx +204 -0
- package/src/workspace/__tests__/FileViewer.test.tsx +439 -0
- package/src/workspace/__tests__/WorkspaceContentSearch.test.tsx +229 -0
- package/src/workspace/__tests__/WorkspaceEditor-initialPanel.test.tsx +19 -0
- package/src/workspace/__tests__/WorkspaceFileSearch.test.tsx +227 -0
- package/src/workspace/__tests__/WorkspaceSurface.test.tsx +418 -0
- package/src/workspace/__tests__/a11y/harness.tsx +140 -0
- package/src/workspace/__tests__/a11y/mock-capabilities.ts +138 -0
- package/src/workspace/__tests__/a11y/workspace-editor.a11y.test.tsx +65 -0
- package/src/workspace/__tests__/a11y/workspace-explorer-search.a11y.test.tsx +112 -0
- package/src/workspace/__tests__/a11y/workspace-viewer-tabs.a11y.test.tsx +69 -0
- package/src/workspace/__tests__/findChangeForSelection.test.ts +132 -0
- package/src/workspace/__tests__/matchContentPreview.test.ts +55 -0
- package/src/workspace/__tests__/matchWorkspaceFiles.test.ts +104 -0
- package/src/workspace/__tests__/resolveWorkspaceFileSelection.test.ts +135 -0
- package/src/workspace/__tests__/useWorkspaceContentSearch.test.tsx +196 -0
- package/src/workspace/__tests__/useWorkspaceFileContent.test.tsx +190 -0
- package/src/workspace/__tests__/useWorkspaceFileSearch.test.tsx +162 -0
- package/src/workspace/findChangeForSelection.ts +61 -0
- package/src/workspace/index.ts +56 -2
- package/src/workspace/matchContentPreview.ts +51 -0
- package/src/workspace/matchWorkspaceFiles.ts +86 -0
- package/src/workspace/resolveWorkspaceFileSelection.ts +119 -0
- package/src/workspace/useWorkspaceContentSearch.ts +228 -0
- package/src/workspace/useWorkspaceFileContent.ts +129 -0
- package/src/workspace/useWorkspaceFileSearch.ts +184 -0
- package/src/workspace/useWorkspaceFiles.ts +27 -27
- package/src/workspace/workspaceListingCache.ts +93 -0
- package/styles.css +1 -1
- package/workflow/WorkflowExecutionGraph.js +1 -1
- package/workflow/WorkflowExecutionGraph.js.map +1 -1
- package/workflow/index.d.ts +1 -1
- package/workflow/index.d.ts.map +1 -1
- package/workflow/index.js +1 -1
- package/workflow/index.js.map +1 -1
- package/workflow/useFollowExecution.js +1 -1
- package/workflow/useFollowExecution.js.map +1 -1
- package/workspace/EditorTabs.d.ts +47 -0
- package/workspace/EditorTabs.d.ts.map +1 -0
- package/workspace/EditorTabs.js +78 -0
- package/workspace/EditorTabs.js.map +1 -0
- package/workspace/ExplorerTree.d.ts +32 -0
- package/workspace/ExplorerTree.d.ts.map +1 -0
- package/workspace/ExplorerTree.js +49 -0
- package/workspace/ExplorerTree.js.map +1 -0
- package/workspace/FileViewer.d.ts +93 -0
- package/workspace/FileViewer.d.ts.map +1 -0
- package/workspace/FileViewer.js +193 -0
- package/workspace/FileViewer.js.map +1 -0
- package/workspace/WorkspaceContentSearch.d.ts +41 -0
- package/workspace/WorkspaceContentSearch.d.ts.map +1 -0
- package/workspace/WorkspaceContentSearch.js +216 -0
- package/workspace/WorkspaceContentSearch.js.map +1 -0
- package/workspace/WorkspaceContentSearcher.d.ts +59 -0
- package/workspace/WorkspaceContentSearcher.d.ts.map +1 -0
- package/workspace/WorkspaceContentSearcher.js +7 -0
- package/workspace/WorkspaceContentSearcher.js.map +1 -0
- package/workspace/WorkspaceEditor.d.ts.map +1 -1
- package/workspace/WorkspaceEditor.js +8 -10
- package/workspace/WorkspaceEditor.js.map +1 -1
- package/workspace/WorkspaceFileLister.d.ts +11 -0
- package/workspace/WorkspaceFileLister.d.ts.map +1 -1
- package/workspace/WorkspaceFileReader.d.ts +48 -0
- package/workspace/WorkspaceFileReader.d.ts.map +1 -0
- package/workspace/WorkspaceFileReader.js +11 -0
- package/workspace/WorkspaceFileReader.js.map +1 -0
- package/workspace/WorkspaceFileSearch.d.ts +32 -0
- package/workspace/WorkspaceFileSearch.d.ts.map +1 -0
- package/workspace/WorkspaceFileSearch.js +175 -0
- package/workspace/WorkspaceFileSearch.js.map +1 -0
- package/workspace/WorkspaceSurface.d.ts +151 -0
- package/workspace/WorkspaceSurface.d.ts.map +1 -0
- package/workspace/WorkspaceSurface.js +220 -0
- package/workspace/WorkspaceSurface.js.map +1 -0
- package/workspace/findChangeForSelection.d.ts +19 -0
- package/workspace/findChangeForSelection.d.ts.map +1 -0
- package/workspace/findChangeForSelection.js +46 -0
- package/workspace/findChangeForSelection.js.map +1 -0
- package/workspace/index.d.ts +24 -2
- package/workspace/index.d.ts.map +1 -1
- package/workspace/index.js +13 -1
- package/workspace/index.js.map +1 -1
- package/workspace/matchContentPreview.d.ts +21 -0
- package/workspace/matchContentPreview.d.ts.map +1 -0
- package/workspace/matchContentPreview.js +36 -0
- package/workspace/matchContentPreview.js.map +1 -0
- package/workspace/matchWorkspaceFiles.d.ts +30 -0
- package/workspace/matchWorkspaceFiles.d.ts.map +1 -0
- package/workspace/matchWorkspaceFiles.js +58 -0
- package/workspace/matchWorkspaceFiles.js.map +1 -0
- package/workspace/resolveWorkspaceFileSelection.d.ts +19 -0
- package/workspace/resolveWorkspaceFileSelection.d.ts.map +1 -0
- package/workspace/resolveWorkspaceFileSelection.js +115 -0
- package/workspace/resolveWorkspaceFileSelection.js.map +1 -0
- package/workspace/useWorkspaceContentSearch.d.ts +69 -0
- package/workspace/useWorkspaceContentSearch.d.ts.map +1 -0
- package/workspace/useWorkspaceContentSearch.js +154 -0
- package/workspace/useWorkspaceContentSearch.js.map +1 -0
- package/workspace/useWorkspaceFileContent.d.ts +73 -0
- package/workspace/useWorkspaceFileContent.d.ts.map +1 -0
- package/workspace/useWorkspaceFileContent.js +57 -0
- package/workspace/useWorkspaceFileContent.js.map +1 -0
- package/workspace/useWorkspaceFileSearch.d.ts +61 -0
- package/workspace/useWorkspaceFileSearch.d.ts.map +1 -0
- package/workspace/useWorkspaceFileSearch.js +119 -0
- package/workspace/useWorkspaceFileSearch.js.map +1 -0
- package/workspace/useWorkspaceFiles.d.ts +13 -5
- package/workspace/useWorkspaceFiles.d.ts.map +1 -1
- package/workspace/useWorkspaceFiles.js +18 -19
- package/workspace/useWorkspaceFiles.js.map +1 -1
- package/workspace/workspaceListingCache.d.ts +47 -0
- package/workspace/workspaceListingCache.d.ts.map +1 -0
- package/workspace/workspaceListingCache.js +55 -0
- package/workspace/workspaceListingCache.js.map +1 -0
- package/session/inspector/ArtifactsTab.d.ts.map +0 -1
- package/session/inspector/ArtifactsTab.js.map +0 -1
- package/session/inspector/ChangesTab.d.ts.map +0 -1
- package/session/inspector/ChangesTab.js.map +0 -1
- package/session/inspector/InspectTab.d.ts.map +0 -1
- package/session/inspector/InspectTab.js.map +0 -1
- package/session/inspector/SessionInspector.d.ts +0 -64
- package/session/inspector/SessionInspector.d.ts.map +0 -1
- package/session/inspector/SessionInspector.js +0 -53
- package/session/inspector/SessionInspector.js.map +0 -1
- package/session/inspector/SetupTab.d.ts.map +0 -1
- package/session/inspector/SetupTab.js.map +0 -1
- package/session/inspector/UsageTab.d.ts.map +0 -1
- package/session/inspector/UsageTab.js.map +0 -1
- package/session/inspector/WorkspaceTab.d.ts +0 -35
- package/session/inspector/WorkspaceTab.d.ts.map +0 -1
- package/session/inspector/WorkspaceTab.js +0 -75
- package/session/inspector/WorkspaceTab.js.map +0 -1
- package/session/inspector/index.d.ts.map +0 -1
- package/session/inspector/index.js.map +0 -1
- package/session/inspector/useSessionInspector.d.ts +0 -49
- package/session/inspector/useSessionInspector.d.ts.map +0 -1
- package/session/inspector/useSessionInspector.js +0 -122
- package/session/inspector/useSessionInspector.js.map +0 -1
- package/src/session/inspector/SessionInspector.tsx +0 -162
- package/src/session/inspector/WorkspaceTab.tsx +0 -245
- package/src/session/inspector/__tests__/useSessionInspector.test.ts +0 -251
- package/src/session/inspector/useSessionInspector.ts +0 -178
- package/src/workspace/WorkspaceEntryFiles.tsx +0 -196
- package/workflow/motion-preference.d.ts.map +0 -1
- package/workflow/motion-preference.js.map +0 -1
- package/workspace/WorkspaceEntryFiles.d.ts +0 -22
- package/workspace/WorkspaceEntryFiles.d.ts.map +0 -1
- package/workspace/WorkspaceEntryFiles.js +0 -58
- package/workspace/WorkspaceEntryFiles.js.map +0 -1
- /package/session/{inspector → facets}/InspectTab.d.ts +0 -0
- /package/session/{inspector → facets}/InspectTab.js +0 -0
- /package/src/{workflow → internal}/__tests__/motion-preference.test.ts +0 -0
- /package/src/session/{inspector → facets}/InspectTab.tsx +0 -0
- /package/src/session/{inspector → facets}/__tests__/ChangesTab.test.tsx +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { describe, it, expect, vi, afterEach } from "vitest";
|
|
2
|
+
import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
3
|
+
import { EditorTabs } from "../EditorTabs";
|
|
4
|
+
import { editorKey, type OpenEditor } from "../../internal/store/index";
|
|
5
|
+
|
|
6
|
+
const editors: OpenEditor[] = [
|
|
7
|
+
{ entryId: "e1", path: "src/a.ts", preview: false },
|
|
8
|
+
{ entryId: "e1", path: "src/b.ts", preview: true },
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
function renderTabs(
|
|
12
|
+
overrides: Partial<React.ComponentProps<typeof EditorTabs>> = {},
|
|
13
|
+
) {
|
|
14
|
+
const onActivate = vi.fn();
|
|
15
|
+
const onPin = vi.fn();
|
|
16
|
+
const onClose = vi.fn();
|
|
17
|
+
render(
|
|
18
|
+
<EditorTabs
|
|
19
|
+
editors={editors}
|
|
20
|
+
activeKey={editorKey("e1", "src/a.ts")}
|
|
21
|
+
onActivate={onActivate}
|
|
22
|
+
onPin={onPin}
|
|
23
|
+
onClose={onClose}
|
|
24
|
+
{...overrides}
|
|
25
|
+
/>,
|
|
26
|
+
);
|
|
27
|
+
return { onActivate, onPin, onClose };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
afterEach(() => cleanup());
|
|
31
|
+
|
|
32
|
+
describe("EditorTabs", () => {
|
|
33
|
+
it("renders a tab per editor with basenames", () => {
|
|
34
|
+
renderTabs();
|
|
35
|
+
expect(screen.getByRole("tab", { name: /a\.ts/ })).toBeTruthy();
|
|
36
|
+
expect(screen.getByRole("tab", { name: /b\.ts/ })).toBeTruthy();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it("marks the active tab aria-selected", () => {
|
|
40
|
+
renderTabs();
|
|
41
|
+
expect(
|
|
42
|
+
screen.getByRole("tab", { name: /a\.ts/ }).getAttribute("aria-selected"),
|
|
43
|
+
).toBe("true");
|
|
44
|
+
expect(
|
|
45
|
+
screen.getByRole("tab", { name: /b\.ts/ }).getAttribute("aria-selected"),
|
|
46
|
+
).toBe("false");
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("renders the preview tab label in italics", () => {
|
|
50
|
+
renderTabs();
|
|
51
|
+
// b.ts is the preview tab; its label span carries the italic class.
|
|
52
|
+
const label = screen.getByText("b.ts");
|
|
53
|
+
expect(label.className).toContain("italic");
|
|
54
|
+
const pinnedLabel = screen.getByText("a.ts");
|
|
55
|
+
expect(pinnedLabel.className).not.toContain("italic");
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it("activates a tab on click", () => {
|
|
59
|
+
const { onActivate } = renderTabs();
|
|
60
|
+
fireEvent.click(screen.getByRole("tab", { name: /b\.ts/ }));
|
|
61
|
+
expect(onActivate).toHaveBeenCalledWith("e1", "src/b.ts");
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("pins a tab on double click", () => {
|
|
65
|
+
const { onPin } = renderTabs();
|
|
66
|
+
fireEvent.doubleClick(screen.getByRole("tab", { name: /b\.ts/ }));
|
|
67
|
+
expect(onPin).toHaveBeenCalledWith("e1", "src/b.ts");
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it("closes a tab via its close affordance (presentational, aria-hidden)", () => {
|
|
71
|
+
const { onClose } = renderTabs();
|
|
72
|
+
// The close "X" is a presentational span (not a nested button) to satisfy
|
|
73
|
+
// WCAG 4.1.2; it is addressable by its title.
|
|
74
|
+
fireEvent.click(screen.getByTitle("Close a.ts"));
|
|
75
|
+
expect(onClose).toHaveBeenCalledWith("e1", "src/a.ts");
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it("closes a tab on middle click", () => {
|
|
79
|
+
const { onClose } = renderTabs();
|
|
80
|
+
fireEvent(
|
|
81
|
+
screen.getByRole("tab", { name: /a\.ts/ }),
|
|
82
|
+
new MouseEvent("auxclick", { bubbles: true, button: 1 }),
|
|
83
|
+
);
|
|
84
|
+
expect(onClose).toHaveBeenCalledWith("e1", "src/a.ts");
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("moves activation with arrow keys", () => {
|
|
88
|
+
const { onActivate } = renderTabs();
|
|
89
|
+
fireEvent.keyDown(screen.getByRole("tab", { name: /a\.ts/ }), {
|
|
90
|
+
key: "ArrowRight",
|
|
91
|
+
});
|
|
92
|
+
expect(onActivate).toHaveBeenCalledWith("e1", "src/b.ts");
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it("closes the focused tab on Delete", () => {
|
|
96
|
+
const { onClose } = renderTabs();
|
|
97
|
+
fireEvent.keyDown(screen.getByRole("tab", { name: /a\.ts/ }), {
|
|
98
|
+
key: "Delete",
|
|
99
|
+
});
|
|
100
|
+
expect(onClose).toHaveBeenCalledWith("e1", "src/a.ts");
|
|
101
|
+
});
|
|
102
|
+
});
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { describe, it, expect, vi, afterEach } from "vitest";
|
|
2
|
+
import { render, screen, fireEvent, cleanup } from "@testing-library/react";
|
|
3
|
+
import { ExplorerTree } from "../ExplorerTree";
|
|
4
|
+
import type { WorkspaceEntry } from "../useWorkspaceEntries";
|
|
5
|
+
import type { WorkspaceFileLister } from "../WorkspaceFileLister";
|
|
6
|
+
|
|
7
|
+
afterEach(cleanup);
|
|
8
|
+
|
|
9
|
+
// Unique entry ids per test — `useWorkspaceFiles` keys a module-level cache by
|
|
10
|
+
// entry.id, so reusing ids would leak listings across tests.
|
|
11
|
+
function entry(id: string, name = "acme/repo"): WorkspaceEntry {
|
|
12
|
+
return {
|
|
13
|
+
id,
|
|
14
|
+
name,
|
|
15
|
+
type: "git",
|
|
16
|
+
gitUrl: "https://github.com/acme/repo",
|
|
17
|
+
gitBranch: "main",
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function lister(paths: string[]): WorkspaceFileLister {
|
|
22
|
+
return vi.fn(async () => paths.map((path) => ({ path, isDirectory: false })));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
describe("ExplorerTree", () => {
|
|
26
|
+
it("renders a root header and its top-level files", async () => {
|
|
27
|
+
render(
|
|
28
|
+
<ExplorerTree
|
|
29
|
+
entries={[entry("x1")]}
|
|
30
|
+
lister={lister(["a.ts", "README.md"])}
|
|
31
|
+
selectedFile={null}
|
|
32
|
+
onOpenFile={vi.fn()}
|
|
33
|
+
onActivateFile={vi.fn()}
|
|
34
|
+
/>,
|
|
35
|
+
);
|
|
36
|
+
expect(screen.getByText("acme/repo")).toBeTruthy();
|
|
37
|
+
expect(await screen.findByText("a.ts")).toBeTruthy();
|
|
38
|
+
expect(screen.getByText("README.md")).toBeTruthy();
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it("starts folders collapsed, revealing children on expand", async () => {
|
|
42
|
+
render(
|
|
43
|
+
<ExplorerTree
|
|
44
|
+
entries={[entry("x1b")]}
|
|
45
|
+
lister={lister(["src/nested.ts"])}
|
|
46
|
+
selectedFile={null}
|
|
47
|
+
onOpenFile={vi.fn()}
|
|
48
|
+
onActivateFile={vi.fn()}
|
|
49
|
+
/>,
|
|
50
|
+
);
|
|
51
|
+
const folder = await screen.findByText("src");
|
|
52
|
+
expect(screen.queryByText("nested.ts")).toBeNull();
|
|
53
|
+
fireEvent.click(folder);
|
|
54
|
+
expect(await screen.findByText("nested.ts")).toBeTruthy();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("opens a file (preview) on single click", async () => {
|
|
58
|
+
const onOpenFile = vi.fn();
|
|
59
|
+
render(
|
|
60
|
+
<ExplorerTree
|
|
61
|
+
entries={[entry("x2")]}
|
|
62
|
+
lister={lister(["a.ts"])}
|
|
63
|
+
selectedFile={null}
|
|
64
|
+
onOpenFile={onOpenFile}
|
|
65
|
+
onActivateFile={vi.fn()}
|
|
66
|
+
/>,
|
|
67
|
+
);
|
|
68
|
+
fireEvent.click(await screen.findByText("a.ts"));
|
|
69
|
+
expect(onOpenFile).toHaveBeenCalledWith("x2", "a.ts");
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("pins a file (activate) on double click", async () => {
|
|
73
|
+
const onActivateFile = vi.fn();
|
|
74
|
+
render(
|
|
75
|
+
<ExplorerTree
|
|
76
|
+
entries={[entry("x3")]}
|
|
77
|
+
lister={lister(["a.ts"])}
|
|
78
|
+
selectedFile={null}
|
|
79
|
+
onOpenFile={vi.fn()}
|
|
80
|
+
onActivateFile={onActivateFile}
|
|
81
|
+
/>,
|
|
82
|
+
);
|
|
83
|
+
fireEvent.doubleClick(await screen.findByText("a.ts"));
|
|
84
|
+
expect(onActivateFile).toHaveBeenCalledWith("x3", "a.ts");
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("highlights the selected file scoped to its entry", async () => {
|
|
88
|
+
render(
|
|
89
|
+
<ExplorerTree
|
|
90
|
+
entries={[entry("x4")]}
|
|
91
|
+
lister={lister(["a.ts", "b.ts"])}
|
|
92
|
+
selectedFile={{ entryId: "x4", path: "a.ts" }}
|
|
93
|
+
onOpenFile={vi.fn()}
|
|
94
|
+
onActivateFile={vi.fn()}
|
|
95
|
+
/>,
|
|
96
|
+
);
|
|
97
|
+
const selected = await screen.findByText("a.ts");
|
|
98
|
+
const other = screen.getByText("b.ts");
|
|
99
|
+
expect(selected.closest("button")?.getAttribute("aria-current")).toBe("true");
|
|
100
|
+
expect(other.closest("button")?.getAttribute("aria-current")).toBeNull();
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it("collapses all but the first root by default", async () => {
|
|
104
|
+
render(
|
|
105
|
+
<ExplorerTree
|
|
106
|
+
entries={[entry("x5a", "first"), entry("x5b", "second")]}
|
|
107
|
+
lister={lister(["a.ts"])}
|
|
108
|
+
selectedFile={null}
|
|
109
|
+
onOpenFile={vi.fn()}
|
|
110
|
+
onActivateFile={vi.fn()}
|
|
111
|
+
/>,
|
|
112
|
+
);
|
|
113
|
+
// First root is expanded (its file shows); second root header shows but its
|
|
114
|
+
// tree is not fetched/rendered until expanded.
|
|
115
|
+
expect(await screen.findByText("a.ts")).toBeTruthy();
|
|
116
|
+
const second = screen.getByText("second").closest("button")!;
|
|
117
|
+
expect(second.getAttribute("aria-expanded")).toBe("false");
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it("offers a remove control per root when onRemoveEntry is provided", async () => {
|
|
121
|
+
const onRemoveEntry = vi.fn();
|
|
122
|
+
render(
|
|
123
|
+
<ExplorerTree
|
|
124
|
+
entries={[entry("x6")]}
|
|
125
|
+
lister={lister(["a.ts"])}
|
|
126
|
+
selectedFile={null}
|
|
127
|
+
onOpenFile={vi.fn()}
|
|
128
|
+
onActivateFile={vi.fn()}
|
|
129
|
+
onRemoveEntry={onRemoveEntry}
|
|
130
|
+
/>,
|
|
131
|
+
);
|
|
132
|
+
fireEvent.click(
|
|
133
|
+
screen.getByRole("button", { name: "Remove acme/repo from workspace" }),
|
|
134
|
+
);
|
|
135
|
+
expect(onRemoveEntry).toHaveBeenCalledWith("x6");
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
it("is browse-only (no remove controls) without onRemoveEntry", () => {
|
|
139
|
+
render(
|
|
140
|
+
<ExplorerTree
|
|
141
|
+
entries={[entry("x7")]}
|
|
142
|
+
lister={lister(["a.ts"])}
|
|
143
|
+
selectedFile={null}
|
|
144
|
+
onOpenFile={vi.fn()}
|
|
145
|
+
onActivateFile={vi.fn()}
|
|
146
|
+
/>,
|
|
147
|
+
);
|
|
148
|
+
expect(
|
|
149
|
+
screen.queryByRole("button", { name: /Remove .* from workspace/ }),
|
|
150
|
+
).toBeNull();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
it("exposes tree depth via aria-level and keeps aria-expanded on the treeitem", async () => {
|
|
154
|
+
render(
|
|
155
|
+
<ExplorerTree
|
|
156
|
+
entries={[entry("x9")]}
|
|
157
|
+
lister={lister(["src/nested.ts"])}
|
|
158
|
+
selectedFile={null}
|
|
159
|
+
onOpenFile={vi.fn()}
|
|
160
|
+
onActivateFile={vi.fn()}
|
|
161
|
+
/>,
|
|
162
|
+
);
|
|
163
|
+
const folder = await screen.findByText("src");
|
|
164
|
+
const folderItem = folder.closest('[role="treeitem"]')!;
|
|
165
|
+
// Top-level treeitem is level 1; expandability is announced on the treeitem.
|
|
166
|
+
expect(folderItem.getAttribute("aria-level")).toBe("1");
|
|
167
|
+
expect(folderItem.getAttribute("aria-expanded")).toBe("false");
|
|
168
|
+
|
|
169
|
+
fireEvent.click(folder);
|
|
170
|
+
const nested = await screen.findByText("nested.ts");
|
|
171
|
+
expect(nested.closest('[role="treeitem"]')!.getAttribute("aria-level")).toBe(
|
|
172
|
+
"2",
|
|
173
|
+
);
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
it("shows a substrate-agnostic truncation banner from a notice entry (DD-11)", async () => {
|
|
177
|
+
// A lister that signals an incomplete listing via a `notice` entry (as the
|
|
178
|
+
// desktop and GitHub listers do). The advisory is stripped from the tree and
|
|
179
|
+
// surfaced as a banner instead.
|
|
180
|
+
const truncatedLister: WorkspaceFileLister = vi.fn(async () => [
|
|
181
|
+
{ path: "a.ts", isDirectory: false },
|
|
182
|
+
{
|
|
183
|
+
path: "... (listing truncated)",
|
|
184
|
+
isDirectory: false,
|
|
185
|
+
notice: true as const,
|
|
186
|
+
},
|
|
187
|
+
]);
|
|
188
|
+
render(
|
|
189
|
+
<ExplorerTree
|
|
190
|
+
entries={[entry("x8")]}
|
|
191
|
+
lister={truncatedLister}
|
|
192
|
+
selectedFile={null}
|
|
193
|
+
onOpenFile={vi.fn()}
|
|
194
|
+
onActivateFile={vi.fn()}
|
|
195
|
+
/>,
|
|
196
|
+
);
|
|
197
|
+
const banner = await screen.findByText(/too many files to load in full/i);
|
|
198
|
+
expect(banner).toBeTruthy();
|
|
199
|
+
// Wording must read correctly for a local folder, not just a git repo.
|
|
200
|
+
expect(banner.textContent).not.toMatch(/repository/i);
|
|
201
|
+
// The notice advisory is never an openable tree leaf.
|
|
202
|
+
expect(screen.queryByText("... (listing truncated)")).toBeNull();
|
|
203
|
+
});
|
|
204
|
+
});
|