@likec4/core 1.42.1 → 1.44.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.
- package/dist/builder/index.d.mts +9 -9
- package/dist/builder/index.mjs +10 -8
- package/dist/compute-view/index.d.mts +9 -9
- package/dist/compute-view/index.mjs +7 -7
- package/dist/compute-view/relationships-view/index.d.mts +7 -7
- package/dist/compute-view/relationships-view/index.mjs +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +7 -7
- package/dist/model/connection/deployment/index.d.mts +9 -9
- package/dist/model/connection/deployment/index.mjs +2 -2
- package/dist/model/connection/index.d.mts +10 -10
- package/dist/model/connection/index.mjs +3 -3
- package/dist/model/connection/model/index.d.mts +9 -9
- package/dist/model/connection/model/index.mjs +2 -2
- package/dist/model/index.d.mts +26 -12
- package/dist/model/index.mjs +4 -4
- package/dist/shared/{core.DSO_rTC2.mjs → core.23WeDKcI.mjs} +269 -632
- package/dist/shared/{core.D_vkffV4.d.mts → core.5ZQ-r3Oa.d.mts} +22 -2
- package/dist/shared/{core.DRhg-gVU.mjs → core.6VsRBhGY.mjs} +7 -101
- package/dist/shared/{core.yna0OdV5.d.mts → core.8mmHFn9g.d.mts} +2 -2
- package/dist/shared/core.B9BjmjuH.mjs +9 -0
- package/dist/shared/{core.fHR_8Tnq.d.mts → core.BMtVqKl7.d.mts} +89 -11
- package/dist/shared/{core.rCeaAqgW.mjs → core.BdPcbSkN.mjs} +1 -1
- package/dist/shared/{core.DIol3syK.d.mts → core.BnDbAOR2.d.mts} +2 -2
- package/dist/shared/{core.CQngdcuj.d.mts → core.BnOetIAR.d.mts} +2 -2
- package/dist/shared/core.BuQZczj6.mjs +38 -0
- package/dist/shared/core.Bv3cd-jC.mjs +102 -0
- package/dist/shared/{core.B7KhhkRY.mjs → core.C0Ye2OCr.mjs} +1 -1
- package/dist/shared/{core.Dgs6-nuz.d.mts → core.CDOKQTW6.d.mts} +56 -37
- package/dist/shared/{core.BIqHjQiH.mjs → core.CHwVhuc9.mjs} +36 -10
- package/dist/shared/{core.DdMJk7nx.d.mts → core.CKNmSm2W.d.mts} +85 -89
- package/dist/shared/{core.DFi2dOTl.mjs → core.CR3PmPzr.mjs} +85 -1
- package/dist/shared/{core.C2TiyjI6.mjs → core.CbsSAn1j.mjs} +19 -19
- package/dist/shared/{core.QJD_fcrc.mjs → core.CmPXpJ8l.mjs} +1 -14
- package/dist/shared/{core.D5fzJWbF.d.mts → core.DB0Ue5Wx.d.mts} +1 -1
- package/dist/shared/{core.DNbUPnve.mjs → core.DEieYfbG.mjs} +27 -25
- package/dist/shared/{core.C8YY6Uub.mjs → core.DFCHU59b.mjs} +4 -4
- package/dist/shared/{core.BYNkXQ8A.mjs → core.DH7TXqXf.mjs} +30 -1
- package/dist/shared/{core.DMMOWQqc.mjs → core.DIE3F6sw.mjs} +2 -2
- package/dist/shared/{core.s9uwOt60.d.mts → core.DTJYgLXI.d.mts} +3 -3
- package/dist/shared/{core.D0PjZzIS.d.mts → core.DjAM-S6a.d.mts} +179 -82
- package/dist/shared/{core.CNgZvKb8.mjs → core.DrUt0Lbi.mjs} +1 -1
- package/dist/shared/core.M9ayqQZa.mjs +1207 -0
- package/dist/shared/{core.DACpKp35.d.mts → core.WwMWeiFL.d.mts} +4 -4
- package/dist/shared/{core.lRvxPoao.mjs → core.bKIs4oDO.mjs} +3 -3
- package/dist/shared/{core.C8sl5Y8Z.mjs → core.h4TqqSC0.mjs} +1360 -124
- package/dist/shared/core.q10OP9oJ.mjs +5 -0
- package/dist/shared/core.uFk_o9X6.mjs +13 -0
- package/dist/styles/index.d.mts +18 -8
- package/dist/styles/index.mjs +63 -1
- package/dist/types/_aux.d.mts +2 -2
- package/dist/types/_aux.mjs +8 -1
- package/dist/types/expression-model.d.mts +3 -3
- package/dist/types/expression.d.mts +3 -3
- package/dist/types/fqnRef.d.mts +7 -8
- package/dist/types/index.d.mts +17 -13
- package/dist/types/index.mjs +28 -5
- package/dist/utils/graphology/index.mjs +1 -1
- package/dist/utils/index.d.mts +3 -2
- package/dist/utils/index.mjs +8 -6
- package/dist/utils/iterable/index.d.mts +1 -1
- package/dist/utils/iterable/index.mjs +2 -1
- package/package.json +21 -20
- package/dist/shared/core.01VTr9qu.mjs +0 -170
- package/dist/shared/core.1vX5a9AY.mjs +0 -86
- package/dist/shared/core.BazD6cot.mjs +0 -14
- package/dist/shared/core.BzTakU3I.mjs +0 -67
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IterableContainer, R as ReorderedArray, N as NonEmptyArray } from './core.
|
|
1
|
+
import { I as IterableContainer, R as ReorderedArray, N as NonEmptyArray } from './core.DB0Ue5Wx.mjs';
|
|
2
2
|
import { F as Fqn } from './core.DX-WYEPA.mjs';
|
|
3
3
|
import { SetRequired, SetNonNullable } from 'type-fest';
|
|
4
4
|
|
|
@@ -307,6 +307,26 @@ declare function sortNaturalByFqn<A extends IterableContainer<WithId>>(array: A,
|
|
|
307
307
|
declare function isString(value: unknown): value is string;
|
|
308
308
|
declare function isNonEmptyArray<A>(arr: ArrayLike<A> | undefined): arr is NonEmptyArray<A>;
|
|
309
309
|
declare function hasProp<T extends object, P extends keyof T & string>(value: T, path: P): value is SetRequired<SetNonNullable<T, P>, P>;
|
|
310
|
+
type Guard<N = unknown> = (n: unknown) => n is N;
|
|
311
|
+
type Guarded<G> = G extends Guard<infer N> ? N : never;
|
|
312
|
+
/**
|
|
313
|
+
* Creates a type guard that checks if a value matches any of the provided predicates.
|
|
314
|
+
*
|
|
315
|
+
* @template Predicates - A non-empty array of guard functions
|
|
316
|
+
* @param predicates - The guard functions to test against
|
|
317
|
+
* @returns A type guard function that returns true if the value matches any of the predicates
|
|
318
|
+
*
|
|
319
|
+
* @example
|
|
320
|
+
* ```typescript
|
|
321
|
+
* const isStringOrNumber = isAnyOf(isString, isNumber);
|
|
322
|
+
*
|
|
323
|
+
* if (isStringOrNumber(value)) {
|
|
324
|
+
* // value is now typed as string | number
|
|
325
|
+
* console.log(value);
|
|
326
|
+
* }
|
|
327
|
+
* ```
|
|
328
|
+
*/
|
|
329
|
+
declare function isAnyOf<const Predicates extends NonEmptyArray<Guard>>(...predicates: Predicates): (value: unknown) => value is Guarded<Predicates[number]>;
|
|
310
330
|
|
|
311
331
|
/**
|
|
312
332
|
* Saves the value returned by fn() in a hidden property tag of obj object, so next time memoizeProp() is called,
|
|
@@ -329,4 +349,4 @@ declare function hasProp<T extends object, P extends keyof T & string>(value: T,
|
|
|
329
349
|
*/
|
|
330
350
|
declare function memoizeProp<Tag extends symbol | string, Res>(obj: object, tag: Tag, fn: () => Res): Res;
|
|
331
351
|
|
|
332
|
-
export { BiMap as B, DefaultWeakMap as D, LinkedList as L, MultiMap as M, Queue as Q, ancestorsFqn as a, isAncestor as b, isDescendantOf as c, isNonEmptyArray as d, isSameHierarchy as e, isString as f, nonexhaustive as g, hasProp as h, invariant as i, nonNullable as j, sortParentsFirst as k, commonAncestor as l, memoizeProp as m, nameFromFqn as n, compareByFqnHierarchically as o, parentFqn as p, compareFqnHierarchically as q, hierarchyDistance as r, sortNaturalByFqn as s, hierarchyLevel as t, sortByFqnHierarchically as u };
|
|
352
|
+
export { BiMap as B, DefaultWeakMap as D, LinkedList as L, MultiMap as M, Queue as Q, ancestorsFqn as a, isAncestor as b, isDescendantOf as c, isNonEmptyArray as d, isSameHierarchy as e, isString as f, nonexhaustive as g, hasProp as h, invariant as i, nonNullable as j, sortParentsFirst as k, commonAncestor as l, memoizeProp as m, nameFromFqn as n, compareByFqnHierarchically as o, parentFqn as p, compareFqnHierarchically as q, hierarchyDistance as r, sortNaturalByFqn as s, hierarchyLevel as t, sortByFqnHierarchically as u, isAnyOf as v };
|
|
@@ -1,103 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { e } from './core.CqAJJpK_.mjs';
|
|
3
|
-
|
|
4
|
-
var naturalCompareLite = {exports: {}};
|
|
5
|
-
|
|
6
|
-
var hasRequiredNaturalCompareLite;
|
|
7
|
-
|
|
8
|
-
function requireNaturalCompareLite () {
|
|
9
|
-
if (hasRequiredNaturalCompareLite) return naturalCompareLite.exports;
|
|
10
|
-
hasRequiredNaturalCompareLite = 1;
|
|
11
|
-
/*
|
|
12
|
-
* @version 1.4.0
|
|
13
|
-
* @date 2015-10-26
|
|
14
|
-
* @stability 3 - Stable
|
|
15
|
-
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
16
|
-
* @license MIT License
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var naturalCompare = function(a, b) {
|
|
21
|
-
var i, codeA
|
|
22
|
-
, codeB = 1
|
|
23
|
-
, posA = 0
|
|
24
|
-
, posB = 0
|
|
25
|
-
, alphabet = String.alphabet;
|
|
26
|
-
|
|
27
|
-
function getCode(str, pos, code) {
|
|
28
|
-
if (code) {
|
|
29
|
-
for (i = pos; code = getCode(str, i), code < 76 && code > 65;) ++i;
|
|
30
|
-
return +str.slice(pos - 1, i)
|
|
31
|
-
}
|
|
32
|
-
code = alphabet && alphabet.indexOf(str.charAt(pos));
|
|
33
|
-
return code > -1 ? code + 76 : ((code = str.charCodeAt(pos) || 0), code < 45 || code > 127) ? code
|
|
34
|
-
: code < 46 ? 65 // -
|
|
35
|
-
: code < 48 ? code - 1
|
|
36
|
-
: code < 58 ? code + 18 // 0-9
|
|
37
|
-
: code < 65 ? code - 11
|
|
38
|
-
: code < 91 ? code + 11 // A-Z
|
|
39
|
-
: code < 97 ? code - 37
|
|
40
|
-
: code < 123 ? code + 5 // a-z
|
|
41
|
-
: code - 63
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if ((a+="") != (b+="")) for (;codeB;) {
|
|
46
|
-
codeA = getCode(a, posA++);
|
|
47
|
-
codeB = getCode(b, posB++);
|
|
48
|
-
|
|
49
|
-
if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
|
|
50
|
-
codeA = getCode(a, posA, posA);
|
|
51
|
-
codeB = getCode(b, posB, posA = i);
|
|
52
|
-
posB = i;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (codeA != codeB) return (codeA < codeB) ? -1 : 1
|
|
56
|
-
}
|
|
57
|
-
return 0
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
try {
|
|
61
|
-
naturalCompareLite.exports = naturalCompare;
|
|
62
|
-
} catch (e) {
|
|
63
|
-
String.naturalCompare = naturalCompare;
|
|
64
|
-
}
|
|
65
|
-
return naturalCompareLite.exports;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var naturalCompareLiteExports = requireNaturalCompareLite();
|
|
69
|
-
const compare = /*@__PURE__*/getDefaultExportFromCjs(naturalCompareLiteExports);
|
|
70
|
-
|
|
71
|
-
function compareNatural(a, b) {
|
|
72
|
-
if (a === b) return 0;
|
|
73
|
-
if (e(a)) {
|
|
74
|
-
if (e(b)) {
|
|
75
|
-
return compare(a, b);
|
|
76
|
-
}
|
|
77
|
-
return 1;
|
|
78
|
-
}
|
|
79
|
-
return e(b) ? -1 : 0;
|
|
80
|
-
}
|
|
81
|
-
function compareNaturalHierarchically(separator = ".", deepestFirst = false) {
|
|
82
|
-
return (a, b) => {
|
|
83
|
-
if (a === b) return 0;
|
|
84
|
-
if (!a) return -1;
|
|
85
|
-
if (!b) return 1;
|
|
86
|
-
const aParts = a.split(separator);
|
|
87
|
-
const bParts = b.split(separator);
|
|
88
|
-
const minLength = Math.min(aParts.length, bParts.length);
|
|
89
|
-
for (let i = 0; i < minLength; i++) {
|
|
90
|
-
const aPart = aParts[i];
|
|
91
|
-
const bPart = bParts[i];
|
|
92
|
-
const comparison = compare(aPart, bPart);
|
|
93
|
-
if (comparison !== 0) {
|
|
94
|
-
return comparison;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
const diff = aParts.length - bParts.length;
|
|
98
|
-
return deepestFirst ? -1 * diff : diff;
|
|
99
|
-
};
|
|
100
|
-
}
|
|
1
|
+
import { c as compareNatural } from './core.Bv3cd-jC.mjs';
|
|
101
2
|
|
|
102
3
|
function isString(value) {
|
|
103
4
|
return value != null && typeof value === "string";
|
|
@@ -108,6 +9,11 @@ function isNonEmptyArray(arr) {
|
|
|
108
9
|
function hasProp(value, path) {
|
|
109
10
|
return value[path] != null;
|
|
110
11
|
}
|
|
12
|
+
function isAnyOf(...predicates) {
|
|
13
|
+
return (value) => {
|
|
14
|
+
return predicates.some((predicate) => predicate(value));
|
|
15
|
+
};
|
|
16
|
+
}
|
|
111
17
|
|
|
112
18
|
function parentFqn(fqn) {
|
|
113
19
|
const lastDot = fqn.lastIndexOf(".");
|
|
@@ -267,4 +173,4 @@ function sortNaturalByFqn(array, sort) {
|
|
|
267
173
|
}).map(({ item }) => item);
|
|
268
174
|
}
|
|
269
175
|
|
|
270
|
-
export { ancestorsFqn as a, isDescendantOf as b, isNonEmptyArray as c, isSameHierarchy as d, isString as e, sortParentsFirst as f,
|
|
176
|
+
export { ancestorsFqn as a, isDescendantOf as b, isNonEmptyArray as c, isSameHierarchy as d, isString as e, sortParentsFirst as f, commonAncestor as g, hasProp as h, isAncestor as i, compareByFqnHierarchically as j, compareFqnHierarchically as k, hierarchyDistance as l, hierarchyLevel as m, nameFromFqn as n, sortByFqnHierarchically as o, parentFqn as p, isAnyOf as q, sortNaturalByFqn as s };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as LikeC4StylesConfig, b as LikeC4Theme, L as LikeC4StyleDefaults, U as ElementColorValues, V as RelationshipColorValues, D as ThemeColor, T as ThemeColorValues, p as TextSize, r as SpacingSize, q as ShapeSize } from './core.
|
|
1
|
+
import { a as LikeC4StylesConfig, b as LikeC4Theme, L as LikeC4StyleDefaults, U as ElementColorValues, V as RelationshipColorValues, D as ThemeColor, T as ThemeColorValues, p as TextSize, r as SpacingSize, q as ShapeSize } from './core.BnOetIAR.mjs';
|
|
2
2
|
import { LiteralUnion } from 'type-fest';
|
|
3
|
-
import {
|
|
3
|
+
import { m as LikeC4ProjectStylesConfig, K as ComputedNodeStyle } from './core.BMtVqKl7.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Styles of a LikeC4 project
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { t as t$3 } from './core.BsSXS-_R.mjs';
|
|
2
|
+
|
|
3
|
+
function t$2(...t){return t$3(Object.entries,t)}
|
|
4
|
+
|
|
5
|
+
function e(e,...n){return typeof e==`string`||typeof e==`number`||typeof e==`symbol`?r=>t$1(r,e,...n):t$1(e,...n)}function t$1(e,...t){let n=e;for(let e of t){if(n==null)return;n=n[e];}return n}
|
|
6
|
+
|
|
7
|
+
function t(...t){return t$3(n,t)}function n(e,t){let n=[...e];return n.sort(t),n}
|
|
8
|
+
|
|
9
|
+
export { t as a, e, t$2 as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Tagged, NonEmptyTuple, PartialDeep, WritableDeep, Except } from 'type-fest';
|
|
2
|
-
import { s as BorderStyle, q as ShapeSize, r as SpacingSize, p as TextSize, Q as Color, u as ElementShape, v as RelationshipLineType, y as RelationshipArrowType, b as LikeC4Theme, L as LikeC4StyleDefaults } from './core.
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Tagged, NonEmptyTuple, IsNever, PartialDeep, WritableDeep, Except } from 'type-fest';
|
|
2
|
+
import { s as BorderStyle, q as ShapeSize, r as SpacingSize, p as TextSize, Q as Color, u as ElementShape, v as RelationshipLineType, y as RelationshipArrowType, D as ThemeColor, C as ColorLiteral, I as CustomColorDefinitions, b as LikeC4Theme, L as LikeC4StyleDefaults } from './core.BnOetIAR.mjs';
|
|
3
|
+
import { A as Any, s as WithOptionalTags, u as WithOptionalLinks, m as StrictViewId, j as _stage, k as _type, F as Fqn, R as RelationKind, W as WithDescriptionAndTech, v as WithMetadata, w as WithNotation, n as ElementKind, T as Tag, y as DeploymentKind, C as MetadataKey, G as WithTags, x as DeploymentFqn } from './core.CDOKQTW6.mjs';
|
|
4
|
+
import { N as NonEmptyArray, E as ExclusiveUnion, a as NonEmptyReadonlyArray, L as Link } from './core.DB0Ue5Wx.mjs';
|
|
5
|
+
import { I as Icon, M as MarkdownOrString, d as RelationId, T as Tag$1, P as ProjectId, N as NodeId, j as EdgeId, m as StepEdgeKind } from './core.DX-WYEPA.mjs';
|
|
5
6
|
import { FqnRef } from '../types/fqnRef.mjs';
|
|
6
|
-
import { N as NonEmptyArray, E as ExclusiveUnion, a as NonEmptyReadonlyArray } from './core.D5fzJWbF.mjs';
|
|
7
7
|
import { ModelExpression, ModelFqnExpr } from '../types/expression-model.mjs';
|
|
8
8
|
|
|
9
9
|
type Point = readonly [x: number, y: number];
|
|
@@ -21,9 +21,14 @@ declare namespace BBox {
|
|
|
21
21
|
function center({ x, y, width, height }: BBox): XYPoint;
|
|
22
22
|
function fromPoints(points: Point[]): BBox;
|
|
23
23
|
function merge(...boxes: BBox[]): BBox;
|
|
24
|
+
function fromRectBox(rect: RectBox): BBox;
|
|
24
25
|
function toRectBox(box: BBox): RectBox;
|
|
25
26
|
function expand(box: BBox, plus: number): BBox;
|
|
26
27
|
function shrink(box: BBox, minus: number): BBox;
|
|
28
|
+
/**
|
|
29
|
+
* Returns true if `a` includes `b` (i.e. `b` is inside `a`)
|
|
30
|
+
*/
|
|
31
|
+
function includes(a: BBox, b: BBox): boolean;
|
|
27
32
|
}
|
|
28
33
|
interface RectBox {
|
|
29
34
|
x1: number;
|
|
@@ -36,6 +41,10 @@ declare namespace RectBox {
|
|
|
36
41
|
function fromPoints(points: Point[]): RectBox;
|
|
37
42
|
function merge(...boxes: RectBox[]): RectBox;
|
|
38
43
|
function toBBox(box: RectBox): BBox;
|
|
44
|
+
/**
|
|
45
|
+
* Returns true if `a` includes `b` (i.e. `b` is inside `a`)
|
|
46
|
+
*/
|
|
47
|
+
function includes(a: RectBox, b: RectBox): boolean;
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
interface AnyIncludePredicate<Expr> {
|
|
@@ -82,6 +91,12 @@ interface ViewAutoLayout {
|
|
|
82
91
|
rankSep?: number;
|
|
83
92
|
nodeSep?: number;
|
|
84
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* v1 Manual layout of a view, stored in the block comment to the view definition.
|
|
96
|
+
* Keeping this type for backward compatibility and migration purposes.
|
|
97
|
+
*
|
|
98
|
+
* @deprecated Use {@link ViewManualLayoutSnapshot} instead
|
|
99
|
+
*/
|
|
85
100
|
type ViewManualLayout = {
|
|
86
101
|
readonly hash: string;
|
|
87
102
|
readonly x: number;
|
|
@@ -125,10 +140,6 @@ interface BaseParsedViewProperties<A extends Any> extends BaseViewProperties<A>
|
|
|
125
140
|
* Undefined if the view is auto-generated.
|
|
126
141
|
*/
|
|
127
142
|
readonly docUri?: string | undefined;
|
|
128
|
-
/**
|
|
129
|
-
* If the view is changed manually this field contains the layout data.
|
|
130
|
-
*/
|
|
131
|
-
readonly manualLayout?: ViewManualLayout | undefined;
|
|
132
143
|
}
|
|
133
144
|
type NodeNotation = {
|
|
134
145
|
kinds: string[];
|
|
@@ -320,6 +331,64 @@ interface Relationship<A extends Any = Any> extends AbstractRelationship<A> {
|
|
|
320
331
|
*/
|
|
321
332
|
type ModelRelation<A extends Any = Any> = Relationship<A>;
|
|
322
333
|
|
|
334
|
+
/**
|
|
335
|
+
* Element and deployment kind specification
|
|
336
|
+
*/
|
|
337
|
+
interface ElementSpecification {
|
|
338
|
+
tags?: Tag$1[];
|
|
339
|
+
title?: string;
|
|
340
|
+
summary?: MarkdownOrString;
|
|
341
|
+
description?: MarkdownOrString;
|
|
342
|
+
technology?: string;
|
|
343
|
+
notation?: string;
|
|
344
|
+
links?: NonEmptyArray<Link>;
|
|
345
|
+
style: {
|
|
346
|
+
shape?: ElementShape;
|
|
347
|
+
icon?: Icon;
|
|
348
|
+
color?: Color;
|
|
349
|
+
border?: BorderStyle;
|
|
350
|
+
opacity?: number;
|
|
351
|
+
size?: ShapeSize;
|
|
352
|
+
padding?: SpacingSize;
|
|
353
|
+
textSize?: TextSize;
|
|
354
|
+
multiple?: boolean;
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
interface TagSpecification {
|
|
358
|
+
color: ThemeColor | ColorLiteral;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Checks if tag color is defined in the specification
|
|
362
|
+
* Expects HEX, `rgb(...)` or `rgba(...)` color
|
|
363
|
+
*/
|
|
364
|
+
declare function isTagColorSpecified(spec: string | TagSpecification): spec is {
|
|
365
|
+
color: ColorLiteral;
|
|
366
|
+
};
|
|
367
|
+
interface RelationshipSpecification {
|
|
368
|
+
technology?: string;
|
|
369
|
+
notation?: string;
|
|
370
|
+
color?: Color;
|
|
371
|
+
line?: RelationshipLineType;
|
|
372
|
+
head?: RelationshipArrowType;
|
|
373
|
+
tail?: RelationshipArrowType;
|
|
374
|
+
}
|
|
375
|
+
type Specification<A> = A extends Any ? {
|
|
376
|
+
tags: {
|
|
377
|
+
[key in Tag<A>]: TagSpecification;
|
|
378
|
+
};
|
|
379
|
+
elements: {
|
|
380
|
+
[key in ElementKind<A>]: Partial<ElementSpecification>;
|
|
381
|
+
};
|
|
382
|
+
deployments: {
|
|
383
|
+
[key in DeploymentKind<A>]: Partial<ElementSpecification>;
|
|
384
|
+
};
|
|
385
|
+
relationships: {
|
|
386
|
+
[key in RelationKind<A>]: Partial<RelationshipSpecification>;
|
|
387
|
+
};
|
|
388
|
+
metadataKeys?: IsNever<MetadataKey<A>> extends true ? never : MetadataKey<A>[];
|
|
389
|
+
customColors?: CustomColorDefinitions;
|
|
390
|
+
} : never;
|
|
391
|
+
|
|
323
392
|
type LikeC4ProjectTheme = PartialDeep<WritableDeep<LikeC4Theme>, {
|
|
324
393
|
recurseIntoArrays: false;
|
|
325
394
|
allowUndefinedInNonTupleArrays: false;
|
|
@@ -332,6 +401,9 @@ interface LikeC4ProjectStylesConfig {
|
|
|
332
401
|
theme?: LikeC4ProjectTheme;
|
|
333
402
|
defaults?: LikeC4ProjectStyleDefaults;
|
|
334
403
|
}
|
|
404
|
+
interface LikeC4ProjectManualLayoutsConfig {
|
|
405
|
+
outDir: string;
|
|
406
|
+
}
|
|
335
407
|
/**
|
|
336
408
|
* Configuration of the project, as read from the config file.
|
|
337
409
|
* LikeC4 projects encapsulate models, and can import from each other
|
|
@@ -346,6 +418,7 @@ interface LikeC4Project {
|
|
|
346
418
|
* Custom styles
|
|
347
419
|
*/
|
|
348
420
|
styles?: LikeC4ProjectStylesConfig | undefined;
|
|
421
|
+
manualLayouts?: LikeC4ProjectManualLayoutsConfig | undefined;
|
|
349
422
|
}
|
|
350
423
|
|
|
351
424
|
type ComputedNodeStyle = Except<ElementStyle, 'icon' | 'shape' | 'color', {
|
|
@@ -425,7 +498,12 @@ interface BaseComputedViewProperties<A extends Any> extends BaseViewProperties<A
|
|
|
425
498
|
readonly nodes: ComputedNode<A>[];
|
|
426
499
|
readonly edges: ComputedEdge<A>[];
|
|
427
500
|
/**
|
|
428
|
-
* If the view
|
|
501
|
+
* If the view has manual layout (v2)
|
|
502
|
+
*/
|
|
503
|
+
readonly hasManualLayout?: boolean;
|
|
504
|
+
/**
|
|
505
|
+
* Manual layout data (v1), for compatibility during migration
|
|
506
|
+
* @deprecated
|
|
429
507
|
*/
|
|
430
508
|
readonly manualLayout?: ViewManualLayout | undefined;
|
|
431
509
|
}
|
|
@@ -447,4 +525,4 @@ interface ComputedDynamicView<A extends Any = Any> extends BaseComputedViewPrope
|
|
|
447
525
|
readonly variant: DynamicViewDisplayVariant;
|
|
448
526
|
}
|
|
449
527
|
|
|
450
|
-
export { type
|
|
528
|
+
export { type DynamicStepsParallel as $, type AbstractRelationship as A, BBox as B, type ViewManualLayout as C, type ViewType as D, type ElementStyle as E, type BaseViewProperties as F, type GlobalPredicateId as G, type BaseParsedViewProperties as H, type ViewWithNotation as I, type ViewWithHash as J, type ComputedNodeStyle as K, type LikeC4ProjectTheme as L, type ModelGlobals as M, type NodeNotation as N, type ComputedNode as O, type Point as P, type ComputedEdge as Q, RectBox as R, type Specification as S, type TagSpecification as T, type ComputedElementView as U, type ViewRuleGlobalStyle as V, type ComputedDeploymentView as W, type XYPoint as X, type ComputedDynamicView as Y, type DynamicStep as Z, type DynamicStepsSeries as _, type GlobalPredicates as a, getParallelStepsPrefix as a0, type DynamicViewStep as a1, isDynamicStep as a2, isDynamicStepsParallel as a3, isDynamicStepsSeries as a4, type DynamicViewIncludeRule as a5, type DynamicViewRule as a6, type DynamicViewDisplayVariant as a7, type ParsedDynamicView as a8, type ElementViewIncludePredicate as a9, type ElementViewExcludePredicate as aa, type ElementViewPredicate as ab, type ElementViewRuleGroup as ac, isViewRuleGroup as ad, type ElementViewRuleStyle as ae, type ElementViewRule as af, type ParsedElementView as ag, type GlobalDynamicPredicates as b, type GlobalStyleID as c, type GlobalStyles as d, ensureSizes as e, type Element as f, type Relationship as g, type ModelRelation as h, type ElementSpecification as i, isTagColorSpecified as j, type RelationshipSpecification as k, type LikeC4ProjectStyleDefaults as l, type LikeC4ProjectStylesConfig as m, type LikeC4ProjectManualLayoutsConfig as n, type LikeC4Project as o, type AnyIncludePredicate as p, type AnyExcludePredicate as q, type AnyViewRuleStyle as r, isViewRuleGlobalStyle as s, type ViewRuleGlobalPredicateRef as t, isViewRuleGlobalPredicateRef as u, type AutoLayoutDirection as v, isAutoLayoutDirection as w, type ViewRuleAutoLayout as x, isViewRuleAutoLayout as y, type ViewAutoLayout as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ElementModel,
|
|
2
|
-
import { A as Any } from './core.
|
|
1
|
+
import { E as ElementModel, D as DeploymentElementModel } from './core.DjAM-S6a.mjs';
|
|
2
|
+
import { A as Any } from './core.CDOKQTW6.mjs';
|
|
3
3
|
import { F as Fqn } from './core.DX-WYEPA.mjs';
|
|
4
4
|
|
|
5
5
|
interface Connection<Elem = ElementModel<Any> | DeploymentElementModel<Any>, Id = string> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TupleToUnion, Tagged } from 'type-fest';
|
|
2
|
-
import { A as Any, T as Tag,
|
|
3
|
-
import { N as NonEmptyArray, E as ExclusiveUnion } from './core.
|
|
2
|
+
import { A as Any, T as Tag, q as AllKinds, r as Tags, m as StrictViewId, n as ElementKind } from './core.CDOKQTW6.mjs';
|
|
3
|
+
import { N as NonEmptyArray, E as ExclusiveUnion } from './core.DB0Ue5Wx.mjs';
|
|
4
4
|
import { FqnRef } from '../types/fqnRef.mjs';
|
|
5
5
|
import { M as MarkdownOrString, I as Icon } from './core.DX-WYEPA.mjs';
|
|
6
6
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { e as isStepEdgeId } from './core.C_Ni6yHl.mjs';
|
|
2
|
+
|
|
3
|
+
function e(e){return Array.isArray(e)}
|
|
4
|
+
|
|
5
|
+
function isViewRuleGlobalStyle(rule) {
|
|
6
|
+
return "styleId" in rule;
|
|
7
|
+
}
|
|
8
|
+
function isViewRuleGlobalPredicateRef(rule) {
|
|
9
|
+
return "predicateId" in rule;
|
|
10
|
+
}
|
|
11
|
+
function isAutoLayoutDirection(autoLayout) {
|
|
12
|
+
return autoLayout === "TB" || autoLayout === "BT" || autoLayout === "LR" || autoLayout === "RL";
|
|
13
|
+
}
|
|
14
|
+
function isViewRuleAutoLayout(rule) {
|
|
15
|
+
return "direction" in rule;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function getParallelStepsPrefix(id) {
|
|
19
|
+
if (isStepEdgeId(id) && id.includes(".")) {
|
|
20
|
+
return id.slice(0, id.indexOf(".") + 1);
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
function isDynamicStep(step) {
|
|
25
|
+
return !!step && !("__series" in step || "__parallel" in step);
|
|
26
|
+
}
|
|
27
|
+
function isDynamicStepsParallel(step) {
|
|
28
|
+
return !!step && "__parallel" in step && e(step.__parallel);
|
|
29
|
+
}
|
|
30
|
+
function isDynamicStepsSeries(step) {
|
|
31
|
+
return !!step && "__series" in step && e(step.__series);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function isViewRuleGroup(rule) {
|
|
35
|
+
return "title" in rule && "groupRules" in rule && Array.isArray(rule.groupRules);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { isViewRuleGlobalPredicateRef as a, isAutoLayoutDirection as b, isViewRuleAutoLayout as c, isDynamicStep as d, isDynamicStepsParallel as e, isDynamicStepsSeries as f, getParallelStepsPrefix as g, isViewRuleGroup as h, isViewRuleGlobalStyle as i, e as j };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { g as getDefaultExportFromCjs } from './core.B85MJLTf.mjs';
|
|
2
|
+
import { e } from './core.CqAJJpK_.mjs';
|
|
3
|
+
|
|
4
|
+
var naturalCompareLite = {exports: {}};
|
|
5
|
+
|
|
6
|
+
var hasRequiredNaturalCompareLite;
|
|
7
|
+
|
|
8
|
+
function requireNaturalCompareLite () {
|
|
9
|
+
if (hasRequiredNaturalCompareLite) return naturalCompareLite.exports;
|
|
10
|
+
hasRequiredNaturalCompareLite = 1;
|
|
11
|
+
/*
|
|
12
|
+
* @version 1.4.0
|
|
13
|
+
* @date 2015-10-26
|
|
14
|
+
* @stability 3 - Stable
|
|
15
|
+
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
16
|
+
* @license MIT License
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
var naturalCompare = function(a, b) {
|
|
21
|
+
var i, codeA
|
|
22
|
+
, codeB = 1
|
|
23
|
+
, posA = 0
|
|
24
|
+
, posB = 0
|
|
25
|
+
, alphabet = String.alphabet;
|
|
26
|
+
|
|
27
|
+
function getCode(str, pos, code) {
|
|
28
|
+
if (code) {
|
|
29
|
+
for (i = pos; code = getCode(str, i), code < 76 && code > 65;) ++i;
|
|
30
|
+
return +str.slice(pos - 1, i)
|
|
31
|
+
}
|
|
32
|
+
code = alphabet && alphabet.indexOf(str.charAt(pos));
|
|
33
|
+
return code > -1 ? code + 76 : ((code = str.charCodeAt(pos) || 0), code < 45 || code > 127) ? code
|
|
34
|
+
: code < 46 ? 65 // -
|
|
35
|
+
: code < 48 ? code - 1
|
|
36
|
+
: code < 58 ? code + 18 // 0-9
|
|
37
|
+
: code < 65 ? code - 11
|
|
38
|
+
: code < 91 ? code + 11 // A-Z
|
|
39
|
+
: code < 97 ? code - 37
|
|
40
|
+
: code < 123 ? code + 5 // a-z
|
|
41
|
+
: code - 63
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
if ((a+="") != (b+="")) for (;codeB;) {
|
|
46
|
+
codeA = getCode(a, posA++);
|
|
47
|
+
codeB = getCode(b, posB++);
|
|
48
|
+
|
|
49
|
+
if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
|
|
50
|
+
codeA = getCode(a, posA, posA);
|
|
51
|
+
codeB = getCode(b, posB, posA = i);
|
|
52
|
+
posB = i;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (codeA != codeB) return (codeA < codeB) ? -1 : 1
|
|
56
|
+
}
|
|
57
|
+
return 0
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
naturalCompareLite.exports = naturalCompare;
|
|
62
|
+
} catch (e) {
|
|
63
|
+
String.naturalCompare = naturalCompare;
|
|
64
|
+
}
|
|
65
|
+
return naturalCompareLite.exports;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
var naturalCompareLiteExports = requireNaturalCompareLite();
|
|
69
|
+
const compare = /*@__PURE__*/getDefaultExportFromCjs(naturalCompareLiteExports);
|
|
70
|
+
|
|
71
|
+
function compareNatural(a, b) {
|
|
72
|
+
if (a === b) return 0;
|
|
73
|
+
if (e(a)) {
|
|
74
|
+
if (e(b)) {
|
|
75
|
+
return compare(a, b);
|
|
76
|
+
}
|
|
77
|
+
return 1;
|
|
78
|
+
}
|
|
79
|
+
return e(b) ? -1 : 0;
|
|
80
|
+
}
|
|
81
|
+
function compareNaturalHierarchically(separator = ".", deepestFirst = false) {
|
|
82
|
+
return (a, b) => {
|
|
83
|
+
if (a === b) return 0;
|
|
84
|
+
if (!a) return -1;
|
|
85
|
+
if (!b) return 1;
|
|
86
|
+
const aParts = a.split(separator);
|
|
87
|
+
const bParts = b.split(separator);
|
|
88
|
+
const minLength = Math.min(aParts.length, bParts.length);
|
|
89
|
+
for (let i = 0; i < minLength; i++) {
|
|
90
|
+
const aPart = aParts[i];
|
|
91
|
+
const bPart = bParts[i];
|
|
92
|
+
const comparison = compare(aPart, bPart);
|
|
93
|
+
if (comparison !== 0) {
|
|
94
|
+
return comparison;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const diff = aParts.length - bParts.length;
|
|
98
|
+
return deepestFirst ? -1 * diff : diff;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export { compareNaturalHierarchically as a, compareNatural as c };
|