@datatechsolutions/ui 2.11.10 → 2.11.11

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.
@@ -1073,6 +1073,31 @@ function PipelineSettingsModal({ onSave }) {
1073
1073
  }
1074
1074
  );
1075
1075
  }
1076
+ var DATASOURCE_GRADIENTS = {
1077
+ bigquery: "from-blue-500 to-indigo-600",
1078
+ postgres: "from-sky-500 to-blue-600",
1079
+ snowflake: "from-cyan-400 to-blue-500",
1080
+ mongodb: "from-green-500 to-emerald-600",
1081
+ redis: "from-red-500 to-rose-600",
1082
+ mysql: "from-blue-600 to-indigo-700",
1083
+ clickhouse: "from-amber-500 to-yellow-600",
1084
+ elasticsearch: "from-teal-500 to-cyan-600",
1085
+ duckdb: "from-yellow-500 to-amber-600"
1086
+ };
1087
+ function getDatasourceGradient(entityId) {
1088
+ const lower = entityId.toLowerCase();
1089
+ for (const [key, gradient] of Object.entries(DATASOURCE_GRADIENTS)) {
1090
+ if (lower.includes(key)) return gradient;
1091
+ }
1092
+ return chunkLFWRE3A3_js.getEntityGradient(entityId);
1093
+ }
1094
+ var PROVIDER_GRADIENTS = {
1095
+ anthropic: "from-amber-500 to-orange-600",
1096
+ amazon: "from-orange-500 to-amber-600",
1097
+ google: "from-blue-500 to-cyan-600",
1098
+ openai: "from-emerald-500 to-teal-600",
1099
+ meta: "from-blue-600 to-indigo-700"
1100
+ };
1076
1101
  function onDragStart(event, nodeType, entityId, label, config) {
1077
1102
  event.dataTransfer.setData("nodeType", nodeType);
1078
1103
  event.dataTransfer.setData("entityId", entityId);
@@ -1414,7 +1439,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
1414
1439
  limit: entity.defaultLimit
1415
1440
  });
1416
1441
  const EntityIcon = chunkLFWRE3A3_js.getEntityIcon(entity.id);
1417
- const entityGradient = chunkLFWRE3A3_js.getEntityGradient(entity.id);
1442
+ const entityGradient = getDatasourceGradient(entity.id);
1418
1443
  return /* @__PURE__ */ jsxRuntime.jsxs(
1419
1444
  "div",
1420
1445
  {
@@ -1445,27 +1470,32 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
1445
1470
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-3 w-3" }),
1446
1471
  colorClass: "text-rose-600 dark:text-rose-400",
1447
1472
  count: filteredProviders.length,
1448
- children: filteredProviders.map((provider) => /* @__PURE__ */ jsxRuntime.jsxs(
1449
- "div",
1450
- {
1451
- className: "liquid-surface group flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-pointer hover:shadow-md",
1452
- onClick: () => onConfigureProvider?.(provider.id),
1453
- role: "button",
1454
- tabIndex: 0,
1455
- children: [
1456
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-md bg-gradient-to-br from-rose-400 to-pink-500 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-3.5 w-3.5 text-white" }) }),
1457
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
1458
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: provider.name }),
1459
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: [
1460
- provider.modelCount,
1461
- " models"
1462
- ] })
1463
- ] }),
1464
- provider.configured ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-green-100 px-1.5 py-0.5 text-[9px] font-medium text-green-600 dark:bg-green-500/10 dark:text-green-400", children: t("configured") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-amber-100 px-1.5 py-0.5 text-[9px] font-medium text-amber-600 dark:bg-amber-500/10 dark:text-amber-400", children: t("setup") })
1465
- ]
1466
- },
1467
- provider.id
1468
- ))
1473
+ children: filteredProviders.map((provider) => {
1474
+ const providerIcon = getModelIcon(`${provider.provider}.placeholder`);
1475
+ const ProviderIcon = providerIcon.IconComponent;
1476
+ const providerGradient = PROVIDER_GRADIENTS[provider.provider] ?? "from-rose-400 to-pink-500";
1477
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1478
+ "div",
1479
+ {
1480
+ className: "liquid-surface group flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-pointer hover:shadow-md",
1481
+ onClick: () => onConfigureProvider?.(provider.id),
1482
+ role: "button",
1483
+ tabIndex: 0,
1484
+ children: [
1485
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-6 w-6 items-center justify-center rounded-md bg-gradient-to-br ${providerGradient} shadow-sm`, children: /* @__PURE__ */ jsxRuntime.jsx(ProviderIcon, { className: "h-3.5 w-3.5 text-white" }) }),
1486
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
1487
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: provider.name }),
1488
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: [
1489
+ provider.modelCount,
1490
+ " models"
1491
+ ] })
1492
+ ] }),
1493
+ provider.configured ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-green-100 px-1.5 py-0.5 text-[9px] font-medium text-green-600 dark:bg-green-500/10 dark:text-green-400", children: t("configured") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-amber-100 px-1.5 py-0.5 text-[9px] font-medium text-amber-600 dark:bg-amber-500/10 dark:text-amber-400", children: t("setup") })
1494
+ ]
1495
+ },
1496
+ provider.id
1497
+ );
1498
+ })
1469
1499
  }
1470
1500
  ),
1471
1501
  /* @__PURE__ */ jsxRuntime.jsxs(