flowyaml 0.1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
flowyaml/__init__.py ADDED
@@ -0,0 +1,120 @@
1
+ """FlowYAML: a callable Python renderer for YAML-defined process flows.
2
+
3
+ Given valid FlowYAML YAML, the package produces either a complete self
4
+ sufficient single page HTML document or a self contained embeddable fragment.
5
+ The generated artifact renders in a browser with no Python process, no server,
6
+ no npm build and no network access.
7
+
8
+ That artifact is a snapshot: it shows the YAML as it stood when it was
9
+ written. When the YAML is still being edited, ``data="url"`` renders the same
10
+ page with its graph left out and fetched from a host instead, and
11
+ ``flowyaml.serve`` is a stdlib host that re-reads the file per request. See
12
+ ``docs/live_updates.md``.
13
+
14
+ v0 is a renderer, not an editor.
15
+ """
16
+
17
+ from __future__ import annotations
18
+
19
+ from typing import Any
20
+
21
+ from ._version import __version__
22
+ from .api import (
23
+ load,
24
+ models,
25
+ payload,
26
+ payload_json,
27
+ read_bpmn,
28
+ read_mermaid,
29
+ read_source,
30
+ render,
31
+ render_file,
32
+ to_yaml,
33
+ validate,
34
+ write_html,
35
+ )
36
+ from .errors import (
37
+ FlowYAMLError,
38
+ FlowYAMLImportError,
39
+ FlowYAMLModelError,
40
+ FlowYAMLOptionError,
41
+ FlowYAMLValidationError,
42
+ ValidationIssue,
43
+ )
44
+ from .model import (
45
+ CLICKABLE_NODE_TYPES,
46
+ EDGE_KINDS,
47
+ EDGE_STYLES,
48
+ NODE_TYPES,
49
+ Diagram,
50
+ Edge,
51
+ Model,
52
+ Node,
53
+ )
54
+ from .renderer import (
55
+ ASSET_MODES,
56
+ DATA_MODES,
57
+ DEFAULT_POLL_MS,
58
+ LAYOUT_OPTIONS,
59
+ OUTPUT_MODES,
60
+ )
61
+ from .themes import DEFAULT_THEME, THEMES, theme_names
62
+
63
+ __all__ = [
64
+ "__version__",
65
+ # public API
66
+ "render",
67
+ "render_file",
68
+ "write_html",
69
+ "validate",
70
+ "load",
71
+ "models",
72
+ "payload",
73
+ "payload_json",
74
+ "read_source",
75
+ "to_yaml",
76
+ # live host (imported on first use)
77
+ "serve",
78
+ "create_server",
79
+ "LinkedSource",
80
+ # importers
81
+ "read_mermaid",
82
+ "read_bpmn",
83
+ # errors
84
+ "ValidationIssue",
85
+ "FlowYAMLError",
86
+ "FlowYAMLValidationError",
87
+ "FlowYAMLModelError",
88
+ "FlowYAMLOptionError",
89
+ "FlowYAMLImportError",
90
+ # model
91
+ "Diagram",
92
+ "Model",
93
+ "Node",
94
+ "Edge",
95
+ "NODE_TYPES",
96
+ "EDGE_KINDS",
97
+ "EDGE_STYLES",
98
+ "CLICKABLE_NODE_TYPES",
99
+ # options
100
+ "OUTPUT_MODES",
101
+ "ASSET_MODES",
102
+ "DATA_MODES",
103
+ "DEFAULT_POLL_MS",
104
+ "LAYOUT_OPTIONS",
105
+ "DEFAULT_THEME",
106
+ "THEMES",
107
+ "theme_names",
108
+ ]
109
+
110
+ #: The live host is the one part of the package that needs a socket. Importing
111
+ #: it on demand keeps ``import flowyaml`` a pure renderer import.
112
+ _LIVE_EXPORTS = frozenset({"serve", "create_server", "LinkedSource"})
113
+
114
+
115
+ def __getattr__(name: str) -> Any:
116
+ if name in _LIVE_EXPORTS:
117
+ from . import live
118
+
119
+ return getattr(live, name)
120
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
flowyaml/__main__.py ADDED
@@ -0,0 +1,10 @@
1
+ """Allow ``python -m flowyaml``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+ from .cli import main
8
+
9
+ if __name__ == "__main__":
10
+ sys.exit(main())
flowyaml/_version.py ADDED
@@ -0,0 +1,3 @@
1
+ """Single source of truth for the FlowYAML distribution version."""
2
+
3
+ __version__ = "0.1.0.0"
flowyaml/api.py ADDED
@@ -0,0 +1,229 @@
1
+ """The FlowYAML v0 public API."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ import os
7
+ from pathlib import Path
8
+ from typing import Any
9
+
10
+ from .errors import FlowYAMLValidationError, ValidationIssue
11
+ from .importers import read_bpmn, read_mermaid
12
+ from .model import Diagram
13
+ from .renderer import DEFAULT_POLL_MS, data_payload, render_diagram
14
+ from .serialize import to_yaml as _diagram_to_yaml
15
+ from .themes import DEFAULT_THEME
16
+ from .validation import build
17
+
18
+ __all__ = [
19
+ "render",
20
+ "render_file",
21
+ "write_html",
22
+ "validate",
23
+ "load",
24
+ "models",
25
+ "payload",
26
+ "payload_json",
27
+ "read_source",
28
+ "read_mermaid",
29
+ "read_bpmn",
30
+ "to_yaml",
31
+ ]
32
+
33
+ _YAML_SUFFIXES = (".yaml", ".yml", ".flowyaml")
34
+
35
+
36
+ def read_source(source: str | os.PathLike[str]) -> str:
37
+ """Return YAML text for ``source``.
38
+
39
+ A :class:`~pathlib.Path` is always read from disk. A ``str`` is treated as
40
+ YAML text unless it is a single line with a YAML suffix that exists on
41
+ disk, which keeps ``write_html("flow.yaml", ...)`` convenient without ever
42
+ guessing about real YAML content.
43
+ """
44
+ if isinstance(source, Path) or (
45
+ isinstance(source, os.PathLike) and not isinstance(source, str)
46
+ ):
47
+ return Path(source).read_text(encoding="utf-8")
48
+ if isinstance(source, str):
49
+ looks_like_path = (
50
+ "\n" not in source
51
+ and len(source) < 4096
52
+ and source.strip().lower().endswith(_YAML_SUFFIXES)
53
+ )
54
+ if looks_like_path:
55
+ candidate = Path(source)
56
+ try:
57
+ if candidate.is_file():
58
+ return candidate.read_text(encoding="utf-8")
59
+ except OSError: # pragma: no cover - unusual filesystem states
60
+ pass
61
+ return source
62
+ raise TypeError(f"source must be str or PathLike, not {type(source).__name__}")
63
+
64
+
65
+ def validate(source: str | os.PathLike[str] | Diagram) -> tuple[ValidationIssue, ...]:
66
+ """Return every structured issue found in ``source``.
67
+
68
+ An empty tuple means the source is renderable. A :class:`Diagram` is
69
+ already normalized, so it reports nothing.
70
+ """
71
+ if isinstance(source, Diagram):
72
+ return ()
73
+ return build(read_source(source))[1]
74
+
75
+
76
+ def load(source: str | os.PathLike[str] | Diagram) -> Diagram:
77
+ """Parse and validate ``source`` into the immutable graph model.
78
+
79
+ A :class:`Diagram` passes straight through, which is what lets an
80
+ importer's result be handed to :func:`render` and :func:`write_html`
81
+ without a YAML round trip.
82
+ """
83
+ if isinstance(source, Diagram):
84
+ return source
85
+ diagram, issues = build(read_source(source))
86
+ if issues or diagram is None:
87
+ raise FlowYAMLValidationError(issues)
88
+ return diagram
89
+
90
+
91
+ def models(source: str | os.PathLike[str] | Diagram) -> tuple[str, ...]:
92
+ """Return the ``meta.id`` of every model in ``source``, in document order."""
93
+ return load(source).model_ids
94
+
95
+
96
+ def to_yaml(source: str | os.PathLike[str] | Diagram) -> str:
97
+ """Return canonical FlowYAML YAML for ``source``.
98
+
99
+ Given an imported diagram this is the round trip back to editable source
100
+ text, so a Mermaid or BPMN file can become a FlowYAML file on disk. The
101
+ output never carries geometry: FlowYAML lays a graph out in the browser.
102
+ """
103
+ return _diagram_to_yaml(load(source))
104
+
105
+
106
+ def payload(
107
+ source: str | os.PathLike[str] | Diagram,
108
+ *,
109
+ model_id: str | None = None,
110
+ revision: str | None = None,
111
+ ) -> dict[str, Any]:
112
+ """Return the JSON body a host serves to a ``data="url"`` page.
113
+
114
+ This is the FlowYAML counterpart of the ERP DINFRA ``data.json`` view: the
115
+ host re-reads the YAML file, calls this, and answers with the result, so a
116
+ saved edit is visible on the next request. ``revision`` is any opaque
117
+ marker that changes when the source does - a content digest, an mtime, a
118
+ commit id. The page polls for it and reloads the graph when it moves.
119
+ """
120
+ return data_payload(load(source), model_id=model_id, revision=revision)
121
+
122
+
123
+ def payload_json(
124
+ source: str | os.PathLike[str] | Diagram,
125
+ *,
126
+ model_id: str | None = None,
127
+ revision: str | None = None,
128
+ ) -> str:
129
+ """Return :func:`payload` serialized as compact UTF-8-safe JSON."""
130
+ return json.dumps(
131
+ payload(source, model_id=model_id, revision=revision),
132
+ ensure_ascii=False,
133
+ separators=(",", ":"),
134
+ )
135
+
136
+
137
+ def render(
138
+ source: str | os.PathLike[str] | Diagram,
139
+ *,
140
+ model_id: str | None = None,
141
+ output: str = "document",
142
+ assets: str = "inline",
143
+ data: str = "inline",
144
+ data_url: str | None = None,
145
+ revision_url: str | None = None,
146
+ poll_ms: int = DEFAULT_POLL_MS,
147
+ theme: str = DEFAULT_THEME,
148
+ instance_id: str | None = None,
149
+ ) -> str:
150
+ """Render ``source`` to self-sufficient HTML.
151
+
152
+ Parameters
153
+ ----------
154
+ source:
155
+ YAML text, a path to a YAML file, or a :class:`Diagram` such as the
156
+ one :func:`read_mermaid` and :func:`read_bpmn` return.
157
+ model_id:
158
+ Which embedded model opens first. Defaults to the first document.
159
+ Every model stays embedded regardless, so subprocess navigation works.
160
+ output:
161
+ ``"document"`` for a complete page, ``"fragment"`` for a host-safe
162
+ block that can be mounted more than once on one page.
163
+ assets:
164
+ ``"inline"`` only in v0.
165
+ data:
166
+ ``"inline"`` embeds the graph once; the artifact is then complete and
167
+ offline, and it never sees a later edit of the YAML. ``"url"`` leaves
168
+ the graph out and has the page fetch it from ``data_url``, so an edited
169
+ YAML file reaches the page on reload, and within ``poll_ms`` without
170
+ one. A ``"url"`` page needs an http host: browsers refuse the fetch
171
+ when the page itself was opened over ``file://``.
172
+ data_url:
173
+ Where the host serves :func:`payload`. Required for ``data="url"``,
174
+ rejected otherwise. Relative, or absolute http(s).
175
+ revision_url:
176
+ Optional cheaper poll target answering ``{"revision": ...}``. Without
177
+ it the page polls ``data_url`` itself and compares revisions.
178
+ poll_ms:
179
+ How often a ``"url"`` page checks for a new revision. ``0`` polls
180
+ never, which is the ERP DINFRA behaviour: an edit shows up on reload.
181
+ theme:
182
+ Registered theme name. Defaults to ``dornelles_multitech``.
183
+ instance_id:
184
+ Fixed DOM prefix. Omit it for a fresh random prefix per render, which
185
+ is what keeps two fragments on one page from colliding.
186
+
187
+ Raises
188
+ ------
189
+ FlowYAMLValidationError
190
+ If the source has any validation issue.
191
+ FlowYAMLModelError
192
+ If ``model_id`` is not present in the source.
193
+ FlowYAMLOptionError
194
+ For an unsupported ``output``, ``assets``, ``theme`` or ``instance_id``.
195
+ """
196
+ diagram = load(source)
197
+ return render_diagram(
198
+ diagram,
199
+ model_id=model_id,
200
+ output=output,
201
+ assets=assets,
202
+ data=data,
203
+ data_url=data_url,
204
+ revision_url=revision_url,
205
+ poll_ms=poll_ms,
206
+ theme=theme,
207
+ instance_id=instance_id,
208
+ )
209
+
210
+
211
+ def render_file(path: str | os.PathLike[str], **options: Any) -> str:
212
+ """Render the YAML file at ``path``."""
213
+ return render(Path(path).read_text(encoding="utf-8"), **options)
214
+
215
+
216
+ def write_html(
217
+ source_or_path: str | os.PathLike[str] | Diagram,
218
+ destination: str | os.PathLike[str],
219
+ **options: Any,
220
+ ) -> Path:
221
+ """Render ``source_or_path`` and write it to ``destination``.
222
+
223
+ Returns the written path.
224
+ """
225
+ target = Path(destination)
226
+ if target.parent and not target.parent.exists():
227
+ target.parent.mkdir(parents=True, exist_ok=True)
228
+ target.write_text(render(source_or_path, **options), encoding="utf-8")
229
+ return target
@@ -0,0 +1,5 @@
1
+ """Vendored browser assets for FlowYAML v0.
2
+
3
+ ``elk.bundled.js`` is the elkjs 0.9.3 UMD browser bundle, redistributed under
4
+ the Eclipse Public License 2.0. See ``elk.LICENSE.md`` and ``elk.VERSION.txt``.
5
+ """
@@ -0,0 +1,264 @@
1
+ # Eclipse Public License - v 2.0
2
+
3
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
4
+ PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF
5
+ THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
6
+
7
+ ## 1. DEFINITIONS
8
+
9
+ “Contribution” means:
10
+
11
+ - a\) in the case of the initial Contributor, the initial content
12
+ Distributed under this Agreement, and
13
+ - b\) in the case of each subsequent Contributor:
14
+ - i\) changes to the Program, and
15
+ - ii\) additions to the Program;
16
+
17
+ where such changes and/or additions to the Program originate from
18
+ and are Distributed by that particular Contributor. A Contribution
19
+ “originates” from a Contributor if it was added to the Program by
20
+ such Contributor itself or anyone acting on such Contributor's
21
+ behalf. Contributions do not include changes or additions to the
22
+ Program that are not Modified Works.
23
+
24
+ “Contributor” means any person or entity that Distributes the Program.
25
+
26
+ “Licensed Patents” mean patent claims licensable by a Contributor which
27
+ are necessarily infringed by the use or sale of its Contribution alone
28
+ or when combined with the Program.
29
+
30
+ “Program” means the Contributions Distributed in accordance with this
31
+ Agreement.
32
+
33
+ “Recipient” means anyone who receives the Program under this Agreement
34
+ or any Secondary License (as applicable), including Contributors.
35
+
36
+ “Derivative Works” shall mean any work, whether in Source Code or other
37
+ form, that is based on (or derived from) the Program and for which the
38
+ editorial revisions, annotations, elaborations, or other modifications
39
+ represent, as a whole, an original work of authorship.
40
+
41
+ “Modified Works” shall mean any work in Source Code or other form that
42
+ results from an addition to, deletion from, or modification of the
43
+ contents of the Program, including, for purposes of clarity any new file
44
+ in Source Code form that contains any contents of the Program. Modified
45
+ Works shall not include works that contain only declarations,
46
+ interfaces, types, classes, structures, or files of the Program solely
47
+ in each case in order to link to, bind by name, or subclass the Program
48
+ or Modified Works thereof.
49
+
50
+ “Distribute” means the acts of a) distributing or b) making available in
51
+ any manner that enables the transfer of a copy.
52
+
53
+ “Source Code” means the form of a Program preferred for making
54
+ modifications, including but not limited to software source code,
55
+ documentation source, and configuration files.
56
+
57
+ “Secondary License” means either the GNU General Public License, Version
58
+ 2.0, or any later versions of that license, including any exceptions or
59
+ additional permissions as identified by the initial Contributor.
60
+
61
+ ## 2. GRANT OF RIGHTS
62
+
63
+ - a\) Subject to the terms of this Agreement, each Contributor hereby
64
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
65
+ license to reproduce, prepare Derivative Works of, publicly display,
66
+ publicly perform, Distribute and sublicense the Contribution of such
67
+ Contributor, if any, and such Derivative Works.
68
+ - b\) Subject to the terms of this Agreement, each Contributor hereby
69
+ grants Recipient a non-exclusive, worldwide, royalty-free patent license
70
+ under Licensed Patents to make, use, sell, offer to sell, import and
71
+ otherwise transfer the Contribution of such Contributor, if any, in
72
+ Source Code or other form. This patent license shall apply to the
73
+ combination of the Contribution and the Program if, at the time the
74
+ Contribution is added by the Contributor, such addition of the
75
+ Contribution causes such combination to be covered by the
76
+ Licensed Patents. The patent license shall not apply to any other
77
+ combinations which include the Contribution. No hardware per se is
78
+ licensed hereunder.
79
+ - c\) Recipient understands that although each Contributor grants the
80
+ licenses to its Contributions set forth herein, no assurances are
81
+ provided by any Contributor that the Program does not infringe the
82
+ patent or other intellectual property rights of any other entity. Each
83
+ Contributor disclaims any liability to Recipient for claims brought by
84
+ any other entity based on infringement of intellectual property rights
85
+ or otherwise. As a condition to exercising the rights and licenses
86
+ granted hereunder, each Recipient hereby assumes sole responsibility to
87
+ secure any other intellectual property rights needed, if any. For
88
+ example, if a third party patent license is required to allow Recipient
89
+ to Distribute the Program, it is Recipient's responsibility to acquire
90
+ that license before distributing the Program.
91
+ - d\) Each Contributor represents that to its knowledge it has sufficient
92
+ copyright rights in its Contribution, if any, to grant the copyright
93
+ license set forth in this Agreement.
94
+ - e\) Notwithstanding the terms of any Secondary License, no Contributor
95
+ makes additional grants to any Recipient (other than those set forth in
96
+ this Agreement) as a result of such Recipient's receipt of the Program
97
+ under the terms of a Secondary License (if permitted under the terms of
98
+ Section 3).
99
+
100
+ ## 3. REQUIREMENTS
101
+
102
+ 3.1 If a Contributor Distributes the Program in any form, then:
103
+
104
+ - a\) the Program must also be made available as Source Code, in accordance
105
+ with section 3.2, and the Contributor must accompany the Program with a
106
+ statement that the Source Code for the Program is available under this
107
+ Agreement, and informs Recipients how to obtain it in a reasonable
108
+ manner on or through a medium customarily used for software exchange;
109
+ and
110
+ - b\) the Contributor may Distribute the Program under a license different
111
+ than this Agreement, provided that such license:
112
+ - i\) effectively disclaims on behalf of all other Contributors all
113
+ warranties and conditions, express and implied, including warranties or
114
+ conditions of title and non-infringement, and implied warranties or
115
+ conditions of merchantability and fitness for a particular purpose;
116
+ - ii\) effectively excludes on behalf of all other Contributors all
117
+ liability for damages, including direct, indirect, special, incidental
118
+ and consequential damages, such as lost profits;
119
+ - iii\) does not attempt to limit or alter the recipients' rights in the
120
+ Source Code under section 3.2; and
121
+ - iv\) requires any subsequent distribution of the Program by any party to
122
+ be under a license that satisfies the requirements of this section 3.
123
+
124
+ 3.2 When the Program is Distributed as Source Code:
125
+
126
+ - a\) it must be made available under this Agreement, or if the Program (i)
127
+ is combined with other material in a separate file or files made
128
+ available under a Secondary License, and (ii) the initial Contributor
129
+ attached to the Source Code the notice described in Exhibit A of this
130
+ Agreement, then the Program may be made available under the terms of
131
+ such Secondary Licenses, and
132
+ - b\) a copy of this Agreement must be included with each copy of
133
+ the Program.
134
+
135
+ 3.3 Contributors may not remove or alter any copyright, patent,
136
+ trademark, attribution notices, disclaimers of warranty, or limitations
137
+ of liability (‘notices’) contained within the Program from any copy of
138
+ the Program which they Distribute, provided that Contributors may add
139
+ their own appropriate notices.
140
+
141
+ ## 4. COMMERCIAL DISTRIBUTION
142
+
143
+ Commercial distributors of software may accept certain responsibilities
144
+ with respect to end users, business partners and the like. While this
145
+ license is intended to facilitate the commercial use of the Program, the
146
+ Contributor who includes the Program in a commercial product offering
147
+ should do so in a manner which does not create potential liability for
148
+ other Contributors. Therefore, if a Contributor includes the Program in
149
+ a commercial product offering, such Contributor (“Commercial
150
+ Contributor”) hereby agrees to defend and indemnify every other
151
+ Contributor (“Indemnified Contributor”) against any losses, damages and
152
+ costs (collectively “Losses”) arising from claims, lawsuits and other
153
+ legal actions brought by a third party against the Indemnified
154
+ Contributor to the extent caused by the acts or omissions of such
155
+ Commercial Contributor in connection with its distribution of the
156
+ Program in a commercial product offering. The obligations in this
157
+ section do not apply to any claims or Losses relating to any actual or
158
+ alleged intellectual property infringement. In order to qualify, an
159
+ Indemnified Contributor must: a) promptly notify the Commercial
160
+ Contributor in writing of such claim, and b) allow the Commercial
161
+ Contributor to control, and cooperate with the Commercial Contributor
162
+ in, the defense and any related settlement negotiations. The Indemnified
163
+ Contributor may participate in any such claim at its own expense.
164
+
165
+ For example, a Contributor might include the Program in a commercial
166
+ product offering, Product X. That Contributor is then a Commercial
167
+ Contributor. If that Commercial Contributor then makes performance
168
+ claims, or offers warranties related to Product X, those performance
169
+ claims and warranties are such Commercial Contributor's responsibility
170
+ alone. Under this section, the Commercial Contributor would have to
171
+ defend claims against the other Contributors related to those
172
+ performance claims and warranties, and if a court requires any other
173
+ Contributor to pay any damages as a result, the Commercial Contributor
174
+ must pay those damages.
175
+
176
+ ## 5. NO WARRANTY {#warranty}
177
+
178
+ EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
179
+ PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS”
180
+ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
181
+ IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
182
+ TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
183
+ PURPOSE. Each Recipient is solely responsible for determining the
184
+ appropriateness of using and distributing the Program and assumes all
185
+ risks associated with its exercise of rights under this Agreement,
186
+ including but not limited to the risks and costs of program errors,
187
+ compliance with applicable laws, damage to or loss of data, programs or
188
+ equipment, and unavailability or interruption of operations.
189
+
190
+ ## 6. DISCLAIMER OF LIABILITY {#disclaimer}
191
+
192
+ EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
193
+ PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
194
+ SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
195
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
196
+ PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
197
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
198
+ ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
199
+ EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
200
+ POSSIBILITY OF SUCH DAMAGES.
201
+
202
+ ## 7. GENERAL
203
+
204
+ If any provision of this Agreement is invalid or unenforceable under
205
+ applicable law, it shall not affect the validity or enforceability of
206
+ the remainder of the terms of this Agreement, and without further action
207
+ by the parties hereto, such provision shall be reformed to the minimum
208
+ extent necessary to make such provision valid and enforceable.
209
+
210
+ If Recipient institutes patent litigation against any entity (including
211
+ a cross-claim or counterclaim in a lawsuit) alleging that the Program
212
+ itself (excluding combinations of the Program with other software or
213
+ hardware) infringes such Recipient's patent(s), then such Recipient's
214
+ rights granted under Section 2(b) shall terminate as of the date such
215
+ litigation is filed.
216
+
217
+ All Recipient's rights under this Agreement shall terminate if it fails
218
+ to comply with any of the material terms or conditions of this Agreement
219
+ and does not cure such failure in a reasonable period of time after
220
+ becoming aware of such noncompliance. If all Recipient's rights under
221
+ this Agreement terminate, Recipient agrees to cease use and distribution
222
+ of the Program as soon as reasonably practicable. However, Recipient's
223
+ obligations under this Agreement and any licenses granted by Recipient
224
+ relating to the Program shall continue and survive.
225
+
226
+ Everyone is permitted to copy and distribute copies of this Agreement,
227
+ but in order to avoid inconsistency the Agreement is copyrighted and may
228
+ only be modified in the following manner. The Agreement Steward reserves
229
+ the right to publish new versions (including revisions) of this
230
+ Agreement from time to time. No one other than the Agreement Steward has
231
+ the right to modify this Agreement. The Eclipse Foundation is the
232
+ initial Agreement Steward. The Eclipse Foundation may assign the
233
+ responsibility to serve as the Agreement Steward to a suitable separate
234
+ entity. Each new version of the Agreement will be given a distinguishing
235
+ version number. The Program (including Contributions) may always be
236
+ Distributed subject to the version of the Agreement under which it was
237
+ received. In addition, after a new version of the Agreement is
238
+ published, Contributor may elect to Distribute the Program (including
239
+ its Contributions) under the new version.
240
+
241
+ Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
242
+ receives no rights or licenses to the intellectual property of any
243
+ Contributor under this Agreement, whether expressly, by implication,
244
+ estoppel or otherwise. All rights in the Program not expressly granted
245
+ under this Agreement are reserved. Nothing in this Agreement is intended
246
+ to be enforceable by any entity that is not a Contributor or Recipient.
247
+ No third-party beneficiary rights are created under this Agreement.
248
+
249
+ ## Exhibit A – Form of Secondary Licenses Notice {#exhibit-a}
250
+
251
+ “This Source Code may also be made available under the following
252
+ Secondary Licenses when the conditions for such availability set forth
253
+ in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
254
+ version(s), and exceptions or additional permissions here}.”
255
+
256
+ > Simply including a copy of this Agreement, including this Exhibit A is
257
+ > not sufficient to license the Source Code under Secondary Licenses.
258
+ >
259
+ > If it is not possible or desirable to put the notice in a particular
260
+ > file, then You may include the notice in a location (such as a LICENSE
261
+ > file in a relevant directory) where a recipient would be likely to
262
+ > look for such a notice.
263
+ >
264
+ > You may add additional accurate notices of copyright ownership.
@@ -0,0 +1,4 @@
1
+ elkjs 0.9.3
2
+ https://github.com/kieler/elkjs
3
+ Eclipse Public License 2.0
4
+ file: lib/elk.bundled.js (UMD browser bundle)