@apteva/apteva-kit 0.1.89 → 0.1.90
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/index.js +94 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +94 -45
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1230,77 +1230,105 @@ function Image({ widget }) {
|
|
|
1230
1230
|
|
|
1231
1231
|
function StepIcon({ type, status }) {
|
|
1232
1232
|
if (status === "completed") {
|
|
1233
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3.5 h-3.5 text-emerald-
|
|
1233
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3.5 h-3.5 text-emerald-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M5 13l4 4L19 7" }) });
|
|
1234
1234
|
}
|
|
1235
1235
|
if (status === "error") {
|
|
1236
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3.5 h-3.5 text-red-
|
|
1236
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3.5 h-3.5 text-red-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M6 18L18 6M6 6l12 12" }) });
|
|
1237
1237
|
}
|
|
1238
1238
|
if (status === "active") {
|
|
1239
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-3 h-3 rounded-full bg-blue-
|
|
1239
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-3 h-3 rounded-full bg-blue-500 animate-pulse" });
|
|
1240
1240
|
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1241
|
+
const iconClass = "w-3.5 h-3.5";
|
|
1242
|
+
if (type === "time" || type === "schedule" || type === "clock") {
|
|
1243
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" }) });
|
|
1244
|
+
}
|
|
1245
|
+
if (type === "recurring" || type === "repeat") {
|
|
1246
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" }) });
|
|
1243
1247
|
}
|
|
1244
1248
|
if (type === "agent" || _optionalChain([type, 'optionalAccess', _28 => _28.startsWith, 'call', _29 => _29("@")])) {
|
|
1245
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className:
|
|
1249
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z" }) });
|
|
1246
1250
|
}
|
|
1247
1251
|
if (type === "email" || type === "mail") {
|
|
1248
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className:
|
|
1252
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) });
|
|
1253
|
+
}
|
|
1254
|
+
if (type === "slack" || type === "message" || type === "chat") {
|
|
1255
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) });
|
|
1249
1256
|
}
|
|
1250
|
-
if (type === "
|
|
1251
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className:
|
|
1257
|
+
if (type === "webhook" || type === "api") {
|
|
1258
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" }) });
|
|
1252
1259
|
}
|
|
1253
|
-
if (type === "build" || type === "compile") {
|
|
1254
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className:
|
|
1260
|
+
if (type === "build" || type === "compile" || type === "package") {
|
|
1261
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4" }) });
|
|
1255
1262
|
}
|
|
1256
|
-
if (type === "test") {
|
|
1257
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className:
|
|
1263
|
+
if (type === "test" || type === "check" || type === "verify") {
|
|
1264
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4" }) });
|
|
1258
1265
|
}
|
|
1259
|
-
if (type === "deploy" || type === "rocket") {
|
|
1260
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className:
|
|
1266
|
+
if (type === "deploy" || type === "rocket" || type === "launch") {
|
|
1267
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) });
|
|
1261
1268
|
}
|
|
1262
|
-
if (type === "push" || type === "upload") {
|
|
1263
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className:
|
|
1269
|
+
if (type === "push" || type === "upload" || type === "cloud") {
|
|
1270
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" }) });
|
|
1264
1271
|
}
|
|
1265
|
-
if (type === "generate" || type === "create" || type === "document") {
|
|
1266
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className:
|
|
1272
|
+
if (type === "generate" || type === "create" || type === "document" || type === "file") {
|
|
1273
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) });
|
|
1267
1274
|
}
|
|
1268
|
-
if (type === "review" || type === "
|
|
1269
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { className:
|
|
1275
|
+
if (type === "review" || type === "inspect" || type === "eye") {
|
|
1276
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
|
|
1270
1277
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" }),
|
|
1271
1278
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" })
|
|
1272
1279
|
] });
|
|
1273
1280
|
}
|
|
1274
|
-
if (type === "analyze" || type === "research") {
|
|
1275
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className:
|
|
1281
|
+
if (type === "analyze" || type === "research" || type === "chart") {
|
|
1282
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) });
|
|
1283
|
+
}
|
|
1284
|
+
if (type === "scrape" || type === "crawl" || type === "spider") {
|
|
1285
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) });
|
|
1286
|
+
}
|
|
1287
|
+
if (type === "data" || type === "database" || type === "storage") {
|
|
1288
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4" }) });
|
|
1289
|
+
}
|
|
1290
|
+
if (type === "notification" || type === "bell" || type === "alert") {
|
|
1291
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" }) });
|
|
1276
1292
|
}
|
|
1277
|
-
|
|
1293
|
+
if (type === "transform" || type === "process" || type === "convert") {
|
|
1294
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: iconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" }) });
|
|
1295
|
+
}
|
|
1296
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-2 h-2 rounded-full bg-current opacity-50" });
|
|
1278
1297
|
}
|
|
1279
1298
|
function HeaderIcon({ icon }) {
|
|
1280
1299
|
const baseClass = "w-5 h-5";
|
|
1281
|
-
if (icon === "research" || icon === "multi-agent") {
|
|
1282
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-purple-500/20 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: `${baseClass} text-purple-400`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }) });
|
|
1300
|
+
if (icon === "research" || icon === "multi-agent" || icon === "agents") {
|
|
1301
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-purple-100 dark:bg-purple-500/20 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: `${baseClass} text-purple-600 dark:text-purple-400`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }) });
|
|
1302
|
+
}
|
|
1303
|
+
if (icon === "schedule" || icon === "report" || icon === "calendar") {
|
|
1304
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-amber-100 dark:bg-amber-500/20 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: `${baseClass} text-amber-600 dark:text-amber-400`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) });
|
|
1305
|
+
}
|
|
1306
|
+
if (icon === "recurring" || icon === "repeat" || icon === "sync") {
|
|
1307
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: `${baseClass} text-cyan-600 dark:text-cyan-400`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" }) }) });
|
|
1283
1308
|
}
|
|
1284
|
-
if (icon === "
|
|
1285
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-
|
|
1309
|
+
if (icon === "analyze" || icon === "analysis" || icon === "chart") {
|
|
1310
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: `${baseClass} text-cyan-600 dark:text-cyan-400`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) }) });
|
|
1286
1311
|
}
|
|
1287
|
-
if (icon === "
|
|
1288
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-
|
|
1312
|
+
if (icon === "deploy" || icon === "rocket" || icon === "launch") {
|
|
1313
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-blue-100 dark:bg-blue-500/20 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: `${baseClass} text-blue-600 dark:text-blue-400`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }) });
|
|
1289
1314
|
}
|
|
1290
|
-
if (icon === "
|
|
1291
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-
|
|
1315
|
+
if (icon === "automation" || icon === "workflow" || icon === "process") {
|
|
1316
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-indigo-100 dark:bg-indigo-500/20 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: `${baseClass} text-indigo-600 dark:text-indigo-400`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z" }) }) });
|
|
1292
1317
|
}
|
|
1293
|
-
|
|
1318
|
+
if (icon === "data" || icon === "pipeline" || icon === "etl") {
|
|
1319
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-emerald-100 dark:bg-emerald-500/20 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: `${baseClass} text-emerald-600 dark:text-emerald-400`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4" }) }) });
|
|
1320
|
+
}
|
|
1321
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: `${baseClass} text-neutral-600 dark:text-neutral-300`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" }) }) });
|
|
1294
1322
|
}
|
|
1295
1323
|
function Chevron() {
|
|
1296
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3 h-3 text-neutral-500 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) });
|
|
1324
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3 h-3 text-neutral-400 dark:text-neutral-500 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) });
|
|
1297
1325
|
}
|
|
1298
1326
|
function Flow({ widget, onAction }) {
|
|
1299
1327
|
const { title, subtitle, icon, steps, actions } = widget.props;
|
|
1300
1328
|
const handleAction = (actionType) => {
|
|
1301
1329
|
_optionalChain([onAction, 'optionalCall', _30 => _30({
|
|
1302
1330
|
type: actionType,
|
|
1303
|
-
payload: { steps, title },
|
|
1331
|
+
payload: { steps, title, subtitle },
|
|
1304
1332
|
widgetId: widget.id,
|
|
1305
1333
|
timestamp: /* @__PURE__ */ new Date()
|
|
1306
1334
|
})]);
|
|
@@ -1314,19 +1342,19 @@ function Flow({ widget, onAction }) {
|
|
|
1314
1342
|
})]);
|
|
1315
1343
|
};
|
|
1316
1344
|
const primaryAction = _optionalChain([widget, 'access', _32 => _32.actions, 'optionalAccess', _33 => _33[0]]) || _optionalChain([actions, 'optionalAccess', _34 => _34[0]]);
|
|
1317
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rounded-xl bg-neutral-900 border border-neutral-800 overflow-hidden", children: [
|
|
1345
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rounded-xl bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 overflow-hidden shadow-sm", children: [
|
|
1318
1346
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "px-4 py-3 flex items-center gap-3", children: [
|
|
1319
1347
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, HeaderIcon, { icon }),
|
|
1320
1348
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0", children: [
|
|
1321
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-sm text-white truncate", children: title }),
|
|
1322
|
-
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-neutral-400 truncate", children: subtitle })
|
|
1349
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-sm text-neutral-900 dark:text-white truncate", children: title }),
|
|
1350
|
+
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-neutral-500 dark:text-neutral-400 truncate", children: subtitle })
|
|
1323
1351
|
] }),
|
|
1324
1352
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
1325
1353
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1326
1354
|
"button",
|
|
1327
1355
|
{
|
|
1328
1356
|
onClick: handleDismiss,
|
|
1329
|
-
className: "p-1.5 text-neutral-500 hover:text-neutral-300 transition-colors",
|
|
1357
|
+
className: "p-1.5 text-neutral-400 hover:text-neutral-600 dark:text-neutral-500 dark:hover:text-neutral-300 transition-colors",
|
|
1330
1358
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
1331
1359
|
}
|
|
1332
1360
|
),
|
|
@@ -1334,7 +1362,7 @@ function Flow({ widget, onAction }) {
|
|
|
1334
1362
|
"button",
|
|
1335
1363
|
{
|
|
1336
1364
|
onClick: () => handleAction(primaryAction.type),
|
|
1337
|
-
className: "px-3 py-1.5 bg-blue-600 hover:bg-blue-
|
|
1365
|
+
className: "px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white text-xs font-medium rounded-lg flex items-center gap-1.5 transition-colors",
|
|
1338
1366
|
children: [
|
|
1339
1367
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3 h-3", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8 5v14l11-7z" }) }),
|
|
1340
1368
|
primaryAction.label
|
|
@@ -1349,18 +1377,39 @@ function Flow({ widget, onAction }) {
|
|
|
1349
1377
|
const isCompleted = step.status === "completed";
|
|
1350
1378
|
const isError = step.status === "error";
|
|
1351
1379
|
const isSkipped = step.status === "skipped";
|
|
1380
|
+
const isPending = step.status === "pending";
|
|
1352
1381
|
const label = step.label;
|
|
1353
1382
|
let stepType = step.type;
|
|
1354
1383
|
if (!stepType) {
|
|
1355
1384
|
if (label.startsWith("@")) stepType = "agent";
|
|
1356
|
-
else if (
|
|
1357
|
-
else
|
|
1358
|
-
|
|
1385
|
+
else if (/^\d+[ap]m$/i.test(label) || /^(mon|tue|wed|thu|fri|sat|sun)/i.test(label)) stepType = "time";
|
|
1386
|
+
else {
|
|
1387
|
+
const lowerLabel = label.toLowerCase();
|
|
1388
|
+
const typeMap = {
|
|
1389
|
+
"test": "test",
|
|
1390
|
+
"build": "build",
|
|
1391
|
+
"push": "push",
|
|
1392
|
+
"deploy": "deploy",
|
|
1393
|
+
"email": "email",
|
|
1394
|
+
"slack": "slack",
|
|
1395
|
+
"generate": "generate",
|
|
1396
|
+
"review": "review",
|
|
1397
|
+
"analyze": "analyze",
|
|
1398
|
+
"scrape": "scrape",
|
|
1399
|
+
"transform": "transform",
|
|
1400
|
+
"notify": "notification",
|
|
1401
|
+
"alert": "notification",
|
|
1402
|
+
"webhook": "webhook",
|
|
1403
|
+
"api": "api",
|
|
1404
|
+
"data": "data",
|
|
1405
|
+
"process": "process"
|
|
1406
|
+
};
|
|
1407
|
+
stepType = typeMap[lowerLabel];
|
|
1359
1408
|
}
|
|
1360
1409
|
}
|
|
1361
1410
|
const pillClasses = `
|
|
1362
|
-
inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-full text-xs font-medium transition-
|
|
1363
|
-
${isActive ? "bg-blue-500/20 text-blue-300 ring-1 ring-blue-500/50" : isCompleted ? "bg-emerald-500/15 text-emerald-300" : isError ? "bg-red-500/15 text-red-300" : isSkipped ? "bg-neutral-700/50 text-neutral-500 line-through" : "bg-neutral-800 text-neutral-300"}
|
|
1411
|
+
inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-full text-xs font-medium transition-all
|
|
1412
|
+
${isActive ? "bg-blue-100 dark:bg-blue-500/20 text-blue-700 dark:text-blue-300 ring-1 ring-blue-300 dark:ring-blue-500/50" : isCompleted ? "bg-emerald-100 dark:bg-emerald-500/15 text-emerald-700 dark:text-emerald-300" : isError ? "bg-red-100 dark:bg-red-500/15 text-red-700 dark:text-red-300" : isSkipped ? "bg-neutral-100 dark:bg-neutral-700/50 text-neutral-400 dark:text-neutral-500 line-through" : isPending ? "bg-neutral-100 dark:bg-neutral-800 text-neutral-500 dark:text-neutral-400" : "bg-neutral-100 dark:bg-neutral-800 text-neutral-700 dark:text-neutral-300"}
|
|
1364
1413
|
`;
|
|
1365
1414
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
1366
1415
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: pillClasses, children: [
|