@likec4/core 1.36.0 → 1.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/builder/index.d.mts +4 -4
  2. package/dist/builder/index.mjs +11 -8
  3. package/dist/compute-view/index.d.mts +4 -4
  4. package/dist/compute-view/index.mjs +8 -8
  5. package/dist/compute-view/relationships-view/index.d.mts +4 -4
  6. package/dist/index.d.mts +4 -4
  7. package/dist/index.mjs +6 -5
  8. package/dist/model/connection/deployment/index.d.mts +6 -6
  9. package/dist/model/connection/deployment/index.mjs +2 -2
  10. package/dist/model/connection/index.d.mts +8 -8
  11. package/dist/model/connection/index.mjs +2 -2
  12. package/dist/model/connection/model/index.d.mts +6 -6
  13. package/dist/model/index.d.mts +11 -11
  14. package/dist/model/index.mjs +5 -5
  15. package/dist/shared/core.BL_xjl90.mjs +92 -0
  16. package/dist/shared/{core.DHYd2-VU.d.mts → core.BTw4y86Y.d.mts} +3 -3
  17. package/dist/shared/{core.CaJp8Amg.mjs → core.BW8K1y6R.mjs} +2 -2
  18. package/dist/shared/{core.DxDn5nB5.d.mts → core.CE_hG7EJ.d.mts} +10 -6
  19. package/dist/shared/{core.Bt3kuGUN.d.mts → core.CLQVFRsf.d.mts} +3 -3
  20. package/dist/shared/{core._jnYNUQ-.mjs → core.DK6I-Nr7.mjs} +1 -1
  21. package/dist/shared/{core.668kXpZq.d.mts → core.DX-WYEPA.d.mts} +4 -3
  22. package/dist/shared/{core.Bus32P0S.mjs → core.DX4dbV2w.mjs} +1 -1
  23. package/dist/shared/{core.D8bTI5KC.d.mts → core.DYufusLE.d.mts} +3 -3
  24. package/dist/shared/{core.CaaYNQDM.mjs → core.H8NbNp2X.mjs} +5 -2
  25. package/dist/shared/{core.BFb3p5d-.d.mts → core.O6FG0HF9.d.mts} +1 -1
  26. package/dist/shared/{core.BlwZ4tBa.mjs → core.mpx5crlJ.mjs} +7 -7
  27. package/dist/shared/{core.BvIGRozf.mjs → core.n8wh5WZA.mjs} +13 -5
  28. package/dist/shared/{core.DoNP3Yl-.d.mts → core.rk17MdPp.d.mts} +11 -3
  29. package/dist/shared/{core.CF82MWyh.d.mts → core.wwaSalox.d.mts} +1 -1
  30. package/dist/types/_aux.d.mts +2 -2
  31. package/dist/types/_aux.mjs +4 -0
  32. package/dist/types/index.d.mts +5 -5
  33. package/dist/types/index.mjs +5 -4
  34. package/dist/types/scalar.d.mts +1 -1
  35. package/dist/types/scalar.mjs +4 -68
  36. package/dist/utils/index.d.mts +2 -2
  37. package/package.json +2 -2
  38. package/src/builder/Builder.ts +4 -1
  39. package/src/compute-view/utils/applyCustomElementProperties.ts +1 -1
  40. package/src/model/LikeC4Model.ts +10 -2
  41. package/src/types/RichText.ts +5 -2
  42. package/src/types/expression-model.ts +3 -3
  43. package/src/types/expression.ts +3 -3
  44. package/src/types/index.ts +2 -2
  45. package/src/types/project.ts +7 -2
  46. package/src/types/scalar.ts +3 -0
@@ -1,9 +1,9 @@
1
1
  import { LastArrayElement, Split, Simplify, IsLiteral, Writable, IfNever, IsNever, TupleToUnion, Tagged } from 'type-fest';
2
- import { g as LikeC4Model } from '../shared/core.DoNP3Yl-.mjs';
3
- import { D as DeploymentFqn, F as Fqn } from '../shared/core.668kXpZq.mjs';
4
- import { r as DeploymentElement, v as DeploymentRelationship, T as Element, _ as ModelRelation, a9 as Participant, M as ModelFqnExpr, d as ModelRelationExpr, aH as AnyViewRuleStyle, aM as AutoLayoutDirection, E as Expression, an as ParsedView, bb as ParsedDeploymentView, br as ParsedElementView, n as ParsedLikeC4ModelData, $ as ElementSpecification$1, a2 as RelationshipSpecification, a0 as TagSpecification } from '../shared/core.DxDn5nB5.mjs';
2
+ import { g as LikeC4Model } from '../shared/core.rk17MdPp.mjs';
3
+ import { D as DeploymentFqn, F as Fqn } from '../shared/core.DX-WYEPA.mjs';
4
+ import { r as DeploymentElement, v as DeploymentRelationship, T as Element, _ as ModelRelation, a9 as Participant, M as ModelFqnExpr, d as ModelRelationExpr, aH as AnyViewRuleStyle, aM as AutoLayoutDirection, E as Expression, an as ParsedView, bb as ParsedDeploymentView, br as ParsedElementView, n as ParsedLikeC4ModelData, $ as ElementSpecification$1, a2 as RelationshipSpecification, a0 as TagSpecification } from '../shared/core.CE_hG7EJ.mjs';
5
5
  import { N as NonEmptyArray, K as KeysOf } from '../shared/core.DuSLYTG6.mjs';
6
- import { x as setProject, a as Aux, S as SpecAux, A as Any } from '../shared/core.BFb3p5d-.mjs';
6
+ import { x as setProject, a as Aux, S as SpecAux, A as Any } from '../shared/core.O6FG0HF9.mjs';
7
7
  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';
8
8
  import '../shared/core.CywrQs86.mjs';
9
9
 
@@ -1,17 +1,17 @@
1
- import { i, l, d, c as computeLikeC4Model } from '../shared/core.BlwZ4tBa.mjs';
1
+ import { i, l, d, c as computeLikeC4Model } from '../shared/core.mpx5crlJ.mjs';
2
2
  import { m } from '../shared/core.ByrmCl9I.mjs';
3
- import { a as _type, n as n$1, _ as _stage, c as isDeployedInstance, F as FqnRef } from '../shared/core._jnYNUQ-.mjs';
3
+ import { a as _type, n as n$1, _ as _stage, c as isDeployedInstance, F as FqnRef } from '../shared/core.DK6I-Nr7.mjs';
4
4
  import { t as t$2 } from '../shared/core.BH9nN-_I.mjs';
5
5
  import { l as l$1 } from '../shared/core.8KM0D6va.mjs';
6
6
  import { u } from '../shared/core.DbRvwARP.mjs';
7
- import { t as t$1 } from '../shared/core.BvIGRozf.mjs';
7
+ import { t as t$1 } from '../shared/core.n8wh5WZA.mjs';
8
8
  import { i as i$1 } from '../shared/core.CpwrZi3D.mjs';
9
9
  import { n as nameFromFqn, k as isSameHierarchy, p as parentFqn } from '../shared/core.DQj9iv_y.mjs';
10
10
  import { t } from '../shared/core.zLlww-07.mjs';
11
- import { s as o, M as ModelFqnExpr, f as isElementView } from '../shared/core.CaJp8Amg.mjs';
11
+ import { s as o, M as ModelFqnExpr, f as isElementView } from '../shared/core.BW8K1y6R.mjs';
12
12
  import { i as invariant } from '../shared/core.D4npX2q8.mjs';
13
- import { a as DefaultElementShape, D as DefaultThemeColor } from '../shared/core.CaaYNQDM.mjs';
14
- import '../shared/core.Bus32P0S.mjs';
13
+ import { a as DefaultElementShape, D as DefaultThemeColor } from '../shared/core.H8NbNp2X.mjs';
14
+ import '../shared/core.DX4dbV2w.mjs';
15
15
  import '../shared/core.C1GV0WWV.mjs';
16
16
  import '../shared/core.CnIyafWn.mjs';
17
17
  import '../shared/core.B0oEIXqd.mjs';
@@ -28,7 +28,7 @@ import '../shared/core.Y3j3s-oq.mjs';
28
28
  import '../shared/core.BgvIuGGU.mjs';
29
29
  import '../shared/core.BoyJPEen.mjs';
30
30
  import '../shared/core.HUONfQfd.mjs';
31
- import '../types/scalar.mjs';
31
+ import '../shared/core.BL_xjl90.mjs';
32
32
  import '../shared/core.BpJu1RrF.mjs';
33
33
  import '../shared/core.Btl47GOn.mjs';
34
34
  import '../shared/core.yaRvRnMW.mjs';
@@ -591,7 +591,10 @@ function builder(spec, _elements = /* @__PURE__ */ new Map(), _relations = [], _
591
591
  build: (project) => ({
592
592
  [_stage]: "parsed",
593
593
  projectId: project?.id ?? "from-builder",
594
- project: project ?? { id: "from-builder" },
594
+ project: {
595
+ id: "from-builder",
596
+ ...project
597
+ },
595
598
  specification: toLikeC4Specification(),
596
599
  elements: n(
597
600
  structuredClone(
@@ -1,9 +1,9 @@
1
- import { A as Any } from '../shared/core.BFb3p5d-.mjs';
2
- import { g as LikeC4Model } from '../shared/core.DoNP3Yl-.mjs';
3
- import { n as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, an as ParsedView, aq as ComputedView } from '../shared/core.DxDn5nB5.mjs';
1
+ import { A as Any } from '../shared/core.O6FG0HF9.mjs';
2
+ import { g as LikeC4Model } from '../shared/core.rk17MdPp.mjs';
3
+ import { n as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, an as ParsedView, aq as ComputedView } from '../shared/core.CE_hG7EJ.mjs';
4
4
  import 'type-fest';
5
5
  import '../shared/core.DuSLYTG6.mjs';
6
- import '../shared/core.668kXpZq.mjs';
6
+ import '../shared/core.DX-WYEPA.mjs';
7
7
  import '../shared/core.CywrQs86.mjs';
8
8
  import '../shared/core.CzdwsPmY.mjs';
9
9
 
@@ -1,8 +1,8 @@
1
- import { G as Graph, w as willCreateCycle, t as topologicalSortExports, i as i$2, l } from '../shared/core.BlwZ4tBa.mjs';
2
- export { c as computeLikeC4Model, a as computeParsedModelData, b as computeView, u as unsafeComputeView } from '../shared/core.BlwZ4tBa.mjs';
3
- import { i as i$1 } from '../shared/core.Bus32P0S.mjs';
4
- import { r } from '../shared/core.BvIGRozf.mjs';
5
- import { h as isExtendsElementView, f as isElementView } from '../shared/core.CaJp8Amg.mjs';
1
+ import { G as Graph, w as willCreateCycle, t as topologicalSortExports, i as i$2, l } from '../shared/core.mpx5crlJ.mjs';
2
+ export { c as computeLikeC4Model, a as computeParsedModelData, b as computeView, u as unsafeComputeView } from '../shared/core.mpx5crlJ.mjs';
3
+ import { i as i$1 } from '../shared/core.DX4dbV2w.mjs';
4
+ import { r } from '../shared/core.n8wh5WZA.mjs';
5
+ import { h as isExtendsElementView, f as isElementView } from '../shared/core.BW8K1y6R.mjs';
6
6
  import { o as isNonEmptyArray } from '../shared/core.DQj9iv_y.mjs';
7
7
  import { i } from '../shared/core.CpwrZi3D.mjs';
8
8
  import { u } from '../shared/core.DbRvwARP.mjs';
@@ -16,10 +16,10 @@ import '../shared/core.D4npX2q8.mjs';
16
16
  import '../shared/core.HUONfQfd.mjs';
17
17
  import '../shared/core.8KM0D6va.mjs';
18
18
  import '../shared/core.CnIyafWn.mjs';
19
- import '../shared/core._jnYNUQ-.mjs';
19
+ import '../shared/core.DK6I-Nr7.mjs';
20
20
  import '../shared/core.zLlww-07.mjs';
21
- import '../types/scalar.mjs';
22
- import '../shared/core.CaaYNQDM.mjs';
21
+ import '../shared/core.BL_xjl90.mjs';
22
+ import '../shared/core.H8NbNp2X.mjs';
23
23
  import '../shared/core.B0oEIXqd.mjs';
24
24
  import 'rehype-raw';
25
25
  import 'rehype-sanitize';
@@ -1,10 +1,10 @@
1
- import { A as Any, U as Unknown, g as ElementId, V as ViewId } from '../../shared/core.BFb3p5d-.mjs';
2
- import { E as ElementModel, R as RelationshipModel, g as LikeC4Model } from '../../shared/core.DoNP3Yl-.mjs';
1
+ import { A as Any, U as Unknown, g as ElementId, V as ViewId } from '../../shared/core.O6FG0HF9.mjs';
2
+ import { E as ElementModel, R as RelationshipModel, g as LikeC4Model } from '../../shared/core.rk17MdPp.mjs';
3
3
  import 'type-fest';
4
4
  import '../../shared/core.DuSLYTG6.mjs';
5
- import '../../shared/core.668kXpZq.mjs';
5
+ import '../../shared/core.DX-WYEPA.mjs';
6
6
  import '../../shared/core.CywrQs86.mjs';
7
- import '../../shared/core.DxDn5nB5.mjs';
7
+ import '../../shared/core.CE_hG7EJ.mjs';
8
8
  import '../../shared/core.CzdwsPmY.mjs';
9
9
 
10
10
  type RelationshipsViewData<M extends Any = Unknown> = {
package/dist/index.d.mts CHANGED
@@ -1,12 +1,12 @@
1
1
  export { ElementColors, RelationshipColors, computeColorValues, defaultTheme } from './theme/index.mjs';
2
2
  export { BiMap, DefaultWeakMap, LinkedList, MultiMap, Queue, Stack, commonHead, compareNatural, compareNaturalHierarchically, compareRelations, delay, difference, equalsSet, getOrCreate, hasAtLeast, intersection, invariant, isNonEmptyArray, isString, markdownToHtml, markdownToText, memoizeProp, nonNullable, nonexhaustive, objectHash, promiseNextTick, stringHash, symmetricDifference, union } from './utils/index.mjs';
3
3
  export { D as DefaultMap } from './shared/core.CywrQs86.mjs';
4
- 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.BFb3p5d-.mjs';
5
- 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.668kXpZq.mjs';
6
- export { Y as AbstractRelationship, ae as AndOperator, aG as AnyExcludePredicate, aF as AnyIncludePredicate, as as AnyView, aH as AnyViewRuleStyle, aM as AutoLayoutDirection, H as AuxFromDump, A as AuxFromLikeC4ModelData, B as BBox, aU as BaseParsedViewProperties, aT as BaseViewProperties, a$ as ComputedDeploymentView, b0 as ComputedDynamicView, aZ as ComputedEdge, a_ as ComputedElementView, C as ComputedLikeC4ModelData, aY as ComputedNode, aq as ComputedView, V as DefaultArrowType, J as DefaultElementShape, U as DefaultLineStyle, N as DefaultPaddingSize, W as DefaultRelationshipColor, K as DefaultShapeSize, O as DefaultTextSize, I as DefaultThemeColor, q as DeployedInstance, r as DeploymentElement, s as DeploymentElementRef, D as DeploymentElementStyle, p as DeploymentNode, w as DeploymentRelation, v as DeploymentRelationship, b7 as DeploymentViewExcludePredicate, b6 as DeploymentViewIncludePredicate, b8 as DeploymentViewPredicate, ba as DeploymentViewRule, b9 as DeploymentViewRuleStyle, b2 as DiagramEdge, b1 as DiagramNode, ao as DiagramView, bg as DynamicViewIncludeRule, bd as DynamicViewParallelSteps, bh as DynamicViewRule, bc as DynamicViewStep, bf as DynamicViewStepOrParallel, T as Element, $ as ElementSpecification, Q as ElementStyle, bl as ElementViewExcludePredicate, bk as ElementViewIncludePredicate, bm as ElementViewPredicate, bq as ElementViewRule, bn as ElementViewRuleGroup, bp as ElementViewRuleStyle, a4 as EqualOperator, E as Expression, aj as Filterable, F as FqnExpr, f as FqnRef, j as GlobalDynamicPredicates, G as GlobalPredicateId, i as GlobalPredicates, k as GlobalStyleID, l as GlobalStyles, a7 as KindEqual, b4 as LayoutedDeploymentView, b5 as LayoutedDynamicView, b3 as LayoutedElementView, L as LayoutedLikeC4ModelData, ao as LayoutedView, o as LikeC4ModelData, y as LikeC4ModelDump, am as LikeC4Project, an as LikeC4View, e as ModelExpression, M as ModelFqnExpr, m as ModelGlobals, _ as ModelRelation, d as ModelRelationExpr, aV as NodeNotation, ac as NotOperator, ak as OperatorPredicate, ag as OrOperator, bb as ParsedDeploymentView, bi as ParsedDynamicView, br as ParsedElementView, n as ParsedLikeC4ModelData, an as ParsedView, a9 as Participant, aa as ParticipantOperator, g as Point, P as PredicateSelector, ar as ProcessedView, z as ProjectDump, h as RectBox, c as RelationExpr, Z as Relationship, a2 as RelationshipSpecification, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, x as SpecTypesFromDump, a3 as Specification, S as SpecificationDump, a5 as TagEqual, a0 as TagSpecification, aQ as ViewAutoLayout, aR as ViewManualLayout, at as ViewOnStage, av as ViewRule, aO as ViewRuleAutoLayout, aK as ViewRuleGlobalPredicateRef, aI as ViewRuleGlobalStyle, aw as ViewRulePredicate, aS as ViewType, aX as ViewWithHash, aW as ViewWithNotation, au as ViewWithType, ai as WhereOperator, X as XYPoint, be as getParallelStepsPrefix, af as isAndOperator, aN as isAutoLayoutDirection, az as isComputedView, u as isDeployedInstance, t as isDeploymentNode, aD as isDeploymentView, ap as isDiagramView, aE as isDynamicView, bj as isDynamicViewParallelSteps, aA as isElementView, aC as isExtendsElementView, a8 as isKindEqual, ap as isLayoutedView, ad as isNotOperator, ah as isOrOperator, ab as isParticipantOperator, aB as isScopedElementView, a1 as isTagColorSpecified, a6 as isTagEqual, aP as isViewRuleAutoLayout, aL as isViewRuleGlobalPredicateRef, aJ as isViewRuleGlobalStyle, bo as isViewRuleGroup, ax as isViewRulePredicate, ay as isViewRuleStyle, al as whereOperatorAsPredicate } from './shared/core.DxDn5nB5.mjs';
4
+ 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.O6FG0HF9.mjs';
5
+ 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';
6
+ export { Y as AbstractRelationship, ae as AndOperator, aG as AnyExcludePredicate, aF as AnyIncludePredicate, as as AnyView, aH as AnyViewRuleStyle, aM as AutoLayoutDirection, H as AuxFromDump, A as AuxFromLikeC4ModelData, B as BBox, aU as BaseParsedViewProperties, aT as BaseViewProperties, a$ as ComputedDeploymentView, b0 as ComputedDynamicView, aZ as ComputedEdge, a_ as ComputedElementView, C as ComputedLikeC4ModelData, aY as ComputedNode, aq as ComputedView, V as DefaultArrowType, J as DefaultElementShape, U as DefaultLineStyle, N as DefaultPaddingSize, W as DefaultRelationshipColor, K as DefaultShapeSize, O as DefaultTextSize, I as DefaultThemeColor, q as DeployedInstance, r as DeploymentElement, s as DeploymentElementRef, D as DeploymentElementStyle, p as DeploymentNode, w as DeploymentRelation, v as DeploymentRelationship, b7 as DeploymentViewExcludePredicate, b6 as DeploymentViewIncludePredicate, b8 as DeploymentViewPredicate, ba as DeploymentViewRule, b9 as DeploymentViewRuleStyle, b2 as DiagramEdge, b1 as DiagramNode, ao as DiagramView, bg as DynamicViewIncludeRule, bd as DynamicViewParallelSteps, bh as DynamicViewRule, bc as DynamicViewStep, bf as DynamicViewStepOrParallel, T as Element, $ as ElementSpecification, Q as ElementStyle, bl as ElementViewExcludePredicate, bk as ElementViewIncludePredicate, bm as ElementViewPredicate, bq as ElementViewRule, bn as ElementViewRuleGroup, bp as ElementViewRuleStyle, a4 as EqualOperator, E as Expression, aj as Filterable, F as FqnExpr, f as FqnRef, j as GlobalDynamicPredicates, G as GlobalPredicateId, i as GlobalPredicates, k as GlobalStyleID, l as GlobalStyles, a7 as KindEqual, b4 as LayoutedDeploymentView, b5 as LayoutedDynamicView, b3 as LayoutedElementView, L as LayoutedLikeC4ModelData, ao as LayoutedView, o as LikeC4ModelData, y as LikeC4ModelDump, am as LikeC4Project, an as LikeC4View, e as ModelExpression, M as ModelFqnExpr, m as ModelGlobals, _ as ModelRelation, d as ModelRelationExpr, aV as NodeNotation, ac as NotOperator, ak as OperatorPredicate, ag as OrOperator, bb as ParsedDeploymentView, bi as ParsedDynamicView, br as ParsedElementView, n as ParsedLikeC4ModelData, an as ParsedView, a9 as Participant, aa as ParticipantOperator, g as Point, P as PredicateSelector, ar as ProcessedView, z as ProjectDump, h as RectBox, c as RelationExpr, Z as Relationship, a2 as RelationshipSpecification, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, x as SpecTypesFromDump, a3 as Specification, S as SpecificationDump, a5 as TagEqual, a0 as TagSpecification, aQ as ViewAutoLayout, aR as ViewManualLayout, at as ViewOnStage, av as ViewRule, aO as ViewRuleAutoLayout, aK as ViewRuleGlobalPredicateRef, aI as ViewRuleGlobalStyle, aw as ViewRulePredicate, aS as ViewType, aX as ViewWithHash, aW as ViewWithNotation, au as ViewWithType, ai as WhereOperator, X as XYPoint, be as getParallelStepsPrefix, af as isAndOperator, aN as isAutoLayoutDirection, az as isComputedView, u as isDeployedInstance, t as isDeploymentNode, aD as isDeploymentView, ap as isDiagramView, aE as isDynamicView, bj as isDynamicViewParallelSteps, aA as isElementView, aC as isExtendsElementView, a8 as isKindEqual, ap as isLayoutedView, ad as isNotOperator, ah as isOrOperator, ab as isParticipantOperator, aB as isScopedElementView, a1 as isTagColorSpecified, a6 as isTagEqual, aP as isViewRuleAutoLayout, aL as isViewRuleGlobalPredicateRef, aJ as isViewRuleGlobalStyle, bo as isViewRuleGroup, ax as isViewRulePredicate, ay as isViewRuleStyle, al as whereOperatorAsPredicate } from './shared/core.CE_hG7EJ.mjs';
7
7
  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.DuSLYTG6.mjs';
8
8
  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';
9
9
  export { ViewChange } from './types/index.mjs';
10
- export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from './shared/core.CF82MWyh.mjs';
10
+ export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from './shared/core.wwaSalox.mjs';
11
11
  export { ifilter, ifind, ifirst, iflat, ihead, imap, ireduce, isIterable, isome, iunique, toArray, toSet } from './utils/iterable/index.mjs';
12
12
  import 'type-fest';
package/dist/index.mjs CHANGED
@@ -1,9 +1,10 @@
1
1
  export { ElementColors, RelationshipColors, computeColorValues, defaultTheme } from './theme/index.mjs';
2
- export { f as DefaultArrowType, a as DefaultElementShape, e as DefaultLineStyle, c as DefaultPaddingSize, g as DefaultRelationshipColor, b as DefaultShapeSize, d as DefaultTextSize, D as DefaultThemeColor, R as RichText } from './shared/core.CaaYNQDM.mjs';
3
- export { F as FqnRef, _ as _stage, a as _type, h as isAndOperator, c as isDeployedInstance, b as isDeploymentNode, e as isKindEqual, g as isNotOperator, i as isOnStage, j as isOrOperator, f as isParticipantOperator, d as isTagEqual, w as whereOperatorAsPredicate } from './shared/core._jnYNUQ-.mjs';
4
- export { E as Expression, F as FqnExpr, b as ModelExpression, M as ModelFqnExpr, a as ModelRelationExpr, R as RelationExpr, p as getParallelStepsPrefix, n as isAutoLayoutDirection, d as isComputedView, j as isDeploymentView, e as isDiagramView, k as isDynamicView, q as isDynamicViewParallelSteps, f as isElementView, h as isExtendsElementView, e as isLayoutedView, g as isScopedElementView, o as isViewRuleAutoLayout, m as isViewRuleGlobalPredicateRef, l as isViewRuleGlobalStyle, r as isViewRuleGroup, i as isViewRulePredicate, c as isViewRuleStyle } from './shared/core.CaJp8Amg.mjs';
2
+ export { _ as aux } from './types/_aux.mjs';
3
+ export { D as DeploymentFqn, E as EdgeId, F as Fqn, a as GlobalFqn, G as GroupElementKind, N as NodeId, P as ProjectId, R as RelationId, S as StepEdgeKind, V as ViewId, g as extractStep, f as flattenMarkdownOrString, b as isGlobalFqn, i as isGroupElementKind, e as isStepEdgeId, s as scalar, c as splitGlobalFqn, d as stepEdgeId } from './shared/core.BL_xjl90.mjs';
4
+ export { f as DefaultArrowType, a as DefaultElementShape, e as DefaultLineStyle, c as DefaultPaddingSize, g as DefaultRelationshipColor, b as DefaultShapeSize, d as DefaultTextSize, D as DefaultThemeColor, R as RichText } from './shared/core.H8NbNp2X.mjs';
5
+ export { F as FqnRef, _ as _stage, a as _type, h as isAndOperator, c as isDeployedInstance, b as isDeploymentNode, e as isKindEqual, g as isNotOperator, i as isOnStage, j as isOrOperator, f as isParticipantOperator, d as isTagEqual, w as whereOperatorAsPredicate } from './shared/core.DK6I-Nr7.mjs';
6
+ export { E as Expression, F as FqnExpr, b as ModelExpression, M as ModelFqnExpr, a as ModelRelationExpr, R as RelationExpr, p as getParallelStepsPrefix, n as isAutoLayoutDirection, d as isComputedView, j as isDeploymentView, e as isDiagramView, k as isDynamicView, q as isDynamicViewParallelSteps, f as isElementView, h as isExtendsElementView, e as isLayoutedView, g as isScopedElementView, o as isViewRuleAutoLayout, m as isViewRuleGlobalPredicateRef, l as isViewRuleGlobalStyle, r as isViewRuleGroup, i as isViewRulePredicate, c as isViewRuleStyle } from './shared/core.BW8K1y6R.mjs';
5
7
  export { B as BBox, a as BorderStyles, E as ElementShapes, R as RectBox, T as ThemeColors, i as isTagColorSpecified, b as isThemeColor } from './shared/core.CxGKeL-L.mjs';
6
- export { DeploymentFqn, EdgeId, Fqn, GlobalFqn, GroupElementKind, NodeId, RelationId, StepEdgeKind, ViewId, extractStep, flattenMarkdownOrString, isGlobalFqn, isGroupElementKind, isStepEdgeId, splitGlobalFqn, stepEdgeId } from './types/scalar.mjs';
7
8
  export { b as BiMap, d as DefaultWeakMap, l as LinkedList, m as MultiMap, q as Queue, c as compareRelations, a as delay, p as promiseNextTick } from './shared/core.b2BzqGz0.mjs';
8
9
  export { D as DefaultMap } from './shared/core.yaRvRnMW.mjs';
9
10
  export { S as Stack, c as commonHead, o as objectHash } from './shared/core.HUONfQfd.mjs';
@@ -22,8 +23,8 @@ import '@mantine/colors-generator';
22
23
  import 'chroma-js';
23
24
  import './shared/core.BpJu1RrF.mjs';
24
25
  import './shared/core.DbRvwARP.mjs';
25
- import './shared/core.zLlww-07.mjs';
26
26
  import './shared/core.CnIyafWn.mjs';
27
+ import './shared/core.zLlww-07.mjs';
27
28
  import './shared/core.BgvIuGGU.mjs';
28
29
  import './shared/core.ByrmCl9I.mjs';
29
30
  import 'rehype-raw';
@@ -1,10 +1,10 @@
1
- export { C as Connection } from '../../../shared/core.D8bTI5KC.mjs';
2
- export { D as DeploymentConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.DHYd2-VU.mjs';
3
- import '../../../shared/core.DoNP3Yl-.mjs';
4
- import '../../../shared/core.BFb3p5d-.mjs';
1
+ export { C as Connection } from '../../../shared/core.DYufusLE.mjs';
2
+ export { D as DeploymentConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.BTw4y86Y.mjs';
3
+ import '../../../shared/core.rk17MdPp.mjs';
4
+ import '../../../shared/core.O6FG0HF9.mjs';
5
5
  import 'type-fest';
6
6
  import '../../../shared/core.DuSLYTG6.mjs';
7
- import '../../../shared/core.668kXpZq.mjs';
7
+ import '../../../shared/core.DX-WYEPA.mjs';
8
8
  import '../../../shared/core.CywrQs86.mjs';
9
- import '../../../shared/core.DxDn5nB5.mjs';
9
+ import '../../../shared/core.CE_hG7EJ.mjs';
10
10
  import '../../../shared/core.CzdwsPmY.mjs';
@@ -1,5 +1,5 @@
1
1
  export { C as Connection } from '../../../shared/core.C1GV0WWV.mjs';
2
- export { D as DeploymentConnectionModel, f as findConnection, a as findConnectionsBetween, b as findConnectionsWithin } from '../../../shared/core.Bus32P0S.mjs';
2
+ export { D as DeploymentConnectionModel, f as findConnection, a as findConnectionsBetween, b as findConnectionsWithin } from '../../../shared/core.DX4dbV2w.mjs';
3
3
  import '../../../shared/core.DQj9iv_y.mjs';
4
4
  import '../../../shared/core.zLlww-07.mjs';
5
5
  import '../../../shared/core.CpwrZi3D.mjs';
@@ -16,4 +16,4 @@ import 'remark-rehype';
16
16
  import 'unified';
17
17
  import 'mdast-util-from-markdown';
18
18
  import 'mdast-util-to-string';
19
- import '../../../shared/core.CaaYNQDM.mjs';
19
+ import '../../../shared/core.H8NbNp2X.mjs';
@@ -1,14 +1,14 @@
1
- import { C as Connection } from '../../shared/core.D8bTI5KC.mjs';
2
- export { D as DeploymentConnectionModel, f as deployment } from '../../shared/core.DHYd2-VU.mjs';
3
- export { C as ConnectionModel, f as model } from '../../shared/core.Bt3kuGUN.mjs';
4
- import { I as IterableContainer, R as ReorderedArray } from '../../shared/core.CF82MWyh.mjs';
5
- import '../../shared/core.DoNP3Yl-.mjs';
6
- import '../../shared/core.BFb3p5d-.mjs';
1
+ import { C as Connection } from '../../shared/core.DYufusLE.mjs';
2
+ export { D as DeploymentConnectionModel, f as deployment } from '../../shared/core.BTw4y86Y.mjs';
3
+ export { C as ConnectionModel, f as model } from '../../shared/core.CLQVFRsf.mjs';
4
+ import { I as IterableContainer, R as ReorderedArray } from '../../shared/core.wwaSalox.mjs';
5
+ import '../../shared/core.rk17MdPp.mjs';
6
+ import '../../shared/core.O6FG0HF9.mjs';
7
7
  import 'type-fest';
8
8
  import '../../shared/core.DuSLYTG6.mjs';
9
- import '../../shared/core.668kXpZq.mjs';
9
+ import '../../shared/core.DX-WYEPA.mjs';
10
10
  import '../../shared/core.CywrQs86.mjs';
11
- import '../../shared/core.DxDn5nB5.mjs';
11
+ import '../../shared/core.CE_hG7EJ.mjs';
12
12
  import '../../shared/core.CzdwsPmY.mjs';
13
13
 
14
14
  /**
@@ -1,5 +1,5 @@
1
1
  export { C as Connection } from '../../shared/core.C1GV0WWV.mjs';
2
- export { D as DeploymentConnectionModel, d as deployment } from '../../shared/core.Bus32P0S.mjs';
2
+ export { D as DeploymentConnectionModel, d as deployment } from '../../shared/core.DX4dbV2w.mjs';
3
3
  export { C as ConnectionModel, d as differenceConnections, f as findAscendingConnections, a as findDeepestNestedConnection, b as findDescendantConnections, h as hasSameSource, c as hasSameSourceTarget, e as hasSameTarget, i as isAnyInOut, g as isIncoming, j as isNestedConnection, k as isOutgoing, m as mergeConnections, n as model, s as sortConnectionsByBoundaryHierarchy, l as sortDeepestFirst } from '../../shared/core.Y3j3s-oq.mjs';
4
4
  import '../../shared/core.DQj9iv_y.mjs';
5
5
  import '../../shared/core.zLlww-07.mjs';
@@ -17,7 +17,7 @@ import 'remark-rehype';
17
17
  import 'unified';
18
18
  import 'mdast-util-from-markdown';
19
19
  import 'mdast-util-to-string';
20
- import '../../shared/core.CaaYNQDM.mjs';
20
+ import '../../shared/core.H8NbNp2X.mjs';
21
21
  import '../../shared/core.BgvIuGGU.mjs';
22
22
  import '../../shared/core.ByrmCl9I.mjs';
23
23
  import '../../shared/core.BoyJPEen.mjs';
@@ -1,10 +1,10 @@
1
- export { C as Connection } from '../../../shared/core.D8bTI5KC.mjs';
2
- export { C as ConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.Bt3kuGUN.mjs';
3
- import '../../../shared/core.DoNP3Yl-.mjs';
4
- import '../../../shared/core.BFb3p5d-.mjs';
1
+ export { C as Connection } from '../../../shared/core.DYufusLE.mjs';
2
+ export { C as ConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.CLQVFRsf.mjs';
3
+ import '../../../shared/core.rk17MdPp.mjs';
4
+ import '../../../shared/core.O6FG0HF9.mjs';
5
5
  import 'type-fest';
6
6
  import '../../../shared/core.DuSLYTG6.mjs';
7
- import '../../../shared/core.668kXpZq.mjs';
7
+ import '../../../shared/core.DX-WYEPA.mjs';
8
8
  import '../../../shared/core.CywrQs86.mjs';
9
- import '../../../shared/core.DxDn5nB5.mjs';
9
+ import '../../../shared/core.CE_hG7EJ.mjs';
10
10
  import '../../../shared/core.CzdwsPmY.mjs';
@@ -1,18 +1,18 @@
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.DoNP3Yl-.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.DoNP3Yl-.mjs';
3
- import { A as Any } from '../shared/core.BFb3p5d-.mjs';
4
- export { a as Aux, S as SpecAux, _ as aux } from '../shared/core.BFb3p5d-.mjs';
5
- export { C as Connection } from '../shared/core.D8bTI5KC.mjs';
6
- export { C as ConnectionModel, f as modelConnection } from '../shared/core.Bt3kuGUN.mjs';
7
- export { D as DeploymentConnectionModel, f as deploymentConnection } from '../shared/core.DHYd2-VU.mjs';
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.rk17MdPp.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.rk17MdPp.mjs';
3
+ import { A as Any } from '../shared/core.O6FG0HF9.mjs';
4
+ export { a as Aux, S as SpecAux, _ as aux } from '../shared/core.O6FG0HF9.mjs';
5
+ export { C as Connection } from '../shared/core.DYufusLE.mjs';
6
+ export { C as ConnectionModel, f as modelConnection } from '../shared/core.CLQVFRsf.mjs';
7
+ export { D as DeploymentConnectionModel, f as deploymentConnection } from '../shared/core.BTw4y86Y.mjs';
8
8
  export { differenceConnections, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isIncoming, isNestedConnection, isOutgoing, mergeConnections, sortConnectionsByBoundaryHierarchy, sortDeepestFirst } from './connection/index.mjs';
9
- export { H as AuxFromDump, A as AuxFromLikeC4ModelData, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty } from '../shared/core.DxDn5nB5.mjs';
10
- import '../shared/core.CywrQs86.mjs';
9
+ export { H as AuxFromDump, A as AuxFromLikeC4ModelData, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty } from '../shared/core.CE_hG7EJ.mjs';
10
+ import '../shared/core.DX-WYEPA.mjs';
11
11
  import 'type-fest';
12
- import '../shared/core.668kXpZq.mjs';
12
+ import '../shared/core.CywrQs86.mjs';
13
13
  import '../shared/core.DuSLYTG6.mjs';
14
14
  import '../shared/core.CzdwsPmY.mjs';
15
- import '../shared/core.CF82MWyh.mjs';
15
+ import '../shared/core.wwaSalox.mjs';
16
16
 
17
17
  type AnyModel<A extends Any> = DeploymentNodeModel<A> | DeployedInstanceModel<A> | DeploymentRelationModel<A> | AnyRelationshipModel<A> | NestedElementOfDeployedInstanceModel<A> | ElementModel<A> | RelationshipModel<A> | LikeC4ViewModel<A> | NodeModel<A> | EdgeModel<A>;
18
18
  declare function isDeploymentNodeModel<M extends Any>(model: AnyModel<M>): model is DeploymentNodeModel<M>;
@@ -1,8 +1,8 @@
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.BvIGRozf.mjs';
2
- export { c as DeployedInstanceModel, D as DeploymentConnectionModel, e as DeploymentNodeModel, g as DeploymentRelationModel, R as RelationshipsAccum, d as deploymentConnection } from '../shared/core.Bus32P0S.mjs';
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.n8wh5WZA.mjs';
2
+ export { c as DeployedInstanceModel, D as DeploymentConnectionModel, e as DeploymentNodeModel, g as DeploymentRelationModel, R as RelationshipsAccum, d as deploymentConnection } from '../shared/core.DX4dbV2w.mjs';
3
3
  export { C as Connection } from '../shared/core.C1GV0WWV.mjs';
4
4
  export { C as ConnectionModel, d as differenceConnections, f as findAscendingConnections, a as findDeepestNestedConnection, b as findDescendantConnections, h as hasSameSource, c as hasSameSourceTarget, e as hasSameTarget, i as isAnyInOut, g as isIncoming, j as isNestedConnection, k as isOutgoing, m as mergeConnections, n as modelConnection, s as sortConnectionsByBoundaryHierarchy, l as sortDeepestFirst } from '../shared/core.Y3j3s-oq.mjs';
5
- export { R as RichText } from '../shared/core.CaaYNQDM.mjs';
5
+ export { R as RichText } from '../shared/core.H8NbNp2X.mjs';
6
6
  import '../shared/core.DbRvwARP.mjs';
7
7
  import '../shared/core.ByrmCl9I.mjs';
8
8
  import '../shared/core.CpwrZi3D.mjs';
@@ -11,8 +11,8 @@ import '../shared/core.DQj9iv_y.mjs';
11
11
  import '../shared/core.zLlww-07.mjs';
12
12
  import '../shared/core.DcS-0zys.mjs';
13
13
  import '../shared/core.yaRvRnMW.mjs';
14
- import '../shared/core._jnYNUQ-.mjs';
15
- import '../types/scalar.mjs';
14
+ import '../shared/core.DK6I-Nr7.mjs';
15
+ import '../shared/core.BL_xjl90.mjs';
16
16
  import '../shared/core.CnIyafWn.mjs';
17
17
  import '../shared/core.BgvIuGGU.mjs';
18
18
  import '../shared/core.B0oEIXqd.mjs';
@@ -0,0 +1,92 @@
1
+ import { n } from './core.CnIyafWn.mjs';
2
+ import { t } from './core.zLlww-07.mjs';
3
+ import { i as invariant } from './core.D4npX2q8.mjs';
4
+
5
+ function ProjectId(name) {
6
+ return name;
7
+ }
8
+ function flattenMarkdownOrString(value) {
9
+ if (value === null || value === void 0) {
10
+ return null;
11
+ }
12
+ const content = t(value) ? value : value.txt ?? value.md;
13
+ return n(content?.trim()) ? content : null;
14
+ }
15
+ function Fqn(name, parent) {
16
+ return parent ? parent + "." + name : name;
17
+ }
18
+ const GroupElementKind = "@group";
19
+ function isGroupElementKind(v) {
20
+ return v.kind === GroupElementKind;
21
+ }
22
+ function DeploymentFqn(name, parent) {
23
+ return parent ? parent + "." + name : name;
24
+ }
25
+ function ViewId(id) {
26
+ return id;
27
+ }
28
+ function RelationId(id) {
29
+ return id;
30
+ }
31
+ function GlobalFqn(projectId, name) {
32
+ invariant(n(projectId), "Project ID must start with @");
33
+ return "@" + projectId + "." + name;
34
+ }
35
+ function isGlobalFqn(fqn) {
36
+ return fqn.startsWith("@");
37
+ }
38
+ function splitGlobalFqn(fqn) {
39
+ if (!fqn.startsWith("@")) {
40
+ return [null, fqn];
41
+ }
42
+ const firstDot = fqn.indexOf(".");
43
+ if (firstDot < 2) {
44
+ throw new Error("Invalid global FQN");
45
+ }
46
+ const projectId = fqn.slice(1, firstDot);
47
+ const name = fqn.slice(firstDot + 1);
48
+ return [projectId, name];
49
+ }
50
+ function NodeId(id) {
51
+ return id;
52
+ }
53
+ function EdgeId(id) {
54
+ return id;
55
+ }
56
+ function stepEdgeId(step, parallelStep) {
57
+ const id = `step-${String(step).padStart(2, "0")}`;
58
+ return parallelStep ? `${id}.${parallelStep}` : id;
59
+ }
60
+ const StepEdgeKind = "@step";
61
+ function isStepEdgeId(id) {
62
+ return id.startsWith("step-");
63
+ }
64
+ function extractStep(id) {
65
+ if (!isStepEdgeId(id)) {
66
+ throw new Error(`Invalid step edge id: ${id}`);
67
+ }
68
+ return parseFloat(id.slice("step-".length));
69
+ }
70
+
71
+ const scalar = {
72
+ __proto__: null,
73
+ DeploymentFqn: DeploymentFqn,
74
+ EdgeId: EdgeId,
75
+ Fqn: Fqn,
76
+ GlobalFqn: GlobalFqn,
77
+ GroupElementKind: GroupElementKind,
78
+ NodeId: NodeId,
79
+ ProjectId: ProjectId,
80
+ RelationId: RelationId,
81
+ StepEdgeKind: StepEdgeKind,
82
+ ViewId: ViewId,
83
+ extractStep: extractStep,
84
+ flattenMarkdownOrString: flattenMarkdownOrString,
85
+ isGlobalFqn: isGlobalFqn,
86
+ isGroupElementKind: isGroupElementKind,
87
+ isStepEdgeId: isStepEdgeId,
88
+ splitGlobalFqn: splitGlobalFqn,
89
+ stepEdgeId: stepEdgeId
90
+ };
91
+
92
+ export { DeploymentFqn as D, EdgeId as E, Fqn as F, GroupElementKind as G, NodeId as N, ProjectId as P, RelationId as R, StepEdgeKind as S, ViewId as V, GlobalFqn as a, isGlobalFqn as b, splitGlobalFqn as c, stepEdgeId as d, isStepEdgeId as e, flattenMarkdownOrString as f, extractStep as g, isGroupElementKind as i, scalar as s };
@@ -1,6 +1,6 @@
1
- import { C as Connection, c as customInspectSymbol } from './core.D8bTI5KC.mjs';
2
- import { e as DeploymentElementModel, i as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.DoNP3Yl-.mjs';
3
- import { A as Any, C as EdgeId } from './core.BFb3p5d-.mjs';
1
+ import { C as Connection, c as customInspectSymbol } from './core.DYufusLE.mjs';
2
+ import { e as DeploymentElementModel, i as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.rk17MdPp.mjs';
3
+ import { A as Any, C as EdgeId } from './core.O6FG0HF9.mjs';
4
4
  import { I as IteratorLike } from './core.DuSLYTG6.mjs';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { F as FqnRef } from './core._jnYNUQ-.mjs';
1
+ import { F as FqnRef } from './core.DK6I-Nr7.mjs';
2
2
  import { n } from './core.CnIyafWn.mjs';
3
- import { isStepEdgeId } from '../types/scalar.mjs';
3
+ import { e as isStepEdgeId } from './core.BL_xjl90.mjs';
4
4
 
5
5
  function o(r){return Array.isArray(r)}
6
6
 
@@ -1,7 +1,7 @@
1
1
  import { Simplify, MergeExclusive, Tagged, NonEmptyTuple, IsNever, IsAny } from 'type-fest';
2
- import { A as Any, U as Unknown, g as ElementId, P as ProjectId, F as Fqn, s as DeploymentId, u as Tag, y as AllKinds, T as Tags, m as StrictViewId, k as ElementKind, W as WithOptionalTags, z as WithOptionalLinks, e as _stage, f as _type, B as WithMetadata, h as Metadata, R as RelationKind, V as ViewId, p as DeploymentFqn, D as DeploymentKind, j as MetadataKey, E as ExtractOnStage, M as ModelStage, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted, S as SpecAux, a as Aux, N as Never } from './core.BFb3p5d-.mjs';
2
+ import { A as Any, U as Unknown, g as ElementId, P as ProjectId, F as Fqn, s as DeploymentId, u as Tag, y as AllKinds, T as Tags, m as StrictViewId, k as ElementKind, W as WithOptionalTags, z as WithOptionalLinks, e as _stage, f as _type, B as WithMetadata, h as Metadata, R as RelationKind, V as ViewId, p as DeploymentFqn, D as DeploymentKind, j as MetadataKey, E as ExtractOnStage, M as ModelStage, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted, S as SpecAux, a as Aux, N as Never } from './core.O6FG0HF9.mjs';
3
3
  import { E as ExclusiveUnion, N as NonEmptyArray, L as Link, K as KeysOf } from './core.DuSLYTG6.mjs';
4
- import { I as Icon, M as MarkdownOrString, d as RelationId, T as Tag$1, P as ProjectId$1, N as NodeId, j as EdgeId, m as StepEdgeKind } from './core.668kXpZq.mjs';
4
+ import { M as MarkdownOrString, I as Icon, d as RelationId, T as Tag$1, P as ProjectId$1, N as NodeId, j as EdgeId, m as StepEdgeKind } 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, S as SpacingSize, T as TextSize, h as ThemeColor, C as ColorLiteral, e as CustomColorDefinitions } from './core.CzdwsPmY.mjs';
6
6
 
7
7
  declare namespace FqnRef {
@@ -158,7 +158,7 @@ declare namespace FqnExpr {
158
158
  custom: {
159
159
  expr: OrWhere<A>;
160
160
  title?: string;
161
- description?: string;
161
+ description?: MarkdownOrString;
162
162
  technology?: string;
163
163
  notation?: string;
164
164
  shape?: ElementShape;
@@ -343,7 +343,7 @@ declare namespace ModelFqnExpr {
343
343
  custom: {
344
344
  expr: OrWhere<A>;
345
345
  title?: string;
346
- description?: string;
346
+ description?: MarkdownOrString;
347
347
  technology?: string;
348
348
  notation?: string;
349
349
  shape?: ElementShape;
@@ -900,10 +900,14 @@ type Specification<A> = A extends Any ? {
900
900
  } : never;
901
901
 
902
902
  /**
903
- * LikeC4 projects encapsulate model, and can import from each other
903
+ * Configuration of the project, as read from the config file.
904
+ * LikeC4 projects encapsulate models, and can import from each other
904
905
  */
905
906
  interface LikeC4Project {
906
- id: ProjectId$1;
907
+ /**
908
+ * ID of the project, casted to {@link scalar.ProjectId}
909
+ */
910
+ readonly id: ProjectId$1;
907
911
  title?: string;
908
912
  }
909
913
 
@@ -1,6 +1,6 @@
1
- import { C as Connection, c as customInspectSymbol } from './core.D8bTI5KC.mjs';
2
- import { E as ElementModel, R as RelationshipModel } from './core.DoNP3Yl-.mjs';
3
- import { A as Any, U as Unknown, C as EdgeId } from './core.BFb3p5d-.mjs';
1
+ import { C as Connection, c as customInspectSymbol } from './core.DYufusLE.mjs';
2
+ import { E as ElementModel, R as RelationshipModel } from './core.rk17MdPp.mjs';
3
+ import { A as Any, U as Unknown, C as EdgeId } from './core.O6FG0HF9.mjs';
4
4
 
5
5
  /**
6
6
  * Connection refers to any relationships between two elements,
@@ -1,5 +1,5 @@
1
1
  import { t as t$1 } from './core.zLlww-07.mjs';
2
- import { GlobalFqn } from '../types/scalar.mjs';
2
+ import { a as GlobalFqn } from './core.BL_xjl90.mjs';
3
3
  import { n as n$1 } from './core.CnIyafWn.mjs';
4
4
  import { o } from './core.BgvIuGGU.mjs';
5
5
  import { u } from './core.DbRvwARP.mjs';
@@ -1,6 +1,7 @@
1
1
  import { Tagged } from 'type-fest';
2
2
 
3
3
  type ProjectId<T = string> = Tagged<T, 'ProjectID'>;
4
+ declare function ProjectId(name: string): ProjectId;
4
5
  type MarkdownOrString = {
5
6
  txt: string;
6
7
  md?: never;
@@ -113,7 +114,7 @@ type scalar_Icon = Icon;
113
114
  type scalar_IconUrl = IconUrl;
114
115
  type scalar_MarkdownOrString = MarkdownOrString;
115
116
  declare const scalar_NodeId: typeof NodeId;
116
- type scalar_ProjectId<T = string> = ProjectId<T>;
117
+ declare const scalar_ProjectId: typeof ProjectId;
117
118
  declare const scalar_RelationId: typeof RelationId;
118
119
  type scalar_RelationKind<Kinds = string> = RelationKind<Kinds>;
119
120
  type scalar_RelationshipKind<Kinds = string> = RelationshipKind<Kinds>;
@@ -130,7 +131,7 @@ declare const scalar_isStepEdgeId: typeof isStepEdgeId;
130
131
  declare const scalar_splitGlobalFqn: typeof splitGlobalFqn;
131
132
  declare const scalar_stepEdgeId: typeof stepEdgeId;
132
133
  declare namespace scalar {
133
- export { type scalar_AnyFqn as AnyFqn, type scalar_BuiltInIcon as BuiltInIcon, scalar_DeploymentFqn as DeploymentFqn, type scalar_DeploymentKind as DeploymentKind, scalar_EdgeId as EdgeId, type scalar_ElementKind as ElementKind, scalar_Fqn as Fqn, scalar_GlobalFqn as GlobalFqn, type scalar_GroupElementKind as GroupElementKind, type scalar_Icon as Icon, type scalar_IconUrl as IconUrl, type scalar_MarkdownOrString as MarkdownOrString, scalar_NodeId as NodeId, type scalar_ProjectId as ProjectId, scalar_RelationId as RelationId, type scalar_RelationKind as RelationKind, type scalar_RelationshipKind as RelationshipKind, type scalar_StepEdgeId as StepEdgeId, type scalar_StepEdgeIdLiteral as StepEdgeIdLiteral, scalar_StepEdgeKind as StepEdgeKind, type scalar_Tag as Tag, scalar_ViewId as ViewId, scalar_extractStep as extractStep, scalar_flattenMarkdownOrString as flattenMarkdownOrString, scalar_isGlobalFqn as isGlobalFqn, scalar_isGroupElementKind as isGroupElementKind, scalar_isStepEdgeId as isStepEdgeId, scalar_splitGlobalFqn as splitGlobalFqn, scalar_stepEdgeId as stepEdgeId };
134
+ export { type scalar_AnyFqn as AnyFqn, type scalar_BuiltInIcon as BuiltInIcon, scalar_DeploymentFqn as DeploymentFqn, type scalar_DeploymentKind as DeploymentKind, scalar_EdgeId as EdgeId, type scalar_ElementKind as ElementKind, scalar_Fqn as Fqn, scalar_GlobalFqn as GlobalFqn, type scalar_GroupElementKind as GroupElementKind, type scalar_Icon as Icon, type scalar_IconUrl as IconUrl, type scalar_MarkdownOrString as MarkdownOrString, scalar_NodeId as NodeId, scalar_ProjectId as ProjectId, scalar_RelationId as RelationId, type scalar_RelationKind as RelationKind, type scalar_RelationshipKind as RelationshipKind, type scalar_StepEdgeId as StepEdgeId, type scalar_StepEdgeIdLiteral as StepEdgeIdLiteral, scalar_StepEdgeKind as StepEdgeKind, type scalar_Tag as Tag, scalar_ViewId as ViewId, scalar_extractStep as extractStep, scalar_flattenMarkdownOrString as flattenMarkdownOrString, scalar_isGlobalFqn as isGlobalFqn, scalar_isGroupElementKind as isGroupElementKind, scalar_isStepEdgeId as isStepEdgeId, scalar_splitGlobalFqn as splitGlobalFqn, scalar_stepEdgeId as stepEdgeId };
134
135
  }
135
136
 
136
- export { type AnyFqn as A, type BuiltInIcon as B, DeploymentFqn as D, type ElementKind as E, Fqn as F, GroupElementKind as G, type Icon as I, type MarkdownOrString as M, NodeId as N, type ProjectId as P, type RelationKind as R, type StepEdgeIdLiteral as S, type Tag as T, ViewId as V, type IconUrl as a, type DeploymentKind as b, type RelationshipKind as c, RelationId as d, GlobalFqn as e, flattenMarkdownOrString as f, isGlobalFqn as g, splitGlobalFqn as h, isGroupElementKind as i, EdgeId as j, type StepEdgeId as k, stepEdgeId as l, StepEdgeKind as m, isStepEdgeId as n, extractStep as o, scalar as s };
137
+ export { type AnyFqn as A, type BuiltInIcon as B, DeploymentFqn as D, type ElementKind as E, Fqn as F, GroupElementKind as G, type Icon as I, type MarkdownOrString as M, NodeId as N, ProjectId as P, type RelationKind as R, type StepEdgeIdLiteral as S, type Tag as T, ViewId as V, type IconUrl as a, type DeploymentKind as b, type RelationshipKind as c, RelationId as d, GlobalFqn as e, flattenMarkdownOrString as f, isGlobalFqn as g, splitGlobalFqn as h, isGroupElementKind as i, EdgeId as j, type StepEdgeId as k, stepEdgeId as l, StepEdgeKind as m, isStepEdgeId as n, extractStep as o, scalar as s };
@@ -5,7 +5,7 @@ import { u } from './core.DbRvwARP.mjs';
5
5
  import { n as n$1 } from './core.CnIyafWn.mjs';
6
6
  import { a as nonNullable, i as invariant } from './core.D4npX2q8.mjs';
7
7
  import { m as memoizeProp } from './core.B0oEIXqd.mjs';
8
- import { b as DefaultShapeSize, R as RichText, D as DefaultThemeColor, e as DefaultLineStyle, a as DefaultElementShape } from './core.CaaYNQDM.mjs';
8
+ import { b as DefaultShapeSize, R as RichText, D as DefaultThemeColor, e as DefaultLineStyle, a as DefaultElementShape } from './core.H8NbNp2X.mjs';
9
9
 
10
10
  function y(t,i){let a=i.length-t.length;if(a===1){let[n,...r]=i;return C(n,{lazy:t,lazyArgs:r})}if(a===0){let n={lazy:t,lazyArgs:i};return Object.assign(e=>C(e,n),n)}throw new Error("Wrong number of arguments")}
11
11
 
@@ -1,6 +1,6 @@
1
- import { E as ElementModel, e as DeploymentElementModel } from './core.DoNP3Yl-.mjs';
2
- import { A as Any } from './core.BFb3p5d-.mjs';
3
- import { F as Fqn } from './core.668kXpZq.mjs';
1
+ import { E as ElementModel, e as DeploymentElementModel } from './core.rk17MdPp.mjs';
2
+ import { A as Any } from './core.O6FG0HF9.mjs';
3
+ import { F as Fqn } from './core.DX-WYEPA.mjs';
4
4
 
5
5
  interface Connection<Elem = ElementModel<Any> | DeploymentElementModel<Any>, Id = string> {
6
6
  readonly id: Id;
@@ -148,8 +148,11 @@ class RichText {
148
148
  if (this.isEmpty || this.$source === null) {
149
149
  return emptyTxt;
150
150
  }
151
- const markdown = this.$source.md ?? this.$source.txt;
152
- return memoizeProp(this, symb_html, () => markdownToHtml(markdown));
151
+ const source = this.$source;
152
+ if ("txt" in source) {
153
+ return source.txt;
154
+ }
155
+ return memoizeProp(this, symb_html, () => markdownToHtml(source.md));
153
156
  }
154
157
  equals(other) {
155
158
  if (this === other) return true;
@@ -1,6 +1,6 @@
1
1
  import { IfNever, IsNever, IsLiteral } from 'type-fest';
2
2
  import { C as Coalesce, L as Link } from './core.DuSLYTG6.mjs';
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.668kXpZq.mjs';
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
  /**
6
6
  * Determines the stage of the model:
@@ -1,7 +1,7 @@
1
- import { s as a$2, t as t$3, u as a$3, r as r$3, m as isElementModel, j as isNestedElementOfDeployedInstanceModel, f as isDeployedInstanceModel, i as isDeploymentNodeModel, h as isDeploymentElementModel, L as LikeC4Model } from './core.BvIGRozf.mjs';
1
+ import { s as a$2, t as t$3, u as a$3, r as r$3, m as isElementModel, j as isNestedElementOfDeployedInstanceModel, f as isDeployedInstanceModel, i as isDeploymentNodeModel, h as isDeploymentElementModel, L as LikeC4Model } from './core.n8wh5WZA.mjs';
2
2
  import { u as u$5 } from './core.DbRvwARP.mjs';
3
3
  import { m as m$2 } from './core.ByrmCl9I.mjs';
4
- import { i as i$a, t as t$4, n as n$2, d as deploymentConnection, R as RelationshipsAccum, D as DeploymentConnectionModel } from './core.Bus32P0S.mjs';
4
+ import { i as i$a, t as t$4, n as n$2, d as deploymentConnection, R as RelationshipsAccum, D as DeploymentConnectionModel } from './core.DX4dbV2w.mjs';
5
5
  import { p as p$1, f as findAscendingConnections, m as mergeConnections, d as differenceConnections, j as isNestedConnection, s as sortConnectionsByBoundaryHierarchy, o as findConnectionsBetween$3, n as modelConnection, b as findDescendantConnections, a as findDeepestNestedConnection, i as isAnyInOut, k as isOutgoing, g as isIncoming, C as ConnectionModel } from './core.Y3j3s-oq.mjs';
6
6
  import { u as a$1, C, t as s, r as getDefaultExportFromCjs, j as isDescendantOf, m as sortParentsFirst, i as isAncestor, p as parentFqn, e as compareByFqnHierarchically, o as isNonEmptyArray, n as nameFromFqn, s as sortByFqnHierarchically, d as commonAncestor, b as ancestorsFqn, k as isSameHierarchy } from './core.DQj9iv_y.mjs';
7
7
  import { c as commonHead, r as requireForeach, a as requireIterator, u as u$6, o as objectHash, d as d$5, S as Stack } from './core.HUONfQfd.mjs';
@@ -10,10 +10,10 @@ import { n } from './core.CnIyafWn.mjs';
10
10
  import { d as difference, a as intersection, u as union, i as i$b, h as hasIntersection } from './core.CpwrZi3D.mjs';
11
11
  import { a as isIterable, n as n$1, l as l$5, b as iunique, i as iflat } from './core.8KM0D6va.mjs';
12
12
  import { o as o$7 } from './core.BgvIuGGU.mjs';
13
- import { w as whereOperatorAsPredicate, F as FqnRef, y, a as _type, _ as _stage, n as n$3 } from './core._jnYNUQ-.mjs';
14
- import { M as ModelFqnExpr, c as isViewRuleStyle, F as FqnExpr, R as RelationExpr, s as o$8, i as isViewRulePredicate, o as isViewRuleAutoLayout, r as isViewRuleGroup, m as isViewRuleGlobalPredicateRef, l as isViewRuleGlobalStyle, q as isDynamicViewParallelSteps, a as ModelRelationExpr, b as ModelExpression, k as isDynamicView, j as isDeploymentView, f as isElementView } from './core.CaJp8Amg.mjs';
15
- import { isGroupElementKind, GroupElementKind, stepEdgeId } from '../types/scalar.mjs';
16
- import { a as DefaultElementShape, D as DefaultThemeColor, f as DefaultArrowType, e as DefaultLineStyle, g as DefaultRelationshipColor } from './core.CaaYNQDM.mjs';
13
+ import { w as whereOperatorAsPredicate, F as FqnRef, y, a as _type, _ as _stage, n as n$3 } from './core.DK6I-Nr7.mjs';
14
+ import { M as ModelFqnExpr, c as isViewRuleStyle, F as FqnExpr, R as RelationExpr, s as o$8, i as isViewRulePredicate, o as isViewRuleAutoLayout, r as isViewRuleGroup, m as isViewRuleGlobalPredicateRef, l as isViewRuleGlobalStyle, q as isDynamicViewParallelSteps, a as ModelRelationExpr, b as ModelExpression, k as isDynamicView, j as isDeploymentView, f as isElementView } from './core.BW8K1y6R.mjs';
15
+ import { i as isGroupElementKind, G as GroupElementKind, d as stepEdgeId } from './core.BL_xjl90.mjs';
16
+ import { a as DefaultElementShape, D as DefaultThemeColor, f as DefaultArrowType, e as DefaultLineStyle, g as DefaultRelationshipColor } from './core.H8NbNp2X.mjs';
17
17
  import { k } from './core.BpJu1RrF.mjs';
18
18
  import { a as toSet, t as toArray, i as imap } from './core.Btl47GOn.mjs';
19
19
  import { D as DefaultMap } from './core.yaRvRnMW.mjs';
@@ -3395,7 +3395,7 @@ function applyCustomElementProperties(_rules, _nodes) {
3395
3395
  node = {
3396
3396
  ...node,
3397
3397
  isCustomized: true,
3398
- description: { txt: description }
3398
+ description
3399
3399
  };
3400
3400
  }
3401
3401
  let styleOverride;
@@ -4,15 +4,15 @@ import { m as m$2 } from './core.ByrmCl9I.mjs';
4
4
  import { i as i$2 } from './core.CpwrZi3D.mjs';
5
5
  import { g as hierarchyLevel, n as nameFromFqn, i as isAncestor, d as commonAncestor, l as sortNaturalByFqn, m as sortParentsFirst, p as parentFqn, b as ancestorsFqn, C, a as compareNaturalHierarchically, c as compareNatural } from './core.DQj9iv_y.mjs';
6
6
  import { g as getOrCreate } from './core.DcS-0zys.mjs';
7
- import { i as i$1, n as n$3, e as DeploymentNodeModel, c as DeployedInstanceModel, N as NestedElementOfDeployedInstanceModel, g as DeploymentRelationModel } from './core.Bus32P0S.mjs';
7
+ import { i as i$1, n as n$3, e as DeploymentNodeModel, c as DeployedInstanceModel, N as NestedElementOfDeployedInstanceModel, g as DeploymentRelationModel } from './core.DX4dbV2w.mjs';
8
8
  import { D as DefaultMap } from './core.yaRvRnMW.mjs';
9
9
  import { i as invariant, a as nonNullable } from './core.D4npX2q8.mjs';
10
- import { F as FqnRef, b as isDeploymentNode, a as _type, _ as _stage, i as isOnStage, w as whereOperatorAsPredicate } from './core._jnYNUQ-.mjs';
10
+ import { F as FqnRef, b as isDeploymentNode, a as _type, _ as _stage, i as isOnStage, w as whereOperatorAsPredicate } from './core.DK6I-Nr7.mjs';
11
11
  import { m as memoizeProp } from './core.B0oEIXqd.mjs';
12
12
  import { i as ifilter } from './core.BH9nN-_I.mjs';
13
- import { splitGlobalFqn, extractStep, isStepEdgeId, isGroupElementKind, isGlobalFqn, GlobalFqn } from '../types/scalar.mjs';
13
+ import { c as splitGlobalFqn, g as extractStep, e as isStepEdgeId, i as isGroupElementKind, b as isGlobalFqn, a as GlobalFqn } from './core.BL_xjl90.mjs';
14
14
  import { n as n$2 } from './core.CnIyafWn.mjs';
15
- import { a as DefaultElementShape, D as DefaultThemeColor, R as RichText, b as DefaultShapeSize, g as DefaultRelationshipColor, e as DefaultLineStyle } from './core.CaaYNQDM.mjs';
15
+ import { a as DefaultElementShape, D as DefaultThemeColor, R as RichText, b as DefaultShapeSize, g as DefaultRelationshipColor, e as DefaultLineStyle } from './core.H8NbNp2X.mjs';
16
16
  import { a as ihead, i as ifind } from './core.DsMrjY2q.mjs';
17
17
 
18
18
  function r(...t){return u$1(Object.values,t)}
@@ -1488,9 +1488,17 @@ class LikeC4Model {
1488
1488
  get stage() {
1489
1489
  return this.$data[_stage];
1490
1490
  }
1491
+ /**
1492
+ * Returns the Project ID associated with the model.
1493
+ * If the project ID is not defined in the model, it returns "default".
1494
+ */
1491
1495
  get projectId() {
1492
- return this.$data.projectId ?? "unknown";
1496
+ return this.$data.projectId ?? "default";
1493
1497
  }
1498
+ /**
1499
+ * Returns the project associated with the model.
1500
+ * If the project is not defined in the model, it returns a default project with the ID "default".
1501
+ */
1494
1502
  get project() {
1495
1503
  return this.$data.project ?? memoizeProp(this, Symbol.for("project"), () => ({
1496
1504
  id: this.projectId
@@ -1,8 +1,8 @@
1
- import { A as Any, R as RelationKind, T as Tags, h as Metadata, j as MetadataKey, L as LooseTag, F as Fqn, g as ElementId, k as ElementKind, D as DeploymentKind, E as ExtractOnStage, l as RelationId$1, m as StrictViewId, f as _type, n as LooseElementId, o as LooseDeploymentId, p as DeploymentFqn, t as toComputed, q as toLayouted, r as Stage, s as DeploymentId, U as Unknown, V as ViewId, u as Tag, v as toParsed, P as ProjectId$1, w as LooseViewId, a as Aux, S as SpecAux, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted } from './core.BFb3p5d-.mjs';
1
+ import { A as Any, R as RelationKind, T as Tags, h as Metadata, j as MetadataKey, L as LooseTag, F as Fqn, g as ElementId, k as ElementKind, D as DeploymentKind, E as ExtractOnStage, l as RelationId$1, m as StrictViewId, f as _type, n as LooseElementId, o as LooseDeploymentId, p as DeploymentFqn, t as toComputed, q as toLayouted, r as Stage, s as DeploymentId, U as Unknown, V as ViewId, u as Tag, v as toParsed, P as ProjectId$1, w as LooseViewId, a as Aux, S as SpecAux, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted } from './core.O6FG0HF9.mjs';
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';
2
3
  import { D as DefaultMap } from './core.CywrQs86.mjs';
3
4
  import { SetRequired } from 'type-fest';
4
- 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.668kXpZq.mjs';
5
- import { b as RichTextOrEmpty, Z as Relationship, T as Element, Q as ElementStyle, au as ViewWithType, aq as ComputedView, ao as LayoutedView, n as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, L as LayoutedLikeC4ModelData, f as FqnRef, q as DeployedInstance, D as DeploymentElementStyle, v as DeploymentRelationship, r as DeploymentElement, p as DeploymentNode, y as LikeC4ModelDump, H as AuxFromDump, am as LikeC4Project, a3 as Specification, m as ModelGlobals, ai as WhereOperator } from './core.DxDn5nB5.mjs';
5
+ import { b as RichTextOrEmpty, Z as Relationship, T as Element, Q as ElementStyle, au as ViewWithType, aq as ComputedView, ao as LayoutedView, n as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, L as LayoutedLikeC4ModelData, f as FqnRef, q as DeployedInstance, D as DeploymentElementStyle, v as DeploymentRelationship, r as DeploymentElement, p as DeploymentNode, y as LikeC4ModelDump, H as AuxFromDump, am as LikeC4Project, a3 as Specification, m as ModelGlobals, ai as WhereOperator } from './core.CE_hG7EJ.mjs';
6
6
  import { I as IteratorLike, L as Link, N as NonEmptyArray } from './core.DuSLYTG6.mjs';
7
7
  import { i as Color, R as RelationshipLineType, c as ElementShape } from './core.CzdwsPmY.mjs';
8
8
 
@@ -885,7 +885,15 @@ declare class LikeC4Model<A extends Any = Unknown> {
885
885
  */
886
886
  get $model(): $ModelData<A>;
887
887
  get stage(): Stage<A>;
888
+ /**
889
+ * Returns the Project ID associated with the model.
890
+ * If the project ID is not defined in the model, it returns "default".
891
+ */
888
892
  get projectId(): ProjectId$1<A>;
893
+ /**
894
+ * Returns the project associated with the model.
895
+ * If the project is not defined in the model, it returns a default project with the ID "default".
896
+ */
889
897
  get project(): LikeC4Project;
890
898
  get specification(): Specification<A>;
891
899
  get globals(): ModelGlobals;
@@ -1,4 +1,4 @@
1
- import { F as Fqn } from './core.668kXpZq.mjs';
1
+ import { F as Fqn } from './core.DX-WYEPA.mjs';
2
2
 
3
3
  declare function parentFqn<E extends string>(fqn: E): E | null;
4
4
  declare function nameFromFqn<E extends string>(fqn: E): string;
@@ -1,4 +1,4 @@
1
1
  import 'type-fest';
2
2
  import '../shared/core.DuSLYTG6.mjs';
3
- export { y as AllKinds, A as Any, A as AnyAux, G as AnySpec, a as Aux, p as DeploymentFqn, s as DeploymentId, D as DeploymentKind, C as EdgeId, g as ElementId, k as ElementKind, F as Fqn, o as LooseDeploymentId, a4 as LooseDeploymentKind, n as LooseElementId, a3 as LooseElementKind, a5 as LooseRelationKind, L as LooseTag, a2 as LooseTags, w as LooseViewId, h as Metadata, j as MetadataKey, N as Never, J as NodeId, a1 as OrString, H as PickByStage, P as ProjectId, l as RelationId, R as RelationKind, K as Spec, S as SpecAux, r as Stage, p as StrictDeploymentFqn, Y as StrictDeploymentKind, X as StrictElementKind, F as StrictFqn, O as StrictProjectId, Z as StrictRelationKind, Q as StrictTag, m as StrictViewId, u as Tag, T 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, x as setProject, I as setStage, t as toComputed, q as toLayouted, v as toParsed } from '../shared/core.BFb3p5d-.mjs';
4
- import '../shared/core.668kXpZq.mjs';
3
+ export { y as AllKinds, A as Any, A as AnyAux, G as AnySpec, a as Aux, p as DeploymentFqn, s as DeploymentId, D as DeploymentKind, C as EdgeId, g as ElementId, k as ElementKind, F as Fqn, o as LooseDeploymentId, a4 as LooseDeploymentKind, n as LooseElementId, a3 as LooseElementKind, a5 as LooseRelationKind, L as LooseTag, a2 as LooseTags, w as LooseViewId, h as Metadata, j as MetadataKey, N as Never, J as NodeId, a1 as OrString, H as PickByStage, P as ProjectId, l as RelationId, R as RelationKind, K as Spec, S as SpecAux, r as Stage, p as StrictDeploymentFqn, Y as StrictDeploymentKind, X as StrictElementKind, F as StrictFqn, O as StrictProjectId, Z as StrictRelationKind, Q as StrictTag, m as StrictViewId, u as Tag, T 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, x as setProject, I as setStage, t as toComputed, q as toLayouted, v as toParsed } from '../shared/core.O6FG0HF9.mjs';
4
+ import '../shared/core.DX-WYEPA.mjs';
@@ -1 +1,5 @@
1
+ const _aux = {
2
+ __proto__: null
3
+ };
1
4
 
5
+ export { _aux as _ };
@@ -1,10 +1,10 @@
1
1
  import { N as NonEmptyArray } from '../shared/core.DuSLYTG6.mjs';
2
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.DuSLYTG6.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.BFb3p5d-.mjs';
4
- import { aR as ViewManualLayout, aM as AutoLayoutDirection } from '../shared/core.DxDn5nB5.mjs';
5
- export { Y as AbstractRelationship, ae as AndOperator, aG as AnyExcludePredicate, aF as AnyIncludePredicate, as as AnyView, aH as AnyViewRuleStyle, H as AuxFromDump, A as AuxFromLikeC4ModelData, B as BBox, aU as BaseParsedViewProperties, aT as BaseViewProperties, a$ as ComputedDeploymentView, b0 as ComputedDynamicView, aZ as ComputedEdge, a_ as ComputedElementView, C as ComputedLikeC4ModelData, aY as ComputedNode, aq as ComputedView, V as DefaultArrowType, J as DefaultElementShape, U as DefaultLineStyle, N as DefaultPaddingSize, W as DefaultRelationshipColor, K as DefaultShapeSize, O as DefaultTextSize, I as DefaultThemeColor, q as DeployedInstance, r as DeploymentElement, s as DeploymentElementRef, D as DeploymentElementStyle, p as DeploymentNode, w as DeploymentRelation, v as DeploymentRelationship, b7 as DeploymentViewExcludePredicate, b6 as DeploymentViewIncludePredicate, b8 as DeploymentViewPredicate, ba as DeploymentViewRule, b9 as DeploymentViewRuleStyle, b2 as DiagramEdge, b1 as DiagramNode, ao as DiagramView, bg as DynamicViewIncludeRule, bd as DynamicViewParallelSteps, bh as DynamicViewRule, bc as DynamicViewStep, bf as DynamicViewStepOrParallel, T as Element, $ as ElementSpecification, Q as ElementStyle, bl as ElementViewExcludePredicate, bk as ElementViewIncludePredicate, bm as ElementViewPredicate, bq as ElementViewRule, bn as ElementViewRuleGroup, bp as ElementViewRuleStyle, a4 as EqualOperator, E as Expression, aj as Filterable, F as FqnExpr, f as FqnRef, j as GlobalDynamicPredicates, G as GlobalPredicateId, i as GlobalPredicates, k as GlobalStyleID, l as GlobalStyles, a7 as KindEqual, b4 as LayoutedDeploymentView, b5 as LayoutedDynamicView, b3 as LayoutedElementView, L as LayoutedLikeC4ModelData, ao as LayoutedView, o as LikeC4ModelData, y as LikeC4ModelDump, am as LikeC4Project, an as LikeC4View, e as ModelExpression, M as ModelFqnExpr, m as ModelGlobals, _ as ModelRelation, d as ModelRelationExpr, aV as NodeNotation, ac as NotOperator, ak as OperatorPredicate, ag as OrOperator, bb as ParsedDeploymentView, bi as ParsedDynamicView, br as ParsedElementView, n as ParsedLikeC4ModelData, an as ParsedView, a9 as Participant, aa as ParticipantOperator, g as Point, P as PredicateSelector, ar as ProcessedView, z as ProjectDump, h as RectBox, c as RelationExpr, Z as Relationship, a2 as RelationshipSpecification, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, x as SpecTypesFromDump, a3 as Specification, S as SpecificationDump, a5 as TagEqual, a0 as TagSpecification, aQ as ViewAutoLayout, at as ViewOnStage, av as ViewRule, aO as ViewRuleAutoLayout, aK as ViewRuleGlobalPredicateRef, aI as ViewRuleGlobalStyle, aw as ViewRulePredicate, aS as ViewType, aX as ViewWithHash, aW as ViewWithNotation, au as ViewWithType, ai as WhereOperator, X as XYPoint, be as getParallelStepsPrefix, af as isAndOperator, aN as isAutoLayoutDirection, az as isComputedView, u as isDeployedInstance, t as isDeploymentNode, aD as isDeploymentView, ap as isDiagramView, aE as isDynamicView, bj as isDynamicViewParallelSteps, aA as isElementView, aC as isExtendsElementView, a8 as isKindEqual, ap as isLayoutedView, ad as isNotOperator, ah as isOrOperator, ab as isParticipantOperator, aB as isScopedElementView, a1 as isTagColorSpecified, a6 as isTagEqual, aP as isViewRuleAutoLayout, aL as isViewRuleGlobalPredicateRef, aJ as isViewRuleGlobalStyle, bo as isViewRuleGroup, ax as isViewRulePredicate, ay as isViewRuleStyle, al as whereOperatorAsPredicate } from '../shared/core.DxDn5nB5.mjs';
6
- import { F as Fqn, D as DeploymentFqn } from '../shared/core.668kXpZq.mjs';
7
- 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.668kXpZq.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.O6FG0HF9.mjs';
4
+ import { aR as ViewManualLayout, aM as AutoLayoutDirection } from '../shared/core.CE_hG7EJ.mjs';
5
+ export { Y as AbstractRelationship, ae as AndOperator, aG as AnyExcludePredicate, aF as AnyIncludePredicate, as as AnyView, aH as AnyViewRuleStyle, H as AuxFromDump, A as AuxFromLikeC4ModelData, B as BBox, aU as BaseParsedViewProperties, aT as BaseViewProperties, a$ as ComputedDeploymentView, b0 as ComputedDynamicView, aZ as ComputedEdge, a_ as ComputedElementView, C as ComputedLikeC4ModelData, aY as ComputedNode, aq as ComputedView, V as DefaultArrowType, J as DefaultElementShape, U as DefaultLineStyle, N as DefaultPaddingSize, W as DefaultRelationshipColor, K as DefaultShapeSize, O as DefaultTextSize, I as DefaultThemeColor, q as DeployedInstance, r as DeploymentElement, s as DeploymentElementRef, D as DeploymentElementStyle, p as DeploymentNode, w as DeploymentRelation, v as DeploymentRelationship, b7 as DeploymentViewExcludePredicate, b6 as DeploymentViewIncludePredicate, b8 as DeploymentViewPredicate, ba as DeploymentViewRule, b9 as DeploymentViewRuleStyle, b2 as DiagramEdge, b1 as DiagramNode, ao as DiagramView, bg as DynamicViewIncludeRule, bd as DynamicViewParallelSteps, bh as DynamicViewRule, bc as DynamicViewStep, bf as DynamicViewStepOrParallel, T as Element, $ as ElementSpecification, Q as ElementStyle, bl as ElementViewExcludePredicate, bk as ElementViewIncludePredicate, bm as ElementViewPredicate, bq as ElementViewRule, bn as ElementViewRuleGroup, bp as ElementViewRuleStyle, a4 as EqualOperator, E as Expression, aj as Filterable, F as FqnExpr, f as FqnRef, j as GlobalDynamicPredicates, G as GlobalPredicateId, i as GlobalPredicates, k as GlobalStyleID, l as GlobalStyles, a7 as KindEqual, b4 as LayoutedDeploymentView, b5 as LayoutedDynamicView, b3 as LayoutedElementView, L as LayoutedLikeC4ModelData, ao as LayoutedView, o as LikeC4ModelData, y as LikeC4ModelDump, am as LikeC4Project, an as LikeC4View, e as ModelExpression, M as ModelFqnExpr, m as ModelGlobals, _ as ModelRelation, d as ModelRelationExpr, aV as NodeNotation, ac as NotOperator, ak as OperatorPredicate, ag as OrOperator, bb as ParsedDeploymentView, bi as ParsedDynamicView, br as ParsedElementView, n as ParsedLikeC4ModelData, an as ParsedView, a9 as Participant, aa as ParticipantOperator, g as Point, P as PredicateSelector, ar as ProcessedView, z as ProjectDump, h as RectBox, c as RelationExpr, Z as Relationship, a2 as RelationshipSpecification, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, x as SpecTypesFromDump, a3 as Specification, S as SpecificationDump, a5 as TagEqual, a0 as TagSpecification, aQ as ViewAutoLayout, at as ViewOnStage, av as ViewRule, aO as ViewRuleAutoLayout, aK as ViewRuleGlobalPredicateRef, aI as ViewRuleGlobalStyle, aw as ViewRulePredicate, aS as ViewType, aX as ViewWithHash, aW as ViewWithNotation, au as ViewWithType, ai as WhereOperator, X as XYPoint, be as getParallelStepsPrefix, af as isAndOperator, aN as isAutoLayoutDirection, az as isComputedView, u as isDeployedInstance, t as isDeploymentNode, aD as isDeploymentView, ap as isDiagramView, aE as isDynamicView, bj as isDynamicViewParallelSteps, aA as isElementView, aC as isExtendsElementView, a8 as isKindEqual, ap as isLayoutedView, ad as isNotOperator, ah as isOrOperator, ab as isParticipantOperator, aB as isScopedElementView, a1 as isTagColorSpecified, a6 as isTagEqual, aP as isViewRuleAutoLayout, aL as isViewRuleGlobalPredicateRef, aJ as isViewRuleGlobalStyle, bo as isViewRuleGroup, ax as isViewRulePredicate, ay as isViewRuleStyle, al as whereOperatorAsPredicate } from '../shared/core.CE_hG7EJ.mjs';
6
+ import { F as Fqn, D as DeploymentFqn } from '../shared/core.DX-WYEPA.mjs';
7
+ 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';
8
8
  import { b as BorderStyle, c as ElementShape, h as ThemeColor } from '../shared/core.CzdwsPmY.mjs';
9
9
  export { B as BorderStyles, i as Color, C as ColorLiteral, d as CustomColor, e as CustomColorDefinitions, 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, n as ThemeColorValues, g as ThemeColors, j as isThemeColor } from '../shared/core.CzdwsPmY.mjs';
10
10
  import 'type-fest';
@@ -1,8 +1,9 @@
1
- export { F as FqnRef, _ as _stage, a as _type, h as isAndOperator, c as isDeployedInstance, b as isDeploymentNode, e as isKindEqual, g as isNotOperator, i as isOnStage, j as isOrOperator, f as isParticipantOperator, d as isTagEqual, w as whereOperatorAsPredicate } from '../shared/core._jnYNUQ-.mjs';
2
- export { E as Expression, F as FqnExpr, b as ModelExpression, M as ModelFqnExpr, a as ModelRelationExpr, R as RelationExpr, p as getParallelStepsPrefix, n as isAutoLayoutDirection, d as isComputedView, j as isDeploymentView, e as isDiagramView, k as isDynamicView, q as isDynamicViewParallelSteps, f as isElementView, h as isExtendsElementView, e as isLayoutedView, g as isScopedElementView, o as isViewRuleAutoLayout, m as isViewRuleGlobalPredicateRef, l as isViewRuleGlobalStyle, r as isViewRuleGroup, i as isViewRulePredicate, c as isViewRuleStyle } from '../shared/core.CaJp8Amg.mjs';
1
+ export { _ as aux } from './_aux.mjs';
2
+ export { F as FqnRef, _ as _stage, a as _type, h as isAndOperator, c as isDeployedInstance, b as isDeploymentNode, e as isKindEqual, g as isNotOperator, i as isOnStage, j as isOrOperator, f as isParticipantOperator, d as isTagEqual, w as whereOperatorAsPredicate } from '../shared/core.DK6I-Nr7.mjs';
3
+ export { E as Expression, F as FqnExpr, b as ModelExpression, M as ModelFqnExpr, a as ModelRelationExpr, R as RelationExpr, p as getParallelStepsPrefix, n as isAutoLayoutDirection, d as isComputedView, j as isDeploymentView, e as isDiagramView, k as isDynamicView, q as isDynamicViewParallelSteps, f as isElementView, h as isExtendsElementView, e as isLayoutedView, g as isScopedElementView, o as isViewRuleAutoLayout, m as isViewRuleGlobalPredicateRef, l as isViewRuleGlobalStyle, r as isViewRuleGroup, i as isViewRulePredicate, c as isViewRuleStyle } from '../shared/core.BW8K1y6R.mjs';
3
4
  export { B as BBox, a as BorderStyles, E as ElementShapes, R as RectBox, T as ThemeColors, i as isTagColorSpecified, b as isThemeColor } from '../shared/core.CxGKeL-L.mjs';
4
- export { f as DefaultArrowType, a as DefaultElementShape, e as DefaultLineStyle, c as DefaultPaddingSize, g as DefaultRelationshipColor, b as DefaultShapeSize, d as DefaultTextSize, D as DefaultThemeColor, R as RichText } from '../shared/core.CaaYNQDM.mjs';
5
- export { DeploymentFqn, EdgeId, Fqn, GlobalFqn, GroupElementKind, NodeId, RelationId, StepEdgeKind, ViewId, extractStep, flattenMarkdownOrString, isGlobalFqn, isGroupElementKind, isStepEdgeId, splitGlobalFqn, stepEdgeId } from './scalar.mjs';
5
+ export { f as DefaultArrowType, a as DefaultElementShape, e as DefaultLineStyle, c as DefaultPaddingSize, g as DefaultRelationshipColor, b as DefaultShapeSize, d as DefaultTextSize, D as DefaultThemeColor, R as RichText } from '../shared/core.H8NbNp2X.mjs';
6
+ export { D as DeploymentFqn, E as EdgeId, F as Fqn, a as GlobalFqn, G as GroupElementKind, N as NodeId, P as ProjectId, R as RelationId, S as StepEdgeKind, V as ViewId, g as extractStep, f as flattenMarkdownOrString, b as isGlobalFqn, i as isGroupElementKind, e as isStepEdgeId, s as scalar, c as splitGlobalFqn, d as stepEdgeId } from '../shared/core.BL_xjl90.mjs';
6
7
  import '../shared/core.zLlww-07.mjs';
7
8
  import '../shared/core.CnIyafWn.mjs';
8
9
  import '../shared/core.BgvIuGGU.mjs';
@@ -1,2 +1,2 @@
1
1
  import 'type-fest';
2
- 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, h as splitGlobalFqn, l as stepEdgeId } from '../shared/core.668kXpZq.mjs';
2
+ 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, h as splitGlobalFqn, l as stepEdgeId } from '../shared/core.DX-WYEPA.mjs';
@@ -1,68 +1,4 @@
1
- import { n } from '../shared/core.CnIyafWn.mjs';
2
- import { t } from '../shared/core.zLlww-07.mjs';
3
- import { i as invariant } from '../shared/core.D4npX2q8.mjs';
4
-
5
- function flattenMarkdownOrString(value) {
6
- if (value === null || value === void 0) {
7
- return null;
8
- }
9
- const content = t(value) ? value : value.txt ?? value.md;
10
- return n(content?.trim()) ? content : null;
11
- }
12
- function Fqn(name, parent) {
13
- return parent ? parent + "." + name : name;
14
- }
15
- const GroupElementKind = "@group";
16
- function isGroupElementKind(v) {
17
- return v.kind === GroupElementKind;
18
- }
19
- function DeploymentFqn(name, parent) {
20
- return parent ? parent + "." + name : name;
21
- }
22
- function ViewId(id) {
23
- return id;
24
- }
25
- function RelationId(id) {
26
- return id;
27
- }
28
- function GlobalFqn(projectId, name) {
29
- invariant(n(projectId), "Project ID must start with @");
30
- return "@" + projectId + "." + name;
31
- }
32
- function isGlobalFqn(fqn) {
33
- return fqn.startsWith("@");
34
- }
35
- function splitGlobalFqn(fqn) {
36
- if (!fqn.startsWith("@")) {
37
- return [null, fqn];
38
- }
39
- const firstDot = fqn.indexOf(".");
40
- if (firstDot < 2) {
41
- throw new Error("Invalid global FQN");
42
- }
43
- const projectId = fqn.slice(1, firstDot);
44
- const name = fqn.slice(firstDot + 1);
45
- return [projectId, name];
46
- }
47
- function NodeId(id) {
48
- return id;
49
- }
50
- function EdgeId(id) {
51
- return id;
52
- }
53
- function stepEdgeId(step, parallelStep) {
54
- const id = `step-${String(step).padStart(2, "0")}`;
55
- return parallelStep ? `${id}.${parallelStep}` : id;
56
- }
57
- const StepEdgeKind = "@step";
58
- function isStepEdgeId(id) {
59
- return id.startsWith("step-");
60
- }
61
- function extractStep(id) {
62
- if (!isStepEdgeId(id)) {
63
- throw new Error(`Invalid step edge id: ${id}`);
64
- }
65
- return parseFloat(id.slice("step-".length));
66
- }
67
-
68
- export { DeploymentFqn, EdgeId, Fqn, GlobalFqn, GroupElementKind, NodeId, RelationId, StepEdgeKind, ViewId, extractStep, flattenMarkdownOrString, isGlobalFqn, isGroupElementKind, isStepEdgeId, splitGlobalFqn, stepEdgeId };
1
+ import '../shared/core.CnIyafWn.mjs';
2
+ import '../shared/core.zLlww-07.mjs';
3
+ import '../shared/core.D4npX2q8.mjs';
4
+ export { D as DeploymentFqn, E as EdgeId, F as Fqn, a as GlobalFqn, G as GroupElementKind, N as NodeId, P as ProjectId, R as RelationId, S as StepEdgeKind, V as ViewId, g as extractStep, f as flattenMarkdownOrString, b as isGlobalFqn, i as isGroupElementKind, e as isStepEdgeId, c as splitGlobalFqn, d as stepEdgeId } from '../shared/core.BL_xjl90.mjs';
@@ -1,9 +1,9 @@
1
1
  export { D as DefaultMap } from '../shared/core.CywrQs86.mjs';
2
- export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from '../shared/core.CF82MWyh.mjs';
2
+ export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from '../shared/core.wwaSalox.mjs';
3
3
  import { N as NonEmptyArray } from '../shared/core.DuSLYTG6.mjs';
4
4
  import { Tagged, Simplify, Or, IfNever, IsLiteral, And, GreaterThan, IsNever, IsEqual, ReadonlyTuple, IsNumericLiteral } from 'type-fest';
5
5
  export { ifilter, ifind, ifirst, iflat, ihead, imap, ireduce, isIterable, isome, iunique, toArray, toSet } from './iterable/index.mjs';
6
- import '../shared/core.668kXpZq.mjs';
6
+ import '../shared/core.DX-WYEPA.mjs';
7
7
 
8
8
  /**
9
9
  * Mnemonist DefaultWeakMap Typings
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likec4/core",
3
- "version": "1.36.0",
3
+ "version": "1.37.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -125,7 +125,7 @@
125
125
  "typescript": "5.9.2",
126
126
  "unbuild": "3.5.0",
127
127
  "vitest": "3.2.4",
128
- "@likec4/tsconfig": "1.36.0"
128
+ "@likec4/tsconfig": "1.37.0"
129
129
  },
130
130
  "scripts": {
131
131
  "typecheck": "tsc -b --verbose",
@@ -408,7 +408,10 @@ function builder<Spec extends BuilderSpecification, T extends AnyTypes>(
408
408
  build: (project?: LikeC4Project) => ({
409
409
  [_stage]: 'parsed',
410
410
  projectId: project?.id ?? 'from-builder',
411
- project: project ?? { id: 'from-builder' },
411
+ project: {
412
+ id: 'from-builder',
413
+ ...project,
414
+ },
412
415
  specification: toLikeC4Specification(),
413
416
  elements: fromEntries(
414
417
  structuredClone(
@@ -67,7 +67,7 @@ export function applyCustomElementProperties<A extends AnyAux>(
67
67
  node = {
68
68
  ...node,
69
69
  isCustomized: true,
70
- description: { txt: description },
70
+ description,
71
71
  }
72
72
  }
73
73
 
@@ -12,12 +12,12 @@ import type {
12
12
  ModelGlobals,
13
13
  ParsedLikeC4ModelData,
14
14
  Relationship,
15
- scalar,
16
15
  Specification,
17
16
  WhereOperator,
18
17
  } from '../types'
19
18
  import { type ProjectId, _stage, GlobalFqn, isGlobalFqn, isOnStage, whereOperatorAsPredicate } from '../types'
20
19
  import type * as aux from '../types/_aux'
20
+ import * as scalar from '../types/scalar'
21
21
  import { compareNatural, compareNaturalHierarchically, ifilter, invariant, memoizeProp, nonNullable } from '../utils'
22
22
  import { ancestorsFqn, commonAncestor, parentFqn, sortParentsFirst } from '../utils/fqn'
23
23
  import { DefaultMap } from '../utils/mnemonist'
@@ -294,10 +294,18 @@ export class LikeC4Model<A extends Any = aux.Unknown> {
294
294
  return this.$data[_stage] as aux.Stage<A>
295
295
  }
296
296
 
297
+ /**
298
+ * Returns the Project ID associated with the model.
299
+ * If the project ID is not defined in the model, it returns "default".
300
+ */
297
301
  get projectId(): aux.ProjectId<A> {
298
- return this.$data.projectId ?? 'unknown' as any
302
+ return this.$data.projectId ?? 'default' as any
299
303
  }
300
304
 
305
+ /**
306
+ * Returns the project associated with the model.
307
+ * If the project is not defined in the model, it returns a default project with the ID "default".
308
+ */
301
309
  get project(): LikeC4Project {
302
310
  return this.$data.project ?? memoizeProp(this, Symbol.for('project'), () => ({
303
311
  id: this.projectId as unknown as scalar.ProjectId,
@@ -182,8 +182,11 @@ export class RichText {
182
182
  if (this.isEmpty || this.$source === null) {
183
183
  return emptyTxt
184
184
  }
185
- const markdown = this.$source.md ?? this.$source.txt
186
- return memoizeProp(this, symb_html, () => markdownToHtml(markdown))
185
+ const source = this.$source
186
+ if ('txt' in source) {
187
+ return source.txt
188
+ }
189
+ return memoizeProp(this, symb_html, () => markdownToHtml(source.md!))
187
190
  }
188
191
 
189
192
  equals(other: unknown): boolean {
@@ -4,7 +4,7 @@ import type { ExclusiveUnion } from './_common'
4
4
  import type { PredicateSelector } from './expression'
5
5
  import { FqnRef } from './fqnRef'
6
6
  import type { WhereOperator } from './operators'
7
- import { type Icon } from './scalar'
7
+ import type * as scalar from './scalar'
8
8
  import type {
9
9
  BorderStyle,
10
10
  Color,
@@ -72,12 +72,12 @@ export namespace ModelFqnExpr {
72
72
  custom: {
73
73
  expr: OrWhere<A>
74
74
  title?: string
75
- description?: string
75
+ description?: scalar.MarkdownOrString
76
76
  technology?: string
77
77
  notation?: string
78
78
  shape?: ElementShape
79
79
  color?: Color
80
- icon?: Icon
80
+ icon?: scalar.Icon
81
81
  border?: BorderStyle
82
82
  opacity?: number
83
83
  navigateTo?: aux.StrictViewId<A>
@@ -3,7 +3,7 @@ import type { AnyAux } from './_aux'
3
3
  import type { ExclusiveUnion } from './_common'
4
4
  import { FqnRef } from './fqnRef'
5
5
  import type { WhereOperator } from './operators'
6
- import { type Icon } from './scalar'
6
+ import type * as scalar from './scalar'
7
7
  import type {
8
8
  BorderStyle,
9
9
  Color,
@@ -86,12 +86,12 @@ export namespace FqnExpr {
86
86
  custom: {
87
87
  expr: OrWhere<A>
88
88
  title?: string
89
- description?: string
89
+ description?: scalar.MarkdownOrString
90
90
  technology?: string
91
91
  notation?: string
92
92
  shape?: ElementShape
93
93
  color?: Color
94
- icon?: Icon
94
+ icon?: scalar.Icon
95
95
  border?: BorderStyle
96
96
  opacity?: number
97
97
  navigateTo?: aux.StrictViewId<A>
@@ -1,6 +1,6 @@
1
1
  export * from './_common'
2
2
 
3
- export type * as aux from './_aux'
3
+ export * as aux from './_aux'
4
4
 
5
5
  export type {
6
6
  Any,
@@ -37,6 +37,6 @@ export * from './view-parsed.deployment'
37
37
  export * from './view-parsed.dynamic'
38
38
  export * from './view-parsed.element'
39
39
 
40
- export type * as scalar from './scalar'
40
+ export * as scalar from './scalar'
41
41
 
42
42
  export { RichText, type RichTextEmpty, type RichTextOrEmpty } from './RichText'
@@ -1,9 +1,14 @@
1
1
  import * as scalar from './scalar'
2
2
 
3
3
  /**
4
- * LikeC4 projects encapsulate model, and can import from each other
4
+ * Configuration of the project, as read from the config file.
5
+ * LikeC4 projects encapsulate models, and can import from each other
5
6
  */
6
7
  export interface LikeC4Project {
7
- id: scalar.ProjectId
8
+ /**
9
+ * ID of the project, casted to {@link scalar.ProjectId}
10
+ */
11
+ readonly id: scalar.ProjectId
12
+
8
13
  title?: string
9
14
  }
@@ -3,6 +3,9 @@ import type { Tagged } from 'type-fest'
3
3
  import { invariant } from '../utils'
4
4
 
5
5
  export type ProjectId<T = string> = Tagged<T, 'ProjectID'>
6
+ export function ProjectId(name: string): ProjectId {
7
+ return name as unknown as ProjectId
8
+ }
6
9
 
7
10
  export type MarkdownOrString = { txt: string; md?: never } | { md: string; txt?: never }
8
11