@likec4/diagram 1.47.0 → 1.49.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/LICENSE +1 -1
- package/README.md +8 -10
- package/adhoc-editor/package.json +4 -0
- package/dist/LikeC4Diagram.d.ts +2 -1
- package/dist/LikeC4Diagram.js +85 -81
- package/dist/LikeC4Diagram.props.d.ts +10 -6
- package/dist/LikeC4ModelProvider.d.ts +4 -4
- package/dist/LikeC4ModelProvider.js +2 -2
- package/dist/LikeC4ProjectsOverview.d.ts +3 -2
- package/dist/LikeC4ProjectsProvider.d.ts +2 -1
- package/dist/LikeC4ProjectsProvider.js +10 -8
- package/dist/LikeC4Styles.d.ts +3 -6
- package/dist/LikeC4Styles.js +44 -43
- package/dist/LikeC4View.d.ts +22 -1
- package/dist/LikeC4View.js +40 -25
- package/dist/ReactLikeC4.d.ts +13 -2
- package/dist/ReactLikeC4.js +8 -4
- package/dist/StaticLikeC4Diagram.d.ts +2 -1
- package/dist/StaticLikeC4Diagram.js +1 -0
- package/dist/_virtual/store-1b2fbb72.cjs.js +3 -0
- package/dist/_virtual/xstate-store-react.cjs.js +5 -0
- package/dist/_virtual/xstate-store-react.cjs2.js +3 -0
- package/dist/adhoc-editor/EditorPanel.d.ts +1 -0
- package/dist/adhoc-editor/EditorPanel.js +105 -0
- package/dist/adhoc-editor/ElementsTree.d.ts +2 -0
- package/dist/adhoc-editor/ElementsTree.js +142 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +4 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +74 -0
- package/dist/adhoc-editor/components/Tree.d.ts +48 -0
- package/dist/adhoc-editor/components/Tree.js +296 -0
- package/dist/adhoc-editor/hooks.d.ts +14 -0
- package/dist/adhoc-editor/hooks.js +29 -0
- package/dist/adhoc-editor/index.d.ts +2 -0
- package/dist/adhoc-editor/index.js +1 -0
- package/dist/adhoc-editor/state/ActorProvider.d.ts +5 -0
- package/dist/adhoc-editor/state/ActorProvider.js +40 -0
- package/dist/adhoc-editor/state/actor.d.ts +13 -0
- package/dist/adhoc-editor/state/actor.editor.d.ts +56 -0
- package/dist/adhoc-editor/state/actor.editor.js +205 -0
- package/dist/adhoc-editor/state/actor.js +16 -0
- package/dist/adhoc-editor/state/actor.layouter.d.ts +51 -0
- package/dist/adhoc-editor/state/actor.layouter.js +70 -0
- package/dist/adhoc-editor/state/actor.types.d.ts +63 -0
- package/dist/adhoc-editor/state/actor.types.js +29 -0
- package/dist/adhoc-editor/state/panel.d.ts +95 -0
- package/dist/adhoc-editor/state/panel.js +139 -0
- package/dist/adhoc-editor/state/utils.d.ts +17 -0
- package/dist/adhoc-editor/state/utils.js +32 -0
- package/dist/adhoc-editor/useElementsTree.d.ts +18 -0
- package/dist/adhoc-editor/useElementsTree.js +130 -0
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +6 -0
- package/dist/base/const.d.ts +2 -0
- package/dist/base/const.js +2 -1
- package/dist/base/updateEdges.js +26 -3
- package/dist/base/updateNodes.js +8 -5
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/Markdown.js +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +4 -2
- package/dist/base-primitives/NodeHandles.js +46 -19
- package/dist/base-primitives/compound/CompoundActionButton.js +28 -12
- package/dist/base-primitives/compound/CompoundDetailsButton.js +24 -9
- package/dist/base-primitives/compound/CompoundNodeContainer.js +11 -8
- package/dist/base-primitives/compound/CompoundTitle.js +1 -2
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +5 -2
- package/dist/base-primitives/edge/EdgeLabel.js +3 -4
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +2 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +17 -20
- package/dist/base-primitives/element/ElementActionButtons.js +57 -59
- package/dist/base-primitives/element/ElementData.d.ts +7 -7
- package/dist/base-primitives/element/ElementData.js +61 -48
- package/dist/base-primitives/element/ElementDetailsButton.js +48 -18
- package/dist/base-primitives/element/ElementNodeContainer.d.ts +5 -5
- package/dist/base-primitives/element/ElementNodeContainer.js +24 -10
- package/dist/base-primitives/element/ElementShape.d.ts +2 -2
- package/dist/base-primitives/element/ElementShape.js +70 -7
- package/dist/base-primitives/element/ElementTags.d.ts +6 -2
- package/dist/base-primitives/element/ElementTags.js +55 -32
- package/dist/base-primitives/index.d.ts +1 -1
- package/dist/base-primitives/memoEdge.js +1 -1
- package/dist/base-primitives/memoNode.js +1 -1
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +3 -3
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +5 -26
- package/dist/components/PortalToContainer.js +3 -4
- package/dist/components/RootContainer.js +9 -19
- package/dist/components/ViewNotFound.d.ts +3 -3
- package/dist/components/ViewNotFound.js +30 -26
- package/dist/context/CurrentViewModelProvider.d.ts +2 -0
- package/dist/context/CurrentViewModelProvider.js +12 -0
- package/dist/context/DefaultMantineProvider.d.ts +2 -0
- package/dist/context/DefaultMantineProvider.js +75 -0
- package/dist/context/DiagramEventHandlers.d.ts +5 -5
- package/dist/context/DiagramEventHandlers.js +10 -4
- package/dist/context/DiagramFeatures.d.ts +8 -7
- package/dist/context/DiagramFeatures.js +16 -13
- package/dist/context/EnsureMantine.d.ts +0 -3
- package/dist/context/EnsureMantine.js +3 -4
- package/dist/context/FramerMotionConfig.d.ts +1 -3
- package/dist/context/IconRenderer.d.ts +19 -4
- package/dist/context/IconRenderer.js +52 -25
- package/dist/context/LikeC4ModelContext.d.ts +10 -5
- package/dist/context/LikeC4ModelContext.js +11 -3
- package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
- package/dist/context/LikeC4ProjectsContext.js +6 -2
- package/dist/context/RootContainerContext.d.ts +10 -3
- package/dist/context/RootContainerContext.js +8 -3
- package/dist/context/TagStylesContext.js +13 -5
- package/dist/custom/hooks.d.ts +2 -2
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +16 -15
- package/dist/editor/LikeC4EditorCallbacks.d.ts +18 -0
- package/dist/editor/LikeC4EditorCallbacks.js +5 -0
- package/dist/editor/LikeC4EditorProvider.d.ts +30 -18
- package/dist/editor/LikeC4EditorProvider.js +3 -3
- package/dist/editor/applyChangesToManualLayout.js +7 -6
- package/dist/editor/editorActor.actions.d.ts +25 -25
- package/dist/editor/editorActor.actions.js +22 -22
- package/dist/editor/editorActor.setup.d.ts +84 -0
- package/dist/editor/editorActor.setup.js +38 -0
- package/dist/editor/editorActor.states.d.ts +9 -0
- package/dist/editor/{editorActor.js → editorActor.states.js} +21 -72
- package/dist/editor/index.d.ts +4 -3
- package/dist/editor/useEditorActorLogic.d.ts +2 -565
- package/dist/editor/useEditorActorLogic.js +14 -21
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/safeContext.d.ts +4 -5
- package/dist/hooks/useCallbackRef.d.ts +6 -0
- package/dist/hooks/useCallbackRef.js +7 -6
- package/dist/hooks/useCurrentView.js +5 -10
- package/dist/hooks/useCurrentViewModel.d.ts +8 -2
- package/dist/hooks/useCurrentViewModel.js +3 -7
- package/dist/hooks/useDiagram.d.ts +9 -1
- package/dist/hooks/useDiagram.js +10 -4
- package/dist/hooks/useDiagramCompareLayout.d.ts +6 -6
- package/dist/hooks/useDiagramCompareLayout.js +1 -1
- package/dist/hooks/useLikeC4ElementsTree.d.ts +1 -1
- package/dist/hooks/useLikeC4ElementsTree.js +2 -2
- package/dist/hooks/useLikeC4Model.d.ts +6 -2
- package/dist/hooks/useLikeC4Model.js +7 -9
- package/dist/hooks/useLikeC4Project.d.ts +4 -6
- package/dist/hooks/useLikeC4Project.js +19 -31
- package/dist/hooks/useLikeC4Styles.js +3 -9
- package/dist/hooks/useMantinePortalProps.d.ts +1 -1
- package/dist/hooks/useMediaPrint.d.ts +0 -2
- package/dist/hooks/useOverlaysActor.js +4 -4
- package/dist/hooks/useSearchActor.js +4 -4
- package/dist/hooks/useSetState.d.ts +6 -1
- package/dist/hooks/useSetState.js +7 -4
- package/dist/hooks/useXYFlow.d.ts +7 -1
- package/dist/hooks/useXYFlow.js +4 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -1
- package/dist/likec4diagram/DiagramUI.js +1 -3
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -1
- package/dist/likec4diagram/DiagramXYFlow.js +29 -18
- package/dist/likec4diagram/convert-to-xyflow.d.ts +2 -1
- package/dist/likec4diagram/convert-to-xyflow.js +2 -6
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +34 -37
- package/dist/likec4diagram/custom/edges/edges.css.js +2 -1
- package/dist/likec4diagram/custom/edges/useControlPoints.js +3 -3
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +3 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +52 -34
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/ElementActions.js +7 -10
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +3 -20
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +286 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +10 -6
- package/dist/likec4diagram/custom/nodes/nodes.js +30 -8
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +5 -4
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +6 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +14 -9
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +4 -4
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +3 -3
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +16 -36
- package/dist/likec4diagram/relationship-popover/components.d.ts +7 -0
- package/dist/likec4diagram/relationship-popover/components.js +39 -0
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
- package/dist/likec4diagram/state/DiagramActorProvider.js +39 -66
- package/dist/likec4diagram/state/assign.d.ts +1 -1
- package/dist/likec4diagram/state/createViewChange.js +16 -4
- package/dist/likec4diagram/state/diagram-api.d.ts +11 -0
- package/dist/likec4diagram/state/diagram-api.js +15 -0
- package/dist/likec4diagram/state/machine.actions.d.ts +92 -0
- package/dist/likec4diagram/state/machine.actions.js +127 -58
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +23 -2
- package/dist/likec4diagram/state/machine.actions.layout.js +68 -15
- package/dist/likec4diagram/state/machine.d.ts +1 -1
- package/dist/likec4diagram/state/machine.js +35 -31
- package/dist/likec4diagram/state/machine.setup.d.ts +40 -7
- package/dist/likec4diagram/state/machine.setup.js +13 -4
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +32 -2
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +1 -1
- package/dist/likec4diagram/state/machine.state.navigating.js +82 -50
- package/dist/likec4diagram/state/machine.state.ready.d.ts +565 -579
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +17 -148
- package/dist/likec4diagram/state/machine.state.ready.focused.js +6 -14
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +11 -96
- package/dist/likec4diagram/state/machine.state.ready.idle.js +7 -12
- package/dist/likec4diagram/state/machine.state.ready.js +89 -70
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +4 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +4 -3
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +145 -2
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +29 -21
- package/dist/likec4diagram/state/types.d.ts +1 -1
- package/dist/likec4diagram/state/utils.d.ts +14 -14
- package/dist/likec4diagram/state/utils.js +12 -4
- package/dist/likec4diagram/types.d.ts +11 -3
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +2 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/useLayoutConstraints.d.ts +12 -12
- package/dist/likec4diagram/useLayoutConstraints.js +126 -84
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +11 -3
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.d.ts +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +15 -8
- package/dist/navigationpanel/NavigationPanel.js +4 -3
- package/dist/navigationpanel/NavigationPanelControls.js +4 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +13 -13
- package/dist/navigationpanel/_common.d.ts +1 -1
- package/dist/navigationpanel/_common.js +2 -3
- package/dist/navigationpanel/actor.js +1 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.js +155 -29
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -0
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +264 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +4 -5
- package/dist/navigationpanel/controls/DetailsControls.js +7 -7
- package/dist/navigationpanel/controls/LayoutWarning.js +2 -2
- package/dist/navigationpanel/controls/LogoButton.js +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -2
- package/dist/navigationpanel/controls/SearchControl.js +8 -12
- package/dist/navigationpanel/controls/ToggleReadonly.js +5 -6
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +12 -6
- 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/editorpanel/styles.js +4 -4
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/styles.css.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +6 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +77 -77
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +1 -1
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/dist/store-1b2fbb72.cjs.js +742 -0
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/react/dist/xstate-store-react.cjs.js +175 -0
- package/dist/overlays/element-details/ElementDetailsCard.css.js +15 -15
- package/dist/overlays/element-details/ElementDetailsCard.js +39 -40
- package/dist/overlays/element-details/MetadataValue.js +11 -12
- package/dist/overlays/element-details/TabPanelDeployments.js +8 -6
- package/dist/overlays/element-details/TabPanelRelationships.css.js +10 -30
- package/dist/overlays/element-details/TabPanelRelationships.js +4 -5
- package/dist/overlays/element-details/TabPanelStructure.css.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +3 -2
- package/dist/overlays/overlaysActor.js +19 -1
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +0 -5
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -4
- package/dist/overlays/relationship-details/SelectEdge.css.js +6 -6
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/compute.js +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationship-details/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationship-details/layout.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +0 -5
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +116 -21
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/actor.js +1 -1
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +21 -6
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationships-browser/layout.d.ts +1 -1
- package/dist/overlays/relationships-browser/layout.js +1 -1
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +1 -1
- package/dist/projects-overview/ProjectsOverview.js +2 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.ts +1 -5
- package/dist/projects-overview/ProjectsOverviewXY.js +1 -1
- package/dist/projects-overview/actor.d.ts +1 -1
- package/dist/projects-overview/actor.js +8 -31
- package/dist/projects-overview/context.d.ts +2 -2
- package/dist/projects-overview/context.js +2 -1
- package/dist/projects-overview/custom/nodeTypes.js +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.js +1 -1
- package/dist/search/Search.d.ts +2 -4
- package/dist/search/Search.js +67 -44
- package/dist/search/components/ElementsColumn.css.js +6 -6
- package/dist/search/components/ElementsColumn.js +93 -60
- package/dist/search/components/PickView.d.ts +3 -1
- package/dist/search/components/PickView.js +12 -7
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +2 -2
- package/dist/search/components/ViewsColum.d.ts +2 -1
- package/dist/search/components/ViewsColum.js +39 -35
- package/dist/search/components/ViewsColumn.css.js +1 -1
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/components/_shared.css.js +12 -12
- package/dist/search/components/utils.js +1 -4
- package/dist/search/hooks.d.ts +1 -6
- package/dist/search/hooks.js +15 -9
- package/dist/search/searchActor.d.ts +12 -2
- package/dist/search/searchActor.js +60 -4
- package/dist/shadowroot/ShadowRoot.d.ts +5 -2
- package/dist/shadowroot/ShadowRoot.js +25 -22
- package/dist/shadowroot/styles.css.d.ts +0 -2
- package/dist/shadowroot/styles.css.js +4 -36
- package/dist/styles-font.css2.js +1 -1
- package/dist/styles.css2.js +1 -1
- package/dist/utils/view-bounds.d.ts +3 -2
- package/dist/utils/view-bounds.js +10 -6
- package/dist/utils/xyflow.d.ts +27 -6
- package/dist/utils/xyflow.js +68 -23
- package/package.json +39 -37
- package/panda.buildinfo.json +226 -161
- package/styles-font.css +1 -1
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/bundle/index.js +0 -51974
- package/bundle/package.json +0 -4
- package/dist/editor/__tests__/fixture.d.ts +0 -205
- package/dist/editor/editorActor.d.ts +0 -653
- package/dist/likec4diagram/relationship-popover/styles.css.d.ts +0 -2
- package/dist/likec4diagram/relationship-popover/styles.css.js +0 -28
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -14
- package/dist/overlays/relationships-browser/custom/styles.css.d.ts +0 -1
- package/dist/overlays/relationships-browser/custom/styles.css.js +0 -14
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { machine,
|
|
1
|
+
import { resetLastClickedNode, emitOpenSourceOfView, emitPaneClick, onNodeMouseLeave, onNodeMouseEnter, assignLastClickedNode, emitNodeClick, onEdgeMouseLeave, onEdgeMouseEnter, startEditing, onEdgeDoubleClick, stopEditing, emitEdgeClick, updateView, updateFeatures, ensureOverlaysActor, ensureSearchActor, ensureEditorActor, assignToggledFeatures, undimEverything, tagHighlight, emitOpenSource, openOverlay, highlightNodeOrEdge, notationsHighlight, handleNavigate, cancelEditing, disableCompareWithLatest, triggerChange, resetEdgesControlPoints, layoutAlign, closeAllOverlays, closeSearch, stopEditorActor } from './machine.actions.js';
|
|
2
|
+
import { machine, to } from './machine.setup.js';
|
|
3
3
|
import { focused } from './machine.state.ready.focused.js';
|
|
4
4
|
import { idle } from './machine.state.ready.idle.js';
|
|
5
5
|
import { printing } from './machine.state.ready.printing.js';
|
|
6
6
|
import { walkthrough } from './machine.state.ready.walkthrough.js';
|
|
7
7
|
import { typedSystem } from './utils.js';
|
|
8
8
|
import { x as xstateActions_cjsExports } from '../../_virtual/xstate-actions.cjs.js';
|
|
9
|
+
import { setViewport, cancelFitDiagram, raiseFitDiagram, fitDiagram, centerOnNodeOrEdge } from './machine.actions.layout.js';
|
|
9
10
|
import { x as xstateGuards_cjsExports } from '../../_virtual/xstate-guards.cjs.js';
|
|
10
|
-
import { setViewport, fitDiagram, cancelFitDiagram, raiseFitDiagram } from './machine.actions.layout.js';
|
|
11
11
|
|
|
12
12
|
const ready = machine.createStateConfig({
|
|
13
13
|
initial: "idle",
|
|
@@ -31,9 +31,6 @@ const ready = machine.createStateConfig({
|
|
|
31
31
|
printing
|
|
32
32
|
},
|
|
33
33
|
on: {
|
|
34
|
-
"navigate.*": {
|
|
35
|
-
actions: handleNavigate()
|
|
36
|
-
},
|
|
37
34
|
"layout.align": {
|
|
38
35
|
guard: "not readonly",
|
|
39
36
|
actions: [
|
|
@@ -51,7 +48,6 @@ const ready = machine.createStateConfig({
|
|
|
51
48
|
]
|
|
52
49
|
},
|
|
53
50
|
"layout.resetManualLayout": {
|
|
54
|
-
guard: "not readonly",
|
|
55
51
|
actions: [
|
|
56
52
|
cancelEditing(),
|
|
57
53
|
disableCompareWithLatest(),
|
|
@@ -60,35 +56,52 @@ const ready = machine.createStateConfig({
|
|
|
60
56
|
})
|
|
61
57
|
]
|
|
62
58
|
},
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
59
|
+
"media.print.on": {
|
|
60
|
+
...to.printing
|
|
61
|
+
},
|
|
62
|
+
"navigate.*": {
|
|
63
|
+
actions: handleNavigate()
|
|
64
|
+
},
|
|
65
|
+
"notations.highlight": {
|
|
66
|
+
actions: notationsHighlight()
|
|
67
|
+
},
|
|
68
|
+
"notations.unhighlight": {
|
|
69
|
+
actions: undimEverything()
|
|
70
|
+
},
|
|
71
|
+
"highlight.*": {
|
|
72
|
+
actions: highlightNodeOrEdge()
|
|
73
|
+
},
|
|
74
|
+
"unhighlight.all": {
|
|
75
|
+
actions: undimEverything()
|
|
69
76
|
},
|
|
70
77
|
"open.elementDetails": {
|
|
71
78
|
actions: openOverlay()
|
|
72
79
|
},
|
|
73
|
-
"open.
|
|
80
|
+
"open.relationshipDetails": {
|
|
74
81
|
actions: openOverlay()
|
|
75
82
|
},
|
|
76
|
-
"open.
|
|
83
|
+
"open.relationshipsBrowser": {
|
|
77
84
|
actions: openOverlay()
|
|
78
85
|
},
|
|
86
|
+
"open.search": {
|
|
87
|
+
guard: "enabled: Search",
|
|
88
|
+
actions: xstateActions_cjsExports.sendTo(typedSystem.searchActor, ({ event }) => ({
|
|
89
|
+
type: "open",
|
|
90
|
+
search: event.search
|
|
91
|
+
}))
|
|
92
|
+
},
|
|
79
93
|
"open.source": {
|
|
80
94
|
guard: "enabled: OpenSource",
|
|
81
95
|
actions: emitOpenSource()
|
|
82
96
|
},
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
97
|
+
"tag.highlight": {
|
|
98
|
+
actions: tagHighlight()
|
|
99
|
+
},
|
|
100
|
+
"tag.unhighlight": {
|
|
101
|
+
actions: undimEverything()
|
|
86
102
|
},
|
|
87
103
|
"toggle.feature": {
|
|
88
|
-
actions:
|
|
89
|
-
assignToggledFeatures(),
|
|
90
|
-
ensureEditorActor()
|
|
91
|
-
]
|
|
104
|
+
actions: assignToggledFeatures()
|
|
92
105
|
},
|
|
93
106
|
"update.features": {
|
|
94
107
|
actions: [
|
|
@@ -98,17 +111,26 @@ const ready = machine.createStateConfig({
|
|
|
98
111
|
ensureEditorActor()
|
|
99
112
|
]
|
|
100
113
|
},
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
114
|
+
"update.view": [
|
|
115
|
+
// Redirect to navigating state if received another view
|
|
116
|
+
{
|
|
117
|
+
guard: "is another view",
|
|
118
|
+
...to.navigating
|
|
119
|
+
},
|
|
120
|
+
// Otherwise, just update the view in place
|
|
121
|
+
{
|
|
122
|
+
actions: updateView()
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"walkthrough.start": {
|
|
126
|
+
guard: "is dynamic view",
|
|
127
|
+
...to.walkthrough
|
|
109
128
|
},
|
|
110
|
-
"xyflow.
|
|
111
|
-
actions:
|
|
129
|
+
"xyflow.edgeClick": {
|
|
130
|
+
actions: [
|
|
131
|
+
resetLastClickedNode(),
|
|
132
|
+
emitEdgeClick()
|
|
133
|
+
]
|
|
112
134
|
},
|
|
113
135
|
"xyflow.edgeDoubleClick": {
|
|
114
136
|
guard: xstateGuards_cjsExports.and([
|
|
@@ -121,29 +143,22 @@ const ready = machine.createStateConfig({
|
|
|
121
143
|
stopEditing(true)
|
|
122
144
|
]
|
|
123
145
|
},
|
|
124
|
-
"
|
|
125
|
-
actions:
|
|
126
|
-
},
|
|
127
|
-
"notations.unhighlight": {
|
|
128
|
-
actions: undimEverything()
|
|
129
|
-
},
|
|
130
|
-
"tag.highlight": {
|
|
131
|
-
actions: tagHighlight()
|
|
146
|
+
"xyflow.edgeMouseEnter": {
|
|
147
|
+
actions: onEdgeMouseEnter()
|
|
132
148
|
},
|
|
133
|
-
"
|
|
134
|
-
actions:
|
|
149
|
+
"xyflow.edgeMouseLeave": {
|
|
150
|
+
actions: onEdgeMouseLeave()
|
|
135
151
|
},
|
|
136
|
-
"
|
|
137
|
-
|
|
138
|
-
actions: xstateActions_cjsExports.sendTo(({ system }) => typedSystem(system).searchActorRef, ({ event }) => ({
|
|
139
|
-
type: "open",
|
|
140
|
-
search: event.search
|
|
141
|
-
}))
|
|
152
|
+
"xyflow.centerViewport": {
|
|
153
|
+
actions: centerOnNodeOrEdge()
|
|
142
154
|
},
|
|
143
|
-
"xyflow.
|
|
155
|
+
"xyflow.fitDiagram": {
|
|
156
|
+
guard: "enabled: FitView",
|
|
144
157
|
actions: [
|
|
145
|
-
|
|
146
|
-
|
|
158
|
+
xstateActions_cjsExports.assign({
|
|
159
|
+
viewportChangedManually: false
|
|
160
|
+
}),
|
|
161
|
+
fitDiagram()
|
|
147
162
|
]
|
|
148
163
|
},
|
|
149
164
|
"xyflow.nodeClick": {
|
|
@@ -152,32 +167,36 @@ const ready = machine.createStateConfig({
|
|
|
152
167
|
emitNodeClick()
|
|
153
168
|
]
|
|
154
169
|
},
|
|
155
|
-
"xyflow.
|
|
170
|
+
"xyflow.nodeMouseEnter": {
|
|
171
|
+
actions: onNodeMouseEnter()
|
|
172
|
+
},
|
|
173
|
+
"xyflow.nodeMouseLeave": {
|
|
174
|
+
actions: onNodeMouseLeave()
|
|
175
|
+
},
|
|
176
|
+
"xyflow.paneClick": {
|
|
156
177
|
actions: [
|
|
157
178
|
resetLastClickedNode(),
|
|
158
|
-
|
|
179
|
+
emitPaneClick()
|
|
159
180
|
]
|
|
160
181
|
},
|
|
161
|
-
"xyflow.
|
|
162
|
-
|
|
163
|
-
|
|
182
|
+
"xyflow.paneDblClick": {
|
|
183
|
+
actions: [
|
|
184
|
+
resetLastClickedNode(),
|
|
185
|
+
cancelFitDiagram(),
|
|
186
|
+
raiseFitDiagram(),
|
|
187
|
+
emitOpenSourceOfView(),
|
|
188
|
+
emitPaneClick()
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"xyflow.resized": {
|
|
192
|
+
guard: ({ context }) => context.features.enableFitView && !context.viewportChangedManually,
|
|
193
|
+
actions: [
|
|
194
|
+
cancelFitDiagram(),
|
|
195
|
+
raiseFitDiagram({ delay: 150 })
|
|
196
|
+
]
|
|
164
197
|
},
|
|
165
198
|
"xyflow.setViewport": {
|
|
166
199
|
actions: setViewport()
|
|
167
|
-
},
|
|
168
|
-
"update.view": [
|
|
169
|
-
// Redirect to navigating state if received another view
|
|
170
|
-
{
|
|
171
|
-
guard: "is another view",
|
|
172
|
-
target: targetState.navigating
|
|
173
|
-
},
|
|
174
|
-
// Otherwise, just update the view in place
|
|
175
|
-
{
|
|
176
|
-
actions: updateView()
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
"media.print.on": {
|
|
180
|
-
target: targetState.printing
|
|
181
200
|
}
|
|
182
201
|
}
|
|
183
202
|
});
|
|
@@ -128,6 +128,10 @@ export declare const printing: {
|
|
|
128
128
|
type: "click: selected edge";
|
|
129
129
|
params: unknown;
|
|
130
130
|
};
|
|
131
|
+
"click: active walkthrough step": {
|
|
132
|
+
type: "click: active walkthrough step";
|
|
133
|
+
params: unknown;
|
|
134
|
+
};
|
|
131
135
|
}>, never, EmittedEvents>[];
|
|
132
136
|
on: {
|
|
133
137
|
'media.print.off': {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { log, enqueueActions } from 'xstate';
|
|
2
|
-
import { machine, targetState } from './machine.setup.js';
|
|
2
|
+
import { machine, to, targetState } from './machine.setup.js';
|
|
3
|
+
import { viewBounds } from './utils.js';
|
|
3
4
|
import { returnViewportBefore, cancelFitDiagram, assignViewportBefore, setViewport } from './machine.actions.layout.js';
|
|
4
5
|
|
|
5
6
|
const printing = machine.createStateConfig({
|
|
@@ -8,7 +9,7 @@ const printing = machine.createStateConfig({
|
|
|
8
9
|
cancelFitDiagram(),
|
|
9
10
|
assignViewportBefore(),
|
|
10
11
|
enqueueActions(({ enqueue, context }) => {
|
|
11
|
-
const bounds = context
|
|
12
|
+
const bounds = viewBounds(context);
|
|
12
13
|
const OFFSET = 16;
|
|
13
14
|
enqueue(
|
|
14
15
|
setViewport({
|
|
@@ -27,7 +28,7 @@ const printing = machine.createStateConfig({
|
|
|
27
28
|
],
|
|
28
29
|
on: {
|
|
29
30
|
"media.print.off": {
|
|
30
|
-
|
|
31
|
+
...to.idle
|
|
31
32
|
},
|
|
32
33
|
"*": {
|
|
33
34
|
actions: [
|
|
@@ -141,6 +141,10 @@ export declare const walkthrough: {
|
|
|
141
141
|
type: "click: selected edge";
|
|
142
142
|
params: unknown;
|
|
143
143
|
};
|
|
144
|
+
"click: active walkthrough step": {
|
|
145
|
+
type: "click: active walkthrough step";
|
|
146
|
+
params: unknown;
|
|
147
|
+
};
|
|
144
148
|
}>, never, EmittedEvents> | ActionFunction<Context, {
|
|
145
149
|
type: "walkthrough.step";
|
|
146
150
|
direction: "next" | "previous";
|
|
@@ -172,7 +176,129 @@ export declare const walkthrough: {
|
|
|
172
176
|
};
|
|
173
177
|
}>, never, never, never, never>)[];
|
|
174
178
|
};
|
|
175
|
-
'xyflow.edgeClick': {
|
|
179
|
+
'xyflow.edgeClick': ({
|
|
180
|
+
guard: "click: active walkthrough step";
|
|
181
|
+
actions: ( ActionFunction<Context, Events, Events, unknown, Values<{
|
|
182
|
+
hotkeyActorLogic: {
|
|
183
|
+
src: "hotkeyActorLogic";
|
|
184
|
+
logic: HotkeyActorLogic;
|
|
185
|
+
id: "hotkey";
|
|
186
|
+
};
|
|
187
|
+
overlaysActorLogic: {
|
|
188
|
+
src: "overlaysActorLogic";
|
|
189
|
+
logic: OverlaysActorLogic;
|
|
190
|
+
id: "overlays";
|
|
191
|
+
};
|
|
192
|
+
searchActorLogic: {
|
|
193
|
+
src: "searchActorLogic";
|
|
194
|
+
logic: SearchActorLogic;
|
|
195
|
+
id: "search";
|
|
196
|
+
};
|
|
197
|
+
mediaPrintActorLogic: {
|
|
198
|
+
src: "mediaPrintActorLogic";
|
|
199
|
+
logic: MediaPrintActorLogic;
|
|
200
|
+
id: "mediaPrint";
|
|
201
|
+
};
|
|
202
|
+
editorActor: {
|
|
203
|
+
src: "editorActor";
|
|
204
|
+
logic: EditorActorLogic;
|
|
205
|
+
id: "editor";
|
|
206
|
+
};
|
|
207
|
+
}>, never, Values<{
|
|
208
|
+
isReady: {
|
|
209
|
+
type: "isReady";
|
|
210
|
+
params: unknown;
|
|
211
|
+
};
|
|
212
|
+
"enabled: Editor": {
|
|
213
|
+
type: "enabled: Editor";
|
|
214
|
+
params: unknown;
|
|
215
|
+
};
|
|
216
|
+
"enabled: FitView": {
|
|
217
|
+
type: "enabled: FitView";
|
|
218
|
+
params: unknown;
|
|
219
|
+
};
|
|
220
|
+
"enabled: FocusMode": {
|
|
221
|
+
type: "enabled: FocusMode";
|
|
222
|
+
params: unknown;
|
|
223
|
+
};
|
|
224
|
+
"enabled: Readonly": {
|
|
225
|
+
type: "enabled: Readonly";
|
|
226
|
+
params: unknown;
|
|
227
|
+
};
|
|
228
|
+
"enabled: RelationshipDetails": {
|
|
229
|
+
type: "enabled: RelationshipDetails";
|
|
230
|
+
params: unknown;
|
|
231
|
+
};
|
|
232
|
+
"enabled: Search": {
|
|
233
|
+
type: "enabled: Search";
|
|
234
|
+
params: unknown;
|
|
235
|
+
};
|
|
236
|
+
"enabled: ElementDetails": {
|
|
237
|
+
type: "enabled: ElementDetails";
|
|
238
|
+
params: unknown;
|
|
239
|
+
};
|
|
240
|
+
"enabled: OpenSource": {
|
|
241
|
+
type: "enabled: OpenSource";
|
|
242
|
+
params: unknown;
|
|
243
|
+
};
|
|
244
|
+
"enabled: DynamicViewWalkthrough": {
|
|
245
|
+
type: "enabled: DynamicViewWalkthrough";
|
|
246
|
+
params: unknown;
|
|
247
|
+
};
|
|
248
|
+
"focus.node: autoUnfocus": {
|
|
249
|
+
type: "focus.node: autoUnfocus";
|
|
250
|
+
params: unknown;
|
|
251
|
+
};
|
|
252
|
+
"enabled: Overlays": {
|
|
253
|
+
type: "enabled: Overlays";
|
|
254
|
+
params: unknown;
|
|
255
|
+
};
|
|
256
|
+
"not readonly": {
|
|
257
|
+
type: "not readonly";
|
|
258
|
+
params: unknown;
|
|
259
|
+
};
|
|
260
|
+
"is dynamic view": {
|
|
261
|
+
type: "is dynamic view";
|
|
262
|
+
params: unknown;
|
|
263
|
+
};
|
|
264
|
+
"is same view": {
|
|
265
|
+
type: "is same view";
|
|
266
|
+
params: unknown;
|
|
267
|
+
};
|
|
268
|
+
"is another view": {
|
|
269
|
+
type: "is another view";
|
|
270
|
+
params: unknown;
|
|
271
|
+
};
|
|
272
|
+
"click: node has modelFqn": {
|
|
273
|
+
type: "click: node has modelFqn";
|
|
274
|
+
params: unknown;
|
|
275
|
+
};
|
|
276
|
+
"click: selected node": {
|
|
277
|
+
type: "click: selected node";
|
|
278
|
+
params: unknown;
|
|
279
|
+
};
|
|
280
|
+
"click: same node": {
|
|
281
|
+
type: "click: same node";
|
|
282
|
+
params: unknown;
|
|
283
|
+
};
|
|
284
|
+
"click: focused node": {
|
|
285
|
+
type: "click: focused node";
|
|
286
|
+
params: unknown;
|
|
287
|
+
};
|
|
288
|
+
"click: node has connections": {
|
|
289
|
+
type: "click: node has connections";
|
|
290
|
+
params: unknown;
|
|
291
|
+
};
|
|
292
|
+
"click: selected edge": {
|
|
293
|
+
type: "click: selected edge";
|
|
294
|
+
params: unknown;
|
|
295
|
+
};
|
|
296
|
+
"click: active walkthrough step": {
|
|
297
|
+
type: "click: active walkthrough step";
|
|
298
|
+
params: unknown;
|
|
299
|
+
};
|
|
300
|
+
}>, never, EmittedEvents> | ActionFunction<Context, Events, Events, undefined, never, never, never, never, EmittedEvents>)[];
|
|
301
|
+
} | {
|
|
176
302
|
actions: ( ActionFunction<Context, Events, Events, undefined, Values<{
|
|
177
303
|
hotkeyActorLogic: {
|
|
178
304
|
src: "hotkeyActorLogic";
|
|
@@ -288,6 +414,10 @@ export declare const walkthrough: {
|
|
|
288
414
|
type: "click: selected edge";
|
|
289
415
|
params: unknown;
|
|
290
416
|
};
|
|
417
|
+
"click: active walkthrough step": {
|
|
418
|
+
type: "click: active walkthrough step";
|
|
419
|
+
params: unknown;
|
|
420
|
+
};
|
|
291
421
|
}>, never, EmittedEvents> | ActionFunction<Context, {
|
|
292
422
|
type: "xyflow.edgeClick";
|
|
293
423
|
edge: import("../types").Types.Edge;
|
|
@@ -318,7 +448,8 @@ export declare const walkthrough: {
|
|
|
318
448
|
id: "editor";
|
|
319
449
|
};
|
|
320
450
|
}>, never, never, never, never>)[];
|
|
321
|
-
|
|
451
|
+
guard?: never;
|
|
452
|
+
})[];
|
|
322
453
|
'notations.unhighlight': {
|
|
323
454
|
actions: ActionFunction<Context, Events, Events, undefined, Values<{
|
|
324
455
|
hotkeyActorLogic: {
|
|
@@ -435,6 +566,10 @@ export declare const walkthrough: {
|
|
|
435
566
|
type: "click: selected edge";
|
|
436
567
|
params: unknown;
|
|
437
568
|
};
|
|
569
|
+
"click: active walkthrough step": {
|
|
570
|
+
type: "click: active walkthrough step";
|
|
571
|
+
params: unknown;
|
|
572
|
+
};
|
|
438
573
|
}>, never, EmittedEvents>;
|
|
439
574
|
};
|
|
440
575
|
'tag.unhighlight': {
|
|
@@ -553,6 +688,10 @@ export declare const walkthrough: {
|
|
|
553
688
|
type: "click: selected edge";
|
|
554
689
|
params: unknown;
|
|
555
690
|
};
|
|
691
|
+
"click: active walkthrough step": {
|
|
692
|
+
type: "click: active walkthrough step";
|
|
693
|
+
params: unknown;
|
|
694
|
+
};
|
|
556
695
|
}>, never, EmittedEvents>;
|
|
557
696
|
};
|
|
558
697
|
'update.view': {
|
|
@@ -672,6 +811,10 @@ export declare const walkthrough: {
|
|
|
672
811
|
type: "click: selected edge";
|
|
673
812
|
params: unknown;
|
|
674
813
|
};
|
|
814
|
+
"click: active walkthrough step": {
|
|
815
|
+
type: "click: active walkthrough step";
|
|
816
|
+
params: unknown;
|
|
817
|
+
};
|
|
675
818
|
}>, never, EmittedEvents>[];
|
|
676
819
|
};
|
|
677
820
|
'walkthrough.end': {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isStepEdgeId, getParallelStepsPrefix,
|
|
1
|
+
import { invariant, isStepEdgeId, getParallelStepsPrefix, nonNullable } from '@likec4/core';
|
|
2
2
|
import { clamp, first } from 'remeda';
|
|
3
3
|
import { assertEvent } from 'xstate';
|
|
4
4
|
import { SeqParallelAreaColor } from '../xyflow-sequence/const.js';
|
|
@@ -133,7 +133,7 @@ const walkthrough = machine.createStateConfig({
|
|
|
133
133
|
if (nextStepIndex === stepIndex) {
|
|
134
134
|
return {};
|
|
135
135
|
}
|
|
136
|
-
const nextStepId = context.xyedges[nextStepIndex].id;
|
|
136
|
+
const nextStepId = nonNullable(context.xyedges[nextStepIndex]).id;
|
|
137
137
|
return {
|
|
138
138
|
activeWalkthrough: {
|
|
139
139
|
stepId: nextStepId,
|
|
@@ -146,25 +146,33 @@ const walkthrough = machine.createStateConfig({
|
|
|
146
146
|
emitWalkthroughStep()
|
|
147
147
|
]
|
|
148
148
|
},
|
|
149
|
-
"xyflow.edgeClick":
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
149
|
+
"xyflow.edgeClick": [
|
|
150
|
+
{
|
|
151
|
+
guard: "click: active walkthrough step",
|
|
152
|
+
actions: [
|
|
153
|
+
fitFocusedBounds(),
|
|
154
|
+
emitEdgeClick()
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
actions: [
|
|
159
|
+
xstateActions_cjsExports.assign(({ event }) => {
|
|
160
|
+
const stepId = event.edge.id;
|
|
161
|
+
invariant(isStepEdgeId(stepId));
|
|
162
|
+
return {
|
|
163
|
+
activeWalkthrough: {
|
|
164
|
+
stepId,
|
|
165
|
+
parallelPrefix: getParallelStepsPrefix(stepId)
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
}),
|
|
169
|
+
updateActiveWalkthroughState(),
|
|
170
|
+
fitFocusedBounds(),
|
|
171
|
+
emitEdgeClick(),
|
|
172
|
+
emitWalkthroughStep()
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
],
|
|
168
176
|
"notations.unhighlight": {
|
|
169
177
|
actions: updateActiveWalkthroughState()
|
|
170
178
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ActorSystem } from 'xstate';
|
|
2
|
-
import { EditorActorRef } from '../../editor/editorActor';
|
|
2
|
+
import { EditorActorRef } from '../../editor/editorActor.states';
|
|
3
3
|
import { OverlaysActorRef } from '../../overlays/overlaysActor';
|
|
4
4
|
import { SearchActorRef } from '../../search/searchActor';
|
|
5
5
|
import { DiagramMachineRef } from './machine';
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BBox } from '@likec4/core/geometry';
|
|
2
|
+
import { DeploymentFqn, DiagramEdge, DiagramNode, DiagramView, Fqn } from '@likec4/core/types';
|
|
2
3
|
import { Viewport } from '@xyflow/system';
|
|
3
4
|
import { ActorSystem } from 'xstate';
|
|
4
|
-
import { EditorActorRef } from '../../editor/editorActor';
|
|
5
|
-
import { ViewPaddings } from '../../LikeC4Diagram.props';
|
|
5
|
+
import { EditorActorRef } from '../../editor/editorActor.states';
|
|
6
6
|
import { OverlaysActorRef } from '../../overlays/overlaysActor';
|
|
7
7
|
import { SearchActorRef } from '../../search/searchActor';
|
|
8
8
|
import { Types } from '../types';
|
|
9
9
|
import { Context } from './machine.setup';
|
|
10
10
|
import { DiagramActorRef, NodeWithData } from './types';
|
|
11
|
-
import { DeploymentFqn } from '@likec4/core';
|
|
12
11
|
export declare const findNodeByModelFqn: <T extends NodeWithData>(xynodes: T[], elementFqn: Fqn) => (T & {
|
|
13
12
|
data: {
|
|
14
13
|
modelFqn: Fqn;
|
|
@@ -36,6 +35,11 @@ export declare namespace typedSystem {
|
|
|
36
35
|
}
|
|
37
36
|
export declare function findDiagramNode(ctx: Context, xynodeId: string): DiagramNode | null;
|
|
38
37
|
export declare function findDiagramEdge(ctx: Context, xyedgeId: string): DiagramEdge | null;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the bounds of the current view from the context.
|
|
40
|
+
* If {@link nextView} is provided, returns the bounds of the next view.
|
|
41
|
+
*/
|
|
42
|
+
export declare function viewBounds(ctx: Pick<Context, 'view' | 'dynamicViewVariant'>, nextView?: DiagramView): BBox;
|
|
39
43
|
export declare function focusedBounds(params: {
|
|
40
44
|
context: Context;
|
|
41
45
|
}): {
|
|
@@ -48,19 +52,15 @@ export declare function activeSequenceBounds(params: {
|
|
|
48
52
|
bounds: BBox;
|
|
49
53
|
duration: number;
|
|
50
54
|
};
|
|
51
|
-
export declare function nodeRef(node: Types.Node):
|
|
55
|
+
export declare function nodeRef(node: Types.Node): Fqn | DeploymentFqn | null;
|
|
52
56
|
export declare function findCorrespondingNode(context: Pick<Context, 'lastOnNavigate' | 'xynodes'>, event: {
|
|
53
57
|
view: DiagramView;
|
|
54
58
|
xynodes: Types.Node[];
|
|
55
59
|
}): {
|
|
56
|
-
fromNode:
|
|
57
|
-
toNode:
|
|
60
|
+
fromNode: null;
|
|
61
|
+
toNode: null;
|
|
62
|
+
} | {
|
|
63
|
+
fromNode: Types.Node;
|
|
64
|
+
toNode: Types.Node | null;
|
|
58
65
|
};
|
|
59
66
|
export declare function calcViewportForBounds(context: Pick<Context, 'xystore' | 'fitViewPadding'>, bounds: BBox): Viewport;
|
|
60
|
-
export declare function parseAsNumber(value: string | number | undefined): number;
|
|
61
|
-
export declare function parseViewPaddings(paddings: ViewPaddings): {
|
|
62
|
-
top: number;
|
|
63
|
-
right: number;
|
|
64
|
-
bottom: number;
|
|
65
|
-
left: number;
|
|
66
|
-
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { BBox } from '@likec4/core/
|
|
1
|
+
import { BBox } from '@likec4/core/geometry';
|
|
2
2
|
import { nonNullable, nonexhaustive } from '@likec4/core/utils';
|
|
3
3
|
import { getViewportForBounds, getNodesBounds, getNodeDimensions, getEdgePosition } from '@xyflow/system';
|
|
4
4
|
import { MinZoom } from '../../base/const.js';
|
|
5
|
+
import { pickViewBounds } from '../../utils/view-bounds.js';
|
|
5
6
|
|
|
6
7
|
const findNodeByModelFqn = (xynodes, elementFqn) => {
|
|
7
8
|
const node = xynodes.find((n) => "modelFqn" in n.data && n.data["modelFqn"] === elementFqn);
|
|
@@ -41,6 +42,10 @@ function findDiagramNode(ctx, xynodeId) {
|
|
|
41
42
|
function findDiagramEdge(ctx, xyedgeId) {
|
|
42
43
|
return ctx.view.edges.find((e) => e.id === xyedgeId) ?? null;
|
|
43
44
|
}
|
|
45
|
+
function viewBounds(ctx, nextView) {
|
|
46
|
+
const view = nextView ?? ctx.view;
|
|
47
|
+
return pickViewBounds(view, ctx.dynamicViewVariant);
|
|
48
|
+
}
|
|
44
49
|
function focusedBounds(params) {
|
|
45
50
|
const knownAbsolutes = /* @__PURE__ */ new Map();
|
|
46
51
|
const b = params.context.xynodes.reduce((acc, node) => {
|
|
@@ -71,7 +76,7 @@ function focusedBounds(params) {
|
|
|
71
76
|
});
|
|
72
77
|
if (b.minX === Infinity) {
|
|
73
78
|
return {
|
|
74
|
-
bounds: params.context
|
|
79
|
+
bounds: viewBounds(params.context)
|
|
75
80
|
};
|
|
76
81
|
}
|
|
77
82
|
return {
|
|
@@ -161,7 +166,10 @@ function findCorrespondingNode(context, event) {
|
|
|
161
166
|
const fromNodeId = context.lastOnNavigate?.fromNode;
|
|
162
167
|
const fromNode = fromNodeId && context.xynodes.find((n) => n.id === fromNodeId);
|
|
163
168
|
const fromRef = fromNode && nodeRef(fromNode);
|
|
164
|
-
|
|
169
|
+
if (!fromNode || !fromRef) {
|
|
170
|
+
return { fromNode: null, toNode: null };
|
|
171
|
+
}
|
|
172
|
+
const toNode = event.xynodes.find((n) => nodeRef(n) === fromRef) ?? null;
|
|
165
173
|
return { fromNode, toNode };
|
|
166
174
|
}
|
|
167
175
|
function calcViewportForBounds(context, bounds) {
|
|
@@ -181,4 +189,4 @@ function calcViewportForBounds(context, bounds) {
|
|
|
181
189
|
);
|
|
182
190
|
}
|
|
183
191
|
|
|
184
|
-
export { activeSequenceBounds, calcViewportForBounds, findCorrespondingNode, findDiagramEdge, findDiagramNode, findNodeByModelFqn, focusedBounds, nodeRef, typedSystem };
|
|
192
|
+
export { activeSequenceBounds, calcViewportForBounds, findCorrespondingNode, findDiagramEdge, findDiagramNode, findNodeByModelFqn, focusedBounds, nodeRef, typedSystem, viewBounds };
|