@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.
Files changed (61) hide show
  1. package/dist/builders/BlockForm.d.ts +31 -0
  2. package/dist/builders/BlockForm.d.ts.map +1 -0
  3. package/dist/builders/BuilderForm.d.ts +10 -2
  4. package/dist/builders/BuilderForm.d.ts.map +1 -1
  5. package/dist/builders/BuilderRecap.d.ts.map +1 -1
  6. package/dist/builders/ContextSlot.d.ts +6 -0
  7. package/dist/builders/ContextSlot.d.ts.map +1 -1
  8. package/dist/builders/FieldRenderer.d.ts +5 -2
  9. package/dist/builders/FieldRenderer.d.ts.map +1 -1
  10. package/dist/builders/StepperBuilder.d.ts +4 -2
  11. package/dist/builders/StepperBuilder.d.ts.map +1 -1
  12. package/dist/builders/fields.d.ts +22 -1
  13. package/dist/builders/fields.d.ts.map +1 -1
  14. package/dist/builders/hooks.d.ts +17 -0
  15. package/dist/builders/hooks.d.ts.map +1 -1
  16. package/dist/builders/index.d.ts +5 -5
  17. package/dist/builders/index.d.ts.map +1 -1
  18. package/dist/builders/resolver.d.ts +4 -1
  19. package/dist/builders/resolver.d.ts.map +1 -1
  20. package/dist/builders/schemas.d.ts +196 -1
  21. package/dist/builders/schemas.d.ts.map +1 -1
  22. package/dist/composites/journal-entry/resolver.cjs +2 -2
  23. package/dist/composites/journal-entry/resolver.cjs.map +1 -1
  24. package/dist/composites/journal-entry/resolver.js +2 -2
  25. package/dist/composites/journal-entry/resolver.js.map +1 -1
  26. package/dist/composites/waterfall-chart/resolver.cjs +21 -7
  27. package/dist/composites/waterfall-chart/resolver.cjs.map +1 -1
  28. package/dist/composites/waterfall-chart/resolver.d.ts.map +1 -1
  29. package/dist/composites/waterfall-chart/resolver.js +21 -7
  30. package/dist/composites/waterfall-chart/resolver.js.map +1 -1
  31. package/dist/composites/workflow-stepper/resolver.cjs +2 -0
  32. package/dist/composites/workflow-stepper/resolver.cjs.map +1 -1
  33. package/dist/composites/workflow-stepper/resolver.d.ts.map +1 -1
  34. package/dist/composites/workflow-stepper/resolver.js +2 -0
  35. package/dist/composites/workflow-stepper/resolver.js.map +1 -1
  36. package/dist/index.cjs +1415 -783
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.js +1415 -783
  39. package/dist/index.js.map +1 -1
  40. package/dist/renderer.cjs +28 -12
  41. package/dist/renderer.cjs.map +1 -1
  42. package/dist/renderer.js +28 -12
  43. package/dist/renderer.js.map +1 -1
  44. package/dist/resolver.cjs +28 -12
  45. package/dist/resolver.cjs.map +1 -1
  46. package/dist/resolver.js +28 -12
  47. package/dist/resolver.js.map +1 -1
  48. package/dist/schemas/index.cjs +3 -3
  49. package/dist/schemas/index.cjs.map +1 -1
  50. package/dist/schemas/index.d.ts +1 -0
  51. package/dist/schemas/index.d.ts.map +1 -1
  52. package/dist/schemas/index.js +3 -3
  53. package/dist/schemas/index.js.map +1 -1
  54. package/dist/schemas/workflow-stepper.d.ts +1 -0
  55. package/dist/schemas/workflow-stepper.d.ts.map +1 -1
  56. package/dist/tool-definitions.json +4 -3
  57. package/package.json +2 -2
  58. package/dist/builders/EscalationCard.d.ts +0 -17
  59. package/dist/builders/EscalationCard.d.ts.map +0 -1
  60. package/dist/builders/FormBuilder.d.ts +0 -19
  61. package/dist/builders/FormBuilder.d.ts.map +0 -1
package/dist/renderer.cjs CHANGED
@@ -5245,7 +5245,7 @@ var workflowStepperSchema = zod.z.object({
5245
5245
  n: zod.z.number().int().positive().optional(),
5246
5246
  title: zod.z.string(),
5247
5247
  sub: zod.z.string().optional(),
5248
- status: zod.z.enum(["done", "active", "review", "pending", "failed"]),
5248
+ status: zod.z.enum(["done", "active", "review", "pending", "blocked", "failed"]),
5249
5249
  assignees: zod.z.array(
5250
5250
  zod.z.object({
5251
5251
  name: zod.z.string(),
@@ -5260,7 +5260,7 @@ var workflowStepperSchema = zod.z.object({
5260
5260
  });
5261
5261
  var workflowStepperTool = {
5262
5262
  name: "render_workflow_stepper",
5263
- 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.",
5263
+ 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.",
5264
5264
  input_schema: {
5265
5265
  type: "object",
5266
5266
  properties: {
@@ -5281,7 +5281,7 @@ var workflowStepperTool = {
5281
5281
  n: { type: "number", description: "Step number; defaults to index + 1" },
5282
5282
  title: { type: "string" },
5283
5283
  sub: { type: "string", description: "Short status caption, e.g. '7 accounts \xB7 2 exceptions'" },
5284
- status: { type: "string", enum: ["done", "active", "review", "pending", "failed"] },
5284
+ status: { type: "string", enum: ["done", "active", "review", "pending", "blocked", "failed"] },
5285
5285
  assignees: {
5286
5286
  type: "array",
5287
5287
  maxItems: 6,
@@ -6634,6 +6634,14 @@ init_ThemeContext();
6634
6634
  var TERRACOTTA = ACCENT;
6635
6635
  var POS = "#15803d";
6636
6636
  var NEG = "#dc2626";
6637
+ var _CURRENCY = /* @__PURE__ */ new Set(["$", "\u20AC", "\xA3", "\xA5", "\u20B9"]);
6638
+ function _abbrev(n) {
6639
+ const a = Math.abs(n);
6640
+ if (a >= 1e9) return `${(a / 1e9).toFixed(1).replace(/\.0$/, "")}B`;
6641
+ if (a >= 1e6) return `${(a / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
6642
+ if (a >= 1e3) return `${(a / 1e3).toFixed(1).replace(/\.0$/, "")}K`;
6643
+ return `${a}`;
6644
+ }
6637
6645
  var tooltipStyle3 = {
6638
6646
  fontSize: "12px",
6639
6647
  borderRadius: "8px",
@@ -6648,6 +6656,15 @@ function WaterfallChartResolver(p) {
6648
6656
  const { isVisible, toggle } = useSeriesToggle(["Positive", "Negative", "Total"]);
6649
6657
  const unit = (_a = p.unit) != null ? _a : "";
6650
6658
  const bars = (_b = p.bars) != null ? _b : [];
6659
+ const fmtVal = (v, withSign = false) => {
6660
+ const sign = v < 0 ? "-" : withSign && v > 0 ? "+" : "";
6661
+ const body = _CURRENCY.has(unit) ? `${unit}${_abbrev(v)}` : `${_abbrev(v)}${unit}`;
6662
+ return `${sign}${body}`;
6663
+ };
6664
+ const yAxisWidth = Math.min(
6665
+ 72,
6666
+ Math.max(40, ...bars.map((b) => fmtVal(b.value).length * 7 + 8))
6667
+ );
6651
6668
  let running = 0;
6652
6669
  const chartData = bars.map((bar) => {
6653
6670
  const base = bar.isTotal ? 0 : running;
@@ -6657,7 +6674,7 @@ function WaterfallChartResolver(p) {
6657
6674
  }).filter((d) => isVisible(d.category));
6658
6675
  return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: (_c = p.title) != null ? _c : "waterfall-chart", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "12px" }, children: [
6659
6676
  p.title && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontFamily: "var(--font-serif)", fontSize: "15px", fontWeight: 600, color: "var(--foreground)", letterSpacing: "-0.005em" }, children: p.title }),
6660
- /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: 200, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.BarChart, { data: chartData, margin: { top: 4, right: 8, left: 0, bottom: 0 }, children: [
6677
+ /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: 200, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.BarChart, { data: chartData, margin: { top: 4, right: 8, left: 4, bottom: 0 }, children: [
6661
6678
  /* @__PURE__ */ jsxRuntime.jsx(
6662
6679
  recharts.XAxis,
6663
6680
  {
@@ -6673,17 +6690,14 @@ function WaterfallChartResolver(p) {
6673
6690
  tick: { fontSize: 11, fill: MUTED2 },
6674
6691
  axisLine: false,
6675
6692
  tickLine: false,
6676
- width: 42,
6677
- tickFormatter: (v) => `${v}${unit}`
6693
+ width: yAxisWidth,
6694
+ tickFormatter: (v) => fmtVal(Number(v))
6678
6695
  }
6679
6696
  ),
6680
6697
  /* @__PURE__ */ jsxRuntime.jsx(
6681
6698
  recharts.Tooltip,
6682
6699
  {
6683
- formatter: (value) => {
6684
- const v = Number(value);
6685
- return [`${v > 0 ? "+" : ""}${v}${unit}`, ""];
6686
- },
6700
+ formatter: (value) => [fmtVal(Number(value), true), ""],
6687
6701
  contentStyle: tooltipStyle3,
6688
6702
  cursor: { fill: "#f2f2f2" }
6689
6703
  }
@@ -7067,7 +7081,7 @@ function JournalEntryResolver(p) {
7067
7081
  }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "14px" }, children: [
7068
7082
  p.title && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontFamily: "var(--font-serif)", fontSize: "15px", fontWeight: 600, color: "var(--foreground)", letterSpacing: "-0.005em" }, children: p.title }),
7069
7083
  ((_c = p.entries) != null ? _c : []).map((entry) => {
7070
- var _a2, _b2;
7084
+ var _a2, _b2, _c2;
7071
7085
  let totalDebit = 0, totalCredit = 0;
7072
7086
  ((_a2 = entry.lines) != null ? _a2 : []).forEach((l) => {
7073
7087
  totalDebit += l.debit;
@@ -7093,7 +7107,7 @@ function JournalEntryResolver(p) {
7093
7107
  letterSpacing: "0.02em"
7094
7108
  }, children: h }, h)) }) }),
7095
7109
  /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
7096
- entry.lines.map((line, li) => {
7110
+ ((_c2 = entry.lines) != null ? _c2 : []).map((line, li) => {
7097
7111
  var _a3;
7098
7112
  return /* @__PURE__ */ jsxRuntime.jsxs("tr", { style: { background: li % 2 === 0 ? "white" : "#fafafa" }, children: [
7099
7113
  /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "6px 12px", fontSize: "13px" }, children: line.account }),
@@ -17155,6 +17169,7 @@ var STATUS_COLORS3 = {
17155
17169
  // filled from theme ACCENT at render time
17156
17170
  review: "#f59e0b",
17157
17171
  pending: "#9ca3af",
17172
+ blocked: "#b45309",
17158
17173
  failed: "#dc2626"
17159
17174
  };
17160
17175
  var STATUS_LABELS = {
@@ -17162,6 +17177,7 @@ var STATUS_LABELS = {
17162
17177
  active: "In progress",
17163
17178
  review: "In review",
17164
17179
  pending: "Pending",
17180
+ blocked: "Blocked",
17165
17181
  failed: "Failed"
17166
17182
  };
17167
17183
  var HUMAN_PALETTE = ["#2563eb", "#0f766e", "#7c3aed", "#b45309", "#be185d", "#4d7c0f"];