@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,84 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Box, Flex, HStack } from '@chakra-ui/react';
|
|
4
|
+
|
|
5
|
+
import { Subtext, Text } from '@/components/Typography';
|
|
6
|
+
|
|
7
|
+
import type { Issue } from '../../Workflow.types';
|
|
8
|
+
import { severityColorToken } from '../issueSeverity';
|
|
9
|
+
import { SeverityDot } from '../SeverityDot';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Severity-bucketed list of node issues rendered inside the floating canvas
|
|
13
|
+
* banner's dropdown. Row-style — each issue is an inline row with a thin
|
|
14
|
+
* severity bar, sized for dense scanning rather than block-level reading.
|
|
15
|
+
*/
|
|
16
|
+
export function IssueList({
|
|
17
|
+
label,
|
|
18
|
+
tone,
|
|
19
|
+
issues,
|
|
20
|
+
onIssueClick,
|
|
21
|
+
resolveMessage,
|
|
22
|
+
}: {
|
|
23
|
+
label: string;
|
|
24
|
+
tone: 'error' | 'warning';
|
|
25
|
+
issues: Issue[];
|
|
26
|
+
/**
|
|
27
|
+
* Optional row click handler — when present, each row becomes a button
|
|
28
|
+
* that jumps the inspector to the offending field. Stops propagation so
|
|
29
|
+
* the parent bucket's own click (jump to node) doesn't also fire.
|
|
30
|
+
*/
|
|
31
|
+
onIssueClick?: (issue: Issue) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Map an issue to its display message. Defaults to `issue.message`
|
|
34
|
+
* (English). Callers wire in `useWorkflowIssueMessage` to get the
|
|
35
|
+
* localized form.
|
|
36
|
+
*/
|
|
37
|
+
resolveMessage?: (issue: Issue) => string;
|
|
38
|
+
}) {
|
|
39
|
+
const color = severityColorToken(tone);
|
|
40
|
+
return (
|
|
41
|
+
<Box>
|
|
42
|
+
<HStack gap={1} px={3} pt={1.5} pb={0.5}>
|
|
43
|
+
<SeverityDot severity={tone} />
|
|
44
|
+
<Subtext
|
|
45
|
+
fontWeight="medium"
|
|
46
|
+
color={color}
|
|
47
|
+
textTransform="uppercase"
|
|
48
|
+
letterSpacing="wider"
|
|
49
|
+
>
|
|
50
|
+
{label} · {issues.length}
|
|
51
|
+
</Subtext>
|
|
52
|
+
</HStack>
|
|
53
|
+
{issues.map((issue, i) => (
|
|
54
|
+
<Flex
|
|
55
|
+
key={`${issue.code}_${i}`}
|
|
56
|
+
gap={2}
|
|
57
|
+
px={3}
|
|
58
|
+
py={1.5}
|
|
59
|
+
align="center"
|
|
60
|
+
cursor={onIssueClick ? 'pointer' : undefined}
|
|
61
|
+
_hover={onIssueClick ? { bg: 'slate.50' } : undefined}
|
|
62
|
+
onClick={
|
|
63
|
+
onIssueClick
|
|
64
|
+
? (e) => {
|
|
65
|
+
e.stopPropagation();
|
|
66
|
+
onIssueClick(issue);
|
|
67
|
+
}
|
|
68
|
+
: undefined
|
|
69
|
+
}
|
|
70
|
+
>
|
|
71
|
+
<Box
|
|
72
|
+
w="3px"
|
|
73
|
+
flexShrink={0}
|
|
74
|
+
borderRadius="full"
|
|
75
|
+
bg={severityColorToken(issue.severity)}
|
|
76
|
+
/>
|
|
77
|
+
<Text fontSize="sm" color="slate.1200">
|
|
78
|
+
{resolveMessage ? resolveMessage(issue) : issue.message}
|
|
79
|
+
</Text>
|
|
80
|
+
</Flex>
|
|
81
|
+
))}
|
|
82
|
+
</Box>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IssueList } from './IssueList';
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { DragEvent } from 'react';
|
|
4
|
+
import { Box, HStack, Stack } from '@chakra-ui/react';
|
|
5
|
+
|
|
6
|
+
import { Card } from '@/components/Card';
|
|
7
|
+
import { GripVertical, TbX } from '@/components/Icon';
|
|
8
|
+
import { IconButton } from '@/components/IconButton';
|
|
9
|
+
import { Subtext, Subtitle } from '@/components/Typography';
|
|
10
|
+
|
|
11
|
+
import type { NodeCategory, NodeTypeDef } from '../../Workflow.types';
|
|
12
|
+
import { useWorkflow, useWorkflowTranslate } from '../../WorkflowContext';
|
|
13
|
+
import { FloatingCard } from '../FloatingCard';
|
|
14
|
+
import { IconTile } from '../IconTile';
|
|
15
|
+
import { DRAG_MIME, PALETTE_WIDTH } from './NodePalette.styles';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Display order for category sections. Categories not in this list (e.g. a
|
|
19
|
+
* host-added kind) fall through to the end in registration order so a new
|
|
20
|
+
* category never disappears from the palette.
|
|
21
|
+
*/
|
|
22
|
+
const CATEGORY_ORDER: readonly NodeCategory[] = [
|
|
23
|
+
'trigger',
|
|
24
|
+
'ai',
|
|
25
|
+
'logic',
|
|
26
|
+
'safety',
|
|
27
|
+
'output',
|
|
28
|
+
'note',
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const CATEGORY_LABELS: Record<NodeCategory, string> = {
|
|
32
|
+
trigger: 'Trigger',
|
|
33
|
+
ai: 'AI',
|
|
34
|
+
logic: 'Logic',
|
|
35
|
+
safety: 'Safety',
|
|
36
|
+
output: 'Output',
|
|
37
|
+
note: 'Note',
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
function PaletteItem({ def }: { def: NodeTypeDef }) {
|
|
41
|
+
const { categoryTokens } = useWorkflow();
|
|
42
|
+
const translate = useWorkflowTranslate();
|
|
43
|
+
const description = def.descriptionKey
|
|
44
|
+
? translate(def.descriptionKey)
|
|
45
|
+
: def.description;
|
|
46
|
+
const onDragStart = (e: DragEvent) => {
|
|
47
|
+
e.dataTransfer.setData(DRAG_MIME, def.kind);
|
|
48
|
+
e.dataTransfer.effectAllowed = 'move';
|
|
49
|
+
};
|
|
50
|
+
return (
|
|
51
|
+
<Card
|
|
52
|
+
draggable
|
|
53
|
+
onDragStart={onDragStart}
|
|
54
|
+
p={0}
|
|
55
|
+
borderRadius="lg"
|
|
56
|
+
// No box-shadow: the browser's HTML5 drag preview captures a
|
|
57
|
+
// rectangular snapshot of the element. Card's default `shadow="sm"`
|
|
58
|
+
// and the `clickable` hover effect leak outside the rounded border
|
|
59
|
+
// and read as a white "halo" in the drag image.
|
|
60
|
+
boxShadow="none"
|
|
61
|
+
transition="none"
|
|
62
|
+
cursor="grab"
|
|
63
|
+
_active={{ cursor: 'grabbing' }}
|
|
64
|
+
_hover={{ borderColor: 'primary.main' }}
|
|
65
|
+
>
|
|
66
|
+
<HStack gap={2} px={2.5} py={2}>
|
|
67
|
+
<IconTile
|
|
68
|
+
category={def.category}
|
|
69
|
+
icon={def.icon}
|
|
70
|
+
tokens={categoryTokens}
|
|
71
|
+
/>
|
|
72
|
+
<Stack gap={0} flex={1} minWidth={0}>
|
|
73
|
+
<Subtext fontWeight="semibold" color="slate.1200" lineClamp={1}>
|
|
74
|
+
{def.label}
|
|
75
|
+
</Subtext>
|
|
76
|
+
{description ? (
|
|
77
|
+
<Subtext color="slate.900" lineClamp={1}>
|
|
78
|
+
{description}
|
|
79
|
+
</Subtext>
|
|
80
|
+
) : null}
|
|
81
|
+
</Stack>
|
|
82
|
+
<Box color="slate.700" display="flex" alignItems="center">
|
|
83
|
+
<GripVertical boxSize="xs" />
|
|
84
|
+
</Box>
|
|
85
|
+
</HStack>
|
|
86
|
+
</Card>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Sidebar that lets the author drag node kinds onto the canvas. Rendered as a
|
|
92
|
+
* floating card over the canvas (matching the right-hand inspector drawer), with
|
|
93
|
+
* a header that collapses it back to {@link NodePaletteToggle}.
|
|
94
|
+
*/
|
|
95
|
+
export function NodePalette({ onClose }: { onClose: () => void }) {
|
|
96
|
+
const { nodeTypes, readOnly } = useWorkflow();
|
|
97
|
+
const translate = useWorkflowTranslate();
|
|
98
|
+
if (readOnly) return null;
|
|
99
|
+
|
|
100
|
+
// Group by category, preserving registration order within each group.
|
|
101
|
+
// Pinned kinds (Start) aren't draggable so they're filtered out up front.
|
|
102
|
+
const draggable = Object.values(nodeTypes).filter(
|
|
103
|
+
(def) => !def.placement?.pinned
|
|
104
|
+
);
|
|
105
|
+
const byCategory = new Map<NodeCategory, NodeTypeDef[]>();
|
|
106
|
+
for (const def of draggable) {
|
|
107
|
+
const bucket = byCategory.get(def.category) ?? [];
|
|
108
|
+
bucket.push(def);
|
|
109
|
+
byCategory.set(def.category, bucket);
|
|
110
|
+
}
|
|
111
|
+
const orderedCategories: NodeCategory[] = [
|
|
112
|
+
...CATEGORY_ORDER.filter((c) => byCategory.has(c)),
|
|
113
|
+
...[...byCategory.keys()].filter((c) => !CATEGORY_ORDER.includes(c)),
|
|
114
|
+
];
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<FloatingCard
|
|
118
|
+
width={PALETTE_WIDTH}
|
|
119
|
+
mt={4}
|
|
120
|
+
mb={4}
|
|
121
|
+
mx={4}
|
|
122
|
+
// Size to content and float (like the right-hand inspector) instead of
|
|
123
|
+
// stretching the full canvas height into a sidebar. `height="fit-content"`
|
|
124
|
+
// forces it off the flex row's cross-axis stretch; a long list still caps
|
|
125
|
+
// at the available column via `maxHeight` and scrolls its body.
|
|
126
|
+
alignSelf="flex-start"
|
|
127
|
+
height="fit-content"
|
|
128
|
+
maxHeight="calc(100% - var(--chakra-spacing-4) - var(--chakra-spacing-4))"
|
|
129
|
+
display="flex"
|
|
130
|
+
flexDirection="column"
|
|
131
|
+
>
|
|
132
|
+
{/* Header mirrors the inspector drawer's chrome on the opposite edge:
|
|
133
|
+
a title cluster + a single xs close button that collapses the card
|
|
134
|
+
back to the floating `+` toggle. */}
|
|
135
|
+
<HStack
|
|
136
|
+
justify="space-between"
|
|
137
|
+
align="center"
|
|
138
|
+
px={4}
|
|
139
|
+
py={3}
|
|
140
|
+
borderBottom="1px solid"
|
|
141
|
+
borderColor="slate.200"
|
|
142
|
+
>
|
|
143
|
+
<Subtitle color="slate.1300">
|
|
144
|
+
{translate('workflow_palette_title')}
|
|
145
|
+
</Subtitle>
|
|
146
|
+
<IconButton
|
|
147
|
+
aria-label={translate('workflow_palette_close') as string}
|
|
148
|
+
size="xs"
|
|
149
|
+
variant="ghost"
|
|
150
|
+
colorPalette="neutral"
|
|
151
|
+
onClick={onClose}
|
|
152
|
+
>
|
|
153
|
+
<TbX boxSize="xs" aria-hidden />
|
|
154
|
+
</IconButton>
|
|
155
|
+
</HStack>
|
|
156
|
+
<Box flex="1" minHeight={0} overflowY="auto" p={3}>
|
|
157
|
+
<Stack gap={4}>
|
|
158
|
+
{orderedCategories.map((category) => (
|
|
159
|
+
<Stack key={category} gap={2}>
|
|
160
|
+
<Subtext
|
|
161
|
+
fontWeight="bold"
|
|
162
|
+
color="slate.900"
|
|
163
|
+
textTransform="uppercase"
|
|
164
|
+
letterSpacing="wider"
|
|
165
|
+
pl={1}
|
|
166
|
+
>
|
|
167
|
+
{CATEGORY_LABELS[category]}
|
|
168
|
+
</Subtext>
|
|
169
|
+
<Stack gap={2}>
|
|
170
|
+
{byCategory.get(category)!.map((def) => (
|
|
171
|
+
<PaletteItem key={def.kind} def={def} />
|
|
172
|
+
))}
|
|
173
|
+
</Stack>
|
|
174
|
+
</Stack>
|
|
175
|
+
))}
|
|
176
|
+
</Stack>
|
|
177
|
+
</Box>
|
|
178
|
+
</FloatingCard>
|
|
179
|
+
);
|
|
180
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Box } from '@chakra-ui/react';
|
|
4
|
+
|
|
5
|
+
import { IoAddOutline } from '@/components/Icon';
|
|
6
|
+
import { IconButton } from '@/components/IconButton';
|
|
7
|
+
import { Tooltip } from '@/components/Tooltip';
|
|
8
|
+
|
|
9
|
+
import { useWorkflowTranslate } from '../../WorkflowContext';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Collapsed entry-point for the palette: a floating `+` button docked over the
|
|
13
|
+
* canvas top-left. Opening it swaps in the full {@link NodePalette} card; the
|
|
14
|
+
* card's close button collapses back to this button. Mirrors the right-hand
|
|
15
|
+
* inspector drawer's "float over the canvas" treatment on the opposite edge.
|
|
16
|
+
*/
|
|
17
|
+
export function NodePaletteToggle({ onOpen }: { onOpen: () => void }) {
|
|
18
|
+
const translate = useWorkflowTranslate();
|
|
19
|
+
const label = translate('workflow_palette_title') as string;
|
|
20
|
+
return (
|
|
21
|
+
// zIndex sits above the GraphErrorBanner (zIndex 5), which docks in the same
|
|
22
|
+
// top-left corner, so the toggle stays clickable when the graph has issues.
|
|
23
|
+
<Box position="absolute" top={4} left={4} zIndex={6}>
|
|
24
|
+
<Tooltip content={label} placement="right">
|
|
25
|
+
<IconButton
|
|
26
|
+
aria-label={label}
|
|
27
|
+
size="md"
|
|
28
|
+
variant="outline"
|
|
29
|
+
colorPalette="neutral"
|
|
30
|
+
bg="bg.surface"
|
|
31
|
+
boxShadow="md"
|
|
32
|
+
onClick={onOpen}
|
|
33
|
+
>
|
|
34
|
+
<IoAddOutline boxSize="md" />
|
|
35
|
+
</IconButton>
|
|
36
|
+
</Tooltip>
|
|
37
|
+
</Box>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { PortStyle } from './NodeShell.types';
|
|
2
|
+
|
|
3
|
+
export const CARD_WIDTH = '174px';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Floor height (px) for a canvas node so a content-light node (e.g. Start,
|
|
7
|
+
* whose header is just an icon + label) doesn't render as a cramped sliver.
|
|
8
|
+
* Composed into a px string at the call site — a raw number would be read as
|
|
9
|
+
* a Chakra spacing token, not pixels.
|
|
10
|
+
*/
|
|
11
|
+
export const NODE_MIN_HEIGHT = 64;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Vertical gap (px) between adjacent ports. Ports are stacked symmetrically
|
|
15
|
+
* around the card's vertical centre (see `portTop` in NodeShell), so a node
|
|
16
|
+
* with `n` ports reserves `PORT_GAP * (n - 1)` between the first and last —
|
|
17
|
+
* enough that a many-branch node's exits (Classify, If/Else) don't squish
|
|
18
|
+
* together or collide their labels.
|
|
19
|
+
*/
|
|
20
|
+
export const PORT_GAP = 28;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Padding (px) above the first port and below the last. Kept deliberately
|
|
24
|
+
* tighter than `PORT_GAP` so a busy node (e.g. Classify with many categories)
|
|
25
|
+
* doesn't grow taller than it needs to — the old percentage spread forced this
|
|
26
|
+
* edge gap to equal the inter-port gap, which read as too much dead space.
|
|
27
|
+
*/
|
|
28
|
+
export const PORT_EDGE_PAD = 14;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Vertical offset for the `i`-th of `count` ports, expressed relative to the
|
|
32
|
+
* card's centre. Stacking them around the middle (rather than spreading them
|
|
33
|
+
* across the full height) keeps a single port dead-centre and lets the top /
|
|
34
|
+
* bottom edge padding shrink to `PORT_EDGE_PAD` independently of `PORT_GAP`,
|
|
35
|
+
* so a busy node isn't padded out taller than it needs to be.
|
|
36
|
+
*/
|
|
37
|
+
export function getPortTop(index: number, count: number): string {
|
|
38
|
+
const offset = (index - (count - 1) / 2) * PORT_GAP;
|
|
39
|
+
return `calc(50% + ${offset}px)`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Cap on the meta-chip row so a node with many badges can't grow unboundedly. */
|
|
43
|
+
export const MAX_META_CHIPS = 4;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* React Flow `<Handle>` takes inline SVG-style props rather than Chakra
|
|
47
|
+
* tokens, so port colors are spelled as CSS vars from the theme.
|
|
48
|
+
*/
|
|
49
|
+
function colorVar(token: string): string {
|
|
50
|
+
return `var(--chakra-colors-${token.replace(/\./g, '-')})`;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const PORT_STYLE: PortStyle = {
|
|
54
|
+
width: 8,
|
|
55
|
+
height: 8,
|
|
56
|
+
background: colorVar('bg.surface'),
|
|
57
|
+
border: `1.5px solid ${colorVar('slate.700')}`,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Compact pill styling for the canvas node's meta row. Overrides logician-ui
|
|
62
|
+
* Chip's chunky defaults so a row of badges fits on a 174px-wide card,
|
|
63
|
+
* but the font size stays on the `sm` theme token — no sub-`sm` sizes
|
|
64
|
+
* in the editor.
|
|
65
|
+
*/
|
|
66
|
+
export const metaChipStyles = {
|
|
67
|
+
variant: 'soft' as const,
|
|
68
|
+
colorPalette: 'neutral' as const,
|
|
69
|
+
fontWeight: 'medium',
|
|
70
|
+
px: 2,
|
|
71
|
+
py: 0.5,
|
|
72
|
+
borderRadius: 'sm',
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Per-tone color overrides applied on top of `metaChipStyles`. `default`
|
|
77
|
+
* is empty so the base styles win; `danger`/`warning` tint the chip when
|
|
78
|
+
* a sub-value (e.g. an unknown model) is invalid.
|
|
79
|
+
*/
|
|
80
|
+
export const metaChipToneStyles = {
|
|
81
|
+
default: {},
|
|
82
|
+
danger: { bg: 'danger.lightest', color: 'danger.dark' },
|
|
83
|
+
warning: { bg: 'warning.lightest', color: 'warning.dark' },
|
|
84
|
+
} as const;
|