Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sprotty

Package Overview
Dependencies
Maintainers
3
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sprotty - npm Package Compare versions

Comparing version 0.13.0-next.b09c1c0.327 to 0.13.0-next.b0e9d60.331

3

lib/base/di.config.js

@@ -152,3 +152,4 @@ "use strict";

bind(types_1.TYPES.IToolManager).to(tool_manager_1.ToolManager).inSingletonScope();
bind(types_1.TYPES.KeyListener).to(tool_manager_1.DefaultToolsEnablingKeyListener);
bind(tool_manager_1.DefaultToolsEnablingKeyListener).toSelf().inSingletonScope();
bind(types_1.TYPES.KeyListener).toService(tool_manager_1.DefaultToolsEnablingKeyListener);
bind(tool_manager_1.ToolManagerActionHandler).toSelf().inSingletonScope();

@@ -155,0 +156,0 @@ action_handler_1.configureActionHandler(context, tool_1.EnableDefaultToolsAction.KIND, tool_manager_1.ToolManagerActionHandler);

@@ -25,3 +25,5 @@ /********************************************************************************

AnimationFrameSyncer: symbol;
/** @deprecated deprecated since 0.12.0 - please use `configureButtonHandler` */
IButtonHandler: symbol;
IButtonHandlerRegistration: symbol;
ICommandPaletteActionProvider: symbol;

@@ -28,0 +30,0 @@ ICommandPaletteActionProviderRegistry: symbol;

@@ -28,3 +28,5 @@ "use strict";

AnimationFrameSyncer: Symbol('AnimationFrameSyncer'),
/** @deprecated deprecated since 0.12.0 - please use `configureButtonHandler` */
IButtonHandler: Symbol('IButtonHandler'),
IButtonHandlerRegistration: Symbol('IButtonHandlerRegistration'),
ICommandPaletteActionProvider: Symbol('ICommandPaletteActionProvider'),

@@ -31,0 +33,0 @@ ICommandPaletteActionProviderRegistry: Symbol('ICommandPaletteActionProviderRegistry'),

@@ -50,3 +50,3 @@ /********************************************************************************

}
export declare type MouseEventKind = 'mouseOver' | 'mouseOut' | 'mouseEnter' | 'mouseLeave' | 'mouseDown' | 'mouseMove' | 'mouseUp' | 'wheel' | 'doubleClick' | 'contextMenu';
export declare type MouseEventKind = 'mouseOver' | 'mouseOut' | 'mouseEnter' | 'mouseLeave' | 'mouseDown' | 'mouseMove' | 'mouseUp' | 'wheel' | 'doubleClick' | 'contextMenu' | 'dragOver' | 'drop';
export declare class MouseListener {

@@ -63,2 +63,4 @@ mouseOver(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[];

contextMenu(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[];
dragOver(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[];
drop(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[];
decorate(vnode: VNode, element: SModelElement): VNode;

@@ -65,0 +67,0 @@ }

@@ -138,2 +138,3 @@ "use strict";

MouseTool.prototype.decorate = function (vnode, element) {
var _this = this;
if (element instanceof smodel_1.SModelRoot) {

@@ -150,2 +151,4 @@ vnode_utils_1.on(vnode, 'mouseover', this.mouseOver.bind(this, element));

vnode_utils_1.on(vnode, 'dblclick', this.doubleClick.bind(this, element));
vnode_utils_1.on(vnode, 'dragover', function (event) { return _this.handleEvent('dragOver', element, event); });
vnode_utils_1.on(vnode, 'drop', function (event) { return _this.handleEvent('drop', element, event); });
}

@@ -222,2 +225,8 @@ vnode = this.mouseListeners.reduce(function (n, listener) { return listener.decorate(n, element); }, vnode);

};
MouseListener.prototype.dragOver = function (target, event) {
return [];
};
MouseListener.prototype.drop = function (target, event) {
return [];
};
MouseListener.prototype.decorate = function (vnode, element) {

@@ -224,0 +233,0 @@ return vnode;

@@ -16,2 +16,3 @@ /********************************************************************************

********************************************************************************/
import { interfaces } from 'inversify';
import { Action } from 'sprotty-protocol/lib/actions';

@@ -23,2 +24,3 @@ import { InstanceRegistry } from '../../utils/registry';

}
/** @deprecated deprecated since 0.12.0 - please use `configureButtonHandler` */
export interface IButtonHandlerFactory {

@@ -28,5 +30,16 @@ TYPE: string;

}
export interface IButtonHandlerRegistration {
TYPE: string;
factory: () => IButtonHandler;
}
export declare class ButtonHandlerRegistry extends InstanceRegistry<IButtonHandler> {
constructor(buttonHandlerFactories: IButtonHandlerFactory[]);
constructor(buttonHandlerRegistrations: IButtonHandlerRegistration[], buttonHandlerFactories: IButtonHandlerFactory[]);
}
/**
* Utility function to register a button handler for an button type.
*/
export declare function configureButtonHandler(context: {
bind: interfaces.Bind;
isBound: interfaces.IsBound;
}, type: string, constr: interfaces.ServiceIdentifier<IButtonHandler>): void;
//# sourceMappingURL=button-handler.d.ts.map

@@ -46,6 +46,11 @@ "use strict";

var types_1 = require("../../base/types");
var inversify_2 = require("../../utils/inversify");
var ButtonHandlerRegistry = /** @class */ (function (_super) {
__extends(ButtonHandlerRegistry, _super);
function ButtonHandlerRegistry(buttonHandlerFactories) {
function ButtonHandlerRegistry(buttonHandlerRegistrations,
// deprecated, but keep support for now
buttonHandlerFactories) {
var _this = _super.call(this) || this;
buttonHandlerRegistrations.forEach(function (factory) { return _this.register(factory.TYPE, factory.factory()); });
// deprecated, but keep support for now
buttonHandlerFactories.forEach(function (factory) { return _this.register(factory.TYPE, new factory()); });

@@ -56,4 +61,5 @@ return _this;

inversify_1.injectable(),
__param(0, inversify_1.multiInject(types_1.TYPES.IButtonHandler)), __param(0, inversify_1.optional()),
__metadata("design:paramtypes", [Array])
__param(0, inversify_1.multiInject(types_1.TYPES.IButtonHandlerRegistration)), __param(0, inversify_1.optional()),
__param(1, inversify_1.multiInject(types_1.TYPES.IButtonHandler)), __param(1, inversify_1.optional()),
__metadata("design:paramtypes", [Array, Array])
], ButtonHandlerRegistry);

@@ -63,2 +69,20 @@ return ButtonHandlerRegistry;

exports.ButtonHandlerRegistry = ButtonHandlerRegistry;
/**
* Utility function to register a button handler for an button type.
*/
function configureButtonHandler(context, type, constr) {
if (typeof constr === 'function') {
if (!inversify_2.isInjectable(constr)) {
throw new Error("Button handlers should be @injectable: " + constr.name);
}
if (!context.isBound(constr)) {
context.bind(constr).toSelf();
}
}
context.bind(types_1.TYPES.IButtonHandlerRegistration).toDynamicValue(function (ctx) { return ({
TYPE: type,
factory: function () { return ctx.container.get(constr); }
}); });
}
exports.configureButtonHandler = configureButtonHandler;
//# sourceMappingURL=button-handler.js.map

@@ -26,3 +26,4 @@ "use strict";

bind(types_1.TYPES.IUIExtension).toService(command_palette_1.CommandPalette);
bind(types_1.TYPES.KeyListener).to(command_palette_1.CommandPaletteKeyListener);
bind(command_palette_1.CommandPaletteKeyListener).toSelf().inSingletonScope();
bind(types_1.TYPES.KeyListener).toService(command_palette_1.CommandPaletteKeyListener);
bind(action_providers_1.CommandPaletteActionProviderRegistry).toSelf().inSingletonScope();

@@ -29,0 +30,0 @@ bind(types_1.TYPES.ICommandPaletteActionProviderRegistry).toService(action_providers_1.CommandPaletteActionProviderRegistry);

@@ -35,3 +35,4 @@ "use strict";

});
bind(types_1.TYPES.MouseListener).to(mouse_listener_1.ContextMenuMouseListener);
bind(mouse_listener_1.ContextMenuMouseListener).toSelf().inSingletonScope();
bind(types_1.TYPES.MouseListener).toService(mouse_listener_1.ContextMenuMouseListener);
bind(types_1.TYPES.IContextMenuProviderRegistry).to(menu_providers_1.ContextMenuProviderRegistry);

@@ -38,0 +39,0 @@ });

@@ -38,4 +38,6 @@ "use strict";

exports.labelEditModule = new inversify_1.ContainerModule(function (bind, _unbind, isBound) {
bind(types_1.TYPES.MouseListener).to(edit_label_1.EditLabelMouseListener);
bind(types_1.TYPES.KeyListener).to(edit_label_1.EditLabelKeyListener);
bind(edit_label_1.EditLabelMouseListener).toSelf().inSingletonScope();
bind(types_1.TYPES.MouseListener).toService(edit_label_1.EditLabelMouseListener);
bind(edit_label_1.EditLabelKeyListener).toSelf().inSingletonScope();
bind(types_1.TYPES.KeyListener).toService(edit_label_1.EditLabelKeyListener);
command_registration_1.configureCommand({ bind: bind, isBound: isBound }, edit_label_1.ApplyLabelEditCommand);

@@ -42,0 +44,0 @@ });

@@ -19,8 +19,8 @@ "use strict";

var inversify_1 = require("inversify");
var types_1 = require("../../base/types");
var button_handler_1 = require("../button/button-handler");
var expand_1 = require("./expand");
var expandModule = new inversify_1.ContainerModule(function (bind) {
bind(types_1.TYPES.IButtonHandler).toConstructor(expand_1.ExpandButtonHandler);
var expandModule = new inversify_1.ContainerModule(function (bind, _unbind, isBound) {
button_handler_1.configureButtonHandler({ bind: bind, isBound: isBound }, expand_1.ExpandButtonHandler.TYPE, expand_1.ExpandButtonHandler);
});
exports.default = expandModule;
//# sourceMappingURL=di.config.js.map

@@ -24,3 +24,4 @@ "use strict";

var exportSvgModule = new inversify_1.ContainerModule(function (bind, _unbind, isBound) {
bind(types_1.TYPES.KeyListener).to(export_1.ExportSvgKeyListener).inSingletonScope();
bind(export_1.ExportSvgKeyListener).toSelf().inSingletonScope();
bind(types_1.TYPES.KeyListener).toService(export_1.ExportSvgKeyListener);
bind(types_1.TYPES.HiddenVNodePostprocessor).to(export_1.ExportSvgPostprocessor).inSingletonScope();

@@ -27,0 +28,0 @@ command_registration_1.configureCommand({ bind: bind, isBound: isBound }, export_1.ExportSvgCommand);

@@ -29,5 +29,8 @@ "use strict";

bind(types_1.TYPES.PopupVNodePostprocessor).to(popup_position_updater_1.PopupPositionUpdater).inSingletonScope();
bind(types_1.TYPES.MouseListener).to(hover_1.HoverMouseListener);
bind(types_1.TYPES.PopupMouseListener).to(hover_1.PopupHoverMouseListener);
bind(types_1.TYPES.KeyListener).to(hover_1.HoverKeyListener);
bind(hover_1.HoverMouseListener).toSelf().inSingletonScope();
bind(types_1.TYPES.MouseListener).toService(hover_1.HoverMouseListener);
bind(hover_1.PopupHoverMouseListener).toSelf().inSingletonScope();
bind(types_1.TYPES.PopupMouseListener).toService(hover_1.PopupHoverMouseListener);
bind(hover_1.HoverKeyListener).toSelf().inSingletonScope();
bind(types_1.TYPES.KeyListener).toService(hover_1.HoverKeyListener);
bind(types_1.TYPES.HoverState).toConstantValue({

@@ -34,0 +37,0 @@ mouseOverTimer: undefined,

@@ -23,3 +23,4 @@ "use strict";

var moveModule = new inversify_1.ContainerModule(function (bind, _unbind, isBound) {
bind(types_1.TYPES.MouseListener).to(move_1.MoveMouseListener);
bind(move_1.MoveMouseListener).toSelf().inSingletonScope();
bind(types_1.TYPES.MouseListener).toService(move_1.MoveMouseListener);
command_registration_1.configureCommand({ bind: bind, isBound: isBound }, move_1.MoveCommand);

@@ -26,0 +27,0 @@ bind(move_1.LocationPostprocessor).toSelf().inSingletonScope();

@@ -22,5 +22,6 @@ "use strict";

var openModule = new inversify_1.ContainerModule(function (bind) {
bind(types_1.TYPES.MouseListener).to(open_1.OpenMouseListener);
bind(open_1.OpenMouseListener).toSelf().inSingletonScope();
bind(types_1.TYPES.MouseListener).toService(open_1.OpenMouseListener);
});
exports.default = openModule;
//# sourceMappingURL=di.config.js.map

@@ -26,6 +26,8 @@ "use strict";

command_registration_1.configureCommand({ bind: bind, isBound: isBound }, select_1.GetSelectionCommand);
bind(types_1.TYPES.KeyListener).to(select_1.SelectKeyboardListener);
bind(types_1.TYPES.MouseListener).to(select_1.SelectMouseListener);
bind(select_1.SelectKeyboardListener).toSelf().inSingletonScope();
bind(types_1.TYPES.KeyListener).toService(select_1.SelectKeyboardListener);
bind(select_1.SelectMouseListener).toSelf().inSingletonScope();
bind(types_1.TYPES.MouseListener).toService(select_1.SelectMouseListener);
});
exports.default = selectModule;
//# sourceMappingURL=di.config.js.map

@@ -22,5 +22,6 @@ "use strict";

var undoRedoModule = new inversify_1.ContainerModule(function (bind) {
bind(types_1.TYPES.KeyListener).to(undo_redo_1.UndoRedoKeyListener);
bind(undo_redo_1.UndoRedoKeyListener).toSelf().inSingletonScope();
bind(types_1.TYPES.KeyListener).toService(undo_redo_1.UndoRedoKeyListener);
});
exports.default = undoRedoModule;
//# sourceMappingURL=di.config.js.map

@@ -30,7 +30,10 @@ "use strict";

command_registration_1.configureCommand({ bind: bind, isBound: isBound }, viewport_1.GetViewportCommand);
bind(types_1.TYPES.KeyListener).to(center_fit_1.CenterKeyboardListener);
bind(types_1.TYPES.MouseListener).to(scroll_1.ScrollMouseListener);
bind(types_1.TYPES.MouseListener).to(zoom_1.ZoomMouseListener);
bind(center_fit_1.CenterKeyboardListener).toSelf().inSingletonScope();
bind(types_1.TYPES.KeyListener).toService(center_fit_1.CenterKeyboardListener);
bind(scroll_1.ScrollMouseListener).toSelf().inSingletonScope();
bind(zoom_1.ZoomMouseListener).toSelf().inSingletonScope();
bind(types_1.TYPES.MouseListener).toService(scroll_1.ScrollMouseListener);
bind(types_1.TYPES.MouseListener).toService(zoom_1.ZoomMouseListener);
});
exports.default = viewportModule;
//# sourceMappingURL=di.config.js.map
{
"name": "sprotty",
"version": "0.13.0-next.b09c1c0.327+b09c1c0",
"version": "0.13.0-next.b0e9d60.331+b0e9d60",
"description": "A next-gen framework for graphical views",

@@ -60,3 +60,3 @@ "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",

"snabbdom": "^3.0.3",
"sprotty-protocol": "0.13.0-next.b09c1c0.327+b09c1c0",
"sprotty-protocol": "0.13.0-next.b0e9d60.331+b0e9d60",
"tinyqueue": "^2.0.3"

@@ -107,3 +107,3 @@ },

],
"gitHead": "b09c1c069d6fa5112d860564e19a52439a94865a"
"gitHead": "b0e9d60e9c9ab7d302f84f55eef227828ba7d68c"
}

@@ -163,3 +163,4 @@ /********************************************************************************

bind(TYPES.IToolManager).to(ToolManager).inSingletonScope();
bind(TYPES.KeyListener).to(DefaultToolsEnablingKeyListener);
bind(DefaultToolsEnablingKeyListener).toSelf().inSingletonScope();
bind(TYPES.KeyListener).toService(DefaultToolsEnablingKeyListener);
bind(ToolManagerActionHandler).toSelf().inSingletonScope();

@@ -166,0 +167,0 @@ configureActionHandler(context, EnableDefaultToolsAction.KIND, ToolManagerActionHandler);

@@ -27,3 +27,5 @@ /********************************************************************************

AnimationFrameSyncer: Symbol('AnimationFrameSyncer'),
/** @deprecated deprecated since 0.12.0 - please use `configureButtonHandler` */
IButtonHandler: Symbol('IButtonHandler'),
IButtonHandlerRegistration: Symbol('IButtonHandlerRegistration'),
ICommandPaletteActionProvider: Symbol('ICommandPaletteActionProvider'),

@@ -30,0 +32,0 @@ ICommandPaletteActionProviderRegistry: Symbol('ICommandPaletteActionProviderRegistry'),

@@ -143,2 +143,4 @@ /********************************************************************************

on(vnode, 'dblclick', this.doubleClick.bind(this, element));
on(vnode, 'dragover', (event: MouseEvent) => this.handleEvent('dragOver', element, event));
on(vnode, 'drop', (event: MouseEvent) => this.handleEvent('drop', element, event));
}

@@ -162,3 +164,5 @@ vnode = this.mouseListeners.reduce(

export type MouseEventKind = 'mouseOver' | 'mouseOut' | 'mouseEnter' | 'mouseLeave' | 'mouseDown' | 'mouseMove' | 'mouseUp' | 'wheel' | 'doubleClick' | 'contextMenu';
export type MouseEventKind =
'mouseOver' | 'mouseOut' | 'mouseEnter' | 'mouseLeave' | 'mouseDown' | 'mouseMove' | 'mouseUp'
| 'wheel' | 'doubleClick' | 'contextMenu' | 'dragOver' | 'drop';

@@ -208,2 +212,10 @@ @injectable()

dragOver(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
return [];
}
drop(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
return [];
}
decorate(vnode: VNode, element: SModelElement): VNode {

@@ -210,0 +222,0 @@ return vnode;

@@ -17,3 +17,3 @@ /********************************************************************************

import { injectable, multiInject, optional } from 'inversify';
import { injectable, interfaces, multiInject, optional } from 'inversify';
import { Action } from 'sprotty-protocol/lib/actions';

@@ -23,2 +23,3 @@ import { InstanceRegistry } from '../../utils/registry';

import { SButton } from './model';
import { isInjectable } from '../../utils/inversify';

@@ -29,2 +30,3 @@ export interface IButtonHandler {

/** @deprecated deprecated since 0.12.0 - please use `configureButtonHandler` */
export interface IButtonHandlerFactory {

@@ -35,9 +37,38 @@ TYPE: string

export interface IButtonHandlerRegistration {
TYPE: string
factory: () => IButtonHandler
}
@injectable()
export class ButtonHandlerRegistry extends InstanceRegistry<IButtonHandler> {
constructor(@multiInject(TYPES.IButtonHandler)@optional() buttonHandlerFactories: IButtonHandlerFactory[]) {
constructor(
@multiInject(TYPES.IButtonHandlerRegistration)@optional() buttonHandlerRegistrations: IButtonHandlerRegistration[],
// deprecated, but keep support for now
@multiInject(TYPES.IButtonHandler)@optional() buttonHandlerFactories: IButtonHandlerFactory[]) {
super();
buttonHandlerRegistrations.forEach(factory => this.register(factory.TYPE, factory.factory()));
// deprecated, but keep support for now
buttonHandlerFactories.forEach(factory => this.register(factory.TYPE, new factory()));
}
}
/**
* Utility function to register a button handler for an button type.
*/
export function configureButtonHandler(context: { bind: interfaces.Bind, isBound: interfaces.IsBound },
type: string, constr: interfaces.ServiceIdentifier<IButtonHandler>): void {
if (typeof constr === 'function') {
if (!isInjectable(constr)) {
throw new Error(`Button handlers should be @injectable: ${constr.name}`);
}
if (!context.isBound(constr)) {
context.bind(constr).toSelf();
}
}
context.bind(TYPES.IButtonHandlerRegistration).toDynamicValue(ctx => ({
TYPE: type,
factory: () => ctx.container.get(constr)
}));
}

@@ -25,3 +25,4 @@ /********************************************************************************

bind(TYPES.IUIExtension).toService(CommandPalette);
bind(TYPES.KeyListener).to(CommandPaletteKeyListener);
bind(CommandPaletteKeyListener).toSelf().inSingletonScope();
bind(TYPES.KeyListener).toService(CommandPaletteKeyListener);
bind(CommandPaletteActionProviderRegistry).toSelf().inSingletonScope();

@@ -28,0 +29,0 @@ bind(TYPES.ICommandPaletteActionProviderRegistry).toService(CommandPaletteActionProviderRegistry);

@@ -35,3 +35,4 @@ /********************************************************************************

});
bind(TYPES.MouseListener).to(ContextMenuMouseListener);
bind(ContextMenuMouseListener).toSelf().inSingletonScope();
bind(TYPES.MouseListener).toService(ContextMenuMouseListener);
bind(TYPES.IContextMenuProviderRegistry).to(ContextMenuProviderRegistry);

@@ -38,0 +39,0 @@ });

@@ -39,4 +39,6 @@ /********************************************************************************

export const labelEditModule = new ContainerModule((bind, _unbind, isBound) => {
bind(TYPES.MouseListener).to(EditLabelMouseListener);
bind(TYPES.KeyListener).to(EditLabelKeyListener);
bind(EditLabelMouseListener).toSelf().inSingletonScope();
bind(TYPES.MouseListener).toService(EditLabelMouseListener);
bind(EditLabelKeyListener).toSelf().inSingletonScope();
bind(TYPES.KeyListener).toService(EditLabelKeyListener);
configureCommand({ bind, isBound }, ApplyLabelEditCommand);

@@ -43,0 +45,0 @@ });

@@ -18,9 +18,9 @@ /********************************************************************************

import { ContainerModule } from "inversify";
import { TYPES } from "../../base/types";
import { configureButtonHandler } from "../button/button-handler";
import { ExpandButtonHandler } from "./expand";
const expandModule = new ContainerModule(bind => {
bind(TYPES.IButtonHandler).toConstructor(ExpandButtonHandler);
const expandModule = new ContainerModule((bind, _unbind, isBound) => {
configureButtonHandler({bind, isBound}, ExpandButtonHandler.TYPE, ExpandButtonHandler);
});
export default expandModule;

@@ -24,3 +24,4 @@ /********************************************************************************

const exportSvgModule = new ContainerModule((bind, _unbind, isBound) => {
bind(TYPES.KeyListener).to(ExportSvgKeyListener).inSingletonScope();
bind(ExportSvgKeyListener).toSelf().inSingletonScope();
bind(TYPES.KeyListener).toService(ExportSvgKeyListener);
bind(TYPES.HiddenVNodePostprocessor).to(ExportSvgPostprocessor).inSingletonScope();

@@ -27,0 +28,0 @@ configureCommand({ bind, isBound }, ExportSvgCommand);

@@ -32,5 +32,8 @@ /********************************************************************************

bind(TYPES.PopupVNodePostprocessor).to(PopupPositionUpdater).inSingletonScope();
bind(TYPES.MouseListener).to(HoverMouseListener);
bind(TYPES.PopupMouseListener).to(PopupHoverMouseListener);
bind(TYPES.KeyListener).to(HoverKeyListener);
bind(HoverMouseListener).toSelf().inSingletonScope();
bind(TYPES.MouseListener).toService(HoverMouseListener);
bind(PopupHoverMouseListener).toSelf().inSingletonScope();
bind(TYPES.PopupMouseListener).toService(PopupHoverMouseListener);
bind(HoverKeyListener).toSelf().inSingletonScope();
bind(TYPES.KeyListener).toService(HoverKeyListener);
bind<HoverState>(TYPES.HoverState).toConstantValue({

@@ -37,0 +40,0 @@ mouseOverTimer: undefined,

@@ -23,3 +23,4 @@ /********************************************************************************

const moveModule = new ContainerModule((bind, _unbind, isBound) => {
bind(TYPES.MouseListener).to(MoveMouseListener);
bind(MoveMouseListener).toSelf().inSingletonScope();
bind(TYPES.MouseListener).toService(MoveMouseListener);
configureCommand({ bind, isBound }, MoveCommand);

@@ -26,0 +27,0 @@ bind(LocationPostprocessor).toSelf().inSingletonScope();

@@ -22,5 +22,6 @@ /********************************************************************************

const openModule = new ContainerModule(bind => {
bind(TYPES.MouseListener).to(OpenMouseListener);
bind(OpenMouseListener).toSelf().inSingletonScope();
bind(TYPES.MouseListener).toService(OpenMouseListener);
});
export default openModule;

@@ -26,6 +26,8 @@ /********************************************************************************

configureCommand({ bind, isBound }, GetSelectionCommand);
bind(TYPES.KeyListener).to(SelectKeyboardListener);
bind(TYPES.MouseListener).to(SelectMouseListener);
bind(SelectKeyboardListener).toSelf().inSingletonScope();
bind(TYPES.KeyListener).toService(SelectKeyboardListener);
bind(SelectMouseListener).toSelf().inSingletonScope();
bind(TYPES.MouseListener).toService(SelectMouseListener);
});
export default selectModule;

@@ -22,5 +22,6 @@ /********************************************************************************

const undoRedoModule = new ContainerModule(bind => {
bind(TYPES.KeyListener).to(UndoRedoKeyListener);
bind(UndoRedoKeyListener).toSelf().inSingletonScope();
bind(TYPES.KeyListener).toService(UndoRedoKeyListener);
});
export default undoRedoModule;

@@ -30,7 +30,10 @@ /********************************************************************************

configureCommand({ bind, isBound }, GetViewportCommand);
bind(TYPES.KeyListener).to(CenterKeyboardListener);
bind(TYPES.MouseListener).to(ScrollMouseListener);
bind(TYPES.MouseListener).to(ZoomMouseListener);
bind(CenterKeyboardListener).toSelf().inSingletonScope();
bind(TYPES.KeyListener).toService(CenterKeyboardListener);
bind(ScrollMouseListener).toSelf().inSingletonScope();
bind(ZoomMouseListener).toSelf().inSingletonScope();
bind(TYPES.MouseListener).toService(ScrollMouseListener);
bind(TYPES.MouseListener).toService(ZoomMouseListener);
});
export default viewportModule;

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

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

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

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

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

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

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

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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc