@likec4/diagram 1.35.0 → 1.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/bundle/{chunk-C0Eg81Gj.js → chunk-DHvr-RGh.js} +323 -311
  2. package/bundle/custom.js +52 -52
  3. package/bundle/index.js +1594 -749
  4. package/dist/LikeC4Diagram.js +6 -6
  5. package/dist/LikeC4Diagram.props.d.ts +2 -3
  6. package/dist/LikeC4ModelProvider.d.ts +3 -3
  7. package/dist/LikeC4ProjectsProvider.d.ts +17 -0
  8. package/dist/LikeC4ProjectsProvider.js +22 -0
  9. package/dist/LikeC4Styles.d.ts +1 -0
  10. package/dist/LikeC4Styles.js +94 -0
  11. package/dist/StaticLikeC4Diagram.d.ts +3 -3
  12. package/dist/base/BaseXYFlow.js +23 -26
  13. package/dist/base/primitives/MarkdownBlock.d.ts +7 -1
  14. package/dist/base/primitives/MarkdownBlock.js +1 -1
  15. package/dist/base/primitives/compound/CompoundActionButton.js +2 -2
  16. package/dist/base/primitives/compound/CompoundDetailsButton.js +2 -2
  17. package/dist/base/primitives/compound/CompoundNodeContainer.css.js +4 -4
  18. package/dist/base/primitives/compound/CompoundNodeContainer.js +1 -4
  19. package/dist/base/primitives/compound/CompoundTitle.js +9 -8
  20. package/dist/base/primitives/compound/actionbtns.css.js +6 -6
  21. package/dist/base/primitives/edge/EdgeActionButton.js +2 -2
  22. package/dist/base/primitives/edge/EdgeContainer.js +4 -7
  23. package/dist/base/primitives/edge/EdgeLabel.css.d.ts +0 -22
  24. package/dist/base/primitives/edge/EdgeLabel.css.js +6 -84
  25. package/dist/base/primitives/edge/EdgeLabel.js +16 -6
  26. package/dist/base/primitives/edge/EdgeLabelContainer.js +1 -6
  27. package/dist/base/primitives/edge/EdgeMarkers.js +3 -3
  28. package/dist/base/primitives/edge/edge.css.d.ts +0 -2
  29. package/dist/base/primitives/edge/edge.css.js +1 -55
  30. package/dist/base/primitives/element/ElementActionButtons.js +2 -2
  31. package/dist/base/primitives/element/ElementDetailsButton.js +8 -7
  32. package/dist/base/primitives/element/ElementNodeContainer.css.js +4 -4
  33. package/dist/base/primitives/element/ElementNodeContainer.js +1 -4
  34. package/dist/base/primitives/element/ElementShape.css.js +11 -11
  35. package/dist/base/primitives/element/ElementTags.d.ts +1 -0
  36. package/dist/base/primitives/element/ElementTags.js +17 -14
  37. package/dist/bundle/LikeC4View.d.ts +1 -1
  38. package/dist/bundle/LikeC4View.js +7 -1
  39. package/dist/bundle/LikeC4View.props.d.ts +1 -2
  40. package/dist/bundle/ReactLikeC4.d.ts +1 -1
  41. package/dist/bundle/ViewNotFound.js +1 -1
  42. package/dist/bundle/index.d.ts +2 -1
  43. package/dist/bundle/index.js +1 -0
  44. package/dist/bundle/styles.css.js +1 -1
  45. package/dist/components/ErrorFallback.js +1 -1
  46. package/dist/components/GithubIcon.d.ts +2 -0
  47. package/dist/components/GithubIcon.js +17 -0
  48. package/dist/components/Link.d.ts +4 -3
  49. package/dist/components/Link.js +84 -87
  50. package/dist/components/NavigationLink.d.ts +2 -2
  51. package/dist/components/SearchControl.css.js +6 -5
  52. package/dist/context/DiagramEventHandlers.d.ts +6 -6
  53. package/dist/context/DiagramEventHandlers.js +4 -7
  54. package/dist/globals.css.js +3 -0
  55. package/dist/hooks/useXYFlow.d.ts +10 -10
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.js +1 -0
  58. package/dist/likec4diagram/DiagramUI.js +2 -1
  59. package/dist/likec4diagram/custom/edges/NotePopover.css.js +2 -2
  60. package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +2 -2
  61. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +1 -1
  62. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.js +7 -7
  63. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +3 -3
  64. package/dist/likec4diagram/custom/edges/edges.css.js +4 -4
  65. package/dist/likec4diagram/custom/index.d.ts +2 -2
  66. package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +2 -2
  67. package/dist/likec4diagram/ui/controls/styles.css.js +5 -5
  68. package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +4 -4
  69. package/dist/likec4diagram/ui/notation/NotationPanel.css.js +11 -11
  70. package/dist/likec4diagram/ui/notation/NotationPanel.js +2 -5
  71. package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.css.js +10 -10
  72. package/dist/likec4model/LikeC4ModelContext.d.ts +2 -1
  73. package/dist/likec4model/LikeC4ModelContext.js +10 -2
  74. package/dist/likec4model/LikeC4ProjectsContext.d.ts +7 -0
  75. package/dist/likec4model/LikeC4ProjectsContext.js +5 -0
  76. package/dist/likec4model/index.d.ts +1 -0
  77. package/dist/likec4model/useCurrentViewModel.d.ts +1 -0
  78. package/dist/likec4model/useCurrentViewModel.js +4 -1
  79. package/dist/likec4model/useLikeC4Project.d.ts +22 -0
  80. package/dist/likec4model/useLikeC4Project.js +23 -0
  81. package/dist/navigationpanel/NavigationPanel.js +15 -17
  82. package/dist/navigationpanel/NavigationPanelControls.js +34 -21
  83. package/dist/navigationpanel/NavigationPanelDropdown.js +33 -17
  84. package/dist/navigationpanel/_common.js +4 -1
  85. package/dist/navigationpanel/actor.d.ts +11 -15
  86. package/dist/navigationpanel/actor.js +14 -15
  87. package/dist/navigationpanel/controls/BurgerButton.js +5 -7
  88. package/dist/navigationpanel/controls/NavigationButtons.js +37 -24
  89. package/dist/navigationpanel/controls/OpenSource.js +1 -1
  90. package/dist/navigationpanel/controls/SearchControl.js +6 -4
  91. package/dist/navigationpanel/controls/ToggleReadonly.js +3 -3
  92. package/dist/navigationpanel/controls/ViewDetailsCard.d.ts +2 -0
  93. package/dist/navigationpanel/controls/ViewDetailsCard.js +232 -0
  94. package/dist/navigationpanel/controls/index.d.ts +1 -0
  95. package/dist/navigationpanel/dropdown/ProjectsMenu.d.ts +2 -0
  96. package/dist/navigationpanel/dropdown/ProjectsMenu.js +75 -0
  97. package/dist/navigationpanel/editorpanel/EditorPanel.js +3 -3
  98. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +19 -20
  99. package/dist/navigationpanel/editorpanel/styles.js +5 -5
  100. package/dist/navigationpanel/hooks.d.ts +2 -2
  101. package/dist/navigationpanel/styles.css.js +0 -2
  102. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +12 -7
  103. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +14 -0
  104. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +14 -0
  105. package/dist/overlays/element-details/ElementDetailsCard.css.js +18 -17
  106. package/dist/overlays/element-details/ElementDetailsCard.js +8 -13
  107. package/dist/overlays/element-details/TabPanelDeployments.css.js +5 -4
  108. package/dist/overlays/element-details/TabPanelRelationships.css.js +7 -7
  109. package/dist/overlays/overlay/Overlay.css.d.ts +3 -3
  110. package/dist/overlays/overlay/Overlay.css.js +8 -7
  111. package/dist/overlays/relationship-details/SelectEdge.css.js +8 -8
  112. package/dist/overlays/relationships-browser/SelectElement.css.js +1 -1
  113. package/dist/search/Search.js +6 -6
  114. package/dist/search/components/ElementsColumn.css.js +5 -5
  115. package/dist/search/components/SearchByTags.js +3 -2
  116. package/dist/search/components/ViewsColum.js +1 -1
  117. package/dist/search/components/ViewsColumn.css.js +1 -1
  118. package/dist/search/components/_shared.css.js +3 -3
  119. package/dist/search/components/styles.css.js +5 -5
  120. package/dist/state/DiagramActorProvider.js +43 -25
  121. package/dist/state/diagram-machine.d.ts +29 -247
  122. package/dist/state/diagram-machine.js +16 -16
  123. package/dist/styles-min.css +1 -1
  124. package/dist/styles.css +1 -1
  125. package/dist/styles.css2.js +1 -1
  126. package/package.json +10 -8
  127. package/panda.buildinfo.json +254 -326
  128. package/src/LikeC4Diagram.props.ts +2 -2
  129. package/src/LikeC4Diagram.tsx +2 -2
  130. package/src/LikeC4ModelProvider.tsx +4 -4
  131. package/src/LikeC4ProjectsProvider.tsx +41 -0
  132. package/src/LikeC4Styles.tsx +107 -0
  133. package/src/StaticLikeC4Diagram.tsx +3 -3
  134. package/src/base/BaseXYFlow.tsx +24 -29
  135. package/src/base/primitives/MarkdownBlock.tsx +11 -3
  136. package/src/base/primitives/compound/CompoundActionButton.tsx +2 -2
  137. package/src/base/primitives/compound/CompoundDetailsButton.tsx +2 -2
  138. package/src/base/primitives/compound/CompoundNodeContainer.css.ts +4 -13
  139. package/src/base/primitives/compound/CompoundNodeContainer.tsx +0 -3
  140. package/src/base/primitives/compound/CompoundTitle.tsx +8 -8
  141. package/src/base/primitives/compound/actionbtns.css.ts +6 -6
  142. package/src/base/primitives/edge/EdgeActionButton.tsx +2 -2
  143. package/src/base/primitives/edge/EdgeContainer.tsx +3 -6
  144. package/src/base/primitives/edge/EdgeLabel.css.ts +4 -83
  145. package/src/base/primitives/edge/EdgeLabel.tsx +16 -10
  146. package/src/base/primitives/edge/EdgeLabelContainer.tsx +1 -6
  147. package/src/base/primitives/edge/EdgeMarkers.tsx +3 -3
  148. package/src/base/primitives/edge/edge.css.ts +0 -60
  149. package/src/base/primitives/element/ElementActionButtons.tsx +2 -2
  150. package/src/base/primitives/element/ElementDetailsButton.tsx +7 -7
  151. package/src/base/primitives/element/ElementNodeContainer.css.ts +4 -4
  152. package/src/base/primitives/element/ElementNodeContainer.tsx +0 -3
  153. package/src/base/primitives/element/ElementShape.css.ts +11 -11
  154. package/src/base/primitives/element/ElementTags.tsx +17 -14
  155. package/src/bundle/LikeC4View.props.ts +1 -2
  156. package/src/bundle/LikeC4View.tsx +10 -3
  157. package/src/bundle/ReactLikeC4.tsx +1 -2
  158. package/src/bundle/ViewNotFound.tsx +1 -1
  159. package/src/bundle/index.ts +2 -1
  160. package/src/bundle/styles.css.ts +1 -1
  161. package/src/components/ErrorFallback.tsx +1 -1
  162. package/src/components/GithubIcon.tsx +16 -0
  163. package/src/components/Link.tsx +102 -113
  164. package/src/components/NavigationLink.tsx +2 -1
  165. package/src/components/SearchControl.css.ts +5 -5
  166. package/src/context/DiagramEventHandlers.tsx +12 -12
  167. package/src/globals.css +71 -0
  168. package/src/index.ts +5 -0
  169. package/src/likec4diagram/DiagramUI.tsx +8 -2
  170. package/src/likec4diagram/custom/edges/NotePopover.css.ts +2 -2
  171. package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +1 -1
  172. package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.ts +7 -7
  173. package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +3 -3
  174. package/src/likec4diagram/custom/edges/edges.css.ts +4 -4
  175. package/src/likec4diagram/custom/nodes/toolbar/CompoundToolbar.tsx +2 -2
  176. package/src/likec4diagram/ui/controls/styles.css.ts +5 -5
  177. package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +4 -5
  178. package/src/likec4diagram/ui/notation/NotationPanel.css.ts +11 -11
  179. package/src/likec4diagram/ui/notation/NotationPanel.tsx +1 -4
  180. package/src/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.css.ts +10 -10
  181. package/src/likec4model/{LikeC4ModelContext.ts → LikeC4ModelContext.tsx} +9 -1
  182. package/src/likec4model/LikeC4ProjectsContext.ts +9 -0
  183. package/src/likec4model/index.ts +8 -0
  184. package/src/likec4model/useCurrentViewModel.ts +4 -0
  185. package/src/likec4model/useLikeC4Project.ts +61 -0
  186. package/src/navigationpanel/NavigationPanel.tsx +16 -17
  187. package/src/navigationpanel/NavigationPanelControls.tsx +24 -46
  188. package/src/navigationpanel/NavigationPanelDropdown.tsx +32 -16
  189. package/src/navigationpanel/_common.tsx +4 -1
  190. package/src/navigationpanel/actor.ts +14 -15
  191. package/src/navigationpanel/controls/BurgerButton.tsx +5 -7
  192. package/src/navigationpanel/controls/NavigationButtons.tsx +9 -1
  193. package/src/navigationpanel/controls/OpenSource.tsx +1 -1
  194. package/src/navigationpanel/controls/SearchControl.tsx +6 -4
  195. package/src/navigationpanel/controls/ToggleReadonly.tsx +3 -3
  196. package/src/navigationpanel/controls/ViewDetailsCard.tsx +244 -0
  197. package/src/navigationpanel/controls/index.ts +1 -0
  198. package/src/navigationpanel/dropdown/ProjectsMenu.tsx +74 -0
  199. package/src/navigationpanel/editorpanel/EditorPanel.tsx +3 -3
  200. package/src/navigationpanel/editorpanel/ManualLayoutToolsButton.tsx +19 -22
  201. package/src/navigationpanel/editorpanel/styles.ts +5 -5
  202. package/src/navigationpanel/hooks.tsx +2 -2
  203. package/src/navigationpanel/styles.css.ts +0 -2
  204. package/src/navigationpanel/walkthrough/ActiveWalkthroughControls.tsx +9 -4
  205. package/src/overlays/element-details/ElementDetailsCard.css.ts +17 -17
  206. package/src/overlays/element-details/ElementDetailsCard.tsx +8 -13
  207. package/src/overlays/element-details/TabPanelDeployments.css.ts +4 -4
  208. package/src/overlays/element-details/TabPanelRelationships.css.ts +7 -7
  209. package/src/overlays/overlay/Overlay.css.ts +7 -7
  210. package/src/overlays/relationship-details/SelectEdge.css.ts +8 -8
  211. package/src/overlays/relationships-browser/SelectElement.css.ts +1 -1
  212. package/src/search/Search.tsx +6 -6
  213. package/src/search/components/ElementsColumn.css.ts +5 -5
  214. package/src/search/components/SearchByTags.tsx +2 -2
  215. package/src/search/components/ViewsColum.tsx +1 -1
  216. package/src/search/components/ViewsColumn.css.ts +1 -1
  217. package/src/search/components/_shared.css.ts +3 -3
  218. package/src/search/components/styles.css.ts +5 -5
  219. package/src/state/DiagramActorProvider.tsx +56 -30
  220. package/src/state/diagram-machine.ts +22 -16
  221. package/dist/LikeC4CustomColors.d.ts +0 -2
  222. package/dist/LikeC4CustomColors.js +0 -45
  223. package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +0 -45
  224. package/src/LikeC4CustomColors.tsx +0 -85
@@ -1,8 +1,9 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { css } from '@likec4/styles/css';
3
3
  import { hstack } from '@likec4/styles/patterns';
4
- import { Popover, PopoverTarget, PopoverDropdown, TooltipGroup, ActionIcon } from '@mantine/core';
4
+ import { Popover, PopoverTarget, PopoverDropdown, TooltipGroup } from '@mantine/core';
5
5
  import { useDiagram } from '../../hooks/useDiagram.js';
6
+ import { useMantinePortalProps } from '../../hooks/useMantinePortalProps.js';
6
7
  import { PanelActionIcon } from '../_common.js';
7
8
  import { Tooltip } from './_common.js';
8
9
  import IconLayoutCollage from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js';
@@ -20,7 +21,7 @@ const Action = ({
20
21
  icon,
21
22
  onClick
22
23
  }) => /* @__PURE__ */ jsx(Tooltip, { label, withinPortal: false, position: "top", children: /* @__PURE__ */ jsx(
23
- ActionIcon,
24
+ PanelActionIcon,
24
25
  {
25
26
  classNames: {
26
27
  root: "action-icon",
@@ -31,27 +32,24 @@ const Action = ({
31
32
  }
32
33
  })
33
34
  },
34
- variant: "subtle",
35
- color: "gray",
36
35
  onClick,
37
36
  children: icon
38
37
  }
39
38
  ) });
40
39
  const ManualLayoutToolsButton = (props) => {
41
40
  const diagram = useDiagram();
41
+ const portalProps = useMantinePortalProps();
42
42
  return /* @__PURE__ */ jsxs(
43
43
  Popover,
44
44
  {
45
- position: "right-start",
45
+ position: "right",
46
46
  offset: {
47
- mainAxis: 10,
48
- crossAxis: -2
47
+ mainAxis: 12
49
48
  },
50
49
  clickOutsideEvents: [
51
50
  "pointerdown"
52
51
  ],
53
- radius: "sm",
54
- shadow: "lg",
52
+ ...portalProps,
55
53
  ...props,
56
54
  children: [
57
55
  /* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(Tooltip, { label: "Manual layouting tools", children: /* @__PURE__ */ jsx(PanelActionIcon, { children: /* @__PURE__ */ jsx(IconLayoutCollage, {}) }) }) }),
@@ -59,16 +57,17 @@ const ManualLayoutToolsButton = (props) => {
59
57
  PopoverDropdown,
60
58
  {
61
59
  className: hstack({
62
- gap: 1,
60
+ gap: "0.5",
63
61
  layerStyle: "likec4.panel",
64
- p: "2"
62
+ padding: "1",
63
+ pointerEvents: "all"
65
64
  }),
66
65
  children: /* @__PURE__ */ jsxs(TooltipGroup, { children: [
67
66
  /* @__PURE__ */ jsx(
68
67
  Action,
69
68
  {
70
69
  label: "Align in columns",
71
- icon: /* @__PURE__ */ jsx(IconLayoutBoardSplit, { stroke: 1.2 }),
70
+ icon: /* @__PURE__ */ jsx(IconLayoutBoardSplit, {}),
72
71
  onClick: (e) => {
73
72
  e.stopPropagation();
74
73
  diagram.align("Column");
@@ -79,7 +78,7 @@ const ManualLayoutToolsButton = (props) => {
79
78
  Action,
80
79
  {
81
80
  label: "Align left",
82
- icon: /* @__PURE__ */ jsx(IconLayoutAlignLeft, { stroke: 1.5 }),
81
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignLeft, {}),
83
82
  onClick: (e) => {
84
83
  e.stopPropagation();
85
84
  diagram.align("Left");
@@ -90,7 +89,7 @@ const ManualLayoutToolsButton = (props) => {
90
89
  Action,
91
90
  {
92
91
  label: "Align center",
93
- icon: /* @__PURE__ */ jsx(IconLayoutAlignCenter, { stroke: 1.5 }),
92
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignCenter, {}),
94
93
  onClick: (e) => {
95
94
  e.stopPropagation();
96
95
  diagram.align("Center");
@@ -101,7 +100,7 @@ const ManualLayoutToolsButton = (props) => {
101
100
  Action,
102
101
  {
103
102
  label: "Align right",
104
- icon: /* @__PURE__ */ jsx(IconLayoutAlignRight, { stroke: 1.5 }),
103
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignRight, {}),
105
104
  onClick: (e) => {
106
105
  e.stopPropagation();
107
106
  diagram.align("Right");
@@ -112,7 +111,7 @@ const ManualLayoutToolsButton = (props) => {
112
111
  Action,
113
112
  {
114
113
  label: "Align in rows",
115
- icon: /* @__PURE__ */ jsx(IconLayoutBoardSplit, { stroke: 1.5, style: { transform: "rotate(90deg)" } }),
114
+ icon: /* @__PURE__ */ jsx(IconLayoutBoardSplit, { style: { transform: "rotate(90deg)" } }),
116
115
  onClick: (e) => {
117
116
  e.stopPropagation();
118
117
  diagram.align("Row");
@@ -123,7 +122,7 @@ const ManualLayoutToolsButton = (props) => {
123
122
  Action,
124
123
  {
125
124
  label: "Align top",
126
- icon: /* @__PURE__ */ jsx(IconLayoutAlignTop, { stroke: 1.5 }),
125
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignTop, {}),
127
126
  onClick: (e) => {
128
127
  e.stopPropagation();
129
128
  diagram.align("Top");
@@ -134,7 +133,7 @@ const ManualLayoutToolsButton = (props) => {
134
133
  Action,
135
134
  {
136
135
  label: "Align middle",
137
- icon: /* @__PURE__ */ jsx(IconLayoutAlignMiddle, { stroke: 1.5 }),
136
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignMiddle, {}),
138
137
  onClick: (e) => {
139
138
  e.stopPropagation();
140
139
  diagram.align("Middle");
@@ -145,7 +144,7 @@ const ManualLayoutToolsButton = (props) => {
145
144
  Action,
146
145
  {
147
146
  label: "Align bottom",
148
- icon: /* @__PURE__ */ jsx(IconLayoutAlignBottom, { stroke: 1.5 }),
147
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignBottom, {}),
149
148
  onClick: (e) => {
150
149
  e.stopPropagation();
151
150
  diagram.align("Bottom");
@@ -156,7 +155,7 @@ const ManualLayoutToolsButton = (props) => {
156
155
  Action,
157
156
  {
158
157
  label: "Reset all control points",
159
- icon: /* @__PURE__ */ jsx(IconRouteOff, { stroke: 1.5 }),
158
+ icon: /* @__PURE__ */ jsx(IconRouteOff, {}),
160
159
  onClick: (e) => {
161
160
  e.stopPropagation();
162
161
  diagram.resetEdgeControlPoints();
@@ -1,15 +1,15 @@
1
1
  import { css } from '@likec4/styles/css';
2
2
 
3
3
  css({
4
- gap: "micro",
4
+ gap: "xxs",
5
5
  _empty: {
6
6
  display: "none"
7
7
  }
8
8
  });
9
9
  css({
10
- top: "1rem",
11
- left: "1rem",
12
- margin: 0,
10
+ top: "md",
11
+ left: "md",
12
+ margin: "0",
13
13
  pointerEvents: "none",
14
14
  "& :where(button, .action-icon, [role='dialog'])": {
15
15
  pointerEvents: "all"
@@ -43,7 +43,7 @@ const autolayoutButton = css({
43
43
  flex: "1 1 40%",
44
44
  textAlign: "center",
45
45
  fontWeight: 500,
46
- padding: "4px 6px",
46
+ padding: "[4px 6px]",
47
47
  fontSize: "11px",
48
48
  zIndex: 1
49
49
  });
@@ -5,7 +5,7 @@ export declare const NavigationPanelActorContextProvider: Provider<NavigationPan
5
5
  export declare const useNavigationActorRef: () => NavigationPanelActorRef;
6
6
  export declare function useNavigationActorSnapshot<T = unknown>(selector: (context: NavigationPanelActorSnapshot) => T, compare?: (a: NoInfer<T>, b: NoInfer<T>) => boolean, deps?: DependencyList): T;
7
7
  export declare function useNavigationActorContext<T = unknown>(selector: (context: NavigationPanelActorContext) => T, compare?: (a: NoInfer<T>, b: NoInfer<T>) => boolean, deps?: DependencyList): T;
8
- export type NavigationActor = {
8
+ export interface NavigationActor {
9
9
  readonly actorRef: NavigationPanelActorRef;
10
10
  send: (event: NavigationPanelActorEvent) => void;
11
11
  selectFolder: (folderPath: string) => void;
@@ -16,5 +16,5 @@ export type NavigationActor = {
16
16
  isOpened: () => boolean;
17
17
  clearSearch: () => void;
18
18
  closeDropdown: () => void;
19
- };
19
+ }
20
20
  export declare function useNavigationActor(): NavigationActor;
@@ -5,8 +5,6 @@ const breadcrumbTitle = cva({
5
5
  fontSize: "sm",
6
6
  fontWeight: "500",
7
7
  transition: "fast",
8
- // width: 'max-content',
9
- alignSelf: "stretch",
10
8
  color: {
11
9
  base: "mantine.colors.text/90",
12
10
  _hover: "mantine.colors.text"
@@ -21,7 +21,10 @@ const TriggerWalkthroughButton = Button.withProps({
21
21
  layoutId: "trigger-dynamic-walkthrough",
22
22
  variant: "filled",
23
23
  size: "xs",
24
- fw: "500"
24
+ fw: "500",
25
+ className: css({
26
+ flexShrink: 0
27
+ })
25
28
  });
26
29
  const StartWalkthroughButton = () => {
27
30
  const diagram = useDiagram();
@@ -53,10 +56,10 @@ const ParallelFrame = () => {
53
56
  {
54
57
  css: {
55
58
  position: "absolute",
56
- margin: 0,
57
- padding: 0,
58
- top: 0,
59
- left: 0,
59
+ margin: "0",
60
+ padding: "0",
61
+ top: "0",
62
+ left: "0",
60
63
  width: "100%",
61
64
  height: "100%",
62
65
  border: `2px solid`,
@@ -100,7 +103,8 @@ const ActiveWalkthroughControls = () => {
100
103
  },
101
104
  rightSection: /* @__PURE__ */ jsx(IconPlayerStopFilled, { size: 10 }),
102
105
  children: "Stop"
103
- }
106
+ },
107
+ "trigger-dynamic-walkthrough"
104
108
  ),
105
109
  /* @__PURE__ */ jsx(
106
110
  PrevNextButton,
@@ -138,7 +142,8 @@ const ActiveWalkthroughControls = () => {
138
142
  " / ",
139
143
  totalSteps
140
144
  ] })
141
- }
145
+ },
146
+ "step-badge"
142
147
  ),
143
148
  /* @__PURE__ */ jsx(
144
149
  PrevNextButton,
@@ -0,0 +1,14 @@
1
+ import createReactComponent from '../createReactComponent.js';
2
+
3
+ /**
4
+ * @license @tabler/icons-react v3.34.1 - MIT
5
+ *
6
+ * This source code is licensed under the MIT license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+
11
+ const __iconNode = [["path", { "d": "M6 9l6 6l6 -6", "key": "svg-0" }]];
12
+ const IconChevronDown = createReactComponent("outline", "chevron-down", "ChevronDown", __iconNode);
13
+
14
+ export { __iconNode, IconChevronDown as default };
@@ -0,0 +1,14 @@
1
+ import createReactComponent from '../createReactComponent.js';
2
+
3
+ /**
4
+ * @license @tabler/icons-react v3.34.1 - MIT
5
+ *
6
+ * This source code is licensed under the MIT license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+
11
+ const __iconNode = [["path", { "d": "M9 15l6 -6", "key": "svg-0" }], ["path", { "d": "M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464", "key": "svg-1" }], ["path", { "d": "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463", "key": "svg-2" }]];
12
+ const IconLink = createReactComponent("outline", "link", "Link", __iconNode);
13
+
14
+ export { __iconNode, IconLink as default };
@@ -4,10 +4,10 @@ const backdropBlur = "--_blur";
4
4
  const backdropOpacity = "--_opacity";
5
5
  const dialog = css({
6
6
  boxSizing: "border-box",
7
- margin: 0,
8
- padding: 0,
7
+ margin: "0",
8
+ padding: "0",
9
9
  position: "fixed",
10
- inset: 0,
10
+ inset: "0",
11
11
  width: "100vw",
12
12
  height: "100vh",
13
13
  maxWidth: "100vw",
@@ -33,12 +33,12 @@ const card = css({
33
33
  border: `none`,
34
34
  backgroundImage: `
35
35
  linear-gradient(180deg,
36
- color-mix(in srgb, {colors.likec4.palette.fill} 60%, transparent),
37
- color-mix(in srgb, {colors.likec4.palette.fill} 20%, transparent) 8px,
38
- color-mix(in srgb, {colors.likec4.palette.fill} 14%, transparent) 20px,
36
+ color-mix(in srgb, var(--likec4-palette-fill) 60%, transparent),
37
+ color-mix(in srgb, var(--likec4-palette-fill) 20%, transparent) 8px,
38
+ color-mix(in srgb, var(--likec4-palette-fill) 14%, transparent) 20px,
39
39
  transparent 80px
40
40
  ),
41
- linear-gradient(180deg, {colors.likec4.palette.fill}, {colors.likec4.palette.fill} 4px, transparent 4px)
41
+ linear-gradient(180deg, var(--likec4-palette-fill), var(--likec4-palette-fill) 4px, transparent 4px)
42
42
  `,
43
43
  "& .react-flow__attribution": {
44
44
  display: "none"
@@ -94,7 +94,7 @@ const viewButton = css({
94
94
  width: "100%",
95
95
  background: "mantine.colors.body",
96
96
  borderRadius: "sm",
97
- padding: `10px 8px`,
97
+ padding: `[10px 8px]`,
98
98
  // gap: 6,
99
99
  // alignItems: 'flex-start',
100
100
  transition: "fast",
@@ -153,8 +153,9 @@ const tabsList = css({
153
153
  background: "mantine.colors.gray[1]",
154
154
  borderRadius: "sm",
155
155
  flexWrap: "nowrap",
156
- gap: "6px",
157
- padding: "4px",
156
+ gap: "1.5",
157
+ // 6px
158
+ padding: "1",
158
159
  _dark: {
159
160
  background: "mantine.colors.dark[7]"
160
161
  }
@@ -163,7 +164,7 @@ const tabsTab = css({
163
164
  fontSize: "xs",
164
165
  fontWeight: 500,
165
166
  flexGrow: 1,
166
- padding: "6px 8px",
167
+ padding: "[6px 8px]",
167
168
  transition: "fast",
168
169
  borderRadius: "sm",
169
170
  color: "mantine.colors.gray[7]",
@@ -195,15 +196,15 @@ const tabsPanel = css({
195
196
  overflow: "hidden",
196
197
  position: "relative",
197
198
  "&:not(:has(.mantine-ScrollArea-root))": {
198
- paddingLeft: "4px",
199
- paddingRight: "4px"
199
+ paddingLeft: "1",
200
+ paddingRight: "1"
200
201
  },
201
202
  "& .mantine-ScrollArea-root": {
202
203
  width: "100%",
203
204
  height: "100%",
204
205
  "& > div": {
205
- paddingLeft: "4px",
206
- paddingRight: "4px"
206
+ paddingLeft: "1",
207
+ paddingRight: "1"
207
208
  }
208
209
  }
209
210
  });
@@ -230,8 +231,8 @@ const resizeHandle = css({
230
231
  borderTop: "none",
231
232
  borderLeft: "none",
232
233
  borderRadius: "2px",
233
- bottom: "2px",
234
- right: "2px",
234
+ bottom: "0.5",
235
+ right: "0.5",
235
236
  transition: "fast",
236
237
  cursor: "se-resize",
237
238
  _hover: {
@@ -1,5 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { cx, css } from '@likec4/styles/css';
3
+ import { HStack } from '@likec4/styles/jsx';
3
4
  import { RemoveScroll, Card, Group, Text, CloseButton, Badge, Flex, ActionIconGroup, ActionIcon, Tooltip as Tooltip$1, Tabs, TabsList, TabsTab, TabsPanel, ScrollArea, Box, Stack, Divider as Divider$1, ScrollAreaAutosize, UnstyledButton, ThemeIcon } from '@mantine/core';
4
5
  import { useViewportSize, useSessionStorage } from '@mantine/hooks';
5
6
  import { useSyncedRef, useDebouncedCallback, useTimeoutEffect } from '@react-hookz/web';
@@ -9,7 +10,7 @@ import { pipe, map, partition, only, clamp, isNullish, entries } from 'remeda';
9
10
  import { ElementTag } from '../../base/primitives/element/ElementTags.js';
10
11
  import { Link } from '../../components/Link.js';
11
12
  import { useDiagram } from '../../hooks/useDiagram.js';
12
- import { elementIcon, cardHeader, title, tabsPanel, tabsTab, tabsList, tabsRoot, propertiesGrid, resizeHandle, card, backdropOpacity, backdropBlur, dialog, propertyLabel, viewButton, viewButtonTitle } from './ElementDetailsCard.css.js';
13
+ import { elementIcon, card, cardHeader, title, tabsPanel, tabsTab, tabsList, tabsRoot, propertiesGrid, resizeHandle, backdropOpacity, backdropBlur, dialog, propertyLabel, viewButton, viewButtonTitle } from './ElementDetailsCard.css.js';
13
14
  import { TabPanelDeployments } from './TabPanelDeployments.js';
14
15
  import { TabPanelRelationships } from './TabPanelRelationships.js';
15
16
  import { TabPanelStructure } from './TabPanelStructure.js';
@@ -195,12 +196,8 @@ function ElementDetailsCard({
195
196
  dragElastic: 0,
196
197
  dragMomentum: false,
197
198
  dragListener: false,
198
- className: cx(
199
- css({
200
- likec4Palette: nodeModel?.color ?? elementModel.color
201
- }),
202
- card
203
- ),
199
+ "data-likec4-color": nodeModel?.color ?? elementModel.color,
200
+ className: card,
204
201
  initial: {
205
202
  top,
206
203
  left,
@@ -284,9 +281,7 @@ function ElementDetailsCard({
284
281
  ElementTag,
285
282
  {
286
283
  tag,
287
- css: {
288
- cursor: "pointer"
289
- },
284
+ cursor: "pointer",
290
285
  onClick: (e) => {
291
286
  e.stopPropagation();
292
287
  diagram.openSearch(`#${tag}`);
@@ -377,7 +372,7 @@ function ElementDetailsCard({
377
372
  elementModel.technology && /* @__PURE__ */ jsx(ElementProperty, { title: "technology", children: elementModel.technology }),
378
373
  elementModel.links.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
379
374
  /* @__PURE__ */ jsx(PropertyLabel, { children: "links" }),
380
- /* @__PURE__ */ jsx(Stack, { gap: "xs", align: "flex-start", children: elementModel.links.map((link, i) => /* @__PURE__ */ jsx(Link, { value: link }, i)) })
375
+ /* @__PURE__ */ jsx(HStack, { gap: "xs", flexWrap: "wrap", children: elementModel.links.map((link, i) => /* @__PURE__ */ jsx(Link, { value: link }, i)) })
381
376
  ] }),
382
377
  elementModel.$element.metadata && /* @__PURE__ */ jsx(ElementMetata, { value: elementModel.$element.metadata })
383
378
  ] }) }) }),
@@ -494,7 +489,7 @@ function ElementMetata({
494
489
  gap: `[4px 4px]`,
495
490
  alignItems: "baseline",
496
491
  justifyItems: "stretch",
497
- paddingRight: "2xs"
492
+ paddingRight: "xxs"
498
493
  }),
499
494
  children: entries(metadata).map(([key, value]) => /* @__PURE__ */ jsxs(
500
495
  "div",
@@ -551,7 +546,7 @@ function ElementMetata({
551
546
  {
552
547
  className: css({
553
548
  fontSize: "sm",
554
- padding: "2xs",
549
+ padding: "xxs",
555
550
  whiteSpace: "pre",
556
551
  fontFamily: "[var(--mantine-font-family-monospace)]",
557
552
  userSelect: "all"
@@ -7,8 +7,8 @@ const treeNode = css({
7
7
  });
8
8
  const treeNodeLabel = css({
9
9
  cursor: "default",
10
- marginTop: 0,
11
- marginBottom: 0
10
+ marginTop: "0",
11
+ marginBottom: "0"
12
12
  });
13
13
  const label = css({
14
14
  transition: "fast",
@@ -40,8 +40,9 @@ const instanceLabel = cx(
40
40
  justifyContent: "stretch",
41
41
  flexWrap: "nowrap",
42
42
  height: "36px",
43
- paddingInlineStart: "16px",
44
- paddingInlineEnd: "10px",
43
+ paddingInlineStart: "[16px]",
44
+ paddingInlineEnd: "2.5",
45
+ // 10px
45
46
  borderRadius: "sm",
46
47
  alignItems: "center",
47
48
  color: "mantine.colors.gray[7]",
@@ -5,11 +5,11 @@ const fqn = css({
5
5
  fontSize: "sm",
6
6
  fontWeight: 500,
7
7
  whiteSpace: "nowrap",
8
- padding: "3px 6px",
8
+ padding: "[3px 6px]",
9
9
  borderRadius: 3,
10
- background: `likec4.palette.fill/75`,
10
+ background: `var(--likec4-palette-fill)/75`,
11
11
  lineHeight: 1.2,
12
- color: "likec4.palette.hiContrast"
12
+ color: "var(--likec4-palette-hiContrast)"
13
13
  // selectors: {
14
14
  // [`${whereDark} &`]: {
15
15
  // }
@@ -52,9 +52,9 @@ css({
52
52
  _before: {
53
53
  content: '"scope:"',
54
54
  position: "absolute",
55
- top: 0,
56
- left: 8,
57
- fontSize: "2xs",
55
+ top: "0",
56
+ left: "2",
57
+ fontSize: "xxs",
58
58
  fontWeight: 500,
59
59
  lineHeight: "1",
60
60
  color: "mantine.colors.dimmed",
@@ -71,7 +71,7 @@ css({
71
71
  display: "inline-block",
72
72
  fontSize: "xl",
73
73
  fontWeight: 600,
74
- padding: "1px 5px",
74
+ padding: "[1px 5px]",
75
75
  minWidth: 24,
76
76
  textAlign: "center",
77
77
  borderRadius: "sm",
@@ -11,7 +11,7 @@ export declare const overlay: SlotRecipeRuntimeFn<"body" | "dialog", {
11
11
  width: "calc(100vw - 2 * var(--_inset))";
12
12
  height: "calc(100vh - var(--_offset) - var(--_inset))";
13
13
  "--_border-radius": "6px";
14
- padding: "6px";
14
+ padding: "1.5";
15
15
  "--_offset": "1rem";
16
16
  };
17
17
  md: {
@@ -32,8 +32,8 @@ export declare const overlay: SlotRecipeRuntimeFn<"body" | "dialog", {
32
32
  };
33
33
  true: {
34
34
  dialog: {
35
- inset: number;
36
- padding: number;
35
+ inset: "0";
36
+ padding: "0";
37
37
  };
38
38
  };
39
39
  };
@@ -8,7 +8,7 @@ const inset = "--_inset";
8
8
  const borderRadius = "--_border-radius";
9
9
  const dialog = css.raw({
10
10
  boxSizing: "border-box",
11
- margin: 0,
11
+ margin: "0",
12
12
  position: "fixed",
13
13
  width: "100vw",
14
14
  height: "100vh",
@@ -28,12 +28,12 @@ const dialog = css.raw({
28
28
  _backdrop: {
29
29
  cursor: "zoom-out"
30
30
  },
31
- inset: 0,
32
- padding: 0
31
+ inset: "0",
32
+ padding: "0"
33
33
  });
34
34
  const body = css.raw({
35
35
  position: "relative",
36
- containerName: "overlay-dialog",
36
+ containerName: "likec4-dialog",
37
37
  containerType: "size",
38
38
  border: `0 solid transparent`,
39
39
  overflow: "hidden",
@@ -56,7 +56,8 @@ const overlay = sva({
56
56
  width: "calc(100vw - 2 * var(--_inset))",
57
57
  height: "calc(100vh - var(--_offset) - var(--_inset))",
58
58
  [borderRadius]: "6px",
59
- padding: "6px",
59
+ padding: "1.5",
60
+ // 6px
60
61
  [offset]: "1rem"
61
62
  },
62
63
  md: {
@@ -77,8 +78,8 @@ const overlay = sva({
77
78
  },
78
79
  true: {
79
80
  dialog: {
80
- inset: 0,
81
- padding: 0
81
+ inset: "0",
82
+ padding: "0"
82
83
  }
83
84
  }
84
85
  },
@@ -3,7 +3,7 @@ import { css, cx } from '@likec4/styles/css';
3
3
  const edgeEnpoint = css.raw({
4
4
  display: "inline-flex",
5
5
  alignItems: "center",
6
- padding: "6px 2px 0 2px",
6
+ padding: "[6px 2px 0 2px]",
7
7
  "& .mantine-Text-root": {
8
8
  color: "mantine.colors.text/90",
9
9
  fontSize: "xs",
@@ -12,7 +12,7 @@ const edgeEnpoint = css.raw({
12
12
  }
13
13
  });
14
14
  const edgeSource = css({
15
- paddingLeft: 4,
15
+ paddingLeft: "1",
16
16
  gridColumn: 1
17
17
  }, edgeEnpoint);
18
18
  const edgeArrow = css({
@@ -20,7 +20,7 @@ const edgeArrow = css({
20
20
  }, edgeEnpoint);
21
21
  const edgeTarget = css({
22
22
  gridColumn: 3,
23
- paddingRight: 4
23
+ paddingRight: "1"
24
24
  }, edgeEnpoint);
25
25
  const edgeLabelclass = "likec4-edge-label";
26
26
  const edgeLabel = cx(
@@ -31,8 +31,8 @@ const edgeLabel = cx(
31
31
  gridColumnEnd: 4,
32
32
  borderBottom: `1px solid`,
33
33
  borderBottomColor: "mantine.colors.defaultBorder",
34
- marginBottom: "0px",
35
- padding: "0 4px 5px 4px",
34
+ marginBottom: "0",
35
+ padding: "[0 4px 5px 4px]",
36
36
  width: "100%",
37
37
  "& .mantine-Text-root": {
38
38
  fontSize: "xxs",
@@ -46,7 +46,7 @@ const edgeRow = css({
46
46
  display: "contents",
47
47
  [`&:last-child .${edgeLabelclass}`]: {
48
48
  borderBottom: "none",
49
- marginBottom: 0
49
+ marginBottom: "0"
50
50
  },
51
51
  "& > *": {
52
52
  transition: "all 0.15s ease-in"
@@ -61,14 +61,14 @@ const edgeGrid = css({
61
61
  display: "grid",
62
62
  gridTemplateColumns: "1fr 30px 1fr",
63
63
  gridAutoRows: "min-content max-content",
64
- gap: 0,
64
+ gap: "0",
65
65
  alignItems: "stretch"
66
66
  });
67
67
  css({
68
68
  display: "grid",
69
69
  gridTemplateColumns: "min-content 1fr",
70
70
  gridAutoRows: "min-content max-content",
71
- gap: "10px 12px",
71
+ gap: "[10px 12px]",
72
72
  alignItems: "baseline",
73
73
  justifyItems: "start"
74
74
  });
@@ -1,7 +1,7 @@
1
1
  import { css } from '@likec4/styles/css';
2
2
 
3
3
  const node = css({
4
- margin: 0
4
+ margin: "0"
5
5
  });
6
6
  const label = css({
7
7
  _hover: {
@@ -36,8 +36,8 @@ const body = css({
36
36
  // containerType: 'size',
37
37
  // position: 'fixed',
38
38
  // zIndex: 901,
39
- // top: 0,
40
- // left: 0,
39
+ // top: '0',
40
+ // left: '0',
41
41
  width: "100%",
42
42
  height: "100%",
43
43
  maxHeight: "100vh",
@@ -46,10 +46,10 @@ const body = css({
46
46
  flexDirection: "column",
47
47
  justifyContent: "stretch",
48
48
  gap: "sm",
49
- paddingTop: 20,
50
- paddingLeft: 16,
51
- paddingRight: 16,
52
- paddingBottom: 8,
49
+ paddingTop: "[20px]",
50
+ paddingLeft: "md",
51
+ paddingRight: "md",
52
+ paddingBottom: "sm",
53
53
  background: "[transparent]"
54
54
  // backgroundColor: {
55
55
  // _dark: `[rgb(34 34 34 / 0.95)]`,