@jupyterlab/settingregistry 4.0.0-alpha.9 → 4.0.0-beta.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/lib/plugin-schema.json +88 -0
- package/lib/settingregistry.d.ts +53 -22
- package/lib/settingregistry.js +142 -97
- package/lib/settingregistry.js.map +1 -1
- package/lib/tokens.d.ts +97 -1
- package/lib/tokens.js.map +1 -1
- package/package.json +20 -15
- package/src/index.ts +11 -0
- package/src/plugin-schema.json +388 -0
- package/src/settingregistry.ts +1521 -0
- package/src/tokens.ts +776 -0
package/lib/tokens.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { CellType } from '@jupyterlab/nbformat';
|
|
1
2
|
import { IDataConnector } from '@jupyterlab/statedb';
|
|
2
3
|
import { PartialJSONObject, PartialJSONValue, ReadonlyPartialJSONObject, ReadonlyPartialJSONValue, Token } from '@lumino/coreutils';
|
|
3
4
|
import { IDisposable } from '@lumino/disposable';
|
|
4
5
|
import { ISignal } from '@lumino/signaling';
|
|
5
6
|
import { ISchemaValidator } from './settingregistry';
|
|
7
|
+
import type { RJSFSchema, UiSchema } from '@rjsf/utils';
|
|
6
8
|
/**
|
|
7
9
|
* The setting registry token.
|
|
8
10
|
*/
|
|
@@ -51,10 +53,12 @@ export interface ISettingRegistry {
|
|
|
51
53
|
*
|
|
52
54
|
* @param plugin - The name of the plugin whose settings are being loaded.
|
|
53
55
|
*
|
|
56
|
+
* @param forceTransform - An optional parameter to force replay the transforms methods.
|
|
57
|
+
*
|
|
54
58
|
* @returns A promise that resolves with a plugin settings object or rejects
|
|
55
59
|
* if the plugin is not found.
|
|
56
60
|
*/
|
|
57
|
-
load(plugin: string): Promise<ISettingRegistry.ISettings>;
|
|
61
|
+
load(plugin: string, forceTransform?: boolean): Promise<ISettingRegistry.ISettings>;
|
|
58
62
|
/**
|
|
59
63
|
* Reload a plugin's settings into the registry even if they already exist.
|
|
60
64
|
*
|
|
@@ -216,6 +220,9 @@ export declare namespace ISettingRegistry {
|
|
|
216
220
|
*/
|
|
217
221
|
disabled?: boolean;
|
|
218
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* An interface describing a context menu item
|
|
225
|
+
*/
|
|
219
226
|
interface IContextMenuItem extends IMenuItem {
|
|
220
227
|
/**
|
|
221
228
|
* The CSS selector for the context menu item.
|
|
@@ -355,6 +362,10 @@ export declare namespace ISettingRegistry {
|
|
|
355
362
|
* The JupyterLab shortcuts that are created by a plugin's schema.
|
|
356
363
|
*/
|
|
357
364
|
'jupyter.lab.shortcuts'?: IShortcut[];
|
|
365
|
+
/**
|
|
366
|
+
* The JupyterLab metadata-form schema
|
|
367
|
+
*/
|
|
368
|
+
'jupyter.lab.metadataforms'?: IMetadataForm[];
|
|
358
369
|
/**
|
|
359
370
|
* The root schema is always an object.
|
|
360
371
|
*/
|
|
@@ -499,6 +510,91 @@ export declare namespace ISettingRegistry {
|
|
|
499
510
|
*/
|
|
500
511
|
selector: string;
|
|
501
512
|
}
|
|
513
|
+
/**
|
|
514
|
+
* An interface describing the metadata form.
|
|
515
|
+
*/
|
|
516
|
+
interface IMetadataForm extends PartialJSONObject {
|
|
517
|
+
/**
|
|
518
|
+
* The section unique ID.
|
|
519
|
+
*/
|
|
520
|
+
id: string;
|
|
521
|
+
/**
|
|
522
|
+
* The metadata schema.
|
|
523
|
+
*/
|
|
524
|
+
metadataSchema: IMetadataSchema;
|
|
525
|
+
/**
|
|
526
|
+
* The ui schema as used by react-JSON-schema-form.
|
|
527
|
+
*/
|
|
528
|
+
uiSchema?: {
|
|
529
|
+
[metadataKey: string]: UiSchema;
|
|
530
|
+
};
|
|
531
|
+
/**
|
|
532
|
+
* The jupyter properties.
|
|
533
|
+
*/
|
|
534
|
+
metadataOptions?: {
|
|
535
|
+
[metadataKey: string]: IMetadataOptions;
|
|
536
|
+
};
|
|
537
|
+
/**
|
|
538
|
+
* The section label.
|
|
539
|
+
*/
|
|
540
|
+
label?: string;
|
|
541
|
+
/**
|
|
542
|
+
* The section rank in notebooktools panel.
|
|
543
|
+
*/
|
|
544
|
+
rank?: number;
|
|
545
|
+
/**
|
|
546
|
+
* Whether to show the modified field from default value.
|
|
547
|
+
*/
|
|
548
|
+
showModified?: boolean;
|
|
549
|
+
/**
|
|
550
|
+
* Keep the plugin at origin of the metadata form.
|
|
551
|
+
*/
|
|
552
|
+
_origin?: string;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* The metadata schema as defined in JSON schema.
|
|
556
|
+
*/
|
|
557
|
+
interface IMetadataSchema extends RJSFSchema {
|
|
558
|
+
/**
|
|
559
|
+
* The properties as defined in JSON schema, and interpretable by react-JSON-schema-form.
|
|
560
|
+
*/
|
|
561
|
+
properties: {
|
|
562
|
+
[option: string]: any;
|
|
563
|
+
};
|
|
564
|
+
/**
|
|
565
|
+
* The required fields.
|
|
566
|
+
*/
|
|
567
|
+
required?: string[];
|
|
568
|
+
/**
|
|
569
|
+
* Support for allOf feature of JSON schema (useful for if/then/else).
|
|
570
|
+
*/
|
|
571
|
+
allOf?: Array<PartialJSONObject>;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Options to customize the widget, the field and the relevant metadata.
|
|
575
|
+
*/
|
|
576
|
+
interface IMetadataOptions extends PartialJSONObject {
|
|
577
|
+
/**
|
|
578
|
+
* Name of a custom react widget registered.
|
|
579
|
+
*/
|
|
580
|
+
customWidget?: string;
|
|
581
|
+
/**
|
|
582
|
+
* Name of a custom react field registered.
|
|
583
|
+
*/
|
|
584
|
+
customField?: string;
|
|
585
|
+
/**
|
|
586
|
+
* Metadata applied to notebook or cell.
|
|
587
|
+
*/
|
|
588
|
+
metadataLevel?: 'cell' | 'notebook';
|
|
589
|
+
/**
|
|
590
|
+
* Cells which should have this metadata.
|
|
591
|
+
*/
|
|
592
|
+
cellTypes?: CellType[];
|
|
593
|
+
/**
|
|
594
|
+
* Whether to avoid writing default value in metadata.
|
|
595
|
+
*/
|
|
596
|
+
writeDefault?: boolean;
|
|
597
|
+
}
|
|
502
598
|
/**
|
|
503
599
|
* An interface describing a toolbar item.
|
|
504
600
|
*/
|
package/lib/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;+EAG+E;
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;+EAG+E;AAI/E,OAAO,EAKL,KAAK,EACN,MAAM,mBAAmB,CAAC;AAM3B;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,KAAK,CACvC,wCAAwC,CACzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyterlab/settingregistry",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.1",
|
|
4
4
|
"description": "Settings registry for Jupyterlab",
|
|
5
5
|
"homepage": "https://github.com/jupyterlab/jupyterlab",
|
|
6
6
|
"bugs": {
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
23
23
|
"schema/*.json",
|
|
24
|
-
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
|
|
24
|
+
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
|
|
25
|
+
"src/**/*.{ts,tsx}",
|
|
26
|
+
"src/plugin-schema.json"
|
|
25
27
|
],
|
|
26
28
|
"scripts": {
|
|
27
29
|
"build": "tsc -b",
|
|
@@ -35,22 +37,25 @@
|
|
|
35
37
|
"watch": "tsc -b --watch"
|
|
36
38
|
},
|
|
37
39
|
"dependencies": {
|
|
38
|
-
"@jupyterlab/
|
|
39
|
-
"@
|
|
40
|
-
"@lumino/
|
|
41
|
-
"@lumino/
|
|
42
|
-
"@lumino/
|
|
43
|
-
"
|
|
44
|
-
"
|
|
40
|
+
"@jupyterlab/nbformat": "^4.0.0-beta.1",
|
|
41
|
+
"@jupyterlab/statedb": "^4.0.0-beta.1",
|
|
42
|
+
"@lumino/commands": "^2.0.1",
|
|
43
|
+
"@lumino/coreutils": "^2.0.0",
|
|
44
|
+
"@lumino/disposable": "^2.0.0",
|
|
45
|
+
"@lumino/signaling": "^2.0.0",
|
|
46
|
+
"@rjsf/utils": "^5.1.0",
|
|
47
|
+
"ajv": "^8.12.0",
|
|
48
|
+
"json5": "^2.2.3"
|
|
45
49
|
},
|
|
46
50
|
"devDependencies": {
|
|
47
|
-
"@jupyterlab/
|
|
48
|
-
"@types/jest": "^
|
|
49
|
-
"
|
|
50
|
-
"jest": "^26.4.2",
|
|
51
|
+
"@jupyterlab/testing": "^4.0.0-beta.1",
|
|
52
|
+
"@types/jest": "^29.2.0",
|
|
53
|
+
"jest": "^29.2.0",
|
|
51
54
|
"rimraf": "~3.0.0",
|
|
52
|
-
"
|
|
53
|
-
|
|
55
|
+
"typescript": "~5.0.2"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"react": ">=16"
|
|
54
59
|
},
|
|
55
60
|
"publishConfig": {
|
|
56
61
|
"access": "public"
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* -----------------------------------------------------------------------------
|
|
2
|
+
| Copyright (c) Jupyter Development Team.
|
|
3
|
+
| Distributed under the terms of the Modified BSD License.
|
|
4
|
+
|----------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
* @module settingregistry
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export * from './settingregistry';
|
|
11
|
+
export * from './tokens';
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"title": "JupyterLab Plugin Settings/Preferences Schema",
|
|
4
|
+
"description": "JupyterLab plugin settings/preferences schema",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"jupyter.lab.internationalization": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"selectors": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"domain": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"jupyter.lab.menus": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"main": {
|
|
29
|
+
"title": "Main menu entries",
|
|
30
|
+
"description": "List of menu items to add to the main menubar.",
|
|
31
|
+
"items": {
|
|
32
|
+
"$ref": "#/definitions/menu"
|
|
33
|
+
},
|
|
34
|
+
"type": "array",
|
|
35
|
+
"default": []
|
|
36
|
+
},
|
|
37
|
+
"context": {
|
|
38
|
+
"title": "The application context menu.",
|
|
39
|
+
"description": "List of context menu items.",
|
|
40
|
+
"items": {
|
|
41
|
+
"allOf": [
|
|
42
|
+
{ "$ref": "#/definitions/menuItem" },
|
|
43
|
+
{
|
|
44
|
+
"properties": {
|
|
45
|
+
"selector": {
|
|
46
|
+
"description": "The CSS selector for the context menu item.",
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"type": "array",
|
|
54
|
+
"default": []
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
},
|
|
59
|
+
"jupyter.lab.metadataforms": {
|
|
60
|
+
"items": {
|
|
61
|
+
"$ref": "#/definitions/metadataForm"
|
|
62
|
+
},
|
|
63
|
+
"type": "array",
|
|
64
|
+
"default": []
|
|
65
|
+
},
|
|
66
|
+
"jupyter.lab.setting-deprecated": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"default": false
|
|
69
|
+
},
|
|
70
|
+
"jupyter.lab.setting-icon": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"default": ""
|
|
73
|
+
},
|
|
74
|
+
"jupyter.lab.setting-icon-class": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"default": ""
|
|
77
|
+
},
|
|
78
|
+
"jupyter.lab.setting-icon-label": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"default": "Plugin"
|
|
81
|
+
},
|
|
82
|
+
"jupyter.lab.shortcuts": {
|
|
83
|
+
"items": {
|
|
84
|
+
"$ref": "#/definitions/shortcut"
|
|
85
|
+
},
|
|
86
|
+
"type": "array",
|
|
87
|
+
"default": []
|
|
88
|
+
},
|
|
89
|
+
"jupyter.lab.toolbars": {
|
|
90
|
+
"properties": {
|
|
91
|
+
"^\\w[\\w-\\.]*$": {
|
|
92
|
+
"items": {
|
|
93
|
+
"$ref": "#/definitions/toolbarItem"
|
|
94
|
+
},
|
|
95
|
+
"type": "array",
|
|
96
|
+
"default": []
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"type": "object",
|
|
100
|
+
"default": {}
|
|
101
|
+
},
|
|
102
|
+
"jupyter.lab.transform": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"default": false
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"definitions": {
|
|
108
|
+
"menu": {
|
|
109
|
+
"properties": {
|
|
110
|
+
"disabled": {
|
|
111
|
+
"description": "Whether the menu is disabled or not",
|
|
112
|
+
"type": "boolean",
|
|
113
|
+
"default": false
|
|
114
|
+
},
|
|
115
|
+
"icon": {
|
|
116
|
+
"description": "Menu icon id",
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"id": {
|
|
120
|
+
"description": "Menu unique id",
|
|
121
|
+
"oneOf": [
|
|
122
|
+
{
|
|
123
|
+
"type": "string",
|
|
124
|
+
"enum": [
|
|
125
|
+
"jp-menu-file",
|
|
126
|
+
"jp-menu-file-new",
|
|
127
|
+
"jp-menu-edit",
|
|
128
|
+
"jp-menu-help",
|
|
129
|
+
"jp-menu-kernel",
|
|
130
|
+
"jp-menu-run",
|
|
131
|
+
"jp-menu-settings",
|
|
132
|
+
"jp-menu-view",
|
|
133
|
+
"jp-menu-tabs"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{ "type": "string", "pattern": "[a-z][a-z0-9\\-_]+" }
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"items": {
|
|
140
|
+
"description": "Menu items",
|
|
141
|
+
"type": "array",
|
|
142
|
+
"items": {
|
|
143
|
+
"$ref": "#/definitions/menuItem"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"label": {
|
|
147
|
+
"description": "Menu label",
|
|
148
|
+
"type": "string"
|
|
149
|
+
},
|
|
150
|
+
"mnemonic": {
|
|
151
|
+
"description": "Mnemonic index for the label",
|
|
152
|
+
"type": "number",
|
|
153
|
+
"minimum": -1,
|
|
154
|
+
"default": -1
|
|
155
|
+
},
|
|
156
|
+
"rank": {
|
|
157
|
+
"description": "Menu rank",
|
|
158
|
+
"type": "number",
|
|
159
|
+
"minimum": 0
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"required": ["id"],
|
|
163
|
+
"type": "object"
|
|
164
|
+
},
|
|
165
|
+
"menuItem": {
|
|
166
|
+
"properties": {
|
|
167
|
+
"args": {
|
|
168
|
+
"description": "Command arguments",
|
|
169
|
+
"type": "object"
|
|
170
|
+
},
|
|
171
|
+
"command": {
|
|
172
|
+
"description": "Command id",
|
|
173
|
+
"type": "string"
|
|
174
|
+
},
|
|
175
|
+
"disabled": {
|
|
176
|
+
"description": "Whether the item is disabled or not",
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"default": false
|
|
179
|
+
},
|
|
180
|
+
"type": {
|
|
181
|
+
"description": "Item type",
|
|
182
|
+
"type": "string",
|
|
183
|
+
"enum": ["command", "submenu", "separator"],
|
|
184
|
+
"default": "command"
|
|
185
|
+
},
|
|
186
|
+
"rank": {
|
|
187
|
+
"description": "Item rank",
|
|
188
|
+
"type": "number",
|
|
189
|
+
"minimum": 0
|
|
190
|
+
},
|
|
191
|
+
"submenu": {
|
|
192
|
+
"oneOf": [
|
|
193
|
+
{
|
|
194
|
+
"$ref": "#/definitions/menu"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "null"
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"type": "object"
|
|
203
|
+
},
|
|
204
|
+
"shortcut": {
|
|
205
|
+
"properties": {
|
|
206
|
+
"args": {
|
|
207
|
+
"title": "The arguments for the command",
|
|
208
|
+
"type": "object"
|
|
209
|
+
},
|
|
210
|
+
"command": {
|
|
211
|
+
"title": "The command id",
|
|
212
|
+
"description": "The command executed when the binding is matched.",
|
|
213
|
+
"type": "string"
|
|
214
|
+
},
|
|
215
|
+
"disabled": {
|
|
216
|
+
"description": "Whether this shortcut is disabled or not.",
|
|
217
|
+
"type": "boolean",
|
|
218
|
+
"default": false
|
|
219
|
+
},
|
|
220
|
+
"keys": {
|
|
221
|
+
"title": "The key sequence for the binding",
|
|
222
|
+
"description": "The key shortcut like `Accel A` or the sequence of shortcuts to press like [`Accel A`, `B`]",
|
|
223
|
+
"items": {
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
"type": "array"
|
|
227
|
+
},
|
|
228
|
+
"macKeys": {
|
|
229
|
+
"title": "The key sequence for the binding on macOS",
|
|
230
|
+
"description": "The key shortcut like `Cmd A` or the sequence of shortcuts to press like [`Cmd A`, `B`]",
|
|
231
|
+
"items": {
|
|
232
|
+
"type": "string"
|
|
233
|
+
},
|
|
234
|
+
"type": "array"
|
|
235
|
+
},
|
|
236
|
+
"winKeys": {
|
|
237
|
+
"title": "The key sequence for the binding on Windows",
|
|
238
|
+
"description": "The key shortcut like `Ctrl A` or the sequence of shortcuts to press like [`Ctrl A`, `B`]",
|
|
239
|
+
"items": {
|
|
240
|
+
"type": "string"
|
|
241
|
+
},
|
|
242
|
+
"type": "array"
|
|
243
|
+
},
|
|
244
|
+
"linuxKeys": {
|
|
245
|
+
"title": "The key sequence for the binding on Linux",
|
|
246
|
+
"description": "The key shortcut like `Ctrl A` or the sequence of shortcuts to press like [`Ctrl A`, `B`]",
|
|
247
|
+
"items": {
|
|
248
|
+
"type": "string"
|
|
249
|
+
},
|
|
250
|
+
"type": "array"
|
|
251
|
+
},
|
|
252
|
+
"selector": {
|
|
253
|
+
"title": "CSS selector",
|
|
254
|
+
"type": "string"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"required": ["command", "keys", "selector"],
|
|
258
|
+
"type": "object"
|
|
259
|
+
},
|
|
260
|
+
"toolbarItem": {
|
|
261
|
+
"properties": {
|
|
262
|
+
"name": {
|
|
263
|
+
"title": "Unique name",
|
|
264
|
+
"type": "string"
|
|
265
|
+
},
|
|
266
|
+
"args": {
|
|
267
|
+
"title": "Command arguments",
|
|
268
|
+
"type": "object"
|
|
269
|
+
},
|
|
270
|
+
"command": {
|
|
271
|
+
"title": "Command id",
|
|
272
|
+
"type": "string",
|
|
273
|
+
"default": ""
|
|
274
|
+
},
|
|
275
|
+
"disabled": {
|
|
276
|
+
"title": "Whether the item is ignored or not",
|
|
277
|
+
"type": "boolean",
|
|
278
|
+
"default": false
|
|
279
|
+
},
|
|
280
|
+
"icon": {
|
|
281
|
+
"title": "Item icon id",
|
|
282
|
+
"description": "If defined, it will override the command icon",
|
|
283
|
+
"type": "string"
|
|
284
|
+
},
|
|
285
|
+
"label": {
|
|
286
|
+
"title": "Item label",
|
|
287
|
+
"description": "If defined, it will override the command label",
|
|
288
|
+
"type": "string"
|
|
289
|
+
},
|
|
290
|
+
"type": {
|
|
291
|
+
"title": "Item type",
|
|
292
|
+
"type": "string",
|
|
293
|
+
"enum": ["command", "spacer"]
|
|
294
|
+
},
|
|
295
|
+
"rank": {
|
|
296
|
+
"title": "Item rank",
|
|
297
|
+
"type": "number",
|
|
298
|
+
"minimum": 0,
|
|
299
|
+
"default": 50
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"required": ["name"],
|
|
303
|
+
"additionalProperties": false,
|
|
304
|
+
"type": "object"
|
|
305
|
+
},
|
|
306
|
+
"metadataForm": {
|
|
307
|
+
"type": "object",
|
|
308
|
+
"properties": {
|
|
309
|
+
"id": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"description": "The section ID"
|
|
312
|
+
},
|
|
313
|
+
"metadataSchema": {
|
|
314
|
+
"type": "object",
|
|
315
|
+
"items": {
|
|
316
|
+
"$ref": "#/definitions/metadataSchema"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"uiSchema": {
|
|
320
|
+
"type": "object"
|
|
321
|
+
},
|
|
322
|
+
"metadataOptions": {
|
|
323
|
+
"type": "object",
|
|
324
|
+
"items": {
|
|
325
|
+
"$ref": "#/definitions/metadataOptions"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"label": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"description": "The section label"
|
|
331
|
+
},
|
|
332
|
+
"rank": {
|
|
333
|
+
"type": "integer",
|
|
334
|
+
"description": "The rank of the section in the right panel"
|
|
335
|
+
},
|
|
336
|
+
"showModified": {
|
|
337
|
+
"type": "boolean",
|
|
338
|
+
"description": "Whether to show modified values from defaults"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"required": ["id", "metadataSchema"]
|
|
342
|
+
},
|
|
343
|
+
"metadataSchema": {
|
|
344
|
+
"properties": {
|
|
345
|
+
"properties": {
|
|
346
|
+
"type": "object",
|
|
347
|
+
"description": "The property set up by extension",
|
|
348
|
+
"properties": {
|
|
349
|
+
"title": {
|
|
350
|
+
"type": "string"
|
|
351
|
+
},
|
|
352
|
+
"description": {
|
|
353
|
+
"type": "string"
|
|
354
|
+
},
|
|
355
|
+
"type": {
|
|
356
|
+
"type": "string"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"type": "object",
|
|
362
|
+
"required": ["properties"]
|
|
363
|
+
},
|
|
364
|
+
"metadataOptions": {
|
|
365
|
+
"properties": {
|
|
366
|
+
"customRenderer": {
|
|
367
|
+
"type": "string"
|
|
368
|
+
},
|
|
369
|
+
"metadataLevel": {
|
|
370
|
+
"type": "string",
|
|
371
|
+
"enum": ["cell", "notebook"],
|
|
372
|
+
"default": "cell"
|
|
373
|
+
},
|
|
374
|
+
"cellTypes": {
|
|
375
|
+
"type": "array",
|
|
376
|
+
"items": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"enum": ["code", "markdown", "raw"]
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"writeDefault": {
|
|
382
|
+
"type": "boolean"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"type": "object"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|