xtralab 0.14.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/lib/customPanel/index.d.ts +7 -0
  2. package/lib/customPanel/index.js +74 -0
  3. package/lib/fileBrowser/commands.js +13 -1
  4. package/lib/fileBrowser/contents.d.ts +11 -0
  5. package/lib/fileBrowser/contents.js +28 -0
  6. package/lib/fileBrowser/dragAndDrop.d.ts +66 -0
  7. package/lib/fileBrowser/dragAndDrop.js +115 -0
  8. package/lib/fileBrowser/fileBrowser.d.ts +2 -0
  9. package/lib/fileBrowser/fileBrowser.js +151 -197
  10. package/lib/fileBrowser/index.js +39 -6
  11. package/lib/fileBrowser/widget.d.ts +44 -5
  12. package/lib/fileBrowser/widget.js +153 -14
  13. package/lib/index.js +2 -0
  14. package/lib/launcher/agents.d.ts +1 -1
  15. package/lib/launcher/agents.js +15 -2
  16. package/lib/launcher/icons.js +15 -4
  17. package/lib/launcher/schemaDefaults.d.ts +2 -9
  18. package/lib/launcher/schemaDefaults.js +37 -13
  19. package/lib/sidebar/index.d.ts +7 -13
  20. package/lib/sidebar/index.js +80 -46
  21. package/lib/terminals/index.d.ts +5 -3
  22. package/lib/terminals/index.js +17 -6
  23. package/lib/terminals/widget.d.ts +29 -25
  24. package/lib/terminals/widget.js +150 -65
  25. package/package.json +1 -1
  26. package/schema/launcher.json +2 -2
  27. package/schema/sidebar.json +47 -7
  28. package/src/customPanel/index.ts +104 -0
  29. package/src/fileBrowser/commands.ts +14 -1
  30. package/src/fileBrowser/contents.ts +30 -0
  31. package/src/fileBrowser/dragAndDrop.ts +178 -0
  32. package/src/fileBrowser/fileBrowser.tsx +183 -225
  33. package/src/fileBrowser/index.ts +41 -6
  34. package/src/fileBrowser/widget.tsx +195 -14
  35. package/src/index.ts +2 -0
  36. package/src/launcher/agents.ts +16 -3
  37. package/src/launcher/icons.ts +16 -4
  38. package/src/launcher/schemaDefaults.ts +43 -13
  39. package/src/sidebar/index.ts +95 -52
  40. package/src/terminals/index.ts +24 -6
  41. package/src/terminals/widget.tsx +186 -87
  42. package/style/base.css +22 -34
  43. package/style/customPanel.css +9 -0
  44. package/style/index.js +1 -0
  45. package/style/terminals.css +19 -77
package/style/base.css CHANGED
@@ -4,10 +4,22 @@
4
4
  https://jupyterlab.readthedocs.io/en/stable/developer/css.html
5
5
  */
6
6
 
7
+ /*
8
+ * Rules live on the section class below, so they travel when the tree moves.
9
+ */
10
+ .jp-xtralab-FileBrowserPanel {
11
+ display: flex;
12
+ flex-direction: column;
13
+ min-width: 200px;
14
+ overflow: hidden;
15
+ }
16
+
7
17
  .jp-xtralab-FileBrowser {
8
18
  display: flex;
19
+ flex: 1 1 auto;
9
20
  flex-direction: column;
10
21
  min-width: 200px;
22
+ min-height: 0;
11
23
  overflow: hidden;
12
24
  background-color: var(--jp-layout-color1);
13
25
 
@@ -129,46 +141,22 @@
129
141
  min-height: 0;
130
142
  }
131
143
 
132
- .jp-xtralab-FileBrowser file-tree-container {
144
+ .jp-xtralab-FileBrowser-accordion {
133
145
  flex: 1 1 auto;
134
146
  min-height: 0;
135
147
  }
136
148
 
137
149
  /*
138
- * Drag image shown next to the cursor while dragging files out of the
139
- * tree. Mirrors the visual weight of the default file browser's drag
140
- * preview without depending on its DOM.
150
+ * In an accordion the toolbar shares the title row, so it must be able to
151
+ * shrink.
141
152
  */
142
- .jp-xtralab-DragImage {
143
- position: absolute;
144
- display: flex;
145
- align-items: center;
146
- gap: 4px;
147
- padding: 2px 6px;
148
- background-color: var(--jp-layout-color1);
149
- border: 1px solid var(--jp-border-color2);
150
- border-radius: 6px;
151
- color: var(--jp-ui-font-color1);
152
- font-family: var(--jp-ui-font-family);
153
- font-size: var(--jp-ui-font-size1);
154
- pointer-events: none;
155
- }
156
-
157
- .jp-xtralab-DragImage-icon {
158
- display: inline-flex;
159
- align-items: center;
153
+ .jp-AccordionPanel-title > .jp-xtralab-FileBrowser-toolbar {
154
+ flex: 0 1 auto;
155
+ min-width: 0;
156
+ overflow: hidden;
160
157
  }
161
158
 
162
- .jp-xtralab-DragImage-count {
163
- display: inline-flex;
164
- align-items: center;
165
- justify-content: center;
166
- min-width: 16px;
167
- height: 16px;
168
- padding: 0 4px;
169
- background-color: var(--jp-brand-color1);
170
- border-radius: 8px;
171
- color: var(--jp-ui-inverse-font-color1);
172
- font-size: var(--jp-ui-font-size0);
173
- line-height: 1;
159
+ .jp-xtralab-FileBrowser file-tree-container {
160
+ flex: 1 1 auto;
161
+ min-height: 0;
174
162
  }
@@ -0,0 +1,9 @@
1
+ /*
2
+ * All visible content comes from the hosted sections, which carry their own
3
+ * styles.
4
+ */
5
+
6
+ .jp-xtralab-CustomPanel {
7
+ min-width: 200px;
8
+ overflow: hidden;
9
+ }
package/style/index.js CHANGED
@@ -3,6 +3,7 @@ import './about.css';
3
3
  import './askAgent.css';
4
4
  import './chrome.css';
5
5
  import './commandBar.css';
6
+ import './customPanel.css';
6
7
  import './editorBreadcrumbs.css';
7
8
  import './git.css';
8
9
  import './highlight.css';
@@ -1,93 +1,36 @@
1
1
  /*
2
- * Left-sidebar panel listing running terminal sessions. Each row shows
3
- * the session's real (program-published) title, a smaller line below it
4
- * with the latest output from a running coding agent, and an inline
5
- * shutdown button that fades in on hover; the header carries the panel
6
- * title and a "new terminal" button. Colors and spacing pull from
7
- * `--jp-*` custom properties so the panel tracks the active JupyterLab
8
- * theme.
2
+ * Left-sidebar panel listing running terminal sessions, as a single movable
3
+ * "Terminals" section. Each row shows the session's real (program-published)
4
+ * title, a smaller line below it with the latest output from a running coding
5
+ * agent, and an inline shutdown button that fades in on hover. Colors and
6
+ * spacing pull from `--jp-*` custom properties so the panel tracks the active
7
+ * JupyterLab theme.
9
8
  */
10
9
 
11
10
  .jp-xtralab-Terminals {
12
- display: flex;
13
- flex-direction: column;
14
11
  min-width: 200px;
15
12
  overflow: hidden;
16
- background-color: var(--jp-layout-color1);
17
- color: var(--jp-ui-font-color1);
18
- font-size: var(--jp-ui-font-size1);
19
13
  }
20
14
 
21
- .jp-xtralab-Terminals-body {
15
+ /* On the section, not the panel, so the rules travel when the section moves. */
16
+ .jp-xtralab-Terminals-section {
22
17
  display: flex;
23
- flex: 1 1 auto;
24
18
  flex-direction: column;
25
- min-height: 0;
26
- }
27
-
28
- .jp-xtralab-Terminals-header {
29
- display: flex;
30
- flex: 0 0 auto;
31
- align-items: center;
32
- justify-content: space-between;
33
- padding: 8px 12px;
34
- border-bottom: var(--jp-border-width) solid var(--jp-border-color2);
35
- }
36
-
37
- .jp-xtralab-Terminals-title {
38
- margin: 0;
39
- font-size: var(--jp-ui-font-size0);
40
- font-weight: 600;
41
- letter-spacing: 1px;
42
- text-transform: uppercase;
43
- color: var(--jp-ui-font-color1);
19
+ overflow: hidden;
44
20
  }
45
21
 
46
- .jp-xtralab-Terminals-actions {
22
+ .jp-xtralab-Terminals-listing {
47
23
  display: flex;
48
- flex: 0 0 auto;
49
- align-items: center;
50
- gap: 2px;
24
+ flex: 1 1 auto;
25
+ flex-direction: column;
26
+ min-height: 0;
51
27
  }
52
28
 
53
- .jp-xtralab-Terminals-action {
29
+ .jp-xtralab-Terminals-body {
54
30
  display: flex;
55
- align-items: center;
56
- justify-content: center;
57
- width: 20px;
58
- height: 20px;
59
- padding: 0;
60
- background: transparent;
61
- border: none;
62
- border-radius: 2px;
63
- color: var(--jp-ui-font-color2);
64
- cursor: pointer;
65
- }
66
-
67
- .jp-xtralab-Terminals-action:hover {
68
- background-color: var(--jp-layout-color2);
69
- color: var(--jp-ui-font-color1);
70
- }
71
-
72
- .jp-xtralab-Terminals-action:focus-visible {
73
- outline: var(--jp-border-width) solid var(--jp-brand-color1);
74
- outline-offset: -1px;
75
- }
76
-
77
- /*
78
- * "Shut down all" is disabled when there are no running terminals. Dim the
79
- * whole control with opacity rather than `color`: the stop glyph is an SVG
80
- * whose fill comes from its own `jp-icon3` class (not `currentColor`), so a
81
- * `color` change alone leaves the icon looking fully active — which is why the
82
- * button did not read as disabled.
83
- */
84
- .jp-xtralab-Terminals-action:disabled {
85
- cursor: default;
86
- opacity: 0.4;
87
- }
88
-
89
- .jp-xtralab-Terminals-action:disabled:hover {
90
- background: transparent;
31
+ flex: 1 1 auto;
32
+ flex-direction: column;
33
+ min-height: 0;
91
34
  }
92
35
 
93
36
  .jp-xtralab-Terminals-empty {
@@ -214,9 +157,8 @@
214
157
  opacity: 1;
215
158
  }
216
159
 
217
- /* Keep the row/header icons at the standard 16px sidebar size. */
218
- .jp-xtralab-Terminals-item svg,
219
- .jp-xtralab-Terminals-action svg {
160
+ /* Keep the row icons at the standard 16px sidebar size. */
161
+ .jp-xtralab-Terminals-item svg {
220
162
  width: 16px;
221
163
  height: 16px;
222
164
  }