@likec4/diagram 1.48.0 → 1.50.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 (307) hide show
  1. package/README.md +7 -9
  2. package/adhoc-editor/package.json +4 -0
  3. package/dist/LikeC4Diagram.d.ts +2 -1
  4. package/dist/LikeC4Diagram.js +77 -79
  5. package/dist/LikeC4Diagram.props.d.ts +9 -1
  6. package/dist/LikeC4ModelProvider.d.ts +4 -4
  7. package/dist/LikeC4ModelProvider.js +2 -2
  8. package/dist/LikeC4ProjectsOverview.d.ts +3 -2
  9. package/dist/LikeC4ProjectsProvider.d.ts +2 -1
  10. package/dist/LikeC4ProjectsProvider.js +4 -4
  11. package/dist/LikeC4Styles.d.ts +2 -1
  12. package/dist/LikeC4View.d.ts +14 -1
  13. package/dist/LikeC4View.js +31 -18
  14. package/dist/ReactLikeC4.d.ts +2 -1
  15. package/dist/ReactLikeC4.js +3 -1
  16. package/dist/StaticLikeC4Diagram.d.ts +2 -1
  17. package/dist/StaticLikeC4Diagram.js +1 -0
  18. package/dist/_virtual/store-1b2fbb72.cjs.js +3 -0
  19. package/dist/_virtual/xstate-store-react.cjs.js +5 -0
  20. package/dist/_virtual/xstate-store-react.cjs2.js +3 -0
  21. package/dist/adhoc-editor/EditorPanel.d.ts +1 -0
  22. package/dist/adhoc-editor/EditorPanel.js +105 -0
  23. package/dist/adhoc-editor/ElementsTree.d.ts +2 -0
  24. package/dist/adhoc-editor/ElementsTree.js +142 -0
  25. package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +1 -1
  26. package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +46 -43
  27. package/dist/adhoc-editor/components/Tree.d.ts +48 -0
  28. package/dist/adhoc-editor/components/Tree.js +296 -0
  29. package/dist/adhoc-editor/hooks.d.ts +3 -3
  30. package/dist/adhoc-editor/hooks.js +5 -23
  31. package/dist/adhoc-editor/index.d.ts +1 -1
  32. package/dist/adhoc-editor/index.js +1 -0
  33. package/dist/adhoc-editor/{ActorProvider.d.ts → state/ActorProvider.d.ts} +1 -3
  34. package/dist/adhoc-editor/{ActorProvider.js → state/ActorProvider.js} +10 -11
  35. package/dist/adhoc-editor/state/actor.d.ts +13 -0
  36. package/dist/adhoc-editor/{actor.editor.d.ts → state/actor.editor.d.ts} +6 -4
  37. package/dist/adhoc-editor/state/actor.editor.js +205 -0
  38. package/dist/adhoc-editor/{actor.js → state/actor.js} +2 -6
  39. package/dist/adhoc-editor/{actor.layouter.d.ts → state/actor.layouter.d.ts} +7 -4
  40. package/dist/adhoc-editor/{actor.layouter.js → state/actor.layouter.js} +17 -13
  41. package/dist/adhoc-editor/{actor.types.d.ts → state/actor.types.d.ts} +12 -6
  42. package/dist/adhoc-editor/{actor.types.js → state/actor.types.js} +8 -1
  43. package/dist/adhoc-editor/state/panel.d.ts +95 -0
  44. package/dist/adhoc-editor/state/panel.js +139 -0
  45. package/dist/adhoc-editor/state/utils.d.ts +17 -0
  46. package/dist/adhoc-editor/state/utils.js +32 -0
  47. package/dist/adhoc-editor/useElementsTree.d.ts +18 -0
  48. package/dist/adhoc-editor/useElementsTree.js +130 -0
  49. package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +1 -1
  50. package/dist/base/const.d.ts +1 -0
  51. package/dist/base-primitives/compound/CompoundActionButton.js +26 -12
  52. package/dist/base-primitives/compound/CompoundDetailsButton.js +22 -9
  53. package/dist/base-primitives/compound/CompoundNodeContainer.js +5 -4
  54. package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
  55. package/dist/base-primitives/edge/EdgeLabel.js +3 -4
  56. package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +2 -1
  57. package/dist/base-primitives/edge/EdgeLabelContainer.js +12 -19
  58. package/dist/base-primitives/edge/EdgeMarkers.js +3 -3
  59. package/dist/base-primitives/element/ElementActionButtons.js +35 -10
  60. package/dist/base-primitives/element/ElementDetailsButton.js +47 -18
  61. package/dist/base-primitives/element/ElementNodeContainer.d.ts +3 -3
  62. package/dist/base-primitives/element/ElementNodeContainer.js +23 -10
  63. package/dist/base-primitives/element/ElementShape.d.ts +4 -4
  64. package/dist/base-primitives/element/ElementShape.js +71 -8
  65. package/dist/components/ErrorFallback.js +1 -1
  66. package/dist/components/Link.js +3 -3
  67. package/dist/components/Logo.js +1 -1
  68. package/dist/components/NavigationPanel.js +2 -4
  69. package/dist/components/PortalToContainer.js +3 -4
  70. package/dist/components/RootContainer.js +9 -16
  71. package/dist/components/ViewNotFound.d.ts +3 -3
  72. package/dist/components/ViewNotFound.js +30 -26
  73. package/dist/context/CurrentViewModelProvider.d.ts +2 -0
  74. package/dist/context/CurrentViewModelProvider.js +12 -0
  75. package/dist/context/DefaultMantineProvider.d.ts +1 -1
  76. package/dist/context/DefaultMantineProvider.js +10 -1
  77. package/dist/context/DiagramEventHandlers.d.ts +5 -5
  78. package/dist/context/DiagramEventHandlers.js +10 -4
  79. package/dist/context/DiagramFeatures.d.ts +8 -7
  80. package/dist/context/DiagramFeatures.js +5 -3
  81. package/dist/context/FramerMotionConfig.d.ts +1 -3
  82. package/dist/context/IconRenderer.d.ts +5 -4
  83. package/dist/context/IconRenderer.js +51 -24
  84. package/dist/context/LikeC4ModelContext.d.ts +10 -5
  85. package/dist/context/LikeC4ModelContext.js +11 -3
  86. package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
  87. package/dist/context/LikeC4ProjectsContext.js +6 -2
  88. package/dist/context/RootContainerContext.d.ts +10 -3
  89. package/dist/context/RootContainerContext.js +8 -3
  90. package/dist/context/TagStylesContext.js +1 -1
  91. package/dist/custom/index.js +16 -15
  92. package/dist/editor/LikeC4EditorProvider.js +1 -1
  93. package/dist/editor/applyChangesToManualLayout.js +7 -7
  94. package/dist/editor/editorActor.actions.js +20 -20
  95. package/dist/editor/editorActor.setup.js +1 -1
  96. package/dist/editor/editorActor.states.js +0 -9
  97. package/dist/editor/useEditorActorLogic.d.ts +1 -2
  98. package/dist/editor/useEditorActorLogic.js +8 -11
  99. package/dist/hooks/index.d.ts +2 -2
  100. package/dist/hooks/safeContext.d.ts +4 -5
  101. package/dist/hooks/useCallbackRef.js +7 -6
  102. package/dist/hooks/useCurrentView.js +5 -10
  103. package/dist/hooks/useCurrentViewModel.d.ts +2 -6
  104. package/dist/hooks/useCurrentViewModel.js +3 -7
  105. package/dist/hooks/useDiagram.d.ts +9 -1
  106. package/dist/hooks/useDiagram.js +8 -2
  107. package/dist/hooks/useDiagramCompareLayout.d.ts +5 -5
  108. package/dist/hooks/useLikeC4ElementsTree.d.ts +1 -1
  109. package/dist/hooks/useLikeC4ElementsTree.js +1 -1
  110. package/dist/hooks/useLikeC4Model.d.ts +6 -2
  111. package/dist/hooks/useLikeC4Model.js +7 -9
  112. package/dist/hooks/useLikeC4Project.d.ts +4 -6
  113. package/dist/hooks/useLikeC4Project.js +19 -31
  114. package/dist/hooks/useLikeC4Styles.js +3 -9
  115. package/dist/hooks/useMantinePortalProps.d.ts +1 -1
  116. package/dist/hooks/useMediaPrint.d.ts +0 -2
  117. package/dist/hooks/useOverlaysActor.js +4 -4
  118. package/dist/hooks/useSearchActor.js +4 -4
  119. package/dist/index.d.ts +1 -3
  120. package/dist/index.js +2 -2
  121. package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -1
  122. package/dist/likec4diagram/DiagramXYFlow.js +5 -7
  123. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +22 -24
  124. package/dist/likec4diagram/custom/edges/edges.css.js +2 -1
  125. package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +40 -55
  126. package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
  127. package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -2
  128. package/dist/likec4diagram/custom/nodes/NodeDrifts.js +3 -20
  129. package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +6 -0
  130. package/dist/likec4diagram/custom/nodes/NodeNotes.js +286 -0
  131. package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +4 -2
  132. package/dist/likec4diagram/custom/nodes/nodes.js +5 -2
  133. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +12 -8
  134. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +3 -3
  135. package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +1 -1
  136. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +8 -28
  137. package/dist/likec4diagram/state/DiagramActorProvider.js +30 -56
  138. package/dist/likec4diagram/state/diagram-api.d.ts +11 -0
  139. package/dist/likec4diagram/state/diagram-api.js +15 -0
  140. package/dist/likec4diagram/state/machine.actions.d.ts +27 -0
  141. package/dist/likec4diagram/state/machine.actions.js +78 -21
  142. package/dist/likec4diagram/state/machine.actions.layout.d.ts +1 -0
  143. package/dist/likec4diagram/state/machine.actions.layout.js +38 -3
  144. package/dist/likec4diagram/state/machine.js +4 -1
  145. package/dist/likec4diagram/state/machine.setup.d.ts +19 -2
  146. package/dist/likec4diagram/state/machine.state.navigating.js +1 -1
  147. package/dist/likec4diagram/state/machine.state.ready.d.ts +61 -1
  148. package/dist/likec4diagram/state/machine.state.ready.js +11 -3
  149. package/dist/likec4diagram/state/utils.d.ts +2 -1
  150. package/dist/likec4diagram/state/utils.js +1 -1
  151. package/dist/likec4diagram/types.d.ts +2 -2
  152. package/dist/likec4diagram/ui/notation/NotationPanel.css.js +1 -1
  153. package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +1 -1
  154. package/dist/likec4diagram/ui/notation/NotationPanel.js +6 -29
  155. package/dist/likec4diagram/useLayoutConstraints.d.ts +12 -12
  156. package/dist/likec4diagram/useLayoutConstraints.js +125 -86
  157. package/dist/likec4diagram/xyflow-diagram/diagram-view.js +2 -0
  158. package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +7 -2
  159. package/dist/navigationpanel/NavigationPanel.js +2 -2
  160. package/dist/navigationpanel/NavigationPanelDropdown.js +13 -13
  161. package/dist/navigationpanel/_common.js +2 -2
  162. package/dist/navigationpanel/actor.js +1 -1
  163. package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
  164. package/dist/navigationpanel/comparepanel/ComparePanel.js +155 -29
  165. package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
  166. package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -0
  167. package/dist/navigationpanel/comparepanel/DriftsSummary.js +264 -0
  168. package/dist/navigationpanel/controls/DetailsControls.js +4 -4
  169. package/dist/navigationpanel/controls/LayoutWarning.js +1 -1
  170. package/dist/navigationpanel/controls/LogoButton.js +1 -1
  171. package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
  172. package/dist/navigationpanel/controls/OpenSource.js +1 -1
  173. package/dist/navigationpanel/controls/SearchControl.js +1 -1
  174. package/dist/navigationpanel/controls/ToggleReadonly.js +3 -3
  175. package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
  176. package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
  177. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
  178. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
  179. package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
  180. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +6 -6
  181. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +16 -16
  182. package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
  183. package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +1 -1
  184. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
  185. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
  186. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +2 -2
  187. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +1 -1
  188. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +1 -1
  189. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
  190. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +1 -1
  191. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +2 -2
  192. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +1 -1
  193. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +1 -1
  194. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +1 -1
  195. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +1 -1
  196. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +14 -0
  197. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +2 -2
  198. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +2 -2
  199. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +1 -1
  200. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +1 -1
  201. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +1 -1
  202. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +2 -2
  203. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +14 -0
  204. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +1 -1
  205. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +1 -1
  206. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +14 -0
  207. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +1 -1
  208. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +2 -2
  209. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +2 -2
  210. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +2 -2
  211. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +2 -2
  212. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +2 -2
  213. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +2 -2
  214. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +2 -2
  215. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +2 -2
  216. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +1 -1
  217. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +1 -1
  218. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +2 -2
  219. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +2 -2
  220. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +1 -1
  221. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +1 -1
  222. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +1 -1
  223. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +1 -1
  224. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +2 -2
  225. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +2 -2
  226. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +14 -0
  227. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +2 -2
  228. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +1 -1
  229. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +1 -1
  230. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +1 -1
  231. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +2 -2
  232. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +1 -1
  233. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +1 -1
  234. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +1 -1
  235. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +1 -1
  236. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +1 -1
  237. package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/dist/store-1b2fbb72.cjs.js +742 -0
  238. package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/react/dist/xstate-store-react.cjs.js +175 -0
  239. package/dist/overlays/element-details/ElementDetailsCard.css.js +11 -11
  240. package/dist/overlays/element-details/ElementDetailsCard.js +44 -45
  241. package/dist/overlays/element-details/MetadataValue.js +7 -7
  242. package/dist/overlays/element-details/TabPanelDeployments.js +4 -4
  243. package/dist/overlays/element-details/TabPanelRelationships.css.js +5 -5
  244. package/dist/overlays/element-details/TabPanelRelationships.js +4 -5
  245. package/dist/overlays/element-details/TabPanelStructure.css.js +3 -3
  246. package/dist/overlays/element-details/TabPanelStructure.js +1 -1
  247. package/dist/overlays/element-details/actorContext.d.ts +1 -1
  248. package/dist/overlays/overlaysActor.js +1 -1
  249. package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
  250. package/dist/overlays/relationship-details/SelectEdge.css.js +4 -4
  251. package/dist/overlays/relationship-details/SelectEdge.js +2 -2
  252. package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
  253. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -6
  254. package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
  255. package/dist/overlays/relationships-browser/SelectElement.js +2 -2
  256. package/dist/overlays/relationships-browser/actor.js +1 -1
  257. package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
  258. package/dist/overlays/relationships-browser/custom/EmptyNode.js +1 -1
  259. package/dist/overlays/relationships-browser/useViewToNodesEdges.js +1 -1
  260. package/dist/projects-overview/ProjectsOverview.js +2 -2
  261. package/dist/projects-overview/ProjectsOverviewXY.d.ts +1 -5
  262. package/dist/projects-overview/ProjectsOverviewXY.js +1 -1
  263. package/dist/projects-overview/actor.d.ts +1 -1
  264. package/dist/projects-overview/context.d.ts +2 -2
  265. package/dist/projects-overview/context.js +2 -1
  266. package/dist/projects-overview/custom/nodeTypes.js +1 -1
  267. package/dist/search/Search.d.ts +2 -1
  268. package/dist/search/Search.js +108 -87
  269. package/dist/search/components/ElementsColumn.css.js +3 -3
  270. package/dist/search/components/ElementsColumn.js +93 -59
  271. package/dist/search/components/PickView.js +8 -4
  272. package/dist/search/components/SearchByTags.js +1 -1
  273. package/dist/search/components/SearchInput.js +2 -2
  274. package/dist/search/components/ViewsColum.d.ts +2 -1
  275. package/dist/search/components/ViewsColum.js +39 -35
  276. package/dist/search/components/ViewsColumn.css.js +1 -1
  277. package/dist/search/components/_shared.css.js +11 -11
  278. package/dist/search/components/utils.js +1 -4
  279. package/dist/search/hooks.js +4 -1
  280. package/dist/search/searchActor.d.ts +12 -2
  281. package/dist/search/searchActor.js +60 -4
  282. package/dist/shadowroot/ShadowRoot.d.ts +5 -2
  283. package/dist/shadowroot/ShadowRoot.js +7 -5
  284. package/dist/shadowroot/styles.css.js +3 -2
  285. package/dist/styles.css2.js +1 -1
  286. package/dist/utils/view-bounds.d.ts +3 -2
  287. package/dist/utils/view-bounds.js +1 -1
  288. package/dist/utils/xyflow.d.ts +10 -5
  289. package/dist/utils/xyflow.js +24 -22
  290. package/package.json +33 -32
  291. package/panda.buildinfo.json +176 -87
  292. package/styles-min.css +1 -1
  293. package/styles.css +1 -1
  294. package/bundle/index.js +0 -52554
  295. package/bundle/package.json +0 -4
  296. package/dist/adhoc-editor/EditorNavigationPanel.d.ts +0 -1
  297. package/dist/adhoc-editor/EditorNavigationPanel.js +0 -32
  298. package/dist/adhoc-editor/SelectElementOverlay.d.ts +0 -1
  299. package/dist/adhoc-editor/SelectElementOverlay.js +0 -124
  300. package/dist/adhoc-editor/actor.d.ts +0 -131
  301. package/dist/adhoc-editor/actor.editor.js +0 -96
  302. package/dist/adhoc-editor/viewrules/ViewRulesPanel.js +0 -104
  303. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.js +0 -14
  304. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -14
  305. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -14
  306. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -14
  307. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -14
package/README.md CHANGED
@@ -35,15 +35,13 @@ You need to prepare it and wrap your diagram with`LikeC4ModelProvider` component
35
35
 
36
36
  See [📖 Documentation](https://likec4.dev/tooling/react/#likec4modelprovider) for examples.
37
37
 
38
- ## Bundled version
39
-
40
- The easiest way to use this package is the bundled version.\
41
- Diagram renders inside shadow DOM and has its own styles.
42
-
43
38
  ### LikeC4View
44
39
 
40
+ The easiest way to use this package is the `LikeC4View` component.\
41
+ It renders inside shadow DOM and has its own styles.
42
+
45
43
  ```tsx
46
- import { LikeC4ModelProvider, LikeC4View } from '@likec4/diagram/bundle'
44
+ import { LikeC4ModelProvider, LikeC4View } from '@likec4/diagram'
47
45
  /**
48
46
  * See https://likec4.dev/tooling/react/#likec4modelprovider
49
47
  */
@@ -68,7 +66,7 @@ See [LikeC4ViewProps](./src/LikeC4View.tsx) for available props.
68
66
  You may need to import icons, if you use built-in node renderers.
69
67
 
70
68
  ```tsx
71
- import { type ElementIconRenderer, LikeC4, LikeC4ModelProvider, LikeC4View } from '@likec4/diagram/bundle'
69
+ import { type ElementIconRenderer, LikeC4, LikeC4ModelProvider, LikeC4View } from '@likec4/diagram'
72
70
  import { lazy, Suspense } from 'react'
73
71
 
74
72
  // Better to lazy load icons, bundle is quite large at the moment
@@ -100,7 +98,7 @@ function App() {
100
98
  Component works in most usecases, but if you need more - use `ReactLikeC4`:
101
99
 
102
100
  ```tsx
103
- import { ReactLikeC4, LikeC4ModelProvider } from '@likec4/diagram/bundle'
101
+ import { ReactLikeC4, LikeC4ModelProvider } from '@likec4/diagram'
104
102
 
105
103
  function App() {
106
104
  const [viewId, setViewId] = useState('index')
@@ -279,7 +277,7 @@ function App() {
279
277
  ### Custom node renderer
280
278
 
281
279
  LikeC4Diagram can use custom node renderers.\
282
- Compose custom nodes renderers using primitives from `@likec4/diagram/custom` (or `@likec4/diagram/bundle/custom` for the bundled version).\
280
+ Compose custom nodes renderers using primitives from `@likec4/diagram/custom`.\
283
281
  See [customNodes.tsx](./src/custom/customNodes.tsx) for examples.
284
282
 
285
283
  ```tsx
@@ -0,0 +1,4 @@
1
+ {
2
+ "types": "../dist/adhoc-editor/index.d.ts",
3
+ "module": "../dist/adhoc-editor/index.js"
4
+ }
@@ -1,5 +1,6 @@
1
1
  import { Any } from '@likec4/core/types';
2
2
  import { PropsWithChildren } from 'react';
3
+ import { JSX } from 'react/jsx-runtime';
3
4
  import { LikeC4DiagramEventHandlers, LikeC4DiagramProperties } from './LikeC4Diagram.props';
4
5
  export type LikeC4DiagramProps<A extends Any = Any> = PropsWithChildren<LikeC4DiagramProperties<A> & LikeC4DiagramEventHandlers<A>>;
5
6
  /**
@@ -8,4 +9,4 @@ export type LikeC4DiagramProps<A extends Any = Any> = PropsWithChildren<LikeC4Di
8
9
  *
9
10
  * Use {@link ReactLikeC4} or {@link LikeC4View} for ready-to-use component
10
11
  */
11
- export declare function LikeC4Diagram<A extends Any = Any>({ onCanvasClick, onCanvasContextMenu, onCanvasDblClick, onEdgeClick, onEdgeContextMenu, onNavigateTo, onNodeClick, onNodeContextMenu, onOpenSource, onLogoClick, onLayoutTypeChange, onInitialized, view, className, controls, fitView, fitViewPadding: _fitViewPadding, pannable, zoomable, background, enableElementTags, enableFocusMode, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, enableCompareWithLatest, nodesSelectable, enableNotations, showNavigationButtons, enableDynamicViewWalkthrough, dynamicViewVariant, enableSearch, initialWidth, initialHeight, reduceGraphics, renderIcon, where, reactFlowProps, renderNodes, children, }: LikeC4DiagramProps<A>): import("react/jsx-runtime").JSX.Element;
12
+ export declare function LikeC4Diagram<A extends Any = Any>({ onCanvasClick, onCanvasContextMenu, onCanvasDblClick, onEdgeClick, onEdgeContextMenu, onNavigateTo, onNodeClick, onNodeContextMenu, onOpenSource, onLogoClick, onLayoutTypeChange, onInitialized, view, className, controls, fitView, fitViewPadding: _fitViewPadding, pannable, zoomable, background, enableElementTags, enableFocusMode, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, enableCompareWithLatest, nodesSelectable, enableNotations, showNavigationButtons, enableDynamicViewWalkthrough, dynamicViewVariant, enableSearch, enableNotes, initialWidth, initialHeight, reduceGraphics, renderIcon, where, reactFlowProps, renderNodes, children, }: LikeC4DiagramProps<A>): JSX.Element;
@@ -5,9 +5,10 @@ import { deepEqual } from 'fast-equals';
5
5
  import { useRef, Profiler } from 'react';
6
6
  import { isEmptyish, isPlainObject, mapValues } from 'remeda';
7
7
  import { RootContainer } from './components/RootContainer.js';
8
+ import { CurrentViewModelProvider } from './context/CurrentViewModelProvider.js';
8
9
  import { TagStylesProvider } from './context/TagStylesContext.js';
9
10
  import { useId } from './hooks/useId.js';
10
- import { useOptionalLikeC4Model } from './hooks/useLikeC4Model.js';
11
+ import { useOptionalLikeC4Model } from './context/LikeC4ModelContext.js';
11
12
  import { LikeC4DiagramUI } from './likec4diagram/DiagramUI.js';
12
13
  import { LikeC4DiagramXYFlow } from './likec4diagram/DiagramXYFlow.js';
13
14
  import { DiagramActorProvider } from './likec4diagram/state/DiagramActorProvider.js';
@@ -21,6 +22,8 @@ import { IconRendererProvider } from './context/IconRenderer.js';
21
22
  import { DiagramFeatures } from './context/DiagramFeatures.js';
22
23
  import { DiagramEventHandlers } from './context/DiagramEventHandlers.js';
23
24
 
25
+ const noop = () => {
26
+ };
24
27
  function LikeC4Diagram({
25
28
  onCanvasClick,
26
29
  onCanvasContextMenu,
@@ -54,6 +57,7 @@ function LikeC4Diagram({
54
57
  enableDynamicViewWalkthrough = false,
55
58
  dynamicViewVariant,
56
59
  enableSearch = false,
60
+ enableNotes = true,
57
61
  initialWidth,
58
62
  initialHeight,
59
63
  reduceGraphics = "auto",
@@ -89,91 +93,85 @@ function LikeC4Diagram({
89
93
  };
90
94
  }
91
95
  const isReducedGraphicsMode = reduceGraphics === "auto" ? pannable && view.bounds.width * view.bounds.height > 16e6 && view.nodes.some((n) => n.children?.length > 0) : reduceGraphics;
92
- return /* @__PURE__ */ jsx(Profiler, { id: "LikeC4Diagram", onRender: () => {
93
- }, children: /* @__PURE__ */ jsx(EnsureMantine, { children: /* @__PURE__ */ jsx(
94
- FramerMotionConfig,
96
+ return /* @__PURE__ */ jsx(Profiler, { id: "LikeC4Diagram", onRender: noop, children: /* @__PURE__ */ jsx(EnsureMantine, { children: /* @__PURE__ */ jsx(FramerMotionConfig, { reducedMotion: isReducedGraphicsMode ? "always" : void 0, children: /* @__PURE__ */ jsx(IconRendererProvider, { value: renderIcon ?? null, children: /* @__PURE__ */ jsx(
97
+ DiagramFeatures,
95
98
  {
96
- ...isReducedGraphicsMode && { reducedMotion: "always" },
97
- children: /* @__PURE__ */ jsx(IconRendererProvider, { value: renderIcon ?? null, children: /* @__PURE__ */ jsx(
98
- DiagramFeatures,
99
+ features: {
100
+ enableFitView: fitView,
101
+ enableEditor: hasEditor,
102
+ enableReadOnly: readonly,
103
+ enableFocusMode,
104
+ enableNavigateTo: !!onNavigateTo,
105
+ enableElementDetails: enableElementDetails && hasLikeC4Model,
106
+ enableRelationshipDetails: enableRelationshipDetails && hasLikeC4Model,
107
+ enableRelationshipBrowser: enableRelationshipBrowser && hasLikeC4Model,
108
+ enableSearch: enableSearch && hasLikeC4Model,
109
+ enableNavigationButtons: showNavigationButtons && !!onNavigateTo,
110
+ enableDynamicViewWalkthrough: view._type === "dynamic" && enableDynamicViewWalkthrough,
111
+ enableNotations,
112
+ enableVscode: !!onOpenSource,
113
+ enableControls: controls,
114
+ enableElementTags,
115
+ enableCompareWithLatest,
116
+ enableNotes
117
+ },
118
+ children: /* @__PURE__ */ jsxs(
119
+ DiagramEventHandlers,
99
120
  {
100
- features: {
101
- enableFitView: fitView,
102
- enableEditor: hasEditor,
103
- enableReadOnly: readonly,
104
- enableFocusMode,
105
- enableNavigateTo: !!onNavigateTo,
106
- enableElementDetails: enableElementDetails && hasLikeC4Model,
107
- enableRelationshipDetails: enableRelationshipDetails && hasLikeC4Model,
108
- enableRelationshipBrowser: enableRelationshipBrowser && hasLikeC4Model,
109
- enableSearch: enableSearch && hasLikeC4Model,
110
- enableNavigationButtons: showNavigationButtons && !!onNavigateTo,
111
- enableDynamicViewWalkthrough: view._type === "dynamic" && enableDynamicViewWalkthrough,
112
- enableNotations,
113
- enableVscode: !!onOpenSource,
114
- enableControls: controls,
115
- enableElementTags,
116
- enableCompareWithLatest
121
+ handlers: {
122
+ onCanvasClick,
123
+ onCanvasContextMenu,
124
+ onCanvasDblClick,
125
+ onEdgeClick,
126
+ onEdgeContextMenu,
127
+ onNavigateTo,
128
+ onNodeClick,
129
+ onNodeContextMenu,
130
+ onOpenSource,
131
+ onLogoClick,
132
+ onInitialized,
133
+ onLayoutTypeChange
117
134
  },
118
- children: /* @__PURE__ */ jsxs(
119
- DiagramEventHandlers,
120
- {
121
- handlers: {
122
- onCanvasClick,
123
- onCanvasContextMenu,
124
- onCanvasDblClick,
125
- onEdgeClick,
126
- onEdgeContextMenu,
127
- onNavigateTo,
128
- onNodeClick,
129
- onNodeContextMenu,
130
- onOpenSource,
131
- onLogoClick,
132
- onInitialized,
133
- onLayoutTypeChange
134
- },
135
- children: [
136
- /* @__PURE__ */ jsx(LikeC4Styles, { id }),
137
- /* @__PURE__ */ jsx(TagStylesProvider, { rootSelector: `#${id}`, children: /* @__PURE__ */ jsx(RootContainer, { id, className, reduceGraphics: isReducedGraphicsMode, children: /* @__PURE__ */ jsx(
138
- ReactFlowProvider,
135
+ children: [
136
+ /* @__PURE__ */ jsx(LikeC4Styles, { id }),
137
+ /* @__PURE__ */ jsx(TagStylesProvider, { rootSelector: `#${id}`, children: /* @__PURE__ */ jsx(RootContainer, { id, className, reduceGraphics: isReducedGraphicsMode, children: /* @__PURE__ */ jsx(
138
+ ReactFlowProvider,
139
+ {
140
+ fitView,
141
+ ...initialRef.current,
142
+ children: /* @__PURE__ */ jsx(
143
+ DiagramActorProvider,
139
144
  {
140
- fitView,
141
- ...initialRef.current,
142
- children: /* @__PURE__ */ jsxs(
143
- DiagramActorProvider,
144
- {
145
- id,
146
- view,
147
- zoomable,
148
- pannable,
149
- fitViewPadding,
150
- nodesDraggable: hasEditor,
151
- nodesSelectable,
152
- where: where ?? null,
153
- dynamicViewVariant,
154
- children: [
155
- /* @__PURE__ */ jsx(
156
- LikeC4DiagramXYFlow,
157
- {
158
- background,
159
- reactFlowProps,
160
- renderNodes,
161
- children
162
- }
163
- ),
164
- /* @__PURE__ */ jsx(LikeC4DiagramUI, {})
165
- ]
166
- }
167
- )
145
+ id,
146
+ view,
147
+ zoomable,
148
+ pannable,
149
+ fitViewPadding,
150
+ nodesDraggable: hasEditor,
151
+ nodesSelectable,
152
+ where: where ?? null,
153
+ dynamicViewVariant,
154
+ children: /* @__PURE__ */ jsxs(CurrentViewModelProvider, { children: [
155
+ /* @__PURE__ */ jsx(
156
+ LikeC4DiagramXYFlow,
157
+ {
158
+ background,
159
+ reactFlowProps,
160
+ renderNodes,
161
+ children
162
+ }
163
+ ),
164
+ /* @__PURE__ */ jsx(LikeC4DiagramUI, {})
165
+ ] })
168
166
  }
169
- ) }) })
170
- ]
171
- }
172
- )
167
+ )
168
+ }
169
+ ) }) })
170
+ ]
173
171
  }
174
- ) })
172
+ )
175
173
  }
176
- ) }) });
174
+ ) }) }) }) });
177
175
  }
178
176
  const toLiteralPaddingWithUnit = (value) => {
179
177
  if (typeof value === "number") {
@@ -183,6 +183,12 @@ export interface LikeC4DiagramProperties<A extends Any = Unknown> {
183
183
  * @default false
184
184
  */
185
185
  enableElementTags?: boolean | undefined;
186
+ /**
187
+ * Display element notes, if they are present in the view
188
+ *
189
+ * @default true
190
+ */
191
+ enableNotes?: boolean | undefined;
186
192
  /**
187
193
  * Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
188
194
  * Enable it if you have a large or static view
@@ -194,6 +200,8 @@ export interface LikeC4DiagramProperties<A extends Any = Unknown> {
194
200
  /**
195
201
  * Render icon for an element, bundled or remote
196
202
  * By default, if icon is http:// or https://, it will be rendered as an image
203
+ *
204
+ * Consider using `IconRendererProvider`
197
205
  */
198
206
  renderIcon?: ElementIconRenderer | undefined;
199
207
  /**
@@ -234,7 +242,7 @@ export type OnEdgeClick<A extends Any = Unknown> = (edge: DiagramEdge<A>, event:
234
242
  * On pane/canvas click (not on any node or edge)
235
243
  */
236
244
  export type OnCanvasClick = (event: ReactMouseEvent) => void;
237
- export type OnCanvasContextMenu = (event: ReactMouseEvent | MouseEvent) => void;
245
+ export type OnCanvasContextMenu = (event: ReactMouseEvent) => void;
238
246
  export type OnInitialized = (params: {
239
247
  diagram: DiagramApi;
240
248
  xyflow: XYFlowInstance;
@@ -1,10 +1,10 @@
1
1
  import { LikeC4Model } from '@likec4/core/model';
2
- import { aux } from '@likec4/core/types';
3
2
  import { PropsWithChildren } from 'react';
4
- export interface LikeC4ModelProviderProps<A extends aux.Any = aux.Unknown> {
5
- likec4model: LikeC4Model<A>;
3
+ import { JSX } from 'react/jsx-runtime';
4
+ export interface LikeC4ModelProviderProps {
5
+ likec4model: LikeC4Model<any>;
6
6
  }
7
7
  /**
8
8
  * Ensures LikeC4Model context
9
9
  */
10
- export declare function LikeC4ModelProvider<A extends aux.Any = aux.Unknown>({ children, likec4model, }: PropsWithChildren<LikeC4ModelProviderProps<A>>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function LikeC4ModelProvider({ children, likec4model, }: PropsWithChildren<LikeC4ModelProviderProps>): JSX.Element;
@@ -1,11 +1,11 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { LikeC4ModelContext } from './context/LikeC4ModelContext.js';
2
+ import { LikeC4ModelContextProvider } from './context/LikeC4ModelContext.js';
3
3
 
4
4
  function LikeC4ModelProvider({
5
5
  children,
6
6
  likec4model
7
7
  }) {
8
- return /* @__PURE__ */ jsx(LikeC4ModelContext.Provider, { value: likec4model, children });
8
+ return /* @__PURE__ */ jsx(LikeC4ModelContextProvider, { value: likec4model, children });
9
9
  }
10
10
 
11
11
  export { LikeC4ModelProvider };
@@ -1,7 +1,8 @@
1
+ import { JSX } from 'react/jsx-runtime';
1
2
  import { Simplify } from 'type-fest';
2
3
  import { ProjectsOverviewProps } from './projects-overview';
3
- export type LikeC4ProjectsOverviewProps = Simplify<Omit<ProjectsOverviewProps, 'id'> & {
4
+ export type LikeC4ProjectsOverviewProps = Simplify<ProjectsOverviewProps & {
4
5
  className?: string;
5
6
  onSelectProject?: ProjectsOverviewProps['onNavigateToProject'];
6
7
  }>;
7
- export declare function LikeC4ProjectsOverview({ view, className, onNavigateToProject, ...props }: LikeC4ProjectsOverviewProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function LikeC4ProjectsOverview({ view, className, onNavigateToProject, ...props }: LikeC4ProjectsOverviewProps): JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { LikeC4Project, ProjectId } from '@likec4/core/types';
2
2
  import { PropsWithChildren } from 'react';
3
+ import { JSX } from 'react/jsx-runtime';
3
4
  export interface LikeC4ProjectsProviderProps {
4
5
  /**
5
6
  * Projects to be used in the navigation panel.
@@ -14,4 +15,4 @@ export interface LikeC4ProjectsProviderProps {
14
15
  /**
15
16
  * Ensures LikeC4Projects context
16
17
  */
17
- export declare function LikeC4ProjectsProvider({ children, projects, onProjectChange: _onProjectChange, }: PropsWithChildren<LikeC4ProjectsProviderProps>): import("react/jsx-runtime").JSX.Element;
18
+ export declare function LikeC4ProjectsProvider({ children, projects, onProjectChange: _onProjectChange, }: PropsWithChildren<LikeC4ProjectsProviderProps>): JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { deepEqual } from 'fast-equals';
3
- import { useContext, useEffect, useState } from 'react';
4
- import { LikeC4ProjectsContext } from './context/LikeC4ProjectsContext.js';
3
+ import { useEffect, useState } from 'react';
4
+ import { useOptionalProjectsContext, LikeC4ProjectsContextProvider } from './context/LikeC4ProjectsContext.js';
5
5
  import { useCallbackRef } from './hooks/useCallbackRef.js';
6
6
 
7
7
  function LikeC4ProjectsProvider({
@@ -9,7 +9,7 @@ function LikeC4ProjectsProvider({
9
9
  projects,
10
10
  onProjectChange: _onProjectChange
11
11
  }) {
12
- const outerScope = useContext(LikeC4ProjectsContext);
12
+ const outerScope = useOptionalProjectsContext();
13
13
  useEffect(() => {
14
14
  if (outerScope) {
15
15
  console.warn("LikeC4ProjectsProvider should not be nested inside another one");
@@ -22,7 +22,7 @@ function LikeC4ProjectsProvider({
22
22
  return deepEqual(current.projects, projects) ? current : { ...current, projects };
23
23
  });
24
24
  }, [projects]);
25
- return /* @__PURE__ */ jsx(LikeC4ProjectsContext.Provider, { value, children });
25
+ return /* @__PURE__ */ jsx(LikeC4ProjectsContextProvider, { value, children });
26
26
  }
27
27
 
28
28
  export { LikeC4ProjectsProvider };
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react/jsx-runtime';
1
2
  export declare function LikeC4Styles({ id }: {
2
3
  id: string;
3
- }): import("react/jsx-runtime").JSX.Element;
4
+ }): JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
2
3
  import { ElementIconRenderer, NodeRenderers, OverrideReactFlowProps, PaddingWithUnit, ViewPadding } from './LikeC4Diagram.props';
3
4
  import type * as t from '@likec4/core/types';
4
5
  export interface LikeC4ViewProps<A extends t.aux.Any = t.aux.UnknownLayouted> {
@@ -136,6 +137,12 @@ export interface LikeC4ViewProps<A extends t.aux.Any = t.aux.UnknownLayouted> {
136
137
  * @default enableRelationshipDetails
137
138
  */
138
139
  enableRelationshipBrowser?: boolean | undefined;
140
+ /**
141
+ * Display element notes, if they are present in the view
142
+ *
143
+ * @default false
144
+ */
145
+ enableNotes?: boolean | undefined;
139
146
  /**
140
147
  * Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
141
148
  *
@@ -243,6 +250,12 @@ export interface LikeC4BrowserProps {
243
250
  * @default true
244
251
  */
245
252
  enableCompareWithLatest?: boolean | undefined;
253
+ /**
254
+ * Display element notes, if they are present in the view
255
+ *
256
+ * @default true
257
+ */
258
+ enableNotes?: boolean | undefined;
246
259
  /**
247
260
  * Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
248
261
  *
@@ -268,4 +281,4 @@ export interface LikeC4BrowserProps {
268
281
  *
269
282
  * Component is wrapped in ShadowRoot to isolate styles.
270
283
  */
271
- export declare function LikeC4View<A extends t.aux.Any = t.aux.UnknownLayouted>({ viewId, className, pannable, zoomable, keepAspectRatio, colorScheme, injectFontCss, controls, layoutType: initialLayoutType, background, browser, showNavigationButtons, enableNotations, enableFocusMode, enableDynamicViewWalkthrough, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, reduceGraphics, mantineTheme, styleNonce, style, reactFlowProps, renderNodes, children, ...props }: LikeC4ViewProps<A>): import("react/jsx-runtime").JSX.Element;
284
+ export declare function LikeC4View<A extends t.aux.Any = t.aux.UnknownLayouted>({ viewId, className, pannable, zoomable, keepAspectRatio, colorScheme, injectFontCss, controls, layoutType: initialLayoutType, background, browser, showNavigationButtons, enableNotations, enableFocusMode, enableDynamicViewWalkthrough, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, enableNotes, reduceGraphics, mantineTheme, styleNonce, style, reactFlowProps, renderNodes, children, ...props }: LikeC4ViewProps<A>): JSX.Element;
@@ -6,15 +6,16 @@ import { AnimatePresence } from 'motion/react';
6
6
  import { useRef, useState } from 'react';
7
7
  import { isBoolean } from 'remeda';
8
8
  import { FitViewPaddings } from './base/const.js';
9
- import { ErrorMessage, ViewNotFound } from './components/ViewNotFound.js';
10
- import { FramerMotionConfig } from './context/FramerMotionConfig.js';
9
+ import { ErrorMessage } from './components/ViewNotFound.js';
11
10
  import { useCallbackRef } from './hooks/useCallbackRef.js';
12
- import { useOptionalLikeC4Model } from './hooks/useLikeC4Model.js';
11
+ import 'fast-equals';
12
+ import { useOptionalLikeC4Model } from './context/LikeC4ModelContext.js';
13
13
  import { LikeC4Diagram } from './LikeC4Diagram.js';
14
14
  import { Overlay } from './overlays/overlay/Overlay.js';
15
15
  import { ShadowRoot } from './shadowroot/ShadowRoot.js';
16
16
  import { pickViewBounds } from './utils/view-bounds.js';
17
- import IconX from './node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
17
+ import { stopPropagation } from './utils/xyflow.js';
18
+ import IconX from './node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
18
19
 
19
20
  const cssInteractive = css({
20
21
  cursor: "pointer",
@@ -42,6 +43,7 @@ function LikeC4View({
42
43
  enableElementDetails = false,
43
44
  enableRelationshipDetails = false,
44
45
  enableRelationshipBrowser = enableRelationshipDetails,
46
+ enableNotes = false,
45
47
  reduceGraphics = "auto",
46
48
  mantineTheme,
47
49
  styleNonce,
@@ -64,18 +66,30 @@ function LikeC4View({
64
66
  const onNavigateToThisView = useCallbackRef(() => {
65
67
  onNavigateTo(viewId);
66
68
  });
69
+ const closeBrowser = useCallbackRef(() => {
70
+ onNavigateTo(null);
71
+ });
67
72
  if (!likec4model) {
68
- return /* @__PURE__ */ jsx(ErrorMessage, { children: "LikeC4Model not found. Make sure you provided LikeC4ModelProvider." });
73
+ return /* @__PURE__ */ jsx(ErrorMessage, { children: "LikeC4Model not found. Make sure you have LikeC4ModelProvider in the component tree." });
69
74
  }
70
75
  const viewModel = likec4model.findView(viewId);
71
76
  if (!viewModel) {
72
- return /* @__PURE__ */ jsx(ViewNotFound, { viewId });
77
+ return /* @__PURE__ */ jsxs(ErrorMessage, { children: [
78
+ "LikeC4 View ",
79
+ /* @__PURE__ */ jsx("code", { children: viewId }),
80
+ " not found in LikeC4Model.",
81
+ /* @__PURE__ */ jsx("br", {}),
82
+ "Available views: ",
83
+ [...likec4model.views()].map((v) => v.id).join(", ")
84
+ ] });
73
85
  }
74
86
  if (!viewModel.isLayouted()) {
75
87
  return /* @__PURE__ */ jsxs(ErrorMessage, { children: [
76
- 'LikeC4 View "$',
77
- viewId,
78
- '" is not layouted. Make sure you have LikeC4ModelProvider with layouted model.'
88
+ "LikeC4 View ",
89
+ /* @__PURE__ */ jsx("code", { children: viewId }),
90
+ " is not layouted.",
91
+ /* @__PURE__ */ jsx("br", {}),
92
+ "Make sure you have LikeC4ModelProvider with layouted model."
79
93
  ] });
80
94
  }
81
95
  const view = initialLayoutType === "manual" ? viewModel.$layouted : viewModel.$view;
@@ -87,7 +101,7 @@ function LikeC4View({
87
101
  const browserProps = isBoolean(browser) ? {} : browser;
88
102
  const bounds = pickViewBounds(view, props.dynamicViewVariant);
89
103
  const root = rootRef.current ? { root: rootRef.current } : void 0;
90
- return /* @__PURE__ */ jsx(
104
+ return /* @__PURE__ */ jsxs(
91
105
  ShadowRoot,
92
106
  {
93
107
  ref: rootRef,
@@ -101,7 +115,7 @@ function LikeC4View({
101
115
  className
102
116
  ),
103
117
  style,
104
- children: /* @__PURE__ */ jsxs(FramerMotionConfig, { children: [
118
+ children: [
105
119
  /* @__PURE__ */ jsx(
106
120
  LikeC4Diagram,
107
121
  {
@@ -120,6 +134,7 @@ function LikeC4View({
120
134
  enableElementDetails,
121
135
  enableRelationshipBrowser,
122
136
  enableElementTags: false,
137
+ enableNotes,
123
138
  controls,
124
139
  reduceGraphics,
125
140
  className: cx(
@@ -137,7 +152,7 @@ function LikeC4View({
137
152
  children
138
153
  }
139
154
  ),
140
- /* @__PURE__ */ jsx(AnimatePresence, { ...root, children: browserView && /* @__PURE__ */ jsxs(Overlay, { openDelay: 0, onClose: () => onNavigateTo(null), children: [
155
+ /* @__PURE__ */ jsx(AnimatePresence, { ...root, children: browserView && /* @__PURE__ */ jsxs(Overlay, { openDelay: 0, onClose: closeBrowser, children: [
141
156
  /* @__PURE__ */ jsx(
142
157
  LikeC4Diagram,
143
158
  {
@@ -154,6 +169,7 @@ function LikeC4View({
154
169
  enableRelationshipDetails: true,
155
170
  enableSearch: true,
156
171
  enableElementTags: true,
172
+ enableNotes: true,
157
173
  enableCompareWithLatest: true,
158
174
  controls: true,
159
175
  fitView: true,
@@ -165,20 +181,17 @@ function LikeC4View({
165
181
  onLayoutTypeChange: setLayoutType
166
182
  }
167
183
  ),
168
- /* @__PURE__ */ jsx(Box, { pos: "absolute", top: "4", right: "4", zIndex: "999", children: /* @__PURE__ */ jsx(
184
+ /* @__PURE__ */ jsx(Box, { pos: "absolute", top: "4", right: "4", zIndex: "999", onClick: stopPropagation, children: /* @__PURE__ */ jsx(
169
185
  ActionIcon,
170
186
  {
171
187
  variant: "default",
172
188
  color: "gray",
173
- onClick: (e) => {
174
- e.stopPropagation();
175
- onNavigateTo(null);
176
- },
189
+ onClick: closeBrowser,
177
190
  children: /* @__PURE__ */ jsx(IconX, {})
178
191
  }
179
192
  ) })
180
193
  ] }) })
181
- ] })
194
+ ]
182
195
  }
183
196
  );
184
197
  }
@@ -1,4 +1,5 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
2
3
  import { LikeC4DiagramEventHandlers, LikeC4DiagramProperties } from './LikeC4Diagram.props';
3
4
  import type * as t from '@likec4/core/types';
4
5
  export type ReactLikeC4Props<A extends t.aux.Any = t.aux.UnknownLayouted> = {
@@ -43,4 +44,4 @@ export type ReactLikeC4Props<A extends t.aux.Any = t.aux.UnknownLayouted> = {
43
44
  *
44
45
  * Component is wrapped in ShadowRoot to isolate styles.
45
46
  */
46
- export declare function ReactLikeC4<A extends t.aux.Any = t.aux.UnknownLayouted>({ viewId, layoutType: initialLayoutType, className, colorScheme, injectFontCss, enableNotations, keepAspectRatio, style, mantineTheme, styleNonce, ...props }: ReactLikeC4Props<A>): import("react/jsx-runtime").JSX.Element;
47
+ export declare function ReactLikeC4<A extends t.aux.Any = t.aux.UnknownLayouted>({ viewId, layoutType: initialLayoutType, className, colorScheme, injectFontCss, enableNotations, keepAspectRatio, style, mantineTheme, styleNonce, ...props }: ReactLikeC4Props<A>): JSX.Element;
@@ -1,7 +1,9 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
3
  import { ErrorMessage, ViewNotFound } from './components/ViewNotFound.js';
4
- import { useOptionalLikeC4Model } from './hooks/useLikeC4Model.js';
4
+ import 'fast-equals';
5
+ import 'react';
6
+ import { useOptionalLikeC4Model } from './context/LikeC4ModelContext.js';
5
7
  import { LikeC4Diagram } from './LikeC4Diagram.js';
6
8
  import { ShadowRoot } from './shadowroot/ShadowRoot.js';
7
9
  import { pickViewBounds } from './utils/view-bounds.js';
@@ -1,4 +1,5 @@
1
1
  import { Any, UnknownLayouted } from '@likec4/core/types';
2
+ import { JSX } from 'react/jsx-runtime';
2
3
  import { LikeC4DiagramProperties } from './LikeC4Diagram.props';
3
4
  export type StaticLikeC4DiagramProps<A extends Any> = Pick<LikeC4DiagramProperties<A>, 'view' | 'className' | 'fitView' | 'fitViewPadding' | 'background' | 'enableElementDetails' | 'enableRelationshipDetails' | 'enableRelationshipBrowser' | 'enableElementTags' | 'reduceGraphics' | 'initialWidth' | 'initialHeight' | 'renderIcon' | 'renderNodes' | 'dynamicViewVariant' | 'where'>;
4
5
  /**
@@ -7,4 +8,4 @@ export type StaticLikeC4DiagramProps<A extends Any> = Pick<LikeC4DiagramProperti
7
8
  *
8
9
  * @internal
9
10
  */
10
- export declare function StaticLikeC4Diagram<A extends Any = UnknownLayouted>({ view, fitView, fitViewPadding, enableRelationshipDetails, enableRelationshipBrowser, background, className, ...rest }: StaticLikeC4DiagramProps<A>): import("react/jsx-runtime").JSX.Element;
11
+ export declare function StaticLikeC4Diagram<A extends Any = UnknownLayouted>({ view, fitView, fitViewPadding, enableRelationshipDetails, enableRelationshipBrowser, background, className, ...rest }: StaticLikeC4DiagramProps<A>): JSX.Element;
@@ -34,6 +34,7 @@ function StaticLikeC4Diagram({
34
34
  enableSearch: false,
35
35
  nodesSelectable: false,
36
36
  enableElementTags: false,
37
+ enableNotes: false,
37
38
  ...rest
38
39
  }
39
40
  );
@@ -0,0 +1,3 @@
1
+ var store1b2fbb72_cjs = {};
2
+
3
+ export { store1b2fbb72_cjs as __exports };
@@ -0,0 +1,5 @@
1
+ import { __require as requireXstateStoreReact_cjs } from '../node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/react/dist/xstate-store-react.cjs.js';
2
+
3
+ var xstateStoreReact_cjsExports = requireXstateStoreReact_cjs();
4
+
5
+ export { xstateStoreReact_cjsExports as x };
@@ -0,0 +1,3 @@
1
+ var xstateStoreReact_cjs = {};
2
+
3
+ export { xstateStoreReact_cjs as __exports };
@@ -0,0 +1 @@
1
+ export declare const EditorPanel: () => import("react/jsx-runtime").JSX.Element;