bpmn-js 13.0.3 → 13.0.4

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.
Files changed (162) hide show
  1. package/dist/bpmn-modeler.development.js +362 -113
  2. package/dist/bpmn-modeler.production.min.js +2 -2
  3. package/dist/bpmn-navigated-viewer.development.js +195 -40
  4. package/dist/bpmn-navigated-viewer.production.min.js +1 -1
  5. package/dist/bpmn-viewer.development.js +116 -32
  6. package/dist/bpmn-viewer.production.min.js +1 -1
  7. package/lib/BaseModeler.d.ts +12 -12
  8. package/lib/BaseViewer.d.ts +160 -160
  9. package/lib/Modeler.d.ts +76 -76
  10. package/lib/NavigatedViewer.d.ts +8 -8
  11. package/lib/Viewer.d.ts +44 -44
  12. package/lib/core/index.d.ts +10 -10
  13. package/lib/draw/BpmnRenderUtil.d.ts +77 -77
  14. package/lib/draw/BpmnRenderUtil.js +6 -6
  15. package/lib/draw/BpmnRenderer.d.ts +124 -124
  16. package/lib/draw/PathMap.d.ts +330 -330
  17. package/lib/draw/TextRenderer.d.ts +74 -74
  18. package/lib/draw/index.d.ts +10 -10
  19. package/lib/features/align-elements/AlignElementsContextPadProvider.d.ts +32 -32
  20. package/lib/features/align-elements/AlignElementsIcons.d.ts +10 -10
  21. package/lib/features/align-elements/AlignElementsMenuProvider.d.ts +32 -32
  22. package/lib/features/align-elements/BpmnAlignElements.d.ts +9 -9
  23. package/lib/features/align-elements/index.d.ts +11 -11
  24. package/lib/features/auto-place/BpmnAutoPlace.d.ts +13 -13
  25. package/lib/features/auto-place/BpmnAutoPlaceUtil.d.ts +47 -47
  26. package/lib/features/auto-place/index.d.ts +7 -7
  27. package/lib/features/auto-resize/BpmnAutoResize.d.ts +25 -25
  28. package/lib/features/auto-resize/BpmnAutoResizeProvider.d.ts +26 -26
  29. package/lib/features/auto-resize/index.d.ts +8 -8
  30. package/lib/features/context-pad/ContextPadProvider.d.ts +60 -60
  31. package/lib/features/context-pad/index.d.ts +7 -7
  32. package/lib/features/copy-paste/BpmnCopyPaste.d.ts +17 -17
  33. package/lib/features/copy-paste/ModdleCopy.d.ts +45 -45
  34. package/lib/features/copy-paste/index.d.ts +9 -9
  35. package/lib/features/di-ordering/BpmnDiOrdering.d.ts +11 -11
  36. package/lib/features/di-ordering/index.d.ts +6 -6
  37. package/lib/features/distribute-elements/BpmnDistributeElements.d.ts +10 -10
  38. package/lib/features/distribute-elements/DistributeElementsIcons.d.ts +5 -5
  39. package/lib/features/distribute-elements/DistributeElementsMenuProvider.d.ts +32 -32
  40. package/lib/features/distribute-elements/index.d.ts +9 -9
  41. package/lib/features/drilldown/DrilldownBreadcrumbs.d.ts +19 -19
  42. package/lib/features/drilldown/DrilldownCentering.d.ts +17 -17
  43. package/lib/features/drilldown/DrilldownOverlayBehavior.d.ts +18 -18
  44. package/lib/features/drilldown/SubprocessCompatibility.d.ts +21 -21
  45. package/lib/features/drilldown/index.d.ts +13 -13
  46. package/lib/features/editor-actions/BpmnEditorActions.d.ts +13 -13
  47. package/lib/features/editor-actions/index.d.ts +6 -6
  48. package/lib/features/grid-snapping/BpmnGridSnapping.d.ts +9 -9
  49. package/lib/features/grid-snapping/behavior/GridSnappingAutoPlaceBehavior.d.ts +12 -12
  50. package/lib/features/grid-snapping/behavior/GridSnappingLayoutConnectionBehavior.d.ts +27 -27
  51. package/lib/features/grid-snapping/behavior/GridSnappingParticipantBehavior.d.ts +13 -13
  52. package/lib/features/grid-snapping/behavior/index.d.ts +10 -10
  53. package/lib/features/grid-snapping/index.d.ts +11 -11
  54. package/lib/features/interaction-events/BpmnInteractionEvents.d.ts +18 -18
  55. package/lib/features/interaction-events/index.d.ts +6 -6
  56. package/lib/features/keyboard/BpmnKeyboardBindings.d.ts +15 -15
  57. package/lib/features/keyboard/index.d.ts +7 -7
  58. package/lib/features/label-editing/LabelEditingPreview.d.ts +13 -13
  59. package/lib/features/label-editing/LabelEditingProvider.d.ts +62 -62
  60. package/lib/features/label-editing/LabelUtil.d.ts +1 -1
  61. package/lib/features/label-editing/cmd/UpdateLabelHandler.d.ts +22 -22
  62. package/lib/features/label-editing/index.d.ts +9 -9
  63. package/lib/features/modeling/BpmnFactory.d.ts +73 -73
  64. package/lib/features/modeling/BpmnLayouter.d.ts +26 -26
  65. package/lib/features/modeling/BpmnUpdater.d.ts +92 -92
  66. package/lib/features/modeling/ElementFactory.d.ts +119 -119
  67. package/lib/features/modeling/Modeling.d.ts +150 -150
  68. package/lib/features/modeling/behavior/AdaptiveLabelPositioningBehavior.d.ts +20 -20
  69. package/lib/features/modeling/behavior/AppendBehavior.d.ts +6 -6
  70. package/lib/features/modeling/behavior/AssociationBehavior.d.ts +11 -11
  71. package/lib/features/modeling/behavior/AttachEventBehavior.d.ts +15 -15
  72. package/lib/features/modeling/behavior/BoundaryEventBehavior.d.ts +15 -15
  73. package/lib/features/modeling/behavior/CreateBehavior.d.ts +9 -9
  74. package/lib/features/modeling/behavior/CreateDataObjectBehavior.d.ts +15 -15
  75. package/lib/features/modeling/behavior/CreateParticipantBehavior.d.ts +19 -19
  76. package/lib/features/modeling/behavior/DataInputAssociationBehavior.d.ts +21 -21
  77. package/lib/features/modeling/behavior/DataStoreBehavior.d.ts +19 -19
  78. package/lib/features/modeling/behavior/DeleteLaneBehavior.d.ts +15 -15
  79. package/lib/features/modeling/behavior/DetachEventBehavior.d.ts +15 -15
  80. package/lib/features/modeling/behavior/DropOnFlowBehavior.d.ts +13 -13
  81. package/lib/features/modeling/behavior/EventBasedGatewayBehavior.d.ts +11 -11
  82. package/lib/features/modeling/behavior/FixHoverBehavior.d.ts +17 -17
  83. package/lib/features/modeling/behavior/GroupBehavior.d.ts +26 -26
  84. package/lib/features/modeling/behavior/ImportDockingFix.d.ts +13 -13
  85. package/lib/features/modeling/behavior/IsHorizontalFix.d.ts +10 -10
  86. package/lib/features/modeling/behavior/LabelBehavior.d.ts +56 -56
  87. package/lib/features/modeling/behavior/LayoutConnectionBehavior.d.ts +16 -16
  88. package/lib/features/modeling/behavior/MessageFlowBehavior.d.ts +15 -15
  89. package/lib/features/modeling/behavior/ModelingFeedback.d.ts +13 -13
  90. package/lib/features/modeling/behavior/RemoveElementBehavior.d.ts +13 -13
  91. package/lib/features/modeling/behavior/RemoveEmbeddedLabelBoundsBehavior.d.ts +16 -16
  92. package/lib/features/modeling/behavior/RemoveParticipantBehavior.d.ts +15 -15
  93. package/lib/features/modeling/behavior/ReplaceConnectionBehavior.d.ts +15 -15
  94. package/lib/features/modeling/behavior/ReplaceElementBehaviour.d.ts +23 -23
  95. package/lib/features/modeling/behavior/ResizeBehavior.d.ts +57 -57
  96. package/lib/features/modeling/behavior/ResizeLaneBehavior.d.ts +16 -16
  97. package/lib/features/modeling/behavior/RootElementReferenceBehavior.d.ts +25 -25
  98. package/lib/features/modeling/behavior/SpaceToolBehavior.d.ts +10 -10
  99. package/lib/features/modeling/behavior/SubProcessPlaneBehavior.d.ts +28 -28
  100. package/lib/features/modeling/behavior/SubProcessStartEventBehavior.d.ts +15 -15
  101. package/lib/features/modeling/behavior/ToggleCollapseConnectionBehaviour.d.ts +14 -14
  102. package/lib/features/modeling/behavior/ToggleElementCollapseBehaviour.d.ts +13 -13
  103. package/lib/features/modeling/behavior/UnclaimIdBehavior.d.ts +19 -19
  104. package/lib/features/modeling/behavior/UnsetDefaultFlowBehavior.d.ts +16 -16
  105. package/lib/features/modeling/behavior/UpdateFlowNodeRefsBehavior.d.ts +17 -17
  106. package/lib/features/modeling/behavior/index.d.ts +2 -2
  107. package/lib/features/modeling/behavior/util/CategoryUtil.d.ts +49 -49
  108. package/lib/features/modeling/behavior/util/ConnectionLayoutUtil.d.ts +19 -19
  109. package/lib/features/modeling/behavior/util/GeometricUtil.d.ts +1 -1
  110. package/lib/features/modeling/behavior/util/LabelLayoutUtil.d.ts +32 -32
  111. package/lib/features/modeling/behavior/util/LayoutUtil.d.ts +48 -48
  112. package/lib/features/modeling/behavior/util/LineAttachmentUtil.d.ts +37 -37
  113. package/lib/features/modeling/behavior/util/LineIntersect.d.ts +13 -13
  114. package/lib/features/modeling/behavior/util/ResizeUtil.d.ts +1 -1
  115. package/lib/features/modeling/cmd/AddLaneHandler.d.ts +22 -22
  116. package/lib/features/modeling/cmd/IdClaimHandler.d.ts +22 -22
  117. package/lib/features/modeling/cmd/ResizeLaneHandler.d.ts +39 -39
  118. package/lib/features/modeling/cmd/SetColorHandler.d.ts +18 -18
  119. package/lib/features/modeling/cmd/SplitLaneHandler.d.ts +22 -22
  120. package/lib/features/modeling/cmd/UpdateCanvasRootHandler.d.ts +20 -20
  121. package/lib/features/modeling/cmd/UpdateFlowNodeRefsHandler.d.ts +21 -21
  122. package/lib/features/modeling/cmd/UpdateModdlePropertiesHandler.d.ts +20 -20
  123. package/lib/features/modeling/cmd/UpdatePropertiesHandler.d.ts +60 -60
  124. package/lib/features/modeling/cmd/UpdateSemanticParentHandler.d.ts +18 -18
  125. package/lib/features/modeling/index.d.ts +27 -27
  126. package/lib/features/modeling/util/LaneUtil.d.ts +46 -46
  127. package/lib/features/modeling/util/ModelingUtil.d.ts +12 -12
  128. package/lib/features/ordering/BpmnOrderingProvider.d.ts +21 -21
  129. package/lib/features/ordering/index.d.ts +7 -7
  130. package/lib/features/palette/PaletteProvider.d.ts +34 -34
  131. package/lib/features/palette/index.d.ts +9 -9
  132. package/lib/features/popup-menu/ReplaceMenuProvider.d.ts +50 -50
  133. package/lib/features/popup-menu/index.d.ts +11 -11
  134. package/lib/features/popup-menu/util/TypeUtil.d.ts +14 -14
  135. package/lib/features/replace/BpmnReplace.d.ts +47 -47
  136. package/lib/features/replace/ReplaceOptions.d.ts +75 -75
  137. package/lib/features/replace/index.d.ts +9 -9
  138. package/lib/features/replace-preview/BpmnReplacePreview.d.ts +17 -17
  139. package/lib/features/replace-preview/index.d.ts +7 -7
  140. package/lib/features/rules/BpmnRules.d.ts +172 -172
  141. package/lib/features/rules/index.d.ts +7 -7
  142. package/lib/features/search/BpmnSearchProvider.d.ts +29 -29
  143. package/lib/features/search/index.d.ts +7 -7
  144. package/lib/features/snapping/BpmnConnectSnapping.d.ts +17 -17
  145. package/lib/features/snapping/BpmnCreateMoveSnapping.d.ts +41 -41
  146. package/lib/features/snapping/BpmnSnappingUtil.d.ts +11 -11
  147. package/lib/features/snapping/index.d.ts +9 -9
  148. package/lib/features/space-tool/BpmnSpaceTool.d.ts +21 -21
  149. package/lib/features/space-tool/index.d.ts +6 -6
  150. package/lib/import/BpmnImporter.d.ts +53 -53
  151. package/lib/import/BpmnTreeWalker.d.ts +22 -22
  152. package/lib/import/Importer.d.ts +25 -25
  153. package/lib/import/Util.d.ts +1 -1
  154. package/lib/import/index.d.ts +6 -6
  155. package/lib/model/Types.d.ts +24 -24
  156. package/lib/util/CompatibilityUtil.d.ts +22 -22
  157. package/lib/util/DiUtil.d.ts +53 -53
  158. package/lib/util/DrilldownUtil.d.ts +39 -39
  159. package/lib/util/LabelUtil.d.ts +89 -89
  160. package/lib/util/ModelUtil.d.ts +40 -40
  161. package/lib/util/PoweredByUtil.d.ts +8 -8
  162. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-viewer v13.0.3
2
+ * bpmn-js - bpmn-viewer v13.0.4
3
3
  *
4
4
  * Copyright (c) 2014-present, camunda Services GmbH
5
5
  *
@@ -1632,7 +1632,7 @@
1632
1632
  */
1633
1633
 
1634
1634
  /**
1635
- * @param {Component[]} elements
1635
+ * @param {Component[] | Component[][]} elements
1636
1636
  *
1637
1637
  * @return {string}
1638
1638
  */
@@ -1669,6 +1669,11 @@
1669
1669
  return [ 'C', p1.x, p1.y, p2.x, p2.y, p3.x, p3.y ];
1670
1670
  }
1671
1671
 
1672
+ /**
1673
+ * @param {Point[]} waypoints
1674
+ * @param {number} [cornerRadius]
1675
+ * @return {Component[][]}
1676
+ */
1672
1677
  function drawPath(waypoints, cornerRadius) {
1673
1678
  const pointCount = waypoints.length;
1674
1679
 
@@ -1732,7 +1737,7 @@
1732
1737
 
1733
1738
  /**
1734
1739
  * @param {Point[]} points
1735
- * @param {any} [attrs]
1740
+ * @param {number|Object} [attrs]
1736
1741
  * @param {number} [radius]
1737
1742
  *
1738
1743
  * @return {SVGElement}
@@ -1820,7 +1825,7 @@
1820
1825
  // color access //////////////////////
1821
1826
 
1822
1827
  /**
1823
- * @param {DiagramElement} element
1828
+ * @param {Element} element
1824
1829
  * @param {string} [defaultColor]
1825
1830
  *
1826
1831
  * @return {string}
@@ -1832,7 +1837,7 @@
1832
1837
  }
1833
1838
 
1834
1839
  /**
1835
- * @param {DiagramElement} element
1840
+ * @param {Element} element
1836
1841
  * @param {string} [defaultColor]
1837
1842
  *
1838
1843
  * @return {string}
@@ -1844,9 +1849,9 @@
1844
1849
  }
1845
1850
 
1846
1851
  /**
1847
- * @param {DiagramElement} element
1848
- * @param {string} defaultColor
1849
- * @param {string} defaultStrokeColor
1852
+ * @param {Element} element
1853
+ * @param {string} [defaultColor]
1854
+ * @param {string} [defaultStrokeColor]
1850
1855
  *
1851
1856
  * @return {string}
1852
1857
  */
@@ -2525,8 +2530,8 @@
2525
2530
  * @param {SVGElement} gfx
2526
2531
  * @param {number} x
2527
2532
  * @param {number} y
2528
- * @param {number} angle
2529
- * @param {number} amount
2533
+ * @param {number} [angle]
2534
+ * @param {number} [amount]
2530
2535
  */
2531
2536
  function transform(gfx, x, y, angle, amount) {
2532
2537
  var translate = createTransform();
@@ -4674,7 +4679,7 @@
4674
4679
  *
4675
4680
  * @typedef { Partial<{
4676
4681
  * align: AlignmentConfig;
4677
- * style: Record<string, any>;
4682
+ * style: Record<string, number | string>;
4678
4683
  * padding: PaddingConfig;
4679
4684
  * }> } BaseTextConfig
4680
4685
  *
@@ -4781,6 +4786,8 @@
4781
4786
  * Alters the lines passed.
4782
4787
  *
4783
4788
  * @param {string[]} lines
4789
+ * @param {number} maxWidth
4790
+ * @param {SVGTextElement} fakeText
4784
4791
  *
4785
4792
  * @return {LineDescriptor} the line descriptor
4786
4793
  */
@@ -5751,6 +5758,11 @@
5751
5758
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
5752
5759
  }
5753
5760
 
5761
+ /**
5762
+ * @param {Point} point
5763
+ *
5764
+ * @returns {Point}
5765
+ */
5754
5766
  function roundPoint(point) {
5755
5767
 
5756
5768
  return {
@@ -6267,6 +6279,15 @@
6267
6279
  ]
6268
6280
  };
6269
6281
 
6282
+ /**
6283
+ * @typedef {import('../util/Types').Point} Point
6284
+ */
6285
+
6286
+ /**
6287
+ * @param {import('../core/EventBus').Event} event
6288
+ *
6289
+ * @return {Event}
6290
+ */
6270
6291
  function getOriginal(event) {
6271
6292
  return event.originalEvent || event.srcEvent;
6272
6293
  }
@@ -6275,22 +6296,43 @@
6275
6296
  return (/mac/i).test(navigator.platform);
6276
6297
  }
6277
6298
 
6299
+ /**
6300
+ * @param {MouseEvent} event
6301
+ * @param {string} button
6302
+ *
6303
+ * @return {boolean}
6304
+ */
6278
6305
  function isButton(event, button) {
6279
6306
  return (getOriginal(event) || event).button === button;
6280
6307
  }
6281
6308
 
6309
+ /**
6310
+ * @param {MouseEvent} event
6311
+ *
6312
+ * @return {boolean}
6313
+ */
6282
6314
  function isPrimaryButton(event) {
6283
6315
 
6284
6316
  // button === 0 -> left áka primary mouse button
6285
6317
  return isButton(event, 0);
6286
6318
  }
6287
6319
 
6320
+ /**
6321
+ * @param {MouseEvent} event
6322
+ *
6323
+ * @return {boolean}
6324
+ */
6288
6325
  function isAuxiliaryButton(event) {
6289
6326
 
6290
6327
  // button === 1 -> auxiliary áka wheel button
6291
6328
  return isButton(event, 1);
6292
6329
  }
6293
6330
 
6331
+ /**
6332
+ * @param {MouseEvent} event
6333
+ *
6334
+ * @return {boolean}
6335
+ */
6294
6336
  function hasPrimaryModifier(event) {
6295
6337
  var originalEvent = getOriginal(event) || event;
6296
6338
 
@@ -6306,7 +6348,11 @@
6306
6348
  }
6307
6349
  }
6308
6350
 
6309
-
6351
+ /**
6352
+ * @param {MouseEvent} event
6353
+ *
6354
+ * @return {boolean}
6355
+ */
6310
6356
  function hasSecondaryModifier(event) {
6311
6357
  var originalEvent = getOriginal(event) || event;
6312
6358
 
@@ -6871,7 +6917,13 @@
6871
6917
  };
6872
6918
  }
6873
6919
 
6874
-
6920
+ /**
6921
+ * Get the element's type
6922
+ *
6923
+ * @param {Element} element
6924
+ *
6925
+ * @return {'connection' | 'shape' | 'root'}
6926
+ */
6875
6927
  function getType(element) {
6876
6928
 
6877
6929
  if ('waypoints' in element) {
@@ -6885,8 +6937,12 @@
6885
6937
  return 'root';
6886
6938
  }
6887
6939
 
6940
+ /**
6941
+ * @param {Element} element
6942
+ *
6943
+ * @return {boolean}
6944
+ */
6888
6945
  function isFrameElement(element) {
6889
-
6890
6946
  return !!(element && element.isFrame);
6891
6947
  }
6892
6948
 
@@ -7401,7 +7457,7 @@
7401
7457
  *
7402
7458
  * The ids can be customized via a given prefix and contain a random value to avoid collisions.
7403
7459
  *
7404
- * @param {string} prefix a prefix to prepend to generated ids (for better readability)
7460
+ * @param {string} [prefix] a prefix to prepend to generated ids (for better readability)
7405
7461
  */
7406
7462
  function IdGenerator(prefix) {
7407
7463
 
@@ -8509,6 +8565,7 @@
8509
8565
 
8510
8566
  /**
8511
8567
  * @param {string} str
8568
+ *
8512
8569
  * @return {string}
8513
8570
  */
8514
8571
 
@@ -8520,6 +8577,11 @@
8520
8577
  '\'': '&#39;'
8521
8578
  };
8522
8579
 
8580
+ /**
8581
+ * @param {string} str
8582
+ *
8583
+ * @return {string}
8584
+ */
8523
8585
  function escapeHTML(str) {
8524
8586
  str = '' + str;
8525
8587
 
@@ -9878,13 +9940,14 @@
9878
9940
  var self = this;
9879
9941
 
9880
9942
  /**
9881
- * Builds a style definition from a className, a list of traits and an object of additional attributes.
9943
+ * Builds a style definition from a className, a list of traits and an object
9944
+ * of additional attributes.
9882
9945
  *
9883
9946
  * @param {string} className
9884
- * @param {string[]} traits
9885
- * @param {Object} additionalAttrs
9947
+ * @param {string[]} [traits]
9948
+ * @param {Object} [additionalAttrs]
9886
9949
  *
9887
- * @return {Object} the style defintion
9950
+ * @return {Object} the style definition
9888
9951
  */
9889
9952
  this.cls = function(className, traits, additionalAttrs) {
9890
9953
  var attrs = this.style(traits, additionalAttrs);
@@ -9893,12 +9956,13 @@
9893
9956
  };
9894
9957
 
9895
9958
  /**
9896
- * Builds a style definition from a list of traits and an object of additional attributes.
9959
+ * Builds a style definition from a list of traits and an object of additional
9960
+ * attributes.
9897
9961
  *
9898
- * @param {string[]} traits
9962
+ * @param {string[]} [traits]
9899
9963
  * @param {Object} additionalAttrs
9900
9964
  *
9901
- * @return {Object} the style defintion
9965
+ * @return {Object} the style definition
9902
9966
  */
9903
9967
  this.style = function(traits, additionalAttrs) {
9904
9968
 
@@ -9914,6 +9978,17 @@
9914
9978
  return additionalAttrs ? assign$1(attrs, additionalAttrs) : attrs;
9915
9979
  };
9916
9980
 
9981
+
9982
+ /**
9983
+ * Computes a style definition from a list of traits and an object of
9984
+ * additional attributes, with custom style definition object.
9985
+ *
9986
+ * @param {Object} custom
9987
+ * @param {string[]} [traits]
9988
+ * @param {Object} defaultStyles
9989
+ *
9990
+ * @return {Object} the style definition
9991
+ */
9917
9992
  this.computeStyle = function(custom, traits, defaultStyles) {
9918
9993
  if (!isArray$2(traits)) {
9919
9994
  defaultStyles = traits;
@@ -9962,7 +10037,7 @@
9962
10037
  *
9963
10038
  * @param {Array<Object>} collection
9964
10039
  * @param {Object} element
9965
- * @param {number} idx
10040
+ * @param {number} [idx]
9966
10041
  */
9967
10042
  function add(collection, element, idx) {
9968
10043
 
@@ -10571,11 +10646,13 @@
10571
10646
  *
10572
10647
  * @example
10573
10648
  *
10649
+ * ```javascript
10574
10650
  * canvas.addMarker('foo', 'some-marker');
10575
10651
  *
10576
10652
  * const fooGfx = canvas.getGraphics('foo');
10577
10653
  *
10578
10654
  * fooGfx; // <g class="... some-marker"> ... </g>
10655
+ * ```
10579
10656
  *
10580
10657
  * @param {ShapeLike|ConnectionLike|string} element The element or its ID.
10581
10658
  * @param {string} marker The marker.
@@ -10981,7 +11058,7 @@
10981
11058
  *
10982
11059
  * @memberOf Canvas
10983
11060
  *
10984
- * @event ShapeRemoved
11061
+ * @event ShapeRemovedEvent
10985
11062
  * @type {Object}
10986
11063
  * @property {ShapeLike} element The shape.
10987
11064
  * @property {SVGElement} gfx The graphical element.
@@ -11018,7 +11095,7 @@
11018
11095
  *
11019
11096
  * @memberOf Canvas
11020
11097
  *
11021
- * @event connection.removed
11098
+ * @event ConnectionRemovedEvent
11022
11099
  * @type {Object}
11023
11100
  * @property {ConnectionLike} element The connection.
11024
11101
  * @property {SVGElement} gfx The graphical element.
@@ -11077,6 +11154,7 @@
11077
11154
  *
11078
11155
  * @example
11079
11156
  *
11157
+ * ```javascript
11080
11158
  * canvas.viewbox({ x: 100, y: 100, width: 500, height: 500 })
11081
11159
  *
11082
11160
  * // sets the visible area of the diagram to (100|100) -> (600|100)
@@ -11104,6 +11182,7 @@
11104
11182
  * width: zoomedAndScrolledViewbox.outer.width,
11105
11183
  * height: zoomedAndScrolledViewbox.outer.height
11106
11184
  * });
11185
+ * ```
11107
11186
  *
11108
11187
  * @param {Rect} [box] The viewbox to be set.
11109
11188
  *
@@ -11611,9 +11690,11 @@
11611
11690
  *
11612
11691
  * @example
11613
11692
  *
11693
+ * ```javascript
11614
11694
  * elementRegistry.get('SomeElementId_1');
11615
11695
  *
11616
11696
  * elementRegistry.get(gfx);
11697
+ * ```
11617
11698
  *
11618
11699
  * @param {string|SVGElement} filter The elements ID or graphical representation.
11619
11700
  *
@@ -11707,11 +11788,13 @@
11707
11788
  *
11708
11789
  * @example
11709
11790
  *
11791
+ * ```javascript
11710
11792
  * elementRegistry.getGraphics('SomeElementId_1');
11711
11793
  *
11712
11794
  * elementRegistry.getGraphics(rootElement); // <g ...>
11713
11795
  *
11714
11796
  * elementRegistry.getGraphics(rootElement, true); // <svg ...>
11797
+ * ```
11715
11798
  *
11716
11799
  * @param {ElementLike|string} filter The element or its ID.
11717
11800
  * @param {boolean} [secondary=false] Whether to return the secondary graphical representation.
@@ -12291,7 +12374,7 @@
12291
12374
  *
12292
12375
  * @example
12293
12376
  *
12294
- * ```
12377
+ * ```javascript
12295
12378
  * import * as Model from 'diagram-js/lib/model';
12296
12379
  *
12297
12380
  * const root = Model.create('root', {
@@ -12314,7 +12397,7 @@
12314
12397
  *
12315
12398
  * @example
12316
12399
  *
12317
- * ```
12400
+ * ```javascript
12318
12401
  * import * as Model from 'diagram-js/lib/model';
12319
12402
  *
12320
12403
  * const connection = Model.create('connection', {
@@ -12337,7 +12420,7 @@
12337
12420
  *
12338
12421
  * @example
12339
12422
  *
12340
- * ```
12423
+ * ```javascript
12341
12424
  * import * as Model from 'diagram-js/lib/model';
12342
12425
  *
12343
12426
  * const shape = Model.create('shape', {
@@ -12358,7 +12441,7 @@
12358
12441
  *
12359
12442
  * @example
12360
12443
  *
12361
- * ```
12444
+ * ```javascript
12362
12445
  * import * as Model from 'diagram-js/lib/model';
12363
12446
  *
12364
12447
  * const label = Model.create('label', {
@@ -12371,7 +12454,7 @@
12371
12454
  * ```
12372
12455
  *
12373
12456
  * @param {'label'} type
12374
- * @param {any} [attrs]
12457
+ * @param {Object} [attrs]
12375
12458
  * @return {Label}
12376
12459
  */
12377
12460
  function create(type, attrs) {
@@ -12669,7 +12752,6 @@
12669
12752
  });
12670
12753
  };
12671
12754
 
12672
-
12673
12755
  /**
12674
12756
  * Register an event listener that is called only once.
12675
12757
  *
@@ -12940,7 +13022,7 @@
12940
13022
  * * after: [ 1500, 1500, (new=1300), 1000, 1000, (new=1000) ]
12941
13023
  *
12942
13024
  * @param {string} event
12943
- * @param {EventBusListener} listener
13025
+ * @param {EventBusListener} newListener
12944
13026
  */
12945
13027
  EventBus.prototype._addListener = function(event, newListener) {
12946
13028
 
@@ -13538,9 +13620,11 @@
13538
13620
  *
13539
13621
  * @example
13540
13622
  *
13623
+ * ```javascript
13541
13624
  * eventBus.on('diagram.init', function() {
13542
13625
  * eventBus.fire('my-custom-event', { foo: 'BAR' });
13543
13626
  * });
13627
+ * ```
13544
13628
  *
13545
13629
  * @type {Object}
13546
13630
  */