@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
@@ -6,8 +6,24 @@ import { useDebouncedValue } from '@mantine/hooks';
6
6
  import * as m from 'motion/react-m';
7
7
  import { stopPropagation } from '../../utils/xyflow.js';
8
8
  import { compoundActionBtn } from './actionbtns.css.js';
9
- import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
9
+ import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
10
10
 
11
+ const variants = {
12
+ normal: {
13
+ scale: 1
14
+ // opacity: 0.6,
15
+ },
16
+ hovered: {
17
+ scale: 1.2
18
+ // opacity: 1,
19
+ },
20
+ whileHover: {
21
+ scale: 1.4
22
+ },
23
+ whileTap: {
24
+ scale: 1
25
+ }
26
+ };
11
27
  function CompoundDetailsButton({
12
28
  data: {
13
29
  hovered: isHovered = false
@@ -17,18 +33,15 @@ function CompoundDetailsButton({
17
33
  }) {
18
34
  const debounced = useDebouncedValue(isHovered, isHovered ? 130 : 0);
19
35
  const isHoverDebounced = debounced[0] && isHovered;
36
+ const variant = isHoverDebounced ? "hovered" : "normal";
20
37
  return /* @__PURE__ */ jsx(
21
38
  m.div,
22
39
  {
23
40
  initial: false,
24
- animate: {
25
- scale: isHoverDebounced ? 1.2 : 1
26
- // opacity: isHoverDebounced ? 1 : 0.6,
27
- },
28
- whileHover: {
29
- scale: 1.4
30
- },
31
- whileTap: { scale: 1 },
41
+ variants,
42
+ animate: variant,
43
+ whileHover: "whileHover",
44
+ whileTap: "whileTap",
32
45
  className: "likec4-compound-details details-button",
33
46
  tabIndex: -1,
34
47
  children: /* @__PURE__ */ jsx(
@@ -4,6 +4,7 @@ import { compoundNode } from '@likec4/styles/recipes';
4
4
  import * as m from 'motion/react-m';
5
5
  import { clamp } from 'remeda';
6
6
  import { MAX_COMPOUND_DEPTH } from '../../base/const.js';
7
+ import { useLikeC4Styles } from '../../hooks/useLikeC4Styles.js';
7
8
 
8
9
  function CompoundNodeContainer({
9
10
  nodeProps: {
@@ -18,6 +19,7 @@ function CompoundNodeContainer({
18
19
  style,
19
20
  ...rest
20
21
  }) {
22
+ const styles = useLikeC4Styles();
21
23
  let opacity = clamp(data.style.opacity ?? 100, {
22
24
  min: 0,
23
25
  max: 100
@@ -31,7 +33,7 @@ function CompoundNodeContainer({
31
33
  const compoundClass = compoundNode({
32
34
  isTransparent,
33
35
  inverseColor: opacity < 70,
34
- borderStyle: data.style.border ?? (isTransparent ? "dashed" : "none")
36
+ borderStyle: data.style.border ?? (isTransparent ? styles.defaults.group.border : "none")
35
37
  });
36
38
  const depth = clamp(data.depth ?? 1, {
37
39
  min: 1,
@@ -52,12 +54,11 @@ function CompoundNodeContainer({
52
54
  "data-likec4-dimmed": isDimmed
53
55
  },
54
56
  tabIndex: -1,
55
- style: {
56
- ...style,
57
- // @ts-expect-error
57
+ animate: {
58
58
  ["--_border-transparency"]: `${borderOpacity}%`,
59
59
  ["--_compound-transparency"]: `${opacity}%`
60
60
  },
61
+ style,
61
62
  ...rest,
62
63
  children
63
64
  }
@@ -3,7 +3,7 @@ import { cx } from '@likec4/styles/css';
3
3
  import { edgeActionBtn } from '@likec4/styles/recipes';
4
4
  import { ActionIcon } from '@mantine/core';
5
5
  import { stopPropagation } from '../../utils/xyflow.js';
6
- import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
6
+ import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
7
7
 
8
8
  function EdgeActionButton({ icon, onClick }) {
9
9
  return /* @__PURE__ */ jsx(
@@ -20,12 +20,11 @@ const EdgeLabel = forwardRef(({
20
20
  },
21
21
  pointerEvents = "all",
22
22
  className,
23
- style: _style,
24
- // omit
25
23
  children,
26
24
  ...rest
27
25
  }, ref) => {
28
26
  const stepNum = isStepEdgeId(id) ? extractStep(id) : null;
27
+ const isStepEdge = stepNum !== null;
29
28
  const hasLabel = isTruthy(label) || isTruthy(technology);
30
29
  return /* @__PURE__ */ jsxs(
31
30
  m.div,
@@ -36,8 +35,8 @@ const EdgeLabel = forwardRef(({
36
35
  "likec4-edge-label",
37
36
  edgeLabel({
38
37
  pointerEvents,
39
- isStepEdge: stepNum !== null,
40
- cursor: selectable || stepNum !== null ? "pointer" : "default"
38
+ isStepEdge,
39
+ cursor: selectable || isStepEdge ? "pointer" : "default"
41
40
  }),
42
41
  className
43
42
  ),
@@ -14,5 +14,6 @@ type EdgeLabelContainerProps = HTMLAttributes<HTMLDivElement> & {
14
14
  } | undefined;
15
15
  edgeProps: BaseEdgePropsWithData<Data>;
16
16
  };
17
- export declare function EdgeLabelContainer({ edgeProps: { id, selected, data: { hovered: isHovered, active: isActive, dimmed: isDimmed, labelBBox, color, }, animated, }, labelPosition: labelXY, className, style, children, ...rest }: EdgeLabelContainerProps): import("react/jsx-runtime").JSX.Element | null;
17
+ export declare function EdgeLabelContainer({ edgeProps: { id, selected, data: { hovered: isHovered, active: isActive, dimmed: isDimmed, labelBBox, color, }, animated, }, labelPosition: labelXY, className, style: _, // omit styles for container
18
+ children, ...rest }: EdgeLabelContainerProps): import("react/jsx-runtime").JSX.Element | null;
18
19
  export {};
@@ -1,14 +1,11 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
3
  import { EdgeLabelRenderer } from '@xyflow/react';
4
- import { useCallback } from 'react';
5
4
  import { isNumber } from 'remeda';
6
- import { ZIndexes } from '../../base/const.js';
7
- import { useXYStore } from '../../hooks/useXYFlow.js';
8
5
 
9
6
  const toCssVarValue = (value) => {
10
7
  if (value === void 0) return "";
11
- return isNumber(value) ? `${Math.round(value)}px` : value;
8
+ return isNumber(value) ? `${Math.trunc(value)}px` : value;
12
9
  };
13
10
  function EdgeLabelContainer({
14
11
  edgeProps: {
@@ -25,18 +22,11 @@ function EdgeLabelContainer({
25
22
  },
26
23
  labelPosition: labelXY,
27
24
  className,
28
- style,
25
+ style: _,
26
+ // omit styles for container
29
27
  children,
30
28
  ...rest
31
29
  }) {
32
- let zIndex = useXYStore(
33
- useCallback((state) => {
34
- return state.edgeLookup.get(id)?.zIndex ?? ZIndexes.Edge;
35
- }, [id])
36
- );
37
- if (isHovered || isActive) {
38
- zIndex += 100;
39
- }
40
30
  let labelX = labelXY?.x ?? labelBBox?.x, labelY = labelXY?.y ?? labelBBox?.y;
41
31
  if (labelX === void 0 || labelY === void 0) {
42
32
  return null;
@@ -66,14 +56,17 @@ function EdgeLabelContainer({
66
56
  "data-likec4-dimmed": isDimmed
67
57
  },
68
58
  style: {
69
- ...labelBBox && {
70
- maxWidth: labelBBox.width + 18
71
- },
72
- zIndex,
73
- ...style,
74
59
  transform: `translate(${toCssVarValue(labelX)}, ${toCssVarValue(labelY)}) ${translate}`
75
60
  },
76
- children
61
+ children: /* @__PURE__ */ jsx(
62
+ "div",
63
+ {
64
+ style: labelBBox ? {
65
+ maxWidth: labelBBox.width + 20
66
+ } : void 0,
67
+ children
68
+ }
69
+ )
77
70
  },
78
71
  id
79
72
  ) });
@@ -83,7 +83,7 @@ const OArrow = (props) => /* @__PURE__ */ jsx(
83
83
  {
84
84
  d: "M 0 0 L 8 3 L 0 6 L 1 3 z",
85
85
  stroke: "context-stroke",
86
- fill: "context-stroke",
86
+ fill: "var(--likec4-background-color)",
87
87
  strokeWidth: 1.25,
88
88
  strokeLinejoin: "miter",
89
89
  strokeLinecap: "square"
@@ -129,7 +129,7 @@ const ODiamond = (props) => /* @__PURE__ */ jsx(
129
129
  {
130
130
  d: "M5,0 L10,4 L5,8 L0,4 Z",
131
131
  stroke: "context-stroke",
132
- fill: "context-stroke",
132
+ fill: "var(--likec4-background-color)",
133
133
  strokeWidth: 1.25,
134
134
  strokeLinecap: "round"
135
135
  }
@@ -171,7 +171,7 @@ const ODot = (props) => /* @__PURE__ */ jsx(
171
171
  {
172
172
  strokeWidth: 1.25,
173
173
  stroke: "context-stroke",
174
- fill: "context-stroke",
174
+ fill: "var(--likec4-background-color)",
175
175
  cx: 4,
176
176
  cy: 4,
177
177
  r: 3
@@ -1,12 +1,32 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
- import { actionButtons, actionBtn } from '@likec4/styles/recipes';
3
+ import { actionBtn, actionButtons } from '@likec4/styles/recipes';
4
4
  import { ActionIcon } from '@mantine/core';
5
5
  import { useId } from '@mantine/hooks';
6
6
  import * as m from 'motion/react-m';
7
7
  import { stopPropagation } from '../../utils/xyflow.js';
8
- import IconBolt from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js';
8
+ import IconBolt from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js';
9
9
 
10
+ const variants = {
11
+ normal: {
12
+ originY: 0,
13
+ opacity: 0.75,
14
+ scale: 0.8,
15
+ y: 0
16
+ },
17
+ selected: {
18
+ originY: 0,
19
+ opacity: 1,
20
+ scale: 0.9,
21
+ y: 7
22
+ },
23
+ hovered: {
24
+ originY: 0,
25
+ opacity: 1,
26
+ scale: 1.12,
27
+ y: 7
28
+ }
29
+ };
10
30
  function ElementActionButtons({
11
31
  selected = false,
12
32
  data: {
@@ -18,19 +38,24 @@ function ElementActionButtons({
18
38
  if (!buttons.length) {
19
39
  return null;
20
40
  }
41
+ let variant;
42
+ switch (true) {
43
+ case isHovered:
44
+ variant = "hovered";
45
+ break;
46
+ case selected:
47
+ variant = "selected";
48
+ break;
49
+ default:
50
+ variant = "normal";
51
+ }
21
52
  return /* @__PURE__ */ jsx("div", { className: actionButtons(), children: /* @__PURE__ */ jsx(
22
53
  m.div,
23
54
  {
24
55
  layoutRoot: true,
25
56
  initial: false,
26
- style: {
27
- originY: 0
28
- },
29
- animate: {
30
- opacity: isHovered || selected ? 1 : 0.75,
31
- scale: isHovered ? 1.1 : selected ? 0.9 : 0.8,
32
- y: isHovered || selected ? 6 : 0
33
- },
57
+ variants,
58
+ animate: variant,
34
59
  layoutDependency: `${isHovered}-${selected}`,
35
60
  "data-likec4-hovered": isHovered,
36
61
  className: cx("nodrag nopan"),
@@ -5,8 +5,35 @@ import { actionBtn } from '@likec4/styles/recipes';
5
5
  import { ActionIcon } from '@mantine/core';
6
6
  import * as m from 'motion/react-m';
7
7
  import { stopPropagation } from '../../utils/xyflow.js';
8
- import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
8
+ import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
9
9
 
10
+ const variants = {
11
+ normal: {
12
+ originX: 0.4,
13
+ originY: 0.6,
14
+ scale: 1,
15
+ opacity: 0.5
16
+ },
17
+ hovered: {
18
+ originX: 0.4,
19
+ originY: 0.6,
20
+ scale: 1.25,
21
+ opacity: 0.9
22
+ },
23
+ selected: {
24
+ originX: 0.4,
25
+ originY: 0.6,
26
+ scale: 1.25,
27
+ opacity: 0.9
28
+ },
29
+ whileHover: {
30
+ scale: 1.4,
31
+ opacity: 1
32
+ },
33
+ whileTap: {
34
+ scale: 1.15
35
+ }
36
+ };
10
37
  const container = css({
11
38
  position: "absolute",
12
39
  top: "0.5",
@@ -40,28 +67,30 @@ function ElementDetailsButton({
40
67
  icon,
41
68
  onClick
42
69
  }) {
70
+ let variant;
71
+ switch (true) {
72
+ case isHovered:
73
+ variant = "hovered";
74
+ break;
75
+ case selected:
76
+ variant = "selected";
77
+ break;
78
+ default:
79
+ variant = "normal";
80
+ }
43
81
  return /* @__PURE__ */ jsx(Box, { className: cx(container, "details-button"), children: /* @__PURE__ */ jsx(
44
82
  ActionIcon,
45
83
  {
46
- className: cx("nodrag nopan", actionBtn({ variant: "transparent" })),
84
+ className: cx(
85
+ "nodrag nopan",
86
+ actionBtn({ variant: "transparent" })
87
+ ),
47
88
  component: m.button,
48
89
  initial: false,
49
- style: {
50
- originX: 0.45,
51
- originY: 0.55
52
- },
53
- animate: isHovered || selected ? {
54
- scale: 1.2,
55
- opacity: 0.8
56
- } : {
57
- scale: 1,
58
- opacity: 0.5
59
- },
60
- whileHover: {
61
- scale: 1.4,
62
- opacity: 1
63
- },
64
- whileTap: { scale: 1.15 },
90
+ variants,
91
+ animate: variant,
92
+ whileHover: "whileHover",
93
+ whileTap: "whileTap",
65
94
  onClick,
66
95
  onDoubleClick: stopPropagation,
67
96
  tabIndex: -1,
@@ -1,7 +1,7 @@
1
1
  import { Color, ComputedNodeStyle, ElementShape } from '@likec4/core/types';
2
- import { MotionNodeLayoutOptions } from 'motion/react';
3
- import { CSSProperties, ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
2
+ import { MotionNodeLayoutOptions, MotionStyle } from 'motion/react';
4
3
  import { BaseNodePropsWithData } from '../../base/types';
4
+ import { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
5
5
  type RequiredData = {
6
6
  color: Color;
7
7
  shape: ElementShape;
@@ -15,7 +15,7 @@ export declare const ElementNodeContainer: ForwardRefExoticComponent<{
15
15
  [key: `data-${string}`]: string | undefined;
16
16
  nodeProps: BaseNodePropsWithData<RequiredData>;
17
17
  className?: string | undefined;
18
- style?: CSSProperties | undefined;
18
+ style?: MotionStyle | undefined;
19
19
  } & MotionNodeLayoutOptions & {
20
20
  children?: ReactNode | undefined;
21
21
  } & RefAttributes<HTMLDivElement>>;
@@ -5,6 +5,20 @@ import { elementNode } from '@likec4/styles/recipes';
5
5
  import * as m from 'motion/react-m';
6
6
  import { forwardRef } from 'react';
7
7
 
8
+ const variants = {
9
+ normal: {
10
+ scale: 1
11
+ },
12
+ hovered: {
13
+ scale: 1.05
14
+ },
15
+ selected: {
16
+ scale: 1.02
17
+ },
18
+ tap: {
19
+ scale: 0.98
20
+ }
21
+ };
8
22
  const ElementNodeContainer = forwardRef(({
9
23
  nodeProps: {
10
24
  selected = false,
@@ -20,14 +34,16 @@ const ElementNodeContainer = forwardRef(({
20
34
  children,
21
35
  ...rest
22
36
  }, ref) => {
23
- let scale = 1;
37
+ let variant;
24
38
  switch (true) {
25
39
  case isHovered:
26
- scale = 1.05;
40
+ variant = "hovered";
27
41
  break;
28
42
  case selected:
29
- scale = 1.02;
43
+ variant = "selected";
30
44
  break;
45
+ default:
46
+ variant = "normal";
31
47
  }
32
48
  const {
33
49
  size,
@@ -43,12 +59,11 @@ const ElementNodeContainer = forwardRef(({
43
59
  "group",
44
60
  className
45
61
  ),
62
+ variants,
46
63
  initial: false,
47
64
  ...selectable && {
48
- animate: {
49
- scale
50
- },
51
- whileTap: { scale: 0.98 }
65
+ animate: variant,
66
+ whileTap: "tap"
52
67
  },
53
68
  "data-likec4-hovered": isHovered,
54
69
  "data-likec4-color": data.color,
@@ -59,9 +74,7 @@ const ElementNodeContainer = forwardRef(({
59
74
  ...isDimmed !== false && {
60
75
  "data-likec4-dimmed": isDimmed
61
76
  },
62
- style: {
63
- ...style
64
- },
77
+ style,
65
78
  tabIndex: -1,
66
79
  ...rest,
67
80
  children
@@ -1,18 +1,18 @@
1
1
  import { ComputedNodeStyle, ElementShape } from '@likec4/core/types';
2
- type Data = {
2
+ type RequiredData = {
3
3
  shape: ElementShape;
4
4
  width: number;
5
5
  height: number;
6
6
  style?: ComputedNodeStyle;
7
7
  };
8
8
  type ElementShapeProps = {
9
- data: Data;
9
+ data: RequiredData;
10
10
  width?: number | undefined;
11
11
  height?: number | undefined;
12
12
  /**
13
13
  * @default true
14
14
  */
15
- showSeletionOutline?: boolean | undefined;
15
+ showSelectionOutline?: boolean | undefined;
16
16
  };
17
- export declare function ElementShape({ data, width, height, showSeletionOutline }: ElementShapeProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ElementShape({ data, width, height, showSelectionOutline }: ElementShapeProps): import("react/jsx-runtime").JSX.Element;
18
18
  export {};
@@ -86,8 +86,69 @@ const PersonIcon = {
86
86
  height: 120,
87
87
  path: `M57.9197 0C10.9124 0 33.5766 54.75 33.5766 54.75C38.6131 62.25 45.3285 60.75 45.3285 66C45.3285 70.5 39.4526 72 33.5766 72.75C24.3431 72.75 15.9489 71.25 7.55474 84.75C2.51825 93 0 120 0 120H115C115 120 112.482 93 108.285 84.75C99.8905 70.5 91.4963 72.75 82.2628 72C76.3869 71.25 70.5109 69.75 70.5109 65.25C70.5109 60.75 77.2263 62.25 82.2628 54C82.2628 54.75 104.927 0 57.9197 0V0Z`
88
88
  };
89
- function ShapeSvg({ shape, w, h }) {
89
+ const ComponentTopLeftRect = ({ index, size }) => {
90
+ let width, height, offsetX, offsetY, between;
91
+ switch (size) {
92
+ case "xs":
93
+ case "sm": {
94
+ width = 40;
95
+ height = 18;
96
+ offsetX = -16;
97
+ offsetY = 16;
98
+ between = 10;
99
+ break;
100
+ }
101
+ case "md": {
102
+ width = 60;
103
+ height = 26;
104
+ offsetX = -20;
105
+ offsetY = 22;
106
+ between = 14;
107
+ break;
108
+ }
109
+ case "lg":
110
+ case "xl": {
111
+ width = 70;
112
+ height = 32;
113
+ offsetX = -24;
114
+ offsetY = 32;
115
+ between = 18;
116
+ break;
117
+ }
118
+ default: {
119
+ nonexhaustive(size);
120
+ }
121
+ }
122
+ return /* @__PURE__ */ jsx(
123
+ "rect",
124
+ {
125
+ x: offsetX,
126
+ y: offsetY + (height + between) * index,
127
+ width,
128
+ height,
129
+ rx: 3,
130
+ className: "top-left-rect",
131
+ strokeWidth: 2
132
+ }
133
+ );
134
+ };
135
+ function ShapeSvg({ shape, w, h, size = "md" }) {
90
136
  switch (shape) {
137
+ case "component": {
138
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
139
+ /* @__PURE__ */ jsx(
140
+ "rect",
141
+ {
142
+ width: w,
143
+ height: h,
144
+ rx: 6,
145
+ strokeWidth: 0
146
+ }
147
+ ),
148
+ /* @__PURE__ */ jsx(ComponentTopLeftRect, { index: 0, size }),
149
+ /* @__PURE__ */ jsx(ComponentTopLeftRect, { index: 1, size })
150
+ ] });
151
+ }
91
152
  case "mobile": {
92
153
  return /* @__PURE__ */ jsxs(Fragment, { children: [
93
154
  /* @__PURE__ */ jsx(
@@ -249,7 +310,7 @@ function ShapeSvgOutline({ shape, w, h }) {
249
310
  }
250
311
  return /* @__PURE__ */ jsx("g", { className: "likec4-shape-outline", children: svg });
251
312
  }
252
- function ElementShape({ data, width, height, showSeletionOutline = true }) {
313
+ function ElementShape({ data, width, height, showSelectionOutline = true }) {
253
314
  let w = !!width && width > 10 ? width : data.width;
254
315
  let h = !!height && height > 10 ? height : data.height;
255
316
  const isMultiple = data.style?.multiple ?? false;
@@ -264,23 +325,25 @@ function ElementShape({ data, width, height, showSeletionOutline = true }) {
264
325
  },
265
326
  className: elementShapeRecipe({
266
327
  shapetype: "html",
267
- withBorder
328
+ withBorder,
329
+ withOutline: showSelectionOutline
268
330
  }),
269
331
  children: [
270
332
  isMultiple && /* @__PURE__ */ jsx("div", { className: "likec4-shape-multiple" }),
271
- showSeletionOutline && /* @__PURE__ */ jsx("div", { className: "likec4-shape-outline" })
333
+ /* @__PURE__ */ jsx("div", { className: "likec4-shape-outline" })
272
334
  ]
273
335
  }
274
336
  );
275
337
  }
276
338
  const className = elementShapeRecipe({
277
- shapetype: "svg"
339
+ shapetype: "svg",
340
+ withOutline: showSelectionOutline
278
341
  });
279
342
  return /* @__PURE__ */ jsxs(Fragment, { children: [
280
- isMultiple && /* @__PURE__ */ jsx("svg", { className, "data-likec4-shape-multiple": "true", viewBox: `0 0 ${w} ${h}`, children: /* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, w, h }) }),
343
+ isMultiple && /* @__PURE__ */ jsx("svg", { className, "data-likec4-shape-multiple": "true", viewBox: `0 0 ${w} ${h}`, children: /* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, size: data.style?.size, w, h }) }),
281
344
  /* @__PURE__ */ jsxs("svg", { className, viewBox: `0 0 ${w} ${h}`, children: [
282
- showSeletionOutline && /* @__PURE__ */ jsx(ShapeSvgOutline, { shape: data.shape, w, h }),
283
- /* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, w, h })
345
+ /* @__PURE__ */ jsx(ShapeSvgOutline, { shape: data.shape, w, h }),
346
+ /* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, size: data.style?.size, w, h })
284
347
  ] })
285
348
  ] });
286
349
  }
@@ -4,7 +4,7 @@ import { HStack, VStack } from '@likec4/styles/jsx';
4
4
  import { ThemeIcon, Text, ScrollAreaAutosize, Button } from '@mantine/core';
5
5
  import { useRef, useEffect } from 'react';
6
6
  import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
7
- 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';
7
+ 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';
8
8
 
9
9
  function ErrorFallback({ error, resetErrorBoundary }) {
10
10
  const errorString = error instanceof Error ? error.message : "Unknown error";
@@ -4,8 +4,8 @@ import { styled } from '@likec4/styles/jsx';
4
4
  import { Badge, CopyButton, ActionIcon } from '@mantine/core';
5
5
  import { forwardRef } from 'react';
6
6
  import { GithubIcon } from './GithubIcon.js';
7
- import IconCheck from '../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
8
- import IconCopy from '../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js';
7
+ import IconCheck from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
8
+ import IconCopy from '../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js';
9
9
 
10
10
  const GITHUB_PREFIX = "https://github.com/";
11
11
  const Link = forwardRef(
@@ -63,7 +63,7 @@ const Link = forwardRef(
63
63
  }),
64
64
  section: css({
65
65
  '&:is([data-position="left"])': {
66
- color: "mantine.colors.dimmed",
66
+ color: "text.dimmed",
67
67
  userSelect: "none",
68
68
  pointerEvents: "none",
69
69
  _groupHover: {
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { css } from '@likec4/styles/css';
3
3
  import { forwardRef } from 'react';
4
4
 
@@ -36,15 +36,13 @@ const Logo = withContext(LogoButton, "logo");
36
36
  const Label = withContext(m.div, "label", {
37
37
  shouldForwardProp
38
38
  });
39
- const Dropdown = withContext(m.div, "dropdown", {
39
+ withContext(m.div, "dropdown", {
40
40
  shouldForwardProp
41
41
  });
42
42
  const NavigationPanel = {
43
43
  Root,
44
44
  Body,
45
45
  Logo,
46
- Label,
47
- Dropdown
48
- };
46
+ Label};
49
47
 
50
48
  export { NavigationPanel };
@@ -1,14 +1,13 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Portal } from '@mantine/core';
3
- import { useContext } from 'react';
4
- import { RootContainerContext } from '../context/RootContainerContext.js';
3
+ import { useRootContainerContext } from '../context/RootContainerContext.js';
5
4
 
6
5
  function PortalToContainer({ children }) {
7
- const ctx = useContext(RootContainerContext);
6
+ const ctx = useRootContainerContext();
8
7
  if (!ctx) {
9
8
  throw new Error("PortalToContainer must be used within RootContainer");
10
9
  }
11
- return /* @__PURE__ */ jsx(Portal, { target: ctx.ref.current ?? `#${ctx.id}`, children });
10
+ return /* @__PURE__ */ jsx(Portal, { target: ctx.ref.current ?? ctx.selector, children });
12
11
  }
13
12
 
14
13
  export { PortalToContainer };