@adoptai/genui-components 0.1.45 → 0.1.55
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/builders/BlockForm.d.ts +31 -0
- package/dist/builders/BlockForm.d.ts.map +1 -0
- package/dist/builders/BuilderForm.d.ts +10 -2
- package/dist/builders/BuilderForm.d.ts.map +1 -1
- package/dist/builders/BuilderRecap.d.ts.map +1 -1
- package/dist/builders/ContextSlot.d.ts +6 -0
- package/dist/builders/ContextSlot.d.ts.map +1 -1
- package/dist/builders/FieldRenderer.d.ts +5 -2
- package/dist/builders/FieldRenderer.d.ts.map +1 -1
- package/dist/builders/StepperBuilder.d.ts +4 -2
- package/dist/builders/StepperBuilder.d.ts.map +1 -1
- package/dist/builders/fields.d.ts +22 -1
- package/dist/builders/fields.d.ts.map +1 -1
- package/dist/builders/hooks.d.ts +17 -0
- package/dist/builders/hooks.d.ts.map +1 -1
- package/dist/builders/index.d.ts +5 -5
- package/dist/builders/index.d.ts.map +1 -1
- package/dist/builders/resolver.d.ts +4 -1
- package/dist/builders/resolver.d.ts.map +1 -1
- package/dist/builders/schemas.d.ts +196 -1
- package/dist/builders/schemas.d.ts.map +1 -1
- package/dist/composites/journal-entry/resolver.cjs +2 -2
- package/dist/composites/journal-entry/resolver.cjs.map +1 -1
- package/dist/composites/journal-entry/resolver.js +2 -2
- package/dist/composites/journal-entry/resolver.js.map +1 -1
- package/dist/composites/waterfall-chart/resolver.cjs +21 -7
- package/dist/composites/waterfall-chart/resolver.cjs.map +1 -1
- package/dist/composites/waterfall-chart/resolver.d.ts.map +1 -1
- package/dist/composites/waterfall-chart/resolver.js +21 -7
- package/dist/composites/waterfall-chart/resolver.js.map +1 -1
- package/dist/composites/workflow-stepper/resolver.cjs +2 -0
- package/dist/composites/workflow-stepper/resolver.cjs.map +1 -1
- package/dist/composites/workflow-stepper/resolver.d.ts.map +1 -1
- package/dist/composites/workflow-stepper/resolver.js +2 -0
- package/dist/composites/workflow-stepper/resolver.js.map +1 -1
- package/dist/index.cjs +1415 -783
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1415 -783
- package/dist/index.js.map +1 -1
- package/dist/renderer.cjs +28 -12
- package/dist/renderer.cjs.map +1 -1
- package/dist/renderer.js +28 -12
- package/dist/renderer.js.map +1 -1
- package/dist/resolver.cjs +28 -12
- package/dist/resolver.cjs.map +1 -1
- package/dist/resolver.js +28 -12
- package/dist/resolver.js.map +1 -1
- package/dist/schemas/index.cjs +3 -3
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +3 -3
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/workflow-stepper.d.ts +1 -0
- package/dist/schemas/workflow-stepper.d.ts.map +1 -1
- package/dist/tool-definitions.json +4 -3
- package/package.json +2 -2
- package/dist/builders/EscalationCard.d.ts +0 -17
- package/dist/builders/EscalationCard.d.ts.map +0 -1
- package/dist/builders/FormBuilder.d.ts +0 -19
- package/dist/builders/FormBuilder.d.ts.map +0 -1
package/dist/renderer.js
CHANGED
|
@@ -5217,7 +5217,7 @@ var workflowStepperSchema = z.object({
|
|
|
5217
5217
|
n: z.number().int().positive().optional(),
|
|
5218
5218
|
title: z.string(),
|
|
5219
5219
|
sub: z.string().optional(),
|
|
5220
|
-
status: z.enum(["done", "active", "review", "pending", "failed"]),
|
|
5220
|
+
status: z.enum(["done", "active", "review", "pending", "blocked", "failed"]),
|
|
5221
5221
|
assignees: z.array(
|
|
5222
5222
|
z.object({
|
|
5223
5223
|
name: z.string(),
|
|
@@ -5232,7 +5232,7 @@ var workflowStepperSchema = z.object({
|
|
|
5232
5232
|
});
|
|
5233
5233
|
var workflowStepperTool = {
|
|
5234
5234
|
name: "render_workflow_stepper",
|
|
5235
|
-
description: "Render a recurring-process workflow stepper \u2014 a horizontal strip of sequential step cards (e.g. a monthly close pipeline) with per-step status (done/active/review/pending/failed) and human + agent assignee avatars. Use for org processes with named steps and owners, NOT for generic progress bars or project phase summaries.",
|
|
5235
|
+
description: "Render a recurring-process workflow stepper \u2014 a horizontal strip of sequential step cards (e.g. a monthly close pipeline) with per-step status (done/active/review/pending/blocked/failed) and human + agent assignee avatars. Use for org processes with named steps and owners, NOT for generic progress bars or project phase summaries.",
|
|
5236
5236
|
input_schema: {
|
|
5237
5237
|
type: "object",
|
|
5238
5238
|
properties: {
|
|
@@ -5253,7 +5253,7 @@ var workflowStepperTool = {
|
|
|
5253
5253
|
n: { type: "number", description: "Step number; defaults to index + 1" },
|
|
5254
5254
|
title: { type: "string" },
|
|
5255
5255
|
sub: { type: "string", description: "Short status caption, e.g. '7 accounts \xB7 2 exceptions'" },
|
|
5256
|
-
status: { type: "string", enum: ["done", "active", "review", "pending", "failed"] },
|
|
5256
|
+
status: { type: "string", enum: ["done", "active", "review", "pending", "blocked", "failed"] },
|
|
5257
5257
|
assignees: {
|
|
5258
5258
|
type: "array",
|
|
5259
5259
|
maxItems: 6,
|
|
@@ -6606,6 +6606,14 @@ init_ThemeContext();
|
|
|
6606
6606
|
var TERRACOTTA = ACCENT;
|
|
6607
6607
|
var POS = "#15803d";
|
|
6608
6608
|
var NEG = "#dc2626";
|
|
6609
|
+
var _CURRENCY = /* @__PURE__ */ new Set(["$", "\u20AC", "\xA3", "\xA5", "\u20B9"]);
|
|
6610
|
+
function _abbrev(n) {
|
|
6611
|
+
const a = Math.abs(n);
|
|
6612
|
+
if (a >= 1e9) return `${(a / 1e9).toFixed(1).replace(/\.0$/, "")}B`;
|
|
6613
|
+
if (a >= 1e6) return `${(a / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
6614
|
+
if (a >= 1e3) return `${(a / 1e3).toFixed(1).replace(/\.0$/, "")}K`;
|
|
6615
|
+
return `${a}`;
|
|
6616
|
+
}
|
|
6609
6617
|
var tooltipStyle3 = {
|
|
6610
6618
|
fontSize: "12px",
|
|
6611
6619
|
borderRadius: "8px",
|
|
@@ -6620,6 +6628,15 @@ function WaterfallChartResolver(p) {
|
|
|
6620
6628
|
const { isVisible, toggle } = useSeriesToggle(["Positive", "Negative", "Total"]);
|
|
6621
6629
|
const unit = (_a = p.unit) != null ? _a : "";
|
|
6622
6630
|
const bars = (_b = p.bars) != null ? _b : [];
|
|
6631
|
+
const fmtVal = (v, withSign = false) => {
|
|
6632
|
+
const sign = v < 0 ? "-" : withSign && v > 0 ? "+" : "";
|
|
6633
|
+
const body = _CURRENCY.has(unit) ? `${unit}${_abbrev(v)}` : `${_abbrev(v)}${unit}`;
|
|
6634
|
+
return `${sign}${body}`;
|
|
6635
|
+
};
|
|
6636
|
+
const yAxisWidth = Math.min(
|
|
6637
|
+
72,
|
|
6638
|
+
Math.max(40, ...bars.map((b) => fmtVal(b.value).length * 7 + 8))
|
|
6639
|
+
);
|
|
6623
6640
|
let running = 0;
|
|
6624
6641
|
const chartData = bars.map((bar) => {
|
|
6625
6642
|
const base = bar.isTotal ? 0 : running;
|
|
@@ -6629,7 +6646,7 @@ function WaterfallChartResolver(p) {
|
|
|
6629
6646
|
}).filter((d) => isVisible(d.category));
|
|
6630
6647
|
return /* @__PURE__ */ jsx(ComponentActions, { filename: (_c = p.title) != null ? _c : "waterfall-chart", children: /* @__PURE__ */ jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
6631
6648
|
p.title && /* @__PURE__ */ jsx("p", { style: { fontFamily: "var(--font-serif)", fontSize: "15px", fontWeight: 600, color: "var(--foreground)", letterSpacing: "-0.005em" }, children: p.title }),
|
|
6632
|
-
/* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: 200, children: /* @__PURE__ */ jsxs(BarChart, { data: chartData, margin: { top: 4, right: 8, left:
|
|
6649
|
+
/* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: 200, children: /* @__PURE__ */ jsxs(BarChart, { data: chartData, margin: { top: 4, right: 8, left: 4, bottom: 0 }, children: [
|
|
6633
6650
|
/* @__PURE__ */ jsx(
|
|
6634
6651
|
XAxis,
|
|
6635
6652
|
{
|
|
@@ -6645,17 +6662,14 @@ function WaterfallChartResolver(p) {
|
|
|
6645
6662
|
tick: { fontSize: 11, fill: MUTED2 },
|
|
6646
6663
|
axisLine: false,
|
|
6647
6664
|
tickLine: false,
|
|
6648
|
-
width:
|
|
6649
|
-
tickFormatter: (v) =>
|
|
6665
|
+
width: yAxisWidth,
|
|
6666
|
+
tickFormatter: (v) => fmtVal(Number(v))
|
|
6650
6667
|
}
|
|
6651
6668
|
),
|
|
6652
6669
|
/* @__PURE__ */ jsx(
|
|
6653
6670
|
Tooltip,
|
|
6654
6671
|
{
|
|
6655
|
-
formatter: (value) =>
|
|
6656
|
-
const v = Number(value);
|
|
6657
|
-
return [`${v > 0 ? "+" : ""}${v}${unit}`, ""];
|
|
6658
|
-
},
|
|
6672
|
+
formatter: (value) => [fmtVal(Number(value), true), ""],
|
|
6659
6673
|
contentStyle: tooltipStyle3,
|
|
6660
6674
|
cursor: { fill: "#f2f2f2" }
|
|
6661
6675
|
}
|
|
@@ -7039,7 +7053,7 @@ function JournalEntryResolver(p) {
|
|
|
7039
7053
|
}, children: /* @__PURE__ */ jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "14px" }, children: [
|
|
7040
7054
|
p.title && /* @__PURE__ */ jsx("p", { style: { fontFamily: "var(--font-serif)", fontSize: "15px", fontWeight: 600, color: "var(--foreground)", letterSpacing: "-0.005em" }, children: p.title }),
|
|
7041
7055
|
((_c = p.entries) != null ? _c : []).map((entry) => {
|
|
7042
|
-
var _a2, _b2;
|
|
7056
|
+
var _a2, _b2, _c2;
|
|
7043
7057
|
let totalDebit = 0, totalCredit = 0;
|
|
7044
7058
|
((_a2 = entry.lines) != null ? _a2 : []).forEach((l) => {
|
|
7045
7059
|
totalDebit += l.debit;
|
|
@@ -7065,7 +7079,7 @@ function JournalEntryResolver(p) {
|
|
|
7065
7079
|
letterSpacing: "0.02em"
|
|
7066
7080
|
}, children: h }, h)) }) }),
|
|
7067
7081
|
/* @__PURE__ */ jsxs("tbody", { children: [
|
|
7068
|
-
entry.lines.map((line, li) => {
|
|
7082
|
+
((_c2 = entry.lines) != null ? _c2 : []).map((line, li) => {
|
|
7069
7083
|
var _a3;
|
|
7070
7084
|
return /* @__PURE__ */ jsxs("tr", { style: { background: li % 2 === 0 ? "white" : "#fafafa" }, children: [
|
|
7071
7085
|
/* @__PURE__ */ jsx("td", { style: { padding: "6px 12px", fontSize: "13px" }, children: line.account }),
|
|
@@ -17127,6 +17141,7 @@ var STATUS_COLORS3 = {
|
|
|
17127
17141
|
// filled from theme ACCENT at render time
|
|
17128
17142
|
review: "#f59e0b",
|
|
17129
17143
|
pending: "#9ca3af",
|
|
17144
|
+
blocked: "#b45309",
|
|
17130
17145
|
failed: "#dc2626"
|
|
17131
17146
|
};
|
|
17132
17147
|
var STATUS_LABELS = {
|
|
@@ -17134,6 +17149,7 @@ var STATUS_LABELS = {
|
|
|
17134
17149
|
active: "In progress",
|
|
17135
17150
|
review: "In review",
|
|
17136
17151
|
pending: "Pending",
|
|
17152
|
+
blocked: "Blocked",
|
|
17137
17153
|
failed: "Failed"
|
|
17138
17154
|
};
|
|
17139
17155
|
var HUMAN_PALETTE = ["#2563eb", "#0f766e", "#7c3aed", "#b45309", "#be185d", "#4d7c0f"];
|