@likec4/core 1.32.2 → 1.33.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/builder/index.d.mts +6 -4
- package/dist/builder/index.mjs +45 -13
- package/dist/compute-view/index.d.mts +6 -4
- package/dist/compute-view/index.mjs +33 -10
- package/dist/compute-view/relationships-view/index.d.mts +6 -4
- package/dist/compute-view/relationships-view/index.mjs +6 -3
- package/dist/index.d.mts +9 -138
- package/dist/index.mjs +31 -3712
- package/dist/model/connection/deployment/index.d.mts +10 -0
- package/dist/model/connection/deployment/index.mjs +18 -0
- package/dist/model/connection/index.d.mts +70 -0
- package/dist/model/connection/index.mjs +23 -0
- package/dist/model/connection/model/index.d.mts +10 -0
- package/dist/model/connection/model/index.mjs +11 -0
- package/dist/model/index.d.mts +14 -256
- package/dist/model/index.mjs +27 -5
- package/dist/shared/{core.Bdz6fBF1.d.mts → core.1pNeDdRk.d.mts} +92 -81
- package/dist/shared/{core.BuO4ncfY.d.mts → core.668kXpZq.d.mts} +42 -52
- package/dist/shared/core.8KM0D6va.mjs +33 -0
- package/dist/shared/core.B0oEIXqd.mjs +47 -0
- package/dist/shared/core.BH9nN-_I.mjs +22 -0
- package/dist/shared/core.BMCb0wJI.mjs +177 -0
- package/dist/shared/core.BTnf14gD.mjs +331 -0
- package/dist/shared/core.BgvIuGGU.mjs +3 -0
- package/dist/shared/core.BoyJPEen.mjs +21 -0
- package/dist/shared/{core.CUYDgv2-.mjs → core.Br7Fab9l.mjs} +12 -15
- package/dist/shared/{core.BrCnZFTn.mjs → core.Btl47GOn.mjs} +3 -3
- package/dist/shared/core.ByrmCl9I.mjs +5 -0
- package/dist/shared/core.C80Z37Eu.mjs +29 -0
- package/dist/shared/{core.Pf5I9o0e.d.mts → core.CF82MWyh.d.mts} +1 -1
- package/dist/shared/{core.rmvsy0n3.mjs → core.C_C-3c1S.mjs} +5 -198
- package/dist/shared/core.CeQbbp7K.d.mts +41 -0
- package/dist/shared/{core.DoK86JEe.mjs → core.CpwrZi3D.mjs} +2 -73
- package/dist/shared/{core.CpXlRyE5.mjs → core.CtKXPqN_.mjs} +5 -36
- package/dist/shared/core.CxGKeL-L.mjs +144 -0
- package/dist/shared/core.CzdwsPmY.d.mts +69 -0
- package/dist/shared/{core.Cy9smucx.mjs → core.D4npX2q8.mjs} +1 -3
- package/dist/shared/core.D56nCp7e.mjs +168 -0
- package/dist/shared/core.D5qVzkws.mjs +724 -0
- package/dist/shared/core.DDAPzd3T.d.mts +87 -0
- package/dist/shared/{core.CBpKAlhj.mjs → core.DDynPqbh.mjs} +96 -56
- package/dist/shared/{core.Bk7wEZFG.mjs → core.DXRAwwDB.mjs} +3 -2
- package/dist/shared/core.DcS-0zys.mjs +10 -0
- package/dist/shared/{core.CBxTtXMi.d.mts → core.De___iBS.d.mts} +3 -2
- package/dist/shared/core.DsMrjY2q.mjs +34 -0
- package/dist/shared/core.DuSLYTG6.d.mts +57 -0
- package/dist/shared/core.Dy-F3xRP.d.mts +83 -0
- package/dist/shared/{core.DaAyklhe.d.mts → core.OLInHaJx.d.mts} +30 -22
- package/dist/shared/core.XptQjhMA.mjs +1295 -0
- package/dist/shared/{core.cbA9VZ02.mjs → core.hoq9W4rW.mjs} +28 -1073
- package/dist/shared/core.zLlww-07.mjs +3 -0
- package/dist/theme/index.d.mts +134 -0
- package/dist/theme/index.mjs +3709 -0
- package/dist/types/aux.d.mts +3 -2
- package/dist/types/index.d.mts +9 -5
- package/dist/types/index.mjs +17 -146
- package/dist/utils/index.d.mts +15 -100
- package/dist/utils/index.mjs +25 -1315
- package/dist/utils/iterable/index.d.mts +100 -0
- package/dist/utils/iterable/index.mjs +24 -0
- package/package.json +23 -7
- package/src/builder/Builder.ts +13 -4
- package/src/builder/__snapshots__/Builder-style1.spec.ts.snap +0 -13
- package/src/builder/__snapshots__/Builder-style2.compute-model.json5 +2 -6
- package/src/builder/__snapshots__/Builder-style2.spec.ts.snap +0 -7
- package/src/compute-view/deployment-view/__test__/fixture.ts +15 -5
- package/src/compute-view/deployment-view/utils.ts +13 -13
- package/src/compute-view/dynamic-view/compute.ts +2 -1
- package/src/compute-view/element-view/__test__/__snapshots__/legacy.spec.ts.snap +2 -2
- package/src/compute-view/relationships-view/layout.ts +1 -1
- package/src/compute-view/utils/applyCustomElementProperties.ts +8 -0
- package/src/compute-view/utils/applyCustomRelationProperties.ts +2 -0
- package/src/compute-view/utils/buildComputedNodes.ts +4 -3
- package/src/compute-view/utils/merge-props-from-relationships.ts +6 -5
- package/src/compute-view/utils/view-hash.ts +24 -3
- package/src/model/DeploymentElementModel.ts +20 -16
- package/src/model/ElementModel.ts +9 -3
- package/src/model/RelationModel.ts +19 -16
- package/src/model/index.ts +2 -0
- package/src/model/types.ts +1 -0
- package/src/model/view/EdgeModel.ts +4 -3
- package/src/model/view/LikeC4ViewModel.ts +5 -0
- package/src/model/view/NodeModel.ts +4 -2
- package/src/theme/index.ts +12 -5
- package/src/types/RichText.ts +200 -0
- package/src/types/index.ts +2 -0
- package/src/types/model-deployment.ts +4 -3
- package/src/types/model-logical.ts +3 -3
- package/src/types/scalar.ts +47 -2
- package/src/types/view-common.ts +1 -1
- package/src/types/view-computed.ts +2 -4
- package/src/types/view-layouted.ts +9 -0
- package/src/utils/index.ts +4 -9
- package/src/utils/markdown/index.ts +2 -0
- package/src/utils/markdown/to-html.ts +32 -0
- package/src/utils/markdown/to-text.ts +14 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { C as Connection } from '../../../shared/core.CeQbbp7K.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.DDAPzd3T.mjs';
|
|
3
|
+
import '../../../shared/core.OLInHaJx.mjs';
|
|
4
|
+
import '../../../shared/core.De___iBS.mjs';
|
|
5
|
+
import 'type-fest';
|
|
6
|
+
import '../../../shared/core.DuSLYTG6.mjs';
|
|
7
|
+
import '../../../shared/core.668kXpZq.mjs';
|
|
8
|
+
import '../../../shared/core.CywrQs86.mjs';
|
|
9
|
+
import '../../../shared/core.1pNeDdRk.mjs';
|
|
10
|
+
import '../../../shared/core.CzdwsPmY.mjs';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { C as Connection } from '../../../shared/core.C80Z37Eu.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, f as findConnection, a as findConnectionsBetween, b as findConnectionsWithin } from '../../../shared/core.D5qVzkws.mjs';
|
|
3
|
+
import '../../../shared/core.C_C-3c1S.mjs';
|
|
4
|
+
import '../../../shared/core.zLlww-07.mjs';
|
|
5
|
+
import '../../../shared/core.CpwrZi3D.mjs';
|
|
6
|
+
import '../../../shared/core.DbRvwARP.mjs';
|
|
7
|
+
import '../../../shared/core.D4npX2q8.mjs';
|
|
8
|
+
import '../../../shared/core.D56nCp7e.mjs';
|
|
9
|
+
import '../../../shared/core.B0oEIXqd.mjs';
|
|
10
|
+
import 'rehype-raw';
|
|
11
|
+
import 'rehype-sanitize';
|
|
12
|
+
import 'rehype-stringify';
|
|
13
|
+
import 'remark-gfm';
|
|
14
|
+
import 'remark-parse';
|
|
15
|
+
import 'remark-rehype';
|
|
16
|
+
import 'unified';
|
|
17
|
+
import 'mdast-util-from-markdown';
|
|
18
|
+
import 'mdast-util-to-string';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { C as Connection } from '../../shared/core.CeQbbp7K.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, f as deployment } from '../../shared/core.DDAPzd3T.mjs';
|
|
3
|
+
export { C as ConnectionModel, f as model } from '../../shared/core.Dy-F3xRP.mjs';
|
|
4
|
+
import { I as IterableContainer, R as ReorderedArray } from '../../shared/core.CF82MWyh.mjs';
|
|
5
|
+
import '../../shared/core.OLInHaJx.mjs';
|
|
6
|
+
import '../../shared/core.De___iBS.mjs';
|
|
7
|
+
import 'type-fest';
|
|
8
|
+
import '../../shared/core.DuSLYTG6.mjs';
|
|
9
|
+
import '../../shared/core.668kXpZq.mjs';
|
|
10
|
+
import '../../shared/core.CywrQs86.mjs';
|
|
11
|
+
import '../../shared/core.1pNeDdRk.mjs';
|
|
12
|
+
import '../../shared/core.CzdwsPmY.mjs';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Check if connection is nested inside another connection
|
|
16
|
+
* (i.e. between descendants)
|
|
17
|
+
*/
|
|
18
|
+
declare function isNestedConnection<T extends {
|
|
19
|
+
id: string;
|
|
20
|
+
}>(parent: WithSourceTarget<NoInfer<T>>): (nested: WithSourceTarget<T>) => boolean;
|
|
21
|
+
declare function isNestedConnection<T extends {
|
|
22
|
+
id: string;
|
|
23
|
+
}>(nested: WithSourceTarget<T>, parent: WithSourceTarget<T>): boolean;
|
|
24
|
+
type ConnectionElemId = Connection<{
|
|
25
|
+
readonly id: string;
|
|
26
|
+
}, any>;
|
|
27
|
+
declare function findDeepestNestedConnection<C extends ConnectionElemId>(connections: ReadonlyArray<C>, connection: C): C | null;
|
|
28
|
+
declare function sortDeepestFirst<C extends ConnectionElemId>(connections: ReadonlyArray<C>): C[];
|
|
29
|
+
type WithBoundary = {
|
|
30
|
+
boundary: null | {
|
|
31
|
+
id: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
declare function sortConnectionsByBoundaryHierarchy(sort?: 'asc' | 'desc'): <T extends WithBoundary, A extends IterableContainer<T>>(array: A) => ReorderedArray<A>;
|
|
35
|
+
declare function sortConnectionsByBoundaryHierarchy<T extends WithBoundary, A extends IterableContainer<T>>(array: A, sort?: 'asc' | 'desc'): ReorderedArray<A>;
|
|
36
|
+
/**
|
|
37
|
+
* Find connections that includes given connection (i.e between it's ancestors)
|
|
38
|
+
*/
|
|
39
|
+
declare function findAscendingConnections<C extends ConnectionElemId>(connections: ReadonlyArray<C>, connection: C): Array<C>;
|
|
40
|
+
/**
|
|
41
|
+
* Find connections that includes given connection (i.e between it's descendants)
|
|
42
|
+
*/
|
|
43
|
+
declare function findDescendantConnections<C extends ConnectionElemId>(connections: ReadonlyArray<C>, connection: C): Array<C>;
|
|
44
|
+
declare function mergeConnections<C extends IterableContainer<Connection<any, any>>>(connections: C): Array<C[number]>;
|
|
45
|
+
/**
|
|
46
|
+
* Excludes the values existing in `other` array.
|
|
47
|
+
* The output maintains the same order as the input.
|
|
48
|
+
*/
|
|
49
|
+
declare function differenceConnections<C extends Connection<any, any>>(source: Iterable<C>, exclude: Iterable<C>): C[];
|
|
50
|
+
type WithSourceTarget<T = unknown> = {
|
|
51
|
+
source: T;
|
|
52
|
+
target: T;
|
|
53
|
+
};
|
|
54
|
+
declare function hasSameSourceTarget<T>(a: WithSourceTarget<NoInfer<T>>): (b: WithSourceTarget<T>) => boolean;
|
|
55
|
+
declare function hasSameSourceTarget<T>(a: WithSourceTarget<T>, b: WithSourceTarget<T>): boolean;
|
|
56
|
+
declare function hasSameSource<T>(a: WithSourceTarget<NoInfer<T>>): (b: WithSourceTarget<T>) => boolean;
|
|
57
|
+
declare function hasSameSource<T>(a: WithSourceTarget<T>, b: WithSourceTarget<T>): boolean;
|
|
58
|
+
declare function hasSameTarget<T>(a: WithSourceTarget<NoInfer<T>>): (b: WithSourceTarget<T>) => boolean;
|
|
59
|
+
declare function hasSameTarget<T>(a: WithSourceTarget<T>, b: WithSourceTarget<T>): boolean;
|
|
60
|
+
type WithId<T> = {
|
|
61
|
+
id: T;
|
|
62
|
+
};
|
|
63
|
+
declare function isOutgoing<T extends string>(source: WithId<NoInfer<T>>): (a: WithSourceTarget<WithId<T>>) => boolean;
|
|
64
|
+
declare function isOutgoing<T extends string>(a: WithSourceTarget<WithId<T>>, source: WithId<T>): boolean;
|
|
65
|
+
declare function isIncoming<T extends string>(target: WithId<NoInfer<T>>): (a: WithSourceTarget<WithId<T>>) => boolean;
|
|
66
|
+
declare function isIncoming<T extends string>(a: WithSourceTarget<WithId<T>>, target: WithId<T>): boolean;
|
|
67
|
+
declare function isAnyInOut<T extends string>(source: WithId<NoInfer<T>>): (a: WithSourceTarget<WithId<T>>) => boolean;
|
|
68
|
+
declare function isAnyInOut<T extends string>(a: WithSourceTarget<WithId<T>>, source: WithId<T>): boolean;
|
|
69
|
+
|
|
70
|
+
export { Connection, differenceConnections, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isIncoming, isNestedConnection, isOutgoing, mergeConnections, sortConnectionsByBoundaryHierarchy, sortDeepestFirst };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { C as Connection } from '../../shared/core.C80Z37Eu.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, d as deployment } from '../../shared/core.D5qVzkws.mjs';
|
|
3
|
+
export { C as ConnectionModel, d as differenceConnections, f as findAscendingConnections, a as findDeepestNestedConnection, b as findDescendantConnections, h as hasSameSource, c as hasSameSourceTarget, e as hasSameTarget, i as isAnyInOut, g as isIncoming, j as isNestedConnection, k as isOutgoing, m as mergeConnections, n as model, s as sortConnectionsByBoundaryHierarchy, l as sortDeepestFirst } from '../../shared/core.BTnf14gD.mjs';
|
|
4
|
+
import '../../shared/core.C_C-3c1S.mjs';
|
|
5
|
+
import '../../shared/core.zLlww-07.mjs';
|
|
6
|
+
import '../../shared/core.CpwrZi3D.mjs';
|
|
7
|
+
import '../../shared/core.DbRvwARP.mjs';
|
|
8
|
+
import '../../shared/core.D4npX2q8.mjs';
|
|
9
|
+
import '../../shared/core.D56nCp7e.mjs';
|
|
10
|
+
import '../../shared/core.B0oEIXqd.mjs';
|
|
11
|
+
import 'rehype-raw';
|
|
12
|
+
import 'rehype-sanitize';
|
|
13
|
+
import 'rehype-stringify';
|
|
14
|
+
import 'remark-gfm';
|
|
15
|
+
import 'remark-parse';
|
|
16
|
+
import 'remark-rehype';
|
|
17
|
+
import 'unified';
|
|
18
|
+
import 'mdast-util-from-markdown';
|
|
19
|
+
import 'mdast-util-to-string';
|
|
20
|
+
import '../../shared/core.BgvIuGGU.mjs';
|
|
21
|
+
import '../../shared/core.ByrmCl9I.mjs';
|
|
22
|
+
import '../../shared/core.BoyJPEen.mjs';
|
|
23
|
+
import '../../shared/core.BH9nN-_I.mjs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { C as Connection } from '../../../shared/core.CeQbbp7K.mjs';
|
|
2
|
+
export { C as ConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.Dy-F3xRP.mjs';
|
|
3
|
+
import '../../../shared/core.OLInHaJx.mjs';
|
|
4
|
+
import '../../../shared/core.De___iBS.mjs';
|
|
5
|
+
import 'type-fest';
|
|
6
|
+
import '../../../shared/core.DuSLYTG6.mjs';
|
|
7
|
+
import '../../../shared/core.668kXpZq.mjs';
|
|
8
|
+
import '../../../shared/core.CywrQs86.mjs';
|
|
9
|
+
import '../../../shared/core.1pNeDdRk.mjs';
|
|
10
|
+
import '../../../shared/core.CzdwsPmY.mjs';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { C as Connection } from '../../../shared/core.C80Z37Eu.mjs';
|
|
2
|
+
export { C as ConnectionModel, q as findConnection, o as findConnectionsBetween, r as findConnectionsWithin } from '../../../shared/core.BTnf14gD.mjs';
|
|
3
|
+
import '../../../shared/core.C_C-3c1S.mjs';
|
|
4
|
+
import '../../../shared/core.zLlww-07.mjs';
|
|
5
|
+
import '../../../shared/core.BgvIuGGU.mjs';
|
|
6
|
+
import '../../../shared/core.CpwrZi3D.mjs';
|
|
7
|
+
import '../../../shared/core.DbRvwARP.mjs';
|
|
8
|
+
import '../../../shared/core.D4npX2q8.mjs';
|
|
9
|
+
import '../../../shared/core.ByrmCl9I.mjs';
|
|
10
|
+
import '../../../shared/core.BoyJPEen.mjs';
|
|
11
|
+
import '../../../shared/core.BH9nN-_I.mjs';
|
package/dist/model/index.d.mts
CHANGED
|
@@ -1,260 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { A as Any
|
|
4
|
-
export { b as Aux, S as SpecAux, a as aux } from '../shared/core.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {
|
|
1
|
+
import { D as DeploymentNodeModel, a as DeployedInstanceModel, b as DeploymentRelationModel, A as AnyRelationshipModel, N as NestedElementOfDeployedInstanceModel, E as ElementModel, R as RelationshipModel, L as LikeC4ViewModel, c as NodeModel, d as EdgeModel, e as DeploymentElementModel } from '../shared/core.OLInHaJx.mjs';
|
|
2
|
+
export { f as AnyLikeC4Model, k as DeploymentOrFqn, h as DeploymentRelationEndpoint, l as EdgeOrId, m as ElementOrFqn, I as IncomingFilter, j as LikeC4DeploymentModel, g as LikeC4Model, n as NodeOrId, O as OutgoingFilter, i as RelationshipsAccum, W as WithMetadata, o as WithTags } from '../shared/core.OLInHaJx.mjs';
|
|
3
|
+
import { A as Any } from '../shared/core.De___iBS.mjs';
|
|
4
|
+
export { b as Aux, S as SpecAux, a as aux } from '../shared/core.De___iBS.mjs';
|
|
5
|
+
export { C as Connection } from '../shared/core.CeQbbp7K.mjs';
|
|
6
|
+
export { C as ConnectionModel, f as modelConnection } from '../shared/core.Dy-F3xRP.mjs';
|
|
7
|
+
export { D as DeploymentConnectionModel, f as deploymentConnection } from '../shared/core.DDAPzd3T.mjs';
|
|
8
|
+
export { differenceConnections, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isIncoming, isNestedConnection, isOutgoing, mergeConnections, sortConnectionsByBoundaryHierarchy, sortDeepestFirst } from './connection/index.mjs';
|
|
9
|
+
export { z as AuxFromDump, A as AuxFromLikeC4ModelData, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty } from '../shared/core.1pNeDdRk.mjs';
|
|
8
10
|
import '../shared/core.CywrQs86.mjs';
|
|
9
11
|
import 'type-fest';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
readonly target: Elem;
|
|
15
|
-
/**
|
|
16
|
-
* Common ancestor of the source and target elements.
|
|
17
|
-
* Represents the boundary of the connection.
|
|
18
|
-
*/
|
|
19
|
-
readonly boundary: Elem | null;
|
|
20
|
-
/**
|
|
21
|
-
* Human readable expression of the connection
|
|
22
|
-
* Mostly used for testing and debugging
|
|
23
|
-
*/
|
|
24
|
-
readonly expression: string;
|
|
25
|
-
mergeWith(this: Connection<Elem, Id>, other: typeof this): typeof this;
|
|
26
|
-
nonEmpty(): boolean;
|
|
27
|
-
difference(this: Connection<Elem, Id>, other: typeof this): typeof this;
|
|
28
|
-
intersect(this: Connection<Elem, Id>, other: typeof this): typeof this;
|
|
29
|
-
equals(other: Connection): boolean;
|
|
30
|
-
}
|
|
31
|
-
declare namespace Connection {
|
|
32
|
-
type ConnectionPredicate = <C extends Connection<{
|
|
33
|
-
id: string;
|
|
34
|
-
}, any>>(connection: C) => boolean;
|
|
35
|
-
type ElementId = Fqn | string;
|
|
36
|
-
export const isInside: (fqn: ElementId) => ConnectionPredicate;
|
|
37
|
-
export const isDirectedBetween: (source: ElementId, target: ElementId) => ConnectionPredicate;
|
|
38
|
-
export const isAnyBetween: (source: ElementId, target: ElementId) => ConnectionPredicate;
|
|
39
|
-
export const isIncoming: (target: ElementId) => ConnectionPredicate;
|
|
40
|
-
export const isOutgoing: (source: ElementId) => ConnectionPredicate;
|
|
41
|
-
export const isAnyInOut: (source: ElementId) => ConnectionPredicate;
|
|
42
|
-
export { };
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
declare const customInspectSymbol: unique symbol;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Connection is ephemeral entity, result of a resolving relationships between source and target.
|
|
49
|
-
* Includes direct relationships and/or between their nested elements.
|
|
50
|
-
*/
|
|
51
|
-
declare class DeploymentConnectionModel<A extends Any = Any> implements Connection<DeploymentElementModel<A>, EdgeId> {
|
|
52
|
-
readonly source: DeploymentElementModel<A>;
|
|
53
|
-
readonly target: DeploymentElementModel<A>;
|
|
54
|
-
readonly relations: RelationshipsAccum<A>;
|
|
55
|
-
readonly id: EdgeId;
|
|
56
|
-
constructor(source: DeploymentElementModel<A>, target: DeploymentElementModel<A>, relations: RelationshipsAccum<A>);
|
|
57
|
-
/**
|
|
58
|
-
* Human readable expression of the connection
|
|
59
|
-
* Mostly used for testing and debugging
|
|
60
|
-
*/
|
|
61
|
-
get expression(): string;
|
|
62
|
-
private _boundary;
|
|
63
|
-
/**
|
|
64
|
-
* Common ancestor of the source and target elements.
|
|
65
|
-
* Represents the boundary of the connection.
|
|
66
|
-
*/
|
|
67
|
-
get boundary(): DeploymentNodeModel<A> | null;
|
|
68
|
-
nonEmpty(): boolean;
|
|
69
|
-
[customInspectSymbol](depth: any, inspectOptions: any, inspect: any): string;
|
|
70
|
-
toString(): string;
|
|
71
|
-
/**
|
|
72
|
-
* Check if connection contains deployment relation,
|
|
73
|
-
* that is directly connected to source or target.
|
|
74
|
-
*/
|
|
75
|
-
hasDirectDeploymentRelation(): boolean;
|
|
76
|
-
values(): IteratorLike<RelationshipModel<A> | DeploymentRelationModel<A>>;
|
|
77
|
-
/**
|
|
78
|
-
* Merge with another connections, if it has the same source and target.
|
|
79
|
-
* Returns new connection with union of relationships.
|
|
80
|
-
*/
|
|
81
|
-
mergeWith(others: DeploymentConnectionModel<A>[]): DeploymentConnectionModel<A>;
|
|
82
|
-
/**
|
|
83
|
-
* Merge with another connection, if it has the same source and target.
|
|
84
|
-
* Returns new connection with union of relationships.
|
|
85
|
-
*/
|
|
86
|
-
mergeWith(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
|
|
87
|
-
difference(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
|
|
88
|
-
intersect(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
|
|
89
|
-
equals(other: Connection): boolean;
|
|
90
|
-
/**
|
|
91
|
-
* Creates a clone of the current `DeploymentConnectionModel` instance with optional overrides.
|
|
92
|
-
* if `null` is provided in overrides, the corresponding relation set will be empty.
|
|
93
|
-
*/
|
|
94
|
-
update(overrides?: {
|
|
95
|
-
model?: ReadonlySet<RelationshipModel<A>> | null;
|
|
96
|
-
deployment?: ReadonlySet<DeploymentRelationModel<A>> | null;
|
|
97
|
-
}): DeploymentConnectionModel<A>;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Connection refers to any relationships between two elements,
|
|
102
|
-
* both direct and implicit ones (between their nested elements).
|
|
103
|
-
*
|
|
104
|
-
* Merges relationships together to an single edge on the diagram.
|
|
105
|
-
*/
|
|
106
|
-
declare class ConnectionModel<A extends Any = Unknown> implements Connection<ElementModel<A>, EdgeId> {
|
|
107
|
-
readonly source: ElementModel<A>;
|
|
108
|
-
readonly target: ElementModel<A>;
|
|
109
|
-
readonly relations: ReadonlySet<RelationshipModel<A>>;
|
|
110
|
-
readonly id: EdgeId;
|
|
111
|
-
constructor(source: ElementModel<A>, target: ElementModel<A>, relations?: ReadonlySet<RelationshipModel<A>>);
|
|
112
|
-
private _boundary;
|
|
113
|
-
/**
|
|
114
|
-
* Common ancestor of the source and target elements.
|
|
115
|
-
* Represents the boundary of the connection.
|
|
116
|
-
*/
|
|
117
|
-
get boundary(): ElementModel<A> | null;
|
|
118
|
-
/**
|
|
119
|
-
* Human readable expression of the connection
|
|
120
|
-
* Mostly used for testing and debugging
|
|
121
|
-
*/
|
|
122
|
-
get expression(): string;
|
|
123
|
-
/**
|
|
124
|
-
* Returns true if only includes relations between the source and target elements.
|
|
125
|
-
*/
|
|
126
|
-
get isDirect(): boolean;
|
|
127
|
-
/**
|
|
128
|
-
* Returns true if includes relations between nested elements of the source and target elements.
|
|
129
|
-
*/
|
|
130
|
-
get isImplicit(): boolean;
|
|
131
|
-
get directRelations(): ReadonlySet<RelationshipModel<A>>;
|
|
132
|
-
nonEmpty(): boolean;
|
|
133
|
-
mergeWith(other: ConnectionModel<A>): ConnectionModel<A>;
|
|
134
|
-
difference(other: ConnectionModel<A>): ConnectionModel<A>;
|
|
135
|
-
intersect(other: ConnectionModel<A>): ConnectionModel<A>;
|
|
136
|
-
equals(other: Connection): boolean;
|
|
137
|
-
/**
|
|
138
|
-
* Returns a new instance with the updated relations.
|
|
139
|
-
*
|
|
140
|
-
* @param relations - A readonly set of `RelationshipModel` instances representing the new relations.
|
|
141
|
-
* @returns A new `ConnectionModel` instance with the updated relations.
|
|
142
|
-
*/
|
|
143
|
-
update(relations: ReadonlySet<RelationshipModel<A>>): ConnectionModel<A>;
|
|
144
|
-
[customInspectSymbol](depth: any, inspectOptions: any, inspect: any): string;
|
|
145
|
-
toString(): string;
|
|
146
|
-
/**
|
|
147
|
-
* Creates a new connection with reversed direction (target becomes source and vice versa)
|
|
148
|
-
* @param search - When true, attempts to find an existing connection between the reversed nodes
|
|
149
|
-
*/
|
|
150
|
-
reversed(search?: boolean): ConnectionModel<A>;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Check if connection is nested inside another connection
|
|
155
|
-
* (i.e. between descendants)
|
|
156
|
-
*/
|
|
157
|
-
declare function isNestedConnection<T extends {
|
|
158
|
-
id: string;
|
|
159
|
-
}>(parent: WithSourceTarget<NoInfer<T>>): (nested: WithSourceTarget<T>) => boolean;
|
|
160
|
-
declare function isNestedConnection<T extends {
|
|
161
|
-
id: string;
|
|
162
|
-
}>(nested: WithSourceTarget<T>, parent: WithSourceTarget<T>): boolean;
|
|
163
|
-
type ConnectionElemId = Connection<{
|
|
164
|
-
readonly id: string;
|
|
165
|
-
}, any>;
|
|
166
|
-
declare function findDeepestNestedConnection<C extends ConnectionElemId>(connections: ReadonlyArray<C>, connection: C): C | null;
|
|
167
|
-
declare function sortDeepestFirst<C extends ConnectionElemId>(connections: ReadonlyArray<C>): C[];
|
|
168
|
-
type WithBoundary = {
|
|
169
|
-
boundary: null | {
|
|
170
|
-
id: string;
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
declare function sortConnectionsByBoundaryHierarchy(sort?: 'asc' | 'desc'): <T extends WithBoundary, A extends IterableContainer<T>>(array: A) => ReorderedArray<A>;
|
|
174
|
-
declare function sortConnectionsByBoundaryHierarchy<T extends WithBoundary, A extends IterableContainer<T>>(array: A, sort?: 'asc' | 'desc'): ReorderedArray<A>;
|
|
175
|
-
/**
|
|
176
|
-
* Find connections that includes given connection (i.e between it's ancestors)
|
|
177
|
-
*/
|
|
178
|
-
declare function findAscendingConnections<C extends ConnectionElemId>(connections: ReadonlyArray<C>, connection: C): Array<C>;
|
|
179
|
-
/**
|
|
180
|
-
* Find connections that includes given connection (i.e between it's descendants)
|
|
181
|
-
*/
|
|
182
|
-
declare function findDescendantConnections<C extends ConnectionElemId>(connections: ReadonlyArray<C>, connection: C): Array<C>;
|
|
183
|
-
declare function mergeConnections<C extends IterableContainer<Connection<any, any>>>(connections: C): Array<C[number]>;
|
|
184
|
-
/**
|
|
185
|
-
* Excludes the values existing in `other` array.
|
|
186
|
-
* The output maintains the same order as the input.
|
|
187
|
-
*/
|
|
188
|
-
declare function differenceConnections<C extends Connection<any, any>>(source: Iterable<C>, exclude: Iterable<C>): C[];
|
|
189
|
-
type WithSourceTarget<T = unknown> = {
|
|
190
|
-
source: T;
|
|
191
|
-
target: T;
|
|
192
|
-
};
|
|
193
|
-
declare function hasSameSourceTarget<T>(a: WithSourceTarget<NoInfer<T>>): (b: WithSourceTarget<T>) => boolean;
|
|
194
|
-
declare function hasSameSourceTarget<T>(a: WithSourceTarget<T>, b: WithSourceTarget<T>): boolean;
|
|
195
|
-
declare function hasSameSource<T>(a: WithSourceTarget<NoInfer<T>>): (b: WithSourceTarget<T>) => boolean;
|
|
196
|
-
declare function hasSameSource<T>(a: WithSourceTarget<T>, b: WithSourceTarget<T>): boolean;
|
|
197
|
-
declare function hasSameTarget<T>(a: WithSourceTarget<NoInfer<T>>): (b: WithSourceTarget<T>) => boolean;
|
|
198
|
-
declare function hasSameTarget<T>(a: WithSourceTarget<T>, b: WithSourceTarget<T>): boolean;
|
|
199
|
-
type WithId<T> = {
|
|
200
|
-
id: T;
|
|
201
|
-
};
|
|
202
|
-
declare function isOutgoing<T extends string>(source: WithId<NoInfer<T>>): (a: WithSourceTarget<WithId<T>>) => boolean;
|
|
203
|
-
declare function isOutgoing<T extends string>(a: WithSourceTarget<WithId<T>>, source: WithId<T>): boolean;
|
|
204
|
-
declare function isIncoming<T extends string>(target: WithId<NoInfer<T>>): (a: WithSourceTarget<WithId<T>>) => boolean;
|
|
205
|
-
declare function isIncoming<T extends string>(a: WithSourceTarget<WithId<T>>, target: WithId<T>): boolean;
|
|
206
|
-
declare function isAnyInOut<T extends string>(source: WithId<NoInfer<T>>): (a: WithSourceTarget<WithId<T>>) => boolean;
|
|
207
|
-
declare function isAnyInOut<T extends string>(a: WithSourceTarget<WithId<T>>, source: WithId<T>): boolean;
|
|
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
|
-
|
|
230
|
-
declare namespace find$1 {
|
|
231
|
-
export { findConnection$1 as findConnection, findConnectionsBetween$1 as findConnectionsBetween, findConnectionsWithin$1 as findConnectionsWithin };
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Resolve connection from source to target
|
|
236
|
-
*
|
|
237
|
-
* @param direction - if 'both', also returns connection from target to source
|
|
238
|
-
* @default `directed`
|
|
239
|
-
*/
|
|
240
|
-
declare function findConnection<A extends Any>(source: ElementModel<A>, target: ElementModel<A>, direction?: 'directed' | 'both'): [ConnectionModel<A>, ConnectionModel<A>] | [ConnectionModel<A>] | [];
|
|
241
|
-
/**
|
|
242
|
-
* Resolve all connections between element and others
|
|
243
|
-
* @param direction - if 'directed', only look for outgoing connections from the element to others
|
|
244
|
-
* @default `both`
|
|
245
|
-
*/
|
|
246
|
-
declare function findConnectionsBetween<M extends Any>(element: ElementModel<M>, others: Iterable<ElementModel<M>>, direction?: 'directed' | 'both'): readonly ConnectionModel<M>[];
|
|
247
|
-
/**
|
|
248
|
-
* Resolve all connections within a given set of elements
|
|
249
|
-
*/
|
|
250
|
-
declare function findConnectionsWithin<M extends Any>(elements: Iterable<ElementModel<M>>): readonly ConnectionModel<M>[];
|
|
251
|
-
|
|
252
|
-
declare const find_findConnection: typeof findConnection;
|
|
253
|
-
declare const find_findConnectionsBetween: typeof findConnectionsBetween;
|
|
254
|
-
declare const find_findConnectionsWithin: typeof findConnectionsWithin;
|
|
255
|
-
declare namespace find {
|
|
256
|
-
export { find_findConnection as findConnection, find_findConnectionsBetween as findConnectionsBetween, find_findConnectionsWithin as findConnectionsWithin };
|
|
257
|
-
}
|
|
12
|
+
import '../shared/core.668kXpZq.mjs';
|
|
13
|
+
import '../shared/core.DuSLYTG6.mjs';
|
|
14
|
+
import '../shared/core.CzdwsPmY.mjs';
|
|
15
|
+
import '../shared/core.CF82MWyh.mjs';
|
|
258
16
|
|
|
259
17
|
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>;
|
|
260
18
|
declare function isDeploymentNodeModel<M extends Any>(model: AnyModel<M>): model is DeploymentNodeModel<M>;
|
|
@@ -269,4 +27,4 @@ declare function isLikeC4ViewModel<M extends Any>(view: AnyModel<M>): view is Li
|
|
|
269
27
|
declare function isNodeModel<M extends Any>(node: AnyModel<M>): node is NodeModel<M>;
|
|
270
28
|
declare function isEdgeModel<M extends Any>(edge: AnyModel<M>): edge is EdgeModel<M>;
|
|
271
29
|
|
|
272
|
-
export { Any, Any as AnyAux,
|
|
30
|
+
export { Any, Any as AnyAux, DeployedInstanceModel, DeploymentElementModel, DeploymentNodeModel, DeploymentRelationModel, EdgeModel, ElementModel, LikeC4ViewModel, NodeModel, RelationshipModel, isDeployedInstanceModel, isDeploymentElementModel, isDeploymentNodeModel, isDeploymentRelationModel, isEdgeModel, isElementModel, isLikeC4ViewModel, isRelationModel as isModelRelation, isNestedElementOfDeployedInstanceModel, isNodeModel, isRelationModel, isRelationModel as isRelationshipModel };
|
package/dist/model/index.mjs
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export { b as EdgeModel, E as ElementModel, a as LikeC4DeploymentModel, L as LikeC4Model, c as LikeC4ViewModel, N as NodeModel, R as RelationshipModel, d as isDeployedInstanceModel, e as isDeploymentElementModel, i as isDeploymentNodeModel, g as isDeploymentRelationModel, m as isEdgeModel, j as isElementModel, k as isLikeC4ViewModel, h as isModelRelation, f as isNestedElementOfDeployedInstanceModel, l as isNodeModel, h as isRelationModel, h as isRelationshipModel } from '../shared/core.hoq9W4rW.mjs';
|
|
2
|
+
export { c as DeployedInstanceModel, D as DeploymentConnectionModel, e as DeploymentNodeModel, g as DeploymentRelationModel, R as RelationshipsAccum, d as deploymentConnection } from '../shared/core.D5qVzkws.mjs';
|
|
3
|
+
export { C as Connection } from '../shared/core.C80Z37Eu.mjs';
|
|
4
|
+
export { C as ConnectionModel, d as differenceConnections, f as findAscendingConnections, a as findDeepestNestedConnection, b as findDescendantConnections, h as hasSameSource, c as hasSameSourceTarget, e as hasSameTarget, i as isAnyInOut, g as isIncoming, j as isNestedConnection, k as isOutgoing, m as mergeConnections, n as modelConnection, s as sortConnectionsByBoundaryHierarchy, l as sortDeepestFirst } from '../shared/core.BTnf14gD.mjs';
|
|
5
|
+
export { R as RichText } from '../shared/core.D56nCp7e.mjs';
|
|
5
6
|
import '../shared/core.DbRvwARP.mjs';
|
|
6
|
-
import '../shared/core.
|
|
7
|
+
import '../shared/core.ByrmCl9I.mjs';
|
|
8
|
+
import '../shared/core.C_C-3c1S.mjs';
|
|
9
|
+
import '../shared/core.zLlww-07.mjs';
|
|
10
|
+
import '../shared/core.DcS-0zys.mjs';
|
|
11
|
+
import '../shared/core.BMCb0wJI.mjs';
|
|
12
|
+
import '../shared/core.D4npX2q8.mjs';
|
|
13
|
+
import '../shared/core.Br7Fab9l.mjs';
|
|
14
|
+
import '../shared/core.BgvIuGGU.mjs';
|
|
15
|
+
import '../shared/core.B0oEIXqd.mjs';
|
|
16
|
+
import 'rehype-raw';
|
|
17
|
+
import 'rehype-sanitize';
|
|
18
|
+
import 'rehype-stringify';
|
|
19
|
+
import 'remark-gfm';
|
|
20
|
+
import 'remark-parse';
|
|
21
|
+
import 'remark-rehype';
|
|
22
|
+
import 'unified';
|
|
23
|
+
import 'mdast-util-from-markdown';
|
|
24
|
+
import 'mdast-util-to-string';
|
|
25
|
+
import '../shared/core.BH9nN-_I.mjs';
|
|
26
|
+
import '../shared/core.DsMrjY2q.mjs';
|
|
27
|
+
import '../shared/core.CpwrZi3D.mjs';
|
|
28
|
+
import '../shared/core.BoyJPEen.mjs';
|