@code0-tech/pictor 0.0.0-mvp.rc.1

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 (301) hide show
  1. package/LICENSE +29 -0
  2. package/README.md +0 -0
  3. package/dist/DFlowDataType.service-B7xAjgiJ.js +793 -0
  4. package/dist/assets/Avatar.css +1 -0
  5. package/dist/assets/Badge.css +1 -0
  6. package/dist/assets/Breadcrumb.css +1 -0
  7. package/dist/assets/Button.css +1 -0
  8. package/dist/assets/ButtonGroup.css +1 -0
  9. package/dist/assets/Card.css +1 -0
  10. package/dist/assets/Col.css +1 -0
  11. package/dist/assets/Command.css +1 -0
  12. package/dist/assets/Container.css +1 -0
  13. package/dist/assets/DFlow.css +1 -0
  14. package/dist/assets/DFlowFolder.css +1 -0
  15. package/dist/assets/DFlowFunctionDefaultCard.css +1 -0
  16. package/dist/assets/DFlowInputDataType.css +1 -0
  17. package/dist/assets/DFlowMiniMap.css +1 -0
  18. package/dist/assets/DFlowSuggestionSearchInput.css +1 -0
  19. package/dist/assets/DFlowValidation.css +1 -0
  20. package/dist/assets/DFullScreen.css +1 -0
  21. package/dist/assets/DLayout.css +1 -0
  22. package/dist/assets/DResizable.css +1 -0
  23. package/dist/assets/Dialog.css +1 -0
  24. package/dist/assets/FileTabs.css +1 -0
  25. package/dist/assets/Flex.css +1 -0
  26. package/dist/assets/Input.css +1 -0
  27. package/dist/assets/Menu.css +1 -0
  28. package/dist/assets/Quote.css +1 -0
  29. package/dist/assets/Row.css +1 -0
  30. package/dist/assets/ScrollArea.css +1 -0
  31. package/dist/assets/SegmentedControl.css +1 -0
  32. package/dist/assets/Text.css +1 -0
  33. package/dist/assets/Tooltip.css +1 -0
  34. package/dist/compiler-runtime-Cu50tn6L.js +54 -0
  35. package/dist/components/avatar/Avatar.d.ts +8 -0
  36. package/dist/components/avatar/Avatar.js +55 -0
  37. package/dist/components/badge/Badge.d.ts +7 -0
  38. package/dist/components/badge/Badge.js +22 -0
  39. package/dist/components/breadcrumb/Breadcrumb.d.ts +7 -0
  40. package/dist/components/breadcrumb/Breadcrumb.js +31 -0
  41. package/dist/components/button/Button.d.ts +10 -0
  42. package/dist/components/button/Button.js +28 -0
  43. package/dist/components/button-group/ButtonGroup.d.ts +7 -0
  44. package/dist/components/button-group/ButtonGroup.js +26 -0
  45. package/dist/components/card/Card.d.ts +14 -0
  46. package/dist/components/card/Card.js +39 -0
  47. package/dist/components/card/CardSection.d.ts +9 -0
  48. package/dist/components/card/CardSection.js +22 -0
  49. package/dist/components/col/Col.d.ts +13 -0
  50. package/dist/components/col/Col.js +26 -0
  51. package/dist/components/command/Command.d.ts +30 -0
  52. package/dist/components/command/Command.js +102 -0
  53. package/dist/components/container/Container.d.ts +6 -0
  54. package/dist/components/container/Container.js +20 -0
  55. package/dist/components/d-flow/DFlow.d.ts +5 -0
  56. package/dist/components/d-flow/DFlow.edges.hook.d.ts +4 -0
  57. package/dist/components/d-flow/DFlow.edges.hook.js +145 -0
  58. package/dist/components/d-flow/DFlow.js +373 -0
  59. package/dist/components/d-flow/DFlow.nodes.hook.d.ts +3 -0
  60. package/dist/components/d-flow/DFlow.nodes.hook.js +140 -0
  61. package/dist/components/d-flow/DFlow.service.d.ts +10 -0
  62. package/dist/components/d-flow/DFlow.service.js +11 -0
  63. package/dist/components/d-flow/DFlow.view.d.ts +109 -0
  64. package/dist/components/d-flow/DFlow.view.js +209 -0
  65. package/dist/components/d-flow/control/DFlowControl.d.ts +2 -0
  66. package/dist/components/d-flow/control/DFlowControl.js +77 -0
  67. package/dist/components/d-flow/control/index.d.ts +1 -0
  68. package/dist/components/d-flow/control/index.js +4 -0
  69. package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +10 -0
  70. package/dist/components/d-flow/data-type/DFlowDataType.service.js +7 -0
  71. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +2 -0
  72. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +18 -0
  73. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +4 -0
  74. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +6 -0
  75. package/dist/components/d-flow/data-type/DFlowDataType.view.d.ts +32 -0
  76. package/dist/components/d-flow/data-type/DFlowDataType.view.js +65 -0
  77. package/dist/components/d-flow/data-type/index.d.ts +2 -0
  78. package/dist/components/d-flow/data-type/index.js +6 -0
  79. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +6 -0
  80. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +6 -0
  81. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +6 -0
  82. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +6 -0
  83. package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.d.ts +7 -0
  84. package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.js +214 -0
  85. package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.d.ts +4 -0
  86. package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.js +214 -0
  87. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.d.ts +9 -0
  88. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +217 -0
  89. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.d.ts +4 -0
  90. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.js +214 -0
  91. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +6 -0
  92. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +7 -0
  93. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.d.ts +8 -0
  94. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.js +10 -0
  95. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.d.ts +3 -0
  96. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -0
  97. package/dist/components/d-flow/edge/DFlowEdge.d.ts +10 -0
  98. package/dist/components/d-flow/edge/DFlowEdge.js +48 -0
  99. package/dist/components/d-flow/folder/DFlowFolder.d.ts +19 -0
  100. package/dist/components/d-flow/folder/DFlowFolder.js +118 -0
  101. package/dist/components/d-flow/folder/index.d.ts +1 -0
  102. package/dist/components/d-flow/folder/index.js +6 -0
  103. package/dist/components/d-flow/function/DFlowFunction.input.hook.d.ts +4 -0
  104. package/dist/components/d-flow/function/DFlowFunction.input.hook.js +9 -0
  105. package/dist/components/d-flow/function/DFlowFunction.return.hook.d.ts +4 -0
  106. package/dist/components/d-flow/function/DFlowFunction.return.hook.js +11 -0
  107. package/dist/components/d-flow/function/DFlowFunction.service.d.ts +6 -0
  108. package/dist/components/d-flow/function/DFlowFunction.service.js +9 -0
  109. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +10 -0
  110. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +75 -0
  111. package/dist/components/d-flow/function/DFlowFunction.view.d.ts +66 -0
  112. package/dist/components/d-flow/function/DFlowFunction.view.js +117 -0
  113. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.d.ts +15 -0
  114. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +158 -0
  115. package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +5 -0
  116. package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +55 -0
  117. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.d.ts +11 -0
  118. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +26 -0
  119. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.d.ts +9 -0
  120. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +97 -0
  121. package/dist/components/d-flow/function/index.d.ts +2 -0
  122. package/dist/components/d-flow/function/index.js +7 -0
  123. package/dist/components/d-flow/index.d.ts +13 -0
  124. package/dist/components/d-flow/index.js +46 -0
  125. package/dist/components/d-flow/input/DFlowInputDataType.d.ts +8 -0
  126. package/dist/components/d-flow/input/DFlowInputDataType.js +422 -0
  127. package/dist/components/d-flow/minimap/DFlowMiniMap.d.ts +2 -0
  128. package/dist/components/d-flow/minimap/DFlowMiniMap.js +21 -0
  129. package/dist/components/d-flow/minimap/index.d.ts +1 -0
  130. package/dist/components/d-flow/minimap/index.js +4 -0
  131. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.d.ts +33 -0
  132. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +151 -0
  133. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +5 -0
  134. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +18 -0
  135. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +21 -0
  136. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +25 -0
  137. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.d.ts +8 -0
  138. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +67 -0
  139. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.d.ts +3 -0
  140. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +42 -0
  141. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.d.ts +2 -0
  142. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +69 -0
  143. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.d.ts +6 -0
  144. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +21 -0
  145. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +7 -0
  146. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +21 -0
  147. package/dist/components/d-flow/suggestion/index.d.ts +2 -0
  148. package/dist/components/d-flow/suggestion/index.js +7 -0
  149. package/dist/components/d-flow/tab/DFlowTabDefault.d.ts +11 -0
  150. package/dist/components/d-flow/tab/DFlowTabDefault.js +97 -0
  151. package/dist/components/d-flow/tab/DFlowTabTrigger.d.ts +6 -0
  152. package/dist/components/d-flow/tab/DFlowTabTrigger.js +51 -0
  153. package/dist/components/d-flow/tab/DFlowTabs.d.ts +2 -0
  154. package/dist/components/d-flow/tab/DFlowTabs.js +105 -0
  155. package/dist/components/d-flow/type/DFlowType.service.d.ts +6 -0
  156. package/dist/components/d-flow/type/DFlowType.service.js +9 -0
  157. package/dist/components/d-flow/type/DFlowType.view.d.ts +35 -0
  158. package/dist/components/d-flow/type/DFlowType.view.js +69 -0
  159. package/dist/components/d-flow/type/index.d.ts +2 -0
  160. package/dist/components/d-flow/type/index.js +6 -0
  161. package/dist/components/d-flow/validation/DFlowValidation.d.ts +6 -0
  162. package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +3 -0
  163. package/dist/components/d-flow/validation/DFlowValidation.hook.js +10 -0
  164. package/dist/components/d-flow/validation/DFlowValidation.js +59 -0
  165. package/dist/components/d-flow/validation/index.d.ts +2 -0
  166. package/dist/components/d-flow/validation/index.js +6 -0
  167. package/dist/components/d-fullscreen/DFullScreen.d.ts +7 -0
  168. package/dist/components/d-fullscreen/DFullScreen.js +20 -0
  169. package/dist/components/d-layout/DLayout.d.ts +10 -0
  170. package/dist/components/d-layout/DLayout.js +51 -0
  171. package/dist/components/d-namespace/DNamespace.service.d.ts +6 -0
  172. package/dist/components/d-namespace/DNamespace.service.js +11 -0
  173. package/dist/components/d-namespace/DNamespace.view.d.ts +32 -0
  174. package/dist/components/d-namespace/DNamespace.view.js +65 -0
  175. package/dist/components/d-namespace/index.d.ts +12 -0
  176. package/dist/components/d-namespace/index.js +35 -0
  177. package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +8 -0
  178. package/dist/components/d-namespace/license/DNamespaceLicense.service.js +11 -0
  179. package/dist/components/d-namespace/license/DNamespaceLicense.view.d.ts +26 -0
  180. package/dist/components/d-namespace/license/DNamespaceLicense.view.js +57 -0
  181. package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +9 -0
  182. package/dist/components/d-namespace/member/DNamespaceMember.service.js +11 -0
  183. package/dist/components/d-namespace/member/DNamespaceMember.view.d.ts +26 -0
  184. package/dist/components/d-namespace/member/DNamespaceMember.view.js +57 -0
  185. package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +9 -0
  186. package/dist/components/d-namespace/project/DNamespaceProject.service.js +11 -0
  187. package/dist/components/d-namespace/project/DNamespaceProject.view.d.ts +35 -0
  188. package/dist/components/d-namespace/project/DNamespaceProject.view.js +69 -0
  189. package/dist/components/d-namespace/project/DNamespaceProjectCard.d.ts +9 -0
  190. package/dist/components/d-namespace/project/DNamespaceProjectCard.js +57 -0
  191. package/dist/components/d-namespace/project/DNamespaceProjectMenu.d.ts +9 -0
  192. package/dist/components/d-namespace/project/DNamespaceProjectMenu.js +18 -0
  193. package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +10 -0
  194. package/dist/components/d-namespace/role/DNamespaceRole.service.js +11 -0
  195. package/dist/components/d-namespace/role/DNamespaceRole.view.d.ts +26 -0
  196. package/dist/components/d-namespace/role/DNamespaceRole.view.js +57 -0
  197. package/dist/components/d-organization/DOrganization.service.d.ts +8 -0
  198. package/dist/components/d-organization/DOrganization.service.js +11 -0
  199. package/dist/components/d-organization/DOrganization.view.d.ts +20 -0
  200. package/dist/components/d-organization/DOrganization.view.js +52 -0
  201. package/dist/components/d-organization/DOrganizationCard.d.ts +10 -0
  202. package/dist/components/d-organization/DOrganizationCard.js +63 -0
  203. package/dist/components/d-organization/DOrganizationMenu.d.ts +9 -0
  204. package/dist/components/d-organization/DOrganizationMenu.js +18 -0
  205. package/dist/components/d-organization/index.d.ts +4 -0
  206. package/dist/components/d-organization/index.js +19 -0
  207. package/dist/components/d-resizable/DResizable.d.ts +10 -0
  208. package/dist/components/d-resizable/DResizable.js +31 -0
  209. package/dist/components/d-runtime/DRuntime.service.d.ts +9 -0
  210. package/dist/components/d-runtime/DRuntime.service.js +11 -0
  211. package/dist/components/d-runtime/DRuntime.view.d.ts +38 -0
  212. package/dist/components/d-runtime/DRuntime.view.js +73 -0
  213. package/dist/components/d-runtime/index.d.ts +2 -0
  214. package/dist/components/d-runtime/index.js +6 -0
  215. package/dist/components/d-user/DUser.service.d.ts +21 -0
  216. package/dist/components/d-user/DUser.service.js +17 -0
  217. package/dist/components/d-user/DUser.view.d.ts +52 -0
  218. package/dist/components/d-user/DUser.view.js +100 -0
  219. package/dist/components/d-user/DUserMenu.d.ts +8 -0
  220. package/dist/components/d-user/DUserMenu.js +28 -0
  221. package/dist/components/d-user/index.d.ts +3 -0
  222. package/dist/components/d-user/index.js +17 -0
  223. package/dist/components/dialog/Dialog.d.ts +28 -0
  224. package/dist/components/dialog/Dialog.js +98 -0
  225. package/dist/components/file-tabs/FileTabs.d.ts +17 -0
  226. package/dist/components/file-tabs/FileTabs.js +70 -0
  227. package/dist/components/file-tabs/FileTabs.service.d.ts +13 -0
  228. package/dist/components/file-tabs/FileTabs.service.js +47 -0
  229. package/dist/components/file-tabs/FileTabs.view.d.ts +9 -0
  230. package/dist/components/file-tabs/FileTabs.view.js +1 -0
  231. package/dist/components/flex/Flex.d.ts +7 -0
  232. package/dist/components/flex/Flex.js +21 -0
  233. package/dist/components/form/CheckboxInput.d.ts +5 -0
  234. package/dist/components/form/CheckboxInput.js +67 -0
  235. package/dist/components/form/EmailInput.d.ts +8 -0
  236. package/dist/components/form/EmailInput.js +20 -0
  237. package/dist/components/form/Input.d.ts +22 -0
  238. package/dist/components/form/Input.js +153 -0
  239. package/dist/components/form/InputDescription.d.ts +5 -0
  240. package/dist/components/form/InputDescription.js +12 -0
  241. package/dist/components/form/InputLabel.d.ts +5 -0
  242. package/dist/components/form/InputLabel.js +12 -0
  243. package/dist/components/form/InputMessage.d.ts +5 -0
  244. package/dist/components/form/InputMessage.js +18 -0
  245. package/dist/components/form/InputSuggestion.d.ts +19 -0
  246. package/dist/components/form/InputSuggestion.js +102 -0
  247. package/dist/components/form/NumberInput.d.ts +6 -0
  248. package/dist/components/form/NumberInput.js +20 -0
  249. package/dist/components/form/PasswordInput.d.ts +8 -0
  250. package/dist/components/form/PasswordInput.js +18 -0
  251. package/dist/components/form/PinInput.d.ts +11 -0
  252. package/dist/components/form/PinInput.js +66 -0
  253. package/dist/components/form/RadioGroup.d.ts +5 -0
  254. package/dist/components/form/RadioGroup.js +48 -0
  255. package/dist/components/form/RadioInput.d.ts +7 -0
  256. package/dist/components/form/RadioInput.js +27 -0
  257. package/dist/components/form/SwitchInput.d.ts +6 -0
  258. package/dist/components/form/SwitchInput.js +19 -0
  259. package/dist/components/form/TextInput.d.ts +7 -0
  260. package/dist/components/form/TextInput.js +19 -0
  261. package/dist/components/form/index.d.ts +15 -0
  262. package/dist/components/form/index.js +37 -0
  263. package/dist/components/form/useForm.d.ts +25 -0
  264. package/dist/components/form/useForm.js +57 -0
  265. package/dist/components/menu/Menu.d.ts +27 -0
  266. package/dist/components/menu/Menu.js +104 -0
  267. package/dist/components/quote/Quote.d.ts +10 -0
  268. package/dist/components/quote/Quote.js +48 -0
  269. package/dist/components/row/Row.d.ts +6 -0
  270. package/dist/components/row/Row.js +20 -0
  271. package/dist/components/scroll-area/ScrollArea.d.ts +13 -0
  272. package/dist/components/scroll-area/ScrollArea.js +42 -0
  273. package/dist/components/segmented-control/SegmentedControl.d.ts +8 -0
  274. package/dist/components/segmented-control/SegmentedControl.js +23 -0
  275. package/dist/components/text/Text.d.ts +8 -0
  276. package/dist/components/text/Text.js +23 -0
  277. package/dist/components/tooltip/Tooltip.d.ts +13 -0
  278. package/dist/components/tooltip/Tooltip.js +47 -0
  279. package/dist/index.d.ts +28 -0
  280. package/dist/index.js +223 -0
  281. package/dist/utils/arrayService.d.ts +10 -0
  282. package/dist/utils/arrayService.js +1 -0
  283. package/dist/utils/contextStore.d.ts +62 -0
  284. package/dist/utils/contextStore.js +60 -0
  285. package/dist/utils/generics.d.ts +17 -0
  286. package/dist/utils/generics.js +311 -0
  287. package/dist/utils/index.d.ts +8 -0
  288. package/dist/utils/index.js +28 -0
  289. package/dist/utils/inspection.d.ts +13 -0
  290. package/dist/utils/inspection.js +4 -0
  291. package/dist/utils/nonReactiveArrayService.d.ts +19 -0
  292. package/dist/utils/nonReactiveArrayService.js +54 -0
  293. package/dist/utils/objectStore.d.ts +12 -0
  294. package/dist/utils/objectStore.js +34 -0
  295. package/dist/utils/reactiveArrayService.d.ts +22 -0
  296. package/dist/utils/reactiveArrayService.js +81 -0
  297. package/dist/utils/types.d.ts +57 -0
  298. package/dist/utils/types.js +4 -0
  299. package/dist/utils/utils.d.ts +68 -0
  300. package/dist/utils/utils.js +216 -0
  301. package/package.json +125 -0
@@ -0,0 +1,30 @@
1
+ import { default as React } from 'react';
2
+ import { Command as CommandPrimitive } from 'cmdk';
3
+ import { Code0ComponentProps } from '../../utils/types';
4
+ import { Dialog, DialogContent } from '../dialog/Dialog';
5
+ import { Badge } from '../badge/Badge';
6
+ import { TextInputProps } from '../form/TextInput';
7
+ export type CommandProps = Code0ComponentProps & React.ComponentProps<typeof CommandPrimitive>;
8
+ export type CommandDialogProps = {
9
+ dialogProps?: Code0ComponentProps & React.ComponentProps<typeof Dialog>;
10
+ contentProps?: Code0ComponentProps & React.ComponentProps<typeof DialogContent>;
11
+ open?: boolean;
12
+ onOpenChange?: () => void;
13
+ children: React.ReactNode;
14
+ };
15
+ export type CommandListProps = Code0ComponentProps & React.ComponentProps<typeof CommandPrimitive.List>;
16
+ export type CommandInputProps = Code0ComponentProps & TextInputProps;
17
+ export type CommandEmptyProps = Code0ComponentProps & React.ComponentProps<typeof CommandPrimitive.Empty>;
18
+ export type CommandGroupProps = Code0ComponentProps & React.ComponentProps<typeof CommandPrimitive.Group>;
19
+ export type CommandItemProps = Code0ComponentProps & React.ComponentProps<typeof CommandPrimitive.Item>;
20
+ export type CommandSeparatorProps = Code0ComponentProps & React.ComponentProps<typeof CommandPrimitive.Separator>;
21
+ export type CommandShortcutProps = Code0ComponentProps & React.ComponentProps<typeof Badge>;
22
+ export declare const Command: React.FC<CommandProps>;
23
+ export declare const CommandDialog: React.FC<CommandDialogProps>;
24
+ export declare const CommandList: React.FC<CommandListProps>;
25
+ export declare const CommandInput: React.FC<CommandInputProps>;
26
+ export declare const CommandEmpty: React.FC<CommandEmptyProps>;
27
+ export declare const CommandGroup: React.FC<CommandGroupProps>;
28
+ export declare const CommandItem: React.FC<CommandItemProps>;
29
+ export declare const CommandSeparator: React.FC<CommandSeparatorProps>;
30
+ export declare const CommandShortcut: React.FC<CommandShortcutProps>;
@@ -0,0 +1,102 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { c as a } from "../../compiler-runtime-Cu50tn6L.js";
3
+ import { Command as s } from "cmdk";
4
+ import { mergeCode0Props as d } from "../../utils/utils.js";
5
+ import { DialogContent as g, Dialog as h } from "../dialog/Dialog.js";
6
+ import { Badge as _ } from "../badge/Badge.js";
7
+ import { TextInput as $ } from "../form/TextInput.js";
8
+ import '../../assets/Command.css';const P = (e) => {
9
+ const t = a.c(4);
10
+ let n;
11
+ t[0] !== e ? (n = d("command", e), t[0] = e, t[1] = n) : n = t[1];
12
+ const o = n;
13
+ let l;
14
+ return t[2] !== o ? (l = /* @__PURE__ */ m(s, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
15
+ }, E = (e) => {
16
+ const t = a.c(14), n = e.dialogProps, o = e.open, l = e.onOpenChange;
17
+ let c;
18
+ t[0] !== e.contentProps ? (c = e.contentProps ?? {}, t[0] = e.contentProps, t[1] = c) : c = t[1];
19
+ let i;
20
+ t[2] !== c ? (i = d("command__dialog", c), t[2] = c, t[3] = i) : i = t[3];
21
+ const u = i;
22
+ let f;
23
+ t[4] !== e ? (f = /* @__PURE__ */ m(P, { ...e, children: e.children }), t[4] = e, t[5] = f) : f = t[5];
24
+ let r;
25
+ t[6] !== u || t[7] !== f ? (r = /* @__PURE__ */ m(g, { ...u, children: f }), t[6] = u, t[7] = f, t[8] = r) : r = t[8];
26
+ let C;
27
+ return t[9] !== e.dialogProps || t[10] !== e.onOpenChange || t[11] !== e.open || t[12] !== r ? (C = /* @__PURE__ */ m(h, { ...n, open: o, onOpenChange: l, children: r }), t[9] = e.dialogProps, t[10] = e.onOpenChange, t[11] = e.open, t[12] = r, t[13] = C) : C = t[13], C;
28
+ }, G = (e) => {
29
+ const t = a.c(4);
30
+ let n;
31
+ t[0] !== e ? (n = d("command__list", e), t[0] = e, t[1] = n) : n = t[1];
32
+ const o = n;
33
+ let l;
34
+ return t[2] !== o ? (l = /* @__PURE__ */ m(s.List, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
35
+ }, L = (e) => {
36
+ const t = a.c(12);
37
+ let n;
38
+ t[0] !== e.value ? (n = e.value?.toString(), t[0] = e.value, t[1] = n) : n = t[1];
39
+ let o;
40
+ t[2] !== e ? (o = (u) => {
41
+ if (e.onChange) {
42
+ const f = {
43
+ target: {
44
+ value: u
45
+ }
46
+ };
47
+ e.onChange(f);
48
+ }
49
+ }, t[2] = e, t[3] = o) : o = t[3];
50
+ let l;
51
+ t[4] !== e ? (l = d("command__input", e), t[4] = e, t[5] = l) : l = t[5];
52
+ let c;
53
+ t[6] !== l ? (c = /* @__PURE__ */ m($, { ...l }), t[6] = l, t[7] = c) : c = t[7];
54
+ let i;
55
+ return t[8] !== n || t[9] !== o || t[10] !== c ? (i = /* @__PURE__ */ m(s.Input, { value: n, onValueChange: o, asChild: !0, children: c }), t[8] = n, t[9] = o, t[10] = c, t[11] = i) : i = t[11], i;
56
+ }, j = (e) => {
57
+ const t = a.c(4);
58
+ let n;
59
+ t[0] !== e ? (n = d("command__empty", e), t[0] = e, t[1] = n) : n = t[1];
60
+ const o = n;
61
+ let l;
62
+ return t[2] !== o ? (l = /* @__PURE__ */ m(s.Empty, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
63
+ }, B = (e) => {
64
+ const t = a.c(4);
65
+ let n;
66
+ t[0] !== e ? (n = d("command__group", e), t[0] = e, t[1] = n) : n = t[1];
67
+ const o = n;
68
+ let l;
69
+ return t[2] !== o ? (l = /* @__PURE__ */ m(s.Group, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
70
+ }, R = (e) => {
71
+ const t = a.c(4);
72
+ let n;
73
+ t[0] !== e ? (n = d("command__item", e), t[0] = e, t[1] = n) : n = t[1];
74
+ const o = n;
75
+ let l;
76
+ return t[2] !== o ? (l = /* @__PURE__ */ m(s.Item, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
77
+ }, T = (e) => {
78
+ const t = a.c(4);
79
+ let n;
80
+ t[0] !== e ? (n = d("command__separator", e), t[0] = e, t[1] = n) : n = t[1];
81
+ const o = n;
82
+ let l;
83
+ return t[2] !== o ? (l = /* @__PURE__ */ m(s.Separator, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
84
+ }, V = (e) => {
85
+ const t = a.c(5);
86
+ let n;
87
+ t[0] !== e ? (n = d("command__shortcut", e), t[0] = e, t[1] = n) : n = t[1];
88
+ const o = n;
89
+ let l;
90
+ return t[2] !== e.children || t[3] !== o ? (l = /* @__PURE__ */ m(_, { ...o, children: e.children }), t[2] = e.children, t[3] = o, t[4] = l) : l = t[4], l;
91
+ };
92
+ export {
93
+ P as Command,
94
+ E as CommandDialog,
95
+ j as CommandEmpty,
96
+ B as CommandGroup,
97
+ L as CommandInput,
98
+ R as CommandItem,
99
+ G as CommandList,
100
+ T as CommandSeparator,
101
+ V as CommandShortcut
102
+ };
@@ -0,0 +1,6 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { Code0Component } from '../../utils/types';
3
+ export interface ContainerType extends Code0Component<HTMLDivElement> {
4
+ children: ReactNode | ReactNode[];
5
+ }
6
+ export declare const Container: React.FC<ContainerType>;
@@ -0,0 +1,20 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { c as l } from "../../compiler-runtime-Cu50tn6L.js";
3
+ import { mergeCode0Props as s } from "../../utils/utils.js";
4
+ import '../../assets/Container.css';const p = (i) => {
5
+ const e = l.c(6);
6
+ let t, r;
7
+ if (e[0] !== i) {
8
+ const {
9
+ children: n,
10
+ ...c
11
+ } = i;
12
+ t = n, r = s("container", c), e[0] = i, e[1] = t, e[2] = r;
13
+ } else
14
+ t = e[1], r = e[2];
15
+ let o;
16
+ return e[3] !== t || e[4] !== r ? (o = /* @__PURE__ */ m("div", { ...r, children: t }), e[3] = t, e[4] = r, e[5] = o) : o = e[5], o;
17
+ };
18
+ export {
19
+ p as Container
20
+ };
@@ -0,0 +1,5 @@
1
+ import { Code0ComponentProps } from '../../utils/types';
2
+ import { ReactFlowProps } from '@xyflow/react';
3
+ import { default as React } from 'react';
4
+ export type DFlowProps = Code0ComponentProps & ReactFlowProps;
5
+ export declare const DFlow: React.FC<DFlowProps>;
@@ -0,0 +1,4 @@
1
+ import { Edge } from '@xyflow/react';
2
+ import { Flow } from '@code0-tech/sagittarius-graphql-types';
3
+ export declare const FLOW_EDGE_RAINBOW: string[];
4
+ export declare const useFlowEdges: (flowId: Flow["id"]) => Edge[];
@@ -0,0 +1,145 @@
1
+ import { useService as D, useStore as S } from "../../utils/contextStore.js";
2
+ import { DFlowReactiveService as v } from "./DFlow.service.js";
3
+ import { NodeFunctionView as w } from "./DFlow.view.js";
4
+ import { DFlowFunctionReactiveService as y } from "./function/DFlowFunction.service.js";
5
+ import { D as N } from "../../DFlowDataType.service-B7xAjgiJ.js";
6
+ import V from "react";
7
+ import { DataTypeVariant as W } from "@code0-tech/sagittarius-graphql-types";
8
+ const s = [
9
+ "#70ffb2",
10
+ // 0 – Primary (Grün)
11
+ "#70e2ff",
12
+ // 1 – Cyan
13
+ "#709aff",
14
+ // 2 – Blau
15
+ "#a170ff",
16
+ // 3 – Violett
17
+ "#f170ff",
18
+ // 4 – Magenta
19
+ "#ff70b5",
20
+ // 5 – Pink/Rot
21
+ "#ff7070",
22
+ // 6 – Orange-Rot
23
+ "#fff170"
24
+ // 7 – Gelb
25
+ ], z = (T) => {
26
+ const I = D(v), x = D(y), E = D(N), c = I.getById(T), F = S(v), B = S(y), P = S(N);
27
+ if (!c) return [];
28
+ const n = [], d = /* @__PURE__ */ new Map();
29
+ let m = 0;
30
+ const b = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), R = (o, a = b) => (a.has(o) || a.set(o, x.getById(o)), a.get(o)), M = (o, a = h) => (a.has(o) || a.set(o, E.getDataType(o)), a.get(o)), u = (o, a, i = 0, g = b, p = h) => {
31
+ const e = `${o.id}-${m++}`;
32
+ if (m == 1 && n.push({
33
+ id: `trigger-${e}-next`,
34
+ source: c.id,
35
+ // Handle-Bottom des Trigger-Nodes
36
+ target: e,
37
+ // Handle-Top der Function-Card
38
+ data: {
39
+ color: s[i % s.length],
40
+ isParameter: !1
41
+ },
42
+ deletable: !1,
43
+ selectable: !1
44
+ }), a) {
45
+ const t = d.get(a) ?? [];
46
+ t.length > 0 ? t.forEach((r, l) => n.push({
47
+ id: `${r}-${e}-next-${l}`,
48
+ source: r,
49
+ // Handle-Bottom der Group-Card
50
+ target: e,
51
+ // Handle-Top der Function-Card
52
+ data: {
53
+ color: s[i % s.length],
54
+ isParameter: !1
55
+ },
56
+ deletable: !1,
57
+ selectable: !1
58
+ })) : n.push({
59
+ id: `${a}-${e}-next`,
60
+ source: a,
61
+ // Handle-Bottom der Function-Card
62
+ target: e,
63
+ // Handle-Top der Function-Card
64
+ data: {
65
+ color: s[i % s.length],
66
+ isParameter: !1
67
+ },
68
+ deletable: !1,
69
+ selectable: !1
70
+ });
71
+ }
72
+ if (o.parameters?.forEach((t) => {
73
+ const r = t.value, l = R(o.functionDefinition?.id, g)?.parameterDefinitions?.find((f) => f.id === t.id), $ = l?.dataTypeIdentifier, G = $ ? M($, p) : void 0;
74
+ if (r) {
75
+ if (G?.variant === W.Node) {
76
+ const f = `${e}-group-${m++}`;
77
+ n.push({
78
+ id: `${e}-${f}-param-${t.id}`,
79
+ source: e,
80
+ // FunctionCard (Quelle)
81
+ target: f,
82
+ // GroupCard (Ziel – hat Top: target)
83
+ deletable: !1,
84
+ selectable: !1,
85
+ label: l?.names?.nodes[0]?.content ?? t.id,
86
+ data: {
87
+ color: s[i % s.length],
88
+ isParameter: !1
89
+ }
90
+ }), r && r instanceof w && ((d.get(e) ?? (d.set(e, []), d.get(e))).push(f), u(t.value, void 0, i + 1, g, p));
91
+ } else if (r && r instanceof w) {
92
+ const f = u(t.value, void 0, i + 1, g, p);
93
+ n.push({
94
+ id: `${f}-${e}-param-${t.id}`,
95
+ source: f,
96
+ target: e,
97
+ targetHandle: `param-${t.id}`,
98
+ animated: !0,
99
+ deletable: !1,
100
+ selectable: !1,
101
+ data: {
102
+ color: s[(i + 1) % s.length],
103
+ isParameter: !0
104
+ }
105
+ });
106
+ }
107
+ }
108
+ }), o.nextNodeId)
109
+ u(c.getNodeById(o.nextNodeId), e, i, g, p);
110
+ else {
111
+ const t = `${e}-suggestion`, r = d.get(e) ?? [];
112
+ r.length > 0 ? r.forEach((l, $) => n.push({
113
+ id: `${l}-${t}-next-${$}`,
114
+ source: l,
115
+ // wie bei echter nextNode von Group-Card starten
116
+ target: t,
117
+ // Ziel ist die Suggestion-Card
118
+ data: {
119
+ color: s[i % s.length],
120
+ isSuggestion: !0
121
+ },
122
+ deletable: !1,
123
+ selectable: !1
124
+ })) : n.push({
125
+ id: `${e}-${t}-next`,
126
+ source: e,
127
+ // Handle-Bottom der Function-Card
128
+ target: t,
129
+ // Handle-Top der Suggestion-Card
130
+ data: {
131
+ color: s[i % s.length],
132
+ isSuggestion: !0
133
+ },
134
+ deletable: !1,
135
+ selectable: !1
136
+ });
137
+ }
138
+ return e;
139
+ };
140
+ return c.startingNodeId && u(c.getNodeById(c.startingNodeId), void 0, 0, b, h), V.useMemo(() => n, [F, B, P, n]);
141
+ };
142
+ export {
143
+ s as FLOW_EDGE_RAINBOW,
144
+ z as useFlowEdges
145
+ };
@@ -0,0 +1,373 @@
1
+ import { jsx as K } from "react/jsx-runtime";
2
+ import { c as U } from "../../compiler-runtime-Cu50tn6L.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 { DFlowFunctionDefaultCard as ot } from "./function/DFlowFunctionDefaultCard.js";
7
+ import { DFlowFunctionGroupCard as st } from "./function/DFlowFunctionGroupCard.js";
8
+ import { DFlowFunctionSuggestionCard as nt } from "./function/DFlowFunctionSuggestionCard.js";
9
+ import { DFlowFunctionTriggerCard as it } from "./function/DFlowFunctionTriggerCard.js";
10
+ import { DFlowEdge as rt } from "./edge/DFlowEdge.js";
11
+ import '../../assets/DFlow.css';const at = (y, C) => {
12
+ if (!C || C.size === 0)
13
+ return {
14
+ nodes: y
15
+ };
16
+ const m = 75, Y = 75, N = 16, z = 0.25;
17
+ let _ = 0, F = !1;
18
+ const f = y.map((o) => ({
19
+ ...o
20
+ })), L = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Map();
21
+ for (const o of f) {
22
+ const c = o.data?.linkingId;
23
+ if (c) {
24
+ let l = W.get(c);
25
+ l || (l = [], W.set(c, l)), l.push(o.id);
26
+ }
27
+ if (o.parentId && !c) {
28
+ let l = L.get(o.parentId);
29
+ l || (l = [], L.set(o.parentId, l)), l.push(o.id);
30
+ }
31
+ }
32
+ const M = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), w = new Map(f.map((o) => [o.id, o]));
33
+ for (const [o, c] of L) {
34
+ const l = new Array(c.length);
35
+ for (let b = 0; b < c.length; b++) l[b] = w.get(c[b]);
36
+ M.set(o, l);
37
+ }
38
+ for (const [o, c] of W) {
39
+ const l = new Array(c.length);
40
+ for (let b = 0; b < c.length; b++) l[b] = w.get(c[b]);
41
+ E.set(o, l);
42
+ }
43
+ const g = /* @__PURE__ */ new Map();
44
+ for (const o of f) {
45
+ 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;
46
+ g.set(o.id, {
47
+ w: c ?? b ?? 200,
48
+ h: l ?? P ?? 80
49
+ });
50
+ }
51
+ const B = /* @__PURE__ */ new Map(), x = (o) => {
52
+ if (B.has(o.id)) return B.get(o.id);
53
+ if (o.type !== "group") {
54
+ const T = g.get(o.id);
55
+ return B.set(o.id, T), T;
56
+ }
57
+ const c = typeof o.style?.width == "number" ? o.style.width : void 0, l = typeof o.style?.height == "number" ? o.style.height : void 0;
58
+ if (c !== void 0 && l !== void 0) {
59
+ const T = {
60
+ w: c,
61
+ h: l
62
+ };
63
+ return B.set(o.id, T), T;
64
+ }
65
+ const b = M.get(o.id) ?? [];
66
+ let P = 0, H = 0, v = 0;
67
+ for (const T of b) {
68
+ const V = x(T);
69
+ P += V.h, V.w > H && (H = V.w), v++;
70
+ }
71
+ P += m * Math.max(0, v - 1);
72
+ const D = {
73
+ w: H + 2 * N,
74
+ h: (v ? P : 0) + 2 * N
75
+ };
76
+ return B.set(o.id, D), D;
77
+ };
78
+ do {
79
+ F = !1, _++, B.clear();
80
+ for (const e of f) x(e);
81
+ const o = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = (e) => Math.round(e / 10), b = (e, h, p) => {
82
+ const d = [{
83
+ node: e,
84
+ cx: h,
85
+ cy: p,
86
+ phase: 0
87
+ }];
88
+ let I = 0;
89
+ for (; d.length; ) {
90
+ const t = d[d.length - 1];
91
+ switch (t.phase) {
92
+ case 0: {
93
+ o.set(t.node.id, {
94
+ x: t.cx,
95
+ y: t.cy
96
+ });
97
+ const {
98
+ w: s,
99
+ h: n
100
+ } = x(t.node);
101
+ t.w = s, t.h = n;
102
+ const i = E.get(t.node.id) ?? [], r = [], u = [];
103
+ for (const k of i)
104
+ k.type === "group" ? u.push(k) : r.push(k);
105
+ 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;
106
+ let S = 0;
107
+ for (const k of r) S += x(k).h;
108
+ 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;
109
+ break;
110
+ }
111
+ case 1: {
112
+ if (t.rightIndex < t.right.length) {
113
+ const s = t.right[t.rightIndex], n = x(s), i = t.cx + t.w / 2 + Y + n.w / 2;
114
+ let r = t.py + n.h / 2;
115
+ const u = l(i), k = (c.get(u) ?? Number.NEGATIVE_INFINITY) + m;
116
+ r - n.h / 2 < k && (r = k + n.h / 2, t.py = r - n.h / 2), t.childKey = u, t.childPs = n, d.push({
117
+ node: s,
118
+ cx: i,
119
+ cy: r,
120
+ phase: 0
121
+ }), t.phase = 10;
122
+ } else
123
+ t.bottom = Math.max(t.cy + t.h / 2, t.rightBottom), t.phase = 2;
124
+ break;
125
+ }
126
+ case 10: {
127
+ const s = t.lastChildBottom;
128
+ 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;
129
+ break;
130
+ }
131
+ case 2: {
132
+ if (t.gParams && t.gParams.length) {
133
+ const s = [];
134
+ let n = 0;
135
+ for (const i of t.gParams) {
136
+ const r = x(i);
137
+ s.push(r), n += r.w;
138
+ }
139
+ 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;
140
+ } else
141
+ t.phase = 4;
142
+ break;
143
+ }
144
+ case 3: {
145
+ if (t.gIndex < t.gParams.length) {
146
+ const s = t.gParams[t.gIndex], n = t.gSizes[t.gIndex], i = t.gx + n.w / 2, r = t.gy + n.h / 2;
147
+ t.gx += n.w + Y, d.push({
148
+ node: s,
149
+ cx: i,
150
+ cy: r,
151
+ phase: 0
152
+ }), t.childPs = n, t.phase = 30;
153
+ } else
154
+ t.bottom = t.rowBottom, t.phase = 4;
155
+ break;
156
+ }
157
+ case 30: {
158
+ const s = t.lastChildBottom;
159
+ t.rowBottom = Math.max(t.rowBottom, s), t.gIndex++, t.phase = 3;
160
+ break;
161
+ }
162
+ case 4: {
163
+ if (t.node.type === "group") {
164
+ const s = M.get(t.node.id) ?? [], n = [];
165
+ for (const i of s)
166
+ i.data?.linkingId || n.push(i);
167
+ t.kids = n, t.kidIndex = 0, t.curY = t.cy - t.h / 2 + N, t.phase = 5;
168
+ } else
169
+ t.phase = 6;
170
+ break;
171
+ }
172
+ case 5: {
173
+ if (t.kidIndex < t.kids.length) {
174
+ const s = t.kids[t.kidIndex], n = x(s), i = t.curY + n.h / 2;
175
+ d.push({
176
+ node: s,
177
+ cx: t.cx,
178
+ cy: i,
179
+ phase: 0
180
+ }), t.childPs = n, t.phase = 50;
181
+ } else {
182
+ const s = t.curY - m;
183
+ t.bottom = Math.max(t.bottom, s + N), t.phase = 6;
184
+ }
185
+ break;
186
+ }
187
+ case 50: {
188
+ const s = t.lastChildBottom;
189
+ t.curY = s + m, t.kidIndex++, t.phase = 5;
190
+ break;
191
+ }
192
+ case 6: {
193
+ const s = d.pop();
194
+ d.length ? d[d.length - 1].lastChildBottom = s.bottom : I = s.bottom;
195
+ break;
196
+ }
197
+ }
198
+ }
199
+ return I;
200
+ };
201
+ let P = 0;
202
+ for (const e of f)
203
+ !e.data?.linkingId && !e.parentId && (P = b(e, 0, P + x(e).h / 2) + m);
204
+ const H = /* @__PURE__ */ new Map();
205
+ for (const e of f) H.set(e.id, o.get(e.id));
206
+ const v = /* @__PURE__ */ new Map();
207
+ for (const e of f) {
208
+ const {
209
+ w: h,
210
+ h: p
211
+ } = x(e), {
212
+ x: d,
213
+ y: I
214
+ } = H.get(e.id);
215
+ v.set(e.id, {
216
+ x: d - h / 2,
217
+ y: I - p / 2
218
+ });
219
+ }
220
+ for (const e of f) {
221
+ const h = v.get(e.id);
222
+ let p = h.x, d = h.y;
223
+ if (e.parentId) {
224
+ const I = v.get(e.parentId);
225
+ p -= I.x, d -= I.y;
226
+ }
227
+ e.position = {
228
+ x: p,
229
+ y: d
230
+ };
231
+ }
232
+ const D = /* @__PURE__ */ new Map();
233
+ for (const e of f) D.set(e.id, e);
234
+ const T = (e) => {
235
+ let h = 0, p = e;
236
+ for (; p?.parentId && (h++, p = D.get(p.parentId), !!p); )
237
+ ;
238
+ return h;
239
+ }, V = [];
240
+ for (const e of f)
241
+ e.type === "group" && V.push(e);
242
+ V.sort((e, h) => T(h) - T(e));
243
+ for (const e of V) {
244
+ const h = [];
245
+ for (const a of f)
246
+ a.parentId === e.id && h.push(a);
247
+ if (!h.length) {
248
+ const a = typeof e.style?.width == "number" ? e.style.width : 2 * N, A = typeof e.style?.height == "number" ? e.style.height : 2 * N;
249
+ e.style = {
250
+ ...e.style,
251
+ width: a,
252
+ height: A
253
+ };
254
+ continue;
255
+ }
256
+ const p = (a) => {
257
+ 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);
258
+ return {
259
+ w: A ?? X.w,
260
+ h: j ?? X.h
261
+ };
262
+ };
263
+ let d = Number.POSITIVE_INFINITY, I = Number.POSITIVE_INFINITY, t = Number.NEGATIVE_INFINITY, s = Number.NEGATIVE_INFINITY;
264
+ for (const a of h) {
265
+ const A = p(a);
266
+ 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);
267
+ }
268
+ const n = d - N, i = I - N;
269
+ if (Math.abs(n) > z || Math.abs(i) > z) {
270
+ for (const a of h)
271
+ a.position.x -= n, a.position.y -= i;
272
+ F = !0;
273
+ }
274
+ 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;
275
+ (Math.abs(r - S) > z || Math.abs(u - k) > z) && (F = !0), e.measured = {
276
+ width: r,
277
+ height: u
278
+ }, e.style = {
279
+ ...e.style,
280
+ width: r,
281
+ height: u
282
+ }, g.set(e.id, {
283
+ w: r,
284
+ h: u
285
+ });
286
+ }
287
+ B.clear();
288
+ for (const e of f) x(e);
289
+ const R = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map();
290
+ for (const e of f) {
291
+ const h = x(e), p = o.get(e.id);
292
+ O.set(e.id, p), R.set(e.id, {
293
+ x: p.x - h.w / 2,
294
+ y: p.y - h.h / 2
295
+ });
296
+ }
297
+ for (const e of f) {
298
+ const h = [], p = E.get(e.id) ?? [];
299
+ for (const i of p)
300
+ i.type === "group" && h.push(i);
301
+ if (!h.length) continue;
302
+ const d = h.slice().sort((i, r) => (+i.data?.paramIndex || 0) - (+r.data?.paramIndex || 0)), I = [];
303
+ for (const i of d) {
304
+ const r = D.get(i.id), u = typeof r.style?.width == "number" ? r.style.width : void 0;
305
+ I.push(u ?? x(r).w);
306
+ }
307
+ let t = 0;
308
+ for (const i of I) t += i;
309
+ t += Y * (d.length - 1);
310
+ let n = O.get(e.id).x - t / 2;
311
+ for (let i = 0; i < d.length; i++) {
312
+ const r = d[i], u = D.get(r.id), S = u.parentId ? R.get(u.parentId) : {
313
+ x: 0
314
+ };
315
+ u.position.x = n - S.x, n += I[i] + Y;
316
+ }
317
+ }
318
+ } while (F && _ < 5);
319
+ return {
320
+ nodes: f
321
+ };
322
+ }, q = G.cache(at), It = (y) => {
323
+ const C = U.c(2);
324
+ let m;
325
+ return C[0] !== y ? (m = /* @__PURE__ */ K($, { children: /* @__PURE__ */ K(dt, { ...y }) }), C[0] = y, C[1] = m) : m = C[1], m;
326
+ }, dt = (y) => {
327
+ const [C, m] = J(y.nodes), [Y, N, z] = Q(y.edges), _ = Z(), F = G.useCallback((M) => {
328
+ requestAnimationFrame(() => {
329
+ M.forEach((E) => _(E));
330
+ });
331
+ }, [_]), f = {
332
+ default: ot,
333
+ group: st,
334
+ suggestion: nt,
335
+ trigger: it,
336
+ ...y.nodeTypes
337
+ }, L = {
338
+ default: rt,
339
+ ...y.edgeTypes
340
+ }, W = G.useCallback((M) => {
341
+ const E = Array.from(new Set(M.filter((g) => g.type === "dimensions" || g.type === "position").map((g) => g.id))), w = /* @__PURE__ */ new Map();
342
+ M.filter((g) => g.type === "dimensions").forEach((g) => w.set(g.id, g.dimensions)), m((g) => {
343
+ const B = g.map((o) => {
344
+ if (!w.has(o.id)) return o;
345
+ const c = w.get(o.id) || {};
346
+ return {
347
+ ...o,
348
+ measured: {
349
+ width: c.width ?? o.measured?.width ?? 0,
350
+ height: c.height ?? o.measured?.height ?? 0
351
+ }
352
+ };
353
+ });
354
+ return q(B, new Set(E)).nodes;
355
+ }), F(E);
356
+ }, [F]);
357
+ return G.useEffect(() => {
358
+ const M = y.nodes.map((w) => {
359
+ const g = w.measured ? [] : document.querySelectorAll("[data-id='" + w.id + "']");
360
+ return {
361
+ ...w,
362
+ measured: {
363
+ width: w.measured?.width ?? g[0]?.clientWidth ?? 0,
364
+ height: w.measured?.height ?? g[0]?.clientHeight ?? 0
365
+ }
366
+ };
367
+ }), E = q(M, new Set(M.map((w) => w.id)));
368
+ m(E.nodes), N(y.edges), F(E.nodes.map((w) => w.id));
369
+ }, [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 });
370
+ };
371
+ export {
372
+ It as DFlow
373
+ };