@likec4/core 1.32.2 → 1.34.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 (113) hide show
  1. package/dist/builder/index.d.mts +6 -4
  2. package/dist/builder/index.mjs +45 -13
  3. package/dist/compute-view/index.d.mts +6 -4
  4. package/dist/compute-view/index.mjs +33 -10
  5. package/dist/compute-view/relationships-view/index.d.mts +6 -4
  6. package/dist/compute-view/relationships-view/index.mjs +6 -3
  7. package/dist/index.d.mts +9 -138
  8. package/dist/index.mjs +31 -3712
  9. package/dist/model/connection/deployment/index.d.mts +10 -0
  10. package/dist/model/connection/deployment/index.mjs +18 -0
  11. package/dist/model/connection/index.d.mts +70 -0
  12. package/dist/model/connection/index.mjs +23 -0
  13. package/dist/model/connection/model/index.d.mts +10 -0
  14. package/dist/model/connection/model/index.mjs +11 -0
  15. package/dist/model/index.d.mts +14 -256
  16. package/dist/model/index.mjs +27 -5
  17. package/dist/shared/{core.cbA9VZ02.mjs → core.4SpVCM9m.mjs} +31 -1073
  18. package/dist/shared/{core.BuO4ncfY.d.mts → core.668kXpZq.d.mts} +42 -52
  19. package/dist/shared/core.8KM0D6va.mjs +33 -0
  20. package/dist/shared/core.B0oEIXqd.mjs +47 -0
  21. package/dist/shared/core.BH9nN-_I.mjs +22 -0
  22. package/dist/shared/core.BMCb0wJI.mjs +177 -0
  23. package/dist/shared/core.BTnf14gD.mjs +331 -0
  24. package/dist/shared/core.BgvIuGGU.mjs +3 -0
  25. package/dist/shared/core.BoyJPEen.mjs +21 -0
  26. package/dist/shared/{core.CUYDgv2-.mjs → core.Br7Fab9l.mjs} +12 -15
  27. package/dist/shared/{core.BrCnZFTn.mjs → core.Btl47GOn.mjs} +3 -3
  28. package/dist/shared/core.ByrmCl9I.mjs +5 -0
  29. package/dist/shared/core.C80Z37Eu.mjs +29 -0
  30. package/dist/shared/{core.Pf5I9o0e.d.mts → core.CF82MWyh.d.mts} +1 -1
  31. package/dist/shared/core.CJSFKrYf.d.mts +83 -0
  32. package/dist/shared/{core.rmvsy0n3.mjs → core.C_C-3c1S.mjs} +5 -198
  33. package/dist/shared/{core.DoK86JEe.mjs → core.CpwrZi3D.mjs} +2 -73
  34. package/dist/shared/{core.CpXlRyE5.mjs → core.CtKXPqN_.mjs} +5 -36
  35. package/dist/shared/core.CxGKeL-L.mjs +144 -0
  36. package/dist/shared/core.CzdwsPmY.d.mts +69 -0
  37. package/dist/shared/core.D3xEWj5B.d.mts +41 -0
  38. package/dist/shared/{core.Cy9smucx.mjs → core.D4npX2q8.mjs} +1 -3
  39. package/dist/shared/core.D56nCp7e.mjs +168 -0
  40. package/dist/shared/core.D5qVzkws.mjs +724 -0
  41. package/dist/shared/{core.CBxTtXMi.d.mts → core.DAj3LuFH.d.mts} +58 -57
  42. package/dist/shared/{core.Bk7wEZFG.mjs → core.DXRAwwDB.mjs} +3 -2
  43. package/dist/shared/core.DcS-0zys.mjs +10 -0
  44. package/dist/shared/core.Di7__sMg.d.mts +87 -0
  45. package/dist/shared/{core.DaAyklhe.d.mts → core.DrS4Bf4y.d.mts} +31 -22
  46. package/dist/shared/core.DsMrjY2q.mjs +34 -0
  47. package/dist/shared/core.DuSLYTG6.d.mts +57 -0
  48. package/dist/shared/{core.Bdz6fBF1.d.mts → core.IWLie-Ma.d.mts} +92 -81
  49. package/dist/shared/{core.CBpKAlhj.mjs → core.PqNe5WxQ.mjs} +96 -56
  50. package/dist/shared/core.XptQjhMA.mjs +1295 -0
  51. package/dist/shared/core.zLlww-07.mjs +3 -0
  52. package/dist/theme/index.d.mts +134 -0
  53. package/dist/theme/index.mjs +3709 -0
  54. package/dist/types/_aux.d.mts +4 -0
  55. package/dist/types/index.d.mts +9 -5
  56. package/dist/types/index.mjs +17 -146
  57. package/dist/utils/index.d.mts +15 -100
  58. package/dist/utils/index.mjs +25 -1315
  59. package/dist/utils/iterable/index.d.mts +100 -0
  60. package/dist/utils/iterable/index.mjs +24 -0
  61. package/package.json +29 -13
  62. package/src/builder/Builder.ts +13 -4
  63. package/src/builder/__snapshots__/Builder-style1.spec.ts.snap +0 -13
  64. package/src/builder/__snapshots__/Builder-style2.compute-model.json5 +2 -6
  65. package/src/builder/__snapshots__/Builder-style2.spec.ts.snap +0 -7
  66. package/src/compute-view/deployment-view/__test__/fixture.ts +15 -5
  67. package/src/compute-view/deployment-view/utils.ts +13 -13
  68. package/src/compute-view/dynamic-view/compute.ts +2 -1
  69. package/src/compute-view/element-view/__test__/__snapshots__/legacy.spec.ts.snap +2 -2
  70. package/src/compute-view/relationships-view/layout.ts +1 -1
  71. package/src/compute-view/utils/applyCustomElementProperties.ts +8 -0
  72. package/src/compute-view/utils/applyCustomRelationProperties.ts +2 -0
  73. package/src/compute-view/utils/buildComputedNodes.ts +4 -3
  74. package/src/compute-view/utils/merge-props-from-relationships.ts +6 -5
  75. package/src/compute-view/utils/view-hash.ts +24 -3
  76. package/src/model/DeploymentElementModel.ts +21 -17
  77. package/src/model/DeploymentModel.ts +1 -1
  78. package/src/model/ElementModel.ts +15 -5
  79. package/src/model/LikeC4Model.ts +1 -1
  80. package/src/model/RelationModel.ts +20 -17
  81. package/src/model/index.ts +2 -0
  82. package/src/model/types.ts +2 -1
  83. package/src/model/view/EdgeModel.ts +4 -3
  84. package/src/model/view/LikeC4ViewModel.ts +6 -1
  85. package/src/model/view/NodeModel.ts +5 -3
  86. package/src/theme/index.ts +12 -5
  87. package/src/types/RichText.ts +200 -0
  88. package/src/types/expression-model.ts +2 -2
  89. package/src/types/expression.ts +2 -2
  90. package/src/types/fqnRef.ts +2 -2
  91. package/src/types/global.ts +1 -1
  92. package/src/types/index.ts +4 -2
  93. package/src/types/model-data.ts +2 -2
  94. package/src/types/model-deployment.ts +6 -5
  95. package/src/types/model-dump.ts +1 -1
  96. package/src/types/model-logical.ts +5 -5
  97. package/src/types/model-spec.ts +2 -2
  98. package/src/types/operators.ts +2 -2
  99. package/src/types/scalar.ts +47 -2
  100. package/src/types/view-common.ts +3 -3
  101. package/src/types/view-computed.ts +4 -6
  102. package/src/types/view-layouted.ts +11 -2
  103. package/src/types/view-parsed.deployment.ts +1 -1
  104. package/src/types/view-parsed.dynamic.ts +2 -2
  105. package/src/types/view-parsed.element.ts +2 -2
  106. package/src/types/view.ts +2 -2
  107. package/src/utils/index.ts +4 -9
  108. package/src/utils/markdown/index.ts +2 -0
  109. package/src/utils/markdown/to-html.ts +32 -0
  110. package/src/utils/markdown/to-text.ts +14 -0
  111. package/dist/types/aux.d.mts +0 -3
  112. /package/dist/types/{aux.mjs → _aux.mjs} +0 -0
  113. /package/src/types/{aux.ts → _aux.ts} +0 -0
@@ -1,5 +1,6 @@
1
1
  import { IfNever, IsNever, IsLiteral } from 'type-fest';
2
- import { D as DeploymentFqn$1, C as Coalesce, F as Fqn$1, R as RelationId$1, N as NodeId$1, E as EdgeId$1, P as ProjectId$1, V as ViewId$1, T as Tag$1, a as ElementKind$1, b as DeploymentKind$1, c as RelationshipKind, L as Link } from './core.BuO4ncfY.mjs';
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
4
 
4
5
  /**
5
6
  * Determines the stage of the model:
@@ -198,61 +199,61 @@ type LooseElementKind<A extends Any> = Coalesce<A['ElementKind']> | OrString;
198
199
  type LooseDeploymentKind<A extends Any> = Coalesce<A['DeploymentKind']> | OrString;
199
200
  type LooseRelationKind<A extends Any> = Coalesce<A['RelationKind']> | OrString;
200
201
 
201
- type aux_AllKinds<A> = AllKinds<A>;
202
- type aux_Any = Any;
203
- type aux_AnySpec = AnySpec;
204
- type aux_Aux<Stage extends ModelStage, Element extends string, Deployment extends string, View extends string, Project extends string, Spec extends SpecAux<string, string, string, string, string>> = Aux<Stage, Element, Deployment, View, Project, Spec>;
205
- type aux_DeploymentFqn<A> = DeploymentFqn<A>;
206
- type aux_DeploymentId<A> = DeploymentId<A>;
207
- type aux_DeploymentKind<A> = DeploymentKind<A>;
208
- type aux_EdgeId = EdgeId;
209
- type aux_ElementId<A> = ElementId<A>;
210
- type aux_ElementKind<A> = ElementKind<A>;
211
- type aux_Fqn<A> = Fqn<A>;
212
- type aux_LooseDeploymentId<A extends Any> = LooseDeploymentId<A>;
213
- type aux_LooseDeploymentKind<A extends Any> = LooseDeploymentKind<A>;
214
- type aux_LooseElementId<A extends Any> = LooseElementId<A>;
215
- type aux_LooseElementKind<A extends Any> = LooseElementKind<A>;
216
- type aux_LooseRelationKind<A extends Any> = LooseRelationKind<A>;
217
- type aux_LooseTag<A extends Any> = LooseTag<A>;
218
- type aux_LooseTags<A extends Any> = LooseTags<A>;
219
- type aux_LooseViewId<A extends Any> = LooseViewId<A>;
220
- type aux_Metadata<A extends Any> = Metadata<A>;
221
- type aux_MetadataKey<A> = MetadataKey<A>;
222
- type aux_Never = Never;
223
- type aux_NodeId = NodeId;
224
- type aux_OrString = OrString;
225
- type aux_PickByStage<A extends Any, OnParsed, OnComputed, OnLayouted = OnComputed> = PickByStage<A, OnParsed, OnComputed, OnLayouted>;
226
- type aux_ProjectId<A> = ProjectId<A>;
227
- type aux_RelationId = RelationId;
228
- type aux_RelationKind<A> = RelationKind<A>;
229
- type aux_Spec<A> = Spec<A>;
230
- type aux_SpecAux<ElementKind extends string, DeploymentKind extends string, RelationKind extends string, Tag extends string, MetadataKey extends string> = SpecAux<ElementKind, DeploymentKind, RelationKind, Tag, MetadataKey>;
231
- type aux_Stage<A> = Stage<A>;
232
- type aux_StrictDeploymentKind<A> = StrictDeploymentKind<A>;
233
- type aux_StrictElementKind<A> = StrictElementKind<A>;
234
- type aux_StrictProjectId<A> = StrictProjectId<A>;
235
- type aux_StrictRelationKind<A> = StrictRelationKind<A>;
236
- type aux_StrictTag<A> = StrictTag<A>;
237
- type aux_StrictViewId<A> = StrictViewId<A>;
238
- type aux_Tag<A> = Tag<A>;
239
- type aux_Tags<A extends Any> = Tags<A>;
240
- type aux_Unknown = Unknown;
241
- type aux_UnknownComputed = UnknownComputed;
242
- type aux_UnknownLayouted = UnknownLayouted;
243
- type aux_UnknownParsed = UnknownParsed;
244
- type aux_ViewId<A> = ViewId<A>;
245
- type aux_WithLinks = WithLinks;
246
- type aux_WithMetadata<A extends Any> = WithMetadata<A>;
247
- type aux_WithOptionalLinks = WithOptionalLinks;
248
- type aux_WithOptionalTags<A extends Any> = WithOptionalTags<A>;
249
- type aux_WithTags<A extends Any> = WithTags<A>;
250
- type aux_setStage<A, S extends ModelStage> = setStage<A, S>;
251
- type aux_toComputed<A> = toComputed<A>;
252
- type aux_toLayouted<A> = toLayouted<A>;
253
- type aux_toParsed<A> = toParsed<A>;
254
- declare namespace aux {
255
- export type { aux_AllKinds as AllKinds, aux_Any as Any, Any as AnyAux, aux_AnySpec as AnySpec, aux_Aux as Aux, aux_DeploymentFqn as DeploymentFqn, aux_DeploymentId as DeploymentId, aux_DeploymentKind as DeploymentKind, aux_EdgeId as EdgeId, aux_ElementId as ElementId, aux_ElementKind as ElementKind, aux_Fqn as Fqn, aux_LooseDeploymentId as LooseDeploymentId, aux_LooseDeploymentKind as LooseDeploymentKind, aux_LooseElementId as LooseElementId, aux_LooseElementKind as LooseElementKind, aux_LooseRelationKind as LooseRelationKind, aux_LooseTag as LooseTag, aux_LooseTags as LooseTags, aux_LooseViewId as LooseViewId, aux_Metadata as Metadata, aux_MetadataKey as MetadataKey, aux_Never as Never, aux_NodeId as NodeId, aux_OrString as OrString, aux_PickByStage as PickByStage, aux_ProjectId as ProjectId, aux_RelationId as RelationId, aux_RelationKind as RelationKind, aux_Spec as Spec, aux_SpecAux as SpecAux, aux_Stage as Stage, DeploymentFqn as StrictDeploymentFqn, aux_StrictDeploymentKind as StrictDeploymentKind, aux_StrictElementKind as StrictElementKind, Fqn as StrictFqn, aux_StrictProjectId as StrictProjectId, aux_StrictRelationKind as StrictRelationKind, aux_StrictTag as StrictTag, aux_StrictViewId as StrictViewId, aux_Tag as Tag, aux_Tags as Tags, aux_Unknown as Unknown, aux_UnknownComputed as UnknownComputed, aux_UnknownLayouted as UnknownLayouted, aux_UnknownParsed as UnknownParsed, aux_ViewId as ViewId, aux_WithLinks as WithLinks, aux_WithMetadata as WithMetadata, aux_WithOptionalLinks as WithOptionalLinks, aux_WithOptionalTags as WithOptionalTags, aux_WithTags as WithTags, aux_setStage as setStage, aux_toComputed as toComputed, aux_toLayouted as toLayouted, aux_toParsed as toParsed };
202
+ type _aux_AllKinds<A> = AllKinds<A>;
203
+ type _aux_Any = Any;
204
+ type _aux_AnySpec = AnySpec;
205
+ type _aux_Aux<Stage extends ModelStage, Element extends string, Deployment extends string, View extends string, Project extends string, Spec extends SpecAux<string, string, string, string, string>> = Aux<Stage, Element, Deployment, View, Project, Spec>;
206
+ type _aux_DeploymentFqn<A> = DeploymentFqn<A>;
207
+ type _aux_DeploymentId<A> = DeploymentId<A>;
208
+ type _aux_DeploymentKind<A> = DeploymentKind<A>;
209
+ type _aux_EdgeId = EdgeId;
210
+ type _aux_ElementId<A> = ElementId<A>;
211
+ type _aux_ElementKind<A> = ElementKind<A>;
212
+ type _aux_Fqn<A> = Fqn<A>;
213
+ type _aux_LooseDeploymentId<A extends Any> = LooseDeploymentId<A>;
214
+ type _aux_LooseDeploymentKind<A extends Any> = LooseDeploymentKind<A>;
215
+ type _aux_LooseElementId<A extends Any> = LooseElementId<A>;
216
+ type _aux_LooseElementKind<A extends Any> = LooseElementKind<A>;
217
+ type _aux_LooseRelationKind<A extends Any> = LooseRelationKind<A>;
218
+ type _aux_LooseTag<A extends Any> = LooseTag<A>;
219
+ type _aux_LooseTags<A extends Any> = LooseTags<A>;
220
+ type _aux_LooseViewId<A extends Any> = LooseViewId<A>;
221
+ type _aux_Metadata<A extends Any> = Metadata<A>;
222
+ type _aux_MetadataKey<A> = MetadataKey<A>;
223
+ type _aux_Never = Never;
224
+ type _aux_NodeId = NodeId;
225
+ type _aux_OrString = OrString;
226
+ type _aux_PickByStage<A extends Any, OnParsed, OnComputed, OnLayouted = OnComputed> = PickByStage<A, OnParsed, OnComputed, OnLayouted>;
227
+ type _aux_ProjectId<A> = ProjectId<A>;
228
+ type _aux_RelationId = RelationId;
229
+ type _aux_RelationKind<A> = RelationKind<A>;
230
+ type _aux_Spec<A> = Spec<A>;
231
+ type _aux_SpecAux<ElementKind extends string, DeploymentKind extends string, RelationKind extends string, Tag extends string, MetadataKey extends string> = SpecAux<ElementKind, DeploymentKind, RelationKind, Tag, MetadataKey>;
232
+ type _aux_Stage<A> = Stage<A>;
233
+ type _aux_StrictDeploymentKind<A> = StrictDeploymentKind<A>;
234
+ type _aux_StrictElementKind<A> = StrictElementKind<A>;
235
+ type _aux_StrictProjectId<A> = StrictProjectId<A>;
236
+ type _aux_StrictRelationKind<A> = StrictRelationKind<A>;
237
+ type _aux_StrictTag<A> = StrictTag<A>;
238
+ type _aux_StrictViewId<A> = StrictViewId<A>;
239
+ type _aux_Tag<A> = Tag<A>;
240
+ type _aux_Tags<A extends Any> = Tags<A>;
241
+ type _aux_Unknown = Unknown;
242
+ type _aux_UnknownComputed = UnknownComputed;
243
+ type _aux_UnknownLayouted = UnknownLayouted;
244
+ type _aux_UnknownParsed = UnknownParsed;
245
+ type _aux_ViewId<A> = ViewId<A>;
246
+ type _aux_WithLinks = WithLinks;
247
+ type _aux_WithMetadata<A extends Any> = WithMetadata<A>;
248
+ type _aux_WithOptionalLinks = WithOptionalLinks;
249
+ type _aux_WithOptionalTags<A extends Any> = WithOptionalTags<A>;
250
+ type _aux_WithTags<A extends Any> = WithTags<A>;
251
+ type _aux_setStage<A, S extends ModelStage> = setStage<A, S>;
252
+ type _aux_toComputed<A> = toComputed<A>;
253
+ type _aux_toLayouted<A> = toLayouted<A>;
254
+ type _aux_toParsed<A> = toParsed<A>;
255
+ declare namespace _aux {
256
+ export type { _aux_AllKinds as AllKinds, _aux_Any as Any, Any as AnyAux, _aux_AnySpec as AnySpec, _aux_Aux as Aux, _aux_DeploymentFqn as DeploymentFqn, _aux_DeploymentId as DeploymentId, _aux_DeploymentKind as DeploymentKind, _aux_EdgeId as EdgeId, _aux_ElementId as ElementId, _aux_ElementKind as ElementKind, _aux_Fqn as Fqn, _aux_LooseDeploymentId as LooseDeploymentId, _aux_LooseDeploymentKind as LooseDeploymentKind, _aux_LooseElementId as LooseElementId, _aux_LooseElementKind as LooseElementKind, _aux_LooseRelationKind as LooseRelationKind, _aux_LooseTag as LooseTag, _aux_LooseTags as LooseTags, _aux_LooseViewId as LooseViewId, _aux_Metadata as Metadata, _aux_MetadataKey as MetadataKey, _aux_Never as Never, _aux_NodeId as NodeId, _aux_OrString as OrString, _aux_PickByStage as PickByStage, _aux_ProjectId as ProjectId, _aux_RelationId as RelationId, _aux_RelationKind as RelationKind, _aux_Spec as Spec, _aux_SpecAux as SpecAux, _aux_Stage as Stage, DeploymentFqn as StrictDeploymentFqn, _aux_StrictDeploymentKind as StrictDeploymentKind, _aux_StrictElementKind as StrictElementKind, Fqn as StrictFqn, _aux_StrictProjectId as StrictProjectId, _aux_StrictRelationKind as StrictRelationKind, _aux_StrictTag as StrictTag, _aux_StrictViewId as StrictViewId, _aux_Tag as Tag, _aux_Tags as Tags, _aux_Unknown as Unknown, _aux_UnknownComputed as UnknownComputed, _aux_UnknownLayouted as UnknownLayouted, _aux_UnknownParsed as UnknownParsed, _aux_ViewId as ViewId, _aux_WithLinks as WithLinks, _aux_WithMetadata as WithMetadata, _aux_WithOptionalLinks as WithOptionalLinks, _aux_WithOptionalTags as WithOptionalTags, _aux_WithTags as WithTags, _aux_setStage as setStage, _aux_toComputed as toComputed, _aux_toLayouted as toLayouted, _aux_toParsed as toParsed };
256
257
  }
257
258
 
258
- export { type WithLinks as $, type Any as A, type WithMetadata as B, type AnySpec as C, type DeploymentKind as D, type ExtractOnStage as E, type Fqn as F, type PickByStage as G, type setStage as H, type NodeId as I, type Spec as J, type StrictProjectId as K, type LooseTag as L, type ModelStage as M, type Never as N, type StrictTag as O, type ProjectId as P, type StrictElementKind as Q, type RelationKind as R, type SpecAux as S, type Tags as T, type Unknown as U, type ViewId as V, type WithOptionalTags as W, type StrictDeploymentKind as X, type StrictRelationKind as Y, type WithTags as Z, _stage as _, aux as a, type OrString as a0, type LooseTags as a1, type LooseElementKind as a2, type LooseDeploymentKind as a3, type LooseRelationKind as a4, type Aux as b, type UnknownComputed as c, type UnknownLayouted as d, type UnknownParsed as e, _type as f, type ElementId as g, type EdgeId as h, isOnStage as i, type Metadata as j, type MetadataKey as k, type ElementKind as l, type RelationId as m, type StrictViewId as n, type LooseElementId as o, type LooseDeploymentId as p, type DeploymentFqn as q, type toLayouted as r, type Stage as s, type toComputed as t, type DeploymentId as u, type Tag as v, type toParsed as w, type LooseViewId as x, type AllKinds as y, type WithOptionalLinks as z };
259
+ export { type WithLinks as $, type Any as A, type EdgeId as B, type AnySpec as C, type DeploymentKind as D, type ExtractOnStage as E, type Fqn as F, type PickByStage as G, type setStage as H, type NodeId as I, type Spec as J, type StrictProjectId as K, type LooseTag as L, type ModelStage as M, type Never as N, type StrictTag as O, type ProjectId as P, type StrictElementKind as Q, type RelationKind as R, type SpecAux as S, type Tags as T, type Unknown as U, type ViewId as V, type WithOptionalTags as W, type StrictDeploymentKind as X, type StrictRelationKind as Y, type WithTags as Z, _aux as _, type Aux as a, type OrString as a0, type LooseTags as a1, type LooseElementKind as a2, type LooseDeploymentKind as a3, type LooseRelationKind as a4, type UnknownComputed as b, type UnknownLayouted as c, type UnknownParsed as d, _stage as e, _type as f, type ElementId as g, type Metadata as h, isOnStage as i, type MetadataKey as j, type ElementKind as k, type RelationId as l, type StrictViewId as m, type LooseElementId as n, type LooseDeploymentId as o, type DeploymentFqn as p, type toLayouted as q, type Stage as r, type DeploymentId as s, type toComputed as t, type Tag as u, type toParsed as v, type LooseViewId as w, type AllKinds as x, type WithOptionalLinks as y, type WithMetadata as z };
@@ -1,4 +1,5 @@
1
- import { F as FqnRef, c as n, d as isStepEdgeId } from './core.CUYDgv2-.mjs';
1
+ import { F as FqnRef, q as isStepEdgeId } from './core.Br7Fab9l.mjs';
2
+ import { n } from './core.D56nCp7e.mjs';
2
3
 
3
4
  function o(r){return Array.isArray(r)}
4
5
 
@@ -273,4 +274,4 @@ function isViewRuleGroup(rule) {
273
274
  return "title" in rule && "groupRules" in rule && Array.isArray(rule.groupRules);
274
275
  }
275
276
 
276
- export { Expression as E, FqnExpr as F, ModelFqnExpr as M, RelationExpr as R, isElementView as a, isViewRuleStyle as b, isViewRulePredicate as c, isViewRuleAutoLayout as d, isViewRuleGroup as e, isViewRuleGlobalPredicateRef as f, isViewRuleGlobalStyle as g, isDynamicViewParallelSteps as h, isExtendsElementView as i, ModelRelationExpr as j, ModelExpression as k, isDynamicView as l, isDeploymentView as m, isComputedView as n, o, isDiagramView as p, isScopedElementView as q, isAutoLayoutDirection as r, getParallelStepsPrefix as s };
277
+ export { Expression as E, FqnExpr as F, ModelFqnExpr as M, RelationExpr as R, ModelRelationExpr as a, ModelExpression as b, isViewRuleStyle as c, isComputedView as d, isDiagramView as e, isElementView as f, isScopedElementView as g, isExtendsElementView as h, isViewRulePredicate as i, isDeploymentView as j, isDynamicView as k, isViewRuleGlobalStyle as l, isViewRuleGlobalPredicateRef as m, isAutoLayoutDirection as n, isViewRuleAutoLayout as o, getParallelStepsPrefix as p, isDynamicViewParallelSteps as q, isViewRuleGroup as r, o as s };
@@ -0,0 +1,10 @@
1
+ function getOrCreate(map, key, create) {
2
+ let entry = map.get(key);
3
+ if (!entry) {
4
+ entry = create(key);
5
+ map.set(key, entry);
6
+ }
7
+ return entry;
8
+ }
9
+
10
+ export { getOrCreate as g };
@@ -0,0 +1,87 @@
1
+ import { C as Connection, c as customInspectSymbol } from './core.D3xEWj5B.mjs';
2
+ import { e as DeploymentElementModel, i as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.DrS4Bf4y.mjs';
3
+ import { A as Any, B as EdgeId } from './core.DAj3LuFH.mjs';
4
+ import { I as IteratorLike } from './core.DuSLYTG6.mjs';
5
+
6
+ /**
7
+ * Connection is ephemeral entity, result of a resolving relationships between source and target.
8
+ * Includes direct relationships and/or between their nested elements.
9
+ */
10
+ declare class DeploymentConnectionModel<A extends Any = Any> implements Connection<DeploymentElementModel<A>, EdgeId> {
11
+ readonly source: DeploymentElementModel<A>;
12
+ readonly target: DeploymentElementModel<A>;
13
+ readonly relations: RelationshipsAccum<A>;
14
+ readonly id: EdgeId;
15
+ constructor(source: DeploymentElementModel<A>, target: DeploymentElementModel<A>, relations: RelationshipsAccum<A>);
16
+ /**
17
+ * Human readable expression of the connection
18
+ * Mostly used for testing and debugging
19
+ */
20
+ get expression(): string;
21
+ private _boundary;
22
+ /**
23
+ * Common ancestor of the source and target elements.
24
+ * Represents the boundary of the connection.
25
+ */
26
+ get boundary(): DeploymentNodeModel<A> | null;
27
+ nonEmpty(): boolean;
28
+ [customInspectSymbol](depth: any, inspectOptions: any, inspect: any): string;
29
+ toString(): string;
30
+ /**
31
+ * Check if connection contains deployment relation,
32
+ * that is directly connected to source or target.
33
+ */
34
+ hasDirectDeploymentRelation(): boolean;
35
+ values(): IteratorLike<RelationshipModel<A> | DeploymentRelationModel<A>>;
36
+ /**
37
+ * Merge with another connections, if it has the same source and target.
38
+ * Returns new connection with union of relationships.
39
+ */
40
+ mergeWith(others: DeploymentConnectionModel<A>[]): DeploymentConnectionModel<A>;
41
+ /**
42
+ * Merge with another connection, if it has the same source and target.
43
+ * Returns new connection with union of relationships.
44
+ */
45
+ mergeWith(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
46
+ difference(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
47
+ intersect(other: DeploymentConnectionModel<A>): DeploymentConnectionModel<A>;
48
+ equals(other: Connection): boolean;
49
+ /**
50
+ * Creates a clone of the current `DeploymentConnectionModel` instance with optional overrides.
51
+ * if `null` is provided in overrides, the corresponding relation set will be empty.
52
+ */
53
+ update(overrides?: {
54
+ model?: ReadonlySet<RelationshipModel<A>> | null;
55
+ deployment?: ReadonlySet<DeploymentRelationModel<A>> | null;
56
+ }): DeploymentConnectionModel<A>;
57
+ }
58
+
59
+ /**
60
+ * Resolve connection from source to target
61
+ * If direction is `both`, also look for reverse connection
62
+ *
63
+ * @default direction directed
64
+ */
65
+ declare function findConnection<M extends Any>(source: DeploymentElementModel<M>, target: DeploymentElementModel<NoInfer<M>>, direction: 'directed'): readonly [DeploymentConnectionModel<M>] | readonly [];
66
+ declare function findConnection<M extends Any>(source: DeploymentElementModel<M>, target: DeploymentElementModel<NoInfer<M>>, direction: 'both'): readonly [DeploymentConnectionModel<M>, DeploymentConnectionModel<M>] | readonly [DeploymentConnectionModel<M>] | readonly [];
67
+ declare function findConnection<M extends Any>(source: DeploymentElementModel<M>, target: DeploymentElementModel<NoInfer<M>>, direction?: 'directed' | 'both'): readonly [DeploymentConnectionModel<M>, DeploymentConnectionModel<M>] | readonly [DeploymentConnectionModel<M>] | readonly [];
68
+ /**
69
+ * Resolve all connections between element and others
70
+ * By default, look for both directions.
71
+ *
72
+ * @default direction both
73
+ */
74
+ declare function findConnectionsBetween<M extends Any>(element: DeploymentElementModel<M>, others: Iterable<DeploymentElementModel<NoInfer<M>>>, direction?: 'directed' | 'both'): readonly DeploymentConnectionModel<M>[];
75
+ /**
76
+ * Resolve all connections within a given set of elements
77
+ */
78
+ declare function findConnectionsWithin<M extends Any>(elements: Iterable<DeploymentElementModel<M>>): readonly DeploymentConnectionModel<M>[];
79
+
80
+ declare const find_findConnection: typeof findConnection;
81
+ declare const find_findConnectionsBetween: typeof findConnectionsBetween;
82
+ declare const find_findConnectionsWithin: typeof findConnectionsWithin;
83
+ declare namespace find {
84
+ export { find_findConnection as findConnection, find_findConnectionsBetween as findConnectionsBetween, find_findConnectionsWithin as findConnectionsWithin };
85
+ }
86
+
87
+ export { DeploymentConnectionModel as D, findConnection as a, findConnectionsBetween as b, findConnectionsWithin as c, find as f };
@@ -1,8 +1,10 @@
1
- import { A as Any, R as RelationKind, T as Tags, j as Metadata, k as MetadataKey, L as LooseTag, F as Fqn, g as ElementId, l as ElementKind, D as DeploymentKind, E as ExtractOnStage, m as RelationId$1, f as _type, n as StrictViewId, o as LooseElementId, p as LooseDeploymentId, q as DeploymentFqn, t as toComputed, r as toLayouted, s as Stage, u as DeploymentId, U as Unknown, V as ViewId, v as Tag, w as toParsed, P as ProjectId$1, x as LooseViewId, b as Aux, S as SpecAux, e as UnknownParsed, c as UnknownComputed, d as UnknownLayouted } from './core.CBxTtXMi.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, f as _type, m as StrictViewId, 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.DAj3LuFH.mjs';
2
2
  import { D as DefaultMap } from './core.CywrQs86.mjs';
3
3
  import { SetRequired } from 'type-fest';
4
- import { I as IteratorLike, R as RelationId, L as Link, P as ProjectId, j as IconUrl, N as NodeId, G as GroupElementKind, E as EdgeId, p as StepEdgeId, V as ViewId$1 } from './core.BuO4ncfY.mjs';
5
- import { az as Color, av as RelationshipLineType, Y as Relationship, O as Element, ar as ElementShape, N as ElementStyle, aM as ViewWithType, aI as ComputedView, aG as LayoutedView, k as ParsedLikeC4ModelData, l as ComputedLikeC4ModelData, m as LayoutedLikeC4ModelData, c as FqnRef, p as DeployedInstance, D as DeploymentElementStyle, u as DeploymentRelationship, q as DeploymentElement, o as DeploymentNode, x as LikeC4ModelDump, y as AuxFromDump, a2 as Specification, j as ModelGlobals, ah as WhereOperator } from './core.Bdz6fBF1.mjs';
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, Y as Relationship, Q as Element, O as ElementStyle, as as ViewWithType, ao as ComputedView, am 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, z as AuxFromDump, a2 as Specification, m as ModelGlobals, ah as WhereOperator } from './core.IWLie-Ma.mjs';
6
+ import { I as IteratorLike, L as Link } from './core.DuSLYTG6.mjs';
7
+ import { i as Color, R as RelationshipLineType, c as ElementShape } from './core.CzdwsPmY.mjs';
6
8
 
7
9
  type RelationshipsIterator<A extends Any> = IteratorLike<RelationshipModel<A>>;
8
10
  /**
@@ -10,16 +12,16 @@ type RelationshipsIterator<A extends Any> = IteratorLike<RelationshipModel<A>>;
10
12
  * use {@link isDeploymentRelationModel} guard to check if the relationship is a deployment relationship
11
13
  */
12
14
  interface AnyRelationshipModel<A extends Any> extends WithTags<A>, WithMetadata<A> {
13
- get id(): RelationId;
14
- get expression(): string;
15
- get title(): string | null;
16
- get technology(): string | null;
17
- get description(): string | null;
18
- get navigateTo(): LikeC4ViewModel<A> | null;
19
- get kind(): RelationKind<A> | null;
20
- get links(): ReadonlyArray<Link>;
21
- get color(): Color;
22
- get line(): RelationshipLineType;
15
+ readonly id: RelationId;
16
+ readonly expression: string;
17
+ readonly title: string | null;
18
+ readonly technology: string | null;
19
+ readonly description: RichTextOrEmpty;
20
+ readonly navigateTo: LikeC4ViewModel<A> | null;
21
+ readonly kind: RelationKind<A> | null;
22
+ readonly links: ReadonlyArray<Link>;
23
+ readonly color: Color;
24
+ readonly line: RelationshipLineType;
23
25
  isDeploymentRelation(): this is DeploymentRelationModel<A>;
24
26
  isModelRelation(): this is RelationshipModel<A>;
25
27
  views(): ViewsIterator<A>;
@@ -39,7 +41,7 @@ declare class RelationshipModel<A extends Any = Any> implements AnyRelationshipM
39
41
  get expression(): string;
40
42
  get title(): string | null;
41
43
  get technology(): string | null;
42
- get description(): string | null;
44
+ get description(): RichTextOrEmpty;
43
45
  get navigateTo(): LikeC4ViewModel<A> | null;
44
46
  get tags(): Tags<A>;
45
47
  get kind(): RelationKind<A> | null;
@@ -52,6 +54,7 @@ declare class RelationshipModel<A extends Any = Any> implements AnyRelationshipM
52
54
  views(): ViewsIterator<A>;
53
55
  isDeploymentRelation(): this is DeploymentRelationModel<A>;
54
56
  isModelRelation(): this is RelationshipModel<A>;
57
+ hasMetadata(): boolean;
55
58
  getMetadata(): Metadata<A>;
56
59
  getMetadata(field: MetadataKey<A>): string | undefined;
57
60
  /**
@@ -72,6 +75,7 @@ declare class ElementModel<A extends Any = Any> implements WithTags<A>, WithMeta
72
75
  fqn: Fqn<A>;
73
76
  };
74
77
  constructor($model: LikeC4Model<A>, $element: Element<A>);
78
+ get name(): string;
75
79
  get parent(): ElementModel<A> | null;
76
80
  get kind(): ElementKind<A>;
77
81
  get shape(): ElementShape;
@@ -83,7 +87,7 @@ declare class ElementModel<A extends Any = Any> implements WithTags<A>, WithMeta
83
87
  */
84
88
  get tags(): Tags<A>;
85
89
  get title(): string;
86
- get description(): string | null;
90
+ get description(): RichTextOrEmpty;
87
91
  get technology(): string | null;
88
92
  get links(): ReadonlyArray<Link>;
89
93
  get defaultView(): LikeC4ViewModel.ScopedElementView<A> | null;
@@ -139,6 +143,7 @@ declare class ElementModel<A extends Any = Any> implements WithTags<A>, WithMeta
139
143
  */
140
144
  isDeployed(): boolean;
141
145
  deployments(): DeployedInstancesIterator<A>;
146
+ hasMetadata(): boolean;
142
147
  getMetadata(): Metadata<A>;
143
148
  getMetadata(field: MetadataKey<A>): string | undefined;
144
149
  /**
@@ -156,7 +161,7 @@ declare class NodeModel<A extends Any = Any, V extends $View<A> = $View<A>> impl
156
161
  get id(): NodeId;
157
162
  get title(): string;
158
163
  get kind(): ElementKind<A> | DeploymentKind<A> | typeof GroupElementKind | 'instance';
159
- get description(): string | null;
164
+ get description(): RichTextOrEmpty;
160
165
  get technology(): string | null;
161
166
  get parent(): NodeModel<A, V> | null;
162
167
  get element(): ElementModel<A> | null;
@@ -236,7 +241,7 @@ declare class EdgeModel<A extends Any = Any, View extends $View<A> = $View<A>> i
236
241
  get id(): EdgeId;
237
242
  get parent(): NodeModel<A, View> | null;
238
243
  get label(): string | null;
239
- get description(): string | null;
244
+ get description(): RichTextOrEmpty;
240
245
  get technology(): string | null;
241
246
  hasParent(): this is EdgeModel.WithParent<A, View>;
242
247
  get tags(): Tags<A>;
@@ -276,6 +281,7 @@ declare class LikeC4ViewModel<A extends Any = Any, V extends $View<A> = $View<A>
276
281
  get _type(): V[_type];
277
282
  get id(): StrictViewId<A>;
278
283
  get title(): string | null;
284
+ get description(): RichTextOrEmpty;
279
285
  get tags(): Tags<A>;
280
286
  get links(): ReadonlyArray<Link>;
281
287
  get viewOf(): ElementModel<A> | null;
@@ -397,6 +403,7 @@ interface WithTags<A extends Any> {
397
403
  isTagged(tag: LooseTag<A>): boolean;
398
404
  }
399
405
  interface WithMetadata<A extends Any> {
406
+ hasMetadata(): boolean;
400
407
  getMetadata(): Metadata<A>;
401
408
  getMetadata(field: MetadataKey<A>): string | undefined;
402
409
  }
@@ -497,7 +504,7 @@ declare abstract class AbstractDeploymentElementModel<A extends Any> implements
497
504
  get style(): SetRequired<DeploymentElementStyle, 'shape' | 'color' | 'size'>;
498
505
  get shape(): ElementShape;
499
506
  get color(): Color;
500
- get description(): string | null;
507
+ get description(): RichTextOrEmpty;
501
508
  get technology(): string | null;
502
509
  get links(): ReadonlyArray<Link>;
503
510
  /**
@@ -541,6 +548,7 @@ declare abstract class AbstractDeploymentElementModel<A extends Any> implements
541
548
  abstract incomingModelRelationships(): RelationshipsIterator<A>;
542
549
  get allOutgoing(): RelationshipsAccum<A>;
543
550
  get allIncoming(): RelationshipsAccum<A>;
551
+ hasMetadata(): boolean;
544
552
  getMetadata(): Metadata<A>;
545
553
  getMetadata(field: MetadataKey<A>): string | undefined;
546
554
  /**
@@ -605,7 +613,7 @@ declare class DeployedInstanceModel<A extends Any = Any> extends AbstractDeploym
605
613
  get color(): Color;
606
614
  get tags(): Tags<A>;
607
615
  get kind(): ElementKind<A>;
608
- get description(): string | null;
616
+ get description(): RichTextOrEmpty;
609
617
  get technology(): string | null;
610
618
  get links(): ReadonlyArray<Link>;
611
619
  isInstance(): this is DeployedInstanceModel<A>;
@@ -627,7 +635,7 @@ declare class NestedElementOfDeployedInstanceModel<A extends Any = Any> {
627
635
  get shape(): ElementShape;
628
636
  get color(): Color;
629
637
  get title(): string;
630
- get description(): string | null;
638
+ get description(): RichTextOrEmpty;
631
639
  get technology(): string | null;
632
640
  isDeploymentNode(): this is DeploymentNodeModel<A>;
633
641
  isInstance(): this is DeployedInstanceModel<A>;
@@ -644,7 +652,7 @@ declare class DeploymentRelationModel<A extends Any = Any> implements AnyRelatio
644
652
  get expression(): string;
645
653
  get title(): string | null;
646
654
  get technology(): string | null;
647
- get description(): string | null;
655
+ get description(): RichTextOrEmpty;
648
656
  get tags(): Tags<A>;
649
657
  get kind(): RelationKind<A> | null;
650
658
  get navigateTo(): LikeC4ViewModel<A> | null;
@@ -654,6 +662,7 @@ declare class DeploymentRelationModel<A extends Any = Any> implements AnyRelatio
654
662
  views(): IteratorLike<LikeC4ViewModel.DeploymentView<A>>;
655
663
  isDeploymentRelation(): this is DeploymentRelationModel<A>;
656
664
  isModelRelation(): this is RelationshipModel<A>;
665
+ hasMetadata(): boolean;
657
666
  getMetadata(): Metadata<A>;
658
667
  getMetadata(field: MetadataKey<A>): string | undefined;
659
668
  /**
@@ -916,4 +925,4 @@ declare namespace LikeC4Model {
916
925
  type AnyRelation<M = Unknown> = M extends Any ? RelationshipModel<M> | DeploymentRelationModel<M> : never;
917
926
  }
918
927
 
919
- export { type AnyRelationshipModel as A, type DeploymentElementModel as D, ElementModel as E, type IncomingFilter as I, LikeC4Model as L, NestedElementOfDeployedInstanceModel as N, type OutgoingFilter as O, RelationshipModel as R, type WithMetadata as W, RelationshipsAccum as a, DeploymentNodeModel as b, DeploymentRelationModel as c, DeployedInstanceModel as d, LikeC4ViewModel as e, NodeModel as f, EdgeModel as g, type AnyLikeC4Model as h, type DeploymentRelationEndpoint as i, LikeC4DeploymentModel as j, type DeploymentOrFqn as k, type EdgeOrId as l, type ElementOrFqn as m, type NodeOrId as n, type WithTags as o };
928
+ export { type AnyRelationshipModel as A, DeploymentNodeModel as D, ElementModel as E, type IncomingFilter as I, LikeC4ViewModel as L, NestedElementOfDeployedInstanceModel as N, type OutgoingFilter as O, RelationshipModel as R, type WithMetadata as W, DeployedInstanceModel as a, DeploymentRelationModel as b, NodeModel as c, EdgeModel as d, type DeploymentElementModel as e, type AnyLikeC4Model as f, LikeC4Model as g, type DeploymentRelationEndpoint as h, RelationshipsAccum as i, LikeC4DeploymentModel as j, type DeploymentOrFqn as k, type EdgeOrId as l, type ElementOrFqn as m, type NodeOrId as n, type WithTags as o };
@@ -0,0 +1,34 @@
1
+ import { t } from './core.BH9nN-_I.mjs';
2
+ import { i as invariant } from './core.D4npX2q8.mjs';
3
+
4
+ function ifind(arg1, arg2) {
5
+ const pred = arg2 ?? arg1;
6
+ invariant(t(pred));
7
+ function _find(iter) {
8
+ for (const value of iter) {
9
+ if (pred(value)) {
10
+ return value;
11
+ }
12
+ }
13
+ return;
14
+ }
15
+ if (!arg2) {
16
+ return _find;
17
+ }
18
+ return _find(arg1);
19
+ }
20
+
21
+ function ihead(iterable) {
22
+ if (!iterable) {
23
+ return _head;
24
+ }
25
+ return _head(iterable);
26
+ }
27
+ function _head(iter) {
28
+ for (const value of iter) {
29
+ return value;
30
+ }
31
+ return;
32
+ }
33
+
34
+ export { ihead as a, ifind as i };
@@ -0,0 +1,57 @@
1
+ import { IsAny, UnionToIntersection, Simplify } from 'type-fest';
2
+
3
+ type NonEmptyArray<T> = [T, ...T[]];
4
+ type NonEmptyReadonlyArray<T> = readonly [T, ...T[]];
5
+ type KeysOf<T> = keyof T extends infer K extends string ? K : never;
6
+ type AllNever<Expressions> = UnionToIntersection<{
7
+ [Name in keyof Expressions]: {
8
+ -readonly [Key in keyof Expressions[Name]]?: never;
9
+ };
10
+ }[keyof Expressions]>;
11
+ /**
12
+ * @example
13
+ * ```ts
14
+ * type Variant1 = {
15
+ * a: string
16
+ * }
17
+ * type Variant2 = {
18
+ * b: number
19
+ * }
20
+ *
21
+ * type Variants = ExclusiveUnion<{
22
+ * Variant1: Variant1,
23
+ * Variant2: Variant2
24
+ * }>
25
+ *
26
+ * // Fail here
27
+ * const variant1: Variants = {
28
+ * a: 'one',
29
+ * b: 1
30
+ * }
31
+ * ```
32
+ */
33
+ type ExclusiveUnion<Expressions, All = AllNever<Expressions>> = Expressions extends object ? {
34
+ [Name in keyof Expressions]: Simplify<Omit<All, keyof Expressions[Name]> & Expressions[Name]>;
35
+ }[keyof Expressions] : never;
36
+ /**
37
+ * Copy from https://github.com/remeda/remeda/blob/main/src/internal/types/NTuple.ts
38
+ * An array with *exactly* N elements in it.
39
+ *
40
+ * Only literal N values are supported. For very large N the type might result
41
+ * in a recurse depth error. For negative N the type would result in an infinite
42
+ * recursion. None of these have protections because this is an internal type!
43
+ */
44
+ type NTuple<T, N extends number, Result extends Array<unknown> = []> = Result['length'] extends N ? Result : NTuple<T, N, [...Result, T]>;
45
+ type IteratorLike<T> = IteratorObject<T, BuiltinIteratorReturn>;
46
+ type Predicate<T> = (x: T) => boolean;
47
+ interface Link {
48
+ title?: string;
49
+ url: string;
50
+ relative?: string;
51
+ }
52
+ /**
53
+ * Coalesce `V` to a string if it is `any`
54
+ */
55
+ type Coalesce<V extends string, OrIfAny = string> = IsAny<V> extends true ? OrIfAny : V;
56
+
57
+ export type { Coalesce as C, ExclusiveUnion as E, IteratorLike as I, KeysOf as K, Link as L, NonEmptyArray as N, Predicate as P, NonEmptyReadonlyArray as a, NTuple as b };