@emuanalytics/flow-rdf-ui 4.2.1 → 4.3.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.
Files changed (411) hide show
  1. package/README.md +58 -0
  2. package/THIRD_PARTY_NOTICES.md +220 -0
  3. package/dist/components/alert/alert.component.mjs +13 -10
  4. package/dist/components/animation/animation.component.mjs +3 -2
  5. package/dist/components/autocomplete/autocomplete.component.mjs +21 -20
  6. package/dist/components/avatar/avatar.component.mjs +10 -12
  7. package/dist/components/badge/badge.component.mjs +1 -0
  8. package/dist/components/base-control/base-control.component.mjs +3 -0
  9. package/dist/components/breadcrumb/breadcrumb.component.mjs +3 -0
  10. package/dist/components/breadcrumb-item/breadcrumb-item.component.mjs +15 -14
  11. package/dist/components/busy-overlay/busy-overlay.component.mjs +3 -0
  12. package/dist/components/button/button.component.mjs +7 -3
  13. package/dist/components/button/button.styles.mjs +5 -5
  14. package/dist/components/button-group/button-group.component.mjs +1 -0
  15. package/dist/components/calendar/calendar.component.mjs +29 -6
  16. package/dist/components/card/card.component.mjs +5 -4
  17. package/dist/components/carousel/carousel.component.mjs +45 -42
  18. package/dist/components/carousel-item/carousel-item.component.mjs +2 -0
  19. package/dist/components/chart/chart.component.mjs +5 -4
  20. package/dist/components/chart/chartjs-plugins/luxon.adapter.mjs +78 -0
  21. package/dist/components/chart/chartjs-plugins/plugin.flow-ui-colors.mjs +1 -1
  22. package/dist/components/chart/chartjs-support.mjs +2 -0
  23. package/dist/components/checkbox/checkbox.component.mjs +21 -18
  24. package/dist/components/checkbox-group/checkbox-group.component.mjs +3 -0
  25. package/dist/components/color-mapper/color-mapper.component.mjs +27 -6
  26. package/dist/components/color-picker/color-picker.component.mjs +79 -71
  27. package/dist/components/color-picker/color-picker.styles.mjs +4 -2
  28. package/dist/components/color-stop/color-stop.component.mjs +19 -2
  29. package/dist/components/date-time-picker/date-time-picker.component.mjs +35 -29
  30. package/dist/components/details/details.component.mjs +3 -0
  31. package/dist/components/diagram/diagram-panel.styles.mjs +44 -0
  32. package/dist/components/diagram/diagram-tokens.styles.mjs +148 -0
  33. package/dist/components/diagram/diagram.component.mjs +355 -0
  34. package/dist/components/diagram/diagram.mjs +5 -0
  35. package/dist/components/diagram/diagram.styles.mjs +95 -0
  36. package/dist/components/diagram-background/diagram-background.component.mjs +163 -0
  37. package/dist/components/diagram-background/diagram-background.mjs +5 -0
  38. package/dist/components/diagram-background/diagram-background.styles.mjs +58 -0
  39. package/dist/components/diagram-base-edge/diagram-base-edge.component.mjs +326 -0
  40. package/dist/components/diagram-base-edge/diagram-base-edge.mjs +5 -0
  41. package/dist/components/diagram-base-edge/diagram-base-edge.styles.mjs +147 -0
  42. package/dist/components/diagram-base-node/diagram-base-node.component.mjs +84 -0
  43. package/dist/components/diagram-base-node/diagram-base-node.mjs +5 -0
  44. package/dist/components/diagram-base-node/diagram-base-node.styles.mjs +37 -0
  45. package/dist/components/diagram-edge/diagram-edge.component.mjs +56 -0
  46. package/dist/components/diagram-edge/diagram-edge.mjs +5 -0
  47. package/dist/components/diagram-edge/diagram-edge.styles.mjs +37 -0
  48. package/dist/components/diagram-edge-label/diagram-edge-label.component.mjs +202 -0
  49. package/dist/components/diagram-edge-label/diagram-edge-label.mjs +5 -0
  50. package/dist/components/diagram-edge-label/diagram-edge-label.styles.mjs +54 -0
  51. package/dist/components/diagram-marker/diagram-marker.component.mjs +84 -0
  52. package/dist/components/diagram-marker/diagram-marker.mjs +5 -0
  53. package/dist/components/diagram-marker/diagram-marker.styles.mjs +9 -0
  54. package/dist/components/diagram-minimap/diagram-minimap.component.mjs +298 -0
  55. package/dist/components/diagram-minimap/diagram-minimap.mjs +5 -0
  56. package/dist/components/diagram-minimap/diagram-minimap.styles.mjs +83 -0
  57. package/dist/components/diagram-node/diagram-node-template.styles.mjs +36 -0
  58. package/dist/components/diagram-node/diagram-node.component.mjs +183 -0
  59. package/dist/components/diagram-node/diagram-node.mjs +6 -0
  60. package/dist/components/diagram-node/diagram-node.styles.mjs +29 -0
  61. package/dist/components/diagram-palette-item/diagram-palette-item.component.mjs +168 -0
  62. package/dist/components/diagram-palette-item/diagram-palette-item.mjs +5 -0
  63. package/dist/components/diagram-palette-item/diagram-palette-item.styles.mjs +20 -0
  64. package/dist/components/diagram-palette-item-preview/diagram-palette-item-preview.component.mjs +245 -0
  65. package/dist/components/diagram-palette-item-preview/diagram-palette-item-preview.mjs +6 -0
  66. package/dist/components/diagram-palette-item-preview/diagram-palette-item-preview.styles.mjs +41 -0
  67. package/dist/components/diagram-port/diagram-port.component.mjs +273 -0
  68. package/dist/components/diagram-port/diagram-port.mjs +5 -0
  69. package/dist/components/diagram-port/diagram-port.styles.mjs +116 -0
  70. package/dist/components/diagram-resize-adornment/diagram-resize-adornment.component.mjs +124 -0
  71. package/dist/components/diagram-resize-adornment/diagram-resize-adornment.mjs +5 -0
  72. package/dist/components/diagram-resize-adornment/diagram-resize-adornment.styles.mjs +136 -0
  73. package/dist/components/diagram-rotate-adornment/diagram-rotate-adornment.component.mjs +125 -0
  74. package/dist/components/diagram-rotate-adornment/diagram-rotate-adornment.mjs +5 -0
  75. package/dist/components/diagram-rotate-adornment/diagram-rotate-adornment.styles.mjs +65 -0
  76. package/dist/components/diagram-zoom-controls/diagram-zoom-controls.component.mjs +158 -0
  77. package/dist/components/diagram-zoom-controls/diagram-zoom-controls.mjs +5 -0
  78. package/dist/components/diagram-zoom-controls/diagram-zoom-controls.styles.mjs +68 -0
  79. package/dist/components/dialog/dialog.component.mjs +5 -1
  80. package/dist/components/divider/divider.component.mjs +1 -0
  81. package/dist/components/drawer/drawer.component.mjs +22 -19
  82. package/dist/components/dropdown/dropdown.component.mjs +2 -1
  83. package/dist/components/form-group/form-group.component.mjs +1 -0
  84. package/dist/components/gauge/gauge.component.mjs +10 -2
  85. package/dist/components/icon/icon.component.mjs +1 -0
  86. package/dist/components/icon/library.mjs +7 -4
  87. package/dist/components/icon/library.system.mjs +2 -0
  88. package/dist/components/icon-button/icon-button.component.mjs +5 -0
  89. package/dist/components/input/input.component.mjs +21 -11
  90. package/dist/components/list/list.component.mjs +1 -0
  91. package/dist/components/list-item/list-item.component.mjs +34 -17
  92. package/dist/components/map/map.component.mjs +3 -0
  93. package/dist/components/map/map.styles.mjs +10 -0
  94. package/dist/components/menu/menu.component.mjs +1 -0
  95. package/dist/components/menu-item/menu-item.component.mjs +3 -0
  96. package/dist/components/menu-label/menu-label.component.mjs +1 -0
  97. package/dist/components/mutation-observer/mutation-observer.component.mjs +5 -6
  98. package/dist/components/option/option.component.mjs +2 -1
  99. package/dist/components/panel/panel.component.mjs +85 -1
  100. package/dist/components/panel/panel.styles.mjs +29 -0
  101. package/dist/components/panel-header/panel-header.component.mjs +14 -8
  102. package/dist/components/popup/popup.component.mjs +12 -11
  103. package/dist/components/progress-bar/progress-bar.component.mjs +3 -2
  104. package/dist/components/progress-ring/progress-ring.component.mjs +1 -0
  105. package/dist/components/query-builder/converters/javascript-filter-converter.mjs +0 -4
  106. package/dist/components/query-builder/converters/map-layer-filter-converter.mjs +0 -4
  107. package/dist/components/query-builder/query-builder.component.mjs +42 -15
  108. package/dist/components/radio/radio.component.mjs +10 -7
  109. package/dist/components/radio-group/radio-group.component.mjs +4 -1
  110. package/dist/components/range/range.component.mjs +4 -0
  111. package/dist/components/resize-observer/resize-observer.component.mjs +2 -1
  112. package/dist/components/scroll-view/scroll-view.component.mjs +1 -0
  113. package/dist/components/scroll-view/scroll-view.styles.mjs +20 -7
  114. package/dist/components/select/select.component.mjs +19 -21
  115. package/dist/components/split-view/split-view-layout-registry.mjs +44 -0
  116. package/dist/components/split-view/split-view-layout.mjs +607 -0
  117. package/dist/components/split-view/split-view.component.mjs +502 -468
  118. package/dist/components/split-view/split-view.styles.mjs +25 -0
  119. package/dist/components/split-view-divider/split-view-divider.component.mjs +2 -53
  120. package/dist/components/split-view-divider/split-view-divider.styles.mjs +28 -16
  121. package/dist/components/split-view-pane/split-view-pane.component.mjs +197 -18
  122. package/dist/components/split-view-pane/split-view-pane.styles.mjs +52 -0
  123. package/dist/components/split-view-toggle-button/split-view-toggle-button.component.mjs +5 -0
  124. package/dist/components/split-view-toggle-button/split-view-toggle-button.styles.mjs +3 -3
  125. package/dist/components/stepper/stepper.component.mjs +3 -2
  126. package/dist/components/stepper-panel/stepper-panel.component.mjs +4 -3
  127. package/dist/components/switch/switch.component.mjs +9 -8
  128. package/dist/components/tab/tab.component.mjs +21 -17
  129. package/dist/components/tab-group/tab-group.component.mjs +218 -44
  130. package/dist/components/tab-group/tab-group.styles.mjs +44 -0
  131. package/dist/components/tab-panel/tab-panel.component.mjs +1 -0
  132. package/dist/components/tag/tag.component.mjs +13 -12
  133. package/dist/components/textarea/textarea.component.mjs +11 -4
  134. package/dist/components/timer/ticker.mjs +7 -0
  135. package/dist/components/timer/timer.component.mjs +44 -3
  136. package/dist/components/timer/timer.styles.mjs +6 -2
  137. package/dist/components/tool-button/tool-button.component.mjs +4 -0
  138. package/dist/components/tool-button-group/tool-button-group.component.mjs +3 -0
  139. package/dist/components/tooltip/tooltip.component.mjs +3 -0
  140. package/dist/components/tree/tree.component.mjs +5 -2
  141. package/dist/components/tree-item/tree-item.component.mjs +5 -0
  142. package/dist/components/visually-hidden/visually-hidden.component.mjs +1 -0
  143. package/dist/custom-elements.json +7890 -1741
  144. package/dist/diagram/api/diagram-api-base.mjs +16 -0
  145. package/dist/diagram/api/diagram-api.mjs +399 -0
  146. package/dist/diagram/api/diagram-clipboard-api.mjs +52 -0
  147. package/dist/diagram/api/diagram-groups-api.mjs +46 -0
  148. package/dist/diagram/api/diagram-model-api.mjs +447 -0
  149. package/dist/diagram/api/diagram-nodes-api.mjs +61 -0
  150. package/dist/diagram/api/diagram-selection-api.mjs +56 -0
  151. package/dist/diagram/api/diagram-viewport-api.mjs +169 -0
  152. package/dist/diagram/api/emit-with-measurement-option.mjs +21 -0
  153. package/dist/diagram/input/box-selection-controller.mjs +104 -0
  154. package/dist/diagram/input/context-menu-controller.mjs +196 -0
  155. package/dist/diagram/input/cursor-position-tracker-controller.mjs +18 -0
  156. package/dist/diagram/input/input-controller.mjs +31 -0
  157. package/dist/diagram/input/keyboard-actions/moving-action.mjs +27 -0
  158. package/dist/diagram/input/keyboard-actions/panning-action.mjs +27 -0
  159. package/dist/diagram/input/keyboard-actions/paste-action.mjs +17 -0
  160. package/dist/diagram/input/keyboard-actions/zoom-action.mjs +30 -0
  161. package/dist/diagram/input/keyboard-inputs-controller.mjs +121 -0
  162. package/dist/diagram/input/linking-controller.mjs +127 -0
  163. package/dist/diagram/input/linking-events.mjs +61 -0
  164. package/dist/diagram/input/manual-linking.mjs +101 -0
  165. package/dist/diagram/input/mobile-box-selection-controller.mjs +133 -0
  166. package/dist/diagram/input/mobile-panning-controller.mjs +114 -0
  167. package/dist/diagram/input/mobile-zooming-controller.mjs +110 -0
  168. package/dist/diagram/input/object-selection-controller.mjs +152 -0
  169. package/dist/diagram/input/palette-drop-controller.mjs +92 -0
  170. package/dist/diagram/input/panning-controller.mjs +147 -0
  171. package/dist/diagram/input/pointer-move-selection-controller.mjs +191 -0
  172. package/dist/diagram/input/relinking-gesture.mjs +182 -0
  173. package/dist/diagram/input/resize-controller.mjs +122 -0
  174. package/dist/diagram/input/rotate-controller.mjs +126 -0
  175. package/dist/diagram/input/zooming-wheel-controller.mjs +55 -0
  176. package/dist/diagram/minimap/minimap-calculations.mjs +83 -0
  177. package/dist/diagram/minimap/minimap-navigation-controller.mjs +150 -0
  178. package/dist/diagram/minimap/minimap-node-cache.mjs +19 -0
  179. package/dist/diagram/minimap/minimap-strategies.mjs +44 -0
  180. package/dist/diagram/model/diagram-model-adapter.mjs +97 -0
  181. package/dist/diagram/model/initialize-model.mjs +31 -0
  182. package/dist/diagram/model/strip-runtime-properties.mjs +30 -0
  183. package/dist/diagram/runtime/attribute-converters.mjs +11 -0
  184. package/dist/diagram/runtime/batched-resize-observer.mjs +168 -0
  185. package/dist/diagram/runtime/box-selection-provider.mjs +9 -0
  186. package/dist/diagram/runtime/context.mjs +132 -0
  187. package/dist/diagram/runtime/contexts.mjs +8 -0
  188. package/dist/diagram/runtime/cursor-position-tracker.mjs +20 -0
  189. package/dist/diagram/runtime/default-edge-templates.mjs +21 -0
  190. package/dist/diagram/runtime/default-node-templates.mjs +20 -0
  191. package/dist/diagram/runtime/diagram-reference.mjs +126 -0
  192. package/dist/diagram/runtime/diagram-runtime.mjs +214 -0
  193. package/dist/diagram/runtime/dom-input-events-router.mjs +88 -0
  194. package/dist/diagram/runtime/environment.mjs +59 -0
  195. package/dist/diagram/runtime/event-bridge.mjs +31 -0
  196. package/dist/diagram/runtime/flow-offset.mjs +45 -0
  197. package/dist/diagram/runtime/group-highlighted.mjs +25 -0
  198. package/dist/diagram/runtime/hidden.mjs +147 -0
  199. package/dist/diagram/runtime/lit-renderer.mjs +33 -0
  200. package/dist/diagram/runtime/marker-registry.mjs +108 -0
  201. package/dist/diagram/runtime/middlewares.mjs +14 -0
  202. package/dist/diagram/runtime/model-owner.mjs +11 -0
  203. package/dist/diagram/runtime/node-selected.mjs +25 -0
  204. package/dist/diagram/runtime/observable.mjs +205 -0
  205. package/dist/diagram/runtime/palette-drag.mjs +56 -0
  206. package/dist/diagram/runtime/port-hover.mjs +27 -0
  207. package/dist/diagram/runtime/port-registry.mjs +87 -0
  208. package/dist/diagram/runtime/resize-processor.mjs +207 -0
  209. package/dist/diagram/runtime/template-resolver.mjs +98 -0
  210. package/dist/diagram/runtime/touch-events-state.mjs +52 -0
  211. package/dist/diagram/utilities.mjs +27 -0
  212. package/dist/diagram-core/action-state-manager/action-state-manager.mjs +238 -0
  213. package/dist/diagram-core/batch-processor/batch-processor.mjs +144 -0
  214. package/dist/diagram-core/command-handler/command-handler.mjs +62 -0
  215. package/dist/diagram-core/command-handler/commands/add-to-group.mjs +32 -0
  216. package/dist/diagram-core/command-handler/commands/add-update-delete.mjs +196 -0
  217. package/dist/diagram-core/command-handler/commands/centering.mjs +73 -0
  218. package/dist/diagram-core/command-handler/commands/copy-paste.mjs +223 -0
  219. package/dist/diagram-core/command-handler/commands/cut.mjs +9 -0
  220. package/dist/diagram-core/command-handler/commands/delete-selection.mjs +32 -0
  221. package/dist/diagram-core/command-handler/commands/detach-on-node-delete.mjs +77 -0
  222. package/dist/diagram-core/command-handler/commands/highlight-group.mjs +45 -0
  223. package/dist/diagram-core/command-handler/commands/index.mjs +88 -0
  224. package/dist/diagram-core/command-handler/commands/init.mjs +11 -0
  225. package/dist/diagram-core/command-handler/commands/linking/cancel-linking.mjs +26 -0
  226. package/dist/diagram-core/command-handler/commands/linking/finish-linking-to-position.mjs +33 -0
  227. package/dist/diagram-core/command-handler/commands/linking/finish-linking.mjs +108 -0
  228. package/dist/diagram-core/command-handler/commands/linking/finish-relinking.mjs +91 -0
  229. package/dist/diagram-core/command-handler/commands/linking/linking-gesture.mjs +13 -0
  230. package/dist/diagram-core/command-handler/commands/linking/move-temporary-edge.mjs +98 -0
  231. package/dist/diagram-core/command-handler/commands/linking/start-linking-from-position.mjs +23 -0
  232. package/dist/diagram-core/command-handler/commands/linking/start-linking.mjs +47 -0
  233. package/dist/diagram-core/command-handler/commands/linking/start-relinking.mjs +51 -0
  234. package/dist/diagram-core/command-handler/commands/linking/utils.mjs +103 -0
  235. package/dist/diagram-core/command-handler/commands/move-nodes-lifecycle.mjs +14 -0
  236. package/dist/diagram-core/command-handler/commands/move-viewport.mjs +48 -0
  237. package/dist/diagram-core/command-handler/commands/move.mjs +90 -0
  238. package/dist/diagram-core/command-handler/commands/remove-from-group.mjs +22 -0
  239. package/dist/diagram-core/command-handler/commands/resize-node-lifecycle.mjs +14 -0
  240. package/dist/diagram-core/command-handler/commands/resize-node.mjs +214 -0
  241. package/dist/diagram-core/command-handler/commands/rotate-node-lifecycle.mjs +14 -0
  242. package/dist/diagram-core/command-handler/commands/rotate-node.mjs +53 -0
  243. package/dist/diagram-core/command-handler/commands/selection.mjs +69 -0
  244. package/dist/diagram-core/command-handler/commands/z-order.mjs +125 -0
  245. package/dist/diagram-core/command-handler/commands/zoom-to-fit.mjs +118 -0
  246. package/dist/diagram-core/command-handler/commands/zoom.mjs +26 -0
  247. package/dist/diagram-core/edge-routing-manager/edge-routing-manager.mjs +253 -0
  248. package/dist/diagram-core/edge-routing-manager/resolve-label-position.mjs +13 -0
  249. package/dist/diagram-core/edge-routing-manager/routings/bezier/bezier-routing.mjs +73 -0
  250. package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-path.mjs +24 -0
  251. package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-point-at-distance.mjs +37 -0
  252. package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-point-on-path.mjs +33 -0
  253. package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-points.mjs +31 -0
  254. package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-path.mjs +56 -0
  255. package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-point-at-distance.mjs +12 -0
  256. package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-point-on-path.mjs +38 -0
  257. package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-points.mjs +26 -0
  258. package/dist/diagram-core/edge-routing-manager/routings/orthogonal/orthogonal-routing.mjs +69 -0
  259. package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/get-offset-point.mjs +14 -0
  260. package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-bottom.mjs +104 -0
  261. package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-left.mjs +91 -0
  262. package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-right.mjs +88 -0
  263. package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-top.mjs +168 -0
  264. package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints.mjs +23 -0
  265. package/dist/diagram-core/edge-routing-manager/routings/polyline/compute-polyline-point-at-distance.mjs +12 -0
  266. package/dist/diagram-core/edge-routing-manager/routings/polyline/compute-polyline-point-on-path.mjs +41 -0
  267. package/dist/diagram-core/edge-routing-manager/routings/polyline/polyline-routing.mjs +81 -0
  268. package/dist/diagram-core/edge-routing-manager/utils/linear-segment-utils.mjs +27 -0
  269. package/dist/diagram-core/edge-routing-manager/utils/normalize-distance.mjs +6 -0
  270. package/dist/diagram-core/event-manager/event-manager.mjs +164 -0
  271. package/dist/diagram-core/flow-config/default-flow-config.mjs +143 -0
  272. package/dist/diagram-core/flow-core.mjs +541 -0
  273. package/dist/diagram-core/input-events/handlers/box-selection/box-selection.handler.mjs +69 -0
  274. package/dist/diagram-core/input-events/handlers/cancel-interaction/cancel-interaction.handler.mjs +9 -0
  275. package/dist/diagram-core/input-events/handlers/copy/copy.handler.mjs +9 -0
  276. package/dist/diagram-core/input-events/handlers/cut/cut.handler.mjs +9 -0
  277. package/dist/diagram-core/input-events/handlers/delete-selection/delete-selection.handler.mjs +9 -0
  278. package/dist/diagram-core/input-events/handlers/event-handler.mjs +29 -0
  279. package/dist/diagram-core/input-events/handlers/keyboard-move-selection/keyboard-move-selection.handler.mjs +130 -0
  280. package/dist/diagram-core/input-events/handlers/keyboard-panning/keyboard-panning.handler.mjs +31 -0
  281. package/dist/diagram-core/input-events/handlers/linking/linking.handler.mjs +77 -0
  282. package/dist/diagram-core/input-events/handlers/movable-selection.mjs +26 -0
  283. package/dist/diagram-core/input-events/handlers/palette-drop/palette-drop.handler.mjs +20 -0
  284. package/dist/diagram-core/input-events/handlers/panning/panning-handler-factory.mjs +8 -0
  285. package/dist/diagram-core/input-events/handlers/panning/panning.handler.mjs +41 -0
  286. package/dist/diagram-core/input-events/handlers/panning/virtualized-panning.handler.mjs +77 -0
  287. package/dist/diagram-core/input-events/handlers/paste/paste.handler.mjs +17 -0
  288. package/dist/diagram-core/input-events/handlers/pointer-move-selection/pointer-move-selection.handler.mjs +220 -0
  289. package/dist/diagram-core/input-events/handlers/redo/redo.handler.mjs +14 -0
  290. package/dist/diagram-core/input-events/handlers/relinking/relinking.handler.mjs +62 -0
  291. package/dist/diagram-core/input-events/handlers/resize/resize.handler.mjs +174 -0
  292. package/dist/diagram-core/input-events/handlers/rotate/rotate.handler.mjs +107 -0
  293. package/dist/diagram-core/input-events/handlers/select/select.handler.mjs +42 -0
  294. package/dist/diagram-core/input-events/handlers/select-all/select-all.handler.mjs +10 -0
  295. package/dist/diagram-core/input-events/handlers/undo/undo.handler.mjs +14 -0
  296. package/dist/diagram-core/input-events/handlers/wheel-panning/wheel-panning.handler.mjs +25 -0
  297. package/dist/diagram-core/input-events/handlers/zooming/zooming.handler.mjs +28 -0
  298. package/dist/diagram-core/input-events/input-events.router.mjs +75 -0
  299. package/dist/diagram-core/interaction-coordinator/interaction-coordinator.mjs +75 -0
  300. package/dist/diagram-core/label-batch-processor/label-batch-processor.mjs +19 -0
  301. package/dist/diagram-core/math/angle-between-points/angle-between-points.mjs +5 -0
  302. package/dist/diagram-core/math/angle-to-side/angle-to-side.mjs +27 -0
  303. package/dist/diagram-core/math/calculate-edge-panning-force/calculate-edge-panning-force.mjs +34 -0
  304. package/dist/diagram-core/math/clamp/clamp.mjs +5 -0
  305. package/dist/diagram-core/math/distance-between-points/distance-between-points.mjs +5 -0
  306. package/dist/diagram-core/math/ng-diagram-math.mjs +25 -0
  307. package/dist/diagram-core/math/normalize-angle/normalize-angle.mjs +5 -0
  308. package/dist/diagram-core/math/snap-angle/snap-angle.mjs +43 -0
  309. package/dist/diagram-core/math/snap-number/snap-number.mjs +3 -0
  310. package/dist/diagram-core/math/snap-point/snap-point.mjs +8 -0
  311. package/dist/diagram-core/math/subtract-points/subtract-points.mjs +5 -0
  312. package/dist/diagram-core/measurement-tracker/measurement-tracker.mjs +182 -0
  313. package/dist/diagram-core/middleware-manager/middleware-executor.mjs +246 -0
  314. package/dist/diagram-core/middleware-manager/middleware-manager.mjs +93 -0
  315. package/dist/diagram-core/middleware-manager/middlewares/edges-routing/edges-routing.mjs +149 -0
  316. package/dist/diagram-core/middleware-manager/middlewares/edges-routing/get-edge-points.mjs +93 -0
  317. package/dist/diagram-core/middleware-manager/middlewares/edges-routing/get-source-target-positions.mjs +90 -0
  318. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/clipboard-paste.emitter.mjs +34 -0
  319. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/diagram-init.emitter.mjs +190 -0
  320. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/edge-draw-ended.emitter.mjs +51 -0
  321. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/edge-drawn.emitter.mjs +35 -0
  322. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/edge-relink.emitter.mjs +58 -0
  323. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/group-membership-changed.emitter.mjs +49 -0
  324. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/node-drag-lifecycle.emitter.mjs +54 -0
  325. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/node-resize-lifecycle.emitter.mjs +44 -0
  326. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/node-rotate-lifecycle.emitter.mjs +44 -0
  327. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/palette-item-dropped.emitter.mjs +26 -0
  328. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-changed.emitter.mjs +61 -0
  329. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-gesture-ended.emitter.mjs +32 -0
  330. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-moved.emitter.mjs +57 -0
  331. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-removed.emitter.mjs +40 -0
  332. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-rotated.emitter.mjs +33 -0
  333. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/size-changed.emitter.mjs +33 -0
  334. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/viewport-changed.emitter.mjs +19 -0
  335. package/dist/diagram-core/middleware-manager/middlewares/event-emitter/event-emitter.middleware.mjs +69 -0
  336. package/dist/diagram-core/middleware-manager/middlewares/hidden-computation/hidden-computation.mjs +66 -0
  337. package/dist/diagram-core/middleware-manager/middlewares/internal-id-assignment/internal-id-assignment.mjs +24 -0
  338. package/dist/diagram-core/middleware-manager/middlewares/logger/logger.mjs +18 -0
  339. package/dist/diagram-core/middleware-manager/middlewares/measured-bounds-assignment/is-node-fully-measured.mjs +20 -0
  340. package/dist/diagram-core/middleware-manager/middlewares/measured-bounds-assignment/measured-bounds-assignment.mjs +59 -0
  341. package/dist/diagram-core/middleware-manager/middlewares/measurement-tracking/measurement-tracking.middleware.mjs +55 -0
  342. package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/assign-edges-z-index.mjs +12 -0
  343. package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/assign-node-z-index.mjs +61 -0
  344. package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/create-group-children-map.mjs +14 -0
  345. package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/initialize-z-index.mjs +30 -0
  346. package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/sort-children.mjs +36 -0
  347. package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/z-index-assignment.mjs +240 -0
  348. package/dist/diagram-core/middleware-manager/pass-settlement.mjs +68 -0
  349. package/dist/diagram-core/model-lookup/model-lookup.mjs +394 -0
  350. package/dist/diagram-core/port-batch-processor/port-batch-processor.mjs +20 -0
  351. package/dist/diagram-core/render-strategy/base-render-strategy.mjs +26 -0
  352. package/dist/diagram-core/render-strategy/direct/direct-render-strategy.mjs +33 -0
  353. package/dist/diagram-core/render-strategy/render-performance-logger.mjs +42 -0
  354. package/dist/diagram-core/render-strategy/virtualized/idle-render-scheduler.mjs +43 -0
  355. package/dist/diagram-core/render-strategy/virtualized/result-cache.mjs +63 -0
  356. package/dist/diagram-core/render-strategy/virtualized/viewport-utils.mjs +40 -0
  357. package/dist/diagram-core/render-strategy/virtualized/virtualized-render-strategy.mjs +91 -0
  358. package/dist/diagram-core/render-strategy/virtualized/visible-elements-resolver.mjs +120 -0
  359. package/dist/diagram-core/render-strategy/virtualized/zoom-tracker.mjs +38 -0
  360. package/dist/diagram-core/set.polyfill.mjs +24 -0
  361. package/dist/diagram-core/shortcut-manager/default-shortcuts.mjs +99 -0
  362. package/dist/diagram-core/shortcut-manager/shortcut-manager.mjs +140 -0
  363. package/dist/diagram-core/spatial-hash/collision-detection.mjs +74 -0
  364. package/dist/diagram-core/spatial-hash/spatial-hash.mjs +161 -0
  365. package/dist/diagram-core/spatial-hash/utils.mjs +92 -0
  366. package/dist/diagram-core/transaction-manager/transaction-context.mjs +40 -0
  367. package/dist/diagram-core/transaction-manager/transaction-manager.mjs +94 -0
  368. package/dist/diagram-core/transaction-manager/transaction.mjs +179 -0
  369. package/dist/diagram-core/types/edge.interface.mjs +3 -0
  370. package/dist/diagram-core/types/node.interface.mjs +3 -0
  371. package/dist/diagram-core/types/utils.mjs +3 -0
  372. package/dist/diagram-core/updater/init-updater/init-state.mjs +356 -0
  373. package/dist/diagram-core/updater/init-updater/init-updater.mjs +275 -0
  374. package/dist/diagram-core/updater/init-updater/late-arrival-queue.mjs +71 -0
  375. package/dist/diagram-core/updater/init-updater/stability-detector.mjs +63 -0
  376. package/dist/diagram-core/updater/internal-updater/internal-updater.mjs +166 -0
  377. package/dist/diagram-core/utils/change-generation.mjs +13 -0
  378. package/dist/diagram-core/utils/compute-floating-edge-side.mjs +35 -0
  379. package/dist/diagram-core/utils/constants.mjs +3 -0
  380. package/dist/diagram-core/utils/dangling-edges.mjs +89 -0
  381. package/dist/diagram-core/utils/deep-merge.mjs +22 -0
  382. package/dist/diagram-core/utils/dimensions.mjs +52 -0
  383. package/dist/diagram-core/utils/get-node-border-intersection.mjs +99 -0
  384. package/dist/diagram-core/utils/get-port-flow-position.mjs +55 -0
  385. package/dist/diagram-core/utils/group-size.mjs +32 -0
  386. package/dist/diagram-core/utils/is-group.mjs +5 -0
  387. package/dist/diagram-core/utils/measurement-validation.mjs +11 -0
  388. package/dist/diagram-core/utils/object-properties.mjs +22 -0
  389. package/dist/diagram-core/utils/rects-points-sizes.mjs +148 -0
  390. package/dist/diagram-core/utils/relinking.mjs +6 -0
  391. package/dist/diagram-core/utils/semaphore.mjs +43 -0
  392. package/dist/diagram-core/utils/snap-node-position.mjs +11 -0
  393. package/dist/diagram-core/utils/sort-nodes-by-z-index.mjs +22 -0
  394. package/dist/diagram-core/visibility/effective-visibility.mjs +28 -0
  395. package/dist/diagram-core/visibility/template-visibility-registry.mjs +87 -0
  396. package/dist/index.d.mts +13296 -3667
  397. package/dist/index.d.ts +13296 -3667
  398. package/dist/index.mjs +34 -0
  399. package/dist/internal/content-size.mjs +14 -0
  400. package/dist/internal/custom-boolean-converter.mjs +18 -0
  401. package/dist/internal/flow-ui-rdf-element.mjs +57 -5
  402. package/dist/internal/form.mjs +1 -1
  403. package/dist/internal/on-off-converter.mjs +21 -0
  404. package/dist/package.json.mjs +1 -1
  405. package/dist/utilities/register-components.mjs +77 -142
  406. package/dist/vscode.html-custom-data.json +426 -156
  407. package/package.json +35 -40
  408. package/themes/dark.css +7 -5
  409. package/themes/dark.styles.js +7 -5
  410. package/themes/light.css +7 -5
  411. package/themes/light.styles.js +7 -5
@@ -0,0 +1,125 @@
1
+ import { html, nothing, svg } from 'lit';
2
+ import { property, state } from 'lit/decorators.js';
3
+ import { classMap } from 'lit/directives/class-map.js';
4
+ import { RotateController } from '../../diagram/input/rotate-controller.mjs';
5
+ import { optionalBooleanConverter } from '../../diagram/runtime/attribute-converters.mjs';
6
+ import { ContextConsumer } from '../../diagram/runtime/context.mjs';
7
+ import { diagramRuntimeContext, diagramNodeContext } from '../../diagram/runtime/contexts.mjs';
8
+ import { DiagramObserver } from '../../diagram/runtime/observable.mjs';
9
+ import { DIAGRAM_ROTATE_HANDLE_CLASS } from '../../diagram/runtime/port-hover.mjs';
10
+ import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
11
+ import styles from './diagram-rotate-adornment.styles.mjs';
12
+
13
+ var __defProp = Object.defineProperty;
14
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15
+ var __decorateClass = (decorators, target, key, kind) => {
16
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
17
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
18
+ if (decorator = decorators[i])
19
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
20
+ if (kind && result)
21
+ __defProp(target, key, result);
22
+ return result;
23
+ };
24
+ const rotateIcon = svg`
25
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none" aria-hidden="true">
26
+ <path
27
+ d="M15.75 9.5637C15.7502 11.3383 15.0515 13.0416 13.8051 14.3049C12.5588 15.5682 10.8651 16.2899 9.0907 16.3137H9C7.27611 16.318 5.61676 15.6583 4.36641 14.4715C4.31271 14.4207 4.26955 14.3599 4.23938 14.2924C4.20921 14.2249 4.19262 14.1522 4.19056 14.0783C4.1885 14.0044 4.20102 13.9309 4.22739 13.8618C4.25376 13.7928 4.29347 13.7296 4.34426 13.6759C4.39504 13.6222 4.45591 13.5791 4.52337 13.5489C4.59084 13.5187 4.66359 13.5021 4.73746 13.5001C4.81134 13.498 4.8849 13.5105 4.95394 13.5369C5.02298 13.5633 5.08615 13.603 5.13984 13.6538C5.94408 14.4122 6.95396 14.9169 8.04335 15.1047C9.13273 15.2926 10.2533 15.1553 11.2651 14.7099C12.2769 14.2646 13.1351 13.531 13.7324 12.6008C14.3297 11.6706 14.6396 10.585 14.6235 9.4797C14.6075 8.37436 14.266 7.29826 13.6419 6.38583C13.0178 5.4734 12.1387 4.76509 11.1144 4.34939C10.09 3.9337 8.96594 3.82904 7.88249 4.04849C6.79903 4.26794 5.80425 4.80178 5.02242 5.58331C5.01668 5.58952 5.01057 5.59539 5.00414 5.60089L3.13523 7.3137H5.0625C5.21168 7.3137 5.35476 7.37296 5.46025 7.47845C5.56574 7.58394 5.625 7.72701 5.625 7.8762C5.625 8.02538 5.56574 8.16846 5.46025 8.27395C5.35476 8.37944 5.21168 8.4387 5.0625 8.4387H1.6875C1.53832 8.4387 1.39524 8.37944 1.28975 8.27395C1.18426 8.16846 1.125 8.02538 1.125 7.8762V4.5012C1.125 4.35201 1.18426 4.20894 1.28975 4.10345C1.39524 3.99796 1.53832 3.9387 1.6875 3.9387C1.83668 3.9387 1.97976 3.99796 2.08525 4.10345C2.19074 4.20894 2.25 4.35201 2.25 4.5012V6.59651L4.23633 4.78245C5.18131 3.84113 6.384 3.20089 7.69256 2.94253C9.00112 2.68418 10.3569 2.8193 11.5887 3.33084C12.8205 3.84238 13.8732 4.7074 14.6138 5.81671C15.3544 6.92602 15.7498 8.22988 15.75 9.5637Z"
28
+ fill="currentColor"
29
+ />
30
+ </svg>
31
+ `;
32
+ class FlowUiDiagramRotateAdornment extends FlowRdfElement {
33
+ constructor() {
34
+ super();
35
+ this.hasCustomHandle = false;
36
+ this.pressed = false;
37
+ this.onNode = false;
38
+ this.nodeObserver = new DiagramObserver(this);
39
+ this.configObserver = new DiagramObserver(this);
40
+ // ngDiagram's handle marks itself as rotating from any press until the next pointerup anywhere
41
+ this.onHandlePointerDown = () => {
42
+ this.pressed = true;
43
+ document.addEventListener("pointerup", this.release);
44
+ };
45
+ this.release = () => {
46
+ this.pressed = false;
47
+ document.removeEventListener("pointerup", this.release);
48
+ };
49
+ new ContextConsumer(this, {
50
+ context: diagramRuntimeContext,
51
+ callback: (runtime) => {
52
+ this.runtime = runtime;
53
+ this.configObserver.setSource(runtime.config);
54
+ }
55
+ });
56
+ new ContextConsumer(this, {
57
+ context: diagramNodeContext,
58
+ callback: (nodeContext) => {
59
+ this.onNode = true;
60
+ this.nodeObserver.setSource(nodeContext.node);
61
+ }
62
+ });
63
+ this.rotateController = new RotateController(
64
+ this,
65
+ () => this.runtime,
66
+ () => this.nodeObserver.value
67
+ );
68
+ }
69
+ disconnectedCallback() {
70
+ super.disconnectedCallback();
71
+ this.release();
72
+ }
73
+ /** Whether the node is rotatable: the node's own setting, then this adornment's default, then the diagram's. */
74
+ get rotatable() {
75
+ return !!(this.nodeObserver.value?.rotatable ?? this.defaultRotatable ?? this.configObserver.value?.nodeRotation?.defaultRotatable);
76
+ }
77
+ get handleShown() {
78
+ return this.onNode && !!this.nodeObserver.value?.selected && this.rotatable;
79
+ }
80
+ // The node changes on every drag step, but only its selection and rotatable flag matter here
81
+ shouldUpdate(changed) {
82
+ return changed.size > 0 || this.handleShown !== this.renderedShown;
83
+ }
84
+ updated() {
85
+ this.renderedShown = this.handleShown;
86
+ if (!this.renderedShown && this.rotateController.active) {
87
+ this.rotateController.cancel();
88
+ }
89
+ }
90
+ render() {
91
+ return html`
92
+ <div
93
+ part="handle"
94
+ class=${classMap({
95
+ [DIAGRAM_ROTATE_HANDLE_CLASS]: true,
96
+ handle: true,
97
+ "handle--default": !this.hasCustomHandle
98
+ })}
99
+ ?hidden=${!this.handleShown}
100
+ ?data-rotating=${this.pressed}
101
+ @pointerdown=${this.onHandlePointerDown}
102
+ >
103
+ <div class="content-projection"><slot @slotchange=${this.onSlotChange}></slot></div>
104
+ ${this.hasCustomHandle ? nothing : rotateIcon}
105
+ </div>
106
+ `;
107
+ }
108
+ onSlotChange(event) {
109
+ const slot = event.target;
110
+ this.hasCustomHandle = slot.assignedNodes({ flatten: true }).some((node) => node.nodeType === Node.ELEMENT_NODE || !!node.textContent?.trim());
111
+ }
112
+ }
113
+ FlowUiDiagramRotateAdornment.tagName = "flow-ui-diagram-rotate-adornment";
114
+ FlowUiDiagramRotateAdornment.styles = styles;
115
+ __decorateClass([
116
+ property({ attribute: "default-rotatable", converter: optionalBooleanConverter })
117
+ ], FlowUiDiagramRotateAdornment.prototype, "defaultRotatable", 2);
118
+ __decorateClass([
119
+ state()
120
+ ], FlowUiDiagramRotateAdornment.prototype, "hasCustomHandle", 2);
121
+ __decorateClass([
122
+ state()
123
+ ], FlowUiDiagramRotateAdornment.prototype, "pressed", 2);
124
+
125
+ export { FlowUiDiagramRotateAdornment as default };
@@ -0,0 +1,5 @@
1
+ import FlowUiDiagramRotateAdornment from './diagram-rotate-adornment.component.mjs';
2
+
3
+
4
+
5
+ export { FlowUiDiagramRotateAdornment as default };
@@ -0,0 +1,65 @@
1
+ import { css } from 'lit';
2
+ import componentStyles from '../../styles/component.styles.mjs';
3
+
4
+ const styles = css`
5
+ ${componentStyles}
6
+
7
+ :host {
8
+ display: block;
9
+ position: absolute;
10
+ inset: 0;
11
+ pointer-events: none;
12
+ }
13
+
14
+ .handle {
15
+ display: flex;
16
+ justify-content: center;
17
+ align-items: center;
18
+ position: absolute;
19
+ top: var(--flow-ui-diagram-rotate-handle-top);
20
+ right: var(--flow-ui-diagram-rotate-handle-right);
21
+ bottom: var(--flow-ui-diagram-rotate-handle-bottom);
22
+ left: var(--flow-ui-diagram-rotate-handle-left);
23
+ width: var(--flow-ui-diagram-rotate-handle-size);
24
+ height: var(--flow-ui-diagram-rotate-handle-size);
25
+ transform: translate(50%, -50%);
26
+ z-index: 10;
27
+ pointer-events: auto;
28
+ cursor: grab;
29
+ }
30
+
31
+ .handle[data-rotating] {
32
+ cursor: grabbing;
33
+ }
34
+
35
+ .content-projection:empty {
36
+ display: none;
37
+ }
38
+
39
+ .content-projection {
40
+ width: 100%;
41
+ height: 100%;
42
+ }
43
+
44
+ .handle--default .content-projection {
45
+ display: none;
46
+ }
47
+
48
+ /* The built-in handle */
49
+ .handle--default {
50
+ color: #fff;
51
+ background-color: var(--flow-ui-diagram-rotate-handle-background-color);
52
+ border-radius: 50%;
53
+ transition: background-color 0.1s ease-in-out;
54
+ }
55
+
56
+ .handle--default:hover {
57
+ background-color: var(--flow-ui-diagram-rotate-handle-background-color-hover);
58
+ }
59
+
60
+ .handle--default[data-rotating] {
61
+ background-color: var(--flow-ui-diagram-rotate-handle-background-color-active);
62
+ }
63
+ `;
64
+
65
+ export { styles as default };
@@ -0,0 +1,158 @@
1
+ import { html, nothing } from 'lit';
2
+ import { property } from 'lit/decorators.js';
3
+ import { classMap } from 'lit/directives/class-map.js';
4
+ import { DiagramReferenceController, DIAGRAM_TOKENS_ATTRIBUTE, isInsideDiagramTokens } from '../../diagram/runtime/diagram-reference.mjs';
5
+ import { DiagramObserver } from '../../diagram/runtime/observable.mjs';
6
+ import customBooleanConverter from '../../internal/custom-boolean-converter.mjs';
7
+ import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
8
+ import FlowUiIconButton from '../icon-button/icon-button.component.mjs';
9
+ import styles from './diagram-zoom-controls.styles.mjs';
10
+
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __decorateClass = (decorators, target, key, kind) => {
14
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
15
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
16
+ if (decorator = decorators[i])
17
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
18
+ if (kind && result)
19
+ __defProp(target, key, result);
20
+ return result;
21
+ };
22
+ const SCALE_EPSILON = 1e-6;
23
+ const roundScale = (scale) => Number(scale.toFixed(6));
24
+ class FlowUiDiagramZoomControls extends FlowRdfElement {
25
+ constructor() {
26
+ super();
27
+ this.step = 0.1;
28
+ this.showFit = true;
29
+ this.viewportObserver = new DiagramObserver(this);
30
+ this.configObserver = new DiagramObserver(this);
31
+ this.initializedObserver = new DiagramObserver(this);
32
+ this.reference = new DiagramReferenceController(this, {
33
+ getReference: () => this.diagram,
34
+ onChange: (runtime) => this.observeRuntime(runtime)
35
+ });
36
+ }
37
+ connectedCallback() {
38
+ super.connectedCallback();
39
+ if (!this.hasAttribute("slot") && this.parentElement?.localName === "flow-ui-diagram") {
40
+ this.setAttribute("slot", "overlay");
41
+ }
42
+ this.toggleAttribute(DIAGRAM_TOKENS_ATTRIBUTE, !isInsideDiagramTokens(this));
43
+ }
44
+ willUpdate(changed) {
45
+ if (changed.has("diagram")) {
46
+ this.reference.update();
47
+ }
48
+ }
49
+ observeRuntime(runtime) {
50
+ this.viewportObserver.setSource(runtime?.renderer.viewport);
51
+ this.configObserver.setSource(runtime?.config);
52
+ this.initializedObserver.setSource(runtime?.isInitialized);
53
+ }
54
+ get scale() {
55
+ return this.viewportObserver.value?.scale || 1;
56
+ }
57
+ get canZoomIn() {
58
+ const config = this.configObserver.value;
59
+ return !!this.initializedObserver.value && !!config && this.scale < config.zoom.max - SCALE_EPSILON;
60
+ }
61
+ get canZoomOut() {
62
+ const config = this.configObserver.value;
63
+ return !!this.initializedObserver.value && !!config && this.scale > config.zoom.min + SCALE_EPSILON;
64
+ }
65
+ /** Zooms in by `step`, around the center of the view. */
66
+ zoomIn() {
67
+ this.zoomBy(this.step);
68
+ }
69
+ /** Zooms out by `step`, around the center of the view. */
70
+ zoomOut() {
71
+ this.zoomBy(-this.step);
72
+ }
73
+ /** Fits the diagram content into the view. */
74
+ fit() {
75
+ const flowCore = this.reference.runtime?.flowCore.value;
76
+ if (flowCore && this.initializedObserver.value) {
77
+ void flowCore.commandHandler.emit("zoomToFit", {});
78
+ }
79
+ }
80
+ zoomBy(delta) {
81
+ const runtime = this.reference.runtime;
82
+ const flowCore = runtime?.flowCore.value;
83
+ if (!runtime || !flowCore || !this.initializedObserver.value) {
84
+ return;
85
+ }
86
+ const viewport = runtime.renderer.viewport.value;
87
+ const { min, max } = flowCore.config.zoom;
88
+ const scale = viewport.scale || 1;
89
+ const next = Math.min(max, Math.max(min, roundScale(scale + delta)));
90
+ if (Math.abs(next - scale) < SCALE_EPSILON) {
91
+ return;
92
+ }
93
+ const factor = next / scale;
94
+ const centerX = (viewport.width ?? 0) / 2;
95
+ const centerY = (viewport.height ?? 0) / 2;
96
+ void flowCore.commandHandler.emit("zoom", {
97
+ scale: next,
98
+ x: centerX - (centerX - viewport.x) * factor,
99
+ y: centerY - (centerY - viewport.y) * factor
100
+ });
101
+ }
102
+ render() {
103
+ const initialized = !!this.initializedObserver.value;
104
+ const percentage = Math.round(this.scale * 100);
105
+ const canFit = initialized && !this.reference.runtime?.flowCore.value?.isVirtualizationActive;
106
+ return html`
107
+ <div part="base" class=${classMap({ "zoom-controls": true, panel: !!this.position })}>
108
+ <flow-ui-icon-button
109
+ part="zoom-out"
110
+ class="nav-button"
111
+ library="system"
112
+ name="minus"
113
+ label="Zoom out"
114
+ ?disabled=${!this.canZoomOut}
115
+ @click=${this.zoomOut}
116
+ ></flow-ui-icon-button>
117
+ <span part="label" class="label" aria-live="polite">${percentage}%</span>
118
+ <flow-ui-icon-button
119
+ part="zoom-in"
120
+ class="nav-button"
121
+ library="system"
122
+ name="plus"
123
+ label="Zoom in"
124
+ ?disabled=${!this.canZoomIn}
125
+ @click=${this.zoomIn}
126
+ ></flow-ui-icon-button>
127
+ ${this.showFit ? html`
128
+ <flow-ui-icon-button
129
+ part="fit"
130
+ class="nav-button"
131
+ library="system"
132
+ name="expand"
133
+ label="Fit to view"
134
+ ?disabled=${!canFit}
135
+ @click=${this.fit}
136
+ ></flow-ui-icon-button>
137
+ ` : nothing}
138
+ </div>
139
+ `;
140
+ }
141
+ }
142
+ FlowUiDiagramZoomControls.tagName = "flow-ui-diagram-zoom-controls";
143
+ FlowUiDiagramZoomControls.styles = styles;
144
+ FlowUiDiagramZoomControls.dependencies = [FlowUiIconButton];
145
+ __decorateClass([
146
+ property()
147
+ ], FlowUiDiagramZoomControls.prototype, "diagram", 2);
148
+ __decorateClass([
149
+ property({ type: Number })
150
+ ], FlowUiDiagramZoomControls.prototype, "step", 2);
151
+ __decorateClass([
152
+ property({ reflect: true })
153
+ ], FlowUiDiagramZoomControls.prototype, "position", 2);
154
+ __decorateClass([
155
+ property({ attribute: "show-fit", converter: customBooleanConverter })
156
+ ], FlowUiDiagramZoomControls.prototype, "showFit", 2);
157
+
158
+ export { FlowUiDiagramZoomControls as default };
@@ -0,0 +1,5 @@
1
+ import FlowUiDiagramZoomControls from './diagram-zoom-controls.component.mjs';
2
+
3
+
4
+
5
+ export { FlowUiDiagramZoomControls as default };
@@ -0,0 +1,68 @@
1
+ import { css } from 'lit';
2
+ import componentStyles from '../../styles/component.styles.mjs';
3
+ import panelStyles from '../diagram/diagram-panel.styles.mjs';
4
+ import { standaloneDiagramTokens } from '../diagram/diagram-tokens.styles.mjs';
5
+
6
+ const styles = css`
7
+ ${componentStyles}
8
+ ${standaloneDiagramTokens}
9
+ ${panelStyles}
10
+
11
+ :host {
12
+ display: block;
13
+ font-family: var(--flow-ui-font-sans);
14
+ cursor: default;
15
+ }
16
+
17
+ .zoom-controls {
18
+ display: flex;
19
+ flex-direction: row;
20
+ align-items: center;
21
+ justify-content: space-between;
22
+ gap: 0;
23
+ }
24
+
25
+ .zoom-controls.panel {
26
+ padding: calc(var(--flow-ui-diagram-minimap-padding) / 2);
27
+ }
28
+
29
+ .label {
30
+ min-width: 3em;
31
+ text-align: center;
32
+ font-size: var(--flow-ui-diagram-zoom-controls-font-size);
33
+ font-weight: var(--flow-ui-diagram-zoom-controls-font-weight);
34
+ color: var(--flow-ui-diagram-zoom-controls-color);
35
+ font-variant-numeric: tabular-nums;
36
+ user-select: none;
37
+ }
38
+
39
+ .nav-button {
40
+ font-size: var(--flow-ui-diagram-nav-button-size);
41
+ color: var(--flow-ui-diagram-nav-button-color);
42
+ --hover-color: var(--flow-ui-diagram-nav-button-color);
43
+ --active-color: var(--flow-ui-diagram-nav-button-color-active);
44
+ }
45
+
46
+ .nav-button::part(base) {
47
+ padding: var(--flow-ui-diagram-nav-button-padding);
48
+ border-radius: var(--flow-ui-diagram-nav-button-border-radius);
49
+ transition:
50
+ var(--flow-ui-transition-x-fast) color,
51
+ var(--flow-ui-transition-x-fast) background-color;
52
+ }
53
+
54
+ .nav-button:not([disabled])::part(base):hover {
55
+ background-color: var(--flow-ui-diagram-nav-button-background-color-hover);
56
+ }
57
+
58
+ .nav-button[disabled] {
59
+ color: var(--flow-ui-diagram-nav-button-color-disabled);
60
+ }
61
+
62
+ .nav-button[disabled]::part(base) {
63
+ opacity: 1;
64
+ cursor: default;
65
+ }
66
+ `;
67
+
68
+ export { styles as default };
@@ -13,6 +13,8 @@ import { capitalize } from '../../internal/string.mjs';
13
13
  import { watch } from '../../internal/watch.mjs';
14
14
  import { getAnimation, setDefaultAnimation } from '../../utilities/animation-registry.mjs';
15
15
  import { LocalizeController } from '../../utilities/localize.mjs';
16
+ import FlowUiTabGroup from '../tab-group/tab-group.component.mjs';
17
+ import FlowUiIconButton from '../icon-button/icon-button.component.mjs';
16
18
  import styles from './dialog.styles.mjs';
17
19
 
18
20
  var __defProp = Object.defineProperty;
@@ -235,7 +237,7 @@ class FlowUiDialog extends FlowRdfElement {
235
237
  aria-modal="true"
236
238
  aria-hidden=${this.open ? "false" : "true"}
237
239
  aria-label=${ifDefined(this.noHeader ? this.title : void 0)}
238
- aria-labelledby=${ifDefined(!this.noHeader ? "title" : void 0)}
240
+ aria-labelledby=${ifDefined(!this.noHeader ? "heading" : void 0)}
239
241
  tabindex="0"
240
242
  >
241
243
  ${this.tabbed ? this.renderTabContainer() : this.renderDefaultContainer()}
@@ -244,7 +246,9 @@ class FlowUiDialog extends FlowRdfElement {
244
246
  `;
245
247
  }
246
248
  }
249
+ FlowUiDialog.tagName = "flow-ui-dialog";
247
250
  FlowUiDialog.styles = styles;
251
+ FlowUiDialog.dependencies = [FlowUiIconButton, FlowUiTabGroup];
248
252
  __decorateClass([
249
253
  query(".dialog")
250
254
  ], FlowUiDialog.prototype, "dialog", 2);
@@ -34,6 +34,7 @@ class FlowUiDivider extends FlowRdfElement {
34
34
  }
35
35
  */
36
36
  }
37
+ FlowUiDivider.tagName = "flow-ui-divider";
37
38
  FlowUiDivider.styles = styles;
38
39
  __decorateClass([
39
40
  property({ type: Boolean, reflect: true })
@@ -13,6 +13,7 @@ import { uppercaseFirstLetter } from '../../internal/string.mjs';
13
13
  import { watch } from '../../internal/watch.mjs';
14
14
  import { getAnimation, setDefaultAnimation } from '../../utilities/animation-registry.mjs';
15
15
  import { LocalizeController } from '../../utilities/localize.mjs';
16
+ import FlowUiIconButton from '../icon-button/icon-button.component.mjs';
16
17
  import styles from './drawer.styles.mjs';
17
18
 
18
19
  var __defProp = Object.defineProperty;
@@ -205,25 +206,25 @@ class FlowUiDrawer extends FlowRdfElement {
205
206
  tabindex="0"
206
207
  >
207
208
  ${!this.noHeader ? html`
208
- <header part="header" class="drawer__header">
209
- <h2 part="title" class="drawer__title" id="title">
210
- <!-- If there's no label, use an invisible character to prevent the header from collapsing -->
211
- <slot name="label">${this.label.length > 0 ? this.label : String.fromCharCode(65279)}</slot>
212
- </h2>
213
- <div part="header-actions" class="drawer__header-actions">
214
- <slot name="header-actions"></slot>
215
- <flow-ui-icon-button
216
- part="close-button"
217
- exportparts="base:close-button__base"
218
- class="drawer__close"
219
- name="x-lg"
220
- label=${this.localize.term("close")}
221
- library="system"
222
- @click=${() => this.requestClose("close-button")}
223
- ></flow-ui-icon-button>
224
- </div>
225
- </header>
226
- ` : ""}
209
+ <header part="header" class="drawer__header">
210
+ <h2 part="title" class="drawer__title" id="title">
211
+ <!-- If there's no label, use an invisible character to prevent the header from collapsing -->
212
+ <slot name="label">${this.label.length > 0 ? this.label : String.fromCharCode(65279)}</slot>
213
+ </h2>
214
+ <div part="header-actions" class="drawer__header-actions">
215
+ <slot name="header-actions"></slot>
216
+ <flow-ui-icon-button
217
+ part="close-button"
218
+ exportparts="base:close-button__base"
219
+ class="drawer__close"
220
+ name="x-lg"
221
+ label=${this.localize.term("close")}
222
+ library="system"
223
+ @click=${() => this.requestClose("close-button")}
224
+ ></flow-ui-icon-button>
225
+ </div>
226
+ </header>
227
+ ` : ""}
227
228
 
228
229
  <slot part="body" class="drawer__body"></slot>
229
230
 
@@ -235,7 +236,9 @@ class FlowUiDrawer extends FlowRdfElement {
235
236
  `;
236
237
  }
237
238
  }
239
+ FlowUiDrawer.tagName = "flow-ui-drawer";
238
240
  FlowUiDrawer.styles = styles;
241
+ FlowUiDrawer.dependencies = [FlowUiIconButton];
239
242
  __decorateClass([
240
243
  query(".drawer")
241
244
  ], FlowUiDrawer.prototype, "drawer", 2);
@@ -313,8 +313,9 @@ class FlowUiDropdown extends FlowRdfElement {
313
313
  `;
314
314
  }
315
315
  }
316
+ FlowUiDropdown.tagName = "flow-ui-dropdown";
316
317
  FlowUiDropdown.styles = [componentStyles, styles];
317
- FlowUiDropdown.dependencies = { "flow-ui-popup": FlowUiPopup };
318
+ FlowUiDropdown.dependencies = [FlowUiPopup];
318
319
  __decorateClass([
319
320
  query(".dropdown")
320
321
  ], FlowUiDropdown.prototype, "popup", 2);
@@ -105,6 +105,7 @@ class FlowUiFormGroup extends FlowRdfElement {
105
105
  `;
106
106
  }
107
107
  }
108
+ FlowUiFormGroup.tagName = "flow-ui-form-group";
108
109
  FlowUiFormGroup.styles = styles;
109
110
  __decorateClass([
110
111
  query("slot:not([name])")
@@ -7,6 +7,10 @@ import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
7
7
  import { HasSlotController } from '../../internal/slot.mjs';
8
8
  import { isStringFull, isNil, isNumber, isNumeric } from '../../internal/type-checks.mjs';
9
9
  import { watch } from '../../internal/watch.mjs';
10
+ import FlowUiDialog from '../dialog/dialog.component.mjs';
11
+ import FlowUiButton from '../button/button.component.mjs';
12
+ import FlowUiIcon from '../icon/icon.component.mjs';
13
+ import FlowUiIconButton from '../icon-button/icon-button.component.mjs';
10
14
  import styles from './gauge.styles.mjs';
11
15
 
12
16
  var __defProp = Object.defineProperty;
@@ -50,10 +54,12 @@ class FlowUiGauge extends FlowRdfElement {
50
54
  }
51
55
  }
52
56
  showInfoDialog() {
53
- this._infoDialog && this._infoDialog.show();
57
+ if (this._infoDialog)
58
+ this._infoDialog.show();
54
59
  }
55
60
  hideInfoDialog() {
56
- this._infoDialog && this._infoDialog.hide();
61
+ if (this._infoDialog)
62
+ this._infoDialog.hide();
57
63
  }
58
64
  headerIconTemplate() {
59
65
  return this.icon ? html`
@@ -120,7 +126,9 @@ class FlowUiGauge extends FlowRdfElement {
120
126
  `;
121
127
  }
122
128
  }
129
+ FlowUiGauge.tagName = "flow-ui-gauge";
123
130
  FlowUiGauge.styles = styles;
131
+ FlowUiGauge.dependencies = [FlowUiButton, FlowUiDialog, FlowUiIcon, FlowUiIconButton];
124
132
  __decorateClass([
125
133
  query(".gauge__info-dialog")
126
134
  ], FlowUiGauge.prototype, "_infoDialog", 2);
@@ -119,6 +119,7 @@ const _FlowUiIcon = class _FlowUiIcon extends FlowRdfElement {
119
119
  return this.svg;
120
120
  }
121
121
  };
122
+ _FlowUiIcon.tagName = "flow-ui-icon";
122
123
  _FlowUiIcon.styles = styles;
123
124
  __decorateClass([
124
125
  state()
@@ -2,8 +2,11 @@ import { library } from './library.default.mjs';
2
2
  export { addIcons } from './library.default.mjs';
3
3
  import systemLibrary from './library.system.mjs';
4
4
 
5
- let registry = [library, systemLibrary];
5
+ let registry;
6
6
  let watchedIcons = [];
7
+ function getRegistry() {
8
+ return registry ?? (registry = [library, systemLibrary]);
9
+ }
7
10
  function watchIcon(icon) {
8
11
  watchedIcons.push(icon);
9
12
  }
@@ -11,11 +14,11 @@ function unwatchIcon(icon) {
11
14
  watchedIcons = watchedIcons.filter((el) => el !== icon);
12
15
  }
13
16
  function getIconLibrary(name) {
14
- return registry.find((lib) => lib.name === name);
17
+ return getRegistry().find((lib) => lib.name === name);
15
18
  }
16
19
  function registerIconLibrary(name, options) {
17
20
  unregisterIconLibrary(name);
18
- registry.push({
21
+ getRegistry().push({
19
22
  name,
20
23
  resolver: options.resolver,
21
24
  mutator: options.mutator
@@ -32,7 +35,7 @@ function redrawWatchedIcons() {
32
35
  }
33
36
  }
34
37
  function unregisterIconLibrary(name) {
35
- registry = registry.filter((lib) => lib.name !== name);
38
+ registry = getRegistry().filter((lib) => lib.name !== name);
36
39
  }
37
40
 
38
41
  export { getIconLibrary, redrawWatchedIcons, registerIconLibrary, unregisterIconLibrary, unwatchIcon, watchIcon };
@@ -141,6 +141,8 @@ const icons = {
141
141
  play: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" class="flow-ui-icon"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80v352c0 17.4 9.4 33.4 24.5 41.9S58.2 482 73 473l288-176c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"/></svg>',
142
142
  pause: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" class="flow-ui-icon"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M48 64C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H48zm192 0c-26.5 0-48 21.5-48 48v288c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48h-32z"/></svg>',
143
143
  plus: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="flow-ui-icon"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32v144H48c-17.7 0-32 14.3-32 32s14.3 32 32 32h144v144c0 17.7 14.3 32 32 32s32-14.3 32-32V288h144c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"/></svg>',
144
+ minus: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="flow-ui-icon"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M432 256c0 17.7-14.3 32-32 32H48c-17.7 0-32-14.3-32-32s14.3-32 32-32h352c17.7 0 32 14.3 32 32z"/></svg>',
145
+ expand: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="flow-ui-icon"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zm32 320c0-17.7-14.3-32-32-32S0 334.3 0 352v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64v-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32h-96zm128 320c0-17.7-14.3-32-32-32s-32 14.3-32 32v64h-64c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32v-96z"/></svg>',
144
146
  "square-plus": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="flow-ui-icon"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M64 32C28.7 32 0 60.7 0 96v320c0 35.3 28.7 64 64 64h320c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm136 312v-64h-64c-13.3 0-24-10.7-24-24s10.7-24 24-24h64v-64c0-13.3 10.7-24 24-24s24 10.7 24 24v64h64c13.3 0 24 10.7 24 24s-10.7 24-24 24h-64v64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"/></svg>',
145
147
  "square-minus": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="flow-ui-icon"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M64 32C28.7 32 0 60.7 0 96v320c0 35.3 28.7 64 64 64h320c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm88 200h144c13.3 0 24 10.7 24 24s-10.7 24-24 24H152c-13.3 0-24-10.7-24-24s10.7-24 24-24z"/></svg>',
146
148
  "ellipsis-vertical": "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 512' class='flow-ui-icon'><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d='M64 360a56 56 0 100 112 56 56 0 100-112zm0-160a56 56 0 100 112 56 56 0 100-112zm56-104A56 56 0 108 96a56 56 0 10112 0z'/></svg>",