@apteva/apteva-kit 0.1.91 → 0.1.93

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.d.mts CHANGED
@@ -233,8 +233,8 @@ declare const WIDGET_DEFINITIONS: {
233
233
  readonly example: "@ui:chart[{\"chartType\": \"bar\", \"data\": {\"labels\": [\"A\"], \"datasets\": [{\"label\": \"X\", \"data\": [10]}]}}]";
234
234
  };
235
235
  readonly flow: {
236
- readonly schema: "title, subtitle?, icon?: research|schedule|analyze|deploy, steps: [{id, label, type?: time|agent|email|slack|build|test|deploy, status?: pending|active|completed|error}], actions?: [{type, label}] - Horizontal pipeline with action button. Use @label for agents.";
237
- readonly example: "@ui:flow[{\"title\": \"Deploy to Production\", \"icon\": \"deploy\", \"steps\": [{\"id\": \"1\", \"label\": \"Test\"}, {\"id\": \"2\", \"label\": \"Build\"}, {\"id\": \"3\", \"label\": \"Deploy\"}], \"actions\": [{\"type\": \"run\", \"label\": \"Run\"}]}]";
236
+ readonly schema: "title, subtitle?, icon?: research|schedule|analyze|deploy|recurring|automation|data, steps: [{id, label, type?, color?: blue|purple|cyan|amber|emerald|rose|indigo|orange, status?: pending|active|completed|error|skipped}] - Horizontal pipeline. Use @label for agents. Types auto-detected from label.";
237
+ readonly example: "@ui:flow[{\"title\": \"Deploy Pipeline\", \"icon\": \"deploy\", \"steps\": [{\"id\": \"1\", \"label\": \"Test\", \"color\": \"cyan\"}, {\"id\": \"2\", \"label\": \"Build\", \"color\": \"amber\"}, {\"id\": \"3\", \"label\": \"Deploy\", \"color\": \"rose\"}]}]";
238
238
  };
239
239
  };
240
240
  type WidgetType = keyof typeof WIDGET_DEFINITIONS;
package/dist/index.d.ts CHANGED
@@ -233,8 +233,8 @@ declare const WIDGET_DEFINITIONS: {
233
233
  readonly example: "@ui:chart[{\"chartType\": \"bar\", \"data\": {\"labels\": [\"A\"], \"datasets\": [{\"label\": \"X\", \"data\": [10]}]}}]";
234
234
  };
235
235
  readonly flow: {
236
- readonly schema: "title, subtitle?, icon?: research|schedule|analyze|deploy, steps: [{id, label, type?: time|agent|email|slack|build|test|deploy, status?: pending|active|completed|error}], actions?: [{type, label}] - Horizontal pipeline with action button. Use @label for agents.";
237
- readonly example: "@ui:flow[{\"title\": \"Deploy to Production\", \"icon\": \"deploy\", \"steps\": [{\"id\": \"1\", \"label\": \"Test\"}, {\"id\": \"2\", \"label\": \"Build\"}, {\"id\": \"3\", \"label\": \"Deploy\"}], \"actions\": [{\"type\": \"run\", \"label\": \"Run\"}]}]";
236
+ readonly schema: "title, subtitle?, icon?: research|schedule|analyze|deploy|recurring|automation|data, steps: [{id, label, type?, color?: blue|purple|cyan|amber|emerald|rose|indigo|orange, status?: pending|active|completed|error|skipped}] - Horizontal pipeline. Use @label for agents. Types auto-detected from label.";
237
+ readonly example: "@ui:flow[{\"title\": \"Deploy Pipeline\", \"icon\": \"deploy\", \"steps\": [{\"id\": \"1\", \"label\": \"Test\", \"color\": \"cyan\"}, {\"id\": \"2\", \"label\": \"Build\", \"color\": \"amber\"}, {\"id\": \"3\", \"label\": \"Deploy\", \"color\": \"rose\"}]}]";
238
238
  };
239
239
  };
240
240
  type WidgetType = keyof typeof WIDGET_DEFINITIONS;
package/dist/index.js CHANGED
@@ -763,8 +763,8 @@ var WIDGET_DEFINITIONS = {
763
763
  example: '@ui:chart[{"chartType": "bar", "data": {"labels": ["A"], "datasets": [{"label": "X", "data": [10]}]}}]'
764
764
  },
765
765
  flow: {
766
- schema: "title, subtitle?, icon?: research|schedule|analyze|deploy, steps: [{id, label, type?: time|agent|email|slack|build|test|deploy, status?: pending|active|completed|error}], actions?: [{type, label}] - Horizontal pipeline with action button. Use @label for agents.",
767
- example: '@ui:flow[{"title": "Deploy to Production", "icon": "deploy", "steps": [{"id": "1", "label": "Test"}, {"id": "2", "label": "Build"}, {"id": "3", "label": "Deploy"}], "actions": [{"type": "run", "label": "Run"}]}]'
766
+ schema: "title, subtitle?, icon?: research|schedule|analyze|deploy|recurring|automation|data, steps: [{id, label, type?, color?: blue|purple|cyan|amber|emerald|rose|indigo|orange, status?: pending|active|completed|error|skipped}] - Horizontal pipeline. Use @label for agents. Types auto-detected from label.",
767
+ example: '@ui:flow[{"title": "Deploy Pipeline", "icon": "deploy", "steps": [{"id": "1", "label": "Test", "color": "cyan"}, {"id": "2", "label": "Build", "color": "amber"}, {"id": "3", "label": "Deploy", "color": "rose"}]}]'
768
768
  }
769
769
  };
770
770
  var ALL_WIDGET_TYPES = Object.keys(WIDGET_DEFINITIONS);
@@ -1324,35 +1324,44 @@ function Chevron() {
1324
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" }) });
1325
1325
  }
1326
1326
  function getStepColors(step, stepType) {
1327
- if (step.color) {
1328
- const colorMap = {
1329
- blue: { bg: "bg-blue-50 dark:bg-blue-500/10", text: "text-blue-700 dark:text-blue-300", border: "border-blue-200 dark:border-blue-500/30" },
1330
- purple: { bg: "bg-purple-50 dark:bg-purple-500/10", text: "text-purple-700 dark:text-purple-300", border: "border-purple-200 dark:border-purple-500/30" },
1331
- cyan: { bg: "bg-cyan-50 dark:bg-cyan-500/10", text: "text-cyan-700 dark:text-cyan-300", border: "border-cyan-200 dark:border-cyan-500/30" },
1332
- amber: { bg: "bg-amber-50 dark:bg-amber-500/10", text: "text-amber-700 dark:text-amber-300", border: "border-amber-200 dark:border-amber-500/30" },
1333
- emerald: { bg: "bg-emerald-50 dark:bg-emerald-500/10", text: "text-emerald-700 dark:text-emerald-300", border: "border-emerald-200 dark:border-emerald-500/30" },
1334
- rose: { bg: "bg-rose-50 dark:bg-rose-500/10", text: "text-rose-700 dark:text-rose-300", border: "border-rose-200 dark:border-rose-500/30" },
1335
- indigo: { bg: "bg-indigo-50 dark:bg-indigo-500/10", text: "text-indigo-700 dark:text-indigo-300", border: "border-indigo-200 dark:border-indigo-500/30" },
1336
- orange: { bg: "bg-orange-50 dark:bg-orange-500/10", text: "text-orange-700 dark:text-orange-300", border: "border-orange-200 dark:border-orange-500/30" }
1337
- };
1338
- return colorMap[step.color] || colorMap.blue;
1327
+ const colorMap = {
1328
+ blue: { bg: "bg-blue-100 dark:bg-blue-500/20", text: "text-blue-800 dark:text-blue-200", border: "border-blue-300 dark:border-blue-400/40" },
1329
+ purple: { bg: "bg-purple-100 dark:bg-purple-500/20", text: "text-purple-800 dark:text-purple-200", border: "border-purple-300 dark:border-purple-400/40" },
1330
+ cyan: { bg: "bg-cyan-100 dark:bg-cyan-500/20", text: "text-cyan-800 dark:text-cyan-200", border: "border-cyan-300 dark:border-cyan-400/40" },
1331
+ amber: { bg: "bg-amber-100 dark:bg-amber-500/20", text: "text-amber-800 dark:text-amber-200", border: "border-amber-300 dark:border-amber-400/40" },
1332
+ emerald: { bg: "bg-emerald-100 dark:bg-emerald-500/20", text: "text-emerald-800 dark:text-emerald-200", border: "border-emerald-300 dark:border-emerald-400/40" },
1333
+ rose: { bg: "bg-rose-100 dark:bg-rose-500/20", text: "text-rose-800 dark:text-rose-200", border: "border-rose-300 dark:border-rose-400/40" },
1334
+ indigo: { bg: "bg-indigo-100 dark:bg-indigo-500/20", text: "text-indigo-800 dark:text-indigo-200", border: "border-indigo-300 dark:border-indigo-400/40" },
1335
+ orange: { bg: "bg-orange-100 dark:bg-orange-500/20", text: "text-orange-800 dark:text-orange-200", border: "border-orange-300 dark:border-orange-400/40" }
1336
+ };
1337
+ if (step.color && colorMap[step.color]) {
1338
+ return colorMap[step.color];
1339
1339
  }
1340
1340
  if (stepType === "time" || stepType === "schedule" || stepType === "clock") {
1341
- return { bg: "bg-blue-50 dark:bg-blue-500/10", text: "text-blue-700 dark:text-blue-300", border: "border-blue-200 dark:border-blue-500/30" };
1341
+ return colorMap.blue;
1342
1342
  }
1343
1343
  if (stepType === "agent" || _optionalChain([stepType, 'optionalAccess', _30 => _30.startsWith, 'call', _31 => _31("@")])) {
1344
- return { bg: "bg-purple-50 dark:bg-purple-500/10", text: "text-purple-700 dark:text-purple-300", border: "border-purple-200 dark:border-purple-500/30" };
1344
+ return colorMap.purple;
1345
1345
  }
1346
1346
  if (stepType === "email" || stepType === "slack" || stepType === "message" || stepType === "notification") {
1347
- return { bg: "bg-cyan-50 dark:bg-cyan-500/10", text: "text-cyan-700 dark:text-cyan-300", border: "border-cyan-200 dark:border-cyan-500/30" };
1347
+ return colorMap.cyan;
1348
1348
  }
1349
1349
  if (stepType === "generate" || stepType === "document" || stepType === "create") {
1350
- return { bg: "bg-amber-50 dark:bg-amber-500/10", text: "text-amber-700 dark:text-amber-300", border: "border-amber-200 dark:border-amber-500/30" };
1350
+ return colorMap.amber;
1351
1351
  }
1352
1352
  if (stepType === "deploy" || stepType === "rocket" || stepType === "launch") {
1353
- return { bg: "bg-rose-50 dark:bg-rose-500/10", text: "text-rose-700 dark:text-rose-300", border: "border-rose-200 dark:border-rose-500/30" };
1353
+ return colorMap.rose;
1354
+ }
1355
+ if (stepType === "build" || stepType === "compile" || stepType === "package") {
1356
+ return colorMap.indigo;
1357
+ }
1358
+ if (stepType === "test" || stepType === "check" || stepType === "verify") {
1359
+ return colorMap.emerald;
1360
+ }
1361
+ if (stepType === "data" || stepType === "database" || stepType === "storage") {
1362
+ return colorMap.orange;
1354
1363
  }
1355
- return { bg: "bg-neutral-50 dark:bg-neutral-800", text: "text-neutral-700 dark:text-neutral-300", border: "border-neutral-200 dark:border-neutral-700" };
1364
+ return colorMap.blue;
1356
1365
  }
1357
1366
  function Flow({ widget }) {
1358
1367
  const { title, subtitle, icon, steps } = widget.props;