@frontera-sdk/chat-ui 1.53.23 → 1.53.25

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.
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import { requestPaneFocus, useArtifacts, usePlugins, useCanvasStore, useArtifactStore, useChatOverviewStore, useSourcesEnrichment, sourceKind, useCitationViewer, resolveSourceDisplay, extractDomain, useCitedDocument, canvasId, StudioDisplayIcon, LayoutDashboardIcon, useAgentPanelStore, SourceFavicon, dedup, useArtifactFileObjectUrl, resolveArtifactIconFormat, artifactFormatIcon, avatarMotionForStream, AGENT_AVATAR_SIZE, getFileCategory, FileThumbnail, formatFileSize, usePathname, artifactFormatSubtitle, artifactCategory, Input, MobileScreenSheet, TooltipTrigger, Tooltip, useChatCapabilities, TooltipContent, processMessageParts, GridSpinner, PanelEdgeRing, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, extractCitationsFromSteps, resolvePluginLanguage, getMessageDisplayTimestampValue } from './chunk-4OL5C4O4.js';
2
+ import { requestPaneFocus, useArtifacts, usePlugins, useCanvasStore, useArtifactStore, useChatOverviewStore, useSourcesEnrichment, sourceKind, useCitationViewer, resolveSourceDisplay, extractDomain, useCitedDocument, canvasId, StudioDisplayIcon, LayoutDashboardIcon, useAgentPanelStore, SourceFavicon, dedup, useArtifactFileObjectUrl, resolveArtifactIconFormat, artifactFormatIcon, avatarMotionForStream, AGENT_AVATAR_SIZE, getFileCategory, FileThumbnail, formatFileSize, usePathname, artifactFormatSubtitle, artifactCategory, Input, MobileScreenSheet, TooltipTrigger, Tooltip, useChatCapabilities, TooltipContent, processMessageParts, GridSpinner, PanelEdgeRing, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, extractCitationsFromSteps, resolvePluginLanguage, getMessageDisplayTimestampValue } from './chunk-MPFDU3UN.js';
3
3
  import { MagnifyingGlassIcon, Popover, PopoverTrigger, PopoverContent, Sheet, SheetContent, SheetHeader, SheetTitle } from './chunk-RQSMCGBR.js';
4
- import { useTranslation, useIsMobile } from './chunk-VMZCASGI.js';
4
+ import { useTranslation, useIsMobile } from './chunk-GP43ZTG6.js';
5
5
  import { Collapsible, CollapsibleTrigger, CollapsibleContent, Shimmer, HoverCard, HoverCardTrigger, HoverCardContent } from './chunk-K7AIK7TA.js';
6
6
  import { ChevronDownMediumIcon, ScrollArea, Skeleton, Button } from './chunk-UWKO24VT.js';
7
7
  import { Dialog, DialogContent, DialogHeader, DialogTitle, CrossMediumIcon } from './chunk-37WYG6VG.js';
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { ChevronLeftIcon } from './chunk-CWAOLMFS.js';
3
3
  import { MagnifyingGlassIcon, Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from './chunk-RQSMCGBR.js';
4
- import { useIsMobile, useTranslation } from './chunk-VMZCASGI.js';
4
+ import { useIsMobile, useTranslation } from './chunk-GP43ZTG6.js';
5
5
  import { ToolCallItem, ProcessorIcon } from './chunk-R3ONYPUB.js';
6
6
  import { describeToolRow, toolKindLabel, getToolMeta, Shimmer, Collapse, ToolGroupReasoningItem, SkillToolItem, DeviceDesktopIcon, WorldSearchIcon, FileTextIcon, useStreamdownPlugins, CircleXIcon, STREAMDOWN_LINK_SAFETY, Folder1Icon, AppIconFrame, AppIcon, Collapsible, CollapsibleTrigger, CollapsibleContent, SquareArrowTopRightIcon, Icon } from './chunk-K7AIK7TA.js';
7
7
  import { ChevronDownMediumIcon, Button, Skeleton, buttonVariants } from './chunk-UWKO24VT.js';
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { useTranslation } from './chunk-VMZCASGI.js';
2
+ import { useTranslation } from './chunk-GP43ZTG6.js';
3
3
  import { Skeleton } from './chunk-UWKO24VT.js';
4
4
  import { useRef, useState, useEffect } from 'react';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
package/dist/header.js CHANGED
@@ -1,9 +1,9 @@
1
1
  'use client';
2
- export { ChatHeader, ChatHeaderActions } from './chunk-ZBWIRN76.js';
3
- import './chunk-4OL5C4O4.js';
2
+ export { ChatHeader, ChatHeaderActions } from './chunk-JIOJ6VJ4.js';
3
+ import './chunk-MPFDU3UN.js';
4
4
  import './chunk-CWAOLMFS.js';
5
5
  import './chunk-RQSMCGBR.js';
6
- import './chunk-VMZCASGI.js';
6
+ import './chunk-GP43ZTG6.js';
7
7
  import './chunk-R3ONYPUB.js';
8
8
  import './chunk-K7AIK7TA.js';
9
9
  import './chunk-UWKO24VT.js';
package/dist/message.js CHANGED
@@ -1,9 +1,9 @@
1
1
  'use client';
2
- export { Message, Thinking } from './chunk-SPSLMHUU.js';
3
- import './chunk-4OL5C4O4.js';
2
+ export { Message, Thinking } from './chunk-GGIFLPU5.js';
3
+ import './chunk-MPFDU3UN.js';
4
4
  import './chunk-CWAOLMFS.js';
5
5
  import './chunk-RQSMCGBR.js';
6
- import './chunk-VMZCASGI.js';
6
+ import './chunk-GP43ZTG6.js';
7
7
  import './chunk-R3ONYPUB.js';
8
8
  import './chunk-K7AIK7TA.js';
9
9
  import './chunk-UWKO24VT.js';
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- export { DEFAULT_SHORTCUTS, NewSessionPrompt, buildDefaultShortcuts } from './chunk-UQDTJM5H.js';
2
+ export { DEFAULT_SHORTCUTS, NewSessionPrompt, buildDefaultShortcuts } from './chunk-FBDBLAX5.js';
3
3
  import './chunk-RQSMCGBR.js';
4
- import './chunk-VMZCASGI.js';
4
+ import './chunk-GP43ZTG6.js';
5
5
  import './chunk-37WYG6VG.js';
6
6
  import './chunk-RCWVJD7G.js';
7
7
  import './chunk-LGVMMBL3.js';
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { DeckNotesCard, deckOwnsArrowKeys } from './chunk-4FRTPVJT.js';
3
- import { resolveStageWidth, zoomPercent, DECK_ZOOM_LEVELS, LazyThumb, ArtifactSkeleton } from './chunk-JJ3GBIGA.js';
3
+ import { resolveStageWidth, zoomPercent, DECK_ZOOM_LEVELS, LazyThumb, ArtifactSkeleton } from './chunk-PU75S6NF.js';
4
4
  import { ChevronLeftIcon } from './chunk-CWAOLMFS.js';
5
- import { useTranslation, useIsMobile } from './chunk-VMZCASGI.js';
5
+ import { useTranslation, useIsMobile } from './chunk-GP43ZTG6.js';
6
6
  import { Button, ChevronDownMediumIcon, ScrollArea } from './chunk-UWKO24VT.js';
7
7
  import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, ChevronRightIcon } from './chunk-C3HW5S2Z.js';
8
8
  import { cn } from './chunk-LGVMMBL3.js';
@@ -26,6 +26,8 @@ function PdfDeckViewInner({
26
26
  label,
27
27
  notes,
28
28
  page,
29
+ pageKey,
30
+ textLayer = false,
29
31
  onError
30
32
  }) {
31
33
  const { t } = useTranslation();
@@ -62,7 +64,7 @@ function PdfDeckViewInner({
62
64
  useEffect(() => () => setLoadedFileUrl(null), []);
63
65
  useEffect(() => {
64
66
  if (page && visiblePages > 0) setSel(Math.min(page, visiblePages) - 1);
65
- }, [page, visiblePages]);
67
+ }, [page, pageKey, visiblePages]);
66
68
  const next = useCallback(
67
69
  () => setSel(
68
70
  (value) => Math.min(Math.max(0, visiblePages - 1), value + 1)
@@ -452,12 +454,14 @@ function PdfDeckViewInner({
452
454
  "div",
453
455
  {
454
456
  className: pageIndex === sel ? "h-full w-full" : "pointer-events-none absolute inset-0 z-10",
457
+ "data-text-root": textLayer && pageIndex === sel ? pageIndex + 1 : void 0,
458
+ "data-text-pages": textLayer && pageIndex === sel ? visiblePages : void 0,
455
459
  children: /* @__PURE__ */ jsx(
456
460
  Page,
457
461
  {
458
462
  pageNumber: pageIndex + 1,
459
463
  width: pageDims.w,
460
- renderTextLayer: false,
464
+ renderTextLayer: textLayer && pageIndex === sel,
461
465
  renderAnnotationLayer: false,
462
466
  loading: null,
463
467
  onRenderSuccess: pageIndex === sel ? handlePageRendered : void 0
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import { zoomPercent, DECK_ZOOM_LEVELS, ArtifactSkeleton, LazyThumb } from './chunk-JJ3GBIGA.js';
2
+ import { zoomPercent, DECK_ZOOM_LEVELS, ArtifactSkeleton, LazyThumb } from './chunk-PU75S6NF.js';
3
3
  import { ChevronLeftIcon } from './chunk-CWAOLMFS.js';
4
- import { useTranslation, useIsMobile } from './chunk-VMZCASGI.js';
4
+ import { useTranslation, useIsMobile } from './chunk-GP43ZTG6.js';
5
5
  import { Button, ChevronDownMediumIcon, ScrollArea } from './chunk-UWKO24VT.js';
6
6
  import { ChevronRightIcon, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem } from './chunk-C3HW5S2Z.js';
7
7
  import { cn } from './chunk-LGVMMBL3.js';
@@ -35,6 +35,7 @@ var PdfDocumentPage = memo(function PdfDocumentPage2({
35
35
  {
36
36
  "data-pdf-page-index": pageIndex,
37
37
  "data-pdf-page-live": shouldRender,
38
+ "data-text-root": pageIndex + 1,
38
39
  className: "scroll-mt-4 overflow-hidden bg-surface-raised shadow-sm",
39
40
  style: { width: displayWidth, height: displayHeight },
40
41
  children: shouldRender ? /* @__PURE__ */ jsx(
@@ -94,7 +95,8 @@ function PdfDocumentViewInner({
94
95
  label,
95
96
  onError,
96
97
  versionSlot,
97
- page
98
+ page,
99
+ pageKey
98
100
  }) {
99
101
  const { t } = useTranslation();
100
102
  const isMobile = useIsMobile();
@@ -257,11 +259,11 @@ function PdfDocumentViewInner({
257
259
  useEffect(() => {
258
260
  if (!page || !laidOut) return;
259
261
  const shown = shownPageRef.current;
260
- if (shown?.fileUrl === fileUrl && shown.page === page) return;
261
- shownPageRef.current = { fileUrl, page };
262
+ if (shown?.fileUrl === fileUrl && shown.page === page && shown.pageKey === pageKey) return;
263
+ shownPageRef.current = { fileUrl, page, pageKey };
262
264
  heldPageRef.current = page - 1;
263
265
  goToPage(page - 1, shown?.fileUrl === fileUrl ? "smooth" : "auto");
264
- }, [fileUrl, goToPage, laidOut, page]);
266
+ }, [fileUrl, goToPage, laidOut, page, pageKey]);
265
267
  useLayoutEffect(() => {
266
268
  if (heldPageRef.current !== null && laidOut) goToPage(heldPageRef.current, "auto");
267
269
  }, [pageWidth]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontera-sdk/chat-ui",
3
- "version": "1.53.23",
3
+ "version": "1.53.25",
4
4
  "description": "Ready-made React components for embedding a Frontera agent conversation — message rendering, tool calls, artifacts and composer.",
5
5
  "keywords": [
6
6
  "frontera",
@@ -89,8 +89,8 @@
89
89
  },
90
90
  "dependencies": {
91
91
  "@elysiajs/eden": "^1.4.9",
92
- "@frontera-sdk/chat": "1.53.23",
93
- "@frontera-sdk/core": "1.53.23",
92
+ "@frontera-sdk/chat": "1.53.25",
93
+ "@frontera-sdk/core": "1.53.25",
94
94
  "@radix-ui/react-alert-dialog": "^1.1.23",
95
95
  "@radix-ui/react-collapsible": "^1.1.12",
96
96
  "@radix-ui/react-compose-refs": "^1.1.5",