@likec4/core 1.44.0 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder/index.d.mts +15 -13
- package/dist/builder/index.mjs +33 -17
- package/dist/compute-view/index.d.mts +8 -7
- package/dist/compute-view/index.mjs +7 -6
- package/dist/compute-view/relationships-view/index.d.mts +8 -7
- package/dist/compute-view/relationships-view/index.mjs +2 -2
- package/dist/geometry/index.d.mts +109 -0
- package/dist/geometry/index.mjs +328 -0
- package/dist/index.d.mts +29 -7
- package/dist/index.mjs +10 -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 +13 -26
- package/dist/model/index.mjs +4 -4
- package/dist/shared/{core.Bv3cd-jC.mjs → core.3ZhnKAlZ.mjs} +9 -5
- package/dist/shared/{core.CKNmSm2W.d.mts → core.5gPDaaG5.d.mts} +9 -15
- package/dist/shared/{core.BnOetIAR.d.mts → core.9U0HL3oG.d.mts} +3 -3
- package/dist/shared/{core.M9ayqQZa.mjs → core.BK-tI3Q3.mjs} +2 -3
- package/dist/shared/{core.DjAM-S6a.d.mts → core.BLG-ADpi.d.mts} +16 -14
- package/dist/shared/core.BPGOjone.d.mts +46 -0
- package/dist/shared/{core.DIE3F6sw.mjs → core.BYdtmqY5.mjs} +1 -2
- package/dist/shared/core.BhNcrwzK.mjs +7 -0
- package/dist/shared/{core.CDOKQTW6.d.mts → core.BkSYCfRg.d.mts} +2 -2
- package/dist/shared/core.BkVA6gjl.mjs +5 -0
- 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.BnDbAOR2.d.mts → core.Byj60hH6.d.mts} +3 -3
- 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.bKIs4oDO.mjs → core.CQPEY2wQ.mjs} +5 -4
- package/dist/shared/{core.WwMWeiFL.d.mts → core.CQYL_Z-_.d.mts} +3 -3
- package/dist/shared/{core.6VsRBhGY.mjs → core.CdNCAwq7.mjs} +1 -1
- package/dist/shared/{core.DrUt0Lbi.mjs → core.CmGY9blO.mjs} +198 -291
- package/dist/shared/core.Coi_LOUZ.mjs +7 -0
- package/dist/shared/{core.C_Ni6yHl.mjs → core.D0WZutNd.mjs} +3 -1
- package/dist/shared/{core.DTJYgLXI.d.mts → core.D4Y4U8Lp.d.mts} +3 -3
- package/dist/shared/{core.BMtVqKl7.d.mts → core.DE-g9oFF.d.mts} +22 -46
- package/dist/shared/{core.23WeDKcI.mjs → core.DJpiszim.mjs} +265 -233
- package/dist/shared/{core.h4TqqSC0.mjs → core.DU8pv3Q6.mjs} +71 -1174
- package/dist/shared/{core.CHwVhuc9.mjs → core.DbQpDoJS.mjs} +12 -15
- package/dist/shared/{core.CbsSAn1j.mjs → core.DbfO90vF.mjs} +1 -12
- package/dist/shared/{core.C0Ye2OCr.mjs → core.DqlrMlsf.mjs} +1 -1
- package/dist/shared/core.Qv7vZIwZ.mjs +1282 -0
- package/dist/shared/core.oSV6SRfk.mjs +13 -0
- package/dist/shared/{core.BuQZczj6.mjs → core.om36dXXW.mjs} +5 -2
- package/dist/shared/{core.8mmHFn9g.d.mts → core.or6-EHsb.d.mts} +2 -2
- package/dist/shared/{core.DFCHU59b.mjs → core.xeuDd__E.mjs} +3 -4
- package/dist/styles/index.d.mts +7 -6
- package/dist/styles/index.mjs +4 -4
- 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 -166
- 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 +9 -8
- 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.B9BjmjuH.mjs +0 -9
- package/dist/shared/core.BR4zXDH-.mjs +0 -13
- package/dist/shared/core.BdPcbSkN.mjs +0 -118
- package/dist/shared/core.OHD4KXm9.mjs +0 -5
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { a as t } from '../shared/core.BsSXS-_R.mjs';
|
|
2
|
+
import { i as invariant } from '../shared/core.D4npX2q8.mjs';
|
|
3
|
+
|
|
4
|
+
var BBox;
|
|
5
|
+
((BBox2) => {
|
|
6
|
+
function center({ x, y, width, height }) {
|
|
7
|
+
return {
|
|
8
|
+
x: x + width / 2,
|
|
9
|
+
y: y + height / 2
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
BBox2.center = center;
|
|
13
|
+
function toPoints({ x, y, width, height }) {
|
|
14
|
+
return [
|
|
15
|
+
{ x, y },
|
|
16
|
+
// Top left
|
|
17
|
+
{ x: x + width, y },
|
|
18
|
+
// Top right
|
|
19
|
+
{ x: x + width, y: y + height },
|
|
20
|
+
// Bottom right
|
|
21
|
+
{ x, y: y + height }
|
|
22
|
+
// Bottom left
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
BBox2.toPoints = toPoints;
|
|
26
|
+
function fromPoints(points) {
|
|
27
|
+
const { x1, y1, x2, y2 } = RectBox.fromPoints(points);
|
|
28
|
+
return {
|
|
29
|
+
x: x1,
|
|
30
|
+
y: y1,
|
|
31
|
+
width: x2 - x1,
|
|
32
|
+
height: y2 - y1
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
BBox2.fromPoints = fromPoints;
|
|
36
|
+
function merge(...boxes) {
|
|
37
|
+
invariant(t(boxes, 1), "No boxes provided");
|
|
38
|
+
if (boxes.length === 1) {
|
|
39
|
+
return boxes[0];
|
|
40
|
+
}
|
|
41
|
+
let minX = boxes[0].x;
|
|
42
|
+
let minY = boxes[0].y;
|
|
43
|
+
let maxX = boxes[0].x + boxes[0].width;
|
|
44
|
+
let maxY = boxes[0].y + boxes[0].height;
|
|
45
|
+
for (let i = 1; i < boxes.length; i++) {
|
|
46
|
+
const box = boxes[i];
|
|
47
|
+
minX = Math.min(minX, box.x);
|
|
48
|
+
minY = Math.min(minY, box.y);
|
|
49
|
+
maxX = Math.max(maxX, box.x + box.width);
|
|
50
|
+
maxY = Math.max(maxY, box.y + box.height);
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
x: Math.floor(minX),
|
|
54
|
+
y: Math.floor(minY),
|
|
55
|
+
width: Math.round(maxX - minX),
|
|
56
|
+
height: Math.round(maxY - minY)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
BBox2.merge = merge;
|
|
60
|
+
function fromRectBox(rect) {
|
|
61
|
+
return {
|
|
62
|
+
x: Math.min(rect.x1, rect.x2),
|
|
63
|
+
y: Math.min(rect.y1, rect.y2),
|
|
64
|
+
width: Math.abs(rect.x2 - rect.x1),
|
|
65
|
+
height: Math.abs(rect.y2 - rect.y1)
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
BBox2.fromRectBox = fromRectBox;
|
|
69
|
+
function toRectBox(box) {
|
|
70
|
+
return {
|
|
71
|
+
x1: box.x,
|
|
72
|
+
y1: box.y,
|
|
73
|
+
x2: box.x + box.width,
|
|
74
|
+
y2: box.y + box.height
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
BBox2.toRectBox = toRectBox;
|
|
78
|
+
function expand(box, plus) {
|
|
79
|
+
if (plus === 0) {
|
|
80
|
+
return box;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
x: box.x - plus,
|
|
84
|
+
y: box.y - plus,
|
|
85
|
+
width: box.width + plus * 2,
|
|
86
|
+
height: box.height + plus * 2
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
BBox2.expand = expand;
|
|
90
|
+
function shrink(box, minus) {
|
|
91
|
+
if (minus === 0) {
|
|
92
|
+
return box;
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
x: box.x + minus,
|
|
96
|
+
y: box.y + minus,
|
|
97
|
+
width: box.width - minus * 2,
|
|
98
|
+
height: box.height - minus * 2
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
BBox2.shrink = shrink;
|
|
102
|
+
function includes(a, b) {
|
|
103
|
+
if (a === b) {
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
return a.x <= b.x && a.y <= b.y && a.x + a.width >= b.x + b.width && a.y + a.height >= b.y + b.height;
|
|
107
|
+
}
|
|
108
|
+
BBox2.includes = includes;
|
|
109
|
+
})(BBox || (BBox = {}));
|
|
110
|
+
var RectBox;
|
|
111
|
+
((RectBox2) => {
|
|
112
|
+
function center({ x1, y1, x2, y2 }) {
|
|
113
|
+
return {
|
|
114
|
+
x: (x1 + x2) / 2,
|
|
115
|
+
y: (y1 + y2) / 2
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
RectBox2.center = center;
|
|
119
|
+
function fromPoints(points) {
|
|
120
|
+
invariant(points.length > 0, "At least one point is required");
|
|
121
|
+
let minX = Infinity;
|
|
122
|
+
let minY = Infinity;
|
|
123
|
+
let maxX = -Infinity;
|
|
124
|
+
let maxY = -Infinity;
|
|
125
|
+
for (const [x, y] of points) {
|
|
126
|
+
minX = Math.min(minX, x);
|
|
127
|
+
minY = Math.min(minY, y);
|
|
128
|
+
maxX = Math.max(maxX, x);
|
|
129
|
+
maxY = Math.max(maxY, y);
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
x1: minX,
|
|
133
|
+
y1: minY,
|
|
134
|
+
x2: maxX,
|
|
135
|
+
y2: maxY
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
RectBox2.fromPoints = fromPoints;
|
|
139
|
+
function merge(...boxes) {
|
|
140
|
+
invariant(boxes.length > 0, "No boxes provided");
|
|
141
|
+
let minX = Infinity;
|
|
142
|
+
let minY = Infinity;
|
|
143
|
+
let maxX = -Infinity;
|
|
144
|
+
let maxY = -Infinity;
|
|
145
|
+
for (const box of boxes) {
|
|
146
|
+
minX = Math.min(minX, box.x1);
|
|
147
|
+
minY = Math.min(minY, box.y1);
|
|
148
|
+
maxX = Math.max(maxX, box.x2);
|
|
149
|
+
maxY = Math.max(maxY, box.y2);
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
x1: minX,
|
|
153
|
+
y1: minY,
|
|
154
|
+
x2: maxX,
|
|
155
|
+
y2: maxY
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
RectBox2.merge = merge;
|
|
159
|
+
function toBBox(box) {
|
|
160
|
+
return {
|
|
161
|
+
x: box.x1,
|
|
162
|
+
y: box.y1,
|
|
163
|
+
width: box.x2 - box.x1,
|
|
164
|
+
height: box.y2 - box.y1
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
RectBox2.toBBox = toBBox;
|
|
168
|
+
function includes(a, b) {
|
|
169
|
+
if (a === b) {
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
return a.x1 <= b.x1 && a.y1 <= b.y1 && a.x2 >= b.x2 && a.y2 >= b.y2;
|
|
173
|
+
}
|
|
174
|
+
RectBox2.includes = includes;
|
|
175
|
+
})(RectBox || (RectBox = {}));
|
|
176
|
+
|
|
177
|
+
class Vector {
|
|
178
|
+
constructor(x, y) {
|
|
179
|
+
this.x = x;
|
|
180
|
+
this.y = y;
|
|
181
|
+
}
|
|
182
|
+
static create(...args) {
|
|
183
|
+
if (args.length === 2) {
|
|
184
|
+
return new Vector(args[0], args[1]);
|
|
185
|
+
}
|
|
186
|
+
return new Vector(args[0].x, args[0].y);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Adds two vectors.
|
|
190
|
+
* @param a The first vector.
|
|
191
|
+
* @param b The second vector.
|
|
192
|
+
* @returns The sum of the two vectors.
|
|
193
|
+
*/
|
|
194
|
+
static add(a, b) {
|
|
195
|
+
return { x: a.x + b.x, y: a.y + b.y };
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Subtracts two vectors.
|
|
199
|
+
* @param a The first vector.
|
|
200
|
+
* @param b The second vector.
|
|
201
|
+
* @returns The difference of the two vectors.
|
|
202
|
+
*/
|
|
203
|
+
static subtract(a, b) {
|
|
204
|
+
return { x: a.x - b.x, y: a.y - b.y };
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Multiplies a vector by a scalar.
|
|
208
|
+
* @param a The vector.
|
|
209
|
+
* @param b The scalar.
|
|
210
|
+
* @returns The scaled vector.
|
|
211
|
+
*/
|
|
212
|
+
static multiply(a, b) {
|
|
213
|
+
return { x: a.x * b, y: a.y * b };
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Divides a vector by a scalar.
|
|
217
|
+
* @param a The vector.
|
|
218
|
+
* @param b The scalar.
|
|
219
|
+
* @returns The scaled vector.
|
|
220
|
+
*/
|
|
221
|
+
static divide(a, b) {
|
|
222
|
+
return { x: a.x / b, y: a.y / b };
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Calculates the dot product of the vectors.
|
|
226
|
+
* @param a The first vector.
|
|
227
|
+
* @param b The second vector.
|
|
228
|
+
* @returns The dot product.
|
|
229
|
+
*/
|
|
230
|
+
static dot(a, b) {
|
|
231
|
+
return a.x * b.x + a.y * b.y;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Adds the given vector to this vector.
|
|
235
|
+
* @param b The vector to add.
|
|
236
|
+
* @returns A new vector that is the sum of this vector and the given vector.
|
|
237
|
+
*/
|
|
238
|
+
add(b) {
|
|
239
|
+
return new Vector(this.x + b.x, this.y + b.y);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Subtracts the given vector from this vector.
|
|
243
|
+
* @param b The vector to subtract.
|
|
244
|
+
* @returns A new vector that is the difference of this vector and the given vector.
|
|
245
|
+
*/
|
|
246
|
+
subtract(b) {
|
|
247
|
+
return new Vector(this.x - b.x, this.y - b.y);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Multiplies this vector by a scalar.
|
|
251
|
+
* @param b The scalar to multiply by.
|
|
252
|
+
* @returns A new vector that is the product of this vector and the given scalar.
|
|
253
|
+
*/
|
|
254
|
+
multiply(b) {
|
|
255
|
+
return new Vector(this.x * b, this.y * b);
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Divides this vector by a scalar.
|
|
259
|
+
* @param b The scalar to divide by.
|
|
260
|
+
* @returns A new vector that is the quotient of this vector and the given scalar.
|
|
261
|
+
*/
|
|
262
|
+
divide(b) {
|
|
263
|
+
return new Vector(this.x / b, this.y / b);
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Calculates the dot product of this vector and another vector.
|
|
267
|
+
* @param b The other vector.
|
|
268
|
+
* @returns The dot product.
|
|
269
|
+
*/
|
|
270
|
+
dot(b) {
|
|
271
|
+
return this.x * b.x + this.y * b.y;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Calculates the cross product of this vector and another vector.
|
|
275
|
+
* The cross product of two 2D vectors is a scalar value: a.x * b.y - a.y * b.x
|
|
276
|
+
* @param b The other vector.
|
|
277
|
+
* @returns The cross product as a scalar.
|
|
278
|
+
*/
|
|
279
|
+
cross(b) {
|
|
280
|
+
return this.x * b.y - this.y * b.x;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Calculates the length (magnitude) of this vector.
|
|
284
|
+
* @returns The length of the vector.
|
|
285
|
+
*/
|
|
286
|
+
length() {
|
|
287
|
+
if (this.x === 0 && this.y === 0) {
|
|
288
|
+
return 0;
|
|
289
|
+
}
|
|
290
|
+
return Math.sqrt(this.x ** 2 + this.y ** 2);
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Normalizes the vector (makes it unit length, i.e., has a length of 1).
|
|
294
|
+
* @returns A new vector that is the normalized version of this vector.
|
|
295
|
+
*/
|
|
296
|
+
normalize() {
|
|
297
|
+
const len = this.length();
|
|
298
|
+
if (len === 0) {
|
|
299
|
+
return new Vector(0, 0);
|
|
300
|
+
}
|
|
301
|
+
return new Vector(this.x / len, this.y / len);
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Rounds the components of the vector to the nearest integers.
|
|
305
|
+
* @returns A new vector with rounded components.
|
|
306
|
+
*/
|
|
307
|
+
round() {
|
|
308
|
+
return new Vector(Math.round(this.x), Math.round(this.y));
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Converts the vector to a plain object.
|
|
312
|
+
* @returns An object with x and y properties.
|
|
313
|
+
*/
|
|
314
|
+
toObject() {
|
|
315
|
+
return { x: this.x, y: this.y };
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
function vector(...args) {
|
|
319
|
+
if (args.length === 1 && args[0] instanceof Vector) {
|
|
320
|
+
return args[0];
|
|
321
|
+
}
|
|
322
|
+
if (args.length === 2) {
|
|
323
|
+
return new Vector(args[0], args[1]);
|
|
324
|
+
}
|
|
325
|
+
return new Vector(args[0].x, args[0].y);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export { BBox, RectBox, Vector, vector };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
import { L as LayoutedView, V as ViewManualLayoutSnapshot } from './shared/core.5gPDaaG5.mjs';
|
|
2
|
+
export { t as AnyView, o as AuxFromDump, A as AuxFromLikeC4ModelData, C as ComputedLikeC4ModelData, r as ComputedView, e as DeployedInstance, f as DeploymentElement, g as DeploymentElementRef, D as DeploymentNode, k as DeploymentRelation, j as DeploymentRelationship, Y as DeploymentViewExcludePredicate, X as DeploymentViewIncludePredicate, Z as DeploymentViewPredicate, $ as DeploymentViewRule, _ as DeploymentViewRuleStyle, K as DiagramEdge, W as DiagramEdgeDriftReason, J as DiagramNode, U as DiagramNodeDriftReason, M as LayoutType, O as LayoutedDeploymentView, Q as LayoutedDynamicView, N as LayoutedElementView, c as LayoutedLikeC4ModelData, T as LayoutedViewDriftReason, d as LikeC4ModelData, m as LikeC4ModelDump, p as LikeC4View, a0 as ParsedDeploymentView, P as ParsedLikeC4ModelData, p as ParsedView, s as ProcessedView, n as ProjectDump, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, l as SpecTypesFromDump, S as SpecificationDump, u as ViewOnStage, w as ViewRule, x as ViewRulePredicate, v as ViewWithType, B as isComputedView, h as isDeployedInstance, i as isDeploymentNode, H as isDeploymentView, q as isDiagramView, I as isDynamicView, E as isElementView, G as isExtendsElementView, q as isLayoutedView, F as isScopedElementView, y as isViewRulePredicate, z as isViewRuleStyle } from './shared/core.5gPDaaG5.mjs';
|
|
3
|
+
export { B as BiMap, D as DefaultWeakMap, L as LinkedList, M as MultiMap, Q as Queue, a as ancestorsFqn, h as hasProp, i as invariant, b as isAncestor, c as isDescendantOf, d as isNonEmptyArray, e as isSameHierarchy, f as isString, m as memoizeProp, n as nameFromFqn, j as nonNullable, g as nonexhaustive, p as parentFqn, s as sortNaturalByFqn, k as sortParentsFirst } from './shared/core.BqtAzeAh.mjs';
|
|
2
4
|
export { D as DefaultMap } from './shared/core.CywrQs86.mjs';
|
|
3
|
-
export { L as LikeC4Styles } from './shared/core.
|
|
4
|
-
export { A as AndOperator,
|
|
5
|
+
export { L as LikeC4Styles } from './shared/core.or6-EHsb.mjs';
|
|
6
|
+
export { A as AndOperator, B as BorderStyle, z as BorderStyles, C as Color, G as ColorLiteral, U as CustomColor, Q as CustomColorDefinitions, E as ElementColorValues, h as ElementShape, D as ElementShapes, k as EqualOperator, j as Expression, u as Filterable, F as FqnExpr, H as HexColor, K as KindEqual, b as LikeC4StyleDefaults, L as LikeC4StylesConfig, a as LikeC4Theme, N as NotOperator, v as OperatorPredicate, O as OrOperator, o as Participant, p as ParticipantOperator, P as PredicateSelector, i as RelationExpr, g as RelationshipArrowType, I as RelationshipArrowTypes, R as RelationshipColorValues, f as RelationshipLineType, e as ShapeSize, y as Size, x as Sizes, S as SpacingSize, l as TagEqual, d as TextSize, T as ThemeColor, c as ThemeColorValues, J as ThemeColors, W as WhereOperator, s as isAndOperator, V as isCustomColor, n as isKindEqual, r as isNotOperator, t as isOrOperator, q as isParticipantOperator, m as isTagEqual, M as isThemeColor, w as whereOperatorAsPredicate } from './shared/core.9U0HL3oG.mjs';
|
|
5
7
|
export { i as isIterable } from './shared/core.DXhDWKFZ.mjs';
|
|
6
|
-
export { A as Any, A as AnyAux,
|
|
7
|
-
export { A as AnyFqn, B as BuiltInIcon, D as DeploymentFqn, b as DeploymentKind,
|
|
8
|
-
export { t as AnyView, n as AuxFromDump, A as AuxFromLikeC4ModelData, C as ComputedLikeC4ModelData, r as ComputedView, d as DeployedInstance, e as DeploymentElement, f as DeploymentElementRef, D as DeploymentNode, j as DeploymentRelation, h as DeploymentRelationship, Y as DeploymentViewExcludePredicate, X as DeploymentViewIncludePredicate, Z as DeploymentViewPredicate, $ as DeploymentViewRule, _ as DeploymentViewRuleStyle, J as DiagramEdge, U as DiagramEdgeDriftReason, I as DiagramNode, T as DiagramNodeDriftReason, p as DiagramView, K as LayoutType, N as LayoutedDeploymentView, O as LayoutedDynamicView, M as LayoutedElementView, L as LayoutedLikeC4ModelData, p as LayoutedView, Q as LayoutedViewDriftReason, c as LikeC4ModelData, l as LikeC4ModelDump, o as LikeC4View, a0 as ParsedDeploymentView, P as ParsedLikeC4ModelData, o as ParsedView, s as ProcessedView, m as ProjectDump, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, k as SpecTypesFromDump, S as SpecificationDump, W as ViewManualLayoutSnapshot, V as ViewOnStage, v as ViewRule, w as ViewRulePredicate, u as ViewWithType, z as isComputedView, g as isDeployedInstance, i as isDeploymentNode, G as isDeploymentView, q as isDiagramView, H as isDynamicView, B as isElementView, F as isExtendsElementView, q as isLayoutedView, E as isScopedElementView, x as isViewRulePredicate, y as isViewRuleStyle } from './shared/core.CKNmSm2W.mjs';
|
|
8
|
+
export { A as Any, A as AnyAux, b as AnyComputed, c as AnyLayouted, d as AnyParsed, e as Aux, k as ExtractOnStage, L as LooseLiteral, M as ModelStage, f as SpecAux, U as Unknown, g as UnknownComputed, h as UnknownLayouted, i as UnknownParsed, o as _layout, m as _stage, n as _type, _ as aux, l as isOnStage, p as preferDescription, j as preferSummary } from './shared/core.BkSYCfRg.mjs';
|
|
9
|
+
export { A as AnyFqn, B as BuiltInIcon, D as DeploymentFqn, b as DeploymentKind, k as EdgeId, E as ElementKind, F as Fqn, e as GlobalFqn, G as GroupElementKind, I as Icon, a as IconUrl, M as MarkdownOrString, j as NodeId, N as NoneIcon, P as ProjectId, d as RelationId, R as RelationKind, c as RelationshipKind, l as StepEdgeId, S as StepEdgeIdLiteral, n as StepEdgeKind, T as Tag, V as ViewId, p as extractStep, f as flattenMarkdownOrString, g as isGlobalFqn, i as isGroupElementKind, o as isStepEdgeId, s as scalar, h as splitGlobalFqn, m as stepEdgeId } from './shared/core.CDdf8izT.mjs';
|
|
9
10
|
export { C as Coalesce, E as ExclusiveUnion, I as IterableContainer, c as IteratorLike, K as KeysOf, L as Link, b as NTuple, N as NonEmptyArray, a as NonEmptyReadonlyArray, P as Predicate, R as ReorderedArray, e as exact } from './shared/core.DB0Ue5Wx.mjs';
|
|
10
11
|
export { ModelExpression, ModelFqnExpr, ModelRelationExpr } from './types/expression-model.mjs';
|
|
11
12
|
export { FqnRef } from './types/fqnRef.mjs';
|
|
12
|
-
export {
|
|
13
|
+
export { B as BBox, P as Point, R as RectBox, X as XYPoint } from './shared/core.BPGOjone.mjs';
|
|
14
|
+
export { Vector, VectorValue, vector } from './geometry/index.mjs';
|
|
15
|
+
export { A as AbstractRelationship, p as AnyExcludePredicate, o as AnyIncludePredicate, q as AnyViewRuleStyle, w as AutoLayoutDirection, I as BaseParsedViewProperties, H as BaseViewProperties, W as ComputedDeploymentView, X as ComputedDynamicView, P as ComputedEdge, U as ComputedElementView, O as ComputedNode, C as ComputedNodeStyle, Q as ComputedRankConstraint, Y as DynamicStep, _ as DynamicStepsParallel, Z as DynamicStepsSeries, a6 as DynamicViewDisplayVariant, a4 as DynamicViewIncludeRule, a5 as DynamicViewRule, a0 as DynamicViewStep, f as Element, h as ElementSpecification, E as ElementStyle, a9 as ElementViewExcludePredicate, a8 as ElementViewIncludePredicate, aa as ElementViewPredicate, ag as ElementViewRule, ab as ElementViewRuleGroup, ae as ElementViewRuleRank, ad as ElementViewRuleStyle, b as GlobalDynamicPredicates, G as GlobalPredicateId, a as GlobalPredicates, c as GlobalStyleID, d as GlobalStyles, n as LikeC4Project, m as LikeC4ProjectManualLayoutsConfig, l as LikeC4ProjectStyleDefaults, L as LikeC4ProjectStylesConfig, k as LikeC4ProjectTheme, M as ModelGlobals, g as ModelRelation, N as NodeNotation, a7 as ParsedDynamicView, ah as ParsedElementView, u as RankValue, R as Relationship, j as RelationshipSpecification, S as Specification, T as TagSpecification, B as ViewAutoLayout, D as ViewManualLayout, y as ViewRuleAutoLayout, s as ViewRuleGlobalPredicateRef, V as ViewRuleGlobalStyle, v as ViewRuleRank, F as ViewType, K as ViewWithHash, J as ViewWithNotation, e as ensureSizes, $ as getParallelStepsPrefix, x as isAutoLayoutDirection, a1 as isDynamicStep, a2 as isDynamicStepsParallel, a3 as isDynamicStepsSeries, i as isTagColorSpecified, z as isViewRuleAutoLayout, t as isViewRuleGlobalPredicateRef, r as isViewRuleGlobalStyle, ac as isViewRuleGroup, af as isViewRuleRank } from './shared/core.DE-g9oFF.mjs';
|
|
13
16
|
export { ViewChange } from './types/index.mjs';
|
|
14
17
|
import 'type-fest';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Proof-of-concept
|
|
21
|
+
* Use layout from the snapshot, and 'safe'-apply style properties from the `autoLayouted` view
|
|
22
|
+
*
|
|
23
|
+
* @param autoLayouted Auto-layouted view
|
|
24
|
+
* @param snapshot The view snapshot with manual-layout
|
|
25
|
+
* @returns The snapshot with the next view applied
|
|
26
|
+
*/
|
|
27
|
+
declare function applyManualLayout<V extends LayoutedView>(autoLayouted: V, snapshot: ViewManualLayoutSnapshot): V;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Calculates drifts comparing latest autoLayouted with manual snapshot.
|
|
31
|
+
*
|
|
32
|
+
* @returns The autoLayouted view with calculated drifts if any.
|
|
33
|
+
*/
|
|
34
|
+
declare function calcDriftsFromSnapshot<V extends LayoutedView>(autoLayouted: V, snapshot: ViewManualLayoutSnapshot): V;
|
|
35
|
+
|
|
36
|
+
export { LayoutedView as DiagramView, LayoutedView, ViewManualLayoutSnapshot, applyManualLayout, calcDriftsFromSnapshot };
|
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
export { L as LikeC4Styles, e as ensureSizes } from './shared/core.
|
|
2
|
-
export { a as ancestorsFqn, h as hasProp, i as isAncestor, b as isDescendantOf, c as isNonEmptyArray, d as isSameHierarchy, e as isString, n as nameFromFqn, p as parentFqn, s as sortNaturalByFqn, f as sortParentsFirst } from './shared/core.
|
|
3
|
-
export { b as BiMap, d as DefaultWeakMap, l as LinkedList, m as MultiMap, q as Queue } from './shared/core.
|
|
1
|
+
export { L as LikeC4Styles, e as ensureSizes } from './shared/core.BspBF3SJ.mjs';
|
|
2
|
+
export { a as ancestorsFqn, h as hasProp, i as isAncestor, b as isDescendantOf, c as isNonEmptyArray, d as isSameHierarchy, e as isString, n as nameFromFqn, p as parentFqn, s as sortNaturalByFqn, f as sortParentsFirst } from './shared/core.CdNCAwq7.mjs';
|
|
3
|
+
export { b as BiMap, d as DefaultWeakMap, l as LinkedList, m as MultiMap, q as Queue } from './shared/core.BYdtmqY5.mjs';
|
|
4
4
|
export { D as DefaultMap } from './shared/core.BbE4y-yl.mjs';
|
|
5
5
|
export { i as invariant, a as nonNullable, n as nonexhaustive } from './shared/core.D4npX2q8.mjs';
|
|
6
6
|
export { i as isIterable } from './shared/core.RfnaEmgA.mjs';
|
|
7
|
-
export { m as memoizeProp } from './shared/core.
|
|
7
|
+
export { m as memoizeProp } from './shared/core.CLSZtnFh.mjs';
|
|
8
|
+
export { a as applyManualLayout, c as calcDriftsFromSnapshot } from './shared/core.Qv7vZIwZ.mjs';
|
|
8
9
|
export { preferDescription, preferSummary } from './types/_aux.mjs';
|
|
9
|
-
export { D as DeploymentFqn, E as EdgeId, F as Fqn, a as GlobalFqn, G as GroupElementKind,
|
|
10
|
-
export { R as RichText, e as exact } from './shared/core.
|
|
10
|
+
export { D as DeploymentFqn, E as EdgeId, F as Fqn, a as GlobalFqn, G as GroupElementKind, d as NodeId, N as NoneIcon, P as ProjectId, R as RelationId, S as StepEdgeKind, V as ViewId, h as extractStep, f as flattenMarkdownOrString, b as isGlobalFqn, i as isGroupElementKind, g as isStepEdgeId, s as scalar, c as splitGlobalFqn, e as stepEdgeId } from './shared/core.D0WZutNd.mjs';
|
|
11
|
+
export { R as RichText, e as exact } from './shared/core.BK-tI3Q3.mjs';
|
|
11
12
|
export { b as _layout, _ as _stage, a as _type, j as isAndOperator, n as isComputedView, d as isDeployedInstance, c as isDeploymentNode, s as isDeploymentView, o as isDiagramView, t as isDynamicView, p as isElementView, r as isExtendsElementView, f as isKindEqual, o as isLayoutedView, h as isNotOperator, i as isOnStage, k as isOrOperator, g as isParticipantOperator, q as isScopedElementView, e as isTagEqual, l as isViewRulePredicate, m as isViewRuleStyle, w as whereOperatorAsPredicate } from './shared/core.DH7TXqXf.mjs';
|
|
12
13
|
export { Expression, FqnExpr, RelationExpr } from './types/expression.mjs';
|
|
13
14
|
export { ModelExpression, ModelFqnExpr, ModelRelationExpr } from './types/expression-model.mjs';
|
|
14
15
|
export { FqnRef } from './types/fqnRef.mjs';
|
|
15
|
-
export { BBox, RectBox,
|
|
16
|
-
export {
|
|
16
|
+
export { BBox, RectBox, Vector, vector } from './geometry/index.mjs';
|
|
17
|
+
export { isTagColorSpecified } from './types/index.mjs';
|
|
18
|
+
export { g as getParallelStepsPrefix, b as isAutoLayoutDirection, d as isDynamicStep, e as isDynamicStepsParallel, f as isDynamicStepsSeries, c as isViewRuleAutoLayout, a as isViewRuleGlobalPredicateRef, i as isViewRuleGlobalStyle, h as isViewRuleGroup, j as isViewRuleRank } from './shared/core.om36dXXW.mjs';
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export { C as Connection } from '../../../shared/core.
|
|
2
|
-
export { D as DeploymentConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.
|
|
3
|
-
import '../../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../../shared/core.Byj60hH6.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.CQYL_Z-_.mjs';
|
|
3
|
+
import '../../../shared/core.BLG-ADpi.mjs';
|
|
4
4
|
import 'type-fest';
|
|
5
|
-
import '../../../shared/core.
|
|
6
|
-
import '../../../shared/core.
|
|
7
|
-
import '../../../shared/core.
|
|
5
|
+
import '../../../shared/core.or6-EHsb.mjs';
|
|
6
|
+
import '../../../shared/core.9U0HL3oG.mjs';
|
|
7
|
+
import '../../../shared/core.BkSYCfRg.mjs';
|
|
8
8
|
import '../../../shared/core.DB0Ue5Wx.mjs';
|
|
9
|
-
import '../../../shared/core.
|
|
9
|
+
import '../../../shared/core.CDdf8izT.mjs';
|
|
10
10
|
import '../../../types/fqnRef.mjs';
|
|
11
|
-
import '../../../shared/core.
|
|
11
|
+
import '../../../shared/core.DE-g9oFF.mjs';
|
|
12
12
|
import '../../../types/expression-model.mjs';
|
|
13
|
+
import '../../../shared/core.BPGOjone.mjs';
|
|
13
14
|
import '../../../shared/core.CywrQs86.mjs';
|
|
14
|
-
import '../../../shared/core.
|
|
15
|
+
import '../../../shared/core.5gPDaaG5.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as Connection } from '../../../shared/core.
|
|
2
|
-
export { D as DeploymentConnectionModel, f as findConnection, g as findConnectionsBetween, h as findConnectionsWithin } from '../../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../../shared/core.DqlrMlsf.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, f as findConnection, g as findConnectionsBetween, h as findConnectionsWithin } from '../../../shared/core.DbQpDoJS.mjs';
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { C as Connection } from '../../shared/core.
|
|
2
|
-
export { D as DeploymentConnectionModel, f as deployment } from '../../shared/core.
|
|
3
|
-
export { C as ConnectionModel, f as model } from '../../shared/core.
|
|
1
|
+
import { C as Connection } from '../../shared/core.Byj60hH6.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, f as deployment } from '../../shared/core.CQYL_Z-_.mjs';
|
|
3
|
+
export { C as ConnectionModel, f as model } from '../../shared/core.D4Y4U8Lp.mjs';
|
|
4
4
|
import { I as IterableContainer, R as ReorderedArray } from '../../shared/core.DB0Ue5Wx.mjs';
|
|
5
|
-
import '../../shared/core.
|
|
5
|
+
import '../../shared/core.BLG-ADpi.mjs';
|
|
6
6
|
import 'type-fest';
|
|
7
|
-
import '../../shared/core.
|
|
8
|
-
import '../../shared/core.
|
|
9
|
-
import '../../shared/core.
|
|
10
|
-
import '../../shared/core.
|
|
7
|
+
import '../../shared/core.or6-EHsb.mjs';
|
|
8
|
+
import '../../shared/core.9U0HL3oG.mjs';
|
|
9
|
+
import '../../shared/core.BkSYCfRg.mjs';
|
|
10
|
+
import '../../shared/core.CDdf8izT.mjs';
|
|
11
11
|
import '../../types/fqnRef.mjs';
|
|
12
|
-
import '../../shared/core.
|
|
12
|
+
import '../../shared/core.DE-g9oFF.mjs';
|
|
13
13
|
import '../../types/expression-model.mjs';
|
|
14
|
+
import '../../shared/core.BPGOjone.mjs';
|
|
14
15
|
import '../../shared/core.CywrQs86.mjs';
|
|
15
|
-
import '../../shared/core.
|
|
16
|
+
import '../../shared/core.5gPDaaG5.mjs';
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Check if connection is nested inside another connection
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { C as Connection } from '../../shared/core.
|
|
2
|
-
export { D as DeploymentConnectionModel, d as deployment } from '../../shared/core.
|
|
3
|
-
export { C as ConnectionModel, d as differenceConnections, f as findAscendingConnections, a as findDeepestNestedConnection, b as findDescendantConnections, h as hasSameSource, c as hasSameSourceTarget, e as hasSameTarget, i as isAnyInOut, g as isIncoming, j as isNestedConnection, k as isOutgoing, m as mergeConnections, n as model, s as sortConnectionsByBoundaryHierarchy, l as sortDeepestFirst } from '../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../shared/core.DqlrMlsf.mjs';
|
|
2
|
+
export { D as DeploymentConnectionModel, d as deployment } from '../../shared/core.DbQpDoJS.mjs';
|
|
3
|
+
export { C as ConnectionModel, d as differenceConnections, f as findAscendingConnections, a as findDeepestNestedConnection, b as findDescendantConnections, h as hasSameSource, c as hasSameSourceTarget, e as hasSameTarget, i as isAnyInOut, g as isIncoming, j as isNestedConnection, k as isOutgoing, m as mergeConnections, n as model, s as sortConnectionsByBoundaryHierarchy, l as sortDeepestFirst } from '../../shared/core.CQPEY2wQ.mjs';
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export { C as Connection } from '../../../shared/core.
|
|
2
|
-
export { C as ConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.
|
|
3
|
-
import '../../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../../shared/core.Byj60hH6.mjs';
|
|
2
|
+
export { C as ConnectionModel, a as findConnection, b as findConnectionsBetween, c as findConnectionsWithin } from '../../../shared/core.D4Y4U8Lp.mjs';
|
|
3
|
+
import '../../../shared/core.BLG-ADpi.mjs';
|
|
4
4
|
import 'type-fest';
|
|
5
|
-
import '../../../shared/core.
|
|
6
|
-
import '../../../shared/core.
|
|
7
|
-
import '../../../shared/core.
|
|
5
|
+
import '../../../shared/core.or6-EHsb.mjs';
|
|
6
|
+
import '../../../shared/core.9U0HL3oG.mjs';
|
|
7
|
+
import '../../../shared/core.BkSYCfRg.mjs';
|
|
8
8
|
import '../../../shared/core.DB0Ue5Wx.mjs';
|
|
9
|
-
import '../../../shared/core.
|
|
9
|
+
import '../../../shared/core.CDdf8izT.mjs';
|
|
10
10
|
import '../../../types/fqnRef.mjs';
|
|
11
|
-
import '../../../shared/core.
|
|
11
|
+
import '../../../shared/core.DE-g9oFF.mjs';
|
|
12
12
|
import '../../../types/expression-model.mjs';
|
|
13
|
+
import '../../../shared/core.BPGOjone.mjs';
|
|
13
14
|
import '../../../shared/core.CywrQs86.mjs';
|
|
14
|
-
import '../../../shared/core.
|
|
15
|
+
import '../../../shared/core.5gPDaaG5.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as Connection } from '../../../shared/core.
|
|
2
|
-
export { C as ConnectionModel, p as findConnection, o as findConnectionsBetween, q as findConnectionsWithin } from '../../../shared/core.
|
|
1
|
+
export { C as Connection } from '../../../shared/core.DqlrMlsf.mjs';
|
|
2
|
+
export { C as ConnectionModel, p as findConnection, o as findConnectionsBetween, q as findConnectionsWithin } from '../../../shared/core.CQPEY2wQ.mjs';
|
package/dist/model/index.d.mts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { g as AnyLikeC4Model, l as DeploymentOrFqn, i as DeploymentRelationEndpoint, m as EdgeOrId, n as ElementOrFqn, I as IncomingFilter, j as LikeC4DeploymentModel,
|
|
3
|
-
import { A as Any } from '../shared/core.
|
|
4
|
-
|
|
5
|
-
export { C as
|
|
6
|
-
export {
|
|
7
|
-
export { D as DeploymentConnectionModel, f as deploymentConnection } from '../shared/core.WwMWeiFL.mjs';
|
|
1
|
+
import { D as DeploymentNodeModel, a as DeployedInstanceModel, b as DeploymentRelationModel, A as AnyRelationshipModel, N as NestedElementOfDeployedInstanceModel, E as ElementModel, R as RelationshipModel, L as LikeC4ViewModel, c as NodeModel, d as EdgeModel, e as DeploymentElementModel } from '../shared/core.BLG-ADpi.mjs';
|
|
2
|
+
export { g as AnyLikeC4Model, l as DeploymentOrFqn, i as DeploymentRelationEndpoint, m as EdgeOrId, n as ElementOrFqn, I as IncomingFilter, j as LikeC4DeploymentModel, f as LikeC4Model, k as LikeC4ViewsFolder, o as NodeOrId, O as OutgoingFilter, h as RelationshipsAccum, W as WithMetadata, p as WithTags } from '../shared/core.BLG-ADpi.mjs';
|
|
3
|
+
import { A as Any } from '../shared/core.BkSYCfRg.mjs';
|
|
4
|
+
export { C as Connection } from '../shared/core.Byj60hH6.mjs';
|
|
5
|
+
export { C as ConnectionModel, f as modelConnection } from '../shared/core.D4Y4U8Lp.mjs';
|
|
6
|
+
export { D as DeploymentConnectionModel, f as deploymentConnection } from '../shared/core.CQYL_Z-_.mjs';
|
|
8
7
|
export { differenceConnections, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isIncoming, isNestedConnection, isOutgoing, mergeConnections, sortConnectionsByBoundaryHierarchy, sortDeepestFirst } from './connection/index.mjs';
|
|
9
8
|
import 'type-fest';
|
|
10
|
-
import '../shared/core.
|
|
11
|
-
import '../shared/core.
|
|
9
|
+
import '../shared/core.or6-EHsb.mjs';
|
|
10
|
+
import '../shared/core.9U0HL3oG.mjs';
|
|
12
11
|
import '../shared/core.DB0Ue5Wx.mjs';
|
|
13
12
|
import '../types/fqnRef.mjs';
|
|
14
|
-
import '../shared/core.
|
|
15
|
-
import '../shared/core.
|
|
13
|
+
import '../shared/core.CDdf8izT.mjs';
|
|
14
|
+
import '../shared/core.DE-g9oFF.mjs';
|
|
16
15
|
import '../types/expression-model.mjs';
|
|
16
|
+
import '../shared/core.BPGOjone.mjs';
|
|
17
17
|
import '../shared/core.CywrQs86.mjs';
|
|
18
|
+
import '../shared/core.5gPDaaG5.mjs';
|
|
18
19
|
|
|
19
20
|
type AnyModel<A extends Any> = DeploymentNodeModel<A> | DeployedInstanceModel<A> | DeploymentRelationModel<A> | AnyRelationshipModel<A> | NestedElementOfDeployedInstanceModel<A> | ElementModel<A> | RelationshipModel<A> | LikeC4ViewModel<A> | NodeModel<A> | EdgeModel<A>;
|
|
20
21
|
declare function isDeploymentNodeModel<M extends Any>(model: AnyModel<M>): model is DeploymentNodeModel<M>;
|
|
@@ -53,18 +54,4 @@ declare const getViewFolderPath: (title: string) => string | null;
|
|
|
53
54
|
*/
|
|
54
55
|
declare const extractViewTitleFromPath: (title: string) => string;
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
* Proof-of-concept
|
|
58
|
-
* Use layout from the snapshot, and 'safe'-apply style properties from the `autoLayouted` view
|
|
59
|
-
*
|
|
60
|
-
* @param autoLayouted Auto-layouted view
|
|
61
|
-
* @param snapshot The view snapshot with manual-layout
|
|
62
|
-
* @returns The snapshot with the next view applied
|
|
63
|
-
*/
|
|
64
|
-
declare function applyManualLayout<V extends LayoutedView>(autoLayouted: V, snapshot: ViewManualLayoutSnapshot): V;
|
|
65
|
-
/**
|
|
66
|
-
* Applies drift reasons to autoLayouted view if there are any.
|
|
67
|
-
*/
|
|
68
|
-
declare function applyLayoutDriftReasons<V extends LayoutedView>(autoLayouted: V, snapshot: ViewManualLayoutSnapshot): V;
|
|
69
|
-
|
|
70
|
-
export { AnyRelationshipModel, DeployedInstanceModel, DeploymentElementModel, DeploymentNodeModel, DeploymentRelationModel, EdgeModel, ElementModel, LikeC4ViewModel, NodeModel, RelationshipModel, VIEW_FOLDERS_SEPARATOR, applyLayoutDriftReasons, applyManualLayout, extractViewTitleFromPath, getViewFolderPath, isDeployedInstanceModel, isDeploymentElementModel, isDeploymentNodeModel, isDeploymentRelationModel, isEdgeModel, isElementModel, isLikeC4ViewModel, isRelationModel as isModelRelation, isNestedElementOfDeployedInstanceModel, isNodeModel, isRelationModel, isRelationModel as isRelationshipModel, normalizeViewPath };
|
|
57
|
+
export { AnyRelationshipModel, DeployedInstanceModel, DeploymentElementModel, DeploymentNodeModel, DeploymentRelationModel, EdgeModel, ElementModel, LikeC4ViewModel, NodeModel, RelationshipModel, VIEW_FOLDERS_SEPARATOR, extractViewTitleFromPath, getViewFolderPath, isDeployedInstanceModel, isDeploymentElementModel, isDeploymentNodeModel, isDeploymentRelationModel, isEdgeModel, isElementModel, isLikeC4ViewModel, isRelationModel as isModelRelation, isNestedElementOfDeployedInstanceModel, isNodeModel, isRelationModel, isRelationModel as isRelationshipModel, normalizeViewPath };
|
package/dist/model/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { b as DeployedInstanceModel, D as DeploymentConnectionModel, a as DeploymentNodeModel, c as DeploymentRelationModel, R as RelationshipsAccum, d as deploymentConnection } from '../shared/core.
|
|
3
|
-
export { C as Connection } from '../shared/core.
|
|
4
|
-
export { C as ConnectionModel, d as differenceConnections, f as findAscendingConnections, a as findDeepestNestedConnection, b as findDescendantConnections, h as hasSameSource, c as hasSameSourceTarget, e as hasSameTarget, i as isAnyInOut, g as isIncoming, j as isNestedConnection, k as isOutgoing, m as mergeConnections, n as modelConnection, s as sortConnectionsByBoundaryHierarchy, l as sortDeepestFirst } from '../shared/core.
|
|
1
|
+
export { g as EdgeModel, E as ElementModel, f as LikeC4DeploymentModel, L as LikeC4Model, h as LikeC4ViewModel, j as LikeC4ViewsFolder, N as NodeModel, R as RelationshipModel, V as VIEW_FOLDERS_SEPARATOR, k as extractViewTitleFromPath, l as getViewFolderPath, c as isDeployedInstanceModel, e as isDeploymentElementModel, d as isDeploymentNodeModel, m as isDeploymentRelationModel, r as isEdgeModel, i as isElementModel, p as isLikeC4ViewModel, o as isModelRelation, b as isNestedElementOfDeployedInstanceModel, q as isNodeModel, o as isRelationModel, o as isRelationshipModel, n as normalizeViewPath } from '../shared/core.DU8pv3Q6.mjs';
|
|
2
|
+
export { b as DeployedInstanceModel, D as DeploymentConnectionModel, a as DeploymentNodeModel, c as DeploymentRelationModel, R as RelationshipsAccum, d as deploymentConnection } from '../shared/core.DbQpDoJS.mjs';
|
|
3
|
+
export { C as Connection } from '../shared/core.DqlrMlsf.mjs';
|
|
4
|
+
export { C as ConnectionModel, d as differenceConnections, f as findAscendingConnections, a as findDeepestNestedConnection, b as findDescendantConnections, h as hasSameSource, c as hasSameSourceTarget, e as hasSameTarget, i as isAnyInOut, g as isIncoming, j as isNestedConnection, k as isOutgoing, m as mergeConnections, n as modelConnection, s as sortConnectionsByBoundaryHierarchy, l as sortDeepestFirst } from '../shared/core.CQPEY2wQ.mjs';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { g as getDefaultExportFromCjs } from './core.B85MJLTf.mjs';
|
|
2
|
-
import { e } from './core.CqAJJpK_.mjs';
|
|
2
|
+
import { e as e$1 } from './core.CqAJJpK_.mjs';
|
|
3
|
+
|
|
4
|
+
const e={done:true,hasNext:false},t$1={done:false,hasNext:false},n$1=()=>e;
|
|
5
|
+
|
|
6
|
+
function t(e,...t){let a=e,o=t.map(e=>`lazy`in e?r(e):void 0),s=0;for(;s<t.length;){if(o[s]===void 0||!i(a)){let e=t[s];a=e(a),s+=1;continue}let e=[];for(let n=s;n<t.length;n++){let t=o[n];if(t===void 0||(e.push(t),t.isSingle))break}let r=[];for(let t of a)if(n(t,r,e))break;let{isSingle:c}=e.at(-1);a=c?r[0]:r,s+=e.length;}return a}function n(t,r,i){if(i.length===0)return r.push(t),false;let a=t,o=t$1,s=false;for(let[e,t]of i.entries()){let{index:c,items:l}=t;if(l.push(a),o=t(a,c,l),t.index+=1,o.hasNext){if(o.hasMany??false){for(let t of o.next)if(n(t,r,i.slice(e+1)))return true;return s}a=o.next;}if(!o.hasNext)break;o.done&&(s=true);}return o.hasNext&&r.push(a),s}function r(e){let{lazy:t,lazyArgs:n}=e,r=t(...n);return Object.assign(r,{isSingle:t.single??false,index:0,items:[]})}function i(e){return typeof e==`string`||typeof e==`object`&&!!e&&Symbol.iterator in e}
|
|
3
7
|
|
|
4
8
|
var naturalCompareLite = {exports: {}};
|
|
5
9
|
|
|
@@ -70,13 +74,13 @@ const compare = /*@__PURE__*/getDefaultExportFromCjs(naturalCompareLiteExports);
|
|
|
70
74
|
|
|
71
75
|
function compareNatural(a, b) {
|
|
72
76
|
if (a === b) return 0;
|
|
73
|
-
if (e(a)) {
|
|
74
|
-
if (e(b)) {
|
|
77
|
+
if (e$1(a)) {
|
|
78
|
+
if (e$1(b)) {
|
|
75
79
|
return compare(a, b);
|
|
76
80
|
}
|
|
77
81
|
return 1;
|
|
78
82
|
}
|
|
79
|
-
return e(b) ? -1 : 0;
|
|
83
|
+
return e$1(b) ? -1 : 0;
|
|
80
84
|
}
|
|
81
85
|
function compareNaturalHierarchically(separator = ".", deepestFirst = false) {
|
|
82
86
|
return (a, b) => {
|
|
@@ -99,4 +103,4 @@ function compareNaturalHierarchically(separator = ".", deepestFirst = false) {
|
|
|
99
103
|
};
|
|
100
104
|
}
|
|
101
105
|
|
|
102
|
-
export {
|
|
106
|
+
export { t$1 as a, compareNaturalHierarchically as b, compareNatural as c, n$1 as n, t };
|