bpmn-js 18.24.0 → 18.25.1

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.
@@ -31,8 +31,12 @@
31
31
  --breadcrumbs-font-family: var(--bjs-font-family);
32
32
  --breadcrumbs-item-color: var(--color-blue-205-100-50);
33
33
  --breadcrumbs-arrow-color: var(--color-black);
34
+ --breadcrumbs-background-color: var(--color-grey-225-10-97);
35
+ --breadcrumbs-border-color: var(--color-grey-225-10-75);
36
+ --breadcrumbs-focus-outline-color: var(--color-blue-205-100-50);
34
37
  --drilldown-fill-color: var(--color-white);
35
38
  --drilldown-background-color: var(--color-blue-205-100-50);
39
+ --drilldown-focus-outline-color: var(--color-blue-205-100-50);
36
40
  }
37
41
 
38
42
  .bjs-breadcrumbs {
@@ -40,13 +44,17 @@
40
44
  display: none;
41
45
  flex-wrap: wrap;
42
46
  align-items: center;
43
- top: 30px;
44
- left: 30px;
45
- padding: 0px;
47
+ top: 20px;
48
+ left: 20px;
49
+ padding: 5px 10px;
46
50
  margin: 0px;
47
51
  font-family: var(--breadcrumbs-font-family);
48
52
  font-size: 16px;
49
53
  line-height: normal;
54
+ background-color: var(--breadcrumbs-background-color);
55
+ border: solid 1px var(--breadcrumbs-border-color);
56
+ border-radius: 2px;
57
+ row-gap: 5px;
50
58
  }
51
59
 
52
60
  .bjs-breadcrumbs-shown .bjs-breadcrumbs {
@@ -63,18 +71,18 @@
63
71
 
64
72
  .bjs-breadcrumbs li {
65
73
  display: inline-flex;
66
- padding-bottom: 5px;
67
74
  align-items: center;
68
75
  }
69
76
 
70
- .bjs-breadcrumbs li a {
77
+ .bjs-breadcrumbs a.bjs-crumb {
71
78
  cursor: pointer;
72
79
  color: var(--breadcrumbs-item-color);
80
+ text-decoration: none;
73
81
  }
74
82
 
75
- .bjs-breadcrumbs li:last-of-type a {
76
- color: inherit;
77
- cursor: default;
83
+ .bjs-breadcrumbs a.bjs-crumb:focus-visible {
84
+ outline: solid 1px var(--breadcrumbs-focus-outline-color);
85
+ outline-offset: 1px;
78
86
  }
79
87
 
80
88
  .bjs-breadcrumbs li:not(:first-child)::before {
@@ -102,12 +110,16 @@
102
110
  cursor: pointer;
103
111
  border: none;
104
112
  border-radius: 2px;
105
- outline: none;
106
113
 
107
114
  fill: var(--drilldown-fill-color);
108
115
  background-color: var(--drilldown-background-color);
109
116
  }
110
117
 
118
+ .bjs-drilldown:focus-visible {
119
+ outline: solid 1px var(--drilldown-focus-outline-color);
120
+ outline-offset: 1px;
121
+ }
122
+
111
123
  .bjs-drilldown-empty {
112
124
  display: none;
113
125
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-modeler v18.24.0
2
+ * bpmn-js - bpmn-modeler v18.25.1
3
3
  *
4
4
  * Copyright (c) 2014-present, camunda Services GmbH
5
5
  *
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * Source Code: https://github.com/bpmn-io/bpmn-js
10
10
  *
11
- * Date: 2026-08-11
11
+ * Date: 2026-08-19
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -23831,14 +23831,7 @@
23831
23831
  return [];
23832
23832
  }
23833
23833
 
23834
- var title = escapeHTML(parent.name || parent.id);
23835
- var link = domify('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
23836
-
23837
- link.addEventListener('click', function() {
23838
- canvas.setRootElement(parentPlane);
23839
- });
23840
-
23841
- return link;
23834
+ return [ { parent: parent, parentPlane: parentPlane } ];
23842
23835
  });
23843
23836
 
23844
23837
  breadcrumbs.innerHTML = '';
@@ -23848,8 +23841,39 @@
23848
23841
 
23849
23842
  containerClasses.toggle(OPEN_CLASS, visible);
23850
23843
 
23851
- path.forEach(function(element) {
23852
- breadcrumbs.appendChild(element);
23844
+ path.forEach(function(entry, index) {
23845
+ var parent = entry.parent,
23846
+ parentPlane = entry.parentPlane,
23847
+ title = escapeHTML(parent.name || parent.id);
23848
+
23849
+ // the last crumb represents the current plane; render it as
23850
+ // plain, non-interactive text
23851
+ var isCurrent = index === path.length - 1;
23852
+
23853
+ var crumb;
23854
+
23855
+ if (isCurrent) {
23856
+ crumb = domify(
23857
+ '<li><span class="bjs-crumb" title="' + title + '">' + title + '</span></li>'
23858
+ );
23859
+ } else {
23860
+
23861
+ // render navigable crumbs as local links so they are focusable
23862
+ // and keyboard-operable
23863
+ var href = '#' + escapeHTML(parent.id);
23864
+
23865
+ crumb = domify(
23866
+ '<li><a class="bjs-crumb" href="' + href + '" title="' + title + '">' + title + '</a></li>'
23867
+ );
23868
+
23869
+ crumb.addEventListener('click', function(event) {
23870
+ event.preventDefault();
23871
+
23872
+ canvas.setRootElement(parentPlane);
23873
+ });
23874
+ }
23875
+
23876
+ breadcrumbs.appendChild(crumb);
23853
23877
  });
23854
23878
  }
23855
23879
 
@@ -50254,6 +50278,182 @@
50254
50278
  return label.get('bounds');
50255
50279
  }
50256
50280
 
50281
+ /**
50282
+ * @typedef {import('diagram-js/lib/util/Types').Dimensions} Dimensions
50283
+ *
50284
+ * @typedef {import('../model/Types').Element} Element
50285
+ * @typedef {import('../model/Types').ModdleElement} ModdleElement
50286
+ */
50287
+
50288
+ /**
50289
+ * Default size of elements without an explicit default.
50290
+ *
50291
+ * @type {Dimensions}
50292
+ */
50293
+ const DEFAULT_SIZE = { width: 100, height: 80 };
50294
+
50295
+ /**
50296
+ * @type {Dimensions}
50297
+ */
50298
+ const DEFAULT_TASK_SIZE = { width: 100, height: 80 };
50299
+
50300
+ /**
50301
+ * @type {Dimensions}
50302
+ */
50303
+ const DEFAULT_GATEWAY_SIZE = { width: 50, height: 50 };
50304
+
50305
+ /**
50306
+ * @type {Dimensions}
50307
+ */
50308
+ const DEFAULT_EVENT_SIZE = { width: 36, height: 36 };
50309
+
50310
+ /**
50311
+ * @type {Dimensions}
50312
+ */
50313
+ const DEFAULT_SUB_PROCESS_SIZE = { width: 350, height: 200 };
50314
+
50315
+ /**
50316
+ * @type {Dimensions}
50317
+ */
50318
+ const DEFAULT_COLLAPSED_SUB_PROCESS_SIZE = { width: 100, height: 80 };
50319
+
50320
+ /**
50321
+ * @type {Dimensions}
50322
+ */
50323
+ const DEFAULT_PARTICIPANT_SIZE = { width: 600, height: 250 };
50324
+
50325
+ /**
50326
+ * @type {Dimensions}
50327
+ */
50328
+ const DEFAULT_VERTICAL_PARTICIPANT_SIZE = { width: 250, height: 600 };
50329
+
50330
+ /**
50331
+ * @type {Dimensions}
50332
+ */
50333
+ const DEFAULT_COLLAPSED_PARTICIPANT_SIZE = { width: 400, height: 60 };
50334
+
50335
+ /**
50336
+ * @type {Dimensions}
50337
+ */
50338
+ const DEFAULT_VERTICAL_COLLAPSED_PARTICIPANT_SIZE = { width: 60, height: 400 };
50339
+
50340
+ /**
50341
+ * @type {Dimensions}
50342
+ */
50343
+ const DEFAULT_LANE_SIZE = { width: 400, height: 100 };
50344
+
50345
+ /**
50346
+ * @type {Dimensions}
50347
+ */
50348
+ const DEFAULT_DATA_OBJECT_REFERENCE_SIZE = { width: 36, height: 50 };
50349
+
50350
+ /**
50351
+ * @type {Dimensions}
50352
+ */
50353
+ const DEFAULT_DATA_STORE_REFERENCE_SIZE = { width: 50, height: 50 };
50354
+
50355
+ /**
50356
+ * @type {Dimensions}
50357
+ */
50358
+ const DEFAULT_TEXT_ANNOTATION_SIZE = { width: 100, height: 40 };
50359
+
50360
+ /**
50361
+ * @type {Dimensions}
50362
+ */
50363
+ const DEFAULT_GROUP_SIZE = { width: 300, height: 300 };
50364
+
50365
+
50366
+ /**
50367
+ * Get the default size of a BPMN element.
50368
+ *
50369
+ * Elements without an explicit default, e.g. `bpmn:CallActivity`, fall back to
50370
+ * `DEFAULT_SIZE`.
50371
+ *
50372
+ * @overlord
50373
+ * @param {Element} element The element.
50374
+ * @param {ModdleElement} [di] The DI; defaults to the DI of the element.
50375
+ *
50376
+ * @return {Dimensions} Default width and height of the element.
50377
+ */
50378
+
50379
+ /**
50380
+ * Get the default size of a BPMN element.
50381
+ *
50382
+ * Elements without an explicit default, e.g. `bpmn:CallActivity`, fall back to
50383
+ * `DEFAULT_SIZE`.
50384
+ *
50385
+ * @param {ModdleElement} element The element.
50386
+ * @param {ModdleElement} di The DI.
50387
+ *
50388
+ * @return {Dimensions} Default width and height of the element.
50389
+ */
50390
+ function getDefaultSize(element, di) {
50391
+
50392
+ const bo = getBusinessObject(element);
50393
+
50394
+ di = di || getDi(element);
50395
+
50396
+ if (is(bo, 'bpmn:SubProcess')) {
50397
+ if (isExpanded(bo, di)) {
50398
+ return { ...DEFAULT_SUB_PROCESS_SIZE };
50399
+ } else {
50400
+ return { ...DEFAULT_COLLAPSED_SUB_PROCESS_SIZE };
50401
+ }
50402
+ }
50403
+
50404
+ if (is(bo, 'bpmn:Task')) {
50405
+ return { ...DEFAULT_TASK_SIZE };
50406
+ }
50407
+
50408
+ if (is(bo, 'bpmn:Gateway')) {
50409
+ return { ...DEFAULT_GATEWAY_SIZE };
50410
+ }
50411
+
50412
+ if (is(bo, 'bpmn:Event')) {
50413
+ return { ...DEFAULT_EVENT_SIZE };
50414
+ }
50415
+
50416
+ if (is(bo, 'bpmn:Participant')) {
50417
+ const isHorizontalPool = !di || di.isHorizontal === undefined || di.isHorizontal === true;
50418
+
50419
+ if (isExpanded(bo, di)) {
50420
+ if (isHorizontalPool) {
50421
+ return { ...DEFAULT_PARTICIPANT_SIZE };
50422
+ }
50423
+
50424
+ return { ...DEFAULT_VERTICAL_PARTICIPANT_SIZE };
50425
+ } else {
50426
+ if (isHorizontalPool) {
50427
+ return { ...DEFAULT_COLLAPSED_PARTICIPANT_SIZE };
50428
+ }
50429
+
50430
+ return { ...DEFAULT_VERTICAL_COLLAPSED_PARTICIPANT_SIZE };
50431
+ }
50432
+ }
50433
+
50434
+ if (is(bo, 'bpmn:Lane')) {
50435
+ return { ...DEFAULT_LANE_SIZE };
50436
+ }
50437
+
50438
+ if (is(bo, 'bpmn:DataObjectReference')) {
50439
+ return { ...DEFAULT_DATA_OBJECT_REFERENCE_SIZE };
50440
+ }
50441
+
50442
+ if (is(bo, 'bpmn:DataStoreReference')) {
50443
+ return { ...DEFAULT_DATA_STORE_REFERENCE_SIZE };
50444
+ }
50445
+
50446
+ if (is(bo, 'bpmn:TextAnnotation')) {
50447
+ return { ...DEFAULT_TEXT_ANNOTATION_SIZE };
50448
+ }
50449
+
50450
+ if (is(bo, 'bpmn:Group')) {
50451
+ return { ...DEFAULT_GROUP_SIZE };
50452
+ }
50453
+
50454
+ return { ...DEFAULT_SIZE };
50455
+ }
50456
+
50257
50457
  /**
50258
50458
  * @typedef {import('diagram-js/lib/util/Types').Dimensions} Dimensions
50259
50459
  *
@@ -50483,71 +50683,12 @@
50483
50683
  * Get the default size of a diagram element.
50484
50684
  *
50485
50685
  * @param {Element} element The element.
50486
- * @param {ModdleElement} di The DI.
50686
+ * @param {ModdleElement} [di] The DI.
50487
50687
  *
50488
50688
  * @return {Dimensions} Default width and height of the element.
50489
50689
  */
50490
50690
  ElementFactory.prototype.getDefaultSize = function(element, di) {
50491
-
50492
- var bo = getBusinessObject(element);
50493
- di = di || getDi(element);
50494
-
50495
- if (is(bo, 'bpmn:SubProcess')) {
50496
- if (isExpanded(bo, di)) {
50497
- return { width: 350, height: 200 };
50498
- } else {
50499
- return { width: 100, height: 80 };
50500
- }
50501
- }
50502
-
50503
- if (is(bo, 'bpmn:Task')) {
50504
- return { width: 100, height: 80 };
50505
- }
50506
-
50507
- if (is(bo, 'bpmn:Gateway')) {
50508
- return { width: 50, height: 50 };
50509
- }
50510
-
50511
- if (is(bo, 'bpmn:Event')) {
50512
- return { width: 36, height: 36 };
50513
- }
50514
-
50515
- if (is(bo, 'bpmn:Participant')) {
50516
- var isHorizontalPool = di.isHorizontal === undefined || di.isHorizontal === true;
50517
- if (isExpanded(bo, di)) {
50518
- if (isHorizontalPool) {
50519
- return { width: 600, height: 250 };
50520
- }
50521
- return { width: 250, height: 600 };
50522
- } else {
50523
- if (isHorizontalPool) {
50524
- return { width: 400, height: 60 };
50525
- }
50526
- return { width: 60, height: 400 };
50527
- }
50528
- }
50529
-
50530
- if (is(bo, 'bpmn:Lane')) {
50531
- return { width: 400, height: 100 };
50532
- }
50533
-
50534
- if (is(bo, 'bpmn:DataObjectReference')) {
50535
- return { width: 36, height: 50 };
50536
- }
50537
-
50538
- if (is(bo, 'bpmn:DataStoreReference')) {
50539
- return { width: 50, height: 50 };
50540
- }
50541
-
50542
- if (is(bo, 'bpmn:TextAnnotation')) {
50543
- return { width: 100, height: 40 };
50544
- }
50545
-
50546
- if (is(bo, 'bpmn:Group')) {
50547
- return { width: 300, height: 300 };
50548
- }
50549
-
50550
- return { width: 100, height: 80 };
50691
+ return getDefaultSize(element, di);
50551
50692
  };
50552
50693
 
50553
50694