@likec4/diagram 1.60.0 → 1.61.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 +63 -11
- package/dist/LikeC4Diagram.d.mts +4 -6
- package/dist/LikeC4Diagram.mjs +13 -12
- package/dist/LikeC4Diagram.props.d.mts +5 -7
- package/dist/LikeC4MantineProvider.d.mts +1 -2
- package/dist/LikeC4MantineProvider.mjs +26 -11
- package/dist/LikeC4ModelProvider.d.mts +1 -3
- package/dist/LikeC4ModelProvider.mjs +1 -2
- package/dist/LikeC4ProjectsOverview.d.mts +1 -3
- package/dist/LikeC4ProjectsOverview.mjs +1 -2
- package/dist/LikeC4ProjectsProvider.d.mts +1 -2
- package/dist/LikeC4ProjectsProvider.mjs +2 -3
- package/dist/LikeC4Styles.d.mts +1 -2
- package/dist/LikeC4Styles.mjs +11 -6
- package/dist/LikeC4View.d.mts +3 -5
- package/dist/LikeC4View.mjs +12 -11
- package/dist/ReactLikeC4.d.mts +3 -5
- package/dist/ReactLikeC4.mjs +8 -7
- package/dist/StaticLikeC4Diagram.d.mts +1 -3
- package/dist/StaticLikeC4Diagram.mjs +1 -2
- package/dist/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/base/Background.mjs +1 -2
- package/dist/base/Base.d.mts +1 -2
- package/dist/base/Base.mjs +1 -2
- package/dist/base/BaseXYFlow.mjs +12 -10
- package/dist/base/const.d.mts +1 -3
- package/dist/base/const.mjs +1 -2
- package/dist/base/keyboardZoom.mjs +1 -2
- package/dist/base/types.d.mts +2 -4
- package/dist/base/updateEdges.mjs +1 -2
- package/dist/base/updateNodes.mjs +1 -2
- package/dist/base-primitives/Markdown.d.mts +5 -5
- package/dist/base-primitives/Markdown.mjs +22 -11
- package/dist/base-primitives/NodeHandles.d.mts +1 -3
- package/dist/base-primitives/NodeHandles.mjs +1 -2
- package/dist/base-primitives/compound/CompoundActionButton.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundActionButton.mjs +3 -4
- package/dist/base-primitives/compound/CompoundDetailsButton.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.mjs +3 -4
- package/dist/base-primitives/compound/CompoundNodeContainer.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundNodeContainer.mjs +1 -2
- package/dist/base-primitives/compound/CompoundTitle.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundTitle.mjs +1 -2
- package/dist/base-primitives/compound/actionbtns.css.mjs +1 -2
- package/dist/base-primitives/edge/EdgeActionButton.mjs +2 -3
- package/dist/base-primitives/edge/EdgeContainer.mjs +2 -3
- package/dist/base-primitives/edge/EdgeLabel.mjs +3 -3
- package/dist/base-primitives/edge/EdgeLabelContainer.mjs +2 -3
- package/dist/base-primitives/edge/EdgeMarkers.mjs +1 -2
- package/dist/base-primitives/edge/EdgePath.mjs +1 -2
- package/dist/base-primitives/element/ElementActionButtons.d.mts +1 -2
- package/dist/base-primitives/element/ElementActionButtons.mjs +2 -3
- package/dist/base-primitives/element/ElementData.d.mts +1 -2
- package/dist/base-primitives/element/ElementData.mjs +1 -2
- package/dist/base-primitives/element/ElementDetailsButton.d.mts +1 -2
- package/dist/base-primitives/element/ElementDetailsButton.mjs +2 -3
- package/dist/base-primitives/element/ElementNodeContainer.d.mts +1 -2
- package/dist/base-primitives/element/ElementNodeContainer.mjs +2 -3
- package/dist/base-primitives/element/ElementShape.d.mts +11 -6
- package/dist/base-primitives/element/ElementShape.mjs +10 -5
- package/dist/base-primitives/element/ElementTags.d.mts +6 -3
- package/dist/base-primitives/element/ElementTags.mjs +2 -4
- package/dist/base-primitives/index.d.mts +5 -5
- package/dist/base-primitives/memoEdge.d.mts +2 -6
- package/dist/base-primitives/memoEdge.mjs +1 -2
- package/dist/base-primitives/memoNode.d.mts +2 -6
- package/dist/components/EmptyBox.mjs +1 -2
- package/dist/components/ErrorFallback.d.mts +4 -3
- package/dist/components/ErrorFallback.mjs +61 -56
- package/dist/components/FloatingWindow.mjs +3 -4
- package/dist/components/GithubIcon.mjs +1 -2
- package/dist/components/Link.mjs +3 -4
- package/dist/components/Logo.d.mts +3 -5
- package/dist/components/Logo.mjs +28 -35
- package/dist/components/NavigationLink.mjs +1 -2
- package/dist/components/NavigationPanel.mjs +11 -11
- package/dist/components/PortalToContainer.d.mts +1 -3
- package/dist/components/PortalToContainer.mjs +1 -2
- package/dist/components/RootContainer.mjs +1 -2
- package/dist/components/SearchControl.css.mjs +1 -2
- package/dist/components/SearchControl.d.mts +1 -2
- package/dist/components/SearchControl.mjs +2 -3
- package/dist/components/ViewIcon.mjs +5 -6
- package/dist/components/ViewNotFound.mjs +1 -2
- package/dist/components/markdown/MarkdownWithRefs.mjs +268 -0
- package/dist/components/markdown/markdown-refs.mjs +145 -0
- package/dist/components/markdown/useMarkdownRefsInteractivity.mjs +126 -0
- package/dist/context/ComparingLayoutsContext.mjs +24 -0
- package/dist/context/CurrentViewModelProvider.mjs +1 -2
- package/dist/context/DiagramEventHandlers.mjs +3 -4
- package/dist/context/DiagramFeatures.d.mts +2 -3
- package/dist/context/DiagramFeatures.mjs +15 -9
- package/dist/context/EnsureMantine.mjs +1 -2
- package/dist/context/FramerMotionConfig.d.mts +1 -3
- package/dist/context/FramerMotionConfig.mjs +1 -2
- package/dist/context/IconRenderer.d.mts +1 -3
- package/dist/context/IconRenderer.mjs +14 -14
- package/dist/context/LikeC4ModelContext.d.mts +1 -2
- package/dist/context/LikeC4ModelContext.mjs +1 -2
- package/dist/context/LikeC4ProjectsContext.d.mts +1 -3
- package/dist/context/LikeC4ProjectsContext.mjs +1 -2
- package/dist/context/RootContainerContext.mjs +1 -2
- package/dist/context/TagStylesContext.d.mts +1 -2
- package/dist/context/TagStylesContext.mjs +7 -19
- package/dist/custom/builtins.d.mts +4 -1
- package/dist/custom/customNodes.d.mts +164 -7
- package/dist/custom/customNodes.mjs +387 -8
- package/dist/custom/index.d.mts +18 -30
- package/dist/custom/index.mjs +11 -19
- package/dist/custom/primitives.d.mts +3 -5
- package/dist/customization/CustomizationContext.d.mts +50 -0
- package/dist/customization/CustomizationContext.mjs +64 -0
- package/dist/customization/customizable.d.mts +32 -0
- package/dist/customization/customizable.mjs +75 -0
- package/dist/customization/customization-types.d.mts +40 -0
- package/dist/customization/customization-types.mjs +8 -0
- package/dist/customization/stableComponents.mjs +35 -0
- package/dist/editor/LikeC4EditorCallbacks.d.mts +1 -3
- package/dist/editor/LikeC4EditorCallbacks.mjs +1 -2
- package/dist/editor/LikeC4EditorProvider.d.mts +1 -3
- package/dist/editor/LikeC4EditorProvider.mjs +1 -2
- package/dist/editor/actor/actions.mjs +2 -3
- package/dist/editor/actor/hotkey.d.mts +1 -3
- package/dist/editor/actor/hotkey.mjs +1 -2
- package/dist/editor/actor/machine.d.mts +2 -4
- package/dist/editor/actor/machine.mjs +1 -2
- package/dist/editor/actor/setup.d.mts +1 -2
- package/dist/editor/actor/setup.mjs +1 -2
- package/dist/editor/actor/state.editor.mjs +2 -3
- package/dist/editor/actor/state.sync-queue.mjs +2 -3
- package/dist/editor/actor/types.d.mts +1 -3
- package/dist/editor/actor/types.mjs +1 -2
- package/dist/editor/applyChangesToManualLayout.mjs +1 -2
- package/dist/editor/index.d.mts +1 -1
- package/dist/editor/useEditorActorLogic.mjs +3 -4
- package/dist/hooks/safeContext.d.mts +16 -35
- package/dist/hooks/safeContext.mjs +1 -2
- package/dist/hooks/useCallbackRef.mjs +1 -2
- package/dist/hooks/useCurrentView.d.mts +1 -3
- package/dist/hooks/useCurrentView.mjs +1 -2
- package/dist/hooks/useCurrentViewModel.d.mts +0 -2
- package/dist/hooks/useCurrentViewModel.mjs +1 -2
- package/dist/hooks/useDiagram.d.mts +3 -12
- package/dist/hooks/useDiagram.mjs +11 -10
- package/dist/hooks/useDiagramCompareLayout.d.mts +2 -4
- package/dist/hooks/useDiagramCompareLayout.mjs +12 -21
- package/dist/hooks/useDiagramMarkdownRefActions.mjs +35 -0
- package/dist/hooks/useEdgeLabelFontLoader.mjs +29 -0
- package/dist/hooks/useEdgeTracks.mjs +2 -3
- package/dist/hooks/useEditorActor.mjs +1 -2
- package/dist/hooks/useId.mjs +1 -2
- package/dist/hooks/useLikeC4ElementsTree.mjs +1 -2
- package/dist/hooks/useLikeC4Model.d.mts +0 -2
- package/dist/hooks/useLikeC4Model.mjs +1 -2
- package/dist/hooks/useLikeC4Project.d.mts +2 -4
- package/dist/hooks/useLikeC4Project.mjs +1 -2
- package/dist/hooks/useLikeC4Styles.d.mts +1 -3
- package/dist/hooks/useLikeC4Styles.mjs +1 -2
- package/dist/hooks/useMantinePortalProps.mjs +1 -2
- package/dist/hooks/useSetState.mjs +1 -2
- package/dist/hooks/useUpdateEffect.d.mts +0 -2
- package/dist/hooks/useUpdateEffect.mjs +1 -2
- package/dist/hooks/useXYFlow.d.mts +1 -3
- package/dist/hooks/useXYFlow.mjs +1 -2
- package/dist/index.d.mts +20 -18
- package/dist/index.mjs +20 -18
- package/dist/likec4diagram/DiagramUI.mjs +14 -11
- package/dist/likec4diagram/DiagramXYFlow.mjs +34 -34
- package/dist/likec4diagram/convert-to-xyflow.mjs +7 -3
- package/dist/likec4diagram/custom/edges/EdgeDrifts.mjs +4 -3
- package/dist/likec4diagram/custom/edges/RelationshipEdge.mjs +18 -14
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.mjs +3 -4
- package/dist/likec4diagram/custom/edges/useControlPoints.mjs +2 -3
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.mjs +2 -3
- package/dist/likec4diagram/custom/index.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.mts +1 -2
- package/dist/likec4diagram/custom/nodes/CompoundActions.mjs +2 -3
- package/dist/likec4diagram/custom/nodes/ElementActions.d.mts +3 -4
- package/dist/likec4diagram/custom/nodes/ElementActions.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/GraphElementNode.d.mts +6 -1
- package/dist/likec4diagram/custom/nodes/GraphElementNode.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.mts +6 -1
- package/dist/likec4diagram/custom/nodes/NodeDrifts.mjs +4 -3
- package/dist/likec4diagram/custom/nodes/NodeNotes.mjs +3 -5
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.mts +3 -1
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/index.d.mts +4 -4
- package/dist/likec4diagram/custom/nodes/nodes.d.mts +3 -4
- package/dist/likec4diagram/custom/nodes/nodes.mjs +19 -21
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.mjs +4 -6
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/types.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.mjs +1 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.mjs +29 -12
- package/dist/likec4diagram/relationship-popover/actor.mjs +1 -2
- package/dist/likec4diagram/relationship-popover/components.mjs +1 -2
- package/dist/likec4diagram/state/DiagramActorProvider.mjs +22 -34
- package/dist/likec4diagram/state/aligners.d.mts +1 -3
- package/dist/likec4diagram/state/aligners.mjs +1 -2
- package/dist/likec4diagram/state/assign.mjs +3 -4
- package/dist/likec4diagram/state/createViewChange.mjs +1 -2
- package/dist/likec4diagram/state/diagram-api.d.mts +33 -16
- package/dist/likec4diagram/state/diagram-api.mjs +55 -31
- package/dist/likec4diagram/state/hotkeyActor.d.mts +1 -3
- package/dist/likec4diagram/state/hotkeyActor.mjs +12 -6
- package/dist/likec4diagram/state/machine.actions.layout.mjs +2 -3
- package/dist/likec4diagram/state/machine.actions.mjs +81 -44
- package/dist/likec4diagram/state/machine.d.mts +107 -15
- package/dist/likec4diagram/state/machine.mjs +3 -4
- package/dist/likec4diagram/state/machine.setup.d.mts +14 -10
- package/dist/likec4diagram/state/machine.setup.mjs +55 -28
- package/dist/likec4diagram/state/machine.state.initializing.mjs +3 -4
- package/dist/likec4diagram/state/machine.state.navigating.mjs +3 -6
- package/dist/likec4diagram/state/machine.state.ready.comparing.mjs +63 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.mjs +10 -7
- package/dist/likec4diagram/state/machine.state.ready.idle.mjs +10 -7
- package/dist/likec4diagram/state/machine.state.ready.mjs +8 -8
- package/dist/likec4diagram/state/machine.state.ready.printing.mjs +3 -4
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.mjs +5 -6
- package/dist/likec4diagram/state/mediaPrintActor.d.mts +1 -3
- package/dist/likec4diagram/state/mediaPrintActor.mjs +1 -2
- package/dist/likec4diagram/state/persistence.mjs +12 -5
- package/dist/likec4diagram/state/types.d.mts +1 -3
- package/dist/likec4diagram/state/utils.mjs +2 -3
- package/dist/likec4diagram/types.d.mts +1 -3
- package/dist/likec4diagram/ui/FloatingSequenceActors.mjs +5 -7
- package/dist/likec4diagram/ui/notation/NotationPanel.css.mjs +1 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.mjs +6 -7
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.mjs +2 -3
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.mjs +3 -4
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.mjs +4 -7
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.mjs +4 -5
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.mjs +4 -6
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.mjs +2 -3
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/StepRow.mjs +7 -8
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.mjs +3 -9
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/motion.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/presentation.mjs +7 -8
- package/dist/likec4diagram/ui/sequence-outline/tree.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/types.mjs +1 -2
- package/dist/likec4diagram/useLayoutConstraints.mjs +5 -10
- package/dist/likec4diagram/useNodeDragHandlers.mjs +28 -0
- package/dist/likec4diagram/xyflow-diagram/diagram-view.mjs +9 -2
- package/dist/likec4diagram/xyflow-graph/graph-view-to-xy.mjs +1 -2
- package/dist/likec4diagram/xyflow-graph/useGraphForceSimulation.mjs +3 -6
- package/dist/likec4diagram/xyflow-props.mjs +25 -0
- package/dist/likec4diagram/xyflow-sequence/const.mjs +1 -2
- package/dist/likec4diagram/xyflow-sequence/layouter.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-view.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/utils.mjs +1 -2
- package/dist/navigationpanel/ElementViewControls.mjs +6 -7
- package/dist/navigationpanel/NavigationPanel.mjs +38 -67
- package/dist/navigationpanel/NavigationPanelControls.mjs +35 -114
- package/dist/navigationpanel/NavigationPanelDropdown.mjs +37 -34
- package/dist/navigationpanel/_common.mjs +3 -4
- package/dist/navigationpanel/actor.actions.mjs +1 -2
- package/dist/navigationpanel/actor.d.mts +0 -2
- package/dist/navigationpanel/actor.mjs +2 -3
- package/dist/navigationpanel/actor.setup.d.mts +1 -3
- package/dist/navigationpanel/actor.setup.mjs +1 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.mjs +160 -90
- package/dist/navigationpanel/comparepanel/DriftsSummary.mjs +173 -142
- package/dist/{likec4diagram/ui → navigationpanel/comparepanel}/LayoutDriftFrame.mjs +6 -12
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.mjs +14 -19
- package/dist/navigationpanel/controls/LayoutWarning.mjs +3 -4
- package/dist/navigationpanel/controls/LogoButton.mjs +5 -23
- package/dist/navigationpanel/controls/NavigationBreadcrumbs.mjs +110 -0
- package/dist/navigationpanel/controls/NavigationButtons.mjs +3 -4
- package/dist/navigationpanel/controls/OpenSource.mjs +2 -3
- package/dist/navigationpanel/controls/SearchControl.mjs +2 -3
- package/dist/navigationpanel/controls/ToggleReadonly.mjs +36 -21
- package/dist/navigationpanel/controls/ViewDetailsButton.mjs +12 -15
- package/dist/navigationpanel/dropdown/ProjectsMenu.mjs +46 -13
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.mjs +3 -4
- package/dist/navigationpanel/editorpanel/CenterCamera.mjs +2 -3
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.mjs +3 -4
- package/dist/navigationpanel/editorpanel/EditorPanel.mjs +4 -4
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.mjs +11 -13
- package/dist/navigationpanel/editorpanel/ToggleReadonly.mjs +2 -3
- package/dist/navigationpanel/editorpanel/_common.mjs +1 -2
- package/dist/navigationpanel/editorpanel/styles.mjs +1 -2
- package/dist/navigationpanel/hooks.mjs +1 -2
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.mjs +5 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.mjs +7 -9
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.mjs +1 -2
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.mjs +3 -4
- package/dist/navigationpanel/windows/ViewDetailsWindow.mjs +44 -38
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowFork.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowGuide.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.mjs +1 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCaretRightFilled.mjs +16 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCornerDownRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStop.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRepeat.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRobot.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSparkles.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.mjs +1 -2
- package/dist/overlays/Overlays.mjs +4 -5
- package/dist/overlays/element-details/ElementDetails.mjs +2 -3
- package/dist/overlays/element-details/ElementDetailsCard.css.mjs +148 -102
- package/dist/overlays/element-details/ElementDetailsCard.mjs +503 -256
- package/dist/overlays/element-details/MetadataValue.mjs +115 -222
- package/dist/overlays/element-details/PropertiesSplit.mjs +162 -0
- package/dist/overlays/element-details/TabPanelDeployments.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelDeployments.mjs +5 -6
- package/dist/overlays/element-details/TabPanelRelationships.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelRelationships.mjs +6 -7
- package/dist/overlays/element-details/TabPanelStructure.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelStructure.mjs +3 -4
- package/dist/overlays/element-details/TabPanelViews.mjs +51 -0
- package/dist/overlays/element-details/actor.d.mts +6 -7
- package/dist/overlays/element-details/actor.mjs +31 -15
- package/dist/overlays/element-details/actorContext.mjs +1 -2
- package/dist/overlays/element-details/subject.d.mts +12 -0
- package/dist/overlays/element-details/subject.mjs +15 -0
- package/dist/overlays/hooks.mjs +1 -2
- package/dist/overlays/overlay/Overlay.d.mts +1 -3
- package/dist/overlays/overlay/Overlay.mjs +4 -5
- package/dist/overlays/overlaysActor.d.mts +12 -5
- package/dist/overlays/overlaysActor.mjs +24 -6
- package/dist/overlays/relationship-details/RelationshipDetails.mjs +16 -8
- package/dist/overlays/relationship-details/SelectEdge.css.mjs +1 -2
- package/dist/overlays/relationship-details/SelectEdge.mjs +3 -4
- package/dist/overlays/relationship-details/_types.d.mts +6 -4
- package/dist/overlays/relationship-details/actor.d.mts +0 -2
- package/dist/overlays/relationship-details/actor.mjs +2 -3
- package/dist/overlays/relationship-details/compute.mjs +1 -2
- package/dist/overlays/relationship-details/custom/ElementActions.mjs +6 -7
- package/dist/overlays/relationship-details/custom/edgeTypes.mjs +8 -13
- package/dist/overlays/relationship-details/custom/nodeTypes.mjs +8 -6
- package/dist/overlays/relationship-details/hooks.mjs +1 -2
- package/dist/overlays/relationship-details/layout-to-xyflow.mjs +3 -3
- package/dist/overlays/relationship-details/layout.d.mts +1 -3
- package/dist/overlays/relationship-details/layout.mjs +39 -13
- package/dist/overlays/relationships-browser/RelationshipsBrowser.mjs +12 -13
- package/dist/overlays/relationships-browser/SelectElement.css.mjs +1 -2
- package/dist/overlays/relationships-browser/SelectElement.mjs +4 -5
- package/dist/overlays/relationships-browser/_types.d.mts +6 -4
- package/dist/overlays/relationships-browser/actor.d.mts +0 -2
- package/dist/overlays/relationships-browser/actor.mjs +4 -5
- package/dist/overlays/relationships-browser/const.mjs +1 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.mjs +6 -7
- package/dist/overlays/relationships-browser/custom/EmptyNode.mjs +1 -2
- package/dist/overlays/relationships-browser/custom/edgeTypes.mjs +14 -17
- package/dist/overlays/relationships-browser/custom/nodeTypes.mjs +12 -7
- package/dist/overlays/relationships-browser/hooks.mjs +1 -2
- package/dist/overlays/relationships-browser/layout.d.mts +1 -3
- package/dist/overlays/relationships-browser/layout.mjs +73 -24
- package/dist/overlays/relationships-browser/useViewToNodesEdges.mjs +2 -2
- package/dist/overlays/types.d.mts +5 -7
- package/dist/projects-overview/ProjectsOverview.d.mts +1 -3
- package/dist/projects-overview/ProjectsOverview.mjs +1 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.mts +1 -3
- package/dist/projects-overview/ProjectsOverviewXY.mjs +3 -4
- package/dist/projects-overview/actor.mjs +1 -2
- package/dist/projects-overview/context.mjs +1 -2
- package/dist/projects-overview/custom/edgeTypes.mjs +2 -3
- package/dist/projects-overview/custom/nodeTypes.mjs +3 -4
- package/dist/projects-overview/hooks.mjs +1 -2
- package/dist/projects-overview/layouted-to-xyflow.mjs +1 -2
- package/dist/projects-overview/panel/ProjectsOverviewPanel.mjs +1 -2
- package/dist/projects-overview/persistence.mjs +1 -2
- package/dist/search/Search.d.mts +1 -3
- package/dist/search/Search.mjs +13 -12
- package/dist/search/SearchContext.d.mts +1 -3
- package/dist/search/SearchContext.mjs +1 -2
- package/dist/search/XStateSearchAdapter.mjs +1 -2
- package/dist/search/components/ElementsColumn.css.mjs +1 -2
- package/dist/search/components/ElementsColumn.mjs +31 -9
- package/dist/search/components/PickView.mjs +3 -4
- package/dist/search/components/SearchByTags.mjs +3 -4
- package/dist/search/components/SearchInput.mjs +3 -4
- package/dist/search/components/ViewsColum.mjs +20 -20
- package/dist/search/components/ViewsColumn.css.mjs +1 -2
- package/dist/search/components/_shared.css.mjs +1 -2
- package/dist/search/components/styles.css.mjs +1 -2
- package/dist/search/components/utils.mjs +32 -3
- package/dist/search/fuzzy.mjs +27 -0
- package/dist/search/hooks.mjs +1 -2
- package/dist/search/metadata-search.mjs +32 -0
- package/dist/search/searchActor.d.mts +1 -3
- package/dist/search/searchActor.mjs +1 -2
- package/dist/shadowroot/ShadowRoot.mjs +8 -7
- package/dist/styles-font2.mjs +1 -2
- package/dist/styles-min.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles2.mjs +2 -3
- package/dist/utils/defineActors.d.mts +1 -3
- package/dist/utils/defineActors.mjs +1 -2
- package/dist/utils/edge-corners.mjs +2 -3
- package/dist/utils/edge-endpoints.mjs +1 -2
- package/dist/utils/edge-label.mjs +1 -2
- package/dist/utils/edge-path-through-label.mjs +51 -0
- package/dist/utils/edge-path.mjs +1 -2
- package/dist/utils/edge-tracks.mjs +1 -2
- package/dist/utils/filterProjects.d.mts +10 -0
- package/dist/utils/filterProjects.mjs +36 -0
- package/dist/utils/index.mjs +1 -0
- package/dist/utils/measure-edge-label.mjs +129 -0
- package/dist/utils/readableText.mjs +1 -2
- package/dist/utils/roundDpr.mjs +1 -2
- package/dist/utils/search-event.mjs +17 -0
- package/dist/utils/view-bounds.d.mts +1 -3
- package/dist/utils/view-bounds.mjs +1 -2
- package/dist/utils/view-routing.mjs +1 -2
- package/dist/utils/xyflow.mjs +2 -3
- package/dist/webcomponent/defineWebcomponent.d.mts +12 -0
- package/dist/webcomponent/defineWebcomponent.mjs +93 -0
- package/package.json +29 -26
- package/panda.buildinfo.json +211 -208
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/base-primitives/memoNode.mjs +0 -23
- package/dist/context/DiagramEventHandlers.d.mts +0 -11
- package/dist/custom/hooks.d.mts +0 -17
- package/dist/hooks/useSetState.d.mts +0 -10
- package/dist/likec4diagram/custom/edges/edges.css.mjs +0 -50
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.mjs +0 -69
- package/dist/navigationpanel/comparepanel/ComparePanelControls.mjs +0 -56
- package/dist/navigationpanel/styles.css.mjs +0 -23
- package/src/styles-font.css +0 -114
- package/src/styles-min.css +0 -2
- package/src/styles-xyflow.css +0 -1
- package/src/styles.css +0 -3
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { useCallbackRef } from "../../../hooks/useCallbackRef.mjs";
|
|
3
|
-
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
4
|
-
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
5
2
|
import { CompoundNodeContainer } from "../../../base-primitives/compound/CompoundNodeContainer.mjs";
|
|
6
3
|
import { CompoundTitle } from "../../../base-primitives/compound/CompoundTitle.mjs";
|
|
7
4
|
import { ElementData } from "../../../base-primitives/element/ElementData.mjs";
|
|
@@ -10,11 +7,14 @@ import { ElementNodeContainer } from "../../../base-primitives/element/ElementNo
|
|
|
10
7
|
import { ElementShape } from "../../../base-primitives/element/ElementShape.mjs";
|
|
11
8
|
import { ElementTags as ElementTags$1 } from "../../../base-primitives/element/ElementTags.mjs";
|
|
12
9
|
import { ElementActions } from "./ElementActions.mjs";
|
|
10
|
+
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
11
|
+
import { useCallbackRef } from "../../../hooks/useCallbackRef.mjs";
|
|
12
|
+
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
13
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { Handle } from "@xyflow/react";
|
|
15
15
|
import { Position as Position$1 } from "@xyflow/system";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// src/overlays/relationship-details/custom/nodeTypes.tsx
|
|
18
18
|
function ElementTags(props) {
|
|
19
19
|
const diagram = useDiagram();
|
|
20
20
|
return /* @__PURE__ */ jsx(ElementTags$1, {
|
|
@@ -30,7 +30,10 @@ const ElementDetailsButtonWithHandler = (props) => {
|
|
|
30
30
|
...props,
|
|
31
31
|
onClick: (e) => {
|
|
32
32
|
e.stopPropagation();
|
|
33
|
-
diagram.
|
|
33
|
+
diagram.openNodeDetails({
|
|
34
|
+
type: "element",
|
|
35
|
+
element: props.data.fqn
|
|
36
|
+
});
|
|
34
37
|
}
|
|
35
38
|
});
|
|
36
39
|
};
|
|
@@ -97,5 +100,4 @@ function CompoundPorts({ data }) {
|
|
|
97
100
|
}, id))] });
|
|
98
101
|
}
|
|
99
102
|
|
|
100
|
-
//#endregion
|
|
101
103
|
export { CompoundNode, CompoundPorts, ElementNode, ElementPorts };
|
|
@@ -5,7 +5,7 @@ import { shallowEqual } from "fast-equals";
|
|
|
5
5
|
import { nonNullable } from "@likec4/core";
|
|
6
6
|
import { useSelector } from "@xstate/react";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/overlays/relationship-details/hooks.ts
|
|
9
9
|
const RelationshipDetailsActorContext = createContext(null);
|
|
10
10
|
function useRelationshipDetailsActor() {
|
|
11
11
|
return nonNullable(useContext(RelationshipDetailsActorContext), "No RelationshipDetailsActorContext");
|
|
@@ -50,5 +50,4 @@ function useRelationshipDetails() {
|
|
|
50
50
|
}), [actor]);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
//#endregion
|
|
54
53
|
export { RelationshipDetailsActorContext, useRelationshipDetails, useRelationshipDetailsActor, useRelationshipDetailsState };
|
|
@@ -3,7 +3,7 @@ import { ZIndexes } from "../../base/const.mjs";
|
|
|
3
3
|
import { hasAtLeast } from "remeda";
|
|
4
4
|
import { Queue, nonNullable } from "@likec4/core";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/overlays/relationship-details/layout-to-xyflow.ts
|
|
7
7
|
function layoutResultToXYFlow(layout) {
|
|
8
8
|
const xynodes = [];
|
|
9
9
|
const xyedges = [];
|
|
@@ -92,7 +92,7 @@ function layoutResultToXYFlow(layout) {
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
for (const { source, target, relationId, label, technology, description, navigateTo = null, color = "gray", line = "dashed", ...edge } of layout.edges) {
|
|
95
|
+
for (const { source, target, relationId, label, labelBBox = null, technology, description, navigateTo = null, color = "gray", line = "dashed", ...edge } of layout.edges) {
|
|
96
96
|
const id = edge.id;
|
|
97
97
|
xyedges.push({
|
|
98
98
|
id,
|
|
@@ -105,6 +105,7 @@ function layoutResultToXYFlow(layout) {
|
|
|
105
105
|
data: {
|
|
106
106
|
relationId,
|
|
107
107
|
label,
|
|
108
|
+
labelBBox,
|
|
108
109
|
color,
|
|
109
110
|
navigateTo,
|
|
110
111
|
line,
|
|
@@ -120,5 +121,4 @@ function layoutResultToXYFlow(layout) {
|
|
|
120
121
|
};
|
|
121
122
|
}
|
|
122
123
|
|
|
123
|
-
//#endregion
|
|
124
124
|
export { layoutResultToXYFlow };
|
|
@@ -4,7 +4,6 @@ import "./compute.mjs";
|
|
|
4
4
|
import { DiagramEdge, DiagramNode, DiagramView, Fqn, MarkdownOrString, RelationId } from "@likec4/core/types";
|
|
5
5
|
import { LikeC4ViewModel } from "@likec4/core/model";
|
|
6
6
|
import { Except } from "type-fest";
|
|
7
|
-
//#region src/overlays/relationship-details/layout.d.ts
|
|
8
7
|
export type LayoutResult = {
|
|
9
8
|
nodes: LayoutResult.Node[];
|
|
10
9
|
edges: LayoutResult.Edge[];
|
|
@@ -23,5 +22,4 @@ export declare namespace LayoutResult {
|
|
|
23
22
|
targetHandle: string;
|
|
24
23
|
description: MarkdownOrString | null;
|
|
25
24
|
};
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
25
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { measureEdgeLabel } from "../../utils/measure-edge-label.mjs";
|
|
3
|
+
import { filter, find, isNumber, map, mapToObj, omit, pipe, prop, reduce, sortBy, tap } from "remeda";
|
|
3
4
|
import { DefaultMap, ifind, invariant } from "@likec4/core/utils";
|
|
4
5
|
import { exact, preferSummary } from "@likec4/core/types";
|
|
5
6
|
import { treeFromElements } from "@likec4/core/compute-view";
|
|
6
7
|
import dagre from "@dagrejs/dagre";
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
// src/overlays/relationship-details/layout.ts
|
|
9
10
|
/**
|
|
10
11
|
* All constants related to the layout
|
|
11
12
|
*/
|
|
@@ -17,7 +18,8 @@ const Sizes = {
|
|
|
17
18
|
},
|
|
18
19
|
edgeLabel: {
|
|
19
20
|
width: 220,
|
|
20
|
-
height: 55
|
|
21
|
+
height: 55,
|
|
22
|
+
labelpos: "c"
|
|
21
23
|
},
|
|
22
24
|
nodeWidth: 330,
|
|
23
25
|
nodeHeight: 180,
|
|
@@ -113,7 +115,7 @@ function applyDagreLayout(g) {
|
|
|
113
115
|
};
|
|
114
116
|
};
|
|
115
117
|
}
|
|
116
|
-
function layoutRelationshipDetails(data, scope) {
|
|
118
|
+
function layoutRelationshipDetails(data, scope, { withNavigateButtons = false } = {}) {
|
|
117
119
|
const g = createGraph();
|
|
118
120
|
const sources = createNodes("sources", data.sources, g);
|
|
119
121
|
const targets = createNodes("targets", data.targets, g);
|
|
@@ -123,9 +125,19 @@ function layoutRelationshipDetails(data, scope) {
|
|
|
123
125
|
const name = r.id;
|
|
124
126
|
g.node(source.id).outPorts.push(target.id);
|
|
125
127
|
g.node(target.id).inPorts.push(source.id);
|
|
126
|
-
|
|
128
|
+
const label = measureEdgeLabel({
|
|
129
|
+
label: r.title ?? "untitled",
|
|
130
|
+
technology: r.technology,
|
|
131
|
+
withActionButton: withNavigateButtons && !!r.navigateTo
|
|
132
|
+
});
|
|
133
|
+
g.setEdge(source.portId, target.portId, {
|
|
134
|
+
...Sizes.edgeLabel,
|
|
135
|
+
width: label.width,
|
|
136
|
+
height: label.height
|
|
137
|
+
}, name);
|
|
127
138
|
return {
|
|
128
139
|
name,
|
|
140
|
+
label,
|
|
129
141
|
source: source.id,
|
|
130
142
|
sourceHandle: source.id + "_out" + (g.node(source.id).outPorts.length - 1),
|
|
131
143
|
target: target.id,
|
|
@@ -141,10 +153,17 @@ function layoutRelationshipDetails(data, scope) {
|
|
|
141
153
|
if (edgeCount > 3) node.height = node.height + (edgeCount - 4) * 14;
|
|
142
154
|
}
|
|
143
155
|
const edgeCount = g.edgeCount();
|
|
144
|
-
if (edgeCount > 5)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
156
|
+
if (edgeCount > 5) {
|
|
157
|
+
const minWidth = edgeCount > 10 ? 800 : 400;
|
|
158
|
+
for (const edge of g.edges()) {
|
|
159
|
+
const config = g.edge(edge);
|
|
160
|
+
const width = config["width"];
|
|
161
|
+
g.setEdge(edge, {
|
|
162
|
+
...config,
|
|
163
|
+
width: Math.max(isNumber(width) ? width : 0, minWidth)
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
148
167
|
const dagreBounds = applyDagreLayout(g);
|
|
149
168
|
const _calculatedNodeBounds = pipe(nodeIds, filter((n) => n.id === n.portId), mapToObj((n) => [n.id, dagreBounds(n.id)]));
|
|
150
169
|
function nodeBounds(nodeId) {
|
|
@@ -257,8 +276,10 @@ function layoutRelationshipDetails(data, scope) {
|
|
|
257
276
|
const edge = g.edge(e);
|
|
258
277
|
const ename = e.name;
|
|
259
278
|
if (!ename) return acc;
|
|
260
|
-
const { name, source, target, relationship, sourceHandle, targetHandle } = find(edges, (e) => e.name === ename);
|
|
261
|
-
const
|
|
279
|
+
const { name, source, target, relationship, sourceHandle, targetHandle, label } = find(edges, (e) => e.name === ename);
|
|
280
|
+
const labelX = edge["x"];
|
|
281
|
+
const labelY = edge["y"];
|
|
282
|
+
invariant(isNumber(labelX) && isNumber(labelY), `dagre should place the label of ${name}`);
|
|
262
283
|
const navigateTo = relationship.navigateTo?.id ?? null;
|
|
263
284
|
const description = preferSummary(relationship.$relationship) ?? null;
|
|
264
285
|
const technology = relationship.technology ?? null;
|
|
@@ -268,7 +289,13 @@ function layoutRelationshipDetails(data, scope) {
|
|
|
268
289
|
sourceHandle,
|
|
269
290
|
target,
|
|
270
291
|
targetHandle,
|
|
271
|
-
label,
|
|
292
|
+
label: label.label,
|
|
293
|
+
labelBBox: {
|
|
294
|
+
x: Math.round(labelX - label.width / 2),
|
|
295
|
+
y: Math.round(labelY - label.height / 2),
|
|
296
|
+
width: label.width,
|
|
297
|
+
height: label.height
|
|
298
|
+
},
|
|
272
299
|
color: relationship.color,
|
|
273
300
|
description,
|
|
274
301
|
...navigateTo && { navigateTo },
|
|
@@ -283,5 +310,4 @@ function layoutRelationshipDetails(data, scope) {
|
|
|
283
310
|
};
|
|
284
311
|
}
|
|
285
312
|
|
|
286
|
-
//#endregion
|
|
287
313
|
export { layoutRelationshipDetails };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconAlertTriangle from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
3
|
-
import IconCheck from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
4
|
-
import IconChevronLeft from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
5
|
-
import IconChevronRight from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
6
|
-
import IconLink from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
7
|
-
import IconX from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
8
|
-
import { useCallbackRef as useCallbackRef$1 } from "../../hooks/useCallbackRef.mjs";
|
|
2
|
+
import IconAlertTriangle from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.mjs";
|
|
3
|
+
import IconCheck from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs";
|
|
4
|
+
import IconChevronLeft from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.mjs";
|
|
5
|
+
import IconChevronRight from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs";
|
|
6
|
+
import IconLink from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.mjs";
|
|
7
|
+
import IconX from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs";
|
|
9
8
|
import { BaseXYFlow } from "../../base/BaseXYFlow.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import { RelationshipsBrowserActorContext, useRelationshipsBrowser, useRelationshipsBrowserState } from "./hooks.mjs";
|
|
12
|
-
import { RelationshipEdge } from "./custom/edgeTypes.mjs";
|
|
13
|
-
import { EmptyNode } from "./custom/EmptyNode.mjs";
|
|
9
|
+
import { useCallbackRef as useCallbackRef$1 } from "../../hooks/useCallbackRef.mjs";
|
|
14
10
|
import { CompoundNode, ElementNode } from "./custom/nodeTypes.mjs";
|
|
11
|
+
import { EmptyNode } from "./custom/EmptyNode.mjs";
|
|
12
|
+
import { RelationshipEdge } from "./custom/edgeTypes.mjs";
|
|
13
|
+
import { RelationshipsBrowserActorContext, useRelationshipsBrowser, useRelationshipsBrowserState } from "./hooks.mjs";
|
|
14
|
+
import { useRelationshipsView } from "./layout.mjs";
|
|
15
15
|
import { SelectElement } from "./SelectElement.mjs";
|
|
16
16
|
import { cx } from "@likec4/styles/css";
|
|
17
17
|
import { memo, useEffect, useRef, useState } from "react";
|
|
@@ -22,7 +22,7 @@ import { ActionIcon, Group, Tooltip } from "@mantine/core";
|
|
|
22
22
|
import { AnimatePresence, LayoutGroup, m } from "motion/react";
|
|
23
23
|
import { useClipboard, useStateHistory } from "@mantine/hooks";
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
// src/overlays/relationships-browser/RelationshipsBrowser.tsx
|
|
26
26
|
const nodeTypes = {
|
|
27
27
|
element: ElementNode,
|
|
28
28
|
compound: CompoundNode,
|
|
@@ -342,5 +342,4 @@ const CopyLinkButton = ({ subjectId, scope }) => {
|
|
|
342
342
|
});
|
|
343
343
|
};
|
|
344
344
|
|
|
345
|
-
//#endregion
|
|
346
345
|
export { RelationshipsBrowser, buildRelationshipUrl };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { css } from "@likec4/styles/css";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/overlays/relationships-browser/SelectElement.css.ts
|
|
5
5
|
var SelectElement_css_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
label: () => label,
|
|
7
7
|
node: () => node,
|
|
@@ -11,5 +11,4 @@ const node = css({ margin: "0" });
|
|
|
11
11
|
const label = css({ _hover: { backgroundColor: "surface.hover" } });
|
|
12
12
|
const scrollArea = css({ maxHeight: ["[70vh]", "[calc(100cqh - 70px)]"] });
|
|
13
13
|
|
|
14
|
-
//#endregion
|
|
15
14
|
export { SelectElement_css_exports, label, node, scrollArea };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconChevronRight from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
3
|
-
import IconSelector from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
import IconChevronRight from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs";
|
|
3
|
+
import IconSelector from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.mjs";
|
|
4
4
|
import { useDiagramEventHandlers } from "../../context/DiagramEventHandlers.mjs";
|
|
5
|
+
import { useLikeC4ElementsTree } from "../../hooks/useLikeC4ElementsTree.mjs";
|
|
5
6
|
import { useLikeC4Model } from "../../hooks/useLikeC4Model.mjs";
|
|
6
7
|
import { useRelationshipsBrowser, useRelationshipsBrowserState } from "./hooks.mjs";
|
|
7
|
-
import { useLikeC4ElementsTree } from "../../hooks/useLikeC4ElementsTree.mjs";
|
|
8
8
|
import { SelectElement_css_exports, scrollArea } from "./SelectElement.css.mjs";
|
|
9
9
|
import { memo, useEffect, useRef } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { ancestorsFqn } from "@likec4/core";
|
|
12
12
|
import { ActionIcon, Box, Button, Group, Popover, PopoverDropdown, PopoverTarget, ScrollAreaAutosize, SegmentedControl, Text, Tooltip, Tree, useTree } from "@mantine/core";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/overlays/relationships-browser/SelectElement.tsx
|
|
15
15
|
const selector2 = (state) => {
|
|
16
16
|
const subjectExistsInScope = state.context.layouted?.subjectExistsInScope ?? false;
|
|
17
17
|
return {
|
|
@@ -198,5 +198,4 @@ const SelectElement = memo(() => {
|
|
|
198
198
|
});
|
|
199
199
|
});
|
|
200
200
|
|
|
201
|
-
//#endregion
|
|
202
201
|
export { SelectElement };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { BaseEdge, BaseEdgeData, BaseEdgeProps, BaseNode, BaseNodeData, BaseNodeProps, NonOptional } from "../../base/types.mjs";
|
|
3
3
|
import { FunctionComponent } from "react";
|
|
4
|
-
import { Color, DiagramNode, ExclusiveUnion, Fqn, IconUrl, NonEmptyArray, RelationId, RelationshipArrowType, RelationshipLineType, ViewId } from "@likec4/core/types";
|
|
4
|
+
import { BBox, Color, DiagramNode, ExclusiveUnion, Fqn, IconUrl, NonEmptyArray, RelationId, RelationshipArrowType, RelationshipLineType, ViewId } from "@likec4/core/types";
|
|
5
5
|
import { Simplify } from "type-fest";
|
|
6
|
-
//#region src/overlays/relationships-browser/_types.d.ts
|
|
7
6
|
export declare namespace RelationshipsBrowserTypes {
|
|
8
7
|
type Column = 'incomers' | 'subjects' | 'outgoers';
|
|
9
8
|
/**
|
|
@@ -53,6 +52,10 @@ export declare namespace RelationshipsBrowserTypes {
|
|
|
53
52
|
relations: NonEmptyArray<RelationId>;
|
|
54
53
|
color: Color;
|
|
55
54
|
label: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Label box placed by the layout, the edge goes through it
|
|
57
|
+
*/
|
|
58
|
+
labelBBox: BBox | null;
|
|
56
59
|
navigateTo: ViewId | null;
|
|
57
60
|
line: RelationshipLineType;
|
|
58
61
|
head?: RelationshipArrowType;
|
|
@@ -61,5 +64,4 @@ export declare namespace RelationshipsBrowserTypes {
|
|
|
61
64
|
}>;
|
|
62
65
|
type Edge = BaseEdge<EdgeData, 'relationship'>;
|
|
63
66
|
type EdgeProps = BaseEdgeProps<Edge>;
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
67
|
+
}
|
|
@@ -4,7 +4,6 @@ import { LayoutRelationshipsViewResult } from "./layout.mjs";
|
|
|
4
4
|
import { EdgeChange, NodeChange, ReactFlowInstance, ReactFlowState } from "@xyflow/react";
|
|
5
5
|
import { BBox, Fqn, ViewId } from "@likec4/core";
|
|
6
6
|
import { ActorRef, SnapshotFrom, StateMachine } from "xstate";
|
|
7
|
-
//#region src/overlays/relationships-browser/actor.d.ts
|
|
8
7
|
type XYFLowInstance = ReactFlowInstance<RelationshipsBrowserTypes.AnyNode, RelationshipsBrowserTypes.Edge>;
|
|
9
8
|
type XYStoreState = ReactFlowState<RelationshipsBrowserTypes.AnyNode, RelationshipsBrowserTypes.Edge>;
|
|
10
9
|
type XYStoreApi = {
|
|
@@ -99,5 +98,4 @@ type Tags = 'active';
|
|
|
99
98
|
export interface RelationshipsBrowserLogic extends StateMachine<Context, Events, {}, any, any, any, any, any, Tags, Input, any, any, any, any> {}
|
|
100
99
|
export type RelationshipsBrowserSnapshot = SnapshotFrom<RelationshipsBrowserLogic>;
|
|
101
100
|
export interface RelationshipsBrowserActorRef extends ActorRef<RelationshipsBrowserSnapshot, Events> {}
|
|
102
|
-
//#endregion
|
|
103
101
|
export type { Input as RelationshipsBrowserInput };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { MinZoom, ZIndexes } from "../../base/const.mjs";
|
|
3
|
-
import { getNodeCenter } from "../../utils/xyflow.mjs";
|
|
4
2
|
import { Base } from "../../base/Base.mjs";
|
|
3
|
+
import { MinZoom, ZIndexes } from "../../base/const.mjs";
|
|
5
4
|
import { updateEdges } from "../../base/updateEdges.mjs";
|
|
6
5
|
import { updateNodes } from "../../base/updateNodes.mjs";
|
|
7
6
|
import { typedSystem } from "../../likec4diagram/state/utils.mjs";
|
|
7
|
+
import { getNodeCenter } from "../../utils/xyflow.mjs";
|
|
8
8
|
import { ViewPadding } from "./const.mjs";
|
|
9
9
|
import { viewToNodesEdge } from "./useViewToNodesEdges.mjs";
|
|
10
10
|
import { applyEdgeChanges, applyNodeChanges } from "@xyflow/react";
|
|
11
11
|
import { hasAtLeast, isNullish, omit } from "remeda";
|
|
12
|
-
import { delay, invariant, nonNullable } from "@likec4/core/utils";
|
|
13
12
|
import { getViewportForBounds as getViewportForBounds$1 } from "@xyflow/system";
|
|
13
|
+
import { delay, invariant, nonNullable } from "@likec4/core/utils";
|
|
14
14
|
import { assertEvent, assign, cancel, enqueueActions, fromPromise, raise, setup } from "xstate";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// src/overlays/relationships-browser/actor.ts
|
|
17
17
|
/**
|
|
18
18
|
* Root node in 'subjects' column
|
|
19
19
|
*/
|
|
@@ -375,5 +375,4 @@ const _relationshipsBrowserLogic = machine.createMachine({
|
|
|
375
375
|
});
|
|
376
376
|
const relationshipsBrowserLogic = _relationshipsBrowserLogic;
|
|
377
377
|
|
|
378
|
-
//#endregion
|
|
379
378
|
export { layouter, relationshipsBrowserLogic };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/overlays/relationships-browser/const.ts
|
|
2
2
|
const ViewPadding = {
|
|
3
3
|
top: "40px",
|
|
4
4
|
bottom: "22px",
|
|
@@ -6,5 +6,4 @@ const ViewPadding = {
|
|
|
6
6
|
right: "22px"
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
//#endregion
|
|
10
9
|
export { ViewPadding };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconFileSymlink from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
3
|
-
import IconTransform from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
4
|
-
import IconZoomScan from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
import IconFileSymlink from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.mjs";
|
|
3
|
+
import IconTransform from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.mjs";
|
|
4
|
+
import IconZoomScan from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.mjs";
|
|
5
|
+
import { ElementActionButtons } from "../../../base-primitives/element/ElementActionButtons.mjs";
|
|
5
6
|
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
6
|
-
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
7
7
|
import { useCurrentViewId } from "../../../hooks/useCurrentView.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
9
9
|
import { useRelationshipsBrowser, useRelationshipsBrowserState } from "../hooks.mjs";
|
|
10
10
|
import { useMemo } from "react";
|
|
11
11
|
import { jsx } from "react/jsx-runtime";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/overlays/relationships-browser/custom/ElementActions.tsx
|
|
14
14
|
const selectSubject = (state) => state.context.subject;
|
|
15
15
|
const ElementActions = (props) => {
|
|
16
16
|
const { enableNavigateTo, enableVscode } = useEnabledFeatures();
|
|
@@ -63,5 +63,4 @@ const ElementActions = (props) => {
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
//#endregion
|
|
67
66
|
export { ElementActions };
|
|
@@ -2,7 +2,7 @@ import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Box, Txt } from "@likec4/styles/jsx";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/overlays/relationships-browser/custom/EmptyNode.tsx
|
|
6
6
|
function EmptyNode({ data: { column } }) {
|
|
7
7
|
return /* @__PURE__ */ jsx(Box, {
|
|
8
8
|
css: {
|
|
@@ -23,5 +23,4 @@ function EmptyNode({ data: { column } }) {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
//#endregion
|
|
27
26
|
export { EmptyNode };
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
3
|
-
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
4
2
|
import { EdgeActionButton } from "../../../base-primitives/edge/EdgeActionButton.mjs";
|
|
5
3
|
import { EdgeContainer } from "../../../base-primitives/edge/EdgeContainer.mjs";
|
|
6
4
|
import { EdgeLabel } from "../../../base-primitives/edge/EdgeLabel.mjs";
|
|
7
5
|
import { EdgeLabelContainer } from "../../../base-primitives/edge/EdgeLabelContainer.mjs";
|
|
8
6
|
import { EdgePath } from "../../../base-primitives/edge/EdgePath.mjs";
|
|
9
7
|
import { memoEdge } from "../../../base-primitives/memoEdge.mjs";
|
|
10
|
-
import {
|
|
8
|
+
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
9
|
+
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
10
|
+
import { edgePathThroughLabel } from "../../../utils/edge-path-through-label.mjs";
|
|
11
|
+
import { useRelationshipsBrowser, useRelationshipsBrowserState } from "../hooks.mjs";
|
|
11
12
|
import { css } from "@likec4/styles/css";
|
|
12
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
14
|
import { Tooltip } from "@mantine/core";
|
|
14
|
-
import { getBezierPath } from "@xyflow/system";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// src/overlays/relationships-browser/custom/edgeTypes.tsx
|
|
17
17
|
const RelationshipEdge = memoEdge((props) => {
|
|
18
18
|
const browser = useRelationshipsBrowser();
|
|
19
|
+
const isGlobalScope = useRelationshipsBrowserState((state) => state.context.scope === "global");
|
|
19
20
|
const { enableNavigateTo } = useEnabledFeatures();
|
|
20
|
-
const { data: { navigateTo, relations, existsInCurrentView } } = props;
|
|
21
|
-
const [svgPath,
|
|
21
|
+
const { data: { navigateTo, relations, existsInCurrentView, labelBBox } } = props;
|
|
22
|
+
const [svgPath, labelPosition] = edgePathThroughLabel(props, labelBBox);
|
|
22
23
|
const diagram = useDiagram();
|
|
23
|
-
const
|
|
24
|
-
const
|
|
24
|
+
const isGrouped = relations.length > 1;
|
|
25
|
+
const isThick = isGrouped || !existsInCurrentView;
|
|
26
|
+
const edgeProps = isGlobalScope && isGrouped || !existsInCurrentView ? {
|
|
25
27
|
...props,
|
|
26
28
|
data: {
|
|
27
29
|
...props.data,
|
|
@@ -52,19 +54,14 @@ const RelationshipEdge = memoEdge((props) => {
|
|
|
52
54
|
children: [/* @__PURE__ */ jsx(EdgePath, {
|
|
53
55
|
edgeProps,
|
|
54
56
|
svgPath,
|
|
55
|
-
...
|
|
57
|
+
...isThick && { strokeWidth: 5 }
|
|
56
58
|
}), /* @__PURE__ */ jsx(EdgeLabelContainer, {
|
|
57
59
|
edgeProps,
|
|
58
|
-
labelPosition
|
|
59
|
-
|
|
60
|
-
y: labelY,
|
|
61
|
-
translate: "translate(-50%, 0)"
|
|
62
|
-
},
|
|
63
|
-
style: { maxWidth: Math.min(Math.abs(props.targetX - props.sourceX - 70), 250) },
|
|
60
|
+
labelPosition,
|
|
61
|
+
...!labelBBox && { style: { maxWidth: Math.min(Math.abs(props.targetX - props.sourceX - 70), 250) } },
|
|
64
62
|
children: label
|
|
65
63
|
})]
|
|
66
64
|
});
|
|
67
65
|
});
|
|
68
66
|
|
|
69
|
-
//#endregion
|
|
70
67
|
export { RelationshipEdge };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { useCallbackRef } from "../../../hooks/useCallbackRef.mjs";
|
|
3
|
-
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
4
|
-
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
5
2
|
import { CompoundDetailsButton } from "../../../base-primitives/compound/CompoundDetailsButton.mjs";
|
|
6
3
|
import { CompoundNodeContainer } from "../../../base-primitives/compound/CompoundNodeContainer.mjs";
|
|
7
4
|
import { CompoundTitle } from "../../../base-primitives/compound/CompoundTitle.mjs";
|
|
@@ -10,11 +7,14 @@ import { ElementDetailsButton } from "../../../base-primitives/element/ElementDe
|
|
|
10
7
|
import { ElementNodeContainer } from "../../../base-primitives/element/ElementNodeContainer.mjs";
|
|
11
8
|
import { ElementShape } from "../../../base-primitives/element/ElementShape.mjs";
|
|
12
9
|
import { ElementTags as ElementTags$1 } from "../../../base-primitives/element/ElementTags.mjs";
|
|
10
|
+
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
11
|
+
import { useCallbackRef } from "../../../hooks/useCallbackRef.mjs";
|
|
12
|
+
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
13
13
|
import { ElementActions } from "./ElementActions.mjs";
|
|
14
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
import { Handle, Position } from "@xyflow/react";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// src/overlays/relationships-browser/custom/nodeTypes.tsx
|
|
18
18
|
function ElementTags(props) {
|
|
19
19
|
const diagram = useDiagram();
|
|
20
20
|
return /* @__PURE__ */ jsx(ElementTags$1, {
|
|
@@ -30,7 +30,10 @@ const ElementDetailsButtonWithHandler = (props) => {
|
|
|
30
30
|
...props,
|
|
31
31
|
onClick: (e) => {
|
|
32
32
|
e.stopPropagation();
|
|
33
|
-
diagram.
|
|
33
|
+
diagram.openNodeDetails({
|
|
34
|
+
type: "element",
|
|
35
|
+
element: props.data.fqn
|
|
36
|
+
});
|
|
34
37
|
}
|
|
35
38
|
});
|
|
36
39
|
};
|
|
@@ -60,7 +63,10 @@ function CompoundNode(props) {
|
|
|
60
63
|
...props,
|
|
61
64
|
onClick: (e) => {
|
|
62
65
|
e.stopPropagation();
|
|
63
|
-
diagram.
|
|
66
|
+
diagram.openNodeDetails({
|
|
67
|
+
type: "element",
|
|
68
|
+
element: props.data.fqn
|
|
69
|
+
});
|
|
64
70
|
}
|
|
65
71
|
}),
|
|
66
72
|
/* @__PURE__ */ jsx(CompoundPorts, { ...props })
|
|
@@ -104,5 +110,4 @@ const CompoundPorts = ({ data }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
|
104
110
|
}
|
|
105
111
|
}, id))] });
|
|
106
112
|
|
|
107
|
-
//#endregion
|
|
108
113
|
export { CompoundNode, CompoundPorts, ElementNode, ElementPorts };
|
|
@@ -4,7 +4,7 @@ import { shallowEqual } from "fast-equals";
|
|
|
4
4
|
import { nonNullable } from "@likec4/core";
|
|
5
5
|
import { useSelector } from "@xstate/react";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/overlays/relationships-browser/hooks.ts
|
|
8
8
|
const RelationshipsBrowserActorContext = createContext(null);
|
|
9
9
|
function useRelationshipsBrowserActor() {
|
|
10
10
|
return nonNullable(useContext(RelationshipsBrowserActorContext), "No RelationshipsBrowserActorContext");
|
|
@@ -54,5 +54,4 @@ function useRelationshipsBrowser() {
|
|
|
54
54
|
}), [actor]);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
//#endregion
|
|
58
57
|
export { RelationshipsBrowserActorContext, useRelationshipsBrowser, useRelationshipsBrowserActor, useRelationshipsBrowserState };
|
|
@@ -3,7 +3,6 @@ import { RelationshipsBrowserTypes } from "./_types.mjs";
|
|
|
3
3
|
import { DiagramEdge, DiagramNode, DiagramView, ElementKind, Fqn, MarkdownOrString, ViewId } from "@likec4/core/types";
|
|
4
4
|
import { LikeC4ViewModel } from "@likec4/core/model";
|
|
5
5
|
import "@likec4/core/compute-view";
|
|
6
|
-
//#region src/overlays/relationships-browser/layout.d.ts
|
|
7
6
|
export type LayoutRelationshipsViewResult = {
|
|
8
7
|
subject: Fqn;
|
|
9
8
|
subjectExistsInScope: boolean;
|
|
@@ -26,5 +25,4 @@ export declare namespace LayoutRelationshipsViewResult {
|
|
|
26
25
|
targetHandle: string;
|
|
27
26
|
existsInCurrentView: boolean;
|
|
28
27
|
};
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
28
|
+
}
|