@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
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { ViewIcon } from "../../components/ViewIcon.mjs";
|
|
3
|
+
import { ViewButtonTitle, viewButton } from "./ElementDetailsCard.css.mjs";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { hasAtLeast, map, partition, pipe } from "remeda";
|
|
6
|
+
import { Divider, ScrollArea, Stack, UnstyledButton } from "@mantine/core";
|
|
7
|
+
import { isNonEmptyArray } from "@likec4/core/types";
|
|
8
|
+
import { Box as Box$1 } from "@likec4/styles/jsx";
|
|
9
|
+
import { isElementModel } from "@likec4/core/model";
|
|
10
|
+
|
|
11
|
+
// src/overlays/element-details/TabPanelViews.tsx
|
|
12
|
+
const Divider$1 = Divider.withProps({
|
|
13
|
+
mb: 8,
|
|
14
|
+
labelPosition: "left",
|
|
15
|
+
variant: "dashed"
|
|
16
|
+
});
|
|
17
|
+
function TabPanelViews({ elementModel, onNavigateTo }) {
|
|
18
|
+
const [viewsOf, otherViews] = pipe([...elementModel.views()], map((v) => v.$view), partition((v) => v._type === "element" && v.viewOf === elementModel.id));
|
|
19
|
+
return /* @__PURE__ */ jsx(ScrollArea, {
|
|
20
|
+
scrollbars: "y",
|
|
21
|
+
type: "auto",
|
|
22
|
+
children: /* @__PURE__ */ jsxs(Stack, {
|
|
23
|
+
gap: "lg",
|
|
24
|
+
children: [isNonEmptyArray(viewsOf) && /* @__PURE__ */ jsxs(Box$1, { children: [/* @__PURE__ */ jsx(Divider$1, { label: "views of the element (scoped)" }), /* @__PURE__ */ jsx(Stack, {
|
|
25
|
+
gap: "sm",
|
|
26
|
+
children: viewsOf.map((view) => /* @__PURE__ */ jsx(ViewButton, {
|
|
27
|
+
view,
|
|
28
|
+
onNavigateTo
|
|
29
|
+
}, view.id))
|
|
30
|
+
})] }), isNonEmptyArray(otherViews) && /* @__PURE__ */ jsxs(Box$1, { children: [/* @__PURE__ */ jsx(Divider$1, { label: isElementModel(elementModel) ? "views including this element" : "views including this deployment" }), /* @__PURE__ */ jsx(Stack, {
|
|
31
|
+
gap: "sm",
|
|
32
|
+
children: otherViews.map((view) => /* @__PURE__ */ jsx(ViewButton, {
|
|
33
|
+
view,
|
|
34
|
+
onNavigateTo
|
|
35
|
+
}, view.id))
|
|
36
|
+
})] })]
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
const ViewButton = ({ view, onNavigateTo }) => {
|
|
41
|
+
return /* @__PURE__ */ jsxs(UnstyledButton, {
|
|
42
|
+
className: viewButton,
|
|
43
|
+
onClick: (e) => {
|
|
44
|
+
e.stopPropagation();
|
|
45
|
+
onNavigateTo(view.id);
|
|
46
|
+
},
|
|
47
|
+
children: [/* @__PURE__ */ jsx(ViewIcon, { type: view._type }), /* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsx(ViewButtonTitle, { children: view.title || "untitled" }) })]
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export { TabPanelViews };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { RelationshipsBrowserActorRef } from "../relationships-browser/actor.mjs";
|
|
3
|
+
import { DetailsSubject } from "./subject.mjs";
|
|
3
4
|
import { Rect } from "@xyflow/system";
|
|
4
|
-
import { DiagramView,
|
|
5
|
+
import { DiagramView, NodeId } from "@likec4/core/types";
|
|
5
6
|
import { ActorRef, SnapshotFrom, StateMachine } from "xstate";
|
|
6
|
-
//#region src/overlays/element-details/actor.d.ts
|
|
7
7
|
export type ElementDetailsInput = {
|
|
8
|
-
subject:
|
|
8
|
+
subject: DetailsSubject;
|
|
9
9
|
currentView: DiagramView;
|
|
10
10
|
initiatedFrom?: {
|
|
11
11
|
node?: NodeId;
|
|
@@ -13,7 +13,7 @@ export type ElementDetailsInput = {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
export type Context = {
|
|
16
|
-
subject:
|
|
16
|
+
subject: DetailsSubject;
|
|
17
17
|
currentView: DiagramView;
|
|
18
18
|
initiatedFrom: {
|
|
19
19
|
node: NodeId | null;
|
|
@@ -22,7 +22,7 @@ export type Context = {
|
|
|
22
22
|
};
|
|
23
23
|
export type Events = {
|
|
24
24
|
type: 'change.subject';
|
|
25
|
-
subject:
|
|
25
|
+
subject: DetailsSubject;
|
|
26
26
|
} | {
|
|
27
27
|
type: 'close';
|
|
28
28
|
};
|
|
@@ -30,5 +30,4 @@ export interface ElementDetailsLogic extends StateMachine<Context, Events, {
|
|
|
30
30
|
[key: `${string}-relationships`]: RelationshipsBrowserActorRef | undefined;
|
|
31
31
|
}, any, any, any, any, any, never, ElementDetailsInput, any, any, any, any> {}
|
|
32
32
|
export type ElementDetailsSnapshot = SnapshotFrom<ElementDetailsLogic>;
|
|
33
|
-
export interface ElementDetailsActorRef extends ActorRef<ElementDetailsSnapshot, Events> {}
|
|
34
|
-
//#endregion
|
|
33
|
+
export interface ElementDetailsActorRef extends ActorRef<ElementDetailsSnapshot, Events> {}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { relationshipsBrowserLogic } from "../relationships-browser/actor.mjs";
|
|
3
|
-
import { assign,
|
|
3
|
+
import { assign, enqueueActions, setup } from "xstate";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/overlays/element-details/actor.ts
|
|
6
6
|
const _elementDetailsLogic = setup({
|
|
7
7
|
types: {
|
|
8
8
|
context: {},
|
|
@@ -23,20 +23,37 @@ const _elementDetailsLogic = setup({
|
|
|
23
23
|
initial: "active",
|
|
24
24
|
states: {
|
|
25
25
|
"active": {
|
|
26
|
-
entry:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
entry: enqueueActions(({ context, self, enqueue }) => {
|
|
27
|
+
if (context.subject.type === "element") enqueue.spawnChild("relationshipsBrowserLogic", {
|
|
28
|
+
id: `${self.id}-relationships`,
|
|
29
|
+
input: {
|
|
30
|
+
subject: context.subject.element,
|
|
31
|
+
viewId: context.currentView.id,
|
|
32
|
+
scope: "view",
|
|
33
|
+
enableSelectSubject: false,
|
|
34
|
+
enableChangeScope: true,
|
|
35
|
+
closeable: false
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}),
|
|
39
|
+
exit: enqueueActions(({ context, self, enqueue }) => {
|
|
40
|
+
if (context.subject.type === "element") {
|
|
41
|
+
enqueue.sendTo(`${self.id}-relationships`, { type: "close" });
|
|
42
|
+
enqueue.stopChild(`${self.id}-relationships`);
|
|
43
|
+
}
|
|
36
44
|
}),
|
|
37
|
-
exit: [sendTo(({ self }) => `${self.id}-relationships`, { type: "close" }), stopChild(({ self }) => `${self.id}-relationships`)],
|
|
38
45
|
on: {
|
|
39
|
-
"change.subject": {
|
|
46
|
+
"change.subject": {
|
|
47
|
+
target: "active",
|
|
48
|
+
reenter: true,
|
|
49
|
+
actions: assign({
|
|
50
|
+
subject: ({ event }) => event.subject,
|
|
51
|
+
initiatedFrom: ({ context }) => ({
|
|
52
|
+
node: null,
|
|
53
|
+
clientRect: context.initiatedFrom.clientRect
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
},
|
|
40
57
|
"close": "closed"
|
|
41
58
|
}
|
|
42
59
|
},
|
|
@@ -48,5 +65,4 @@ const _elementDetailsLogic = setup({
|
|
|
48
65
|
});
|
|
49
66
|
const elementDetailsLogic = _elementDetailsLogic;
|
|
50
67
|
|
|
51
|
-
//#endregion
|
|
52
68
|
export { elementDetailsLogic };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/overlays/element-details/actorContext.tsx
|
|
5
5
|
/**
|
|
6
6
|
* To improve experience with HMR, we use `createSafeContext` as a boundary for hooks
|
|
7
7
|
*/
|
|
@@ -13,5 +13,4 @@ const useElementDetailsActorRef = () => {
|
|
|
13
13
|
return ctx;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
//#endregion
|
|
17
16
|
export { ElementDetailsActorContext, useElementDetailsActorRef };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import "../../base/types.mjs";
|
|
3
|
+
import { DeploymentFqn, Fqn } from "@likec4/core";
|
|
4
|
+
export type DetailsSubject = {
|
|
5
|
+
type: 'element';
|
|
6
|
+
element: Fqn;
|
|
7
|
+
deployment?: never;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'deployment';
|
|
10
|
+
deployment: DeploymentFqn;
|
|
11
|
+
element?: never;
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
|
|
3
|
+
// src/overlays/element-details/subject.ts
|
|
4
|
+
function detailsSubject(data) {
|
|
5
|
+
if (data.deploymentFqn) return {
|
|
6
|
+
type: "deployment",
|
|
7
|
+
deployment: data.deploymentFqn
|
|
8
|
+
};
|
|
9
|
+
return data.modelFqn ? {
|
|
10
|
+
type: "element",
|
|
11
|
+
element: data.modelFqn
|
|
12
|
+
} : null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { detailsSubject };
|
package/dist/overlays/hooks.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createSafeContextForActor } from "../hooks/safeContext.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/overlays/hooks.ts
|
|
4
4
|
const { ContextProvider: OverlaysActorContext, selectSnapshot: selectOverlaysSnapshot, useActorSelector: useSelectOverlaysActor } = createSafeContextForActor("Overlays");
|
|
5
5
|
|
|
6
|
-
//#endregion
|
|
7
6
|
export { OverlaysActorContext, selectOverlaysSnapshot, useSelectOverlaysActor };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
|
-
//#region src/overlays/overlay/Overlay.d.ts
|
|
4
3
|
export type OverlayProps = PropsWithChildren<{
|
|
5
4
|
fullscreen?: boolean | undefined;
|
|
6
5
|
withBackdrop?: boolean | undefined;
|
|
@@ -50,5 +49,4 @@ export declare const Overlay: import("react").ForwardRefExoticComponent<{
|
|
|
50
49
|
onClick?: never;
|
|
51
50
|
} & {
|
|
52
51
|
children?: import("react").ReactNode | undefined;
|
|
53
|
-
} & import("react").RefAttributes<HTMLDialogElement>>;
|
|
54
|
-
//#endregion
|
|
52
|
+
} & import("react").RefAttributes<HTMLDialogElement>>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { stopPropagation } from "../../utils/xyflow.mjs";
|
|
3
3
|
import { cx } from "@likec4/styles/css";
|
|
4
|
-
import { forwardRef, useEffect,
|
|
4
|
+
import { forwardRef, useEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
6
6
|
import { useTimeoutEffect } from "@react-hookz/web";
|
|
7
|
-
import {
|
|
7
|
+
import { RemoveScroll } from "@mantine/core";
|
|
8
8
|
import { m, useIsPresent, useReducedMotionConfig } from "motion/react";
|
|
9
9
|
import { useFocusTrap, useMergedRef } from "@mantine/hooks";
|
|
10
10
|
import { overlay } from "@likec4/styles/recipes";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/overlays/overlay/Overlay.tsx
|
|
13
13
|
const backdropBlur = "--_blur";
|
|
14
14
|
const backdropOpacity = "--_opacity";
|
|
15
15
|
const cssVarLevel = "--_level";
|
|
@@ -43,7 +43,7 @@ const Overlay = forwardRef(({ onClose, className, classes, overlayLevel = 0, chi
|
|
|
43
43
|
if (dialog?.open) dialog.close();
|
|
44
44
|
};
|
|
45
45
|
}, [isPresent]);
|
|
46
|
-
useTimeoutEffect(() => setOpened(true), openDelay > 0 ? openDelay : void 0);
|
|
46
|
+
useTimeoutEffect(() => setOpened(true), !opened && openDelay > 0 ? openDelay : void 0);
|
|
47
47
|
const overlayRecipe = overlay({
|
|
48
48
|
fullscreen,
|
|
49
49
|
withBackdrop
|
|
@@ -113,5 +113,4 @@ const Overlay = forwardRef(({ onClose, className, classes, overlayLevel = 0, chi
|
|
|
113
113
|
});
|
|
114
114
|
Overlay.displayName = "Overlay";
|
|
115
115
|
|
|
116
|
-
//#endregion
|
|
117
116
|
export { Overlay };
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { DetailsSubject } from "./element-details/subject.mjs";
|
|
2
3
|
import { Overlays } from "./types.mjs";
|
|
3
4
|
import { Fqn } from "@likec4/core/types";
|
|
4
5
|
import { ActorRef, SnapshotFrom, StateMachine } from "xstate";
|
|
5
|
-
//#region src/overlays/overlaysActor.d.ts
|
|
6
6
|
export type OverlayActorEvent = {
|
|
7
7
|
type: 'open.elementDetails';
|
|
8
8
|
} & Overlays.ElementDetails.Input | {
|
|
9
9
|
type: 'open.relationshipDetails';
|
|
10
10
|
} & Overlays.RelationshipDetails.Input | {
|
|
11
11
|
type: 'open.relationshipsBrowser';
|
|
12
|
-
} & Overlays.RelationshipsBrowser.Input |
|
|
12
|
+
} & Overlays.RelationshipsBrowser.Input |
|
|
13
|
+
/**
|
|
14
|
+
* Replace the subject of an open element details card (no new card is opened)
|
|
15
|
+
*/
|
|
16
|
+
{
|
|
17
|
+
type: 'change.elementDetails';
|
|
18
|
+
actorId: string;
|
|
19
|
+
subject: DetailsSubject;
|
|
20
|
+
} | {
|
|
13
21
|
type: 'close';
|
|
14
22
|
actorId?: string | undefined;
|
|
15
23
|
} | {
|
|
@@ -20,7 +28,7 @@ export interface OverlaysContext {
|
|
|
20
28
|
overlays: Array<{
|
|
21
29
|
type: 'elementDetails';
|
|
22
30
|
id: `elementDetails-${number}`;
|
|
23
|
-
subject:
|
|
31
|
+
subject: DetailsSubject;
|
|
24
32
|
} | {
|
|
25
33
|
type: 'relationshipDetails';
|
|
26
34
|
id: `relationshipDetails-${number}`;
|
|
@@ -45,5 +53,4 @@ export interface OverlaysActorLogic extends StateMachine<OverlaysContext, Overla
|
|
|
45
53
|
[key: `relationshipsBrowser-${number}`]: Overlays.RelationshipsBrowser.ActorRef | undefined;
|
|
46
54
|
}, any, any, any, any, any, never, never, any, OverlayActorEmitedEvent, any, any> {}
|
|
47
55
|
export type OverlaysActorSnapshot = SnapshotFrom<OverlaysActorLogic>;
|
|
48
|
-
export interface OverlaysActorRef extends ActorRef<OverlaysActorSnapshot, OverlayActorEvent, OverlayActorEmitedEvent> {}
|
|
49
|
-
//#endregion
|
|
56
|
+
export interface OverlaysActorRef extends ActorRef<OverlaysActorSnapshot, OverlayActorEvent, OverlayActorEmitedEvent> {}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { isEventFromSearch } from "../utils/search-event.mjs";
|
|
3
3
|
import { elementDetailsLogic } from "./element-details/actor.mjs";
|
|
4
4
|
import { relationshipDetailsLogic } from "./relationship-details/actor.mjs";
|
|
5
|
+
import { relationshipsBrowserLogic } from "./relationships-browser/actor.mjs";
|
|
5
6
|
import { isString, last, reverse } from "remeda";
|
|
6
7
|
import { getHotkeyHandler } from "@mantine/hooks";
|
|
7
8
|
import { assertEvent, fromCallback, setup } from "xstate";
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
// src/overlays/overlaysActor.ts
|
|
10
11
|
const hotkeyLogic = fromCallback(({ sendBack }) => {
|
|
11
12
|
const handler = getHotkeyHandler([[
|
|
12
13
|
"Escape",
|
|
@@ -16,9 +17,12 @@ const hotkeyLogic = fromCallback(({ sendBack }) => {
|
|
|
16
17
|
},
|
|
17
18
|
{ preventDefault: true }
|
|
18
19
|
]]);
|
|
19
|
-
|
|
20
|
+
const onKeyDown = (event) => {
|
|
21
|
+
if (!isEventFromSearch(event)) handler(event);
|
|
22
|
+
};
|
|
23
|
+
document.body.addEventListener("keydown", onKeyDown, { capture: true });
|
|
20
24
|
return () => {
|
|
21
|
-
document.body.removeEventListener("keydown",
|
|
25
|
+
document.body.removeEventListener("keydown", onKeyDown, { capture: true });
|
|
22
26
|
};
|
|
23
27
|
});
|
|
24
28
|
const machine = setup({
|
|
@@ -87,7 +91,7 @@ const closeAllOverlays = () => machine.enqueueActions(({ context, enqueue }) =>
|
|
|
87
91
|
});
|
|
88
92
|
const openElementDetails = () => machine.enqueueActions(({ context, enqueue, event }) => {
|
|
89
93
|
assertEvent(event, "open.elementDetails");
|
|
90
|
-
if (context.overlays.some((o) => o.type === "elementDetails" && o.subject === event.subject)) return;
|
|
94
|
+
if (context.overlays.some((o) => o.type === "elementDetails" && o.subject.element === event.subject.element && o.subject.deployment === event.subject.deployment)) return;
|
|
91
95
|
const id = `elementDetails-${context.seq}`;
|
|
92
96
|
enqueue.spawnChild("elementDetails", {
|
|
93
97
|
id,
|
|
@@ -104,6 +108,20 @@ const openElementDetails = () => machine.enqueueActions(({ context, enqueue, eve
|
|
|
104
108
|
});
|
|
105
109
|
enqueue(emitOpened(id));
|
|
106
110
|
});
|
|
111
|
+
const changeElementDetails = () => machine.enqueueActions(({ context, enqueue, event }) => {
|
|
112
|
+
assertEvent(event, "change.elementDetails");
|
|
113
|
+
const overlay = context.overlays.find((o) => o.id === event.actorId);
|
|
114
|
+
if (overlay?.type !== "elementDetails") return;
|
|
115
|
+
if (overlay.subject.element === event.subject.element && overlay.subject.deployment === event.subject.deployment) return;
|
|
116
|
+
enqueue.sendTo(overlay.id, {
|
|
117
|
+
type: "change.subject",
|
|
118
|
+
subject: event.subject
|
|
119
|
+
});
|
|
120
|
+
enqueue.assign({ overlays: context.overlays.map((o) => o.id === overlay.id ? {
|
|
121
|
+
...overlay,
|
|
122
|
+
subject: event.subject
|
|
123
|
+
} : o) });
|
|
124
|
+
});
|
|
107
125
|
const openRelationshipDetails = () => machine.enqueueActions(({ context, enqueue, event }) => {
|
|
108
126
|
assertEvent(event, "open.relationshipDetails");
|
|
109
127
|
const currentOverlay = last(context.overlays);
|
|
@@ -205,6 +223,7 @@ const _overlaysActorLogic = machine.createMachine({
|
|
|
205
223
|
states: {
|
|
206
224
|
hasOverlays: { on: {
|
|
207
225
|
"open.*": { actions: openOverlay() },
|
|
226
|
+
"change.elementDetails": { actions: changeElementDetails() },
|
|
208
227
|
"close": [{
|
|
209
228
|
guard: "close specific overlay?",
|
|
210
229
|
actions: closeSpecificOverlay(),
|
|
@@ -228,5 +247,4 @@ const _overlaysActorLogic = machine.createMachine({
|
|
|
228
247
|
});
|
|
229
248
|
const overlaysActorLogic = _overlaysActorLogic;
|
|
230
249
|
|
|
231
|
-
//#endregion
|
|
232
250
|
export { overlaysActorLogic };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconChevronLeft from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
3
|
-
import IconChevronRight from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
4
|
-
import IconX from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
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";
|
|
3
|
+
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";
|
|
4
|
+
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";
|
|
5
5
|
import { BaseXYFlow } from "../../base/BaseXYFlow.mjs";
|
|
6
|
+
import { useEnabledFeatures } from "../../context/DiagramFeatures.mjs";
|
|
7
|
+
import { useEdgeLabelFontLoader } from "../../hooks/useEdgeLabelFontLoader.mjs";
|
|
6
8
|
import { useLikeC4Model } from "../../hooks/useLikeC4Model.mjs";
|
|
7
9
|
import { computeEdgeDetailsViewData, computeRelationshipDetailsViewData } from "./compute.mjs";
|
|
8
|
-
import { RelationshipEdge } from "./custom/edgeTypes.mjs";
|
|
9
10
|
import { CompoundNode, ElementNode } from "./custom/nodeTypes.mjs";
|
|
11
|
+
import { RelationshipEdge } from "./custom/edgeTypes.mjs";
|
|
10
12
|
import { RelationshipDetailsActorContext, useRelationshipDetails, useRelationshipDetailsActor, useRelationshipDetailsState } from "./hooks.mjs";
|
|
11
13
|
import { layoutRelationshipDetails } from "./layout.mjs";
|
|
12
14
|
import { SelectEdge } from "./SelectEdge.mjs";
|
|
@@ -22,7 +24,7 @@ import { AnimatePresence, LayoutGroup, m } from "motion/react";
|
|
|
22
24
|
import { useSelector } from "@xstate/react";
|
|
23
25
|
import { useCallbackRef, useStateHistory } from "@mantine/hooks";
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
// src/overlays/relationship-details/RelationshipDetails.tsx
|
|
26
28
|
const nodeTypes = {
|
|
27
29
|
element: ElementNode,
|
|
28
30
|
compound: CompoundNode
|
|
@@ -55,6 +57,8 @@ const SyncRelationshipDetailsXYFlow = memo(() => {
|
|
|
55
57
|
const subject = useSelector(actor, selectSubject, deepEqual);
|
|
56
58
|
const likec4model = useLikeC4Model();
|
|
57
59
|
const view = likec4model.findView(subject.viewId) ?? null;
|
|
60
|
+
const { enableNavigateTo } = useEnabledFeatures();
|
|
61
|
+
const [fontsVersion, ensureFontsLoaded] = useEdgeLabelFontLoader();
|
|
58
62
|
const data = useMemo(() => {
|
|
59
63
|
let data;
|
|
60
64
|
if ("edgeId" in subject && isTruthy(subject.edgeId)) {
|
|
@@ -66,12 +70,17 @@ const SyncRelationshipDetailsXYFlow = memo(() => {
|
|
|
66
70
|
target: likec4model.element(subject.target)
|
|
67
71
|
});
|
|
68
72
|
else return null;
|
|
69
|
-
return layoutRelationshipDetails(data, view);
|
|
73
|
+
return layoutRelationshipDetails(data, view, { withNavigateButtons: enableNavigateTo });
|
|
70
74
|
}, [
|
|
71
75
|
subject,
|
|
72
76
|
view,
|
|
73
|
-
likec4model
|
|
77
|
+
likec4model,
|
|
78
|
+
enableNavigateTo,
|
|
79
|
+
fontsVersion
|
|
74
80
|
]);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (data) ensureFontsLoaded(data.edges.flatMap((edge) => edge.label ?? []));
|
|
83
|
+
}, [data]);
|
|
75
84
|
const store = useStoreApi();
|
|
76
85
|
const instance = useReactFlow();
|
|
77
86
|
useEffect(() => {
|
|
@@ -282,5 +291,4 @@ const TopLeftPanelInner = ({ edge, view }) => {
|
|
|
282
291
|
});
|
|
283
292
|
};
|
|
284
293
|
|
|
285
|
-
//#endregion
|
|
286
294
|
export { RelationshipDetails };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, cx } from "@likec4/styles/css";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/overlays/relationship-details/SelectEdge.css.ts
|
|
4
4
|
const edgeEnpoint = css.raw({
|
|
5
5
|
display: "inline-flex",
|
|
6
6
|
alignItems: "center",
|
|
@@ -73,5 +73,4 @@ const edgeDataGrid = css({
|
|
|
73
73
|
});
|
|
74
74
|
const scrollArea = css({ maxHeight: ["[70vh]", "[calc(100cqh - 70px)]"] });
|
|
75
75
|
|
|
76
|
-
//#endregion
|
|
77
76
|
export { edgeArrow, edgeGrid, edgeLabel, edgeRow, edgeSource, edgeTarget, scrollArea };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconArrowRight 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 IconArrowRight from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.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 { useRelationshipDetails } from "./hooks.mjs";
|
|
5
5
|
import { edgeArrow, edgeGrid, edgeLabel, edgeRow, edgeSource, edgeTarget, scrollArea } from "./SelectEdge.css.mjs";
|
|
6
6
|
import { useRef } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Box, Button, Popover, PopoverDropdown, PopoverTarget, ScrollAreaAutosize, Text, ThemeIcon } from "@mantine/core";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/overlays/relationship-details/SelectEdge.tsx
|
|
11
11
|
const SelectEdge = ({ edge, view }) => {
|
|
12
12
|
const browser = useRelationshipDetails();
|
|
13
13
|
const viewport = useRef(null);
|
|
@@ -147,5 +147,4 @@ const SelectEdge = ({ edge, view }) => {
|
|
|
147
147
|
});
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
//#endregion
|
|
151
150
|
export { SelectEdge };
|
|
@@ -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, MarkdownOrString, RelationId, RelationshipArrowType, RelationshipLineType, ViewId } from "@likec4/core/types";
|
|
4
|
+
import { BBox, Color, DiagramNode, ExclusiveUnion, Fqn, IconUrl, MarkdownOrString, RelationId, RelationshipArrowType, RelationshipLineType, ViewId } from "@likec4/core/types";
|
|
5
5
|
import { Simplify } from "type-fest";
|
|
6
|
-
//#region src/overlays/relationship-details/_types.d.ts
|
|
7
6
|
export declare namespace RelationshipDetailsTypes {
|
|
8
7
|
type Column = 'sources' | 'targets';
|
|
9
8
|
/**
|
|
@@ -47,6 +46,10 @@ export declare namespace RelationshipDetailsTypes {
|
|
|
47
46
|
relationId: RelationId;
|
|
48
47
|
color: Color;
|
|
49
48
|
label: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Label box placed by the layout, the edge goes through it
|
|
51
|
+
*/
|
|
52
|
+
labelBBox: BBox | null;
|
|
50
53
|
technology?: string | undefined;
|
|
51
54
|
navigateTo: ViewId | null;
|
|
52
55
|
line: RelationshipLineType;
|
|
@@ -56,5 +59,4 @@ export declare namespace RelationshipDetailsTypes {
|
|
|
56
59
|
}>;
|
|
57
60
|
type Edge = BaseEdge<EdgeData, 'relationship'>;
|
|
58
61
|
type EdgeProps = BaseEdgeProps<Edge>;
|
|
59
|
-
}
|
|
60
|
-
//#endregion
|
|
62
|
+
}
|
|
@@ -4,7 +4,6 @@ import { LayoutResult } from "./layout.mjs";
|
|
|
4
4
|
import { EdgeChange, NodeChange, ReactFlowInstance, ReactFlowState } from "@xyflow/react";
|
|
5
5
|
import { BBox, EdgeId, ExclusiveUnion, Fqn, ViewId } from "@likec4/core";
|
|
6
6
|
import { ActorRef, SnapshotFrom, StateMachine } from "xstate";
|
|
7
|
-
//#region src/overlays/relationship-details/actor.d.ts
|
|
8
7
|
type XYFLowInstance = ReactFlowInstance<RelationshipDetailsTypes.AnyNode, RelationshipDetailsTypes.Edge>;
|
|
9
8
|
type XYStoreState = ReactFlowState<RelationshipDetailsTypes.AnyNode, RelationshipDetailsTypes.Edge>;
|
|
10
9
|
type XYStoreApi = {
|
|
@@ -105,5 +104,4 @@ export type Tags = never;
|
|
|
105
104
|
export interface RelationshipDetailsLogic extends StateMachine<Context, Events, {}, any, any, any, any, any, Tags, Input, any, any, any, any> {}
|
|
106
105
|
export type RelationshipDetailsSnapshot = SnapshotFrom<RelationshipDetailsLogic>;
|
|
107
106
|
export interface RelationshipDetailsActorRef extends ActorRef<RelationshipDetailsSnapshot, Events> {}
|
|
108
|
-
//#endregion
|
|
109
107
|
export type { Input as RelationshipDetailsInput };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { MinZoom } from "../../base/const.mjs";
|
|
3
2
|
import { Base } from "../../base/Base.mjs";
|
|
3
|
+
import { MinZoom } from "../../base/const.mjs";
|
|
4
4
|
import { updateEdges } from "../../base/updateEdges.mjs";
|
|
5
5
|
import { updateNodes } from "../../base/updateNodes.mjs";
|
|
6
6
|
import { typedSystem } from "../../likec4diagram/state/utils.mjs";
|
|
@@ -11,7 +11,7 @@ import { isString, prop } from "remeda";
|
|
|
11
11
|
import { invariant } from "@likec4/core";
|
|
12
12
|
import { assertEvent, assign, cancel, enqueueActions, raise, setup } from "xstate";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/overlays/relationship-details/actor.ts
|
|
15
15
|
function inputToSubject(input) {
|
|
16
16
|
if ("edgeId" in input) {
|
|
17
17
|
invariant(isString(input.edgeId), "edgeId is required");
|
|
@@ -247,5 +247,4 @@ const _relationshipDetailsLogic = setup({
|
|
|
247
247
|
});
|
|
248
248
|
const relationshipDetailsLogic = _relationshipDetailsLogic;
|
|
249
249
|
|
|
250
|
-
//#endregion
|
|
251
250
|
export { relationshipDetailsLogic };
|
|
@@ -4,7 +4,7 @@ import { invariant, isAncestor, sortParentsFirst } from "@likec4/core/utils";
|
|
|
4
4
|
import { modelConnection } from "@likec4/core/model";
|
|
5
5
|
import { treeFromElements } from "@likec4/core/compute-view";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/overlays/relationship-details/compute.ts
|
|
8
8
|
const finalize = (elements, explicits) => {
|
|
9
9
|
if (elements.size > 2 && explicits.size !== elements.size) return new Set(sortParentsFirst([...treeFromElements(elements).flatten(), ...explicits]));
|
|
10
10
|
if (elements.size > 1) return new Set(sortParentsFirst([...elements]));
|
|
@@ -112,5 +112,4 @@ function computeRelationshipDetailsViewData({ source, target }) {
|
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
//#endregion
|
|
116
115
|
export { computeEdgeDetailsViewData, computeRelationshipDetailsViewData };
|
|
@@ -1,14 +1,14 @@
|
|
|
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 { jsx } from "react/jsx-runtime";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/overlays/relationship-details/custom/ElementActions.tsx
|
|
12
12
|
const ElementActions = (props) => {
|
|
13
13
|
const { enableNavigateTo, enableVscode } = useEnabledFeatures();
|
|
14
14
|
const diagram = useDiagram();
|
|
@@ -45,5 +45,4 @@ const ElementActions = (props) => {
|
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
//#endregion
|
|
49
48
|
export { ElementActions };
|
|
@@ -1,20 +1,20 @@
|
|
|
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";
|
|
8
|
+
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
9
|
+
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
10
|
+
import { edgePathThroughLabel } from "../../../utils/edge-path-through-label.mjs";
|
|
10
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { getBezierPath } from "@xyflow/system";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/overlays/relationship-details/custom/edgeTypes.tsx
|
|
14
14
|
const RelationshipEdge = memoEdge((props) => {
|
|
15
15
|
const { enableNavigateTo } = useEnabledFeatures();
|
|
16
|
-
const { data: { navigateTo } } = props;
|
|
17
|
-
const [svgPath,
|
|
16
|
+
const { data: { navigateTo, labelBBox } } = props;
|
|
17
|
+
const [svgPath, labelPosition] = edgePathThroughLabel(props, labelBBox);
|
|
18
18
|
const diagram = useDiagram();
|
|
19
19
|
return /* @__PURE__ */ jsxs(EdgeContainer, {
|
|
20
20
|
...props,
|
|
@@ -23,12 +23,8 @@ const RelationshipEdge = memoEdge((props) => {
|
|
|
23
23
|
svgPath
|
|
24
24
|
}), /* @__PURE__ */ jsx(EdgeLabelContainer, {
|
|
25
25
|
edgeProps: props,
|
|
26
|
-
labelPosition
|
|
27
|
-
|
|
28
|
-
y: labelY,
|
|
29
|
-
translate: "translate(-50%, 0)"
|
|
30
|
-
},
|
|
31
|
-
style: { maxWidth: Math.abs(props.targetX - props.sourceX - 100) },
|
|
26
|
+
labelPosition,
|
|
27
|
+
...!labelBBox && { style: { maxWidth: Math.abs(props.targetX - props.sourceX - 100) } },
|
|
32
28
|
children: /* @__PURE__ */ jsx(EdgeLabel, {
|
|
33
29
|
edgeProps: props,
|
|
34
30
|
children: enableNavigateTo && navigateTo && /* @__PURE__ */ jsx(EdgeActionButton, {
|
|
@@ -43,5 +39,4 @@ const RelationshipEdge = memoEdge((props) => {
|
|
|
43
39
|
});
|
|
44
40
|
});
|
|
45
41
|
|
|
46
|
-
//#endregion
|
|
47
42
|
export { RelationshipEdge };
|