@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,5 +1,6 @@
|
|
|
1
|
-
import { DefaultMap, nonNullable
|
|
2
|
-
import {
|
|
1
|
+
import { DefaultMap, nonNullable } from '@likec4/core';
|
|
2
|
+
import { vector, BBox } from '@likec4/core/geometry';
|
|
3
|
+
import { invariant, isome } from '@likec4/core/utils';
|
|
3
4
|
import { getNodeDimensions } from '@xyflow/system';
|
|
4
5
|
import { produce } from 'immer';
|
|
5
6
|
import { useRef, useMemo } from 'react';
|
|
@@ -9,7 +10,6 @@ import 'fast-equals';
|
|
|
9
10
|
import { useDiagram } from '../hooks/safeContext.js';
|
|
10
11
|
import { nodeToRect, bezierControlPoints } from '../utils/xyflow.js';
|
|
11
12
|
import { useXYStoreApi } from '../hooks/useXYFlow.js';
|
|
12
|
-
import { vector } from '@likec4/core/geometry';
|
|
13
13
|
|
|
14
14
|
class Rect {
|
|
15
15
|
static LeftPadding = 42;
|
|
@@ -21,23 +21,17 @@ class Rect {
|
|
|
21
21
|
minY = Infinity;
|
|
22
22
|
maxX = -Infinity;
|
|
23
23
|
maxY = -Infinity;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
// Initial position absolute and dimensions
|
|
25
|
+
initial;
|
|
26
26
|
get positionAbsolute() {
|
|
27
27
|
return {
|
|
28
28
|
x: this.minX,
|
|
29
29
|
y: this.minY
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
get initialPositionAbsolute() {
|
|
33
|
-
return {
|
|
34
|
-
x: this.initialX,
|
|
35
|
-
y: this.initialY
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
32
|
set positionAbsolute(pos) {
|
|
39
|
-
const x = Math.
|
|
40
|
-
const y = Math.
|
|
33
|
+
const x = Math.trunc(pos.x);
|
|
34
|
+
const y = Math.trunc(pos.y);
|
|
41
35
|
this.maxX += x - this.minX;
|
|
42
36
|
this.maxY += y - this.minY;
|
|
43
37
|
this.minX = x;
|
|
@@ -45,18 +39,24 @@ class Rect {
|
|
|
45
39
|
}
|
|
46
40
|
get dimensions() {
|
|
47
41
|
return {
|
|
48
|
-
width: Math.
|
|
49
|
-
height: Math.
|
|
42
|
+
width: Math.ceil(this.maxX - this.minX),
|
|
43
|
+
height: Math.ceil(this.maxY - this.minY)
|
|
50
44
|
};
|
|
51
45
|
}
|
|
52
46
|
get diff() {
|
|
47
|
+
const { x, y } = this.positionAbsolute;
|
|
53
48
|
return {
|
|
54
|
-
x: Math.
|
|
55
|
-
y: Math.
|
|
49
|
+
x: Math.trunc(x - this.initial.x),
|
|
50
|
+
y: Math.trunc(y - this.initial.y)
|
|
56
51
|
};
|
|
57
52
|
}
|
|
58
53
|
get isMoved() {
|
|
59
|
-
|
|
54
|
+
const diff = this.diff;
|
|
55
|
+
return diff.x !== 0 || diff.y !== 0;
|
|
56
|
+
}
|
|
57
|
+
get isResized() {
|
|
58
|
+
const dim = this.dimensions;
|
|
59
|
+
return dim.width !== this.initial.width || dim.height !== this.initial.height;
|
|
60
60
|
}
|
|
61
61
|
// Position relative to parent
|
|
62
62
|
get position() {
|
|
@@ -79,8 +79,12 @@ class Rect {
|
|
|
79
79
|
const { width, height } = getNodeDimensions(xynode);
|
|
80
80
|
this.maxX = this.minX + Math.ceil(width);
|
|
81
81
|
this.maxY = this.minY + Math.ceil(height);
|
|
82
|
-
this.
|
|
83
|
-
|
|
82
|
+
this.initial = {
|
|
83
|
+
x: this.minX,
|
|
84
|
+
y: this.minY,
|
|
85
|
+
width: Math.ceil(width),
|
|
86
|
+
height: Math.ceil(height)
|
|
87
|
+
};
|
|
84
88
|
if (parent) {
|
|
85
89
|
parent.children.push(this);
|
|
86
90
|
}
|
|
@@ -125,14 +129,13 @@ function makeEdgeModifier(edge, anchor) {
|
|
|
125
129
|
x: pt.x + dx,
|
|
126
130
|
y: pt.y + dy
|
|
127
131
|
}));
|
|
132
|
+
} else {
|
|
133
|
+
draft.data.controlPoints = null;
|
|
128
134
|
}
|
|
129
135
|
if (edge.data.labelBBox) {
|
|
130
|
-
draft.data.labelBBox
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
width: edge.data.labelBBox.width,
|
|
134
|
-
height: edge.data.labelBBox.height
|
|
135
|
-
};
|
|
136
|
+
draft.data.labelBBox ??= edge.data.labelBBox;
|
|
137
|
+
draft.data.labelBBox.x = edge.data.labelBBox.x + dx;
|
|
138
|
+
draft.data.labelBBox.y = edge.data.labelBBox.y + dy;
|
|
136
139
|
}
|
|
137
140
|
})
|
|
138
141
|
};
|
|
@@ -160,14 +163,18 @@ function makeRelativeEdgeModifier(edge, movingRect, anchorNode, staticNode) {
|
|
|
160
163
|
}
|
|
161
164
|
const d = vector(dx, dy);
|
|
162
165
|
const relativePoint = (pt) => {
|
|
163
|
-
const
|
|
164
|
-
const staticToP =
|
|
166
|
+
const point = vector(pt);
|
|
167
|
+
const staticToP = point.subtract(staticV);
|
|
165
168
|
const projLength = staticToP.dot(staticToAnchor);
|
|
166
169
|
const coeff = clamp(projLength / staticToAnchorLength ** 2, {
|
|
167
170
|
min: -1,
|
|
168
171
|
max: 1
|
|
169
172
|
});
|
|
170
|
-
|
|
173
|
+
const newPoint = point.add(d.multiply(coeff)).trunc();
|
|
174
|
+
return {
|
|
175
|
+
x: newPoint.x,
|
|
176
|
+
y: newPoint.y
|
|
177
|
+
};
|
|
171
178
|
};
|
|
172
179
|
return {
|
|
173
180
|
id: edge.id,
|
|
@@ -245,41 +252,49 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
|
|
|
245
252
|
const rectsToUpdate = [...rects.values()];
|
|
246
253
|
const edgeModifiers = /* @__PURE__ */ new Map();
|
|
247
254
|
const findMovingAncestor = (nodeId) => {
|
|
248
|
-
|
|
255
|
+
const r = rects.get(nodeId);
|
|
256
|
+
if (r) {
|
|
257
|
+
return r;
|
|
258
|
+
}
|
|
259
|
+
for (const parent of ancestorsOf.get(nodeId)) {
|
|
260
|
+
const rect = rects.get(parent);
|
|
261
|
+
if (rect) {
|
|
262
|
+
return rect;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return null;
|
|
249
266
|
};
|
|
250
267
|
const movingNodes = new Set(editingNodeIds.flatMap((id) => [id, ...nestedOf.get(id)]));
|
|
251
268
|
for (const edge of edges) {
|
|
252
269
|
const isSourceMoving = movingNodes.has(edge.source);
|
|
253
270
|
const isTargetMoving = movingNodes.has(edge.target);
|
|
271
|
+
if (!isSourceMoving && !isTargetMoving) {
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
254
274
|
if (isSourceMoving && isTargetMoving) {
|
|
255
275
|
let r = rects.get(edge.source) ?? rects.get(edge.target) ?? findMovingAncestor(edge.source) ?? findMovingAncestor(edge.target);
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
276
|
+
invariant(!!r, "At least one of the edge nodes should have a moving ancestor");
|
|
277
|
+
edgeModifiers.set(edge, makeEdgeModifier(edge, r));
|
|
259
278
|
continue;
|
|
260
279
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
280
|
+
invariant(isSourceMoving !== isTargetMoving, "Logic error");
|
|
281
|
+
const movingRect = isSourceMoving ? findMovingAncestor(edge.source) : findMovingAncestor(edge.target);
|
|
282
|
+
invariant(!!movingRect, "Moving endpoint should be found");
|
|
283
|
+
const [sourceNode, targetNode] = pipe(
|
|
284
|
+
[edge.source, edge.target],
|
|
285
|
+
map((id) => nonNullable(nodeLookup.get(id), `Node ${id} not found`)),
|
|
286
|
+
map(nodeToRect)
|
|
287
|
+
);
|
|
288
|
+
const [anchorNode, staticNode] = isSourceMoving ? [sourceNode, targetNode] : [targetNode, sourceNode];
|
|
289
|
+
edgeModifiers.set(
|
|
290
|
+
edge,
|
|
291
|
+
makeRelativeEdgeModifier(
|
|
273
292
|
edge,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
)
|
|
280
|
-
);
|
|
281
|
-
continue;
|
|
282
|
-
}
|
|
293
|
+
movingRect,
|
|
294
|
+
anchorNode,
|
|
295
|
+
staticNode
|
|
296
|
+
)
|
|
297
|
+
);
|
|
283
298
|
}
|
|
284
299
|
function applyConstraints(targets) {
|
|
285
300
|
for (const r of targets) {
|
|
@@ -307,9 +322,25 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
|
|
|
307
322
|
}
|
|
308
323
|
const _edgeModifiers = [...edgeModifiers.values()];
|
|
309
324
|
function updateXYFlow() {
|
|
325
|
+
const { edgeLookup, triggerNodeChanges, triggerEdgeChanges, nodeLookup: nodeLookup2 } = xyflowApi.getState();
|
|
326
|
+
for (const id of editingNodeIds) {
|
|
327
|
+
const rect = rects.get(id);
|
|
328
|
+
if (!rect) {
|
|
329
|
+
console.warn(`Rect not found for id ${id}`);
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
const node = nodeLookup2.get(id);
|
|
333
|
+
if (!node) {
|
|
334
|
+
console.warn(`Node not found for id ${id}`);
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
rect.positionAbsolute = node.internals.positionAbsolute;
|
|
338
|
+
}
|
|
310
339
|
applyConstraints(rectsToUpdate);
|
|
311
|
-
const nodeUpdates =
|
|
312
|
-
|
|
340
|
+
const nodeUpdates = [];
|
|
341
|
+
const edgeUpdates = [];
|
|
342
|
+
for (const r of rectsToUpdate) {
|
|
343
|
+
nodeUpdates.push({
|
|
313
344
|
id: r.id,
|
|
314
345
|
type: "position",
|
|
315
346
|
dragging: false,
|
|
@@ -317,52 +348,52 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
|
|
|
317
348
|
positionAbsolute: r.positionAbsolute
|
|
318
349
|
});
|
|
319
350
|
if (r instanceof CompoundRect) {
|
|
320
|
-
|
|
351
|
+
nodeUpdates.push({
|
|
321
352
|
id: r.id,
|
|
322
353
|
type: "dimensions",
|
|
323
354
|
setAttributes: true,
|
|
355
|
+
resizing: false,
|
|
324
356
|
dimensions: r.dimensions
|
|
325
357
|
});
|
|
326
358
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
359
|
+
}
|
|
360
|
+
if (nodeUpdates.length > 0) {
|
|
361
|
+
triggerNodeChanges(nodeUpdates);
|
|
362
|
+
}
|
|
363
|
+
for (const fm of _edgeModifiers) {
|
|
364
|
+
edgeUpdates.push(fm(edgeLookup));
|
|
365
|
+
}
|
|
366
|
+
if (edgeUpdates.length > 0) {
|
|
367
|
+
triggerEdgeChanges(edgeUpdates);
|
|
334
368
|
}
|
|
335
369
|
}
|
|
336
370
|
let animationFrameId = null;
|
|
337
|
-
function
|
|
338
|
-
if (rectsToUpdate.length === 0) {
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
371
|
+
function cancelPending() {
|
|
341
372
|
if (animationFrameId !== null) {
|
|
342
373
|
cancelAnimationFrame(animationFrameId);
|
|
374
|
+
animationFrameId = null;
|
|
343
375
|
}
|
|
344
|
-
|
|
376
|
+
}
|
|
377
|
+
function flushPending() {
|
|
378
|
+
cancelPending();
|
|
379
|
+
updateXYFlow();
|
|
380
|
+
}
|
|
381
|
+
function onMove() {
|
|
382
|
+
animationFrameId ??= requestAnimationFrame(() => {
|
|
345
383
|
animationFrameId = null;
|
|
346
|
-
for (const id of editingNodeIds) {
|
|
347
|
-
const rect = rects.get(id);
|
|
348
|
-
if (!rect) {
|
|
349
|
-
console.warn(`Rect not found for id ${id}`);
|
|
350
|
-
continue;
|
|
351
|
-
}
|
|
352
|
-
const node = nodeLookup.get(id);
|
|
353
|
-
if (!node) {
|
|
354
|
-
console.warn(`Node not found for id ${id}`);
|
|
355
|
-
continue;
|
|
356
|
-
}
|
|
357
|
-
rect.positionAbsolute = node.internals.positionAbsolute;
|
|
358
|
-
}
|
|
359
384
|
updateXYFlow();
|
|
360
385
|
});
|
|
361
386
|
}
|
|
387
|
+
function hasChanges() {
|
|
388
|
+
return isome(rectsToUpdate, (r) => r.isMoved || r.isResized);
|
|
389
|
+
}
|
|
362
390
|
return {
|
|
363
391
|
rects,
|
|
364
392
|
onMove,
|
|
365
|
-
updateXYFlow
|
|
393
|
+
updateXYFlow,
|
|
394
|
+
hasChanges,
|
|
395
|
+
cancelPending,
|
|
396
|
+
flushPending
|
|
366
397
|
};
|
|
367
398
|
}
|
|
368
399
|
function useLayoutConstraints() {
|
|
@@ -372,7 +403,6 @@ function useLayoutConstraints() {
|
|
|
372
403
|
return useMemo(() => {
|
|
373
404
|
return {
|
|
374
405
|
onNodeDragStart: (_event, xynode) => {
|
|
375
|
-
diagram.startEditing("node");
|
|
376
406
|
const { nodeLookup } = xystore.getState();
|
|
377
407
|
const draggingNodes = pipe(
|
|
378
408
|
Array.from(nodeLookup.values()),
|
|
@@ -380,6 +410,7 @@ function useLayoutConstraints() {
|
|
|
380
410
|
map((n) => n.id)
|
|
381
411
|
);
|
|
382
412
|
if (hasAtLeast(draggingNodes, 1)) {
|
|
413
|
+
diagram.startEditing("node");
|
|
383
414
|
solverRef.current = createLayoutConstraints(xystore, draggingNodes);
|
|
384
415
|
}
|
|
385
416
|
},
|
|
@@ -387,8 +418,16 @@ function useLayoutConstraints() {
|
|
|
387
418
|
solverRef.current?.onMove();
|
|
388
419
|
},
|
|
389
420
|
onNodeDragStop: (_event) => {
|
|
390
|
-
|
|
391
|
-
|
|
421
|
+
if (!solverRef.current) {
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
const hasChanges = solverRef.current.hasChanges();
|
|
425
|
+
if (hasChanges) {
|
|
426
|
+
solverRef.current.flushPending();
|
|
427
|
+
} else {
|
|
428
|
+
solverRef.current.cancelPending();
|
|
429
|
+
}
|
|
430
|
+
diagram.stopEditing(hasChanges);
|
|
392
431
|
solverRef.current = void 0;
|
|
393
432
|
}
|
|
394
433
|
};
|
|
@@ -80,6 +80,7 @@ function diagramToXY(opts) {
|
|
|
80
80
|
x: node.x,
|
|
81
81
|
y: node.y,
|
|
82
82
|
drifts: node.drifts ?? null,
|
|
83
|
+
notes: node.notes,
|
|
83
84
|
viewLayoutDir
|
|
84
85
|
};
|
|
85
86
|
const leafNodeData = {
|
|
@@ -96,6 +97,7 @@ function diagramToXY(opts) {
|
|
|
96
97
|
style: node.style,
|
|
97
98
|
icon: node.icon ?? null,
|
|
98
99
|
tags: node.tags,
|
|
100
|
+
notes: node.notes,
|
|
99
101
|
x: node.x,
|
|
100
102
|
y: node.y,
|
|
101
103
|
isMultiple: node.style?.multiple ?? false,
|
|
@@ -46,7 +46,9 @@ function toCompoundArea({ id, x, y, width, height, depth }, node, view) {
|
|
|
46
46
|
depth,
|
|
47
47
|
isViewGroup: true,
|
|
48
48
|
drifts: node.drifts ?? null,
|
|
49
|
-
viewLayoutDir: "LR"
|
|
49
|
+
viewLayoutDir: "LR",
|
|
50
|
+
// Ignore notes for Compound nodes
|
|
51
|
+
notes: void 0
|
|
50
52
|
},
|
|
51
53
|
// zIndex: SeqZIndex.compound,
|
|
52
54
|
position: {
|
|
@@ -87,7 +89,9 @@ function toSeqParallelArea({ parallelPrefix, x, y, width, height }, view) {
|
|
|
87
89
|
viewId: view.id,
|
|
88
90
|
parallelPrefix,
|
|
89
91
|
drifts: null,
|
|
90
|
-
viewLayoutDir: "LR"
|
|
92
|
+
viewLayoutDir: "LR",
|
|
93
|
+
// Ignore notes for Parallel Area nodes
|
|
94
|
+
notes: void 0
|
|
91
95
|
},
|
|
92
96
|
zIndex: SeqZIndex.parallel,
|
|
93
97
|
position: {
|
|
@@ -131,6 +135,7 @@ function toSeqActorNode({ id, x, y, width, height, ports }, actor, bounds, view)
|
|
|
131
135
|
description: actor.description ?? null,
|
|
132
136
|
viewHeight: bounds.height,
|
|
133
137
|
viewId: view.id,
|
|
138
|
+
notes: actor.notes,
|
|
134
139
|
ports,
|
|
135
140
|
drifts: actor.drifts ?? null,
|
|
136
141
|
viewLayoutDir: "LR"
|
|
@@ -8,7 +8,7 @@ import * as m from 'motion/react-m';
|
|
|
8
8
|
import { memo, useEffect } from 'react';
|
|
9
9
|
import { useDiagram } from '../hooks/safeContext.js';
|
|
10
10
|
import { useCurrentView } from '../hooks/useCurrentView.js';
|
|
11
|
-
import { useOptionalCurrentViewModel } from '../
|
|
11
|
+
import { useOptionalCurrentViewModel } from '../context/LikeC4ModelContext.js';
|
|
12
12
|
import { useDiagramContext } from '../hooks/useDiagram.js';
|
|
13
13
|
import { useMantinePortalProps } from '../hooks/useMantinePortalProps.js';
|
|
14
14
|
import { navigationPanelActorLogic } from './actor.js';
|
|
@@ -41,7 +41,7 @@ const NavigationPanel = memo(() => {
|
|
|
41
41
|
}, [actorRef, diagram]);
|
|
42
42
|
useEffect(() => {
|
|
43
43
|
actorRef.send({ type: "update.inputs", inputs: { viewModel, view } });
|
|
44
|
-
}, [viewModel, view]);
|
|
44
|
+
}, [actorRef, viewModel, view]);
|
|
45
45
|
return /* @__PURE__ */ jsx(
|
|
46
46
|
VStack,
|
|
47
47
|
{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { VIEW_FOLDERS_SEPARATOR, normalizeViewPath } from '@likec4/core/model';
|
|
3
3
|
import { ifilter, ifirst, toArray, compareNaturalHierarchically, nonexhaustive } from '@likec4/core/utils';
|
|
4
|
-
import {
|
|
4
|
+
import { css, cx } from '@likec4/styles/css';
|
|
5
5
|
import { HStack, VStack, Box } from '@likec4/styles/jsx';
|
|
6
6
|
import { vstack, hstack } from '@likec4/styles/patterns';
|
|
7
|
-
import { PopoverDropdown, ScrollAreaAutosize, Input,
|
|
7
|
+
import { PopoverDropdown, ScrollAreaAutosize, Input, Button, rem, Divider, createScopedKeydownHandler, Highlight, UnstyledButton, Breadcrumbs } from '@mantine/core';
|
|
8
8
|
import { useThrottledCallback, useUncontrolled } from '@mantine/hooks';
|
|
9
9
|
import { useMountEffect } from '@react-hookz/web';
|
|
10
10
|
import { useSelector } from '@xstate/react';
|
|
@@ -12,18 +12,18 @@ import { shallowEqual, deepEqual } from 'fast-equals';
|
|
|
12
12
|
import { memo, useDeferredValue, useState, useEffect, useRef } from 'react';
|
|
13
13
|
import { isEmpty, pipe, sort, isArray } from 'remeda';
|
|
14
14
|
import { NavigationLink } from '../components/NavigationLink.js';
|
|
15
|
+
import { useOnDiagramEvent } from '../hooks/useDiagram.js';
|
|
15
16
|
import { useLikeC4Model } from '../hooks/useLikeC4Model.js';
|
|
16
17
|
import { ProjectsMenu } from './dropdown/ProjectsMenu.js';
|
|
17
18
|
import { useNavigationActor, useNavigationActorSnapshot, useNavigationActorContext, useNavigationActorRef } from './hooks.js';
|
|
18
19
|
import { breadcrumbTitle } from './styles.css.js';
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import IconFolderFilled from '../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js';
|
|
20
|
+
import IconSearch from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
|
|
21
|
+
import IconDirectionSignFilled from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js';
|
|
22
|
+
import IconStack2 from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js';
|
|
23
|
+
import IconZoomScan from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
24
|
+
import IconStarFilled from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js';
|
|
25
|
+
import IconFolderFilled from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js';
|
|
26
|
+
import IconChevronRight from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
|
|
27
27
|
|
|
28
28
|
const scopedKeydownHandler = createScopedKeydownHandler({
|
|
29
29
|
siblingSelector: "[data-likec4-focusable]",
|
|
@@ -240,7 +240,7 @@ function FoundedView({ view, highlight, ...props }) {
|
|
|
240
240
|
className: cx(
|
|
241
241
|
css({
|
|
242
242
|
_groupHover: {
|
|
243
|
-
color: "
|
|
243
|
+
color: "text.dimmed"
|
|
244
244
|
}
|
|
245
245
|
}),
|
|
246
246
|
inheritColor,
|
|
@@ -265,7 +265,7 @@ function FoundedView({ view, highlight, ...props }) {
|
|
|
265
265
|
className,
|
|
266
266
|
children: [
|
|
267
267
|
folderIcon,
|
|
268
|
-
/* @__PURE__ */ jsx(Breadcrumbs, { separator:
|
|
268
|
+
/* @__PURE__ */ jsx(Breadcrumbs, { separator: btnRightSection, separatorMargin: 3, children: breadcrumbs })
|
|
269
269
|
]
|
|
270
270
|
}
|
|
271
271
|
);
|
|
@@ -468,7 +468,7 @@ function SearchInput(props) {
|
|
|
468
468
|
}),
|
|
469
469
|
input: css({
|
|
470
470
|
_placeholder: {
|
|
471
|
-
color: "
|
|
471
|
+
color: "text.dimmed"
|
|
472
472
|
},
|
|
473
473
|
_focus: {
|
|
474
474
|
outline: "none"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx, css } from '@likec4/styles/css';
|
|
3
3
|
import { navigationPanelActionIcon } from '@likec4/styles/recipes';
|
|
4
|
-
import {
|
|
4
|
+
import { Tooltip as Tooltip$1, ActionIcon, ThemeIcon, Breadcrumbs } from '@mantine/core';
|
|
5
5
|
import * as m from 'motion/react-m';
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
|
-
import IconChevronRight from '../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
7
|
+
import IconChevronRight from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
|
|
8
8
|
|
|
9
9
|
const Tooltip = Tooltip$1.withProps({
|
|
10
10
|
color: "dark",
|
|
@@ -3,9 +3,9 @@ import { cx } from '@likec4/styles/css';
|
|
|
3
3
|
import { Box } from '@likec4/styles/jsx';
|
|
4
4
|
import { hstack } from '@likec4/styles/patterns';
|
|
5
5
|
import { Menu, UnstyledButton, Tooltip } from '@mantine/core';
|
|
6
|
-
import IconChevronDown from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
6
|
+
import IconChevronDown from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js';
|
|
7
7
|
import { stopPropagation } from '../../utils/xyflow.js';
|
|
8
|
-
import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
8
|
+
import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
|
|
9
9
|
|
|
10
10
|
function CompareActionsMenu({
|
|
11
11
|
disabled = false,
|