@nivaro/react 0.3.40 → 0.3.42
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/components/LayoutForm.js +100 -98
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +645 -16
- package/dist/index.js +814 -775
- package/dist/shared/components/ActivityEntry.js +154 -0
- package/dist/shared/components/AudienceConfirmPanel.js +98 -0
- package/dist/shared/components/BackgroundRunOffer.js +43 -31
- package/dist/shared/components/BroadcastView.js +225 -204
- package/dist/shared/components/CollectionBrowserView.js +3924 -3584
- package/dist/shared/components/ConfigHistory.js +153 -0
- package/dist/shared/components/ConfigReadBack.js +65 -0
- package/dist/shared/components/DataTable.js +379 -346
- package/dist/shared/components/ForceReloadBanner.js +47 -40
- package/dist/shared/components/IdleReloadWatcher.js +69 -0
- package/dist/shared/components/ItemEditForm.js +4041 -3853
- package/dist/shared/components/MyWorkView.js +278 -213
- package/dist/shared/components/NotificationBell.js +130 -121
- package/dist/shared/components/PickerExcludedRows.js +3 -3
- package/dist/shared/components/ProfileView.js +776 -1003
- package/dist/shared/components/RecentRecordsRail.js +34 -16
- package/dist/shared/components/RecordReadView.js +500 -477
- package/dist/shared/components/Skeletons.js +199 -0
- package/dist/shared/components/SlowNotice.js +63 -0
- package/dist/shared/components/Term.js +23 -0
- package/dist/shared/components/WidgetSlot.js +350 -353
- package/dist/shared/components/access/PermissionSummary.js +106 -0
- package/dist/shared/components/bulk/BulkActionButtons.js +76 -73
- package/dist/shared/components/chat/ChatPanel.js +902 -886
- package/dist/shared/components/chat/MemberPaging.js +70 -0
- package/dist/shared/components/chat/RoomParts.js +147 -117
- package/dist/shared/components/chat/ScreenClip.js +73 -69
- package/dist/shared/components/chat/chat-core.js +449 -396
- package/dist/shared/components/chat/huddle/huddle-store.js +48 -43
- package/dist/shared/components/help-videos/api.js +2 -5
- package/dist/shared/components/help-videos/viewer/HelpVideoMatchChip.js +79 -0
- package/dist/shared/components/help-videos/viewer/matchChip.js +50 -0
- package/dist/shared/components/imports/CollectionImportPanel.js +139 -133
- package/dist/shared/components/imports/RunDetailSheet.js +222 -227
- package/dist/shared/components/integrations/console/ErrorExplanation.js +121 -0
- package/dist/shared/components/integrations/console/PartnerDetail.js +175 -174
- package/dist/shared/components/integrations/console/SubmissionRow.js +36 -34
- package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +50 -48
- package/dist/shared/components/item-edit/FieldComments.js +212 -0
- package/dist/shared/components/item-edit/FieldRow.js +340 -336
- package/dist/shared/components/item-edit/RecordGrantTools.js +28 -28
- package/dist/shared/components/item-edit/RecordHeaderActions.js +23 -22
- package/dist/shared/components/item-edit/RelationCombobox.js +231 -222
- package/dist/shared/components/item-edit/RuleHiddenNotes.js +55 -0
- package/dist/shared/components/item-edit/field-comments-context.js +6 -0
- package/dist/shared/components/item-edit/field-sources.js +33 -0
- package/dist/shared/components/item-edit/rule-hidden.js +30 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +113 -96
- package/dist/shared/components/layout-editor/editors/cascade-filters.js +170 -145
- package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +22 -18
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +177 -159
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +35 -34
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +124 -111
- package/dist/shared/components/layout-editor/inspector/kit.js +292 -277
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/settings-registry.js +1 -1
- package/dist/shared/components/list/CopyListLinkButton.js +41 -0
- package/dist/shared/components/list/InlineEdit.js +363 -0
- package/dist/shared/components/notifications/NotificationCenterView.js +213 -181
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -82
- package/dist/shared/components/notifications/NotificationRulesEditor.js +515 -0
- package/dist/shared/components/notifications/TestMyRules.js +137 -0
- package/dist/shared/components/notifications/changes-lines.js +24 -0
- package/dist/shared/components/notifications/why-lines.js +64 -0
- package/dist/shared/components/panels/CommentPanel.js +316 -281
- package/dist/shared/components/panels/LegalHoldBanner.js +38 -0
- package/dist/shared/components/panels/PipelinePanel.js +201 -196
- package/dist/shared/components/panels/RevisionsPanel.js +496 -479
- package/dist/shared/components/pipeline/PipelineEditorView.js +1587 -1560
- package/dist/shared/components/pipeline/PipelineStateOwners.js +116 -103
- package/dist/shared/components/profile/PersonDidPanel.js +188 -0
- package/dist/shared/components/profile/PersonProfile.js +57 -52
- package/dist/shared/components/queue/QueueWorklist.js +1526 -1365
- package/dist/shared/hooks/useSlowReason.js +39 -0
- package/dist/shared/lib/activity-sentence.js +670 -0
- package/dist/shared/lib/config-sentences.js +418 -0
- package/dist/shared/lib/core-glossary.js +229 -0
- package/dist/shared/lib/error-hints.js +159 -0
- package/dist/shared/lib/error-message.js +105 -0
- package/dist/shared/lib/error-toast.js +22 -0
- package/dist/shared/lib/field-comments.js +25 -0
- package/dist/shared/lib/filter-sentence.js +261 -0
- package/dist/shared/lib/glossary.js +55 -48
- package/dist/shared/lib/idle-reload.js +138 -0
- package/dist/shared/lib/layout-resolve.js +42 -29
- package/dist/shared/lib/list-inline-edit.js +190 -0
- package/dist/shared/lib/list-link.js +147 -0
- package/dist/shared/lib/prefetch.js +259 -106
- package/dist/shared/lib/record-ref.js +72 -0
- package/dist/shared/lib/reload-holds.js +25 -0
- package/dist/shared/lib/safe-error.js +52 -24
- package/dist/shared/lib/skeleton-shapes.js +72 -0
- package/dist/shared/lib/slow-reason.js +63 -0
- package/package.json +1 -1
|
@@ -1,110 +1,114 @@
|
|
|
1
1
|
import { jsxs as b, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { Clapperboard as
|
|
3
|
-
import { useState as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { Clapperboard as w, Square as k } from "lucide-react";
|
|
3
|
+
import { useState as M, useRef as m, useEffect as v } from "react";
|
|
4
|
+
import { registerReloadHold as N } from "../../lib/reload-holds.js";
|
|
5
|
+
import { cn as S } from "../../lib/utils.js";
|
|
6
|
+
import { useScreenCapture as $ } from "../help-videos/recorder/useScreenCapture.js";
|
|
7
|
+
const g = 6e4, x = "chat-clip", _ = "chat-clip-poster";
|
|
8
|
+
function j(r, n) {
|
|
8
9
|
var l, c;
|
|
9
|
-
const
|
|
10
|
-
if (!
|
|
11
|
-
const
|
|
10
|
+
const e = Array.isArray(r) ? r.map(String) : [];
|
|
11
|
+
if (!e.includes(x) || n && !n.startsWith("video/")) return null;
|
|
12
|
+
const t = ((l = e.find((i) => i.startsWith("poster:"))) == null ? void 0 : l.slice(7)) ?? null, o = Number((c = e.find((i) => i.startsWith("duration:"))) == null ? void 0 : c.slice(9));
|
|
12
13
|
return {
|
|
13
|
-
poster:
|
|
14
|
+
poster: t && /^[0-9a-f-]{36}$/i.test(t) ? t : null,
|
|
14
15
|
durationMs: o > 0 ? o : null
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
return r &&
|
|
18
|
+
function B(r, n) {
|
|
19
|
+
const e = [x, `duration:${Math.max(0, Math.round(n))}`];
|
|
20
|
+
return r && e.push(`poster:${r}`), e;
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
const n = (
|
|
22
|
+
function C(r = /* @__PURE__ */ new Date()) {
|
|
23
|
+
const n = (e) => String(e).padStart(2, "0");
|
|
23
24
|
return `Screen clip ${r.getFullYear()}-${n(r.getMonth() + 1)}-${n(r.getDate())} ${n(r.getHours())}.${n(r.getMinutes())}.${n(r.getSeconds())}.webm`;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function R(r) {
|
|
26
27
|
if (!r) return "";
|
|
27
28
|
const n = Math.max(1, Math.round(r / 1e3));
|
|
28
29
|
return n < 60 ? `${n} s` : `${Math.floor(n / 60)}:${String(n % 60).padStart(2, "0")}`;
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function L() {
|
|
31
32
|
var r;
|
|
32
33
|
return typeof navigator < "u" && !!((r = navigator.mediaDevices) != null && r.getDisplayMedia) && typeof MediaRecorder < "u";
|
|
33
34
|
}
|
|
34
|
-
async function
|
|
35
|
+
async function T(r, n = 640) {
|
|
35
36
|
if (typeof document > "u") return null;
|
|
36
|
-
const
|
|
37
|
+
const e = URL.createObjectURL(r);
|
|
37
38
|
try {
|
|
38
|
-
const
|
|
39
|
-
|
|
39
|
+
const t = document.createElement("video");
|
|
40
|
+
t.muted = !0, t.playsInline = !0, t.preload = "auto", t.src = e, await new Promise((d, h) => {
|
|
40
41
|
const f = setTimeout(() => h(new Error("timeout")), 4e3);
|
|
41
|
-
|
|
42
|
+
t.onloadeddata = () => {
|
|
42
43
|
clearTimeout(f), d();
|
|
43
|
-
},
|
|
44
|
+
}, t.onerror = () => {
|
|
44
45
|
clearTimeout(f), h(new Error("decode"));
|
|
45
46
|
};
|
|
46
|
-
}),
|
|
47
|
-
|
|
47
|
+
}), t.currentTime === 0 && Number.isFinite(t.duration) && (t.currentTime = Math.min(0.2, t.duration / 2), await new Promise((d) => {
|
|
48
|
+
t.onseeked = () => d(), setTimeout(d, 800);
|
|
48
49
|
}));
|
|
49
|
-
const o =
|
|
50
|
+
const o = t.videoWidth || 640, l = t.videoHeight || 360, c = Math.min(1, n / o), i = document.createElement("canvas");
|
|
50
51
|
i.width = Math.round(o * c), i.height = Math.round(l * c);
|
|
51
52
|
const a = i.getContext("2d");
|
|
52
|
-
return a ? (a.drawImage(
|
|
53
|
+
return a ? (a.drawImage(t, 0, 0, i.width, i.height), await new Promise((d) => i.toBlob(d, "image/png"))) : null;
|
|
53
54
|
} catch {
|
|
54
55
|
return null;
|
|
55
56
|
} finally {
|
|
56
|
-
URL.revokeObjectURL(
|
|
57
|
+
URL.revokeObjectURL(e);
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
+
function D({
|
|
60
61
|
onClip: r,
|
|
61
62
|
disabled: n
|
|
62
63
|
}) {
|
|
63
|
-
const [
|
|
64
|
-
}), a =
|
|
64
|
+
const [e, t] = M("idle"), o = m([]), l = m("video/webm"), c = m(!1), i = m(() => {
|
|
65
|
+
}), a = $({
|
|
65
66
|
onLimit: () => i.current(),
|
|
66
67
|
onSharingEnded: () => i.current()
|
|
67
68
|
}), d = async () => {
|
|
68
69
|
if (c.current || !a.isLive()) return;
|
|
69
|
-
c.current = !0,
|
|
70
|
+
c.current = !0, t("finishing");
|
|
70
71
|
const u = Math.min(g, a.meta().duration_ms);
|
|
71
72
|
await a.halt();
|
|
72
73
|
const p = new Blob(o.current, { type: l.current });
|
|
73
74
|
o.current = [];
|
|
74
|
-
const
|
|
75
|
-
p.size && r({ file: new File([p],
|
|
75
|
+
const y = p.size ? await T(p) : null;
|
|
76
|
+
p.size && r({ file: new File([p], C(), { type: l.current }), poster: y, durationMs: u }), t("idle"), c.current = !1;
|
|
76
77
|
};
|
|
77
|
-
i.current = () => void d()
|
|
78
|
+
i.current = () => void d(), v(() => {
|
|
79
|
+
if (e !== "idle")
|
|
80
|
+
return N("A screen clip");
|
|
81
|
+
}, [e]);
|
|
78
82
|
const h = a.elapsed;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}, [h,
|
|
83
|
+
v(() => {
|
|
84
|
+
e === "recording" && h >= g && i.current();
|
|
85
|
+
}, [h, e]);
|
|
82
86
|
const f = async () => {
|
|
83
|
-
if (
|
|
84
|
-
|
|
87
|
+
if (e === "idle") {
|
|
88
|
+
t("asking"), a.reset(), o.current = [];
|
|
85
89
|
try {
|
|
86
90
|
l.current = await a.acquire({ source: "screen", useMic: !0, micId: "default" });
|
|
87
91
|
} catch {
|
|
88
|
-
a.release(),
|
|
92
|
+
a.release(), t("idle");
|
|
89
93
|
return;
|
|
90
94
|
}
|
|
91
95
|
a.arm(l.current, (u) => {
|
|
92
96
|
u.size && o.current.push(u);
|
|
93
|
-
}), a.begin(!1),
|
|
97
|
+
}), a.begin(!1), t("recording");
|
|
94
98
|
}
|
|
95
99
|
};
|
|
96
|
-
if (!
|
|
97
|
-
if (
|
|
100
|
+
if (!L()) return null;
|
|
101
|
+
if (e === "recording" || e === "finishing") {
|
|
98
102
|
const u = Math.max(0, g - a.elapsed), p = Math.min(100, a.elapsed / g * 100);
|
|
99
103
|
return /* @__PURE__ */ b(
|
|
100
104
|
"button",
|
|
101
105
|
{
|
|
102
106
|
type: "button",
|
|
103
107
|
onClick: () => void d(),
|
|
104
|
-
disabled:
|
|
108
|
+
disabled: e === "finishing",
|
|
105
109
|
className: "relative flex h-7 shrink-0 items-center gap-1.5 overflow-hidden rounded-md border border-red-300 bg-red-50 px-2 text-[11px] font-medium text-red-700 transition-colors hover:bg-red-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan disabled:opacity-60 dark:border-red-500/40 dark:bg-red-500/10 dark:text-red-200 dark:hover:bg-red-500/20",
|
|
106
|
-
"aria-label":
|
|
107
|
-
"data-chat-clip":
|
|
110
|
+
"aria-label": e === "finishing" ? "Finishing the clip" : "Stop recording the clip",
|
|
111
|
+
"data-chat-clip": e,
|
|
108
112
|
children: [
|
|
109
113
|
/* @__PURE__ */ s(
|
|
110
114
|
"span",
|
|
@@ -118,8 +122,8 @@ function j({
|
|
|
118
122
|
/* @__PURE__ */ s("span", { className: "absolute inline-flex h-full w-full rounded-full bg-red-500 opacity-60 motion-safe:animate-ping" }),
|
|
119
123
|
/* @__PURE__ */ s("span", { className: "relative inline-flex h-2 w-2 rounded-full bg-red-500" })
|
|
120
124
|
] }),
|
|
121
|
-
/* @__PURE__ */ s("span", { className: "relative tabular-nums", children:
|
|
122
|
-
/* @__PURE__ */ s(
|
|
125
|
+
/* @__PURE__ */ s("span", { className: "relative tabular-nums", children: e === "finishing" ? "Saving…" : `${Math.ceil(u / 1e3)} s left` }),
|
|
126
|
+
/* @__PURE__ */ s(k, { className: "relative h-3 w-3 fill-current", strokeWidth: 2 })
|
|
123
127
|
]
|
|
124
128
|
}
|
|
125
129
|
);
|
|
@@ -129,23 +133,23 @@ function j({
|
|
|
129
133
|
{
|
|
130
134
|
type: "button",
|
|
131
135
|
onClick: () => void f(),
|
|
132
|
-
disabled: n ||
|
|
133
|
-
className:
|
|
136
|
+
disabled: n || e === "asking",
|
|
137
|
+
className: S(
|
|
134
138
|
"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-slate-500 transition-colors hover:bg-slate-200/70 hover:text-slate-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan disabled:opacity-40 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-slate-100",
|
|
135
|
-
|
|
139
|
+
e === "asking" && "text-nvr-cyan"
|
|
136
140
|
),
|
|
137
141
|
"aria-label": "Record a screen clip (up to 60 seconds)",
|
|
138
142
|
"data-tip": "Record a screen clip — up to 60 s, with your microphone",
|
|
139
143
|
"data-chat-clip": "idle",
|
|
140
|
-
children: /* @__PURE__ */ s(
|
|
144
|
+
children: /* @__PURE__ */ s(w, { className: "h-4 w-4", strokeWidth: 2 })
|
|
141
145
|
}
|
|
142
146
|
);
|
|
143
147
|
}
|
|
144
|
-
function
|
|
148
|
+
function U({
|
|
145
149
|
url: r,
|
|
146
150
|
poster: n,
|
|
147
|
-
name:
|
|
148
|
-
durationMs:
|
|
151
|
+
name: e,
|
|
152
|
+
durationMs: t,
|
|
149
153
|
action: o
|
|
150
154
|
}) {
|
|
151
155
|
return /* @__PURE__ */ b("span", { className: "relative inline-block max-w-[320px]", "data-chat-clip-player": !0, children: [
|
|
@@ -158,27 +162,27 @@ function B({
|
|
|
158
162
|
playsInline: !0,
|
|
159
163
|
preload: n ? "none" : "metadata",
|
|
160
164
|
className: "block max-h-[220px] w-full rounded-lg border border-slate-200 bg-[#0f172a] dark:border-border",
|
|
161
|
-
"aria-label":
|
|
165
|
+
"aria-label": e
|
|
162
166
|
}
|
|
163
167
|
),
|
|
164
168
|
/* @__PURE__ */ b("span", { className: "pointer-events-none absolute left-2 top-2 inline-flex items-center gap-1 rounded bg-black/55 px-1.5 py-0.5 text-[10.5px] font-medium text-white", children: [
|
|
165
|
-
/* @__PURE__ */ s(
|
|
169
|
+
/* @__PURE__ */ s(w, { className: "h-3 w-3", strokeWidth: 2 }),
|
|
166
170
|
"Clip",
|
|
167
|
-
|
|
171
|
+
t ? ` · ${R(t)}` : ""
|
|
168
172
|
] }),
|
|
169
173
|
o && /* @__PURE__ */ s("span", { className: "absolute right-1 top-1", children: o })
|
|
170
174
|
] });
|
|
171
175
|
}
|
|
172
176
|
export {
|
|
173
177
|
g as CLIP_MAX_MS,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
_ as CLIP_POSTER_TAG,
|
|
179
|
+
x as CLIP_TAG,
|
|
180
|
+
U as ClipPlayer,
|
|
181
|
+
D as ScreenClipButton,
|
|
182
|
+
L as canRecordClip,
|
|
183
|
+
C as clipFileName,
|
|
184
|
+
j as clipInfo,
|
|
185
|
+
B as clipTags,
|
|
186
|
+
R as formatClipLength,
|
|
187
|
+
T as posterFromBlob
|
|
184
188
|
};
|