@likec4/core 1.46.4 → 1.48.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 (181) hide show
  1. package/LICENSE +1 -1
  2. package/dist/_chunks/Builder.view-element.mjs +3284 -0
  3. package/dist/_chunks/LikeC4Model.d.mts +1287 -0
  4. package/dist/_chunks/LikeC4Styles.mjs +691 -0
  5. package/dist/_chunks/RichText.d.mts +84 -0
  6. package/dist/_chunks/RichText.mjs +148 -0
  7. package/dist/_chunks/_aux.d.mts +289 -0
  8. package/dist/_chunks/_aux.mjs +18 -0
  9. package/dist/_chunks/_types.d.mts +781 -0
  10. package/dist/_chunks/_types2.d.mts +38 -0
  11. package/dist/_chunks/assignTagColors.mjs +24 -0
  12. package/dist/_chunks/calcDriftsFromSnapshot.mjs +379 -0
  13. package/dist/_chunks/connection.mjs +0 -0
  14. package/dist/_chunks/const.d.mts +43 -0
  15. package/dist/_chunks/const.mjs +33 -0
  16. package/dist/_chunks/expression-model.d.mts +192 -0
  17. package/dist/_chunks/expression-model.mjs +103 -0
  18. package/dist/_chunks/expression.d.mts +347 -0
  19. package/dist/_chunks/expression.mjs +107 -0
  20. package/dist/_chunks/find.d.mts +82 -0
  21. package/dist/_chunks/find.mjs +646 -0
  22. package/dist/_chunks/find2.d.mts +78 -0
  23. package/dist/_chunks/find2.mjs +287 -0
  24. package/dist/_chunks/fqnRef.d.mts +58 -0
  25. package/dist/_chunks/fqnRef.mjs +41 -0
  26. package/dist/_chunks/geometry.mjs +335 -0
  27. package/dist/_chunks/index.d.mts +169 -0
  28. package/dist/_chunks/index2.d.mts +937 -0
  29. package/dist/_chunks/index3.d.mts +146 -0
  30. package/dist/_chunks/index4.d.mts +62 -0
  31. package/dist/_chunks/index5.d.mts +42 -0
  32. package/dist/_chunks/index6.d.mts +43 -0
  33. package/dist/{shared/core.OtRNdMxy.d.mts → _chunks/index7.d.mts} +113 -197
  34. package/dist/_chunks/index8.d.mts +144 -0
  35. package/dist/_chunks/invariant.mjs +18 -0
  36. package/dist/_chunks/iterable.mjs +146 -0
  37. package/dist/_chunks/libs/@mantine/colors-generator.mjs +3416 -0
  38. package/dist/_chunks/libs/@ungap/structured-clone.mjs +213 -0
  39. package/dist/_chunks/libs/bail.mjs +14 -0
  40. package/dist/_chunks/libs/ccount.mjs +25 -0
  41. package/dist/_chunks/libs/character-entities-html4.mjs +263 -0
  42. package/dist/_chunks/libs/character-entities-legacy.mjs +117 -0
  43. package/dist/_chunks/libs/character-entities.mjs +2136 -0
  44. package/dist/_chunks/libs/comma-separated-tokens.mjs +18 -0
  45. package/dist/_chunks/libs/decode-named-character-reference.mjs +21 -0
  46. package/dist/_chunks/libs/defu.mjs +42 -0
  47. package/dist/_chunks/libs/devlop.mjs +5 -0
  48. package/dist/_chunks/libs/escape-string-regexp.mjs +8 -0
  49. package/dist/_chunks/libs/extend.mjs +77 -0
  50. package/dist/_chunks/libs/graphology-dag.mjs +703 -0
  51. package/dist/_chunks/libs/graphology-types.d.mts +601 -0
  52. package/dist/_chunks/libs/graphology.d.mts +6 -0
  53. package/dist/_chunks/libs/graphology.mjs +4565 -0
  54. package/dist/_chunks/libs/hast-util-sanitize.mjs +863 -0
  55. package/dist/_chunks/libs/hast-util-to-html.mjs +2696 -0
  56. package/dist/_chunks/libs/is-plain-obj.mjs +9 -0
  57. package/dist/_chunks/libs/longest-streak.mjs +30 -0
  58. package/dist/_chunks/libs/markdown-table.mjs +290 -0
  59. package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +653 -0
  60. package/dist/_chunks/libs/mdast-util-from-markdown.mjs +8522 -0
  61. package/dist/_chunks/libs/mdast-util-gfm.mjs +2393 -0
  62. package/dist/_chunks/libs/mdast-util-to-hast.mjs +1803 -0
  63. package/dist/_chunks/libs/micromark-extension-gfm.mjs +2243 -0
  64. package/dist/_chunks/libs/mnemonist.d.mts +254 -0
  65. package/dist/_chunks/libs/mnemonist.mjs +1978 -0
  66. package/dist/_chunks/libs/natural-compare-lite.mjs +42 -0
  67. package/dist/_chunks/libs/rehype-sanitize.mjs +29 -0
  68. package/dist/_chunks/libs/rehype-stringify.mjs +34 -0
  69. package/dist/_chunks/libs/remark-gfm.mjs +36 -0
  70. package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +100 -0
  71. package/dist/_chunks/libs/remark-parse.mjs +39 -0
  72. package/dist/_chunks/libs/remark-rehype.mjs +171 -0
  73. package/dist/_chunks/libs/remeda.mjs +702 -0
  74. package/dist/_chunks/libs/trough.mjs +158 -0
  75. package/dist/_chunks/libs/unified.mjs +2212 -0
  76. package/dist/_chunks/mnemonist.d.mts +1 -0
  77. package/dist/_chunks/mnemonist.mjs +0 -0
  78. package/dist/_chunks/model.mjs +1898 -0
  79. package/dist/_chunks/model2.mjs +0 -0
  80. package/dist/_chunks/relationships-view.mjs +132 -0
  81. package/dist/_chunks/rolldown-runtime.mjs +42 -0
  82. package/dist/{shared/core.C_3y3eqV.d.mts → _chunks/scalar.d.mts} +13 -43
  83. package/dist/_chunks/scalar.mjs +84 -0
  84. package/dist/_chunks/utils.mjs +483 -0
  85. package/dist/builder/index.d.mts +11 -773
  86. package/dist/builder/index.mjs +631 -978
  87. package/dist/compute-view/index.d.mts +90 -27
  88. package/dist/compute-view/index.mjs +253 -83
  89. package/dist/compute-view/relationships-view/index.d.mts +16 -51
  90. package/dist/compute-view/relationships-view/index.mjs +6 -184
  91. package/dist/geometry/index.d.mts +2 -109
  92. package/dist/geometry/index.mjs +2 -327
  93. package/dist/index.d.mts +18 -20
  94. package/dist/index.mjs +27 -18
  95. package/dist/model/connection/deployment/index.d.mts +12 -15
  96. package/dist/model/connection/deployment/index.mjs +9 -2
  97. package/dist/model/connection/index.d.mts +14 -75
  98. package/dist/model/connection/index.mjs +10 -3
  99. package/dist/model/connection/model/index.d.mts +12 -15
  100. package/dist/model/connection/model/index.mjs +8 -2
  101. package/dist/model/index.d.mts +15 -57
  102. package/dist/model/index.mjs +11 -4
  103. package/dist/styles/index.d.mts +9 -117
  104. package/dist/styles/index.mjs +26 -59
  105. package/dist/types/RichText.d.mts +3 -0
  106. package/dist/types/RichText.mjs +7 -0
  107. package/dist/types/_aux.d.mts +3 -4
  108. package/dist/types/_aux.mjs +2 -7
  109. package/dist/types/expression-model.d.mts +6 -190
  110. package/dist/types/expression-model.mjs +6 -108
  111. package/dist/types/expression.d.mts +5 -6
  112. package/dist/types/expression.mjs +6 -112
  113. package/dist/types/fqnRef.d.mts +4 -60
  114. package/dist/types/fqnRef.mjs +6 -44
  115. package/dist/types/index.d.mts +9 -47
  116. package/dist/types/index.mjs +14 -16
  117. package/dist/types/scalar.d.mts +2 -2
  118. package/dist/types/scalar.mjs +7 -4
  119. package/dist/utils/graphology/index.d.mts +2 -1864
  120. package/dist/utils/graphology/index.mjs +3 -1
  121. package/dist/utils/index.d.mts +11 -124
  122. package/dist/utils/index.mjs +16 -43
  123. package/dist/utils/iterable/index.d.mts +9 -132
  124. package/dist/utils/iterable/index.mjs +2 -61
  125. package/dist/utils/mnemonist.d.mts +2 -0
  126. package/dist/utils/mnemonist.mjs +12 -0
  127. package/package.json +18 -22
  128. package/compute-view/relationships/package.json +0 -4
  129. package/dist/shared/core.3ZhnKAlZ.mjs +0 -106
  130. package/dist/shared/core.78IWAHAE.mjs +0 -332
  131. package/dist/shared/core.B85MJLTf.mjs +0 -5
  132. package/dist/shared/core.BFd1lU9R.mjs +0 -29
  133. package/dist/shared/core.BKlholso.mjs +0 -3
  134. package/dist/shared/core.BPGOjone.d.mts +0 -46
  135. package/dist/shared/core.BYdtmqY5.mjs +0 -1255
  136. package/dist/shared/core.BZCgljZd.d.mts +0 -83
  137. package/dist/shared/core.BbE4y-yl.mjs +0 -177
  138. package/dist/shared/core.BhNcrwzK.mjs +0 -7
  139. package/dist/shared/core.BkVA6gjl.mjs +0 -5
  140. package/dist/shared/core.BoYfZOBm.mjs +0 -3
  141. package/dist/shared/core.BsSXS-_R.mjs +0 -7
  142. package/dist/shared/core.BspBF3SJ.mjs +0 -3944
  143. package/dist/shared/core.BvPm_-u3.d.mts +0 -334
  144. package/dist/shared/core.C-Jdx7xo.d.mts +0 -1263
  145. package/dist/shared/core.C3JowhaZ.mjs +0 -32
  146. package/dist/shared/core.C4x8aaWa.mjs +0 -27
  147. package/dist/shared/core.CBLX4mT8.mjs +0 -28411
  148. package/dist/shared/core.CLSZtnFh.mjs +0 -69
  149. package/dist/shared/core.CRhT4Iio.mjs +0 -785
  150. package/dist/shared/core.CbT8JVYL.mjs +0 -5
  151. package/dist/shared/core.CdNCAwq7.mjs +0 -176
  152. package/dist/shared/core.ClTP6-TN.d.mts +0 -87
  153. package/dist/shared/core.CmGY9blO.mjs +0 -6717
  154. package/dist/shared/core.CmPXpJ8l.mjs +0 -21
  155. package/dist/shared/core.Coi_LOUZ.mjs +0 -7
  156. package/dist/shared/core.CqAJJpK_.mjs +0 -3
  157. package/dist/shared/core.Ctj2S3bD.d.mts +0 -466
  158. package/dist/shared/core.CywrQs86.d.mts +0 -31
  159. package/dist/shared/core.D00YbOhQ.d.mts +0 -300
  160. package/dist/shared/core.D0WZutNd.mjs +0 -94
  161. package/dist/shared/core.D4npX2q8.mjs +0 -18
  162. package/dist/shared/core.DB0Ue5Wx.d.mts +0 -70
  163. package/dist/shared/core.DEK-BO3_.mjs +0 -1206
  164. package/dist/shared/core.DH7TXqXf.mjs +0 -136
  165. package/dist/shared/core.DRJma0Ol.mjs +0 -22
  166. package/dist/shared/core.DSalPD6v.mjs +0 -1352
  167. package/dist/shared/core.DVfPJPJj.mjs +0 -2200
  168. package/dist/shared/core.DXhDWKFZ.d.mts +0 -3
  169. package/dist/shared/core.DbfO90vF.mjs +0 -434
  170. package/dist/shared/core.DcS-0zys.mjs +0 -10
  171. package/dist/shared/core.DeDCYTDR.d.mts +0 -98
  172. package/dist/shared/core.DpKY_3NF.d.mts +0 -504
  173. package/dist/shared/core.Dt0v3djy.d.mts +0 -41
  174. package/dist/shared/core.FZ305VYd.mjs +0 -21
  175. package/dist/shared/core.RfnaEmgA.mjs +0 -7
  176. package/dist/shared/core.oSV6SRfk.mjs +0 -13
  177. package/dist/shared/core.om36dXXW.mjs +0 -41
  178. package/dist/shared/core.q10OP9oJ.mjs +0 -5
  179. package/dist/shared/core.uFk_o9X6.mjs +0 -13
  180. package/dist/shared/core.xeuDd__E.mjs +0 -300
  181. package/dist/shared/core.xgoPk2RG.mjs +0 -4989
@@ -1,300 +0,0 @@
1
- import { IfNever, IsNever, IsLiteral } from 'type-fest';
2
- import { C as Coalesce, L as Link } from './core.DB0Ue5Wx.mjs';
3
- import { V as ViewId$1, F as Fqn$1, D as DeploymentFqn$1, j as NodeId$1, k as EdgeId$1, d as RelationId$1, P as ProjectId$1, T as Tag$1, E as ElementKind$1, b as DeploymentKind$1, c as RelationshipKind, M as MarkdownOrString } from './core.C_3y3eqV.mjs';
4
-
5
- /**
6
- * Determines the stage of the model:
7
- * 1. `parsed` - parsed from DSL or returned from Builder
8
- * 2. `computed` - views are computed
9
- * 3. `layouted` - views are layouted
10
- *
11
- * @internal
12
- */
13
- type ModelStage = 'parsed' | 'computed' | 'layouted';
14
- type ExtractOnStage<T, S extends ModelStage> = Extract<T, {
15
- [_stage]: S;
16
- }>;
17
- declare function isOnStage<T extends {
18
- [_stage]: ModelStage;
19
- }, S extends ModelStage>(value: T, stage: S): value is ExtractOnStage<T, S>;
20
- /**
21
- * Property name to store the stage of the model
22
- *
23
- * @internal
24
- */
25
- declare const _stage = "_stage";
26
- type _stage = typeof _stage;
27
- /**
28
- * Property name to store type information, used to identify the type of the view
29
- *
30
- * @internal
31
- */
32
- declare const _type = "_type";
33
- type _type = typeof _type;
34
- /**
35
- * Property name to store layout type information, used to identify the type of the layout*
36
- * @internal
37
- */
38
- declare const _layout = "_layout";
39
- type _layout = typeof _layout;
40
-
41
- /**
42
- * Specification types (kinds, tags, metadata keys)
43
- *
44
- * @param ElementKind - Literal union of element kinds
45
- * @param DeploymentKind - Literal union of deployment kinds
46
- * @param RelationKind - Literal union of relationship kinds
47
- * @param Tag - Literal union of tags
48
- * @param MetadataKey - Literal union of metadata keys
49
- */
50
- interface SpecAux<ElementKind extends string, DeploymentKind extends string, RelationKind extends string, Tag extends string, MetadataKey extends string> {
51
- ElementKind: ElementKind;
52
- DeploymentKind: DeploymentKind;
53
- RelationKind: RelationKind;
54
- Tag: Tag;
55
- MetadataKey: MetadataKey;
56
- }
57
- type AnySpec = SpecAux<any, any, any, any, any>;
58
- /**
59
- * Auxilary interface to keep inferred types
60
- *
61
- * @typeParam Stage - View stage
62
- * @typeParam Element - Literal union of FQNs of model elements
63
- * @typeParam Deployment - Literal union of FQNs of deployment elements
64
- * @typeParam View - Literal union of view identifiers
65
- * @typeParam Project - Project identifier type
66
- * @typeParam Spec - Specification types (kinds, tags, metadata keys)
67
- */
68
- interface Aux<Stage extends ModelStage, Element extends string, Deployment extends string, View extends string, Project extends string, Spec extends AnySpec> {
69
- Stage: Stage;
70
- ProjectId: Project;
71
- ElementId: Element;
72
- DeploymentId: Deployment;
73
- ViewId: View;
74
- ElementKind: Spec['ElementKind'];
75
- DeploymentKind: Spec['DeploymentKind'];
76
- RelationKind: Spec['RelationKind'];
77
- Tag: Spec['Tag'];
78
- MetadataKey: Spec['MetadataKey'];
79
- }
80
- type AnyOnStage<Stage extends ModelStage> = Aux<Stage, any, any, any, any, any>;
81
- type AnyParsed = AnyOnStage<'parsed'>;
82
- type AnyComputed = AnyOnStage<'computed'>;
83
- type AnyLayouted = AnyOnStage<'layouted'>;
84
- type Any = Aux<any, any, any, any, any, any>;
85
-
86
- type Never = Aux<never, never, never, never, never, SpecAux<never, never, never, never, never>>;
87
- /**
88
- * Fallback when {@link Aux} can't be inferred.
89
- * By default assumes non parsed model
90
- */
91
- type Unknown = UnknownComputed | UnknownLayouted;
92
- type UnknownParsed = Aux<'parsed', string, string, string, string, SpecAux<string, string, string, string, string>>;
93
- type UnknownComputed = Aux<'computed', string, string, string, string, SpecAux<string, string, string, string, string>>;
94
- type UnknownLayouted = Aux<'layouted', string, string, string, string, SpecAux<string, string, string, string, string>>;
95
- /**
96
- * Reads stage from Aux
97
- */
98
- type Stage<A> = A extends Aux<infer S, any, any, any, any, any> ? IfNever<S, never, Coalesce<S, ModelStage>> : never;
99
- /**
100
- * Picks type based on stage from Aux
101
- */
102
- type PickByStage<A extends Any, OnParsed, OnComputed, OnLayouted = OnComputed> = {
103
- parsed: OnParsed;
104
- computed: OnComputed;
105
- layouted: OnLayouted;
106
- }[A['Stage']];
107
- type setStage<A, S extends ModelStage> = A extends Aux<any, infer E, infer D, infer V, infer P, infer Spec> ? Aux<S, E, D, V, P, Spec> : never;
108
- type toParsed<A> = A extends Aux<any, infer E, infer D, infer V, infer P, infer Spec> ? Aux<'parsed', E, D, V, P, Spec> : never;
109
- type toComputed<A> = A extends Aux<any, infer E, infer D, infer V, infer P, infer Spec> ? Aux<'computed', E, D, V, P, Spec> : never;
110
- type toLayouted<A> = A extends Aux<any, infer E, infer D, infer V, infer P, infer Spec> ? Aux<'layouted', E, D, V, P, Spec> : never;
111
- /**
112
- * Project identifier from Aux
113
- */
114
- type ProjectId<A> = A extends Aux<any, any, any, any, infer P, any> ? Coalesce<P> : never;
115
- type setProject<A, P extends string> = A extends Aux<infer S, infer E, infer D, infer V, any, infer Spec> ? Aux<S, E, D, V, P, Spec> : never;
116
- /**
117
- * Element FQN from Aux as branded type
118
- */
119
- type Fqn<A> = A extends Any ? Fqn$1<ElementId<A>> : never;
120
- /**
121
- * Element FQN from Aux as a literal union
122
- */
123
- type ElementId<A> = A extends Any ? Coalesce<A['ElementId']> : never;
124
- /**
125
- * Deployment FQN from Aux as branded type
126
- */
127
- type DeploymentFqn<A> = A extends Any ? DeploymentFqn$1<DeploymentId<A>> : never;
128
- /**
129
- * Deployment FQN from Aux as a literal union
130
- * @alias {@link DeploymentFqn}
131
- */
132
- type DeploymentId<A> = A extends Any ? Coalesce<A['DeploymentId']> : never;
133
- /**
134
- * View identifier from Aux as a literal union
135
- */
136
- type ViewId<A> = A extends Any ? Coalesce<A['ViewId']> : never;
137
- type RelationId = RelationId$1;
138
- type NodeId = NodeId$1;
139
- type EdgeId = EdgeId$1;
140
- /**
141
- * ElementKind from Aux as a literal union
142
- */
143
- type ElementKind<A> = A extends Any ? Coalesce<A['ElementKind']> : never;
144
- /**
145
- * DeploymentKind from Aux as a literal union
146
- */
147
- type DeploymentKind<A> = A extends Any ? Coalesce<A['DeploymentKind']> : never;
148
- /**
149
- * RelationKind from Aux as a literal union
150
- */
151
- type RelationKind<A> = A extends Any ? Coalesce<A['RelationKind']> : never;
152
- /**
153
- * Tags from Aux as a literal union
154
- */
155
- type Tag<A> = A extends Any ? Coalesce<A['Tag']> : never;
156
- /**
157
- * Array of tags from Aux
158
- */
159
- type Tags<A extends Any> = readonly Tag<A>[];
160
- /**
161
- * Metadata key from Aux
162
- */
163
- type MetadataKey<A> = A extends Any ? Coalesce<A['MetadataKey']> : never;
164
- /**
165
- * Metadata object from Aux
166
- */
167
- type Metadata<A extends Any> = IsNever<A['MetadataKey']> extends true ? never : IsLiteral<A['MetadataKey']> extends true ? {
168
- [key in A['MetadataKey']]?: string | string[];
169
- } : Record<string, string | string[]>;
170
- /**
171
- * All known kinds from Aux as a literal union.
172
- */
173
- type AllKinds<A> = ElementKind<A> | DeploymentKind<A> | RelationKind<A>;
174
- /**
175
- * Specification from Aux
176
- */
177
- type Spec<A> = A extends Aux<any, any, any, any, any, SpecAux<infer E, infer D, infer R, infer T, infer M>> ? SpecAux<E, D, R, T, M> : never;
178
- type StrictProjectId<A> = A extends infer T extends Any ? ProjectId$1<ProjectId<T>> : never;
179
-
180
- type StrictViewId<A> = A extends infer T extends Any ? ViewId$1<ViewId<T>> : never;
181
- type StrictTag<A> = A extends infer T extends Any ? Tag$1<Tag<T>> : never;
182
- type StrictElementKind<A> = A extends infer T extends Any ? ElementKind$1<ElementKind<T>> : never;
183
- type StrictDeploymentKind<A> = A extends infer T extends Any ? DeploymentKind$1<DeploymentKind<T>> : never;
184
- type StrictRelationKind<A> = A extends infer T extends Any ? RelationshipKind<RelationKind<T>> : never;
185
- type WithDescriptionAndTech = {
186
- readonly summary?: MarkdownOrString | null;
187
- readonly description?: MarkdownOrString | null;
188
- readonly technology?: string | null;
189
- };
190
- /**
191
- * Returns summary if it is not null, otherwise returns description
192
- */
193
- declare function preferSummary(a: WithDescriptionAndTech): MarkdownOrString | null | undefined;
194
- /**
195
- * Returns description if it is not null, otherwise returns summary
196
- */
197
- declare function preferDescription(a: WithDescriptionAndTech): MarkdownOrString | null | undefined;
198
- type WithTags<A extends Any> = {
199
- readonly tags: Tags<A>;
200
- };
201
- type WithOptionalTags<A extends Any> = {
202
- readonly tags?: Tags<A> | null;
203
- };
204
- type WithLinks = {
205
- readonly links: readonly Link[];
206
- };
207
- type WithOptionalLinks = {
208
- readonly links?: readonly Link[] | null;
209
- };
210
- type WithMetadata<A extends Any> = {
211
- readonly metadata?: Metadata<A>;
212
- };
213
- type WithNotation = {
214
- readonly notation?: string | null;
215
- };
216
- /**
217
- * @see {@link LiteralUnion} from type-fest (https://github.com/sindresorhus/type-fest/blob/main/source/literal-union.d.ts)
218
- */
219
- type OrString = string & Record<never, never>;
220
- /**
221
- * Allows any string value, but still auto-completes to the possible values in IDE
222
- */
223
- type LooseLiteral<V extends string> = Coalesce<V> | OrString;
224
- type LooseElementId<A> = A extends Any ? LooseLiteral<A['ElementId']> : string;
225
- type LooseDeploymentId<A> = A extends Any ? LooseLiteral<A['DeploymentId']> : string;
226
- type LooseViewId<A> = A extends Any ? LooseLiteral<A['ViewId']> : string;
227
- type LooseTag<A> = A extends Any ? LooseLiteral<A['Tag']> : string;
228
- type LooseTags<A> = A extends Any ? readonly (LooseLiteral<A['Tag']>)[] : string[];
229
- type LooseElementKind<A> = A extends Any ? LooseLiteral<A['ElementKind']> : string;
230
- type LooseDeploymentKind<A> = A extends Any ? LooseLiteral<A['DeploymentKind']> : string;
231
- type LooseRelationKind<A> = A extends Any ? LooseLiteral<A['RelationKind']> : string;
232
-
233
- type _aux_AllKinds<A> = AllKinds<A>;
234
- type _aux_Any = Any;
235
- type _aux_AnyComputed = AnyComputed;
236
- type _aux_AnyLayouted = AnyLayouted;
237
- type _aux_AnyOnStage<Stage extends ModelStage> = AnyOnStage<Stage>;
238
- type _aux_AnyParsed = AnyParsed;
239
- type _aux_AnySpec = AnySpec;
240
- type _aux_Aux<Stage extends ModelStage, Element extends string, Deployment extends string, View extends string, Project extends string, Spec extends AnySpec> = Aux<Stage, Element, Deployment, View, Project, Spec>;
241
- type _aux_DeploymentFqn<A> = DeploymentFqn<A>;
242
- type _aux_DeploymentId<A> = DeploymentId<A>;
243
- type _aux_DeploymentKind<A> = DeploymentKind<A>;
244
- type _aux_EdgeId = EdgeId;
245
- type _aux_ElementId<A> = ElementId<A>;
246
- type _aux_ElementKind<A> = ElementKind<A>;
247
- type _aux_Fqn<A> = Fqn<A>;
248
- type _aux_LooseDeploymentId<A> = LooseDeploymentId<A>;
249
- type _aux_LooseDeploymentKind<A> = LooseDeploymentKind<A>;
250
- type _aux_LooseElementId<A> = LooseElementId<A>;
251
- type _aux_LooseElementKind<A> = LooseElementKind<A>;
252
- type _aux_LooseLiteral<V extends string> = LooseLiteral<V>;
253
- type _aux_LooseRelationKind<A> = LooseRelationKind<A>;
254
- type _aux_LooseTag<A> = LooseTag<A>;
255
- type _aux_LooseTags<A> = LooseTags<A>;
256
- type _aux_LooseViewId<A> = LooseViewId<A>;
257
- type _aux_Metadata<A extends Any> = Metadata<A>;
258
- type _aux_MetadataKey<A> = MetadataKey<A>;
259
- type _aux_Never = Never;
260
- type _aux_NodeId = NodeId;
261
- type _aux_OrString = OrString;
262
- type _aux_PickByStage<A extends Any, OnParsed, OnComputed, OnLayouted = OnComputed> = PickByStage<A, OnParsed, OnComputed, OnLayouted>;
263
- type _aux_ProjectId<A> = ProjectId<A>;
264
- type _aux_RelationId = RelationId;
265
- type _aux_RelationKind<A> = RelationKind<A>;
266
- type _aux_Spec<A> = Spec<A>;
267
- type _aux_SpecAux<ElementKind extends string, DeploymentKind extends string, RelationKind extends string, Tag extends string, MetadataKey extends string> = SpecAux<ElementKind, DeploymentKind, RelationKind, Tag, MetadataKey>;
268
- type _aux_Stage<A> = Stage<A>;
269
- type _aux_StrictDeploymentKind<A> = StrictDeploymentKind<A>;
270
- type _aux_StrictElementKind<A> = StrictElementKind<A>;
271
- type _aux_StrictProjectId<A> = StrictProjectId<A>;
272
- type _aux_StrictRelationKind<A> = StrictRelationKind<A>;
273
- type _aux_StrictTag<A> = StrictTag<A>;
274
- type _aux_StrictViewId<A> = StrictViewId<A>;
275
- type _aux_Tag<A> = Tag<A>;
276
- type _aux_Tags<A extends Any> = Tags<A>;
277
- type _aux_Unknown = Unknown;
278
- type _aux_UnknownComputed = UnknownComputed;
279
- type _aux_UnknownLayouted = UnknownLayouted;
280
- type _aux_UnknownParsed = UnknownParsed;
281
- type _aux_ViewId<A> = ViewId<A>;
282
- type _aux_WithDescriptionAndTech = WithDescriptionAndTech;
283
- type _aux_WithLinks = WithLinks;
284
- type _aux_WithMetadata<A extends Any> = WithMetadata<A>;
285
- type _aux_WithNotation = WithNotation;
286
- type _aux_WithOptionalLinks = WithOptionalLinks;
287
- type _aux_WithOptionalTags<A extends Any> = WithOptionalTags<A>;
288
- type _aux_WithTags<A extends Any> = WithTags<A>;
289
- declare const _aux_preferDescription: typeof preferDescription;
290
- declare const _aux_preferSummary: typeof preferSummary;
291
- type _aux_setProject<A, P extends string> = setProject<A, P>;
292
- type _aux_setStage<A, S extends ModelStage> = setStage<A, S>;
293
- type _aux_toComputed<A> = toComputed<A>;
294
- type _aux_toLayouted<A> = toLayouted<A>;
295
- type _aux_toParsed<A> = toParsed<A>;
296
- declare namespace _aux {
297
- export { type _aux_AllKinds as AllKinds, type _aux_Any as Any, type Any as AnyAux, type _aux_AnyComputed as AnyComputed, type _aux_AnyLayouted as AnyLayouted, type _aux_AnyOnStage as AnyOnStage, type _aux_AnyParsed as AnyParsed, type _aux_AnySpec as AnySpec, type _aux_Aux as Aux, type _aux_DeploymentFqn as DeploymentFqn, type _aux_DeploymentId as DeploymentId, type _aux_DeploymentKind as DeploymentKind, type _aux_EdgeId as EdgeId, type _aux_ElementId as ElementId, type _aux_ElementKind as ElementKind, type _aux_Fqn as Fqn, type _aux_LooseDeploymentId as LooseDeploymentId, type _aux_LooseDeploymentKind as LooseDeploymentKind, type _aux_LooseElementId as LooseElementId, type _aux_LooseElementKind as LooseElementKind, type _aux_LooseLiteral as LooseLiteral, type _aux_LooseRelationKind as LooseRelationKind, type _aux_LooseTag as LooseTag, type _aux_LooseTags as LooseTags, type _aux_LooseViewId as LooseViewId, type _aux_Metadata as Metadata, type _aux_MetadataKey as MetadataKey, type _aux_Never as Never, type _aux_NodeId as NodeId, type _aux_OrString as OrString, type _aux_PickByStage as PickByStage, type _aux_ProjectId as ProjectId, type _aux_RelationId as RelationId, type _aux_RelationKind as RelationKind, type _aux_Spec as Spec, type _aux_SpecAux as SpecAux, type _aux_Stage as Stage, type DeploymentFqn as StrictDeploymentFqn, type _aux_StrictDeploymentKind as StrictDeploymentKind, type _aux_StrictElementKind as StrictElementKind, type Fqn as StrictFqn, type _aux_StrictProjectId as StrictProjectId, type _aux_StrictRelationKind as StrictRelationKind, type _aux_StrictTag as StrictTag, type _aux_StrictViewId as StrictViewId, type _aux_Tag as Tag, type _aux_Tags as Tags, type _aux_Unknown as Unknown, type _aux_UnknownComputed as UnknownComputed, type _aux_UnknownLayouted as UnknownLayouted, type _aux_UnknownParsed as UnknownParsed, type _aux_ViewId as ViewId, type _aux_WithDescriptionAndTech as WithDescriptionAndTech, type _aux_WithLinks as WithLinks, type _aux_WithMetadata as WithMetadata, type _aux_WithNotation as WithNotation, type _aux_WithOptionalLinks as WithOptionalLinks, type _aux_WithOptionalTags as WithOptionalTags, type _aux_WithTags as WithTags, _aux_preferDescription as preferDescription, _aux_preferSummary as preferSummary, type _aux_setProject as setProject, type _aux_setStage as setStage, type _aux_toComputed as toComputed, type _aux_toLayouted as toLayouted, type _aux_toParsed as toParsed };
298
- }
299
-
300
- export { type AnyOnStage as $, type Any as A, type Never as B, type MetadataKey as C, type DeploymentId as D, type ElementKind as E, type Fqn as F, type WithTags as G, type Metadata as H, type LooseTag as I, type RelationId as J, type LooseElementId as K, type LooseLiteral as L, type ModelStage as M, type NodeId as N, type LooseDeploymentId as O, type ProjectId as P, type Stage as Q, type RelationKind as R, type StrictViewId as S, type Tag as T, type Unknown as U, type ViewId as V, type WithDescriptionAndTech as W, type LooseViewId as X, type setProject as Y, type AnySpec as Z, _aux as _, type ElementId as a, type PickByStage as a0, type setStage as a1, type toParsed as a2, type toLayouted as a3, type Spec as a4, type StrictProjectId as a5, type StrictTag as a6, type StrictElementKind as a7, type StrictDeploymentKind as a8, type StrictRelationKind as a9, type WithLinks as aa, type OrString as ab, type LooseTags as ac, type LooseElementKind as ad, type LooseDeploymentKind as ae, type LooseRelationKind as af, type AnyComputed as b, type AnyLayouted as c, type AnyParsed as d, type Aux as e, type SpecAux as f, type UnknownComputed as g, type UnknownLayouted as h, type UnknownParsed as i, preferSummary as j, type ExtractOnStage as k, isOnStage as l, _stage as m, _type as n, _layout as o, preferDescription as p, type AllKinds as q, type Tags as r, type WithOptionalTags as s, type toComputed as t, type WithOptionalLinks as u, type WithMetadata as v, type WithNotation as w, type DeploymentFqn as x, type DeploymentKind as y, type EdgeId as z };
@@ -1,94 +0,0 @@
1
- import { e } from './core.CqAJJpK_.mjs';
2
- import { e as e$1 } from './core.BKlholso.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 = e(value) ? value : value.txt ?? value.md;
13
- return e$1(content?.trim()) ? content : null;
14
- }
15
- const NoneIcon = "none";
16
- function Fqn(name, parent) {
17
- return parent ? parent + "." + name : name;
18
- }
19
- const GroupElementKind = "@group";
20
- function isGroupElementKind(v) {
21
- return v.kind === GroupElementKind;
22
- }
23
- function DeploymentFqn(name, parent) {
24
- return parent ? parent + "." + name : name;
25
- }
26
- function ViewId(id) {
27
- return id;
28
- }
29
- function RelationId(id) {
30
- return id;
31
- }
32
- function GlobalFqn(projectId, name) {
33
- invariant(typeof projectId === "string" && projectId != "");
34
- return "@" + projectId + "." + name;
35
- }
36
- function isGlobalFqn(fqn) {
37
- return fqn.startsWith("@");
38
- }
39
- function splitGlobalFqn(fqn) {
40
- if (!fqn.startsWith("@")) {
41
- return [null, fqn];
42
- }
43
- const firstDot = fqn.indexOf(".");
44
- if (firstDot < 2) {
45
- throw new Error("Invalid global FQN");
46
- }
47
- const projectId = fqn.slice(1, firstDot);
48
- const name = fqn.slice(firstDot + 1);
49
- return [projectId, name];
50
- }
51
- function NodeId(id) {
52
- return id;
53
- }
54
- function EdgeId(id) {
55
- return id;
56
- }
57
- function stepEdgeId(step, parallelStep) {
58
- const id = `step-${String(step).padStart(2, "0")}`;
59
- return parallelStep ? `${id}.${parallelStep}` : id;
60
- }
61
- const StepEdgeKind = "@step";
62
- function isStepEdgeId(id) {
63
- return id.startsWith("step-");
64
- }
65
- function extractStep(id) {
66
- if (!isStepEdgeId(id)) {
67
- throw new Error(`Invalid step edge id: ${id}`);
68
- }
69
- return parseFloat(id.slice("step-".length));
70
- }
71
-
72
- const scalar = {
73
- __proto__: null,
74
- DeploymentFqn: DeploymentFqn,
75
- EdgeId: EdgeId,
76
- Fqn: Fqn,
77
- GlobalFqn: GlobalFqn,
78
- GroupElementKind: GroupElementKind,
79
- NodeId: NodeId,
80
- NoneIcon: NoneIcon,
81
- ProjectId: ProjectId,
82
- RelationId: RelationId,
83
- StepEdgeKind: StepEdgeKind,
84
- ViewId: ViewId,
85
- extractStep: extractStep,
86
- flattenMarkdownOrString: flattenMarkdownOrString,
87
- isGlobalFqn: isGlobalFqn,
88
- isGroupElementKind: isGroupElementKind,
89
- isStepEdgeId: isStepEdgeId,
90
- splitGlobalFqn: splitGlobalFqn,
91
- stepEdgeId: stepEdgeId
92
- };
93
-
94
- export { DeploymentFqn as D, EdgeId as E, Fqn as F, GroupElementKind as G, NoneIcon as N, ProjectId as P, RelationId as R, StepEdgeKind as S, ViewId as V, GlobalFqn as a, isGlobalFqn as b, splitGlobalFqn as c, NodeId as d, stepEdgeId as e, flattenMarkdownOrString as f, isStepEdgeId as g, extractStep as h, isGroupElementKind as i, scalar as s };
@@ -1,18 +0,0 @@
1
- function nonNullable(value, message) {
2
- if (typeof value === "undefined" || value == null) {
3
- const msg = typeof message === "function" ? message() : message;
4
- throw new Error(msg ?? `Expected defined value, but received ${value}`);
5
- }
6
- return value;
7
- }
8
- function invariant(condition, message) {
9
- if (condition) {
10
- return;
11
- }
12
- throw new Error(message ?? "Invariant failed");
13
- }
14
- function nonexhaustive(value) {
15
- throw new Error(`NonExhaustive value: ${value}`);
16
- }
17
-
18
- export { nonNullable as a, invariant as i, nonexhaustive as n };
@@ -1,70 +0,0 @@
1
- import { IsAny, UnionToIntersection, Simplify, KeysOfUnion } from 'type-fest';
2
-
3
- type NonEmptyArray<T> = [T, ...T[]];
4
- type NonEmptyReadonlyArray<T> = readonly [T, ...T[]];
5
- type IterableContainer<T = unknown> = ReadonlyArray<T> | readonly [];
6
- type ReorderedArray<T extends IterableContainer> = {
7
- -readonly [P in keyof T]: T[number];
8
- };
9
- type KeysOf<T> = keyof T extends infer K extends string ? K : never;
10
- type AllNever<Expressions> = UnionToIntersection<{
11
- [Name in keyof Expressions]: {
12
- -readonly [Key in keyof Expressions[Name]]?: never;
13
- };
14
- }[keyof Expressions]>;
15
- /**
16
- * @example
17
- * ```ts
18
- * type Variant1 = {
19
- * a: string
20
- * }
21
- * type Variant2 = {
22
- * b: number
23
- * }
24
- *
25
- * type Variants = ExclusiveUnion<{
26
- * Variant1: Variant1,
27
- * Variant2: Variant2
28
- * }>
29
- *
30
- * // Fail here
31
- * const variant1: Variants = {
32
- * a: 'one',
33
- * b: 1
34
- * }
35
- * ```
36
- */
37
- type ExclusiveUnion<Expressions, All = AllNever<Expressions>> = Expressions extends object ? {
38
- [Name in keyof Expressions]: Simplify<Omit<All, keyof Expressions[Name]> & Expressions[Name]>;
39
- }[keyof Expressions] : never;
40
- /**
41
- * Copy from https://github.com/remeda/remeda/blob/main/packages/remeda/src/internal/types/NTuple.ts
42
- * An array with *exactly* N elements in it.
43
- *
44
- * Only literal N values are supported. For very large N the type might result
45
- * in a recurse depth error. For negative N the type would result in an infinite
46
- * recursion. None of these have protections because this is an internal type!
47
- */
48
- type NTuple<T, N extends number, Result extends Array<unknown> = []> = Result['length'] extends N ? Result : NTuple<T, N, [...Result, T]>;
49
- type IteratorLike<T> = IteratorObject<T, BuiltinIteratorReturn, unknown>;
50
- type Predicate<T> = (x: T) => boolean;
51
- interface Link {
52
- title?: string;
53
- url: string;
54
- relative?: string;
55
- }
56
- /**
57
- * Coalesce `V` to a string if it is `any`
58
- */
59
- type Coalesce<V extends string, OrIfAny = string> = IsAny<V> extends true ? OrIfAny : V;
60
- type ExactObject<T, InputType = unknown> = {
61
- [KeyType in keyof T]: undefined extends T[KeyType] ? T[KeyType] | undefined : T[KeyType];
62
- } & Record<Exclude<keyof InputType, KeysOfUnion<T>>, never>;
63
- /**
64
- * Allows only exact properties of `U` to be present in `T` and omits undefined values
65
- *
66
- * See {@link Exact} for more details (this version is non-deep)
67
- */
68
- declare function exact<Expected, T extends ExactObject<Expected, T>>(a: T): Expected;
69
-
70
- export { type Coalesce as C, type ExclusiveUnion as E, type IterableContainer as I, type KeysOf as K, type Link as L, type NonEmptyArray as N, type Predicate as P, type ReorderedArray as R, type NonEmptyReadonlyArray as a, type NTuple as b, type IteratorLike as c, exact as e };