@jupyterlab/cell-toolbar-extension 3.4.0-alpha.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/index.d.ts +7 -0
- package/lib/index.js +25 -0
- package/lib/index.js.map +1 -0
- package/package.json +64 -0
- package/schema/plugin.json +90 -0
- package/style/index.css +9 -0
- package/style/index.js +9 -0
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* -----------------------------------------------------------------------------
|
|
2
|
+
| Copyright (c) Jupyter Development Team.
|
|
3
|
+
| Distributed under the terms of the Modified BSD License.
|
|
4
|
+
|----------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
* @module cell-toolbar-extension
|
|
8
|
+
*/
|
|
9
|
+
import { ISettingRegistry } from '@jupyterlab/settingregistry';
|
|
10
|
+
import { CellBarExtension } from '@jupyterlab/cell-toolbar';
|
|
11
|
+
import { createToolbarFactory, IToolbarWidgetRegistry } from '@jupyterlab/apputils';
|
|
12
|
+
import { ITranslator, nullTranslator } from '@jupyterlab/translation';
|
|
13
|
+
const cellToolbar = {
|
|
14
|
+
id: '@jupyterlab/cell-toolbar-extension:plugin',
|
|
15
|
+
autoStart: true,
|
|
16
|
+
activate: async (app, settingRegistry, toolbarRegistry, translator) => {
|
|
17
|
+
const toolbarItems = settingRegistry && toolbarRegistry
|
|
18
|
+
? createToolbarFactory(toolbarRegistry, settingRegistry, CellBarExtension.FACTORY_NAME, cellToolbar.id, translator !== null && translator !== void 0 ? translator : nullTranslator)
|
|
19
|
+
: undefined;
|
|
20
|
+
app.docRegistry.addWidgetExtension('Notebook', new CellBarExtension(app.commands, toolbarItems));
|
|
21
|
+
},
|
|
22
|
+
optional: [ISettingRegistry, IToolbarWidgetRegistry, ITranslator]
|
|
23
|
+
};
|
|
24
|
+
export default cellToolbar;
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;+EAG+E;AAC/E;;;GAGG;AAMH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEtE,MAAM,WAAW,GAAgC;IAC/C,EAAE,EAAE,2CAA2C;IAC/C,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,KAAK,EACb,GAAoB,EACpB,eAAwC,EACxC,eAA8C,EAC9C,UAA8B,EAC9B,EAAE;QACF,MAAM,YAAY,GAChB,eAAe,IAAI,eAAe;YAChC,CAAC,CAAC,oBAAoB,CAClB,eAAe,EACf,eAAe,EACf,gBAAgB,CAAC,YAAY,EAC7B,WAAW,CAAC,EAAE,EACd,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,cAAc,CAC7B;YACH,CAAC,CAAC,SAAS,CAAC;QAEhB,GAAG,CAAC,WAAW,CAAC,kBAAkB,CAChC,UAAU,EACV,IAAI,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,CACjD,CAAC;IACJ,CAAC;IACD,QAAQ,EAAE,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,WAAW,CAAC;CAClE,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jupyterlab/cell-toolbar-extension",
|
|
3
|
+
"version": "3.4.0-alpha.0",
|
|
4
|
+
"description": "Extension for cell toolbar adapted from jlab-enhanced-cell-toolbar",
|
|
5
|
+
"homepage": "https://github.com/jupyterlab/jupyterlab",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/jupyterlab/jupyterlab/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/jupyterlab/jupyterlab.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "BSD-3-Clause",
|
|
14
|
+
"author": "Project Jupyter",
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"style/**/*"
|
|
17
|
+
],
|
|
18
|
+
"main": "lib/index.js",
|
|
19
|
+
"types": "lib/index.d.ts",
|
|
20
|
+
"style": "style/index.css",
|
|
21
|
+
"directories": {
|
|
22
|
+
"lib": "lib/"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
26
|
+
"schema/*.json",
|
|
27
|
+
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
|
|
28
|
+
"style/index.js"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsc -b",
|
|
32
|
+
"build:all": "npm run build",
|
|
33
|
+
"build:test": "tsc --build tsconfig.test.json",
|
|
34
|
+
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo",
|
|
35
|
+
"test": "jest",
|
|
36
|
+
"test:cov": "jest --collect-coverage",
|
|
37
|
+
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
|
|
38
|
+
"test:debug:watch": "node --inspect-brk node_modules/.bin/jest --runInBand --watch",
|
|
39
|
+
"watch": "tsc -b --watch"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@jupyterlab/application": "^3.4.0-alpha.0",
|
|
43
|
+
"@jupyterlab/apputils": "^3.4.0-alpha.0",
|
|
44
|
+
"@jupyterlab/cell-toolbar": "^3.4.0-alpha.0",
|
|
45
|
+
"@jupyterlab/settingregistry": "^3.4.0-alpha.0",
|
|
46
|
+
"@jupyterlab/translation": "^3.4.0-alpha.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@jupyterlab/testutils": "^3.4.0-alpha.0",
|
|
50
|
+
"@types/jest": "^26.0.10",
|
|
51
|
+
"jest": "^26.4.2",
|
|
52
|
+
"rimraf": "~3.0.0",
|
|
53
|
+
"ts-jest": "^26.3.0",
|
|
54
|
+
"typescript": "~4.1.3"
|
|
55
|
+
},
|
|
56
|
+
"publishConfig": {
|
|
57
|
+
"access": "public"
|
|
58
|
+
},
|
|
59
|
+
"jupyterlab": {
|
|
60
|
+
"extension": true,
|
|
61
|
+
"schemaDir": "schema"
|
|
62
|
+
},
|
|
63
|
+
"styleModule": "style/index.js"
|
|
64
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"title": "Cell Toolbar",
|
|
4
|
+
"description": "Cell Toolbar Settings.",
|
|
5
|
+
"jupyter.lab.toolbars": {
|
|
6
|
+
"Cell": [
|
|
7
|
+
{
|
|
8
|
+
"name": "duplicate-cell",
|
|
9
|
+
"command": "notebook:duplicate-below"
|
|
10
|
+
},
|
|
11
|
+
{ "name": "move-cell-up", "command": "notebook:move-cell-up" },
|
|
12
|
+
{ "name": "move-cell-down", "command": "notebook:move-cell-down" },
|
|
13
|
+
{
|
|
14
|
+
"name": "insert-cell-above",
|
|
15
|
+
"command": "notebook:insert-cell-above"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "insert-cell-below",
|
|
19
|
+
"command": "notebook:insert-cell-below"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"command": "notebook:delete-cell",
|
|
23
|
+
"icon": "ui-components:delete",
|
|
24
|
+
"name": "delete-cell"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"jupyter.lab.transform": true,
|
|
29
|
+
"properties": {
|
|
30
|
+
"toolbar": {
|
|
31
|
+
"title": "List of toolbar items",
|
|
32
|
+
"description": "An item is defined by a 'name', a 'command' name, and an 'icon' name",
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"$ref": "#/definitions/toolbarItem"
|
|
36
|
+
},
|
|
37
|
+
"default": []
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"type": "object",
|
|
42
|
+
"definitions": {
|
|
43
|
+
"toolbarItem": {
|
|
44
|
+
"properties": {
|
|
45
|
+
"name": {
|
|
46
|
+
"title": "Unique name",
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"args": {
|
|
50
|
+
"title": "Command arguments",
|
|
51
|
+
"type": "object"
|
|
52
|
+
},
|
|
53
|
+
"command": {
|
|
54
|
+
"title": "Command id",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"default": ""
|
|
57
|
+
},
|
|
58
|
+
"disabled": {
|
|
59
|
+
"title": "Whether the item is ignored or not",
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"default": false
|
|
62
|
+
},
|
|
63
|
+
"icon": {
|
|
64
|
+
"title": "Item icon id",
|
|
65
|
+
"description": "If defined, it will override the command icon",
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
68
|
+
"label": {
|
|
69
|
+
"title": "Item label",
|
|
70
|
+
"description": "If defined, it will override the command label",
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"type": {
|
|
74
|
+
"title": "Item type",
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": ["command", "spacer"]
|
|
77
|
+
},
|
|
78
|
+
"rank": {
|
|
79
|
+
"title": "Item rank",
|
|
80
|
+
"type": "number",
|
|
81
|
+
"minimum": 0,
|
|
82
|
+
"default": 50
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"required": ["name"],
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"type": "object"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
package/style/index.css
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*-----------------------------------------------------------------------------
|
|
2
|
+
| Copyright (c) Jupyter Development Team.
|
|
3
|
+
| Distributed under the terms of the Modified BSD License.
|
|
4
|
+
|----------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
|
|
7
|
+
@import url('~@jupyterlab/apputils/style/index.css');
|
|
8
|
+
@import url('~@jupyterlab/application/style/index.css');
|
|
9
|
+
@import url('~@jupyterlab/cell-toolbar/style/index.css');
|
package/style/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*-----------------------------------------------------------------------------
|
|
2
|
+
| Copyright (c) Jupyter Development Team.
|
|
3
|
+
| Distributed under the terms of the Modified BSD License.
|
|
4
|
+
|----------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
|
|
7
|
+
import '@jupyterlab/apputils/style/index.js';
|
|
8
|
+
import '@jupyterlab/application/style/index.js';
|
|
9
|
+
import '@jupyterlab/cell-toolbar/style/index.js';
|