likec4 1.43.0 → 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__app__/src/likec4.js +4877 -5442
- package/__app__/src/main.js +61 -43
- package/__app__/src/style.css +1 -1
- package/__app__/src/vendors.js +6462 -27420
- package/__app__/src/webcomponent.js +1 -1
- package/config/schema.json +68 -227
- package/dist/cli/index.mjs +543 -542
- package/dist/config/index.d.mts +1 -1
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/shared/{likec4.VWjIqhhl.d.mts → likec4.97TpL3Hf.d.mts} +10815 -2419
- package/dist/shared/{likec4.DvPKV9S-.mjs → likec4.BSr9pG1Z.mjs} +2226 -2244
- package/dist/shared/{likec4.CWfMOOnG.mjs → likec4.CXaeDwoC.mjs} +1 -1
- package/dist/shared/likec4.CyRRoRaV.d.mts +4040 -0
- package/dist/shared/likec4.H8IcXBiE.mjs +177 -0
- package/dist/vite-plugin/index.d.mts +3 -3
- package/dist/vite-plugin/index.mjs +1 -1
- package/package.json +27 -26
- package/react/index.d.ts +3595 -1683
- package/react/index.js +7645 -4622
- package/dist/shared/likec4.CQWzqezS.d.mts +0 -6808
- package/dist/shared/likec4.DtL27jG4.mjs +0 -548
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { LikeC4View as LikeC4View$1 } from "likec4:react";
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
4
|
import { ComponentName } from "./const.js";
|
|
5
|
-
import {
|
|
5
|
+
import { dj as object, dk as literal, dl as stringbool, dm as string, dn as formatError } from "./vendors.js";
|
|
6
6
|
const propsSchema = object({
|
|
7
7
|
viewId: string().default("index"),
|
|
8
8
|
browser: stringbool().default(!0),
|
package/config/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"description": "LikeC4 project configuration",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
@@ -31,11 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"styles": {
|
|
34
|
-
"
|
|
35
|
-
{
|
|
36
|
-
"$ref": "#/definitions/StylesConfiguration"
|
|
37
|
-
}
|
|
38
|
-
]
|
|
34
|
+
"$ref": "#/$defs/StylesConfiguration"
|
|
39
35
|
},
|
|
40
36
|
"exclude": {
|
|
41
37
|
"description": "List of file patterns to exclude from the project, default is [\"**/node_modules/**\"]",
|
|
@@ -43,30 +39,25 @@
|
|
|
43
39
|
"items": {
|
|
44
40
|
"type": "string"
|
|
45
41
|
}
|
|
42
|
+
},
|
|
43
|
+
"manualLayouts": {
|
|
44
|
+
"$ref": "#/$defs/manual-layouts-config"
|
|
46
45
|
}
|
|
47
46
|
},
|
|
48
47
|
"required": [
|
|
49
48
|
"name"
|
|
50
49
|
],
|
|
51
|
-
"
|
|
50
|
+
"$defs": {
|
|
52
51
|
"StylesConfiguration": {
|
|
53
52
|
"id": "StylesConfiguration",
|
|
54
53
|
"description": "Project styles customization",
|
|
55
54
|
"type": "object",
|
|
56
55
|
"properties": {
|
|
57
56
|
"theme": {
|
|
58
|
-
"
|
|
59
|
-
{
|
|
60
|
-
"$ref": "#/definitions/ThemeCustomization"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
57
|
+
"$ref": "#/$defs/ThemeCustomization"
|
|
63
58
|
},
|
|
64
59
|
"defaults": {
|
|
65
|
-
"
|
|
66
|
-
{
|
|
67
|
-
"$ref": "#/definitions/DefaultStyleValues"
|
|
68
|
-
}
|
|
69
|
-
]
|
|
60
|
+
"$ref": "#/$defs/DefaultStyleValues"
|
|
70
61
|
}
|
|
71
62
|
},
|
|
72
63
|
"additionalProperties": false
|
|
@@ -77,18 +68,10 @@
|
|
|
77
68
|
"type": "object",
|
|
78
69
|
"properties": {
|
|
79
70
|
"colors": {
|
|
80
|
-
"
|
|
81
|
-
{
|
|
82
|
-
"$ref": "#/definitions/ThemeColors"
|
|
83
|
-
}
|
|
84
|
-
]
|
|
71
|
+
"$ref": "#/$defs/ThemeColors"
|
|
85
72
|
},
|
|
86
73
|
"sizes": {
|
|
87
|
-
"
|
|
88
|
-
{
|
|
89
|
-
"$ref": "#/definitions/ThemeSizes"
|
|
90
|
-
}
|
|
91
|
-
]
|
|
74
|
+
"$ref": "#/$defs/ThemeSizes"
|
|
92
75
|
}
|
|
93
76
|
},
|
|
94
77
|
"additionalProperties": false
|
|
@@ -100,95 +83,47 @@
|
|
|
100
83
|
{
|
|
101
84
|
"type": "object",
|
|
102
85
|
"propertyNames": {
|
|
103
|
-
"$ref": "
|
|
86
|
+
"$ref": "#/$defs/ColorName"
|
|
104
87
|
},
|
|
105
88
|
"additionalProperties": {
|
|
106
|
-
"
|
|
107
|
-
{
|
|
108
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
109
|
-
}
|
|
110
|
-
]
|
|
89
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
111
90
|
}
|
|
112
91
|
},
|
|
113
92
|
{
|
|
114
93
|
"type": "object",
|
|
115
94
|
"properties": {
|
|
116
95
|
"amber": {
|
|
117
|
-
"
|
|
118
|
-
{
|
|
119
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
120
|
-
}
|
|
121
|
-
]
|
|
96
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
122
97
|
},
|
|
123
98
|
"blue": {
|
|
124
|
-
"
|
|
125
|
-
{
|
|
126
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
127
|
-
}
|
|
128
|
-
]
|
|
99
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
129
100
|
},
|
|
130
101
|
"gray": {
|
|
131
|
-
"
|
|
132
|
-
{
|
|
133
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
134
|
-
}
|
|
135
|
-
]
|
|
102
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
136
103
|
},
|
|
137
104
|
"slate": {
|
|
138
|
-
"
|
|
139
|
-
{
|
|
140
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
141
|
-
}
|
|
142
|
-
]
|
|
105
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
143
106
|
},
|
|
144
107
|
"green": {
|
|
145
|
-
"
|
|
146
|
-
{
|
|
147
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
148
|
-
}
|
|
149
|
-
]
|
|
108
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
150
109
|
},
|
|
151
110
|
"indigo": {
|
|
152
|
-
"
|
|
153
|
-
{
|
|
154
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
155
|
-
}
|
|
156
|
-
]
|
|
111
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
157
112
|
},
|
|
158
113
|
"muted": {
|
|
159
|
-
"
|
|
160
|
-
{
|
|
161
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
162
|
-
}
|
|
163
|
-
]
|
|
114
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
164
115
|
},
|
|
165
116
|
"primary": {
|
|
166
|
-
"
|
|
167
|
-
{
|
|
168
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
169
|
-
}
|
|
170
|
-
]
|
|
117
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
171
118
|
},
|
|
172
119
|
"red": {
|
|
173
|
-
"
|
|
174
|
-
{
|
|
175
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
176
|
-
}
|
|
177
|
-
]
|
|
120
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
178
121
|
},
|
|
179
122
|
"secondary": {
|
|
180
|
-
"
|
|
181
|
-
{
|
|
182
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
183
|
-
}
|
|
184
|
-
]
|
|
123
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
185
124
|
},
|
|
186
125
|
"sky": {
|
|
187
|
-
"
|
|
188
|
-
{
|
|
189
|
-
"$ref": "#/definitions/ThemeColorValues"
|
|
190
|
-
}
|
|
191
|
-
]
|
|
126
|
+
"$ref": "#/$defs/ThemeColorValues"
|
|
192
127
|
}
|
|
193
128
|
}
|
|
194
129
|
}
|
|
@@ -198,7 +133,7 @@
|
|
|
198
133
|
"id": "ColorName",
|
|
199
134
|
"anyOf": [
|
|
200
135
|
{
|
|
201
|
-
"$ref": "
|
|
136
|
+
"$ref": "#/$defs/ThemeColor"
|
|
202
137
|
},
|
|
203
138
|
{
|
|
204
139
|
"type": "string",
|
|
@@ -228,7 +163,7 @@
|
|
|
228
163
|
"description": "Exact value (hex, rgb, rgba, hsl, hsla ...) or break down of specific color values",
|
|
229
164
|
"anyOf": [
|
|
230
165
|
{
|
|
231
|
-
"$ref": "
|
|
166
|
+
"$ref": "#/$defs/ColorLiteral"
|
|
232
167
|
},
|
|
233
168
|
{
|
|
234
169
|
"type": "object",
|
|
@@ -237,14 +172,10 @@
|
|
|
237
172
|
"description": "Element color value (or a breakdown of specific color values)",
|
|
238
173
|
"anyOf": [
|
|
239
174
|
{
|
|
240
|
-
"$ref": "
|
|
175
|
+
"$ref": "#/$defs/ColorLiteral"
|
|
241
176
|
},
|
|
242
177
|
{
|
|
243
|
-
"
|
|
244
|
-
{
|
|
245
|
-
"$ref": "#/definitions/ElementColorValues"
|
|
246
|
-
}
|
|
247
|
-
]
|
|
178
|
+
"$ref": "#/$defs/ElementColorValues"
|
|
248
179
|
}
|
|
249
180
|
]
|
|
250
181
|
},
|
|
@@ -252,14 +183,10 @@
|
|
|
252
183
|
"description": "Relationship color value (or a breakdown of specific color values)",
|
|
253
184
|
"anyOf": [
|
|
254
185
|
{
|
|
255
|
-
"$ref": "
|
|
186
|
+
"$ref": "#/$defs/ColorLiteral"
|
|
256
187
|
},
|
|
257
188
|
{
|
|
258
|
-
"
|
|
259
|
-
{
|
|
260
|
-
"$ref": "#/definitions/RelationshipColorValues"
|
|
261
|
-
}
|
|
262
|
-
]
|
|
189
|
+
"$ref": "#/$defs/RelationshipColorValues"
|
|
263
190
|
}
|
|
264
191
|
]
|
|
265
192
|
}
|
|
@@ -284,35 +211,19 @@
|
|
|
284
211
|
"properties": {
|
|
285
212
|
"fill": {
|
|
286
213
|
"description": "Background color",
|
|
287
|
-
"
|
|
288
|
-
{
|
|
289
|
-
"$ref": "#/definitions/ColorLiteral"
|
|
290
|
-
}
|
|
291
|
-
]
|
|
214
|
+
"$ref": "#/$defs/ColorLiteral"
|
|
292
215
|
},
|
|
293
216
|
"stroke": {
|
|
294
217
|
"description": "Stroke color (border, paths above background)",
|
|
295
|
-
"
|
|
296
|
-
{
|
|
297
|
-
"$ref": "#/definitions/ColorLiteral"
|
|
298
|
-
}
|
|
299
|
-
]
|
|
218
|
+
"$ref": "#/$defs/ColorLiteral"
|
|
300
219
|
},
|
|
301
220
|
"hiContrast": {
|
|
302
221
|
"description": "High contrast text color (title)",
|
|
303
|
-
"
|
|
304
|
-
{
|
|
305
|
-
"$ref": "#/definitions/ColorLiteral"
|
|
306
|
-
}
|
|
307
|
-
]
|
|
222
|
+
"$ref": "#/$defs/ColorLiteral"
|
|
308
223
|
},
|
|
309
224
|
"loContrast": {
|
|
310
225
|
"description": "Low contrast text color (description)",
|
|
311
|
-
"
|
|
312
|
-
{
|
|
313
|
-
"$ref": "#/definitions/ColorLiteral"
|
|
314
|
-
}
|
|
315
|
-
]
|
|
226
|
+
"$ref": "#/$defs/ColorLiteral"
|
|
316
227
|
}
|
|
317
228
|
},
|
|
318
229
|
"required": [
|
|
@@ -329,27 +240,15 @@
|
|
|
329
240
|
"properties": {
|
|
330
241
|
"line": {
|
|
331
242
|
"description": "Line color",
|
|
332
|
-
"
|
|
333
|
-
{
|
|
334
|
-
"$ref": "#/definitions/ColorLiteral"
|
|
335
|
-
}
|
|
336
|
-
]
|
|
243
|
+
"$ref": "#/$defs/ColorLiteral"
|
|
337
244
|
},
|
|
338
245
|
"label": {
|
|
339
246
|
"description": "Label text color",
|
|
340
|
-
"
|
|
341
|
-
{
|
|
342
|
-
"$ref": "#/definitions/ColorLiteral"
|
|
343
|
-
}
|
|
344
|
-
]
|
|
247
|
+
"$ref": "#/$defs/ColorLiteral"
|
|
345
248
|
},
|
|
346
249
|
"labelBg": {
|
|
347
250
|
"description": "Label background color",
|
|
348
|
-
"
|
|
349
|
-
{
|
|
350
|
-
"$ref": "#/definitions/ColorLiteral"
|
|
351
|
-
}
|
|
352
|
-
]
|
|
251
|
+
"$ref": "#/$defs/ColorLiteral"
|
|
353
252
|
}
|
|
354
253
|
},
|
|
355
254
|
"required": [
|
|
@@ -364,39 +263,19 @@
|
|
|
364
263
|
"type": "object",
|
|
365
264
|
"properties": {
|
|
366
265
|
"xs": {
|
|
367
|
-
"
|
|
368
|
-
{
|
|
369
|
-
"$ref": "#/definitions/Dimensions"
|
|
370
|
-
}
|
|
371
|
-
]
|
|
266
|
+
"$ref": "#/$defs/Dimensions"
|
|
372
267
|
},
|
|
373
268
|
"sm": {
|
|
374
|
-
"
|
|
375
|
-
{
|
|
376
|
-
"$ref": "#/definitions/Dimensions"
|
|
377
|
-
}
|
|
378
|
-
]
|
|
269
|
+
"$ref": "#/$defs/Dimensions"
|
|
379
270
|
},
|
|
380
271
|
"md": {
|
|
381
|
-
"
|
|
382
|
-
{
|
|
383
|
-
"$ref": "#/definitions/Dimensions"
|
|
384
|
-
}
|
|
385
|
-
]
|
|
272
|
+
"$ref": "#/$defs/Dimensions"
|
|
386
273
|
},
|
|
387
274
|
"lg": {
|
|
388
|
-
"
|
|
389
|
-
{
|
|
390
|
-
"$ref": "#/definitions/Dimensions"
|
|
391
|
-
}
|
|
392
|
-
]
|
|
275
|
+
"$ref": "#/$defs/Dimensions"
|
|
393
276
|
},
|
|
394
277
|
"xl": {
|
|
395
|
-
"
|
|
396
|
-
{
|
|
397
|
-
"$ref": "#/definitions/Dimensions"
|
|
398
|
-
}
|
|
399
|
-
]
|
|
278
|
+
"$ref": "#/$defs/Dimensions"
|
|
400
279
|
}
|
|
401
280
|
},
|
|
402
281
|
"additionalProperties": false
|
|
@@ -428,59 +307,31 @@
|
|
|
428
307
|
"properties": {
|
|
429
308
|
"color": {
|
|
430
309
|
"description": "Default color for elements\n(must be a valid color name from the theme)",
|
|
431
|
-
"
|
|
432
|
-
{
|
|
433
|
-
"$ref": "#/definitions/ColorName"
|
|
434
|
-
}
|
|
435
|
-
]
|
|
310
|
+
"$ref": "#/$defs/ColorName"
|
|
436
311
|
},
|
|
437
312
|
"opacity": {
|
|
438
313
|
"description": "Default opacity (0-100%) for elements when displayed as a group (like a container)",
|
|
439
|
-
"
|
|
440
|
-
{
|
|
441
|
-
"$ref": "#/definitions/Opacity"
|
|
442
|
-
}
|
|
443
|
-
]
|
|
314
|
+
"$ref": "#/$defs/Opacity"
|
|
444
315
|
},
|
|
445
316
|
"border": {
|
|
446
317
|
"description": "Default border style for elements when displayed as a group (like a container)",
|
|
447
|
-
"
|
|
448
|
-
{
|
|
449
|
-
"$ref": "#/definitions/BorderStyle"
|
|
450
|
-
}
|
|
451
|
-
]
|
|
318
|
+
"$ref": "#/$defs/BorderStyle"
|
|
452
319
|
},
|
|
453
320
|
"size": {
|
|
454
321
|
"description": "Default size for elements",
|
|
455
|
-
"
|
|
456
|
-
{
|
|
457
|
-
"$ref": "#/definitions/ElementSize"
|
|
458
|
-
}
|
|
459
|
-
]
|
|
322
|
+
"$ref": "#/$defs/ElementSize"
|
|
460
323
|
},
|
|
461
324
|
"shape": {
|
|
462
325
|
"description": "Default shape for elements",
|
|
463
|
-
"
|
|
464
|
-
{
|
|
465
|
-
"$ref": "#/definitions/ElementShape"
|
|
466
|
-
}
|
|
467
|
-
]
|
|
326
|
+
"$ref": "#/$defs/ElementShape"
|
|
468
327
|
},
|
|
469
328
|
"group": {
|
|
470
329
|
"description": "Default style values for groups",
|
|
471
|
-
"
|
|
472
|
-
{
|
|
473
|
-
"$ref": "#/definitions/GroupDefaultStyleValues"
|
|
474
|
-
}
|
|
475
|
-
]
|
|
330
|
+
"$ref": "#/$defs/GroupDefaultStyleValues"
|
|
476
331
|
},
|
|
477
332
|
"relationship": {
|
|
478
333
|
"description": "Default style values for relationships",
|
|
479
|
-
"
|
|
480
|
-
{
|
|
481
|
-
"$ref": "#/definitions/RelationshipDefaultStyleValues"
|
|
482
|
-
}
|
|
483
|
-
]
|
|
334
|
+
"$ref": "#/$defs/RelationshipDefaultStyleValues"
|
|
484
335
|
}
|
|
485
336
|
},
|
|
486
337
|
"additionalProperties": false
|
|
@@ -533,27 +384,15 @@
|
|
|
533
384
|
"properties": {
|
|
534
385
|
"color": {
|
|
535
386
|
"description": "Default color for groups\n(must be a valid color name from the theme)",
|
|
536
|
-
"
|
|
537
|
-
{
|
|
538
|
-
"$ref": "#/definitions/ColorName"
|
|
539
|
-
}
|
|
540
|
-
]
|
|
387
|
+
"$ref": "#/$defs/ColorName"
|
|
541
388
|
},
|
|
542
389
|
"opacity": {
|
|
543
390
|
"description": "Default opacity for groups",
|
|
544
|
-
"
|
|
545
|
-
{
|
|
546
|
-
"$ref": "#/definitions/Opacity"
|
|
547
|
-
}
|
|
548
|
-
]
|
|
391
|
+
"$ref": "#/$defs/Opacity"
|
|
549
392
|
},
|
|
550
393
|
"border": {
|
|
551
394
|
"description": "Default border for groups",
|
|
552
|
-
"
|
|
553
|
-
{
|
|
554
|
-
"$ref": "#/definitions/BorderStyle"
|
|
555
|
-
}
|
|
556
|
-
]
|
|
395
|
+
"$ref": "#/$defs/BorderStyle"
|
|
557
396
|
}
|
|
558
397
|
},
|
|
559
398
|
"additionalProperties": false
|
|
@@ -565,27 +404,15 @@
|
|
|
565
404
|
"properties": {
|
|
566
405
|
"color": {
|
|
567
406
|
"description": "Default color for relationships\n(must be a valid color name from the theme)",
|
|
568
|
-
"
|
|
569
|
-
{
|
|
570
|
-
"$ref": "#/definitions/ColorName"
|
|
571
|
-
}
|
|
572
|
-
]
|
|
407
|
+
"$ref": "#/$defs/ColorName"
|
|
573
408
|
},
|
|
574
409
|
"line": {
|
|
575
410
|
"description": "Default line style for relationships",
|
|
576
|
-
"
|
|
577
|
-
{
|
|
578
|
-
"$ref": "#/definitions/LineType"
|
|
579
|
-
}
|
|
580
|
-
]
|
|
411
|
+
"$ref": "#/$defs/LineType"
|
|
581
412
|
},
|
|
582
413
|
"arrow": {
|
|
583
414
|
"description": "Default arrow style for relationships",
|
|
584
|
-
"
|
|
585
|
-
{
|
|
586
|
-
"$ref": "#/definitions/ArrowType"
|
|
587
|
-
}
|
|
588
|
-
]
|
|
415
|
+
"$ref": "#/$defs/ArrowType"
|
|
589
416
|
}
|
|
590
417
|
},
|
|
591
418
|
"additionalProperties": false
|
|
@@ -614,6 +441,20 @@
|
|
|
614
441
|
"open",
|
|
615
442
|
"vee"
|
|
616
443
|
]
|
|
444
|
+
},
|
|
445
|
+
"manual-layouts-config": {
|
|
446
|
+
"id": "manual-layouts-config",
|
|
447
|
+
"description": "Configuration for manual layouts",
|
|
448
|
+
"type": "object",
|
|
449
|
+
"properties": {
|
|
450
|
+
"outDir": {
|
|
451
|
+
"description": "Path to the directory where manual layouts will be stored, relative to the folder containing the project config",
|
|
452
|
+
"type": "string"
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"required": [
|
|
456
|
+
"outDir"
|
|
457
|
+
]
|
|
617
458
|
}
|
|
618
459
|
}
|
|
619
460
|
}
|