Socket
Socket
Sign inDemoInstall

sprotty

Package Overview
Dependencies
5
Maintainers
3
Versions
236
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.0-next.b4140a74 to 0.5.0-next.cf6ff2f

lib/features/decoration/decoration-placer.d.ts

15

lib/base/actions/action-dispatcher.d.ts

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ILogger } from "../../utils/logging";

@@ -2,0 +17,0 @@ import { ICommandStack } from "../commands/command-stack";

19

lib/base/actions/action-dispatcher.js
"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { MultiInstanceRegistry } from "../../utils/registry";

@@ -2,0 +17,0 @@ import { ICommand, ICommandFactory } from "../commands/command";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
/**

@@ -2,0 +17,0 @@ * An action describes a change to the model declaratively.

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ function isAction(object) {

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
export declare class AnimationFrameSyncer {

@@ -2,0 +17,0 @@ tasks: ((x?: number) => void)[];

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { CommandExecutionContext } from "../commands/command";

@@ -2,0 +17,0 @@ import { SModelRoot } from "../model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
/**

@@ -2,0 +17,0 @@ * Slows down animations towards the begin and the end.

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

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

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Container } from "inversify";

@@ -2,0 +17,0 @@ /**

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var types_1 = require("../types");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ILogger } from "../../utils/logging";

@@ -2,0 +17,0 @@ import { IModelFactory } from "../model/smodel-factory";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __assign = (this && this.__assign) || Object.assign || function(t) {

@@ -9,0 +18,0 @@ for (var s, i = 1, n = arguments.length; i < n; i++) {

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ILogger } from "../../utils/logging";

@@ -2,0 +17,0 @@ import { SModelRoot } from "../model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const defaultContainerModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { Bounds } from '../../utils/geometry';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Action } from "../actions/action";

@@ -2,0 +17,0 @@ import { SModelRoot, SModelRootSchema } from "../model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
/**

@@ -2,0 +17,0 @@ * Interface to mark interefaces that extend the properties of SModelElements,

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=smodel-extension.js.map

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ProviderRegistry } from '../../utils/registry';

@@ -2,0 +17,0 @@ import { SChildElement, SModelElement, SModelElementSchema, SModelRoot, SModelRootSchema, SParentElement } from './smodel';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ViewerOptions } from "../views/viewer-options";

@@ -2,0 +17,0 @@ import { SModelRootSchema } from './smodel';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelElement, SModelElementSchema } from "./smodel";

@@ -2,0 +17,0 @@ import { Point } from "../../utils/geometry";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var smodel_1 = require("./smodel");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, Point } from "../../utils/geometry";

@@ -2,0 +17,0 @@ import { FluentIterable } from "../../utils/iterable";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
export declare const TYPES: {

@@ -2,0 +17,0 @@ IActionDispatcher: symbol;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ exports.TYPES = {

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ViewerOptions } from "./viewer-options";

@@ -2,0 +17,0 @@ import { SModelElement } from "../model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { ILogger } from "../../utils/logging";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { IActionDispatcher } from "../actions/action-dispatcher";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { IActionDispatcher } from "../actions/action-dispatcher";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { SModelElement } from "../model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var snabbdom_1 = require("snabbdom");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { interfaces } from "inversify";

@@ -2,0 +17,0 @@ import { VNode } from "snabbdom/vnode";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelRoot } from "../model/smodel";

@@ -2,0 +17,0 @@ import { AnimationFrameSyncer } from "../animations/animation-frame-syncer";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Container, interfaces } from "inversify";

@@ -2,0 +17,0 @@ export interface ViewerOptions {

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __assign = (this && this.__assign) || Object.assign || function(t) {

@@ -9,0 +18,0 @@ for (var s, i = 1, n = arguments.length; i < n; i++) {

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { Module } from "snabbdom/modules/module";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { SModelElement } from "../model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { SModelElement } from "../model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __assign = (this && this.__assign) || Object.assign || function(t) {

@@ -9,0 +18,0 @@ for (var s, i = 1, n = arguments.length; i < n; i++) {

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, Dimension, Point } from "../../utils/geometry";

@@ -2,0 +17,0 @@ import { SParentElement, SModelElement, SChildElement } from "../../base/model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -35,4 +44,4 @@ var geometry_1 = require("../../utils/geometry");

y: container.bounds.y,
width: maxWidth + options.paddingLeft + options.paddingRight,
height: maxHeight + options.paddingTop + options.paddingBottom
width: Math.max(options.minWidth, maxWidth + options.paddingLeft + options.paddingRight),
height: Math.max(options.minHeight, maxHeight + options.paddingTop + options.paddingBottom)
};

@@ -39,0 +48,0 @@ };

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, Point } from "../../utils/geometry";

@@ -2,0 +17,0 @@ import { SModelElement, SModelRoot, SModelRootSchema } from "../../base/model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const boundsModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, Point } from '../../utils/geometry';

@@ -2,0 +17,0 @@ import { SParentElement, SChildElement } from "../../base/model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -29,2 +38,3 @@ var extendStatics = Object.setPrototypeOf ||

var abstract_layout_1 = require("./abstract-layout");
var model_1 = require("./model");
/**

@@ -43,10 +53,12 @@ * Layouts children of a container in horizontal (left->right) direction.

container.children.forEach(function (child) {
var bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && geometry_1.isValidDimension(bounds)) {
if (isFirst)
isFirst = false;
else
maxWidth += containerOptions.hGap;
maxWidth += bounds.width;
maxHeight = Math.max(maxHeight, bounds.height);
if (model_1.isLayoutableChild(child)) {
var bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && geometry_1.isValidDimension(bounds)) {
if (isFirst)
isFirst = false;
else
maxWidth += containerOptions.hGap;
maxWidth += bounds.width;
maxHeight = Math.max(maxHeight, bounds.height);
}
}

@@ -82,3 +94,5 @@ });

hGap: 1,
vAlign: 'center'
vAlign: 'center',
minWidth: 0,
minHeight: 0
};

@@ -85,0 +99,0 @@ };

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { Bounds, Point } from '../../utils/geometry';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
export declare type HAlignment = 'left' | 'center' | 'right';

@@ -10,3 +25,5 @@ export declare type VAlignment = 'top' | 'center' | 'bottom';

paddingFactor: number;
minWidth: number;
minHeight: number;
}
//# sourceMappingURL=layout-options.d.ts.map
"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=layout-options.js.map

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ILogger } from '../../utils/logging';

@@ -2,0 +17,0 @@ import { InstanceRegistry } from "../../utils/registry";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, Dimension, Point } from "../../utils/geometry";

@@ -40,2 +55,3 @@ import { SModelElement, SModelElementSchema, SParentElement, SChildElement } from "../../base/model/smodel";

export declare function getAbsoluteBounds(element: SModelElement): Bounds;
export declare function findChildrenAtPosition(parent: SParentElement, point: Point): SModelElement[];
/**

@@ -42,0 +58,0 @@ * Serializable schema for SShapeElement.

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -71,2 +80,18 @@ var extendStatics = Object.setPrototypeOf ||

exports.getAbsoluteBounds = getAbsoluteBounds;
function findChildrenAtPosition(parent, point) {
var matches = [];
doFindChildrenAtPosition(parent, point, matches);
return matches;
}
exports.findChildrenAtPosition = findChildrenAtPosition;
function doFindChildrenAtPosition(parent, point, matches) {
parent.children.forEach(function (child) {
if (isBoundsAware(child) && geometry_1.includes(child.bounds, point))
matches.push(child);
if (child instanceof smodel_1.SParentElement) {
var newPoint = child.parentToLocal(point);
doFindChildrenAtPosition(child, newPoint, matches);
}
});
}
/**

@@ -73,0 +98,0 @@ * Abstract class for elements with a position and a size.

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Animation } from "../../base/animations/animation";

@@ -2,0 +17,0 @@ import { SModelRoot, SModelElement } from "../../base/model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, Point } from '../../utils/geometry';

@@ -2,0 +17,0 @@ import { SParentElement, SChildElement } from "../../base/model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -29,2 +38,3 @@ var extendStatics = Object.setPrototypeOf ||

var abstract_layout_1 = require("./abstract-layout");
var model_1 = require("./model");
var StackLayouter = /** @class */ (function (_super) {

@@ -39,6 +49,8 @@ __extends(StackLayouter, _super);

container.children.forEach(function (child) {
var bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && geometry_1.isValidDimension(bounds)) {
maxWidth = Math.max(maxWidth, bounds.width);
maxHeight = Math.max(maxHeight, bounds.height);
if (model_1.isLayoutableChild(child)) {
var bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && geometry_1.isValidDimension(bounds)) {
maxWidth = Math.max(maxWidth, bounds.width);
maxHeight = Math.max(maxHeight, bounds.height);
}
}

@@ -72,3 +84,5 @@ });

hAlign: 'center',
vAlign: 'center'
vAlign: 'center',
minWidth: 0,
minHeight: 0
};

@@ -75,0 +89,0 @@ };

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, Point } from '../../utils/geometry';

@@ -2,0 +17,0 @@ import { SParentElement, SChildElement } from "../../base/model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -29,2 +38,3 @@ var extendStatics = Object.setPrototypeOf ||

var abstract_layout_1 = require("./abstract-layout");
var model_1 = require("./model");
/**

@@ -43,10 +53,12 @@ * Layouts children of a container in vertical (top->bottom) direction.

container.children.forEach(function (child) {
var bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && geometry_1.isValidDimension(bounds)) {
maxHeight += bounds.height;
if (isFirst)
isFirst = false;
else
maxHeight += containerOptions.vGap;
maxWidth = Math.max(maxWidth, bounds.width);
if (model_1.isLayoutableChild(child)) {
var bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && geometry_1.isValidDimension(bounds)) {
maxHeight += bounds.height;
if (isFirst)
isFirst = false;
else
maxHeight += containerOptions.vGap;
maxWidth = Math.max(maxWidth, bounds.width);
}
}

@@ -82,3 +94,5 @@ });

vGap: 1,
hAlign: 'center'
hAlign: 'center',
minWidth: 0,
minHeight: 0
};

@@ -85,0 +99,0 @@ };

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { InstanceRegistry } from '../../utils/registry';

@@ -2,0 +17,0 @@ import { SButton } from './model';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const buttonModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SShapeElement, SShapeElementSchema } from '../bounds/model';

@@ -2,0 +17,0 @@ export interface SButtonSchema extends SShapeElementSchema {

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,4 +1,19 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";
declare const edgeEditModule: ContainerModule;
export default edgeEditModule;
export declare const edgeEditModule: ContainerModule;
export declare const labelEditModule: ContainerModule;
//# sourceMappingURL=di.config.d.ts.map
"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -12,7 +21,18 @@ var inversify_1 = require("inversify");

var edit_routing_1 = require("./edit-routing");
var edgeEditModule = new inversify_1.ContainerModule(function (bind) {
var reconnect_1 = require("./reconnect");
var view_1 = require("../../base/views/view");
var sgraph_1 = require("../../graph/sgraph");
var svg_views_1 = require("../../lib/svg-views");
var delete_1 = require("./delete");
var edit_label_1 = require("./edit-label");
exports.edgeEditModule = new inversify_1.ContainerModule(function (bind) {
bind(types_1.TYPES.ICommand).toConstructor(edit_routing_1.SwitchEditModeCommand);
bind(types_1.TYPES.ICommand).toConstructor(edit_routing_1.MoveRoutingHandleCommand);
bind(types_1.TYPES.ICommand).toConstructor(reconnect_1.ReconnectCommand);
bind(types_1.TYPES.ICommand).toConstructor(delete_1.DeleteElementCommand);
view_1.configureModelElement({ bind: bind }, 'dangling-anchor', sgraph_1.SDanglingAnchor, svg_views_1.EmptyGroupView);
});
exports.default = edgeEditModule;
exports.labelEditModule = new inversify_1.ContainerModule(function (bind) {
bind(types_1.TYPES.MouseListener).to(edit_label_1.EditLabelMouseListener);
});
//# sourceMappingURL=di.config.js.map

@@ -0,3 +1,18 @@

/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Point } from "../../utils/geometry";
import { Routable, SRoutingHandle } from './model';
import { Routable, SRoutingHandle, RoutingHandleKind } from './model';
import { Action } from "../../base/actions/action";

@@ -7,3 +22,3 @@ import { Command, CommandExecutionContext, CommandResult } from "../../base/commands/command";

import { Animation } from '../../base/animations/animation';
export declare function createRoutingHandle(kind: 'junction' | 'line', parentId: string, index: number): SRoutingHandle;
export declare function createRoutingHandle(kind: RoutingHandleKind, parentId: string, index: number): SRoutingHandle;
export declare function createRoutingHandles(editTarget: SParentElement & Routable): void;

@@ -10,0 +25,0 @@ export declare class SwitchEditModeAction implements Action {

"use strict";
/*
* Copyright (C) 2018 TypeFox and others.
/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -33,7 +42,10 @@ var extendStatics = Object.setPrototypeOf ||

var animation_1 = require("../../base/animations/animation");
var sgraph_1 = require("../../graph/sgraph");
function createRoutingHandle(kind, parentId, index) {
var handle = new model_1.SRoutingHandle();
handle.type = kind === 'junction' ? 'routing-point' : 'volatile-routing-point';
handle.type = kind === 'line' ? 'volatile-routing-point' : 'routing-point';
handle.kind = kind;
handle.pointIndex = index;
if (kind === 'target')
handle.id = parentId + '-target-anchor';
return handle;

@@ -45,2 +57,3 @@ }

var targetId = editTarget.id;
editTarget.add(createRoutingHandle('source', targetId, -2));
editTarget.add(createRoutingHandle('line', targetId, -1));

@@ -51,2 +64,3 @@ for (var i = 0; i < rpCount; i++) {

}
editTarget.add(createRoutingHandle('target', targetId, rpCount));
}

@@ -105,4 +119,15 @@ exports.createRoutingHandles = createRoutingHandles;

element.removeAll(function (child) { return child instanceof model_1.SRoutingHandle; });
else if (element instanceof model_1.SRoutingHandle)
else if (element instanceof model_1.SRoutingHandle) {
element.editMode = false;
if (element.danglingAnchor) {
if (model_1.isRoutable(element.parent) && element.danglingAnchor.original) {
if (element.parent.source === element.danglingAnchor)
element.parent.sourceId = element.danglingAnchor.original.id;
else if (element.parent.target === element.danglingAnchor)
element.parent.targetId = element.danglingAnchor.original.id;
element.danglingAnchor.parent.remove(element.danglingAnchor);
element.danglingAnchor = undefined;
}
}
}
});

@@ -195,2 +220,22 @@ this.elementsToActivate.forEach(function (element) {

if (element instanceof model_1.SRoutingHandle) {
if (model_1.isRoutable(element.parent)) {
if (element.kind === 'source' && !(element.parent.source instanceof sgraph_1.SDanglingAnchor)) {
var anchor = new sgraph_1.SDanglingAnchor();
anchor.id = element.parent.id + '_dangling-source';
anchor.original = element.parent.source;
anchor.position = move.toPosition;
element.root.add(anchor);
element.danglingAnchor = anchor;
element.parent.sourceId = anchor.id;
}
else if (element.kind === 'target' && !(element.parent.target instanceof sgraph_1.SDanglingAnchor)) {
var anchor = new sgraph_1.SDanglingAnchor();
anchor.id = element.parent.id + '_dangling-target';
anchor.original = element.parent.target;
anchor.position = move.toPosition;
element.root.add(anchor);
element.danglingAnchor = anchor;
element.parent.targetId = anchor.id;
}
}
return {

@@ -211,2 +256,6 @@ elementId: move.elementId,

if (model_1.isRoutable(parent)) {
if (handle.danglingAnchor) {
handle.danglingAnchor.position = res.toPosition;
return;
}
var points = parent.routingPoints;

@@ -213,0 +262,0 @@ var index_1 = handle.pointIndex;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Point } from '../../utils/geometry';

@@ -7,2 +22,3 @@ import { SModelElement, SChildElement, SParentElement } from '../../base/model/smodel';

import { RoutedPoint } from '../../graph/routing';
import { SDanglingAnchor } from '../../graph/sgraph';
export declare const editFeature: unique symbol;

@@ -13,9 +29,16 @@ export interface Routable extends SModelExtension {

readonly target?: SModelElement;
sourceId?: string;
targetId?: string;
route(): RoutedPoint[];
}
export declare function isRoutable(element: SModelElement): element is SModelElement & Routable;
export declare function isRoutable<T extends SModelElement>(element: T): element is T & Routable;
export declare function canEditRouting(element: SModelElement): element is SModelElement & Routable;
export declare type RoutingHandleKind = 'junction' | 'line' | 'source' | 'target';
export declare class SRoutingHandle extends SChildElement implements Selectable, Hoverable {
/** 'junction' is a point where two line segments meet, 'line' is a volatile handle placed on a line segment. */
kind: 'junction' | 'line';
/**
* 'junction' is a point where two line segments meet,
* 'line' is a volatile handle placed on a line segment,
* 'source' and 'target are the respective anchors.
*/
kind: RoutingHandleKind;
/** The actual routing point index (junction) or the previous point index (line). */

@@ -27,2 +50,3 @@ pointIndex: number;

selected: boolean;
danglingAnchor?: SDanglingAnchor;
hasFeature(feature: symbol): boolean;

@@ -29,0 +53,0 @@ }

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const expandModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Action } from '../../base/actions/action';

@@ -2,0 +17,0 @@ import { SButton } from '../button/model';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelElement } from "../../base/model/smodel";

@@ -2,0 +17,0 @@ import { SModelExtension } from "../../base/model/smodel-extension";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ exports.expandFeature = Symbol('expandFeature');

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from 'snabbdom/vnode';

@@ -2,0 +17,0 @@ import { IView, RenderingContext } from '../../base/views/view';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ /** @jsx svg */

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const exportSvgModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from 'snabbdom/vnode';

@@ -2,0 +17,0 @@ import { CommandExecutionContext, HiddenCommand } from '../../base/commands/command';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelElement } from '../../base/model/smodel';

@@ -2,0 +17,0 @@ import { SModelExtension } from '../../base/model/smodel-extension';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ exports.exportFeature = Symbol('exportFeature');

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ViewerOptions } from '../../base/views/viewer-options';

@@ -2,0 +17,0 @@ import { Action } from '../../base/actions/action';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const fadeModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { Animation } from "../../base/animations/animation";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelElement } from "../../base/model/smodel";

@@ -2,0 +17,0 @@ import { SModelExtension } from "../../base/model/smodel-extension";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ exports.fadeFeature = Symbol('fadeFeature');

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const hoverModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, Point } from "../../utils/geometry";

@@ -71,2 +86,3 @@ import { SModelElement, SModelRoot, SModelRootSchema } from "../../base/model/smodel";

export declare class HoverMouseListener extends AbstractHoverMouseListener {
protected options: ViewerOptions;
protected computePopupBounds(target: SModelElement, mousePosition: Point): Bounds;

@@ -77,2 +93,3 @@ protected allowSidePosition(target: SModelElement, side: 'above' | 'below' | 'left' | 'right', distance: number): boolean;

mouseOut(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[];
protected isSprottyPopup(element: Element): boolean;
mouseMove(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[];

@@ -79,0 +96,0 @@ protected closeOnMouseMove(target: SModelElement, event: MouseEvent): boolean;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -240,14 +249,21 @@ var extendStatics = Object.setPrototypeOf ||

var result = [];
if (this.state.popupOpen) {
var popupTarget = smodel_utils_1.findParent(target, model_2.hasPopupFeature);
if (this.state.previousPopupElement !== undefined && popupTarget !== undefined
&& this.state.previousPopupElement.id === popupTarget.id)
result.push(this.startMouseOutTimer());
var elementUnderMouse = document.elementFromPoint(event.x, event.y);
if (!this.isSprottyPopup(elementUnderMouse)) {
if (this.state.popupOpen) {
var popupTarget = smodel_utils_1.findParent(target, model_2.hasPopupFeature);
if (this.state.previousPopupElement !== undefined && popupTarget !== undefined
&& this.state.previousPopupElement.id === popupTarget.id)
result.push(this.startMouseOutTimer());
}
this.stopMouseOverTimer();
var hoverTarget = smodel_utils_1.findParentByFeature(target, model_2.isHoverable);
if (hoverTarget !== undefined)
result.push(new HoverFeedbackAction(hoverTarget.id, false));
}
this.stopMouseOverTimer();
var hoverTarget = smodel_utils_1.findParentByFeature(target, model_2.isHoverable);
if (hoverTarget !== undefined)
result.push(new HoverFeedbackAction(hoverTarget.id, false));
return result;
};
HoverMouseListener.prototype.isSprottyPopup = function (element) {
return element && (element.id === this.options.popupDiv
|| (!!element.parentElement && this.isSprottyPopup(element.parentElement)));
};
HoverMouseListener.prototype.mouseMove = function (target, event) {

@@ -268,2 +284,6 @@ var result = [];

};
__decorate([
inversify_1.inject(types_1.TYPES.ViewerOptions),
__metadata("design:type", Object)
], HoverMouseListener.prototype, "options", void 0);
HoverMouseListener = __decorate([

@@ -270,0 +290,0 @@ inversify_1.injectable()

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ActionHandlerRegistry, IActionHandlerInitializer } from "../../base/actions/action-handler";

@@ -2,0 +17,0 @@ export declare class PopupActionHandlerInitializer implements IActionHandlerInitializer {

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelElement } from "../../base/model/smodel";

@@ -2,0 +17,0 @@ import { SModelExtension } from "../../base/model/smodel-extension";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ exports.hoverFeedbackFeature = Symbol('hoverFeedbackFeature');

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { IVNodeDecorator } from "../../base/views/vnode-decorators";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const moveModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Point } from "../../utils/geometry";

@@ -2,0 +17,0 @@ import { SModelElement } from "../../base/model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ exports.moveFeature = Symbol('moveFeature');

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Point } from '../../utils/geometry';

@@ -56,2 +71,3 @@ import { VNode } from "snabbdom/vnode";

}
export declare const edgeInProgressID = "edge-in-progress";
export declare class MoveMouseListener extends MouseListener {

@@ -58,0 +74,0 @@ hasDragged: boolean;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -40,2 +49,7 @@ var extendStatics = Object.setPrototypeOf ||

var model_5 = require("./model");
var create_on_drag_1 = require("../edit/create-on-drag");
var select_1 = require("../select/select");
var sgraph_1 = require("../../graph/sgraph");
var reconnect_1 = require("../edit/reconnect");
var delete_1 = require("../edit/delete");
var MoveAction = /** @class */ (function () {

@@ -208,2 +222,3 @@ function MoveAction(moves, animate) {

exports.MoveAnimation = MoveAnimation;
exports.edgeInProgressID = 'edge-in-progress';
var MoveMouseListener = /** @class */ (function (_super) {

@@ -221,3 +236,3 @@ __extends(MoveMouseListener, _super);

var isRoutingHandle = target instanceof model_4.SRoutingHandle;
if (moveable !== undefined || isRoutingHandle) {
if (moveable !== undefined || isRoutingHandle || create_on_drag_1.isCreatingOnDrag(target)) {
this.lastDragPosition = { x: event.pageX, y: event.pageY };

@@ -229,3 +244,11 @@ }

this.hasDragged = false;
if (isRoutingHandle) {
if (create_on_drag_1.isCreatingOnDrag(target)) {
result.push(new select_1.SelectAllAction(false));
result.push(target.createAction(exports.edgeInProgressID));
result.push(new select_1.SelectAction([exports.edgeInProgressID], []));
result.push(new edit_routing_1.SwitchEditModeAction([exports.edgeInProgressID], []));
result.push(new select_1.SelectAction([exports.edgeInProgressID + '-target-anchor'], []));
result.push(new edit_routing_1.SwitchEditModeAction([exports.edgeInProgressID + '-target-anchor'], []));
}
else if (isRoutingHandle) {
result.push(new edit_routing_1.SwitchEditModeAction([target.id], []));

@@ -292,29 +315,44 @@ }

}
if (handle.kind === 'line') {
var getIndex = function (rp) {
if (rp.pointIndex !== undefined)
return rp.pointIndex;
else if (rp.kind === 'target')
return parent.routingPoints.length;
switch (handle.kind) {
case 'source':
if (parent.source instanceof sgraph_1.SDanglingAnchor)
return parent.source.position;
else
return -1;
};
var route = parent.route();
var rp1 = void 0, rp2 = void 0;
for (var _i = 0, route_1 = route; _i < route_1.length; _i++) {
var rp = route_1[_i];
var i = getIndex(rp);
if (i <= handle.pointIndex && (rp1 === undefined || i > getIndex(rp1)))
rp1 = rp;
if (i > handle.pointIndex && (rp2 === undefined || i < getIndex(rp2)))
rp2 = rp;
return parent.route()[0];
case 'target':
if (parent.target instanceof sgraph_1.SDanglingAnchor)
return parent.target.position;
else {
var route = parent.route();
return route[route.length - 1];
}
case 'line': {
var getIndex = function (rp) {
if (rp.pointIndex !== undefined)
return rp.pointIndex;
else if (rp.kind === 'target')
return parent.routingPoints.length;
else
return -1;
};
var route = parent.route();
var rp1 = void 0, rp2 = void 0;
for (var _i = 0, route_1 = route; _i < route_1.length; _i++) {
var rp = route_1[_i];
var i = getIndex(rp);
if (i <= handle.pointIndex && (rp1 === undefined || i > getIndex(rp1)))
rp1 = rp;
if (i > handle.pointIndex && (rp2 === undefined || i < getIndex(rp2)))
rp2 = rp;
}
if (rp1 !== undefined && rp2 !== undefined) {
return geometry_1.centerOfLine(rp1, rp2);
}
return undefined;
}
if (rp1 !== undefined && rp2 !== undefined) {
return geometry_1.centerOfLine(rp1, rp2);
}
default:
if (handle.pointIndex >= 0)
return parent.routingPoints[handle.pointIndex];
return undefined;
}
else if (handle.pointIndex >= 0) {
return parent.routingPoints[handle.pointIndex];
}
return undefined;
};

@@ -327,10 +365,39 @@ MoveMouseListener.prototype.mouseEnter = function (target, event) {

MoveMouseListener.prototype.mouseUp = function (target, event) {
var _this = this;
var result = [];
var hasReconnected = false;
if (this.lastDragPosition) {
target.root.index.all()
.forEach(function (element) {
if (element instanceof model_4.SRoutingHandle && element.editMode)
result.push(new edit_routing_1.SwitchEditModeAction([], [element.id]));
if (element instanceof model_4.SRoutingHandle) {
var parent_1 = element.parent;
if (model_4.isRoutable(parent_1) && element.danglingAnchor) {
var handlePos = _this.getHandlePosition(element);
if (handlePos) {
var handlePosAbs = smodel_utils_1.translatePoint(handlePos, element.parent, element.root);
var newEnd = model_3.findChildrenAtPosition(target.root, handlePosAbs)
.find(function (e) { return reconnect_1.isConnectable(e) && e.canConnect(parent_1, element.kind); });
if (newEnd && _this.hasDragged) {
result.push(new reconnect_1.ReconnectAction(element.parent.id, element.kind === 'source' ? newEnd.id : parent_1.sourceId, element.kind === 'target' ? newEnd.id : parent_1.targetId));
hasReconnected = true;
}
}
}
if (element.editMode)
result.push(new edit_routing_1.SwitchEditModeAction([], [element.id]));
}
});
}
if (!hasReconnected) {
var edgeInProgress = target.root.index.getById(exports.edgeInProgressID);
if (edgeInProgress instanceof smodel_1.SChildElement) {
var deleteIds_1 = [];
deleteIds_1.push(exports.edgeInProgressID);
edgeInProgress.children.forEach(function (c) {
if (c instanceof model_4.SRoutingHandle && c.danglingAnchor)
deleteIds_1.push(c.danglingAnchor.id);
});
result.push(new delete_1.DeleteElementAction(deleteIds_1));
}
}
this.hasDragged = false;

@@ -337,0 +404,0 @@ this.lastDragPosition = undefined;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const openModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelElement } from "../../base/model/smodel";

@@ -2,0 +17,0 @@ export declare const openFeature: unique symbol;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ exports.openFeature = Symbol('openFeature');

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { MouseListener } from '../../base/views/mouse-tool';

@@ -2,0 +17,0 @@ import { Action } from '../../base/actions/action';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const selectModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelElement } from "../../base/model/smodel";

@@ -2,0 +17,0 @@ import { SModelExtension } from "../../base/model/smodel-extension";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ exports.selectFeature = Symbol('selectFeature');

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { SChildElement, SModelElement, SModelRoot, SParentElement } from '../../base/model/smodel';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const undoRedoModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Action } from "../../base/actions/action";

@@ -2,0 +17,0 @@ import { KeyListener } from "../../base/views/key-tool";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelRootSchema, SModelElementSchema, SModelRoot, SModelElement } from '../../base/model/smodel';

@@ -2,0 +17,0 @@ export interface Match {

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var smodel_1 = require("../../base/model/smodel");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Animation } from '../../base/animations/animation';

@@ -2,0 +17,0 @@ import { Command, CommandExecutionContext, CommandResult } from '../../base/commands/command';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds } from "../../utils/geometry";

@@ -2,0 +17,0 @@ import { Action } from "../../base/actions/action";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ declare const viewportModule: ContainerModule;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelElement, SModelRoot } from "../../base/model/smodel";

@@ -2,0 +17,0 @@ import { Scrollable } from "./scroll";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var smodel_1 = require("../../base/model/smodel");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Point } from "../../utils/geometry";

@@ -2,0 +17,0 @@ import { SModelElement } from "../../base/model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, Point } from "../../utils/geometry";

@@ -2,0 +17,0 @@ import { SModelRoot, SModelIndex, SModelElement } from '../../base/model/smodel';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelElement, SModelRoot } from "../../base/model/smodel";

@@ -2,0 +17,0 @@ import { Action } from "../../base/actions/action";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelElement } from "../../base/model/smodel";

@@ -2,0 +17,0 @@ import { MouseListener } from "../../base/views/mouse-tool";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Point } from "../utils/geometry";

@@ -2,0 +17,0 @@ import { SEdge } from "./sgraph";

"use strict";
/*
* Copyright (C) 2018 TypeFox and others.
/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelFactory } from "../base/model/smodel-factory";

@@ -2,0 +17,0 @@ import { SChildElement, SModelElementSchema, SModelRoot, SModelRootSchema, SParentElement } from "../base/model/smodel";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { FluentIterable } from '../utils/iterable';

@@ -12,2 +27,3 @@ import { SChildElement, SModelElementSchema, SModelRootSchema, SModelIndex, SModelElement, SParentElement } from '../base/model/smodel';

import { RoutedPoint, IEdgeRouter } from './routing';
import { Connectable } from '../features/edit/reconnect';
/**

@@ -35,3 +51,3 @@ * Serializable schema for graph-like models.

*/
export declare abstract class SConnectableElement extends SShapeElement {
export declare abstract class SConnectableElement extends SShapeElement implements Connectable {
/**

@@ -70,2 +86,3 @@ * The incoming edges of this connectable element. They are resolved by the index, which must

getTranslatedAnchor(refPoint: Point, refContainer: SParentElement, edge: SEdge, offset?: number): Point;
canConnect(routable: Routable, role: string): boolean;
}

@@ -92,2 +109,3 @@ /**

opacity: number;
canConnect(routable: Routable, role: string): boolean;
hasFeature(feature: symbol): boolean;

@@ -191,2 +209,7 @@ }

}
export declare class SDanglingAnchor extends SConnectableElement {
original?: SModelElement;
type: string;
hasFeature(feature: symbol): boolean;
}
//# sourceMappingURL=sgraph.d.ts.map
"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -32,2 +41,4 @@ var extendStatics = Object.setPrototypeOf ||

var routing_1 = require("./routing");
var reconnect_1 = require("../features/edit/reconnect");
var delete_1 = require("../features/edit/delete");
/**

@@ -106,2 +117,5 @@ * Root element for graph-like models.

};
SConnectableElement.prototype.canConnect = function (routable, role) {
return true;
};
return SConnectableElement;

@@ -124,6 +138,9 @@ }(model_6.SShapeElement));

}
SNode.prototype.canConnect = function (routable, role) {
return this.children.find(function (c) { return c instanceof SPort; }) === undefined;
};
SNode.prototype.hasFeature = function (feature) {
return feature === model_5.selectFeature || feature === model_4.moveFeature || feature === model_1.boundsFeature
|| feature === model_1.layoutContainerFeature || feature === model_2.fadeFeature || feature === model_3.hoverFeedbackFeature
|| feature === model_3.popupFeature;
|| feature === model_3.popupFeature || feature === reconnect_1.connectableFeature || feature === delete_1.deletableFeature;
};

@@ -147,3 +164,3 @@ return SNode;

return feature === model_5.selectFeature || feature === model_1.boundsFeature || feature === model_2.fadeFeature
|| feature === model_3.hoverFeedbackFeature;
|| feature === model_3.hoverFeedbackFeature || feature === reconnect_1.connectableFeature;
};

@@ -190,3 +207,4 @@ return SPort;

return feature === model_2.fadeFeature || feature === model_5.selectFeature ||
feature === model_7.editFeature || feature === model_3.hoverFeedbackFeature;
feature === model_7.editFeature || feature === model_3.hoverFeedbackFeature ||
feature === delete_1.deletableFeature;
};

@@ -327,2 +345,15 @@ return SEdge;

exports.SGraphIndex = SGraphIndex;
var SDanglingAnchor = /** @class */ (function (_super) {
__extends(SDanglingAnchor, _super);
function SDanglingAnchor() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = 'dangling-anchor';
return _this;
}
SDanglingAnchor.prototype.hasFeature = function (feature) {
return feature === delete_1.deletableFeature;
};
return SDanglingAnchor;
}(SConnectableElement));
exports.SDanglingAnchor = SDanglingAnchor;
//# sourceMappingURL=sgraph.js.map

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { Point } from '../utils/geometry';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -76,8 +85,8 @@ /** @jsx svg */

SRoutingHandleView.prototype.getPosition = function (handle, route) {
if (handle.kind === 'line') {
return this.getLinePosition(handle, route);
switch (handle.kind) {
case 'line': return this.getLinePosition(handle, route);
case 'junction': return this.getJunctionPosition(handle, route);
case 'source': return route[0];
case 'target': return route[route.length - 1];
}
else {
return this.getJunctionPosition(handle, route);
}
};

@@ -84,0 +93,0 @@ SRoutingHandleView.prototype.getJunctionPosition = function (handle, route) {

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
export * from './base/actions/action';

@@ -37,4 +52,10 @@ export * from './base/actions/action-dispatcher';

export * from "./features/button/model";
export * from "./features/edit/create";
export * from "./features/edit/create-on-drag";
export * from "./features/edit/di.config";
export * from "./features/edit/delete";
export * from "./features/edit/edit-label";
export * from "./features/edit/edit-routing";
export * from "./features/edit/model";
export * from "./features/edit/reconnect";
export * from "./features/expand/expand";

@@ -50,2 +71,5 @@ export * from "./features/expand/model";

export * from "./features/hover/model";
export * from "./features/decoration/model";
export * from "./features/decoration/views";
export * from "./features/decoration/decoration-placer";
export * from "./features/move/model";

@@ -73,3 +97,2 @@ export * from "./features/move/move";

import hoverModule from "./features/hover/di.config";
import edgeEditModule from "./features/edit/di.config";
import exportModule from "./features/export/di.config";

@@ -79,3 +102,4 @@ import expandModule from "./features/expand/di.config";

import buttonModule from "./features/button/di.config";
export { moveModule, boundsModule, fadeModule, selectModule, undoRedoModule, viewportModule, hoverModule, edgeEditModule, exportModule, expandModule, openModule, buttonModule };
import decorationModule from "./features/decoration/di.config";
export { moveModule, boundsModule, fadeModule, selectModule, undoRedoModule, viewportModule, hoverModule, exportModule, expandModule, openModule, buttonModule, decorationModule };
export * from "./graph/sgraph-factory";

@@ -82,0 +106,0 @@ export * from "./graph/sgraph";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
function __export(m) {

@@ -49,4 +58,10 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];

__export(require("./features/button/model"));
__export(require("./features/edit/create"));
__export(require("./features/edit/create-on-drag"));
__export(require("./features/edit/di.config"));
__export(require("./features/edit/delete"));
__export(require("./features/edit/edit-label"));
__export(require("./features/edit/edit-routing"));
__export(require("./features/edit/model"));
__export(require("./features/edit/reconnect"));
__export(require("./features/expand/expand"));

@@ -62,2 +77,5 @@ __export(require("./features/expand/model"));

__export(require("./features/hover/model"));
__export(require("./features/decoration/model"));
__export(require("./features/decoration/views"));
__export(require("./features/decoration/decoration-placer"));
__export(require("./features/move/model"));

@@ -92,12 +110,12 @@ __export(require("./features/move/move"));

exports.hoverModule = di_config_8.default;
var di_config_9 = require("./features/edit/di.config");
exports.edgeEditModule = di_config_9.default;
var di_config_10 = require("./features/export/di.config");
exports.exportModule = di_config_10.default;
var di_config_11 = require("./features/expand/di.config");
exports.expandModule = di_config_11.default;
var di_config_12 = require("./features/open/di.config");
exports.openModule = di_config_12.default;
var di_config_13 = require("./features/button/di.config");
exports.buttonModule = di_config_13.default;
var di_config_9 = require("./features/export/di.config");
exports.exportModule = di_config_9.default;
var di_config_10 = require("./features/expand/di.config");
exports.expandModule = di_config_10.default;
var di_config_11 = require("./features/open/di.config");
exports.openModule = di_config_11.default;
var di_config_12 = require("./features/button/di.config");
exports.buttonModule = di_config_12.default;
var di_config_13 = require("./features/decoration/di.config");
exports.decorationModule = di_config_13.default;
// ------------------ Graph ------------------

@@ -104,0 +122,0 @@ __export(require("./graph/sgraph-factory"));

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { IView, RenderingContext } from "../base/views/view";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var strings_1 = require("snabbdom-virtualize/strings");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -2,0 +17,0 @@ import { IView, RenderingContext } from "../base/views/view";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ /** @jsx html */

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelRoot, SModelRootSchema, SChildElement, SModelElementSchema } from "../base/model/smodel";

@@ -23,2 +38,9 @@ import { Point, Dimension, Bounds } from "../utils/geometry";

/**
* A node that is represented by a diamond.
*/
export declare class DiamondNode extends SNode {
strokeWidth: number;
getAnchor(refPoint: Point, offset?: number): Point;
}
/**
* A port that is represented by a circle.

@@ -25,0 +47,0 @@ */

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -71,2 +80,20 @@ var extendStatics = Object.setPrototypeOf ||

/**
* A node that is represented by a diamond.
*/
var DiamondNode = /** @class */ (function (_super) {
__extends(DiamondNode, _super);
function DiamondNode() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.strokeWidth = 0;
return _this;
}
DiamondNode.prototype.getAnchor = function (refPoint, offset) {
if (offset === void 0) { offset = 0; }
var strokeCorrection = 0.5 * this.strokeWidth;
return anchors_1.computeDiamondAnchor(this.bounds, refPoint, offset + strokeCorrection);
};
return DiamondNode;
}(sgraph_1.SNode));
exports.DiamondNode = DiamondNode;
/**
* A port that is represented by a circle.

@@ -73,0 +100,0 @@ */

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { VNode } from "snabbdom/vnode";

@@ -7,2 +22,3 @@ import { IView, RenderingContext } from "../base/views/view";

import { Selectable } from '../features/select/model';
import { SModelElement } from '../base/model/smodel';
export declare class SvgViewportView implements IView {

@@ -18,2 +34,8 @@ render(model: Readonly<ViewportRootElement>, context: RenderingContext): VNode;

}
export declare class DiamondNodeView implements IView {
render(node: Readonly<SShapeElement & Hoverable & Selectable>, context: RenderingContext): VNode;
}
export declare class EmptyGroupView implements IView {
render(node: Readonly<SModelElement>, context: RenderingContext): VNode;
}
//# sourceMappingURL=svg-views.d.ts.map
"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -12,2 +21,3 @@ /** @jsx svg */

var sgraph_1 = require("../graph/sgraph");
var geometry_1 = require("../utils/geometry");
var SvgViewportView = /** @class */ (function () {

@@ -51,2 +61,27 @@ function SvgViewportView() {

exports.RectangularNodeView = RectangularNodeView;
var DiamondNodeView = /** @class */ (function () {
function DiamondNodeView() {
}
DiamondNodeView.prototype.render = function (node, context) {
var diamond = new geometry_1.Diamond({ height: Math.max(node.size.height, 0), width: Math.max(node.size.width, 0), x: 0, y: 0 });
var points = svgStr(diamond.topPoint) + " " + svgStr(diamond.rightPoint) + " " + svgStr(diamond.bottomPoint) + " " + svgStr(diamond.leftPoint);
return snabbdom_jsx_1.svg("g", null,
snabbdom_jsx_1.svg("polygon", { "class-sprotty-node": node instanceof sgraph_1.SNode, "class-sprotty-port": node instanceof sgraph_1.SPort, "class-mouseover": node.hoverFeedback, "class-selected": node.selected, points: points }),
context.renderChildren(node));
};
return DiamondNodeView;
}());
exports.DiamondNodeView = DiamondNodeView;
function svgStr(point) {
return point.x + "," + point.y;
}
var EmptyGroupView = /** @class */ (function () {
function EmptyGroupView() {
}
EmptyGroupView.prototype.render = function (node, context) {
return snabbdom_jsx_1.svg("g", null);
};
return EmptyGroupView;
}());
exports.EmptyGroupView = EmptyGroupView;
//# sourceMappingURL=svg-views.js.map

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ContainerModule } from "inversify";

@@ -2,0 +17,0 @@ /**

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var inversify_1 = require("inversify");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, Point } from "../utils/geometry";

@@ -2,0 +17,0 @@ import { ILogger } from "../utils/logging";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelRootSchema, SModelElementSchema } from '../base/model/smodel';

@@ -2,0 +17,0 @@ import { CollapseExpandAction } from '../features/expand/expand';

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var ExpansionState = /** @class */ (function () {

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, Point } from "../utils/geometry";

@@ -2,0 +17,0 @@ import { Deferred } from "../utils/async";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ILogger, LogLevel } from "../utils/logging";

@@ -2,0 +17,0 @@ import { Action } from "../base/actions/action";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Action } from "../base/actions/action";

@@ -2,0 +17,0 @@ import { ActionHandlerRegistry, IActionHandler } from "../base/actions/action-handler";

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { DiagramServer, ActionMessage } from "./diagram-server";

@@ -2,0 +17,0 @@ /**

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __extends = (this && this.__extends) || (function () {

@@ -9,0 +18,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,4 +1,20 @@

/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Point, Bounds } from './geometry';
export declare function computeCircleAnchor(position: Point, radius: number, refPoint: Point, offset?: number): Point;
export declare function computeRectangleAnchor(bounds: Bounds, refPoint: Point, offset: number): Point;
export declare function computeDiamondAnchor(bounds: Bounds, refPoint: Point, offset: number): Point;
//# sourceMappingURL=anchors.d.ts.map
"use strict";
/*
* Copyright (C) 2018 TypeFox and others.
/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -85,2 +94,9 @@ var geometry_1 = require("./geometry");

exports.computeRectangleAnchor = computeRectangleAnchor;
function computeDiamondAnchor(bounds, refPoint, offset) {
var referenceLine = new geometry_1.PointToPointLine(geometry_1.center(bounds), refPoint);
var closestDiamondSide = new geometry_1.Diamond(bounds).closestSideLine(refPoint);
var anchorPoint = geometry_1.intersection(closestDiamondSide, referenceLine);
return geometry_1.shiftTowards(anchorPoint, refPoint, offset);
}
exports.computeDiamondAnchor = computeDiamondAnchor;
//# sourceMappingURL=anchors.js.map

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
/**

@@ -2,0 +17,0 @@ * Simple implementation of the deferred pattern.

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

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

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
/**

@@ -2,0 +17,0 @@ * Returns whether the mouse or keyboard event includes the CMD key

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

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

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
export interface RGBColor {

@@ -2,0 +17,0 @@ red: number;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ function rgb(red, green, blue) {

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
/**

@@ -130,2 +145,21 @@ * A Point is composed of the (x,y) coordinates of an object.

/**
* Computes a point that is the original `point` shifted towards `refPoint` by the given `distance`.
* @param {Point} point - Point to shift
* @param {Point} refPoint - Point to shift towards
* @param {Point} distance - Distance to shift
*/
export declare function shiftTowards(point: Point, refPoint: Point, distance: number): Point;
/**
* Computes the normalized vector from the vector given in `point`; that is, computing its unit vector.
* @param {Point} point - Point representing the vector to be normalized
* @returns {Point} The normalized point
*/
export declare function normalize(point: Point): Point;
/**
* Computes the magnitude of the vector given in `point`.
* @param {Point} point - Point representing the vector to compute the magnitude for
* @returns {number} The magnitude or also known as length of the `point`
*/
export declare function magnitude(point: Point): number;
/**
* Converts from radians to degrees

@@ -149,2 +183,52 @@ * @param {number} a - A value in radians

export declare function almostEquals(a: number, b: number): boolean;
/**
* A diamond or rhombus is a quadrilateral whose four sides all have the same length.
* It consinsts of four points, a `topPoint`, `rightPoint`, `bottomPoint`, and a `leftPoint`,
* which are connected by four lines -- the `topRightSideLight`, `topLeftSideLine`, `bottomRightSideLine`,
* and the `bottomLeftSideLine`.
*/
export declare class Diamond {
protected bounds: Bounds;
constructor(bounds: Bounds);
readonly topPoint: Point;
readonly rightPoint: Point;
readonly bottomPoint: Point;
readonly leftPoint: Point;
readonly topRightSideLine: Line;
readonly topLeftSideLine: Line;
readonly bottomRightSideLine: Line;
readonly bottomLeftSideLine: Line;
/**
* Return the closest side of this diamond to the specified `refPoint`.
* @param {Point} refPoint a reference point
* @returns {Line} a line representing the closest side
*/
closestSideLine(refPoint: Point): Line;
}
/**
* A line represented in its standard form `a*x + b*y = c`.
*/
export interface Line {
readonly a: number;
readonly b: number;
readonly c: number;
}
/**
* A line made up from two points.
*/
export declare class PointToPointLine implements Line {
protected p1: Point;
protected p2: Point;
constructor(p1: Point, p2: Point);
readonly a: number;
readonly b: number;
readonly c: number;
}
/**
* Returns the intersection of two lines `l1` and `l2`
* @param {Line} l1 - A line
* @param {Line} l2 - Another line
* @returns {Point} The intersection point of `l1` and `l2`
*/
export declare function intersection(l1: Line, l2: Line): Point;
//# sourceMappingURL=geometry.d.ts.map
"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -199,2 +208,40 @@ /**

/**
* Computes a point that is the original `point` shifted towards `refPoint` by the given `distance`.
* @param {Point} point - Point to shift
* @param {Point} refPoint - Point to shift towards
* @param {Point} distance - Distance to shift
*/
function shiftTowards(point, refPoint, distance) {
var diff = subtract(refPoint, point);
var normalized = normalize(diff);
var shift = { x: normalized.x * distance, y: normalized.y * distance };
return add(point, shift);
}
exports.shiftTowards = shiftTowards;
/**
* Computes the normalized vector from the vector given in `point`; that is, computing its unit vector.
* @param {Point} point - Point representing the vector to be normalized
* @returns {Point} The normalized point
*/
function normalize(point) {
var mag = magnitude(point);
if (mag === 0 || mag === 1) {
return exports.ORIGIN_POINT;
}
return {
x: point.x / mag,
y: point.y / mag
};
}
exports.normalize = normalize;
/**
* Computes the magnitude of the vector given in `point`.
* @param {Point} point - Point representing the vector to compute the magnitude for
* @returns {number} The magnitude or also known as length of the `point`
*/
function magnitude(point) {
return Math.sqrt(Math.pow(point.x, 2) + Math.pow(point.y, 2));
}
exports.magnitude = magnitude;
/**
* Converts from radians to degrees

@@ -227,2 +274,152 @@ * @param {number} a - A value in radians

exports.almostEquals = almostEquals;
/**
* A diamond or rhombus is a quadrilateral whose four sides all have the same length.
* It consinsts of four points, a `topPoint`, `rightPoint`, `bottomPoint`, and a `leftPoint`,
* which are connected by four lines -- the `topRightSideLight`, `topLeftSideLine`, `bottomRightSideLine`,
* and the `bottomLeftSideLine`.
*/
var Diamond = /** @class */ (function () {
function Diamond(bounds) {
this.bounds = bounds;
}
Object.defineProperty(Diamond.prototype, "topPoint", {
get: function () {
return {
x: this.bounds.x + this.bounds.width / 2,
y: this.bounds.y
};
},
enumerable: true,
configurable: true
});
Object.defineProperty(Diamond.prototype, "rightPoint", {
get: function () {
return {
x: this.bounds.x + this.bounds.width,
y: this.bounds.y + this.bounds.height / 2
};
},
enumerable: true,
configurable: true
});
Object.defineProperty(Diamond.prototype, "bottomPoint", {
get: function () {
return {
x: this.bounds.x + this.bounds.width / 2,
y: this.bounds.y + this.bounds.height
};
},
enumerable: true,
configurable: true
});
Object.defineProperty(Diamond.prototype, "leftPoint", {
get: function () {
return {
x: this.bounds.x,
y: this.bounds.y + this.bounds.height / 2
};
},
enumerable: true,
configurable: true
});
Object.defineProperty(Diamond.prototype, "topRightSideLine", {
get: function () {
return new PointToPointLine(this.topPoint, this.rightPoint);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Diamond.prototype, "topLeftSideLine", {
get: function () {
return new PointToPointLine(this.topPoint, this.leftPoint);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Diamond.prototype, "bottomRightSideLine", {
get: function () {
return new PointToPointLine(this.bottomPoint, this.rightPoint);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Diamond.prototype, "bottomLeftSideLine", {
get: function () {
return new PointToPointLine(this.bottomPoint, this.leftPoint);
},
enumerable: true,
configurable: true
});
/**
* Return the closest side of this diamond to the specified `refPoint`.
* @param {Point} refPoint a reference point
* @returns {Line} a line representing the closest side
*/
Diamond.prototype.closestSideLine = function (refPoint) {
var c = center(this.bounds);
if (refPoint.x > c.x) {
if (refPoint.y > c.y) {
return this.bottomRightSideLine;
}
else {
return this.topRightSideLine;
}
}
else {
if (refPoint.y > c.y) {
return this.bottomLeftSideLine;
}
else {
return this.topLeftSideLine;
}
}
};
return Diamond;
}());
exports.Diamond = Diamond;
/**
* A line made up from two points.
*/
var PointToPointLine = /** @class */ (function () {
function PointToPointLine(p1, p2) {
this.p1 = p1;
this.p2 = p2;
}
Object.defineProperty(PointToPointLine.prototype, "a", {
get: function () {
return this.p1.y - this.p2.y;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PointToPointLine.prototype, "b", {
get: function () {
return this.p2.x - this.p1.x;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PointToPointLine.prototype, "c", {
get: function () {
return this.p2.x * this.p1.y - this.p1.x * this.p2.y;
},
enumerable: true,
configurable: true
});
return PointToPointLine;
}());
exports.PointToPointLine = PointToPointLine;
/**
* Returns the intersection of two lines `l1` and `l2`
* @param {Line} l1 - A line
* @param {Line} l2 - Another line
* @returns {Point} The intersection point of `l1` and `l2`
*/
function intersection(l1, l2) {
return {
x: (l1.c * l2.b - l2.c * l1.b) / (l1.a * l2.b - l2.a * l1.b),
y: (l1.a * l2.c - l2.a * l1.c) / (l1.a * l2.b - l2.a * l1.b)
};
}
exports.intersection = intersection;
//# sourceMappingURL=geometry.js.map

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
/**

@@ -2,0 +17,0 @@ * An iterable that allows filtering, mapping values etc. with a fluent API.

"use strict";
/*
* Copyright (C) 2018 TypeFox and others.
/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

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

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
/**

@@ -2,0 +17,0 @@ * Returns whether the keyboard event matches the keystroke described by the given

"use strict";
/*
* Copyright (C) 2018 TypeFox and others.
/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,0 +18,0 @@ var browser_1 = require("./browser");

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { ViewerOptions } from "../base/views/viewer-options";

@@ -2,0 +17,0 @@ export interface ILogger {

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -0,1 +1,16 @@

/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
export declare class ProviderRegistry<T, U> {

@@ -2,0 +17,0 @@ protected elements: Map<string, new (u: U) => T>;

"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -9,0 +18,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

{
"name": "sprotty",
"version": "0.5.0-next.b4140a74",
"version": "0.5.0-next.cf6ff2f",
"description": "A next-gen framework for graphical views",
"license": "Apache-2.0",
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
"keywords": [
"eclipse",
"graphics",
"diagram",
"modeling",

@@ -12,6 +14,6 @@ "visualization",

],
"homepage": "https://github.com/theia-ide/sprotty",
"bugs": "https://github.com/theia-ide/sprotty/issues",
"homepage": "https://github.com/eclipse/sprotty",
"bugs": "https://github.com/eclipse/sprotty/issues",
"author": {
"name": "TypeFox"
"name": "Eclipse Sprotty"
},

@@ -47,9 +49,4 @@ "contributors": [

"type": "git",
"url": "https://github.com/theia-ide/sprotty.git"
"url": "https://github.com/eclipse/sprotty.git"
},
"files": [
"lib",
"css",
"src"
],
"dependencies": {

@@ -67,3 +64,3 @@ "file-saver": "1.3.3",

"@types/node": "^8.0.14",
"bootstrap": "^3.3.7",
"bootstrap": "^4.0.0",
"chai": "^4.1.0",

@@ -81,2 +78,3 @@ "circular-dependency-plugin": "^2.0.0",

"rimraf": "^2.6.1",
"semver": "5.6.0",
"snabbdom-to-html": "^3.1.1",

@@ -100,6 +98,12 @@ "source-map-loader": "^0.2.3",

"prepare": "yarn run clean && yarn run build",
"prepublishOnly": "yarn run test",
"examples:build": "webpack --progress --config ./configs/webpack.config.js",
"examples:watch": "webpack --watch --progress --config ./configs/webpack.config.js"
}
"examples:watch": "webpack --watch --progress --config ./configs/webpack.config.js",
"publish:next": "yarn publish --new-version \"$(semver $npm_package_version -i minor)-next.$(git rev-parse --short HEAD)\" --tag next",
"publish:latest": "yarn publish --tag latest"
},
"files": [
"lib",
"css",
"src"
]
}
# sprotty
This is the client part of _sprotty_, a next-generation, open-source diagramming framework built with web technologies.
[![Join the chat at https://gitter.im/eclipse/sprotty](https://badges.gitter.im/eclipse/sprotty.svg)](https://gitter.im/eclipse/sprotty?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
This is the client part of _Sprotty_, a next-generation, open-source diagramming framework built with web technologies.
Some selected features:

@@ -13,8 +15,6 @@

* configuration via dependency injection,
* integration with [Xtext, the Language Server Protocol and Theia](https://github.com/theia-ide/theia-sprotty-example) that can be run as rich-client as well as in the browser.
* integration with Xtext, the Language Server Protocol and Theia that can be run as rich-client as well as in the browser.
[![sprotty demo](https://github.com/theia-ide/sprotty/raw/master/sprotty_demo_screenshot.png)](http://www.youtube.com/watch?v=IydM4l7WFKk "sprotty demo")
The server part of sprotty is written in Java / [Xtend](http://xtend-lang.org) and is available via [Maven Central](http://repo.maven.apache.org/maven2/org/eclipse/sprotty/) or [JCenter](http://jcenter.bintray.com/org/eclipse/sprotty/).
The server part of sprotty is written in Java / [Xtend](http://xtend-lang.org) and is available via [Maven Central](http://repo.maven.apache.org/maven2/io/typefox/sprotty/) or [JCenter](http://jcenter.bintray.com/io/typefox/sprotty/).
For further information please consult the [wiki](https://github.com/theia-ide/sprotty/wiki) or this [blog post](http://typefox.io/sprotty-a-web-based-diagramming-framework).

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'reflect-metadata';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable, multiInject, optional } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ /**

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { CommandExecutionContext } from "../commands/command";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import "mocha";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ /**

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { Container } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import "reflect-metadata";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ILogger } from "../../utils/logging";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule, interfaces } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import "reflect-metadata";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable, inject } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'reflect-metadata';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ /**

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'reflect-metadata';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable, multiInject, optional, inject } from 'inversify';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SChildElement, SModelElement, SModelElementSchema } from "./smodel";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import "mocha";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { Bounds, EMPTY_BOUNDS, Point, isBounds } from "../../utils/geometry";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ export const TYPES = {

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable, multiInject, optional } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable, multiInject, optional } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { h } from "snabbdom";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'reflect-metadata';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable, named } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { Container, interfaces } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { VNode } from "snabbdom/vnode";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -50,4 +59,4 @@ import { Bounds, EMPTY_BOUNDS, isValidDimension, Dimension, Point } from "../../utils/geometry";

y: container.bounds.y,
width: maxWidth + options.paddingLeft + options.paddingRight,
height: maxHeight + options.paddingTop + options.paddingBottom
width: Math.max(options.minWidth, maxWidth + options.paddingLeft + options.paddingRight),
height: Math.max(options.minHeight, maxHeight + options.paddingTop + options.paddingBottom)
};

@@ -54,0 +63,0 @@ }

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { Bounds, Point } from "../../utils/geometry";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'reflect-metadata';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -17,3 +26,10 @@ import 'mocha';

import { Dimension } from '../../utils/geometry';
import { layoutableChildFeature } from './model';
class ChildNode extends SNode {
hasFeature(feature: symbol) {
return feature === layoutableChildFeature || super.hasFeature(feature);
}
}
describe('HBoxLayouter', () => {

@@ -26,3 +42,3 @@

function snode(size: Dimension): SNode {
const node = new SNode();
const node = new ChildNode();
node.bounds = {

@@ -177,4 +193,4 @@ x: 0, y: 0, width: size.width, height: size.height

"width": 131, // 50 + 50 + 1 [hGap] + 3 * (5 + 5) [padding compLeft, compRight, comp0]
"x": 0,
"y": 0
"x": 5, // padding model left
"y": 55 // 10 + 10 [labels] + 2 * 15 [ model.vGap ] + 5 [padding model top]
});

@@ -181,0 +197,0 @@ });

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -13,3 +22,3 @@ import { Bounds, Point, isValidDimension } from '../../utils/geometry';

import { BoundsData } from './hidden-bounds-updater';
import { LayoutContainer } from './model';
import { LayoutContainer, isLayoutableChild } from './model';
import { StatefulLayouter } from './layout';

@@ -37,10 +46,12 @@

child => {
const bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && isValidDimension(bounds)) {
if (isFirst)
isFirst = false;
else
maxWidth += containerOptions.hGap;
maxWidth += bounds.width;
maxHeight = Math.max(maxHeight, bounds.height);
if (isLayoutableChild(child)) {
const bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && isValidDimension(bounds)) {
if (isFirst)
isFirst = false;
else
maxWidth += containerOptions.hGap;
maxWidth += bounds.width;
maxHeight = Math.max(maxHeight, bounds.height);
}
}

@@ -86,3 +97,5 @@ }

hGap: 1,
vAlign: 'center'
vAlign: 'center',
minWidth: 0,
minHeight: 0
};

@@ -89,0 +102,0 @@ }

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -19,2 +28,4 @@ export type HAlignment = 'left' | 'center' | 'right';

paddingFactor: number
minWidth: number
minHeight: number
}

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable } from "inversify";

@@ -1,9 +0,18 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Bounds, EMPTY_BOUNDS, EMPTY_DIMENSION, Dimension, isBounds, ORIGIN_POINT, Point } from "../../utils/geometry";
import { Bounds, EMPTY_BOUNDS, EMPTY_DIMENSION, Dimension, isBounds, ORIGIN_POINT, Point, includes } from "../../utils/geometry";
import { SModelElement, SModelElementSchema, SParentElement, SChildElement, SModelRoot } from "../../base/model/smodel";

@@ -90,2 +99,19 @@ import { SModelExtension } from "../../base/model/smodel-extension";

export function findChildrenAtPosition(parent: SParentElement, point: Point): SModelElement[] {
const matches: SModelElement[] = [];
doFindChildrenAtPosition(parent, point, matches);
return matches;
}
function doFindChildrenAtPosition(parent: SParentElement, point: Point, matches: SModelElement[]) {
parent.children.forEach(child => {
if (isBoundsAware(child) && includes(child.bounds, point))
matches.push(child);
if (child instanceof SParentElement) {
const newPoint = child.parentToLocal(point);
doFindChildrenAtPosition(child, newPoint, matches);
}
});
}
/**

@@ -92,0 +118,0 @@ * Serializable schema for SShapeElement.

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { Animation } from "../../base/animations/animation";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'mocha';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -13,3 +22,3 @@ import { Bounds, Point, isValidDimension } from '../../utils/geometry';

import { BoundsData } from './hidden-bounds-updater';
import { LayoutContainer } from './model';
import { LayoutContainer, isLayoutableChild } from './model';
import { StatefulLayouter } from './layout';

@@ -34,6 +43,8 @@

child => {
const bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && isValidDimension(bounds)) {
maxWidth = Math.max(maxWidth, bounds.width);
maxHeight = Math.max(maxHeight, bounds.height);
if (isLayoutableChild(child)) {
const bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && isValidDimension(bounds)) {
maxWidth = Math.max(maxWidth, bounds.width);
maxHeight = Math.max(maxHeight, bounds.height);
}
}

@@ -76,3 +87,5 @@ }

hAlign: 'center',
vAlign: 'center'
vAlign: 'center',
minWidth: 0,
minHeight: 0
};

@@ -79,0 +92,0 @@ }

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'mocha';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -13,3 +22,3 @@ import { Bounds, Point, isValidDimension } from '../../utils/geometry';

import { BoundsData } from './hidden-bounds-updater';
import { LayoutContainer } from './model';
import { LayoutContainer, isLayoutableChild } from './model';
import { StatefulLayouter } from './layout';

@@ -37,10 +46,12 @@

child => {
const bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && isValidDimension(bounds)) {
maxHeight += bounds.height;
if (isFirst)
isFirst = false;
else
maxHeight += containerOptions.vGap;
maxWidth = Math.max(maxWidth, bounds.width);
if (isLayoutableChild(child)) {
const bounds = layouter.getBoundsData(child).bounds;
if (bounds !== undefined && isValidDimension(bounds)) {
maxHeight += bounds.height;
if (isFirst)
isFirst = false;
else
maxHeight += containerOptions.vGap;
maxWidth = Math.max(maxWidth, bounds.width);
}
}

@@ -86,3 +97,5 @@ }

vGap: 1,
hAlign: 'center'
hAlign: 'center',
minWidth: 0,
minHeight: 0
};

@@ -89,0 +102,0 @@ }

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { InstanceRegistry } from '../../utils/registry';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { boundsFeature, layoutableChildFeature, SShapeElement, SShapeElementSchema } from '../bounds/model';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -11,8 +20,19 @@ import { ContainerModule } from "inversify";

import { SwitchEditModeCommand, MoveRoutingHandleCommand } from "./edit-routing";
import { ReconnectCommand } from "./reconnect";
import { configureModelElement } from "../../base/views/view";
import { SDanglingAnchor } from "../../graph/sgraph";
import { EmptyGroupView } from "../../lib/svg-views";
import { DeleteElementCommand } from "./delete";
import { EditLabelMouseListener } from "./edit-label";
const edgeEditModule = new ContainerModule(bind => {
export const edgeEditModule = new ContainerModule(bind => {
bind(TYPES.ICommand).toConstructor(SwitchEditModeCommand);
bind(TYPES.ICommand).toConstructor(MoveRoutingHandleCommand);
bind(TYPES.ICommand).toConstructor(ReconnectCommand);
bind(TYPES.ICommand).toConstructor(DeleteElementCommand);
configureModelElement({bind}, 'dangling-anchor', SDanglingAnchor, EmptyGroupView);
});
export default edgeEditModule;
export const labelEditModule = new ContainerModule(bind => {
bind(TYPES.MouseListener).to(EditLabelMouseListener);
});

@@ -1,11 +0,20 @@

/*
* Copyright (C) 2018 TypeFox and others.
/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { injectable } from "inversify";
import { Point } from "../../utils/geometry";
import { Routable, isRoutable, canEditRouting, SRoutingHandle } from './model';
import { Routable, isRoutable, canEditRouting, SRoutingHandle, RoutingHandleKind } from './model';
import { Action } from "../../base/actions/action";

@@ -15,8 +24,11 @@ import { Command, CommandExecutionContext, CommandResult } from "../../base/commands/command";

import { Animation } from '../../base/animations/animation';
import { SDanglingAnchor } from "../../graph/sgraph";
export function createRoutingHandle(kind: 'junction' | 'line', parentId: string, index: number): SRoutingHandle {
export function createRoutingHandle(kind: RoutingHandleKind, parentId: string, index: number): SRoutingHandle {
const handle = new SRoutingHandle();
handle.type = kind === 'junction' ? 'routing-point' : 'volatile-routing-point';
handle.type = kind === 'line' ? 'volatile-routing-point' : 'routing-point';
handle.kind = kind;
handle.pointIndex = index;
if (kind === 'target')
handle.id = parentId + '-target-anchor';
return handle;

@@ -28,2 +40,3 @@ }

const targetId = editTarget.id;
editTarget.add(createRoutingHandle('source', targetId, -2));
editTarget.add(createRoutingHandle('line', targetId, -1));

@@ -34,2 +47,3 @@ for (let i = 0; i < rpCount; i++) {

}
editTarget.add(createRoutingHandle('target', targetId, rpCount));
}

@@ -87,4 +101,15 @@

element.removeAll(child => child instanceof SRoutingHandle);
else if (element instanceof SRoutingHandle)
else if (element instanceof SRoutingHandle) {
element.editMode = false;
if (element.danglingAnchor) {
if (isRoutable(element.parent) && element.danglingAnchor.original) {
if (element.parent.source === element.danglingAnchor)
element.parent.sourceId = element.danglingAnchor.original.id;
else if (element.parent.target === element.danglingAnchor)
element.parent.targetId = element.danglingAnchor.original.id;
element.danglingAnchor.parent.remove(element.danglingAnchor);
element.danglingAnchor = undefined;
}
}
}
});

@@ -190,2 +215,21 @@ this.elementsToActivate.forEach(element => {

if (element instanceof SRoutingHandle) {
if (isRoutable(element.parent)) {
if (element.kind === 'source' && !(element.parent.source instanceof SDanglingAnchor)) {
const anchor = new SDanglingAnchor();
anchor.id = element.parent.id + '_dangling-source';
anchor.original = element.parent.source;
anchor.position = move.toPosition;
element.root.add(anchor);
element.danglingAnchor = anchor;
element.parent.sourceId = anchor.id;
} else if (element.kind === 'target' && !(element.parent.target instanceof SDanglingAnchor)) {
const anchor = new SDanglingAnchor();
anchor.id = element.parent.id + '_dangling-target';
anchor.original = element.parent.target;
anchor.position = move.toPosition;
element.root.add(anchor);
element.danglingAnchor = anchor;
element.parent.targetId = anchor.id;
}
}
return {

@@ -207,2 +251,6 @@ elementId: move.elementId,

if (isRoutable(parent)) {
if (handle.danglingAnchor) {
handle.danglingAnchor.position = res.toPosition;
return;
}
const points = parent.routingPoints;

@@ -301,1 +349,2 @@ let index = handle.pointIndex;

}

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -15,2 +24,3 @@ import { Point, angleBetweenPoints } from '../../utils/geometry';

import { RoutedPoint } from '../../graph/routing';
import { SDanglingAnchor } from '../../graph/sgraph';

@@ -20,9 +30,11 @@ export const editFeature = Symbol('editFeature');

export interface Routable extends SModelExtension {
routingPoints: Point[]
readonly source?: SModelElement
readonly target?: SModelElement
route(): RoutedPoint[]
routingPoints: Point[];
readonly source?: SModelElement;
readonly target?: SModelElement;
sourceId?: string,
targetId?: string,
route(): RoutedPoint[];
}
export function isRoutable(element: SModelElement): element is SModelElement & Routable {
export function isRoutable<T extends SModelElement>(element: T): element is T & Routable {
return (element as any).routingPoints !== undefined && typeof((element as any).route) === 'function';

@@ -35,5 +47,11 @@ }

export type RoutingHandleKind = 'junction' | 'line' | 'source' | 'target';
export class SRoutingHandle extends SChildElement implements Selectable, Hoverable {
/** 'junction' is a point where two line segments meet, 'line' is a volatile handle placed on a line segment. */
kind: 'junction' | 'line';
/**
* 'junction' is a point where two line segments meet,
* 'line' is a volatile handle placed on a line segment,
* 'source' and 'target are the respective anchors.
*/
kind: RoutingHandleKind;
/** The actual routing point index (junction) or the previous point index (line). */

@@ -46,2 +64,3 @@ pointIndex: number;

selected: boolean = false;
danglingAnchor?: SDanglingAnchor;

@@ -48,0 +67,0 @@ hasFeature(feature: symbol): boolean {

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { Action } from '../../base/actions/action';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SModelElement } from "../../base/model/smodel";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'reflect-metadata';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable, inject } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SModelElement } from '../../base/model/smodel';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ViewerOptions } from '../../base/views/viewer-options';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SModelElement } from "../../base/model/smodel";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import "reflect-metadata";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -155,2 +164,4 @@ import { inject, injectable } from "inversify";

@inject(TYPES.ViewerOptions) protected options: ViewerOptions;
protected computePopupBounds(target: SModelElement, mousePosition: Point): Bounds {

@@ -228,17 +239,23 @@ // Default position: below the mouse cursor

if (this.state.popupOpen) {
const popupTarget = findParent(target, hasPopupFeature);
if (this.state.previousPopupElement !== undefined && popupTarget !== undefined
&& this.state.previousPopupElement.id === popupTarget.id)
result.push(this.startMouseOutTimer());
const elementUnderMouse = document.elementFromPoint(event.x, event.y);
if (!this.isSprottyPopup(elementUnderMouse)) {
if (this.state.popupOpen) {
const popupTarget = findParent(target, hasPopupFeature);
if (this.state.previousPopupElement !== undefined && popupTarget !== undefined
&& this.state.previousPopupElement.id === popupTarget.id)
result.push(this.startMouseOutTimer());
}
this.stopMouseOverTimer();
const hoverTarget = findParentByFeature(target, isHoverable);
if (hoverTarget !== undefined)
result.push(new HoverFeedbackAction(hoverTarget.id, false));
}
this.stopMouseOverTimer();
const hoverTarget = findParentByFeature(target, isHoverable);
if (hoverTarget !== undefined)
result.push(new HoverFeedbackAction(hoverTarget.id, false));
return result;
}
protected isSprottyPopup(element: Element): boolean {
return element && (element.id === this.options.popupDiv
|| (!!element.parentElement && this.isSprottyPopup(element.parentElement)));
}
mouseMove(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[] {

@@ -245,0 +262,0 @@ const result: (Action | Promise<Action>)[] = [];

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SModelElement } from "../../base/model/smodel";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { Point } from "../../utils/geometry";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'reflect-metadata';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -13,3 +22,3 @@ import { injectable } from "inversify";

import { SModelElement, SModelIndex, SModelRoot } from "../../base/model/smodel";
import { findParentByFeature } from "../../base/model/smodel-utils";
import { findParentByFeature, translatePoint } from "../../base/model/smodel-utils";
import { Action } from "../../base/actions/action";

@@ -23,3 +32,3 @@ import { ICommand, CommandExecutionContext, MergeableCommand } from "../../base/commands/command";

import { isSelectable } from "../select/model";
import { isAlignable } from "../bounds/model";
import { isAlignable, findChildrenAtPosition } from "../bounds/model";
import { Routable, isRoutable, SRoutingHandle } from '../edit/model';

@@ -29,2 +38,7 @@ import { MoveRoutingHandleAction, HandleMove, SwitchEditModeAction } from "../edit/edit-routing";

import { RoutedPoint } from "../../graph/routing";
import { isCreatingOnDrag } from "../edit/create-on-drag";
import { SelectAllAction, SelectAction } from "../select/select";
import { SDanglingAnchor } from "../../graph/sgraph";
import { isConnectable, ReconnectAction } from "../edit/reconnect";
import { DeleteElementAction } from "../edit/delete";

@@ -214,2 +228,4 @@ export class MoveAction implements Action {

export const edgeInProgressID = 'edge-in-progress';
export class MoveMouseListener extends MouseListener {

@@ -225,3 +241,3 @@

const isRoutingHandle = target instanceof SRoutingHandle;
if (moveable !== undefined || isRoutingHandle) {
if (moveable !== undefined || isRoutingHandle || isCreatingOnDrag(target)) {
this.lastDragPosition = { x: event.pageX, y: event.pageY };

@@ -232,3 +248,10 @@ } else {

this.hasDragged = false;
if (isRoutingHandle) {
if (isCreatingOnDrag(target)) {
result.push(new SelectAllAction(false));
result.push(target.createAction(edgeInProgressID));
result.push(new SelectAction([edgeInProgressID], []));
result.push(new SwitchEditModeAction([edgeInProgressID], []));
result.push(new SelectAction([edgeInProgressID + '-target-anchor'], []));
result.push(new SwitchEditModeAction([edgeInProgressID + '-target-anchor'], []));
} else if (isRoutingHandle) {
result.push(new SwitchEditModeAction([target.id], []));

@@ -295,27 +318,43 @@ }

}
if (handle.kind === 'line') {
const getIndex = (rp: RoutedPoint) => {
if (rp.pointIndex !== undefined)
return rp.pointIndex;
else if (rp.kind === 'target')
return parent.routingPoints.length;
switch (handle.kind) {
case 'source':
if (parent.source instanceof SDanglingAnchor)
return parent.source.position;
else
return -1;
};
const route = parent.route();
let rp1, rp2: RoutedPoint | undefined;
for (const rp of route) {
const i = getIndex(rp);
if (i <= handle.pointIndex && (rp1 === undefined || i > getIndex(rp1)))
rp1 = rp;
if (i > handle.pointIndex && (rp2 === undefined || i < getIndex(rp2)))
rp2 = rp;
return parent.route()[0];
case 'target':
if (parent.target instanceof SDanglingAnchor)
return parent.target.position;
else {
const route = parent.route();
return route[route.length - 1];
}
case 'line': {
const getIndex = (rp: RoutedPoint) => {
if (rp.pointIndex !== undefined)
return rp.pointIndex;
else if (rp.kind === 'target')
return parent.routingPoints.length;
else
return -1;
};
const route = parent.route();
let rp1, rp2: RoutedPoint | undefined;
for (const rp of route) {
const i = getIndex(rp);
if (i <= handle.pointIndex && (rp1 === undefined || i > getIndex(rp1)))
rp1 = rp;
if (i > handle.pointIndex && (rp2 === undefined || i < getIndex(rp2)))
rp2 = rp;
}
if (rp1 !== undefined && rp2 !== undefined) {
return centerOfLine(rp1, rp2);
}
return undefined;
}
if (rp1 !== undefined && rp2 !== undefined) {
return centerOfLine(rp1, rp2);
}
} else if (handle.pointIndex >= 0) {
return parent.routingPoints[handle.pointIndex];
default:
if (handle.pointIndex >= 0)
return parent.routingPoints[handle.pointIndex];
return undefined;
}
return undefined;
}

@@ -331,9 +370,39 @@

const result: Action[] = [];
let hasReconnected = false;
if (this.lastDragPosition) {
target.root.index.all()
.forEach(element => {
if (element instanceof SRoutingHandle && element.editMode)
result.push(new SwitchEditModeAction([], [element.id]));
if (element instanceof SRoutingHandle) {
const parent = element.parent;
if (isRoutable(parent) && element.danglingAnchor) {
const handlePos = this.getHandlePosition(element);
if (handlePos) {
const handlePosAbs = translatePoint(handlePos, element.parent, element.root);
const newEnd = findChildrenAtPosition(target.root, handlePosAbs)
.find(e => isConnectable(e) && e.canConnect(parent, element.kind as ('source' | 'target')));
if (newEnd && this.hasDragged) {
result.push(new ReconnectAction(element.parent.id,
element.kind === 'source' ? newEnd.id : parent.sourceId,
element.kind === 'target' ? newEnd.id : parent.targetId));
hasReconnected = true;
}
}
}
if (element.editMode)
result.push(new SwitchEditModeAction([], [element.id]));
}
});
}
if (!hasReconnected) {
const edgeInProgress = target.root.index.getById(edgeInProgressID);
if (edgeInProgress instanceof SChildElement) {
const deleteIds: string[] = [];
deleteIds.push(edgeInProgressID);
edgeInProgress.children.forEach(c => {
if (c instanceof SRoutingHandle && c.danglingAnchor)
deleteIds.push(c.danglingAnchor.id);
});
result.push(new DeleteElementAction(deleteIds));
}
}
this.hasDragged = false;

@@ -340,0 +409,0 @@ this.lastDragPosition = undefined;

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SModelElement } from "../../base/model/smodel";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { MouseListener } from '../../base/views/mouse-tool';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SModelElement } from "../../base/model/smodel";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'reflect-metadata';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, optional } from 'inversify';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { matchesKeystroke } from "../../utils/keyboard";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import "reflect-metadata";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SModelRootSchema, SModelElementSchema, SModelRoot, SModelIndex, SModelElement, isParent } from '../../base/model/smodel';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'reflect-metadata';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { Bounds, center, combine, isValidDimension } from "../../utils/geometry";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SModelElement, SModelRoot } from "../../base/model/smodel";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { Point } from "../../utils/geometry";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { Bounds, Point, isBounds, isValidDimension } from "../../utils/geometry";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'reflect-metadata';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SModelElement, SModelRoot } from "../../base/model/smodel";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SModelElement } from "../../base/model/smodel";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2018 TypeFox and others.
/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2018 TypeFox and others.
/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import "mocha";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -25,2 +34,4 @@ import { FluentIterable, FluentIterableImpl } from '../utils/iterable';

import { RoutedPoint, LinearEdgeRouter, IEdgeRouter } from './routing';
import { connectableFeature, Connectable } from '../features/edit/reconnect';
import { deletableFeature } from '../features/edit/delete';

@@ -54,3 +65,3 @@ /**

*/
export abstract class SConnectableElement extends SShapeElement {
export abstract class SConnectableElement extends SShapeElement implements Connectable {

@@ -103,2 +114,6 @@ /**

}
canConnect(routable: Routable, role: string) {
return true;
}
}

@@ -128,6 +143,10 @@

canConnect(routable: Routable, role: string) {
return this.children.find(c => c instanceof SPort) === undefined;
}
hasFeature(feature: symbol): boolean {
return feature === selectFeature || feature === moveFeature || feature === boundsFeature
|| feature === layoutContainerFeature || feature === fadeFeature || feature === hoverFeedbackFeature
|| feature === popupFeature;
|| feature === popupFeature || feature === connectableFeature || feature === deletableFeature;
}

@@ -155,3 +174,3 @@ }

return feature === selectFeature || feature === boundsFeature || feature === fadeFeature
|| feature === hoverFeedbackFeature;
|| feature === hoverFeedbackFeature || feature === connectableFeature;
}

@@ -205,3 +224,4 @@ }

return feature === fadeFeature || feature === selectFeature ||
feature === editFeature || feature === hoverFeedbackFeature;
feature === editFeature || feature === hoverFeedbackFeature ||
feature === deletableFeature;
}

@@ -350,3 +370,11 @@ }

}
}
export class SDanglingAnchor extends SConnectableElement {
original?: SModelElement;
type = 'dangling-anchor';
hasFeature(feature: symbol) {
return feature === deletableFeature;
}
}

@@ -1,9 +0,17 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
// ------------------ Base ------------------

@@ -60,4 +68,10 @@

export * from "./features/edit/create";
export * from "./features/edit/create-on-drag";
export * from "./features/edit/di.config";
export * from "./features/edit/delete";
export * from "./features/edit/edit-label";
export * from "./features/edit/edit-routing";
export * from "./features/edit/model";
export * from "./features/edit/reconnect";

@@ -78,2 +92,6 @@ export * from "./features/expand/expand";

export * from "./features/decoration/model";
export * from "./features/decoration/views";
export * from "./features/decoration/decoration-placer";
export * from "./features/move/model";

@@ -107,3 +125,2 @@ export * from "./features/move/move";

import hoverModule from "./features/hover/di.config";
import edgeEditModule from "./features/edit/di.config";
import exportModule from "./features/export/di.config";

@@ -113,4 +130,5 @@ import expandModule from "./features/expand/di.config";

import buttonModule from "./features/button/di.config";
import decorationModule from "./features/decoration/di.config";
export { moveModule, boundsModule, fadeModule, selectModule, undoRedoModule, viewportModule, hoverModule, edgeEditModule, exportModule, expandModule, openModule, buttonModule };
export { moveModule, boundsModule, fadeModule, selectModule, undoRedoModule, viewportModule, hoverModule, exportModule, expandModule, openModule, buttonModule, decorationModule };

@@ -117,0 +135,0 @@

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import virtualize from "snabbdom-virtualize/strings";

@@ -1,11 +0,20 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelRoot, SModelRootSchema, SChildElement, SModelElementSchema } from "../base/model/smodel";
import { Point, Dimension, ORIGIN_POINT, EMPTY_DIMENSION, Bounds } from "../utils/geometry";
import { computeCircleAnchor, computeRectangleAnchor } from '../utils/anchors';
import { computeCircleAnchor, computeRectangleAnchor, computeDiamondAnchor } from '../utils/anchors';
import { BoundsAware, boundsFeature, Alignable, alignFeature } from "../features/bounds/model";

@@ -46,2 +55,15 @@ import { Locateable, moveFeature } from "../features/move/model";

/**
* A node that is represented by a diamond.
*/
export class DiamondNode extends SNode {
strokeWidth: number = 0;
getAnchor(refPoint: Point, offset: number = 0): Point {
const strokeCorrection = 0.5 * this.strokeWidth;
return computeDiamondAnchor(this.bounds, refPoint, offset + strokeCorrection);
}
}
/**
* A port that is represented by a circle.

@@ -48,0 +70,0 @@ */

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { ContainerModule } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { SModelRootSchema, SModelElementSchema } from '../base/model/smodel';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import "reflect-metadata";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -334,7 +343,7 @@ import { injectable, inject, optional } from "inversify";

export interface IStateAwareModelProvider  {
getModel(diagramState: DiagramState, currentRoot?: SModelRootSchema): SModelRootSchema
getModel(diagramState: DiagramState, currentRoot?: SModelRootSchema): SModelRootSchema;
}
export interface IModelLayoutEngine {
layout(model: SModelRootSchema, index?: SModelIndex<SModelElementSchema>): SModelRootSchema | Promise<SModelRootSchema>
layout(model: SModelRootSchema, index?: SModelIndex<SModelElementSchema>): SModelRootSchema | Promise<SModelRootSchema>;
}

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable, inject } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable } from "inversify";

@@ -1,9 +0,18 @@

/*
* Copyright (C) 2018 TypeFox and others.
/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Point, Bounds, center, almostEquals } from './geometry';
import { Point, Bounds, center, almostEquals, PointToPointLine, Diamond, shiftTowards, intersection } from './geometry';

@@ -83,1 +92,8 @@ export function computeCircleAnchor(position: Point, radius: number, refPoint: Point, offset: number = 0): Point {

}
export function computeDiamondAnchor(bounds: Bounds, refPoint: Point, offset: number): Point {
const referenceLine = new PointToPointLine(center(bounds), refPoint);
const closestDiamondSide = new Diamond(bounds).closestSideLine(refPoint);
const anchorPoint = intersection(closestDiamondSide, referenceLine);
return shiftTowards(anchorPoint, refPoint, offset);
}

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ /**

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ /**

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ export interface RGBColor {

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import "mocha";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -228,2 +237,40 @@ /**

/**
* Computes a point that is the original `point` shifted towards `refPoint` by the given `distance`.
* @param {Point} point - Point to shift
* @param {Point} refPoint - Point to shift towards
* @param {Point} distance - Distance to shift
*/
export function shiftTowards(point: Point, refPoint: Point, distance: number): Point {
const diff = subtract(refPoint, point);
const normalized = normalize(diff);
const shift = {x: normalized.x * distance, y: normalized.y * distance};
return add(point, shift);
}
/**
* Computes the normalized vector from the vector given in `point`; that is, computing its unit vector.
* @param {Point} point - Point representing the vector to be normalized
* @returns {Point} The normalized point
*/
export function normalize(point: Point): Point {
const mag = magnitude(point);
if (mag === 0 || mag === 1) {
return ORIGIN_POINT;
}
return {
x: point.x / mag,
y: point.y / mag
};
}
/**
* Computes the magnitude of the vector given in `point`.
* @param {Point} point - Point representing the vector to compute the magnitude for
* @returns {number} The magnitude or also known as length of the `point`
*/
export function magnitude(point: Point): number {
return Math.sqrt(Math.pow(point.x, 2) + Math.pow(point.y, 2));
}
/**
* Converts from radians to degrees

@@ -255,1 +302,120 @@ * @param {number} a - A value in radians

}
/**
* A diamond or rhombus is a quadrilateral whose four sides all have the same length.
* It consinsts of four points, a `topPoint`, `rightPoint`, `bottomPoint`, and a `leftPoint`,
* which are connected by four lines -- the `topRightSideLight`, `topLeftSideLine`, `bottomRightSideLine`,
* and the `bottomLeftSideLine`.
*/
export class Diamond {
constructor(protected bounds: Bounds) { }
get topPoint(): Point {
return {
x: this.bounds.x + this.bounds.width / 2,
y: this.bounds.y
};
}
get rightPoint(): Point {
return {
x: this.bounds.x + this.bounds.width,
y: this.bounds.y + this.bounds.height / 2
};
}
get bottomPoint(): Point {
return {
x: this.bounds.x + this.bounds.width / 2,
y: this.bounds.y + this.bounds.height
};
}
get leftPoint(): Point {
return {
x: this.bounds.x,
y: this.bounds.y + this.bounds.height / 2
};
}
get topRightSideLine(): Line {
return new PointToPointLine(this.topPoint, this.rightPoint);
}
get topLeftSideLine(): Line {
return new PointToPointLine(this.topPoint, this.leftPoint);
}
get bottomRightSideLine(): Line {
return new PointToPointLine(this.bottomPoint, this.rightPoint);
}
get bottomLeftSideLine(): Line {
return new PointToPointLine(this.bottomPoint, this.leftPoint);
}
/**
* Return the closest side of this diamond to the specified `refPoint`.
* @param {Point} refPoint a reference point
* @returns {Line} a line representing the closest side
*/
closestSideLine(refPoint: Point): Line {
const c = center(this.bounds);
if (refPoint.x > c.x) {
if (refPoint.y > c.y) {
return this.bottomRightSideLine;
} else {
return this.topRightSideLine;
}
} else {
if (refPoint.y > c.y) {
return this.bottomLeftSideLine;
} else {
return this.topLeftSideLine;
}
}
}
}
/**
* A line represented in its standard form `a*x + b*y = c`.
*/
export interface Line {
readonly a: number
readonly b: number
readonly c: number
}
/**
* A line made up from two points.
*/
export class PointToPointLine implements Line {
constructor(protected p1: Point, protected p2: Point) { }
get a(): number {
return this.p1.y - this.p2.y;
}
get b(): number {
return this.p2.x - this.p1.x;
}
get c(): number {
return this.p2.x * this.p1.y - this.p1.x * this.p2.y;
}
}
/**
* Returns the intersection of two lines `l1` and `l2`
* @param {Line} l1 - A line
* @param {Line} l2 - Another line
* @returns {Point} The intersection point of `l1` and `l2`
*/
export function intersection(l1: Line, l2: Line): Point {
return {
x: (l1.c * l2.b - l2.c * l1.b) / (l1.a * l2.b - l2.a * l1.b),
y: (l1.a * l2.c - l2.a * l1.c) / (l1.a * l2.b - l2.a * l1.b)
};
}

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import "mocha";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2018 TypeFox and others.
/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ /**

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2018 TypeFox and others.
/********************************************************************************
* Copyright (c) 2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { isMac } from './browser';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { inject, injectable } from "inversify";

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import 'mocha';

@@ -1,7 +0,16 @@

/*
* Copyright (C) 2017 TypeFox and others.
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

@@ -8,0 +17,0 @@ import { injectable } from "inversify";

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

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

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

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

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

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

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

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc