@likec4/diagram 1.43.0 → 1.45.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 +14727 -13166
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +14 -9
- package/dist/LikeC4Diagram.props.d.ts +25 -15
- package/dist/LikeC4ProjectsProvider.js +1 -1
- package/dist/LikeC4Styles.js +0 -3
- package/dist/LikeC4View.d.ts +8 -3
- package/dist/LikeC4View.js +29 -14
- package/dist/ReactLikeC4.d.ts +2 -2
- 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 +25 -14
- package/dist/base/updateNodes.d.ts +14 -0
- package/dist/base/updateNodes.js +51 -17
- package/dist/base-primitives/Markdown.d.ts +30 -4
- package/dist/base-primitives/Markdown.js +3 -2
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +3 -2
- package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +3 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +3 -2
- 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 +8 -1
- package/dist/base-primitives/edge/EdgeLabel.d.ts +3 -2
- 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 +29 -5
- package/dist/base-primitives/element/ElementActionButtons.d.ts +6 -4
- package/dist/base-primitives/element/ElementActionButtons.js +3 -3
- package/dist/base-primitives/element/ElementData.d.ts +3 -3
- package/dist/base-primitives/element/ElementData.js +13 -7
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +3 -2
- package/dist/base-primitives/element/ElementDetailsButton.js +5 -5
- package/dist/base-primitives/element/ElementNodeContainer.css.js +15 -27
- package/dist/base-primitives/element/ElementShape.js +5 -5
- package/dist/base-primitives/element/ElementTags.d.ts +6 -4
- 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 +25 -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 +3 -19
- package/dist/context/index.d.ts +1 -1
- package/dist/custom/customNodes.js +3 -2
- package/dist/custom/hooks.d.ts +3 -3
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +5 -5
- package/dist/editor/LikeC4EditorContext.d.ts +21 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +4 -2
- 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 +65 -0
- package/dist/hooks/useLikeC4Project.d.ts +6 -1
- package/dist/hooks/useLikeC4Project.js +14 -2
- package/dist/hooks/useMediaPrint.d.ts +6 -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 +60 -52
- package/dist/likec4diagram/convert-to-xyflow.d.ts +0 -1
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/edges/EdgeDrifts.js +38 -0
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +256 -217
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +9 -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/NodeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +50 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +7 -2
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +9 -1
- package/dist/likec4diagram/custom/nodes/nodes.js +74 -29
- 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 +8 -10
- package/dist/likec4diagram/relationship-popover/actor.d.ts +1 -1
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
- package/dist/likec4diagram/state/DiagramActorProvider.js +95 -70
- package/dist/likec4diagram/state/assign.d.ts +13 -7
- package/dist/likec4diagram/state/assign.js +43 -282
- package/dist/likec4diagram/state/createViewChange.d.ts +3 -0
- package/dist/likec4diagram/state/createViewChange.js +79 -0
- package/dist/likec4diagram/state/diagram-api.d.ts +109 -0
- package/dist/likec4diagram/state/diagram-api.js +126 -0
- package/dist/likec4diagram/state/machine.actions.d.ts +1783 -0
- package/dist/likec4diagram/state/machine.actions.js +644 -0
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +579 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +129 -0
- package/dist/likec4diagram/state/machine.d.ts +22 -0
- package/dist/likec4diagram/state/machine.js +127 -0
- package/dist/likec4diagram/state/machine.setup.d.ts +327 -0
- package/dist/likec4diagram/state/machine.setup.js +93 -0
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +208 -0
- package/dist/likec4diagram/state/machine.state.initializing.js +55 -0
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +14 -0
- package/dist/likec4diagram/state/machine.state.navigating.js +178 -0
- package/dist/likec4diagram/state/machine.state.ready.d.ts +3131 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +386 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.js +85 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +474 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.js +96 -0
- package/dist/likec4diagram/state/machine.state.ready.js +262 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +128 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +40 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +511 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +177 -0
- package/dist/likec4diagram/state/mediaPrintActor.d.ts +12 -0
- package/dist/likec4diagram/state/mediaPrintActor.js +18 -0
- package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +31 -108
- package/dist/likec4diagram/state/syncManualLayoutActor.js +278 -142
- package/dist/likec4diagram/state/types.d.ts +7 -12
- package/dist/likec4diagram/state/utils.d.ts +19 -4
- package/dist/likec4diagram/state/utils.js +47 -4
- package/dist/likec4diagram/types.d.ts +8 -8
- 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.css.js +5 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +5 -4
- package/dist/likec4diagram/useLayoutConstraints.d.ts +10 -5
- package/dist/likec4diagram/useLayoutConstraints.js +237 -61
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +0 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +14 -17
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +11 -8
- package/dist/navigationpanel/NavigationPanel.js +16 -8
- 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 +9 -205
- package/dist/navigationpanel/actor.js +6 -5
- 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 +26 -18
- 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 +66 -66
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +31 -14
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +2 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +68 -50
- 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.css.js +3 -3
- package/dist/overlays/element-details/ElementDetailsCard.js +7 -5
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -1
- 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 +8 -82
- package/dist/overlays/element-details/actor.js +0 -8
- package/dist/overlays/overlay/Overlay.js +10 -10
- package/dist/overlays/overlaysActor.d.ts +7 -150
- package/dist/overlays/overlaysActor.js +183 -161
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -3
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/_types.d.ts +3 -4
- package/dist/overlays/relationship-details/actor.d.ts +6 -550
- package/dist/overlays/relationship-details/actor.js +18 -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/relationship-details/layout-to-xyflow.js +3 -5
- package/dist/overlays/relationship-details/layout.d.ts +3 -3
- package/dist/overlays/relationship-details/layout.js +4 -4
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -4
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/_types.d.ts +2 -3
- package/dist/overlays/relationships-browser/actor.d.ts +7 -673
- 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/overlays/relationships-browser/layout.d.ts +2 -2
- package/dist/overlays/relationships-browser/layout.js +3 -3
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +0 -3
- package/dist/overlays/types.d.ts +12 -13
- 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/search/components/_shared.css.d.ts +1 -1
- package/dist/search/searchActor.d.ts +3 -66
- package/dist/shadowroot/ShadowRoot.d.ts +5 -7
- package/dist/shadowroot/ShadowRoot.js +8 -6
- package/dist/styles.css2.js +1 -1
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/vector.d.ts +83 -21
- package/dist/utils/vector.js +98 -24
- package/dist/utils/view-bounds.d.ts +8 -0
- package/dist/utils/view-bounds.js +58 -0
- package/dist/utils/xyflow.d.ts +52 -8
- package/dist/utils/xyflow.js +31 -11
- package/package.json +26 -24
- package/panda.buildinfo.json +124 -71
- 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,579 @@
|
|
|
1
|
+
import { BBox } from '@likec4/core';
|
|
2
|
+
import { Viewport } from '@xyflow/react';
|
|
3
|
+
import { ActionFunction, Values, CancelAction } from 'xstate';
|
|
4
|
+
import { Context, Events, EmittedEvents } from './machine.setup';
|
|
5
|
+
import { SyncLayoutActorLogic } from './syncManualLayoutActor';
|
|
6
|
+
import { HotkeyActorLogic } from './hotkeyActor';
|
|
7
|
+
import { OverlaysActorLogic } from '../../overlays/overlaysActor';
|
|
8
|
+
import { SearchActorLogic } from '../../search/searchActor';
|
|
9
|
+
import { MediaPrintActorLogic } from './mediaPrintActor';
|
|
10
|
+
export declare const setViewport: (params?: {
|
|
11
|
+
viewport: Viewport;
|
|
12
|
+
duration?: number;
|
|
13
|
+
}) => ActionFunction<Context, Events, Events, unknown, Values<{
|
|
14
|
+
syncManualLayoutActorLogic: {
|
|
15
|
+
src: "syncManualLayoutActorLogic";
|
|
16
|
+
logic: SyncLayoutActorLogic;
|
|
17
|
+
id: "syncLayout";
|
|
18
|
+
};
|
|
19
|
+
hotkeyActorLogic: {
|
|
20
|
+
src: "hotkeyActorLogic";
|
|
21
|
+
logic: HotkeyActorLogic;
|
|
22
|
+
id: "hotkey";
|
|
23
|
+
};
|
|
24
|
+
overlaysActorLogic: {
|
|
25
|
+
src: "overlaysActorLogic";
|
|
26
|
+
logic: OverlaysActorLogic;
|
|
27
|
+
id: "overlays";
|
|
28
|
+
};
|
|
29
|
+
searchActorLogic: {
|
|
30
|
+
src: "searchActorLogic";
|
|
31
|
+
logic: SearchActorLogic;
|
|
32
|
+
id: "search";
|
|
33
|
+
};
|
|
34
|
+
mediaPrintActorLogic: {
|
|
35
|
+
src: "mediaPrintActorLogic";
|
|
36
|
+
logic: MediaPrintActorLogic;
|
|
37
|
+
id: "mediaPrint";
|
|
38
|
+
};
|
|
39
|
+
}>, never, Values<{
|
|
40
|
+
isReady: {
|
|
41
|
+
type: "isReady";
|
|
42
|
+
params: unknown;
|
|
43
|
+
};
|
|
44
|
+
"enabled: FitView": {
|
|
45
|
+
type: "enabled: FitView";
|
|
46
|
+
params: unknown;
|
|
47
|
+
};
|
|
48
|
+
"enabled: FocusMode": {
|
|
49
|
+
type: "enabled: FocusMode";
|
|
50
|
+
params: unknown;
|
|
51
|
+
};
|
|
52
|
+
"enabled: Readonly": {
|
|
53
|
+
type: "enabled: Readonly";
|
|
54
|
+
params: unknown;
|
|
55
|
+
};
|
|
56
|
+
"enabled: RelationshipDetails": {
|
|
57
|
+
type: "enabled: RelationshipDetails";
|
|
58
|
+
params: unknown;
|
|
59
|
+
};
|
|
60
|
+
"enabled: Search": {
|
|
61
|
+
type: "enabled: Search";
|
|
62
|
+
params: unknown;
|
|
63
|
+
};
|
|
64
|
+
"enabled: ElementDetails": {
|
|
65
|
+
type: "enabled: ElementDetails";
|
|
66
|
+
params: unknown;
|
|
67
|
+
};
|
|
68
|
+
"enabled: OpenSource": {
|
|
69
|
+
type: "enabled: OpenSource";
|
|
70
|
+
params: unknown;
|
|
71
|
+
};
|
|
72
|
+
"enabled: DynamicViewWalkthrough": {
|
|
73
|
+
type: "enabled: DynamicViewWalkthrough";
|
|
74
|
+
params: unknown;
|
|
75
|
+
};
|
|
76
|
+
"enabled: Overlays": {
|
|
77
|
+
type: "enabled: Overlays";
|
|
78
|
+
params: unknown;
|
|
79
|
+
};
|
|
80
|
+
"not readonly": {
|
|
81
|
+
type: "not readonly";
|
|
82
|
+
params: unknown;
|
|
83
|
+
};
|
|
84
|
+
"is dynamic view": {
|
|
85
|
+
type: "is dynamic view";
|
|
86
|
+
params: unknown;
|
|
87
|
+
};
|
|
88
|
+
"is another view": {
|
|
89
|
+
type: "is another view";
|
|
90
|
+
params: unknown;
|
|
91
|
+
};
|
|
92
|
+
"click: node has modelFqn": {
|
|
93
|
+
type: "click: node has modelFqn";
|
|
94
|
+
params: unknown;
|
|
95
|
+
};
|
|
96
|
+
"click: selected node": {
|
|
97
|
+
type: "click: selected node";
|
|
98
|
+
params: unknown;
|
|
99
|
+
};
|
|
100
|
+
"click: same node": {
|
|
101
|
+
type: "click: same node";
|
|
102
|
+
params: unknown;
|
|
103
|
+
};
|
|
104
|
+
"click: focused node": {
|
|
105
|
+
type: "click: focused node";
|
|
106
|
+
params: unknown;
|
|
107
|
+
};
|
|
108
|
+
"click: node has connections": {
|
|
109
|
+
type: "click: node has connections";
|
|
110
|
+
params: unknown;
|
|
111
|
+
};
|
|
112
|
+
"click: selected edge": {
|
|
113
|
+
type: "click: selected edge";
|
|
114
|
+
params: unknown;
|
|
115
|
+
};
|
|
116
|
+
}>, never, EmittedEvents>;
|
|
117
|
+
export declare const setViewportCenter: (params?: {
|
|
118
|
+
x: number;
|
|
119
|
+
y: number;
|
|
120
|
+
}) => ActionFunction<Context, Events, Events, unknown, Values<{
|
|
121
|
+
syncManualLayoutActorLogic: {
|
|
122
|
+
src: "syncManualLayoutActorLogic";
|
|
123
|
+
logic: SyncLayoutActorLogic;
|
|
124
|
+
id: "syncLayout";
|
|
125
|
+
};
|
|
126
|
+
hotkeyActorLogic: {
|
|
127
|
+
src: "hotkeyActorLogic";
|
|
128
|
+
logic: HotkeyActorLogic;
|
|
129
|
+
id: "hotkey";
|
|
130
|
+
};
|
|
131
|
+
overlaysActorLogic: {
|
|
132
|
+
src: "overlaysActorLogic";
|
|
133
|
+
logic: OverlaysActorLogic;
|
|
134
|
+
id: "overlays";
|
|
135
|
+
};
|
|
136
|
+
searchActorLogic: {
|
|
137
|
+
src: "searchActorLogic";
|
|
138
|
+
logic: SearchActorLogic;
|
|
139
|
+
id: "search";
|
|
140
|
+
};
|
|
141
|
+
mediaPrintActorLogic: {
|
|
142
|
+
src: "mediaPrintActorLogic";
|
|
143
|
+
logic: MediaPrintActorLogic;
|
|
144
|
+
id: "mediaPrint";
|
|
145
|
+
};
|
|
146
|
+
}>, never, Values<{
|
|
147
|
+
isReady: {
|
|
148
|
+
type: "isReady";
|
|
149
|
+
params: unknown;
|
|
150
|
+
};
|
|
151
|
+
"enabled: FitView": {
|
|
152
|
+
type: "enabled: FitView";
|
|
153
|
+
params: unknown;
|
|
154
|
+
};
|
|
155
|
+
"enabled: FocusMode": {
|
|
156
|
+
type: "enabled: FocusMode";
|
|
157
|
+
params: unknown;
|
|
158
|
+
};
|
|
159
|
+
"enabled: Readonly": {
|
|
160
|
+
type: "enabled: Readonly";
|
|
161
|
+
params: unknown;
|
|
162
|
+
};
|
|
163
|
+
"enabled: RelationshipDetails": {
|
|
164
|
+
type: "enabled: RelationshipDetails";
|
|
165
|
+
params: unknown;
|
|
166
|
+
};
|
|
167
|
+
"enabled: Search": {
|
|
168
|
+
type: "enabled: Search";
|
|
169
|
+
params: unknown;
|
|
170
|
+
};
|
|
171
|
+
"enabled: ElementDetails": {
|
|
172
|
+
type: "enabled: ElementDetails";
|
|
173
|
+
params: unknown;
|
|
174
|
+
};
|
|
175
|
+
"enabled: OpenSource": {
|
|
176
|
+
type: "enabled: OpenSource";
|
|
177
|
+
params: unknown;
|
|
178
|
+
};
|
|
179
|
+
"enabled: DynamicViewWalkthrough": {
|
|
180
|
+
type: "enabled: DynamicViewWalkthrough";
|
|
181
|
+
params: unknown;
|
|
182
|
+
};
|
|
183
|
+
"enabled: Overlays": {
|
|
184
|
+
type: "enabled: Overlays";
|
|
185
|
+
params: unknown;
|
|
186
|
+
};
|
|
187
|
+
"not readonly": {
|
|
188
|
+
type: "not readonly";
|
|
189
|
+
params: unknown;
|
|
190
|
+
};
|
|
191
|
+
"is dynamic view": {
|
|
192
|
+
type: "is dynamic view";
|
|
193
|
+
params: unknown;
|
|
194
|
+
};
|
|
195
|
+
"is another view": {
|
|
196
|
+
type: "is another view";
|
|
197
|
+
params: unknown;
|
|
198
|
+
};
|
|
199
|
+
"click: node has modelFqn": {
|
|
200
|
+
type: "click: node has modelFqn";
|
|
201
|
+
params: unknown;
|
|
202
|
+
};
|
|
203
|
+
"click: selected node": {
|
|
204
|
+
type: "click: selected node";
|
|
205
|
+
params: unknown;
|
|
206
|
+
};
|
|
207
|
+
"click: same node": {
|
|
208
|
+
type: "click: same node";
|
|
209
|
+
params: unknown;
|
|
210
|
+
};
|
|
211
|
+
"click: focused node": {
|
|
212
|
+
type: "click: focused node";
|
|
213
|
+
params: unknown;
|
|
214
|
+
};
|
|
215
|
+
"click: node has connections": {
|
|
216
|
+
type: "click: node has connections";
|
|
217
|
+
params: unknown;
|
|
218
|
+
};
|
|
219
|
+
"click: selected edge": {
|
|
220
|
+
type: "click: selected edge";
|
|
221
|
+
params: unknown;
|
|
222
|
+
};
|
|
223
|
+
}>, never, EmittedEvents>;
|
|
224
|
+
export declare const fitDiagram: (params?: {
|
|
225
|
+
duration?: number;
|
|
226
|
+
bounds?: BBox;
|
|
227
|
+
}) => ActionFunction<Context, Events, Events, undefined, Values<{
|
|
228
|
+
syncManualLayoutActorLogic: {
|
|
229
|
+
src: "syncManualLayoutActorLogic";
|
|
230
|
+
logic: SyncLayoutActorLogic;
|
|
231
|
+
id: "syncLayout";
|
|
232
|
+
};
|
|
233
|
+
hotkeyActorLogic: {
|
|
234
|
+
src: "hotkeyActorLogic";
|
|
235
|
+
logic: HotkeyActorLogic;
|
|
236
|
+
id: "hotkey";
|
|
237
|
+
};
|
|
238
|
+
overlaysActorLogic: {
|
|
239
|
+
src: "overlaysActorLogic";
|
|
240
|
+
logic: OverlaysActorLogic;
|
|
241
|
+
id: "overlays";
|
|
242
|
+
};
|
|
243
|
+
searchActorLogic: {
|
|
244
|
+
src: "searchActorLogic";
|
|
245
|
+
logic: SearchActorLogic;
|
|
246
|
+
id: "search";
|
|
247
|
+
};
|
|
248
|
+
mediaPrintActorLogic: {
|
|
249
|
+
src: "mediaPrintActorLogic";
|
|
250
|
+
logic: MediaPrintActorLogic;
|
|
251
|
+
id: "mediaPrint";
|
|
252
|
+
};
|
|
253
|
+
}>, never, Values<{
|
|
254
|
+
isReady: {
|
|
255
|
+
type: "isReady";
|
|
256
|
+
params: unknown;
|
|
257
|
+
};
|
|
258
|
+
"enabled: FitView": {
|
|
259
|
+
type: "enabled: FitView";
|
|
260
|
+
params: unknown;
|
|
261
|
+
};
|
|
262
|
+
"enabled: FocusMode": {
|
|
263
|
+
type: "enabled: FocusMode";
|
|
264
|
+
params: unknown;
|
|
265
|
+
};
|
|
266
|
+
"enabled: Readonly": {
|
|
267
|
+
type: "enabled: Readonly";
|
|
268
|
+
params: unknown;
|
|
269
|
+
};
|
|
270
|
+
"enabled: RelationshipDetails": {
|
|
271
|
+
type: "enabled: RelationshipDetails";
|
|
272
|
+
params: unknown;
|
|
273
|
+
};
|
|
274
|
+
"enabled: Search": {
|
|
275
|
+
type: "enabled: Search";
|
|
276
|
+
params: unknown;
|
|
277
|
+
};
|
|
278
|
+
"enabled: ElementDetails": {
|
|
279
|
+
type: "enabled: ElementDetails";
|
|
280
|
+
params: unknown;
|
|
281
|
+
};
|
|
282
|
+
"enabled: OpenSource": {
|
|
283
|
+
type: "enabled: OpenSource";
|
|
284
|
+
params: unknown;
|
|
285
|
+
};
|
|
286
|
+
"enabled: DynamicViewWalkthrough": {
|
|
287
|
+
type: "enabled: DynamicViewWalkthrough";
|
|
288
|
+
params: unknown;
|
|
289
|
+
};
|
|
290
|
+
"enabled: Overlays": {
|
|
291
|
+
type: "enabled: Overlays";
|
|
292
|
+
params: unknown;
|
|
293
|
+
};
|
|
294
|
+
"not readonly": {
|
|
295
|
+
type: "not readonly";
|
|
296
|
+
params: unknown;
|
|
297
|
+
};
|
|
298
|
+
"is dynamic view": {
|
|
299
|
+
type: "is dynamic view";
|
|
300
|
+
params: unknown;
|
|
301
|
+
};
|
|
302
|
+
"is another view": {
|
|
303
|
+
type: "is another view";
|
|
304
|
+
params: unknown;
|
|
305
|
+
};
|
|
306
|
+
"click: node has modelFqn": {
|
|
307
|
+
type: "click: node has modelFqn";
|
|
308
|
+
params: unknown;
|
|
309
|
+
};
|
|
310
|
+
"click: selected node": {
|
|
311
|
+
type: "click: selected node";
|
|
312
|
+
params: unknown;
|
|
313
|
+
};
|
|
314
|
+
"click: same node": {
|
|
315
|
+
type: "click: same node";
|
|
316
|
+
params: unknown;
|
|
317
|
+
};
|
|
318
|
+
"click: focused node": {
|
|
319
|
+
type: "click: focused node";
|
|
320
|
+
params: unknown;
|
|
321
|
+
};
|
|
322
|
+
"click: node has connections": {
|
|
323
|
+
type: "click: node has connections";
|
|
324
|
+
params: unknown;
|
|
325
|
+
};
|
|
326
|
+
"click: selected edge": {
|
|
327
|
+
type: "click: selected edge";
|
|
328
|
+
params: unknown;
|
|
329
|
+
};
|
|
330
|
+
}>, never, EmittedEvents>;
|
|
331
|
+
export declare const fitFocusedBounds: () => ActionFunction<Context, Events, Events, unknown, Values<{
|
|
332
|
+
syncManualLayoutActorLogic: {
|
|
333
|
+
src: "syncManualLayoutActorLogic";
|
|
334
|
+
logic: SyncLayoutActorLogic;
|
|
335
|
+
id: "syncLayout";
|
|
336
|
+
};
|
|
337
|
+
hotkeyActorLogic: {
|
|
338
|
+
src: "hotkeyActorLogic";
|
|
339
|
+
logic: HotkeyActorLogic;
|
|
340
|
+
id: "hotkey";
|
|
341
|
+
};
|
|
342
|
+
overlaysActorLogic: {
|
|
343
|
+
src: "overlaysActorLogic";
|
|
344
|
+
logic: OverlaysActorLogic;
|
|
345
|
+
id: "overlays";
|
|
346
|
+
};
|
|
347
|
+
searchActorLogic: {
|
|
348
|
+
src: "searchActorLogic";
|
|
349
|
+
logic: SearchActorLogic;
|
|
350
|
+
id: "search";
|
|
351
|
+
};
|
|
352
|
+
mediaPrintActorLogic: {
|
|
353
|
+
src: "mediaPrintActorLogic";
|
|
354
|
+
logic: MediaPrintActorLogic;
|
|
355
|
+
id: "mediaPrint";
|
|
356
|
+
};
|
|
357
|
+
}>, never, Values<{
|
|
358
|
+
isReady: {
|
|
359
|
+
type: "isReady";
|
|
360
|
+
params: unknown;
|
|
361
|
+
};
|
|
362
|
+
"enabled: FitView": {
|
|
363
|
+
type: "enabled: FitView";
|
|
364
|
+
params: unknown;
|
|
365
|
+
};
|
|
366
|
+
"enabled: FocusMode": {
|
|
367
|
+
type: "enabled: FocusMode";
|
|
368
|
+
params: unknown;
|
|
369
|
+
};
|
|
370
|
+
"enabled: Readonly": {
|
|
371
|
+
type: "enabled: Readonly";
|
|
372
|
+
params: unknown;
|
|
373
|
+
};
|
|
374
|
+
"enabled: RelationshipDetails": {
|
|
375
|
+
type: "enabled: RelationshipDetails";
|
|
376
|
+
params: unknown;
|
|
377
|
+
};
|
|
378
|
+
"enabled: Search": {
|
|
379
|
+
type: "enabled: Search";
|
|
380
|
+
params: unknown;
|
|
381
|
+
};
|
|
382
|
+
"enabled: ElementDetails": {
|
|
383
|
+
type: "enabled: ElementDetails";
|
|
384
|
+
params: unknown;
|
|
385
|
+
};
|
|
386
|
+
"enabled: OpenSource": {
|
|
387
|
+
type: "enabled: OpenSource";
|
|
388
|
+
params: unknown;
|
|
389
|
+
};
|
|
390
|
+
"enabled: DynamicViewWalkthrough": {
|
|
391
|
+
type: "enabled: DynamicViewWalkthrough";
|
|
392
|
+
params: unknown;
|
|
393
|
+
};
|
|
394
|
+
"enabled: Overlays": {
|
|
395
|
+
type: "enabled: Overlays";
|
|
396
|
+
params: unknown;
|
|
397
|
+
};
|
|
398
|
+
"not readonly": {
|
|
399
|
+
type: "not readonly";
|
|
400
|
+
params: unknown;
|
|
401
|
+
};
|
|
402
|
+
"is dynamic view": {
|
|
403
|
+
type: "is dynamic view";
|
|
404
|
+
params: unknown;
|
|
405
|
+
};
|
|
406
|
+
"is another view": {
|
|
407
|
+
type: "is another view";
|
|
408
|
+
params: unknown;
|
|
409
|
+
};
|
|
410
|
+
"click: node has modelFqn": {
|
|
411
|
+
type: "click: node has modelFqn";
|
|
412
|
+
params: unknown;
|
|
413
|
+
};
|
|
414
|
+
"click: selected node": {
|
|
415
|
+
type: "click: selected node";
|
|
416
|
+
params: unknown;
|
|
417
|
+
};
|
|
418
|
+
"click: same node": {
|
|
419
|
+
type: "click: same node";
|
|
420
|
+
params: unknown;
|
|
421
|
+
};
|
|
422
|
+
"click: focused node": {
|
|
423
|
+
type: "click: focused node";
|
|
424
|
+
params: unknown;
|
|
425
|
+
};
|
|
426
|
+
"click: node has connections": {
|
|
427
|
+
type: "click: node has connections";
|
|
428
|
+
params: unknown;
|
|
429
|
+
};
|
|
430
|
+
"click: selected edge": {
|
|
431
|
+
type: "click: selected edge";
|
|
432
|
+
params: unknown;
|
|
433
|
+
};
|
|
434
|
+
}>, never, EmittedEvents>;
|
|
435
|
+
export declare const raiseSetViewport: (params: {
|
|
436
|
+
delay?: number;
|
|
437
|
+
duration?: number;
|
|
438
|
+
viewport: Viewport;
|
|
439
|
+
}) => ActionFunction<Context, Events, Events, undefined, never, never, never, never, never>;
|
|
440
|
+
export declare const cancelFitDiagram: () => CancelAction<Context, Events, undefined, Events>;
|
|
441
|
+
export declare const raiseFitDiagram: (params?: {
|
|
442
|
+
delay?: number;
|
|
443
|
+
duration?: number;
|
|
444
|
+
bounds?: BBox;
|
|
445
|
+
}) => ActionFunction<Context, Events, Events, undefined, never, never, never, never, never>;
|
|
446
|
+
export declare const assignViewportBefore: (viewport?: Viewport | null) => ActionFunction<Context, Events, Events, undefined, Values<{
|
|
447
|
+
syncManualLayoutActorLogic: {
|
|
448
|
+
src: "syncManualLayoutActorLogic";
|
|
449
|
+
logic: SyncLayoutActorLogic;
|
|
450
|
+
id: "syncLayout";
|
|
451
|
+
};
|
|
452
|
+
hotkeyActorLogic: {
|
|
453
|
+
src: "hotkeyActorLogic";
|
|
454
|
+
logic: HotkeyActorLogic;
|
|
455
|
+
id: "hotkey";
|
|
456
|
+
};
|
|
457
|
+
overlaysActorLogic: {
|
|
458
|
+
src: "overlaysActorLogic";
|
|
459
|
+
logic: OverlaysActorLogic;
|
|
460
|
+
id: "overlays";
|
|
461
|
+
};
|
|
462
|
+
searchActorLogic: {
|
|
463
|
+
src: "searchActorLogic";
|
|
464
|
+
logic: SearchActorLogic;
|
|
465
|
+
id: "search";
|
|
466
|
+
};
|
|
467
|
+
mediaPrintActorLogic: {
|
|
468
|
+
src: "mediaPrintActorLogic";
|
|
469
|
+
logic: MediaPrintActorLogic;
|
|
470
|
+
id: "mediaPrint";
|
|
471
|
+
};
|
|
472
|
+
}>, never, never, never, never>;
|
|
473
|
+
export declare const returnViewportBefore: (params?: {
|
|
474
|
+
delay?: number;
|
|
475
|
+
duration?: number;
|
|
476
|
+
}) => ActionFunction<Context, Events, Events, undefined, Values<{
|
|
477
|
+
syncManualLayoutActorLogic: {
|
|
478
|
+
src: "syncManualLayoutActorLogic";
|
|
479
|
+
logic: SyncLayoutActorLogic;
|
|
480
|
+
id: "syncLayout";
|
|
481
|
+
};
|
|
482
|
+
hotkeyActorLogic: {
|
|
483
|
+
src: "hotkeyActorLogic";
|
|
484
|
+
logic: HotkeyActorLogic;
|
|
485
|
+
id: "hotkey";
|
|
486
|
+
};
|
|
487
|
+
overlaysActorLogic: {
|
|
488
|
+
src: "overlaysActorLogic";
|
|
489
|
+
logic: OverlaysActorLogic;
|
|
490
|
+
id: "overlays";
|
|
491
|
+
};
|
|
492
|
+
searchActorLogic: {
|
|
493
|
+
src: "searchActorLogic";
|
|
494
|
+
logic: SearchActorLogic;
|
|
495
|
+
id: "search";
|
|
496
|
+
};
|
|
497
|
+
mediaPrintActorLogic: {
|
|
498
|
+
src: "mediaPrintActorLogic";
|
|
499
|
+
logic: MediaPrintActorLogic;
|
|
500
|
+
id: "mediaPrint";
|
|
501
|
+
};
|
|
502
|
+
}>, never, Values<{
|
|
503
|
+
isReady: {
|
|
504
|
+
type: "isReady";
|
|
505
|
+
params: unknown;
|
|
506
|
+
};
|
|
507
|
+
"enabled: FitView": {
|
|
508
|
+
type: "enabled: FitView";
|
|
509
|
+
params: unknown;
|
|
510
|
+
};
|
|
511
|
+
"enabled: FocusMode": {
|
|
512
|
+
type: "enabled: FocusMode";
|
|
513
|
+
params: unknown;
|
|
514
|
+
};
|
|
515
|
+
"enabled: Readonly": {
|
|
516
|
+
type: "enabled: Readonly";
|
|
517
|
+
params: unknown;
|
|
518
|
+
};
|
|
519
|
+
"enabled: RelationshipDetails": {
|
|
520
|
+
type: "enabled: RelationshipDetails";
|
|
521
|
+
params: unknown;
|
|
522
|
+
};
|
|
523
|
+
"enabled: Search": {
|
|
524
|
+
type: "enabled: Search";
|
|
525
|
+
params: unknown;
|
|
526
|
+
};
|
|
527
|
+
"enabled: ElementDetails": {
|
|
528
|
+
type: "enabled: ElementDetails";
|
|
529
|
+
params: unknown;
|
|
530
|
+
};
|
|
531
|
+
"enabled: OpenSource": {
|
|
532
|
+
type: "enabled: OpenSource";
|
|
533
|
+
params: unknown;
|
|
534
|
+
};
|
|
535
|
+
"enabled: DynamicViewWalkthrough": {
|
|
536
|
+
type: "enabled: DynamicViewWalkthrough";
|
|
537
|
+
params: unknown;
|
|
538
|
+
};
|
|
539
|
+
"enabled: Overlays": {
|
|
540
|
+
type: "enabled: Overlays";
|
|
541
|
+
params: unknown;
|
|
542
|
+
};
|
|
543
|
+
"not readonly": {
|
|
544
|
+
type: "not readonly";
|
|
545
|
+
params: unknown;
|
|
546
|
+
};
|
|
547
|
+
"is dynamic view": {
|
|
548
|
+
type: "is dynamic view";
|
|
549
|
+
params: unknown;
|
|
550
|
+
};
|
|
551
|
+
"is another view": {
|
|
552
|
+
type: "is another view";
|
|
553
|
+
params: unknown;
|
|
554
|
+
};
|
|
555
|
+
"click: node has modelFqn": {
|
|
556
|
+
type: "click: node has modelFqn";
|
|
557
|
+
params: unknown;
|
|
558
|
+
};
|
|
559
|
+
"click: selected node": {
|
|
560
|
+
type: "click: selected node";
|
|
561
|
+
params: unknown;
|
|
562
|
+
};
|
|
563
|
+
"click: same node": {
|
|
564
|
+
type: "click: same node";
|
|
565
|
+
params: unknown;
|
|
566
|
+
};
|
|
567
|
+
"click: focused node": {
|
|
568
|
+
type: "click: focused node";
|
|
569
|
+
params: unknown;
|
|
570
|
+
};
|
|
571
|
+
"click: node has connections": {
|
|
572
|
+
type: "click: node has connections";
|
|
573
|
+
params: unknown;
|
|
574
|
+
};
|
|
575
|
+
"click: selected edge": {
|
|
576
|
+
type: "click: selected edge";
|
|
577
|
+
params: unknown;
|
|
578
|
+
};
|
|
579
|
+
}>, never, EmittedEvents>;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { nonNullable } from '@likec4/core';
|
|
2
|
+
import { getViewportForBounds } from '@xyflow/react';
|
|
3
|
+
import { assertEvent } from 'xstate';
|
|
4
|
+
import { machine } from './machine.setup.js';
|
|
5
|
+
import { activeSequenceBounds, focusedBounds } from './utils.js';
|
|
6
|
+
import { MinZoom } from '../../base/const.js';
|
|
7
|
+
|
|
8
|
+
const setViewport = (params) => machine.createAction(({ context, event }) => {
|
|
9
|
+
let viewport, duration;
|
|
10
|
+
if (params) {
|
|
11
|
+
viewport = params.viewport;
|
|
12
|
+
duration = params.duration;
|
|
13
|
+
} else {
|
|
14
|
+
assertEvent(event, "xyflow.setViewport");
|
|
15
|
+
viewport = event.viewport;
|
|
16
|
+
duration = event.duration;
|
|
17
|
+
}
|
|
18
|
+
duration = duration ?? 400;
|
|
19
|
+
const { panZoom } = nonNullable(context.xystore).getState();
|
|
20
|
+
const animationProps = duration > 0 ? { duration, interpolate: "smooth" } : void 0;
|
|
21
|
+
panZoom?.setViewport(viewport, animationProps).catch((err) => {
|
|
22
|
+
console.error("Error during fitDiagram panZoom setViewport", { err });
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
const fitDiagram = (params) => machine.enqueueActions(({ context, event, enqueue }) => {
|
|
26
|
+
let bounds = context.view.bounds, duration;
|
|
27
|
+
if (params) {
|
|
28
|
+
bounds = params.bounds ?? context.view.bounds;
|
|
29
|
+
duration = params.duration;
|
|
30
|
+
} else if (event.type === "xyflow.fitDiagram") {
|
|
31
|
+
bounds = event.bounds ?? context.view.bounds;
|
|
32
|
+
duration = event.duration;
|
|
33
|
+
enqueue.assign({
|
|
34
|
+
viewportChangedManually: false
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
duration ??= 450;
|
|
38
|
+
const { width, height, panZoom, transform } = nonNullable(context.xystore).getState();
|
|
39
|
+
const maxZoom = Math.max(1, transform[2]);
|
|
40
|
+
const viewport = getViewportForBounds(
|
|
41
|
+
bounds,
|
|
42
|
+
width,
|
|
43
|
+
height,
|
|
44
|
+
MinZoom,
|
|
45
|
+
maxZoom,
|
|
46
|
+
context.fitViewPadding
|
|
47
|
+
);
|
|
48
|
+
viewport.x = Math.round(viewport.x);
|
|
49
|
+
viewport.y = Math.round(viewport.y);
|
|
50
|
+
panZoom?.setViewport(viewport, duration > 0 ? { duration, interpolate: "smooth" } : void 0).catch((err) => {
|
|
51
|
+
console.error("Error during fitDiagram panZoom setViewport", { err });
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
const fitFocusedBounds = () => machine.createAction(({ context }) => {
|
|
55
|
+
const isActiveSequenceWalkthrough = !!context.activeWalkthrough && context.dynamicViewVariant === "sequence";
|
|
56
|
+
const { bounds, duration = 450 } = isActiveSequenceWalkthrough ? activeSequenceBounds({ context }) : focusedBounds({ context });
|
|
57
|
+
const { width, height, panZoom, transform } = nonNullable(context.xystore).getState();
|
|
58
|
+
const maxZoom = Math.max(1, transform[2]);
|
|
59
|
+
const viewport = getViewportForBounds(
|
|
60
|
+
bounds,
|
|
61
|
+
width,
|
|
62
|
+
height,
|
|
63
|
+
MinZoom,
|
|
64
|
+
maxZoom,
|
|
65
|
+
context.fitViewPadding
|
|
66
|
+
);
|
|
67
|
+
viewport.x = Math.round(viewport.x);
|
|
68
|
+
viewport.y = Math.round(viewport.y);
|
|
69
|
+
panZoom?.setViewport(viewport, duration > 0 ? { duration, interpolate: "smooth" } : void 0);
|
|
70
|
+
});
|
|
71
|
+
const DEFAULT_DELAY = 30;
|
|
72
|
+
const raiseSetViewport = (params) => {
|
|
73
|
+
const { delay = DEFAULT_DELAY, ...rest } = params ?? {};
|
|
74
|
+
return machine.raise(
|
|
75
|
+
{
|
|
76
|
+
type: "xyflow.setViewport",
|
|
77
|
+
...rest
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "fitDiagram",
|
|
81
|
+
delay
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
const cancelFitDiagram = () => machine.cancel("fitDiagram");
|
|
86
|
+
const raiseFitDiagram = (params) => {
|
|
87
|
+
const { delay = DEFAULT_DELAY, ...rest } = params ?? {};
|
|
88
|
+
return machine.raise(
|
|
89
|
+
{
|
|
90
|
+
type: "xyflow.fitDiagram",
|
|
91
|
+
...rest
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: "fitDiagram",
|
|
95
|
+
delay
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
const assignViewportBefore = (viewport) => machine.assign(({ context }) => {
|
|
100
|
+
return {
|
|
101
|
+
// We can assign
|
|
102
|
+
viewportBefore: {
|
|
103
|
+
wasChangedManually: context.viewportChangedManually,
|
|
104
|
+
value: { ...context.viewport }
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
const returnViewportBefore = (params) => machine.enqueueActions(({ enqueue, context: { viewportBefore } }) => {
|
|
109
|
+
enqueue(cancelFitDiagram());
|
|
110
|
+
if (viewportBefore) {
|
|
111
|
+
enqueue.assign({
|
|
112
|
+
viewportChangedManually: viewportBefore.wasChangedManually,
|
|
113
|
+
viewportBefore: null
|
|
114
|
+
});
|
|
115
|
+
if (params && params.delay === 0) {
|
|
116
|
+
enqueue(setViewport({ viewport: viewportBefore.value, ...params }));
|
|
117
|
+
} else {
|
|
118
|
+
enqueue(raiseSetViewport({ viewport: viewportBefore.value, ...params }));
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
if (params && params.delay === 0) {
|
|
122
|
+
enqueue(fitDiagram({ ...params }));
|
|
123
|
+
} else {
|
|
124
|
+
enqueue(raiseFitDiagram({ ...params }));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
export { assignViewportBefore, cancelFitDiagram, fitDiagram, fitFocusedBounds, raiseFitDiagram, raiseSetViewport, returnViewportBefore, setViewport };
|