@likec4/diagram 1.26.2 → 1.27.1
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 +48937 -0
- package/dist/LikeC4CustomColors.js +27 -23
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +38 -43
- 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 +130 -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 +14 -29
- package/dist/base/primitives/edge/edge.css.d.ts +2 -2
- package/dist/base/primitives/edge/edge.css.js +125 -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 +51 -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 +107 -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 +196 -19
- package/dist/base/primitives/element/ElementTitle.js +25 -24
- package/dist/base/primitives/index.d.ts +1 -0
- package/dist/base/types.js +6 -6
- 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 +62 -13
- 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 +5763 -5286
- 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 +83 -37
- 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 +127 -122
- 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 +15 -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 +19 -12
- 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.d.ts +11 -10
- package/dist/likec4diagram/useLayoutConstraints.js +100 -104
- 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 +22 -22
- 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 +76 -98
- package/dist/overlays/overlay/Overlay.d.ts +2 -2
- package/dist/overlays/overlay/Overlay.js +99 -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 +17 -19
- 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.d.ts +4 -2
- package/dist/state/DiagramActorProvider.js +44 -52
- package/dist/state/aligners.js +22 -31
- package/dist/state/assign.js +13 -23
- package/dist/state/diagram-machine.d.ts +5988 -5461
- package/dist/state/diagram-machine.js +476 -376
- 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 +17 -21
- 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 +110 -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 +28 -37
- package/src/base/primitives/edge/edge.css.ts +107 -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 +44 -70
- package/src/base/primitives/element/ElementNodeContainer.tsx +18 -8
- package/src/base/primitives/element/ElementShape.css.ts +70 -114
- package/src/base/primitives/element/ElementShape.tsx +0 -1
- package/src/base/primitives/element/ElementTitle.css.ts +169 -124
- package/src/base/primitives/element/ElementTitle.tsx +16 -16
- package/src/base/primitives/index.ts +1 -0
- package/src/base/types.ts +2 -2
- 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 +59 -6
- 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 +83 -27
- package/src/likec4diagram/custom/edges/NotePopover.css.ts +7 -13
- package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +108 -90
- 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 +10 -6
- package/src/likec4diagram/custom/nodes/toolbar/styles.css.ts +8 -4
- package/src/likec4diagram/ui/controls/LayoutDriftNotification.tsx +8 -4
- 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/useLayoutConstraints.ts +84 -89
- package/src/likec4diagram/useViewToNodesEdges.ts +2 -1
- package/src/overlays/Overlays.tsx +7 -5
- 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 +53 -47
- package/src/overlays/overlay/Overlay.tsx +102 -98
- 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/relationship-details/useLayoutedDetails.ts +1 -1
- 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 +37 -46
- package/src/state/assign.ts +2 -2
- package/src/state/diagram-machine.ts +477 -366
- 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
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { type DiagramEdge } from '@likec4/core'
|
|
2
|
+
import { css, cx } from '@likec4/styles/css'
|
|
3
|
+
import { EdgeLabelRenderer } from '@xyflow/react'
|
|
4
|
+
import { type HTMLAttributes } from 'react'
|
|
5
|
+
import { isNumber } from 'remeda'
|
|
6
|
+
import type { UndefinedOnPartialDeep } from 'type-fest'
|
|
7
|
+
import { ZIndexes } from '../../const'
|
|
8
|
+
import type { EdgeProps } from '../../types'
|
|
9
|
+
import { edgeVars } from './edge.css'
|
|
10
|
+
import { edgeLabelContainer, translate as _translate } from './EdgeLabel.css'
|
|
11
|
+
|
|
12
|
+
type Data = UndefinedOnPartialDeep<
|
|
13
|
+
Pick<
|
|
14
|
+
DiagramEdge,
|
|
15
|
+
| 'labelBBox'
|
|
16
|
+
| 'color'
|
|
17
|
+
>
|
|
18
|
+
>
|
|
19
|
+
|
|
20
|
+
type EdgeLabelContainerProps = HTMLAttributes<HTMLDivElement> & {
|
|
21
|
+
/**
|
|
22
|
+
* label position with optional translate
|
|
23
|
+
*/
|
|
24
|
+
labelPosition?: {
|
|
25
|
+
x?: number | undefined
|
|
26
|
+
y?: number | undefined
|
|
27
|
+
translate?: string | undefined
|
|
28
|
+
} | undefined
|
|
29
|
+
|
|
30
|
+
edgeProps: EdgeProps<Data>
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const toCssVarValue = (value: number | string | undefined) => {
|
|
34
|
+
if (value === undefined) return undefined
|
|
35
|
+
return isNumber(value) ? `${Math.round(value)}px` : value
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function EdgeLabelContainer({
|
|
39
|
+
edgeProps: {
|
|
40
|
+
id,
|
|
41
|
+
data: {
|
|
42
|
+
hovered: isHovered = false,
|
|
43
|
+
active: isActive = false,
|
|
44
|
+
dimmed: isDimmed = false,
|
|
45
|
+
labelBBox,
|
|
46
|
+
color = 'gray',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
labelPosition: labelXY,
|
|
50
|
+
className,
|
|
51
|
+
style,
|
|
52
|
+
children,
|
|
53
|
+
...rest
|
|
54
|
+
}: EdgeLabelContainerProps) {
|
|
55
|
+
let zIndex = ZIndexes.Edge
|
|
56
|
+
if (isHovered || isActive) {
|
|
57
|
+
// Move above the elements
|
|
58
|
+
zIndex = ZIndexes.Element + 1
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
let labelX = labelXY?.x ?? labelBBox?.x,
|
|
62
|
+
labelY = labelXY?.y ?? labelBBox?.y
|
|
63
|
+
|
|
64
|
+
if (labelX === undefined || labelY === undefined) {
|
|
65
|
+
return null
|
|
66
|
+
}
|
|
67
|
+
const translate = labelXY?.translate
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<EdgeLabelRenderer key={id}>
|
|
71
|
+
<div
|
|
72
|
+
key={id}
|
|
73
|
+
className={cx(
|
|
74
|
+
css({
|
|
75
|
+
likec4RelationPalette: color,
|
|
76
|
+
}),
|
|
77
|
+
edgeVars,
|
|
78
|
+
edgeLabelContainer,
|
|
79
|
+
'nodrag nopan',
|
|
80
|
+
'likec4-edge-label-container',
|
|
81
|
+
className,
|
|
82
|
+
)}
|
|
83
|
+
data-likec4-hovered={isHovered}
|
|
84
|
+
data-likec4-color={color}
|
|
85
|
+
data-edge-active={isActive}
|
|
86
|
+
data-edge-animated={isActive}
|
|
87
|
+
{...isDimmed !== false && {
|
|
88
|
+
'data-likec4-dimmed': isDimmed,
|
|
89
|
+
}}
|
|
90
|
+
style={{
|
|
91
|
+
top: toCssVarValue(labelY),
|
|
92
|
+
left: toCssVarValue(labelX),
|
|
93
|
+
...(translate && {
|
|
94
|
+
[_translate.var]: translate,
|
|
95
|
+
}),
|
|
96
|
+
...(labelBBox && {
|
|
97
|
+
maxWidth: labelBBox.width + 18,
|
|
98
|
+
}),
|
|
99
|
+
zIndex,
|
|
100
|
+
...style,
|
|
101
|
+
}}
|
|
102
|
+
{...rest}
|
|
103
|
+
>
|
|
104
|
+
{/* Work around to keep same global selector data-likec4-dimmed */}
|
|
105
|
+
<div
|
|
106
|
+
className={css({
|
|
107
|
+
display: 'contents',
|
|
108
|
+
})}
|
|
109
|
+
{...isDimmed !== false && {
|
|
110
|
+
'data-likec4-dimmed': isDimmed,
|
|
111
|
+
}}
|
|
112
|
+
>
|
|
113
|
+
{children}
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</EdgeLabelRenderer>
|
|
117
|
+
)
|
|
118
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { DiagramEdge } from '@likec4/core'
|
|
2
|
-
import
|
|
2
|
+
import { cx } from '@likec4/styles/css'
|
|
3
3
|
import { type PointerEventHandler, forwardRef } from 'react'
|
|
4
4
|
import type { UndefinedOnPartialDeep } from 'type-fest'
|
|
5
|
-
import { useIsReducedGraphics, useLooseReducedGraphics } from '../../../hooks/useReducedGraphics'
|
|
6
5
|
import type { EdgeProps } from '../../types'
|
|
7
|
-
import
|
|
6
|
+
import { cssEdgePath, edgePathBg, hideOnReducedGraphics, markerContext } from './edge.css'
|
|
8
7
|
import { arrowTypeToMarker, EdgeMarkers } from './EdgeMarkers'
|
|
9
8
|
|
|
10
9
|
type Data = UndefinedOnPartialDeep<
|
|
@@ -30,17 +29,13 @@ export const EdgePath = forwardRef<SVGPathElement, EdgePathProps>(({
|
|
|
30
29
|
dir,
|
|
31
30
|
tail,
|
|
32
31
|
head,
|
|
33
|
-
...data
|
|
34
32
|
},
|
|
35
33
|
strokeWidth,
|
|
36
34
|
svgPath,
|
|
37
35
|
style,
|
|
38
|
-
animated = false,
|
|
39
36
|
interactionWidth,
|
|
40
37
|
onEdgePointerDown,
|
|
41
38
|
}, svgPathRef) => {
|
|
42
|
-
const isReducedGraphics = useIsReducedGraphics()
|
|
43
|
-
const isLooseReduce = useLooseReducedGraphics()
|
|
44
39
|
let markerStartName = arrowTypeToMarker(tail)
|
|
45
40
|
let markerEndName = arrowTypeToMarker(head ?? 'normal')
|
|
46
41
|
if (dir === 'back') {
|
|
@@ -59,48 +54,44 @@ export const EdgePath = forwardRef<SVGPathElement, EdgePathProps>(({
|
|
|
59
54
|
} else if (isDashed) {
|
|
60
55
|
strokeDasharray = '8,10'
|
|
61
56
|
}
|
|
62
|
-
if (isLooseReduce) {
|
|
63
|
-
|
|
64
|
-
}
|
|
57
|
+
// if (isLooseReduce) {
|
|
58
|
+
// strokeDasharray = undefined
|
|
59
|
+
// }
|
|
65
60
|
|
|
66
|
-
const isAnimated = (animated || data.hovered || data.active) && !data.dimmed
|
|
67
|
-
if (isLooseReduce && isAnimated) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
61
|
+
// const isAnimated = (animated || data.hovered || data.active) && !data.dimmed
|
|
62
|
+
// if (isLooseReduce && isAnimated) {
|
|
63
|
+
// style = {
|
|
64
|
+
// ...style,
|
|
65
|
+
// animationName: 'none',
|
|
66
|
+
// }
|
|
67
|
+
// }
|
|
73
68
|
|
|
74
69
|
return (
|
|
75
70
|
<>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
)}
|
|
85
|
-
<g className={css.markerContext} onPointerDown={onEdgePointerDown}>
|
|
71
|
+
<path
|
|
72
|
+
className={cx('react-flow__edge-interaction', hideOnReducedGraphics)}
|
|
73
|
+
d={svgPath}
|
|
74
|
+
fill="none"
|
|
75
|
+
stroke={'transparent'}
|
|
76
|
+
strokeWidth={interactionWidth ?? 10}
|
|
77
|
+
/>
|
|
78
|
+
<g className={markerContext} onPointerDown={onEdgePointerDown}>
|
|
86
79
|
<defs>
|
|
87
80
|
{MarkerStart && <MarkerStart id={'start' + id} />}
|
|
88
81
|
{MarkerEnd && <MarkerEnd id={'end' + id} />}
|
|
89
82
|
</defs>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/>
|
|
97
|
-
)}
|
|
83
|
+
<path
|
|
84
|
+
className={cx('react-flow__edge-path', edgePathBg)}
|
|
85
|
+
d={svgPath}
|
|
86
|
+
style={style}
|
|
87
|
+
strokeLinecap={'round'}
|
|
88
|
+
/>
|
|
98
89
|
<path
|
|
99
90
|
ref={svgPathRef}
|
|
100
|
-
className={
|
|
91
|
+
className={cx(
|
|
101
92
|
'react-flow__edge-path',
|
|
102
93
|
'react-flow__edge-interaction',
|
|
103
|
-
|
|
94
|
+
cssEdgePath,
|
|
104
95
|
)}
|
|
105
96
|
d={svgPath}
|
|
106
97
|
style={style}
|
|
@@ -1,160 +1,135 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
reactFlow,
|
|
4
|
-
} from '../../../LikeC4Diagram.css'
|
|
5
|
-
import {
|
|
6
|
-
vars,
|
|
7
|
-
whereDark,
|
|
8
|
-
whereLight,
|
|
9
|
-
whereNotReducedGraphics,
|
|
10
|
-
whereReducedGraphics,
|
|
11
|
-
whereSmallZoom,
|
|
12
|
-
xyvars,
|
|
13
|
-
} from '../../../theme-vars'
|
|
1
|
+
import { css } from '@likec4/styles/css'
|
|
14
2
|
|
|
15
|
-
|
|
3
|
+
const isSelected = '.react-flow__edge.selected'
|
|
16
4
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
[xyvars.edge.strokeSelected]: `color-mix(in srgb, ${vars.relation.lineColor}, ${mixColor} 35%)`,
|
|
22
|
-
[xyvars.edge.labelColor]: vars.relation.labelColor,
|
|
23
|
-
[xyvars.edge.labelBgColor]: vars.relation.labelBgColor,
|
|
24
|
-
[xyvars.edge.strokeWidth]: '3',
|
|
25
|
-
},
|
|
26
|
-
selectors: {
|
|
27
|
-
[`${whereDark} &`]: {
|
|
28
|
-
vars: {
|
|
29
|
-
[mixColor]: `white`,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
[`${whereLight} ${whereNotReducedGraphics} &`]: {
|
|
33
|
-
vars: {
|
|
34
|
-
[xyvars.edge.labelColor]: `color-mix(in srgb, ${vars.relation.labelColor}, rgba(255 255 255 / 0.85) 40%)`,
|
|
35
|
-
[xyvars.edge.labelBgColor]: `color-mix(in srgb, ${vars.relation.labelBgColor}, transparent 40%)`,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
[`${whereDark} ${whereNotReducedGraphics} &`]: {
|
|
39
|
-
vars: {
|
|
40
|
-
[xyvars.edge.labelBgColor]: `color-mix(in srgb, ${vars.relation.labelBgColor}, transparent 50%)`,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
})
|
|
5
|
+
const edgeStroke = '--xy-edge-stroke'
|
|
6
|
+
const edgeStrokeSelected = '--xy-edge-stroke-selected'
|
|
7
|
+
const labelColor = '--xy-edge-label-color'
|
|
8
|
+
const labelBg = '--xy-edge-label-background-color'
|
|
45
9
|
|
|
46
|
-
export const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
filter: `grayscale(0.85) ${fallbackVar(vars.safariAnimationHook, 'blur(1px)')}`,
|
|
53
|
-
},
|
|
54
|
-
[`&:is([data-edge-dimmed="immediate"])`]: {
|
|
55
|
-
opacity: 0.25,
|
|
56
|
-
transition: 'opacity 100ms ease-in-out, filter 100ms ease-in-out',
|
|
57
|
-
filter: `grayscale(0.85) ${fallbackVar(vars.safariAnimationHook, 'blur(1px)')}`,
|
|
58
|
-
},
|
|
59
|
-
[`${whereReducedGraphics} &`]: {
|
|
60
|
-
transition: 'none',
|
|
61
|
-
},
|
|
10
|
+
export const edgeVars = css({
|
|
11
|
+
[edgeStroke]: '{colors.likec4.relation.stroke}',
|
|
12
|
+
[edgeStrokeSelected]: '{colors.likec4.relation.stroke.selected}',
|
|
13
|
+
[labelColor]: {
|
|
14
|
+
base: '{colors.likec4.relation.label}',
|
|
15
|
+
_light: `color-mix(in srgb, {colors.likec4.relation.label}, rgba(255 255 255 / 0.85) 40%)`,
|
|
62
16
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
globalStyle(`:where(${isSelected}) ${edgeVars}`, {
|
|
67
|
-
vars: {
|
|
68
|
-
[xyvars.edge.stroke]: xyvars.edge.strokeSelected,
|
|
69
|
-
[xyvars.edge.strokeWidth]: '3',
|
|
17
|
+
[labelBg]: {
|
|
18
|
+
_light: `{colors.likec4.relation.label.bg/60}`,
|
|
19
|
+
_dark: `{colors.likec4.relation.label.bg/50}`,
|
|
70
20
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
[xyvars.edge.strokeWidth]: '3',
|
|
21
|
+
['--xy-edge-stroke-width']: '3',
|
|
22
|
+
'&:is([data-likec4-hovered=\'true\'],[data-edge-active=\'true\'])': {
|
|
23
|
+
[edgeStroke]: '{colors.likec4.relation.stroke.selected}',
|
|
24
|
+
_whenSelected: {
|
|
25
|
+
['--xy-edge-stroke-width']: '4',
|
|
26
|
+
},
|
|
78
27
|
},
|
|
79
28
|
})
|
|
80
29
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
30
|
+
export const edgeContainer = css({
|
|
31
|
+
_reduceGraphics: {
|
|
32
|
+
transition: 'none',
|
|
84
33
|
},
|
|
85
34
|
})
|
|
86
35
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
36
|
+
const _hideOnReducedGraphics = css.raw({
|
|
37
|
+
_reduceGraphicsOnPan: {
|
|
38
|
+
display: 'none',
|
|
39
|
+
},
|
|
40
|
+
_smallZoom: {
|
|
41
|
+
display: 'none',
|
|
42
|
+
},
|
|
92
43
|
})
|
|
44
|
+
export const hideOnReducedGraphics = css(_hideOnReducedGraphics)
|
|
93
45
|
|
|
94
|
-
export const edgePathBg =
|
|
95
|
-
|
|
46
|
+
export const edgePathBg = css(_hideOnReducedGraphics, {
|
|
47
|
+
fill: '[none]',
|
|
48
|
+
strokeWidth: 'calc(var(--xy-edge-stroke-width) + 2)',
|
|
96
49
|
strokeOpacity: 0.08,
|
|
97
|
-
// transition: 'stroke-width 175ms ease-in-out',
|
|
98
|
-
// transition: 'stroke-width 175ms ease-in-out, stroke-opacity 150ms ease-out',
|
|
99
50
|
transitionProperty: 'stroke-width, stroke-opacity',
|
|
100
|
-
transitionDuration: '
|
|
101
|
-
transitionTimingFunction: '
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
51
|
+
transitionDuration: 'fast',
|
|
52
|
+
transitionTimingFunction: 'inOut',
|
|
53
|
+
_whenHovered: {
|
|
54
|
+
transitionTimingFunction: 'out',
|
|
55
|
+
strokeWidth: 'calc(var(--xy-edge-stroke-width) + 4)',
|
|
56
|
+
strokeOpacity: 0.2,
|
|
57
|
+
},
|
|
58
|
+
_whenSelected: {
|
|
59
|
+
strokeWidth: 'calc(var(--xy-edge-stroke-width) + 6)',
|
|
60
|
+
strokeOpacity: 0.25,
|
|
61
|
+
_whenHovered: {
|
|
62
|
+
strokeOpacity: 0.4,
|
|
109
63
|
},
|
|
110
64
|
},
|
|
111
65
|
})
|
|
112
66
|
|
|
113
67
|
// To fix issue with marker not inheriting color from path - we need to create container
|
|
114
|
-
export const markerContext =
|
|
115
|
-
fill:
|
|
116
|
-
stroke:
|
|
68
|
+
export const markerContext = css({
|
|
69
|
+
fill: '[var(--xy-edge-stroke)]' as const,
|
|
70
|
+
stroke: '[var(--xy-edge-stroke)]' as const,
|
|
117
71
|
})
|
|
118
72
|
|
|
119
|
-
const
|
|
120
|
-
'
|
|
121
|
-
|
|
73
|
+
export const cssEdgePath = css({
|
|
74
|
+
fill: '[none]',
|
|
75
|
+
strokeDashoffset: 10,
|
|
76
|
+
_noReduceGraphics: {
|
|
77
|
+
transition: 'stroke 130ms ease-out,stroke-width 130ms ease-out',
|
|
122
78
|
},
|
|
123
|
-
|
|
124
|
-
|
|
79
|
+
_whenHovered: {
|
|
80
|
+
animationStyle: 'xyedgeAnimated',
|
|
81
|
+
animationDelay: '450ms',
|
|
125
82
|
},
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
[`:where(${isSelected}, [data-edge-active='true'], [data-edge-animated='true']) &`]: {
|
|
143
|
-
animationName: strokeKeyframes,
|
|
144
|
-
animationDelay: '0ms',
|
|
145
|
-
},
|
|
146
|
-
[`:where([data-edge-dir='back']) &`]: {
|
|
147
|
-
animationDirection: 'reverse',
|
|
148
|
-
},
|
|
149
|
-
[`:where([data-edge-dimmed]) &`]: {
|
|
150
|
-
animationPlayState: 'paused',
|
|
151
|
-
},
|
|
152
|
-
[`${whereSmallZoom} &`]: {
|
|
153
|
-
animationName: 'none',
|
|
154
|
-
},
|
|
83
|
+
[`:where(${isSelected}, [data-edge-active='true'], [data-edge-animated='true']) &`]: {
|
|
84
|
+
animationStyle: 'xyedgeAnimated',
|
|
85
|
+
animationDelay: '0ms',
|
|
86
|
+
},
|
|
87
|
+
[`:where([data-edge-dir='back']) &`]: {
|
|
88
|
+
animationDirection: 'reverse',
|
|
89
|
+
},
|
|
90
|
+
_whenDimmed: {
|
|
91
|
+
animationPlayState: 'paused',
|
|
92
|
+
},
|
|
93
|
+
_smallZoom: {
|
|
94
|
+
animationName: 'none',
|
|
95
|
+
},
|
|
96
|
+
_whenPanning: {
|
|
97
|
+
strokeDasharray: 'none !important',
|
|
98
|
+
animationName: 'none',
|
|
155
99
|
},
|
|
156
100
|
})
|
|
157
101
|
|
|
158
|
-
|
|
159
|
-
|
|
102
|
+
const aiBg = {
|
|
103
|
+
var: '--ai-bg',
|
|
104
|
+
ref: 'var(--ai-bg)',
|
|
105
|
+
} as const
|
|
106
|
+
|
|
107
|
+
export const actionBtn = css({
|
|
108
|
+
// zIndex: 'calc(var(--layer-overlays, 1) + 1)',
|
|
109
|
+
pointerEvents: 'all',
|
|
110
|
+
// color: `xyedge.label`,
|
|
111
|
+
cursor: 'pointer',
|
|
112
|
+
opacity: 0.75,
|
|
113
|
+
transition: 'fast',
|
|
114
|
+
// backgroundColor: aiBg.ref,
|
|
115
|
+
[aiBg.var]: 'var(--xy-edge-label-background-color)',
|
|
116
|
+
'--ai-hover': `color-mix(in srgb , var(--xy-edge-label-background-color), {colors.likec4.mixColor} 10%)`,
|
|
117
|
+
'--ai-size': `var(--ai-size-sm)`,
|
|
118
|
+
'--ai-radius': `var(--mantine-radius-sm)`,
|
|
119
|
+
_hover: {
|
|
120
|
+
translateY: '1px',
|
|
121
|
+
scale: 1.15,
|
|
122
|
+
},
|
|
123
|
+
_active: {
|
|
124
|
+
translateY: '-1px',
|
|
125
|
+
scale: '0.9',
|
|
126
|
+
},
|
|
127
|
+
_whenHovered: {
|
|
128
|
+
opacity: 1,
|
|
129
|
+
},
|
|
130
|
+
'& .tabler-icon': {
|
|
131
|
+
width: '80%',
|
|
132
|
+
height: '80%',
|
|
133
|
+
strokeWidth: '2',
|
|
134
|
+
},
|
|
160
135
|
})
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const xyvars = {
|
|
2
|
+
edge: {
|
|
3
|
+
stroke: {
|
|
4
|
+
var: '--xy-edge-stroke',
|
|
5
|
+
ref: 'var(--xy-edge-stroke)',
|
|
6
|
+
},
|
|
7
|
+
strokeSelected: {
|
|
8
|
+
var: '--xy-edge-stroke-selected',
|
|
9
|
+
ref: 'var(--xy-edge-stroke-selected)',
|
|
10
|
+
},
|
|
11
|
+
labelColor: {
|
|
12
|
+
var: '--xy-edge-label-color',
|
|
13
|
+
ref: 'var(--xy-edge-label-color)',
|
|
14
|
+
},
|
|
15
|
+
labelBgColor: {
|
|
16
|
+
var: '--xy-edge-label-background-color',
|
|
17
|
+
ref: 'var(--xy-edge-label-background-color)',
|
|
18
|
+
},
|
|
19
|
+
strokeWidth: {
|
|
20
|
+
var: '--xy-edge-stroke-width',
|
|
21
|
+
ref: 'var(--xy-edge-stroke-width)',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
// edge: cssVar.scope('xy-edge', [
|
|
25
|
+
// 'stroke',
|
|
26
|
+
// ['strokeSelected', 'stroke-selected'],
|
|
27
|
+
// ['labelColor', 'label-color'],
|
|
28
|
+
// ['labelBgColor', 'label-background-color'],
|
|
29
|
+
// ['strokeWidth', 'stroke-width'],
|
|
30
|
+
// ]),
|
|
31
|
+
} as const
|
|
@@ -1,15 +1,37 @@
|
|
|
1
|
+
import { css, cx } from '@likec4/styles/css'
|
|
2
|
+
import { actionBtn } from '@likec4/styles/recipes'
|
|
1
3
|
import { ActionIcon, Box } from '@mantine/core'
|
|
2
|
-
import clsx from 'clsx'
|
|
3
4
|
import { m } from 'framer-motion'
|
|
4
5
|
import { useIsZoomTooSmall } from '../../../hooks/useXYFlow'
|
|
5
6
|
import { stopPropagation } from '../../../utils/xyflow'
|
|
6
7
|
import type { NodeProps } from '../../types'
|
|
7
|
-
import * as css from './ElementActionButtons.css'
|
|
8
8
|
|
|
9
9
|
type ElementActionButtonsProps = NodeProps & {
|
|
10
10
|
buttons: ElementActionButtons.Item[]
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
const container = css({
|
|
14
|
+
position: 'absolute',
|
|
15
|
+
top: `calc(100% - 28px)`,
|
|
16
|
+
// transform: 'translateY(-100%)',
|
|
17
|
+
left: 0,
|
|
18
|
+
width: '100%',
|
|
19
|
+
minHeight: '28px',
|
|
20
|
+
display: 'flex',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
_smallZoom: {
|
|
24
|
+
display: 'none',
|
|
25
|
+
},
|
|
26
|
+
// zIndex: 10,
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const actionButtons = css({
|
|
30
|
+
display: 'flex',
|
|
31
|
+
justifyContent: 'center',
|
|
32
|
+
alignItems: 'center',
|
|
33
|
+
})
|
|
34
|
+
|
|
13
35
|
export function ElementActionButtons({
|
|
14
36
|
id,
|
|
15
37
|
selected = false,
|
|
@@ -23,22 +45,22 @@ export function ElementActionButtons({
|
|
|
23
45
|
return null
|
|
24
46
|
}
|
|
25
47
|
return (
|
|
26
|
-
<Box className={
|
|
48
|
+
<Box className={container}>
|
|
27
49
|
<Box
|
|
28
50
|
component={m.div}
|
|
29
51
|
layoutRoot
|
|
30
52
|
initial={false}
|
|
31
53
|
style={{
|
|
32
54
|
originY: 0,
|
|
33
|
-
gap: '
|
|
55
|
+
gap: '8px',
|
|
34
56
|
}}
|
|
35
57
|
animate={{
|
|
36
58
|
opacity: (isHovered || selected) ? 1 : 0.75,
|
|
37
59
|
scale: isHovered ? 1.1 : (selected ? 0.9 : 0.8),
|
|
38
60
|
y: (isHovered || selected) ? 6 : 0,
|
|
39
61
|
}}
|
|
40
|
-
data-hovered={isHovered}
|
|
41
|
-
className={
|
|
62
|
+
data-likec4-hovered={isHovered}
|
|
63
|
+
className={cx('nodrag nopan', actionButtons)}
|
|
42
64
|
>
|
|
43
65
|
{buttons.map((button, index) => (
|
|
44
66
|
<m.div
|
|
@@ -50,11 +72,9 @@ export function ElementActionButtons({
|
|
|
50
72
|
}}
|
|
51
73
|
>
|
|
52
74
|
<ActionIcon
|
|
53
|
-
className={
|
|
54
|
-
size={'md'}
|
|
55
|
-
radius="md"
|
|
56
|
-
// Otherwise node receives click event and is selected
|
|
75
|
+
className={actionBtn({})}
|
|
57
76
|
onClick={button.onClick}
|
|
77
|
+
// Otherwise node receives click event and is selected
|
|
58
78
|
onDoubleClick={stopPropagation}
|
|
59
79
|
>
|
|
60
80
|
{button.icon}
|
|
@@ -1,17 +1,38 @@
|
|
|
1
|
+
import { css, cx } from '@likec4/styles/css'
|
|
2
|
+
import { actionBtn } from '@likec4/styles/recipes'
|
|
1
3
|
import { ActionIcon, Box } from '@mantine/core'
|
|
2
4
|
import { IconId } from '@tabler/icons-react'
|
|
3
|
-
import clsx from 'clsx'
|
|
4
5
|
import { m } from 'framer-motion'
|
|
5
|
-
import { hiddenIfZoomTooSmall } from '../../../LikeC4Diagram.css'
|
|
6
6
|
import { stopPropagation } from '../../../utils/xyflow'
|
|
7
7
|
import type { NodeProps } from '../../types'
|
|
8
|
-
import * as css from './ElementDetailsButton.css'
|
|
9
8
|
|
|
10
9
|
type ElementDetailsButtonProps = NodeProps & {
|
|
11
10
|
icon?: React.ReactNode
|
|
12
11
|
onClick: (e: React.MouseEvent) => void
|
|
13
12
|
}
|
|
14
13
|
|
|
14
|
+
const container = css({
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
top: 2,
|
|
17
|
+
right: 2,
|
|
18
|
+
_shapeBrowser: {
|
|
19
|
+
right: '5px',
|
|
20
|
+
},
|
|
21
|
+
_shapeCylinder: {
|
|
22
|
+
top: '14px',
|
|
23
|
+
},
|
|
24
|
+
_shapeStorage: {
|
|
25
|
+
top: '14px',
|
|
26
|
+
},
|
|
27
|
+
_shapeQueue: {
|
|
28
|
+
top: '1px',
|
|
29
|
+
right: '12px',
|
|
30
|
+
},
|
|
31
|
+
_smallZoom: {
|
|
32
|
+
display: 'none',
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
|
|
15
36
|
export function ElementDetailsButton({
|
|
16
37
|
selected = false,
|
|
17
38
|
data: {
|
|
@@ -21,9 +42,9 @@ export function ElementDetailsButton({
|
|
|
21
42
|
onClick,
|
|
22
43
|
}: ElementDetailsButtonProps) {
|
|
23
44
|
return (
|
|
24
|
-
<Box className={
|
|
45
|
+
<Box className={cx(container, 'details-button')}>
|
|
25
46
|
<ActionIcon
|
|
26
|
-
className={
|
|
47
|
+
className={cx('nodrag nopan', actionBtn({ variant: 'transparent' }))}
|
|
27
48
|
component={m.button}
|
|
28
49
|
initial={false}
|
|
29
50
|
style={{
|
|
@@ -33,7 +54,7 @@ export function ElementDetailsButton({
|
|
|
33
54
|
animate={(isHovered || selected)
|
|
34
55
|
? {
|
|
35
56
|
scale: 1.2,
|
|
36
|
-
opacity: 0.
|
|
57
|
+
opacity: 0.8,
|
|
37
58
|
}
|
|
38
59
|
: {
|
|
39
60
|
scale: 1,
|
|
@@ -44,8 +65,6 @@ export function ElementDetailsButton({
|
|
|
44
65
|
opacity: 1,
|
|
45
66
|
}}
|
|
46
67
|
whileTap={{ scale: 1.15 }}
|
|
47
|
-
size={'md'}
|
|
48
|
-
radius="md"
|
|
49
68
|
onClick={onClick}
|
|
50
69
|
onDoubleClick={stopPropagation}
|
|
51
70
|
>
|