@likec4/diagram 1.43.0 → 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 +5746 -4674
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +13 -10
- package/dist/LikeC4Diagram.props.d.ts +16 -7
- package/dist/LikeC4ProjectsProvider.js +1 -1
- package/dist/LikeC4View.d.ts +5 -0
- package/dist/LikeC4View.js +22 -11
- package/dist/ReactLikeC4.js +2 -2
- package/dist/StaticLikeC4Diagram.js +1 -1
- 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/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 +5 -4
- 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 +7 -5
- package/dist/overlays/element-details/MetadataValue.js +2 -2
- 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 +17 -3
- 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/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 +1 -1
- 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 +19 -18
- package/panda.buildinfo.json +107 -66
- 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,437 @@
|
|
|
1
|
+
import { isStepEdgeId, getParallelStepsPrefix } from '@likec4/core';
|
|
2
|
+
import { clamp, first } from 'remeda';
|
|
3
|
+
import { assertEvent } from 'xstate';
|
|
4
|
+
import { SeqParallelAreaColor } from '../xyflow-sequence/const.js';
|
|
5
|
+
import { navigateForward, navigateBack } from './assign.js';
|
|
6
|
+
import { cancelFitDiagram, undimEverything, tagHighlight, notationsHighlight, onEdgeDoubleClick, onEdgeMouseLeave, onEdgeMouseEnter, onNodeMouseLeave, onNodeMouseEnter, toggleFeature, ensureSyncLayout, emitOpenSource, openElementDetails, raiseFitDiagram, stopSyncLayout, disableCompareWithLatest, startEditing, resetEdgesControlPoints, stopEditing, layoutAlign, updateActiveWalkthroughState, xyflow, emitEdgeClick, emitWalkthroughStep, emitWalkthroughStarted, emitWalkthroughStopped, focusOnNodesAndEdges, resetLastClickedNode, emitPaneClick, assignFocusedNode, openSourceOfFocusedOrLastClickedNode, emitNodeClick, assignLastClickedNode } from './machine.actions.js';
|
|
7
|
+
import { machine } from './machine.setup.js';
|
|
8
|
+
import { typedSystem } from './utils.js';
|
|
9
|
+
import { x as xstateActions_cjsExports } from '../../_virtual/xstate-actions.cjs.js';
|
|
10
|
+
import { x as xstateGuards_cjsExports } from '../../_virtual/xstate-guards.cjs.js';
|
|
11
|
+
import { Base } from '../../base/Base.js';
|
|
12
|
+
|
|
13
|
+
const navigating = "#navigating";
|
|
14
|
+
const idle = machine.createStateConfig({
|
|
15
|
+
id: "idle",
|
|
16
|
+
on: {
|
|
17
|
+
"xyflow.nodeClick": [
|
|
18
|
+
{
|
|
19
|
+
guard: xstateGuards_cjsExports.and([
|
|
20
|
+
"enabled: FocusMode",
|
|
21
|
+
"click: node has connections",
|
|
22
|
+
xstateGuards_cjsExports.or([
|
|
23
|
+
"click: same node",
|
|
24
|
+
"click: selected node"
|
|
25
|
+
])
|
|
26
|
+
]),
|
|
27
|
+
actions: [
|
|
28
|
+
assignLastClickedNode(),
|
|
29
|
+
assignFocusedNode(),
|
|
30
|
+
emitNodeClick()
|
|
31
|
+
],
|
|
32
|
+
target: "focused"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
guard: xstateGuards_cjsExports.and([
|
|
36
|
+
"enabled: Readonly",
|
|
37
|
+
"enabled: ElementDetails",
|
|
38
|
+
"click: node has modelFqn",
|
|
39
|
+
xstateGuards_cjsExports.or([
|
|
40
|
+
"click: same node",
|
|
41
|
+
"click: selected node"
|
|
42
|
+
])
|
|
43
|
+
]),
|
|
44
|
+
actions: [
|
|
45
|
+
assignLastClickedNode(),
|
|
46
|
+
openSourceOfFocusedOrLastClickedNode(),
|
|
47
|
+
openElementDetails(),
|
|
48
|
+
emitNodeClick()
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
actions: [
|
|
53
|
+
assignLastClickedNode(),
|
|
54
|
+
openSourceOfFocusedOrLastClickedNode(),
|
|
55
|
+
emitNodeClick()
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"xyflow.paneClick": {
|
|
60
|
+
actions: [
|
|
61
|
+
resetLastClickedNode(),
|
|
62
|
+
emitPaneClick()
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"xyflow.paneDblClick": {
|
|
66
|
+
actions: [
|
|
67
|
+
resetLastClickedNode(),
|
|
68
|
+
xyflow.fitDiagram(),
|
|
69
|
+
xstateActions_cjsExports.enqueueActions(({ context, enqueue }) => {
|
|
70
|
+
enqueue(
|
|
71
|
+
emitOpenSource({ view: context.view.id })
|
|
72
|
+
);
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"focus.node": {
|
|
77
|
+
guard: "enabled: FocusMode",
|
|
78
|
+
actions: assignFocusedNode(),
|
|
79
|
+
target: "focused"
|
|
80
|
+
},
|
|
81
|
+
"xyflow.edgeClick": {
|
|
82
|
+
guard: xstateGuards_cjsExports.and([
|
|
83
|
+
"enabled: Readonly",
|
|
84
|
+
"is dynamic view",
|
|
85
|
+
"enabled: DynamicViewWalkthrough",
|
|
86
|
+
"click: selected edge"
|
|
87
|
+
]),
|
|
88
|
+
actions: [
|
|
89
|
+
xstateActions_cjsExports.raise(({ event }) => ({
|
|
90
|
+
type: "walkthrough.start",
|
|
91
|
+
stepId: event.edge.id
|
|
92
|
+
})),
|
|
93
|
+
emitEdgeClick()
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
const focused = machine.createStateConfig({
|
|
99
|
+
entry: [
|
|
100
|
+
focusOnNodesAndEdges(),
|
|
101
|
+
xstateActions_cjsExports.assign((s) => ({
|
|
102
|
+
viewportBeforeFocus: { ...s.context.viewport }
|
|
103
|
+
})),
|
|
104
|
+
openSourceOfFocusedOrLastClickedNode(),
|
|
105
|
+
xstateActions_cjsExports.spawnChild("hotkeyActorLogic", { id: "hotkey" }),
|
|
106
|
+
xyflow.fitFocusedBounds()
|
|
107
|
+
],
|
|
108
|
+
exit: xstateActions_cjsExports.enqueueActions(({ enqueue, context }) => {
|
|
109
|
+
enqueue.stopChild("hotkey");
|
|
110
|
+
if (context.viewportBeforeFocus) {
|
|
111
|
+
enqueue(xyflow.setViewport({ viewport: context.viewportBeforeFocus }));
|
|
112
|
+
} else {
|
|
113
|
+
enqueue.raise({ type: "fitDiagram" }, { id: "fitDiagram", delay: 20 });
|
|
114
|
+
}
|
|
115
|
+
enqueue(undimEverything());
|
|
116
|
+
enqueue.assign({
|
|
117
|
+
viewportBeforeFocus: null,
|
|
118
|
+
focusedNode: null
|
|
119
|
+
});
|
|
120
|
+
}),
|
|
121
|
+
on: {
|
|
122
|
+
"xyflow.nodeClick": [
|
|
123
|
+
{
|
|
124
|
+
guard: xstateGuards_cjsExports.and([
|
|
125
|
+
"click: focused node",
|
|
126
|
+
"click: node has modelFqn"
|
|
127
|
+
]),
|
|
128
|
+
actions: [
|
|
129
|
+
openElementDetails(),
|
|
130
|
+
emitNodeClick()
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
guard: "click: focused node",
|
|
135
|
+
actions: emitNodeClick(),
|
|
136
|
+
target: "#idle"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
actions: [
|
|
140
|
+
assignLastClickedNode(),
|
|
141
|
+
xstateActions_cjsExports.raise(({ event }) => ({
|
|
142
|
+
type: "focus.node",
|
|
143
|
+
nodeId: event.node.id
|
|
144
|
+
})),
|
|
145
|
+
emitNodeClick()
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"focus.node": {
|
|
150
|
+
actions: [
|
|
151
|
+
assignFocusedNode(),
|
|
152
|
+
focusOnNodesAndEdges(),
|
|
153
|
+
openSourceOfFocusedOrLastClickedNode(),
|
|
154
|
+
xyflow.fitFocusedBounds()
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"key.esc": {
|
|
158
|
+
target: "idle"
|
|
159
|
+
},
|
|
160
|
+
"xyflow.paneClick": {
|
|
161
|
+
actions: [
|
|
162
|
+
resetLastClickedNode(),
|
|
163
|
+
emitPaneClick()
|
|
164
|
+
],
|
|
165
|
+
target: "idle"
|
|
166
|
+
},
|
|
167
|
+
"notations.unhighlight": {
|
|
168
|
+
actions: focusOnNodesAndEdges()
|
|
169
|
+
},
|
|
170
|
+
"tag.unhighlight": {
|
|
171
|
+
actions: focusOnNodesAndEdges()
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
const walkthrough = machine.createStateConfig({
|
|
176
|
+
entry: [
|
|
177
|
+
xstateActions_cjsExports.spawnChild("hotkeyActorLogic", { id: "hotkey" }),
|
|
178
|
+
xstateActions_cjsExports.assign({
|
|
179
|
+
viewportBeforeFocus: ({ context }) => context.viewport,
|
|
180
|
+
activeWalkthrough: ({ context, event }) => {
|
|
181
|
+
assertEvent(event, "walkthrough.start");
|
|
182
|
+
const stepId = event.stepId ?? first(context.xyedges).id;
|
|
183
|
+
return {
|
|
184
|
+
stepId,
|
|
185
|
+
parallelPrefix: getParallelStepsPrefix(stepId)
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
}),
|
|
189
|
+
updateActiveWalkthroughState(),
|
|
190
|
+
xyflow.fitFocusedBounds(),
|
|
191
|
+
emitWalkthroughStarted()
|
|
192
|
+
],
|
|
193
|
+
exit: xstateActions_cjsExports.enqueueActions(({ enqueue, context }) => {
|
|
194
|
+
enqueue.stopChild("hotkey");
|
|
195
|
+
if (context.viewportBeforeFocus) {
|
|
196
|
+
enqueue(xyflow.setViewport({ viewport: context.viewportBeforeFocus }));
|
|
197
|
+
} else {
|
|
198
|
+
enqueue(raiseFitDiagram({ delay: 10 }));
|
|
199
|
+
}
|
|
200
|
+
if (context.dynamicViewVariant === "sequence" && context.activeWalkthrough?.parallelPrefix) {
|
|
201
|
+
enqueue.assign({
|
|
202
|
+
xynodes: context.xynodes.map((n) => {
|
|
203
|
+
if (n.type === "seq-parallel") {
|
|
204
|
+
return Base.setData(n, {
|
|
205
|
+
color: SeqParallelAreaColor.default
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
return n;
|
|
209
|
+
})
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
enqueue(undimEverything());
|
|
213
|
+
enqueue.assign({
|
|
214
|
+
activeWalkthrough: null,
|
|
215
|
+
viewportBeforeFocus: null
|
|
216
|
+
});
|
|
217
|
+
enqueue(emitWalkthroughStopped());
|
|
218
|
+
}),
|
|
219
|
+
on: {
|
|
220
|
+
"key.esc": {
|
|
221
|
+
target: "idle"
|
|
222
|
+
},
|
|
223
|
+
"key.arrow.left": {
|
|
224
|
+
actions: xstateActions_cjsExports.raise({ type: "walkthrough.step", direction: "previous" })
|
|
225
|
+
},
|
|
226
|
+
"key.arrow.right": {
|
|
227
|
+
actions: xstateActions_cjsExports.raise({ type: "walkthrough.step", direction: "next" })
|
|
228
|
+
},
|
|
229
|
+
"walkthrough.step": {
|
|
230
|
+
actions: [
|
|
231
|
+
xstateActions_cjsExports.assign(({ context, event }) => {
|
|
232
|
+
const { stepId } = context.activeWalkthrough;
|
|
233
|
+
const stepIndex = context.xyedges.findIndex((e) => e.id === stepId);
|
|
234
|
+
const nextStepIndex = clamp(event.direction === "next" ? stepIndex + 1 : stepIndex - 1, {
|
|
235
|
+
min: 0,
|
|
236
|
+
max: context.xyedges.length - 1
|
|
237
|
+
});
|
|
238
|
+
if (nextStepIndex === stepIndex) {
|
|
239
|
+
return {};
|
|
240
|
+
}
|
|
241
|
+
const nextStepId = context.xyedges[nextStepIndex].id;
|
|
242
|
+
return {
|
|
243
|
+
activeWalkthrough: {
|
|
244
|
+
stepId: nextStepId,
|
|
245
|
+
parallelPrefix: getParallelStepsPrefix(nextStepId)
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
}),
|
|
249
|
+
updateActiveWalkthroughState(),
|
|
250
|
+
xyflow.fitFocusedBounds(),
|
|
251
|
+
emitWalkthroughStep()
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
"xyflow.edgeClick": {
|
|
255
|
+
actions: [
|
|
256
|
+
xstateActions_cjsExports.assign(({ event, context }) => {
|
|
257
|
+
if (!isStepEdgeId(event.edge.id) || event.edge.id === context.activeWalkthrough?.stepId) {
|
|
258
|
+
return {};
|
|
259
|
+
}
|
|
260
|
+
return {
|
|
261
|
+
activeWalkthrough: {
|
|
262
|
+
stepId: event.edge.id,
|
|
263
|
+
parallelPrefix: getParallelStepsPrefix(event.edge.id)
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
}),
|
|
267
|
+
updateActiveWalkthroughState(),
|
|
268
|
+
xyflow.fitFocusedBounds(),
|
|
269
|
+
emitEdgeClick(),
|
|
270
|
+
emitWalkthroughStep()
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
"notations.unhighlight": {
|
|
274
|
+
actions: updateActiveWalkthroughState()
|
|
275
|
+
},
|
|
276
|
+
"tag.unhighlight": {
|
|
277
|
+
actions: updateActiveWalkthroughState()
|
|
278
|
+
},
|
|
279
|
+
"walkthrough.end": {
|
|
280
|
+
target: "idle"
|
|
281
|
+
},
|
|
282
|
+
"xyflow.paneDblClick": {
|
|
283
|
+
target: "idle"
|
|
284
|
+
},
|
|
285
|
+
// We received another view, close overlay and process event again
|
|
286
|
+
"update.view": {
|
|
287
|
+
guard: "is another view",
|
|
288
|
+
actions: xstateActions_cjsExports.raise(({ event }) => event, { delay: 50 }),
|
|
289
|
+
target: "idle"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
const ready = machine.createStateConfig({
|
|
294
|
+
initial: "idle",
|
|
295
|
+
on: {
|
|
296
|
+
"navigate.to": {
|
|
297
|
+
guard: "is another view",
|
|
298
|
+
actions: xstateActions_cjsExports.assign({
|
|
299
|
+
lastOnNavigate: ({ context, event }) => ({
|
|
300
|
+
fromView: context.view.id,
|
|
301
|
+
toView: event.viewId,
|
|
302
|
+
fromNode: event.fromNode ?? null
|
|
303
|
+
})
|
|
304
|
+
}),
|
|
305
|
+
target: navigating
|
|
306
|
+
},
|
|
307
|
+
"navigate.back": {
|
|
308
|
+
guard: ({ context }) => context.navigationHistory.currentIndex > 0,
|
|
309
|
+
actions: xstateActions_cjsExports.assign(navigateBack),
|
|
310
|
+
target: navigating
|
|
311
|
+
},
|
|
312
|
+
"navigate.forward": {
|
|
313
|
+
guard: ({ context }) => context.navigationHistory.currentIndex < context.navigationHistory.history.length - 1,
|
|
314
|
+
actions: xstateActions_cjsExports.assign(navigateForward),
|
|
315
|
+
target: navigating
|
|
316
|
+
},
|
|
317
|
+
"layout.align": {
|
|
318
|
+
guard: "not readonly",
|
|
319
|
+
actions: [
|
|
320
|
+
startEditing("node"),
|
|
321
|
+
layoutAlign(),
|
|
322
|
+
stopEditing(true)
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
"layout.resetEdgeControlPoints": {
|
|
326
|
+
guard: "not readonly",
|
|
327
|
+
actions: [
|
|
328
|
+
startEditing("node"),
|
|
329
|
+
resetEdgesControlPoints(),
|
|
330
|
+
stopEditing(true)
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
"layout.resetManualLayout": {
|
|
334
|
+
guard: "not readonly",
|
|
335
|
+
actions: [
|
|
336
|
+
stopSyncLayout(),
|
|
337
|
+
disableCompareWithLatest(),
|
|
338
|
+
ensureSyncLayout(),
|
|
339
|
+
xstateActions_cjsExports.emit({
|
|
340
|
+
type: "onChange",
|
|
341
|
+
change: {
|
|
342
|
+
op: "reset-manual-layout"
|
|
343
|
+
}
|
|
344
|
+
})
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
"xyflow.resized": {
|
|
348
|
+
guard: ({ context }) => context.features.enableFitView && !context.viewportChangedManually,
|
|
349
|
+
actions: [
|
|
350
|
+
cancelFitDiagram(),
|
|
351
|
+
raiseFitDiagram({ delay: 200 })
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
"open.elementDetails": {
|
|
355
|
+
guard: "enabled: ElementDetails",
|
|
356
|
+
actions: openElementDetails()
|
|
357
|
+
},
|
|
358
|
+
"open.relationshipsBrowser": {
|
|
359
|
+
actions: xstateActions_cjsExports.sendTo(({ system }) => typedSystem(system).overlaysActorRef, ({ context, event, self }) => ({
|
|
360
|
+
type: "open.relationshipsBrowser",
|
|
361
|
+
subject: event.fqn,
|
|
362
|
+
viewId: context.view.id,
|
|
363
|
+
scope: "view",
|
|
364
|
+
closeable: true,
|
|
365
|
+
enableChangeScope: true,
|
|
366
|
+
enableSelectSubject: true,
|
|
367
|
+
openSourceActor: self
|
|
368
|
+
}))
|
|
369
|
+
},
|
|
370
|
+
"open.relationshipDetails": {
|
|
371
|
+
actions: xstateActions_cjsExports.sendTo(({ system }) => typedSystem(system).overlaysActorRef, ({ context, event, self }) => ({
|
|
372
|
+
type: "open.relationshipDetails",
|
|
373
|
+
viewId: context.view.id,
|
|
374
|
+
openSourceActor: self,
|
|
375
|
+
...event.params
|
|
376
|
+
}))
|
|
377
|
+
},
|
|
378
|
+
"open.source": {
|
|
379
|
+
actions: emitOpenSource()
|
|
380
|
+
},
|
|
381
|
+
"walkthrough.start": {
|
|
382
|
+
guard: "is dynamic view",
|
|
383
|
+
target: ".walkthrough"
|
|
384
|
+
},
|
|
385
|
+
"toggle.feature": {
|
|
386
|
+
actions: [
|
|
387
|
+
toggleFeature(),
|
|
388
|
+
ensureSyncLayout()
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
"xyflow.nodeMouseEnter": {
|
|
392
|
+
actions: onNodeMouseEnter()
|
|
393
|
+
},
|
|
394
|
+
"xyflow.nodeMouseLeave": {
|
|
395
|
+
actions: onNodeMouseLeave()
|
|
396
|
+
},
|
|
397
|
+
"xyflow.edgeMouseEnter": {
|
|
398
|
+
actions: onEdgeMouseEnter()
|
|
399
|
+
},
|
|
400
|
+
"xyflow.edgeMouseLeave": {
|
|
401
|
+
actions: onEdgeMouseLeave()
|
|
402
|
+
},
|
|
403
|
+
"xyflow.edgeDoubleClick": {
|
|
404
|
+
guard: "not readonly",
|
|
405
|
+
actions: onEdgeDoubleClick()
|
|
406
|
+
},
|
|
407
|
+
"notations.highlight": {
|
|
408
|
+
actions: notationsHighlight()
|
|
409
|
+
},
|
|
410
|
+
"notations.unhighlight": {
|
|
411
|
+
actions: undimEverything()
|
|
412
|
+
},
|
|
413
|
+
"tag.highlight": {
|
|
414
|
+
actions: tagHighlight()
|
|
415
|
+
},
|
|
416
|
+
"tag.unhighlight": {
|
|
417
|
+
actions: undimEverything()
|
|
418
|
+
},
|
|
419
|
+
"open.search": {
|
|
420
|
+
guard: "enabled: Search",
|
|
421
|
+
actions: xstateActions_cjsExports.sendTo(({ system }) => typedSystem(system).searchActorRef, ({ event }) => ({
|
|
422
|
+
type: "open",
|
|
423
|
+
search: event.search
|
|
424
|
+
}))
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
exit: [
|
|
428
|
+
cancelFitDiagram()
|
|
429
|
+
],
|
|
430
|
+
states: {
|
|
431
|
+
idle,
|
|
432
|
+
focused,
|
|
433
|
+
walkthrough
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
|
|
437
|
+
export { focused, idle, ready, walkthrough };
|