@likec4/core 1.20.1 → 1.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder/index.cjs +6 -6
- package/dist/builder/index.d.cts +3 -3
- package/dist/builder/index.d.mts +3 -3
- package/dist/builder/index.d.ts +3 -3
- package/dist/builder/index.mjs +6 -6
- package/dist/compute-view/index.cjs +5 -5
- package/dist/compute-view/index.d.cts +4 -4
- package/dist/compute-view/index.d.mts +4 -4
- package/dist/compute-view/index.d.ts +4 -4
- package/dist/compute-view/index.mjs +6 -6
- package/dist/index.cjs +71 -573
- package/dist/index.d.cts +9 -133
- package/dist/index.d.mts +9 -133
- package/dist/index.d.ts +9 -133
- package/dist/index.mjs +8 -512
- package/dist/model/index.cjs +1 -1
- package/dist/model/index.d.cts +5 -5
- package/dist/model/index.d.mts +5 -5
- package/dist/model/index.d.ts +5 -5
- package/dist/model/index.mjs +1 -1
- package/dist/shared/{core.DunIMHRf.mjs → core.0PxLtLpP.mjs} +1 -1
- package/dist/shared/{core.BvdNMbcA.d.cts → core.88YY6vtF.d.mts} +2 -2
- package/dist/shared/{core.ByNgh-mC.d.cts → core.BIZD3l1g.d.cts} +1 -1
- package/dist/shared/{core.D74xkKkG.d.ts → core.BJfn72tj.d.cts} +5 -0
- package/dist/shared/{core.D74xkKkG.d.cts → core.BJfn72tj.d.mts} +5 -0
- package/dist/shared/{core.D74xkKkG.d.mts → core.BJfn72tj.d.ts} +5 -0
- package/dist/shared/{core.M-JWF7SS.mjs → core.Bezy7K65.mjs} +1 -1
- package/dist/shared/{core.D_Gc58Gt.d.ts → core.Bs71hdR4.d.ts} +2 -1
- package/dist/shared/{core.D6-fWbM3.d.ts → core.BtISRjMA.d.ts} +1 -1
- package/dist/shared/{core.B72vUaNB.d.cts → core.C0ygs98j.d.cts} +2 -1
- package/dist/shared/core.CCyhaU-4.mjs +14819 -0
- package/dist/shared/{core.DsoCu540.cjs → core.CKYxnFEl.cjs} +1 -1
- package/dist/shared/{core.Damrzla-.d.ts → core.CNUzoKM7.d.ts} +2 -2
- package/dist/shared/{core.sLaWHBjR.d.mts → core.CajOK_t3.d.mts} +1 -1
- package/dist/shared/{core.BdbFkE_p.d.cts → core.Cmfo_N4F.d.mts} +3 -3
- package/dist/shared/{core.jy6z2iRn.d.mts → core.CwZmAghJ.d.cts} +3 -3
- package/dist/shared/{core.ZWiGANIJ.d.ts → core.D4wZW7zR.d.ts} +3 -3
- package/dist/shared/{core.gv1bMwCC.cjs → core.Db_OTRdC.cjs} +1 -1
- package/dist/shared/{core.Dfzrh1VA.d.mts → core.DjMYkPMQ.d.mts} +2 -1
- package/dist/shared/{core.BGus30EM.cjs → core.DxJ1KbOs.cjs} +48 -643
- package/dist/shared/{core.m3rCQAv6.mjs → core.El-gigOM.mjs} +1 -1
- package/dist/shared/core.FACQZmma.cjs +14874 -0
- package/dist/shared/{core.BRuJ3Wzf.d.mts → core.Lh2RFJf1.d.cts} +2 -2
- package/dist/shared/{core.CqCTxzMY.mjs → core.PYycpzvA.mjs} +28 -619
- package/dist/shared/{core.B2QYWlYe.cjs → core.uxHtIZaH.cjs} +1 -1
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.cjs +6 -2
- package/dist/utils/index.d.cts +129 -145
- package/dist/utils/index.d.mts +129 -145
- package/dist/utils/index.d.ts +129 -145
- package/dist/utils/index.mjs +3 -3
- package/package.json +7 -6
- package/src/compute-view/deployment-view/clean-connections.ts +1 -1
- package/src/compute-view/deployment-view/stages/stage-final.ts +1 -1
- package/src/compute-view/element-view/__test__/fixture.ts +2 -0
- package/src/compute-view/element-view/compute.ts +1 -1
- package/src/compute-view/element-view/memory/memory.ts +2 -2
- package/src/compute-view/memory/ops.ts +1 -1
- package/src/compute-view/relationships-view/layout.ts +1 -1
- package/src/compute-view/relationships-view/utils.ts +1 -1
- package/src/compute-view/utils/applyCustomElementProperties.ts +9 -6
- package/src/compute-view/utils/applyViewRuleStyles.ts +7 -4
- package/src/index.ts +0 -8
- package/src/model/DeploymentModel.ts +1 -1
- package/src/model/LikeC4Model.ts +3 -3
- package/src/types/element.ts +7 -2
- package/src/types/expression.ts +1 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/set.ts +5 -2
- package/dist/shared/core.BxvDITEI.mjs +0 -859
- package/dist/shared/core.C9DCnJh8.cjs +0 -908
- package/src/builder/Builder-style1.test-d.ts +0 -190
- package/src/builder/Builder-style2.test-d.ts +0 -175
- package/src/compute-view/utils/uniqueTags.test.ts +0 -42
- package/src/model/LikeC4Model.test-d.ts +0 -152
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,7 +1,133 @@
|
|
|
1
|
-
export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from '../shared/core.
|
|
2
|
-
import { N as NonEmptyArray, a as IteratorLike } from '../shared/core.
|
|
1
|
+
export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from '../shared/core.CajOK_t3.mjs';
|
|
2
|
+
import { N as NonEmptyArray, a as IteratorLike } from '../shared/core.BJfn72tj.mjs';
|
|
3
|
+
export { default as objectHash } from '/home/runner/work/likec4/likec4/node_modules/@types/object-hash/index.d.ts';
|
|
3
4
|
import { IsNumericLiteral } from 'type-fest';
|
|
4
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Mnemonist DefaultMap Typings
|
|
8
|
+
* =============================
|
|
9
|
+
*/
|
|
10
|
+
declare class DefaultMap<K, V> implements Iterable<[K, V]> {
|
|
11
|
+
|
|
12
|
+
// Members
|
|
13
|
+
size: number;
|
|
14
|
+
|
|
15
|
+
// Constructor
|
|
16
|
+
constructor(factory: (key: K, index: number) => V);
|
|
17
|
+
|
|
18
|
+
// Methods
|
|
19
|
+
clear(): void;
|
|
20
|
+
set(key: K, value: V): this;
|
|
21
|
+
delete(key: K): boolean;
|
|
22
|
+
has(key: K): boolean;
|
|
23
|
+
get(key: K): V;
|
|
24
|
+
peek(key: K): V | undefined;
|
|
25
|
+
forEach(callback: (value: V, key: K, map: this) => void, scope?: any): void;
|
|
26
|
+
keys(): IterableIterator<K>;
|
|
27
|
+
values(): IterableIterator<V>;
|
|
28
|
+
entries(): IterableIterator<[K, V]>;
|
|
29
|
+
[Symbol.iterator](): IterableIterator<[K, V]>;
|
|
30
|
+
inspect(): any;
|
|
31
|
+
|
|
32
|
+
// Statics
|
|
33
|
+
static autoIncrement(): number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Mnemonist LinkedList Typings
|
|
38
|
+
* =============================
|
|
39
|
+
*/
|
|
40
|
+
declare class LinkedList<T> implements Iterable<T> {
|
|
41
|
+
|
|
42
|
+
// Members
|
|
43
|
+
size: number;
|
|
44
|
+
|
|
45
|
+
// Constructor
|
|
46
|
+
constructor();
|
|
47
|
+
|
|
48
|
+
// Methods
|
|
49
|
+
clear(): void;
|
|
50
|
+
first(): T | undefined;
|
|
51
|
+
last(): T | undefined;
|
|
52
|
+
peek(): T | undefined;
|
|
53
|
+
push(value: T): number;
|
|
54
|
+
shift(): T | undefined;
|
|
55
|
+
unshift(value: T): number;
|
|
56
|
+
forEach(callback: (value: T, index: number, list: this) => void, scope?: any): void;
|
|
57
|
+
toArray(): Array<T>;
|
|
58
|
+
values(): IterableIterator<T>;
|
|
59
|
+
entries(): IterableIterator<[number, T]>;
|
|
60
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
61
|
+
toString(): string;
|
|
62
|
+
toJSON(): Array<T>;
|
|
63
|
+
inspect(): any;
|
|
64
|
+
|
|
65
|
+
// Statics
|
|
66
|
+
static from<I>(iterable: Iterable<I> | {[key: string]: I}): LinkedList<I>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Mnemonist Queue Typings
|
|
71
|
+
* ========================
|
|
72
|
+
*/
|
|
73
|
+
declare class Queue<T> implements Iterable<T> {
|
|
74
|
+
|
|
75
|
+
// Members
|
|
76
|
+
size: number;
|
|
77
|
+
|
|
78
|
+
// Constructor
|
|
79
|
+
constructor();
|
|
80
|
+
|
|
81
|
+
// Methods
|
|
82
|
+
clear(): void;
|
|
83
|
+
enqueue(item: T): number;
|
|
84
|
+
dequeue(): T | undefined;
|
|
85
|
+
peek(): T | undefined;
|
|
86
|
+
forEach(callback: (item: T, index: number, queue: this) => void, scope?: any): void;
|
|
87
|
+
toArray(): Array<T>;
|
|
88
|
+
values(): IterableIterator<T>;
|
|
89
|
+
entries(): IterableIterator<[number, T]>;
|
|
90
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
91
|
+
toString(): string;
|
|
92
|
+
toJSON(): Array<T>;
|
|
93
|
+
inspect(): any;
|
|
94
|
+
|
|
95
|
+
// Statics
|
|
96
|
+
static from<I>(iterable: Iterable<I> | {[key: string]: I}): Queue<I>;
|
|
97
|
+
static of<I>(...items: Array<I>): Queue<I>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Mnemonist Stack Typings
|
|
102
|
+
* ========================
|
|
103
|
+
*/
|
|
104
|
+
declare class Stack<T> implements Iterable<T> {
|
|
105
|
+
|
|
106
|
+
// Members
|
|
107
|
+
size: number;
|
|
108
|
+
|
|
109
|
+
// Constructor
|
|
110
|
+
constructor();
|
|
111
|
+
|
|
112
|
+
// Methods
|
|
113
|
+
clear(): void;
|
|
114
|
+
push(item: T): number;
|
|
115
|
+
pop(): T | undefined;
|
|
116
|
+
peek(): T | undefined;
|
|
117
|
+
forEach(callback: (item: T, index: number, stack: this) => void, scope?: any): void;
|
|
118
|
+
toArray(): Array<T>;
|
|
119
|
+
values(): IterableIterator<T>;
|
|
120
|
+
entries(): IterableIterator<[number, T]>;
|
|
121
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
122
|
+
toString(): string;
|
|
123
|
+
toJSON(): Array<T>;
|
|
124
|
+
inspect(): any;
|
|
125
|
+
|
|
126
|
+
// Statics
|
|
127
|
+
static from<I>(iterable: Iterable<I> | {[key: string]: I}): Stack<I>;
|
|
128
|
+
static of<I>(...items: Array<I>): Stack<I>;
|
|
129
|
+
}
|
|
130
|
+
|
|
5
131
|
/**
|
|
6
132
|
* Common head of two arrays
|
|
7
133
|
*
|
|
@@ -211,146 +337,4 @@ declare function symmetricDifference<T>(a: ReadonlySet<T>, b: ReadonlySet<T>): S
|
|
|
211
337
|
*/
|
|
212
338
|
declare function stringHash(str: string): string;
|
|
213
339
|
|
|
214
|
-
|
|
215
|
-
type NotUndefined = object | string | number | boolean | null | NotUndefined[];
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* @see https://github.com/puleos/object-hash#hashsha1value
|
|
219
|
-
*/
|
|
220
|
-
function sha1(object: NotUndefined): string;
|
|
221
|
-
/**
|
|
222
|
-
* @see https://github.com/puleos/object-hash#hashkeysvalue
|
|
223
|
-
*/
|
|
224
|
-
function keys(object: NotUndefined): string;
|
|
225
|
-
/**
|
|
226
|
-
* @see https://github.com/puleos/object-hash#hashmd5value
|
|
227
|
-
*/
|
|
228
|
-
function MD5(object: NotUndefined): string;
|
|
229
|
-
/**
|
|
230
|
-
* @see https://github.com/puleos/object-hash#hashkeysmd5value
|
|
231
|
-
*/
|
|
232
|
-
function keysMD5(object: NotUndefined): string;
|
|
233
|
-
/**
|
|
234
|
-
* @see https://github.com/puleos/object-hash#hashwritetostreamvalue-options-stream
|
|
235
|
-
*/
|
|
236
|
-
function writeToStream(value: any, stream: Stream): void;
|
|
237
|
-
function writeToStream(value: any, options: Options, stream: Stream): void;
|
|
238
|
-
|
|
239
|
-
type BufferEncoding =
|
|
240
|
-
| "ascii"
|
|
241
|
-
| "base64"
|
|
242
|
-
| "binary"
|
|
243
|
-
| "hex"
|
|
244
|
-
| "latin1"
|
|
245
|
-
| "ucs-2"
|
|
246
|
-
| "ucs2"
|
|
247
|
-
| "utf-8"
|
|
248
|
-
| "utf16le"
|
|
249
|
-
| "utf8";
|
|
250
|
-
|
|
251
|
-
interface Stream {
|
|
252
|
-
update?(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
253
|
-
write?(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
type HashName =
|
|
257
|
-
| "md4"
|
|
258
|
-
| "md4WithRSAEncryption"
|
|
259
|
-
| "md5"
|
|
260
|
-
| "md5WithRSAEncryption"
|
|
261
|
-
| "ripemd"
|
|
262
|
-
| "ripemd160"
|
|
263
|
-
| "ripemd160WithRSA"
|
|
264
|
-
| "rmd160"
|
|
265
|
-
| "rsa-md4"
|
|
266
|
-
| "rsa-md5"
|
|
267
|
-
| "rsa-ripemd160"
|
|
268
|
-
| "rsa-sha1"
|
|
269
|
-
| "rsa-sha1-2"
|
|
270
|
-
| "rsa-sha224"
|
|
271
|
-
| "rsa-sha256"
|
|
272
|
-
| "rsa-sha3-224"
|
|
273
|
-
| "rsa-sha3-256"
|
|
274
|
-
| "rsa-sha3-384"
|
|
275
|
-
| "rsa-sha3-512"
|
|
276
|
-
| "rsa-sha384"
|
|
277
|
-
| "rsa-sha512"
|
|
278
|
-
| "sha1"
|
|
279
|
-
| "sha1WithRSAEncryption"
|
|
280
|
-
| "sha224"
|
|
281
|
-
| "sha224WithRSAEncryption"
|
|
282
|
-
| "sha256"
|
|
283
|
-
| "sha256WithRSAEncryption"
|
|
284
|
-
| "sha3-224"
|
|
285
|
-
| "sha3-256"
|
|
286
|
-
| "sha3-384"
|
|
287
|
-
| "sha3-512"
|
|
288
|
-
| "sha384"
|
|
289
|
-
| "sha384WithRSAEncryption"
|
|
290
|
-
| "sha512"
|
|
291
|
-
| "sha512WithRSAEncryption";
|
|
292
|
-
|
|
293
|
-
interface BaseOptions {
|
|
294
|
-
/**
|
|
295
|
-
* @default 'sha1'
|
|
296
|
-
*/
|
|
297
|
-
algorithm?: HashName | "passthrough" | undefined;
|
|
298
|
-
|
|
299
|
-
excludeKeys?: ((key: string) => boolean) | undefined;
|
|
300
|
-
/**
|
|
301
|
-
* @default false
|
|
302
|
-
*/
|
|
303
|
-
excludeValues?: boolean | undefined;
|
|
304
|
-
/**
|
|
305
|
-
* @default false
|
|
306
|
-
*/
|
|
307
|
-
ignoreUnknown?: boolean | undefined;
|
|
308
|
-
|
|
309
|
-
replacer?: ((value: any) => any) | undefined;
|
|
310
|
-
/**
|
|
311
|
-
* @default true
|
|
312
|
-
*/
|
|
313
|
-
respectFunctionNames?: boolean | undefined;
|
|
314
|
-
/**
|
|
315
|
-
* @default true
|
|
316
|
-
*/
|
|
317
|
-
respectFunctionProperties?: boolean | undefined;
|
|
318
|
-
/**
|
|
319
|
-
* @default true
|
|
320
|
-
*/
|
|
321
|
-
respectType?: boolean | undefined;
|
|
322
|
-
/**
|
|
323
|
-
* @default false
|
|
324
|
-
*/
|
|
325
|
-
unorderedArrays?: boolean | undefined;
|
|
326
|
-
/**
|
|
327
|
-
* @default true
|
|
328
|
-
*/
|
|
329
|
-
unorderedObjects?: boolean | undefined;
|
|
330
|
-
/**
|
|
331
|
-
* @default true
|
|
332
|
-
*/
|
|
333
|
-
unorderedSets?: boolean | undefined;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
interface NormalOption extends BaseOptions {
|
|
337
|
-
/**
|
|
338
|
-
* @default 'hex'
|
|
339
|
-
*/
|
|
340
|
-
encoding?: "hex" | "binary" | "base64" | undefined;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
interface WithBufferOption extends BaseOptions {
|
|
344
|
-
encoding: "buffer";
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
type Options = NormalOption | WithBufferOption;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* @see https://github.com/puleos/object-hash#hashvalue-options
|
|
352
|
-
*/
|
|
353
|
-
declare function objectHash(object: objectHash.NotUndefined, options?: objectHash.NormalOption): string;
|
|
354
|
-
declare function objectHash(object: objectHash.NotUndefined, options?: objectHash.WithBufferOption): Buffer;
|
|
355
|
-
|
|
356
|
-
export { commonHead, compareNatural, compareRelations, delay, difference, equals as equalsSet, getOrCreate, hasAtLeast, ifilter, ifind, iflat, imap, intersection, ireduce, isIterable, isNonEmptyArray, isString, isome, iunique, objectHash, stringHash, symmetricDifference, toArray, toSet, union };
|
|
340
|
+
export { DefaultMap, LinkedList, Queue, Stack, commonHead, compareNatural, compareRelations, delay, difference, equals as equalsSet, getOrCreate, hasAtLeast, ifilter, ifind, iflat, imap, intersection, ireduce, isIterable, isNonEmptyArray, isString, isome, iunique, stringHash, symmetricDifference, toArray, toSet, union };
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,7 +1,133 @@
|
|
|
1
|
-
export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from '../shared/core.
|
|
2
|
-
import { N as NonEmptyArray, a as IteratorLike } from '../shared/core.
|
|
1
|
+
export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from '../shared/core.BtISRjMA.js';
|
|
2
|
+
import { N as NonEmptyArray, a as IteratorLike } from '../shared/core.BJfn72tj.js';
|
|
3
|
+
export { default as objectHash } from '/home/runner/work/likec4/likec4/node_modules/@types/object-hash/index.d.ts';
|
|
3
4
|
import { IsNumericLiteral } from 'type-fest';
|
|
4
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Mnemonist DefaultMap Typings
|
|
8
|
+
* =============================
|
|
9
|
+
*/
|
|
10
|
+
declare class DefaultMap<K, V> implements Iterable<[K, V]> {
|
|
11
|
+
|
|
12
|
+
// Members
|
|
13
|
+
size: number;
|
|
14
|
+
|
|
15
|
+
// Constructor
|
|
16
|
+
constructor(factory: (key: K, index: number) => V);
|
|
17
|
+
|
|
18
|
+
// Methods
|
|
19
|
+
clear(): void;
|
|
20
|
+
set(key: K, value: V): this;
|
|
21
|
+
delete(key: K): boolean;
|
|
22
|
+
has(key: K): boolean;
|
|
23
|
+
get(key: K): V;
|
|
24
|
+
peek(key: K): V | undefined;
|
|
25
|
+
forEach(callback: (value: V, key: K, map: this) => void, scope?: any): void;
|
|
26
|
+
keys(): IterableIterator<K>;
|
|
27
|
+
values(): IterableIterator<V>;
|
|
28
|
+
entries(): IterableIterator<[K, V]>;
|
|
29
|
+
[Symbol.iterator](): IterableIterator<[K, V]>;
|
|
30
|
+
inspect(): any;
|
|
31
|
+
|
|
32
|
+
// Statics
|
|
33
|
+
static autoIncrement(): number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Mnemonist LinkedList Typings
|
|
38
|
+
* =============================
|
|
39
|
+
*/
|
|
40
|
+
declare class LinkedList<T> implements Iterable<T> {
|
|
41
|
+
|
|
42
|
+
// Members
|
|
43
|
+
size: number;
|
|
44
|
+
|
|
45
|
+
// Constructor
|
|
46
|
+
constructor();
|
|
47
|
+
|
|
48
|
+
// Methods
|
|
49
|
+
clear(): void;
|
|
50
|
+
first(): T | undefined;
|
|
51
|
+
last(): T | undefined;
|
|
52
|
+
peek(): T | undefined;
|
|
53
|
+
push(value: T): number;
|
|
54
|
+
shift(): T | undefined;
|
|
55
|
+
unshift(value: T): number;
|
|
56
|
+
forEach(callback: (value: T, index: number, list: this) => void, scope?: any): void;
|
|
57
|
+
toArray(): Array<T>;
|
|
58
|
+
values(): IterableIterator<T>;
|
|
59
|
+
entries(): IterableIterator<[number, T]>;
|
|
60
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
61
|
+
toString(): string;
|
|
62
|
+
toJSON(): Array<T>;
|
|
63
|
+
inspect(): any;
|
|
64
|
+
|
|
65
|
+
// Statics
|
|
66
|
+
static from<I>(iterable: Iterable<I> | {[key: string]: I}): LinkedList<I>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Mnemonist Queue Typings
|
|
71
|
+
* ========================
|
|
72
|
+
*/
|
|
73
|
+
declare class Queue<T> implements Iterable<T> {
|
|
74
|
+
|
|
75
|
+
// Members
|
|
76
|
+
size: number;
|
|
77
|
+
|
|
78
|
+
// Constructor
|
|
79
|
+
constructor();
|
|
80
|
+
|
|
81
|
+
// Methods
|
|
82
|
+
clear(): void;
|
|
83
|
+
enqueue(item: T): number;
|
|
84
|
+
dequeue(): T | undefined;
|
|
85
|
+
peek(): T | undefined;
|
|
86
|
+
forEach(callback: (item: T, index: number, queue: this) => void, scope?: any): void;
|
|
87
|
+
toArray(): Array<T>;
|
|
88
|
+
values(): IterableIterator<T>;
|
|
89
|
+
entries(): IterableIterator<[number, T]>;
|
|
90
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
91
|
+
toString(): string;
|
|
92
|
+
toJSON(): Array<T>;
|
|
93
|
+
inspect(): any;
|
|
94
|
+
|
|
95
|
+
// Statics
|
|
96
|
+
static from<I>(iterable: Iterable<I> | {[key: string]: I}): Queue<I>;
|
|
97
|
+
static of<I>(...items: Array<I>): Queue<I>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Mnemonist Stack Typings
|
|
102
|
+
* ========================
|
|
103
|
+
*/
|
|
104
|
+
declare class Stack<T> implements Iterable<T> {
|
|
105
|
+
|
|
106
|
+
// Members
|
|
107
|
+
size: number;
|
|
108
|
+
|
|
109
|
+
// Constructor
|
|
110
|
+
constructor();
|
|
111
|
+
|
|
112
|
+
// Methods
|
|
113
|
+
clear(): void;
|
|
114
|
+
push(item: T): number;
|
|
115
|
+
pop(): T | undefined;
|
|
116
|
+
peek(): T | undefined;
|
|
117
|
+
forEach(callback: (item: T, index: number, stack: this) => void, scope?: any): void;
|
|
118
|
+
toArray(): Array<T>;
|
|
119
|
+
values(): IterableIterator<T>;
|
|
120
|
+
entries(): IterableIterator<[number, T]>;
|
|
121
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
122
|
+
toString(): string;
|
|
123
|
+
toJSON(): Array<T>;
|
|
124
|
+
inspect(): any;
|
|
125
|
+
|
|
126
|
+
// Statics
|
|
127
|
+
static from<I>(iterable: Iterable<I> | {[key: string]: I}): Stack<I>;
|
|
128
|
+
static of<I>(...items: Array<I>): Stack<I>;
|
|
129
|
+
}
|
|
130
|
+
|
|
5
131
|
/**
|
|
6
132
|
* Common head of two arrays
|
|
7
133
|
*
|
|
@@ -211,146 +337,4 @@ declare function symmetricDifference<T>(a: ReadonlySet<T>, b: ReadonlySet<T>): S
|
|
|
211
337
|
*/
|
|
212
338
|
declare function stringHash(str: string): string;
|
|
213
339
|
|
|
214
|
-
|
|
215
|
-
type NotUndefined = object | string | number | boolean | null | NotUndefined[];
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* @see https://github.com/puleos/object-hash#hashsha1value
|
|
219
|
-
*/
|
|
220
|
-
function sha1(object: NotUndefined): string;
|
|
221
|
-
/**
|
|
222
|
-
* @see https://github.com/puleos/object-hash#hashkeysvalue
|
|
223
|
-
*/
|
|
224
|
-
function keys(object: NotUndefined): string;
|
|
225
|
-
/**
|
|
226
|
-
* @see https://github.com/puleos/object-hash#hashmd5value
|
|
227
|
-
*/
|
|
228
|
-
function MD5(object: NotUndefined): string;
|
|
229
|
-
/**
|
|
230
|
-
* @see https://github.com/puleos/object-hash#hashkeysmd5value
|
|
231
|
-
*/
|
|
232
|
-
function keysMD5(object: NotUndefined): string;
|
|
233
|
-
/**
|
|
234
|
-
* @see https://github.com/puleos/object-hash#hashwritetostreamvalue-options-stream
|
|
235
|
-
*/
|
|
236
|
-
function writeToStream(value: any, stream: Stream): void;
|
|
237
|
-
function writeToStream(value: any, options: Options, stream: Stream): void;
|
|
238
|
-
|
|
239
|
-
type BufferEncoding =
|
|
240
|
-
| "ascii"
|
|
241
|
-
| "base64"
|
|
242
|
-
| "binary"
|
|
243
|
-
| "hex"
|
|
244
|
-
| "latin1"
|
|
245
|
-
| "ucs-2"
|
|
246
|
-
| "ucs2"
|
|
247
|
-
| "utf-8"
|
|
248
|
-
| "utf16le"
|
|
249
|
-
| "utf8";
|
|
250
|
-
|
|
251
|
-
interface Stream {
|
|
252
|
-
update?(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
253
|
-
write?(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
type HashName =
|
|
257
|
-
| "md4"
|
|
258
|
-
| "md4WithRSAEncryption"
|
|
259
|
-
| "md5"
|
|
260
|
-
| "md5WithRSAEncryption"
|
|
261
|
-
| "ripemd"
|
|
262
|
-
| "ripemd160"
|
|
263
|
-
| "ripemd160WithRSA"
|
|
264
|
-
| "rmd160"
|
|
265
|
-
| "rsa-md4"
|
|
266
|
-
| "rsa-md5"
|
|
267
|
-
| "rsa-ripemd160"
|
|
268
|
-
| "rsa-sha1"
|
|
269
|
-
| "rsa-sha1-2"
|
|
270
|
-
| "rsa-sha224"
|
|
271
|
-
| "rsa-sha256"
|
|
272
|
-
| "rsa-sha3-224"
|
|
273
|
-
| "rsa-sha3-256"
|
|
274
|
-
| "rsa-sha3-384"
|
|
275
|
-
| "rsa-sha3-512"
|
|
276
|
-
| "rsa-sha384"
|
|
277
|
-
| "rsa-sha512"
|
|
278
|
-
| "sha1"
|
|
279
|
-
| "sha1WithRSAEncryption"
|
|
280
|
-
| "sha224"
|
|
281
|
-
| "sha224WithRSAEncryption"
|
|
282
|
-
| "sha256"
|
|
283
|
-
| "sha256WithRSAEncryption"
|
|
284
|
-
| "sha3-224"
|
|
285
|
-
| "sha3-256"
|
|
286
|
-
| "sha3-384"
|
|
287
|
-
| "sha3-512"
|
|
288
|
-
| "sha384"
|
|
289
|
-
| "sha384WithRSAEncryption"
|
|
290
|
-
| "sha512"
|
|
291
|
-
| "sha512WithRSAEncryption";
|
|
292
|
-
|
|
293
|
-
interface BaseOptions {
|
|
294
|
-
/**
|
|
295
|
-
* @default 'sha1'
|
|
296
|
-
*/
|
|
297
|
-
algorithm?: HashName | "passthrough" | undefined;
|
|
298
|
-
|
|
299
|
-
excludeKeys?: ((key: string) => boolean) | undefined;
|
|
300
|
-
/**
|
|
301
|
-
* @default false
|
|
302
|
-
*/
|
|
303
|
-
excludeValues?: boolean | undefined;
|
|
304
|
-
/**
|
|
305
|
-
* @default false
|
|
306
|
-
*/
|
|
307
|
-
ignoreUnknown?: boolean | undefined;
|
|
308
|
-
|
|
309
|
-
replacer?: ((value: any) => any) | undefined;
|
|
310
|
-
/**
|
|
311
|
-
* @default true
|
|
312
|
-
*/
|
|
313
|
-
respectFunctionNames?: boolean | undefined;
|
|
314
|
-
/**
|
|
315
|
-
* @default true
|
|
316
|
-
*/
|
|
317
|
-
respectFunctionProperties?: boolean | undefined;
|
|
318
|
-
/**
|
|
319
|
-
* @default true
|
|
320
|
-
*/
|
|
321
|
-
respectType?: boolean | undefined;
|
|
322
|
-
/**
|
|
323
|
-
* @default false
|
|
324
|
-
*/
|
|
325
|
-
unorderedArrays?: boolean | undefined;
|
|
326
|
-
/**
|
|
327
|
-
* @default true
|
|
328
|
-
*/
|
|
329
|
-
unorderedObjects?: boolean | undefined;
|
|
330
|
-
/**
|
|
331
|
-
* @default true
|
|
332
|
-
*/
|
|
333
|
-
unorderedSets?: boolean | undefined;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
interface NormalOption extends BaseOptions {
|
|
337
|
-
/**
|
|
338
|
-
* @default 'hex'
|
|
339
|
-
*/
|
|
340
|
-
encoding?: "hex" | "binary" | "base64" | undefined;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
interface WithBufferOption extends BaseOptions {
|
|
344
|
-
encoding: "buffer";
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
type Options = NormalOption | WithBufferOption;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* @see https://github.com/puleos/object-hash#hashvalue-options
|
|
352
|
-
*/
|
|
353
|
-
declare function objectHash(object: objectHash.NotUndefined, options?: objectHash.NormalOption): string;
|
|
354
|
-
declare function objectHash(object: objectHash.NotUndefined, options?: objectHash.WithBufferOption): Buffer;
|
|
355
|
-
|
|
356
|
-
export { commonHead, compareNatural, compareRelations, delay, difference, equals as equalsSet, getOrCreate, hasAtLeast, ifilter, ifind, iflat, imap, intersection, ireduce, isIterable, isNonEmptyArray, isString, isome, iunique, objectHash, stringHash, symmetricDifference, toArray, toSet, union };
|
|
340
|
+
export { DefaultMap, LinkedList, Queue, Stack, commonHead, compareNatural, compareRelations, delay, difference, equals as equalsSet, getOrCreate, hasAtLeast, ifilter, ifind, iflat, imap, intersection, ireduce, isIterable, isNonEmptyArray, isString, isome, iunique, stringHash, symmetricDifference, toArray, toSet, union };
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as t,
|
|
2
|
-
export { h as ancestorsFqn,
|
|
3
|
-
import { i as invariant } from '../shared/core.
|
|
1
|
+
import { d as t, _ as n, j as commonAncestor, o as compareFqnHierarchically } from '../shared/core.CCyhaU-4.mjs';
|
|
2
|
+
export { D as DefaultMap, e as LinkedList, q as Queue, S as Stack, h as ancestorsFqn, f as commonHead, k as compareByFqnHierarchically, g as compareNatural, K as difference, L as equalsSet, z as getOrCreate, a as hasAtLeast, r as hierarchyDistance, s as hierarchyLevel, C as ifilter, i as ifind, E as iflat, F as imap, M as intersection, u as isAncestor, v as isDescendantOf, G as isIterable, A as isNonEmptyArray, c as isSameHierarchy, B as isString, H as isome, I as iunique, n as nameFromFqn, Q as objectHash, p as parentFqn, w as sortByFqnHierarchically, x as sortNaturalByFqn, y as sortParentsFirst, P as stringHash, N as symmetricDifference, J as toArray, t as toSet, O as union } from '../shared/core.CCyhaU-4.mjs';
|
|
3
|
+
import { i as invariant } from '../shared/core.Bezy7K65.mjs';
|
|
4
4
|
|
|
5
5
|
function o(r,n){let e=Math.ceil(r),t=Math.floor(n);if(t<e)throw new RangeError(`randomInteger: The range [${r.toString()},${n.toString()}] contains no integer`);return Math.floor(Math.random()*(t-e+1)+e)}
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likec4/core",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://likec4.dev",
|
|
6
6
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"dist",
|
|
24
24
|
"src",
|
|
25
25
|
"!**/*.spec.ts",
|
|
26
|
+
"!**/*.test-d.ts",
|
|
26
27
|
"!**/__tests__/*",
|
|
27
28
|
"!**/*.map"
|
|
28
29
|
],
|
|
@@ -111,7 +112,7 @@
|
|
|
111
112
|
},
|
|
112
113
|
"devDependencies": {
|
|
113
114
|
"@dagrejs/dagre": "1.1.4",
|
|
114
|
-
"@likec4/tsconfig": "1.20.
|
|
115
|
+
"@likec4/tsconfig": "1.20.2",
|
|
115
116
|
"@mantine/colors-generator": "7.15.2",
|
|
116
117
|
"@types/natural-compare-lite": "^1.4.2",
|
|
117
118
|
"@types/object-hash": "^3.0.6",
|
|
@@ -120,14 +121,14 @@
|
|
|
120
121
|
"graphology": "^0.25.4",
|
|
121
122
|
"graphology-dag": "^0.4.1",
|
|
122
123
|
"graphology-types": "^0.24.8",
|
|
123
|
-
"mnemonist": "^0.
|
|
124
|
+
"mnemonist": "^0.40.0",
|
|
124
125
|
"natural-compare-lite": "^1.4.0",
|
|
125
126
|
"object-hash": "^3.0.0",
|
|
126
|
-
"obliterator": "^2.0.
|
|
127
|
+
"obliterator": "^2.0.5",
|
|
127
128
|
"remeda": "^2.19.0",
|
|
128
|
-
"turbo": "^2.3.
|
|
129
|
+
"turbo": "^2.3.4",
|
|
129
130
|
"typescript": "^5.7.3",
|
|
130
|
-
"unbuild": "^3.
|
|
131
|
+
"unbuild": "^3.3.1",
|
|
131
132
|
"vitest": "^2.1.8"
|
|
132
133
|
},
|
|
133
134
|
"packageManager": "yarn@4.6.0"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import DefaultMap from 'mnemonist
|
|
1
|
+
import { DefaultMap } from 'mnemonist'
|
|
2
2
|
import { forEach, only, pipe } from 'remeda'
|
|
3
3
|
import { differenceConnections } from '../../../model/connection'
|
|
4
4
|
import type { RelationshipModel } from '../../../model/RelationModel'
|
|
@@ -451,6 +451,7 @@ export function $custom(
|
|
|
451
451
|
icon?: string
|
|
452
452
|
opacity?: number
|
|
453
453
|
navigateTo?: string
|
|
454
|
+
multiple?: boolean
|
|
454
455
|
},
|
|
455
456
|
): C4CustomElementExpr {
|
|
456
457
|
return {
|
|
@@ -588,6 +589,7 @@ type CustomProps = {
|
|
|
588
589
|
icon?: string
|
|
589
590
|
opacity?: number
|
|
590
591
|
navigateTo?: string
|
|
592
|
+
multiple?: boolean
|
|
591
593
|
} & Omit<C4CustomRelationExpr['customRelation'], 'relation' | 'navigateTo'>
|
|
592
594
|
}
|
|
593
595
|
export function $include(expr: Expression | C4Expression, props?: CustomProps): ViewRulePredicate {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import DefaultMap from 'mnemonist
|
|
1
|
+
import { DefaultMap } from 'mnemonist'
|
|
2
2
|
import { filter, findLast, forEach, map, pipe } from 'remeda'
|
|
3
3
|
import { invariant, nonexhaustive, nonNullable } from '../../errors'
|
|
4
4
|
import { ConnectionModel } from '../../model/connection/model/ConnectionModel'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import Stack from 'mnemonist
|
|
1
|
+
import { Stack } from 'mnemonist'
|
|
2
2
|
import { nonNullable } from '../../../errors'
|
|
3
3
|
import type { ConnectionModel } from '../../../model/connection'
|
|
4
4
|
import type { ElementModel } from '../../../model/ElementModel'
|
|
5
5
|
import type { Expression, NodeId, ViewRuleGroup } from '../../../types'
|
|
6
|
-
import {
|
|
6
|
+
import { type ComputeCtx, type CtxElement, type MutableState, type StageExpression, AbstractMemory } from '../../memory'
|
|
7
7
|
import { NodesGroup } from './NodeGroup'
|
|
8
8
|
import { ActiveGroupStageExclude, StageExclude } from './stage-exclude'
|
|
9
9
|
import { ActiveGroupStageInclude, StageInclude } from './stage-include'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dagre, { type EdgeConfig, type GraphLabel } from '@dagrejs/dagre'
|
|
2
|
-
import DefaultMap from 'mnemonist
|
|
2
|
+
import { DefaultMap } from 'mnemonist'
|
|
3
3
|
import { concat, filter, forEachObj, groupBy, map, mapToObj, pipe, prop, reduce, tap } from 'remeda'
|
|
4
4
|
import { invariant } from '../../errors'
|
|
5
5
|
import type { ElementModel } from '../../model/ElementModel'
|