@flamingo-stack/openframe-frontend-core 0.0.293 → 0.0.294-snapshot.20260619145000

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.
Files changed (61) hide show
  1. package/dist/{chunk-X3TSMCKX.cjs → chunk-3XIB4VKS.cjs} +4 -4
  2. package/dist/{chunk-X3TSMCKX.cjs.map → chunk-3XIB4VKS.cjs.map} +1 -1
  3. package/dist/{chunk-6G2INVGG.cjs → chunk-5O6N3BKR.cjs} +3 -3
  4. package/dist/{chunk-6G2INVGG.cjs.map → chunk-5O6N3BKR.cjs.map} +1 -1
  5. package/dist/{chunk-DOMJSNXW.js → chunk-6BZEAPNT.js} +37 -35
  6. package/dist/chunk-6BZEAPNT.js.map +1 -0
  7. package/dist/{chunk-TYMUKFP2.cjs → chunk-6IBA2MQV.cjs} +23 -23
  8. package/dist/{chunk-TYMUKFP2.cjs.map → chunk-6IBA2MQV.cjs.map} +1 -1
  9. package/dist/{chunk-FJDPUPXC.js → chunk-7KXD7CWD.js} +2 -2
  10. package/dist/{chunk-JSOMFVEV.cjs → chunk-A2YL7QRX.cjs} +25 -25
  11. package/dist/{chunk-JSOMFVEV.cjs.map → chunk-A2YL7QRX.cjs.map} +1 -1
  12. package/dist/{chunk-VTY7S2QG.cjs → chunk-ETACGX2A.cjs} +5 -5
  13. package/dist/{chunk-VTY7S2QG.cjs.map → chunk-ETACGX2A.cjs.map} +1 -1
  14. package/dist/{chunk-BRNHX6C6.js → chunk-HOVJGXF7.js} +2 -2
  15. package/dist/{chunk-RJL6PIOK.cjs → chunk-INDQMNP6.cjs} +37 -35
  16. package/dist/chunk-INDQMNP6.cjs.map +1 -0
  17. package/dist/{chunk-SOJCR63T.js → chunk-J3RDKZ32.js} +2 -2
  18. package/dist/{chunk-YICTMMXP.js → chunk-OOKKGOPQ.js} +2 -2
  19. package/dist/{chunk-2U2M2TG2.js → chunk-YD43AKI5.js} +2 -2
  20. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  21. package/dist/components/chat/chat-ticket-list.d.ts.map +1 -1
  22. package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +0 -5
  23. package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
  24. package/dist/components/chat/hooks/use-realtime-chunk-processor.d.ts.map +1 -1
  25. package/dist/components/chat/index.cjs +2 -2
  26. package/dist/components/chat/index.js +1 -1
  27. package/dist/components/chat/types/api.types.d.ts +0 -6
  28. package/dist/components/chat/types/api.types.d.ts.map +1 -1
  29. package/dist/components/contact/index.cjs +3 -3
  30. package/dist/components/contact/index.js +2 -2
  31. package/dist/components/embeds/index.cjs +3 -3
  32. package/dist/components/embeds/index.js +2 -2
  33. package/dist/components/faq/index.cjs +3 -3
  34. package/dist/components/faq/index.js +2 -2
  35. package/dist/components/features/index.cjs +2 -2
  36. package/dist/components/features/index.js +1 -1
  37. package/dist/components/index.cjs +46 -46
  38. package/dist/components/index.js +5 -5
  39. package/dist/components/navigation/index.cjs +2 -2
  40. package/dist/components/navigation/index.js +1 -1
  41. package/dist/components/related-content/index.cjs +3 -3
  42. package/dist/components/related-content/index.js +2 -2
  43. package/dist/components/tickets/index.cjs +45 -45
  44. package/dist/components/tickets/index.js +3 -3
  45. package/dist/components/ui/index.cjs +2 -2
  46. package/dist/components/ui/index.js +1 -1
  47. package/dist/index.cjs +2 -2
  48. package/dist/index.js +1 -1
  49. package/package.json +1 -1
  50. package/src/components/chat/chat-message-enhanced.tsx +8 -5
  51. package/src/components/chat/chat-ticket-list.tsx +25 -16
  52. package/src/components/chat/hooks/use-nats-chat-adapter.ts +0 -8
  53. package/src/components/chat/hooks/use-realtime-chunk-processor.ts +1 -12
  54. package/src/components/chat/types/api.types.ts +0 -6
  55. package/dist/chunk-DOMJSNXW.js.map +0 -1
  56. package/dist/chunk-RJL6PIOK.cjs.map +0 -1
  57. /package/dist/{chunk-FJDPUPXC.js.map → chunk-7KXD7CWD.js.map} +0 -0
  58. /package/dist/{chunk-BRNHX6C6.js.map → chunk-HOVJGXF7.js.map} +0 -0
  59. /package/dist/{chunk-SOJCR63T.js.map → chunk-J3RDKZ32.js.map} +0 -0
  60. /package/dist/{chunk-YICTMMXP.js.map → chunk-OOKKGOPQ.js.map} +0 -0
  61. /package/dist/{chunk-2U2M2TG2.js.map → chunk-YD43AKI5.js.map} +0 -0
@@ -13,13 +13,6 @@ export interface ChatTicketListProps extends React.HTMLAttributes<HTMLDivElement
13
13
  skeletonCount?: number
14
14
  }
15
15
 
16
- function getMask(top: boolean, bottom: boolean) {
17
- if (top && bottom) return 'linear-gradient(to bottom, transparent, black 64px, black calc(100% - 64px), transparent)'
18
- if (top) return 'linear-gradient(to bottom, transparent, black 64px)'
19
- if (bottom) return 'linear-gradient(to bottom, black calc(100% - 64px), transparent)'
20
- return 'none'
21
- }
22
-
23
16
  const ChatTicketList = React.forwardRef<HTMLDivElement, ChatTicketListProps>(
24
17
  ({ className, tickets, onTicketClick, isLoading = false, skeletonCount = 5, ...props }, ref) => {
25
18
  const scrollRef = React.useRef<HTMLDivElement>(null)
@@ -54,24 +47,17 @@ const ChatTicketList = React.forwardRef<HTMLDivElement, ChatTicketListProps>(
54
47
 
55
48
  if (tickets.length === 0) return null
56
49
 
57
- const mask = getMask(fadeTop, fadeBottom)
58
-
59
50
  return (
60
51
  <div ref={ref} className={cn("flex flex-col gap-2 min-h-0", className)} {...props}>
61
52
  <p className="text-h5 text-ods-text-secondary shrink-0">Your Chats:</p>
62
53
  <div
63
54
  className={cn(
64
- "border-x border-ods-border flex-1 min-h-0 overflow-hidden",
55
+ "relative border-x border-ods-border flex-1 min-h-0 overflow-hidden",
65
56
  !fadeTop && "border-t rounded-t-md",
66
57
  !fadeBottom && "border-b rounded-b-md",
67
58
  )}
68
59
  >
69
- <div
70
- ref={scrollRef}
71
- className="overflow-y-auto h-full"
72
- onScroll={updateFade}
73
- style={mask !== 'none' ? { maskImage: mask, WebkitMaskImage: mask } : undefined}
74
- >
60
+ <div ref={scrollRef} className="overflow-y-auto h-full" onScroll={updateFade}>
75
61
  {tickets.map((ticket) => (
76
62
  <ChatTicketItem
77
63
  key={ticket.id}
@@ -80,6 +66,29 @@ const ChatTicketList = React.forwardRef<HTMLDivElement, ChatTicketListProps>(
80
66
  />
81
67
  ))}
82
68
  </div>
69
+
70
+ {/* Scroll-fade overlays — tinted with the page background so edge
71
+ tickets fade into the surface behind the list in BOTH themes. The
72
+ token flips with `data-theme` (light #fafafa, dark #161616),
73
+ unlike the previous alpha mask. Card-coloured fade (#ffffff) was
74
+ invisible in light theme against the items' own bg. Same token as
75
+ guide-welcome. */}
76
+ <div
77
+ aria-hidden
78
+ className={cn(
79
+ 'pointer-events-none absolute inset-x-0 top-0 h-16 transition-opacity duration-150',
80
+ fadeTop ? 'opacity-100' : 'opacity-0',
81
+ )}
82
+ style={{ background: 'linear-gradient(0deg, transparent 0%, var(--color-bg) 100%)' }}
83
+ />
84
+ <div
85
+ aria-hidden
86
+ className={cn(
87
+ 'pointer-events-none absolute inset-x-0 bottom-0 h-16 transition-opacity duration-150',
88
+ fadeBottom ? 'opacity-100' : 'opacity-0',
89
+ )}
90
+ style={{ background: 'linear-gradient(180deg, transparent 0%, var(--color-bg) 100%)' }}
91
+ />
83
92
  </div>
84
93
  </div>
85
94
  )
@@ -204,12 +204,6 @@ export interface UseNatsChatAdapterConfig {
204
204
  */
205
205
  topics?: NatsMessageType[]
206
206
 
207
- /**
208
- * Whether THINKING chunks are surfaced as segments. Default `false`
209
- * (parity with the existing `useRealtimeChunkProcessor` default).
210
- */
211
- enableThinking?: boolean
212
-
213
207
  /**
214
208
  * Mirrors `UseRealtimeChunkProcessorOptions.batchApprovalsEnabled`.
215
209
  * Default `true` — single batch card per APPROVAL_REQUEST with
@@ -426,7 +420,6 @@ export function useNatsChatAdapter(
426
420
  publishUserMessage,
427
421
  fetchChunks,
428
422
  topics,
429
- enableThinking,
430
423
  batchApprovalsEnabled,
431
424
  fetchDialogs,
432
425
  fetchDialogMessages,
@@ -614,7 +607,6 @@ export function useNatsChatAdapter(
614
607
  onApprove: accumApprove,
615
608
  onReject: accumReject,
616
609
  },
617
- enableThinking,
618
610
  batchApprovalsEnabled,
619
611
  })
620
612
 
@@ -11,7 +11,6 @@ import {
11
11
  MessageSegmentAccumulator,
12
12
  createMessageSegmentAccumulator,
13
13
  } from '../utils/message-segment-accumulator'
14
- import { MESSAGE_TYPE } from '../types'
15
14
  import type { UseRealtimeChunkProcessorReturn, UseRealtimeChunkProcessorOptions, ChatApprovalStatus, PendingToolCallData, MessageSegment, SegmentsUpdateMetadata } from '../types'
16
15
  import { getCommandText } from '../utils/tool-call-helpers'
17
16
 
@@ -31,7 +30,6 @@ export function useRealtimeChunkProcessor(
31
30
  displayApprovalTypes = ['CLIENT'],
32
31
  approvalStatuses = {},
33
32
  initialState,
34
- enableThinking = false,
35
33
  // Owned by the consumer (e.g. oss-tenant chat client / openframe-frontend
36
34
  // tickets view). Default ON so consumers that haven't wired the flag yet
37
35
  // get the new batch UI; pass `false` explicitly to fall back to legacy.
@@ -93,15 +91,6 @@ export function useRealtimeChunkProcessor(
93
91
 
94
92
  const processChunk = useCallback(
95
93
  (chunk: unknown) => {
96
- if (
97
- !enableThinking &&
98
- chunk &&
99
- typeof chunk === 'object' &&
100
- (chunk as { type?: string }).type === MESSAGE_TYPE.THINKING
101
- ) {
102
- return
103
- }
104
-
105
94
  const action = parseChunkToAction(chunk)
106
95
  if (!action) return
107
96
 
@@ -396,7 +385,7 @@ export function useRealtimeChunkProcessor(
396
385
  break
397
386
  }
398
387
  },
399
- [callbacks, displayApprovalTypes, approvalStatuses, initialState, enableThinking]
388
+ [callbacks, displayApprovalTypes, approvalStatuses, initialState]
400
389
  )
401
390
 
402
391
  const getSegments = useCallback(() => {
@@ -232,12 +232,6 @@ export interface UseRealtimeChunkProcessorOptions {
232
232
  { command: string; explanation?: string; approvalType: string; toolCalls?: PendingToolCallData[] }
233
233
  >
234
234
  }
235
- /**
236
- * When true, THINKING chunks are processed into thinking segments. When false
237
- * (default), they are dropped before parsing — they never enter the
238
- * accumulator or store.
239
- */
240
- enableThinking?: boolean
241
235
  /**
242
236
  * Consumer-owned (e.g. set in `openframe-oss-tenant` chat client via the
243
237
  * `'batch-approvals'` feature flag and forwarded here). The lib does NOT