@nivaro/react 0.3.135 → 0.3.137
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/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/shared/components/ErrorNotice.js +67 -61
- package/dist/shared/components/chat/ChatPanel.js +86 -86
- package/dist/shared/components/item-edit/InlineTableField.js +2528 -2450
- package/dist/shared/components/panels/ExternalRequestsChip.js +126 -111
- package/dist/shared/components/panels/PipelineEventNotice.js +122 -0
- package/dist/shared/components/panels/PipelinePanel.js +1367 -1382
- package/dist/shared/components/panels/integrations-opener.js +43 -0
- package/dist/shared/components/panels/pipeline-notices.js +137 -0
- package/dist/shared/lib/send-status.js +39 -36
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import { noteReplayIdle as Me, createReplayIdleState as Ne, REPLAY_IDLE_RESTART_
|
|
|
10
10
|
import { noteReplayEvent as Ue, createReplayCheckoutState as We } from "../shared/lib/replay-checkout.js";
|
|
11
11
|
import { instrumentConsole as He, instrumentRequests as Ke, redactSecrets as $e } from "../shared/lib/replay-context.js";
|
|
12
12
|
import { instrumentSocket as Be } from "../shared/lib/replay-socket.js";
|
|
13
|
-
const ze = "nivaro-react@0.3.
|
|
13
|
+
const ze = "nivaro-react@0.3.137", V = 1e4, Ye = 150, xe = 3e3, je = 600, Ge = (o) => `nvr_replay_resume${o ? `:${o}` : ""}`, X = () => typeof navigator > "u" || navigator.onLine !== !1;
|
|
14
14
|
function Je(o) {
|
|
15
15
|
return typeof o.url != "string" || typeof fetch != "function" ? null : (f, u) => {
|
|
16
16
|
const l = typeof o.getToken == "function" ? o.getToken() : void 0, d = { "Content-Type": "application/json" };
|
package/dist/index.d.ts
CHANGED
|
@@ -3803,10 +3803,15 @@ export declare interface ErrorDescription {
|
|
|
3803
3803
|
* in. Closed by default — the person reads what happened and what to do; the
|
|
3804
3804
|
* reference is there for whoever helps them.
|
|
3805
3805
|
*/
|
|
3806
|
-
export declare function ErrorDetails({ description: d, action, className }: {
|
|
3806
|
+
export declare function ErrorDetails({ description: d, action, rows, className }: {
|
|
3807
3807
|
description: ErrorDescription;
|
|
3808
3808
|
/** What the person was doing ("Save record"), for the copy. */
|
|
3809
3809
|
action?: string;
|
|
3810
|
+
/** Extra facts for support (the stored answer, record ids), shown after the code. */
|
|
3811
|
+
rows?: Array<{
|
|
3812
|
+
label: string;
|
|
3813
|
+
value: string;
|
|
3814
|
+
}>;
|
|
3810
3815
|
className?: string;
|
|
3811
3816
|
}): JSX.Element | null;
|
|
3812
3817
|
|
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
import { jsxs as n, jsx as
|
|
2
|
-
import { ChevronRight as
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronRight as w, Copy as I, LifeBuoy as y, WifiOff as E, Ban as A, AlertTriangle as j, ArrowLeft as T, LogIn as q, RotateCw as v } from "lucide-react";
|
|
3
3
|
import { useState as B, useMemo as D } from "react";
|
|
4
4
|
import { openSupportForError as R, runErrorAction as O } from "../lib/error-actions.js";
|
|
5
5
|
import { copyErrorDetails as S, describeLoadError as F, describeError as H } from "../lib/error-message.js";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as i } from "../lib/utils.js";
|
|
7
7
|
const M = {
|
|
8
8
|
retry: v,
|
|
9
9
|
reload: v,
|
|
10
10
|
"sign-in": q,
|
|
11
11
|
"go-back": T,
|
|
12
|
-
contact:
|
|
12
|
+
contact: y
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function N({
|
|
15
15
|
description: e,
|
|
16
16
|
action: s,
|
|
17
|
-
|
|
17
|
+
rows: a,
|
|
18
|
+
className: u
|
|
18
19
|
}) {
|
|
19
|
-
const [
|
|
20
|
-
return !e.requestId && !e.code && !e.status && !e.technical ? null : /* @__PURE__ */ n("details", { "data-error-details": "", className:
|
|
20
|
+
const [p, c] = B(null);
|
|
21
|
+
return !e.requestId && !e.code && !e.status && !e.technical && !(a != null && a.length) ? null : /* @__PURE__ */ n("details", { "data-error-details": "", className: i("group text-[11.5px]", u), children: [
|
|
21
22
|
/* @__PURE__ */ n("summary", { className: "inline-flex cursor-pointer list-none items-center gap-1 rounded text-slate-500 hover:text-slate-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:text-muted-foreground dark:hover:text-foreground [&::-webkit-details-marker]:hidden", children: [
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ r(w, { className: "h-3 w-3 transition-transform group-open:rotate-90", "aria-hidden": !0 }),
|
|
23
24
|
"Details for support"
|
|
24
25
|
] }),
|
|
25
26
|
/* @__PURE__ */ n("div", { className: "mt-1.5 space-y-1 rounded-md border border-slate-200 bg-slate-50 px-2.5 py-2 text-left text-slate-600 dark:border-border dark:bg-muted/40 dark:text-muted-foreground", children: [
|
|
26
27
|
e.requestId && /* @__PURE__ */ n("p", { children: [
|
|
27
28
|
"Reference: ",
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ r("span", { className: "select-all font-mono", children: e.requestId })
|
|
29
30
|
] }),
|
|
30
31
|
(e.code || e.status) && /* @__PURE__ */ n("p", { children: [
|
|
31
32
|
"Code:",
|
|
32
33
|
" ",
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ r("span", { className: "font-mono", children: [e.code, e.status ? `HTTP ${e.status}` : null].filter(Boolean).join(" · ") })
|
|
34
35
|
] }),
|
|
36
|
+
a == null ? void 0 : a.map((o) => /* @__PURE__ */ n("p", { "data-error-detail-row": o.label, children: [
|
|
37
|
+
o.label,
|
|
38
|
+
": ",
|
|
39
|
+
/* @__PURE__ */ r("span", { className: "select-all break-words font-mono", children: o.value })
|
|
40
|
+
] }, o.label)),
|
|
35
41
|
/* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 pt-0.5", children: [
|
|
36
42
|
/* @__PURE__ */ n(
|
|
37
43
|
"button",
|
|
@@ -39,12 +45,12 @@ function y({
|
|
|
39
45
|
type: "button",
|
|
40
46
|
"data-error-copy": "",
|
|
41
47
|
onClick: () => {
|
|
42
|
-
S(e, { action: s }).then(
|
|
48
|
+
S(e, { action: s }).then(c);
|
|
43
49
|
},
|
|
44
50
|
className: "inline-flex items-center gap-1 font-medium text-sky-700 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:text-nvr-cyan",
|
|
45
51
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
52
|
+
/* @__PURE__ */ r(I, { className: "h-3 w-3", "aria-hidden": !0 }),
|
|
53
|
+
p === !0 ? "Copied" : p === !1 ? "Could not copy" : "Copy details"
|
|
48
54
|
]
|
|
49
55
|
}
|
|
50
56
|
),
|
|
@@ -56,7 +62,7 @@ function y({
|
|
|
56
62
|
onClick: () => R(e, { action: s }),
|
|
57
63
|
className: "inline-flex items-center gap-1 font-medium text-sky-700 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:text-nvr-cyan",
|
|
58
64
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ r(y, { className: "h-3 w-3", "aria-hidden": !0 }),
|
|
60
66
|
"Ask for help"
|
|
61
67
|
]
|
|
62
68
|
}
|
|
@@ -68,102 +74,102 @@ function y({
|
|
|
68
74
|
function J({
|
|
69
75
|
error: e,
|
|
70
76
|
description: s,
|
|
71
|
-
what:
|
|
72
|
-
fallback:
|
|
73
|
-
onRetry:
|
|
74
|
-
actionLabel:
|
|
75
|
-
action:
|
|
76
|
-
variant:
|
|
77
|
-
centered:
|
|
78
|
-
fieldLabels:
|
|
77
|
+
what: a,
|
|
78
|
+
fallback: u,
|
|
79
|
+
onRetry: p,
|
|
80
|
+
actionLabel: c,
|
|
81
|
+
action: o,
|
|
82
|
+
variant: d = "inline",
|
|
83
|
+
centered: C = !1,
|
|
84
|
+
fieldLabels: b,
|
|
79
85
|
className: x
|
|
80
86
|
}) {
|
|
81
|
-
const
|
|
82
|
-
() => s ?? (
|
|
83
|
-
[s, e,
|
|
84
|
-
),
|
|
87
|
+
const t = D(
|
|
88
|
+
() => s ?? (a ? F(e, a, { fieldLabels: b }) : H(e, u, { fieldLabels: b })),
|
|
89
|
+
[s, e, a, u, b]
|
|
90
|
+
), l = o === void 0 ? t.action : o, h = t.kind === "offline" || t.kind === "network" ? E : t.kind === "forbidden" ? A : j, g = l ? M[l.kind] : null, f = l && g && /* @__PURE__ */ n(
|
|
85
91
|
"button",
|
|
86
92
|
{
|
|
87
93
|
type: "button",
|
|
88
|
-
"data-error-action":
|
|
89
|
-
onClick: () => O(
|
|
90
|
-
className:
|
|
94
|
+
"data-error-action": l.kind,
|
|
95
|
+
onClick: () => O(l.kind, t, { retry: p, action: c }),
|
|
96
|
+
className: i(
|
|
91
97
|
"inline-flex items-center gap-1.5 font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50",
|
|
92
|
-
|
|
98
|
+
d === "banner" ? "h-6 shrink-0 rounded border border-amber-400/60 bg-white px-2 text-[12px] text-amber-900 hover:bg-amber-100 dark:border-amber-500/40 dark:bg-transparent dark:text-amber-200 dark:hover:bg-amber-500/15" : d === "page" ? "h-8 rounded-md border border-slate-300 bg-white px-3 text-[12.5px] text-slate-800 hover:bg-slate-50 dark:border-border dark:bg-card dark:text-foreground dark:hover:bg-muted" : "rounded text-[12px] text-sky-700 hover:underline dark:text-nvr-cyan"
|
|
93
99
|
),
|
|
94
100
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
101
|
+
/* @__PURE__ */ r(g, { className: "h-3 w-3", "aria-hidden": !0 }),
|
|
102
|
+
l.label
|
|
97
103
|
]
|
|
98
104
|
}
|
|
99
105
|
);
|
|
100
|
-
if (
|
|
106
|
+
if (d === "banner")
|
|
101
107
|
return /* @__PURE__ */ n(
|
|
102
108
|
"div",
|
|
103
109
|
{
|
|
104
110
|
role: "alert",
|
|
105
111
|
"data-error-notice": "banner",
|
|
106
|
-
"data-error-kind":
|
|
107
|
-
className:
|
|
112
|
+
"data-error-kind": t.kind ?? "",
|
|
113
|
+
className: i(
|
|
108
114
|
"flex shrink-0 flex-wrap items-start gap-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-[12.5px] text-amber-900 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-200",
|
|
109
115
|
x
|
|
110
116
|
),
|
|
111
117
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ r(h, { "aria-hidden": !0, className: "mt-0.5 h-3.5 w-3.5 shrink-0" }),
|
|
113
119
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
|
|
116
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ r("p", { className: "font-medium", children: t.title }),
|
|
121
|
+
t.hint && /* @__PURE__ */ r("p", { className: "text-amber-800 dark:text-amber-200/80", children: t.hint }),
|
|
122
|
+
/* @__PURE__ */ r(N, { description: t, action: c, className: "mt-1" })
|
|
117
123
|
] }),
|
|
118
|
-
|
|
124
|
+
f
|
|
119
125
|
]
|
|
120
126
|
}
|
|
121
127
|
);
|
|
122
|
-
const
|
|
128
|
+
const m = d === "page" || C, k = /* @__PURE__ */ n(
|
|
123
129
|
"div",
|
|
124
130
|
{
|
|
125
131
|
role: "alert",
|
|
126
|
-
"data-error-notice":
|
|
132
|
+
"data-error-notice": d,
|
|
127
133
|
"data-load-error": "",
|
|
128
|
-
"data-error-kind":
|
|
129
|
-
className:
|
|
134
|
+
"data-error-kind": t.kind ?? "",
|
|
135
|
+
className: i(
|
|
130
136
|
"flex gap-2 text-[12px] text-slate-600 dark:text-muted-foreground",
|
|
131
|
-
|
|
132
|
-
|
|
137
|
+
m ? "max-w-[360px] flex-col items-center text-center" : "items-start",
|
|
138
|
+
d !== "page" && x
|
|
133
139
|
),
|
|
134
140
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ r(
|
|
136
142
|
h,
|
|
137
143
|
{
|
|
138
|
-
className:
|
|
144
|
+
className: i(
|
|
139
145
|
"shrink-0 text-amber-500",
|
|
140
|
-
|
|
141
|
-
|
|
146
|
+
m ? "h-5 w-5" : "mt-px h-3.5 w-3.5",
|
|
147
|
+
t.kind === "forbidden" && "text-slate-400"
|
|
142
148
|
),
|
|
143
149
|
"aria-hidden": !0
|
|
144
150
|
}
|
|
145
151
|
),
|
|
146
|
-
/* @__PURE__ */ n("div", { className:
|
|
147
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ n("div", { className: i("min-w-0", m && "flex flex-col items-center gap-1"), children: [
|
|
153
|
+
/* @__PURE__ */ r(
|
|
148
154
|
"p",
|
|
149
155
|
{
|
|
150
|
-
className:
|
|
156
|
+
className: i(
|
|
151
157
|
"leading-snug [text-wrap:balance]",
|
|
152
|
-
|
|
158
|
+
m ? "text-[13.5px] font-semibold text-slate-900 dark:text-foreground" : "font-medium text-slate-800 dark:text-foreground"
|
|
153
159
|
),
|
|
154
|
-
children:
|
|
160
|
+
children: t.title
|
|
155
161
|
}
|
|
156
162
|
),
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
/* @__PURE__ */
|
|
163
|
+
t.hint && /* @__PURE__ */ r("p", { className: "leading-snug [text-wrap:balance]", children: t.hint }),
|
|
164
|
+
f && /* @__PURE__ */ r("div", { className: m ? "mt-1.5" : "mt-1", children: f }),
|
|
165
|
+
/* @__PURE__ */ r(N, { description: t, action: c, className: "mt-1.5" })
|
|
160
166
|
] })
|
|
161
167
|
]
|
|
162
168
|
}
|
|
163
169
|
);
|
|
164
|
-
return
|
|
170
|
+
return d !== "page" ? k : /* @__PURE__ */ r("div", { className: i("flex min-h-[200px] flex-1 items-center justify-center p-8", x), children: k });
|
|
165
171
|
}
|
|
166
172
|
export {
|
|
167
|
-
|
|
173
|
+
N as ErrorDetails,
|
|
168
174
|
J as ErrorNotice
|
|
169
175
|
};
|