@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
@@ -2,7 +2,7 @@ import { NodeProps } from '../../../base';
2
2
  import { RelationshipsBrowserTypes } from '../_types';
3
3
  import { MemoExoticComponent } from 'react';
4
4
  import { Dimmed } from '../../../base/types.Base';
5
- import { ElementStyle, Color, Any, ViewId, Fqn, IconUrl } from '@likec4/core';
5
+ import { ElementStyle, Color, Any, ViewId, Fqn, RichTextOrEmpty, IconUrl } from '@likec4/core';
6
6
  import { Tags } from '@likec4/core/types/aux';
7
7
  export declare const ElementNode: MemoExoticComponent<(props: NodeProps<{
8
8
  hovered?: boolean;
@@ -15,13 +15,13 @@ export declare const ElementNode: MemoExoticComponent<(props: NodeProps<{
15
15
  shape: "rectangle" | "person" | "browser" | "mobile" | "cylinder" | "storage" | "queue";
16
16
  tags: Tags<Any>;
17
17
  technology: string | null | undefined;
18
- description: string | null | undefined;
19
18
  navigateTo: ViewId<string> | null | undefined;
20
19
  column: RelationshipsBrowserTypes.Column;
21
20
  fqn: Fqn;
22
21
  icon: string | null;
23
22
  ports: RelationshipsBrowserTypes.Ports;
24
23
  existsInCurrentView: boolean;
24
+ description: RichTextOrEmpty;
25
25
  }, string>) => import("react/jsx-runtime").JSX.Element>;
26
26
  export declare const CompoundNode: MemoExoticComponent<(props: NodeProps<{
27
27
  hovered?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { RelationshipsViewData } from '@likec4/core/compute-view/relationships';
2
- import { DiagramEdge, DiagramNode, DiagramView, ElementKind, Fqn, ViewId } from '@likec4/core/types';
2
+ import { DiagramEdge, DiagramNode, DiagramView, ElementKind, Fqn, RichTextOrEmpty, ViewId } from '@likec4/core/types';
3
3
  import { LikeC4ViewModel } from '@likec4/core/model';
4
4
  import { RelationshipsBrowserTypes } from './_types';
5
5
  export type LayoutRelationshipsViewResult = {
@@ -11,12 +11,13 @@ export type LayoutRelationshipsViewResult = {
11
11
  };
12
12
  export declare namespace LayoutRelationshipsViewResult {
13
13
  const Empty: ElementKind;
14
- type Node = Omit<DiagramNode, 'deploymentRef' | 'inEdges' | 'outEdges'> & {
14
+ type Node = Omit<DiagramNode, 'deploymentRef' | 'description' | 'inEdges' | 'outEdges'> & {
15
+ description: RichTextOrEmpty;
15
16
  column: RelationshipsBrowserTypes.Column;
16
17
  ports: RelationshipsBrowserTypes.Ports;
17
18
  existsInCurrentView: boolean;
18
19
  };
19
- type Edge = DiagramEdge & {
20
+ type Edge = Omit<DiagramEdge, 'description'> & {
20
21
  sourceFqn: Fqn;
21
22
  targetFqn: Fqn;
22
23
  sourceHandle: string;
@@ -1,7 +1,7 @@
1
1
  import { computeRelationshipsView, treeFromElements } from '@likec4/core/compute-view/relationships';
2
2
  import { useMemo } from 'react';
3
3
  import dagre from '@dagrejs/dagre';
4
- import { toArray, invariant, ifind, nonNullable, DefaultMap } from '@likec4/core';
4
+ import { toArray, invariant, RichText, ifind, nonNullable, DefaultMap } from '@likec4/core';
5
5
  import { pipe, concat, map, groupBy, prop, forEachObj, filter, mapToObj, find, only, unique, tap, reduce, sortBy } from 'remeda';
6
6
  import { useLikeC4Model } from '../../likec4model/useLikeC4Model.js';
7
7
 
@@ -329,7 +329,7 @@ function layoutRelationshipsView(data, scope) {
329
329
  y: position.y,
330
330
  position: [position.x, position.y],
331
331
  title: "empty node",
332
- description: null,
332
+ description: RichText.EMPTY,
333
333
  technology: null,
334
334
  tags: [],
335
335
  links: [],
@@ -373,7 +373,7 @@ function layoutRelationshipsView(data, scope) {
373
373
  y: position.y,
374
374
  position: [position.x, position.y],
375
375
  title: element.title,
376
- description: element.description,
376
+ description: RichText.from(element.description),
377
377
  technology: element.technology,
378
378
  tags: [...element.tags],
379
379
  links: null,
@@ -3,7 +3,6 @@ import { ifilter, sortParentsFirst, isAncestor, nameFromFqn } from '@likec4/core
3
3
  import { cx } from '@likec4/styles/css';
4
4
  import { useTree, Tree, ActionIcon, UnstyledButton, Box, Group, Highlight, Tooltip, Text } from '@mantine/core';
5
5
  import { useCallbackRef } from '@mantine/hooks';
6
- import { IconChevronRight } from '@tabler/icons-react';
7
6
  import * as m from 'motion/react-m';
8
7
  import { memo, useMemo, useEffect } from 'react';
9
8
  import { isEmpty, pipe, reduce, only, first } from 'remeda';
@@ -16,6 +15,7 @@ import { focusable, buttonsva } from './_shared.css.js';
16
15
  import { treeSubtree, treeLabel, treeRoot, treeNode, elementIcon, elementExpandIcon, elementTitleAndId, elementId, elementViewsCount } from './ElementsColumn.css.js';
17
16
  import { stopAndPrevent, moveFocusToSearchInput, queryAllFocusable, centerY } from './utils.js';
18
17
  import { NothingFound } from './ViewsColum.js';
18
+ import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
19
19
 
20
20
  const btn = buttonsva();
21
21
  const ElementsColumn = memo(() => {
@@ -224,7 +224,7 @@ function ElementTreeNode({ node, elementProps, hasChildren, expanded }) {
224
224
  }
225
225
  ) })
226
226
  ] }),
227
- /* @__PURE__ */ jsx(Highlight, { component: "div", highlight: searchTerms, className: btn.description, lineClamp: 1, children: element.description || "No description" })
227
+ /* @__PURE__ */ jsx(Highlight, { component: "div", highlight: searchTerms, className: btn.description, lineClamp: 1, children: element.description.text || "No description" })
228
228
  ] }),
229
229
  /* @__PURE__ */ jsx(Text, { component: "div", className: cx(elementViewsCount, btn.descriptionColor), fz: "xs", children: views.length === 0 ? "No views" : /* @__PURE__ */ jsxs(Fragment, { children: [
230
230
  views.length,
@@ -1,12 +1,12 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { FocusTrap, Group, Title, ActionIcon, ScrollAreaAutosize, Stack } from '@mantine/core';
3
3
  import { useWindowEvent } from '@mantine/hooks';
4
- import { IconX } from '@tabler/icons-react';
5
4
  import * as m from 'motion/react-m';
6
5
  import { useSearchActor } from '../hooks.js';
7
6
  import { pickviewBackdrop, pickview, pickviewGroup } from './styles.css.js';
8
7
  import { ViewButton } from './ViewsColum.js';
9
8
  import { useLikeC4Model } from '../../likec4model/useLikeC4Model.js';
9
+ 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';
10
10
 
11
11
  function PickView({ elementFqn }) {
12
12
  const searchActorRef = useSearchActor();
@@ -2,12 +2,12 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { css } from '@likec4/styles/css';
3
3
  import { HStack } from '@likec4/styles/jsx';
4
4
  import { Button } from '@mantine/core';
5
- import { IconX } from '@tabler/icons-react';
6
5
  import { useRef } from 'react';
7
6
  import { useLikeC4Model } from '../../likec4model/useLikeC4Model.js';
8
7
  import { useUpdateSearch, useNormalizedSearch } from '../hooks.js';
9
8
  import { focusToFirstFoundElement, moveFocusToSearchInput } from './utils.js';
10
9
  import { ElementTag } from '../../base/primitives/element/ElementTags.js';
10
+ 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';
11
11
 
12
12
  function SearchByTags() {
13
13
  const ref = useRef(null);
@@ -1,13 +1,13 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useCombobox, ComboboxOption, Text, Combobox, ComboboxTarget, Input, rem, ComboboxDropdown, ComboboxOptions, ScrollAreaAutosize, ComboboxEmpty } from '@mantine/core';
3
3
  import { useFocusWithin, useWindowEvent, useMergedRef } from '@mantine/hooks';
4
- import { IconSearch } from '@tabler/icons-react';
5
4
  import { memo, useRef } from 'react';
6
5
  import { keys } from 'remeda';
7
6
  import { useLikeC4Model } from '../../likec4model/useLikeC4Model.js';
8
7
  import { useSearchActor, useSearch } from '../hooks.js';
9
8
  import { input } from './styles.css.js';
10
9
  import { moveFocusToSearchInput, stopAndPrevent, focusToFirstFoundElement } from './utils.js';
10
+ 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';
11
11
 
12
12
  function startingWithKind(search) {
13
13
  return search.match(/^(k|ki|kin|kind|kind:)$/) != null;
@@ -2,7 +2,6 @@ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
3
  import { Box } from '@likec4/styles/jsx';
4
4
  import { Stack, VisuallyHidden, UnstyledButton, createScopedKeydownHandler, ThemeIcon, Group, Highlight, Badge } from '@mantine/core';
5
- import { IconStack2, IconZoomScan } from '@tabler/icons-react';
6
5
  import * as m from 'motion/react-m';
7
6
  import { memo, useRef } from 'react';
8
7
  import { first } from 'remeda';
@@ -13,6 +12,8 @@ import { useNormalizedSearch, useSearchActor } from '../hooks.js';
13
12
  import { emptyBoX, buttonsva, focusable } from './_shared.css.js';
14
13
  import { moveFocusToSearchInput, queryAllFocusable, centerY } from './utils.js';
15
14
  import { viewButton } from './ViewsColumn.css.js';
15
+ import IconStack2 from '../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js';
16
+ 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';
16
17
 
17
18
  const NothingFound = () => /* @__PURE__ */ jsx(Box, { className: emptyBoX, children: "Nothing found" });
18
19
  const ViewsColumn = memo(() => {
@@ -122,11 +123,11 @@ function ViewButton({ className, view, loop = false, search, ...props }) {
122
123
  /* @__PURE__ */ jsx(
123
124
  Highlight,
124
125
  {
125
- highlight: view.$view.description ? search : "",
126
+ highlight: view.description.nonEmpty ? search : "",
126
127
  component: "div",
127
128
  className: btn.description,
128
129
  lineClamp: 1,
129
- children: view.$view.description || "No description"
130
+ children: view.description.text || "No description"
130
131
  }
131
132
  )
132
133
  ] })
@@ -10,7 +10,15 @@ import { useViewToNodesEdges } from '../likec4diagram/useViewToNodesEdges.js';
10
10
  import { diagramMachine } from './diagram-machine.js';
11
11
  import { syncManualLayoutActorLogic } from './syncManualLayoutActor.js';
12
12
 
13
- const selectToggledFeatures = (state) => state.context.toggledFeatures;
13
+ const selectToggledFeatures = (state) => {
14
+ if (state.context.features.enableReadOnly) {
15
+ return {
16
+ ...state.context.toggledFeatures,
17
+ enableReadOnly: true
18
+ };
19
+ }
20
+ return state.context.toggledFeatures;
21
+ };
14
22
  function DiagramActorProvider({
15
23
  view,
16
24
  zoomable,
@@ -302,7 +302,7 @@ const _diagramMachine = setup({
302
302
  if (n.data.tags?.includes(event.tag)) {
303
303
  return setDimmed(n, false);
304
304
  }
305
- return setDimmed(n, "immediate");
305
+ return setDimmed(n, true);
306
306
  })
307
307
  };
308
308
  }),