@likec4/core 1.46.4 → 1.48.0
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.
- package/LICENSE +1 -1
- package/dist/_chunks/Builder.view-element.mjs +3284 -0
- package/dist/_chunks/LikeC4Model.d.mts +1287 -0
- package/dist/_chunks/LikeC4Styles.mjs +691 -0
- package/dist/_chunks/RichText.d.mts +84 -0
- package/dist/_chunks/RichText.mjs +148 -0
- package/dist/_chunks/_aux.d.mts +289 -0
- package/dist/_chunks/_aux.mjs +18 -0
- package/dist/_chunks/_types.d.mts +781 -0
- package/dist/_chunks/_types2.d.mts +38 -0
- package/dist/_chunks/assignTagColors.mjs +24 -0
- package/dist/_chunks/calcDriftsFromSnapshot.mjs +379 -0
- package/dist/_chunks/connection.mjs +0 -0
- package/dist/_chunks/const.d.mts +43 -0
- package/dist/_chunks/const.mjs +33 -0
- package/dist/_chunks/expression-model.d.mts +192 -0
- package/dist/_chunks/expression-model.mjs +103 -0
- package/dist/_chunks/expression.d.mts +347 -0
- package/dist/_chunks/expression.mjs +107 -0
- package/dist/_chunks/find.d.mts +82 -0
- package/dist/_chunks/find.mjs +646 -0
- package/dist/_chunks/find2.d.mts +78 -0
- package/dist/_chunks/find2.mjs +287 -0
- package/dist/_chunks/fqnRef.d.mts +58 -0
- package/dist/_chunks/fqnRef.mjs +41 -0
- package/dist/_chunks/geometry.mjs +335 -0
- package/dist/_chunks/index.d.mts +169 -0
- package/dist/_chunks/index2.d.mts +937 -0
- package/dist/_chunks/index3.d.mts +146 -0
- package/dist/_chunks/index4.d.mts +62 -0
- package/dist/_chunks/index5.d.mts +42 -0
- package/dist/_chunks/index6.d.mts +43 -0
- package/dist/{shared/core.OtRNdMxy.d.mts → _chunks/index7.d.mts} +113 -197
- package/dist/_chunks/index8.d.mts +144 -0
- package/dist/_chunks/invariant.mjs +18 -0
- package/dist/_chunks/iterable.mjs +146 -0
- package/dist/_chunks/libs/@mantine/colors-generator.mjs +3416 -0
- package/dist/_chunks/libs/@ungap/structured-clone.mjs +213 -0
- package/dist/_chunks/libs/bail.mjs +14 -0
- package/dist/_chunks/libs/ccount.mjs +25 -0
- package/dist/_chunks/libs/character-entities-html4.mjs +263 -0
- package/dist/_chunks/libs/character-entities-legacy.mjs +117 -0
- package/dist/_chunks/libs/character-entities.mjs +2136 -0
- package/dist/_chunks/libs/comma-separated-tokens.mjs +18 -0
- package/dist/_chunks/libs/decode-named-character-reference.mjs +21 -0
- package/dist/_chunks/libs/defu.mjs +42 -0
- package/dist/_chunks/libs/devlop.mjs +5 -0
- package/dist/_chunks/libs/escape-string-regexp.mjs +8 -0
- package/dist/_chunks/libs/extend.mjs +77 -0
- package/dist/_chunks/libs/graphology-dag.mjs +703 -0
- package/dist/_chunks/libs/graphology-types.d.mts +601 -0
- package/dist/_chunks/libs/graphology.d.mts +6 -0
- package/dist/_chunks/libs/graphology.mjs +4565 -0
- package/dist/_chunks/libs/hast-util-sanitize.mjs +863 -0
- package/dist/_chunks/libs/hast-util-to-html.mjs +2696 -0
- package/dist/_chunks/libs/is-plain-obj.mjs +9 -0
- package/dist/_chunks/libs/longest-streak.mjs +30 -0
- package/dist/_chunks/libs/markdown-table.mjs +290 -0
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +653 -0
- package/dist/_chunks/libs/mdast-util-from-markdown.mjs +8522 -0
- package/dist/_chunks/libs/mdast-util-gfm.mjs +2393 -0
- package/dist/_chunks/libs/mdast-util-to-hast.mjs +1803 -0
- package/dist/_chunks/libs/micromark-extension-gfm.mjs +2243 -0
- package/dist/_chunks/libs/mnemonist.d.mts +254 -0
- package/dist/_chunks/libs/mnemonist.mjs +1978 -0
- package/dist/_chunks/libs/natural-compare-lite.mjs +42 -0
- package/dist/_chunks/libs/rehype-sanitize.mjs +29 -0
- package/dist/_chunks/libs/rehype-stringify.mjs +34 -0
- package/dist/_chunks/libs/remark-gfm.mjs +36 -0
- package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +100 -0
- package/dist/_chunks/libs/remark-parse.mjs +39 -0
- package/dist/_chunks/libs/remark-rehype.mjs +171 -0
- package/dist/_chunks/libs/remeda.mjs +702 -0
- package/dist/_chunks/libs/trough.mjs +158 -0
- package/dist/_chunks/libs/unified.mjs +2212 -0
- package/dist/_chunks/mnemonist.d.mts +1 -0
- package/dist/_chunks/mnemonist.mjs +0 -0
- package/dist/_chunks/model.mjs +1898 -0
- package/dist/_chunks/model2.mjs +0 -0
- package/dist/_chunks/relationships-view.mjs +132 -0
- package/dist/_chunks/rolldown-runtime.mjs +42 -0
- package/dist/{shared/core.C_3y3eqV.d.mts → _chunks/scalar.d.mts} +13 -43
- package/dist/_chunks/scalar.mjs +84 -0
- package/dist/_chunks/utils.mjs +483 -0
- package/dist/builder/index.d.mts +11 -773
- package/dist/builder/index.mjs +631 -978
- package/dist/compute-view/index.d.mts +90 -27
- package/dist/compute-view/index.mjs +253 -83
- package/dist/compute-view/relationships-view/index.d.mts +16 -51
- package/dist/compute-view/relationships-view/index.mjs +6 -184
- package/dist/geometry/index.d.mts +2 -109
- package/dist/geometry/index.mjs +2 -327
- package/dist/index.d.mts +18 -20
- package/dist/index.mjs +27 -18
- package/dist/model/connection/deployment/index.d.mts +12 -15
- package/dist/model/connection/deployment/index.mjs +9 -2
- package/dist/model/connection/index.d.mts +14 -75
- package/dist/model/connection/index.mjs +10 -3
- package/dist/model/connection/model/index.d.mts +12 -15
- package/dist/model/connection/model/index.mjs +8 -2
- package/dist/model/index.d.mts +15 -57
- package/dist/model/index.mjs +11 -4
- package/dist/styles/index.d.mts +9 -117
- package/dist/styles/index.mjs +26 -59
- package/dist/types/RichText.d.mts +3 -0
- package/dist/types/RichText.mjs +7 -0
- package/dist/types/_aux.d.mts +3 -4
- package/dist/types/_aux.mjs +2 -7
- package/dist/types/expression-model.d.mts +6 -190
- package/dist/types/expression-model.mjs +6 -108
- package/dist/types/expression.d.mts +5 -6
- package/dist/types/expression.mjs +6 -112
- package/dist/types/fqnRef.d.mts +4 -60
- package/dist/types/fqnRef.mjs +6 -44
- package/dist/types/index.d.mts +9 -47
- package/dist/types/index.mjs +14 -16
- package/dist/types/scalar.d.mts +2 -2
- package/dist/types/scalar.mjs +7 -4
- package/dist/utils/graphology/index.d.mts +2 -1864
- package/dist/utils/graphology/index.mjs +3 -1
- package/dist/utils/index.d.mts +11 -124
- package/dist/utils/index.mjs +16 -43
- package/dist/utils/iterable/index.d.mts +9 -132
- package/dist/utils/iterable/index.mjs +2 -61
- package/dist/utils/mnemonist.d.mts +2 -0
- package/dist/utils/mnemonist.mjs +12 -0
- package/package.json +18 -22
- package/compute-view/relationships/package.json +0 -4
- package/dist/shared/core.3ZhnKAlZ.mjs +0 -106
- package/dist/shared/core.78IWAHAE.mjs +0 -332
- package/dist/shared/core.B85MJLTf.mjs +0 -5
- package/dist/shared/core.BFd1lU9R.mjs +0 -29
- package/dist/shared/core.BKlholso.mjs +0 -3
- package/dist/shared/core.BPGOjone.d.mts +0 -46
- package/dist/shared/core.BYdtmqY5.mjs +0 -1255
- package/dist/shared/core.BZCgljZd.d.mts +0 -83
- package/dist/shared/core.BbE4y-yl.mjs +0 -177
- package/dist/shared/core.BhNcrwzK.mjs +0 -7
- package/dist/shared/core.BkVA6gjl.mjs +0 -5
- package/dist/shared/core.BoYfZOBm.mjs +0 -3
- package/dist/shared/core.BsSXS-_R.mjs +0 -7
- package/dist/shared/core.BspBF3SJ.mjs +0 -3944
- package/dist/shared/core.BvPm_-u3.d.mts +0 -334
- package/dist/shared/core.C-Jdx7xo.d.mts +0 -1263
- package/dist/shared/core.C3JowhaZ.mjs +0 -32
- package/dist/shared/core.C4x8aaWa.mjs +0 -27
- package/dist/shared/core.CBLX4mT8.mjs +0 -28411
- package/dist/shared/core.CLSZtnFh.mjs +0 -69
- package/dist/shared/core.CRhT4Iio.mjs +0 -785
- package/dist/shared/core.CbT8JVYL.mjs +0 -5
- package/dist/shared/core.CdNCAwq7.mjs +0 -176
- package/dist/shared/core.ClTP6-TN.d.mts +0 -87
- package/dist/shared/core.CmGY9blO.mjs +0 -6717
- package/dist/shared/core.CmPXpJ8l.mjs +0 -21
- package/dist/shared/core.Coi_LOUZ.mjs +0 -7
- package/dist/shared/core.CqAJJpK_.mjs +0 -3
- package/dist/shared/core.Ctj2S3bD.d.mts +0 -466
- package/dist/shared/core.CywrQs86.d.mts +0 -31
- package/dist/shared/core.D00YbOhQ.d.mts +0 -300
- package/dist/shared/core.D0WZutNd.mjs +0 -94
- package/dist/shared/core.D4npX2q8.mjs +0 -18
- package/dist/shared/core.DB0Ue5Wx.d.mts +0 -70
- package/dist/shared/core.DEK-BO3_.mjs +0 -1206
- package/dist/shared/core.DH7TXqXf.mjs +0 -136
- package/dist/shared/core.DRJma0Ol.mjs +0 -22
- package/dist/shared/core.DSalPD6v.mjs +0 -1352
- package/dist/shared/core.DVfPJPJj.mjs +0 -2200
- package/dist/shared/core.DXhDWKFZ.d.mts +0 -3
- package/dist/shared/core.DbfO90vF.mjs +0 -434
- package/dist/shared/core.DcS-0zys.mjs +0 -10
- package/dist/shared/core.DeDCYTDR.d.mts +0 -98
- package/dist/shared/core.DpKY_3NF.d.mts +0 -504
- package/dist/shared/core.Dt0v3djy.d.mts +0 -41
- package/dist/shared/core.FZ305VYd.mjs +0 -21
- package/dist/shared/core.RfnaEmgA.mjs +0 -7
- package/dist/shared/core.oSV6SRfk.mjs +0 -13
- package/dist/shared/core.om36dXXW.mjs +0 -41
- package/dist/shared/core.q10OP9oJ.mjs +0 -5
- package/dist/shared/core.uFk_o9X6.mjs +0 -13
- package/dist/shared/core.xeuDd__E.mjs +0 -300
- package/dist/shared/core.xgoPk2RG.mjs +0 -4989
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { c as compareNatural } from './core.3ZhnKAlZ.mjs';
|
|
2
|
-
|
|
3
|
-
function isString(value) {
|
|
4
|
-
return value != null && typeof value === "string";
|
|
5
|
-
}
|
|
6
|
-
function isNonEmptyArray(arr) {
|
|
7
|
-
return !!arr && Array.isArray(arr) && arr.length > 0;
|
|
8
|
-
}
|
|
9
|
-
function hasProp(value, path) {
|
|
10
|
-
return value[path] != null;
|
|
11
|
-
}
|
|
12
|
-
function isAnyOf(...predicates) {
|
|
13
|
-
return (value) => {
|
|
14
|
-
return predicates.some((predicate) => predicate(value));
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function parentFqn(fqn) {
|
|
19
|
-
const lastDot = fqn.lastIndexOf(".");
|
|
20
|
-
if (lastDot > 0) {
|
|
21
|
-
return fqn.slice(0, lastDot);
|
|
22
|
-
}
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
function nameFromFqn(fqn) {
|
|
26
|
-
const lastDot = fqn.lastIndexOf(".");
|
|
27
|
-
if (lastDot > 0) {
|
|
28
|
-
return fqn.slice(lastDot + 1);
|
|
29
|
-
} else {
|
|
30
|
-
return fqn;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
const asString = (e) => isString(e) ? e : e.id;
|
|
34
|
-
function isAncestor(arg1, arg2) {
|
|
35
|
-
const arg1Id = asString(arg1);
|
|
36
|
-
if (arg2) {
|
|
37
|
-
const arg2Id = asString(arg2);
|
|
38
|
-
return arg2Id.startsWith(arg1Id + ".");
|
|
39
|
-
}
|
|
40
|
-
return (ancestor) => {
|
|
41
|
-
const ancestorId = asString(ancestor);
|
|
42
|
-
return arg1Id.startsWith(ancestorId + ".");
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
function isSameHierarchy(one, another) {
|
|
46
|
-
if (!another) {
|
|
47
|
-
return (b) => isSameHierarchy(one, b);
|
|
48
|
-
}
|
|
49
|
-
const first = asString(one);
|
|
50
|
-
const second = asString(another);
|
|
51
|
-
return first === second || second.startsWith(first + ".") || first.startsWith(second + ".");
|
|
52
|
-
}
|
|
53
|
-
function isDescendantOf(descedant, ancestor) {
|
|
54
|
-
if (!ancestor) {
|
|
55
|
-
return (d) => isAncestor(descedant, d);
|
|
56
|
-
}
|
|
57
|
-
return isAncestor(ancestor, descedant);
|
|
58
|
-
}
|
|
59
|
-
function hierarchyLevel(elementOfFqn) {
|
|
60
|
-
const first = isString(elementOfFqn) ? elementOfFqn : elementOfFqn.id;
|
|
61
|
-
return first.split(".").length;
|
|
62
|
-
}
|
|
63
|
-
function hierarchyDistance(one, another) {
|
|
64
|
-
const first = isString(one) ? one : one.id;
|
|
65
|
-
const second = isString(another) ? another : another.id;
|
|
66
|
-
if (first === second) {
|
|
67
|
-
return 0;
|
|
68
|
-
}
|
|
69
|
-
const firstDepth = hierarchyLevel(first);
|
|
70
|
-
const secondDepth = hierarchyLevel(second);
|
|
71
|
-
if (isSameHierarchy(first, second)) {
|
|
72
|
-
return Math.abs(firstDepth - secondDepth);
|
|
73
|
-
}
|
|
74
|
-
const ancestor = commonAncestor(first, second);
|
|
75
|
-
const ancestorDepth = ancestor ? hierarchyLevel(ancestor) : 0;
|
|
76
|
-
return firstDepth + secondDepth - (2 * ancestorDepth + 1);
|
|
77
|
-
}
|
|
78
|
-
function commonAncestor(first, second) {
|
|
79
|
-
const a = first.split(".");
|
|
80
|
-
if (a.length < 2) {
|
|
81
|
-
return null;
|
|
82
|
-
}
|
|
83
|
-
const b = second.split(".");
|
|
84
|
-
if (b.length < 2) {
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
let ancestor = [];
|
|
88
|
-
for (let i = 0; i < Math.min(a.length, b.length) - 1 && a[i] === b[i]; i++) {
|
|
89
|
-
ancestor.push(a[i]);
|
|
90
|
-
}
|
|
91
|
-
if (ancestor.length === 0) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
return ancestor.join(".");
|
|
95
|
-
}
|
|
96
|
-
function ancestorsFqn(fqn) {
|
|
97
|
-
const path = fqn.split(".");
|
|
98
|
-
path.pop();
|
|
99
|
-
if (path.length === 0) {
|
|
100
|
-
return [];
|
|
101
|
-
}
|
|
102
|
-
return path.reduce((acc, part, idx) => {
|
|
103
|
-
if (idx === 0) {
|
|
104
|
-
acc.push(part);
|
|
105
|
-
return acc;
|
|
106
|
-
}
|
|
107
|
-
acc.unshift(`${acc[0]}.${part}`);
|
|
108
|
-
return acc;
|
|
109
|
-
}, []);
|
|
110
|
-
}
|
|
111
|
-
function compareFqnHierarchically(a, b) {
|
|
112
|
-
const depthA = a.split(".").length;
|
|
113
|
-
const depthB = b.split(".").length;
|
|
114
|
-
switch (true) {
|
|
115
|
-
case depthA > depthB: {
|
|
116
|
-
return 1;
|
|
117
|
-
}
|
|
118
|
-
case depthA < depthB: {
|
|
119
|
-
return -1;
|
|
120
|
-
}
|
|
121
|
-
default: {
|
|
122
|
-
return 0;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function compareByFqnHierarchically(a, b) {
|
|
127
|
-
return compareFqnHierarchically(a.id, b.id);
|
|
128
|
-
}
|
|
129
|
-
function sortByFqnHierarchically(array) {
|
|
130
|
-
return array.map((item) => ({ item, fqn: item.id.split(".") })).sort((a, b) => {
|
|
131
|
-
return a.fqn.length - b.fqn.length;
|
|
132
|
-
}).map(({ item }) => item);
|
|
133
|
-
}
|
|
134
|
-
function findTopAncestor(items, item) {
|
|
135
|
-
let parent = item;
|
|
136
|
-
for (const e of items) {
|
|
137
|
-
if (isAncestor(e, parent)) {
|
|
138
|
-
parent = e;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
return parent !== item ? parent : null;
|
|
142
|
-
}
|
|
143
|
-
function sortParentsFirst(array) {
|
|
144
|
-
const result = [];
|
|
145
|
-
const items = [...array];
|
|
146
|
-
let item;
|
|
147
|
-
while (item = items.shift()) {
|
|
148
|
-
let parent;
|
|
149
|
-
while (parent = findTopAncestor(items, item)) {
|
|
150
|
-
result.push(items.splice(items.indexOf(parent), 1)[0]);
|
|
151
|
-
}
|
|
152
|
-
result.push(item);
|
|
153
|
-
}
|
|
154
|
-
return result;
|
|
155
|
-
}
|
|
156
|
-
function sortNaturalByFqn(array, sort) {
|
|
157
|
-
if (!array || isString(array)) {
|
|
158
|
-
const dir2 = array ?? "asc";
|
|
159
|
-
return (arr) => sortNaturalByFqn(arr, dir2);
|
|
160
|
-
}
|
|
161
|
-
const dir = sort === "desc" ? -1 : 1;
|
|
162
|
-
return array.map((item) => ({ item, fqn: item.id.split(".") })).sort((a, b) => {
|
|
163
|
-
if (a.fqn.length !== b.fqn.length) {
|
|
164
|
-
return (a.fqn.length - b.fqn.length) * dir;
|
|
165
|
-
}
|
|
166
|
-
for (let i = 0; i < a.fqn.length; i++) {
|
|
167
|
-
const compare = compareNatural(a.fqn[i], b.fqn[i]);
|
|
168
|
-
if (compare !== 0) {
|
|
169
|
-
return compare;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
return 0;
|
|
173
|
-
}).map(({ item }) => item);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export { ancestorsFqn as a, isDescendantOf as b, isNonEmptyArray as c, isSameHierarchy as d, isString as e, sortParentsFirst as f, commonAncestor as g, hasProp as h, isAncestor as i, compareByFqnHierarchically as j, compareFqnHierarchically as k, hierarchyDistance as l, hierarchyLevel as m, nameFromFqn as n, sortByFqnHierarchically as o, parentFqn as p, isAnyOf as q, sortNaturalByFqn as s };
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { C as Connection, c as customInspectSymbol } from './core.Dt0v3djy.mjs';
|
|
2
|
-
import { e as DeploymentElementModel, h as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.C-Jdx7xo.mjs';
|
|
3
|
-
import { A as Any, z as EdgeId } from './core.D00YbOhQ.mjs';
|
|
4
|
-
import { c as IteratorLike } from './core.DB0Ue5Wx.mjs';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Connection is ephemeral entity, result of a resolving relationships between source and target.
|
|
8
|
-
* Includes direct relationships and/or between their nested elements.
|
|
9
|
-
*/
|
|
10
|
-
declare class DeploymentConnectionModel<A extends Any = Any> implements Connection<DeploymentElementModel<A>, EdgeId> {
|
|
11
|
-
readonly source: DeploymentElementModel<A>;
|
|
12
|
-
readonly target: DeploymentElementModel<A>;
|
|
13
|
-
readonly relations: RelationshipsAccum<A>;
|
|
14
|
-
readonly id: EdgeId;
|
|
15
|
-
constructor(source: DeploymentElementModel<A>, target: DeploymentElementModel<A>, relations: RelationshipsAccum<A>);
|
|
16
|
-
/**
|
|
17
|
-
* Human readable expression of the connection
|
|
18
|
-
* Mostly used for testing and debugging
|
|
19
|
-
*/
|
|
20
|
-
get expression(): string;
|
|
21
|
-
private _boundary;
|
|
22
|
-
/**
|
|
23
|
-
* Common ancestor of the source and target elements.
|
|
24
|
-
* Represents the boundary of the connection.
|
|
25
|
-
*/
|
|
26
|
-
get boundary(): DeploymentNodeModel<A> | null;
|
|
27
|
-
nonEmpty(): boolean;
|
|
28
|
-
[customInspectSymbol](_depth: any, _inspectOptions: any, _inspect: any): string;
|
|
29
|
-
toString(): string;
|
|
30
|
-
/**
|
|
31
|
-
* Check if connection contains deployment relation,
|
|
32
|
-
* that is directly connected to source or target.
|
|
33
|
-
*/
|
|
34
|
-
hasDirectDeploymentRelation(): boolean;
|
|
35
|
-
values(): IteratorLike<RelationshipModel<A> | DeploymentRelationModel<A>>;
|
|
36
|
-
/**
|
|
37
|
-
* Merge with another connections, if it has the same source and target.
|
|
38
|
-
* Returns new connection with union of relationships.
|
|
39
|
-
*/
|
|
40
|
-
mergeWith(others: DeploymentConnectionModel<A>[]): DeploymentConnectionModel<A>;
|
|
41
|
-
/**
|
|
42
|
-
* Merge with another connection, if it has the same source and target.
|
|
43
|
-
* Returns new connection with union of relationships.
|
|
44
|
-
*/
|
|
45
|
-
mergeWith(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
|
|
46
|
-
difference(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
|
|
47
|
-
intersect(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
|
|
48
|
-
equals(other: Connection): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Creates a clone of the current `DeploymentConnectionModel` instance with optional overrides.
|
|
51
|
-
* if `null` is provided in overrides, the corresponding relation set will be empty.
|
|
52
|
-
*/
|
|
53
|
-
update(overrides?: {
|
|
54
|
-
model?: ReadonlySet<RelationshipModel<A>> | null;
|
|
55
|
-
deployment?: ReadonlySet<DeploymentRelationModel<A>> | null;
|
|
56
|
-
}): DeploymentConnectionModel<A>;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Resolve connection from source to target
|
|
61
|
-
* If direction is `both`, also look for reverse connection
|
|
62
|
-
*
|
|
63
|
-
* @default direction directed
|
|
64
|
-
*/
|
|
65
|
-
declare function findConnection<M extends Any>(source: DeploymentElementModel<M>, target: DeploymentElementModel<NoInfer<M>>, direction: 'directed'): readonly [DeploymentConnectionModel<M>] | readonly [];
|
|
66
|
-
declare function findConnection<M extends Any>(source: DeploymentElementModel<M>, target: DeploymentElementModel<NoInfer<M>>, direction: 'both'): readonly [DeploymentConnectionModel<M>, DeploymentConnectionModel<M>] | readonly [DeploymentConnectionModel<M>] | readonly [];
|
|
67
|
-
declare function findConnection<M extends Any>(source: DeploymentElementModel<M>, target: DeploymentElementModel<NoInfer<M>>, direction?: 'directed' | 'both'): readonly [DeploymentConnectionModel<M>, DeploymentConnectionModel<M>] | readonly [DeploymentConnectionModel<M>] | readonly [];
|
|
68
|
-
/**
|
|
69
|
-
* Resolve all connections between element and others
|
|
70
|
-
* By default, look for both directions.
|
|
71
|
-
*
|
|
72
|
-
* @default direction both
|
|
73
|
-
*/
|
|
74
|
-
declare function findConnectionsBetween<M extends Any>(element: DeploymentElementModel<M>, others: Iterable<DeploymentElementModel<NoInfer<M>>>, direction?: 'directed' | 'both'): readonly DeploymentConnectionModel<M>[];
|
|
75
|
-
/**
|
|
76
|
-
* Resolve all connections within a given set of elements
|
|
77
|
-
*/
|
|
78
|
-
declare function findConnectionsWithin<M extends Any>(elements: Iterable<DeploymentElementModel<M>>): readonly DeploymentConnectionModel<M>[];
|
|
79
|
-
|
|
80
|
-
declare const find_findConnection: typeof findConnection;
|
|
81
|
-
declare const find_findConnectionsBetween: typeof findConnectionsBetween;
|
|
82
|
-
declare const find_findConnectionsWithin: typeof findConnectionsWithin;
|
|
83
|
-
declare namespace find {
|
|
84
|
-
export { find_findConnection as findConnection, find_findConnectionsBetween as findConnectionsBetween, find_findConnectionsWithin as findConnectionsWithin };
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export { DeploymentConnectionModel as D, findConnection as a, findConnectionsBetween as b, findConnectionsWithin as c, find as f };
|