@likec4/diagram 1.59.3 → 1.59.4

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 (202) hide show
  1. package/dist/LikeC4Diagram.d.ts +1 -1
  2. package/dist/LikeC4Diagram.js +36 -21
  3. package/dist/LikeC4Diagram.props.d.ts +23 -0
  4. package/dist/LikeC4MantineProvider.d.ts +24 -0
  5. package/dist/LikeC4MantineProvider.js +156 -0
  6. package/dist/LikeC4ProjectsOverview.js +1 -1
  7. package/dist/LikeC4ProjectsProvider.d.ts +17 -2
  8. package/dist/LikeC4Styles.d.ts +13 -3
  9. package/dist/LikeC4Styles.js +8 -5
  10. package/dist/LikeC4View.js +2 -2
  11. package/dist/StaticLikeC4Diagram.d.ts +1 -1
  12. package/dist/base/BaseXYFlow.d.ts +1 -1
  13. package/dist/base/BaseXYFlow.js +11 -8
  14. package/dist/base/const.d.ts +1 -0
  15. package/dist/base/const.js +3 -1
  16. package/dist/base-primitives/Markdown.d.ts +3 -3
  17. package/dist/base-primitives/compound/actionbtns.css.d.ts +3 -3
  18. package/dist/base-primitives/compound/actionbtns.css.js +3 -3
  19. package/dist/base-primitives/element/ElementTags.d.ts +2 -2
  20. package/dist/base-primitives/element/ElementTags.js +5 -5
  21. package/dist/components/EmptyBox.d.ts +3 -0
  22. package/dist/components/EmptyBox.js +9 -0
  23. package/dist/components/ErrorFallback.js +7 -6
  24. package/dist/components/FloatingWindow.d.ts +18 -0
  25. package/dist/components/FloatingWindow.js +89 -0
  26. package/dist/components/Link.js +7 -7
  27. package/dist/components/NavigationPanel.d.ts +2 -2
  28. package/dist/components/NavigationPanel.js +5 -6
  29. package/dist/components/SearchControl.css.js +10 -12
  30. package/dist/components/ViewIcon.d.ts +11 -0
  31. package/dist/components/ViewIcon.js +71 -0
  32. package/dist/context/DiagramEventHandlers.js +2 -1
  33. package/dist/context/EnsureMantine.js +3 -3
  34. package/dist/context/IconRenderer.d.ts +2 -1
  35. package/dist/context/IconRenderer.js +38 -2
  36. package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
  37. package/dist/context/TagStylesContext.d.ts +9 -3
  38. package/dist/context/TagStylesContext.js +19 -19
  39. package/dist/custom/index.d.ts +3 -0
  40. package/dist/custom/index.js +6 -3
  41. package/dist/editor/applyChangesToManualLayout.js +4 -1
  42. package/dist/hooks/safeContext.d.ts +12 -4
  43. package/dist/hooks/safeContext.js +2 -2
  44. package/dist/hooks/useCurrentView.js +5 -5
  45. package/dist/hooks/useDiagram.js +1 -23
  46. package/dist/hooks/useDiagramCompareLayout.d.ts +4 -4
  47. package/dist/hooks/useDiagramCompareLayout.js +14 -16
  48. package/dist/hooks/useEditorActor.js +3 -5
  49. package/dist/hooks/useLikeC4Model.js +8 -3
  50. package/dist/hooks/useLikeC4Project.d.ts +4 -3
  51. package/dist/hooks/useOverlaysActor.d.ts +1 -1
  52. package/dist/index.d.ts +4 -3
  53. package/dist/index.js +6 -5
  54. package/dist/likec4diagram/DiagramXYFlow.d.ts +5 -0
  55. package/dist/likec4diagram/DiagramXYFlow.js +20 -13
  56. package/dist/likec4diagram/custom/edges/EdgeDrifts.js +4 -4
  57. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +1 -1
  58. package/dist/likec4diagram/custom/edges/edges.css.js +13 -13
  59. package/dist/likec4diagram/custom/nodes/NodeDrifts.js +2 -2
  60. package/dist/likec4diagram/custom/nodes/NodeNotes.js +4 -4
  61. package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +2 -2
  62. package/dist/likec4diagram/custom/nodes/SequenceSubFlow.js +8 -5
  63. package/dist/likec4diagram/custom/nodes/nodes.js +2 -2
  64. package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +2 -2
  65. package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +5 -5
  66. package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +1 -1
  67. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +2 -0
  68. package/dist/likec4diagram/relationship-popover/components.d.ts +1 -1
  69. package/dist/likec4diagram/relationship-popover/components.js +6 -2
  70. package/dist/likec4diagram/state/DiagramActorProvider.d.ts +7 -2
  71. package/dist/likec4diagram/state/DiagramActorProvider.js +20 -4
  72. package/dist/likec4diagram/state/diagram-api.d.ts +2 -2
  73. package/dist/likec4diagram/state/diagram-api.js +3 -2
  74. package/dist/likec4diagram/state/machine.actions.js +9 -6
  75. package/dist/likec4diagram/state/machine.actions.layout.d.ts +1 -0
  76. package/dist/likec4diagram/state/machine.actions.layout.js +7 -5
  77. package/dist/likec4diagram/state/machine.setup.d.ts +10 -1
  78. package/dist/likec4diagram/state/machine.setup.js +6 -1
  79. package/dist/likec4diagram/state/machine.state.initializing.d.ts +2 -26
  80. package/dist/likec4diagram/state/machine.state.initializing.js +9 -6
  81. package/dist/likec4diagram/state/machine.state.navigating.js +1 -1
  82. package/dist/likec4diagram/state/machine.state.ready.d.ts +134 -3
  83. package/dist/likec4diagram/state/machine.state.ready.js +2 -1
  84. package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +106 -1
  85. package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +39 -6
  86. package/dist/likec4diagram/state/utils.d.ts +1 -1
  87. package/dist/likec4diagram/state/utils.js +1 -2
  88. package/dist/likec4diagram/ui/LayoutDriftFrame.js +16 -10
  89. package/dist/likec4diagram/ui/index.d.ts +1 -1
  90. package/dist/likec4diagram/ui/notation/NotationPanel.css.js +13 -15
  91. package/dist/likec4diagram/ui/notation/NotationPanel.js +9 -9
  92. package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.d.ts +9 -0
  93. package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.js +81 -0
  94. package/dist/likec4diagram/ui/sequence-outline/FlowRow.d.ts +11 -0
  95. package/dist/likec4diagram/ui/sequence-outline/FlowRow.js +70 -0
  96. package/dist/likec4diagram/ui/sequence-outline/OutlineBody.d.ts +2 -0
  97. package/dist/likec4diagram/ui/sequence-outline/OutlineBody.js +106 -0
  98. package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.d.ts +2 -0
  99. package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.js +140 -0
  100. package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.d.ts +17 -0
  101. package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.js +83 -0
  102. package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.d.ts +4 -0
  103. package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.js +49 -527
  104. package/dist/likec4diagram/ui/sequence-outline/StepBadge.d.ts +8 -0
  105. package/dist/likec4diagram/ui/sequence-outline/StepBadge.js +52 -0
  106. package/dist/likec4diagram/ui/sequence-outline/StepRow.d.ts +7 -0
  107. package/dist/likec4diagram/ui/sequence-outline/StepRow.js +190 -0
  108. package/dist/likec4diagram/ui/sequence-outline/StoreProvider.d.ts +238 -0
  109. package/dist/likec4diagram/ui/sequence-outline/StoreProvider.js +94 -0
  110. package/dist/likec4diagram/ui/sequence-outline/depth-of-field.d.ts +21 -0
  111. package/dist/likec4diagram/ui/sequence-outline/depth-of-field.js +71 -0
  112. package/dist/likec4diagram/ui/sequence-outline/index.d.ts +2 -0
  113. package/dist/likec4diagram/ui/sequence-outline/motion.d.ts +13 -0
  114. package/dist/likec4diagram/ui/sequence-outline/motion.js +21 -0
  115. package/dist/likec4diagram/ui/sequence-outline/presentation.d.ts +10 -0
  116. package/dist/likec4diagram/ui/sequence-outline/presentation.js +80 -0
  117. package/dist/likec4diagram/ui/sequence-outline/tree.d.ts +9 -0
  118. package/dist/likec4diagram/ui/sequence-outline/tree.js +67 -0
  119. package/dist/likec4diagram/ui/sequence-outline/{state.d.ts → types.d.ts} +4 -2
  120. package/dist/likec4diagram/ui/sequence-outline/types.js +12 -0
  121. package/dist/likec4diagram/useLayoutConstraints.js +9 -12
  122. package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.js +1 -0
  123. package/dist/likec4diagram/xyflow-sequence/utils.js +0 -1
  124. package/dist/navigationpanel/NavigationPanel.js +45 -41
  125. package/dist/navigationpanel/NavigationPanelControls.js +102 -63
  126. package/dist/navigationpanel/NavigationPanelDropdown.js +51 -77
  127. package/dist/navigationpanel/_common.d.ts +6 -6
  128. package/dist/navigationpanel/_common.js +31 -42
  129. package/dist/navigationpanel/actor.actions.js +6 -5
  130. package/dist/navigationpanel/actor.js +2 -2
  131. package/dist/navigationpanel/actor.setup.d.ts +6 -6
  132. package/dist/navigationpanel/actor.setup.js +2 -1
  133. package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -4
  134. package/dist/navigationpanel/comparepanel/ComparePanel.js +8 -10
  135. package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
  136. package/dist/navigationpanel/comparepanel/DriftsSummary.js +11 -9
  137. package/dist/navigationpanel/controls/LayoutWarning.js +69 -72
  138. package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
  139. package/dist/navigationpanel/controls/NavigationButtons.js +8 -8
  140. package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
  141. package/dist/navigationpanel/controls/OpenSource.js +5 -8
  142. package/dist/navigationpanel/controls/SearchControl.js +24 -9
  143. package/dist/navigationpanel/controls/ToggleReadonly.d.ts +4 -1
  144. package/dist/navigationpanel/controls/ToggleReadonly.js +56 -76
  145. package/dist/navigationpanel/controls/ViewDetailsButton.d.ts +5 -0
  146. package/dist/navigationpanel/controls/ViewDetailsButton.js +121 -0
  147. package/dist/navigationpanel/controls/index.d.ts +1 -1
  148. package/dist/navigationpanel/dropdown/ProjectsMenu.js +27 -16
  149. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +10 -9
  150. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -8
  151. package/dist/navigationpanel/editorpanel/styles.js +8 -15
  152. package/dist/navigationpanel/hooks.d.ts +6 -2
  153. package/dist/navigationpanel/styles.css.d.ts +2 -2
  154. package/dist/navigationpanel/styles.css.js +0 -1
  155. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -2
  156. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +5 -4
  157. package/dist/navigationpanel/walkthrough/DynamicViewControls.js +9 -36
  158. package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.d.ts +1 -0
  159. package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.js +49 -0
  160. package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +8 -8
  161. package/dist/navigationpanel/windows/ViewDetailsWindow.d.ts +1 -0
  162. package/dist/navigationpanel/windows/ViewDetailsWindow.js +379 -0
  163. package/dist/overlays/Overlays.js +29 -17
  164. package/dist/overlays/element-details/ElementDetailsCard.css.js +28 -36
  165. package/dist/overlays/element-details/ElementDetailsCard.js +1 -1
  166. package/dist/overlays/element-details/MetadataValue.js +18 -16
  167. package/dist/overlays/element-details/TabPanelDeployments.css.js +6 -14
  168. package/dist/overlays/element-details/TabPanelRelationships.css.js +8 -12
  169. package/dist/overlays/element-details/TabPanelStructure.css.js +4 -8
  170. package/dist/overlays/hooks.d.ts +3 -1
  171. package/dist/overlays/overlay/Overlay.js +8 -7
  172. package/dist/overlays/overlaysActor.js +4 -0
  173. package/dist/overlays/relationship-details/SelectEdge.css.js +14 -9
  174. package/dist/overlays/relationship-details/actor.js +1 -1
  175. package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +6 -0
  176. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +11 -6
  177. package/dist/overlays/relationships-browser/SelectElement.css.js +2 -8
  178. package/dist/overlays/relationships-browser/SelectElement.js +5 -1
  179. package/dist/overlays/relationships-browser/actor.js +1 -1
  180. package/dist/overlays/relationships-browser/custom/EmptyNode.js +7 -9
  181. package/dist/projects-overview/actor.js +1 -1
  182. package/dist/search/Search.js +9 -7
  183. package/dist/search/components/ElementsColumn.css.js +6 -5
  184. package/dist/search/components/ElementsColumn.js +4 -3
  185. package/dist/search/components/SearchByTags.js +3 -3
  186. package/dist/search/components/ViewsColum.js +36 -35
  187. package/dist/search/components/ViewsColumn.css.js +4 -4
  188. package/dist/search/components/_shared.css.d.ts +2 -2
  189. package/dist/search/components/_shared.css.js +31 -46
  190. package/dist/search/components/styles.css.js +4 -4
  191. package/dist/shadowroot/ShadowRoot.js +2 -3
  192. package/dist/styles2.js +1 -1
  193. package/dist/utils/index.js +1 -1
  194. package/package.json +10 -10
  195. package/panda.buildinfo.json +340 -298
  196. package/styles-min.css +1 -1
  197. package/styles.css +1 -1
  198. package/dist/context/DefaultMantineProvider.d.ts +0 -2
  199. package/dist/context/DefaultMantineProvider.js +0 -48
  200. package/dist/likec4diagram/ui/sequence-outline/state.js +0 -55
  201. package/dist/navigationpanel/controls/DetailsControls.d.ts +0 -2
  202. package/dist/navigationpanel/controls/DetailsControls.js +0 -224
@@ -27,12 +27,12 @@ function TruncatedValue({ value, isExpanded }) {
27
27
  padding: "xs",
28
28
  userSelect: "all",
29
29
  color: "text",
30
- lineHeight: 1.4,
30
+ lineHeight: "md",
31
31
  whiteSpace: isExpanded ? "pre-wrap" : "nowrap",
32
32
  overflow: isExpanded ? "visible" : "hidden",
33
33
  textOverflow: isExpanded ? "unset" : "ellipsis",
34
34
  wordBreak: isExpanded ? "break-word" : "normal",
35
- minWidth: 0,
35
+ minWidth: "0",
36
36
  width: "100%"
37
37
  }),
38
38
  children: value
@@ -50,16 +50,16 @@ function MultiValueDisplay({ values, isExpanded }) {
50
50
  fontSize: "xs",
51
51
  color: "mantine.gray[5]",
52
52
  fontWeight: "medium",
53
- flexShrink: 0,
53
+ flexShrink: "0",
54
54
  _dark: { color: "mantine.dark[3]" }
55
55
  }),
56
56
  children: "•"
57
57
  }), /* @__PURE__ */ jsx(Box, {
58
58
  className: css({
59
- minHeight: "32px",
59
+ minHeight: "[32px]",
60
60
  display: "flex",
61
61
  alignItems: "center",
62
- flex: 1
62
+ flex: "1"
63
63
  }),
64
64
  children: /* @__PURE__ */ jsx(TruncatedValue, {
65
65
  value,
@@ -70,13 +70,13 @@ function MultiValueDisplay({ values, isExpanded }) {
70
70
  });
71
71
  return /* @__PURE__ */ jsx(Box, {
72
72
  className: css({
73
- minHeight: "32px",
73
+ minHeight: "[32px]",
74
74
  display: "flex",
75
75
  alignItems: "center",
76
76
  padding: "xs",
77
77
  gap: "xs",
78
78
  flexWrap: "wrap",
79
- minWidth: 0,
79
+ minWidth: "0",
80
80
  overflow: "hidden"
81
81
  }),
82
82
  children: values.map((value, index) => /* @__PURE__ */ jsxs(Flex, {
@@ -90,14 +90,15 @@ function MultiValueDisplay({ values, isExpanded }) {
90
90
  backgroundColor: "white",
91
91
  color: "text",
92
92
  borderRadius: "sm",
93
- border: "1px solid",
93
+ borderWidth: "default",
94
+ borderStyle: "solid",
94
95
  borderColor: "mantine.gray[3]",
95
96
  whiteSpace: "nowrap",
96
97
  overflow: "hidden",
97
98
  textOverflow: "ellipsis",
98
- maxWidth: "min(200px, 100%)",
99
- minWidth: "60px",
100
- flex: "0 1 auto",
99
+ maxWidth: "[min(200px, 100%)]",
100
+ minWidth: "[60px]",
101
+ flex: "[0 1 auto]",
101
102
  userSelect: "all",
102
103
  _dark: {
103
104
  backgroundColor: "mantine.dark[9]",
@@ -111,7 +112,7 @@ function MultiValueDisplay({ values, isExpanded }) {
111
112
  fontSize: "xs",
112
113
  color: "mantine.gray[5]",
113
114
  fontWeight: "medium",
114
- flexShrink: 0,
115
+ flexShrink: "0",
115
116
  _dark: { color: "mantine.dark[3]" }
116
117
  }),
117
118
  children: "•"
@@ -141,13 +142,14 @@ function MetadataValue({ label, value }) {
141
142
  padding: "[4px 8px]",
142
143
  borderRadius: "sm",
143
144
  whiteSpace: "nowrap",
144
- transition: "all 150ms ease",
145
+ transitionProperty: "common",
146
+ transition: "medium",
145
147
  _hover: {
146
148
  backgroundColor: "mantine.gray[1]",
147
- color: "mantine.primary[6]",
149
+ color: "primary.body",
148
150
  _dark: {
149
151
  backgroundColor: "mantine.dark[7]",
150
- color: "mantine.primary[4]"
152
+ color: "primary.body.hover"
151
153
  }
152
154
  }
153
155
  }),
@@ -203,7 +205,7 @@ function MetadataValue({ label, value }) {
203
205
  isExpanded
204
206
  }) : /* @__PURE__ */ jsx(Box, {
205
207
  className: css({
206
- minHeight: "32px",
208
+ minHeight: "[32px]",
207
209
  display: "flex",
208
210
  alignItems: "center"
209
211
  }),
@@ -10,14 +10,7 @@ var label = css({
10
10
  transition: "fast",
11
11
  color: "mantine.gray[7]",
12
12
  _dark: { color: "mantine.dark[1]" },
13
- "& > *": { transition: "fast" },
14
- _hover: {
15
- transitionTimingFunction: "out",
16
- "& > :not([data-no-transform])": {
17
- transitionTimingFunction: "out",
18
- transform: "translateX(1px)"
19
- }
20
- }
13
+ "& > *": { transition: "fast" }
21
14
  });
22
15
  var nodeLabel = cx(label);
23
16
  var instanceLabel = cx(label, css({
@@ -25,18 +18,17 @@ var instanceLabel = cx(label, css({
25
18
  width: "100%",
26
19
  justifyContent: "stretch",
27
20
  flexWrap: "nowrap",
28
- height: "36px",
21
+ height: "[36px]",
29
22
  paddingInlineStart: "[16px]",
30
23
  paddingInlineEnd: "2.5",
31
24
  borderRadius: "sm",
32
25
  alignItems: "center",
33
- color: "mantine.gray[7]",
34
- _dark: { color: "mantine.gray.lightColor" },
35
- _hover: { background: "mantine.gray.lightHover" },
26
+ color: "text.default",
27
+ _hover: { background: "surface.hover" },
36
28
  "& .tabler-icon": {
37
29
  transition: "fast",
38
- width: "90%",
39
- opacity: .65
30
+ boxSize: "[90%]",
31
+ opacity: "[0.65]"
40
32
  }
41
33
  }));
42
34
  //#endregion
@@ -8,7 +8,7 @@ var fqn = css({
8
8
  padding: "[3px 6px]",
9
9
  borderRadius: "xs",
10
10
  background: `var(--likec4-palette-fill)/75`,
11
- lineHeight: 1.2,
11
+ lineHeight: "[1.2]",
12
12
  color: "var(--likec4-palette-hiContrast)"
13
13
  });
14
14
  var relationshipStat = css({
@@ -24,17 +24,13 @@ var relationshipStat = css({
24
24
  }
25
25
  });
26
26
  var xyflow = css({
27
- flex: "1 1 100%",
27
+ flex: "[1 1 100%]",
28
28
  position: "relative",
29
29
  width: "100%",
30
30
  height: "100%",
31
- background: "body",
31
+ background: "surface.sunken",
32
32
  border: "default",
33
- borderRadius: "sm",
34
- _light: {
35
- borderColor: "mantine.gray[3]",
36
- background: "mantine.gray[1]"
37
- }
33
+ borderRadius: "sm"
38
34
  });
39
35
  css({
40
36
  _before: {
@@ -46,7 +42,7 @@ css({
46
42
  fontWeight: "medium",
47
43
  lineHeight: "1",
48
44
  color: "text.dimmed",
49
- opacity: .85,
45
+ opacity: "[0.85]",
50
46
  transform: "translateY(-100%) translateY(-2px)"
51
47
  },
52
48
  _light: { "& .mantine-SegmentedControl-root": { background: "mantine.gray[3]" } }
@@ -56,11 +52,11 @@ css({
56
52
  fontSize: "xl",
57
53
  fontWeight: "bold",
58
54
  padding: "[1px 5px]",
59
- minWidth: "24px",
55
+ minWidth: "[24px]",
60
56
  textAlign: "center",
61
57
  borderRadius: "sm",
62
- background: "mantine.dark[7]",
63
- color: "default.color",
58
+ background: "surface.sunken",
59
+ color: "text.default",
64
60
  [`&[data-zero]`]: { color: "text.dimmed" },
65
61
  [`&[data-missing]`]: {
66
62
  color: "mantine.orange[4]",
@@ -7,8 +7,8 @@ var treeNodeLabel = css({
7
7
  var elementLabel = css({
8
8
  display: "inline-flex",
9
9
  transition: "fast",
10
- border: `1px dashed`,
11
- borderColor: "default.border",
10
+ border: "default",
11
+ borderStyle: "dashed",
12
12
  borderRadius: "sm",
13
13
  px: "md",
14
14
  py: "xs",
@@ -20,12 +20,8 @@ var elementLabel = css({
20
20
  _hover: {
21
21
  transitionTimingFunction: "out",
22
22
  borderStyle: "solid",
23
- color: "default.color",
24
- background: "default.hover",
25
- "& > *": {
26
- transitionTimingFunction: "out",
27
- transform: "translateX(1px)"
28
- }
23
+ color: "text.default",
24
+ background: "surface.hover"
29
25
  }
30
26
  });
31
27
  //#endregion
@@ -9,7 +9,9 @@ export declare const OverlaysActorContext: Provider<OverlaysActorRef>, selectOve
9
9
  [key: `elementDetails-${number}`]: import("./types").Overlays.ElementDetails.ActorRef | undefined;
10
10
  [key: `relationshipDetails-${number}`]: import("./types").Overlays.RelationshipDetails.ActorRef | undefined;
11
11
  [key: `relationshipsBrowser-${number}`]: import("./types").Overlays.RelationshipsBrowser.ActorRef | undefined;
12
- }, any, never, any, any, any>) => T, compare: (a: T, b: T) => boolean], useSelectOverlaysActor: {
12
+ }, any, never, any, any, any>) => T, compare: (a: T, b: T) => boolean] & {
13
+ Out: T;
14
+ }, useSelectOverlaysActor: {
13
15
  <T>(select: (state: MachineSnapshot<OverlaysContext, OverlayActorEvent, {
14
16
  [key: `elementDetails-${number}`]: import("./types").Overlays.ElementDetails.ActorRef | undefined;
15
17
  [key: `relationshipDetails-${number}`]: import("./types").Overlays.RelationshipDetails.ActorRef | undefined;
@@ -1,7 +1,7 @@
1
1
  import "../../_virtual/_rolldown/runtime.js";
2
2
  import { stopPropagation } from "../../utils/xyflow.js";
3
3
  import { cx } from "@likec4/styles/css";
4
- import { forwardRef, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
4
+ import { forwardRef, useEffect, useMemo, useRef, useState } from "react";
5
5
  import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
6
6
  import { useTimeoutEffect } from "@react-hookz/web";
7
7
  import { RemoveScroll } from "@mantine/core";
@@ -29,6 +29,11 @@ var Overlay = forwardRef(({ onClose, className, classes, overlayLevel = 0, child
29
29
  }
30
30
  };
31
31
  const isPresent = useIsPresent();
32
+ useEffect(() => {
33
+ const dialog = dialogRef.current;
34
+ if (dialog && !dialog.open) dialog.showModal();
35
+ if (openDelay === 0) setOpened(true);
36
+ }, []);
32
37
  useEffect(() => {
33
38
  if (isPresent) return;
34
39
  const dialog = dialogRef.current;
@@ -37,11 +42,6 @@ var Overlay = forwardRef(({ onClose, className, classes, overlayLevel = 0, child
37
42
  if (dialog?.open) dialog.close();
38
43
  };
39
44
  }, [isPresent]);
40
- useLayoutEffect(() => {
41
- const dialog = dialogRef.current;
42
- if (dialog && !dialog.open) dialog.showModal();
43
- if (openDelay === 0) setOpened(true);
44
- }, []);
45
45
  useTimeoutEffect(() => setOpened(true), openDelay > 0 ? openDelay : void 0);
46
46
  const overlayRecipe = overlay({
47
47
  fullscreen,
@@ -79,7 +79,7 @@ var Overlay = forwardRef(({ onClose, className, classes, overlayLevel = 0, child
79
79
  }
80
80
  }), [overlayLevel, targetBackdropOpacity]);
81
81
  return /* @__PURE__ */ jsx(m.dialog, {
82
- ref: useMergedRef(dialogRef, focusTrapRef, ref),
82
+ ref: useMergedRef(dialogRef, ref),
83
83
  className: cx(classes?.dialog, className, overlayRecipe, fullscreen && RemoveScroll.classNames.fullWidth),
84
84
  layout: true,
85
85
  style: { [cssVarLevel]: overlayLevel },
@@ -103,6 +103,7 @@ var Overlay = forwardRef(({ onClose, className, classes, overlayLevel = 0, child
103
103
  children: /* @__PURE__ */ jsx(RemoveScroll, {
104
104
  forwardProps: true,
105
105
  children: /* @__PURE__ */ jsx("div", {
106
+ ref: focusTrapRef,
106
107
  className: cx(classes?.body, "likec4-overlay-body"),
107
108
  children: opened && /* @__PURE__ */ jsx(Fragment$1, { children })
108
109
  })
@@ -137,6 +137,10 @@ var openRelationshipsBrowser = () => machine.enqueueActions(({ context, enqueue,
137
137
  subject: event.subject,
138
138
  viewId: event.viewId
139
139
  });
140
+ enqueue.sendTo(currentOverlay.id, {
141
+ type: "change.scope",
142
+ scope: event.viewId ? event.scope : "global"
143
+ });
140
144
  return;
141
145
  }
142
146
  const id = `relationshipsBrowser-${context.seq}`;
@@ -8,7 +8,7 @@ var edgeEnpoint = css.raw({
8
8
  color: "text/90",
9
9
  fontSize: "xs",
10
10
  fontWeight: "medium",
11
- lineHeight: "1.2"
11
+ lineHeight: "xs"
12
12
  }
13
13
  });
14
14
  var edgeSource = css({
@@ -25,8 +25,9 @@ var edgeLabel = cx(edgeLabelclass, css({
25
25
  display: "grid",
26
26
  gridColumnStart: 1,
27
27
  gridColumnEnd: 4,
28
- borderBottom: `1px solid`,
29
- borderBottomColor: "default.border",
28
+ borderBottomWidth: "default",
29
+ borderBottomStyle: "solid",
30
+ borderBottomColor: "border.default",
30
31
  marginBottom: "0",
31
32
  padding: "[0 4px 5px 4px]",
32
33
  width: "100%",
@@ -43,28 +44,32 @@ var edgeRow = css({
43
44
  borderBottom: "none",
44
45
  marginBottom: "0"
45
46
  },
46
- "& > *": { transition: "all 0.15s ease-in" },
47
+ "& > *": {
48
+ transitionProperty: "common",
49
+ transition: "medium"
50
+ },
47
51
  "&:is(:hover, [data-selected=true]) > *": {
48
- transition: "all 0.15s ease-out",
52
+ transitionProperty: "common",
53
+ transition: "medium",
49
54
  cursor: "pointer",
50
- backgroundColor: "default.hover"
55
+ backgroundColor: "surface.hover"
51
56
  }
52
57
  });
53
58
  var edgeGrid = css({
54
59
  display: "grid",
55
60
  gridTemplateColumns: "1fr 30px 1fr",
56
- gridAutoRows: "min-content max-content",
61
+ gridAutoRows: "[min-content max-content]",
57
62
  gap: "0",
58
63
  alignItems: "stretch"
59
64
  });
60
65
  css({
61
66
  display: "grid",
62
67
  gridTemplateColumns: "min-content 1fr",
63
- gridAutoRows: "min-content max-content",
68
+ gridAutoRows: "[min-content max-content]",
64
69
  gap: "[10px 12px]",
65
70
  alignItems: "baseline",
66
71
  justifyItems: "start"
67
72
  });
68
- var scrollArea = css({ maxHeight: ["70vh", "calc(100cqh - 70px)"] });
73
+ var scrollArea = css({ maxHeight: ["[70vh]", "[calc(100cqh - 70px)]"] });
69
74
  //#endregion
70
75
  export { edgeArrow, edgeGrid, edgeLabel, edgeRow, edgeSource, edgeTarget, scrollArea };
@@ -1,6 +1,6 @@
1
1
  import "../../_virtual/_rolldown/runtime.js";
2
- import { Base } from "../../base/Base.js";
3
2
  import { MinZoom } from "../../base/const.js";
3
+ import { Base } from "../../base/Base.js";
4
4
  import { updateEdges } from "../../base/updateEdges.js";
5
5
  import { updateNodes } from "../../base/updateNodes.js";
6
6
  import { typedSystem } from "../../likec4diagram/state/utils.js";
@@ -3,3 +3,9 @@ export type RelationshipsBrowserProps = {
3
3
  actorRef: RelationshipsBrowserActorRef;
4
4
  };
5
5
  export declare function RelationshipsBrowser({ actorRef }: RelationshipsBrowserProps): import("react").JSX.Element;
6
+ /**
7
+ * Builds a shareable URL with the relationships parameter.
8
+ * Handles both browser history routing and hash-based routing.
9
+ * Preserves base paths when app is hosted under a sub-path.
10
+ */
11
+ export declare function buildRelationshipUrl(subjectId: string, scope: 'global' | 'view'): string;
@@ -164,7 +164,10 @@ var RelationshipsBrowserInner = memo(() => {
164
164
  children: /* @__PURE__ */ jsxs(Group, {
165
165
  gap: 4,
166
166
  wrap: "nowrap",
167
- children: [/* @__PURE__ */ jsx(CopyLinkButton, { subjectId }), /* @__PURE__ */ jsx(ActionIcon, {
167
+ children: [/* @__PURE__ */ jsx(CopyLinkButton, {
168
+ subjectId,
169
+ scope
170
+ }), /* @__PURE__ */ jsx(ActionIcon, {
168
171
  variant: "default",
169
172
  color: "gray",
170
173
  onClick: (e) => {
@@ -250,15 +253,17 @@ var Tooltip$1 = Tooltip.withProps({
250
253
  * Handles both browser history routing and hash-based routing.
251
254
  * Preserves base paths when app is hosted under a sub-path.
252
255
  */
253
- function buildRelationshipUrl(subjectId) {
256
+ function buildRelationshipUrl(subjectId, scope) {
254
257
  const currentUrl = new URL(window.location.href);
255
258
  if (currentUrl.hash.startsWith("#/")) {
256
259
  const hashUrl = new URL(currentUrl.hash.substring(1), currentUrl.origin);
257
260
  hashUrl.searchParams.set("relationships", subjectId);
261
+ hashUrl.searchParams.set("relationshipsScope", scope);
258
262
  const cleanPath = hashUrl.pathname.replace(/\/$/, "");
259
263
  return `${currentUrl.origin}${currentUrl.pathname}${currentUrl.search}#${cleanPath}${hashUrl.search}`;
260
264
  }
261
265
  currentUrl.searchParams.set("relationships", subjectId);
266
+ currentUrl.searchParams.set("relationshipsScope", scope);
262
267
  return currentUrl.href;
263
268
  }
264
269
  /**
@@ -266,7 +271,7 @@ function buildRelationshipUrl(subjectId) {
266
271
  * Shows visual feedback for both success and failure states.
267
272
  * Note: Clipboard API requires HTTPS or localhost. This is a browser security restriction, not a code issue.
268
273
  */
269
- var CopyLinkButton = ({ subjectId }) => {
274
+ var CopyLinkButton = ({ subjectId, scope }) => {
270
275
  const clipboard = useClipboard({ timeout: 2e3 });
271
276
  const [copyError, setCopyError] = useState(false);
272
277
  const errorTimeoutRef = useRef(null);
@@ -277,7 +282,7 @@ var CopyLinkButton = ({ subjectId }) => {
277
282
  clearTimeout(errorTimeoutRef.current);
278
283
  errorTimeoutRef.current = null;
279
284
  }
280
- const url = buildRelationshipUrl(subjectId);
285
+ const url = buildRelationshipUrl(subjectId, scope);
281
286
  if (!window.isSecureContext) {
282
287
  setCopyError(true);
283
288
  errorTimeoutRef.current = window.setTimeout(() => {
@@ -325,10 +330,10 @@ var CopyLinkButton = ({ subjectId }) => {
325
330
  variant: "default",
326
331
  color: "gray",
327
332
  onClick: handleCopy,
328
- "aria-label": "Copy link to this relationship view",
333
+ "aria-label": "Copy relationship URL",
329
334
  children: buttonState.icon
330
335
  })
331
336
  });
332
337
  };
333
338
  //#endregion
334
- export { RelationshipsBrowser };
339
+ export { RelationshipsBrowser, buildRelationshipUrl };
@@ -7,13 +7,7 @@ var SelectElement_css_exports = /* @__PURE__ */ __exportAll({
7
7
  scrollArea: () => scrollArea
8
8
  });
9
9
  var node = css({ margin: "0" });
10
- var label = css({ _hover: {
11
- backgroundColor: "mantine.gray[0]",
12
- _dark: {
13
- backgroundColor: "default.hover",
14
- color: "white"
15
- }
16
- } });
17
- var scrollArea = css({ maxHeight: ["70vh", "calc(100cqh - 70px)"] });
10
+ var label = css({ _hover: { backgroundColor: "surface.hover" } });
11
+ var scrollArea = css({ maxHeight: ["[70vh]", "[calc(100cqh - 70px)]"] });
18
12
  //#endregion
19
13
  export { SelectElement_css_exports, label, node, scrollArea };
@@ -1,4 +1,5 @@
1
1
  import "../../_virtual/_rolldown/runtime.js";
2
+ import { useDiagramEventHandlers } from "../../context/DiagramEventHandlers.js";
2
3
  import { useLikeC4Model } from "../../hooks/useLikeC4Model.js";
3
4
  import { useRelationshipsBrowser, useRelationshipsBrowserState } from "./hooks.js";
4
5
  import { useLikeC4ElementsTree } from "../../hooks/useLikeC4ElementsTree.js";
@@ -22,6 +23,7 @@ var selector2 = (state) => {
22
23
  };
23
24
  var SelectElement = memo(() => {
24
25
  const browser = useRelationshipsBrowser();
26
+ const { onRelationshipBrowserScopeChange } = useDiagramEventHandlers();
25
27
  const { subjectId, viewId, scope, subjectExistsInScope, enableSelectSubject, enableChangeScope } = useRelationshipsBrowserState(selector2);
26
28
  const root = useRef(null);
27
29
  const viewport = useRef(null);
@@ -176,7 +178,9 @@ var SelectElement = memo(() => {
176
178
  paddingRight: 8
177
179
  } },
178
180
  onChange: (value) => {
179
- browser.changeScope(value);
181
+ const nextScope = value;
182
+ browser.changeScope(nextScope);
183
+ onRelationshipBrowserScopeChange?.(nextScope);
180
184
  },
181
185
  data: [{
182
186
  label: "Global",
@@ -1,7 +1,7 @@
1
1
  import "../../_virtual/_rolldown/runtime.js";
2
+ import { MinZoom, ZIndexes } from "../../base/const.js";
2
3
  import { getNodeCenter } from "../../utils/xyflow.js";
3
4
  import { Base } from "../../base/Base.js";
4
- import { MinZoom, ZIndexes } from "../../base/const.js";
5
5
  import { updateEdges } from "../../base/updateEdges.js";
6
6
  import { updateNodes } from "../../base/updateNodes.js";
7
7
  import { typedSystem } from "../../likec4diagram/state/utils.js";
@@ -1,24 +1,22 @@
1
1
  import "../../../_virtual/_rolldown/runtime.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { Text } from "@mantine/core";
4
- import { Box as Box$1 } from "@likec4/styles/jsx";
3
+ import { Box, Txt } from "@likec4/styles/jsx";
5
4
  //#region src/overlays/relationships-browser/custom/EmptyNode.tsx
6
5
  function EmptyNode({ data: { column } }) {
7
- return /* @__PURE__ */ jsx(Box$1, {
6
+ return /* @__PURE__ */ jsx(Box, {
8
7
  css: {
9
8
  width: "100%",
10
9
  height: "100%",
11
- border: `3px dashed`,
12
- borderColor: `default.border`,
10
+ border: `[3px dashed {colors.border.default}]`,
13
11
  borderRadius: "md",
14
12
  display: "flex",
15
13
  justifyContent: "center",
16
14
  alignItems: "center"
17
15
  },
18
- children: /* @__PURE__ */ jsxs(Text, {
19
- c: "dimmed",
20
- fz: "lg",
21
- fw: 500,
16
+ children: /* @__PURE__ */ jsxs(Txt, {
17
+ textStyle: "dimmed",
18
+ fontSize: "lg",
19
+ medium: true,
22
20
  children: ["No ", column === "incomers" ? "incoming" : "outgoing"]
23
21
  })
24
22
  });
@@ -1,6 +1,6 @@
1
1
  import "../_virtual/_rolldown/runtime.js";
2
- import { Base } from "../base/Base.js";
3
2
  import { MinZoom } from "../base/const.js";
3
+ import { Base } from "../base/Base.js";
4
4
  import { layoutedProjectsViewToXYFlow } from "./layouted-to-xyflow.js";
5
5
  import { ProjectsOverviewViewportPersistence } from "./persistence.js";
6
6
  import { applyEdgeChanges, applyNodeChanges, getViewportForBounds } from "@xyflow/react";
@@ -80,7 +80,7 @@ var Search = memo(({ searchActorRef }) => {
80
80
  ]]);
81
81
  return /* @__PURE__ */ jsx(AnimatePresence, {
82
82
  onExitComplete: () => {
83
- diagram.searchActor().send({ type: "animation.presence.end" });
83
+ searchActorRef.send({ type: "animation.presence.end" });
84
84
  },
85
85
  children: isOpened && /* @__PURE__ */ jsx(Overlay, {
86
86
  fullscreen: true,
@@ -90,7 +90,7 @@ var Search = memo(({ searchActorRef }) => {
90
90
  dialog: dialogCss,
91
91
  body: bodyCss
92
92
  },
93
- openDelay: 0,
93
+ openDelay: 100,
94
94
  onClose: close,
95
95
  "data-likec4-search": "true",
96
96
  children: /* @__PURE__ */ jsx(XStateSearchAdapter, {
@@ -127,7 +127,7 @@ var SearchPanelContent = forwardRef((_, ref) => {
127
127
  moveFocusToSearchInput(contentRef.current);
128
128
  },
129
129
  children: /* @__PURE__ */ jsxs(VStack, {
130
- flex: 1,
130
+ flex: "1",
131
131
  px: "sm",
132
132
  children: [/* @__PURE__ */ jsx(LikeC4SearchInput, {}), /* @__PURE__ */ jsx(SearchByTags, {})]
133
133
  })
@@ -138,7 +138,7 @@ var SearchPanelContent = forwardRef((_, ref) => {
138
138
  component: "div",
139
139
  order: 6,
140
140
  c: "dimmed",
141
- pl: "sm",
141
+ pl: "md",
142
142
  children: "Elements"
143
143
  })
144
144
  }), /* @__PURE__ */ jsx(GridCol, {
@@ -168,8 +168,7 @@ var SearchPanelContent = forwardRef((_, ref) => {
168
168
  children: /* @__PURE__ */ jsx(LayoutGroup, {
169
169
  id: "likec4-search-elements",
170
170
  children: /* @__PURE__ */ jsx(AnimatePresence, {
171
- mode: "popLayout",
172
- anchorY: "top",
171
+ initial: false,
173
172
  children: /* @__PURE__ */ jsx(ElementsColumn, {})
174
173
  })
175
174
  })
@@ -183,7 +182,10 @@ var SearchPanelContent = forwardRef((_, ref) => {
183
182
  scrollbars: "y",
184
183
  children: /* @__PURE__ */ jsx(LayoutGroup, {
185
184
  id: "likec4-search-views",
186
- children: /* @__PURE__ */ jsx(ViewsColumn, {})
185
+ children: /* @__PURE__ */ jsx(AnimatePresence, {
186
+ initial: false,
187
+ children: /* @__PURE__ */ jsx(ViewsColumn, {})
188
+ })
187
189
  })
188
190
  })
189
191
  })]
@@ -9,6 +9,7 @@ var treeNode = css({
9
9
  });
10
10
  var treeRoot = css(container.raw({ containerName: "likec4-tree" }), {
11
11
  containerType: "inline-size",
12
+ px: "4",
12
13
  height: "100%"
13
14
  });
14
15
  var treeLabel = css({
@@ -25,8 +26,8 @@ var elementTitleAndId = css({ [whenContainerIsNarrow]: {
25
26
  gap: "0.5"
26
27
  } });
27
28
  var elementId = css({
28
- fontSize: "10px",
29
- lineHeight: "1.3",
29
+ fontSize: "xxs",
30
+ lineHeight: "sm",
30
31
  display: "block",
31
32
  fontWeight: "medium",
32
33
  whiteSpace: "nowrap",
@@ -40,11 +41,11 @@ var elementIcon = css({
40
41
  [whenContainerIsNarrow]: { ["--likec4-icon-size"]: "18px" }
41
42
  });
42
43
  var elementViewsCount = css({
43
- flex: 0,
44
- fontSize: "10px",
44
+ flex: "[0]",
45
+ fontSize: "xxs",
45
46
  fontWeight: "medium",
46
47
  whiteSpace: "nowrap",
47
- lineHeight: "1.1",
48
+ lineHeight: "[1.1]",
48
49
  [whenContainerIsNarrow]: { display: "none" }
49
50
  });
50
51
  //#endregion
@@ -167,11 +167,12 @@ function ElementTreeNode({ node, elementProps, expanded, handleClick, searchTerm
167
167
  });
168
168
  const key = `@tree.${node.value}`;
169
169
  return /* @__PURE__ */ jsxs(m.div, {
170
+ layout: "position",
170
171
  layoutId: key,
171
172
  ...elementProps,
172
173
  children: [/* @__PURE__ */ jsx(ActionIcon, {
173
174
  variant: "transparent",
174
- size: 16,
175
+ size: 20,
175
176
  tabIndex: -1,
176
177
  className: cx(elementExpandIcon),
177
178
  style: { visibility: node.hasChildren ? "visible" : "hidden" },
@@ -179,8 +180,7 @@ function ElementTreeNode({ node, elementProps, expanded, handleClick, searchTerm
179
180
  stroke: 3.5,
180
181
  style: {
181
182
  transition: "transform 150ms ease",
182
- transform: `rotate(${expanded ? "90deg" : "0"})`,
183
- width: "100%"
183
+ transform: `rotate(${expanded ? "90deg" : "0"})`
184
184
  }
185
185
  })
186
186
  }), /* @__PURE__ */ jsxs(UnstyledButton, {
@@ -208,6 +208,7 @@ function ElementTreeNode({ node, elementProps, expanded, handleClick, searchTerm
208
208
  component: "div",
209
209
  highlight: searchTerms,
210
210
  className: btn.title,
211
+ lineClamp: 1,
211
212
  children: label
212
213
  }), /* @__PURE__ */ jsx(Tooltip, {
213
214
  label: element.id,