@likec4/core 1.43.0 → 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 +7 -7
- 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.CXWsKEDr.mjs → core.23WeDKcI.mjs} +269 -632
- package/dist/shared/{core.CwsG7hOw.d.mts → core.5ZQ-r3Oa.d.mts} +1 -1
- package/dist/shared/{core.727Qoh_W.mjs → core.6VsRBhGY.mjs} +2 -101
- package/dist/shared/{core.CT1xBp4R.d.mts → core.8mmHFn9g.d.mts} +2 -2
- package/dist/shared/core.B9BjmjuH.mjs +9 -0
- package/dist/shared/{core.CvLjw3bH.d.mts → core.BMtVqKl7.d.mts} +89 -11
- package/dist/shared/{core.rCeaAqgW.mjs → core.BdPcbSkN.mjs} +1 -1
- package/dist/shared/{core.DTdfiejA.d.mts → core.BnDbAOR2.d.mts} +2 -2
- package/dist/shared/{core.CDvVInBp.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.BouyJs63.mjs → core.C0Ye2OCr.mjs} +1 -1
- package/dist/shared/{core.hNWo20Ym.d.mts → core.CDOKQTW6.d.mts} +54 -35
- package/dist/shared/{core.Be05qJwN.mjs → core.CHwVhuc9.mjs} +36 -10
- package/dist/shared/{core.BT-9gaqQ.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.D0NziuvN.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.Cq2kxOI-.d.mts → core.DTJYgLXI.d.mts} +3 -3
- package/dist/shared/{core.CcJ1FZ7h.d.mts → core.DjAM-S6a.d.mts} +174 -77
- package/dist/shared/{core.CNgZvKb8.mjs → core.DrUt0Lbi.mjs} +1 -1
- package/dist/shared/core.M9ayqQZa.mjs +1207 -0
- package/dist/shared/{core.BXs4wY7R.d.mts → core.WwMWeiFL.d.mts} +4 -4
- package/dist/shared/{core.2N_9BzyD.mjs → core.bKIs4oDO.mjs} +3 -3
- package/dist/shared/{core.DyToofsP.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 +18 -17
- 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
package/dist/styles/index.d.mts
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { T as Tag } from '../shared/core.DX-WYEPA.mjs';
|
|
2
|
+
import { T as TagSpecification } from '../shared/core.BMtVqKl7.mjs';
|
|
3
|
+
import { C as ColorLiteral, T as ThemeColorValues, L as LikeC4StyleDefaults, U as ElementColorValues, V as RelationshipColorValues } from '../shared/core.BnOetIAR.mjs';
|
|
4
|
+
export { s as BorderStyle, B as BorderStyles, Q as Color, J as CustomColor, I as CustomColorDefinitions, u as ElementShape, t as ElementShapes, H as HexColor, a as LikeC4StylesConfig, b as LikeC4Theme, y as RelationshipArrowType, x as RelationshipArrowTypes, v as RelationshipLineType, q as ShapeSize, o as Size, S as Sizes, r as SpacingSize, p as TextSize, D as ThemeColor, z as ThemeColors, M as isCustomColor, G as isThemeColor } from '../shared/core.BnOetIAR.mjs';
|
|
5
|
+
export { L as LikeC4Styles } from '../shared/core.8mmHFn9g.mjs';
|
|
4
6
|
import 'type-fest';
|
|
5
|
-
import '../shared/core.
|
|
6
|
-
import '../shared/core.
|
|
7
|
-
import '../shared/core.DX-WYEPA.mjs';
|
|
7
|
+
import '../shared/core.CDOKQTW6.mjs';
|
|
8
|
+
import '../shared/core.DB0Ue5Wx.mjs';
|
|
8
9
|
import '../types/fqnRef.mjs';
|
|
9
|
-
import '../shared/core.CvLjw3bH.mjs';
|
|
10
10
|
import '../types/expression-model.mjs';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Colors are taken from the styles presets of the LikeC4 (Radix Colors)
|
|
14
|
+
*/
|
|
15
|
+
declare const DefaultTagColors: string[];
|
|
16
|
+
declare function assignTagColors(tags: {
|
|
17
|
+
[kind: string]: Partial<TagSpecification>;
|
|
18
|
+
}): Record<Tag, TagSpecification>;
|
|
19
|
+
|
|
12
20
|
declare function computeColorValues(color: ColorLiteral): ThemeColorValues;
|
|
13
21
|
|
|
22
|
+
declare const styleDefaults: LikeC4StyleDefaults;
|
|
23
|
+
|
|
14
24
|
declare const defaultTheme: {
|
|
15
25
|
colors: {
|
|
16
26
|
amber: {
|
|
@@ -103,4 +113,4 @@ declare const defaultTheme: {
|
|
|
103
113
|
};
|
|
104
114
|
};
|
|
105
115
|
|
|
106
|
-
export { ColorLiteral, ElementColorValues, RelationshipColorValues, ThemeColorValues, computeColorValues, defaultTheme };
|
|
116
|
+
export { ColorLiteral, DefaultTagColors, ElementColorValues, LikeC4StyleDefaults, RelationshipColorValues, ThemeColorValues, assignTagColors, computeColorValues, defaultTheme, styleDefaults };
|
package/dist/styles/index.mjs
CHANGED
|
@@ -1 +1,63 @@
|
|
|
1
|
-
|
|
1
|
+
import { t as t$5 } from '../shared/core.q10OP9oJ.mjs';
|
|
2
|
+
import { t as t$3 } from '../shared/core.OHD4KXm9.mjs';
|
|
3
|
+
import { t as t$2, e as e$1, a as t$4 } from '../shared/core.B9BjmjuH.mjs';
|
|
4
|
+
import { e } from '../shared/core.BKlholso.mjs';
|
|
5
|
+
import { t as t$6 } from '../shared/core.CbT8JVYL.mjs';
|
|
6
|
+
import { t as t$1 } from '../shared/core.BsSXS-_R.mjs';
|
|
7
|
+
import { c as compareNatural } from '../shared/core.Bv3cd-jC.mjs';
|
|
8
|
+
import { a as nonNullable } from '../shared/core.D4npX2q8.mjs';
|
|
9
|
+
export { B as BorderStyles, E as ElementShapes, L as LikeC4Styles, R as RelationshipArrowTypes, S as Sizes, T as ThemeColors, c as computeColorValues, b as defaultTheme, f as isCustomColor, i as isThemeColor, s as styleDefaults } from '../shared/core.DEieYfbG.mjs';
|
|
10
|
+
|
|
11
|
+
function t(...t){return t$1(n,t)}function n(e,t,n){let r={};for(let[i,a]of e.entries()){let o=t(a,i,e);r[o]=n(a,i,e);}return r}
|
|
12
|
+
|
|
13
|
+
const DefaultTagColors = [
|
|
14
|
+
"tomato",
|
|
15
|
+
"grass",
|
|
16
|
+
"blue",
|
|
17
|
+
"ruby",
|
|
18
|
+
"orange",
|
|
19
|
+
"indigo",
|
|
20
|
+
"pink",
|
|
21
|
+
"teal",
|
|
22
|
+
"purple",
|
|
23
|
+
"amber",
|
|
24
|
+
"crimson",
|
|
25
|
+
"red",
|
|
26
|
+
"lime",
|
|
27
|
+
"yellow",
|
|
28
|
+
"violet"
|
|
29
|
+
];
|
|
30
|
+
function assignTagColors(tags) {
|
|
31
|
+
const tagsWithColors = [];
|
|
32
|
+
const tagsWithoutColors = [];
|
|
33
|
+
for (const [tag, spec] of t$2(tags)) {
|
|
34
|
+
if (e(spec.color)) {
|
|
35
|
+
tagsWithColors.push({
|
|
36
|
+
tag,
|
|
37
|
+
spec: {
|
|
38
|
+
color: spec.color
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
} else {
|
|
42
|
+
tagsWithoutColors.push(tag);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return t$3(
|
|
46
|
+
tagsWithoutColors,
|
|
47
|
+
t$4(compareNatural),
|
|
48
|
+
t$6((tag, idx) => {
|
|
49
|
+
const color = nonNullable(DefaultTagColors[idx % DefaultTagColors.length]);
|
|
50
|
+
return {
|
|
51
|
+
tag,
|
|
52
|
+
spec: {
|
|
53
|
+
color
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}),
|
|
57
|
+
t$5(tagsWithColors),
|
|
58
|
+
t$4((a, b) => compareNatural(a.tag, b.tag)),
|
|
59
|
+
t(e$1("tag"), e$1("spec"))
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { DefaultTagColors, assignTagColors };
|
package/dist/types/_aux.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'type-fest';
|
|
2
|
-
import '../shared/core.
|
|
3
|
-
export {
|
|
2
|
+
import '../shared/core.DB0Ue5Wx.mjs';
|
|
3
|
+
export { q as AllKinds, A as Any, A as AnyAux, a as AnyComputed, b as AnyLayouted, $ as AnyOnStage, c as AnyParsed, Z as AnySpec, d as Aux, x as DeploymentFqn, D as DeploymentId, y as DeploymentKind, z as EdgeId, o as ElementId, n as ElementKind, F as Fqn, O as LooseDeploymentId, ae as LooseDeploymentKind, K as LooseElementId, ad as LooseElementKind, L as LooseLiteral, af as LooseRelationKind, I as LooseTag, ac as LooseTags, X as LooseViewId, H as Metadata, C as MetadataKey, B as Never, N as NodeId, ab as OrString, a0 as PickByStage, P as ProjectId, J as RelationId, R as RelationKind, a4 as Spec, S as SpecAux, Q as Stage, x as StrictDeploymentFqn, a8 as StrictDeploymentKind, a7 as StrictElementKind, F as StrictFqn, a5 as StrictProjectId, a9 as StrictRelationKind, a6 as StrictTag, m as StrictViewId, T as Tag, r as Tags, U as Unknown, e as UnknownComputed, f as UnknownLayouted, g as UnknownParsed, V as ViewId, W as WithDescriptionAndTech, aa as WithLinks, v as WithMetadata, w as WithNotation, u as WithOptionalLinks, s as WithOptionalTags, G as WithTags, p as preferDescription, h as preferSummary, Y as setProject, a1 as setStage, t as toComputed, a3 as toLayouted, a2 as toParsed } from '../shared/core.CDOKQTW6.mjs';
|
|
4
4
|
import '../shared/core.DX-WYEPA.mjs';
|
package/dist/types/_aux.mjs
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
function preferSummary(a) {
|
|
2
|
+
return a.summary ?? a.description;
|
|
3
|
+
}
|
|
4
|
+
function preferDescription(a) {
|
|
5
|
+
return a.description ?? a.summary;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { preferDescription, preferSummary };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { W as WhereOperator, Q as Color, v as RelationshipLineType, y as RelationshipArrowType, P as PredicateSelector, u as ElementShape, s as BorderStyle, q as ShapeSize } from '../shared/core.
|
|
2
|
-
import { A as Any,
|
|
3
|
-
import { E as ExclusiveUnion } from '../shared/core.
|
|
1
|
+
import { W as WhereOperator, Q as Color, v as RelationshipLineType, y as RelationshipArrowType, P as PredicateSelector, u as ElementShape, s as BorderStyle, q as ShapeSize } from '../shared/core.BnOetIAR.mjs';
|
|
2
|
+
import { A as Any, m as StrictViewId, n as ElementKind, T as Tag } from '../shared/core.CDOKQTW6.mjs';
|
|
3
|
+
import { E as ExclusiveUnion } from '../shared/core.DB0Ue5Wx.mjs';
|
|
4
4
|
import { FqnRef } from './fqnRef.mjs';
|
|
5
5
|
import { M as MarkdownOrString, I as Icon } from '../shared/core.DX-WYEPA.mjs';
|
|
6
6
|
import 'type-fest';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { E as Expression, F as FqnExpr, P as PredicateSelector, R as RelationExpr } from '../shared/core.
|
|
2
|
-
import '../shared/core.
|
|
3
|
-
import '../shared/core.
|
|
1
|
+
export { E as Expression, F as FqnExpr, P as PredicateSelector, R as RelationExpr } from '../shared/core.BnOetIAR.mjs';
|
|
2
|
+
import '../shared/core.CDOKQTW6.mjs';
|
|
3
|
+
import '../shared/core.DB0Ue5Wx.mjs';
|
|
4
4
|
import './fqnRef.mjs';
|
|
5
5
|
import '../shared/core.DX-WYEPA.mjs';
|
|
6
6
|
import 'type-fest';
|
package/dist/types/fqnRef.d.mts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { A as Any,
|
|
2
|
-
import { E as ExclusiveUnion } from '../shared/core.
|
|
1
|
+
import { A as Any, o as ElementId, P as ProjectId, F as Fqn, D as DeploymentId } from '../shared/core.CDOKQTW6.mjs';
|
|
2
|
+
import { E as ExclusiveUnion } from '../shared/core.DB0Ue5Wx.mjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import '../shared/core.DX-WYEPA.mjs';
|
|
5
5
|
|
|
6
6
|
type AnyAux = Any;
|
|
7
|
-
type Unknown = Unknown$1;
|
|
8
7
|
declare namespace FqnRef {
|
|
9
8
|
/**
|
|
10
9
|
* Reference to logical model element
|
|
11
10
|
*/
|
|
12
|
-
interface ElementRef<A extends AnyAux =
|
|
11
|
+
interface ElementRef<A extends AnyAux = AnyAux> {
|
|
13
12
|
project?: never;
|
|
14
13
|
model: ElementId<A>;
|
|
15
14
|
}
|
|
@@ -17,13 +16,13 @@ declare namespace FqnRef {
|
|
|
17
16
|
/**
|
|
18
17
|
* Reference to imported logical model element
|
|
19
18
|
*/
|
|
20
|
-
interface ImportRef<A extends AnyAux =
|
|
19
|
+
interface ImportRef<A extends AnyAux = AnyAux> {
|
|
21
20
|
project: ProjectId<A>;
|
|
22
21
|
model: ElementId<A>;
|
|
23
22
|
}
|
|
24
23
|
function isImportRef<A extends AnyAux>(ref: FqnRef<A>): ref is ImportRef<A>;
|
|
25
24
|
function flatten<A extends AnyAux>(ref: FqnRef<A>): Fqn<A>;
|
|
26
|
-
type ModelRef<A extends AnyAux =
|
|
25
|
+
type ModelRef<A extends AnyAux = AnyAux> = ImportRef<A> | ElementRef<A>;
|
|
27
26
|
function isModelRef<A extends AnyAux>(ref: FqnRef<A>): ref is ModelRef<A>;
|
|
28
27
|
/**
|
|
29
28
|
* Represents a reference to an instance within a deployment.
|
|
@@ -34,7 +33,7 @@ declare namespace FqnRef {
|
|
|
34
33
|
* @property {D} deployment - TThe fully qualified name (FQN) of the deployed instance.
|
|
35
34
|
* @property {M} element - The element reference within the deployment.
|
|
36
35
|
*/
|
|
37
|
-
interface InsideInstanceRef<A extends AnyAux =
|
|
36
|
+
interface InsideInstanceRef<A extends AnyAux = AnyAux> {
|
|
38
37
|
deployment: DeploymentId<A>;
|
|
39
38
|
element: ElementId<A>;
|
|
40
39
|
}
|
|
@@ -53,7 +52,7 @@ declare namespace FqnRef {
|
|
|
53
52
|
type DeploymentRef<A extends AnyAux> = DeploymentElementRef<A> | InsideInstanceRef<A>;
|
|
54
53
|
function isDeploymentRef<A extends AnyAux>(ref: FqnRef<A>): ref is DeploymentRef<A>;
|
|
55
54
|
}
|
|
56
|
-
type FqnRef<A extends AnyAux =
|
|
55
|
+
type FqnRef<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
57
56
|
DeploymentRef: FqnRef.DeploymentRef<A>;
|
|
58
57
|
ModelRef: FqnRef.ModelRef<A>;
|
|
59
58
|
}>;
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { N as NonEmptyArray } from '../shared/core.
|
|
2
|
-
export { C as Coalesce, E as ExclusiveUnion, I as IterableContainer, c as IteratorLike, K as KeysOf, L as Link, b as NTuple, a as NonEmptyReadonlyArray, P as Predicate, R as ReorderedArray, e as exact } from '../shared/core.
|
|
3
|
-
export { A as Any, A as AnyAux, a as Aux, E as ExtractOnStage, M as ModelStage, S as SpecAux, U as Unknown,
|
|
4
|
-
import { s as BorderStyle, u as ElementShape, D as ThemeColor } from '../shared/core.
|
|
5
|
-
export { A as AndOperator, B as BorderStyles, Q as Color, C as ColorLiteral, J as CustomColor, I as CustomColorDefinitions, U as ElementColorValues, t as ElementShapes, c as EqualOperator, E as Expression, m as Filterable, F as FqnExpr, H as HexColor, K as KindEqual, L as LikeC4StyleDefaults, a as LikeC4StylesConfig, b as LikeC4Theme, N as NotOperator, n as OperatorPredicate, O as OrOperator, f as Participant, g as ParticipantOperator, P as PredicateSelector, R as RelationExpr, y as RelationshipArrowType, x as RelationshipArrowTypes, V as RelationshipColorValues, v as RelationshipLineType, q as ShapeSize, o as Size, S as Sizes, r as SpacingSize, d as TagEqual, p as TextSize, T as ThemeColorValues, z as ThemeColors, W as WhereOperator, k as isAndOperator, M as isCustomColor, e as isKindEqual, j as isNotOperator, l as isOrOperator, h as isParticipantOperator, i as isTagEqual, G as isThemeColor, w as whereOperatorAsPredicate } from '../shared/core.
|
|
1
|
+
import { N as NonEmptyArray } from '../shared/core.DB0Ue5Wx.mjs';
|
|
2
|
+
export { C as Coalesce, E as ExclusiveUnion, I as IterableContainer, c as IteratorLike, K as KeysOf, L as Link, b as NTuple, a as NonEmptyReadonlyArray, P as Predicate, R as ReorderedArray, e as exact } from '../shared/core.DB0Ue5Wx.mjs';
|
|
3
|
+
export { A as Any, A as AnyAux, a as AnyComputed, b as AnyLayouted, c as AnyParsed, d as Aux, E as ExtractOnStage, L as LooseLiteral, M as ModelStage, S as SpecAux, U as Unknown, e as UnknownComputed, f as UnknownLayouted, g as UnknownParsed, l as _layout, j as _stage, k as _type, _ as aux, i as isOnStage, p as preferDescription, h as preferSummary } from '../shared/core.CDOKQTW6.mjs';
|
|
4
|
+
import { s as BorderStyle, u as ElementShape, D as ThemeColor } from '../shared/core.BnOetIAR.mjs';
|
|
5
|
+
export { A as AndOperator, B as BorderStyles, Q as Color, C as ColorLiteral, J as CustomColor, I as CustomColorDefinitions, U as ElementColorValues, t as ElementShapes, c as EqualOperator, E as Expression, m as Filterable, F as FqnExpr, H as HexColor, K as KindEqual, L as LikeC4StyleDefaults, a as LikeC4StylesConfig, b as LikeC4Theme, N as NotOperator, n as OperatorPredicate, O as OrOperator, f as Participant, g as ParticipantOperator, P as PredicateSelector, R as RelationExpr, y as RelationshipArrowType, x as RelationshipArrowTypes, V as RelationshipColorValues, v as RelationshipLineType, q as ShapeSize, o as Size, S as Sizes, r as SpacingSize, d as TagEqual, p as TextSize, T as ThemeColorValues, z as ThemeColors, W as WhereOperator, k as isAndOperator, M as isCustomColor, e as isKindEqual, j as isNotOperator, l as isOrOperator, h as isParticipantOperator, i as isTagEqual, G as isThemeColor, w as whereOperatorAsPredicate } from '../shared/core.BnOetIAR.mjs';
|
|
6
6
|
export { ModelExpression, ModelFqnExpr, ModelRelationExpr } from './expression-model.mjs';
|
|
7
7
|
export { FqnRef } from './fqnRef.mjs';
|
|
8
|
-
import {
|
|
9
|
-
export { A as AbstractRelationship,
|
|
10
|
-
|
|
8
|
+
import { v as AutoLayoutDirection } from '../shared/core.BMtVqKl7.mjs';
|
|
9
|
+
export { A as AbstractRelationship, q as AnyExcludePredicate, p as AnyIncludePredicate, r as AnyViewRuleStyle, B as BBox, H as BaseParsedViewProperties, F as BaseViewProperties, W as ComputedDeploymentView, Y as ComputedDynamicView, Q as ComputedEdge, U as ComputedElementView, O as ComputedNode, K as ComputedNodeStyle, Z as DynamicStep, $ as DynamicStepsParallel, _ as DynamicStepsSeries, a7 as DynamicViewDisplayVariant, a5 as DynamicViewIncludeRule, a6 as DynamicViewRule, a1 as DynamicViewStep, f as Element, i as ElementSpecification, E as ElementStyle, aa as ElementViewExcludePredicate, a9 as ElementViewIncludePredicate, ab as ElementViewPredicate, af as ElementViewRule, ac as ElementViewRuleGroup, ae as ElementViewRuleStyle, b as GlobalDynamicPredicates, G as GlobalPredicateId, a as GlobalPredicates, c as GlobalStyleID, d as GlobalStyles, o as LikeC4Project, n as LikeC4ProjectManualLayoutsConfig, l as LikeC4ProjectStyleDefaults, m as LikeC4ProjectStylesConfig, L as LikeC4ProjectTheme, M as ModelGlobals, h as ModelRelation, N as NodeNotation, a8 as ParsedDynamicView, ag as ParsedElementView, P as Point, R as RectBox, g as Relationship, k as RelationshipSpecification, S as Specification, T as TagSpecification, z as ViewAutoLayout, C as ViewManualLayout, x as ViewRuleAutoLayout, t as ViewRuleGlobalPredicateRef, V as ViewRuleGlobalStyle, D as ViewType, J as ViewWithHash, I as ViewWithNotation, X as XYPoint, e as ensureSizes, a0 as getParallelStepsPrefix, w as isAutoLayoutDirection, a2 as isDynamicStep, a3 as isDynamicStepsParallel, a4 as isDynamicStepsSeries, j as isTagColorSpecified, y as isViewRuleAutoLayout, u as isViewRuleGlobalPredicateRef, s as isViewRuleGlobalStyle, ad as isViewRuleGroup } from '../shared/core.BMtVqKl7.mjs';
|
|
10
|
+
import { p as LayoutedView } from '../shared/core.CKNmSm2W.mjs';
|
|
11
|
+
export { t as AnyView, n as AuxFromDump, A as AuxFromLikeC4ModelData, C as ComputedLikeC4ModelData, r as ComputedView, d as DeployedInstance, e as DeploymentElement, f as DeploymentElementRef, D as DeploymentNode, j as DeploymentRelation, h as DeploymentRelationship, Y as DeploymentViewExcludePredicate, X as DeploymentViewIncludePredicate, Z as DeploymentViewPredicate, $ as DeploymentViewRule, _ as DeploymentViewRuleStyle, J as DiagramEdge, U as DiagramEdgeDriftReason, I as DiagramNode, T as DiagramNodeDriftReason, K as LayoutType, N as LayoutedDeploymentView, O as LayoutedDynamicView, M as LayoutedElementView, L as LayoutedLikeC4ModelData, Q as LayoutedViewDriftReason, c as LikeC4ModelData, l as LikeC4ModelDump, o as LikeC4View, a0 as ParsedDeploymentView, P as ParsedLikeC4ModelData, o as ParsedView, s as ProcessedView, m as ProjectDump, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, k as SpecTypesFromDump, S as SpecificationDump, W as ViewManualLayoutSnapshot, V as ViewOnStage, v as ViewRule, w as ViewRulePredicate, u as ViewWithType, z as isComputedView, g as isDeployedInstance, i as isDeploymentNode, G as isDeploymentView, q as isDiagramView, H as isDynamicView, B as isElementView, F as isExtendsElementView, q as isLayoutedView, E as isScopedElementView, x as isViewRulePredicate, y as isViewRuleStyle } from '../shared/core.CKNmSm2W.mjs';
|
|
11
12
|
import { F as Fqn, D as DeploymentFqn } from '../shared/core.DX-WYEPA.mjs';
|
|
12
13
|
export { A as AnyFqn, B as BuiltInIcon, b as DeploymentKind, j as EdgeId, E as ElementKind, e as GlobalFqn, G as GroupElementKind, I as Icon, a as IconUrl, M as MarkdownOrString, N as NodeId, P as ProjectId, d as RelationId, R as RelationKind, c as RelationshipKind, k as StepEdgeId, S as StepEdgeIdLiteral, m as StepEdgeKind, T as Tag, V as ViewId, o as extractStep, f as flattenMarkdownOrString, g as isGlobalFqn, i as isGroupElementKind, n as isStepEdgeId, s as scalar, h as splitGlobalFqn, l as stepEdgeId } from '../shared/core.DX-WYEPA.mjs';
|
|
13
14
|
import 'type-fest';
|
|
@@ -23,9 +24,12 @@ declare namespace ViewChange {
|
|
|
23
24
|
};
|
|
24
25
|
targets: NonEmptyArray<Fqn | DeploymentFqn>;
|
|
25
26
|
}
|
|
26
|
-
interface
|
|
27
|
-
op: 'save-
|
|
28
|
-
layout:
|
|
27
|
+
interface SaveViewSnapshot {
|
|
28
|
+
op: 'save-view-snapshot';
|
|
29
|
+
layout: LayoutedView;
|
|
30
|
+
}
|
|
31
|
+
interface ResetManualLayout {
|
|
32
|
+
op: 'reset-manual-layout';
|
|
29
33
|
}
|
|
30
34
|
interface ChangeAutoLayout {
|
|
31
35
|
op: 'change-autolayout';
|
|
@@ -36,6 +40,6 @@ declare namespace ViewChange {
|
|
|
36
40
|
};
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
|
-
type ViewChange = ViewChange.ChangeElementStyle | ViewChange.
|
|
43
|
+
type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveViewSnapshot | ViewChange.ResetManualLayout | ViewChange.ChangeAutoLayout;
|
|
40
44
|
|
|
41
|
-
export { AutoLayoutDirection, BorderStyle, DeploymentFqn, ElementShape, Fqn, NonEmptyArray, ThemeColor, ViewChange
|
|
45
|
+
export { AutoLayoutDirection, BorderStyle, DeploymentFqn, LayoutedView as DiagramView, ElementShape, Fqn, LayoutedView, NonEmptyArray, ThemeColor, ViewChange };
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { R as RichText, e as exact } from '../shared/core.
|
|
2
|
-
export {
|
|
3
|
-
export { _ as _stage, a as _type,
|
|
1
|
+
export { R as RichText, e as exact } from '../shared/core.M9ayqQZa.mjs';
|
|
2
|
+
export { preferDescription, preferSummary } from './_aux.mjs';
|
|
3
|
+
export { b as _layout, _ as _stage, a as _type, j as isAndOperator, n as isComputedView, d as isDeployedInstance, c as isDeploymentNode, s as isDeploymentView, o as isDiagramView, t as isDynamicView, p as isElementView, r as isExtendsElementView, f as isKindEqual, o as isLayoutedView, h as isNotOperator, i as isOnStage, k as isOrOperator, g as isParticipantOperator, q as isScopedElementView, e as isTagEqual, l as isViewRulePredicate, m as isViewRuleStyle, w as whereOperatorAsPredicate } from '../shared/core.DH7TXqXf.mjs';
|
|
4
4
|
export { Expression, FqnExpr, RelationExpr } from './expression.mjs';
|
|
5
5
|
export { ModelExpression, ModelFqnExpr, ModelRelationExpr } from './expression-model.mjs';
|
|
6
6
|
export { FqnRef } from './fqnRef.mjs';
|
|
7
7
|
import { a as t } from '../shared/core.BsSXS-_R.mjs';
|
|
8
8
|
import { i as invariant } from '../shared/core.D4npX2q8.mjs';
|
|
9
|
-
export { e as ensureSizes } from '../shared/core.
|
|
9
|
+
export { e as ensureSizes } from '../shared/core.DEieYfbG.mjs';
|
|
10
10
|
export { D as DeploymentFqn, E as EdgeId, F as Fqn, a as GlobalFqn, G as GroupElementKind, N as NodeId, P as ProjectId, R as RelationId, S as StepEdgeKind, V as ViewId, g as extractStep, f as flattenMarkdownOrString, b as isGlobalFqn, i as isGroupElementKind, e as isStepEdgeId, s as scalar, c as splitGlobalFqn, d as stepEdgeId } from '../shared/core.C_Ni6yHl.mjs';
|
|
11
|
-
export {
|
|
11
|
+
export { g as getParallelStepsPrefix, b as isAutoLayoutDirection, d as isDynamicStep, e as isDynamicStepsParallel, f as isDynamicStepsSeries, c as isViewRuleAutoLayout, a as isViewRuleGlobalPredicateRef, i as isViewRuleGlobalStyle, h as isViewRuleGroup } from '../shared/core.BuQZczj6.mjs';
|
|
12
12
|
|
|
13
13
|
var BBox;
|
|
14
14
|
((BBox2) => {
|
|
@@ -52,6 +52,15 @@ var BBox;
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
BBox2.merge = merge;
|
|
55
|
+
function fromRectBox(rect) {
|
|
56
|
+
return {
|
|
57
|
+
x: Math.min(rect.x1, rect.x2),
|
|
58
|
+
y: Math.min(rect.y1, rect.y2),
|
|
59
|
+
width: Math.abs(rect.x2 - rect.x1),
|
|
60
|
+
height: Math.abs(rect.y2 - rect.y1)
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
BBox2.fromRectBox = fromRectBox;
|
|
55
64
|
function toRectBox(box) {
|
|
56
65
|
return {
|
|
57
66
|
x1: box.x,
|
|
@@ -85,6 +94,13 @@ var BBox;
|
|
|
85
94
|
};
|
|
86
95
|
}
|
|
87
96
|
BBox2.shrink = shrink;
|
|
97
|
+
function includes(a, b) {
|
|
98
|
+
if (a === b) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
return a.x <= b.x && a.y <= b.y && a.x + a.width >= b.x + b.width && a.y + a.height >= b.y + b.height;
|
|
102
|
+
}
|
|
103
|
+
BBox2.includes = includes;
|
|
88
104
|
})(BBox || (BBox = {}));
|
|
89
105
|
var RectBox;
|
|
90
106
|
((RectBox2) => {
|
|
@@ -144,6 +160,13 @@ var RectBox;
|
|
|
144
160
|
};
|
|
145
161
|
}
|
|
146
162
|
RectBox2.toBBox = toBBox;
|
|
163
|
+
function includes(a, b) {
|
|
164
|
+
if (a === b) {
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
return a.x1 <= b.x1 && a.y1 <= b.y1 && a.x2 >= b.x2 && a.y2 >= b.y2;
|
|
168
|
+
}
|
|
169
|
+
RectBox2.includes = includes;
|
|
147
170
|
})(RectBox || (RectBox = {}));
|
|
148
171
|
|
|
149
172
|
function isTagColorSpecified(spec) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { G as Graph } from '../../shared/core.
|
|
1
|
+
export { G as Graph } from '../../shared/core.DrUt0Lbi.mjs';
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { D as DefaultMap } from '../shared/core.CywrQs86.mjs';
|
|
2
|
-
export { B as BiMap, D as DefaultWeakMap, L as LinkedList, M as MultiMap, Q as Queue, a as ancestorsFqn, l as commonAncestor, o as compareByFqnHierarchically, q as compareFqnHierarchically, h as hasProp, r as hierarchyDistance, t as hierarchyLevel, i as invariant, b as isAncestor, v as isAnyOf, c as isDescendantOf, d as isNonEmptyArray, e as isSameHierarchy, f as isString, m as memoizeProp, n as nameFromFqn, j as nonNullable, g as nonexhaustive, p as parentFqn, u as sortByFqnHierarchically, s as sortNaturalByFqn, k as sortParentsFirst } from '../shared/core.
|
|
3
|
-
import { N as NonEmptyArray } from '../shared/core.
|
|
2
|
+
export { B as BiMap, D as DefaultWeakMap, L as LinkedList, M as MultiMap, Q as Queue, a as ancestorsFqn, l as commonAncestor, o as compareByFqnHierarchically, q as compareFqnHierarchically, h as hasProp, r as hierarchyDistance, t as hierarchyLevel, i as invariant, b as isAncestor, v as isAnyOf, c as isDescendantOf, d as isNonEmptyArray, e as isSameHierarchy, f as isString, m as memoizeProp, n as nameFromFqn, j as nonNullable, g as nonexhaustive, p as parentFqn, u as sortByFqnHierarchically, s as sortNaturalByFqn, k as sortParentsFirst } from '../shared/core.5ZQ-r3Oa.mjs';
|
|
3
|
+
import { N as NonEmptyArray } from '../shared/core.DB0Ue5Wx.mjs';
|
|
4
4
|
export { ifilter, ifind, ifirst, iflat, ihead, imap, ireduce, isome, iunique, toArray, toSet } from './iterable/index.mjs';
|
|
5
5
|
export { i as isIterable } from '../shared/core.DXhDWKFZ.mjs';
|
|
6
6
|
import '../shared/core.DX-WYEPA.mjs';
|
|
@@ -65,6 +65,7 @@ declare function compareNatural(a: string | undefined, b: string | undefined): -
|
|
|
65
65
|
declare function compareNaturalHierarchically(separator?: string, deepestFirst?: boolean): (a: string | undefined, b: string | undefined) => number;
|
|
66
66
|
|
|
67
67
|
declare function getOrCreate<K, V>(map: Map<K, V>, key: K, create: (key: K) => V): V;
|
|
68
|
+
declare function getOrCreate<K extends WeakKey, V>(map: WeakMap<K, V>, key: K, create: (key: K) => V): V;
|
|
68
69
|
|
|
69
70
|
declare function delay(): Promise<string>;
|
|
70
71
|
declare function delay(ms: number): Promise<string>;
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
export { i as invariant, a as nonNullable, n as nonexhaustive } from '../shared/core.D4npX2q8.mjs';
|
|
2
|
-
export { S as Stack, c as commonHead, a as compareRelations, o as objectHash } from '../shared/core.
|
|
3
|
-
export {
|
|
2
|
+
export { S as Stack, c as commonHead, a as compareRelations, o as objectHash } from '../shared/core.DFCHU59b.mjs';
|
|
3
|
+
export { c as compareNatural, a as compareNaturalHierarchically } from '../shared/core.Bv3cd-jC.mjs';
|
|
4
|
+
export { a as ancestorsFqn, g as commonAncestor, j as compareByFqnHierarchically, k as compareFqnHierarchically, h as hasProp, l as hierarchyDistance, m as hierarchyLevel, i as isAncestor, q as isAnyOf, b as isDescendantOf, c as isNonEmptyArray, d as isSameHierarchy, e as isString, n as nameFromFqn, p as parentFqn, o as sortByFqnHierarchically, s as sortNaturalByFqn, f as sortParentsFirst } from '../shared/core.6VsRBhGY.mjs';
|
|
4
5
|
export { g as getOrCreate } from '../shared/core.DcS-0zys.mjs';
|
|
5
6
|
export { m as memoizeProp } from '../shared/core.BR4zXDH-.mjs';
|
|
6
|
-
export { d as difference, e as equalsSet, i as intersection, a as stringHash, s as symmetricDifference, u as union } from '../shared/core.
|
|
7
|
-
export { b as BiMap, d as DefaultWeakMap, l as LinkedList, m as MultiMap, q as Queue } from '../shared/core.
|
|
7
|
+
export { d as difference, e as equalsSet, i as intersection, a as stringHash, s as symmetricDifference, u as union } from '../shared/core.CbsSAn1j.mjs';
|
|
8
|
+
export { b as BiMap, d as DefaultWeakMap, l as LinkedList, m as MultiMap, q as Queue } from '../shared/core.DIE3F6sw.mjs';
|
|
8
9
|
export { D as DefaultMap } from '../shared/core.BbE4y-yl.mjs';
|
|
9
10
|
export { i as ifilter } from '../shared/core.DRJma0Ol.mjs';
|
|
10
|
-
export { i as ifind
|
|
11
|
+
export { i as ifind } from '../shared/core.CmPXpJ8l.mjs';
|
|
11
12
|
export { ifirst, ireduce } from './iterable/index.mjs';
|
|
12
13
|
export { i as iflat, a as iunique } from '../shared/core.C4x8aaWa.mjs';
|
|
14
|
+
export { i as ihead } from '../shared/core.uFk_o9X6.mjs';
|
|
13
15
|
export { i as imap, a as toArray, t as toSet } from '../shared/core.C3JowhaZ.mjs';
|
|
14
16
|
export { i as isIterable } from '../shared/core.RfnaEmgA.mjs';
|
|
15
17
|
export { i as isome } from '../shared/core.FZ305VYd.mjs';
|
|
16
|
-
export { m as markdownToHtml, a as markdownToText } from '../shared/core.
|
|
18
|
+
export { m as markdownToHtml, a as markdownToText } from '../shared/core.CR3PmPzr.mjs';
|
|
17
19
|
|
|
18
20
|
function e(e,t){let n=Math.ceil(e),r=Math.floor(t);if(r<n)throw RangeError(`randomInteger: The range [${e.toString()},${t.toString()}] contains no integer`);return Math.floor(Math.random()*(r-n+1)+n)}
|
|
19
21
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { i as isIterable } from '../../shared/core.RfnaEmgA.mjs';
|
|
2
2
|
import { e } from '../../shared/core.DRJma0Ol.mjs';
|
|
3
3
|
export { i as ifilter } from '../../shared/core.DRJma0Ol.mjs';
|
|
4
|
-
export { i as ifind
|
|
4
|
+
export { i as ifind } from '../../shared/core.CmPXpJ8l.mjs';
|
|
5
5
|
import { i as invariant } from '../../shared/core.D4npX2q8.mjs';
|
|
6
6
|
import { e as e$1 } from '../../shared/core.C4x8aaWa.mjs';
|
|
7
7
|
export { i as iflat, a as iunique } from '../../shared/core.C4x8aaWa.mjs';
|
|
8
|
+
export { i as ihead } from '../../shared/core.uFk_o9X6.mjs';
|
|
8
9
|
export { i as imap, a as toArray, t as toSet } from '../../shared/core.C3JowhaZ.mjs';
|
|
9
10
|
export { i as isome } from '../../shared/core.FZ305VYd.mjs';
|
|
10
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likec4/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.44.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://likec4.dev",
|
|
6
6
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -105,18 +105,8 @@
|
|
|
105
105
|
"type-fest": "^4.41.0"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"unified": "11.0.5",
|
|
109
|
-
"mdast-util-from-markdown": "^2.0.2",
|
|
110
|
-
"mdast-util-to-string": "^4.0.0",
|
|
111
|
-
"rehype-format": "5.0.1",
|
|
112
|
-
"rehype-raw": "7.0.0",
|
|
113
|
-
"rehype-sanitize": "^6.0.0",
|
|
114
|
-
"rehype-stringify": "10.0.1",
|
|
115
|
-
"remark-gfm": "4.0.1",
|
|
116
|
-
"remark-parse": "11.0.0",
|
|
117
|
-
"remark-rehype": "11.1.2",
|
|
118
108
|
"@dagrejs/dagre": "1.1.5",
|
|
119
|
-
"@mantine/colors-generator": "8.3.
|
|
109
|
+
"@mantine/colors-generator": "8.3.7",
|
|
120
110
|
"@types/chroma-js": "^3.1.1",
|
|
121
111
|
"@types/extend": "3.0.4",
|
|
122
112
|
"@types/hast": "3.0.4",
|
|
@@ -131,18 +121,29 @@
|
|
|
131
121
|
"graphology": "^0.25.4",
|
|
132
122
|
"graphology-dag": "^0.4.1",
|
|
133
123
|
"graphology-types": "^0.24.8",
|
|
124
|
+
"immer": "^10.2.0",
|
|
125
|
+
"mdast-util-from-markdown": "^2.0.2",
|
|
126
|
+
"mdast-util-to-string": "^4.0.0",
|
|
134
127
|
"mnemonist": "0.40.3",
|
|
135
128
|
"natural-compare-lite": "^1.4.0",
|
|
136
129
|
"object-hash": "^3.0.0",
|
|
137
130
|
"obliterator": "^2.0.5",
|
|
138
|
-
"oxlint": "1.
|
|
131
|
+
"oxlint": "1.28.0",
|
|
132
|
+
"rehype-format": "5.0.1",
|
|
133
|
+
"rehype-raw": "7.0.0",
|
|
134
|
+
"rehype-sanitize": "^6.0.0",
|
|
135
|
+
"rehype-stringify": "10.0.1",
|
|
136
|
+
"remark-gfm": "4.0.1",
|
|
137
|
+
"remark-parse": "11.0.0",
|
|
138
|
+
"remark-rehype": "11.1.2",
|
|
139
139
|
"remeda": "^2.32.0",
|
|
140
|
-
"turbo": "2.
|
|
140
|
+
"turbo": "2.6.0",
|
|
141
141
|
"typescript": "5.9.3",
|
|
142
142
|
"unbuild": "3.5.0",
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"@likec4/tsconfig": "1.
|
|
143
|
+
"unified": "11.0.5",
|
|
144
|
+
"vitest": "4.0.8",
|
|
145
|
+
"@likec4/tsconfig": "1.44.0",
|
|
146
|
+
"@likec4/devops": "1.42.0"
|
|
146
147
|
},
|
|
147
148
|
"scripts": {
|
|
148
149
|
"typecheck": "tsc -b --verbose",
|