@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,12 +1,12 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
3
2
|
import { DefaultHandles } from "../../../base-primitives/NodeHandles.mjs";
|
|
3
|
+
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
4
4
|
import { css } from "@likec4/styles/css";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Box } from "@likec4/styles/jsx";
|
|
7
7
|
import * as m from "motion/react-m";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/likec4diagram/custom/nodes/GraphElementNode.tsx
|
|
10
10
|
const circle = css({
|
|
11
11
|
flexShrink: 0,
|
|
12
12
|
width: "[100%]",
|
|
@@ -28,7 +28,7 @@ const label = css({
|
|
|
28
28
|
pointerEvents: "none",
|
|
29
29
|
fontSize: "xs",
|
|
30
30
|
lineHeight: "[1.2]",
|
|
31
|
-
color: "
|
|
31
|
+
color: "text"
|
|
32
32
|
});
|
|
33
33
|
/**
|
|
34
34
|
* Renders an element as a compact circle, used in the "graph" display variant of element views.
|
|
@@ -80,5 +80,4 @@ function GraphElementNode(props) {
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
//#endregion
|
|
84
83
|
export { GraphElementNode };
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { Types } from "../../types.mjs";
|
|
3
|
+
export type NodeDriftsProps = {
|
|
4
|
+
nodeProps: Types.NodeProps;
|
|
5
|
+
};
|
|
6
|
+
export declare function NodeDrifts({ nodeProps: { data } }: NodeDriftsProps): import("react").JSX.Element | null;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { useIsComparingLayouts } from "../../../context/ComparingLayoutsContext.mjs";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { Box } from "@likec4/styles/jsx";
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
// src/likec4diagram/custom/nodes/NodeDrifts.tsx
|
|
6
7
|
function NodeDrifts({ nodeProps: { data } }) {
|
|
8
|
+
const isComparing = useIsComparingLayouts();
|
|
7
9
|
const drifts = data.drifts;
|
|
8
|
-
if (!drifts || drifts.length === 0) return null;
|
|
10
|
+
if (!isComparing || !drifts || drifts.length === 0) return null;
|
|
9
11
|
return /* @__PURE__ */ jsx(Box, {
|
|
10
12
|
className: "likec4-node-drifts",
|
|
11
13
|
css: {
|
|
@@ -20,5 +22,4 @@ function NodeDrifts({ nodeProps: { data } }) {
|
|
|
20
22
|
});
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
//#endregion
|
|
24
25
|
export { NodeDrifts };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { MarkdownWithRefs } from "../../../components/markdown/MarkdownWithRefs.mjs";
|
|
2
3
|
import { useCallbackRef as useCallbackRef$1 } from "../../../hooks/useCallbackRef.mjs";
|
|
3
4
|
import { useOnDiagramEvent } from "../../../hooks/useDiagram.mjs";
|
|
4
|
-
import { Markdown } from "../../../base-primitives/Markdown.mjs";
|
|
5
5
|
import { css, cx } from "@likec4/styles/css";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { ViewportPortal } from "@xyflow/react";
|
|
@@ -14,7 +14,7 @@ import { useDisclosure } from "@mantine/hooks";
|
|
|
14
14
|
import { Box as Box$1 } from "@likec4/styles/jsx";
|
|
15
15
|
import { nodeNotes } from "@likec4/styles/recipes";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// src/likec4diagram/custom/nodes/NodeNotes.tsx
|
|
18
18
|
function NodeNotes({ data }) {
|
|
19
19
|
if (!hasProp(data, "notes") || isEmptyish(data.notes.md || data.notes.txt)) return null;
|
|
20
20
|
return /* @__PURE__ */ jsx(NodeNotesInternal2, { data });
|
|
@@ -95,7 +95,6 @@ function NodeNotesInternal({ data }) {
|
|
|
95
95
|
maxWidth: `min(calc(${width}px * 2), 50cqw)`
|
|
96
96
|
},
|
|
97
97
|
onMouseDownCapture: stopPropagation,
|
|
98
|
-
onClickCapture: stopPropagation,
|
|
99
98
|
onClick: stopPropagation,
|
|
100
99
|
children: /* @__PURE__ */ jsx(ScrollAreaAutosize, {
|
|
101
100
|
component: m.div,
|
|
@@ -104,7 +103,7 @@ function NodeNotesInternal({ data }) {
|
|
|
104
103
|
padding: "xs",
|
|
105
104
|
paddingRight: "xxs"
|
|
106
105
|
})),
|
|
107
|
-
children: /* @__PURE__ */ jsx(
|
|
106
|
+
children: /* @__PURE__ */ jsx(MarkdownWithRefs, {
|
|
108
107
|
className: css({ paddingRight: "xxs" }),
|
|
109
108
|
value: RichText.from(markdown)
|
|
110
109
|
})
|
|
@@ -222,5 +221,4 @@ function Catch({ data, onCatchClick }) {
|
|
|
222
221
|
}) }, "catch-all");
|
|
223
222
|
}
|
|
224
223
|
|
|
225
|
-
//#endregion
|
|
226
224
|
export { NodeNotes };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { Types } from "../../types.mjs";
|
|
3
|
-
//#region src/likec4diagram/custom/nodes/SequenceActorNode.d.ts
|
|
4
3
|
export declare function SequenceActorNode(props: Types.NodeProps<'seq-actor'>): import("react").JSX.Element;
|
|
5
|
-
export declare function SequenceParallelArea(props: Types.NodeProps<'seq-parallel'>): import("react").JSX.Element;
|
|
6
|
-
//#endregion
|
|
4
|
+
export declare function SequenceParallelArea(props: Types.NodeProps<'seq-parallel'>): import("react").JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
3
2
|
import { ElementData } from "../../../base-primitives/element/ElementData.mjs";
|
|
4
3
|
import { ElementNodeContainer } from "../../../base-primitives/element/ElementNodeContainer.mjs";
|
|
5
4
|
import { ElementShape } from "../../../base-primitives/element/ElementShape.mjs";
|
|
5
|
+
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
6
6
|
import { ElementActions } from "./ElementActions.mjs";
|
|
7
7
|
import { NodeDrifts } from "./NodeDrifts.mjs";
|
|
8
8
|
import { NodeNotes } from "./NodeNotes.mjs";
|
|
9
|
-
import { ElementToolbar } from "./toolbar/ElementToolbar.mjs";
|
|
10
9
|
import { ElementDetailsButtonWithHandler } from "./nodes.mjs";
|
|
10
|
+
import { ElementToolbar } from "./toolbar/ElementToolbar.mjs";
|
|
11
11
|
import { css } from "@likec4/styles/css";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { Handle, Position } from "@xyflow/react";
|
|
@@ -15,7 +15,7 @@ import { isTruthy } from "remeda";
|
|
|
15
15
|
import { m } from "motion/react";
|
|
16
16
|
import { Box } from "@likec4/styles/jsx";
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
// src/likec4diagram/custom/nodes/SequenceActorNode.tsx
|
|
19
19
|
const positionMap = {
|
|
20
20
|
left: Position.Left,
|
|
21
21
|
right: Position.Right,
|
|
@@ -149,5 +149,4 @@ function SequenceParallelArea(props) {
|
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
//#endregion
|
|
153
152
|
export { SequenceActorNode, SequenceParallelArea };
|
|
@@ -4,7 +4,7 @@ import { css, cx, sva } from "@likec4/styles/css";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { hstack } from "@likec4/styles/patterns";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/likec4diagram/custom/nodes/SequenceSubFlow.tsx
|
|
8
8
|
const labelStyle = css.raw({
|
|
9
9
|
color: "colorPalette.text",
|
|
10
10
|
fontSize: "[9px]",
|
|
@@ -235,5 +235,4 @@ function SequenceSubflowArea(props) {
|
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
//#endregion
|
|
239
238
|
export { SequenceSubflowArea };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CompoundActions } from "./CompoundActions.mjs";
|
|
2
2
|
import { DeploymentElementActions, DeploymentElementActionsProps, ElementActions, ElementActionsProps } from "./ElementActions.mjs";
|
|
3
|
-
import "./GraphElementNode.mjs";
|
|
3
|
+
import { GraphElementNode } from "./GraphElementNode.mjs";
|
|
4
4
|
import { CompoundDeploymentNode, CompoundDetailsButtonWithHandler, CompoundElementNode, DeploymentNode, ElementDetailsButtonWithHandler, ElementNode, ViewGroupNode } from "./nodes.mjs";
|
|
5
5
|
import { SequenceActorNode, SequenceParallelArea } from "./SequenceActorNode.mjs";
|
|
6
|
-
import "./SequenceSubFlow.mjs";
|
|
7
|
-
import "./NodeDrifts.mjs";
|
|
6
|
+
import { SequenceSubflowArea } from "./SequenceSubFlow.mjs";
|
|
7
|
+
import { NodeDrifts, NodeDriftsProps } from "./NodeDrifts.mjs";
|
|
8
8
|
import { CompoundDeploymentToolbar, CompoundElementToolbar } from "./toolbar/CompoundToolbar.mjs";
|
|
9
9
|
import { DeploymentElementToolbar, ElementToolbar } from "./toolbar/ElementToolbar.mjs";
|
|
10
10
|
import { Toolbar, ToolbarProps } from "./toolbar/Toolbar.mjs";
|
|
11
|
-
export { CompoundActions, CompoundDeploymentNode, CompoundDeploymentToolbar, CompoundDetailsButtonWithHandler, CompoundElementNode, CompoundElementToolbar, DeploymentElementActions, DeploymentElementActionsProps, DeploymentElementToolbar, DeploymentNode, ElementActions, ElementActionsProps, ElementDetailsButtonWithHandler, ElementNode, ElementToolbar, SequenceActorNode, SequenceParallelArea, Toolbar, ToolbarProps, ViewGroupNode };
|
|
11
|
+
export { CompoundActions, CompoundDeploymentNode, CompoundDeploymentToolbar, CompoundDetailsButtonWithHandler, CompoundElementNode, CompoundElementToolbar, DeploymentElementActions, DeploymentElementActionsProps, DeploymentElementToolbar, DeploymentNode, ElementActions, ElementActionsProps, ElementDetailsButtonWithHandler, ElementNode, ElementToolbar, GraphElementNode, NodeDrifts, SequenceActorNode, SequenceParallelArea, SequenceSubflowArea, Toolbar, ToolbarProps, ViewGroupNode };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { BaseNodeData } from "../../../base/types.mjs";
|
|
3
3
|
import { Types } from "../../types.mjs";
|
|
4
|
-
import { Fqn } from "@likec4/core";
|
|
5
|
-
//#region src/likec4diagram/custom/nodes/nodes.d.ts
|
|
4
|
+
import { DeploymentFqn, Fqn } from "@likec4/core";
|
|
6
5
|
export declare function ElementDetailsButtonWithHandler(props: {
|
|
7
6
|
id: string;
|
|
8
7
|
selected?: boolean;
|
|
9
8
|
data: BaseNodeData & {
|
|
10
9
|
modelFqn?: Fqn | null | undefined;
|
|
10
|
+
deploymentFqn?: DeploymentFqn | null | undefined;
|
|
11
11
|
};
|
|
12
12
|
}): import("react").JSX.Element | null;
|
|
13
13
|
export declare function CompoundDetailsButtonWithHandler(props: Types.NodeProps<'compound-deployment' | 'compound-element'>): import("react").JSX.Element | null;
|
|
@@ -18,5 +18,4 @@ export declare function ElementNode(props: Types.NodeProps<'element'>): import("
|
|
|
18
18
|
export declare function DeploymentNode(props: Types.NodeProps<'deployment'>): import("react").JSX.Element;
|
|
19
19
|
export declare function CompoundElementNode(props: Types.NodeProps<'compound-element'>): import("react").JSX.Element;
|
|
20
20
|
export declare function CompoundDeploymentNode(props: Types.NodeProps<'compound-deployment'>): import("react").JSX.Element;
|
|
21
|
-
export declare function ViewGroupNode(props: Types.NodeProps<'view-group'>): import("react").JSX.Element;
|
|
22
|
-
//#endregion
|
|
21
|
+
export declare function ViewGroupNode(props: Types.NodeProps<'view-group'>): import("react").JSX.Element;
|
|
@@ -1,16 +1,17 @@
|
|
|
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";
|
|
5
|
+
import { DefaultHandles } from "../../../base-primitives/NodeHandles.mjs";
|
|
8
6
|
import { ElementData } from "../../../base-primitives/element/ElementData.mjs";
|
|
9
7
|
import { ElementDetailsButton } from "../../../base-primitives/element/ElementDetailsButton.mjs";
|
|
10
8
|
import { ElementNodeContainer } from "../../../base-primitives/element/ElementNodeContainer.mjs";
|
|
11
|
-
import { ElementShape } from "../../../base-primitives/element/ElementShape.mjs";
|
|
9
|
+
import { ElementShape as ElementShape$1 } from "../../../base-primitives/element/ElementShape.mjs";
|
|
12
10
|
import { ElementTags as ElementTags$1 } from "../../../base-primitives/element/ElementTags.mjs";
|
|
13
|
-
import {
|
|
11
|
+
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
12
|
+
import { useCallbackRef } from "../../../hooks/useCallbackRef.mjs";
|
|
13
|
+
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
14
|
+
import { detailsSubject } from "../../../overlays/element-details/subject.mjs";
|
|
14
15
|
import { CompoundActions } from "./CompoundActions.mjs";
|
|
15
16
|
import { DeploymentElementActions, ElementActions } from "./ElementActions.mjs";
|
|
16
17
|
import { NodeDrifts } from "./NodeDrifts.mjs";
|
|
@@ -19,8 +20,9 @@ import { CompoundDeploymentToolbar, CompoundElementToolbar } from "./toolbar/Com
|
|
|
19
20
|
import { DeploymentElementToolbar, ElementToolbar } from "./toolbar/ElementToolbar.mjs";
|
|
20
21
|
import { css } from "@likec4/styles/css";
|
|
21
22
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
import { scalar } from "@likec4/core";
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
// src/likec4diagram/custom/nodes/nodes.tsx
|
|
24
26
|
function ElementTags(props) {
|
|
25
27
|
const diagram = useDiagram();
|
|
26
28
|
return /* @__PURE__ */ jsx(ElementTags$1, {
|
|
@@ -41,25 +43,23 @@ function ElementTags(props) {
|
|
|
41
43
|
}
|
|
42
44
|
function ElementDetailsButtonWithHandler(props) {
|
|
43
45
|
const diagram = useDiagram();
|
|
44
|
-
|
|
45
|
-
if (!fqn) return null;
|
|
46
|
+
if (!detailsSubject(props.data)) return null;
|
|
46
47
|
return /* @__PURE__ */ jsx(ElementDetailsButton, {
|
|
47
48
|
...props,
|
|
48
49
|
onClick: (e) => {
|
|
49
50
|
e.stopPropagation();
|
|
50
|
-
diagram.
|
|
51
|
+
diagram.openNodeDetails(scalar.NodeId(props.id));
|
|
51
52
|
}
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
function CompoundDetailsButtonWithHandler(props) {
|
|
55
56
|
const diagram = useDiagram();
|
|
56
|
-
|
|
57
|
-
if (!fqn) return null;
|
|
57
|
+
if (!detailsSubject(props.data)) return null;
|
|
58
58
|
return /* @__PURE__ */ jsx(CompoundDetailsButton, {
|
|
59
59
|
...props,
|
|
60
60
|
onClick: (e) => {
|
|
61
61
|
e.stopPropagation();
|
|
62
|
-
diagram.
|
|
62
|
+
diagram.openNodeDetails(scalar.NodeId(props.id));
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -67,12 +67,12 @@ function CompoundDetailsButtonWithHandler(props) {
|
|
|
67
67
|
* Renders an element node.
|
|
68
68
|
*/
|
|
69
69
|
function ElementNode(props) {
|
|
70
|
-
const { enableElementTags, enableElementDetails, enableReadOnly,
|
|
70
|
+
const { enableCompareWithLatest, enableElementTags, enableElementDetails, enableReadOnly, enableNotes } = useEnabledFeatures();
|
|
71
71
|
return /* @__PURE__ */ jsxs(ElementNodeContainer, {
|
|
72
72
|
nodeProps: props,
|
|
73
73
|
children: [
|
|
74
74
|
enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
|
|
75
|
-
/* @__PURE__ */ jsx(ElementShape, { ...props }),
|
|
75
|
+
/* @__PURE__ */ jsx(ElementShape$1, { ...props }),
|
|
76
76
|
/* @__PURE__ */ jsx(ElementData, {
|
|
77
77
|
...props,
|
|
78
78
|
"aria-hidden": true
|
|
@@ -87,12 +87,12 @@ function ElementNode(props) {
|
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
function DeploymentNode(props) {
|
|
90
|
-
const { enableElementTags, enableElementDetails, enableReadOnly,
|
|
90
|
+
const { enableCompareWithLatest, enableElementTags, enableElementDetails, enableReadOnly, enableNotes } = useEnabledFeatures();
|
|
91
91
|
return /* @__PURE__ */ jsxs(ElementNodeContainer, {
|
|
92
92
|
nodeProps: props,
|
|
93
93
|
children: [
|
|
94
94
|
enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
|
|
95
|
-
/* @__PURE__ */ jsx(ElementShape, { ...props }),
|
|
95
|
+
/* @__PURE__ */ jsx(ElementShape$1, { ...props }),
|
|
96
96
|
/* @__PURE__ */ jsx(ElementData, {
|
|
97
97
|
...props,
|
|
98
98
|
"aria-hidden": true
|
|
@@ -106,20 +106,19 @@ function DeploymentNode(props) {
|
|
|
106
106
|
]
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
const compoundHasDrifts = css({
|
|
109
|
+
const compoundHasDrifts = css({ "&:has(.likec4-node-drifts)": {
|
|
110
110
|
outlineColor: "likec4.compare.outline",
|
|
111
111
|
outlineWidth: "extra",
|
|
112
112
|
outlineStyle: "dashed",
|
|
113
113
|
outlineOffset: "1.5"
|
|
114
|
-
});
|
|
114
|
+
} });
|
|
115
115
|
const hasDrifts = (props) => {
|
|
116
116
|
return props.data.drifts && props.data.drifts.length > 0;
|
|
117
117
|
};
|
|
118
118
|
function CompoundElementNode(props) {
|
|
119
119
|
const { enableElementDetails, enableReadOnly, enableCompareWithLatest } = useEnabledFeatures();
|
|
120
|
-
const showDrifts = enableCompareWithLatest && hasDrifts(props);
|
|
121
120
|
return /* @__PURE__ */ jsxs(CompoundNodeContainer, {
|
|
122
|
-
className:
|
|
121
|
+
className: enableCompareWithLatest && hasDrifts(props) ? compoundHasDrifts : void 0,
|
|
123
122
|
nodeProps: props,
|
|
124
123
|
children: [
|
|
125
124
|
enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
|
|
@@ -170,5 +169,4 @@ function ViewGroupNode(props) {
|
|
|
170
169
|
});
|
|
171
170
|
}
|
|
172
171
|
|
|
173
|
-
//#endregion
|
|
174
172
|
export { CompoundDeploymentNode, CompoundDetailsButtonWithHandler, CompoundElementNode, DeploymentNode, ElementDetailsButtonWithHandler, ElementNode, ViewGroupNode };
|
|
@@ -8,7 +8,7 @@ import { keys } from "remeda";
|
|
|
8
8
|
import { Button, CheckIcon, ColorSwatch, Divider, Popover, PopoverDropdown, PopoverTarget, Slider, Space, Stack, Tooltip, TooltipGroup, rem } from "@mantine/core";
|
|
9
9
|
import { Flex as Flex$1 } from "@likec4/styles/jsx";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/likec4diagram/custom/nodes/toolbar/ColorButton.tsx
|
|
12
12
|
function ColorButton({ elementColor, elementOpacity, onColorPreview, isOpacityEditable = false, onChange, ...props }) {
|
|
13
13
|
const { theme } = useLikeC4Styles();
|
|
14
14
|
return /* @__PURE__ */ jsxs(Popover, {
|
|
@@ -156,5 +156,4 @@ function OpacityOption({ elementOpacity = 100, onOpacityChange }) {
|
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
//#endregion
|
|
160
159
|
export { ColorButton, ColorSwatches, OpacityOption };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { __name } from "../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { Types } from "../../../types.mjs";
|
|
3
|
-
//#region src/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.ts
|
|
4
3
|
export declare function CompoundElementToolbar(props: Types.NodeProps<'compound-element'>): import("react").JSX.Element;
|
|
5
|
-
export declare function CompoundDeploymentToolbar(props: Types.NodeProps<'compound-deployment'>): import("react").JSX.Element;
|
|
6
|
-
//#endregion
|
|
4
|
+
export declare function CompoundDeploymentToolbar(props: Types.NodeProps<'compound-deployment'>): import("react").JSX.Element;
|
|
@@ -6,7 +6,7 @@ import { Toolbar } from "./Toolbar.mjs";
|
|
|
6
6
|
import { useHandlers } from "./useHandlers.mjs";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/likec4diagram/custom/nodes/toolbar/CompoundToolbar.tsx
|
|
10
10
|
function CompoundElementToolbar(props) {
|
|
11
11
|
const { enableVscode, enableRelationshipBrowser } = useEnabledFeatures();
|
|
12
12
|
const { data: { style, modelFqn } } = props;
|
|
@@ -61,5 +61,4 @@ function CompoundDeploymentToolbar(props) {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
//#endregion
|
|
65
64
|
export { CompoundDeploymentToolbar, CompoundElementToolbar };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { __name } from "../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { Types } from "../../../types.mjs";
|
|
3
3
|
import { Fqn } from "@likec4/core/types";
|
|
4
|
-
//#region src/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts
|
|
5
4
|
export declare function ElementToolbar(props: Types.NodeProps<'element' | 'seq-actor'> & {
|
|
6
5
|
data: {
|
|
7
6
|
modelFqn: Fqn;
|
|
8
7
|
};
|
|
9
8
|
}): import("react").JSX.Element;
|
|
10
|
-
export declare function DeploymentElementToolbar(props: Types.NodeProps<'deployment'>): import("react").JSX.Element;
|
|
11
|
-
//#endregion
|
|
9
|
+
export declare function DeploymentElementToolbar(props: Types.NodeProps<'deployment'>): import("react").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __name } from "../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconCheck 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.
|
|
4
|
-
import { stopPropagation } from "../../../../utils/xyflow.mjs";
|
|
2
|
+
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";
|
|
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";
|
|
5
4
|
import { useEnabledFeatures } from "../../../../context/DiagramFeatures.mjs";
|
|
5
|
+
import { stopPropagation } from "../../../../utils/xyflow.mjs";
|
|
6
6
|
import { BorderStyleOption, BrowseRelationshipsButton, GoToSourceButton } from "./_shared.mjs";
|
|
7
7
|
import { ColorButton } from "./ColorButton.mjs";
|
|
8
8
|
import { Toolbar } from "./Toolbar.mjs";
|
|
@@ -11,7 +11,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
import { Button, Menu, MenuDropdown, MenuItem, MenuTarget } from "@mantine/core";
|
|
12
12
|
import { ElementShapes } from "@likec4/core/styles";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/likec4diagram/custom/nodes/toolbar/ElementToolbar.tsx
|
|
15
15
|
const SortedElementShapes = [...ElementShapes].sort();
|
|
16
16
|
function ElementToolbar(props) {
|
|
17
17
|
const { enableVscode, enableRelationshipBrowser, enableNotes } = useEnabledFeatures();
|
|
@@ -113,5 +113,4 @@ function ElementShapeButton({ elementShape, onChange }) {
|
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
//#endregion
|
|
117
116
|
export { DeploymentElementToolbar, ElementToolbar };
|
|
@@ -2,10 +2,8 @@ import { __name } from "../../../../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { BaseNodeProps } from "../../../../base/types.mjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { NodeToolbarProps } from "@xyflow/react";
|
|
5
|
-
//#region src/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts
|
|
6
5
|
export type ToolbarProps = Omit<NodeToolbarProps, 'title'> & {
|
|
7
6
|
nodeProps: BaseNodeProps;
|
|
8
7
|
title: ReactNode;
|
|
9
8
|
};
|
|
10
|
-
export declare function Toolbar({ title, children, nodeProps, ...props }: ToolbarProps): import("react").JSX.Element | null;
|
|
11
|
-
//#endregion
|
|
9
|
+
export declare function Toolbar({ title, children, nodeProps, ...props }: ToolbarProps): import("react").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __name } from "../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { stopPropagation } from "../../../../utils/xyflow.mjs";
|
|
3
2
|
import { selectDiagramContext, useDiagramSelector } from "../../../../hooks/safeContext.mjs";
|
|
3
|
+
import { stopPropagation } from "../../../../utils/xyflow.mjs";
|
|
4
4
|
import { toolbarTitle } from "./styles.css.mjs";
|
|
5
5
|
import { cx } from "@likec4/styles/css";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -9,7 +9,7 @@ import { Paper, Text } from "@mantine/core";
|
|
|
9
9
|
import { useDebouncedValue } from "@mantine/hooks";
|
|
10
10
|
import { Box as Box$1, HStack, VStack } from "@likec4/styles/jsx";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/likec4diagram/custom/nodes/toolbar/Toolbar.tsx
|
|
13
13
|
const selectSelectedNodesCount = selectDiagramContext((context) => {
|
|
14
14
|
return context.xynodes.filter((x) => x.selected).length;
|
|
15
15
|
});
|
|
@@ -18,7 +18,7 @@ const useSelectedNodesCount = () => {
|
|
|
18
18
|
};
|
|
19
19
|
function Toolbar({ title, children, nodeProps, ...props }) {
|
|
20
20
|
const selectedNodesCount = useSelectedNodesCount();
|
|
21
|
-
const { selected
|
|
21
|
+
const { selected, dragging, data: { hovered = false } } = nodeProps;
|
|
22
22
|
const _isToolbarVisible = hovered && selectedNodesCount === 0 || selected && selectedNodesCount === 1;
|
|
23
23
|
let delay = 150;
|
|
24
24
|
if (_isToolbarVisible) {
|
|
@@ -26,9 +26,8 @@ function Toolbar({ title, children, nodeProps, ...props }) {
|
|
|
26
26
|
else delay = 1e3;
|
|
27
27
|
} else if (selectedNodesCount > 0) delay = 50;
|
|
28
28
|
const [isToolbarVisible] = useDebouncedValue(_isToolbarVisible, delay);
|
|
29
|
-
if (!isToolbarVisible) return null;
|
|
29
|
+
if (!isToolbarVisible || dragging) return null;
|
|
30
30
|
return /* @__PURE__ */ jsx(NodeToolbar, {
|
|
31
|
-
isVisible: !dragging,
|
|
32
31
|
offset: 4,
|
|
33
32
|
...props,
|
|
34
33
|
children: /* @__PURE__ */ jsx(Paper, {
|
|
@@ -60,5 +59,4 @@ function Toolbar({ title, children, nodeProps, ...props }) {
|
|
|
60
59
|
});
|
|
61
60
|
}
|
|
62
61
|
|
|
63
|
-
//#endregion
|
|
64
62
|
export { Toolbar };
|
|
@@ -1,13 +1,13 @@
|
|
|
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.
|
|
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
4
|
import { useDiagramEventHandlers } from "../../../../context/DiagramEventHandlers.mjs";
|
|
5
5
|
import { useDiagram } from "../../../../hooks/safeContext.mjs";
|
|
6
6
|
import { useEffect, useState } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { ActionIcon, SegmentedControl, Tooltip } from "@mantine/core";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/likec4diagram/custom/nodes/toolbar/_shared.tsx
|
|
11
11
|
const Tooltip$1 = Tooltip.withProps({
|
|
12
12
|
color: "dark",
|
|
13
13
|
fz: "xs",
|
|
@@ -102,5 +102,4 @@ function BorderStyleOption({ elementBorderStyle = "none", onChange }) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
//#endregion
|
|
106
105
|
export { BorderStyleOption, BrowseRelationshipsButton, GoToSourceButton, Tooltip$1 as Tooltip };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from "@likec4/styles/css";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/likec4diagram/custom/nodes/toolbar/styles.css.ts
|
|
4
4
|
const toolbarTitle = css({
|
|
5
5
|
color: "text.dimmed",
|
|
6
6
|
fontSize: "xxs",
|
|
@@ -13,5 +13,4 @@ const toolbarTitle = css({
|
|
|
13
13
|
whiteSpace: "nowrap"
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
//#endregion
|
|
17
16
|
export { toolbarTitle };
|
|
@@ -3,7 +3,7 @@ import { useCallbackRef } from "../../../../hooks/useCallbackRef.mjs";
|
|
|
3
3
|
import { useDiagram } from "../../../../hooks/safeContext.mjs";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/likec4diagram/custom/nodes/toolbar/useHandlers.ts
|
|
7
7
|
function useHandlers(target, props) {
|
|
8
8
|
const diagram = useDiagram();
|
|
9
9
|
const [originalColor, setOriginalColor] = useState(null);
|
|
@@ -37,5 +37,4 @@ function useHandlers(target, props) {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
//#endregion
|
|
41
40
|
export { useHandlers };
|
|
@@ -1,18 +1,19 @@
|
|
|
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 IconFileSymlink from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
4
|
-
import IconInfoCircle from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
5
|
-
import IconZoomScan from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
6
|
-
import {
|
|
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 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";
|
|
4
|
+
import IconInfoCircle from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.mjs";
|
|
5
|
+
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";
|
|
6
|
+
import { ElementTag } from "../../base-primitives/element/ElementTags.mjs";
|
|
7
|
+
import { Link } from "../../components/Link.mjs";
|
|
8
|
+
import { MarkdownWithRefs } from "../../components/markdown/MarkdownWithRefs.mjs";
|
|
9
|
+
import { selectDiagramContext, useDiagram, useDiagramSelector } from "../../hooks/safeContext.mjs";
|
|
10
|
+
import { PortalToContainer } from "../../components/PortalToContainer.mjs";
|
|
7
11
|
import { useRootContainerRef } from "../../context/RootContainerContext.mjs";
|
|
8
12
|
import { useEnabledFeatures } from "../../context/DiagramFeatures.mjs";
|
|
9
|
-
import { selectDiagramContext, useDiagram, useDiagramSelector } from "../../hooks/safeContext.mjs";
|
|
10
13
|
import { useOnDiagramEvent } from "../../hooks/useDiagram.mjs";
|
|
11
14
|
import { useLikeC4Model } from "../../hooks/useLikeC4Model.mjs";
|
|
15
|
+
import { roundDpr } from "../../utils/roundDpr.mjs";
|
|
12
16
|
import { findDiagramEdge, findDiagramNode } from "../state/utils.mjs";
|
|
13
|
-
import { Markdown } from "../../base-primitives/Markdown.mjs";
|
|
14
|
-
import { Link } from "../../components/Link.mjs";
|
|
15
|
-
import { PortalToContainer } from "../../components/PortalToContainer.mjs";
|
|
16
17
|
import { RelationshipPopoverActorLogic } from "./actor.mjs";
|
|
17
18
|
import { Endpoint, RelationshipTitle } from "./components.mjs";
|
|
18
19
|
import { css, cx } from "@likec4/styles/css";
|
|
@@ -27,7 +28,7 @@ import { Box as Box$1, HStack, VStack, styled } from "@likec4/styles/jsx";
|
|
|
27
28
|
import { bleed } from "@likec4/styles/patterns";
|
|
28
29
|
import { autoPlacement, autoUpdate, computePosition, hide, offset, size } from "@floating-ui/dom";
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
// src/likec4diagram/relationship-popover/RelationshipPopover.tsx
|
|
31
32
|
const selector = selectDiagramContext((c) => {
|
|
32
33
|
let selected = null;
|
|
33
34
|
for (const edge of c.xyedges) if (edge.selected) {
|
|
@@ -279,7 +280,13 @@ const Relationship = forwardRef(({ relationship: r, sourceNode, targetNode, onNa
|
|
|
279
280
|
const sourceId = getEndpointId(r, "source", sourceNode);
|
|
280
281
|
const targetId = getEndpointId(r, "target", targetNode);
|
|
281
282
|
const links = r.links;
|
|
283
|
+
const tags = r.tags;
|
|
284
|
+
const infoIconRef = useRef(null);
|
|
285
|
+
const [metadataPortalTarget, setMetadataPortalTarget] = useState(null);
|
|
282
286
|
const metadataEntries = r.hasMetadata() ? entries(r.getMetadata()).sort(([a], [b]) => a.localeCompare(b)) : null;
|
|
287
|
+
useEffect(() => {
|
|
288
|
+
setMetadataPortalTarget(infoIconRef.current?.closest("dialog") ?? null);
|
|
289
|
+
}, [metadataEntries !== null]);
|
|
283
290
|
const metadataTooltipLabel = metadataEntries && /* @__PURE__ */ jsxs("div", {
|
|
284
291
|
style: {
|
|
285
292
|
display: "flex",
|
|
@@ -426,11 +433,13 @@ const Relationship = forwardRef(({ relationship: r, sourceNode, targetNode, onNa
|
|
|
426
433
|
bg: "white",
|
|
427
434
|
c: "dark",
|
|
428
435
|
withinPortal: true,
|
|
436
|
+
portalProps: metadataPortalTarget ? { target: metadataPortalTarget } : {},
|
|
429
437
|
styles: { tooltip: {
|
|
430
438
|
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
|
|
431
439
|
border: "1px solid #dee2e6"
|
|
432
440
|
} },
|
|
433
441
|
children: /* @__PURE__ */ jsx(Box$1, {
|
|
442
|
+
ref: infoIconRef,
|
|
434
443
|
display: "inline-flex",
|
|
435
444
|
children: /* @__PURE__ */ jsx(IconInfoCircle, {
|
|
436
445
|
size: 14,
|
|
@@ -467,6 +476,15 @@ const Relationship = forwardRef(({ relationship: r, sourceNode, targetNode, onNa
|
|
|
467
476
|
children: r.technology
|
|
468
477
|
})]
|
|
469
478
|
}),
|
|
479
|
+
tags.length > 0 && /* @__PURE__ */ jsxs(HStack, {
|
|
480
|
+
gap: "2",
|
|
481
|
+
alignItems: "center",
|
|
482
|
+
children: [/* @__PURE__ */ jsx(Label, { children: "tags" }), /* @__PURE__ */ jsx(HStack, {
|
|
483
|
+
gap: "1",
|
|
484
|
+
flexWrap: "wrap",
|
|
485
|
+
children: tags.map((tag) => /* @__PURE__ */ jsx(ElementTag, { tag }, tag))
|
|
486
|
+
})]
|
|
487
|
+
}),
|
|
470
488
|
r.summary.nonEmpty && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Label, { children: "description" }), /* @__PURE__ */ jsx(Box$1, {
|
|
471
489
|
css: {
|
|
472
490
|
paddingLeft: "2.5",
|
|
@@ -478,7 +496,7 @@ const Relationship = forwardRef(({ relationship: r, sourceNode, targetNode, onNa
|
|
|
478
496
|
_dark: "mantine.dark[4]"
|
|
479
497
|
}
|
|
480
498
|
},
|
|
481
|
-
children: /* @__PURE__ */ jsx(
|
|
499
|
+
children: /* @__PURE__ */ jsx(MarkdownWithRefs, {
|
|
482
500
|
value: r.summary,
|
|
483
501
|
fontSize: "sm",
|
|
484
502
|
textScale: .875
|
|
@@ -520,5 +538,4 @@ function getEndpointId(r, endpoint, diagramNode) {
|
|
|
520
538
|
};
|
|
521
539
|
}
|
|
522
540
|
|
|
523
|
-
//#endregion
|
|
524
541
|
export { RelationshipPopover };
|