@likec4/core 1.48.0 → 1.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD-PARTY-LICENSES.md +1012 -0
- package/dist/_chunks/Builder.view-element.mjs +2 -3284
- package/dist/_chunks/LikeC4Model.d.mts +21 -25
- package/dist/_chunks/RichText.mjs +1 -148
- package/dist/_chunks/_types.d.mts +1 -5
- package/dist/_chunks/_types2.d.mts +2 -4
- package/dist/_chunks/assignTagColors.mjs +1 -24
- package/dist/_chunks/calcDriftsFromSnapshot.mjs +1 -379
- package/dist/_chunks/guards.d.mts +2026 -0
- package/dist/_chunks/guards.mjs +4 -0
- package/dist/_chunks/index.d.mts +255 -136
- package/dist/_chunks/libs/@mantine/colors-generator.mjs +2 -3403
- package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -0
- package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -213
- package/dist/_chunks/libs/bail.mjs +1 -14
- package/dist/_chunks/libs/ccount.mjs +1 -25
- package/dist/_chunks/libs/character-entities-html4.mjs +1 -263
- package/dist/_chunks/libs/character-entities-legacy.mjs +1 -117
- package/dist/_chunks/libs/character-entities.mjs +2 -2136
- package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -18
- package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -21
- package/dist/_chunks/libs/defu.mjs +1 -42
- package/dist/_chunks/libs/devlop.mjs +1 -5
- package/dist/_chunks/libs/escape-string-regexp.mjs +1 -8
- package/dist/_chunks/libs/extend.mjs +1 -77
- package/dist/_chunks/libs/graphology-dag.mjs +1 -703
- package/dist/_chunks/libs/graphology.mjs +1 -4565
- package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -863
- package/dist/_chunks/libs/hast-util-to-html.mjs +9 -2696
- package/dist/_chunks/libs/is-plain-obj.mjs +1 -9
- package/dist/_chunks/libs/longest-streak.mjs +1 -30
- package/dist/_chunks/libs/markdown-table.mjs +2 -290
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -653
- package/dist/_chunks/libs/mdast-util-from-markdown.mjs +3 -8522
- package/dist/_chunks/libs/mdast-util-gfm.mjs +15 -2393
- package/dist/_chunks/libs/mdast-util-to-hast.mjs +11 -1803
- package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -2243
- package/dist/_chunks/libs/mnemonist.d.mts +1 -91
- package/dist/_chunks/libs/mnemonist.mjs +1 -1978
- package/dist/_chunks/libs/natural-compare-lite.mjs +9 -42
- package/dist/_chunks/libs/ohash.mjs +1 -0
- package/dist/_chunks/libs/rehype-sanitize.mjs +1 -29
- package/dist/_chunks/libs/rehype-stringify.mjs +1 -34
- package/dist/_chunks/libs/remark-gfm.mjs +1 -36
- package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +3 -100
- package/dist/_chunks/libs/remark-parse.mjs +1 -39
- package/dist/_chunks/libs/remark-rehype.mjs +1 -171
- package/dist/_chunks/libs/remeda.mjs +1 -702
- package/dist/_chunks/libs/trough.mjs +1 -158
- package/dist/_chunks/libs/unified.mjs +1 -2212
- package/dist/_chunks/rolldown-runtime.mjs +1 -42
- package/dist/_chunks/{index3.d.mts → theme.d.mts} +15 -13
- package/dist/_chunks/{index7.d.mts → to-text.d.mts} +165 -29
- package/dist/_chunks/to-text.mjs +1 -0
- package/dist/_chunks/vector.d.mts +198 -0
- package/dist/_chunks/vector.mjs +1 -0
- package/dist/builder/index.d.mts +2 -8
- package/dist/builder/index.mjs +1 -662
- package/dist/compute-view/index.d.mts +86 -15
- package/dist/compute-view/index.mjs +2 -262
- package/dist/geometry/index.d.mts +2 -2
- package/dist/geometry/index.mjs +1 -3
- package/dist/index.d.mts +9 -13
- package/dist/index.mjs +1 -27
- package/dist/model/index.d.mts +4 -14
- package/dist/model/index.mjs +1 -11
- package/dist/styles/index.d.mts +2 -8
- package/dist/styles/index.mjs +1 -30
- package/dist/types/index.d.mts +3 -9
- package/dist/types/index.mjs +1 -15
- package/dist/utils/graphology/index.d.mts +1 -1
- package/dist/utils/graphology/index.mjs +1 -3
- package/dist/utils/index.d.mts +4 -11
- package/dist/utils/index.mjs +1 -17
- package/package.json +13 -12
- package/dist/_chunks/LikeC4Styles.mjs +0 -691
- package/dist/_chunks/RichText.d.mts +0 -84
- package/dist/_chunks/_aux.d.mts +0 -289
- package/dist/_chunks/_aux.mjs +0 -18
- package/dist/_chunks/connection.mjs +0 -0
- package/dist/_chunks/const.d.mts +0 -43
- package/dist/_chunks/const.mjs +0 -33
- package/dist/_chunks/expression-model.d.mts +0 -192
- package/dist/_chunks/expression-model.mjs +0 -103
- package/dist/_chunks/expression.d.mts +0 -347
- package/dist/_chunks/expression.mjs +0 -107
- package/dist/_chunks/find.d.mts +0 -82
- package/dist/_chunks/find.mjs +0 -646
- package/dist/_chunks/find2.d.mts +0 -78
- package/dist/_chunks/find2.mjs +0 -287
- package/dist/_chunks/fqnRef.d.mts +0 -58
- package/dist/_chunks/fqnRef.mjs +0 -41
- package/dist/_chunks/geometry.mjs +0 -335
- package/dist/_chunks/index2.d.mts +0 -937
- package/dist/_chunks/index4.d.mts +0 -62
- package/dist/_chunks/index5.d.mts +0 -42
- package/dist/_chunks/index6.d.mts +0 -43
- package/dist/_chunks/index8.d.mts +0 -144
- package/dist/_chunks/invariant.mjs +0 -18
- package/dist/_chunks/iterable.mjs +0 -146
- package/dist/_chunks/libs/graphology-types.d.mts +0 -601
- package/dist/_chunks/libs/graphology.d.mts +0 -6
- package/dist/_chunks/mnemonist.d.mts +0 -1
- package/dist/_chunks/mnemonist.mjs +0 -0
- package/dist/_chunks/model.mjs +0 -1898
- package/dist/_chunks/model2.mjs +0 -0
- package/dist/_chunks/relationships-view.mjs +0 -132
- package/dist/_chunks/scalar.d.mts +0 -109
- package/dist/_chunks/scalar.mjs +0 -84
- package/dist/_chunks/utils.mjs +0 -483
- package/dist/compute-view/relationships-view/index.d.mts +0 -16
- package/dist/compute-view/relationships-view/index.mjs +0 -7
- package/dist/model/connection/deployment/index.d.mts +0 -12
- package/dist/model/connection/deployment/index.mjs +0 -9
- package/dist/model/connection/index.d.mts +0 -14
- package/dist/model/connection/index.mjs +0 -10
- package/dist/model/connection/model/index.d.mts +0 -12
- package/dist/model/connection/model/index.mjs +0 -8
- package/dist/types/RichText.d.mts +0 -3
- package/dist/types/RichText.mjs +0 -7
- package/dist/types/_aux.d.mts +0 -3
- package/dist/types/_aux.mjs +0 -3
- package/dist/types/expression-model.d.mts +0 -6
- package/dist/types/expression-model.mjs +0 -7
- package/dist/types/expression.d.mts +0 -5
- package/dist/types/expression.mjs +0 -7
- package/dist/types/fqnRef.d.mts +0 -4
- package/dist/types/fqnRef.mjs +0 -7
- package/dist/types/scalar.d.mts +0 -2
- package/dist/types/scalar.mjs +0 -7
- package/dist/utils/iterable/index.d.mts +0 -9
- package/dist/utils/iterable/index.mjs +0 -3
- package/dist/utils/mnemonist.d.mts +0 -2
- package/dist/utils/mnemonist.mjs +0 -12
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../
|
|
3
|
-
import "../_chunks/
|
|
4
|
-
import "../_chunks/
|
|
5
|
-
import { t as ModelExpression } from "../_chunks/expression-model.mjs";
|
|
6
|
-
import { $t as AnyIncludePredicate, J as ComputedEdge, Qt as AnyExcludePredicate, X as ComputedNode, c as ComputedLikeC4ModelData, d as ParsedLikeC4ModelData, h as ParsedView, on as ViewAutoLayout, p as ComputedView, rn as BaseViewProperties } from "../_chunks/index2.mjs";
|
|
7
|
-
import "../_chunks/RichText.mjs";
|
|
8
|
-
import "../_chunks/index3.mjs";
|
|
9
|
-
import { n as LikeC4Model } from "../_chunks/LikeC4Model.mjs";
|
|
1
|
+
import { Br as ElementId, Ji as _stage, On as ModelExpression, Pr as AnyParsed, S as ComputedView, Yi as _type, _ as ComputedLikeC4ModelData, at as ComputedNode, b as ParsedLikeC4ModelData, ci as ViewId, cn as AnyIncludePredicate, fn as BaseViewProperties, hn as ViewAutoLayout, ia as NonEmptyArray, ii as Unknown, jr as Any, pi as toComputed, rt as ComputedEdge, sn as AnyExcludePredicate, w as ParsedView } from "../_chunks/guards.mjs";
|
|
2
|
+
import "../types/index.mjs";
|
|
3
|
+
import "../_chunks/theme.mjs";
|
|
4
|
+
import { C as ElementModel, T as RelationshipModel, n as LikeC4Model } from "../_chunks/LikeC4Model.mjs";
|
|
10
5
|
import { B as ViewPredicate } from "../_chunks/_types.mjs";
|
|
11
|
-
import "../_chunks/
|
|
12
|
-
import "../
|
|
13
|
-
import "../_chunks/find2.mjs";
|
|
14
|
-
import "../_chunks/index4.mjs";
|
|
15
|
-
import "../_chunks/index5.mjs";
|
|
6
|
+
import "../_chunks/index.mjs";
|
|
7
|
+
import "../model/index.mjs";
|
|
16
8
|
import { a as LayoutedProjectNode, i as LayoutedProjectEdge, n as ComputedProjectNode, o as LayoutedProjectsView, r as ComputedProjectsView, t as ComputedProjectEdge } from "../_chunks/_types2.mjs";
|
|
17
|
-
import { n as computeRelationshipsView, r as RelationshipsViewData, t as treeFromElements } from "../_chunks/index6.mjs";
|
|
18
9
|
|
|
19
10
|
//#region src/compute-view/compute-view.d.ts
|
|
20
11
|
type ComputeViewResult<V> = {
|
|
@@ -62,6 +53,86 @@ declare function viewsWithReadableEdges<A extends Any>({
|
|
|
62
53
|
*/
|
|
63
54
|
declare function computeProjectsView(likec4models: NonEmptyArray<LikeC4Model>): ComputedProjectsView;
|
|
64
55
|
//#endregion
|
|
56
|
+
//#region src/compute-view/relationships-view/_types.d.ts
|
|
57
|
+
type RelationshipsViewData<M extends Any = Unknown> = {
|
|
58
|
+
incomers: ReadonlySet<ElementModel<M>>;
|
|
59
|
+
incoming: ReadonlySet<RelationshipModel<M>>;
|
|
60
|
+
subjects: ReadonlySet<ElementModel<M>>;
|
|
61
|
+
outgoing: ReadonlySet<RelationshipModel<M>>;
|
|
62
|
+
outgoers: ReadonlySet<ElementModel<M>>;
|
|
63
|
+
};
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/compute-view/relationships-view/compute.d.ts
|
|
66
|
+
declare function computeRelationshipsView<M extends Any>(subjectId: ElementId<M>, likec4model: LikeC4Model<M>, scopeViewId: ViewId<M> | null, scope?: 'global' | 'view'): RelationshipsViewData<M>;
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/compute-view/relationships-view/utils.d.ts
|
|
69
|
+
/**
|
|
70
|
+
* Builds a tree structure from a flat list of elements.
|
|
71
|
+
* @param elements - An iterable of ElementModel instances.
|
|
72
|
+
* @returns An object containing the sorted elements, a lookup by ID, root elements, parent and children accessors, and a flatten method.
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const elements = [
|
|
76
|
+
* { id: 'A' },
|
|
77
|
+
* { id: 'A.B' },
|
|
78
|
+
* { id: 'A.B.C' },
|
|
79
|
+
* { id: 'A.B.D' },
|
|
80
|
+
* { id: 'E' },
|
|
81
|
+
* ]
|
|
82
|
+
*
|
|
83
|
+
* const tree = treeFromElements(elements)
|
|
84
|
+
*
|
|
85
|
+
* tree.sorted.map(e => e.id) // ['A', 'A.B', 'A.B.C', 'A.B.D', 'E']
|
|
86
|
+
*
|
|
87
|
+
* tree.byId('A.B').id // 'A.B'
|
|
88
|
+
*
|
|
89
|
+
* [...tree.root].map(e => e.id) // ['A', 'E']
|
|
90
|
+
*
|
|
91
|
+
* tree.parent(tree.byId('A.B.C'))?.id // 'A.B'
|
|
92
|
+
*
|
|
93
|
+
* tree.children(tree.byId('A')).map(e => e.id) // ['A.B']
|
|
94
|
+
*/
|
|
95
|
+
declare function treeFromElements<M extends Any>(elements: Iterable<ElementModel<M>>): Readonly<{
|
|
96
|
+
/**
|
|
97
|
+
* Elements sorted in a way that parents go before their descendants.
|
|
98
|
+
*/
|
|
99
|
+
sorted: ReadonlyArray<ElementModel<M>>;
|
|
100
|
+
/**
|
|
101
|
+
* Get element by its id (FQN)
|
|
102
|
+
*/
|
|
103
|
+
byId(id: ElementId<M>): ElementModel<M>;
|
|
104
|
+
/**
|
|
105
|
+
* Root elements (i.e. those without parents)
|
|
106
|
+
*/
|
|
107
|
+
root: ReadonlySet<ElementModel<M>>;
|
|
108
|
+
/**
|
|
109
|
+
* Get parent element or null if it's a root
|
|
110
|
+
*/
|
|
111
|
+
parent(el: ElementId<M> | ElementModel<M>): ElementModel<M> | null;
|
|
112
|
+
/**
|
|
113
|
+
* Get child elements (i.e. direct descendants)
|
|
114
|
+
*/
|
|
115
|
+
children(el: ElementId<M> | ElementModel<M>): ReadonlyArray<ElementModel<M>>;
|
|
116
|
+
/**
|
|
117
|
+
* Flattens the tree structure by removing redundant hierarchy levels.
|
|
118
|
+
* @example
|
|
119
|
+
* A
|
|
120
|
+
* └── B
|
|
121
|
+
* ├── C
|
|
122
|
+
* │ └── D
|
|
123
|
+
* │ └── E
|
|
124
|
+
* └── F
|
|
125
|
+
* └── G
|
|
126
|
+
* becomes
|
|
127
|
+
* A
|
|
128
|
+
* ├── C
|
|
129
|
+
* │ └── E
|
|
130
|
+
* └── F
|
|
131
|
+
* └── G
|
|
132
|
+
*/
|
|
133
|
+
flatten(): ReadonlySet<ElementModel<M>>;
|
|
134
|
+
}>;
|
|
135
|
+
//#endregion
|
|
65
136
|
//#region src/compute-view/adhoc-view/compute.d.ts
|
|
66
137
|
interface AdhocViewIncludePredicate<A extends Any> extends AnyIncludePredicate<ModelExpression<A>> {}
|
|
67
138
|
interface AdhocViewExcludePredicate<A extends Any> extends AnyExcludePredicate<ModelExpression<A>> {}
|
|
@@ -1,262 +1,2 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
|
|
3
|
-
import { N as _stage, P as _type, _ as isExtendsElementView, g as isElementView } from "../_chunks/LikeC4Styles.mjs";
|
|
4
|
-
import "../_chunks/libs/natural-compare-lite.mjs";
|
|
5
|
-
import { N as isNonEmptyArray, r as stringHash } from "../_chunks/utils.mjs";
|
|
6
|
-
import { n as nonNullable, t as invariant } from "../_chunks/invariant.mjs";
|
|
7
|
-
import "../_chunks/libs/@mantine/colors-generator.mjs";
|
|
8
|
-
import { n as require_topological_sort, t as require_will_create_cycle } from "../_chunks/libs/graphology-dag.mjs";
|
|
9
|
-
import { n as import_default_map } from "../_chunks/libs/mnemonist.mjs";
|
|
10
|
-
import "../_chunks/libs/defu.mjs";
|
|
11
|
-
import "../_chunks/libs/extend.mjs";
|
|
12
|
-
import { n as preferSummary } from "../_chunks/_aux.mjs";
|
|
13
|
-
import { c as ProjectId, d as ViewId, i as GlobalFqn } from "../_chunks/scalar.mjs";
|
|
14
|
-
import { a as unsafeComputeView, c as linkNodesWithEdges, i as computeView, n as computeLikeC4Model, o as computeElementView, r as computeParsedModelData, s as topologicalSort$1, t as $expr } from "../_chunks/Builder.view-element.mjs";
|
|
15
|
-
import { t as Graph } from "../_chunks/libs/graphology.mjs";
|
|
16
|
-
import { n as treeFromElements, t as computeRelationshipsView } from "../_chunks/relationships-view.mjs";
|
|
17
|
-
|
|
18
|
-
//#region src/compute-view/utils/resolve-extended-views.ts
|
|
19
|
-
var import_topological_sort = require_topological_sort();
|
|
20
|
-
var import_will_create_cycle = /* @__PURE__ */ __toESM(require_will_create_cycle(), 1);
|
|
21
|
-
/**
|
|
22
|
-
* Resolve rules of extended views
|
|
23
|
-
* (Removes invalid views)
|
|
24
|
-
*/
|
|
25
|
-
function resolveRulesExtendedViews(unresolvedViews) {
|
|
26
|
-
const g = new Graph({ type: "directed" });
|
|
27
|
-
const extendedViews = [];
|
|
28
|
-
for (const view of t(unresolvedViews)) {
|
|
29
|
-
g.addNode(view.id, { view });
|
|
30
|
-
if (isExtendsElementView(view)) extendedViews.push(view);
|
|
31
|
-
}
|
|
32
|
-
if (extendedViews.length === 0) return unresolvedViews;
|
|
33
|
-
for (const view of extendedViews) {
|
|
34
|
-
if (!g.hasNode(view.extends)) {
|
|
35
|
-
console.warn(`View "${view.id}" extends from "${view.extends}" which does not exist`);
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
if ((0, import_will_create_cycle.default)(g, view.id, view.extends)) {
|
|
39
|
-
console.warn(`View "${view.id}" extends from "${view.extends}" which creates a cycle`);
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
g.addDirectedEdge(view.id, view.extends);
|
|
43
|
-
}
|
|
44
|
-
return (0, import_topological_sort.topologicalSort)(g).reverse().reduce((acc, id) => {
|
|
45
|
-
const view = g.getNodeAttribute(id, "view");
|
|
46
|
-
if (!isExtendsElementView(view)) {
|
|
47
|
-
acc[view.id] = view;
|
|
48
|
-
return acc;
|
|
49
|
-
}
|
|
50
|
-
const extendsFrom = acc[view.extends];
|
|
51
|
-
if (!extendsFrom || !isElementView(extendsFrom)) return acc;
|
|
52
|
-
const tags = n([...extendsFrom.tags ?? [], ...view.tags ?? []]);
|
|
53
|
-
const links = [...extendsFrom.links ?? [], ...view.links ?? []];
|
|
54
|
-
acc[view.id] = {
|
|
55
|
-
...extendsFrom,
|
|
56
|
-
...view,
|
|
57
|
-
title: view.title ?? extendsFrom.title ?? null,
|
|
58
|
-
description: view.description ?? extendsFrom.description ?? null,
|
|
59
|
-
tags,
|
|
60
|
-
links: isNonEmptyArray(links) ? links : null,
|
|
61
|
-
rules: [...extendsFrom.rules, ...view.rules]
|
|
62
|
-
};
|
|
63
|
-
return acc;
|
|
64
|
-
}, {});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region src/compute-view/utils/with-readable-edges.ts
|
|
69
|
-
/**
|
|
70
|
-
* Convert hashed edge ids to human-readable
|
|
71
|
-
* Mostly for testing purposes
|
|
72
|
-
*/
|
|
73
|
-
function withReadableEdges({ edges, nodes, ...view }, separator = ":") {
|
|
74
|
-
const edgeids = t$1(edges, (e) => [e.id, `${e.source}${separator}${e.target}`]);
|
|
75
|
-
return {
|
|
76
|
-
...view,
|
|
77
|
-
edges: edges.map((e) => ({
|
|
78
|
-
...e,
|
|
79
|
-
id: edgeids[e.id]
|
|
80
|
-
})),
|
|
81
|
-
nodes: nodes.map((n) => ({
|
|
82
|
-
...n,
|
|
83
|
-
inEdges: t$2(n.inEdges, (e) => edgeids[e]),
|
|
84
|
-
outEdges: t$2(n.outEdges, (e) => edgeids[e])
|
|
85
|
-
})),
|
|
86
|
-
nodeIds: nodes.map((n) => n.id),
|
|
87
|
-
edgeIds: edges.map((e) => edgeids[e.id])
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function viewsWithReadableEdges({ views, ...model }) {
|
|
91
|
-
return {
|
|
92
|
-
...model,
|
|
93
|
-
views: t$3(views, (v) => n$1(withReadableEdges(v), ["nodeIds", "edgeIds"]))
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region src/compute-view/projects-view/compute.ts
|
|
99
|
-
const keysCount = (object) => t$4(object).length;
|
|
100
|
-
const nodeId = (projectId) => stringHash(projectId);
|
|
101
|
-
/**
|
|
102
|
-
* Computes an overview of projects and their relationships
|
|
103
|
-
*/
|
|
104
|
-
function computeProjectsView(likec4models) {
|
|
105
|
-
const nodesMap = buildNodesForEachModel(likec4models);
|
|
106
|
-
const key = (from, to) => `${from}->${to}`;
|
|
107
|
-
const relationships = new import_default_map.default((key) => {
|
|
108
|
-
const [from, to] = key.split("->");
|
|
109
|
-
return {
|
|
110
|
-
from,
|
|
111
|
-
to,
|
|
112
|
-
relationships: /* @__PURE__ */ new Set()
|
|
113
|
-
};
|
|
114
|
-
});
|
|
115
|
-
const relationshipsFromTo = (from, to) => relationships.get(key(from, to)).relationships;
|
|
116
|
-
const processImportedElement = (model, importedElement) => {
|
|
117
|
-
const projectId = importedElement.projectId;
|
|
118
|
-
invariant(projectId !== model.projectId, "Imported element must have a different project id");
|
|
119
|
-
const incoming = relationshipsFromTo(model.projectId, projectId);
|
|
120
|
-
for (const rel of importedElement.incoming("direct")) if (rel.source.projectId === model.projectId) incoming.add(rel);
|
|
121
|
-
const outgoing = relationshipsFromTo(projectId, model.projectId);
|
|
122
|
-
for (const rel of importedElement.outgoing("direct")) if (rel.target.projectId === model.projectId) outgoing.add(rel);
|
|
123
|
-
};
|
|
124
|
-
for (const model of likec4models) {
|
|
125
|
-
if (e(model.$data.imports)) continue;
|
|
126
|
-
for (const [projectId, imported] of t$5(model.$data.imports)) for (const importedElement of imported) {
|
|
127
|
-
const fqn = GlobalFqn(projectId, importedElement.id);
|
|
128
|
-
processImportedElement(model, nonNullable(model.findElement(fqn), `Element ${importedElement.id} from project ${projectId} not found in model ${model.projectId}`));
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
const edges = Array.from(relationships.entries()).filter(([_, { relationships }]) => relationships.size > 0).map(([key, { from, to, relationships: relationshipsSet }]) => {
|
|
132
|
-
const relationships = [...relationshipsSet];
|
|
133
|
-
invariant(t$6(relationships, 1), "Relationships set must have at least one relationship");
|
|
134
|
-
const edge = {
|
|
135
|
-
id: stringHash(key),
|
|
136
|
-
source: nodeId(from),
|
|
137
|
-
target: nodeId(to),
|
|
138
|
-
projectId: from,
|
|
139
|
-
relations: t$2(relationships, e$1("id")),
|
|
140
|
-
label: null,
|
|
141
|
-
color: "gray",
|
|
142
|
-
parent: null,
|
|
143
|
-
line: "solid",
|
|
144
|
-
tags: n(t$7(relationships, e$1("tags")))
|
|
145
|
-
};
|
|
146
|
-
const onlyOne = t$8(relationships);
|
|
147
|
-
if (onlyOne) {
|
|
148
|
-
edge.label = onlyOne.title;
|
|
149
|
-
edge.description = /* @__PURE__ */ preferSummary(onlyOne.$relationship) ?? null;
|
|
150
|
-
edge.technology = onlyOne.technology;
|
|
151
|
-
edge.color = onlyOne.color;
|
|
152
|
-
edge.line = onlyOne.line;
|
|
153
|
-
if (onlyOne.kind) edge.kind = onlyOne.kind;
|
|
154
|
-
if (onlyOne.$relationship.navigateTo) edge.navigateTo = onlyOne.$relationship.navigateTo;
|
|
155
|
-
}
|
|
156
|
-
return edge;
|
|
157
|
-
});
|
|
158
|
-
linkNodesWithEdges(nodesMap, edges);
|
|
159
|
-
const sorted = topologicalSort$1({
|
|
160
|
-
nodes: nodesMap,
|
|
161
|
-
edges
|
|
162
|
-
});
|
|
163
|
-
return {
|
|
164
|
-
id: "projects-view",
|
|
165
|
-
[_type]: "projects",
|
|
166
|
-
[_stage]: "computed",
|
|
167
|
-
title: "Projects",
|
|
168
|
-
description: { txt: "Overview of all projects and their relationships" },
|
|
169
|
-
autoLayout: { direction: "TB" },
|
|
170
|
-
...sorted
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
function buildNodesForEachModel(likec4models) {
|
|
174
|
-
const nodesMap = /* @__PURE__ */ new Map();
|
|
175
|
-
for (const model of likec4models) {
|
|
176
|
-
const projectId = ProjectId(model.projectId);
|
|
177
|
-
const node = {
|
|
178
|
-
id: nodeId(projectId),
|
|
179
|
-
kind: "@project",
|
|
180
|
-
parent: null,
|
|
181
|
-
projectId,
|
|
182
|
-
title: model.project.title ?? model.project.id,
|
|
183
|
-
description: { txt: [
|
|
184
|
-
`Elements: ${keysCount(model.$data.elements)}`,
|
|
185
|
-
`Relationships: ${keysCount(model.$data.relations)}`,
|
|
186
|
-
`Views: ${keysCount(model.$data.views)}`
|
|
187
|
-
].join("\n") },
|
|
188
|
-
shape: "rectangle",
|
|
189
|
-
children: [],
|
|
190
|
-
inEdges: [],
|
|
191
|
-
outEdges: [],
|
|
192
|
-
color: "primary",
|
|
193
|
-
level: 0,
|
|
194
|
-
style: {},
|
|
195
|
-
tags: []
|
|
196
|
-
};
|
|
197
|
-
nodesMap.set(node.id, node);
|
|
198
|
-
}
|
|
199
|
-
return nodesMap;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
//#endregion
|
|
203
|
-
//#region src/compute-view/adhoc-view/compute.ts
|
|
204
|
-
/**
|
|
205
|
-
* Computes an adhoc view based on the given predicates.
|
|
206
|
-
* Adhoc views are not defined in the model, but computed on demand.
|
|
207
|
-
* Available for logical model only.
|
|
208
|
-
*
|
|
209
|
-
* @param predicates accepts the same predicates as element view.
|
|
210
|
-
* @param likec4model The LikeC4 model to compute view.
|
|
211
|
-
* @returns The computed adhoc view.
|
|
212
|
-
*/
|
|
213
|
-
function computeAdhocView(likec4model, predicates) {
|
|
214
|
-
return {
|
|
215
|
-
...computeElementView(likec4model, {
|
|
216
|
-
id: ViewId("adhoc"),
|
|
217
|
-
_stage: "parsed",
|
|
218
|
-
_type: "element",
|
|
219
|
-
rules: predicates,
|
|
220
|
-
title: null,
|
|
221
|
-
description: null
|
|
222
|
-
}),
|
|
223
|
-
_type: "adhoc",
|
|
224
|
-
_stage: "computed"
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
//#endregion
|
|
229
|
-
//#region src/compute-view/adhoc-view/builder.ts
|
|
230
|
-
/**
|
|
231
|
-
* Allows you to define type-safe adhoc views using types from the model.
|
|
232
|
-
*/
|
|
233
|
-
var AdhocView = class AdhocView {
|
|
234
|
-
/**
|
|
235
|
-
* Creates a new adhoc view builder.
|
|
236
|
-
*/
|
|
237
|
-
static use(model) {
|
|
238
|
-
return new AdhocView(model);
|
|
239
|
-
}
|
|
240
|
-
#predicates = [];
|
|
241
|
-
constructor(model) {
|
|
242
|
-
this.model = model;
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Used to cache the type of the predicates.
|
|
246
|
-
*/
|
|
247
|
-
Expr;
|
|
248
|
-
include(...predicates) {
|
|
249
|
-
this.#predicates.push({ include: predicates.map((predicate) => $expr(predicate)) });
|
|
250
|
-
return this;
|
|
251
|
-
}
|
|
252
|
-
exclude(...predicates) {
|
|
253
|
-
this.#predicates.push({ exclude: predicates.map((predicate) => $expr(predicate)) });
|
|
254
|
-
return this;
|
|
255
|
-
}
|
|
256
|
-
compute() {
|
|
257
|
-
return computeAdhocView(this.model, this.#predicates);
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
//#endregion
|
|
262
|
-
export { AdhocView, computeAdhocView, computeLikeC4Model, computeParsedModelData, computeProjectsView, computeRelationshipsView, computeView, resolveRulesExtendedViews, treeFromElements, unsafeComputeView, viewsWithReadableEdges, withReadableEdges };
|
|
1
|
+
import{r as __toESM}from"../_chunks/rolldown-runtime.mjs";import"../_chunks/libs/defu.mjs";import{$ as r,C as t$3,D as t$4,K as t$7,L as e,Q as t$6,S as n$1,T as t$2,X as t$5,Y as n$2,b as e$2,d as t$10,et as t$9,i as n,m as e$1,r as t,w as t$1,y as t$8}from"../_chunks/libs/remeda.mjs";import{Q as GlobalFqn,_ as isExtendsElementView,_t as _type,bt as preferSummary,g as isElementView,gt as _stage,ot as ViewId,rt as ProjectId}from"../_chunks/RichText.mjs";import{$ as nonNullable,D as ifilter,I as isAncestor,K as isNonEmptyArray,L as isDescendantOf,Q as invariant,U as sortParentsFirst,_ as toArray,r as stringHash,v as toSet,x as imap}from"../_chunks/to-text.mjs";import{n as require_topological_sort,t as require_will_create_cycle}from"../_chunks/libs/graphology-dag.mjs";import{t as import_default_map}from"../_chunks/libs/mnemonist.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/extend.mjs";import"../_chunks/libs/@mantine/colors-generator.mjs";import{a as unsafeComputeView,c as linkNodesWithEdges,i as computeView,n as computeLikeC4Model,o as computeElementView,r as computeParsedModelData,s as topologicalSort$1,t as $expr}from"../_chunks/Builder.view-element.mjs";import{t as Graph}from"../_chunks/libs/graphology.mjs";var import_topological_sort=require_topological_sort(),import_will_create_cycle=__toESM(require_will_create_cycle(),1);function resolveRulesExtendedViews(i){let a=new Graph({type:`directed`}),o=[];for(let s of t(i))a.addNode(s.id,{view:s}),isExtendsElementView(s)&&o.push(s);if(o.length===0)return i;for(let i of o){if(!a.hasNode(i.extends)){console.warn(`View "${i.id}" extends from "${i.extends}" which does not exist`);continue}if((0,import_will_create_cycle.default)(a,i.id,i.extends)){console.warn(`View "${i.id}" extends from "${i.extends}" which creates a cycle`);continue}a.addDirectedEdge(i.id,i.extends)}return(0,import_topological_sort.topologicalSort)(a).reverse().reduce((i,o)=>{let s=a.getNodeAttribute(o,`view`);if(!isExtendsElementView(s))return i[s.id]=s,i;let c=i[s.extends];if(!c||!isElementView(c))return i;let l=n([...c.tags??[],...s.tags??[]]),u=[...c.links??[],...s.links??[]];return i[s.id]={...c,...s,title:s.title??c.title??null,description:s.description??c.description??null,tags:l,links:isNonEmptyArray(u)?u:null,rules:[...c.rules,...s.rules]},i},{})}function withReadableEdges({edges:i,nodes:a,...o},s=`:`){let c=t$1(i,i=>[i.id,`${i.source}${s}${i.target}`]);return{...o,edges:i.map(i=>({...i,id:c[i.id]})),nodes:a.map(i=>({...i,inEdges:t$2(i.inEdges,i=>c[i]),outEdges:t$2(i.outEdges,i=>c[i])})),nodeIds:a.map(i=>i.id),edgeIds:i.map(i=>c[i.id])}}function viewsWithReadableEdges({views:i,...a}){return{...a,views:t$3(i,i=>n$1(withReadableEdges(i),[`nodeIds`,`edgeIds`]))}}const keysCount=i=>t$4(i).length,nodeId=i=>stringHash(i);function computeProjectsView(i){let a=buildNodesForEachModel(i),o=(i,a)=>`${i}->${a}`,s=new import_default_map.default(i=>{let[a,o]=i.split(`->`);return{from:a,to:o,relationships:new Set}}),d=(i,a)=>s.get(o(i,a)).relationships,p=(i,a)=>{let o=a.projectId;invariant(o!==i.projectId,`Imported element must have a different project id`);let s=d(i.projectId,o);for(let o of a.incoming(`direct`))o.source.projectId===i.projectId&&s.add(o);let c=d(o,i.projectId);for(let o of a.outgoing(`direct`))o.target.projectId===i.projectId&&c.add(o)};for(let a of i)if(!e(a.$data.imports))for(let[i,o]of t$5(a.$data.imports))for(let s of o){let o=GlobalFqn(i,s.id);p(a,nonNullable(a.findElement(o),`Element ${s.id} from project ${i} not found in model ${a.projectId}`))}let m=Array.from(s.entries()).filter(([i,{relationships:a}])=>a.size>0).map(([i,{from:a,to:o,relationships:s}])=>{let l=[...s];invariant(t$6(l,1),`Relationships set must have at least one relationship`);let d={id:stringHash(i),source:nodeId(a),target:nodeId(o),projectId:a,relations:t$2(l,e$1(`id`)),label:null,color:`gray`,parent:null,line:`solid`,tags:n(t$7(l,e$1(`tags`)))},f=t$8(l);return f&&(d.label=f.title,d.description=preferSummary(f.$relationship)??null,d.technology=f.technology,d.color=f.color,d.line=f.line,f.kind&&(d.kind=f.kind),f.$relationship.navigateTo&&(d.navigateTo=f.$relationship.navigateTo)),d});linkNodesWithEdges(a,m);let h=topologicalSort$1({nodes:a,edges:m});return{id:`projects-view`,[_type]:`projects`,[_stage]:`computed`,title:`Projects`,description:{txt:`Overview of all projects and their relationships`},autoLayout:{direction:`TB`},...h}}function buildNodesForEachModel(i){let a=new Map;for(let o of i){let i=ProjectId(o.projectId),s={id:nodeId(i),kind:`@project`,parent:null,projectId:i,title:o.project.title??o.project.id,description:{txt:[`Elements: ${keysCount(o.$data.elements)}`,`Relationships: ${keysCount(o.$data.relations)}`,`Views: ${keysCount(o.$data.views)}`].join(`
|
|
2
|
+
`)},shape:`rectangle`,children:[],inEdges:[],outEdges:[],color:`primary`,level:0,style:{},tags:[]};a.set(s.id,s)}return a}function treeFromElements(i){let o=sortParentsFirst([...i]),s=new Set(o),c=new Map,l=new import_default_map.default(()=>null),u=o.reduce((i,o,u,d)=>(c.set(o.id,o),i.set(o.id,t$9(d,r(u+1),n$2(isDescendantOf(o)),t$10((i,a)=>(s.delete(a),i.some(isAncestor(a))||(i.push(a),l.set(a.id,o)),i),[]))),i),new import_default_map.default(()=>[]));return{sorted:o,byId:i=>nonNullable(c.get(i),`Element not found by id: ${i}`),root:s,parent:i=>l.get(typeof i==`string`?i:i.id),children:i=>u.get(typeof i==`string`?i:i.id),flatten:e$2(()=>new Set([...s,...o.reduce((i,a)=>{let o=u.get(a.id);return o.length===0?(i.push(a),i):(o.length>1&&i.push(...o),i)},[])]))}}const finalize=(i,a)=>i.size>2&&a.size!==i.size?new Set(sortParentsFirst([...treeFromElements(i).flatten(),...a])):i.size>1?new Set(sortParentsFirst([...i])):i;function computeRelationships(i,a,o){let s=i=>a.has(i),c=new Set([i]),l={incomers:new Set,subjects:new Set([i]),outgoers:new Set},u=new Set(o.incoming.flatMap(a=>{if(l.subjects.add(a.target),l.incomers.add(a.source),c.add(a.target),a.target!==i){let o=a.target.parent;for(;o&&o!==i;)c.add(o),o=o.parent}let o=a.source,u=[];for(;u.push(o),!(s(o)||!o.parent);)o=o.parent;return u})),d=new Set(o.outgoing.flatMap(a=>{if(l.subjects.add(a.source),l.outgoers.add(a.target),c.add(a.source),a.source!==i){let o=a.source.parent;for(;o&&o!==i;)c.add(o),o=o.parent}let o=a.target,u=[];for(;u.push(o),!(s(o)||!o.parent);)o=o.parent;return u}));return{incomers:finalize(u,l.incomers),incoming:new Set(o.incoming),subjects:finalize(c,l.subjects),outgoing:new Set(o.outgoing),outgoers:finalize(d,l.outgoers)}}function computeRelationshipsView(i,a,o,s=`global`){let c=o?a.findView(o):null;if(s===`view`)return invariant(c,`Scope view id is required when scope is "view"`),computeScopedRelationshipsView(i,c,a);let l=a.element(i);return computeRelationships(l,toSet(l.ascendingSiblings()),{incoming:[...l.incoming()],outgoing:[...l.outgoing()]})}function computeScopedRelationshipsView(i,a,o){let s=o.element(i),c={incoming:toArray(ifilter(s.incoming(),i=>a.includesRelation(i.id))),outgoing:toArray(ifilter(s.outgoing(),i=>a.includesRelation(i.id)))},l=isDescendantOf(s);return computeRelationships(s,new Set([...s.ascendingSiblings(),...t$9(a.elements(),imap(i=>i.element),ifilter(i=>i!==s&&l(i)))]),c)}function computeAdhocView(i,a){return{...computeElementView(i,{id:ViewId(`adhoc`),_stage:`parsed`,_type:`element`,rules:a,title:null,description:null}),_type:`adhoc`,_stage:`computed`}}var AdhocView=class i{static use(a){return new i(a)}#e=[];constructor(i){this.model=i}Expr;include(...i){return this.#e.push({include:i.map(i=>$expr(i))}),this}exclude(...i){return this.#e.push({exclude:i.map(i=>$expr(i))}),this}compute(){return computeAdhocView(this.model,this.#e)}};export{AdhocView,computeAdhocView,computeLikeC4Model,computeParsedModelData,computeProjectsView,computeRelationshipsView,computeView,resolveRulesExtendedViews,treeFromElements,unsafeComputeView,viewsWithReadableEdges,withReadableEdges};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { BBox, Point, RectBox, Vector, VectorValue, XYPoint, vector };
|
|
1
|
+
import { a as RectBox, c as XYPoint, i as BBox, l as convertPoint, n as VectorValue, o as Dimensions, r as vector, s as Point, t as Vector, u as isPoint } from "../_chunks/vector.mjs";
|
|
2
|
+
export { BBox, Dimensions, Point, RectBox, Vector, VectorValue, XYPoint, convertPoint, isPoint, vector };
|
package/dist/geometry/index.mjs
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { BBox, RectBox, Vector, vector };
|
|
1
|
+
import"../_chunks/libs/defu.mjs";import{a as convertPoint,i as RectBox,n as vector,o as isPoint,r as BBox,t as Vector}from"../_chunks/vector.mjs";import"../_chunks/libs/graphology-dag.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/extend.mjs";export{BBox,RectBox,Vector,convertPoint,isPoint,vector};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { Ct as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { $ as LikeC4Project, $t as AnyIncludePredicate, A as DeploymentViewExcludePredicate, At as DynamicStep, B as LayoutedDynamicView, Bt as isDynamicStepsParallel, C as isDiagramView, Ct as ensureSizes, D as isScopedElementView, Dt as GlobalStyleID, E as isExtendsElementView, Et as GlobalPredicates, F as ParsedDeploymentView, Ft as DynamicViewRule, G as ViewManualLayoutSnapshot, Gt as ElementViewRule, H as DiagramEdgeDriftReason, Ht as ElementViewExcludePredicate, I as DiagramEdge, It as DynamicViewStep, J as ComputedEdge, Jt as ElementViewRuleStyle, K as ComputedDeploymentView, Kt as ElementViewRuleGroup, L as DiagramNode, Lt as ParsedDynamicView, M as DeploymentViewPredicate, Mt as DynamicStepsSeries, N as DeploymentViewRule, Nt as DynamicViewDisplayVariant, O as isViewRulePredicate, Ot as GlobalStyles, P as DeploymentViewRuleStyle, Pt as DynamicViewIncludeRule, Q as ComputedRankConstraint, Qt as AnyExcludePredicate, R as LayoutType, Rt as getParallelStepsPrefix, S as isDeploymentView, St as Relationship, T as isElementView, Tt as GlobalPredicateId, U as DiagramNodeDriftReason, Ut as ElementViewIncludePredicate, V as LayoutedElementView, Vt as isDynamicStepsSeries, W as LayoutedViewDriftReason, Wt as ElementViewPredicate, X as ComputedNode, Xt as isViewRuleGroup, Y as ComputedElementView, Yt as ParsedElementView, Z as ComputedNodeStyle, Zt as isViewRuleRank, _ as ViewOnStage, _n as isViewRuleGlobalPredicateRef, _t as isDeploymentNode, a as SpecTypesFromDump, an as RankValue, at as ElementSpecification, b as ViewWithType, bt as ElementStyle, c as ComputedLikeC4ModelData, cn as ViewRuleAutoLayout, ct as TagSpecification, d as ParsedLikeC4ModelData, dn as ViewRuleRank, dt as DeploymentElement, en as AnyViewRuleStyle, et as LikeC4ProjectManualLayoutsConfig, f as AnyView, fn as ViewType, ft as DeploymentElementRef, g as ProcessedView, gn as isViewRuleAutoLayout, gt as isDeployedInstance, h as ParsedView, hn as isAutoLayoutDirection, ht as DeploymentRelationship, i as ProjectDump, in as NodeNotation, it as LikeC4ProjectTheme, j as DeploymentViewIncludePredicate, jt as DynamicStepsParallel, k as isViewRuleStyle, kt as ModelGlobals, l as LayoutedLikeC4ModelData, ln as ViewRuleGlobalPredicateRef, lt as isTagColorSpecified, m as LayoutedView, mn as ViewWithNotation, mt as DeploymentRelation, n as AuxFromDump, nn as BaseParsedViewProperties, nt as LikeC4ProjectStylesConfig, o as SpecificationDump, on as ViewAutoLayout, ot as RelationshipSpecification, p as ComputedView, pn as ViewWithHash, pt as DeploymentNode, q as ComputedDynamicView, qt as ElementViewRuleRank, r as LikeC4ModelDump, rn as BaseViewProperties, rt as LikeC4ProjectStylesCustomStylesheets, s as AuxFromLikeC4ModelData, sn as ViewManualLayout, st as Specification, t as ViewChange, tn as AutoLayoutDirection, tt as LikeC4ProjectStyleDefaults, u as LikeC4ModelData, un as ViewRuleGlobalStyle, ut as DeployedInstance, v as ViewRule, vn as isViewRuleGlobalStyle, vt as AbstractRelationship, w as isDynamicView, wt as GlobalDynamicPredicates, x as isComputedView, xt as ModelRelation, y as ViewRulePredicate, yt as Element, z as LayoutedDeploymentView, zt as isDynamicStep } from "./_chunks/index2.mjs";
|
|
8
|
-
import { i as RichTextOrEmpty, n as RichTextEmpty, t as RichText } from "./_chunks/RichText.mjs";
|
|
9
|
-
import { a as LikeC4Styles } from "./_chunks/index3.mjs";
|
|
10
|
-
import { a as Queue, c as DefaultMap, i as MultiMap, n as BiMap, o as LinkedList, s as DefaultWeakMap } from "./_chunks/libs/mnemonist.mjs";
|
|
1
|
+
import { $ as LayoutedViewDriftReason, $i as IterableContainer, $n as FqnRef, $r as SpecAux, $t as ElementViewPredicate, A as isComputedView, Ai as RelationKind, An as ModelRelationExpr, Ar as ThemeColors, At as ModelRelation, B as DeploymentViewIncludePredicate, Bi as isGroupElementKind, Bn as OperatorPredicate, Bt as DynamicStepsParallel, C as LayoutedView, Ci as Icon, Cn as ViewWithNotation, Cr as isCustomColor, Ct as DeploymentRelation, D as ViewRule, Di as NoneIcon, Dn as isViewRuleGlobalStyle, Dr as ElementShapes, Dt as AbstractRelationship, E as ViewOnStage, Ei as NodeId, En as isViewRuleGlobalPredicateRef, Et as isDeploymentNode, F as isExtendsElementView, Fi as Tag, Fn as AndOperator, Fr as Aux, Ft as GlobalPredicates, G as DiagramEdge, Gi as ExtractOnStage, Gn as WhereOperator, Gr as LooseLiteral, Gt as DynamicViewStep, H as DeploymentViewRule, Hi as scalar_d_exports, Hn as Participant, Ht as DynamicViewDisplayVariant, I as isScopedElementView, Ii as ViewId, In as EqualOperator, It as GlobalStyleID, J as LayoutedDeploymentView, Ji as _stage, Jn as isNotOperator, Jt as isDynamicStep, K as DiagramNode, Ki as ModelStage, Kn as isAndOperator, Kt as ParsedDynamicView, L as isViewRulePredicate, Li as extractStep, Ln as Filterable, Lt as GlobalStyles, M as isDiagramView, Mi as StepEdgeId, Mn as FqnExpr, Mr as AnyComputed, Mt as ensureSizes, N as isDynamicView, Ni as StepEdgeIdLiteral, Nn as PredicateSelector, Nr as AnyLayouted, Nt as GlobalDynamicPredicates, O as ViewRulePredicate, Oi as ProjectId, On as ModelExpression, Or as IconPositions, Ot as Element, P as isElementView, Pi as StepEdgeKind, Pn as RelationExpr, Pr as AnyParsed, Pt as GlobalPredicateId, Q as DiagramNodeDriftReason, Qi as ExclusiveUnion, Qn as whereOperatorAsPredicate, Qt as ElementViewIncludePredicate, R as isViewRuleStyle, Ri as flattenMarkdownOrString, Rn as KindEqual, Rt as ModelGlobals, S as ComputedView, Si as GroupElementKind, Sn as ViewWithHash, Sr as ThemeColorValues, St as DeploymentNode, T as ProcessedView, Ti as MarkdownOrString, Tn as isViewRuleAutoLayout, Tr as BorderStyles, Tt as isDeployedInstance, U as DeploymentViewRuleStyle, Ui as splitGlobalFqn, Un as ParticipantOperator, Ut as DynamicViewIncludeRule, V as DeploymentViewPredicate, Vi as isStepEdgeId, Vn as OrOperator, Vt as DynamicStepsSeries, W as ParsedDeploymentView, Wi as stepEdgeId, Wn as TagEqual, Wt as DynamicViewRule, X as LayoutedElementView, Xi as isOnStage, Xn as isParticipantOperator, Xt as isDynamicStepsSeries, Y as LayoutedDynamicView, Yi as _type, Yn as isOrOperator, Yt as isDynamicStepsParallel, Z as DiagramEdgeDriftReason, Zi as Coalesce, Zn as isTagEqual, Zt as ElementViewExcludePredicate, _ as ComputedLikeC4ModelData, _i as DeploymentKind, _n as ViewRuleAutoLayout, _r as ShapeSize, _t as TagSpecification, a as isNonEmptyArray, aa as NonEmptyReadonlyArray, ai as UnknownComputed, an as isViewRuleGroup, ar as ElementColorValues, at as ComputedNode, b as ParsedLikeC4ModelData, bi as Fqn, bn as ViewRuleRank, br as TextSize, bt as DeploymentElement, c as RichTextEmpty, ca as exact, cn as AnyIncludePredicate, cr as IconPosition, ct as LikeC4Project, d as AuxFromDump, di as preferSummary, dn as BaseParsedViewProperties, dr as LikeC4StylesConfig, dt as LikeC4ProjectStylesConfig, ea as IteratorLike, en as ElementViewRule, er as BorderStyle, et as ViewManualLayoutSnapshot, f as LikeC4ModelDump, fn as BaseViewProperties, fr as LikeC4Theme, ft as LikeC4ProjectStylesCustomStylesheets, g as AuxFromLikeC4ModelData, gi as DeploymentFqn, gn as ViewManualLayout, gr as RelationshipLineType, gt as Specification, h as SpecificationDump, hi as BuiltInIcon, hn as ViewAutoLayout, hr as RelationshipColorValues, ht as RelationshipSpecification, i as isAnyOf, ia as NonEmptyArray, ii as Unknown, in as ParsedElementView, ir as CustomColorDefinitions, it as ComputedElementView, j as isDeploymentView, ji as RelationshipKind, jn as Expression, jr as Any, jt as Relationship, k as ViewWithType, ki as RelationId, kn as ModelFqnExpr, kr as Sizes, kt as ElementStyle, l as RichTextOrEmpty, li as _aux_d_exports, ln as AnyViewRuleStyle, lr as IconSize, lt as LikeC4ProjectManualLayoutsConfig, m as SpecTypesFromDump, mi as AnyFqn, mn as RankValue, mr as RelationshipArrowTypes, mt as ElementSpecification, n as GuardedBy, na as Link, nn as ElementViewRuleRank, nr as ColorLiteral, nt as ComputedDynamicView, o as isString, oa as Predicate, oi as UnknownLayouted, on as isViewRuleRank, or as ElementShape, ot as ComputedNodeStyle, p as ProjectDump, pn as NodeNotation, pr as RelationshipArrowType, pt as LikeC4ProjectTheme, q as LayoutType, qi as _layout, qn as isKindEqual, qt as getParallelStepsPrefix, r as hasProp, ra as NTuple, rn as ElementViewRuleStyle, rr as CustomColor, rt as ComputedEdge, s as RichText, sa as ReorderedArray, si as UnknownParsed, sn as AnyExcludePredicate, sr as HexColor, st as ComputedRankConstraint, t as Guard, ta as KeysOf, tn as ElementViewRuleGroup, tr as Color, tt as ComputedDeploymentView, u as ViewChange, ui as preferDescription, un as AutoLayoutDirection, ur as LikeC4StyleDefaults, ut as LikeC4ProjectStyleDefaults, v as LayoutedLikeC4ModelData, vi as EdgeId, vn as ViewRuleGlobalPredicateRef, vr as Size, vt as isTagColorSpecified, w as ParsedView, wi as IconUrl, wn as isAutoLayoutDirection, wr as isThemeColor, wt as DeploymentRelationship, x as AnyView, xi as GlobalFqn, xn as ViewType, xr as ThemeColor, xt as DeploymentElementRef, y as LikeC4ModelData, yi as ElementKind, yn as ViewRuleGlobalStyle, yr as SpacingSize, yt as DeployedInstance, z as DeploymentViewExcludePredicate, zi as isGlobalFqn, zn as NotOperator, zt as DynamicStep } from "./_chunks/guards.mjs";
|
|
2
|
+
import { a as RectBox, c as XYPoint, i as BBox, l as convertPoint, n as VectorValue, o as Dimensions, r as vector, s as Point, t as Vector, u as isPoint } from "./_chunks/vector.mjs";
|
|
3
|
+
import "./types/index.mjs";
|
|
4
|
+
import { i as LikeC4Styles } from "./_chunks/theme.mjs";
|
|
5
|
+
import { a as DefaultWeakMap, i as LinkedList, n as MultiMap, o as DefaultMap, r as Queue } from "./_chunks/libs/mnemonist.mjs";
|
|
6
|
+
import "./styles/index.mjs";
|
|
11
7
|
import { o as LayoutedProjectsView, r as ComputedProjectsView } from "./_chunks/_types2.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
8
|
+
import { D as isIterable, F as isAncestor, H as sortParentsFirst, I as isDescendantOf, J as nonNullable, L as isSameHierarchy, R as nameFromFqn, V as sortNaturalByFqn, Y as nonexhaustive, k as ancestorsFqn, m as memoizeProp, q as invariant, z as parentFqn } from "./_chunks/to-text.mjs";
|
|
9
|
+
import "./utils/index.mjs";
|
|
14
10
|
|
|
15
11
|
//#region src/manual-layout/applyManualLayout.d.ts
|
|
16
12
|
/**
|
|
@@ -31,4 +27,4 @@ declare function applyManualLayout<V extends LayoutedView>(autoLayouted: V, snap
|
|
|
31
27
|
*/
|
|
32
28
|
declare function calcDriftsFromSnapshot<V extends LayoutedView>(autoLayouted: V, snapshot: ViewManualLayoutSnapshot): V;
|
|
33
29
|
//#endregion
|
|
34
|
-
export { AbstractRelationship, AndOperator, Any, Any as AnyAux, AnyComputed, AnyExcludePredicate, AnyFqn, AnyIncludePredicate, AnyLayouted, AnyParsed, AnyView, AnyViewRuleStyle, AutoLayoutDirection, Aux, AuxFromDump, AuxFromLikeC4ModelData, BBox, BaseParsedViewProperties, BaseViewProperties,
|
|
30
|
+
export { AbstractRelationship, AndOperator, Any, Any as AnyAux, AnyComputed, AnyExcludePredicate, AnyFqn, AnyIncludePredicate, AnyLayouted, AnyParsed, AnyView, AnyViewRuleStyle, AutoLayoutDirection, Aux, AuxFromDump, AuxFromLikeC4ModelData, BBox, BaseParsedViewProperties, BaseViewProperties, BorderStyle, BorderStyles, BuiltInIcon, Coalesce, Color, ColorLiteral, ComputedDeploymentView, ComputedDynamicView, ComputedEdge, ComputedElementView, ComputedLikeC4ModelData, ComputedNode, ComputedNodeStyle, type ComputedProjectsView, ComputedRankConstraint, ComputedView, CustomColor, CustomColorDefinitions, DefaultMap, DefaultWeakMap, DeployedInstance, DeploymentElement, DeploymentElementRef, DeploymentFqn, DeploymentKind, DeploymentNode, DeploymentRelation, DeploymentRelationship, DeploymentViewExcludePredicate, DeploymentViewIncludePredicate, DeploymentViewPredicate, DeploymentViewRule, DeploymentViewRuleStyle, DiagramEdge, DiagramEdgeDriftReason, DiagramNode, DiagramNodeDriftReason, LayoutedView as DiagramView, LayoutedView, Dimensions, DynamicStep, DynamicStepsParallel, DynamicStepsSeries, DynamicViewDisplayVariant, DynamicViewIncludeRule, DynamicViewRule, DynamicViewStep, EdgeId, Element, ElementColorValues, ElementKind, ElementShape, ElementShapes, ElementSpecification, ElementStyle, ElementViewExcludePredicate, ElementViewIncludePredicate, ElementViewPredicate, ElementViewRule, ElementViewRuleGroup, ElementViewRuleRank, ElementViewRuleStyle, EqualOperator, ExclusiveUnion, Expression, ExtractOnStage, Filterable, Fqn, FqnExpr, FqnRef, GlobalDynamicPredicates, GlobalFqn, GlobalPredicateId, GlobalPredicates, GlobalStyleID, GlobalStyles, GroupElementKind, Guard, GuardedBy, HexColor, Icon, IconPosition, IconPositions, IconSize, IconUrl, IterableContainer, IteratorLike, KeysOf, KindEqual, LayoutType, LayoutedDeploymentView, LayoutedDynamicView, LayoutedElementView, LayoutedLikeC4ModelData, type LayoutedProjectsView, LayoutedViewDriftReason, LikeC4ModelData, LikeC4ModelDump, LikeC4Project, LikeC4ProjectManualLayoutsConfig, LikeC4ProjectStyleDefaults, LikeC4ProjectStylesConfig, LikeC4ProjectStylesCustomStylesheets, LikeC4ProjectTheme, type LikeC4StyleDefaults, LikeC4Styles, type LikeC4StylesConfig, type LikeC4Theme, ParsedView as LikeC4View, ParsedView, Link, LinkedList, LooseLiteral, MarkdownOrString, ModelExpression, ModelFqnExpr, ModelGlobals, ModelRelation, ModelRelationExpr, ModelStage, MultiMap, NTuple, NodeId, NodeNotation, NonEmptyArray, NonEmptyReadonlyArray, NoneIcon, NotOperator, OperatorPredicate, OrOperator, ParsedDeploymentView, ParsedDynamicView, ParsedElementView, ParsedLikeC4ModelData, Participant, ParticipantOperator, Point, Predicate, PredicateSelector, ProcessedView, ProjectDump, ProjectId, Queue, RankValue, RectBox, RelationExpr, RelationId, RelationKind, Relationship, RelationshipArrowType, RelationshipArrowTypes, RelationshipColorValues, RelationshipKind, RelationshipLineType, RelationshipSpecification, ReorderedArray, RichText, RichTextEmpty, RichTextOrEmpty, ShapeSize, Size, Sizes, SpacingSize, SpecAux, SpecTypesFromDump, Specification, SpecificationDump, StepEdgeId, StepEdgeIdLiteral, StepEdgeKind, Tag, TagEqual, TagSpecification, TextSize, ThemeColor, type ThemeColorValues, ThemeColors, Unknown, UnknownComputed, UnknownLayouted, UnknownParsed, Vector, VectorValue, ViewAutoLayout, ViewChange, ViewId, ViewManualLayout, ViewManualLayoutSnapshot, ViewOnStage, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRulePredicate, ViewRuleRank, ViewType, ViewWithHash, ViewWithNotation, ViewWithType, WhereOperator, XYPoint, _layout, _stage, _type, ancestorsFqn, applyManualLayout, _aux_d_exports as aux, calcDriftsFromSnapshot, convertPoint, ensureSizes, exact, extractStep, flattenMarkdownOrString, getParallelStepsPrefix, hasProp, invariant, isAncestor, isAndOperator, isAnyOf, isAutoLayoutDirection, isComputedView, isCustomColor, isDeployedInstance, isDeploymentNode, isDeploymentView, isDescendantOf, isDiagramView, isDiagramView as isLayoutedView, isDynamicStep, isDynamicStepsParallel, isDynamicStepsSeries, isDynamicView, isElementView, isExtendsElementView, isGlobalFqn, isGroupElementKind, isIterable, isKindEqual, isNonEmptyArray, isNotOperator, isOnStage, isOrOperator, isParticipantOperator, isPoint, isSameHierarchy, isScopedElementView, isStepEdgeId, isString, isTagColorSpecified, isTagEqual, isThemeColor, isViewRuleAutoLayout, isViewRuleGlobalPredicateRef, isViewRuleGlobalStyle, isViewRuleGroup, isViewRulePredicate, isViewRuleRank, isViewRuleStyle, memoizeProp, nameFromFqn, nonNullable, nonexhaustive, parentFqn, preferDescription, preferSummary, scalar_d_exports as scalar, sortNaturalByFqn, sortParentsFirst, splitGlobalFqn, stepEdgeId, vector, whereOperatorAsPredicate };
|
package/dist/index.mjs
CHANGED
|
@@ -1,27 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./_chunks/libs/natural-compare-lite.mjs";
|
|
3
|
-
import { A as sortParentsFirst, C as isAncestor, D as parentFqn, E as nameFromFqn, N as isNonEmptyArray, P as isString, T as isSameHierarchy, _ as ancestorsFqn, h as memoizeProp, j as hasProp, k as sortNaturalByFqn, w as isDescendantOf } from "./_chunks/utils.mjs";
|
|
4
|
-
import { n as nonNullable, r as nonexhaustive, t as invariant } from "./_chunks/invariant.mjs";
|
|
5
|
-
import "./_chunks/libs/@mantine/colors-generator.mjs";
|
|
6
|
-
import "./_chunks/libs/graphology-dag.mjs";
|
|
7
|
-
import { i as import_linked_list, n as import_default_map, o as import_multi_map, r as import_default_weak_map, s as import_queue, t as import_bi_map } from "./_chunks/libs/mnemonist.mjs";
|
|
8
|
-
import { p as isIterable } from "./_chunks/iterable.mjs";
|
|
9
|
-
import "./_chunks/libs/defu.mjs";
|
|
10
|
-
import "./_chunks/libs/extend.mjs";
|
|
11
|
-
import { n as preferSummary, t as preferDescription } from "./_chunks/_aux.mjs";
|
|
12
|
-
import { i as RectBox, n as vector, r as BBox, t as Vector } from "./_chunks/geometry.mjs";
|
|
13
|
-
import { _ as scalar_exports, a as GroupElementKind, c as ProjectId, d as ViewId, f as extractStep, g as isStepEdgeId, h as isGroupElementKind, i as GlobalFqn, l as RelationId, m as isGlobalFqn, n as EdgeId, o as NodeId, p as flattenMarkdownOrString, r as Fqn, s as NoneIcon, t as DeploymentFqn, u as StepEdgeKind, v as splitGlobalFqn, y as stepEdgeId } from "./_chunks/scalar.mjs";
|
|
14
|
-
import { t as FqnRef } from "./_chunks/fqnRef.mjs";
|
|
15
|
-
import { n as FqnExpr, r as RelationExpr, t as Expression } from "./_chunks/expression.mjs";
|
|
16
|
-
import { n as ModelFqnExpr, r as ModelRelationExpr, t as ModelExpression } from "./_chunks/expression-model.mjs";
|
|
17
|
-
import { t as RichText } from "./_chunks/RichText.mjs";
|
|
18
|
-
import "./styles/index.mjs";
|
|
19
|
-
import { n as applyManualLayout, t as calcDriftsFromSnapshot } from "./_chunks/calcDriftsFromSnapshot.mjs";
|
|
20
|
-
|
|
21
|
-
var BiMap = import_bi_map.default;
|
|
22
|
-
var DefaultMap = import_default_map.default;
|
|
23
|
-
var DefaultWeakMap = import_default_weak_map.default;
|
|
24
|
-
var LinkedList = import_linked_list.default;
|
|
25
|
-
var MultiMap = import_multi_map.default;
|
|
26
|
-
var Queue = import_queue.default;
|
|
27
|
-
export { BBox, BiMap, DefaultMap, DefaultWeakMap, DeploymentFqn, EdgeId, Expression, Fqn, FqnExpr, FqnRef, GlobalFqn, GroupElementKind, LikeC4Styles, LinkedList, ModelExpression, ModelFqnExpr, ModelRelationExpr, MultiMap, NodeId, NoneIcon, ProjectId, Queue, RectBox, RelationExpr, RelationId, RichText, StepEdgeKind, Vector, ViewId, _layout, _stage, _type, ancestorsFqn, applyManualLayout, calcDriftsFromSnapshot, ensureSizes, exact, extractStep, flattenMarkdownOrString, getParallelStepsPrefix, hasProp, invariant, isAncestor, isAndOperator, isAutoLayoutDirection, isComputedView, isDeployedInstance, isDeploymentNode, isDeploymentView, isDescendantOf, isDiagramView, isDiagramView as isLayoutedView, isDynamicStep, isDynamicStepsParallel, isDynamicStepsSeries, isDynamicView, isElementView, isExtendsElementView, isGlobalFqn, isGroupElementKind, isIterable, isKindEqual, isNonEmptyArray, isNotOperator, isOnStage, isOrOperator, isParticipantOperator, isSameHierarchy, isScopedElementView, isStepEdgeId, isString, isTagColorSpecified, isTagEqual, isViewRuleAutoLayout, isViewRuleGlobalPredicateRef, isViewRuleGlobalStyle, isViewRuleGroup, isViewRulePredicate, isViewRuleRank, isViewRuleStyle, memoizeProp, nameFromFqn, nonNullable, nonexhaustive, parentFqn, preferDescription, preferSummary, scalar_exports as scalar, sortNaturalByFqn, sortParentsFirst, splitGlobalFqn, stepEdgeId, vector, whereOperatorAsPredicate };
|
|
1
|
+
import"./_chunks/libs/defu.mjs";import{$ as GroupElementKind,A as LikeC4Styles,B as isDeployedInstance,C as isNotOperator,D as whereOperatorAsPredicate,E as isTagEqual,G as Expression,H as ModelExpression,J as FqnRef,K as FqnExpr,O as isTagColorSpecified,Q as GlobalFqn,S as isKindEqual,T as isParticipantOperator,U as ModelFqnExpr,V as isDeploymentNode,W as ModelRelationExpr,X as EdgeId,Y as DeploymentFqn,Z as Fqn,_ as isExtendsElementView,_t as _type,a as isDynamicStep,at as StepEdgeKind,b as isViewRuleStyle,bt as preferSummary,c as isAutoLayoutDirection,ct as flattenMarkdownOrString,d as isViewRuleGlobalStyle,dt as isStepEdgeId,et as MarkdownOrString,f as isComputedView,ft as scalar_exports,g as isElementView,gt as _stage,h as isDynamicView,ht as _layout,i as getParallelStepsPrefix,it as RelationId,k as ensureSizes,l as isViewRuleAutoLayout,lt as isGlobalFqn,m as isDiagramView,mt as stepEdgeId,n as isViewRuleGroup,nt as NoneIcon,o as isDynamicStepsParallel,ot as ViewId,p as isDeploymentView,pt as splitGlobalFqn,q as RelationExpr,r as isViewRuleRank,rt as ProjectId,s as isDynamicStepsSeries,st as extractStep,t as RichText,tt as NodeId,u as isViewRuleGlobalPredicateRef,ut as isGroupElementKind,v as isScopedElementView,vt as isOnStage,w as isOrOperator,x as isAndOperator,xt as exact,y as isViewRulePredicate,yt as preferDescription}from"./_chunks/RichText.mjs";import{i as RectBox,r as BBox}from"./_chunks/vector.mjs";import{$ as nonNullable,A as ancestorsFqn,B as parentFqn,G as isAnyOf,H as sortNaturalByFqn,I as isAncestor,K as isNonEmptyArray,L as isDescendantOf,O as isIterable,Q as invariant,R as isSameHierarchy,U as sortParentsFirst,W as hasProp,et as nonexhaustive,h as memoizeProp,q as isString,z as nameFromFqn}from"./_chunks/to-text.mjs";import"./_chunks/libs/graphology-dag.mjs";import{a as import_multi_map,n as import_default_weak_map,o as import_queue,r as import_linked_list,t as import_default_map}from"./_chunks/libs/mnemonist.mjs";import"./_chunks/libs/natural-compare-lite.mjs";import"./_chunks/libs/extend.mjs";import"./_chunks/libs/@mantine/colors-generator.mjs";import{n as applyManualLayout,t as calcDriftsFromSnapshot}from"./_chunks/calcDriftsFromSnapshot.mjs";import"./styles/index.mjs";var DefaultMap=import_default_map.default,DefaultWeakMap=import_default_weak_map.default,LinkedList=import_linked_list.default,MultiMap=import_multi_map.default,Queue=import_queue.default;export{BBox,DefaultMap,DefaultWeakMap,DeploymentFqn,EdgeId,Expression,Fqn,FqnExpr,FqnRef,GlobalFqn,GroupElementKind,LikeC4Styles,LinkedList,MarkdownOrString,ModelExpression,ModelFqnExpr,ModelRelationExpr,MultiMap,NodeId,NoneIcon,ProjectId,Queue,RectBox,RelationExpr,RelationId,RichText,StepEdgeKind,ViewId,_layout,_stage,_type,ancestorsFqn,applyManualLayout,calcDriftsFromSnapshot,ensureSizes,exact,extractStep,flattenMarkdownOrString,getParallelStepsPrefix,hasProp,invariant,isAncestor,isAndOperator,isAnyOf,isAutoLayoutDirection,isComputedView,isDeployedInstance,isDeploymentNode,isDeploymentView,isDescendantOf,isDiagramView,isDiagramView as isLayoutedView,isDynamicStep,isDynamicStepsParallel,isDynamicStepsSeries,isDynamicView,isElementView,isExtendsElementView,isGlobalFqn,isGroupElementKind,isIterable,isKindEqual,isNonEmptyArray,isNotOperator,isOnStage,isOrOperator,isParticipantOperator,isSameHierarchy,isScopedElementView,isStepEdgeId,isString,isTagColorSpecified,isTagEqual,isViewRuleAutoLayout,isViewRuleGlobalPredicateRef,isViewRuleGlobalStyle,isViewRuleGroup,isViewRulePredicate,isViewRuleRank,isViewRuleStyle,memoizeProp,nameFromFqn,nonNullable,nonexhaustive,parentFqn,preferDescription,preferSummary,scalar_exports as scalar,sortNaturalByFqn,sortParentsFirst,splitGlobalFqn,stepEdgeId,whereOperatorAsPredicate};
|
package/dist/model/index.d.mts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
import "../_chunks/
|
|
2
|
-
import "../_chunks/
|
|
3
|
-
import "../_chunks/expression.mjs";
|
|
4
|
-
import "../_chunks/fqnRef.mjs";
|
|
5
|
-
import "../_chunks/expression-model.mjs";
|
|
6
|
-
import "../_chunks/index2.mjs";
|
|
7
|
-
import "../_chunks/RichText.mjs";
|
|
8
|
-
import "../_chunks/index3.mjs";
|
|
1
|
+
import "../_chunks/guards.mjs";
|
|
2
|
+
import "../_chunks/theme.mjs";
|
|
9
3
|
import { C as ElementModel, S as NodeModel, T as RelationshipModel, _ as WithMetadata, a as DeploymentNodeModel, b as LikeC4ViewsFolder, d as DeploymentOrFqn, f as EdgeOrId, g as OutgoingFilter, h as NodeOrId, i as DeploymentElementModel, l as RelationshipsAccum, m as IncomingFilter, n as LikeC4Model, o as DeploymentRelationEndpoint, p as ElementOrFqn, r as DeployedInstanceModel, s as DeploymentRelationModel, t as AnyLikeC4Model, u as LikeC4DeploymentModel, v as WithTags, w as AnyRelationshipModel, x as EdgeModel, y as LikeC4ViewModel } from "../_chunks/LikeC4Model.mjs";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import { a as ConnectionModel, i as find_d_exports$1 } from "../_chunks/find2.mjs";
|
|
13
|
-
import { a as hasSameSource, c as isAnyInOut, d as isOutgoing, f as mergeConnections, i as findDescendantConnections, l as isIncoming, m as sortDeepestFirst, n as findAscendingConnections, o as hasSameSourceTarget, p as sortConnectionsByBoundaryHierarchy, r as findDeepestNestedConnection, s as hasSameTarget, t as differenceConnections, u as isNestedConnection } from "../_chunks/index4.mjs";
|
|
14
|
-
import { a as isDeployedInstanceModel, c as isDeploymentRelationModel, d as isLikeC4ViewModel, f as isNestedElementOfDeployedInstanceModel, i as normalizeViewPath, l as isEdgeModel, m as isRelationModel, n as extractViewTitleFromPath, o as isDeploymentElementModel, p as isNodeModel, r as getViewFolderPath, s as isDeploymentNodeModel, t as VIEW_FOLDERS_SEPARATOR, u as isElementModel } from "../_chunks/index5.mjs";
|
|
15
|
-
export { AnyLikeC4Model, AnyRelationshipModel, Connection, ConnectionModel, DeployedInstanceModel, DeploymentConnectionModel, DeploymentElementModel, DeploymentNodeModel, DeploymentOrFqn, DeploymentRelationEndpoint, DeploymentRelationModel, EdgeModel, EdgeOrId, ElementModel, ElementOrFqn, IncomingFilter, LikeC4DeploymentModel, LikeC4Model, LikeC4ViewModel, LikeC4ViewsFolder, NodeModel, NodeOrId, OutgoingFilter, RelationshipModel, RelationshipsAccum, VIEW_FOLDERS_SEPARATOR, WithMetadata, WithTags, find_d_exports as deploymentConnection, differenceConnections, extractViewTitleFromPath, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, getViewFolderPath, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isDeployedInstanceModel, isDeploymentElementModel, isDeploymentNodeModel, isDeploymentRelationModel, isEdgeModel, isElementModel, isIncoming, isLikeC4ViewModel, isRelationModel as isModelRelation, isRelationModel, isRelationModel as isRelationshipModel, isNestedConnection, isNestedElementOfDeployedInstanceModel, isNodeModel, isOutgoing, mergeConnections, find_d_exports$1 as modelConnection, normalizeViewPath, sortConnectionsByBoundaryHierarchy, sortDeepestFirst };
|
|
4
|
+
import { A as sortDeepestFirst, C as hasSameTarget, D as isOutgoing, E as isNestedConnection, M as DeploymentConnectionModel, N as Connection, O as mergeConnections, S as hasSameSourceTarget, T as isIncoming, _ as differenceConnections, a as isDeployedInstanceModel, b as findDescendantConnections, c as isDeploymentRelationModel, d as isLikeC4ViewModel, f as isNestedElementOfDeployedInstanceModel, g as find_d_exports, h as find_d_exports$1, i as normalizeViewPath, j as ConnectionModel, k as sortConnectionsByBoundaryHierarchy, l as isEdgeModel, m as isRelationModel, n as extractViewTitleFromPath, o as isDeploymentElementModel, p as isNodeModel, r as getViewFolderPath, s as isDeploymentNodeModel, t as VIEW_FOLDERS_SEPARATOR, u as isElementModel, v as findAscendingConnections, w as isAnyInOut, x as hasSameSource, y as findDeepestNestedConnection } from "../_chunks/index.mjs";
|
|
5
|
+
export { type AnyLikeC4Model, type AnyRelationshipModel, Connection, ConnectionModel, DeployedInstanceModel, DeploymentConnectionModel, type DeploymentElementModel, DeploymentNodeModel, type DeploymentOrFqn, type DeploymentRelationEndpoint, DeploymentRelationModel, EdgeModel, type EdgeOrId, ElementModel, type ElementOrFqn, type IncomingFilter, LikeC4DeploymentModel, LikeC4Model, LikeC4ViewModel, LikeC4ViewsFolder, NodeModel, type NodeOrId, type OutgoingFilter, RelationshipModel, RelationshipsAccum, VIEW_FOLDERS_SEPARATOR, type WithMetadata, type WithTags, find_d_exports as deploymentConnection, differenceConnections, extractViewTitleFromPath, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, getViewFolderPath, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isDeployedInstanceModel, isDeploymentElementModel, isDeploymentNodeModel, isDeploymentRelationModel, isEdgeModel, isElementModel, isIncoming, isLikeC4ViewModel, isRelationModel as isModelRelation, isRelationModel, isRelationModel as isRelationshipModel, isNestedConnection, isNestedElementOfDeployedInstanceModel, isNodeModel, isOutgoing, mergeConnections, find_d_exports$1 as modelConnection, normalizeViewPath, sortConnectionsByBoundaryHierarchy, sortDeepestFirst };
|
package/dist/model/index.mjs
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "../_chunks/libs/@mantine/colors-generator.mjs";
|
|
3
|
-
import "../_chunks/libs/graphology-dag.mjs";
|
|
4
|
-
import "../_chunks/libs/defu.mjs";
|
|
5
|
-
import "../_chunks/libs/extend.mjs";
|
|
6
|
-
import { S as ElementModel, _ as LikeC4DeploymentModel, a as isEdgeModel, b as getViewFolderPath, c as isNestedElementOfDeployedInstanceModel, d as LikeC4Model, f as LikeC4ViewsFolder, g as RelationshipModel, h as EdgeModel, i as isDeploymentRelationModel, l as isNodeModel, m as NodeModel, n as isDeploymentElementModel, o as isElementModel, p as LikeC4ViewModel, r as isDeploymentNodeModel, s as isLikeC4ViewModel, t as isDeployedInstanceModel, u as isRelationModel, v as VIEW_FOLDERS_SEPARATOR, x as normalizeViewPath, y as extractViewTitleFromPath } from "../_chunks/model.mjs";
|
|
7
|
-
import { a as DeploymentConnectionModel, c as DeploymentRelationModel, i as find_exports, o as DeployedInstanceModel, s as DeploymentNodeModel, u as RelationshipsAccum } from "../_chunks/find.mjs";
|
|
8
|
-
import { n as Connection } from "../_chunks/const.mjs";
|
|
9
|
-
import { _ as mergeConnections, a as ConnectionModel, c as findDeepestNestedConnection, d as hasSameSourceTarget, f as hasSameTarget, g as isOutgoing, h as isNestedConnection, i as find_exports$1, l as findDescendantConnections, m as isIncoming, o as differenceConnections, p as isAnyInOut, s as findAscendingConnections, u as hasSameSource, v as sortConnectionsByBoundaryHierarchy, y as sortDeepestFirst } from "../_chunks/find2.mjs";
|
|
10
|
-
|
|
11
|
-
export { Connection, ConnectionModel, DeployedInstanceModel, DeploymentConnectionModel, DeploymentNodeModel, DeploymentRelationModel, EdgeModel, ElementModel, LikeC4DeploymentModel, LikeC4Model, LikeC4ViewModel, LikeC4ViewsFolder, NodeModel, RelationshipModel, RelationshipsAccum, VIEW_FOLDERS_SEPARATOR, find_exports as deploymentConnection, differenceConnections, extractViewTitleFromPath, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, getViewFolderPath, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isDeployedInstanceModel, isDeploymentElementModel, isDeploymentNodeModel, isDeploymentRelationModel, isEdgeModel, isElementModel, isIncoming, isLikeC4ViewModel, isRelationModel as isModelRelation, isRelationModel, isRelationModel as isRelationshipModel, isNestedConnection, isNestedElementOfDeployedInstanceModel, isNodeModel, isOutgoing, mergeConnections, find_exports$1 as modelConnection, normalizeViewPath, sortConnectionsByBoundaryHierarchy, sortDeepestFirst };
|
|
1
|
+
import"../_chunks/libs/defu.mjs";import"../_chunks/libs/graphology-dag.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/extend.mjs";import"../_chunks/libs/@mantine/colors-generator.mjs";import{A as DeploymentConnectionModel,B as VIEW_FOLDERS_SEPARATOR,C as isAnyInOut,D as mergeConnections,E as isOutgoing,F as LikeC4ViewModel,G as DeploymentNodeModel,H as getViewFolderPath,I as NodeModel,J as ElementModel,K as DeploymentRelationModel,L as EdgeModel,M as Connection,N as LikeC4Model,O as sortConnectionsByBoundaryHierarchy,P as LikeC4ViewsFolder,R as RelationshipModel,S as hasSameTarget,T as isNestedConnection,U as normalizeViewPath,V as extractViewTitleFromPath,W as DeployedInstanceModel,_ as findAscendingConnections,a as isEdgeModel,b as hasSameSource,c as isNestedElementOfDeployedInstanceModel,g as differenceConnections,h as ConnectionModel,i as isDeploymentRelationModel,k as sortDeepestFirst,l as isNodeModel,m as find_exports,n as isDeploymentElementModel,o as isElementModel,p as find_exports$1,q as RelationshipsAccum,r as isDeploymentNodeModel,s as isLikeC4ViewModel,t as isDeployedInstanceModel,u as isRelationModel,v as findDeepestNestedConnection,w as isIncoming,x as hasSameSourceTarget,y as findDescendantConnections,z as LikeC4DeploymentModel}from"../_chunks/guards.mjs";export{Connection,ConnectionModel,DeployedInstanceModel,DeploymentConnectionModel,DeploymentNodeModel,DeploymentRelationModel,EdgeModel,ElementModel,LikeC4DeploymentModel,LikeC4Model,LikeC4ViewModel,LikeC4ViewsFolder,NodeModel,RelationshipModel,RelationshipsAccum,VIEW_FOLDERS_SEPARATOR,find_exports as deploymentConnection,differenceConnections,extractViewTitleFromPath,findAscendingConnections,findDeepestNestedConnection,findDescendantConnections,getViewFolderPath,hasSameSource,hasSameSourceTarget,hasSameTarget,isAnyInOut,isDeployedInstanceModel,isDeploymentElementModel,isDeploymentNodeModel,isDeploymentRelationModel,isEdgeModel,isElementModel,isIncoming,isLikeC4ViewModel,isRelationModel as isModelRelation,isRelationModel,isRelationModel as isRelationshipModel,isNestedConnection,isNestedElementOfDeployedInstanceModel,isNodeModel,isOutgoing,mergeConnections,find_exports$1 as modelConnection,normalizeViewPath,sortConnectionsByBoundaryHierarchy,sortDeepestFirst};
|
package/dist/styles/index.d.mts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import "../_chunks/
|
|
2
|
-
import "../_chunks/
|
|
3
|
-
import { $ as ThemeColors, A as HexColor, B as ShapeSize, C as BorderStyle, D as CustomColorDefinitions, E as CustomColor, F as LikeC4Theme, G as ThemeColorValues, H as SpacingSize, I as RelationshipArrowType, J as BorderStyles, K as isCustomColor, L as RelationshipArrowTypes, M as IconSize, N as LikeC4StyleDefaults, O as ElementColorValues, P as LikeC4StylesConfig, Q as Sizes, R as RelationshipColorValues, T as ColorLiteral, U as TextSize, V as Size, W as ThemeColor, X as ElementShapes, Y as DefaultTagColors, Z as IconPositions, j as IconPosition, k as ElementShape, q as isThemeColor, w as Color, z as RelationshipLineType } from "../_chunks/expression.mjs";
|
|
4
|
-
import "../_chunks/fqnRef.mjs";
|
|
5
|
-
import "../_chunks/expression-model.mjs";
|
|
6
|
-
import "../_chunks/index2.mjs";
|
|
7
|
-
import "../_chunks/RichText.mjs";
|
|
8
|
-
import { a as LikeC4Styles, i as assignTagColors, n as styleDefaults, r as computeColorValues, t as defaultTheme } from "../_chunks/index3.mjs";
|
|
1
|
+
import { Ar as ThemeColors, Cr as isCustomColor, Dr as ElementShapes, Er as DefaultTagColors, Or as IconPositions, Sr as ThemeColorValues, Tr as BorderStyles, _r as ShapeSize, ar as ElementColorValues, br as TextSize, cr as IconPosition, dr as LikeC4StylesConfig, er as BorderStyle, fr as LikeC4Theme, gr as RelationshipLineType, hr as RelationshipColorValues, ir as CustomColorDefinitions, kr as Sizes, lr as IconSize, mr as RelationshipArrowTypes, nr as ColorLiteral, or as ElementShape, pr as RelationshipArrowType, rr as CustomColor, sr as HexColor, tr as Color, ur as LikeC4StyleDefaults, vr as Size, wr as isThemeColor, xr as ThemeColor, yr as SpacingSize } from "../_chunks/guards.mjs";
|
|
2
|
+
import { a as assignTagColors, i as LikeC4Styles, n as styleDefaults, r as computeColorValues, t as defaultTheme } from "../_chunks/theme.mjs";
|
|
9
3
|
export { BorderStyle, BorderStyles, Color, ColorLiteral, CustomColor, CustomColorDefinitions, DefaultTagColors, ElementColorValues, ElementShape, ElementShapes, HexColor, IconPosition, IconPositions, IconSize, LikeC4StyleDefaults, LikeC4Styles, LikeC4StylesConfig, LikeC4Theme, RelationshipArrowType, RelationshipArrowTypes, RelationshipColorValues, RelationshipLineType, ShapeSize, Size, Sizes, SpacingSize, TextSize, ThemeColor, ThemeColorValues, ThemeColors, assignTagColors, computeColorValues, defaultTheme, isCustomColor, isThemeColor, styleDefaults };
|
package/dist/styles/index.mjs
CHANGED
|
@@ -1,30 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "../_chunks/libs/natural-compare-lite.mjs";
|
|
3
|
-
import { t as assignTagColors } from "../_chunks/assignTagColors.mjs";
|
|
4
|
-
import "../_chunks/libs/@mantine/colors-generator.mjs";
|
|
5
|
-
import "../_chunks/libs/graphology-dag.mjs";
|
|
6
|
-
import "../_chunks/libs/defu.mjs";
|
|
7
|
-
import "../_chunks/libs/extend.mjs";
|
|
8
|
-
|
|
9
|
-
//#region src/styles/types.ts
|
|
10
|
-
const RelationshipArrowTypes = [
|
|
11
|
-
"none",
|
|
12
|
-
"normal",
|
|
13
|
-
"onormal",
|
|
14
|
-
"dot",
|
|
15
|
-
"odot",
|
|
16
|
-
"diamond",
|
|
17
|
-
"odiamond",
|
|
18
|
-
"crow",
|
|
19
|
-
"open",
|
|
20
|
-
"vee"
|
|
21
|
-
];
|
|
22
|
-
function isThemeColor(color) {
|
|
23
|
-
return ThemeColors.includes(color);
|
|
24
|
-
}
|
|
25
|
-
function isCustomColor(color) {
|
|
26
|
-
return !isThemeColor(color);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { BorderStyles, DefaultTagColors, ElementShapes, IconPositions, LikeC4Styles, RelationshipArrowTypes, Sizes, ThemeColors, assignTagColors, computeColorValues, defaultTheme, isCustomColor, isThemeColor, styleDefaults };
|
|
1
|
+
import"../_chunks/libs/defu.mjs";import{A as LikeC4Styles,F as DefaultTagColors,I as ElementShapes,L as IconPositions,M as styleDefaults,N as computeColorValues,P as BorderStyles,R as Sizes,j as defaultTheme,z as ThemeColors}from"../_chunks/RichText.mjs";import"../_chunks/libs/graphology-dag.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/extend.mjs";import"../_chunks/libs/@mantine/colors-generator.mjs";import{t as assignTagColors}from"../_chunks/assignTagColors.mjs";const RelationshipArrowTypes=[`none`,`normal`,`onormal`,`dot`,`odot`,`diamond`,`odiamond`,`crow`,`open`,`vee`];function isThemeColor(e){return ThemeColors.includes(e)}function isCustomColor(e){return!isThemeColor(e)}export{BorderStyles,DefaultTagColors,ElementShapes,IconPositions,LikeC4Styles,RelationshipArrowTypes,Sizes,ThemeColors,assignTagColors,computeColorValues,defaultTheme,isCustomColor,isThemeColor,styleDefaults};
|