@flamingo-stack/openframe-frontend-core 0.0.210 → 0.0.212-snapshot.20260528112413

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 (128) hide show
  1. package/dist/{chunk-VBFOCTMD.cjs → chunk-35XIT2CF.cjs} +17 -17
  2. package/dist/{chunk-VBFOCTMD.cjs.map → chunk-35XIT2CF.cjs.map} +1 -1
  3. package/dist/{chunk-ATEUJQKU.js → chunk-3JWIJJ44.js} +2 -2
  4. package/dist/chunk-CZR7ARBA.js +698 -0
  5. package/dist/chunk-CZR7ARBA.js.map +1 -0
  6. package/dist/{chunk-UYQOPC57.js → chunk-HICZPTRR.js} +4 -351
  7. package/dist/chunk-HICZPTRR.js.map +1 -0
  8. package/dist/{chunk-WJBPLMBX.js → chunk-IK2X5YJU.js} +3 -3
  9. package/dist/{chunk-MDTIOPVS.cjs → chunk-OTKJASSX.cjs} +26 -26
  10. package/dist/{chunk-MDTIOPVS.cjs.map → chunk-OTKJASSX.cjs.map} +1 -1
  11. package/dist/chunk-OZ3GH6OQ.cjs +698 -0
  12. package/dist/chunk-OZ3GH6OQ.cjs.map +1 -0
  13. package/dist/{chunk-6RZYJICV.cjs → chunk-P5EE2VJX.cjs} +1 -1
  14. package/dist/chunk-P5EE2VJX.cjs.map +1 -0
  15. package/dist/{chunk-EH3RWVF3.cjs → chunk-WT5JV2GS.cjs} +8 -355
  16. package/dist/chunk-WT5JV2GS.cjs.map +1 -0
  17. package/dist/{chunk-TWKPYZNQ.cjs → chunk-ZDF6F7ED.cjs} +569 -694
  18. package/dist/chunk-ZDF6F7ED.cjs.map +1 -0
  19. package/dist/{chunk-7L4DWM7P.js → chunk-ZG2YY5E7.js} +1 -1
  20. package/dist/chunk-ZG2YY5E7.js.map +1 -0
  21. package/dist/{chunk-R5RNRH62.js → chunk-ZTJVRSN5.js} +422 -547
  22. package/dist/chunk-ZTJVRSN5.js.map +1 -0
  23. package/dist/components/chat/hooks/use-chat-identity.d.ts +3 -3
  24. package/dist/components/chat/hooks/use-chat-identity.d.ts.map +1 -1
  25. package/dist/components/chat/hooks/use-jetstream-dialog-subscription.d.ts.map +1 -1
  26. package/dist/components/chat/hooks/use-nats-dialog-subscription.d.ts +0 -9
  27. package/dist/components/chat/hooks/use-nats-dialog-subscription.d.ts.map +1 -1
  28. package/dist/components/chat/index.cjs +6 -5
  29. package/dist/components/chat/index.cjs.map +1 -1
  30. package/dist/components/chat/index.js +5 -4
  31. package/dist/components/contact/index.cjs +7 -6
  32. package/dist/components/contact/index.cjs.map +1 -1
  33. package/dist/components/contact/index.js +6 -5
  34. package/dist/components/features/index.cjs +6 -5
  35. package/dist/components/features/index.cjs.map +1 -1
  36. package/dist/components/features/index.js +5 -4
  37. package/dist/components/features/notifications/index.d.ts +2 -2
  38. package/dist/components/features/notifications/index.d.ts.map +1 -1
  39. package/dist/components/features/notifications/notifications-context.d.ts +16 -1
  40. package/dist/components/features/notifications/notifications-context.d.ts.map +1 -1
  41. package/dist/components/features/notifications/types.d.ts +4 -0
  42. package/dist/components/features/notifications/types.d.ts.map +1 -1
  43. package/dist/components/footer-waitlist-button.d.ts +21 -2
  44. package/dist/components/footer-waitlist-button.d.ts.map +1 -1
  45. package/dist/components/index.cjs +93 -96
  46. package/dist/components/index.cjs.map +1 -1
  47. package/dist/components/index.js +17 -20
  48. package/dist/components/index.js.map +1 -1
  49. package/dist/components/navigation/app-header.d.ts.map +1 -1
  50. package/dist/components/navigation/index.cjs +6 -5
  51. package/dist/components/navigation/index.cjs.map +1 -1
  52. package/dist/components/navigation/index.js +5 -4
  53. package/dist/components/navigation/sticky-section-nav.d.ts.map +1 -1
  54. package/dist/components/tickets/help-center-card.d.ts.map +1 -1
  55. package/dist/components/tickets/index.cjs +144 -102
  56. package/dist/components/tickets/index.cjs.map +1 -1
  57. package/dist/components/tickets/index.js +98 -56
  58. package/dist/components/tickets/index.js.map +1 -1
  59. package/dist/components/tickets/ticket-row.d.ts.map +1 -1
  60. package/dist/components/ui/index.cjs +6 -5
  61. package/dist/components/ui/index.cjs.map +1 -1
  62. package/dist/components/ui/index.js +5 -4
  63. package/dist/contexts/chat-runtime-context.d.ts +6 -3
  64. package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
  65. package/dist/contexts/index.cjs +2 -2
  66. package/dist/contexts/index.js +1 -1
  67. package/dist/embed-shims/index.cjs +3 -3
  68. package/dist/embed-shims/index.cjs.map +1 -1
  69. package/dist/embed-shims/index.js +4 -4
  70. package/dist/hooks/index.cjs +3 -2
  71. package/dist/hooks/index.cjs.map +1 -1
  72. package/dist/hooks/index.js +2 -1
  73. package/dist/index.cjs +8 -5
  74. package/dist/index.cjs.map +1 -1
  75. package/dist/index.js +7 -4
  76. package/dist/nats/index.cjs +28 -346
  77. package/dist/nats/index.cjs.map +1 -1
  78. package/dist/nats/index.d.ts +3 -0
  79. package/dist/nats/index.d.ts.map +1 -1
  80. package/dist/nats/index.js +30 -346
  81. package/dist/nats/index.js.map +1 -1
  82. package/dist/nats/nats-provider.d.ts +28 -0
  83. package/dist/nats/nats-provider.d.ts.map +1 -0
  84. package/dist/nats/nats.d.ts +1 -0
  85. package/dist/nats/nats.d.ts.map +1 -1
  86. package/dist/nats/shared-connection.d.ts +73 -0
  87. package/dist/nats/shared-connection.d.ts.map +1 -0
  88. package/dist/nats/use-nats-subscription.d.ts +18 -0
  89. package/dist/nats/use-nats-subscription.d.ts.map +1 -0
  90. package/dist/utils/index.cjs +10 -0
  91. package/dist/utils/index.cjs.map +1 -1
  92. package/dist/utils/index.d.ts +1 -0
  93. package/dist/utils/index.d.ts.map +1 -1
  94. package/dist/utils/index.js +10 -1
  95. package/dist/utils/index.js.map +1 -1
  96. package/dist/utils/scroll-into-view.d.ts +63 -0
  97. package/dist/utils/scroll-into-view.d.ts.map +1 -0
  98. package/package.json +1 -1
  99. package/src/components/chat/hooks/use-chat-identity.ts +8 -7
  100. package/src/components/chat/hooks/use-jetstream-dialog-subscription.ts +60 -207
  101. package/src/components/chat/hooks/use-nats-dialog-subscription.ts +71 -214
  102. package/src/components/features/notifications/index.ts +2 -1
  103. package/src/components/features/notifications/notifications-context.tsx +104 -6
  104. package/src/components/features/notifications/types.ts +5 -0
  105. package/src/components/footer-waitlist-button.tsx +33 -16
  106. package/src/components/navigation/app-header.tsx +7 -9
  107. package/src/components/navigation/sticky-section-nav.tsx +6 -4
  108. package/src/components/tickets/help-center-card.tsx +55 -1
  109. package/src/components/tickets/help-center-list.tsx +9 -1
  110. package/src/components/tickets/ticket-detail-drawer.tsx +19 -4
  111. package/src/components/tickets/ticket-row.tsx +30 -19
  112. package/src/contexts/chat-runtime-context.tsx +6 -3
  113. package/src/nats/index.ts +3 -0
  114. package/src/nats/nats-provider.tsx +146 -0
  115. package/src/nats/nats.ts +2 -0
  116. package/src/nats/shared-connection.ts +285 -0
  117. package/src/nats/use-nats-subscription.ts +99 -0
  118. package/src/stories/EmbeddableChat.stories.tsx +1 -1
  119. package/src/utils/index.ts +12 -0
  120. package/src/utils/scroll-into-view.ts +74 -0
  121. package/dist/chunk-6RZYJICV.cjs.map +0 -1
  122. package/dist/chunk-7L4DWM7P.js.map +0 -1
  123. package/dist/chunk-EH3RWVF3.cjs.map +0 -1
  124. package/dist/chunk-R5RNRH62.js.map +0 -1
  125. package/dist/chunk-TWKPYZNQ.cjs.map +0 -1
  126. package/dist/chunk-UYQOPC57.js.map +0 -1
  127. /package/dist/{chunk-ATEUJQKU.js.map → chunk-3JWIJJ44.js.map} +0 -0
  128. /package/dist/{chunk-WJBPLMBX.js.map → chunk-IK2X5YJU.js.map} +0 -0
@@ -9,11 +9,11 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkVBFOCTMDcjs = require('../../chunk-VBFOCTMD.cjs');
12
+ var _chunk35XIT2CFcjs = require('../../chunk-35XIT2CF.cjs');
13
13
  require('../../chunk-VFKQMAUF.cjs');
14
14
 
15
15
 
16
- var _chunkMDTIOPVScjs = require('../../chunk-MDTIOPVS.cjs');
16
+ var _chunkOTKJASSXcjs = require('../../chunk-OTKJASSX.cjs');
17
17
 
18
18
 
19
19
 
@@ -35,22 +35,24 @@ var _chunkMDTIOPVScjs = require('../../chunk-MDTIOPVS.cjs');
35
35
 
36
36
 
37
37
 
38
- var _chunkTWKPYZNQcjs = require('../../chunk-TWKPYZNQ.cjs');
39
38
 
39
+ var _chunkZDF6F7EDcjs = require('../../chunk-ZDF6F7ED.cjs');
40
40
 
41
- var _chunkEH3RWVF3cjs = require('../../chunk-EH3RWVF3.cjs');
41
+
42
+ var _chunkWT5JV2GScjs = require('../../chunk-WT5JV2GS.cjs');
42
43
  require('../../chunk-24KCAECR.cjs');
43
44
  require('../../chunk-65CPJ4SX.cjs');
44
45
  require('../../chunk-XQFFGR6U.cjs');
45
- require('../../chunk-6RZYJICV.cjs');
46
+ require('../../chunk-P5EE2VJX.cjs');
46
47
  require('../../chunk-27APPAJN.cjs');
48
+ require('../../chunk-XL4V2PYG.cjs');
47
49
  require('../../chunk-BZFW3FOF.cjs');
48
50
 
49
51
 
50
52
 
51
53
 
52
54
  var _chunkG7UE6RKVcjs = require('../../chunk-G7UE6RKV.cjs');
53
- require('../../chunk-XL4V2PYG.cjs');
55
+ require('../../chunk-OZ3GH6OQ.cjs');
54
56
 
55
57
 
56
58
 
@@ -97,7 +99,7 @@ function TicketOpenForm({
97
99
  }) {
98
100
  const [subject, setSubject] = _react.useState.call(void 0, "");
99
101
  const [content, setContent] = _react.useState.call(void 0, "");
100
- const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkTWKPYZNQcjs.useChatAttachments.call(void 0, );
102
+ const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkZDF6F7EDcjs.useChatAttachments.call(void 0, );
101
103
  const trimmedSubject = subject.trim();
102
104
  const trimmedContent = content.trim();
103
105
  const overCap = content.length > TICKET_TEXT_MAX_CHARS;
@@ -117,7 +119,7 @@ function TicketOpenForm({
117
119
  clear();
118
120
  }
119
121
  };
120
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
122
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDF6F7EDcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
121
123
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
122
124
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
123
125
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-sm", children: "Can't find what you're looking for? Submit a support ticket below \u2014 we'll follow up shortly." }),
@@ -156,7 +158,7 @@ function TicketOpenForm({
156
158
  }
157
159
  ),
158
160
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
159
- _chunkTWKPYZNQcjs.Textarea,
161
+ _chunkZDF6F7EDcjs.Textarea,
160
162
  {
161
163
  id: "ticket-content",
162
164
  placeholder: "Describe your issue or question in detail...",
@@ -180,7 +182,7 @@ function TicketOpenForm({
180
182
  )
181
183
  ] }),
182
184
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
183
- _chunkTWKPYZNQcjs.ChatAttachmentChipStrip,
185
+ _chunkZDF6F7EDcjs.ChatAttachmentChipStrip,
184
186
  {
185
187
  attachments,
186
188
  onRemove: removeAttachment,
@@ -189,7 +191,7 @@ function TicketOpenForm({
189
191
  ),
190
192
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
191
193
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
192
- _chunkTWKPYZNQcjs.ChatAttachmentAddButton,
194
+ _chunkZDF6F7EDcjs.ChatAttachmentAddButton,
193
195
  {
194
196
  attachmentsEnabled: !supportSystemDown,
195
197
  attachmentsCount: attachments.length,
@@ -227,7 +229,7 @@ _chunkUXZ3ZJ3Mcjs.init_button2.call(void 0, );
227
229
 
228
230
  var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
229
231
  function useTicketEngagements(externalTicketId, enabled = true) {
230
- const identity = _chunkTWKPYZNQcjs.useChatIdentity.call(void 0, );
232
+ const identity = _chunkZDF6F7EDcjs.useChatIdentity.call(void 0, );
231
233
  const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _ => _.user, 'optionalAccess', _2 => _2.email]), () => ( "anon"));
232
234
  const queryEnabled = enabled && identity.authTier !== "anon" && !!_optionalChain([identity, 'access', _3 => _3.user, 'optionalAccess', _4 => _4.email]) && !!externalTicketId && !externalTicketId.startsWith("temp-");
233
235
  const query = _reactquery.useQuery.call(void 0, {
@@ -241,7 +243,7 @@ function useTicketEngagements(externalTicketId, enabled = true) {
241
243
  refetchOnMount: "always",
242
244
  refetchOnWindowFocus: true,
243
245
  queryFn: async () => {
244
- const response = await _chunkTWKPYZNQcjs.embedAuthedFetch.call(void 0, LIST_ENGAGEMENTS_ENDPOINT, {
246
+ const response = await _chunkZDF6F7EDcjs.embedAuthedFetch.call(void 0, LIST_ENGAGEMENTS_ENDPOINT, {
245
247
  method: "POST",
246
248
  body: JSON.stringify({ ticket_id: externalTicketId })
247
249
  });
@@ -289,7 +291,7 @@ function TicketLinkedDeliveryCard({
289
291
  {
290
292
  className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
291
293
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
292
- _chunkVBFOCTMDcjs.DeliveryRow,
294
+ _chunk35XIT2CFcjs.DeliveryRow,
293
295
  {
294
296
  item,
295
297
  href: clickup.delivery_href,
@@ -342,7 +344,7 @@ function TicketDetailDrawer({
342
344
  }
343
345
  var TURN_SEPARATOR_RE = /[\s]{1,16}---[\s]{1,16}/g;
344
346
  function TicketTimelinePanel({ ticket }) {
345
- const identity = _chunkTWKPYZNQcjs.useChatIdentity.call(void 0, );
347
+ const identity = _chunkZDF6F7EDcjs.useChatIdentity.call(void 0, );
346
348
  const externalId = isOptimistic(ticket) ? null : ticket.external_id;
347
349
  const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
348
350
  const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
@@ -354,10 +356,10 @@ function TicketTimelinePanel({ ticket }) {
354
356
  const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _20 => _20.user, 'optionalAccess', _21 => _21.avatarUrl]), () => ( void 0)) : void 0;
355
357
  if (bodyTurns.length === 0 && engagements.length === 0) {
356
358
  if (isLoading) {
357
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.ConversationCardRowSkeletonList, { rows: 2 });
359
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk35XIT2CFcjs.ConversationCardRowSkeletonList, { rows: 2 });
358
360
  }
359
361
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
360
- _chunkVBFOCTMDcjs.EmptyState,
362
+ _chunk35XIT2CFcjs.EmptyState,
361
363
  {
362
364
  type: "generic",
363
365
  title: "No conversation yet",
@@ -372,7 +374,7 @@ function TicketTimelinePanel({ ticket }) {
372
374
  const role = i === 0 ? "Original message" : isResolution ? "Resolution" : `Update ${i}`;
373
375
  const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
374
376
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
375
- _chunkVBFOCTMDcjs.ConversationCardRow,
377
+ _chunk35XIT2CFcjs.ConversationCardRow,
376
378
  {
377
379
  author: customerName,
378
380
  role,
@@ -402,10 +404,10 @@ function TicketTimelinePanel({ ticket }) {
402
404
  avatarSrc = void 0;
403
405
  }
404
406
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
405
- _chunkVBFOCTMDcjs.ConversationCardRow,
407
+ _chunk35XIT2CFcjs.ConversationCardRow,
406
408
  {
407
409
  author,
408
- role: isCustomer ? "Reply" : "Note",
410
+ role: "Reply",
409
411
  avatarSrc,
410
412
  timestamp: eng.createdAt,
411
413
  body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
@@ -419,7 +421,7 @@ function TicketTimelinePanel({ ticket }) {
419
421
  // content rendered — drawer is showing the customer's body
420
422
  // turns + cached engagements while a background refetch is
421
423
  // in flight. Single row keeps the placeholder modest.
422
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.ConversationCardRowSkeletonList, { rows: 1 })
424
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk35XIT2CFcjs.ConversationCardRowSkeletonList, { rows: 1 })
423
425
  ] });
424
426
  }
425
427
  function mapEngagementAttachments(files) {
@@ -472,7 +474,7 @@ function OpenActions({
472
474
  const [messageText, setMessageText] = _react.useState.call(void 0, "");
473
475
  const [resolution, setResolution] = _react.useState.call(void 0, "");
474
476
  const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
475
- const attachments = _chunkTWKPYZNQcjs.useChatAttachments.call(void 0, );
477
+ const attachments = _chunkZDF6F7EDcjs.useChatAttachments.call(void 0, );
476
478
  const disabled = busy || supportSystemDown;
477
479
  const ticketRef = { id: ticket.id, external_id: ticket.external_id };
478
480
  const hasText = messageText.trim().length > 0;
@@ -495,7 +497,7 @@ function OpenActions({
495
497
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
496
498
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
497
499
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
498
- _chunkTWKPYZNQcjs.Textarea,
500
+ _chunkZDF6F7EDcjs.Textarea,
499
501
  {
500
502
  value: messageText,
501
503
  onChange: (e) => setMessageText(e.target.value),
@@ -506,7 +508,7 @@ function OpenActions({
506
508
  }
507
509
  ),
508
510
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
509
- _chunkTWKPYZNQcjs.ChatAttachmentChipStrip,
511
+ _chunkZDF6F7EDcjs.ChatAttachmentChipStrip,
510
512
  {
511
513
  attachments: attachments.attachments,
512
514
  onRemove: attachments.removeAttachment,
@@ -516,7 +518,7 @@ function OpenActions({
516
518
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between items-center gap-2 flex-wrap", children: [
517
519
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
518
520
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
519
- _chunkTWKPYZNQcjs.ChatAttachmentAddButton,
521
+ _chunkZDF6F7EDcjs.ChatAttachmentAddButton,
520
522
  {
521
523
  attachmentsEnabled: !supportSystemDown,
522
524
  attachmentsCount: attachments.attachments.length,
@@ -551,13 +553,13 @@ function OpenActions({
551
553
  ] })
552
554
  ] })
553
555
  ] }),
554
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkTWKPYZNQcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
555
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkTWKPYZNQcjs.AlertDialogHeader, { children: [
556
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.AlertDialogTitle, { className: "text-ods-text-primary font-['DM_Sans'] text-[20px] font-semibold", children: "Close this ticket?" }),
557
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.AlertDialogDescription, { className: "text-ods-text-secondary font-['DM_Sans'] text-[14px]", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
556
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDF6F7EDcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZDF6F7EDcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
557
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZDF6F7EDcjs.AlertDialogHeader, { children: [
558
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDF6F7EDcjs.AlertDialogTitle, { className: "text-ods-text-primary font-['DM_Sans'] text-[20px] font-semibold", children: "Close this ticket?" }),
559
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDF6F7EDcjs.AlertDialogDescription, { className: "text-ods-text-secondary font-['DM_Sans'] text-[14px]", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
558
560
  ] }),
559
561
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
560
- _chunkTWKPYZNQcjs.Textarea,
562
+ _chunkZDF6F7EDcjs.Textarea,
561
563
  {
562
564
  value: resolution,
563
565
  onChange: (e) => setResolution(e.target.value),
@@ -567,9 +569,9 @@ function OpenActions({
567
569
  className: "mt-2"
568
570
  }
569
571
  ),
570
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkTWKPYZNQcjs.AlertDialogFooter, { children: [
572
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZDF6F7EDcjs.AlertDialogFooter, { children: [
571
573
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
572
- _chunkTWKPYZNQcjs.AlertDialogCancel,
574
+ _chunkZDF6F7EDcjs.AlertDialogCancel,
573
575
  {
574
576
  disabled: busy,
575
577
  className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
@@ -577,7 +579,7 @@ function OpenActions({
577
579
  }
578
580
  ),
579
581
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
580
- _chunkTWKPYZNQcjs.AlertDialogAction,
582
+ _chunkZDF6F7EDcjs.AlertDialogAction,
581
583
  {
582
584
  onClick: () => void confirmClose(),
583
585
  disabled: busy,
@@ -605,14 +607,22 @@ function TicketRow({
605
607
  }) {
606
608
  const optimistic = isOptimistic(ticket);
607
609
  const rowRef = _react.useRef.call(void 0, null);
608
- _react.useEffect.call(void 0, () => {
609
- if (!expanded || optimistic) return;
610
- requestAnimationFrame(() => {
611
- requestAnimationFrame(() => {
612
- _optionalChain([rowRef, 'access', _30 => _30.current, 'optionalAccess', _31 => _31.scrollIntoView, 'call', _32 => _32({ behavior: "smooth", block: "start" })]);
613
- });
610
+ const handleClick = _react.useCallback.call(void 0, () => {
611
+ onToggle(ticket.id);
612
+ _chunkZDF6F7EDcjs.scrollElementIntoView.call(void 0, rowRef.current, {
613
+ adjustTargetY: (raw) => {
614
+ if (!rowRef.current) return raw;
615
+ const expandedDrawer = document.querySelector(
616
+ 'div[id^="ticket-drawer-"]'
617
+ );
618
+ if (!(expandedDrawer instanceof HTMLElement)) return raw;
619
+ const drawerRect = expandedDrawer.getBoundingClientRect();
620
+ const myRect = rowRef.current.getBoundingClientRect();
621
+ if (drawerRect.bottom > myRect.top) return raw;
622
+ return raw - drawerRect.height;
623
+ }
614
624
  });
615
- }, [expanded, optimistic]);
625
+ }, [onToggle, ticket.id]);
616
626
  const tileData = {
617
627
  id: ticket.id,
618
628
  title: _nullishCoalesce(ticket.subject, () => ( "(untitled)")),
@@ -625,7 +635,7 @@ function TicketRow({
625
635
  // so the badge accurately reflects "Closed" with a checkmark.
626
636
  statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
627
637
  category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
628
- timeAgo: ticket.hubspot_updated_at ? _chunkTWKPYZNQcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
638
+ timeAgo: ticket.hubspot_updated_at ? _chunkZDF6F7EDcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
629
639
  // Linked-work chip: surfaced whenever the ticket has a linked
630
640
  // ClickUp task. Uses the linked task's own status so the chip text
631
641
  // reads "Working" / "Waiting on version release" / etc. — useful
@@ -633,17 +643,17 @@ function TicketRow({
633
643
  // when the task exists but its status hasn't synced yet.
634
644
  linkedTaskLabel: ticket.clickup ? ticket.clickup.status ? ticket.clickup.status.replace(/\b\w/g, (c) => c.toUpperCase()) : "Linked work" : void 0
635
645
  };
636
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: rowRef, className: "scroll-mt-4", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
646
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: rowRef, className: "scroll-mt-24", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
637
647
  Collapsible,
638
648
  {
639
649
  open: expanded && !optimistic,
640
650
  className: "border-b border-ods-border last:border-b-0",
641
651
  children: [
642
652
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
643
- _chunkTWKPYZNQcjs.ChatTicketItem,
653
+ _chunkZDF6F7EDcjs.ChatTicketItem,
644
654
  {
645
655
  ticket: tileData,
646
- onClick: optimistic ? void 0 : onToggle,
656
+ onClick: optimistic ? void 0 : handleClick,
647
657
  "aria-expanded": expanded && !optimistic,
648
658
  "aria-controls": `ticket-drawer-${ticket.id}`
649
659
  }
@@ -704,7 +714,7 @@ function useTicketsList(filters) {
704
714
  pageSize
705
715
  };
706
716
  if (statusFilter) body.status = statusFilter;
707
- const response = await _chunkTWKPYZNQcjs.embedAuthedFetch.call(void 0, FIND_TICKET_ENDPOINT, {
717
+ const response = await _chunkZDF6F7EDcjs.embedAuthedFetch.call(void 0, FIND_TICKET_ENDPOINT, {
708
718
  method: "POST",
709
719
  body: JSON.stringify(body)
710
720
  });
@@ -716,12 +726,12 @@ function useTicketsList(filters) {
716
726
  }
717
727
  });
718
728
  const data = query.data;
719
- const totalCount = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _33 => _33.totalCount]), () => ( _optionalChain([data, 'optionalAccess', _34 => _34.count]))), () => ( (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _35 => _35.tickets, 'optionalAccess', _36 => _36.length]), () => ( 0)))));
720
- const echoedPage = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _37 => _37.page]), () => ( page));
721
- const echoedPageSize = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _38 => _38.pageSize]), () => ( pageSize));
722
- const totalPages = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _39 => _39.totalPages]), () => ( Math.max(1, Math.ceil(totalCount / echoedPageSize))));
729
+ const totalCount = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _30 => _30.totalCount]), () => ( _optionalChain([data, 'optionalAccess', _31 => _31.count]))), () => ( (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _32 => _32.tickets, 'optionalAccess', _33 => _33.length]), () => ( 0)))));
730
+ const echoedPage = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _34 => _34.page]), () => ( page));
731
+ const echoedPageSize = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _35 => _35.pageSize]), () => ( pageSize));
732
+ const totalPages = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _36 => _36.totalPages]), () => ( Math.max(1, Math.ceil(totalCount / echoedPageSize))));
723
733
  return {
724
- tickets: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _40 => _40.tickets]), () => ( [])),
734
+ tickets: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _37 => _37.tickets]), () => ( [])),
725
735
  // Loading-state-truth = `data === undefined`. TanStack v5's
726
736
  // `isPending` / `isLoading` flags can be `false` in transient
727
737
  // windows where the query is enabled-but-fetch-not-yet-fired
@@ -743,7 +753,7 @@ function useTicketsList(filters) {
743
753
  // - Background refetch with existing data: data !== undefined → no load
744
754
  // - Filter-change refetch landing on empty results: data?.tickets===[]
745
755
  // + isFetching → bridge skeleton (the `||` branch)
746
- isLoading: enabled && (data === void 0 || query.isFetching && (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _41 => _41.tickets]), () => ( []))).length === 0),
756
+ isLoading: enabled && (data === void 0 || query.isFetching && (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _38 => _38.tickets]), () => ( []))).length === 0),
747
757
  isFetching: query.isFetching,
748
758
  error: _nullishCoalesce(query.error, () => ( null)),
749
759
  refetch: () => {
@@ -792,7 +802,7 @@ function useTicketActions(options) {
792
802
  }, []);
793
803
  const executeTicketAction = _react.useCallback.call(void 0,
794
804
  async (toolName, args) => {
795
- const res = await _chunkTWKPYZNQcjs.embedAuthedFetch.call(void 0, TICKET_ACTION_ENDPOINT, {
805
+ const res = await _chunkZDF6F7EDcjs.embedAuthedFetch.call(void 0, TICKET_ACTION_ENDPOINT, {
796
806
  method: "POST",
797
807
  body: JSON.stringify({ tool_name: toolName, args })
798
808
  });
@@ -898,7 +908,7 @@ function useTicketActions(options) {
898
908
  const result = await executeTicketAction("create_ticket", {
899
909
  subject: input.subject.trim(),
900
910
  content: input.content.trim(),
901
- ..._optionalChain([input, 'access', _42 => _42.attachments, 'optionalAccess', _43 => _43.length]) ? { attachments: input.attachments } : {}
911
+ ..._optionalChain([input, 'access', _39 => _39.attachments, 'optionalAccess', _40 => _40.length]) ? { attachments: input.attachments } : {}
902
912
  });
903
913
  if (result.mirror_synced === false) {
904
914
  toast2(TOAST_COPY.open_mirror_pending);
@@ -986,7 +996,7 @@ function useTicketActions(options) {
986
996
  ticket,
987
997
  {
988
998
  status: "CLOSED",
989
- ..._optionalChain([resolution, 'optionalAccess', _44 => _44.trim, 'call', _45 => _45()]) ? { resolution: resolution.trim() } : {}
999
+ ..._optionalChain([resolution, 'optionalAccess', _41 => _41.trim, 'call', _42 => _42()]) ? { resolution: resolution.trim() } : {}
990
1000
  },
991
1001
  TOAST_COPY.close_success,
992
1002
  "close ticket"
@@ -1048,7 +1058,7 @@ function mapTicketActionError(err) {
1048
1058
  removeRowFromCache: false
1049
1059
  };
1050
1060
  case "RATE_LIMITED": {
1051
- const retryAfterRaw = _optionalChain([err, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.headers, 'access', _48 => _48.get, 'call', _49 => _49("Retry-After")]);
1061
+ const retryAfterRaw = _optionalChain([err, 'access', _43 => _43.response, 'optionalAccess', _44 => _44.headers, 'access', _45 => _45.get, 'call', _46 => _46("Retry-After")]);
1052
1062
  const retryAfterSeconds = retryAfterRaw ? parseInt(retryAfterRaw, 10) : void 0;
1053
1063
  return {
1054
1064
  code: err.code,
@@ -1105,14 +1115,14 @@ function resolveErrorCode(bodyCode, status) {
1105
1115
 
1106
1116
  // src/components/tickets/ticket-center.tsx
1107
1117
 
1108
- function TicketCenter({ toast: toast2 = _chunkEH3RWVF3cjs.toast } = {}) {
1109
- const identity = _chunkTWKPYZNQcjs.useChatIdentity.call(void 0, );
1118
+ function TicketCenter({ toast: toast2 = _chunkWT5JV2GScjs.toast } = {}) {
1119
+ const identity = _chunkZDF6F7EDcjs.useChatIdentity.call(void 0, );
1110
1120
  if (identity.isLoading) {
1111
1121
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
1112
1122
  }
1113
- if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _50 => _50.user, 'optionalAccess', _51 => _51.email])) {
1123
+ if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _47 => _47.user, 'optionalAccess', _48 => _48.email])) {
1114
1124
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1115
- _chunkVBFOCTMDcjs.EmptyState,
1125
+ _chunk35XIT2CFcjs.EmptyState,
1116
1126
  {
1117
1127
  type: "generic",
1118
1128
  title: "Sign in to manage tickets",
@@ -1183,7 +1193,7 @@ function TicketCenterAuthed({
1183
1193
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
1184
1194
  lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
1185
1195
  "Updated ",
1186
- _chunkTWKPYZNQcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
1196
+ _chunkZDF6F7EDcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
1187
1197
  ] }),
1188
1198
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1189
1199
  _chunkUXZ3ZJ3Mcjs.Button,
@@ -1199,15 +1209,15 @@ function TicketCenterAuthed({
1199
1209
  )
1200
1210
  ] })
1201
1211
  ] }),
1202
- isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1203
- _chunkVBFOCTMDcjs.EmptyState,
1212
+ isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDF6F7EDcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1213
+ _chunk35XIT2CFcjs.EmptyState,
1204
1214
  {
1205
1215
  type: "generic",
1206
1216
  title: "No tickets yet",
1207
1217
  description: "Open one above to start the conversation.",
1208
1218
  showCTA: false
1209
1219
  }
1210
- ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1220
+ ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDF6F7EDcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1211
1221
  TicketRow,
1212
1222
  {
1213
1223
  ticket,
@@ -1227,7 +1237,7 @@ function TicketCenterAuthed({
1227
1237
  }
1228
1238
  function TicketCenterSkeleton() {
1229
1239
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
1230
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkTWKPYZNQcjs.Card, { className: "p-6", children: [
1240
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZDF6F7EDcjs.Card, { className: "p-6", children: [
1231
1241
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-7 w-48 mb-4" }),
1232
1242
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-10 w-full mb-3" }),
1233
1243
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-24 w-full" })
@@ -1236,7 +1246,7 @@ function TicketCenterSkeleton() {
1236
1246
  ] });
1237
1247
  }
1238
1248
  function TicketListSkeleton() {
1239
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.Card, { className: "overflow-hidden", children: [0, 1, 2].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "h-20 px-4 flex items-center gap-4 border-b border-ods-border last:border-b-0", children: [
1249
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDF6F7EDcjs.Card, { className: "overflow-hidden", children: [0, 1, 2].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "h-20 px-4 flex items-center gap-4 border-b border-ods-border last:border-b-0", children: [
1240
1250
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
1241
1251
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-4 w-2/3" }),
1242
1252
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-3 w-full" })
@@ -1249,10 +1259,12 @@ function TicketListSkeleton() {
1249
1259
  // src/components/tickets/help-center-list.tsx
1250
1260
 
1251
1261
 
1252
- _chunkVBFOCTMDcjs.init_unified_pagination.call(void 0, );
1262
+ _chunk35XIT2CFcjs.init_unified_pagination.call(void 0, );
1253
1263
 
1254
1264
  // src/components/tickets/help-center-card.tsx
1255
1265
 
1266
+
1267
+ var STICKY_HEADER_OFFSET_PX = 96;
1256
1268
  function HelpCenterCard({
1257
1269
  ticket,
1258
1270
  expanded,
@@ -1267,24 +1279,42 @@ function HelpCenterCard({
1267
1279
  const optimistic = isOptimistic(ticket);
1268
1280
  const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
1269
1281
  const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
1270
- const relativeUpdated = ticket.hubspot_updated_at ? _chunkTWKPYZNQcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
1282
+ const relativeUpdated = ticket.hubspot_updated_at ? _chunkZDF6F7EDcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
1271
1283
  const title = (ticket.subject || "").trim() || "(untitled)";
1272
1284
  const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
1273
1285
  const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
1274
1286
  const isExpandable = !optimistic;
1275
1287
  const isExpanded = expanded && isExpandable;
1288
+ const rowRef = _react.useRef.call(void 0, null);
1289
+ const handleClick = _react.useCallback.call(void 0, () => {
1290
+ onToggle(ticket.id);
1291
+ _chunkZDF6F7EDcjs.scrollElementIntoView.call(void 0, rowRef.current, {
1292
+ headerOffset: STICKY_HEADER_OFFSET_PX,
1293
+ adjustTargetY: (raw) => {
1294
+ if (!rowRef.current) return raw;
1295
+ const expandedDrawer = document.querySelector(
1296
+ 'div[id^="help-center-drawer-"]'
1297
+ );
1298
+ if (!(expandedDrawer instanceof HTMLElement)) return raw;
1299
+ const drawerRect = expandedDrawer.getBoundingClientRect();
1300
+ const myRect = rowRef.current.getBoundingClientRect();
1301
+ if (drawerRect.bottom > myRect.top) return raw;
1302
+ return raw - drawerRect.height;
1303
+ }
1304
+ });
1305
+ }, [onToggle, ticket.id]);
1276
1306
  const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1277
1307
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1278
- _chunkTWKPYZNQcjs.StatusBadge,
1308
+ _chunkZDF6F7EDcjs.StatusBadge,
1279
1309
  {
1280
1310
  text: rawStatus,
1281
- colorScheme: _chunkTWKPYZNQcjs.getStatusColorScheme.call(void 0, rawStatus),
1311
+ colorScheme: _chunkZDF6F7EDcjs.getStatusColorScheme.call(void 0, rawStatus),
1282
1312
  variant: "card",
1283
1313
  className: "border border-ods-border"
1284
1314
  }
1285
1315
  ),
1286
1316
  priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1287
- _chunkTWKPYZNQcjs.StatusBadge,
1317
+ _chunkZDF6F7EDcjs.StatusBadge,
1288
1318
  {
1289
1319
  text: priority,
1290
1320
  colorScheme: mapPriorityScheme(priority),
@@ -1296,6 +1326,8 @@ function HelpCenterCard({
1296
1326
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1297
1327
  "div",
1298
1328
  {
1329
+ ref: rowRef,
1330
+ style: { scrollMarginTop: STICKY_HEADER_OFFSET_PX },
1299
1331
  className: `border-b border-ods-border last:border-b-0 ${optimistic ? "opacity-60" : ""}`,
1300
1332
  "aria-busy": optimistic || void 0,
1301
1333
  children: [
@@ -1303,13 +1335,13 @@ function HelpCenterCard({
1303
1335
  "button",
1304
1336
  {
1305
1337
  type: "button",
1306
- onClick: isExpandable ? () => onToggle(ticket.id) : void 0,
1338
+ onClick: isExpandable ? handleClick : void 0,
1307
1339
  disabled: !isExpandable,
1308
1340
  "aria-expanded": isExpandable ? isExpanded : void 0,
1309
1341
  "aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
1310
1342
  className: "w-full text-left p-[12px] md:p-[16px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent focus-visible:ring-inset disabled:cursor-default",
1311
1343
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1312
- _chunkVBFOCTMDcjs.DevCardRowContent,
1344
+ _chunk35XIT2CFcjs.DevCardRowContent,
1313
1345
  {
1314
1346
  title,
1315
1347
  subtitle,
@@ -1382,7 +1414,7 @@ function HelpCenterCreateForm({
1382
1414
  const [subject, setSubject] = _react.useState.call(void 0, "");
1383
1415
  const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
1384
1416
  const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
1385
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkTWKPYZNQcjs.Label, { htmlFor: "help-center-subject", children: [
1417
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZDF6F7EDcjs.Label, { htmlFor: "help-center-subject", children: [
1386
1418
  "Subject",
1387
1419
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
1388
1420
  ] }),
@@ -1414,7 +1446,7 @@ function HelpCenterCreateForm({
1414
1446
  )
1415
1447
  ] });
1416
1448
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1417
- _chunkMDTIOPVScjs.ContactForm,
1449
+ _chunkOTKJASSXcjs.ContactForm,
1418
1450
  {
1419
1451
  title: "Open a new ticket",
1420
1452
  footerText: "The support team typically responds within one business day.",
@@ -1451,8 +1483,8 @@ function HelpCenterCreateForm({
1451
1483
 
1452
1484
  // src/components/tickets/help-center-list.tsx
1453
1485
 
1454
- function HelpCenterList({ toast: toast2 = _chunkEH3RWVF3cjs.toast } = {}) {
1455
- const identity = _chunkTWKPYZNQcjs.useChatIdentity.call(void 0, );
1486
+ function HelpCenterList({ toast: toast2 = _chunkWT5JV2GScjs.toast } = {}) {
1487
+ const identity = _chunkZDF6F7EDcjs.useChatIdentity.call(void 0, );
1456
1488
  const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
1457
1489
  const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
1458
1490
  const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
@@ -1461,11 +1493,11 @@ function HelpCenterList({ toast: toast2 = _chunkEH3RWVF3cjs.toast } = {}) {
1461
1493
  const rawPage = Number(searchParams.get("page"));
1462
1494
  const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
1463
1495
  if (identity.isLoading) {
1464
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevSectionPage, { sectionKey: "tickets", preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevCardRowSkeletonList, {}) });
1496
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk35XIT2CFcjs.DevSectionPage, { sectionKey: "tickets", preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk35XIT2CFcjs.DevCardRowSkeletonList, {}) });
1465
1497
  }
1466
- if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _52 => _52.user, 'optionalAccess', _53 => _53.email])) {
1467
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevSectionPage, { sectionKey: "tickets", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1468
- _chunkVBFOCTMDcjs.EmptyState,
1498
+ if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _49 => _49.user, 'optionalAccess', _50 => _50.email])) {
1499
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk35XIT2CFcjs.DevSectionPage, { sectionKey: "tickets", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1500
+ _chunk35XIT2CFcjs.EmptyState,
1469
1501
  {
1470
1502
  type: "generic",
1471
1503
  title: "Sign in to manage tickets",
@@ -1474,7 +1506,7 @@ function HelpCenterList({ toast: toast2 = _chunkEH3RWVF3cjs.toast } = {}) {
1474
1506
  }
1475
1507
  ) });
1476
1508
  }
1477
- const sessionName = [_optionalChain([identity, 'access', _54 => _54.user, 'optionalAccess', _55 => _55.firstName]), _optionalChain([identity, 'access', _56 => _56.user, 'optionalAccess', _57 => _57.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identity, 'access', _58 => _58.user, 'optionalAccess', _59 => _59.email, 'optionalAccess', _60 => _60.split, 'call', _61 => _61("@"), 'access', _62 => _62[0]]) || "Customer";
1509
+ const sessionName = [_optionalChain([identity, 'access', _51 => _51.user, 'optionalAccess', _52 => _52.firstName]), _optionalChain([identity, 'access', _53 => _53.user, 'optionalAccess', _54 => _54.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identity, 'access', _55 => _55.user, 'optionalAccess', _56 => _56.email, 'optionalAccess', _57 => _57.split, 'call', _58 => _58("@"), 'access', _59 => _59[0]]) || "Customer";
1478
1510
  const sessionEmail = identity.user.email;
1479
1511
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1480
1512
  HelpCenterListAuthed,
@@ -1565,15 +1597,15 @@ function HelpCenterListAuthed({
1565
1597
  ] }),
1566
1598
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
1567
1599
  ] }),
1568
- !error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
1600
+ !error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk35XIT2CFcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
1569
1601
  // Bridge state — background refetch in flight and the
1570
1602
  // optimistic placeholder was just removed by the mutation
1571
1603
  // callback. Without this branch "No tickets yet" would flash
1572
1604
  // for ~50ms between `removeOptimistic` and the server
1573
1605
  // response landing.
1574
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevCardRowSkeletonList, { rows: 1 })
1606
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk35XIT2CFcjs.DevCardRowSkeletonList, { rows: 1 })
1575
1607
  ) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1576
- _chunkVBFOCTMDcjs.EmptyState,
1608
+ _chunk35XIT2CFcjs.EmptyState,
1577
1609
  {
1578
1610
  type: "search",
1579
1611
  title: "No tickets found",
@@ -1588,31 +1620,41 @@ function HelpCenterListAuthed({
1588
1620
  }
1589
1621
  }
1590
1622
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1591
- _chunkVBFOCTMDcjs.EmptyState,
1623
+ _chunk35XIT2CFcjs.EmptyState,
1592
1624
  {
1593
1625
  type: "generic",
1594
1626
  title: "No tickets yet",
1595
1627
  description: "Open one above to start the conversation with the support team.",
1596
1628
  showCTA: false
1597
1629
  }
1598
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-card border border-ods-border rounded-[6px] overflow-hidden w-full", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1599
- HelpCenterCard,
1600
- {
1601
- ticket,
1602
- expanded: expandedTicketId === ticket.id,
1603
- onToggle: toggleRow,
1604
- busy: isOptimistic(ticket) ? false : actions.isRowBusy(ticket.id),
1605
- supportSystemDown,
1606
- onSendMessage: actions.sendMessage,
1607
- onClose: actions.closeTicket,
1608
- onReopen: actions.reopenTicket,
1609
- onActionCollapsed: () => setExpandedTicketId(null)
1610
- },
1611
- ticket.id
1612
- )) }) }),
1613
- !error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.UnifiedPagination, { currentPage: page, totalPages })
1630
+ ) : (
1631
+ // `overflow-clip` (NOT `overflow-hidden`) — both visually
1632
+ // clip the rounded corners, but `hidden` makes the element
1633
+ // a "scroll container" per CSSOM spec, which causes
1634
+ // `scrollIntoView` calls inside (`<HelpCenterCard>` click
1635
+ // handlers) to try scrolling THIS div (can't, overflow
1636
+ // hidden) instead of bubbling up to the window. `clip`
1637
+ // keeps the visual clip but NOT the scroll-container
1638
+ // status, so click-to-scroll actually moves the page.
1639
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-card border border-ods-border rounded-[6px] overflow-clip w-full", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1640
+ HelpCenterCard,
1641
+ {
1642
+ ticket,
1643
+ expanded: expandedTicketId === ticket.id,
1644
+ onToggle: toggleRow,
1645
+ busy: isOptimistic(ticket) ? false : actions.isRowBusy(ticket.id),
1646
+ supportSystemDown,
1647
+ onSendMessage: actions.sendMessage,
1648
+ onClose: actions.closeTicket,
1649
+ onReopen: actions.reopenTicket,
1650
+ onActionCollapsed: () => setExpandedTicketId(null)
1651
+ },
1652
+ ticket.id
1653
+ )) })
1654
+ ) }),
1655
+ !error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk35XIT2CFcjs.UnifiedPagination, { currentPage: page, totalPages })
1614
1656
  ] });
1615
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevSectionPage, { sectionKey: "tickets", preControls: form, children: body });
1657
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk35XIT2CFcjs.DevSectionPage, { sectionKey: "tickets", preControls: form, children: body });
1616
1658
  }
1617
1659
 
1618
1660