@likec4/diagram 1.17.1 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/LikeC4CustomColors.d.ts +7 -0
- package/dist/LikeC4CustomColors.js +30 -0
- package/dist/LikeC4Diagram.css.d.ts +5 -0
- package/dist/LikeC4Diagram.css.js +13 -0
- package/dist/LikeC4Diagram.d.ts +6 -0
- package/dist/LikeC4Diagram.js +194 -0
- package/dist/LikeC4Diagram.props.d.ts +166 -0
- package/dist/LikeC4ModelProvider.d.ts +9 -0
- package/dist/LikeC4ModelProvider.js +12 -0
- package/dist/LikeC4Search.css.d.ts +1 -0
- package/dist/LikeC4Search.css.js +5 -0
- package/dist/LikeC4Search.d.ts +2 -0
- package/dist/LikeC4Search.js +96 -0
- package/dist/StaticLikeC4Diagram.d.ts +3 -0
- package/dist/StaticLikeC4Diagram.js +41 -0
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/controls/Text.d.ts +2 -0
- package/dist/controls/Text.js +7 -0
- package/dist/controls/action-button-bar/ActionButtonBar.css.d.ts +1 -0
- package/dist/controls/action-button-bar/ActionButtonBar.css.js +5 -0
- package/dist/controls/action-button-bar/ActionButtonBar.d.ts +9 -0
- package/dist/controls/action-button-bar/ActionButtonBar.js +100 -0
- package/dist/controls/action-button-bar/useActionButtonBarCtx.d.ts +10 -0
- package/dist/controls/action-button-bar/useActionButtonBarCtx.js +9 -0
- package/dist/controls/action-buttons/ActionButton.css.d.ts +1 -0
- package/dist/controls/action-buttons/ActionButton.css.js +5 -0
- package/dist/controls/action-buttons/ActionButton.d.ts +9 -0
- package/dist/controls/action-buttons/ActionButton.js +66 -0
- package/dist/controls/action-buttons/ActionButtons.d.ts +12 -0
- package/dist/controls/action-buttons/ActionButtons.js +99 -0
- package/dist/globals.css.d.ts +1 -0
- package/dist/globals.css.js +92 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/useDiagramState.d.ts +6 -0
- package/dist/hooks/useDiagramState.js +27 -0
- package/dist/hooks/useMantinePortalProps.d.ts +9 -0
- package/dist/hooks/useMantinePortalProps.js +9 -0
- package/dist/hooks/useSetState.d.ts +2 -0
- package/dist/hooks/useSetState.js +19 -0
- package/dist/hooks/useUpdateEffect.d.ts +4 -0
- package/dist/hooks/useUpdateEffect.js +32 -0
- package/dist/hooks/useXYFlow.d.ts +270 -0
- package/dist/hooks/useXYFlow.js +20 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +25 -0
- package/dist/likec4model/LikeC4ModelContext.d.ts +3 -0
- package/dist/likec4model/LikeC4ModelContext.js +5 -0
- package/dist/likec4model/index.d.ts +2 -0
- package/dist/likec4model/useLikeC4ElementsTree.d.ts +12 -0
- package/dist/likec4model/useLikeC4ElementsTree.js +25 -0
- package/dist/likec4model/useLikeC4Model.d.ts +20 -0
- package/dist/likec4model/useLikeC4Model.js +55 -0
- package/dist/overlays/OverlayContext.d.ts +10 -0
- package/dist/overlays/OverlayContext.js +9 -0
- package/dist/overlays/Overlays.css.d.ts +3 -0
- package/dist/overlays/Overlays.css.js +7 -0
- package/dist/overlays/Overlays.d.ts +2 -0
- package/dist/overlays/Overlays.js +137 -0
- package/dist/overlays/edge-details/EdgeDetailsXYFlow.d.ts +5 -0
- package/dist/overlays/edge-details/EdgeDetailsXYFlow.js +185 -0
- package/dist/overlays/edge-details/SelectEdge.css.d.ts +7 -0
- package/dist/overlays/edge-details/SelectEdge.css.js +17 -0
- package/dist/overlays/edge-details/SelectEdge.d.ts +5 -0
- package/dist/overlays/edge-details/SelectEdge.js +129 -0
- package/dist/overlays/edge-details/_types.d.ts +14 -0
- package/dist/overlays/edge-details/use-layouted-edge-details.d.ts +21 -0
- package/dist/overlays/edge-details/use-layouted-edge-details.js +270 -0
- package/dist/overlays/edge-details/xyflow/CompoundNode.d.ts +5 -0
- package/dist/overlays/edge-details/xyflow/CompoundNode.js +76 -0
- package/dist/overlays/edge-details/xyflow/ElementNode.d.ts +5 -0
- package/dist/overlays/edge-details/xyflow/ElementNode.js +159 -0
- package/dist/overlays/edge-details/xyflow/RelationshipEdge.d.ts +3 -0
- package/dist/overlays/edge-details/xyflow/RelationshipEdge.js +84 -0
- package/dist/overlays/edge-details/xyflow/styles.css.d.ts +9 -0
- package/dist/overlays/edge-details/xyflow/styles.css.js +21 -0
- package/dist/overlays/element-details/ElementDetailsCard.css.d.ts +16 -0
- package/dist/overlays/element-details/ElementDetailsCard.css.js +33 -0
- package/dist/overlays/element-details/ElementDetailsCard.d.ts +7 -0
- package/dist/overlays/element-details/ElementDetailsCard.js +484 -0
- package/dist/overlays/element-details/TabPanelDeployments.css.d.ts +4 -0
- package/dist/overlays/element-details/TabPanelDeployments.css.js +11 -0
- package/dist/overlays/element-details/TabPanelDeployments.d.ts +7 -0
- package/dist/overlays/element-details/TabPanelDeployments.js +173 -0
- package/dist/overlays/element-details/TabPanelRelationships.css.d.ts +5 -0
- package/dist/overlays/element-details/TabPanelRelationships.css.js +11 -0
- package/dist/overlays/element-details/TabPanelRelationships.d.ts +8 -0
- package/dist/overlays/element-details/TabPanelRelationships.js +157 -0
- package/dist/overlays/element-details/TabPanelStructure.css.d.ts +2 -0
- package/dist/overlays/element-details/TabPanelStructure.css.js +7 -0
- package/dist/overlays/element-details/TabPanelStructure.d.ts +25 -0
- package/dist/overlays/element-details/TabPanelStructure.js +91 -0
- package/dist/overlays/index.d.ts +1 -0
- package/dist/overlays/relationships-of/RelationshipsOverlay.d.ts +5 -0
- package/dist/overlays/relationships-of/RelationshipsOverlay.js +193 -0
- package/dist/overlays/relationships-of/RelationshipsXYFlow.d.ts +19 -0
- package/dist/overlays/relationships-of/RelationshipsXYFlow.js +290 -0
- package/dist/overlays/relationships-of/SelectElement.css.d.ts +2 -0
- package/dist/overlays/relationships-of/SelectElement.css.js +7 -0
- package/dist/overlays/relationships-of/SelectElement.d.ts +7 -0
- package/dist/overlays/relationships-of/SelectElement.js +126 -0
- package/dist/overlays/relationships-of/_types.d.ts +28 -0
- package/dist/overlays/relationships-of/use-layouted-relationships.d.ts +22 -0
- package/dist/overlays/relationships-of/use-layouted-relationships.js +496 -0
- package/dist/overlays/relationships-of/xyflow/CompoundNode.d.ts +6 -0
- package/dist/overlays/relationships-of/xyflow/CompoundNode.js +120 -0
- package/dist/overlays/relationships-of/xyflow/ElementNode.d.ts +6 -0
- package/dist/overlays/relationships-of/xyflow/ElementNode.js +194 -0
- package/dist/overlays/relationships-of/xyflow/EmptyNode.d.ts +5 -0
- package/dist/overlays/relationships-of/xyflow/EmptyNode.js +18 -0
- package/dist/overlays/relationships-of/xyflow/RelationshipEdge.d.ts +3 -0
- package/dist/overlays/relationships-of/xyflow/RelationshipEdge.js +123 -0
- package/dist/overlays/relationships-of/xyflow/styles.css.d.ts +14 -0
- package/dist/overlays/relationships-of/xyflow/styles.css.js +24 -0
- package/dist/overlays/shared/xyflow/RelationshipEdge.css.d.ts +4 -0
- package/dist/overlays/shared/xyflow/RelationshipEdge.css.js +12 -0
- package/dist/overlays/shared/xyflow/_types.d.ts +77 -0
- package/dist/state/DiagramContext.d.ts +1609 -0
- package/dist/state/DiagramContext.js +101 -0
- package/dist/state/aligners.d.ts +42 -0
- package/dist/state/aligners.js +349 -0
- package/dist/state/diagram-to-xyflow.d.ts +11 -0
- package/dist/state/diagram-to-xyflow.js +113 -0
- package/dist/state/diagramStore.d.ts +1705 -0
- package/dist/state/diagramStore.js +808 -0
- package/dist/state/diagramStore.layout.d.ts +4 -0
- package/dist/state/diagramStore.layout.js +56 -0
- package/dist/style.css +1 -0
- package/dist/theme-vars.css.d.ts +72 -0
- package/dist/theme-vars.css.js +6 -0
- package/dist/theme-vars.css.ts.vanilla.css.js +1 -0
- package/dist/theme-vars.d.ts +3 -0
- package/dist/theme-vars.js +5 -0
- package/dist/ui/DiagramTitlePanel.css.d.ts +4 -0
- package/dist/ui/DiagramTitlePanel.css.js +11 -0
- package/dist/ui/DiagramTitlePanel.d.ts +1 -0
- package/dist/ui/DiagramTitlePanel.js +159 -0
- package/dist/ui/DynamicViewWalkthrough.css.d.ts +4 -0
- package/dist/ui/DynamicViewWalkthrough.css.js +11 -0
- package/dist/ui/DynamicViewWalkthrough.d.ts +1 -0
- package/dist/ui/DynamicViewWalkthrough.js +156 -0
- package/dist/ui/EnsureMantine.d.ts +7 -0
- package/dist/ui/EnsureMantine.js +14 -0
- package/dist/ui/FramerMotionConfig.d.ts +2 -0
- package/dist/ui/FramerMotionConfig.js +14 -0
- package/dist/ui/Link.d.ts +4 -0
- package/dist/ui/Link.js +36 -0
- package/dist/ui/notation/NotationPanel.css.d.ts +6 -0
- package/dist/ui/notation/NotationPanel.css.js +16 -0
- package/dist/ui/notation/NotationPanel.d.ts +1 -0
- package/dist/ui/notation/NotationPanel.js +250 -0
- package/dist/ui/notation/index.d.ts +1 -0
- package/dist/ui/top-left/ChangeAutoLayoutButton.d.ts +2 -0
- package/dist/ui/top-left/ChangeAutoLayoutButton.js +159 -0
- package/dist/ui/top-left/ManualLayoutToolsButton.d.ts +2 -0
- package/dist/ui/top-left/ManualLayoutToolsButton.js +137 -0
- package/dist/ui/top-left/TopLeftPanel.d.ts +4 -0
- package/dist/ui/top-left/TopLeftPanel.js +211 -0
- package/dist/ui/top-left/_shared.d.ts +7 -0
- package/dist/ui/top-left/_shared.js +22 -0
- package/dist/ui/top-left/styles.css.d.ts +8 -0
- package/dist/ui/top-left/styles.css.js +17 -0
- package/dist/utils/types.d.ts +8 -0
- package/dist/utils/vector.d.ts +24 -0
- package/dist/utils/vector.js +55 -0
- package/dist/xyflow/EdgeMarkers.d.ts +12 -0
- package/dist/xyflow/EdgeMarkers.js +192 -0
- package/dist/xyflow/FitviewOnDiagramChange.d.ts +4 -0
- package/dist/xyflow/FitviewOnDiagramChange.js +72 -0
- package/dist/xyflow/SelectEdgesOnNodeFocus.d.ts +1 -0
- package/dist/xyflow/SelectEdgesOnNodeFocus.js +96 -0
- package/dist/xyflow/XYFlow.d.ts +8 -0
- package/dist/xyflow/XYFlow.js +145 -0
- package/dist/xyflow/XYFlowBackground.d.ts +10 -0
- package/dist/xyflow/XYFlowBackground.js +25 -0
- package/dist/xyflow/XYFlowInner.d.ts +8 -0
- package/dist/xyflow/XYFlowInner.js +41 -0
- package/dist/xyflow/const.d.ts +7 -0
- package/dist/xyflow/const.js +12 -0
- package/dist/xyflow/edges/EdgeLabel.d.ts +7 -0
- package/dist/xyflow/edges/EdgeLabel.js +160 -0
- package/dist/xyflow/edges/RelationshipEdge.d.ts +6 -0
- package/dist/xyflow/edges/RelationshipEdge.js +443 -0
- package/dist/xyflow/edges/RelationshipsDropdownMenu.css.d.ts +4 -0
- package/dist/xyflow/edges/RelationshipsDropdownMenu.css.js +11 -0
- package/dist/xyflow/edges/RelationshipsDropdownMenu.d.ts +13 -0
- package/dist/xyflow/edges/RelationshipsDropdownMenu.js +211 -0
- package/dist/xyflow/edges/edges.css.d.ts +17 -0
- package/dist/xyflow/edges/edges.css.js +37 -0
- package/dist/xyflow/edges/utils.d.ts +16 -0
- package/dist/xyflow/edges/utils.js +24 -0
- package/dist/xyflow/nodes/AnimateVariants.d.ts +1313 -0
- package/dist/xyflow/nodes/AnimateVariants.js +123 -0
- package/dist/xyflow/nodes/Node.css.d.ts +3 -0
- package/dist/xyflow/nodes/Node.css.js +9 -0
- package/dist/xyflow/nodes/compound/CompoundNode.css.d.ts +14 -0
- package/dist/xyflow/nodes/compound/CompoundNode.css.js +27 -0
- package/dist/xyflow/nodes/compound/CompoundNode.d.ts +6 -0
- package/dist/xyflow/nodes/compound/CompoundNode.js +216 -0
- package/dist/xyflow/nodes/compound/index.d.ts +1 -0
- package/dist/xyflow/nodes/element/ElementLink.css.d.ts +3 -0
- package/dist/xyflow/nodes/element/ElementLink.d.ts +6 -0
- package/dist/xyflow/nodes/element/ElementNode.d.ts +6 -0
- package/dist/xyflow/nodes/element/ElementNode.js +190 -0
- package/dist/xyflow/nodes/element/ElementShapeSvg.d.ts +17 -0
- package/dist/xyflow/nodes/element/ElementShapeSvg.js +175 -0
- package/dist/xyflow/nodes/element/element.css.d.ts +18 -0
- package/dist/xyflow/nodes/element/element.css.js +31 -0
- package/dist/xyflow/nodes/element/index.d.ts +1 -0
- package/dist/xyflow/nodes/shared/ElementIcon.d.ts +8 -0
- package/dist/xyflow/nodes/shared/ElementIcon.js +38 -0
- package/dist/xyflow/nodes/shared/Toolbar.d.ts +9 -0
- package/dist/xyflow/nodes/shared/Toolbar.js +436 -0
- package/dist/xyflow/types.d.ts +36 -0
- package/dist/xyflow/useLayoutConstraints.d.ts +42 -0
- package/dist/xyflow/useLayoutConstraints.js +226 -0
- package/dist/xyflow/useXYFlowEvents.d.ts +160 -0
- package/dist/xyflow/useXYFlowEvents.js +275 -0
- package/dist/xyflow/utils.d.ts +22 -0
- package/dist/xyflow/utils.js +72 -0
- package/package.json +40 -31
- package/src/LikeC4Diagram.props.ts +21 -12
- package/src/LikeC4Diagram.tsx +8 -10
- package/src/LikeC4Search.css.ts +12 -0
- package/src/LikeC4Search.tsx +45 -93
- package/src/controls/Text.ts +5 -0
- package/src/controls/action-button-bar/ActionButtonBar.css.ts +13 -0
- package/src/controls/action-button-bar/ActionButtonBar.tsx +138 -0
- package/src/controls/action-button-bar/useActionButtonBarCtx.ts +13 -0
- package/src/controls/action-buttons/ActionButton.css.ts +29 -0
- package/src/controls/action-buttons/ActionButton.tsx +66 -0
- package/src/controls/action-buttons/ActionButtons.tsx +138 -0
- package/src/hooks/useDiagramState.ts +8 -3
- package/src/hooks/useXYFlow.ts +9 -8
- package/src/index.ts +12 -6
- package/src/likec4model/index.ts +12 -2
- package/src/likec4model/useLikeC4ElementsTree.ts +6 -13
- package/src/likec4model/useLikeC4Model.ts +21 -11
- package/src/overlays/Overlays.tsx +96 -63
- package/src/overlays/edge-details/EdgeDetailsXYFlow.tsx +18 -10
- package/src/overlays/edge-details/_types.ts +13 -33
- package/src/overlays/edge-details/use-layouted-edge-details.ts +35 -26
- package/src/overlays/edge-details/xyflow/CompoundNode.tsx +3 -11
- package/src/overlays/edge-details/xyflow/ElementNode.tsx +8 -13
- package/src/overlays/edge-details/xyflow/RelationshipEdge.tsx +7 -7
- package/src/overlays/edge-details/xyflow/styles.css.ts +1 -59
- package/src/overlays/element-details/ElementDetailsCard.tsx +91 -78
- package/src/overlays/element-details/TabPanelDeployments.css.ts +69 -0
- package/src/overlays/element-details/TabPanelDeployments.tsx +217 -0
- package/src/overlays/element-details/TabPanelRelationships.tsx +8 -9
- package/src/overlays/element-details/TabPanelStructure.tsx +10 -10
- package/src/overlays/relationships-of/RelationshipsOverlay.tsx +1 -1
- package/src/overlays/relationships-of/RelationshipsXYFlow.tsx +26 -34
- package/src/overlays/relationships-of/SelectElement.tsx +2 -2
- package/src/overlays/relationships-of/_types.ts +20 -58
- package/src/overlays/relationships-of/use-layouted-relationships.ts +54 -59
- package/src/overlays/relationships-of/xyflow/CompoundNode.tsx +10 -16
- package/src/overlays/relationships-of/xyflow/ElementNode.tsx +24 -21
- package/src/overlays/relationships-of/xyflow/EmptyNode.tsx +4 -7
- package/src/overlays/relationships-of/xyflow/RelationshipEdge.tsx +16 -15
- package/src/overlays/shared/xyflow/RelationshipEdge.css.ts +60 -0
- package/src/overlays/shared/xyflow/_types.ts +87 -0
- package/src/state/diagram-to-xyflow.ts +6 -7
- package/src/state/diagramStore.layout.ts +3 -4
- package/src/state/diagramStore.ts +63 -48
- package/src/theme-vars.css.ts +81 -0
- package/src/theme-vars.ts +8 -81
- package/src/ui/DiagramTitlePanel.tsx +7 -34
- package/src/ui/Link.tsx +40 -0
- package/src/ui/notation/NotationPanel.tsx +4 -2
- package/src/ui/top-left/ChangeAutoLayoutButton.tsx +2 -2
- package/src/ui/top-left/TopLeftPanel.tsx +5 -5
- package/src/utils/types.ts +6 -0
- package/src/xyflow/SelectEdgesOnNodeFocus.tsx +3 -3
- package/src/xyflow/XYFlow.tsx +2 -2
- package/src/xyflow/edges/EdgeLabel.tsx +26 -19
- package/src/xyflow/edges/RelationshipEdge.tsx +5 -3
- package/src/xyflow/edges/RelationshipsDropdownMenu.tsx +23 -10
- package/src/xyflow/edges/edges.css.ts +68 -74
- package/src/xyflow/edges/utils.ts +6 -6
- package/src/xyflow/nodes/AnimateVariants.ts +143 -0
- package/src/xyflow/nodes/Node.css.ts +44 -0
- package/src/xyflow/nodes/compound/CompoundNode.css.ts +27 -75
- package/src/xyflow/nodes/compound/CompoundNode.tsx +82 -163
- package/src/xyflow/nodes/element/ElementLink.tsx +2 -3
- package/src/xyflow/nodes/element/ElementNode.tsx +73 -252
- package/src/xyflow/nodes/element/element.css.ts +40 -64
- package/src/xyflow/nodes/shared/ElementIcon.tsx +1 -1
- package/src/xyflow/nodes/shared/Toolbar.tsx +51 -35
- package/src/xyflow/types.ts +48 -51
- package/src/xyflow/useLayoutConstraints.ts +10 -10
- package/src/xyflow/useXYFlowEvents.ts +31 -35
- package/src/xyflow/utils.ts +2 -2
- package/src/ui/OptionsPanel.css.ts +0 -9
- package/src/ui/OptionsPanel.tsx +0 -70
- package/src/ui/options/EdgeOptions.tsx +0 -142
- package/src/ui/options/NodeOptions.tsx +0 -362
- package/src/xyflow/nodes/element/ElementDetails.css.ts +0 -101
- package/src/xyflow/nodes/element/ElementDetails.tsx +0 -393
- package/src/xyflow/nodes/use-animate-variants.tsx +0 -64
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import { Text as MantineText } from '@mantine/core'
|
|
2
1
|
import { Handle, type NodeProps, Position, useStore } from '@xyflow/react'
|
|
3
2
|
import clsx from 'clsx'
|
|
4
3
|
import { deepEqual, shallowEqual } from 'fast-equals'
|
|
5
4
|
import { m } from 'framer-motion'
|
|
6
5
|
import { memo, useCallback } from 'react'
|
|
7
|
-
import type {
|
|
6
|
+
import type { RelationshipsOfFlowTypes } from '../_types'
|
|
8
7
|
import * as css from './styles.css'
|
|
8
|
+
import { Text } from '../../../controls/Text'
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
component: 'div'
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
type CompoundNodeProps = NodeProps<XYFlowTypes.CompoundNode>
|
|
10
|
+
type CompoundNodeProps = NodeProps<RelationshipsOfFlowTypes.CompoundNode>
|
|
15
11
|
|
|
16
12
|
export const CompoundNode = memo<CompoundNodeProps>(({
|
|
17
13
|
id,
|
|
@@ -20,7 +16,7 @@ export const CompoundNode = memo<CompoundNodeProps>(({
|
|
|
20
16
|
ports,
|
|
21
17
|
layoutId = id,
|
|
22
18
|
leaving = false,
|
|
23
|
-
|
|
19
|
+
entering = true,
|
|
24
20
|
...data
|
|
25
21
|
},
|
|
26
22
|
width = 200,
|
|
@@ -61,7 +57,7 @@ export const CompoundNode = memo<CompoundNodeProps>(({
|
|
|
61
57
|
layoutId={layoutId}
|
|
62
58
|
data-compound-depth={data.depth ?? 1}
|
|
63
59
|
data-likec4-color={element.color}
|
|
64
|
-
initial={(layoutId === id &&
|
|
60
|
+
initial={(layoutId === id && entering)
|
|
65
61
|
? {
|
|
66
62
|
...scale(-20),
|
|
67
63
|
opacity: 0,
|
|
@@ -86,14 +82,12 @@ export const CompoundNode = memo<CompoundNodeProps>(({
|
|
|
86
82
|
{...(selectable && {
|
|
87
83
|
whileHover: {
|
|
88
84
|
...scale(12),
|
|
89
|
-
scaleX: (width + 12) / width,
|
|
90
|
-
scaleY: (height + 12) / height,
|
|
91
85
|
transition: {
|
|
92
86
|
delay: 0.1
|
|
93
87
|
}
|
|
94
88
|
},
|
|
95
89
|
whileTap: {
|
|
96
|
-
...scale(-
|
|
90
|
+
...scale(-8)
|
|
97
91
|
}
|
|
98
92
|
})}
|
|
99
93
|
>
|
|
@@ -101,22 +95,22 @@ export const CompoundNode = memo<CompoundNodeProps>(({
|
|
|
101
95
|
{element.title}
|
|
102
96
|
</Text>
|
|
103
97
|
</m.div>
|
|
104
|
-
{ports.
|
|
98
|
+
{ports.in.map((id, i) => (
|
|
105
99
|
<Handle
|
|
106
100
|
key={id}
|
|
107
101
|
id={id}
|
|
108
|
-
type=
|
|
102
|
+
type="target"
|
|
109
103
|
position={Position.Left}
|
|
110
104
|
style={{
|
|
111
105
|
visibility: 'hidden',
|
|
112
106
|
top: `${20 * (i + 1)}px`
|
|
113
107
|
}} />
|
|
114
108
|
))}
|
|
115
|
-
{ports.
|
|
109
|
+
{ports.out.map((id, i) => (
|
|
116
110
|
<Handle
|
|
117
111
|
key={id}
|
|
118
112
|
id={id}
|
|
119
|
-
type=
|
|
113
|
+
type="source"
|
|
120
114
|
position={Position.Right}
|
|
121
115
|
style={{
|
|
122
116
|
visibility: 'hidden',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionIcon, Box, Group
|
|
1
|
+
import { ActionIcon, Box, Group } from '@mantine/core'
|
|
2
2
|
import { IconFileSymlink, IconTransform, IconZoomScan } from '@tabler/icons-react'
|
|
3
3
|
import { Handle, type NodeProps, Position } from '@xyflow/react'
|
|
4
4
|
import clsx from 'clsx'
|
|
@@ -9,8 +9,9 @@ import { type DiagramState, useDiagramState } from '../../../hooks'
|
|
|
9
9
|
import { ElementShapeSvg } from '../../../xyflow/nodes/element/ElementShapeSvg'
|
|
10
10
|
import { stopPropagation } from '../../../xyflow/utils'
|
|
11
11
|
import { useOverlayDialog } from '../../OverlayContext'
|
|
12
|
-
import type {
|
|
12
|
+
import type { RelationshipsOfFlowTypes } from '../_types'
|
|
13
13
|
import * as css from './styles.css'
|
|
14
|
+
import { Text } from '../../../controls/Text'
|
|
14
15
|
|
|
15
16
|
const Action = ActionIcon.withProps({
|
|
16
17
|
className: 'nodrag nopan ' + css.navigateBtn,
|
|
@@ -20,17 +21,13 @@ const Action = ActionIcon.withProps({
|
|
|
20
21
|
onPointerDownCapture: stopPropagation
|
|
21
22
|
})
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
component: 'div'
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
type ElementNodeProps = NodeProps<XYFlowTypes.ElementNode>
|
|
24
|
+
type ElementNodeProps = NodeProps<RelationshipsOfFlowTypes.ElementNode>
|
|
28
25
|
|
|
29
26
|
function selector(s: DiagramState) {
|
|
30
27
|
return {
|
|
31
28
|
currentViewId: s.view.id,
|
|
32
29
|
onNavigateTo: s.onNavigateTo,
|
|
33
|
-
onOpenSource: s.
|
|
30
|
+
onOpenSource: s.onOpenSource
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
|
|
@@ -42,7 +39,7 @@ export const ElementNode = memo<ElementNodeProps>(({
|
|
|
42
39
|
navigateTo,
|
|
43
40
|
layoutId = id,
|
|
44
41
|
leaving = false,
|
|
45
|
-
|
|
42
|
+
entering = true,
|
|
46
43
|
...data
|
|
47
44
|
},
|
|
48
45
|
selectable = true,
|
|
@@ -56,10 +53,14 @@ export const ElementNode = memo<ElementNodeProps>(({
|
|
|
56
53
|
onOpenSource
|
|
57
54
|
} = useDiagramState(selector)
|
|
58
55
|
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
const maxWH = Math.max(w, h)
|
|
57
|
+
const scale = (diff: number) => {
|
|
58
|
+
const s = (maxWH + diff) / maxWH
|
|
59
|
+
return ({
|
|
60
|
+
scaleX: s,
|
|
61
|
+
scaleY: s
|
|
62
|
+
})
|
|
63
|
+
}
|
|
63
64
|
|
|
64
65
|
let opacity = 1
|
|
65
66
|
if (data.dimmed) {
|
|
@@ -78,7 +79,7 @@ export const ElementNode = memo<ElementNodeProps>(({
|
|
|
78
79
|
])}
|
|
79
80
|
layoutId={layoutId}
|
|
80
81
|
data-likec4-color={element.color}
|
|
81
|
-
initial={(layoutId === id &&
|
|
82
|
+
initial={(layoutId === id && entering)
|
|
82
83
|
? {
|
|
83
84
|
...scale(-20),
|
|
84
85
|
opacity: 0,
|
|
@@ -155,33 +156,35 @@ export const ElementNode = memo<ElementNodeProps>(({
|
|
|
155
156
|
<Action
|
|
156
157
|
onClick={(event) => {
|
|
157
158
|
event.stopPropagation()
|
|
158
|
-
onOpenSource(
|
|
159
|
+
onOpenSource?.({
|
|
160
|
+
element: data.fqn
|
|
161
|
+
})
|
|
159
162
|
}}>
|
|
160
163
|
<IconFileSymlink stroke={1.8} style={{ width: '72%' }} />
|
|
161
164
|
</Action>
|
|
162
165
|
)}
|
|
163
166
|
</Group>
|
|
164
167
|
</m.div>
|
|
165
|
-
{ports.
|
|
168
|
+
{ports.in.map((id, i) => (
|
|
166
169
|
<Handle
|
|
167
170
|
key={id}
|
|
168
171
|
id={id}
|
|
169
|
-
type=
|
|
172
|
+
type="target"
|
|
170
173
|
position={Position.Left}
|
|
171
174
|
style={{
|
|
172
175
|
visibility: 'hidden',
|
|
173
|
-
top: `${15 + (i + 1) * ((h - 30) / (ports.
|
|
176
|
+
top: `${15 + (i + 1) * ((h - 30) / (ports.in.length + 1))}px`
|
|
174
177
|
}} />
|
|
175
178
|
))}
|
|
176
|
-
{ports.
|
|
179
|
+
{ports.out.map((id, i) => (
|
|
177
180
|
<Handle
|
|
178
181
|
key={id}
|
|
179
182
|
id={id}
|
|
180
|
-
type=
|
|
183
|
+
type="source"
|
|
181
184
|
position={Position.Right}
|
|
182
185
|
style={{
|
|
183
186
|
visibility: 'hidden',
|
|
184
|
-
top: `${15 + (i + 1) * ((h - 30) / (ports.
|
|
187
|
+
top: `${15 + (i + 1) * ((h - 30) / (ports.out.length + 1))}px`
|
|
185
188
|
}} />
|
|
186
189
|
))}
|
|
187
190
|
</>
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { Box
|
|
1
|
+
import { Box } from '@mantine/core'
|
|
2
2
|
import { type NodeProps } from '@xyflow/react'
|
|
3
|
-
import type {
|
|
3
|
+
import type { RelationshipsOfFlowTypes } from '../_types'
|
|
4
4
|
import * as css from './styles.css'
|
|
5
|
+
import { Text } from '../../../controls/Text'
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
component: 'div'
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
type EmptyNodeProps = NodeProps<XYFlowTypes.EmptyNode>
|
|
7
|
+
type EmptyNodeProps = NodeProps<RelationshipsOfFlowTypes.EmptyNode>
|
|
11
8
|
|
|
12
9
|
export function EmptyNode({
|
|
13
10
|
data: {
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { ActionIcon, Box, Group, Stack, Text, ThemeIcon, Tooltip as MantineTooltip } from '@mantine/core'
|
|
2
2
|
import { IconBoxMultipleFilled, IconZoomScan } from '@tabler/icons-react'
|
|
3
|
-
import { BaseEdge, EdgeLabelRenderer,
|
|
3
|
+
import { type EdgeProps, BaseEdge, EdgeLabelRenderer, getBezierPath } from '@xyflow/react'
|
|
4
4
|
import clsx from 'clsx'
|
|
5
|
-
import { useEffect, useRef } from 'react'
|
|
6
5
|
import { only } from 'remeda'
|
|
7
6
|
import { useDiagramState } from '../../../hooks/useDiagramState'
|
|
8
7
|
import { stopPropagation } from '../../../xyflow/utils'
|
|
9
8
|
import { useOverlayDialog } from '../../OverlayContext'
|
|
10
|
-
import
|
|
9
|
+
import * as css from '../../shared/xyflow/RelationshipEdge.css'
|
|
10
|
+
import type { RelationshipsOfFlowTypes } from '../_types'
|
|
11
11
|
import { ZIndexes } from '../use-layouted-relationships'
|
|
12
|
-
import * as css from './styles.css'
|
|
13
12
|
|
|
14
13
|
const Tooltip = MantineTooltip.withProps({
|
|
15
14
|
color: 'dark',
|
|
@@ -19,20 +18,22 @@ const Tooltip = MantineTooltip.withProps({
|
|
|
19
18
|
withinPortal: false,
|
|
20
19
|
label: '',
|
|
21
20
|
children: null,
|
|
22
|
-
offset: 4
|
|
21
|
+
offset: 4,
|
|
23
22
|
})
|
|
24
23
|
|
|
25
24
|
export function RelationshipEdge({
|
|
26
25
|
data,
|
|
27
26
|
label,
|
|
27
|
+
// Exclude the following props from the rest
|
|
28
|
+
animated: _animated,
|
|
28
29
|
...props
|
|
29
|
-
}: EdgeProps<
|
|
30
|
+
}: EdgeProps<RelationshipsOfFlowTypes.Edge>) {
|
|
30
31
|
const {
|
|
31
32
|
viewId,
|
|
32
|
-
onNavigateTo
|
|
33
|
+
onNavigateTo,
|
|
33
34
|
} = useDiagramState(s => ({
|
|
34
35
|
viewId: s.view.id,
|
|
35
|
-
onNavigateTo: s.onNavigateTo
|
|
36
|
+
onNavigateTo: s.onNavigateTo,
|
|
36
37
|
}))
|
|
37
38
|
const overlay = useOverlayDialog()
|
|
38
39
|
const [edgePath, labelX, labelY] = getBezierPath(props)
|
|
@@ -46,7 +47,7 @@ export function RelationshipEdge({
|
|
|
46
47
|
className={css.edgeContainer}
|
|
47
48
|
data-edge-dimmed={data.dimmed}
|
|
48
49
|
data-edge-hovered={data.hovered}
|
|
49
|
-
data-likec4-color={data.
|
|
50
|
+
data-likec4-color={data.existsInCurrentView ? 'gray' : 'amber'}
|
|
50
51
|
>
|
|
51
52
|
<BaseEdge
|
|
52
53
|
path={edgePath}
|
|
@@ -60,19 +61,19 @@ export function RelationshipEdge({
|
|
|
60
61
|
position: 'absolute',
|
|
61
62
|
transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
|
|
62
63
|
maxWidth: Math.abs(props.targetX - props.sourceX - 70),
|
|
63
|
-
zIndex: ZIndexes.max
|
|
64
|
+
zIndex: ZIndexes.max,
|
|
64
65
|
}}
|
|
65
66
|
className={clsx([
|
|
66
67
|
css.edgeLabel,
|
|
67
|
-
'nodrag nopan'
|
|
68
|
+
'nodrag nopan',
|
|
68
69
|
])}
|
|
69
70
|
data-edge-dimmed={data.dimmed}
|
|
70
71
|
data-edge-hovered={data.hovered}
|
|
71
|
-
data-likec4-color={data.
|
|
72
|
-
// {...data.
|
|
72
|
+
data-likec4-color={data.existsInCurrentView ? 'gray' : 'amber'}
|
|
73
|
+
// {...data.existsInCurrentView === false && { 'data-likec4-color': 'amber' }}
|
|
73
74
|
>
|
|
74
75
|
{label && (
|
|
75
|
-
<Tooltip label="Not included in current view" disabled={data.
|
|
76
|
+
<Tooltip label="Not included in current view" disabled={data.existsInCurrentView} color={'orange'}>
|
|
76
77
|
<Group gap={6} wrap="nowrap">
|
|
77
78
|
{isMultiRelation && (
|
|
78
79
|
<ThemeIcon size={'sm'} variant="transparent" color="orange">
|
|
@@ -82,7 +83,7 @@ export function RelationshipEdge({
|
|
|
82
83
|
<Text
|
|
83
84
|
fw={isMultiRelation ? '500' : '400'}
|
|
84
85
|
style={{
|
|
85
|
-
whiteSpace: isMultiRelation ? 'nowrap' : undefined
|
|
86
|
+
whiteSpace: isMultiRelation ? 'nowrap' : undefined,
|
|
86
87
|
}}
|
|
87
88
|
component={'div'}
|
|
88
89
|
className={css.edgeLabelText}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { style } from '@vanilla-extract/css'
|
|
2
|
+
import { mantine, transitions, vars, whereDark, xyvars } from '../../../theme-vars'
|
|
3
|
+
import { mixColor } from '../../Overlays.css'
|
|
4
|
+
|
|
5
|
+
const DimmedTransitionDelay = '400ms'
|
|
6
|
+
|
|
7
|
+
export const edgeContainer = style({
|
|
8
|
+
opacity: 1,
|
|
9
|
+
transition: transitions.fast,
|
|
10
|
+
vars: {
|
|
11
|
+
[xyvars.edge.stroke]: vars.relation.lineColor,
|
|
12
|
+
[xyvars.edge.strokeSelected]: `color-mix(in srgb, ${vars.relation.lineColor}, ${mixColor} 35%)`,
|
|
13
|
+
[xyvars.edge.labelColor]: `color-mix(in srgb, ${vars.relation.labelColor}, rgba(255 255 255 / 0.85) 50%)`,
|
|
14
|
+
[xyvars.edge.labelBgColor]: `color-mix(in srgb, ${vars.relation.labelBgColor}, transparent 20%)`
|
|
15
|
+
},
|
|
16
|
+
selectors: {
|
|
17
|
+
[`&[data-edge-dimmed='true']`]: {
|
|
18
|
+
opacity: 0.2,
|
|
19
|
+
transitionDelay: DimmedTransitionDelay
|
|
20
|
+
},
|
|
21
|
+
[`&[data-edge-dimmed='immediate']`]: {
|
|
22
|
+
opacity: 0.2
|
|
23
|
+
},
|
|
24
|
+
[`${whereDark} &`]: {
|
|
25
|
+
vars: {
|
|
26
|
+
[xyvars.edge.labelBgColor]: `color-mix(in srgb, ${vars.relation.labelBgColor}, transparent 50%)`
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
export const edgeLabel = style([edgeContainer, {
|
|
33
|
+
padding: '2px 5px',
|
|
34
|
+
fontFamily: vars.likec4.font,
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
cursor: 'pointer',
|
|
37
|
+
width: 'fit-content',
|
|
38
|
+
color: xyvars.edge.labelColor,
|
|
39
|
+
backgroundColor: xyvars.edge.labelBgColor,
|
|
40
|
+
borderRadius: 4,
|
|
41
|
+
// everything inside EdgeLabelRenderer has no pointer events by default
|
|
42
|
+
// if you have an interactive element, set pointer-events: all
|
|
43
|
+
pointerEvents: 'all',
|
|
44
|
+
textWrap: 'pretty',
|
|
45
|
+
whiteSpace: 'preserve-breaks'
|
|
46
|
+
}])
|
|
47
|
+
|
|
48
|
+
export const edgeLabelText = style({
|
|
49
|
+
textAlign: 'center',
|
|
50
|
+
whiteSpaceCollapse: 'preserve-breaks',
|
|
51
|
+
fontSize: mantine.fontSizes.md,
|
|
52
|
+
lineHeight: mantine.lineHeights.xs
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
export const edgeLabelTechnology = style({
|
|
56
|
+
textAlign: 'center',
|
|
57
|
+
whiteSpaceCollapse: 'preserve-breaks',
|
|
58
|
+
fontSize: mantine.fontSizes.sm,
|
|
59
|
+
lineHeight: 1
|
|
60
|
+
})
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { AbstractRelation, ComputedNode, Fqn, ViewId } from '@likec4/core'
|
|
2
|
+
import type { Edge as ReactFlowEdge, Node as ReactFlowNode } from '@xyflow/react'
|
|
3
|
+
import type { SetRequired } from 'type-fest'
|
|
4
|
+
|
|
5
|
+
export namespace SharedFlowTypes {
|
|
6
|
+
export type EmptyNodeData = {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the cursor is hovering over the node
|
|
9
|
+
*/
|
|
10
|
+
hovered?: boolean
|
|
11
|
+
/**
|
|
12
|
+
* Whether the node is currently leaving the overlay
|
|
13
|
+
*/
|
|
14
|
+
leaving?: boolean
|
|
15
|
+
/**
|
|
16
|
+
* Whether the node is currently entering the overlay
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
entering?: boolean
|
|
20
|
+
/**
|
|
21
|
+
* Whether the node is dimmed
|
|
22
|
+
* 'immediate' means that the node is dimmed without delay
|
|
23
|
+
*/
|
|
24
|
+
dimmed?: 'immediate' | boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type NonEmptyNodeData = EmptyNodeData & {
|
|
28
|
+
/**
|
|
29
|
+
* The node's fully qualified name
|
|
30
|
+
*/
|
|
31
|
+
fqn: Fqn
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type OverlayNodeData = NonEmptyNodeData & {
|
|
35
|
+
/**
|
|
36
|
+
* The ComputedNode backing this node
|
|
37
|
+
*/
|
|
38
|
+
element: Pick<ComputedNode, 'color' | 'title' | 'description' | 'shape' | 'kind'>
|
|
39
|
+
/**
|
|
40
|
+
* The node's incoming and outgoing ports
|
|
41
|
+
*/
|
|
42
|
+
ports: {
|
|
43
|
+
in: string[]
|
|
44
|
+
out: string[]
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The id of the view that should be navigated to when clicking the navigate button
|
|
48
|
+
*/
|
|
49
|
+
navigateTo: ViewId | null
|
|
50
|
+
/**
|
|
51
|
+
* The node's visual depth on the screen, 1 being the highest
|
|
52
|
+
*/
|
|
53
|
+
depth?: number
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type ElementNode = SetRequired<ReactFlowNode<OverlayNodeData, 'element'>, 'type'>
|
|
57
|
+
|
|
58
|
+
export type CompoundNode = SetRequired<ReactFlowNode<OverlayNodeData, 'compound'>, 'type'>
|
|
59
|
+
|
|
60
|
+
export type NonEmptyNode = ElementNode | CompoundNode
|
|
61
|
+
|
|
62
|
+
export type EmptyNode = SetRequired<ReactFlowNode<EmptyNodeData, 'empty'>, 'type'>
|
|
63
|
+
|
|
64
|
+
export type Node = NonEmptyNode | EmptyNode
|
|
65
|
+
|
|
66
|
+
export type EdgeData = {
|
|
67
|
+
/**
|
|
68
|
+
* The model's relations represented by this edge
|
|
69
|
+
*/
|
|
70
|
+
relations: [AbstractRelation, ...AbstractRelation[]]
|
|
71
|
+
/**
|
|
72
|
+
* Whether the cursor is hovering over the node
|
|
73
|
+
*/
|
|
74
|
+
hovered?: boolean
|
|
75
|
+
/**
|
|
76
|
+
* Whether the node is dimmed
|
|
77
|
+
* 'immediate' means that the node is dimmed without delay
|
|
78
|
+
*/
|
|
79
|
+
dimmed?: 'immediate' | boolean
|
|
80
|
+
/**
|
|
81
|
+
* The id of the view that should be navigated to when clicking the edge
|
|
82
|
+
*/
|
|
83
|
+
navigateTo?: ViewId | null
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type Edge = SetRequired<ReactFlowEdge<EdgeData, 'relation'>, 'data' | 'type'>
|
|
87
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type DiagramEdge, DiagramNode, type DiagramView, ElementKind, type Fqn } from '@likec4/core'
|
|
2
2
|
import { nonNullable, whereOperatorAsPredicate } from '@likec4/core'
|
|
3
3
|
import { hasAtLeast } from 'remeda'
|
|
4
|
-
import type { UnionToIntersection } from 'type-fest'
|
|
5
4
|
import type { WhereOperator } from '../LikeC4Diagram.props'
|
|
6
5
|
import { ZIndexes } from '../xyflow/const'
|
|
7
|
-
import type {
|
|
6
|
+
import type { DiagramFlowTypes } from '../xyflow/types'
|
|
8
7
|
|
|
9
8
|
// const nodeZIndex = (node: DiagramNode) => node.level - (node.children.length > 0 ? 1 : 0)
|
|
10
9
|
|
|
@@ -16,12 +15,12 @@ export function diagramViewToXYFlowData(
|
|
|
16
15
|
selectable: boolean
|
|
17
16
|
}
|
|
18
17
|
): {
|
|
19
|
-
xynodes:
|
|
20
|
-
xyedges:
|
|
18
|
+
xynodes: DiagramFlowTypes.Node[]
|
|
19
|
+
xyedges: DiagramFlowTypes.Edge[]
|
|
21
20
|
} {
|
|
22
21
|
const isDynamicView = view.__ === 'dynamic',
|
|
23
|
-
xynodes = [] as
|
|
24
|
-
xyedges = [] as
|
|
22
|
+
xynodes = [] as DiagramFlowTypes.Node[],
|
|
23
|
+
xyedges = [] as DiagramFlowTypes.Edge[],
|
|
25
24
|
nodeLookup = new Map<Fqn, DiagramNode>()
|
|
26
25
|
|
|
27
26
|
const traverse = view.nodes.reduce(
|
|
@@ -72,7 +71,7 @@ export function diagramViewToXYFlowData(
|
|
|
72
71
|
|
|
73
72
|
const id = ns + node.id
|
|
74
73
|
|
|
75
|
-
const base: Omit<
|
|
74
|
+
const base: Omit<DiagramFlowTypes.Node, 'data' | 'type'> = {
|
|
76
75
|
id,
|
|
77
76
|
draggable: opts.draggable,
|
|
78
77
|
selectable: opts.selectable && node.kind !== ElementKind.Group,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { nonexhaustive } from '@likec4/core'
|
|
2
|
-
import type { InternalNode } from '@xyflow/react'
|
|
3
2
|
import { getNodeDimensions } from '@xyflow/system'
|
|
4
3
|
import { hasAtLeast } from 'remeda'
|
|
5
4
|
import type { DiagramState } from '../hooks'
|
|
6
|
-
import type { XYFlowNode } from '../xyflow/types'
|
|
7
5
|
import { createLayoutConstraints } from '../xyflow/useLayoutConstraints'
|
|
8
6
|
import { type Aligner, getLinearAligner, GridAligner, type GridAlignmentMode, type LinearAlignmentMode, type NodeRect } from './aligners'
|
|
7
|
+
import type { DiagramFlowTypes } from '../xyflow/types'
|
|
9
8
|
|
|
10
9
|
export type AlignmentMode = LinearAlignmentMode | GridAlignmentMode
|
|
11
10
|
|
|
@@ -40,7 +39,7 @@ export function align(get: () => DiagramState) {
|
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
function toNodeRect(node: InternalNode
|
|
42
|
+
function toNodeRect(node: DiagramFlowTypes.InternalNode): NodeRect {
|
|
44
43
|
return {
|
|
45
44
|
...node.internals.positionAbsolute,
|
|
46
45
|
id: node.id,
|
|
@@ -64,4 +63,4 @@ function getAligner(mode: AlignmentMode): Aligner {
|
|
|
64
63
|
default:
|
|
65
64
|
nonexhaustive(mode)
|
|
66
65
|
}
|
|
67
|
-
}
|
|
66
|
+
}
|