@code0-tech/pictor 0.0.0-mvp.25 → 0.0.0-mvp.27

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 (286) hide show
  1. package/dist/assets/components/badge/Badge.style.css +1 -1
  2. package/dist/assets/components/button/Button.style.css +1 -1
  3. package/dist/assets/components/context-menu/ContextMenu.style.css +1 -0
  4. package/dist/assets/components/d-flow-folder/DFlowFolder.style.css +1 -0
  5. package/dist/assets/components/{d-flow/function → d-flow-function}/DFlowFunctionDefaultCard.style.css +1 -1
  6. package/dist/assets/components/d-flow-panel/DFlowMiniMap.style.css +1 -0
  7. package/dist/assets/components/d-flow-suggestion/DFlowSuggestionSearchInput.style.css +1 -0
  8. package/dist/assets/components/d-layout/DLayout.style.css +1 -1
  9. package/dist/assets/components/d-resizable/DResizable.style.css +1 -1
  10. package/dist/assets/components/file-tabs/FileTabs.style.css +1 -1
  11. package/dist/assets/components/form/Input.style.css +1 -1
  12. package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
  13. package/dist/components/avatar/Avatar.js +7 -7
  14. package/dist/components/badge/Badge.d.ts +1 -1
  15. package/dist/components/badge/Badge.js +57 -17
  16. package/dist/components/breadcrumb/Breadcrumb.js +5 -5
  17. package/dist/components/button/Button.js +8 -8
  18. package/dist/components/context-menu/ContextMenu.d.ts +31 -0
  19. package/dist/components/context-menu/ContextMenu.js +191 -0
  20. package/dist/components/d-application/DApplication.service.d.ts +5 -0
  21. package/dist/components/d-application/DApplication.service.js +9 -0
  22. package/dist/components/d-flow/DFlow.d.ts +5 -3
  23. package/dist/components/d-flow/DFlow.edges.hook.d.ts +2 -1
  24. package/dist/components/d-flow/DFlow.edges.hook.js +98 -136
  25. package/dist/components/d-flow/DFlow.js +214 -199
  26. package/dist/components/d-flow/DFlow.nodes.hook.d.ts +5 -1
  27. package/dist/components/d-flow/DFlow.nodes.hook.js +101 -123
  28. package/dist/components/d-flow/DFlow.service.d.ts +12 -7
  29. package/dist/components/d-flow/DFlow.service.js +117 -7
  30. package/dist/components/d-flow/{edge/DFlowEdge.d.ts → DFlowEdge.d.ts} +5 -3
  31. package/dist/components/d-flow/DFlowEdge.js +69 -0
  32. package/dist/components/d-flow/index.d.ts +1 -10
  33. package/dist/components/d-flow/index.js +9 -44
  34. package/dist/components/d-flow-data-type/DFlowDataType.service.d.ts +9 -0
  35. package/dist/components/{d-flow/data-type → d-flow-data-type}/DFlowDataType.service.js +12 -10
  36. package/dist/components/{d-flow/data-type → d-flow-data-type}/DFlowDataType.view.d.ts +8 -2
  37. package/dist/components/d-flow-data-type/DFlowDataType.view.js +71 -0
  38. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsKeyRule.d.ts +2 -3
  39. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsKeyRule.js +3 -3
  40. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsTypeRule.d.ts +2 -3
  41. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsTypeRule.js +4 -4
  42. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeParentRule.d.ts +2 -3
  43. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeParentRule.js +3 -3
  44. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeReturnTypeRule.d.ts +2 -3
  45. package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js +246 -0
  46. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRule.d.ts +2 -3
  47. package/dist/components/{d-flow/tab → d-flow-file}/DFlowTabDefault.d.ts +2 -3
  48. package/dist/components/d-flow-file/DFlowTabDefault.js +139 -0
  49. package/dist/components/{d-flow/tab → d-flow-file}/DFlowTabTrigger.d.ts +2 -2
  50. package/dist/components/d-flow-file/DFlowTabTrigger.js +75 -0
  51. package/dist/components/d-flow-file/DFlowTabs.d.ts +6 -0
  52. package/dist/components/d-flow-file/DFlowTabs.js +128 -0
  53. package/dist/components/d-flow-file/index.d.ts +1 -0
  54. package/dist/components/d-flow-file/index.js +4 -0
  55. package/dist/components/{d-flow/folder → d-flow-folder}/DFlowFolder.d.ts +11 -5
  56. package/dist/components/d-flow-folder/DFlowFolder.js +158 -0
  57. package/dist/components/d-flow-folder/DFlowFolderContextMenu.d.ts +18 -0
  58. package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +69 -0
  59. package/dist/components/d-flow-folder/DFlowFolderCreateDialog.d.ts +9 -0
  60. package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +76 -0
  61. package/dist/components/d-flow-folder/DFlowFolderItemPathInput.d.ts +5 -0
  62. package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +49 -0
  63. package/dist/components/d-flow-folder/DFlowFolderRenameDialog.d.ts +9 -0
  64. package/dist/components/d-flow-folder/DFlowFolderRenameDialog.js +55 -0
  65. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.input.hook.d.ts +1 -1
  66. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.input.hook.js +1 -1
  67. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.return.hook.d.ts +2 -2
  68. package/dist/components/d-flow-function/DFlowFunction.return.hook.js +9 -0
  69. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.service.d.ts +1 -1
  70. package/dist/components/d-flow-function/DFlowFunction.service.js +12 -0
  71. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.view.d.ts +12 -0
  72. package/dist/components/d-flow-function/DFlowFunction.view.js +132 -0
  73. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionDefaultCard.d.ts +4 -4
  74. package/dist/components/d-flow-function/DFlowFunctionDefaultCard.js +120 -0
  75. package/dist/components/d-flow-function/DFlowFunctionGroupCard.d.ts +13 -0
  76. package/dist/components/d-flow-function/DFlowFunctionGroupCard.js +68 -0
  77. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionSuggestionCard.d.ts +3 -4
  78. package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.js +48 -0
  79. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionTriggerCard.d.ts +3 -3
  80. package/dist/components/d-flow-function/DFlowFunctionTriggerCard.js +71 -0
  81. package/dist/components/{d-flow/input → d-flow-input}/DFlowInputDataType.d.ts +1 -1
  82. package/dist/components/{d-flow/input → d-flow-input}/DFlowInputDataType.js +175 -165
  83. package/dist/components/d-flow-panel/DFlowExport.js +32 -0
  84. package/dist/components/d-flow-panel/DFlowMiniMap.js +33 -0
  85. package/dist/components/d-flow-panel/DFlowPanelControl.d.ts +6 -0
  86. package/dist/components/d-flow-panel/DFlowPanelControl.js +70 -0
  87. package/dist/components/d-flow-panel/DFlowPanelLayout.d.ts +4 -0
  88. package/dist/components/d-flow-panel/DFlowPanelLayout.js +47 -0
  89. package/dist/components/d-flow-panel/DFlowPanelSize.d.ts +2 -0
  90. package/dist/components/d-flow-panel/DFlowPanelSize.js +94 -0
  91. package/dist/components/d-flow-panel/index.d.ts +5 -0
  92. package/dist/components/d-flow-panel/index.js +12 -0
  93. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestion.hook.d.ts +0 -15
  94. package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +161 -0
  95. package/dist/components/d-flow-suggestion/DFlowSuggestion.view.d.ts +14 -0
  96. package/dist/components/d-flow-suggestion/DFlowSuggestion.view.js +4 -0
  97. package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +83 -0
  98. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.util.d.ts +1 -1
  99. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.util.js +1 -1
  100. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuFooter.js +5 -5
  101. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuSearchBar.d.ts +1 -1
  102. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuSearchBar.js +1 -1
  103. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionSearchInput.d.ts +1 -1
  104. package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +35 -0
  105. package/dist/components/d-flow-suggestion/index.d.ts +1 -0
  106. package/dist/components/d-flow-suggestion/index.js +4 -0
  107. package/dist/components/{d-flow/type → d-flow-type}/DFlowType.service.d.ts +1 -1
  108. package/dist/components/d-flow-type/DFlowType.service.js +12 -0
  109. package/dist/components/{d-flow/type → d-flow-type}/DFlowType.view.d.ts +6 -0
  110. package/dist/components/{d-flow/type → d-flow-type}/DFlowType.view.js +16 -10
  111. package/dist/components/d-flow-validation/DDataTypeValidation.hook.d.ts +2 -0
  112. package/dist/components/d-flow-validation/DDataTypeValidation.hook.js +18 -0
  113. package/dist/components/d-flow-validation/DFlowValidation.hook.d.ts +3 -0
  114. package/dist/components/d-flow-validation/DFlowValidation.hook.js +22 -0
  115. package/dist/components/d-flow-validation/DFlowValidation.js +66 -0
  116. package/dist/components/d-flow-validation/DNodeValidation.hook.d.ts +3 -0
  117. package/dist/components/d-flow-validation/DNodeValidation.hook.js +62 -0
  118. package/dist/components/d-flow-validation/DValueValidation.hook.d.ts +3 -0
  119. package/dist/components/d-flow-validation/DValueValidation.hook.js +8 -0
  120. package/dist/components/{d-flow/validation → d-flow-validation}/index.js +2 -2
  121. package/dist/components/d-fullscreen/DFullScreen.js +2 -2
  122. package/dist/components/d-member/DNamespaceMemberContent.js +140 -92
  123. package/dist/components/d-member/DNamespaceMemberList.js +5 -5
  124. package/dist/components/d-organization/DOrganizationList.js +7 -7
  125. package/dist/components/d-organization/DOrganizationMenu.js +5 -5
  126. package/dist/components/d-organization/DOrganizatonContent.js +29 -29
  127. package/dist/components/d-project/DNamespaceProjectContent.js +6 -6
  128. package/dist/components/d-project/DNamespaceProjectList.js +5 -5
  129. package/dist/components/d-project/DNamespaceProjectMenu.js +51 -22
  130. package/dist/components/d-project/index.js +10 -9
  131. package/dist/components/d-resizable/DResizable.js +18 -17
  132. package/dist/components/d-role/DNamespaceRoleContent.js +11 -11
  133. package/dist/components/d-role/DNamespaceRolePermissions.js +5 -5
  134. package/dist/components/d-runtime/DRuntimeContent.js +10 -10
  135. package/dist/components/d-runtime/DRuntimeList.js +7 -7
  136. package/dist/components/d-user/DUser.session.hook.js +2 -2
  137. package/dist/components/d-user/DUserContent.js +19 -19
  138. package/dist/components/d-user/DUserInput.js +9 -9
  139. package/dist/components/d-user/DUserList.js +9 -9
  140. package/dist/components/file-tabs/FileTabs.js +2 -2
  141. package/dist/components/file-tabs/FileTabs.service.d.ts +5 -0
  142. package/dist/components/file-tabs/FileTabs.service.js +68 -16
  143. package/dist/components/file-tabs/FileTabs.view.d.ts +1 -0
  144. package/dist/components/form/CheckboxInput.js +4 -4
  145. package/dist/components/form/EmailInput.js +12 -12
  146. package/dist/components/form/Input.js +220 -206
  147. package/dist/components/form/Input.selection.hook.js +9 -9
  148. package/dist/components/form/Input.syntax.hook.js +7 -7
  149. package/dist/components/form/NumberInput.js +9 -9
  150. package/dist/components/form/PasswordInput.js +6 -6
  151. package/dist/components/form/SwitchInput.js +7 -7
  152. package/dist/components/form/TextInput.js +10 -10
  153. package/dist/components/segmented-control/SegmentedControl.d.ts +1 -1
  154. package/dist/components/segmented-control/SegmentedControl.js +14 -12
  155. package/dist/index.d.ts +8 -0
  156. package/dist/index.js +117 -117
  157. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +527 -0
  158. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +402 -0
  159. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +208 -0
  160. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
  161. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +130 -0
  162. package/dist/node_modules/@radix-ui/primitive/dist/index.js +9 -0
  163. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
  164. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
  165. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
  166. package/dist/node_modules/@radix-ui/react-context/dist/index.js +53 -0
  167. package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +222 -0
  168. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
  169. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
  170. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +17 -0
  171. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
  172. package/dist/node_modules/@radix-ui/react-id/dist/index.js +13 -0
  173. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +636 -0
  174. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +219 -0
  175. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
  176. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
  177. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
  178. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +183 -0
  179. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  180. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
  181. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
  182. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
  183. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
  184. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
  185. package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
  186. package/dist/node_modules/get-nonce/dist/es2015/index.js +7 -0
  187. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +2 -2
  188. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +8 -8
  189. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
  190. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +112 -0
  191. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
  192. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
  193. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +68 -0
  194. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
  195. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
  196. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
  197. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
  198. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
  199. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
  200. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
  201. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
  202. package/dist/node_modules/tslib/tslib.es6.js +27 -0
  203. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
  204. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
  205. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
  206. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
  207. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
  208. package/dist/utils/generics.d.ts +5 -6
  209. package/dist/utils/generics.js +2 -2
  210. package/dist/utils/objectStore.js +15 -15
  211. package/dist/utils/reactiveArrayService.js +5 -5
  212. package/package.json +7 -4
  213. package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +0 -1
  214. package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +0 -1
  215. package/dist/assets/components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css +0 -1
  216. package/dist/components/d-flow/DFlow.view.d.ts +0 -113
  217. package/dist/components/d-flow/DFlow.view.js +0 -248
  218. package/dist/components/d-flow/control/DFlowControl.d.ts +0 -2
  219. package/dist/components/d-flow/control/DFlowControl.js +0 -81
  220. package/dist/components/d-flow/control/index.d.ts +0 -1
  221. package/dist/components/d-flow/control/index.js +0 -4
  222. package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +0 -10
  223. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +0 -2
  224. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +0 -18
  225. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +0 -4
  226. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +0 -20
  227. package/dist/components/d-flow/data-type/DFlowDataType.view.js +0 -65
  228. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +0 -243
  229. package/dist/components/d-flow/edge/DFlowEdge.js +0 -48
  230. package/dist/components/d-flow/export/DFlowExport.js +0 -24
  231. package/dist/components/d-flow/folder/DFlowFolder.js +0 -119
  232. package/dist/components/d-flow/function/DFlowFunction.return.hook.js +0 -11
  233. package/dist/components/d-flow/function/DFlowFunction.service.js +0 -9
  234. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +0 -10
  235. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +0 -74
  236. package/dist/components/d-flow/function/DFlowFunction.view.js +0 -117
  237. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +0 -158
  238. package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +0 -5
  239. package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +0 -55
  240. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +0 -26
  241. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +0 -93
  242. package/dist/components/d-flow/minimap/DFlowMiniMap.js +0 -22
  243. package/dist/components/d-flow/minimap/index.d.ts +0 -1
  244. package/dist/components/d-flow/minimap/index.js +0 -4
  245. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +0 -150
  246. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +0 -5
  247. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +0 -18
  248. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +0 -21
  249. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +0 -25
  250. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +0 -67
  251. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +0 -35
  252. package/dist/components/d-flow/suggestion/index.d.ts +0 -2
  253. package/dist/components/d-flow/suggestion/index.js +0 -7
  254. package/dist/components/d-flow/tab/DFlowTabDefault.js +0 -103
  255. package/dist/components/d-flow/tab/DFlowTabTrigger.js +0 -51
  256. package/dist/components/d-flow/tab/DFlowTabs.d.ts +0 -2
  257. package/dist/components/d-flow/tab/DFlowTabs.js +0 -105
  258. package/dist/components/d-flow/type/DFlowType.service.js +0 -9
  259. package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +0 -3
  260. package/dist/components/d-flow/validation/DFlowValidation.hook.js +0 -10
  261. package/dist/components/d-flow/validation/DFlowValidation.js +0 -60
  262. /package/dist/assets/components/{d-flow/input → d-flow-input}/DFlowInputDataType.style.css +0 -0
  263. /package/dist/assets/components/{d-flow/validation → d-flow-validation}/DFlowValidation.style.css +0 -0
  264. /package/dist/components/{d-flow/data-type → d-flow-data-type}/index.d.ts +0 -0
  265. /package/dist/components/{d-flow/data-type → d-flow-data-type}/index.js +0 -0
  266. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeItemOfCollectionRule.d.ts +0 -0
  267. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeItemOfCollectionRule.js +0 -0
  268. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeNumberRangeRule.d.ts +0 -0
  269. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeNumberRangeRule.js +0 -0
  270. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRegexRule.d.ts +0 -0
  271. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRegexRule.js +0 -0
  272. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRule.js +0 -0
  273. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRules.d.ts +0 -0
  274. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRules.js +0 -0
  275. /package/dist/components/{d-flow/folder → d-flow-folder}/index.d.ts +0 -0
  276. /package/dist/components/{d-flow/folder → d-flow-folder}/index.js +0 -0
  277. /package/dist/components/{d-flow/function → d-flow-function}/index.d.ts +0 -0
  278. /package/dist/components/{d-flow/function → d-flow-function}/index.js +0 -0
  279. /package/dist/components/{d-flow/export → d-flow-panel}/DFlowExport.d.ts +0 -0
  280. /package/dist/components/{d-flow/minimap → d-flow-panel}/DFlowMiniMap.d.ts +0 -0
  281. /package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.d.ts +0 -0
  282. /package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuFooter.d.ts +0 -0
  283. /package/dist/components/{d-flow/type → d-flow-type}/index.d.ts +0 -0
  284. /package/dist/components/{d-flow/type → d-flow-type}/index.js +0 -0
  285. /package/dist/components/{d-flow/validation → d-flow-validation}/DFlowValidation.d.ts +0 -0
  286. /package/dist/components/{d-flow/validation → d-flow-validation}/index.d.ts +0 -0
@@ -1,95 +1,104 @@
1
- import { jsx as K } from "react/jsx-runtime";
2
- import { c as U } from "../../_virtual/compiler-runtime.js";
3
- import { ReactFlowProvider as $, useNodesState as J, useEdgesState as Q, useUpdateNodeInternals as Z, ReactFlow as tt } from "@xyflow/react";
4
- import G from "react";
5
- import { mergeCode0Props as et } from "../../utils/utils.js";
6
- import '../../assets/components/d-flow/DFlow.style.css';import '../../assets/node_modules/@xyflow/react/dist/style.css';/* empty css */
1
+ import { jsx as Y, jsxs as U } from "react/jsx-runtime";
2
+ import { c as $ } from "../../_virtual/compiler-runtime.js";
3
+ import "../../utils/contextStore.js";
4
+ import K from "react";
5
+ import { mergeCode0Props as J } from "../../utils/utils.js";
6
+ import { ReactFlowProvider as Q, useNodesState as Z, useEdgesState as tt, useUpdateNodeInternals as et, ReactFlow as ot, Background as st, BackgroundVariant as nt } from "@xyflow/react";
7
+ import '../../assets/components/d-flow-panel/DFlowMiniMap.style.css';import '../../assets/components/d-flow/DFlow.style.css';import '../../assets/node_modules/@xyflow/react/dist/style.css';/* empty css */
7
8
  /* empty css */
8
- import { DFlowFunctionDefaultCard as ot } from "./function/DFlowFunctionDefaultCard.js";
9
- import { DFlowFunctionGroupCard as st } from "./function/DFlowFunctionGroupCard.js";
10
- import { DFlowFunctionSuggestionCard as nt } from "./function/DFlowFunctionSuggestionCard.js";
11
- import { DFlowFunctionTriggerCard as it } from "./function/DFlowFunctionTriggerCard.js";
12
- import { DFlowEdge as rt } from "./edge/DFlowEdge.js";
13
- const at = (y, C) => {
14
- if (!C || C.size === 0)
9
+ import { DFlowFunctionDefaultCard as it } from "../d-flow-function/DFlowFunctionDefaultCard.js";
10
+ import { DFlowFunctionGroupCard as rt } from "../d-flow-function/DFlowFunctionGroupCard.js";
11
+ import { DFlowFunctionSuggestionCard as at } from "../d-flow-function/DFlowFunctionSuggestionCard.js";
12
+ import { DFlowFunctionTriggerCard as dt } from "../d-flow-function/DFlowFunctionTriggerCard.js";
13
+ import { DFlowEdge as ct } from "./DFlowEdge.js";
14
+ import { DFlowPanelSize as ht } from "../d-flow-panel/DFlowPanelSize.js";
15
+ import { DFlowPanelControl as lt } from "../d-flow-panel/DFlowPanelControl.js";
16
+ import { useFlowEdges as pt } from "./DFlow.edges.hook.js";
17
+ import { useFlowNodes as gt } from "./DFlow.nodes.hook.js";
18
+ import "../button/Button.js";
19
+ /* empty css */
20
+ import { DFlowPanelLayout as mt } from "../d-flow-panel/DFlowPanelLayout.js";
21
+ import { DFlowValidation as ft } from "../d-flow-validation/DFlowValidation.js";
22
+ const ut = (F, N) => {
23
+ if (!N || N.size === 0)
15
24
  return {
16
- nodes: y
25
+ nodes: F
17
26
  };
18
- const m = 75, Y = 75, N = 16, z = 0.25;
19
- let _ = 0, F = !1;
20
- const f = y.map((o) => ({
27
+ const w = 50, P = 50, k = 16, S = 0.25;
28
+ let W = 0, D = !1;
29
+ const f = F.map((o) => ({
21
30
  ...o
22
- })), L = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Map();
31
+ })), H = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map();
23
32
  for (const o of f) {
24
- const c = o.data?.linkingId;
25
- if (c) {
26
- let l = W.get(c);
27
- l || (l = [], W.set(c, l)), l.push(o.id);
33
+ const l = o.data?.linkingId;
34
+ if (l) {
35
+ let p = L.get(l);
36
+ p || (p = [], L.set(l, p)), p.push(o.id);
28
37
  }
29
- if (o.parentId && !c) {
30
- let l = L.get(o.parentId);
31
- l || (l = [], L.set(o.parentId, l)), l.push(o.id);
38
+ if (o.parentId && !l) {
39
+ let p = H.get(o.parentId);
40
+ p || (p = [], H.set(o.parentId, p)), p.push(o.id);
32
41
  }
33
42
  }
34
- const M = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), w = new Map(f.map((o) => [o.id, o]));
35
- for (const [o, c] of L) {
36
- const l = new Array(c.length);
37
- for (let b = 0; b < c.length; b++) l[b] = w.get(c[b]);
38
- M.set(o, l);
43
+ const z = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), G = new Map(f.map((o) => [o.id, o]));
44
+ for (const [o, l] of H) {
45
+ const p = new Array(l.length);
46
+ for (let g = 0; g < l.length; g++) p[g] = G.get(l[g]);
47
+ z.set(o, p);
39
48
  }
40
- for (const [o, c] of W) {
41
- const l = new Array(c.length);
42
- for (let b = 0; b < c.length; b++) l[b] = w.get(c[b]);
43
- E.set(o, l);
49
+ for (const [o, l] of L) {
50
+ const p = new Array(l.length);
51
+ for (let g = 0; g < l.length; g++) p[g] = G.get(l[g]);
52
+ C.set(o, p);
44
53
  }
45
- const g = /* @__PURE__ */ new Map();
54
+ const x = /* @__PURE__ */ new Map();
46
55
  for (const o of f) {
47
- const c = typeof o.style?.width == "number" ? o.style.width : void 0, l = typeof o.style?.height == "number" ? o.style.height : void 0, b = o.measured?.width && o.measured.width > 0 ? o.measured.width : void 0, P = o.measured?.height && o.measured.height > 0 ? o.measured.height : void 0;
48
- g.set(o.id, {
49
- w: c ?? b ?? 200,
50
- h: l ?? P ?? 80
56
+ const l = typeof o.style?.width == "number" ? o.style.width : void 0, p = typeof o.style?.height == "number" ? o.style.height : void 0, g = o.measured?.width && o.measured.width > 0 ? o.measured.width : void 0, M = o.measured?.height && o.measured.height > 0 ? o.measured.height : void 0;
57
+ x.set(o.id, {
58
+ w: l ?? g ?? 200,
59
+ h: p ?? M ?? 80
51
60
  });
52
61
  }
53
- const B = /* @__PURE__ */ new Map(), x = (o) => {
54
- if (B.has(o.id)) return B.get(o.id);
62
+ const I = /* @__PURE__ */ new Map(), r = (o) => {
63
+ if (I.has(o.id)) return I.get(o.id);
55
64
  if (o.type !== "group") {
56
- const T = g.get(o.id);
57
- return B.set(o.id, T), T;
65
+ const E = x.get(o.id);
66
+ return I.set(o.id, E), E;
58
67
  }
59
- const c = typeof o.style?.width == "number" ? o.style.width : void 0, l = typeof o.style?.height == "number" ? o.style.height : void 0;
60
- if (c !== void 0 && l !== void 0) {
61
- const T = {
62
- w: c,
63
- h: l
68
+ const l = typeof o.style?.width == "number" ? o.style.width : void 0, p = typeof o.style?.height == "number" ? o.style.height : void 0;
69
+ if (l !== void 0 && p !== void 0) {
70
+ const E = {
71
+ w: l,
72
+ h: p
64
73
  };
65
- return B.set(o.id, T), T;
74
+ return I.set(o.id, E), E;
66
75
  }
67
- const b = M.get(o.id) ?? [];
68
- let P = 0, H = 0, v = 0;
69
- for (const T of b) {
70
- const V = x(T);
71
- P += V.h, V.w > H && (H = V.w), v++;
76
+ const g = z.get(o.id) ?? [];
77
+ let M = 0, _ = 0, v = 0;
78
+ for (const E of g) {
79
+ const V = r(E);
80
+ M += V.h, V.w > _ && (_ = V.w), v++;
72
81
  }
73
- P += m * Math.max(0, v - 1);
74
- const D = {
75
- w: H + 2 * N,
76
- h: (v ? P : 0) + 2 * N
82
+ M += w * Math.max(0, v - 1);
83
+ const A = {
84
+ w: _ + 2 * k,
85
+ h: (v ? M : 0) + 2 * k
77
86
  };
78
- return B.set(o.id, D), D;
87
+ return I.set(o.id, A), A;
79
88
  };
80
89
  do {
81
- F = !1, _++, B.clear();
82
- for (const e of f) x(e);
83
- const o = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = (e) => Math.round(e / 10), b = (e, h, p) => {
84
- const d = [{
90
+ D = !1, W++, I.clear();
91
+ for (const e of f) r(e);
92
+ const o = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), p = (e) => Math.round(e / 10), g = (e, h, m) => {
93
+ const c = [{
85
94
  node: e,
86
95
  cx: h,
87
- cy: p,
96
+ cy: m,
88
97
  phase: 0
89
98
  }];
90
- let I = 0;
91
- for (; d.length; ) {
92
- const t = d[d.length - 1];
99
+ let y = 0;
100
+ for (; c.length; ) {
101
+ const t = c[c.length - 1];
93
102
  switch (t.phase) {
94
103
  case 0: {
95
104
  o.set(t.node.id, {
@@ -99,26 +108,26 @@ const at = (y, C) => {
99
108
  const {
100
109
  w: s,
101
110
  h: n
102
- } = x(t.node);
111
+ } = r(t.node);
103
112
  t.w = s, t.h = n;
104
- const i = E.get(t.node.id) ?? [], r = [], u = [];
105
- for (const k of i)
106
- k.type === "group" ? u.push(k) : r.push(k);
107
- r.sort((k, a) => +k.data?.paramIndex - +a.data?.paramIndex), u.sort((k, a) => +k.data?.paramIndex - +a.data?.paramIndex), t.right = r, t.gParams = u;
108
- let S = 0;
109
- for (const k of r) S += x(k).h;
110
- S += m * Math.max(0, r.length - 1), t.py = t.cy - S / 2, t.rightBottom = t.cy + n / 2, t.rightIndex = 0, t.phase = 1;
113
+ const i = C.get(t.node.id) ?? [], a = [], u = [];
114
+ for (const b of i)
115
+ b.type === "group" ? u.push(b) : a.push(b);
116
+ a.sort((b, d) => +b.data?.paramIndex - +d.data?.paramIndex), u.sort((b, d) => +b.data?.paramIndex - +d.data?.paramIndex), t.right = a, t.gParams = u;
117
+ let T = 0;
118
+ for (const b of a) T += r(b).h;
119
+ T += w * Math.max(0, a.length - 1), t.py = t.cy - T / 2, t.rightBottom = t.cy + n / 2, t.rightIndex = 0, t.phase = 1;
111
120
  break;
112
121
  }
113
122
  case 1: {
114
123
  if (t.rightIndex < t.right.length) {
115
- const s = t.right[t.rightIndex], n = x(s), i = t.cx + t.w / 2 + Y + n.w / 2;
116
- let r = t.py + n.h / 2;
117
- const u = l(i), k = (c.get(u) ?? Number.NEGATIVE_INFINITY) + m;
118
- r - n.h / 2 < k && (r = k + n.h / 2, t.py = r - n.h / 2), t.childKey = u, t.childPs = n, d.push({
124
+ const s = t.right[t.rightIndex], n = r(s), i = t.cx + t.w / 2 + P + n.w / 2;
125
+ let a = t.py + n.h / 2;
126
+ const u = p(i), b = (l.get(u) ?? Number.NEGATIVE_INFINITY) + w;
127
+ a - n.h / 2 < b && (a = b + n.h / 2, t.py = a - n.h / 2), t.childKey = u, t.childPs = n, c.push({
119
128
  node: s,
120
129
  cx: i,
121
- cy: r,
130
+ cy: a,
122
131
  phase: 0
123
132
  }), t.phase = 10;
124
133
  } else
@@ -127,7 +136,7 @@ const at = (y, C) => {
127
136
  }
128
137
  case 10: {
129
138
  const s = t.lastChildBottom;
130
- c.set(t.childKey, Math.max(c.get(t.childKey) ?? Number.NEGATIVE_INFINITY, s)), t.rightBottom = Math.max(t.rightBottom, s), t.py = Math.max(t.py + t.childPs.h + m, s + m), t.rightIndex++, t.phase = 1;
139
+ l.set(t.childKey, Math.max(l.get(t.childKey) ?? Number.NEGATIVE_INFINITY, s)), t.rightBottom = Math.max(t.rightBottom, s), t.py = Math.max(t.py + t.childPs.h + w, s + w), t.rightIndex++, t.phase = 1;
131
140
  break;
132
141
  }
133
142
  case 2: {
@@ -135,21 +144,21 @@ const at = (y, C) => {
135
144
  const s = [];
136
145
  let n = 0;
137
146
  for (const i of t.gParams) {
138
- const r = x(i);
139
- s.push(r), n += r.w;
147
+ const a = r(i);
148
+ s.push(a), n += a.w;
140
149
  }
141
- n += Y * (t.gParams.length - 1), t.gSizes = s, t.gx = t.cx - n / 2, t.gy = t.bottom + m, t.rowBottom = t.bottom, t.gIndex = 0, t.phase = 3;
150
+ n += P * (t.gParams.length - 1), t.gSizes = s, t.gx = t.cx - n / 2, t.gy = t.bottom + w, t.rowBottom = t.bottom, t.gIndex = 0, t.phase = 3;
142
151
  } else
143
152
  t.phase = 4;
144
153
  break;
145
154
  }
146
155
  case 3: {
147
156
  if (t.gIndex < t.gParams.length) {
148
- const s = t.gParams[t.gIndex], n = t.gSizes[t.gIndex], i = t.gx + n.w / 2, r = t.gy + n.h / 2;
149
- t.gx += n.w + Y, d.push({
157
+ const s = t.gParams[t.gIndex], n = t.gSizes[t.gIndex], i = t.gx + n.w / 2, a = t.gy + n.h / 2;
158
+ t.gx += n.w + P, c.push({
150
159
  node: s,
151
160
  cx: i,
152
- cy: r,
161
+ cy: a,
153
162
  phase: 0
154
163
  }), t.childPs = n, t.phase = 30;
155
164
  } else
@@ -163,213 +172,219 @@ const at = (y, C) => {
163
172
  }
164
173
  case 4: {
165
174
  if (t.node.type === "group") {
166
- const s = M.get(t.node.id) ?? [], n = [];
175
+ const s = z.get(t.node.id) ?? [], n = [];
167
176
  for (const i of s)
168
177
  i.data?.linkingId || n.push(i);
169
- t.kids = n, t.kidIndex = 0, t.curY = t.cy - t.h / 2 + N, t.phase = 5;
178
+ t.kids = n, t.kidIndex = 0, t.curY = t.cy - t.h / 2 + k, t.phase = 5;
170
179
  } else
171
180
  t.phase = 6;
172
181
  break;
173
182
  }
174
183
  case 5: {
175
184
  if (t.kidIndex < t.kids.length) {
176
- const s = t.kids[t.kidIndex], n = x(s), i = t.curY + n.h / 2;
177
- d.push({
185
+ const s = t.kids[t.kidIndex], n = r(s), i = t.curY + n.h / 2;
186
+ c.push({
178
187
  node: s,
179
188
  cx: t.cx,
180
189
  cy: i,
181
190
  phase: 0
182
191
  }), t.childPs = n, t.phase = 50;
183
192
  } else {
184
- const s = t.curY - m;
185
- t.bottom = Math.max(t.bottom, s + N), t.phase = 6;
193
+ const s = t.curY - w;
194
+ t.bottom = Math.max(t.bottom, s + k), t.phase = 6;
186
195
  }
187
196
  break;
188
197
  }
189
198
  case 50: {
190
199
  const s = t.lastChildBottom;
191
- t.curY = s + m, t.kidIndex++, t.phase = 5;
200
+ t.curY = s + w, t.kidIndex++, t.phase = 5;
192
201
  break;
193
202
  }
194
203
  case 6: {
195
- const s = d.pop();
196
- d.length ? d[d.length - 1].lastChildBottom = s.bottom : I = s.bottom;
204
+ const s = c.pop();
205
+ c.length ? c[c.length - 1].lastChildBottom = s.bottom : y = s.bottom;
197
206
  break;
198
207
  }
199
208
  }
200
209
  }
201
- return I;
210
+ return y;
202
211
  };
203
- let P = 0;
212
+ let M = 0;
204
213
  for (const e of f)
205
- !e.data?.linkingId && !e.parentId && (P = b(e, 0, P + x(e).h / 2) + m);
206
- const H = /* @__PURE__ */ new Map();
207
- for (const e of f) H.set(e.id, o.get(e.id));
214
+ !e.data?.linkingId && !e.parentId && (M = g(e, 0, M + r(e).h / 2) + w);
215
+ const _ = /* @__PURE__ */ new Map();
216
+ for (const e of f) _.set(e.id, o.get(e.id));
208
217
  const v = /* @__PURE__ */ new Map();
209
218
  for (const e of f) {
210
219
  const {
211
220
  w: h,
212
- h: p
213
- } = x(e), {
214
- x: d,
215
- y: I
216
- } = H.get(e.id);
221
+ h: m
222
+ } = r(e), {
223
+ x: c,
224
+ y
225
+ } = _.get(e.id);
217
226
  v.set(e.id, {
218
- x: d - h / 2,
219
- y: I - p / 2
227
+ x: c - h / 2,
228
+ y: y - m / 2
220
229
  });
221
230
  }
222
231
  for (const e of f) {
223
232
  const h = v.get(e.id);
224
- let p = h.x, d = h.y;
233
+ let m = h.x, c = h.y;
225
234
  if (e.parentId) {
226
- const I = v.get(e.parentId);
227
- p -= I.x, d -= I.y;
235
+ const y = v.get(e.parentId);
236
+ m -= y.x, c -= y.y;
228
237
  }
229
238
  e.position = {
230
- x: p,
231
- y: d
239
+ x: m,
240
+ y: c
232
241
  };
233
242
  }
234
- const D = /* @__PURE__ */ new Map();
235
- for (const e of f) D.set(e.id, e);
236
- const T = (e) => {
237
- let h = 0, p = e;
238
- for (; p?.parentId && (h++, p = D.get(p.parentId), !!p); )
243
+ const A = /* @__PURE__ */ new Map();
244
+ for (const e of f) A.set(e.id, e);
245
+ const E = (e) => {
246
+ let h = 0, m = e;
247
+ for (; m?.parentId && (h++, m = A.get(m.parentId), !!m); )
239
248
  ;
240
249
  return h;
241
250
  }, V = [];
242
251
  for (const e of f)
243
252
  e.type === "group" && V.push(e);
244
- V.sort((e, h) => T(h) - T(e));
253
+ V.sort((e, h) => E(h) - E(e));
245
254
  for (const e of V) {
246
255
  const h = [];
247
- for (const a of f)
248
- a.parentId === e.id && h.push(a);
256
+ for (const d of f)
257
+ d.parentId === e.id && h.push(d);
249
258
  if (!h.length) {
250
- const a = typeof e.style?.width == "number" ? e.style.width : 2 * N, A = typeof e.style?.height == "number" ? e.style.height : 2 * N;
259
+ const d = typeof e.style?.width == "number" ? e.style.width : 2 * k, B = typeof e.style?.height == "number" ? e.style.height : 2 * k;
251
260
  e.style = {
252
261
  ...e.style,
253
- width: a,
254
- height: A
262
+ width: d,
263
+ height: B
255
264
  };
256
265
  continue;
257
266
  }
258
- const p = (a) => {
259
- const A = typeof a.style?.width == "number" ? a.style.width : void 0, j = typeof a.style?.height == "number" ? a.style.height : void 0, X = g.get(a.id);
267
+ const m = (d) => {
268
+ const B = typeof d.style?.width == "number" ? d.style.width : void 0, q = typeof d.style?.height == "number" ? d.style.height : void 0, X = x.get(d.id);
260
269
  return {
261
- w: A ?? X.w,
262
- h: j ?? X.h
270
+ w: B ?? X.w,
271
+ h: q ?? X.h
263
272
  };
264
273
  };
265
- let d = Number.POSITIVE_INFINITY, I = Number.POSITIVE_INFINITY, t = Number.NEGATIVE_INFINITY, s = Number.NEGATIVE_INFINITY;
266
- for (const a of h) {
267
- const A = p(a);
268
- a.position.x < d && (d = a.position.x), a.position.y < I && (I = a.position.y), a.position.x + A.w > t && (t = a.position.x + A.w), a.position.y + A.h > s && (s = a.position.y + A.h);
274
+ let c = Number.POSITIVE_INFINITY, y = Number.POSITIVE_INFINITY, t = Number.NEGATIVE_INFINITY, s = Number.NEGATIVE_INFINITY;
275
+ for (const d of h) {
276
+ const B = m(d);
277
+ d.position.x < c && (c = d.position.x), d.position.y < y && (y = d.position.y), d.position.x + B.w > t && (t = d.position.x + B.w), d.position.y + B.h > s && (s = d.position.y + B.h);
269
278
  }
270
- const n = d - N, i = I - N;
271
- if (Math.abs(n) > z || Math.abs(i) > z) {
272
- for (const a of h)
273
- a.position.x -= n, a.position.y -= i;
274
- F = !0;
279
+ const n = c - k, i = y - k;
280
+ if (Math.abs(n) > S || Math.abs(i) > S) {
281
+ for (const d of h)
282
+ d.position.x -= n, d.position.y -= i;
283
+ D = !0;
275
284
  }
276
- const r = t - d + 2 * N, u = s - I + 2 * N, S = typeof e.style?.width == "number" ? e.style.width : x(e).w, k = typeof e.style?.height == "number" ? e.style.height : x(e).h;
277
- (Math.abs(r - S) > z || Math.abs(u - k) > z) && (F = !0), e.measured = {
278
- width: r,
285
+ const a = t - c + 2 * k, u = s - y + 2 * k, T = typeof e.style?.width == "number" ? e.style.width : r(e).w, b = typeof e.style?.height == "number" ? e.style.height : r(e).h;
286
+ (Math.abs(a - T) > S || Math.abs(u - b) > S) && (D = !0), e.measured = {
287
+ width: a,
279
288
  height: u
280
289
  }, e.style = {
281
290
  ...e.style,
282
- width: r,
291
+ width: a,
283
292
  height: u
284
- }, g.set(e.id, {
285
- w: r,
293
+ }, x.set(e.id, {
294
+ w: a,
286
295
  h: u
287
296
  });
288
297
  }
289
- B.clear();
290
- for (const e of f) x(e);
298
+ I.clear();
299
+ for (const e of f) r(e);
291
300
  const R = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map();
292
301
  for (const e of f) {
293
- const h = x(e), p = o.get(e.id);
294
- O.set(e.id, p), R.set(e.id, {
295
- x: p.x - h.w / 2,
296
- y: p.y - h.h / 2
302
+ const h = r(e), m = o.get(e.id);
303
+ O.set(e.id, m), R.set(e.id, {
304
+ x: m.x - h.w / 2,
305
+ y: m.y - h.h / 2
297
306
  });
298
307
  }
299
308
  for (const e of f) {
300
- const h = [], p = E.get(e.id) ?? [];
301
- for (const i of p)
309
+ const h = [], m = C.get(e.id) ?? [];
310
+ for (const i of m)
302
311
  i.type === "group" && h.push(i);
303
312
  if (!h.length) continue;
304
- const d = h.slice().sort((i, r) => (+i.data?.paramIndex || 0) - (+r.data?.paramIndex || 0)), I = [];
305
- for (const i of d) {
306
- const r = D.get(i.id), u = typeof r.style?.width == "number" ? r.style.width : void 0;
307
- I.push(u ?? x(r).w);
313
+ const c = h.slice().sort((i, a) => (+i.data?.paramIndex || 0) - (+a.data?.paramIndex || 0)), y = [];
314
+ for (const i of c) {
315
+ const a = A.get(i.id), u = typeof a.style?.width == "number" ? a.style.width : void 0;
316
+ y.push(u ?? r(a).w);
308
317
  }
309
318
  let t = 0;
310
- for (const i of I) t += i;
311
- t += Y * (d.length - 1);
319
+ for (const i of y) t += i;
320
+ t += P * (c.length - 1);
312
321
  let n = O.get(e.id).x - t / 2;
313
- for (let i = 0; i < d.length; i++) {
314
- const r = d[i], u = D.get(r.id), S = u.parentId ? R.get(u.parentId) : {
322
+ for (let i = 0; i < c.length; i++) {
323
+ const a = c[i], u = A.get(a.id), T = u.parentId ? R.get(u.parentId) : {
315
324
  x: 0
316
325
  };
317
- u.position.x = n - S.x, n += I[i] + Y;
326
+ u.position.x = n - T.x, n += y[i] + P;
318
327
  }
319
328
  }
320
- } while (F && _ < 5);
329
+ } while (D && W < 5);
321
330
  return {
322
331
  nodes: f
323
332
  };
324
- }, q = G.cache(at), bt = (y) => {
325
- const C = U.c(2);
326
- let m;
327
- return C[0] !== y ? (m = /* @__PURE__ */ K($, { children: /* @__PURE__ */ K(dt, { ...y }) }), C[0] = y, C[1] = m) : m = C[1], m;
328
- }, dt = (y) => {
329
- const [C, m] = J(y.nodes), [Y, N, z] = Q(y.edges), _ = Z(), F = G.useCallback((M) => {
333
+ }, j = K.cache(ut), Ht = (F) => {
334
+ const N = $.c(2);
335
+ let w;
336
+ return N[0] !== F ? (w = /* @__PURE__ */ Y(Q, { children: /* @__PURE__ */ Y(wt, { ...F }) }), N[0] = F, N[1] = w) : w = N[1], w;
337
+ }, wt = (F) => {
338
+ const {
339
+ flowId: N
340
+ } = F, w = {
341
+ default: it,
342
+ group: rt,
343
+ suggestion: at,
344
+ trigger: dt
345
+ }, P = {
346
+ default: ct
347
+ }, k = gt(N), S = pt(N), [W, D] = Z([]), [f, H, L] = tt([]), z = et(), C = K.useCallback((x) => {
330
348
  requestAnimationFrame(() => {
331
- M.forEach((E) => _(E));
349
+ x.forEach((I) => z(I));
332
350
  });
333
- }, [_]), f = {
334
- default: ot,
335
- group: st,
336
- suggestion: nt,
337
- trigger: it,
338
- ...y.nodeTypes
339
- }, L = {
340
- default: rt,
341
- ...y.edgeTypes
342
- }, W = G.useCallback((M) => {
343
- const E = Array.from(new Set(M.filter((g) => g.type === "dimensions" || g.type === "position").map((g) => g.id))), w = /* @__PURE__ */ new Map();
344
- M.filter((g) => g.type === "dimensions").forEach((g) => w.set(g.id, g.dimensions)), m((g) => {
345
- const B = g.map((o) => {
346
- if (!w.has(o.id)) return o;
347
- const c = w.get(o.id) || {};
351
+ }, [z]), G = K.useCallback((x) => {
352
+ const I = Array.from(new Set(x.filter((o) => o.type === "dimensions" || o.type === "position").map((o) => o.id))), r = /* @__PURE__ */ new Map();
353
+ x.filter((o) => o.type === "dimensions").forEach((o) => r.set(o.id, o.dimensions)), D((o) => {
354
+ const l = o.map((g) => {
355
+ if (!r.has(g.id)) return g;
356
+ const M = r.get(g.id) || {};
348
357
  return {
349
- ...o,
358
+ ...g,
350
359
  measured: {
351
- width: c.width ?? o.measured?.width ?? 0,
352
- height: c.height ?? o.measured?.height ?? 0
360
+ width: M.width ?? g.measured?.width ?? 0,
361
+ height: M.height ?? g.measured?.height ?? 0
353
362
  }
354
363
  };
355
364
  });
356
- return q(B, new Set(E)).nodes;
357
- }), F(E);
358
- }, [F]);
359
- return G.useEffect(() => {
360
- const M = y.nodes.map((w) => {
361
- const g = w.measured ? [] : document.querySelectorAll("[data-id='" + w.id + "']");
365
+ return j(l, new Set(I)).nodes;
366
+ }), C(I);
367
+ }, [C]);
368
+ return K.useEffect(() => {
369
+ const x = k.map((r) => {
370
+ const o = r.measured ? [] : document.querySelectorAll("[data-id='" + r.id + "']");
362
371
  return {
363
- ...w,
372
+ ...r,
364
373
  measured: {
365
- width: w.measured?.width ?? g[0]?.clientWidth ?? 0,
366
- height: w.measured?.height ?? g[0]?.clientHeight ?? 0
374
+ width: r.measured?.width ?? o[0]?.clientWidth ?? 0,
375
+ height: r.measured?.height ?? o[0]?.clientHeight ?? 0
367
376
  }
368
377
  };
369
- }), E = q(M, new Set(M.map((w) => w.id)));
370
- m(E.nodes), N(y.edges), F(E.nodes.map((w) => w.id));
371
- }, [y.nodes, y.edges, F]), /* @__PURE__ */ K(tt, { onlyRenderVisibleElements: !0, panOnScroll: !1, nodeTypes: f, edgeTypes: L, onInit: (M) => M.fitView(), onNodesChange: W, onEdgesChange: z, ...et("flow", y), nodes: C, edges: Y });
378
+ }), I = j(x, new Set(x.map((r) => r.id)));
379
+ D(I.nodes), H(S), C(I.nodes.map((r) => r.id));
380
+ }, [k, S, C]), /* @__PURE__ */ U(ot, { onlyRenderVisibleElements: !0, panOnScroll: !1, nodeTypes: w, edgeTypes: P, onInit: (x) => x.fitView(), onNodesChange: G, onEdgesChange: L, fitView: !0, ...J("flow", F), nodes: W, edges: f, children: [
381
+ /* @__PURE__ */ Y(st, { variant: nt.Dots, color: "rgba(255,255,255, .05)", gap: 8, size: 2 }),
382
+ /* @__PURE__ */ Y(ht, {}),
383
+ /* @__PURE__ */ Y(mt, {}),
384
+ /* @__PURE__ */ Y(ft, { flowId: "gid://sagittarius/Flow/1" }),
385
+ /* @__PURE__ */ Y(lt, { flowId: N })
386
+ ] });
372
387
  };
373
388
  export {
374
- bt as DFlow
389
+ Ht as DFlow
375
390
  };
@@ -1,3 +1,7 @@
1
1
  import { Node } from '@xyflow/react';
2
2
  import { Flow } from '@code0-tech/sagittarius-graphql-types';
3
- export declare const useFlowNodes: (flowId: Flow["id"]) => Node[];
3
+ import { DFlowFunctionDefaultCardDataProps } from '../d-flow-function/DFlowFunctionDefaultCard';
4
+ import { DFlowFunctionSuggestionCardDataProps } from '../d-flow-function/DFlowFunctionSuggestionCard';
5
+ import { DFlowFunctionTriggerCardDataProps } from '../d-flow-function/DFlowFunctionTriggerCard';
6
+ import { DFlowFunctionGroupCardDataProps } from '../d-flow-function/DFlowFunctionGroupCard';
7
+ export declare const useFlowNodes: (flowId: Flow["id"]) => Node<DFlowFunctionDefaultCardDataProps | DFlowFunctionSuggestionCardDataProps | DFlowFunctionTriggerCardDataProps | DFlowFunctionGroupCardDataProps>[];