@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,13 +1,16 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { useEnabledFeatures } from "../../context/DiagramFeatures.mjs";
|
|
3
|
+
import { useEdgeLabelFontLoader } from "../../hooks/useEdgeLabelFontLoader.mjs";
|
|
2
4
|
import { useLikeC4Model } from "../../hooks/useLikeC4Model.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
+
import { measureEdgeLabel } from "../../utils/measure-edge-label.mjs";
|
|
6
|
+
import { useEffect, useMemo } from "react";
|
|
7
|
+
import { concat, filter, find, forEachObj, groupBy, isNumber, map, mapToObj, omit, only, pipe, prop, reduce, sortBy, tap, unique } from "remeda";
|
|
5
8
|
import { DefaultMap, ifind, invariant, nonNullable, toArray } from "@likec4/core/utils";
|
|
6
9
|
import { exact, preferSummary } from "@likec4/core/types";
|
|
7
10
|
import { computeRelationshipsView, treeFromElements } from "@likec4/core/compute-view";
|
|
8
11
|
import dagre from "@dagrejs/dagre";
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
// src/overlays/relationships-browser/layout.ts
|
|
11
14
|
/**
|
|
12
15
|
* All constants related to the layout
|
|
13
16
|
*/
|
|
@@ -21,7 +24,8 @@ const Sizes = {
|
|
|
21
24
|
width: 140,
|
|
22
25
|
height: 10,
|
|
23
26
|
minlen: 1,
|
|
24
|
-
weight: 1
|
|
27
|
+
weight: 1,
|
|
28
|
+
labelpos: "c"
|
|
25
29
|
},
|
|
26
30
|
emptyNodeOffset: 120,
|
|
27
31
|
nodeWidth: 330,
|
|
@@ -122,7 +126,7 @@ let LayoutRelationshipsViewResult;
|
|
|
122
126
|
(function(_LayoutRelationshipsViewResult) {
|
|
123
127
|
_LayoutRelationshipsViewResult.Empty = "@empty";
|
|
124
128
|
})(LayoutRelationshipsViewResult || (LayoutRelationshipsViewResult = {}));
|
|
125
|
-
function layoutRelationshipsView(data, scope) {
|
|
129
|
+
function layoutRelationshipsView(data, scope, { withNavigateButtons = false } = {}) {
|
|
126
130
|
const g = createGraph();
|
|
127
131
|
const incomers = createNodes("incomers", data.incomers, g);
|
|
128
132
|
const subjects = createNodes("subjects", data.subjects, g);
|
|
@@ -151,7 +155,18 @@ function layoutRelationshipsView(data, scope) {
|
|
|
151
155
|
const name = grouped[0].expr;
|
|
152
156
|
g.node(source.id).outPorts.push(target.id);
|
|
153
157
|
g.node(target.id).inPorts.push(source.id);
|
|
154
|
-
|
|
158
|
+
const relations = map(grouped, prop("relation"));
|
|
159
|
+
const onlyRelation = only(relations);
|
|
160
|
+
const navigateTo = only(unique(relations.flatMap((r) => r.navigateTo?.id ? r.navigateTo.id : []))) ?? null;
|
|
161
|
+
const label = measureEdgeLabel({
|
|
162
|
+
label: relations.length > 1 ? `${relations.length} relationships` : onlyRelation?.title ?? "untitled",
|
|
163
|
+
withActionButton: withNavigateButtons && !!navigateTo
|
|
164
|
+
});
|
|
165
|
+
g.setEdge(source.portId, target.portId, {
|
|
166
|
+
...Sizes.edgeLabel,
|
|
167
|
+
width: label.width,
|
|
168
|
+
height: label.height
|
|
169
|
+
}, name);
|
|
155
170
|
edges.push({
|
|
156
171
|
name,
|
|
157
172
|
sourceFqn: grouped[0].sourceFqn,
|
|
@@ -160,7 +175,9 @@ function layoutRelationshipsView(data, scope) {
|
|
|
160
175
|
sourceHandle: source.id + "_out" + (g.node(source.id).outPorts.length - 1),
|
|
161
176
|
target: target.id,
|
|
162
177
|
targetHandle: target.id + "_in" + (g.node(target.id).inPorts.length - 1),
|
|
163
|
-
relations
|
|
178
|
+
relations,
|
|
179
|
+
label,
|
|
180
|
+
navigateTo
|
|
164
181
|
});
|
|
165
182
|
}));
|
|
166
183
|
for (const subjectNode of subjects.graphNodes.values()) {
|
|
@@ -212,10 +229,17 @@ function layoutRelationshipsView(data, scope) {
|
|
|
212
229
|
});
|
|
213
230
|
}
|
|
214
231
|
const edgeCount = g.edgeCount();
|
|
215
|
-
if (edgeCount > 10)
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
232
|
+
if (edgeCount > 10) {
|
|
233
|
+
const minWidth = edgeCount > 25 ? 800 : 400;
|
|
234
|
+
for (const edge of g.edges()) {
|
|
235
|
+
const config = g.edge(edge);
|
|
236
|
+
const width = config["width"];
|
|
237
|
+
g.setEdge(edge, {
|
|
238
|
+
...config,
|
|
239
|
+
width: Math.max(isNumber(width) ? width : 0, minWidth)
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}
|
|
219
243
|
const dagreBounds = applyDagreLayout(g);
|
|
220
244
|
const _calculatedNodeBounds = pipe(nodeIds, filter((n) => n.id === n.portId), mapToObj((n) => [n.id, dagreBounds(n.id)]));
|
|
221
245
|
function nodeBounds(nodeId) {
|
|
@@ -364,6 +388,7 @@ function layoutRelationshipsView(data, scope) {
|
|
|
364
388
|
existsInCurrentView: !!inheritFromNode
|
|
365
389
|
};
|
|
366
390
|
});
|
|
391
|
+
const scopedEdges = scope ? [...scope.edges()] : [];
|
|
367
392
|
return {
|
|
368
393
|
subjectExistsInScope: !scope || scope.includesElement(subject.id),
|
|
369
394
|
bounds: {
|
|
@@ -377,11 +402,23 @@ function layoutRelationshipsView(data, scope) {
|
|
|
377
402
|
const edge = g.edge(e);
|
|
378
403
|
const ename = e.name;
|
|
379
404
|
if (!ename) return acc;
|
|
380
|
-
const { name, source, sourceFqn, target, targetFqn, relations, sourceHandle, targetHandle } = nonNullable(find(edges, (e) => e.name === ename));
|
|
405
|
+
const { name, source, sourceFqn, target, targetFqn, relations, sourceHandle, targetHandle, label, navigateTo } = nonNullable(find(edges, (e) => e.name === ename));
|
|
381
406
|
const onlyRelation = only(relations);
|
|
382
|
-
const
|
|
383
|
-
const
|
|
384
|
-
|
|
407
|
+
const scopedEdgesForGroup = scopedEdges.filter((edge) => relations.some((r) => edge.includesRelation(r.id)));
|
|
408
|
+
const commonScopedStyle = (values) => {
|
|
409
|
+
const [value] = values;
|
|
410
|
+
return values.length > 0 && values.every((v) => v === value) ? {
|
|
411
|
+
found: true,
|
|
412
|
+
value
|
|
413
|
+
} : { found: false };
|
|
414
|
+
};
|
|
415
|
+
const color = commonScopedStyle(scopedEdgesForGroup.map((edge) => edge.color));
|
|
416
|
+
const line = commonScopedStyle(scopedEdgesForGroup.map((edge) => edge.line));
|
|
417
|
+
const head = commonScopedStyle(scopedEdgesForGroup.map((edge) => edge.head));
|
|
418
|
+
const tail = commonScopedStyle(scopedEdgesForGroup.map((edge) => edge.tail));
|
|
419
|
+
const labelX = edge["x"];
|
|
420
|
+
const labelY = edge["y"];
|
|
421
|
+
invariant(isNumber(labelX) && isNumber(labelY), `dagre should place the label of ${name}`);
|
|
385
422
|
acc.push(exact({
|
|
386
423
|
id: name,
|
|
387
424
|
sourceFqn,
|
|
@@ -390,14 +427,20 @@ function layoutRelationshipsView(data, scope) {
|
|
|
390
427
|
targetFqn,
|
|
391
428
|
target,
|
|
392
429
|
targetHandle,
|
|
393
|
-
label:
|
|
430
|
+
label: label.label,
|
|
431
|
+
labelBBox: {
|
|
432
|
+
x: Math.round(labelX - label.width / 2),
|
|
433
|
+
y: Math.round(labelY - label.height / 2),
|
|
434
|
+
width: label.width,
|
|
435
|
+
height: label.height
|
|
436
|
+
},
|
|
394
437
|
navigateTo,
|
|
395
|
-
color: onlyRelation?.color ?? "gray",
|
|
438
|
+
color: color.found ? color.value ?? onlyRelation?.color ?? "gray" : onlyRelation?.color ?? "gray",
|
|
396
439
|
existsInCurrentView: !scope || relations.every((r) => scope.includesRelation(r.id)),
|
|
397
440
|
points: edge.points.map((p) => [p.x, p.y]),
|
|
398
|
-
line: onlyRelation?.line ?? "dashed",
|
|
399
|
-
head: onlyRelation?.head,
|
|
400
|
-
tail: onlyRelation?.tail,
|
|
441
|
+
line: line.found ? line.value ?? onlyRelation?.line ?? "dashed" : onlyRelation?.line ?? "dashed",
|
|
442
|
+
head: head.found ? head.value : onlyRelation?.head,
|
|
443
|
+
tail: tail.found ? tail.value : scopedEdgesForGroup.length === 0 ? onlyRelation?.tail : void 0,
|
|
401
444
|
relations: relations.map((r) => r.id),
|
|
402
445
|
parent: null
|
|
403
446
|
}));
|
|
@@ -407,9 +450,11 @@ function layoutRelationshipsView(data, scope) {
|
|
|
407
450
|
}
|
|
408
451
|
function useRelationshipsView(subject, viewId, scope) {
|
|
409
452
|
const model = useLikeC4Model();
|
|
410
|
-
|
|
453
|
+
const { enableNavigateTo } = useEnabledFeatures();
|
|
454
|
+
const [fontsVersion, ensureFontsLoaded] = useEdgeLabelFontLoader();
|
|
455
|
+
const result = useMemo(() => {
|
|
411
456
|
const view = viewId ? model.findView(viewId) : null;
|
|
412
|
-
const data = layoutRelationshipsView(computeRelationshipsView(subject, model, viewId, scope), scope === "view" ? view : null);
|
|
457
|
+
const data = layoutRelationshipsView(computeRelationshipsView(subject, model, viewId, scope), scope === "view" ? view : null, { withNavigateButtons: enableNavigateTo });
|
|
413
458
|
if (view && (scope === "global" || !data.subjectExistsInScope)) data.edges = data.edges.map((edge) => {
|
|
414
459
|
edge.existsInCurrentView = edge.relations.every((r) => view.includesRelation(r));
|
|
415
460
|
return edge;
|
|
@@ -420,9 +465,13 @@ function useRelationshipsView(subject, viewId, scope) {
|
|
|
420
465
|
subject,
|
|
421
466
|
viewId,
|
|
422
467
|
scope,
|
|
423
|
-
|
|
468
|
+
enableNavigateTo,
|
|
469
|
+
fontsVersion
|
|
424
470
|
]);
|
|
471
|
+
useEffect(() => {
|
|
472
|
+
ensureFontsLoaded(result.edges.flatMap((edge) => edge.label ?? []));
|
|
473
|
+
}, [result]);
|
|
474
|
+
return result;
|
|
425
475
|
}
|
|
426
476
|
|
|
427
|
-
//#endregion
|
|
428
477
|
export { LayoutRelationshipsViewResult, layoutRelationshipsView, useRelationshipsView };
|
|
@@ -5,7 +5,7 @@ import "@react-hookz/web";
|
|
|
5
5
|
import { hasAtLeast } from "remeda";
|
|
6
6
|
import { GroupElementKind, Queue, invariant, nonNullable } from "@likec4/core";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/overlays/relationships-browser/useViewToNodesEdges.ts
|
|
9
9
|
function viewToNodesEdge(view) {
|
|
10
10
|
const xynodes = [];
|
|
11
11
|
const xyedges = [];
|
|
@@ -129,6 +129,7 @@ function viewToNodesEdge(view) {
|
|
|
129
129
|
relations: edge.relations,
|
|
130
130
|
color: edge.color ?? "gray",
|
|
131
131
|
label: edge.label,
|
|
132
|
+
labelBBox: edge.labelBBox ?? null,
|
|
132
133
|
navigateTo: edge.navigateTo ?? null,
|
|
133
134
|
line: edge.line ?? "dashed",
|
|
134
135
|
existsInCurrentView: edge.existsInCurrentView
|
|
@@ -142,5 +143,4 @@ function viewToNodesEdge(view) {
|
|
|
142
143
|
};
|
|
143
144
|
}
|
|
144
145
|
|
|
145
|
-
//#endregion
|
|
146
146
|
export { viewToNodesEdge };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { Input, RelationshipsBrowserActorRef, RelationshipsBrowserLogic } from "./relationships-browser/actor.mjs";
|
|
3
2
|
import { ElementDetailsActorRef, ElementDetailsInput, ElementDetailsLogic } from "./element-details/actor.mjs";
|
|
4
|
-
import { Input
|
|
5
|
-
|
|
3
|
+
import { Input, RelationshipDetailsActorRef, RelationshipDetailsLogic } from "./relationship-details/actor.mjs";
|
|
4
|
+
import { Input as Input$1, RelationshipsBrowserActorRef, RelationshipsBrowserLogic } from "./relationships-browser/actor.mjs";
|
|
6
5
|
export declare namespace Overlays {
|
|
7
6
|
namespace ElementDetails {
|
|
8
7
|
interface Input extends ElementDetailsInput {}
|
|
@@ -10,14 +9,13 @@ export declare namespace Overlays {
|
|
|
10
9
|
interface ActorRef extends ElementDetailsActorRef {}
|
|
11
10
|
}
|
|
12
11
|
namespace RelationshipDetails {
|
|
13
|
-
type Input = Input
|
|
12
|
+
type Input = Input;
|
|
14
13
|
interface Logic extends RelationshipDetailsLogic {}
|
|
15
14
|
interface ActorRef extends RelationshipDetailsActorRef {}
|
|
16
15
|
}
|
|
17
16
|
namespace RelationshipsBrowser {
|
|
18
|
-
interface Input extends Input {}
|
|
17
|
+
interface Input extends Input$1 {}
|
|
19
18
|
interface Logic extends RelationshipsBrowserLogic {}
|
|
20
19
|
interface ActorRef extends RelationshipsBrowserActorRef {}
|
|
21
20
|
}
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
21
|
+
}
|
|
@@ -3,7 +3,6 @@ import { ViewPadding } from "../LikeC4Diagram.props.mjs";
|
|
|
3
3
|
import { ProjectsOverviewXYProps } from "./ProjectsOverviewXY.mjs";
|
|
4
4
|
import { ProjectId } from "@likec4/core";
|
|
5
5
|
import { LayoutedProjectsView } from "@likec4/core/compute-view";
|
|
6
|
-
//#region src/projects-overview/ProjectsOverview.d.ts
|
|
7
6
|
export type ProjectsOverviewProps = {
|
|
8
7
|
view: LayoutedProjectsView;
|
|
9
8
|
/**
|
|
@@ -11,5 +10,4 @@ export type ProjectsOverviewProps = {
|
|
|
11
10
|
*/
|
|
12
11
|
onNavigateToProject?: undefined | ((projectId: ProjectId) => void);
|
|
13
12
|
fitViewPadding?: ViewPadding | undefined;
|
|
14
|
-
} & ProjectsOverviewXYProps;
|
|
15
|
-
//#endregion
|
|
13
|
+
} & ProjectsOverviewXYProps;
|
|
@@ -10,7 +10,7 @@ import { ReactFlowProvider } from "@xyflow/react";
|
|
|
10
10
|
import { LayoutGroup } from "motion/react";
|
|
11
11
|
import { useActorRef } from "@xstate/react";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/projects-overview/ProjectsOverview.tsx
|
|
14
14
|
function ProjectsOverview({ view, onNavigateToProject, fitViewPadding = {
|
|
15
15
|
top: "50px",
|
|
16
16
|
bottom: "32px",
|
|
@@ -57,5 +57,4 @@ function ProjectsOverview({ view, onNavigateToProject, fitViewPadding = {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
//#endregion
|
|
61
60
|
export { ProjectsOverview };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
//#region src/projects-overview/ProjectsOverviewXY.d.ts
|
|
3
2
|
export type ProjectsOverviewXYProps = {
|
|
4
3
|
/**
|
|
5
4
|
* Background pattern
|
|
@@ -10,5 +9,4 @@ export type ProjectsOverviewXYProps = {
|
|
|
10
9
|
* @default - determined by the user's system preferences.
|
|
11
10
|
*/
|
|
12
11
|
colorScheme?: 'light' | 'dark' | undefined;
|
|
13
|
-
};
|
|
14
|
-
//#endregion
|
|
12
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { useCallbackRef } from "../hooks/useCallbackRef.mjs";
|
|
3
2
|
import { BaseXYFlow } from "../base/BaseXYFlow.mjs";
|
|
3
|
+
import { useCallbackRef } from "../hooks/useCallbackRef.mjs";
|
|
4
4
|
import { useProjectsOverviewActor } from "./context.mjs";
|
|
5
|
-
import { RelationshipEdge } from "./custom/edgeTypes.mjs";
|
|
6
5
|
import { ProjectNode } from "./custom/nodeTypes.mjs";
|
|
6
|
+
import { RelationshipEdge } from "./custom/edgeTypes.mjs";
|
|
7
7
|
import { useProjectsOverviewState, useProjectsOverviewXYStoreApi } from "./hooks.mjs";
|
|
8
8
|
import { cx } from "@likec4/styles/css";
|
|
9
9
|
import { memo } from "react";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
import { shallowEqual } from "fast-equals";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/projects-overview/ProjectsOverviewXY.tsx
|
|
14
14
|
const nodeTypes = { project: ProjectNode };
|
|
15
15
|
const edgeTypes = { relationship: RelationshipEdge };
|
|
16
16
|
const selector = (state) => ({
|
|
@@ -107,5 +107,4 @@ const ProjectsOverviewXY = memo(({ background = "dots", ...props }) => {
|
|
|
107
107
|
});
|
|
108
108
|
ProjectsOverviewXY.displayName = "ProjectsOverviewXY";
|
|
109
109
|
|
|
110
|
-
//#endregion
|
|
111
110
|
export { ProjectsOverviewXY };
|
|
@@ -10,7 +10,7 @@ import { animate, mapValue, motionValue, stagger, styleEffect } from "motion";
|
|
|
10
10
|
import { assertEvent, setup } from "xstate";
|
|
11
11
|
import { assign as assign$1, emit } from "xstate/actions";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/projects-overview/actor.ts
|
|
14
14
|
const machine = setup({
|
|
15
15
|
types: {
|
|
16
16
|
context: {},
|
|
@@ -265,5 +265,4 @@ function sleep(ms) {
|
|
|
265
265
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
//#endregion
|
|
269
268
|
export { fitDiagram, onMouseEnterOrLeave, projectOverviewLogic, restoreViewport };
|
|
@@ -2,12 +2,11 @@ import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
import { nonNullable } from "@likec4/core";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/projects-overview/context.ts
|
|
6
6
|
const ProjectsOverviewActorContext = createContext(null);
|
|
7
7
|
const ProjectsOverviewActorContextProvider = ProjectsOverviewActorContext.Provider;
|
|
8
8
|
function useProjectsOverviewActor() {
|
|
9
9
|
return nonNullable(useContext(ProjectsOverviewActorContext), "No ProjectsOverviewActorContext");
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
export { ProjectsOverviewActorContextProvider, useProjectsOverviewActor };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { bezierPath } from "../../utils/xyflow.mjs";
|
|
3
2
|
import { EdgeContainer } from "../../base-primitives/edge/EdgeContainer.mjs";
|
|
4
3
|
import { EdgeLabel } from "../../base-primitives/edge/EdgeLabel.mjs";
|
|
5
4
|
import { EdgeLabelContainer } from "../../base-primitives/edge/EdgeLabelContainer.mjs";
|
|
6
5
|
import { EdgePath } from "../../base-primitives/edge/EdgePath.mjs";
|
|
7
6
|
import { memoEdge } from "../../base-primitives/memoEdge.mjs";
|
|
7
|
+
import { bezierPath } from "../../utils/xyflow.mjs";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/projects-overview/custom/edgeTypes.tsx
|
|
11
11
|
const RelationshipEdge = memoEdge((edgeProps) => {
|
|
12
12
|
const path = bezierPath(edgeProps.data.points);
|
|
13
13
|
return /* @__PURE__ */ jsxs(EdgeContainer, {
|
|
@@ -22,5 +22,4 @@ const RelationshipEdge = memoEdge((edgeProps) => {
|
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { RelationshipEdge };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconZoomScan from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
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";
|
|
3
|
+
import { DefaultHandles } from "../../base-primitives/NodeHandles.mjs";
|
|
3
4
|
import { ElementActionButtons } from "../../base-primitives/element/ElementActionButtons.mjs";
|
|
4
5
|
import { ElementData } from "../../base-primitives/element/ElementData.mjs";
|
|
5
6
|
import { ElementNodeContainer } from "../../base-primitives/element/ElementNodeContainer.mjs";
|
|
6
7
|
import { ElementShape } from "../../base-primitives/element/ElementShape.mjs";
|
|
7
|
-
import { DefaultHandles } from "../../base-primitives/NodeHandles.mjs";
|
|
8
8
|
import { useProjectsOverviewActor } from "../context.mjs";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useCallbackRef } from "@mantine/hooks";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/projects-overview/custom/nodeTypes.tsx
|
|
13
13
|
function ProjectNode(props) {
|
|
14
14
|
const actor = useProjectsOverviewActor();
|
|
15
15
|
const navigateTo = useCallbackRef((e) => {
|
|
@@ -39,5 +39,4 @@ function ProjectNode(props) {
|
|
|
39
39
|
}, props.id);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
//#endregion
|
|
43
42
|
export { ProjectNode };
|
|
@@ -4,7 +4,7 @@ import { useReactFlow, useStoreApi } from "@xyflow/react";
|
|
|
4
4
|
import { shallowEqual } from "fast-equals";
|
|
5
5
|
import { useSelector } from "@xstate/react";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/projects-overview/hooks.ts
|
|
8
8
|
function useProjectsOverviewState(selector, compare = shallowEqual) {
|
|
9
9
|
const actor = useProjectsOverviewActor();
|
|
10
10
|
return useSelector(actor, selector, compare);
|
|
@@ -13,5 +13,4 @@ function useProjectsOverviewXYStoreApi() {
|
|
|
13
13
|
return useStoreApi();
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
//#endregion
|
|
17
16
|
export { useProjectsOverviewState, useProjectsOverviewXYStoreApi };
|
|
@@ -2,7 +2,7 @@ import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { ZIndexes } from "../base/const.mjs";
|
|
3
3
|
import { map } from "remeda";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/projects-overview/layouted-to-xyflow.ts
|
|
6
6
|
function layoutedProjectsViewToXYFlow(view) {
|
|
7
7
|
return {
|
|
8
8
|
xynodes: map(view.nodes, projectNodeToXY),
|
|
@@ -51,5 +51,4 @@ function projectEdgeToXY({ id, source, target, ...edge }) {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
//#endregion
|
|
55
54
|
export { layoutedProjectsViewToXYFlow };
|
|
@@ -2,10 +2,9 @@ import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { NavigationPanel } from "../../components/NavigationPanel.mjs";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/projects-overview/panel/ProjectsOverviewPanel.tsx
|
|
6
6
|
const ProjectsOverviewPanel = () => {
|
|
7
7
|
return /* @__PURE__ */ jsx(NavigationPanel.Root, { children: /* @__PURE__ */ jsxs(NavigationPanel.Body, { children: [/* @__PURE__ */ jsx(NavigationPanel.Logo, {}), /* @__PURE__ */ jsx(NavigationPanel.Label, { children: "Projects Overview" })] }) });
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
//#endregion
|
|
11
10
|
export { ProjectsOverviewPanel };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/projects-overview/persistence.ts
|
|
4
4
|
const key = `likec4:projects-overview:lastViewport`;
|
|
5
5
|
const ProjectsOverviewViewportPersistence = {
|
|
6
6
|
read() {
|
|
@@ -22,5 +22,4 @@ const ProjectsOverviewViewportPersistence = {
|
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { ProjectsOverviewViewportPersistence };
|
package/dist/search/Search.d.mts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import "./searchActor.mjs";
|
|
3
|
-
//#region src/search/Search.d.ts
|
|
4
3
|
export declare const dialogCss: string;
|
|
5
4
|
export declare const bodyCss: string;
|
|
6
5
|
/**
|
|
7
6
|
* The shared search panel content used by both diagram and overview search.
|
|
8
7
|
* Must be rendered inside a SearchContext.Provider.
|
|
9
8
|
*/
|
|
10
|
-
export declare const SearchPanelContent: import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
-
//#endregion
|
|
9
|
+
export declare const SearchPanelContent: import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/search/Search.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { PortalToContainer } from "../components/PortalToContainer.mjs";
|
|
2
3
|
import { useDiagram } from "../hooks/safeContext.mjs";
|
|
3
4
|
import { Overlay } from "../overlays/overlay/Overlay.mjs";
|
|
4
|
-
import { useSearchContext } from "./SearchContext.mjs";
|
|
5
|
-
import { focusToFirstFoundElement, moveFocusToSearchInput } from "./components/utils.mjs";
|
|
6
|
-
import { ViewsColumn } from "./components/ViewsColum.mjs";
|
|
7
5
|
import { ElementsColumn } from "./components/ElementsColumn.mjs";
|
|
8
6
|
import { PickView } from "./components/PickView.mjs";
|
|
9
7
|
import { SearchByTags } from "./components/SearchByTags.mjs";
|
|
10
8
|
import { LikeC4SearchInput } from "./components/SearchInput.mjs";
|
|
9
|
+
import { focusToFirstFoundElement, moveFocusToSearchInput } from "./components/utils.mjs";
|
|
10
|
+
import { ViewsColumn } from "./components/ViewsColum.mjs";
|
|
11
|
+
import { useSearchContext } from "./SearchContext.mjs";
|
|
11
12
|
import { XStateSearchAdapter } from "./XStateSearchAdapter.mjs";
|
|
12
13
|
import { css } from "@likec4/styles/css";
|
|
13
14
|
import { forwardRef, memo, useRef } from "react";
|
|
@@ -20,7 +21,7 @@ import { useSelector } from "@xstate/react";
|
|
|
20
21
|
import { useHotkeys, useMergedRef } from "@mantine/hooks";
|
|
21
22
|
import { Box as Box$1, VStack } from "@likec4/styles/jsx";
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
// src/search/Search.tsx
|
|
24
25
|
const dialogCss = css({
|
|
25
26
|
backgroundColor: `[rgb(34 34 34 / var(--_opacity, 95%))]`,
|
|
26
27
|
_light: { backgroundColor: `[rgb(250 250 250 / var(--_opacity, 95%))]` },
|
|
@@ -42,6 +43,10 @@ const bodyCss = css({
|
|
|
42
43
|
paddingBottom: "sm",
|
|
43
44
|
background: "transparent"
|
|
44
45
|
});
|
|
46
|
+
const classes = {
|
|
47
|
+
dialog: dialogCss,
|
|
48
|
+
body: bodyCss
|
|
49
|
+
};
|
|
45
50
|
const scrollAreaCss = css({
|
|
46
51
|
height: ["100%", "100cqh"],
|
|
47
52
|
"& .mantine-ScrollArea-viewport": {
|
|
@@ -68,7 +73,7 @@ const Search = memo(({ searchActorRef }) => {
|
|
|
68
73
|
};
|
|
69
74
|
const open = (event) => {
|
|
70
75
|
event.stopPropagation();
|
|
71
|
-
diagram.
|
|
76
|
+
diagram.openSearch();
|
|
72
77
|
};
|
|
73
78
|
useHotkeys(isOpened ? [] : [[
|
|
74
79
|
"mod+k",
|
|
@@ -79,7 +84,7 @@ const Search = memo(({ searchActorRef }) => {
|
|
|
79
84
|
open,
|
|
80
85
|
{ preventDefault: true }
|
|
81
86
|
]]);
|
|
82
|
-
return /* @__PURE__ */ jsx(AnimatePresence, {
|
|
87
|
+
return /* @__PURE__ */ jsx(PortalToContainer, { children: /* @__PURE__ */ jsx(AnimatePresence, {
|
|
83
88
|
onExitComplete: () => {
|
|
84
89
|
searchActorRef.send({ type: "animation.presence.end" });
|
|
85
90
|
},
|
|
@@ -87,10 +92,7 @@ const Search = memo(({ searchActorRef }) => {
|
|
|
87
92
|
fullscreen: true,
|
|
88
93
|
withBackdrop: false,
|
|
89
94
|
backdrop: { opacity: .9 },
|
|
90
|
-
classes
|
|
91
|
-
dialog: dialogCss,
|
|
92
|
-
body: bodyCss
|
|
93
|
-
},
|
|
95
|
+
classes,
|
|
94
96
|
openDelay: 100,
|
|
95
97
|
onClose: close,
|
|
96
98
|
"data-likec4-search": "true",
|
|
@@ -99,7 +101,7 @@ const Search = memo(({ searchActorRef }) => {
|
|
|
99
101
|
children: /* @__PURE__ */ jsx(SearchOverlayBody, { searchActorRef })
|
|
100
102
|
})
|
|
101
103
|
})
|
|
102
|
-
});
|
|
104
|
+
}) });
|
|
103
105
|
});
|
|
104
106
|
Search.displayName = "Search";
|
|
105
107
|
function SearchOverlayBody({ searchActorRef }) {
|
|
@@ -197,5 +199,4 @@ const SearchPanelContent = forwardRef((_, ref) => {
|
|
|
197
199
|
});
|
|
198
200
|
SearchPanelContent.displayName = "SearchPanelContent";
|
|
199
201
|
|
|
200
|
-
//#endregion
|
|
201
202
|
export { Search, SearchPanelContent, bodyCss, dialogCss, scrollAreaCss };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { Fqn, ViewId } from "@likec4/core/types";
|
|
3
|
-
//#region src/search/SearchContext.d.ts
|
|
4
3
|
export interface SearchContextValue {
|
|
5
4
|
searchValue: string;
|
|
6
5
|
setSearchValue: (value: string) => void;
|
|
@@ -19,5 +18,4 @@ export declare function useSearchContext(): SearchContextValue;
|
|
|
19
18
|
* Normalize a raw search string for comparison.
|
|
20
19
|
* Extracted as a pure function so both XState and standalone adapters can reuse it.
|
|
21
20
|
*/
|
|
22
|
-
export declare function normalizeSearch(value: string): string;
|
|
23
|
-
//#endregion
|
|
21
|
+
export declare function normalizeSearch(value: string): string;
|
|
@@ -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/search/SearchContext.tsx
|
|
5
5
|
const SearchContext = createContext(null);
|
|
6
6
|
function useSearchContext() {
|
|
7
7
|
const ctx = useContext(SearchContext);
|
|
@@ -19,5 +19,4 @@ function normalizeSearch(value) {
|
|
|
19
19
|
return v.length > 1 ? v : "";
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
//#endregion
|
|
23
22
|
export { SearchContext, normalizeSearch, useSearchContext };
|
|
@@ -6,7 +6,7 @@ import { useMemo } from "react";
|
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { useSelector } from "@xstate/react";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/search/XStateSearchAdapter.tsx
|
|
10
10
|
const selectSearchValue = (s) => s.context.searchValue;
|
|
11
11
|
const selectPickViewFor = (s) => s.context.pickViewFor;
|
|
12
12
|
const selectOpenedWithSearch = (s) => s.context.openedWithSearch;
|
|
@@ -68,5 +68,4 @@ function XStateSearchAdapter({ searchActorRef, children }) {
|
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
//#endregion
|
|
72
71
|
export { XStateSearchAdapter };
|
|
@@ -2,7 +2,7 @@ import { focusable } from "./_shared.css.mjs";
|
|
|
2
2
|
import { css } from "@likec4/styles/css";
|
|
3
3
|
import { container } from "@likec4/styles/patterns";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/search/components/ElementsColumn.css.ts
|
|
6
6
|
const whenContainerIsNarrow = `@container likec4-tree (max-width: 450px)`;
|
|
7
7
|
const treeNode = css({
|
|
8
8
|
outline: "none",
|
|
@@ -50,5 +50,4 @@ const elementViewsCount = css({
|
|
|
50
50
|
[whenContainerIsNarrow]: { display: "none" }
|
|
51
51
|
});
|
|
52
52
|
|
|
53
|
-
//#endregion
|
|
54
53
|
export { elementExpandIcon, elementIcon, elementId, elementTitleAndId, elementViewsCount, treeLabel, treeNode, treeRoot, treeSubtree };
|