@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,321 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
import { Box, HStack, Stack } from '@chakra-ui/react';
|
|
5
|
+
import { Handle, Position } from '@xyflow/react';
|
|
6
|
+
|
|
7
|
+
import { Card } from '@/components/Card';
|
|
8
|
+
import { Chip } from '@/components/Chip';
|
|
9
|
+
import { AlertTriangle, StickyNote } from '@/components/Icon';
|
|
10
|
+
import { Subtext } from '@/components/Typography';
|
|
11
|
+
|
|
12
|
+
import type {
|
|
13
|
+
MetaChipSpec,
|
|
14
|
+
MetaChipTone,
|
|
15
|
+
NodeCategory,
|
|
16
|
+
RunState,
|
|
17
|
+
} from '../../Workflow.types';
|
|
18
|
+
import { BranchLabelBadge } from '../Canvas/BranchLabelBadge';
|
|
19
|
+
import { getEdgeLabelVariant } from '../Canvas/edgeLabelVariant';
|
|
20
|
+
import { getCategoryTokens, IconTile } from '../IconTile';
|
|
21
|
+
import {
|
|
22
|
+
CARD_WIDTH,
|
|
23
|
+
getPortTop,
|
|
24
|
+
MAX_META_CHIPS,
|
|
25
|
+
metaChipStyles,
|
|
26
|
+
metaChipToneStyles,
|
|
27
|
+
NODE_MIN_HEIGHT,
|
|
28
|
+
PORT_EDGE_PAD,
|
|
29
|
+
PORT_GAP,
|
|
30
|
+
PORT_STYLE,
|
|
31
|
+
} from './NodeShell.styles';
|
|
32
|
+
import type { NodeShellProps, RingChrome } from './NodeShell.types';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Compact pill for the canvas node's meta row. Wraps logician-ui Chip
|
|
36
|
+
* and overrides its chunky default padding/radius via `metaChipStyles`.
|
|
37
|
+
* Tone tints the chip (e.g. an unknown model on an Agent node).
|
|
38
|
+
*/
|
|
39
|
+
function MetaChip({
|
|
40
|
+
children,
|
|
41
|
+
tone = 'default',
|
|
42
|
+
}: {
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
tone?: MetaChipTone;
|
|
45
|
+
}) {
|
|
46
|
+
return (
|
|
47
|
+
<Chip {...metaChipStyles} {...metaChipToneStyles[tone]}>
|
|
48
|
+
{children}
|
|
49
|
+
</Chip>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function normalizeChip(spec: MetaChipSpec): {
|
|
54
|
+
text: string;
|
|
55
|
+
tone: MetaChipTone;
|
|
56
|
+
} {
|
|
57
|
+
return typeof spec === 'string'
|
|
58
|
+
? { text: spec, tone: 'default' }
|
|
59
|
+
: { text: spec.text, tone: spec.tone ?? 'default' };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Ring + body-border treatment per state. Notes keep their warm border in
|
|
64
|
+
* all states but still surface the primary ring when selected so the active
|
|
65
|
+
* annotation is visible.
|
|
66
|
+
*
|
|
67
|
+
* Precedence for the ring color: running > error > selected > warning.
|
|
68
|
+
* The default-case border is `slate.300`.
|
|
69
|
+
*/
|
|
70
|
+
function getRingChrome(
|
|
71
|
+
category: NodeCategory,
|
|
72
|
+
selected: boolean,
|
|
73
|
+
hasError: boolean,
|
|
74
|
+
hasWarning: boolean,
|
|
75
|
+
runState: RunState,
|
|
76
|
+
noteBorder: string
|
|
77
|
+
): RingChrome {
|
|
78
|
+
if (category === 'note') {
|
|
79
|
+
if (selected) {
|
|
80
|
+
return {
|
|
81
|
+
borderColor: noteBorder,
|
|
82
|
+
outline: '3px solid',
|
|
83
|
+
outlineColor: 'primary.lighter',
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
return { borderColor: noteBorder };
|
|
87
|
+
}
|
|
88
|
+
if (runState === 'running') {
|
|
89
|
+
return {
|
|
90
|
+
borderColor: 'primary.main',
|
|
91
|
+
outline: '3px solid',
|
|
92
|
+
outlineColor: 'primary.lighter',
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
if (hasError) {
|
|
96
|
+
return {
|
|
97
|
+
borderColor: 'danger.main',
|
|
98
|
+
outline: '3px solid',
|
|
99
|
+
outlineColor: 'danger.lighter',
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
if (selected) {
|
|
103
|
+
return {
|
|
104
|
+
borderColor: 'primary.main',
|
|
105
|
+
outline: '3px solid',
|
|
106
|
+
outlineColor: 'primary.lighter',
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
if (hasWarning) return { borderColor: 'warning.main' };
|
|
110
|
+
return { borderColor: 'slate.300' };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Header glyph independently selected from the ring. Error wins over
|
|
115
|
+
* warning wins over running's status dot — so an error inside a running
|
|
116
|
+
* node still surfaces the alert, instead of being hidden by the green
|
|
117
|
+
* dot.
|
|
118
|
+
*/
|
|
119
|
+
function getHeaderBadge(
|
|
120
|
+
hasError: boolean,
|
|
121
|
+
hasWarning: boolean,
|
|
122
|
+
runState: RunState
|
|
123
|
+
): ReactNode {
|
|
124
|
+
if (hasError) {
|
|
125
|
+
return (
|
|
126
|
+
<Box color="danger.main" display="flex" alignItems="center">
|
|
127
|
+
<AlertTriangle boxSize="xs" />
|
|
128
|
+
</Box>
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
if (hasWarning) {
|
|
132
|
+
return (
|
|
133
|
+
<Box color="warning.dark" display="flex" alignItems="center">
|
|
134
|
+
<AlertTriangle boxSize="xs" />
|
|
135
|
+
</Box>
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
if (runState === 'running') {
|
|
139
|
+
return (
|
|
140
|
+
<Box
|
|
141
|
+
boxSize="2.5"
|
|
142
|
+
borderRadius="full"
|
|
143
|
+
bg="success.main"
|
|
144
|
+
outline="3px solid"
|
|
145
|
+
outlineColor="success.lighter"
|
|
146
|
+
/>
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function NodeShell({
|
|
153
|
+
label,
|
|
154
|
+
instanceTitle,
|
|
155
|
+
metaChips,
|
|
156
|
+
category,
|
|
157
|
+
icon,
|
|
158
|
+
selected,
|
|
159
|
+
runState,
|
|
160
|
+
issues,
|
|
161
|
+
inputs,
|
|
162
|
+
outputs,
|
|
163
|
+
connectedOutputIds,
|
|
164
|
+
categoryTokens,
|
|
165
|
+
customBody,
|
|
166
|
+
}: NodeShellProps) {
|
|
167
|
+
const hasError = issues.some((i) => i.severity === 'error');
|
|
168
|
+
const hasWarning = !hasError && issues.some((i) => i.severity === 'warning');
|
|
169
|
+
const tokens = getCategoryTokens(category, categoryTokens);
|
|
170
|
+
const ring = getRingChrome(
|
|
171
|
+
category,
|
|
172
|
+
selected,
|
|
173
|
+
hasError,
|
|
174
|
+
hasWarning,
|
|
175
|
+
runState,
|
|
176
|
+
tokens.border
|
|
177
|
+
);
|
|
178
|
+
const badge = getHeaderBadge(hasError, hasWarning, runState);
|
|
179
|
+
const isNote = category === 'note';
|
|
180
|
+
const chips = (metaChips ?? []).slice(0, MAX_META_CHIPS).map(normalizeChip);
|
|
181
|
+
const overflowChip =
|
|
182
|
+
metaChips && metaChips.length > MAX_META_CHIPS
|
|
183
|
+
? `+${metaChips.length - MAX_META_CHIPS}`
|
|
184
|
+
: null;
|
|
185
|
+
|
|
186
|
+
// Grow the card so ports stay evenly spread without crowding: the busiest
|
|
187
|
+
// side drives the height — the inter-port gaps plus a tight top/bottom edge
|
|
188
|
+
// pad — floored at NODE_MIN_HEIGHT. Notes carry no ports and size to their
|
|
189
|
+
// text, so they opt out.
|
|
190
|
+
const portCount = Math.max(inputs.length, outputs.length);
|
|
191
|
+
const minHeight = isNote
|
|
192
|
+
? undefined
|
|
193
|
+
: `${Math.max(
|
|
194
|
+
NODE_MIN_HEIGHT,
|
|
195
|
+
PORT_GAP * Math.max(portCount - 1, 0) + PORT_EDGE_PAD * 2
|
|
196
|
+
)}px`;
|
|
197
|
+
|
|
198
|
+
return (
|
|
199
|
+
<Card
|
|
200
|
+
width={CARD_WIDTH}
|
|
201
|
+
minHeight={minHeight}
|
|
202
|
+
p={0}
|
|
203
|
+
borderRadius="lg"
|
|
204
|
+
borderColor={ring.borderColor}
|
|
205
|
+
outline={ring.outline}
|
|
206
|
+
outlineColor={ring.outlineColor}
|
|
207
|
+
boxShadow="sm"
|
|
208
|
+
bg={isNote ? tokens.bg : 'bg.surface'}
|
|
209
|
+
position="relative"
|
|
210
|
+
// Center the body within the port-driven min-height so a content-light
|
|
211
|
+
// node (e.g. Start) sits mid-card rather than pinned to the top edge.
|
|
212
|
+
display="flex"
|
|
213
|
+
flexDirection="column"
|
|
214
|
+
justifyContent="center"
|
|
215
|
+
>
|
|
216
|
+
{isNote ? (
|
|
217
|
+
<Stack gap={1} px={3} py={2}>
|
|
218
|
+
<HStack
|
|
219
|
+
gap={1}
|
|
220
|
+
color="warning.dark"
|
|
221
|
+
fontWeight="bold"
|
|
222
|
+
letterSpacing="wider"
|
|
223
|
+
textTransform="uppercase"
|
|
224
|
+
>
|
|
225
|
+
<StickyNote boxSize="xs" />
|
|
226
|
+
<Subtext color="warning.dark" fontWeight="bold">
|
|
227
|
+
Note
|
|
228
|
+
</Subtext>
|
|
229
|
+
</HStack>
|
|
230
|
+
{customBody ?? (
|
|
231
|
+
<Subtext color="slate.1200" lineHeight={1.45}>
|
|
232
|
+
{instanceTitle ?? label}
|
|
233
|
+
</Subtext>
|
|
234
|
+
)}
|
|
235
|
+
</Stack>
|
|
236
|
+
) : (
|
|
237
|
+
(customBody ?? (
|
|
238
|
+
<Stack gap={0}>
|
|
239
|
+
<HStack
|
|
240
|
+
gap={2}
|
|
241
|
+
px={3}
|
|
242
|
+
pt={2}
|
|
243
|
+
pb={chips.length || overflowChip ? 1 : 2}
|
|
244
|
+
>
|
|
245
|
+
<IconTile
|
|
246
|
+
category={category}
|
|
247
|
+
icon={icon}
|
|
248
|
+
tokens={categoryTokens}
|
|
249
|
+
/>
|
|
250
|
+
<Stack gap={0} flex={1} minWidth={0}>
|
|
251
|
+
<Subtext fontWeight="semibold" color="slate.1200" lineClamp={1}>
|
|
252
|
+
{label}
|
|
253
|
+
</Subtext>
|
|
254
|
+
{instanceTitle ? (
|
|
255
|
+
<Subtext color="slate.900" lineClamp={1}>
|
|
256
|
+
{instanceTitle}
|
|
257
|
+
</Subtext>
|
|
258
|
+
) : null}
|
|
259
|
+
</Stack>
|
|
260
|
+
{badge}
|
|
261
|
+
</HStack>
|
|
262
|
+
{chips.length || overflowChip ? (
|
|
263
|
+
<HStack px={3} pb={2} gap={1} flexWrap="wrap">
|
|
264
|
+
{chips.map((chip) => (
|
|
265
|
+
<MetaChip key={chip.text} tone={chip.tone}>
|
|
266
|
+
{chip.text}
|
|
267
|
+
</MetaChip>
|
|
268
|
+
))}
|
|
269
|
+
{overflowChip ? <MetaChip>{overflowChip}</MetaChip> : null}
|
|
270
|
+
</HStack>
|
|
271
|
+
) : null}
|
|
272
|
+
</Stack>
|
|
273
|
+
))
|
|
274
|
+
)}
|
|
275
|
+
|
|
276
|
+
{inputs.map((h, i) => (
|
|
277
|
+
<Handle
|
|
278
|
+
key={`in-${h.id}`}
|
|
279
|
+
id={h.id}
|
|
280
|
+
type="target"
|
|
281
|
+
position={Position.Left}
|
|
282
|
+
style={{
|
|
283
|
+
...PORT_STYLE,
|
|
284
|
+
top: getPortTop(i, inputs.length),
|
|
285
|
+
}}
|
|
286
|
+
/>
|
|
287
|
+
))}
|
|
288
|
+
{outputs.map((h, i) => (
|
|
289
|
+
<Handle
|
|
290
|
+
key={`out-${h.id}`}
|
|
291
|
+
id={h.id}
|
|
292
|
+
type="source"
|
|
293
|
+
position={Position.Right}
|
|
294
|
+
style={{
|
|
295
|
+
...PORT_STYLE,
|
|
296
|
+
top: getPortTop(i, outputs.length),
|
|
297
|
+
}}
|
|
298
|
+
>
|
|
299
|
+
{h.label && !connectedOutputIds?.has(h.id) ? (
|
|
300
|
+
// Same badge as the connected edge carries (see BranchLabelBadge),
|
|
301
|
+
// so disconnecting/connecting reads as the chip relocating rather
|
|
302
|
+
// than restyling. `pointerEvents="none"` keeps the handle draggable
|
|
303
|
+
// through the label.
|
|
304
|
+
<Box
|
|
305
|
+
position="absolute"
|
|
306
|
+
left="14px"
|
|
307
|
+
top="50%"
|
|
308
|
+
transform="translateY(-50%)"
|
|
309
|
+
whiteSpace="nowrap"
|
|
310
|
+
pointerEvents="none"
|
|
311
|
+
>
|
|
312
|
+
<BranchLabelBadge variant={getEdgeLabelVariant(h.id)}>
|
|
313
|
+
{h.label}
|
|
314
|
+
</BranchLabelBadge>
|
|
315
|
+
</Box>
|
|
316
|
+
) : null}
|
|
317
|
+
</Handle>
|
|
318
|
+
))}
|
|
319
|
+
</Card>
|
|
320
|
+
);
|
|
321
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { type CreatedIcon } from '@/components/Icon';
|
|
4
|
+
|
|
5
|
+
import type {
|
|
6
|
+
HandleDef,
|
|
7
|
+
Issue,
|
|
8
|
+
MetaChipSpec,
|
|
9
|
+
NodeCategory,
|
|
10
|
+
RunState,
|
|
11
|
+
} from '../../Workflow.types';
|
|
12
|
+
import type { CategoryTokenMap } from '../IconTile';
|
|
13
|
+
|
|
14
|
+
export type NodeShellProps = {
|
|
15
|
+
label: string;
|
|
16
|
+
instanceTitle?: string;
|
|
17
|
+
metaChips?: ReadonlyArray<MetaChipSpec>;
|
|
18
|
+
category: NodeCategory;
|
|
19
|
+
icon: CreatedIcon;
|
|
20
|
+
selected: boolean;
|
|
21
|
+
runState: RunState;
|
|
22
|
+
issues: Issue[];
|
|
23
|
+
inputs: HandleDef[];
|
|
24
|
+
outputs: HandleDef[];
|
|
25
|
+
/**
|
|
26
|
+
* Output handle ids that already have an edge connected. A connected exit's
|
|
27
|
+
* name is carried by the edge's label badge, so the node suppresses its own
|
|
28
|
+
* handle label there to avoid showing the branch name twice (once on the
|
|
29
|
+
* exit, once on the edge). Unconnected exits keep their label so the author
|
|
30
|
+
* can still tell the branches apart.
|
|
31
|
+
*/
|
|
32
|
+
connectedOutputIds?: ReadonlySet<string>;
|
|
33
|
+
/** Optional override for the category → token map. */
|
|
34
|
+
categoryTokens?: CategoryTokenMap;
|
|
35
|
+
/** Escape-hatch body. If provided, replaces the standard header+meta layout. */
|
|
36
|
+
customBody?: ReactNode;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type RingChrome = {
|
|
40
|
+
borderColor: string;
|
|
41
|
+
outline?: string;
|
|
42
|
+
outlineColor?: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type PortStyle = CSSProperties;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Box, type BoxProps } from '@chakra-ui/react';
|
|
4
|
+
|
|
5
|
+
import type { IssueSeverity } from '../../Workflow.types';
|
|
6
|
+
import { severityColorToken } from '../issueSeverity';
|
|
7
|
+
|
|
8
|
+
interface SeverityDotProps extends BoxProps {
|
|
9
|
+
severity: IssueSeverity;
|
|
10
|
+
/**
|
|
11
|
+
* Shade of the severity colour. `dark` reads better as a small marker on a
|
|
12
|
+
* tinted callout background; `main` suits a header dot on white. Defaults to
|
|
13
|
+
* `main`.
|
|
14
|
+
*/
|
|
15
|
+
tone?: 'main' | 'dark';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Small round severity marker shared by the issue callout and the issue list. */
|
|
19
|
+
export function SeverityDot({
|
|
20
|
+
severity,
|
|
21
|
+
tone = 'main',
|
|
22
|
+
...rest
|
|
23
|
+
}: SeverityDotProps) {
|
|
24
|
+
return (
|
|
25
|
+
<Box
|
|
26
|
+
boxSize="1.5"
|
|
27
|
+
borderRadius="full"
|
|
28
|
+
flexShrink={0}
|
|
29
|
+
bg={severityColorToken(severity, tone)}
|
|
30
|
+
{...rest}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SeverityDot } from './SeverityDot';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { toastStyles } from '@/components/Toast';
|
|
2
|
+
|
|
3
|
+
import type { Issue, IssueSeverity } from '../Workflow.types';
|
|
4
|
+
|
|
5
|
+
const SEVERITY_PRECEDENCE: Record<IssueSeverity, number> = {
|
|
6
|
+
error: 2,
|
|
7
|
+
warning: 1,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The single issue a one-slot surface should represent: highest severity
|
|
12
|
+
* wins, first-listed breaks ties. Shared by every "tint by worst issue"
|
|
13
|
+
* consumer (field borders, the header title editor) so precedence can't
|
|
14
|
+
* drift between surfaces.
|
|
15
|
+
*/
|
|
16
|
+
export const pickPrimaryIssue = (issues: Issue[]): Issue | null => {
|
|
17
|
+
if (issues.length === 0) return null;
|
|
18
|
+
let primary = issues[0];
|
|
19
|
+
for (let i = 1; i < issues.length; i += 1) {
|
|
20
|
+
if (
|
|
21
|
+
SEVERITY_PRECEDENCE[issues[i].severity] >
|
|
22
|
+
SEVERITY_PRECEDENCE[primary.severity]
|
|
23
|
+
) {
|
|
24
|
+
primary = issues[i];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return primary;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Semantic color token for an issue severity — shared across issue list UIs.
|
|
32
|
+
* `tone` selects the shade: the default `'main'` for text/icons, or `'dark'`
|
|
33
|
+
* where `.main` is too light to read (e.g. the small list-bullet markers in
|
|
34
|
+
* drawer issue callouts, which need extra contrast against the tinted bg).
|
|
35
|
+
*/
|
|
36
|
+
export const severityColorToken = (
|
|
37
|
+
severity: IssueSeverity,
|
|
38
|
+
tone: 'main' | 'dark' = 'main'
|
|
39
|
+
): string => (severity === 'error' ? `danger.${tone}` : `warning.${tone}`);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Tinted callout styling (bg / border / text) for an issue severity. Reuses the
|
|
43
|
+
* `Toast` component's golden-ratio combo — the documented WCAG AA pairing — so
|
|
44
|
+
* the boxed inspector callouts stay in lockstep with it instead of restating
|
|
45
|
+
* the tokens. `IssueSeverity` is a subset of the toast statuses.
|
|
46
|
+
*/
|
|
47
|
+
export const severityCalloutStyle = (severity: IssueSeverity) =>
|
|
48
|
+
toastStyles[severity];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { type RefObject, useEffect } from 'react';
|
|
4
|
+
|
|
5
|
+
import { useWorkflow } from '../WorkflowContext';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Wires a field surface into the `fieldFocusRequest` channel: when the canvas
|
|
9
|
+
* validation banner asks to jump to `(nodeId, fieldKey)`, the matching
|
|
10
|
+
* container scrolls into view and its first focusable element is focused,
|
|
11
|
+
* then the request is consumed so a re-render doesn't refocus repeatedly.
|
|
12
|
+
*
|
|
13
|
+
* Shared by `FieldWrapper` (body fields) and `NodeTitleEditable` (the header
|
|
14
|
+
* rename editor) so the jump protocol can't drift between them. The selector
|
|
15
|
+
* includes the editable's `[data-part="preview"]` — focusing it activates
|
|
16
|
+
* edit mode (activationMode "focus"); mid-edit its `input` matches first.
|
|
17
|
+
*/
|
|
18
|
+
export function useFieldFocusRequest(
|
|
19
|
+
nodeId: string,
|
|
20
|
+
fieldKey: string,
|
|
21
|
+
containerRef: RefObject<HTMLDivElement | null>
|
|
22
|
+
): void {
|
|
23
|
+
const { fieldFocusRequest, consumeFieldFocusRequest } = useWorkflow();
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (
|
|
27
|
+
fieldFocusRequest?.nodeId !== nodeId ||
|
|
28
|
+
fieldFocusRequest.fieldKey !== fieldKey
|
|
29
|
+
) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
// Defer one frame so a freshly-mounted drawer has painted before we
|
|
33
|
+
// try to scroll/focus inside it.
|
|
34
|
+
const handle = requestAnimationFrame(() => {
|
|
35
|
+
const root = containerRef.current;
|
|
36
|
+
if (root) {
|
|
37
|
+
root.scrollIntoView({ block: 'center', behavior: 'smooth' });
|
|
38
|
+
root
|
|
39
|
+
.querySelector<HTMLElement>(
|
|
40
|
+
'input, textarea, [contenteditable="true"], select, button, [data-part="preview"]'
|
|
41
|
+
)
|
|
42
|
+
?.focus();
|
|
43
|
+
}
|
|
44
|
+
consumeFieldFocusRequest();
|
|
45
|
+
});
|
|
46
|
+
return () => cancelAnimationFrame(handle);
|
|
47
|
+
}, [
|
|
48
|
+
fieldFocusRequest,
|
|
49
|
+
nodeId,
|
|
50
|
+
fieldKey,
|
|
51
|
+
containerRef,
|
|
52
|
+
consumeFieldFocusRequest,
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared label styling for inputs inside the workflow editor's drawer.
|
|
3
|
+
* Mirrors the outer ChatbotForm's `FieldLabel` heading tokens so the
|
|
4
|
+
* editor's inspector reads as the same form surface; the Workflow
|
|
5
|
+
* canvas can't import from the studio `app/` route, so this lives at
|
|
6
|
+
* the canvas layer instead.
|
|
7
|
+
*/
|
|
8
|
+
export const workflowLabelProps = {
|
|
9
|
+
fontWeight: 'semibold',
|
|
10
|
+
color: 'slate.1300',
|
|
11
|
+
} as const;
|