@likec4/diagram 1.26.2 → 1.27.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 +1 -1
- package/bundle/index.js +48891 -0
- package/dist/LikeC4CustomColors.js +27 -23
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +37 -36
- package/dist/LikeC4Diagram.props.d.ts +6 -0
- package/dist/LikeC4ModelProvider.js +6 -6
- package/dist/StaticLikeC4Diagram.js +5 -5
- package/dist/_virtual/_commonjsHelpers.js +5 -0
- package/dist/_virtual/default-map.js +7 -0
- package/dist/base/Background.js +6 -6
- package/dist/base/BaseXYFlow.d.ts +1 -1
- package/dist/base/BaseXYFlow.js +75 -46
- package/dist/base/const.js +2 -5
- package/dist/base/primitives/NodeHandles.js +5 -5
- package/dist/base/primitives/compound/CompoundActionButton.js +60 -33
- package/dist/base/primitives/compound/CompoundDetailsButton.js +66 -35
- package/dist/base/primitives/compound/CompoundNodeContainer.css.d.ts +35 -7
- package/dist/base/primitives/compound/CompoundNodeContainer.css.js +131 -12
- package/dist/base/primitives/compound/CompoundNodeContainer.d.ts +4 -20
- package/dist/base/primitives/compound/CompoundNodeContainer.js +99 -97
- package/dist/base/primitives/compound/CompoundTitle.d.ts +1 -1
- package/dist/base/primitives/compound/CompoundTitle.js +74 -12
- package/dist/base/primitives/compound/actionbtns.css.d.ts +11 -0
- package/dist/base/primitives/compound/actionbtns.css.js +32 -0
- package/dist/base/primitives/customEdge.d.ts +5 -5
- package/dist/base/primitives/customEdge.js +6 -7
- package/dist/base/primitives/customNode.js +5 -6
- package/dist/base/primitives/edge/EdgeActionButton.js +10 -12
- package/dist/base/primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base/primitives/edge/EdgeContainer.js +21 -15
- package/dist/base/primitives/edge/EdgeLabel.css.d.ts +24 -10
- package/dist/base/primitives/edge/EdgeLabel.css.js +133 -20
- package/dist/base/primitives/edge/EdgeLabel.d.ts +4 -44
- package/dist/base/primitives/edge/EdgeLabel.js +35 -88
- package/dist/base/primitives/edge/EdgeLabelContainer.d.ts +18 -0
- package/dist/base/primitives/edge/EdgeLabelContainer.js +91 -0
- package/dist/base/primitives/edge/EdgeMarkers.js +5 -6
- package/dist/base/primitives/edge/EdgePath.d.ts +7 -7
- package/dist/base/primitives/edge/EdgePath.js +17 -29
- package/dist/base/primitives/edge/edge.css.d.ts +2 -2
- package/dist/base/primitives/edge/edge.css.js +123 -12
- package/dist/base/primitives/edge/xyvars.d.ts +24 -0
- package/dist/base/primitives/element/ElementActionButtons.js +35 -17
- package/dist/base/primitives/element/ElementDetailsButton.js +34 -16
- package/dist/base/primitives/element/ElementNodeContainer.css.d.ts +0 -1
- package/dist/base/primitives/element/ElementNodeContainer.css.js +50 -5
- package/dist/base/primitives/element/ElementNodeContainer.d.ts +1 -1
- package/dist/base/primitives/element/ElementNodeContainer.js +28 -19
- package/dist/base/primitives/element/ElementShape.css.js +118 -16
- package/dist/base/primitives/element/ElementShape.js +8 -10
- package/dist/base/primitives/element/ElementTitle.css.d.ts +33 -8
- package/dist/base/primitives/element/ElementTitle.css.js +195 -19
- package/dist/base/primitives/element/ElementTitle.js +25 -24
- package/dist/base/primitives/index.d.ts +1 -0
- package/dist/base/types.js +4 -4
- package/dist/base/updateEdges.js +5 -5
- package/dist/base/updateNodes.js +6 -6
- package/dist/bundle/LikeC4ModelProvider.d.ts +9 -0
- package/dist/bundle/LikeC4ModelProvider.js +5 -0
- package/dist/bundle/LikeC4View.d.ts +2 -0
- package/dist/bundle/LikeC4View.js +176 -0
- package/dist/bundle/LikeC4View.props.d.ts +207 -0
- package/dist/bundle/ReactLikeC4.d.ts +36 -0
- package/dist/bundle/ReactLikeC4.js +90 -0
- package/dist/bundle/ShadowRoot.d.ts +12 -0
- package/dist/bundle/ShadowRoot.js +52 -0
- package/dist/bundle/ViewNotFound.d.ts +5 -0
- package/dist/bundle/ViewNotFound.js +30 -0
- package/dist/bundle/font.css.js +3 -0
- package/dist/bundle/index.d.ts +5 -0
- package/dist/bundle/index.js +4 -0
- package/dist/bundle/styles.css.d.ts +10 -0
- package/dist/bundle/styles.css.js +145 -0
- package/dist/components/Link.js +61 -12
- package/dist/components/SearchControl.css.js +72 -9
- package/dist/components/SearchControl.js +11 -11
- package/dist/context/ControlsCustomLayout.js +5 -6
- package/dist/context/DiagramEventHandlers.js +8 -13
- package/dist/context/DiagramFeatures.js +7 -12
- package/dist/context/EnsureMantine.js +6 -6
- package/dist/context/FramerMotionConfig.js +8 -9
- package/dist/context/IconRenderer.js +7 -9
- package/dist/context/ReduceGraphics.d.ts +4 -5
- package/dist/context/ReduceGraphics.js +11 -43
- package/dist/context/RootContainer.js +23 -10
- package/dist/hooks/safeContext.js +5 -7
- package/dist/hooks/useCurrentViewId.js +6 -6
- package/dist/hooks/useDiagram.d.ts +5020 -4373
- package/dist/hooks/useDiagram.js +13 -17
- package/dist/hooks/useMantinePortalProps.js +5 -5
- package/dist/hooks/useOverlaysActor.d.ts +2 -0
- package/dist/hooks/useOverlaysActor.js +10 -0
- package/dist/hooks/useReducedGraphics.d.ts +1 -1
- package/dist/hooks/useSetState.js +5 -5
- package/dist/hooks/useUpdateEffect.js +6 -7
- package/dist/hooks/useXYFlow.d.ts +28 -28
- package/dist/hooks/useXYFlow.js +7 -11
- package/dist/index.d.ts +0 -1
- package/dist/index.js +10 -26
- package/dist/likec4diagram/DiagramUI.js +13 -13
- package/dist/likec4diagram/DiagramXYFlow.d.ts +1 -4
- package/dist/likec4diagram/DiagramXYFlow.js +81 -36
- package/dist/likec4diagram/custom/edges/NotePopover.css.js +21 -7
- package/dist/likec4diagram/custom/edges/NotePopover.js +18 -27
- package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +9 -9
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +99 -83
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.d.ts +1 -0
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.js +38 -11
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.d.ts +3 -3
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +28 -30
- package/dist/likec4diagram/custom/edges/edges.css.js +44 -9
- package/dist/likec4diagram/custom/edges/utils.js +6 -7
- package/dist/likec4diagram/custom/index.d.ts +9 -9
- package/dist/likec4diagram/custom/index.js +5 -6
- package/dist/likec4diagram/custom/nodes/CompoundActions.js +7 -7
- package/dist/likec4diagram/custom/nodes/ElementActions.js +8 -9
- package/dist/likec4diagram/custom/nodes/nodeTypes.js +22 -26
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +10 -13
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +15 -16
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +12 -13
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +17 -14
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +15 -20
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +10 -5
- package/dist/likec4diagram/ui/controls/ChangeAutoLayoutButton.js +15 -15
- package/dist/likec4diagram/ui/controls/Controls.js +24 -24
- package/dist/likec4diagram/ui/controls/LayoutDriftNotification.js +8 -9
- package/dist/likec4diagram/ui/controls/ManualLayoutToolsButton.js +8 -8
- package/dist/likec4diagram/ui/controls/NavigationButtons.js +8 -8
- package/dist/likec4diagram/ui/controls/ToggleReadonly.js +7 -7
- package/dist/likec4diagram/ui/controls/_shared.js +4 -5
- package/dist/likec4diagram/ui/controls/styles.css.js +79 -17
- package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.css.js +49 -9
- package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +12 -12
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +85 -15
- package/dist/likec4diagram/ui/notation/NotationPanel.js +32 -32
- package/dist/likec4diagram/ui/search/ElementsColumn.css.d.ts +0 -5
- package/dist/likec4diagram/ui/search/ElementsColumn.css.js +70 -30
- package/dist/likec4diagram/ui/search/ElementsColumn.js +40 -33
- package/dist/likec4diagram/ui/search/LikeC4Search.css.js +87 -20
- package/dist/likec4diagram/ui/search/LikeC4Search.js +18 -17
- package/dist/likec4diagram/ui/search/SearchInput.js +22 -24
- package/dist/likec4diagram/ui/search/ViewsColum.js +22 -22
- package/dist/likec4diagram/ui/search/ViewsColumn.css.d.ts +0 -2
- package/dist/likec4diagram/ui/search/ViewsColumn.css.js +29 -14
- package/dist/likec4diagram/ui/search/_shared.css.d.ts +3 -17
- package/dist/likec4diagram/ui/search/_shared.css.js +171 -0
- package/dist/likec4diagram/ui/search/state.js +12 -22
- package/dist/likec4diagram/ui/search/utils.js +2 -5
- package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.css.js +66 -10
- package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.js +18 -27
- package/dist/likec4diagram/useLayoutConstraints.js +39 -46
- package/dist/likec4diagram/useViewToNodesEdges.js +12 -13
- package/dist/likec4model/LikeC4ModelContext.js +4 -4
- package/dist/likec4model/useLikeC4ElementsTree.js +6 -7
- package/dist/likec4model/useLikeC4Model.js +6 -6
- package/dist/node_modules/.pnpm/mnemonist@0.40.3_patch_hash_5c12abb43fcff6fd81e53021b89075d53249640d165a2556cc1e58d71201a13a/node_modules/mnemonist/default-map.js +172 -0
- package/dist/overlays/Overlays.js +21 -21
- package/dist/overlays/element-details/ElementDetails.js +9 -9
- package/dist/overlays/element-details/ElementDetailsCard.css.d.ts +2 -3
- package/dist/overlays/element-details/ElementDetailsCard.css.js +237 -35
- package/dist/overlays/element-details/ElementDetailsCard.js +44 -46
- package/dist/overlays/element-details/TabPanelDeployments.css.js +62 -11
- package/dist/overlays/element-details/TabPanelDeployments.js +11 -11
- package/dist/overlays/element-details/TabPanelRelationships.css.js +99 -9
- package/dist/overlays/element-details/TabPanelRelationships.js +41 -14
- package/dist/overlays/element-details/TabPanelStructure.css.js +36 -7
- package/dist/overlays/element-details/TabPanelStructure.js +8 -9
- package/dist/overlays/element-details/actor.d.ts +21892 -22686
- package/dist/overlays/element-details/actor.js +18 -19
- package/dist/overlays/element-details/actorContext.js +4 -5
- package/dist/overlays/overlay/Overlay.css.d.ts +2 -2
- package/dist/overlays/overlay/Overlay.css.js +57 -98
- package/dist/overlays/overlay/Overlay.d.ts +2 -2
- package/dist/overlays/overlay/Overlay.js +96 -94
- package/dist/overlays/overlaysActor.d.ts +6 -6
- package/dist/overlays/overlaysActor.js +17 -18
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +49 -0
- package/dist/overlays/relationship-details/RelationshipDetails.js +24 -17
- package/dist/overlays/relationship-details/SelectEdge.css.js +82 -17
- package/dist/overlays/relationship-details/SelectEdge.js +15 -17
- package/dist/overlays/relationship-details/actor.js +9 -9
- package/dist/overlays/relationship-details/custom/ElementActions.js +8 -8
- package/dist/overlays/relationship-details/custom/edgeTypes.d.ts +44 -46
- package/dist/overlays/relationship-details/custom/edgeTypes.js +49 -50
- package/dist/overlays/relationship-details/custom/index.d.ts +2 -2
- package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +28 -30
- package/dist/overlays/relationship-details/custom/nodeTypes.js +31 -35
- package/dist/overlays/relationship-details/hooks.js +9 -13
- package/dist/overlays/relationship-details/useLayoutedDetails.js +16 -18
- package/dist/overlays/relationships-browser/-useRelationshipsView.d.ts +8 -24
- package/dist/overlays/relationships-browser/-useRelationshipsView.js +50 -85
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +48 -0
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +101 -101
- package/dist/overlays/relationships-browser/SelectElement.css.js +22 -9
- package/dist/overlays/relationships-browser/SelectElement.d.ts +2 -7
- package/dist/overlays/relationships-browser/SelectElement.js +196 -112
- package/dist/overlays/relationships-browser/_types.d.ts +4 -1
- package/dist/overlays/relationships-browser/actor.d.ts +478 -351
- package/dist/overlays/relationships-browser/actor.js +108 -94
- package/dist/overlays/relationships-browser/const.d.ts +1 -1
- package/dist/overlays/relationships-browser/const.js +3 -4
- package/dist/overlays/relationships-browser/custom/ElementActions.js +9 -9
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +6 -6
- package/dist/overlays/relationships-browser/custom/edgeTypes.d.ts +43 -44
- package/dist/overlays/relationships-browser/custom/edgeTypes.js +97 -65
- package/dist/overlays/relationships-browser/custom/index.d.ts +2 -2
- package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +37 -37
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +36 -40
- package/dist/overlays/relationships-browser/custom/styles.css.js +14 -5
- package/dist/overlays/relationships-browser/hooks.d.ts +14 -6
- package/dist/overlays/relationships-browser/hooks.js +25 -16
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +13 -18
- package/dist/packages/core/src/compute-view/relationships-view/compute.js +123 -0
- package/dist/packages/core/src/compute-view/relationships-view/utils.js +68 -0
- package/dist/packages/core/src/errors/index.js +15 -0
- package/dist/packages/core/src/utils/fqn.js +43 -0
- package/dist/packages/core/src/utils/guards.js +7 -0
- package/dist/packages/core/src/utils/iterable/filter.js +21 -0
- package/dist/packages/core/src/utils/iterable/map.js +18 -0
- package/dist/packages/core/src/utils/iterable/to.js +14 -0
- package/dist/src/index.ts.d.ts +2 -0
- package/dist/state/DiagramActorProvider.js +26 -27
- package/dist/state/aligners.js +22 -31
- package/dist/state/assign.js +11 -21
- package/dist/state/diagram-machine.d.ts +5155 -4470
- package/dist/state/diagram-machine.js +407 -337
- package/dist/state/hotkeyActor.js +5 -5
- package/dist/state/inspector.d.ts +1 -1
- package/dist/state/persistence.js +4 -4
- package/dist/state/syncManualLayoutActor.d.ts +1 -1
- package/dist/state/syncManualLayoutActor.js +10 -10
- package/dist/state/utils.js +4 -9
- package/dist/styles.css.js +3 -0
- package/dist/utils/vector.js +2 -4
- package/dist/utils/xyflow.js +7 -12
- package/package.json +43 -42
- package/src/LikeC4CustomColors.tsx +44 -20
- package/src/LikeC4Diagram.props.ts +32 -0
- package/src/LikeC4Diagram.tsx +16 -14
- package/src/base/BaseXYFlow.tsx +67 -43
- package/src/base/primitives/compound/CompoundActionButton.tsx +41 -20
- package/src/base/primitives/compound/CompoundDetailsButton.tsx +48 -25
- package/src/base/primitives/compound/CompoundNodeContainer.css.ts +111 -111
- package/src/base/primitives/compound/CompoundNodeContainer.tsx +92 -92
- package/src/base/primitives/compound/CompoundTitle.tsx +73 -7
- package/src/base/primitives/compound/actionbtns.css.ts +30 -0
- package/src/base/primitives/customEdge.ts +2 -3
- package/src/base/primitives/edge/EdgeActionButton.tsx +3 -5
- package/src/base/primitives/edge/EdgeContainer.tsx +17 -9
- package/src/base/primitives/edge/EdgeLabel.css.ts +113 -177
- package/src/base/primitives/edge/EdgeLabel.tsx +43 -114
- package/src/base/primitives/edge/EdgeLabelContainer.tsx +118 -0
- package/src/base/primitives/edge/EdgePath.tsx +31 -37
- package/src/base/primitives/edge/edge.css.ts +105 -132
- package/src/base/primitives/edge/xyvars.ts +31 -0
- package/src/base/primitives/element/ElementActionButtons.tsx +30 -10
- package/src/base/primitives/element/ElementDetailsButton.tsx +27 -8
- package/src/base/primitives/element/ElementNodeContainer.css.ts +43 -70
- package/src/base/primitives/element/ElementNodeContainer.tsx +18 -8
- package/src/base/primitives/element/ElementShape.css.ts +80 -113
- package/src/base/primitives/element/ElementShape.tsx +0 -1
- package/src/base/primitives/element/ElementTitle.css.ts +168 -124
- package/src/base/primitives/element/ElementTitle.tsx +16 -16
- package/src/base/primitives/index.ts +1 -0
- package/src/base/types.ts +5 -0
- package/src/bundle/LikeC4ModelProvider.tsx +12 -0
- package/src/bundle/LikeC4View.props.ts +249 -0
- package/src/bundle/LikeC4View.tsx +196 -0
- package/src/bundle/ReactLikeC4.tsx +148 -0
- package/src/bundle/ShadowRoot.tsx +60 -0
- package/src/bundle/ViewNotFound.tsx +25 -0
- package/src/bundle/font.css +251 -0
- package/src/bundle/index.ts +7 -0
- package/src/bundle/react-dom-server-mock.ts +3 -0
- package/src/bundle/styles.css.ts +168 -0
- package/src/components/Link.tsx +56 -5
- package/src/components/SearchControl.css.ts +52 -59
- package/src/components/SearchControl.tsx +2 -5
- package/src/context/ReduceGraphics.tsx +9 -47
- package/src/context/RootContainer.tsx +21 -5
- package/src/hooks/safeContext.tsx +2 -3
- package/src/hooks/useCurrentViewId.ts +4 -4
- package/src/hooks/useDiagram.ts +4 -3
- package/src/hooks/useOverlaysActor.ts +11 -0
- package/src/hooks/useReducedGraphics.ts +8 -1
- package/src/hooks/useXYFlow.ts +2 -2
- package/src/index.ts +1 -3
- package/src/likec4diagram/DiagramUI.tsx +2 -2
- package/src/likec4diagram/DiagramXYFlow.tsx +80 -26
- package/src/likec4diagram/custom/edges/NotePopover.css.ts +7 -13
- package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +69 -42
- package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.ts +23 -44
- package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +26 -24
- package/src/likec4diagram/custom/edges/edges.css.ts +25 -32
- package/src/likec4diagram/custom/nodes/nodeTypes.tsx +2 -2
- package/src/likec4diagram/custom/nodes/toolbar/Toolbar.tsx +9 -5
- package/src/likec4diagram/custom/nodes/toolbar/styles.css.ts +3 -4
- package/src/likec4diagram/ui/controls/LayoutDriftNotification.tsx +2 -2
- package/src/likec4diagram/ui/controls/styles.css.ts +46 -57
- package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.css.ts +38 -34
- package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +4 -4
- package/src/likec4diagram/ui/notation/NotationPanel.css.ts +44 -56
- package/src/likec4diagram/ui/notation/NotationPanel.tsx +17 -14
- package/src/likec4diagram/ui/search/ElementsColumn.css.ts +80 -85
- package/src/likec4diagram/ui/search/ElementsColumn.tsx +21 -14
- package/src/likec4diagram/ui/search/LikeC4Search.css.ts +50 -67
- package/src/likec4diagram/ui/search/LikeC4Search.tsx +1 -2
- package/src/likec4diagram/ui/search/SearchInput.tsx +2 -2
- package/src/likec4diagram/ui/search/ViewsColum.tsx +10 -7
- package/src/likec4diagram/ui/search/ViewsColumn.css.ts +29 -28
- package/src/likec4diagram/ui/search/_shared.css.ts +158 -74
- package/src/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.css.ts +31 -34
- package/src/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.tsx +6 -6
- package/src/likec4diagram/useViewToNodesEdges.ts +2 -1
- package/src/overlays/Overlays.tsx +6 -4
- package/src/overlays/element-details/ElementDetailsCard.css.ts +143 -177
- package/src/overlays/element-details/ElementDetailsCard.tsx +29 -29
- package/src/overlays/element-details/TabPanelDeployments.css.ts +49 -54
- package/src/overlays/element-details/TabPanelRelationships.css.ts +62 -66
- package/src/overlays/element-details/TabPanelRelationships.tsx +32 -3
- package/src/overlays/element-details/TabPanelStructure.css.ts +26 -26
- package/src/overlays/element-details/actor.ts +4 -2
- package/src/overlays/overlay/Overlay.css.ts +34 -46
- package/src/overlays/overlay/Overlay.tsx +95 -97
- package/src/overlays/overlaysActor.ts +1 -0
- package/src/overlays/relationship-details/RelationshipDetails.tsx +15 -3
- package/src/overlays/relationship-details/SelectEdge.css.ts +52 -71
- package/src/overlays/relationship-details/SelectEdge.tsx +1 -2
- package/src/overlays/relationship-details/custom/edgeTypes.tsx +35 -30
- package/src/overlays/relationship-details/custom/index.ts +2 -0
- package/src/overlays/relationship-details/custom/nodeTypes.tsx +20 -24
- package/src/overlays/relationship-details/custom/styles.css.ts +8 -8
- package/src/overlays/relationships-browser/-useRelationshipsView.ts +55 -82
- package/src/overlays/relationships-browser/RelationshipsBrowser.tsx +39 -36
- package/src/overlays/relationships-browser/SelectElement.css.ts +9 -12
- package/src/overlays/relationships-browser/SelectElement.tsx +192 -105
- package/src/overlays/relationships-browser/_types.ts +4 -9
- package/src/overlays/relationships-browser/actor.ts +144 -123
- package/src/overlays/relationships-browser/const.ts +1 -1
- package/src/overlays/relationships-browser/custom/EmptyNode.tsx +2 -2
- package/src/overlays/relationships-browser/custom/edgeTypes.tsx +95 -59
- package/src/overlays/relationships-browser/custom/index.ts +2 -0
- package/src/overlays/relationships-browser/custom/nodeTypes.tsx +25 -26
- package/src/overlays/relationships-browser/custom/styles.css.ts +5 -6
- package/src/overlays/relationships-browser/hooks.ts +17 -3
- package/src/overlays/relationships-browser/useViewToNodesEdges.ts +4 -10
- package/src/state/DiagramActorProvider.tsx +17 -16
- package/src/state/diagram-machine.ts +395 -315
- package/src/state/inspector.ts +1 -1
- package/src/styles.css +3 -0
- package/dist/LikeC4Diagram.css.d.ts +0 -8
- package/dist/LikeC4Diagram.css.js +0 -11
- package/dist/base/example/RelationshipsBrowser.d.ts +0 -6
- package/dist/base/example/_types.d.ts +0 -20
- package/dist/base/example/custom.d.ts +0 -72
- package/dist/base/example/useViewToNodesEdges.d.ts +0 -6
- package/dist/base/primitives/compound/CompoundActionButton.css.d.ts +0 -2
- package/dist/base/primitives/compound/CompoundActionButton.css.js +0 -8
- package/dist/base/primitives/compound/CompoundDetailsButton.css.d.ts +0 -3
- package/dist/base/primitives/compound/CompoundDetailsButton.css.js +0 -8
- package/dist/base/primitives/compound/CompoundTitle.css.d.ts +0 -3
- package/dist/base/primitives/compound/CompoundTitle.css.js +0 -10
- package/dist/base/primitives/element/ElementActionButtons.css.d.ts +0 -3
- package/dist/base/primitives/element/ElementActionButtons.css.js +0 -10
- package/dist/base/primitives/element/ElementDetailsButton.css.d.ts +0 -3
- package/dist/base/primitives/element/ElementDetailsButton.css.js +0 -8
- package/dist/base/primitives/element/vars.css.d.ts +0 -3
- package/dist/base/primitives/element/vars.css.ts.vanilla.css.js +0 -1
- package/dist/components/Link.css.d.ts +0 -3
- package/dist/components/Link.css.js +0 -9
- package/dist/diagram.css +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Accordion/Accordion.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ActionIcon/ActionIcon.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Affix/Affix.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Alert/Alert.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Anchor/Anchor.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/AngleSlider/AngleSlider.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/AppShell/AppShell.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/AspectRatio/AspectRatio.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Avatar/Avatar.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/BackgroundImage/BackgroundImage.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Badge/Badge.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Blockquote/Blockquote.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Breadcrumbs/Breadcrumbs.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Burger/Burger.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Button/Button.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Card/Card.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Center/Center.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Checkbox/Checkbox.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Checkbox/CheckboxCard/CheckboxCard.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Checkbox/CheckboxIndicator/CheckboxIndicator.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Chip/Chip.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/CloseButton/CloseButton.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Code/Code.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ColorInput/ColorInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ColorPicker/ColorPicker.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ColorSwatch/ColorSwatch.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Combobox/Combobox.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Container/Container.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Dialog/Dialog.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Divider/Divider.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Drawer/Drawer.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Fieldset/Fieldset.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Flex/Flex.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/FloatingIndicator/FloatingIndicator.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Grid/Grid.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Group/Group.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Image/Image.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Indicator/Indicator.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/InlineInput/InlineInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Input/Input.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Kbd/Kbd.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/List/List.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Loader/Loader.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/LoadingOverlay/LoadingOverlay.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Mark/Mark.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Menu/Menu.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Modal/Modal.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ModalBase/ModalBase.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/NavLink/NavLink.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Notification/Notification.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/NumberInput/NumberInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Overlay/Overlay.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Pagination/Pagination.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Paper/Paper.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/PasswordInput/PasswordInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Pill/Pill.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/PillsInput/PillsInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/PinInput/PinInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Popover/Popover.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Progress/Progress.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Radio/Radio.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Radio/RadioCard/RadioCard.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Radio/RadioIndicator/RadioIndicator.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Rating/Rating.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/RingProgress/RingProgress.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ScrollArea/ScrollArea.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/SegmentedControl/SegmentedControl.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/SemiCircleProgress/SemiCircleProgress.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/SimpleGrid/SimpleGrid.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Skeleton/Skeleton.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Slider/Slider.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Spoiler/Spoiler.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Stack/Stack.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Stepper/Stepper.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Switch/Switch.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Table/Table.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/TableOfContents/TableOfContents.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Tabs/Tabs.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Text/Text.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ThemeIcon/ThemeIcon.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Timeline/Timeline.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Title/Title.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Tooltip/Tooltip.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Tree/Tree.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/TypographyStylesProvider/TypographyStylesProvider.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/UnstyledButton/UnstyledButton.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/VisuallyHidden/VisuallyHidden.module.css.mjs.vanilla.css.js +0 -1
- package/dist/theme-vars.css.d.ts +0 -63
- package/dist/theme-vars.css.js +0 -7
- package/dist/theme-vars.css.ts.vanilla.css.js +0 -1
- package/dist/theme-vars.d.ts +0 -16
- package/dist/theme-vars.js +0 -7
- package/dist/utils/css.js +0 -10
- package/src/LikeC4Diagram.css.ts +0 -198
- package/src/base/example/RelationshipsBrowser.tsx +0 -62
- package/src/base/example/_types.ts +0 -72
- package/src/base/example/custom.tsx +0 -58
- package/src/base/example/useViewToNodesEdges.ts +0 -194
- package/src/base/primitives/compound/CompoundActionButton.css.ts +0 -52
- package/src/base/primitives/compound/CompoundDetailsButton.css.ts +0 -58
- package/src/base/primitives/compound/CompoundTitle.css.ts +0 -65
- package/src/base/primitives/element/ElementActionButtons.css.ts +0 -52
- package/src/base/primitives/element/ElementDetailsButton.css.ts +0 -50
- package/src/base/primitives/element/vars.css.ts +0 -5
- package/src/components/Link.css.ts +0 -49
- package/src/overlays/relationship-details/custom/index.tsx +0 -2
- package/src/overlays/relationships-browser/custom/index.tsx +0 -2
- package/src/theme-vars.css.ts +0 -69
- package/src/theme-vars.ts +0 -25
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type EdgeId, type NodeId, nonNullable } from '@likec4/core'
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
2
|
+
import { cx } from '@likec4/styles/css'
|
|
3
|
+
import { useCallbackRef, useTimeout } from '@mantine/hooks'
|
|
4
|
+
import type { OnMove, OnMoveEnd } from '@xyflow/system'
|
|
5
|
+
import { deepEqual, shallowEqual } from 'fast-equals'
|
|
5
6
|
import { type PropsWithChildren, memo } from 'react'
|
|
6
|
-
import type { EnforceOptional } from 'type-fest/source/enforce-optional'
|
|
7
7
|
import { BaseXYFlow } from '../base/BaseXYFlow'
|
|
8
8
|
import { useDiagramEventHandlers } from '../context'
|
|
9
|
-
import {
|
|
9
|
+
import { usePanningAtom } from '../context/ReduceGraphics'
|
|
10
10
|
import { useDiagram, useDiagramContext } from '../hooks/useDiagram'
|
|
11
11
|
import type { LikeC4DiagramProperties } from '../LikeC4Diagram.props'
|
|
12
12
|
import type { DiagramContext } from '../state/types'
|
|
@@ -41,22 +41,29 @@ const equalsXYProps = (a: ReturnType<typeof selectXYProps>, b: ReturnType<typeof
|
|
|
41
41
|
a.enableReadOnly === b.enableReadOnly &&
|
|
42
42
|
shallowEqual(a.nodes, b.nodes) &&
|
|
43
43
|
shallowEqual(a.edges, b.edges) &&
|
|
44
|
-
shallowEqual(a.viewport, b.viewport)
|
|
44
|
+
shallowEqual(a.viewport ?? null, b.viewport ?? null)
|
|
45
45
|
|
|
46
|
-
type
|
|
46
|
+
export type LikeC4DiagramXYFlowProps = PropsWithChildren<
|
|
47
47
|
Pick<
|
|
48
48
|
LikeC4DiagramProperties,
|
|
49
49
|
| 'background'
|
|
50
50
|
| 'nodesDraggable'
|
|
51
51
|
| 'nodesSelectable'
|
|
52
|
+
| 'reactFlowProps'
|
|
52
53
|
>
|
|
53
54
|
>
|
|
54
|
-
|
|
55
|
+
|
|
56
|
+
const compareProps = <T extends LikeC4DiagramXYFlowProps>(a: T, b: T): boolean =>
|
|
57
|
+
a.nodesDraggable === b.nodesDraggable &&
|
|
58
|
+
a.nodesSelectable === b.nodesSelectable &&
|
|
59
|
+
deepEqual(a.background, b.background) &&
|
|
60
|
+
deepEqual(a.reactFlowProps ?? {}, b.reactFlowProps ?? {})
|
|
55
61
|
|
|
56
62
|
export const LikeC4DiagramXYFlow = memo<LikeC4DiagramXYFlowProps>(({
|
|
57
|
-
background,
|
|
58
|
-
nodesDraggable,
|
|
59
|
-
nodesSelectable,
|
|
63
|
+
background = 'dots',
|
|
64
|
+
nodesDraggable = false,
|
|
65
|
+
nodesSelectable = false,
|
|
66
|
+
reactFlowProps = {},
|
|
60
67
|
children,
|
|
61
68
|
}) => {
|
|
62
69
|
const diagram = useDiagram()
|
|
@@ -79,19 +86,41 @@ export const LikeC4DiagramXYFlow = memo<LikeC4DiagramXYFlowProps>(({
|
|
|
79
86
|
onCanvasDblClick,
|
|
80
87
|
} = useDiagramEventHandlers()
|
|
81
88
|
|
|
82
|
-
const notReadOnly = !enableReadOnly
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
const notReadOnly = !enableReadOnly,
|
|
90
|
+
layoutConstraints = useLayoutConstraints(),
|
|
91
|
+
$isPanning = usePanningAtom(),
|
|
92
|
+
isPanning = useTimeout(() => {
|
|
93
|
+
$isPanning.set(true)
|
|
94
|
+
}, 160),
|
|
95
|
+
notPanning = useTimeout(() => {
|
|
96
|
+
isPanning.clear()
|
|
97
|
+
if ($isPanning.get()) {
|
|
98
|
+
$isPanning.set(false)
|
|
99
|
+
}
|
|
100
|
+
}, 120),
|
|
101
|
+
onMove: OnMove = useCallbackRef((event) => {
|
|
102
|
+
if (!event) {
|
|
103
|
+
return
|
|
104
|
+
}
|
|
105
|
+
if (!$isPanning.get()) {
|
|
106
|
+
isPanning.start()
|
|
107
|
+
}
|
|
108
|
+
notPanning.clear()
|
|
109
|
+
notPanning.start()
|
|
110
|
+
}),
|
|
111
|
+
onMoveEnd: OnMoveEnd = useCallbackRef((event, viewport) => {
|
|
112
|
+
notPanning.start()
|
|
113
|
+
diagram.send({ type: 'xyflow.viewportMoved', viewport, manually: !!event })
|
|
114
|
+
}),
|
|
115
|
+
onViewportResize = useCallbackRef(() => {
|
|
116
|
+
diagram.send({ type: 'xyflow.resized' })
|
|
117
|
+
})
|
|
89
118
|
|
|
90
119
|
return (
|
|
91
120
|
<BaseXYFlow<Types.Node, Types.Edge>
|
|
92
121
|
nodes={nodes}
|
|
93
122
|
edges={edges}
|
|
94
|
-
className={
|
|
123
|
+
className={cx(initialized ? 'initialized' : 'not-initialized')}
|
|
95
124
|
nodeTypes={nodeTypes}
|
|
96
125
|
edgeTypes={edgeTypes}
|
|
97
126
|
onNodesChange={useCallbackRef((changes) => {
|
|
@@ -124,10 +153,34 @@ export const LikeC4DiagramXYFlow = memo<LikeC4DiagramXYFlowProps>(({
|
|
|
124
153
|
diagram.send({ type: 'xyflow.paneDblClick' })
|
|
125
154
|
onCanvasDblClick?.(e as any)
|
|
126
155
|
})}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
156
|
+
onNodeMouseEnter={useCallbackRef((_event, node) => {
|
|
157
|
+
_event.stopPropagation()
|
|
158
|
+
if (!node.data.hovered) {
|
|
159
|
+
diagram.send({ type: 'xyflow.nodeMouseEnter', node })
|
|
160
|
+
}
|
|
161
|
+
})}
|
|
162
|
+
onNodeMouseLeave={useCallbackRef((_event, node) => {
|
|
163
|
+
_event.stopPropagation()
|
|
164
|
+
if (node.data.hovered) {
|
|
165
|
+
diagram.send({ type: 'xyflow.nodeMouseLeave', node })
|
|
166
|
+
}
|
|
130
167
|
})}
|
|
168
|
+
onEdgeMouseEnter={useCallbackRef((_event, edge) => {
|
|
169
|
+
_event.stopPropagation()
|
|
170
|
+
if (!edge.data.hovered) {
|
|
171
|
+
diagram.send({ type: 'xyflow.edgeMouseEnter', edge })
|
|
172
|
+
}
|
|
173
|
+
})}
|
|
174
|
+
onEdgeMouseLeave={useCallbackRef((_event, edge) => {
|
|
175
|
+
_event.stopPropagation()
|
|
176
|
+
if (edge.data.hovered) {
|
|
177
|
+
diagram.send({ type: 'xyflow.edgeMouseLeave', edge })
|
|
178
|
+
}
|
|
179
|
+
})}
|
|
180
|
+
{...props.pannable && {
|
|
181
|
+
onMove,
|
|
182
|
+
}}
|
|
183
|
+
onMoveEnd={onMoveEnd}
|
|
131
184
|
onInit={useCallbackRef((instance) => {
|
|
132
185
|
diagram.send({ type: 'xyflow.init', instance })
|
|
133
186
|
})}
|
|
@@ -154,10 +207,11 @@ export const LikeC4DiagramXYFlow = memo<LikeC4DiagramXYFlowProps>(({
|
|
|
154
207
|
nodesDraggable={notReadOnly && nodesDraggable}
|
|
155
208
|
nodesSelectable={nodesSelectable}
|
|
156
209
|
{...(notReadOnly && nodesDraggable && layoutConstraints)}
|
|
157
|
-
{...props}
|
|
158
|
-
|
|
159
|
-
<DiagramUI />
|
|
210
|
+
{...props}
|
|
211
|
+
{...reactFlowProps}>
|
|
212
|
+
<DiagramUI key={'DiagramUI'} />
|
|
160
213
|
{children}
|
|
161
214
|
</BaseXYFlow>
|
|
162
215
|
)
|
|
163
|
-
},
|
|
216
|
+
}, compareProps)
|
|
217
|
+
LikeC4DiagramXYFlow.displayName = 'LikeC4DiagramXYFlow'
|
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mantine } from '../../../theme-vars'
|
|
1
|
+
import { css } from '@likec4/styles/css'
|
|
2
|
+
// import { mantine } from '../../../theme-vars'
|
|
3
3
|
|
|
4
|
-
export const edgeNoteCloseButton =
|
|
4
|
+
export const edgeNoteCloseButton = css({
|
|
5
5
|
position: 'absolute',
|
|
6
6
|
top: 1,
|
|
7
7
|
right: 1,
|
|
8
8
|
zIndex: 9,
|
|
9
9
|
})
|
|
10
10
|
|
|
11
|
-
export const edgeNoteText =
|
|
11
|
+
export const edgeNoteText = css({
|
|
12
12
|
userSelect: 'all',
|
|
13
13
|
textAlign: 'left',
|
|
14
14
|
whiteSpaceCollapse: 'preserve-breaks',
|
|
15
15
|
textWrap: 'pretty',
|
|
16
16
|
lineHeight: 1.25,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
'@media': {
|
|
21
|
-
[mantine.largerThan('md')]: {
|
|
22
|
-
vars: {
|
|
23
|
-
'--text-fz': mantine.fontSizes.md,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
17
|
+
'--text-fz': '{fontSizes.sm}',
|
|
18
|
+
md: {
|
|
19
|
+
'--text-fz': '{fontSizes.md}',
|
|
26
20
|
},
|
|
27
21
|
})
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type EdgeId,
|
|
3
|
-
isStepEdgeId,
|
|
4
3
|
nonNullable,
|
|
5
4
|
} from '@likec4/core'
|
|
6
5
|
import { useDebouncedEffect } from '@react-hookz/web'
|
|
@@ -10,11 +9,20 @@ import clsx from 'clsx'
|
|
|
10
9
|
import { curveCatmullRomOpen, line as d3line } from 'd3-shape'
|
|
11
10
|
import { type PointerEvent as ReactPointerEvent, useEffect, useRef, useState } from 'react'
|
|
12
11
|
import { first, isTruthy, last } from 'remeda'
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
import { ZIndexes } from '../../../base/const'
|
|
13
|
+
import {
|
|
14
|
+
customEdge,
|
|
15
|
+
EdgeActionButton,
|
|
16
|
+
EdgeContainer,
|
|
17
|
+
EdgeLabel,
|
|
18
|
+
EdgeLabelContainer,
|
|
19
|
+
EdgePath,
|
|
20
|
+
} from '../../../base/primitives'
|
|
21
|
+
import { useEnabledFeatures } from '../../../context/DiagramFeatures'
|
|
22
|
+
import { useDiagram, useDiagramActorSnapshot } from '../../../hooks/useDiagram'
|
|
23
|
+
import { useIsPanning } from '../../../hooks/useReducedGraphics'
|
|
24
|
+
import { useXYFlow, useXYInternalNode, useXYStoreApi } from '../../../hooks/useXYFlow'
|
|
25
|
+
import type { DiagramActorSnapshot } from '../../../state/types'
|
|
18
26
|
import { vector, VectorImpl } from '../../../utils/vector'
|
|
19
27
|
import { bezierControlPoints, bezierPath, isSamePoint } from '../../../utils/xyflow'
|
|
20
28
|
import type { Types } from '../../types'
|
|
@@ -28,17 +36,15 @@ const curve = d3line<XYPosition>()
|
|
|
28
36
|
.x(d => d.x)
|
|
29
37
|
.y(d => d.y)
|
|
30
38
|
|
|
39
|
+
const selectActiveStepId = (s: DiagramActorSnapshot) => s.context.activeWalkthrough?.stepId ?? null
|
|
31
40
|
export const RelationshipEdge = customEdge<Types.RelationshipEdgeData>((props) => {
|
|
32
|
-
const
|
|
41
|
+
const isPanning = useIsPanning()
|
|
33
42
|
const [isControlPointDragging, setIsControlPointDragging] = useState(false)
|
|
34
43
|
const xyflowStore = useXYStoreApi()
|
|
35
44
|
const xyflow = useXYFlow()
|
|
36
45
|
const diagram = useDiagram()
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
'EdgeEditing',
|
|
40
|
-
'RelationshipDetails',
|
|
41
|
-
)
|
|
46
|
+
const activeWalkthroughStep = useDiagramActorSnapshot(selectActiveStepId)
|
|
47
|
+
const { enableNavigateTo, enableEdgeEditing, enableRelationshipDetails } = useEnabledFeatures()
|
|
42
48
|
const {
|
|
43
49
|
id,
|
|
44
50
|
source,
|
|
@@ -58,6 +64,7 @@ export const RelationshipEdge = customEdge<Types.RelationshipEdgeData>((props) =
|
|
|
58
64
|
labelXY,
|
|
59
65
|
...data
|
|
60
66
|
},
|
|
67
|
+
style = {},
|
|
61
68
|
} = props
|
|
62
69
|
|
|
63
70
|
const navigateTo = enableNavigateTo ? data.navigateTo : undefined
|
|
@@ -294,53 +301,73 @@ export const RelationshipEdge = customEdge<Types.RelationshipEdgeData>((props) =
|
|
|
294
301
|
e.stopPropagation()
|
|
295
302
|
}
|
|
296
303
|
|
|
297
|
-
let
|
|
298
|
-
if (
|
|
304
|
+
let zIndex = ZIndexes.Edge
|
|
305
|
+
if (hovered || active) {
|
|
306
|
+
// Move above the elements
|
|
307
|
+
zIndex = ZIndexes.Element + 1
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
let edgeLabel = (
|
|
311
|
+
<EdgeLabel edgeProps={props}>
|
|
312
|
+
{!isControlPointDragging && navigateTo && (
|
|
313
|
+
<EdgeActionButton
|
|
314
|
+
{...props}
|
|
315
|
+
onClick={e => {
|
|
316
|
+
e.stopPropagation()
|
|
317
|
+
diagram.navigateTo(navigateTo)
|
|
318
|
+
}} />
|
|
319
|
+
)}
|
|
320
|
+
</EdgeLabel>
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
if (!isControlPointDragging && !isPanning) {
|
|
299
324
|
const notes = props.data.notes
|
|
300
|
-
if (notes &&
|
|
301
|
-
|
|
325
|
+
if (notes && activeWalkthroughStep === props.id) {
|
|
326
|
+
edgeLabel = (
|
|
302
327
|
<NotePopover notes={notes}>
|
|
303
|
-
|
|
328
|
+
{edgeLabel}
|
|
304
329
|
</NotePopover>
|
|
305
330
|
)
|
|
306
|
-
} else if (enableRelationshipDetails
|
|
307
|
-
|
|
331
|
+
} else if (enableRelationshipDetails) {
|
|
332
|
+
edgeLabel = (
|
|
308
333
|
<RelationshipsDropdownMenu
|
|
309
334
|
disabled={!!dimmed}
|
|
310
335
|
source={source}
|
|
311
336
|
target={target}
|
|
312
337
|
edgeId={edgeId}>
|
|
313
|
-
|
|
338
|
+
{edgeLabel}
|
|
314
339
|
</RelationshipsDropdownMenu>
|
|
315
340
|
)
|
|
316
341
|
}
|
|
317
342
|
}
|
|
318
343
|
|
|
319
344
|
return (
|
|
320
|
-
|
|
321
|
-
<
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
onClick={e => {
|
|
335
|
-
e.stopPropagation()
|
|
336
|
-
diagram.navigateTo(navigateTo)
|
|
337
|
-
}} />
|
|
338
|
-
)}
|
|
339
|
-
</EdgeLabel>
|
|
345
|
+
<>
|
|
346
|
+
<EdgeContainer {...props} className={clsx(isControlPointDragging && edgesCss.controlDragging)}>
|
|
347
|
+
<EdgePath {...props} svgPath={edgePath} ref={svgPathRef} onEdgePointerDown={onEdgePointerDown} />
|
|
348
|
+
<EdgeLabelContainer
|
|
349
|
+
edgeProps={props}
|
|
350
|
+
labelPosition={{
|
|
351
|
+
x: labelX,
|
|
352
|
+
y: labelY,
|
|
353
|
+
translate: isModified ? 'translate(-50%, 0)' : undefined,
|
|
354
|
+
}}
|
|
355
|
+
>
|
|
356
|
+
{edgeLabel}
|
|
357
|
+
</EdgeLabelContainer>
|
|
358
|
+
</EdgeContainer>
|
|
340
359
|
{/* Render control points above edge label */}
|
|
341
360
|
{enableEdgeEditing && controlPoints.length > 0 && (
|
|
342
361
|
<EdgeLabelRenderer>
|
|
343
|
-
<EdgeContainer
|
|
362
|
+
<EdgeContainer
|
|
363
|
+
component="svg"
|
|
364
|
+
className={edgesCss.controlPointsContainer}
|
|
365
|
+
{...props}
|
|
366
|
+
style={{
|
|
367
|
+
...style,
|
|
368
|
+
zIndex,
|
|
369
|
+
}}
|
|
370
|
+
>
|
|
344
371
|
<g
|
|
345
372
|
onContextMenu={e => {
|
|
346
373
|
e.preventDefault()
|
|
@@ -360,6 +387,6 @@ export const RelationshipEdge = customEdge<Types.RelationshipEdgeData>((props) =
|
|
|
360
387
|
</EdgeContainer>
|
|
361
388
|
</EdgeLabelRenderer>
|
|
362
389
|
)}
|
|
363
|
-
|
|
390
|
+
</>
|
|
364
391
|
)
|
|
365
392
|
})
|
|
@@ -1,61 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mantine, vars } from '../../../theme-vars'
|
|
1
|
+
import { css } from '@likec4/styles/css'
|
|
3
2
|
|
|
4
|
-
export const menuDropdown =
|
|
3
|
+
export const menuDropdown = css({
|
|
5
4
|
overflowY: 'scroll',
|
|
6
|
-
minWidth:
|
|
5
|
+
minWidth: '250px',
|
|
7
6
|
maxWidth: 'min(90vw, 500px)',
|
|
8
7
|
})
|
|
9
8
|
|
|
10
|
-
export const menuItemRelationship =
|
|
11
|
-
// padding: mantine.spacing.sm,
|
|
12
|
-
// paddingTop: mantine.spacing.xs,
|
|
13
|
-
// borderRadius: mantine.radius.sm,
|
|
14
|
-
// paddingTop: mantine.spacing.xs,
|
|
15
|
-
// paddingBottom: mantine.spacing.xs,
|
|
9
|
+
export const menuItemRelationship = css({
|
|
16
10
|
gap: 4,
|
|
17
|
-
// cursor: 'pointer',
|
|
18
|
-
// ':hover': {
|
|
19
|
-
// borderColor: mantine.colors.gray.light,
|
|
20
|
-
// background: mantine.colors.gray[2]
|
|
21
|
-
// },
|
|
22
|
-
|
|
23
|
-
// selectors: {
|
|
24
|
-
// [`:where([data-mantine-color-scheme="dark"]) &`]: {
|
|
25
|
-
// // borderColor: mantine.colors.dark[6]
|
|
26
|
-
// },
|
|
27
|
-
// [`:where([data-mantine-color-scheme="dark"]) &:hover`]: {
|
|
28
|
-
// // background: mantine.colors.dark[5]
|
|
29
|
-
// }
|
|
30
|
-
// }
|
|
31
11
|
})
|
|
32
12
|
|
|
33
|
-
export const endpoint =
|
|
13
|
+
export const endpoint = css({
|
|
34
14
|
display: 'block',
|
|
35
|
-
fontSize:
|
|
15
|
+
fontSize: 'xxs',
|
|
36
16
|
fontWeight: 500,
|
|
37
17
|
whiteSpace: 'nowrap',
|
|
38
|
-
padding: '2px
|
|
18
|
+
padding: '2px 4px',
|
|
39
19
|
borderRadius: 2,
|
|
40
|
-
background: `
|
|
41
|
-
lineHeight: 1.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
20
|
+
background: `likec4.palette.fill/30`,
|
|
21
|
+
lineHeight: '[1.11]',
|
|
22
|
+
mixBlendMode: 'hard-light',
|
|
23
|
+
color: {
|
|
24
|
+
_light: `[color-mix(in srgb, {colors.likec4.palette.stroke}, {colors.likec4.mixColor} 60%)]`,
|
|
25
|
+
_dark: 'likec4.palette.loContrast',
|
|
46
26
|
},
|
|
27
|
+
// _dark: {
|
|
28
|
+
// background: `likec4.palette.fill/60`,
|
|
29
|
+
// },
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
export const title = css({
|
|
33
|
+
whiteSpaceCollapse: 'preserve-breaks',
|
|
34
|
+
fontSize: 'xs',
|
|
47
35
|
})
|
|
48
36
|
|
|
49
|
-
export const
|
|
37
|
+
export const arrowFromTo = css({
|
|
50
38
|
whiteSpaceCollapse: 'preserve-breaks',
|
|
51
|
-
fontSize:
|
|
39
|
+
fontSize: 'xs',
|
|
52
40
|
})
|
|
53
|
-
//
|
|
54
|
-
// export const sourceId = style({
|
|
55
|
-
//
|
|
56
|
-
// })
|
|
57
|
-
//
|
|
58
|
-
// export const targetId = style({
|
|
59
|
-
// fontSize: 11,
|
|
60
|
-
// whiteSpace: 'nowrap'
|
|
61
|
-
// })
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
DiagramNode,
|
|
7
7
|
nameFromFqn,
|
|
8
8
|
} from '@likec4/core'
|
|
9
|
+
import { css, cx } from '@likec4/styles/css'
|
|
9
10
|
import {
|
|
10
11
|
type StackProps,
|
|
11
12
|
ActionIcon,
|
|
@@ -24,8 +25,7 @@ import {
|
|
|
24
25
|
TooltipGroup,
|
|
25
26
|
} from '@mantine/core'
|
|
26
27
|
import { IconArrowRight, IconFileSymlink, IconInfoCircle, IconZoomScan } from '@tabler/icons-react'
|
|
27
|
-
import
|
|
28
|
-
import { type MouseEventHandler, type PropsWithChildren, forwardRef, Fragment, useCallback } from 'react'
|
|
28
|
+
import { type MouseEventHandler, type PropsWithChildren, forwardRef, Fragment, memo, useCallback } from 'react'
|
|
29
29
|
import { filter, isTruthy, map, partition, pipe } from 'remeda'
|
|
30
30
|
import { Link } from '../../../components/Link'
|
|
31
31
|
import { IfEnabled, useDiagramEventHandlers, useEnabledFeature } from '../../../context'
|
|
@@ -33,7 +33,7 @@ import { useMantinePortalProps } from '../../../hooks'
|
|
|
33
33
|
import { useDiagram, useDiagramContext } from '../../../hooks/useDiagram'
|
|
34
34
|
import { useLikeC4Model } from '../../../likec4model'
|
|
35
35
|
import { findDiagramEdge, findDiagramNode } from '../../../state/utils'
|
|
36
|
-
import * as
|
|
36
|
+
import * as styles from './RelationshipsDropdownMenu.css'
|
|
37
37
|
|
|
38
38
|
const stopPropagation: MouseEventHandler = (e) => e.stopPropagation()
|
|
39
39
|
|
|
@@ -48,18 +48,20 @@ export const Tooltip = MantineTooltip.withProps({
|
|
|
48
48
|
withinPortal: false,
|
|
49
49
|
})
|
|
50
50
|
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
export const RelationshipsDropdownMenu = memo((
|
|
52
|
+
{
|
|
53
|
+
edgeId,
|
|
54
|
+
source,
|
|
55
|
+
target,
|
|
56
|
+
disabled = false,
|
|
57
|
+
children,
|
|
58
|
+
}: PropsWithChildren<{
|
|
59
|
+
edgeId: EdgeId
|
|
60
|
+
source: string
|
|
61
|
+
target: string
|
|
62
|
+
disabled?: boolean | undefined
|
|
63
|
+
}>,
|
|
64
|
+
) => {
|
|
63
65
|
const { diagramEdge, sourceNode, targetNode } = useDiagramContext(ctx => ({
|
|
64
66
|
diagramEdge: findDiagramEdge(ctx, edgeId),
|
|
65
67
|
sourceNode: findDiagramNode(ctx, source),
|
|
@@ -137,7 +139,7 @@ export function RelationshipsDropdownMenu({
|
|
|
137
139
|
{children}
|
|
138
140
|
</MenuTarget>
|
|
139
141
|
<MenuDropdown
|
|
140
|
-
className={
|
|
142
|
+
className={styles.menuDropdown}
|
|
141
143
|
onPointerDownCapture={stopPropagation}
|
|
142
144
|
onPointerDown={stopPropagation}
|
|
143
145
|
onClick={stopPropagation}
|
|
@@ -167,7 +169,7 @@ export function RelationshipsDropdownMenu({
|
|
|
167
169
|
</MenuDropdown>
|
|
168
170
|
</Menu>
|
|
169
171
|
)
|
|
170
|
-
}
|
|
172
|
+
})
|
|
171
173
|
|
|
172
174
|
const Relationship = forwardRef<
|
|
173
175
|
HTMLDivElement,
|
|
@@ -196,13 +198,13 @@ const Relationship = forwardRef<
|
|
|
196
198
|
const links = r.links
|
|
197
199
|
|
|
198
200
|
return (
|
|
199
|
-
<Stack ref={ref} className={
|
|
201
|
+
<Stack ref={ref} className={cx(styles.menuItemRelationship, className)} {...props}>
|
|
200
202
|
<Group gap={4}>
|
|
201
|
-
<Text component="div" className={css
|
|
203
|
+
<Text component="div" className={cx(css({ likec4Palette: sourceNode.color }), styles.endpoint)}>
|
|
202
204
|
{sourceId}
|
|
203
205
|
</Text>
|
|
204
|
-
<IconArrowRight stroke={2.5} size={
|
|
205
|
-
<Text component="div" className={css
|
|
206
|
+
<IconArrowRight stroke={2.5} size={'11px'} opacity={0.65} />
|
|
207
|
+
<Text component="div" className={cx(css({ likec4Palette: targetNode.color }), styles.endpoint)}>
|
|
206
208
|
{targetId}
|
|
207
209
|
</Text>
|
|
208
210
|
{(navigateTo || !!onOpenSource) && (
|
|
@@ -211,7 +213,7 @@ const Relationship = forwardRef<
|
|
|
211
213
|
{navigateTo && (
|
|
212
214
|
<Tooltip label={'Open dynamic view'}>
|
|
213
215
|
<ActionIcon
|
|
214
|
-
className={
|
|
216
|
+
className={cx('nodrag nopan')}
|
|
215
217
|
size={'sm'}
|
|
216
218
|
radius="sm"
|
|
217
219
|
variant="default"
|
|
@@ -229,7 +231,7 @@ const Relationship = forwardRef<
|
|
|
229
231
|
<IfEnabled feature="Vscode">
|
|
230
232
|
<Tooltip label={'Open source'}>
|
|
231
233
|
<ActionIcon
|
|
232
|
-
className={
|
|
234
|
+
className={cx('nodrag nopan')}
|
|
233
235
|
size={'sm'}
|
|
234
236
|
radius="sm"
|
|
235
237
|
variant="default"
|
|
@@ -247,7 +249,7 @@ const Relationship = forwardRef<
|
|
|
247
249
|
</TooltipGroup>
|
|
248
250
|
)}
|
|
249
251
|
</Group>
|
|
250
|
-
<Box className={
|
|
252
|
+
<Box className={styles.title}>{r.title || 'untitled'}</Box>
|
|
251
253
|
{r.description && <Text size="xs" c="dimmed">{r.description}</Text>}
|
|
252
254
|
{links.length > 0 && (
|
|
253
255
|
<Stack
|
|
@@ -1,54 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { mantine, xyvars } from '../../../theme-vars'
|
|
1
|
+
import { css } from '@likec4/styles/css'
|
|
2
|
+
// import { globalStyle, style } from '@vanilla-extract/css'
|
|
3
|
+
// import { mantine, xyvars } from '../../../theme-vars'
|
|
4
4
|
|
|
5
5
|
const isSelected = '.react-flow__edge.selected'
|
|
6
6
|
|
|
7
|
-
export const controlPointsContainer =
|
|
7
|
+
export const controlPointsContainer = css({
|
|
8
8
|
overflow: 'visible',
|
|
9
9
|
position: 'absolute',
|
|
10
10
|
pointerEvents: 'none',
|
|
11
11
|
top: 0,
|
|
12
12
|
left: 0,
|
|
13
|
-
|
|
14
|
-
selectors: {
|
|
15
|
-
[`&:is([data-edge-hovered='true'])`]: {
|
|
16
|
-
zIndex: ZIndexes.Edge + 1,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
13
|
+
mixBlendMode: 'normal',
|
|
19
14
|
})
|
|
20
15
|
|
|
21
|
-
export const controlPoint =
|
|
22
|
-
fill:
|
|
23
|
-
stroke:
|
|
16
|
+
export const controlPoint = css({
|
|
17
|
+
fill: `likec4.relation.stroke`,
|
|
18
|
+
stroke: `likec4.relation.stroke`,
|
|
24
19
|
fillOpacity: 0.75,
|
|
25
20
|
strokeWidth: 1,
|
|
26
21
|
cursor: 'grab',
|
|
27
22
|
pointerEvents: 'auto',
|
|
28
23
|
visibility: 'hidden',
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
_hover: {
|
|
25
|
+
fillOpacity: 1,
|
|
26
|
+
stroke: 'mantine.colors.primary.filledHover',
|
|
27
|
+
strokeWidth: 10,
|
|
32
28
|
transition: 'stroke 100ms ease-out, stroke-width 100ms ease-out',
|
|
33
29
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
strokeWidth: 5,
|
|
41
|
-
},
|
|
30
|
+
[`:where(${isSelected}, [data-likec4-hovered='true']) &`]: {
|
|
31
|
+
visibility: 'visible',
|
|
32
|
+
transition: 'fill-opacity 150ms ease-out, stroke 150ms ease-out, stroke-width 150ms ease-out',
|
|
33
|
+
transitionDelay: '50ms',
|
|
34
|
+
fillOpacity: 1,
|
|
35
|
+
strokeWidth: 5,
|
|
42
36
|
},
|
|
43
37
|
})
|
|
44
38
|
|
|
45
|
-
export const controlDragging =
|
|
39
|
+
export const controlDragging = css({
|
|
46
40
|
cursor: 'grabbing',
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
cursor: 'grabbing !important',
|
|
41
|
+
'& *': {
|
|
42
|
+
cursor: 'grabbing !important',
|
|
43
|
+
},
|
|
44
|
+
'& .react-flow__edge-interaction': {
|
|
45
|
+
cursor: 'grabbing !important',
|
|
46
|
+
},
|
|
54
47
|
})
|
|
@@ -38,7 +38,7 @@ const ElementDetailsButtonWithHandler = ({ fqn, ...props }: NodeProps<Types.Node
|
|
|
38
38
|
|
|
39
39
|
export const ElementNode = customNode<Types.ElementNodeData>((props) => (
|
|
40
40
|
<ElementNodeContainer nodeProps={props}>
|
|
41
|
-
<ElementShape {...props} isMultiple={props.data.isMultiple}
|
|
41
|
+
<ElementShape {...props} isMultiple={props.data.isMultiple} />
|
|
42
42
|
<ElementTitle {...props} />
|
|
43
43
|
<ElementActions {...props} />
|
|
44
44
|
<ElementDetailsButtonWithHandler
|
|
@@ -53,7 +53,7 @@ export const ElementNode = customNode<Types.ElementNodeData>((props) => (
|
|
|
53
53
|
|
|
54
54
|
export const DeploymentNode = customNode<Types.DeploymentElementNodeData>((props) => (
|
|
55
55
|
<ElementNodeContainer nodeProps={props}>
|
|
56
|
-
<ElementShape {...props} isMultiple={props.data.isMultiple}
|
|
56
|
+
<ElementShape {...props} isMultiple={props.data.isMultiple} />
|
|
57
57
|
<ElementTitle {...props} />
|
|
58
58
|
<DeploymentElementActions {...props} />
|
|
59
59
|
{!!props.data.modelFqn && (
|