@eclipse-glsp/protocol
Advanced tools
Comparing version 2.1.0-next.302 to 2.1.0-next.303
@@ -18,2 +18,3 @@ /******************************************************************************** | ||
import { TypeGuard } from '../utils/type-util'; | ||
import { Args } from './types'; | ||
/** | ||
@@ -149,2 +150,6 @@ * An action is a declarative description of a behavior that shall be invoked by the receiver upon receipt of the action. | ||
isOperation: true; | ||
/** | ||
* Optional custom arguments. | ||
*/ | ||
args?: Args; | ||
} | ||
@@ -176,4 +181,6 @@ export declare namespace Operation { | ||
function is(object: unknown): object is CompoundOperation; | ||
function create(operationList: Operation[]): CompoundOperation; | ||
function create(operationList: Operation[], options?: { | ||
args?: Args; | ||
}): CompoundOperation; | ||
} | ||
//# sourceMappingURL=base-protocol.d.ts.map |
@@ -119,8 +119,4 @@ "use strict"; | ||
CompoundOperation.is = is; | ||
function create(operationList) { | ||
return { | ||
kind: CompoundOperation.KIND, | ||
isOperation: true, | ||
operationList | ||
}; | ||
function create(operationList, options = {}) { | ||
return Object.assign({ kind: CompoundOperation.KIND, isOperation: true, operationList }, options); | ||
} | ||
@@ -127,0 +123,0 @@ CompoundOperation.create = create; |
@@ -17,3 +17,3 @@ /******************************************************************************** | ||
import { Operation, RequestAction, ResponseAction } from './base-protocol'; | ||
import { EditorContext } from './types'; | ||
import { Args, EditorContext } from './types'; | ||
/** | ||
@@ -67,3 +67,5 @@ * Requests the clipboard data for the current editor context, i.e., the selected elements, in a clipboard-compatible format. | ||
function is(object: unknown): object is CutOperation; | ||
function create(editorContext: EditorContext): CutOperation; | ||
function create(editorContext: EditorContext, options?: { | ||
args?: Args; | ||
}): CutOperation; | ||
} | ||
@@ -90,2 +92,3 @@ /** | ||
clipboardData: ClipboardData; | ||
args?: Args; | ||
}): PasteOperation; | ||
@@ -92,0 +95,0 @@ } |
@@ -52,8 +52,4 @@ "use strict"; | ||
CutOperation.is = is; | ||
function create(editorContext) { | ||
return { | ||
kind: CutOperation.KIND, | ||
isOperation: true, | ||
editorContext | ||
}; | ||
function create(editorContext, options = {}) { | ||
return Object.assign({ kind: CutOperation.KIND, isOperation: true, editorContext }, options); | ||
} | ||
@@ -60,0 +56,0 @@ CutOperation.create = create; |
@@ -37,3 +37,2 @@ /******************************************************************************** | ||
targetElementId: string; | ||
args?: Args; | ||
} | ||
@@ -66,4 +65,6 @@ export declare namespace ReconnectEdgeOperation { | ||
function is(object: unknown): object is ChangeRoutingPointsOperation; | ||
function create(newRoutingPoints: ElementAndRoutingPoints[]): ChangeRoutingPointsOperation; | ||
function create(newRoutingPoints: ElementAndRoutingPoints[], options?: { | ||
args?: Args; | ||
}): ChangeRoutingPointsOperation; | ||
} | ||
//# sourceMappingURL=edge-modification.d.ts.map |
@@ -43,8 +43,4 @@ "use strict"; | ||
ChangeRoutingPointsOperation.is = is; | ||
function create(newRoutingPoints) { | ||
return { | ||
kind: ChangeRoutingPointsOperation.KIND, | ||
isOperation: true, | ||
newRoutingPoints | ||
}; | ||
function create(newRoutingPoints, options = {}) { | ||
return Object.assign({ kind: ChangeRoutingPointsOperation.KIND, isOperation: true, newRoutingPoints }, options); | ||
} | ||
@@ -51,0 +47,0 @@ ChangeRoutingPointsOperation.create = create; |
@@ -29,6 +29,2 @@ /******************************************************************************** | ||
elementTypeId: string; | ||
/** | ||
* Optional additional arguments for the server to execute the create operation. | ||
*/ | ||
args?: Args; | ||
} | ||
@@ -101,4 +97,6 @@ export declare namespace CreateOperation { | ||
function is(object: unknown): object is DeleteElementOperation; | ||
function create(elementIds: string[]): DeleteElementOperation; | ||
function create(elementIds: string[], options?: { | ||
args?: Args; | ||
}): DeleteElementOperation; | ||
} | ||
//# sourceMappingURL=element-creation.d.ts.map |
@@ -69,8 +69,4 @@ "use strict"; | ||
DeleteElementOperation.is = is; | ||
function create(elementIds) { | ||
return { | ||
kind: DeleteElementOperation.KIND, | ||
isOperation: true, | ||
elementIds | ||
}; | ||
function create(elementIds, options = {}) { | ||
return Object.assign({ kind: DeleteElementOperation.KIND, isOperation: true, elementIds }, options); | ||
} | ||
@@ -77,0 +73,0 @@ DeleteElementOperation.create = create; |
@@ -91,2 +91,3 @@ /******************************************************************************** | ||
text: string; | ||
args?: Args; | ||
}): ApplyLabelEditOperation; | ||
@@ -93,0 +94,0 @@ } |
@@ -19,3 +19,3 @@ /******************************************************************************** | ||
import { Operation, RequestAction, ResponseAction } from './base-protocol'; | ||
import { ElementAndAlignment, ElementAndBounds, ElementAndRoutingPoints } from './types'; | ||
import { Args, ElementAndAlignment, ElementAndBounds, ElementAndRoutingPoints } from './types'; | ||
/** | ||
@@ -89,4 +89,6 @@ * Sent from the server to the client to request bounds for the given model. The model is rendered invisibly so the bounds can | ||
function is(object: unknown): object is LayoutOperation; | ||
function create(elementIds?: string[]): LayoutOperation; | ||
function create(elementIds?: string[], options?: { | ||
args?: Args; | ||
}): LayoutOperation; | ||
} | ||
//# sourceMappingURL=model-layout.d.ts.map |
@@ -37,8 +37,4 @@ "use strict"; | ||
LayoutOperation.is = is; | ||
function create(elementIds) { | ||
return { | ||
kind: LayoutOperation.KIND, | ||
isOperation: true, | ||
elementIds | ||
}; | ||
function create(elementIds, options = {}) { | ||
return Object.assign({ kind: LayoutOperation.KIND, isOperation: true, elementIds }, options); | ||
} | ||
@@ -45,0 +41,0 @@ LayoutOperation.create = create; |
@@ -18,3 +18,3 @@ /******************************************************************************** | ||
import { Operation } from './base-protocol'; | ||
import { ElementAndBounds } from './types'; | ||
import { Args, ElementAndBounds } from './types'; | ||
/** | ||
@@ -64,4 +64,5 @@ * Triggers the position or size change of elements. This action concerns only the element's graphical size and position. | ||
location?: Point; | ||
args?: Args; | ||
}): ChangeContainerOperation; | ||
} | ||
//# sourceMappingURL=node-modification.d.ts.map |
{ | ||
"name": "@eclipse-glsp/protocol", | ||
"version": "2.1.0-next.302+8691584", | ||
"version": "2.1.0-next.303+f286b9d", | ||
"description": "The protocol definition for client-server communication in GLSP", | ||
@@ -62,3 +62,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "86915843995892b7103ba7b92c5334a0eda35d44" | ||
"gitHead": "f286b9d8289e11b2b3760cc7947c3bfc12a4bd70" | ||
} |
@@ -18,2 +18,3 @@ /******************************************************************************** | ||
import { AnyObject, TypeGuard, hasArrayProp, hasStringProp } from '../utils/type-util'; | ||
import { Args } from './types'; | ||
@@ -189,2 +190,7 @@ /** | ||
isOperation: true; | ||
/** | ||
* Optional custom arguments. | ||
*/ | ||
args?: Args; | ||
} | ||
@@ -228,9 +234,10 @@ | ||
export function create(operationList: Operation[]): CompoundOperation { | ||
export function create(operationList: Operation[], options: { args?: Args } = {}): CompoundOperation { | ||
return { | ||
kind: KIND, | ||
isOperation: true, | ||
operationList | ||
operationList, | ||
...options | ||
}; | ||
} | ||
} |
@@ -19,3 +19,3 @@ /******************************************************************************** | ||
import { Action, Operation, RequestAction, ResponseAction } from './base-protocol'; | ||
import { EditorContext } from './types'; | ||
import { Args, EditorContext } from './types'; | ||
@@ -100,7 +100,8 @@ /** | ||
export function create(editorContext: EditorContext): CutOperation { | ||
export function create(editorContext: EditorContext, options: { args?: Args } = {}): CutOperation { | ||
return { | ||
kind: KIND, | ||
isOperation: true, | ||
editorContext | ||
editorContext, | ||
...options | ||
}; | ||
@@ -134,3 +135,3 @@ } | ||
export function create(options: { editorContext: EditorContext; clipboardData: ClipboardData }): PasteOperation { | ||
export function create(options: { editorContext: EditorContext; clipboardData: ClipboardData; args?: Args }): PasteOperation { | ||
return { | ||
@@ -137,0 +138,0 @@ kind: KIND, |
@@ -43,7 +43,2 @@ /******************************************************************************** | ||
targetElementId: string; | ||
/* | ||
* Additional arguments for custom behavior. | ||
*/ | ||
args?: Args; | ||
} | ||
@@ -99,9 +94,10 @@ | ||
export function create(newRoutingPoints: ElementAndRoutingPoints[]): ChangeRoutingPointsOperation { | ||
export function create(newRoutingPoints: ElementAndRoutingPoints[], options: { args?: Args } = {}): ChangeRoutingPointsOperation { | ||
return { | ||
kind: KIND, | ||
isOperation: true, | ||
newRoutingPoints | ||
newRoutingPoints, | ||
...options | ||
}; | ||
} | ||
} |
@@ -32,6 +32,2 @@ /******************************************************************************** | ||
elementTypeId: string; | ||
/** | ||
* Optional additional arguments for the server to execute the create operation. | ||
*/ | ||
args?: Args; | ||
} | ||
@@ -152,9 +148,10 @@ | ||
export function create(elementIds: string[]): DeleteElementOperation { | ||
export function create(elementIds: string[], options: { args?: Args } = {}): DeleteElementOperation { | ||
return { | ||
kind: KIND, | ||
isOperation: true, | ||
elementIds | ||
elementIds, | ||
...options | ||
}; | ||
} | ||
} |
@@ -132,3 +132,3 @@ /******************************************************************************** | ||
export function create(options: { labelId: string; text: string }): ApplyLabelEditOperation { | ||
export function create(options: { labelId: string; text: string; args?: Args }): ApplyLabelEditOperation { | ||
return { | ||
@@ -135,0 +135,0 @@ kind: KIND, |
@@ -20,3 +20,3 @@ /******************************************************************************** | ||
import { Action, Operation, RequestAction, ResponseAction } from './base-protocol'; | ||
import { ElementAndAlignment, ElementAndBounds, ElementAndRoutingPoints } from './types'; | ||
import { Args, ElementAndAlignment, ElementAndBounds, ElementAndRoutingPoints } from './types'; | ||
@@ -131,9 +131,10 @@ /** | ||
export function create(elementIds?: string[]): LayoutOperation { | ||
export function create(elementIds?: string[], options: { args?: Args } = {}): LayoutOperation { | ||
return { | ||
kind: KIND, | ||
isOperation: true, | ||
elementIds | ||
elementIds, | ||
...options | ||
}; | ||
} | ||
} |
@@ -20,3 +20,3 @@ /******************************************************************************** | ||
import { Operation } from './base-protocol'; | ||
import { ElementAndBounds } from './types'; | ||
import { Args, ElementAndBounds } from './types'; | ||
@@ -84,3 +84,8 @@ /** | ||
export function create(options: { elementId: string; targetContainerId: string; location?: Point }): ChangeContainerOperation { | ||
export function create(options: { | ||
elementId: string; | ||
targetContainerId: string; | ||
location?: Point; | ||
args?: Args; | ||
}): ChangeContainerOperation { | ||
return { | ||
@@ -87,0 +92,0 @@ kind: KIND, |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 7 instances in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 7 instances in 1 package
1269726