@likec4/core 1.47.0 → 1.49.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 (152) hide show
  1. package/LICENSE +1 -1
  2. package/dist/THIRD-PARTY-LICENSES.md +1012 -0
  3. package/dist/_chunks/Builder.view-element.mjs +2 -0
  4. package/dist/_chunks/LikeC4Model.d.mts +1283 -0
  5. package/dist/_chunks/RichText.mjs +1 -0
  6. package/dist/_chunks/_types.d.mts +777 -0
  7. package/dist/_chunks/_types2.d.mts +36 -0
  8. package/dist/_chunks/assignTagColors.mjs +1 -0
  9. package/dist/_chunks/calcDriftsFromSnapshot.mjs +1 -0
  10. package/dist/_chunks/guards.d.mts +2026 -0
  11. package/dist/_chunks/guards.mjs +4 -0
  12. package/dist/_chunks/index.d.mts +288 -0
  13. package/dist/_chunks/libs/@mantine/colors-generator.mjs +15 -0
  14. package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -0
  15. package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -0
  16. package/dist/_chunks/libs/bail.mjs +1 -0
  17. package/dist/_chunks/libs/ccount.mjs +1 -0
  18. package/dist/_chunks/libs/character-entities-html4.mjs +1 -0
  19. package/dist/_chunks/libs/character-entities-legacy.mjs +1 -0
  20. package/dist/_chunks/libs/character-entities.mjs +2 -0
  21. package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -0
  22. package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -0
  23. package/dist/_chunks/libs/defu.mjs +1 -0
  24. package/dist/_chunks/libs/devlop.mjs +1 -0
  25. package/dist/_chunks/libs/escape-string-regexp.mjs +1 -0
  26. package/dist/_chunks/libs/extend.mjs +1 -0
  27. package/dist/_chunks/libs/graphology-dag.mjs +1 -0
  28. package/dist/_chunks/libs/graphology.mjs +1 -0
  29. package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -0
  30. package/dist/_chunks/libs/hast-util-to-html.mjs +9 -0
  31. package/dist/_chunks/libs/is-plain-obj.mjs +1 -0
  32. package/dist/_chunks/libs/longest-streak.mjs +1 -0
  33. package/dist/_chunks/libs/markdown-table.mjs +2 -0
  34. package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -0
  35. package/dist/_chunks/libs/mdast-util-from-markdown.mjs +3 -0
  36. package/dist/_chunks/libs/mdast-util-gfm.mjs +15 -0
  37. package/dist/_chunks/libs/mdast-util-to-hast.mjs +11 -0
  38. package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -0
  39. package/dist/_chunks/libs/mnemonist.d.mts +164 -0
  40. package/dist/_chunks/libs/mnemonist.mjs +1 -0
  41. package/dist/_chunks/libs/natural-compare-lite.mjs +9 -0
  42. package/dist/_chunks/libs/ohash.mjs +1 -0
  43. package/dist/_chunks/libs/rehype-sanitize.mjs +1 -0
  44. package/dist/_chunks/libs/rehype-stringify.mjs +1 -0
  45. package/dist/_chunks/libs/remark-gfm.mjs +1 -0
  46. package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +3 -0
  47. package/dist/_chunks/libs/remark-parse.mjs +1 -0
  48. package/dist/_chunks/libs/remark-rehype.mjs +1 -0
  49. package/dist/_chunks/libs/remeda.mjs +1 -0
  50. package/dist/_chunks/libs/trough.mjs +1 -0
  51. package/dist/_chunks/libs/unified.mjs +1 -0
  52. package/dist/_chunks/rolldown-runtime.mjs +1 -0
  53. package/dist/_chunks/theme.d.mts +148 -0
  54. package/dist/_chunks/to-text.d.mts +404 -0
  55. package/dist/_chunks/to-text.mjs +1 -0
  56. package/dist/_chunks/vector.d.mts +198 -0
  57. package/dist/_chunks/vector.mjs +1 -0
  58. package/dist/builder/index.d.mts +5 -775
  59. package/dist/builder/index.mjs +1 -1053
  60. package/dist/compute-view/index.d.mts +156 -56
  61. package/dist/compute-view/index.mjs +2 -229
  62. package/dist/geometry/index.d.mts +2 -109
  63. package/dist/geometry/index.mjs +1 -328
  64. package/dist/index.d.mts +14 -20
  65. package/dist/index.mjs +1 -18
  66. package/dist/model/index.d.mts +5 -57
  67. package/dist/model/index.mjs +1 -4
  68. package/dist/styles/index.d.mts +3 -117
  69. package/dist/styles/index.mjs +1 -63
  70. package/dist/types/index.d.mts +3 -47
  71. package/dist/types/index.mjs +1 -17
  72. package/dist/utils/graphology/index.d.mts +2 -1864
  73. package/dist/utils/graphology/index.mjs +1 -1
  74. package/dist/utils/index.d.mts +4 -124
  75. package/dist/utils/index.mjs +1 -44
  76. package/package.json +20 -24
  77. package/compute-view/relationships/package.json +0 -4
  78. package/dist/compute-view/relationships-view/index.d.mts +0 -51
  79. package/dist/compute-view/relationships-view/index.mjs +0 -185
  80. package/dist/model/connection/deployment/index.d.mts +0 -15
  81. package/dist/model/connection/deployment/index.mjs +0 -2
  82. package/dist/model/connection/index.d.mts +0 -75
  83. package/dist/model/connection/index.mjs +0 -3
  84. package/dist/model/connection/model/index.d.mts +0 -15
  85. package/dist/model/connection/model/index.mjs +0 -2
  86. package/dist/shared/core.3ZhnKAlZ.mjs +0 -106
  87. package/dist/shared/core.78IWAHAE.mjs +0 -332
  88. package/dist/shared/core.B85MJLTf.mjs +0 -5
  89. package/dist/shared/core.BFd1lU9R.mjs +0 -29
  90. package/dist/shared/core.BKlholso.mjs +0 -3
  91. package/dist/shared/core.BNN-3vPH.mjs +0 -1255
  92. package/dist/shared/core.BPGOjone.d.mts +0 -46
  93. package/dist/shared/core.BP_QHEXs.mjs +0 -785
  94. package/dist/shared/core.BbE4y-yl.mjs +0 -177
  95. package/dist/shared/core.Bdy3hhTc.mjs +0 -28382
  96. package/dist/shared/core.BfCKSW-g.d.mts +0 -1266
  97. package/dist/shared/core.BhNcrwzK.mjs +0 -7
  98. package/dist/shared/core.BkVA6gjl.mjs +0 -5
  99. package/dist/shared/core.BoYfZOBm.mjs +0 -3
  100. package/dist/shared/core.BsSXS-_R.mjs +0 -7
  101. package/dist/shared/core.C3JowhaZ.mjs +0 -32
  102. package/dist/shared/core.C4x8aaWa.mjs +0 -27
  103. package/dist/shared/core.CAgYpDtM.d.mts +0 -98
  104. package/dist/shared/core.CHf8VEa3.mjs +0 -1206
  105. package/dist/shared/core.CLSZtnFh.mjs +0 -69
  106. package/dist/shared/core.C_3y3eqV.d.mts +0 -139
  107. package/dist/shared/core.CbT8JVYL.mjs +0 -5
  108. package/dist/shared/core.CdNCAwq7.mjs +0 -176
  109. package/dist/shared/core.CmGY9blO.mjs +0 -6717
  110. package/dist/shared/core.CmPXpJ8l.mjs +0 -21
  111. package/dist/shared/core.Coi_LOUZ.mjs +0 -7
  112. package/dist/shared/core.CqAJJpK_.mjs +0 -3
  113. package/dist/shared/core.CywrQs86.d.mts +0 -31
  114. package/dist/shared/core.D00YbOhQ.d.mts +0 -300
  115. package/dist/shared/core.D0WZutNd.mjs +0 -94
  116. package/dist/shared/core.D4npX2q8.mjs +0 -18
  117. package/dist/shared/core.DB0Ue5Wx.d.mts +0 -70
  118. package/dist/shared/core.DC5IAaDT.d.mts +0 -334
  119. package/dist/shared/core.DE9qzhn8.d.mts +0 -83
  120. package/dist/shared/core.DGcIbsj4.mjs +0 -3946
  121. package/dist/shared/core.DH7TXqXf.mjs +0 -136
  122. package/dist/shared/core.DKhRkHRN.d.mts +0 -41
  123. package/dist/shared/core.DRJma0Ol.mjs +0 -22
  124. package/dist/shared/core.DU5SRqNF.mjs +0 -2209
  125. package/dist/shared/core.DXhDWKFZ.d.mts +0 -3
  126. package/dist/shared/core.DbfO90vF.mjs +0 -434
  127. package/dist/shared/core.DcS-0zys.mjs +0 -10
  128. package/dist/shared/core.Dh119QSP.mjs +0 -4995
  129. package/dist/shared/core.DjcWextK.mjs +0 -1371
  130. package/dist/shared/core.Dojz4bvg.d.mts +0 -504
  131. package/dist/shared/core.FZ305VYd.mjs +0 -21
  132. package/dist/shared/core.OtRNdMxy.d.mts +0 -352
  133. package/dist/shared/core.RfnaEmgA.mjs +0 -7
  134. package/dist/shared/core.btEq3i3f.mjs +0 -300
  135. package/dist/shared/core.oSV6SRfk.mjs +0 -13
  136. package/dist/shared/core.om36dXXW.mjs +0 -41
  137. package/dist/shared/core.osFs8tU7.d.mts +0 -466
  138. package/dist/shared/core.q10OP9oJ.mjs +0 -5
  139. package/dist/shared/core.tpvDGvdC.d.mts +0 -87
  140. package/dist/shared/core.uFk_o9X6.mjs +0 -13
  141. package/dist/types/_aux.d.mts +0 -4
  142. package/dist/types/_aux.mjs +0 -8
  143. package/dist/types/expression-model.d.mts +0 -190
  144. package/dist/types/expression-model.mjs +0 -109
  145. package/dist/types/expression.d.mts +0 -6
  146. package/dist/types/expression.mjs +0 -113
  147. package/dist/types/fqnRef.d.mts +0 -60
  148. package/dist/types/fqnRef.mjs +0 -45
  149. package/dist/types/scalar.d.mts +0 -2
  150. package/dist/types/scalar.mjs +0 -4
  151. package/dist/utils/iterable/index.d.mts +0 -132
  152. package/dist/utils/iterable/index.mjs +0 -62
@@ -1,190 +0,0 @@
1
- import { W as WhereOperator, C as Color, f as RelationshipLineType, g as RelationshipArrowType, P as PredicateSelector, h as ElementShape, B as BorderStyle, e as ShapeSize } from '../shared/core.DC5IAaDT.mjs';
2
- import { A as Any, S as StrictViewId, E as ElementKind, T as Tag } from '../shared/core.D00YbOhQ.mjs';
3
- import { E as ExclusiveUnion } from '../shared/core.DB0Ue5Wx.mjs';
4
- import { FqnRef } from './fqnRef.mjs';
5
- import { M as MarkdownOrString, I as Icon } from '../shared/core.C_3y3eqV.mjs';
6
- import 'type-fest';
7
-
8
- type AnyAux = Any;
9
- declare namespace ModelFqnExpr {
10
- type Wildcard = {
11
- wildcard: true;
12
- };
13
- function isWildcard<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Wildcard;
14
- interface Ref<M extends AnyAux> {
15
- ref: FqnRef.ModelRef<M>;
16
- selector?: PredicateSelector;
17
- }
18
- function isModelRef<A extends AnyAux>(ref: ModelExpression<A>): ref is ModelFqnExpr.Ref<A>;
19
- interface ElementKindExpr<A extends AnyAux = AnyAux> {
20
- elementKind: ElementKind<A>;
21
- isEqual: boolean;
22
- }
23
- function isElementKindExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ElementKindExpr<A>;
24
- interface ElementTagExpr<A extends AnyAux> {
25
- elementTag: Tag<A>;
26
- isEqual: boolean;
27
- }
28
- function isElementTagExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ElementTagExpr<A>;
29
- type NonWildcard<A extends AnyAux = AnyAux> = ExclusiveUnion<{
30
- Ref: Ref<A>;
31
- ElementKind: ElementKindExpr<A>;
32
- ElementTag: ElementTagExpr<A>;
33
- }>;
34
- interface Where<A extends AnyAux = AnyAux> {
35
- where: {
36
- expr: ExclusiveUnion<{
37
- Wildcard: Wildcard;
38
- Ref: Ref<A>;
39
- ElementKind: ElementKindExpr<A>;
40
- ElementTag: ElementTagExpr<A>;
41
- }>;
42
- condition: WhereOperator<A>;
43
- };
44
- }
45
- function isWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Where<A>;
46
- interface Custom<A extends AnyAux = AnyAux> {
47
- custom: {
48
- expr: OrWhere<A>;
49
- title?: string;
50
- description?: MarkdownOrString;
51
- technology?: string;
52
- notation?: string;
53
- shape?: ElementShape;
54
- color?: Color;
55
- icon?: Icon;
56
- border?: BorderStyle;
57
- opacity?: number;
58
- navigateTo?: StrictViewId<A>;
59
- multiple?: boolean;
60
- size?: ShapeSize;
61
- padding?: ShapeSize;
62
- textSize?: ShapeSize;
63
- };
64
- }
65
- function isCustom<A extends AnyAux>(expr: ModelExpression<A>): expr is Custom<A>;
66
- function is<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr<A>;
67
- type OrWhere<A extends AnyAux = AnyAux> = ExclusiveUnion<{
68
- Wildcard: ModelFqnExpr.Wildcard;
69
- Ref: ModelFqnExpr.Ref<A>;
70
- ElementKind: ElementKindExpr<A>;
71
- ElementTag: ElementTagExpr<A>;
72
- Where: ModelFqnExpr.Where<A>;
73
- }>;
74
- type Any<A extends AnyAux = AnyAux> = ExclusiveUnion<{
75
- Wildcard: Wildcard;
76
- Ref: Ref<A>;
77
- ElementKind: ElementKindExpr<A>;
78
- ElementTag: ElementTagExpr<A>;
79
- Where: Where<A>;
80
- Custom: Custom<A>;
81
- }>;
82
- function unwrap<A extends AnyAux>(expr: ModelFqnExpr.Any<A>): Wildcard | Ref<A> | ElementKindExpr<A> | ElementTagExpr<A>;
83
- }
84
- type ModelFqnExpr<A extends AnyAux = AnyAux> = ExclusiveUnion<{
85
- Wildcard: ModelFqnExpr.Wildcard;
86
- Ref: ModelFqnExpr.Ref<A>;
87
- ElementKind: ModelFqnExpr.ElementKindExpr<A>;
88
- ElementTag: ModelFqnExpr.ElementTagExpr<A>;
89
- }>;
90
- declare namespace ModelRelationExpr {
91
- type Endpoint<A extends AnyAux = AnyAux> = ModelFqnExpr.Where<A>['where']['expr'];
92
- interface Direct<A extends AnyAux = AnyAux> {
93
- source: Endpoint<A>;
94
- target: Endpoint<A>;
95
- isBidirectional?: boolean;
96
- }
97
- function isDirect<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Direct<A>;
98
- interface Incoming<A extends AnyAux = AnyAux> {
99
- incoming: Endpoint<A>;
100
- }
101
- function isIncoming<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Incoming<A>;
102
- interface Outgoing<A extends AnyAux = AnyAux> {
103
- outgoing: Endpoint<A>;
104
- }
105
- function isOutgoing<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Outgoing<A>;
106
- interface InOut<A extends AnyAux = AnyAux> {
107
- inout: Endpoint<A>;
108
- }
109
- function isInOut<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.InOut<A>;
110
- interface Where<A extends AnyAux = AnyAux> {
111
- where: {
112
- expr: ExclusiveUnion<{
113
- Direct: ModelRelationExpr.Direct<A>;
114
- Incoming: ModelRelationExpr.Incoming<A>;
115
- Outgoing: ModelRelationExpr.Outgoing<A>;
116
- InOut: ModelRelationExpr.InOut<A>;
117
- }>;
118
- condition: WhereOperator<A>;
119
- };
120
- }
121
- function isWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Where<A>;
122
- interface Custom<A extends AnyAux = AnyAux> {
123
- customRelation: {
124
- expr: OrWhere<A>;
125
- title?: string;
126
- description?: string;
127
- technology?: string;
128
- notation?: string;
129
- navigateTo?: StrictViewId<A>;
130
- notes?: string;
131
- color?: Color;
132
- line?: RelationshipLineType;
133
- head?: RelationshipArrowType;
134
- tail?: RelationshipArrowType;
135
- };
136
- }
137
- function isCustom<A extends AnyAux>(expr: ModelExpression<A>): expr is Custom<A>;
138
- function is<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr<A>;
139
- type OrWhere<A extends AnyAux = AnyAux> = ExclusiveUnion<{
140
- Direct: Direct<A>;
141
- Incoming: Incoming<A>;
142
- Outgoing: Outgoing<A>;
143
- InOut: InOut<A>;
144
- Where: Where<A>;
145
- }>;
146
- type Any<A extends AnyAux = AnyAux> = ExclusiveUnion<{
147
- Direct: Direct<A>;
148
- Incoming: Incoming<A>;
149
- Outgoing: Outgoing<A>;
150
- InOut: InOut<A>;
151
- Where: Where<A>;
152
- Custom: Custom<A>;
153
- }>;
154
- function unwrap<A extends AnyAux>(expr: ModelRelationExpr.Any<A>): Direct<A> | Incoming<A> | Outgoing<A> | InOut<A>;
155
- }
156
- type ModelRelationExpr<A extends AnyAux = AnyAux> = ExclusiveUnion<{
157
- Direct: ModelRelationExpr.Direct<A>;
158
- Incoming: ModelRelationExpr.Incoming<A>;
159
- Outgoing: ModelRelationExpr.Outgoing<A>;
160
- InOut: ModelRelationExpr.InOut<A>;
161
- }>;
162
- /**
163
- * Represents a version 2 expression which can be one of several types.
164
- *
165
- * @template D - The type for the deployment FQN, defaults to `Fqn`.
166
- * @template M - The type for the model FQN, defaults to `Fqn`.
167
- */
168
- type ModelExpression<A extends AnyAux = AnyAux> = ExclusiveUnion<{
169
- Wildcard: ModelFqnExpr.Wildcard;
170
- Ref: ModelFqnExpr.Ref<A>;
171
- ElementKind: ModelFqnExpr.ElementKindExpr<A>;
172
- ElementTag: ModelFqnExpr.ElementTagExpr<A>;
173
- Custom: ModelFqnExpr.Custom<A>;
174
- Direct: ModelRelationExpr.Direct<A>;
175
- Incoming: ModelRelationExpr.Incoming<A>;
176
- Outgoing: ModelRelationExpr.Outgoing<A>;
177
- InOut: ModelRelationExpr.InOut<A>;
178
- Where: ModelExpression.Where<A>;
179
- CustomRelation: ModelRelationExpr.Custom<A>;
180
- }>;
181
- declare namespace ModelExpression {
182
- type Where<A extends AnyAux = AnyAux> = ModelFqnExpr.Where<A> | ModelRelationExpr.Where<A>;
183
- function isWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelExpression.Where<A>;
184
- function isRelationWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Where<A>;
185
- function isFqnExprWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Where<A>;
186
- function isFqnExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Any<A>;
187
- function isRelationExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Any<A>;
188
- }
189
-
190
- export { ModelExpression, ModelFqnExpr, ModelRelationExpr };
@@ -1,109 +0,0 @@
1
- import { FqnRef } from './fqnRef.mjs';
2
-
3
- var ModelFqnExpr;
4
- ((ModelFqnExpr2) => {
5
- function isWildcard(expr) {
6
- return "wildcard" in expr && expr.wildcard === true;
7
- }
8
- ModelFqnExpr2.isWildcard = isWildcard;
9
- function isModelRef(ref) {
10
- return "ref" in ref && FqnRef.isModelRef(ref.ref);
11
- }
12
- ModelFqnExpr2.isModelRef = isModelRef;
13
- function isElementKindExpr(expr) {
14
- return "elementKind" in expr && "isEqual" in expr;
15
- }
16
- ModelFqnExpr2.isElementKindExpr = isElementKindExpr;
17
- function isElementTagExpr(expr) {
18
- return "elementTag" in expr && "isEqual" in expr;
19
- }
20
- ModelFqnExpr2.isElementTagExpr = isElementTagExpr;
21
- function isWhere(expr) {
22
- return "where" in expr && is(expr.where.expr);
23
- }
24
- ModelFqnExpr2.isWhere = isWhere;
25
- function isCustom(expr) {
26
- return "custom" in expr && (is(expr.custom.expr) || isWhere(expr.custom.expr));
27
- }
28
- ModelFqnExpr2.isCustom = isCustom;
29
- function is(expr) {
30
- return isWildcard(expr) || isModelRef(expr) || isElementKindExpr(expr) || isElementTagExpr(expr);
31
- }
32
- ModelFqnExpr2.is = is;
33
- function unwrap(expr) {
34
- if (isCustom(expr)) {
35
- expr = expr.custom.expr;
36
- }
37
- if (isWhere(expr)) {
38
- expr = expr.where.expr;
39
- }
40
- return expr;
41
- }
42
- ModelFqnExpr2.unwrap = unwrap;
43
- })(ModelFqnExpr || (ModelFqnExpr = {}));
44
- var ModelRelationExpr;
45
- ((ModelRelationExpr2) => {
46
- function isDirect(expr) {
47
- return "source" in expr && "target" in expr;
48
- }
49
- ModelRelationExpr2.isDirect = isDirect;
50
- function isIncoming(expr) {
51
- return "incoming" in expr;
52
- }
53
- ModelRelationExpr2.isIncoming = isIncoming;
54
- function isOutgoing(expr) {
55
- return "outgoing" in expr;
56
- }
57
- ModelRelationExpr2.isOutgoing = isOutgoing;
58
- function isInOut(expr) {
59
- return "inout" in expr;
60
- }
61
- ModelRelationExpr2.isInOut = isInOut;
62
- function isWhere(expr) {
63
- return "where" in expr && (isDirect(expr.where.expr) || isIncoming(expr.where.expr) || isOutgoing(expr.where.expr) || isInOut(expr.where.expr));
64
- }
65
- ModelRelationExpr2.isWhere = isWhere;
66
- function isCustom(expr) {
67
- return "customRelation" in expr;
68
- }
69
- ModelRelationExpr2.isCustom = isCustom;
70
- function is(expr) {
71
- return isDirect(expr) || isIncoming(expr) || isOutgoing(expr) || isInOut(expr);
72
- }
73
- ModelRelationExpr2.is = is;
74
- function unwrap(expr) {
75
- if (isCustom(expr)) {
76
- expr = expr.customRelation.expr;
77
- }
78
- if (isWhere(expr)) {
79
- expr = expr.where.expr;
80
- }
81
- return expr;
82
- }
83
- ModelRelationExpr2.unwrap = unwrap;
84
- })(ModelRelationExpr || (ModelRelationExpr = {}));
85
- var ModelExpression;
86
- ((ModelExpression2) => {
87
- function isWhere(expr) {
88
- return "where" in expr;
89
- }
90
- ModelExpression2.isWhere = isWhere;
91
- function isRelationWhere(expr) {
92
- return ModelRelationExpr.isWhere(expr);
93
- }
94
- ModelExpression2.isRelationWhere = isRelationWhere;
95
- function isFqnExprWhere(expr) {
96
- return ModelFqnExpr.isWhere(expr);
97
- }
98
- ModelExpression2.isFqnExprWhere = isFqnExprWhere;
99
- function isFqnExpr(expr) {
100
- return ModelFqnExpr.is(expr) || ModelFqnExpr.isWhere(expr) || ModelFqnExpr.isCustom(expr);
101
- }
102
- ModelExpression2.isFqnExpr = isFqnExpr;
103
- function isRelationExpr(expr) {
104
- return ModelRelationExpr.is(expr) || ModelRelationExpr.isWhere(expr) || ModelRelationExpr.isCustom(expr);
105
- }
106
- ModelExpression2.isRelationExpr = isRelationExpr;
107
- })(ModelExpression || (ModelExpression = {}));
108
-
109
- export { ModelExpression, ModelFqnExpr, ModelRelationExpr };
@@ -1,6 +0,0 @@
1
- export { j as Expression, F as FqnExpr, P as PredicateSelector, i as RelationExpr } from '../shared/core.DC5IAaDT.mjs';
2
- import '../shared/core.D00YbOhQ.mjs';
3
- import '../shared/core.DB0Ue5Wx.mjs';
4
- import './fqnRef.mjs';
5
- import '../shared/core.C_3y3eqV.mjs';
6
- import 'type-fest';
@@ -1,113 +0,0 @@
1
- import { FqnRef } from './fqnRef.mjs';
2
-
3
- var FqnExpr;
4
- ((FqnExpr2) => {
5
- function isWildcard(expr) {
6
- return "wildcard" in expr && expr.wildcard === true;
7
- }
8
- FqnExpr2.isWildcard = isWildcard;
9
- function isModelRef(ref) {
10
- return "ref" in ref && FqnRef.isModelRef(ref.ref);
11
- }
12
- FqnExpr2.isModelRef = isModelRef;
13
- function isDeploymentRef(expr) {
14
- return "ref" in expr && FqnRef.isDeploymentRef(expr.ref);
15
- }
16
- FqnExpr2.isDeploymentRef = isDeploymentRef;
17
- function isElementKindExpr(expr) {
18
- return "elementKind" in expr && "isEqual" in expr;
19
- }
20
- FqnExpr2.isElementKindExpr = isElementKindExpr;
21
- function isElementTagExpr(expr) {
22
- return "elementTag" in expr && "isEqual" in expr;
23
- }
24
- FqnExpr2.isElementTagExpr = isElementTagExpr;
25
- function isWhere(expr) {
26
- return "where" in expr && is(expr.where.expr);
27
- }
28
- FqnExpr2.isWhere = isWhere;
29
- function isCustom(expr) {
30
- return "custom" in expr && (is(expr.custom.expr) || isWhere(expr.custom.expr));
31
- }
32
- FqnExpr2.isCustom = isCustom;
33
- function is(expr) {
34
- return isWildcard(expr) || isModelRef(expr) || isDeploymentRef(expr) || isElementKindExpr(expr) || isElementTagExpr(expr);
35
- }
36
- FqnExpr2.is = is;
37
- function unwrap(expr) {
38
- if (isCustom(expr)) {
39
- expr = expr.custom.expr;
40
- }
41
- if (isWhere(expr)) {
42
- expr = expr.where.expr;
43
- }
44
- return expr;
45
- }
46
- FqnExpr2.unwrap = unwrap;
47
- })(FqnExpr || (FqnExpr = {}));
48
- var RelationExpr;
49
- ((RelationExpr2) => {
50
- function isDirect(expr) {
51
- return "source" in expr && "target" in expr;
52
- }
53
- RelationExpr2.isDirect = isDirect;
54
- function isIncoming(expr) {
55
- return "incoming" in expr;
56
- }
57
- RelationExpr2.isIncoming = isIncoming;
58
- function isOutgoing(expr) {
59
- return "outgoing" in expr;
60
- }
61
- RelationExpr2.isOutgoing = isOutgoing;
62
- function isInOut(expr) {
63
- return "inout" in expr;
64
- }
65
- RelationExpr2.isInOut = isInOut;
66
- function isWhere(expr) {
67
- return "where" in expr && (isDirect(expr.where.expr) || isIncoming(expr.where.expr) || isOutgoing(expr.where.expr) || isInOut(expr.where.expr));
68
- }
69
- RelationExpr2.isWhere = isWhere;
70
- function isCustom(expr) {
71
- return "customRelation" in expr;
72
- }
73
- RelationExpr2.isCustom = isCustom;
74
- function is(expr) {
75
- return isDirect(expr) || isIncoming(expr) || isOutgoing(expr) || isInOut(expr);
76
- }
77
- RelationExpr2.is = is;
78
- function unwrap(expr) {
79
- if (isCustom(expr)) {
80
- expr = expr.customRelation.expr;
81
- }
82
- if (isWhere(expr)) {
83
- expr = expr.where.expr;
84
- }
85
- return expr;
86
- }
87
- RelationExpr2.unwrap = unwrap;
88
- })(RelationExpr || (RelationExpr = {}));
89
- var Expression;
90
- ((Expression2) => {
91
- function isWhere(expr) {
92
- return "where" in expr;
93
- }
94
- Expression2.isWhere = isWhere;
95
- function isRelationWhere(expr) {
96
- return RelationExpr.isWhere(expr);
97
- }
98
- Expression2.isRelationWhere = isRelationWhere;
99
- function isFqnExprWhere(expr) {
100
- return FqnExpr.isWhere(expr);
101
- }
102
- Expression2.isFqnExprWhere = isFqnExprWhere;
103
- function isFqnExpr(expr) {
104
- return FqnExpr.is(expr) || FqnExpr.isWhere(expr) || FqnExpr.isCustom(expr);
105
- }
106
- Expression2.isFqnExpr = isFqnExpr;
107
- function isRelation(expr) {
108
- return RelationExpr.is(expr) || RelationExpr.isWhere(expr) || RelationExpr.isCustom(expr);
109
- }
110
- Expression2.isRelation = isRelation;
111
- })(Expression || (Expression = {}));
112
-
113
- export { Expression, FqnExpr, RelationExpr };
@@ -1,60 +0,0 @@
1
- import { A as Any, a as ElementId, P as ProjectId, F as Fqn, D as DeploymentId } from '../shared/core.D00YbOhQ.mjs';
2
- import { E as ExclusiveUnion } from '../shared/core.DB0Ue5Wx.mjs';
3
- import 'type-fest';
4
- import '../shared/core.C_3y3eqV.mjs';
5
-
6
- type AnyAux = Any;
7
- declare namespace FqnRef {
8
- /**
9
- * Reference to logical model element
10
- */
11
- interface ElementRef<A extends AnyAux = AnyAux> {
12
- project?: never;
13
- model: ElementId<A>;
14
- }
15
- function isElementRef<A extends AnyAux>(ref: FqnRef<A>): ref is ElementRef<A>;
16
- /**
17
- * Reference to imported logical model element
18
- */
19
- interface ImportRef<A extends AnyAux = AnyAux> {
20
- project: ProjectId<A>;
21
- model: ElementId<A>;
22
- }
23
- function isImportRef<A extends AnyAux>(ref: FqnRef<A>): ref is ImportRef<A>;
24
- function flatten<A extends AnyAux>(ref: FqnRef<A>): Fqn<A>;
25
- type ModelRef<A extends AnyAux = AnyAux> = ImportRef<A> | ElementRef<A>;
26
- function isModelRef<A extends AnyAux>(ref: FqnRef<A>): ref is ModelRef<A>;
27
- /**
28
- * Represents a reference to an instance within a deployment.
29
- *
30
- * @template D - The type representing the deployment fqn. Defaults to `Fqn`.
31
- * @template M - The type representing the model fqn. Defaults to `Fqn`.
32
- *
33
- * @property {D} deployment - TThe fully qualified name (FQN) of the deployed instance.
34
- * @property {M} element - The element reference within the deployment.
35
- */
36
- interface InsideInstanceRef<A extends AnyAux = AnyAux> {
37
- deployment: DeploymentId<A>;
38
- element: ElementId<A>;
39
- }
40
- function isInsideInstanceRef<A extends AnyAux>(ref: FqnRef<A>): ref is InsideInstanceRef<A>;
41
- /**
42
- * Represents a reference to a deployment element.
43
- *
44
- * @template F - The type of the fully qualified name (FQN) of the deployment element. Defaults to `Fqn`.
45
- * @property {F} deployment - The fully qualified name (FQN) of the deployment element.
46
- */
47
- interface DeploymentElementRef<A extends AnyAux> {
48
- deployment: DeploymentId<A>;
49
- element?: never;
50
- }
51
- function isDeploymentElementRef<A extends AnyAux>(ref: FqnRef<A>): ref is DeploymentElementRef<A>;
52
- type DeploymentRef<A extends AnyAux> = DeploymentElementRef<A> | InsideInstanceRef<A>;
53
- function isDeploymentRef<A extends AnyAux>(ref: FqnRef<A>): ref is DeploymentRef<A>;
54
- }
55
- type FqnRef<A extends AnyAux = AnyAux> = ExclusiveUnion<{
56
- DeploymentRef: FqnRef.DeploymentRef<A>;
57
- ModelRef: FqnRef.ModelRef<A>;
58
- }>;
59
-
60
- export { FqnRef };
@@ -1,45 +0,0 @@
1
- import { e } from '../shared/core.CqAJJpK_.mjs';
2
- import { a as GlobalFqn } from '../shared/core.D0WZutNd.mjs';
3
-
4
- var FqnRef;
5
- ((FqnRef2) => {
6
- function isElementRef(ref) {
7
- return "model" in ref && !("project" in ref);
8
- }
9
- FqnRef2.isElementRef = isElementRef;
10
- function isImportRef(ref) {
11
- return "project" in ref && "model" in ref;
12
- }
13
- FqnRef2.isImportRef = isImportRef;
14
- function flatten(ref) {
15
- if (e(ref)) {
16
- throw new Error(`Expected FqnRef, got: "${ref}"`);
17
- }
18
- if (isImportRef(ref)) {
19
- return GlobalFqn(ref.project, ref.model);
20
- }
21
- if (isElementRef(ref)) {
22
- return ref.model;
23
- }
24
- throw new Error("Expected FqnRef.ModelRef or FqnRef.ImportRef");
25
- }
26
- FqnRef2.flatten = flatten;
27
- function isModelRef(ref) {
28
- return isElementRef(ref) || isImportRef(ref);
29
- }
30
- FqnRef2.isModelRef = isModelRef;
31
- function isInsideInstanceRef(ref) {
32
- return "deployment" in ref && "element" in ref;
33
- }
34
- FqnRef2.isInsideInstanceRef = isInsideInstanceRef;
35
- function isDeploymentElementRef(ref) {
36
- return "deployment" in ref && !("element" in ref);
37
- }
38
- FqnRef2.isDeploymentElementRef = isDeploymentElementRef;
39
- function isDeploymentRef(ref) {
40
- return isDeploymentElementRef(ref) || isInsideInstanceRef(ref);
41
- }
42
- FqnRef2.isDeploymentRef = isDeploymentRef;
43
- })(FqnRef || (FqnRef = {}));
44
-
45
- export { FqnRef };
@@ -1,2 +0,0 @@
1
- import 'type-fest';
2
- export { A as AnyFqn, B as BuiltInIcon, D as DeploymentFqn, b as DeploymentKind, k as EdgeId, E as ElementKind, F as Fqn, e as GlobalFqn, G as GroupElementKind, I as Icon, a as IconUrl, M as MarkdownOrString, j as NodeId, N as NoneIcon, P as ProjectId, d as RelationId, R as RelationKind, c as RelationshipKind, l as StepEdgeId, S as StepEdgeIdLiteral, n as StepEdgeKind, T as Tag, V as ViewId, p as extractStep, f as flattenMarkdownOrString, g as isGlobalFqn, i as isGroupElementKind, o as isStepEdgeId, h as splitGlobalFqn, m as stepEdgeId } from '../shared/core.C_3y3eqV.mjs';
@@ -1,4 +0,0 @@
1
- import '../shared/core.CqAJJpK_.mjs';
2
- import '../shared/core.BKlholso.mjs';
3
- import '../shared/core.D4npX2q8.mjs';
4
- export { D as DeploymentFqn, E as EdgeId, F as Fqn, a as GlobalFqn, G as GroupElementKind, d as NodeId, N as NoneIcon, P as ProjectId, R as RelationId, S as StepEdgeKind, V as ViewId, h as extractStep, f as flattenMarkdownOrString, b as isGlobalFqn, i as isGroupElementKind, g as isStepEdgeId, c as splitGlobalFqn, e as stepEdgeId } from '../shared/core.D0WZutNd.mjs';
@@ -1,132 +0,0 @@
1
- export { i as isIterable } from '../../shared/core.DXhDWKFZ.mjs';
2
- import { c as IteratorLike } from '../../shared/core.DB0Ue5Wx.mjs';
3
- import 'type-fest';
4
-
5
- /**
6
- * Filters an iterable based on a predicate.
7
- * Composabel first version of `ifilter`.
8
- * @signature
9
- * ifilter(predicate)(data)
10
- */
11
- declare function ifilter<T, S extends T>(predicate: (v: T) => v is S): (iterable: Iterable<T>) => IteratorLike<S>;
12
- declare function ifilter<T>(predicate: (v: T) => boolean): (iterable: Iterable<T>) => IteratorLike<T>;
13
- /**
14
- * Filters an iterable based on a predicate.
15
- * Data first version of `ifilter`.
16
- * @signature
17
- * ifilter(data, predicate)
18
- * @example
19
- * ifilter(new Set([1, 2, 3]), x => x % 2 === 1) // => Iterable<[1, 3]>
20
- */
21
- declare function ifilter<T, S extends T>(iterable: Iterable<T>, predicate: (v: T) => v is S): IteratorLike<S>;
22
- declare function ifilter<T>(iterable: Iterable<T>, predicate: (v: T) => boolean): IteratorLike<T>;
23
-
24
- /**
25
- * Finds the first element in the iterable that satisfies the predicate.
26
- * Composable first version of `find`.
27
- * @signature
28
- * ifind(predicate)(data)
29
- */
30
- declare function ifind<T, S extends T>(predicate: (item: T) => item is S): (iterable: Iterable<T>) => S | undefined;
31
- declare function ifind<T>(predicate: (item: T) => boolean): (iterable: Iterable<T>) => T | undefined;
32
- /**
33
- * Finds the first element in the iterable that satisfies the predicate.
34
- * Data first version of `find`.
35
- * @signature
36
- * ifind(data, predicate)
37
- */
38
- declare function ifind<T, S extends T>(iterable: Iterable<T>, predicate: (item: T) => item is S): S | undefined;
39
- declare function ifind<T>(iterable: Iterable<T>, predicate: (item: T) => boolean): T | undefined;
40
-
41
- /**
42
- * Takes the first N elements from an iterable.
43
- * Composable first version of `ifirst`.
44
- * @signature
45
- * ifirst(count)(data)
46
- */
47
- declare function ifirst<T>(count: number): (iterable: Iterable<T>) => IteratorLike<T>;
48
- /**
49
- * Takes the first N elements from an iterable.
50
- * Data first version of `ifirst`.
51
- * @signature
52
- * ifirst(data, count)
53
- * @example
54
- * ifirst([1, 2, 3, 4, 5], 3) // => Iterable<[1, 2, 3]>
55
- */
56
- declare function ifirst<T>(iterable: Iterable<T>, count: number): IteratorLike<T>;
57
-
58
- declare function iflat(): <T>(iterable: Iterable<IteratorLike<T>>) => IteratorLike<T>;
59
- declare function iflat<T>(iterable: Iterable<IteratorLike<T>>): IteratorLike<T>;
60
-
61
- type FlatMapFunction<T, S> = (item: T) => Iterable<S>;
62
- /**
63
- * Maps an iterable using a mapper function and flattens the result by one level.
64
- * Composable first version of `iflatMap`.
65
- * @signature
66
- * iflatMap(mapper)(data)
67
- */
68
- declare function iflatMap<T, S>(mapper: FlatMapFunction<T, S>): (iterable: Iterable<T>) => IteratorLike<S>;
69
- /**
70
- * Maps an iterable using a mapper function and flattens the result by one level.
71
- * Data first version of `iflatMap`.
72
- * @signature
73
- * iflatMap(data, mapper)
74
- */
75
- declare function iflatMap<T, S>(iterable: Iterable<T>, mapper: FlatMapFunction<T, S>): IteratorLike<S>;
76
-
77
- declare function ihead<T>(): (iterable: Iterable<T>) => T | undefined;
78
- /**
79
- * Finds the first element in the iterable that satisfies the predicate.
80
- * Data first version of `find`.
81
- * @signature
82
- * ifind(data, predicate)
83
- */
84
- declare function ihead<T>(iterable: Iterable<T>): T | undefined;
85
-
86
- type MapFunction<T, S> = (item: T) => S;
87
- /**
88
- * Maps an iterable using a mapper function.
89
- * Composable first version of `imap`.
90
- * @signature
91
- * imap(mapper)(data)
92
- */
93
- declare function imap<T, S>(mapper: MapFunction<T, S>): (iterable: Iterable<T>) => IteratorLike<S>;
94
- /**
95
- * Maps an iterable using a mapper function.
96
- * Data first version of `imap`.
97
- * @signature
98
- * imap(data, mapper)
99
- */
100
- declare function imap<T, S>(iterable: Iterable<T>, mapper: MapFunction<T, S>): IteratorLike<S>;
101
-
102
- declare function ireduce<T, R>(reducer: (acc: R, item: T) => R, initialValue: R): (iterable: Iterable<T>) => R;
103
- declare function ireduce<T, R>(iterable: Iterable<T>, reducer: (acc: R, item: T) => R, initialValue: R): R;
104
-
105
- /**
106
- * Checks if at least one element in the iterable satisfies the predicate.
107
- * Composable first version of `some`.
108
- * @signature
109
- * isome(predicate)(data)
110
- */
111
- declare function isome<T>(predicate: (item: T) => boolean): (iterable: Iterable<T>) => boolean;
112
- /**
113
- * Checks if at least one element in the iterable satisfies the predicate.
114
- * Data first version of `some`.
115
- * @signature
116
- * isome(data, predicate)
117
- */
118
- declare function isome<T>(iterable: Iterable<T>, predicate: (item: T) => boolean): boolean;
119
-
120
- declare function toArray(): <T>(iterable: Iterable<T> | ArrayLike<T>) => T[];
121
- declare function toArray<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
122
- declare function toSet(): <T>(iterable: Iterable<T>) => Set<T>;
123
- declare function toSet<T>(iterable: Iterable<T>): Set<T>;
124
-
125
- /**
126
- * Returns an iterable that yields only unique values.
127
- * It uses a Set to keep track of the values.
128
- */
129
- declare function iunique(): <T>(iterable: Iterable<T>) => IteratorLike<T>;
130
- declare function iunique<T>(iterable: Iterable<T>): IteratorLike<T>;
131
-
132
- export { ifilter, ifind, ifirst, iflat, iflatMap, ihead, imap, ireduce, isome, iunique, toArray, toSet };