@mindlogic-ai/logician-ui 3.1.0 → 3.2.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Icon/_constants/iconList.d.ts +1 -1
- package/dist/components/Icon/_constants/iconList.d.ts.map +1 -1
- package/dist/components/Icon/_constants/iconList.js +18 -0
- package/dist/components/Icon/_constants/iconList.js.map +1 -1
- package/dist/components/Icon/_constants/iconList.mjs +20 -2
- package/dist/components/Icon/_constants/iconList.mjs.map +1 -1
- package/dist/components/Icon/index.d.ts +2 -1
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +20 -1
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Icon/index.mjs +4 -2
- package/dist/components/Icon/index.mjs.map +1 -1
- package/dist/components/Workflow/Workflow.d.ts +3 -0
- package/dist/components/Workflow/Workflow.d.ts.map +1 -0
- package/dist/components/Workflow/Workflow.js +109 -0
- package/dist/components/Workflow/Workflow.js.map +1 -0
- package/dist/components/Workflow/Workflow.mjs +107 -0
- package/dist/components/Workflow/Workflow.mjs.map +1 -0
- package/dist/components/Workflow/Workflow.translations.json.js +164 -0
- package/dist/components/Workflow/Workflow.translations.json.js.map +1 -0
- package/dist/components/Workflow/Workflow.translations.json.mjs +138 -0
- package/dist/components/Workflow/Workflow.translations.json.mjs.map +1 -0
- package/dist/components/Workflow/Workflow.types.d.ts +435 -0
- package/dist/components/Workflow/Workflow.types.d.ts.map +1 -0
- package/dist/components/Workflow/Workflow.types.js +19 -0
- package/dist/components/Workflow/Workflow.types.js.map +1 -0
- package/dist/components/Workflow/Workflow.types.mjs +16 -0
- package/dist/components/Workflow/Workflow.types.mjs.map +1 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.d.ts +10 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.d.ts.map +1 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.js +163 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.js.map +1 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.mjs +159 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.mjs.map +1 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.types.d.ts +117 -0
- package/dist/components/Workflow/WorkflowContext/WorkflowContext.types.d.ts.map +1 -0
- package/dist/components/Workflow/WorkflowContext/index.d.ts +3 -0
- package/dist/components/Workflow/WorkflowContext/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.d.ts +19 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.js +44 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.mjs +42 -0
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.d.ts +10 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.js +531 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.mjs +529 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.d.ts +53 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.js +96 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.mjs +93 -0
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.d.ts +27 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.js +70 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.mjs +68 -0
- package/dist/components/Workflow/canvas/Canvas/CanvasControls.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.d.ts +10 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.js +106 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.mjs +104 -0
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.d.ts +13 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.js +18 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.js.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.mjs +16 -0
- package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.mjs.map +1 -0
- package/dist/components/Workflow/canvas/Canvas/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/Canvas/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.d.ts +30 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.js +34 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.js.map +1 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.mjs +32 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.mjs.map +1 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/CollapsibleSection/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.d.ts +37 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.js +33 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.js.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.mjs +31 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.mjs.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.d.ts +16 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.js +54 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.js.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.mjs +52 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.mjs.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.d.ts +27 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.js +178 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.js.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.mjs +176 -0
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.mjs.map +1 -0
- package/dist/components/Workflow/canvas/DrawerShell/index.d.ts +3 -0
- package/dist/components/Workflow/canvas/DrawerShell/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.d.ts +12 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.js +68 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.js.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.mjs +66 -0
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.mjs.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.d.ts +19 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.js +35 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.js.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.mjs +32 -0
- package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.mjs.map +1 -0
- package/dist/components/Workflow/canvas/EdgeInspector/index.d.ts +3 -0
- package/dist/components/Workflow/canvas/EdgeInspector/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.d.ts +54 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.js +56 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.js.map +1 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.mjs +54 -0
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.mjs.map +1 -0
- package/dist/components/Workflow/canvas/FieldWrapper/index.d.ts +3 -0
- package/dist/components/Workflow/canvas/FieldWrapper/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.d.ts +16 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.js +25 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.js.map +1 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.mjs +22 -0
- package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.mjs.map +1 -0
- package/dist/components/Workflow/canvas/FloatingCard/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/FloatingCard/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.d.ts +14 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.js +61 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.js.map +1 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.mjs +59 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.mjs.map +1 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.types.d.ts +11 -0
- package/dist/components/Workflow/canvas/GenericNode/GenericNode.types.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/GenericNode/index.d.ts +3 -0
- package/dist/components/Workflow/canvas/GenericNode/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.d.ts +15 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.js +145 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.js.map +1 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.mjs +143 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.mjs.map +1 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/GraphErrorBanner/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.d.ts +10 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.js +21 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.js.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.mjs +19 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.mjs.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.d.ts +18 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.js +40 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.js.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.mjs +37 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.mjs.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.types.d.ts +15 -0
- package/dist/components/Workflow/canvas/IconTile/IconTile.types.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IconTile/index.d.ts +4 -0
- package/dist/components/Workflow/canvas/IconTile/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.d.ts +24 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.js +34 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.js.map +1 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.mjs +32 -0
- package/dist/components/Workflow/canvas/IssueList/IssueList.mjs.map +1 -0
- package/dist/components/Workflow/canvas/IssueList/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/IssueList/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.d.ts +9 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.js +94 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.js.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.mjs +92 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.mjs.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.d.ts +7 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.js +13 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.js.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.mjs +10 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.mjs.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.d.ts +10 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.js +28 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.js.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.mjs +26 -0
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.mjs.map +1 -0
- package/dist/components/Workflow/canvas/NodePalette/index.d.ts +4 -0
- package/dist/components/Workflow/canvas/NodePalette/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.d.ts +3 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.js +137 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.js.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.mjs +135 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.mjs.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.d.ts +66 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.js +87 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.js.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.mjs +77 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.mjs.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.types.d.ts +35 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.types.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/NodeShell/index.d.ts +4 -0
- package/dist/components/Workflow/canvas/NodeShell/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.d.ts +15 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.js +14 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.js.map +1 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.mjs +12 -0
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.mjs.map +1 -0
- package/dist/components/Workflow/canvas/SeverityDot/index.d.ts +2 -0
- package/dist/components/Workflow/canvas/SeverityDot/index.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/issueSeverity.d.ts +23 -0
- package/dist/components/Workflow/canvas/issueSeverity.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/issueSeverity.js +51 -0
- package/dist/components/Workflow/canvas/issueSeverity.js.map +1 -0
- package/dist/components/Workflow/canvas/issueSeverity.mjs +47 -0
- package/dist/components/Workflow/canvas/issueSeverity.mjs.map +1 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.d.ts +14 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.js +48 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.js.map +1 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.mjs +46 -0
- package/dist/components/Workflow/canvas/useFieldFocusRequest.mjs.map +1 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.d.ts +12 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.js +17 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.js.map +1 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.mjs +15 -0
- package/dist/components/Workflow/canvas/workflowLabelProps.mjs.map +1 -0
- package/dist/components/Workflow/connectionRules.d.ts +59 -0
- package/dist/components/Workflow/connectionRules.d.ts.map +1 -0
- package/dist/components/Workflow/connectionRules.js +150 -0
- package/dist/components/Workflow/connectionRules.js.map +1 -0
- package/dist/components/Workflow/connectionRules.mjs +145 -0
- package/dist/components/Workflow/connectionRules.mjs.map +1 -0
- package/dist/components/Workflow/createNode.d.ts +27 -0
- package/dist/components/Workflow/createNode.d.ts.map +1 -0
- package/dist/components/Workflow/createNode.js +66 -0
- package/dist/components/Workflow/createNode.js.map +1 -0
- package/dist/components/Workflow/createNode.mjs +62 -0
- package/dist/components/Workflow/createNode.mjs.map +1 -0
- package/dist/components/Workflow/graphHistory.d.ts +23 -0
- package/dist/components/Workflow/graphHistory.d.ts.map +1 -0
- package/dist/components/Workflow/graphHistory.js +73 -0
- package/dist/components/Workflow/graphHistory.js.map +1 -0
- package/dist/components/Workflow/graphHistory.mjs +70 -0
- package/dist/components/Workflow/graphHistory.mjs.map +1 -0
- package/dist/components/Workflow/graphObserver.d.ts +13 -0
- package/dist/components/Workflow/graphObserver.d.ts.map +1 -0
- package/dist/components/Workflow/graphObserver.js +11 -0
- package/dist/components/Workflow/graphObserver.js.map +1 -0
- package/dist/components/Workflow/graphObserver.mjs +8 -0
- package/dist/components/Workflow/graphObserver.mjs.map +1 -0
- package/dist/components/Workflow/graphReducer.d.ts +75 -0
- package/dist/components/Workflow/graphReducer.d.ts.map +1 -0
- package/dist/components/Workflow/graphReducer.js +122 -0
- package/dist/components/Workflow/graphReducer.js.map +1 -0
- package/dist/components/Workflow/graphReducer.mjs +119 -0
- package/dist/components/Workflow/graphReducer.mjs.map +1 -0
- package/dist/components/Workflow/index.d.ts +22 -0
- package/dist/components/Workflow/index.d.ts.map +1 -0
- package/dist/components/Workflow/layout/autoLayout.d.ts +49 -0
- package/dist/components/Workflow/layout/autoLayout.d.ts.map +1 -0
- package/dist/components/Workflow/layout/autoLayout.js +149 -0
- package/dist/components/Workflow/layout/autoLayout.js.map +1 -0
- package/dist/components/Workflow/layout/autoLayout.mjs +146 -0
- package/dist/components/Workflow/layout/autoLayout.mjs.map +1 -0
- package/dist/components/Workflow/stories/toyNodeTypes.d.ts +40 -0
- package/dist/components/Workflow/stories/toyNodeTypes.d.ts.map +1 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.d.ts +15 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.d.ts.map +1 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.js +45 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.js.map +1 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.mjs +43 -0
- package/dist/components/Workflow/useWorkflowIssueMessage.mjs.map +1 -0
- package/dist/components/Workflow/useWorkflowKeyboard.d.ts +10 -0
- package/dist/components/Workflow/useWorkflowKeyboard.d.ts.map +1 -0
- package/dist/components/Workflow/useWorkflowKeyboard.js +116 -0
- package/dist/components/Workflow/useWorkflowKeyboard.js.map +1 -0
- package/dist/components/Workflow/useWorkflowKeyboard.mjs +114 -0
- package/dist/components/Workflow/useWorkflowKeyboard.mjs.map +1 -0
- package/dist/icons.js +17 -0
- package/dist/icons.js.map +1 -1
- package/dist/icons.mjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/dist/test-support/setup.d.ts +5 -0
- package/dist/test-support/setup.d.ts.map +1 -0
- package/package.json +10 -2
- package/src/components/Icon/_constants/iconList.ts +35 -0
- package/src/components/Icon/index.tsx +20 -0
- package/src/components/Workflow/README.md +362 -0
- package/src/components/Workflow/Workflow.translations.json +112 -0
- package/src/components/Workflow/Workflow.tsx +189 -0
- package/src/components/Workflow/Workflow.types.ts +496 -0
- package/src/components/Workflow/WorkflowContext/WorkflowContext.tsx +215 -0
- package/src/components/Workflow/WorkflowContext/WorkflowContext.types.ts +122 -0
- package/src/components/Workflow/WorkflowContext/index.ts +10 -0
- package/src/components/Workflow/WorkflowContext/workflowSelection.test.tsx +93 -0
- package/src/components/Workflow/canvas/Canvas/BranchLabelBadge.tsx +69 -0
- package/src/components/Workflow/canvas/Canvas/Canvas.styles.ts +91 -0
- package/src/components/Workflow/canvas/Canvas/Canvas.tsx +773 -0
- package/src/components/Workflow/canvas/Canvas/CanvasControls.tsx +178 -0
- package/src/components/Workflow/canvas/Canvas/LabeledEdge.tsx +198 -0
- package/src/components/Workflow/canvas/Canvas/edgeLabelVariant.test.ts +26 -0
- package/src/components/Workflow/canvas/Canvas/edgeLabelVariant.ts +23 -0
- package/src/components/Workflow/canvas/Canvas/index.ts +1 -0
- package/src/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.tsx +96 -0
- package/src/components/Workflow/canvas/CollapsibleSection/index.ts +4 -0
- package/src/components/Workflow/canvas/DrawerShell/DrawerHeader.tsx +104 -0
- package/src/components/Workflow/canvas/DrawerShell/DrawerIssues.tsx +115 -0
- package/src/components/Workflow/canvas/DrawerShell/DrawerShell.tsx +408 -0
- package/src/components/Workflow/canvas/DrawerShell/index.ts +2 -0
- package/src/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.tsx +135 -0
- package/src/components/Workflow/canvas/EdgeInspector/endpointTitle.ts +38 -0
- package/src/components/Workflow/canvas/EdgeInspector/index.ts +2 -0
- package/src/components/Workflow/canvas/FieldWrapper/FieldWrapper.tsx +118 -0
- package/src/components/Workflow/canvas/FieldWrapper/index.ts +6 -0
- package/src/components/Workflow/canvas/FloatingCard/FloatingCard.tsx +37 -0
- package/src/components/Workflow/canvas/FloatingCard/index.ts +1 -0
- package/src/components/Workflow/canvas/GenericNode/GenericNode.tsx +114 -0
- package/src/components/Workflow/canvas/GenericNode/GenericNode.types.ts +10 -0
- package/src/components/Workflow/canvas/GenericNode/index.ts +5 -0
- package/src/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.tsx +284 -0
- package/src/components/Workflow/canvas/GraphErrorBanner/index.ts +1 -0
- package/src/components/Workflow/canvas/IconTile/IconTile.styles.ts +40 -0
- package/src/components/Workflow/canvas/IconTile/IconTile.tsx +36 -0
- package/src/components/Workflow/canvas/IconTile/IconTile.types.ts +13 -0
- package/src/components/Workflow/canvas/IconTile/index.ts +7 -0
- package/src/components/Workflow/canvas/IssueList/IssueList.tsx +84 -0
- package/src/components/Workflow/canvas/IssueList/index.ts +1 -0
- package/src/components/Workflow/canvas/NodePalette/NodePalette.styles.ts +7 -0
- package/src/components/Workflow/canvas/NodePalette/NodePalette.tsx +180 -0
- package/src/components/Workflow/canvas/NodePalette/NodePaletteToggle.tsx +39 -0
- package/src/components/Workflow/canvas/NodePalette/index.ts +3 -0
- package/src/components/Workflow/canvas/NodeShell/NodeShell.styles.ts +84 -0
- package/src/components/Workflow/canvas/NodeShell/NodeShell.tsx +321 -0
- package/src/components/Workflow/canvas/NodeShell/NodeShell.types.ts +45 -0
- package/src/components/Workflow/canvas/NodeShell/index.ts +8 -0
- package/src/components/Workflow/canvas/SeverityDot/SeverityDot.tsx +33 -0
- package/src/components/Workflow/canvas/SeverityDot/index.ts +1 -0
- package/src/components/Workflow/canvas/issueSeverity.ts +48 -0
- package/src/components/Workflow/canvas/useFieldFocusRequest.ts +54 -0
- package/src/components/Workflow/canvas/workflowLabelProps.ts +11 -0
- package/src/components/Workflow/connectionRules.test.ts +326 -0
- package/src/components/Workflow/connectionRules.ts +190 -0
- package/src/components/Workflow/createNode.test.ts +61 -0
- package/src/components/Workflow/createNode.ts +67 -0
- package/src/components/Workflow/graphHistory.test.ts +178 -0
- package/src/components/Workflow/graphHistory.ts +91 -0
- package/src/components/Workflow/graphObserver.ts +21 -0
- package/src/components/Workflow/graphReducer.test.ts +314 -0
- package/src/components/Workflow/graphReducer.ts +196 -0
- package/src/components/Workflow/index.ts +74 -0
- package/src/components/Workflow/layout/autoLayout.test.ts +170 -0
- package/src/components/Workflow/layout/autoLayout.ts +200 -0
- package/src/components/Workflow/stories/Workflow.stories.tsx +111 -0
- package/src/components/Workflow/stories/toyNodeTypes.tsx +146 -0
- package/src/components/Workflow/useWorkflowIssueMessage.test.ts +101 -0
- package/src/components/Workflow/useWorkflowIssueMessage.ts +49 -0
- package/src/components/Workflow/useWorkflowKeyboard.ts +126 -0
- package/src/index.ts +1 -0
- package/src/test-support/setup.ts +11 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Box, HStack, Flex } from '@chakra-ui/react';
|
|
4
|
+
import '../../../Typography/H1.mjs';
|
|
5
|
+
import '../../../Typography/H2.mjs';
|
|
6
|
+
import '../../../Typography/H3.mjs';
|
|
7
|
+
import '../../../Typography/H4.mjs';
|
|
8
|
+
import '../../../Typography/H5.mjs';
|
|
9
|
+
import '../../../Typography/Link.mjs';
|
|
10
|
+
import { Subtext } from '../../../Typography/Subtext.mjs';
|
|
11
|
+
import '../../../Typography/Subtitle.mjs';
|
|
12
|
+
import { Text } from '../../../Typography/Text.mjs';
|
|
13
|
+
import { severityColorToken } from '../issueSeverity.mjs';
|
|
14
|
+
import { SeverityDot } from '../SeverityDot/SeverityDot.mjs';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Severity-bucketed list of node issues rendered inside the floating canvas
|
|
18
|
+
* banner's dropdown. Row-style — each issue is an inline row with a thin
|
|
19
|
+
* severity bar, sized for dense scanning rather than block-level reading.
|
|
20
|
+
*/
|
|
21
|
+
function IssueList({ label, tone, issues, onIssueClick, resolveMessage, }) {
|
|
22
|
+
const color = severityColorToken(tone);
|
|
23
|
+
return (jsxs(Box, { children: [jsxs(HStack, { gap: 1, px: 3, pt: 1.5, pb: 0.5, children: [jsx(SeverityDot, { severity: tone }), jsxs(Subtext, { fontWeight: "medium", color: color, textTransform: "uppercase", letterSpacing: "wider", children: [label, " \u00B7 ", issues.length] })] }), issues.map((issue, i) => (jsxs(Flex, { gap: 2, px: 3, py: 1.5, align: "center", cursor: onIssueClick ? 'pointer' : undefined, _hover: onIssueClick ? { bg: 'slate.50' } : undefined, onClick: onIssueClick
|
|
24
|
+
? (e) => {
|
|
25
|
+
e.stopPropagation();
|
|
26
|
+
onIssueClick(issue);
|
|
27
|
+
}
|
|
28
|
+
: undefined, children: [jsx(Box, { w: "3px", flexShrink: 0, borderRadius: "full", bg: severityColorToken(issue.severity) }), jsx(Text, { fontSize: "sm", color: "slate.1200", children: resolveMessage ? resolveMessage(issue) : issue.message })] }, `${issue.code}_${i}`)))] }));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { IssueList };
|
|
32
|
+
//# sourceMappingURL=IssueList.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssueList.mjs","sources":["../../../../../src/components/Workflow/canvas/IssueList/IssueList.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;AAUA;;;;AAIG;AACG,SAAU,SAAS,CAAC,EACxB,KAAK,EACL,IAAI,EACJ,MAAM,EACN,YAAY,EACZ,cAAc,GAiBf,EAAA;AACC,IAAA,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC;IACtC,QACEA,IAAA,CAAC,GAAG,EAAA,EAAA,QAAA,EAAA,CACFA,IAAA,CAAC,MAAM,EAAA,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAA,QAAA,EAAA,CACrCC,GAAA,CAAC,WAAW,EAAA,EAAC,QAAQ,EAAE,IAAI,EAAA,CAAI,EAC/BD,IAAA,CAAC,OAAO,EAAA,EACN,UAAU,EAAC,QAAQ,EACnB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAC,WAAW,EACzB,aAAa,EAAC,OAAO,EAAA,QAAA,EAAA,CAEpB,KAAK,EAAA,UAAA,EAAK,MAAM,CAAC,MAAM,CAAA,EAAA,CAChB,CAAA,EAAA,CACH,EACR,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,MACnBA,IAAA,CAAC,IAAI,EAAA,EAEH,GAAG,EAAE,CAAC,EACN,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,GAAG,EACP,KAAK,EAAC,QAAQ,EACd,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,EAC5C,MAAM,EAAE,YAAY,GAAG,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,SAAS,EACrD,OAAO,EACL;AACE,sBAAE,CAAC,CAAC,KAAI;wBACJ,CAAC,CAAC,eAAe,EAAE;wBACnB,YAAY,CAAC,KAAK,CAAC;oBACrB;AACF,sBAAE,SAAS,EAAA,QAAA,EAAA,CAGfC,GAAA,CAAC,GAAG,EAAA,EACF,CAAC,EAAC,KAAK,EACP,UAAU,EAAE,CAAC,EACb,YAAY,EAAC,MAAM,EACnB,EAAE,EAAE,kBAAkB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAA,CACtC,EACFA,GAAA,CAAC,IAAI,IAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,EAAC,YAAY,EAAA,QAAA,EACnC,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,OAAO,EAAA,CAClD,CAAA,EAAA,EAxBF,CAAA,EAAG,KAAK,CAAC,IAAI,CAAA,CAAA,EAAI,CAAC,CAAA,CAAE,CAyBpB,CACR,CAAC,CAAA,EAAA,CACE;AAEV;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/IssueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sidebar that lets the author drag node kinds onto the canvas. Rendered as a
|
|
3
|
+
* floating card over the canvas (matching the right-hand inspector drawer), with
|
|
4
|
+
* a header that collapses it back to {@link NodePaletteToggle}.
|
|
5
|
+
*/
|
|
6
|
+
export declare function NodePalette({ onClose }: {
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=NodePalette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodePalette.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/NodePalette/NodePalette.tsx"],"names":[],"mappings":"AAyFA;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,2CAqF/D"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('@chakra-ui/react');
|
|
6
|
+
var Card = require('../../../Card/Card.js');
|
|
7
|
+
var index = require('../../../Icon/index.js');
|
|
8
|
+
var IconButton = require('../../../IconButton/IconButton.js');
|
|
9
|
+
require('../../../IconButton/IconButton.styles.js');
|
|
10
|
+
require('../../../Typography/H1.js');
|
|
11
|
+
require('../../../Typography/H2.js');
|
|
12
|
+
require('../../../Typography/H3.js');
|
|
13
|
+
require('../../../Typography/H4.js');
|
|
14
|
+
require('../../../Typography/H5.js');
|
|
15
|
+
require('../../../Typography/Link.js');
|
|
16
|
+
var Subtext = require('../../../Typography/Subtext.js');
|
|
17
|
+
var Subtitle = require('../../../Typography/Subtitle.js');
|
|
18
|
+
require('../../../Typography/Text.js');
|
|
19
|
+
var WorkflowContext = require('../../WorkflowContext/WorkflowContext.js');
|
|
20
|
+
var FloatingCard = require('../FloatingCard/FloatingCard.js');
|
|
21
|
+
var IconTile = require('../IconTile/IconTile.js');
|
|
22
|
+
var NodePalette_styles = require('./NodePalette.styles.js');
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Display order for category sections. Categories not in this list (e.g. a
|
|
26
|
+
* host-added kind) fall through to the end in registration order so a new
|
|
27
|
+
* category never disappears from the palette.
|
|
28
|
+
*/
|
|
29
|
+
const CATEGORY_ORDER = [
|
|
30
|
+
'trigger',
|
|
31
|
+
'ai',
|
|
32
|
+
'logic',
|
|
33
|
+
'safety',
|
|
34
|
+
'output',
|
|
35
|
+
'note',
|
|
36
|
+
];
|
|
37
|
+
const CATEGORY_LABELS = {
|
|
38
|
+
trigger: 'Trigger',
|
|
39
|
+
ai: 'AI',
|
|
40
|
+
logic: 'Logic',
|
|
41
|
+
safety: 'Safety',
|
|
42
|
+
output: 'Output',
|
|
43
|
+
note: 'Note',
|
|
44
|
+
};
|
|
45
|
+
function PaletteItem({ def }) {
|
|
46
|
+
const { categoryTokens } = WorkflowContext.useWorkflow();
|
|
47
|
+
const translate = WorkflowContext.useWorkflowTranslate();
|
|
48
|
+
const description = def.descriptionKey
|
|
49
|
+
? translate(def.descriptionKey)
|
|
50
|
+
: def.description;
|
|
51
|
+
const onDragStart = (e) => {
|
|
52
|
+
e.dataTransfer.setData(NodePalette_styles.DRAG_MIME, def.kind);
|
|
53
|
+
e.dataTransfer.effectAllowed = 'move';
|
|
54
|
+
};
|
|
55
|
+
return (jsxRuntime.jsx(Card.Card, { draggable: true, onDragStart: onDragStart, p: 0, 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", transition: "none", cursor: "grab", _active: { cursor: 'grabbing' }, _hover: { borderColor: 'primary.main' }, children: jsxRuntime.jsxs(react.HStack, { gap: 2, px: 2.5, py: 2, children: [jsxRuntime.jsx(IconTile.IconTile, { category: def.category, icon: def.icon, tokens: categoryTokens }), jsxRuntime.jsxs(react.Stack, { gap: 0, flex: 1, minWidth: 0, children: [jsxRuntime.jsx(Subtext.Subtext, { fontWeight: "semibold", color: "slate.1200", lineClamp: 1, children: def.label }), description ? (jsxRuntime.jsx(Subtext.Subtext, { color: "slate.900", lineClamp: 1, children: description })) : null] }), jsxRuntime.jsx(react.Box, { color: "slate.700", display: "flex", alignItems: "center", children: jsxRuntime.jsx(index.GripVertical, { boxSize: "xs" }) })] }) }));
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Sidebar that lets the author drag node kinds onto the canvas. Rendered as a
|
|
64
|
+
* floating card over the canvas (matching the right-hand inspector drawer), with
|
|
65
|
+
* a header that collapses it back to {@link NodePaletteToggle}.
|
|
66
|
+
*/
|
|
67
|
+
function NodePalette({ onClose }) {
|
|
68
|
+
const { nodeTypes, readOnly } = WorkflowContext.useWorkflow();
|
|
69
|
+
const translate = WorkflowContext.useWorkflowTranslate();
|
|
70
|
+
if (readOnly)
|
|
71
|
+
return null;
|
|
72
|
+
// Group by category, preserving registration order within each group.
|
|
73
|
+
// Pinned kinds (Start) aren't draggable so they're filtered out up front.
|
|
74
|
+
const draggable = Object.values(nodeTypes).filter((def) => !def.placement?.pinned);
|
|
75
|
+
const byCategory = new Map();
|
|
76
|
+
for (const def of draggable) {
|
|
77
|
+
const bucket = byCategory.get(def.category) ?? [];
|
|
78
|
+
bucket.push(def);
|
|
79
|
+
byCategory.set(def.category, bucket);
|
|
80
|
+
}
|
|
81
|
+
const orderedCategories = [
|
|
82
|
+
...CATEGORY_ORDER.filter((c) => byCategory.has(c)),
|
|
83
|
+
...[...byCategory.keys()].filter((c) => !CATEGORY_ORDER.includes(c)),
|
|
84
|
+
];
|
|
85
|
+
return (jsxRuntime.jsxs(FloatingCard.FloatingCard, { width: NodePalette_styles.PALETTE_WIDTH, mt: 4, mb: 4, mx: 4,
|
|
86
|
+
// Size to content and float (like the right-hand inspector) instead of
|
|
87
|
+
// stretching the full canvas height into a sidebar. `height="fit-content"`
|
|
88
|
+
// forces it off the flex row's cross-axis stretch; a long list still caps
|
|
89
|
+
// at the available column via `maxHeight` and scrolls its body.
|
|
90
|
+
alignSelf: "flex-start", height: "fit-content", maxHeight: "calc(100% - var(--chakra-spacing-4) - var(--chakra-spacing-4))", display: "flex", flexDirection: "column", children: [jsxRuntime.jsxs(react.HStack, { justify: "space-between", align: "center", px: 4, py: 3, borderBottom: "1px solid", borderColor: "slate.200", children: [jsxRuntime.jsx(Subtitle.Subtitle, { color: "slate.1300", children: translate('workflow_palette_title') }), jsxRuntime.jsx(IconButton.IconButton, { "aria-label": translate('workflow_palette_close'), size: "xs", variant: "ghost", colorPalette: "neutral", onClick: onClose, children: jsxRuntime.jsx(index.TbX, { boxSize: "xs", "aria-hidden": true }) })] }), jsxRuntime.jsx(react.Box, { flex: "1", minHeight: 0, overflowY: "auto", p: 3, children: jsxRuntime.jsx(react.Stack, { gap: 4, children: orderedCategories.map((category) => (jsxRuntime.jsxs(react.Stack, { gap: 2, children: [jsxRuntime.jsx(Subtext.Subtext, { fontWeight: "bold", color: "slate.900", textTransform: "uppercase", letterSpacing: "wider", pl: 1, children: CATEGORY_LABELS[category] }), jsxRuntime.jsx(react.Stack, { gap: 2, children: byCategory.get(category).map((def) => (jsxRuntime.jsx(PaletteItem, { def: def }, def.kind))) })] }, category))) }) })] }));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
exports.NodePalette = NodePalette;
|
|
94
|
+
//# sourceMappingURL=NodePalette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodePalette.js","sources":["../../../../../src/components/Workflow/canvas/NodePalette/NodePalette.tsx"],"sourcesContent":[null],"names":["useWorkflow","useWorkflowTranslate","DRAG_MIME","_jsx","Card","_jsxs","HStack","IconTile","Stack","Subtext","Box","GripVertical","FloatingCard","PALETTE_WIDTH","Subtitle","IconButton","TbX"],"mappings":";;;;;;;;;;;;;;;;;;;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SAAS,EACtB,OAAO,EAAE,OAAO,EAAA,QAAA,EAEhBZ,cAAA,CAACa,SAAG,EAAA,EAAC,OAAO,EAAC,IAAI,EAAA,aAAA,EAAA,IAAA,EAAA,CAAe,EAAA,CACrB,IACN,EACTb,cAAA,CAACO,SAAG,EAAA,EAAC,IAAI,EAAC,GAAG,EAAC,SAAS,EAAE,CAAC,EAAE,SAAS,EAAC,MAAM,EAAC,CAAC,EAAE,CAAC,YAC/CP,cAAA,CAACK,WAAK,EAAA,EAAC,GAAG,EAAE,CAAC,YACV,iBAAiB,CAAC,GAAG,CAAC,CAAC,QAAQ,MAC9BH,eAAA,CAACG,WAAK,IAAgB,GAAG,EAAE,CAAC,EAAA,QAAA,EAAA,CAC1BL,cAAA,CAACM,eAAO,EAAA,EACN,UAAU,EAAC,MAAM,EACjB,KAAK,EAAC,WAAW,EACjB,aAAa,EAAC,WAAW,EACzB,aAAa,EAAC,OAAO,EACrB,EAAE,EAAE,CAAC,YAEJ,eAAe,CAAC,QAAQ,CAAC,EAAA,CAClB,EACVN,cAAA,CAACK,WAAK,EAAA,EAAC,GAAG,EAAE,CAAC,YACV,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC,GAAG,CAAC,CAAC,GAAG,MACjCL,cAAA,CAAC,WAAW,EAAA,EAAgB,GAAG,EAAE,GAAG,EAAA,EAAlB,GAAG,CAAC,IAAI,CAAc,CACzC,CAAC,EAAA,CACI,CAAA,EAAA,EAdE,QAAQ,CAeZ,CACT,CAAC,EAAA,CACI,EAAA,CACJ,CAAA,EAAA,CACO;AAEnB;;;;"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { HStack, Box, Stack } from '@chakra-ui/react';
|
|
4
|
+
import { Card } from '../../../Card/Card.mjs';
|
|
5
|
+
import { TbX, GripVertical } from '../../../Icon/index.mjs';
|
|
6
|
+
import { IconButton } from '../../../IconButton/IconButton.mjs';
|
|
7
|
+
import '../../../IconButton/IconButton.styles.mjs';
|
|
8
|
+
import '../../../Typography/H1.mjs';
|
|
9
|
+
import '../../../Typography/H2.mjs';
|
|
10
|
+
import '../../../Typography/H3.mjs';
|
|
11
|
+
import '../../../Typography/H4.mjs';
|
|
12
|
+
import '../../../Typography/H5.mjs';
|
|
13
|
+
import '../../../Typography/Link.mjs';
|
|
14
|
+
import { Subtext } from '../../../Typography/Subtext.mjs';
|
|
15
|
+
import { Subtitle } from '../../../Typography/Subtitle.mjs';
|
|
16
|
+
import '../../../Typography/Text.mjs';
|
|
17
|
+
import { useWorkflow, useWorkflowTranslate } from '../../WorkflowContext/WorkflowContext.mjs';
|
|
18
|
+
import { FloatingCard } from '../FloatingCard/FloatingCard.mjs';
|
|
19
|
+
import { IconTile } from '../IconTile/IconTile.mjs';
|
|
20
|
+
import { PALETTE_WIDTH, DRAG_MIME } from './NodePalette.styles.mjs';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Display order for category sections. Categories not in this list (e.g. a
|
|
24
|
+
* host-added kind) fall through to the end in registration order so a new
|
|
25
|
+
* category never disappears from the palette.
|
|
26
|
+
*/
|
|
27
|
+
const CATEGORY_ORDER = [
|
|
28
|
+
'trigger',
|
|
29
|
+
'ai',
|
|
30
|
+
'logic',
|
|
31
|
+
'safety',
|
|
32
|
+
'output',
|
|
33
|
+
'note',
|
|
34
|
+
];
|
|
35
|
+
const CATEGORY_LABELS = {
|
|
36
|
+
trigger: 'Trigger',
|
|
37
|
+
ai: 'AI',
|
|
38
|
+
logic: 'Logic',
|
|
39
|
+
safety: 'Safety',
|
|
40
|
+
output: 'Output',
|
|
41
|
+
note: 'Note',
|
|
42
|
+
};
|
|
43
|
+
function PaletteItem({ def }) {
|
|
44
|
+
const { categoryTokens } = useWorkflow();
|
|
45
|
+
const translate = useWorkflowTranslate();
|
|
46
|
+
const description = def.descriptionKey
|
|
47
|
+
? translate(def.descriptionKey)
|
|
48
|
+
: def.description;
|
|
49
|
+
const onDragStart = (e) => {
|
|
50
|
+
e.dataTransfer.setData(DRAG_MIME, def.kind);
|
|
51
|
+
e.dataTransfer.effectAllowed = 'move';
|
|
52
|
+
};
|
|
53
|
+
return (jsx(Card, { draggable: true, onDragStart: onDragStart, p: 0, borderRadius: "lg",
|
|
54
|
+
// No box-shadow: the browser's HTML5 drag preview captures a
|
|
55
|
+
// rectangular snapshot of the element. Card's default `shadow="sm"`
|
|
56
|
+
// and the `clickable` hover effect leak outside the rounded border
|
|
57
|
+
// and read as a white "halo" in the drag image.
|
|
58
|
+
boxShadow: "none", transition: "none", cursor: "grab", _active: { cursor: 'grabbing' }, _hover: { borderColor: 'primary.main' }, children: jsxs(HStack, { gap: 2, px: 2.5, py: 2, children: [jsx(IconTile, { category: def.category, icon: def.icon, tokens: categoryTokens }), jsxs(Stack, { gap: 0, flex: 1, minWidth: 0, children: [jsx(Subtext, { fontWeight: "semibold", color: "slate.1200", lineClamp: 1, children: def.label }), description ? (jsx(Subtext, { color: "slate.900", lineClamp: 1, children: description })) : null] }), jsx(Box, { color: "slate.700", display: "flex", alignItems: "center", children: jsx(GripVertical, { boxSize: "xs" }) })] }) }));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Sidebar that lets the author drag node kinds onto the canvas. Rendered as a
|
|
62
|
+
* floating card over the canvas (matching the right-hand inspector drawer), with
|
|
63
|
+
* a header that collapses it back to {@link NodePaletteToggle}.
|
|
64
|
+
*/
|
|
65
|
+
function NodePalette({ onClose }) {
|
|
66
|
+
const { nodeTypes, readOnly } = useWorkflow();
|
|
67
|
+
const translate = useWorkflowTranslate();
|
|
68
|
+
if (readOnly)
|
|
69
|
+
return null;
|
|
70
|
+
// Group by category, preserving registration order within each group.
|
|
71
|
+
// Pinned kinds (Start) aren't draggable so they're filtered out up front.
|
|
72
|
+
const draggable = Object.values(nodeTypes).filter((def) => !def.placement?.pinned);
|
|
73
|
+
const byCategory = new Map();
|
|
74
|
+
for (const def of draggable) {
|
|
75
|
+
const bucket = byCategory.get(def.category) ?? [];
|
|
76
|
+
bucket.push(def);
|
|
77
|
+
byCategory.set(def.category, bucket);
|
|
78
|
+
}
|
|
79
|
+
const orderedCategories = [
|
|
80
|
+
...CATEGORY_ORDER.filter((c) => byCategory.has(c)),
|
|
81
|
+
...[...byCategory.keys()].filter((c) => !CATEGORY_ORDER.includes(c)),
|
|
82
|
+
];
|
|
83
|
+
return (jsxs(FloatingCard, { width: PALETTE_WIDTH, mt: 4, mb: 4, mx: 4,
|
|
84
|
+
// Size to content and float (like the right-hand inspector) instead of
|
|
85
|
+
// stretching the full canvas height into a sidebar. `height="fit-content"`
|
|
86
|
+
// forces it off the flex row's cross-axis stretch; a long list still caps
|
|
87
|
+
// at the available column via `maxHeight` and scrolls its body.
|
|
88
|
+
alignSelf: "flex-start", height: "fit-content", maxHeight: "calc(100% - var(--chakra-spacing-4) - var(--chakra-spacing-4))", display: "flex", flexDirection: "column", children: [jsxs(HStack, { justify: "space-between", align: "center", px: 4, py: 3, borderBottom: "1px solid", borderColor: "slate.200", children: [jsx(Subtitle, { color: "slate.1300", children: translate('workflow_palette_title') }), jsx(IconButton, { "aria-label": translate('workflow_palette_close'), size: "xs", variant: "ghost", colorPalette: "neutral", onClick: onClose, children: jsx(TbX, { boxSize: "xs", "aria-hidden": true }) })] }), jsx(Box, { flex: "1", minHeight: 0, overflowY: "auto", p: 3, children: jsx(Stack, { gap: 4, children: orderedCategories.map((category) => (jsxs(Stack, { gap: 2, children: [jsx(Subtext, { fontWeight: "bold", color: "slate.900", textTransform: "uppercase", letterSpacing: "wider", pl: 1, children: CATEGORY_LABELS[category] }), jsx(Stack, { gap: 2, children: byCategory.get(category).map((def) => (jsx(PaletteItem, { def: def }, def.kind))) })] }, category))) }) })] }));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { NodePalette };
|
|
92
|
+
//# sourceMappingURL=NodePalette.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodePalette.mjs","sources":["../../../../../src/components/Workflow/canvas/NodePalette/NodePalette.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBA;;;;AAIG;AACH,MAAM,cAAc,GAA4B;IAC9C,SAAS;IACT,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,MAAM;CACP;AAED,MAAM,eAAe,GAAiC;AACpD,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,IAAI,EAAE,MAAM;CACb;AAED,SAAS,WAAW,CAAC,EAAE,GAAG,EAAwB,EAAA;AAChD,IAAA,MAAM,EAAE,cAAc,EAAE,GAAG,WAAW,EAAE;AACxC,IAAA,MAAM,SAAS,GAAG,oBAAoB,EAAE;AACxC,IAAA,MAAM,WAAW,GAAG,GAAG,CAAC;AACtB,UAAE,SAAS,CAAC,GAAG,CAAC,cAAc;AAC9B,UAAE,GAAG,CAAC,WAAW;AACnB,IAAA,MAAM,WAAW,GAAG,CAAC,CAAY,KAAI;QACnC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC;AAC3C,QAAA,CAAC,CAAC,YAAY,CAAC,aAAa,GAAG,MAAM;AACvC,IAAA,CAAC;AACD,IAAA,QACEA,GAAA,CAAC,IAAI,EAAA,EACH,SAAS,QACT,WAAW,EAAE,WAAW,EACxB,CAAC,EAAE,CAAC,EACJ,YAAY,EAAC,IAAI;;;;;AAKjB,QAAA,SAAS,EAAC,MAAM,EAChB,UAAU,EAAC,MAAM,EACjB,MAAM,EAAC,MAAM,EACb,OAAO,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAC/B,MAAM,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,EAAA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EAAA,EAAA,YAAA,EACG,SAAS,CAAC,wBAAwB,CAAW,EACzD,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,OAAO,EACf,YAAY,EAAC,SAAS,EACtB,OAAO,EAAE,OAAO,EAAA,QAAA,EAEhBA,GAAA,CAAC,GAAG,EAAA,EAAC,OAAO,EAAC,IAAI,EAAA,aAAA,EAAA,IAAA,EAAA,CAAe,EAAA,CACrB,IACN,EACTA,GAAA,CAAC,GAAG,EAAA,EAAC,IAAI,EAAC,GAAG,EAAC,SAAS,EAAE,CAAC,EAAE,SAAS,EAAC,MAAM,EAAC,CAAC,EAAE,CAAC,YAC/CA,GAAA,CAAC,KAAK,EAAA,EAAC,GAAG,EAAE,CAAC,YACV,iBAAiB,CAAC,GAAG,CAAC,CAAC,QAAQ,MAC9BC,IAAA,CAAC,KAAK,IAAgB,GAAG,EAAE,CAAC,EAAA,QAAA,EAAA,CAC1BD,GAAA,CAAC,OAAO,EAAA,EACN,UAAU,EAAC,MAAM,EACjB,KAAK,EAAC,WAAW,EACjB,aAAa,EAAC,WAAW,EACzB,aAAa,EAAC,OAAO,EACrB,EAAE,EAAE,CAAC,YAEJ,eAAe,CAAC,QAAQ,CAAC,EAAA,CAClB,EACVA,GAAA,CAAC,KAAK,EAAA,EAAC,GAAG,EAAE,CAAC,YACV,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC,GAAG,CAAC,CAAC,GAAG,MACjCA,GAAA,CAAC,WAAW,EAAA,EAAgB,GAAG,EAAE,GAAG,EAAA,EAAlB,GAAG,CAAC,IAAI,CAAc,CACzC,CAAC,EAAA,CACI,CAAA,EAAA,EAdE,QAAQ,CAeZ,CACT,CAAC,EAAA,CACI,EAAA,CACJ,CAAA,EAAA,CACO;AAEnB;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MIME type the palette uses to ferry a node kind through the HTML5
|
|
3
|
+
* drag-and-drop API. Read on `drop` to look up the registered NodeTypeDef.
|
|
4
|
+
*/
|
|
5
|
+
export declare const DRAG_MIME = "application/x-workflow-node-kind";
|
|
6
|
+
export declare const PALETTE_WIDTH = "220px";
|
|
7
|
+
//# sourceMappingURL=NodePalette.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodePalette.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/NodePalette/NodePalette.styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,SAAS,qCAAqC,CAAC;AAE5D,eAAO,MAAM,aAAa,UAAU,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* MIME type the palette uses to ferry a node kind through the HTML5
|
|
6
|
+
* drag-and-drop API. Read on `drop` to look up the registered NodeTypeDef.
|
|
7
|
+
*/
|
|
8
|
+
const DRAG_MIME = 'application/x-workflow-node-kind';
|
|
9
|
+
const PALETTE_WIDTH = '220px';
|
|
10
|
+
|
|
11
|
+
exports.DRAG_MIME = DRAG_MIME;
|
|
12
|
+
exports.PALETTE_WIDTH = PALETTE_WIDTH;
|
|
13
|
+
//# sourceMappingURL=NodePalette.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodePalette.styles.js","sources":["../../../../../src/components/Workflow/canvas/NodePalette/NodePalette.styles.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;;;AAGG;AACI,MAAM,SAAS,GAAG;AAElB,MAAM,aAAa,GAAG;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/**
|
|
3
|
+
* MIME type the palette uses to ferry a node kind through the HTML5
|
|
4
|
+
* drag-and-drop API. Read on `drop` to look up the registered NodeTypeDef.
|
|
5
|
+
*/
|
|
6
|
+
const DRAG_MIME = 'application/x-workflow-node-kind';
|
|
7
|
+
const PALETTE_WIDTH = '220px';
|
|
8
|
+
|
|
9
|
+
export { DRAG_MIME, PALETTE_WIDTH };
|
|
10
|
+
//# sourceMappingURL=NodePalette.styles.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodePalette.styles.mjs","sources":["../../../../../src/components/Workflow/canvas/NodePalette/NodePalette.styles.ts"],"sourcesContent":[null],"names":[],"mappings":";AAAA;;;AAGG;AACI,MAAM,SAAS,GAAG;AAElB,MAAM,aAAa,GAAG;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collapsed entry-point for the palette: a floating `+` button docked over the
|
|
3
|
+
* canvas top-left. Opening it swaps in the full {@link NodePalette} card; the
|
|
4
|
+
* card's close button collapses back to this button. Mirrors the right-hand
|
|
5
|
+
* inspector drawer's "float over the canvas" treatment on the opposite edge.
|
|
6
|
+
*/
|
|
7
|
+
export declare function NodePaletteToggle({ onOpen }: {
|
|
8
|
+
onOpen: () => void;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=NodePaletteToggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodePaletteToggle.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/NodePalette/NodePaletteToggle.tsx"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,2CAsBnE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 Tooltip = require('../../../Tooltip/Tooltip.js');
|
|
10
|
+
var WorkflowContext = require('../../WorkflowContext/WorkflowContext.js');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Collapsed entry-point for the palette: a floating `+` button docked over the
|
|
14
|
+
* canvas top-left. Opening it swaps in the full {@link NodePalette} card; the
|
|
15
|
+
* card's close button collapses back to this button. Mirrors the right-hand
|
|
16
|
+
* inspector drawer's "float over the canvas" treatment on the opposite edge.
|
|
17
|
+
*/
|
|
18
|
+
function NodePaletteToggle({ onOpen }) {
|
|
19
|
+
const translate = WorkflowContext.useWorkflowTranslate();
|
|
20
|
+
const label = translate('workflow_palette_title');
|
|
21
|
+
return (
|
|
22
|
+
// zIndex sits above the GraphErrorBanner (zIndex 5), which docks in the same
|
|
23
|
+
// top-left corner, so the toggle stays clickable when the graph has issues.
|
|
24
|
+
jsxRuntime.jsx(react.Box, { position: "absolute", top: 4, left: 4, zIndex: 6, children: jsxRuntime.jsx(Tooltip.Tooltip, { content: label, placement: "right", children: jsxRuntime.jsx(IconButton.IconButton, { "aria-label": label, size: "md", variant: "outline", colorPalette: "neutral", bg: "bg.surface", boxShadow: "md", onClick: onOpen, children: jsxRuntime.jsx(index.IoAddOutline, { boxSize: "md" }) }) }) }));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
exports.NodePaletteToggle = NodePaletteToggle;
|
|
28
|
+
//# sourceMappingURL=NodePaletteToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodePaletteToggle.js","sources":["../../../../../src/components/Workflow/canvas/NodePalette/NodePaletteToggle.tsx"],"sourcesContent":[null],"names":["useWorkflowTranslate","_jsx","Box","Tooltip","IconButton","IoAddOutline"],"mappings":";;;;;;;;;;;AAUA;;;;;AAKG;AACG,SAAU,iBAAiB,CAAC,EAAE,MAAM,EAA0B,EAAA;AAClE,IAAA,MAAM,SAAS,GAAGA,oCAAoB,EAAE;AACxC,IAAA,MAAM,KAAK,GAAG,SAAS,CAAC,wBAAwB,CAAW;IAC3D;;;AAGE,IAAAC,cAAA,CAACC,SAAG,EAAA,EAAC,QAAQ,EAAC,UAAU,EAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAA,QAAA,EACjDD,cAAA,CAACE,eAAO,EAAA,EAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAC,OAAO,EAAA,QAAA,EACxCF,cAAA,CAACG,qBAAU,kBACG,KAAK,EACjB,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,SAAS,EACjB,YAAY,EAAC,SAAS,EACtB,EAAE,EAAC,YAAY,EACf,SAAS,EAAC,IAAI,EACd,OAAO,EAAE,MAAM,EAAA,QAAA,EAEfH,eAACI,kBAAY,EAAA,EAAC,OAAO,EAAC,IAAI,EAAA,CAAG,EAAA,CAClB,EAAA,CACL,EAAA,CACN;AAEV;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Box } from '@chakra-ui/react';
|
|
4
|
+
import { IoAddOutline } from '../../../Icon/index.mjs';
|
|
5
|
+
import { IconButton } from '../../../IconButton/IconButton.mjs';
|
|
6
|
+
import '../../../IconButton/IconButton.styles.mjs';
|
|
7
|
+
import { Tooltip } from '../../../Tooltip/Tooltip.mjs';
|
|
8
|
+
import { useWorkflowTranslate } from '../../WorkflowContext/WorkflowContext.mjs';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Collapsed entry-point for the palette: a floating `+` button docked over the
|
|
12
|
+
* canvas top-left. Opening it swaps in the full {@link NodePalette} card; the
|
|
13
|
+
* card's close button collapses back to this button. Mirrors the right-hand
|
|
14
|
+
* inspector drawer's "float over the canvas" treatment on the opposite edge.
|
|
15
|
+
*/
|
|
16
|
+
function NodePaletteToggle({ onOpen }) {
|
|
17
|
+
const translate = useWorkflowTranslate();
|
|
18
|
+
const label = translate('workflow_palette_title');
|
|
19
|
+
return (
|
|
20
|
+
// zIndex sits above the GraphErrorBanner (zIndex 5), which docks in the same
|
|
21
|
+
// top-left corner, so the toggle stays clickable when the graph has issues.
|
|
22
|
+
jsx(Box, { position: "absolute", top: 4, left: 4, zIndex: 6, children: jsx(Tooltip, { content: label, placement: "right", children: jsx(IconButton, { "aria-label": label, size: "md", variant: "outline", colorPalette: "neutral", bg: "bg.surface", boxShadow: "md", onClick: onOpen, children: jsx(IoAddOutline, { boxSize: "md" }) }) }) }));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { NodePaletteToggle };
|
|
26
|
+
//# sourceMappingURL=NodePaletteToggle.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodePaletteToggle.mjs","sources":["../../../../../src/components/Workflow/canvas/NodePalette/NodePaletteToggle.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;;;AAUA;;;;;AAKG;AACG,SAAU,iBAAiB,CAAC,EAAE,MAAM,EAA0B,EAAA;AAClE,IAAA,MAAM,SAAS,GAAG,oBAAoB,EAAE;AACxC,IAAA,MAAM,KAAK,GAAG,SAAS,CAAC,wBAAwB,CAAW;IAC3D;;;AAGE,IAAAA,GAAA,CAAC,GAAG,EAAA,EAAC,QAAQ,EAAC,UAAU,EAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAA,QAAA,EACjDA,GAAA,CAAC,OAAO,EAAA,EAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAC,OAAO,EAAA,QAAA,EACxCA,GAAA,CAAC,UAAU,kBACG,KAAK,EACjB,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,SAAS,EACjB,YAAY,EAAC,SAAS,EACtB,EAAE,EAAC,YAAY,EACf,SAAS,EAAC,IAAI,EACd,OAAO,EAAE,MAAM,EAAA,QAAA,EAEfA,IAAC,YAAY,EAAA,EAAC,OAAO,EAAC,IAAI,EAAA,CAAG,EAAA,CAClB,EAAA,CACL,EAAA,CACN;AAEV;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/NodePalette/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { NodeShellProps } from './NodeShell.types';
|
|
2
|
+
export declare function NodeShell({ label, instanceTitle, metaChips, category, icon, selected, runState, issues, inputs, outputs, connectedOutputIds, categoryTokens, customBody, }: NodeShellProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=NodeShell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeShell.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/NodeShell/NodeShell.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,mBAAmB,CAAC;AAwHpE,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,aAAa,EACb,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,kBAAkB,EAClB,cAAc,EACd,UAAU,GACX,EAAE,cAAc,2CA2JhB"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('@chakra-ui/react');
|
|
6
|
+
var react$1 = require('@xyflow/react');
|
|
7
|
+
var Card = require('../../../Card/Card.js');
|
|
8
|
+
var Chip = require('../../../Chip/Chip.js');
|
|
9
|
+
var index = require('../../../Icon/index.js');
|
|
10
|
+
require('../../../Typography/H1.js');
|
|
11
|
+
require('../../../Typography/H2.js');
|
|
12
|
+
require('../../../Typography/H3.js');
|
|
13
|
+
require('../../../Typography/H4.js');
|
|
14
|
+
require('../../../Typography/H5.js');
|
|
15
|
+
require('../../../Typography/Link.js');
|
|
16
|
+
var Subtext = require('../../../Typography/Subtext.js');
|
|
17
|
+
require('../../../Typography/Subtitle.js');
|
|
18
|
+
require('../../../Typography/Text.js');
|
|
19
|
+
var BranchLabelBadge = require('../Canvas/BranchLabelBadge.js');
|
|
20
|
+
var edgeLabelVariant = require('../Canvas/edgeLabelVariant.js');
|
|
21
|
+
var IconTile = require('../IconTile/IconTile.js');
|
|
22
|
+
var IconTile_styles = require('../IconTile/IconTile.styles.js');
|
|
23
|
+
var NodeShell_styles = require('./NodeShell.styles.js');
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Compact pill for the canvas node's meta row. Wraps logician-ui Chip
|
|
27
|
+
* and overrides its chunky default padding/radius via `metaChipStyles`.
|
|
28
|
+
* Tone tints the chip (e.g. an unknown model on an Agent node).
|
|
29
|
+
*/
|
|
30
|
+
function MetaChip({ children, tone = 'default', }) {
|
|
31
|
+
return (jsxRuntime.jsx(Chip.Chip, { ...NodeShell_styles.metaChipStyles, ...NodeShell_styles.metaChipToneStyles[tone], children: children }));
|
|
32
|
+
}
|
|
33
|
+
function normalizeChip(spec) {
|
|
34
|
+
return typeof spec === 'string'
|
|
35
|
+
? { text: spec, tone: 'default' }
|
|
36
|
+
: { text: spec.text, tone: spec.tone ?? 'default' };
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Ring + body-border treatment per state. Notes keep their warm border in
|
|
40
|
+
* all states but still surface the primary ring when selected so the active
|
|
41
|
+
* annotation is visible.
|
|
42
|
+
*
|
|
43
|
+
* Precedence for the ring color: running > error > selected > warning.
|
|
44
|
+
* The default-case border is `slate.300`.
|
|
45
|
+
*/
|
|
46
|
+
function getRingChrome(category, selected, hasError, hasWarning, runState, noteBorder) {
|
|
47
|
+
if (category === 'note') {
|
|
48
|
+
if (selected) {
|
|
49
|
+
return {
|
|
50
|
+
borderColor: noteBorder,
|
|
51
|
+
outline: '3px solid',
|
|
52
|
+
outlineColor: 'primary.lighter',
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return { borderColor: noteBorder };
|
|
56
|
+
}
|
|
57
|
+
if (runState === 'running') {
|
|
58
|
+
return {
|
|
59
|
+
borderColor: 'primary.main',
|
|
60
|
+
outline: '3px solid',
|
|
61
|
+
outlineColor: 'primary.lighter',
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
if (hasError) {
|
|
65
|
+
return {
|
|
66
|
+
borderColor: 'danger.main',
|
|
67
|
+
outline: '3px solid',
|
|
68
|
+
outlineColor: 'danger.lighter',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (selected) {
|
|
72
|
+
return {
|
|
73
|
+
borderColor: 'primary.main',
|
|
74
|
+
outline: '3px solid',
|
|
75
|
+
outlineColor: 'primary.lighter',
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (hasWarning)
|
|
79
|
+
return { borderColor: 'warning.main' };
|
|
80
|
+
return { borderColor: 'slate.300' };
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Header glyph independently selected from the ring. Error wins over
|
|
84
|
+
* warning wins over running's status dot — so an error inside a running
|
|
85
|
+
* node still surfaces the alert, instead of being hidden by the green
|
|
86
|
+
* dot.
|
|
87
|
+
*/
|
|
88
|
+
function getHeaderBadge(hasError, hasWarning, runState) {
|
|
89
|
+
if (hasError) {
|
|
90
|
+
return (jsxRuntime.jsx(react.Box, { color: "danger.main", display: "flex", alignItems: "center", children: jsxRuntime.jsx(index.AlertTriangle, { boxSize: "xs" }) }));
|
|
91
|
+
}
|
|
92
|
+
if (hasWarning) {
|
|
93
|
+
return (jsxRuntime.jsx(react.Box, { color: "warning.dark", display: "flex", alignItems: "center", children: jsxRuntime.jsx(index.AlertTriangle, { boxSize: "xs" }) }));
|
|
94
|
+
}
|
|
95
|
+
if (runState === 'running') {
|
|
96
|
+
return (jsxRuntime.jsx(react.Box, { boxSize: "2.5", borderRadius: "full", bg: "success.main", outline: "3px solid", outlineColor: "success.lighter" }));
|
|
97
|
+
}
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
function NodeShell({ label, instanceTitle, metaChips, category, icon, selected, runState, issues, inputs, outputs, connectedOutputIds, categoryTokens, customBody, }) {
|
|
101
|
+
const hasError = issues.some((i) => i.severity === 'error');
|
|
102
|
+
const hasWarning = !hasError && issues.some((i) => i.severity === 'warning');
|
|
103
|
+
const tokens = IconTile_styles.getCategoryTokens(category, categoryTokens);
|
|
104
|
+
const ring = getRingChrome(category, selected, hasError, hasWarning, runState, tokens.border);
|
|
105
|
+
const badge = getHeaderBadge(hasError, hasWarning, runState);
|
|
106
|
+
const isNote = category === 'note';
|
|
107
|
+
const chips = (metaChips ?? []).slice(0, NodeShell_styles.MAX_META_CHIPS).map(normalizeChip);
|
|
108
|
+
const overflowChip = metaChips && metaChips.length > NodeShell_styles.MAX_META_CHIPS
|
|
109
|
+
? `+${metaChips.length - NodeShell_styles.MAX_META_CHIPS}`
|
|
110
|
+
: null;
|
|
111
|
+
// Grow the card so ports stay evenly spread without crowding: the busiest
|
|
112
|
+
// side drives the height — the inter-port gaps plus a tight top/bottom edge
|
|
113
|
+
// pad — floored at NODE_MIN_HEIGHT. Notes carry no ports and size to their
|
|
114
|
+
// text, so they opt out.
|
|
115
|
+
const portCount = Math.max(inputs.length, outputs.length);
|
|
116
|
+
const minHeight = isNote
|
|
117
|
+
? undefined
|
|
118
|
+
: `${Math.max(NodeShell_styles.NODE_MIN_HEIGHT, NodeShell_styles.PORT_GAP * Math.max(portCount - 1, 0) + NodeShell_styles.PORT_EDGE_PAD * 2)}px`;
|
|
119
|
+
return (jsxRuntime.jsxs(Card.Card, { width: NodeShell_styles.CARD_WIDTH, minHeight: minHeight, p: 0, borderRadius: "lg", borderColor: ring.borderColor, outline: ring.outline, outlineColor: ring.outlineColor, boxShadow: "sm", bg: isNote ? tokens.bg : 'bg.surface', position: "relative",
|
|
120
|
+
// Center the body within the port-driven min-height so a content-light
|
|
121
|
+
// node (e.g. Start) sits mid-card rather than pinned to the top edge.
|
|
122
|
+
display: "flex", flexDirection: "column", justifyContent: "center", children: [isNote ? (jsxRuntime.jsxs(react.Stack, { gap: 1, px: 3, py: 2, children: [jsxRuntime.jsxs(react.HStack, { gap: 1, color: "warning.dark", fontWeight: "bold", letterSpacing: "wider", textTransform: "uppercase", children: [jsxRuntime.jsx(index.StickyNote, { boxSize: "xs" }), jsxRuntime.jsx(Subtext.Subtext, { color: "warning.dark", fontWeight: "bold", children: "Note" })] }), customBody ?? (jsxRuntime.jsx(Subtext.Subtext, { color: "slate.1200", lineHeight: 1.45, children: instanceTitle ?? label }))] })) : ((customBody ?? (jsxRuntime.jsxs(react.Stack, { gap: 0, children: [jsxRuntime.jsxs(react.HStack, { gap: 2, px: 3, pt: 2, pb: chips.length || overflowChip ? 1 : 2, children: [jsxRuntime.jsx(IconTile.IconTile, { category: category, icon: icon, tokens: categoryTokens }), jsxRuntime.jsxs(react.Stack, { gap: 0, flex: 1, minWidth: 0, children: [jsxRuntime.jsx(Subtext.Subtext, { fontWeight: "semibold", color: "slate.1200", lineClamp: 1, children: label }), instanceTitle ? (jsxRuntime.jsx(Subtext.Subtext, { color: "slate.900", lineClamp: 1, children: instanceTitle })) : null] }), badge] }), chips.length || overflowChip ? (jsxRuntime.jsxs(react.HStack, { px: 3, pb: 2, gap: 1, flexWrap: "wrap", children: [chips.map((chip) => (jsxRuntime.jsx(MetaChip, { tone: chip.tone, children: chip.text }, chip.text))), overflowChip ? jsxRuntime.jsx(MetaChip, { children: overflowChip }) : null] })) : null] })))), inputs.map((h, i) => (jsxRuntime.jsx(react$1.Handle, { id: h.id, type: "target", position: react$1.Position.Left, style: {
|
|
123
|
+
...NodeShell_styles.PORT_STYLE,
|
|
124
|
+
top: NodeShell_styles.getPortTop(i, inputs.length),
|
|
125
|
+
} }, `in-${h.id}`))), outputs.map((h, i) => (jsxRuntime.jsx(react$1.Handle, { id: h.id, type: "source", position: react$1.Position.Right, style: {
|
|
126
|
+
...NodeShell_styles.PORT_STYLE,
|
|
127
|
+
top: NodeShell_styles.getPortTop(i, outputs.length),
|
|
128
|
+
}, children: h.label && !connectedOutputIds?.has(h.id) ? (
|
|
129
|
+
// Same badge as the connected edge carries (see BranchLabelBadge),
|
|
130
|
+
// so disconnecting/connecting reads as the chip relocating rather
|
|
131
|
+
// than restyling. `pointerEvents="none"` keeps the handle draggable
|
|
132
|
+
// through the label.
|
|
133
|
+
jsxRuntime.jsx(react.Box, { position: "absolute", left: "14px", top: "50%", transform: "translateY(-50%)", whiteSpace: "nowrap", pointerEvents: "none", children: jsxRuntime.jsx(BranchLabelBadge.BranchLabelBadge, { variant: edgeLabelVariant.getEdgeLabelVariant(h.id), children: h.label }) })) : null }, `out-${h.id}`)))] }));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
exports.NodeShell = NodeShell;
|
|
137
|
+
//# sourceMappingURL=NodeShell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeShell.js","sources":["../../../../../src/components/Workflow/canvas/NodeShell/NodeShell.tsx"],"sourcesContent":[null],"names":["_jsx","Chip","metaChipStyles","metaChipToneStyles","Box","AlertTriangle","getCategoryTokens","MAX_META_CHIPS","NODE_MIN_HEIGHT","PORT_GAP","PORT_EDGE_PAD","_jsxs","Card","CARD_WIDTH","Stack","HStack","StickyNote","Subtext","IconTile","Handle","Position","PORT_STYLE","getPortTop","BranchLabelBadge","getEdgeLabelVariant"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiCA;;;;AAIG;AACH,SAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,IAAI,GAAG,S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