@likec4/core 1.45.0 → 1.46.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder/index.d.mts +8 -7
- package/dist/builder/index.mjs +8 -7
- package/dist/compute-view/index.d.mts +8 -7
- package/dist/compute-view/index.mjs +5 -5
- package/dist/compute-view/relationships-view/index.d.mts +8 -7
- package/dist/geometry/index.d.mts +109 -0
- package/dist/geometry/index.mjs +328 -0
- package/dist/index.d.mts +10 -8
- package/dist/index.mjs +9 -8
- package/dist/model/connection/deployment/index.d.mts +10 -9
- package/dist/model/connection/deployment/index.mjs +2 -2
- package/dist/model/connection/index.d.mts +11 -10
- package/dist/model/connection/index.mjs +3 -3
- package/dist/model/connection/model/index.d.mts +10 -9
- package/dist/model/connection/model/index.mjs +2 -2
- package/dist/model/index.d.mts +12 -11
- package/dist/model/index.mjs +4 -4
- package/dist/shared/{core.DnCLhN8C.d.mts → core.5gPDaaG5.d.mts} +5 -4
- package/dist/shared/{core.CQPEY2wQ.mjs → core.78IWAHAE.mjs} +1 -1
- package/dist/shared/{core.0zAQeenX.d.mts → core.9U0HL3oG.d.mts} +2 -2
- package/dist/shared/{core.DqlrMlsf.mjs → core.BFd1lU9R.mjs} +1 -1
- package/dist/shared/core.BPGOjone.d.mts +46 -0
- package/dist/shared/{core.DIE3F6sw.mjs → core.BYdtmqY5.mjs} +1 -2
- package/dist/shared/{core.B73yxfPi.d.mts → core.BkSYCfRg.d.mts} +1 -1
- package/dist/shared/{core.5ZQ-r3Oa.d.mts → core.BqtAzeAh.d.mts} +1 -1
- package/dist/shared/{core.DEieYfbG.mjs → core.BspBF3SJ.mjs} +22 -70
- package/dist/shared/{core.CR3PmPzr.mjs → core.CBLX4mT8.mjs} +3811 -15032
- package/dist/shared/{core.DX-WYEPA.d.mts → core.CDdf8izT.d.mts} +4 -2
- package/dist/shared/core.CLSZtnFh.mjs +69 -0
- package/dist/shared/{core.D_f4F48-.mjs → core.CRhT4Iio.mjs} +10 -7
- package/dist/shared/{core.DrUt0Lbi.mjs → core.CmGY9blO.mjs} +198 -291
- package/dist/shared/{core.C_Ni6yHl.mjs → core.D0WZutNd.mjs} +3 -1
- package/dist/shared/{core.mUnpvHtA.d.mts → core.DE-g9oFF.d.mts} +19 -49
- package/dist/shared/{core.M9ayqQZa.mjs → core.DEK-BO3_.mjs} +4 -5
- package/dist/shared/{core.CpURdWRM.d.mts → core.DK3pdsTf.d.mts} +8 -6
- package/dist/shared/{core.vzLtp8i3.mjs → core.DSalPD6v.mjs} +259 -189
- package/dist/shared/{core.CRI1AjFj.mjs → core.DVfPJPJj.mjs} +33 -30
- package/dist/shared/{core.Cog93roC.d.mts → core.DezoCAzf.d.mts} +3 -3
- package/dist/shared/{core.BGFjN3nv.d.mts → core.I8sCl3WM.d.mts} +3 -3
- package/dist/shared/{core.t3qfsVvn.d.mts → core.e5GJ61_a.d.mts} +3 -3
- package/dist/shared/{core.BuQZczj6.mjs → core.om36dXXW.mjs} +5 -2
- package/dist/shared/{core.Dvh1H0T2.d.mts → core.or6-EHsb.d.mts} +2 -2
- package/dist/shared/{core.DViDmiAu.mjs → core.xeuDd__E.mjs} +1 -2
- package/dist/shared/{core.CWwSgOzF.mjs → core.xgoPk2RG.mjs} +165 -135
- package/dist/styles/index.d.mts +7 -6
- package/dist/styles/index.mjs +1 -1
- package/dist/types/_aux.d.mts +2 -2
- package/dist/types/expression-model.d.mts +3 -3
- package/dist/types/expression.d.mts +3 -3
- package/dist/types/fqnRef.d.mts +2 -2
- package/dist/types/fqnRef.mjs +1 -1
- package/dist/types/index.d.mts +11 -9
- package/dist/types/index.mjs +6 -180
- package/dist/types/scalar.d.mts +1 -1
- package/dist/types/scalar.mjs +1 -1
- package/dist/utils/graphology/index.mjs +1 -1
- package/dist/utils/index.d.mts +3 -3
- package/dist/utils/index.mjs +5 -5
- package/dist/utils/iterable/index.d.mts +17 -1
- package/dist/utils/iterable/index.mjs +17 -1
- package/geometry/package.json +4 -0
- package/package.json +20 -12
- package/dist/shared/core.BR4zXDH-.mjs +0 -13
- package/dist/shared/core.BdPcbSkN.mjs +0 -118
|
@@ -46,6 +46,7 @@ declare function flattenMarkdownOrString(value: MarkdownOrString | string): stri
|
|
|
46
46
|
declare function flattenMarkdownOrString(value: MarkdownOrString | string | undefined | null): string | null;
|
|
47
47
|
type BuiltInIcon = 'none' | `${'aws' | 'azure' | 'gcp' | 'tech'}:${string}`;
|
|
48
48
|
type Icon = Tagged<string, 'Icon'> | BuiltInIcon;
|
|
49
|
+
declare const NoneIcon: Icon;
|
|
49
50
|
type IconUrl = Icon;
|
|
50
51
|
/**
|
|
51
52
|
* Full-qualified-name for model elements
|
|
@@ -114,6 +115,7 @@ type scalar_Icon = Icon;
|
|
|
114
115
|
type scalar_IconUrl = IconUrl;
|
|
115
116
|
type scalar_MarkdownOrString = MarkdownOrString;
|
|
116
117
|
declare const scalar_NodeId: typeof NodeId;
|
|
118
|
+
declare const scalar_NoneIcon: typeof NoneIcon;
|
|
117
119
|
declare const scalar_ProjectId: typeof ProjectId;
|
|
118
120
|
declare const scalar_RelationId: typeof RelationId;
|
|
119
121
|
type scalar_RelationKind<Kinds = string> = RelationKind<Kinds>;
|
|
@@ -131,7 +133,7 @@ declare const scalar_isStepEdgeId: typeof isStepEdgeId;
|
|
|
131
133
|
declare const scalar_splitGlobalFqn: typeof splitGlobalFqn;
|
|
132
134
|
declare const scalar_stepEdgeId: typeof stepEdgeId;
|
|
133
135
|
declare namespace scalar {
|
|
134
|
-
export { type scalar_AnyFqn as AnyFqn, type scalar_BuiltInIcon as BuiltInIcon, scalar_DeploymentFqn as DeploymentFqn, type scalar_DeploymentKind as DeploymentKind, scalar_EdgeId as EdgeId, type scalar_ElementKind as ElementKind, scalar_Fqn as Fqn, scalar_GlobalFqn as GlobalFqn, type scalar_GroupElementKind as GroupElementKind, type scalar_Icon as Icon, type scalar_IconUrl as IconUrl, type scalar_MarkdownOrString as MarkdownOrString, scalar_NodeId as NodeId, scalar_ProjectId as ProjectId, scalar_RelationId as RelationId, type scalar_RelationKind as RelationKind, type scalar_RelationshipKind as RelationshipKind, type scalar_StepEdgeId as StepEdgeId, type scalar_StepEdgeIdLiteral as StepEdgeIdLiteral, scalar_StepEdgeKind as StepEdgeKind, type scalar_Tag as Tag, scalar_ViewId as ViewId, scalar_extractStep as extractStep, scalar_flattenMarkdownOrString as flattenMarkdownOrString, scalar_isGlobalFqn as isGlobalFqn, scalar_isGroupElementKind as isGroupElementKind, scalar_isStepEdgeId as isStepEdgeId, scalar_splitGlobalFqn as splitGlobalFqn, scalar_stepEdgeId as stepEdgeId };
|
|
136
|
+
export { type scalar_AnyFqn as AnyFqn, type scalar_BuiltInIcon as BuiltInIcon, scalar_DeploymentFqn as DeploymentFqn, type scalar_DeploymentKind as DeploymentKind, scalar_EdgeId as EdgeId, type scalar_ElementKind as ElementKind, scalar_Fqn as Fqn, scalar_GlobalFqn as GlobalFqn, type scalar_GroupElementKind as GroupElementKind, type scalar_Icon as Icon, type scalar_IconUrl as IconUrl, type scalar_MarkdownOrString as MarkdownOrString, scalar_NodeId as NodeId, scalar_NoneIcon as NoneIcon, scalar_ProjectId as ProjectId, scalar_RelationId as RelationId, type scalar_RelationKind as RelationKind, type scalar_RelationshipKind as RelationshipKind, type scalar_StepEdgeId as StepEdgeId, type scalar_StepEdgeIdLiteral as StepEdgeIdLiteral, scalar_StepEdgeKind as StepEdgeKind, type scalar_Tag as Tag, scalar_ViewId as ViewId, scalar_extractStep as extractStep, scalar_flattenMarkdownOrString as flattenMarkdownOrString, scalar_isGlobalFqn as isGlobalFqn, scalar_isGroupElementKind as isGroupElementKind, scalar_isStepEdgeId as isStepEdgeId, scalar_splitGlobalFqn as splitGlobalFqn, scalar_stepEdgeId as stepEdgeId };
|
|
135
137
|
}
|
|
136
138
|
|
|
137
|
-
export { type AnyFqn as A, type BuiltInIcon as B, DeploymentFqn as D, type ElementKind as E, Fqn as F, GroupElementKind as G, type Icon as I, type MarkdownOrString as M,
|
|
139
|
+
export { type AnyFqn as A, type BuiltInIcon as B, DeploymentFqn as D, type ElementKind as E, Fqn as F, GroupElementKind as G, type Icon as I, type MarkdownOrString as M, NoneIcon as N, ProjectId as P, type RelationKind as R, type StepEdgeIdLiteral as S, type Tag as T, ViewId as V, type IconUrl as a, type DeploymentKind as b, type RelationshipKind as c, RelationId as d, GlobalFqn as e, flattenMarkdownOrString as f, isGlobalFqn as g, splitGlobalFqn as h, isGroupElementKind as i, NodeId as j, EdgeId as k, type StepEdgeId as l, stepEdgeId as m, StepEdgeKind as n, isStepEdgeId as o, extractStep as p, scalar as s };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
function memoizeProp(obj, tag, fn) {
|
|
2
|
+
const tagSymbol = typeof tag === "symbol" ? tag : Symbol.for(tag);
|
|
3
|
+
if (!obj.hasOwnProperty(tagSymbol)) {
|
|
4
|
+
Object.defineProperty(obj, tagSymbol, {
|
|
5
|
+
enumerable: false,
|
|
6
|
+
writable: false,
|
|
7
|
+
value: fn()
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
return obj[tagSymbol];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function isPlainObject(value) {
|
|
14
|
+
if (value === null || typeof value !== "object") {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
const prototype = Object.getPrototypeOf(value);
|
|
18
|
+
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
if (Symbol.iterator in value) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (Symbol.toStringTag in value) {
|
|
25
|
+
return Object.prototype.toString.call(value) === "[object Module]";
|
|
26
|
+
}
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
31
|
+
if (!isPlainObject(defaults)) {
|
|
32
|
+
return _defu(baseObject, {}, namespace, merger);
|
|
33
|
+
}
|
|
34
|
+
const object = Object.assign({}, defaults);
|
|
35
|
+
for (const key in baseObject) {
|
|
36
|
+
if (key === "__proto__" || key === "constructor") {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
const value = baseObject[key];
|
|
40
|
+
if (value === null || value === void 0) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (merger && merger(object, key, value, namespace)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
47
|
+
object[key] = [...value, ...object[key]];
|
|
48
|
+
} else if (isPlainObject(value) && isPlainObject(object[key])) {
|
|
49
|
+
object[key] = _defu(
|
|
50
|
+
value,
|
|
51
|
+
object[key],
|
|
52
|
+
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
53
|
+
merger
|
|
54
|
+
);
|
|
55
|
+
} else {
|
|
56
|
+
object[key] = value;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return object;
|
|
60
|
+
}
|
|
61
|
+
function createDefu(merger) {
|
|
62
|
+
return (...arguments_) => (
|
|
63
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
|
64
|
+
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
const defu = createDefu();
|
|
68
|
+
|
|
69
|
+
export { defu as d, memoizeProp as m };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as customInspectSymbol } from './core.
|
|
1
|
+
import { c as customInspectSymbol } from './core.BFd1lU9R.mjs';
|
|
2
2
|
import { i as intersection, d as difference, u as union, e as equals } from './core.DbfO90vF.mjs';
|
|
3
3
|
import { t as t$1 } from './core.BsSXS-_R.mjs';
|
|
4
4
|
import { e as e$1 } from './core.BKlholso.mjs';
|
|
5
5
|
import { n as n$1 } from './core.BhNcrwzK.mjs';
|
|
6
6
|
import { m as hierarchyLevel, g as commonAncestor, n as nameFromFqn, d as isSameHierarchy } from './core.CdNCAwq7.mjs';
|
|
7
7
|
import { a as nonNullable, i as invariant } from './core.D4npX2q8.mjs';
|
|
8
|
-
import { m as memoizeProp } from './core.
|
|
9
|
-
import { e as exact, R as RichText } from './core.
|
|
8
|
+
import { m as memoizeProp } from './core.CLSZtnFh.mjs';
|
|
9
|
+
import { e as exact, R as RichText } from './core.DEK-BO3_.mjs';
|
|
10
10
|
import { preferSummary, preferDescription } from '../types/_aux.mjs';
|
|
11
11
|
import { i as ihead } from './core.uFk_o9X6.mjs';
|
|
12
12
|
import { s as stringHash } from './core.oSV6SRfk.mjs';
|
|
@@ -41,6 +41,9 @@ class AbstractDeploymentElementModel {
|
|
|
41
41
|
get color() {
|
|
42
42
|
return this.style.color;
|
|
43
43
|
}
|
|
44
|
+
get icon() {
|
|
45
|
+
return this.style.icon ?? null;
|
|
46
|
+
}
|
|
44
47
|
/**
|
|
45
48
|
* Short description of the element.
|
|
46
49
|
* Falls back to description if summary is not provided.
|
|
@@ -159,13 +162,13 @@ class AbstractDeploymentElementModel {
|
|
|
159
162
|
return false;
|
|
160
163
|
}
|
|
161
164
|
get allOutgoing() {
|
|
162
|
-
return memoizeProp(this, Symbol.for("allOutgoing"), () => RelationshipsAccum.from(
|
|
165
|
+
return memoizeProp(this, /* @__PURE__ */ Symbol.for("allOutgoing"), () => RelationshipsAccum.from(
|
|
163
166
|
new Set(this.outgoingModelRelationships()),
|
|
164
167
|
new Set(this.outgoing())
|
|
165
168
|
));
|
|
166
169
|
}
|
|
167
170
|
get allIncoming() {
|
|
168
|
-
return memoizeProp(this, Symbol.for("allIncoming"), () => RelationshipsAccum.from(
|
|
171
|
+
return memoizeProp(this, /* @__PURE__ */ Symbol.for("allIncoming"), () => RelationshipsAccum.from(
|
|
169
172
|
new Set(this.incomingModelRelationships()),
|
|
170
173
|
new Set(this.incoming())
|
|
171
174
|
));
|
|
@@ -207,7 +210,7 @@ class DeploymentNodeModel extends AbstractDeploymentElementModel {
|
|
|
207
210
|
return this.$node.kind;
|
|
208
211
|
}
|
|
209
212
|
get tags() {
|
|
210
|
-
return memoizeProp(this, Symbol.for("tags"), () => {
|
|
213
|
+
return memoizeProp(this, /* @__PURE__ */ Symbol.for("tags"), () => {
|
|
211
214
|
return n$1([
|
|
212
215
|
...this.$node.tags ?? [],
|
|
213
216
|
...this.$model.$model.specification.deployments[this.kind]?.tags ?? []
|
|
@@ -332,7 +335,7 @@ class DeployedInstanceModel extends AbstractDeploymentElementModel {
|
|
|
332
335
|
}));
|
|
333
336
|
}
|
|
334
337
|
get tags() {
|
|
335
|
-
return memoizeProp(this, Symbol.for("tags"), () => {
|
|
338
|
+
return memoizeProp(this, /* @__PURE__ */ Symbol.for("tags"), () => {
|
|
336
339
|
return n$1([
|
|
337
340
|
...this.$instance.tags ?? [],
|
|
338
341
|
...this.element.tags
|