@stoplight/command
Advanced tools
Comparing version 0.0.31 to 0.0.32-beta.0
@@ -1,2 +0,3 @@ | ||
import { Event, IDisposable } from '@stoplight/common/lib/types'; | ||
import { IDisposable } from '@stoplight/disposable'; | ||
import { Event } from '@stoplight/emitter'; | ||
import { ICommand, ICommandHandler, ICommandObj, ICommandRegistry, ICommandState, IShortcutOptions } from './types'; | ||
@@ -3,0 +4,0 @@ export declare class Command implements ICommand { |
@@ -5,5 +5,5 @@ "use strict"; | ||
var mobx_1 = require("mobx"); | ||
var lib_1 = require("@stoplight/common/lib"); | ||
var event_1 = require("@stoplight/common/lib/event"); | ||
var lib_2 = require("@stoplight/ioc/lib"); | ||
var disposable = require("@stoplight/disposable"); | ||
var emitter_1 = require("@stoplight/emitter"); | ||
var ioc_1 = require("@stoplight/ioc"); | ||
var types_1 = require("./types"); | ||
@@ -16,3 +16,3 @@ var keyboardJS; | ||
this._visible = false; | ||
this._didUpdateEmitter = new event_1.Emitter(); | ||
this._didUpdateEmitter = new emitter_1.Emitter(); | ||
this.id = command.id; | ||
@@ -152,3 +152,3 @@ } | ||
if (handler) { | ||
var toDispose = new lib_1.disposable.Collection(); | ||
var toDispose = new disposable.Collection(); | ||
toDispose.push(this._registerCommand(command)); | ||
@@ -171,3 +171,3 @@ toDispose.push(this.registerHandler(command.id, handler)); | ||
this.refreshCommandState(commandId); | ||
return lib_1.disposable.create(function () { | ||
return disposable.create(function () { | ||
var idx = handlers.indexOf(handler); | ||
@@ -186,3 +186,3 @@ if (idx >= 0) { | ||
if (!keyboardJS) | ||
return lib_1.disposable.NOOP; | ||
return disposable.NOOP; | ||
var commandId = options.commandId, execute = options.execute; | ||
@@ -211,3 +211,3 @@ if (commandId) { | ||
}); | ||
return lib_1.disposable.create(function () { | ||
return disposable.create(function () { | ||
var sh = _this._shortcuts[shortcut]; | ||
@@ -350,3 +350,3 @@ if (sh) { | ||
} | ||
return lib_1.disposable.create(function () { | ||
return disposable.create(function () { | ||
if (shortcut) { | ||
@@ -359,3 +359,3 @@ shortcut.dispose(); | ||
CommandRegistry = tslib_1.__decorate([ | ||
lib_2.provideSingleton(types_1.SYMBOLS.CommandRegistry), | ||
ioc_1.provideSingleton(types_1.SYMBOLS.CommandRegistry), | ||
tslib_1.__metadata("design:paramtypes", []) | ||
@@ -362,0 +362,0 @@ ], CommandRegistry); |
export * from './command'; | ||
export * from './types'; | ||
import * as types from './types'; | ||
export { types }; |
@@ -5,4 +5,5 @@ "use strict"; | ||
tslib_1.__exportStar(require("./command"), exports); | ||
tslib_1.__exportStar(require("./types"), exports); | ||
var types = require("./types"); | ||
exports.types = types; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,3 @@ | ||
import { Event, IDisposable } from '@stoplight/common/lib/types'; | ||
import { IDisposable } from '@stoplight/disposable'; | ||
import { Event } from '@stoplight/emitter'; | ||
/** | ||
@@ -3,0 +4,0 @@ * Unique symbol identifiers, used for IOC. |
{ | ||
"name": "@stoplight/command", | ||
"version": "0.0.31", | ||
"version": "0.0.32-beta.0", | ||
"description": "Stoplight command registry implementation.", | ||
@@ -23,8 +23,9 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@stoplight/common": "^0.0.31", | ||
"@stoplight/ioc": "^0.0.31", | ||
"@stoplight/disposable": "^0.0.32-beta.0", | ||
"@stoplight/emitter": "^0.0.32-beta.0", | ||
"@stoplight/ioc": "^0.0.32-beta.0", | ||
"keyboardjs": "2.4.x", | ||
"tslib": "1.x.x" | ||
}, | ||
"gitHead": "9cd1a2077c23087a06571e7bdf718d801f9ac4d9" | ||
"gitHead": "994c0ed717cae1f95ed698003f6202c728ab6854" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
27481
529
5
+ Added@stoplight/disposable@0.0.32(transitive)
+ Added@stoplight/emitter@0.0.32(transitive)
+ Added@stoplight/ioc@0.0.32(transitive)
- Removed@stoplight/common@^0.0.31
- Removed@stoplight/common@0.0.31(transitive)
- Removed@stoplight/fast-safe-stringify@2.1.2(transitive)
- Removed@stoplight/ioc@0.0.31(transitive)
- Removed@types/lodash@4.17.6(transitive)
- Removed@types/lodash.get@4.4.9(transitive)
- Removed@types/lodash.set@4.3.9(transitive)
- Removedlodash.get@4.4.2(transitive)
- Removedlodash.set@4.3.2(transitive)
- Removedlodash.trimstart@4.5.1(transitive)