@likec4/core 1.37.0 → 1.38.1
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/README.md +2 -2
- package/dist/builder/index.d.mts +1 -1
- package/dist/builder/index.mjs +8 -8
- package/dist/compute-view/index.d.mts +1 -1
- package/dist/compute-view/index.mjs +9 -9
- package/dist/compute-view/relationships-view/index.d.mts +1 -1
- package/dist/compute-view/relationships-view/index.mjs +2 -2
- package/dist/index.mjs +4 -4
- package/dist/model/connection/deployment/index.d.mts +3 -3
- package/dist/model/connection/deployment/index.mjs +3 -3
- package/dist/model/connection/index.d.mts +4 -4
- package/dist/model/connection/index.mjs +4 -4
- package/dist/model/connection/model/index.d.mts +3 -3
- package/dist/model/connection/model/index.mjs +3 -3
- package/dist/model/index.d.mts +5 -5
- package/dist/model/index.mjs +6 -6
- package/dist/shared/{core.C1GV0WWV.mjs → core.BH0VqY-7.mjs} +1 -1
- package/dist/shared/{core.DYufusLE.d.mts → core.Bf5zKDK1.d.mts} +1 -1
- package/dist/shared/{core.HUONfQfd.mjs → core.Bp-IQmJR.mjs} +1 -1
- package/dist/shared/{core.rk17MdPp.d.mts → core.BvlHvikl.d.mts} +2 -1
- package/dist/shared/{core.Y3j3s-oq.mjs → core.C4Cn4Jy_.mjs} +2 -2
- package/dist/shared/{core.n8wh5WZA.mjs → core.CzHQRs5x.mjs} +6 -6
- package/dist/shared/{core.DX4dbV2w.mjs → core.DC6zzxS0.mjs} +5 -2
- package/dist/shared/{core.yaRvRnMW.mjs → core.DDoAFHHp.mjs} +1 -1
- package/dist/shared/{core.BTw4y86Y.d.mts → core.DhDo8LAz.d.mts} +2 -2
- package/dist/shared/{core.b2BzqGz0.mjs → core.Dhc0yIwT.mjs} +2 -2
- package/dist/shared/{core.CLQVFRsf.d.mts → core.Dtw1SBlz.d.mts} +2 -2
- package/dist/shared/{core.mpx5crlJ.mjs → core.Dw47t7nG.mjs} +7 -7
- package/dist/shared/{core.DQj9iv_y.mjs → core.OUoo2ohq.mjs} +3 -2
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +4 -4
- package/package.json +4 -4
- package/src/model/DeploymentElementModel.ts +5 -1
- package/src/model/view/LikeC4ViewModel.ts +2 -2
- package/src/utils/compare-natural.ts +4 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# `@likec4/core`
|
|
2
2
|
|
|
3
3
|
<a href="https://www.npmjs.com/package/%40likec4%2Fcore" target="_blank"></a>
|
|
4
|
-
<a href="https://www.npmjs.com/package/%40likec4%2Fcore" target="_blank"></a>
|
|
5
5
|
|
|
6
6
|
A core package for LikeC4, containing types, api, utilities and guards.
|
|
7
7
|
|
|
@@ -157,8 +157,8 @@ Generic guards are also available in `@likec4/core/model`:
|
|
|
157
157
|
|
|
158
158
|
```ts
|
|
159
159
|
import {
|
|
160
|
-
isElementModel,
|
|
161
160
|
isDeployedInstanceModel,
|
|
161
|
+
isElementModel,
|
|
162
162
|
isLikeC4ViewModel,
|
|
163
163
|
// ... other guards
|
|
164
164
|
} from '@likec4/core/model'
|
package/dist/builder/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LastArrayElement, Split, Simplify, IsLiteral, Writable, IfNever, IsNever, TupleToUnion, Tagged } from 'type-fest';
|
|
2
|
-
import { g as LikeC4Model } from '../shared/core.
|
|
2
|
+
import { g as LikeC4Model } from '../shared/core.BvlHvikl.mjs';
|
|
3
3
|
import { D as DeploymentFqn, F as Fqn } from '../shared/core.DX-WYEPA.mjs';
|
|
4
4
|
import { r as DeploymentElement, v as DeploymentRelationship, T as Element, _ as ModelRelation, a9 as Participant, M as ModelFqnExpr, d as ModelRelationExpr, aH as AnyViewRuleStyle, aM as AutoLayoutDirection, E as Expression, an as ParsedView, bb as ParsedDeploymentView, br as ParsedElementView, n as ParsedLikeC4ModelData, $ as ElementSpecification$1, a2 as RelationshipSpecification, a0 as TagSpecification } from '../shared/core.CE_hG7EJ.mjs';
|
|
5
5
|
import { N as NonEmptyArray, K as KeysOf } from '../shared/core.DuSLYTG6.mjs';
|
package/dist/builder/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { i, l, d, c as computeLikeC4Model } from '../shared/core.
|
|
1
|
+
import { i, l, d, c as computeLikeC4Model } from '../shared/core.Dw47t7nG.mjs';
|
|
2
2
|
import { m } from '../shared/core.ByrmCl9I.mjs';
|
|
3
3
|
import { a as _type, n as n$1, _ as _stage, c as isDeployedInstance, F as FqnRef } from '../shared/core.DK6I-Nr7.mjs';
|
|
4
4
|
import { t as t$2 } from '../shared/core.BH9nN-_I.mjs';
|
|
5
5
|
import { l as l$1 } from '../shared/core.8KM0D6va.mjs';
|
|
6
6
|
import { u } from '../shared/core.DbRvwARP.mjs';
|
|
7
|
-
import { t as t$1 } from '../shared/core.
|
|
7
|
+
import { t as t$1 } from '../shared/core.CzHQRs5x.mjs';
|
|
8
8
|
import { i as i$1 } from '../shared/core.CpwrZi3D.mjs';
|
|
9
|
-
import { n as nameFromFqn, k as isSameHierarchy, p as parentFqn } from '../shared/core.
|
|
9
|
+
import { n as nameFromFqn, k as isSameHierarchy, p as parentFqn } from '../shared/core.OUoo2ohq.mjs';
|
|
10
10
|
import { t } from '../shared/core.zLlww-07.mjs';
|
|
11
11
|
import { s as o, M as ModelFqnExpr, f as isElementView } from '../shared/core.BW8K1y6R.mjs';
|
|
12
12
|
import { i as invariant } from '../shared/core.D4npX2q8.mjs';
|
|
13
13
|
import { a as DefaultElementShape, D as DefaultThemeColor } from '../shared/core.H8NbNp2X.mjs';
|
|
14
|
-
import '../shared/core.
|
|
15
|
-
import '../shared/core.
|
|
14
|
+
import '../shared/core.DC6zzxS0.mjs';
|
|
15
|
+
import '../shared/core.BH0VqY-7.mjs';
|
|
16
16
|
import '../shared/core.CnIyafWn.mjs';
|
|
17
17
|
import '../shared/core.B0oEIXqd.mjs';
|
|
18
18
|
import 'rehype-raw';
|
|
@@ -24,14 +24,14 @@ import 'remark-rehype';
|
|
|
24
24
|
import 'unified';
|
|
25
25
|
import 'mdast-util-from-markdown';
|
|
26
26
|
import 'mdast-util-to-string';
|
|
27
|
-
import '../shared/core.
|
|
27
|
+
import '../shared/core.C4Cn4Jy_.mjs';
|
|
28
28
|
import '../shared/core.BgvIuGGU.mjs';
|
|
29
29
|
import '../shared/core.BoyJPEen.mjs';
|
|
30
|
-
import '../shared/core.
|
|
30
|
+
import '../shared/core.Bp-IQmJR.mjs';
|
|
31
31
|
import '../shared/core.BL_xjl90.mjs';
|
|
32
32
|
import '../shared/core.BpJu1RrF.mjs';
|
|
33
33
|
import '../shared/core.Btl47GOn.mjs';
|
|
34
|
-
import '../shared/core.
|
|
34
|
+
import '../shared/core.DDoAFHHp.mjs';
|
|
35
35
|
import '../shared/core.DcS-0zys.mjs';
|
|
36
36
|
import '../shared/core.DsMrjY2q.mjs';
|
|
37
37
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as Any } from '../shared/core.O6FG0HF9.mjs';
|
|
2
|
-
import { g as LikeC4Model } from '../shared/core.
|
|
2
|
+
import { g as LikeC4Model } from '../shared/core.BvlHvikl.mjs';
|
|
3
3
|
import { n as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, an as ParsedView, aq as ComputedView } from '../shared/core.CE_hG7EJ.mjs';
|
|
4
4
|
import 'type-fest';
|
|
5
5
|
import '../shared/core.DuSLYTG6.mjs';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { G as Graph, w as willCreateCycle, t as topologicalSortExports, i as i$2, l } from '../shared/core.
|
|
2
|
-
export { c as computeLikeC4Model, a as computeParsedModelData, b as computeView, u as unsafeComputeView } from '../shared/core.
|
|
3
|
-
import { i as i$1 } from '../shared/core.
|
|
4
|
-
import { r } from '../shared/core.
|
|
1
|
+
import { G as Graph, w as willCreateCycle, t as topologicalSortExports, i as i$2, l } from '../shared/core.Dw47t7nG.mjs';
|
|
2
|
+
export { c as computeLikeC4Model, a as computeParsedModelData, b as computeView, u as unsafeComputeView } from '../shared/core.Dw47t7nG.mjs';
|
|
3
|
+
import { i as i$1 } from '../shared/core.DC6zzxS0.mjs';
|
|
4
|
+
import { r } from '../shared/core.CzHQRs5x.mjs';
|
|
5
5
|
import { h as isExtendsElementView, f as isElementView } from '../shared/core.BW8K1y6R.mjs';
|
|
6
|
-
import { o as isNonEmptyArray } from '../shared/core.
|
|
6
|
+
import { o as isNonEmptyArray } from '../shared/core.OUoo2ohq.mjs';
|
|
7
7
|
import { i } from '../shared/core.CpwrZi3D.mjs';
|
|
8
8
|
import { u } from '../shared/core.DbRvwARP.mjs';
|
|
9
9
|
import { m } from '../shared/core.ByrmCl9I.mjs';
|
|
10
|
-
import '../shared/core.
|
|
11
|
-
import '../shared/core.
|
|
10
|
+
import '../shared/core.C4Cn4Jy_.mjs';
|
|
11
|
+
import '../shared/core.BH0VqY-7.mjs';
|
|
12
12
|
import '../shared/core.BgvIuGGU.mjs';
|
|
13
13
|
import '../shared/core.BoyJPEen.mjs';
|
|
14
14
|
import '../shared/core.BH9nN-_I.mjs';
|
|
15
15
|
import '../shared/core.D4npX2q8.mjs';
|
|
16
|
-
import '../shared/core.
|
|
16
|
+
import '../shared/core.Bp-IQmJR.mjs';
|
|
17
17
|
import '../shared/core.8KM0D6va.mjs';
|
|
18
18
|
import '../shared/core.CnIyafWn.mjs';
|
|
19
19
|
import '../shared/core.DK6I-Nr7.mjs';
|
|
@@ -32,7 +32,7 @@ import 'mdast-util-from-markdown';
|
|
|
32
32
|
import 'mdast-util-to-string';
|
|
33
33
|
import '../shared/core.BpJu1RrF.mjs';
|
|
34
34
|
import '../shared/core.Btl47GOn.mjs';
|
|
35
|
-
import '../shared/core.
|
|
35
|
+
import '../shared/core.DDoAFHHp.mjs';
|
|
36
36
|
import '../shared/core.DcS-0zys.mjs';
|
|
37
37
|
import '../shared/core.DsMrjY2q.mjs';
|
|
38
38
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as Any, U as Unknown, g as ElementId, V as ViewId } from '../../shared/core.O6FG0HF9.mjs';
|
|
2
|
-
import { E as ElementModel, R as RelationshipModel, g as LikeC4Model } from '../../shared/core.
|
|
2
|
+
import { E as ElementModel, R as RelationshipModel, g as LikeC4Model } from '../../shared/core.BvlHvikl.mjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import '../../shared/core.DuSLYTG6.mjs';
|
|
5
5
|
import '../../shared/core.DX-WYEPA.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as sortParentsFirst, j as isDescendantOf, i as isAncestor, C } from '../../shared/core.
|
|
2
|
-
import { D as DefaultMap } from '../../shared/core.
|
|
1
|
+
import { m as sortParentsFirst, j as isDescendantOf, i as isAncestor, C } from '../../shared/core.OUoo2ohq.mjs';
|
|
2
|
+
import { D as DefaultMap } from '../../shared/core.DDoAFHHp.mjs';
|
|
3
3
|
import { a as nonNullable, i as invariant } from '../../shared/core.D4npX2q8.mjs';
|
|
4
4
|
import { a as toSet, t as toArray, i as imap } from '../../shared/core.Btl47GOn.mjs';
|
|
5
5
|
import { i as ifilter } from '../../shared/core.BH9nN-_I.mjs';
|
package/dist/index.mjs
CHANGED
|
@@ -5,11 +5,11 @@ export { f as DefaultArrowType, a as DefaultElementShape, e as DefaultLineStyle,
|
|
|
5
5
|
export { F as FqnRef, _ as _stage, a as _type, h as isAndOperator, c as isDeployedInstance, b as isDeploymentNode, e as isKindEqual, g as isNotOperator, i as isOnStage, j as isOrOperator, f as isParticipantOperator, d as isTagEqual, w as whereOperatorAsPredicate } from './shared/core.DK6I-Nr7.mjs';
|
|
6
6
|
export { E as Expression, F as FqnExpr, b as ModelExpression, M as ModelFqnExpr, a as ModelRelationExpr, R as RelationExpr, p as getParallelStepsPrefix, n as isAutoLayoutDirection, d as isComputedView, j as isDeploymentView, e as isDiagramView, k as isDynamicView, q as isDynamicViewParallelSteps, f as isElementView, h as isExtendsElementView, e as isLayoutedView, g as isScopedElementView, o as isViewRuleAutoLayout, m as isViewRuleGlobalPredicateRef, l as isViewRuleGlobalStyle, r as isViewRuleGroup, i as isViewRulePredicate, c as isViewRuleStyle } from './shared/core.BW8K1y6R.mjs';
|
|
7
7
|
export { B as BBox, a as BorderStyles, E as ElementShapes, R as RectBox, T as ThemeColors, i as isTagColorSpecified, b as isThemeColor } from './shared/core.CxGKeL-L.mjs';
|
|
8
|
-
export { b as BiMap, d as DefaultWeakMap, l as LinkedList, m as MultiMap, q as Queue, c as compareRelations, a as delay, p as promiseNextTick } from './shared/core.
|
|
9
|
-
export { D as DefaultMap } from './shared/core.
|
|
10
|
-
export { S as Stack, c as commonHead, o as objectHash } from './shared/core.
|
|
8
|
+
export { b as BiMap, d as DefaultWeakMap, l as LinkedList, m as MultiMap, q as Queue, c as compareRelations, a as delay, p as promiseNextTick } from './shared/core.Dhc0yIwT.mjs';
|
|
9
|
+
export { D as DefaultMap } from './shared/core.DDoAFHHp.mjs';
|
|
10
|
+
export { S as Stack, c as commonHead, o as objectHash } from './shared/core.Bp-IQmJR.mjs';
|
|
11
11
|
export { i as invariant, a as nonNullable, n as nonexhaustive } from './shared/core.D4npX2q8.mjs';
|
|
12
|
-
export { b as ancestorsFqn, d as commonAncestor, e as compareByFqnHierarchically, f as compareFqnHierarchically, c as compareNatural, a as compareNaturalHierarchically, h as hierarchyDistance, g as hierarchyLevel, i as isAncestor, j as isDescendantOf, o as isNonEmptyArray, k as isSameHierarchy, q as isString, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, l as sortNaturalByFqn, m as sortParentsFirst } from './shared/core.
|
|
12
|
+
export { b as ancestorsFqn, d as commonAncestor, e as compareByFqnHierarchically, f as compareFqnHierarchically, c as compareNatural, a as compareNaturalHierarchically, h as hierarchyDistance, g as hierarchyLevel, i as isAncestor, j as isDescendantOf, o as isNonEmptyArray, k as isSameHierarchy, q as isString, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, l as sortNaturalByFqn, m as sortParentsFirst } from './shared/core.OUoo2ohq.mjs';
|
|
13
13
|
export { g as getOrCreate } from './shared/core.DcS-0zys.mjs';
|
|
14
14
|
export { d as difference, e as equalsSet, i as hasAtLeast, a as intersection, b as stringHash, s as symmetricDifference, u as union } from './shared/core.CpwrZi3D.mjs';
|
|
15
15
|
export { i as ifilter } from './shared/core.BH9nN-_I.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as Connection } from '../../../shared/core.
|
|
2
|
-
export { D as DeploymentConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.
|
|
3
|
-
import '../../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../../shared/core.Bf5zKDK1.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.DhDo8LAz.mjs';
|
|
3
|
+
import '../../../shared/core.BvlHvikl.mjs';
|
|
4
4
|
import '../../../shared/core.O6FG0HF9.mjs';
|
|
5
5
|
import 'type-fest';
|
|
6
6
|
import '../../../shared/core.DuSLYTG6.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as Connection } from '../../../shared/core.
|
|
2
|
-
export { D as DeploymentConnectionModel, f as findConnection, a as findConnectionsBetween, b as findConnectionsWithin } from '../../../shared/core.
|
|
3
|
-
import '../../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../../shared/core.BH0VqY-7.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, f as findConnection, a as findConnectionsBetween, b as findConnectionsWithin } from '../../../shared/core.DC6zzxS0.mjs';
|
|
3
|
+
import '../../../shared/core.OUoo2ohq.mjs';
|
|
4
4
|
import '../../../shared/core.zLlww-07.mjs';
|
|
5
5
|
import '../../../shared/core.CpwrZi3D.mjs';
|
|
6
6
|
import '../../../shared/core.DbRvwARP.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Connection } from '../../shared/core.
|
|
2
|
-
export { D as DeploymentConnectionModel, f as deployment } from '../../shared/core.
|
|
3
|
-
export { C as ConnectionModel, f as model } from '../../shared/core.
|
|
1
|
+
import { C as Connection } from '../../shared/core.Bf5zKDK1.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, f as deployment } from '../../shared/core.DhDo8LAz.mjs';
|
|
3
|
+
export { C as ConnectionModel, f as model } from '../../shared/core.Dtw1SBlz.mjs';
|
|
4
4
|
import { I as IterableContainer, R as ReorderedArray } from '../../shared/core.wwaSalox.mjs';
|
|
5
|
-
import '../../shared/core.
|
|
5
|
+
import '../../shared/core.BvlHvikl.mjs';
|
|
6
6
|
import '../../shared/core.O6FG0HF9.mjs';
|
|
7
7
|
import 'type-fest';
|
|
8
8
|
import '../../shared/core.DuSLYTG6.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as Connection } from '../../shared/core.
|
|
2
|
-
export { D as DeploymentConnectionModel, d as deployment } from '../../shared/core.
|
|
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.
|
|
4
|
-
import '../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../shared/core.BH0VqY-7.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, d as deployment } from '../../shared/core.DC6zzxS0.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.C4Cn4Jy_.mjs';
|
|
4
|
+
import '../../shared/core.OUoo2ohq.mjs';
|
|
5
5
|
import '../../shared/core.zLlww-07.mjs';
|
|
6
6
|
import '../../shared/core.CpwrZi3D.mjs';
|
|
7
7
|
import '../../shared/core.DbRvwARP.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as Connection } from '../../../shared/core.
|
|
2
|
-
export { C as ConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.
|
|
3
|
-
import '../../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../../shared/core.Bf5zKDK1.mjs';
|
|
2
|
+
export { C as ConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.Dtw1SBlz.mjs';
|
|
3
|
+
import '../../../shared/core.BvlHvikl.mjs';
|
|
4
4
|
import '../../../shared/core.O6FG0HF9.mjs';
|
|
5
5
|
import 'type-fest';
|
|
6
6
|
import '../../../shared/core.DuSLYTG6.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as Connection } from '../../../shared/core.
|
|
2
|
-
export { C as ConnectionModel, q as findConnection, o as findConnectionsBetween, r as findConnectionsWithin } from '../../../shared/core.
|
|
3
|
-
import '../../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../../shared/core.BH0VqY-7.mjs';
|
|
2
|
+
export { C as ConnectionModel, q as findConnection, o as findConnectionsBetween, r as findConnectionsWithin } from '../../../shared/core.C4Cn4Jy_.mjs';
|
|
3
|
+
import '../../../shared/core.OUoo2ohq.mjs';
|
|
4
4
|
import '../../../shared/core.zLlww-07.mjs';
|
|
5
5
|
import '../../../shared/core.BgvIuGGU.mjs';
|
|
6
6
|
import '../../../shared/core.CpwrZi3D.mjs';
|
package/dist/model/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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.
|
|
2
|
-
export { f as AnyLikeC4Model, l as DeploymentOrFqn, h as DeploymentRelationEndpoint, m as EdgeOrId, n as ElementOrFqn, I as IncomingFilter, j as LikeC4DeploymentModel, g as LikeC4Model, k as LikeC4ViewsFolder, o as NodeOrId, O as OutgoingFilter, i as RelationshipsAccum, W as WithMetadata, p as WithTags } from '../shared/core.
|
|
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.BvlHvikl.mjs';
|
|
2
|
+
export { f as AnyLikeC4Model, l as DeploymentOrFqn, h as DeploymentRelationEndpoint, m as EdgeOrId, n as ElementOrFqn, I as IncomingFilter, j as LikeC4DeploymentModel, g as LikeC4Model, k as LikeC4ViewsFolder, o as NodeOrId, O as OutgoingFilter, i as RelationshipsAccum, W as WithMetadata, p as WithTags } from '../shared/core.BvlHvikl.mjs';
|
|
3
3
|
import { A as Any } from '../shared/core.O6FG0HF9.mjs';
|
|
4
4
|
export { a as Aux, S as SpecAux, _ as aux } from '../shared/core.O6FG0HF9.mjs';
|
|
5
|
-
export { C as Connection } from '../shared/core.
|
|
6
|
-
export { C as ConnectionModel, f as modelConnection } from '../shared/core.
|
|
7
|
-
export { D as DeploymentConnectionModel, f as deploymentConnection } from '../shared/core.
|
|
5
|
+
export { C as Connection } from '../shared/core.Bf5zKDK1.mjs';
|
|
6
|
+
export { C as ConnectionModel, f as modelConnection } from '../shared/core.Dtw1SBlz.mjs';
|
|
7
|
+
export { D as DeploymentConnectionModel, f as deploymentConnection } from '../shared/core.DhDo8LAz.mjs';
|
|
8
8
|
export { differenceConnections, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isIncoming, isNestedConnection, isOutgoing, mergeConnections, sortConnectionsByBoundaryHierarchy, sortDeepestFirst } from './connection/index.mjs';
|
|
9
9
|
export { H as AuxFromDump, A as AuxFromLikeC4ModelData, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty } from '../shared/core.CE_hG7EJ.mjs';
|
|
10
10
|
import '../shared/core.DX-WYEPA.mjs';
|
package/dist/model/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { b as EdgeModel, E as ElementModel, a as LikeC4DeploymentModel, L as LikeC4Model, c as LikeC4ViewModel, d as LikeC4ViewsFolder, N as NodeModel, R as RelationshipModel, V as VIEW_FOLDERS_SEPARATOR, e as extractViewTitleFromPath, g as getViewFolderPath, f as isDeployedInstanceModel, h as isDeploymentElementModel, i as isDeploymentNodeModel, k as isDeploymentRelationModel, q as isEdgeModel, m as isElementModel, o as isLikeC4ViewModel, l as isModelRelation, j as isNestedElementOfDeployedInstanceModel, p as isNodeModel, l as isRelationModel, l as isRelationshipModel, n as normalizeViewPath } from '../shared/core.
|
|
2
|
-
export { c as DeployedInstanceModel, D as DeploymentConnectionModel, e as DeploymentNodeModel, g as DeploymentRelationModel, R as RelationshipsAccum, d as deploymentConnection } from '../shared/core.
|
|
3
|
-
export { C as Connection } from '../shared/core.
|
|
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.
|
|
1
|
+
export { b as EdgeModel, E as ElementModel, a as LikeC4DeploymentModel, L as LikeC4Model, c as LikeC4ViewModel, d as LikeC4ViewsFolder, N as NodeModel, R as RelationshipModel, V as VIEW_FOLDERS_SEPARATOR, e as extractViewTitleFromPath, g as getViewFolderPath, f as isDeployedInstanceModel, h as isDeploymentElementModel, i as isDeploymentNodeModel, k as isDeploymentRelationModel, q as isEdgeModel, m as isElementModel, o as isLikeC4ViewModel, l as isModelRelation, j as isNestedElementOfDeployedInstanceModel, p as isNodeModel, l as isRelationModel, l as isRelationshipModel, n as normalizeViewPath } from '../shared/core.CzHQRs5x.mjs';
|
|
2
|
+
export { c as DeployedInstanceModel, D as DeploymentConnectionModel, e as DeploymentNodeModel, g as DeploymentRelationModel, R as RelationshipsAccum, d as deploymentConnection } from '../shared/core.DC6zzxS0.mjs';
|
|
3
|
+
export { C as Connection } from '../shared/core.BH0VqY-7.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.C4Cn4Jy_.mjs';
|
|
5
5
|
export { R as RichText } from '../shared/core.H8NbNp2X.mjs';
|
|
6
6
|
import '../shared/core.DbRvwARP.mjs';
|
|
7
7
|
import '../shared/core.ByrmCl9I.mjs';
|
|
8
8
|
import '../shared/core.CpwrZi3D.mjs';
|
|
9
9
|
import '../shared/core.D4npX2q8.mjs';
|
|
10
|
-
import '../shared/core.
|
|
10
|
+
import '../shared/core.OUoo2ohq.mjs';
|
|
11
11
|
import '../shared/core.zLlww-07.mjs';
|
|
12
12
|
import '../shared/core.DcS-0zys.mjs';
|
|
13
|
-
import '../shared/core.
|
|
13
|
+
import '../shared/core.DDoAFHHp.mjs';
|
|
14
14
|
import '../shared/core.DK6I-Nr7.mjs';
|
|
15
15
|
import '../shared/core.BL_xjl90.mjs';
|
|
16
16
|
import '../shared/core.CnIyafWn.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as ElementModel, e as DeploymentElementModel } from './core.
|
|
1
|
+
import { E as ElementModel, e as DeploymentElementModel } from './core.BvlHvikl.mjs';
|
|
2
2
|
import { A as Any } from './core.O6FG0HF9.mjs';
|
|
3
3
|
import { F as Fqn } from './core.DX-WYEPA.mjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getDefaultExportFromCjs, C } from './core.
|
|
1
|
+
import { r as getDefaultExportFromCjs, C } from './core.OUoo2ohq.mjs';
|
|
2
2
|
import { u as u$1 } from './core.DbRvwARP.mjs';
|
|
3
3
|
import { m } from './core.ByrmCl9I.mjs';
|
|
4
4
|
import { l } from './core.8KM0D6va.mjs';
|
|
@@ -368,7 +368,7 @@ declare class LikeC4ViewModel<A extends Any = Any, V extends $View<A> = $View<A>
|
|
|
368
368
|
get _type(): V[_type];
|
|
369
369
|
get id(): StrictViewId<A>;
|
|
370
370
|
/**
|
|
371
|
-
* Returns title if defined, otherwise returns its {@link id}
|
|
371
|
+
* Returns title if defined, otherwise returns title of the element it is based on, otherwise returns its {@link id}
|
|
372
372
|
*/
|
|
373
373
|
get titleOrId(): string;
|
|
374
374
|
/**
|
|
@@ -610,6 +610,7 @@ declare abstract class AbstractDeploymentElementModel<A extends Any> implements
|
|
|
610
610
|
abstract readonly $node: DeploymentElement<A>;
|
|
611
611
|
abstract readonly tags: Tags<A>;
|
|
612
612
|
get style(): SetRequired<DeploymentElementStyle, 'shape' | 'color' | 'size'>;
|
|
613
|
+
get name(): string;
|
|
613
614
|
get shape(): ElementShape;
|
|
614
615
|
get color(): Color;
|
|
615
616
|
get description(): RichTextOrEmpty;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as customInspectSymbol } from './core.
|
|
1
|
+
import { c as customInspectSymbol } from './core.BH0VqY-7.mjs';
|
|
2
2
|
import { o } from './core.BgvIuGGU.mjs';
|
|
3
3
|
import { a as intersection, b as stringHash, u as union, d as difference, e as equals } from './core.CpwrZi3D.mjs';
|
|
4
4
|
import { u } from './core.DbRvwARP.mjs';
|
|
5
5
|
import { m } from './core.ByrmCl9I.mjs';
|
|
6
|
-
import { j as isDescendantOf, i as isAncestor, q as isString, C, l as sortNaturalByFqn, k as isSameHierarchy } from './core.
|
|
6
|
+
import { j as isDescendantOf, i as isAncestor, q as isString, C, l as sortNaturalByFqn, k as isSameHierarchy } from './core.OUoo2ohq.mjs';
|
|
7
7
|
import { i as isome } from './core.BoyJPEen.mjs';
|
|
8
8
|
import { i as ifilter } from './core.BH9nN-_I.mjs';
|
|
9
9
|
import { i as invariant } from './core.D4npX2q8.mjs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { u as u$1 } from './core.DbRvwARP.mjs';
|
|
2
|
-
import { p } from './core.
|
|
2
|
+
import { p } from './core.C4Cn4Jy_.mjs';
|
|
3
3
|
import { m as m$2 } from './core.ByrmCl9I.mjs';
|
|
4
4
|
import { i as i$2 } from './core.CpwrZi3D.mjs';
|
|
5
|
-
import { g as hierarchyLevel, n as nameFromFqn, i as isAncestor, d as commonAncestor, l as sortNaturalByFqn, m as sortParentsFirst, p as parentFqn, b as ancestorsFqn, C, a as compareNaturalHierarchically, c as compareNatural } from './core.
|
|
5
|
+
import { g as hierarchyLevel, n as nameFromFqn, i as isAncestor, d as commonAncestor, l as sortNaturalByFqn, m as sortParentsFirst, p as parentFqn, b as ancestorsFqn, C, a as compareNaturalHierarchically, c as compareNatural } from './core.OUoo2ohq.mjs';
|
|
6
6
|
import { g as getOrCreate } from './core.DcS-0zys.mjs';
|
|
7
|
-
import { i as i$1, n as n$3, e as DeploymentNodeModel, c as DeployedInstanceModel, N as NestedElementOfDeployedInstanceModel, g as DeploymentRelationModel } from './core.
|
|
8
|
-
import { D as DefaultMap } from './core.
|
|
7
|
+
import { i as i$1, n as n$3, e as DeploymentNodeModel, c as DeployedInstanceModel, N as NestedElementOfDeployedInstanceModel, g as DeploymentRelationModel } from './core.DC6zzxS0.mjs';
|
|
8
|
+
import { D as DefaultMap } from './core.DDoAFHHp.mjs';
|
|
9
9
|
import { i as invariant, a as nonNullable } from './core.D4npX2q8.mjs';
|
|
10
10
|
import { F as FqnRef, b as isDeploymentNode, a as _type, _ as _stage, i as isOnStage, w as whereOperatorAsPredicate } from './core.DK6I-Nr7.mjs';
|
|
11
11
|
import { m as memoizeProp } from './core.B0oEIXqd.mjs';
|
|
@@ -984,10 +984,10 @@ class LikeC4ViewModel {
|
|
|
984
984
|
return this.$view.id;
|
|
985
985
|
}
|
|
986
986
|
/**
|
|
987
|
-
* Returns title if defined, otherwise returns its {@link id}
|
|
987
|
+
* Returns title if defined, otherwise returns title of the element it is based on, otherwise returns its {@link id}
|
|
988
988
|
*/
|
|
989
989
|
get titleOrId() {
|
|
990
|
-
return this.title ?? this.id;
|
|
990
|
+
return this.title ?? this.viewOf?.title ?? this.id;
|
|
991
991
|
}
|
|
992
992
|
/**
|
|
993
993
|
* Returns title if defined, otherwise returns `Untitled`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as customInspectSymbol } from './core.
|
|
1
|
+
import { c as customInspectSymbol } from './core.BH0VqY-7.mjs';
|
|
2
2
|
import { a as intersection, d as difference, u as union, b as stringHash, e as equals } from './core.CpwrZi3D.mjs';
|
|
3
|
-
import { C, t as s, g as hierarchyLevel, d as commonAncestor, k as isSameHierarchy } from './core.
|
|
3
|
+
import { C, t as s, g as hierarchyLevel, d as commonAncestor, n as nameFromFqn, k as isSameHierarchy } from './core.OUoo2ohq.mjs';
|
|
4
4
|
import { u } from './core.DbRvwARP.mjs';
|
|
5
5
|
import { n as n$1 } from './core.CnIyafWn.mjs';
|
|
6
6
|
import { a as nonNullable, i as invariant } from './core.D4npX2q8.mjs';
|
|
@@ -24,6 +24,9 @@ class AbstractDeploymentElementModel {
|
|
|
24
24
|
...this.$node.style
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
+
get name() {
|
|
28
|
+
return nameFromFqn(this.id);
|
|
29
|
+
}
|
|
27
30
|
get shape() {
|
|
28
31
|
return this.$node.style?.shape ?? DefaultElementShape;
|
|
29
32
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Connection, c as customInspectSymbol } from './core.
|
|
2
|
-
import { e as DeploymentElementModel, i as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.
|
|
1
|
+
import { C as Connection, c as customInspectSymbol } from './core.Bf5zKDK1.mjs';
|
|
2
|
+
import { e as DeploymentElementModel, i as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.BvlHvikl.mjs';
|
|
3
3
|
import { A as Any, C as EdgeId } from './core.O6FG0HF9.mjs';
|
|
4
4
|
import { I as IteratorLike } from './core.DuSLYTG6.mjs';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as getDefaultExportFromCjs, d as commonAncestor, f as compareFqnHierarchically } from './core.
|
|
2
|
-
import { r as requireForeach, a as requireIterator } from './core.
|
|
1
|
+
import { r as getDefaultExportFromCjs, d as commonAncestor, f as compareFqnHierarchically } from './core.OUoo2ohq.mjs';
|
|
2
|
+
import { r as requireForeach, a as requireIterator } from './core.Bp-IQmJR.mjs';
|
|
3
3
|
|
|
4
4
|
function o(r,n){let e=Math.ceil(r),t=Math.floor(n);if(t<e)throw new RangeError(`randomInteger: The range [${r.toString()},${n.toString()}] contains no integer`);return Math.floor(Math.random()*(t-e+1)+e)}
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Connection, c as customInspectSymbol } from './core.
|
|
2
|
-
import { E as ElementModel, R as RelationshipModel } from './core.
|
|
1
|
+
import { C as Connection, c as customInspectSymbol } from './core.Bf5zKDK1.mjs';
|
|
2
|
+
import { E as ElementModel, R as RelationshipModel } from './core.BvlHvikl.mjs';
|
|
3
3
|
import { A as Any, U as Unknown, C as EdgeId } from './core.O6FG0HF9.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { s as a$2, t as t$3, u as a$3, r as r$3, m as isElementModel, j as isNestedElementOfDeployedInstanceModel, f as isDeployedInstanceModel, i as isDeploymentNodeModel, h as isDeploymentElementModel, L as LikeC4Model } from './core.
|
|
1
|
+
import { s as a$2, t as t$3, u as a$3, r as r$3, m as isElementModel, j as isNestedElementOfDeployedInstanceModel, f as isDeployedInstanceModel, i as isDeploymentNodeModel, h as isDeploymentElementModel, L as LikeC4Model } from './core.CzHQRs5x.mjs';
|
|
2
2
|
import { u as u$5 } from './core.DbRvwARP.mjs';
|
|
3
3
|
import { m as m$2 } from './core.ByrmCl9I.mjs';
|
|
4
|
-
import { i as i$a, t as t$4, n as n$2, d as deploymentConnection, R as RelationshipsAccum, D as DeploymentConnectionModel } from './core.
|
|
5
|
-
import { p as p$1, f as findAscendingConnections, m as mergeConnections, d as differenceConnections, j as isNestedConnection, s as sortConnectionsByBoundaryHierarchy, o as findConnectionsBetween$3, n as modelConnection, b as findDescendantConnections, a as findDeepestNestedConnection, i as isAnyInOut, k as isOutgoing, g as isIncoming, C as ConnectionModel } from './core.
|
|
6
|
-
import { u as a$1, C, t as s, r as getDefaultExportFromCjs, j as isDescendantOf, m as sortParentsFirst, i as isAncestor, p as parentFqn, e as compareByFqnHierarchically, o as isNonEmptyArray, n as nameFromFqn, s as sortByFqnHierarchically, d as commonAncestor, b as ancestorsFqn, k as isSameHierarchy } from './core.
|
|
7
|
-
import { c as commonHead, r as requireForeach, a as requireIterator, u as u$6, o as objectHash, d as d$5, S as Stack } from './core.
|
|
4
|
+
import { i as i$a, t as t$4, n as n$2, d as deploymentConnection, R as RelationshipsAccum, D as DeploymentConnectionModel } from './core.DC6zzxS0.mjs';
|
|
5
|
+
import { p as p$1, f as findAscendingConnections, m as mergeConnections, d as differenceConnections, j as isNestedConnection, s as sortConnectionsByBoundaryHierarchy, o as findConnectionsBetween$3, n as modelConnection, b as findDescendantConnections, a as findDeepestNestedConnection, i as isAnyInOut, k as isOutgoing, g as isIncoming, C as ConnectionModel } from './core.C4Cn4Jy_.mjs';
|
|
6
|
+
import { u as a$1, C, t as s, r as getDefaultExportFromCjs, j as isDescendantOf, m as sortParentsFirst, i as isAncestor, p as parentFqn, e as compareByFqnHierarchically, o as isNonEmptyArray, n as nameFromFqn, s as sortByFqnHierarchically, d as commonAncestor, b as ancestorsFqn, k as isSameHierarchy } from './core.OUoo2ohq.mjs';
|
|
7
|
+
import { c as commonHead, r as requireForeach, a as requireIterator, u as u$6, o as objectHash, d as d$5, S as Stack } from './core.Bp-IQmJR.mjs';
|
|
8
8
|
import { a as nonNullable, i as invariant, n as nonexhaustive } from './core.D4npX2q8.mjs';
|
|
9
9
|
import { n } from './core.CnIyafWn.mjs';
|
|
10
10
|
import { d as difference, a as intersection, u as union, i as i$b, h as hasIntersection } from './core.CpwrZi3D.mjs';
|
|
@@ -16,9 +16,9 @@ import { i as isGroupElementKind, G as GroupElementKind, d as stepEdgeId } from
|
|
|
16
16
|
import { a as DefaultElementShape, D as DefaultThemeColor, f as DefaultArrowType, e as DefaultLineStyle, g as DefaultRelationshipColor } from './core.H8NbNp2X.mjs';
|
|
17
17
|
import { k } from './core.BpJu1RrF.mjs';
|
|
18
18
|
import { a as toSet, t as toArray, i as imap } from './core.Btl47GOn.mjs';
|
|
19
|
-
import { D as DefaultMap } from './core.
|
|
19
|
+
import { D as DefaultMap } from './core.DDoAFHHp.mjs';
|
|
20
20
|
import { i as ifilter } from './core.BH9nN-_I.mjs';
|
|
21
|
-
import { C as Connection, c as customInspectSymbol } from './core.
|
|
21
|
+
import { C as Connection, c as customInspectSymbol } from './core.BH0VqY-7.mjs';
|
|
22
22
|
import { i as isome } from './core.BoyJPEen.mjs';
|
|
23
23
|
|
|
24
24
|
function d$4(...e){return e.length===2?(n,...r)=>t$2(n,...e,...r):t$2(...e)}var t$2=(e,n,r,...a)=>n(e,...a)?typeof r=="function"?r(e,...a):r.onTrue(e,...a):typeof r=="function"?e:r.onFalse(e,...a);
|
|
@@ -85,7 +85,7 @@ function compareNatural(a, b) {
|
|
|
85
85
|
}
|
|
86
86
|
return t(b) ? -1 : 0;
|
|
87
87
|
}
|
|
88
|
-
function compareNaturalHierarchically(separator = ".") {
|
|
88
|
+
function compareNaturalHierarchically(separator = ".", deepestFirst = false) {
|
|
89
89
|
return (a, b) => {
|
|
90
90
|
if (a === b) return 0;
|
|
91
91
|
if (!a) return -1;
|
|
@@ -101,7 +101,8 @@ function compareNaturalHierarchically(separator = ".") {
|
|
|
101
101
|
return comparison;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
const diff = aParts.length - bParts.length;
|
|
105
|
+
return deepestFirst ? -1 * diff : diff;
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
108
|
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -247,7 +247,7 @@ declare function compareNatural(a: string | undefined, b: string | undefined): -
|
|
|
247
247
|
* // 'b.c',
|
|
248
248
|
* // ]
|
|
249
249
|
*/
|
|
250
|
-
declare function compareNaturalHierarchically(separator?: string): (a: string | undefined, b: string | undefined) => number;
|
|
250
|
+
declare function compareNaturalHierarchically(separator?: string, deepestFirst?: boolean): (a: string | undefined, b: string | undefined) => number;
|
|
251
251
|
|
|
252
252
|
declare function getOrCreate<K, V>(map: Map<K, V>, key: K, create: (key: K) => V): V;
|
|
253
253
|
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { i as invariant, a as nonNullable, n as nonexhaustive } from '../shared/core.D4npX2q8.mjs';
|
|
2
|
-
export { S as Stack, c as commonHead, o as objectHash } from '../shared/core.
|
|
3
|
-
export { b as ancestorsFqn, d as commonAncestor, e as compareByFqnHierarchically, f as compareFqnHierarchically, c as compareNatural, a as compareNaturalHierarchically, h as hierarchyDistance, g as hierarchyLevel, i as isAncestor, j as isDescendantOf, o as isNonEmptyArray, k as isSameHierarchy, q as isString, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, l as sortNaturalByFqn, m as sortParentsFirst } from '../shared/core.
|
|
2
|
+
export { S as Stack, c as commonHead, o as objectHash } from '../shared/core.Bp-IQmJR.mjs';
|
|
3
|
+
export { b as ancestorsFqn, d as commonAncestor, e as compareByFqnHierarchically, f as compareFqnHierarchically, c as compareNatural, a as compareNaturalHierarchically, h as hierarchyDistance, g as hierarchyLevel, i as isAncestor, j as isDescendantOf, o as isNonEmptyArray, k as isSameHierarchy, q as isString, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, l as sortNaturalByFqn, m as sortParentsFirst } from '../shared/core.OUoo2ohq.mjs';
|
|
4
4
|
export { g as getOrCreate } from '../shared/core.DcS-0zys.mjs';
|
|
5
5
|
export { a as markdownToHtml, b as markdownToText, m as memoizeProp } from '../shared/core.B0oEIXqd.mjs';
|
|
6
|
-
export { b as BiMap, d as DefaultWeakMap, l as LinkedList, m as MultiMap, q as Queue, c as compareRelations, a as delay, p as promiseNextTick } from '../shared/core.
|
|
6
|
+
export { b as BiMap, d as DefaultWeakMap, l as LinkedList, m as MultiMap, q as Queue, c as compareRelations, a as delay, p as promiseNextTick } from '../shared/core.Dhc0yIwT.mjs';
|
|
7
7
|
export { d as difference, e as equalsSet, i as hasAtLeast, a as intersection, b as stringHash, s as symmetricDifference, u as union } from '../shared/core.CpwrZi3D.mjs';
|
|
8
|
-
export { D as DefaultMap } from '../shared/core.
|
|
8
|
+
export { D as DefaultMap } from '../shared/core.DDoAFHHp.mjs';
|
|
9
9
|
export { i as ifilter } from '../shared/core.BH9nN-_I.mjs';
|
|
10
10
|
export { i as ifind, a as ihead } from '../shared/core.DsMrjY2q.mjs';
|
|
11
11
|
export { ifirst, ireduce } from './iterable/index.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likec4/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.38.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://likec4.dev",
|
|
6
6
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"type-fest": "^4.41.0",
|
|
100
100
|
"unified": "11.0.5",
|
|
101
101
|
"chroma-js": "^3.1.2",
|
|
102
|
-
"@mantine/colors-generator": "8.2.
|
|
102
|
+
"@mantine/colors-generator": "8.2.4"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@types/chroma-js": "^3.1.1",
|
|
@@ -121,11 +121,11 @@
|
|
|
121
121
|
"object-hash": "^3.0.0",
|
|
122
122
|
"obliterator": "^2.0.5",
|
|
123
123
|
"remeda": "^2.23.1",
|
|
124
|
-
"turbo": "2.5.
|
|
124
|
+
"turbo": "2.5.6",
|
|
125
125
|
"typescript": "5.9.2",
|
|
126
126
|
"unbuild": "3.5.0",
|
|
127
127
|
"vitest": "3.2.4",
|
|
128
|
-
"@likec4/tsconfig": "1.
|
|
128
|
+
"@likec4/tsconfig": "1.38.1"
|
|
129
129
|
},
|
|
130
130
|
"scripts": {
|
|
131
131
|
"typecheck": "tsc -b --verbose",
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
RichText,
|
|
22
22
|
} from '../types'
|
|
23
23
|
import * as aux from '../types/_aux'
|
|
24
|
-
import { commonAncestor, hierarchyLevel, memoizeProp, nonNullable } from '../utils'
|
|
24
|
+
import { commonAncestor, hierarchyLevel, memoizeProp, nameFromFqn, nonNullable } from '../utils'
|
|
25
25
|
import { difference, intersection, union } from '../utils/set'
|
|
26
26
|
import type { LikeC4DeploymentModel } from './DeploymentModel'
|
|
27
27
|
import type { ElementModel } from './ElementModel'
|
|
@@ -55,6 +55,10 @@ abstract class AbstractDeploymentElementModel<A extends Any> implements WithTags
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
get name(): string {
|
|
59
|
+
return nameFromFqn(this.id)
|
|
60
|
+
}
|
|
61
|
+
|
|
58
62
|
get shape(): C4ElementShape {
|
|
59
63
|
return this.$node.style?.shape ?? DefaultElementShape
|
|
60
64
|
}
|
|
@@ -113,10 +113,10 @@ export class LikeC4ViewModel<A extends Any = Any, V extends $View<A> = $View<A>>
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
|
-
* Returns title if defined, otherwise returns its {@link id}
|
|
116
|
+
* Returns title if defined, otherwise returns title of the element it is based on, otherwise returns its {@link id}
|
|
117
117
|
*/
|
|
118
118
|
get titleOrId(): string {
|
|
119
|
-
return this.title ?? this.id
|
|
119
|
+
return this.title ?? this.viewOf?.title ?? this.id
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
/**
|
|
@@ -31,6 +31,7 @@ export function compareNatural(a: string | undefined, b: string | undefined): -1
|
|
|
31
31
|
*/
|
|
32
32
|
export function compareNaturalHierarchically(
|
|
33
33
|
separator = '.',
|
|
34
|
+
deepestFirst = false,
|
|
34
35
|
): (a: string | undefined, b: string | undefined) => number {
|
|
35
36
|
return (a, b) => {
|
|
36
37
|
if (a === b) return 0
|
|
@@ -52,7 +53,8 @@ export function compareNaturalHierarchically(
|
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
// If all common segments are equal, shorter paths come first
|
|
56
|
-
|
|
56
|
+
// If all common segments are equal, shorter paths come first (if deepestFirst is false)
|
|
57
|
+
const diff = aParts.length - bParts.length
|
|
58
|
+
return deepestFirst ? -1 * diff : diff
|
|
57
59
|
}
|
|
58
60
|
}
|