@datatechsolutions/ui 2.11.75 → 2.11.77
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/astrlabe/contracts.d.mts +67 -1
- package/dist/astrlabe/contracts.d.ts +67 -1
- package/dist/astrlabe/index.d.mts +111 -3
- package/dist/astrlabe/index.d.ts +111 -3
- package/dist/astrlabe/index.js +1052 -147
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +917 -20
- package/dist/astrlabe/index.mjs.map +1 -1
- package/dist/astrlabe/workflow-canvas.js +3 -3
- package/dist/astrlabe/workflow-canvas.mjs +2 -2
- package/dist/{chunk-WYHKTAQE.mjs → chunk-3TOG7EQN.mjs} +3 -3
- package/dist/{chunk-WYHKTAQE.mjs.map → chunk-3TOG7EQN.mjs.map} +1 -1
- package/dist/{chunk-RBDOC5QZ.mjs → chunk-LLFU42KC.mjs} +69 -20
- package/dist/chunk-LLFU42KC.mjs.map +1 -0
- package/dist/{chunk-2VUZ4ZGV.js → chunk-PIFVDMDN.js} +64 -64
- package/dist/{chunk-2VUZ4ZGV.js.map → chunk-PIFVDMDN.js.map} +1 -1
- package/dist/{chunk-4VUNR53L.js → chunk-TUEYBNWL.js} +69 -20
- package/dist/chunk-TUEYBNWL.js.map +1 -0
- package/dist/index.d.mts +30 -3
- package/dist/index.d.ts +30 -3
- package/dist/index.js +744 -744
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-4VUNR53L.js.map +0 -1
- package/dist/chunk-RBDOC5QZ.mjs.map +0 -1
|
@@ -16464,7 +16464,8 @@ function DepartmentWorkflowDemo({
|
|
|
16464
16464
|
hideHeader = false,
|
|
16465
16465
|
onComplete,
|
|
16466
16466
|
theme,
|
|
16467
|
-
nodeAvatars
|
|
16467
|
+
nodeAvatars,
|
|
16468
|
+
onStepChange
|
|
16468
16469
|
}) {
|
|
16469
16470
|
const t = { ...DEFAULT_THEME, ...theme };
|
|
16470
16471
|
const { graph, steps, title, description, accentBadge, completionSummary, nodeSubtitles } = workflow;
|
|
@@ -16538,6 +16539,11 @@ function DepartmentWorkflowDemo({
|
|
|
16538
16539
|
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
16539
16540
|
};
|
|
16540
16541
|
}, [autoPlay, handleRun]);
|
|
16542
|
+
React12.useEffect(() => {
|
|
16543
|
+
if (stepIndex >= 0 && onStepChange) {
|
|
16544
|
+
onStepChange(stepIndex, steps[stepIndex]?.label ?? "");
|
|
16545
|
+
}
|
|
16546
|
+
}, [stepIndex, steps, onStepChange]);
|
|
16541
16547
|
const currentStepLabel = stepIndex >= 0 ? steps[stepIndex]?.label : "Ready to run";
|
|
16542
16548
|
const Shell = hideHeader ? ({ children: c }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: c }) : ({ children: c }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: `liquid-surface rounded-2xl overflow-hidden ${className ?? ""}`, children: c });
|
|
16543
16549
|
return /* @__PURE__ */ jsxRuntime.jsxs(Shell, { children: [
|
|
@@ -17238,6 +17244,20 @@ var koriAssistantTheme = {
|
|
|
17238
17244
|
badge: "bg-amber-500/15 text-amber-700 dark:text-amber-300"
|
|
17239
17245
|
}
|
|
17240
17246
|
};
|
|
17247
|
+
var DEFAULT_LABELS = {
|
|
17248
|
+
conversation: (persona, department) => `Conversa \u2014 ${persona} \xB7 ${department}`,
|
|
17249
|
+
composerHint: "Mensagem para Kori AI\u2026",
|
|
17250
|
+
composerEnter: "\u23CE enviar",
|
|
17251
|
+
personaTag: (persona) => persona.toUpperCase(),
|
|
17252
|
+
assistantResponse: (count) => `Entendi. Vou ativar ${count} agentes especializados e orquestrar o fluxo no Astrlabe.`,
|
|
17253
|
+
stageAsk: "Ask",
|
|
17254
|
+
stageOrchestrate: "Orchestrate",
|
|
17255
|
+
stageDeliver: "Deliver",
|
|
17256
|
+
footerInput: "Usu\xE1rio envia um pedido ao assistente\u2026",
|
|
17257
|
+
footerWorkflow: "Astrlabe orquestrando agentes e datasources\u2026",
|
|
17258
|
+
footerDashboard: "Pronto \u2014 dashboard do ERP atualizado.",
|
|
17259
|
+
workflowStep: (current, total) => `Etapa ${current} de ${total}`
|
|
17260
|
+
};
|
|
17241
17261
|
function DepartmentAssistantDemo({
|
|
17242
17262
|
flows,
|
|
17243
17263
|
initialIndex = 0,
|
|
@@ -17247,20 +17267,29 @@ function DepartmentAssistantDemo({
|
|
|
17247
17267
|
workflowStepMs = 1050,
|
|
17248
17268
|
theme,
|
|
17249
17269
|
brandName = "Kori AI Assistant",
|
|
17270
|
+
labels,
|
|
17250
17271
|
className
|
|
17251
17272
|
}) {
|
|
17252
17273
|
const t = { ...DEFAULT_ASSISTANT_THEME, ...theme, workflow: { ...DEFAULT_ASSISTANT_THEME.workflow, ...theme?.workflow } };
|
|
17274
|
+
const L = { ...DEFAULT_LABELS, ...labels };
|
|
17253
17275
|
const [flowIndex, setFlowIndex] = React12.useState(initialIndex);
|
|
17254
17276
|
const [stage, setStage] = React12.useState("input");
|
|
17255
17277
|
const [userTyped, setUserTyped] = React12.useState("");
|
|
17256
17278
|
const [assistantTyped, setAssistantTyped] = React12.useState("");
|
|
17257
17279
|
const [inputPhase, setInputPhase] = React12.useState("user");
|
|
17280
|
+
const [workflowStepIndex, setWorkflowStepIndex] = React12.useState(-1);
|
|
17281
|
+
const [workflowStepLabel, setWorkflowStepLabel] = React12.useState("");
|
|
17258
17282
|
const rotateTimerRef = React12.useRef(null);
|
|
17259
17283
|
const flow = flows[flowIndex];
|
|
17284
|
+
const totalSteps = flow.workflow.steps.length;
|
|
17260
17285
|
const assistantMessage = React12.useMemo(
|
|
17261
|
-
() =>
|
|
17262
|
-
[flow.agents.length]
|
|
17286
|
+
() => L.assistantResponse(flow.agents.length),
|
|
17287
|
+
[flow.agents.length, L]
|
|
17263
17288
|
);
|
|
17289
|
+
React12.useEffect(() => {
|
|
17290
|
+
setWorkflowStepIndex(-1);
|
|
17291
|
+
setWorkflowStepLabel("");
|
|
17292
|
+
}, [flow.id]);
|
|
17264
17293
|
React12.useEffect(() => {
|
|
17265
17294
|
if (stage === "input") {
|
|
17266
17295
|
setInputPhase("user");
|
|
@@ -17347,11 +17376,22 @@ function DepartmentAssistantDemo({
|
|
|
17347
17376
|
}) })
|
|
17348
17377
|
] }),
|
|
17349
17378
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-white/5 px-6 py-3 flex items-center gap-3 text-[11px]", children: [
|
|
17350
|
-
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label:
|
|
17379
|
+
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label: L.stageAsk, stageIndex, mine: 0, activeBadge: t.stageActiveBadge }),
|
|
17351
17380
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-white/10 to-white/5" }),
|
|
17352
|
-
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label:
|
|
17381
|
+
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label: L.stageOrchestrate, stageIndex, mine: 1, activeBadge: t.stageActiveBadge }),
|
|
17353
17382
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-white/5 to-white/10" }),
|
|
17354
|
-
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label:
|
|
17383
|
+
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label: L.stageDeliver, stageIndex, mine: 2, activeBadge: t.stageActiveBadge })
|
|
17384
|
+
] }),
|
|
17385
|
+
stage === "workflow" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-white/5 px-6 py-2.5 flex items-center gap-3", children: [
|
|
17386
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: flow.workflow.steps.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17387
|
+
"span",
|
|
17388
|
+
{
|
|
17389
|
+
className: `h-1 w-3.5 rounded-full transition-all duration-500 ${workflowStepIndex < 0 ? "bg-white/10" : index < workflowStepIndex ? "bg-emerald-500" : index === workflowStepIndex ? `${t.progressActiveBar} animate-pulse` : "bg-white/10"}`
|
|
17390
|
+
},
|
|
17391
|
+
index
|
|
17392
|
+
)) }),
|
|
17393
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: L.workflowStep(workflowStepIndex + 1, totalSteps) }),
|
|
17394
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[11px] text-gray-700 dark:text-gray-200 flex-1", children: workflowStepLabel || flow.workflow.steps[0]?.label })
|
|
17355
17395
|
] }),
|
|
17356
17396
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", style: { height: 620 }, children: /* @__PURE__ */ jsxRuntime.jsxs(framerMotion.AnimatePresence, { mode: "wait", children: [
|
|
17357
17397
|
stage === "input" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17375,7 +17415,11 @@ function DepartmentAssistantDemo({
|
|
|
17375
17415
|
agents: flow.agents,
|
|
17376
17416
|
agentAvatars: flow.agentAvatars,
|
|
17377
17417
|
avatarGradient: t.inputAvatar,
|
|
17378
|
-
cursorClass: t.inputCursor
|
|
17418
|
+
cursorClass: t.inputCursor,
|
|
17419
|
+
conversationLabel: L.conversation,
|
|
17420
|
+
personaTagFn: L.personaTag,
|
|
17421
|
+
composerHint: L.composerHint,
|
|
17422
|
+
composerEnter: L.composerEnter
|
|
17379
17423
|
}
|
|
17380
17424
|
)
|
|
17381
17425
|
},
|
|
@@ -17397,6 +17441,10 @@ function DepartmentAssistantDemo({
|
|
|
17397
17441
|
hideHeader: true,
|
|
17398
17442
|
stepDurationMs: workflowStepMs,
|
|
17399
17443
|
onComplete: handleWorkflowComplete,
|
|
17444
|
+
onStepChange: (idx, label) => {
|
|
17445
|
+
setWorkflowStepIndex(idx);
|
|
17446
|
+
setWorkflowStepLabel(label);
|
|
17447
|
+
},
|
|
17400
17448
|
theme: t.workflow,
|
|
17401
17449
|
nodeAvatars: flow.nodeAvatars
|
|
17402
17450
|
},
|
|
@@ -17422,9 +17470,9 @@ function DepartmentAssistantDemo({
|
|
|
17422
17470
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-[11px] text-gray-500 dark:text-gray-400", children: [
|
|
17423
17471
|
/* @__PURE__ */ jsxRuntime.jsx(HeroIcons.BoltIcon, { className: `h-3.5 w-3.5 ${t.progressActiveBar.replace("bg-", "text-")}` }),
|
|
17424
17472
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium", children: [
|
|
17425
|
-
stage === "input" &&
|
|
17426
|
-
stage === "workflow" &&
|
|
17427
|
-
stage === "dashboard" &&
|
|
17473
|
+
stage === "input" && L.footerInput,
|
|
17474
|
+
stage === "workflow" && L.footerWorkflow,
|
|
17475
|
+
stage === "dashboard" && L.footerDashboard
|
|
17428
17476
|
] })
|
|
17429
17477
|
] }),
|
|
17430
17478
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: flows.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17462,7 +17510,11 @@ function InputStage3({
|
|
|
17462
17510
|
agents,
|
|
17463
17511
|
agentAvatars,
|
|
17464
17512
|
avatarGradient,
|
|
17465
|
-
cursorClass
|
|
17513
|
+
cursorClass,
|
|
17514
|
+
conversationLabel,
|
|
17515
|
+
personaTagFn,
|
|
17516
|
+
composerHint,
|
|
17517
|
+
composerEnter
|
|
17466
17518
|
}) {
|
|
17467
17519
|
const cursor = /* @__PURE__ */ jsxRuntime.jsx("span", { className: `ml-0.5 inline-block w-[2px] h-4 align-middle ${cursorClass} animate-pulse` });
|
|
17468
17520
|
const showAssistant = phase === "assistant";
|
|
@@ -17470,10 +17522,7 @@ function InputStage3({
|
|
|
17470
17522
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col px-4 py-6 sm:px-8", children: [
|
|
17471
17523
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-5 flex items-center justify-center gap-2 text-[10px] font-semibold uppercase tracking-wider text-gray-400 dark:text-gray-500", children: [
|
|
17472
17524
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-1 w-1 rounded-full bg-emerald-500 animate-pulse" }),
|
|
17473
|
-
|
|
17474
|
-
personaName,
|
|
17475
|
-
" \xB7 ",
|
|
17476
|
-
department
|
|
17525
|
+
conversationLabel(personaName, department)
|
|
17477
17526
|
] }),
|
|
17478
17527
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto flex w-full max-w-3xl flex-1 flex-col justify-end gap-4 overflow-hidden", children: [
|
|
17479
17528
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liquid-surface max-w-[88%] rounded-2xl rounded-tr-md px-5 py-3.5", children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-base leading-relaxed text-gray-900 dark:text-white", children: [
|
|
@@ -17490,7 +17539,7 @@ function InputStage3({
|
|
|
17490
17539
|
}
|
|
17491
17540
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br ${avatarGradient} shadow-md`, children: /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.SparklesIcon, { className: "h-5 w-5 text-white" }) }),
|
|
17492
17541
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-surface max-w-[88%] rounded-2xl rounded-bl-md px-5 py-3.5", children: [
|
|
17493
|
-
assistantMessage.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1 text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: personaName }),
|
|
17542
|
+
assistantMessage.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1 text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: personaTagFn(personaName) }),
|
|
17494
17543
|
assistantMessage.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 py-1", children: [
|
|
17495
17544
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-1.5 w-1.5 rounded-full ${cursorClass} animate-pulse` }),
|
|
17496
17545
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-1.5 w-1.5 rounded-full ${cursorClass} animate-pulse`, style: { animationDelay: "150ms" } }),
|
|
@@ -17519,8 +17568,8 @@ function InputStage3({
|
|
|
17519
17568
|
] })
|
|
17520
17569
|
] }),
|
|
17521
17570
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mt-5 w-full max-w-3xl", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-surface flex items-center gap-3 rounded-full px-4 py-2.5 opacity-60", children: [
|
|
17522
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs italic text-gray-500 dark:text-gray-400", children:
|
|
17523
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex items-center gap-1 text-[10px] text-gray-400 dark:text-gray-500", children:
|
|
17571
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs italic text-gray-500 dark:text-gray-400", children: composerHint }),
|
|
17572
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex items-center gap-1 text-[10px] text-gray-400 dark:text-gray-500", children: composerEnter })
|
|
17524
17573
|
] }) })
|
|
17525
17574
|
] });
|
|
17526
17575
|
}
|
|
@@ -25528,5 +25577,5 @@ exports.usePullToRefresh = usePullToRefresh;
|
|
|
25528
25577
|
exports.validateDashboardSpec = validateDashboardSpec;
|
|
25529
25578
|
exports.xScale = xScale;
|
|
25530
25579
|
exports.yScale = yScale;
|
|
25531
|
-
//# sourceMappingURL=chunk-
|
|
25532
|
-
//# sourceMappingURL=chunk-
|
|
25580
|
+
//# sourceMappingURL=chunk-TUEYBNWL.js.map
|
|
25581
|
+
//# sourceMappingURL=chunk-TUEYBNWL.js.map
|