Skip to content

Commit

Permalink
WOOP
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Jan 10, 2025
1 parent 2330b63 commit 64684f1
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 62 deletions.
4 changes: 2 additions & 2 deletions lib/Diagram.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default class Diagram<ServiceMap = null> {
constructor(options?: DiagramOptions, injector?: Injector<ServiceMap>);

/**
*
* Resolves a diagram service.
*
*
Expand Down Expand Up @@ -84,7 +85,6 @@ export default class Diagram<ServiceMap = null> {
get<T>(name: string, strict: true): T;

/**
*
* Resolves a diagram service.
*
*
Expand All @@ -95,6 +95,7 @@ export default class Diagram<ServiceMap = null> {
get<T>(name: string): T;

/**
*
* Invoke the given function, injecting dependencies provided in
* array notation. Return the result.
*
Expand All @@ -108,7 +109,6 @@ export default class Diagram<ServiceMap = null> {
invoke<T>(func: ArrayFunc<T>, context?: InjectionContext, locals?: LocalsMap): T;

/**
*
* Invoke the given function, injecting dependencies. Return the result.
*
*
Expand Down
16 changes: 8 additions & 8 deletions lib/core/ElementFactory.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,40 +40,40 @@ export default class ElementFactory<T extends import("../model/Types").Connectio
createConnection(attrs?: Partial<Connection>): T;

/**
* Create a label.
* Create a root element.
*
* @param type
* @param attrs
* @return
*/
create(type: 'label', attrs?: Partial<Label>): U;
create(type: 'root', attrs?: Partial<Root>): V;

/**
* Create a connection.
* Create a shape.
*
* @param type
* @param attrs
* @return
*/
create(type: 'connection', attrs?: Partial<Connection>): T;
create(type: 'shape', attrs?: Partial<Shape>): W;

/**
* Create a shape.
* Create a connection.
*
* @param type
* @param attrs
* @return
*/
create(type: 'shape', attrs?: Partial<Shape>): W;
create(type: 'connection', attrs?: Partial<Connection>): T;

/**
* Create a root element.
* Create a label.
*
* @param type
* @param attrs
* @return
*/
create(type: 'root', attrs?: Partial<Root>): V;
create(type: 'label', attrs?: Partial<Label>): U;
}

type Element = import('../model/Types').Element;
Expand Down
8 changes: 4 additions & 4 deletions lib/core/EventBus.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
*/
export default class EventBus<EventMap = null> {
/**
*
* Register an event listener for events with the given name.
*
* The callback will be invoked with `event, ...additionalArguments`
Expand All @@ -107,6 +108,7 @@ export default class EventBus<EventMap = null> {
): void;

/**
*
* Register an event listener for events with the given name.
*
* The callback will be invoked with `event, ...additionalArguments`
Expand All @@ -132,7 +134,6 @@ export default class EventBus<EventMap = null> {
): void;

/**
*
* Register an event listener for events with the given name.
*
* The callback will be invoked with `event, ...additionalArguments`
Expand All @@ -152,7 +153,6 @@ export default class EventBus<EventMap = null> {
on<T>(events: string|string[], callback: EventBusEventCallback<T>, that?: any): void;

/**
*
* Register an event listener for events with the given name.
*
* The callback will be invoked with `event, ...additionalArguments`
Expand All @@ -178,6 +178,7 @@ export default class EventBus<EventMap = null> {
): void;

/**
*
* Register an event listener that is called only once.
*
*
Expand All @@ -192,6 +193,7 @@ export default class EventBus<EventMap = null> {
): void;

/**
*
* Register an event listener that is called only once.
*
*
Expand All @@ -208,7 +210,6 @@ export default class EventBus<EventMap = null> {
): void;

/**
*
* Register an event listener that is called only once.
*
*
Expand All @@ -219,7 +220,6 @@ export default class EventBus<EventMap = null> {
once<T>(events: string|string[], callback: EventBusEventCallback<T>, that?: any): void;

/**
*
* Register an event listener that is called only once.
*
*
Expand Down
12 changes: 6 additions & 6 deletions lib/features/context-pad/ContextPad.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ export default class ContextPad {
constructor(canvas: Canvas, elementRegistry: ElementRegistry, eventBus: EventBus, scheduler: any);

/**
* Register a context pad provider with the given priority. See
*
* Register a context pad provider with the default priority. See
* {@link ContextPadProvider} for examples.
*
* @param priority
* @param provider
*/
registerProvider(priority: number, provider: ContextPadProvider): void;
registerProvider(provider: ContextPadProvider): void;

/**
*
* Register a context pad provider with the default priority. See
* Register a context pad provider with the given priority. See
* {@link ContextPadProvider} for examples.
*
* @param priority
* @param provider
*/
registerProvider(provider: ContextPadProvider): void;
registerProvider(priority: number, provider: ContextPadProvider): void;

/**
* Get context pad entries for given elements.
Expand Down
1 change: 1 addition & 0 deletions lib/features/keyboard/Keyboard.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default class Keyboard {
}, eventBus: EventBus);

/**
*
* Bind keyboard events to the canvas node.
*/
bind(): void;
Expand Down
12 changes: 6 additions & 6 deletions lib/features/modeling/Modeling.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ export default class Modeling<T extends import("../../model/Types").Connection =
/**
* Create a connection.
*
*
* @param source
* @param target
* @param parentIndex
* @param connection
* @param parent
* @param hints
Expand All @@ -90,7 +90,6 @@ export default class Modeling<T extends import("../../model/Types").Connection =
createConnection(
source: U,
target: U,
parentIndex: number,
connection: Partial<T>,
parent: W,
hints?: ModelingHints
Expand All @@ -99,9 +98,9 @@ export default class Modeling<T extends import("../../model/Types").Connection =
/**
* Create a connection.
*
*
* @param source
* @param target
* @param parentIndex
* @param connection
* @param parent
* @param hints
Expand All @@ -111,6 +110,7 @@ export default class Modeling<T extends import("../../model/Types").Connection =
createConnection(
source: U,
target: U,
parentIndex: number,
connection: Partial<T>,
parent: W,
hints?: ModelingHints
Expand All @@ -119,10 +119,10 @@ export default class Modeling<T extends import("../../model/Types").Connection =
/**
* Create a shape.
*
*
* @param shape
* @param position
* @param target
* @param parentIndex
* @param hints
*
* @return
Expand All @@ -131,17 +131,16 @@ export default class Modeling<T extends import("../../model/Types").Connection =
shape: Partial<X>,
position: Point,
target: W,
parentIndex: number,
hints?: ModelingCreateShapeHints
): X;

/**
* Create a shape.
*
*
* @param shape
* @param position
* @param target
* @param parentIndex
* @param hints
*
* @return
Expand All @@ -150,6 +149,7 @@ export default class Modeling<T extends import("../../model/Types").Connection =
shape: Partial<X>,
position: Point,
target: W,
parentIndex: number,
hints?: ModelingCreateShapeHints
): X;

Expand Down
12 changes: 6 additions & 6 deletions lib/features/palette/Palette.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ export default class Palette {
constructor(eventBus: EventBus, canvas: Canvas);

/**
* Register a palette provider with the given priority. See
*
* Register a palette provider with default priority. See
* {@link PaletteProvider} for examples.
*
* @param priority
* @param provider
*/
registerProvider(priority: number, provider: PaletteProvider): void;
registerProvider(provider: PaletteProvider): void;

/**
*
* Register a palette provider with default priority. See
* Register a palette provider with the given priority. See
* {@link PaletteProvider} for examples.
*
* @param priority
* @param provider
*/
registerProvider(provider: PaletteProvider): void;
registerProvider(priority: number, provider: PaletteProvider): void;

/**
* Returns the palette entries.
Expand Down
12 changes: 6 additions & 6 deletions lib/features/popup-menu/PopupMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,24 @@ export default class PopupMenu {
isEmpty(target: PopupMenuTarget, providerId: string): boolean;

/**
* Register a popup menu provider with the given priority. See
*
* Register a popup menu provider with default priority. See
* {@link PopupMenuProvider} for examples.
*
* @param id
* @param priority
* @param provider
*/
registerProvider(id: string, priority: number, provider: PopupMenuProvider): void;
registerProvider(id: string, provider: PopupMenuProvider): void;

/**
*
* Register a popup menu provider with default priority. See
* Register a popup menu provider with the given priority. See
* {@link PopupMenuProvider} for examples.
*
* @param id
* @param priority
* @param provider
*/
registerProvider(id: string, provider: PopupMenuProvider): void;
registerProvider(id: string, priority: number, provider: PopupMenuProvider): void;

/**
* Check if the popup menu is open.
Expand Down
Loading

0 comments on commit 64684f1

Please sign in to comment.