@likec4/core 1.48.0 → 1.50.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/dist/THIRD-PARTY-LICENSES.md +1034 -0
- package/dist/_chunks/Builder.view-element.mjs +2 -3284
- package/dist/_chunks/LikeC4Model.d.mts +21 -25
- package/dist/_chunks/_types.d.mts +1 -5
- package/dist/_chunks/_types2.d.mts +2 -4
- package/dist/_chunks/assignTagColors.mjs +1 -24
- package/dist/_chunks/geometry.mjs +1 -335
- package/dist/_chunks/index.d.mts +1995 -131
- package/dist/_chunks/index2.d.mts +153 -892
- package/dist/_chunks/index3.d.mts +15 -13
- package/dist/_chunks/index4.d.mts +229 -3
- package/dist/_chunks/index5.d.mts +392 -30
- package/dist/_chunks/libs/@mantine/colors-generator.mjs +2 -3403
- package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -0
- package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -213
- package/dist/_chunks/libs/bail.mjs +1 -14
- package/dist/_chunks/libs/ccount.mjs +1 -25
- package/dist/_chunks/libs/character-entities-html4.mjs +1 -263
- package/dist/_chunks/libs/character-entities-legacy.mjs +1 -117
- package/dist/_chunks/libs/character-entities.mjs +2 -2136
- package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -18
- package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -21
- package/dist/_chunks/libs/defu.mjs +1 -42
- package/dist/_chunks/libs/devlop.mjs +1 -5
- package/dist/_chunks/libs/escape-string-regexp.mjs +1 -8
- package/dist/_chunks/libs/extend.mjs +1 -77
- package/dist/_chunks/libs/graphology-dag.mjs +1 -703
- package/dist/_chunks/libs/graphology.mjs +1 -4565
- package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -863
- package/dist/_chunks/libs/hast-util-to-html.mjs +9 -2696
- package/dist/_chunks/libs/is-plain-obj.mjs +1 -9
- package/dist/_chunks/libs/longest-streak.mjs +1 -30
- package/dist/_chunks/libs/markdown-table.mjs +2 -290
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -653
- package/dist/_chunks/libs/mdast-util-from-markdown.mjs +3 -8522
- package/dist/_chunks/libs/mdast-util-gfm.mjs +15 -2393
- package/dist/_chunks/libs/mdast-util-to-hast.mjs +11 -1803
- package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -2243
- package/dist/_chunks/libs/mnemonist.d.mts +1 -91
- package/dist/_chunks/libs/mnemonist.mjs +1 -1978
- package/dist/_chunks/libs/natural-compare-lite.mjs +9 -42
- package/dist/_chunks/libs/ohash.mjs +1 -0
- package/dist/_chunks/libs/rehype-sanitize.mjs +1 -29
- package/dist/_chunks/libs/rehype-stringify.mjs +1 -34
- package/dist/_chunks/libs/remark-gfm.mjs +1 -36
- package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +3 -100
- package/dist/_chunks/libs/remark-parse.mjs +1 -39
- package/dist/_chunks/libs/remark-rehype.mjs +1 -171
- package/dist/_chunks/libs/remeda.mjs +2 -702
- package/dist/_chunks/libs/trough.mjs +1 -158
- package/dist/_chunks/libs/unified.mjs +1 -2212
- package/dist/_chunks/manual-layout.mjs +1 -0
- package/dist/_chunks/model.mjs +4 -1898
- package/dist/_chunks/rolldown-runtime.mjs +1 -42
- package/dist/_chunks/types.mjs +1 -0
- package/dist/_chunks/utils.mjs +1 -483
- package/dist/builder/index.d.mts +3 -6
- package/dist/builder/index.mjs +1 -662
- package/dist/compute-view/index.d.mts +85 -13
- package/dist/compute-view/index.mjs +2 -262
- package/dist/geometry/index.d.mts +2 -2
- package/dist/geometry/index.mjs +1 -3
- package/dist/index.d.mts +7 -13
- package/dist/index.mjs +1 -27
- package/dist/model/index.d.mts +4 -11
- package/dist/model/index.mjs +1 -11
- package/dist/styles/index.d.mts +2 -7
- package/dist/styles/index.mjs +1 -30
- package/dist/types/index.d.mts +3 -9
- package/dist/types/index.mjs +1 -15
- package/dist/utils/graphology/index.d.mts +1 -1
- package/dist/utils/graphology/index.mjs +1 -3
- package/dist/utils/index.d.mts +5 -10
- package/dist/utils/index.mjs +1 -17
- package/package.json +14 -13
- package/dist/_chunks/LikeC4Styles.mjs +0 -691
- package/dist/_chunks/RichText.d.mts +0 -84
- package/dist/_chunks/RichText.mjs +0 -148
- package/dist/_chunks/_aux.d.mts +0 -289
- package/dist/_chunks/_aux.mjs +0 -18
- package/dist/_chunks/calcDriftsFromSnapshot.mjs +0 -379
- package/dist/_chunks/connection.mjs +0 -0
- package/dist/_chunks/const.d.mts +0 -43
- package/dist/_chunks/const.mjs +0 -33
- package/dist/_chunks/expression-model.d.mts +0 -192
- package/dist/_chunks/expression-model.mjs +0 -103
- package/dist/_chunks/expression.d.mts +0 -347
- package/dist/_chunks/expression.mjs +0 -107
- package/dist/_chunks/find.d.mts +0 -82
- package/dist/_chunks/find.mjs +0 -646
- package/dist/_chunks/find2.d.mts +0 -78
- package/dist/_chunks/find2.mjs +0 -287
- package/dist/_chunks/fqnRef.d.mts +0 -58
- package/dist/_chunks/fqnRef.mjs +0 -41
- package/dist/_chunks/index6.d.mts +0 -43
- package/dist/_chunks/index7.d.mts +0 -268
- package/dist/_chunks/index8.d.mts +0 -144
- package/dist/_chunks/invariant.mjs +0 -18
- package/dist/_chunks/iterable.mjs +0 -146
- package/dist/_chunks/libs/graphology-types.d.mts +0 -601
- package/dist/_chunks/libs/graphology.d.mts +0 -6
- package/dist/_chunks/mnemonist.mjs +0 -0
- package/dist/_chunks/model2.mjs +0 -0
- package/dist/_chunks/relationships-view.mjs +0 -132
- package/dist/_chunks/scalar.d.mts +0 -109
- package/dist/_chunks/scalar.mjs +0 -84
- package/dist/compute-view/relationships-view/index.d.mts +0 -16
- package/dist/compute-view/relationships-view/index.mjs +0 -7
- package/dist/model/connection/deployment/index.d.mts +0 -12
- package/dist/model/connection/deployment/index.mjs +0 -9
- package/dist/model/connection/index.d.mts +0 -14
- package/dist/model/connection/index.mjs +0 -10
- package/dist/model/connection/model/index.d.mts +0 -12
- package/dist/model/connection/model/index.mjs +0 -8
- package/dist/types/RichText.d.mts +0 -3
- package/dist/types/RichText.mjs +0 -7
- package/dist/types/_aux.d.mts +0 -3
- package/dist/types/_aux.mjs +0 -3
- package/dist/types/expression-model.d.mts +0 -6
- package/dist/types/expression-model.mjs +0 -7
- package/dist/types/expression.d.mts +0 -5
- package/dist/types/expression.mjs +0 -7
- package/dist/types/fqnRef.d.mts +0 -4
- package/dist/types/fqnRef.mjs +0 -7
- package/dist/types/scalar.d.mts +0 -2
- package/dist/types/scalar.mjs +0 -7
- package/dist/utils/iterable/index.d.mts +0 -9
- package/dist/utils/iterable/index.mjs +0 -3
- package/dist/utils/mnemonist.d.mts +0 -2
- package/dist/utils/mnemonist.mjs +0 -12
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as Tag } from "./scalar.mjs";
|
|
3
|
-
import { B as ShapeSize, C as BorderStyle, F as LikeC4Theme, G as ThemeColorValues, H as SpacingSize, M as IconSize, N as LikeC4StyleDefaults, O as ElementColorValues, P as LikeC4StylesConfig, R as RelationshipColorValues, T as ColorLiteral, U as TextSize, W as ThemeColor, j as IconPosition, w as Color } from "./expression.mjs";
|
|
4
|
-
import { Z as ComputedNodeStyle, ct as TagSpecification, nt as LikeC4ProjectStylesConfig } from "./index2.mjs";
|
|
1
|
+
import { Er as DefaultTagColors, Fi as Tag, Sr as ThemeColorValues, _r as ShapeSize, _t as TagSpecification, ar as ElementColorValues, br as TextSize, cr as IconPosition, dr as LikeC4StylesConfig, dt as LikeC4ProjectStylesConfig, er as BorderStyle, fr as LikeC4Theme, ft as LikeC4ProjectStylesCustomStylesheets, hr as RelationshipColorValues, ir as CustomColorDefinitions, lr as IconSize, nr as ColorLiteral, ot as ComputedNodeStyle, ra as NTuple, tr as Color, ur as LikeC4StyleDefaults, xr as ThemeColor, yr as SpacingSize } from "./index.mjs";
|
|
5
2
|
import { LiteralUnion } from "type-fest";
|
|
6
3
|
|
|
4
|
+
//#region src/styles/assignTagColors.d.ts
|
|
5
|
+
declare function assignTagColors(tags: {
|
|
6
|
+
[kind: string]: Partial<TagSpecification>;
|
|
7
|
+
}): Record<Tag, TagSpecification>;
|
|
8
|
+
//#endregion
|
|
7
9
|
//#region src/styles/LikeC4Styles.d.ts
|
|
8
10
|
/**
|
|
9
11
|
* Styles of a LikeC4 project
|
|
@@ -17,10 +19,11 @@ import { LiteralUnion } from "type-fest";
|
|
|
17
19
|
*/
|
|
18
20
|
declare class LikeC4Styles {
|
|
19
21
|
protected config: LikeC4StylesConfig;
|
|
22
|
+
protected customCss?: LikeC4ProjectStylesCustomStylesheets | undefined;
|
|
20
23
|
readonly theme: LikeC4Theme;
|
|
21
24
|
readonly defaults: LikeC4StyleDefaults;
|
|
22
25
|
static readonly DEFAULT: LikeC4Styles;
|
|
23
|
-
static from(
|
|
26
|
+
static from(stylesConfig: LikeC4ProjectStylesConfig | undefined, customColors?: CustomColorDefinitions | undefined): LikeC4Styles;
|
|
24
27
|
private constructor();
|
|
25
28
|
/**
|
|
26
29
|
* Default element colors
|
|
@@ -105,10 +108,10 @@ declare class LikeC4Styles {
|
|
|
105
108
|
readonly size?: ShapeSize;
|
|
106
109
|
readonly padding?: SpacingSize;
|
|
107
110
|
readonly textSize?: TextSize;
|
|
108
|
-
}, "
|
|
109
|
-
readonly iconSize?: IconSize;
|
|
111
|
+
}, "size" | "padding" | "iconSize" | "textSize"> & Required<{
|
|
110
112
|
readonly size?: ShapeSize;
|
|
111
113
|
readonly padding?: SpacingSize;
|
|
114
|
+
readonly iconSize?: IconSize;
|
|
112
115
|
readonly textSize?: TextSize;
|
|
113
116
|
}>;
|
|
114
117
|
values: {
|
|
@@ -127,13 +130,12 @@ declare class LikeC4Styles {
|
|
|
127
130
|
*/
|
|
128
131
|
computeFrom(color: string): ThemeColorValues;
|
|
129
132
|
equals(other: LikeC4Styles): boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Get color values for a tag (including default tag colors)
|
|
135
|
+
*/
|
|
136
|
+
tagColor(tag: typeof DefaultTagColors[number] | ThemeColor | ColorLiteral): ThemeColorValues['elements'];
|
|
130
137
|
}
|
|
131
138
|
//#endregion
|
|
132
|
-
//#region src/styles/assignTagColors.d.ts
|
|
133
|
-
declare function assignTagColors(tags: {
|
|
134
|
-
[kind: string]: Partial<TagSpecification>;
|
|
135
|
-
}): Record<Tag, TagSpecification>;
|
|
136
|
-
//#endregion
|
|
137
139
|
//#region src/styles/compute-color-values.d.ts
|
|
138
140
|
declare function computeColorValues(color: ColorLiteral): ThemeColorValues;
|
|
139
141
|
//#endregion
|
|
@@ -143,4 +145,4 @@ declare const styleDefaults: LikeC4StyleDefaults;
|
|
|
143
145
|
//#region src/styles/theme.d.ts
|
|
144
146
|
declare const defaultTheme: LikeC4Theme;
|
|
145
147
|
//#endregion
|
|
146
|
-
export {
|
|
148
|
+
export { assignTagColors as a, LikeC4Styles as i, styleDefaults as n, computeColorValues as r, defaultTheme as t };
|
|
@@ -1,6 +1,151 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { $i as IterableContainer, bi as Fqn, ea as IteratorLike, ii as Unknown, jr as Any, sa as ReorderedArray, zr as EdgeId } from "./index.mjs";
|
|
2
|
+
import { C as ElementModel, S as NodeModel, T as RelationshipModel, a as DeploymentNodeModel, c as NestedElementOfDeployedInstanceModel, i as DeploymentElementModel, l as RelationshipsAccum, r as DeployedInstanceModel, s as DeploymentRelationModel, w as AnyRelationshipModel, x as EdgeModel, y as LikeC4ViewModel } from "./LikeC4Model.mjs";
|
|
3
3
|
|
|
4
|
+
//#region src/model/connection/Connection.d.ts
|
|
5
|
+
interface Connection<Elem = ElementModel<Any> | DeploymentElementModel<Any>, Id = string> {
|
|
6
|
+
readonly id: Id;
|
|
7
|
+
readonly source: Elem;
|
|
8
|
+
readonly target: Elem;
|
|
9
|
+
/**
|
|
10
|
+
* Common ancestor of the source and target elements.
|
|
11
|
+
* Represents the boundary of the connection.
|
|
12
|
+
*/
|
|
13
|
+
readonly boundary: Elem | null;
|
|
14
|
+
/**
|
|
15
|
+
* Human readable expression of the connection
|
|
16
|
+
* Mostly used for testing and debugging
|
|
17
|
+
*/
|
|
18
|
+
readonly expression: string;
|
|
19
|
+
mergeWith(this: Connection<Elem, Id>, other: typeof this): typeof this;
|
|
20
|
+
nonEmpty(): boolean;
|
|
21
|
+
difference(this: Connection<Elem, Id>, other: typeof this): typeof this;
|
|
22
|
+
intersect(this: Connection<Elem, Id>, other: typeof this): typeof this;
|
|
23
|
+
equals(other: Connection): boolean;
|
|
24
|
+
}
|
|
25
|
+
declare namespace Connection {
|
|
26
|
+
type ConnectionPredicate = <C extends Connection<{
|
|
27
|
+
id: string;
|
|
28
|
+
}, any>>(connection: C) => boolean;
|
|
29
|
+
type ElementId = Fqn | string;
|
|
30
|
+
export const isInside: (fqn: ElementId) => ConnectionPredicate;
|
|
31
|
+
export const isDirectedBetween: (source: ElementId, target: ElementId) => ConnectionPredicate;
|
|
32
|
+
export const isAnyBetween: (source: ElementId, target: ElementId) => ConnectionPredicate;
|
|
33
|
+
export const isIncoming: (target: ElementId) => ConnectionPredicate;
|
|
34
|
+
export const isOutgoing: (source: ElementId) => ConnectionPredicate;
|
|
35
|
+
export const isAnyInOut: (source: ElementId) => ConnectionPredicate;
|
|
36
|
+
export {};
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/utils/const.d.ts
|
|
40
|
+
declare const customInspectSymbol: unique symbol;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/model/connection/deployment/DeploymentConnectionModel.d.ts
|
|
43
|
+
/**
|
|
44
|
+
* Connection is ephemeral entity, result of a resolving relationships between source and target.
|
|
45
|
+
* Includes direct relationships and/or between their nested elements.
|
|
46
|
+
*/
|
|
47
|
+
declare class DeploymentConnectionModel<A extends Any = Any> implements Connection<DeploymentElementModel<A>, EdgeId> {
|
|
48
|
+
readonly source: DeploymentElementModel<A>;
|
|
49
|
+
readonly target: DeploymentElementModel<A>;
|
|
50
|
+
readonly relations: RelationshipsAccum<A>;
|
|
51
|
+
readonly id: EdgeId;
|
|
52
|
+
constructor(source: DeploymentElementModel<A>, target: DeploymentElementModel<A>, relations: RelationshipsAccum<A>);
|
|
53
|
+
/**
|
|
54
|
+
* Human readable expression of the connection
|
|
55
|
+
* Mostly used for testing and debugging
|
|
56
|
+
*/
|
|
57
|
+
get expression(): string;
|
|
58
|
+
private _boundary;
|
|
59
|
+
/**
|
|
60
|
+
* Common ancestor of the source and target elements.
|
|
61
|
+
* Represents the boundary of the connection.
|
|
62
|
+
*/
|
|
63
|
+
get boundary(): DeploymentNodeModel<A> | null;
|
|
64
|
+
nonEmpty(): boolean;
|
|
65
|
+
[customInspectSymbol](_depth: any, _inspectOptions: any, _inspect: any): string;
|
|
66
|
+
toString(): string;
|
|
67
|
+
/**
|
|
68
|
+
* Check if connection contains deployment relation,
|
|
69
|
+
* that is directly connected to source or target.
|
|
70
|
+
*/
|
|
71
|
+
hasDirectDeploymentRelation(): boolean;
|
|
72
|
+
values(): IteratorLike<RelationshipModel<A> | DeploymentRelationModel<A>>;
|
|
73
|
+
/**
|
|
74
|
+
* Merge with another connections, if it has the same source and target.
|
|
75
|
+
* Returns new connection with union of relationships.
|
|
76
|
+
*/
|
|
77
|
+
mergeWith(others: DeploymentConnectionModel<A>[]): DeploymentConnectionModel<A>;
|
|
78
|
+
/**
|
|
79
|
+
* Merge with another connection, if it has the same source and target.
|
|
80
|
+
* Returns new connection with union of relationships.
|
|
81
|
+
*/
|
|
82
|
+
mergeWith(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
|
|
83
|
+
difference(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
|
|
84
|
+
intersect(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
|
|
85
|
+
equals(other: Connection): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Creates a clone of the current `DeploymentConnectionModel` instance with optional overrides.
|
|
88
|
+
* if `null` is provided in overrides, the corresponding relation set will be empty.
|
|
89
|
+
*/
|
|
90
|
+
update(overrides?: {
|
|
91
|
+
model?: ReadonlySet<RelationshipModel<A>> | null;
|
|
92
|
+
deployment?: ReadonlySet<DeploymentRelationModel<A>> | null;
|
|
93
|
+
}): DeploymentConnectionModel<A>;
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/model/connection/model/ConnectionModel.d.ts
|
|
97
|
+
/**
|
|
98
|
+
* Connection refers to any relationships between two elements,
|
|
99
|
+
* both direct and implicit ones (between their nested elements).
|
|
100
|
+
*
|
|
101
|
+
* Merges relationships together to an single edge on the diagram.
|
|
102
|
+
*/
|
|
103
|
+
declare class ConnectionModel<A extends Any = Unknown> implements Connection<ElementModel<A>, EdgeId> {
|
|
104
|
+
readonly source: ElementModel<A>;
|
|
105
|
+
readonly target: ElementModel<A>;
|
|
106
|
+
readonly relations: ReadonlySet<RelationshipModel<A>>;
|
|
107
|
+
readonly id: EdgeId;
|
|
108
|
+
constructor(source: ElementModel<A>, target: ElementModel<A>, relations?: ReadonlySet<RelationshipModel<A>>);
|
|
109
|
+
private _boundary;
|
|
110
|
+
/**
|
|
111
|
+
* Common ancestor of the source and target elements.
|
|
112
|
+
* Represents the boundary of the connection.
|
|
113
|
+
*/
|
|
114
|
+
get boundary(): ElementModel<A> | null;
|
|
115
|
+
/**
|
|
116
|
+
* Human readable expression of the connection
|
|
117
|
+
* Mostly used for testing and debugging
|
|
118
|
+
*/
|
|
119
|
+
get expression(): string;
|
|
120
|
+
/**
|
|
121
|
+
* Returns true if only includes relations between the source and target elements.
|
|
122
|
+
*/
|
|
123
|
+
get isDirect(): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Returns true if includes relations between nested elements of the source and target elements.
|
|
126
|
+
*/
|
|
127
|
+
get isImplicit(): boolean;
|
|
128
|
+
get directRelations(): ReadonlySet<RelationshipModel<A>>;
|
|
129
|
+
nonEmpty(): boolean;
|
|
130
|
+
mergeWith(other: ConnectionModel<A>): ConnectionModel<A>;
|
|
131
|
+
difference(other: ConnectionModel<A>): ConnectionModel<A>;
|
|
132
|
+
intersect(other: ConnectionModel<A>): ConnectionModel<A>;
|
|
133
|
+
equals(other: Connection): boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Returns a new instance with the updated relations.
|
|
136
|
+
*
|
|
137
|
+
* @param relations - A readonly set of `RelationshipModel` instances representing the new relations.
|
|
138
|
+
* @returns A new `ConnectionModel` instance with the updated relations.
|
|
139
|
+
*/
|
|
140
|
+
update(relations: ReadonlySet<RelationshipModel<A>>): ConnectionModel<A>;
|
|
141
|
+
[customInspectSymbol](_depth: any, _inspectOptions: any, _inspect: any): string;
|
|
142
|
+
toString(): string;
|
|
143
|
+
/**
|
|
144
|
+
* Creates a new connection with reversed direction (target becomes source and vice versa)
|
|
145
|
+
*/
|
|
146
|
+
reversed(): ConnectionModel<A>;
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
4
149
|
//#region src/model/connection/ops.d.ts
|
|
5
150
|
/**
|
|
6
151
|
* Check if connection is nested inside another connection
|
|
@@ -58,5 +203,86 @@ declare function isIncoming<T extends string>(target: WithId<NoInfer<T>>): (a: W
|
|
|
58
203
|
declare function isIncoming<T extends string>(a: WithSourceTarget<WithId<T>>, target: WithId<T>): boolean;
|
|
59
204
|
declare function isAnyInOut<T extends string>(source: WithId<NoInfer<T>>): (a: WithSourceTarget<WithId<T>>) => boolean;
|
|
60
205
|
declare function isAnyInOut<T extends string>(a: WithSourceTarget<WithId<T>>, source: WithId<T>): boolean;
|
|
206
|
+
declare namespace find_d_exports$1 {
|
|
207
|
+
export { findConnection$1 as findConnection, findConnectionsBetween$1 as findConnectionsBetween, findConnectionsWithin$1 as findConnectionsWithin };
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Resolve connection from source to target
|
|
211
|
+
* If direction is `both`, also look for reverse connection
|
|
212
|
+
*
|
|
213
|
+
* @default direction directed
|
|
214
|
+
*/
|
|
215
|
+
declare function findConnection$1<M extends Any>(source: DeploymentElementModel<M>, target: DeploymentElementModel<NoInfer<M>>, direction: 'directed'): readonly [DeploymentConnectionModel<M>] | readonly [];
|
|
216
|
+
declare function findConnection$1<M extends Any>(source: DeploymentElementModel<M>, target: DeploymentElementModel<NoInfer<M>>, direction: 'both'): readonly [DeploymentConnectionModel<M>, DeploymentConnectionModel<M>] | readonly [DeploymentConnectionModel<M>] | readonly [];
|
|
217
|
+
declare function findConnection$1<M extends Any>(source: DeploymentElementModel<M>, target: DeploymentElementModel<NoInfer<M>>, direction?: 'directed' | 'both'): readonly [DeploymentConnectionModel<M>, DeploymentConnectionModel<M>] | readonly [DeploymentConnectionModel<M>] | readonly [];
|
|
218
|
+
/**
|
|
219
|
+
* Resolve all connections between element and others
|
|
220
|
+
* By default, look for both directions.
|
|
221
|
+
*
|
|
222
|
+
* @default direction both
|
|
223
|
+
*/
|
|
224
|
+
declare function findConnectionsBetween$1<M extends Any>(element: DeploymentElementModel<M>, others: Iterable<DeploymentElementModel<NoInfer<M>>>, direction?: 'directed' | 'both'): readonly DeploymentConnectionModel<M>[];
|
|
225
|
+
/**
|
|
226
|
+
* Resolve all connections within a given set of elements
|
|
227
|
+
*/
|
|
228
|
+
declare function findConnectionsWithin$1<M extends Any>(elements: Iterable<DeploymentElementModel<M>>): readonly DeploymentConnectionModel<M>[];
|
|
229
|
+
declare namespace find_d_exports {
|
|
230
|
+
export { findConnection, findConnectionsBetween, findConnectionsWithin };
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Resolve connection from source to target
|
|
234
|
+
*
|
|
235
|
+
* @param direction - if 'both', also returns connection from target to source
|
|
236
|
+
* @default `directed`
|
|
237
|
+
*/
|
|
238
|
+
declare function findConnection<A extends Any>(source: ElementModel<A>, target: ElementModel<A>, direction?: 'directed' | 'both'): [ConnectionModel<A>, ConnectionModel<A>] | [ConnectionModel<A>] | [];
|
|
239
|
+
/**
|
|
240
|
+
* Resolve all connections between element and others
|
|
241
|
+
* @param direction - if 'directed', only look for outgoing connections from the element to others
|
|
242
|
+
* @default `both`
|
|
243
|
+
*/
|
|
244
|
+
declare function findConnectionsBetween<M extends Any>(element: ElementModel<M>, others: Iterable<ElementModel<M>>, direction?: 'directed' | 'both'): readonly ConnectionModel<M>[];
|
|
245
|
+
/**
|
|
246
|
+
* Resolve all connections within a given set of elements
|
|
247
|
+
*/
|
|
248
|
+
declare function findConnectionsWithin<M extends Any>(elements: Iterable<ElementModel<M>>): readonly ConnectionModel<M>[];
|
|
249
|
+
//#endregion
|
|
250
|
+
//#region src/model/guards.d.ts
|
|
251
|
+
type AnyModel<A extends Any> = DeploymentNodeModel<A> | DeployedInstanceModel<A> | DeploymentRelationModel<A> | AnyRelationshipModel<A> | NestedElementOfDeployedInstanceModel<A> | ElementModel<A> | RelationshipModel<A> | LikeC4ViewModel<A> | NodeModel<A> | EdgeModel<A>;
|
|
252
|
+
declare function isDeploymentNodeModel<M extends Any>(model: AnyModel<M>): model is DeploymentNodeModel<M>;
|
|
253
|
+
declare function isDeployedInstanceModel<M extends Any>(model: AnyModel<M>): model is DeployedInstanceModel<M>;
|
|
254
|
+
declare function isDeploymentElementModel<M extends Any>(model: AnyModel<M>): model is DeploymentElementModel<M>;
|
|
255
|
+
declare function isNestedElementOfDeployedInstanceModel<M extends Any>(model: AnyModel<M>): model is NestedElementOfDeployedInstanceModel<M>;
|
|
256
|
+
declare function isDeploymentRelationModel<M extends Any>(x: AnyModel<M>): x is DeploymentRelationModel<M>;
|
|
257
|
+
declare function isRelationModel<M extends Any>(x: AnyModel<M>): x is RelationshipModel<M>;
|
|
258
|
+
declare function isElementModel<M extends Any>(element: AnyModel<M>): element is ElementModel<M>;
|
|
259
|
+
declare function isLikeC4ViewModel<M extends Any>(view: AnyModel<M>): view is LikeC4ViewModel<M>;
|
|
260
|
+
declare function isNodeModel<M extends Any>(node: AnyModel<M>): node is NodeModel<M>;
|
|
261
|
+
declare function isEdgeModel<M extends Any>(edge: AnyModel<M>): edge is EdgeModel<M>;
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region src/model/utils/view-title-path.d.ts
|
|
264
|
+
declare const VIEW_FOLDERS_SEPARATOR = "/";
|
|
265
|
+
/**
|
|
266
|
+
* Normalizes view path by removing spaces from segments, removing empty segments,
|
|
267
|
+
* and removing leading/trailing slashes
|
|
268
|
+
* @example
|
|
269
|
+
* normalizeViewPath('One / Tw o / Thre e') === 'One/Tw o/Thre e'
|
|
270
|
+
*/
|
|
271
|
+
declare const normalizeViewPath: (title: string) => string;
|
|
272
|
+
/**
|
|
273
|
+
* Returns view group path if it is used as a path
|
|
274
|
+
* Returns empty string if it is not a path
|
|
275
|
+
* @example
|
|
276
|
+
* getViewFolderPath('One / Tw o / Thre e') === 'One/Tw o'
|
|
277
|
+
* getViewFolderPath('One') === ''
|
|
278
|
+
*/
|
|
279
|
+
declare const getViewFolderPath: (title: string) => string | null;
|
|
280
|
+
/**
|
|
281
|
+
* Returns view title if it is used as a path
|
|
282
|
+
* @example
|
|
283
|
+
* getViewTitleFromPath('One / Tw o / Thre e') === 'Thre e'
|
|
284
|
+
* getViewTitleFromPath('One') === 'One'
|
|
285
|
+
*/
|
|
286
|
+
declare const extractViewTitleFromPath: (title: string) => string;
|
|
61
287
|
//#endregion
|
|
62
|
-
export {
|
|
288
|
+
export { sortDeepestFirst as A, hasSameTarget as C, isOutgoing as D, isNestedConnection as E, DeploymentConnectionModel as M, Connection as N, mergeConnections as O, hasSameSourceTarget as S, isIncoming as T, differenceConnections as _, isDeployedInstanceModel as a, findDescendantConnections as b, isDeploymentRelationModel as c, isLikeC4ViewModel as d, isNestedElementOfDeployedInstanceModel as f, find_d_exports$1 as g, find_d_exports as h, normalizeViewPath as i, ConnectionModel as j, sortConnectionsByBoundaryHierarchy as k, isEdgeModel as l, isRelationModel as m, extractViewTitleFromPath as n, isDeploymentElementModel as o, isNodeModel as p, getViewFolderPath as r, isDeploymentNodeModel as s, VIEW_FOLDERS_SEPARATOR as t, isElementModel as u, findAscendingConnections as v, isAnyInOut as w, hasSameSource as x, findDeepestNestedConnection as y };
|