@likec4/core 1.41.0 → 1.42.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/builder/package.json +4 -0
- package/compute-view/package.json +4 -0
- package/compute-view/relationships/package.json +4 -0
- package/dist/builder/index.d.mts +13 -11
- package/dist/builder/index.mjs +111 -91
- package/dist/compute-view/index.d.mts +8 -7
- package/dist/compute-view/index.mjs +14 -11
- package/dist/compute-view/relationships-view/index.d.mts +9 -8
- package/dist/compute-view/relationships-view/index.mjs +6 -6
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +11 -11
- package/dist/model/connection/deployment/index.d.mts +11 -10
- package/dist/model/connection/deployment/index.mjs +2 -2
- package/dist/model/connection/index.d.mts +12 -11
- package/dist/model/connection/index.mjs +3 -3
- package/dist/model/connection/model/index.d.mts +11 -10
- package/dist/model/connection/model/index.mjs +2 -2
- package/dist/model/index.d.mts +14 -14
- package/dist/model/index.mjs +4 -5
- package/dist/shared/{core.Ae86Y3tB.mjs → core.01VTr9qu.mjs} +8 -26
- package/dist/shared/core.1vX5a9AY.mjs +86 -0
- package/dist/shared/{core.BVNaR17u.mjs → core.B7KhhkRY.mjs} +1 -1
- package/dist/shared/core.B85MJLTf.mjs +5 -0
- package/dist/shared/{core.DA5vzwZ9.mjs → core.BIqHjQiH.mjs} +56 -42
- package/dist/shared/core.BKlholso.mjs +3 -0
- package/dist/shared/core.BR4zXDH-.mjs +13 -0
- package/dist/shared/{core.CXy1NLUG.mjs → core.BYNkXQ8A.mjs} +21 -12
- package/dist/shared/{core.BuoXfSMj.mjs → core.BbE4y-yl.mjs} +1 -1
- package/dist/shared/core.BoYfZOBm.mjs +3 -0
- package/dist/shared/core.BsSXS-_R.mjs +7 -0
- package/dist/shared/{core.DJp8fgok.mjs → core.BzTakU3I.mjs} +14 -10
- package/dist/shared/{core.4u1dVmfX.mjs → core.C2TiyjI6.mjs} +2 -2
- package/dist/shared/{core.DLpidoWc.mjs → core.C3JowhaZ.mjs} +3 -3
- package/dist/shared/{core.CNGyqkJh.mjs → core.C4x8aaWa.mjs} +3 -1
- package/dist/shared/{core.BB6zA-UU.mjs → core.C8YY6Uub.mjs} +38 -9
- package/dist/shared/{core.Asc11Mjy.mjs → core.C8sl5Y8Z.mjs} +122 -58
- package/dist/shared/{core.BvMRMo7Z.mjs → core.CNgZvKb8.mjs} +3 -5198
- package/dist/shared/{core.CUG6vpyL.d.mts → core.CQngdcuj.d.mts} +85 -4
- package/dist/shared/{core.Be1n9a0i.mjs → core.C_Ni6yHl.mjs} +5 -4
- package/dist/shared/core.CbT8JVYL.mjs +5 -0
- package/dist/shared/core.CqAJJpK_.mjs +3 -0
- package/dist/shared/{core.BXsxn-hf.d.mts → core.D0PjZzIS.d.mts} +27 -15
- package/dist/shared/{core.DgesAwC8.d.mts → core.D5fzJWbF.d.mts} +2 -2
- package/dist/shared/{core.hfOE3RfK.d.mts → core.DACpKp35.d.mts} +5 -5
- package/dist/shared/core.DFi2dOTl.mjs +39548 -0
- package/dist/shared/{core.xSQO0XYD.d.mts → core.DIol3syK.d.mts} +2 -2
- package/dist/shared/{core.DlG1xWt2.mjs → core.DMMOWQqc.mjs} +3 -2
- package/dist/shared/core.DNbUPnve.mjs +3990 -0
- package/dist/shared/{core.CCD1ID81.mjs → core.DRJma0Ol.mjs} +4 -3
- package/dist/shared/{core.DgttqsJc.mjs → core.DRhg-gVU.mjs} +9 -9
- package/dist/shared/core.DSO_rTC2.mjs +5322 -0
- package/dist/shared/{core.FUPplpae.d.mts → core.D_vkffV4.d.mts} +4 -2
- package/dist/shared/core.DdMJk7nx.d.mts +476 -0
- package/dist/shared/{core.BhpgpOep.d.mts → core.Dgs6-nuz.d.mts} +2 -2
- package/dist/shared/{core.Be4Jy9Qx.mjs → core.FZ305VYd.mjs} +2 -2
- package/dist/shared/core.OHD4KXm9.mjs +5 -0
- package/dist/shared/{core.GTgsmXS_.mjs → core.QJD_fcrc.mjs} +2 -2
- package/dist/shared/core.RfnaEmgA.mjs +7 -0
- package/dist/shared/core.fHR_8Tnq.d.mts +450 -0
- package/dist/shared/{core.D0EgVMQK.mjs → core.lRvxPoao.mjs} +14 -12
- package/dist/shared/{core.CaT0SUUK.mjs → core.rCeaAqgW.mjs} +1 -84
- package/dist/shared/{core.zxTBF_PD.d.mts → core.s9uwOt60.d.mts} +4 -4
- package/dist/shared/core.yna0OdV5.d.mts +98 -0
- package/dist/styles/index.d.mts +106 -0
- package/dist/styles/index.mjs +1 -0
- package/dist/types/_aux.d.mts +2 -2
- package/dist/types/expression-model.d.mts +3 -4
- package/dist/types/expression.d.mts +3 -4
- package/dist/types/fqnRef.d.mts +2 -2
- package/dist/types/fqnRef.mjs +3 -3
- package/dist/types/index.d.mts +8 -8
- package/dist/types/index.mjs +150 -5
- package/dist/types/scalar.mjs +3 -2
- package/dist/utils/graphology/index.d.mts +1864 -0
- package/dist/utils/graphology/index.mjs +1 -0
- package/dist/utils/index.d.mts +11 -6
- package/dist/utils/index.mjs +21 -37
- package/dist/utils/iterable/index.d.mts +1 -1
- package/dist/utils/iterable/index.mjs +45 -7
- package/model/package.json +4 -0
- package/package.json +42 -24
- package/styles/package.json +4 -0
- package/types/package.json +4 -0
- package/utils/graphology/package.json +4 -0
- package/utils/package.json +4 -0
- package/dist/shared/core.6_Vp2iiN.mjs +0 -172
- package/dist/shared/core.CUw_2J9j.mjs +0 -47
- package/dist/shared/core.CzdwsPmY.d.mts +0 -69
- package/dist/shared/core.D-ZGWDDt.d.mts +0 -831
- package/dist/shared/core.DoM6aM9N.mjs +0 -7
- package/dist/shared/core.ILwny7BV.mjs +0 -38
- package/dist/theme/index.d.mts +0 -11
- package/dist/theme/index.mjs +0 -232
- package/src/builder/Builder.deployment.ts +0 -224
- package/src/builder/Builder.deploymentModel.ts +0 -449
- package/src/builder/Builder.element.ts +0 -241
- package/src/builder/Builder.model.ts +0 -494
- package/src/builder/Builder.ts +0 -946
- package/src/builder/Builder.view-common.ts +0 -273
- package/src/builder/Builder.view-deployment.ts +0 -135
- package/src/builder/Builder.view-element.ts +0 -202
- package/src/builder/Builder.views.ts +0 -399
- package/src/builder/Builder.with.ts +0 -156
- package/src/builder/_types.ts +0 -324
- package/src/builder/index.ts +0 -11
- package/src/compute-view/compute-view.ts +0 -80
- package/src/compute-view/deployment-view/_types.ts +0 -38
- package/src/compute-view/deployment-view/clean-connections.ts +0 -236
- package/src/compute-view/deployment-view/compute.ts +0 -94
- package/src/compute-view/deployment-view/memory/index.ts +0 -9
- package/src/compute-view/deployment-view/memory/memory.ts +0 -96
- package/src/compute-view/deployment-view/predicates/deploymentRefs-where.ts +0 -18
- package/src/compute-view/deployment-view/predicates/deploymentRefs.ts +0 -154
- package/src/compute-view/deployment-view/predicates/index.ts +0 -8
- package/src/compute-view/deployment-view/predicates/relation-direct.ts +0 -243
- package/src/compute-view/deployment-view/predicates/relation-in-out.ts +0 -70
- package/src/compute-view/deployment-view/predicates/relation-incoming.ts +0 -101
- package/src/compute-view/deployment-view/predicates/relation-outgoing.ts +0 -95
- package/src/compute-view/deployment-view/predicates/relation-where.ts +0 -18
- package/src/compute-view/deployment-view/predicates/utils.ts +0 -282
- package/src/compute-view/deployment-view/predicates/wildcard.ts +0 -41
- package/src/compute-view/deployment-view/stages/stage-exclude.ts +0 -5
- package/src/compute-view/deployment-view/stages/stage-final.ts +0 -245
- package/src/compute-view/deployment-view/stages/stage-include.ts +0 -95
- package/src/compute-view/deployment-view/utils.ts +0 -297
- package/src/compute-view/dynamic-view/compute.ts +0 -312
- package/src/compute-view/element-view/_types.ts +0 -47
- package/src/compute-view/element-view/clean-connections.ts +0 -117
- package/src/compute-view/element-view/compute.ts +0 -324
- package/src/compute-view/element-view/memory/NodeGroup.ts +0 -31
- package/src/compute-view/element-view/memory/index.ts +0 -10
- package/src/compute-view/element-view/memory/memory.ts +0 -178
- package/src/compute-view/element-view/memory/stage-exclude.ts +0 -59
- package/src/compute-view/element-view/memory/stage-final.ts +0 -129
- package/src/compute-view/element-view/memory/stage-include.ts +0 -130
- package/src/compute-view/element-view/predicates/_utils.ts +0 -91
- package/src/compute-view/element-view/predicates/element-expand.ts +0 -29
- package/src/compute-view/element-view/predicates/element-kind-tag.ts +0 -27
- package/src/compute-view/element-view/predicates/element-ref.ts +0 -24
- package/src/compute-view/element-view/predicates/relation-direct.ts +0 -321
- package/src/compute-view/element-view/predicates/relation-in-out.ts +0 -64
- package/src/compute-view/element-view/predicates/relation-in.ts +0 -115
- package/src/compute-view/element-view/predicates/relation-out.ts +0 -119
- package/src/compute-view/element-view/predicates/wildcard.ts +0 -88
- package/src/compute-view/element-view/utils.ts +0 -65
- package/src/compute-view/index.ts +0 -4
- package/src/compute-view/memory/AbstractMemory.ts +0 -45
- package/src/compute-view/memory/AbstractStageExclude.ts +0 -215
- package/src/compute-view/memory/AbstractStageInclude.ts +0 -200
- package/src/compute-view/memory/_types.ts +0 -148
- package/src/compute-view/memory/index.ts +0 -5
- package/src/compute-view/memory/ops.ts +0 -43
- package/src/compute-view/relationships-view/_types.ts +0 -16
- package/src/compute-view/relationships-view/compute.ts +0 -159
- package/src/compute-view/relationships-view/index.ts +0 -3
- package/src/compute-view/relationships-view/layout.ts +0 -358
- package/src/compute-view/relationships-view/utils.ts +0 -73
- package/src/compute-view/utils/ancestorsOfNode.ts +0 -19
- package/src/compute-view/utils/applyCustomElementProperties.ts +0 -107
- package/src/compute-view/utils/applyCustomRelationProperties.ts +0 -58
- package/src/compute-view/utils/applyViewRuleStyles.ts +0 -73
- package/src/compute-view/utils/buildComputedNodes.ts +0 -166
- package/src/compute-view/utils/buildElementNotations.ts +0 -64
- package/src/compute-view/utils/elementExpressionToPredicate.ts +0 -50
- package/src/compute-view/utils/link-nodes-with-edges.ts +0 -56
- package/src/compute-view/utils/merge-props-from-relationships.ts +0 -161
- package/src/compute-view/utils/relationExpressionToPredicates.ts +0 -55
- package/src/compute-view/utils/resolve-extended-views.ts +0 -85
- package/src/compute-view/utils/resolve-global-rules.ts +0 -88
- package/src/compute-view/utils/topological-sort.ts +0 -256
- package/src/compute-view/utils/view-hash.ts +0 -45
- package/src/compute-view/utils/with-readable-edges.ts +0 -40
- package/src/index.ts +0 -32
- package/src/model/DeploymentElementModel.ts +0 -712
- package/src/model/DeploymentModel.ts +0 -393
- package/src/model/ElementModel.ts +0 -316
- package/src/model/LikeC4Model.ts +0 -882
- package/src/model/RelationModel.ts +0 -152
- package/src/model/connection/Connection.ts +0 -72
- package/src/model/connection/deployment/DeploymentConnectionModel.ts +0 -185
- package/src/model/connection/deployment/find.ts +0 -120
- package/src/model/connection/deployment/index.ts +0 -8
- package/src/model/connection/index.ts +0 -22
- package/src/model/connection/model/ConnectionModel.ts +0 -158
- package/src/model/connection/model/find.ts +0 -117
- package/src/model/connection/model/index.ts +0 -8
- package/src/model/connection/ops.ts +0 -276
- package/src/model/guards.ts +0 -77
- package/src/model/index.ts +0 -72
- package/src/model/types.ts +0 -67
- package/src/model/utils.ts +0 -66
- package/src/model/view/EdgeModel.ts +0 -121
- package/src/model/view/LikeC4ViewModel.ts +0 -361
- package/src/model/view/LikeC4ViewsFolder.ts +0 -151
- package/src/model/view/NodeModel.ts +0 -247
- package/src/theme/element.ts +0 -61
- package/src/theme/index.ts +0 -127
- package/src/theme/relationships.ts +0 -54
- package/src/types/RichText.ts +0 -205
- package/src/types/_aux.ts +0 -317
- package/src/types/_common.ts +0 -102
- package/src/types/const.ts +0 -34
- package/src/types/expression-model.ts +0 -294
- package/src/types/expression.ts +0 -313
- package/src/types/fqnRef.ts +0 -91
- package/src/types/geometry.ts +0 -159
- package/src/types/global.ts +0 -21
- package/src/types/index.ts +0 -44
- package/src/types/model-data.ts +0 -77
- package/src/types/model-deployment.ts +0 -78
- package/src/types/model-dump.ts +0 -79
- package/src/types/model-logical.ts +0 -126
- package/src/types/model-spec.ts +0 -88
- package/src/types/operators.ts +0 -156
- package/src/types/project.ts +0 -14
- package/src/types/scalar.ts +0 -162
- package/src/types/styles.ts +0 -122
- package/src/types/view-changes.ts +0 -32
- package/src/types/view-common.ts +0 -157
- package/src/types/view-computed.ts +0 -126
- package/src/types/view-layouted.ts +0 -94
- package/src/types/view-parsed.deployment.ts +0 -39
- package/src/types/view-parsed.dynamic.ts +0 -89
- package/src/types/view-parsed.element.ts +0 -65
- package/src/types/view.ts +0 -113
- package/src/utils/common-head.ts +0 -22
- package/src/utils/compare-natural.ts +0 -60
- package/src/utils/const.ts +0 -1
- package/src/utils/fqn.ts +0 -302
- package/src/utils/getOrCreate.ts +0 -8
- package/src/utils/guards.ts +0 -9
- package/src/utils/index.ts +0 -68
- package/src/utils/invariant.ts +0 -29
- package/src/utils/iterable/_types.ts +0 -5
- package/src/utils/iterable/filter.ts +0 -55
- package/src/utils/iterable/find.ts +0 -38
- package/src/utils/iterable/first.ts +0 -48
- package/src/utils/iterable/flat.ts +0 -17
- package/src/utils/iterable/head.ts +0 -22
- package/src/utils/iterable/index.ts +0 -15
- package/src/utils/iterable/map.ts +0 -40
- package/src/utils/iterable/reduce.ts +0 -24
- package/src/utils/iterable/some.ts +0 -36
- package/src/utils/iterable/to.ts +0 -19
- package/src/utils/iterable/unique.ts +0 -23
- package/src/utils/markdown/index.ts +0 -2
- package/src/utils/markdown/to-html.ts +0 -32
- package/src/utils/markdown/to-text.ts +0 -14
- package/src/utils/memoize-prop.ts +0 -30
- package/src/utils/mnemonist.ts +0 -9
- package/src/utils/object-hash.ts +0 -14
- package/src/utils/promises.ts +0 -24
- package/src/utils/relations.ts +0 -36
- package/src/utils/set.ts +0 -83
- package/src/utils/string-hash.ts +0 -16
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { I as IterableContainer, R as ReorderedArray, N as NonEmptyArray } from './core.
|
|
1
|
+
import { I as IterableContainer, R as ReorderedArray, N as NonEmptyArray } from './core.D5fzJWbF.mjs';
|
|
2
2
|
import { F as Fqn } from './core.DX-WYEPA.mjs';
|
|
3
|
+
import { SetRequired, SetNonNullable } from 'type-fest';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Mnemonist DefaultWeakMap Typings
|
|
@@ -305,6 +306,7 @@ declare function sortNaturalByFqn<A extends IterableContainer<WithId>>(array: A,
|
|
|
305
306
|
|
|
306
307
|
declare function isString(value: unknown): value is string;
|
|
307
308
|
declare function isNonEmptyArray<A>(arr: ArrayLike<A> | undefined): arr is NonEmptyArray<A>;
|
|
309
|
+
declare function hasProp<T extends object, P extends keyof T & string>(value: T, path: P): value is SetRequired<SetNonNullable<T, P>, P>;
|
|
308
310
|
|
|
309
311
|
/**
|
|
310
312
|
* Saves the value returned by fn() in a hidden property tag of obj object, so next time memoizeProp() is called,
|
|
@@ -327,4 +329,4 @@ declare function isNonEmptyArray<A>(arr: ArrayLike<A> | undefined): arr is NonEm
|
|
|
327
329
|
*/
|
|
328
330
|
declare function memoizeProp<Tag extends symbol | string, Res>(obj: object, tag: Tag, fn: () => Res): Res;
|
|
329
331
|
|
|
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,
|
|
332
|
+
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, hasProp as h, invariant as i, nonNullable as j, sortParentsFirst as k, commonAncestor as l, memoizeProp as m, nameFromFqn as n, compareByFqnHierarchically as o, parentFqn as p, compareFqnHierarchically as q, hierarchyDistance as r, sortNaturalByFqn as s, hierarchyLevel as t, sortByFqnHierarchically as u };
|
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
import { IsNever, IsAny } from 'type-fest';
|
|
2
|
+
import { A as Any, U as Unknown, W as WithDescriptionAndTech, n as WithOptionalTags, o as WithOptionalLinks, q as WithMetadata, r as WithNotation, s as DeploymentFqn, t as DeploymentKind, F as Fqn, T as Tag, j as ElementKind, R as RelationKind, u as MetadataKey, f as _stage, g as _type, h as StrictViewId, N as NodeId, v as EdgeId, E as ExtractOnStage, M as ModelStage, P as ProjectId, k as ElementId, D as DeploymentId, d as UnknownParsed, V as ViewId, b as UnknownComputed, c as UnknownLayouted, S as SpecAux, a as Aux, w as Never } from './core.Dgs6-nuz.mjs';
|
|
3
|
+
import { N as NonEmptyArray, L as Link, E as ExclusiveUnion, K as KeysOf } from './core.D5fzJWbF.mjs';
|
|
4
|
+
import { E as ElementStyle, A as AbstractRelationship, y as BaseViewProperties, D as ViewWithHash, C as ViewWithNotation, v as ViewAutoLayout, H as ComputedNode, B as BBox, I as ComputedEdge, P as Point, X as XYPoint, a1 as DynamicViewDisplayVariant, z as BaseParsedViewProperties, l as AnyIncludePredicate, m as AnyExcludePredicate, n as AnyViewRuleStyle, t as ViewRuleAutoLayout, aa as ParsedElementView, a2 as ParsedDynamicView, J as ComputedElementView, K as ComputedDeploymentView, O as ComputedDynamicView, x as ViewType, k as LikeC4Project, f as Element, g as Relationship, M as ModelGlobals } from './core.fHR_8Tnq.mjs';
|
|
5
|
+
import { FqnRef } from '../types/fqnRef.mjs';
|
|
6
|
+
import { D as ThemeColor, C as ColorLiteral, u as ElementShape, Q as Color, s as BorderStyle, q as ShapeSize, r as SpacingSize, p as TextSize, v as RelationshipLineType, y as RelationshipArrowType, I as CustomColorDefinitions, E as Expression, F as FqnExpr } from './core.CQngdcuj.mjs';
|
|
7
|
+
import { T as Tag$1, M as MarkdownOrString, I as Icon, d as RelationId } from './core.DX-WYEPA.mjs';
|
|
8
|
+
|
|
9
|
+
interface DeploymentNode<A extends Any = Unknown> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A>, WithNotation {
|
|
10
|
+
element?: never;
|
|
11
|
+
readonly id: DeploymentFqn<A>;
|
|
12
|
+
readonly kind: DeploymentKind<A>;
|
|
13
|
+
readonly title: string;
|
|
14
|
+
readonly style: ElementStyle;
|
|
15
|
+
}
|
|
16
|
+
interface DeployedInstance<A extends Any = Unknown> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A>, WithNotation {
|
|
17
|
+
kind?: never;
|
|
18
|
+
/**
|
|
19
|
+
* Format: `<DeploymentNode Fqn>.<Instance Id>`
|
|
20
|
+
* i.e parent fqn is deployment target
|
|
21
|
+
*/
|
|
22
|
+
readonly id: DeploymentFqn<A>;
|
|
23
|
+
readonly element: Fqn<A>;
|
|
24
|
+
readonly title?: string;
|
|
25
|
+
readonly style: ElementStyle;
|
|
26
|
+
}
|
|
27
|
+
type DeploymentElement<A extends Any = Unknown> = DeploymentNode<A> | DeployedInstance<A>;
|
|
28
|
+
type DeploymentElementRef<A extends Any = Unknown> = {
|
|
29
|
+
readonly id: DeploymentFqn<A>;
|
|
30
|
+
readonly element?: Fqn<A>;
|
|
31
|
+
};
|
|
32
|
+
declare function isDeploymentNode<A extends Any>(el: DeploymentElement<A>): el is DeploymentNode<A>;
|
|
33
|
+
declare function isDeployedInstance<A extends Any>(el: DeploymentElement<A>): el is DeployedInstance<A>;
|
|
34
|
+
/**
|
|
35
|
+
* Relationship in deployment model
|
|
36
|
+
*/
|
|
37
|
+
interface DeploymentRelationship<A extends Any = Unknown> extends AbstractRelationship<A> {
|
|
38
|
+
readonly source: FqnRef.DeploymentRef<A>;
|
|
39
|
+
readonly target: FqnRef.DeploymentRef<A>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Backward compatibility alias
|
|
43
|
+
* @deprecated Use {@link DeploymentRelationship} instead
|
|
44
|
+
*/
|
|
45
|
+
type DeploymentRelation<A extends Any = Unknown> = DeploymentRelationship<A>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Element and deployment kind specification
|
|
49
|
+
*/
|
|
50
|
+
interface ElementSpecification {
|
|
51
|
+
tags?: Tag$1[];
|
|
52
|
+
title?: string;
|
|
53
|
+
summary?: MarkdownOrString;
|
|
54
|
+
description?: MarkdownOrString;
|
|
55
|
+
technology?: string;
|
|
56
|
+
notation?: string;
|
|
57
|
+
links?: NonEmptyArray<Link>;
|
|
58
|
+
style: {
|
|
59
|
+
shape?: ElementShape;
|
|
60
|
+
icon?: Icon;
|
|
61
|
+
color?: Color;
|
|
62
|
+
border?: BorderStyle;
|
|
63
|
+
opacity?: number;
|
|
64
|
+
size?: ShapeSize;
|
|
65
|
+
padding?: SpacingSize;
|
|
66
|
+
textSize?: TextSize;
|
|
67
|
+
multiple?: boolean;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
interface TagSpecification {
|
|
71
|
+
color: ThemeColor | ColorLiteral;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Checks if tag color is defined in the specification
|
|
75
|
+
* Expects HEX, `rgb(...)` or `rgba(...)` color
|
|
76
|
+
*/
|
|
77
|
+
declare function isTagColorSpecified(spec: string | TagSpecification): spec is {
|
|
78
|
+
color: ColorLiteral;
|
|
79
|
+
};
|
|
80
|
+
interface RelationshipSpecification {
|
|
81
|
+
technology?: string;
|
|
82
|
+
notation?: string;
|
|
83
|
+
color?: Color;
|
|
84
|
+
line?: RelationshipLineType;
|
|
85
|
+
head?: RelationshipArrowType;
|
|
86
|
+
tail?: RelationshipArrowType;
|
|
87
|
+
}
|
|
88
|
+
type Specification<A> = A extends Any ? {
|
|
89
|
+
tags: {
|
|
90
|
+
[key in Tag<A>]: TagSpecification;
|
|
91
|
+
};
|
|
92
|
+
elements: {
|
|
93
|
+
[key in ElementKind<A>]: Partial<ElementSpecification>;
|
|
94
|
+
};
|
|
95
|
+
deployments: {
|
|
96
|
+
[key in DeploymentKind<A>]: Partial<ElementSpecification>;
|
|
97
|
+
};
|
|
98
|
+
relationships: {
|
|
99
|
+
[key in RelationKind<A>]: Partial<RelationshipSpecification>;
|
|
100
|
+
};
|
|
101
|
+
metadataKeys?: IsNever<MetadataKey<A>> extends true ? never : MetadataKey<A>[];
|
|
102
|
+
customColors?: CustomColorDefinitions;
|
|
103
|
+
} : never;
|
|
104
|
+
|
|
105
|
+
interface DiagramNode<A extends Any = Any> extends ComputedNode<A>, BBox {
|
|
106
|
+
/**
|
|
107
|
+
* Absolute X coordinate
|
|
108
|
+
*/
|
|
109
|
+
x: number;
|
|
110
|
+
/**
|
|
111
|
+
* Absolute Y coordinate
|
|
112
|
+
*/
|
|
113
|
+
y: number;
|
|
114
|
+
width: number;
|
|
115
|
+
height: number;
|
|
116
|
+
/**
|
|
117
|
+
* Bounding box of label
|
|
118
|
+
* (Absolute coordinates)
|
|
119
|
+
*/
|
|
120
|
+
labelBBox: BBox;
|
|
121
|
+
}
|
|
122
|
+
interface DiagramEdge<A extends Any = Any> extends ComputedEdge<A> {
|
|
123
|
+
/**
|
|
124
|
+
* Bezier points
|
|
125
|
+
* (Absolute coordinates)
|
|
126
|
+
*/
|
|
127
|
+
points: NonEmptyArray<Point>;
|
|
128
|
+
/**
|
|
129
|
+
* Control points to adjust the edge
|
|
130
|
+
* (Absolute coordinates)
|
|
131
|
+
*/
|
|
132
|
+
controlPoints?: NonEmptyArray<XYPoint>;
|
|
133
|
+
/**
|
|
134
|
+
* Bounding box of label
|
|
135
|
+
* (Absolute coordinates)
|
|
136
|
+
*/
|
|
137
|
+
labelBBox?: BBox | null;
|
|
138
|
+
/**
|
|
139
|
+
* Graphviz edge POS
|
|
140
|
+
*
|
|
141
|
+
* TODO: temporary solution, should be moved out
|
|
142
|
+
* @deprecated
|
|
143
|
+
*/
|
|
144
|
+
dotpos?: string;
|
|
145
|
+
}
|
|
146
|
+
interface BaseLayoutedViewProperties<A extends Any> extends BaseViewProperties<A>, ViewWithHash, ViewWithNotation {
|
|
147
|
+
readonly [_stage]: 'layouted';
|
|
148
|
+
readonly autoLayout: ViewAutoLayout;
|
|
149
|
+
readonly nodes: DiagramNode<A>[];
|
|
150
|
+
readonly edges: DiagramEdge<A>[];
|
|
151
|
+
readonly bounds: BBox;
|
|
152
|
+
/**
|
|
153
|
+
* If diagram has manual layout
|
|
154
|
+
* But was changed and layout should be recalculated
|
|
155
|
+
*/
|
|
156
|
+
hasLayoutDrift?: boolean;
|
|
157
|
+
}
|
|
158
|
+
interface LayoutedElementView<A extends Any = Any> extends BaseLayoutedViewProperties<A> {
|
|
159
|
+
readonly [_type]: 'element';
|
|
160
|
+
readonly viewOf?: Fqn<A>;
|
|
161
|
+
readonly extends?: StrictViewId<A>;
|
|
162
|
+
}
|
|
163
|
+
interface LayoutedDeploymentView<A extends Any = Any> extends BaseLayoutedViewProperties<A> {
|
|
164
|
+
readonly [_type]: 'deployment';
|
|
165
|
+
}
|
|
166
|
+
interface LayoutedDynamicView<A extends Any = Any> extends BaseLayoutedViewProperties<A> {
|
|
167
|
+
readonly [_type]: 'dynamic';
|
|
168
|
+
/**
|
|
169
|
+
* How to display the dynamic view
|
|
170
|
+
* - `diagram`: display as a regular likec4 view
|
|
171
|
+
* - `sequence`: display as a sequence diagram
|
|
172
|
+
*/
|
|
173
|
+
readonly variant: DynamicViewDisplayVariant;
|
|
174
|
+
/**
|
|
175
|
+
* Sequence layout of this dynamic view
|
|
176
|
+
*/
|
|
177
|
+
readonly sequenceLayout: LayoutedDynamicView.Sequence.Layout;
|
|
178
|
+
}
|
|
179
|
+
declare namespace LayoutedDynamicView {
|
|
180
|
+
namespace Sequence {
|
|
181
|
+
interface ActorPort {
|
|
182
|
+
readonly id: string;
|
|
183
|
+
readonly cx: number;
|
|
184
|
+
readonly cy: number;
|
|
185
|
+
readonly height: number;
|
|
186
|
+
readonly type: 'target' | 'source';
|
|
187
|
+
readonly position: 'left' | 'right' | 'top' | 'bottom';
|
|
188
|
+
}
|
|
189
|
+
interface Actor {
|
|
190
|
+
readonly id: NodeId;
|
|
191
|
+
readonly x: number;
|
|
192
|
+
readonly y: number;
|
|
193
|
+
readonly width: number;
|
|
194
|
+
readonly height: number;
|
|
195
|
+
readonly ports: ReadonlyArray<ActorPort>;
|
|
196
|
+
}
|
|
197
|
+
interface Compound {
|
|
198
|
+
readonly id: NodeId;
|
|
199
|
+
/**
|
|
200
|
+
* Original node id, since multiple compound nodes can be built from one node
|
|
201
|
+
*/
|
|
202
|
+
readonly origin: NodeId;
|
|
203
|
+
readonly x: number;
|
|
204
|
+
readonly y: number;
|
|
205
|
+
readonly width: number;
|
|
206
|
+
readonly height: number;
|
|
207
|
+
readonly depth: number;
|
|
208
|
+
}
|
|
209
|
+
interface ParallelArea {
|
|
210
|
+
readonly parallelPrefix: string;
|
|
211
|
+
readonly x: number;
|
|
212
|
+
readonly y: number;
|
|
213
|
+
readonly width: number;
|
|
214
|
+
readonly height: number;
|
|
215
|
+
}
|
|
216
|
+
interface Step {
|
|
217
|
+
readonly id: EdgeId;
|
|
218
|
+
readonly labelBBox?: {
|
|
219
|
+
width: number;
|
|
220
|
+
height: number;
|
|
221
|
+
} | undefined;
|
|
222
|
+
readonly sourceHandle: string;
|
|
223
|
+
readonly targetHandle: string;
|
|
224
|
+
}
|
|
225
|
+
interface Layout {
|
|
226
|
+
readonly actors: ReadonlyArray<Actor>;
|
|
227
|
+
/**
|
|
228
|
+
* Steps in the sequence diagram (filtered edges with compound nodes)
|
|
229
|
+
*/
|
|
230
|
+
readonly steps: ReadonlyArray<Step>;
|
|
231
|
+
readonly compounds: ReadonlyArray<Compound>;
|
|
232
|
+
readonly parallelAreas: ReadonlyArray<ParallelArea>;
|
|
233
|
+
readonly bounds: BBox;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Predicates scoped to deployment model
|
|
240
|
+
*/
|
|
241
|
+
interface DeploymentViewIncludePredicate<A extends Any = Unknown> extends AnyIncludePredicate<Expression<A>> {
|
|
242
|
+
}
|
|
243
|
+
interface DeploymentViewExcludePredicate<A extends Any = Unknown> extends AnyExcludePredicate<Expression<A>> {
|
|
244
|
+
}
|
|
245
|
+
type DeploymentViewPredicate<A extends Any = Unknown> = DeploymentViewIncludePredicate<A> | DeploymentViewExcludePredicate<A>;
|
|
246
|
+
interface DeploymentViewRuleStyle<A extends Any = Unknown> extends AnyViewRuleStyle<FqnExpr<A>> {
|
|
247
|
+
}
|
|
248
|
+
type DeploymentViewRule<A extends Any = Unknown> = ExclusiveUnion<{
|
|
249
|
+
Include: DeploymentViewIncludePredicate<A>;
|
|
250
|
+
Exclude: DeploymentViewExcludePredicate<A>;
|
|
251
|
+
Style: DeploymentViewRuleStyle<A>;
|
|
252
|
+
AutoLayout: ViewRuleAutoLayout;
|
|
253
|
+
}>;
|
|
254
|
+
interface ParsedDeploymentView<A extends Any = Unknown> extends BaseParsedViewProperties<A> {
|
|
255
|
+
[_type]: 'deployment';
|
|
256
|
+
readonly rules: DeploymentViewRule<A>[];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
type ParsedView<A extends Any = Any> = ParsedElementView<A> | ParsedDeploymentView<A> | ParsedDynamicView<A>;
|
|
260
|
+
|
|
261
|
+
type ComputedView<A extends Any = Any> = ComputedElementView<A> | ComputedDeploymentView<A> | ComputedDynamicView<A>;
|
|
262
|
+
type LayoutedView<A extends Any = Any> = LayoutedElementView<A> | LayoutedDeploymentView<A> | LayoutedDynamicView<A>;
|
|
263
|
+
type ProcessedView<A extends Any = Any> = ComputedView<A> | LayoutedView<A>;
|
|
264
|
+
|
|
265
|
+
type AnyView<A extends Any = Any> = ParsedElementView<A> | ParsedDeploymentView<A> | ParsedDynamicView<A> | ComputedElementView<A> | ComputedDeploymentView<A> | ComputedDynamicView<A> | LayoutedElementView<A> | LayoutedDeploymentView<A> | LayoutedDynamicView<A>;
|
|
266
|
+
type ViewOnStage<V extends AnyView<Any>, T extends ModelStage> = Extract<V, {
|
|
267
|
+
[_stage]: T;
|
|
268
|
+
}>;
|
|
269
|
+
type ViewWithType<V extends AnyView<Any>, T extends ViewType> = Extract<V, {
|
|
270
|
+
[_type]: T;
|
|
271
|
+
}>;
|
|
272
|
+
type ViewRule<A extends Any = Any> = ParsedView<A>['rules'][number];
|
|
273
|
+
type ViewRulePredicate<A extends Any = Any> = Extract<ViewRule<A>, {
|
|
274
|
+
include: any[];
|
|
275
|
+
} | {
|
|
276
|
+
exclude: any[];
|
|
277
|
+
}>;
|
|
278
|
+
declare function isViewRulePredicate<V extends ViewRule<any>>(rule: V): rule is Extract<V, {
|
|
279
|
+
include: any[];
|
|
280
|
+
} | {
|
|
281
|
+
exclude: any[];
|
|
282
|
+
}>;
|
|
283
|
+
declare function isViewRuleStyle<V extends ViewRule<any>>(rule: V): rule is Extract<V, {
|
|
284
|
+
targets: any[];
|
|
285
|
+
style: {};
|
|
286
|
+
}>;
|
|
287
|
+
declare function isComputedView<V extends AnyView<any>>(view: V): view is ExtractOnStage<V, 'computed'>;
|
|
288
|
+
declare function isDiagramView<V extends AnyView<any>>(view: V): view is ExtractOnStage<V, 'layouted'>;
|
|
289
|
+
|
|
290
|
+
declare function isElementView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'element'>;
|
|
291
|
+
declare function isScopedElementView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'element'> & {
|
|
292
|
+
viewOf: Fqn<Any>;
|
|
293
|
+
};
|
|
294
|
+
declare function isExtendsElementView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'element'> & {
|
|
295
|
+
extends: StrictViewId<Any>;
|
|
296
|
+
};
|
|
297
|
+
declare function isDeploymentView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'deployment'>;
|
|
298
|
+
declare function isDynamicView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'dynamic'>;
|
|
299
|
+
|
|
300
|
+
interface BaseLikeC4ModelData<A extends Any> {
|
|
301
|
+
projectId: ProjectId<A>;
|
|
302
|
+
project: LikeC4Project;
|
|
303
|
+
specification: Specification<A>;
|
|
304
|
+
elements: Record<ElementId<A>, Element<A>>;
|
|
305
|
+
deployments: {
|
|
306
|
+
elements: Record<DeploymentId<A>, DeploymentElement<A>>;
|
|
307
|
+
relations: Record<RelationId, DeploymentRelationship<A>>;
|
|
308
|
+
};
|
|
309
|
+
relations: Record<RelationId, Relationship<A>>;
|
|
310
|
+
globals: ModelGlobals;
|
|
311
|
+
imports: Record<string, NonEmptyArray<Element<A>>>;
|
|
312
|
+
}
|
|
313
|
+
type AuxFromLikeC4ModelData<D> = D extends BaseLikeC4ModelData<infer A extends Any> ? IsAny<A> extends true ? never : A : never;
|
|
314
|
+
/**
|
|
315
|
+
* Represents a LikeC4 model with customizable type parameters,
|
|
316
|
+
* parsed from DSL or result from Builder
|
|
317
|
+
*
|
|
318
|
+
* !IMPORTANT: This is a low-level type, use `LikeC4Model` instead.
|
|
319
|
+
* !NOTE: Views are not computed yet.
|
|
320
|
+
*
|
|
321
|
+
* @typeParam ElementKinds - Types of elements in the model (defaults to string)
|
|
322
|
+
* @typeParam RelationKinds - Types of relationships (defaults to string)
|
|
323
|
+
* @typeParam Tags - Types of tags that can be applied (defaults to string)
|
|
324
|
+
* @typeParam Fqns - Fully Qualified Names for elements (defaults to string)
|
|
325
|
+
* @typeParam Views - Types of views in the model (defaults to string)
|
|
326
|
+
* @typeParam DeploymentFqns - Fully Qualified Names for deployment nodes (defaults to string)
|
|
327
|
+
*/
|
|
328
|
+
interface ParsedLikeC4ModelData<A extends Any = UnknownParsed> extends BaseLikeC4ModelData<A> {
|
|
329
|
+
[_stage]: 'parsed';
|
|
330
|
+
views: Record<ViewId<A>, ParsedView<A>>;
|
|
331
|
+
}
|
|
332
|
+
interface ComputedLikeC4ModelData<A extends Any = UnknownComputed> extends BaseLikeC4ModelData<A> {
|
|
333
|
+
[_stage]: 'computed';
|
|
334
|
+
views: Record<ViewId<A>, ComputedView<A>>;
|
|
335
|
+
}
|
|
336
|
+
interface LayoutedLikeC4ModelData<A extends Any = UnknownLayouted> extends BaseLikeC4ModelData<A> {
|
|
337
|
+
[_stage]: 'layouted';
|
|
338
|
+
views: Record<ViewId<A>, LayoutedView<A>>;
|
|
339
|
+
}
|
|
340
|
+
type LikeC4ModelData<A extends Any> = ParsedLikeC4ModelData<A> | ComputedLikeC4ModelData<A> | LayoutedLikeC4ModelData<A>;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* JSON representation of {@link Specification}
|
|
344
|
+
*/
|
|
345
|
+
interface SpecificationDump {
|
|
346
|
+
elements: {
|
|
347
|
+
[kind: string]: object;
|
|
348
|
+
};
|
|
349
|
+
tags?: {
|
|
350
|
+
[tag: string]: object;
|
|
351
|
+
};
|
|
352
|
+
deployments?: {
|
|
353
|
+
[kind: string]: object;
|
|
354
|
+
};
|
|
355
|
+
relationships?: {
|
|
356
|
+
[kind: string]: object;
|
|
357
|
+
};
|
|
358
|
+
metadataKeys?: string[];
|
|
359
|
+
customColors?: {
|
|
360
|
+
[kind: string]: object;
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
type SpecTypesFromDump<J> = J extends SpecificationDump ? SpecAux<KeysOf<J['elements']>, KeysOf<J['deployments']>, KeysOf<J['relationships']>, KeysOf<J['tags']>, J['metadataKeys'] extends readonly [string, ...string[]] ? J['metadataKeys'][number] : never> : SpecAux<never, never, never, never, never>;
|
|
364
|
+
/**
|
|
365
|
+
* Dump differs from {@link ParsedLikeC4ModelData} by the fact that it is computed or layouted
|
|
366
|
+
*/
|
|
367
|
+
type LikeC4ModelDump = {
|
|
368
|
+
[_stage]?: 'computed' | 'layouted';
|
|
369
|
+
projectId?: string;
|
|
370
|
+
project?: ProjectDump;
|
|
371
|
+
specification: SpecificationDump;
|
|
372
|
+
elements?: {
|
|
373
|
+
[kind: string]: object;
|
|
374
|
+
};
|
|
375
|
+
deployments: {
|
|
376
|
+
elements?: {
|
|
377
|
+
[kind: string]: object;
|
|
378
|
+
};
|
|
379
|
+
relations?: {};
|
|
380
|
+
};
|
|
381
|
+
views?: {
|
|
382
|
+
[kind: string]: object;
|
|
383
|
+
};
|
|
384
|
+
relations?: {};
|
|
385
|
+
globals?: {
|
|
386
|
+
predicates?: {};
|
|
387
|
+
dynamicPredicates?: {};
|
|
388
|
+
styles?: {};
|
|
389
|
+
};
|
|
390
|
+
imports?: {};
|
|
391
|
+
};
|
|
392
|
+
type ProjectDump = {
|
|
393
|
+
id: string;
|
|
394
|
+
name?: string;
|
|
395
|
+
title?: string | undefined;
|
|
396
|
+
};
|
|
397
|
+
type AuxFromDump<D> = D extends LikeC4ModelDump ? Aux<D[_stage] extends infer S extends 'computed' | 'layouted' ? S : 'computed' | 'layouted' | 'parsed', KeysOf<D['elements']>, KeysOf<D['deployments']['elements']>, KeysOf<D['views']>, D['projectId'] extends infer PID extends string ? PID : never, SpecTypesFromDump<D['specification']>> : Never;
|
|
398
|
+
|
|
399
|
+
interface RichTextEmpty {
|
|
400
|
+
readonly isEmpty: true;
|
|
401
|
+
readonly isMarkdown: false;
|
|
402
|
+
readonly nonEmpty: false;
|
|
403
|
+
readonly $source: null;
|
|
404
|
+
readonly text: null;
|
|
405
|
+
readonly md: null;
|
|
406
|
+
readonly html: null;
|
|
407
|
+
equals(other: unknown): boolean;
|
|
408
|
+
}
|
|
409
|
+
interface RichTextNonEmpty {
|
|
410
|
+
readonly isEmpty: false;
|
|
411
|
+
readonly nonEmpty: true;
|
|
412
|
+
readonly isMarkdown: boolean;
|
|
413
|
+
readonly $source: MarkdownOrString;
|
|
414
|
+
readonly text: string;
|
|
415
|
+
readonly md: string;
|
|
416
|
+
readonly html: string;
|
|
417
|
+
equals(other: unknown): boolean;
|
|
418
|
+
}
|
|
419
|
+
type RichTextOrEmpty = RichTextNonEmpty | RichTextEmpty;
|
|
420
|
+
/**
|
|
421
|
+
* RichText is a class that represents a potentially markdown string.
|
|
422
|
+
* It can be either a plain text or a markdown.
|
|
423
|
+
* It is used to represent the content of a node or a link.
|
|
424
|
+
*/
|
|
425
|
+
declare class RichText {
|
|
426
|
+
private static _cache;
|
|
427
|
+
/**
|
|
428
|
+
* Creates and memoizes a RichText instance.
|
|
429
|
+
* @see ElementModel.description
|
|
430
|
+
* @example
|
|
431
|
+
*
|
|
432
|
+
* get description(): RichTextOrEmpty {
|
|
433
|
+
* return RichText.memoize(this, this.$element.description)
|
|
434
|
+
* }
|
|
435
|
+
*/
|
|
436
|
+
static memoize(obj: object, tag: symbol | string, source: MarkdownOrString | null | undefined): RichTextOrEmpty;
|
|
437
|
+
/**
|
|
438
|
+
* Creates a RichText instance from a source.
|
|
439
|
+
*/
|
|
440
|
+
static from(source: RichTextOrEmpty | MarkdownOrString | string | null | undefined): RichTextOrEmpty;
|
|
441
|
+
/**
|
|
442
|
+
* This is a workaround for the fact that we need instance of RichText for `instanceof` checks
|
|
443
|
+
* It is invalid inheritance (returning `null` from getters), and we cast to @see RichTextEmpty
|
|
444
|
+
*/
|
|
445
|
+
static EMPTY: RichTextEmpty;
|
|
446
|
+
readonly $source: Readonly<MarkdownOrString> | null;
|
|
447
|
+
readonly isEmpty: boolean;
|
|
448
|
+
readonly nonEmpty: boolean;
|
|
449
|
+
readonly isMarkdown: boolean;
|
|
450
|
+
/**
|
|
451
|
+
* Private constructor to prevent direct instantiation.
|
|
452
|
+
* Use {@link RichText.from} or {@link RichText.memoize} instead.
|
|
453
|
+
*/
|
|
454
|
+
private constructor();
|
|
455
|
+
/**
|
|
456
|
+
* Returns the text content of the rich text.
|
|
457
|
+
* If the source is a string, it returns the string.
|
|
458
|
+
* If the source is a markdown, it returns the markdown.
|
|
459
|
+
*/
|
|
460
|
+
get text(): string;
|
|
461
|
+
/**
|
|
462
|
+
* Returns the markdown content of the rich text.
|
|
463
|
+
* If the source is a string, it returns the string.
|
|
464
|
+
* If the source is a markdown, it returns the markdown.
|
|
465
|
+
*/
|
|
466
|
+
get md(): string;
|
|
467
|
+
/**
|
|
468
|
+
* Returns the html content of the rich text.
|
|
469
|
+
* If the source is a string, it returns the string.
|
|
470
|
+
* If the source is a markdown, it returns the HTML.
|
|
471
|
+
*/
|
|
472
|
+
get html(): string;
|
|
473
|
+
equals(other: unknown): boolean;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export { type DeploymentViewRule as $, type AuxFromLikeC4ModelData as A, isViewRulePredicate as B, type ComputedLikeC4ModelData as C, type DeploymentNode as D, type ElementSpecification as E, isViewRuleStyle as F, isComputedView as G, isElementView as H, isScopedElementView as I, isExtendsElementView as J, isDeploymentView as K, type LayoutedLikeC4ModelData as L, isDynamicView as M, type DiagramNode as N, type DiagramEdge as O, type ParsedLikeC4ModelData as P, type LayoutedElementView as Q, RichText as R, type SpecificationDump as S, type TagSpecification as T, type LayoutedDeploymentView as U, type ViewOnStage as V, LayoutedDynamicView as W, type DeploymentViewIncludePredicate as X, type DeploymentViewExcludePredicate as Y, type DeploymentViewPredicate as Z, type DeploymentViewRuleStyle as _, type RichTextEmpty as a, type ParsedDeploymentView as a0, type RichTextOrEmpty as b, type LikeC4ModelData as c, type DeployedInstance as d, type DeploymentElement as e, type DeploymentElementRef as f, isDeployedInstance as g, type DeploymentRelationship as h, isDeploymentNode as i, type DeploymentRelation as j, type SpecTypesFromDump as k, type LikeC4ModelDump as l, type ProjectDump as m, type AuxFromDump as n, isTagColorSpecified as o, type RelationshipSpecification as p, type Specification as q, type ParsedView as r, type LayoutedView as s, isDiagramView as t, type ComputedView as u, type ProcessedView as v, type AnyView as w, type ViewWithType as x, type ViewRule as y, type ViewRulePredicate as z };
|
|
@@ -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.D5fzJWbF.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, M as MarkdownOrString } from './core.DX-WYEPA.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -278,4 +278,4 @@ declare namespace _aux {
|
|
|
278
278
|
export { type _aux_AllKinds as AllKinds, type _aux_Any as Any, type Any as AnyAux, type _aux_AnySpec as AnySpec, type _aux_Aux as Aux, type _aux_DeploymentFqn as DeploymentFqn, type _aux_DeploymentId as DeploymentId, type _aux_DeploymentKind as DeploymentKind, type _aux_EdgeId as EdgeId, type _aux_ElementId as ElementId, type _aux_ElementKind as ElementKind, type _aux_Fqn as Fqn, type _aux_LooseDeploymentId as LooseDeploymentId, type _aux_LooseDeploymentKind as LooseDeploymentKind, type _aux_LooseElementId as LooseElementId, type _aux_LooseElementKind as LooseElementKind, type _aux_LooseRelationKind as LooseRelationKind, type _aux_LooseTag as LooseTag, type _aux_LooseTags as LooseTags, type _aux_LooseViewId as LooseViewId, type _aux_Metadata as Metadata, type _aux_MetadataKey as MetadataKey, type _aux_Never as Never, type _aux_NodeId as NodeId, type _aux_OrString as OrString, type _aux_PickByStage as PickByStage, type _aux_ProjectId as ProjectId, type _aux_RelationId as RelationId, type _aux_RelationKind as RelationKind, type _aux_Spec as Spec, type _aux_SpecAux as SpecAux, type _aux_Stage as Stage, type DeploymentFqn as StrictDeploymentFqn, type _aux_StrictDeploymentKind as StrictDeploymentKind, type _aux_StrictElementKind as StrictElementKind, type Fqn as StrictFqn, type _aux_StrictProjectId as StrictProjectId, type _aux_StrictRelationKind as StrictRelationKind, type _aux_StrictTag as StrictTag, type _aux_StrictViewId as StrictViewId, type _aux_Tag as Tag, type _aux_Tags as Tags, type _aux_Unknown as Unknown, type _aux_UnknownComputed as UnknownComputed, type _aux_UnknownLayouted as UnknownLayouted, type _aux_UnknownParsed as UnknownParsed, type _aux_ViewId as ViewId, type _aux_WithDescriptionAndTech as WithDescriptionAndTech, type _aux_WithLinks as WithLinks, type _aux_WithMetadata as WithMetadata, type _aux_WithNotation as WithNotation, type _aux_WithOptionalLinks as WithOptionalLinks, type _aux_WithOptionalTags as WithOptionalTags, type _aux_WithTags as WithTags, _aux_preferDescription as preferDescription, _aux_preferSummary as preferSummary, type _aux_setProject as setProject, type _aux_setStage as setStage, type _aux_toComputed as toComputed, type _aux_toLayouted as toLayouted, type _aux_toParsed as toParsed };
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
export { type StrictProjectId as $, type Any as A, type
|
|
281
|
+
export { type StrictProjectId as $, type Any as A, type LooseElementId as B, type LooseDeploymentId as C, type DeploymentId as D, type ExtractOnStage as E, type Fqn as F, type toComputed as G, type toLayouted as H, type Stage as I, type toParsed as J, type LooseViewId as K, type LooseTag as L, type ModelStage as M, type NodeId as N, type setProject as O, type ProjectId as P, type AnySpec as Q, type RelationKind as R, type SpecAux as S, type Tag as T, type Unknown as U, type ViewId as V, type WithDescriptionAndTech as W, type PickByStage as X, type setStage as Y, type Spec as Z, _aux as _, type Aux as a, type StrictTag as a0, type StrictElementKind as a1, type StrictDeploymentKind as a2, type StrictRelationKind as a3, type WithLinks as a4, type OrString as a5, type LooseTags as a6, type LooseElementKind as a7, type LooseDeploymentKind as a8, type LooseRelationKind as a9, type UnknownComputed as b, type UnknownLayouted as c, type UnknownParsed as d, preferSummary as e, _stage as f, _type as g, type StrictViewId as h, isOnStage as i, type ElementKind as j, type ElementId as k, type AllKinds as l, type Tags as m, type WithOptionalTags as n, type WithOptionalLinks as o, preferDescription as p, type WithMetadata as q, type WithNotation as r, type DeploymentFqn as s, type DeploymentKind as t, type MetadataKey as u, type EdgeId as v, type Never as w, type WithTags as x, type Metadata as y, type RelationId as z };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e } from './core.DRJma0Ol.mjs';
|
|
2
2
|
import { i as invariant } from './core.D4npX2q8.mjs';
|
|
3
3
|
|
|
4
4
|
function isome(arg1, arg2) {
|
|
5
5
|
const pred = arg2 ?? arg1;
|
|
6
|
-
invariant(
|
|
6
|
+
invariant(e(pred));
|
|
7
7
|
function _some(iter) {
|
|
8
8
|
for (const value of iter) {
|
|
9
9
|
if (pred(value)) {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const e={done:true,hasNext:false},t$1={done:false,hasNext:false},n$1=()=>e;
|
|
2
|
+
|
|
3
|
+
function t(e,...t){let a=e,o=t.map(e=>`lazy`in e?r(e):void 0),s=0;for(;s<t.length;){if(o[s]===void 0||!i(a)){let e=t[s];a=e(a),s+=1;continue}let e=[];for(let n=s;n<t.length;n++){let t=o[n];if(t===void 0||(e.push(t),t.isSingle))break}let r=[];for(let t of a)if(n(t,r,e))break;let{isSingle:c}=e.at(-1);a=c?r[0]:r,s+=e.length;}return a}function n(t,r,i){if(i.length===0)return r.push(t),false;let a=t,o=t$1,s=false;for(let[e,t]of i.entries()){let{index:c,items:l}=t;if(l.push(a),o=t(a,c,l),t.index+=1,o.hasNext){if(o.hasMany??false){for(let t of o.next)if(n(t,r,i.slice(e+1)))return true;return s}a=o.next;}if(!o.hasNext)break;o.done&&(s=true);}return o.hasNext&&r.push(a),s}function r(e){let{lazy:t,lazyArgs:n}=e,r=t(...n);return Object.assign(r,{isSingle:t.single??false,index:0,items:[]})}function i(e){return typeof e==`string`||typeof e==`object`&&!!e&&Symbol.iterator in e}
|
|
4
|
+
|
|
5
|
+
export { t$1 as a, n$1 as n, t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e } from './core.DRJma0Ol.mjs';
|
|
2
2
|
import { i as invariant } from './core.D4npX2q8.mjs';
|
|
3
3
|
|
|
4
4
|
function ifind(arg1, arg2) {
|
|
5
5
|
const pred = arg2 ?? arg1;
|
|
6
|
-
invariant(
|
|
6
|
+
invariant(e(pred));
|
|
7
7
|
function _find(iter) {
|
|
8
8
|
for (const value of iter) {
|
|
9
9
|
if (pred(value)) {
|