@jupyterlab/settingeditor 4.0.0-beta.1 → 4.0.0-rc.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.
- package/lib/InstructionsPlaceholder.d.ts +6 -0
- package/lib/InstructionsPlaceholder.js +13 -0
- package/lib/InstructionsPlaceholder.js.map +1 -0
- package/lib/SettingsFormEditor.d.ts +2 -9
- package/lib/SettingsFormEditor.js +22 -14
- package/lib/SettingsFormEditor.js.map +1 -1
- package/lib/jsonsettingeditor.js +3 -7
- package/lib/jsonsettingeditor.js.map +1 -1
- package/lib/pluginlist.d.ts +4 -3
- package/lib/pluginlist.js +31 -23
- package/lib/pluginlist.js.map +1 -1
- package/lib/settingseditor.d.ts +4 -0
- package/lib/settingspanel.d.ts +5 -4
- package/lib/settingspanel.js +15 -38
- package/lib/settingspanel.js.map +1 -1
- package/lib/tokens.js +6 -2
- package/lib/tokens.js.map +1 -1
- package/package.json +30 -19
- package/src/InstructionsPlaceholder.tsx +30 -0
- package/src/SettingsFormEditor.tsx +62 -60
- package/src/jsonsettingeditor.tsx +3 -21
- package/src/pluginlist.tsx +46 -36
- package/src/settingseditor.tsx +7 -0
- package/src/settingspanel.tsx +26 -52
- package/src/tokens.ts +8 -2
- package/style/base.css +94 -144
package/src/tokens.ts
CHANGED
|
@@ -10,14 +10,20 @@ import { SettingsEditor } from './settingseditor';
|
|
|
10
10
|
* The setting editor tracker token.
|
|
11
11
|
*/
|
|
12
12
|
export const ISettingEditorTracker = new Token<ISettingEditorTracker>(
|
|
13
|
-
'@jupyterlab/settingeditor:ISettingEditorTracker'
|
|
13
|
+
'@jupyterlab/settingeditor:ISettingEditorTracker',
|
|
14
|
+
`A widget tracker for the interactive setting editor.
|
|
15
|
+
Use this if you want to be able to iterate over and interact with setting editors
|
|
16
|
+
created by the application.`
|
|
14
17
|
);
|
|
15
18
|
|
|
16
19
|
/**
|
|
17
20
|
* The setting editor tracker token.
|
|
18
21
|
*/
|
|
19
22
|
export const IJSONSettingEditorTracker = new Token<IJSONSettingEditorTracker>(
|
|
20
|
-
'@jupyterlab/settingeditor:IJSONSettingEditorTracker'
|
|
23
|
+
'@jupyterlab/settingeditor:IJSONSettingEditorTracker',
|
|
24
|
+
`A widget tracker for the JSON setting editor.
|
|
25
|
+
Use this if you want to be able to iterate over and interact with setting editors
|
|
26
|
+
created by the application.`
|
|
21
27
|
);
|
|
22
28
|
|
|
23
29
|
/**
|
package/style/base.css
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
--jp-private-settingeditor-toolbar-height: 28px;
|
|
12
12
|
--jp-private-settingeditor-type-width: 75px;
|
|
13
13
|
--jp-private-settingeditor-modifier-indent: 5px;
|
|
14
|
+
--jp-private-settingeditor-header-spacing: 8px;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
.jp-SettingsPanel,
|
|
@@ -41,29 +42,7 @@
|
|
|
41
42
|
background-color: var(--jp-border-color2);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
text-align: center;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
#json-setting-editor .jp-SettingEditorInstructions-icon {
|
|
49
|
-
display: inline-block;
|
|
50
|
-
height: 78px;
|
|
51
|
-
margin: 2px 5px 2px 8px;
|
|
52
|
-
width: 60px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
#json-setting-editor .jp-SettingEditorInstructions-title {
|
|
56
|
-
color: var(--jp-ui-font-color0);
|
|
57
|
-
font-size: 32px;
|
|
58
|
-
font-weight: 200;
|
|
59
|
-
line-height: 78px;
|
|
60
|
-
vertical-align: top;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
#json-setting-editor .jp-SettingEditorInstructions-text {
|
|
64
|
-
color: var(--jp-ui-font-color0);
|
|
65
|
-
font-size: var(--jp-ui-font-size2);
|
|
66
|
-
}
|
|
45
|
+
/** Plugin list **/
|
|
67
46
|
|
|
68
47
|
.jp-PluginList {
|
|
69
48
|
min-width: 175px;
|
|
@@ -125,18 +104,6 @@
|
|
|
125
104
|
background-color: var(--jp-error-color0);
|
|
126
105
|
}
|
|
127
106
|
|
|
128
|
-
.jp-SettingEditor-header {
|
|
129
|
-
font-size: var(--jp-content-font-size4);
|
|
130
|
-
font-weight: var(--jp-content-heading-font-weight);
|
|
131
|
-
color: var(--jp-ui-font-color0);
|
|
132
|
-
padding: 20px 0 10px 20px;
|
|
133
|
-
border-bottom: 1px solid var(--jp-border-color2);
|
|
134
|
-
position: sticky;
|
|
135
|
-
top: 0;
|
|
136
|
-
z-index: 999;
|
|
137
|
-
background-color: var(--jp-layout-color0);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
107
|
.jp-PluginList-icon {
|
|
141
108
|
display: flex;
|
|
142
109
|
height: 20px;
|
|
@@ -145,6 +112,52 @@
|
|
|
145
112
|
position: relative;
|
|
146
113
|
}
|
|
147
114
|
|
|
115
|
+
.jp-PluginList-wrapper > .jp-FilterBox {
|
|
116
|
+
margin: 8px 12px 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.jp-PluginList mark {
|
|
120
|
+
background-color: transparent;
|
|
121
|
+
font-weight: bold;
|
|
122
|
+
color: var(--jp-ui-font-color1);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.jp-PluginList-entry {
|
|
126
|
+
display: flex;
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
border: 1px solid transparent;
|
|
129
|
+
background: transparent;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
padding: 4px 0 4px 4px;
|
|
132
|
+
white-space: nowrap;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.jp-PluginList-entry:hover {
|
|
136
|
+
background: var(--jp-layout-color1);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.jp-PluginList-entry li {
|
|
140
|
+
margin-left: 27px;
|
|
141
|
+
margin-top: 5px;
|
|
142
|
+
color: var(--jp-ui-font-color1);
|
|
143
|
+
overflow-x: hidden;
|
|
144
|
+
text-overflow: ellipsis;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.jp-PluginList-entry-label {
|
|
148
|
+
display: flex;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.jp-PluginList-entry-label-text {
|
|
152
|
+
text-overflow: ellipsis;
|
|
153
|
+
overflow-x: hidden;
|
|
154
|
+
white-space: nowrap;
|
|
155
|
+
color: var(--jp-ui-font-color1);
|
|
156
|
+
line-height: var(--jp-cell-collapser-min-height);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** Raw editor **/
|
|
160
|
+
|
|
148
161
|
.jp-SettingsRawEditor .jp-Toolbar {
|
|
149
162
|
color: var(--jp-ui-font-color0);
|
|
150
163
|
font-size: var(--jp-ui-font-size1);
|
|
@@ -180,6 +193,8 @@
|
|
|
180
193
|
height: 100%;
|
|
181
194
|
}
|
|
182
195
|
|
|
196
|
+
/** Panel **/
|
|
197
|
+
|
|
183
198
|
.jp-SettingsPanel .checkbox p {
|
|
184
199
|
font-size: var(--jp-content-font-size1);
|
|
185
200
|
}
|
|
@@ -195,143 +210,78 @@
|
|
|
195
210
|
margin-top: 5px;
|
|
196
211
|
}
|
|
197
212
|
|
|
198
|
-
.jp-SettingsPanel .jp-
|
|
199
|
-
position: absolute;
|
|
200
|
-
bottom: 0;
|
|
213
|
+
.jp-SettingsPanel .jp-SettingsEditor {
|
|
201
214
|
padding: 20px;
|
|
202
|
-
width: 100%;
|
|
203
|
-
background: var(--jp-border-color3);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.jp-SettingsPanel .jp-SaveSettingsBanner button {
|
|
207
|
-
box-shadow: none;
|
|
208
|
-
outline: none;
|
|
209
|
-
border: none;
|
|
210
|
-
color: var(--jp-brand-color1);
|
|
211
|
-
font-size: var(--jp-ui-font-size1);
|
|
212
|
-
cursor: pointer;
|
|
213
215
|
}
|
|
214
216
|
|
|
215
|
-
.jp-SettingsPanel
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
.jp-SettingsPanel .jp-SettingsHeader h2 {
|
|
220
|
-
font-size: var(--jp-content-font-size3);
|
|
221
|
-
color: var(--jp-ui-font-color0);
|
|
222
|
-
font-weight: 300;
|
|
223
|
-
margin: 1em;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.jp-SettingsPanel .jp-SettingsHeader-description {
|
|
227
|
-
font-size: var(--jp-content-font-size2);
|
|
228
|
-
color: var(--jp-ui-font-color1);
|
|
229
|
-
font-weight: 200;
|
|
230
|
-
margin: 1em;
|
|
231
|
-
line-height: var(--jp-content-font-size3);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.jp-SettingsPanel .jp-SettingsTitle {
|
|
235
|
-
display: flex;
|
|
236
|
-
align-items: center;
|
|
237
|
-
padding-left: 1em;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.jp-SettingsPanel .jp-SettingsTitle-caret {
|
|
241
|
-
width: 2em;
|
|
242
|
-
flex-shrink: 0;
|
|
217
|
+
.jp-SettingsPanel {
|
|
218
|
+
overflow-y: auto;
|
|
219
|
+
height: 100%;
|
|
243
220
|
}
|
|
244
221
|
|
|
245
222
|
.jp-SettingsForm {
|
|
246
223
|
position: relative;
|
|
247
224
|
}
|
|
248
225
|
|
|
249
|
-
.jp-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
justify-content: space-between;
|
|
253
|
-
cursor: pointer;
|
|
254
|
-
border: 1px solid var(--jp-border-color2);
|
|
226
|
+
.jp-SettingsForm > .rjsf > .form-group {
|
|
227
|
+
padding-top: 0;
|
|
228
|
+
margin-top: 0;
|
|
255
229
|
}
|
|
256
230
|
|
|
257
|
-
|
|
258
|
-
margin: 8px 12px 0;
|
|
259
|
-
}
|
|
231
|
+
/** Settings header **/
|
|
260
232
|
|
|
261
|
-
.jp-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
flex-direction: column;
|
|
270
|
-
border: 1px solid transparent;
|
|
271
|
-
background: transparent;
|
|
272
|
-
overflow: hidden;
|
|
273
|
-
padding: 4px 0 4px 4px;
|
|
274
|
-
white-space: nowrap;
|
|
233
|
+
.jp-SettingsHeader {
|
|
234
|
+
display: grid;
|
|
235
|
+
grid-template:
|
|
236
|
+
'title buttonbar'
|
|
237
|
+
'description buttonbar';
|
|
238
|
+
grid-template-columns: 1fr max-content;
|
|
239
|
+
padding: 0 var(--jp-private-settingeditor-header-spacing);
|
|
240
|
+
border-bottom: 1px solid var(--jp-border-color2);
|
|
275
241
|
}
|
|
276
242
|
|
|
277
|
-
.jp-
|
|
278
|
-
|
|
243
|
+
.jp-SettingsHeader-title {
|
|
244
|
+
font-size: var(--jp-content-font-size3);
|
|
245
|
+
color: var(--jp-ui-font-color0);
|
|
246
|
+
font-weight: 400;
|
|
247
|
+
grid-area: title;
|
|
248
|
+
padding: 0;
|
|
249
|
+
margin-top: calc(var(--jp-private-settingeditor-header-spacing) * 2);
|
|
250
|
+
margin-bottom: calc(var(--jp-private-settingeditor-header-spacing) / 2);
|
|
279
251
|
}
|
|
280
252
|
|
|
281
|
-
.jp-
|
|
282
|
-
|
|
283
|
-
|
|
253
|
+
.jp-SettingsHeader-description {
|
|
254
|
+
grid-area: description;
|
|
255
|
+
padding-bottom: var(--jp-private-settingeditor-header-spacing);
|
|
284
256
|
color: var(--jp-ui-font-color1);
|
|
285
|
-
overflow-x: hidden;
|
|
286
|
-
text-overflow: ellipsis;
|
|
287
257
|
}
|
|
288
258
|
|
|
289
|
-
.jp-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
.jp-PluginList-entry-label-text {
|
|
294
|
-
text-overflow: ellipsis;
|
|
295
|
-
overflow-x: hidden;
|
|
296
|
-
white-space: nowrap;
|
|
297
|
-
color: var(--jp-ui-font-color1);
|
|
298
|
-
line-height: var(--jp-cell-collapser-min-height);
|
|
259
|
+
.jp-SettingsHeader-buttonbar {
|
|
260
|
+
margin: auto var(--jp-private-settingeditor-header-spacing);
|
|
261
|
+
grid-row: span 2;
|
|
299
262
|
}
|
|
300
263
|
|
|
301
|
-
.jp-
|
|
302
|
-
|
|
303
|
-
|
|
264
|
+
.jp-SettingsHeader-buttonbar > .jp-RestoreButton {
|
|
265
|
+
background-color: var(--jp-warn-color-normal);
|
|
266
|
+
border: 0;
|
|
267
|
+
color: var(--jp-ui-inverse-font-color0);
|
|
304
268
|
}
|
|
305
269
|
|
|
306
|
-
.jp-
|
|
307
|
-
|
|
270
|
+
.jp-PluginEditor {
|
|
271
|
+
overflow: auto;
|
|
308
272
|
}
|
|
309
273
|
|
|
310
|
-
|
|
311
|
-
position: absolute;
|
|
312
|
-
bottom: 0;
|
|
313
|
-
z-index: 999;
|
|
314
|
-
background-color: var(--jp-border-color3);
|
|
315
|
-
border: 1px solid var(--jp-border-color1);
|
|
316
|
-
}
|
|
274
|
+
/** Placeholder **/
|
|
317
275
|
|
|
318
|
-
.jp-
|
|
319
|
-
|
|
320
|
-
height: 100%;
|
|
276
|
+
.jp-SettingsEditor-placeholder {
|
|
277
|
+
text-align: center;
|
|
321
278
|
}
|
|
322
279
|
|
|
323
|
-
.jp-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
border: none;
|
|
327
|
-
outline: none;
|
|
328
|
-
box-shadow: none;
|
|
329
|
-
font-size: var(--jp-content-font-size2);
|
|
330
|
-
color: var(--jp-brand-color1);
|
|
331
|
-
cursor: pointer;
|
|
332
|
-
margin-right: 5px;
|
|
280
|
+
.jp-SettingsEditor-placeholderContent {
|
|
281
|
+
color: var(--jp-content-font-color2);
|
|
282
|
+
padding: 8px;
|
|
333
283
|
}
|
|
334
284
|
|
|
335
|
-
.jp-
|
|
336
|
-
|
|
285
|
+
.jp-SettingsEditor-placeholderContent > h3 {
|
|
286
|
+
margin-bottom: var(--jp-content-heading-margin-bottom);
|
|
337
287
|
}
|