@likec4/core 1.47.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/LICENSE +1 -1
- package/dist/THIRD-PARTY-LICENSES.md +1012 -0
- package/dist/_chunks/Builder.view-element.mjs +2 -0
- package/dist/_chunks/LikeC4Model.d.mts +1283 -0
- package/dist/_chunks/RichText.mjs +1 -0
- package/dist/_chunks/_types.d.mts +777 -0
- package/dist/_chunks/_types2.d.mts +36 -0
- package/dist/_chunks/assignTagColors.mjs +1 -0
- package/dist/_chunks/calcDriftsFromSnapshot.mjs +1 -0
- package/dist/_chunks/guards.d.mts +2026 -0
- package/dist/_chunks/guards.mjs +4 -0
- package/dist/_chunks/index.d.mts +288 -0
- package/dist/_chunks/libs/@mantine/colors-generator.mjs +15 -0
- package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -0
- package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -0
- package/dist/_chunks/libs/bail.mjs +1 -0
- package/dist/_chunks/libs/ccount.mjs +1 -0
- package/dist/_chunks/libs/character-entities-html4.mjs +1 -0
- package/dist/_chunks/libs/character-entities-legacy.mjs +1 -0
- package/dist/_chunks/libs/character-entities.mjs +2 -0
- package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -0
- package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -0
- package/dist/_chunks/libs/defu.mjs +1 -0
- package/dist/_chunks/libs/devlop.mjs +1 -0
- package/dist/_chunks/libs/escape-string-regexp.mjs +1 -0
- package/dist/_chunks/libs/extend.mjs +1 -0
- package/dist/_chunks/libs/graphology-dag.mjs +1 -0
- package/dist/_chunks/libs/graphology.mjs +1 -0
- package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -0
- package/dist/_chunks/libs/hast-util-to-html.mjs +9 -0
- package/dist/_chunks/libs/is-plain-obj.mjs +1 -0
- package/dist/_chunks/libs/longest-streak.mjs +1 -0
- package/dist/_chunks/libs/markdown-table.mjs +2 -0
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -0
- package/dist/_chunks/libs/mdast-util-from-markdown.mjs +3 -0
- package/dist/_chunks/libs/mdast-util-gfm.mjs +15 -0
- package/dist/_chunks/libs/mdast-util-to-hast.mjs +11 -0
- package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -0
- package/dist/_chunks/libs/mnemonist.d.mts +164 -0
- package/dist/_chunks/libs/mnemonist.mjs +1 -0
- package/dist/_chunks/libs/natural-compare-lite.mjs +9 -0
- package/dist/_chunks/libs/ohash.mjs +1 -0
- package/dist/_chunks/libs/rehype-sanitize.mjs +1 -0
- package/dist/_chunks/libs/rehype-stringify.mjs +1 -0
- package/dist/_chunks/libs/remark-gfm.mjs +1 -0
- package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +3 -0
- package/dist/_chunks/libs/remark-parse.mjs +1 -0
- package/dist/_chunks/libs/remark-rehype.mjs +1 -0
- package/dist/_chunks/libs/remeda.mjs +1 -0
- package/dist/_chunks/libs/trough.mjs +1 -0
- package/dist/_chunks/libs/unified.mjs +1 -0
- package/dist/_chunks/rolldown-runtime.mjs +1 -0
- package/dist/_chunks/theme.d.mts +148 -0
- package/dist/_chunks/to-text.d.mts +404 -0
- 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 +5 -775
- package/dist/builder/index.mjs +1 -1053
- package/dist/compute-view/index.d.mts +156 -56
- package/dist/compute-view/index.mjs +2 -229
- package/dist/geometry/index.d.mts +2 -109
- package/dist/geometry/index.mjs +1 -328
- package/dist/index.d.mts +14 -20
- package/dist/index.mjs +1 -18
- package/dist/model/index.d.mts +5 -57
- package/dist/model/index.mjs +1 -4
- package/dist/styles/index.d.mts +3 -117
- package/dist/styles/index.mjs +1 -63
- package/dist/types/index.d.mts +3 -47
- package/dist/types/index.mjs +1 -17
- package/dist/utils/graphology/index.d.mts +2 -1864
- package/dist/utils/graphology/index.mjs +1 -1
- package/dist/utils/index.d.mts +4 -124
- package/dist/utils/index.mjs +1 -44
- package/package.json +20 -24
- package/compute-view/relationships/package.json +0 -4
- package/dist/compute-view/relationships-view/index.d.mts +0 -51
- package/dist/compute-view/relationships-view/index.mjs +0 -185
- package/dist/model/connection/deployment/index.d.mts +0 -15
- package/dist/model/connection/deployment/index.mjs +0 -2
- package/dist/model/connection/index.d.mts +0 -75
- package/dist/model/connection/index.mjs +0 -3
- package/dist/model/connection/model/index.d.mts +0 -15
- package/dist/model/connection/model/index.mjs +0 -2
- package/dist/shared/core.3ZhnKAlZ.mjs +0 -106
- package/dist/shared/core.78IWAHAE.mjs +0 -332
- package/dist/shared/core.B85MJLTf.mjs +0 -5
- package/dist/shared/core.BFd1lU9R.mjs +0 -29
- package/dist/shared/core.BKlholso.mjs +0 -3
- package/dist/shared/core.BNN-3vPH.mjs +0 -1255
- package/dist/shared/core.BPGOjone.d.mts +0 -46
- package/dist/shared/core.BP_QHEXs.mjs +0 -785
- package/dist/shared/core.BbE4y-yl.mjs +0 -177
- package/dist/shared/core.Bdy3hhTc.mjs +0 -28382
- package/dist/shared/core.BfCKSW-g.d.mts +0 -1266
- package/dist/shared/core.BhNcrwzK.mjs +0 -7
- package/dist/shared/core.BkVA6gjl.mjs +0 -5
- package/dist/shared/core.BoYfZOBm.mjs +0 -3
- package/dist/shared/core.BsSXS-_R.mjs +0 -7
- package/dist/shared/core.C3JowhaZ.mjs +0 -32
- package/dist/shared/core.C4x8aaWa.mjs +0 -27
- package/dist/shared/core.CAgYpDtM.d.mts +0 -98
- package/dist/shared/core.CHf8VEa3.mjs +0 -1206
- package/dist/shared/core.CLSZtnFh.mjs +0 -69
- package/dist/shared/core.C_3y3eqV.d.mts +0 -139
- package/dist/shared/core.CbT8JVYL.mjs +0 -5
- package/dist/shared/core.CdNCAwq7.mjs +0 -176
- package/dist/shared/core.CmGY9blO.mjs +0 -6717
- package/dist/shared/core.CmPXpJ8l.mjs +0 -21
- package/dist/shared/core.Coi_LOUZ.mjs +0 -7
- package/dist/shared/core.CqAJJpK_.mjs +0 -3
- package/dist/shared/core.CywrQs86.d.mts +0 -31
- package/dist/shared/core.D00YbOhQ.d.mts +0 -300
- package/dist/shared/core.D0WZutNd.mjs +0 -94
- package/dist/shared/core.D4npX2q8.mjs +0 -18
- package/dist/shared/core.DB0Ue5Wx.d.mts +0 -70
- package/dist/shared/core.DC5IAaDT.d.mts +0 -334
- package/dist/shared/core.DE9qzhn8.d.mts +0 -83
- package/dist/shared/core.DGcIbsj4.mjs +0 -3946
- package/dist/shared/core.DH7TXqXf.mjs +0 -136
- package/dist/shared/core.DKhRkHRN.d.mts +0 -41
- package/dist/shared/core.DRJma0Ol.mjs +0 -22
- package/dist/shared/core.DU5SRqNF.mjs +0 -2209
- package/dist/shared/core.DXhDWKFZ.d.mts +0 -3
- package/dist/shared/core.DbfO90vF.mjs +0 -434
- package/dist/shared/core.DcS-0zys.mjs +0 -10
- package/dist/shared/core.Dh119QSP.mjs +0 -4995
- package/dist/shared/core.DjcWextK.mjs +0 -1371
- package/dist/shared/core.Dojz4bvg.d.mts +0 -504
- package/dist/shared/core.FZ305VYd.mjs +0 -21
- package/dist/shared/core.OtRNdMxy.d.mts +0 -352
- package/dist/shared/core.RfnaEmgA.mjs +0 -7
- package/dist/shared/core.btEq3i3f.mjs +0 -300
- package/dist/shared/core.oSV6SRfk.mjs +0 -13
- package/dist/shared/core.om36dXXW.mjs +0 -41
- package/dist/shared/core.osFs8tU7.d.mts +0 -466
- package/dist/shared/core.q10OP9oJ.mjs +0 -5
- package/dist/shared/core.tpvDGvdC.d.mts +0 -87
- package/dist/shared/core.uFk_o9X6.mjs +0 -13
- package/dist/types/_aux.d.mts +0 -4
- package/dist/types/_aux.mjs +0 -8
- package/dist/types/expression-model.d.mts +0 -190
- package/dist/types/expression-model.mjs +0 -109
- package/dist/types/expression.d.mts +0 -6
- package/dist/types/expression.mjs +0 -113
- package/dist/types/fqnRef.d.mts +0 -60
- package/dist/types/fqnRef.mjs +0 -45
- package/dist/types/scalar.d.mts +0 -2
- package/dist/types/scalar.mjs +0 -4
- package/dist/utils/iterable/index.d.mts +0 -132
- package/dist/utils/iterable/index.mjs +0 -62
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { e as e$1 } from './core.BKlholso.mjs';
|
|
2
|
-
import { t as t$2 } from './core.BsSXS-_R.mjs';
|
|
3
|
-
import { e as e$2 } from './core.BoYfZOBm.mjs';
|
|
4
|
-
import { e as e$3 } from './core.CqAJJpK_.mjs';
|
|
5
|
-
import { n as nonexhaustive } from './core.D4npX2q8.mjs';
|
|
6
|
-
|
|
7
|
-
function t$1(...t){return t$2(n$1,t)}const n$1=(e,t)=>t.every(t=>t(e));
|
|
8
|
-
|
|
9
|
-
function t(...t){return t$2(n,t)}const n=(e,t)=>t.some(t=>t(e));
|
|
10
|
-
|
|
11
|
-
function e(e){return e==null}
|
|
12
|
-
|
|
13
|
-
function isOnStage(value, stage) {
|
|
14
|
-
return value[_stage] === stage;
|
|
15
|
-
}
|
|
16
|
-
const _stage = "_stage";
|
|
17
|
-
const _type = "_type";
|
|
18
|
-
const _layout = "_layout";
|
|
19
|
-
|
|
20
|
-
function isDeploymentNode(el) {
|
|
21
|
-
return e$1(el.kind) && !e$1(el.element);
|
|
22
|
-
}
|
|
23
|
-
function isDeployedInstance(el) {
|
|
24
|
-
return e$1(el.element) && !e$1(el.kind);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function isTagEqual(operator) {
|
|
28
|
-
return "tag" in operator;
|
|
29
|
-
}
|
|
30
|
-
function isKindEqual(operator) {
|
|
31
|
-
return "kind" in operator;
|
|
32
|
-
}
|
|
33
|
-
function isParticipantOperator(operator) {
|
|
34
|
-
return "participant" in operator;
|
|
35
|
-
}
|
|
36
|
-
function isNotOperator(operator) {
|
|
37
|
-
return "not" in operator;
|
|
38
|
-
}
|
|
39
|
-
function isAndOperator(operator) {
|
|
40
|
-
return "and" in operator;
|
|
41
|
-
}
|
|
42
|
-
function isOrOperator(operator) {
|
|
43
|
-
return "or" in operator;
|
|
44
|
-
}
|
|
45
|
-
function whereOperatorAsPredicate(operator) {
|
|
46
|
-
switch (true) {
|
|
47
|
-
case isParticipantOperator(operator): {
|
|
48
|
-
const participant = operator.participant;
|
|
49
|
-
const participantPredicate = whereOperatorAsPredicate(operator.operator);
|
|
50
|
-
return participantIs(participant, participantPredicate);
|
|
51
|
-
}
|
|
52
|
-
case isTagEqual(operator): {
|
|
53
|
-
if (e$3(operator.tag) || "eq" in operator.tag) {
|
|
54
|
-
const tag2 = e$3(operator.tag) ? operator.tag : operator.tag.eq;
|
|
55
|
-
return (value) => {
|
|
56
|
-
return Array.isArray(value.tags) && value.tags.includes(tag2);
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const tag = operator.tag.neq;
|
|
60
|
-
return (value) => {
|
|
61
|
-
return !Array.isArray(value.tags) || !value.tags.includes(tag);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
case isKindEqual(operator): {
|
|
65
|
-
if (e$3(operator.kind) || "eq" in operator.kind) {
|
|
66
|
-
const kind2 = e$3(operator.kind) ? operator.kind : operator.kind.eq;
|
|
67
|
-
return (value) => {
|
|
68
|
-
return value.kind === kind2;
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
const kind = operator.kind.neq;
|
|
72
|
-
return (value) => {
|
|
73
|
-
return e(value.kind) || value.kind !== kind;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
case isNotOperator(operator): {
|
|
77
|
-
const predicate = whereOperatorAsPredicate(operator.not);
|
|
78
|
-
return e$2(predicate);
|
|
79
|
-
}
|
|
80
|
-
case isAndOperator(operator): {
|
|
81
|
-
const predicates = operator.and.map(whereOperatorAsPredicate);
|
|
82
|
-
return t$1(predicates);
|
|
83
|
-
}
|
|
84
|
-
case isOrOperator(operator): {
|
|
85
|
-
const predicates = operator.or.map(whereOperatorAsPredicate);
|
|
86
|
-
return t(predicates);
|
|
87
|
-
}
|
|
88
|
-
default:
|
|
89
|
-
nonexhaustive(operator);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function participantIs(participant, predicate) {
|
|
93
|
-
return (value) => {
|
|
94
|
-
if (!value.source || !value.target) {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
switch (participant) {
|
|
98
|
-
case "source": {
|
|
99
|
-
return predicate(value.source);
|
|
100
|
-
}
|
|
101
|
-
case "target": {
|
|
102
|
-
return predicate(value.target);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function isViewRulePredicate(rule) {
|
|
109
|
-
return "include" in rule || "exclude" in rule;
|
|
110
|
-
}
|
|
111
|
-
function isViewRuleStyle(rule) {
|
|
112
|
-
return "targets" in rule && "style" in rule;
|
|
113
|
-
}
|
|
114
|
-
function isComputedView(view) {
|
|
115
|
-
return view._stage === "computed";
|
|
116
|
-
}
|
|
117
|
-
function isDiagramView(view) {
|
|
118
|
-
return view._stage === "layouted";
|
|
119
|
-
}
|
|
120
|
-
function isElementView(view) {
|
|
121
|
-
return view._type === "element";
|
|
122
|
-
}
|
|
123
|
-
function isScopedElementView(view) {
|
|
124
|
-
return isElementView(view) && e$1(view.viewOf);
|
|
125
|
-
}
|
|
126
|
-
function isExtendsElementView(view) {
|
|
127
|
-
return isElementView(view) && e$1(view.extends);
|
|
128
|
-
}
|
|
129
|
-
function isDeploymentView(view) {
|
|
130
|
-
return view._type === "deployment";
|
|
131
|
-
}
|
|
132
|
-
function isDynamicView(view) {
|
|
133
|
-
return view._type === "dynamic";
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export { _stage as _, _type as a, _layout as b, isDeploymentNode as c, isDeployedInstance as d, isTagEqual as e, isKindEqual as f, isParticipantOperator as g, isNotOperator as h, isOnStage as i, isAndOperator as j, isOrOperator as k, isViewRulePredicate as l, isViewRuleStyle as m, isComputedView as n, isDiagramView as o, isElementView as p, isScopedElementView as q, isExtendsElementView as r, isDeploymentView as s, isDynamicView as t, e as u, t as v, whereOperatorAsPredicate as w };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { E as ElementModel, e as DeploymentElementModel } from './core.BfCKSW-g.mjs';
|
|
2
|
-
import { A as Any } from './core.D00YbOhQ.mjs';
|
|
3
|
-
import { F as Fqn } from './core.C_3y3eqV.mjs';
|
|
4
|
-
|
|
5
|
-
interface Connection<Elem = ElementModel<Any> | DeploymentElementModel<Any>, Id = string> {
|
|
6
|
-
readonly id: Id;
|
|
7
|
-
readonly source: Elem;
|
|
8
|
-
readonly target: Elem;
|
|
9
|
-
/**
|
|
10
|
-
* Common ancestor of the source and target elements.
|
|
11
|
-
* Represents the boundary of the connection.
|
|
12
|
-
*/
|
|
13
|
-
readonly boundary: Elem | null;
|
|
14
|
-
/**
|
|
15
|
-
* Human readable expression of the connection
|
|
16
|
-
* Mostly used for testing and debugging
|
|
17
|
-
*/
|
|
18
|
-
readonly expression: string;
|
|
19
|
-
mergeWith(this: Connection<Elem, Id>, other: typeof this): typeof this;
|
|
20
|
-
nonEmpty(): boolean;
|
|
21
|
-
difference(this: Connection<Elem, Id>, other: typeof this): typeof this;
|
|
22
|
-
intersect(this: Connection<Elem, Id>, other: typeof this): typeof this;
|
|
23
|
-
equals(other: Connection): boolean;
|
|
24
|
-
}
|
|
25
|
-
declare namespace Connection {
|
|
26
|
-
type ConnectionPredicate = <C extends Connection<{
|
|
27
|
-
id: string;
|
|
28
|
-
}, any>>(connection: C) => boolean;
|
|
29
|
-
type ElementId = Fqn | string;
|
|
30
|
-
export const isInside: (fqn: ElementId) => ConnectionPredicate;
|
|
31
|
-
export const isDirectedBetween: (source: ElementId, target: ElementId) => ConnectionPredicate;
|
|
32
|
-
export const isAnyBetween: (source: ElementId, target: ElementId) => ConnectionPredicate;
|
|
33
|
-
export const isIncoming: (target: ElementId) => ConnectionPredicate;
|
|
34
|
-
export const isOutgoing: (source: ElementId) => ConnectionPredicate;
|
|
35
|
-
export const isAnyInOut: (source: ElementId) => ConnectionPredicate;
|
|
36
|
-
export { };
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare const customInspectSymbol: unique symbol;
|
|
40
|
-
|
|
41
|
-
export { Connection as C, customInspectSymbol as c };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { i as invariant } from './core.D4npX2q8.mjs';
|
|
2
|
-
|
|
3
|
-
const e=e=>typeof e==`function`;
|
|
4
|
-
|
|
5
|
-
function ifilter(arg1, arg2) {
|
|
6
|
-
const pred = arg2 ?? arg1;
|
|
7
|
-
invariant(e(pred));
|
|
8
|
-
function* _filter(iter) {
|
|
9
|
-
for (const value of iter) {
|
|
10
|
-
if (pred(value)) {
|
|
11
|
-
yield value;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
if (!arg2) {
|
|
17
|
-
return _filter;
|
|
18
|
-
}
|
|
19
|
-
return _filter(arg1);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { e, ifilter as i };
|