@likec4/diagram 1.48.0 → 1.50.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/README.md +7 -9
- package/adhoc-editor/package.json +4 -0
- package/dist/LikeC4Diagram.d.ts +2 -1
- package/dist/LikeC4Diagram.js +77 -79
- package/dist/LikeC4Diagram.props.d.ts +9 -1
- 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 +4 -4
- package/dist/LikeC4Styles.d.ts +2 -1
- package/dist/LikeC4View.d.ts +14 -1
- package/dist/LikeC4View.js +31 -18
- package/dist/ReactLikeC4.d.ts +2 -1
- package/dist/ReactLikeC4.js +3 -1
- 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 +1 -1
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +46 -43
- 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 +3 -3
- package/dist/adhoc-editor/hooks.js +5 -23
- package/dist/adhoc-editor/index.d.ts +1 -1
- package/dist/adhoc-editor/index.js +1 -0
- package/dist/adhoc-editor/{ActorProvider.d.ts → state/ActorProvider.d.ts} +1 -3
- package/dist/adhoc-editor/{ActorProvider.js → state/ActorProvider.js} +10 -11
- package/dist/adhoc-editor/state/actor.d.ts +13 -0
- package/dist/adhoc-editor/{actor.editor.d.ts → state/actor.editor.d.ts} +6 -4
- package/dist/adhoc-editor/state/actor.editor.js +205 -0
- package/dist/adhoc-editor/{actor.js → state/actor.js} +2 -6
- package/dist/adhoc-editor/{actor.layouter.d.ts → state/actor.layouter.d.ts} +7 -4
- package/dist/adhoc-editor/{actor.layouter.js → state/actor.layouter.js} +17 -13
- package/dist/adhoc-editor/{actor.types.d.ts → state/actor.types.d.ts} +12 -6
- package/dist/adhoc-editor/{actor.types.js → state/actor.types.js} +8 -1
- 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 +1 -1
- package/dist/base/const.d.ts +1 -0
- package/dist/base-primitives/compound/CompoundActionButton.js +26 -12
- package/dist/base-primitives/compound/CompoundDetailsButton.js +22 -9
- package/dist/base-primitives/compound/CompoundNodeContainer.js +5 -4
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- 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 +12 -19
- package/dist/base-primitives/edge/EdgeMarkers.js +3 -3
- package/dist/base-primitives/element/ElementActionButtons.js +35 -10
- package/dist/base-primitives/element/ElementDetailsButton.js +47 -18
- package/dist/base-primitives/element/ElementNodeContainer.d.ts +3 -3
- package/dist/base-primitives/element/ElementNodeContainer.js +23 -10
- package/dist/base-primitives/element/ElementShape.d.ts +4 -4
- package/dist/base-primitives/element/ElementShape.js +71 -8
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +3 -3
- package/dist/components/Logo.js +1 -1
- package/dist/components/NavigationPanel.js +2 -4
- package/dist/components/PortalToContainer.js +3 -4
- package/dist/components/RootContainer.js +9 -16
- 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 +1 -1
- package/dist/context/DefaultMantineProvider.js +10 -1
- 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 +5 -3
- package/dist/context/FramerMotionConfig.d.ts +1 -3
- package/dist/context/IconRenderer.d.ts +5 -4
- package/dist/context/IconRenderer.js +51 -24
- 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 +1 -1
- package/dist/custom/index.js +16 -15
- package/dist/editor/LikeC4EditorProvider.js +1 -1
- package/dist/editor/applyChangesToManualLayout.js +7 -7
- package/dist/editor/editorActor.actions.js +20 -20
- package/dist/editor/editorActor.setup.js +1 -1
- package/dist/editor/editorActor.states.js +0 -9
- package/dist/editor/useEditorActorLogic.d.ts +1 -2
- package/dist/editor/useEditorActorLogic.js +8 -11
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/safeContext.d.ts +4 -5
- package/dist/hooks/useCallbackRef.js +7 -6
- package/dist/hooks/useCurrentView.js +5 -10
- package/dist/hooks/useCurrentViewModel.d.ts +2 -6
- package/dist/hooks/useCurrentViewModel.js +3 -7
- package/dist/hooks/useDiagram.d.ts +9 -1
- package/dist/hooks/useDiagram.js +8 -2
- package/dist/hooks/useDiagramCompareLayout.d.ts +5 -5
- package/dist/hooks/useLikeC4ElementsTree.d.ts +1 -1
- package/dist/hooks/useLikeC4ElementsTree.js +1 -1
- 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/index.d.ts +1 -3
- package/dist/index.js +2 -2
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -1
- package/dist/likec4diagram/DiagramXYFlow.js +5 -7
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +22 -24
- package/dist/likec4diagram/custom/edges/edges.css.js +2 -1
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +40 -55
- package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
- 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 +4 -2
- package/dist/likec4diagram/custom/nodes/nodes.js +5 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +12 -8
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +8 -28
- package/dist/likec4diagram/state/DiagramActorProvider.js +30 -56
- 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 +27 -0
- package/dist/likec4diagram/state/machine.actions.js +78 -21
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +1 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +38 -3
- package/dist/likec4diagram/state/machine.js +4 -1
- package/dist/likec4diagram/state/machine.setup.d.ts +19 -2
- package/dist/likec4diagram/state/machine.state.navigating.js +1 -1
- package/dist/likec4diagram/state/machine.state.ready.d.ts +61 -1
- package/dist/likec4diagram/state/machine.state.ready.js +11 -3
- package/dist/likec4diagram/state/utils.d.ts +2 -1
- package/dist/likec4diagram/state/utils.js +1 -1
- package/dist/likec4diagram/types.d.ts +2 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.js +6 -29
- package/dist/likec4diagram/useLayoutConstraints.d.ts +12 -12
- package/dist/likec4diagram/useLayoutConstraints.js +125 -86
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +2 -0
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +7 -2
- package/dist/navigationpanel/NavigationPanel.js +2 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +13 -13
- package/dist/navigationpanel/_common.js +2 -2
- 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/controls/DetailsControls.js +4 -4
- package/dist/navigationpanel/controls/LayoutWarning.js +1 -1
- 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.js +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +3 -3
- 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 +6 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +16 -16
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @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.4 → @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.4 → @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 +11 -11
- package/dist/overlays/element-details/ElementDetailsCard.js +44 -45
- package/dist/overlays/element-details/MetadataValue.js +7 -7
- package/dist/overlays/element-details/TabPanelDeployments.js +4 -4
- package/dist/overlays/element-details/TabPanelRelationships.css.js +5 -5
- 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 +1 -1
- package/dist/overlays/element-details/actorContext.d.ts +1 -1
- package/dist/overlays/overlaysActor.js +1 -1
- package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
- package/dist/overlays/relationship-details/SelectEdge.css.js +4 -4
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -6
- 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 +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/context.d.ts +2 -2
- package/dist/projects-overview/context.js +2 -1
- package/dist/projects-overview/custom/nodeTypes.js +1 -1
- package/dist/search/Search.d.ts +2 -1
- package/dist/search/Search.js +108 -87
- package/dist/search/components/ElementsColumn.css.js +3 -3
- package/dist/search/components/ElementsColumn.js +93 -59
- package/dist/search/components/PickView.js +8 -4
- 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.js +11 -11
- package/dist/search/components/utils.js +1 -4
- package/dist/search/hooks.js +4 -1
- 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 +7 -5
- package/dist/shadowroot/styles.css.js +3 -2
- package/dist/styles.css2.js +1 -1
- package/dist/utils/view-bounds.d.ts +3 -2
- package/dist/utils/view-bounds.js +1 -1
- package/dist/utils/xyflow.d.ts +10 -5
- package/dist/utils/xyflow.js +24 -22
- package/package.json +33 -32
- package/panda.buildinfo.json +176 -87
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/bundle/index.js +0 -52554
- package/bundle/package.json +0 -4
- package/dist/adhoc-editor/EditorNavigationPanel.d.ts +0 -1
- package/dist/adhoc-editor/EditorNavigationPanel.js +0 -32
- package/dist/adhoc-editor/SelectElementOverlay.d.ts +0 -1
- package/dist/adhoc-editor/SelectElementOverlay.js +0 -124
- package/dist/adhoc-editor/actor.d.ts +0 -131
- package/dist/adhoc-editor/actor.editor.js +0 -96
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.js +0 -104
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/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.4/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.4/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.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -14
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { nonNullable, BBox, invariant } from '@likec4/core';
|
|
2
|
-
import { getViewportForBounds } from '@xyflow/react';
|
|
1
|
+
import { nonNullable, isNonEmptyArray, BBox, invariant } from '@likec4/core';
|
|
2
|
+
import { getViewportForBounds, getNodesBounds } from '@xyflow/react';
|
|
3
3
|
import { assertEvent } from 'xstate';
|
|
4
|
+
import { calcEdgeBounds } from '../../utils/view-bounds.js';
|
|
4
5
|
import { machine } from './machine.setup.js';
|
|
5
6
|
import { viewBounds, activeSequenceBounds, focusedBounds } from './utils.js';
|
|
6
7
|
import { MinZoom } from '../../base/const.js';
|
|
@@ -45,6 +46,40 @@ const setViewportCenter = (params) => machine.createAction(({ context, event })
|
|
|
45
46
|
console.error("Error during setViewportCenter", { err });
|
|
46
47
|
});
|
|
47
48
|
});
|
|
49
|
+
const centerOnNodeOrEdge = () => machine.raise(({ context, event }) => {
|
|
50
|
+
assertEvent(event, "xyflow.centerViewport");
|
|
51
|
+
const xystate = context.xystore.getState();
|
|
52
|
+
if ("edgeId" in event) {
|
|
53
|
+
const edge = xystate.edgeLookup.get(event.edgeId);
|
|
54
|
+
if (!edge) {
|
|
55
|
+
return { type: "noop" };
|
|
56
|
+
}
|
|
57
|
+
const sourceNode = xystate.nodeLookup.get(edge.source);
|
|
58
|
+
const targetNode = xystate.nodeLookup.get(edge.target);
|
|
59
|
+
if (!sourceNode || !targetNode) {
|
|
60
|
+
return { type: "noop" };
|
|
61
|
+
}
|
|
62
|
+
const bounds2 = getNodesBounds([sourceNode, targetNode], xystate);
|
|
63
|
+
const edgeBounds = calcEdgeBounds({
|
|
64
|
+
points: edge.data.points,
|
|
65
|
+
controlPoints: edge.data.controlPoints && isNonEmptyArray(edge.data.controlPoints) ? edge.data.controlPoints : null,
|
|
66
|
+
labelBBox: edge.data.labelBBox ?? null
|
|
67
|
+
});
|
|
68
|
+
return {
|
|
69
|
+
type: "xyflow.fitDiagram",
|
|
70
|
+
bounds: BBox.merge(bounds2, edgeBounds)
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const node = xystate.nodeLookup.get(event.nodeId);
|
|
74
|
+
if (!node) {
|
|
75
|
+
return { type: "noop" };
|
|
76
|
+
}
|
|
77
|
+
const bounds = getNodesBounds([node], xystate);
|
|
78
|
+
return {
|
|
79
|
+
type: "xyflow.fitDiagram",
|
|
80
|
+
bounds
|
|
81
|
+
};
|
|
82
|
+
});
|
|
48
83
|
const fitDiagram = (params) => machine.createAction(({ context, event }) => {
|
|
49
84
|
let bounds, duration;
|
|
50
85
|
if (params) {
|
|
@@ -156,4 +191,4 @@ const returnViewportBefore = (params) => machine.enqueueActions(({ enqueue, cont
|
|
|
156
191
|
}
|
|
157
192
|
});
|
|
158
193
|
|
|
159
|
-
export { assignViewportBefore, cancelFitDiagram, fitDiagram, fitFocusedBounds, raiseFitDiagram, raiseSetViewport, raiseUpdateView, returnViewportBefore, setViewport, setViewportCenter };
|
|
194
|
+
export { assignViewportBefore, cancelFitDiagram, centerOnNodeOrEdge, fitDiagram, fitFocusedBounds, raiseFitDiagram, raiseSetViewport, raiseUpdateView, returnViewportBefore, setViewport, setViewportCenter };
|
|
@@ -16,7 +16,10 @@ const _diagramMachine = machine.createMachine({
|
|
|
16
16
|
...input,
|
|
17
17
|
xyedges: [],
|
|
18
18
|
xynodes: [],
|
|
19
|
-
features: {
|
|
19
|
+
features: {
|
|
20
|
+
...DefaultFeatures,
|
|
21
|
+
...input.features
|
|
22
|
+
},
|
|
20
23
|
toggledFeatures: DiagramToggledFeaturesPersistence.read() ?? {
|
|
21
24
|
enableReadOnly: true,
|
|
22
25
|
enableCompareWithLatest: false
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BBox } from '@likec4/core';
|
|
1
|
+
import { BBox } from '@likec4/core/geometry';
|
|
2
2
|
import { DiagramEdge, DiagramNode, DiagramView, DynamicViewDisplayVariant, EdgeId, Fqn, LayoutType, NodeId, NodeNotation as ElementNotation, StepEdgeId, ViewChange, ViewId, WhereOperator } from '@likec4/core/types';
|
|
3
3
|
import { EdgeChange, NodeChange, Rect, Viewport } from '@xyflow/system';
|
|
4
4
|
import { MouseEvent } from 'react';
|
|
@@ -44,6 +44,7 @@ export interface Input {
|
|
|
44
44
|
fitViewPadding: ViewPaddings;
|
|
45
45
|
where: WhereOperator | null;
|
|
46
46
|
dynamicViewVariant?: DynamicViewDisplayVariant | undefined;
|
|
47
|
+
features?: EnabledFeatures;
|
|
47
48
|
}
|
|
48
49
|
export type ToggledFeatures = {
|
|
49
50
|
[P in `enable${TogglableFeature}`]?: boolean;
|
|
@@ -143,6 +144,14 @@ export type Events = HotKeyEvent | MediaPrintEvent | {
|
|
|
143
144
|
type: 'xyflow.setViewport';
|
|
144
145
|
duration?: number;
|
|
145
146
|
viewport: Viewport;
|
|
147
|
+
} | {
|
|
148
|
+
type: 'xyflow.centerViewport';
|
|
149
|
+
nodeId: NodeId;
|
|
150
|
+
duration?: number;
|
|
151
|
+
} | {
|
|
152
|
+
type: 'xyflow.centerViewport';
|
|
153
|
+
edgeId: EdgeId;
|
|
154
|
+
duration?: number;
|
|
146
155
|
} | {
|
|
147
156
|
type: 'update.nodeData';
|
|
148
157
|
nodeId: NodeId;
|
|
@@ -166,7 +175,7 @@ export type Events = HotKeyEvent | MediaPrintEvent | {
|
|
|
166
175
|
bounds: BBox;
|
|
167
176
|
} | {
|
|
168
177
|
type: 'update.inputs';
|
|
169
|
-
inputs: Partial<Omit<Input, 'view' | 'xystore' | 'dynamicViewVariant'>>;
|
|
178
|
+
inputs: Partial<Omit<Input, 'view' | 'xystore' | 'dynamicViewVariant' | 'features'>>;
|
|
170
179
|
} | {
|
|
171
180
|
type: 'update.features';
|
|
172
181
|
features: EnabledFeatures;
|
|
@@ -223,6 +232,14 @@ export type Events = HotKeyEvent | MediaPrintEvent | {
|
|
|
223
232
|
direction: 'next' | 'previous';
|
|
224
233
|
} | {
|
|
225
234
|
type: 'walkthrough.end';
|
|
235
|
+
} | {
|
|
236
|
+
type: 'highlight.node';
|
|
237
|
+
nodeId: NodeId;
|
|
238
|
+
} | {
|
|
239
|
+
type: 'highlight.edge';
|
|
240
|
+
edgeId: EdgeId;
|
|
241
|
+
} | {
|
|
242
|
+
type: 'unhighlight.all';
|
|
226
243
|
} | {
|
|
227
244
|
type: 'notations.highlight';
|
|
228
245
|
notation: ElementNotation;
|
|
@@ -2257,7 +2257,6 @@ export declare const ready: {
|
|
|
2257
2257
|
}>, never, never, never, never>[];
|
|
2258
2258
|
};
|
|
2259
2259
|
'layout.resetManualLayout': {
|
|
2260
|
-
guard: "not readonly";
|
|
2261
2260
|
actions: ActionFunction<Context, Events, Events, undefined, Values<{
|
|
2262
2261
|
hotkeyActorLogic: {
|
|
2263
2262
|
src: "hotkeyActorLogic";
|
|
@@ -2562,6 +2561,64 @@ export declare const ready: {
|
|
|
2562
2561
|
};
|
|
2563
2562
|
}>, never, never, never, never>;
|
|
2564
2563
|
};
|
|
2564
|
+
'highlight.*': {
|
|
2565
|
+
actions: ActionFunction<Context, Events, Events, undefined, Values<{
|
|
2566
|
+
hotkeyActorLogic: {
|
|
2567
|
+
src: "hotkeyActorLogic";
|
|
2568
|
+
logic: HotkeyActorLogic;
|
|
2569
|
+
id: "hotkey";
|
|
2570
|
+
};
|
|
2571
|
+
overlaysActorLogic: {
|
|
2572
|
+
src: "overlaysActorLogic";
|
|
2573
|
+
logic: OverlaysActorLogic;
|
|
2574
|
+
id: "overlays";
|
|
2575
|
+
};
|
|
2576
|
+
searchActorLogic: {
|
|
2577
|
+
src: "searchActorLogic";
|
|
2578
|
+
logic: SearchActorLogic;
|
|
2579
|
+
id: "search";
|
|
2580
|
+
};
|
|
2581
|
+
mediaPrintActorLogic: {
|
|
2582
|
+
src: "mediaPrintActorLogic";
|
|
2583
|
+
logic: MediaPrintActorLogic;
|
|
2584
|
+
id: "mediaPrint";
|
|
2585
|
+
};
|
|
2586
|
+
editorActor: {
|
|
2587
|
+
src: "editorActor";
|
|
2588
|
+
logic: EditorActorLogic;
|
|
2589
|
+
id: "editor";
|
|
2590
|
+
};
|
|
2591
|
+
}>, never, never, never, never>;
|
|
2592
|
+
};
|
|
2593
|
+
'unhighlight.all': {
|
|
2594
|
+
actions: ActionFunction<Context, Events, Events, undefined, Values<{
|
|
2595
|
+
hotkeyActorLogic: {
|
|
2596
|
+
src: "hotkeyActorLogic";
|
|
2597
|
+
logic: HotkeyActorLogic;
|
|
2598
|
+
id: "hotkey";
|
|
2599
|
+
};
|
|
2600
|
+
overlaysActorLogic: {
|
|
2601
|
+
src: "overlaysActorLogic";
|
|
2602
|
+
logic: OverlaysActorLogic;
|
|
2603
|
+
id: "overlays";
|
|
2604
|
+
};
|
|
2605
|
+
searchActorLogic: {
|
|
2606
|
+
src: "searchActorLogic";
|
|
2607
|
+
logic: SearchActorLogic;
|
|
2608
|
+
id: "search";
|
|
2609
|
+
};
|
|
2610
|
+
mediaPrintActorLogic: {
|
|
2611
|
+
src: "mediaPrintActorLogic";
|
|
2612
|
+
logic: MediaPrintActorLogic;
|
|
2613
|
+
id: "mediaPrint";
|
|
2614
|
+
};
|
|
2615
|
+
editorActor: {
|
|
2616
|
+
src: "editorActor";
|
|
2617
|
+
logic: EditorActorLogic;
|
|
2618
|
+
id: "editor";
|
|
2619
|
+
};
|
|
2620
|
+
}>, never, never, never, never>;
|
|
2621
|
+
};
|
|
2565
2622
|
'open.elementDetails': {
|
|
2566
2623
|
actions: ActionFunction<Context, Events, Events, undefined, Values<{
|
|
2567
2624
|
hotkeyActorLogic: {
|
|
@@ -3587,6 +3644,9 @@ export declare const ready: {
|
|
|
3587
3644
|
};
|
|
3588
3645
|
}>, never, EmittedEvents>;
|
|
3589
3646
|
};
|
|
3647
|
+
'xyflow.centerViewport': {
|
|
3648
|
+
actions: ActionFunction<Context, Events, Events, undefined, never, never, never, never, never>;
|
|
3649
|
+
};
|
|
3590
3650
|
'xyflow.fitDiagram': {
|
|
3591
3651
|
guard: "enabled: FitView";
|
|
3592
3652
|
actions: ( ActionFunction<Context, Events, Events, unknown, Values<{
|
|
@@ -1,4 +1,4 @@
|
|
|
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, notationsHighlight, handleNavigate, cancelEditing, disableCompareWithLatest, triggerChange, resetEdgesControlPoints, layoutAlign, closeAllOverlays, closeSearch, stopEditorActor } from './machine.actions.js';
|
|
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
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';
|
|
@@ -6,7 +6,7 @@ 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 } from './machine.actions.layout.js';
|
|
9
|
+
import { setViewport, cancelFitDiagram, raiseFitDiagram, fitDiagram, centerOnNodeOrEdge } from './machine.actions.layout.js';
|
|
10
10
|
import { x as xstateGuards_cjsExports } from '../../_virtual/xstate-guards.cjs.js';
|
|
11
11
|
|
|
12
12
|
const ready = machine.createStateConfig({
|
|
@@ -48,7 +48,6 @@ const ready = machine.createStateConfig({
|
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
50
|
"layout.resetManualLayout": {
|
|
51
|
-
guard: "not readonly",
|
|
52
51
|
actions: [
|
|
53
52
|
cancelEditing(),
|
|
54
53
|
disableCompareWithLatest(),
|
|
@@ -69,6 +68,12 @@ const ready = machine.createStateConfig({
|
|
|
69
68
|
"notations.unhighlight": {
|
|
70
69
|
actions: undimEverything()
|
|
71
70
|
},
|
|
71
|
+
"highlight.*": {
|
|
72
|
+
actions: highlightNodeOrEdge()
|
|
73
|
+
},
|
|
74
|
+
"unhighlight.all": {
|
|
75
|
+
actions: undimEverything()
|
|
76
|
+
},
|
|
72
77
|
"open.elementDetails": {
|
|
73
78
|
actions: openOverlay()
|
|
74
79
|
},
|
|
@@ -144,6 +149,9 @@ const ready = machine.createStateConfig({
|
|
|
144
149
|
"xyflow.edgeMouseLeave": {
|
|
145
150
|
actions: onEdgeMouseLeave()
|
|
146
151
|
},
|
|
152
|
+
"xyflow.centerViewport": {
|
|
153
|
+
actions: centerOnNodeOrEdge()
|
|
154
|
+
},
|
|
147
155
|
"xyflow.fitDiagram": {
|
|
148
156
|
guard: "enabled: FitView",
|
|
149
157
|
actions: [
|
|
@@ -1,4 +1,5 @@
|
|
|
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
5
|
import { EditorActorRef } from '../../editor/editorActor.states';
|
|
@@ -1,4 +1,4 @@
|
|
|
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';
|
|
@@ -4,7 +4,7 @@ import { FunctionComponent } from 'react';
|
|
|
4
4
|
import { Simplify } from 'type-fest';
|
|
5
5
|
import { BaseEdge, BaseEdgeData, BaseEdgeProps, BaseNode, BaseNodeData, BaseNodeProps, NonOptional } from '../base/types';
|
|
6
6
|
export declare namespace Types {
|
|
7
|
-
type LeafNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'technology' | 'description' | 'color' | 'shape' | 'width' | 'level' | 'height' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
7
|
+
type LeafNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'technology' | 'description' | 'notes' | 'color' | 'shape' | 'width' | 'level' | 'height' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
8
8
|
/**
|
|
9
9
|
* View layout direction, used by DefaultHandles to position node handles
|
|
10
10
|
*/
|
|
@@ -53,7 +53,7 @@ export declare namespace Types {
|
|
|
53
53
|
type SequenceParallelAreaData = Simplify<LeafNodeData & {
|
|
54
54
|
parallelPrefix: string;
|
|
55
55
|
}>;
|
|
56
|
-
type CompoundNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'color' | 'shape' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
56
|
+
type CompoundNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'notes' | 'color' | 'shape' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
57
57
|
/**
|
|
58
58
|
* View layout direction, used by DefaultHandles to position node handles
|
|
59
59
|
*/
|
|
@@ -23,7 +23,7 @@ const card = css({
|
|
|
23
23
|
userSelect: "none",
|
|
24
24
|
minWidth: 200,
|
|
25
25
|
maxWidth: "calc(100vw - 20px)",
|
|
26
|
-
backgroundColor: `
|
|
26
|
+
backgroundColor: `body/80`,
|
|
27
27
|
// WebkitBackdropFilter: fallbackVar(vars.safariAnimationHook, 'blur(8px)'),
|
|
28
28
|
// backdropFilter: fallbackVar(vars.safariAnimationHook, 'blur(8px)'),
|
|
29
29
|
sm: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MemoExoticComponent } from 'react';
|
|
2
|
-
export declare const NotationPanel: MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
2
|
+
export declare const NotationPanel: MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
|
-
import { Tooltip,
|
|
3
|
+
import { Tooltip, ActionIcon, Paper, Tabs, TabsList, TabsTab, TabsPanel, ScrollAreaAutosize, Stack, Card, Group, Box, Badge, Text } from '@mantine/core';
|
|
4
4
|
import { useLocalStorage } from '@mantine/hooks';
|
|
5
5
|
import { AnimatePresence, m } from 'motion/react';
|
|
6
6
|
import { memo, useState } from 'react';
|
|
@@ -9,9 +9,8 @@ import { useDiagramContext } from '../../../hooks/useDiagram.js';
|
|
|
9
9
|
import { useXYStore } from '../../../hooks/useXYFlow.js';
|
|
10
10
|
import { container, icon, card, tabPanel, shapeBadge, elementNotation } from './NotationPanel.css.js';
|
|
11
11
|
import { useMantinePortalProps } from '../../../hooks/useMantinePortalProps.js';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import IconArrowDownRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js';
|
|
12
|
+
import IconHelpCircle from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js';
|
|
13
|
+
import IconArrowDownRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js';
|
|
15
14
|
import { useDiagram } from '../../../hooks/safeContext.js';
|
|
16
15
|
import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
|
|
17
16
|
|
|
@@ -127,31 +126,9 @@ const NotationPanel = memo(() => {
|
|
|
127
126
|
});
|
|
128
127
|
const hasNotations = notations.length > 0;
|
|
129
128
|
const portalProps = useMantinePortalProps();
|
|
129
|
+
if (!hasNotations) return null;
|
|
130
130
|
return /* @__PURE__ */ jsxs(AnimatePresence, { children: [
|
|
131
|
-
|
|
132
|
-
m.div,
|
|
133
|
-
{
|
|
134
|
-
initial: { opacity: 0.75, translateX: "50%" },
|
|
135
|
-
animate: { opacity: 1, translateX: 0 },
|
|
136
|
-
exit: {
|
|
137
|
-
translateX: "100%",
|
|
138
|
-
opacity: 0.6
|
|
139
|
-
},
|
|
140
|
-
className: container,
|
|
141
|
-
children: /* @__PURE__ */ jsx(Tooltip, { label: "View has no notations", color: "orange", ...portalProps, children: /* @__PURE__ */ jsx(
|
|
142
|
-
ThemeIcon,
|
|
143
|
-
{
|
|
144
|
-
size: "lg",
|
|
145
|
-
variant: "light",
|
|
146
|
-
color: "orange",
|
|
147
|
-
radius: "md",
|
|
148
|
-
children: /* @__PURE__ */ jsx(IconAlertTriangle, {})
|
|
149
|
-
}
|
|
150
|
-
) })
|
|
151
|
-
},
|
|
152
|
-
"empty"
|
|
153
|
-
),
|
|
154
|
-
hasNotations && isCollapsed && /* @__PURE__ */ jsx(
|
|
131
|
+
isCollapsed && /* @__PURE__ */ jsx(
|
|
155
132
|
m.div,
|
|
156
133
|
{
|
|
157
134
|
initial: { opacity: 0.75, translateX: "50%" },
|
|
@@ -175,7 +152,7 @@ const NotationPanel = memo(() => {
|
|
|
175
152
|
},
|
|
176
153
|
"collapsed"
|
|
177
154
|
),
|
|
178
|
-
|
|
155
|
+
!isCollapsed && /* @__PURE__ */ jsx(
|
|
179
156
|
m.div,
|
|
180
157
|
{
|
|
181
158
|
initial: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NonEmptyArray } from '@likec4/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Dimensions, XYPoint, BBox } from '@likec4/core/geometry';
|
|
3
|
+
import { InternalNode as RFInternalNode, OnNodeDrag } from '@xyflow/react';
|
|
3
4
|
import { XYStoreApi } from '../hooks';
|
|
4
5
|
import { Types } from './types';
|
|
5
6
|
type InternalNode = RFInternalNode<Types.AnyNode>;
|
|
@@ -13,18 +14,14 @@ declare abstract class Rect {
|
|
|
13
14
|
minY: number;
|
|
14
15
|
maxX: number;
|
|
15
16
|
maxY: number;
|
|
16
|
-
readonly
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
get
|
|
20
|
-
|
|
21
|
-
get dimensions(): {
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
};
|
|
25
|
-
get diff(): XYPosition;
|
|
17
|
+
readonly initial: BBox;
|
|
18
|
+
get positionAbsolute(): XYPoint;
|
|
19
|
+
set positionAbsolute(pos: XYPoint);
|
|
20
|
+
get dimensions(): Dimensions;
|
|
21
|
+
get diff(): XYPoint;
|
|
26
22
|
get isMoved(): boolean;
|
|
27
|
-
get
|
|
23
|
+
get isResized(): boolean;
|
|
24
|
+
get position(): XYPoint;
|
|
28
25
|
protected abstract parent: CompoundRect | null;
|
|
29
26
|
constructor(xynode: InternalNode, parent?: CompoundRect | null);
|
|
30
27
|
}
|
|
@@ -41,6 +38,9 @@ export declare function createLayoutConstraints(xyflowApi: XYStoreApi, editingNo
|
|
|
41
38
|
rects: ReadonlyMap<string, Leaf | CompoundRect>;
|
|
42
39
|
onMove: () => void;
|
|
43
40
|
updateXYFlow: () => void;
|
|
41
|
+
hasChanges: () => boolean;
|
|
42
|
+
cancelPending: () => void;
|
|
43
|
+
flushPending: () => void;
|
|
44
44
|
};
|
|
45
45
|
type LayoutConstraints = {
|
|
46
46
|
onNodeDragStart: OnNodeDrag<Types.Node>;
|