@likec4/diagram 1.36.0 → 1.37.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/bundle/{chunk-7MPUJFHj.js → chunk-DSORWspW.js} +1011 -983
- package/bundle/custom.js +64 -56
- package/bundle/index.js +3546 -3321
- package/dist/LikeC4Diagram.props.d.ts +5 -5
- package/dist/LikeC4Styles.js +17 -15
- package/dist/StaticLikeC4Diagram.d.ts +1 -1
- package/dist/StaticLikeC4Diagram.js +3 -0
- package/dist/base/BaseXYFlow.d.ts +1 -1
- package/dist/base/BaseXYFlow.js +25 -27
- package/dist/base/const.d.ts +4 -4
- package/dist/base/const.js +5 -4
- package/dist/base/primitives/MarkdownBlock.js +4 -1
- package/dist/base/primitives/compound/CompoundActionButton.js +27 -42
- package/dist/base/primitives/compound/CompoundDetailsButton.js +23 -48
- package/dist/base/primitives/compound/CompoundNodeContainer.js +16 -48
- package/dist/base/primitives/compound/CompoundTitle.js +5 -80
- package/dist/base/primitives/compound/actionbtns.css.js +1 -13
- package/dist/base/primitives/customEdge.d.ts +1 -1
- package/dist/base/primitives/customNode.d.ts +4 -4
- package/dist/base/primitives/customNode.js +7 -7
- package/dist/base/primitives/edge/EdgeLabel.d.ts +5 -4
- package/dist/base/primitives/edge/EdgeLabel.js +39 -21
- package/dist/base/primitives/edge/EdgeLabelContainer.js +11 -23
- package/dist/base/primitives/edge/edge.css.js +19 -11
- package/dist/base/primitives/element/ElementShape.js +38 -18
- package/dist/base/primitives/element/ElementTags.js +7 -4
- package/dist/base/primitives/element/ElementTitle.js +10 -2
- package/dist/base/types.d.ts +17 -21
- package/dist/bundle/LikeC4View.d.ts +2 -2
- package/dist/bundle/LikeC4View.js +4 -1
- package/dist/bundle/LikeC4View.props.d.ts +2 -2
- package/dist/bundle/ReactLikeC4.d.ts +3 -3
- package/dist/bundle/custom.js +2 -1
- package/dist/bundle/index.js +2 -1
- package/dist/components/Link.js +3 -2
- package/dist/context/ReduceGraphics.js +2 -5
- package/dist/context/RootContainer.js +1 -5
- package/dist/custom/customNodes.d.ts +32 -26
- package/dist/custom/customNodes.js +12 -8
- package/dist/custom/hooks.d.ts +2 -1
- package/dist/custom/index.js +2 -1
- package/dist/globals.css.js +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/useDiagram.d.ts +18 -1
- package/dist/hooks/useDiagram.js +18 -2
- package/dist/hooks/useXYFlow.d.ts +40 -21
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/likec4diagram/DiagramUI.js +7 -3
- package/dist/likec4diagram/DiagramXYFlow.js +9 -9
- package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +3 -3
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +27 -44
- package/dist/likec4diagram/custom/index.js +3 -3
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +8 -6
- package/dist/likec4diagram/custom/nodes/nodes.js +13 -14
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +3 -2
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +2 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +2 -0
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +441 -0
- package/dist/likec4diagram/relationship-popover/actor.d.ts +177 -0
- package/dist/likec4diagram/relationship-popover/actor.js +155 -0
- package/dist/likec4diagram/relationship-popover/styles.css.d.ts +2 -0
- package/dist/likec4diagram/{custom/edges/RelationshipsDropdownMenu.css.js → relationship-popover/styles.css.js} +4 -17
- package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +4 -4
- package/dist/likec4diagram/useLayoutConstraints.js +0 -1
- package/dist/likec4model/LikeC4ModelContext.d.ts +2 -1
- package/dist/likec4model/LikeC4ModelContext.js +10 -2
- package/dist/likec4model/useCurrentViewModel.d.ts +1 -0
- package/dist/likec4model/useCurrentViewModel.js +4 -1
- package/dist/likec4model/useLikeC4ElementsTree.js +1 -1
- package/dist/likec4model/useLikeC4Project.js +15 -1
- package/dist/navigationpanel/NavigationPanelDropdown.js +1 -2
- package/dist/navigationpanel/actor.js +1 -2
- package/dist/navigationpanel/controls/NavigationButtons.js +1 -5
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/ViewDetailsCard.js +2 -0
- package/dist/overlays/element-details/actor.d.ts +564 -8
- package/dist/overlays/overlay/Overlay.css.d.ts +1 -1
- package/dist/overlays/relationship-details/actor.d.ts +3 -1
- package/dist/overlays/relationship-details/hooks.d.ts +19 -1
- package/dist/overlays/relationship-details/layout-to-xyflow.js +0 -1
- package/dist/overlays/relationship-details/layout.js +1 -2
- package/dist/overlays/relationships-browser/actor.d.ts +26 -2
- package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +16 -0
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +18 -8
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +0 -1
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/state/DiagramActorProvider.js +5 -23
- package/dist/state/assign.js +24 -10
- package/dist/state/diagram-machine.d.ts +149 -474
- package/dist/state/diagram-machine.js +94 -54
- package/dist/state/types.d.ts +1 -1
- package/dist/styles-min.css +1 -1
- package/dist/styles-xyflow.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css2.js +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/roundDpr.d.ts +1 -0
- package/dist/utils/roundDpr.js +20 -0
- package/dist/utils/xyflow.d.ts +0 -1
- package/dist/utils/xyflow.js +1 -7
- package/package.json +11 -10
- package/panda.buildinfo.json +90 -155
- package/src/LikeC4Diagram.props.ts +5 -5
- package/src/LikeC4Styles.tsx +22 -14
- package/src/StaticLikeC4Diagram.tsx +3 -0
- package/src/base/BaseXYFlow.tsx +26 -29
- package/src/base/const.ts +5 -4
- package/src/base/primitives/MarkdownBlock.tsx +6 -1
- package/src/base/primitives/compound/CompoundActionButton.tsx +31 -43
- package/src/base/primitives/compound/CompoundDetailsButton.tsx +26 -48
- package/src/base/primitives/compound/CompoundNodeContainer.tsx +15 -43
- package/src/base/primitives/compound/CompoundTitle.tsx +4 -76
- package/src/base/primitives/compound/actionbtns.css.ts +0 -12
- package/src/base/primitives/customEdge.ts +1 -1
- package/src/base/primitives/customNode.tsx +20 -24
- package/src/base/primitives/edge/EdgeLabel.tsx +23 -8
- package/src/base/primitives/edge/EdgeLabelContainer.tsx +9 -21
- package/src/base/primitives/edge/edge.css.ts +19 -11
- package/src/base/primitives/element/ElementShape.tsx +40 -18
- package/src/base/primitives/element/ElementTags.tsx +7 -4
- package/src/base/primitives/element/ElementTitle.tsx +23 -11
- package/src/base/types.ts +21 -25
- package/src/bundle/LikeC4View.props.ts +2 -2
- package/src/bundle/LikeC4View.tsx +8 -5
- package/src/bundle/ReactLikeC4.tsx +3 -3
- package/src/components/Link.tsx +3 -2
- package/src/context/RootContainer.tsx +1 -5
- package/src/context/TagStylesContext.tsx +2 -0
- package/src/custom/{customNodes.tsx → customNodes.ts} +58 -52
- package/src/custom/hooks.ts +7 -0
- package/src/globals.css +58 -5
- package/src/hooks/index.ts +1 -1
- package/src/hooks/useDiagram.ts +39 -5
- package/src/hooks/useXYFlow.ts +3 -1
- package/src/index.ts +1 -0
- package/src/likec4diagram/DiagramUI.tsx +11 -2
- package/src/likec4diagram/DiagramXYFlow.tsx +9 -11
- package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +25 -49
- package/src/likec4diagram/custom/index.ts +5 -4
- package/src/likec4diagram/custom/nodes/nodes.tsx +13 -11
- package/src/likec4diagram/custom/nodes/toolbar/CompoundToolbar.tsx +3 -2
- package/src/likec4diagram/relationship-popover/RelationshipPopover.tsx +535 -0
- package/src/likec4diagram/relationship-popover/actor.ts +192 -0
- package/src/likec4diagram/{custom/edges/RelationshipsDropdownMenu.css.ts → relationship-popover/styles.css.ts} +3 -19
- package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +4 -5
- package/src/likec4diagram/useLayoutConstraints.ts +0 -1
- package/src/likec4model/{LikeC4ModelContext.ts → LikeC4ModelContext.tsx} +9 -1
- package/src/likec4model/useCurrentViewModel.ts +4 -0
- package/src/likec4model/useLikeC4ElementsTree.ts +1 -1
- package/src/navigationpanel/NavigationPanelDropdown.tsx +1 -2
- package/src/navigationpanel/actor.ts +2 -2
- package/src/navigationpanel/controls/NavigationButtons.tsx +1 -5
- package/src/navigationpanel/controls/OpenSource.tsx +1 -1
- package/src/navigationpanel/controls/ViewDetailsCard.tsx +2 -0
- package/src/overlays/relationship-details/layout-to-xyflow.ts +0 -1
- package/src/overlays/relationship-details/layout.ts +4 -3
- package/src/overlays/relationships-browser/custom/nodeTypes.tsx +22 -8
- package/src/overlays/relationships-browser/useViewToNodesEdges.ts +0 -1
- package/src/state/DiagramActorProvider.tsx +8 -25
- package/src/state/assign.ts +24 -10
- package/src/state/diagram-machine.ts +101 -53
- package/src/state/types.ts +4 -1
- package/src/utils/index.ts +2 -1
- package/src/utils/roundDpr.ts +27 -0
- package/src/utils/xyflow.ts +0 -7
- package/dist/base/primitives/compound/CompoundNodeContainer.css.d.ts +0 -35
- package/dist/base/primitives/compound/CompoundNodeContainer.css.js +0 -132
- package/dist/base/primitives/edge/EdgeLabel.css.d.ts +0 -7
- package/dist/base/primitives/edge/EdgeLabel.css.js +0 -57
- package/dist/base/primitives/element/ElementShape.css.d.ts +0 -6
- package/dist/base/primitives/element/ElementShape.css.js +0 -107
- package/dist/likec4diagram/custom/edges/NotePopover.css.js +0 -21
- package/dist/likec4diagram/custom/edges/NotePopover.js +0 -91
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.d.ts +0 -5
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.d.ts +0 -13
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +0 -215
- package/dist/likec4diagram/custom/index.d.ts +0 -62
- package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +0 -10
- package/src/base/primitives/compound/CompoundNodeContainer.css.ts +0 -138
- package/src/base/primitives/edge/EdgeLabel.css.ts +0 -64
- package/src/base/primitives/element/ElementShape.css.ts +0 -112
- package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +0 -281
|
@@ -1,39 +1,43 @@
|
|
|
1
1
|
import type { DeployedInstanceModel, DeploymentNodeModel, NodeModel } from '@likec4/core/model'
|
|
2
2
|
import type { Any } from '@likec4/core/types'
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import type { FunctionComponent } from 'react'
|
|
4
|
+
import { jsx } from 'react/jsx-runtime'
|
|
5
5
|
import { customNode } from '../base/primitives'
|
|
6
6
|
import type { NodeProps } from '../base/types'
|
|
7
7
|
import type { Types } from '../likec4diagram/types'
|
|
8
8
|
import { useLikeC4ViewModel } from '../likec4model/useLikeC4Model'
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
type CustomDiagramNodeProps = {
|
|
11
|
+
nodeProps: NodeProps<Types.NodeData, string>
|
|
12
|
+
nodeModel: NodeModel
|
|
13
|
+
}
|
|
14
|
+
type CustomNodeComponent<P extends CustomDiagramNodeProps> = (
|
|
15
|
+
impl: FunctionComponent<P>,
|
|
16
|
+
) => FunctionComponent<P['nodeProps']>
|
|
17
|
+
|
|
18
|
+
function customDiagramNode<const P extends CustomDiagramNodeProps>(
|
|
19
|
+
Node: FunctionComponent<P>,
|
|
20
|
+
): FunctionComponent<P['nodeProps']> {
|
|
21
|
+
return customNode((props: NodeProps<Types.NodeData, string>) => {
|
|
22
|
+
// @ts-ignore because dts-bundler fails to infer types
|
|
23
|
+
const viewId = props.data.viewId
|
|
24
|
+
const viewModel = useLikeC4ViewModel(viewId)
|
|
20
25
|
if (!viewModel) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
console.error(`View "${viewId}" not found, requested by customNode "${props.data.id}"`, { props })
|
|
27
|
+
return null
|
|
28
|
+
}
|
|
29
|
+
const model = viewModel.findNode(props.data.id)
|
|
30
|
+
if (!model) {
|
|
31
|
+
console.error(
|
|
32
|
+
`Node "${props.id}" not found in view "${viewId}", requested by customNode "${props.data.id}"`,
|
|
33
|
+
{ props },
|
|
34
|
+
)
|
|
25
35
|
return null
|
|
26
36
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return <Node nodeProps={props} nodeModel={model} />
|
|
30
|
-
}) as (props: P['nodeProps']) => ReactNode
|
|
37
|
+
return jsx(Node, { nodeProps: props, nodeModel: model })
|
|
38
|
+
}) as any
|
|
31
39
|
}
|
|
32
40
|
|
|
33
|
-
export type CustomElementNodeProps<M extends Any = Any> = {
|
|
34
|
-
nodeProps: NodeProps<Types.ElementNodeData, 'element'>
|
|
35
|
-
nodeModel: NodeModel.WithElement<M>
|
|
36
|
-
}
|
|
37
41
|
/**
|
|
38
42
|
* Node that will be used to render the element from the model.
|
|
39
43
|
* It is a leaf node, i.e. it does not have children.
|
|
@@ -87,12 +91,12 @@ export type CustomElementNodeProps<M extends Any = Any> = {
|
|
|
87
91
|
* ))
|
|
88
92
|
* ```
|
|
89
93
|
*/
|
|
90
|
-
export const elementNode = customDiagramNode
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
nodeModel: NodeModel.WithDeploymentElement<M>
|
|
94
|
+
export const elementNode: CustomNodeComponent<CustomElementNodeProps> = customDiagramNode as any
|
|
95
|
+
export type CustomElementNodeProps = {
|
|
96
|
+
nodeProps: NodeProps<Types.ElementNodeData, 'element'>
|
|
97
|
+
nodeModel: NodeModel.WithElement<Any>
|
|
95
98
|
}
|
|
99
|
+
|
|
96
100
|
/**
|
|
97
101
|
* Node that will be used to render the element from deployment model.
|
|
98
102
|
* It is a leaf node, i.e. it does not have children.
|
|
@@ -141,12 +145,12 @@ export type CustomDeploymentNodeProps<M extends Any = Any> = {
|
|
|
141
145
|
* ))
|
|
142
146
|
* ```
|
|
143
147
|
*/
|
|
144
|
-
export const deploymentNode = customDiagramNode
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
nodeModel: NodeModel.WithElement<M>
|
|
148
|
+
export const deploymentNode: CustomNodeComponent<CustomDeploymentNodeProps> = customDiagramNode as any
|
|
149
|
+
export type CustomDeploymentNodeProps = {
|
|
150
|
+
nodeProps: NodeProps<Types.DeploymentElementNodeData, 'deployment'>
|
|
151
|
+
nodeModel: NodeModel.WithDeploymentElement<Any>
|
|
149
152
|
}
|
|
153
|
+
|
|
150
154
|
/**
|
|
151
155
|
* Node that will be used to render the compound element from the model.
|
|
152
156
|
* It is a container node, i.e. it has children.
|
|
@@ -185,12 +189,12 @@ export type CustomCompoundElementNodeProps<M extends Any = Any> = {
|
|
|
185
189
|
* ))
|
|
186
190
|
* ```
|
|
187
191
|
*/
|
|
188
|
-
export const compoundElementNode = customDiagramNode
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
nodeModel: NodeModel.WithDeploymentElement<M>
|
|
192
|
+
export const compoundElementNode: CustomNodeComponent<CustomCompoundElementNodeProps> = customDiagramNode as any
|
|
193
|
+
export type CustomCompoundElementNodeProps = {
|
|
194
|
+
nodeProps: NodeProps<Types.CompoundElementNodeData, 'compound-element'>
|
|
195
|
+
nodeModel: NodeModel.WithElement<Any>
|
|
193
196
|
}
|
|
197
|
+
|
|
194
198
|
/**
|
|
195
199
|
* Node that will be used to render the compound from the deployment model.
|
|
196
200
|
* It is a container node, i.e. it has children.
|
|
@@ -223,12 +227,12 @@ export type CustomCompoundDeploymentNodeProps<M extends Any = Any> = {
|
|
|
223
227
|
* </CompoundNodeContainer>
|
|
224
228
|
* ```
|
|
225
229
|
*/
|
|
226
|
-
export const compoundDeploymentNode = customDiagramNode
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
nodeModel: NodeModel.IsGroup<M>
|
|
230
|
+
export const compoundDeploymentNode: CustomNodeComponent<CustomCompoundDeploymentNodeProps> = customDiagramNode as any
|
|
231
|
+
export type CustomCompoundDeploymentNodeProps = {
|
|
232
|
+
nodeProps: NodeProps<Types.CompoundDeploymentNodeData, 'compound-deployment'>
|
|
233
|
+
nodeModel: NodeModel.WithDeploymentElement<Any>
|
|
231
234
|
}
|
|
235
|
+
|
|
232
236
|
/**
|
|
233
237
|
* Node that will be used to render the view group from the model.
|
|
234
238
|
*
|
|
@@ -254,14 +258,16 @@ export type CustomViewGroupNodeProps<M extends Any = Any> = {
|
|
|
254
258
|
* </CompoundNodeContainer>
|
|
255
259
|
* ```
|
|
256
260
|
*/
|
|
257
|
-
export const viewGroupNode = customDiagramNode
|
|
261
|
+
export const viewGroupNode: CustomNodeComponent<CustomViewGroupNodeProps> = customDiagramNode as any
|
|
262
|
+
export type CustomViewGroupNodeProps = {
|
|
263
|
+
nodeProps: NodeProps<Types.ViewGroupNodeData, 'view-group'>
|
|
264
|
+
nodeModel: NodeModel.IsGroup<Any>
|
|
265
|
+
}
|
|
258
266
|
|
|
259
267
|
export interface CustomNodes {
|
|
260
|
-
element?:
|
|
261
|
-
deployment?:
|
|
262
|
-
compoundElement?:
|
|
263
|
-
compoundDeployment?:
|
|
264
|
-
|
|
265
|
-
| ((props: NodeProps<Types.CompoundDeploymentNodeData, 'compound-deployment'>) => ReactNode)
|
|
266
|
-
viewGroup?: undefined | ((props: NodeProps<Types.ViewGroupNodeData, 'view-group'>) => ReactNode)
|
|
268
|
+
element?: FunctionComponent<NodeProps<Types.ElementNodeData, 'element'>>
|
|
269
|
+
deployment?: FunctionComponent<NodeProps<Types.DeploymentElementNodeData, 'deployment'>>
|
|
270
|
+
compoundElement?: FunctionComponent<NodeProps<Types.CompoundElementNodeData, 'compound-element'>>
|
|
271
|
+
compoundDeployment?: FunctionComponent<NodeProps<Types.CompoundDeploymentNodeData, 'compound-deployment'>>
|
|
272
|
+
viewGroup?: FunctionComponent<NodeProps<Types.ViewGroupNodeData, 'view-group'>>
|
|
267
273
|
}
|
package/src/custom/hooks.ts
CHANGED
|
@@ -21,6 +21,7 @@ export {
|
|
|
21
21
|
useDiagram,
|
|
22
22
|
useDiagramActorRef,
|
|
23
23
|
useDiagramContext,
|
|
24
|
+
useOnDiagramEvent,
|
|
24
25
|
} from '../hooks/useDiagram'
|
|
25
26
|
export {
|
|
26
27
|
useXYFlow,
|
|
@@ -39,6 +40,12 @@ export {
|
|
|
39
40
|
useLikeC4Specification,
|
|
40
41
|
useLikeC4ViewModel,
|
|
41
42
|
} from '../likec4model/useLikeC4Model'
|
|
43
|
+
export {
|
|
44
|
+
useHasProjects,
|
|
45
|
+
useLikeC4ProjectId,
|
|
46
|
+
useLikeC4Projects,
|
|
47
|
+
useLikeC4ProjectsContext,
|
|
48
|
+
} from '../likec4model/useLikeC4Project'
|
|
42
49
|
|
|
43
50
|
export { useMantinePortalProps } from '../hooks/useMantinePortalProps'
|
|
44
51
|
export { useSetState } from '../hooks/useSetState'
|
package/src/globals.css
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
.likec4-shadow-root dialog {
|
|
2
|
+
color: var(--mantine-color-text);
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
.likec4-root {
|
|
2
6
|
overflow: hidden;
|
|
3
7
|
position: relative;
|
|
@@ -12,38 +16,87 @@
|
|
|
12
16
|
.likec4-root .react-flow:is(.not-initialized) {
|
|
13
17
|
opacity: 0;
|
|
14
18
|
}
|
|
19
|
+
|
|
20
|
+
.likec4-root .react-flow {
|
|
21
|
+
contain: paint;
|
|
22
|
+
--xy-background-color: var(--colors-likec4-background);
|
|
23
|
+
--xy-background-pattern-color: var(--colors-likec4-background-pattern, var(--colors-likec4-background));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.likec4-root .react-flow:is(.bg-transparent) {
|
|
27
|
+
background: transparent !important;
|
|
28
|
+
--xy-background-color: transparent !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.likec4-root .react-flow .react-flow__pane {
|
|
32
|
+
user-select: none;
|
|
33
|
+
--webkit-user-select: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.likec4-static-view .react-flow .react-flow__attribution {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
15
40
|
:where(.likec4-root .mantine-ActionIcon-icon) .tabler-icon {
|
|
16
41
|
width: 75%;
|
|
17
42
|
height: 75%;
|
|
18
43
|
}
|
|
19
44
|
|
|
20
|
-
.likec4-root
|
|
45
|
+
.likec4-root .likec4-edge-label-container {
|
|
46
|
+
top: 0;
|
|
47
|
+
left: 0;
|
|
48
|
+
position: absolute;
|
|
49
|
+
width: auto;
|
|
50
|
+
height: auto;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.likec4-root :where(.react-flow__node, .react-flow__edge):has([data-likec4-dimmed]) {
|
|
54
|
+
opacity: 0.25;
|
|
55
|
+
}
|
|
56
|
+
.likec4-root .likec4-edge-label-container:is([data-likec4-dimmed]) {
|
|
21
57
|
opacity: 0.25;
|
|
22
58
|
}
|
|
23
59
|
|
|
24
60
|
.likec4-root:not([data-likec4-reduced-graphics])
|
|
25
|
-
:where(.react-flow__node, .react-flow__edge
|
|
61
|
+
:where(.react-flow__node, .react-flow__edge):has([data-likec4-dimmed]) {
|
|
62
|
+
filter: grayscale(85%) blur(3px);
|
|
63
|
+
}
|
|
64
|
+
.likec4-root:not([data-likec4-reduced-graphics]) .likec4-edge-label-container:is([data-likec4-dimmed]) {
|
|
26
65
|
filter: grayscale(85%) blur(3px);
|
|
27
66
|
}
|
|
28
67
|
|
|
29
68
|
.likec4-root:not([data-likec4-reduced-graphics])
|
|
30
|
-
:where(.react-flow__node, .react-flow__edge
|
|
69
|
+
:where(.react-flow__node, .react-flow__edge):has([data-likec4-dimmed="true"]) {
|
|
31
70
|
transition-property: opacity, filter;
|
|
32
71
|
transition-timing-function: cubic-bezier(0.50, 0, 0.2, 1);
|
|
33
72
|
transition-duration: 600ms;
|
|
34
73
|
}
|
|
35
74
|
|
|
75
|
+
.likec4-root:not([data-likec4-reduced-graphics]) .likec4-edge-label-container:is([data-likec4-dimmed="true"]) {
|
|
76
|
+
transition-property: opacity, filter;
|
|
77
|
+
transition-timing-function: cubic-bezier(0.50, 0, 0.2, 1);
|
|
78
|
+
transition-duration: 600ms;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.likec4-root .react-flow :where(.react-flow__nodes, .react-flow__edges, .react-flow__edgelabel-renderer) {
|
|
82
|
+
display: contents;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.likec4-root .react-flow__node.draggable:has(.likec4-compound-node) {
|
|
86
|
+
cursor: default;
|
|
87
|
+
}
|
|
88
|
+
|
|
36
89
|
[data-mantine-color-scheme="dark"]
|
|
37
90
|
.likec4-root:not([data-likec4-reduced-graphics])
|
|
38
91
|
:where(.react-flow__edges, .react-flow__edgelabel-renderer)
|
|
39
|
-
> svg {
|
|
92
|
+
> :where(svg, .likec4-edge-label-container) {
|
|
40
93
|
mix-blend-mode: plus-lighter;
|
|
41
94
|
}
|
|
42
95
|
|
|
43
96
|
[data-mantine-color-scheme="light"]
|
|
44
97
|
.likec4-root:not([data-likec4-reduced-graphics])
|
|
45
98
|
:where(.react-flow__edges, .react-flow__edgelabel-renderer)
|
|
46
|
-
> svg {
|
|
99
|
+
> :where(svg, .likec4-edge-label-container) {
|
|
47
100
|
mix-blend-mode: screen;
|
|
48
101
|
}
|
|
49
102
|
|
package/src/hooks/index.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { useMantinePortalProps } from './useMantinePortalProps'
|
|
|
2
2
|
export { useSetState } from './useSetState'
|
|
3
3
|
export { useUpdateEffect } from './useUpdateEffect'
|
|
4
4
|
export { useCurrentZoom, useIsZoomTooSmall, useXYFlow, useXYInternalNode, useXYStore, useXYStoreApi } from './useXYFlow'
|
|
5
|
-
export type { XYStoreApi } from './useXYFlow'
|
|
5
|
+
export type { XYFlowInstance, XYStoreApi, XYStoreState } from './useXYFlow'
|
package/src/hooks/useDiagram.ts
CHANGED
|
@@ -3,8 +3,6 @@ import {
|
|
|
3
3
|
type DiagramEdge,
|
|
4
4
|
type DiagramNode,
|
|
5
5
|
type DiagramView,
|
|
6
|
-
type EdgeId,
|
|
7
|
-
type Fqn,
|
|
8
6
|
type NodeId,
|
|
9
7
|
type NodeNotation as ElementNotation,
|
|
10
8
|
type scalar,
|
|
@@ -13,7 +11,7 @@ import {
|
|
|
13
11
|
import { useCallbackRef } from '@mantine/hooks'
|
|
14
12
|
import { useSelector as useXstateSelector } from '@xstate/react'
|
|
15
13
|
import { shallowEqual } from 'fast-equals'
|
|
16
|
-
import { type DependencyList, useCallback, useMemo } from 'react'
|
|
14
|
+
import { type DependencyList, useCallback, useEffect, useMemo, useRef } from 'react'
|
|
17
15
|
import type { PartialDeep } from 'type-fest'
|
|
18
16
|
import type { FeatureName } from '../context/DiagramFeatures'
|
|
19
17
|
import type { OpenSourceParams } from '../LikeC4Diagram.props'
|
|
@@ -24,8 +22,7 @@ import type {
|
|
|
24
22
|
DiagramActorRef,
|
|
25
23
|
DiagramActorSnapshot,
|
|
26
24
|
DiagramContext,
|
|
27
|
-
|
|
28
|
-
SyncLayoutActorSnapshot,
|
|
25
|
+
DiagramEmittedEvents,
|
|
29
26
|
} from '../state/types'
|
|
30
27
|
import { findDiagramEdge, findDiagramNode } from '../state/utils'
|
|
31
28
|
import { useDiagramActorRef } from './safeContext'
|
|
@@ -102,10 +99,15 @@ export interface DiagramApi {
|
|
|
102
99
|
* @warning Do not use in render phase
|
|
103
100
|
*/
|
|
104
101
|
findDiagramNode(xynodeId: string): DiagramNode | null
|
|
102
|
+
/**
|
|
103
|
+
* @warning Do not use in render phase
|
|
104
|
+
*/
|
|
105
|
+
findEdge(xyedgeId: string): Types.Edge | null
|
|
105
106
|
/**
|
|
106
107
|
* @warning Do not use in render phase
|
|
107
108
|
*/
|
|
108
109
|
findDiagramEdge(xyedgeId: string): DiagramEdge | null
|
|
110
|
+
|
|
109
111
|
startWalkthrough(): void
|
|
110
112
|
walkthroughStep(direction?: 'next' | 'previous'): void
|
|
111
113
|
stopWalkthrough(): void
|
|
@@ -208,6 +210,9 @@ export function useDiagram(): DiagramApi {
|
|
|
208
210
|
findDiagramNode: (xynodeId: string): DiagramNode | null => {
|
|
209
211
|
return findDiagramNode(actor.getSnapshot().context, xynodeId)
|
|
210
212
|
},
|
|
213
|
+
findEdge: (xyedgeId: string): Types.Edge | null => {
|
|
214
|
+
return actor.getSnapshot().context.xyedges.find(e => e.data.id === xyedgeId) ?? null
|
|
215
|
+
},
|
|
211
216
|
/**
|
|
212
217
|
* @warning Do not use in render phase
|
|
213
218
|
*/
|
|
@@ -264,3 +269,32 @@ export function useDiagramContext<T = unknown>(
|
|
|
264
269
|
const select = useCallback((s: DiagramActorSnapshot) => selector(s.context), deps ?? [])
|
|
265
270
|
return useXstateSelector(actorRef, select, compare)
|
|
266
271
|
}
|
|
272
|
+
|
|
273
|
+
type PickEmittedEvent<T extends DiagramEmittedEvents['type']> = DiagramEmittedEvents & { type: T }
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Subscribe to diagram emitted events
|
|
277
|
+
* @example
|
|
278
|
+
* ```tsx
|
|
279
|
+
* useOnDiagramEvent('navigateTo', ({viewId}) => {
|
|
280
|
+
* console.log('Navigating to view', viewId)
|
|
281
|
+
* })
|
|
282
|
+
* ```
|
|
283
|
+
*/
|
|
284
|
+
export function useOnDiagramEvent<T extends DiagramEmittedEvents['type']>(
|
|
285
|
+
event: T,
|
|
286
|
+
callback: (event: PickEmittedEvent<T>) => void,
|
|
287
|
+
): void {
|
|
288
|
+
const actorRef = useDiagramActorRef()
|
|
289
|
+
const callbackRef = useRef(callback)
|
|
290
|
+
callbackRef.current = callback
|
|
291
|
+
|
|
292
|
+
useEffect(() => {
|
|
293
|
+
const subscription = actorRef.on(event, (event) => {
|
|
294
|
+
callbackRef.current(event as DiagramEmittedEvents & { type: T })
|
|
295
|
+
})
|
|
296
|
+
return () => {
|
|
297
|
+
subscription.unsubscribe()
|
|
298
|
+
}
|
|
299
|
+
}, [actorRef])
|
|
300
|
+
}
|
package/src/hooks/useXYFlow.ts
CHANGED
|
@@ -13,8 +13,10 @@ import type { Types } from '../likec4diagram/types'
|
|
|
13
13
|
export const useXYFlow = useReactFlow<Types.Node, Types.Edge>
|
|
14
14
|
export type XYFlowInstance = ReactFlowInstance<Types.Node, Types.Edge>
|
|
15
15
|
|
|
16
|
+
export type XYStoreState = ReactFlowState<Types.Node, Types.Edge>
|
|
17
|
+
|
|
16
18
|
export function useXYStore<StateSlice = unknown>(
|
|
17
|
-
selector: (state:
|
|
19
|
+
selector: (state: XYStoreState) => StateSlice,
|
|
18
20
|
equalityFn?: (a: NoInfer<StateSlice>, b: NoInfer<StateSlice>) => boolean,
|
|
19
21
|
): StateSlice {
|
|
20
22
|
return useStore(
|
package/src/index.ts
CHANGED
|
@@ -2,9 +2,11 @@ import { memo } from 'react'
|
|
|
2
2
|
import { useEnabledFeatures } from '../context'
|
|
3
3
|
import { useOverlaysActorRef } from '../hooks/useOverlaysActor'
|
|
4
4
|
import { useSearchActorRef } from '../hooks/useSearchActor'
|
|
5
|
+
import { EnsureCurrentViewModel } from '../likec4model/LikeC4ModelContext'
|
|
5
6
|
import { NavigationPanel } from '../navigationpanel'
|
|
6
7
|
import { Overlays } from '../overlays/Overlays'
|
|
7
8
|
import { Search } from '../search/Search'
|
|
9
|
+
import { RelationshipPopover } from './relationship-popover/RelationshipPopover'
|
|
8
10
|
import { Controls, DiagramTitlePanel, DynamicViewWalkthrough, NotationPanel } from './ui'
|
|
9
11
|
|
|
10
12
|
export const DiagramUI = memo(() => {
|
|
@@ -14,14 +16,20 @@ export const DiagramUI = memo(() => {
|
|
|
14
16
|
enableNotations,
|
|
15
17
|
enableDynamicViewWalkthrough,
|
|
16
18
|
enableSearch,
|
|
19
|
+
enableRelationshipDetails,
|
|
17
20
|
} = useEnabledFeatures()
|
|
18
|
-
|
|
19
21
|
const overlaysActorRef = useOverlaysActorRef()
|
|
20
22
|
const searchActorRef = useSearchActorRef()
|
|
21
23
|
|
|
22
24
|
return (
|
|
23
25
|
<>
|
|
24
|
-
{enableControls === 'next'
|
|
26
|
+
{enableControls === 'next'
|
|
27
|
+
? (
|
|
28
|
+
<EnsureCurrentViewModel>
|
|
29
|
+
<NavigationPanel />
|
|
30
|
+
</EnsureCurrentViewModel>
|
|
31
|
+
)
|
|
32
|
+
: <Controls />}
|
|
25
33
|
{overlaysActorRef && <Overlays overlaysActorRef={overlaysActorRef} />}
|
|
26
34
|
{enableNotations && <NotationPanel />}
|
|
27
35
|
{enableControls !== 'next' && (
|
|
@@ -31,6 +39,7 @@ export const DiagramUI = memo(() => {
|
|
|
31
39
|
</>
|
|
32
40
|
)}
|
|
33
41
|
{enableSearch && searchActorRef && <Search searchActorRef={searchActorRef} />}
|
|
42
|
+
{enableRelationshipDetails && <RelationshipPopover />}
|
|
34
43
|
</>
|
|
35
44
|
)
|
|
36
45
|
})
|
|
@@ -122,11 +122,9 @@ export function LikeC4DiagramXYFlow({
|
|
|
122
122
|
return {
|
|
123
123
|
element: renderNodes?.element ?? defaultNodeTypes.element,
|
|
124
124
|
deployment: renderNodes?.deployment ?? defaultNodeTypes.deployment,
|
|
125
|
-
'compound-element': renderNodes?.compoundElement ?? defaultNodeTypes
|
|
126
|
-
'compound-deployment': renderNodes?.compoundDeployment ?? defaultNodeTypes
|
|
127
|
-
'view-group': renderNodes?.viewGroup ?? defaultNodeTypes
|
|
128
|
-
} satisfies {
|
|
129
|
-
[key in Types.Node['type']]: any
|
|
125
|
+
'compound-element': renderNodes?.compoundElement ?? defaultNodeTypes.compoundElement,
|
|
126
|
+
'compound-deployment': renderNodes?.compoundDeployment ?? defaultNodeTypes.compoundDeployment,
|
|
127
|
+
'view-group': renderNodes?.viewGroup ?? defaultNodeTypes.viewGroup,
|
|
130
128
|
}
|
|
131
129
|
},
|
|
132
130
|
[renderNodes],
|
|
@@ -187,16 +185,16 @@ export function LikeC4DiagramXYFlow({
|
|
|
187
185
|
diagram.send({ type: 'xyflow.nodeMouseLeave', node })
|
|
188
186
|
}
|
|
189
187
|
})}
|
|
190
|
-
onEdgeMouseEnter={useCallbackRef((
|
|
191
|
-
|
|
188
|
+
onEdgeMouseEnter={useCallbackRef((event, edge) => {
|
|
189
|
+
event.stopPropagation()
|
|
192
190
|
if (!edge.data.hovered) {
|
|
193
|
-
diagram.send({ type: 'xyflow.edgeMouseEnter', edge })
|
|
191
|
+
diagram.send({ type: 'xyflow.edgeMouseEnter', edge, event })
|
|
194
192
|
}
|
|
195
193
|
})}
|
|
196
|
-
onEdgeMouseLeave={useCallbackRef((
|
|
197
|
-
|
|
194
|
+
onEdgeMouseLeave={useCallbackRef((event, edge) => {
|
|
195
|
+
event.stopPropagation()
|
|
198
196
|
if (edge.data.hovered) {
|
|
199
|
-
diagram.send({ type: 'xyflow.edgeMouseLeave', edge })
|
|
197
|
+
diagram.send({ type: 'xyflow.edgeMouseLeave', edge, event })
|
|
200
198
|
}
|
|
201
199
|
})}
|
|
202
200
|
{...props.pannable && {
|
|
@@ -19,16 +19,13 @@ import {
|
|
|
19
19
|
EdgePath,
|
|
20
20
|
} from '../../../base/primitives'
|
|
21
21
|
import { useEnabledFeatures } from '../../../context/DiagramFeatures'
|
|
22
|
-
import { useDiagram
|
|
23
|
-
import { useIsPanning } from '../../../hooks/useReducedGraphics'
|
|
22
|
+
import { useDiagram } from '../../../hooks/useDiagram'
|
|
24
23
|
import { useXYFlow, useXYInternalNode, useXYStoreApi } from '../../../hooks/useXYFlow'
|
|
25
|
-
import
|
|
24
|
+
import { roundDpr } from '../../../utils/roundDpr'
|
|
26
25
|
import { vector, VectorImpl } from '../../../utils/vector'
|
|
27
26
|
import { bezierControlPoints, bezierPath, isSamePoint } from '../../../utils/xyflow'
|
|
28
27
|
import type { Types } from '../../types'
|
|
29
28
|
import * as edgesCss from './edges.css'
|
|
30
|
-
import { NotePopover } from './NotePopover'
|
|
31
|
-
import { RelationshipsDropdownMenu } from './RelationshipsDropdownMenu'
|
|
32
29
|
import { getNodeIntersectionFromCenterToPoint } from './utils'
|
|
33
30
|
|
|
34
31
|
const curve = d3line<XYPosition>()
|
|
@@ -36,15 +33,15 @@ const curve = d3line<XYPosition>()
|
|
|
36
33
|
.x(d => d.x)
|
|
37
34
|
.y(d => d.y)
|
|
38
35
|
|
|
39
|
-
const selectActiveStepId = (s: DiagramActorSnapshot) => s.context.activeWalkthrough?.stepId ?? null
|
|
40
36
|
export const RelationshipEdge = customEdge<Types.RelationshipEdgeData>((props) => {
|
|
41
|
-
const isPanning = useIsPanning()
|
|
42
37
|
const [isControlPointDragging, setIsControlPointDragging] = useState(false)
|
|
43
38
|
const xyflowStore = useXYStoreApi()
|
|
44
39
|
const xyflow = useXYFlow()
|
|
45
40
|
const diagram = useDiagram()
|
|
46
|
-
const
|
|
47
|
-
|
|
41
|
+
const {
|
|
42
|
+
enableNavigateTo,
|
|
43
|
+
enableEdgeEditing,
|
|
44
|
+
} = useEnabledFeatures()
|
|
48
45
|
const {
|
|
49
46
|
id,
|
|
50
47
|
source,
|
|
@@ -120,8 +117,8 @@ export const RelationshipEdge = customEdge<Types.RelationshipEdgeData>((props) =
|
|
|
120
117
|
if (!path) return
|
|
121
118
|
const dompoint = path.getPointAtLength(path.getTotalLength() * 0.5)
|
|
122
119
|
const point = {
|
|
123
|
-
x:
|
|
124
|
-
y:
|
|
120
|
+
x: roundDpr(dompoint.x),
|
|
121
|
+
y: roundDpr(dompoint.y),
|
|
125
122
|
}
|
|
126
123
|
setLabelPos(current => isSamePoint(current, point) ? current : point)
|
|
127
124
|
}, [edgePath])
|
|
@@ -166,13 +163,16 @@ export const RelationshipEdge = customEdge<Types.RelationshipEdgeData>((props) =
|
|
|
166
163
|
}
|
|
167
164
|
if (!isSamePoint(pointer, clientPoint)) {
|
|
168
165
|
setIsControlPointDragging(true)
|
|
169
|
-
hasMoved
|
|
166
|
+
if (!hasMoved) {
|
|
167
|
+
diagram.send({ type: 'xyflow.edgeEditingStarted', edge: props.data })
|
|
168
|
+
hasMoved = true
|
|
169
|
+
}
|
|
170
170
|
pointer = clientPoint
|
|
171
171
|
const { x, y } = xyflow.screenToFlowPosition(pointer, { snapToGrid: false })
|
|
172
172
|
const cp = controlPoints.slice()
|
|
173
173
|
cp[index] = {
|
|
174
|
-
x:
|
|
175
|
-
y:
|
|
174
|
+
x: roundDpr(x),
|
|
175
|
+
y: roundDpr(y),
|
|
176
176
|
}
|
|
177
177
|
diagram.updateEdgeData(id as EdgeId, {
|
|
178
178
|
controlPoints: cp,
|
|
@@ -193,6 +193,7 @@ export const RelationshipEdge = customEdge<Types.RelationshipEdgeData>((props) =
|
|
|
193
193
|
}
|
|
194
194
|
setIsControlPointDragging(false)
|
|
195
195
|
}
|
|
196
|
+
|
|
196
197
|
const onClick = (e: MouseEvent) => {
|
|
197
198
|
e.stopPropagation()
|
|
198
199
|
e.preventDefault()
|
|
@@ -307,40 +308,6 @@ export const RelationshipEdge = customEdge<Types.RelationshipEdgeData>((props) =
|
|
|
307
308
|
zIndex = ZIndexes.Element + 1
|
|
308
309
|
}
|
|
309
310
|
|
|
310
|
-
let edgeLabel = (
|
|
311
|
-
<EdgeLabel edgeProps={props}>
|
|
312
|
-
{!isControlPointDragging && navigateTo && (
|
|
313
|
-
<EdgeActionButton
|
|
314
|
-
{...props}
|
|
315
|
-
onClick={e => {
|
|
316
|
-
e.stopPropagation()
|
|
317
|
-
diagram.navigateTo(navigateTo)
|
|
318
|
-
}} />
|
|
319
|
-
)}
|
|
320
|
-
</EdgeLabel>
|
|
321
|
-
)
|
|
322
|
-
|
|
323
|
-
if (!isControlPointDragging && !isPanning) {
|
|
324
|
-
const notes = props.data.notes
|
|
325
|
-
if (notes && activeWalkthroughStep === props.id) {
|
|
326
|
-
edgeLabel = (
|
|
327
|
-
<NotePopover notes={notes.txt ?? notes.md}>
|
|
328
|
-
{edgeLabel}
|
|
329
|
-
</NotePopover>
|
|
330
|
-
)
|
|
331
|
-
} else if (enableRelationshipDetails) {
|
|
332
|
-
edgeLabel = (
|
|
333
|
-
<RelationshipsDropdownMenu
|
|
334
|
-
disabled={!!dimmed}
|
|
335
|
-
source={source}
|
|
336
|
-
target={target}
|
|
337
|
-
edgeId={edgeId}>
|
|
338
|
-
{edgeLabel}
|
|
339
|
-
</RelationshipsDropdownMenu>
|
|
340
|
-
)
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
311
|
return (
|
|
345
312
|
<>
|
|
346
313
|
<EdgeContainer {...props} className={clsx(isControlPointDragging && edgesCss.controlDragging)}>
|
|
@@ -359,7 +326,16 @@ export const RelationshipEdge = customEdge<Types.RelationshipEdgeData>((props) =
|
|
|
359
326
|
translate: isModified ? 'translate(-50%, 0)' : undefined,
|
|
360
327
|
}}
|
|
361
328
|
>
|
|
362
|
-
{
|
|
329
|
+
<EdgeLabel edgeProps={props}>
|
|
330
|
+
{navigateTo && (
|
|
331
|
+
<EdgeActionButton
|
|
332
|
+
{...props}
|
|
333
|
+
onClick={e => {
|
|
334
|
+
e.stopPropagation()
|
|
335
|
+
diagram.navigateTo(navigateTo)
|
|
336
|
+
}} />
|
|
337
|
+
)}
|
|
338
|
+
</EdgeLabel>
|
|
363
339
|
</EdgeLabelContainer>
|
|
364
340
|
</EdgeContainer>
|
|
365
341
|
{/* Render control points above edge label */}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CustomNodes } from '../../custom/customNodes'
|
|
1
2
|
import type { Types } from '../types'
|
|
2
3
|
import { RelationshipEdge } from './edges/RelationshipEdge'
|
|
3
4
|
import {
|
|
@@ -11,10 +12,10 @@ import {
|
|
|
11
12
|
export const BuiltinNodes = {
|
|
12
13
|
element: ElementNode,
|
|
13
14
|
deployment: DeploymentNode,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} satisfies
|
|
15
|
+
compoundElement: CompoundElementNode,
|
|
16
|
+
compoundDeployment: CompoundDeploymentNode,
|
|
17
|
+
viewGroup: ViewGroupNode,
|
|
18
|
+
} satisfies Required<CustomNodes>
|
|
18
19
|
|
|
19
20
|
export const edgeTypes = {
|
|
20
21
|
relationship: RelationshipEdge,
|