@datatechsolutions/ui 2.11.48 → 2.11.49

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.
Files changed (35) hide show
  1. package/dist/astrlabe/contracts.d.mts +309 -0
  2. package/dist/astrlabe/contracts.d.ts +309 -0
  3. package/dist/astrlabe/graph-node.d.mts +28 -0
  4. package/dist/astrlabe/graph-node.d.ts +28 -0
  5. package/dist/astrlabe/index.d.mts +749 -0
  6. package/dist/astrlabe/index.d.ts +749 -0
  7. package/dist/astrlabe/index.js +108 -108
  8. package/dist/astrlabe/index.mjs +2 -2
  9. package/dist/astrlabe/utils.d.mts +71 -0
  10. package/dist/astrlabe/utils.d.ts +71 -0
  11. package/dist/astrlabe/workflow-canvas.d.mts +5 -0
  12. package/dist/astrlabe/workflow-canvas.d.ts +5 -0
  13. package/dist/astrlabe/workflow-canvas.js +2 -2
  14. package/dist/astrlabe/workflow-canvas.mjs +1 -1
  15. package/dist/astrlabe/workflow-preview-canvas.d.mts +10 -0
  16. package/dist/astrlabe/workflow-preview-canvas.d.ts +10 -0
  17. package/dist/brand/index.d.mts +85 -0
  18. package/dist/brand/index.d.ts +85 -0
  19. package/dist/{chunk-XDS3RWPA.mjs → chunk-2PDBTL32.mjs} +9 -13
  20. package/dist/chunk-2PDBTL32.mjs.map +1 -0
  21. package/dist/{chunk-NWELMK3Y.js → chunk-BN5S4O4N.js} +9 -13
  22. package/dist/chunk-BN5S4O4N.js.map +1 -0
  23. package/dist/dynamic-island-confirm-Bw24Ll2r.d.mts +114 -0
  24. package/dist/dynamic-island-confirm-Bw24Ll2r.d.ts +114 -0
  25. package/dist/index.d.mts +4673 -0
  26. package/dist/index.d.ts +4673 -0
  27. package/dist/lib/i18n-context.d.mts +36 -0
  28. package/dist/lib/i18n-context.d.ts +36 -0
  29. package/dist/lib/router-context.d.mts +35 -0
  30. package/dist/lib/router-context.d.ts +35 -0
  31. package/dist/workflow-canvas-D4928AfA.d.mts +273 -0
  32. package/dist/workflow-canvas-NSxfr5dy.d.ts +273 -0
  33. package/package.json +1 -1
  34. package/dist/chunk-NWELMK3Y.js.map +0 -1
  35. package/dist/chunk-XDS3RWPA.mjs.map +0 -1
@@ -0,0 +1,71 @@
1
+ import { WorkflowNodeType, LogicNodeConfig, WorkflowGraph } from './contracts.js';
2
+ import { Node, Edge } from '@xyflow/react';
3
+
4
+ /**
5
+ * Layout Engine
6
+ * =============
7
+ * Auto-layout for workflow graphs using @dagrejs/dagre.
8
+ * Pure utility — no React dependencies.
9
+ */
10
+
11
+ /** Layout direction: free means no auto-layout is applied. */
12
+ type LayoutDirection = 'free' | 'LR' | 'TB';
13
+ /**
14
+ * Apply dagre layout to the given nodes and edges.
15
+ * Returns a new array of nodes with updated positions.
16
+ * Group child nodes (parentId set) and note nodes are excluded from layout.
17
+ */
18
+ declare function applyDagreLayout(nodes: Node[], edges: Edge[], direction: Exclude<LayoutDirection, 'free'>): Node[];
19
+
20
+ /**
21
+ * Logic Node Default Configs
22
+ * ==========================
23
+ * Factory function to create default configs for each logic node type.
24
+ */
25
+
26
+ declare function createDefaultLogicNodeConfig(nodeType: WorkflowNodeType): LogicNodeConfig | null;
27
+
28
+ /**
29
+ * Workflow Validator
30
+ * =================
31
+ * Validates the workflow graph before publishing.
32
+ * Ensures the graph forms a valid DAG with proper node connections.
33
+ */
34
+
35
+ type ValidationResult = {
36
+ valid: boolean;
37
+ errors: string[];
38
+ };
39
+ /**
40
+ * Validate a workflow graph for publishing.
41
+ * Checks:
42
+ * - At least one agent node exists
43
+ * - All edges have valid source/target nodes
44
+ * - No orphan nodes (every node has at least one connection, except note nodes)
45
+ * - Tool nodes connect to agent nodes only
46
+ * - Agent chain forms a valid DAG (no cycles)
47
+ * - Rule nodes have incoming edges from agents
48
+ * - Logic node constraints (start/end uniqueness, config validation)
49
+ * - New node type validations (answer, question_classifier, parameter_extractor, etc.)
50
+ */
51
+ declare function validateWorkflowGraph(graph: WorkflowGraph): ValidationResult;
52
+ /**
53
+ * Topologically sort agent nodes from the graph edges.
54
+ * Returns agent entityIds in execution order.
55
+ * Logic nodes are skipped — only agent entityIds are returned.
56
+ */
57
+ declare function topologicalSortAgents(graph: WorkflowGraph): string[];
58
+
59
+ /**
60
+ * Agent ELO Tier
61
+ * ==============
62
+ * Derives difficulty tier from agent ELO rating.
63
+ * Used in node palette, agent flow node, and agent modal.
64
+ */
65
+ type AgentTier = {
66
+ key: 'beginner' | 'intermediate' | 'advanced' | 'expert';
67
+ pillColor: string;
68
+ };
69
+ declare function getAgentTier(elo: number | undefined): AgentTier;
70
+
71
+ export { type AgentTier, type LayoutDirection, applyDagreLayout, createDefaultLogicNodeConfig, getAgentTier, topologicalSortAgents, validateWorkflowGraph };
@@ -0,0 +1,5 @@
1
+ import 'react/jsx-runtime';
2
+ import 'react';
3
+ export { j as Workspace, h as WorkspaceProps } from '../workflow-canvas-D4928AfA.mjs';
4
+ import '@xyflow/react';
5
+ import './contracts.mjs';
@@ -0,0 +1,5 @@
1
+ import 'react/jsx-runtime';
2
+ import 'react';
3
+ export { j as Workspace, h as WorkspaceProps } from '../workflow-canvas-NSxfr5dy.js';
4
+ import '@xyflow/react';
5
+ import './contracts.js';
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkNWELMK3Y_js = require('../chunk-NWELMK3Y.js');
4
+ var chunkBN5S4O4N_js = require('../chunk-BN5S4O4N.js');
5
5
  require('../chunk-2IOPJ5BM.js');
6
6
  require('../chunk-UZ3CMNUJ.js');
7
7
  require('../chunk-YXN2K77G.js');
@@ -13,7 +13,7 @@ require('../chunk-PWBWP5FJ.js');
13
13
 
14
14
  Object.defineProperty(exports, "Workspace", {
15
15
  enumerable: true,
16
- get: function () { return chunkNWELMK3Y_js.Workspace; }
16
+ get: function () { return chunkBN5S4O4N_js.Workspace; }
17
17
  });
18
18
  //# sourceMappingURL=workflow-canvas.js.map
19
19
  //# sourceMappingURL=workflow-canvas.js.map
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- export { Workspace } from '../chunk-XDS3RWPA.mjs';
2
+ export { Workspace } from '../chunk-2PDBTL32.mjs';
3
3
  import '../chunk-MDD6H63O.mjs';
4
4
  import '../chunk-D2JF6C3E.mjs';
5
5
  import '../chunk-7VJ7CMMT.mjs';
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { WorkflowGraph } from './contracts.mjs';
3
+
4
+ type WorkflowPreviewCanvasProps = {
5
+ graph: WorkflowGraph;
6
+ className?: string;
7
+ };
8
+ declare function WorkflowPreviewCanvas({ graph, className }: WorkflowPreviewCanvasProps): react_jsx_runtime.JSX.Element;
9
+
10
+ export { WorkflowPreviewCanvas, type WorkflowPreviewCanvasProps };
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { WorkflowGraph } from './contracts.js';
3
+
4
+ type WorkflowPreviewCanvasProps = {
5
+ graph: WorkflowGraph;
6
+ className?: string;
7
+ };
8
+ declare function WorkflowPreviewCanvas({ graph, className }: WorkflowPreviewCanvasProps): react_jsx_runtime.JSX.Element;
9
+
10
+ export { WorkflowPreviewCanvas, type WorkflowPreviewCanvasProps };
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Brand — centralized app themes, icons, and logos
3
+ * =================================================
4
+ * Single source of truth for all app branding across the platform.
5
+ *
6
+ * Logo SVGs live in src/brand/logos/ and are published as-is.
7
+ * Vite apps can import them directly:
8
+ * import fuelIcon from '@datatechsolutions/ui/src/brand/logos/fuel-icon.svg'
9
+ * Or use the APP_LOGOS/APP_THEMES which re-export them (works in Vite).
10
+ */
11
+ interface AppTheme {
12
+ text: string;
13
+ textLight: string;
14
+ badgeBg: string;
15
+ badgeText: string;
16
+ ring: string;
17
+ border: string;
18
+ borderGlow: string;
19
+ surfaceBg: string;
20
+ dot: string;
21
+ tileGradient: string;
22
+ tileShadow: string;
23
+ gradient: string;
24
+ }
25
+ declare const APP_THEMES: {
26
+ readonly astrlabe: {
27
+ readonly text: "text-violet-400";
28
+ readonly textLight: "text-violet-300";
29
+ readonly badgeBg: "bg-violet-500/10";
30
+ readonly badgeText: "text-violet-300";
31
+ readonly ring: "ring-violet-500/30";
32
+ readonly border: "border-violet-500/30";
33
+ readonly borderGlow: "border-violet-500/20";
34
+ readonly surfaceBg: "bg-violet-500/[0.06]";
35
+ readonly dot: "bg-violet-400";
36
+ readonly tileGradient: "from-violet-600/80 to-purple-600/80";
37
+ readonly tileShadow: "shadow-violet-500/20";
38
+ readonly gradient: "from-violet-400 to-purple-400";
39
+ };
40
+ readonly 'fuel-price-ai': {
41
+ readonly text: "text-blue-400";
42
+ readonly textLight: "text-blue-300";
43
+ readonly badgeBg: "bg-blue-500/10";
44
+ readonly badgeText: "text-blue-300";
45
+ readonly ring: "ring-blue-500/30";
46
+ readonly border: "border-blue-500/30";
47
+ readonly borderGlow: "border-blue-500/20";
48
+ readonly surfaceBg: "bg-blue-500/[0.06]";
49
+ readonly dot: "bg-blue-400";
50
+ readonly tileGradient: "from-blue-600/80 to-indigo-600/80";
51
+ readonly tileShadow: "shadow-blue-500/20";
52
+ readonly gradient: "from-blue-400 to-indigo-400";
53
+ };
54
+ readonly 'kori-erp': {
55
+ readonly text: "text-orange-400";
56
+ readonly textLight: "text-orange-300";
57
+ readonly badgeBg: "bg-orange-500/10";
58
+ readonly badgeText: "text-orange-300";
59
+ readonly ring: "ring-orange-500/30";
60
+ readonly border: "border-orange-500/30";
61
+ readonly borderGlow: "border-orange-500/20";
62
+ readonly surfaceBg: "bg-orange-500/[0.06]";
63
+ readonly dot: "bg-orange-400";
64
+ readonly tileGradient: "from-orange-600/80 to-amber-600/80";
65
+ readonly tileShadow: "shadow-orange-500/20";
66
+ readonly gradient: "from-orange-400 to-amber-400";
67
+ };
68
+ readonly windsock: {
69
+ readonly text: "text-emerald-400";
70
+ readonly textLight: "text-emerald-300";
71
+ readonly badgeBg: "bg-emerald-500/10";
72
+ readonly badgeText: "text-emerald-300";
73
+ readonly ring: "ring-emerald-500/30";
74
+ readonly border: "border-emerald-500/30";
75
+ readonly borderGlow: "border-emerald-500/20";
76
+ readonly surfaceBg: "bg-emerald-500/[0.06]";
77
+ readonly dot: "bg-emerald-400";
78
+ readonly tileGradient: "from-emerald-600/80 to-teal-600/80";
79
+ readonly tileShadow: "shadow-emerald-500/20";
80
+ readonly gradient: "from-emerald-400 to-teal-400";
81
+ };
82
+ };
83
+ type AppId = keyof typeof APP_THEMES;
84
+
85
+ export { APP_THEMES, type AppId, type AppTheme };
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Brand — centralized app themes, icons, and logos
3
+ * =================================================
4
+ * Single source of truth for all app branding across the platform.
5
+ *
6
+ * Logo SVGs live in src/brand/logos/ and are published as-is.
7
+ * Vite apps can import them directly:
8
+ * import fuelIcon from '@datatechsolutions/ui/src/brand/logos/fuel-icon.svg'
9
+ * Or use the APP_LOGOS/APP_THEMES which re-export them (works in Vite).
10
+ */
11
+ interface AppTheme {
12
+ text: string;
13
+ textLight: string;
14
+ badgeBg: string;
15
+ badgeText: string;
16
+ ring: string;
17
+ border: string;
18
+ borderGlow: string;
19
+ surfaceBg: string;
20
+ dot: string;
21
+ tileGradient: string;
22
+ tileShadow: string;
23
+ gradient: string;
24
+ }
25
+ declare const APP_THEMES: {
26
+ readonly astrlabe: {
27
+ readonly text: "text-violet-400";
28
+ readonly textLight: "text-violet-300";
29
+ readonly badgeBg: "bg-violet-500/10";
30
+ readonly badgeText: "text-violet-300";
31
+ readonly ring: "ring-violet-500/30";
32
+ readonly border: "border-violet-500/30";
33
+ readonly borderGlow: "border-violet-500/20";
34
+ readonly surfaceBg: "bg-violet-500/[0.06]";
35
+ readonly dot: "bg-violet-400";
36
+ readonly tileGradient: "from-violet-600/80 to-purple-600/80";
37
+ readonly tileShadow: "shadow-violet-500/20";
38
+ readonly gradient: "from-violet-400 to-purple-400";
39
+ };
40
+ readonly 'fuel-price-ai': {
41
+ readonly text: "text-blue-400";
42
+ readonly textLight: "text-blue-300";
43
+ readonly badgeBg: "bg-blue-500/10";
44
+ readonly badgeText: "text-blue-300";
45
+ readonly ring: "ring-blue-500/30";
46
+ readonly border: "border-blue-500/30";
47
+ readonly borderGlow: "border-blue-500/20";
48
+ readonly surfaceBg: "bg-blue-500/[0.06]";
49
+ readonly dot: "bg-blue-400";
50
+ readonly tileGradient: "from-blue-600/80 to-indigo-600/80";
51
+ readonly tileShadow: "shadow-blue-500/20";
52
+ readonly gradient: "from-blue-400 to-indigo-400";
53
+ };
54
+ readonly 'kori-erp': {
55
+ readonly text: "text-orange-400";
56
+ readonly textLight: "text-orange-300";
57
+ readonly badgeBg: "bg-orange-500/10";
58
+ readonly badgeText: "text-orange-300";
59
+ readonly ring: "ring-orange-500/30";
60
+ readonly border: "border-orange-500/30";
61
+ readonly borderGlow: "border-orange-500/20";
62
+ readonly surfaceBg: "bg-orange-500/[0.06]";
63
+ readonly dot: "bg-orange-400";
64
+ readonly tileGradient: "from-orange-600/80 to-amber-600/80";
65
+ readonly tileShadow: "shadow-orange-500/20";
66
+ readonly gradient: "from-orange-400 to-amber-400";
67
+ };
68
+ readonly windsock: {
69
+ readonly text: "text-emerald-400";
70
+ readonly textLight: "text-emerald-300";
71
+ readonly badgeBg: "bg-emerald-500/10";
72
+ readonly badgeText: "text-emerald-300";
73
+ readonly ring: "ring-emerald-500/30";
74
+ readonly border: "border-emerald-500/30";
75
+ readonly borderGlow: "border-emerald-500/20";
76
+ readonly surfaceBg: "bg-emerald-500/[0.06]";
77
+ readonly dot: "bg-emerald-400";
78
+ readonly tileGradient: "from-emerald-600/80 to-teal-600/80";
79
+ readonly tileShadow: "shadow-emerald-500/20";
80
+ readonly gradient: "from-emerald-400 to-teal-400";
81
+ };
82
+ };
83
+ type AppId = keyof typeof APP_THEMES;
84
+
85
+ export { APP_THEMES, type AppId, type AppTheme };
@@ -5662,7 +5662,6 @@ function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables,
5662
5662
  const nodeLabel = logicNodeData?.nodeLabel ?? "";
5663
5663
  const config = logicNodeData?.config ?? null;
5664
5664
  if (!config || !nodeId) return null;
5665
- if (config.type === "datasource") return null;
5666
5665
  const entityMasterId = config.type === "entity" ? config.entityMasterId : void 0;
5667
5666
  const IconComponent = entityMasterId ? getEntityIcon(entityMasterId) : LOGIC_ICON_MAP[config.type];
5668
5667
  const gradient = entityMasterId ? getEntityGradient(entityMasterId) : LOGIC_NODE_GRADIENTS[config.type] ?? "from-gray-400 to-gray-500";
@@ -5705,9 +5704,7 @@ function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables,
5705
5704
  return /* @__PURE__ */ jsx(ListOperatorNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
5706
5705
  case "iteration_start":
5707
5706
  return /* @__PURE__ */ jsx(IterationStartNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
5708
- case "datasource":
5709
- return null;
5710
- // Datasource uses its own GlassModal with sidebar — rendered separately
5707
+ // datasource — handled by standalone DatasourceNodeConfigForm in WorkflowCanvas
5711
5708
  case "entity":
5712
5709
  return /* @__PURE__ */ jsx(EntityNodeConfigForm, { config, entities, onSave: handleSave, onCancel: closeModal });
5713
5710
  case "group":
@@ -6217,13 +6214,12 @@ function WorkflowCanvasInner({
6217
6214
  const handleEditLogicNode = useCallback((nodeId) => {
6218
6215
  setEditingLogicNodeId(nodeId);
6219
6216
  const node = getNode(nodeId);
6220
- if (node) {
6221
- const nodeData = node.data;
6222
- const config = nodeData.config;
6223
- if (config) {
6224
- openLogicNodeModalAction(nodeId, nodeData.label ?? "", config);
6225
- }
6226
- }
6217
+ if (!node) return;
6218
+ const nodeData = node.data;
6219
+ const config = nodeData.config;
6220
+ if (!config) return;
6221
+ if (config.type === "datasource") return;
6222
+ openLogicNodeModalAction(nodeId, nodeData.label ?? "", config);
6227
6223
  }, [getNode, openLogicNodeModalAction]);
6228
6224
  const agentMap = useMemo(() => {
6229
6225
  const map = /* @__PURE__ */ new Map();
@@ -7829,5 +7825,5 @@ function Workspace({
7829
7825
  }
7830
7826
 
7831
7827
  export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, ICON_MAP, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, ModelProviderFlowNode, NODE_EXECUTION_ACCENT_COLORS, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getNodeExecutionAccent, getNodeExecutionAccentRgb, isFrameworkCompatibleWithProviders, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
7832
- //# sourceMappingURL=chunk-XDS3RWPA.mjs.map
7833
- //# sourceMappingURL=chunk-XDS3RWPA.mjs.map
7828
+ //# sourceMappingURL=chunk-2PDBTL32.mjs.map
7829
+ //# sourceMappingURL=chunk-2PDBTL32.mjs.map