@mindlogic-ai/logician-ui 3.1.0-alpha.9 → 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/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +20 -4
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.mjs +20 -4
- package/dist/components/SegmentedControl/SegmentedControl.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/dist/theme/colors.d.ts +196 -44
- package/dist/theme/colors.d.ts.map +1 -1
- package/dist/theme/colors.js +184 -22
- package/dist/theme/colors.js.map +1 -1
- package/dist/theme/colors.mjs +184 -22
- package/dist/theme/colors.mjs.map +1 -1
- package/dist/theme/global.d.ts.map +1 -1
- package/dist/theme/global.js +30 -2
- package/dist/theme/global.js.map +1 -1
- package/dist/theme/global.mjs +30 -2
- package/dist/theme/global.mjs.map +1 -1
- 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/SegmentedControl/SegmentedControl.tsx +21 -4
- 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
- package/src/theme/SemanticTokens.mdx +61 -7
- package/src/theme/colors.ts +216 -26
- package/src/theme/global.ts +31 -2
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
4
|
+
import { Box } from '@chakra-ui/react';
|
|
5
|
+
import { getSmoothStepPath, BaseEdge, EdgeLabelRenderer } from '@xyflow/react';
|
|
6
|
+
import { TbX } from '../../../Icon/index.mjs';
|
|
7
|
+
import { IconButton } from '../../../IconButton/IconButton.mjs';
|
|
8
|
+
import '../../../IconButton/IconButton.styles.mjs';
|
|
9
|
+
import { useWorkflow, useWorkflowTranslate } from '../../WorkflowContext/WorkflowContext.mjs';
|
|
10
|
+
import '../../../Input/Input.mjs';
|
|
11
|
+
import '../../../Typography/H1.mjs';
|
|
12
|
+
import '../../../Typography/H2.mjs';
|
|
13
|
+
import '../../../Typography/H3.mjs';
|
|
14
|
+
import '../../../Typography/H4.mjs';
|
|
15
|
+
import '../../../Typography/H5.mjs';
|
|
16
|
+
import '../../../Typography/Link.mjs';
|
|
17
|
+
import '../../../Typography/Subtext.mjs';
|
|
18
|
+
import '../../../Typography/Subtitle.mjs';
|
|
19
|
+
import '../../../Typography/Text.mjs';
|
|
20
|
+
import '../../../Toast/Toaster.mjs';
|
|
21
|
+
import { findPort } from '../EdgeInspector/endpointTitle.mjs';
|
|
22
|
+
import { BranchLabelBadge } from './BranchLabelBadge.mjs';
|
|
23
|
+
import { getEdgeLabelVariant } from './edgeLabelVariant.mjs';
|
|
24
|
+
|
|
25
|
+
// Grace period on pointer-leave so moving from the SVG edge to the portaled
|
|
26
|
+
// label (or the delete button beside it) doesn't flicker the affordance off in
|
|
27
|
+
// the gap between layers.
|
|
28
|
+
const HOVER_LEAVE_GRACE_MS = 80;
|
|
29
|
+
/**
|
|
30
|
+
* Edge with a logician-ui `Badge` label that rides the connection midpoint.
|
|
31
|
+
* Clicking the label selects the edge (opens its inspector); hovering the edge
|
|
32
|
+
* reveals a delete button BESIDE the label (not replacing it), so the label
|
|
33
|
+
* stays clickable. Labels use `EdgeLabelRenderer` rather than React Flow's SVG
|
|
34
|
+
* `labelStyle` so they inherit the design system's Badge styling.
|
|
35
|
+
*/
|
|
36
|
+
function LabeledEdge({ id, source, sourceHandleId, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, label, markerEnd, style, }) {
|
|
37
|
+
const { graph, getNodeType, dispatch, readOnly, editor: { selectedEdgeId }, setSelectedNodeId, setSelectedEdgeId, setDrawerTarget, revealInspector, } = useWorkflow();
|
|
38
|
+
const translate = useWorkflowTranslate();
|
|
39
|
+
const [hovered, setHovered] = useState(false);
|
|
40
|
+
const leaveTimer = useRef(undefined);
|
|
41
|
+
const onEnter = useCallback(() => {
|
|
42
|
+
if (leaveTimer.current)
|
|
43
|
+
clearTimeout(leaveTimer.current);
|
|
44
|
+
setHovered(true);
|
|
45
|
+
}, []);
|
|
46
|
+
const onLeave = useCallback(() => {
|
|
47
|
+
leaveTimer.current = setTimeout(() => setHovered(false), HOVER_LEAVE_GRACE_MS);
|
|
48
|
+
}, []);
|
|
49
|
+
useEffect(() => () => {
|
|
50
|
+
if (leaveTimer.current)
|
|
51
|
+
clearTimeout(leaveTimer.current);
|
|
52
|
+
}, []);
|
|
53
|
+
// Clicking the label selects the edge and opens its inspector — mirrors the
|
|
54
|
+
// canvas `onEdgeClick` so the label is just another way in. Routes through
|
|
55
|
+
// revealInspector so a label click in test mode also restores the parked
|
|
56
|
+
// inspector (the badge stops propagation, so it never reaches onEdgeClick).
|
|
57
|
+
const onSelect = useCallback((e) => {
|
|
58
|
+
e.stopPropagation();
|
|
59
|
+
setSelectedNodeId(null);
|
|
60
|
+
setSelectedEdgeId(id);
|
|
61
|
+
revealInspector({ type: 'edge', id });
|
|
62
|
+
}, [id, setSelectedNodeId, setSelectedEdgeId, revealInspector]);
|
|
63
|
+
const onDelete = useCallback((e) => {
|
|
64
|
+
// Don't let the click fall through to edge/pane selection handlers.
|
|
65
|
+
e.stopPropagation();
|
|
66
|
+
dispatch({ type: 'deleteEdge', id });
|
|
67
|
+
// Mirror the keyboard-delete cleanup so the inspector doesn't linger on a
|
|
68
|
+
// now-removed edge.
|
|
69
|
+
if (selectedEdgeId === id) {
|
|
70
|
+
setSelectedEdgeId(null);
|
|
71
|
+
setDrawerTarget(null);
|
|
72
|
+
}
|
|
73
|
+
}, [dispatch, id, selectedEdgeId, setSelectedEdgeId, setDrawerTarget]);
|
|
74
|
+
const [edgePath, labelX, labelY] = getSmoothStepPath({
|
|
75
|
+
sourceX,
|
|
76
|
+
sourceY,
|
|
77
|
+
sourcePosition,
|
|
78
|
+
targetX,
|
|
79
|
+
targetY,
|
|
80
|
+
targetPosition,
|
|
81
|
+
});
|
|
82
|
+
// The label's text: an explicit edge label wins; otherwise fall back to the
|
|
83
|
+
// source handle's label, so semantic exits (Pass / Fail / branch / Else) ride
|
|
84
|
+
// on the wire without the author having to name every edge.
|
|
85
|
+
const variant = getEdgeLabelVariant(sourceHandleId);
|
|
86
|
+
// Resolve the source handle's label once (not per render): React Flow
|
|
87
|
+
// re-renders edges constantly during pan/zoom, and `handles()` rebuilds its
|
|
88
|
+
// outputs array each call.
|
|
89
|
+
const handleLabel = useMemo(() => {
|
|
90
|
+
const sourceNode = graph.nodes.find((n) => n.id === source);
|
|
91
|
+
return findPort(sourceNode, sourceNode ? getNodeType(sourceNode.kind) : undefined, 'outputs', sourceHandleId ?? undefined)?.label;
|
|
92
|
+
}, [graph.nodes, source, sourceHandleId, getNodeType]);
|
|
93
|
+
const displayLabel = label ?? handleLabel;
|
|
94
|
+
// Delete shows only while the name badge itself is hovered (when editable) —
|
|
95
|
+
// not anywhere on the wire — so it's a deliberate, low-noise affordance. The
|
|
96
|
+
// edge inspector's delete button (see DrawerShell) covers labelless edges and
|
|
97
|
+
// anyone who'd rather delete from the sidebar.
|
|
98
|
+
const showDelete = hovered && !readOnly && Boolean(displayLabel);
|
|
99
|
+
const wrapperTransform = `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)`;
|
|
100
|
+
return (jsxs(Fragment, { children: [jsx(BaseEdge, { id: id, path: edgePath, markerEnd: markerEnd, style: style }), showDelete || displayLabel ? (jsx(EdgeLabelRenderer, { children: jsxs(Box, { position: "absolute", transform: wrapperTransform, pointerEvents: "all", display: "inline-flex", onMouseEnter: onEnter, onMouseLeave: onLeave, children: [displayLabel ? (jsx(BranchLabelBadge, { variant: variant, onClick: onSelect, children: displayLabel })) : null, showDelete ? (jsx(Box, { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)", pl: 1, children: jsx(IconButton, { "aria-label": translate('workflow_edge_delete'), onClick: onDelete, size: "xs", variant: "outline", colorPalette: "danger", bg: "bg.surface", borderRadius: "full", children: jsx(TbX, { boxSize: "xs" }) }) })) : null] }) })) : null] }));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export { LabeledEdge };
|
|
104
|
+
//# sourceMappingURL=LabeledEdge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LabeledEdge.mjs","sources":["../../../../../src/components/Workflow/canvas/Canvas/LabeledEdge.tsx"],"sourcesContent":[null],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA;AACA;AACA;AACA,MAAM,oBAAoB,GAAG,EAAE;AAE/B;;;;;;AAMG;AACG,SAAU,WAAW,CAAC,EAC1B,EAAE,EACF,MAAM,EACN,cAAc,EACd,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,KAAK,EACL,SAAS,EACT,KAAK,GACK,EAAA;IACV,MAAM,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,MAAM,EAAE,EAAE,cAAc,EAAE,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,GAChB,GAAG,WAAW,EAAE;AACjB,IAAA,MAAM,SAAS,GAAG,oBAAoB,EAAE;IAExC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AAC7C,IAAA,MAAM,UAAU,GAAG,MAAM,CACvB,SAAS,CACV;AACD,IAAA,MAAM,OAAO,GAAG,WAAW,CAAC,MAAK;QAC/B,IAAI,UAAU,CAAC,OAAO;AAAE,YAAA,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC;QACxD,UAAU,CAAC,IAAI,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC;AACN,IAAA,MAAM,OAAO,GAAG,WAAW,CAAC,MAAK;AAC/B,QAAA,UAAU,CAA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C,kBAAkB,EAC5B,EAAE,EAAE,CAAC,EAAA,QAAA,EAELA,IAAC,UAAU,EAAA,EAAA,YAAA,EACG,SAAS,CAAC,sBAAsB,CAAW,EACvD,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,SAAS,EACjB,YAAY,EAAC,QAAQ,EACrB,EAAE,EAAC,YAAY,EACf,YAAY,EAAC,MAAM,EAAA,QAAA,EAEnBA,IAAC,GAAG,EAAA,EAAC,OAAO,EAAC,IAAI,EAAA,CAAG,EAAA,CACT,GACT,IACJ,IAAI,CAAA,EAAA,CACJ,EAAA,CACY,IAClB,IAAI,CAAA,EAAA,CACP;AAEP;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pill variant for an edge label, derived from the SOURCE handle it leaves.
|
|
3
|
+
*
|
|
4
|
+
* Guardrail has two exits — `pass` / `fail` — a binary safety outcome, so they
|
|
5
|
+
* read as semantic green / red. Every routing exit — If-Else branches, the
|
|
6
|
+
* If-Else `else` fallback, and Classify categories (`branch_*` / `cat_*` /
|
|
7
|
+
* `else`) — plus any free-text label reads as a neutral badge, so the branch
|
|
8
|
+
* names all look alike. `else` stays its own variant in case it ever needs
|
|
9
|
+
* distinguishing, but currently renders neutral like the other keys.
|
|
10
|
+
*/
|
|
11
|
+
export type EdgeLabelVariant = 'pass' | 'fail' | 'else' | 'key' | 'default';
|
|
12
|
+
export declare const getEdgeLabelVariant: (sourceHandle?: string | null) => EdgeLabelVariant;
|
|
13
|
+
//# sourceMappingURL=edgeLabelVariant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edgeLabelVariant.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/Canvas/edgeLabelVariant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;AAE5E,eAAO,MAAM,mBAAmB,GAC9B,eAAe,MAAM,GAAG,IAAI,KAC3B,gBAQF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const getEdgeLabelVariant = (sourceHandle) => {
|
|
5
|
+
if (sourceHandle === 'pass')
|
|
6
|
+
return 'pass';
|
|
7
|
+
if (sourceHandle === 'fail')
|
|
8
|
+
return 'fail';
|
|
9
|
+
if (sourceHandle === 'else')
|
|
10
|
+
return 'else';
|
|
11
|
+
if (sourceHandle?.startsWith('branch_') || sourceHandle?.startsWith('cat_')) {
|
|
12
|
+
return 'key';
|
|
13
|
+
}
|
|
14
|
+
return 'default';
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.getEdgeLabelVariant = getEdgeLabelVariant;
|
|
18
|
+
//# sourceMappingURL=edgeLabelVariant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edgeLabelVariant.js","sources":["../../../../../src/components/Workflow/canvas/Canvas/edgeLabelVariant.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAYO,MAAM,mBAAmB,GAAG,CACjC,YAA4B,KACR;IACpB,IAAI,YAAY,KAAK,MAAM;AAAE,QAAA,OAAO,MAAM;IAC1C,IAAI,YAAY,KAAK,MAAM;AAAE,QAAA,OAAO,MAAM;IAC1C,IAAI,YAAY,KAAK,MAAM;AAAE,QAAA,OAAO,MAAM;AAC1C,IAAA,IAAI,YAAY,EAAE,UAAU,CAAC,SAAS,CAAC,IAAI,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE;AAC3E,QAAA,OAAO,KAAK;IACd;AACA,IAAA,OAAO,SAAS;AAClB;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const getEdgeLabelVariant = (sourceHandle) => {
|
|
3
|
+
if (sourceHandle === 'pass')
|
|
4
|
+
return 'pass';
|
|
5
|
+
if (sourceHandle === 'fail')
|
|
6
|
+
return 'fail';
|
|
7
|
+
if (sourceHandle === 'else')
|
|
8
|
+
return 'else';
|
|
9
|
+
if (sourceHandle?.startsWith('branch_') || sourceHandle?.startsWith('cat_')) {
|
|
10
|
+
return 'key';
|
|
11
|
+
}
|
|
12
|
+
return 'default';
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { getEdgeLabelVariant };
|
|
16
|
+
//# sourceMappingURL=edgeLabelVariant.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edgeLabelVariant.mjs","sources":["../../../../../src/components/Workflow/canvas/Canvas/edgeLabelVariant.ts"],"sourcesContent":[null],"names":[],"mappings":";AAYO,MAAM,mBAAmB,GAAG,CACjC,YAA4B,KACR;IACpB,IAAI,YAAY,KAAK,MAAM;AAAE,QAAA,OAAO,MAAM;IAC1C,IAAI,YAAY,KAAK,MAAM;AAAE,QAAA,OAAO,MAAM;IAC1C,IAAI,YAAY,KAAK,MAAM;AAAE,QAAA,OAAO,MAAM;AAC1C,IAAA,IAAI,YAAY,EAAE,UAAU,CAAC,SAAS,CAAC,IAAI,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE;AAC3E,QAAA,OAAO,KAAK;IACd;AACA,IAAA,OAAO,SAAS;AAClB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/Canvas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { type StackProps } from '@chakra-ui/react';
|
|
3
|
+
export type CollapsibleSectionProps = StackProps & {
|
|
4
|
+
label: string;
|
|
5
|
+
/** Optional initial expanded state. Defaults to true. */
|
|
6
|
+
defaultExpanded?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* When the section is collapsed AND `hasError` is true, the chevron is
|
|
9
|
+
* replaced by a danger-tinted alert glyph so users don't miss errors
|
|
10
|
+
* hidden behind a collapsed header.
|
|
11
|
+
*/
|
|
12
|
+
hasError?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Slot for a trailing icon-button in the header row (e.g. an info
|
|
15
|
+
* popover trigger). Click handler on the action is responsible for
|
|
16
|
+
* stopping propagation; otherwise the section also toggles.
|
|
17
|
+
*/
|
|
18
|
+
headerAction?: ReactNode;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Vertical accordion section used in the node drawer. Each section header
|
|
23
|
+
* is the entire toggle target — the chevron is decorative. Collapse state
|
|
24
|
+
* is session-only per mounted instance; switching to a different node
|
|
25
|
+
* remounts and resets to defaults. The component is style-agnostic about
|
|
26
|
+
* dividers — parents control border/spacing via the spread Stack props
|
|
27
|
+
* (e.g. a `_notFirst` selector on the wrapping Stack).
|
|
28
|
+
*/
|
|
29
|
+
export declare function CollapsibleSection({ label, defaultExpanded, hasError, headerAction, children, ...rest }: CollapsibleSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=CollapsibleSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapsibleSection.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAmB,MAAM,OAAO,CAAC;AACnD,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKvE,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,eAAsB,EACtB,QAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,uBAAuB,2CAqDzB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 index = require('../../../Icon/index.js');
|
|
8
|
+
require('../../../Typography/H1.js');
|
|
9
|
+
require('../../../Typography/H2.js');
|
|
10
|
+
require('../../../Typography/H3.js');
|
|
11
|
+
require('../../../Typography/H4.js');
|
|
12
|
+
require('../../../Typography/H5.js');
|
|
13
|
+
require('../../../Typography/Link.js');
|
|
14
|
+
var Subtext = require('../../../Typography/Subtext.js');
|
|
15
|
+
require('../../../Typography/Subtitle.js');
|
|
16
|
+
require('../../../Typography/Text.js');
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Vertical accordion section used in the node drawer. Each section header
|
|
20
|
+
* is the entire toggle target — the chevron is decorative. Collapse state
|
|
21
|
+
* is session-only per mounted instance; switching to a different node
|
|
22
|
+
* remounts and resets to defaults. The component is style-agnostic about
|
|
23
|
+
* dividers — parents control border/spacing via the spread Stack props
|
|
24
|
+
* (e.g. a `_notFirst` selector on the wrapping Stack).
|
|
25
|
+
*/
|
|
26
|
+
function CollapsibleSection({ label, defaultExpanded = true, hasError = false, headerAction, children, ...rest }) {
|
|
27
|
+
const [expanded, setExpanded] = React.useState(defaultExpanded);
|
|
28
|
+
const contentId = React.useId();
|
|
29
|
+
const showErrorGlyph = !expanded && hasError;
|
|
30
|
+
return (jsxRuntime.jsxs(react.Stack, { gap: 0, ...rest, children: [jsxRuntime.jsxs(react.Box, { as: "button", "aria-expanded": expanded, "aria-controls": contentId, onClick: () => setExpanded((e) => !e), display: "flex", justifyContent: "space-between", alignItems: "center", w: "100%", gap: 2, px: 3.5, py: 3.5, cursor: "pointer", bg: "transparent", border: "none", textAlign: "left", _hover: { bg: 'slate.50' }, children: [jsxRuntime.jsx(Subtext.Subtext, { fontWeight: "bold", color: "slate.900", textTransform: "uppercase", letterSpacing: "wider", children: label }), jsxRuntime.jsxs(react.HStack, { gap: 1.5, onClick: (e) => e.stopPropagation(), children: [headerAction, jsxRuntime.jsx(react.Box, { color: "slate.900", display: "flex", alignItems: "center", children: showErrorGlyph ? (jsxRuntime.jsx(index.TbAlertCircle, { boxSize: "xs", color: "danger.main" })) : expanded ? (jsxRuntime.jsx(index.TbChevronUp, { boxSize: "xs" })) : (jsxRuntime.jsx(index.TbChevronDown, { boxSize: "xs" })) })] })] }), expanded ? (jsxRuntime.jsx(react.Box, { id: contentId, px: 3.5, pb: 4, pt: 1, children: children })) : null] }));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
exports.CollapsibleSection = CollapsibleSection;
|
|
34
|
+
//# sourceMappingURL=CollapsibleSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapsibleSection.js","sources":["../../../../../src/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.tsx"],"sourcesContent":[null],"names":["useState","useId","_jsxs","Stack","Box","_jsx","Subtext","HStack","TbAlertCircle","TbChevronUp","TbChevronDown"],"mappings":";;;;;;;;;;;;;;;;;AA2BA;;;;;;;AAOG;AACG,SAAU,kBAAkB,CAAC,EACjC,KAAK,EACL,eAAe,GAAG,IAAI,EACtB,QAAQ,GAAG,KAAK,EAChB,YAAY,EACZ,QAAQ,EACR,GAAG,IAAI,EACiB,EAAA;IACxB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAGA,cAAQ,CAAC,eAAe,CAAC;AACzD,IAAA,MAAM,SAAS,GA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EAAC,OAAO,EAAC,IAAI,EAAA,CAAG,KAE5BJ,cAAA,CAACK,mBAAa,IAAC,OAAO,EAAC,IAAI,EAAA,CAAG,CAC/B,EAAA,CACG,CAAA,EAAA,CACC,CAAA,EAAA,CACL,EACL,QAAQ,IACPL,eAACD,SAAG,EAAA,EAAC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAA,QAAA,EACtC,QAAQ,EAAA,CACL,IACJ,IAAI,CAAA,EAAA,CACF;AAEZ;;;;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useId } from 'react';
|
|
4
|
+
import { Stack, Box, HStack } from '@chakra-ui/react';
|
|
5
|
+
import { TbAlertCircle, TbChevronUp, TbChevronDown } from '../../../Icon/index.mjs';
|
|
6
|
+
import '../../../Typography/H1.mjs';
|
|
7
|
+
import '../../../Typography/H2.mjs';
|
|
8
|
+
import '../../../Typography/H3.mjs';
|
|
9
|
+
import '../../../Typography/H4.mjs';
|
|
10
|
+
import '../../../Typography/H5.mjs';
|
|
11
|
+
import '../../../Typography/Link.mjs';
|
|
12
|
+
import { Subtext } from '../../../Typography/Subtext.mjs';
|
|
13
|
+
import '../../../Typography/Subtitle.mjs';
|
|
14
|
+
import '../../../Typography/Text.mjs';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Vertical accordion section used in the node drawer. Each section header
|
|
18
|
+
* is the entire toggle target — the chevron is decorative. Collapse state
|
|
19
|
+
* is session-only per mounted instance; switching to a different node
|
|
20
|
+
* remounts and resets to defaults. The component is style-agnostic about
|
|
21
|
+
* dividers — parents control border/spacing via the spread Stack props
|
|
22
|
+
* (e.g. a `_notFirst` selector on the wrapping Stack).
|
|
23
|
+
*/
|
|
24
|
+
function CollapsibleSection({ label, defaultExpanded = true, hasError = false, headerAction, children, ...rest }) {
|
|
25
|
+
const [expanded, setExpanded] = useState(defaultExpanded);
|
|
26
|
+
const contentId = useId();
|
|
27
|
+
const showErrorGlyph = !expanded && hasError;
|
|
28
|
+
return (jsxs(Stack, { gap: 0, ...rest, children: [jsxs(Box, { as: "button", "aria-expanded": expanded, "aria-controls": contentId, onClick: () => setExpanded((e) => !e), display: "flex", justifyContent: "space-between", alignItems: "center", w: "100%", gap: 2, px: 3.5, py: 3.5, cursor: "pointer", bg: "transparent", border: "none", textAlign: "left", _hover: { bg: 'slate.50' }, children: [jsx(Subtext, { fontWeight: "bold", color: "slate.900", textTransform: "uppercase", letterSpacing: "wider", children: label }), jsxs(HStack, { gap: 1.5, onClick: (e) => e.stopPropagation(), children: [headerAction, jsx(Box, { color: "slate.900", display: "flex", alignItems: "center", children: showErrorGlyph ? (jsx(TbAlertCircle, { boxSize: "xs", color: "danger.main" })) : expanded ? (jsx(TbChevronUp, { boxSize: "xs" })) : (jsx(TbChevronDown, { boxSize: "xs" })) })] })] }), expanded ? (jsx(Box, { id: contentId, px: 3.5, pb: 4, pt: 1, children: children })) : null] }));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { CollapsibleSection };
|
|
32
|
+
//# sourceMappingURL=CollapsibleSection.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapsibleSection.mjs","sources":["../../../../../src/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;AA2BA;;;;;;;AAOG;AACG,SAAU,kBAAkB,CAAC,EACjC,KAAK,EACL,eAAe,GAAG,IAAI,EACtB,QAAQ,GAAG,KAAK,EAChB,YAAY,EACZ,QAAQ,EACR,GAAG,IAAI,EACiB,EAAA;IACxB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,eAAe,CAAC;AACzD,IAAA,MAAM,SAAS,GAAG,KAAK,EAA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IAAI,EAAA,CAAG,KAE5BA,GAAA,CAAC,aAAa,IAAC,OAAO,EAAC,IAAI,EAAA,CAAG,CAC/B,EAAA,CACG,CAAA,EAAA,CACC,CAAA,EAAA,CACL,EACL,QAAQ,IACPA,IAAC,GAAG,EAAA,EAAC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAA,QAAA,EACtC,QAAQ,EAAA,CACL,IACJ,IAAI,CAAA,EAAA,CACF;AAEZ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/CollapsibleSection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
interface DrawerHeaderProps {
|
|
3
|
+
/**
|
|
4
|
+
* Title text shown semibold on the left. Node drawers render an icon
|
|
5
|
+
* cluster ahead of it via `icon`; edge drawers render only the text.
|
|
6
|
+
*/
|
|
7
|
+
title: string;
|
|
8
|
+
/**
|
|
9
|
+
* Muted text trailing the title. Node drawers pass the node-type label here
|
|
10
|
+
* when the title is an instance name (e.g. "고객 응대 · Agent") so the kind
|
|
11
|
+
* stays identifiable next to author-chosen names.
|
|
12
|
+
*/
|
|
13
|
+
subtitle?: string;
|
|
14
|
+
/** Optional leading icon cluster (node drawers pass the node-type icon). */
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Clamp the title to a single line (edge connection titles can be long).
|
|
18
|
+
* Node labels are short and render unclamped.
|
|
19
|
+
*/
|
|
20
|
+
lineClampTitle?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Overflow-menu contents (pre-built `Menu.Item` nodes from the caller).
|
|
23
|
+
* When omitted, no overflow menu renders at all — this preserves the
|
|
24
|
+
* pinned-node behavior of showing only the close button.
|
|
25
|
+
*/
|
|
26
|
+
menuItems?: ReactNode;
|
|
27
|
+
/** Close button handler. */
|
|
28
|
+
onClose: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Shared inspector-drawer header: a fixed-height bar with a left title cluster
|
|
32
|
+
* and a right action cluster (optional overflow `Menu` + a close button). Stays
|
|
33
|
+
* domain-free — each drawer passes its own title bits and `Menu.Item`s.
|
|
34
|
+
*/
|
|
35
|
+
export declare function DrawerHeader({ title, subtitle, icon, lineClampTitle, menuItems, onClose, }: DrawerHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=DrawerHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/DrawerShell/DrawerHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvC,UAAU,iBAAiB;IACzB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,cAAc,EACd,SAAS,EACT,OAAO,GACR,EAAE,iBAAiB,2CAkDnB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('@chakra-ui/react');
|
|
6
|
+
var index = require('../../../Icon/index.js');
|
|
7
|
+
var IconButton = require('../../../IconButton/IconButton.js');
|
|
8
|
+
require('../../../IconButton/IconButton.styles.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
|
+
var Subtext = require('../../../Typography/Subtext.js');
|
|
18
|
+
require('../../../Typography/Subtitle.js');
|
|
19
|
+
var Text = require('../../../Typography/Text.js');
|
|
20
|
+
var WorkflowContext = require('../../WorkflowContext/WorkflowContext.js');
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Shared inspector-drawer header: a fixed-height bar with a left title cluster
|
|
24
|
+
* and a right action cluster (optional overflow `Menu` + a close button). Stays
|
|
25
|
+
* domain-free — each drawer passes its own title bits and `Menu.Item`s.
|
|
26
|
+
*/
|
|
27
|
+
function DrawerHeader({ title, subtitle, icon, lineClampTitle, menuItems, onClose, }) {
|
|
28
|
+
const translate = WorkflowContext.useWorkflowTranslate();
|
|
29
|
+
return (jsxRuntime.jsxs(react.HStack, { justify: "space-between", align: "center", px: 4, py: 3, borderBottom: "1px solid", borderColor: "slate.200", children: [jsxRuntime.jsxs(react.HStack, { gap: 2, minW: 0, flex: "1", children: [icon, jsxRuntime.jsx(Text.Text, { fontWeight: "semibold", lineClamp: lineClampTitle ? 1 : undefined, children: title }), subtitle ? (jsxRuntime.jsx(Subtext.Subtext, { color: "slate.700", flexShrink: 0, children: subtitle })) : null] }), jsxRuntime.jsxs(react.HStack, { gap: 0.5, children: [menuItems ? (jsxRuntime.jsxs(Menu.Menu, { children: [jsxRuntime.jsx(Menu.Menu.Trigger, { asChild: true, children: jsxRuntime.jsx(IconButton.IconButton, { "aria-label": translate('workflow_node_overflow_label'), size: "xs", variant: "ghost", colorPalette: "neutral", children: jsxRuntime.jsx(index.RxDotsHorizontal, { boxSize: "xs" }) }) }), jsxRuntime.jsx(Menu.Menu.List, { zIndex: "popover", children: menuItems })] })) : null, jsxRuntime.jsx(IconButton.IconButton, { "aria-label": translate('workflow_node_close'), size: "xs", variant: "ghost", colorPalette: "neutral", onClick: onClose, children: jsxRuntime.jsx(index.TbX, { boxSize: "xs", "aria-hidden": true }) })] })] }));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
exports.DrawerHeader = DrawerHeader;
|
|
33
|
+
//# sourceMappingURL=DrawerHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerHeader.js","sources":["../../../../../src/components/Workflow/canvas/DrawerShell/DrawerHeader.tsx"],"sourcesContent":[null],"names":["useWorkflowTranslate","_jsxs","HStack","_jsx","Text","Subtext","Menu","IconButton","RxDotsHorizontal","TbX"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyCA;;;;AAIG;AACG,SAAU,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,cAAc,EACd,SAAS,EACT,OAAO,GACW,EAAA;AAClB,IAAA,MAAM,SAAS,GAAGA,oCAAoB,EAAE;IACxC,QACEC,gBAACC,YAAM,EAAA,EACL,OAAO,EAAC,eAAe,EACvB,KAAK,EAAC,QAAQ,EACd,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,CAAC,EACL,YAAY,EAAC,WAAW,EACxB,WAAW,EAAC,WAAW,EAAA,QAAA,EAAA,CAEvBD,eAAA,CAACC,YAAM,EAAA,EAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAC,GAAG,EAAA,QAAA,EAAA,CAC9B,IAAI,EACLC,cAAA,CAACC,SAAI,EAAA,EAAC,UAAU,EAAC,UAAU,EAAC,SAAS,EAAE,cAAc,GAAG,CAAC,GAAG,SAAS,YAClE,KAAK,EAAA,CACD,EACN,QAAQ,IACPD,cAAA,CAACE,eAAO,EAAA,EAAC,KAAK,EAAC,WAAW,EAAC,UAAU,EAAE,CAAC,YACrC,QAAQ,EAAA,CACD,IACR,IAAI,CAAA,EAAA,CACD,EACTJ,eAAA,CAACC,YAAM,EAAA,EAAC,GAAG,EAAE,GAAG,aACb,SAAS,IACRD,gBAACK,SAAI,EAAA,EAAA,QAAA,EAAA,CACHH,eAACG,SAAI,CAAC,OAAO,EAAA,EAAC,OAAO,kBACnBH,cAAA,CAACI,qBAAU,kBACG,SAAS,CAAC,8BAA8B,CAAW,EAC/D,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,OAAO,EACf,YAAY,EAAC,SAAS,EAAA,QAAA,EAEtBJ,cAAA,CAACK,sBAAgB,EAAA,EAAC,OAAO,EAAC,IAAI,EAAA,CAAG,GACtB,EAAA,CACA,EACfL,cAAA,CAACG,SAAI,CAAC,IAAI,IAAC,MAAM,EAAC,SAAS,EAAA,QAAA,EAAE,SAAS,GAAa,CAAA,EAAA,CAC9C,IACL,IAAI,EACRH,cAAA,CAACI,qBAAU,EAAA,EAAA,YAAA,EACG,SAAS,CAAC,qBAAqB,CAAW,EACtD,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,OAAO,EACf,YAAY,EAAC,SAAS,EACtB,OAAO,EAAE,OAAO,EAAA,QAAA,EAEhBJ,eAACM,SAAG,EAAA,EAAC,OAAO,EAAC,IAAI,wBAAe,EAAA,CACrB,CAAA,EAAA,CACN,CAAA,EAAA,CACF;AAEb;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { HStack } from '@chakra-ui/react';
|
|
4
|
+
import { RxDotsHorizontal, TbX } from '../../../Icon/index.mjs';
|
|
5
|
+
import { IconButton } from '../../../IconButton/IconButton.mjs';
|
|
6
|
+
import '../../../IconButton/IconButton.styles.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 { Subtext } from '../../../Typography/Subtext.mjs';
|
|
16
|
+
import '../../../Typography/Subtitle.mjs';
|
|
17
|
+
import { Text } from '../../../Typography/Text.mjs';
|
|
18
|
+
import { useWorkflowTranslate } from '../../WorkflowContext/WorkflowContext.mjs';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Shared inspector-drawer header: a fixed-height bar with a left title cluster
|
|
22
|
+
* and a right action cluster (optional overflow `Menu` + a close button). Stays
|
|
23
|
+
* domain-free — each drawer passes its own title bits and `Menu.Item`s.
|
|
24
|
+
*/
|
|
25
|
+
function DrawerHeader({ title, subtitle, icon, lineClampTitle, menuItems, onClose, }) {
|
|
26
|
+
const translate = useWorkflowTranslate();
|
|
27
|
+
return (jsxs(HStack, { justify: "space-between", align: "center", px: 4, py: 3, borderBottom: "1px solid", borderColor: "slate.200", children: [jsxs(HStack, { gap: 2, minW: 0, flex: "1", children: [icon, jsx(Text, { fontWeight: "semibold", lineClamp: lineClampTitle ? 1 : undefined, children: title }), subtitle ? (jsx(Subtext, { color: "slate.700", flexShrink: 0, children: subtitle })) : null] }), jsxs(HStack, { gap: 0.5, children: [menuItems ? (jsxs(Menu, { children: [jsx(Menu.Trigger, { asChild: true, children: jsx(IconButton, { "aria-label": translate('workflow_node_overflow_label'), size: "xs", variant: "ghost", colorPalette: "neutral", children: jsx(RxDotsHorizontal, { boxSize: "xs" }) }) }), jsx(Menu.List, { zIndex: "popover", children: menuItems })] })) : null, jsx(IconButton, { "aria-label": translate('workflow_node_close'), size: "xs", variant: "ghost", colorPalette: "neutral", onClick: onClose, children: jsx(TbX, { boxSize: "xs", "aria-hidden": true }) })] })] }));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { DrawerHeader };
|
|
31
|
+
//# sourceMappingURL=DrawerHeader.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerHeader.mjs","sources":["../../../../../src/components/Workflow/canvas/DrawerShell/DrawerHeader.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;AAyCA;;;;AAIG;AACG,SAAU,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,cAAc,EACd,SAAS,EACT,OAAO,GACW,EAAA;AAClB,IAAA,MAAM,SAAS,GAAG,oBAAoB,EAAE;IACxC,QACEA,KAAC,MAAM,EAAA,EACL,OAAO,EAAC,eAAe,EACvB,KAAK,EAAC,QAAQ,EACd,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,CAAC,EACL,YAAY,EAAC,WAAW,EACxB,WAAW,EAAC,WAAW,EAAA,QAAA,EAAA,CAEvBA,IAAA,CAAC,MAAM,EAAA,EAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAC,GAAG,EAAA,QAAA,EAAA,CAC9B,IAAI,EACLC,GAAA,CAAC,IAAI,EAAA,EAAC,UAAU,EAAC,UAAU,EAAC,SAAS,EAAE,cAAc,GAAG,CAAC,GAAG,SAAS,YAClE,KAAK,EAAA,CACD,EACN,QAAQ,IACPA,GAAA,CAAC,OAAO,EAAA,EAAC,KAAK,EAAC,WAAW,EAAC,UAAU,EAAE,CAAC,YACrC,QAAQ,EAAA,CACD,IACR,IAAI,CAAA,EAAA,CACD,EACTD,IAAA,CAAC,MAAM,EAAA,EAAC,GAAG,EAAE,GAAG,aACb,SAAS,IACRA,KAAC,IAAI,EAAA,EAAA,QAAA,EAAA,CACHC,IAAC,IAAI,CAAC,OAAO,EAAA,EAAC,OAAO,kBACnBA,GAAA,CAAC,UAAU,kBACG,SAAS,CAAC,8BAA8B,CAAW,EAC/D,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,OAAO,EACf,YAAY,EAAC,SAAS,EAAA,QAAA,EAEtBA,GAAA,CAAC,gBAAgB,EAAA,EAAC,OAAO,EAAC,IAAI,EAAA,CAAG,GACtB,EAAA,CACA,EACfA,GAAA,CAAC,IAAI,CAAC,IAAI,IAAC,MAAM,EAAC,SAAS,EAAA,QAAA,EAAE,SAAS,GAAa,CAAA,EAAA,CAC9C,IACL,IAAI,EACRA,GAAA,CAAC,UAAU,EAAA,EAAA,YAAA,EACG,SAAS,CAAC,qBAAqB,CAAW,EACtD,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,OAAO,EACf,YAAY,EAAC,SAAS,EACtB,OAAO,EAAE,OAAO,EAAA,QAAA,EAEhBA,IAAC,GAAG,EAAA,EAAC,OAAO,EAAC,IAAI,wBAAe,EAAA,CACrB,CAAA,EAAA,CACN,CAAA,EAAA,CACF;AAEb;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Issue } from '../../Workflow.types';
|
|
2
|
+
interface DrawerIssuesProps {
|
|
3
|
+
/**
|
|
4
|
+
* Issues to surface in the drawer header band, already filtered by the
|
|
5
|
+
* caller (node drawers pass only orphan / non-field-scoped issues; edge
|
|
6
|
+
* drawers pass all of theirs). Returns null when empty.
|
|
7
|
+
*/
|
|
8
|
+
issues: Issue[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Header issue band shared by node and edge drawers: groups the given issues
|
|
12
|
+
* by severity and renders one tinted `IssueCallout` per non-empty bucket.
|
|
13
|
+
*/
|
|
14
|
+
export declare function DrawerIssues({ issues }: DrawerIssuesProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=DrawerIssues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerIssues.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/DrawerShell/DrawerIssues.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,KAAK,EAAiB,MAAM,sBAAsB,CAAC;AAKjE,UAAU,iBAAiB;IACzB;;;;OAIG;IACH,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB;AAsDD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,2CAmCzD"}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 index = require('../../../Icon/index.js');
|
|
8
|
+
require('../../../Typography/H1.js');
|
|
9
|
+
require('../../../Typography/H2.js');
|
|
10
|
+
require('../../../Typography/H3.js');
|
|
11
|
+
require('../../../Typography/H4.js');
|
|
12
|
+
require('../../../Typography/H5.js');
|
|
13
|
+
require('../../../Typography/Link.js');
|
|
14
|
+
var Subtext = require('../../../Typography/Subtext.js');
|
|
15
|
+
require('../../../Typography/Subtitle.js');
|
|
16
|
+
require('../../../Typography/Text.js');
|
|
17
|
+
var useWorkflowIssueMessage = require('../../useWorkflowIssueMessage.js');
|
|
18
|
+
var WorkflowContext = require('../../WorkflowContext/WorkflowContext.js');
|
|
19
|
+
var issueSeverity = require('../issueSeverity.js');
|
|
20
|
+
var SeverityDot = require('../SeverityDot/SeverityDot.js');
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* One severity bucket of node/edge issues, rendered as a tinted callout: a
|
|
24
|
+
* severity icon + a short heading ("Fixes needed" / "Worth checking") on top,
|
|
25
|
+
* then the messages as a bulleted list beneath. Severities never mix in a box
|
|
26
|
+
* so the icon, heading and tint stay meaningful.
|
|
27
|
+
*
|
|
28
|
+
* Markers use the severity's `dark` tone via `SeverityDot` — the CSS list
|
|
29
|
+
* `::marker` defaults to a muted grey that reads as an odd low-contrast dot on
|
|
30
|
+
* the tinted background.
|
|
31
|
+
*/
|
|
32
|
+
function IssueCallout({ severity, title, issues, resolveMessage, }) {
|
|
33
|
+
const { bg, color, borderColor } = issueSeverity.severityCalloutStyle(severity);
|
|
34
|
+
const Icon = severity === 'error' ? index.TbAlertCircle : index.AlertTriangle;
|
|
35
|
+
return (jsxRuntime.jsx(react.Box, { border: "1px solid", borderColor: borderColor, borderRadius: "md", bg: bg, px: 3, py: 2, children: jsxRuntime.jsxs(react.VStack, { align: "stretch", gap: 1.5, children: [jsxRuntime.jsxs(react.HStack, { gap: 1.5, color: color, children: [jsxRuntime.jsx(Icon, { boxSize: "xs" }), jsxRuntime.jsx(Subtext.Subtext, { color: color, fontWeight: "bold", children: title })] }), jsxRuntime.jsx(react.VStack, { align: "stretch", gap: 0.5, ps: 1, children: issues.map((issue, i) => (jsxRuntime.jsxs(react.HStack, { gap: 2, align: "flex-start", children: [jsxRuntime.jsx(SeverityDot.SeverityDot, { severity: severity, tone: "dark", mt: 1.5 }), jsxRuntime.jsx(Subtext.Subtext, { color: color, children: resolveMessage(issue) })] }, `${issue.code}_${i}`))) })] }) }));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Header issue band shared by node and edge drawers: groups the given issues
|
|
39
|
+
* by severity and renders one tinted `IssueCallout` per non-empty bucket.
|
|
40
|
+
*/
|
|
41
|
+
function DrawerIssues({ issues }) {
|
|
42
|
+
const resolveIssueMessage = useWorkflowIssueMessage.useWorkflowIssueMessage();
|
|
43
|
+
const translate = WorkflowContext.useWorkflowTranslate();
|
|
44
|
+
const grouped = React.useMemo(() => ({
|
|
45
|
+
errors: issues.filter((i) => i.severity === 'error'),
|
|
46
|
+
warnings: issues.filter((i) => i.severity === 'warning'),
|
|
47
|
+
}), [issues]);
|
|
48
|
+
if (issues.length === 0)
|
|
49
|
+
return null;
|
|
50
|
+
return (jsxRuntime.jsx(react.Box, { px: 4, py: 3, children: jsxRuntime.jsxs(react.VStack, { align: "stretch", gap: 2, children: [grouped.errors.length > 0 ? (jsxRuntime.jsx(IssueCallout, { severity: "error", title: translate('workflow_drawer_issues_error_title'), issues: grouped.errors, resolveMessage: resolveIssueMessage })) : null, grouped.warnings.length > 0 ? (jsxRuntime.jsx(IssueCallout, { severity: "warning", title: translate('workflow_drawer_issues_warning_title'), issues: grouped.warnings, resolveMessage: resolveIssueMessage })) : null] }) }));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
exports.DrawerIssues = DrawerIssues;
|
|
54
|
+
//# sourceMappingURL=DrawerIssues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerIssues.js","sources":["../../../../../src/components/Workflow/canvas/DrawerShell/DrawerIssues.tsx"],"sourcesContent":[null],"names":["severityCalloutStyle","TbAlertCircle","AlertTriangle","_jsx","Box","_jsxs","VStack","HStack","Subtext","SeverityDot","useWorkflowIssueMessage","useWorkflowTranslate","useMemo"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA;;;;;;;;;AASG;AACH,SAAS,YAAY,CAAC,EACpB,QAAQ,EACR,KAAK,EACL,MAAM,EACN,cAAc,GAMf,EAAA;AACC,IAAA,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,GAAGA,kCAAoB,CAAC,QAAQ,CAAC;AACjE,IAAA,MAAM,IAAI,GAAG,QAAQ,KAAK,OAAO,GAAGC,mBAAa,GAAGC,mBAAa;AACjE,IAAA,QACEC,cAAA,CAACC,SAAG,EAAA,EACF,MAAM,EAAC,WAAW,EAClB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAC,IAAI,EACjB,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,CAAC,EAAA,QAAA,EAELC,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AM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC;AACpD,QAAA,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC;AACzD,KAAA,CAAC,EACF,CAAC,MAAM,CAAC,CACT;AAED,IAAA,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,IAAI;IAEpC,QACET,eAACC,SAAG,EAAA,EAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YACfC,eAAA,CAACC,YAAM,EAAA,EAAC,KAAK,EAAC,SAAS,EAAC,GAAG,EAAE,CAAC,EAAA,QAAA,EAAA,CAC3B,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IACxBH,cAAA,CAAC,YAAY,EAAA,EACX,QAAQ,EAAC,OAAO,EAChB,KAAK,EAAE,SAAS,CAAC,oCAAoC,CAAC,EACtD,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,cAAc,EAAE,mBAAmB,EAAA,CACnC,IACA,IAAI,EACP,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAC1BA,cAAA,CAAC,YAAY,EAAA,EACX,QAAQ,EAAC,SAAS,EAClB,KAAK,EAAE,SAAS,CAAC,sCAAsC,CAAC,EACxD,MAAM,EAAE,OAAO,CAAC,QAAQ,EACxB,cAAc,EAAE,mBAAmB,EAAA,CACnC,IACA,IAAI,CAAA,EAAA,CACD,EAAA,CACL;AAEV;;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { Box, VStack, HStack } from '@chakra-ui/react';
|
|
5
|
+
import { TbAlertCircle, AlertTriangle } from '../../../Icon/index.mjs';
|
|
6
|
+
import '../../../Typography/H1.mjs';
|
|
7
|
+
import '../../../Typography/H2.mjs';
|
|
8
|
+
import '../../../Typography/H3.mjs';
|
|
9
|
+
import '../../../Typography/H4.mjs';
|
|
10
|
+
import '../../../Typography/H5.mjs';
|
|
11
|
+
import '../../../Typography/Link.mjs';
|
|
12
|
+
import { Subtext } from '../../../Typography/Subtext.mjs';
|
|
13
|
+
import '../../../Typography/Subtitle.mjs';
|
|
14
|
+
import '../../../Typography/Text.mjs';
|
|
15
|
+
import { useWorkflowIssueMessage } from '../../useWorkflowIssueMessage.mjs';
|
|
16
|
+
import { useWorkflowTranslate } from '../../WorkflowContext/WorkflowContext.mjs';
|
|
17
|
+
import { severityCalloutStyle } from '../issueSeverity.mjs';
|
|
18
|
+
import { SeverityDot } from '../SeverityDot/SeverityDot.mjs';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* One severity bucket of node/edge issues, rendered as a tinted callout: a
|
|
22
|
+
* severity icon + a short heading ("Fixes needed" / "Worth checking") on top,
|
|
23
|
+
* then the messages as a bulleted list beneath. Severities never mix in a box
|
|
24
|
+
* so the icon, heading and tint stay meaningful.
|
|
25
|
+
*
|
|
26
|
+
* Markers use the severity's `dark` tone via `SeverityDot` — the CSS list
|
|
27
|
+
* `::marker` defaults to a muted grey that reads as an odd low-contrast dot on
|
|
28
|
+
* the tinted background.
|
|
29
|
+
*/
|
|
30
|
+
function IssueCallout({ severity, title, issues, resolveMessage, }) {
|
|
31
|
+
const { bg, color, borderColor } = severityCalloutStyle(severity);
|
|
32
|
+
const Icon = severity === 'error' ? TbAlertCircle : AlertTriangle;
|
|
33
|
+
return (jsx(Box, { border: "1px solid", borderColor: borderColor, borderRadius: "md", bg: bg, px: 3, py: 2, children: jsxs(VStack, { align: "stretch", gap: 1.5, children: [jsxs(HStack, { gap: 1.5, color: color, children: [jsx(Icon, { boxSize: "xs" }), jsx(Subtext, { color: color, fontWeight: "bold", children: title })] }), jsx(VStack, { align: "stretch", gap: 0.5, ps: 1, children: issues.map((issue, i) => (jsxs(HStack, { gap: 2, align: "flex-start", children: [jsx(SeverityDot, { severity: severity, tone: "dark", mt: 1.5 }), jsx(Subtext, { color: color, children: resolveMessage(issue) })] }, `${issue.code}_${i}`))) })] }) }));
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Header issue band shared by node and edge drawers: groups the given issues
|
|
37
|
+
* by severity and renders one tinted `IssueCallout` per non-empty bucket.
|
|
38
|
+
*/
|
|
39
|
+
function DrawerIssues({ issues }) {
|
|
40
|
+
const resolveIssueMessage = useWorkflowIssueMessage();
|
|
41
|
+
const translate = useWorkflowTranslate();
|
|
42
|
+
const grouped = useMemo(() => ({
|
|
43
|
+
errors: issues.filter((i) => i.severity === 'error'),
|
|
44
|
+
warnings: issues.filter((i) => i.severity === 'warning'),
|
|
45
|
+
}), [issues]);
|
|
46
|
+
if (issues.length === 0)
|
|
47
|
+
return null;
|
|
48
|
+
return (jsx(Box, { px: 4, py: 3, children: jsxs(VStack, { align: "stretch", gap: 2, children: [grouped.errors.length > 0 ? (jsx(IssueCallout, { severity: "error", title: translate('workflow_drawer_issues_error_title'), issues: grouped.errors, resolveMessage: resolveIssueMessage })) : null, grouped.warnings.length > 0 ? (jsx(IssueCallout, { severity: "warning", title: translate('workflow_drawer_issues_warning_title'), issues: grouped.warnings, resolveMessage: resolveIssueMessage })) : null] }) }));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { DrawerIssues };
|
|
52
|
+
//# sourceMappingURL=DrawerIssues.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerIssues.mjs","sources":["../../../../../src/components/Workflow/canvas/DrawerShell/DrawerIssues.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;AAuBA;;;;;;;;;AASG;AACH,SAAS,YAAY,CAAC,EACpB,QAAQ,EACR,KAAK,EACL,MAAM,EACN,cAAc,GAMf,EAAA;AACC,IAAA,MAAM,EAAE,EAAE,EAAE,KAAK,EA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ACnC,IACA,IAAI,CAAA,EAAA,CACD,EAAA,CACL;AAEV;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ComponentType } from 'react';
|
|
2
|
+
import type { DockSide, EdgeDrawerRenderProps } from '../../Workflow.types';
|
|
3
|
+
export type NodeInspectorProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Which side the inspector docks on. `'right'` (default) renders after the
|
|
6
|
+
* canvas; `'left'` orders it before the canvas (use when another surface owns
|
|
7
|
+
* the right rail). Also drives the top gutter — a left dock sits higher since
|
|
8
|
+
* it has no top-right action card to clear.
|
|
9
|
+
*/
|
|
10
|
+
dock?: DockSide;
|
|
11
|
+
/**
|
|
12
|
+
* Optional host renderer for the edge inspector body. When omitted, edges get
|
|
13
|
+
* a built-in inspector (editable label + read-only endpoints + delete).
|
|
14
|
+
*/
|
|
15
|
+
renderEdgeDrawer?: ComponentType<EdgeDrawerRenderProps>;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The built-in node/edge inspector. Mount it as a child of `<Workflow>` to get
|
|
19
|
+
* the default floating drawer; omit it to own inspection entirely (drive your
|
|
20
|
+
* own UI off `onSelectionChange`). A node and an edge share this surface: the
|
|
21
|
+
* editor's `drawerTarget` selects which branch renders. Node bodies come from
|
|
22
|
+
* the host node-type registry (`def.renderDrawer`); edge bodies come from the
|
|
23
|
+
* optional `renderEdgeDrawer`, falling back to a built-in label + endpoints
|
|
24
|
+
* inspector. Renders even in read-only mode (controls disable themselves).
|
|
25
|
+
*/
|
|
26
|
+
export declare function NodeInspector({ dock, renderEdgeDrawer, }: NodeInspectorProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=DrawerShell.d.ts.map
|