@likec4/diagram 1.51.0 → 1.53.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 (158) hide show
  1. package/dist/LikeC4View.js +1 -1
  2. package/dist/_virtual/assign-6b5249c3.cjs.js +3 -0
  3. package/dist/_virtual/log-b8ad8428.cjs.js +3 -0
  4. package/dist/_virtual/raise-f23ccfcb.cjs.js +3 -0
  5. package/dist/_virtual/store-803b8f7d.cjs.js +3 -0
  6. package/dist/_virtual/xstate-actions.cjs.js +1 -1
  7. package/dist/_virtual/xstate-guards.cjs.js +1 -1
  8. package/dist/_virtual/xstate-store-react.cjs.js +1 -1
  9. package/dist/adhoc-editor/EditorPanel.js +1 -1
  10. package/dist/adhoc-editor/components/Tree.js +1 -1
  11. package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
  12. package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
  13. package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
  14. package/dist/base-primitives/element/ElementActionButtons.js +1 -1
  15. package/dist/base-primitives/element/ElementDetailsButton.js +1 -1
  16. package/dist/components/ErrorFallback.js +1 -1
  17. package/dist/components/Link.js +2 -2
  18. package/dist/components/NavigationPanel.js +4 -2
  19. package/dist/components/SearchControl.css.js +79 -0
  20. package/dist/components/SearchControl.js +17 -0
  21. package/dist/context/IconRenderer.js +7 -7
  22. package/dist/custom/index.d.ts +1 -0
  23. package/dist/custom/index.js +1 -0
  24. package/dist/editor/editorActor.actions.d.ts +142 -190
  25. package/dist/index.d.ts +3 -0
  26. package/dist/index.js +3 -0
  27. package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
  28. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -2
  29. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
  30. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +4 -4
  31. package/dist/likec4diagram/relationship-popover/actor.d.ts +28 -130
  32. package/dist/likec4diagram/state/machine.actions.d.ts +1819 -2407
  33. package/dist/likec4diagram/state/machine.actions.layout.d.ts +472 -628
  34. package/dist/likec4diagram/state/machine.setup.js +2 -2
  35. package/dist/likec4diagram/state/machine.state.initializing.d.ts +148 -196
  36. package/dist/likec4diagram/state/machine.state.ready.d.ts +2921 -3807
  37. package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +413 -537
  38. package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +352 -413
  39. package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +91 -121
  40. package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +583 -775
  41. package/dist/likec4diagram/ui/notation/NotationPanel.js +2 -2
  42. package/dist/likec4diagram/xyflow-diagram/diagram-view.js +1 -2
  43. package/dist/navigationpanel/NavigationPanelDropdown.js +7 -7
  44. package/dist/navigationpanel/_common.js +1 -1
  45. package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
  46. package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
  47. package/dist/navigationpanel/controls/DetailsControls.js +2 -2
  48. package/dist/navigationpanel/controls/LayoutWarning.js +1 -1
  49. package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
  50. package/dist/navigationpanel/controls/OpenSource.js +1 -1
  51. package/dist/navigationpanel/controls/SearchControl.js +1 -1
  52. package/dist/navigationpanel/controls/ToggleReadonly.js +2 -2
  53. package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
  54. package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
  55. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
  56. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
  57. package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
  58. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -3
  59. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +2 -2
  60. package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
  61. package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +31 -45
  62. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
  63. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
  64. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +1 -1
  65. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +1 -1
  66. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +1 -1
  67. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
  68. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +1 -1
  69. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +1 -1
  70. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +1 -1
  71. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +1 -1
  72. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +1 -1
  73. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +1 -1
  74. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +1 -1
  75. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +1 -1
  76. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +1 -1
  77. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +1 -1
  78. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +1 -1
  79. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +1 -1
  80. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +1 -1
  81. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +1 -1
  82. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +1 -1
  83. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +1 -1
  84. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +1 -1
  85. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +1 -1
  86. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +1 -1
  87. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +1 -1
  88. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +1 -1
  89. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +1 -1
  90. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +1 -1
  91. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +1 -1
  92. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +1 -1
  93. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +1 -1
  94. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +1 -1
  95. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +1 -1
  96. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +1 -1
  97. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +1 -1
  98. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +1 -1
  99. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +1 -1
  100. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +1 -1
  101. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +1 -1
  102. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +1 -1
  103. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +1 -1
  104. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +1 -1
  105. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +1 -1
  106. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +1 -1
  107. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +1 -1
  108. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +1 -1
  109. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +1 -1
  110. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +1 -1
  111. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +1 -1
  112. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +1 -1
  113. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +1 -1
  114. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +1 -1
  115. package/dist/node_modules/.pnpm/{@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/dist/store-1b2fbb72.cjs.js → @xstate_store@3.17.0_react@19.2.4/node_modules/@xstate/store/dist/store-803b8f7d.cjs.js} +151 -132
  116. package/dist/node_modules/.pnpm/{@xstate_store@3.14.0_react@19.2.4 → @xstate_store@3.17.0_react@19.2.4}/node_modules/@xstate/store/react/dist/xstate-store-react.cjs.js +7 -2
  117. package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c → xstate@5.28.0}/node_modules/xstate/actions/dist/xstate-actions.cjs.js +6 -6
  118. package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/assign-dea9f7c8.cjs.js → xstate@5.28.0/node_modules/xstate/dist/assign-6b5249c3.cjs.js} +10 -10
  119. package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/log-ec8d4df4.cjs.js → xstate@5.28.0/node_modules/xstate/dist/log-b8ad8428.cjs.js} +18 -18
  120. package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/raise-da5b247f.cjs.js → xstate@5.28.0/node_modules/xstate/dist/raise-f23ccfcb.cjs.js} +223 -126
  121. package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c → xstate@5.28.0}/node_modules/xstate/guards/dist/xstate-guards.cjs.js +2 -2
  122. package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
  123. package/dist/overlays/element-details/MetadataValue.js +2 -2
  124. package/dist/overlays/element-details/TabPanelDeployments.js +3 -3
  125. package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
  126. package/dist/overlays/element-details/TabPanelStructure.js +1 -1
  127. package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
  128. package/dist/overlays/relationship-details/SelectEdge.js +2 -2
  129. package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
  130. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -6
  131. package/dist/overlays/relationships-browser/SelectElement.js +2 -2
  132. package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
  133. package/dist/projects-overview/actor.d.ts +15 -21
  134. package/dist/projects-overview/custom/nodeTypes.js +1 -1
  135. package/dist/search/Search.d.ts +8 -0
  136. package/dist/search/Search.js +40 -47
  137. package/dist/search/SearchContext.d.ts +21 -0
  138. package/dist/search/SearchContext.js +20 -0
  139. package/dist/search/XStateSearchAdapter.d.ts +5 -0
  140. package/dist/search/XStateSearchAdapter.js +64 -0
  141. package/dist/search/components/ElementsColumn.js +6 -9
  142. package/dist/search/components/PickView.d.ts +1 -3
  143. package/dist/search/components/PickView.js +5 -5
  144. package/dist/search/components/SearchByTags.js +1 -1
  145. package/dist/search/components/SearchInput.js +6 -7
  146. package/dist/search/components/ViewsColum.js +8 -12
  147. package/dist/search/hooks.d.ts +0 -2
  148. package/dist/search/hooks.js +7 -33
  149. package/dist/styles.css2.js +1 -1
  150. package/package.json +23 -23
  151. package/panda.buildinfo.json +2 -3
  152. package/styles-min.css +1 -1
  153. package/styles.css +1 -1
  154. package/dist/_virtual/assign-dea9f7c8.cjs.js +0 -3
  155. package/dist/_virtual/log-ec8d4df4.cjs.js +0 -3
  156. package/dist/_virtual/raise-da5b247f.cjs.js +0 -3
  157. package/dist/_virtual/store-1b2fbb72.cjs.js +0 -3
  158. /package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c → xstate@5.28.0}/node_modules/xstate/dev/dist/xstate-dev.cjs.js +0 -0
@@ -3,8 +3,8 @@ import { Popover, PopoverTarget, Button, Box, Text, ThemeIcon, PopoverDropdown,
3
3
  import { useRef } from 'react';
4
4
  import { useRelationshipDetails } from './hooks.js';
5
5
  import { edgeSource, edgeTarget, scrollArea, edgeGrid, edgeRow, edgeArrow, edgeLabel } from './SelectEdge.css.js';
6
- import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
7
- import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
6
+ import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
7
+ import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
8
8
 
9
9
  const SelectEdge = ({
10
10
  edge,
@@ -6,9 +6,9 @@ import 'fast-equals';
6
6
  import 'react';
7
7
  import { useDiagram } from '../../../hooks/safeContext.js';
8
8
  import { ElementActionButtons } from '../../../base-primitives/element/ElementActionButtons.js';
9
- 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';
10
- import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
11
- import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
9
+ import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
10
+ import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
11
+ import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
12
12
 
13
13
  const ElementActions = (props) => {
14
14
  const { enableNavigateTo, enableVscode } = useEnabledFeatures();
@@ -14,12 +14,12 @@ import { SelectElement } from './SelectElement.js';
14
14
  import { RelationshipEdge } from './custom/edgeTypes.js';
15
15
  import { EmptyNode } from './custom/EmptyNode.js';
16
16
  import { CompoundNode, ElementNode } from './custom/nodeTypes.js';
17
- 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
- import IconChevronLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js';
19
- import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
20
- 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';
21
- import IconAlertTriangle from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
22
- import IconLink from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js';
17
+ import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
18
+ import IconChevronLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js';
19
+ import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
20
+ import IconCheck from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
21
+ import IconAlertTriangle from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
22
+ import IconLink from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js';
23
23
 
24
24
  const nodeTypes = {
25
25
  element: ElementNode,
@@ -7,8 +7,8 @@ import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
7
7
  import { useRelationshipsBrowser, useRelationshipsBrowserState } from './hooks.js';
8
8
  import * as SelectElement_css from './SelectElement.css.js';
9
9
  import { scrollArea } from './SelectElement.css.js';
10
- import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
11
- import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
10
+ import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
11
+ import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
12
12
 
13
13
  const selector2 = (state) => {
14
14
  const subjectExistsInScope = state.context.layouted?.subjectExistsInScope ?? false;
@@ -6,9 +6,9 @@ import '@xstate/react';
6
6
  import 'fast-equals';
7
7
  import { useDiagram } from '../../../hooks/safeContext.js';
8
8
  import { useRelationshipsBrowser, useRelationshipsBrowserState } from '../hooks.js';
9
- 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';
10
- import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
11
- import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
9
+ import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
10
+ import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
11
+ import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
12
12
  import { ElementActionButtons } from '../../../base-primitives/element/ElementActionButtons.js';
13
13
 
14
14
  const selectSubject = (state) => state.context.subject;
@@ -3,7 +3,7 @@ import { LayoutedProjectsView } from '@likec4/core/compute-view';
3
3
  import { EdgeChange, NodeChange } from '@xyflow/system';
4
4
  import { MouseEvent } from 'react';
5
5
  import { Simplify } from 'type-fest';
6
- import { ActorRef, SnapshotFrom, StateMachine, ActionFunction, Values } from 'xstate';
6
+ import { ActorRef, SnapshotFrom, StateMachine, ActionFunction } from 'xstate';
7
7
  import { ViewPadding } from '../LikeC4Diagram.props';
8
8
  import { ProjectsOverviewTypes, ProjectsOverviewXYFLowInstance, ProjectsOverviewXYStoreApi } from './_types';
9
9
  export type Input = {
@@ -92,26 +92,20 @@ export declare const onMouseEnterOrLeave: () => ActionFunction<Context, Events,
92
92
  export declare const fitDiagram: (params?: {
93
93
  duration?: number;
94
94
  bounds?: BBox;
95
- }) => ActionFunction<Context, Events, Events, undefined, never, never, Values<{
96
- isReady: {
97
- type: "isReady";
98
- params: unknown;
99
- };
100
- "click: selected node": {
101
- type: "click: selected node";
102
- params: unknown;
103
- };
104
- }>, never, EmittedEvents>;
105
- export declare const restoreViewport: () => ActionFunction<Context, Events, Events, undefined, never, never, Values<{
106
- isReady: {
107
- type: "isReady";
108
- params: unknown;
109
- };
110
- "click: selected node": {
111
- type: "click: selected node";
112
- params: unknown;
113
- };
114
- }>, never, EmittedEvents>;
95
+ }) => ActionFunction<Context, Events, Events, undefined, never, never, {
96
+ type: "isReady";
97
+ params: unknown;
98
+ } | {
99
+ type: "click: selected node";
100
+ params: unknown;
101
+ }, never, EmittedEvents>;
102
+ export declare const restoreViewport: () => ActionFunction<Context, Events, Events, undefined, never, never, {
103
+ type: "isReady";
104
+ params: unknown;
105
+ } | {
106
+ type: "click: selected node";
107
+ params: unknown;
108
+ }, never, EmittedEvents>;
115
109
  export interface ProjectsOverviewLogic extends StateMachine<Context, Events, {}, any, any, any, any, any, Tags, Input, any, EmittedEvents, any, any> {
116
110
  }
117
111
  export declare const projectOverviewLogic: ProjectsOverviewLogic;
@@ -5,7 +5,7 @@ import { ElementNodeContainer } from '../../base-primitives/element/ElementNodeC
5
5
  import { ElementShape } from '../../base-primitives/element/ElementShape.js';
6
6
  import { ElementData } from '../../base-primitives/element/ElementData.js';
7
7
  import { ElementActionButtons } from '../../base-primitives/element/ElementActionButtons.js';
8
- 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';
8
+ import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
9
9
  import { DefaultHandles } from '../../base-primitives/NodeHandles.js';
10
10
 
11
11
  function ProjectNode(props) {
@@ -1,2 +1,10 @@
1
1
  import { MemoExoticComponent } from 'react';
2
+ export declare const dialogCss: string;
3
+ export declare const bodyCss: string;
4
+ export declare const scrollAreaCss: string;
2
5
  export declare const Search: MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
6
+ /**
7
+ * The shared search panel content used by both diagram and overview search.
8
+ * Must be rendered inside a SearchContext.Provider.
9
+ */
10
+ export declare const SearchPanelContent: MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
@@ -1,12 +1,12 @@
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 { Box, VStack } from '@likec4/styles/jsx';
4
4
  import { Group, Grid, GridCol, Title, ScrollArea } from '@mantine/core';
5
5
  import { useHotkeys } from '@mantine/hooks';
6
6
  import { useTimeoutEffect } from '@react-hookz/web';
7
7
  import { useSelector } from '@xstate/react';
8
- import { AnimatePresence, usePresence, LayoutGroup } from 'motion/react';
9
- import { memo, useRef, useMemo, useEffect, Suspense } from 'react';
8
+ import { LayoutGroup, AnimatePresence, usePresence } from 'motion/react';
9
+ import { memo, useRef, Suspense, useMemo, useEffect } from 'react';
10
10
  import { isTruthy } from 'remeda';
11
11
  import { createEmptyActor } from 'xstate';
12
12
  import { useCallbackRef } from '../hooks/useCallbackRef.js';
@@ -16,27 +16,20 @@ import { ElementsColumn } from './components/ElementsColumn.js';
16
16
  import { PickView } from './components/PickView.js';
17
17
  import { SearchByTags } from './components/SearchByTags.js';
18
18
  import { LikeC4SearchInput } from './components/SearchInput.js';
19
- import { focusToFirstFoundElement, moveFocusToSearchInput } from './components/utils.js';
19
+ import { moveFocusToSearchInput, focusToFirstFoundElement } from './components/utils.js';
20
20
  import { ViewsColumn } from './components/ViewsColum.js';
21
+ import { useSearchContext } from './SearchContext.js';
22
+ import { XStateSearchAdapter } from './XStateSearchAdapter.js';
21
23
 
22
- const dialog = css({
24
+ const dialogCss = css({
23
25
  backgroundColor: `[rgb(34 34 34 / var(--_opacity, 95%))]`,
24
26
  _light: {
25
27
  backgroundColor: `[rgb(250 250 250 / var(--_opacity, 95%))]`
26
28
  },
27
29
  backdropFilter: "auto",
28
30
  backdropBlur: "var(--_blur, 10px)"
29
- // base: `[rgb(34 34 34 / var(${backdropOpacity}))]`,
30
- // _light: `[rgb(255 255 255/ var(${backdropOpacity}))]`,
31
- // },
32
31
  });
33
- const body = css({
34
- // containerName: 'likec4-search',
35
- // containerType: 'size',
36
- // position: 'fixed',
37
- // zIndex: 901,
38
- // top: '0',
39
- // left: '0',
32
+ const bodyCss = css({
40
33
  width: "100%",
41
34
  height: "100%",
42
35
  maxHeight: "100vh",
@@ -50,12 +43,8 @@ const body = css({
50
43
  paddingRight: "md",
51
44
  paddingBottom: "sm",
52
45
  background: "transparent"
53
- // backgroundColor: {
54
- // _dark: `[rgb(34 34 34 / 0.95)]`,
55
- // _light: `[rgb(255 255 255/ 0.95)]`,
56
- // },
57
46
  });
58
- const scrollArea = css({
47
+ const scrollAreaCss = css({
59
48
  height: [
60
49
  "100%",
61
50
  "100cqh"
@@ -105,38 +94,20 @@ const Search = memo(() => {
105
94
  opacity: 0.9
106
95
  },
107
96
  classes: {
108
- dialog,
109
- body
97
+ dialog: dialogCss,
98
+ body: bodyCss
110
99
  },
111
100
  openDelay: 0,
112
101
  onClose: close,
113
102
  "data-likec4-search": "true",
114
- children: /* @__PURE__ */ jsx(SearchOverlayBody, { searchActorRef })
103
+ children: /* @__PURE__ */ jsx(XStateSearchAdapter, { searchActorRef, children: /* @__PURE__ */ jsx(SearchOverlayBody, { searchActorRef }) })
115
104
  }
116
105
  ) });
117
106
  });
118
107
  Search.displayName = "Search";
119
- const selectPickViewFor = (s) => s.context.pickViewFor;
120
- const SearchOverlayBody = memo(({ searchActorRef }) => {
108
+ const SearchPanelContent = memo(() => {
121
109
  const ref = useRef(null);
122
- const pickViewFor = useSelector(searchActorRef, selectPickViewFor);
123
- useTimeoutEffect(() => {
124
- if (isTruthy(searchActorRef.getSnapshot().context.openedWithSearch)) {
125
- focusToFirstFoundElement(ref.current);
126
- }
127
- }, 150);
128
- const [isPresent, safeToRemove] = usePresence();
129
- useEffect(() => {
130
- if (isPresent) {
131
- return;
132
- }
133
- safeToRemove();
134
- try {
135
- searchActorRef.send({ type: "animation.presence.end" });
136
- } catch (e) {
137
- console.debug("SearchOverlayBody: animation.presence.end failed", e);
138
- }
139
- }, [isPresent, searchActorRef, safeToRemove]);
110
+ const { pickViewFor } = useSearchContext();
140
111
  return /* @__PURE__ */ jsxs(Box, { ref, display: "contents", children: [
141
112
  /* @__PURE__ */ jsx(
142
113
  Group,
@@ -171,7 +142,7 @@ const SearchOverlayBody = memo(({ searchActorRef }) => {
171
142
  ScrollArea,
172
143
  {
173
144
  type: "scroll",
174
- className: scrollArea,
145
+ className: scrollAreaCss,
175
146
  pr: "xs",
176
147
  scrollbars: "y",
177
148
  children: /* @__PURE__ */ jsx(LayoutGroup, { id: "likec4-search-elements", children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(ElementsColumn, {}) }) })
@@ -181,7 +152,7 @@ const SearchOverlayBody = memo(({ searchActorRef }) => {
181
152
  ScrollArea,
182
153
  {
183
154
  type: "scroll",
184
- className: scrollArea,
155
+ className: scrollAreaCss,
185
156
  pr: "xs",
186
157
  scrollbars: "y",
187
158
  children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(LayoutGroup, { id: "likec4-search-views", children: /* @__PURE__ */ jsx(ViewsColumn, {}) }) })
@@ -190,8 +161,30 @@ const SearchOverlayBody = memo(({ searchActorRef }) => {
190
161
  ]
191
162
  }
192
163
  ),
193
- pickViewFor && /* @__PURE__ */ jsx(PickView, { searchActorRef, elementFqn: pickViewFor })
164
+ pickViewFor && /* @__PURE__ */ jsx(PickView, { elementFqn: pickViewFor })
194
165
  ] });
195
166
  });
167
+ SearchPanelContent.displayName = "SearchPanelContent";
168
+ const SearchOverlayBody = memo(function SearchOverlayBody2({ searchActorRef }) {
169
+ const ref = useRef(null);
170
+ useTimeoutEffect(() => {
171
+ if (isTruthy(searchActorRef.getSnapshot().context.openedWithSearch)) {
172
+ focusToFirstFoundElement(ref.current);
173
+ }
174
+ }, 150);
175
+ const [isPresent, safeToRemove] = usePresence();
176
+ useEffect(() => {
177
+ if (isPresent) {
178
+ return;
179
+ }
180
+ safeToRemove();
181
+ try {
182
+ searchActorRef.send({ type: "animation.presence.end" });
183
+ } catch (e) {
184
+ console.debug("SearchOverlayBody: animation.presence.end failed", e);
185
+ }
186
+ }, [isPresent, searchActorRef, safeToRemove]);
187
+ return /* @__PURE__ */ jsx(Box, { ref, display: "contents", children: /* @__PURE__ */ jsx(SearchPanelContent, {}) });
188
+ });
196
189
 
197
- export { Search };
190
+ export { Search, SearchPanelContent, bodyCss, dialogCss, scrollAreaCss };
@@ -0,0 +1,21 @@
1
+ import { Fqn, ViewId } from '@likec4/core/types';
2
+ import { Context } from 'react';
3
+ export interface SearchContextValue {
4
+ searchValue: string;
5
+ setSearchValue: (value: string) => void;
6
+ normalizedSearch: string;
7
+ navigateTo: (viewId: ViewId, focusOnElement?: Fqn) => void;
8
+ openPickView: (elementFqn: Fqn) => void;
9
+ closePickView: () => void;
10
+ pickViewFor: Fqn | null;
11
+ close: () => void;
12
+ currentViewId: string | null;
13
+ openedWithSearch: string | null;
14
+ }
15
+ export declare const SearchContext: Context<SearchContextValue | null>;
16
+ export declare function useSearchContext(): SearchContextValue;
17
+ /**
18
+ * Normalize a raw search string for comparison.
19
+ * Extracted as a pure function so both XState and standalone adapters can reuse it.
20
+ */
21
+ export declare function normalizeSearch(value: string): string;
@@ -0,0 +1,20 @@
1
+ import { createContext, useContext } from 'react';
2
+
3
+ const SearchContext = createContext(null);
4
+ function useSearchContext() {
5
+ const ctx = useContext(SearchContext);
6
+ if (!ctx) {
7
+ throw new Error("useSearchContext must be used within a SearchContext.Provider");
8
+ }
9
+ return ctx;
10
+ }
11
+ function normalizeSearch(value) {
12
+ if (value === "") return value;
13
+ const v = value.trim().toLowerCase();
14
+ if (v.startsWith("#") && v.length <= 2) {
15
+ return "";
16
+ }
17
+ return v.length > 1 ? v : "";
18
+ }
19
+
20
+ export { SearchContext, normalizeSearch, useSearchContext };
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { SearchActorRef } from './searchActor';
3
+ export declare function XStateSearchAdapter({ searchActorRef, children, }: PropsWithChildren<{
4
+ searchActorRef: SearchActorRef;
5
+ }>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,64 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useSelector } from '@xstate/react';
3
+ import { useMemo } from 'react';
4
+ import { useCallbackRef } from '../hooks/useCallbackRef.js';
5
+ import { useCurrentViewId } from '../hooks/useCurrentView.js';
6
+ import { normalizeSearch, SearchContext } from './SearchContext.js';
7
+
8
+ const selectSearchValue = (s) => s.context.searchValue;
9
+ const selectPickViewFor = (s) => s.context.pickViewFor;
10
+ const selectOpenedWithSearch = (s) => s.context.openedWithSearch;
11
+ function XStateSearchAdapter({
12
+ searchActorRef,
13
+ children
14
+ }) {
15
+ const searchValue = useSelector(searchActorRef, selectSearchValue);
16
+ const pickViewFor = useSelector(searchActorRef, selectPickViewFor);
17
+ const openedWithSearch = useSelector(searchActorRef, selectOpenedWithSearch);
18
+ const currentViewId = useCurrentViewId();
19
+ const setSearchValue = useCallbackRef((search) => {
20
+ searchActorRef.send({ type: "change.search", search });
21
+ });
22
+ const navigateTo = useCallbackRef((viewId, focusOnElement) => {
23
+ searchActorRef.send({
24
+ type: "navigate.to",
25
+ viewId,
26
+ focusOnElement
27
+ });
28
+ });
29
+ const openPickView = useCallbackRef((elementFqn) => {
30
+ searchActorRef.send({ type: "pickview.open", elementFqn });
31
+ });
32
+ const closePickView = useCallbackRef(() => {
33
+ searchActorRef.send({ type: "pickview.close" });
34
+ });
35
+ const close = useCallbackRef(() => {
36
+ searchActorRef.send({ type: "close" });
37
+ });
38
+ const value = useMemo(() => ({
39
+ searchValue,
40
+ setSearchValue,
41
+ normalizedSearch: normalizeSearch(searchValue),
42
+ navigateTo,
43
+ openPickView,
44
+ closePickView,
45
+ pickViewFor,
46
+ close,
47
+ currentViewId,
48
+ openedWithSearch
49
+ }), [
50
+ searchValue,
51
+ pickViewFor,
52
+ currentViewId,
53
+ openedWithSearch,
54
+ // stable refs from useCallbackRef — listed for exhaustive-deps lint rule
55
+ setSearchValue,
56
+ navigateTo,
57
+ openPickView,
58
+ closePickView,
59
+ close
60
+ ]);
61
+ return /* @__PURE__ */ jsx(SearchContext.Provider, { value, children });
62
+ }
63
+
64
+ export { XStateSearchAdapter };
@@ -9,12 +9,13 @@ import { pipe, filter, hasAtLeast, reduce, only, first, last } from 'remeda';
9
9
  import { IconOrShapeRenderer } from '../../context/IconRenderer.js';
10
10
  import { useCallbackRef } from '../../hooks/useCallbackRef.js';
11
11
  import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
12
- import { useNormalizedSearch, useSearchActor } from '../hooks.js';
12
+ import { useNormalizedSearch } from '../hooks.js';
13
+ import { useSearchContext } from '../SearchContext.js';
13
14
  import { focusable, buttonsva } from './_shared.css.js';
14
15
  import { treeSubtree, treeLabel, treeRoot, treeNode, elementIcon, elementExpandIcon, elementTitleAndId, elementId, elementViewsCount } from './ElementsColumn.css.js';
15
16
  import { stopAndPrevent, moveFocusToSearchInput, queryAllFocusable, centerY } from './utils.js';
16
17
  import { NothingFound } from './ViewsColum.js';
17
- import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
18
+ import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
18
19
 
19
20
  function useElementsColumnData() {
20
21
  const model = useLikeC4Model();
@@ -279,7 +280,7 @@ function ElementTreeNode({ node, elementProps, hasChildren, expanded, handleClic
279
280
  ] });
280
281
  }
281
282
  function useHandleElementSelection() {
282
- const searchActorRef = useSearchActor();
283
+ const ctx = useSearchContext();
283
284
  return useCallbackRef((element) => {
284
285
  const views = [...element.views()];
285
286
  if (views.length === 0) {
@@ -288,14 +289,10 @@ function useHandleElementSelection() {
288
289
  const elementFqn = element.id;
289
290
  const onlyOneViewId = only(views)?.id;
290
291
  if (!onlyOneViewId) {
291
- searchActorRef.send({ type: "pickview.open", elementFqn });
292
+ ctx.openPickView(elementFqn);
292
293
  return;
293
294
  }
294
- searchActorRef.send({
295
- type: "navigate.to",
296
- viewId: onlyOneViewId,
297
- focusOnElement: elementFqn
298
- });
295
+ ctx.navigateTo(onlyOneViewId, elementFqn);
299
296
  });
300
297
  }
301
298
 
@@ -1,6 +1,4 @@
1
1
  import { Fqn } from '@likec4/core/types';
2
- import { SearchActorRef } from '../searchActor';
3
- export declare function PickView({ searchActorRef, elementFqn, }: {
4
- searchActorRef: SearchActorRef;
2
+ export declare function PickView({ elementFqn, }: {
5
3
  elementFqn: Fqn;
6
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -2,17 +2,17 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { FocusTrap, Group, Title, ActionIcon, ScrollAreaAutosize, Stack } from '@mantine/core';
3
3
  import { useWindowEvent, useCallbackRef } from '@mantine/hooks';
4
4
  import * as m from 'motion/react-m';
5
- import { useCurrentViewId } from '../../hooks/useCurrentView.js';
6
5
  import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
6
+ import { useSearchContext } from '../SearchContext.js';
7
7
  import { pickviewBackdrop, pickview, pickviewGroup } from './styles.css.js';
8
8
  import { ViewButton } from './ViewsColum.js';
9
- 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';
9
+ import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
10
10
 
11
11
  function PickView({
12
- searchActorRef,
13
12
  elementFqn
14
13
  }) {
15
- const currentViewId = useCurrentViewId();
14
+ const ctx = useSearchContext();
15
+ const currentViewId = ctx.currentViewId ?? "";
16
16
  const element = useLikeC4Model().element(elementFqn);
17
17
  const scoped = [];
18
18
  const others = [];
@@ -24,7 +24,7 @@ function PickView({
24
24
  }
25
25
  }
26
26
  const closePickView = () => {
27
- searchActorRef.send({ type: "pickview.close" });
27
+ ctx.closePickView();
28
28
  };
29
29
  useWindowEvent(
30
30
  "keydown",
@@ -7,7 +7,7 @@ import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
7
7
  import { useUpdateSearch, useNormalizedSearch } from '../hooks.js';
8
8
  import { focusToFirstFoundElement, moveFocusToSearchInput } from './utils.js';
9
9
  import { ElementTag } from '../../base-primitives/element/ElementTags.js';
10
- 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';
10
+ import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
11
11
 
12
12
  function SearchByTags() {
13
13
  const ref = useRef(null);
@@ -4,21 +4,21 @@ import { useFocusWithin, useWindowEvent, useMergedRef } from '@mantine/hooks';
4
4
  import { memo, useRef } from 'react';
5
5
  import { keys } from 'remeda';
6
6
  import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
7
- import { useSearchActor, useSearch } from '../hooks.js';
7
+ import { useSearchContext } from '../SearchContext.js';
8
8
  import { input } from './styles.css.js';
9
9
  import { moveFocusToSearchInput, stopAndPrevent, focusToFirstFoundElement } from './utils.js';
10
- import IconSearch from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
10
+ import IconSearch from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
11
11
 
12
12
  function startingWithKind(search) {
13
13
  return search.match(/^(k|ki|kin|kind|kind:)$/) != null;
14
14
  }
15
15
  const SEARCH_PREFIXES = ["#", "kind:"];
16
16
  const LikeC4SearchInput = memo(() => {
17
- const searchActorRef = useSearchActor();
17
+ const searchCtx = useSearchContext();
18
18
  const likec4model = useLikeC4Model();
19
19
  const inputRef = useRef(null);
20
20
  const { ref, focused } = useFocusWithin();
21
- const [search, setSearch] = useSearch();
21
+ const { searchValue: search, setSearchValue: setSearch } = searchCtx;
22
22
  const combobox = useCombobox({
23
23
  scrollBehavior: "smooth",
24
24
  loop: false
@@ -129,9 +129,8 @@ const LikeC4SearchInput = memo(() => {
129
129
  {
130
130
  onClick: (e) => {
131
131
  e.stopPropagation();
132
- const openedWithSearch = searchActorRef.getSnapshot().context.openedWithSearch;
133
- if (search === "" || search === openedWithSearch) {
134
- searchActorRef.send({ type: "close" });
132
+ if (search === "" || search === searchCtx.openedWithSearch) {
133
+ searchCtx.close();
135
134
  } else {
136
135
  setSearch("");
137
136
  }
@@ -6,18 +6,18 @@ import { Stack, VisuallyHidden, UnstyledButton, ThemeIcon, Group, Highlight, Bad
6
6
  import * as m from 'motion/react-m';
7
7
  import { memo, useRef, useMemo } from 'react';
8
8
  import { first } from 'remeda';
9
- import { useCurrentViewId } from '../../hooks/useCurrentView.js';
10
9
  import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
11
- import { useNormalizedSearch, useSearchActor } from '../hooks.js';
10
+ import { useNormalizedSearch } from '../hooks.js';
11
+ import { useSearchContext } from '../SearchContext.js';
12
12
  import { emptyBoX, focusable, buttonsva } from './_shared.css.js';
13
13
  import { moveFocusToSearchInput, queryAllFocusable, centerY } from './utils.js';
14
14
  import { viewButton } from './ViewsColumn.css.js';
15
- import IconStack2 from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js';
16
- 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';
15
+ import IconStack2 from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js';
16
+ import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.40.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
17
17
 
18
18
  const NothingFound = () => /* @__PURE__ */ jsx(Box, { className: emptyBoX, children: "Nothing found" });
19
19
  const useFoundViews = () => {
20
- const currentViewId = useCurrentViewId();
20
+ const { currentViewId } = useSearchContext();
21
21
  const likec4model = useLikeC4Model();
22
22
  const search = useNormalizedSearch();
23
23
  return useMemo(() => {
@@ -79,7 +79,7 @@ const ViewsColumn = memo(() => {
79
79
  ViewButton,
80
80
  {
81
81
  view,
82
- currentViewId,
82
+ currentViewId: currentViewId ?? "",
83
83
  search,
84
84
  tabIndex: i === 0 ? 0 : -1
85
85
  }
@@ -90,15 +90,11 @@ const ViewsColumn = memo(() => {
90
90
  });
91
91
  const btn = buttonsva();
92
92
  function ViewButton({ className, view, loop = false, search, focusOnElement, currentViewId, ...props }) {
93
- const searchActorRef = useSearchActor();
93
+ const ctx = useSearchContext();
94
94
  const nextViewId = view.id;
95
95
  const isCurrentView = nextViewId === currentViewId;
96
96
  const navigate = () => {
97
- searchActorRef.send({
98
- type: "navigate.to",
99
- viewId: nextViewId,
100
- focusOnElement
101
- });
97
+ ctx.navigateTo(nextViewId, focusOnElement);
102
98
  };
103
99
  return /* @__PURE__ */ jsxs(
104
100
  UnstyledButton,
@@ -1,5 +1,3 @@
1
- import { SearchActorRef } from './searchActor';
2
- export declare function useSearchActor(): SearchActorRef;
3
1
  export declare function useSearch(): [string, (search: string) => void];
4
2
  export declare function useNormalizedSearch(): string;
5
3
  export declare function useUpdateSearch(): (search: string) => void;