@likec4/diagram 1.36.1 → 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.
Files changed (173) hide show
  1. package/bundle/{chunk-DHvr-RGh.js → chunk-DSORWspW.js} +1008 -988
  2. package/bundle/custom.js +64 -56
  3. package/bundle/index.js +3539 -3315
  4. package/dist/LikeC4Diagram.props.d.ts +5 -5
  5. package/dist/LikeC4Styles.js +17 -15
  6. package/dist/StaticLikeC4Diagram.d.ts +1 -1
  7. package/dist/StaticLikeC4Diagram.js +3 -0
  8. package/dist/base/BaseXYFlow.d.ts +1 -1
  9. package/dist/base/BaseXYFlow.js +25 -27
  10. package/dist/base/const.d.ts +4 -4
  11. package/dist/base/const.js +5 -4
  12. package/dist/base/primitives/MarkdownBlock.js +4 -1
  13. package/dist/base/primitives/compound/CompoundActionButton.js +27 -42
  14. package/dist/base/primitives/compound/CompoundDetailsButton.js +23 -48
  15. package/dist/base/primitives/compound/CompoundNodeContainer.js +16 -48
  16. package/dist/base/primitives/compound/CompoundTitle.js +5 -80
  17. package/dist/base/primitives/compound/actionbtns.css.js +1 -13
  18. package/dist/base/primitives/customEdge.d.ts +1 -1
  19. package/dist/base/primitives/customNode.d.ts +4 -4
  20. package/dist/base/primitives/customNode.js +7 -7
  21. package/dist/base/primitives/edge/EdgeLabel.d.ts +5 -4
  22. package/dist/base/primitives/edge/EdgeLabel.js +39 -21
  23. package/dist/base/primitives/edge/EdgeLabelContainer.js +11 -23
  24. package/dist/base/primitives/edge/edge.css.js +19 -11
  25. package/dist/base/primitives/element/ElementShape.js +38 -18
  26. package/dist/base/primitives/element/ElementTags.js +7 -4
  27. package/dist/base/primitives/element/ElementTitle.js +10 -2
  28. package/dist/base/types.d.ts +17 -21
  29. package/dist/bundle/LikeC4View.d.ts +2 -2
  30. package/dist/bundle/LikeC4View.js +4 -1
  31. package/dist/bundle/LikeC4View.props.d.ts +2 -2
  32. package/dist/bundle/ReactLikeC4.d.ts +3 -3
  33. package/dist/bundle/custom.js +2 -1
  34. package/dist/bundle/index.js +2 -1
  35. package/dist/components/Link.js +3 -2
  36. package/dist/context/ReduceGraphics.js +2 -5
  37. package/dist/context/RootContainer.js +1 -5
  38. package/dist/custom/customNodes.d.ts +32 -26
  39. package/dist/custom/customNodes.js +12 -8
  40. package/dist/custom/hooks.d.ts +2 -1
  41. package/dist/custom/index.js +2 -1
  42. package/dist/globals.css.js +1 -1
  43. package/dist/hooks/index.d.ts +1 -1
  44. package/dist/hooks/useDiagram.d.ts +18 -1
  45. package/dist/hooks/useDiagram.js +18 -2
  46. package/dist/hooks/useXYFlow.d.ts +40 -21
  47. package/dist/index.d.ts +1 -1
  48. package/dist/index.js +2 -1
  49. package/dist/likec4diagram/DiagramUI.js +5 -2
  50. package/dist/likec4diagram/DiagramXYFlow.js +9 -9
  51. package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +3 -3
  52. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +27 -44
  53. package/dist/likec4diagram/custom/index.js +3 -3
  54. package/dist/likec4diagram/custom/nodes/nodes.d.ts +8 -6
  55. package/dist/likec4diagram/custom/nodes/nodes.js +13 -14
  56. package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +3 -2
  57. package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +2 -2
  58. package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +2 -0
  59. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +441 -0
  60. package/dist/likec4diagram/relationship-popover/actor.d.ts +177 -0
  61. package/dist/likec4diagram/relationship-popover/actor.js +155 -0
  62. package/dist/likec4diagram/relationship-popover/styles.css.d.ts +2 -0
  63. package/dist/likec4diagram/{custom/edges/RelationshipsDropdownMenu.css.js → relationship-popover/styles.css.js} +4 -17
  64. package/dist/likec4diagram/useLayoutConstraints.js +0 -1
  65. package/dist/likec4model/useLikeC4ElementsTree.js +1 -1
  66. package/dist/likec4model/useLikeC4Project.js +15 -1
  67. package/dist/navigationpanel/NavigationPanelDropdown.js +1 -2
  68. package/dist/navigationpanel/actor.js +1 -2
  69. package/dist/navigationpanel/controls/NavigationButtons.js +1 -5
  70. package/dist/navigationpanel/controls/ViewDetailsCard.js +2 -0
  71. package/dist/overlays/element-details/actor.d.ts +564 -8
  72. package/dist/overlays/overlay/Overlay.css.d.ts +1 -1
  73. package/dist/overlays/relationship-details/actor.d.ts +3 -1
  74. package/dist/overlays/relationship-details/hooks.d.ts +19 -1
  75. package/dist/overlays/relationship-details/layout-to-xyflow.js +0 -1
  76. package/dist/overlays/relationship-details/layout.js +1 -2
  77. package/dist/overlays/relationships-browser/actor.d.ts +26 -2
  78. package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +16 -0
  79. package/dist/overlays/relationships-browser/custom/nodeTypes.js +18 -8
  80. package/dist/overlays/relationships-browser/useViewToNodesEdges.js +0 -1
  81. package/dist/search/components/_shared.css.d.ts +1 -1
  82. package/dist/state/DiagramActorProvider.js +2 -19
  83. package/dist/state/assign.js +24 -10
  84. package/dist/state/diagram-machine.d.ts +149 -474
  85. package/dist/state/diagram-machine.js +94 -54
  86. package/dist/state/types.d.ts +1 -1
  87. package/dist/styles-min.css +1 -1
  88. package/dist/styles-xyflow.css +1 -1
  89. package/dist/styles.css +1 -1
  90. package/dist/styles.css2.js +1 -1
  91. package/dist/utils/index.d.ts +2 -1
  92. package/dist/utils/roundDpr.d.ts +1 -0
  93. package/dist/utils/roundDpr.js +20 -0
  94. package/dist/utils/xyflow.d.ts +0 -1
  95. package/dist/utils/xyflow.js +1 -7
  96. package/package.json +11 -10
  97. package/panda.buildinfo.json +90 -155
  98. package/src/LikeC4Diagram.props.ts +5 -5
  99. package/src/LikeC4Styles.tsx +22 -14
  100. package/src/StaticLikeC4Diagram.tsx +3 -0
  101. package/src/base/BaseXYFlow.tsx +26 -29
  102. package/src/base/const.ts +5 -4
  103. package/src/base/primitives/MarkdownBlock.tsx +6 -1
  104. package/src/base/primitives/compound/CompoundActionButton.tsx +31 -43
  105. package/src/base/primitives/compound/CompoundDetailsButton.tsx +26 -48
  106. package/src/base/primitives/compound/CompoundNodeContainer.tsx +15 -43
  107. package/src/base/primitives/compound/CompoundTitle.tsx +4 -76
  108. package/src/base/primitives/compound/actionbtns.css.ts +0 -12
  109. package/src/base/primitives/customEdge.ts +1 -1
  110. package/src/base/primitives/customNode.tsx +20 -24
  111. package/src/base/primitives/edge/EdgeLabel.tsx +23 -8
  112. package/src/base/primitives/edge/EdgeLabelContainer.tsx +9 -21
  113. package/src/base/primitives/edge/edge.css.ts +19 -11
  114. package/src/base/primitives/element/ElementShape.tsx +40 -18
  115. package/src/base/primitives/element/ElementTags.tsx +7 -4
  116. package/src/base/primitives/element/ElementTitle.tsx +23 -11
  117. package/src/base/types.ts +21 -25
  118. package/src/bundle/LikeC4View.props.ts +2 -2
  119. package/src/bundle/LikeC4View.tsx +8 -5
  120. package/src/bundle/ReactLikeC4.tsx +3 -3
  121. package/src/components/Link.tsx +3 -2
  122. package/src/context/RootContainer.tsx +1 -5
  123. package/src/context/TagStylesContext.tsx +2 -0
  124. package/src/custom/{customNodes.tsx → customNodes.ts} +58 -52
  125. package/src/custom/hooks.ts +7 -0
  126. package/src/globals.css +58 -5
  127. package/src/hooks/index.ts +1 -1
  128. package/src/hooks/useDiagram.ts +39 -5
  129. package/src/hooks/useXYFlow.ts +3 -1
  130. package/src/index.ts +1 -0
  131. package/src/likec4diagram/DiagramUI.tsx +3 -0
  132. package/src/likec4diagram/DiagramXYFlow.tsx +9 -11
  133. package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +25 -49
  134. package/src/likec4diagram/custom/index.ts +5 -4
  135. package/src/likec4diagram/custom/nodes/nodes.tsx +13 -11
  136. package/src/likec4diagram/custom/nodes/toolbar/CompoundToolbar.tsx +3 -2
  137. package/src/likec4diagram/relationship-popover/RelationshipPopover.tsx +535 -0
  138. package/src/likec4diagram/relationship-popover/actor.ts +192 -0
  139. package/src/likec4diagram/{custom/edges/RelationshipsDropdownMenu.css.ts → relationship-popover/styles.css.ts} +3 -19
  140. package/src/likec4diagram/useLayoutConstraints.ts +0 -1
  141. package/src/likec4model/useLikeC4ElementsTree.ts +1 -1
  142. package/src/navigationpanel/NavigationPanelDropdown.tsx +1 -2
  143. package/src/navigationpanel/actor.ts +2 -2
  144. package/src/navigationpanel/controls/NavigationButtons.tsx +1 -5
  145. package/src/navigationpanel/controls/ViewDetailsCard.tsx +2 -0
  146. package/src/overlays/relationship-details/layout-to-xyflow.ts +0 -1
  147. package/src/overlays/relationship-details/layout.ts +4 -3
  148. package/src/overlays/relationships-browser/custom/nodeTypes.tsx +22 -8
  149. package/src/overlays/relationships-browser/useViewToNodesEdges.ts +0 -1
  150. package/src/state/DiagramActorProvider.tsx +2 -20
  151. package/src/state/assign.ts +24 -10
  152. package/src/state/diagram-machine.ts +101 -53
  153. package/src/state/types.ts +4 -1
  154. package/src/utils/index.ts +2 -1
  155. package/src/utils/roundDpr.ts +27 -0
  156. package/src/utils/xyflow.ts +0 -7
  157. package/dist/base/primitives/compound/CompoundNodeContainer.css.d.ts +0 -35
  158. package/dist/base/primitives/compound/CompoundNodeContainer.css.js +0 -132
  159. package/dist/base/primitives/edge/EdgeLabel.css.d.ts +0 -7
  160. package/dist/base/primitives/edge/EdgeLabel.css.js +0 -57
  161. package/dist/base/primitives/element/ElementShape.css.d.ts +0 -6
  162. package/dist/base/primitives/element/ElementShape.css.js +0 -107
  163. package/dist/likec4diagram/custom/edges/NotePopover.css.js +0 -21
  164. package/dist/likec4diagram/custom/edges/NotePopover.js +0 -91
  165. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.d.ts +0 -5
  166. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.d.ts +0 -13
  167. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +0 -215
  168. package/dist/likec4diagram/custom/index.d.ts +0 -62
  169. package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +0 -10
  170. package/src/base/primitives/compound/CompoundNodeContainer.css.ts +0 -138
  171. package/src/base/primitives/edge/EdgeLabel.css.ts +0 -64
  172. package/src/base/primitives/element/ElementShape.css.ts +0 -112
  173. package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +0 -281
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { nonNullable } from '@likec4/core';
3
3
  import { cx } from '@likec4/styles/css';
4
4
  import { useDebouncedEffect } from '@react-hookz/web';
@@ -8,32 +8,30 @@ import { useState, useRef, useEffect } from 'react';
8
8
  import { isTruthy, first, last } from 'remeda';
9
9
  import { ZIndexes } from '../../../base/const.js';
10
10
  import { useEnabledFeatures } from '../../../context/DiagramFeatures.js';
11
- import { useDiagram, useDiagramActorSnapshot } from '../../../hooks/useDiagram.js';
11
+ import { useDiagram } from '../../../hooks/useDiagram.js';
12
12
  import { useXYStoreApi, useXYFlow, useXYInternalNode } from '../../../hooks/useXYFlow.js';
13
+ import { roundDpr } from '../../../utils/roundDpr.js';
13
14
  import { VectorImpl, vector } from '../../../utils/vector.js';
14
15
  import { isSamePoint, bezierControlPoints, bezierPath } from '../../../utils/xyflow.js';
15
16
  import { controlDragging, controlPointsContainer, controlPoint } from './edges.css.js';
16
- import { NotePopover } from './NotePopover.js';
17
- import { RelationshipsDropdownMenu } from './RelationshipsDropdownMenu.js';
18
17
  import { getNodeIntersectionFromCenterToPoint } from './utils.js';
19
18
  import { customEdge } from '../../../base/primitives/customEdge.js';
20
- import { useIsPanning } from '../../../context/ReduceGraphics.js';
21
- import { EdgeLabel } from '../../../base/primitives/edge/EdgeLabel.js';
22
- import { EdgeActionButton } from '../../../base/primitives/edge/EdgeActionButton.js';
23
19
  import { EdgeContainer } from '../../../base/primitives/edge/EdgeContainer.js';
24
20
  import { EdgePath } from '../../../base/primitives/edge/EdgePath.js';
25
21
  import { EdgeLabelContainer } from '../../../base/primitives/edge/EdgeLabelContainer.js';
22
+ import { EdgeLabel } from '../../../base/primitives/edge/EdgeLabel.js';
23
+ import { EdgeActionButton } from '../../../base/primitives/edge/EdgeActionButton.js';
26
24
 
27
25
  const curve = line().curve(curveCatmullRomOpen).x((d) => d.x).y((d) => d.y);
28
- const selectActiveStepId = (s) => s.context.activeWalkthrough?.stepId ?? null;
29
26
  const RelationshipEdge = customEdge((props) => {
30
- const isPanning = useIsPanning();
31
27
  const [isControlPointDragging, setIsControlPointDragging] = useState(false);
32
28
  const xyflowStore = useXYStoreApi();
33
29
  const xyflow = useXYFlow();
34
30
  const diagram = useDiagram();
35
- const activeWalkthroughStep = useDiagramActorSnapshot(selectActiveStepId);
36
- const { enableNavigateTo, enableEdgeEditing, enableRelationshipDetails } = useEnabledFeatures();
31
+ const {
32
+ enableNavigateTo,
33
+ enableEdgeEditing
34
+ } = useEnabledFeatures();
37
35
  const {
38
36
  id,
39
37
  source,
@@ -93,8 +91,8 @@ const RelationshipEdge = customEdge((props) => {
93
91
  if (!path) return;
94
92
  const dompoint = path.getPointAtLength(path.getTotalLength() * 0.5);
95
93
  const point = {
96
- x: Math.round(dompoint.x),
97
- y: Math.round(dompoint.y)
94
+ x: roundDpr(dompoint.x),
95
+ y: roundDpr(dompoint.y)
98
96
  };
99
97
  setLabelPos((current) => isSamePoint(current, point) ? current : point);
100
98
  }, [edgePath]);
@@ -132,13 +130,16 @@ const RelationshipEdge = customEdge((props) => {
132
130
  };
133
131
  if (!isSamePoint(pointer, clientPoint)) {
134
132
  setIsControlPointDragging(true);
135
- hasMoved = true;
133
+ if (!hasMoved) {
134
+ diagram.send({ type: "xyflow.edgeEditingStarted", edge: props.data });
135
+ hasMoved = true;
136
+ }
136
137
  pointer = clientPoint;
137
138
  const { x, y } = xyflow.screenToFlowPosition(pointer, { snapToGrid: false });
138
139
  const cp = controlPoints.slice();
139
140
  cp[index] = {
140
- x: Math.round(x),
141
- y: Math.round(y)
141
+ x: roundDpr(x),
142
+ y: roundDpr(y)
142
143
  };
143
144
  diagram.updateEdgeData(id, {
144
145
  controlPoints: cp
@@ -244,33 +245,6 @@ const RelationshipEdge = customEdge((props) => {
244
245
  if (hovered || active) {
245
246
  zIndex = ZIndexes.Element + 1;
246
247
  }
247
- let edgeLabel = /* @__PURE__ */ jsx(EdgeLabel, { edgeProps: props, children: !isControlPointDragging && navigateTo && /* @__PURE__ */ jsx(
248
- EdgeActionButton,
249
- {
250
- ...props,
251
- onClick: (e) => {
252
- e.stopPropagation();
253
- diagram.navigateTo(navigateTo);
254
- }
255
- }
256
- ) });
257
- if (!isControlPointDragging && !isPanning) {
258
- const notes = props.data.notes;
259
- if (notes && activeWalkthroughStep === props.id) {
260
- edgeLabel = /* @__PURE__ */ jsx(NotePopover, { notes: notes.txt ?? notes.md, children: edgeLabel });
261
- } else if (enableRelationshipDetails) {
262
- edgeLabel = /* @__PURE__ */ jsx(
263
- RelationshipsDropdownMenu,
264
- {
265
- disabled: !!dimmed,
266
- source,
267
- target,
268
- edgeId,
269
- children: edgeLabel
270
- }
271
- );
272
- }
273
- }
274
248
  return /* @__PURE__ */ jsxs(Fragment, { children: [
275
249
  /* @__PURE__ */ jsxs(EdgeContainer, { ...props, className: cx(isControlPointDragging && controlDragging), children: [
276
250
  /* @__PURE__ */ jsx(
@@ -293,7 +267,16 @@ const RelationshipEdge = customEdge((props) => {
293
267
  y: labelY,
294
268
  translate: isModified ? "translate(-50%, 0)" : void 0
295
269
  },
296
- children: edgeLabel
270
+ children: /* @__PURE__ */ jsx(EdgeLabel, { edgeProps: props, children: navigateTo && /* @__PURE__ */ jsx(
271
+ EdgeActionButton,
272
+ {
273
+ ...props,
274
+ onClick: (e) => {
275
+ e.stopPropagation();
276
+ diagram.navigateTo(navigateTo);
277
+ }
278
+ }
279
+ ) })
297
280
  }
298
281
  )
299
282
  ] }),
@@ -4,9 +4,9 @@ import { ViewGroupNode, CompoundDeploymentNode, CompoundElementNode, DeploymentN
4
4
  const BuiltinNodes = {
5
5
  element: ElementNode,
6
6
  deployment: DeploymentNode,
7
- "compound-element": CompoundElementNode,
8
- "compound-deployment": CompoundDeploymentNode,
9
- "view-group": ViewGroupNode
7
+ compoundElement: CompoundElementNode,
8
+ compoundDeployment: CompoundDeploymentNode,
9
+ viewGroup: ViewGroupNode
10
10
  };
11
11
  const edgeTypes = {
12
12
  relationship: RelationshipEdge
@@ -1,10 +1,12 @@
1
1
  import { NodeProps } from '../../../base';
2
+ import { CustomNodes as CustomNodesType } from '../../../custom/customNodes';
2
3
  import { Types } from '../../types';
3
- import { MemoExoticComponent } from 'react';
4
+ type CustomNodes = Required<CustomNodesType>;
4
5
  export declare function ElementDetailsButtonWithHandler(props: NodeProps<Types.ElementNodeData | Types.DeploymentElementNodeData>): import("react/jsx-runtime").JSX.Element | null;
5
6
  export declare function CompoundDetailsButtonWithHandler(props: NodeProps<Types.CompoundElementNodeData | Types.CompoundDeploymentNodeData>): import("react/jsx-runtime").JSX.Element | null;
6
- export declare const ElementNode: MemoExoticComponent<(props: NodeProps<Types.ElementNodeData, "element">) => import("react/jsx-runtime").JSX.Element>;
7
- export declare const DeploymentNode: MemoExoticComponent<(props: NodeProps<Types.DeploymentElementNodeData, "deployment">) => import("react/jsx-runtime").JSX.Element>;
8
- export declare const CompoundElementNode: MemoExoticComponent<(props: NodeProps<Types.CompoundElementNodeData, "compound-element">) => import("react/jsx-runtime").JSX.Element>;
9
- export declare const CompoundDeploymentNode: MemoExoticComponent<(props: NodeProps<Types.CompoundDeploymentNodeData, "compound-deployment">) => import("react/jsx-runtime").JSX.Element>;
10
- export declare const ViewGroupNode: MemoExoticComponent<(props: NodeProps<Types.ViewGroupNodeData, "view-group">) => import("react/jsx-runtime").JSX.Element>;
7
+ export declare const ElementNode: CustomNodes['element'];
8
+ export declare const DeploymentNode: CustomNodes['deployment'];
9
+ export declare const CompoundElementNode: CustomNodes['compoundElement'];
10
+ export declare const CompoundDeploymentNode: CustomNodes['compoundDeployment'];
11
+ export declare const ViewGroupNode: CustomNodes['viewGroup'];
12
+ export {};
@@ -1,15 +1,14 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useEnabledFeatures } from '../../../context/DiagramFeatures.js';
3
3
  import { useDiagram } from '../../../hooks/useDiagram.js';
4
4
  import { CompoundActions } from './CompoundActions.js';
5
5
  import { DeploymentElementActions, ElementActions } from './ElementActions.js';
6
- import { CompoundElementToolbar, CompoundDeploymentToolbar } from './toolbar/CompoundToolbar.js';
6
+ import { CompoundDeploymentToolbar, CompoundElementToolbar } from './toolbar/CompoundToolbar.js';
7
7
  import { DeploymentElementToolbar, ElementToolbar } from './toolbar/ElementToolbar.js';
8
- import { customNode } from '../../../base/primitives/customNode.js';
9
- import { CompoundDetailsButton } from '../../../base/primitives/compound/CompoundDetailsButton.js';
10
8
  import { CompoundNodeContainer } from '../../../base/primitives/compound/CompoundNodeContainer.js';
11
9
  import { CompoundTitle } from '../../../base/primitives/compound/CompoundTitle.js';
12
10
  import { DefaultHandles } from '../../../base/primitives/NodeHandles.js';
11
+ import { CompoundDetailsButton } from '../../../base/primitives/compound/CompoundDetailsButton.js';
13
12
  import { ElementNodeContainer } from '../../../base/primitives/element/ElementNodeContainer.js';
14
13
  import { ElementShape } from '../../../base/primitives/element/ElementShape.js';
15
14
  import { ElementTitle } from '../../../base/primitives/element/ElementTitle.js';
@@ -48,7 +47,7 @@ function CompoundDetailsButtonWithHandler(props) {
48
47
  }
49
48
  );
50
49
  }
51
- const ElementNode = customNode((props) => {
50
+ const ElementNode = (props) => {
52
51
  const { enableElementTags, enableReadOnly } = useEnabledFeatures();
53
52
  return /* @__PURE__ */ jsxs(ElementNodeContainer, { nodeProps: props, children: [
54
53
  /* @__PURE__ */ jsx(ElementShape, { ...props }),
@@ -59,9 +58,9 @@ const ElementNode = customNode((props) => {
59
58
  !enableReadOnly && /* @__PURE__ */ jsx(ElementToolbar, { ...props }),
60
59
  /* @__PURE__ */ jsx(DefaultHandles, {})
61
60
  ] });
62
- });
61
+ };
63
62
  ElementNode.displayName = "ElementNode";
64
- const DeploymentNode = customNode((props) => {
63
+ const DeploymentNode = (props) => {
65
64
  const { enableElementTags, enableReadOnly } = useEnabledFeatures();
66
65
  return /* @__PURE__ */ jsxs(ElementNodeContainer, { nodeProps: props, children: [
67
66
  /* @__PURE__ */ jsx(ElementShape, { ...props }),
@@ -72,9 +71,9 @@ const DeploymentNode = customNode((props) => {
72
71
  !enableReadOnly && /* @__PURE__ */ jsx(DeploymentElementToolbar, { ...props }),
73
72
  /* @__PURE__ */ jsx(DefaultHandles, {})
74
73
  ] });
75
- });
74
+ };
76
75
  DeploymentNode.displayName = "DeploymentNode";
77
- const CompoundElementNode = customNode((props) => {
76
+ const CompoundElementNode = (props) => {
78
77
  const { enableElementDetails, enableReadOnly } = useEnabledFeatures();
79
78
  return /* @__PURE__ */ jsxs(CompoundNodeContainer, { nodeProps: props, children: [
80
79
  /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
@@ -83,9 +82,9 @@ const CompoundElementNode = customNode((props) => {
83
82
  !enableReadOnly && /* @__PURE__ */ jsx(CompoundElementToolbar, { ...props }),
84
83
  /* @__PURE__ */ jsx(DefaultHandles, {})
85
84
  ] });
86
- });
85
+ };
87
86
  CompoundElementNode.displayName = "CompoundElementNode";
88
- const CompoundDeploymentNode = customNode((props) => {
87
+ const CompoundDeploymentNode = (props) => {
89
88
  const { enableElementDetails, enableReadOnly } = useEnabledFeatures();
90
89
  return /* @__PURE__ */ jsxs(CompoundNodeContainer, { nodeProps: props, children: [
91
90
  /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
@@ -94,12 +93,12 @@ const CompoundDeploymentNode = customNode((props) => {
94
93
  !enableReadOnly && /* @__PURE__ */ jsx(CompoundDeploymentToolbar, { ...props }),
95
94
  /* @__PURE__ */ jsx(DefaultHandles, {})
96
95
  ] });
97
- });
96
+ };
98
97
  CompoundDeploymentNode.displayName = "CompoundDeploymentNode";
99
- const ViewGroupNode = customNode((props) => /* @__PURE__ */ jsxs(CompoundNodeContainer, { nodeProps: props, children: [
98
+ const ViewGroupNode = (props) => /* @__PURE__ */ jsxs(CompoundNodeContainer, { nodeProps: props, children: [
100
99
  /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
101
100
  /* @__PURE__ */ jsx(DefaultHandles, {})
102
- ] }));
101
+ ] });
103
102
  ViewGroupNode.displayName = "ViewGroupNode";
104
103
 
105
104
  export { CompoundDeploymentNode, CompoundDetailsButtonWithHandler, CompoundElementNode, DeploymentNode, ElementDetailsButtonWithHandler, ElementNode, ViewGroupNode };
@@ -15,6 +15,7 @@ function CompoundElementToolbar(props) {
15
15
  }
16
16
  } = props;
17
17
  const { elementColor, onColorPreview, onChange } = useHandlers(modelFqn, props);
18
+ const opacity = style?.opacity ?? 100;
18
19
  return /* @__PURE__ */ jsxs(
19
20
  Toolbar,
20
21
  {
@@ -28,7 +29,7 @@ function CompoundElementToolbar(props) {
28
29
  elementColor,
29
30
  onColorPreview,
30
31
  isOpacityEditable: true,
31
- elementOpacity: style?.opacity,
32
+ elementOpacity: opacity,
32
33
  onChange,
33
34
  position: "left-start"
34
35
  }
@@ -36,7 +37,7 @@ function CompoundElementToolbar(props) {
36
37
  /* @__PURE__ */ jsx(
37
38
  BorderStyleOption,
38
39
  {
39
- elementBorderStyle: style?.border,
40
+ elementBorderStyle: style?.border ?? (opacity < 99 ? "dashed" : "none"),
40
41
  onChange
41
42
  }
42
43
  ),
@@ -16,7 +16,7 @@ export declare const themedColors: ({
16
16
  value: ColorLiteral;
17
17
  })[];
18
18
  export declare const colors: {
19
- key: "blue" | "gray" | "green" | "indigo" | "red" | "amber" | "slate" | "sky";
19
+ key: "amber" | "blue" | "gray" | "slate" | "green" | "indigo" | "red" | "sky";
20
20
  value: ColorLiteral;
21
21
  }[];
22
22
  export type ThemeColorKey = typeof themedColors[0]['key'];
@@ -26,7 +26,7 @@ export declare const Tooltip: ForwardRefExoticComponent< TooltipProps & RefAttri
26
26
  renderRoot?: (props: Record<string, any>) => React.ReactNode;
27
27
  }>;
28
28
  export declare function useHandlers(target: Fqn | DeploymentFqn, props: NodeProps<Types.NodeData>): {
29
- elementColor: "blue" | "gray" | "green" | "indigo" | "red" | "amber" | "slate" | "muted" | "primary" | "secondary" | "sky";
29
+ elementColor: "amber" | "blue" | "gray" | "slate" | "green" | "indigo" | "muted" | "primary" | "red" | "secondary" | "sky";
30
30
  onColorPreview: (color: ThemeColor | null) => void;
31
31
  onChange: OnStyleChange;
32
32
  };
@@ -0,0 +1,2 @@
1
+ import { MemoExoticComponent } from 'react';
2
+ export declare const RelationshipPopover: MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element | null>;