@likec4/diagram 1.42.1 → 1.44.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/bundle/index.js +6198 -4860
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +15 -12
- package/dist/LikeC4Diagram.props.d.ts +28 -14
- package/dist/LikeC4ProjectsProvider.js +1 -1
- package/dist/LikeC4View.d.ts +28 -4
- package/dist/LikeC4View.js +28 -17
- package/dist/ReactLikeC4.d.ts +1 -1
- package/dist/ReactLikeC4.js +5 -7
- package/dist/StaticLikeC4Diagram.js +2 -2
- package/dist/_virtual/_commonjsHelpers.js +3 -0
- package/dist/_virtual/assign-dea9f7c8.cjs.js +3 -0
- package/dist/_virtual/log-ec8d4df4.cjs.js +3 -0
- package/dist/_virtual/raise-da5b247f.cjs.js +3 -0
- package/dist/_virtual/xstate-actions.cjs.js +5 -0
- package/dist/_virtual/xstate-actions.cjs2.js +3 -0
- package/dist/_virtual/xstate-dev.cjs.js +3 -0
- package/dist/_virtual/xstate-guards.cjs.js +5 -0
- package/dist/_virtual/xstate-guards.cjs2.js +3 -0
- package/dist/base/Background.d.ts +2 -1
- package/dist/base/Background.js +11 -2
- package/dist/base/Base.d.ts +28 -0
- package/dist/base/BaseXYFlow.d.ts +5 -5
- package/dist/base/BaseXYFlow.js +38 -44
- package/dist/base/const.d.ts +1 -1
- package/dist/base/const.js +1 -1
- package/dist/base/index.d.ts +6 -2
- package/dist/base/types.d.ts +1 -28
- package/dist/base/updateEdges.js +4 -3
- package/dist/base/updateNodes.js +3 -2
- package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +4 -0
- package/dist/base-primitives/edge/EdgeLabel.d.ts +1 -0
- package/dist/base-primitives/edge/EdgeLabel.js +2 -0
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +4 -0
- package/dist/base-primitives/edge/EdgePath.d.ts +4 -0
- package/dist/base-primitives/edge/EdgePath.js +9 -5
- package/dist/base-primitives/element/ElementActionButtons.d.ts +3 -2
- package/dist/base-primitives/element/ElementActionButtons.js +1 -1
- package/dist/base-primitives/element/ElementDetailsButton.js +2 -5
- package/dist/base-primitives/element/ElementNodeContainer.css.js +15 -27
- package/dist/base-primitives/element/ElementTags.js +2 -1
- package/dist/base-primitives/memoEdge.js +4 -2
- package/dist/base-primitives/memoNode.d.ts +1 -1
- package/dist/base-primitives/memoNode.js +3 -3
- package/dist/components/ErrorFallback.js +52 -35
- package/dist/components/Link.js +2 -2
- package/dist/context/DiagramEventHandlers.js +2 -1
- package/dist/context/DiagramFeatures.d.ts +24 -6
- package/dist/context/DiagramFeatures.js +28 -56
- package/dist/context/IconRenderer.js +6 -6
- package/dist/context/LikeC4ModelContext.js +3 -10
- package/dist/context/TagStylesContext.js +2 -18
- package/dist/context/index.d.ts +1 -1
- package/dist/custom/customNodes.js +3 -2
- package/dist/custom/hooks.d.ts +1 -1
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +4 -4
- package/dist/editor/LikeC4EditorContext.d.ts +21 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/safeContext.d.ts +6 -3
- package/dist/hooks/safeContext.js +10 -3
- package/dist/hooks/useCallbackRef.d.ts +1 -0
- package/dist/hooks/useCallbackRef.js +13 -0
- package/dist/hooks/useCurrentView.d.ts +11 -0
- package/dist/hooks/{useCurrentViewId.js → useCurrentView.js} +7 -3
- package/dist/hooks/useCurrentViewModel.js +4 -1
- package/dist/hooks/useDiagram.d.ts +7 -113
- package/dist/hooks/useDiagram.js +7 -127
- package/dist/hooks/useDiagramCompareLayout.d.ts +35 -0
- package/dist/hooks/useDiagramCompareLayout.js +60 -0
- package/dist/hooks/useUpdateEffect.js +2 -4
- package/dist/hooks/useXYFlow.d.ts +1 -0
- package/dist/hooks/useXYFlow.js +4 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/dist/likec4diagram/DiagramUI.js +14 -7
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -2
- package/dist/likec4diagram/DiagramXYFlow.js +54 -51
- package/dist/likec4diagram/convert-to-xyflow.d.ts +0 -1
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +249 -220
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +7 -2
- package/dist/likec4diagram/custom/edges/edges.css.js +3 -4
- package/dist/likec4diagram/custom/edges/useControlPoints.d.ts +8 -0
- package/dist/likec4diagram/custom/edges/useControlPoints.js +58 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +7 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +60 -0
- package/dist/likec4diagram/custom/edges/utils.d.ts +0 -12
- package/dist/likec4diagram/custom/nodes/CompoundActions.js +4 -1
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -1
- package/dist/likec4diagram/custom/nodes/ElementActions.js +15 -10
- package/dist/likec4diagram/custom/nodes/ElementNodeDrifts.d.ts +4 -0
- package/dist/likec4diagram/custom/nodes/ElementNodeDrifts.js +46 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +4 -1
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +9 -1
- package/dist/likec4diagram/custom/nodes/nodes.js +13 -9
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +2 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +4 -3
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +1 -11
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +7 -51
- package/dist/likec4diagram/custom/nodes/toolbar/types.d.ts +5 -0
- package/dist/likec4diagram/custom/nodes/toolbar/types.js +7 -0
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.d.ts +8 -0
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.js +44 -0
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +5 -7
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +3 -2
- package/dist/likec4diagram/state/DiagramActorProvider.js +96 -70
- package/dist/likec4diagram/state/assign.d.ts +4 -2
- package/dist/likec4diagram/state/assign.js +39 -103
- package/dist/likec4diagram/state/createViewChange.d.ts +3 -0
- package/dist/likec4diagram/state/createViewChange.js +90 -0
- package/dist/likec4diagram/state/diagram-api.d.ts +113 -0
- package/dist/likec4diagram/state/diagram-api.js +134 -0
- package/dist/likec4diagram/state/hotkeyActor.d.ts +7 -0
- package/dist/likec4diagram/state/hotkeyActor.js +17 -1
- package/dist/likec4diagram/state/machine.actions.d.ts +2099 -0
- package/dist/likec4diagram/state/machine.actions.js +735 -0
- package/dist/likec4diagram/state/machine.d.ts +3717 -0
- package/dist/likec4diagram/state/machine.js +141 -0
- package/dist/likec4diagram/state/machine.setup.d.ts +284 -0
- package/dist/likec4diagram/state/machine.setup.js +71 -0
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +183 -0
- package/dist/likec4diagram/state/machine.state.initializing.js +55 -0
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +117 -0
- package/dist/likec4diagram/state/machine.state.navigating.js +45 -0
- package/dist/likec4diagram/state/machine.state.ready.d.ts +3666 -0
- package/dist/likec4diagram/state/machine.state.ready.js +437 -0
- package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +220 -63
- package/dist/likec4diagram/state/syncManualLayoutActor.js +218 -143
- package/dist/likec4diagram/state/types.d.ts +4 -7
- package/dist/likec4diagram/state/utils.d.ts +4 -2
- package/dist/likec4diagram/state/utils.js +4 -1
- package/dist/likec4diagram/types.d.ts +6 -1
- package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +2 -0
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +66 -0
- package/dist/likec4diagram/ui/index.d.ts +1 -0
- package/dist/likec4diagram/ui/notation/NotationPanel.js +10 -12
- package/dist/likec4diagram/useLayoutConstraints.d.ts +10 -5
- package/dist/likec4diagram/useLayoutConstraints.js +225 -54
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +0 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +15 -15
- package/dist/navigationpanel/NavigationPanel.js +11 -7
- package/dist/navigationpanel/NavigationPanelControls.d.ts +2 -1
- package/dist/navigationpanel/NavigationPanelControls.js +23 -17
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +2 -1
- package/dist/navigationpanel/NavigationPanelDropdown.js +62 -42
- package/dist/navigationpanel/_common.d.ts +1 -1
- package/dist/navigationpanel/_common.js +4 -2
- package/dist/navigationpanel/actor.d.ts +11 -7
- package/dist/navigationpanel/actor.js +5 -4
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +3 -0
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +59 -0
- package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +2 -0
- package/dist/navigationpanel/comparepanel/ComparePanel.js +42 -0
- package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -0
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +60 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +5 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +38 -0
- package/dist/navigationpanel/comparepanel/index.d.ts +1 -0
- package/dist/navigationpanel/controls/{ViewDetailsCard.d.ts → DetailsControls.d.ts} +1 -1
- package/dist/navigationpanel/controls/{ViewDetailsCard.js → DetailsControls.js} +18 -14
- package/dist/navigationpanel/controls/LayoutWarning.d.ts +2 -0
- package/dist/navigationpanel/controls/LayoutWarning.js +102 -0
- package/dist/navigationpanel/controls/NavigationButtons.js +4 -3
- package/dist/navigationpanel/controls/OpenSource.js +2 -2
- package/dist/navigationpanel/controls/SearchControl.d.ts +2 -1
- package/dist/navigationpanel/controls/SearchControl.js +15 -17
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +19 -16
- package/dist/navigationpanel/controls/index.d.ts +2 -1
- package/dist/navigationpanel/dropdown/ProjectsMenu.d.ts +2 -2
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +5 -5
- package/dist/navigationpanel/editorpanel/CenterCamera.js +5 -2
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +21 -20
- package/dist/navigationpanel/editorpanel/EditorPanel.js +3 -3
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +2 -2
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +16 -13
- package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -0
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +15 -0
- package/dist/navigationpanel/styles.css.d.ts +2 -2
- package/dist/navigationpanel/styles.css.js +4 -4
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +14 -8
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +10 -10
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +31 -14
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +2 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +66 -49
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/actions/dist/xstate-actions.cjs.js +37 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dev/dist/xstate-dev.cjs.js +59 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/assign-dea9f7c8.cjs.js +140 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/log-ec8d4df4.cjs.js +401 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/raise-da5b247f.cjs.js +2716 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/guards/dist/xstate-guards.cjs.js +26 -0
- package/dist/overlays/element-details/ElementDetails.js +7 -7
- package/dist/overlays/element-details/ElementDetailsCard.js +18 -88
- package/dist/overlays/element-details/MetadataValue.d.ts +9 -0
- package/dist/overlays/element-details/MetadataValue.js +261 -0
- package/dist/overlays/element-details/TabPanelDeployments.js +6 -4
- package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actor.d.ts +3 -2
- package/dist/overlays/overlaysActor.d.ts +304 -62
- package/dist/overlays/overlaysActor.js +132 -131
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -3
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/actor.d.ts +14 -2
- package/dist/overlays/relationship-details/actor.js +23 -5
- package/dist/overlays/relationship-details/custom/ElementActions.js +8 -5
- package/dist/overlays/relationship-details/custom/edgeTypes.js +4 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.js +4 -1
- package/dist/overlays/relationship-details/hooks.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -4
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/actor.d.ts +239 -173
- package/dist/overlays/relationships-browser/actor.js +132 -110
- package/dist/overlays/relationships-browser/const.d.ts +3 -3
- package/dist/overlays/relationships-browser/const.js +3 -3
- package/dist/overlays/relationships-browser/custom/ElementActions.js +44 -37
- package/dist/overlays/relationships-browser/custom/edgeTypes.js +4 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +4 -1
- package/dist/overlays/relationships-browser/hooks.js +7 -6
- package/dist/search/Search.js +2 -1
- package/dist/search/components/ElementsColumn.js +5 -3
- package/dist/search/components/PickView.js +1 -1
- package/dist/search/components/SearchByTags.js +21 -44
- package/dist/search/components/SearchInput.js +1 -1
- package/dist/search/components/ViewsColum.js +6 -4
- package/dist/shadowroot/ShadowRoot.js +53 -12
- package/dist/shadowroot/styles.css.d.ts +0 -4
- package/dist/shadowroot/styles.css.js +1 -41
- package/dist/styles.css2.js +1 -1
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/vector.d.ts +78 -21
- package/dist/utils/vector.js +91 -24
- package/dist/utils/view-bounds.d.ts +8 -0
- package/dist/utils/view-bounds.js +57 -0
- package/dist/utils/xyflow.d.ts +49 -7
- package/dist/utils/xyflow.js +63 -11
- package/package.json +28 -27
- package/panda.buildinfo.json +140 -83
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/hooks/useCurrentViewId.d.ts +0 -6
- package/dist/likec4diagram/custom/edges/utils.js +0 -23
- package/dist/likec4diagram/state/diagram-machine.d.ts +0 -2590
- package/dist/likec4diagram/state/diagram-machine.js +0 -1180
- package/dist/navigationpanel/editorpanel/LayoutDriftNotification.d.ts +0 -1
- package/dist/navigationpanel/editorpanel/LayoutDriftNotification.js +0 -56
- package/dist/utils/get-view-bounds.d.ts +0 -3
- package/dist/utils/get-view-bounds.js +0 -14
- /package/dist/base/{types.js → Base.js} +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
import { BBox, invariant, nonNullable, nonexhaustive } from '@likec4/core';
|
|
2
|
+
import { getViewportForBounds } from '@xyflow/react';
|
|
3
|
+
import { nodeToRect } from '@xyflow/system';
|
|
4
|
+
import { isNumber, isTruthy, hasAtLeast } from 'remeda';
|
|
5
|
+
import { assertEvent } from 'xstate';
|
|
6
|
+
import { createLayoutConstraints } from '../useLayoutConstraints.js';
|
|
7
|
+
import { getAligner, toNodeRect } from './aligners.js';
|
|
8
|
+
import { mergeXYNodesEdges, resetEdgeControlPoints, updateActiveWalkthrough, focusNodesEdges } from './assign.js';
|
|
9
|
+
import { createViewChange } from './createViewChange.js';
|
|
10
|
+
import { machine } from './machine.setup.js';
|
|
11
|
+
import { typedSystem, activeSequenceBounds, focusedBounds, findDiagramEdge, findDiagramNode } from './utils.js';
|
|
12
|
+
import { MinZoom } from '../../base/const.js';
|
|
13
|
+
import { Base } from '../../base/Base.js';
|
|
14
|
+
|
|
15
|
+
function nodeRef(node) {
|
|
16
|
+
switch (node.type) {
|
|
17
|
+
case "element":
|
|
18
|
+
case "compound-element":
|
|
19
|
+
case "seq-actor":
|
|
20
|
+
return node.data.modelFqn;
|
|
21
|
+
case "deployment":
|
|
22
|
+
case "compound-deployment":
|
|
23
|
+
return node.data.modelFqn ?? node.data.deploymentFqn;
|
|
24
|
+
case "seq-parallel":
|
|
25
|
+
case "view-group":
|
|
26
|
+
return null;
|
|
27
|
+
default:
|
|
28
|
+
nonexhaustive(node);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function findCorrespondingNode(context, event) {
|
|
32
|
+
const fromNodeId = context.lastOnNavigate?.fromNode;
|
|
33
|
+
const fromNode = fromNodeId && context.xynodes.find((n) => n.id === fromNodeId);
|
|
34
|
+
const fromRef = fromNode && nodeRef(fromNode);
|
|
35
|
+
const toNode = fromRef && event.xynodes.find((n) => nodeRef(n) === fromRef);
|
|
36
|
+
return { fromNode, toNode };
|
|
37
|
+
}
|
|
38
|
+
const trigger = {
|
|
39
|
+
navigateTo: () => machine.emit(({ context }) => ({
|
|
40
|
+
type: "navigateTo",
|
|
41
|
+
viewId: nonNullable(context.lastOnNavigate, "Invalid state, lastOnNavigate is null").toView
|
|
42
|
+
}))
|
|
43
|
+
};
|
|
44
|
+
const xyflow = {
|
|
45
|
+
fitDiagram: (params) => machine.createAction(({ context, event }) => {
|
|
46
|
+
params ??= event.type === "fitDiagram" ? event : {};
|
|
47
|
+
const {
|
|
48
|
+
bounds = context.view.bounds,
|
|
49
|
+
duration = 450
|
|
50
|
+
} = params;
|
|
51
|
+
const { width, height, panZoom, transform } = nonNullable(context.xystore).getState();
|
|
52
|
+
const maxZoom = Math.max(1, transform[2]);
|
|
53
|
+
const viewport = getViewportForBounds(
|
|
54
|
+
bounds,
|
|
55
|
+
width,
|
|
56
|
+
height,
|
|
57
|
+
MinZoom,
|
|
58
|
+
maxZoom,
|
|
59
|
+
context.fitViewPadding
|
|
60
|
+
);
|
|
61
|
+
viewport.x = Math.round(viewport.x);
|
|
62
|
+
viewport.y = Math.round(viewport.y);
|
|
63
|
+
panZoom?.setViewport(viewport, duration > 0 ? { duration, interpolate: "smooth" } : void 0).catch(
|
|
64
|
+
console.error
|
|
65
|
+
);
|
|
66
|
+
}),
|
|
67
|
+
fitFocusedBounds: () => machine.createAction(({ context }) => {
|
|
68
|
+
const isActiveSequenceWalkthrough = !!context.activeWalkthrough && context.dynamicViewVariant === "sequence";
|
|
69
|
+
const { bounds, duration = 450 } = isActiveSequenceWalkthrough ? activeSequenceBounds({ context }) : focusedBounds({ context });
|
|
70
|
+
const { width, height, panZoom, transform } = nonNullable(context.xystore).getState();
|
|
71
|
+
const maxZoom = Math.max(1, transform[2]);
|
|
72
|
+
const viewport = getViewportForBounds(
|
|
73
|
+
bounds,
|
|
74
|
+
width,
|
|
75
|
+
height,
|
|
76
|
+
MinZoom,
|
|
77
|
+
maxZoom,
|
|
78
|
+
context.fitViewPadding
|
|
79
|
+
);
|
|
80
|
+
viewport.x = Math.round(viewport.x);
|
|
81
|
+
viewport.y = Math.round(viewport.y);
|
|
82
|
+
panZoom?.setViewport(viewport, duration > 0 ? { duration, interpolate: "smooth" } : void 0);
|
|
83
|
+
}),
|
|
84
|
+
alignNodeFromToAfterNavigate: (params) => machine.createAction(({ context }) => {
|
|
85
|
+
const xyflow2 = nonNullable(context.xyflow, "xyflow is not initialized");
|
|
86
|
+
const elFrom = xyflow2.getInternalNode(params.fromNode);
|
|
87
|
+
if (!elFrom) return;
|
|
88
|
+
const fromPos = xyflow2.flowToScreenPosition({
|
|
89
|
+
x: elFrom.internals.positionAbsolute.x,
|
|
90
|
+
y: elFrom.internals.positionAbsolute.y
|
|
91
|
+
}), toPos = xyflow2.flowToScreenPosition(params.toPosition), diff = {
|
|
92
|
+
x: Math.round(fromPos.x - toPos.x),
|
|
93
|
+
y: Math.round(fromPos.y - toPos.y)
|
|
94
|
+
};
|
|
95
|
+
context.xystore.getState().panBy(diff);
|
|
96
|
+
}),
|
|
97
|
+
setViewportCenter: (params) => machine.createAction(({ context, event }) => {
|
|
98
|
+
let center;
|
|
99
|
+
if (params) {
|
|
100
|
+
center = params;
|
|
101
|
+
} else if (event.type === "update.view") {
|
|
102
|
+
center = BBox.center(event.view.bounds);
|
|
103
|
+
} else {
|
|
104
|
+
center = BBox.center(context.view.bounds);
|
|
105
|
+
}
|
|
106
|
+
invariant(context.xyflow, "xyflow is not initialized");
|
|
107
|
+
const zoom = context.xyflow.getZoom();
|
|
108
|
+
context.xyflow.setCenter(Math.round(center.x), Math.round(center.y), { zoom });
|
|
109
|
+
}),
|
|
110
|
+
setViewport: (params) => machine.createAction(({ context }) => {
|
|
111
|
+
const {
|
|
112
|
+
viewport,
|
|
113
|
+
duration = 350
|
|
114
|
+
} = params;
|
|
115
|
+
const panZoom = context.xystore?.getState().panZoom;
|
|
116
|
+
panZoom?.setViewport(viewport, duration > 0 ? { duration, interpolate: "smooth" } : void 0);
|
|
117
|
+
})
|
|
118
|
+
};
|
|
119
|
+
const disableCompareWithLatest = () => machine.assign(({ context }) => {
|
|
120
|
+
return {
|
|
121
|
+
toggledFeatures: {
|
|
122
|
+
...context.toggledFeatures,
|
|
123
|
+
enableCompareWithLatest: false
|
|
124
|
+
},
|
|
125
|
+
viewportOnAutoLayout: null,
|
|
126
|
+
viewportOnManualLayout: null
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
const onEdgeDoubleClick = () => machine.assign(({ context, event }) => {
|
|
130
|
+
assertEvent(event, "xyflow.edgeDoubleClick");
|
|
131
|
+
if (!event.edge.data.controlPoints) {
|
|
132
|
+
return {};
|
|
133
|
+
}
|
|
134
|
+
const { nodeLookup } = context.xystore.getState();
|
|
135
|
+
return {
|
|
136
|
+
xyedges: context.xyedges.map((e) => {
|
|
137
|
+
if (e.id === event.edge.id) {
|
|
138
|
+
const controlPoints = resetEdgeControlPoints(nodeLookup, e);
|
|
139
|
+
const pt = controlPoints[0];
|
|
140
|
+
return {
|
|
141
|
+
...e,
|
|
142
|
+
data: {
|
|
143
|
+
...e.data,
|
|
144
|
+
controlPoints,
|
|
145
|
+
labelBBox: e.data.labelBBox ? { ...e.data.labelBBox, ...pt } : null,
|
|
146
|
+
labelXY: e.data.labelXY ? pt : null
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
return e;
|
|
151
|
+
})
|
|
152
|
+
};
|
|
153
|
+
});
|
|
154
|
+
const emitOnChange = () => machine.enqueueActions(({ event, enqueue }) => {
|
|
155
|
+
assertEvent(event, "emit.onChange");
|
|
156
|
+
enqueue.assign({
|
|
157
|
+
viewportChangedManually: true
|
|
158
|
+
});
|
|
159
|
+
enqueue.emit({
|
|
160
|
+
type: "onChange",
|
|
161
|
+
change: event.change
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
const emitOnLayoutTypeChange = () => machine.enqueueActions(({ event, system, context, enqueue }) => {
|
|
165
|
+
if (!context.features.enableCompareWithLatest) {
|
|
166
|
+
console.warn("Layout type cannot be changed while CompareWithLatest feature is disabled");
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const currentLayoutType = context.view._layout;
|
|
170
|
+
let nextLayoutType = currentLayoutType === "auto" ? "manual" : "auto";
|
|
171
|
+
if (event.type === "emit.onLayoutTypeChange") {
|
|
172
|
+
nextLayoutType = event.layoutType;
|
|
173
|
+
}
|
|
174
|
+
if (currentLayoutType === nextLayoutType) {
|
|
175
|
+
console.warn("Ignoring layout type change event, layout type is already", currentLayoutType);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (context.toggledFeatures.enableCompareWithLatest === true) {
|
|
179
|
+
if (currentLayoutType === "manual" && nextLayoutType === "auto") {
|
|
180
|
+
const syncLayoutActor = typedSystem(system).syncLayoutActorRef;
|
|
181
|
+
const syncState = syncLayoutActor?.getSnapshot().value;
|
|
182
|
+
const isPending = syncLayoutActor && (syncState === "pending" || syncState === "paused");
|
|
183
|
+
if (isPending) {
|
|
184
|
+
enqueue.sendTo(syncLayoutActor, { type: "cancel" });
|
|
185
|
+
enqueue.emit({
|
|
186
|
+
type: "onChange",
|
|
187
|
+
change: createViewChange(context)
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const currentViewport = context.viewport;
|
|
192
|
+
if (currentLayoutType === "auto") {
|
|
193
|
+
enqueue.assign({
|
|
194
|
+
viewportOnAutoLayout: currentViewport
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
if (currentLayoutType === "manual") {
|
|
198
|
+
enqueue.assign({
|
|
199
|
+
viewportOnManualLayout: currentViewport
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
enqueue.emit({
|
|
204
|
+
type: "onLayoutTypeChange",
|
|
205
|
+
layoutType: nextLayoutType
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
const assignLastClickedNode = () => machine.assign(({ context, event }) => {
|
|
209
|
+
assertEvent(event, "xyflow.nodeClick");
|
|
210
|
+
const { lastClickedNode } = context;
|
|
211
|
+
if (!lastClickedNode || lastClickedNode.id !== event.node.id) {
|
|
212
|
+
return {
|
|
213
|
+
lastClickedNode: {
|
|
214
|
+
id: event.node.id,
|
|
215
|
+
clicks: 1,
|
|
216
|
+
timestamp: Date.now()
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
return {
|
|
221
|
+
lastClickedNode: {
|
|
222
|
+
id: lastClickedNode.id,
|
|
223
|
+
clicks: lastClickedNode.clicks + 1,
|
|
224
|
+
timestamp: Date.now()
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
});
|
|
228
|
+
const assignFocusedNode = () => machine.assign(({ event }) => {
|
|
229
|
+
let focusedNode;
|
|
230
|
+
switch (event.type) {
|
|
231
|
+
case "xyflow.nodeClick":
|
|
232
|
+
focusedNode = event.node.data.id;
|
|
233
|
+
break;
|
|
234
|
+
case "focus.node":
|
|
235
|
+
focusedNode = event.nodeId;
|
|
236
|
+
break;
|
|
237
|
+
default:
|
|
238
|
+
throw new Error(`Unexpected event type: ${event.type} in action 'assign: focusedNode'`);
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
focusedNode
|
|
242
|
+
};
|
|
243
|
+
});
|
|
244
|
+
const resetLastClickedNode = () => machine.assign(() => ({
|
|
245
|
+
lastClickedNode: null
|
|
246
|
+
}));
|
|
247
|
+
const updateFeatures = () => machine.assign(({ event }) => {
|
|
248
|
+
assertEvent(event, "update.features");
|
|
249
|
+
return {
|
|
250
|
+
features: { ...event.features }
|
|
251
|
+
};
|
|
252
|
+
});
|
|
253
|
+
const updateInputs = () => machine.assign(({ event }) => {
|
|
254
|
+
assertEvent(event, "update.inputs");
|
|
255
|
+
return { ...event.inputs };
|
|
256
|
+
});
|
|
257
|
+
const updateXYNodesEdges = () => machine.assign(({ context, event }) => {
|
|
258
|
+
assertEvent(event, "update.view");
|
|
259
|
+
return {
|
|
260
|
+
...mergeXYNodesEdges({ context, event }),
|
|
261
|
+
lastClickedNode: null
|
|
262
|
+
};
|
|
263
|
+
});
|
|
264
|
+
const focusOnNodesAndEdges = () => machine.assign(focusNodesEdges);
|
|
265
|
+
const undimEverything = () => machine.assign(({ context }) => ({
|
|
266
|
+
xynodes: context.xynodes.map(Base.setDimmed(false)),
|
|
267
|
+
xyedges: context.xyedges.map(Base.setData({
|
|
268
|
+
dimmed: false,
|
|
269
|
+
active: false
|
|
270
|
+
}))
|
|
271
|
+
}));
|
|
272
|
+
const updateActiveWalkthroughState = () => machine.assign(updateActiveWalkthrough);
|
|
273
|
+
const assignDynamicViewVariant = () => machine.assign(({ event }) => {
|
|
274
|
+
assertEvent(event, "switch.dynamicViewVariant");
|
|
275
|
+
return {
|
|
276
|
+
dynamicViewVariant: event.variant
|
|
277
|
+
};
|
|
278
|
+
});
|
|
279
|
+
const onNodeMouseEnter = (params) => machine.assign(({ context, event }) => {
|
|
280
|
+
let node = params?.node;
|
|
281
|
+
if (!node) {
|
|
282
|
+
assertEvent(event, "xyflow.nodeMouseEnter");
|
|
283
|
+
node = event.node;
|
|
284
|
+
}
|
|
285
|
+
return {
|
|
286
|
+
xynodes: context.xynodes.map((n) => {
|
|
287
|
+
if (n.id === node.id) {
|
|
288
|
+
return Base.setHovered(n, true);
|
|
289
|
+
}
|
|
290
|
+
return n;
|
|
291
|
+
})
|
|
292
|
+
};
|
|
293
|
+
});
|
|
294
|
+
const onNodeMouseLeave = (params) => machine.assign(({ context, event }) => {
|
|
295
|
+
let node = params?.node;
|
|
296
|
+
if (!node) {
|
|
297
|
+
assertEvent(event, "xyflow.nodeMouseLeave");
|
|
298
|
+
node = event.node;
|
|
299
|
+
}
|
|
300
|
+
return {
|
|
301
|
+
xynodes: context.xynodes.map((n) => {
|
|
302
|
+
if (n.id === node.id) {
|
|
303
|
+
return Base.setHovered(n, false);
|
|
304
|
+
}
|
|
305
|
+
return n;
|
|
306
|
+
})
|
|
307
|
+
};
|
|
308
|
+
});
|
|
309
|
+
const emitWalkthroughStopped = () => machine.emit(() => ({
|
|
310
|
+
type: "walkthroughStopped"
|
|
311
|
+
}));
|
|
312
|
+
const emitPaneClick = () => machine.emit(() => ({
|
|
313
|
+
type: "paneClick"
|
|
314
|
+
}));
|
|
315
|
+
const emitOpenSource = (params) => machine.emit(({ event }) => {
|
|
316
|
+
if (params) {
|
|
317
|
+
return {
|
|
318
|
+
type: "openSource",
|
|
319
|
+
params
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
assertEvent(event, "open.source");
|
|
323
|
+
return {
|
|
324
|
+
type: "openSource",
|
|
325
|
+
params: event
|
|
326
|
+
};
|
|
327
|
+
});
|
|
328
|
+
const emitInitialized = () => machine.emit(({ context }) => {
|
|
329
|
+
invariant(context.xyflow, "XYFlow instance not found");
|
|
330
|
+
return {
|
|
331
|
+
type: "initialized",
|
|
332
|
+
instance: context.xyflow
|
|
333
|
+
};
|
|
334
|
+
});
|
|
335
|
+
const emitNodeClick = () => machine.emit(({ context, event }) => {
|
|
336
|
+
assertEvent(event, "xyflow.nodeClick");
|
|
337
|
+
const node = nonNullable(findDiagramNode(context, event.node.id), `Node ${event.node.id} not found in diagram`);
|
|
338
|
+
return {
|
|
339
|
+
type: "nodeClick",
|
|
340
|
+
node,
|
|
341
|
+
xynode: event.node
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
const emitEdgeClick = () => machine.emit(({ context, event }) => {
|
|
345
|
+
assertEvent(event, "xyflow.edgeClick");
|
|
346
|
+
const edge = nonNullable(findDiagramEdge(context, event.edge.id), `Edge ${event.edge.id} not found in diagram`);
|
|
347
|
+
return {
|
|
348
|
+
type: "edgeClick",
|
|
349
|
+
edge,
|
|
350
|
+
xyedge: event.edge
|
|
351
|
+
};
|
|
352
|
+
});
|
|
353
|
+
const emitWalkthroughStarted = () => machine.emit(({ context }) => {
|
|
354
|
+
const edge = context.xyedges.find((x) => x.id === context.activeWalkthrough?.stepId);
|
|
355
|
+
invariant(edge, "Invalid walkthrough state");
|
|
356
|
+
return {
|
|
357
|
+
type: "walkthroughStarted",
|
|
358
|
+
edge
|
|
359
|
+
};
|
|
360
|
+
});
|
|
361
|
+
const emitWalkthroughStep = () => machine.emit(({ context }) => {
|
|
362
|
+
const edge = context.xyedges.find((x) => x.id === context.activeWalkthrough?.stepId);
|
|
363
|
+
invariant(edge, "Invalid walkthrough state");
|
|
364
|
+
return {
|
|
365
|
+
type: "walkthroughStep",
|
|
366
|
+
edge
|
|
367
|
+
};
|
|
368
|
+
});
|
|
369
|
+
const layoutAlign = (params) => machine.createAction(({ context, event }) => {
|
|
370
|
+
let mode;
|
|
371
|
+
{
|
|
372
|
+
assertEvent(event, "layout.align");
|
|
373
|
+
mode = event.mode;
|
|
374
|
+
}
|
|
375
|
+
const xystore = nonNullable(context.xystore, "xystore is not initialized");
|
|
376
|
+
const { nodeLookup, parentLookup } = xystore.getState();
|
|
377
|
+
const selectedNodes = new Set(nodeLookup.values().filter((n) => n.selected).map((n) => n.id));
|
|
378
|
+
const nodesToAlign = [...selectedNodes.difference(new Set(parentLookup.keys()))];
|
|
379
|
+
if (!hasAtLeast(nodesToAlign, 2)) {
|
|
380
|
+
console.warn("At least 2 nodes must be selected to align");
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
const constraints = createLayoutConstraints(xystore, nodesToAlign);
|
|
384
|
+
const aligner = getAligner(mode);
|
|
385
|
+
const nodes = nodesToAlign.map((id) => ({
|
|
386
|
+
node: nonNullable(nodeLookup.get(id)),
|
|
387
|
+
rect: nonNullable(constraints.rects.get(id))
|
|
388
|
+
}));
|
|
389
|
+
aligner.computeLayout(nodes.map(({ node }) => toNodeRect(node)));
|
|
390
|
+
for (const { rect, node } of nodes) {
|
|
391
|
+
rect.positionAbsolute = {
|
|
392
|
+
...rect.positionAbsolute,
|
|
393
|
+
...aligner.applyPosition(toNodeRect(node))
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
constraints.updateXYFlow();
|
|
397
|
+
});
|
|
398
|
+
const resetEdgesControlPoints = () => machine.assign(({ context }) => {
|
|
399
|
+
const { nodeLookup } = context.xystore.getState();
|
|
400
|
+
return {
|
|
401
|
+
xyedges: context.xyedges.map((edge) => {
|
|
402
|
+
if (!edge.data.controlPoints) {
|
|
403
|
+
return edge;
|
|
404
|
+
}
|
|
405
|
+
const controlPoints = resetEdgeControlPoints(nodeLookup, edge);
|
|
406
|
+
const pt = controlPoints[0];
|
|
407
|
+
return {
|
|
408
|
+
...edge,
|
|
409
|
+
data: {
|
|
410
|
+
...edge.data,
|
|
411
|
+
controlPoints,
|
|
412
|
+
labelBBox: edge.data.labelBBox ? { ...edge.data.labelBBox, x: pt.x, y: pt.y } : null,
|
|
413
|
+
labelXY: edge.data.labelXY ? pt : null
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
})
|
|
417
|
+
};
|
|
418
|
+
});
|
|
419
|
+
const notationsHighlight = (params) => machine.assign(({ context, event }) => {
|
|
420
|
+
if (!params) {
|
|
421
|
+
assertEvent(event, "notations.highlight");
|
|
422
|
+
params = {
|
|
423
|
+
...event
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
const notation = params.notation;
|
|
427
|
+
const kinds = params.kind ? [params.kind] : notation.kinds;
|
|
428
|
+
const xynodes = context.xynodes.map((n) => {
|
|
429
|
+
const node = findDiagramNode(context, n.id);
|
|
430
|
+
if (node && node.notation === notation.title && node.shape === notation.shape && node.color === notation.color && kinds.includes(node.kind)) {
|
|
431
|
+
return Base.setDimmed(n, false);
|
|
432
|
+
}
|
|
433
|
+
return Base.setDimmed(n, "immediate");
|
|
434
|
+
});
|
|
435
|
+
return {
|
|
436
|
+
xynodes,
|
|
437
|
+
xyedges: context.xyedges.map(Base.setDimmed("immediate"))
|
|
438
|
+
};
|
|
439
|
+
});
|
|
440
|
+
const tagHighlight = () => machine.assign(({ context, event }) => {
|
|
441
|
+
assertEvent(event, "tag.highlight");
|
|
442
|
+
return {
|
|
443
|
+
xynodes: context.xynodes.map((n) => {
|
|
444
|
+
if (n.data.tags?.includes(event.tag)) {
|
|
445
|
+
return Base.setDimmed(n, false);
|
|
446
|
+
}
|
|
447
|
+
return Base.setDimmed(n, true);
|
|
448
|
+
})
|
|
449
|
+
};
|
|
450
|
+
});
|
|
451
|
+
const toggleFeature = () => machine.assign(({ context, event }) => {
|
|
452
|
+
assertEvent(event, "toggle.feature");
|
|
453
|
+
const currentValue = context.toggledFeatures[`enable${event.feature}`] ?? context.features[`enable${event.feature}`];
|
|
454
|
+
const nextValue = event.forceValue ?? !currentValue;
|
|
455
|
+
return {
|
|
456
|
+
toggledFeatures: {
|
|
457
|
+
...context.toggledFeatures,
|
|
458
|
+
[`enable${event.feature}`]: nextValue
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
});
|
|
462
|
+
const closeSearch = () => machine.sendTo(
|
|
463
|
+
({ system }) => typedSystem(system).searchActorRef,
|
|
464
|
+
{
|
|
465
|
+
type: "close"
|
|
466
|
+
}
|
|
467
|
+
);
|
|
468
|
+
const closeAllOverlays = () => machine.sendTo(
|
|
469
|
+
({ system }) => typedSystem(system).overlaysActorRef,
|
|
470
|
+
{
|
|
471
|
+
type: "close.all"
|
|
472
|
+
}
|
|
473
|
+
);
|
|
474
|
+
const isReadOnly = (context) => context.features.enableReadOnly || context.toggledFeatures.enableReadOnly === true;
|
|
475
|
+
const stopSyncLayout = () => machine.enqueueActions(({ enqueue, system }) => {
|
|
476
|
+
const syncLayoutActor = typedSystem(system).syncLayoutActorRef;
|
|
477
|
+
if (!syncLayoutActor) return;
|
|
478
|
+
enqueue.stopChild(syncLayoutActor);
|
|
479
|
+
});
|
|
480
|
+
const ensureSyncLayout = () => machine.enqueueActions(({ context, enqueue, system }) => {
|
|
481
|
+
const syncLayoutActor = typedSystem(system).syncLayoutActorRef;
|
|
482
|
+
if (isReadOnly(context)) {
|
|
483
|
+
if (syncLayoutActor) {
|
|
484
|
+
enqueue.stopChild(syncLayoutActor);
|
|
485
|
+
}
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
if (syncLayoutActor) return;
|
|
489
|
+
enqueue.spawnChild("syncManualLayoutActorLogic", {
|
|
490
|
+
id: "syncLayout",
|
|
491
|
+
systemId: "syncLayout",
|
|
492
|
+
input: {
|
|
493
|
+
viewId: context.view.id
|
|
494
|
+
},
|
|
495
|
+
syncSnapshot: true
|
|
496
|
+
});
|
|
497
|
+
});
|
|
498
|
+
const startEditing = (subject = "node") => machine.sendTo(
|
|
499
|
+
({ system }) => typedSystem(system).syncLayoutActorRef,
|
|
500
|
+
{
|
|
501
|
+
type: "editing.start",
|
|
502
|
+
subject
|
|
503
|
+
}
|
|
504
|
+
);
|
|
505
|
+
const stopEditing = (wasChanged = true) => machine.sendTo(
|
|
506
|
+
({ system }) => typedSystem(system).syncLayoutActorRef,
|
|
507
|
+
{
|
|
508
|
+
type: "editing.stop",
|
|
509
|
+
wasChanged
|
|
510
|
+
}
|
|
511
|
+
);
|
|
512
|
+
const hasModelFqn = (node) => "modelFqn" in node.data && isTruthy(node.data.modelFqn);
|
|
513
|
+
const openElementDetails = (params) => machine.enqueueActions(({ context, event, enqueue, system }) => {
|
|
514
|
+
let initiatedFrom = null;
|
|
515
|
+
let fromNodeId, subject;
|
|
516
|
+
switch (true) {
|
|
517
|
+
// Use from params if available
|
|
518
|
+
case false: {
|
|
519
|
+
subject = params.fqn;
|
|
520
|
+
fromNodeId = params.fromNode ?? context.view.nodes.find((n) => n.modelRef === params.fqn)?.id;
|
|
521
|
+
break;
|
|
522
|
+
}
|
|
523
|
+
case event.type === "xyflow.nodeClick": {
|
|
524
|
+
if (!hasModelFqn(event.node)) {
|
|
525
|
+
console.warn("No modelFqn in clicked node data");
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
subject = event.node.data.modelFqn;
|
|
529
|
+
fromNodeId = event.node.data.id;
|
|
530
|
+
break;
|
|
531
|
+
}
|
|
532
|
+
case event.type === "open.elementDetails": {
|
|
533
|
+
subject = event.fqn;
|
|
534
|
+
fromNodeId = event.fromNode;
|
|
535
|
+
break;
|
|
536
|
+
}
|
|
537
|
+
default: {
|
|
538
|
+
if (!context.lastClickedNode) {
|
|
539
|
+
console.warn("No last clicked node");
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
fromNodeId = context.lastClickedNode.id;
|
|
543
|
+
const node = context.xynodes.find((n) => n.id === fromNodeId);
|
|
544
|
+
if (!node || !hasModelFqn(node)) {
|
|
545
|
+
console.warn("No modelFqn in last clicked node");
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
subject = node.data.modelFqn;
|
|
549
|
+
break;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
const internalNode = fromNodeId ? context.xystore.getState().nodeLookup.get(fromNodeId) : null;
|
|
553
|
+
if (fromNodeId && internalNode) {
|
|
554
|
+
const nodeRect = nodeToRect(internalNode);
|
|
555
|
+
const zoom = context.xyflow.getZoom();
|
|
556
|
+
const clientRect = {
|
|
557
|
+
...context.xyflow.flowToScreenPosition(nodeRect),
|
|
558
|
+
width: nodeRect.width * zoom,
|
|
559
|
+
height: nodeRect.height * zoom
|
|
560
|
+
};
|
|
561
|
+
initiatedFrom = {
|
|
562
|
+
node: fromNodeId,
|
|
563
|
+
clientRect
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
enqueue.sendTo(
|
|
567
|
+
typedSystem(system).overlaysActorRef,
|
|
568
|
+
{
|
|
569
|
+
type: "open.elementDetails",
|
|
570
|
+
subject,
|
|
571
|
+
currentView: context.view,
|
|
572
|
+
...initiatedFrom && { initiatedFrom }
|
|
573
|
+
}
|
|
574
|
+
);
|
|
575
|
+
});
|
|
576
|
+
const openSourceOfFocusedOrLastClickedNode = () => machine.enqueueActions(({ context, enqueue }) => {
|
|
577
|
+
const nodeId = context.focusedNode ?? context.lastClickedNode?.id;
|
|
578
|
+
if (!nodeId || !context.features.enableVscode) return;
|
|
579
|
+
const diagramNode = findDiagramNode(context, nodeId);
|
|
580
|
+
if (!diagramNode) return;
|
|
581
|
+
if (diagramNode.deploymentRef) {
|
|
582
|
+
enqueue.raise({ type: "open.source", deployment: diagramNode.deploymentRef });
|
|
583
|
+
} else if (diagramNode.modelRef) {
|
|
584
|
+
enqueue.raise({ type: "open.source", element: diagramNode.modelRef });
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
const ensureOverlaysActorState = () => machine.enqueueActions(({ enqueue, context: { features }, system }) => {
|
|
588
|
+
const enableOverlays = features.enableElementDetails || features.enableRelationshipDetails || features.enableRelationshipBrowser;
|
|
589
|
+
const hasRunning = typedSystem(system).overlaysActorRef;
|
|
590
|
+
if (enableOverlays && !hasRunning) {
|
|
591
|
+
enqueue.spawnChild("overlaysActorLogic", { id: "overlays", systemId: "overlays" });
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
if (!enableOverlays && hasRunning) {
|
|
595
|
+
enqueue.sendTo(hasRunning, {
|
|
596
|
+
type: "close.all"
|
|
597
|
+
});
|
|
598
|
+
enqueue.stopChild("overlays");
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
const ensureSearchActorState = () => machine.enqueueActions(({ enqueue, context: { features: { enableSearch } }, system }) => {
|
|
602
|
+
const hasRunning = typedSystem(system).searchActorRef;
|
|
603
|
+
if (enableSearch && !hasRunning) {
|
|
604
|
+
enqueue.spawnChild("searchActorLogic", { id: "search", systemId: "search" });
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
if (!enableSearch && hasRunning) {
|
|
608
|
+
enqueue.sendTo(hasRunning, {
|
|
609
|
+
type: "close"
|
|
610
|
+
});
|
|
611
|
+
enqueue.stopChild("search");
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
const onEdgeMouseEnter = () => machine.enqueueActions(({ enqueue, context, event }) => {
|
|
615
|
+
assertEvent(event, "xyflow.edgeMouseEnter");
|
|
616
|
+
let edge = event.edge;
|
|
617
|
+
enqueue.assign({
|
|
618
|
+
xyedges: context.xyedges.map((e) => {
|
|
619
|
+
if (e.id === event.edge.id) {
|
|
620
|
+
edge = Base.setHovered(e, true);
|
|
621
|
+
return edge;
|
|
622
|
+
}
|
|
623
|
+
return e;
|
|
624
|
+
})
|
|
625
|
+
});
|
|
626
|
+
enqueue.emit({
|
|
627
|
+
type: "edgeMouseEnter",
|
|
628
|
+
edge,
|
|
629
|
+
event: event.event
|
|
630
|
+
});
|
|
631
|
+
});
|
|
632
|
+
const onEdgeMouseLeave = () => machine.enqueueActions(({ enqueue, context, event }) => {
|
|
633
|
+
assertEvent(event, "xyflow.edgeMouseLeave");
|
|
634
|
+
let edge = event.edge;
|
|
635
|
+
enqueue.assign({
|
|
636
|
+
xyedges: context.xyedges.map((e) => {
|
|
637
|
+
if (e.id === event.edge.id) {
|
|
638
|
+
edge = Base.setHovered(e, false);
|
|
639
|
+
return edge;
|
|
640
|
+
}
|
|
641
|
+
return e;
|
|
642
|
+
})
|
|
643
|
+
});
|
|
644
|
+
enqueue.emit({
|
|
645
|
+
type: "edgeMouseLeave",
|
|
646
|
+
edge,
|
|
647
|
+
event: event.event
|
|
648
|
+
});
|
|
649
|
+
});
|
|
650
|
+
const cancelFitDiagram = () => machine.cancel("fitDiagram");
|
|
651
|
+
const raiseFitDiagram = (params) => machine.enqueueActions(({ enqueue }) => {
|
|
652
|
+
enqueue.cancel("fitDiagram");
|
|
653
|
+
enqueue.raise(
|
|
654
|
+
{
|
|
655
|
+
type: "fitDiagram",
|
|
656
|
+
...isNumber(params?.duration) ? { duration: params.duration } : {}
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
id: "fitDiagram",
|
|
660
|
+
...isNumber(params?.delay) ? { delay: params.delay } : {}
|
|
661
|
+
}
|
|
662
|
+
);
|
|
663
|
+
});
|
|
664
|
+
const updateView = () => machine.enqueueActions(
|
|
665
|
+
({ enqueue, event, check, context, system }) => {
|
|
666
|
+
assertEvent(event, "update.view");
|
|
667
|
+
const isAnotherView = check("is another view");
|
|
668
|
+
enqueue(cancelFitDiagram());
|
|
669
|
+
if (isAnotherView) {
|
|
670
|
+
enqueue(stopSyncLayout());
|
|
671
|
+
enqueue(closeAllOverlays());
|
|
672
|
+
enqueue(closeSearch());
|
|
673
|
+
enqueue.assign({
|
|
674
|
+
focusedNode: null
|
|
675
|
+
});
|
|
676
|
+
enqueue(disableCompareWithLatest());
|
|
677
|
+
const { fromNode, toNode } = findCorrespondingNode(context, event);
|
|
678
|
+
if (fromNode && toNode) {
|
|
679
|
+
enqueue(xyflow.alignNodeFromToAfterNavigate({
|
|
680
|
+
fromNode: fromNode.id,
|
|
681
|
+
toPosition: {
|
|
682
|
+
x: toNode.data.x,
|
|
683
|
+
y: toNode.data.y
|
|
684
|
+
}
|
|
685
|
+
}));
|
|
686
|
+
enqueue(raiseFitDiagram({ delay: 80 }));
|
|
687
|
+
} else {
|
|
688
|
+
enqueue(
|
|
689
|
+
xyflow.setViewportCenter()
|
|
690
|
+
);
|
|
691
|
+
enqueue(raiseFitDiagram({ duration: 200, delay: 25 }));
|
|
692
|
+
}
|
|
693
|
+
enqueue(updateXYNodesEdges());
|
|
694
|
+
enqueue(ensureSyncLayout());
|
|
695
|
+
return;
|
|
696
|
+
}
|
|
697
|
+
enqueue(updateXYNodesEdges());
|
|
698
|
+
const syncLayoutActor = typedSystem(system).syncLayoutActorRef;
|
|
699
|
+
if (syncLayoutActor) {
|
|
700
|
+
enqueue.sendTo(syncLayoutActor, { type: "synced" });
|
|
701
|
+
}
|
|
702
|
+
const nextView = event.view;
|
|
703
|
+
if (context.toggledFeatures.enableCompareWithLatest === true && context.view._layout !== nextView._layout) {
|
|
704
|
+
if (nextView._layout === "auto" && context.viewportOnAutoLayout) {
|
|
705
|
+
enqueue(
|
|
706
|
+
xyflow.setViewport({
|
|
707
|
+
viewport: context.viewportOnAutoLayout,
|
|
708
|
+
duration: 0
|
|
709
|
+
})
|
|
710
|
+
);
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
if (nextView._layout === "manual" && context.viewportOnManualLayout) {
|
|
714
|
+
enqueue(
|
|
715
|
+
xyflow.setViewport({
|
|
716
|
+
viewport: context.viewportOnManualLayout,
|
|
717
|
+
duration: 0
|
|
718
|
+
})
|
|
719
|
+
);
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
let recenter = !context.viewportChangedManually;
|
|
724
|
+
recenter = recenter || nextView._type === "dynamic" && context.view._type === "dynamic" && nextView.variant !== context.view.variant;
|
|
725
|
+
recenter = recenter || context.toggledFeatures.enableCompareWithLatest === true && !!nextView._layout && context.view._layout !== nextView._layout;
|
|
726
|
+
if (recenter) {
|
|
727
|
+
enqueue(
|
|
728
|
+
xyflow.setViewportCenter(BBox.center(nextView.bounds))
|
|
729
|
+
);
|
|
730
|
+
enqueue(raiseFitDiagram({ delay: 50 }));
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
);
|
|
734
|
+
|
|
735
|
+
export { assignDynamicViewVariant, assignFocusedNode, assignLastClickedNode, cancelFitDiagram, closeAllOverlays, closeSearch, disableCompareWithLatest, emitEdgeClick, emitInitialized, emitNodeClick, emitOnChange, emitOnLayoutTypeChange, emitOpenSource, emitPaneClick, emitWalkthroughStarted, emitWalkthroughStep, emitWalkthroughStopped, ensureOverlaysActorState, ensureSearchActorState, ensureSyncLayout, findCorrespondingNode, focusOnNodesAndEdges, layoutAlign, nodeRef, notationsHighlight, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseLeave, onNodeMouseEnter, onNodeMouseLeave, openElementDetails, openSourceOfFocusedOrLastClickedNode, raiseFitDiagram, resetEdgesControlPoints, resetLastClickedNode, startEditing, stopEditing, stopSyncLayout, tagHighlight, toggleFeature, trigger, undimEverything, updateActiveWalkthroughState, updateFeatures, updateInputs, updateView, updateXYNodesEdges, xyflow };
|