likec4 1.42.0 → 1.43.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.
@@ -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 { dt as object, du as literal, dv as stringbool, dw as string, dx as formatError } from "./vendors.js";
5
+ import { dv as object, dw as literal, dx as stringbool, dy as string, dz as formatError } from "./vendors.js";
6
6
  const propsSchema = object({
7
7
  viewId: string().default("index"),
8
8
  browser: stringbool().default(!0),
@@ -68,7 +68,8 @@
68
68
  }
69
69
  ]
70
70
  }
71
- }
71
+ },
72
+ "additionalProperties": false
72
73
  },
73
74
  "ThemeCustomization": {
74
75
  "id": "ThemeCustomization",
@@ -83,51 +84,18 @@
83
84
  ]
84
85
  },
85
86
  "sizes": {
86
- "description": "Map of theme sizes.",
87
- "type": "object",
88
- "properties": {
89
- "xs": {
90
- "allOf": [
91
- {
92
- "$ref": "#/definitions/Dimensions"
93
- }
94
- ]
95
- },
96
- "sm": {
97
- "allOf": [
98
- {
99
- "$ref": "#/definitions/Dimensions"
100
- }
101
- ]
102
- },
103
- "md": {
104
- "allOf": [
105
- {
106
- "$ref": "#/definitions/Dimensions"
107
- }
108
- ]
109
- },
110
- "lg": {
111
- "allOf": [
112
- {
113
- "$ref": "#/definitions/Dimensions"
114
- }
115
- ]
116
- },
117
- "xl": {
118
- "allOf": [
119
- {
120
- "$ref": "#/definitions/Dimensions"
121
- }
122
- ]
87
+ "allOf": [
88
+ {
89
+ "$ref": "#/definitions/ThemeSizes"
123
90
  }
124
- }
91
+ ]
125
92
  }
126
- }
93
+ },
94
+ "additionalProperties": false
127
95
  },
128
96
  "ThemeColors": {
129
97
  "id": "ThemeColors",
130
- "description": "Override of theme colors",
98
+ "description": "Override theme colors",
131
99
  "anyOf": [
132
100
  {
133
101
  "type": "object",
@@ -228,7 +196,6 @@
228
196
  },
229
197
  "ColorName": {
230
198
  "id": "ColorName",
231
- "description": "Color name (Theme color name or custom color name)",
232
199
  "anyOf": [
233
200
  {
234
201
  "$ref": "#/definitions/ThemeColor"
@@ -241,7 +208,6 @@
241
208
  },
242
209
  "ThemeColor": {
243
210
  "id": "ThemeColor",
244
- "description": "Reserved theme color name",
245
211
  "type": "string",
246
212
  "enum": [
247
213
  "amber",
@@ -268,6 +234,7 @@
268
234
  "type": "object",
269
235
  "properties": {
270
236
  "elements": {
237
+ "description": "Element color value (or a breakdown of specific color values)",
271
238
  "anyOf": [
272
239
  {
273
240
  "$ref": "#/definitions/ColorLiteral"
@@ -282,6 +249,7 @@
282
249
  ]
283
250
  },
284
251
  "relationships": {
252
+ "description": "Relationship color value (or a breakdown of specific color values)",
285
253
  "anyOf": [
286
254
  {
287
255
  "$ref": "#/definitions/ColorLiteral"
@@ -299,7 +267,8 @@
299
267
  "required": [
300
268
  "elements",
301
269
  "relationships"
302
- ]
270
+ ],
271
+ "additionalProperties": false
303
272
  }
304
273
  ]
305
274
  },
@@ -311,7 +280,6 @@
311
280
  },
312
281
  "ElementColorValues": {
313
282
  "id": "ElementColorValues",
314
- "description": "Specific element colors",
315
283
  "type": "object",
316
284
  "properties": {
317
285
  "fill": {
@@ -352,11 +320,11 @@
352
320
  "stroke",
353
321
  "hiContrast",
354
322
  "loContrast"
355
- ]
323
+ ],
324
+ "additionalProperties": false
356
325
  },
357
326
  "RelationshipColorValues": {
358
327
  "id": "RelationshipColorValues",
359
- "description": "Specefic relationship colors",
360
328
  "type": "object",
361
329
  "properties": {
362
330
  "line": {
@@ -387,7 +355,51 @@
387
355
  "required": [
388
356
  "line",
389
357
  "label"
390
- ]
358
+ ],
359
+ "additionalProperties": false
360
+ },
361
+ "ThemeSizes": {
362
+ "id": "ThemeSizes",
363
+ "description": "Override theme sizes",
364
+ "type": "object",
365
+ "properties": {
366
+ "xs": {
367
+ "allOf": [
368
+ {
369
+ "$ref": "#/definitions/Dimensions"
370
+ }
371
+ ]
372
+ },
373
+ "sm": {
374
+ "allOf": [
375
+ {
376
+ "$ref": "#/definitions/Dimensions"
377
+ }
378
+ ]
379
+ },
380
+ "md": {
381
+ "allOf": [
382
+ {
383
+ "$ref": "#/definitions/Dimensions"
384
+ }
385
+ ]
386
+ },
387
+ "lg": {
388
+ "allOf": [
389
+ {
390
+ "$ref": "#/definitions/Dimensions"
391
+ }
392
+ ]
393
+ },
394
+ "xl": {
395
+ "allOf": [
396
+ {
397
+ "$ref": "#/definitions/Dimensions"
398
+ }
399
+ ]
400
+ }
401
+ },
402
+ "additionalProperties": false
391
403
  },
392
404
  "Dimensions": {
393
405
  "id": "Dimensions",
@@ -395,16 +407,19 @@
395
407
  "type": "object",
396
408
  "properties": {
397
409
  "width": {
398
- "type": "number"
410
+ "type": "number",
411
+ "minimum": 50
399
412
  },
400
413
  "height": {
401
- "type": "number"
414
+ "type": "number",
415
+ "minimum": 50
402
416
  }
403
417
  },
404
418
  "required": [
405
419
  "width",
406
420
  "height"
407
- ]
421
+ ],
422
+ "additionalProperties": false
408
423
  },
409
424
  "DefaultStyleValues": {
410
425
  "id": "DefaultStyleValues",
@@ -412,6 +427,7 @@
412
427
  "type": "object",
413
428
  "properties": {
414
429
  "color": {
430
+ "description": "Default color for elements\n(must be a valid color name from the theme)",
415
431
  "allOf": [
416
432
  {
417
433
  "$ref": "#/definitions/ColorName"
@@ -419,6 +435,7 @@
419
435
  ]
420
436
  },
421
437
  "opacity": {
438
+ "description": "Default opacity (0-100%) for elements when displayed as a group (like a container)",
422
439
  "allOf": [
423
440
  {
424
441
  "$ref": "#/definitions/Opacity"
@@ -426,6 +443,7 @@
426
443
  ]
427
444
  },
428
445
  "border": {
446
+ "description": "Default border style for elements when displayed as a group (like a container)",
429
447
  "allOf": [
430
448
  {
431
449
  "$ref": "#/definitions/BorderStyle"
@@ -433,6 +451,7 @@
433
451
  ]
434
452
  },
435
453
  "size": {
454
+ "description": "Default size for elements",
436
455
  "allOf": [
437
456
  {
438
457
  "$ref": "#/definitions/ElementSize"
@@ -440,6 +459,7 @@
440
459
  ]
441
460
  },
442
461
  "shape": {
462
+ "description": "Default shape for elements",
443
463
  "allOf": [
444
464
  {
445
465
  "$ref": "#/definitions/ElementShape"
@@ -447,69 +467,33 @@
447
467
  ]
448
468
  },
449
469
  "group": {
450
- "type": "object",
451
- "properties": {
452
- "color": {
453
- "allOf": [
454
- {
455
- "$ref": "#/definitions/ColorName"
456
- }
457
- ]
458
- },
459
- "opacity": {
460
- "allOf": [
461
- {
462
- "$ref": "#/definitions/Opacity"
463
- }
464
- ]
465
- },
466
- "border": {
467
- "allOf": [
468
- {
469
- "$ref": "#/definitions/BorderStyle"
470
- }
471
- ]
470
+ "description": "Default style values for groups",
471
+ "allOf": [
472
+ {
473
+ "$ref": "#/definitions/GroupDefaultStyleValues"
472
474
  }
473
- }
475
+ ]
474
476
  },
475
477
  "relationship": {
476
- "type": "object",
477
- "properties": {
478
- "color": {
479
- "allOf": [
480
- {
481
- "$ref": "#/definitions/ColorName"
482
- }
483
- ]
484
- },
485
- "line": {
486
- "allOf": [
487
- {
488
- "$ref": "#/definitions/LineType"
489
- }
490
- ]
491
- },
492
- "arrow": {
493
- "allOf": [
494
- {
495
- "$ref": "#/definitions/ArrowType"
496
- }
497
- ]
478
+ "description": "Default style values for relationships",
479
+ "allOf": [
480
+ {
481
+ "$ref": "#/definitions/RelationshipDefaultStyleValues"
498
482
  }
499
- }
483
+ ]
500
484
  }
501
- }
485
+ },
486
+ "additionalProperties": false
502
487
  },
503
488
  "Opacity": {
504
489
  "id": "Opacity",
505
- "description": "Opacity 0%-100%",
506
- "type": "number",
490
+ "description": "Opacity 0-100%",
491
+ "type": "integer",
507
492
  "minimum": 0,
508
493
  "maximum": 100
509
494
  },
510
495
  "BorderStyle": {
511
496
  "id": "BorderStyle",
512
- "description": "Border style",
513
497
  "type": "string",
514
498
  "enum": [
515
499
  "solid",
@@ -520,7 +504,6 @@
520
504
  },
521
505
  "ElementSize": {
522
506
  "id": "ElementSize",
523
- "description": "Element size",
524
507
  "type": "string",
525
508
  "enum": [
526
509
  "xs",
@@ -532,7 +515,6 @@
532
515
  },
533
516
  "ElementShape": {
534
517
  "id": "ElementShape",
535
- "description": "Element shape",
536
518
  "type": "string",
537
519
  "enum": [
538
520
  "rectangle",
@@ -544,9 +526,72 @@
544
526
  "queue"
545
527
  ]
546
528
  },
529
+ "GroupDefaultStyleValues": {
530
+ "id": "GroupDefaultStyleValues",
531
+ "description": "Override default values for group style properties\nThese values will be used if such property is not defined",
532
+ "type": "object",
533
+ "properties": {
534
+ "color": {
535
+ "description": "Default color for groups\n(must be a valid color name from the theme)",
536
+ "allOf": [
537
+ {
538
+ "$ref": "#/definitions/ColorName"
539
+ }
540
+ ]
541
+ },
542
+ "opacity": {
543
+ "description": "Default opacity for groups",
544
+ "allOf": [
545
+ {
546
+ "$ref": "#/definitions/Opacity"
547
+ }
548
+ ]
549
+ },
550
+ "border": {
551
+ "description": "Default border for groups",
552
+ "allOf": [
553
+ {
554
+ "$ref": "#/definitions/BorderStyle"
555
+ }
556
+ ]
557
+ }
558
+ },
559
+ "additionalProperties": false
560
+ },
561
+ "RelationshipDefaultStyleValues": {
562
+ "id": "RelationshipDefaultStyleValues",
563
+ "description": "Override default values for relationship style properties\nThese values will be used if such property is not defined",
564
+ "type": "object",
565
+ "properties": {
566
+ "color": {
567
+ "description": "Default color for relationships\n(must be a valid color name from the theme)",
568
+ "allOf": [
569
+ {
570
+ "$ref": "#/definitions/ColorName"
571
+ }
572
+ ]
573
+ },
574
+ "line": {
575
+ "description": "Default line style for relationships",
576
+ "allOf": [
577
+ {
578
+ "$ref": "#/definitions/LineType"
579
+ }
580
+ ]
581
+ },
582
+ "arrow": {
583
+ "description": "Default arrow style for relationships",
584
+ "allOf": [
585
+ {
586
+ "$ref": "#/definitions/ArrowType"
587
+ }
588
+ ]
589
+ }
590
+ },
591
+ "additionalProperties": false
592
+ },
547
593
  "LineType": {
548
594
  "id": "LineType",
549
- "description": "Default line type for relationships",
550
595
  "type": "string",
551
596
  "enum": [
552
597
  "dashed",
@@ -556,7 +601,6 @@
556
601
  },
557
602
  "ArrowType": {
558
603
  "id": "ArrowType",
559
- "description": "Relationship arrow type",
560
604
  "type": "string",
561
605
  "enum": [
562
606
  "none",