@likec4/diagram 1.47.0 → 1.49.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/LICENSE +1 -1
- package/README.md +8 -10
- package/adhoc-editor/package.json +4 -0
- package/dist/LikeC4Diagram.d.ts +2 -1
- package/dist/LikeC4Diagram.js +85 -81
- package/dist/LikeC4Diagram.props.d.ts +10 -6
- package/dist/LikeC4ModelProvider.d.ts +4 -4
- package/dist/LikeC4ModelProvider.js +2 -2
- package/dist/LikeC4ProjectsOverview.d.ts +3 -2
- package/dist/LikeC4ProjectsProvider.d.ts +2 -1
- package/dist/LikeC4ProjectsProvider.js +10 -8
- package/dist/LikeC4Styles.d.ts +3 -6
- package/dist/LikeC4Styles.js +44 -43
- package/dist/LikeC4View.d.ts +22 -1
- package/dist/LikeC4View.js +40 -25
- package/dist/ReactLikeC4.d.ts +13 -2
- package/dist/ReactLikeC4.js +8 -4
- package/dist/StaticLikeC4Diagram.d.ts +2 -1
- package/dist/StaticLikeC4Diagram.js +1 -0
- package/dist/_virtual/store-1b2fbb72.cjs.js +3 -0
- package/dist/_virtual/xstate-store-react.cjs.js +5 -0
- package/dist/_virtual/xstate-store-react.cjs2.js +3 -0
- package/dist/adhoc-editor/EditorPanel.d.ts +1 -0
- package/dist/adhoc-editor/EditorPanel.js +105 -0
- package/dist/adhoc-editor/ElementsTree.d.ts +2 -0
- package/dist/adhoc-editor/ElementsTree.js +142 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +4 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +74 -0
- package/dist/adhoc-editor/components/Tree.d.ts +48 -0
- package/dist/adhoc-editor/components/Tree.js +296 -0
- package/dist/adhoc-editor/hooks.d.ts +14 -0
- package/dist/adhoc-editor/hooks.js +29 -0
- package/dist/adhoc-editor/index.d.ts +2 -0
- package/dist/adhoc-editor/index.js +1 -0
- package/dist/adhoc-editor/state/ActorProvider.d.ts +5 -0
- package/dist/adhoc-editor/state/ActorProvider.js +40 -0
- package/dist/adhoc-editor/state/actor.d.ts +13 -0
- package/dist/adhoc-editor/state/actor.editor.d.ts +56 -0
- package/dist/adhoc-editor/state/actor.editor.js +205 -0
- package/dist/adhoc-editor/state/actor.js +16 -0
- package/dist/adhoc-editor/state/actor.layouter.d.ts +51 -0
- package/dist/adhoc-editor/state/actor.layouter.js +70 -0
- package/dist/adhoc-editor/state/actor.types.d.ts +63 -0
- package/dist/adhoc-editor/state/actor.types.js +29 -0
- package/dist/adhoc-editor/state/panel.d.ts +95 -0
- package/dist/adhoc-editor/state/panel.js +139 -0
- package/dist/adhoc-editor/state/utils.d.ts +17 -0
- package/dist/adhoc-editor/state/utils.js +32 -0
- package/dist/adhoc-editor/useElementsTree.d.ts +18 -0
- package/dist/adhoc-editor/useElementsTree.js +130 -0
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +6 -0
- package/dist/base/const.d.ts +2 -0
- package/dist/base/const.js +2 -1
- package/dist/base/updateEdges.js +26 -3
- package/dist/base/updateNodes.js +8 -5
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/Markdown.js +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +4 -2
- package/dist/base-primitives/NodeHandles.js +46 -19
- package/dist/base-primitives/compound/CompoundActionButton.js +28 -12
- package/dist/base-primitives/compound/CompoundDetailsButton.js +24 -9
- package/dist/base-primitives/compound/CompoundNodeContainer.js +11 -8
- package/dist/base-primitives/compound/CompoundTitle.js +1 -2
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +5 -2
- package/dist/base-primitives/edge/EdgeLabel.js +3 -4
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +2 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +17 -20
- package/dist/base-primitives/element/ElementActionButtons.js +57 -59
- package/dist/base-primitives/element/ElementData.d.ts +7 -7
- package/dist/base-primitives/element/ElementData.js +61 -48
- package/dist/base-primitives/element/ElementDetailsButton.js +48 -18
- package/dist/base-primitives/element/ElementNodeContainer.d.ts +5 -5
- package/dist/base-primitives/element/ElementNodeContainer.js +24 -10
- package/dist/base-primitives/element/ElementShape.d.ts +2 -2
- package/dist/base-primitives/element/ElementShape.js +70 -7
- package/dist/base-primitives/element/ElementTags.d.ts +6 -2
- package/dist/base-primitives/element/ElementTags.js +55 -32
- package/dist/base-primitives/index.d.ts +1 -1
- package/dist/base-primitives/memoEdge.js +1 -1
- package/dist/base-primitives/memoNode.js +1 -1
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +3 -3
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +5 -26
- package/dist/components/PortalToContainer.js +3 -4
- package/dist/components/RootContainer.js +9 -19
- package/dist/components/ViewNotFound.d.ts +3 -3
- package/dist/components/ViewNotFound.js +30 -26
- package/dist/context/CurrentViewModelProvider.d.ts +2 -0
- package/dist/context/CurrentViewModelProvider.js +12 -0
- package/dist/context/DefaultMantineProvider.d.ts +2 -0
- package/dist/context/DefaultMantineProvider.js +75 -0
- package/dist/context/DiagramEventHandlers.d.ts +5 -5
- package/dist/context/DiagramEventHandlers.js +10 -4
- package/dist/context/DiagramFeatures.d.ts +8 -7
- package/dist/context/DiagramFeatures.js +16 -13
- package/dist/context/EnsureMantine.d.ts +0 -3
- package/dist/context/EnsureMantine.js +3 -4
- package/dist/context/FramerMotionConfig.d.ts +1 -3
- package/dist/context/IconRenderer.d.ts +19 -4
- package/dist/context/IconRenderer.js +52 -25
- package/dist/context/LikeC4ModelContext.d.ts +10 -5
- package/dist/context/LikeC4ModelContext.js +11 -3
- package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
- package/dist/context/LikeC4ProjectsContext.js +6 -2
- package/dist/context/RootContainerContext.d.ts +10 -3
- package/dist/context/RootContainerContext.js +8 -3
- package/dist/context/TagStylesContext.js +13 -5
- package/dist/custom/hooks.d.ts +2 -2
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +16 -15
- package/dist/editor/LikeC4EditorCallbacks.d.ts +18 -0
- package/dist/editor/LikeC4EditorCallbacks.js +5 -0
- package/dist/editor/LikeC4EditorProvider.d.ts +30 -18
- package/dist/editor/LikeC4EditorProvider.js +3 -3
- package/dist/editor/applyChangesToManualLayout.js +7 -6
- package/dist/editor/editorActor.actions.d.ts +25 -25
- package/dist/editor/editorActor.actions.js +22 -22
- package/dist/editor/editorActor.setup.d.ts +84 -0
- package/dist/editor/editorActor.setup.js +38 -0
- package/dist/editor/editorActor.states.d.ts +9 -0
- package/dist/editor/{editorActor.js → editorActor.states.js} +21 -72
- package/dist/editor/index.d.ts +4 -3
- package/dist/editor/useEditorActorLogic.d.ts +2 -565
- package/dist/editor/useEditorActorLogic.js +14 -21
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/safeContext.d.ts +4 -5
- package/dist/hooks/useCallbackRef.d.ts +6 -0
- package/dist/hooks/useCallbackRef.js +7 -6
- package/dist/hooks/useCurrentView.js +5 -10
- package/dist/hooks/useCurrentViewModel.d.ts +8 -2
- package/dist/hooks/useCurrentViewModel.js +3 -7
- package/dist/hooks/useDiagram.d.ts +9 -1
- package/dist/hooks/useDiagram.js +10 -4
- package/dist/hooks/useDiagramCompareLayout.d.ts +6 -6
- package/dist/hooks/useDiagramCompareLayout.js +1 -1
- package/dist/hooks/useLikeC4ElementsTree.d.ts +1 -1
- package/dist/hooks/useLikeC4ElementsTree.js +2 -2
- package/dist/hooks/useLikeC4Model.d.ts +6 -2
- package/dist/hooks/useLikeC4Model.js +7 -9
- package/dist/hooks/useLikeC4Project.d.ts +4 -6
- package/dist/hooks/useLikeC4Project.js +19 -31
- package/dist/hooks/useLikeC4Styles.js +3 -9
- package/dist/hooks/useMantinePortalProps.d.ts +1 -1
- package/dist/hooks/useMediaPrint.d.ts +0 -2
- package/dist/hooks/useOverlaysActor.js +4 -4
- package/dist/hooks/useSearchActor.js +4 -4
- package/dist/hooks/useSetState.d.ts +6 -1
- package/dist/hooks/useSetState.js +7 -4
- package/dist/hooks/useXYFlow.d.ts +7 -1
- package/dist/hooks/useXYFlow.js +4 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -1
- package/dist/likec4diagram/DiagramUI.js +1 -3
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -1
- package/dist/likec4diagram/DiagramXYFlow.js +29 -18
- package/dist/likec4diagram/convert-to-xyflow.d.ts +2 -1
- package/dist/likec4diagram/convert-to-xyflow.js +2 -6
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +34 -37
- package/dist/likec4diagram/custom/edges/edges.css.js +2 -1
- package/dist/likec4diagram/custom/edges/useControlPoints.js +3 -3
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +3 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +52 -34
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/ElementActions.js +7 -10
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +3 -20
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +286 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +10 -6
- package/dist/likec4diagram/custom/nodes/nodes.js +30 -8
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +5 -4
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +6 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +14 -9
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +4 -4
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +3 -3
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +16 -36
- package/dist/likec4diagram/relationship-popover/components.d.ts +7 -0
- package/dist/likec4diagram/relationship-popover/components.js +39 -0
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
- package/dist/likec4diagram/state/DiagramActorProvider.js +39 -66
- package/dist/likec4diagram/state/assign.d.ts +1 -1
- package/dist/likec4diagram/state/createViewChange.js +16 -4
- package/dist/likec4diagram/state/diagram-api.d.ts +11 -0
- package/dist/likec4diagram/state/diagram-api.js +15 -0
- package/dist/likec4diagram/state/machine.actions.d.ts +92 -0
- package/dist/likec4diagram/state/machine.actions.js +127 -58
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +23 -2
- package/dist/likec4diagram/state/machine.actions.layout.js +68 -15
- package/dist/likec4diagram/state/machine.d.ts +1 -1
- package/dist/likec4diagram/state/machine.js +35 -31
- package/dist/likec4diagram/state/machine.setup.d.ts +40 -7
- package/dist/likec4diagram/state/machine.setup.js +13 -4
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +32 -2
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +1 -1
- package/dist/likec4diagram/state/machine.state.navigating.js +82 -50
- package/dist/likec4diagram/state/machine.state.ready.d.ts +565 -579
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +17 -148
- package/dist/likec4diagram/state/machine.state.ready.focused.js +6 -14
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +11 -96
- package/dist/likec4diagram/state/machine.state.ready.idle.js +7 -12
- package/dist/likec4diagram/state/machine.state.ready.js +89 -70
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +4 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +4 -3
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +145 -2
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +29 -21
- package/dist/likec4diagram/state/types.d.ts +1 -1
- package/dist/likec4diagram/state/utils.d.ts +14 -14
- package/dist/likec4diagram/state/utils.js +12 -4
- package/dist/likec4diagram/types.d.ts +11 -3
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +2 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/useLayoutConstraints.d.ts +12 -12
- package/dist/likec4diagram/useLayoutConstraints.js +126 -84
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +11 -3
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.d.ts +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +15 -8
- package/dist/navigationpanel/NavigationPanel.js +4 -3
- package/dist/navigationpanel/NavigationPanelControls.js +4 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +13 -13
- package/dist/navigationpanel/_common.d.ts +1 -1
- package/dist/navigationpanel/_common.js +2 -3
- package/dist/navigationpanel/actor.js +1 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.js +155 -29
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -0
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +264 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +4 -5
- package/dist/navigationpanel/controls/DetailsControls.js +7 -7
- package/dist/navigationpanel/controls/LayoutWarning.js +2 -2
- package/dist/navigationpanel/controls/LogoButton.js +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -2
- package/dist/navigationpanel/controls/SearchControl.js +8 -12
- package/dist/navigationpanel/controls/ToggleReadonly.js +5 -6
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +12 -6
- package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
- package/dist/navigationpanel/editorpanel/styles.js +4 -4
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/styles.css.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +6 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +77 -77
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +1 -1
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/dist/store-1b2fbb72.cjs.js +742 -0
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/react/dist/xstate-store-react.cjs.js +175 -0
- package/dist/overlays/element-details/ElementDetailsCard.css.js +15 -15
- package/dist/overlays/element-details/ElementDetailsCard.js +39 -40
- package/dist/overlays/element-details/MetadataValue.js +11 -12
- package/dist/overlays/element-details/TabPanelDeployments.js +8 -6
- package/dist/overlays/element-details/TabPanelRelationships.css.js +10 -30
- package/dist/overlays/element-details/TabPanelRelationships.js +4 -5
- package/dist/overlays/element-details/TabPanelStructure.css.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +3 -2
- package/dist/overlays/overlaysActor.js +19 -1
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +0 -5
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -4
- package/dist/overlays/relationship-details/SelectEdge.css.js +6 -6
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/compute.js +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationship-details/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationship-details/layout.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +0 -5
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +116 -21
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/actor.js +1 -1
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +21 -6
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationships-browser/layout.d.ts +1 -1
- package/dist/overlays/relationships-browser/layout.js +1 -1
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +1 -1
- package/dist/projects-overview/ProjectsOverview.js +2 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.ts +1 -5
- package/dist/projects-overview/ProjectsOverviewXY.js +1 -1
- package/dist/projects-overview/actor.d.ts +1 -1
- package/dist/projects-overview/actor.js +8 -31
- package/dist/projects-overview/context.d.ts +2 -2
- package/dist/projects-overview/context.js +2 -1
- package/dist/projects-overview/custom/nodeTypes.js +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.js +1 -1
- package/dist/search/Search.d.ts +2 -4
- package/dist/search/Search.js +67 -44
- package/dist/search/components/ElementsColumn.css.js +6 -6
- package/dist/search/components/ElementsColumn.js +93 -60
- package/dist/search/components/PickView.d.ts +3 -1
- package/dist/search/components/PickView.js +12 -7
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +2 -2
- package/dist/search/components/ViewsColum.d.ts +2 -1
- package/dist/search/components/ViewsColum.js +39 -35
- package/dist/search/components/ViewsColumn.css.js +1 -1
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/components/_shared.css.js +12 -12
- package/dist/search/components/utils.js +1 -4
- package/dist/search/hooks.d.ts +1 -6
- package/dist/search/hooks.js +15 -9
- package/dist/search/searchActor.d.ts +12 -2
- package/dist/search/searchActor.js +60 -4
- package/dist/shadowroot/ShadowRoot.d.ts +5 -2
- package/dist/shadowroot/ShadowRoot.js +25 -22
- package/dist/shadowroot/styles.css.d.ts +0 -2
- package/dist/shadowroot/styles.css.js +4 -36
- package/dist/styles-font.css2.js +1 -1
- package/dist/styles.css2.js +1 -1
- package/dist/utils/view-bounds.d.ts +3 -2
- package/dist/utils/view-bounds.js +10 -6
- package/dist/utils/xyflow.d.ts +27 -6
- package/dist/utils/xyflow.js +68 -23
- package/package.json +39 -37
- package/panda.buildinfo.json +226 -161
- package/styles-font.css +1 -1
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/bundle/index.js +0 -51974
- package/bundle/package.json +0 -4
- package/dist/editor/__tests__/fixture.d.ts +0 -205
- package/dist/editor/editorActor.d.ts +0 -653
- package/dist/likec4diagram/relationship-popover/styles.css.d.ts +0 -2
- package/dist/likec4diagram/relationship-popover/styles.css.js +0 -28
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -14
- package/dist/overlays/relationships-browser/custom/styles.css.d.ts +0 -1
- package/dist/overlays/relationships-browser/custom/styles.css.js +0 -14
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { nameFromFqn } from '@likec4/core';
|
|
3
|
-
import { Stack, Group, Box, ThemeIcon, Text, Tooltip as Tooltip$1
|
|
3
|
+
import { Stack, Group, Box, ThemeIcon, Text, ActionIcon, Paper, Tooltip as Tooltip$1 } from '@mantine/core';
|
|
4
4
|
import { useSelector } from '@xstate/react';
|
|
5
5
|
import { useCallback } from 'react';
|
|
6
6
|
import { unique } from 'remeda';
|
|
7
7
|
import { RelationshipsBrowser } from '../relationships-browser/RelationshipsBrowser.js';
|
|
8
8
|
import { useElementDetailsActorRef } from './actorContext.js';
|
|
9
9
|
import { fqn, xyflow, relationshipStat } from './TabPanelRelationships.css.js';
|
|
10
|
+
import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
|
|
11
|
+
import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
|
|
12
|
+
import IconExternalLink from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js';
|
|
10
13
|
import { useDiagram } from '../../hooks/safeContext.js';
|
|
11
|
-
import 'fast-equals';
|
|
12
|
-
import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
|
|
13
|
-
import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
|
|
14
|
-
import IconExternalLink from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js';
|
|
15
14
|
|
|
16
15
|
const Tooltip = Tooltip$1.withProps({
|
|
17
16
|
color: "dark",
|
|
@@ -8,7 +8,7 @@ const elementLabel = css({
|
|
|
8
8
|
display: "inline-flex",
|
|
9
9
|
transition: "fast",
|
|
10
10
|
border: `1px dashed`,
|
|
11
|
-
borderColor: "
|
|
11
|
+
borderColor: "default.border",
|
|
12
12
|
borderRadius: "sm",
|
|
13
13
|
px: "md",
|
|
14
14
|
py: "xs",
|
|
@@ -24,8 +24,8 @@ const elementLabel = css({
|
|
|
24
24
|
_hover: {
|
|
25
25
|
transitionTimingFunction: "out",
|
|
26
26
|
borderStyle: "solid",
|
|
27
|
-
color: "
|
|
28
|
-
background: "
|
|
27
|
+
color: "default.color",
|
|
28
|
+
background: "default.hover",
|
|
29
29
|
"& > *": {
|
|
30
30
|
transitionTimingFunction: "out",
|
|
31
31
|
transform: "translateX(1px)"
|
|
@@ -2,11 +2,12 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useTree, Alert, Anchor, Tree, Box, Text, Pill } from '@mantine/core';
|
|
3
3
|
import { useMemo, useEffect } from 'react';
|
|
4
4
|
import { treeNodeLabel, elementLabel } from './TabPanelStructure.css.js';
|
|
5
|
-
import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
5
|
+
import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
|
|
6
6
|
|
|
7
7
|
const ElementLabel = ({
|
|
8
8
|
element
|
|
9
9
|
}) => /* @__PURE__ */ jsx(Box, { className: elementLabel, children: /* @__PURE__ */ jsx(Text, { component: "div", fz: "sm", fw: "500", children: element.title }) });
|
|
10
|
+
const infoIcon = /* @__PURE__ */ jsx(IconInfoCircle, {});
|
|
10
11
|
const setHoveredNode = () => {
|
|
11
12
|
};
|
|
12
13
|
function TabPanelStructure({
|
|
@@ -57,7 +58,7 @@ function TabPanelStructure({
|
|
|
57
58
|
tree.expandAllNodes();
|
|
58
59
|
}, [data]);
|
|
59
60
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
-
/* @__PURE__ */ jsxs(Alert, { variant: "light", color: "orange", title: "In development", icon:
|
|
61
|
+
/* @__PURE__ */ jsxs(Alert, { variant: "light", color: "orange", title: "In development", icon: infoIcon, children: [
|
|
61
62
|
"We need your feedback. Share your thoughts and ideas -",
|
|
62
63
|
" ",
|
|
63
64
|
/* @__PURE__ */ jsx(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getHotkeyHandler } from '@mantine/hooks';
|
|
2
2
|
import { last, isString, reverse } from 'remeda';
|
|
3
|
-
import { setup,
|
|
3
|
+
import { setup, assertEvent, fromCallback } from 'xstate';
|
|
4
4
|
import { elementDetailsLogic } from './element-details/actor.js';
|
|
5
5
|
import { relationshipDetailsLogic } from './relationship-details/actor.js';
|
|
6
6
|
import { relationshipsBrowserLogic } from './relationships-browser/actor.js';
|
|
@@ -49,6 +49,15 @@ const machine = setup({
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
+
const emitOpened = (overlay) => machine.emit({
|
|
53
|
+
type: "opened",
|
|
54
|
+
overlay: overlay.split("-")[0]
|
|
55
|
+
});
|
|
56
|
+
const emitClosed = (overlay) => machine.emit({
|
|
57
|
+
type: "closed",
|
|
58
|
+
overlay: overlay.split("-")[0]
|
|
59
|
+
});
|
|
60
|
+
const emitIdle = () => machine.emit({ type: "idle" });
|
|
52
61
|
const closeLastOverlay = () => machine.enqueueActions(({ context, enqueue }) => {
|
|
53
62
|
if (context.overlays.length === 0) {
|
|
54
63
|
return;
|
|
@@ -62,6 +71,7 @@ const closeLastOverlay = () => machine.enqueueActions(({ context, enqueue }) =>
|
|
|
62
71
|
enqueue.assign({
|
|
63
72
|
overlays: context.overlays.filter((o) => o.id !== lastOverlay)
|
|
64
73
|
});
|
|
74
|
+
enqueue(emitClosed(lastOverlay));
|
|
65
75
|
});
|
|
66
76
|
const closeSpecificOverlay = () => machine.enqueueActions(({ context, enqueue, event }) => {
|
|
67
77
|
assertEvent(event, "close");
|
|
@@ -76,12 +86,14 @@ const closeSpecificOverlay = () => machine.enqueueActions(({ context, enqueue, e
|
|
|
76
86
|
enqueue.assign({
|
|
77
87
|
overlays: context.overlays.filter((o) => o.id !== toClose)
|
|
78
88
|
});
|
|
89
|
+
enqueue(emitClosed(toClose));
|
|
79
90
|
}
|
|
80
91
|
});
|
|
81
92
|
const closeAllOverlays = () => machine.enqueueActions(({ context, enqueue }) => {
|
|
82
93
|
for (const { id } of reverse(context.overlays)) {
|
|
83
94
|
enqueue.sendTo(id, { type: "close" });
|
|
84
95
|
enqueue.stopChild(id);
|
|
96
|
+
enqueue(emitClosed(id));
|
|
85
97
|
}
|
|
86
98
|
enqueue.assign({ overlays: [] });
|
|
87
99
|
});
|
|
@@ -107,6 +119,7 @@ const openElementDetails = () => machine.enqueueActions(({ context, enqueue, eve
|
|
|
107
119
|
}
|
|
108
120
|
]
|
|
109
121
|
});
|
|
122
|
+
enqueue(emitOpened(id));
|
|
110
123
|
});
|
|
111
124
|
const openRelationshipDetails = () => machine.enqueueActions(({ context, enqueue, event }) => {
|
|
112
125
|
assertEvent(event, "open.relationshipDetails");
|
|
@@ -134,6 +147,7 @@ const openRelationshipDetails = () => machine.enqueueActions(({ context, enqueue
|
|
|
134
147
|
}
|
|
135
148
|
]
|
|
136
149
|
});
|
|
150
|
+
enqueue(emitOpened(id));
|
|
137
151
|
});
|
|
138
152
|
const openRelationshipsBrowser = () => machine.enqueueActions(({ context, enqueue, event }) => {
|
|
139
153
|
assertEvent(event, "open.relationshipsBrowser");
|
|
@@ -163,6 +177,7 @@ const openRelationshipsBrowser = () => machine.enqueueActions(({ context, enqueu
|
|
|
163
177
|
}
|
|
164
178
|
]
|
|
165
179
|
});
|
|
180
|
+
enqueue(emitOpened(id));
|
|
166
181
|
});
|
|
167
182
|
const openOverlay = () => machine.enqueueActions(({ enqueue, event }) => {
|
|
168
183
|
assertEvent(event, [
|
|
@@ -200,6 +215,9 @@ const _overlaysActorLogic = machine.createMachine({
|
|
|
200
215
|
initial: "idle",
|
|
201
216
|
states: {
|
|
202
217
|
idle: {
|
|
218
|
+
entry: [
|
|
219
|
+
emitIdle()
|
|
220
|
+
],
|
|
203
221
|
on: {
|
|
204
222
|
"open.*": {
|
|
205
223
|
actions: openOverlay(),
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { RelationshipDetailsTypes } from './_types';
|
|
2
1
|
import { RelationshipDetailsActorRef } from './actor';
|
|
3
|
-
import { FunctionComponent } from 'react';
|
|
4
|
-
export declare const edgeTypes: {
|
|
5
|
-
relationship: FunctionComponent<RelationshipDetailsTypes.EdgeProps>;
|
|
6
|
-
};
|
|
7
2
|
export type RelationshipDetailsProps = {
|
|
8
3
|
actorRef: RelationshipDetailsActorRef;
|
|
9
4
|
};
|
|
@@ -17,9 +17,9 @@ import { layoutRelationshipDetails } from './layout.js';
|
|
|
17
17
|
import { SelectEdge } from './SelectEdge.js';
|
|
18
18
|
import { RelationshipEdge } from './custom/edgeTypes.js';
|
|
19
19
|
import { CompoundNode, ElementNode } from './custom/nodeTypes.js';
|
|
20
|
-
import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
21
|
-
import IconChevronLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
22
|
-
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
20
|
+
import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
|
|
21
|
+
import IconChevronLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js';
|
|
22
|
+
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
|
|
23
23
|
|
|
24
24
|
const nodeTypes = {
|
|
25
25
|
element: ElementNode,
|
|
@@ -261,4 +261,4 @@ const TopLeftPanelInner = ({ edge, view }) => {
|
|
|
261
261
|
] }) }) });
|
|
262
262
|
};
|
|
263
263
|
|
|
264
|
-
export { RelationshipDetails
|
|
264
|
+
export { RelationshipDetails };
|
|
@@ -5,9 +5,9 @@ const edgeEnpoint = css.raw({
|
|
|
5
5
|
alignItems: "center",
|
|
6
6
|
padding: "[6px 2px 0 2px]",
|
|
7
7
|
"& .mantine-Text-root": {
|
|
8
|
-
color: "
|
|
8
|
+
color: "text/90",
|
|
9
9
|
fontSize: "xs",
|
|
10
|
-
fontWeight:
|
|
10
|
+
fontWeight: "medium",
|
|
11
11
|
lineHeight: "1.2"
|
|
12
12
|
}
|
|
13
13
|
});
|
|
@@ -30,15 +30,15 @@ const edgeLabel = cx(
|
|
|
30
30
|
gridColumnStart: 1,
|
|
31
31
|
gridColumnEnd: 4,
|
|
32
32
|
borderBottom: `1px solid`,
|
|
33
|
-
borderBottomColor: "
|
|
33
|
+
borderBottomColor: "default.border",
|
|
34
34
|
marginBottom: "0",
|
|
35
35
|
padding: "[0 4px 5px 4px]",
|
|
36
36
|
width: "100%",
|
|
37
37
|
"& .mantine-Text-root": {
|
|
38
38
|
fontSize: "xxs",
|
|
39
|
-
fontWeight:
|
|
39
|
+
fontWeight: "normal",
|
|
40
40
|
lineHeight: "xs",
|
|
41
|
-
color: "
|
|
41
|
+
color: "text.dimmed"
|
|
42
42
|
}
|
|
43
43
|
})
|
|
44
44
|
);
|
|
@@ -54,7 +54,7 @@ const edgeRow = css({
|
|
|
54
54
|
"&:is(:hover, [data-selected=true]) > *": {
|
|
55
55
|
transition: "all 0.15s ease-out",
|
|
56
56
|
cursor: "pointer",
|
|
57
|
-
backgroundColor: "
|
|
57
|
+
backgroundColor: "default.hover"
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
const edgeGrid = css({
|
|
@@ -3,8 +3,8 @@ import { Popover, PopoverTarget, Button, Box, Text, ThemeIcon, PopoverDropdown,
|
|
|
3
3
|
import { useRef } from 'react';
|
|
4
4
|
import { useRelationshipDetails } from './hooks.js';
|
|
5
5
|
import { edgeSource, edgeTarget, scrollArea, edgeGrid, edgeRow, edgeArrow, edgeLabel } from './SelectEdge.css.js';
|
|
6
|
-
import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
7
|
-
import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
6
|
+
import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
|
|
7
|
+
import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
|
|
8
8
|
|
|
9
9
|
const SelectEdge = ({
|
|
10
10
|
edge,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { treeFromElements } from '@likec4/core/compute-view
|
|
1
|
+
import { treeFromElements } from '@likec4/core/compute-view';
|
|
2
2
|
import { modelConnection } from '@likec4/core/model';
|
|
3
3
|
import { invariant, isAncestor, sortParentsFirst } from '@likec4/core/utils';
|
|
4
4
|
import { hasAtLeast } from 'remeda';
|
|
@@ -6,9 +6,9 @@ import 'fast-equals';
|
|
|
6
6
|
import 'react';
|
|
7
7
|
import { useDiagram } from '../../../hooks/safeContext.js';
|
|
8
8
|
import { ElementActionButtons } from '../../../base-primitives/element/ElementActionButtons.js';
|
|
9
|
-
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
10
|
-
import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
11
|
-
import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
9
|
+
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
10
|
+
import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
|
|
11
|
+
import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
|
|
12
12
|
|
|
13
13
|
const ElementActions = (props) => {
|
|
14
14
|
const { enableNavigateTo, enableVscode } = useEnabledFeatures();
|
|
@@ -7,15 +7,28 @@ import '@xstate/react';
|
|
|
7
7
|
import 'fast-equals';
|
|
8
8
|
import 'react';
|
|
9
9
|
import { useDiagram } from '../../../hooks/safeContext.js';
|
|
10
|
+
import { useCallbackRef } from '../../../hooks/useCallbackRef.js';
|
|
10
11
|
import { memoNode } from '../../../base-primitives/memoNode.js';
|
|
11
12
|
import { CompoundNodeContainer } from '../../../base-primitives/compound/CompoundNodeContainer.js';
|
|
12
13
|
import { CompoundTitle } from '../../../base-primitives/compound/CompoundTitle.js';
|
|
13
14
|
import { ElementNodeContainer } from '../../../base-primitives/element/ElementNodeContainer.js';
|
|
14
15
|
import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
|
|
15
16
|
import { ElementData } from '../../../base-primitives/element/ElementData.js';
|
|
16
|
-
import { ElementTags } from '../../../base-primitives/element/ElementTags.js';
|
|
17
17
|
import { ElementDetailsButton } from '../../../base-primitives/element/ElementDetailsButton.js';
|
|
18
|
+
import { ElementTags as ElementTags$1 } from '../../../base-primitives/element/ElementTags.js';
|
|
18
19
|
|
|
20
|
+
function ElementTags(props) {
|
|
21
|
+
const diagram = useDiagram();
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
ElementTags$1,
|
|
24
|
+
{
|
|
25
|
+
onTagClick: useCallbackRef((tag) => {
|
|
26
|
+
diagram.openSearch(tag);
|
|
27
|
+
}),
|
|
28
|
+
...props
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
19
32
|
const ElementDetailsButtonWithHandler = (props) => {
|
|
20
33
|
const diagram = useDiagram();
|
|
21
34
|
return /* @__PURE__ */ jsx(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { treeFromElements } from '@likec4/core/compute-view
|
|
1
|
+
import { treeFromElements } from '@likec4/core/compute-view';
|
|
2
2
|
import { exact, preferSummary } from '@likec4/core/types';
|
|
3
3
|
import dagre from '@dagrejs/dagre';
|
|
4
4
|
import { ifind, DefaultMap, invariant } from '@likec4/core/utils';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { RelationshipsBrowserTypes } from './_types';
|
|
2
1
|
import { RelationshipsBrowserActorRef } from './actor';
|
|
3
|
-
import { FunctionComponent } from 'react';
|
|
4
|
-
export declare const edgeTypes: {
|
|
5
|
-
relationship: FunctionComponent<RelationshipsBrowserTypes.EdgeProps>;
|
|
6
|
-
};
|
|
7
2
|
export type RelationshipsBrowserProps = {
|
|
8
3
|
actorRef: RelationshipsBrowserActorRef;
|
|
9
4
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
|
-
import { ActionIcon,
|
|
4
|
-
import { useStateHistory } from '@mantine/hooks';
|
|
5
|
-
import { useRafEffect } from '@react-hookz/web';
|
|
3
|
+
import { Group, ActionIcon, Tooltip as Tooltip$1 } from '@mantine/core';
|
|
4
|
+
import { useStateHistory, useClipboard } from '@mantine/hooks';
|
|
6
5
|
import { ReactFlowProvider, useStoreApi, useReactFlow, Panel } from '@xyflow/react';
|
|
7
6
|
import { shallowEqual } from 'fast-equals';
|
|
8
7
|
import { LayoutGroup, AnimatePresence, m } from 'motion/react';
|
|
9
|
-
import { useRef, memo, useEffect } from 'react';
|
|
8
|
+
import { useRef, memo, useEffect, useState } from 'react';
|
|
10
9
|
import { BaseXYFlow } from '../../base/BaseXYFlow.js';
|
|
11
10
|
import { useCallbackRef } from '../../hooks/useCallbackRef.js';
|
|
12
11
|
import { RelationshipsBrowserActorContext, useRelationshipsBrowser, useRelationshipsBrowserState } from './hooks.js';
|
|
@@ -15,9 +14,12 @@ import { SelectElement } from './SelectElement.js';
|
|
|
15
14
|
import { RelationshipEdge } from './custom/edgeTypes.js';
|
|
16
15
|
import { EmptyNode } from './custom/EmptyNode.js';
|
|
17
16
|
import { CompoundNode, ElementNode } from './custom/nodeTypes.js';
|
|
18
|
-
import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
19
|
-
import IconChevronLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
20
|
-
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
17
|
+
import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
|
|
18
|
+
import IconChevronLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js';
|
|
19
|
+
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
|
|
20
|
+
import IconCheck from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
|
|
21
|
+
import IconAlertTriangle from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
|
|
22
|
+
import IconLink from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js';
|
|
21
23
|
|
|
22
24
|
const nodeTypes = {
|
|
23
25
|
element: ElementNode,
|
|
@@ -144,7 +146,7 @@ const RelationshipsBrowserInner = memo(() => {
|
|
|
144
146
|
browser.navigateTo(historySubjectId);
|
|
145
147
|
}
|
|
146
148
|
}, [historySubjectId, browser]);
|
|
147
|
-
|
|
149
|
+
useEffect(() => {
|
|
148
150
|
browser.updateView(layouted);
|
|
149
151
|
}, [layouted, browser]);
|
|
150
152
|
const hasStepBack = current > 0;
|
|
@@ -159,18 +161,21 @@ const RelationshipsBrowserInner = memo(() => {
|
|
|
159
161
|
onStepForward: () => historyOps.forward()
|
|
160
162
|
}
|
|
161
163
|
),
|
|
162
|
-
closeable && /* @__PURE__ */ jsx(Panel, { position: "top-right", children: /* @__PURE__ */
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
164
|
+
closeable && /* @__PURE__ */ jsx(Panel, { position: "top-right", children: /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
|
|
165
|
+
/* @__PURE__ */ jsx(CopyLinkButton, { subjectId }),
|
|
166
|
+
/* @__PURE__ */ jsx(
|
|
167
|
+
ActionIcon,
|
|
168
|
+
{
|
|
169
|
+
variant: "default",
|
|
170
|
+
color: "gray",
|
|
171
|
+
onClick: (e) => {
|
|
172
|
+
e.stopPropagation();
|
|
173
|
+
browser.close();
|
|
174
|
+
},
|
|
175
|
+
children: /* @__PURE__ */ jsx(IconX, {})
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
] }) })
|
|
174
179
|
] });
|
|
175
180
|
});
|
|
176
181
|
const TopLeftPanel = ({
|
|
@@ -235,5 +240,95 @@ const TopLeftPanel = ({
|
|
|
235
240
|
/* @__PURE__ */ jsx(SelectElement, {})
|
|
236
241
|
] }) });
|
|
237
242
|
};
|
|
243
|
+
const Tooltip = Tooltip$1.withProps({
|
|
244
|
+
color: "dark",
|
|
245
|
+
fz: "xs",
|
|
246
|
+
openDelay: 400,
|
|
247
|
+
closeDelay: 150,
|
|
248
|
+
label: "",
|
|
249
|
+
children: null,
|
|
250
|
+
offset: 4,
|
|
251
|
+
withinPortal: false
|
|
252
|
+
});
|
|
253
|
+
function buildRelationshipUrl(subjectId) {
|
|
254
|
+
const currentUrl = new URL(window.location.href);
|
|
255
|
+
if (currentUrl.hash.startsWith("#/")) {
|
|
256
|
+
const hashUrl = new URL(currentUrl.hash.substring(1), currentUrl.origin);
|
|
257
|
+
hashUrl.searchParams.set("relationships", subjectId);
|
|
258
|
+
const cleanPath = hashUrl.pathname.replace(/\/$/, "");
|
|
259
|
+
return `${currentUrl.origin}${currentUrl.pathname}${currentUrl.search}#${cleanPath}${hashUrl.search}`;
|
|
260
|
+
}
|
|
261
|
+
currentUrl.searchParams.set("relationships", subjectId);
|
|
262
|
+
return currentUrl.href;
|
|
263
|
+
}
|
|
264
|
+
const CopyLinkButton = ({ subjectId }) => {
|
|
265
|
+
const clipboard = useClipboard({ timeout: 2e3 });
|
|
266
|
+
const [copyError, setCopyError] = useState(false);
|
|
267
|
+
const errorTimeoutRef = useRef(null);
|
|
268
|
+
const handleCopy = async (e) => {
|
|
269
|
+
e.stopPropagation();
|
|
270
|
+
setCopyError(false);
|
|
271
|
+
if (errorTimeoutRef.current) {
|
|
272
|
+
clearTimeout(errorTimeoutRef.current);
|
|
273
|
+
errorTimeoutRef.current = null;
|
|
274
|
+
}
|
|
275
|
+
const url = buildRelationshipUrl(subjectId);
|
|
276
|
+
if (!window.isSecureContext) {
|
|
277
|
+
setCopyError(true);
|
|
278
|
+
errorTimeoutRef.current = window.setTimeout(() => {
|
|
279
|
+
setCopyError(false);
|
|
280
|
+
}, 2e3);
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
clipboard.copy(url);
|
|
284
|
+
};
|
|
285
|
+
useEffect(() => {
|
|
286
|
+
if (clipboard.error) {
|
|
287
|
+
setCopyError(true);
|
|
288
|
+
if (errorTimeoutRef.current) {
|
|
289
|
+
clearTimeout(errorTimeoutRef.current);
|
|
290
|
+
}
|
|
291
|
+
errorTimeoutRef.current = window.setTimeout(() => {
|
|
292
|
+
setCopyError(false);
|
|
293
|
+
}, 2e3);
|
|
294
|
+
}
|
|
295
|
+
}, [clipboard.error]);
|
|
296
|
+
useEffect(() => {
|
|
297
|
+
return () => {
|
|
298
|
+
if (errorTimeoutRef.current) {
|
|
299
|
+
clearTimeout(errorTimeoutRef.current);
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
}, []);
|
|
303
|
+
const getButtonState = () => {
|
|
304
|
+
if (clipboard.copied) {
|
|
305
|
+
return {
|
|
306
|
+
icon: /* @__PURE__ */ jsx(IconCheck, {}),
|
|
307
|
+
tooltip: "Link copied!"
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
if (copyError) {
|
|
311
|
+
return {
|
|
312
|
+
icon: /* @__PURE__ */ jsx(IconAlertTriangle, {}),
|
|
313
|
+
tooltip: "Copy failed - Clipboard requires HTTPS or localhost"
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
return {
|
|
317
|
+
icon: /* @__PURE__ */ jsx(IconLink, {}),
|
|
318
|
+
tooltip: "Copy link to this relationship view"
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
const buttonState = getButtonState();
|
|
322
|
+
return /* @__PURE__ */ jsx(Tooltip, { label: buttonState.tooltip, withArrow: true, position: "top", withinPortal: false, children: /* @__PURE__ */ jsx(
|
|
323
|
+
ActionIcon,
|
|
324
|
+
{
|
|
325
|
+
variant: "default",
|
|
326
|
+
color: "gray",
|
|
327
|
+
onClick: handleCopy,
|
|
328
|
+
"aria-label": "Copy link to this relationship view",
|
|
329
|
+
children: buttonState.icon
|
|
330
|
+
}
|
|
331
|
+
) });
|
|
332
|
+
};
|
|
238
333
|
|
|
239
|
-
export { RelationshipsBrowser
|
|
334
|
+
export { RelationshipsBrowser };
|
|
@@ -7,8 +7,8 @@ import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
|
|
|
7
7
|
import { useRelationshipsBrowser, useRelationshipsBrowserState } from './hooks.js';
|
|
8
8
|
import * as SelectElement_css from './SelectElement.css.js';
|
|
9
9
|
import { scrollArea } from './SelectElement.css.js';
|
|
10
|
-
import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
11
|
-
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
10
|
+
import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
|
|
11
|
+
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
|
|
12
12
|
|
|
13
13
|
const selector2 = (state) => {
|
|
14
14
|
const subjectExistsInScope = state.context.layouted?.subjectExistsInScope ?? false;
|
|
@@ -2,7 +2,7 @@ import { nonNullable, invariant, delay } from '@likec4/core/utils';
|
|
|
2
2
|
import { applyEdgeChanges, applyNodeChanges } from '@xyflow/react';
|
|
3
3
|
import { getViewportForBounds } from '@xyflow/system';
|
|
4
4
|
import { hasAtLeast, omit, isNullish } from 'remeda';
|
|
5
|
-
import {
|
|
5
|
+
import { assign, enqueueActions, cancel, raise, setup, assertEvent, fromPromise } from 'xstate';
|
|
6
6
|
import { MinZoom, ZIndexes } from '../../base/const.js';
|
|
7
7
|
import { updateEdges } from '../../base/updateEdges.js';
|
|
8
8
|
import { updateNodes } from '../../base/updateNodes.js';
|
|
@@ -6,9 +6,9 @@ import '@xstate/react';
|
|
|
6
6
|
import 'fast-equals';
|
|
7
7
|
import { useDiagram } from '../../../hooks/safeContext.js';
|
|
8
8
|
import { useRelationshipsBrowser, useRelationshipsBrowserState } from '../hooks.js';
|
|
9
|
-
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
10
|
-
import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
11
|
-
import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
9
|
+
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
10
|
+
import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
|
|
11
|
+
import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
|
|
12
12
|
import { ElementActionButtons } from '../../../base-primitives/element/ElementActionButtons.js';
|
|
13
13
|
|
|
14
14
|
const selectSubject = (state) => state.context.subject;
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { Box
|
|
3
|
-
import {
|
|
2
|
+
import { Box } from '@likec4/styles/jsx';
|
|
3
|
+
import { Text } from '@mantine/core';
|
|
4
4
|
|
|
5
5
|
function EmptyNode({
|
|
6
6
|
data: {
|
|
7
7
|
column
|
|
8
8
|
}
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Box,
|
|
12
|
+
{
|
|
13
|
+
css: {
|
|
14
|
+
width: "100%",
|
|
15
|
+
height: "100%",
|
|
16
|
+
border: `3px dashed`,
|
|
17
|
+
borderColor: `default.border`,
|
|
18
|
+
borderRadius: "md",
|
|
19
|
+
display: "flex",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
alignItems: "center"
|
|
22
|
+
},
|
|
23
|
+
children: /* @__PURE__ */ jsxs(Text, { c: "dimmed", fz: "lg", fw: 500, children: [
|
|
24
|
+
"No ",
|
|
25
|
+
column === "incomers" ? "incoming" : "outgoing"
|
|
26
|
+
] })
|
|
27
|
+
}
|
|
28
|
+
);
|
|
14
29
|
}
|
|
15
30
|
|
|
16
31
|
export { EmptyNode };
|
|
@@ -5,6 +5,7 @@ import '@xstate/react';
|
|
|
5
5
|
import 'fast-equals';
|
|
6
6
|
import 'react';
|
|
7
7
|
import { useDiagram } from '../../../hooks/safeContext.js';
|
|
8
|
+
import { useCallbackRef } from '../../../hooks/useCallbackRef.js';
|
|
8
9
|
import { ElementActions } from './ElementActions.js';
|
|
9
10
|
import { CompoundNodeContainer } from '../../../base-primitives/compound/CompoundNodeContainer.js';
|
|
10
11
|
import { CompoundTitle } from '../../../base-primitives/compound/CompoundTitle.js';
|
|
@@ -12,9 +13,21 @@ import { CompoundDetailsButton } from '../../../base-primitives/compound/Compoun
|
|
|
12
13
|
import { ElementNodeContainer } from '../../../base-primitives/element/ElementNodeContainer.js';
|
|
13
14
|
import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
|
|
14
15
|
import { ElementData } from '../../../base-primitives/element/ElementData.js';
|
|
15
|
-
import { ElementTags } from '../../../base-primitives/element/ElementTags.js';
|
|
16
|
+
import { ElementTags as ElementTags$1 } from '../../../base-primitives/element/ElementTags.js';
|
|
16
17
|
import { ElementDetailsButton } from '../../../base-primitives/element/ElementDetailsButton.js';
|
|
17
18
|
|
|
19
|
+
function ElementTags(props) {
|
|
20
|
+
const diagram = useDiagram();
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
ElementTags$1,
|
|
23
|
+
{
|
|
24
|
+
onTagClick: useCallbackRef((tag) => {
|
|
25
|
+
diagram.openSearch(tag);
|
|
26
|
+
}),
|
|
27
|
+
...props
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
18
31
|
const ElementDetailsButtonWithHandler = (props) => {
|
|
19
32
|
const diagram = useDiagram();
|
|
20
33
|
return /* @__PURE__ */ jsx(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RelationshipsViewData } from '@likec4/core/compute-view
|
|
1
|
+
import { RelationshipsViewData } from '@likec4/core/compute-view';
|
|
2
2
|
import { DiagramEdge, DiagramNode, DiagramView, ElementKind, Fqn, MarkdownOrString, ViewId } from '@likec4/core/types';
|
|
3
3
|
import { LikeC4ViewModel } from '@likec4/core/model';
|
|
4
4
|
import { RelationshipsBrowserTypes } from './_types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computeRelationshipsView, treeFromElements } from '@likec4/core/compute-view
|
|
1
|
+
import { computeRelationshipsView, treeFromElements } from '@likec4/core/compute-view';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import dagre from '@dagrejs/dagre';
|
|
4
4
|
import { preferSummary, exact } from '@likec4/core/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Queue, GroupElementKind,
|
|
1
|
+
import { Queue, GroupElementKind, invariant, nonNullable } from '@likec4/core';
|
|
2
2
|
import '@react-hookz/web';
|
|
3
3
|
import { hasAtLeast } from 'remeda';
|
|
4
4
|
import { ZIndexes } from '../../base/const.js';
|
|
@@ -5,7 +5,7 @@ import { ReactFlowProvider } from '@xyflow/react';
|
|
|
5
5
|
import { LayoutGroup } from 'motion/react';
|
|
6
6
|
import { useEffect, useRef } from 'react';
|
|
7
7
|
import { projectOverviewLogic } from './actor.js';
|
|
8
|
-
import {
|
|
8
|
+
import { ProjectsOverviewActorContextProvider } from './context.js';
|
|
9
9
|
import { ProjectsOverviewPanel } from './panel/ProjectsOverviewPanel.js';
|
|
10
10
|
import { ProjectsOverviewXY } from './ProjectsOverviewXY.js';
|
|
11
11
|
|
|
@@ -48,7 +48,7 @@ function ProjectsOverview({
|
|
|
48
48
|
initialHeight: bounds.height,
|
|
49
49
|
fitView: false
|
|
50
50
|
});
|
|
51
|
-
return /* @__PURE__ */ jsx(
|
|
51
|
+
return /* @__PURE__ */ jsx(ProjectsOverviewActorContextProvider, { value: actorRef, children: /* @__PURE__ */ jsxs(ReactFlowProvider, { ...initialRef.current, children: [
|
|
52
52
|
/* @__PURE__ */ jsx(LayoutGroup, { id: actorRef.sessionId, inherit: false, children: /* @__PURE__ */ jsx(ProjectsOverviewXY, { ...props }) }),
|
|
53
53
|
/* @__PURE__ */ jsx(ProjectsOverviewPanel, {})
|
|
54
54
|
] }) });
|