@jupyterlab/cell-toolbar-extension 4.0.0-alpha.6
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 +22 -0
- package/lib/index.js.map +1 -0
- package/package.json +62 -0
- package/schema/plugin.json +76 -0
- package/style/index.css +8 -0
- package/style/index.js +8 -0
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
const cellToolbar = {
|
|
12
|
+
id: '@jupyterlab/cell-toolbar-extension:plugin',
|
|
13
|
+
autoStart: true,
|
|
14
|
+
activate: async (app, settingRegistry) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const settings = (_a = (await (settingRegistry === null || settingRegistry === void 0 ? void 0 : settingRegistry.load(`@jupyterlab/cell-toolbar-extension:plugin`)))) !== null && _a !== void 0 ? _a : null;
|
|
17
|
+
app.docRegistry.addWidgetExtension('Notebook', new CellBarExtension(app.commands, settings));
|
|
18
|
+
},
|
|
19
|
+
optional: [ISettingRegistry]
|
|
20
|
+
};
|
|
21
|
+
export default cellToolbar;
|
|
22
|
+
//# 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;AAE5D,MAAM,WAAW,GAAgC;IAC/C,EAAE,EAAE,2CAA2C;IAC/C,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,KAAK,EACb,GAAoB,EACpB,eAAwC,EACxC,EAAE;;QACF,MAAM,QAAQ,GACZ,MAAA,CAAC,MAAM,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,IAAI,CAC1B,2CAA2C,CAC5C,CAAA,CAAC,mCAAI,IAAI,CAAC;QACb,GAAG,CAAC,WAAW,CAAC,kBAAkB,CAChC,UAAU,EACV,IAAI,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAC7C,CAAC;IACJ,CAAC;IACD,QAAQ,EAAE,CAAC,gBAAgB,CAAC;CAC7B,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jupyterlab/cell-toolbar-extension",
|
|
3
|
+
"version": "4.0.0-alpha.6",
|
|
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": "^4.0.0-alpha.6",
|
|
43
|
+
"@jupyterlab/cell-toolbar": "^4.0.0-alpha.6",
|
|
44
|
+
"@jupyterlab/settingregistry": "^4.0.0-alpha.6"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@jupyterlab/testutils": "^4.0.0-alpha.6",
|
|
48
|
+
"@types/jest": "^26.0.10",
|
|
49
|
+
"jest": "^26.4.2",
|
|
50
|
+
"rimraf": "~3.0.0",
|
|
51
|
+
"ts-jest": "^26.3.0",
|
|
52
|
+
"typescript": "~4.5.2"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public"
|
|
56
|
+
},
|
|
57
|
+
"jupyterlab": {
|
|
58
|
+
"extension": true,
|
|
59
|
+
"schemaDir": "schema"
|
|
60
|
+
},
|
|
61
|
+
"styleModule": "style/index.js"
|
|
62
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"title": "Cell Toolbar",
|
|
4
|
+
"description": "Cell Toolbar Settings.",
|
|
5
|
+
"properties": {
|
|
6
|
+
"leftMenu": {
|
|
7
|
+
"title": "List of menu items",
|
|
8
|
+
"description": "An item is defined by a 'command' name and an 'icon' name + optionally a 'tooltip' and the 'cellType' on which it applies",
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"$ref": "#/definitions/menuItem"
|
|
12
|
+
},
|
|
13
|
+
"default": [
|
|
14
|
+
{
|
|
15
|
+
"command": "notebook:duplicate-below",
|
|
16
|
+
"icon": "@jupyterlab/cell-toolbar:duplicate",
|
|
17
|
+
"tooltip": "Duplicate Cell"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"command": "notebook:move-cell-up",
|
|
21
|
+
"icon": "@jupyterlab/cell-toolbar:move-up",
|
|
22
|
+
"tooltip": "Move Cell Up"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"command": "notebook:move-cell-down",
|
|
26
|
+
"icon": "@jupyterlab/cell-toolbar:move-down",
|
|
27
|
+
"tooltip": "Move Cell Down"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"command": "notebook:insert-cell-above",
|
|
31
|
+
"icon": "@jupyterlab/cell-toolbar:add-above",
|
|
32
|
+
"tooltip": "Insert Cell Above"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"command": "notebook:insert-cell-below",
|
|
36
|
+
"icon": "@jupyterlab/cell-toolbar:add-below",
|
|
37
|
+
"tooltip": "Insert Cell Below"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"command": "notebook:delete-cell",
|
|
41
|
+
"icon": "@jupyterlab/cell-toolbar:delete",
|
|
42
|
+
"tooltip": "Delete Cell"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"type": "object",
|
|
49
|
+
"definitions": {
|
|
50
|
+
"menuItem": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"properties": {
|
|
53
|
+
"command": {
|
|
54
|
+
"title": "Command ID to be executed",
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
"icon": {
|
|
58
|
+
"title": "Item icon ID",
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"tooltip": {
|
|
62
|
+
"title": "Item tooltip",
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"cellType": {
|
|
66
|
+
"title": "Cell type on which to display the item",
|
|
67
|
+
"description": "Leave empty to define on all cells",
|
|
68
|
+
"type": "string",
|
|
69
|
+
"enum": ["code", "markdown", "raw"]
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": ["command", "icon"]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
package/style/index.css
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
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/application/style/index.css');
|
|
8
|
+
@import url('~@jupyterlab/cell-toolbar/style/index.css');
|
package/style/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
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/application/style/index.js';
|
|
8
|
+
import '@jupyterlab/cell-toolbar/style/index.js';
|