@mindlogic-ai/logician-ui 3.1.0 → 3.2.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Icon/_constants/iconList.d.ts +1 -1
- package/dist/components/Icon/_constants/iconList.d.ts.map +1 -1
- package/dist/components/Icon/_constants/iconList.js +18 -0
- package/dist/components/Icon/_constants/iconList.js.map +1 -1
- package/dist/components/Icon/_constants/iconList.mjs +20 -2
- package/dist/components/Icon/_constants/iconList.mjs.map +1 -1
- package/dist/components/Icon/index.d.ts +2 -1
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +20 -1
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Icon/index.mjs +4 -2
- package/dist/components/Icon/index.mjs.map +1 -1
- package/dist/components/Workflow/Workflow.d.ts +3 -0
- package/dist/components/Workflow/Workflow.d.ts.map +1 -0
- package/dist/components/Workflow/Workflow.js +109 -0
- package/dist/components/Workflow/Workflow.js.map +1 -0
- package/dist/components/Workflow/Workflow.mjs +107 -0
- package/dist/components/Workflow/Workflow.mjs.map +1 -0
- package/dist/components/Workflow/Workflow.translations.json.js +164 -0
- package/dist/components/Workflow/Workflow.translations.json.js.map +1 -0
- package/dist/components/Workflow/Workflow.translations.json.mjs +138 -0
- package/dist/components/Workflow/Workflow.translations.json.mjs.map +1 -0
- package/dist/components/Workflow/Workflow.types.d.ts +435 -0
- package/dist/components/Workflow/Workflow.types.d.ts.map +1 -0
- package/dist/components/Workflow/Workflow.types.js +19 -0
- package/dist/components/Workflow/Workflow.types.js.map +1 -0
- package/dist/components/Workflow/Workflow.types.mjs +16 -0
- package/dist/components/Workflow/Workflow.types.mjs.map +1 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.d.ts +10 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.d.ts.map +1 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.js +163 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.js.map +1 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.mjs +159 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.mjs.map +1 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.types.d.ts +117 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.types.d.ts.map +1 -0
- package/dist/components/Workflow/WorkflowContext/index.d.ts +3 -0
- package/dist/components/Workflow/WorkflowContext/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.d.ts +19 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.js +44 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.mjs +42 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.d.ts +10 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.js +531 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.mjs +529 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.d.ts +53 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.js +96 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.mjs +93 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.d.ts +27 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.js +70 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.mjs +68 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.d.ts +10 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.js +106 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.mjs +104 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.d.ts +13 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.js +18 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.mjs +16 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/Canvas/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.d.ts +30 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.js +34 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.js.map +1 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.mjs +32 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.mjs.map +1 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.d.ts +37 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.js +33 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.js.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.mjs +31 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.mjs.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.d.ts +16 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.js +54 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.js.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.mjs +52 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.mjs.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.d.ts +27 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.js +178 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.js.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.mjs +176 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.mjs.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/index.d.ts +3 -0
- package/dist/components/Workflow/canvas/DrawerShell/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.d.ts +12 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.js +68 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.js.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.mjs +66 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.mjs.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.d.ts +19 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.js +35 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.js.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.mjs +32 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.mjs.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/index.d.ts +3 -0
- package/dist/components/Workflow/canvas/EdgeInspector/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.d.ts +54 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.js +56 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.js.map +1 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.mjs +54 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.mjs.map +1 -0
- package/dist/components/Workflow/canvas/FieldWrapper/index.d.ts +3 -0
- package/dist/components/Workflow/canvas/FieldWrapper/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.d.ts +16 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.js +25 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.js.map +1 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.mjs +22 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.mjs.map +1 -0
- package/dist/components/Workflow/canvas/FloatingCard/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/FloatingCard/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.d.ts +14 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.js +61 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.js.map +1 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.mjs +59 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.mjs.map +1 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.types.d.ts +11 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.types.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/GenericNode/index.d.ts +3 -0
- package/dist/components/Workflow/canvas/GenericNode/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.d.ts +15 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.js +145 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.js.map +1 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.mjs +143 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.mjs.map +1 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.d.ts +10 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.js +21 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.js.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.mjs +19 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.mjs.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.d.ts +18 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.js +40 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.js.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.mjs +37 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.mjs.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.types.d.ts +15 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.types.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/index.d.ts +4 -0
- package/dist/components/Workflow/canvas/IconTile/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.d.ts +24 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.js +34 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.js.map +1 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.mjs +32 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.mjs.map +1 -0
- package/dist/components/Workflow/canvas/IssueList/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/IssueList/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.d.ts +9 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.js +94 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.js.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.mjs +92 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.mjs.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.d.ts +7 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.js +13 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.js.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.mjs +10 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.mjs.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.d.ts +10 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.js +28 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.js.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.mjs +26 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.mjs.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/index.d.ts +4 -0
- package/dist/components/Workflow/canvas/NodePalette/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.d.ts +3 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.js +137 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.js.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.mjs +135 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.mjs.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.d.ts +66 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.js +87 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.js.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.mjs +77 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.mjs.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.types.d.ts +35 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.types.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/index.d.ts +4 -0
- package/dist/components/Workflow/canvas/NodeShell/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.d.ts +15 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.js +14 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.js.map +1 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.mjs +12 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.mjs.map +1 -0
- package/dist/components/Workflow/canvas/SeverityDot/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/SeverityDot/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/issueSeverity.d.ts +23 -0
- package/dist/components/Workflow/canvas/issueSeverity.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/issueSeverity.js +51 -0
- package/dist/components/Workflow/canvas/issueSeverity.js.map +1 -0
- package/dist/components/Workflow/canvas/issueSeverity.mjs +47 -0
- package/dist/components/Workflow/canvas/issueSeverity.mjs.map +1 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.d.ts +14 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.js +48 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.js.map +1 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.mjs +46 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.mjs.map +1 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.d.ts +12 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.js +17 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.js.map +1 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.mjs +15 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.mjs.map +1 -0
- package/dist/components/Workflow/connectionRules.d.ts +59 -0
- package/dist/components/Workflow/connectionRules.d.ts.map +1 -0
- package/dist/components/Workflow/connectionRules.js +150 -0
- package/dist/components/Workflow/connectionRules.js.map +1 -0
- package/dist/components/Workflow/connectionRules.mjs +145 -0
- package/dist/components/Workflow/connectionRules.mjs.map +1 -0
- package/dist/components/Workflow/createNode.d.ts +27 -0
- package/dist/components/Workflow/createNode.d.ts.map +1 -0
- package/dist/components/Workflow/createNode.js +66 -0
- package/dist/components/Workflow/createNode.js.map +1 -0
- package/dist/components/Workflow/createNode.mjs +62 -0
- package/dist/components/Workflow/createNode.mjs.map +1 -0
- package/dist/components/Workflow/graphHistory.d.ts +23 -0
- package/dist/components/Workflow/graphHistory.d.ts.map +1 -0
- package/dist/components/Workflow/graphHistory.js +73 -0
- package/dist/components/Workflow/graphHistory.js.map +1 -0
- package/dist/components/Workflow/graphHistory.mjs +70 -0
- package/dist/components/Workflow/graphHistory.mjs.map +1 -0
- package/dist/components/Workflow/graphObserver.d.ts +13 -0
- package/dist/components/Workflow/graphObserver.d.ts.map +1 -0
- package/dist/components/Workflow/graphObserver.js +11 -0
- package/dist/components/Workflow/graphObserver.js.map +1 -0
- package/dist/components/Workflow/graphObserver.mjs +8 -0
- package/dist/components/Workflow/graphObserver.mjs.map +1 -0
- package/dist/components/Workflow/graphReducer.d.ts +75 -0
- package/dist/components/Workflow/graphReducer.d.ts.map +1 -0
- package/dist/components/Workflow/graphReducer.js +122 -0
- package/dist/components/Workflow/graphReducer.js.map +1 -0
- package/dist/components/Workflow/graphReducer.mjs +119 -0
- package/dist/components/Workflow/graphReducer.mjs.map +1 -0
- package/dist/components/Workflow/index.d.ts +22 -0
- package/dist/components/Workflow/index.d.ts.map +1 -0
- package/dist/components/Workflow/layout/autoLayout.d.ts +49 -0
- package/dist/components/Workflow/layout/autoLayout.d.ts.map +1 -0
- package/dist/components/Workflow/layout/autoLayout.js +149 -0
- package/dist/components/Workflow/layout/autoLayout.js.map +1 -0
- package/dist/components/Workflow/layout/autoLayout.mjs +146 -0
- package/dist/components/Workflow/layout/autoLayout.mjs.map +1 -0
- package/dist/components/Workflow/stories/toyNodeTypes.d.ts +40 -0
- package/dist/components/Workflow/stories/toyNodeTypes.d.ts.map +1 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.d.ts +15 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.d.ts.map +1 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.js +45 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.js.map +1 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.mjs +43 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.mjs.map +1 -0
- package/dist/components/Workflow/useWorkflowKeyboard.d.ts +10 -0
- package/dist/components/Workflow/useWorkflowKeyboard.d.ts.map +1 -0
- package/dist/components/Workflow/useWorkflowKeyboard.js +116 -0
- package/dist/components/Workflow/useWorkflowKeyboard.js.map +1 -0
- package/dist/components/Workflow/useWorkflowKeyboard.mjs +114 -0
- package/dist/components/Workflow/useWorkflowKeyboard.mjs.map +1 -0
- package/dist/icons.js +17 -0
- package/dist/icons.js.map +1 -1
- package/dist/icons.mjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/dist/test-support/setup.d.ts +5 -0
- package/dist/test-support/setup.d.ts.map +1 -0
- package/package.json +10 -2
- package/src/components/Icon/_constants/iconList.ts +35 -0
- package/src/components/Icon/index.tsx +20 -0
- package/src/components/Workflow/README.md +362 -0
- package/src/components/Workflow/Workflow.translations.json +112 -0
- package/src/components/Workflow/Workflow.tsx +189 -0
- package/src/components/Workflow/Workflow.types.ts +496 -0
- package/src/components/Workflow/WorkflowContext/WorkflowContext.tsx +215 -0
- package/src/components/Workflow/WorkflowContext/WorkflowContext.types.ts +122 -0
- package/src/components/Workflow/WorkflowContext/index.ts +10 -0
- package/src/components/Workflow/WorkflowContext/workflowSelection.test.tsx +93 -0
- package/src/components/Workflow/canvas/Canvas/BranchLabelBadge.tsx +69 -0
- package/src/components/Workflow/canvas/Canvas/Canvas.styles.ts +91 -0
- package/src/components/Workflow/canvas/Canvas/Canvas.tsx +773 -0
- package/src/components/Workflow/canvas/Canvas/CanvasControls.tsx +178 -0
- package/src/components/Workflow/canvas/Canvas/LabeledEdge.tsx +198 -0
- package/src/components/Workflow/canvas/Canvas/edgeLabelVariant.test.ts +26 -0
- package/src/components/Workflow/canvas/Canvas/edgeLabelVariant.ts +23 -0
- package/src/components/Workflow/canvas/Canvas/index.ts +1 -0
- package/src/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.tsx +96 -0
- package/src/components/Workflow/canvas/CollapsibleSection/index.ts +4 -0
- package/src/components/Workflow/canvas/DrawerShell/DrawerHeader.tsx +104 -0
- package/src/components/Workflow/canvas/DrawerShell/DrawerIssues.tsx +115 -0
- package/src/components/Workflow/canvas/DrawerShell/DrawerShell.tsx +408 -0
- package/src/components/Workflow/canvas/DrawerShell/index.ts +2 -0
- package/src/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.tsx +135 -0
- package/src/components/Workflow/canvas/EdgeInspector/endpointTitle.ts +38 -0
- package/src/components/Workflow/canvas/EdgeInspector/index.ts +2 -0
- package/src/components/Workflow/canvas/FieldWrapper/FieldWrapper.tsx +118 -0
- package/src/components/Workflow/canvas/FieldWrapper/index.ts +6 -0
- package/src/components/Workflow/canvas/FloatingCard/FloatingCard.tsx +37 -0
- package/src/components/Workflow/canvas/FloatingCard/index.ts +1 -0
- package/src/components/Workflow/canvas/GenericNode/GenericNode.tsx +114 -0
- package/src/components/Workflow/canvas/GenericNode/GenericNode.types.ts +10 -0
- package/src/components/Workflow/canvas/GenericNode/index.ts +5 -0
- package/src/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.tsx +284 -0
- package/src/components/Workflow/canvas/GraphErrorBanner/index.ts +1 -0
- package/src/components/Workflow/canvas/IconTile/IconTile.styles.ts +40 -0
- package/src/components/Workflow/canvas/IconTile/IconTile.tsx +36 -0
- package/src/components/Workflow/canvas/IconTile/IconTile.types.ts +13 -0
- package/src/components/Workflow/canvas/IconTile/index.ts +7 -0
- package/src/components/Workflow/canvas/IssueList/IssueList.tsx +84 -0
- package/src/components/Workflow/canvas/IssueList/index.ts +1 -0
- package/src/components/Workflow/canvas/NodePalette/NodePalette.styles.ts +7 -0
- package/src/components/Workflow/canvas/NodePalette/NodePalette.tsx +180 -0
- package/src/components/Workflow/canvas/NodePalette/NodePaletteToggle.tsx +39 -0
- package/src/components/Workflow/canvas/NodePalette/index.ts +3 -0
- package/src/components/Workflow/canvas/NodeShell/NodeShell.styles.ts +84 -0
- package/src/components/Workflow/canvas/NodeShell/NodeShell.tsx +321 -0
- package/src/components/Workflow/canvas/NodeShell/NodeShell.types.ts +45 -0
- package/src/components/Workflow/canvas/NodeShell/index.ts +8 -0
- package/src/components/Workflow/canvas/SeverityDot/SeverityDot.tsx +33 -0
- package/src/components/Workflow/canvas/SeverityDot/index.ts +1 -0
- package/src/components/Workflow/canvas/issueSeverity.ts +48 -0
- package/src/components/Workflow/canvas/useFieldFocusRequest.ts +54 -0
- package/src/components/Workflow/canvas/workflowLabelProps.ts +11 -0
- package/src/components/Workflow/connectionRules.test.ts +326 -0
- package/src/components/Workflow/connectionRules.ts +190 -0
- package/src/components/Workflow/createNode.test.ts +61 -0
- package/src/components/Workflow/createNode.ts +67 -0
- package/src/components/Workflow/graphHistory.test.ts +178 -0
- package/src/components/Workflow/graphHistory.ts +91 -0
- package/src/components/Workflow/graphObserver.ts +21 -0
- package/src/components/Workflow/graphReducer.test.ts +314 -0
- package/src/components/Workflow/graphReducer.ts +196 -0
- package/src/components/Workflow/index.ts +74 -0
- package/src/components/Workflow/layout/autoLayout.test.ts +170 -0
- package/src/components/Workflow/layout/autoLayout.ts +200 -0
- package/src/components/Workflow/stories/Workflow.stories.tsx +111 -0
- package/src/components/Workflow/stories/toyNodeTypes.tsx +146 -0
- package/src/components/Workflow/useWorkflowIssueMessage.test.ts +101 -0
- package/src/components/Workflow/useWorkflowIssueMessage.ts +49 -0
- package/src/components/Workflow/useWorkflowKeyboard.ts +126 -0
- package/src/index.ts +1 -0
- package/src/test-support/setup.ts +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerShell.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/DrawerShell/DrawerShell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAsC,MAAM,OAAO,CAAC;AAU/E,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EAItB,MAAM,sBAAsB,CAAC;AAO9B,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACzD,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAc,EACd,gBAAgB,GACjB,EAAE,kBAAkB,2CAiEpB"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var react = require('@chakra-ui/react');
|
|
7
|
+
var Button = require('../../../Button/Button.js');
|
|
8
|
+
var index = require('../../../Icon/index.js');
|
|
9
|
+
var Menu = require('../../../Menu/Menu.js');
|
|
10
|
+
require('../../../Menu/MenuList.js');
|
|
11
|
+
require('../../../Typography/H1.js');
|
|
12
|
+
require('../../../Typography/H2.js');
|
|
13
|
+
require('../../../Typography/H3.js');
|
|
14
|
+
require('../../../Typography/H4.js');
|
|
15
|
+
require('../../../Typography/H5.js');
|
|
16
|
+
require('../../../Typography/Link.js');
|
|
17
|
+
require('../../../Typography/Subtext.js');
|
|
18
|
+
require('../../../Typography/Subtitle.js');
|
|
19
|
+
var Text = require('../../../Typography/Text.js');
|
|
20
|
+
var connectionRules = require('../../connectionRules.js');
|
|
21
|
+
var createNode = require('../../createNode.js');
|
|
22
|
+
var WorkflowContext = require('../../WorkflowContext/WorkflowContext.js');
|
|
23
|
+
var BuiltInEdgeInspector = require('../EdgeInspector/BuiltInEdgeInspector.js');
|
|
24
|
+
var endpointTitle = require('../EdgeInspector/endpointTitle.js');
|
|
25
|
+
var FloatingCard = require('../FloatingCard/FloatingCard.js');
|
|
26
|
+
var DrawerHeader = require('./DrawerHeader.js');
|
|
27
|
+
var DrawerIssues = require('./DrawerIssues.js');
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The built-in node/edge inspector. Mount it as a child of `<Workflow>` to get
|
|
31
|
+
* the default floating drawer; omit it to own inspection entirely (drive your
|
|
32
|
+
* own UI off `onSelectionChange`). A node and an edge share this surface: the
|
|
33
|
+
* editor's `drawerTarget` selects which branch renders. Node bodies come from
|
|
34
|
+
* the host node-type registry (`def.renderDrawer`); edge bodies come from the
|
|
35
|
+
* optional `renderEdgeDrawer`, falling back to a built-in label + endpoints
|
|
36
|
+
* inspector. Renders even in read-only mode (controls disable themselves).
|
|
37
|
+
*/
|
|
38
|
+
function NodeInspector({ dock = 'right', renderEdgeDrawer, }) {
|
|
39
|
+
const { graph, dispatch, getNodeType, editor, setDrawerTarget, issuesByNode, issuesByEdge, readOnly, hostBridge, } = WorkflowContext.useWorkflow();
|
|
40
|
+
const target = editor.drawerTarget;
|
|
41
|
+
const node = target?.type === 'node'
|
|
42
|
+
? (graph.nodes.find((n) => n.id === target.id) ?? null)
|
|
43
|
+
: null;
|
|
44
|
+
const edge = target?.type === 'edge'
|
|
45
|
+
? (graph.edges.find((e) => e.id === target.id) ?? null)
|
|
46
|
+
: null;
|
|
47
|
+
// Target points at something that no longer exists (e.g. just deleted) —
|
|
48
|
+
// clear it defensively so the drawer doesn't get stuck open on a ghost.
|
|
49
|
+
React.useEffect(() => {
|
|
50
|
+
if (target && !node && !edge)
|
|
51
|
+
setDrawerTarget(null);
|
|
52
|
+
}, [target, node, edge, setDrawerTarget]);
|
|
53
|
+
// Render even when read-only: node/edge inspectors disable their own controls
|
|
54
|
+
// via the `readOnly` flag, so the drawer stays a legible read-only view (used
|
|
55
|
+
// by the version-history preview). Callers that want it gone simply don't
|
|
56
|
+
// mount <NodeInspector>.
|
|
57
|
+
if (!target)
|
|
58
|
+
return null;
|
|
59
|
+
if (target.type === 'node') {
|
|
60
|
+
if (!node)
|
|
61
|
+
return null;
|
|
62
|
+
return (
|
|
63
|
+
// Keyed by node id so switching between two same-kind nodes remounts the
|
|
64
|
+
// drawer — without this, scroll offset and collapsed-section state from
|
|
65
|
+
// the previous node carry over to the next one.
|
|
66
|
+
jsxRuntime.jsx(NodeDrawer, { node: node, issuesByNode: issuesByNode, hostBridge: hostBridge, readOnly: readOnly, dock: dock, dispatch: dispatch, getNodeType: getNodeType, graphNodes: graph.nodes, setDrawerTarget: setDrawerTarget }, node.id));
|
|
67
|
+
}
|
|
68
|
+
if (!edge)
|
|
69
|
+
return null;
|
|
70
|
+
return (jsxRuntime.jsx(EdgeDrawer, { edge: edge, issues: issuesByEdge[edge.id] ?? [], hostBridge: hostBridge, readOnly: readOnly, dock: dock, RenderEdge: renderEdgeDrawer }));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Shared drawer chrome: a floating `Card` inspector with a header + scrollable
|
|
74
|
+
* body. Kept in its own column (rather than overlaying) so it never covers the
|
|
75
|
+
* canvas MiniMap; the margin gutter detaches it from the edges and the top
|
|
76
|
+
* inset clears any floating action controls a host renders in the canvas
|
|
77
|
+
* top-right.
|
|
78
|
+
*
|
|
79
|
+
* `alignSelf="flex-start"` opts the card out of the flex row's stretch so it
|
|
80
|
+
* sizes to its content rather than the full canvas height; `maxHeight` caps it
|
|
81
|
+
* at the available column (minus the `mt`/`mb` gutters, kept in sync via the
|
|
82
|
+
* spacing CSS vars) so a long inspector still scrolls its body instead of
|
|
83
|
+
* overflowing.
|
|
84
|
+
*/
|
|
85
|
+
function DrawerFrame({ header, children, dock, }) {
|
|
86
|
+
// A right dock clears the host's top-right action card (mt=20); a left dock
|
|
87
|
+
// (version-history preview) has nothing above it, so it sits at the same top
|
|
88
|
+
// gutter as the palette (mt=4).
|
|
89
|
+
const topInset = dock === 'left' ? 4 : 20;
|
|
90
|
+
return (jsxRuntime.jsxs(FloatingCard.FloatingCard
|
|
91
|
+
// A left dock renders before the canvas in the flex row; a right dock
|
|
92
|
+
// after. The host hides the palette when docking left, so order:-1 lands
|
|
93
|
+
// the inspector at the left edge.
|
|
94
|
+
, {
|
|
95
|
+
// A left dock renders before the canvas in the flex row; a right dock
|
|
96
|
+
// after. The host hides the palette when docking left, so order:-1 lands
|
|
97
|
+
// the inspector at the left edge.
|
|
98
|
+
order: dock === 'left' ? -1 : undefined, mt: topInset, mb: 4, mx: 4, alignSelf: "flex-start", maxHeight: `calc(100% - var(--chakra-spacing-${topInset}) - var(--chakra-spacing-4))`, display: "flex", flexDirection: "column", children: [header, jsxRuntime.jsx(react.Box, { flex: "1", minHeight: 0, overflowY: "auto", children: children })] }));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Wraps an inspector body in a disabled `<fieldset>` when read-only (version
|
|
102
|
+
* preview). A disabled fieldset natively disables every form control nested in
|
|
103
|
+
* it — inputs, textareas, selects, buttons, switches — so the whole inspector
|
|
104
|
+
* goes read-only without each node type having to gate every control. The
|
|
105
|
+
* header (close button) lives outside this, so the drawer can still be closed.
|
|
106
|
+
*/
|
|
107
|
+
function ReadOnlyFieldset({ readOnly, children, }) {
|
|
108
|
+
return (jsxRuntime.jsx(react.chakra.fieldset, { disabled: readOnly, border: "0", m: 0, p: 0, minW: 0, children: children }));
|
|
109
|
+
}
|
|
110
|
+
function NodeDrawer({ node, issuesByNode, hostBridge, readOnly, dock, dispatch, getNodeType, graphNodes, setDrawerTarget, }) {
|
|
111
|
+
const translate = WorkflowContext.useWorkflowTranslate();
|
|
112
|
+
const def = getNodeType(node.kind);
|
|
113
|
+
const issues = React.useMemo(() => issuesByNode[node.id] ?? [], [issuesByNode, node.id]);
|
|
114
|
+
// Field-scoped issues render inline beneath their inputs via FieldWrapper.
|
|
115
|
+
// Only node-scoped issues that DON'T target a specific field (e.g.
|
|
116
|
+
// graph-level "unreachable from start") still need a header surface.
|
|
117
|
+
const orphanIssues = React.useMemo(() => issues.filter((i) => !i.fieldKey), [issues]);
|
|
118
|
+
if (!def)
|
|
119
|
+
return null;
|
|
120
|
+
const Render = def.renderDrawer;
|
|
121
|
+
const Icon = def.icon;
|
|
122
|
+
// Title the drawer with the instance (an agent's name), not the kind — with
|
|
123
|
+
// several same-kind nodes the kind alone doesn't say which one is open. The
|
|
124
|
+
// kind stays visible as the subtitle (dropped when the node is unnamed and
|
|
125
|
+
// the title already IS the kind label).
|
|
126
|
+
const instanceTitle = endpointTitle.endpointTitle(node, def, node.id);
|
|
127
|
+
// Single dispatch path for every config write, so a handle rename (e.g. a
|
|
128
|
+
// renamed Classify category, whose handle is `cat_<name>`) always moves its
|
|
129
|
+
// edge instead of orphaning it.
|
|
130
|
+
const applyConfig = (next) => dispatch({
|
|
131
|
+
type: 'updateNodeConfig',
|
|
132
|
+
id: node.id,
|
|
133
|
+
config: next,
|
|
134
|
+
remapEdgeHandle: connectionRules.renamedOutputHandle(def.handles, node.config, next),
|
|
135
|
+
});
|
|
136
|
+
const header = (jsxRuntime.jsx(DrawerHeader.DrawerHeader, { icon: jsxRuntime.jsx(react.Box, { color: "slate.1200", display: "flex", alignItems: "center", children: jsxRuntime.jsx(Icon, { boxSize: "xs" }) }), title: instanceTitle, subtitle: instanceTitle === def.label ? undefined : def.label, lineClampTitle: true, menuItems:
|
|
137
|
+
// No mutating actions in read-only (version preview) — selection stays
|
|
138
|
+
// enabled so the node is still inspectable, but Duplicate/Delete are
|
|
139
|
+
// hidden so the previewed graph can't be edited.
|
|
140
|
+
!readOnly && !def.placement?.pinned ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Menu.Menu.Item, { value: "duplicate", onClick: () => {
|
|
141
|
+
const clone = createNode.cloneNode(node, graphNodes);
|
|
142
|
+
dispatch({ type: 'addNode', node: clone });
|
|
143
|
+
setDrawerTarget({ type: 'node', id: clone.id });
|
|
144
|
+
}, children: translate('workflow_node_duplicate') }), jsxRuntime.jsx(Menu.Menu.Item, { value: "delete", color: "danger.main", onClick: () => {
|
|
145
|
+
dispatch({ type: 'deleteNode', id: node.id });
|
|
146
|
+
setDrawerTarget(null);
|
|
147
|
+
}, children: translate('workflow_node_delete') })] })) : undefined, onClose: () => setDrawerTarget(null) }));
|
|
148
|
+
return (jsxRuntime.jsxs(DrawerFrame, { header: header, dock: dock, children: [jsxRuntime.jsx(DrawerIssues.DrawerIssues, { issues: orphanIssues }), jsxRuntime.jsx(ReadOnlyFieldset, { readOnly: readOnly, children: Render ? (jsxRuntime.jsx(Render, { id: node.id, config: node.config, issues: issues, readOnly: readOnly, hostBridge: hostBridge, onChange: applyConfig })) : (jsxRuntime.jsx(Text.Text, { color: "slate.600", fontSize: "sm", px: 4, py: 4, children: translate('workflow_drawer_empty_settings') })) })] }));
|
|
149
|
+
}
|
|
150
|
+
function EdgeDrawer({ edge, issues, hostBridge, readOnly, dock, RenderEdge, }) {
|
|
151
|
+
const translate = WorkflowContext.useWorkflowTranslate();
|
|
152
|
+
const { graph, dispatch, getNodeType, setDrawerTarget, setSelectedEdgeId } = WorkflowContext.useWorkflow();
|
|
153
|
+
const sourceNode = graph.nodes.find((n) => n.id === edge.source);
|
|
154
|
+
const targetNode = graph.nodes.find((n) => n.id === edge.target);
|
|
155
|
+
const connectionTitle = translate('workflow_edge_connection', {
|
|
156
|
+
source: endpointTitle.endpointTitle(sourceNode, sourceNode ? getNodeType(sourceNode.kind) : undefined, edge.source),
|
|
157
|
+
target: endpointTitle.endpointTitle(targetNode, targetNode ? getNodeType(targetNode.kind) : undefined, edge.target),
|
|
158
|
+
});
|
|
159
|
+
const onChange = (next) => dispatch({
|
|
160
|
+
type: 'updateEdge',
|
|
161
|
+
id: edge.id,
|
|
162
|
+
patch: { label: next.label },
|
|
163
|
+
});
|
|
164
|
+
const onDelete = () => {
|
|
165
|
+
dispatch({ type: 'deleteEdge', id: edge.id });
|
|
166
|
+
setDrawerTarget(null);
|
|
167
|
+
setSelectedEdgeId(null);
|
|
168
|
+
};
|
|
169
|
+
const header = (
|
|
170
|
+
// Delete moved out of the kebab into an explicit button at the foot of the
|
|
171
|
+
// drawer (below), so it's discoverable when you just click an edge — the
|
|
172
|
+
// hover-X on the canvas only appears over the edge's name badge now.
|
|
173
|
+
jsxRuntime.jsx(DrawerHeader.DrawerHeader, { title: connectionTitle, lineClampTitle: true, onClose: () => setDrawerTarget(null) }));
|
|
174
|
+
return (jsxRuntime.jsxs(DrawerFrame, { header: header, dock: dock, children: [jsxRuntime.jsx(DrawerIssues.DrawerIssues, { issues: issues }), jsxRuntime.jsx(ReadOnlyFieldset, { readOnly: readOnly, children: RenderEdge ? (jsxRuntime.jsx(RenderEdge, { edge: edge, onChange: onChange, issues: issues, readOnly: readOnly, hostBridge: hostBridge })) : (jsxRuntime.jsx(BuiltInEdgeInspector.BuiltInEdgeInspector, { edge: edge, onChange: onChange, issues: issues, readOnly: readOnly, hostBridge: hostBridge })) }), readOnly ? null : (jsxRuntime.jsx(react.Box, { borderTopWidth: "1px", borderColor: "slate.200", px: 4, py: 3, children: jsxRuntime.jsxs(Button.Button, { size: "sm", variant: "outline", colorPalette: "danger", width: "100%", onClick: onDelete, children: [jsxRuntime.jsx(index.TbX, { boxSize: "xs" }), translate('workflow_edge_delete')] }) }))] }));
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
exports.NodeInspector = NodeInspector;
|
|
178
|
+
//# sourceMappingURL=DrawerShell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerShell.js","sources":["../../../../../src/components/Workflow/canvas/DrawerShell/DrawerShell.tsx"],"sourcesContent":[null],"names":["useWorkflow","useEffect","_jsx","_jsxs","FloatingCard","Box","chakra","useWorkflowTranslate","useMemo","endpointTitle","renamedOutputHandle","DrawerHeader","Menu","cloneNode","DrawerIssues","Text","BuiltInEdgeInspector","Button","TbX"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA;;;;;;;;AAQG;AACG,SAAU,aAAa,CAAC,EAC5B,IAAI,GAAG,OAAO,EACd,gBAAgB,GACG,EAAA;IACnB,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,UAAU,GACX,GAAGA,2BAAW,EAAE;AAEjB,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY;AAClC,IAAA,MAAM,IAAI,GACR,MAAM,EAAE,IAAI,KAAK;WACZ,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,IAAI,IAAI;UACpD,IAAI;AACV,IAAA,MAAM,IAAI,GACR,MAAM,EAAE,IAAI,KAAK;WACZ,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,IAAI,IAAI;UACpD,IAAI;;;IAIVC,eAAS,CAAC,MAAK;AACb,QAAA,IAAI,MAAM,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI;YAAE,eAAe,CAAC,IAAI,CAAC;IACrD,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;;;;;AAMzC,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OA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AC,WAAW,EAAA,EAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAA,QAAA,EAAA,CACrCD,cAAA,CAACY,yBAAY,IAAC,MAAM,EAAE,MAAM,EAAA,CAAI,EAChCZ,cAAA,CAAC,gBAAgB,EAAA,EAAC,QAAQ,EAAE,QAAQ,EAAA,QAAA,EACjC,UAAU,IACTA,cAAA,CAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,GACtB,KAEFA,cAAA,CAACc,yCAAoB,EAAA,EACnB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EAAA,CACtB,CACH,EAAA,CACgB,EAGlB,QAAQ,GAAG,IAAI,IACdd,cAAA,CAACG,SAAG,EAAA,EAAC,cAAc,EAAC,KAAK,EAAC,WAAW,EAAC,WAAW,EAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YAC5DF,eAAA,CAACc,aAAM,EAAA,EACL,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,SAAS,EACjB,YAAY,EAAC,QAAQ,EACrB,KAAK,EAAC,MAAM,EACZ,OAAO,EAAE,QAAQ,EAAA,QAAA,EAAA,CAEjBf,cAAA,CAACgB,SAAG,EAAA,EAAC,OAAO,EAAC,IAAI,GAAG,EACnB,SAAS,CAAC,sBAAsB,CAAW,CAAA,EAAA,CACrC,EAAA,CACL,CACP,CAAA,EAAA,CACW;AAElB;;;;"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { useEffect, useMemo } from 'react';
|
|
4
|
+
import { Box, chakra } from '@chakra-ui/react';
|
|
5
|
+
import { Button } from '../../../Button/Button.mjs';
|
|
6
|
+
import { TbX } from '../../../Icon/index.mjs';
|
|
7
|
+
import { Menu } from '../../../Menu/Menu.mjs';
|
|
8
|
+
import '../../../Menu/MenuList.mjs';
|
|
9
|
+
import '../../../Typography/H1.mjs';
|
|
10
|
+
import '../../../Typography/H2.mjs';
|
|
11
|
+
import '../../../Typography/H3.mjs';
|
|
12
|
+
import '../../../Typography/H4.mjs';
|
|
13
|
+
import '../../../Typography/H5.mjs';
|
|
14
|
+
import '../../../Typography/Link.mjs';
|
|
15
|
+
import '../../../Typography/Subtext.mjs';
|
|
16
|
+
import '../../../Typography/Subtitle.mjs';
|
|
17
|
+
import { Text } from '../../../Typography/Text.mjs';
|
|
18
|
+
import { renamedOutputHandle } from '../../connectionRules.mjs';
|
|
19
|
+
import { cloneNode } from '../../createNode.mjs';
|
|
20
|
+
import { useWorkflow, useWorkflowTranslate } from '../../WorkflowContext/WorkflowContext.mjs';
|
|
21
|
+
import { BuiltInEdgeInspector } from '../EdgeInspector/BuiltInEdgeInspector.mjs';
|
|
22
|
+
import { endpointTitle } from '../EdgeInspector/endpointTitle.mjs';
|
|
23
|
+
import { FloatingCard } from '../FloatingCard/FloatingCard.mjs';
|
|
24
|
+
import { DrawerHeader } from './DrawerHeader.mjs';
|
|
25
|
+
import { DrawerIssues } from './DrawerIssues.mjs';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The built-in node/edge inspector. Mount it as a child of `<Workflow>` to get
|
|
29
|
+
* the default floating drawer; omit it to own inspection entirely (drive your
|
|
30
|
+
* own UI off `onSelectionChange`). A node and an edge share this surface: the
|
|
31
|
+
* editor's `drawerTarget` selects which branch renders. Node bodies come from
|
|
32
|
+
* the host node-type registry (`def.renderDrawer`); edge bodies come from the
|
|
33
|
+
* optional `renderEdgeDrawer`, falling back to a built-in label + endpoints
|
|
34
|
+
* inspector. Renders even in read-only mode (controls disable themselves).
|
|
35
|
+
*/
|
|
36
|
+
function NodeInspector({ dock = 'right', renderEdgeDrawer, }) {
|
|
37
|
+
const { graph, dispatch, getNodeType, editor, setDrawerTarget, issuesByNode, issuesByEdge, readOnly, hostBridge, } = useWorkflow();
|
|
38
|
+
const target = editor.drawerTarget;
|
|
39
|
+
const node = target?.type === 'node'
|
|
40
|
+
? (graph.nodes.find((n) => n.id === target.id) ?? null)
|
|
41
|
+
: null;
|
|
42
|
+
const edge = target?.type === 'edge'
|
|
43
|
+
? (graph.edges.find((e) => e.id === target.id) ?? null)
|
|
44
|
+
: null;
|
|
45
|
+
// Target points at something that no longer exists (e.g. just deleted) —
|
|
46
|
+
// clear it defensively so the drawer doesn't get stuck open on a ghost.
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (target && !node && !edge)
|
|
49
|
+
setDrawerTarget(null);
|
|
50
|
+
}, [target, node, edge, setDrawerTarget]);
|
|
51
|
+
// Render even when read-only: node/edge inspectors disable their own controls
|
|
52
|
+
// via the `readOnly` flag, so the drawer stays a legible read-only view (used
|
|
53
|
+
// by the version-history preview). Callers that want it gone simply don't
|
|
54
|
+
// mount <NodeInspector>.
|
|
55
|
+
if (!target)
|
|
56
|
+
return null;
|
|
57
|
+
if (target.type === 'node') {
|
|
58
|
+
if (!node)
|
|
59
|
+
return null;
|
|
60
|
+
return (
|
|
61
|
+
// Keyed by node id so switching between two same-kind nodes remounts the
|
|
62
|
+
// drawer — without this, scroll offset and collapsed-section state from
|
|
63
|
+
// the previous node carry over to the next one.
|
|
64
|
+
jsx(NodeDrawer, { node: node, issuesByNode: issuesByNode, hostBridge: hostBridge, readOnly: readOnly, dock: dock, dispatch: dispatch, getNodeType: getNodeType, graphNodes: graph.nodes, setDrawerTarget: setDrawerTarget }, node.id));
|
|
65
|
+
}
|
|
66
|
+
if (!edge)
|
|
67
|
+
return null;
|
|
68
|
+
return (jsx(EdgeDrawer, { edge: edge, issues: issuesByEdge[edge.id] ?? [], hostBridge: hostBridge, readOnly: readOnly, dock: dock, RenderEdge: renderEdgeDrawer }));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Shared drawer chrome: a floating `Card` inspector with a header + scrollable
|
|
72
|
+
* body. Kept in its own column (rather than overlaying) so it never covers the
|
|
73
|
+
* canvas MiniMap; the margin gutter detaches it from the edges and the top
|
|
74
|
+
* inset clears any floating action controls a host renders in the canvas
|
|
75
|
+
* top-right.
|
|
76
|
+
*
|
|
77
|
+
* `alignSelf="flex-start"` opts the card out of the flex row's stretch so it
|
|
78
|
+
* sizes to its content rather than the full canvas height; `maxHeight` caps it
|
|
79
|
+
* at the available column (minus the `mt`/`mb` gutters, kept in sync via the
|
|
80
|
+
* spacing CSS vars) so a long inspector still scrolls its body instead of
|
|
81
|
+
* overflowing.
|
|
82
|
+
*/
|
|
83
|
+
function DrawerFrame({ header, children, dock, }) {
|
|
84
|
+
// A right dock clears the host's top-right action card (mt=20); a left dock
|
|
85
|
+
// (version-history preview) has nothing above it, so it sits at the same top
|
|
86
|
+
// gutter as the palette (mt=4).
|
|
87
|
+
const topInset = dock === 'left' ? 4 : 20;
|
|
88
|
+
return (jsxs(FloatingCard
|
|
89
|
+
// A left dock renders before the canvas in the flex row; a right dock
|
|
90
|
+
// after. The host hides the palette when docking left, so order:-1 lands
|
|
91
|
+
// the inspector at the left edge.
|
|
92
|
+
, {
|
|
93
|
+
// A left dock renders before the canvas in the flex row; a right dock
|
|
94
|
+
// after. The host hides the palette when docking left, so order:-1 lands
|
|
95
|
+
// the inspector at the left edge.
|
|
96
|
+
order: dock === 'left' ? -1 : undefined, mt: topInset, mb: 4, mx: 4, alignSelf: "flex-start", maxHeight: `calc(100% - var(--chakra-spacing-${topInset}) - var(--chakra-spacing-4))`, display: "flex", flexDirection: "column", children: [header, jsx(Box, { flex: "1", minHeight: 0, overflowY: "auto", children: children })] }));
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Wraps an inspector body in a disabled `<fieldset>` when read-only (version
|
|
100
|
+
* preview). A disabled fieldset natively disables every form control nested in
|
|
101
|
+
* it — inputs, textareas, selects, buttons, switches — so the whole inspector
|
|
102
|
+
* goes read-only without each node type having to gate every control. The
|
|
103
|
+
* header (close button) lives outside this, so the drawer can still be closed.
|
|
104
|
+
*/
|
|
105
|
+
function ReadOnlyFieldset({ readOnly, children, }) {
|
|
106
|
+
return (jsx(chakra.fieldset, { disabled: readOnly, border: "0", m: 0, p: 0, minW: 0, children: children }));
|
|
107
|
+
}
|
|
108
|
+
function NodeDrawer({ node, issuesByNode, hostBridge, readOnly, dock, dispatch, getNodeType, graphNodes, setDrawerTarget, }) {
|
|
109
|
+
const translate = useWorkflowTranslate();
|
|
110
|
+
const def = getNodeType(node.kind);
|
|
111
|
+
const issues = useMemo(() => issuesByNode[node.id] ?? [], [issuesByNode, node.id]);
|
|
112
|
+
// Field-scoped issues render inline beneath their inputs via FieldWrapper.
|
|
113
|
+
// Only node-scoped issues that DON'T target a specific field (e.g.
|
|
114
|
+
// graph-level "unreachable from start") still need a header surface.
|
|
115
|
+
const orphanIssues = useMemo(() => issues.filter((i) => !i.fieldKey), [issues]);
|
|
116
|
+
if (!def)
|
|
117
|
+
return null;
|
|
118
|
+
const Render = def.renderDrawer;
|
|
119
|
+
const Icon = def.icon;
|
|
120
|
+
// Title the drawer with the instance (an agent's name), not the kind — with
|
|
121
|
+
// several same-kind nodes the kind alone doesn't say which one is open. The
|
|
122
|
+
// kind stays visible as the subtitle (dropped when the node is unnamed and
|
|
123
|
+
// the title already IS the kind label).
|
|
124
|
+
const instanceTitle = endpointTitle(node, def, node.id);
|
|
125
|
+
// Single dispatch path for every config write, so a handle rename (e.g. a
|
|
126
|
+
// renamed Classify category, whose handle is `cat_<name>`) always moves its
|
|
127
|
+
// edge instead of orphaning it.
|
|
128
|
+
const applyConfig = (next) => dispatch({
|
|
129
|
+
type: 'updateNodeConfig',
|
|
130
|
+
id: node.id,
|
|
131
|
+
config: next,
|
|
132
|
+
remapEdgeHandle: renamedOutputHandle(def.handles, node.config, next),
|
|
133
|
+
});
|
|
134
|
+
const header = (jsx(DrawerHeader, { icon: jsx(Box, { color: "slate.1200", display: "flex", alignItems: "center", children: jsx(Icon, { boxSize: "xs" }) }), title: instanceTitle, subtitle: instanceTitle === def.label ? undefined : def.label, lineClampTitle: true, menuItems:
|
|
135
|
+
// No mutating actions in read-only (version preview) — selection stays
|
|
136
|
+
// enabled so the node is still inspectable, but Duplicate/Delete are
|
|
137
|
+
// hidden so the previewed graph can't be edited.
|
|
138
|
+
!readOnly && !def.placement?.pinned ? (jsxs(Fragment, { children: [jsx(Menu.Item, { value: "duplicate", onClick: () => {
|
|
139
|
+
const clone = cloneNode(node, graphNodes);
|
|
140
|
+
dispatch({ type: 'addNode', node: clone });
|
|
141
|
+
setDrawerTarget({ type: 'node', id: clone.id });
|
|
142
|
+
}, children: translate('workflow_node_duplicate') }), jsx(Menu.Item, { value: "delete", color: "danger.main", onClick: () => {
|
|
143
|
+
dispatch({ type: 'deleteNode', id: node.id });
|
|
144
|
+
setDrawerTarget(null);
|
|
145
|
+
}, children: translate('workflow_node_delete') })] })) : undefined, onClose: () => setDrawerTarget(null) }));
|
|
146
|
+
return (jsxs(DrawerFrame, { header: header, dock: dock, children: [jsx(DrawerIssues, { issues: orphanIssues }), jsx(ReadOnlyFieldset, { readOnly: readOnly, children: Render ? (jsx(Render, { id: node.id, config: node.config, issues: issues, readOnly: readOnly, hostBridge: hostBridge, onChange: applyConfig })) : (jsx(Text, { color: "slate.600", fontSize: "sm", px: 4, py: 4, children: translate('workflow_drawer_empty_settings') })) })] }));
|
|
147
|
+
}
|
|
148
|
+
function EdgeDrawer({ edge, issues, hostBridge, readOnly, dock, RenderEdge, }) {
|
|
149
|
+
const translate = useWorkflowTranslate();
|
|
150
|
+
const { graph, dispatch, getNodeType, setDrawerTarget, setSelectedEdgeId } = useWorkflow();
|
|
151
|
+
const sourceNode = graph.nodes.find((n) => n.id === edge.source);
|
|
152
|
+
const targetNode = graph.nodes.find((n) => n.id === edge.target);
|
|
153
|
+
const connectionTitle = translate('workflow_edge_connection', {
|
|
154
|
+
source: endpointTitle(sourceNode, sourceNode ? getNodeType(sourceNode.kind) : undefined, edge.source),
|
|
155
|
+
target: endpointTitle(targetNode, targetNode ? getNodeType(targetNode.kind) : undefined, edge.target),
|
|
156
|
+
});
|
|
157
|
+
const onChange = (next) => dispatch({
|
|
158
|
+
type: 'updateEdge',
|
|
159
|
+
id: edge.id,
|
|
160
|
+
patch: { label: next.label },
|
|
161
|
+
});
|
|
162
|
+
const onDelete = () => {
|
|
163
|
+
dispatch({ type: 'deleteEdge', id: edge.id });
|
|
164
|
+
setDrawerTarget(null);
|
|
165
|
+
setSelectedEdgeId(null);
|
|
166
|
+
};
|
|
167
|
+
const header = (
|
|
168
|
+
// Delete moved out of the kebab into an explicit button at the foot of the
|
|
169
|
+
// drawer (below), so it's discoverable when you just click an edge — the
|
|
170
|
+
// hover-X on the canvas only appears over the edge's name badge now.
|
|
171
|
+
jsx(DrawerHeader, { title: connectionTitle, lineClampTitle: true, onClose: () => setDrawerTarget(null) }));
|
|
172
|
+
return (jsxs(DrawerFrame, { header: header, dock: dock, children: [jsx(DrawerIssues, { issues: issues }), jsx(ReadOnlyFieldset, { readOnly: readOnly, children: RenderEdge ? (jsx(RenderEdge, { edge: edge, onChange: onChange, issues: issues, readOnly: readOnly, hostBridge: hostBridge })) : (jsx(BuiltInEdgeInspector, { edge: edge, onChange: onChange, issues: issues, readOnly: readOnly, hostBridge: hostBridge })) }), readOnly ? null : (jsx(Box, { borderTopWidth: "1px", borderColor: "slate.200", px: 4, py: 3, children: jsxs(Button, { size: "sm", variant: "outline", colorPalette: "danger", width: "100%", onClick: onDelete, children: [jsx(TbX, { boxSize: "xs" }), translate('workflow_edge_delete')] }) }))] }));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export { NodeInspector };
|
|
176
|
+
//# sourceMappingURL=DrawerShell.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerShell.mjs","sources":["../../../../../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,IACT,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,GACtB,KAEFA,GAAA,CAAC,oBAAoB,EAAA,EACnB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EAAA,CACtB,CACH,EAAA,CACgB,EAGlB,QAAQ,GAAG,IAAI,IACdA,GAAA,CAAC,GAAG,EAAA,EAAC,cAAc,EAAC,KAAK,EAAC,WAAW,EAAC,WAAW,EAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YAC5DC,IAAA,CAAC,MAAM,EAAA,EACL,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,SAAS,EACjB,YAAY,EAAC,QAAQ,EACrB,KAAK,EAAC,MAAM,EACZ,OAAO,EAAE,QAAQ,EAAA,QAAA,EAAA,CAEjBD,GAAA,CAAC,GAAG,EAAA,EAAC,OAAO,EAAC,IAAI,GAAG,EACnB,SAAS,CAAC,sBAAsB,CAAW,CAAA,EAAA,CACrC,EAAA,CACL,CACP,CAAA,EAAA,CACW;AAElB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/DrawerShell/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EdgeDrawerRenderProps } from '../../Workflow.types';
|
|
2
|
+
/**
|
|
3
|
+
* Built-in edge inspector body rendered in `DrawerShell` when the host does not
|
|
4
|
+
* supply a `renderEdgeDrawer`. Shows an editable label plus read-only endpoint
|
|
5
|
+
* info (source title → target title, and handle ids when present). Label edits
|
|
6
|
+
* flow through `onChange` (an `updateEdge` dispatch) so they are undoable.
|
|
7
|
+
*
|
|
8
|
+
* Deliberately uses only generic primitives (logician-ui + FieldWrapper) so the
|
|
9
|
+
* framework core stays domain-free.
|
|
10
|
+
*/
|
|
11
|
+
export declare function BuiltInEdgeInspector({ edge, onChange, readOnly, }: EdgeDrawerRenderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=BuiltInEdgeInspector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BuiltInEdgeInspector.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,qBAAqB,EAGtB,MAAM,sBAAsB,CAAC;AAwB9B;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,QAAQ,EACR,QAAQ,GACT,EAAE,qBAAqB,2CAmEvB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('@chakra-ui/react');
|
|
6
|
+
var Input = require('../../../Input/Input.js');
|
|
7
|
+
require('../../../Typography/H1.js');
|
|
8
|
+
require('../../../Typography/H2.js');
|
|
9
|
+
require('../../../Typography/H3.js');
|
|
10
|
+
require('../../../Typography/H4.js');
|
|
11
|
+
require('../../../Typography/H5.js');
|
|
12
|
+
require('../../../Typography/Link.js');
|
|
13
|
+
var Subtext = require('../../../Typography/Subtext.js');
|
|
14
|
+
require('../../../Typography/Subtitle.js');
|
|
15
|
+
require('../../../Typography/Text.js');
|
|
16
|
+
var WorkflowContext = require('../../WorkflowContext/WorkflowContext.js');
|
|
17
|
+
var FieldWrapper = require('../FieldWrapper/FieldWrapper.js');
|
|
18
|
+
var endpointTitle = require('./endpointTitle.js');
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Author-facing line for the port an edge endpoint sits on. A resolved port
|
|
22
|
+
* shows its label (Pass / 분기 1 — the same text LabeledEdge rides on the
|
|
23
|
+
* wire) or nothing when unlabeled (raw ids like `out` are wiring detail). A
|
|
24
|
+
* DANGLING handle — one no current port matches, e.g. after restoring a
|
|
25
|
+
* snapshot whose category was renamed — falls back to the raw id, the only
|
|
26
|
+
* clue left for diagnosing the broken wire.
|
|
27
|
+
*/
|
|
28
|
+
function portLabel(node, def, side, handleId) {
|
|
29
|
+
if (!node || !def || !handleId)
|
|
30
|
+
return undefined;
|
|
31
|
+
const port = endpointTitle.findPort(node, def, side, handleId);
|
|
32
|
+
return port ? port.label : handleId;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Built-in edge inspector body rendered in `DrawerShell` when the host does not
|
|
36
|
+
* supply a `renderEdgeDrawer`. Shows an editable label plus read-only endpoint
|
|
37
|
+
* info (source title → target title, and handle ids when present). Label edits
|
|
38
|
+
* flow through `onChange` (an `updateEdge` dispatch) so they are undoable.
|
|
39
|
+
*
|
|
40
|
+
* Deliberately uses only generic primitives (logician-ui + FieldWrapper) so the
|
|
41
|
+
* framework core stays domain-free.
|
|
42
|
+
*/
|
|
43
|
+
function BuiltInEdgeInspector({ edge, onChange, readOnly, }) {
|
|
44
|
+
const translate = WorkflowContext.useWorkflowTranslate();
|
|
45
|
+
const { graph, getNodeType } = WorkflowContext.useWorkflow();
|
|
46
|
+
const sourceNode = graph.nodes.find((n) => n.id === edge.source);
|
|
47
|
+
const targetNode = graph.nodes.find((n) => n.id === edge.target);
|
|
48
|
+
const sourceDef = sourceNode ? getNodeType(sourceNode.kind) : undefined;
|
|
49
|
+
const targetDef = targetNode ? getNodeType(targetNode.kind) : undefined;
|
|
50
|
+
const sourceTitle = endpointTitle.endpointTitle(sourceNode, sourceDef, edge.source);
|
|
51
|
+
const targetTitle = endpointTitle.endpointTitle(targetNode, targetDef, edge.target);
|
|
52
|
+
return (jsxRuntime.jsx(react.Box, { px: 4, py: 4, children: jsxRuntime.jsxs(react.VStack, { align: "stretch", gap: 4, children: [jsxRuntime.jsx(FieldWrapper.FieldWrapper
|
|
53
|
+
// Edges have no field-scoped issues in `issuesByField` (which is keyed
|
|
54
|
+
// by nodeId), so this lookup is intentionally empty — FieldWrapper is
|
|
55
|
+
// reused purely for its label + layout.
|
|
56
|
+
, {
|
|
57
|
+
// Edges have no field-scoped issues in `issuesByField` (which is keyed
|
|
58
|
+
// by nodeId), so this lookup is intentionally empty — FieldWrapper is
|
|
59
|
+
// reused purely for its label + layout.
|
|
60
|
+
nodeId: edge.id, fieldKey: "label", label: translate('workflow_edge_label_label'), children: ({ borderColor }) => (jsxRuntime.jsx(Input.Input, { borderColor: borderColor, value: edge.label ?? '', disabled: readOnly, placeholder: translate('workflow_edge_label_placeholder'), onChange: (e) => onChange({ ...edge, label: e.target.value || undefined }) })) }), jsxRuntime.jsxs(react.Stack, { gap: 1.5, children: [jsxRuntime.jsx(Subtext.Subtext, { fontWeight: "semibold", color: "slate.1300", children: translate('workflow_edge_endpoints_heading') }), jsxRuntime.jsxs(react.Stack, { gap: 2, children: [jsxRuntime.jsx(EndpointRow, { label: translate('workflow_edge_source_label'), title: sourceTitle, portLabel: portLabel(sourceNode, sourceDef, 'outputs', edge.sourceHandle) }), jsxRuntime.jsx(EndpointRow, { label: translate('workflow_edge_target_label'), title: targetTitle, portLabel: portLabel(targetNode, targetDef, 'inputs', edge.targetHandle) })] })] })] }) }));
|
|
61
|
+
}
|
|
62
|
+
/** One read-only endpoint line: role label, resolved node title, optional port label. */
|
|
63
|
+
function EndpointRow({ label, title, portLabel, }) {
|
|
64
|
+
return (jsxRuntime.jsxs(react.Stack, { gap: 0.5, children: [jsxRuntime.jsx(Subtext.Subtext, { color: "slate.900", children: label }), jsxRuntime.jsx(Subtext.Subtext, { color: "slate.1200", children: title }), portLabel ? jsxRuntime.jsx(Subtext.Subtext, { color: "slate.700", children: portLabel }) : null] }));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
exports.BuiltInEdgeInspector = BuiltInEdgeInspector;
|
|
68
|
+
//# sourceMappingURL=BuiltInEdgeInspector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BuiltInEdgeInspector.js","sources":["../../../../../src/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.tsx"],"sourcesContent":[null],"names":["findPort","useWorkflowTranslate","useWorkflow","endpointTitle","_jsx","Box","_jsxs","VStack","FieldWrapper","Input","Stack","Subtext"],"mappings":";;;;;;;;;;;;;;;;;;;AAgBA;;;;;;;AAOG;AACH,SAAS,SAAS,CAChB,IAA2B,EAC3B,GAA4B,EAC5B,IAA0B,EAC1B,QAA4B,EAAA;AAE5B,IAAA,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ;AAAE,QAAA,OAAO,SAAS;AAChD,IAAA,MAAM,IAAI,GAAGA,sBAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC;IAChD,OAAO,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,QAAQ;AACrC;AAEA;;;;;;;;AAQG;AACG,SAAU,oBAAoB,CAAC,EACnC,IAAI,EACJ,QAAQ,EACR,QAAQ,GACc,EAAA;AACtB,IAAA,MAAM,SAAS,GAAGC,oCAAoB,EAAE;IACxC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAGC,2BAAW,EAAE;IAE5C,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,MAAM,CAAC;IAChE,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,MAAM,CAAC;AAChE,IAAA,MAAM,SAAS,GAA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AiC,CAAW,EAAA,CAC/C,EACVL,gBAACI,WAAK,EAAA,EAAC,GAAG,EAAE,CAAC,EAAA,QAAA,EAAA,CACXN,cAAA,CAAC,WAAW,EAAA,EACV,KAAK,EAAE,SAAS,CAAC,4BAA4B,CAAW,EACxD,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,SAAS,CAClB,UAAU,EACV,SAAS,EACT,SAAS,EACT,IAAI,CAAC,YAAY,CAClB,EAAA,CACD,EACFA,cAAA,CAAC,WAAW,EAAA,EACV,KAAK,EAAE,SAAS,CAAC,4BAA4B,CAAW,EACxD,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,SAAS,CAClB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,IAAI,CAAC,YAAY,CAClB,EAAA,CACD,CAAA,EAAA,CACI,IACF,CAAA,EAAA,CACD,EAAA,CACL;AAEV;AAEA;AACA,SAAS,WAAW,CAAC,EACnB,KAAK,EACL,KAAK,EACL,SAAS,GAKV,EAAA;IACC,QACEE,gBAACI,WAAK,EAAA,EAAC,GAAG,EAAE,GAAG,aACbN,cAAA,CAACO,eAAO,IAAC,KAAK,EAAC,WAAW,EAAA,QAAA,EAAE,KAAK,GAAW,EAC5CP,cAAA,CAACO,eAAO,EAAA,EAAC,KAAK,EAAC,YAAY,EAAA,QAAA,EAAE,KAAK,GAAW,EAC5C,SAAS,GAAGP,cAAA,CAACO,eAAO,EAAA,EAAC,KAAK,EAAC,WAAW,EAAA,QAAA,EAAE,SAAS,EAAA,CAAW,GAAG,IAAI,CAAA,EAAA,CAC9D;AAEZ;;;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { Box, VStack, Stack } from '@chakra-ui/react';
|
|
4
|
+
import { Input } from '../../../Input/Input.mjs';
|
|
5
|
+
import '../../../Typography/H1.mjs';
|
|
6
|
+
import '../../../Typography/H2.mjs';
|
|
7
|
+
import '../../../Typography/H3.mjs';
|
|
8
|
+
import '../../../Typography/H4.mjs';
|
|
9
|
+
import '../../../Typography/H5.mjs';
|
|
10
|
+
import '../../../Typography/Link.mjs';
|
|
11
|
+
import { Subtext } from '../../../Typography/Subtext.mjs';
|
|
12
|
+
import '../../../Typography/Subtitle.mjs';
|
|
13
|
+
import '../../../Typography/Text.mjs';
|
|
14
|
+
import { useWorkflowTranslate, useWorkflow } from '../../WorkflowContext/WorkflowContext.mjs';
|
|
15
|
+
import { FieldWrapper } from '../FieldWrapper/FieldWrapper.mjs';
|
|
16
|
+
import { endpointTitle, findPort } from './endpointTitle.mjs';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Author-facing line for the port an edge endpoint sits on. A resolved port
|
|
20
|
+
* shows its label (Pass / 분기 1 — the same text LabeledEdge rides on the
|
|
21
|
+
* wire) or nothing when unlabeled (raw ids like `out` are wiring detail). A
|
|
22
|
+
* DANGLING handle — one no current port matches, e.g. after restoring a
|
|
23
|
+
* snapshot whose category was renamed — falls back to the raw id, the only
|
|
24
|
+
* clue left for diagnosing the broken wire.
|
|
25
|
+
*/
|
|
26
|
+
function portLabel(node, def, side, handleId) {
|
|
27
|
+
if (!node || !def || !handleId)
|
|
28
|
+
return undefined;
|
|
29
|
+
const port = findPort(node, def, side, handleId);
|
|
30
|
+
return port ? port.label : handleId;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Built-in edge inspector body rendered in `DrawerShell` when the host does not
|
|
34
|
+
* supply a `renderEdgeDrawer`. Shows an editable label plus read-only endpoint
|
|
35
|
+
* info (source title → target title, and handle ids when present). Label edits
|
|
36
|
+
* flow through `onChange` (an `updateEdge` dispatch) so they are undoable.
|
|
37
|
+
*
|
|
38
|
+
* Deliberately uses only generic primitives (logician-ui + FieldWrapper) so the
|
|
39
|
+
* framework core stays domain-free.
|
|
40
|
+
*/
|
|
41
|
+
function BuiltInEdgeInspector({ edge, onChange, readOnly, }) {
|
|
42
|
+
const translate = useWorkflowTranslate();
|
|
43
|
+
const { graph, getNodeType } = useWorkflow();
|
|
44
|
+
const sourceNode = graph.nodes.find((n) => n.id === edge.source);
|
|
45
|
+
const targetNode = graph.nodes.find((n) => n.id === edge.target);
|
|
46
|
+
const sourceDef = sourceNode ? getNodeType(sourceNode.kind) : undefined;
|
|
47
|
+
const targetDef = targetNode ? getNodeType(targetNode.kind) : undefined;
|
|
48
|
+
const sourceTitle = endpointTitle(sourceNode, sourceDef, edge.source);
|
|
49
|
+
const targetTitle = endpointTitle(targetNode, targetDef, edge.target);
|
|
50
|
+
return (jsx(Box, { px: 4, py: 4, children: jsxs(VStack, { align: "stretch", gap: 4, children: [jsx(FieldWrapper
|
|
51
|
+
// Edges have no field-scoped issues in `issuesByField` (which is keyed
|
|
52
|
+
// by nodeId), so this lookup is intentionally empty — FieldWrapper is
|
|
53
|
+
// reused purely for its label + layout.
|
|
54
|
+
, {
|
|
55
|
+
// Edges have no field-scoped issues in `issuesByField` (which is keyed
|
|
56
|
+
// by nodeId), so this lookup is intentionally empty — FieldWrapper is
|
|
57
|
+
// reused purely for its label + layout.
|
|
58
|
+
nodeId: edge.id, fieldKey: "label", label: translate('workflow_edge_label_label'), children: ({ borderColor }) => (jsx(Input, { borderColor: borderColor, value: edge.label ?? '', disabled: readOnly, placeholder: translate('workflow_edge_label_placeholder'), onChange: (e) => onChange({ ...edge, label: e.target.value || undefined }) })) }), jsxs(Stack, { gap: 1.5, children: [jsx(Subtext, { fontWeight: "semibold", color: "slate.1300", children: translate('workflow_edge_endpoints_heading') }), jsxs(Stack, { gap: 2, children: [jsx(EndpointRow, { label: translate('workflow_edge_source_label'), title: sourceTitle, portLabel: portLabel(sourceNode, sourceDef, 'outputs', edge.sourceHandle) }), jsx(EndpointRow, { label: translate('workflow_edge_target_label'), title: targetTitle, portLabel: portLabel(targetNode, targetDef, 'inputs', edge.targetHandle) })] })] })] }) }));
|
|
59
|
+
}
|
|
60
|
+
/** One read-only endpoint line: role label, resolved node title, optional port label. */
|
|
61
|
+
function EndpointRow({ label, title, portLabel, }) {
|
|
62
|
+
return (jsxs(Stack, { gap: 0.5, children: [jsx(Subtext, { color: "slate.900", children: label }), jsx(Subtext, { color: "slate.1200", children: title }), portLabel ? jsx(Subtext, { color: "slate.700", children: portLabel }) : null] }));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { BuiltInEdgeInspector };
|
|
66
|
+
//# sourceMappingURL=BuiltInEdgeInspector.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BuiltInEdgeInspector.mjs","sources":["../../../../../src/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;AAgBA;;;;;;;AAOG;AACH,SAAS,SAAS,CAChB,IAA2B,EAC3B,GAA4B,EAC5B,IAA0B,EAC1B,QAA4B,EAAA;AAE5B,IAAA,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ;AAAE,QAAA,OAAO,SAAS;AAChD,IAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC;IAChD,OAAO,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,QAAQ;AACrC;AAEA;;;;;;;;AAQG;AACG,SAAU,oBAAoB,CAAC,EACnC,IAAI,EACJ,QAAQ,EACR,QAAQ,GACc,EAAA;AACtB,IAAA,MAAM,SAAS,GAAG,oBAAoB,EAAE;IACxC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE;IAE5C,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,MAAM,CAAC;IAChE,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,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AU,EAAC,KAAK,EAAC,YAAY,EAAA,QAAA,EAC9C,SAAS,CAAC,iCAAiC,CAAW,EAAA,CAC/C,EACVC,KAAC,KAAK,EAAA,EAAC,GAAG,EAAE,CAAC,EAAA,QAAA,EAAA,CACXD,GAAA,CAAC,WAAW,EAAA,EACV,KAAK,EAAE,SAAS,CAAC,4BAA4B,CAAW,EACxD,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,SAAS,CAClB,UAAU,EACV,SAAS,EACT,SAAS,EACT,IAAI,CAAC,YAAY,CAClB,EAAA,CACD,EACFA,GAAA,CAAC,WAAW,EAAA,EACV,KAAK,EAAE,SAAS,CAAC,4BAA4B,CAAW,EACxD,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,SAAS,CAClB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,IAAI,CAAC,YAAY,CAClB,EAAA,CACD,CAAA,EAAA,CACI,IACF,CAAA,EAAA,CACD,EAAA,CACL;AAEV;AAEA;AACA,SAAS,WAAW,CAAC,EACnB,KAAK,EACL,KAAK,EACL,SAAS,GAKV,EAAA;IACC,QACEC,KAAC,KAAK,EAAA,EAAC,GAAG,EAAE,GAAG,aACbD,GAAA,CAAC,OAAO,IAAC,KAAK,EAAC,WAAW,EAAA,QAAA,EAAE,KAAK,GAAW,EAC5CA,GAAA,CAAC,OAAO,EAAA,EAAC,KAAK,EAAC,YAAY,EAAA,QAAA,EAAE,KAAK,GAAW,EAC5C,SAAS,GAAGA,GAAA,CAAC,OAAO,EAAA,EAAC,KAAK,EAAC,WAAW,EAAA,QAAA,EAAE,SAAS,EAAA,CAAW,GAAG,IAAI,CAAA,EAAA,CAC9D;AAEZ;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { GraphNode, HandleDef, NodeTypeDef } from '../../Workflow.types';
|
|
2
|
+
/**
|
|
3
|
+
* Author-facing title for an edge endpoint: the node-type's per-instance title
|
|
4
|
+
* (e.g. an agent's name) when available, else the type label, else the raw id.
|
|
5
|
+
*
|
|
6
|
+
* Shared by the edge inspector (drawer header connection title + endpoint info).
|
|
7
|
+
*/
|
|
8
|
+
export declare function endpointTitle(node: GraphNode | undefined, def: NodeTypeDef | undefined, fallbackId: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve the port an edge endpoint sits on, from the owning node's current
|
|
11
|
+
* handle set. `undefined` when the handle id no longer matches any port — a
|
|
12
|
+
* dangling endpoint (e.g. a restored snapshot referencing a renamed Classify
|
|
13
|
+
* category).
|
|
14
|
+
*
|
|
15
|
+
* Shared by the canvas wire label (LabeledEdge) and the edge inspector so the
|
|
16
|
+
* two surfaces can't drift on how a port is named.
|
|
17
|
+
*/
|
|
18
|
+
export declare function findPort(node: GraphNode | undefined, def: NodeTypeDef | undefined, side: 'inputs' | 'outputs', handleId: string | undefined): HandleDef | undefined;
|
|
19
|
+
//# sourceMappingURL=endpointTitle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpointTitle.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/EdgeInspector/endpointTitle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE9E;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,GAAG,EAAE,WAAW,GAAG,SAAS,EAC5B,UAAU,EAAE,MAAM,GACjB,MAAM,CAMR;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,GAAG,EAAE,WAAW,GAAG,SAAS,EAC5B,IAAI,EAAE,QAAQ,GAAG,SAAS,EAC1B,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,SAAS,GAAG,SAAS,CAGvB"}
|