@jupyterlab/shortcuts-extension
Advanced tools
Comparing version 2.0.0-alpha.4 to 2.0.0-beta.0
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
import { ISettingRegistry, SettingRegistry } from '@jupyterlab/coreutils'; | ||
import { ISettingRegistry, SettingRegistry } from '@jupyterlab/settingregistry'; | ||
import { JSONExt } from '@lumino/coreutils'; | ||
@@ -56,5 +56,3 @@ import { DisposableSet } from '@lumino/disposable'; | ||
.sort((a, b) => a.command.localeCompare(b.command)); | ||
schema.properties.shortcuts.title = | ||
'List of Commands (followed by shortcuts)'; | ||
const disableShortcutInstructions = `Note: To disable a system default shortcut, | ||
schema.properties.shortcuts.description = `Note: To disable a system default shortcut, | ||
copy it to User Preferences and add the | ||
@@ -69,8 +67,8 @@ "disabled" key, for example: | ||
"disabled": true | ||
}`; | ||
schema.properties.shortcuts.description = `${commands} | ||
} | ||
${disableShortcutInstructions} | ||
List of commands followed by keyboard shortcuts: | ||
${commands} | ||
List of Keyboard Shortcuts`; | ||
List of keyboard shortcuts:`; | ||
} | ||
@@ -92,2 +90,3 @@ registry.pluginChanged.connect(async (sender, plugin) => { | ||
compose: plugin => { | ||
var _a, _b, _c, _d; | ||
// Only override the canonical schema the first time. | ||
@@ -98,5 +97,5 @@ if (!canonical) { | ||
} | ||
const defaults = canonical.properties.shortcuts.default; | ||
const defaults = (_c = (_b = (_a = canonical.properties) === null || _a === void 0 ? void 0 : _a.shortcuts) === null || _b === void 0 ? void 0 : _b.default, (_c !== null && _c !== void 0 ? _c : [])); | ||
const user = { | ||
shortcuts: ((plugin.data && plugin.data.user) || {}).shortcuts || [] | ||
shortcuts: (_d = plugin.data.user.shortcuts, (_d !== null && _d !== void 0 ? _d : [])) | ||
}; | ||
@@ -157,3 +156,4 @@ const composite = { | ||
function loadShortcuts(commands, composite) { | ||
const shortcuts = composite.shortcuts; | ||
var _a, _b; | ||
const shortcuts = (_b = (_a = composite) === null || _a === void 0 ? void 0 : _a.shortcuts, (_b !== null && _b !== void 0 ? _b : [])); | ||
if (disposables) { | ||
@@ -160,0 +160,0 @@ disposables.dispose(); |
{ | ||
"name": "@jupyterlab/shortcuts-extension", | ||
"version": "2.0.0-alpha.4", | ||
"version": "2.0.0-beta.0", | ||
"description": "JupyterLab - Shortcuts Extension", | ||
@@ -35,12 +35,12 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"dependencies": { | ||
"@jupyterlab/application": "^2.0.0-alpha.4", | ||
"@jupyterlab/coreutils": "^4.0.0-alpha.4", | ||
"@lumino/commands": "^1.7.0", | ||
"@lumino/coreutils": "^1.3.1", | ||
"@lumino/disposable": "^1.3.0" | ||
"@jupyterlab/application": "^2.0.0-beta.0", | ||
"@jupyterlab/settingregistry": "^2.0.0-beta.0", | ||
"@lumino/commands": "^1.9.0", | ||
"@lumino/coreutils": "^1.4.0", | ||
"@lumino/disposable": "^1.3.2" | ||
}, | ||
"devDependencies": { | ||
"rimraf": "~2.6.2", | ||
"typedoc": "^0.15.2", | ||
"typescript": "~3.7.2" | ||
"rimraf": "~3.0.0", | ||
"typedoc": "^0.15.4", | ||
"typescript": "~3.7.3" | ||
}, | ||
@@ -54,3 +54,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "4fb0a544cc14a3b4bd2d53c12ea33ed295a7947c" | ||
"gitHead": "8a8a0aa4f3f9e689d9b6f569716ae91e5f93e188" | ||
} |
@@ -11,3 +11,2 @@ { | ||
"shortcuts": { | ||
"title": "Keyboard Shortcuts", | ||
"description": "The list of keyboard shortcuts.", | ||
@@ -26,5 +25,16 @@ "items": { "$ref": "#/definitions/shortcut" }, | ||
"items": { "type": "string" }, | ||
"minItems": 1, | ||
"type": "array" | ||
}, | ||
"winKeys": { | ||
"items": { "type": "string" }, | ||
"type": "array" | ||
}, | ||
"macKeys": { | ||
"items": { "type": "string" }, | ||
"type": "array" | ||
}, | ||
"linuxKeys": { | ||
"items": { "type": "string" }, | ||
"type": "array" | ||
}, | ||
"selector": { "type": "string" } | ||
@@ -31,0 +41,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17454
257