@arbidocs/react 0.5.58 → 0.5.60

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.
@@ -2,8 +2,8 @@
2
2
 
3
3
  var chunkEEIYXVM4_cjs = require('./chunk-EEIYXVM4.cjs');
4
4
  var chunkOC7F5SNA_cjs = require('./chunk-OC7F5SNA.cjs');
5
- var chunkKC474WVG_cjs = require('./chunk-KC474WVG.cjs');
6
5
  var chunkWYZJLZ67_cjs = require('./chunk-WYZJLZ67.cjs');
6
+ var chunkKC474WVG_cjs = require('./chunk-KC474WVG.cjs');
7
7
  var chunkHJDR5HEO_cjs = require('./chunk-HJDR5HEO.cjs');
8
8
  var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
9
9
  var chunkRCKA7BEF_cjs = require('./chunk-RCKA7BEF.cjs');
@@ -3643,6 +3643,20 @@ function formatFriendlyDate(dateString, includeTime = true) {
3643
3643
  return dateString;
3644
3644
  }
3645
3645
  }
3646
+ function formatCompactLastSeen(timestamp, options = {}) {
3647
+ const date = new Date(timestamp);
3648
+ if (isNaN(date.getTime())) return "";
3649
+ const now = options.now ?? /* @__PURE__ */ new Date();
3650
+ const yesterday = new Date(now);
3651
+ yesterday.setDate(yesterday.getDate() - 1);
3652
+ if (date.toDateString() === now.toDateString()) {
3653
+ return date.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
3654
+ }
3655
+ if (date.toDateString() === yesterday.toDateString()) return "Yesterday";
3656
+ const dateOptions = { month: "short", day: "numeric" };
3657
+ if (date.getFullYear() !== now.getFullYear()) dateOptions.year = "numeric";
3658
+ return date.toLocaleDateString([], dateOptions);
3659
+ }
3646
3660
 
3647
3661
  // src/lib/markdown-to-text.ts
3648
3662
  function markdownToPlainText(input) {
@@ -5367,6 +5381,7 @@ exports.configureStatusRegistry = configureStatusRegistry;
5367
5381
  exports.createChunkedRecorder = createChunkedRecorder;
5368
5382
  exports.entityNoun = entityNoun;
5369
5383
  exports.extensionFromMime = extensionFromMime;
5384
+ exports.formatCompactLastSeen = formatCompactLastSeen;
5370
5385
  exports.formatDocDate = formatDocDate;
5371
5386
  exports.formatElapsed = formatElapsed;
5372
5387
  exports.formatFolderLabel = formatFolderLabel;
@@ -5405,5 +5420,5 @@ exports.toggleVariants = toggleVariants;
5405
5420
  exports.useAudioRecorder = useAudioRecorder;
5406
5421
  exports.useDictateContext = useDictateContext;
5407
5422
  exports.usesOriginalBytesForViewer = usesOriginalBytesForViewer;
5408
- //# sourceMappingURL=chunk-SOOLC65L.cjs.map
5409
- //# sourceMappingURL=chunk-SOOLC65L.cjs.map
5423
+ //# sourceMappingURL=chunk-H3HYKAS5.cjs.map
5424
+ //# sourceMappingURL=chunk-H3HYKAS5.cjs.map