xtralab 0.14.1 → 0.15.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/README.md +10 -0
- package/lib/about/icons.d.ts +0 -5
- package/lib/about/icons.js +0 -5
- package/lib/about/index.d.ts +4 -8
- package/lib/about/index.js +6 -17
- package/lib/agentSessions.d.ts +9 -29
- package/lib/agentSessions.js +2 -7
- package/lib/askAgent/editorSelection.d.ts +20 -26
- package/lib/askAgent/editorSelection.js +11 -26
- package/lib/askAgent/icons.d.ts +2 -3
- package/lib/askAgent/icons.js +2 -3
- package/lib/askAgent/index.d.ts +4 -26
- package/lib/askAgent/index.js +54 -158
- package/lib/askAgent/popup.d.ts +12 -16
- package/lib/askAgent/popup.js +18 -37
- package/lib/askAgent/prompt.d.ts +3 -5
- package/lib/askAgent/prompt.js +6 -19
- package/lib/askAgent/queue.d.ts +11 -21
- package/lib/askAgent/queue.js +9 -19
- package/lib/askAgent/queuePanel.d.ts +13 -18
- package/lib/askAgent/queuePanel.js +15 -37
- package/lib/askAgent/targetPicker.d.ts +2 -9
- package/lib/askAgent/targetPicker.js +6 -11
- package/lib/askAgent/tokens.d.ts +32 -46
- package/lib/askAgent/tokens.js +4 -6
- package/lib/commandBar/index.d.ts +4 -13
- package/lib/commandBar/index.js +21 -39
- package/lib/customPanel/index.d.ts +7 -0
- package/lib/customPanel/index.js +89 -0
- package/lib/editorBreadcrumbs/index.d.ts +3 -6
- package/lib/editorBreadcrumbs/index.js +10 -6
- package/lib/editorBreadcrumbs/widget.d.ts +17 -4
- package/lib/editorBreadcrumbs/widget.js +11 -17
- package/lib/editorIndent/index.d.ts +4 -12
- package/lib/editorIndent/index.js +8 -23
- package/lib/fileBrowser/commands.d.ts +28 -19
- package/lib/fileBrowser/commands.js +51 -98
- package/lib/fileBrowser/contents.d.ts +14 -0
- package/lib/fileBrowser/contents.js +28 -0
- package/lib/fileBrowser/dragAndDrop.d.ts +79 -0
- package/lib/fileBrowser/dragAndDrop.js +110 -0
- package/lib/fileBrowser/fileBrowser.d.ts +21 -9
- package/lib/fileBrowser/fileBrowser.js +211 -405
- package/lib/fileBrowser/gitStatus.d.ts +4 -9
- package/lib/fileBrowser/gitStatus.js +7 -17
- package/lib/fileBrowser/gitignore.d.ts +4 -17
- package/lib/fileBrowser/gitignore.js +4 -25
- package/lib/fileBrowser/icons.d.ts +7 -17
- package/lib/fileBrowser/icons.js +25 -80
- package/lib/fileBrowser/index.js +41 -10
- package/lib/fileBrowser/widget.d.ts +170 -53
- package/lib/fileBrowser/widget.js +242 -18
- package/lib/fileTypeIcons/index.js +0 -10
- package/lib/git/api.d.ts +5 -13
- package/lib/git/api.js +10 -36
- package/lib/git/askRequest.d.ts +4 -8
- package/lib/git/askRequest.js +6 -20
- package/lib/git/commands.d.ts +40 -5
- package/lib/git/commands.js +16 -10
- package/lib/git/diffModel.js +4 -0
- package/lib/git/diffSurface.d.ts +41 -55
- package/lib/git/diffSurface.js +42 -117
- package/lib/git/diffWidget.d.ts +81 -2
- package/lib/git/diffWidget.js +62 -12
- package/lib/git/imageDiff.d.ts +5 -6
- package/lib/git/imageDiff.js +18 -48
- package/lib/git/index.d.ts +0 -3
- package/lib/git/index.js +3 -8
- package/lib/git/notebookDiff.d.ts +110 -33
- package/lib/git/notebookDiff.js +52 -195
- package/lib/git/tokens.d.ts +73 -31
- package/lib/git/tokens.js +2 -3
- package/lib/highlight/index.d.ts +4 -10
- package/lib/highlight/index.js +10 -41
- package/lib/index.d.ts +0 -9
- package/lib/index.js +2 -9
- package/lib/launcher/agents.d.ts +55 -51
- package/lib/launcher/agents.js +25 -54
- package/lib/launcher/availability.d.ts +3 -9
- package/lib/launcher/availability.js +3 -9
- package/lib/launcher/commands.d.ts +7 -32
- package/lib/launcher/commands.js +14 -45
- package/lib/launcher/dashboard.d.ts +19 -24
- package/lib/launcher/dashboard.js +21 -67
- package/lib/launcher/editorRegistry.d.ts +10 -22
- package/lib/launcher/editorRegistry.js +14 -18
- package/lib/launcher/editors.d.ts +39 -45
- package/lib/launcher/editors.js +8 -34
- package/lib/launcher/icons.d.ts +0 -12
- package/lib/launcher/icons.js +14 -37
- package/lib/launcher/index.js +12 -55
- package/lib/launcher/invocation.d.ts +4 -10
- package/lib/launcher/invocation.js +7 -22
- package/lib/launcher/registry.d.ts +9 -7
- package/lib/launcher/registry.js +9 -7
- package/lib/launcher/schemaDefaults.d.ts +2 -9
- package/lib/launcher/schemaDefaults.js +37 -13
- package/lib/launcher/tokens.d.ts +10 -22
- package/lib/launcher/tokens.js +5 -8
- package/lib/menuBar/index.d.ts +3 -10
- package/lib/menuBar/index.js +11 -28
- package/lib/menus/index.d.ts +3 -9
- package/lib/menus/index.js +14 -30
- package/lib/omnibox/files.d.ts +2 -4
- package/lib/omnibox/files.js +5 -11
- package/lib/omnibox/index.d.ts +4 -14
- package/lib/omnibox/index.js +9 -27
- package/lib/omnibox/model.d.ts +38 -10
- package/lib/omnibox/model.js +15 -33
- package/lib/omnibox/recents.d.ts +15 -17
- package/lib/omnibox/recents.js +12 -17
- package/lib/omnibox/tokens.d.ts +5 -10
- package/lib/omnibox/tokens.js +2 -6
- package/lib/omnibox/widget.d.ts +11 -7
- package/lib/omnibox/widget.js +8 -16
- package/lib/searchReplace/index.d.ts +4 -20
- package/lib/searchReplace/index.js +7 -27
- package/lib/showOutput/index.d.ts +3 -12
- package/lib/showOutput/index.js +6 -22
- package/lib/sidebar/index.d.ts +4 -13
- package/lib/sidebar/index.js +73 -46
- package/lib/terminalNotifications/index.d.ts +4 -10
- package/lib/terminalNotifications/index.js +6 -20
- package/lib/terminals/agentTerminals.d.ts +12 -5
- package/lib/terminals/agentTerminals.js +25 -44
- package/lib/terminals/detection.d.ts +4 -8
- package/lib/terminals/detection.js +4 -8
- package/lib/terminals/index.d.ts +0 -33
- package/lib/terminals/index.js +24 -102
- package/lib/terminals/model.d.ts +64 -139
- package/lib/terminals/model.js +80 -220
- package/lib/terminals/tokens.d.ts +11 -22
- package/lib/terminals/tokens.js +2 -2
- package/lib/terminals/widget.d.ts +72 -38
- package/lib/terminals/widget.js +173 -73
- package/lib/topBar/icons.d.ts +3 -8
- package/lib/topBar/icons.js +3 -8
- package/lib/topBar/index.d.ts +4 -11
- package/lib/topBar/index.js +10 -38
- package/lib/walkthrough/index.d.ts +4 -9
- package/lib/walkthrough/index.js +6 -20
- package/lib/walkthrough/panel.d.ts +40 -9
- package/lib/walkthrough/panel.js +4 -10
- package/package.json +2 -2
- package/schema/launcher.json +2 -2
- package/schema/sidebar.json +47 -7
- package/src/about/icons.ts +0 -5
- package/src/about/index.tsx +6 -17
- package/src/agentSessions.ts +9 -29
- package/src/askAgent/editorSelection.ts +22 -29
- package/src/askAgent/icons.ts +2 -3
- package/src/askAgent/index.ts +54 -158
- package/src/askAgent/popup.tsx +23 -45
- package/src/askAgent/prompt.ts +6 -19
- package/src/askAgent/queue.ts +13 -24
- package/src/askAgent/queuePanel.tsx +21 -46
- package/src/askAgent/targetPicker.tsx +5 -15
- package/src/askAgent/tokens.ts +32 -46
- package/src/commandBar/index.ts +24 -39
- package/src/customPanel/index.ts +119 -0
- package/src/editorBreadcrumbs/index.ts +10 -6
- package/src/editorBreadcrumbs/widget.ts +23 -17
- package/src/editorIndent/index.ts +17 -23
- package/src/fileBrowser/commands.ts +70 -98
- package/src/fileBrowser/contents.ts +33 -0
- package/src/fileBrowser/dragAndDrop.ts +188 -0
- package/src/fileBrowser/fileBrowser.tsx +259 -440
- package/src/fileBrowser/gitStatus.ts +7 -17
- package/src/fileBrowser/gitignore.ts +4 -25
- package/src/fileBrowser/icons.ts +25 -80
- package/src/fileBrowser/index.ts +43 -10
- package/src/fileBrowser/widget.tsx +344 -64
- package/src/fileTypeIcons/index.ts +0 -10
- package/src/git/api.ts +10 -36
- package/src/git/askRequest.ts +6 -20
- package/src/git/commands.ts +70 -10
- package/src/git/diffModel.ts +25 -0
- package/src/git/diffSurface.tsx +71 -159
- package/src/git/diffWidget.tsx +104 -14
- package/src/git/imageDiff.tsx +45 -51
- package/src/git/index.ts +3 -8
- package/src/git/notebookDiff.tsx +211 -238
- package/src/git/tokens.ts +73 -31
- package/src/highlight/index.ts +10 -41
- package/src/index.ts +2 -9
- package/src/launcher/agents.ts +74 -92
- package/src/launcher/availability.ts +3 -9
- package/src/launcher/commands.ts +14 -51
- package/src/launcher/dashboard.tsx +49 -88
- package/src/launcher/editorRegistry.ts +21 -29
- package/src/launcher/editors.ts +39 -58
- package/src/launcher/icons.ts +15 -37
- package/src/launcher/index.ts +12 -55
- package/src/launcher/invocation.ts +7 -22
- package/src/launcher/registry.ts +9 -7
- package/src/launcher/schemaDefaults.ts +43 -13
- package/src/launcher/tokens.ts +10 -22
- package/src/menuBar/index.ts +11 -28
- package/src/menus/index.ts +14 -30
- package/src/omnibox/files.ts +10 -14
- package/src/omnibox/index.ts +9 -27
- package/src/omnibox/model.ts +50 -38
- package/src/omnibox/recents.ts +17 -22
- package/src/omnibox/tokens.ts +5 -10
- package/src/omnibox/widget.tsx +14 -19
- package/src/searchReplace/index.ts +7 -27
- package/src/showOutput/index.ts +6 -22
- package/src/sidebar/index.ts +103 -52
- package/src/terminalNotifications/index.ts +42 -25
- package/src/terminals/agentTerminals.ts +25 -49
- package/src/terminals/detection.ts +4 -8
- package/src/terminals/index.ts +31 -102
- package/src/terminals/model.ts +130 -246
- package/src/terminals/tokens.ts +11 -22
- package/src/terminals/widget.tsx +229 -113
- package/src/topBar/icons.ts +3 -8
- package/src/topBar/index.ts +21 -44
- package/src/walkthrough/index.ts +6 -20
- package/src/walkthrough/panel.ts +40 -10
- package/style/about.css +2 -7
- package/style/askAgent.css +8 -40
- package/style/base.css +25 -73
- package/style/chrome.css +108 -308
- package/style/commandBar.css +4 -20
- package/style/customPanel.css +6 -0
- package/style/git.css +22 -184
- package/style/highlight.css +1 -3
- package/style/index.js +1 -0
- package/style/launcher.css +6 -70
- package/style/omnibox.css +2 -14
- package/style/showOutput.css +0 -6
- package/style/sidebar.css +29 -9
- package/style/tabs.css +5 -13
- package/style/terminals.css +18 -123
- package/style/topBar.css +2 -22
- package/style/walkthrough.css +0 -8
|
@@ -1,13 +1,32 @@
|
|
|
1
|
+
import { IMovableSectionDestination, IMovableSectionSource, ISectionEntry } from '@jupyterlab/apputils';
|
|
1
2
|
import { IDocumentManager } from '@jupyterlab/docmanager';
|
|
2
3
|
import { Contents } from '@jupyterlab/services';
|
|
4
|
+
import { ITranslator } from '@jupyterlab/translation';
|
|
3
5
|
import { Toolbar } from '@jupyterlab/ui-components';
|
|
4
6
|
import { ISignal } from '@lumino/signaling';
|
|
5
|
-
import { Widget } from '@lumino/widgets';
|
|
7
|
+
import { AccordionPanel, Widget } from '@lumino/widgets';
|
|
6
8
|
export declare const FILE_BROWSER_ID = "xtralab:file-browser";
|
|
9
|
+
/**
|
|
10
|
+
* The options used to create an {@link XtralabFileBrowser}.
|
|
11
|
+
*/
|
|
7
12
|
interface IXtralabFileBrowserOptions {
|
|
13
|
+
/**
|
|
14
|
+
* The contents manager backing the tree.
|
|
15
|
+
*/
|
|
8
16
|
contentsManager: Contents.IManager;
|
|
17
|
+
/**
|
|
18
|
+
* The document manager used to open files from the tree.
|
|
19
|
+
*/
|
|
9
20
|
docManager: IDocumentManager;
|
|
21
|
+
/**
|
|
22
|
+
* Callback invoked with a file's server path when its row is
|
|
23
|
+
* double-clicked. No double-click handler is installed when absent.
|
|
24
|
+
*/
|
|
10
25
|
onOpenFile?: (serverPath: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* The application language translator.
|
|
28
|
+
*/
|
|
29
|
+
translator?: ITranslator;
|
|
11
30
|
}
|
|
12
31
|
/**
|
|
13
32
|
* Public API of the xtralab file browser used by command handlers and other
|
|
@@ -16,72 +35,52 @@ interface IXtralabFileBrowserOptions {
|
|
|
16
35
|
*/
|
|
17
36
|
export interface IXtralabFileBrowser {
|
|
18
37
|
/**
|
|
19
|
-
* The contents manager backing the tree
|
|
20
|
-
*
|
|
21
|
-
* drive the tree was loaded from.
|
|
38
|
+
* The contents manager backing the tree; command handlers issue rename,
|
|
39
|
+
* delete, copy, … against the same drive.
|
|
22
40
|
*/
|
|
23
41
|
readonly contentsManager: Contents.IManager;
|
|
24
42
|
/**
|
|
25
|
-
* The toolbar
|
|
26
|
-
* buttons after the widget is constructed.
|
|
43
|
+
* The toolbar above the tree, populated by plugin code after construction.
|
|
27
44
|
*/
|
|
28
45
|
readonly toolbar: Toolbar;
|
|
29
46
|
/**
|
|
30
|
-
* Canonical paths
|
|
31
|
-
* paths carry a trailing slash; file paths do not.
|
|
47
|
+
* Canonical selected paths; folder paths carry a trailing slash.
|
|
32
48
|
*/
|
|
33
49
|
readonly selectedPaths: readonly string[];
|
|
34
50
|
/**
|
|
35
|
-
* Emits when the tree's selection changes.
|
|
36
|
-
* `isVisible` / `isEnabled` predicate should listen so they re-evaluate.
|
|
51
|
+
* Emits when the tree's selection changes.
|
|
37
52
|
*/
|
|
38
53
|
readonly selectionChanged: ISignal<IXtralabFileBrowser, readonly string[]>;
|
|
39
54
|
/**
|
|
40
|
-
* Emits when {@link refresh} is called.
|
|
41
|
-
* re-fetches the directories that were previously loaded so the tree
|
|
42
|
-
* matches the contents on disk again.
|
|
55
|
+
* Emits when {@link refresh} is called.
|
|
43
56
|
*/
|
|
44
57
|
readonly refreshRequested: ISignal<IXtralabFileBrowser, void>;
|
|
45
58
|
/**
|
|
46
|
-
* Emits
|
|
47
|
-
*
|
|
48
|
-
* component listens and inserts the path into the model so the user
|
|
49
|
-
* sees the new item without a full refresh.
|
|
59
|
+
* Emits a newly-created canonical path so the tree inserts it without a
|
|
60
|
+
* full refresh.
|
|
50
61
|
*/
|
|
51
62
|
readonly pathAdded: ISignal<IXtralabFileBrowser, string>;
|
|
52
63
|
/**
|
|
53
|
-
* Emits
|
|
54
|
-
* the
|
|
55
|
-
* any unloaded ancestor directories, expands them, and selects the
|
|
56
|
-
* target. Used by the editor breadcrumbs to jump back to a file or
|
|
57
|
-
* folder shown in the breadcrumb trail.
|
|
64
|
+
* Emits a canonical path to load, expand, select, and scroll to. Used by
|
|
65
|
+
* the editor breadcrumbs.
|
|
58
66
|
*/
|
|
59
67
|
readonly revealRequested: ISignal<IXtralabFileBrowser, string>;
|
|
60
68
|
/**
|
|
61
|
-
* Emits when
|
|
62
|
-
*
|
|
63
|
-
* first row. Distinct from {@link revealRequested} because the
|
|
64
|
-
* workspace root has no tree row of its own — it cannot be reached
|
|
65
|
-
* by passing a path.
|
|
69
|
+
* Emits when the tree should return to the workspace root — the root has
|
|
70
|
+
* no tree row of its own, so it cannot be revealed by path.
|
|
66
71
|
*/
|
|
67
72
|
readonly rootRequested: ISignal<IXtralabFileBrowser, void>;
|
|
68
73
|
/**
|
|
69
|
-
* Emits when
|
|
70
|
-
* expanded folder. The React component listens and walks the loaded
|
|
71
|
-
* directories, calling `.collapse()` on each expanded one.
|
|
74
|
+
* Emits when every expanded folder should collapse.
|
|
72
75
|
*/
|
|
73
76
|
readonly collapseAllRequested: ISignal<IXtralabFileBrowser, void>;
|
|
74
77
|
/**
|
|
75
|
-
* Whether the filter box above the tree is shown
|
|
76
|
-
*
|
|
77
|
-
* toolbar toggle. Also forced to `true` when the tree opens a search
|
|
78
|
-
* session on its own — typing a letter while the tree has focus.
|
|
78
|
+
* Whether the filter box above the tree is shown; also forced `true` when
|
|
79
|
+
* the tree opens a search session itself (typing while it has focus).
|
|
79
80
|
*/
|
|
80
81
|
readonly fileFilterVisible: boolean;
|
|
81
82
|
/**
|
|
82
|
-
* Emits when {@link fileFilterVisible} changes.
|
|
83
|
-
* listens to show or hide the filter box; the toggle command listens
|
|
84
|
-
* to refresh its toggled state.
|
|
83
|
+
* Emits when {@link fileFilterVisible} changes.
|
|
85
84
|
*/
|
|
86
85
|
readonly fileFilterVisibleChanged: ISignal<IXtralabFileBrowser, boolean>;
|
|
87
86
|
/**
|
|
@@ -89,22 +88,17 @@ export interface IXtralabFileBrowser {
|
|
|
89
88
|
*/
|
|
90
89
|
refresh(): void;
|
|
91
90
|
/**
|
|
92
|
-
* Notify the React component that a new path was created and
|
|
93
|
-
* appear in the tree.
|
|
94
|
-
* convention: directories carry a trailing slash, files do not.
|
|
91
|
+
* Notify the React component that a new canonical path was created and
|
|
92
|
+
* should appear in the tree.
|
|
95
93
|
*/
|
|
96
94
|
notifyPathAdded(canonicalPath: string): void;
|
|
97
95
|
/**
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* into view. `canonicalPath` follows the `@pierre/trees` convention
|
|
101
|
-
* (directories carry a trailing slash, files do not). Must be a
|
|
102
|
-
* non-empty path — use {@link scrollToRoot} for the root gesture.
|
|
96
|
+
* Reveal a non-empty canonical path: load and expand ancestors, then
|
|
97
|
+
* select and scroll to it. Use {@link scrollToRoot} for the root gesture.
|
|
103
98
|
*/
|
|
104
99
|
reveal(canonicalPath: string): void;
|
|
105
100
|
/**
|
|
106
|
-
*
|
|
107
|
-
* selection and scroll back to the top of the tree.
|
|
101
|
+
* Return to the workspace root: clear the selection and scroll to the top.
|
|
108
102
|
*/
|
|
109
103
|
scrollToRoot(): void;
|
|
110
104
|
/**
|
|
@@ -119,40 +113,158 @@ export interface IXtralabFileBrowser {
|
|
|
119
113
|
* Toggle the filter box above the tree.
|
|
120
114
|
*/
|
|
121
115
|
toggleFileFilter(): void;
|
|
116
|
+
/**
|
|
117
|
+
* The DOM node of the movable "Files" section, used to locate the panel
|
|
118
|
+
* currently hosting the tree.
|
|
119
|
+
*/
|
|
120
|
+
readonly sectionNode: HTMLElement;
|
|
122
121
|
}
|
|
123
122
|
/**
|
|
124
|
-
* Lumino widget
|
|
125
|
-
*
|
|
126
|
-
*
|
|
123
|
+
* Lumino widget hosting the React-based `@pierre/trees` file browser. The tree
|
|
124
|
+
* and its toolbar form one movable "Files" section, and sections from other
|
|
125
|
+
* panels can be moved in below it.
|
|
127
126
|
*/
|
|
128
|
-
export declare class XtralabFileBrowser extends Widget implements IXtralabFileBrowser {
|
|
127
|
+
export declare class XtralabFileBrowser extends Widget implements IXtralabFileBrowser, IMovableSectionSource, IMovableSectionDestination {
|
|
129
128
|
constructor(options: IXtralabFileBrowserOptions);
|
|
129
|
+
/**
|
|
130
|
+
* The contents manager backing the tree.
|
|
131
|
+
*/
|
|
130
132
|
get contentsManager(): Contents.IManager;
|
|
133
|
+
/**
|
|
134
|
+
* The toolbar above the tree.
|
|
135
|
+
*/
|
|
131
136
|
get toolbar(): Toolbar;
|
|
137
|
+
/**
|
|
138
|
+
* Canonical selected paths; folder paths carry a trailing slash.
|
|
139
|
+
*/
|
|
132
140
|
get selectedPaths(): readonly string[];
|
|
141
|
+
/**
|
|
142
|
+
* A signal emitted when the tree's selection changes.
|
|
143
|
+
*/
|
|
133
144
|
get selectionChanged(): ISignal<this, readonly string[]>;
|
|
145
|
+
/**
|
|
146
|
+
* A signal emitted when {@link refresh} is called.
|
|
147
|
+
*/
|
|
134
148
|
get refreshRequested(): ISignal<this, void>;
|
|
149
|
+
/**
|
|
150
|
+
* A signal emitting a newly-created canonical path for the tree to insert.
|
|
151
|
+
*/
|
|
135
152
|
get pathAdded(): ISignal<this, string>;
|
|
153
|
+
/**
|
|
154
|
+
* A signal emitting a canonical path to load, expand, select, and scroll to.
|
|
155
|
+
*/
|
|
136
156
|
get revealRequested(): ISignal<this, string>;
|
|
157
|
+
/**
|
|
158
|
+
* A signal emitted when the tree should return to the workspace root.
|
|
159
|
+
*/
|
|
137
160
|
get rootRequested(): ISignal<this, void>;
|
|
161
|
+
/**
|
|
162
|
+
* A signal emitted when every expanded folder should collapse.
|
|
163
|
+
*/
|
|
138
164
|
get collapseAllRequested(): ISignal<this, void>;
|
|
165
|
+
/**
|
|
166
|
+
* Whether the filter box above the tree is shown.
|
|
167
|
+
*/
|
|
139
168
|
get fileFilterVisible(): boolean;
|
|
169
|
+
/**
|
|
170
|
+
* A signal emitted when {@link fileFilterVisible} changes.
|
|
171
|
+
*/
|
|
140
172
|
get fileFilterVisibleChanged(): ISignal<this, boolean>;
|
|
141
173
|
/**
|
|
142
|
-
* Update the cached selection
|
|
143
|
-
* underlying `@pierre/trees` model emits a selection change.
|
|
174
|
+
* Update the cached selection from the React tree.
|
|
144
175
|
*/
|
|
145
176
|
updateSelection(paths: readonly string[]): void;
|
|
177
|
+
/**
|
|
178
|
+
* Trigger a refresh of every loaded directory in the tree.
|
|
179
|
+
*/
|
|
146
180
|
refresh(): void;
|
|
181
|
+
/**
|
|
182
|
+
* Notify the tree that a new canonical path was created.
|
|
183
|
+
*/
|
|
147
184
|
notifyPathAdded(canonicalPath: string): void;
|
|
185
|
+
/**
|
|
186
|
+
* Reveal a non-empty canonical path in the tree; use {@link scrollToRoot}
|
|
187
|
+
* for the workspace root, which has no tree row of its own.
|
|
188
|
+
*/
|
|
148
189
|
reveal(canonicalPath: string): void;
|
|
190
|
+
/**
|
|
191
|
+
* Return to the workspace root: clear the selection and scroll to the top.
|
|
192
|
+
*/
|
|
149
193
|
scrollToRoot(): void;
|
|
194
|
+
/**
|
|
195
|
+
* Ask the tree to collapse every currently expanded folder.
|
|
196
|
+
*/
|
|
150
197
|
collapseAll(): void;
|
|
198
|
+
/**
|
|
199
|
+
* Show or hide the filter box above the tree.
|
|
200
|
+
*/
|
|
151
201
|
setFileFilterVisible(visible: boolean): void;
|
|
202
|
+
/**
|
|
203
|
+
* Toggle the filter box above the tree.
|
|
204
|
+
*/
|
|
152
205
|
toggleFileFilter(): void;
|
|
206
|
+
/**
|
|
207
|
+
* The DOM node of the movable "Files" section.
|
|
208
|
+
*/
|
|
209
|
+
get sectionNode(): HTMLElement;
|
|
210
|
+
/**
|
|
211
|
+
* Whether the panel currently holds no sections, its own tree included.
|
|
212
|
+
*/
|
|
213
|
+
get isEmpty(): boolean;
|
|
214
|
+
/**
|
|
215
|
+
* A signal emitted when a section is added to or removed from the panel.
|
|
216
|
+
*/
|
|
217
|
+
get contentChanged(): ISignal<this, void>;
|
|
218
|
+
/**
|
|
219
|
+
* A signal emitting each section entry announced to the move plugin.
|
|
220
|
+
*/
|
|
221
|
+
get sectionAdded(): ISignal<this, ISectionEntry>;
|
|
222
|
+
/**
|
|
223
|
+
* The accordion hosting the sections, or `null` while the tree sits alone.
|
|
224
|
+
*/
|
|
225
|
+
get accordionPanel(): AccordionPanel | null;
|
|
226
|
+
/**
|
|
227
|
+
* Section widgets hosted from other panels; the tree section is excluded.
|
|
228
|
+
*/
|
|
229
|
+
get sections(): ReadonlyArray<Widget>;
|
|
230
|
+
/**
|
|
231
|
+
* The toolbar is the section's title node: it is the tree's header row at
|
|
232
|
+
* home, and an accordion host renders it inside the section title.
|
|
233
|
+
*/
|
|
234
|
+
getSections(): ReadonlyArray<ISectionEntry>;
|
|
235
|
+
/**
|
|
236
|
+
* Detach and return the tree section so the move plugin can re-host it;
|
|
237
|
+
* `null` for any other id or when the section is already away from home.
|
|
238
|
+
*/
|
|
239
|
+
removeSectionById(sectionId: string): Widget | null;
|
|
240
|
+
/**
|
|
241
|
+
* Re-attach the tree section after a move back to this panel.
|
|
242
|
+
*/
|
|
243
|
+
reinsertSection(widget: Widget): void;
|
|
244
|
+
/**
|
|
245
|
+
* The move plugin reconciles persisted moves only against sections announced
|
|
246
|
+
* after `registerSource`, and this panel builds its section in the constructor.
|
|
247
|
+
*/
|
|
248
|
+
announceSections(): void;
|
|
249
|
+
/**
|
|
250
|
+
* The first hosted section moves the tree into an accordion.
|
|
251
|
+
*/
|
|
252
|
+
addSection(widget: Widget): void;
|
|
253
|
+
/**
|
|
254
|
+
* Remove a hosted section; the accordion is torn down once only the
|
|
255
|
+
* panel's own tree section (or nothing) remains.
|
|
256
|
+
*/
|
|
257
|
+
removeSectionWidget(widget: Widget): void;
|
|
258
|
+
private _isSectionHome;
|
|
259
|
+
/**
|
|
260
|
+
* An accordion host moves the toolbar node into the section title and leaves
|
|
261
|
+
* it orphaned on detach; re-parenting makes the layout attach it again.
|
|
262
|
+
*/
|
|
263
|
+
private _restoreToolbar;
|
|
153
264
|
private _contentsManager;
|
|
154
265
|
private _docManager;
|
|
155
266
|
private _onOpenFile;
|
|
267
|
+
private _translator;
|
|
156
268
|
private _selectedPaths;
|
|
157
269
|
private _selectionChanged;
|
|
158
270
|
private _refreshRequested;
|
|
@@ -164,5 +276,10 @@ export declare class XtralabFileBrowser extends Widget implements IXtralabFileBr
|
|
|
164
276
|
private _fileFilterVisibleChanged;
|
|
165
277
|
private _toolbar;
|
|
166
278
|
private _content;
|
|
279
|
+
private _section;
|
|
280
|
+
private _panelLayout;
|
|
281
|
+
private _accordion;
|
|
282
|
+
private _contentChanged;
|
|
283
|
+
private _sectionAdded;
|
|
167
284
|
}
|
|
168
285
|
export {};
|