@flamingo-stack/openframe-frontend-core 0.0.825 → 0.0.827

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 (323) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{case-study-card-IZBMHA6R.cjs → case-study-card-QMFGPABF.cjs} +5 -5
  3. package/dist/{chunk-QOAA7ZHB.cjs → chunk-2HQNXX2K.cjs} +2 -2
  4. package/dist/{chunk-NONMZ5WJ.cjs → chunk-2VLPXUQK.cjs} +14 -83
  5. package/dist/{chunk-OBQ5WUNG.cjs → chunk-3B6ZE4EZ.cjs} +29 -29
  6. package/dist/{chunk-BN7QENV7.cjs → chunk-3WKQ2GCR.cjs} +6 -6
  7. package/dist/{chunk-AO6YVNAH.cjs → chunk-4ZH7RPEA.cjs} +979 -1357
  8. package/dist/{chunk-25HBH4J6.cjs → chunk-5BM7X4GA.cjs} +2 -2
  9. package/dist/{chunk-UEULXVW2.cjs → chunk-6GPMVHJN.cjs} +23 -23
  10. package/dist/{chunk-IMMTH3F3.cjs → chunk-6SFCI6D4.cjs} +29 -27
  11. package/dist/{chunk-7DJWIVQC.cjs → chunk-6ZLCEIIC.cjs} +36 -36
  12. package/dist/{chunk-467T3LCG.cjs → chunk-7PZQ7SHB.cjs} +49 -32
  13. package/dist/{chunk-47SHKOCY.cjs → chunk-7VC5FVWT.cjs} +86 -86
  14. package/dist/{chunk-AUBR3FGY.cjs → chunk-ALRX2VIY.cjs} +28 -28
  15. package/dist/{chunk-XJMLZ63Y.cjs → chunk-B5H7RKFF.cjs} +4 -4
  16. package/dist/{chunk-2U7GXE3T.cjs → chunk-BGT6JFMP.cjs} +12636 -11302
  17. package/dist/{chunk-2XLPRW7V.cjs → chunk-BIG3O33P.cjs} +6 -2
  18. package/dist/chunk-BMQLM2NU.cjs +40 -0
  19. package/dist/{chunk-DVHSYPDB.cjs → chunk-DAKGX2WF.cjs} +2 -2
  20. package/dist/{chunk-MHR4C465.cjs → chunk-DR4P7AEU.cjs} +3 -3
  21. package/dist/{chunk-IJCSQFLD.cjs → chunk-DU6AF77X.cjs} +83 -121
  22. package/dist/{chunk-SBFBNOKU.cjs → chunk-ENMPSEEQ.cjs} +4 -4
  23. package/dist/{chunk-ZECG6GU5.cjs → chunk-F2J5WN6U.cjs} +2 -2
  24. package/dist/{chunk-2IWAHBCC.cjs → chunk-FMSAN6SR.cjs} +159 -159
  25. package/dist/{chunk-BOS7OIC4.cjs → chunk-GRHF5SWL.cjs} +5 -2
  26. package/dist/{chunk-ZRDVFADQ.cjs → chunk-IBD2FPSX.cjs} +75 -9
  27. package/dist/{chunk-T266OITJ.cjs → chunk-IKWQW3YJ.cjs} +45 -45
  28. package/dist/{chunk-APTFXX2C.cjs → chunk-K6X7VP2Y.cjs} +46 -46
  29. package/dist/{chunk-QDDBOCG3.cjs → chunk-KPGKTEEB.cjs} +2 -2
  30. package/dist/{chunk-B7NSH7IK.cjs → chunk-LKP5R3EQ.cjs} +5 -5
  31. package/dist/chunk-OEP5KAT6.cjs +56 -0
  32. package/dist/{chunk-Z7BLMJEI.cjs → chunk-OKTNRGM5.cjs} +54 -54
  33. package/dist/chunk-OT6P57ZS.cjs +94 -0
  34. package/dist/{chunk-QQT23JJ7.cjs → chunk-PBHP3FHO.cjs} +4 -4
  35. package/dist/{chunk-P25RVNGX.cjs → chunk-QMQWXGCH.cjs} +249 -108
  36. package/dist/{chunk-6LVJKPR3.cjs → chunk-RPKWEBHC.cjs} +8 -8
  37. package/dist/{chunk-NPNZAAOB.cjs → chunk-S6UJEW4G.cjs} +2 -2
  38. package/dist/{chunk-EHANO6UE.cjs → chunk-SVCTAOJR.cjs} +9 -129
  39. package/dist/{chunk-MALCUN2G.cjs → chunk-UULSSD56.cjs} +12 -14
  40. package/dist/{chunk-N7IDLF2G.cjs → chunk-UWGPYAB3.cjs} +1283 -268
  41. package/dist/{chunk-4IY5FKYL.cjs → chunk-VAIML6YU.cjs} +23 -23
  42. package/dist/{chunk-A34UNP5V.cjs → chunk-W4VEDSAX.cjs} +80 -11
  43. package/dist/{chunk-5S2GW6YG.cjs → chunk-XPF74L76.cjs} +17 -17
  44. package/dist/{chunk-DNZCSPMU.cjs → chunk-YKUL6JBI.cjs} +20 -20
  45. package/dist/{chunk-QOOMUGF2.cjs → chunk-YMLRDVPO.cjs} +15 -15
  46. package/dist/{chunk-NL34HKLS.cjs → chunk-ZT7JHN7G.cjs} +91 -91
  47. package/dist/{cloud-tenants-M4VFFN33.cjs → cloud-tenants-LKTWIZNS.cjs} +108 -106
  48. package/dist/components/case-studies/index.cjs +124 -122
  49. package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
  50. package/dist/components/chat/approval-batch-message.js +2 -2
  51. package/dist/components/chat/chat-archive-page.d.ts +7 -0
  52. package/dist/components/chat/chat-archive-page.d.ts.map +1 -1
  53. package/dist/components/chat/chat-archive-page.js +9 -0
  54. package/dist/components/chat/chat-composer.d.ts +24 -4
  55. package/dist/components/chat/chat-composer.d.ts.map +1 -1
  56. package/dist/components/chat/chat-composer.js +90 -48
  57. package/dist/components/chat/chat-context-memory-bar.d.ts +4 -1
  58. package/dist/components/chat/chat-context-memory-bar.d.ts.map +1 -1
  59. package/dist/components/chat/chat-context-memory-bar.js +8 -5
  60. package/dist/components/chat/chat-context-picker.d.ts +8 -1
  61. package/dist/components/chat/chat-context-picker.d.ts.map +1 -1
  62. package/dist/components/chat/chat-context-picker.js +32 -9
  63. package/dist/components/chat/chat-header-rename-field.d.ts +18 -0
  64. package/dist/components/chat/chat-header-rename-field.d.ts.map +1 -0
  65. package/dist/components/chat/chat-header-rename-field.js +49 -0
  66. package/dist/components/chat/chat-input.d.ts.map +1 -1
  67. package/dist/components/chat/chat-input.js +5 -0
  68. package/dist/components/chat/composer-sheet.d.ts +44 -0
  69. package/dist/components/chat/composer-sheet.d.ts.map +1 -0
  70. package/dist/components/chat/composer-sheet.js +140 -0
  71. package/dist/components/chat/embeddable-chat.d.ts +114 -1
  72. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  73. package/dist/components/chat/embeddable-chat.js +328 -215
  74. package/dist/components/chat/index.cjs +118 -103
  75. package/dist/components/chat/index.d.ts +6 -0
  76. package/dist/components/chat/index.d.ts.map +1 -1
  77. package/dist/components/chat/index.js +9 -0
  78. package/dist/components/chat/mingo-chat-day-groups.d.ts +18 -0
  79. package/dist/components/chat/mingo-chat-day-groups.d.ts.map +1 -0
  80. package/dist/components/chat/mingo-chat-day-groups.js +45 -0
  81. package/dist/components/chat/mingo-chat-header.d.ts +34 -6
  82. package/dist/components/chat/mingo-chat-header.d.ts.map +1 -1
  83. package/dist/components/chat/mingo-chat-header.js +44 -7
  84. package/dist/components/chat/mingo-chat-history-section.d.ts +30 -0
  85. package/dist/components/chat/mingo-chat-history-section.d.ts.map +1 -0
  86. package/dist/components/chat/mingo-chat-history-section.js +500 -0
  87. package/dist/components/chat/mingo-chat-history.d.ts +5 -2
  88. package/dist/components/chat/mingo-chat-history.d.ts.map +1 -1
  89. package/dist/components/chat/mingo-chat-history.js +26 -30
  90. package/dist/components/chat/mingo-chat-list-shared.d.ts +136 -0
  91. package/dist/components/chat/mingo-chat-list-shared.d.ts.map +1 -0
  92. package/dist/components/chat/mingo-chat-list-shared.js +76 -0
  93. package/dist/components/chat/mingo-chat-rail.d.ts +19 -51
  94. package/dist/components/chat/mingo-chat-rail.d.ts.map +1 -1
  95. package/dist/components/chat/mingo-chat-rail.js +23 -45
  96. package/dist/components/chat/mingo-edge-light.d.ts +13 -0
  97. package/dist/components/chat/mingo-edge-light.d.ts.map +1 -0
  98. package/dist/components/chat/mingo-edge-light.js +17 -0
  99. package/dist/components/chat/mingo-history-rail.d.ts +5 -4
  100. package/dist/components/chat/mingo-history-rail.d.ts.map +1 -1
  101. package/dist/components/chat/mingo-history-rail.js +5 -10
  102. package/dist/components/chat/mingo-quick-action-wall.d.ts +27 -0
  103. package/dist/components/chat/mingo-quick-action-wall.d.ts.map +1 -0
  104. package/dist/components/chat/mingo-quick-action-wall.js +41 -0
  105. package/dist/components/chat/mingo-welcome.d.ts.map +1 -1
  106. package/dist/components/chat/mingo-welcome.js +6 -20
  107. package/dist/components/chat/model-display.d.ts.map +1 -1
  108. package/dist/components/chat/model-display.js +38 -9
  109. package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
  110. package/dist/components/chat/stream/chat-stream-reducer.js +2 -15
  111. package/dist/components/chat/thinking-display.d.ts.map +1 -1
  112. package/dist/components/chat/thinking-display.js +2 -1
  113. package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
  114. package/dist/components/chat/tool-execution-display.js +15 -1
  115. package/dist/components/chat/types/component.types.d.ts +13 -1
  116. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  117. package/dist/components/chat/utils/chat-day-label.d.ts +8 -0
  118. package/dist/components/chat/utils/chat-day-label.d.ts.map +1 -0
  119. package/dist/components/chat/utils/chat-day-label.js +21 -0
  120. package/dist/components/contact/index.cjs +109 -107
  121. package/dist/components/docs/index.cjs +112 -110
  122. package/dist/components/embeds/index.cjs +109 -107
  123. package/dist/components/faq/index.cjs +110 -108
  124. package/dist/components/features/board/board-column.d.ts +3 -1
  125. package/dist/components/features/board/board-column.d.ts.map +1 -1
  126. package/dist/components/features/board/board-column.js +6 -2
  127. package/dist/components/features/board/board.d.ts +6 -0
  128. package/dist/components/features/board/board.d.ts.map +1 -1
  129. package/dist/components/features/board/board.js +14 -3
  130. package/dist/components/features/board/touch-board.d.ts +1 -1
  131. package/dist/components/features/board/touch-board.d.ts.map +1 -1
  132. package/dist/components/features/board/touch-board.js +3 -1
  133. package/dist/components/features/index.cjs +108 -106
  134. package/dist/components/features/notifications/approval-request-notification-tile.d.ts +7 -1
  135. package/dist/components/features/notifications/approval-request-notification-tile.d.ts.map +1 -1
  136. package/dist/components/features/notifications/approval-request-notification-tile.js +1 -1
  137. package/dist/components/features/notifications/notification-drawer.d.ts +6 -1
  138. package/dist/components/features/notifications/notification-drawer.d.ts.map +1 -1
  139. package/dist/components/features/notifications/notification-drawer.js +3 -2
  140. package/dist/components/features/notifications/notification-tile.d.ts +4 -1
  141. package/dist/components/features/notifications/notification-tile.d.ts.map +1 -1
  142. package/dist/components/features/notifications/notification-tile.js +9 -7
  143. package/dist/components/features/time-tracker/time-tracker-header-button.d.ts +18 -1
  144. package/dist/components/features/time-tracker/time-tracker-header-button.d.ts.map +1 -1
  145. package/dist/components/features/time-tracker/time-tracker-header-button.js +31 -7
  146. package/dist/components/help-center-pages/index.cjs +217 -215
  147. package/dist/components/icons-v2-generated/icon-loaders.d.ts.map +1 -1
  148. package/dist/components/icons-v2-generated/icon-loaders.js +1 -0
  149. package/dist/components/icons-v2-generated/icon-names.js +1 -1
  150. package/dist/components/icons-v2-generated/index.cjs +90 -86
  151. package/dist/components/icons-v2-generated/loaders/dots-loader-icon.d.ts.map +1 -1
  152. package/dist/components/icons-v2-generated/loaders/dots-loader-icon.js +21 -24
  153. package/dist/components/icons-v2-generated/logos/index.d.ts +1 -0
  154. package/dist/components/icons-v2-generated/logos/index.d.ts.map +1 -1
  155. package/dist/components/icons-v2-generated/logos/index.js +2 -0
  156. package/dist/components/icons-v2-generated/logos/mingo-logo-icon.d.ts +9 -0
  157. package/dist/components/icons-v2-generated/logos/mingo-logo-icon.d.ts.map +1 -0
  158. package/dist/components/icons-v2-generated/logos/mingo-logo-icon.js +36 -0
  159. package/dist/components/index.cjs +215 -182
  160. package/dist/components/meeting-scheduler/index.cjs +182 -180
  161. package/dist/components/navigation/account-popover.d.ts +62 -0
  162. package/dist/components/navigation/account-popover.d.ts.map +1 -0
  163. package/dist/components/navigation/account-popover.js +138 -0
  164. package/dist/components/navigation/app-header.d.ts +36 -2
  165. package/dist/components/navigation/app-header.d.ts.map +1 -1
  166. package/dist/components/navigation/app-header.js +28 -24
  167. package/dist/components/navigation/app-layout-context.d.ts +17 -0
  168. package/dist/components/navigation/app-layout-context.d.ts.map +1 -1
  169. package/dist/components/navigation/app-layout-context.js +9 -1
  170. package/dist/components/navigation/app-layout.d.ts +93 -1
  171. package/dist/components/navigation/app-layout.d.ts.map +1 -1
  172. package/dist/components/navigation/app-layout.js +149 -30
  173. package/dist/components/navigation/header-button.d.ts +11 -1
  174. package/dist/components/navigation/header-button.d.ts.map +1 -1
  175. package/dist/components/navigation/header-button.js +16 -5
  176. package/dist/components/navigation/header-mingo-button.d.ts.map +1 -1
  177. package/dist/components/navigation/header-mingo-button.js +6 -5
  178. package/dist/components/navigation/index.cjs +120 -109
  179. package/dist/components/navigation/index.d.ts +10 -1
  180. package/dist/components/navigation/index.d.ts.map +1 -1
  181. package/dist/components/navigation/index.js +8 -0
  182. package/dist/components/navigation/mingo-ai-button.d.ts.map +1 -1
  183. package/dist/components/navigation/mingo-ai-button.js +2 -1
  184. package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
  185. package/dist/components/navigation/mobile-burger-menu.js +155 -39
  186. package/dist/components/navigation/navigation-sidebar-grouped.d.ts +57 -0
  187. package/dist/components/navigation/navigation-sidebar-grouped.d.ts.map +1 -0
  188. package/dist/components/navigation/navigation-sidebar-grouped.js +365 -0
  189. package/dist/components/navigation/navigation-sidebar-match.d.ts +37 -0
  190. package/dist/components/navigation/navigation-sidebar-match.d.ts.map +1 -0
  191. package/dist/components/navigation/navigation-sidebar-match.js +85 -0
  192. package/dist/components/navigation/navigation-sidebar-slot.d.ts +7 -0
  193. package/dist/components/navigation/navigation-sidebar-slot.d.ts.map +1 -0
  194. package/dist/components/navigation/navigation-sidebar-slot.js +11 -0
  195. package/dist/components/navigation/navigation-sidebar-toggle.d.ts +7 -1
  196. package/dist/components/navigation/navigation-sidebar-toggle.d.ts.map +1 -1
  197. package/dist/components/navigation/navigation-sidebar-toggle.js +52 -23
  198. package/dist/components/navigation/navigation-sidebar.d.ts +13 -1
  199. package/dist/components/navigation/navigation-sidebar.d.ts.map +1 -1
  200. package/dist/components/navigation/navigation-sidebar.js +188 -52
  201. package/dist/components/navigation/notifications-bell-button.d.ts +28 -0
  202. package/dist/components/navigation/notifications-bell-button.d.ts.map +1 -0
  203. package/dist/components/navigation/notifications-bell-button.js +44 -0
  204. package/dist/components/navigation/ticket-alerts-button.d.ts +7 -1
  205. package/dist/components/navigation/ticket-alerts-button.d.ts.map +1 -1
  206. package/dist/components/navigation/ticket-alerts-button.js +3 -2
  207. package/dist/components/onboarding-guides/index.cjs +111 -109
  208. package/dist/components/product-demo/index.cjs +119 -117
  209. package/dist/components/related-content/index.cjs +13 -13
  210. package/dist/components/tickets/index.cjs +115 -113
  211. package/dist/components/ui/actions-menu.d.ts +6 -1
  212. package/dist/components/ui/actions-menu.d.ts.map +1 -1
  213. package/dist/components/ui/actions-menu.js +6 -2
  214. package/dist/components/ui/fade-preview.d.ts +8 -0
  215. package/dist/components/ui/fade-preview.d.ts.map +1 -1
  216. package/dist/components/ui/fade-preview.js +7 -5
  217. package/dist/components/ui/index.cjs +136 -111
  218. package/dist/components/ui/index.d.ts +1 -0
  219. package/dist/components/ui/index.d.ts.map +1 -1
  220. package/dist/components/ui/index.js +1 -0
  221. package/dist/components/ui/mobile-action-bar.d.ts +14 -0
  222. package/dist/components/ui/mobile-action-bar.d.ts.map +1 -0
  223. package/dist/components/ui/mobile-action-bar.js +68 -0
  224. package/dist/components/ui/no-data/no-data-styles.d.ts +1 -1
  225. package/dist/components/ui/no-data/no-data-styles.d.ts.map +1 -1
  226. package/dist/components/ui/no-data/no-data-styles.js +1 -1
  227. package/dist/components/ui/page-actions.d.ts.map +1 -1
  228. package/dist/components/ui/page-actions.js +24 -8
  229. package/dist/components/ui/panel-resize-handle.d.ts +6 -2
  230. package/dist/components/ui/panel-resize-handle.d.ts.map +1 -1
  231. package/dist/components/ui/panel-resize-handle.js +6 -3
  232. package/dist/components/ui/square-avatar.d.ts.map +1 -1
  233. package/dist/components/ui/square-avatar.js +5 -2
  234. package/dist/{devices-DW5NDXMD.cjs → devices-JWG72ANF.cjs} +109 -107
  235. package/dist/dots-loader-icon-5JXWD6FB.cjs +7 -0
  236. package/dist/{embeddable-chat-NBJMXEXB.cjs → embeddable-chat-5UT6UHEO.cjs} +513 -398
  237. package/dist/hooks/index.cjs +15 -16
  238. package/dist/hooks/ui/use-content-breakpoint.d.ts +4 -2
  239. package/dist/hooks/ui/use-content-breakpoint.d.ts.map +1 -1
  240. package/dist/{icon-loaders-OLGJZGRP.cjs → icon-loaders-SUPEKMBJ.cjs} +2 -1
  241. package/dist/index.cjs +154 -121
  242. package/dist/{knowledge-EYJG2TNW.cjs → knowledge-DQXVSHME.cjs} +109 -107
  243. package/dist/{logs-2LV7DTSL.cjs → logs-Z33VBTVX.cjs} +118 -115
  244. package/dist/mingo-logo-icon-WGPBSDTF.cjs +7 -0
  245. package/dist/{policies-HSDYIQBX.cjs → policies-XE4UMH6Z.cjs} +112 -110
  246. package/dist/{remote-session-BQMTIQTU.cjs → remote-session-QGFG5WAL.cjs} +99 -97
  247. package/dist/{scripts-UI6V7ANQ.cjs → scripts-MECQG5GG.cjs} +115 -113
  248. package/dist/{software-update-WMLY7VHH.cjs → software-update-PCSIA6BP.cjs} +112 -110
  249. package/dist/{tickets-board-TRXOX77R.cjs → tickets-board-KCH6ITUV.cjs} +95 -94
  250. package/dist/types/navigation.d.ts +131 -0
  251. package/dist/types/navigation.d.ts.map +1 -1
  252. package/dist/utils/index.cjs +65 -25
  253. package/package.json +1 -1
  254. package/src/components/chat/approval-batch-message.tsx +3 -2
  255. package/src/components/chat/chat-archive-page.tsx +16 -0
  256. package/src/components/chat/chat-composer.tsx +131 -61
  257. package/src/components/chat/chat-context-memory-bar.tsx +27 -17
  258. package/src/components/chat/chat-context-picker.tsx +45 -11
  259. package/src/components/chat/chat-header-rename-field.tsx +68 -0
  260. package/src/components/chat/chat-input.tsx +9 -1
  261. package/src/components/chat/composer-sheet.tsx +196 -0
  262. package/src/components/chat/embeddable-chat.tsx +636 -319
  263. package/src/components/chat/index.ts +6 -0
  264. package/src/components/chat/mingo-chat-day-groups.ts +62 -0
  265. package/src/components/chat/mingo-chat-header.tsx +99 -23
  266. package/src/components/chat/mingo-chat-history-section.tsx +670 -0
  267. package/src/components/chat/mingo-chat-history.tsx +31 -45
  268. package/src/components/chat/mingo-chat-list-shared.tsx +244 -0
  269. package/src/components/chat/mingo-chat-rail.tsx +45 -97
  270. package/src/components/chat/mingo-edge-light.tsx +25 -0
  271. package/src/components/chat/mingo-history-rail.tsx +7 -17
  272. package/src/components/chat/mingo-quick-action-wall.tsx +64 -0
  273. package/src/components/chat/mingo-welcome.tsx +5 -19
  274. package/src/components/chat/model-display.tsx +66 -14
  275. package/src/components/chat/stream/chat-stream-reducer.ts +4 -18
  276. package/src/components/chat/thinking-display.tsx +2 -1
  277. package/src/components/chat/tool-execution-display.tsx +9 -1
  278. package/src/components/chat/types/component.types.ts +13 -1
  279. package/src/components/chat/utils/chat-day-label.ts +24 -0
  280. package/src/components/features/board/board-column.tsx +8 -0
  281. package/src/components/features/board/board.tsx +16 -2
  282. package/src/components/features/board/touch-board.tsx +2 -0
  283. package/src/components/features/notifications/approval-request-notification-tile.tsx +8 -2
  284. package/src/components/features/notifications/notification-drawer.tsx +7 -1
  285. package/src/components/features/notifications/notification-tile.tsx +17 -9
  286. package/src/components/features/time-tracker/time-tracker-header-button.tsx +53 -6
  287. package/src/components/icons-v2/icon-colors.json +4 -0
  288. package/src/components/icons-v2-generated/icon-loaders.ts +1 -0
  289. package/src/components/icons-v2-generated/icon-names.ts +1 -1
  290. package/src/components/icons-v2-generated/loaders/dots-loader-icon.tsx +18 -27
  291. package/src/components/icons-v2-generated/logos/index.ts +1 -0
  292. package/src/components/icons-v2-generated/logos/mingo-logo-icon.tsx +35 -0
  293. package/src/components/navigation/account-popover.tsx +198 -0
  294. package/src/components/navigation/app-header.tsx +74 -33
  295. package/src/components/navigation/app-layout-context.ts +22 -0
  296. package/src/components/navigation/app-layout.tsx +290 -24
  297. package/src/components/navigation/header-button.tsx +27 -5
  298. package/src/components/navigation/header-mingo-button.tsx +6 -5
  299. package/src/components/navigation/index.ts +19 -0
  300. package/src/components/navigation/mingo-ai-button.tsx +2 -3
  301. package/src/components/navigation/mobile-burger-menu.tsx +219 -53
  302. package/src/components/navigation/navigation-sidebar-grouped.tsx +554 -0
  303. package/src/components/navigation/navigation-sidebar-match.ts +152 -0
  304. package/src/components/navigation/navigation-sidebar-slot.ts +12 -0
  305. package/src/components/navigation/navigation-sidebar-toggle.tsx +39 -6
  306. package/src/components/navigation/navigation-sidebar.tsx +278 -61
  307. package/src/components/navigation/notifications-bell-button.tsx +70 -0
  308. package/src/components/navigation/ticket-alerts-button.tsx +9 -2
  309. package/src/components/ui/actions-menu.tsx +19 -3
  310. package/src/components/ui/fade-preview.tsx +13 -6
  311. package/src/components/ui/index.ts +1 -0
  312. package/src/components/ui/mobile-action-bar.ts +87 -0
  313. package/src/components/ui/no-data/no-data-styles.ts +5 -2
  314. package/src/components/ui/page-actions.tsx +38 -11
  315. package/src/components/ui/panel-resize-handle.tsx +14 -5
  316. package/src/components/ui/square-avatar.tsx +5 -2
  317. package/src/hooks/ui/use-content-breakpoint.ts +4 -2
  318. package/src/styles/ods-interaction-states.css +68 -0
  319. package/src/types/navigation.ts +140 -0
  320. package/dist/chunk-C7GIHB3V.cjs +0 -59
  321. package/dist/dots-loader-icon-RBLX46X7.cjs +0 -7
  322. package/dist/{chunk-ZOZR3QI2.cjs → chunk-46547WQW.cjs} +0 -0
  323. package/dist/{video-file-player-IAMWBKEQ.cjs → video-file-player-IHO66P2Q.cjs} +1 -1
@@ -0,0 +1,500 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useControllableState } from "@radix-ui/react-use-controllable-state";
4
+ import { useEffect, useId, useRef, useState } from "react";
5
+ import { createPortal } from "react-dom";
6
+ import { useDebounce } from "../../hooks/ui/use-debounce.js";
7
+ import { useVisitorOs } from "../../hooks/ui/use-visitor-os.js";
8
+ import { cn } from "../../utils/cn.js";
9
+ import { shortcutLabel, usesCommandKey } from "../../utils/visitor-os.js";
10
+ import {
11
+ ChatsIcon,
12
+ Ellipsis01Icon,
13
+ Filter01Icon,
14
+ MessagesIcon,
15
+ QuestionCircleIcon,
16
+ SearchIcon,
17
+ SearchXmarkIcon
18
+ } from "../icons-v2-generated/index.js";
19
+ import { LoadingRegion } from "../loading/loading-region.js";
20
+ import { UnifiedSkeleton } from "../loading/unified-skeleton.js";
21
+ import { ActionsMenuDropdown } from "../ui/actions-menu.js";
22
+ import { Button } from "../ui/button/index.js";
23
+ import { useLoadingScope } from "../ui/loading-scope.js";
24
+ import { ModalV2, ModalV2Header, ModalV2Title } from "../ui/modal-v2.js";
25
+ import { SearchInput } from "../ui/search-input.js";
26
+ import { SquareAvatar } from "../ui/square-avatar.js";
27
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../ui/tooltip.js";
28
+ import { chatDialogMenuItems, chatMenuIconClassName } from "./chat-dialog-menu-items.js";
29
+ import { ChatListEmptyState } from "./chat-list-empty-state.js";
30
+ import { ChatListItem } from "./chat-nav-sidebar.js";
31
+ import { groupDialogsByDay } from "./mingo-chat-day-groups.js";
32
+ import {
33
+ ChatListLoadError,
34
+ dialogOwnedByOther,
35
+ MINGO_DIALOG_STATUS_GLYPHS,
36
+ mingoDialogStatusOf,
37
+ useLoadMoreSentinel
38
+ } from "./mingo-chat-list-shared.js";
39
+ const UNTITLED = "New Chat";
40
+ const ICON_BUTTON_CLASS = "size-6 p-0 text-ods-text-secondary transition-colors hover:bg-transparent hover:text-ods-text-primary active:bg-transparent md:size-6";
41
+ const SKELETON_TITLE_WIDTHS = ["w-4/5", "w-3/5", "w-11/12", "w-2/3", "w-3/4", "w-1/2"];
42
+ function SkeletonRows({ count, offset = 0 }) {
43
+ return /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx("div", { className: "flex h-10 shrink-0 items-center px-[var(--spacing-system-xs)]", "aria-hidden": true, children: /* @__PURE__ */ jsx(
44
+ UnifiedSkeleton,
45
+ {
46
+ className: cn("h-4 rounded", SKELETON_TITLE_WIDTHS[(i + offset) % SKELETON_TITLE_WIDTHS.length])
47
+ }
48
+ ) }, i)) });
49
+ }
50
+ function HistorySkeleton() {
51
+ return /* @__PURE__ */ jsx(LoadingRegion, { label: "Loading chats", className: "flex flex-col gap-[var(--spacing-system-xs)]", children: [5, 4].map((rows, group) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
52
+ /* @__PURE__ */ jsx("div", { className: "flex h-7 items-center px-[var(--spacing-system-xs)]", "aria-hidden": true, children: /* @__PURE__ */ jsx(UnifiedSkeleton, { className: "h-3.5 w-16 rounded" }) }),
53
+ /* @__PURE__ */ jsx(SkeletonRows, { count: rows, offset: group * 2 })
54
+ ] }, rows)) });
55
+ }
56
+ function HistoryList({
57
+ dialogs,
58
+ activeDialogId,
59
+ draftTitle,
60
+ statusOf,
61
+ ownedByOther,
62
+ currentUserId,
63
+ hasMore = false,
64
+ isLoadingMore = false,
65
+ onLoadMore,
66
+ isLoadingHistory = false,
67
+ loadError = false,
68
+ onRetry,
69
+ onSelect,
70
+ loadMore = "scroll",
71
+ menuFor,
72
+ hasSearch
73
+ }) {
74
+ const onScroll = loadMore === "scroll";
75
+ const sentinelRef = useLoadMoreSentinel({
76
+ hasMore: hasMore && onScroll,
77
+ isLoadingMore,
78
+ onLoadMore,
79
+ itemCount: dialogs.length
80
+ });
81
+ const loading = useLoadingScope() || isLoadingHistory;
82
+ if (loadError) {
83
+ return /* @__PURE__ */ jsx(ChatListLoadError, { onRetry, className: "justify-center p-[var(--spacing-system-l)]" });
84
+ }
85
+ if (loading) return /* @__PURE__ */ jsx(HistorySkeleton, {});
86
+ if (dialogs.length === 0 && !draftTitle) {
87
+ return hasSearch ? /* @__PURE__ */ jsx(
88
+ ChatListEmptyState,
89
+ {
90
+ icon: /* @__PURE__ */ jsx(SearchXmarkIcon, { size: 24 }),
91
+ title: "No chats found",
92
+ description: "Try another search term"
93
+ }
94
+ ) : /* @__PURE__ */ jsx(
95
+ ChatListEmptyState,
96
+ {
97
+ icon: /* @__PURE__ */ jsx(ChatsIcon, { size: 24 }),
98
+ title: "No Current Chats",
99
+ description: "Previous Mingo sessions will show here"
100
+ }
101
+ );
102
+ }
103
+ const groups = groupDialogsByDay(dialogs);
104
+ const draftInToday = !!draftTitle && groups[0]?.key === "today";
105
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--spacing-system-xs)]", children: [
106
+ draftTitle && !draftInToday && /* @__PURE__ */ jsx(DayGroup, { label: "Today", children: /* @__PURE__ */ jsx(SectionRow, { title: draftTitle, active: true }) }),
107
+ groups.map((group, index) => /* @__PURE__ */ jsxs(DayGroup, { label: group.label, children: [
108
+ index === 0 && draftInToday && /* @__PURE__ */ jsx(SectionRow, { title: draftTitle, active: true }),
109
+ group.items.map((dialog) => /* @__PURE__ */ jsx(
110
+ SectionRow,
111
+ {
112
+ dialog,
113
+ title: dialog.title || UNTITLED,
114
+ active: dialog.id === activeDialogId,
115
+ status: mingoDialogStatusOf(dialog, statusOf),
116
+ ownerName: dialogOwnedByOther(dialog, ownedByOther, currentUserId) ? dialog.owner?.name || void 0 : void 0,
117
+ ownerAvatarUrl: dialog.owner?.avatarUrl || void 0,
118
+ onSelect,
119
+ menuItems: menuFor?.(dialog)
120
+ },
121
+ dialog.id
122
+ ))
123
+ ] }, group.key)),
124
+ isLoadingMore && /* @__PURE__ */ jsx(LoadingRegion, { label: "Loading more chats", className: "flex flex-col", children: /* @__PURE__ */ jsx(SkeletonRows, { count: 3 }) }),
125
+ hasMore && onScroll && /* @__PURE__ */ jsx("div", { ref: sentinelRef, className: "h-px shrink-0", "aria-hidden": true }),
126
+ hasMore && !onScroll && !isLoadingMore && onLoadMore && /* @__PURE__ */ jsx(
127
+ Button,
128
+ {
129
+ variant: "link",
130
+ size: "compact",
131
+ type: "button",
132
+ "data-tone": "neutral",
133
+ onClick: onLoadMore,
134
+ className: "self-start px-[var(--spacing-system-xs)]",
135
+ children: "Show more"
136
+ }
137
+ )
138
+ ] });
139
+ }
140
+ function MingoChatHistorySection({
141
+ dialogs,
142
+ activeDialogId,
143
+ onSelectDialog,
144
+ draftTitle,
145
+ onOpenArchive,
146
+ onWhatToAsk,
147
+ moreMenuItems = [],
148
+ statusOf,
149
+ onRequestRename,
150
+ onRequestArchive,
151
+ onRequestCopyLink,
152
+ onRequestCompact,
153
+ scope,
154
+ onScopeChange,
155
+ searchQuery,
156
+ onSearchChange,
157
+ searchOpen: searchOpenProp,
158
+ onSearchOpenChange,
159
+ hasMore = false,
160
+ isLoadingMore = false,
161
+ onLoadMore,
162
+ loadMore = "scroll",
163
+ isLoadingHistory = false,
164
+ loadError = false,
165
+ onRetry,
166
+ ownedByOther,
167
+ currentUserId,
168
+ className
169
+ }) {
170
+ const captionId = useId();
171
+ const visitor = useVisitorOs();
172
+ const [searchOpen, setSearchOpen] = useControllableState({
173
+ prop: searchOpenProp,
174
+ defaultProp: false,
175
+ onChange: onSearchOpenChange
176
+ });
177
+ const hasSearch = !!searchQuery?.trim();
178
+ const showSearch = searchOpen && !!onSearchChange;
179
+ const shortcut = visitor.known ? shortcutLabel(visitor.os, "K") : null;
180
+ const listProps = {
181
+ dialogs,
182
+ activeDialogId,
183
+ statusOf,
184
+ ownedByOther,
185
+ currentUserId,
186
+ hasMore,
187
+ isLoadingMore,
188
+ onLoadMore,
189
+ isLoadingHistory,
190
+ loadError,
191
+ onRetry
192
+ };
193
+ const moreMenu = [
194
+ ...onOpenArchive ? [
195
+ {
196
+ id: "archive",
197
+ label: "Chat archive",
198
+ icon: /* @__PURE__ */ jsx(MessagesIcon, { className: chatMenuIconClassName }),
199
+ onClick: onOpenArchive
200
+ }
201
+ ] : [],
202
+ ...onWhatToAsk ? [
203
+ {
204
+ id: "what-to-ask",
205
+ label: "What to ask Mingo?",
206
+ icon: /* @__PURE__ */ jsx(QuestionCircleIcon, { className: chatMenuIconClassName }),
207
+ onClick: onWhatToAsk
208
+ }
209
+ ] : [],
210
+ ...moreMenuItems
211
+ ];
212
+ const scopeMenu = scope && onScopeChange && !loadError ? [
213
+ {
214
+ id: "my",
215
+ label: "My chats",
216
+ type: "radio",
217
+ checked: scope === "my",
218
+ onClick: () => onScopeChange("my")
219
+ },
220
+ {
221
+ id: "all",
222
+ label: "All chats",
223
+ type: "radio",
224
+ checked: scope === "all",
225
+ onClick: () => onScopeChange("all")
226
+ }
227
+ ] : [];
228
+ return /* @__PURE__ */ jsxs(TooltipProvider, { delayDuration: 300, children: [
229
+ /* @__PURE__ */ jsxs(
230
+ "section",
231
+ {
232
+ "aria-labelledby": captionId,
233
+ className: cn("flex w-full min-w-0 flex-col gap-[var(--spacing-system-xs)]", className),
234
+ children: [
235
+ /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-[var(--spacing-system-xs)] px-[var(--spacing-system-xs)]", children: [
236
+ /* @__PURE__ */ jsx("h2", { id: captionId, className: "min-w-0 flex-1 truncate text-ods-text-secondary text-h5", children: "Chat history" }),
237
+ onSearchChange && /* @__PURE__ */ jsxs(Tooltip, { children: [
238
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
239
+ Button,
240
+ {
241
+ variant: "transparent",
242
+ size: "icon",
243
+ "aria-label": "Search chats",
244
+ "aria-keyshortcuts": shortcut ? usesCommandKey(visitor.os) ? "Meta+K" : "Control+K" : void 0,
245
+ onClick: () => setSearchOpen(true),
246
+ className: ICON_BUTTON_CLASS,
247
+ children: /* @__PURE__ */ jsx(SearchIcon, { size: 20 })
248
+ }
249
+ ) }),
250
+ /* @__PURE__ */ jsx(TooltipContent, { side: "bottom", children: shortcut ? `Search chats \xB7 ${shortcut}` : "Search chats" })
251
+ ] }),
252
+ scopeMenu.length > 0 && /* @__PURE__ */ jsxs(Tooltip, { children: [
253
+ /* @__PURE__ */ jsx(
254
+ ActionsMenuDropdown,
255
+ {
256
+ triggerAriaLabel: "Filter chats",
257
+ groups: [{ items: scopeMenu }],
258
+ onCloseAutoFocus: (e) => e.preventDefault(),
259
+ customTrigger: /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
260
+ Button,
261
+ {
262
+ variant: "transparent",
263
+ size: "icon",
264
+ "aria-label": "Filter chats",
265
+ className: cn(ICON_BUTTON_CLASS, scope === "all" && "text-ods-accent"),
266
+ children: /* @__PURE__ */ jsx(Filter01Icon, { size: 20 })
267
+ }
268
+ ) })
269
+ }
270
+ ),
271
+ /* @__PURE__ */ jsx(TooltipContent, { side: "bottom", children: scope === "all" ? "Showing all chats" : "Showing my chats" })
272
+ ] }),
273
+ moreMenu.length > 0 && /* @__PURE__ */ jsxs(Tooltip, { children: [
274
+ /* @__PURE__ */ jsx(
275
+ ActionsMenuDropdown,
276
+ {
277
+ triggerAriaLabel: "More",
278
+ groups: [{ items: moreMenu }],
279
+ onCloseAutoFocus: (e) => e.preventDefault(),
280
+ customTrigger: /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "transparent", size: "icon", "aria-label": "More", className: ICON_BUTTON_CLASS, children: /* @__PURE__ */ jsx(Ellipsis01Icon, { size: 20 }) }) })
281
+ }
282
+ ),
283
+ /* @__PURE__ */ jsx(TooltipContent, { side: "bottom", children: "More" })
284
+ ] })
285
+ ] }),
286
+ /* @__PURE__ */ jsx(
287
+ HistoryList,
288
+ {
289
+ ...listProps,
290
+ hasSearch,
291
+ draftTitle,
292
+ onSelect: onSelectDialog,
293
+ loadMore,
294
+ menuFor: (dialog) => chatDialogMenuItems({
295
+ onCopyLink: onRequestCopyLink && (() => onRequestCopyLink(dialog)),
296
+ onRename: onRequestRename && (() => onRequestRename(dialog)),
297
+ onCompact: onRequestCompact && (() => onRequestCompact(dialog)),
298
+ onArchive: onRequestArchive && (() => onRequestArchive(dialog))
299
+ })
300
+ }
301
+ )
302
+ ]
303
+ }
304
+ ),
305
+ searchOpenProp === void 0 && onSearchChange && /* @__PURE__ */ jsx(
306
+ MingoChatSearchModal,
307
+ {
308
+ ...listProps,
309
+ open: showSearch,
310
+ onOpenChange: setSearchOpen,
311
+ searchQuery,
312
+ onSearchChange,
313
+ onSelectDialog
314
+ }
315
+ )
316
+ ] });
317
+ }
318
+ function MingoChatSearchModal({
319
+ open,
320
+ onOpenChange,
321
+ searchQuery,
322
+ onSearchChange,
323
+ onSelectDialog,
324
+ ...listProps
325
+ }) {
326
+ if (!open || typeof document === "undefined") return null;
327
+ return createPortal(
328
+ /* @__PURE__ */ jsx(SearchModalContent, { initialValue: searchQuery, onSearchChange, onClose: () => onOpenChange(false), children: /* @__PURE__ */ jsx(
329
+ HistoryList,
330
+ {
331
+ ...listProps,
332
+ hasSearch: !!searchQuery?.trim(),
333
+ onSelect: (id) => {
334
+ onOpenChange(false);
335
+ if (searchQuery?.trim()) onSearchChange("");
336
+ onSelectDialog?.(id);
337
+ }
338
+ }
339
+ ) }),
340
+ document.body
341
+ );
342
+ }
343
+ function SearchModalContent({ initialValue, onSearchChange, onClose, children }) {
344
+ const [value, setValue] = useState(initialValue ?? "");
345
+ const debounced = useDebounce(value, 300);
346
+ const lastSent = useRef(initialValue ?? "");
347
+ const fieldRef = useRef(null);
348
+ const send = (term) => {
349
+ if (term === lastSent.current) return;
350
+ lastSent.current = term;
351
+ onSearchChange(term);
352
+ };
353
+ useEffect(() => {
354
+ if (debounced === lastSent.current) return;
355
+ lastSent.current = debounced;
356
+ onSearchChange(debounced);
357
+ }, [debounced, onSearchChange]);
358
+ useEffect(() => {
359
+ const frame = requestAnimationFrame(() => fieldRef.current?.querySelector("input")?.focus());
360
+ return () => cancelAnimationFrame(frame);
361
+ }, []);
362
+ const close = () => {
363
+ send("");
364
+ onClose();
365
+ };
366
+ return /* @__PURE__ */ jsxs(ModalV2, { isOpen: true, onClose: close, className: "md:max-w-[600px]", children: [
367
+ /* @__PURE__ */ jsx(ModalV2Header, { children: /* @__PURE__ */ jsx(ModalV2Title, { children: "Search chats" }) }),
368
+ /* @__PURE__ */ jsx("div", { ref: fieldRef, role: "search", "aria-label": "Search chats", className: "w-full", children: /* @__PURE__ */ jsx(
369
+ SearchInput,
370
+ {
371
+ value,
372
+ onChange: setValue,
373
+ onSubmit: send,
374
+ placeholder: "Search for Chats",
375
+ showDropdown: false
376
+ }
377
+ ) }),
378
+ /* @__PURE__ */ jsx("div", { className: "max-h-[min(480px,55vh)] w-full overflow-y-auto", children })
379
+ ] });
380
+ }
381
+ function DayGroup({ label, children }) {
382
+ const labelId = useId();
383
+ return (
384
+ // A day that arrives with a page (or replaces the placeholder) fades in rather than popping.
385
+ /* @__PURE__ */ jsxs(
386
+ "div",
387
+ {
388
+ role: "group",
389
+ "aria-labelledby": labelId,
390
+ className: "flex shrink-0 flex-col duration-300 animate-in fade-in motion-reduce:animate-none",
391
+ children: [
392
+ /* @__PURE__ */ jsx(
393
+ "p",
394
+ {
395
+ id: labelId,
396
+ className: "px-[var(--spacing-system-xs)] py-[var(--spacing-system-xxs)] text-ods-text-secondary text-h6",
397
+ children: label
398
+ }
399
+ ),
400
+ children
401
+ ]
402
+ }
403
+ )
404
+ );
405
+ }
406
+ function SectionRow({
407
+ dialog,
408
+ title,
409
+ active,
410
+ status,
411
+ ownerName,
412
+ ownerAvatarUrl,
413
+ onSelect,
414
+ menuItems = []
415
+ }) {
416
+ const [menuOpen, setMenuOpen] = useState(false);
417
+ const hasMenu = menuItems.length > 0;
418
+ const glyph = status ? MINGO_DIALOG_STATUS_GLYPHS[status] : void 0;
419
+ return (
420
+ // A row that lands in a day already on screen (the next page) fades in too.
421
+ /* @__PURE__ */ jsxs("div", { className: "group/row relative shrink-0 duration-300 animate-in fade-in motion-reduce:animate-none", children: [
422
+ /* @__PURE__ */ jsx(
423
+ ChatListItem,
424
+ {
425
+ active,
426
+ title,
427
+ tabIndex: dialog ? void 0 : -1,
428
+ onClick: dialog ? () => onSelect?.(dialog.id) : void 0,
429
+ className: cn(
430
+ "transition-colors duration-150",
431
+ !active && "hover:bg-ods-bg-hover",
432
+ !dialog && "cursor-default"
433
+ ),
434
+ trailing: glyph || ownerName || hasMenu ? /* @__PURE__ */ jsxs(
435
+ "span",
436
+ {
437
+ className: cn(
438
+ "flex min-w-6 items-center justify-end gap-[var(--spacing-system-xxs)] transition-opacity",
439
+ hasMenu && "group-hover/row:opacity-0 group-has-[:focus-visible]/row:opacity-0",
440
+ menuOpen && "opacity-0"
441
+ ),
442
+ children: [
443
+ glyph && /* @__PURE__ */ jsx("span", { role: "img", "aria-label": glyph.label, className: "flex", children: glyph.icon }),
444
+ ownerName && /* @__PURE__ */ jsx(
445
+ SquareAvatar,
446
+ {
447
+ role: "img",
448
+ "aria-label": `Owner: ${ownerName}`,
449
+ title: ownerName,
450
+ variant: "round",
451
+ sizePx: 24,
452
+ src: ownerAvatarUrl,
453
+ alt: ownerName,
454
+ fallback: ownerName,
455
+ initialsClassName: "text-ods-text-secondary text-badge"
456
+ }
457
+ )
458
+ ]
459
+ }
460
+ ) : void 0
461
+ }
462
+ ),
463
+ hasMenu && // Revealed on hover or keyboard focus in the row (not a click's focus, which
464
+ // would keep it over the status), and kept while its menu is open.
465
+ /* @__PURE__ */ jsx(
466
+ "span",
467
+ {
468
+ className: cn(
469
+ "absolute inset-y-0 right-[var(--spacing-system-xs)] flex items-center transition-opacity",
470
+ menuOpen ? "opacity-100" : "opacity-0 group-hover/row:opacity-100 group-has-[:focus-visible]/row:opacity-100"
471
+ ),
472
+ children: /* @__PURE__ */ jsx(
473
+ ActionsMenuDropdown,
474
+ {
475
+ triggerAriaLabel: `Actions for ${title}`,
476
+ groups: [{ items: menuItems }],
477
+ open: menuOpen,
478
+ onOpenChange: setMenuOpen,
479
+ onCloseAutoFocus: (e) => e.preventDefault(),
480
+ customTrigger: /* @__PURE__ */ jsx(
481
+ Button,
482
+ {
483
+ variant: "transparent",
484
+ size: "icon",
485
+ "aria-label": `Actions for ${title}`,
486
+ className: "size-6 p-0 text-ods-text-secondary hover:text-ods-text-primary md:size-6",
487
+ children: /* @__PURE__ */ jsx(Ellipsis01Icon, { size: 20 })
488
+ }
489
+ )
490
+ }
491
+ )
492
+ }
493
+ )
494
+ ] })
495
+ );
496
+ }
497
+ export {
498
+ MingoChatHistorySection,
499
+ MingoChatSearchModal
500
+ };
@@ -33,8 +33,11 @@ export interface MingoChatHistoryProps {
33
33
  hasMore?: boolean;
34
34
  /** True while the next page is loading. */
35
35
  isLoadingMore?: boolean;
36
- /** Fetch the next page — fired when the bottom sentinel scrolls into view. */
36
+ /** Fetch the next page — fired when the bottom sentinel scrolls into view, or on "Show more" (`loadMore`). */
37
37
  onLoadMore?: () => void;
38
+ /** How the next page loads: as the list's end scrolls into view (`'scroll'`, the default), or on a
39
+ * "Show more" under it (`'button'`, a page at a time; it spins while the page loads). */
40
+ loadMore?: 'scroll' | 'button';
38
41
  /** The first page is still loading: the list draws its own loading state (one page of rows). Inside a
39
42
  * `LoadingScope` it does so whatever this says. */
40
43
  loading?: boolean;
@@ -55,5 +58,5 @@ export interface MingoChatHistoryProps {
55
58
  * sentinel that fires `onLoadMore`. While its first page loads (`loading`, or
56
59
  * inside a `LoadingScope`) it draws its own skeleton: one page of rows.
57
60
  */
58
- export declare function MingoChatHistory({ dialogs, activeDialogId, onSelectDialog, onRequestCopyLink, onRequestRename, onRequestCompact, onRequestArchive, searchQuery, hasMore, isLoadingMore, onLoadMore, loading, pageSize, className, }: MingoChatHistoryProps): import("react").JSX.Element;
61
+ export declare function MingoChatHistory({ dialogs, activeDialogId, onSelectDialog, onRequestCopyLink, onRequestRename, onRequestCompact, onRequestArchive, searchQuery, hasMore, isLoadingMore, onLoadMore, loadMore, loading, pageSize, className, }: MingoChatHistoryProps): import("react").JSX.Element;
59
62
  //# sourceMappingURL=mingo-chat-history.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mingo-chat-history.d.ts","sourceRoot":"","sources":["../../../src/components/chat/mingo-chat-history.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAgBzC,MAAM,WAAW,qBAAqB;IACpC,wEAAwE;IACxE,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACnC,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB;IACrB,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;6DACyD;IACzD,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC/C;0CACsC;IACtC,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD;;wDAEoD;IACpD,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD;;gFAE4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;wDACoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA0QD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,OAAe,EACf,aAAqB,EACrB,UAAU,EACV,OAAe,EACf,QAAiC,EACjC,SAAS,GACV,EAAE,qBAAqB,+BAmGvB"}
1
+ {"version":3,"file":"mingo-chat-history.d.ts","sourceRoot":"","sources":["../../../src/components/chat/mingo-chat-history.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAgBzC,MAAM,WAAW,qBAAqB;IACpC,wEAAwE;IACxE,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACnC,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB;IACrB,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;6DACyD;IACzD,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC/C;0CACsC;IACtC,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD;;wDAEoD;IACpD,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD;;gFAE4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8GAA8G;IAC9G,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;8FAC0F;IAC1F,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC/B;wDACoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAoQD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,OAAe,EACf,aAAqB,EACrB,UAAU,EACV,QAAmB,EACnB,OAAe,EACf,QAAiC,EACjC,SAAS,GACV,EAAE,qBAAqB,+BAqFvB"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useState, useMemo, useRef, useEffect } from "react";
3
+ import { useState, useMemo } from "react";
4
4
  import { cn } from "../../utils/cn.js";
5
5
  import { Ellipsis01Icon, SearchXmarkIcon } from "../icons-v2-generated/index.js";
6
6
  import { LoadingRegion } from "../loading/loading-region.js";
@@ -13,6 +13,8 @@ import { SquareAvatar } from "../ui/square-avatar.js";
13
13
  import { chatDialogMenuItems } from "./chat-dialog-menu-items.js";
14
14
  import { ChatListEmptyState } from "./chat-list-empty-state.js";
15
15
  import { SKELETON_TITLE_WIDTHS } from "./chat-nav-sidebar.js";
16
+ import { dialogTimestamp } from "./mingo-chat-day-groups.js";
17
+ import { useLoadMoreSentinel } from "./mingo-chat-list-shared.js";
16
18
  const CHAT_HISTORY_PAGE_SIZE = 20;
17
19
  const HISTORY_GROUP_CLASS = "flex flex-col gap-[var(--spacing-system-xxs)]";
18
20
  const HISTORY_GROUP_LABEL_CLASS = "text-ods-text-secondary text-h5";
@@ -20,11 +22,6 @@ const HISTORY_GROUP_BOX_CLASS = "overflow-hidden rounded-md border border-ods-bo
20
22
  const HISTORY_ROW_CLASS = "flex h-12 items-center border-b border-ods-border last:border-b-0";
21
23
  const HISTORY_ROW_CONTENT_CLASS = "p-[var(--spacing-system-s)]";
22
24
  const HISTORY_SKELETON_GROUPS = 2;
23
- function dialogTime(d) {
24
- if (!d.timestamp) return null;
25
- const t = typeof d.timestamp === "string" ? Date.parse(d.timestamp) : d.timestamp.getTime();
26
- return Number.isNaN(t) ? null : t;
27
- }
28
25
  function groupDialogs(dialogs) {
29
26
  const now = /* @__PURE__ */ new Date();
30
27
  const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime();
@@ -33,7 +30,7 @@ function groupDialogs(dialogs) {
33
30
  const yesterday = [];
34
31
  const older = [];
35
32
  for (const d of dialogs) {
36
- const t = dialogTime(d);
33
+ const t = dialogTimestamp(d);
37
34
  if (t !== null && t >= startOfToday) today.push(d);
38
35
  else if (t !== null && t >= startOfYesterday) yesterday.push(d);
39
36
  else older.push(d);
@@ -222,6 +219,7 @@ function MingoChatHistory({
222
219
  hasMore = false,
223
220
  isLoadingMore = false,
224
221
  onLoadMore,
222
+ loadMore = "scroll",
225
223
  loading = false,
226
224
  pageSize = CHAT_HISTORY_PAGE_SIZE,
227
225
  className
@@ -230,29 +228,14 @@ function MingoChatHistory({
230
228
  const groups = useMemo(() => groupDialogs(dialogs), [dialogs]);
231
229
  const noSearchResults = groups.length === 0 && !!searchQuery?.trim();
232
230
  const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
233
- const sentinelRef = useRef(null);
234
- const onLoadMoreRef = useRef(onLoadMore);
235
- const isLoadingMoreRef = useRef(isLoadingMore);
236
- useEffect(() => {
237
- onLoadMoreRef.current = onLoadMore;
238
- isLoadingMoreRef.current = isLoadingMore;
231
+ const onScroll = loadMore === "scroll";
232
+ const sentinelRef = useLoadMoreSentinel({
233
+ hasMore: hasMore && onScroll,
234
+ isLoadingMore,
235
+ onLoadMore,
236
+ itemCount: dialogs.length,
237
+ rootRef: scrollRef
239
238
  });
240
- const dialogCount = dialogs.length;
241
- useEffect(() => {
242
- const root = scrollRef.current;
243
- const sentinel = sentinelRef.current;
244
- if (!root || !sentinel || !hasMore || typeof IntersectionObserver === "undefined") return void 0;
245
- const io = new IntersectionObserver(
246
- ([entry]) => {
247
- if (entry.isIntersecting && !isLoadingMoreRef.current) {
248
- onLoadMoreRef.current?.();
249
- }
250
- },
251
- { root, rootMargin: "120px", threshold: 0.1 }
252
- );
253
- io.observe(sentinel);
254
- return () => io.disconnect();
255
- }, [hasMore, isLoadingMore, dialogCount, scrollRef]);
256
239
  if (isLoading) return /* @__PURE__ */ jsx(MingoChatHistorySkeleton, { rows: pageSize, className });
257
240
  return /* @__PURE__ */ jsx("div", { className: cn("relative flex min-h-0 flex-1 flex-col gap-[var(--spacing-system-m)]", className), children: /* @__PURE__ */ jsxs("div", { className: "relative flex min-h-0 flex-1 flex-col", children: [
258
241
  /* @__PURE__ */ jsxs(
@@ -290,7 +273,20 @@ function MingoChatHistory({
290
273
  dialog.id
291
274
  )) })
292
275
  ] }, group.key)),
293
- hasMore ? /* @__PURE__ */ jsx("div", { ref: sentinelRef, className: "h-px shrink-0" }) : null
276
+ hasMore && onScroll ? /* @__PURE__ */ jsx("div", { ref: sentinelRef, className: "h-px shrink-0" }) : null,
277
+ hasMore && !onScroll && onLoadMore ? /* @__PURE__ */ jsx(
278
+ Button,
279
+ {
280
+ variant: "link",
281
+ size: "compact",
282
+ type: "button",
283
+ "data-tone": "neutral",
284
+ loading: isLoadingMore,
285
+ onClick: onLoadMore,
286
+ className: "self-start px-[var(--spacing-system-xs)]",
287
+ children: "Show more"
288
+ }
289
+ ) : null
294
290
  ]
295
291
  }
296
292
  ),