@likec4/diagram 1.44.0 → 1.46.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 +18847 -17876
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +15 -12
- package/dist/LikeC4Diagram.props.d.ts +13 -20
- package/dist/LikeC4ProjectsProvider.js +8 -4
- package/dist/LikeC4Styles.js +0 -3
- package/dist/LikeC4View.d.ts +3 -3
- package/dist/LikeC4View.js +8 -8
- package/dist/ReactLikeC4.d.ts +3 -6
- package/dist/StaticLikeC4Diagram.js +0 -2
- package/dist/base/Base.d.ts +1 -1
- package/dist/base/updateEdges.js +25 -15
- package/dist/base/updateNodes.d.ts +14 -0
- package/dist/base/updateNodes.js +51 -18
- package/dist/base-primitives/Markdown.d.ts +30 -4
- package/dist/base-primitives/Markdown.js +3 -2
- package/dist/base-primitives/NodeHandles.d.ts +2 -1
- package/dist/base-primitives/NodeHandles.js +22 -18
- 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 +6 -4
- package/dist/base-primitives/edge/EdgeLabel.d.ts +2 -2
- package/dist/base-primitives/edge/EdgeLabel.js +16 -16
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +5 -4
- package/dist/base-primitives/edge/EdgePath.js +27 -12
- package/dist/base-primitives/element/ElementActionButtons.d.ts +3 -2
- 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 +4 -1
- package/dist/base-primitives/element/ElementShape.js +5 -5
- package/dist/base-primitives/element/ElementTags.d.ts +6 -4
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +2 -2
- package/dist/context/DiagramEventHandlers.js +0 -1
- package/dist/context/DiagramFeatures.d.ts +2 -1
- package/dist/context/DiagramFeatures.js +1 -0
- package/dist/context/EnsureMantine.js +2 -1
- package/dist/context/IconRenderer.js +6 -6
- package/dist/context/TagStylesContext.js +1 -1
- package/dist/custom/hooks.d.ts +2 -2
- package/dist/custom/index.js +1 -1
- package/dist/editor/LikeC4EditorProvider.d.ts +22 -0
- package/dist/editor/LikeC4EditorProvider.js +12 -0
- package/dist/editor/__tests__/fixture.d.ts +205 -0
- package/dist/editor/applyChangesToManualLayout.d.ts +8 -0
- package/dist/editor/applyChangesToManualLayout.js +182 -0
- package/dist/editor/editorActor.actions.d.ts +201 -0
- package/dist/editor/editorActor.actions.js +149 -0
- package/dist/editor/editorActor.d.ts +653 -0
- package/dist/editor/editorActor.js +324 -0
- package/dist/editor/hotkeyActor.d.ts +7 -0
- package/dist/editor/hotkeyActor.js +19 -0
- package/dist/editor/index.d.ts +3 -2
- package/dist/editor/useEditorActorLogic.d.ts +565 -0
- package/dist/editor/useEditorActorLogic.js +54 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/safeContext.d.ts +3 -2
- package/dist/hooks/safeContext.js +7 -4
- package/dist/hooks/useDiagram.d.ts +4 -2
- package/dist/hooks/useDiagram.js +19 -8
- package/dist/hooks/useDiagramCompareLayout.d.ts +8 -0
- package/dist/hooks/useDiagramCompareLayout.js +29 -4
- 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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/likec4diagram/DiagramXYFlow.js +11 -7
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/edges/EdgeDrifts.js +34 -0
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +90 -54
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +3 -1
- package/dist/likec4diagram/custom/edges/edges.css.d.ts +0 -1
- package/dist/likec4diagram/custom/edges/edges.css.js +30 -24
- package/dist/likec4diagram/custom/edges/useControlPoints.js +5 -5
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +5 -5
- package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/{ElementNodeDrifts.js → NodeDrifts.js} +12 -13
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +4 -2
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.js +61 -23
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +128 -15
- package/dist/likec4diagram/relationship-popover/actor.d.ts +1 -1
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +2 -2
- package/dist/likec4diagram/state/DiagramActorProvider.js +63 -72
- package/dist/likec4diagram/state/assign.d.ts +14 -7
- package/dist/likec4diagram/state/assign.js +28 -200
- package/dist/likec4diagram/state/createViewChange.js +23 -30
- package/dist/likec4diagram/state/diagram-api.d.ts +20 -6
- package/dist/likec4diagram/state/diagram-api.js +58 -52
- package/dist/likec4diagram/state/hotkeyActor.d.ts +1 -8
- package/dist/likec4diagram/state/hotkeyActor.js +13 -17
- package/dist/likec4diagram/state/machine.actions.d.ts +1127 -864
- package/dist/likec4diagram/state/machine.actions.js +316 -296
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +641 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +141 -0
- package/dist/likec4diagram/state/machine.d.ts +18 -3712
- package/dist/likec4diagram/state/machine.js +64 -73
- package/dist/likec4diagram/state/machine.setup.d.ts +80 -26
- package/dist/likec4diagram/state/machine.setup.js +44 -7
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +58 -17
- package/dist/likec4diagram/state/machine.state.initializing.js +14 -14
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +5 -108
- package/dist/likec4diagram/state/machine.state.navigating.js +187 -35
- package/dist/likec4diagram/state/machine.state.ready.d.ts +2997 -2598
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +710 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.js +98 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +540 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.js +105 -0
- package/dist/likec4diagram/state/machine.state.ready.js +95 -347
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +140 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +40 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +684 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +190 -0
- package/dist/likec4diagram/state/mediaPrintActor.d.ts +12 -0
- package/dist/likec4diagram/state/mediaPrintActor.js +18 -0
- package/dist/likec4diagram/state/types.d.ts +11 -9
- package/dist/likec4diagram/state/utils.d.ts +44 -5
- package/dist/likec4diagram/state/utils.js +62 -6
- package/dist/likec4diagram/types.d.ts +8 -13
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/useLayoutConstraints.js +104 -103
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +12 -15
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +11 -8
- package/dist/navigationpanel/NavigationPanel.js +11 -10
- package/dist/navigationpanel/NavigationPanelDropdown.js +7 -7
- package/dist/navigationpanel/_common.js +1 -1
- package/dist/navigationpanel/actor.d.ts +4 -204
- package/dist/navigationpanel/actor.js +1 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +3 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +40 -14
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +6 -4
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +2 -2
- package/dist/navigationpanel/controls/DetailsControls.js +2 -2
- package/dist/navigationpanel/controls/LayoutWarning.js +2 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/SearchControl.js +2 -2
- package/dist/navigationpanel/controls/ToggleReadonly.js +32 -19
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -3
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +9 -9
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +4 -3
- package/dist/overlays/Overlays.js +24 -12
- package/dist/overlays/element-details/ElementDetailsCard.css.js +3 -3
- package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -1
- package/dist/overlays/element-details/MetadataValue.js +4 -6
- package/dist/overlays/element-details/TabPanelDeployments.js +3 -3
- package/dist/overlays/element-details/TabPanelRelationships.js +12 -7
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actor.d.ts +8 -83
- package/dist/overlays/element-details/actor.js +0 -8
- package/dist/overlays/overlay/Overlay.js +10 -10
- package/dist/overlays/overlaysActor.d.ts +7 -392
- package/dist/overlays/overlaysActor.js +73 -49
- package/dist/overlays/relationship-details/RelationshipDetails.js +3 -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 -562
- package/dist/overlays/relationship-details/actor.js +1 -0
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- 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 +3 -3
- 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 -739
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- 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/components/ElementsColumn.js +7 -3
- package/dist/search/components/PickView.js +3 -1
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +1 -1
- package/dist/search/components/ViewsColum.d.ts +3 -1
- package/dist/search/components/ViewsColum.js +13 -7
- 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 +7 -5
- package/dist/shadowroot/styles.css.js +6 -1
- package/dist/styles.css2.js +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/view-bounds.js +7 -6
- package/dist/utils/xyflow.d.ts +6 -5
- package/dist/utils/xyflow.js +26 -57
- package/package.json +24 -23
- package/panda.buildinfo.json +65 -71
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/base-primitives/edge/edge.css.d.ts +0 -4
- package/dist/base-primitives/edge/edge.css.js +0 -71
- package/dist/editor/LikeC4EditorContext.d.ts +0 -21
- package/dist/likec4diagram/custom/nodes/ElementNodeDrifts.d.ts +0 -4
- package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +0 -280
- package/dist/likec4diagram/state/syncManualLayoutActor.js +0 -248
- package/dist/utils/vector.d.ts +0 -81
- package/dist/utils/vector.js +0 -120
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/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.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { emitInitialized, assignXYDataFromView } from './machine.actions.js';
|
|
2
|
+
import { fitDiagram } from './machine.actions.layout.js';
|
|
2
3
|
import { machine } from './machine.setup.js';
|
|
3
4
|
import { x as xstateActions_cjsExports } from '../../_virtual/xstate-actions.cjs.js';
|
|
4
5
|
|
|
@@ -15,15 +16,15 @@ const initializing = machine.createStateConfig({
|
|
|
15
16
|
target: "isReady"
|
|
16
17
|
},
|
|
17
18
|
"update.view": {
|
|
18
|
-
actions:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
actions: [
|
|
20
|
+
assignXYDataFromView(),
|
|
21
|
+
xstateActions_cjsExports.assign(({ context }) => ({
|
|
22
|
+
initialized: {
|
|
23
|
+
...context.initialized,
|
|
24
|
+
xydata: true
|
|
25
|
+
}
|
|
26
|
+
}))
|
|
27
|
+
],
|
|
27
28
|
target: "isReady"
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -32,18 +33,17 @@ const isReady = machine.createStateConfig({
|
|
|
32
33
|
always: [{
|
|
33
34
|
guard: "isReady",
|
|
34
35
|
actions: [
|
|
35
|
-
|
|
36
|
+
fitDiagram({ duration: 0 }),
|
|
36
37
|
xstateActions_cjsExports.assign(({ context }) => ({
|
|
37
38
|
navigationHistory: {
|
|
38
39
|
currentIndex: 0,
|
|
39
40
|
history: [{
|
|
40
41
|
viewId: context.view.id,
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
viewport: { ...context.xyflow.getViewport() },
|
|
43
|
+
viewportChangedManually: false
|
|
43
44
|
}]
|
|
44
45
|
}
|
|
45
46
|
})),
|
|
46
|
-
ensureSyncLayout(),
|
|
47
47
|
emitInitialized()
|
|
48
48
|
],
|
|
49
49
|
target: "ready"
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { CancelAction
|
|
2
|
-
import { Context, Events
|
|
3
|
-
import { DiagramView } from '@likec4/core';
|
|
4
|
-
import { SyncLayoutActorLogic } from './syncManualLayoutActor';
|
|
5
|
-
import { HotkeyActorLogic } from './hotkeyActor';
|
|
6
|
-
import { OverlaysActorLogic } from '../../overlays/overlaysActor';
|
|
7
|
-
import { SearchActorLogic } from '../../search/searchActor';
|
|
1
|
+
import { CancelAction } from 'xstate';
|
|
2
|
+
import { Context, Events } from './machine.setup';
|
|
8
3
|
/**
|
|
9
4
|
* State for handling navigation to a different view.
|
|
10
5
|
* Closes overlays and search, stops sync layout and fit diagram actions,
|
|
@@ -12,106 +7,8 @@ import { SearchActorLogic } from '../../search/searchActor';
|
|
|
12
7
|
*/
|
|
13
8
|
export declare const navigating: {
|
|
14
9
|
id: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
actions: ActionFunction<Context, {
|
|
19
|
-
type: "update.view";
|
|
20
|
-
view: DiagramView;
|
|
21
|
-
xynodes: import("../types").Types.Node[];
|
|
22
|
-
xyedges: import("../types").Types.Edge[];
|
|
23
|
-
}, Events, undefined, Values<{
|
|
24
|
-
syncManualLayoutActorLogic: {
|
|
25
|
-
src: "syncManualLayoutActorLogic";
|
|
26
|
-
logic: SyncLayoutActorLogic;
|
|
27
|
-
id: "syncLayout";
|
|
28
|
-
};
|
|
29
|
-
hotkeyActorLogic: {
|
|
30
|
-
src: "hotkeyActorLogic";
|
|
31
|
-
logic: HotkeyActorLogic;
|
|
32
|
-
id: "hotkey";
|
|
33
|
-
};
|
|
34
|
-
overlaysActorLogic: {
|
|
35
|
-
src: "overlaysActorLogic";
|
|
36
|
-
logic: OverlaysActorLogic;
|
|
37
|
-
id: "overlays";
|
|
38
|
-
};
|
|
39
|
-
searchActorLogic: {
|
|
40
|
-
src: "searchActorLogic";
|
|
41
|
-
logic: SearchActorLogic;
|
|
42
|
-
id: "search";
|
|
43
|
-
};
|
|
44
|
-
}>, never, Values<{
|
|
45
|
-
isReady: {
|
|
46
|
-
type: "isReady";
|
|
47
|
-
params: unknown;
|
|
48
|
-
};
|
|
49
|
-
"enabled: FitView": {
|
|
50
|
-
type: "enabled: FitView";
|
|
51
|
-
params: unknown;
|
|
52
|
-
};
|
|
53
|
-
"enabled: FocusMode": {
|
|
54
|
-
type: "enabled: FocusMode";
|
|
55
|
-
params: unknown;
|
|
56
|
-
};
|
|
57
|
-
"enabled: Readonly": {
|
|
58
|
-
type: "enabled: Readonly";
|
|
59
|
-
params: unknown;
|
|
60
|
-
};
|
|
61
|
-
"enabled: RelationshipDetails": {
|
|
62
|
-
type: "enabled: RelationshipDetails";
|
|
63
|
-
params: unknown;
|
|
64
|
-
};
|
|
65
|
-
"enabled: Search": {
|
|
66
|
-
type: "enabled: Search";
|
|
67
|
-
params: unknown;
|
|
68
|
-
};
|
|
69
|
-
"enabled: ElementDetails": {
|
|
70
|
-
type: "enabled: ElementDetails";
|
|
71
|
-
params: unknown;
|
|
72
|
-
};
|
|
73
|
-
"enabled: DynamicViewWalkthrough": {
|
|
74
|
-
type: "enabled: DynamicViewWalkthrough";
|
|
75
|
-
params: unknown;
|
|
76
|
-
};
|
|
77
|
-
"not readonly": {
|
|
78
|
-
type: "not readonly";
|
|
79
|
-
params: unknown;
|
|
80
|
-
};
|
|
81
|
-
"is dynamic view": {
|
|
82
|
-
type: "is dynamic view";
|
|
83
|
-
params: unknown;
|
|
84
|
-
};
|
|
85
|
-
"is another view": {
|
|
86
|
-
type: "is another view";
|
|
87
|
-
params: unknown;
|
|
88
|
-
};
|
|
89
|
-
"click: node has modelFqn": {
|
|
90
|
-
type: "click: node has modelFqn";
|
|
91
|
-
params: unknown;
|
|
92
|
-
};
|
|
93
|
-
"click: selected node": {
|
|
94
|
-
type: "click: selected node";
|
|
95
|
-
params: unknown;
|
|
96
|
-
};
|
|
97
|
-
"click: same node": {
|
|
98
|
-
type: "click: same node";
|
|
99
|
-
params: unknown;
|
|
100
|
-
};
|
|
101
|
-
"click: focused node": {
|
|
102
|
-
type: "click: focused node";
|
|
103
|
-
params: unknown;
|
|
104
|
-
};
|
|
105
|
-
"click: node has connections": {
|
|
106
|
-
type: "click: node has connections";
|
|
107
|
-
params: unknown;
|
|
108
|
-
};
|
|
109
|
-
"click: selected edge": {
|
|
110
|
-
type: "click: selected edge";
|
|
111
|
-
params: unknown;
|
|
112
|
-
};
|
|
113
|
-
}>, never, EmittedEvents>;
|
|
114
|
-
target: string;
|
|
115
|
-
};
|
|
10
|
+
always: {
|
|
11
|
+
target: string;
|
|
12
|
+
actions: CancelAction<Context, Events, undefined, Events>[];
|
|
116
13
|
};
|
|
117
14
|
};
|
|
@@ -1,44 +1,196 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { BBox } from '@likec4/core/types';
|
|
2
|
+
import { invariant, nonNullable } from '@likec4/core/utils';
|
|
3
|
+
import { isTruthy } from 'remeda';
|
|
4
|
+
import { enqueueActions, assertEvent } from 'xstate';
|
|
5
|
+
import { convertToXYFlow } from '../convert-to-xyflow.js';
|
|
6
|
+
import { mergeXYNodesEdges } from './assign.js';
|
|
7
|
+
import { disableCompareWithLatest } from './machine.actions.js';
|
|
8
|
+
import { machine, targetState } from './machine.setup.js';
|
|
9
|
+
import { calcViewportForBounds, findCorrespondingNode, findNodeByModelFqn, nodeRef } from './utils.js';
|
|
10
|
+
import { cancelFitDiagram, raiseSetViewport, raiseFitDiagram } from './machine.actions.layout.js';
|
|
5
11
|
|
|
12
|
+
const handleBrowserForwardBackward = () => machine.assign(({ context, event }) => {
|
|
13
|
+
assertEvent(event, "update.view");
|
|
14
|
+
let {
|
|
15
|
+
lastOnNavigate,
|
|
16
|
+
navigationHistory: {
|
|
17
|
+
currentIndex,
|
|
18
|
+
history
|
|
19
|
+
}
|
|
20
|
+
} = context;
|
|
21
|
+
const stepCurrent = history[currentIndex];
|
|
22
|
+
if (!stepCurrent || stepCurrent.viewId === event.view.id || !!lastOnNavigate) {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
const stepBack = currentIndex > 0 ? nonNullable(history[currentIndex - 1]) : null;
|
|
26
|
+
if (stepBack && stepBack.viewId === event.view.id) {
|
|
27
|
+
return {
|
|
28
|
+
navigationHistory: {
|
|
29
|
+
currentIndex: currentIndex - 1,
|
|
30
|
+
history
|
|
31
|
+
},
|
|
32
|
+
lastOnNavigate: null
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const stepForward = currentIndex < history.length - 1 ? nonNullable(history[currentIndex + 1]) : null;
|
|
36
|
+
if (stepForward && stepForward.viewId === event.view.id) {
|
|
37
|
+
return {
|
|
38
|
+
navigationHistory: {
|
|
39
|
+
currentIndex: currentIndex + 1,
|
|
40
|
+
history
|
|
41
|
+
},
|
|
42
|
+
lastOnNavigate: null
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
if (event.view._type === "element" && event.view.viewOf) {
|
|
46
|
+
const toRef = event.view.viewOf;
|
|
47
|
+
const existingNode = context.xynodes.find((n) => nodeRef(n) === toRef);
|
|
48
|
+
if (existingNode) {
|
|
49
|
+
return {
|
|
50
|
+
lastOnNavigate: {
|
|
51
|
+
fromView: context.view.id,
|
|
52
|
+
toView: event.view.id,
|
|
53
|
+
fromNode: existingNode.id
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return {};
|
|
59
|
+
});
|
|
6
60
|
const navigating = machine.createStateConfig({
|
|
7
|
-
id:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
61
|
+
id: targetState.navigating.slice(1),
|
|
62
|
+
always: {
|
|
63
|
+
target: targetState.idle,
|
|
64
|
+
actions: [
|
|
65
|
+
cancelFitDiagram(),
|
|
66
|
+
handleBrowserForwardBackward(),
|
|
67
|
+
disableCompareWithLatest(),
|
|
68
|
+
enqueueActions(({ enqueue, context, event }) => {
|
|
69
|
+
assertEvent(event, "update.view");
|
|
70
|
+
const {
|
|
71
|
+
xyflow,
|
|
72
|
+
xystore,
|
|
73
|
+
navigationHistory: {
|
|
74
|
+
currentIndex,
|
|
75
|
+
history
|
|
76
|
+
}
|
|
77
|
+
} = context;
|
|
78
|
+
const eventWithXYData = "xynodes" in event ? event : {
|
|
79
|
+
...event,
|
|
80
|
+
...convertToXYFlow({
|
|
81
|
+
dynamicViewVariant: context.dynamicViewVariant,
|
|
82
|
+
view: event.view,
|
|
83
|
+
where: context.where
|
|
84
|
+
})
|
|
85
|
+
};
|
|
86
|
+
invariant(xyflow, "xyflow is not initialized");
|
|
87
|
+
const calcZoomTowardsNextViewport = (nextViewport2) => {
|
|
88
|
+
const zoom = xyflow.getZoom();
|
|
89
|
+
const coef = nextViewport2.zoom < zoom ? 0.8 : 0.4;
|
|
90
|
+
return zoom + (nextViewport2.zoom - zoom) * coef;
|
|
91
|
+
};
|
|
92
|
+
const fromHistory = history[currentIndex];
|
|
93
|
+
if (fromHistory && fromHistory.viewId === event.view.id) {
|
|
94
|
+
enqueue.assign({
|
|
95
|
+
...mergeXYNodesEdges(context, eventWithXYData),
|
|
96
|
+
dynamicViewVariant: fromHistory.dynamicViewVariant ?? context.dynamicViewVariant,
|
|
97
|
+
viewportChangedManually: fromHistory.viewportChangedManually
|
|
98
|
+
});
|
|
99
|
+
const wasFocused = fromHistory.focusedNode;
|
|
100
|
+
const wasActiveWalkthrough = fromHistory.activeWalkthrough;
|
|
101
|
+
const viewportBefore = fromHistory.viewportBefore;
|
|
102
|
+
if (viewportBefore && (wasFocused || wasActiveWalkthrough)) {
|
|
103
|
+
enqueue.assign({
|
|
104
|
+
viewport: viewportBefore.value,
|
|
105
|
+
viewportChangedManually: viewportBefore.wasChangedManually,
|
|
106
|
+
viewportBefore: null
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
const center = BBox.center(event.view.bounds);
|
|
110
|
+
const zoom = calcZoomTowardsNextViewport(fromHistory.viewport);
|
|
111
|
+
xyflow.setCenter(
|
|
112
|
+
center.x,
|
|
113
|
+
center.y,
|
|
114
|
+
{ zoom, duration: 0 }
|
|
29
115
|
);
|
|
116
|
+
if (wasFocused) {
|
|
117
|
+
enqueue.raise({
|
|
118
|
+
type: "focus.node",
|
|
119
|
+
nodeId: wasFocused
|
|
120
|
+
}, { delay: 50 });
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (wasActiveWalkthrough) {
|
|
124
|
+
enqueue.raise({
|
|
125
|
+
type: "walkthrough.start",
|
|
126
|
+
stepId: wasActiveWalkthrough
|
|
127
|
+
}, { delay: 50 });
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
enqueue(raiseSetViewport({
|
|
131
|
+
delay: 80,
|
|
132
|
+
viewport: fromHistory.viewport
|
|
133
|
+
}));
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const nextViewport = calcViewportForBounds(
|
|
137
|
+
context,
|
|
138
|
+
event.view.bounds
|
|
139
|
+
);
|
|
140
|
+
const { fromNode, toNode } = findCorrespondingNode(context, eventWithXYData);
|
|
141
|
+
if (fromNode && toNode) {
|
|
142
|
+
const elFrom = xyflow.getInternalNode(fromNode.id);
|
|
143
|
+
const fromPoint = xyflow.flowToScreenPosition({
|
|
144
|
+
x: elFrom.internals.positionAbsolute.x,
|
|
145
|
+
y: elFrom.internals.positionAbsolute.y
|
|
146
|
+
});
|
|
147
|
+
const toPoint = xyflow.flowToScreenPosition({
|
|
148
|
+
x: toNode.data.x,
|
|
149
|
+
y: toNode.data.y
|
|
150
|
+
});
|
|
151
|
+
xystore.getState().panBy({
|
|
152
|
+
x: Math.round(fromPoint.x - toPoint.x),
|
|
153
|
+
y: Math.round(fromPoint.y - toPoint.y)
|
|
154
|
+
});
|
|
30
155
|
} else {
|
|
31
|
-
|
|
32
|
-
|
|
156
|
+
const zoom = calcZoomTowardsNextViewport(nextViewport);
|
|
157
|
+
const center = BBox.center(event.view.bounds);
|
|
158
|
+
xyflow.setCenter(
|
|
159
|
+
center.x,
|
|
160
|
+
center.y,
|
|
161
|
+
{ zoom, duration: 0 }
|
|
33
162
|
);
|
|
34
163
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
164
|
+
const updatedHistory = currentIndex < history.length - 1 ? history.slice(0, currentIndex + 1) : [...history];
|
|
165
|
+
updatedHistory.push({
|
|
166
|
+
viewId: event.view.id,
|
|
167
|
+
viewport: { ...nextViewport },
|
|
168
|
+
viewportChangedManually: false
|
|
169
|
+
});
|
|
170
|
+
const focusOnElement = context.lastOnNavigate?.focusOnElement;
|
|
171
|
+
const nodeToFocus = isTruthy(focusOnElement) ? findNodeByModelFqn(eventWithXYData.xynodes, focusOnElement) : null;
|
|
172
|
+
enqueue.assign({
|
|
173
|
+
...mergeXYNodesEdges(context, eventWithXYData),
|
|
174
|
+
viewportChangedManually: false,
|
|
175
|
+
lastOnNavigate: null,
|
|
176
|
+
navigationHistory: {
|
|
177
|
+
currentIndex: updatedHistory.length - 1,
|
|
178
|
+
history: updatedHistory
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
if (nodeToFocus) {
|
|
182
|
+
enqueue.raise({
|
|
183
|
+
type: "focus.node",
|
|
184
|
+
nodeId: nodeToFocus.id,
|
|
185
|
+
autoUnfocus: true
|
|
186
|
+
}, { delay: 150 });
|
|
187
|
+
} else {
|
|
188
|
+
enqueue(raiseFitDiagram({
|
|
189
|
+
delay: 100
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
]
|
|
42
194
|
}
|
|
43
195
|
});
|
|
44
196
|
|