@code0-tech/pictor 0.0.0-mvp.26 → 0.0.0-mvp.28
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.
- package/dist/assets/components/badge/Badge.style.css +1 -1
- package/dist/assets/components/button/Button.style.css +1 -1
- package/dist/assets/components/context-menu/ContextMenu.style.css +1 -0
- package/dist/assets/components/d-flow-folder/DFlowFolder.style.css +1 -0
- package/dist/assets/components/{d-flow/function → d-flow-function}/DFlowFunctionDefaultCard.style.css +1 -1
- package/dist/assets/components/d-flow-panel/DFlowMiniMap.style.css +1 -0
- package/dist/assets/components/d-flow-suggestion/DFlowSuggestionSearchInput.style.css +1 -0
- package/dist/assets/components/d-layout/DLayout.style.css +1 -1
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -1
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -1
- package/dist/assets/components/form/Input.style.css +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
- package/dist/components/avatar/Avatar.js +7 -7
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/badge/Badge.js +57 -17
- package/dist/components/breadcrumb/Breadcrumb.js +5 -5
- package/dist/components/button/Button.js +8 -8
- package/dist/components/context-menu/ContextMenu.d.ts +31 -0
- package/dist/components/context-menu/ContextMenu.js +191 -0
- package/dist/components/d-application/DApplication.service.d.ts +5 -0
- package/dist/components/d-application/DApplication.service.js +9 -0
- package/dist/components/d-flow/DFlow.d.ts +5 -3
- package/dist/components/d-flow/DFlow.edges.hook.d.ts +2 -1
- package/dist/components/d-flow/DFlow.edges.hook.js +98 -136
- package/dist/components/d-flow/DFlow.js +214 -199
- package/dist/components/d-flow/DFlow.nodes.hook.d.ts +5 -1
- package/dist/components/d-flow/DFlow.nodes.hook.js +101 -123
- package/dist/components/d-flow/DFlow.service.d.ts +12 -7
- package/dist/components/d-flow/DFlow.service.js +117 -7
- package/dist/components/d-flow/{edge/DFlowEdge.d.ts → DFlowEdge.d.ts} +5 -3
- package/dist/components/d-flow/DFlowEdge.js +69 -0
- package/dist/components/d-flow/index.d.ts +1 -10
- package/dist/components/d-flow/index.js +9 -44
- package/dist/components/d-flow-data-type/DFlowDataType.service.d.ts +9 -0
- package/dist/components/{d-flow/data-type → d-flow-data-type}/DFlowDataType.service.js +12 -10
- package/dist/components/{d-flow/data-type → d-flow-data-type}/DFlowDataType.view.d.ts +8 -2
- package/dist/components/d-flow-data-type/DFlowDataType.view.js +71 -0
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsKeyRule.d.ts +2 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsKeyRule.js +3 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsTypeRule.d.ts +2 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsTypeRule.js +4 -4
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeParentRule.d.ts +2 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeParentRule.js +3 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeReturnTypeRule.d.ts +2 -3
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js +246 -0
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRule.d.ts +2 -3
- package/dist/components/{d-flow/tab → d-flow-file}/DFlowTabDefault.d.ts +2 -3
- package/dist/components/d-flow-file/DFlowTabDefault.js +139 -0
- package/dist/components/{d-flow/tab → d-flow-file}/DFlowTabTrigger.d.ts +2 -2
- package/dist/components/d-flow-file/DFlowTabTrigger.js +75 -0
- package/dist/components/d-flow-file/DFlowTabs.d.ts +6 -0
- package/dist/components/d-flow-file/DFlowTabs.js +128 -0
- package/dist/components/d-flow-file/index.d.ts +1 -0
- package/dist/components/d-flow-file/index.js +4 -0
- package/dist/components/{d-flow/folder → d-flow-folder}/DFlowFolder.d.ts +11 -5
- package/dist/components/d-flow-folder/DFlowFolder.js +158 -0
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.d.ts +18 -0
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +69 -0
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.d.ts +9 -0
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +76 -0
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.d.ts +5 -0
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +49 -0
- package/dist/components/d-flow-folder/DFlowFolderRenameDialog.d.ts +9 -0
- package/dist/components/d-flow-folder/DFlowFolderRenameDialog.js +55 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.input.hook.d.ts +1 -1
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.input.hook.js +1 -1
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.return.hook.d.ts +2 -2
- package/dist/components/d-flow-function/DFlowFunction.return.hook.js +9 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.service.d.ts +1 -1
- package/dist/components/d-flow-function/DFlowFunction.service.js +12 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.view.d.ts +12 -0
- package/dist/components/d-flow-function/DFlowFunction.view.js +132 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionDefaultCard.d.ts +4 -4
- package/dist/components/d-flow-function/DFlowFunctionDefaultCard.js +120 -0
- package/dist/components/d-flow-function/DFlowFunctionGroupCard.d.ts +13 -0
- package/dist/components/d-flow-function/DFlowFunctionGroupCard.js +68 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionSuggestionCard.d.ts +3 -4
- package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.js +48 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionTriggerCard.d.ts +3 -3
- package/dist/components/d-flow-function/DFlowFunctionTriggerCard.js +71 -0
- package/dist/components/{d-flow/input → d-flow-input}/DFlowInputDataType.d.ts +1 -1
- package/dist/components/{d-flow/input → d-flow-input}/DFlowInputDataType.js +175 -165
- package/dist/components/d-flow-panel/DFlowExport.js +32 -0
- package/dist/components/d-flow-panel/DFlowMiniMap.js +33 -0
- package/dist/components/d-flow-panel/DFlowPanelControl.d.ts +6 -0
- package/dist/components/d-flow-panel/DFlowPanelControl.js +70 -0
- package/dist/components/d-flow-panel/DFlowPanelLayout.d.ts +4 -0
- package/dist/components/d-flow-panel/DFlowPanelLayout.js +47 -0
- package/dist/components/d-flow-panel/DFlowPanelSize.d.ts +2 -0
- package/dist/components/d-flow-panel/DFlowPanelSize.js +94 -0
- package/dist/components/d-flow-panel/index.d.ts +5 -0
- package/dist/components/d-flow-panel/index.js +12 -0
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestion.hook.d.ts +0 -15
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +161 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestion.view.d.ts +14 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestion.view.js +4 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +83 -0
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.util.d.ts +1 -1
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.util.js +1 -1
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuFooter.js +5 -5
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuSearchBar.d.ts +1 -1
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuSearchBar.js +1 -1
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionSearchInput.d.ts +1 -1
- package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +35 -0
- package/dist/components/d-flow-suggestion/index.d.ts +1 -0
- package/dist/components/d-flow-suggestion/index.js +4 -0
- package/dist/components/{d-flow/type → d-flow-type}/DFlowType.service.d.ts +1 -1
- package/dist/components/d-flow-type/DFlowType.service.js +12 -0
- package/dist/components/{d-flow/type → d-flow-type}/DFlowType.view.d.ts +6 -0
- package/dist/components/{d-flow/type → d-flow-type}/DFlowType.view.js +16 -10
- package/dist/components/d-flow-validation/DDataTypeValidation.hook.d.ts +2 -0
- package/dist/components/d-flow-validation/DDataTypeValidation.hook.js +18 -0
- package/dist/components/d-flow-validation/DFlowValidation.hook.d.ts +3 -0
- package/dist/components/d-flow-validation/DFlowValidation.hook.js +22 -0
- package/dist/components/d-flow-validation/DFlowValidation.js +66 -0
- package/dist/components/d-flow-validation/DNodeValidation.hook.d.ts +3 -0
- package/dist/components/d-flow-validation/DNodeValidation.hook.js +62 -0
- package/dist/components/d-flow-validation/DValueValidation.hook.d.ts +3 -0
- package/dist/components/d-flow-validation/DValueValidation.hook.js +8 -0
- package/dist/components/{d-flow/validation → d-flow-validation}/index.js +2 -2
- package/dist/components/d-fullscreen/DFullScreen.js +2 -2
- package/dist/components/d-member/DNamespaceMemberList.js +5 -5
- package/dist/components/d-organization/DOrganizationList.js +7 -7
- package/dist/components/d-organization/DOrganizationMenu.js +5 -5
- package/dist/components/d-organization/DOrganizatonContent.js +22 -22
- package/dist/components/d-project/DNamespaceProjectContent.js +6 -6
- package/dist/components/d-project/DNamespaceProjectList.js +5 -5
- package/dist/components/d-project/DNamespaceProjectMenu.js +2 -2
- package/dist/components/d-resizable/DResizable.js +18 -17
- package/dist/components/d-role/DNamespaceRolePermissions.js +5 -5
- package/dist/components/d-runtime/DRuntimeList.js +7 -7
- package/dist/components/d-user/DUser.session.hook.js +2 -2
- package/dist/components/d-user/DUserContent.js +13 -13
- package/dist/components/d-user/DUserInput.js +9 -9
- package/dist/components/d-user/DUserList.js +9 -9
- package/dist/components/file-tabs/FileTabs.js +2 -2
- package/dist/components/file-tabs/FileTabs.service.d.ts +5 -0
- package/dist/components/file-tabs/FileTabs.service.js +68 -16
- package/dist/components/file-tabs/FileTabs.view.d.ts +1 -0
- package/dist/components/form/CheckboxInput.js +4 -4
- package/dist/components/form/EmailInput.js +12 -12
- package/dist/components/form/Input.js +220 -206
- package/dist/components/form/Input.selection.hook.js +9 -9
- package/dist/components/form/Input.syntax.hook.js +7 -7
- package/dist/components/form/NumberInput.js +9 -9
- package/dist/components/form/PasswordInput.js +6 -6
- package/dist/components/form/SwitchInput.js +7 -7
- package/dist/components/form/TextInput.js +10 -10
- package/dist/components/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/components/segmented-control/SegmentedControl.js +14 -12
- package/dist/index.d.ts +8 -0
- package/dist/index.js +117 -117
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +527 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +402 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +208 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +130 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +53 -0
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +222 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +13 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +636 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +219 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +183 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +7 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +2 -2
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +8 -8
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +112 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +68 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
- package/dist/node_modules/tslib/tslib.es6.js +27 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
- package/dist/utils/generics.d.ts +5 -6
- package/dist/utils/generics.js +2 -2
- package/dist/utils/objectStore.js +15 -15
- package/dist/utils/reactiveArrayService.js +5 -5
- package/package.json +7 -4
- package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +0 -1
- package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +0 -1
- package/dist/assets/components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css +0 -1
- package/dist/components/d-flow/DFlow.view.d.ts +0 -113
- package/dist/components/d-flow/DFlow.view.js +0 -248
- package/dist/components/d-flow/control/DFlowControl.d.ts +0 -2
- package/dist/components/d-flow/control/DFlowControl.js +0 -81
- package/dist/components/d-flow/control/index.d.ts +0 -1
- package/dist/components/d-flow/control/index.js +0 -4
- package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +0 -10
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +0 -2
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +0 -18
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +0 -4
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +0 -20
- package/dist/components/d-flow/data-type/DFlowDataType.view.js +0 -65
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +0 -243
- package/dist/components/d-flow/edge/DFlowEdge.js +0 -48
- package/dist/components/d-flow/export/DFlowExport.js +0 -24
- package/dist/components/d-flow/folder/DFlowFolder.js +0 -119
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +0 -11
- package/dist/components/d-flow/function/DFlowFunction.service.js +0 -9
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +0 -10
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +0 -74
- package/dist/components/d-flow/function/DFlowFunction.view.js +0 -117
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +0 -158
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +0 -5
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +0 -55
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +0 -26
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +0 -93
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +0 -22
- package/dist/components/d-flow/minimap/index.d.ts +0 -1
- package/dist/components/d-flow/minimap/index.js +0 -4
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +0 -150
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +0 -5
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +0 -18
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +0 -21
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +0 -25
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +0 -67
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +0 -35
- package/dist/components/d-flow/suggestion/index.d.ts +0 -2
- package/dist/components/d-flow/suggestion/index.js +0 -7
- package/dist/components/d-flow/tab/DFlowTabDefault.js +0 -103
- package/dist/components/d-flow/tab/DFlowTabTrigger.js +0 -51
- package/dist/components/d-flow/tab/DFlowTabs.d.ts +0 -2
- package/dist/components/d-flow/tab/DFlowTabs.js +0 -105
- package/dist/components/d-flow/type/DFlowType.service.js +0 -9
- package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +0 -3
- package/dist/components/d-flow/validation/DFlowValidation.hook.js +0 -10
- package/dist/components/d-flow/validation/DFlowValidation.js +0 -60
- /package/dist/assets/components/{d-flow/input → d-flow-input}/DFlowInputDataType.style.css +0 -0
- /package/dist/assets/components/{d-flow/validation → d-flow-validation}/DFlowValidation.style.css +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/index.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/index.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeItemOfCollectionRule.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeItemOfCollectionRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeNumberRangeRule.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeNumberRangeRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRegexRule.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRegexRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRules.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRules.js +0 -0
- /package/dist/components/{d-flow/folder → d-flow-folder}/index.d.ts +0 -0
- /package/dist/components/{d-flow/folder → d-flow-folder}/index.js +0 -0
- /package/dist/components/{d-flow/function → d-flow-function}/index.d.ts +0 -0
- /package/dist/components/{d-flow/function → d-flow-function}/index.js +0 -0
- /package/dist/components/{d-flow/export → d-flow-panel}/DFlowExport.d.ts +0 -0
- /package/dist/components/{d-flow/minimap → d-flow-panel}/DFlowMiniMap.d.ts +0 -0
- /package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.d.ts +0 -0
- /package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuFooter.d.ts +0 -0
- /package/dist/components/{d-flow/type → d-flow-type}/index.d.ts +0 -0
- /package/dist/components/{d-flow/type → d-flow-type}/index.js +0 -0
- /package/dist/components/{d-flow/validation → d-flow-validation}/DFlowValidation.d.ts +0 -0
- /package/dist/components/{d-flow/validation → d-flow-validation}/index.d.ts +0 -0
|
@@ -1,95 +1,104 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { mergeCode0Props as
|
|
6
|
-
import
|
|
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
|
|
9
|
-
import { DFlowFunctionGroupCard as
|
|
10
|
-
import { DFlowFunctionSuggestionCard as
|
|
11
|
-
import { DFlowFunctionTriggerCard as
|
|
12
|
-
import { DFlowEdge as
|
|
13
|
-
|
|
14
|
-
|
|
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:
|
|
25
|
+
nodes: F
|
|
17
26
|
};
|
|
18
|
-
const
|
|
19
|
-
let
|
|
20
|
-
const f =
|
|
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
|
-
})),
|
|
31
|
+
})), H = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map();
|
|
23
32
|
for (const o of f) {
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
let
|
|
27
|
-
|
|
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 && !
|
|
30
|
-
let
|
|
31
|
-
|
|
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
|
|
35
|
-
for (const [o,
|
|
36
|
-
const
|
|
37
|
-
for (let
|
|
38
|
-
|
|
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,
|
|
41
|
-
const
|
|
42
|
-
for (let
|
|
43
|
-
|
|
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
|
|
54
|
+
const x = /* @__PURE__ */ new Map();
|
|
46
55
|
for (const o of f) {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
w:
|
|
50
|
-
h:
|
|
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
|
|
54
|
-
if (
|
|
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
|
|
57
|
-
return
|
|
65
|
+
const E = x.get(o.id);
|
|
66
|
+
return I.set(o.id, E), E;
|
|
58
67
|
}
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
const
|
|
62
|
-
w:
|
|
63
|
-
h:
|
|
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
|
|
74
|
+
return I.set(o.id, E), E;
|
|
66
75
|
}
|
|
67
|
-
const
|
|
68
|
-
let
|
|
69
|
-
for (const
|
|
70
|
-
const V =
|
|
71
|
-
|
|
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
|
-
|
|
74
|
-
const
|
|
75
|
-
w:
|
|
76
|
-
h: (v ?
|
|
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
|
|
87
|
+
return I.set(o.id, A), A;
|
|
79
88
|
};
|
|
80
89
|
do {
|
|
81
|
-
|
|
82
|
-
for (const e of f)
|
|
83
|
-
const o = /* @__PURE__ */ new Map(),
|
|
84
|
-
const
|
|
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:
|
|
96
|
+
cy: m,
|
|
88
97
|
phase: 0
|
|
89
98
|
}];
|
|
90
|
-
let
|
|
91
|
-
for (;
|
|
92
|
-
const t =
|
|
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
|
-
} =
|
|
111
|
+
} = r(t.node);
|
|
103
112
|
t.w = s, t.h = n;
|
|
104
|
-
const i =
|
|
105
|
-
for (const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
let
|
|
109
|
-
for (const
|
|
110
|
-
|
|
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 =
|
|
116
|
-
let
|
|
117
|
-
const u =
|
|
118
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
|
139
|
-
s.push(
|
|
147
|
+
const a = r(i);
|
|
148
|
+
s.push(a), n += a.w;
|
|
140
149
|
}
|
|
141
|
-
n +=
|
|
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,
|
|
149
|
-
t.gx += n.w +
|
|
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:
|
|
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 =
|
|
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 +
|
|
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 =
|
|
177
|
-
|
|
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 -
|
|
185
|
-
t.bottom = Math.max(t.bottom, s +
|
|
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 +
|
|
200
|
+
t.curY = s + w, t.kidIndex++, t.phase = 5;
|
|
192
201
|
break;
|
|
193
202
|
}
|
|
194
203
|
case 6: {
|
|
195
|
-
const s =
|
|
196
|
-
|
|
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
|
|
210
|
+
return y;
|
|
202
211
|
};
|
|
203
|
-
let
|
|
212
|
+
let M = 0;
|
|
204
213
|
for (const e of f)
|
|
205
|
-
!e.data?.linkingId && !e.parentId && (
|
|
206
|
-
const
|
|
207
|
-
for (const e of f)
|
|
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:
|
|
213
|
-
} =
|
|
214
|
-
x:
|
|
215
|
-
y
|
|
216
|
-
} =
|
|
221
|
+
h: m
|
|
222
|
+
} = r(e), {
|
|
223
|
+
x: c,
|
|
224
|
+
y
|
|
225
|
+
} = _.get(e.id);
|
|
217
226
|
v.set(e.id, {
|
|
218
|
-
x:
|
|
219
|
-
y:
|
|
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
|
|
233
|
+
let m = h.x, c = h.y;
|
|
225
234
|
if (e.parentId) {
|
|
226
|
-
const
|
|
227
|
-
|
|
235
|
+
const y = v.get(e.parentId);
|
|
236
|
+
m -= y.x, c -= y.y;
|
|
228
237
|
}
|
|
229
238
|
e.position = {
|
|
230
|
-
x:
|
|
231
|
-
y:
|
|
239
|
+
x: m,
|
|
240
|
+
y: c
|
|
232
241
|
};
|
|
233
242
|
}
|
|
234
|
-
const
|
|
235
|
-
for (const e of f)
|
|
236
|
-
const
|
|
237
|
-
let h = 0,
|
|
238
|
-
for (;
|
|
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) =>
|
|
253
|
+
V.sort((e, h) => E(h) - E(e));
|
|
245
254
|
for (const e of V) {
|
|
246
255
|
const h = [];
|
|
247
|
-
for (const
|
|
248
|
-
|
|
256
|
+
for (const d of f)
|
|
257
|
+
d.parentId === e.id && h.push(d);
|
|
249
258
|
if (!h.length) {
|
|
250
|
-
const
|
|
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:
|
|
254
|
-
height:
|
|
262
|
+
width: d,
|
|
263
|
+
height: B
|
|
255
264
|
};
|
|
256
265
|
continue;
|
|
257
266
|
}
|
|
258
|
-
const
|
|
259
|
-
const
|
|
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:
|
|
262
|
-
h:
|
|
270
|
+
w: B ?? X.w,
|
|
271
|
+
h: q ?? X.h
|
|
263
272
|
};
|
|
264
273
|
};
|
|
265
|
-
let
|
|
266
|
-
for (const
|
|
267
|
-
const
|
|
268
|
-
|
|
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 =
|
|
271
|
-
if (Math.abs(n) >
|
|
272
|
-
for (const
|
|
273
|
-
|
|
274
|
-
|
|
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
|
|
277
|
-
(Math.abs(
|
|
278
|
-
width:
|
|
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:
|
|
291
|
+
width: a,
|
|
283
292
|
height: u
|
|
284
|
-
},
|
|
285
|
-
w:
|
|
293
|
+
}, x.set(e.id, {
|
|
294
|
+
w: a,
|
|
286
295
|
h: u
|
|
287
296
|
});
|
|
288
297
|
}
|
|
289
|
-
|
|
290
|
-
for (const e of f)
|
|
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 =
|
|
294
|
-
O.set(e.id,
|
|
295
|
-
x:
|
|
296
|
-
y:
|
|
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 = [],
|
|
301
|
-
for (const i of
|
|
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
|
|
305
|
-
for (const i of
|
|
306
|
-
const
|
|
307
|
-
|
|
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
|
|
311
|
-
t +=
|
|
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 <
|
|
314
|
-
const
|
|
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 -
|
|
326
|
+
u.position.x = n - T.x, n += y[i] + P;
|
|
318
327
|
}
|
|
319
328
|
}
|
|
320
|
-
} while (
|
|
329
|
+
} while (D && W < 5);
|
|
321
330
|
return {
|
|
322
331
|
nodes: f
|
|
323
332
|
};
|
|
324
|
-
},
|
|
325
|
-
const
|
|
326
|
-
let
|
|
327
|
-
return
|
|
328
|
-
},
|
|
329
|
-
const
|
|
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
|
-
|
|
349
|
+
x.forEach((I) => z(I));
|
|
332
350
|
});
|
|
333
|
-
}, [
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
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
|
-
...
|
|
358
|
+
...g,
|
|
350
359
|
measured: {
|
|
351
|
-
width:
|
|
352
|
-
height:
|
|
360
|
+
width: M.width ?? g.measured?.width ?? 0,
|
|
361
|
+
height: M.height ?? g.measured?.height ?? 0
|
|
353
362
|
}
|
|
354
363
|
};
|
|
355
364
|
});
|
|
356
|
-
return
|
|
357
|
-
}),
|
|
358
|
-
}, [
|
|
359
|
-
return
|
|
360
|
-
const
|
|
361
|
-
const
|
|
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
|
-
...
|
|
372
|
+
...r,
|
|
364
373
|
measured: {
|
|
365
|
-
width:
|
|
366
|
-
height:
|
|
374
|
+
width: r.measured?.width ?? o[0]?.clientWidth ?? 0,
|
|
375
|
+
height: r.measured?.height ?? o[0]?.clientHeight ?? 0
|
|
367
376
|
}
|
|
368
377
|
};
|
|
369
|
-
}),
|
|
370
|
-
|
|
371
|
-
}, [
|
|
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
|
-
|
|
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
|
-
|
|
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>[];
|