@datatechsolutions/ui 3.3.0 → 3.4.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.
Files changed (166) hide show
  1. package/dist/astrlabe/index.d.mts +22 -30
  2. package/dist/astrlabe/index.d.ts +22 -30
  3. package/dist/astrlabe/index.js +112 -112
  4. package/dist/astrlabe/index.mjs +5 -5
  5. package/dist/astrlabe/workflow-canvas.d.mts +6 -69
  6. package/dist/astrlabe/workflow-canvas.d.ts +6 -69
  7. package/dist/astrlabe/workflow-canvas.js +5 -5
  8. package/dist/astrlabe/workflow-canvas.mjs +4 -4
  9. package/dist/brand/index.d.mts +1 -15
  10. package/dist/brand/index.d.ts +1 -15
  11. package/dist/brand/index.js +0 -14
  12. package/dist/brand/index.js.map +1 -1
  13. package/dist/brand/index.mjs +0 -14
  14. package/dist/brand/index.mjs.map +1 -1
  15. package/dist/{chunk-FAGDZEKM.js → chunk-2OZZH2IO.js} +2 -2
  16. package/dist/chunk-2OZZH2IO.js.map +1 -0
  17. package/dist/{chunk-SYNVNTLJ.mjs → chunk-3AY5HIQ6.mjs} +2 -2
  18. package/dist/chunk-3AY5HIQ6.mjs.map +1 -0
  19. package/dist/{chunk-JSNRCYSO.js → chunk-45QAUEYT.js} +4 -4
  20. package/dist/{chunk-JSNRCYSO.js.map → chunk-45QAUEYT.js.map} +1 -1
  21. package/dist/{chunk-B67DP7MI.mjs → chunk-4GDWGWHY.mjs} +4 -4
  22. package/dist/{chunk-B67DP7MI.mjs.map → chunk-4GDWGWHY.mjs.map} +1 -1
  23. package/dist/{chunk-KR2X2WHJ.js → chunk-4ICEQJH4.js} +53 -53
  24. package/dist/{chunk-KR2X2WHJ.js.map → chunk-4ICEQJH4.js.map} +1 -1
  25. package/dist/{chunk-RXZNACMI.js → chunk-6MBWKOPF.js} +33 -33
  26. package/dist/{chunk-RXZNACMI.js.map → chunk-6MBWKOPF.js.map} +1 -1
  27. package/dist/{chunk-JN6IL6OH.mjs → chunk-AGGOHPMZ.mjs} +1054 -5229
  28. package/dist/chunk-AGGOHPMZ.mjs.map +1 -0
  29. package/dist/{chunk-5GDKCFM5.mjs → chunk-AL73YAV4.mjs} +3 -3
  30. package/dist/{chunk-5GDKCFM5.mjs.map → chunk-AL73YAV4.mjs.map} +1 -1
  31. package/dist/{chunk-ZJPNP2YW.mjs → chunk-BUDZNAKL.mjs} +2 -2
  32. package/dist/chunk-BUDZNAKL.mjs.map +1 -0
  33. package/dist/{chunk-OL73LBX5.mjs → chunk-BW67WFHT.mjs} +3 -4
  34. package/dist/chunk-BW67WFHT.mjs.map +1 -0
  35. package/dist/{chunk-W5OEBO6E.js → chunk-CF7GOUBQ.js} +13 -14
  36. package/dist/chunk-CF7GOUBQ.js.map +1 -0
  37. package/dist/{chunk-IRPS5UCS.mjs → chunk-CUWPLPVY.mjs} +3 -3
  38. package/dist/{chunk-IRPS5UCS.mjs.map → chunk-CUWPLPVY.mjs.map} +1 -1
  39. package/dist/{chunk-IJAKZHXX.js → chunk-ERCDMBRT.js} +683 -645
  40. package/dist/chunk-ERCDMBRT.js.map +1 -0
  41. package/dist/{chunk-I2NZGVBG.js → chunk-FSBR4RCK.js} +1101 -5313
  42. package/dist/chunk-FSBR4RCK.js.map +1 -0
  43. package/dist/{chunk-5RM6NGZ6.mjs → chunk-IDEM3DYF.mjs} +3 -3
  44. package/dist/{chunk-5RM6NGZ6.mjs.map → chunk-IDEM3DYF.mjs.map} +1 -1
  45. package/dist/{chunk-NJFRJ6YD.js → chunk-M7KSEUZR.js} +225 -384
  46. package/dist/chunk-M7KSEUZR.js.map +1 -0
  47. package/dist/{chunk-AOUUZ52N.js → chunk-MO5FBVV3.js} +85 -86
  48. package/dist/chunk-MO5FBVV3.js.map +1 -0
  49. package/dist/{chunk-BR2GAZKG.mjs → chunk-NAFWHJCM.mjs} +7 -7
  50. package/dist/{chunk-BR2GAZKG.mjs.map → chunk-NAFWHJCM.mjs.map} +1 -1
  51. package/dist/{chunk-3JJWPOK6.js → chunk-NCLZKVJK.js} +9 -10
  52. package/dist/chunk-NCLZKVJK.js.map +1 -0
  53. package/dist/{chunk-R4TQWXNG.mjs → chunk-NVQWHJQH.mjs} +6 -5
  54. package/dist/chunk-NVQWHJQH.mjs.map +1 -0
  55. package/dist/{chunk-ZL6C2ZAF.js → chunk-PGVZKMOA.js} +67 -67
  56. package/dist/{chunk-ZL6C2ZAF.js.map → chunk-PGVZKMOA.js.map} +1 -1
  57. package/dist/{chunk-UDDZTTLO.mjs → chunk-QBFE7ABE.mjs} +6 -7
  58. package/dist/chunk-QBFE7ABE.mjs.map +1 -0
  59. package/dist/{chunk-3ZUMJTDT.mjs → chunk-RFRXS4PC.mjs} +3 -4
  60. package/dist/{chunk-3JJWPOK6.js.map → chunk-RFRXS4PC.mjs.map} +1 -1
  61. package/dist/{chunk-ZV5EZXXO.mjs → chunk-RHRJXK5R.mjs} +3 -3
  62. package/dist/{chunk-ZV5EZXXO.mjs.map → chunk-RHRJXK5R.mjs.map} +1 -1
  63. package/dist/{chunk-MWPTSBAI.js → chunk-RLLP7VQJ.js} +26 -26
  64. package/dist/{chunk-MWPTSBAI.js.map → chunk-RLLP7VQJ.js.map} +1 -1
  65. package/dist/{chunk-GIQXB3BG.mjs → chunk-RLVOG5OQ.mjs} +3 -3
  66. package/dist/{chunk-GIQXB3BG.mjs.map → chunk-RLVOG5OQ.mjs.map} +1 -1
  67. package/dist/{chunk-2WXRRQM3.mjs → chunk-SEYUYGER.mjs} +553 -516
  68. package/dist/chunk-SEYUYGER.mjs.map +1 -0
  69. package/dist/{chunk-O6M3KDGT.mjs → chunk-SQ4KGLBZ.mjs} +4 -4
  70. package/dist/{chunk-O6M3KDGT.mjs.map → chunk-SQ4KGLBZ.mjs.map} +1 -1
  71. package/dist/{chunk-F54Q2YJY.js → chunk-SY4MUT5V.js} +7 -7
  72. package/dist/{chunk-F54Q2YJY.js.map → chunk-SY4MUT5V.js.map} +1 -1
  73. package/dist/{chunk-ZM5MVWIT.js → chunk-TUQLZ4QD.js} +5 -6
  74. package/dist/chunk-TUQLZ4QD.js.map +1 -0
  75. package/dist/{chunk-TVMLV675.js → chunk-UE2RDQIK.js} +98 -95
  76. package/dist/chunk-UE2RDQIK.js.map +1 -0
  77. package/dist/{chunk-HDCUWUNH.js → chunk-UJVDI66K.js} +28 -27
  78. package/dist/chunk-UJVDI66K.js.map +1 -0
  79. package/dist/{chunk-PCYL4MII.mjs → chunk-VV6SYMPM.mjs} +156 -314
  80. package/dist/chunk-VV6SYMPM.mjs.map +1 -0
  81. package/dist/{chunk-HZ4LOVHM.js → chunk-VY52Y5GC.js} +2 -2
  82. package/dist/chunk-VY52Y5GC.js.map +1 -0
  83. package/dist/{chunk-LEKZUS6N.mjs → chunk-X3GW7UPN.mjs} +4 -5
  84. package/dist/chunk-X3GW7UPN.mjs.map +1 -0
  85. package/dist/{chunk-OCELRSLO.js → chunk-Y2AYFG4E.js} +4 -4
  86. package/dist/{chunk-OCELRSLO.js.map → chunk-Y2AYFG4E.js.map} +1 -1
  87. package/dist/{chunk-TIJJHW2Z.js → chunk-YV7F7IXG.js} +36 -36
  88. package/dist/{chunk-TIJJHW2Z.js.map → chunk-YV7F7IXG.js.map} +1 -1
  89. package/dist/{chunk-MVBIAXVN.mjs → chunk-ZKSDDFHG.mjs} +14 -11
  90. package/dist/chunk-ZKSDDFHG.mjs.map +1 -0
  91. package/dist/{index-VI9gyJXl.d.mts → index-BNRGVAS5.d.mts} +9 -2
  92. package/dist/index-BoebbJ44.d.mts +49 -0
  93. package/dist/index-BoebbJ44.d.ts +49 -0
  94. package/dist/{index-CoB18TbG.d.ts → index-CnCY-b5V.d.ts} +9 -2
  95. package/dist/index.d.mts +399 -548
  96. package/dist/index.d.ts +399 -548
  97. package/dist/index.js +727 -887
  98. package/dist/index.mjs +3 -3
  99. package/dist/platform/admin/index.js +12 -12
  100. package/dist/platform/admin/index.mjs +6 -6
  101. package/dist/platform/agents-workspace.js +8 -8
  102. package/dist/platform/agents-workspace.mjs +7 -7
  103. package/dist/platform/app-shell.js +5 -5
  104. package/dist/platform/app-shell.mjs +4 -4
  105. package/dist/platform/auth/index.js +29 -29
  106. package/dist/platform/auth/index.mjs +6 -6
  107. package/dist/platform/billing/index.js +5 -5
  108. package/dist/platform/billing/index.mjs +4 -4
  109. package/dist/platform/impersonation/index.js +5 -5
  110. package/dist/platform/impersonation/index.mjs +4 -4
  111. package/dist/platform/index.d.mts +3 -39
  112. package/dist/platform/index.d.ts +3 -39
  113. package/dist/platform/index.js +95 -4805
  114. package/dist/platform/index.js.map +1 -1
  115. package/dist/platform/index.mjs +23 -4728
  116. package/dist/platform/index.mjs.map +1 -1
  117. package/dist/platform/pages/index.d.mts +4 -4
  118. package/dist/platform/pages/index.d.ts +4 -4
  119. package/dist/platform/pages/index.js +197 -197
  120. package/dist/platform/pages/index.mjs +9 -9
  121. package/dist/platform/rbac.d.mts +2 -1
  122. package/dist/platform/rbac.d.ts +2 -1
  123. package/dist/platform/rbac.js +2 -2
  124. package/dist/platform/rbac.mjs +1 -1
  125. package/dist/platform/settings/index.js +9 -9
  126. package/dist/platform/settings/index.mjs +8 -8
  127. package/dist/platform/utils/index.js +3 -3
  128. package/dist/platform/utils/index.js.map +1 -1
  129. package/dist/platform/utils/index.mjs +1 -1
  130. package/dist/platform/utils/index.mjs.map +1 -1
  131. package/dist/platform/workflow-api-client.d.mts +2 -2
  132. package/dist/platform/workflow-api-client.d.ts +2 -2
  133. package/dist/platform/workflow-api-client.js +62 -62
  134. package/dist/platform/workflow-api-client.mjs +2 -2
  135. package/dist/platform/workflow-canvas-shell.js +6 -6
  136. package/dist/platform/workflow-canvas-shell.mjs +5 -5
  137. package/dist/{workflow-api-client-DoYj7nHz.d.mts → workflow-api-client-CpFl3WcG.d.mts} +1 -1
  138. package/dist/{workflow-api-client-BKD8OfP_.d.ts → workflow-api-client-uLICOanv.d.ts} +1 -1
  139. package/dist/workflow-canvas--qaYKuMm.d.ts +113 -0
  140. package/dist/workflow-canvas-B80fmD_n.d.mts +113 -0
  141. package/package.json +15 -5
  142. package/src/styles/liquid-glass.css +283 -2
  143. package/dist/chunk-2WXRRQM3.mjs.map +0 -1
  144. package/dist/chunk-3ZUMJTDT.mjs.map +0 -1
  145. package/dist/chunk-AOUUZ52N.js.map +0 -1
  146. package/dist/chunk-FAGDZEKM.js.map +0 -1
  147. package/dist/chunk-HDCUWUNH.js.map +0 -1
  148. package/dist/chunk-HZ4LOVHM.js.map +0 -1
  149. package/dist/chunk-I2NZGVBG.js.map +0 -1
  150. package/dist/chunk-IJAKZHXX.js.map +0 -1
  151. package/dist/chunk-JN6IL6OH.mjs.map +0 -1
  152. package/dist/chunk-LEKZUS6N.mjs.map +0 -1
  153. package/dist/chunk-MVBIAXVN.mjs.map +0 -1
  154. package/dist/chunk-NJFRJ6YD.js.map +0 -1
  155. package/dist/chunk-OL73LBX5.mjs.map +0 -1
  156. package/dist/chunk-PCYL4MII.mjs.map +0 -1
  157. package/dist/chunk-R4TQWXNG.mjs.map +0 -1
  158. package/dist/chunk-SYNVNTLJ.mjs.map +0 -1
  159. package/dist/chunk-TVMLV675.js.map +0 -1
  160. package/dist/chunk-UDDZTTLO.mjs.map +0 -1
  161. package/dist/chunk-W5OEBO6E.js.map +0 -1
  162. package/dist/chunk-ZJPNP2YW.mjs.map +0 -1
  163. package/dist/chunk-ZM5MVWIT.js.map +0 -1
  164. package/src/brand/logos/kori-icon.svg +0 -45
  165. package/src/brand/logos/kori-logo-dark.svg +0 -40
  166. package/src/brand/logos/kori-logo.svg +0 -43
@@ -1,5 +1,5 @@
1
1
  import { WorkflowGraph, WorkflowRun, AgentRule, WorkflowTool, AgentTool, Workflow, VariableValue, AgentModel } from './astrlabe/contracts.mjs';
2
- import { A as AgentWithPrompts } from './index-VI9gyJXl.mjs';
2
+ import { A as AgentWithPrompts } from './index-BNRGVAS5.mjs';
3
3
  import { AgentPrompt } from '@datatechsolutions/shared-domain/ports/workflow';
4
4
  import { AgentConfigLike, DataSource } from '@datatechsolutions/shared-domain/common';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { WorkflowGraph, WorkflowRun, AgentRule, WorkflowTool, AgentTool, Workflow, VariableValue, AgentModel } from './astrlabe/contracts.js';
2
- import { A as AgentWithPrompts } from './index-CoB18TbG.js';
2
+ import { A as AgentWithPrompts } from './index-CnCY-b5V.js';
3
3
  import { AgentPrompt } from '@datatechsolutions/shared-domain/ports/workflow';
4
4
  import { AgentConfigLike, DataSource } from '@datatechsolutions/shared-domain/common';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -0,0 +1,113 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentProps } from 'react';
3
+ import { WorkflowTool, AgentTool, AgentRule, AgentModel, WorkflowGraph, LogicNodeConfig } from './astrlabe/contracts.js';
4
+ import { A as AgentWithPrompts, W as WorkflowEntityDefinition } from './index-CnCY-b5V.js';
5
+ import { NodeTypes } from '@xyflow/react';
6
+
7
+ type ModelProvider = {
8
+ id: string;
9
+ name: string;
10
+ /** The provider's runtime SDK / endpoint family. Different from the
11
+ * model families it CAN serve (see `servedFamilies`). E.g., a
12
+ * Bedrock provider has `provider: 'amazon'` but
13
+ * `servedFamilies: ['anthropic', 'amazon', 'meta', 'openai']`. */
14
+ provider: string;
15
+ modelCount: number;
16
+ configured: boolean;
17
+ /** Which model families this provider can serve at run-time. Used
18
+ * to compute the cartesian (model × provider) available to an
19
+ * agent. Defaults to `[provider]` when omitted (i.e., direct API
20
+ * providers that only serve their own family). */
21
+ servedFamilies?: string[];
22
+ /** Optional masked API key for display (`sk-prod-•••3742`). */
23
+ apiKeyMasked?: string;
24
+ /** ARN/SSM path of the secret, displayed read-only. */
25
+ credentialRef?: string;
26
+ /** ISO timestamp of last successful auth handshake. */
27
+ lastVerifiedAt?: string;
28
+ };
29
+ type NodePaletteProps = {
30
+ agents: AgentWithPrompts[];
31
+ tools: WorkflowTool[];
32
+ agentTools?: AgentTool[];
33
+ rules: AgentRule[];
34
+ entities?: WorkflowEntityDefinition[];
35
+ modelProviders?: ModelProvider[];
36
+ onCreateAgent?: () => void;
37
+ onCreateTool?: () => void;
38
+ onCreateAgentTool?: () => void;
39
+ onCreateRule?: () => void;
40
+ onCreateDatasource?: () => void;
41
+ onConfigureProvider?: (providerId: string) => void;
42
+ };
43
+ declare function NodePalette({ agents, tools, agentTools, rules, entities, modelProviders, onCreateAgent, onCreateTool, onCreateAgentTool, onCreateRule, onCreateDatasource, onConfigureProvider }: NodePaletteProps): react_jsx_runtime.JSX.Element;
44
+
45
+ type AgentModalRenderProps = {
46
+ agent: AgentWithPrompts | null;
47
+ models: AgentModel[];
48
+ open: boolean;
49
+ isCreateMode: boolean;
50
+ onClose: () => void;
51
+ onSaved: () => void;
52
+ };
53
+ type LogicNodeModalRenderProps = {
54
+ nodeId: string | null;
55
+ nodeLabel: string;
56
+ config: LogicNodeConfig | null;
57
+ open: boolean;
58
+ onClose: () => void;
59
+ onSave: (nodeId: string, updatedConfig: LogicNodeConfig) => void;
60
+ entities: WorkflowEntityDefinition[];
61
+ };
62
+ type WorkflowCanvasProps = {
63
+ agents: AgentWithPrompts[];
64
+ models: AgentModel[];
65
+ /** Configured LLM provider connections (account-level credentials).
66
+ * Forwarded to AgentModal so the agent's "Model" tab can list the
67
+ * providers/credentials available to bind to. Optional — empty
68
+ * means no provider has been configured yet (modal shows empty
69
+ * state pointing the user to Settings). */
70
+ modelProviders?: ModelProvider[];
71
+ tools?: WorkflowTool[];
72
+ agentTools?: AgentTool[];
73
+ rules?: AgentRule[];
74
+ entities?: WorkflowEntityDefinition[];
75
+ datasources?: Array<{
76
+ id: string;
77
+ name: string;
78
+ dialect: string;
79
+ }>;
80
+ onLoadTables?: (datasourceId: string) => Promise<string[]>;
81
+ onLoadSchema?: (datasourceId: string, table: string) => Promise<Array<{
82
+ name: string;
83
+ type: string;
84
+ nullable?: boolean;
85
+ }>>;
86
+ initialGraph?: WorkflowGraph | null;
87
+ onGraphChange?: (graph: WorkflowGraph) => void;
88
+ onEditTool?: (tool: WorkflowTool) => void;
89
+ onToggleTool?: (tool: WorkflowTool) => void;
90
+ onEditRule?: (rule: AgentRule) => void;
91
+ onToggleRule?: (rule: AgentRule) => void;
92
+ onCancelCreateAgent?: () => void;
93
+ onAgentSaved?: () => void;
94
+ isCreatingAgent?: boolean;
95
+ /** Custom node type components — merged with built-in edge types */
96
+ nodeTypes?: NodeTypes;
97
+ /** Optional: render the AgentModal externally (frontend provides the component) */
98
+ renderAgentModal?: (props: AgentModalRenderProps) => React.ReactNode;
99
+ /** Optional: render a custom LogicNodeModal; defaults to internal modal */
100
+ renderLogicNodeModal?: (props: LogicNodeModalRenderProps) => React.ReactNode;
101
+ };
102
+ declare function WorkflowCanvas(props: WorkflowCanvasProps): react_jsx_runtime.JSX.Element;
103
+
104
+ type BuilderCanvasProps = ComponentProps<typeof WorkflowCanvas>;
105
+ type WorkspaceProps = {
106
+ locale?: string;
107
+ messages?: Record<string, unknown>;
108
+ className?: string;
109
+ workflowId?: string;
110
+ } & Partial<BuilderCanvasProps>;
111
+ declare function Workspace({ locale, messages, className, workflowId, ...canvasProps }: WorkspaceProps): react_jsx_runtime.JSX.Element;
112
+
113
+ export { type ModelProvider as M, NodePalette as N, type WorkspaceProps as W, Workspace as a };
@@ -0,0 +1,113 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentProps } from 'react';
3
+ import { WorkflowTool, AgentTool, AgentRule, AgentModel, WorkflowGraph, LogicNodeConfig } from './astrlabe/contracts.mjs';
4
+ import { A as AgentWithPrompts, W as WorkflowEntityDefinition } from './index-BNRGVAS5.mjs';
5
+ import { NodeTypes } from '@xyflow/react';
6
+
7
+ type ModelProvider = {
8
+ id: string;
9
+ name: string;
10
+ /** The provider's runtime SDK / endpoint family. Different from the
11
+ * model families it CAN serve (see `servedFamilies`). E.g., a
12
+ * Bedrock provider has `provider: 'amazon'` but
13
+ * `servedFamilies: ['anthropic', 'amazon', 'meta', 'openai']`. */
14
+ provider: string;
15
+ modelCount: number;
16
+ configured: boolean;
17
+ /** Which model families this provider can serve at run-time. Used
18
+ * to compute the cartesian (model × provider) available to an
19
+ * agent. Defaults to `[provider]` when omitted (i.e., direct API
20
+ * providers that only serve their own family). */
21
+ servedFamilies?: string[];
22
+ /** Optional masked API key for display (`sk-prod-•••3742`). */
23
+ apiKeyMasked?: string;
24
+ /** ARN/SSM path of the secret, displayed read-only. */
25
+ credentialRef?: string;
26
+ /** ISO timestamp of last successful auth handshake. */
27
+ lastVerifiedAt?: string;
28
+ };
29
+ type NodePaletteProps = {
30
+ agents: AgentWithPrompts[];
31
+ tools: WorkflowTool[];
32
+ agentTools?: AgentTool[];
33
+ rules: AgentRule[];
34
+ entities?: WorkflowEntityDefinition[];
35
+ modelProviders?: ModelProvider[];
36
+ onCreateAgent?: () => void;
37
+ onCreateTool?: () => void;
38
+ onCreateAgentTool?: () => void;
39
+ onCreateRule?: () => void;
40
+ onCreateDatasource?: () => void;
41
+ onConfigureProvider?: (providerId: string) => void;
42
+ };
43
+ declare function NodePalette({ agents, tools, agentTools, rules, entities, modelProviders, onCreateAgent, onCreateTool, onCreateAgentTool, onCreateRule, onCreateDatasource, onConfigureProvider }: NodePaletteProps): react_jsx_runtime.JSX.Element;
44
+
45
+ type AgentModalRenderProps = {
46
+ agent: AgentWithPrompts | null;
47
+ models: AgentModel[];
48
+ open: boolean;
49
+ isCreateMode: boolean;
50
+ onClose: () => void;
51
+ onSaved: () => void;
52
+ };
53
+ type LogicNodeModalRenderProps = {
54
+ nodeId: string | null;
55
+ nodeLabel: string;
56
+ config: LogicNodeConfig | null;
57
+ open: boolean;
58
+ onClose: () => void;
59
+ onSave: (nodeId: string, updatedConfig: LogicNodeConfig) => void;
60
+ entities: WorkflowEntityDefinition[];
61
+ };
62
+ type WorkflowCanvasProps = {
63
+ agents: AgentWithPrompts[];
64
+ models: AgentModel[];
65
+ /** Configured LLM provider connections (account-level credentials).
66
+ * Forwarded to AgentModal so the agent's "Model" tab can list the
67
+ * providers/credentials available to bind to. Optional — empty
68
+ * means no provider has been configured yet (modal shows empty
69
+ * state pointing the user to Settings). */
70
+ modelProviders?: ModelProvider[];
71
+ tools?: WorkflowTool[];
72
+ agentTools?: AgentTool[];
73
+ rules?: AgentRule[];
74
+ entities?: WorkflowEntityDefinition[];
75
+ datasources?: Array<{
76
+ id: string;
77
+ name: string;
78
+ dialect: string;
79
+ }>;
80
+ onLoadTables?: (datasourceId: string) => Promise<string[]>;
81
+ onLoadSchema?: (datasourceId: string, table: string) => Promise<Array<{
82
+ name: string;
83
+ type: string;
84
+ nullable?: boolean;
85
+ }>>;
86
+ initialGraph?: WorkflowGraph | null;
87
+ onGraphChange?: (graph: WorkflowGraph) => void;
88
+ onEditTool?: (tool: WorkflowTool) => void;
89
+ onToggleTool?: (tool: WorkflowTool) => void;
90
+ onEditRule?: (rule: AgentRule) => void;
91
+ onToggleRule?: (rule: AgentRule) => void;
92
+ onCancelCreateAgent?: () => void;
93
+ onAgentSaved?: () => void;
94
+ isCreatingAgent?: boolean;
95
+ /** Custom node type components — merged with built-in edge types */
96
+ nodeTypes?: NodeTypes;
97
+ /** Optional: render the AgentModal externally (frontend provides the component) */
98
+ renderAgentModal?: (props: AgentModalRenderProps) => React.ReactNode;
99
+ /** Optional: render a custom LogicNodeModal; defaults to internal modal */
100
+ renderLogicNodeModal?: (props: LogicNodeModalRenderProps) => React.ReactNode;
101
+ };
102
+ declare function WorkflowCanvas(props: WorkflowCanvasProps): react_jsx_runtime.JSX.Element;
103
+
104
+ type BuilderCanvasProps = ComponentProps<typeof WorkflowCanvas>;
105
+ type WorkspaceProps = {
106
+ locale?: string;
107
+ messages?: Record<string, unknown>;
108
+ className?: string;
109
+ workflowId?: string;
110
+ } & Partial<BuilderCanvasProps>;
111
+ declare function Workspace({ locale, messages, className, workflowId, ...canvasProps }: WorkspaceProps): react_jsx_runtime.JSX.Element;
112
+
113
+ export { type ModelProvider as M, NodePalette as N, type WorkspaceProps as W, Workspace as a };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datatechsolutions/ui",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -145,7 +145,11 @@
145
145
  "build": "tsup",
146
146
  "test": "vitest run",
147
147
  "test:watch": "vitest",
148
- "lint": "tsc --noEmit",
148
+ "lint": "tsc --noEmit && npm run lint:button",
149
+ "lint:button": "node scripts/check-raw-button.mjs",
150
+ "lint:button:baseline": "node scripts/check-raw-button.mjs --baseline",
151
+ "storybook": "storybook dev -p 6006 --no-open",
152
+ "build-storybook": "storybook build -o storybook-static",
149
153
  "verify:publish": "npm run build && npm run lint && npm run test",
150
154
  "prepublishOnly": "npm run verify:publish"
151
155
  },
@@ -158,8 +162,7 @@
158
162
  "typescript": "^5.3.0"
159
163
  },
160
164
  "peerDependencies": {
161
- "@datatechsolutions/shared-domain": "^3.5.73",
162
- "@datatechsolutions/windsock": "^1.5.0",
165
+ "@datatechsolutions/shared-domain": "workspace:*",
163
166
  "@headlessui/react": ">=2",
164
167
  "@heroicons/react": ">=2",
165
168
  "@radix-ui/react-dialog": ">=1",
@@ -178,7 +181,12 @@
178
181
  "zustand": ">=5"
179
182
  },
180
183
  "devDependencies": {
181
- "@datatechsolutions/shared-domain": "^3.5.73",
184
+ "@datatechsolutions/shared-domain": "workspace:*",
185
+ "@storybook/addon-a11y": "^10.4.0",
186
+ "@storybook/addon-docs": "^10.4.0",
187
+ "@storybook/addon-themes": "^10.4.0",
188
+ "@storybook/react-vite": "^10.4.0",
189
+ "@tailwindcss/vite": "^4.3.0",
182
190
  "@testing-library/jest-dom": "^6.9.1",
183
191
  "@testing-library/react": "^16.3.2",
184
192
  "@testing-library/user-event": "^14.6.1",
@@ -190,6 +198,8 @@
190
198
  "@vitest/coverage-v8": "^4.0.18",
191
199
  "@xyflow/react": "^12.10.0",
192
200
  "jsdom": "^28.1.0",
201
+ "storybook": "^10.4.0",
202
+ "tailwindcss": "^4.3.0",
193
203
  "tsup": "^8.5.0",
194
204
  "vitest": "^4.0.16",
195
205
  "zustand": "^5.0.11"
@@ -3,6 +3,110 @@
3
3
  Translucent surfaces with backdrop-blur and inner highlights.
4
4
  ───────────────────────────────────────────────────── */
5
5
 
6
+ /* ── Design tokens ─────────────────────────────────────
7
+ Versioned tokens — radius, elevation, motion.
8
+ These are the only knobs that should appear in component
9
+ styles. If you find yourself reaching for a hard-coded
10
+ shadow / radius / duration, promote it here first.
11
+ See DESIGN_SYSTEM.md → "Tokens" for usage guidance.
12
+ ───────────────────────────────────────────────────── */
13
+
14
+ :root {
15
+ /* Radius scale — applied via `rounded-[var(--radius-md)]` or via
16
+ the `.r-{step}` utilities below. */
17
+ --radius-sm: 0.5rem; /* 8px — chips, tight controls */
18
+ --radius-md: 0.75rem; /* 12px — inputs, small cards */
19
+ --radius-lg: 1rem; /* 16px — buttons, list items */
20
+ --radius-xl: 1.25rem; /* 20px — cards, panels */
21
+ --radius-2xl: 1.5rem; /* 24px — modals, hero surfaces */
22
+ --radius-pill: 9999px; /* full round */
23
+
24
+ /* Elevation scale — semantic box-shadow tokens. The names map to
25
+ the surface's *role*, not a numeric depth, so consumers don't
26
+ have to remember whether a modal is z-3 or z-4. */
27
+ --elevation-flat:
28
+ 0 1px 2px 0 rgba(15, 23, 42, 0.04);
29
+ --elevation-raised:
30
+ 0 4px 12px -2px rgba(15, 23, 42, 0.08),
31
+ 0 2px 4px -2px rgba(15, 23, 42, 0.04);
32
+ --elevation-floating:
33
+ 0 12px 24px -8px rgba(15, 23, 42, 0.12),
34
+ 0 4px 8px -4px rgba(15, 23, 42, 0.06);
35
+ --elevation-modal:
36
+ 0 40px 100px -30px rgba(0, 0, 0, 0.45),
37
+ 0 16px 40px -12px rgba(0, 0, 0, 0.18);
38
+ --elevation-orbital:
39
+ 0 60px 160px -40px rgba(99, 102, 241, 0.35),
40
+ 0 20px 60px -20px rgba(168, 85, 247, 0.22);
41
+
42
+ /* Motion: duration scale (matches Tailwind `duration-*` arbitrary
43
+ values). Animations: any consumer should pick a duration token
44
+ instead of inventing a number.
45
+
46
+ - xs (90ms) — micro feedback (toggle thumb, hover tint)
47
+ - sm (150ms) — button press, popover open
48
+ - md (240ms) — card hover, drawer slide
49
+ - lg (360ms) — page transitions, modal enter */
50
+ --duration-xs: 90ms;
51
+ --duration-sm: 150ms;
52
+ --duration-md: 240ms;
53
+ --duration-lg: 360ms;
54
+
55
+ /* Motion: easing curves. `standard` is the default product curve;
56
+ `emphasized` is for entering elements; `decelerate` for arrivals;
57
+ `accelerate` for departures. */
58
+ --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
59
+ --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);
60
+ --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
61
+ --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
62
+ --ease-ios: cubic-bezier(0.25, 0.46, 0.45, 0.94);
63
+ }
64
+
65
+ /* Dark mode keeps the same radius/duration tokens; only elevation
66
+ bumps darker so glass surfaces still feel lifted on dark grounds. */
67
+ :is(.dark) {
68
+ --elevation-flat:
69
+ 0 1px 2px 0 rgba(0, 0, 0, 0.4);
70
+ --elevation-raised:
71
+ 0 4px 12px -2px rgba(0, 0, 0, 0.5),
72
+ 0 2px 4px -2px rgba(0, 0, 0, 0.3);
73
+ --elevation-floating:
74
+ 0 12px 24px -8px rgba(0, 0, 0, 0.6),
75
+ 0 4px 8px -4px rgba(0, 0, 0, 0.4);
76
+ --elevation-modal:
77
+ 0 40px 100px -30px rgba(0, 0, 0, 0.7),
78
+ 0 16px 40px -12px rgba(0, 0, 0, 0.5);
79
+ }
80
+
81
+ /* Honor `prefers-reduced-motion` at the token layer — any consumer
82
+ reading `var(--duration-md)` automatically gets 0ms when the user
83
+ opts out. WCAG 2.3.3. */
84
+ @media (prefers-reduced-motion: reduce) {
85
+ :root {
86
+ --duration-xs: 0ms;
87
+ --duration-sm: 0ms;
88
+ --duration-md: 0ms;
89
+ --duration-lg: 0ms;
90
+ }
91
+ }
92
+
93
+ /* ── Token utility classes ─────────────────────────────
94
+ Tiny wrappers so consumers can write `.r-md` instead of
95
+ `[border-radius:var(--radius-md)]`. */
96
+
97
+ .r-sm { border-radius: var(--radius-sm); }
98
+ .r-md { border-radius: var(--radius-md); }
99
+ .r-lg { border-radius: var(--radius-lg); }
100
+ .r-xl { border-radius: var(--radius-xl); }
101
+ .r-2xl { border-radius: var(--radius-2xl); }
102
+ .r-pill { border-radius: var(--radius-pill); }
103
+
104
+ .elevation-flat { box-shadow: var(--elevation-flat); }
105
+ .elevation-raised { box-shadow: var(--elevation-raised); }
106
+ .elevation-floating { box-shadow: var(--elevation-floating); }
107
+ .elevation-modal { box-shadow: var(--elevation-modal); }
108
+ .elevation-orbital { box-shadow: var(--elevation-orbital); }
109
+
6
110
  /* ── Surfaces ──────────────────────────────────────── */
7
111
 
8
112
  .liquid-surface {
@@ -354,6 +458,169 @@
354
458
  color: white;
355
459
  }
356
460
 
461
+ /* ── Button — gradient (primary CTA, indigo→purple) ─
462
+ Same crystal-illuminated mechanic as the ios-glass-* variants:
463
+ neutral glass at rest, fills with translucent indigo→purple
464
+ gradient on hover + inner highlight + tinted drop shadow. The
465
+ gradient is ONLY visible on hover — at rest the button looks
466
+ identical to ios-glass-blue's neutral state. */
467
+
468
+ .liquid-button-gradient {
469
+ /* Rest: same neutral glass as .liquid-button (so all CTAs read as
470
+ the same family at rest — gradient is the hover signal). */
471
+ background: rgb(255 255 255 / 0.35);
472
+ border: 1px solid rgb(255 255 255 / 0.5);
473
+ color: rgb(15 23 42); /* slate-900 — visible on glass at rest */
474
+ box-shadow:
475
+ 0 8px 32px -8px rgb(0 0 0 / 0.12),
476
+ inset 0 1px 2px 0 rgb(255 255 255 / 0.25);
477
+ backdrop-filter: blur(12px);
478
+ -webkit-backdrop-filter: blur(12px);
479
+ transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
480
+ }
481
+
482
+ .liquid-button-gradient:hover {
483
+ /* Hover: gradient fills + inner highlight + violet/indigo glow */
484
+ background: linear-gradient(
485
+ 135deg,
486
+ rgba(99, 102, 241, 0.85) 0%, /* indigo-500 */
487
+ rgba(139, 92, 246, 0.85) 50%, /* violet-500 */
488
+ rgba(168, 85, 247, 0.85) 100% /* purple-500 */
489
+ );
490
+ border-color: rgba(255, 255, 255, 0.45);
491
+ color: #ffffff;
492
+ box-shadow:
493
+ inset 0 1px 2px rgba(255, 255, 255, 0.6),
494
+ inset 0 -1px 1px rgba(0, 0, 0, 0.12),
495
+ 0 12px 32px -8px rgba(99, 102, 241, 0.55),
496
+ 0 0 24px -4px rgba(168, 85, 247, 0.35);
497
+ backdrop-filter: blur(12px) saturate(1.6);
498
+ -webkit-backdrop-filter: blur(12px) saturate(1.6);
499
+ }
500
+
501
+ .dark .liquid-button-gradient {
502
+ background: linear-gradient(
503
+ 140deg,
504
+ rgba(30, 41, 59, 0.5) 0%,
505
+ rgba(15, 23, 42, 0.4) 45%,
506
+ rgba(15, 23, 42, 0.3) 100%
507
+ );
508
+ border-color: rgba(255, 255, 255, 0.18);
509
+ color: #ffffff;
510
+ box-shadow:
511
+ inset 0 1px 0 rgba(255, 255, 255, 0.18),
512
+ 0 10px 22px -16px rgba(0, 0, 0, 0.75);
513
+ }
514
+
515
+ /* ── Avatar — crystal disc ───────────────────────────
516
+ Reusable shell that turns any avatar (image OR initials) into a
517
+ translucent crystal puck. Same family as .liquid-button-gradient
518
+ at rest — inner highlight on the top edge, tinted drop shadow,
519
+ saturate boost. Interactive avatars (AvatarButton) get a brighter
520
+ hover illuminate, matching the crystal-iluminado pattern. */
521
+
522
+ .liquid-avatar {
523
+ position: relative;
524
+ overflow: hidden;
525
+ /* Slightly saturated so initials/photo colors look vivid through
526
+ the glass, not muted. */
527
+ filter: saturate(1.1);
528
+ /* OUTER shadow only — the inner highlight lives in `::after` so it
529
+ renders ABOVE the image content (an inset shadow would be hidden
530
+ by an opaque <img>). */
531
+ box-shadow:
532
+ 0 4px 14px -3px rgba(15, 23, 42, 0.22),
533
+ 0 1px 3px rgba(15, 23, 42, 0.08);
534
+ }
535
+
536
+ /* Specular highlight — soft white sheen across the top-left AND a
537
+ crisp 1px inner-edge highlight, both rendered on top of the
538
+ avatar content (image or initials) so the crystal effect survives
539
+ even when a photo fills the disc. */
540
+ .liquid-avatar::after {
541
+ content: '';
542
+ position: absolute;
543
+ inset: 0;
544
+ border-radius: inherit;
545
+ pointer-events: none;
546
+ z-index: 1;
547
+ background: radial-gradient(
548
+ 120% 80% at 30% 0%,
549
+ rgba(255, 255, 255, 0.45) 0%,
550
+ rgba(255, 255, 255, 0.12) 30%,
551
+ transparent 60%
552
+ );
553
+ /* Inner edge highlight — drawn via inset box-shadow on the pseudo
554
+ element so it sits over the image content. */
555
+ box-shadow:
556
+ inset 0 1.5px 2px rgba(255, 255, 255, 0.7),
557
+ inset 0 -1px 1.5px rgba(0, 0, 0, 0.08);
558
+ mix-blend-mode: screen;
559
+ transition: opacity 0.25s ease, box-shadow 0.25s ease;
560
+ }
561
+
562
+ .dark .liquid-avatar {
563
+ box-shadow:
564
+ 0 6px 18px -4px rgba(0, 0, 0, 0.55),
565
+ 0 1px 3px rgba(0, 0, 0, 0.3);
566
+ }
567
+
568
+ .dark .liquid-avatar::after {
569
+ background: radial-gradient(
570
+ 120% 80% at 30% 0%,
571
+ rgba(255, 255, 255, 0.25) 0%,
572
+ rgba(255, 255, 255, 0.06) 30%,
573
+ transparent 60%
574
+ );
575
+ box-shadow:
576
+ inset 0 1.5px 2px rgba(255, 255, 255, 0.28),
577
+ inset 0 -1px 1.5px rgba(0, 0, 0, 0.4);
578
+ }
579
+
580
+ /* Interactive variant — hover illuminates the sheen + adds a soft
581
+ indigo glow, same crystal-iluminado mechanic as the buttons. */
582
+ .liquid-avatar-interactive {
583
+ transition: transform 0.2s ease, box-shadow 0.3s ease;
584
+ cursor: pointer;
585
+ }
586
+
587
+ .liquid-avatar-interactive:hover {
588
+ transform: translateY(-1px);
589
+ /* `--avatar-glow` defaults to indigo; tone-styled avatars override
590
+ it inline so each avatar's hover glow matches its own tint. */
591
+ box-shadow:
592
+ inset 0 2px 3px rgba(255, 255, 255, 0.7),
593
+ inset 0 -1px 1.5px rgba(0, 0, 0, 0.06),
594
+ 0 8px 22px -4px var(--avatar-glow, rgba(99, 102, 241, 0.35)),
595
+ 0 2px 6px rgba(15, 23, 42, 0.12);
596
+ }
597
+
598
+ .liquid-avatar-interactive:hover::after {
599
+ opacity: 1.4;
600
+ }
601
+
602
+ .dark .liquid-avatar-interactive:hover {
603
+ box-shadow:
604
+ inset 0 2px 3px rgba(255, 255, 255, 0.32),
605
+ inset 0 -1px 1.5px rgba(0, 0, 0, 0.4),
606
+ 0 10px 26px -6px rgba(129, 132, 251, 0.45),
607
+ 0 2px 6px rgba(0, 0, 0, 0.4);
608
+ }
609
+
610
+ .dark .liquid-button-gradient:hover {
611
+ background: linear-gradient(
612
+ 135deg,
613
+ rgba(129, 132, 251, 0.85) 0%,
614
+ rgba(167, 132, 246, 0.85) 50%,
615
+ rgba(196, 125, 247, 0.85) 100%
616
+ );
617
+ border-color: rgba(255, 255, 255, 0.35);
618
+ box-shadow:
619
+ inset 0 1px 2px rgba(255, 255, 255, 0.35),
620
+ 0 14px 36px -10px rgba(129, 132, 251, 0.65),
621
+ 0 0 28px -4px rgba(196, 125, 247, 0.45);
622
+ }
623
+
357
624
  /* ── Filter pills — colored glassmorphism ──────────── */
358
625
 
359
626
  .liquid-pill {
@@ -519,10 +786,24 @@
519
786
  .liquid-pill:hover .liquid-pill-dismiss { opacity: 0.8; }
520
787
 
521
788
  /* ── Focus ring utilities ────────────────────────────
522
- Replace verbose inline focus ring Tailwind classes with a single class.
523
- Uses CSS outline (non-conflicting with box-shadow) for focus indicators.
789
+ Canonical focus indicator for the design system.
790
+
791
+ Use `.focus-ring` on any interactive element — it ships the
792
+ indigo 2px outline at /70 opacity with a 1px offset, matching
793
+ the WCAG 1.4.11 (≥ 3:1 non-text contrast) + 2.4.7 (visible
794
+ focus) floor documented in DESIGN_SYSTEM.md.
795
+
796
+ The legacy `.focus-ring-{color}` classes remain for cases where
797
+ a component owns its own accent color (e.g. emerald confirm
798
+ buttons), but new code should default to `.focus-ring`.
524
799
  ───────────────────────────────────────────────────── */
525
800
 
801
+ .focus-ring:focus { outline: none; }
802
+ .focus-ring:focus-visible {
803
+ outline: 2px solid color-mix(in oklab, var(--color-indigo-500) 70%, transparent);
804
+ outline-offset: 1px;
805
+ }
806
+
526
807
  .focus-ring-blue:focus { outline: none; }
527
808
  .focus-ring-blue:focus-visible {
528
809
  outline: 2px solid var(--color-blue-500);