@arbidocs/react 0.3.177 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk7IOCMCC5_cjs = require('./chunk-7IOCMCC5.cjs');
4
3
  var chunkFIPS3VPH_cjs = require('./chunk-FIPS3VPH.cjs');
4
+ var chunk7IOCMCC5_cjs = require('./chunk-7IOCMCC5.cjs');
5
5
  var React2 = require('react');
6
6
  var reactQuery = require('@tanstack/react-query');
7
7
  var jsxRuntime = require('react/jsx-runtime');
@@ -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.StickyNote,
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.StickyNote;
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?.passages?.map((p) => p.chunk_id) ?? [];
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,
@@ -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 showEye = showHoverEye || viewing;
4304
- const displayIcon = showEye || iconBadge ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex flex-shrink-0 items-center justify-center", children: [
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-[300px]", children: [
4330
- doc.folder && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-0.5 text-muted-foreground", children: [
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 shrink-0", children: [
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" : "", children: part })
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",
@@ -7727,14 +7706,6 @@ function hasVideoTrack(blob) {
7727
7706
  });
7728
7707
  }
7729
7708
 
7730
- Object.defineProperty(exports, "ArbiProvider", {
7731
- enumerable: true,
7732
- get: function () { return chunk7IOCMCC5_cjs.ArbiProvider; }
7733
- });
7734
- Object.defineProperty(exports, "useArbi", {
7735
- enumerable: true,
7736
- get: function () { return chunk7IOCMCC5_cjs.useArbi; }
7737
- });
7738
7709
  Object.defineProperty(exports, "AiMarkdown", {
7739
7710
  enumerable: true,
7740
7711
  get: function () { return chunkFIPS3VPH_cjs.AiMarkdown; }
@@ -8187,6 +8158,14 @@ Object.defineProperty(exports, "useAudioRecorder", {
8187
8158
  enumerable: true,
8188
8159
  get: function () { return chunkFIPS3VPH_cjs.useAudioRecorder; }
8189
8160
  });
8161
+ Object.defineProperty(exports, "ArbiProvider", {
8162
+ enumerable: true,
8163
+ get: function () { return chunk7IOCMCC5_cjs.ArbiProvider; }
8164
+ });
8165
+ Object.defineProperty(exports, "useArbi", {
8166
+ enumerable: true,
8167
+ get: function () { return chunk7IOCMCC5_cjs.useArbi; }
8168
+ });
8190
8169
  Object.defineProperty(exports, "Arbi", {
8191
8170
  enumerable: true,
8192
8171
  get: function () { return browser.Arbi; }