@arbidocs/react 0.4.38 → 0.4.40

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,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkUFXRLZJG_cjs = require('./chunk-UFXRLZJG.cjs');
4
- var chunkZ4M7JB4L_cjs = require('./chunk-Z4M7JB4L.cjs');
5
4
  var chunkXKXN2EDC_cjs = require('./chunk-XKXN2EDC.cjs');
6
5
  var chunkV4XELT62_cjs = require('./chunk-V4XELT62.cjs');
6
+ var chunkZ4M7JB4L_cjs = require('./chunk-Z4M7JB4L.cjs');
7
7
  var chunkOBNTJEEO_cjs = require('./chunk-OBNTJEEO.cjs');
8
8
  var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
9
9
  var chunkTMPDW7J5_cjs = require('./chunk-TMPDW7J5.cjs');
@@ -2973,7 +2973,8 @@ var CitationRendererComponent = ({
2973
2973
  useCitationState,
2974
2974
  onCloseCitation,
2975
2975
  onDismissCitation,
2976
- notify: notify2
2976
+ notify: notify2,
2977
+ docTitles
2977
2978
  }) => {
2978
2979
  const chunkMap = React.useMemo(() => {
2979
2980
  const map = /* @__PURE__ */ new Map();
@@ -2982,14 +2983,18 @@ var CitationRendererComponent = ({
2982
2983
  if (docChunks && Array.isArray(docChunks)) {
2983
2984
  docChunks.forEach((chunk) => {
2984
2985
  if (chunk.metadata && chunk.metadata.chunk_ext_id) {
2985
- map.set(chunk.metadata.chunk_ext_id, chunk);
2986
+ const displayTitle = chunk.metadata.doc_ext_id ? docTitles?.get(chunk.metadata.doc_ext_id) : void 0;
2987
+ map.set(
2988
+ chunk.metadata.chunk_ext_id,
2989
+ displayTitle ? { ...chunk, metadata: { ...chunk.metadata, doc_title: displayTitle } } : chunk
2990
+ );
2986
2991
  }
2987
2992
  });
2988
2993
  }
2989
2994
  });
2990
2995
  }
2991
2996
  return map;
2992
- }, [citationData]);
2997
+ }, [citationData, docTitles]);
2993
2998
  const getChunkDetails = React.useCallback(
2994
2999
  (chunkIds) => [...new Set(chunkIds)].map((id) => chunkMap.get(id)).filter((c) => c !== void 0),
2995
3000
  [chunkMap]
@@ -6114,42 +6119,6 @@ Object.defineProperty(exports, "useWorkspaces", {
6114
6119
  enumerable: true,
6115
6120
  get: function () { return chunkUFXRLZJG_cjs.useWorkspaces; }
6116
6121
  });
6117
- Object.defineProperty(exports, "DEFAULT_NOTIFY_TONE", {
6118
- enumerable: true,
6119
- get: function () { return chunkZ4M7JB4L_cjs.DEFAULT_NOTIFY_TONE; }
6120
- });
6121
- Object.defineProperty(exports, "NotificationBell", {
6122
- enumerable: true,
6123
- get: function () { return chunkZ4M7JB4L_cjs.NotificationBell; }
6124
- });
6125
- Object.defineProperty(exports, "Toaster", {
6126
- enumerable: true,
6127
- get: function () { return chunkZ4M7JB4L_cjs.Toaster; }
6128
- });
6129
- Object.defineProperty(exports, "formatRelativeTime", {
6130
- enumerable: true,
6131
- get: function () { return chunkZ4M7JB4L_cjs.formatRelativeTime; }
6132
- });
6133
- Object.defineProperty(exports, "notify", {
6134
- enumerable: true,
6135
- get: function () { return chunkZ4M7JB4L_cjs.notify; }
6136
- });
6137
- Object.defineProperty(exports, "seedNotifications", {
6138
- enumerable: true,
6139
- get: function () { return chunkZ4M7JB4L_cjs.seedNotifications; }
6140
- });
6141
- Object.defineProperty(exports, "selectUnread", {
6142
- enumerable: true,
6143
- get: function () { return chunkZ4M7JB4L_cjs.selectUnread; }
6144
- });
6145
- Object.defineProperty(exports, "toast", {
6146
- enumerable: true,
6147
- get: function () { return chunkZ4M7JB4L_cjs.toast; }
6148
- });
6149
- Object.defineProperty(exports, "useNotify", {
6150
- enumerable: true,
6151
- get: function () { return chunkZ4M7JB4L_cjs.useNotify; }
6152
- });
6153
6122
  Object.defineProperty(exports, "AgentBadge", {
6154
6123
  enumerable: true,
6155
6124
  get: function () { return chunkXKXN2EDC_cjs.AgentBadge; }
@@ -6734,6 +6703,42 @@ Object.defineProperty(exports, "trimOpenCitation", {
6734
6703
  enumerable: true,
6735
6704
  get: function () { return chunkV4XELT62_cjs.trimOpenCitation; }
6736
6705
  });
6706
+ Object.defineProperty(exports, "DEFAULT_NOTIFY_TONE", {
6707
+ enumerable: true,
6708
+ get: function () { return chunkZ4M7JB4L_cjs.DEFAULT_NOTIFY_TONE; }
6709
+ });
6710
+ Object.defineProperty(exports, "NotificationBell", {
6711
+ enumerable: true,
6712
+ get: function () { return chunkZ4M7JB4L_cjs.NotificationBell; }
6713
+ });
6714
+ Object.defineProperty(exports, "Toaster", {
6715
+ enumerable: true,
6716
+ get: function () { return chunkZ4M7JB4L_cjs.Toaster; }
6717
+ });
6718
+ Object.defineProperty(exports, "formatRelativeTime", {
6719
+ enumerable: true,
6720
+ get: function () { return chunkZ4M7JB4L_cjs.formatRelativeTime; }
6721
+ });
6722
+ Object.defineProperty(exports, "notify", {
6723
+ enumerable: true,
6724
+ get: function () { return chunkZ4M7JB4L_cjs.notify; }
6725
+ });
6726
+ Object.defineProperty(exports, "seedNotifications", {
6727
+ enumerable: true,
6728
+ get: function () { return chunkZ4M7JB4L_cjs.seedNotifications; }
6729
+ });
6730
+ Object.defineProperty(exports, "selectUnread", {
6731
+ enumerable: true,
6732
+ get: function () { return chunkZ4M7JB4L_cjs.selectUnread; }
6733
+ });
6734
+ Object.defineProperty(exports, "toast", {
6735
+ enumerable: true,
6736
+ get: function () { return chunkZ4M7JB4L_cjs.toast; }
6737
+ });
6738
+ Object.defineProperty(exports, "useNotify", {
6739
+ enumerable: true,
6740
+ get: function () { return chunkZ4M7JB4L_cjs.useNotify; }
6741
+ });
6737
6742
  Object.defineProperty(exports, "DropdownMenu", {
6738
6743
  enumerable: true,
6739
6744
  get: function () { return chunkOBNTJEEO_cjs.DropdownMenu; }