@emuanalytics/flow-rdf-ui 4.2.1 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -0
- package/THIRD_PARTY_NOTICES.md +220 -0
- package/dist/components/alert/alert.component.mjs +3 -0
- package/dist/components/animation/animation.component.mjs +1 -0
- package/dist/components/autocomplete/autocomplete.component.mjs +3 -4
- package/dist/components/avatar/avatar.component.mjs +3 -0
- package/dist/components/badge/badge.component.mjs +1 -0
- package/dist/components/base-control/base-control.component.mjs +3 -0
- package/dist/components/breadcrumb/breadcrumb.component.mjs +3 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.component.mjs +1 -0
- package/dist/components/busy-overlay/busy-overlay.component.mjs +3 -0
- package/dist/components/button/button.component.mjs +4 -0
- package/dist/components/button-group/button-group.component.mjs +1 -0
- package/dist/components/calendar/calendar.component.mjs +6 -0
- package/dist/components/card/card.component.mjs +1 -0
- package/dist/components/carousel/carousel.component.mjs +3 -0
- package/dist/components/carousel-item/carousel-item.component.mjs +1 -0
- package/dist/components/chart/chart.component.mjs +1 -0
- package/dist/components/chart/chartjs-plugins/luxon.adapter.mjs +78 -0
- package/dist/components/chart/chartjs-support.mjs +2 -0
- package/dist/components/checkbox/checkbox.component.mjs +3 -0
- package/dist/components/checkbox-group/checkbox-group.component.mjs +3 -0
- package/dist/components/color-mapper/color-mapper.component.mjs +21 -0
- package/dist/components/color-picker/color-picker.component.mjs +8 -0
- package/dist/components/color-stop/color-stop.component.mjs +17 -0
- package/dist/components/date-time-picker/date-time-picker.component.mjs +6 -0
- package/dist/components/details/details.component.mjs +3 -0
- package/dist/components/diagram/diagram-panel.styles.mjs +44 -0
- package/dist/components/diagram/diagram-tokens.styles.mjs +148 -0
- package/dist/components/diagram/diagram.component.mjs +355 -0
- package/dist/components/diagram/diagram.mjs +5 -0
- package/dist/components/diagram/diagram.styles.mjs +95 -0
- package/dist/components/diagram-background/diagram-background.component.mjs +163 -0
- package/dist/components/diagram-background/diagram-background.mjs +5 -0
- package/dist/components/diagram-background/diagram-background.styles.mjs +58 -0
- package/dist/components/diagram-base-edge/diagram-base-edge.component.mjs +326 -0
- package/dist/components/diagram-base-edge/diagram-base-edge.mjs +5 -0
- package/dist/components/diagram-base-edge/diagram-base-edge.styles.mjs +147 -0
- package/dist/components/diagram-base-node/diagram-base-node.component.mjs +84 -0
- package/dist/components/diagram-base-node/diagram-base-node.mjs +5 -0
- package/dist/components/diagram-base-node/diagram-base-node.styles.mjs +37 -0
- package/dist/components/diagram-edge/diagram-edge.component.mjs +56 -0
- package/dist/components/diagram-edge/diagram-edge.mjs +5 -0
- package/dist/components/diagram-edge/diagram-edge.styles.mjs +37 -0
- package/dist/components/diagram-edge-label/diagram-edge-label.component.mjs +202 -0
- package/dist/components/diagram-edge-label/diagram-edge-label.mjs +5 -0
- package/dist/components/diagram-edge-label/diagram-edge-label.styles.mjs +54 -0
- package/dist/components/diagram-marker/diagram-marker.component.mjs +84 -0
- package/dist/components/diagram-marker/diagram-marker.mjs +5 -0
- package/dist/components/diagram-marker/diagram-marker.styles.mjs +9 -0
- package/dist/components/diagram-minimap/diagram-minimap.component.mjs +298 -0
- package/dist/components/diagram-minimap/diagram-minimap.mjs +5 -0
- package/dist/components/diagram-minimap/diagram-minimap.styles.mjs +83 -0
- package/dist/components/diagram-node/diagram-node-template.styles.mjs +36 -0
- package/dist/components/diagram-node/diagram-node.component.mjs +183 -0
- package/dist/components/diagram-node/diagram-node.mjs +6 -0
- package/dist/components/diagram-node/diagram-node.styles.mjs +29 -0
- package/dist/components/diagram-palette-item/diagram-palette-item.component.mjs +168 -0
- package/dist/components/diagram-palette-item/diagram-palette-item.mjs +5 -0
- package/dist/components/diagram-palette-item/diagram-palette-item.styles.mjs +20 -0
- package/dist/components/diagram-palette-item-preview/diagram-palette-item-preview.component.mjs +245 -0
- package/dist/components/diagram-palette-item-preview/diagram-palette-item-preview.mjs +6 -0
- package/dist/components/diagram-palette-item-preview/diagram-palette-item-preview.styles.mjs +41 -0
- package/dist/components/diagram-port/diagram-port.component.mjs +273 -0
- package/dist/components/diagram-port/diagram-port.mjs +5 -0
- package/dist/components/diagram-port/diagram-port.styles.mjs +116 -0
- package/dist/components/diagram-resize-adornment/diagram-resize-adornment.component.mjs +124 -0
- package/dist/components/diagram-resize-adornment/diagram-resize-adornment.mjs +5 -0
- package/dist/components/diagram-resize-adornment/diagram-resize-adornment.styles.mjs +136 -0
- package/dist/components/diagram-rotate-adornment/diagram-rotate-adornment.component.mjs +125 -0
- package/dist/components/diagram-rotate-adornment/diagram-rotate-adornment.mjs +5 -0
- package/dist/components/diagram-rotate-adornment/diagram-rotate-adornment.styles.mjs +65 -0
- package/dist/components/diagram-zoom-controls/diagram-zoom-controls.component.mjs +158 -0
- package/dist/components/diagram-zoom-controls/diagram-zoom-controls.mjs +5 -0
- package/dist/components/diagram-zoom-controls/diagram-zoom-controls.styles.mjs +66 -0
- package/dist/components/dialog/dialog.component.mjs +4 -0
- package/dist/components/divider/divider.component.mjs +1 -0
- package/dist/components/drawer/drawer.component.mjs +3 -0
- package/dist/components/dropdown/dropdown.component.mjs +2 -1
- package/dist/components/form-group/form-group.component.mjs +1 -0
- package/dist/components/gauge/gauge.component.mjs +6 -0
- package/dist/components/icon/icon.component.mjs +1 -0
- package/dist/components/icon/library.system.mjs +2 -0
- package/dist/components/icon-button/icon-button.component.mjs +5 -0
- package/dist/components/input/input.component.mjs +5 -0
- package/dist/components/list/list.component.mjs +1 -0
- package/dist/components/list-item/list-item.component.mjs +17 -0
- package/dist/components/map/map.component.mjs +3 -0
- package/dist/components/map/map.styles.mjs +10 -0
- package/dist/components/menu/menu.component.mjs +1 -0
- package/dist/components/menu-item/menu-item.component.mjs +3 -0
- package/dist/components/menu-label/menu-label.component.mjs +1 -0
- package/dist/components/mutation-observer/mutation-observer.component.mjs +1 -0
- package/dist/components/option/option.component.mjs +2 -1
- package/dist/components/panel/panel.component.mjs +85 -1
- package/dist/components/panel/panel.styles.mjs +29 -0
- package/dist/components/panel-header/panel-header.component.mjs +3 -0
- package/dist/components/popup/popup.component.mjs +1 -0
- package/dist/components/progress-bar/progress-bar.component.mjs +1 -0
- package/dist/components/progress-ring/progress-ring.component.mjs +1 -0
- package/dist/components/query-builder/query-builder.component.mjs +27 -0
- package/dist/components/radio/radio.component.mjs +3 -0
- package/dist/components/radio-group/radio-group.component.mjs +3 -0
- package/dist/components/range/range.component.mjs +4 -0
- package/dist/components/resize-observer/resize-observer.component.mjs +1 -0
- package/dist/components/scroll-view/scroll-view.component.mjs +1 -0
- package/dist/components/select/select.component.mjs +3 -5
- package/dist/components/split-view/split-view-layout-registry.mjs +44 -0
- package/dist/components/split-view/split-view-layout.mjs +607 -0
- package/dist/components/split-view/split-view.component.mjs +502 -468
- package/dist/components/split-view/split-view.styles.mjs +25 -0
- package/dist/components/split-view-divider/split-view-divider.component.mjs +2 -53
- package/dist/components/split-view-divider/split-view-divider.styles.mjs +28 -16
- package/dist/components/split-view-pane/split-view-pane.component.mjs +197 -18
- package/dist/components/split-view-pane/split-view-pane.styles.mjs +52 -0
- package/dist/components/split-view-toggle-button/split-view-toggle-button.component.mjs +5 -0
- package/dist/components/stepper/stepper.component.mjs +1 -0
- package/dist/components/stepper-panel/stepper-panel.component.mjs +1 -0
- package/dist/components/switch/switch.component.mjs +3 -0
- package/dist/components/tab/tab.component.mjs +4 -0
- package/dist/components/tab-group/tab-group.component.mjs +176 -6
- package/dist/components/tab-group/tab-group.styles.mjs +44 -0
- package/dist/components/tab-panel/tab-panel.component.mjs +1 -0
- package/dist/components/tag/tag.component.mjs +2 -1
- package/dist/components/textarea/textarea.component.mjs +1 -0
- package/dist/components/timer/ticker.mjs +7 -0
- package/dist/components/timer/timer.component.mjs +44 -3
- package/dist/components/timer/timer.styles.mjs +6 -2
- package/dist/components/tool-button/tool-button.component.mjs +4 -0
- package/dist/components/tool-button-group/tool-button-group.component.mjs +3 -0
- package/dist/components/tooltip/tooltip.component.mjs +3 -0
- package/dist/components/tree/tree.component.mjs +1 -0
- package/dist/components/tree-item/tree-item.component.mjs +5 -0
- package/dist/components/visually-hidden/visually-hidden.component.mjs +1 -0
- package/dist/custom-elements.json +7002 -867
- package/dist/diagram/api/diagram-api-base.mjs +16 -0
- package/dist/diagram/api/diagram-api.mjs +399 -0
- package/dist/diagram/api/diagram-clipboard-api.mjs +52 -0
- package/dist/diagram/api/diagram-groups-api.mjs +46 -0
- package/dist/diagram/api/diagram-model-api.mjs +447 -0
- package/dist/diagram/api/diagram-nodes-api.mjs +61 -0
- package/dist/diagram/api/diagram-selection-api.mjs +56 -0
- package/dist/diagram/api/diagram-viewport-api.mjs +169 -0
- package/dist/diagram/api/emit-with-measurement-option.mjs +21 -0
- package/dist/diagram/input/box-selection-controller.mjs +104 -0
- package/dist/diagram/input/context-menu-controller.mjs +196 -0
- package/dist/diagram/input/cursor-position-tracker-controller.mjs +18 -0
- package/dist/diagram/input/input-controller.mjs +31 -0
- package/dist/diagram/input/keyboard-actions/moving-action.mjs +27 -0
- package/dist/diagram/input/keyboard-actions/panning-action.mjs +27 -0
- package/dist/diagram/input/keyboard-actions/paste-action.mjs +17 -0
- package/dist/diagram/input/keyboard-actions/zoom-action.mjs +30 -0
- package/dist/diagram/input/keyboard-inputs-controller.mjs +121 -0
- package/dist/diagram/input/linking-controller.mjs +127 -0
- package/dist/diagram/input/linking-events.mjs +61 -0
- package/dist/diagram/input/manual-linking.mjs +101 -0
- package/dist/diagram/input/mobile-box-selection-controller.mjs +133 -0
- package/dist/diagram/input/mobile-panning-controller.mjs +114 -0
- package/dist/diagram/input/mobile-zooming-controller.mjs +110 -0
- package/dist/diagram/input/object-selection-controller.mjs +152 -0
- package/dist/diagram/input/palette-drop-controller.mjs +92 -0
- package/dist/diagram/input/panning-controller.mjs +147 -0
- package/dist/diagram/input/pointer-move-selection-controller.mjs +191 -0
- package/dist/diagram/input/relinking-gesture.mjs +182 -0
- package/dist/diagram/input/resize-controller.mjs +122 -0
- package/dist/diagram/input/rotate-controller.mjs +126 -0
- package/dist/diagram/input/zooming-wheel-controller.mjs +55 -0
- package/dist/diagram/minimap/minimap-calculations.mjs +83 -0
- package/dist/diagram/minimap/minimap-navigation-controller.mjs +150 -0
- package/dist/diagram/minimap/minimap-node-cache.mjs +19 -0
- package/dist/diagram/minimap/minimap-strategies.mjs +44 -0
- package/dist/diagram/model/diagram-model-adapter.mjs +97 -0
- package/dist/diagram/model/initialize-model.mjs +31 -0
- package/dist/diagram/model/strip-runtime-properties.mjs +30 -0
- package/dist/diagram/runtime/attribute-converters.mjs +11 -0
- package/dist/diagram/runtime/batched-resize-observer.mjs +168 -0
- package/dist/diagram/runtime/box-selection-provider.mjs +9 -0
- package/dist/diagram/runtime/context.mjs +132 -0
- package/dist/diagram/runtime/contexts.mjs +8 -0
- package/dist/diagram/runtime/cursor-position-tracker.mjs +20 -0
- package/dist/diagram/runtime/default-edge-templates.mjs +21 -0
- package/dist/diagram/runtime/default-node-templates.mjs +20 -0
- package/dist/diagram/runtime/diagram-reference.mjs +126 -0
- package/dist/diagram/runtime/diagram-runtime.mjs +214 -0
- package/dist/diagram/runtime/dom-input-events-router.mjs +88 -0
- package/dist/diagram/runtime/environment.mjs +59 -0
- package/dist/diagram/runtime/event-bridge.mjs +31 -0
- package/dist/diagram/runtime/flow-offset.mjs +45 -0
- package/dist/diagram/runtime/group-highlighted.mjs +25 -0
- package/dist/diagram/runtime/hidden.mjs +147 -0
- package/dist/diagram/runtime/lit-renderer.mjs +33 -0
- package/dist/diagram/runtime/marker-registry.mjs +108 -0
- package/dist/diagram/runtime/middlewares.mjs +14 -0
- package/dist/diagram/runtime/model-owner.mjs +11 -0
- package/dist/diagram/runtime/node-selected.mjs +25 -0
- package/dist/diagram/runtime/observable.mjs +205 -0
- package/dist/diagram/runtime/palette-drag.mjs +56 -0
- package/dist/diagram/runtime/port-hover.mjs +27 -0
- package/dist/diagram/runtime/port-registry.mjs +87 -0
- package/dist/diagram/runtime/resize-processor.mjs +207 -0
- package/dist/diagram/runtime/template-resolver.mjs +98 -0
- package/dist/diagram/runtime/touch-events-state.mjs +52 -0
- package/dist/diagram/utilities.mjs +27 -0
- package/dist/diagram-core/action-state-manager/action-state-manager.mjs +238 -0
- package/dist/diagram-core/batch-processor/batch-processor.mjs +144 -0
- package/dist/diagram-core/command-handler/command-handler.mjs +62 -0
- package/dist/diagram-core/command-handler/commands/add-to-group.mjs +32 -0
- package/dist/diagram-core/command-handler/commands/add-update-delete.mjs +196 -0
- package/dist/diagram-core/command-handler/commands/centering.mjs +73 -0
- package/dist/diagram-core/command-handler/commands/copy-paste.mjs +223 -0
- package/dist/diagram-core/command-handler/commands/cut.mjs +9 -0
- package/dist/diagram-core/command-handler/commands/delete-selection.mjs +32 -0
- package/dist/diagram-core/command-handler/commands/detach-on-node-delete.mjs +77 -0
- package/dist/diagram-core/command-handler/commands/highlight-group.mjs +45 -0
- package/dist/diagram-core/command-handler/commands/index.mjs +88 -0
- package/dist/diagram-core/command-handler/commands/init.mjs +11 -0
- package/dist/diagram-core/command-handler/commands/linking/cancel-linking.mjs +26 -0
- package/dist/diagram-core/command-handler/commands/linking/finish-linking-to-position.mjs +33 -0
- package/dist/diagram-core/command-handler/commands/linking/finish-linking.mjs +108 -0
- package/dist/diagram-core/command-handler/commands/linking/finish-relinking.mjs +91 -0
- package/dist/diagram-core/command-handler/commands/linking/linking-gesture.mjs +13 -0
- package/dist/diagram-core/command-handler/commands/linking/move-temporary-edge.mjs +98 -0
- package/dist/diagram-core/command-handler/commands/linking/start-linking-from-position.mjs +23 -0
- package/dist/diagram-core/command-handler/commands/linking/start-linking.mjs +47 -0
- package/dist/diagram-core/command-handler/commands/linking/start-relinking.mjs +51 -0
- package/dist/diagram-core/command-handler/commands/linking/utils.mjs +103 -0
- package/dist/diagram-core/command-handler/commands/move-nodes-lifecycle.mjs +14 -0
- package/dist/diagram-core/command-handler/commands/move-viewport.mjs +48 -0
- package/dist/diagram-core/command-handler/commands/move.mjs +90 -0
- package/dist/diagram-core/command-handler/commands/remove-from-group.mjs +22 -0
- package/dist/diagram-core/command-handler/commands/resize-node-lifecycle.mjs +14 -0
- package/dist/diagram-core/command-handler/commands/resize-node.mjs +214 -0
- package/dist/diagram-core/command-handler/commands/rotate-node-lifecycle.mjs +14 -0
- package/dist/diagram-core/command-handler/commands/rotate-node.mjs +53 -0
- package/dist/diagram-core/command-handler/commands/selection.mjs +69 -0
- package/dist/diagram-core/command-handler/commands/z-order.mjs +125 -0
- package/dist/diagram-core/command-handler/commands/zoom-to-fit.mjs +118 -0
- package/dist/diagram-core/command-handler/commands/zoom.mjs +26 -0
- package/dist/diagram-core/edge-routing-manager/edge-routing-manager.mjs +253 -0
- package/dist/diagram-core/edge-routing-manager/resolve-label-position.mjs +13 -0
- package/dist/diagram-core/edge-routing-manager/routings/bezier/bezier-routing.mjs +73 -0
- package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-path.mjs +24 -0
- package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-point-at-distance.mjs +37 -0
- package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-point-on-path.mjs +33 -0
- package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-points.mjs +31 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-path.mjs +56 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-point-at-distance.mjs +12 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-point-on-path.mjs +38 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-points.mjs +26 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/orthogonal-routing.mjs +69 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/get-offset-point.mjs +14 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-bottom.mjs +104 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-left.mjs +91 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-right.mjs +88 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-top.mjs +168 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints.mjs +23 -0
- package/dist/diagram-core/edge-routing-manager/routings/polyline/compute-polyline-point-at-distance.mjs +12 -0
- package/dist/diagram-core/edge-routing-manager/routings/polyline/compute-polyline-point-on-path.mjs +41 -0
- package/dist/diagram-core/edge-routing-manager/routings/polyline/polyline-routing.mjs +81 -0
- package/dist/diagram-core/edge-routing-manager/utils/linear-segment-utils.mjs +27 -0
- package/dist/diagram-core/edge-routing-manager/utils/normalize-distance.mjs +6 -0
- package/dist/diagram-core/event-manager/event-manager.mjs +164 -0
- package/dist/diagram-core/flow-config/default-flow-config.mjs +143 -0
- package/dist/diagram-core/flow-core.mjs +541 -0
- package/dist/diagram-core/input-events/handlers/box-selection/box-selection.handler.mjs +69 -0
- package/dist/diagram-core/input-events/handlers/cancel-interaction/cancel-interaction.handler.mjs +9 -0
- package/dist/diagram-core/input-events/handlers/copy/copy.handler.mjs +9 -0
- package/dist/diagram-core/input-events/handlers/cut/cut.handler.mjs +9 -0
- package/dist/diagram-core/input-events/handlers/delete-selection/delete-selection.handler.mjs +9 -0
- package/dist/diagram-core/input-events/handlers/event-handler.mjs +29 -0
- package/dist/diagram-core/input-events/handlers/keyboard-move-selection/keyboard-move-selection.handler.mjs +130 -0
- package/dist/diagram-core/input-events/handlers/keyboard-panning/keyboard-panning.handler.mjs +31 -0
- package/dist/diagram-core/input-events/handlers/linking/linking.handler.mjs +77 -0
- package/dist/diagram-core/input-events/handlers/movable-selection.mjs +26 -0
- package/dist/diagram-core/input-events/handlers/palette-drop/palette-drop.handler.mjs +20 -0
- package/dist/diagram-core/input-events/handlers/panning/panning-handler-factory.mjs +8 -0
- package/dist/diagram-core/input-events/handlers/panning/panning.handler.mjs +41 -0
- package/dist/diagram-core/input-events/handlers/panning/virtualized-panning.handler.mjs +77 -0
- package/dist/diagram-core/input-events/handlers/paste/paste.handler.mjs +17 -0
- package/dist/diagram-core/input-events/handlers/pointer-move-selection/pointer-move-selection.handler.mjs +220 -0
- package/dist/diagram-core/input-events/handlers/redo/redo.handler.mjs +14 -0
- package/dist/diagram-core/input-events/handlers/relinking/relinking.handler.mjs +62 -0
- package/dist/diagram-core/input-events/handlers/resize/resize.handler.mjs +174 -0
- package/dist/diagram-core/input-events/handlers/rotate/rotate.handler.mjs +107 -0
- package/dist/diagram-core/input-events/handlers/select/select.handler.mjs +42 -0
- package/dist/diagram-core/input-events/handlers/select-all/select-all.handler.mjs +10 -0
- package/dist/diagram-core/input-events/handlers/undo/undo.handler.mjs +14 -0
- package/dist/diagram-core/input-events/handlers/wheel-panning/wheel-panning.handler.mjs +25 -0
- package/dist/diagram-core/input-events/handlers/zooming/zooming.handler.mjs +28 -0
- package/dist/diagram-core/input-events/input-events.router.mjs +75 -0
- package/dist/diagram-core/interaction-coordinator/interaction-coordinator.mjs +75 -0
- package/dist/diagram-core/label-batch-processor/label-batch-processor.mjs +19 -0
- package/dist/diagram-core/math/angle-between-points/angle-between-points.mjs +5 -0
- package/dist/diagram-core/math/angle-to-side/angle-to-side.mjs +27 -0
- package/dist/diagram-core/math/calculate-edge-panning-force/calculate-edge-panning-force.mjs +34 -0
- package/dist/diagram-core/math/clamp/clamp.mjs +5 -0
- package/dist/diagram-core/math/distance-between-points/distance-between-points.mjs +5 -0
- package/dist/diagram-core/math/ng-diagram-math.mjs +25 -0
- package/dist/diagram-core/math/normalize-angle/normalize-angle.mjs +5 -0
- package/dist/diagram-core/math/snap-angle/snap-angle.mjs +43 -0
- package/dist/diagram-core/math/snap-number/snap-number.mjs +3 -0
- package/dist/diagram-core/math/snap-point/snap-point.mjs +8 -0
- package/dist/diagram-core/math/subtract-points/subtract-points.mjs +5 -0
- package/dist/diagram-core/measurement-tracker/measurement-tracker.mjs +182 -0
- package/dist/diagram-core/middleware-manager/middleware-executor.mjs +246 -0
- package/dist/diagram-core/middleware-manager/middleware-manager.mjs +93 -0
- package/dist/diagram-core/middleware-manager/middlewares/edges-routing/edges-routing.mjs +149 -0
- package/dist/diagram-core/middleware-manager/middlewares/edges-routing/get-edge-points.mjs +93 -0
- package/dist/diagram-core/middleware-manager/middlewares/edges-routing/get-source-target-positions.mjs +90 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/clipboard-paste.emitter.mjs +34 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/diagram-init.emitter.mjs +190 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/edge-draw-ended.emitter.mjs +51 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/edge-drawn.emitter.mjs +35 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/edge-relink.emitter.mjs +58 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/group-membership-changed.emitter.mjs +49 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/node-drag-lifecycle.emitter.mjs +54 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/node-resize-lifecycle.emitter.mjs +44 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/node-rotate-lifecycle.emitter.mjs +44 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/palette-item-dropped.emitter.mjs +26 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-changed.emitter.mjs +61 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-gesture-ended.emitter.mjs +32 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-moved.emitter.mjs +57 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-removed.emitter.mjs +40 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-rotated.emitter.mjs +33 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/size-changed.emitter.mjs +33 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/viewport-changed.emitter.mjs +19 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/event-emitter.middleware.mjs +69 -0
- package/dist/diagram-core/middleware-manager/middlewares/hidden-computation/hidden-computation.mjs +66 -0
- package/dist/diagram-core/middleware-manager/middlewares/internal-id-assignment/internal-id-assignment.mjs +24 -0
- package/dist/diagram-core/middleware-manager/middlewares/logger/logger.mjs +18 -0
- package/dist/diagram-core/middleware-manager/middlewares/measured-bounds-assignment/is-node-fully-measured.mjs +20 -0
- package/dist/diagram-core/middleware-manager/middlewares/measured-bounds-assignment/measured-bounds-assignment.mjs +59 -0
- package/dist/diagram-core/middleware-manager/middlewares/measurement-tracking/measurement-tracking.middleware.mjs +55 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/assign-edges-z-index.mjs +12 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/assign-node-z-index.mjs +61 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/create-group-children-map.mjs +14 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/initialize-z-index.mjs +30 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/sort-children.mjs +36 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/z-index-assignment.mjs +240 -0
- package/dist/diagram-core/middleware-manager/pass-settlement.mjs +68 -0
- package/dist/diagram-core/model-lookup/model-lookup.mjs +394 -0
- package/dist/diagram-core/port-batch-processor/port-batch-processor.mjs +20 -0
- package/dist/diagram-core/render-strategy/base-render-strategy.mjs +26 -0
- package/dist/diagram-core/render-strategy/direct/direct-render-strategy.mjs +33 -0
- package/dist/diagram-core/render-strategy/render-performance-logger.mjs +42 -0
- package/dist/diagram-core/render-strategy/virtualized/idle-render-scheduler.mjs +43 -0
- package/dist/diagram-core/render-strategy/virtualized/result-cache.mjs +63 -0
- package/dist/diagram-core/render-strategy/virtualized/viewport-utils.mjs +40 -0
- package/dist/diagram-core/render-strategy/virtualized/virtualized-render-strategy.mjs +91 -0
- package/dist/diagram-core/render-strategy/virtualized/visible-elements-resolver.mjs +120 -0
- package/dist/diagram-core/render-strategy/virtualized/zoom-tracker.mjs +38 -0
- package/dist/diagram-core/set.polyfill.mjs +24 -0
- package/dist/diagram-core/shortcut-manager/default-shortcuts.mjs +99 -0
- package/dist/diagram-core/shortcut-manager/shortcut-manager.mjs +140 -0
- package/dist/diagram-core/spatial-hash/collision-detection.mjs +74 -0
- package/dist/diagram-core/spatial-hash/spatial-hash.mjs +161 -0
- package/dist/diagram-core/spatial-hash/utils.mjs +92 -0
- package/dist/diagram-core/transaction-manager/transaction-context.mjs +40 -0
- package/dist/diagram-core/transaction-manager/transaction-manager.mjs +94 -0
- package/dist/diagram-core/transaction-manager/transaction.mjs +179 -0
- package/dist/diagram-core/types/edge.interface.mjs +3 -0
- package/dist/diagram-core/types/node.interface.mjs +3 -0
- package/dist/diagram-core/types/utils.mjs +3 -0
- package/dist/diagram-core/updater/init-updater/init-state.mjs +356 -0
- package/dist/diagram-core/updater/init-updater/init-updater.mjs +275 -0
- package/dist/diagram-core/updater/init-updater/late-arrival-queue.mjs +71 -0
- package/dist/diagram-core/updater/init-updater/stability-detector.mjs +63 -0
- package/dist/diagram-core/updater/internal-updater/internal-updater.mjs +166 -0
- package/dist/diagram-core/utils/change-generation.mjs +13 -0
- package/dist/diagram-core/utils/compute-floating-edge-side.mjs +35 -0
- package/dist/diagram-core/utils/constants.mjs +3 -0
- package/dist/diagram-core/utils/dangling-edges.mjs +89 -0
- package/dist/diagram-core/utils/deep-merge.mjs +22 -0
- package/dist/diagram-core/utils/dimensions.mjs +52 -0
- package/dist/diagram-core/utils/get-node-border-intersection.mjs +99 -0
- package/dist/diagram-core/utils/get-port-flow-position.mjs +55 -0
- package/dist/diagram-core/utils/group-size.mjs +32 -0
- package/dist/diagram-core/utils/is-group.mjs +5 -0
- package/dist/diagram-core/utils/measurement-validation.mjs +11 -0
- package/dist/diagram-core/utils/object-properties.mjs +22 -0
- package/dist/diagram-core/utils/rects-points-sizes.mjs +148 -0
- package/dist/diagram-core/utils/relinking.mjs +6 -0
- package/dist/diagram-core/utils/semaphore.mjs +43 -0
- package/dist/diagram-core/utils/snap-node-position.mjs +11 -0
- package/dist/diagram-core/utils/sort-nodes-by-z-index.mjs +22 -0
- package/dist/diagram-core/visibility/effective-visibility.mjs +28 -0
- package/dist/diagram-core/visibility/template-visibility-registry.mjs +87 -0
- package/dist/index.d.mts +13406 -3796
- package/dist/index.d.ts +13406 -3796
- package/dist/index.mjs +34 -0
- package/dist/internal/content-size.mjs +14 -0
- package/dist/internal/custom-boolean-converter.mjs +18 -0
- package/dist/internal/flow-ui-rdf-element.mjs +57 -5
- package/dist/package.json.mjs +1 -1
- package/dist/utilities/register-components.mjs +77 -142
- package/dist/vscode.html-custom-data.json +369 -96
- package/package.json +16 -8
- package/themes/dark.css +2 -0
- package/themes/dark.styles.js +2 -0
- package/themes/light.css +2 -0
- package/themes/light.styles.js +2 -0
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import { isValidSize, isValidPosition } from '../../utils/measurement-validation.mjs';
|
|
2
|
+
|
|
3
|
+
const ID_SEPARATOR = "->";
|
|
4
|
+
const MEASURE_EVERYTHING = {
|
|
5
|
+
isNodeMeasurable: () => true,
|
|
6
|
+
isPortMeasurable: () => true,
|
|
7
|
+
isLabelMeasurable: () => true
|
|
8
|
+
};
|
|
9
|
+
class InitState {
|
|
10
|
+
constructor(measurementFilter = MEASURE_EVERYTHING) {
|
|
11
|
+
this.measurementFilter = measurementFilter;
|
|
12
|
+
/** Ports added during initialization, keyed by compound ID (nodeId->portId) */
|
|
13
|
+
this.initializedPorts = /* @__PURE__ */ new Map();
|
|
14
|
+
/** Edge labels added during initialization, keyed by compound ID (edgeId->labelId) */
|
|
15
|
+
this.initializedLabels = /* @__PURE__ */ new Map();
|
|
16
|
+
/** Node sizes collected during measurement, keyed by nodeId */
|
|
17
|
+
this.nodeSizes = /* @__PURE__ */ new Map();
|
|
18
|
+
/** Port measurements (size + position), keyed by compound ID (nodeId->portId) */
|
|
19
|
+
this.portRects = /* @__PURE__ */ new Map();
|
|
20
|
+
/** Edge label sizes collected during measurement, keyed by compound ID (edgeId->labelId) */
|
|
21
|
+
this.edgeLabelSizes = /* @__PURE__ */ new Map();
|
|
22
|
+
/** All ports that need measurement (both pre-existing and newly added), keyed by compound ID */
|
|
23
|
+
this.portsToMeasure = /* @__PURE__ */ new Set();
|
|
24
|
+
/** All labels that need measurement (both pre-existing and newly added), keyed by compound ID */
|
|
25
|
+
this.labelsToMeasure = /* @__PURE__ */ new Set();
|
|
26
|
+
/** All nodes that need measurement (rendered nodes at init time), keyed by nodeId */
|
|
27
|
+
this.nodesToMeasure = /* @__PURE__ */ new Set();
|
|
28
|
+
/** Nodes that have valid measurements, keyed by nodeId */
|
|
29
|
+
this.measuredNodes = /* @__PURE__ */ new Set();
|
|
30
|
+
/** Ports that have valid measurements, keyed by compound ID (nodeId->portId) */
|
|
31
|
+
this.measuredPorts = /* @__PURE__ */ new Set();
|
|
32
|
+
/** Labels that have valid measurements, keyed by compound ID (edgeId->labelId) */
|
|
33
|
+
this.measuredLabels = /* @__PURE__ */ new Set();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Records a node measurement and marks it as measured if valid.
|
|
37
|
+
*
|
|
38
|
+
* @param nodeId - The node ID
|
|
39
|
+
* @param size - The measured size
|
|
40
|
+
*/
|
|
41
|
+
trackNodeMeasurement(nodeId, size) {
|
|
42
|
+
this.nodeSizes.set(nodeId, size);
|
|
43
|
+
if (isValidSize(size)) {
|
|
44
|
+
this.measuredNodes.add(nodeId);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Records a port measurement and marks it as measured if valid.
|
|
49
|
+
*
|
|
50
|
+
* @param nodeId - The node ID the port belongs to
|
|
51
|
+
* @param portId - The port ID
|
|
52
|
+
* @param size - The measured size
|
|
53
|
+
* @param position - The measured position
|
|
54
|
+
*/
|
|
55
|
+
trackPortMeasurement(nodeId, portId, size, position) {
|
|
56
|
+
const key = this.getCompoundId(nodeId, portId);
|
|
57
|
+
this.portRects.set(key, { size, position });
|
|
58
|
+
if (isValidSize(size) && isValidPosition(position)) {
|
|
59
|
+
this.measuredPorts.add(key);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Records an edge label measurement and marks it as measured if valid.
|
|
64
|
+
*
|
|
65
|
+
* @param edgeId - The edge ID the label belongs to
|
|
66
|
+
* @param labelId - The label ID
|
|
67
|
+
* @param size - The measured size
|
|
68
|
+
*/
|
|
69
|
+
trackLabelMeasurement(edgeId, labelId, size) {
|
|
70
|
+
const key = this.getCompoundId(edgeId, labelId);
|
|
71
|
+
this.edgeLabelSizes.set(key, size);
|
|
72
|
+
if (isValidSize(size)) {
|
|
73
|
+
this.measuredLabels.add(key);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Adds a new port created during initialization.
|
|
78
|
+
* Stores the port data and records it in the expected measurements count.
|
|
79
|
+
*
|
|
80
|
+
* @param nodeId - The node ID the port belongs to
|
|
81
|
+
* @param port - The port object to add
|
|
82
|
+
*/
|
|
83
|
+
addPort(nodeId, port) {
|
|
84
|
+
const key = this.getCompoundId(nodeId, port.id);
|
|
85
|
+
this.initializedPorts.set(key, port);
|
|
86
|
+
if (this.measurementFilter.isPortMeasurable(nodeId, port.id)) {
|
|
87
|
+
this.portsToMeasure.add(key);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Adds a new edge label created during initialization.
|
|
92
|
+
* Stores the label data and records it in the expected measurements count.
|
|
93
|
+
*
|
|
94
|
+
* @param edgeId - The edge ID the label belongs to
|
|
95
|
+
* @param label - The label object to add
|
|
96
|
+
*/
|
|
97
|
+
addLabel(edgeId, label) {
|
|
98
|
+
const key = this.getCompoundId(edgeId, label.id);
|
|
99
|
+
this.initializedLabels.set(key, label);
|
|
100
|
+
if (this.measurementFilter.isLabelMeasurable(edgeId, label.id)) {
|
|
101
|
+
this.labelsToMeasure.add(key);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Collects pre-existing entities from the initial diagram state.
|
|
106
|
+
* Records all ports and labels in the expected count, and marks those with valid measurements as measured.
|
|
107
|
+
*
|
|
108
|
+
* @param nodes - Initial nodes to scan for ports
|
|
109
|
+
* @param edges - Initial edges to scan for labels
|
|
110
|
+
*/
|
|
111
|
+
collectAlreadyMeasuredItems(nodes, edges) {
|
|
112
|
+
for (const node of nodes) {
|
|
113
|
+
const nodeMeasurable = this.measurementFilter.isNodeMeasurable(node.id);
|
|
114
|
+
if (nodeMeasurable) {
|
|
115
|
+
this.nodesToMeasure.add(node.id);
|
|
116
|
+
}
|
|
117
|
+
if (isValidSize(node.size)) {
|
|
118
|
+
this.measuredNodes.add(node.id);
|
|
119
|
+
}
|
|
120
|
+
for (const port of node.measuredPorts ?? []) {
|
|
121
|
+
if (nodeMeasurable && this.measurementFilter.isPortMeasurable(node.id, port.id)) {
|
|
122
|
+
this.trackPreExistingPort(node.id, port.id);
|
|
123
|
+
}
|
|
124
|
+
if (isValidSize(port.size) && isValidPosition(port.position)) {
|
|
125
|
+
const key = this.getCompoundId(node.id, port.id);
|
|
126
|
+
this.measuredPorts.add(key);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
for (const edge of edges) {
|
|
131
|
+
for (const label of edge.measuredLabels ?? []) {
|
|
132
|
+
if (this.measurementFilter.isLabelMeasurable(edge.id, label.id)) {
|
|
133
|
+
this.trackPreExistingLabel(edge.id, label.id);
|
|
134
|
+
}
|
|
135
|
+
if (isValidSize(label.size)) {
|
|
136
|
+
const key = this.getCompoundId(edge.id, label.id);
|
|
137
|
+
this.measuredLabels.add(key);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Checks if all entities have received valid measurements.
|
|
144
|
+
* Verifies that all tracked nodes, ports, and labels have been measured.
|
|
145
|
+
*
|
|
146
|
+
* @returns True if all nodes, ports, and labels have valid measurements
|
|
147
|
+
*/
|
|
148
|
+
allEntitiesHaveMeasurements() {
|
|
149
|
+
const allNodesMeasured = [...this.nodesToMeasure].every((id) => this.measuredNodes.has(id));
|
|
150
|
+
const allPortsMeasured = [...this.portsToMeasure].every((id) => this.measuredPorts.has(id));
|
|
151
|
+
const allLabelsMeasured = [...this.labelsToMeasure].every((id) => this.measuredLabels.has(id));
|
|
152
|
+
return allNodesMeasured && allPortsMeasured && allLabelsMeasured;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Re-applies the measurement filter to the expectation sets.
|
|
156
|
+
* Called when hidden state changes during initialization (e.g. a template
|
|
157
|
+
* declares an element hidden after expectations were collected) so newly
|
|
158
|
+
* hidden entities stop blocking init. Entities that became visible are not
|
|
159
|
+
* re-added — they re-measure through the observer path without blocking.
|
|
160
|
+
*/
|
|
161
|
+
pruneUnmeasurableExpectations() {
|
|
162
|
+
for (const id of [...this.nodesToMeasure]) {
|
|
163
|
+
if (!this.measurementFilter.isNodeMeasurable(id)) {
|
|
164
|
+
this.nodesToMeasure.delete(id);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
for (const key of [...this.portsToMeasure]) {
|
|
168
|
+
const { entityId, itemId } = this.splitCompoundId(key);
|
|
169
|
+
if (!this.measurementFilter.isNodeMeasurable(entityId) || !this.measurementFilter.isPortMeasurable(entityId, itemId)) {
|
|
170
|
+
this.portsToMeasure.delete(key);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
for (const key of [...this.labelsToMeasure]) {
|
|
174
|
+
const { entityId, itemId } = this.splitCompoundId(key);
|
|
175
|
+
if (!this.measurementFilter.isLabelMeasurable(entityId, itemId)) {
|
|
176
|
+
this.labelsToMeasure.delete(key);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Applies all collected initialization data to the diagram state in a single batch update.
|
|
182
|
+
* Merges new ports/labels with existing ones, applies measurements, and updates the flow state.
|
|
183
|
+
*
|
|
184
|
+
* @param flowCore - The FlowCore instance to update
|
|
185
|
+
*/
|
|
186
|
+
applyToDiagramState(flowCore) {
|
|
187
|
+
const { nodes, edges, ...restState } = flowCore.getState();
|
|
188
|
+
const nodePortsMap = this.groupPortsByNode();
|
|
189
|
+
const edgeLabelsMap = this.groupLabelsByEdge();
|
|
190
|
+
const updatedNodes = this.updateNodes(nodes, nodePortsMap);
|
|
191
|
+
const updatedEdges = this.updateEdges(edges, edgeLabelsMap);
|
|
192
|
+
flowCore.setState({
|
|
193
|
+
...restState,
|
|
194
|
+
nodes: updatedNodes,
|
|
195
|
+
edges: updatedEdges
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Creates a compound ID from entity and item IDs.
|
|
200
|
+
* Used to uniquely identify ports (nodeId->portId) and labels (edgeId->labelId).
|
|
201
|
+
*
|
|
202
|
+
* @param entityId - The parent entity ID (nodeId or edgeId)
|
|
203
|
+
* @param itemId - The item ID (portId or labelId)
|
|
204
|
+
* @returns Compound ID string (e.g., "node1->port1")
|
|
205
|
+
*/
|
|
206
|
+
getCompoundId(entityId, itemId) {
|
|
207
|
+
return `${entityId}${ID_SEPARATOR}${itemId}`;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Splits a compound ID back into entity and item IDs.
|
|
211
|
+
*
|
|
212
|
+
* @param id - The compound ID to split (e.g., "node1->port1")
|
|
213
|
+
* @returns Object with entityId and itemId
|
|
214
|
+
*/
|
|
215
|
+
splitCompoundId(id) {
|
|
216
|
+
const [entityId, itemId] = id.split(ID_SEPARATOR);
|
|
217
|
+
return { entityId, itemId };
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Records that a port exists and should be counted in the expected measurements.
|
|
221
|
+
* Used to track pre-existing ports so we can verify all ports have measurements.
|
|
222
|
+
*
|
|
223
|
+
* @param nodeId - The node ID the port belongs to
|
|
224
|
+
* @param portId - The port ID
|
|
225
|
+
*/
|
|
226
|
+
trackPreExistingPort(nodeId, portId) {
|
|
227
|
+
const key = this.getCompoundId(nodeId, portId);
|
|
228
|
+
this.portsToMeasure.add(key);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Records that a label exists and should be counted in the expected measurements.
|
|
232
|
+
* Used to track pre-existing labels so we can verify all labels have measurements.
|
|
233
|
+
*
|
|
234
|
+
* @param edgeId - The edge ID the label belongs to
|
|
235
|
+
* @param labelId - The label ID
|
|
236
|
+
*/
|
|
237
|
+
trackPreExistingLabel(edgeId, labelId) {
|
|
238
|
+
const key = this.getCompoundId(edgeId, labelId);
|
|
239
|
+
this.labelsToMeasure.add(key);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Groups initialized ports by their parent node ID.
|
|
243
|
+
*
|
|
244
|
+
* @returns Map of nodeId to array of ports
|
|
245
|
+
*/
|
|
246
|
+
groupPortsByNode() {
|
|
247
|
+
const nodePortsMap = /* @__PURE__ */ new Map();
|
|
248
|
+
for (const [key, port] of this.initializedPorts.entries()) {
|
|
249
|
+
const { entityId: nodeId } = this.splitCompoundId(key);
|
|
250
|
+
const nodePorts = nodePortsMap.get(nodeId) || [];
|
|
251
|
+
nodePorts.push(port);
|
|
252
|
+
nodePortsMap.set(nodeId, nodePorts);
|
|
253
|
+
}
|
|
254
|
+
return nodePortsMap;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Groups initialized labels by their parent edge ID.
|
|
258
|
+
*
|
|
259
|
+
* @returns Map of edgeId to array of labels
|
|
260
|
+
*/
|
|
261
|
+
groupLabelsByEdge() {
|
|
262
|
+
const edgeLabelsMap = /* @__PURE__ */ new Map();
|
|
263
|
+
for (const [key, label] of this.initializedLabels.entries()) {
|
|
264
|
+
const { entityId: edgeId } = this.splitCompoundId(key);
|
|
265
|
+
const edgeLabels = edgeLabelsMap.get(edgeId) || [];
|
|
266
|
+
edgeLabels.push(label);
|
|
267
|
+
edgeLabelsMap.set(edgeId, edgeLabels);
|
|
268
|
+
}
|
|
269
|
+
return edgeLabelsMap;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Updates nodes with new ports and measurements.
|
|
273
|
+
* Merges initialized ports with existing ports (new ports take priority) and applies measurements.
|
|
274
|
+
*
|
|
275
|
+
* @param nodes - Current nodes from state
|
|
276
|
+
* @param nodePortsMap - Map of newly initialized ports grouped by node
|
|
277
|
+
* @returns Updated nodes array
|
|
278
|
+
*/
|
|
279
|
+
updateNodes(nodes, nodePortsMap) {
|
|
280
|
+
return nodes.map((node) => {
|
|
281
|
+
const collectedSize = this.nodeSizes.get(node.id);
|
|
282
|
+
const size = collectedSize && isValidSize(collectedSize) ? collectedSize : node.size;
|
|
283
|
+
const newPorts = nodePortsMap.get(node.id);
|
|
284
|
+
const portsById = /* @__PURE__ */ new Map();
|
|
285
|
+
if (node.measuredPorts) {
|
|
286
|
+
for (const port of node.measuredPorts) {
|
|
287
|
+
portsById.set(port.id, port);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
if (newPorts) {
|
|
291
|
+
for (const port of newPorts) {
|
|
292
|
+
portsById.set(port.id, port);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
let measuredPorts = portsById.size > 0 ? Array.from(portsById.values()) : void 0;
|
|
296
|
+
if (measuredPorts) {
|
|
297
|
+
measuredPorts = measuredPorts.map((port) => {
|
|
298
|
+
const key = this.getCompoundId(node.id, port.id);
|
|
299
|
+
const rect = this.portRects.get(key);
|
|
300
|
+
if (!rect || !isValidSize(rect.size) || !isValidPosition(rect.position))
|
|
301
|
+
return port;
|
|
302
|
+
return {
|
|
303
|
+
...port,
|
|
304
|
+
size: rect.size,
|
|
305
|
+
position: rect.position
|
|
306
|
+
};
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
return {
|
|
310
|
+
...node,
|
|
311
|
+
size,
|
|
312
|
+
measuredPorts
|
|
313
|
+
};
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Updates edges with new labels and measurements.
|
|
318
|
+
* Merges initialized labels with existing labels (new labels take priority) and applies measurements.
|
|
319
|
+
*
|
|
320
|
+
* @param edges - Current edges from state
|
|
321
|
+
* @param edgeLabelsMap - Map of newly initialized labels grouped by edge
|
|
322
|
+
* @returns Updated edges array
|
|
323
|
+
*/
|
|
324
|
+
updateEdges(edges, edgeLabelsMap) {
|
|
325
|
+
return edges.map((edge) => {
|
|
326
|
+
const newLabels = edgeLabelsMap.get(edge.id);
|
|
327
|
+
const labelsById = /* @__PURE__ */ new Map();
|
|
328
|
+
if (edge.measuredLabels) {
|
|
329
|
+
for (const label of edge.measuredLabels) {
|
|
330
|
+
labelsById.set(label.id, label);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
if (newLabels) {
|
|
334
|
+
for (const label of newLabels) {
|
|
335
|
+
labelsById.set(label.id, label);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
let measuredLabels = labelsById.size > 0 ? Array.from(labelsById.values()) : void 0;
|
|
339
|
+
if (measuredLabels) {
|
|
340
|
+
measuredLabels = measuredLabels.map((label) => {
|
|
341
|
+
const key = this.getCompoundId(edge.id, label.id);
|
|
342
|
+
const size = this.edgeLabelSizes.get(key);
|
|
343
|
+
if (!size || !isValidSize(size))
|
|
344
|
+
return label;
|
|
345
|
+
return { ...label, size };
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
return {
|
|
349
|
+
...edge,
|
|
350
|
+
measuredLabels
|
|
351
|
+
};
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export { InitState };
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { computeHiddenNodeIds, isEdgeEffectivelyHidden } from '../../visibility/effective-visibility.mjs';
|
|
2
|
+
import { InitState } from './init-state.mjs';
|
|
3
|
+
import { LateArrivalQueue } from './late-arrival-queue.mjs';
|
|
4
|
+
import { StabilityDetector } from './stability-detector.mjs';
|
|
5
|
+
|
|
6
|
+
const STABILITY_DELAY = 50;
|
|
7
|
+
const MEASUREMENT_TIMEOUT = 2e3;
|
|
8
|
+
const INIT_STABILIZATION_FAILED_ERROR = (error) => `[ngDiagram] Initialization stabilization failed.
|
|
9
|
+
|
|
10
|
+
Error: ${error instanceof Error ? error.message : String(error)}
|
|
11
|
+
|
|
12
|
+
The diagram will force-finish initialization without waiting for all measurements.
|
|
13
|
+
This may result in:
|
|
14
|
+
\u2022 Ports without measured positions/sizes
|
|
15
|
+
\u2022 Edge labels without measured sizes
|
|
16
|
+
\u2022 Incorrect initial edge routing
|
|
17
|
+
|
|
18
|
+
This usually indicates:
|
|
19
|
+
\u2022 Model provided to ng-diagram was not created with initializeModel() or initializeModelAdapter() (for custom ModelAdapter)
|
|
20
|
+
\u2022 Resize observers not functioning properly
|
|
21
|
+
\u2022 Port/label elements not rendering
|
|
22
|
+
\u2022 Very slow initial render (> ${STABILITY_DELAY}ms between additions)
|
|
23
|
+
|
|
24
|
+
The diagram will still be functional, but initial layout may be incomplete.
|
|
25
|
+
|
|
26
|
+
Documentation: https://www.ngdiagram.dev/docs/guides/model-initialization/
|
|
27
|
+
`;
|
|
28
|
+
class InitUpdater {
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new InitUpdater.
|
|
31
|
+
*
|
|
32
|
+
* @param flowCore - The FlowCore instance to update
|
|
33
|
+
*/
|
|
34
|
+
constructor(flowCore) {
|
|
35
|
+
this.flowCore = flowCore;
|
|
36
|
+
/** Flag indicating whether initialization has completed */
|
|
37
|
+
this.isInitialized = false;
|
|
38
|
+
/** Flag indicating whether entity additions (ports/labels) have stabilized */
|
|
39
|
+
this.entitiesStabilized = false;
|
|
40
|
+
/** Safety timeout to prevent indefinite waiting for measurements */
|
|
41
|
+
this.measurementTimeout = null;
|
|
42
|
+
/** Effectively hidden node ids at init time — populated in start() */
|
|
43
|
+
this.hiddenNodeIds = /* @__PURE__ */ new Set();
|
|
44
|
+
/** Effectively hidden edge ids at init time — populated in start() */
|
|
45
|
+
this.hiddenEdgeIds = /* @__PURE__ */ new Set();
|
|
46
|
+
this.initState = new InitState({
|
|
47
|
+
isNodeMeasurable: (nodeId) => !this.hiddenNodeIds.has(nodeId),
|
|
48
|
+
isPortMeasurable: (nodeId, portId) => !this.hiddenNodeIds.has(nodeId) && !this.flowCore.templateVisibilityRegistry?.isPortHidden(nodeId, portId),
|
|
49
|
+
isLabelMeasurable: (edgeId, labelId) => !this.hiddenEdgeIds.has(edgeId) && !this.flowCore.templateVisibilityRegistry?.isLabelHidden(edgeId, labelId)
|
|
50
|
+
});
|
|
51
|
+
this.lateArrivalQueue = new LateArrivalQueue();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Starts the initialization process.
|
|
55
|
+
* Collects pre-existing measurements and waits for entity additions to stabilize.
|
|
56
|
+
*
|
|
57
|
+
* @param nodes - Rendered nodes to track for initialization
|
|
58
|
+
* @param edges - Rendered edges to track for initialization
|
|
59
|
+
* @param onComplete - Optional callback to execute after initialization completes
|
|
60
|
+
*/
|
|
61
|
+
start(nodes, edges, onComplete) {
|
|
62
|
+
this.onCompleteCallback = onComplete;
|
|
63
|
+
const registry = this.flowCore.templateVisibilityRegistry;
|
|
64
|
+
this.hiddenNodeIds = computeHiddenNodeIds(nodes, registry);
|
|
65
|
+
this.hiddenEdgeIds = new Set(
|
|
66
|
+
edges.filter((edge) => isEdgeEffectivelyHidden(edge, this.hiddenNodeIds, registry)).map((edge) => edge.id)
|
|
67
|
+
);
|
|
68
|
+
const hasNodes = nodes.length > 0;
|
|
69
|
+
const hasEdges = edges.length > 0;
|
|
70
|
+
this.portStabilityDetector = new StabilityDetector(hasNodes, STABILITY_DELAY);
|
|
71
|
+
this.labelStabilityDetector = new StabilityDetector(hasEdges, STABILITY_DELAY);
|
|
72
|
+
this.initState.collectAlreadyMeasuredItems(nodes, edges);
|
|
73
|
+
Promise.all([this.portStabilityDetector.waitForStability(), this.labelStabilityDetector.waitForStability()]).then(() => {
|
|
74
|
+
this.entitiesStabilized = true;
|
|
75
|
+
this.startMeasurementTimeout();
|
|
76
|
+
this.tryFinish();
|
|
77
|
+
}).catch((err) => {
|
|
78
|
+
console.error(INIT_STABILIZATION_FAILED_ERROR(err));
|
|
79
|
+
this.forceFinish();
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Recomputes effective visibility and drops measurement expectations for
|
|
84
|
+
* entities that became hidden — hidden elements never deliver valid
|
|
85
|
+
* measurements and must not keep initialization waiting. Entities that
|
|
86
|
+
* became visible are not re-added; they measure through the observer path.
|
|
87
|
+
* Safe no-op after initialization completes.
|
|
88
|
+
*/
|
|
89
|
+
refreshHiddenEntities() {
|
|
90
|
+
if (this.isInitialized) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const { nodes, edges } = this.flowCore.getState();
|
|
94
|
+
const registry = this.flowCore.templateVisibilityRegistry;
|
|
95
|
+
this.hiddenNodeIds = computeHiddenNodeIds(nodes, registry);
|
|
96
|
+
this.hiddenEdgeIds = new Set(
|
|
97
|
+
edges.filter((edge) => isEdgeEffectivelyHidden(edge, this.hiddenNodeIds, registry)).map((edge) => edge.id)
|
|
98
|
+
);
|
|
99
|
+
this.initState.pruneUnmeasurableExpectations();
|
|
100
|
+
this.tryFinish();
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Records a node size measurement.
|
|
104
|
+
* Queues the update if finishing is in progress, otherwise records and attempts to finish.
|
|
105
|
+
*
|
|
106
|
+
* @param nodeId - The node ID
|
|
107
|
+
* @param size - The measured size
|
|
108
|
+
*/
|
|
109
|
+
applyNodeSize(nodeId, size) {
|
|
110
|
+
if (this.lateArrivalQueue.isFinishing) {
|
|
111
|
+
this.lateArrivalQueue.enqueue({ method: "applyNodeSize", args: [nodeId, size] });
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
this.initState.trackNodeMeasurement(nodeId, size);
|
|
115
|
+
this.tryFinish();
|
|
116
|
+
}
|
|
117
|
+
applyNodeSizes(updates) {
|
|
118
|
+
for (const { id, size } of updates) {
|
|
119
|
+
this.applyNodeSize(id, size);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Adds a new port created during initialization.
|
|
124
|
+
* Queues if finishing, otherwise adds to init state and notifies stability detector.
|
|
125
|
+
*
|
|
126
|
+
* @param nodeId - The node ID the port belongs to
|
|
127
|
+
* @param port - The port to add
|
|
128
|
+
*/
|
|
129
|
+
addPort(nodeId, port) {
|
|
130
|
+
if (this.lateArrivalQueue.isFinishing) {
|
|
131
|
+
this.lateArrivalQueue.enqueue({ method: "addPort", args: [nodeId, port] });
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
this.initState.addPort(nodeId, port);
|
|
135
|
+
this.portStabilityDetector.notify();
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Applies port changes (size, position, side, type, etc.).
|
|
139
|
+
* During initialization, only size/position measurements are tracked for init completion.
|
|
140
|
+
* Non-geometric changes (side, type) are ignored since ports are being created with initial values.
|
|
141
|
+
*
|
|
142
|
+
* @param nodeId - The node ID the ports belong to
|
|
143
|
+
* @param portUpdates - Array of port updates
|
|
144
|
+
*/
|
|
145
|
+
applyPortChanges(nodeId, portUpdates) {
|
|
146
|
+
if (this.lateArrivalQueue.isFinishing) {
|
|
147
|
+
this.lateArrivalQueue.enqueue({ method: "applyPortChanges", args: [nodeId, portUpdates] });
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
for (const { portId, portChanges } of portUpdates) {
|
|
151
|
+
if (portChanges.size && portChanges.position) {
|
|
152
|
+
this.initState.trackPortMeasurement(nodeId, portId, portChanges.size, portChanges.position);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
this.tryFinish();
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Adds a new edge label created during initialization.
|
|
159
|
+
* Queues if finishing, otherwise adds to init state and notifies stability detector.
|
|
160
|
+
*
|
|
161
|
+
* @param edgeId - The edge ID the label belongs to
|
|
162
|
+
* @param label - The label to add
|
|
163
|
+
*/
|
|
164
|
+
addEdgeLabel(edgeId, label) {
|
|
165
|
+
if (this.lateArrivalQueue.isFinishing) {
|
|
166
|
+
this.lateArrivalQueue.enqueue({ method: "addEdgeLabel", args: [edgeId, label] });
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
this.initState.addLabel(edgeId, label);
|
|
170
|
+
this.labelStabilityDetector.notify();
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Deletes an edge label. During initialization, queues for replay after init completes.
|
|
174
|
+
*/
|
|
175
|
+
deleteEdgeLabel(edgeId, labelId) {
|
|
176
|
+
this.lateArrivalQueue.enqueue({ method: "deleteEdgeLabel", args: [edgeId, labelId] });
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Applies edge label changes (size, positionOnEdge, etc.).
|
|
180
|
+
* During initialization, only size measurements are tracked for init completion.
|
|
181
|
+
* Non-size changes (positionOnEdge) are ignored since labels are being created with initial values.
|
|
182
|
+
*
|
|
183
|
+
* @param edgeId - The edge ID the labels belong to
|
|
184
|
+
* @param labelUpdates - Array of label updates
|
|
185
|
+
*/
|
|
186
|
+
applyEdgeLabelChanges(edgeId, labelUpdates) {
|
|
187
|
+
if (this.lateArrivalQueue.isFinishing) {
|
|
188
|
+
this.lateArrivalQueue.enqueue({ method: "applyEdgeLabelChanges", args: [edgeId, labelUpdates] });
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
for (const { labelId, labelChanges } of labelUpdates) {
|
|
192
|
+
if (labelChanges.size) {
|
|
193
|
+
this.initState.trackLabelMeasurement(edgeId, labelId, labelChanges.size);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
this.tryFinish();
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Attempts to finish initialization if conditions are met.
|
|
200
|
+
* Conditions: not already finishing, not initialized, entities stabilized, all rendered entities measured.
|
|
201
|
+
*/
|
|
202
|
+
tryFinish() {
|
|
203
|
+
if (this.lateArrivalQueue.isFinishing || this.isInitialized) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
if (!this.entitiesStabilized) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (this.initState.allEntitiesHaveMeasurements()) {
|
|
210
|
+
this.finish();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Completes initialization by applying all collected data.
|
|
215
|
+
* Marks as finishing, applies state, executes callback, marks as initialized, processes late arrivals.
|
|
216
|
+
*/
|
|
217
|
+
async finish() {
|
|
218
|
+
this.clearMeasurementTimeout();
|
|
219
|
+
this.lateArrivalQueue.startFinishing();
|
|
220
|
+
this.initState.applyToDiagramState(this.flowCore);
|
|
221
|
+
if (this.onCompleteCallback) {
|
|
222
|
+
try {
|
|
223
|
+
await this.onCompleteCallback();
|
|
224
|
+
} catch (error) {
|
|
225
|
+
console.error("[ngDiagram] Initialization completion failed \u2014 continuing initialization.", error);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
this.isInitialized = true;
|
|
229
|
+
this.lateArrivalQueue.processAll(this.flowCore.internalUpdater);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Forces initialization to finish even if conditions aren't fully met.
|
|
233
|
+
* Used as a fallback when entity stabilization fails.
|
|
234
|
+
*/
|
|
235
|
+
forceFinish() {
|
|
236
|
+
this.finish();
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Starts a safety timeout to prevent indefinite waiting for measurements.
|
|
240
|
+
* If measurements don't arrive within MEASUREMENT_TIMEOUT, initialization is forced to complete.
|
|
241
|
+
* This handles cases where entities may not be measurable (e.g., display: none).
|
|
242
|
+
*/
|
|
243
|
+
startMeasurementTimeout() {
|
|
244
|
+
this.measurementTimeout = setTimeout(() => {
|
|
245
|
+
if (!this.isInitialized) {
|
|
246
|
+
const expectedNodes = this.initState.nodesToMeasure.size;
|
|
247
|
+
const measuredNodes = this.initState.measuredNodes.size;
|
|
248
|
+
const expectedPorts = this.initState.portsToMeasure.size;
|
|
249
|
+
const measuredPorts = this.initState.measuredPorts.size;
|
|
250
|
+
const expectedLabels = this.initState.labelsToMeasure.size;
|
|
251
|
+
const measuredLabels = this.initState.measuredLabels.size;
|
|
252
|
+
console.warn(
|
|
253
|
+
"[InitUpdater] Measurement timeout reached. Some entities may not be measurable (e.g., display: none). Ensure the model provided to ng-diagram was created with initializeModel() or initializeModelAdapter() (for custom ModelAdapter). To intentionally hide elements, use the `hidden` flag on nodes/edges or the `hidden` input on ports and edge labels \u2014 hidden elements create no measurement expectations.",
|
|
254
|
+
{
|
|
255
|
+
nodes: { expected: expectedNodes, measured: measuredNodes },
|
|
256
|
+
ports: { expected: expectedPorts, measured: measuredPorts },
|
|
257
|
+
labels: { expected: expectedLabels, measured: measuredLabels }
|
|
258
|
+
}
|
|
259
|
+
);
|
|
260
|
+
this.forceFinish();
|
|
261
|
+
}
|
|
262
|
+
}, MEASUREMENT_TIMEOUT);
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Clears the measurement timeout if it's active.
|
|
266
|
+
*/
|
|
267
|
+
clearMeasurementTimeout() {
|
|
268
|
+
if (this.measurementTimeout !== null) {
|
|
269
|
+
clearTimeout(this.measurementTimeout);
|
|
270
|
+
this.measurementTimeout = null;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export { InitUpdater, MEASUREMENT_TIMEOUT, STABILITY_DELAY };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
class LateArrivalQueue {
|
|
2
|
+
constructor() {
|
|
3
|
+
/** Queued method calls waiting to be processed */
|
|
4
|
+
this.queue = [];
|
|
5
|
+
/** Flag indicating whether finish() is in progress */
|
|
6
|
+
this.isProcessing = false;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Returns whether the queue is in finishing mode.
|
|
10
|
+
* When true, incoming updates should be queued instead of processed immediately.
|
|
11
|
+
*/
|
|
12
|
+
get isFinishing() {
|
|
13
|
+
return this.isProcessing;
|
|
14
|
+
}
|
|
15
|
+
/** Returns the number of queued arrivals */
|
|
16
|
+
get length() {
|
|
17
|
+
return this.queue.length;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Marks the start of the finishing phase.
|
|
21
|
+
* After calling this, isFinishing will return true and updates will be queued.
|
|
22
|
+
*/
|
|
23
|
+
startFinishing() {
|
|
24
|
+
this.isProcessing = true;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Adds an updater method call to the queue.
|
|
28
|
+
* The call will be replayed later during processAll().
|
|
29
|
+
*
|
|
30
|
+
* @param arrival - The method call to queue (method name + arguments)
|
|
31
|
+
*/
|
|
32
|
+
enqueue(arrival) {
|
|
33
|
+
this.queue.push(arrival);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Processes all queued arrivals by replaying them on the provided updater.
|
|
37
|
+
* Clears the queue after processing.
|
|
38
|
+
*
|
|
39
|
+
* @param updater - The updater to replay queued method calls on
|
|
40
|
+
*/
|
|
41
|
+
processAll(updater) {
|
|
42
|
+
if (this.queue.length === 0) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
for (const lateArrival of this.queue) {
|
|
46
|
+
switch (lateArrival.method) {
|
|
47
|
+
case "addPort":
|
|
48
|
+
updater.addPort(...lateArrival.args);
|
|
49
|
+
break;
|
|
50
|
+
case "addEdgeLabel":
|
|
51
|
+
updater.addEdgeLabel(...lateArrival.args);
|
|
52
|
+
break;
|
|
53
|
+
case "applyNodeSize":
|
|
54
|
+
updater.applyNodeSize(...lateArrival.args);
|
|
55
|
+
break;
|
|
56
|
+
case "applyPortChanges":
|
|
57
|
+
updater.applyPortChanges(...lateArrival.args);
|
|
58
|
+
break;
|
|
59
|
+
case "applyEdgeLabelChanges":
|
|
60
|
+
updater.applyEdgeLabelChanges(...lateArrival.args);
|
|
61
|
+
break;
|
|
62
|
+
case "deleteEdgeLabel":
|
|
63
|
+
updater.deleteEdgeLabel(...lateArrival.args);
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
this.queue = [];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { LateArrivalQueue };
|