New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@glsp/sprotty-client

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glsp/sprotty-client - npm Package Compare versions

Comparing version 0.2.0-next.ea3e4b20 to 0.2.0-next.fcd7e449

lib/features/undo-redo/model.d.ts

5

lib/base/command-stack.d.ts

@@ -1,2 +0,2 @@

import { CommandStack, SModelRoot } from "sprotty/lib";
import { CommandStack, IActionDispatcher, SModelRoot } from "sprotty/lib";
/**

@@ -24,4 +24,7 @@ * Provides access to the current `SModelRoot` instance.

export declare class GLSPCommandStack extends CommandStack implements IReadonlyModelAccess {
protected actionDispatcher: () => Promise<IActionDispatcher>;
readonly model: Promise<SModelRoot>;
undo(): Promise<SModelRoot>;
redo(): Promise<SModelRoot>;
}
//# sourceMappingURL=command-stack.d.ts.map

@@ -21,2 +21,5 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -40,2 +43,3 @@ /********************************************************************************

var lib_1 = require("sprotty/lib");
var model_1 = require("../features/undo-redo/model");
var GLSPCommandStack = /** @class */ (function (_super) {

@@ -54,2 +58,14 @@ __extends(GLSPCommandStack, _super);

});
GLSPCommandStack.prototype.undo = function () {
this.actionDispatcher().then(function (dispatcher) { return dispatcher.dispatch(new model_1.GlspUndoAction()); });
return this.thenUpdate();
};
GLSPCommandStack.prototype.redo = function () {
this.actionDispatcher().then(function (dispatcher) { return dispatcher.dispatch(new model_1.GlspRedoAction()); });
return this.thenUpdate();
};
__decorate([
inversify_1.inject(lib_1.TYPES.IActionDispatcherProvider),
__metadata("design:type", Function)
], GLSPCommandStack.prototype, "actionDispatcher", void 0);
GLSPCommandStack = __decorate([

@@ -56,0 +72,0 @@ inversify_1.injectable()

2

lib/base/di.config.js

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

var types_1 = require("../types");
var command_stack_1 = require("./command-stack");
var update_model_command_1 = require("./model/update-model-command");

@@ -33,2 +34,3 @@ var tool_manager_action_handler_1 = require("./tool-manager/tool-manager-action-handler");

bind(lib_1.TYPES.IActionHandlerInitializer).to(update_model_command_1.SetModelActionHandler);
rebind(lib_1.TYPES.ICommandStack).to(command_stack_1.GLSPCommandStack);
bind(types_1.GLSP_TYPES.ViewerOptions).toConstantValue(viewer_options_1.defaultGLSPViewerOptions());

@@ -35,0 +37,0 @@ if (isBound(lib_1.TYPES.ViewerOptions)) {

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

this.target = undefined;
this.tool.dispatchFeedback([new cursor_feedback_1.ApplyCursorCSSFeedbackAction(cursor_feedback_1.CursorCSS.OPERATION_NOT_ALLOWED)]);
this.currentTarget = undefined;
this.allowedTarget = false;
this.tool.dispatchFeedback([new creation_tool_feedback_1.RemoveFeedbackEdgeAction()]);
};

@@ -197,0 +199,0 @@ EdgeCreationToolMouseListener.prototype.nonDraggingMouseUp = function (element, event) {

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

export * from './features/tools/delete-tool';
export * from './features/undo-redo/model';
export * from './features/validation/validate';

@@ -66,4 +67,5 @@ export * from './features/layout/layout-commands';

export * from './utils/viewpoint-util';
export * from "./model-source/glsp-server-status";
export { validationModule, saveModule, executeModule, paletteModule, toolFeedbackModule, defaultGLSPModule, modelHintsModule, glspCommandPaletteModule, requestResponseModule, //
glspSelectModule, glspMouseToolModule, layoutCommandsModule, glspEditLabelValidationModule };
//# sourceMappingURL=index.d.ts.map

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

__export(require("./features/tools/delete-tool"));
__export(require("./features/undo-redo/model"));
__export(require("./features/validation/validate"));

@@ -84,2 +85,3 @@ __export(require("./features/layout/layout-commands"));

__export(require("./utils/viewpoint-util"));
__export(require("./model-source/glsp-server-status"));
//# sourceMappingURL=index.js.map

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

var save_1 = require("../features/save/save");
var model_1 = require("../features/undo-redo/model");
var validate_1 = require("../features/validation/validate");

@@ -97,2 +98,4 @@ var GLSPWebsocketDiagramServer = /** @class */ (function (_super) {

registry.register(save_1.SaveModelAction.KIND, diagramServer);
registry.register(model_1.GlspUndoAction.KIND, diagramServer);
registry.register(model_1.GlspRedoAction.KIND, diagramServer);
registry.register(set_operations_1.OperationKind.CREATE_CONNECTION, diagramServer);

@@ -99,0 +102,0 @@ registry.register(set_operations_1.OperationKind.RECONNECT_CONNECTION, diagramServer);

{
"name": "@glsp/sprotty-client",
"version": "0.2.0-next.ea3e4b20",
"version": "0.2.0-next.fcd7e449",
"description": "A sprotty-based client for GLSP",

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

@@ -16,5 +16,7 @@ /********************************************************************************

********************************************************************************/
import { injectable } from "inversify";
import { CommandStack, SModelRoot } from "sprotty/lib";
import { inject, injectable } from "inversify";
import { CommandStack, IActionDispatcher, SModelRoot, TYPES } from "sprotty/lib";
import { GlspRedoAction, GlspUndoAction } from "../features/undo-redo/model";
/**

@@ -46,2 +48,4 @@ * Provides access to the current `SModelRoot` instance.

@inject(TYPES.IActionDispatcherProvider) protected actionDispatcher: () => Promise<IActionDispatcher>;
get model(): Promise<SModelRoot> {

@@ -52,3 +56,13 @@ return this.currentPromise.then(

}
undo(): Promise<SModelRoot> {
this.actionDispatcher().then(dispatcher => dispatcher.dispatch(new GlspUndoAction()));
return this.thenUpdate();
}
redo(): Promise<SModelRoot> {
this.actionDispatcher().then(dispatcher => dispatcher.dispatch(new GlspRedoAction()));
return this.thenUpdate();
}
}

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

import { GLSP_TYPES } from "../types";
import { GLSPCommandStack } from "./command-stack";
import { FeedbackAwareUpdateModelCommand, SetModelActionHandler } from "./model/update-model-command";

@@ -36,2 +37,3 @@ import { createToolFactory, ToolManagerActionHandler } from "./tool-manager/tool-manager-action-handler";

rebind(TYPES.ICommandStack).to(GLSPCommandStack);

@@ -38,0 +40,0 @@ bind<GLSPViewerOptions>(GLSP_TYPES.ViewerOptions).toConstantValue(defaultGLSPViewerOptions());

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

}
return result;

@@ -179,3 +177,5 @@ }

this.target = undefined;
this.tool.dispatchFeedback([new ApplyCursorCSSFeedbackAction(CursorCSS.OPERATION_NOT_ALLOWED)]);
this.currentTarget = undefined;
this.allowedTarget = false;
this.tool.dispatchFeedback([new RemoveFeedbackEdgeAction()]);
}

@@ -182,0 +182,0 @@

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

export * from './features/tools/delete-tool';
export * from './features/undo-redo/model';
export * from './features/validation/validate';

@@ -67,2 +68,4 @@ export * from './features/layout/layout-commands';

export * from './utils/viewpoint-util';
export * from "./model-source/glsp-server-status";
export {

@@ -69,0 +72,0 @@ validationModule, saveModule, executeModule, paletteModule, toolFeedbackModule, defaultGLSPModule, modelHintsModule, glspCommandPaletteModule, requestResponseModule, //

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

import { SaveModelAction } from "../features/save/save";
import { GlspRedoAction, GlspUndoAction } from "../features/undo-redo/model";
import { RequestMarkersAction } from "../features/validation/validate";

@@ -64,2 +65,3 @@

}
handle(action: Action): void | ICommand | Action {

@@ -83,2 +85,4 @@ if (action instanceof RequestModelAction && action.options !== undefined)

registry.register(SaveModelAction.KIND, diagramServer);
registry.register(GlspUndoAction.KIND, diagramServer);
registry.register(GlspRedoAction.KIND, diagramServer);
registry.register(OperationKind.CREATE_CONNECTION, diagramServer);

@@ -85,0 +89,0 @@ registry.register(OperationKind.RECONNECT_CONNECTION, diagramServer);

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