@flamingo-stack/openframe-frontend-core 0.0.455 → 0.0.456-snapshot.20260720115226
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/{chunk-6W4ZEVIC.js → chunk-2ZW2ZPDW.js} +3 -3
- package/dist/{chunk-XAQLBUCP.js → chunk-4423DHRX.js} +2 -2
- package/dist/{chunk-5YPKZM6Y.js → chunk-5BKBG653.js} +6 -6
- package/dist/{chunk-YSKSBLCG.cjs → chunk-5XFJG3TC.cjs} +73 -73
- package/dist/{chunk-YSKSBLCG.cjs.map → chunk-5XFJG3TC.cjs.map} +1 -1
- package/dist/{chunk-RT7DIGTN.cjs → chunk-6TI3DCOG.cjs} +3 -3
- package/dist/{chunk-RT7DIGTN.cjs.map → chunk-6TI3DCOG.cjs.map} +1 -1
- package/dist/{chunk-M5RT26WQ.cjs → chunk-AB65PWU2.cjs} +73 -73
- package/dist/{chunk-M5RT26WQ.cjs.map → chunk-AB65PWU2.cjs.map} +1 -1
- package/dist/{chunk-DGPKGESY.js → chunk-AJGZ3YSR.js} +4 -4
- package/dist/{chunk-FCVF4YAB.cjs → chunk-BDTQIIJR.cjs} +40 -40
- package/dist/{chunk-FCVF4YAB.cjs.map → chunk-BDTQIIJR.cjs.map} +1 -1
- package/dist/{chunk-BE77G7GW.cjs → chunk-C2TDHJBO.cjs} +40 -40
- package/dist/{chunk-BE77G7GW.cjs.map → chunk-C2TDHJBO.cjs.map} +1 -1
- package/dist/{chunk-XT6S6DYS.cjs → chunk-CCT5VCRP.cjs} +12 -12
- package/dist/{chunk-XT6S6DYS.cjs.map → chunk-CCT5VCRP.cjs.map} +1 -1
- package/dist/{chunk-NNDNJCJ3.cjs → chunk-EOVQVVDJ.cjs} +18 -18
- package/dist/{chunk-NNDNJCJ3.cjs.map → chunk-EOVQVVDJ.cjs.map} +1 -1
- package/dist/{chunk-62AXZKYN.cjs → chunk-FM5DTJPA.cjs} +1753 -1376
- package/dist/chunk-FM5DTJPA.cjs.map +1 -0
- package/dist/{chunk-YXCYQKAX.js → chunk-GJ7BN4MI.js} +5 -5
- package/dist/{chunk-VNE5R4LQ.js → chunk-I7M6KCCS.js} +5 -5
- package/dist/{chunk-X62ICFPJ.js → chunk-ILUX3DXS.js} +2 -2
- package/dist/{chunk-KTGGM5WA.cjs → chunk-IOHQJOLR.cjs} +36 -12
- package/dist/chunk-IOHQJOLR.cjs.map +1 -0
- package/dist/{chunk-GNYV6HYO.cjs → chunk-KQ36EHE4.cjs} +15 -15
- package/dist/{chunk-GNYV6HYO.cjs.map → chunk-KQ36EHE4.cjs.map} +1 -1
- package/dist/{chunk-QSIZW6EX.js → chunk-KXIIUE75.js} +2 -2
- package/dist/{chunk-BD3JBEUC.js → chunk-MK2YWJAA.js} +64 -40
- package/dist/chunk-MK2YWJAA.js.map +1 -0
- package/dist/{chunk-N4CHA7T7.js → chunk-NSL5MNS4.js} +5210 -4833
- package/dist/chunk-NSL5MNS4.js.map +1 -0
- package/dist/{chunk-LB3OZE4B.js → chunk-O7F7RZFN.js} +6 -6
- package/dist/{chunk-JUUPMMKI.js → chunk-R5IQJXA3.js} +3 -3
- package/dist/{chunk-EGTGRG7N.js → chunk-RSW42GTZ.js} +2 -2
- package/dist/{chunk-RZL7I6YN.cjs → chunk-SQ3CP2IV.cjs} +7 -7
- package/dist/{chunk-RZL7I6YN.cjs.map → chunk-SQ3CP2IV.cjs.map} +1 -1
- package/dist/{chunk-D5PBUVGB.cjs → chunk-U4APSAAR.cjs} +5 -5
- package/dist/{chunk-D5PBUVGB.cjs.map → chunk-U4APSAAR.cjs.map} +1 -1
- package/dist/{chunk-2KUIA2AR.js → chunk-WXDEMTLD.js} +3 -3
- package/dist/{chunk-IDCPYG7N.cjs → chunk-YCIVMKRS.cjs} +29 -29
- package/dist/{chunk-IDCPYG7N.cjs.map → chunk-YCIVMKRS.cjs.map} +1 -1
- package/dist/{chunk-UJZ6O2ON.cjs → chunk-YHB4MNUX.cjs} +32 -32
- package/dist/{chunk-UJZ6O2ON.cjs.map → chunk-YHB4MNUX.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/chat-sidebar.d.ts.map +1 -1
- package/dist/components/chat/chat-ticket-list.d.ts.map +1 -1
- package/dist/components/chat/guide-welcome.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/chat/mingo-chat-history.d.ts.map +1 -1
- package/dist/components/chat/mingo-welcome.d.ts.map +1 -1
- package/dist/components/chat/quick-action-wall.d.ts +5 -1
- package/dist/components/chat/quick-action-wall.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +17 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/cards-strip.d.ts.map +1 -1
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/features/notifications/notification-drawer.d.ts.map +1 -1
- package/dist/components/features/time-tracker/time-tracker-panel.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +141 -135
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +17 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/page-container.d.ts.map +1 -1
- package/dist/components/navigation/app-layout-drawer.d.ts +1 -1
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/related-content/index.js +4 -4
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/drawer.d.ts +1 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +9 -3
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +8 -2
- package/dist/components/ui/marquee-wall.d.ts +8 -1
- package/dist/components/ui/marquee-wall.d.ts.map +1 -1
- package/dist/components/ui/menubar.d.ts +3 -6
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/modal-v2.d.ts.map +1 -1
- package/dist/components/ui/modal.d.ts.map +1 -1
- package/dist/components/ui/overlay-scroll-area.d.ts +59 -0
- package/dist/components/ui/overlay-scroll-area.d.ts.map +1 -0
- package/dist/hooks/index.cjs +4 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/ui/index.d.ts +1 -0
- package/dist/hooks/ui/index.d.ts.map +1 -1
- package/dist/hooks/ui/use-reset-on-page-hidden.d.ts +19 -0
- package/dist/hooks/ui/use-reset-on-page-hidden.d.ts.map +1 -0
- package/dist/hooks/use-near-viewport.d.ts +3 -1
- package/dist/hooks/use-near-viewport.d.ts.map +1 -1
- package/dist/index.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -2
- package/package.json +3 -1
- package/src/components/chat/chat-message-list.tsx +54 -10
- package/src/components/chat/chat-sidebar.tsx +9 -4
- package/src/components/chat/chat-ticket-list.tsx +8 -2
- package/src/components/chat/embeddable-chat.tsx +31 -3
- package/src/components/chat/guide-welcome.tsx +7 -4
- package/src/components/chat/mingo-chat-history.tsx +6 -4
- package/src/components/chat/mingo-welcome.tsx +7 -4
- package/src/components/chat/quick-action-wall.tsx +7 -0
- package/src/components/chat/types/component.types.ts +17 -0
- package/src/components/features/cards-strip.tsx +16 -0
- package/src/components/features/notifications/notification-drawer.tsx +6 -4
- package/src/components/features/time-tracker/time-tracker-panel.tsx +5 -3
- package/src/components/layout/page-container.tsx +13 -5
- package/src/components/ui/drawer.tsx +8 -3
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/marquee-wall.tsx +185 -11
- package/src/components/ui/modal-v2.tsx +6 -2
- package/src/components/ui/modal.tsx +6 -2
- package/src/components/ui/overlay-scroll-area.tsx +219 -0
- package/src/hooks/ui/index.ts +1 -0
- package/src/hooks/ui/use-reset-on-page-hidden.ts +32 -0
- package/src/hooks/use-near-viewport.ts +36 -12
- package/src/stories/OverlayScrollArea.stories.tsx +52 -0
- package/src/styles/index.css +2 -0
- package/src/styles/overlay-scrollbars-theme.css +19 -0
- package/src/styles/vendor-overlayscrollbars.css +673 -0
- package/dist/chunk-62AXZKYN.cjs.map +0 -1
- package/dist/chunk-BD3JBEUC.js.map +0 -1
- package/dist/chunk-KTGGM5WA.cjs.map +0 -1
- package/dist/chunk-N4CHA7T7.js.map +0 -1
- /package/dist/{chunk-6W4ZEVIC.js.map → chunk-2ZW2ZPDW.js.map} +0 -0
- /package/dist/{chunk-XAQLBUCP.js.map → chunk-4423DHRX.js.map} +0 -0
- /package/dist/{chunk-5YPKZM6Y.js.map → chunk-5BKBG653.js.map} +0 -0
- /package/dist/{chunk-DGPKGESY.js.map → chunk-AJGZ3YSR.js.map} +0 -0
- /package/dist/{chunk-YXCYQKAX.js.map → chunk-GJ7BN4MI.js.map} +0 -0
- /package/dist/{chunk-VNE5R4LQ.js.map → chunk-I7M6KCCS.js.map} +0 -0
- /package/dist/{chunk-X62ICFPJ.js.map → chunk-ILUX3DXS.js.map} +0 -0
- /package/dist/{chunk-QSIZW6EX.js.map → chunk-KXIIUE75.js.map} +0 -0
- /package/dist/{chunk-LB3OZE4B.js.map → chunk-O7F7RZFN.js.map} +0 -0
- /package/dist/{chunk-JUUPMMKI.js.map → chunk-R5IQJXA3.js.map} +0 -0
- /package/dist/{chunk-EGTGRG7N.js.map → chunk-RSW42GTZ.js.map} +0 -0
- /package/dist/{chunk-2KUIA2AR.js.map → chunk-WXDEMTLD.js.map} +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useRef, useEffect, useLayoutEffect, useImperativeHandle, forwardRef } from "react"
|
|
4
4
|
import { useStickToBottom } from "use-stick-to-bottom"
|
|
5
5
|
import { cn } from "../../utils/cn"
|
|
6
|
+
import { OverlayScrollArea } from '../ui/overlay-scroll-area'
|
|
6
7
|
import { ChatMessageEnhanced } from "./chat-message-enhanced"
|
|
7
8
|
import { ChatMessageListSkeleton } from "./chat-message-skeleton"
|
|
8
9
|
import { DotsLoaderIcon } from "../icons-v2-generated"
|
|
@@ -96,6 +97,8 @@ const ChatMessageList = forwardRef<HTMLDivElement, ChatMessageListProps>(
|
|
|
96
97
|
isLoading = false,
|
|
97
98
|
isTyping = false,
|
|
98
99
|
autoScroll = true,
|
|
100
|
+
overscrollContain = true,
|
|
101
|
+
pinBottom = false,
|
|
99
102
|
showAvatars = true,
|
|
100
103
|
fullWidth = false,
|
|
101
104
|
contentClassName,
|
|
@@ -254,6 +257,42 @@ const ChatMessageList = forwardRef<HTMLDivElement, ChatMessageListProps>(
|
|
|
254
257
|
}
|
|
255
258
|
}, [autoScroll, messages, dialogId, scrollToBottom, contentRef])
|
|
256
259
|
|
|
260
|
+
// ---- Passive-demo hard pin (pinBottom) ---------------------------
|
|
261
|
+
// Scripted in-page replays (the Fae/Mingo demos) have no human at the
|
|
262
|
+
// keyboard, so the newest streamed content must ALWAYS sit at the
|
|
263
|
+
// bottom. `useStickToBottom`'s smart follow only tracks while the
|
|
264
|
+
// viewer is "at bottom", which is unreliable for an assistant-only
|
|
265
|
+
// stream from a cold, non-bottom mount (the exact bug where the last
|
|
266
|
+
// reply landed below the fold). When `pinBottom` is set we snap the
|
|
267
|
+
// scroller to its full height — the SAME mechanism for BOTH demo
|
|
268
|
+
// surfaces, so Fae and Mingo behave 1:1.
|
|
269
|
+
//
|
|
270
|
+
// CRUCIAL: only re-pin when the content HEIGHT actually changed (a
|
|
271
|
+
// streamed token appended, or the conversation swapped/reset). A parent
|
|
272
|
+
// that recreates props on every render — EmbeddableChat in previewMode
|
|
273
|
+
// rebuilds its scripted state each render, churning the `messages` array
|
|
274
|
+
// identity — would otherwise fire this effect on every re-render and snap
|
|
275
|
+
// the scroller back to the bottom, trapping the visitor and blocking
|
|
276
|
+
// internal scroll (Mingo couldn't scroll while Fae, with stable memoized
|
|
277
|
+
// props, could). Skipping the pin when the height is UNCHANGED means an
|
|
278
|
+
// idle re-render leaves the scroller alone, so once the stream settles the
|
|
279
|
+
// visitor can scroll up in BOTH surfaces; a real growth (streaming) or a
|
|
280
|
+
// shrink (a new conversation) still re-pins to the fresh bottom.
|
|
281
|
+
// `useLayoutEffect` so the write lands before paint (no visible jump).
|
|
282
|
+
// Pair with `autoScroll={false}` so the library's spring doesn't fight.
|
|
283
|
+
const pinPrevHeightRef = useRef(0)
|
|
284
|
+
useLayoutEffect(() => {
|
|
285
|
+
if (!pinBottom) {
|
|
286
|
+
pinPrevHeightRef.current = 0
|
|
287
|
+
return
|
|
288
|
+
}
|
|
289
|
+
const el = scrollRef.current
|
|
290
|
+
if (!el) return
|
|
291
|
+
if (el.scrollHeight === pinPrevHeightRef.current) return
|
|
292
|
+
pinPrevHeightRef.current = el.scrollHeight
|
|
293
|
+
el.scrollTop = el.scrollHeight
|
|
294
|
+
}, [pinBottom, messages, isTyping, pendingApprovals, scrollRef])
|
|
295
|
+
|
|
257
296
|
// ---- Prepend anchoring (load-older) ------------------------------
|
|
258
297
|
// The library doesn't preserve user position when content grows ABOVE
|
|
259
298
|
// the viewport. We do: from the pre-load geometry snapshot (taken in the
|
|
@@ -491,15 +530,20 @@ const ChatMessageList = forwardRef<HTMLDivElement, ChatMessageListProps>(
|
|
|
491
530
|
|
|
492
531
|
return (
|
|
493
532
|
<div className="relative flex-1 min-h-0 flex flex-col">
|
|
494
|
-
<
|
|
495
|
-
|
|
496
|
-
className=
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
//
|
|
500
|
-
//
|
|
501
|
-
|
|
502
|
-
|
|
533
|
+
<OverlayScrollArea
|
|
534
|
+
viewportRef={setScrollRef}
|
|
535
|
+
className="flex-1 min-h-0"
|
|
536
|
+
contentClassName={cn(
|
|
537
|
+
"flex flex-col overflow-x-hidden",
|
|
538
|
+
// `overscroll-contain` (default ON, opt-out via `overscrollContain={false}`):
|
|
539
|
+
// reaching the top/bottom of the thread must NOT chain the wheel/
|
|
540
|
+
// touch scroll to the page behind the chat — e.g. the company-hub
|
|
541
|
+
// deck (native body scroll + sticky slide panels) would otherwise
|
|
542
|
+
// advance slides while you scroll the chat (fixed in #1501; kept as
|
|
543
|
+
// the prop default here). Passive in-page DEMO chats disable it so
|
|
544
|
+
// the surrounding page keeps scrolling normally when the pointer is
|
|
545
|
+
// over the (non-interactive) thread.
|
|
546
|
+
overscrollContain && "overscroll-contain",
|
|
503
547
|
className,
|
|
504
548
|
)}
|
|
505
549
|
{...props}
|
|
@@ -554,7 +598,7 @@ const ChatMessageList = forwardRef<HTMLDivElement, ChatMessageListProps>(
|
|
|
554
598
|
)
|
|
555
599
|
})}
|
|
556
600
|
</div>
|
|
557
|
-
</
|
|
601
|
+
</OverlayScrollArea>
|
|
558
602
|
|
|
559
603
|
{/* Footer-pinned streaming loader — outside the scroller so it
|
|
560
604
|
doesn't jitter as the streaming message grows. Color is set
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { forwardRef, useRef, useEffect } from "react"
|
|
2
2
|
import { cn } from "../../utils/cn"
|
|
3
3
|
import { Button } from "../ui/button"
|
|
4
|
+
import { OverlayScrollArea } from '../ui/overlay-scroll-area'
|
|
4
5
|
import { ChatPlusIcon, ChatsIcon } from "../icons-v2-generated"
|
|
5
6
|
import { Chevron02RightIcon } from "../icons-v2-generated"
|
|
6
7
|
import { ChatSidebarSkeleton, DialogListItemSkeleton } from "./chat-sidebar-skeleton"
|
|
@@ -154,12 +155,16 @@ const ChatSidebar = forwardRef<HTMLDivElement, ChatSidebarProps>(
|
|
|
154
155
|
</div>
|
|
155
156
|
) : children ? (
|
|
156
157
|
/* Custom children content */
|
|
157
|
-
<
|
|
158
|
+
<OverlayScrollArea className="flex-1 min-h-0" contentClassName="overscroll-contain">
|
|
158
159
|
{children}
|
|
159
|
-
</
|
|
160
|
+
</OverlayScrollArea>
|
|
160
161
|
) : (
|
|
161
162
|
/* Dialogs List */
|
|
162
|
-
<
|
|
163
|
+
<OverlayScrollArea
|
|
164
|
+
viewportRef={scrollContainerRef}
|
|
165
|
+
className="flex-1 min-h-0"
|
|
166
|
+
contentClassName="overscroll-contain"
|
|
167
|
+
>
|
|
163
168
|
<div className="flex flex-col">
|
|
164
169
|
{dialogs.map((dialog) => (
|
|
165
170
|
<DialogListItem
|
|
@@ -183,7 +188,7 @@ const ChatSidebar = forwardRef<HTMLDivElement, ChatSidebarProps>(
|
|
|
183
188
|
</div>
|
|
184
189
|
)}
|
|
185
190
|
</div>
|
|
186
|
-
</
|
|
191
|
+
</OverlayScrollArea>
|
|
187
192
|
)}
|
|
188
193
|
</div>
|
|
189
194
|
</div>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { cn } from '../../utils/cn'
|
|
5
5
|
import { ScrollFadeOverlay, useScrollFade } from '../ui/scroll-fade'
|
|
6
|
+
import { OverlayScrollArea } from '../ui/overlay-scroll-area'
|
|
6
7
|
import { ChatTicketItem, type ChatTicketItemData } from './entity-cards/chat-ticket-item'
|
|
7
8
|
|
|
8
9
|
export interface ChatTicketListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -46,7 +47,12 @@ const ChatTicketList = React.forwardRef<HTMLDivElement, ChatTicketListProps>(
|
|
|
46
47
|
!fadeBottom && "border-b rounded-b-md",
|
|
47
48
|
)}
|
|
48
49
|
>
|
|
49
|
-
<
|
|
50
|
+
<OverlayScrollArea
|
|
51
|
+
viewportRef={scrollRef}
|
|
52
|
+
className="h-full"
|
|
53
|
+
contentClassName="overscroll-contain"
|
|
54
|
+
onScroll={updateFade}
|
|
55
|
+
>
|
|
50
56
|
{tickets.map((ticket) => (
|
|
51
57
|
<ChatTicketItem
|
|
52
58
|
key={ticket.id}
|
|
@@ -54,7 +60,7 @@ const ChatTicketList = React.forwardRef<HTMLDivElement, ChatTicketListProps>(
|
|
|
54
60
|
onClick={onTicketClick}
|
|
55
61
|
/>
|
|
56
62
|
))}
|
|
57
|
-
</
|
|
63
|
+
</OverlayScrollArea>
|
|
58
64
|
|
|
59
65
|
{/* Scroll-fade overlays — tinted with the page background so edge
|
|
60
66
|
tickets fade into the surface behind the list in BOTH themes
|
|
@@ -2264,7 +2264,19 @@ function EmbeddableChatInner({
|
|
|
2264
2264
|
<ChatMessageList
|
|
2265
2265
|
messages={messages}
|
|
2266
2266
|
isTyping={chatLoading}
|
|
2267
|
-
|
|
2267
|
+
// Real drawer: the library's smart follow. Passive in-page
|
|
2268
|
+
// demo (previewMode): deterministic hard pin instead — a
|
|
2269
|
+
// scripted assistant-only stream from a cold mount never
|
|
2270
|
+
// satisfies the library's "at bottom" gate, so the reply
|
|
2271
|
+
// landed below the fold. `pinBottom` snaps to bottom on
|
|
2272
|
+
// every frame; identical mechanism to the Fae demo box, so
|
|
2273
|
+
// both surfaces behave 1:1.
|
|
2274
|
+
autoScroll={!previewMode}
|
|
2275
|
+
pinBottom={previewMode}
|
|
2276
|
+
// Passive in-page demos (previewMode) let the surrounding
|
|
2277
|
+
// page scroll over the thread; the real drawer keeps
|
|
2278
|
+
// containment (deck slide-scroll fix).
|
|
2279
|
+
overscrollContain={!previewMode}
|
|
2268
2280
|
assistantType="mingo"
|
|
2269
2281
|
assistantIcon={mingoAssistantIcon}
|
|
2270
2282
|
renderEntityCard={renderEntityCard}
|
|
@@ -2272,11 +2284,27 @@ function EmbeddableChatInner({
|
|
|
2272
2284
|
renderContextItem={renderContextItem}
|
|
2273
2285
|
renderMention={renderMention}
|
|
2274
2286
|
NavLinkAnchor={NavLinkAnchorViaRuntime}
|
|
2275
|
-
//
|
|
2287
|
+
// Real Mingo drawer: hide the message-list scrollbar
|
|
2276
2288
|
// (scroll stays functional). Scoped here via `className`
|
|
2277
2289
|
// instead of `ChatMessageList` itself, so other list
|
|
2278
2290
|
// consumers (host chat, tickets) keep their thin bar.
|
|
2279
|
-
|
|
2291
|
+
//
|
|
2292
|
+
// `previewMode` (the passive in-page demo) instead:
|
|
2293
|
+
// • KEEP the default thin scrollbar — the "elevator" —
|
|
2294
|
+
// so the Mingo demo's scroll controls match the Fae
|
|
2295
|
+
// demo box (which renders the default ChatMessageList
|
|
2296
|
+
// scrollbar) 1:1.
|
|
2297
|
+
// • Re-enable pointer events on the scroller: previewMode
|
|
2298
|
+
// puts `pointer-events-none` on the whole panel (line
|
|
2299
|
+
// ~1981) so the demo doesn't trap clicks, but that also
|
|
2300
|
+
// killed wheel/touch scroll on the thread (the Mingo
|
|
2301
|
+
// embed couldn't scroll while the Fae box could). Only
|
|
2302
|
+
// the scroller re-enables; composer + chrome stay inert.
|
|
2303
|
+
className={
|
|
2304
|
+
previewMode
|
|
2305
|
+
? 'flex-1 pointer-events-auto'
|
|
2306
|
+
: 'flex-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden'
|
|
2307
|
+
}
|
|
2280
2308
|
// No inner `px`/`pb`: the panel wrapper already pads with
|
|
2281
2309
|
// `p-[var(--spacing-system-m)]`. The default content class
|
|
2282
2310
|
// adds `px-[var(--spacing-system-m)]` + `pb-…xs`, which
|
|
@@ -4,6 +4,7 @@ import * as React from 'react'
|
|
|
4
4
|
import { cn } from '../../utils/cn'
|
|
5
5
|
import { MingoIcon } from '../icons'
|
|
6
6
|
import { ScrollFadeOverlay, useScrollFade } from '../ui/scroll-fade'
|
|
7
|
+
import { OverlayScrollArea } from '../ui/overlay-scroll-area'
|
|
7
8
|
import { Skeleton } from '../ui/skeleton'
|
|
8
9
|
import { QuickActionWall } from './quick-action-wall'
|
|
9
10
|
import { EntityIcon } from '../icon-display'
|
|
@@ -141,10 +142,11 @@ export function GuideWelcome({
|
|
|
141
142
|
{/* Greeting + slash-command list share one scroll region; `relative` so
|
|
142
143
|
the edge fades can overlay it. */}
|
|
143
144
|
<div className="relative flex flex-1 min-h-0 flex-col">
|
|
144
|
-
<
|
|
145
|
-
|
|
145
|
+
<OverlayScrollArea
|
|
146
|
+
viewportRef={scrollRef}
|
|
146
147
|
onScroll={updateScrollFade}
|
|
147
|
-
className="flex
|
|
148
|
+
className="flex-1 min-h-0"
|
|
149
|
+
contentClassName="flex min-h-full flex-col gap-[var(--spacing-system-m)] overscroll-contain"
|
|
148
150
|
>
|
|
149
151
|
{/* Greeting grows to fill (`flex-1`) so the slash-command list stays
|
|
150
152
|
anchored below it — but its content is anchored at the TOP of the
|
|
@@ -187,7 +189,7 @@ export function GuideWelcome({
|
|
|
187
189
|
</div>
|
|
188
190
|
|
|
189
191
|
{children}
|
|
190
|
-
</
|
|
192
|
+
</OverlayScrollArea>
|
|
191
193
|
|
|
192
194
|
{/* Edge scroll-fades — visible only when content is hidden beyond them. */}
|
|
193
195
|
<ScrollFadeOverlay edge="top" visible={fadeTop} className="h-12" />
|
|
@@ -207,6 +209,7 @@ export function GuideWelcome({
|
|
|
207
209
|
chips={chipItems}
|
|
208
210
|
rows={4}
|
|
209
211
|
pauseOnHover
|
|
212
|
+
dragScroll
|
|
210
213
|
fade={['left', 'right']}
|
|
211
214
|
fadeSize={{ left: 32 }}
|
|
212
215
|
fadeColor="var(--color-bg)"
|
|
@@ -5,6 +5,7 @@ import { cn } from '../../utils/cn'
|
|
|
5
5
|
import { ActionsMenuDropdown, type ActionsMenuItem } from '../ui/actions-menu'
|
|
6
6
|
import { Button } from '../ui/button'
|
|
7
7
|
import { ScrollFadeOverlay, useScrollFade } from '../ui/scroll-fade'
|
|
8
|
+
import { OverlayScrollArea } from '../ui/overlay-scroll-area'
|
|
8
9
|
import { Ellipsis01Icon, SearchXmarkIcon } from '../icons-v2-generated'
|
|
9
10
|
import { ChatListEmptyState } from './chat-list-empty-state'
|
|
10
11
|
import type { DialogItem } from './types/component.types'
|
|
@@ -338,10 +339,11 @@ export function MingoChatHistory({
|
|
|
338
339
|
{/* Scroll region — the search INPUT now lives in the panel header
|
|
339
340
|
(Figma 116:51217), so the list is just the grouped rows + fades. */}
|
|
340
341
|
<div className="relative flex flex-1 min-h-0 flex-col">
|
|
341
|
-
<
|
|
342
|
-
|
|
342
|
+
<OverlayScrollArea
|
|
343
|
+
viewportRef={scrollRef}
|
|
343
344
|
onScroll={updateFade}
|
|
344
|
-
className="flex
|
|
345
|
+
className="flex-1 min-h-0"
|
|
346
|
+
contentClassName="flex flex-col gap-[var(--spacing-system-m)] overscroll-contain"
|
|
345
347
|
>
|
|
346
348
|
{noSearchResults ? (
|
|
347
349
|
// No search matches — same centred glyph + title + caption layout as
|
|
@@ -374,7 +376,7 @@ export function MingoChatHistory({
|
|
|
374
376
|
))
|
|
375
377
|
)}
|
|
376
378
|
{hasMore ? <div ref={sentinelRef} className="h-px shrink-0" /> : null}
|
|
377
|
-
</
|
|
379
|
+
</OverlayScrollArea>
|
|
378
380
|
|
|
379
381
|
{/* Scroll-fade — only while content is hidden in that direction. */}
|
|
380
382
|
<ScrollFadeOverlay edge="top" visible={fadeTop} color="var(--color-bg-card)" className="h-12" />
|
|
@@ -8,6 +8,7 @@ import { QuickActionChipButton } from './quick-action-chip'
|
|
|
8
8
|
import { QuickActionWall } from './quick-action-wall'
|
|
9
9
|
import { Button } from '../ui/button'
|
|
10
10
|
import { ScrollFadeOverlay, useScrollFade } from '../ui/scroll-fade'
|
|
11
|
+
import { OverlayScrollArea } from '../ui/overlay-scroll-area'
|
|
11
12
|
import { XmarkIcon } from '../icons-v2-generated/signs-and-symbols/xmark-icon'
|
|
12
13
|
import {
|
|
13
14
|
CompassIcon,
|
|
@@ -239,10 +240,11 @@ export function MingoWelcome({
|
|
|
239
240
|
input. The wrapper is `relative` so the scroll-fade gradients can
|
|
240
241
|
overlay the top/bottom edges. */}
|
|
241
242
|
<div className="relative flex flex-1 min-h-0 flex-col">
|
|
242
|
-
<
|
|
243
|
-
|
|
243
|
+
<OverlayScrollArea
|
|
244
|
+
viewportRef={scrollRef}
|
|
244
245
|
onScroll={updateScrollFade}
|
|
245
|
-
className="flex
|
|
246
|
+
className="flex-1 min-h-0"
|
|
247
|
+
contentClassName="flex min-h-full flex-col gap-[var(--spacing-system-m)] overscroll-contain"
|
|
246
248
|
>
|
|
247
249
|
{/* Greeting — grows to fill (`flex-1`) so it centres vertically,
|
|
248
250
|
keeping the grid anchored at the bottom of the scroll area. Default
|
|
@@ -261,7 +263,7 @@ export function MingoWelcome({
|
|
|
261
263
|
<p className="text-h4 text-ods-text-secondary">{subtitle}</p>
|
|
262
264
|
</div>
|
|
263
265
|
</div>
|
|
264
|
-
</
|
|
266
|
+
</OverlayScrollArea>
|
|
265
267
|
|
|
266
268
|
{/* Edge scroll-fades — visible only when content is hidden beyond them.
|
|
267
269
|
Fade into the panel's dark `ods-bg` surface (the default color), matching
|
|
@@ -339,6 +341,7 @@ export function MingoWelcome({
|
|
|
339
341
|
}))}
|
|
340
342
|
rows={4}
|
|
341
343
|
pauseOnHover
|
|
344
|
+
dragScroll
|
|
342
345
|
fade={['left', 'right']}
|
|
343
346
|
fadeSize={{ left: 32 }}
|
|
344
347
|
fadeColor="var(--color-bg)"
|
|
@@ -71,6 +71,10 @@ export interface QuickActionWallProps {
|
|
|
71
71
|
/** Marquee on/off (auto-off when content fits / reduced motion / loading). */
|
|
72
72
|
animate?: boolean
|
|
73
73
|
pauseOnHover?: boolean
|
|
74
|
+
/** Opt-in manual drag + wheel scroll (forwarded to {@link MarqueeWall}) — the
|
|
75
|
+
* auto-marquee pauses while the user drags/wheels and resumes from there.
|
|
76
|
+
* Enabled on the embeddable-chat quick-action walls. */
|
|
77
|
+
dragScroll?: boolean
|
|
74
78
|
fade?: MarqueeWallFadeEdge | ReadonlyArray<MarqueeWallFadeEdge>
|
|
75
79
|
/** Color behind the wall — the fades blend into it. */
|
|
76
80
|
fadeColor?: string
|
|
@@ -139,6 +143,7 @@ export function QuickActionWall({
|
|
|
139
143
|
speed,
|
|
140
144
|
animate = true,
|
|
141
145
|
pauseOnHover,
|
|
146
|
+
dragScroll = false,
|
|
142
147
|
fade,
|
|
143
148
|
fadeColor,
|
|
144
149
|
fadeSize,
|
|
@@ -206,6 +211,7 @@ export function QuickActionWall({
|
|
|
206
211
|
speed={speed}
|
|
207
212
|
animate={animate && !loading}
|
|
208
213
|
pauseOnHover={pauseOnHover}
|
|
214
|
+
dragScroll={dragScroll}
|
|
209
215
|
copyGap={gap}
|
|
210
216
|
contentClassName={cn('flex items-center', contentClassName)}
|
|
211
217
|
contentStyle={{ gap }}
|
|
@@ -229,6 +235,7 @@ export function QuickActionWall({
|
|
|
229
235
|
// Skeleton walls stay put — the marquee starts when real chips land.
|
|
230
236
|
animate={animate && !loading}
|
|
231
237
|
pauseOnHover={pauseOnHover}
|
|
238
|
+
dragScroll={dragScroll}
|
|
232
239
|
fade={fade}
|
|
233
240
|
fadeColor={fadeColor}
|
|
234
241
|
fadeSize={fadeSize}
|
|
@@ -222,6 +222,23 @@ export interface ChatMessageListProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
222
222
|
typingMessage?: string
|
|
223
223
|
smoothScroll?: boolean
|
|
224
224
|
autoScroll?: boolean
|
|
225
|
+
/** `overscroll-behavior: contain` on the scroller (default true) — stops
|
|
226
|
+
* wheel/touch scroll from chaining to the page at the thread's edges (the
|
|
227
|
+
* deck / drawer need this). Passive in-page demo chats set `false` so the
|
|
228
|
+
* page keeps scrolling normally over the non-interactive thread. */
|
|
229
|
+
overscrollContain?: boolean
|
|
230
|
+
/** Deterministic stick-to-bottom for PASSIVE scripted replays (the in-page
|
|
231
|
+
* Fae/Mingo demos). Whenever the scroll HEIGHT changes — a streamed token
|
|
232
|
+
* grows the thread, or a new conversation replaces it — the scroller is
|
|
233
|
+
* hard-snapped to its full height, so the newest streamed line is always
|
|
234
|
+
* visible even though no human is at the keyboard. Unlike `autoScroll` (the
|
|
235
|
+
* library's smart follow, which only tracks while the viewer is "at bottom"
|
|
236
|
+
* and is unreliable for an assistant-only stream from a cold, non-bottom
|
|
237
|
+
* mount), this pins on real growth without that gate. A same-height idle
|
|
238
|
+
* re-render does NOT re-pin, so once the stream settles the viewer can freely
|
|
239
|
+
* scroll up. Pair with `autoScroll={false}` so the library's spring doesn't
|
|
240
|
+
* run in parallel. */
|
|
241
|
+
pinBottom?: boolean
|
|
225
242
|
showAvatars?: boolean
|
|
226
243
|
/** Same `fullWidth` semantics as `ChatHeaderProps.fullWidth` — drops
|
|
227
244
|
* the inner content wrapper's `max-w-ods-content-narrow` so messages
|
|
@@ -45,6 +45,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
45
45
|
import { cn } from '../../utils/cn';
|
|
46
46
|
import { NEAR_VIEWPORT_ROOT_MARGIN } from '../../hooks/use-near-viewport';
|
|
47
47
|
import { useMarqueeEngine } from '../../hooks/ui/use-marquee-engine';
|
|
48
|
+
import { useResetOnPageHidden } from '../../hooks/ui/use-reset-on-page-hidden';
|
|
48
49
|
import { useSuppressCloneFocus } from '../../hooks/ui/use-suppress-clone-focus';
|
|
49
50
|
import { Button } from '../ui/button';
|
|
50
51
|
import { SECTION_HEADING_CLASS } from '../layout/page-heading';
|
|
@@ -424,6 +425,20 @@ export function CardsStrip<T = unknown>(props: CardsStripProps<T>): React.ReactE
|
|
|
424
425
|
const current = activeKeyRef.current;
|
|
425
426
|
if (current !== null) deactivate(current);
|
|
426
427
|
}, [deactivate]);
|
|
428
|
+
// Unconditional hover-clear (any pointer type) — the self-heal for a MISSED
|
|
429
|
+
// `pointerleave`. A leave can be swallowed by a tab blur, an interrupted
|
|
430
|
+
// pointer (pointercancel), or an overlay mounting under the cursor, leaving
|
|
431
|
+
// `inside` stuck true so the marquee freezes FOREVER ("gets stuck every once
|
|
432
|
+
// in a while"). Reset it on pointercancel + whenever the tab hides / the
|
|
433
|
+
// window loses focus; the next real hover re-arms it. Can only un-stick.
|
|
434
|
+
const clearHover = useCallback(() => {
|
|
435
|
+
hoverPointerRef.current.inside = false;
|
|
436
|
+
const current = activeKeyRef.current;
|
|
437
|
+
if (current !== null) deactivate(current);
|
|
438
|
+
}, [deactivate]);
|
|
439
|
+
// Shared SSOT self-heal: un-stick the hover flag whenever the tab hides / the
|
|
440
|
+
// window loses focus (a `pointerleave`/`pointercancel` can be swallowed).
|
|
441
|
+
useResetOnPageHidden(clearHover);
|
|
427
442
|
/** Re-sync hover only when the track actually moved under the pointer.
|
|
428
443
|
* KNOWN HOT-PATH COST (intentional): while the marquee runs with the
|
|
429
444
|
* pointer parked over strip whitespace (no card → not paused), scrollLeft
|
|
@@ -654,6 +669,7 @@ export function CardsStrip<T = unknown>(props: CardsStripProps<T>): React.ReactE
|
|
|
654
669
|
onPointerEnter={onHoverPointerEnter}
|
|
655
670
|
onPointerMove={onHoverPointerMove}
|
|
656
671
|
onPointerLeave={onHoverPointerLeave}
|
|
672
|
+
onPointerCancel={clearHover}
|
|
657
673
|
onScroll={onSeamWarp}
|
|
658
674
|
>
|
|
659
675
|
<div ref={trackRef} data-copies={copies} className="flex w-max items-stretch gap-4">
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { useEffect, useRef } from 'react'
|
|
4
|
+
import { OverlayScrollArea } from '../../ui/overlay-scroll-area'
|
|
4
5
|
import { BellOffIcon } from '../../icons-v2-generated/interface/bell-off-icon'
|
|
5
6
|
import { ClockHistoryIcon, ArrowRightUpIcon } from '../../icons-v2-generated'
|
|
6
7
|
import { useAppLayoutDrawerContainer } from '../../navigation/app-layout-context'
|
|
@@ -189,9 +190,10 @@ function DrawerScrollList({
|
|
|
189
190
|
|
|
190
191
|
const isEmpty = unreadNotifications.length === 0
|
|
191
192
|
return (
|
|
192
|
-
<
|
|
193
|
-
|
|
194
|
-
className="flex
|
|
193
|
+
<OverlayScrollArea
|
|
194
|
+
viewportRef={scrollRef}
|
|
195
|
+
className="flex-1 min-h-0"
|
|
196
|
+
contentClassName="flex flex-col gap-[var(--spacing-system-xs)] px-[var(--spacing-system-m)]"
|
|
195
197
|
>
|
|
196
198
|
{isEmpty && !isLoadingMore ? (
|
|
197
199
|
<EmptyState />
|
|
@@ -214,7 +216,7 @@ function DrawerScrollList({
|
|
|
214
216
|
{loadMore && hasMore && <div ref={sentinelRef} className="h-1" aria-hidden="true" />}
|
|
215
217
|
</>
|
|
216
218
|
)}
|
|
217
|
-
</
|
|
219
|
+
</OverlayScrollArea>
|
|
218
220
|
)
|
|
219
221
|
}
|
|
220
222
|
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
XmarkIcon,
|
|
22
22
|
} from '../../icons-v2-generated'
|
|
23
23
|
import { useTrackerClock } from './use-tracker-clock'
|
|
24
|
+
import { OverlayScrollArea } from '../../ui/overlay-scroll-area'
|
|
24
25
|
import type { TimeTrackerData, TimeTrackerEntry, TimeTrackerStatus } from './types'
|
|
25
26
|
|
|
26
27
|
interface CustomerAutocompleteOption extends AutocompleteOption {
|
|
@@ -149,11 +150,12 @@ export function TimeTrackerPanel({
|
|
|
149
150
|
const visibleEntries = lastEntries.slice(0, 3)
|
|
150
151
|
|
|
151
152
|
return (
|
|
152
|
-
<
|
|
153
|
+
<OverlayScrollArea
|
|
153
154
|
className={cn(
|
|
154
|
-
'
|
|
155
|
+
'max-h-[calc(100vh-6rem)] w-full rounded-md border border-ods-border bg-ods-card',
|
|
155
156
|
className,
|
|
156
157
|
)}
|
|
158
|
+
contentClassName="relative flex flex-col gap-[var(--spacing-system-l)] p-[var(--spacing-system-m)]"
|
|
157
159
|
>
|
|
158
160
|
<Button
|
|
159
161
|
variant="transparent"
|
|
@@ -314,7 +316,7 @@ export function TimeTrackerPanel({
|
|
|
314
316
|
<Button variant="outline" fullWidth onClick={onClose} className="md:hidden">
|
|
315
317
|
Close
|
|
316
318
|
</Button>
|
|
317
|
-
</
|
|
319
|
+
</OverlayScrollArea>
|
|
318
320
|
)
|
|
319
321
|
}
|
|
320
322
|
|
|
@@ -4,6 +4,7 @@ import React from 'react'
|
|
|
4
4
|
import { cn } from '../../utils/cn'
|
|
5
5
|
import type { ActionsMenuGroup } from '../ui/actions-menu'
|
|
6
6
|
import { PageActions, type PageActionButton } from '../ui/page-actions'
|
|
7
|
+
import { OverlayScrollArea } from '../ui/overlay-scroll-area'
|
|
7
8
|
import { BackButton } from './back-button'
|
|
8
9
|
|
|
9
10
|
// Legacy interface for backward compatibility (layout version)
|
|
@@ -393,7 +394,7 @@ function renderAdvancedPageContainer({
|
|
|
393
394
|
|
|
394
395
|
switch (variant) {
|
|
395
396
|
case 'detail':
|
|
396
|
-
return cn('flex-1
|
|
397
|
+
return cn('flex-1 min-h-0', mobilePadding, contentClassName)
|
|
397
398
|
case 'list':
|
|
398
399
|
return cn('flex flex-col gap-4 md:gap-6', mobilePadding, contentClassName)
|
|
399
400
|
case 'form':
|
|
@@ -407,10 +408,17 @@ function renderAdvancedPageContainer({
|
|
|
407
408
|
return (
|
|
408
409
|
<div className={getContainerClasses()}>
|
|
409
410
|
{renderHeader()}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
411
|
+
|
|
412
|
+
{variant === 'detail' ? (
|
|
413
|
+
// The only scrolling variant — standardized overlay scrollbar.
|
|
414
|
+
<OverlayScrollArea className={getContentClasses()}>
|
|
415
|
+
{children}
|
|
416
|
+
</OverlayScrollArea>
|
|
417
|
+
) : (
|
|
418
|
+
<div className={getContentClasses()}>
|
|
419
|
+
{children}
|
|
420
|
+
</div>
|
|
421
|
+
)}
|
|
414
422
|
</div>
|
|
415
423
|
)
|
|
416
424
|
}
|
|
@@ -7,6 +7,7 @@ import { X } from "lucide-react"
|
|
|
7
7
|
|
|
8
8
|
import { cn } from "../../utils/cn"
|
|
9
9
|
import { useHeaderHeight } from "../../hooks/ui/use-header-height"
|
|
10
|
+
import { OverlayScrollArea } from "./overlay-scroll-area"
|
|
10
11
|
|
|
11
12
|
/** Unified overlay backdrop — dimmed, no blur. Single source of truth for
|
|
12
13
|
* every full-screen backdrop (Drawer, AppLayoutDrawer, MobileBurgerMenu,
|
|
@@ -530,12 +531,16 @@ DrawerDescription.displayName = "DrawerDescription"
|
|
|
530
531
|
|
|
531
532
|
const DrawerBody = ({
|
|
532
533
|
className,
|
|
534
|
+
children,
|
|
533
535
|
...props
|
|
534
536
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
535
|
-
<
|
|
536
|
-
className={cn("flex
|
|
537
|
+
<OverlayScrollArea
|
|
538
|
+
className={cn("flex-1 min-h-0", className)}
|
|
539
|
+
contentClassName="flex flex-col gap-4"
|
|
537
540
|
{...props}
|
|
538
|
-
|
|
541
|
+
>
|
|
542
|
+
{children}
|
|
543
|
+
</OverlayScrollArea>
|
|
539
544
|
)
|
|
540
545
|
DrawerBody.displayName = "DrawerBody"
|
|
541
546
|
|