@theia/keymaps 1.45.1 → 1.46.0-next.72

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.
@@ -1,45 +1,45 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Ericsson and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- require("./keymaps-monaco-contribution");
19
- require("../../src/browser/style/index.css");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const keymaps_service_1 = require("./keymaps-service");
22
- const keymaps_frontend_contribution_1 = require("./keymaps-frontend-contribution");
23
- const common_1 = require("@theia/core/lib/common");
24
- const keybinding_1 = require("@theia/core/lib/browser/keybinding");
25
- const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
26
- const browser_1 = require("@theia/core/lib/browser");
27
- const keybindings_widget_1 = require("./keybindings-widget");
28
- const keybinding_schema_updater_1 = require("./keybinding-schema-updater");
29
- const json_schema_store_1 = require("@theia/core/lib/browser/json-schema-store");
30
- exports.default = new inversify_1.ContainerModule(bind => {
31
- bind(keymaps_service_1.KeymapsService).toSelf().inSingletonScope();
32
- bind(keymaps_frontend_contribution_1.KeymapsFrontendContribution).toSelf().inSingletonScope();
33
- bind(common_1.CommandContribution).toService(keymaps_frontend_contribution_1.KeymapsFrontendContribution);
34
- bind(keybinding_1.KeybindingContribution).toService(keymaps_frontend_contribution_1.KeymapsFrontendContribution);
35
- bind(common_1.MenuContribution).toService(keymaps_frontend_contribution_1.KeymapsFrontendContribution);
36
- bind(keybindings_widget_1.KeybindingWidget).toSelf();
37
- bind(tab_bar_toolbar_1.TabBarToolbarContribution).toService(keymaps_frontend_contribution_1.KeymapsFrontendContribution);
38
- bind(browser_1.WidgetFactory).toDynamicValue(context => ({
39
- id: keybindings_widget_1.KeybindingWidget.ID,
40
- createWidget: () => context.container.get(keybindings_widget_1.KeybindingWidget),
41
- })).inSingletonScope();
42
- bind(keybinding_schema_updater_1.KeybindingSchemaUpdater).toSelf().inSingletonScope();
43
- bind(json_schema_store_1.JsonSchemaContribution).toService(keybinding_schema_updater_1.KeybindingSchemaUpdater);
44
- });
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2018 Ericsson and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ require("./keymaps-monaco-contribution");
19
+ require("../../src/browser/style/index.css");
20
+ const inversify_1 = require("@theia/core/shared/inversify");
21
+ const keymaps_service_1 = require("./keymaps-service");
22
+ const keymaps_frontend_contribution_1 = require("./keymaps-frontend-contribution");
23
+ const common_1 = require("@theia/core/lib/common");
24
+ const keybinding_1 = require("@theia/core/lib/browser/keybinding");
25
+ const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
26
+ const browser_1 = require("@theia/core/lib/browser");
27
+ const keybindings_widget_1 = require("./keybindings-widget");
28
+ const keybinding_schema_updater_1 = require("./keybinding-schema-updater");
29
+ const json_schema_store_1 = require("@theia/core/lib/browser/json-schema-store");
30
+ exports.default = new inversify_1.ContainerModule(bind => {
31
+ bind(keymaps_service_1.KeymapsService).toSelf().inSingletonScope();
32
+ bind(keymaps_frontend_contribution_1.KeymapsFrontendContribution).toSelf().inSingletonScope();
33
+ bind(common_1.CommandContribution).toService(keymaps_frontend_contribution_1.KeymapsFrontendContribution);
34
+ bind(keybinding_1.KeybindingContribution).toService(keymaps_frontend_contribution_1.KeymapsFrontendContribution);
35
+ bind(common_1.MenuContribution).toService(keymaps_frontend_contribution_1.KeymapsFrontendContribution);
36
+ bind(keybindings_widget_1.KeybindingWidget).toSelf();
37
+ bind(tab_bar_toolbar_1.TabBarToolbarContribution).toService(keymaps_frontend_contribution_1.KeymapsFrontendContribution);
38
+ bind(browser_1.WidgetFactory).toDynamicValue(context => ({
39
+ id: keybindings_widget_1.KeybindingWidget.ID,
40
+ createWidget: () => context.container.get(keybindings_widget_1.KeybindingWidget),
41
+ })).inSingletonScope();
42
+ bind(keybinding_schema_updater_1.KeybindingSchemaUpdater).toSelf().inSingletonScope();
43
+ bind(json_schema_store_1.JsonSchemaContribution).toService(keybinding_schema_updater_1.KeybindingSchemaUpdater);
44
+ });
45
45
  //# sourceMappingURL=keymaps-frontend-module.js.map
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=keymaps-monaco-contribution.d.ts.map
@@ -1,28 +1,28 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // *****************************************************************************
4
- // Copyright (C) 2018 TypeFox and others.
5
- //
6
- // This program and the accompanying materials are made available under the
7
- // terms of the Eclipse Public License v. 2.0 which is available at
8
- // http://www.eclipse.org/legal/epl-2.0.
9
- //
10
- // This Source Code may also be made available under the following Secondary
11
- // Licenses when the conditions for such availability set forth in the Eclipse
12
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
- // with the GNU Classpath Exception which is available at
14
- // https://www.gnu.org/software/classpath/license.html.
15
- //
16
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
17
- // *****************************************************************************
18
- const monaco = require("@theia/monaco-editor-core");
19
- monaco.languages.register({
20
- id: 'jsonc',
21
- 'aliases': [
22
- 'JSON with Comments'
23
- ],
24
- 'filenames': [
25
- 'keymaps.json'
26
- ]
27
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // *****************************************************************************
4
+ // Copyright (C) 2018 TypeFox and others.
5
+ //
6
+ // This program and the accompanying materials are made available under the
7
+ // terms of the Eclipse Public License v. 2.0 which is available at
8
+ // http://www.eclipse.org/legal/epl-2.0.
9
+ //
10
+ // This Source Code may also be made available under the following Secondary
11
+ // Licenses when the conditions for such availability set forth in the Eclipse
12
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
+ // with the GNU Classpath Exception which is available at
14
+ // https://www.gnu.org/software/classpath/license.html.
15
+ //
16
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
17
+ // *****************************************************************************
18
+ const monaco = require("@theia/monaco-editor-core");
19
+ monaco.languages.register({
20
+ id: 'jsonc',
21
+ 'aliases': [
22
+ 'JSON with Comments'
23
+ ],
24
+ 'filenames': [
25
+ 'keymaps.json'
26
+ ]
27
+ });
28
28
  //# sourceMappingURL=keymaps-monaco-contribution.js.map
@@ -1,62 +1,62 @@
1
- import { OpenerService, Widget } from '@theia/core/lib/browser';
2
- import { KeybindingRegistry, ScopedKeybinding } from '@theia/core/lib/browser/keybinding';
3
- import { Keybinding } from '@theia/core/lib/common/keybinding';
4
- import { Emitter } from '@theia/core/lib/common/event';
5
- import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service';
6
- import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model';
7
- import { Deferred } from '@theia/core/lib/common/promise-util';
8
- import { MonacoWorkspace } from '@theia/monaco/lib/browser/monaco-workspace';
9
- import { MessageService } from '@theia/core/lib/common/message-service';
10
- import { MonacoJSONCEditor } from '@theia/preferences/lib/browser/monaco-jsonc-editor';
11
- export declare class KeymapsService {
12
- protected readonly workspace: MonacoWorkspace;
13
- protected readonly textModelService: MonacoTextModelService;
14
- protected readonly keybindingRegistry: KeybindingRegistry;
15
- protected readonly opener: OpenerService;
16
- protected readonly messageService: MessageService;
17
- protected readonly jsoncEditor: MonacoJSONCEditor;
18
- protected readonly changeKeymapEmitter: Emitter<void>;
19
- readonly onDidChangeKeymaps: import("@theia/core/lib/common/event").Event<void>;
20
- protected model: MonacoEditorModel | undefined;
21
- protected readonly deferredModel: Deferred<MonacoEditorModel>;
22
- /**
23
- * Initialize the keybinding service.
24
- */
25
- protected init(): void;
26
- protected doInit(): Promise<void>;
27
- /**
28
- * Reconcile all the keybindings, registering them to the registry.
29
- */
30
- protected reconcile(): void;
31
- /**
32
- * Open the keybindings widget.
33
- * @param ref the optional reference for opening the widget.
34
- */
35
- open(ref?: Widget): Promise<void>;
36
- /**
37
- * Set the keybinding in the JSON.
38
- * @param newKeybinding the new JSON keybinding
39
- * @param oldKeybinding the old JSON keybinding
40
- */
41
- setKeybinding(newKeybinding: Keybinding, oldKeybinding: ScopedKeybinding | undefined): Promise<void>;
42
- /**
43
- * Unset the given keybinding in the JSON.
44
- * If the given keybinding has a default scope, it will be disabled in the JSON.
45
- * Otherwise, it will be removed from the JSON.
46
- * @param keybinding the keybinding to unset
47
- */
48
- unsetKeybinding(keybinding: ScopedKeybinding): Promise<void>;
49
- /**
50
- * Whether there is a keybinding with the given command id in the JSON.
51
- * @param commandId the keybinding command id
52
- */
53
- hasKeybinding(commandId: string): boolean;
54
- /**
55
- * Remove the keybindings with the given command id from the JSON.
56
- * This includes disabled keybindings.
57
- * @param commandId the keybinding command id.
58
- */
59
- removeKeybinding(commandId: string): Promise<void>;
60
- protected updateKeymap(op: () => Keybinding[] | void): Promise<void>;
61
- }
1
+ import { OpenerService, Widget } from '@theia/core/lib/browser';
2
+ import { KeybindingRegistry, ScopedKeybinding } from '@theia/core/lib/browser/keybinding';
3
+ import { Keybinding } from '@theia/core/lib/common/keybinding';
4
+ import { Emitter } from '@theia/core/lib/common/event';
5
+ import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service';
6
+ import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model';
7
+ import { Deferred } from '@theia/core/lib/common/promise-util';
8
+ import { MonacoWorkspace } from '@theia/monaco/lib/browser/monaco-workspace';
9
+ import { MessageService } from '@theia/core/lib/common/message-service';
10
+ import { MonacoJSONCEditor } from '@theia/preferences/lib/browser/monaco-jsonc-editor';
11
+ export declare class KeymapsService {
12
+ protected readonly workspace: MonacoWorkspace;
13
+ protected readonly textModelService: MonacoTextModelService;
14
+ protected readonly keybindingRegistry: KeybindingRegistry;
15
+ protected readonly opener: OpenerService;
16
+ protected readonly messageService: MessageService;
17
+ protected readonly jsoncEditor: MonacoJSONCEditor;
18
+ protected readonly changeKeymapEmitter: Emitter<void>;
19
+ readonly onDidChangeKeymaps: import("@theia/core/lib/common/event").Event<void>;
20
+ protected model: MonacoEditorModel | undefined;
21
+ protected readonly deferredModel: Deferred<MonacoEditorModel>;
22
+ /**
23
+ * Initialize the keybinding service.
24
+ */
25
+ protected init(): void;
26
+ protected doInit(): Promise<void>;
27
+ /**
28
+ * Reconcile all the keybindings, registering them to the registry.
29
+ */
30
+ protected reconcile(): void;
31
+ /**
32
+ * Open the keybindings widget.
33
+ * @param ref the optional reference for opening the widget.
34
+ */
35
+ open(ref?: Widget): Promise<void>;
36
+ /**
37
+ * Set the keybinding in the JSON.
38
+ * @param newKeybinding the new JSON keybinding
39
+ * @param oldKeybinding the old JSON keybinding
40
+ */
41
+ setKeybinding(newKeybinding: Keybinding, oldKeybinding: ScopedKeybinding | undefined): Promise<void>;
42
+ /**
43
+ * Unset the given keybinding in the JSON.
44
+ * If the given keybinding has a default scope, it will be disabled in the JSON.
45
+ * Otherwise, it will be removed from the JSON.
46
+ * @param keybinding the keybinding to unset
47
+ */
48
+ unsetKeybinding(keybinding: ScopedKeybinding): Promise<void>;
49
+ /**
50
+ * Whether there is a keybinding with the given command id in the JSON.
51
+ * @param commandId the keybinding command id
52
+ */
53
+ hasKeybinding(commandId: string): boolean;
54
+ /**
55
+ * Remove the keybindings with the given command id from the JSON.
56
+ * This includes disabled keybindings.
57
+ * @param commandId the keybinding command id.
58
+ */
59
+ removeKeybinding(commandId: string): Promise<void>;
60
+ protected updateKeymap(op: () => Keybinding[] | void): Promise<void>;
61
+ }
62
62
  //# sourceMappingURL=keymaps-service.d.ts.map