@nivaro/react 0.3.66 → 0.3.68

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 (41) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +15 -1
  4. package/dist/index.js +836 -835
  5. package/dist/shared/components/ActivityEntry.js +28 -28
  6. package/dist/shared/components/CollectionBrowserView.js +584 -585
  7. package/dist/shared/components/ConformanceView.js +34 -34
  8. package/dist/shared/components/ItemEditForm.js +1758 -1758
  9. package/dist/shared/components/RecordCompare.js +149 -129
  10. package/dist/shared/components/ReportView.js +196 -196
  11. package/dist/shared/components/SlaRulesView.js +36 -36
  12. package/dist/shared/components/bulk/BulkCompareButton.js +16 -16
  13. package/dist/shared/components/chat/ChatPanel.js +484 -487
  14. package/dist/shared/components/chat/ChatViews.js +66 -66
  15. package/dist/shared/components/chat/RoomParts.js +159 -157
  16. package/dist/shared/components/help-videos/editor/StatsTab.js +48 -47
  17. package/dist/shared/components/help-videos/editor/VersionsTab.js +17 -16
  18. package/dist/shared/components/imports/CollectionImportPanel.js +72 -72
  19. package/dist/shared/components/integrations/IntegrationObligationsView.js +199 -187
  20. package/dist/shared/components/integrations/console/EventsView.js +22 -24
  21. package/dist/shared/components/integrations/console/SubmissionRow.js +6 -13
  22. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +29 -28
  23. package/dist/shared/components/integrations/console/tone.js +22 -21
  24. package/dist/shared/components/item-edit/FieldRow.js +188 -188
  25. package/dist/shared/components/item-edit/FilePickerField.js +281 -297
  26. package/dist/shared/components/item-edit/GroupSection.js +209 -209
  27. package/dist/shared/components/item-edit/RecordInsights.js +101 -101
  28. package/dist/shared/components/item-edit/SummaryPanel.js +31 -31
  29. package/dist/shared/components/layout-editor/assist/ExplainDiff.js +12 -12
  30. package/dist/shared/components/panels/AddendumPanel.js +409 -411
  31. package/dist/shared/components/panels/BranchLanes.js +7 -7
  32. package/dist/shared/components/panels/CommentPanel.js +204 -197
  33. package/dist/shared/components/panels/PipelinePanel.js +264 -264
  34. package/dist/shared/components/panels/RecordIntegrityBanner.js +78 -78
  35. package/dist/shared/components/panels/RevisionsPanel.js +229 -229
  36. package/dist/shared/components/panels/TaskPanel.js +75 -75
  37. package/dist/shared/components/queue/QueueWorklist.js +591 -589
  38. package/dist/shared/lib/compare-value.js +73 -0
  39. package/dist/shared/lib/format-value.js +18 -17
  40. package/dist/shared/lib/utils.js +87 -80
  41. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
- import { jsxs as m, jsx as e, Fragment as w } from "react/jsx-runtime";
2
- import { useQuery as b } from "@tanstack/react-query";
3
- import { ChevronDown as S, ChevronRight as A, Eye as C, KeyRound as D, Bot as L, Upload as j, Workflow as _, Clock as I, Cog as R } from "lucide-react";
4
- import { useState as T, useMemo as u } from "react";
1
+ import { jsxs as m, jsx as e, Fragment as b } from "react/jsx-runtime";
2
+ import { useQuery as g } from "@tanstack/react-query";
3
+ import { ChevronDown as A, ChevronRight as S, Eye as C, KeyRound as D, Bot as L, Upload as j, Workflow as T, Clock as _, Cog as I } from "lucide-react";
4
+ import { useState as R, useMemo as u } from "react";
5
5
  import { useOptionalNivaroClient as q } from "../context.js";
6
6
  import { renderActivityGroupSentence as B, renderActivitySentence as U, actorName as W, groupActivity as E, activityLabelRefs as K, actorOf as Z, activityWhy as G } from "../lib/activity-sentence.js";
7
7
  import { post as J } from "../lib/commands.js";
8
- import { cn as f } from "../lib/utils.js";
9
- import { AgentBadge as M } from "./AgentBadge.js";
10
- import { UserAvatar as Q } from "./UserAvatar.js";
11
- function z(a) {
8
+ import { cn as f, formatDateTime as M } from "../lib/utils.js";
9
+ import { AgentBadge as Q } from "./AgentBadge.js";
10
+ import { UserAvatar as z } from "./UserAvatar.js";
11
+ function F(a) {
12
12
  if (!a) return null;
13
13
  const t = new Date(a);
14
14
  return Number.isNaN(t.getTime()) ? null : {
@@ -18,17 +18,17 @@ function z(a) {
18
18
  hour: "numeric",
19
19
  minute: "2-digit"
20
20
  }),
21
- full: t.toLocaleString()
21
+ full: M(t)
22
22
  };
23
23
  }
24
- const F = "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-slate-100 text-slate-500 dark:bg-muted dark:text-slate-300";
25
- function H({ entry: a, name: t }) {
26
- const i = Z(a).kind, n = i === "view_as" ? /* @__PURE__ */ e(C, { className: "h-3.5 w-3.5" }) : i === "api_key" ? /* @__PURE__ */ e(D, { className: "h-3.5 w-3.5" }) : i === "mcp" ? /* @__PURE__ */ e(L, { className: "h-3.5 w-3.5" }) : i === "import" ? /* @__PURE__ */ e(j, { className: "h-3.5 w-3.5" }) : i === "flow" ? /* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" }) : i === "cron" ? /* @__PURE__ */ e(I, { className: "h-3.5 w-3.5" }) : i === "system" ? /* @__PURE__ */ e(R, { className: "h-3.5 w-3.5" }) : null;
24
+ const H = "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-slate-100 text-slate-500 dark:bg-muted dark:text-slate-300";
25
+ function O({ entry: a, name: t }) {
26
+ const i = Z(a).kind, n = i === "view_as" ? /* @__PURE__ */ e(C, { className: "h-3.5 w-3.5" }) : i === "api_key" ? /* @__PURE__ */ e(D, { className: "h-3.5 w-3.5" }) : i === "mcp" ? /* @__PURE__ */ e(L, { className: "h-3.5 w-3.5" }) : i === "import" ? /* @__PURE__ */ e(j, { className: "h-3.5 w-3.5" }) : i === "flow" ? /* @__PURE__ */ e(T, { className: "h-3.5 w-3.5" }) : i === "cron" ? /* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" }) : i === "system" ? /* @__PURE__ */ e(I, { className: "h-3.5 w-3.5" }) : null;
27
27
  if (n)
28
- return /* @__PURE__ */ e("span", { className: F, "data-activity-actor": i, "aria-hidden": !0, children: n });
28
+ return /* @__PURE__ */ e("span", { className: H, "data-activity-actor": i, "aria-hidden": !0, children: n });
29
29
  const l = t.split(" ").map((c) => c[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
30
30
  return /* @__PURE__ */ e(
31
- Q,
31
+ z,
32
32
  {
33
33
  userId: a.user ?? a.user_id ?? null,
34
34
  className: "h-6 w-6",
@@ -36,7 +36,7 @@ function H({ entry: a, name: t }) {
36
36
  }
37
37
  );
38
38
  }
39
- function O({ entry: a }) {
39
+ function P({ entry: a }) {
40
40
  const t = G(a);
41
41
  return !t.reason && !t.note && !t.approval ? null : /* @__PURE__ */ m("span", { className: "mt-0.5 block space-y-0.5 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
42
42
  t.note && /* @__PURE__ */ m("span", { className: "block truncate italic", "data-activity-why": "note", "data-tip": t.note, children: [
@@ -63,12 +63,12 @@ function y({
63
63
  showTime: c = !0,
64
64
  className: o
65
65
  }) {
66
- const [r, v] = T(!1), s = i && i.length > 1 ? i : null, h = s ? B(s, t) : U(a, t), x = W(a, t), p = z(a.timestamp), N = !!n || !!s, k = () => {
66
+ const [r, v] = R(!1), s = i && i.length > 1 ? i : null, h = s ? B(s, t) : U(a, t), x = W(a, t), p = F(a.timestamp), N = !!n || !!s, k = () => {
67
67
  s ? v((d) => !d) : n == null || n(a);
68
68
  };
69
69
  return /* @__PURE__ */ m("div", { className: f("min-w-0", o), "data-activity-entry": a.id ?? "", children: [
70
70
  /* @__PURE__ */ m("div", { className: "flex w-full items-start gap-2.5 rounded-md px-2 py-2", children: [
71
- /* @__PURE__ */ e(H, { entry: a, name: x }),
71
+ /* @__PURE__ */ e(O, { entry: a, name: x }),
72
72
  /* @__PURE__ */ m("span", { className: "min-w-0 flex-1 text-[12.5px] leading-5 text-slate-700 dark:text-slate-200", children: [
73
73
  N ? /* @__PURE__ */ m(
74
74
  "button",
@@ -78,14 +78,14 @@ function y({
78
78
  "aria-expanded": s ? r : void 0,
79
79
  className: "inline-flex max-w-full items-start gap-1 text-left hover:underline",
80
80
  children: [
81
- s && (r ? /* @__PURE__ */ e(S, { className: "mt-[3px] h-3.5 w-3.5 shrink-0 text-slate-400" }) : /* @__PURE__ */ e(A, { className: "mt-[3px] h-3.5 w-3.5 shrink-0 text-slate-400" })),
81
+ s && (r ? /* @__PURE__ */ e(A, { className: "mt-[3px] h-3.5 w-3.5 shrink-0 text-slate-400" }) : /* @__PURE__ */ e(S, { className: "mt-[3px] h-3.5 w-3.5 shrink-0 text-slate-400" })),
82
82
  /* @__PURE__ */ e("span", { "data-activity-sentence": !0, children: h })
83
83
  ]
84
84
  }
85
85
  ) : /* @__PURE__ */ e("span", { "data-activity-sentence": !0, children: h }),
86
- !s && /* @__PURE__ */ e(O, { entry: a })
86
+ !s && /* @__PURE__ */ e(P, { entry: a })
87
87
  ] }),
88
- /* @__PURE__ */ e(M, { label: a.via_agent }),
88
+ /* @__PURE__ */ e(Q, { label: a.via_agent }),
89
89
  c && p && /* @__PURE__ */ e(
90
90
  "span",
91
91
  {
@@ -96,7 +96,7 @@ function y({
96
96
  ),
97
97
  l && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center gap-1", children: l })
98
98
  ] }),
99
- s && r && /* @__PURE__ */ e("div", { className: "ml-[18px] border-l border-slate-200 pl-3 dark:border-border", children: s.map((d, g) => /* @__PURE__ */ e(
99
+ s && r && /* @__PURE__ */ e("div", { className: "ml-[18px] border-l border-slate-200 pl-3 dark:border-border", children: s.map((d, w) => /* @__PURE__ */ e(
100
100
  y,
101
101
  {
102
102
  entry: d,
@@ -104,11 +104,11 @@ function y({
104
104
  onOpen: n,
105
105
  showTime: c
106
106
  },
107
- String(d.id ?? g)
107
+ String(d.id ?? w)
108
108
  )) })
109
109
  ] });
110
110
  }
111
- function rt({
111
+ function st({
112
112
  entries: a,
113
113
  labels: t,
114
114
  onOpen: i,
@@ -117,7 +117,7 @@ function rt({
117
117
  className: c
118
118
  }) {
119
119
  const o = u(() => E(a), [a]);
120
- return o.length === 0 ? /* @__PURE__ */ e(w, { children: l ?? null }) : /* @__PURE__ */ e("div", { className: f("divide-y divide-slate-100 dark:divide-border", c), children: o.map((r) => /* @__PURE__ */ e(
120
+ return o.length === 0 ? /* @__PURE__ */ e(b, { children: l ?? null }) : /* @__PURE__ */ e("div", { className: f("divide-y divide-slate-100 dark:divide-border", c), children: o.map((r) => /* @__PURE__ */ e(
121
121
  y,
122
122
  {
123
123
  entry: r.entries[0],
@@ -129,8 +129,8 @@ function rt({
129
129
  r.key
130
130
  )) });
131
131
  }
132
- function st(a, t = {}) {
133
- const i = q(), n = u(() => K(a), [a]), l = u(() => JSON.stringify(n), [n]), c = n.refs.length === 0 && n.users.length === 0 && n.collections.length === 0, { data: o } = b({
132
+ function lt(a, t = {}) {
133
+ const i = q(), n = u(() => K(a), [a]), l = u(() => JSON.stringify(n), [n]), c = n.refs.length === 0 && n.users.length === 0 && n.collections.length === 0, { data: o } = g({
134
134
  queryKey: ["activity-labels", l],
135
135
  queryFn: async () => (await i.request(J("/activity/labels", n))).data,
136
136
  enabled: !!i && !c && t.enabled !== !1,
@@ -149,6 +149,6 @@ function st(a, t = {}) {
149
149
  }
150
150
  export {
151
151
  y as ActivityEntry,
152
- rt as ActivityFeed,
153
- st as useActivityLabels
152
+ st as ActivityFeed,
153
+ lt as useActivityLabels
154
154
  };