@arbidocs/react 0.3.176 → 0.3.179
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/index.cjs +18 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -15
- package/dist/index.d.ts +20 -15
- package/dist/index.js +18 -39
- package/dist/index.js.map +1 -1
- package/dist/viewers/index.cjs +5 -2
- package/dist/viewers/index.cjs.map +1 -1
- package/dist/viewers/index.d.cts +7 -0
- package/dist/viewers/index.d.ts +7 -0
- package/dist/viewers/index.js +5 -2
- package/dist/viewers/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -2452,14 +2452,14 @@ var TAG_TYPE_ICONS = {
|
|
|
2452
2452
|
checkbox: lucideReact.SquareCheckBig,
|
|
2453
2453
|
select: lucideReact.List,
|
|
2454
2454
|
number: lucideReact.Hash,
|
|
2455
|
-
text: lucideReact.
|
|
2455
|
+
text: lucideReact.NotebookPen,
|
|
2456
2456
|
folder: lucideReact.Folder,
|
|
2457
2457
|
search: lucideReact.Search,
|
|
2458
2458
|
date: lucideReact.Calendar,
|
|
2459
2459
|
assistant: lucideReact.Bot
|
|
2460
2460
|
};
|
|
2461
2461
|
function getTagTypeIcon(type) {
|
|
2462
|
-
return TAG_TYPE_ICONS[type ?? "text"] || lucideReact.
|
|
2462
|
+
return TAG_TYPE_ICONS[type ?? "text"] || lucideReact.NotebookPen;
|
|
2463
2463
|
}
|
|
2464
2464
|
function getTagTypeLabel(type) {
|
|
2465
2465
|
const t = type ?? "text";
|
|
@@ -2575,7 +2575,7 @@ function DocumentReview({
|
|
|
2575
2575
|
const list = [];
|
|
2576
2576
|
const chunkTag = /* @__PURE__ */ new Map();
|
|
2577
2577
|
for (const dt of doc?.doctags ?? []) {
|
|
2578
|
-
const chunkIds = dt.citations
|
|
2578
|
+
const chunkIds = (dt.citations ?? []).flatMap((d) => (d.chunks ?? []).map((c) => c.chunk_id));
|
|
2579
2579
|
if (chunkIds.length === 0) continue;
|
|
2580
2580
|
list.push({
|
|
2581
2581
|
key: dt.tag_ext_id,
|
|
@@ -3265,14 +3265,14 @@ var CitationPopover = ({
|
|
|
3265
3265
|
"button",
|
|
3266
3266
|
{
|
|
3267
3267
|
onClick: onDismissCitation,
|
|
3268
|
-
className: "shrink-0 text-muted-foreground hover:text-foreground
|
|
3268
|
+
className: "-m-1.5 flex shrink-0 items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
|
|
3269
3269
|
"aria-label": "Close",
|
|
3270
3270
|
"data-testid": `citation-popover-close-${citationNum}`,
|
|
3271
3271
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3272
3272
|
"svg",
|
|
3273
3273
|
{
|
|
3274
|
-
width: "
|
|
3275
|
-
height: "
|
|
3274
|
+
width: "14",
|
|
3275
|
+
height: "14",
|
|
3276
3276
|
viewBox: "0 0 12 12",
|
|
3277
3277
|
fill: "none",
|
|
3278
3278
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4287,51 +4287,32 @@ function DocumentEntity({
|
|
|
4287
4287
|
labelClassName,
|
|
4288
4288
|
onClick,
|
|
4289
4289
|
onIconClick,
|
|
4290
|
-
showHoverEye,
|
|
4291
4290
|
viewing,
|
|
4292
4291
|
iconBadge,
|
|
4293
4292
|
actions,
|
|
4294
4293
|
tooltipContent,
|
|
4295
4294
|
className,
|
|
4296
|
-
fullWidth
|
|
4295
|
+
fullWidth,
|
|
4296
|
+
noClamp
|
|
4297
4297
|
}) {
|
|
4298
4298
|
const title = getDocumentTitle(doc);
|
|
4299
4299
|
const ext = doc.file_name?.split(".").pop()?.toLowerCase();
|
|
4300
4300
|
const iconSize = size === "base" ? 16 : 14;
|
|
4301
4301
|
const eyeSizeClass = size === "base" ? "h-4 w-4" : "h-3.5 w-3.5";
|
|
4302
4302
|
const baseIcon = icon ?? getDocIcon(doc.file_name, iconSize);
|
|
4303
|
-
const
|
|
4304
|
-
|
|
4305
|
-
showEye ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4306
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4307
|
-
"span",
|
|
4308
|
-
{
|
|
4309
|
-
className: chunkFIPS3VPH_cjs.cn(
|
|
4310
|
-
"transition-opacity",
|
|
4311
|
-
viewing ? "opacity-0" : "group-hover/pill:opacity-0 group-has-[[data-state=open]]/pill:opacity-0"
|
|
4312
|
-
),
|
|
4313
|
-
children: baseIcon
|
|
4314
|
-
}
|
|
4315
|
-
),
|
|
4316
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4317
|
-
lucideReact.Eye,
|
|
4318
|
-
{
|
|
4319
|
-
className: chunkFIPS3VPH_cjs.cn(
|
|
4320
|
-
"absolute inset-0 m-auto transition-opacity",
|
|
4321
|
-
eyeSizeClass,
|
|
4322
|
-
viewing ? "text-primary-foreground opacity-100" : "text-primary opacity-0 group-hover/pill:opacity-100 group-has-[[data-state=open]]/pill:opacity-100"
|
|
4323
|
-
)
|
|
4324
|
-
}
|
|
4325
|
-
)
|
|
4326
|
-
] }) : baseIcon,
|
|
4303
|
+
const displayIcon = viewing || iconBadge ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex flex-shrink-0 items-center justify-center", children: [
|
|
4304
|
+
viewing ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: chunkFIPS3VPH_cjs.cn("text-primary-foreground", eyeSizeClass) }) : baseIcon,
|
|
4327
4305
|
iconBadge
|
|
4328
4306
|
] }) : baseIcon;
|
|
4329
|
-
const defaultTooltip = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 text-xs max-w-[
|
|
4330
|
-
doc.folder &&
|
|
4307
|
+
const defaultTooltip = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 text-xs max-w-[440px]", children: [
|
|
4308
|
+
doc.folder && // `flex-wrap` so a deep folder path wraps WITHIN the balloon instead of
|
|
4309
|
+
// spilling out of it (each path segment is atomic and wraps as a unit;
|
|
4310
|
+
// `min-w-0` + `break-all` lets a single over-long segment break too).
|
|
4311
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-wrap items-center gap-0.5 text-muted-foreground", children: [
|
|
4331
4312
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderOpen, { className: "h-3 w-3 text-yellow-600 shrink-0" }),
|
|
4332
|
-
doc.folder.split("/").map((part, i, arr) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-0.5
|
|
4313
|
+
doc.folder.split("/").map((part, i, arr) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center gap-0.5", children: [
|
|
4333
4314
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/50 mx-0.5", children: "/" }),
|
|
4334
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: i < arr.length - 1 ? "text-muted-foreground/70" : ""
|
|
4315
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `break-all ${i < arr.length - 1 ? "text-muted-foreground/70" : ""}`, children: part })
|
|
4335
4316
|
] }, i))
|
|
4336
4317
|
] }),
|
|
4337
4318
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium break-words", children: [
|
|
@@ -4344,7 +4325,7 @@ function DocumentEntity({
|
|
|
4344
4325
|
{
|
|
4345
4326
|
icon: displayIcon,
|
|
4346
4327
|
size,
|
|
4347
|
-
label: fullWidth ? title : clampLabel(title),
|
|
4328
|
+
label: fullWidth || noClamp ? title : clampLabel(title),
|
|
4348
4329
|
labelMaxWidth: labelMaxWidth ?? "max-w-[140px]",
|
|
4349
4330
|
labelClassName,
|
|
4350
4331
|
fullWidth,
|
|
@@ -6631,7 +6612,6 @@ function DocumentTable({
|
|
|
6631
6612
|
doc,
|
|
6632
6613
|
size: "base",
|
|
6633
6614
|
fullWidth: true,
|
|
6634
|
-
showHoverEye: true,
|
|
6635
6615
|
viewing: viewingDocId === doc.external_id,
|
|
6636
6616
|
onClick: (e) => {
|
|
6637
6617
|
e.stopPropagation();
|
|
@@ -6932,7 +6912,6 @@ function DocumentCard({
|
|
|
6932
6912
|
{
|
|
6933
6913
|
doc,
|
|
6934
6914
|
fullWidth: true,
|
|
6935
|
-
showHoverEye: true,
|
|
6936
6915
|
viewing,
|
|
6937
6916
|
tooltipContent,
|
|
6938
6917
|
labelClassName: "font-semibold",
|