@likec4/diagram 1.32.1 → 1.33.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 (156) hide show
  1. package/README.md +12 -5
  2. package/bundle/{chunk-DlHyKoeo.js → chunk-DyFK-AJ5.js} +516 -488
  3. package/bundle/custom.js +53 -50
  4. package/bundle/index.js +317 -154
  5. package/dist/base/primitives/MarkdownBlock.d.ts +27 -0
  6. package/dist/base/primitives/MarkdownBlock.js +42 -0
  7. package/dist/base/primitives/compound/CompoundActionButton.js +1 -1
  8. package/dist/base/primitives/compound/CompoundDetailsButton.js +1 -1
  9. package/dist/base/primitives/edge/EdgeActionButton.js +1 -1
  10. package/dist/base/primitives/element/ElementDetailsButton.js +1 -1
  11. package/dist/base/primitives/element/ElementTags.d.ts +1 -1
  12. package/dist/base/primitives/element/ElementTags.js +116 -125
  13. package/dist/base/primitives/element/ElementTitle.css.js +6 -1
  14. package/dist/base/primitives/element/ElementTitle.d.ts +3 -2
  15. package/dist/base/primitives/element/ElementTitle.js +9 -6
  16. package/dist/base/primitives/index.d.ts +1 -0
  17. package/dist/bundle/LikeC4View.js +1 -1
  18. package/dist/bundle/custom.js +31 -0
  19. package/dist/bundle/index.js +1 -0
  20. package/dist/components/ErrorFallback.js +1 -1
  21. package/dist/components/Link.js +2 -1
  22. package/dist/components/SearchControl.js +1 -1
  23. package/dist/context/DiagramFeatures.d.ts +3 -2
  24. package/dist/context/DiagramFeatures.js +16 -1
  25. package/dist/context/IconRenderer.js +6 -1
  26. package/dist/context/TagStylesContext.js +1 -1
  27. package/dist/custom/components.d.ts +2 -2
  28. package/dist/custom/customNodes.js +18 -0
  29. package/dist/custom/hooks.d.ts +3 -3
  30. package/dist/custom/index.js +31 -0
  31. package/dist/hooks/safeContext.js +1 -1
  32. package/dist/hooks/useXYFlow.d.ts +2 -1
  33. package/dist/index.d.ts +4 -6
  34. package/dist/index.js +1 -0
  35. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +5 -2
  36. package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -1
  37. package/dist/likec4diagram/custom/nodes/nodes.js +3 -3
  38. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -1
  39. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -1
  40. package/dist/likec4diagram/types.d.ts +3 -2
  41. package/dist/likec4diagram/ui/controls/ChangeAutoLayoutButton.js +1 -1
  42. package/dist/likec4diagram/ui/controls/Controls.js +3 -1
  43. package/dist/likec4diagram/ui/controls/LayoutDriftNotification.js +1 -1
  44. package/dist/likec4diagram/ui/controls/ManualLayoutToolsButton.js +9 -1
  45. package/dist/likec4diagram/ui/controls/NavigationButtons.js +2 -1
  46. package/dist/likec4diagram/ui/controls/ToggleReadonly.js +2 -1
  47. package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +19 -15
  48. package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -1
  49. package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.js +4 -1
  50. package/dist/likec4diagram/useViewToNodesEdges.js +2 -2
  51. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +41 -0
  52. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +30 -0
  53. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +13 -0
  54. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +13 -0
  55. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +13 -0
  56. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +13 -0
  57. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +13 -0
  58. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +13 -0
  59. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +13 -0
  60. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +13 -0
  61. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +13 -0
  62. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +13 -0
  63. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +13 -0
  64. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +13 -0
  65. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +13 -0
  66. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +13 -0
  67. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +13 -0
  68. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +13 -0
  69. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +13 -0
  70. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +13 -0
  71. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +13 -0
  72. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +13 -0
  73. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +13 -0
  74. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +13 -0
  75. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +13 -0
  76. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +13 -0
  77. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +13 -0
  78. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +13 -0
  79. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +13 -0
  80. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu.js +13 -0
  81. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu2.js +13 -0
  82. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +13 -0
  83. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +13 -0
  84. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +13 -0
  85. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +13 -0
  86. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +13 -0
  87. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +13 -0
  88. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +13 -0
  89. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +13 -0
  90. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +13 -0
  91. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +13 -0
  92. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +13 -0
  93. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +13 -0
  94. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +13 -0
  95. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +13 -0
  96. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +13 -0
  97. package/dist/overlays/element-details/ElementDetailsCard.css.js +4 -2
  98. package/dist/overlays/element-details/ElementDetailsCard.js +127 -12
  99. package/dist/overlays/element-details/TabPanelDeployments.js +3 -1
  100. package/dist/overlays/element-details/TabPanelRelationships.js +3 -1
  101. package/dist/overlays/element-details/TabPanelStructure.js +1 -1
  102. package/dist/overlays/relationship-details/RelationshipDetails.d.ts +2 -2
  103. package/dist/overlays/relationship-details/RelationshipDetails.js +3 -1
  104. package/dist/overlays/relationship-details/SelectEdge.js +2 -1
  105. package/dist/overlays/relationship-details/_types.d.ts +4 -3
  106. package/dist/overlays/relationship-details/actor.d.ts +2 -2
  107. package/dist/overlays/relationship-details/custom/ElementActions.js +3 -1
  108. package/dist/overlays/relationship-details/custom/edgeTypes.d.ts +2 -2
  109. package/dist/overlays/relationship-details/hooks.d.ts +10 -10
  110. package/dist/overlays/relationship-details/layout-to-xyflow.js +4 -4
  111. package/dist/overlays/relationship-details/layout.d.ts +5 -3
  112. package/dist/overlays/relationship-details/layout.js +2 -2
  113. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +3 -1
  114. package/dist/overlays/relationships-browser/SelectElement.js +2 -1
  115. package/dist/overlays/relationships-browser/_types.d.ts +3 -2
  116. package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -1
  117. package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +2 -2
  118. package/dist/overlays/relationships-browser/layout.d.ts +4 -3
  119. package/dist/overlays/relationships-browser/layout.js +3 -3
  120. package/dist/search/components/ElementsColumn.js +2 -2
  121. package/dist/search/components/PickView.js +1 -1
  122. package/dist/search/components/SearchByTags.js +1 -1
  123. package/dist/search/components/SearchInput.js +1 -1
  124. package/dist/search/components/ViewsColum.js +4 -3
  125. package/dist/state/DiagramActorProvider.js +9 -1
  126. package/dist/state/diagram-machine.js +1 -1
  127. package/dist/styles-min.css +1 -1
  128. package/dist/styles.css +1 -1
  129. package/dist/styles.css2.js +1 -1
  130. package/package.json +26 -20
  131. package/panda.buildinfo.json +26 -7
  132. package/src/base/primitives/MarkdownBlock.tsx +66 -0
  133. package/src/base/primitives/element/ElementTags.tsx +118 -116
  134. package/src/base/primitives/element/ElementTitle.css.ts +7 -1
  135. package/src/base/primitives/element/ElementTitle.tsx +14 -9
  136. package/src/base/primitives/index.ts +1 -0
  137. package/src/context/DiagramFeatures.tsx +7 -7
  138. package/src/custom/components.ts +2 -0
  139. package/src/custom/hooks.ts +5 -0
  140. package/src/hooks/useXYFlow.ts +9 -1
  141. package/src/index.ts +18 -6
  142. package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +1 -1
  143. package/src/likec4diagram/types.ts +2 -2
  144. package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +21 -16
  145. package/src/likec4diagram/useViewToNodesEdges.ts +2 -1
  146. package/src/overlays/element-details/ElementDetailsCard.css.ts +3 -1
  147. package/src/overlays/element-details/ElementDetailsCard.tsx +101 -17
  148. package/src/overlays/relationship-details/_types.ts +12 -3
  149. package/src/overlays/relationship-details/layout-to-xyflow.ts +3 -2
  150. package/src/overlays/relationship-details/layout.ts +7 -4
  151. package/src/overlays/relationships-browser/_types.ts +2 -1
  152. package/src/overlays/relationships-browser/layout.ts +7 -4
  153. package/src/search/components/ElementsColumn.tsx +1 -1
  154. package/src/search/components/ViewsColum.tsx +2 -2
  155. package/src/state/DiagramActorProvider.tsx +10 -2
  156. package/src/state/diagram-machine.ts +1 -1
@@ -0,0 +1,27 @@
1
+ import { RichTextOrEmpty as RichTextType } from '@likec4/core/types';
2
+ import { BoxProps } from '@likec4/styles/jsx';
3
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
4
+ export type MarkdownBlockProps = Omit<BoxProps, 'dangerouslySetInnerHTML' | 'children'> & {
5
+ value: RichTextType;
6
+ /**
7
+ * When markdown block is used inside a diagram node, this variant should be used to apply the likec4 palette.
8
+ * @default false
9
+ */
10
+ uselikec4palette?: boolean;
11
+ /**
12
+ * Scale factor for the font size.
13
+ * @default 1
14
+ */
15
+ textScale?: number;
16
+ /**
17
+ * If true, the component will not render anything if the value is empty.
18
+ * @default false
19
+ */
20
+ hideIfEmpty?: boolean;
21
+ /**
22
+ * Text to show if the value is empty.
23
+ * @default "no content"
24
+ */
25
+ emptyText?: string;
26
+ };
27
+ export declare const MarkdownBlock: ForwardRefExoticComponent<Omit<MarkdownBlockProps, "ref"> & RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,42 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { cx } from '@likec4/styles/css';
3
+ import { Box } from '@likec4/styles/jsx';
4
+ import { markdownBlock } from '@likec4/styles/recipes';
5
+ import { Text } from '@mantine/core';
6
+ import { forwardRef } from 'react';
7
+
8
+ const MarkdownBlock = forwardRef(({
9
+ value,
10
+ textScale = 1,
11
+ uselikec4palette = false,
12
+ hideIfEmpty = false,
13
+ emptyText = "no content",
14
+ className,
15
+ ...props
16
+ }, ref) => {
17
+ if (value.isEmpty && hideIfEmpty) {
18
+ return null;
19
+ }
20
+ const content = value.nonEmpty ? { dangerouslySetInnerHTML: { __html: value.html } } : { children: /* @__PURE__ */ jsx(Text, { component: "span", fz: "xs", c: "dimmed", children: emptyText }) };
21
+ return /* @__PURE__ */ jsx(
22
+ Box,
23
+ {
24
+ ref,
25
+ ...props,
26
+ className: cx(
27
+ markdownBlock({
28
+ uselikec4palette
29
+ }),
30
+ className
31
+ ),
32
+ style: {
33
+ // @ts-expect-error
34
+ ["--mantine-scale"]: textScale
35
+ },
36
+ ...content
37
+ }
38
+ );
39
+ });
40
+ MarkdownBlock.displayName = "MarkdownBlock";
41
+
42
+ export { MarkdownBlock };
@@ -4,10 +4,10 @@ import { Box } from '@likec4/styles/jsx';
4
4
  import { actionBtn } from '@likec4/styles/recipes';
5
5
  import { ActionIcon } from '@mantine/core';
6
6
  import { useDebouncedValue } from '@mantine/hooks';
7
- import { IconZoomScan } from '@tabler/icons-react';
8
7
  import * as m from 'motion/react-m';
9
8
  import { stopPropagation } from '../../../utils/xyflow.js';
10
9
  import { compoundActionBtn } from './actionbtns.css.js';
10
+ import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
11
11
 
12
12
  function CompoundActionButton({
13
13
  data: {
@@ -4,10 +4,10 @@ import { Box } from '@likec4/styles/jsx';
4
4
  import { actionBtn } from '@likec4/styles/recipes';
5
5
  import { ActionIcon } from '@mantine/core';
6
6
  import { useDebouncedValue } from '@mantine/hooks';
7
- import { IconId } from '@tabler/icons-react';
8
7
  import * as m from 'motion/react-m';
9
8
  import { stopPropagation } from '../../../utils/xyflow.js';
10
9
  import { compoundActionBtn } from './actionbtns.css.js';
10
+ import IconId from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
11
11
 
12
12
  function CompoundDetailsButton({
13
13
  data: {
@@ -1,9 +1,9 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
3
  import { ActionIcon } from '@mantine/core';
4
- import { IconZoomScan } from '@tabler/icons-react';
5
4
  import { stopPropagation } from '../../../utils/xyflow.js';
6
5
  import { actionBtn } from './edge.css.js';
6
+ import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
7
7
 
8
8
  function EdgeActionButton({ icon, onClick }) {
9
9
  return /* @__PURE__ */ jsx(
@@ -4,9 +4,9 @@ import { Box } from '@likec4/styles/jsx';
4
4
  import { actionBtn } from '@likec4/styles/recipes';
5
5
  import { ActionIcon } from '@mantine/core';
6
6
  import { useId } from '@mantine/hooks';
7
- import { IconId } from '@tabler/icons-react';
8
7
  import * as m from 'motion/react-m';
9
8
  import { stopPropagation } from '../../../utils/xyflow.js';
9
+ import IconId from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
10
10
 
11
11
  const container = css({
12
12
  position: "absolute",
@@ -10,5 +10,5 @@ type Data = {
10
10
  width: number;
11
11
  };
12
12
  type ElementTagsProps = NodeProps<Data>;
13
- export declare const ElementTags: MemoExoticComponent<({ id, data: { tags, width } }: ElementTagsProps) => import("react/jsx-runtime").JSX.Element | null>;
13
+ export declare const ElementTags: MemoExoticComponent<({ id, data: { tags, width, hovered } }: ElementTagsProps) => import("react/jsx-runtime").JSX.Element | null>;
14
14
  export {};
@@ -1,15 +1,15 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { isTagColorSpecified } from '@likec4/core';
3
3
  import { cx, css } from '@likec4/styles/css';
4
4
  import { Box, HStack } from '@likec4/styles/jsx';
5
5
  import { hstack } from '@likec4/styles/patterns';
6
6
  import { likec4tag } from '@likec4/styles/recipes';
7
- import { HoverCard } from '@mantine/core';
7
+ import { useHover, useDebouncedState } from '@mantine/hooks';
8
+ import { NodeToolbar, Position } from '@xyflow/react';
8
9
  import { deepEqual } from 'fast-equals';
9
- import { memo, useCallback, forwardRef } from 'react';
10
+ import { forwardRef, memo, useEffect, useCallback } from 'react';
10
11
  import { useTagSpecification } from '../../../context/TagStylesContext.js';
11
12
  import { useDiagram } from '../../../hooks/useDiagram.js';
12
- import { useMantinePortalProps } from '../../../hooks/useMantinePortalProps.js';
13
13
  import { useCurrentZoom } from '../../../hooks/useXYFlow.js';
14
14
  import { stopPropagation } from '../../../utils/xyflow.js';
15
15
 
@@ -37,140 +37,131 @@ const ElementTag = forwardRef(
37
37
  }
38
38
  );
39
39
  const propsAreEqual = (prev, next) => {
40
- return prev.data.width === next.data.width && deepEqual(prev.data.tags, next.data.tags);
40
+ return prev.data.width === next.data.width && deepEqual(prev.data.tags, next.data.tags) && (prev.data.hovered ?? false) === (next.data.hovered ?? false);
41
41
  };
42
- const ElementTags = memo(({ id, data: { tags, width } }) => {
42
+ const ElementTags = memo(({ id, data: { tags, width, hovered = false } }) => {
43
+ const {
44
+ hovered: isTagsBarHovered,
45
+ ref: tagsBarRef
46
+ } = useHover();
47
+ const {
48
+ hovered: isTagsToolbarHovered,
49
+ ref: tagsToolbarRef
50
+ } = useHover();
51
+ const [isVisible, setVisible] = useDebouncedState(false, hovered ? 120 : 300);
52
+ useEffect(() => {
53
+ setVisible((visibleNow) => {
54
+ if (!visibleNow) {
55
+ return hovered && (isTagsBarHovered || isTagsToolbarHovered);
56
+ }
57
+ return hovered || isTagsBarHovered || isTagsToolbarHovered;
58
+ });
59
+ }, [isTagsBarHovered, isTagsToolbarHovered, hovered]);
43
60
  const zoom = useCurrentZoom();
44
61
  const zoomIsLargeEnough = zoom > 1.2;
45
- const portalProps = useMantinePortalProps();
62
+ const diagram = useDiagram();
63
+ const onHover = (tag) => {
64
+ diagram.send({ type: "tag.highlight", tag });
65
+ };
66
+ const onLeave = useCallback(() => {
67
+ diagram.send({ type: "tag.unhighlight" });
68
+ }, []);
46
69
  if (!tags || tags.length === 0) {
47
70
  return null;
48
71
  }
49
72
  const maxWidth = Math.max(Math.round(width * zoom) - 10, 200);
50
- return /* @__PURE__ */ jsxs(
51
- HoverCard,
52
- {
53
- ...portalProps,
54
- floatingStrategy: "fixed",
55
- position: "bottom-start",
56
- offset: {
57
- alignmentAxis: Math.round(4 * zoom),
58
- mainAxis: 8
59
- },
60
- keepMounted: false,
61
- openDelay: 300,
62
- closeDelay: 500,
63
- children: [
64
- /* @__PURE__ */ jsx(HoverCard.Target, { children: /* @__PURE__ */ jsx(
65
- "div",
73
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
74
+ /* @__PURE__ */ jsx(
75
+ "div",
76
+ {
77
+ ref: tagsBarRef,
78
+ className: cx(
79
+ "likec4-element-tags",
80
+ hstack({
81
+ pointerEvents: "all",
82
+ gap: 4,
83
+ alignItems: "flex-end",
84
+ justifyItems: "stretch",
85
+ position: "absolute",
86
+ width: "100%",
87
+ bottom: 0,
88
+ left: 0,
89
+ padding: 4,
90
+ _shapeCylinder: {
91
+ bottom: 5
92
+ },
93
+ _shapeStorage: {
94
+ bottom: 5
95
+ },
96
+ _shapeQueue: {
97
+ bottom: 0,
98
+ paddingLeft: 14
99
+ }
100
+ })
101
+ ),
102
+ onClick: stopPropagation,
103
+ children: tags.map((tag) => /* @__PURE__ */ jsx(
104
+ Box,
66
105
  {
67
- className: cx(
68
- "likec4-element-tags",
69
- hstack({
70
- pointerEvents: "all",
71
- gap: 4,
72
- alignItems: "flex-end",
73
- justifyItems: "stretch",
74
- position: "absolute",
75
- width: "100%",
76
- bottom: 0,
77
- left: 0,
78
- padding: 4,
79
- _shapeCylinder: {
80
- bottom: 5
81
- },
82
- _shapeStorage: {
83
- bottom: 5
84
- },
85
- _shapeQueue: {
86
- bottom: 0,
87
- paddingLeft: 14
88
- }
89
- })
90
- ),
91
- onClick: stopPropagation,
92
- children: tags.map((tag) => /* @__PURE__ */ jsx(
93
- Box,
94
- {
95
- "data-likec4-tag": tag,
96
- className: css({
97
- layerStyle: "likec4.tag",
98
- flex: 1,
99
- display: "flex",
100
- alignItems: "center",
101
- justifyContent: "center",
102
- maxWidth: 50,
103
- height: 5,
104
- _whenHovered: {
105
- height: 12,
106
- borderRadius: 4,
107
- transitionDelay: ".08s"
108
- },
109
- transition: "fast"
110
- })
106
+ "data-likec4-tag": tag,
107
+ className: css({
108
+ layerStyle: "likec4.tag",
109
+ flex: 1,
110
+ display: "flex",
111
+ alignItems: "center",
112
+ justifyContent: "center",
113
+ maxWidth: 50,
114
+ height: 5,
115
+ _whenHovered: {
116
+ height: 12,
117
+ borderRadius: 4,
118
+ transitionDelay: ".08s"
111
119
  },
112
- id + "#" + tag
113
- ))
114
- }
115
- ) }),
116
- /* @__PURE__ */ jsx(
117
- HoverCard.Dropdown,
120
+ transition: "fast"
121
+ })
122
+ },
123
+ id + "#" + tag
124
+ ))
125
+ }
126
+ ),
127
+ /* @__PURE__ */ jsx(NodeToolbar, { isVisible, align: "start", position: Position.Bottom, children: /* @__PURE__ */ jsx(
128
+ HStack,
129
+ {
130
+ ref: tagsToolbarRef,
131
+ css: {
132
+ gap: 4,
133
+ flexWrap: "wrap",
134
+ pb: "sm",
135
+ translate: "auto",
136
+ x: -8,
137
+ maxWidth
138
+ },
139
+ children: tags.map((tag) => /* @__PURE__ */ jsx(
140
+ ElementTag,
118
141
  {
119
- p: 0,
120
- w: "auto",
121
- maw: maxWidth,
142
+ tag,
122
143
  className: css({
123
- background: "transparent",
124
- border: "none"
144
+ userSelect: "none",
145
+ cursor: "pointer",
146
+ ...zoomIsLargeEnough && {
147
+ fontSize: "lg",
148
+ borderRadius: 4,
149
+ px: 6
150
+ }
125
151
  }),
126
- children: /* @__PURE__ */ jsx(ElementTagsDropdown, { tags, zoomIsLargeEnough })
127
- }
128
- )
129
- ]
130
- }
131
- );
152
+ onClick: (e) => {
153
+ e.stopPropagation();
154
+ diagram.openSearch(`#${tag}`);
155
+ },
156
+ onMouseEnter: () => onHover(tag),
157
+ onMouseLeave: onLeave
158
+ },
159
+ tag
160
+ ))
161
+ }
162
+ ) })
163
+ ] });
132
164
  }, propsAreEqual);
133
165
  ElementTags.displayName = "ElementTags";
134
- function ElementTagsDropdown({ tags, zoomIsLargeEnough }) {
135
- const diagram = useDiagram();
136
- const onHover = (tag) => {
137
- diagram.send({ type: "tag.highlight", tag });
138
- };
139
- const onLeave = useCallback(() => {
140
- diagram.send({ type: "tag.unhighlight" });
141
- }, []);
142
- return /* @__PURE__ */ jsx(
143
- HStack,
144
- {
145
- css: {
146
- gap: 4,
147
- flexWrap: "wrap",
148
- pb: "sm"
149
- },
150
- children: tags.map((tag) => /* @__PURE__ */ jsx(
151
- ElementTag,
152
- {
153
- tag,
154
- className: css({
155
- userSelect: "none",
156
- cursor: "pointer",
157
- ...zoomIsLargeEnough && {
158
- fontSize: "lg",
159
- borderRadius: 4,
160
- px: 6
161
- }
162
- }),
163
- onClick: (e) => {
164
- e.stopPropagation();
165
- diagram.openSearch(`#${tag}`);
166
- },
167
- onMouseEnter: () => onHover(tag),
168
- onMouseLeave: onLeave
169
- },
170
- tag
171
- ))
172
- }
173
- );
174
- }
175
166
 
176
167
  export { ElementTag, ElementTags };
@@ -8,7 +8,8 @@ const title = css.raw({
8
8
  color: "likec4.palette.hiContrast"
9
9
  });
10
10
  const description = css.raw({
11
- flex: "0 1 auto",
11
+ flexGrow: "0",
12
+ flexShrink: "1",
12
13
  textStyle: "likec4.node.secondary",
13
14
  color: "likec4.palette.loContrast",
14
15
  textAlign: "center",
@@ -82,6 +83,8 @@ const elementTitle = sva({
82
83
  flex: "1",
83
84
  height: "fit-content",
84
85
  width: "fit-content",
86
+ maxHeight: "100%",
87
+ maxWidth: "100%",
85
88
  margin: "0 auto",
86
89
  display: "flex",
87
90
  alignItems: "center",
@@ -133,6 +136,8 @@ const elementTitle = sva({
133
136
  textContainer: {
134
137
  height: "fit-content",
135
138
  width: "fit-content",
139
+ maxHeight: "100%",
140
+ maxWidth: "100%",
136
141
  flex: "0 1 auto",
137
142
  display: "flex",
138
143
  flexDirection: "column",
@@ -1,7 +1,8 @@
1
- import { DiagramNode } from '@likec4/core/types';
1
+ import { DiagramNode, RichTextOrEmpty } from '@likec4/core/types';
2
2
  import { Simplify } from 'type-fest';
3
3
  import { NodeProps, NonOptional } from '../../types';
4
- type Data = Simplify<NonOptional<Pick<DiagramNode, 'title' | 'technology' | 'description' | 'color' | 'style'>> & {
4
+ type Data = Simplify<NonOptional<Pick<DiagramNode, 'title' | 'technology' | 'color' | 'style'>> & {
5
+ description?: RichTextOrEmpty;
5
6
  icon?: string | null;
6
7
  }>;
7
8
  type ElementTitleProps = NodeProps<Data> & {
@@ -4,6 +4,7 @@ import { Box } from '@likec4/styles/jsx';
4
4
  import { Text } from '@mantine/core';
5
5
  import { isTruthy, isEmpty, isNumber } from 'remeda';
6
6
  import { IconRenderer } from '../../../context/IconRenderer.js';
7
+ import { MarkdownBlock } from '../MarkdownBlock.js';
7
8
  import { nodeSizes } from './ElementNodeContainer.js';
8
9
  import { elementTitle, iconSize, elementIcon } from './ElementTitle.css.js';
9
10
 
@@ -18,7 +19,7 @@ function ElementTitle({ id, data, iconSize: iconSize$1 }) {
18
19
  });
19
20
  const classes = elementTitle({
20
21
  hasIcon: isTruthy(elementIcon$1),
21
- hasDescription: !isEmpty(data.description ?? ""),
22
+ hasDescription: !!data.description?.nonEmpty,
22
23
  hasTechnology: !isEmpty(data.technology ?? "")
23
24
  });
24
25
  const size = nodeSizes(data.style).size;
@@ -41,7 +42,7 @@ function ElementTitle({ id, data, iconSize: iconSize$1 }) {
41
42
  /* @__PURE__ */ jsx(
42
43
  Text,
43
44
  {
44
- component: "h3",
45
+ component: "div",
45
46
  className: cx(classes.title, "likec4-element-title"),
46
47
  lineClamp: isSmOrXs ? 2 : 3,
47
48
  children: data.title
@@ -56,12 +57,14 @@ function ElementTitle({ id, data, iconSize: iconSize$1 }) {
56
57
  }
57
58
  ),
58
59
  data.description && /* @__PURE__ */ jsx(
59
- Text,
60
+ MarkdownBlock,
60
61
  {
61
- component: "div",
62
62
  className: cx(classes.description, "likec4-element-description"),
63
- lineClamp: isSmOrXs ? 3 : 5,
64
- children: data.description
63
+ value: data.description,
64
+ uselikec4palette: true,
65
+ hideIfEmpty: true,
66
+ maxHeight: data.description.isMarkdown ? "8rem" : void 0,
67
+ lineClamp: isSmOrXs ? 3 : 5
65
68
  }
66
69
  )
67
70
  ] })
@@ -16,4 +16,5 @@ export { ElementNodeContainer } from './element/ElementNodeContainer';
16
16
  export { ElementShape } from './element/ElementShape';
17
17
  export { ElementTag, ElementTags } from './element/ElementTags';
18
18
  export { ElementTitle } from './element/ElementTitle';
19
+ export { MarkdownBlock } from './MarkdownBlock';
19
20
  export { DefaultHandles } from './NodeHandles';
@@ -2,7 +2,6 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
3
  import { Box, ActionIcon } from '@mantine/core';
4
4
  import { shallowEqual } from '@mantine/hooks';
5
- import { IconX } from '@tabler/icons-react';
6
5
  import { memo, useState } from 'react';
7
6
  import { isBoolean } from 'remeda';
8
7
  import { FramerMotionConfig } from '../context/FramerMotionConfig.js';
@@ -12,6 +11,7 @@ import { Overlay } from '../overlays/overlay/Overlay.js';
12
11
  import { ShadowRoot } from './ShadowRoot.js';
13
12
  import { useColorScheme, useShadowRootStyle, cssInteractive } from './styles.css.js';
14
13
  import { ViewNotFound, ErrorMessage } from './ViewNotFound.js';
14
+ import IconX from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
15
15
 
16
16
  function LikeC4View({
17
17
  viewId,
@@ -0,0 +1,31 @@
1
+ export { compoundDeploymentNode, compoundElementNode, deploymentNode, elementNode, viewGroupNode } from '../custom/customNodes.js';
2
+ export { CompoundActionButton } from '../base/primitives/compound/CompoundActionButton.js';
3
+ export { CompoundDetailsButton } from '../base/primitives/compound/CompoundDetailsButton.js';
4
+ export { CompoundNodeContainer } from '../base/primitives/compound/CompoundNodeContainer.js';
5
+ export { CompoundTitle } from '../base/primitives/compound/CompoundTitle.js';
6
+ export { DefaultHandles } from '../base/primitives/NodeHandles.js';
7
+ export { ElementActionButtons } from '../base/primitives/element/ElementActionButtons.js';
8
+ export { ElementDetailsButton } from '../base/primitives/element/ElementDetailsButton.js';
9
+ export { ElementNodeContainer } from '../base/primitives/element/ElementNodeContainer.js';
10
+ export { ElementShape } from '../base/primitives/element/ElementShape.js';
11
+ export { ElementTag, ElementTags } from '../base/primitives/element/ElementTags.js';
12
+ export { ElementTitle } from '../base/primitives/element/ElementTitle.js';
13
+ export { MarkdownBlock } from '../base/primitives/MarkdownBlock.js';
14
+ export { IconOrShapeRenderer, IconRenderer, IconRendererProvider } from '../context/IconRenderer.js';
15
+ export { CompoundActions } from '../likec4diagram/custom/nodes/CompoundActions.js';
16
+ export { CompoundDeploymentNode, CompoundDetailsButtonWithHandler, CompoundElementNode, DeploymentNode, ElementDetailsButtonWithHandler, ElementNode, ViewGroupNode } from '../likec4diagram/custom/nodes/nodes.js';
17
+ export { CompoundDeploymentToolbar, CompoundElementToolbar } from '../likec4diagram/custom/nodes/toolbar/CompoundToolbar.js';
18
+ export { DeploymentElementActions, ElementActions } from '../likec4diagram/custom/nodes/ElementActions.js';
19
+ export { DeploymentElementToolbar, ElementToolbar } from '../likec4diagram/custom/nodes/toolbar/ElementToolbar.js';
20
+ export { Toolbar } from '../likec4diagram/custom/nodes/toolbar/Toolbar.js';
21
+ export { IfEnabled, IfNotEnabled, IfNotReadOnly, IfReadOnly, useEnabledFeatures } from '../context/DiagramFeatures.js';
22
+ export { Overlay } from '../overlays/overlay/Overlay.js';
23
+ export { useDiagramEventHandlers } from '../context/DiagramEventHandlers.js';
24
+ export { useCurrentViewId } from '../hooks/useCurrentViewId.js';
25
+ export { useDiagram, useDiagramContext } from '../hooks/useDiagram.js';
26
+ export { useDiagramActorRef } from '../hooks/safeContext.js';
27
+ export { useXYFlow, useXYInternalNode, useXYStore, useXYStoreApi } from '../hooks/useXYFlow.js';
28
+ export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from '../likec4model/useLikeC4Model.js';
29
+ export { useMantinePortalProps } from '../hooks/useMantinePortalProps.js';
30
+ export { useSetState } from '../hooks/useSetState.js';
31
+ export { useUpdateEffect } from '../hooks/useUpdateEffect.js';
@@ -6,6 +6,7 @@ export { useDiagramEventHandlers } from '../context/DiagramEventHandlers.js';
6
6
  export { useEnabledFeatures } from '../context/DiagramFeatures.js';
7
7
  export { useCurrentViewId } from '../hooks/useCurrentViewId.js';
8
8
  export { useDiagram, useDiagramContext } from '../hooks/useDiagram.js';
9
+ export { useDiagramActorRef } from '../hooks/safeContext.js';
9
10
  export { useXYFlow, useXYInternalNode, useXYStore, useXYStoreApi } from '../hooks/useXYFlow.js';
10
11
  export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from '../likec4model/useLikeC4Model.js';
11
12
  export { useMantinePortalProps } from '../hooks/useMantinePortalProps.js';
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Box } from '@likec4/styles/jsx';
3
3
  import { Notification, ScrollAreaAutosize, Code, Group, Button } from '@mantine/core';
4
- import { IconX } from '@tabler/icons-react';
4
+ import IconX from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
5
5
 
6
6
  function ErrorFallback({ error, resetErrorBoundary }) {
7
7
  const errorString = error instanceof Error ? error.message : "Unknown error";
@@ -1,8 +1,9 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { cx, css, cva } from '@likec4/styles/css';
3
3
  import { CopyButton, Anchor, ActionIcon, Box, Text } from '@mantine/core';
4
- import { IconCheck, IconCopy } from '@tabler/icons-react';
5
4
  import { stopPropagation } from '../utils/xyflow.js';
5
+ import IconCheck from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
6
+ import IconCopy from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js';
6
7
 
7
8
  const link = cva({
8
9
  base: {
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
3
  import { UnstyledButton, Group, Text } from '@mantine/core';
4
- import { IconSearch } from '@tabler/icons-react';
5
4
  import { isMacOs } from '@xyflow/system';
6
5
  import { placeholder, shortcut, root } from './SearchControl.css.js';
6
+ import IconSearch from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
7
7
 
8
8
  function SearchControl({ className, ...others }) {
9
9
  const isMac = isMacOs();
@@ -22,8 +22,9 @@ export declare function IfEnabled({ feature, children, and, }: PropsWithChildren
22
22
  feature: FeatureName;
23
23
  and?: boolean;
24
24
  }>): import("react/jsx-runtime").JSX.Element | null;
25
- export declare function IfNotEnabled({ feature, children, }: PropsWithChildren<{
25
+ export declare function IfNotEnabled({ feature, children }: PropsWithChildren<{
26
26
  feature: FeatureName;
27
27
  }>): import("react/jsx-runtime").JSX.Element | null;
28
- export declare function IfNotReadOnly({ children, }: PropsWithChildren): import("react/jsx-runtime").JSX.Element | null;
28
+ export declare function IfReadOnly({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element | null;
29
+ export declare function IfNotReadOnly({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element | null;
29
30
  export {};
@@ -90,5 +90,20 @@ function IfEnabled({
90
90
  const enabled = useEnabledFeatures()[`enable${feature}`] === true;
91
91
  return enabled && and ? /* @__PURE__ */ jsx(Fragment, { children }) : null;
92
92
  }
93
+ function IfNotEnabled({ feature, children }) {
94
+ const notEnabled = useEnabledFeatures()[`enable${feature}`] !== true;
95
+ return notEnabled ? /* @__PURE__ */ jsx(Fragment, { children }) : null;
96
+ }
97
+ function IfReadOnly({ children }) {
98
+ const isReadOnly = useEnabledFeatures()[`enableReadOnly`] === true;
99
+ return isReadOnly ? /* @__PURE__ */ jsx(Fragment, { children }) : null;
100
+ }
101
+ function IfNotReadOnly({ children }) {
102
+ const isReadOnly = useEnabledFeatures()[`enableReadOnly`] === true;
103
+ if (isReadOnly) {
104
+ return null;
105
+ }
106
+ return /* @__PURE__ */ jsx(Fragment, { children });
107
+ }
93
108
 
94
- export { AllDisabled, DiagramFeatures, IfEnabled, useEnabledFeatures };
109
+ export { AllDisabled, DiagramFeatures, IfEnabled, IfNotEnabled, IfNotReadOnly, IfReadOnly, useEnabledFeatures };
@@ -1,7 +1,12 @@
1
1
  import { jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
- import { IconCylinder, IconRectangularPrism, IconReorder, IconUser, IconDeviceMobile, IconBrowser } from '@tabler/icons-react';
4
3
  import { useContext, createContext } from 'react';
4
+ import IconCylinder from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js';
5
+ import IconRectangularPrism from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js';
6
+ import IconReorder from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js';
7
+ import IconUser from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js';
8
+ import IconDeviceMobile from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js';
9
+ import IconBrowser from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js';
5
10
 
6
11
  const IconRendererContext = createContext(null);
7
12
  function IconRendererProvider({
@@ -2,7 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { isTagColorSpecified } from '@likec4/core';
3
3
  import { useMantineStyleNonce } from '@mantine/core';
4
4
  import { useDeepCompareMemo } from '@react-hookz/web';
5
- import { createContext, useContext } from 'react';
5
+ import { useContext, createContext } from 'react';
6
6
  import { pipe, entries, flatMap, join } from 'remeda';
7
7
  import { useLikeC4Specification } from '../likec4model/useLikeC4Model.js';
8
8