@likec4/core 1.39.3 → 1.39.4
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 +5 -5
- package/dist/builder/index.mjs +1 -1
- package/dist/compute-view/index.d.mts +5 -5
- package/dist/compute-view/index.mjs +2 -2
- package/dist/compute-view/relationships-view/index.d.mts +5 -5
- package/dist/index.d.mts +5 -6
- package/dist/model/connection/deployment/index.d.mts +7 -7
- package/dist/model/connection/index.d.mts +10 -10
- package/dist/model/connection/index.mjs +1 -1
- package/dist/model/connection/model/index.d.mts +7 -7
- package/dist/model/connection/model/index.mjs +1 -1
- package/dist/model/index.d.mts +10 -11
- package/dist/model/index.mjs +1 -1
- package/dist/shared/{core.DuSLYTG6.d.mts → core.1_FtXl46.d.mts} +5 -1
- package/dist/shared/{core.PHwHXzkG.d.mts → core.1ypAWObi.d.mts} +119 -2
- package/dist/shared/{core.DdzRtJ9d.d.mts → core.B4scjmM6.d.mts} +1 -1
- package/dist/shared/{core.aWJgARyY.d.mts → core.B65NlqR_.d.mts} +3 -3
- package/dist/shared/{core.C7pZp1nR.d.mts → core.BZs_hKMJ.d.mts} +4 -4
- package/dist/shared/{core.ClpXZ4Ib.d.mts → core.Bq0r6_yG.d.mts} +3 -3
- package/dist/shared/{core.DnRszv-l.mjs → core.CNhp8dSD.mjs} +1 -1
- package/dist/shared/{core.CXCmvCws.d.mts → core.Chtad_Hv.d.mts} +2 -2
- package/dist/shared/{core.CWv15GLo.mjs → core.D0EgVMQK.mjs} +5 -3
- package/dist/shared/{core.20m8Um0g.d.mts → core.DmFVWyBc.d.mts} +2 -2
- package/dist/shared/{core.v1iEaXaR.d.mts → core.PFqKFee4.d.mts} +4 -4
- package/dist/types/_aux.d.mts +2 -2
- package/dist/types/expression-model.d.mts +3 -3
- package/dist/types/expression.d.mts +3 -3
- package/dist/types/fqnRef.d.mts +2 -2
- package/dist/types/index.d.mts +6 -6
- package/dist/utils/index.d.mts +2 -3
- package/dist/utils/iterable/index.d.mts +1 -1
- package/package.json +4 -4
- package/src/index.ts +0 -1
- package/src/model/connection/ops.ts +9 -7
- package/src/types/_common.ts +6 -0
- package/src/utils/fqn.ts +5 -10
- package/src/utils/index.ts +0 -2
- package/dist/shared/core.DM3vdkO_.d.mts +0 -127
package/dist/builder/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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.PFqKFee4.mjs';
|
|
3
3
|
import { D as DeploymentFqn, F as Fqn } from '../shared/core.DX-WYEPA.mjs';
|
|
4
|
-
import { l as DeploymentElement, p as DeploymentRelationship, F as Element, O as ModelRelation, ah as AnyViewRuleStyle, am as AutoLayoutDirection, Z as ParsedView, aN as ParsedDeploymentView, b1 as ParsedElementView, h as ParsedLikeC4ModelData, Q as ElementSpecification$1, V as RelationshipSpecification, T as TagSpecification } from '../shared/core.
|
|
5
|
-
import { c as Participant, E as Expression } from '../shared/core.
|
|
4
|
+
import { l as DeploymentElement, p as DeploymentRelationship, F as Element, O as ModelRelation, ah as AnyViewRuleStyle, am as AutoLayoutDirection, Z as ParsedView, aN as ParsedDeploymentView, b1 as ParsedElementView, h as ParsedLikeC4ModelData, Q as ElementSpecification$1, V as RelationshipSpecification, T as TagSpecification } from '../shared/core.B65NlqR_.mjs';
|
|
5
|
+
import { c as Participant, E as Expression } from '../shared/core.DmFVWyBc.mjs';
|
|
6
6
|
import { ModelFqnExpr, ModelRelationExpr } from '../types/expression-model.mjs';
|
|
7
|
-
import { N as NonEmptyArray, K as KeysOf } from '../shared/core.
|
|
8
|
-
import { y as setProject, a as Aux, S as SpecAux, A as Any } from '../shared/core.
|
|
7
|
+
import { N as NonEmptyArray, K as KeysOf } from '../shared/core.1_FtXl46.mjs';
|
|
8
|
+
import { y as setProject, a as Aux, S as SpecAux, A as Any } from '../shared/core.B4scjmM6.mjs';
|
|
9
9
|
import { c as ElementShape, h as ThemeColor, b as BorderStyle, a as ShapeSize, S as SpacingSize, T as TextSize, f as RelationshipArrowType, R as RelationshipLineType } from '../shared/core.CzdwsPmY.mjs';
|
|
10
10
|
import '../shared/core.CywrQs86.mjs';
|
|
11
11
|
import '../types/fqnRef.mjs';
|
package/dist/builder/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import defu from 'defu';
|
|
2
2
|
import { isArray, isString, map, entries, mapValues, fromEntries, mapToObj, isNullish, pickBy, isNonNullish, hasAtLeast, isFunction } from 'remeda';
|
|
3
|
-
import { c as computeLikeC4Model } from '../shared/core.
|
|
3
|
+
import { c as computeLikeC4Model } from '../shared/core.CNhp8dSD.mjs';
|
|
4
4
|
import { n as nameFromFqn, d as isSameHierarchy, p as parentFqn } from '../shared/core.DgttqsJc.mjs';
|
|
5
5
|
import { ModelFqnExpr } from '../types/expression-model.mjs';
|
|
6
6
|
import { a as _type, _ as _stage, c as isDeployedInstance } from '../shared/core.yHe79zEl.mjs';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as Any } from '../shared/core.
|
|
2
|
-
import { g as LikeC4Model } from '../shared/core.
|
|
3
|
-
import { h as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, Z as ParsedView, a0 as ComputedView } from '../shared/core.
|
|
1
|
+
import { A as Any } from '../shared/core.B4scjmM6.mjs';
|
|
2
|
+
import { g as LikeC4Model } from '../shared/core.PFqKFee4.mjs';
|
|
3
|
+
import { h as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, Z as ParsedView, a0 as ComputedView } from '../shared/core.B65NlqR_.mjs';
|
|
4
4
|
import 'type-fest';
|
|
5
|
-
import '../shared/core.
|
|
5
|
+
import '../shared/core.1_FtXl46.mjs';
|
|
6
6
|
import '../shared/core.DX-WYEPA.mjs';
|
|
7
7
|
import '../shared/core.CywrQs86.mjs';
|
|
8
8
|
import '../shared/core.CzdwsPmY.mjs';
|
|
9
|
-
import '../shared/core.
|
|
9
|
+
import '../shared/core.DmFVWyBc.mjs';
|
|
10
10
|
import '../types/fqnRef.mjs';
|
|
11
11
|
import '../types/expression-model.mjs';
|
|
12
12
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Graph, w as willCreateCycle, t as topologicalSortExports } from '../shared/core.
|
|
2
|
-
export { c as computeLikeC4Model, a as computeParsedModelData, b as computeView, u as unsafeComputeView } from '../shared/core.
|
|
1
|
+
import { G as Graph, w as willCreateCycle, t as topologicalSortExports } from '../shared/core.CNhp8dSD.mjs';
|
|
2
|
+
export { c as computeLikeC4Model, a as computeParsedModelData, b as computeView, u as unsafeComputeView } from '../shared/core.CNhp8dSD.mjs';
|
|
3
3
|
import { values, unique, mapValues, omit, mapToObj, map } from 'remeda';
|
|
4
4
|
import { f as isExtendsElementView, d as isElementView } from '../shared/core.T-eLZTW_.mjs';
|
|
5
5
|
import { c as isNonEmptyArray } from '../shared/core.DgttqsJc.mjs';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as Any, U as Unknown, j as ElementId, V as ViewId } from '../../shared/core.
|
|
2
|
-
import { E as ElementModel, R as RelationshipModel, g as LikeC4Model } from '../../shared/core.
|
|
1
|
+
import { A as Any, U as Unknown, j as ElementId, V as ViewId } from '../../shared/core.B4scjmM6.mjs';
|
|
2
|
+
import { E as ElementModel, R as RelationshipModel, g as LikeC4Model } from '../../shared/core.PFqKFee4.mjs';
|
|
3
3
|
import 'type-fest';
|
|
4
|
-
import '../../shared/core.
|
|
4
|
+
import '../../shared/core.1_FtXl46.mjs';
|
|
5
5
|
import '../../shared/core.DX-WYEPA.mjs';
|
|
6
6
|
import '../../shared/core.CywrQs86.mjs';
|
|
7
|
-
import '../../shared/core.
|
|
7
|
+
import '../../shared/core.B65NlqR_.mjs';
|
|
8
8
|
import '../../types/expression-model.mjs';
|
|
9
|
-
import '../../shared/core.
|
|
9
|
+
import '../../shared/core.DmFVWyBc.mjs';
|
|
10
10
|
import '../../types/fqnRef.mjs';
|
|
11
11
|
import '../../shared/core.CzdwsPmY.mjs';
|
|
12
12
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
export { ElementColors, RelationshipColors, computeColorValues, defaultTheme } from './theme/index.mjs';
|
|
2
|
-
export { B as BiMap, D as DefaultWeakMap, L as LinkedList, M as MultiMap, Q as Queue, i as invariant,
|
|
2
|
+
export { B as BiMap, D as DefaultWeakMap, L as LinkedList, M as MultiMap, Q as Queue, a as ancestorsFqn, i as invariant, b as isAncestor, c as isDescendantOf, d as isNonEmptyArray, e as isSameHierarchy, f as isString, m as memoizeProp, n as nameFromFqn, h as nonNullable, g as nonexhaustive, p as parentFqn, s as sortNaturalByFqn, j as sortParentsFirst } from './shared/core.1ypAWObi.mjs';
|
|
3
3
|
export { D as DefaultMap } from './shared/core.CywrQs86.mjs';
|
|
4
|
-
export { I as IterableContainer, a as ancestorsFqn, i as isAncestor, b as isDescendantOf, c as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortNaturalByFqn, d as sortParentsFirst } from './shared/core.DM3vdkO_.mjs';
|
|
5
4
|
export { i as isIterable } from './shared/core.DXhDWKFZ.mjs';
|
|
6
|
-
export { A as Any, A as AnyAux, a as Aux, E as ExtractOnStage, M as ModelStage, S as SpecAux, U as Unknown, b as UnknownComputed, c as UnknownLayouted, d as UnknownParsed, e as _stage, f as _type, _ as aux, i as isOnStage } from './shared/core.
|
|
5
|
+
export { A as Any, A as AnyAux, a as Aux, E as ExtractOnStage, M as ModelStage, S as SpecAux, U as Unknown, b as UnknownComputed, c as UnknownLayouted, d as UnknownParsed, e as _stage, f as _type, _ as aux, i as isOnStage } from './shared/core.B4scjmM6.mjs';
|
|
7
6
|
export { A as AnyFqn, B as BuiltInIcon, D as DeploymentFqn, b as DeploymentKind, j as EdgeId, E as ElementKind, F as Fqn, e as GlobalFqn, G as GroupElementKind, I as Icon, a as IconUrl, M as MarkdownOrString, N as NodeId, P as ProjectId, d as RelationId, R as RelationKind, c as RelationshipKind, k as StepEdgeId, S as StepEdgeIdLiteral, m as StepEdgeKind, T as Tag, V as ViewId, o as extractStep, f as flattenMarkdownOrString, g as isGlobalFqn, i as isGroupElementKind, n as isStepEdgeId, s as scalar, h as splitGlobalFqn, l as stepEdgeId } from './shared/core.DX-WYEPA.mjs';
|
|
8
|
-
export { K as AbstractRelationship, ag as AnyExcludePredicate, af as AnyIncludePredicate, a2 as AnyView, ah as AnyViewRuleStyle, am as AutoLayoutDirection, u as AuxFromDump, A as AuxFromLikeC4ModelData, B as BBox, au as BaseParsedViewProperties, at as BaseViewProperties, aB as ComputedDeploymentView, aC as ComputedDynamicView, az as ComputedEdge, aA as ComputedElementView, C as ComputedLikeC4ModelData, ay as ComputedNode, a0 as ComputedView, I as DefaultArrowType, w as DefaultElementShape, H as DefaultLineStyle, y as DefaultPaddingSize, J as DefaultRelationshipColor, x as DefaultShapeSize, z as DefaultTextSize, v as DefaultThemeColor, k as DeployedInstance, l as DeploymentElement, m as DeploymentElementRef, D as DeploymentElementStyle, j as DeploymentNode, q as DeploymentRelation, p as DeploymentRelationship, aJ as DeploymentViewExcludePredicate, aI as DeploymentViewIncludePredicate, aK as DeploymentViewPredicate, aM as DeploymentViewRule, aL as DeploymentViewRuleStyle, aE as DiagramEdge, aD as DiagramNode, _ as DiagramView, aS as DynamicViewIncludeRule, aP as DynamicViewParallelSteps, aT as DynamicViewRule, aO as DynamicViewStep, aR as DynamicViewStepOrParallel, F as Element, Q as ElementSpecification, E as ElementStyle, aX as ElementViewExcludePredicate, aW as ElementViewIncludePredicate, aY as ElementViewPredicate, b0 as ElementViewRule, aZ as ElementViewRuleGroup, a$ as ElementViewRuleStyle, e as GlobalDynamicPredicates, G as GlobalPredicateId, d as GlobalPredicates, f as GlobalStyleID, g as GlobalStyles, aG as LayoutedDeploymentView, aH as LayoutedDynamicView, aF as LayoutedElementView, L as LayoutedLikeC4ModelData, _ as LayoutedView, i as LikeC4ModelData, s as LikeC4ModelDump, Y as LikeC4Project, Z as LikeC4View, M as ModelGlobals, O as ModelRelation, av as NodeNotation, aN as ParsedDeploymentView, aU as ParsedDynamicView, b1 as ParsedElementView, h as ParsedLikeC4ModelData, Z as ParsedView, P as Point, a1 as ProcessedView, t as ProjectDump, c as RectBox, N as Relationship, V as RelationshipSpecification, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, r as SpecTypesFromDump, W as Specification, S as SpecificationDump, T as TagSpecification, aq as ViewAutoLayout, ar as ViewManualLayout, a3 as ViewOnStage, a5 as ViewRule, ao as ViewRuleAutoLayout, ak as ViewRuleGlobalPredicateRef, ai as ViewRuleGlobalStyle, a6 as ViewRulePredicate, as as ViewType, ax as ViewWithHash, aw as ViewWithNotation, a4 as ViewWithType, X as XYPoint, aQ as getParallelStepsPrefix, an as isAutoLayoutDirection, a9 as isComputedView, o as isDeployedInstance, n as isDeploymentNode, ad as isDeploymentView, $ as isDiagramView, ae as isDynamicView, aV as isDynamicViewParallelSteps, aa as isElementView, ac as isExtendsElementView, $ as isLayoutedView, ab as isScopedElementView, U as isTagColorSpecified, ap as isViewRuleAutoLayout, al as isViewRuleGlobalPredicateRef, aj as isViewRuleGlobalStyle, a_ as isViewRuleGroup, a7 as isViewRulePredicate, a8 as isViewRuleStyle } from './shared/core.
|
|
9
|
-
export { C as Coalesce, E as ExclusiveUnion, I as IteratorLike, K as KeysOf, L as Link, b as NTuple, N as NonEmptyArray, a as NonEmptyReadonlyArray, P as Predicate } from './shared/core.
|
|
10
|
-
export { A as AndOperator, a as EqualOperator, E as Expression, j as Filterable, F as FqnExpr, K as KindEqual, N as NotOperator, k as OperatorPredicate, O as OrOperator, c as Participant, d as ParticipantOperator, P as PredicateSelector, R as RelationExpr, T as TagEqual, W as WhereOperator, g as isAndOperator, b as isKindEqual, f as isNotOperator, h as isOrOperator, e as isParticipantOperator, i as isTagEqual, w as whereOperatorAsPredicate } from './shared/core.
|
|
7
|
+
export { K as AbstractRelationship, ag as AnyExcludePredicate, af as AnyIncludePredicate, a2 as AnyView, ah as AnyViewRuleStyle, am as AutoLayoutDirection, u as AuxFromDump, A as AuxFromLikeC4ModelData, B as BBox, au as BaseParsedViewProperties, at as BaseViewProperties, aB as ComputedDeploymentView, aC as ComputedDynamicView, az as ComputedEdge, aA as ComputedElementView, C as ComputedLikeC4ModelData, ay as ComputedNode, a0 as ComputedView, I as DefaultArrowType, w as DefaultElementShape, H as DefaultLineStyle, y as DefaultPaddingSize, J as DefaultRelationshipColor, x as DefaultShapeSize, z as DefaultTextSize, v as DefaultThemeColor, k as DeployedInstance, l as DeploymentElement, m as DeploymentElementRef, D as DeploymentElementStyle, j as DeploymentNode, q as DeploymentRelation, p as DeploymentRelationship, aJ as DeploymentViewExcludePredicate, aI as DeploymentViewIncludePredicate, aK as DeploymentViewPredicate, aM as DeploymentViewRule, aL as DeploymentViewRuleStyle, aE as DiagramEdge, aD as DiagramNode, _ as DiagramView, aS as DynamicViewIncludeRule, aP as DynamicViewParallelSteps, aT as DynamicViewRule, aO as DynamicViewStep, aR as DynamicViewStepOrParallel, F as Element, Q as ElementSpecification, E as ElementStyle, aX as ElementViewExcludePredicate, aW as ElementViewIncludePredicate, aY as ElementViewPredicate, b0 as ElementViewRule, aZ as ElementViewRuleGroup, a$ as ElementViewRuleStyle, e as GlobalDynamicPredicates, G as GlobalPredicateId, d as GlobalPredicates, f as GlobalStyleID, g as GlobalStyles, aG as LayoutedDeploymentView, aH as LayoutedDynamicView, aF as LayoutedElementView, L as LayoutedLikeC4ModelData, _ as LayoutedView, i as LikeC4ModelData, s as LikeC4ModelDump, Y as LikeC4Project, Z as LikeC4View, M as ModelGlobals, O as ModelRelation, av as NodeNotation, aN as ParsedDeploymentView, aU as ParsedDynamicView, b1 as ParsedElementView, h as ParsedLikeC4ModelData, Z as ParsedView, P as Point, a1 as ProcessedView, t as ProjectDump, c as RectBox, N as Relationship, V as RelationshipSpecification, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, r as SpecTypesFromDump, W as Specification, S as SpecificationDump, T as TagSpecification, aq as ViewAutoLayout, ar as ViewManualLayout, a3 as ViewOnStage, a5 as ViewRule, ao as ViewRuleAutoLayout, ak as ViewRuleGlobalPredicateRef, ai as ViewRuleGlobalStyle, a6 as ViewRulePredicate, as as ViewType, ax as ViewWithHash, aw as ViewWithNotation, a4 as ViewWithType, X as XYPoint, aQ as getParallelStepsPrefix, an as isAutoLayoutDirection, a9 as isComputedView, o as isDeployedInstance, n as isDeploymentNode, ad as isDeploymentView, $ as isDiagramView, ae as isDynamicView, aV as isDynamicViewParallelSteps, aa as isElementView, ac as isExtendsElementView, $ as isLayoutedView, ab as isScopedElementView, U as isTagColorSpecified, ap as isViewRuleAutoLayout, al as isViewRuleGlobalPredicateRef, aj as isViewRuleGlobalStyle, a_ as isViewRuleGroup, a7 as isViewRulePredicate, a8 as isViewRuleStyle } from './shared/core.B65NlqR_.mjs';
|
|
8
|
+
export { C as Coalesce, E as ExclusiveUnion, I as IterableContainer, c as IteratorLike, K as KeysOf, L as Link, b as NTuple, N as NonEmptyArray, a as NonEmptyReadonlyArray, P as Predicate, R as ReorderedArray } from './shared/core.1_FtXl46.mjs';
|
|
9
|
+
export { A as AndOperator, a as EqualOperator, E as Expression, j as Filterable, F as FqnExpr, K as KindEqual, N as NotOperator, k as OperatorPredicate, O as OrOperator, c as Participant, d as ParticipantOperator, P as PredicateSelector, R as RelationExpr, T as TagEqual, W as WhereOperator, g as isAndOperator, b as isKindEqual, f as isNotOperator, h as isOrOperator, e as isParticipantOperator, i as isTagEqual, w as whereOperatorAsPredicate } from './shared/core.DmFVWyBc.mjs';
|
|
11
10
|
export { ModelExpression, ModelFqnExpr, ModelRelationExpr } from './types/expression-model.mjs';
|
|
12
11
|
export { FqnRef } from './types/fqnRef.mjs';
|
|
13
12
|
export { b as BorderStyle, B as BorderStyles, i as Color, C as ColorLiteral, d as CustomColor, e as CustomColorDefinitions, c as ElementShape, E as ElementShapes, k as ElementThemeColorValues, l as ElementThemeColors, H as HexColor, L as LikeC4Theme, f as RelationshipArrowType, R as RelationshipLineType, m as RelationshipThemeColorValues, o as RelationshipThemeColors, a as ShapeSize, S as SpacingSize, T as TextSize, h as ThemeColor, n as ThemeColorValues, g as ThemeColors, j as isThemeColor } from './shared/core.CzdwsPmY.mjs';
|
|
@@ -1,13 +1,13 @@
|
|
|
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.
|
|
4
|
-
import '../../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../../shared/core.Chtad_Hv.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.BZs_hKMJ.mjs';
|
|
3
|
+
import '../../../shared/core.PFqKFee4.mjs';
|
|
4
|
+
import '../../../shared/core.B4scjmM6.mjs';
|
|
5
5
|
import 'type-fest';
|
|
6
|
-
import '../../../shared/core.
|
|
6
|
+
import '../../../shared/core.1_FtXl46.mjs';
|
|
7
7
|
import '../../../shared/core.DX-WYEPA.mjs';
|
|
8
8
|
import '../../../shared/core.CywrQs86.mjs';
|
|
9
|
-
import '../../../shared/core.
|
|
9
|
+
import '../../../shared/core.B65NlqR_.mjs';
|
|
10
10
|
import '../../../types/expression-model.mjs';
|
|
11
|
-
import '../../../shared/core.
|
|
11
|
+
import '../../../shared/core.DmFVWyBc.mjs';
|
|
12
12
|
import '../../../types/fqnRef.mjs';
|
|
13
13
|
import '../../../shared/core.CzdwsPmY.mjs';
|
|
@@ -1,16 +1,15 @@
|
|
|
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.
|
|
4
|
-
import { I as IterableContainer, R as ReorderedArray } from '../../shared/core.
|
|
5
|
-
import '../../shared/core.
|
|
6
|
-
import '../../shared/core.
|
|
1
|
+
import { C as Connection } from '../../shared/core.Chtad_Hv.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, f as deployment } from '../../shared/core.BZs_hKMJ.mjs';
|
|
3
|
+
export { C as ConnectionModel, f as model } from '../../shared/core.Bq0r6_yG.mjs';
|
|
4
|
+
import { I as IterableContainer, R as ReorderedArray } from '../../shared/core.1_FtXl46.mjs';
|
|
5
|
+
import '../../shared/core.PFqKFee4.mjs';
|
|
6
|
+
import '../../shared/core.B4scjmM6.mjs';
|
|
7
7
|
import 'type-fest';
|
|
8
|
-
import '../../shared/core.DuSLYTG6.mjs';
|
|
9
8
|
import '../../shared/core.DX-WYEPA.mjs';
|
|
10
9
|
import '../../shared/core.CywrQs86.mjs';
|
|
11
|
-
import '../../shared/core.
|
|
10
|
+
import '../../shared/core.B65NlqR_.mjs';
|
|
12
11
|
import '../../types/expression-model.mjs';
|
|
13
|
-
import '../../shared/core.
|
|
12
|
+
import '../../shared/core.DmFVWyBc.mjs';
|
|
14
13
|
import '../../types/fqnRef.mjs';
|
|
15
14
|
import '../../shared/core.CzdwsPmY.mjs';
|
|
16
15
|
|
|
@@ -30,6 +29,7 @@ type ConnectionElemId = Connection<{
|
|
|
30
29
|
declare function findDeepestNestedConnection<C extends ConnectionElemId>(connections: ReadonlyArray<C>, connection: C): C | null;
|
|
31
30
|
declare function sortDeepestFirst<C extends ConnectionElemId>(connections: ReadonlyArray<C>): C[];
|
|
32
31
|
type WithBoundary = {
|
|
32
|
+
id: string;
|
|
33
33
|
boundary: null | {
|
|
34
34
|
id: string;
|
|
35
35
|
};
|
|
@@ -41,7 +41,7 @@ declare function sortConnectionsByBoundaryHierarchy<T extends WithBoundary, A ex
|
|
|
41
41
|
*/
|
|
42
42
|
declare function findAscendingConnections<C extends ConnectionElemId>(connections: ReadonlyArray<C>, connection: C): Array<C>;
|
|
43
43
|
/**
|
|
44
|
-
* Find connections that
|
|
44
|
+
* Find connections that given connection includes (i.e between it's descendants)
|
|
45
45
|
*/
|
|
46
46
|
declare function findDescendantConnections<C extends ConnectionElemId>(connections: ReadonlyArray<C>, connection: C): Array<C>;
|
|
47
47
|
declare function mergeConnections<C extends IterableContainer<Connection<any, any>>>(connections: C): Array<C[number]>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { C as Connection } from '../../shared/core.BVNaR17u.mjs';
|
|
2
2
|
export { D as DeploymentConnectionModel, d as deployment } from '../../shared/core.CsbOakly.mjs';
|
|
3
|
-
export { C as ConnectionModel, d as differenceConnections, c as findAscendingConnections, e as findDeepestNestedConnection, g as findDescendantConnections, h as hasSameSource, i as hasSameSourceTarget, j as hasSameTarget, k as isAnyInOut, l as isIncoming, m as isNestedConnection, n as isOutgoing, o as mergeConnections, q as model, s as sortConnectionsByBoundaryHierarchy, p as sortDeepestFirst } from '../../shared/core.
|
|
3
|
+
export { C as ConnectionModel, d as differenceConnections, c as findAscendingConnections, e as findDeepestNestedConnection, g as findDescendantConnections, h as hasSameSource, i as hasSameSourceTarget, j as hasSameTarget, k as isAnyInOut, l as isIncoming, m as isNestedConnection, n as isOutgoing, o as mergeConnections, q as model, s as sortConnectionsByBoundaryHierarchy, p as sortDeepestFirst } from '../../shared/core.D0EgVMQK.mjs';
|
|
@@ -1,13 +1,13 @@
|
|
|
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.
|
|
4
|
-
import '../../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../../shared/core.Chtad_Hv.mjs';
|
|
2
|
+
export { C as ConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.Bq0r6_yG.mjs';
|
|
3
|
+
import '../../../shared/core.PFqKFee4.mjs';
|
|
4
|
+
import '../../../shared/core.B4scjmM6.mjs';
|
|
5
5
|
import 'type-fest';
|
|
6
|
-
import '../../../shared/core.
|
|
6
|
+
import '../../../shared/core.1_FtXl46.mjs';
|
|
7
7
|
import '../../../shared/core.DX-WYEPA.mjs';
|
|
8
8
|
import '../../../shared/core.CywrQs86.mjs';
|
|
9
|
-
import '../../../shared/core.
|
|
9
|
+
import '../../../shared/core.B65NlqR_.mjs';
|
|
10
10
|
import '../../../types/expression-model.mjs';
|
|
11
|
-
import '../../../shared/core.
|
|
11
|
+
import '../../../shared/core.DmFVWyBc.mjs';
|
|
12
12
|
import '../../../types/fqnRef.mjs';
|
|
13
13
|
import '../../../shared/core.CzdwsPmY.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { C as Connection } from '../../../shared/core.BVNaR17u.mjs';
|
|
2
|
-
export { C as ConnectionModel, f as findConnection, a as findConnectionsBetween, b as findConnectionsWithin } from '../../../shared/core.
|
|
2
|
+
export { C as ConnectionModel, f as findConnection, a as findConnectionsBetween, b as findConnectionsWithin } from '../../../shared/core.D0EgVMQK.mjs';
|
package/dist/model/index.d.mts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
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.
|
|
3
|
-
import { A as Any } from '../shared/core.
|
|
4
|
-
export { a as Aux, S as SpecAux, _ as aux } from '../shared/core.
|
|
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.
|
|
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.PFqKFee4.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.PFqKFee4.mjs';
|
|
3
|
+
import { A as Any } from '../shared/core.B4scjmM6.mjs';
|
|
4
|
+
export { a as Aux, S as SpecAux, _ as aux } from '../shared/core.B4scjmM6.mjs';
|
|
5
|
+
export { C as Connection } from '../shared/core.Chtad_Hv.mjs';
|
|
6
|
+
export { C as ConnectionModel, f as modelConnection } from '../shared/core.Bq0r6_yG.mjs';
|
|
7
|
+
export { D as DeploymentConnectionModel, f as deploymentConnection } from '../shared/core.BZs_hKMJ.mjs';
|
|
8
8
|
export { differenceConnections, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isIncoming, isNestedConnection, isOutgoing, mergeConnections, sortConnectionsByBoundaryHierarchy, sortDeepestFirst } from './connection/index.mjs';
|
|
9
|
-
export { u as AuxFromDump, A as AuxFromLikeC4ModelData, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty } from '../shared/core.
|
|
9
|
+
export { u as AuxFromDump, A as AuxFromLikeC4ModelData, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty } from '../shared/core.B65NlqR_.mjs';
|
|
10
10
|
import '../shared/core.DX-WYEPA.mjs';
|
|
11
11
|
import 'type-fest';
|
|
12
12
|
import '../shared/core.CywrQs86.mjs';
|
|
13
|
-
import '../shared/core.
|
|
13
|
+
import '../shared/core.1_FtXl46.mjs';
|
|
14
14
|
import '../shared/core.CzdwsPmY.mjs';
|
|
15
|
-
import '../shared/core.
|
|
15
|
+
import '../shared/core.DmFVWyBc.mjs';
|
|
16
16
|
import '../types/fqnRef.mjs';
|
|
17
|
-
import '../shared/core.DM3vdkO_.mjs';
|
|
18
17
|
import '../types/expression-model.mjs';
|
|
19
18
|
|
|
20
19
|
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>;
|
package/dist/model/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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.DozSPE83.mjs';
|
|
2
2
|
export { c as DeployedInstanceModel, D as DeploymentConnectionModel, e as DeploymentNodeModel, g as DeploymentRelationModel, R as RelationshipsAccum, d as deploymentConnection } from '../shared/core.CsbOakly.mjs';
|
|
3
3
|
export { C as Connection } from '../shared/core.BVNaR17u.mjs';
|
|
4
|
-
export { C as ConnectionModel, d as differenceConnections, c as findAscendingConnections, e as findDeepestNestedConnection, g as findDescendantConnections, h as hasSameSource, i as hasSameSourceTarget, j as hasSameTarget, k as isAnyInOut, l as isIncoming, m as isNestedConnection, n as isOutgoing, o as mergeConnections, q as modelConnection, s as sortConnectionsByBoundaryHierarchy, p as sortDeepestFirst } from '../shared/core.
|
|
4
|
+
export { C as ConnectionModel, d as differenceConnections, c as findAscendingConnections, e as findDeepestNestedConnection, g as findDescendantConnections, h as hasSameSource, i as hasSameSourceTarget, j as hasSameTarget, k as isAnyInOut, l as isIncoming, m as isNestedConnection, n as isOutgoing, o as mergeConnections, q as modelConnection, s as sortConnectionsByBoundaryHierarchy, p as sortDeepestFirst } from '../shared/core.D0EgVMQK.mjs';
|
|
5
5
|
export { R as RichText } from '../shared/core.BqVo8LrH.mjs';
|
|
@@ -2,6 +2,10 @@ import { IsAny, UnionToIntersection, Simplify } from 'type-fest';
|
|
|
2
2
|
|
|
3
3
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
4
4
|
type NonEmptyReadonlyArray<T> = readonly [T, ...T[]];
|
|
5
|
+
type IterableContainer<T = unknown> = ReadonlyArray<T> | readonly [];
|
|
6
|
+
type ReorderedArray<T extends IterableContainer> = {
|
|
7
|
+
-readonly [P in keyof T]: T[number];
|
|
8
|
+
};
|
|
5
9
|
type KeysOf<T> = keyof T extends infer K extends string ? K : never;
|
|
6
10
|
type AllNever<Expressions> = UnionToIntersection<{
|
|
7
11
|
[Name in keyof Expressions]: {
|
|
@@ -54,4 +58,4 @@ interface Link {
|
|
|
54
58
|
*/
|
|
55
59
|
type Coalesce<V extends string, OrIfAny = string> = IsAny<V> extends true ? OrIfAny : V;
|
|
56
60
|
|
|
57
|
-
export type { Coalesce as C, ExclusiveUnion as E,
|
|
61
|
+
export type { Coalesce as C, ExclusiveUnion as E, IterableContainer as I, KeysOf as K, Link as L, NonEmptyArray as N, Predicate as P, ReorderedArray as R, NonEmptyReadonlyArray as a, NTuple as b, IteratorLike as c };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { N as NonEmptyArray } from './core.
|
|
1
|
+
import { I as IterableContainer, R as ReorderedArray, N as NonEmptyArray } from './core.1_FtXl46.mjs';
|
|
2
|
+
import { F as Fqn } from './core.DX-WYEPA.mjs';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Mnemonist DefaultWeakMap Typings
|
|
@@ -186,6 +187,122 @@ declare function nonNullable<T>(value: T, message?: string | (() => string)): No
|
|
|
186
187
|
declare function invariant(condition: any, message?: string): asserts condition;
|
|
187
188
|
declare function nonexhaustive(value: never): never;
|
|
188
189
|
|
|
190
|
+
declare function parentFqn<E extends string>(fqn: E): E | null;
|
|
191
|
+
declare function nameFromFqn<E extends string>(fqn: E): string;
|
|
192
|
+
/**
|
|
193
|
+
* Check if one element is an ancestor of another
|
|
194
|
+
* Composable version
|
|
195
|
+
* @signature
|
|
196
|
+
* isAncestor(another)(ancestor)
|
|
197
|
+
*/
|
|
198
|
+
declare function isAncestor<A extends string | {
|
|
199
|
+
id: string;
|
|
200
|
+
}>(another: NoInfer<A>): (ancestor: A) => boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Check if one element is an ancestor of another
|
|
203
|
+
* @signature
|
|
204
|
+
* isAncestor(ancestor, another)
|
|
205
|
+
*/
|
|
206
|
+
declare function isAncestor<A extends string | {
|
|
207
|
+
id: string;
|
|
208
|
+
}>(ancestor: A, another: A): boolean;
|
|
209
|
+
declare function isSameHierarchy<T extends string>(one: NoInfer<T> | WithId<NoInfer<T>>): (another: T | WithId<T>) => boolean;
|
|
210
|
+
declare function isSameHierarchy<T extends string>(one: T | WithId<T>, another: T | WithId<T>): boolean;
|
|
211
|
+
type WithId<T = string> = {
|
|
212
|
+
id: T;
|
|
213
|
+
};
|
|
214
|
+
declare function isDescendantOf<T extends string>(ancestor: WithId<T>): (descedant: WithId<T>) => boolean;
|
|
215
|
+
declare function isDescendantOf<T extends string>(descedant: WithId<T>, ancestor: WithId<T>): boolean;
|
|
216
|
+
/**
|
|
217
|
+
* How deep in the hierarchy the element is.
|
|
218
|
+
* Root element has depth 1
|
|
219
|
+
*/
|
|
220
|
+
declare function hierarchyLevel<E extends string | {
|
|
221
|
+
id: Fqn;
|
|
222
|
+
}>(elementOfFqn: E): number;
|
|
223
|
+
/**
|
|
224
|
+
* Calculate the distance as number of steps from one element to another, i.e.
|
|
225
|
+
* going up to the common ancestor, then going down to the other element.
|
|
226
|
+
* Sibling distance is always 1
|
|
227
|
+
*
|
|
228
|
+
* Can be used for hierarchical clustering
|
|
229
|
+
*/
|
|
230
|
+
declare function hierarchyDistance<E extends string | {
|
|
231
|
+
id: Fqn;
|
|
232
|
+
}>(one: E, another: E): number;
|
|
233
|
+
declare function commonAncestor<E extends string>(first: E, second: E): E | null;
|
|
234
|
+
/**
|
|
235
|
+
* Get all ancestor elements (i.e. parent, parent’s parent, etc.)
|
|
236
|
+
* going up from parent to the root
|
|
237
|
+
*/
|
|
238
|
+
declare function ancestorsFqn<Id extends string>(fqn: Id): Id[];
|
|
239
|
+
/**
|
|
240
|
+
* Compares two fully qualified names (fqns) hierarchically based on their depth.
|
|
241
|
+
* From parent nodes to leaves
|
|
242
|
+
*
|
|
243
|
+
* @param {string} a - The first fqn to compare.
|
|
244
|
+
* @param {string} b - The second fqn to compare.
|
|
245
|
+
* @returns {number} - 0 if the fqns have the same depth.
|
|
246
|
+
* - Positive number if a is deeper than b.
|
|
247
|
+
* - Negative number if b is deeper than a.
|
|
248
|
+
*/
|
|
249
|
+
declare function compareFqnHierarchically<T extends string = string>(a: T, b: T): -1 | 0 | 1;
|
|
250
|
+
declare function compareByFqnHierarchically<T extends {
|
|
251
|
+
id: string;
|
|
252
|
+
}>(a: T, b: T): -1 | 0 | 1;
|
|
253
|
+
/**
|
|
254
|
+
* Sorts an array of objects hierarchically based on their fully qualified names (FQN).
|
|
255
|
+
* Objects are sorted by the number of segments in their FQN (defined by dot-separated ID).
|
|
256
|
+
*
|
|
257
|
+
* @typeParam T - Object type that contains an 'id' string property
|
|
258
|
+
* @typeParam A - Type extending IterableContainer of T
|
|
259
|
+
*
|
|
260
|
+
* @param array - Array of objects to be sorted
|
|
261
|
+
* @returns A new array with items sorted by their FQN hierarchy depth (number of segments)
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* ```ts
|
|
265
|
+
* const items = [
|
|
266
|
+
* { id: "a.b.c" },
|
|
267
|
+
* { id: "a" },
|
|
268
|
+
* { id: "a.b" }
|
|
269
|
+
* ];
|
|
270
|
+
* sortByFqnHierarchically(items);
|
|
271
|
+
* // Result: [
|
|
272
|
+
* // { id: "a" },
|
|
273
|
+
* // { id: "a.b" },
|
|
274
|
+
* // { id: "a.b.c" }
|
|
275
|
+
* // ]
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
278
|
+
declare function sortByFqnHierarchically<T extends {
|
|
279
|
+
id: string;
|
|
280
|
+
}, A extends IterableContainer<T>>(array: A): ReorderedArray<A>;
|
|
281
|
+
/**
|
|
282
|
+
* Keeps initial order of the elements, but ensures that parents are before children
|
|
283
|
+
*/
|
|
284
|
+
declare function sortParentsFirst<T extends {
|
|
285
|
+
id: string;
|
|
286
|
+
}, A extends IterableContainer<T>>(array: A): ReorderedArray<A>;
|
|
287
|
+
/**
|
|
288
|
+
* Sorts an array of objects naturally by their fully qualified name (FQN) identifier.
|
|
289
|
+
*
|
|
290
|
+
* @template T - Type of objects containing an 'id' string property
|
|
291
|
+
* @template A - Type extending IterableContainer of T
|
|
292
|
+
*
|
|
293
|
+
* @param first - Optional. Either the array to sort or the sort direction ('asc'|'desc')
|
|
294
|
+
* @param sort - Optional. The sort direction ('asc'|'desc'). Defaults to 'asc' if not specified
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* // As a function that returns a sorting function
|
|
298
|
+
* const sorted = sortNaturalByFqn('desc')(myArray);
|
|
299
|
+
*
|
|
300
|
+
* // Direct array sorting
|
|
301
|
+
* const sorted = sortNaturalByFqn(myArray, 'desc');
|
|
302
|
+
*/
|
|
303
|
+
declare function sortNaturalByFqn(sort?: 'asc' | 'desc'): <I extends WithId<string>, A extends IterableContainer<I>>(array: A) => ReorderedArray<A>;
|
|
304
|
+
declare function sortNaturalByFqn<A extends IterableContainer<WithId>>(array: A, sort?: 'asc' | 'desc'): ReorderedArray<A>;
|
|
305
|
+
|
|
189
306
|
declare function isString(value: unknown): value is string;
|
|
190
307
|
declare function isNonEmptyArray<A>(arr: ArrayLike<A> | undefined): arr is NonEmptyArray<A>;
|
|
191
308
|
|
|
@@ -210,4 +327,4 @@ declare function isNonEmptyArray<A>(arr: ArrayLike<A> | undefined): arr is NonEm
|
|
|
210
327
|
*/
|
|
211
328
|
declare function memoizeProp<Tag extends symbol | string, Res>(obj: object, tag: Tag, fn: () => Res): Res;
|
|
212
329
|
|
|
213
|
-
export { BiMap as B, DefaultWeakMap as D, LinkedList as L, MultiMap as M, Queue as Q,
|
|
330
|
+
export { BiMap as B, DefaultWeakMap as D, LinkedList as L, MultiMap as M, Queue as Q, ancestorsFqn as a, isAncestor as b, isDescendantOf as c, isNonEmptyArray as d, isSameHierarchy as e, isString as f, nonexhaustive as g, nonNullable as h, invariant as i, sortParentsFirst as j, commonAncestor as k, compareByFqnHierarchically as l, memoizeProp as m, nameFromFqn as n, compareFqnHierarchically as o, parentFqn as p, hierarchyDistance as q, hierarchyLevel as r, sortNaturalByFqn as s, sortByFqnHierarchically as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IfNever, IsNever, IsLiteral } from 'type-fest';
|
|
2
|
-
import { C as Coalesce, L as Link } from './core.
|
|
2
|
+
import { C as Coalesce, L as Link } from './core.1_FtXl46.mjs';
|
|
3
3
|
import { D as DeploymentFqn$1, F as Fqn$1, d as RelationId$1, N as NodeId$1, j as EdgeId$1, P as ProjectId$1, V as ViewId$1, T as Tag$1, E as ElementKind$1, b as DeploymentKind$1, c as RelationshipKind } from './core.DX-WYEPA.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Simplify, MergeExclusive, Tagged, NonEmptyTuple, IsNever, IsAny } from 'type-fest';
|
|
2
|
-
import { A as Any, W as WithOptionalTags, z as WithOptionalLinks, g as StrictViewId, e as _stage, f as _type, F as Fqn, B as WithMetadata, h as ElementKind, l as Tags, m as Metadata, R as RelationKind, V as ViewId, U as Unknown, s as DeploymentFqn, o as DeploymentKind, T as Tag, n as MetadataKey, E as ExtractOnStage, M as ModelStage, P as ProjectId$1, j as ElementId, D as DeploymentId, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted, S as SpecAux, a as Aux, N as Never } from './core.
|
|
3
|
-
import { N as NonEmptyArray, E as ExclusiveUnion, L as Link, K as KeysOf } from './core.
|
|
2
|
+
import { A as Any, W as WithOptionalTags, z as WithOptionalLinks, g as StrictViewId, e as _stage, f as _type, F as Fqn, B as WithMetadata, h as ElementKind, l as Tags, m as Metadata, R as RelationKind, V as ViewId, U as Unknown, s as DeploymentFqn, o as DeploymentKind, T as Tag, n as MetadataKey, E as ExtractOnStage, M as ModelStage, P as ProjectId$1, j as ElementId, D as DeploymentId, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted, S as SpecAux, a as Aux, N as Never } from './core.B4scjmM6.mjs';
|
|
3
|
+
import { N as NonEmptyArray, E as ExclusiveUnion, L as Link, K as KeysOf } from './core.1_FtXl46.mjs';
|
|
4
4
|
import { ModelExpression, ModelFqnExpr } from '../types/expression-model.mjs';
|
|
5
5
|
import { I as Icon, M as MarkdownOrString, d as RelationId, T as Tag$1, P as ProjectId, N as NodeId, j as EdgeId, m as StepEdgeKind } from './core.DX-WYEPA.mjs';
|
|
6
6
|
import { b as BorderStyle, a as ShapeSize, S as SpacingSize, T as TextSize, i as Color, c as ElementShape, R as RelationshipLineType, f as RelationshipArrowType, h as ThemeColor, C as ColorLiteral, e as CustomColorDefinitions } from './core.CzdwsPmY.mjs';
|
|
7
7
|
import { FqnRef } from '../types/fqnRef.mjs';
|
|
8
|
-
import { E as Expression, F as FqnExpr } from './core.
|
|
8
|
+
import { E as Expression, F as FqnExpr } from './core.DmFVWyBc.mjs';
|
|
9
9
|
|
|
10
10
|
type Point = readonly [x: number, y: number];
|
|
11
11
|
interface XYPoint {
|
|
@@ -1,7 +1,7 @@
|
|
|
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.
|
|
3
|
-
import { A as Any, C as EdgeId } from './core.
|
|
4
|
-
import {
|
|
1
|
+
import { C as Connection, c as customInspectSymbol } from './core.Chtad_Hv.mjs';
|
|
2
|
+
import { e as DeploymentElementModel, i as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.PFqKFee4.mjs';
|
|
3
|
+
import { A as Any, C as EdgeId } from './core.B4scjmM6.mjs';
|
|
4
|
+
import { c as IteratorLike } from './core.1_FtXl46.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Connection is ephemeral entity, result of a resolving relationships between source and target.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as Connection, c as customInspectSymbol } from './core.
|
|
2
|
-
import { E as ElementModel, R as RelationshipModel } from './core.
|
|
3
|
-
import { A as Any, U as Unknown, C as EdgeId } from './core.
|
|
1
|
+
import { C as Connection, c as customInspectSymbol } from './core.Chtad_Hv.mjs';
|
|
2
|
+
import { E as ElementModel, R as RelationshipModel } from './core.PFqKFee4.mjs';
|
|
3
|
+
import { A as Any, U as Unknown, C as EdgeId } from './core.B4scjmM6.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Connection refers to any relationships between two elements,
|
|
@@ -13,7 +13,7 @@ import { i as isGroupElementKind, G as GroupElementKind, d as stepEdgeId } from
|
|
|
13
13
|
import { a as DefaultElementShape, D as DefaultThemeColor, f as DefaultArrowType, e as DefaultLineStyle, g as DefaultRelationshipColor } from './core.BqVo8LrH.mjs';
|
|
14
14
|
import { FqnExpr, RelationExpr } from '../types/expression.mjs';
|
|
15
15
|
import { d as deploymentConnection, R as RelationshipsAccum, D as DeploymentConnectionModel } from './core.CsbOakly.mjs';
|
|
16
|
-
import { c as findAscendingConnections, o as mergeConnections, d as differenceConnections, m as isNestedConnection, s as sortConnectionsByBoundaryHierarchy, a as findConnectionsBetween$3, q as modelConnection, g as findDescendantConnections, e as findDeepestNestedConnection, k as isAnyInOut, n as isOutgoing, l as isIncoming, C as ConnectionModel } from './core.
|
|
16
|
+
import { c as findAscendingConnections, o as mergeConnections, d as differenceConnections, m as isNestedConnection, s as sortConnectionsByBoundaryHierarchy, a as findConnectionsBetween$3, q as modelConnection, g as findDescendantConnections, e as findDeepestNestedConnection, k as isAnyInOut, n as isOutgoing, l as isIncoming, C as ConnectionModel } from './core.D0EgVMQK.mjs';
|
|
17
17
|
import { a as toSet, t as toArray, i as imap } from './core.DLpidoWc.mjs';
|
|
18
18
|
import { D as DefaultMap } from './core.BuoXfSMj.mjs';
|
|
19
19
|
import { i as ifilter } from './core.CCD1ID81.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ElementModel, e as DeploymentElementModel } from './core.
|
|
2
|
-
import { A as Any } from './core.
|
|
1
|
+
import { E as ElementModel, e as DeploymentElementModel } from './core.PFqKFee4.mjs';
|
|
2
|
+
import { A as Any } from './core.B4scjmM6.mjs';
|
|
3
3
|
import { F as Fqn } from './core.DX-WYEPA.mjs';
|
|
4
4
|
|
|
5
5
|
interface Connection<Elem = ElementModel<Any> | DeploymentElementModel<Any>, Id = string> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pipe, map,
|
|
1
|
+
import { pipe, map, isNot } from 'remeda';
|
|
2
2
|
import { c as customInspectSymbol } from './core.BVNaR17u.mjs';
|
|
3
3
|
import { i as intersection, a as stringHash, u as union, d as difference, e as equals } from './core.4u1dVmfX.mjs';
|
|
4
4
|
import { b as isDescendantOf, i as isAncestor, e as isString, s as sortNaturalByFqn, d as isSameHierarchy } from './core.DgttqsJc.mjs';
|
|
@@ -43,7 +43,9 @@ function sortDeepestFirst(connections) {
|
|
|
43
43
|
}
|
|
44
44
|
return sorted;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
function boundaryHierarchy(conn) {
|
|
47
|
+
return conn.boundary?.id ? `.${conn.boundary.id}` : "";
|
|
48
|
+
}
|
|
47
49
|
function sortConnectionsByBoundaryHierarchy(connections, sort) {
|
|
48
50
|
if (!connections || isString(connections)) {
|
|
49
51
|
const dir = connections ?? "asc";
|
|
@@ -59,7 +61,7 @@ function _sortByBoundary(connections, order) {
|
|
|
59
61
|
conn
|
|
60
62
|
})),
|
|
61
63
|
sortNaturalByFqn(order),
|
|
62
|
-
map(
|
|
64
|
+
map((p) => p.conn)
|
|
63
65
|
);
|
|
64
66
|
}
|
|
65
67
|
function findAscendingConnections(connections, connection) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Any, T as Tag, k as AllKinds, l as Tags, g as StrictViewId, h as ElementKind } from './core.
|
|
2
|
-
import { N as NonEmptyArray, E as ExclusiveUnion } from './core.
|
|
1
|
+
import { A as Any, T as Tag, k as AllKinds, l as Tags, g as StrictViewId, h as ElementKind } from './core.B4scjmM6.mjs';
|
|
2
|
+
import { N as NonEmptyArray, E as ExclusiveUnion } from './core.1_FtXl46.mjs';
|
|
3
3
|
import { FqnRef } from '../types/fqnRef.mjs';
|
|
4
4
|
import { M as MarkdownOrString, I as Icon } from './core.DX-WYEPA.mjs';
|
|
5
5
|
import { i as Color, R as RelationshipLineType, f as RelationshipArrowType, c as ElementShape, b as BorderStyle, a as ShapeSize } from './core.CzdwsPmY.mjs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as Any, R as RelationKind, l as Tags, m as Metadata, n as MetadataKey, L as LooseTag, F as Fqn, j as ElementId, h as ElementKind, o as DeploymentKind, E as ExtractOnStage, p as RelationId$1, g as StrictViewId, f as _type, q as LooseElementId, r as LooseDeploymentId, s as DeploymentFqn, t as toComputed, u as toLayouted, v as Stage, D as DeploymentId, U as Unknown, V as ViewId, T as Tag, w as toParsed, P as ProjectId$1, x as LooseViewId, a as Aux, S as SpecAux, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted } from './core.
|
|
1
|
+
import { A as Any, R as RelationKind, l as Tags, m as Metadata, n as MetadataKey, L as LooseTag, F as Fqn, j as ElementId, h as ElementKind, o as DeploymentKind, E as ExtractOnStage, p as RelationId$1, g as StrictViewId, f as _type, q as LooseElementId, r as LooseDeploymentId, s as DeploymentFqn, t as toComputed, u as toLayouted, v as Stage, D as DeploymentId, U as Unknown, V as ViewId, T as Tag, w as toParsed, P as ProjectId$1, x as LooseViewId, a as Aux, S as SpecAux, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted } from './core.B4scjmM6.mjs';
|
|
2
2
|
import { d as RelationId, P as ProjectId, a as IconUrl, N as NodeId, G as GroupElementKind, j as EdgeId, k as StepEdgeId, V as ViewId$1 } from './core.DX-WYEPA.mjs';
|
|
3
3
|
import { D as DefaultMap } from './core.CywrQs86.mjs';
|
|
4
4
|
import { SetRequired } from 'type-fest';
|
|
5
|
-
import { b as RichTextOrEmpty, N as Relationship, F as Element, E as ElementStyle, a4 as ViewWithType, a0 as ComputedView, _ as LayoutedView, h as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, L as LayoutedLikeC4ModelData, k as DeployedInstance, D as DeploymentElementStyle, p as DeploymentRelationship, l as DeploymentElement, j as DeploymentNode, s as LikeC4ModelDump, u as AuxFromDump, Y as LikeC4Project, W as Specification, M as ModelGlobals } from './core.
|
|
6
|
-
import {
|
|
5
|
+
import { b as RichTextOrEmpty, N as Relationship, F as Element, E as ElementStyle, a4 as ViewWithType, a0 as ComputedView, _ as LayoutedView, h as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, L as LayoutedLikeC4ModelData, k as DeployedInstance, D as DeploymentElementStyle, p as DeploymentRelationship, l as DeploymentElement, j as DeploymentNode, s as LikeC4ModelDump, u as AuxFromDump, Y as LikeC4Project, W as Specification, M as ModelGlobals } from './core.B65NlqR_.mjs';
|
|
6
|
+
import { c as IteratorLike, L as Link, N as NonEmptyArray } from './core.1_FtXl46.mjs';
|
|
7
7
|
import { i as Color, R as RelationshipLineType, c as ElementShape } from './core.CzdwsPmY.mjs';
|
|
8
|
-
import { W as WhereOperator } from './core.
|
|
8
|
+
import { W as WhereOperator } from './core.DmFVWyBc.mjs';
|
|
9
9
|
import { FqnRef } from '../types/fqnRef.mjs';
|
|
10
10
|
|
|
11
11
|
type RelationshipsIterator<A extends Any> = IteratorLike<RelationshipModel<A>>;
|
package/dist/types/_aux.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'type-fest';
|
|
2
|
-
import '../shared/core.
|
|
3
|
-
export { k as AllKinds, A as Any, A as AnyAux, G as AnySpec, a as Aux, s as DeploymentFqn, D as DeploymentId, o as DeploymentKind, C as EdgeId, j as ElementId, h as ElementKind, F as Fqn, r as LooseDeploymentId, a4 as LooseDeploymentKind, q as LooseElementId, a3 as LooseElementKind, a5 as LooseRelationKind, L as LooseTag, a2 as LooseTags, x as LooseViewId, m as Metadata, n as MetadataKey, N as Never, J as NodeId, a1 as OrString, H as PickByStage, P as ProjectId, p as RelationId, R as RelationKind, K as Spec, S as SpecAux, v as Stage, s as StrictDeploymentFqn, Y as StrictDeploymentKind, X as StrictElementKind, F as StrictFqn, O as StrictProjectId, Z as StrictRelationKind, Q as StrictTag, g as StrictViewId, T as Tag, l as Tags, U as Unknown, b as UnknownComputed, c as UnknownLayouted, d as UnknownParsed, V as ViewId, a0 as WithLinks, B as WithMetadata, z as WithOptionalLinks, W as WithOptionalTags, $ as WithTags, y as setProject, I as setStage, t as toComputed, u as toLayouted, w as toParsed } from '../shared/core.
|
|
2
|
+
import '../shared/core.1_FtXl46.mjs';
|
|
3
|
+
export { k as AllKinds, A as Any, A as AnyAux, G as AnySpec, a as Aux, s as DeploymentFqn, D as DeploymentId, o as DeploymentKind, C as EdgeId, j as ElementId, h as ElementKind, F as Fqn, r as LooseDeploymentId, a4 as LooseDeploymentKind, q as LooseElementId, a3 as LooseElementKind, a5 as LooseRelationKind, L as LooseTag, a2 as LooseTags, x as LooseViewId, m as Metadata, n as MetadataKey, N as Never, J as NodeId, a1 as OrString, H as PickByStage, P as ProjectId, p as RelationId, R as RelationKind, K as Spec, S as SpecAux, v as Stage, s as StrictDeploymentFqn, Y as StrictDeploymentKind, X as StrictElementKind, F as StrictFqn, O as StrictProjectId, Z as StrictRelationKind, Q as StrictTag, g as StrictViewId, T as Tag, l as Tags, U as Unknown, b as UnknownComputed, c as UnknownLayouted, d as UnknownParsed, V as ViewId, a0 as WithLinks, B as WithMetadata, z as WithOptionalLinks, W as WithOptionalTags, $ as WithTags, y as setProject, I as setStage, t as toComputed, u as toLayouted, w as toParsed } from '../shared/core.B4scjmM6.mjs';
|
|
4
4
|
import '../shared/core.DX-WYEPA.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as Any, g as StrictViewId, h as ElementKind, T as Tag } from '../shared/core.
|
|
2
|
-
import { E as ExclusiveUnion } from '../shared/core.
|
|
3
|
-
import { W as WhereOperator, P as PredicateSelector } from '../shared/core.
|
|
1
|
+
import { A as Any, g as StrictViewId, h as ElementKind, T as Tag } from '../shared/core.B4scjmM6.mjs';
|
|
2
|
+
import { E as ExclusiveUnion } from '../shared/core.1_FtXl46.mjs';
|
|
3
|
+
import { W as WhereOperator, P as PredicateSelector } from '../shared/core.DmFVWyBc.mjs';
|
|
4
4
|
import { FqnRef } from './fqnRef.mjs';
|
|
5
5
|
import { M as MarkdownOrString, I as Icon } from '../shared/core.DX-WYEPA.mjs';
|
|
6
6
|
import { i as Color, R as RelationshipLineType, f as RelationshipArrowType, c as ElementShape, b as BorderStyle, a as ShapeSize } from '../shared/core.CzdwsPmY.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import '../shared/core.
|
|
2
|
-
import '../shared/core.
|
|
1
|
+
import '../shared/core.B4scjmM6.mjs';
|
|
2
|
+
import '../shared/core.1_FtXl46.mjs';
|
|
3
3
|
import './fqnRef.mjs';
|
|
4
|
-
export { E as Expression, F as FqnExpr, P as PredicateSelector, R as RelationExpr } from '../shared/core.
|
|
4
|
+
export { E as Expression, F as FqnExpr, P as PredicateSelector, R as RelationExpr } from '../shared/core.DmFVWyBc.mjs';
|
|
5
5
|
import '../shared/core.DX-WYEPA.mjs';
|
|
6
6
|
import '../shared/core.CzdwsPmY.mjs';
|
|
7
7
|
import 'type-fest';
|
package/dist/types/fqnRef.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Any, U as Unknown$1, j as ElementId, P as ProjectId, F as Fqn, D as DeploymentId } from '../shared/core.
|
|
2
|
-
import { E as ExclusiveUnion } from '../shared/core.
|
|
1
|
+
import { A as Any, U as Unknown$1, j as ElementId, P as ProjectId, F as Fqn, D as DeploymentId } from '../shared/core.B4scjmM6.mjs';
|
|
2
|
+
import { E as ExclusiveUnion } from '../shared/core.1_FtXl46.mjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import '../shared/core.DX-WYEPA.mjs';
|
|
5
5
|
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { N as NonEmptyArray } from '../shared/core.
|
|
2
|
-
export { C as Coalesce, E as ExclusiveUnion, I as IteratorLike, K as KeysOf, L as Link, b as NTuple, a as NonEmptyReadonlyArray, P as Predicate } from '../shared/core.
|
|
3
|
-
export { A as Any, A as AnyAux, a as Aux, E as ExtractOnStage, M as ModelStage, S as SpecAux, U as Unknown, b as UnknownComputed, c as UnknownLayouted, d as UnknownParsed, e as _stage, f as _type, _ as aux, i as isOnStage } from '../shared/core.
|
|
4
|
-
export { A as AndOperator, a as EqualOperator, E as Expression, j as Filterable, F as FqnExpr, K as KindEqual, N as NotOperator, k as OperatorPredicate, O as OrOperator, c as Participant, d as ParticipantOperator, P as PredicateSelector, R as RelationExpr, T as TagEqual, W as WhereOperator, g as isAndOperator, b as isKindEqual, f as isNotOperator, h as isOrOperator, e as isParticipantOperator, i as isTagEqual, w as whereOperatorAsPredicate } from '../shared/core.
|
|
1
|
+
import { N as NonEmptyArray } from '../shared/core.1_FtXl46.mjs';
|
|
2
|
+
export { C as Coalesce, E as ExclusiveUnion, I as IterableContainer, c as IteratorLike, K as KeysOf, L as Link, b as NTuple, a as NonEmptyReadonlyArray, P as Predicate, R as ReorderedArray } from '../shared/core.1_FtXl46.mjs';
|
|
3
|
+
export { A as Any, A as AnyAux, a as Aux, E as ExtractOnStage, M as ModelStage, S as SpecAux, U as Unknown, b as UnknownComputed, c as UnknownLayouted, d as UnknownParsed, e as _stage, f as _type, _ as aux, i as isOnStage } from '../shared/core.B4scjmM6.mjs';
|
|
4
|
+
export { A as AndOperator, a as EqualOperator, E as Expression, j as Filterable, F as FqnExpr, K as KindEqual, N as NotOperator, k as OperatorPredicate, O as OrOperator, c as Participant, d as ParticipantOperator, P as PredicateSelector, R as RelationExpr, T as TagEqual, W as WhereOperator, g as isAndOperator, b as isKindEqual, f as isNotOperator, h as isOrOperator, e as isParticipantOperator, i as isTagEqual, w as whereOperatorAsPredicate } from '../shared/core.DmFVWyBc.mjs';
|
|
5
5
|
export { ModelExpression, ModelFqnExpr, ModelRelationExpr } from './expression-model.mjs';
|
|
6
6
|
export { FqnRef } from './fqnRef.mjs';
|
|
7
|
-
import { ar as ViewManualLayout, am as AutoLayoutDirection } from '../shared/core.
|
|
8
|
-
export { K as AbstractRelationship, ag as AnyExcludePredicate, af as AnyIncludePredicate, a2 as AnyView, ah as AnyViewRuleStyle, u as AuxFromDump, A as AuxFromLikeC4ModelData, B as BBox, au as BaseParsedViewProperties, at as BaseViewProperties, aB as ComputedDeploymentView, aC as ComputedDynamicView, az as ComputedEdge, aA as ComputedElementView, C as ComputedLikeC4ModelData, ay as ComputedNode, a0 as ComputedView, I as DefaultArrowType, w as DefaultElementShape, H as DefaultLineStyle, y as DefaultPaddingSize, J as DefaultRelationshipColor, x as DefaultShapeSize, z as DefaultTextSize, v as DefaultThemeColor, k as DeployedInstance, l as DeploymentElement, m as DeploymentElementRef, D as DeploymentElementStyle, j as DeploymentNode, q as DeploymentRelation, p as DeploymentRelationship, aJ as DeploymentViewExcludePredicate, aI as DeploymentViewIncludePredicate, aK as DeploymentViewPredicate, aM as DeploymentViewRule, aL as DeploymentViewRuleStyle, aE as DiagramEdge, aD as DiagramNode, _ as DiagramView, aS as DynamicViewIncludeRule, aP as DynamicViewParallelSteps, aT as DynamicViewRule, aO as DynamicViewStep, aR as DynamicViewStepOrParallel, F as Element, Q as ElementSpecification, E as ElementStyle, aX as ElementViewExcludePredicate, aW as ElementViewIncludePredicate, aY as ElementViewPredicate, b0 as ElementViewRule, aZ as ElementViewRuleGroup, a$ as ElementViewRuleStyle, e as GlobalDynamicPredicates, G as GlobalPredicateId, d as GlobalPredicates, f as GlobalStyleID, g as GlobalStyles, aG as LayoutedDeploymentView, aH as LayoutedDynamicView, aF as LayoutedElementView, L as LayoutedLikeC4ModelData, _ as LayoutedView, i as LikeC4ModelData, s as LikeC4ModelDump, Y as LikeC4Project, Z as LikeC4View, M as ModelGlobals, O as ModelRelation, av as NodeNotation, aN as ParsedDeploymentView, aU as ParsedDynamicView, b1 as ParsedElementView, h as ParsedLikeC4ModelData, Z as ParsedView, P as Point, a1 as ProcessedView, t as ProjectDump, c as RectBox, N as Relationship, V as RelationshipSpecification, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, r as SpecTypesFromDump, W as Specification, S as SpecificationDump, T as TagSpecification, aq as ViewAutoLayout, a3 as ViewOnStage, a5 as ViewRule, ao as ViewRuleAutoLayout, ak as ViewRuleGlobalPredicateRef, ai as ViewRuleGlobalStyle, a6 as ViewRulePredicate, as as ViewType, ax as ViewWithHash, aw as ViewWithNotation, a4 as ViewWithType, X as XYPoint, aQ as getParallelStepsPrefix, an as isAutoLayoutDirection, a9 as isComputedView, o as isDeployedInstance, n as isDeploymentNode, ad as isDeploymentView, $ as isDiagramView, ae as isDynamicView, aV as isDynamicViewParallelSteps, aa as isElementView, ac as isExtendsElementView, $ as isLayoutedView, ab as isScopedElementView, U as isTagColorSpecified, ap as isViewRuleAutoLayout, al as isViewRuleGlobalPredicateRef, aj as isViewRuleGlobalStyle, a_ as isViewRuleGroup, a7 as isViewRulePredicate, a8 as isViewRuleStyle } from '../shared/core.
|
|
7
|
+
import { ar as ViewManualLayout, am as AutoLayoutDirection } from '../shared/core.B65NlqR_.mjs';
|
|
8
|
+
export { K as AbstractRelationship, ag as AnyExcludePredicate, af as AnyIncludePredicate, a2 as AnyView, ah as AnyViewRuleStyle, u as AuxFromDump, A as AuxFromLikeC4ModelData, B as BBox, au as BaseParsedViewProperties, at as BaseViewProperties, aB as ComputedDeploymentView, aC as ComputedDynamicView, az as ComputedEdge, aA as ComputedElementView, C as ComputedLikeC4ModelData, ay as ComputedNode, a0 as ComputedView, I as DefaultArrowType, w as DefaultElementShape, H as DefaultLineStyle, y as DefaultPaddingSize, J as DefaultRelationshipColor, x as DefaultShapeSize, z as DefaultTextSize, v as DefaultThemeColor, k as DeployedInstance, l as DeploymentElement, m as DeploymentElementRef, D as DeploymentElementStyle, j as DeploymentNode, q as DeploymentRelation, p as DeploymentRelationship, aJ as DeploymentViewExcludePredicate, aI as DeploymentViewIncludePredicate, aK as DeploymentViewPredicate, aM as DeploymentViewRule, aL as DeploymentViewRuleStyle, aE as DiagramEdge, aD as DiagramNode, _ as DiagramView, aS as DynamicViewIncludeRule, aP as DynamicViewParallelSteps, aT as DynamicViewRule, aO as DynamicViewStep, aR as DynamicViewStepOrParallel, F as Element, Q as ElementSpecification, E as ElementStyle, aX as ElementViewExcludePredicate, aW as ElementViewIncludePredicate, aY as ElementViewPredicate, b0 as ElementViewRule, aZ as ElementViewRuleGroup, a$ as ElementViewRuleStyle, e as GlobalDynamicPredicates, G as GlobalPredicateId, d as GlobalPredicates, f as GlobalStyleID, g as GlobalStyles, aG as LayoutedDeploymentView, aH as LayoutedDynamicView, aF as LayoutedElementView, L as LayoutedLikeC4ModelData, _ as LayoutedView, i as LikeC4ModelData, s as LikeC4ModelDump, Y as LikeC4Project, Z as LikeC4View, M as ModelGlobals, O as ModelRelation, av as NodeNotation, aN as ParsedDeploymentView, aU as ParsedDynamicView, b1 as ParsedElementView, h as ParsedLikeC4ModelData, Z as ParsedView, P as Point, a1 as ProcessedView, t as ProjectDump, c as RectBox, N as Relationship, V as RelationshipSpecification, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, r as SpecTypesFromDump, W as Specification, S as SpecificationDump, T as TagSpecification, aq as ViewAutoLayout, a3 as ViewOnStage, a5 as ViewRule, ao as ViewRuleAutoLayout, ak as ViewRuleGlobalPredicateRef, ai as ViewRuleGlobalStyle, a6 as ViewRulePredicate, as as ViewType, ax as ViewWithHash, aw as ViewWithNotation, a4 as ViewWithType, X as XYPoint, aQ as getParallelStepsPrefix, an as isAutoLayoutDirection, a9 as isComputedView, o as isDeployedInstance, n as isDeploymentNode, ad as isDeploymentView, $ as isDiagramView, ae as isDynamicView, aV as isDynamicViewParallelSteps, aa as isElementView, ac as isExtendsElementView, $ as isLayoutedView, ab as isScopedElementView, U as isTagColorSpecified, ap as isViewRuleAutoLayout, al as isViewRuleGlobalPredicateRef, aj as isViewRuleGlobalStyle, a_ as isViewRuleGroup, a7 as isViewRulePredicate, a8 as isViewRuleStyle } from '../shared/core.B65NlqR_.mjs';
|
|
9
9
|
import { F as Fqn, D as DeploymentFqn } from '../shared/core.DX-WYEPA.mjs';
|
|
10
10
|
export { A as AnyFqn, B as BuiltInIcon, b as DeploymentKind, j as EdgeId, E as ElementKind, e as GlobalFqn, G as GroupElementKind, I as Icon, a as IconUrl, M as MarkdownOrString, N as NodeId, P as ProjectId, d as RelationId, R as RelationKind, c as RelationshipKind, k as StepEdgeId, S as StepEdgeIdLiteral, m as StepEdgeKind, T as Tag, V as ViewId, o as extractStep, f as flattenMarkdownOrString, g as isGlobalFqn, i as isGroupElementKind, n as isStepEdgeId, s as scalar, h as splitGlobalFqn, l as stepEdgeId } from '../shared/core.DX-WYEPA.mjs';
|
|
11
11
|
import { b as BorderStyle, c as ElementShape, h as ThemeColor } from '../shared/core.CzdwsPmY.mjs';
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { D as DefaultMap } from '../shared/core.CywrQs86.mjs';
|
|
2
|
-
export { B as BiMap, D as DefaultWeakMap, L as LinkedList, M as MultiMap, Q as Queue, i as invariant,
|
|
3
|
-
|
|
4
|
-
import { N as NonEmptyArray } from '../shared/core.DuSLYTG6.mjs';
|
|
2
|
+
export { B as BiMap, D as DefaultWeakMap, L as LinkedList, M as MultiMap, Q as Queue, a as ancestorsFqn, k as commonAncestor, l as compareByFqnHierarchically, o as compareFqnHierarchically, q as hierarchyDistance, r as hierarchyLevel, i as invariant, b as isAncestor, c as isDescendantOf, d as isNonEmptyArray, e as isSameHierarchy, f as isString, m as memoizeProp, n as nameFromFqn, h as nonNullable, g as nonexhaustive, p as parentFqn, t as sortByFqnHierarchically, s as sortNaturalByFqn, j as sortParentsFirst } from '../shared/core.1ypAWObi.mjs';
|
|
3
|
+
import { N as NonEmptyArray } from '../shared/core.1_FtXl46.mjs';
|
|
5
4
|
export { ifilter, ifind, ifirst, iflat, ihead, imap, ireduce, isome, iunique, toArray, toSet } from './iterable/index.mjs';
|
|
6
5
|
export { i as isIterable } from '../shared/core.DXhDWKFZ.mjs';
|
|
7
6
|
import '../shared/core.DX-WYEPA.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likec4/core",
|
|
3
|
-
"version": "1.39.
|
|
3
|
+
"version": "1.39.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://likec4.dev",
|
|
6
6
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"type-fest": "^4.41.0",
|
|
101
101
|
"unified": "11.0.5",
|
|
102
102
|
"chroma-js": "^3.1.2",
|
|
103
|
-
"remeda": "^2.
|
|
103
|
+
"remeda": "^2.30.0",
|
|
104
104
|
"defu": "^6.1.4",
|
|
105
105
|
"@mantine/colors-generator": "8.2.8"
|
|
106
106
|
},
|
|
@@ -121,12 +121,12 @@
|
|
|
121
121
|
"natural-compare-lite": "^1.4.0",
|
|
122
122
|
"object-hash": "^3.0.0",
|
|
123
123
|
"obliterator": "^2.0.5",
|
|
124
|
-
"fdir": "6.
|
|
124
|
+
"fdir": "6.5.0",
|
|
125
125
|
"turbo": "2.5.6",
|
|
126
126
|
"typescript": "5.9.2",
|
|
127
127
|
"unbuild": "3.5.0",
|
|
128
128
|
"vitest": "3.2.4",
|
|
129
|
-
"@likec4/tsconfig": "1.39.
|
|
129
|
+
"@likec4/tsconfig": "1.39.4"
|
|
130
130
|
},
|
|
131
131
|
"scripts": {
|
|
132
132
|
"typecheck": "tsc -b --verbose",
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { map, pipe
|
|
1
|
+
import { map, pipe } from 'remeda'
|
|
2
|
+
import type { IterableContainer, ReorderedArray } from '../../types'
|
|
2
3
|
import { isString } from '../../utils'
|
|
3
4
|
import {
|
|
4
|
-
type IterableContainer,
|
|
5
|
-
type ReorderedArray,
|
|
6
5
|
isAncestor,
|
|
7
6
|
isDescendantOf,
|
|
8
7
|
sortNaturalByFqn,
|
|
@@ -78,9 +77,12 @@ export function sortDeepestFirst<C extends ConnectionElemId>(
|
|
|
78
77
|
* To make {@link sortConnectionsByBoundaryHierarchy} work correctly we add '.' to boundary
|
|
79
78
|
* Othwerwise connection without boundary will be considered same level as connection with top-level boundary
|
|
80
79
|
*/
|
|
81
|
-
export
|
|
80
|
+
export function boundaryHierarchy<C extends WithBoundary>(conn: C): string {
|
|
81
|
+
return conn.boundary?.id ? `.${conn.boundary.id}` : ''
|
|
82
|
+
}
|
|
82
83
|
|
|
83
84
|
type WithBoundary = {
|
|
85
|
+
id: string
|
|
84
86
|
boundary: null | { id: string }
|
|
85
87
|
}
|
|
86
88
|
export function sortConnectionsByBoundaryHierarchy(
|
|
@@ -109,10 +111,10 @@ function _sortByBoundary<C extends WithBoundary>(
|
|
|
109
111
|
connections,
|
|
110
112
|
map(conn => ({
|
|
111
113
|
id: boundaryHierarchy(conn),
|
|
112
|
-
conn,
|
|
114
|
+
conn: conn,
|
|
113
115
|
})),
|
|
114
116
|
sortNaturalByFqn(order),
|
|
115
|
-
map(
|
|
117
|
+
map(p => p.conn),
|
|
116
118
|
)
|
|
117
119
|
}
|
|
118
120
|
|
|
@@ -127,7 +129,7 @@ export function findAscendingConnections<C extends ConnectionElemId>(
|
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
/**
|
|
130
|
-
* Find connections that
|
|
132
|
+
* Find connections that given connection includes (i.e between it's descendants)
|
|
131
133
|
*/
|
|
132
134
|
export function findDescendantConnections<C extends ConnectionElemId>(
|
|
133
135
|
connections: ReadonlyArray<C>,
|
package/src/types/_common.ts
CHANGED
|
@@ -4,6 +4,12 @@ export type NonEmptyArray<T> = [T, ...T[]]
|
|
|
4
4
|
|
|
5
5
|
export type NonEmptyReadonlyArray<T> = readonly [T, ...T[]]
|
|
6
6
|
|
|
7
|
+
export type IterableContainer<T = unknown> = ReadonlyArray<T> | readonly []
|
|
8
|
+
|
|
9
|
+
export type ReorderedArray<T extends IterableContainer> = {
|
|
10
|
+
-readonly [P in keyof T]: T[number]
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
// dprint-ignore
|
|
8
14
|
export type KeysOf<T> = keyof T extends infer K extends string ? K : never
|
|
9
15
|
|
package/src/utils/fqn.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Fqn } from '../types'
|
|
1
|
+
import type { Fqn, IterableContainer, ReorderedArray } from '../types'
|
|
2
2
|
import { compareNatural } from './compare-natural'
|
|
3
3
|
import { isString } from './guards'
|
|
4
4
|
|
|
@@ -70,7 +70,7 @@ export function isSameHierarchy<T extends string>(one: T | WithId<T>, another?:
|
|
|
70
70
|
return first === second || second.startsWith(first + '.') || first.startsWith(second + '.')
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
type WithId<T> = { id: T }
|
|
73
|
+
type WithId<T = string> = { id: T }
|
|
74
74
|
|
|
75
75
|
export function isDescendantOf<T extends string>(ancestor: WithId<T>): (descedant: WithId<T>) => boolean
|
|
76
76
|
export function isDescendantOf<T extends string>(descedant: WithId<T>, ancestor: WithId<T>): boolean
|
|
@@ -187,11 +187,6 @@ export function compareByFqnHierarchically<T extends { id: string }>(a: T, b: T)
|
|
|
187
187
|
return compareFqnHierarchically(a.id, b.id)
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
export type IterableContainer<T = unknown> = ReadonlyArray<T> | readonly []
|
|
191
|
-
export type ReorderedArray<T extends IterableContainer> = {
|
|
192
|
-
-readonly [P in keyof T]: T[number]
|
|
193
|
-
}
|
|
194
|
-
|
|
195
190
|
/**
|
|
196
191
|
* Sorts an array of objects hierarchically based on their fully qualified names (FQN).
|
|
197
192
|
* Objects are sorted by the number of segments in their FQN (defined by dot-separated ID).
|
|
@@ -275,12 +270,12 @@ export function sortParentsFirst<T extends { id: string }, A extends IterableCon
|
|
|
275
270
|
*/
|
|
276
271
|
export function sortNaturalByFqn(
|
|
277
272
|
sort?: 'asc' | 'desc',
|
|
278
|
-
): <
|
|
279
|
-
export function sortNaturalByFqn<
|
|
273
|
+
): <I extends WithId<string>, A extends IterableContainer<I>>(array: A) => ReorderedArray<A>
|
|
274
|
+
export function sortNaturalByFqn<A extends IterableContainer<WithId>>(
|
|
280
275
|
array: A,
|
|
281
276
|
sort?: 'asc' | 'desc',
|
|
282
277
|
): ReorderedArray<A>
|
|
283
|
-
export function sortNaturalByFqn<
|
|
278
|
+
export function sortNaturalByFqn<A extends IterableContainer<WithId>>(
|
|
284
279
|
array?: A | 'asc' | 'desc',
|
|
285
280
|
sort?: 'asc' | 'desc',
|
|
286
281
|
) {
|
package/src/utils/index.ts
CHANGED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { F as Fqn } from './core.DX-WYEPA.mjs';
|
|
2
|
-
|
|
3
|
-
declare function parentFqn<E extends string>(fqn: E): E | null;
|
|
4
|
-
declare function nameFromFqn<E extends string>(fqn: E): string;
|
|
5
|
-
/**
|
|
6
|
-
* Check if one element is an ancestor of another
|
|
7
|
-
* Composable version
|
|
8
|
-
* @signature
|
|
9
|
-
* isAncestor(another)(ancestor)
|
|
10
|
-
*/
|
|
11
|
-
declare function isAncestor<A extends string | {
|
|
12
|
-
id: string;
|
|
13
|
-
}>(another: NoInfer<A>): (ancestor: A) => boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Check if one element is an ancestor of another
|
|
16
|
-
* @signature
|
|
17
|
-
* isAncestor(ancestor, another)
|
|
18
|
-
*/
|
|
19
|
-
declare function isAncestor<A extends string | {
|
|
20
|
-
id: string;
|
|
21
|
-
}>(ancestor: A, another: A): boolean;
|
|
22
|
-
declare function isSameHierarchy<T extends string>(one: NoInfer<T> | WithId<NoInfer<T>>): (another: T | WithId<T>) => boolean;
|
|
23
|
-
declare function isSameHierarchy<T extends string>(one: T | WithId<T>, another: T | WithId<T>): boolean;
|
|
24
|
-
type WithId<T> = {
|
|
25
|
-
id: T;
|
|
26
|
-
};
|
|
27
|
-
declare function isDescendantOf<T extends string>(ancestor: WithId<T>): (descedant: WithId<T>) => boolean;
|
|
28
|
-
declare function isDescendantOf<T extends string>(descedant: WithId<T>, ancestor: WithId<T>): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* How deep in the hierarchy the element is.
|
|
31
|
-
* Root element has depth 1
|
|
32
|
-
*/
|
|
33
|
-
declare function hierarchyLevel<E extends string | {
|
|
34
|
-
id: Fqn;
|
|
35
|
-
}>(elementOfFqn: E): number;
|
|
36
|
-
/**
|
|
37
|
-
* Calculate the distance as number of steps from one element to another, i.e.
|
|
38
|
-
* going up to the common ancestor, then going down to the other element.
|
|
39
|
-
* Sibling distance is always 1
|
|
40
|
-
*
|
|
41
|
-
* Can be used for hierarchical clustering
|
|
42
|
-
*/
|
|
43
|
-
declare function hierarchyDistance<E extends string | {
|
|
44
|
-
id: Fqn;
|
|
45
|
-
}>(one: E, another: E): number;
|
|
46
|
-
declare function commonAncestor<E extends string>(first: E, second: E): E | null;
|
|
47
|
-
/**
|
|
48
|
-
* Get all ancestor elements (i.e. parent, parent’s parent, etc.)
|
|
49
|
-
* going up from parent to the root
|
|
50
|
-
*/
|
|
51
|
-
declare function ancestorsFqn<Id extends string>(fqn: Id): Id[];
|
|
52
|
-
/**
|
|
53
|
-
* Compares two fully qualified names (fqns) hierarchically based on their depth.
|
|
54
|
-
* From parent nodes to leaves
|
|
55
|
-
*
|
|
56
|
-
* @param {string} a - The first fqn to compare.
|
|
57
|
-
* @param {string} b - The second fqn to compare.
|
|
58
|
-
* @returns {number} - 0 if the fqns have the same depth.
|
|
59
|
-
* - Positive number if a is deeper than b.
|
|
60
|
-
* - Negative number if b is deeper than a.
|
|
61
|
-
*/
|
|
62
|
-
declare function compareFqnHierarchically<T extends string = string>(a: T, b: T): -1 | 0 | 1;
|
|
63
|
-
declare function compareByFqnHierarchically<T extends {
|
|
64
|
-
id: string;
|
|
65
|
-
}>(a: T, b: T): -1 | 0 | 1;
|
|
66
|
-
type IterableContainer<T = unknown> = ReadonlyArray<T> | readonly [];
|
|
67
|
-
type ReorderedArray<T extends IterableContainer> = {
|
|
68
|
-
-readonly [P in keyof T]: T[number];
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Sorts an array of objects hierarchically based on their fully qualified names (FQN).
|
|
72
|
-
* Objects are sorted by the number of segments in their FQN (defined by dot-separated ID).
|
|
73
|
-
*
|
|
74
|
-
* @typeParam T - Object type that contains an 'id' string property
|
|
75
|
-
* @typeParam A - Type extending IterableContainer of T
|
|
76
|
-
*
|
|
77
|
-
* @param array - Array of objects to be sorted
|
|
78
|
-
* @returns A new array with items sorted by their FQN hierarchy depth (number of segments)
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* ```ts
|
|
82
|
-
* const items = [
|
|
83
|
-
* { id: "a.b.c" },
|
|
84
|
-
* { id: "a" },
|
|
85
|
-
* { id: "a.b" }
|
|
86
|
-
* ];
|
|
87
|
-
* sortByFqnHierarchically(items);
|
|
88
|
-
* // Result: [
|
|
89
|
-
* // { id: "a" },
|
|
90
|
-
* // { id: "a.b" },
|
|
91
|
-
* // { id: "a.b.c" }
|
|
92
|
-
* // ]
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
declare function sortByFqnHierarchically<T extends {
|
|
96
|
-
id: string;
|
|
97
|
-
}, A extends IterableContainer<T>>(array: A): ReorderedArray<A>;
|
|
98
|
-
/**
|
|
99
|
-
* Keeps initial order of the elements, but ensures that parents are before children
|
|
100
|
-
*/
|
|
101
|
-
declare function sortParentsFirst<T extends {
|
|
102
|
-
id: string;
|
|
103
|
-
}, A extends IterableContainer<T>>(array: A): ReorderedArray<A>;
|
|
104
|
-
/**
|
|
105
|
-
* Sorts an array of objects naturally by their fully qualified name (FQN) identifier.
|
|
106
|
-
*
|
|
107
|
-
* @template T - Type of objects containing an 'id' string property
|
|
108
|
-
* @template A - Type extending IterableContainer of T
|
|
109
|
-
*
|
|
110
|
-
* @param first - Optional. Either the array to sort or the sort direction ('asc'|'desc')
|
|
111
|
-
* @param sort - Optional. The sort direction ('asc'|'desc'). Defaults to 'asc' if not specified
|
|
112
|
-
*
|
|
113
|
-
* @example
|
|
114
|
-
* // As a function that returns a sorting function
|
|
115
|
-
* const sorted = sortNaturalByFqn('desc')(myArray);
|
|
116
|
-
*
|
|
117
|
-
* // Direct array sorting
|
|
118
|
-
* const sorted = sortNaturalByFqn(myArray, 'desc');
|
|
119
|
-
*/
|
|
120
|
-
declare function sortNaturalByFqn(sort?: 'asc' | 'desc'): <T extends {
|
|
121
|
-
id: string;
|
|
122
|
-
}, A extends IterableContainer<T>>(array: A) => ReorderedArray<A>;
|
|
123
|
-
declare function sortNaturalByFqn<T extends {
|
|
124
|
-
id: string;
|
|
125
|
-
}, A extends IterableContainer<T>>(array: A, sort?: 'asc' | 'desc'): ReorderedArray<A>;
|
|
126
|
-
|
|
127
|
-
export { type IterableContainer as I, type ReorderedArray as R, ancestorsFqn as a, isDescendantOf as b, isSameHierarchy as c, sortParentsFirst as d, commonAncestor as e, compareByFqnHierarchically as f, compareFqnHierarchically as g, hierarchyDistance as h, isAncestor as i, hierarchyLevel as j, sortByFqnHierarchically as k, nameFromFqn as n, parentFqn as p, sortNaturalByFqn as s };
|