@flamingo-stack/openframe-frontend-core 0.0.710 → 0.0.712

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 (534) hide show
  1. package/dist/chunk-2NASBO7O.js +1137 -0
  2. package/dist/{chunk-RQRX4YC3.cjs → chunk-2RKFMUNW.cjs} +46 -46
  3. package/dist/chunk-2Y7QZAB2.cjs +158 -0
  4. package/dist/chunk-34I6XI3N.js +136 -0
  5. package/dist/chunk-3K5ZLZE7.js +292 -0
  6. package/dist/chunk-3LU4UFPS.cjs +14 -0
  7. package/dist/{chunk-YBUT4AMG.cjs → chunk-3RKBJT6K.cjs} +8 -6
  8. package/dist/{chunk-LNW45N2C.js → chunk-3SEEGNRE.js} +35 -27
  9. package/dist/{chunk-L6Y6OOKG.cjs → chunk-3UAJLO5U.cjs} +41 -39
  10. package/dist/chunk-4HJRHEXD.cjs +1612 -0
  11. package/dist/{chunk-JPG7OHEG.js → chunk-4QFWGLZO.js} +1 -1
  12. package/dist/chunk-4R2L3DSA.js +14 -0
  13. package/dist/{chunk-36BCTE7D.js → chunk-4UYKNOZG.js} +12 -10
  14. package/dist/{chunk-DA5UDTLG.js → chunk-5SDELRH3.js} +5 -5
  15. package/dist/{chunk-CZSZSDD4.js → chunk-5Y72YQEK.js} +22 -113
  16. package/dist/{chunk-KUC673HM.js → chunk-6T3BTD6Q.js} +204 -982
  17. package/dist/{chunk-F57ECE2I.js → chunk-6YPTUHM7.js} +4 -4
  18. package/dist/{chunk-TDYIREDJ.js → chunk-7HNYYNKE.js} +28 -22
  19. package/dist/{chunk-2G7UYK35.cjs → chunk-7NSU5EQD.cjs} +57 -148
  20. package/dist/chunk-AAYNCJMW.cjs +48 -0
  21. package/dist/{chunk-FXJ3WWUB.js → chunk-ADBE7QF3.js} +5 -252
  22. package/dist/chunk-AECTRMGQ.cjs +334 -0
  23. package/dist/chunk-AGVXKD4K.js +334 -0
  24. package/dist/chunk-AL2GUHAJ.cjs +18 -0
  25. package/dist/{chunk-WMX26HB5.js → chunk-APJZBDQN.js} +12 -12
  26. package/dist/chunk-AUMKE74M.cjs +16 -0
  27. package/dist/chunk-B4NCVYEQ.cjs +292 -0
  28. package/dist/{chunk-2RNB5DTN.cjs → chunk-BXSRTBLU.cjs} +82 -54
  29. package/dist/chunk-CMGFZHCN.js +233 -0
  30. package/dist/chunk-CMZ3QTFQ.js +1207 -0
  31. package/dist/chunk-CPA2CKRZ.cjs +125 -0
  32. package/dist/{chunk-B73373AG.cjs → chunk-CSCJU6YC.cjs} +35 -33
  33. package/dist/chunk-CYUUHFXL.js +41 -0
  34. package/dist/chunk-DC4RTYWK.cjs +1122 -0
  35. package/dist/{chunk-6YKAT7NV.js → chunk-DDWFCWOE.js} +5 -7
  36. package/dist/{chunk-F5FF4DME.js → chunk-EFNKS5W4.js} +322 -428
  37. package/dist/{chunk-2KXTOP6G.cjs → chunk-EOKSKJSS.cjs} +25 -83
  38. package/dist/{chunk-6NTPY5QA.cjs → chunk-ETYLOZOB.cjs} +978 -2413
  39. package/dist/chunk-F5BPGWGT.cjs +931 -0
  40. package/dist/{chunk-4L6XCMOU.js → chunk-FCAVAEHF.js} +8277 -9990
  41. package/dist/chunk-FFT56TYB.cjs +401 -0
  42. package/dist/chunk-FYEJTF5Y.js +125 -0
  43. package/dist/chunk-G3GRYDMS.js +16 -0
  44. package/dist/{chunk-MR3A4MZV.js → chunk-G3OMVCID.js} +13 -7
  45. package/dist/chunk-G6OHIX5C.cjs +100 -0
  46. package/dist/{chunk-UDFRUKLC.cjs → chunk-GEDY7HQI.cjs} +2 -2
  47. package/dist/chunk-GQ7JJUIT.cjs +1207 -0
  48. package/dist/chunk-H3PKYE4N.js +18 -0
  49. package/dist/{chunk-CNWOMQQJ.js → chunk-H5R7U2D2.js} +206 -5
  50. package/dist/{chunk-SEXWHIMS.cjs → chunk-HETQETPV.cjs} +9648 -9680
  51. package/dist/{chunk-Y2GSOUCS.cjs → chunk-HWVUR735.cjs} +2 -2
  52. package/dist/chunk-II4QMH26.cjs +35 -0
  53. package/dist/chunk-ILNN6QRW.js +1612 -0
  54. package/dist/chunk-IYVFSLWJ.js +931 -0
  55. package/dist/{chunk-3AHTOSXJ.cjs → chunk-JGCFRTND.cjs} +23 -17
  56. package/dist/chunk-JHQ334WS.js +655 -0
  57. package/dist/{chunk-WCVZCGK5.cjs → chunk-JO5TLJPM.cjs} +129 -907
  58. package/dist/{chunk-JRU2CXLB.cjs → chunk-JVCAK4W3.cjs} +210 -9
  59. package/dist/chunk-KBJJQFYU.js +1122 -0
  60. package/dist/chunk-KEKCQENI.js +48 -0
  61. package/dist/chunk-KHXZFLIN.cjs +41 -0
  62. package/dist/chunk-KT3U3ZRP.cjs +1137 -0
  63. package/dist/chunk-L2VUINHN.js +35 -0
  64. package/dist/{chunk-P42V6N34.cjs → chunk-L6ZQGWCX.cjs} +4521 -6234
  65. package/dist/{chunk-PLYEKV3N.cjs → chunk-MA4Q5RBP.cjs} +6 -6
  66. package/dist/{chunk-SS5MBHDP.js → chunk-N67XG5GY.js} +10 -8
  67. package/dist/chunk-NPAQSMRY.js +2087 -0
  68. package/dist/{chunk-I3ST4PLM.js → chunk-NQWJAOHO.js} +6 -4
  69. package/dist/{chunk-QAOFMK2A.cjs → chunk-OBZJICEA.cjs} +8 -8
  70. package/dist/{chunk-6IW7TWPV.js → chunk-OPYODNV2.js} +3 -3
  71. package/dist/chunk-P3JMAMHP.js +401 -0
  72. package/dist/chunk-PPXR22YC.cjs +2087 -0
  73. package/dist/chunk-PSVSEN4J.cjs +655 -0
  74. package/dist/{chunk-4UM2ETLM.js → chunk-RBYVFPER.js} +74 -46
  75. package/dist/{chunk-PO33GZVY.js → chunk-ROBQ5TR7.js} +10549 -10581
  76. package/dist/{chunk-ZCLBYT2V.cjs → chunk-T3CLXR43.cjs} +114 -220
  77. package/dist/{chunk-FI6GMDO7.js → chunk-TTVOLEUS.js} +3605 -5040
  78. package/dist/{chunk-LM7TXMLU.cjs → chunk-ULWVKHSI.cjs} +8 -255
  79. package/dist/{chunk-6I4ZAFO2.cjs → chunk-UT3ODMBU.cjs} +15 -15
  80. package/dist/chunk-WANCBTUE.js +71 -0
  81. package/dist/{chunk-BIZNSF3U.cjs → chunk-WBNAEYTQ.cjs} +2 -51
  82. package/dist/chunk-WFPCCBOM.cjs +71 -0
  83. package/dist/chunk-WI6FHKD7.js +158 -0
  84. package/dist/chunk-WMNCVLES.js +100 -0
  85. package/dist/{chunk-UT4YHQZW.js → chunk-WSDT7LYL.js} +0 -49
  86. package/dist/chunk-WVOTC7HW.cjs +136 -0
  87. package/dist/{chunk-AOWDNSTM.cjs → chunk-WWJG4GVG.cjs} +93 -87
  88. package/dist/chunk-XXBLN4BP.cjs +233 -0
  89. package/dist/{chunk-4IBPRIQH.js → chunk-YBQQNDC7.js} +1 -1
  90. package/dist/{chunk-LFFB6EMB.js → chunk-YBS5QGON.js} +70 -128
  91. package/dist/{chunk-NSGXARGJ.cjs → chunk-Z5SWJW5Q.cjs} +125 -117
  92. package/dist/{chunk-OJLR5MEO.cjs → chunk-ZX7SCPLO.cjs} +6 -8
  93. package/dist/cloud-tenants-KZUZGD4A.cjs +117 -0
  94. package/dist/cloud-tenants-OGLVVQ7X.js +117 -0
  95. package/dist/components/case-studies/index.cjs +45 -29
  96. package/dist/components/case-studies/index.js +32 -16
  97. package/dist/components/chat/ask-prompts.d.ts +64 -0
  98. package/dist/components/chat/ask-prompts.d.ts.map +1 -0
  99. package/dist/components/chat/entity-cards/case-study-card.d.ts +6 -3
  100. package/dist/components/chat/entity-cards/case-study-card.d.ts.map +1 -1
  101. package/dist/components/chat/hooks/use-chat-dialog-manager.d.ts +4 -1
  102. package/dist/components/chat/hooks/use-chat-dialog-manager.d.ts.map +1 -1
  103. package/dist/components/chat/hooks/use-unified-chat.d.ts.map +1 -1
  104. package/dist/components/chat/index.cjs +27 -8
  105. package/dist/components/chat/index.d.ts +1 -0
  106. package/dist/components/chat/index.d.ts.map +1 -1
  107. package/dist/components/chat/index.js +57 -38
  108. package/dist/components/chat/quick-action-chip.d.ts +7 -3
  109. package/dist/components/chat/quick-action-chip.d.ts.map +1 -1
  110. package/dist/components/chat/types/component.types.d.ts +4 -0
  111. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  112. package/dist/components/chat/types/unified-chat-state.types.d.ts +12 -0
  113. package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
  114. package/dist/components/contact/index.cjs +29 -13
  115. package/dist/components/contact/index.js +28 -12
  116. package/dist/components/docs/index.cjs +33 -16
  117. package/dist/components/docs/index.js +33 -16
  118. package/dist/components/docs/use-scroll-spy.d.ts +23 -1
  119. package/dist/components/docs/use-scroll-spy.d.ts.map +1 -1
  120. package/dist/components/embeds/index.cjs +29 -13
  121. package/dist/components/embeds/index.js +28 -12
  122. package/dist/components/faq/faq-section.d.ts +8 -1
  123. package/dist/components/faq/faq-section.d.ts.map +1 -1
  124. package/dist/components/faq/index.cjs +30 -14
  125. package/dist/components/faq/index.js +29 -13
  126. package/dist/components/features/array-entry-manager.d.ts +5 -1
  127. package/dist/components/features/array-entry-manager.d.ts.map +1 -1
  128. package/dist/components/features/board/board.d.ts +2 -0
  129. package/dist/components/features/board/board.d.ts.map +1 -1
  130. package/dist/components/features/board/ticket-card.d.ts.map +1 -1
  131. package/dist/components/features/board/touch-board.d.ts +1 -1
  132. package/dist/components/features/board/touch-board.d.ts.map +1 -1
  133. package/dist/components/features/board/types.d.ts +3 -0
  134. package/dist/components/features/board/types.d.ts.map +1 -1
  135. package/dist/components/features/board/use-board-collapse.d.ts +6 -1
  136. package/dist/components/features/board/use-board-collapse.d.ts.map +1 -1
  137. package/dist/components/features/capability-explorer.d.ts +94 -0
  138. package/dist/components/features/capability-explorer.d.ts.map +1 -0
  139. package/dist/components/features/cloud-tenants/index.d.ts +14 -0
  140. package/dist/components/features/cloud-tenants/index.d.ts.map +1 -0
  141. package/dist/components/features/cloud-tenants/tenant-access-cell.d.ts +9 -0
  142. package/dist/components/features/cloud-tenants/tenant-access-cell.d.ts.map +1 -0
  143. package/dist/components/features/cloud-tenants/tenant-cell.d.ts +8 -0
  144. package/dist/components/features/cloud-tenants/tenant-cell.d.ts.map +1 -0
  145. package/dist/components/features/cloud-tenants/tenant-customer-cell.d.ts +9 -0
  146. package/dist/components/features/cloud-tenants/tenant-customer-cell.d.ts.map +1 -0
  147. package/dist/components/features/cloud-tenants/tenant-presentation.d.ts +42 -0
  148. package/dist/components/features/cloud-tenants/tenant-presentation.d.ts.map +1 -0
  149. package/dist/components/features/cloud-tenants/tenant-row.d.ts +22 -0
  150. package/dist/components/features/cloud-tenants/tenant-row.d.ts.map +1 -0
  151. package/dist/components/features/cloud-tenants/tenants-table-columns.d.ts +42 -0
  152. package/dist/components/features/cloud-tenants/tenants-table-columns.d.ts.map +1 -0
  153. package/dist/components/features/cloud-tenants/tenants-table-view.d.ts +26 -0
  154. package/dist/components/features/cloud-tenants/tenants-table-view.d.ts.map +1 -0
  155. package/dist/components/features/devices/device-last-online.d.ts +3 -0
  156. package/dist/components/features/devices/device-last-online.d.ts.map +1 -0
  157. package/dist/components/features/devices/device-name.d.ts +42 -0
  158. package/dist/components/features/devices/device-name.d.ts.map +1 -0
  159. package/dist/components/features/devices/device-selector/device-selection-mode-radio.d.ts +26 -0
  160. package/dist/components/features/devices/device-selector/device-selection-mode-radio.d.ts.map +1 -0
  161. package/dist/components/features/devices/device-selector/device-selector-skeleton.d.ts +25 -0
  162. package/dist/components/features/devices/device-selector/device-selector-skeleton.d.ts.map +1 -0
  163. package/dist/components/features/devices/device-selector/device-selector.d.ts +38 -0
  164. package/dist/components/features/devices/device-selector/device-selector.d.ts.map +1 -0
  165. package/dist/components/features/devices/device-selector/device-selector.types.d.ts +133 -0
  166. package/dist/components/features/devices/device-selector/device-selector.types.d.ts.map +1 -0
  167. package/dist/components/features/devices/device-selector/narrowing.d.ts +13 -0
  168. package/dist/components/features/devices/device-selector/narrowing.d.ts.map +1 -0
  169. package/dist/components/features/devices/device-selector/use-device-selector.d.ts +17 -0
  170. package/dist/components/features/devices/device-selector/use-device-selector.d.ts.map +1 -0
  171. package/dist/components/features/devices/device-status.d.ts +23 -0
  172. package/dist/components/features/devices/device-status.d.ts.map +1 -0
  173. package/dist/components/features/devices/device-statuses.d.ts +40 -0
  174. package/dist/components/features/devices/device-statuses.d.ts.map +1 -0
  175. package/dist/components/features/devices/device-tags-filter-button.d.ts +22 -0
  176. package/dist/components/features/devices/device-tags-filter-button.d.ts.map +1 -0
  177. package/dist/components/features/devices/device-type-icon.d.ts +11 -0
  178. package/dist/components/features/devices/device-type-icon.d.ts.map +1 -0
  179. package/dist/components/features/devices/device-type-tile.d.ts +9 -0
  180. package/dist/components/features/devices/device-type-tile.d.ts.map +1 -0
  181. package/dist/components/features/devices/devices-filter-toolbar.d.ts +46 -0
  182. package/dist/components/features/devices/devices-filter-toolbar.d.ts.map +1 -0
  183. package/dist/components/features/devices/devices-grid-filters.d.ts +25 -0
  184. package/dist/components/features/devices/devices-grid-filters.d.ts.map +1 -0
  185. package/dist/components/features/devices/devices-grid.d.ts +12 -0
  186. package/dist/components/features/devices/devices-grid.d.ts.map +1 -0
  187. package/dist/components/features/devices/devices-list.d.ts +131 -0
  188. package/dist/components/features/devices/devices-list.d.ts.map +1 -0
  189. package/dist/components/features/devices/devices-panel-header.d.ts +46 -0
  190. package/dist/components/features/devices/devices-panel-header.d.ts.map +1 -0
  191. package/dist/components/features/devices/devices-panel-view.d.ts +79 -0
  192. package/dist/components/features/devices/devices-panel-view.d.ts.map +1 -0
  193. package/dist/components/features/devices/devices-table-columns.d.ts +76 -0
  194. package/dist/components/features/devices/devices-table-columns.d.ts.map +1 -0
  195. package/dist/components/features/devices/devices-view-config.d.ts +25 -0
  196. package/dist/components/features/devices/devices-view-config.d.ts.map +1 -0
  197. package/dist/components/features/devices/index.d.ts +24 -0
  198. package/dist/components/features/devices/index.d.ts.map +1 -0
  199. package/dist/components/features/devices/types.d.ts +68 -0
  200. package/dist/components/features/devices/types.d.ts.map +1 -0
  201. package/dist/components/features/devices/use-tag-filter-modal.d.ts +50 -0
  202. package/dist/components/features/devices/use-tag-filter-modal.d.ts.map +1 -0
  203. package/dist/components/features/index.cjs +227 -12
  204. package/dist/components/features/index.d.ts +7 -0
  205. package/dist/components/features/index.d.ts.map +1 -1
  206. package/dist/components/features/index.js +266 -51
  207. package/dist/components/features/knowledge-base/index.d.ts +7 -0
  208. package/dist/components/features/knowledge-base/index.d.ts.map +1 -0
  209. package/dist/components/features/knowledge-base/knowledge-base-article-view.d.ts +44 -0
  210. package/dist/components/features/knowledge-base/knowledge-base-article-view.d.ts.map +1 -0
  211. package/dist/components/features/knowledge-base/knowledge-base-item-icon.d.ts +13 -0
  212. package/dist/components/features/knowledge-base/knowledge-base-item-icon.d.ts.map +1 -0
  213. package/dist/components/features/knowledge-base/knowledge-base-status.d.ts +8 -0
  214. package/dist/components/features/knowledge-base/knowledge-base-status.d.ts.map +1 -0
  215. package/dist/components/features/knowledge-base/knowledge-base-table.d.ts +52 -0
  216. package/dist/components/features/knowledge-base/knowledge-base-table.d.ts.map +1 -0
  217. package/dist/components/features/logs/index.d.ts +12 -0
  218. package/dist/components/features/logs/index.d.ts.map +1 -0
  219. package/dist/components/features/logs/log-drawer.d.ts +29 -0
  220. package/dist/components/features/logs/log-drawer.d.ts.map +1 -0
  221. package/dist/components/features/logs/log-source-labels.d.ts +11 -0
  222. package/dist/components/features/logs/log-source-labels.d.ts.map +1 -0
  223. package/dist/components/features/logs/logs-page-view.d.ts +32 -0
  224. package/dist/components/features/logs/logs-page-view.d.ts.map +1 -0
  225. package/dist/components/features/logs/logs-table-columns.d.ts +15 -0
  226. package/dist/components/features/logs/logs-table-columns.d.ts.map +1 -0
  227. package/dist/components/features/logs/logs-table-view.d.ts +64 -0
  228. package/dist/components/features/logs/logs-table-view.d.ts.map +1 -0
  229. package/dist/components/features/logs/types.d.ts +52 -0
  230. package/dist/components/features/logs/types.d.ts.map +1 -0
  231. package/dist/components/features/policies/compute-policy-summary.d.ts +37 -0
  232. package/dist/components/features/policies/compute-policy-summary.d.ts.map +1 -0
  233. package/dist/components/features/policies/index.d.ts +8 -0
  234. package/dist/components/features/policies/index.d.ts.map +1 -0
  235. package/dist/components/features/policies/policies-table.d.ts +34 -0
  236. package/dist/components/features/policies/policies-table.d.ts.map +1 -0
  237. package/dist/components/features/policies/policy-summary-cards.d.ts +17 -0
  238. package/dist/components/features/policies/policy-summary-cards.d.ts.map +1 -0
  239. package/dist/components/features/policies/policy-table-row.d.ts +37 -0
  240. package/dist/components/features/policies/policy-table-row.d.ts.map +1 -0
  241. package/dist/components/features/remote-session/index.d.ts +8 -0
  242. package/dist/components/features/remote-session/index.d.ts.map +1 -1
  243. package/dist/components/features/remote-session/remote-desktop-chat-message-row.d.ts +21 -0
  244. package/dist/components/features/remote-session/remote-desktop-chat-message-row.d.ts.map +1 -0
  245. package/dist/components/features/remote-session/remote-desktop-chat-panel.d.ts +31 -0
  246. package/dist/components/features/remote-session/remote-desktop-chat-panel.d.ts.map +1 -0
  247. package/dist/components/features/remote-session/remote-desktop-fullscreen-toolbar.d.ts +21 -0
  248. package/dist/components/features/remote-session/remote-desktop-fullscreen-toolbar.d.ts.map +1 -0
  249. package/dist/components/features/remote-session/remote-desktop-view.d.ts +50 -0
  250. package/dist/components/features/remote-session/remote-desktop-view.d.ts.map +1 -0
  251. package/dist/components/features/software/index.d.ts +8 -0
  252. package/dist/components/features/software/index.d.ts.map +1 -0
  253. package/dist/components/features/software/package-managers.d.ts +30 -0
  254. package/dist/components/features/software/package-managers.d.ts.map +1 -0
  255. package/dist/components/features/software/package-search-field-placeholder.d.ts +7 -0
  256. package/dist/components/features/software/package-search-field-placeholder.d.ts.map +1 -0
  257. package/dist/components/features/software/schedule-fields.d.ts +34 -0
  258. package/dist/components/features/software/schedule-fields.d.ts.map +1 -0
  259. package/dist/components/features/software/software-action-copy.d.ts +25 -0
  260. package/dist/components/features/software/software-action-copy.d.ts.map +1 -0
  261. package/dist/components/features/software/software-action-form.d.ts +71 -0
  262. package/dist/components/features/software/software-action-form.d.ts.map +1 -0
  263. package/dist/components/features/software/software-row-fields.d.ts +23 -0
  264. package/dist/components/features/software/software-row-fields.d.ts.map +1 -0
  265. package/dist/components/features/software/software-row.d.ts +18 -0
  266. package/dist/components/features/software/software-row.d.ts.map +1 -0
  267. package/dist/components/features/sortable-list/index.d.ts +1 -0
  268. package/dist/components/features/sortable-list/index.d.ts.map +1 -1
  269. package/dist/components/features/sortable-list/sortable-drag-handle.d.ts +21 -0
  270. package/dist/components/features/sortable-list/sortable-drag-handle.d.ts.map +1 -0
  271. package/dist/components/help-center-pages/index.cjs +133 -114
  272. package/dist/components/help-center-pages/index.js +58 -39
  273. package/dist/components/index.cjs +320 -82
  274. package/dist/components/index.js +451 -213
  275. package/dist/components/layout/page-heading.d.ts +12 -3
  276. package/dist/components/layout/page-heading.d.ts.map +1 -1
  277. package/dist/components/meeting-scheduler/index.cjs +120 -98
  278. package/dist/components/meeting-scheduler/index.js +50 -28
  279. package/dist/components/navigation/index.cjs +36 -17
  280. package/dist/components/navigation/index.d.ts +3 -0
  281. package/dist/components/navigation/index.d.ts.map +1 -1
  282. package/dist/components/navigation/index.js +36 -17
  283. package/dist/components/navigation/mingo-ai-button.d.ts +23 -10
  284. package/dist/components/navigation/mingo-ai-button.d.ts.map +1 -1
  285. package/dist/components/navigation/sticky-section-nav.d.ts +14 -1
  286. package/dist/components/navigation/sticky-section-nav.d.ts.map +1 -1
  287. package/dist/components/onboarding-guides/index.cjs +32 -16
  288. package/dist/components/onboarding-guides/index.js +31 -15
  289. package/dist/components/product-demo/cast.d.ts +58 -0
  290. package/dist/components/product-demo/cast.d.ts.map +1 -0
  291. package/dist/components/product-demo/fixtures/cloud-tenants.d.ts +10 -0
  292. package/dist/components/product-demo/fixtures/cloud-tenants.d.ts.map +1 -0
  293. package/dist/components/product-demo/fixtures/devices.d.ts +14 -0
  294. package/dist/components/product-demo/fixtures/devices.d.ts.map +1 -0
  295. package/dist/components/product-demo/fixtures/knowledge.d.ts +14 -0
  296. package/dist/components/product-demo/fixtures/knowledge.d.ts.map +1 -0
  297. package/dist/components/product-demo/fixtures/logs.d.ts +15 -0
  298. package/dist/components/product-demo/fixtures/logs.d.ts.map +1 -0
  299. package/dist/components/product-demo/fixtures/policies.d.ts +13 -0
  300. package/dist/components/product-demo/fixtures/policies.d.ts.map +1 -0
  301. package/dist/components/product-demo/fixtures/remote-session.d.ts +20 -0
  302. package/dist/components/product-demo/fixtures/remote-session.d.ts.map +1 -0
  303. package/dist/components/product-demo/fixtures/shared.d.ts +156 -0
  304. package/dist/components/product-demo/fixtures/shared.d.ts.map +1 -0
  305. package/dist/components/product-demo/fixtures/software-update.d.ts +19 -0
  306. package/dist/components/product-demo/fixtures/software-update.d.ts.map +1 -0
  307. package/dist/components/product-demo/fixtures/tickets-board.d.ts +8 -0
  308. package/dist/components/product-demo/fixtures/tickets-board.d.ts.map +1 -0
  309. package/dist/components/product-demo/index.cjs +112 -0
  310. package/dist/components/product-demo/index.d.ts +6 -0
  311. package/dist/components/product-demo/index.d.ts.map +1 -0
  312. package/dist/components/product-demo/index.js +112 -0
  313. package/dist/components/product-demo/product-screen.d.ts +22 -0
  314. package/dist/components/product-demo/product-screen.d.ts.map +1 -0
  315. package/dist/components/product-demo/registry.d.ts +13 -0
  316. package/dist/components/product-demo/registry.d.ts.map +1 -0
  317. package/dist/components/product-demo/screen-keys.cjs +25 -0
  318. package/dist/components/product-demo/screen-keys.d.ts +27 -0
  319. package/dist/components/product-demo/screen-keys.d.ts.map +1 -0
  320. package/dist/components/product-demo/screen-keys.js +20 -0
  321. package/dist/components/product-demo/screens/cloud-tenants.d.ts +8 -0
  322. package/dist/components/product-demo/screens/cloud-tenants.d.ts.map +1 -0
  323. package/dist/components/product-demo/screens/devices.d.ts +10 -0
  324. package/dist/components/product-demo/screens/devices.d.ts.map +1 -0
  325. package/dist/components/product-demo/screens/knowledge.d.ts +9 -0
  326. package/dist/components/product-demo/screens/knowledge.d.ts.map +1 -0
  327. package/dist/components/product-demo/screens/logs.d.ts +4 -0
  328. package/dist/components/product-demo/screens/logs.d.ts.map +1 -0
  329. package/dist/components/product-demo/screens/policies.d.ts +8 -0
  330. package/dist/components/product-demo/screens/policies.d.ts.map +1 -0
  331. package/dist/components/product-demo/screens/remote-desktop-picture.d.ts +11 -0
  332. package/dist/components/product-demo/screens/remote-desktop-picture.d.ts.map +1 -0
  333. package/dist/components/product-demo/screens/remote-session.d.ts +8 -0
  334. package/dist/components/product-demo/screens/remote-session.d.ts.map +1 -0
  335. package/dist/components/product-demo/screens/software-update.d.ts +12 -0
  336. package/dist/components/product-demo/screens/software-update.d.ts.map +1 -0
  337. package/dist/components/product-demo/screens/tickets-board.d.ts +4 -0
  338. package/dist/components/product-demo/screens/tickets-board.d.ts.map +1 -0
  339. package/dist/components/product-demo/types.d.ts +9 -0
  340. package/dist/components/product-demo/types.d.ts.map +1 -0
  341. package/dist/components/related-content/index.cjs +14 -8
  342. package/dist/components/related-content/index.js +13 -7
  343. package/dist/components/tickets/index.cjs +36 -20
  344. package/dist/components/tickets/index.js +35 -19
  345. package/dist/components/ui/file-manager/index.cjs +38 -34
  346. package/dist/components/ui/file-manager/index.js +8 -4
  347. package/dist/components/ui/index.cjs +57 -17
  348. package/dist/components/ui/index.d.ts +1 -0
  349. package/dist/components/ui/index.d.ts.map +1 -1
  350. package/dist/components/ui/index.js +141 -101
  351. package/dist/components/ui/product-screen-frame.d.ts +45 -0
  352. package/dist/components/ui/product-screen-frame.d.ts.map +1 -0
  353. package/dist/components/ui/radio-group.d.ts +5 -0
  354. package/dist/components/ui/radio-group.d.ts.map +1 -1
  355. package/dist/components/ui/snap-carousel.d.ts +11 -1
  356. package/dist/components/ui/snap-carousel.d.ts.map +1 -1
  357. package/dist/components/ui/tag.d.ts +1 -1
  358. package/dist/components/ui/tag.d.ts.map +1 -1
  359. package/dist/devices-LBMG42K6.js +81 -0
  360. package/dist/devices-YGYJIXQY.cjs +81 -0
  361. package/dist/hooks/index.cjs +17 -8
  362. package/dist/hooks/index.js +32 -23
  363. package/dist/hooks/ui/index.d.ts +1 -0
  364. package/dist/hooks/ui/index.d.ts.map +1 -1
  365. package/dist/hooks/ui/use-header-height.d.ts +12 -0
  366. package/dist/hooks/ui/use-header-height.d.ts.map +1 -1
  367. package/dist/hooks/ui/use-sticky-toolbar.d.ts +29 -0
  368. package/dist/hooks/ui/use-sticky-toolbar.d.ts.map +1 -0
  369. package/dist/hooks/use-location-hash.d.ts +2 -2
  370. package/dist/hooks/use-location-hash.d.ts.map +1 -1
  371. package/dist/hooks/use-scroll-to-hash.d.ts +7 -0
  372. package/dist/hooks/use-scroll-to-hash.d.ts.map +1 -1
  373. package/dist/index.cjs +276 -25
  374. package/dist/index.js +729 -478
  375. package/dist/knowledge-H5BIWJVI.js +108 -0
  376. package/dist/knowledge-KTCVJIWN.cjs +108 -0
  377. package/dist/logs-DB5Z7M5Q.js +216 -0
  378. package/dist/logs-RVCC2UQW.cjs +216 -0
  379. package/dist/policies-EWUULFBR.js +121 -0
  380. package/dist/policies-HV4IQCBV.cjs +121 -0
  381. package/dist/remote-session-GSGZOFDX.js +196 -0
  382. package/dist/remote-session-R6VAFESR.cjs +196 -0
  383. package/dist/software-update-6PXKRKBT.js +179 -0
  384. package/dist/software-update-D4OVSWSG.cjs +179 -0
  385. package/dist/tickets-board-BHLPAVNJ.cjs +137 -0
  386. package/dist/tickets-board-PYDNELSK.js +137 -0
  387. package/dist/types/case-study.d.ts +15 -1
  388. package/dist/types/case-study.d.ts.map +1 -1
  389. package/dist/utils/date-utils.d.ts +5 -0
  390. package/dist/utils/date-utils.d.ts.map +1 -1
  391. package/dist/utils/index.cjs +45 -2
  392. package/dist/utils/index.d.ts +2 -1
  393. package/dist/utils/index.d.ts.map +1 -1
  394. package/dist/utils/index.js +41 -3
  395. package/dist/utils/open-in-new-tab.d.ts +7 -0
  396. package/dist/utils/open-in-new-tab.d.ts.map +1 -0
  397. package/dist/utils/same-page-hash-nav.d.ts +31 -0
  398. package/dist/utils/same-page-hash-nav.d.ts.map +1 -1
  399. package/dist/utils/scroll-into-view.d.ts +14 -1
  400. package/dist/utils/scroll-into-view.d.ts.map +1 -1
  401. package/package.json +13 -1
  402. package/src/components/chat/ask-prompts.tsx +226 -0
  403. package/src/components/chat/embeddable-chat.tsx +38 -2
  404. package/src/components/chat/entity-cards/case-study-card.tsx +122 -46
  405. package/src/components/chat/hooks/use-chat-dialog-manager.ts +22 -4
  406. package/src/components/chat/hooks/use-unified-chat.ts +1 -0
  407. package/src/components/chat/index.ts +1 -0
  408. package/src/components/chat/quick-action-chip.tsx +33 -9
  409. package/src/components/chat/types/component.types.ts +4 -0
  410. package/src/components/chat/types/unified-chat-state.types.ts +13 -0
  411. package/src/components/docs/use-scroll-spy.ts +93 -18
  412. package/src/components/faq/faq-section.tsx +82 -43
  413. package/src/components/features/array-entry-manager.tsx +10 -1
  414. package/src/components/features/board/board.tsx +4 -1
  415. package/src/components/features/board/ticket-card.tsx +11 -1
  416. package/src/components/features/board/touch-board.tsx +2 -1
  417. package/src/components/features/board/types.ts +3 -0
  418. package/src/components/features/board/use-board-collapse.ts +7 -2
  419. package/src/components/features/capability-explorer.tsx +412 -0
  420. package/src/components/features/cloud-tenants/index.ts +28 -0
  421. package/src/components/features/cloud-tenants/tenant-access-cell.tsx +24 -0
  422. package/src/components/features/cloud-tenants/tenant-cell.tsx +26 -0
  423. package/src/components/features/cloud-tenants/tenant-customer-cell.tsx +27 -0
  424. package/src/components/features/cloud-tenants/tenant-presentation.ts +111 -0
  425. package/src/components/features/cloud-tenants/tenant-row.ts +21 -0
  426. package/src/components/features/cloud-tenants/tenants-table-columns.ts +30 -0
  427. package/src/components/features/cloud-tenants/tenants-table-view.tsx +142 -0
  428. package/src/components/features/devices/device-last-online.ts +6 -0
  429. package/src/components/features/devices/device-name.ts +51 -0
  430. package/src/components/features/devices/device-selector/device-selection-mode-radio.tsx +107 -0
  431. package/src/components/features/devices/device-selector/device-selector-skeleton.tsx +32 -0
  432. package/src/components/features/devices/device-selector/device-selector.tsx +799 -0
  433. package/src/components/features/devices/device-selector/device-selector.types.ts +138 -0
  434. package/src/components/features/devices/device-selector/narrowing.ts +33 -0
  435. package/src/components/features/devices/device-selector/use-device-selector.ts +51 -0
  436. package/src/components/features/devices/device-status.ts +102 -0
  437. package/src/components/features/devices/device-statuses.ts +88 -0
  438. package/src/components/features/devices/device-tags-filter-button.tsx +49 -0
  439. package/src/components/features/devices/device-type-icon.tsx +29 -0
  440. package/src/components/features/devices/device-type-tile.tsx +17 -0
  441. package/src/components/features/devices/devices-filter-toolbar.tsx +114 -0
  442. package/src/components/features/devices/devices-grid-filters.tsx +99 -0
  443. package/src/components/features/devices/devices-grid.tsx +86 -0
  444. package/src/components/features/devices/devices-list.tsx +357 -0
  445. package/src/components/features/devices/devices-panel-header.tsx +97 -0
  446. package/src/components/features/devices/devices-panel-view.tsx +261 -0
  447. package/src/components/features/devices/devices-table-columns.tsx +356 -0
  448. package/src/components/features/devices/devices-view-config.tsx +38 -0
  449. package/src/components/features/devices/index.ts +89 -0
  450. package/src/components/features/devices/types.ts +74 -0
  451. package/src/components/features/devices/use-tag-filter-modal.ts +109 -0
  452. package/src/components/features/index.ts +9 -0
  453. package/src/components/features/knowledge-base/index.ts +19 -0
  454. package/src/components/features/knowledge-base/knowledge-base-article-view.tsx +134 -0
  455. package/src/components/features/knowledge-base/knowledge-base-item-icon.ts +14 -0
  456. package/src/components/features/knowledge-base/knowledge-base-status.ts +12 -0
  457. package/src/components/features/knowledge-base/knowledge-base-table.tsx +180 -0
  458. package/src/components/features/logs/index.ts +20 -0
  459. package/src/components/features/logs/log-drawer.tsx +138 -0
  460. package/src/components/features/logs/log-source-labels.ts +25 -0
  461. package/src/components/features/logs/logs-page-view.tsx +100 -0
  462. package/src/components/features/logs/logs-table-columns.ts +16 -0
  463. package/src/components/features/logs/logs-table-view.tsx +509 -0
  464. package/src/components/features/logs/types.ts +71 -0
  465. package/src/components/features/policies/compute-policy-summary.ts +115 -0
  466. package/src/components/features/policies/index.ts +14 -0
  467. package/src/components/features/policies/policies-table.tsx +235 -0
  468. package/src/components/features/policies/policy-summary-cards.tsx +69 -0
  469. package/src/components/features/policies/policy-table-row.ts +37 -0
  470. package/src/components/features/remote-session/index.ts +8 -0
  471. package/src/components/features/remote-session/remote-desktop-chat-message-row.tsx +56 -0
  472. package/src/components/features/remote-session/remote-desktop-chat-panel.tsx +102 -0
  473. package/src/components/features/remote-session/remote-desktop-fullscreen-toolbar.tsx +119 -0
  474. package/src/components/features/remote-session/remote-desktop-view.tsx +209 -0
  475. package/src/components/features/software/index.ts +39 -0
  476. package/src/components/features/software/package-managers.ts +54 -0
  477. package/src/components/features/software/package-search-field-placeholder.tsx +23 -0
  478. package/src/components/features/software/schedule-fields.tsx +105 -0
  479. package/src/components/features/software/software-action-copy.ts +70 -0
  480. package/src/components/features/software/software-action-form.tsx +199 -0
  481. package/src/components/features/software/software-row-fields.tsx +105 -0
  482. package/src/components/features/software/software-row.ts +22 -0
  483. package/src/components/features/sortable-list/index.ts +1 -0
  484. package/src/components/features/sortable-list/sortable-drag-handle.tsx +41 -0
  485. package/src/components/layout/page-heading.tsx +23 -6
  486. package/src/components/navigation/index.ts +5 -0
  487. package/src/components/navigation/mingo-ai-button.tsx +37 -13
  488. package/src/components/navigation/sticky-section-nav.tsx +99 -1
  489. package/src/components/product-demo/cast.tsx +78 -0
  490. package/src/components/product-demo/fixtures/cloud-tenants.ts +63 -0
  491. package/src/components/product-demo/fixtures/devices.ts +87 -0
  492. package/src/components/product-demo/fixtures/knowledge.ts +48 -0
  493. package/src/components/product-demo/fixtures/logs.ts +103 -0
  494. package/src/components/product-demo/fixtures/policies.ts +77 -0
  495. package/src/components/product-demo/fixtures/remote-session.ts +65 -0
  496. package/src/components/product-demo/fixtures/shared.ts +53 -0
  497. package/src/components/product-demo/fixtures/software-update.ts +63 -0
  498. package/src/components/product-demo/fixtures/tickets-board.ts +100 -0
  499. package/src/components/product-demo/index.ts +7 -0
  500. package/src/components/product-demo/product-screen.tsx +94 -0
  501. package/src/components/product-demo/registry.ts +20 -0
  502. package/src/components/product-demo/screen-keys.ts +31 -0
  503. package/src/components/product-demo/screens/cloud-tenants.tsx +23 -0
  504. package/src/components/product-demo/screens/devices.tsx +41 -0
  505. package/src/components/product-demo/screens/knowledge.tsx +27 -0
  506. package/src/components/product-demo/screens/logs.tsx +113 -0
  507. package/src/components/product-demo/screens/policies.tsx +29 -0
  508. package/src/components/product-demo/screens/remote-desktop-picture.tsx +118 -0
  509. package/src/components/product-demo/screens/remote-session.tsx +46 -0
  510. package/src/components/product-demo/screens/software-update.tsx +97 -0
  511. package/src/components/product-demo/screens/tickets-board.tsx +28 -0
  512. package/src/components/product-demo/types.ts +10 -0
  513. package/src/components/ui/index.ts +1 -0
  514. package/src/components/ui/product-screen-frame.tsx +136 -0
  515. package/src/components/ui/radio-group.tsx +16 -4
  516. package/src/components/ui/snap-carousel.tsx +26 -1
  517. package/src/components/ui/tag.tsx +5 -0
  518. package/src/hooks/ui/index.ts +1 -0
  519. package/src/hooks/ui/use-header-height.ts +51 -2
  520. package/src/hooks/ui/use-sticky-toolbar.ts +60 -0
  521. package/src/hooks/use-location-hash.ts +9 -5
  522. package/src/hooks/use-scroll-to-hash.ts +9 -1
  523. package/src/types/case-study.ts +21 -1
  524. package/src/utils/date-utils.ts +8 -1
  525. package/src/utils/index.ts +5 -0
  526. package/src/utils/open-in-new-tab.ts +12 -0
  527. package/src/utils/same-page-hash-nav.ts +57 -0
  528. package/src/utils/scroll-into-view.ts +21 -5
  529. package/dist/chunk-BM5MVGH3.cjs +0 -499
  530. package/dist/chunk-CUME3VTQ.js +0 -144
  531. package/dist/chunk-CZ7Y7UG4.js +0 -732
  532. package/dist/chunk-FLKJYMVB.js +0 -499
  533. package/dist/chunk-OF6GEI5A.cjs +0 -144
  534. package/dist/chunk-UVTD52MD.cjs +0 -732
@@ -0,0 +1,1122 @@
1
+ "use client";
2
+ import {
3
+ AvatarStack,
4
+ resolveIcon
5
+ } from "./chunk-JHQ334WS.js";
6
+ import {
7
+ Tag,
8
+ VIEWER_TIMEZONE,
9
+ formatDateWithTimezone
10
+ } from "./chunk-IYVFSLWJ.js";
11
+ import {
12
+ ViewportBreakpoints
13
+ } from "./chunk-KEKCQENI.js";
14
+ import {
15
+ Send01Icon,
16
+ StopCircleIcon,
17
+ XmarkIcon
18
+ } from "./chunk-NCPTID44.js";
19
+ import {
20
+ Button
21
+ } from "./chunk-YDPKUAP4.js";
22
+ import {
23
+ cn
24
+ } from "./chunk-7RXWKTAP.js";
25
+
26
+ // src/components/ui/modal-v2.tsx
27
+ import { createContext, forwardRef, useContext, useRef, useEffect, useState } from "react";
28
+ import { RemoveScroll } from "react-remove-scroll";
29
+ import { jsx, jsxs } from "react/jsx-runtime";
30
+ var ANIMATION_DURATION = 200;
31
+ var ModalContext = createContext({});
32
+ var MODAL_V2_SIZE_CLASSES = {
33
+ default: "max-w-[min(28rem,calc(100vw-2rem))]",
34
+ medium: "max-w-[min(42rem,calc(100vw-2rem))]",
35
+ wide: "max-w-[min(1400px,calc(100vw-2rem))]"
36
+ };
37
+ var modalStack = [];
38
+ var isInPortaledLayer = (node) => node instanceof Element && node.closest('[data-radix-popper-content-wrapper], [role="listbox"], [role="menu"]') !== null;
39
+ var Modal = forwardRef(
40
+ ({ isOpen, onClose, children, className, size = "default" }, ref) => {
41
+ const [isMounted, setIsMounted] = useState(isOpen);
42
+ const panelRef = useRef(null);
43
+ const restoreFocusRef = useRef(null);
44
+ const stackIdRef = useRef(/* @__PURE__ */ Symbol("modal"));
45
+ useEffect(() => {
46
+ if (!isOpen) return void 0;
47
+ const stackId = stackIdRef.current;
48
+ modalStack.push(stackId);
49
+ restoreFocusRef.current = document.activeElement;
50
+ const raf = requestAnimationFrame(() => {
51
+ const panel = panelRef.current;
52
+ if (!panel) return;
53
+ if (panel.contains(document.activeElement)) return;
54
+ panel.focus();
55
+ });
56
+ const containFocus = (event) => {
57
+ if (modalStack[modalStack.length - 1] !== stackId) return;
58
+ const panel = panelRef.current;
59
+ if (!panel) return;
60
+ const target = event.target;
61
+ if (target && (panel.contains(target) || isInPortaledLayer(target))) return;
62
+ panel.focus();
63
+ };
64
+ document.addEventListener("focusin", containFocus);
65
+ const reasserts = [80, 240, 500].map(
66
+ (ms) => setTimeout(() => {
67
+ if (modalStack[modalStack.length - 1] !== stackId) return;
68
+ const panel = panelRef.current;
69
+ if (!panel) return;
70
+ if (!panel.contains(document.activeElement) && !isInPortaledLayer(document.activeElement)) panel.focus();
71
+ }, ms)
72
+ );
73
+ return () => {
74
+ cancelAnimationFrame(raf);
75
+ reasserts.forEach(clearTimeout);
76
+ document.removeEventListener("focusin", containFocus);
77
+ const idx = modalStack.lastIndexOf(stackId);
78
+ if (idx !== -1) modalStack.splice(idx, 1);
79
+ restoreFocusRef.current?.focus?.();
80
+ };
81
+ }, [isOpen]);
82
+ useEffect(() => {
83
+ if (!isOpen) return void 0;
84
+ const handleTab = (event) => {
85
+ if (event.key !== "Tab") return;
86
+ const panel = panelRef.current;
87
+ if (!panel) return;
88
+ if (isInPortaledLayer(document.activeElement)) return;
89
+ const focusables = Array.from(
90
+ panel.querySelectorAll(
91
+ 'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
92
+ )
93
+ ).filter((el) => el.getAttribute("aria-hidden") !== "true" && el.offsetParent !== null);
94
+ if (focusables.length === 0) return;
95
+ const first = focusables[0];
96
+ const last = focusables[focusables.length - 1];
97
+ const active = document.activeElement;
98
+ if (event.shiftKey) {
99
+ if (active === first || !panel.contains(active)) {
100
+ event.preventDefault();
101
+ last.focus();
102
+ }
103
+ } else if (active === last || !panel.contains(active)) {
104
+ event.preventDefault();
105
+ first.focus();
106
+ }
107
+ };
108
+ document.addEventListener("keydown", handleTab);
109
+ return () => document.removeEventListener("keydown", handleTab);
110
+ }, [isOpen]);
111
+ useEffect(() => {
112
+ if (isOpen) {
113
+ setIsMounted(true);
114
+ return void 0;
115
+ }
116
+ const timeout = setTimeout(() => setIsMounted(false), ANIMATION_DURATION);
117
+ return () => clearTimeout(timeout);
118
+ }, [isOpen]);
119
+ useEffect(() => {
120
+ if (!isOpen) return void 0;
121
+ const handleKeyDown = (event) => {
122
+ if (event.key === "Escape" && !event.defaultPrevented && modalStack[modalStack.length - 1] === stackIdRef.current) {
123
+ onClose();
124
+ }
125
+ };
126
+ document.addEventListener("keydown", handleKeyDown);
127
+ return () => document.removeEventListener("keydown", handleKeyDown);
128
+ }, [isOpen, onClose]);
129
+ if (!isMounted) return null;
130
+ const state = isOpen ? "open" : "closed";
131
+ return (
132
+ // `forwardProps` — RemoveScroll's default is to WRAP its children in a
133
+ // plain <div>. That wrapper is in normal flow, so a modal rendered inside
134
+ // a `flex`/`grid` container with a `gap` became an extra (zero-height)
135
+ // track the moment it opened, shifting every sibling below it down by one
136
+ // gap. Cloning onto the child instead leaves only the `fixed` overlay,
137
+ // which is out of flow and therefore not a flex/grid item at all.
138
+ // The child must stay a single element for `Children.only`.
139
+ /* @__PURE__ */ jsx(RemoveScroll, { enabled: isOpen, removeScrollBar: false, forwardProps: true, children: /* @__PURE__ */ jsxs(
140
+ "div",
141
+ {
142
+ className: "ods-viewport-layer fixed inset-0 z-[1300] flex items-end justify-center transition-[padding] duration-200 md:items-center",
143
+ style: { paddingBottom: "var(--of-keyboard-inset, 0px)" },
144
+ children: [
145
+ /* @__PURE__ */ jsx(
146
+ "div",
147
+ {
148
+ "data-state": state,
149
+ className: cn(
150
+ "absolute inset-0 bg-ods-overlay backdrop-blur-[2px] md:backdrop-blur-none",
151
+ "duration-200 fill-mode-forwards",
152
+ "data-[state=open]:animate-in data-[state=open]:fade-in-0",
153
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
154
+ // Hold the hidden end-state until unmount so the backdrop doesn't
155
+ // flash back to full opacity when the animation finishes a frame
156
+ // before the unmount timeout fires.
157
+ "data-[state=closed]:fill-mode-forwards"
158
+ ),
159
+ onClick: onClose,
160
+ "aria-hidden": "true"
161
+ }
162
+ ),
163
+ /* @__PURE__ */ jsx(
164
+ "div",
165
+ {
166
+ ref: (node) => {
167
+ panelRef.current = node;
168
+ if (typeof ref === "function") ref(node);
169
+ else if (ref) ref.current = node;
170
+ },
171
+ tabIndex: -1,
172
+ "data-state": state,
173
+ className: cn(
174
+ // A single base utility per size (not md:max-w-*) so consumer
175
+ // max-w-* overrides via className still win at every breakpoint.
176
+ "relative z-10 flex w-full min-w-0 flex-col",
177
+ // The panel is a focus TARGET (tabIndex -1), not a control: focus
178
+ // moves here on open so the dialog owns the keyboard, and the UA
179
+ // then paints its default ring around the whole modal. Opening by
180
+ // click hides it via :focus-visible heuristics, but a modal opened
181
+ // from a URL on page load has no preceding pointer event, so the
182
+ // ring showed on every refresh. Fields inside keep their own rings.
183
+ "outline-none",
184
+ MODAL_V2_SIZE_CLASSES[size],
185
+ "mx-4 mb-4 md:mb-0",
186
+ // dvh, not vh: vh ignores a mobile browser's retracting URL bar, so
187
+ // 90vh already overflowed behind Safari's toolbar. The `100%-2rem`
188
+ // arm resolves against the keyboard-padded wrapper above and caps
189
+ // the panel to what's left of it, less the 1rem `mb-4` and a
190
+ // matching 1rem of breathing room at the top — header and footer
191
+ // stay pinned, ModalV2Content scrolls. min() picks 90dvh on any
192
+ // viewport over 320px tall, so desktop is untouched.
193
+ "max-h-[min(90dvh,100%-2rem)]",
194
+ // `wide` also FIXES the desktop height rather than only capping it:
195
+ // its columns scroll independently, and a height that tracks
196
+ // content makes the panel jump as an entity hydrates in. Mobile
197
+ // keeps the bottom-sheet's content-sized height.
198
+ size === "wide" && "md:h-[min(90dvh,100%-2rem)]",
199
+ "bg-ods-bg md:bg-ods-card",
200
+ "rounded-md border border-ods-border shadow-xl",
201
+ "gap-[var(--spacing-system-l)] p-[var(--spacing-system-xl)]",
202
+ "duration-200 fill-mode-forwards",
203
+ "data-[state=open]:animate-in data-[state=open]:fade-in-0",
204
+ "data-[state=open]:slide-in-from-bottom-4 md:data-[state=open]:zoom-in-95 md:data-[state=open]:slide-in-from-bottom-0",
205
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
206
+ "data-[state=closed]:slide-out-to-bottom-4 md:data-[state=closed]:zoom-out-95 md:data-[state=closed]:slide-out-to-bottom-0",
207
+ // Hold the hidden end-state until unmount so the panel doesn't snap
208
+ // back to opacity/scale 1 for a frame before it unmounts.
209
+ "data-[state=closed]:fill-mode-forwards",
210
+ className
211
+ ),
212
+ role: "dialog",
213
+ "aria-modal": "true",
214
+ children: /* @__PURE__ */ jsx(ModalContext.Provider, { value: { onClose }, children: /* @__PURE__ */ jsx(ViewportBreakpoints, { children }) })
215
+ }
216
+ )
217
+ ]
218
+ }
219
+ ) })
220
+ );
221
+ }
222
+ );
223
+ Modal.displayName = "ModalV2";
224
+ var ModalContent = forwardRef(({ children, className }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("min-h-0 flex-1 overflow-y-auto", className), children }));
225
+ ModalContent.displayName = "ModalV2Content";
226
+ var ModalTwoColumn = forwardRef(({ left, right, className }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("min-h-0 flex-1 overflow-y-auto lg:overflow-hidden", className), children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-[var(--spacing-system-xl)] lg:h-full lg:min-h-0 lg:grid-cols-2 lg:grid-rows-[minmax(0,1fr)]", children: [
227
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 space-y-[var(--spacing-system-lf)] lg:overflow-y-auto lg:pr-[var(--spacing-system-sf)]", children: left }),
228
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 space-y-[var(--spacing-system-lf)] lg:overflow-y-auto lg:pr-[var(--spacing-system-sf)]", children: right })
229
+ ] }) }));
230
+ ModalTwoColumn.displayName = "ModalV2TwoColumn";
231
+ var ModalHeader = forwardRef(({ children, className }, ref) => {
232
+ const { onClose } = useContext(ModalContext);
233
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex items-center gap-[var(--spacing-system-sf)]", className), children: [
234
+ /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 flex-col", children }),
235
+ onClose && /* @__PURE__ */ jsx(
236
+ "button",
237
+ {
238
+ onClick: onClose,
239
+ className: "hidden shrink-0 text-ods-text-secondary transition-colors hover:text-ods-text-primary md:flex",
240
+ "aria-label": "Close",
241
+ children: /* @__PURE__ */ jsx(XmarkIcon, { className: "size-6" })
242
+ }
243
+ )
244
+ ] });
245
+ });
246
+ ModalHeader.displayName = "ModalV2Header";
247
+ var ModalTitle = forwardRef(({ children, className }, ref) => /* @__PURE__ */ jsx("h2", { ref, className: cn("text-ods-text-primary text-h2", className), children }));
248
+ ModalTitle.displayName = "ModalV2Title";
249
+ var ModalFooter = forwardRef(({ children, className }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex gap-4", className), children }));
250
+ ModalFooter.displayName = "ModalV2Footer";
251
+
252
+ // src/components/chat/types/chat.types.ts
253
+ var CHAT_TYPE = {
254
+ CLIENT: "CLIENT_CHAT",
255
+ ADMIN: "ADMIN_AI_CHAT"
256
+ };
257
+ var OWNER_TYPE = {
258
+ CLIENT: "CLIENT",
259
+ ADMIN: "ADMIN",
260
+ ASSISTANT: "ASSISTANT"
261
+ };
262
+ var MESSAGE_ROLE = {
263
+ USER: "user",
264
+ ASSISTANT: "assistant",
265
+ ERROR: "error",
266
+ SYSTEM: "system"
267
+ };
268
+ var ASSISTANT_TYPE = {
269
+ FAE: "fae",
270
+ MINGO: "mingo"
271
+ };
272
+ var AUTHOR_TYPE = {
273
+ USER: "user",
274
+ ADMIN: "admin",
275
+ FAE: "fae",
276
+ MINGO: "mingo",
277
+ SYSTEM: "system"
278
+ };
279
+ var APPROVAL_STATUS = {
280
+ PENDING: "pending",
281
+ APPROVED: "approved",
282
+ REJECTED: "rejected",
283
+ CANCELLED: "cancelled"
284
+ };
285
+ var APPROVAL_BLOCK_VARIANT = {
286
+ ADMIN: "admin",
287
+ CLIENT: "client"
288
+ };
289
+ var CHAT_APPEARANCE = {
290
+ CLASSIC: "classic",
291
+ V2: "v2"
292
+ };
293
+ var CONNECTION_STATUS = {
294
+ CONNECTING: "connecting",
295
+ CONNECTED: "connected",
296
+ DISCONNECTED: "disconnected",
297
+ RECONNECTING: "reconnecting",
298
+ CLOSED: "closed",
299
+ ERROR: "error"
300
+ };
301
+ function isStructuredContent(content) {
302
+ return Array.isArray(content);
303
+ }
304
+ function normalizeContent(content) {
305
+ if (typeof content === "string") {
306
+ return content ? [{ type: "text", text: content }] : [];
307
+ }
308
+ return content;
309
+ }
310
+
311
+ // src/components/chat/chat-typing-indicator.tsx
312
+ import { forwardRef as forwardRef2 } from "react";
313
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
314
+ var ChatTypingIndicator = forwardRef2(
315
+ ({ className, size = "md", showText = false, dotClassName, ...props }, ref) => {
316
+ const dotSizeClasses = {
317
+ sm: "w-1 h-1",
318
+ md: "w-1.5 h-1.5",
319
+ lg: "w-2 h-2"
320
+ };
321
+ const containerSizeClasses = {
322
+ sm: "h-4",
323
+ md: "h-6",
324
+ lg: "h-8"
325
+ };
326
+ return /* @__PURE__ */ jsxs2("div", { ref, className: cn("flex items-center gap-2", className), ...props, children: [
327
+ showText && /* @__PURE__ */ jsx2("span", { className: "text-ods-text-secondary text-h6", children: "Assistant is typing" }),
328
+ /* @__PURE__ */ jsxs2("div", { className: cn("inline-flex items-center justify-center gap-1", containerSizeClasses[size]), children: [
329
+ /* @__PURE__ */ jsx2(
330
+ "div",
331
+ {
332
+ className: cn(
333
+ dotSizeClasses[size],
334
+ "animate-dot-pulse rounded-full",
335
+ dotClassName || "bg-ods-text-primary"
336
+ ),
337
+ style: { animationDelay: "0ms" }
338
+ }
339
+ ),
340
+ /* @__PURE__ */ jsx2(
341
+ "div",
342
+ {
343
+ className: cn(
344
+ dotSizeClasses[size],
345
+ "animate-dot-pulse rounded-full",
346
+ dotClassName || "bg-ods-text-primary"
347
+ ),
348
+ style: { animationDelay: "200ms" }
349
+ }
350
+ ),
351
+ /* @__PURE__ */ jsx2(
352
+ "div",
353
+ {
354
+ className: cn(
355
+ dotSizeClasses[size],
356
+ "animate-dot-pulse rounded-full",
357
+ dotClassName || "bg-ods-text-primary"
358
+ ),
359
+ style: { animationDelay: "400ms" }
360
+ }
361
+ )
362
+ ] })
363
+ ] });
364
+ }
365
+ );
366
+ ChatTypingIndicator.displayName = "ChatTypingIndicator";
367
+
368
+ // src/components/chat/mingo-onboarding-card.tsx
369
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
370
+ function MingoOnboardingCard({
371
+ icon,
372
+ title,
373
+ slashCommand,
374
+ description,
375
+ actions,
376
+ onClick,
377
+ className
378
+ }) {
379
+ const hasActions = !!actions && actions.length > 0;
380
+ const isInteractive = !hasActions && !!onClick;
381
+ const body = /* @__PURE__ */ jsxs3("div", { className: "flex w-full flex-col gap-[var(--spacing-system-xxs)]", children: [
382
+ /* @__PURE__ */ jsxs3("div", { className: "flex w-full items-center gap-[var(--spacing-system-xxs)]", children: [
383
+ icon ? (
384
+ // Icon slot — monochrome `ods-text-secondary` (≈ #888) so
385
+ // consumers can drop any `icons-v2-generated` glyph (they use
386
+ // `currentColor`) without per-card styling. Brand multi-color
387
+ // SVGs ignore this color.
388
+ /* @__PURE__ */ jsx3("span", { className: "flex size-4 shrink-0 items-center justify-center text-ods-text-secondary", children: icon })
389
+ ) : null,
390
+ /* @__PURE__ */ jsx3("span", { className: "min-w-0 flex-1 truncate text-ods-text-primary text-h6", children: title }),
391
+ slashCommand ? /* @__PURE__ */ jsx3("span", { className: "whitespace-nowrap text-ods-text-secondary text-h6", children: slashCommand }) : null
392
+ ] }),
393
+ description ? /* @__PURE__ */ jsx3("p", { className: "w-full text-ods-text-secondary text-h6", children: description }) : null,
394
+ hasActions ? /* @__PURE__ */ jsx3("div", { className: "mt-[var(--spacing-system-xs)] flex flex-wrap items-center gap-[var(--spacing-system-xxs)]", children: actions.map((action) => /* @__PURE__ */ jsx3(
395
+ Button,
396
+ {
397
+ type: "button",
398
+ variant: "outline",
399
+ size: "small",
400
+ onClick: (e) => {
401
+ e.stopPropagation();
402
+ action.onClick(e);
403
+ },
404
+ children: action.label
405
+ },
406
+ action.id
407
+ )) }) : null
408
+ ] });
409
+ const baseClass = cn(
410
+ "flex w-full items-start border-b border-ods-border bg-ods-card p-[var(--spacing-system-s)] text-left last:border-b-0",
411
+ isInteractive && "cursor-pointer transition-colors hover:bg-ods-bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-accent",
412
+ className
413
+ );
414
+ if (isInteractive) {
415
+ return /* @__PURE__ */ jsx3("button", { type: "button", onClick, className: baseClass, children: body });
416
+ }
417
+ return /* @__PURE__ */ jsx3("div", { className: baseClass, children: body });
418
+ }
419
+
420
+ // src/components/chat/slash-command-suggestions.tsx
421
+ import { jsx as jsx4 } from "react/jsx-runtime";
422
+ function SlashCommandSuggestions({
423
+ commands,
424
+ highlightedIdx,
425
+ onHover,
426
+ onSelect,
427
+ resolveSourceIcon,
428
+ onAction,
429
+ className
430
+ }) {
431
+ if (commands.length === 0) return null;
432
+ return /* @__PURE__ */ jsx4(
433
+ "div",
434
+ {
435
+ role: "menu",
436
+ "aria-label": "Slash command suggestions",
437
+ className: cn(
438
+ "absolute bottom-full left-0 right-0 z-50 mb-2 max-h-96 overflow-y-auto overscroll-contain",
439
+ "rounded-md border border-ods-border bg-ods-card shadow-lg",
440
+ className
441
+ ),
442
+ children: commands.map((cmd, idx) => {
443
+ const Icon = resolveIcon(cmd.iconName);
444
+ const legacyMeta = !cmd.iconName && cmd.primarySourceId && resolveSourceIcon ? resolveSourceIcon(cmd.primarySourceId) : void 0;
445
+ const LegacyIcon = legacyMeta?.Icon;
446
+ const title = cmd.label ?? legacyMeta?.label ?? cmd.id;
447
+ const isHighlighted = idx === highlightedIdx;
448
+ const slashLabel = cmd.argumentHint ? `/${cmd.id} ${cmd.argumentHint}` : `/${cmd.id}`;
449
+ const cardActions = onAction && cmd.actions.length > 0 ? cmd.actions.map((action) => ({
450
+ id: action.id,
451
+ label: action.label,
452
+ onClick: (e) => {
453
+ e.stopPropagation();
454
+ onAction(cmd, action.id);
455
+ }
456
+ })) : void 0;
457
+ return /* @__PURE__ */ jsx4(
458
+ "div",
459
+ {
460
+ role: "menuitem",
461
+ "aria-current": isHighlighted ? "true" : void 0,
462
+ tabIndex: -1,
463
+ onMouseEnter: () => onHover(idx),
464
+ onClick: () => onSelect(cmd),
465
+ onKeyDown: (e) => {
466
+ if (e.key === "Enter" || e.key === " ") {
467
+ e.preventDefault();
468
+ onSelect(cmd);
469
+ }
470
+ },
471
+ className: "cursor-pointer outline-none",
472
+ children: /* @__PURE__ */ jsx4(
473
+ MingoOnboardingCard,
474
+ {
475
+ icon: LegacyIcon ? /* @__PURE__ */ jsx4(LegacyIcon, { className: "size-4" }) : /* @__PURE__ */ jsx4(Icon, { size: 16 }),
476
+ title,
477
+ slashCommand: slashLabel,
478
+ description: cmd.description,
479
+ actions: cardActions,
480
+ className: cn("transition-colors", isHighlighted && "bg-ods-bg-hover")
481
+ }
482
+ )
483
+ },
484
+ cmd.id
485
+ );
486
+ })
487
+ }
488
+ );
489
+ }
490
+
491
+ // src/components/chat/chat-input.tsx
492
+ import {
493
+ useState as useState2,
494
+ useRef as useRef2,
495
+ useImperativeHandle,
496
+ forwardRef as forwardRef3,
497
+ useCallback,
498
+ useEffect as useEffect2,
499
+ useMemo
500
+ } from "react";
501
+ import { renderToStaticMarkup } from "react-dom/server";
502
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
503
+ var SLASH_INPUT_TRIGGER = /^\/([a-z][a-z0-9-]*)?$/;
504
+ var MENTION_GLOBAL = /@[A-Za-z0-9_.+/=-]+:[A-Za-z0-9_.+/=-]+/g;
505
+ var MENTION_TRIGGER_AT_END = /(^|\s)@([\w.-]*)$/;
506
+ function parseSegments(value, meta) {
507
+ const segs = [];
508
+ let last = 0;
509
+ MENTION_GLOBAL.lastIndex = 0;
510
+ let m;
511
+ while ((m = MENTION_GLOBAL.exec(value)) !== null) {
512
+ if (m.index > last) segs.push({ kind: "text", text: value.slice(last, m.index) });
513
+ const token = m[0].slice(1);
514
+ const info = meta.get(token);
515
+ segs.push({ kind: "mention", token, label: info?.label ?? token.slice(token.indexOf(":") + 1), icon: info?.icon });
516
+ last = m.index + m[0].length;
517
+ }
518
+ if (last < value.length) segs.push({ kind: "text", text: value.slice(last) });
519
+ return segs;
520
+ }
521
+ var isChip = (n) => n.nodeType === 1 && n.dataset?.token !== void 0;
522
+ function serialize(el) {
523
+ let out = "";
524
+ for (const node of Array.from(el.childNodes)) {
525
+ if (node.nodeType === Node.TEXT_NODE) out += node.textContent ?? "";
526
+ else if (isChip(node)) out += `@${node.dataset.token}`;
527
+ else if (node.tagName === "BR") continue;
528
+ else out += node.textContent ?? "";
529
+ }
530
+ return out;
531
+ }
532
+ function buildChipEl(token, label, icon) {
533
+ const span = document.createElement("span");
534
+ span.dataset.token = token;
535
+ span.setAttribute("contenteditable", "false");
536
+ span.className = "mx-0.5 inline-flex h-9 items-center select-none align-top";
537
+ span.innerHTML = renderToStaticMarkup(
538
+ /* @__PURE__ */ jsx5(
539
+ Tag,
540
+ {
541
+ as: "span",
542
+ variant: "badge",
543
+ icon,
544
+ label,
545
+ onClose: () => {
546
+ },
547
+ className: "max-w-[16rem] hover:border-ods-border [&_svg]:text-ods-text-secondary"
548
+ }
549
+ )
550
+ );
551
+ return span;
552
+ }
553
+ function rebuildDom(el, value, meta) {
554
+ el.replaceChildren();
555
+ for (const seg of parseSegments(value, meta)) {
556
+ if (seg.kind === "text") el.appendChild(document.createTextNode(seg.text));
557
+ else el.appendChild(buildChipEl(seg.token, seg.label, seg.icon));
558
+ }
559
+ }
560
+ function placeCaretAtEnd(el) {
561
+ const sel = typeof window !== "undefined" ? window.getSelection() : null;
562
+ if (!sel) return;
563
+ const range = document.createRange();
564
+ range.selectNodeContents(el);
565
+ range.collapse(false);
566
+ sel.removeAllRanges();
567
+ sel.addRange(range);
568
+ }
569
+ function placeCaretAtOffset(el, offset) {
570
+ const sel = typeof window !== "undefined" ? window.getSelection() : null;
571
+ if (!sel) return;
572
+ const node = el.firstChild;
573
+ const range = document.createRange();
574
+ if (node && node.nodeType === Node.TEXT_NODE) {
575
+ range.setStart(node, Math.max(0, Math.min(offset, node.textContent?.length ?? 0)));
576
+ range.collapse(true);
577
+ } else {
578
+ range.selectNodeContents(el);
579
+ range.collapse(false);
580
+ }
581
+ sel.removeAllRanges();
582
+ sel.addRange(range);
583
+ }
584
+ function insertTextAtCaret(text) {
585
+ const sel = typeof window !== "undefined" ? window.getSelection() : null;
586
+ if (!sel || sel.rangeCount === 0) return;
587
+ const range = sel.getRangeAt(0);
588
+ range.deleteContents();
589
+ const tn = document.createTextNode(text);
590
+ range.insertNode(tn);
591
+ range.setStartAfter(tn);
592
+ range.collapse(true);
593
+ sel.removeAllRanges();
594
+ sel.addRange(range);
595
+ }
596
+ var ChatInput = forwardRef3((allProps, ref) => {
597
+ const { slashCommands, ...rest } = allProps;
598
+ const {
599
+ className,
600
+ onSend,
601
+ onStop,
602
+ sending = false,
603
+ awaitingResponse = false,
604
+ awaitingTeam,
605
+ awaitingTeamCount,
606
+ appearance = CHAT_APPEARANCE.CLASSIC,
607
+ placeholder = "Enter your Request...",
608
+ reserveAvatarOffset: _reserveAvatarOffset,
609
+ disabled = false,
610
+ disabledPlaceholder = "Connection lost. Waiting to reconnect...",
611
+ autoFocus = false,
612
+ fullWidth = false,
613
+ allowEmptySend = false,
614
+ onMentionQueryChange,
615
+ onValueChange,
616
+ startIcon,
617
+ hideBorder,
618
+ previewText
619
+ // Remaining textarea-only attrs are intentionally dropped — the editor is a
620
+ // contenteditable div, not a <textarea>, so spreading them would warn.
621
+ } = rest;
622
+ const [value, setValue] = useState2("");
623
+ const [hasChips, setHasChips] = useState2(false);
624
+ const [focused, setFocused] = useState2(false);
625
+ const [isStopping, setIsStopping] = useState2(false);
626
+ const [previewDismissed, setPreviewDismissed] = useState2(false);
627
+ const editorRef = useRef2(null);
628
+ const shouldRefocusRef = useRef2(false);
629
+ const prevSendingRef = useRef2(sending);
630
+ const prevAwaitingResponseRef = useRef2(awaitingResponse);
631
+ const isComposingRef = useRef2(false);
632
+ const valueRef = useRef2(value);
633
+ valueRef.current = value;
634
+ const metaRef = useRef2(/* @__PURE__ */ new Map());
635
+ const focusEditor = useCallback(() => {
636
+ if (disabled) return;
637
+ editorRef.current?.focus({ preventScroll: true });
638
+ }, [disabled]);
639
+ useEffect2(() => {
640
+ if (autoFocus) focusEditor();
641
+ }, [autoFocus, focusEditor]);
642
+ useEffect2(() => {
643
+ onValueChange?.(value);
644
+ }, [value, onValueChange]);
645
+ const previewTextRef = useRef2(previewText);
646
+ useEffect2(() => {
647
+ previewTextRef.current = previewText;
648
+ });
649
+ useEffect2(() => {
650
+ setPreviewDismissed(false);
651
+ }, [previewText]);
652
+ useEffect2(() => {
653
+ if (previewTextRef.current) setPreviewDismissed(true);
654
+ }, [value]);
655
+ const applyValue = useCallback((next, caret = "end") => {
656
+ const el = editorRef.current;
657
+ if (el) {
658
+ rebuildDom(el, next, metaRef.current);
659
+ if (document.activeElement === el || caret === "end") {
660
+ if (typeof caret === "number") placeCaretAtOffset(el, caret);
661
+ else placeCaretAtEnd(el);
662
+ }
663
+ setHasChips(el.querySelector("[data-token]") !== null);
664
+ }
665
+ valueRef.current = next;
666
+ setValue(next);
667
+ }, []);
668
+ const fire = useCallback(
669
+ (message) => {
670
+ const can = (message.length > 0 || allowEmptySend) && !sending && !disabled;
671
+ if (!can || !onSend) return;
672
+ const sentMeta = metaRef.current;
673
+ metaRef.current = /* @__PURE__ */ new Map();
674
+ applyValue("");
675
+ shouldRefocusRef.current = true;
676
+ focusEditor();
677
+ const restore = () => {
678
+ if (valueRef.current.length > 0) return;
679
+ metaRef.current = sentMeta;
680
+ applyValue(message);
681
+ };
682
+ const result = onSend(message);
683
+ if (result instanceof Promise) {
684
+ void result.then((ok) => {
685
+ if (ok === false) restore();
686
+ });
687
+ } else if (result === false) {
688
+ restore();
689
+ }
690
+ },
691
+ [allowEmptySend, sending, disabled, onSend, focusEditor, applyValue]
692
+ );
693
+ const handleSubmit = useCallback(() => {
694
+ fire(valueRef.current.trim());
695
+ }, [fire]);
696
+ useImperativeHandle(
697
+ ref,
698
+ () => ({
699
+ focus: () => focusEditor(),
700
+ blur: () => editorRef.current?.blur(),
701
+ clear: () => {
702
+ metaRef.current = /* @__PURE__ */ new Map();
703
+ applyValue("");
704
+ },
705
+ setValue: (next) => {
706
+ applyValue(next);
707
+ requestAnimationFrame(() => focusEditor());
708
+ },
709
+ setValueAndCursor: (next, cursorOffset) => {
710
+ applyValue(next, Math.max(0, Math.min(cursorOffset, next.length)));
711
+ requestAnimationFrame(() => focusEditor());
712
+ },
713
+ submit: (next) => fire(next.trim()),
714
+ getValue: () => valueRef.current,
715
+ removeMentionTrigger: () => {
716
+ applyValue(valueRef.current.replace(MENTION_TRIGGER_AT_END, "$1"));
717
+ },
718
+ commitMention: (token, meta) => {
719
+ if (meta) metaRef.current = new Map(metaRef.current).set(token, meta);
720
+ const v = valueRef.current;
721
+ const next = MENTION_TRIGGER_AT_END.test(v) ? v.replace(MENTION_TRIGGER_AT_END, `$1@${token} `) : `${v}${v.length > 0 && !v.endsWith(" ") ? " " : ""}@${token} `;
722
+ applyValue(next);
723
+ requestAnimationFrame(() => focusEditor());
724
+ }
725
+ }),
726
+ [focusEditor, fire, applyValue]
727
+ );
728
+ const mentionEnabled = !!onMentionQueryChange;
729
+ const mentionQuery = useMemo(() => {
730
+ if (!mentionEnabled) return null;
731
+ const m = value.match(MENTION_TRIGGER_AT_END);
732
+ return m ? m[2] ?? "" : null;
733
+ }, [value, mentionEnabled]);
734
+ useEffect2(() => {
735
+ if (mentionEnabled) onMentionQueryChange?.(mentionQuery);
736
+ }, [mentionEnabled, mentionQuery, onMentionQueryChange]);
737
+ const slashMatch = useMemo(() => slashCommands ? value.match(SLASH_INPUT_TRIGGER) : null, [value, slashCommands]);
738
+ const slashPrefix = slashMatch ? slashMatch[1] ?? "" : null;
739
+ const [slashSuggestions, setSlashSuggestions] = useState2([]);
740
+ const [highlightedIdx, setHighlightedIdx] = useState2(0);
741
+ useEffect2(() => {
742
+ if (slashPrefix == null || !slashCommands) {
743
+ setSlashSuggestions([]);
744
+ return void 0;
745
+ }
746
+ let cancelled = false;
747
+ const ctrl = new AbortController();
748
+ const runFetch = async () => {
749
+ try {
750
+ const next = await slashCommands.fetchCommands(slashPrefix, ctrl.signal);
751
+ if (!cancelled) {
752
+ setSlashSuggestions(next);
753
+ setHighlightedIdx(0);
754
+ }
755
+ } catch (err) {
756
+ if (!cancelled && err?.name !== "AbortError") {
757
+ console.warn("[chat-input] slash-command fetch failed:", err);
758
+ }
759
+ }
760
+ };
761
+ const handle = setTimeout(() => {
762
+ runFetch().catch((err) => {
763
+ console.warn("[chat-input] slash-command fetch threw unexpectedly:", err);
764
+ });
765
+ }, 150);
766
+ return () => {
767
+ cancelled = true;
768
+ ctrl.abort();
769
+ clearTimeout(handle);
770
+ };
771
+ }, [slashPrefix, slashCommands]);
772
+ const acceptSuggestion = useCallback(
773
+ (cmd) => {
774
+ metaRef.current = /* @__PURE__ */ new Map();
775
+ const next = `/${cmd.id} `;
776
+ applyValue(next, next.length);
777
+ setSlashSuggestions([]);
778
+ requestAnimationFrame(() => focusEditor());
779
+ },
780
+ [applyValue, focusEditor]
781
+ );
782
+ const syncFromDom = useCallback(() => {
783
+ const el = editorRef.current;
784
+ if (!el) return;
785
+ setHasChips(el.querySelector("[data-token]") !== null);
786
+ setValue(serialize(el));
787
+ }, []);
788
+ const handleInput = useCallback(() => {
789
+ if (isComposingRef.current) return;
790
+ syncFromDom();
791
+ }, [syncFromDom]);
792
+ const handlePaste = useCallback(
793
+ (e) => {
794
+ e.preventDefault();
795
+ const text = e.clipboardData.getData("text/plain");
796
+ if (!text) return;
797
+ insertTextAtCaret(text);
798
+ syncFromDom();
799
+ },
800
+ [syncFromDom]
801
+ );
802
+ const handleKeyDown = useCallback(
803
+ (e) => {
804
+ if (slashSuggestions.length > 0 && slashPrefix !== null) {
805
+ if (e.key === "Escape") {
806
+ e.preventDefault();
807
+ setSlashSuggestions([]);
808
+ return;
809
+ }
810
+ if (e.key === "ArrowDown") {
811
+ e.preventDefault();
812
+ setHighlightedIdx((i) => (i + 1) % slashSuggestions.length);
813
+ return;
814
+ }
815
+ if (e.key === "ArrowUp") {
816
+ e.preventDefault();
817
+ setHighlightedIdx((i) => (i - 1 + slashSuggestions.length) % slashSuggestions.length);
818
+ return;
819
+ }
820
+ if (e.key === "Tab" || e.key === "Enter" && !e.shiftKey) {
821
+ e.preventDefault();
822
+ const sel = slashSuggestions[highlightedIdx];
823
+ if (sel) acceptSuggestion(sel);
824
+ return;
825
+ }
826
+ }
827
+ if (mentionQuery !== null) {
828
+ if (e.key === "Escape") {
829
+ e.preventDefault();
830
+ applyValue(valueRef.current.replace(MENTION_TRIGGER_AT_END, "$1"));
831
+ return;
832
+ }
833
+ if (e.key === "Enter" && !e.shiftKey) {
834
+ e.preventDefault();
835
+ return;
836
+ }
837
+ }
838
+ if (e.key === "Enter") {
839
+ if (e.shiftKey) {
840
+ e.preventDefault();
841
+ insertTextAtCaret("\n");
842
+ syncFromDom();
843
+ } else {
844
+ e.preventDefault();
845
+ handleSubmit();
846
+ }
847
+ }
848
+ },
849
+ [
850
+ slashSuggestions,
851
+ slashPrefix,
852
+ highlightedIdx,
853
+ acceptSuggestion,
854
+ handleSubmit,
855
+ mentionQuery,
856
+ applyValue,
857
+ syncFromDom
858
+ ]
859
+ );
860
+ const handleEditorMouseDown = useCallback(
861
+ (e) => {
862
+ const target = e.target;
863
+ const chip = target.closest("[data-token]");
864
+ if (!chip || !target.closest("button")) return;
865
+ e.preventDefault();
866
+ const token = chip.dataset.token ?? "";
867
+ const next = valueRef.current.replace(`@${token} `, "").replace(`@${token}`, "").replace(/[^\S\n]{2,}/g, " ").replace(/^[^\S\n]+/, "");
868
+ applyValue(next);
869
+ requestAnimationFrame(() => focusEditor());
870
+ },
871
+ [applyValue, focusEditor]
872
+ );
873
+ useEffect2(() => {
874
+ if (!sending) setIsStopping(false);
875
+ }, [sending]);
876
+ useEffect2(() => {
877
+ const wasSending = prevSendingRef.current;
878
+ prevSendingRef.current = sending;
879
+ if (wasSending && !sending && shouldRefocusRef.current && !awaitingResponse && !disabled) {
880
+ shouldRefocusRef.current = false;
881
+ focusEditor();
882
+ }
883
+ }, [sending, awaitingResponse, disabled, focusEditor]);
884
+ useEffect2(() => {
885
+ const wasAwaiting = prevAwaitingResponseRef.current;
886
+ prevAwaitingResponseRef.current = awaitingResponse;
887
+ if (!wasAwaiting || awaitingResponse || !shouldRefocusRef.current || disabled) return void 0;
888
+ shouldRefocusRef.current = false;
889
+ const id = requestAnimationFrame(() => focusEditor());
890
+ return () => cancelAnimationFrame(id);
891
+ }, [awaitingResponse, disabled, focusEditor]);
892
+ const handleStop = useCallback(async () => {
893
+ if (!onStop || isStopping) return;
894
+ setIsStopping(true);
895
+ try {
896
+ await onStop();
897
+ } catch {
898
+ setIsStopping(false);
899
+ }
900
+ }, [onStop, isStopping]);
901
+ const isStopMode = sending && !!onStop;
902
+ const hasContent = value.trim().length > 0 || allowEmptySend;
903
+ const sendDisabled = sending || disabled || !hasContent;
904
+ const isEmpty = value.length === 0;
905
+ const showPreview = !sending && !disabled && !!previewText && !previewDismissed;
906
+ return /* @__PURE__ */ jsx5(
907
+ "div",
908
+ {
909
+ className: cn(
910
+ fullWidth ? "w-full flex-shrink-0" : "mx-auto w-full max-w-ods-content-narrow flex-shrink-0",
911
+ className
912
+ ),
913
+ children: awaitingResponse && appearance === CHAT_APPEARANCE.CLASSIC ? /* @__PURE__ */ jsxs4("div", { className: "relative flex items-center justify-center gap-[var(--spacing-system-xs)] rounded-md border border-ods-border bg-ods-card px-[var(--spacing-system-s)] py-[var(--spacing-system-s)] transition-colors", children: [
914
+ /* @__PURE__ */ jsx5(ChatTypingIndicator, { size: "sm", dotClassName: "bg-ods-text-primary" }),
915
+ /* @__PURE__ */ jsx5("p", { className: "text-ods-text-secondary text-h4", children: "Waiting for Technician Response" })
916
+ ] }) : awaitingResponse ? (
917
+ // Hand-off bar (fae chat v2): who has the conversation now, and that a
918
+ // reply is on its way. Same 48px height as the editor row it replaces,
919
+ // so the thread above does not jump when the chat is handed off.
920
+ /* @__PURE__ */ jsxs4(
921
+ "div",
922
+ {
923
+ role: "status",
924
+ className: "flex min-h-11 w-full items-center justify-center gap-[var(--spacing-system-xs)] rounded-md border border-ods-border bg-ods-bg p-[var(--spacing-system-sf)] md:min-h-12",
925
+ children: [
926
+ awaitingTeam && awaitingTeam.length > 0 && /* @__PURE__ */ jsx5(
927
+ AvatarStack,
928
+ {
929
+ people: awaitingTeam,
930
+ total: awaitingTeamCount,
931
+ size: "xs",
932
+ ringClassName: "ring-ods-bg",
933
+ label: "Technicians"
934
+ }
935
+ ),
936
+ /* @__PURE__ */ jsx5("p", { className: "min-w-0 truncate text-ods-text-primary text-h4", children: "Handed off to your technical support team" }),
937
+ /* @__PURE__ */ jsx5(ChatTypingIndicator, { size: "sm", dotClassName: "bg-ods-text-secondary" })
938
+ ]
939
+ }
940
+ )
941
+ ) : /* @__PURE__ */ jsxs4("div", { className: "relative", children: [
942
+ /* @__PURE__ */ jsx5(
943
+ SlashCommandSuggestions,
944
+ {
945
+ commands: slashPrefix !== null ? slashSuggestions : [],
946
+ highlightedIdx,
947
+ onHover: setHighlightedIdx,
948
+ onSelect: acceptSuggestion,
949
+ resolveSourceIcon: slashCommands?.resolveSourceIcon,
950
+ onAction: slashCommands?.onAction
951
+ }
952
+ ),
953
+ /* @__PURE__ */ jsxs4(
954
+ "div",
955
+ {
956
+ onMouseDown: (e) => {
957
+ if (e.target === e.currentTarget) {
958
+ e.preventDefault();
959
+ focusEditor();
960
+ }
961
+ },
962
+ className: cn(
963
+ // `items-center` keeps the empty single-line text AND a mention chip
964
+ // vertically centered the same way. With a chip in the box, `py-1.5`
965
+ // (6px) pairs with the editor's `leading-9` (36px) → that row is
966
+ // 36 + 2*6 = 48px. The 36px line box is just barely above the 32px
967
+ // chip (incl. its ~3.5px vertical-align overhead), so there's almost
968
+ // no slack for the chip to drift in → it reads as centered.
969
+ // A chipless row is shorter than its content box and the `min-h-*`
970
+ // here is what sets its height: 48px from `md` up, 44px below.
971
+ "group flex min-h-11 w-full cursor-text items-center gap-2 px-3 py-1.5 transition-colors duration-200 md:min-h-12",
972
+ !hideBorder && "rounded-[6px] border border-ods-border bg-ods-card",
973
+ !hideBorder && (focused ? "border-ods-accent" : !disabled && "hover:border-ods-border-hover hover:bg-ods-bg-hover"),
974
+ !hideBorder && disabled && "!cursor-not-allowed bg-ods-bg",
975
+ hideBorder && "bg-transparent"
976
+ ),
977
+ children: [
978
+ startIcon && /* @__PURE__ */ jsx5("span", { className: "flex h-6 shrink-0 items-center", children: startIcon }),
979
+ /* @__PURE__ */ jsxs4("div", { className: "relative min-w-0 flex-1", children: [
980
+ isEmpty && !showPreview && /* @__PURE__ */ jsx5(
981
+ "span",
982
+ {
983
+ "data-editor-ghost": true,
984
+ className: cn(
985
+ // One line, clipped with an ellipsis (Figma 954:28455): the
986
+ // disabled copy is a sentence, and the panel's narrowest
987
+ // width does not fit it — wrapped, it ran under the row.
988
+ "pointer-events-none absolute left-0 top-0 w-full select-none truncate text-h4",
989
+ // Disabled reads as disabled (Figma 954:28455): the copy says
990
+ // why, and the colour says it is not an invitation to type.
991
+ disabled ? "text-ods-text-disabled" : "text-ods-text-secondary"
992
+ ),
993
+ children: disabled ? disabledPlaceholder : placeholder
994
+ }
995
+ ),
996
+ showPreview && /* @__PURE__ */ jsx5(
997
+ "p",
998
+ {
999
+ "data-editor-ghost": true,
1000
+ className: cn(
1001
+ "pointer-events-none absolute inset-x-0 top-0 m-0 select-none truncate text-ods-text-secondary text-h4",
1002
+ hasChips && "!leading-9"
1003
+ ),
1004
+ children: previewText
1005
+ }
1006
+ ),
1007
+ /* @__PURE__ */ jsx5(
1008
+ "div",
1009
+ {
1010
+ ref: editorRef,
1011
+ "data-editor": true,
1012
+ role: "textbox",
1013
+ "aria-multiline": "true",
1014
+ "aria-label": disabled ? disabledPlaceholder : typeof placeholder === "string" ? placeholder : "Message",
1015
+ contentEditable: !disabled,
1016
+ suppressContentEditableWarning: true,
1017
+ spellCheck: true,
1018
+ onInput: handleInput,
1019
+ onKeyDown: handleKeyDown,
1020
+ onPaste: handlePaste,
1021
+ onMouseDown: handleEditorMouseDown,
1022
+ onCompositionStart: () => {
1023
+ isComposingRef.current = true;
1024
+ },
1025
+ onCompositionEnd: () => {
1026
+ isComposingRef.current = false;
1027
+ syncFromDom();
1028
+ },
1029
+ onFocus: () => setFocused(true),
1030
+ onBlur: () => setFocused(false),
1031
+ className: cn(
1032
+ "max-h-[160px] overflow-y-auto overscroll-contain whitespace-pre-wrap break-words outline-none",
1033
+ // While a ghost preview shows, the editor stays IN FLOW (it
1034
+ // alone drives the row height, which must NOT change on hover —
1035
+ // see the preview comment above) and is only made transparent;
1036
+ // the absolutely-positioned single-line preview paints over it.
1037
+ showPreview && "opacity-0",
1038
+ // WITH chips, `leading-9` (36px) sits just above the 32px chip's
1039
+ // line-box need (~35.5px incl. vertical-align overhead): the LINE
1040
+ // drives row height (deterministic 48px, no overflow) AND the
1041
+ // near-zero slack keeps the chip centered against the `align-top`
1042
+ // `h-9` wrapper `buildChipEl` gives it. ~4px gap between wrapped
1043
+ // chip rows.
1044
+ // WITHOUT chips there is nothing tall to center, and forcing the
1045
+ // same 36px box on 14px phone text (`text-h4`) put a blank line's
1046
+ // worth of air between every wrapped row — so plain drafts keep
1047
+ // `text-h4`'s own responsive line-height (20px / 24px at md).
1048
+ // `min-h-*` pins the single-line box even when EMPTY: a
1049
+ // non-editable (`contentEditable=false`, i.e. `disabled`) empty div
1050
+ // would otherwise collapse to 0px, and `items-center` would
1051
+ // re-center the shorter wrapper in the row — dropping the `top-0`
1052
+ // placeholder down.
1053
+ "text-ods-text-primary text-h4",
1054
+ hasChips ? "min-h-9 !leading-9" : "min-h-[var(--font-line-space-h4-body)]",
1055
+ "scrollbar-thin scrollbar-track-transparent scrollbar-thumb-ods-border/30 hover:scrollbar-thumb-ods-text-secondary/30",
1056
+ disabled && "cursor-not-allowed"
1057
+ )
1058
+ }
1059
+ )
1060
+ ] }),
1061
+ /* @__PURE__ */ jsx5(
1062
+ "button",
1063
+ {
1064
+ type: "button",
1065
+ "aria-label": isStopMode ? "Stop generation" : "Send message",
1066
+ onClick: isStopMode ? handleStop : handleSubmit,
1067
+ disabled: isStopMode ? isStopping : sendDisabled,
1068
+ className: cn(
1069
+ "flex h-6 shrink-0 items-center text-ods-text-secondary transition-colors duration-200",
1070
+ // Focus accent applies to the SEND icon only. Stop stays neutral
1071
+ // regardless of where focus sits — otherwise it reads yellow after
1072
+ // an Enter-send (editor keeps focus) but gray after an approve
1073
+ // click (focus moved to the card button).
1074
+ focused && !isStopMode && "text-ods-accent",
1075
+ "[&_svg]:size-4 md:[&_svg]:size-6",
1076
+ "cursor-pointer hover:text-ods-text-primary",
1077
+ "focus-visible:text-ods-accent focus-visible:outline-none",
1078
+ "disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:text-ods-text-secondary"
1079
+ ),
1080
+ children: isStopMode ? /* @__PURE__ */ jsx5(StopCircleIcon, { size: 20 }) : /* @__PURE__ */ jsx5(Send01Icon, { size: 20 })
1081
+ }
1082
+ )
1083
+ ]
1084
+ }
1085
+ )
1086
+ ] })
1087
+ }
1088
+ );
1089
+ });
1090
+ ChatInput.displayName = "ChatInput";
1091
+
1092
+ // src/utils/format-date.ts
1093
+ var INVALID_DATE_PLACEHOLDER = "\u2014";
1094
+ var render = (input, fields) => formatDateWithTimezone(input, VIEWER_TIMEZONE, fields, { viewerLocale: true }) || INVALID_DATE_PLACEHOLDER;
1095
+ var formatDate = (input) => render(input, { dateStyle: "short" });
1096
+ var formatTime = (input) => render(input, { timeStyle: "short" });
1097
+
1098
+ export {
1099
+ Modal,
1100
+ ModalContent,
1101
+ ModalTwoColumn,
1102
+ ModalHeader,
1103
+ ModalTitle,
1104
+ ModalFooter,
1105
+ CHAT_TYPE,
1106
+ OWNER_TYPE,
1107
+ MESSAGE_ROLE,
1108
+ ASSISTANT_TYPE,
1109
+ AUTHOR_TYPE,
1110
+ APPROVAL_STATUS,
1111
+ APPROVAL_BLOCK_VARIANT,
1112
+ CHAT_APPEARANCE,
1113
+ CONNECTION_STATUS,
1114
+ isStructuredContent,
1115
+ normalizeContent,
1116
+ formatDate,
1117
+ formatTime,
1118
+ ChatTypingIndicator,
1119
+ MingoOnboardingCard,
1120
+ SlashCommandSuggestions,
1121
+ ChatInput
1122
+ };