@protobase/ui 0.121.5 → 0.121.7

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 (326) hide show
  1. package/dist/account/messages.d.ts +2 -2
  2. package/dist/activity-chart/messages.d.ts +2 -2
  3. package/dist/app/charts/messages.d.ts +2 -2
  4. package/dist/app/comments/messages.d.ts +2 -2
  5. package/dist/app/confirm-sign-in-messages.d.ts +2 -2
  6. package/dist/app/conversation/messages.d.ts +2 -2
  7. package/dist/app/conversation/thread-state.d.ts +1 -1
  8. package/dist/app/conversation-page/conversation-call.d.ts +14 -0
  9. package/dist/app/conversation-page/conversation-call.js +28 -0
  10. package/dist/app/conversation-page/conversation-header.d.ts +2 -1
  11. package/dist/app/conversation-page/conversation-header.js +20 -12
  12. package/dist/app/conversation-page/conversation-message.d.ts +10 -7
  13. package/dist/app/conversation-page/conversation-message.js +107 -20
  14. package/dist/app/conversation-page/conversation-messages.d.ts +9 -3
  15. package/dist/app/conversation-page/conversation-messages.js +42 -26
  16. package/dist/app/conversation-page/conversation-page.d.ts +4 -1
  17. package/dist/app/conversation-page/conversation-page.js +60 -28
  18. package/dist/app/conversation-page/conversation-reads.d.ts +17 -3
  19. package/dist/app/conversation-page/conversation-reads.js +30 -4
  20. package/dist/app/conversation-page/delete-message-dialog.d.ts +7 -0
  21. package/dist/app/conversation-page/delete-message-dialog.js +22 -0
  22. package/dist/app/conversation-page/message-access.d.ts +19 -0
  23. package/dist/app/conversation-page/message-access.js +25 -0
  24. package/dist/app/conversation-page/message-actions-bar.d.ts +12 -0
  25. package/dist/app/conversation-page/message-actions-bar.js +57 -0
  26. package/dist/app/conversation-page/message-actions-sheet.d.ts +18 -0
  27. package/dist/app/conversation-page/message-actions-sheet.js +73 -0
  28. package/dist/app/conversation-page/message-controls.d.ts +19 -0
  29. package/dist/app/conversation-page/message-controls.js +0 -0
  30. package/dist/app/conversation-page/message-editor.d.ts +23 -0
  31. package/dist/app/conversation-page/message-editor.js +72 -0
  32. package/dist/app/conversation-page/message-press.d.ts +59 -0
  33. package/dist/app/conversation-page/message-press.js +55 -0
  34. package/dist/app/conversation-page/message-setup.d.ts +27 -0
  35. package/dist/app/conversation-page/message-setup.js +0 -0
  36. package/dist/app/conversation-page/messages.d.ts +2 -2
  37. package/dist/app/conversation-page/reaction-chips.d.ts +18 -0
  38. package/dist/app/conversation-page/reaction-chips.js +30 -0
  39. package/dist/app/conversation-page/reactions.d.ts +28 -0
  40. package/dist/app/conversation-page/reactions.js +31 -0
  41. package/dist/app/conversation-page/reply-labels.d.ts +4 -0
  42. package/dist/app/conversation-page/reply-labels.js +9 -0
  43. package/dist/app/conversation-page/thread-head.d.ts +4 -0
  44. package/dist/app/conversation-page/thread-head.js +5 -0
  45. package/dist/app/conversation-page/thread-panel.d.ts +25 -0
  46. package/dist/app/conversation-page/thread-panel.js +107 -0
  47. package/dist/app/conversation-page/thread-summary.d.ts +10 -0
  48. package/dist/app/conversation-page/thread-summary.js +26 -0
  49. package/dist/app/conversation-page/use-message-controls.d.ts +14 -0
  50. package/dist/app/conversation-page/use-message-controls.js +32 -0
  51. package/dist/app/conversation-page/use-message-press.d.ts +16 -0
  52. package/dist/app/conversation-page/use-message-press.js +88 -0
  53. package/dist/app/conversation-page/use-message-reactions.d.ts +13 -0
  54. package/dist/app/conversation-page/use-message-reactions.js +24 -0
  55. package/dist/app/conversation-page/use-message-setup.d.ts +19 -0
  56. package/dist/app/conversation-page/use-message-setup.js +33 -0
  57. package/dist/app/conversation-page/use-message-writes.d.ts +14 -0
  58. package/dist/app/conversation-page/use-message-writes.js +49 -0
  59. package/dist/app/conversation-page/use-thread-address.d.ts +13 -0
  60. package/dist/app/conversation-page/use-thread-address.js +32 -0
  61. package/dist/app/conversation-page/use-thread-head.d.ts +15 -0
  62. package/dist/app/conversation-page/use-thread-head.js +31 -0
  63. package/dist/app/create/messages.d.ts +2 -2
  64. package/dist/app/current-address.d.ts +1 -0
  65. package/dist/app/current-address.js +2 -1
  66. package/dist/app/custom-section.d.ts +1 -1
  67. package/dist/app/delete/messages.d.ts +2 -2
  68. package/dist/app/displays/list-cards.d.ts +1 -1
  69. package/dist/app/displays/messages.d.ts +2 -2
  70. package/dist/app/embedded-list/messages.d.ts +2 -2
  71. package/dist/app/export/messages.d.ts +2 -2
  72. package/dist/app/field-messages.d.ts +2 -2
  73. package/dist/app/field-types/custom-step-container/messages.d.ts +2 -2
  74. package/dist/app/field-types/runner-install/messages.d.ts +2 -2
  75. package/dist/app/field-types/widget-part.d.ts +1 -1
  76. package/dist/app/field-types/workflow/definition.d.ts +1 -1
  77. package/dist/app/field-types/workflow/messages.d.ts +2 -2
  78. package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
  79. package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
  80. package/dist/app/field-types/workflow-status/messages.d.ts +2 -2
  81. package/dist/app/file-viewers/messages.d.ts +2 -2
  82. package/dist/app/focus/messages.d.ts +2 -2
  83. package/dist/app/gallery/messages.d.ts +2 -2
  84. package/dist/app/hand-order/messages.d.ts +2 -2
  85. package/dist/app/history/messages.d.ts +2 -2
  86. package/dist/app/import/messages.d.ts +2 -2
  87. package/dist/app/list-messages.d.ts +2 -2
  88. package/dist/app/messages.d.ts +2 -2
  89. package/dist/app/meta-gate-messages.d.ts +2 -2
  90. package/dist/app/new-version/messages.d.ts +2 -2
  91. package/dist/app/pages/custom-boundary.d.ts +1 -1
  92. package/dist/app/pages/custom-chosen.d.ts +1 -1
  93. package/dist/app/pages/messages.d.ts +2 -2
  94. package/dist/app/record-chart/messages.d.ts +2 -2
  95. package/dist/app/record-messages.d.ts +2 -2
  96. package/dist/app/record-mode/shown-layout.d.ts +1 -1
  97. package/dist/app/record-row/messages.d.ts +2 -2
  98. package/dist/app/related-cards/messages.d.ts +2 -2
  99. package/dist/app/runtime/messages.d.ts +2 -2
  100. package/dist/app/saved/messages.d.ts +2 -2
  101. package/dist/app/saved/saved-list.d.ts +1 -1
  102. package/dist/app/saved/use-favorite.d.ts +1 -1
  103. package/dist/app/search/messages.d.ts +2 -2
  104. package/dist/app/searches/messages.d.ts +2 -2
  105. package/dist/app/searches/use-save-search.d.ts +1 -1
  106. package/dist/app-shell/messages.d.ts +2 -2
  107. package/dist/assistant-dock/messages.d.ts +2 -2
  108. package/dist/auth/messages.d.ts +2 -2
  109. package/dist/calls/messages.d.ts +2 -2
  110. package/dist/carousel/messages.d.ts +2 -2
  111. package/dist/chat/messages.d.ts +2 -2
  112. package/dist/data/api-provider.d.ts +3 -0
  113. package/dist/data/query-keys.d.ts +2 -0
  114. package/dist/data/query-keys.js +7 -0
  115. package/dist/data-grid/messages.d.ts +2 -2
  116. package/dist/filter-panel/messages.d.ts +2 -2
  117. package/dist/format/messages.d.ts +2 -2
  118. package/dist/forms/messages.d.ts +2 -2
  119. package/dist/invitations/messages.d.ts +2 -2
  120. package/dist/live/messages.d.ts +2 -2
  121. package/dist/locale/en.js +33 -1
  122. package/dist/locale/en.json.d.ts +32 -0
  123. package/dist/locale/messages.d.ts +64 -0
  124. package/dist/locale/nl.js +33 -1
  125. package/dist/locale/texts-gate.d.ts +1 -1
  126. package/dist/mailbox/messages.d.ts +2 -2
  127. package/dist/markdown/messages.d.ts +2 -2
  128. package/dist/mentions/messages.d.ts +2 -2
  129. package/dist/mocks/orders.d.ts +1 -1
  130. package/dist/notifications/bell/messages.d.ts +2 -2
  131. package/dist/organizations/messages.d.ts +2 -2
  132. package/dist/package.js +1 -1
  133. package/dist/plugins/before-sign-in.d.ts +1 -1
  134. package/dist/plugins/messages.d.ts +2 -2
  135. package/dist/primitives/messages.d.ts +2 -2
  136. package/dist/record-view/messages.d.ts +2 -2
  137. package/dist/shell/assets/{account-page-3oOLqJdq.js → account-page-D2DFhATt.js} +2 -2
  138. package/dist/shell/assets/{app-DjHH5Mka.js → app-BYgBo_z1.js} +7 -7
  139. package/dist/shell/assets/app-woXO0qfi.css +2 -0
  140. package/dist/shell/assets/{assistant-shell-RQTkG_2q.js → assistant-shell-CZuq3-_1.js} +2 -2
  141. package/dist/shell/assets/board-display-BC1Xwyy-.js +2 -0
  142. package/dist/shell/assets/calendar-display-BAQS9s6i.js +2 -0
  143. package/dist/shell/assets/{call-rings-NYyOUCrp.js → call-rings-B9fm8IVt.js} +2 -2
  144. package/dist/shell/assets/{calls-BxDUPV6g.js → calls-Czowx1YO.js} +2 -2
  145. package/dist/shell/assets/{circle-alert-4WHj4eiD.js → circle-alert-_fRBdP-Q.js} +2 -2
  146. package/dist/shell/assets/{composed-page-NB57IFJx.js → composed-page-CW54YFwq.js} +2 -2
  147. package/dist/shell/assets/{composer-section-nD86ydnx.js → composer-section-C5FkK1rg.js} +2 -2
  148. package/dist/shell/assets/{connect-route-CYi3CAzW.js → connect-route-9UQdPFMU.js} +2 -2
  149. package/dist/shell/assets/{copy-field-B21YVA1e.js → copy-field-kzYEwhr-.js} +2 -2
  150. package/dist/shell/assets/create-route-BUYfZRsc.js +2 -0
  151. package/dist/shell/assets/{custom-step-container-field-B0m2n_ZP.js → custom-step-container-field--zORrk8N.js} +4 -4
  152. package/dist/shell/assets/embedded-list-CHU_9xSx.js +3 -0
  153. package/dist/shell/assets/en-_QUqgkv9.js +2 -0
  154. package/dist/shell/assets/{export-dialog-Yp1PWTD3.js → export-dialog-BOBW8mCE.js} +2 -2
  155. package/dist/shell/assets/export-worker-BUvAe-pU.js +15 -0
  156. package/dist/shell/assets/{first-organization-page-D_fYwVnJ.js → first-organization-page-MW8S5Y7S.js} +2 -2
  157. package/dist/shell/assets/{graph-view-DpUh0125.js → graph-view-D0OeBjYF.js} +2 -2
  158. package/dist/shell/assets/{group-donut-lFK0kxk2.js → group-donut-xyziydWM.js} +2 -2
  159. package/dist/shell/assets/{guest-call-page-y0vtPZ4Q.js → guest-call-page-DH1kDNtt.js} +3 -3
  160. package/dist/shell/assets/{html-viewer-Ch_o3S-N.js → html-viewer-c3e-7OLn.js} +2 -2
  161. package/dist/shell/assets/{import-dialog-COJYtW0v.js → import-dialog-C6bOsAIq.js} +2 -2
  162. package/dist/shell/assets/import-table-dialog-CQccEHdf.js +2 -0
  163. package/dist/shell/assets/{index-Cog4qvBd.js → index-CLpS4x6F.js} +1 -1
  164. package/dist/shell/assets/{invitations-page-DQ2gJKjJ.js → invitations-page-D6HhsOWj.js} +2 -2
  165. package/dist/shell/assets/{layout-grid-CnWxeX6y.js → layout-grid-pjoZzXon.js} +2 -2
  166. package/dist/shell/assets/{legend-item-CxbnsaWM.js → legend-item-B86V--7o.js} +2 -2
  167. package/dist/shell/assets/list-page-dNzugv-H.js +4 -0
  168. package/dist/shell/assets/{maplibre-D91OvVN2.js → maplibre-DQzo1J5C.js} +2 -2
  169. package/dist/shell/assets/{markdown-content-BBqjcKWb.js → markdown-content-MhPltQkM.js} +2 -2
  170. package/dist/shell/assets/members-page-CtpsMd1_.js +2 -0
  171. package/dist/shell/assets/{message-content-BWbid0cJ.js → message-content-BcVNCPRA.js} +3 -3
  172. package/dist/shell/assets/messages-DbktI6r5.js +2 -0
  173. package/dist/shell/assets/nl-B7S2-35v.js +2 -0
  174. package/dist/shell/assets/organization-page-DFbVBi0Z.js +2 -0
  175. package/dist/shell/assets/organizations-page-CwNmA9m_.js +2 -0
  176. package/dist/shell/assets/parse-worker-BXZM3e8_.js +35 -0
  177. package/dist/shell/assets/{pending-invitation-row-lyixrKB6.js → pending-invitation-row-DoSd4IA0.js} +2 -2
  178. package/dist/shell/assets/{period-chart-Bbc8p3Rg.js → period-chart-BHhRENq9.js} +2 -2
  179. package/dist/shell/assets/{person-row-z2cLI7-t.js → person-row-CAw28fyx.js} +2 -2
  180. package/dist/shell/assets/public-form-page-BSMW5adw.js +2 -0
  181. package/dist/shell/assets/{record-lines-86164Z9g.js → record-lines-D6y6-mvM.js} +2 -2
  182. package/dist/shell/assets/{record-map-Bf4E_mGG.js → record-map-BWSxXERS.js} +2 -2
  183. package/dist/shell/assets/{record-opens-LCgqvPRp.js → record-opens-CgMvd88M.js} +2 -2
  184. package/dist/shell/assets/record-page-YjDzQpdH.js +3 -0
  185. package/dist/shell/assets/{record-preview-Ccd8jn1P.js → record-preview-BI6XSujc.js} +2 -2
  186. package/dist/shell/assets/{records-map-Dfn6Est5.js → records-map-DqgtOW5s.js} +2 -2
  187. package/dist/shell/assets/render-node-WNms9GRI.js +3 -0
  188. package/dist/shell/assets/reorder-button-el0y4Qb_.js +2 -0
  189. package/dist/shell/assets/{run-trace-view-CSpcrh2g.js → run-trace-view-DlOxyoRy.js} +2 -2
  190. package/dist/shell/assets/{runner-install-field-Cx_wYqDa.js → runner-install-field-BW0Yr1jA.js} +2 -2
  191. package/dist/shell/assets/{runtime-update-nAzCBurf.js → runtime-update-15cUO82W.js} +2 -2
  192. package/dist/shell/assets/shared-protobase-ui-CrlPSKTg.js +1 -0
  193. package/dist/shell/assets/{sheet-source-c0GC-WZh.js → sheet-source-CXBPRRJ7.js} +3 -3
  194. package/dist/shell/assets/sign-in-policy-page-C-Norcx-.js +2 -0
  195. package/dist/shell/assets/start-block-queries-Ds0t8AIB.js +2 -0
  196. package/dist/shell/assets/step-catalog-C0Jv_f2p.js +2 -0
  197. package/dist/shell/assets/{step-panel-Dg17K_zr.js → step-panel-xxYW43ZO.js} +2 -2
  198. package/dist/shell/assets/timeline-display-DMfHIekc.js +2 -0
  199. package/dist/shell/assets/{trash-DhOlkezJ.js → trash-DZjQRbg0.js} +2 -2
  200. package/dist/shell/assets/{update-set-8ikjlH6J.js → update-set-C0O3YlPe.js} +2 -2
  201. package/dist/shell/assets/use-calendar-move-Ck9j0VjG.js +2 -0
  202. package/dist/shell/assets/{use-display-rows-D-t41ukb.js → use-display-rows-BI5CIpA4.js} +2 -2
  203. package/dist/shell/assets/use-my-invitations-DOL5bOzC.js +2 -0
  204. package/dist/shell/assets/{use-paged-search-Bd5FeVqP.js → use-paged-search-CxcddHjw.js} +2 -2
  205. package/dist/shell/assets/{use-run-trace-zNmbuuI0.js → use-run-trace-Dxw-VDf9.js} +2 -2
  206. package/dist/shell/assets/{use-workflow-page-CYSODCjU.js → use-workflow-page-DerdCK9r.js} +2 -2
  207. package/dist/shell/assets/{use-workflow-types-B_d3Wm_W.js → use-workflow-types-D7ucZS1V.js} +2 -2
  208. package/dist/shell/assets/{workflow-canvas-BhnZr06Y.js → workflow-canvas-DW-a463k.js} +4 -4
  209. package/dist/shell/assets/{workflow-field-DWpt44wp.js → workflow-field-D0yL3zqL.js} +3 -3
  210. package/dist/shell/assets/{workflow-graph-editor-Ce_8ibEd.js → workflow-graph-editor-LTVY9Oyx.js} +2 -2
  211. package/dist/shell/assets/{workflow-run-field-Bop7Wyjc.js → workflow-run-field-Bf-BDgRL.js} +3 -3
  212. package/dist/shell/assets/workflow-status-field-CRbBFb6K.js +2 -0
  213. package/dist/shell/assets/workflow-workbench-FmLVX6Ri.js +4 -0
  214. package/dist/shell/index.html +4 -4
  215. package/dist/shell/protobase.shell.json +2 -2
  216. package/dist/shell/protobase.sw.js +2 -2
  217. package/dist/shell-source-maps/assets/{account-page-3oOLqJdq.js.map → account-page-D2DFhATt.js.map} +1 -1
  218. package/dist/shell-source-maps/assets/app-BYgBo_z1.js.map +1 -0
  219. package/dist/shell-source-maps/assets/{assistant-shell-RQTkG_2q.js.map → assistant-shell-CZuq3-_1.js.map} +1 -1
  220. package/dist/shell-source-maps/assets/{board-display-3VEgI2-G.js.map → board-display-BC1Xwyy-.js.map} +1 -1
  221. package/dist/shell-source-maps/assets/{calendar-display-DnUzydOX.js.map → calendar-display-BAQS9s6i.js.map} +1 -1
  222. package/dist/shell-source-maps/assets/{call-rings-NYyOUCrp.js.map → call-rings-B9fm8IVt.js.map} +1 -1
  223. package/dist/shell-source-maps/assets/{calls-BxDUPV6g.js.map → calls-Czowx1YO.js.map} +1 -1
  224. package/dist/shell-source-maps/assets/{circle-alert-4WHj4eiD.js.map → circle-alert-_fRBdP-Q.js.map} +1 -1
  225. package/dist/shell-source-maps/assets/{composed-page-NB57IFJx.js.map → composed-page-CW54YFwq.js.map} +1 -1
  226. package/dist/shell-source-maps/assets/{composer-section-nD86ydnx.js.map → composer-section-C5FkK1rg.js.map} +1 -1
  227. package/dist/shell-source-maps/assets/{connect-route-CYi3CAzW.js.map → connect-route-9UQdPFMU.js.map} +1 -1
  228. package/dist/shell-source-maps/assets/{copy-field-B21YVA1e.js.map → copy-field-kzYEwhr-.js.map} +1 -1
  229. package/dist/shell-source-maps/assets/{create-route-DG8lKoaw.js.map → create-route-BUYfZRsc.js.map} +1 -1
  230. package/dist/shell-source-maps/assets/{custom-step-container-field-B0m2n_ZP.js.map → custom-step-container-field--zORrk8N.js.map} +1 -1
  231. package/dist/shell-source-maps/assets/{embedded-list-DPBYBewp.js.map → embedded-list-CHU_9xSx.js.map} +1 -1
  232. package/dist/shell-source-maps/assets/{en-BED8S1rX.js.map → en-_QUqgkv9.js.map} +1 -1
  233. package/dist/shell-source-maps/assets/{export-dialog-Yp1PWTD3.js.map → export-dialog-BOBW8mCE.js.map} +1 -1
  234. package/dist/shell-source-maps/assets/export-worker-BUvAe-pU.js.map +1 -0
  235. package/dist/shell-source-maps/assets/{first-organization-page-D_fYwVnJ.js.map → first-organization-page-MW8S5Y7S.js.map} +1 -1
  236. package/dist/shell-source-maps/assets/{graph-view-DpUh0125.js.map → graph-view-D0OeBjYF.js.map} +1 -1
  237. package/dist/shell-source-maps/assets/{group-donut-lFK0kxk2.js.map → group-donut-xyziydWM.js.map} +1 -1
  238. package/dist/shell-source-maps/assets/{guest-call-page-y0vtPZ4Q.js.map → guest-call-page-DH1kDNtt.js.map} +1 -1
  239. package/dist/shell-source-maps/assets/{html-viewer-Ch_o3S-N.js.map → html-viewer-c3e-7OLn.js.map} +1 -1
  240. package/dist/shell-source-maps/assets/{import-dialog-COJYtW0v.js.map → import-dialog-C6bOsAIq.js.map} +1 -1
  241. package/dist/shell-source-maps/assets/{import-table-dialog-BVK63qN9.js.map → import-table-dialog-CQccEHdf.js.map} +1 -1
  242. package/dist/shell-source-maps/assets/{invitations-page-DQ2gJKjJ.js.map → invitations-page-D6HhsOWj.js.map} +1 -1
  243. package/dist/shell-source-maps/assets/{layout-grid-CnWxeX6y.js.map → layout-grid-pjoZzXon.js.map} +1 -1
  244. package/dist/shell-source-maps/assets/{legend-item-CxbnsaWM.js.map → legend-item-B86V--7o.js.map} +1 -1
  245. package/dist/shell-source-maps/assets/{list-page-CVcURiCf.js.map → list-page-dNzugv-H.js.map} +1 -1
  246. package/dist/shell-source-maps/assets/{maplibre-D91OvVN2.js.map → maplibre-DQzo1J5C.js.map} +1 -1
  247. package/dist/shell-source-maps/assets/{markdown-content-BBqjcKWb.js.map → markdown-content-MhPltQkM.js.map} +1 -1
  248. package/dist/shell-source-maps/assets/{members-page-nE56rARK.js.map → members-page-CtpsMd1_.js.map} +1 -1
  249. package/dist/shell-source-maps/assets/{message-content-BWbid0cJ.js.map → message-content-BcVNCPRA.js.map} +1 -1
  250. package/dist/shell-source-maps/assets/{messages-C2CtF7J9.js.map → messages-DbktI6r5.js.map} +1 -1
  251. package/dist/shell-source-maps/assets/nl-B7S2-35v.js.map +1 -0
  252. package/dist/shell-source-maps/assets/{organization-page-BFjoUdDW.js.map → organization-page-DFbVBi0Z.js.map} +1 -1
  253. package/dist/shell-source-maps/assets/{organizations-page-CkAMvdUh.js.map → organizations-page-CwNmA9m_.js.map} +1 -1
  254. package/dist/shell-source-maps/assets/parse-worker-BXZM3e8_.js.map +1 -0
  255. package/dist/shell-source-maps/assets/{pending-invitation-row-lyixrKB6.js.map → pending-invitation-row-DoSd4IA0.js.map} +1 -1
  256. package/dist/shell-source-maps/assets/{period-chart-Bbc8p3Rg.js.map → period-chart-BHhRENq9.js.map} +1 -1
  257. package/dist/shell-source-maps/assets/{person-row-z2cLI7-t.js.map → person-row-CAw28fyx.js.map} +1 -1
  258. package/dist/shell-source-maps/assets/{public-form-page-CdSWojtk.js.map → public-form-page-BSMW5adw.js.map} +1 -1
  259. package/dist/shell-source-maps/assets/{record-lines-86164Z9g.js.map → record-lines-D6y6-mvM.js.map} +1 -1
  260. package/dist/shell-source-maps/assets/{record-map-Bf4E_mGG.js.map → record-map-BWSxXERS.js.map} +1 -1
  261. package/dist/shell-source-maps/assets/{record-opens-LCgqvPRp.js.map → record-opens-CgMvd88M.js.map} +1 -1
  262. package/dist/shell-source-maps/assets/record-page-YjDzQpdH.js.map +1 -0
  263. package/dist/shell-source-maps/assets/{record-preview-Ccd8jn1P.js.map → record-preview-BI6XSujc.js.map} +1 -1
  264. package/dist/shell-source-maps/assets/{records-map-Dfn6Est5.js.map → records-map-DqgtOW5s.js.map} +1 -1
  265. package/dist/shell-source-maps/assets/{render-node-vMDMqnoF.js.map → render-node-WNms9GRI.js.map} +1 -1
  266. package/dist/shell-source-maps/assets/{reorder-button-B8L4nfbO.js.map → reorder-button-el0y4Qb_.js.map} +1 -1
  267. package/dist/shell-source-maps/assets/{run-trace-view-CSpcrh2g.js.map → run-trace-view-DlOxyoRy.js.map} +1 -1
  268. package/dist/shell-source-maps/assets/{runner-install-field-Cx_wYqDa.js.map → runner-install-field-BW0Yr1jA.js.map} +1 -1
  269. package/dist/shell-source-maps/assets/{runtime-update-nAzCBurf.js.map → runtime-update-15cUO82W.js.map} +1 -1
  270. package/dist/shell-source-maps/assets/{sheet-source-c0GC-WZh.js.map → sheet-source-CXBPRRJ7.js.map} +1 -1
  271. package/dist/shell-source-maps/assets/{sign-in-policy-page-CXa0c4KT.js.map → sign-in-policy-page-C-Norcx-.js.map} +1 -1
  272. package/dist/shell-source-maps/assets/{start-block-queries-C05LRzeA.js.map → start-block-queries-Ds0t8AIB.js.map} +1 -1
  273. package/dist/shell-source-maps/assets/{step-catalog-CK73Ybue.js.map → step-catalog-C0Jv_f2p.js.map} +1 -1
  274. package/dist/shell-source-maps/assets/{step-panel-Dg17K_zr.js.map → step-panel-xxYW43ZO.js.map} +1 -1
  275. package/dist/shell-source-maps/assets/{timeline-display-kp9RN9m-.js.map → timeline-display-DMfHIekc.js.map} +1 -1
  276. package/dist/shell-source-maps/assets/{trash-DhOlkezJ.js.map → trash-DZjQRbg0.js.map} +1 -1
  277. package/dist/shell-source-maps/assets/{update-set-8ikjlH6J.js.map → update-set-C0O3YlPe.js.map} +1 -1
  278. package/dist/shell-source-maps/assets/{use-calendar-move-DAoy91cG.js.map → use-calendar-move-Ck9j0VjG.js.map} +1 -1
  279. package/dist/shell-source-maps/assets/{use-display-rows-D-t41ukb.js.map → use-display-rows-BI5CIpA4.js.map} +1 -1
  280. package/dist/shell-source-maps/assets/{use-my-invitations-DRo_aCmU.js.map → use-my-invitations-DOL5bOzC.js.map} +1 -1
  281. package/dist/shell-source-maps/assets/{use-paged-search-Bd5FeVqP.js.map → use-paged-search-CxcddHjw.js.map} +1 -1
  282. package/dist/shell-source-maps/assets/{use-run-trace-zNmbuuI0.js.map → use-run-trace-Dxw-VDf9.js.map} +1 -1
  283. package/dist/shell-source-maps/assets/{use-workflow-page-CYSODCjU.js.map → use-workflow-page-DerdCK9r.js.map} +1 -1
  284. package/dist/shell-source-maps/assets/{use-workflow-types-B_d3Wm_W.js.map → use-workflow-types-D7ucZS1V.js.map} +1 -1
  285. package/dist/shell-source-maps/assets/{workflow-canvas-BhnZr06Y.js.map → workflow-canvas-DW-a463k.js.map} +1 -1
  286. package/dist/shell-source-maps/assets/{workflow-field-DWpt44wp.js.map → workflow-field-D0yL3zqL.js.map} +1 -1
  287. package/dist/shell-source-maps/assets/{workflow-graph-editor-Ce_8ibEd.js.map → workflow-graph-editor-LTVY9Oyx.js.map} +1 -1
  288. package/dist/shell-source-maps/assets/{workflow-run-field-Bop7Wyjc.js.map → workflow-run-field-Bf-BDgRL.js.map} +1 -1
  289. package/dist/shell-source-maps/assets/{workflow-status-field-BJlxjk2A.js.map → workflow-status-field-CRbBFb6K.js.map} +1 -1
  290. package/dist/shell-source-maps/assets/{workflow-workbench-fB8RaEan.js.map → workflow-workbench-FmLVX6Ri.js.map} +1 -1
  291. package/dist/status/messages.d.ts +2 -2
  292. package/dist/users/messages.d.ts +2 -2
  293. package/package.json +5 -5
  294. package/dist/shell/assets/app-DLkpxjgP.css +0 -2
  295. package/dist/shell/assets/board-display-3VEgI2-G.js +0 -2
  296. package/dist/shell/assets/calendar-display-DnUzydOX.js +0 -2
  297. package/dist/shell/assets/create-route-DG8lKoaw.js +0 -2
  298. package/dist/shell/assets/embedded-list-DPBYBewp.js +0 -3
  299. package/dist/shell/assets/en-BED8S1rX.js +0 -2
  300. package/dist/shell/assets/export-worker-S5xPFD_M.js +0 -15
  301. package/dist/shell/assets/import-table-dialog-BVK63qN9.js +0 -2
  302. package/dist/shell/assets/list-page-CVcURiCf.js +0 -4
  303. package/dist/shell/assets/members-page-nE56rARK.js +0 -2
  304. package/dist/shell/assets/messages-C2CtF7J9.js +0 -2
  305. package/dist/shell/assets/nl-DjHVomkB.js +0 -2
  306. package/dist/shell/assets/organization-page-BFjoUdDW.js +0 -2
  307. package/dist/shell/assets/organizations-page-CkAMvdUh.js +0 -2
  308. package/dist/shell/assets/parse-worker-CO_GFfU7.js +0 -35
  309. package/dist/shell/assets/public-form-page-CdSWojtk.js +0 -2
  310. package/dist/shell/assets/record-page-CjaqyGgn.js +0 -3
  311. package/dist/shell/assets/render-node-vMDMqnoF.js +0 -3
  312. package/dist/shell/assets/reorder-button-B8L4nfbO.js +0 -2
  313. package/dist/shell/assets/shared-protobase-ui-CjxtHEA2.js +0 -1
  314. package/dist/shell/assets/sign-in-policy-page-CXa0c4KT.js +0 -2
  315. package/dist/shell/assets/start-block-queries-C05LRzeA.js +0 -2
  316. package/dist/shell/assets/step-catalog-CK73Ybue.js +0 -2
  317. package/dist/shell/assets/timeline-display-kp9RN9m-.js +0 -2
  318. package/dist/shell/assets/use-calendar-move-DAoy91cG.js +0 -2
  319. package/dist/shell/assets/use-my-invitations-DRo_aCmU.js +0 -2
  320. package/dist/shell/assets/workflow-status-field-BJlxjk2A.js +0 -2
  321. package/dist/shell/assets/workflow-workbench-fB8RaEan.js +0 -4
  322. package/dist/shell-source-maps/assets/app-DjHH5Mka.js.map +0 -1
  323. package/dist/shell-source-maps/assets/export-worker-S5xPFD_M.js.map +0 -1
  324. package/dist/shell-source-maps/assets/nl-DjHVomkB.js.map +0 -1
  325. package/dist/shell-source-maps/assets/parse-worker-CO_GFfU7.js.map +0 -1
  326. package/dist/shell-source-maps/assets/record-page-CjaqyGgn.js.map +0 -1
@@ -5,17 +5,23 @@ import { useRecordTitle } from "../titles/record-titles.js";
5
5
  import { keyValue } from "../create/create-values.js";
6
6
  import { MessageComposer } from "../conversation/message-composer.js";
7
7
  import { FullArea } from "../full-area-record.js";
8
+ import { ConversationCall } from "./conversation-call.js";
8
9
  import { text } from "./messages.js";
9
10
  import { ConversationHeader } from "./conversation-header.js";
10
11
  import { ConversationMessages } from "./conversation-messages.js";
11
12
  import { matchingMembers } from "./member-search.js";
13
+ import { ThreadPanel } from "./thread-panel.js";
12
14
  import { useReadPosition } from "./use-read-position.js";
15
+ import { useThreadAddress } from "./use-thread-address.js";
13
16
  import { jsx, jsxs } from "react/jsx-runtime";
14
17
  //#region src/app/conversation-page/conversation-page.tsx
15
18
  /**
16
19
  * A record page that is the record's conversation (`.record({ conversation })`), filling the content area: its header,
17
20
  * its messages and the box that sends one, where `@` lists the organization's members. The page does not scroll; the
18
- * messages scroll in a box of their own, so the box stays in view. Key it by the record, so another one starts afresh.
21
+ * messages scroll in a box of their own, so the box stays in view. With threads, the thread its address names
22
+ * (`?thread=`) opens in a panel beside it. With `call`, the record's call shows while the page joins it (`?call=join`),
23
+ * between the header and the messages: beside them, or above them at mobile width, with a thread's panel after both,
24
+ * covering the screen at mobile width. Key it by the record, so another one starts afresh.
19
25
  */
20
26
  const ConversationPage = ({ page, scope }) => {
21
27
  const { resources, views } = useAdminMeta();
@@ -32,37 +38,63 @@ const ConversationPage = ({ page, scope }) => {
32
38
  me
33
39
  });
34
40
  const searchPeople = page.mentions === void 0 ? void 0 : async (query) => matchingMembers(members.data ?? [], query, me);
41
+ const thread = useThreadAddress(scope.model.name, scope.key);
42
+ const threaded = page.thread && {
43
+ ...page,
44
+ thread: page.thread
45
+ };
35
46
  return /* @__PURE__ */ jsx(FullArea, { children: /* @__PURE__ */ jsxs("div", {
36
- className: "flex min-h-0 min-w-0 flex-col",
37
- children: [
38
- /* @__PURE__ */ jsx(ConversationHeader, {
47
+ className: "flex min-h-0 min-w-0",
48
+ children: [/* @__PURE__ */ jsxs("div", {
49
+ className: "flex min-h-0 min-w-0 flex-1 flex-col",
50
+ children: [/* @__PURE__ */ jsx(ConversationHeader, {
39
51
  page,
40
52
  scope,
41
53
  title
42
- }),
43
- /* @__PURE__ */ jsx(ConversationMessages, {
44
- page,
45
- model,
46
- recordKey: scope.key,
47
- me,
48
- position
49
- }),
50
- position.error !== void 0 && /* @__PURE__ */ jsx("p", {
51
- className: "shrink-0 px-4 text-sm text-danger-text",
52
- children: text("positionNotSaved")
53
- }),
54
- /* @__PURE__ */ jsx("div", {
55
- className: "shrink-0 px-3 pb-3",
56
- children: /* @__PURE__ */ jsx(MessageComposer, {
57
- resource: page.resource,
58
- field: page.text,
59
- values: { [page.field]: keyValue(scope.model, scope.key) },
60
- placeholder: page.placeholder,
61
- searchPeople,
62
- mentions: page.mentions
63
- })
64
- })
65
- ]
54
+ }), /* @__PURE__ */ jsxs("div", {
55
+ className: "flex min-h-0 min-w-0 flex-1 max-md:flex-col",
56
+ children: [/* @__PURE__ */ jsx(ConversationCall, {
57
+ page,
58
+ scope
59
+ }), /* @__PURE__ */ jsxs("div", {
60
+ className: "flex min-h-0 min-w-0 flex-1 flex-col",
61
+ children: [
62
+ /* @__PURE__ */ jsx(ConversationMessages, {
63
+ page,
64
+ model,
65
+ recordKey: scope.key,
66
+ me,
67
+ position,
68
+ threadTo: threaded && thread.to,
69
+ searchPeople
70
+ }),
71
+ position.error !== void 0 && /* @__PURE__ */ jsx("p", {
72
+ className: "shrink-0 px-4 text-sm text-danger-text",
73
+ children: text("positionNotSaved")
74
+ }),
75
+ /* @__PURE__ */ jsx("div", {
76
+ className: "shrink-0 px-3 pb-3",
77
+ children: /* @__PURE__ */ jsx(MessageComposer, {
78
+ resource: page.resource,
79
+ field: page.text,
80
+ values: { [page.field]: keyValue(scope.model, scope.key) },
81
+ placeholder: page.placeholder,
82
+ searchPeople,
83
+ mentions: page.mentions
84
+ })
85
+ })
86
+ ]
87
+ })]
88
+ })]
89
+ }), threaded && thread.open !== void 0 && /* @__PURE__ */ jsx(ThreadPanel, {
90
+ page: threaded,
91
+ owner: scope.model,
92
+ recordKey: scope.key,
93
+ first: thread.open,
94
+ me,
95
+ searchPeople,
96
+ onClose: thread.close
97
+ }, thread.open)]
66
98
  }) });
67
99
  };
68
100
  //#endregion
@@ -1,16 +1,30 @@
1
- import { ConversationPageModel, ReadPositionModel } from "@protobase/schema";
1
+ import { Client } from "@protobase/client";
2
+ import { ConversationPageModel, ReactionsModel, ReadPositionModel } from "@protobase/schema";
2
3
  //#region src/app/conversation-page/conversation-reads.d.ts
3
4
  /** How many messages a page of the conversation brings: the latest on opening, and each "Load earlier". */
4
5
  export declare const conversationPageSize = 50;
6
+ /** How many reactions one read of a page of messages brings; a page with more reads on until it has them all. */
7
+ export declare const reactionsPageSize = 500;
5
8
  /**
6
9
  * The read of a conversation's messages through the list API, with the reader's own access, so a message they may not
7
- * read never shows: those whose relation holds the record's key, newest first, a page at a time.
10
+ * read never shows: those whose relation holds the record's key, newest first, a page at a time. With threads, only
11
+ * the messages of the conversation itself, not the replies in a thread.
8
12
  */
9
- export declare const messagesRequest: (page: Pick<ConversationPageModel, "field" | "time">, recordKey: string) => {
13
+ export declare const messagesRequest: (page: Pick<ConversationPageModel, "field" | "time" | "thread">, recordKey: string) => {
10
14
  filter: string;
11
15
  orderBy: string;
12
16
  pageSize: number;
13
17
  };
18
+ /** The read of the replies in the thread of the message keyed `first`, newest first, a page at a time. */
19
+ export declare const repliesRequest: (page: Pick<ConversationPageModel, "time">, thread: NonNullable<ConversationPageModel["thread"]>, first: string) => {
20
+ filter: string;
21
+ orderBy: string;
22
+ pageSize: number;
23
+ };
24
+ /** The filter of the reactions to the messages keyed `messages`. */
25
+ export declare const reactionsFilter: (reactions: Pick<ReactionsModel, "field">, messages: readonly string[]) => string;
26
+ /** Every reaction to the messages keyed `messages`, in one read, or one per `reactionsPageSize` of them. */
27
+ export declare const readReactions: (client: Pick<Client, "list">, reactions: Pick<ReactionsModel, "resource" | "field">, messages: readonly string[]) => Promise<Record<string, unknown>[]>;
14
28
  /**
15
29
  * The read of the reader's own read position in a record, through the list API: the one whose relation holds the
16
30
  * record's key and whose author, `author`, is `me`, even where the resource lets them read other people's.
@@ -1,23 +1,49 @@
1
- import { recordMessagesFilter } from "../conversation/record-filter.js";
2
1
  import { threadSort } from "@protobase/layout";
3
2
  import { createWhere, printFilter } from "@protobase/schema";
4
3
  //#region src/app/conversation-page/conversation-reads.ts
5
4
  const where$1 = createWhere();
6
5
  /** How many messages a page of the conversation brings: the latest on opening, and each "Load earlier". */
7
6
  const conversationPageSize = 50;
7
+ /** How many reactions one read of a page of messages brings; a page with more reads on until it has them all. */
8
+ const reactionsPageSize = 500;
8
9
  /**
9
10
  * The read of a conversation's messages through the list API, with the reader's own access, so a message they may not
10
- * read never shows: those whose relation holds the record's key, newest first, a page at a time.
11
+ * read never shows: those whose relation holds the record's key, newest first, a page at a time. With threads, only
12
+ * the messages of the conversation itself, not the replies in a thread.
11
13
  */
12
14
  const messagesRequest = (page, recordKey) => ({
13
- filter: recordMessagesFilter(page.field, recordKey),
15
+ filter: printFilter(page.thread ? where$1.and(where$1.eq(page.field, recordKey), where$1.isNull(page.thread.field)) : where$1.eq(page.field, recordKey)),
14
16
  orderBy: threadSort(page.time),
15
17
  pageSize: 50
16
18
  });
19
+ /** The read of the replies in the thread of the message keyed `first`, newest first, a page at a time. */
20
+ const repliesRequest = (page, thread, first) => ({
21
+ filter: printFilter(where$1.eq(thread.field, first)),
22
+ orderBy: threadSort(page.time),
23
+ pageSize: 50
24
+ });
25
+ /** The filter of the reactions to the messages keyed `messages`. */
26
+ const reactionsFilter = (reactions, messages) => printFilter(where$1.in(reactions.field, [...messages]));
27
+ /** Every reaction to the messages keyed `messages`, in one read, or one per `reactionsPageSize` of them. */
28
+ const readReactions = async (client, reactions, messages) => {
29
+ const filter = reactionsFilter(reactions, messages);
30
+ const rows = [];
31
+ let pageToken = "";
32
+ do {
33
+ const page = await client.list(reactions.resource, {
34
+ filter,
35
+ pageSize: 500,
36
+ pageToken
37
+ });
38
+ rows.push(...page.items);
39
+ pageToken = page.nextPageToken;
40
+ } while (pageToken);
41
+ return rows;
42
+ };
17
43
  /**
18
44
  * The read of the reader's own read position in a record, through the list API: the one whose relation holds the
19
45
  * record's key and whose author, `author`, is `me`, even where the resource lets them read other people's.
20
46
  */
21
47
  const ownPositionFilter = (position, recordKey, author, me) => printFilter(where$1.and(where$1.eq(position.field, recordKey), where$1.eq(author, me)));
22
48
  //#endregion
23
- export { conversationPageSize, messagesRequest, ownPositionFilter };
49
+ export { conversationPageSize, messagesRequest, ownPositionFilter, reactionsFilter, reactionsPageSize, readReactions, repliesRequest };
@@ -0,0 +1,7 @@
1
+ //#region src/app/conversation-page/delete-message-dialog.d.ts
2
+ /** Asks before a message is deleted, since it goes for everyone in the conversation. */
3
+ export declare const DeleteMessageDialog: ({ onDelete, onClose }: {
4
+ onDelete: () => void;
5
+ onClose: () => void;
6
+ }) => import("react").JSX.Element;
7
+ //#endregion
@@ -0,0 +1,22 @@
1
+ import { Button } from "../../primitives/button.js";
2
+ import { ResponsiveDialog } from "../../primitives/responsive-dialog.js";
3
+ import { text } from "./messages.js";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/app/conversation-page/delete-message-dialog.tsx
6
+ /** Asks before a message is deleted, since it goes for everyone in the conversation. */
7
+ const DeleteMessageDialog = ({ onDelete, onClose }) => /* @__PURE__ */ jsx(ResponsiveDialog, {
8
+ open: true,
9
+ title: text("deleteTitle"),
10
+ description: text("deleteDescription"),
11
+ onClose,
12
+ actions: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
13
+ onClick: onClose,
14
+ children: text("cancel")
15
+ }), /* @__PURE__ */ jsx(Button, {
16
+ variant: "danger",
17
+ onClick: onDelete,
18
+ children: text("delete")
19
+ })] })
20
+ });
21
+ //#endregion
22
+ export { DeleteMessageDialog };
@@ -0,0 +1,19 @@
1
+ import { ResourcePermissions } from "@protobase/client";
2
+ import { ConversationPageModel } from "@protobase/schema";
3
+ //#region src/app/conversation-page/message-access.d.ts
4
+ type Row = Record<string, unknown>;
5
+ /**
6
+ * What the reader may do to a message, as far as the page can tell: edit their own (`mine`) when the conversation lets
7
+ * authors edit, and delete one when it lets anyone and its condition does not keep the message, each only where the
8
+ * resource's access and the row's own permissions allow it. The server checks every write again.
9
+ */
10
+ export declare const messageAccess: (page: Pick<ConversationPageModel, "edit" | "delete">, row: Row, mine: boolean, permissions: ResourcePermissions) => {
11
+ edit: boolean;
12
+ delete: boolean;
13
+ };
14
+ /** Whether the reader may react, and take back their own reactions, by the reaction resource's access. */
15
+ export declare const reactionAccess: (permissions: ResourcePermissions) => {
16
+ react: boolean;
17
+ unreact: boolean;
18
+ };
19
+ //#endregion
@@ -0,0 +1,25 @@
1
+ import { can, rowAllows } from "../permissions.js";
2
+ import { evaluateCondition, parseCondition } from "@protobase/layout";
3
+ //#region src/app/conversation-page/message-access.ts
4
+ const deleteAllowed = (option, row) => {
5
+ if (option === void 0 || option === false) return false;
6
+ if (option === true) return true;
7
+ const condition = parseCondition(option.unless);
8
+ return condition.ok && !evaluateCondition(condition, row);
9
+ };
10
+ /**
11
+ * What the reader may do to a message, as far as the page can tell: edit their own (`mine`) when the conversation lets
12
+ * authors edit, and delete one when it lets anyone and its condition does not keep the message, each only where the
13
+ * resource's access and the row's own permissions allow it. The server checks every write again.
14
+ */
15
+ const messageAccess = (page, row, mine, permissions) => ({
16
+ edit: page.edit === true && mine && can(permissions, "update") && rowAllows(row, "update"),
17
+ delete: deleteAllowed(page.delete, row) && can(permissions, "delete") && rowAllows(row, "delete")
18
+ });
19
+ /** Whether the reader may react, and take back their own reactions, by the reaction resource's access. */
20
+ const reactionAccess = (permissions) => ({
21
+ react: can(permissions, "create"),
22
+ unreact: can(permissions, "delete")
23
+ });
24
+ //#endregion
25
+ export { messageAccess, reactionAccess };
@@ -0,0 +1,12 @@
1
+ import { MessageControls } from "./message-controls.js";
2
+ //#region src/app/conversation-page/message-actions-bar.d.ts
3
+ /**
4
+ * What the reader can do to a message, a bar over its top right corner shown while they point at it or move into it with
5
+ * the keyboard, so it takes no room of its own: react with an emoji they have not reacted with yet, reply in its
6
+ * thread, edit and delete. Only a screen that can point shows it; on a touch screen a tap or long-press opens
7
+ * `MessageActionsSheet` instead.
8
+ */
9
+ export declare const MessageActionsBar: ({ controls }: {
10
+ controls: MessageControls;
11
+ }) => import("react").JSX.Element | null;
12
+ //#endregion
@@ -0,0 +1,57 @@
1
+ import { Button, buttonClass } from "../../primitives/button.js";
2
+ import { AppLink } from "../use-app-address.js";
3
+ import { text } from "./messages.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/app/conversation-page/message-actions-bar.tsx
6
+ /**
7
+ * What the reader can do to a message, a bar over its top right corner shown while they point at it or move into it with
8
+ * the keyboard, so it takes no room of its own: react with an emoji they have not reacted with yet, reply in its
9
+ * thread, edit and delete. Only a screen that can point shows it; on a touch screen a tap or long-press opens
10
+ * `MessageActionsSheet` instead.
11
+ */
12
+ const MessageActionsBar = ({ controls }) => {
13
+ const { emoji, groups, onReact, thread, onEdit, onDelete } = controls;
14
+ const reacted = new Set(groups.filter((group) => group.mine).map((group) => group.emoji));
15
+ const offered = onReact ? emoji.filter((entry) => !reacted.has(entry.emoji)) : [];
16
+ if (offered.length === 0 && !thread && !onEdit && !onDelete) return null;
17
+ return /* @__PURE__ */ jsxs("div", {
18
+ role: "toolbar",
19
+ "aria-label": text("messageActions"),
20
+ className: "pointer-events-none absolute -top-3 right-0 z-10 hidden items-center gap-0.5 rounded-md border border-border bg-background p-0.5 opacity-0 shadow-sm transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 focus-within:pointer-events-auto focus-within:opacity-100 [@media(hover:hover)]:flex",
21
+ children: [
22
+ offered.map(({ emoji: value, symbol, name }) => /* @__PURE__ */ jsx(Button, {
23
+ size: "icon",
24
+ variant: "ghost",
25
+ "aria-label": text("reactWith", { name }),
26
+ title: name,
27
+ onClick: () => onReact(value),
28
+ children: /* @__PURE__ */ jsx("span", {
29
+ "aria-hidden": true,
30
+ children: symbol
31
+ })
32
+ }, value)),
33
+ thread && /* @__PURE__ */ jsx(AppLink, {
34
+ to: thread,
35
+ className: buttonClass({
36
+ variant: "ghost",
37
+ size: "sm"
38
+ }),
39
+ children: text("replyInThread")
40
+ }),
41
+ onEdit && /* @__PURE__ */ jsx(Button, {
42
+ size: "sm",
43
+ variant: "ghost",
44
+ onClick: onEdit,
45
+ children: text("edit")
46
+ }),
47
+ onDelete && /* @__PURE__ */ jsx(Button, {
48
+ size: "sm",
49
+ variant: "ghost",
50
+ onClick: onDelete,
51
+ children: text("delete")
52
+ })
53
+ ]
54
+ });
55
+ };
56
+ //#endregion
57
+ export { MessageActionsBar };
@@ -0,0 +1,18 @@
1
+ import { MessageControls } from "./message-controls.js";
2
+ //#region src/app/conversation-page/message-actions-sheet.d.ts
3
+ type Props = {
4
+ controls: MessageControls;
5
+ /** Names the message it acts on, such as "Message from Lena Fischer". */
6
+ title: string;
7
+ /** The message's text, shown under the title. */
8
+ preview: string;
9
+ onClose: () => void;
10
+ };
11
+ /**
12
+ * What the reader can do to a message, opened by a finger's tap or long-press on it, under a line of the message: a row
13
+ * of every emoji, those they reacted with pressed, taking their reaction back as its chip does, then reply in its
14
+ * thread, copy its text, edit and delete. A sheet from the bottom at mobile width, a dialog on a wider touch screen.
15
+ * Each choice closes it.
16
+ */
17
+ export declare const MessageActionsSheet: ({ controls, title, preview, onClose }: Props) => import("react").JSX.Element;
18
+ //#endregion
@@ -0,0 +1,73 @@
1
+ import { Button, buttonClass } from "../../primitives/button.js";
2
+ import { ResponsiveDialog } from "../../primitives/responsive-dialog.js";
3
+ import { AppLink } from "../use-app-address.js";
4
+ import { text } from "./messages.js";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ //#region src/app/conversation-page/message-actions-sheet.tsx
7
+ /**
8
+ * What the reader can do to a message, opened by a finger's tap or long-press on it, under a line of the message: a row
9
+ * of every emoji, those they reacted with pressed, taking their reaction back as its chip does, then reply in its
10
+ * thread, copy its text, edit and delete. A sheet from the bottom at mobile width, a dialog on a wider touch screen.
11
+ * Each choice closes it.
12
+ */
13
+ const MessageActionsSheet = ({ controls, title, preview, onClose }) => {
14
+ const { emoji, groups, onReact, onUnreact, thread, onCopy, onEdit, onDelete } = controls;
15
+ const mine = new Map(groups.flatMap((group) => group.mine ? [[group.emoji, group.mine]] : []));
16
+ const choose = (onChoose) => () => {
17
+ onClose();
18
+ onChoose();
19
+ };
20
+ return /* @__PURE__ */ jsx(ResponsiveDialog, {
21
+ open: true,
22
+ title,
23
+ description: preview && /* @__PURE__ */ jsx("span", {
24
+ className: "line-clamp-2",
25
+ children: preview
26
+ }),
27
+ onClose,
28
+ actions: /* @__PURE__ */ jsxs(Fragment, { children: [
29
+ onDelete && /* @__PURE__ */ jsx(Button, {
30
+ variant: "danger",
31
+ onClick: choose(onDelete),
32
+ children: text("delete")
33
+ }),
34
+ onEdit && /* @__PURE__ */ jsx(Button, {
35
+ onClick: choose(onEdit),
36
+ children: text("edit")
37
+ }),
38
+ onCopy && /* @__PURE__ */ jsx(Button, {
39
+ onClick: choose(onCopy),
40
+ children: text("copyText")
41
+ }),
42
+ thread && /* @__PURE__ */ jsx(AppLink, {
43
+ to: thread,
44
+ className: buttonClass(),
45
+ onClick: onClose,
46
+ children: text("replyInThread")
47
+ })
48
+ ] }),
49
+ children: emoji.length > 0 && /* @__PURE__ */ jsx("div", {
50
+ role: "group",
51
+ "aria-label": text("react"),
52
+ className: "flex flex-wrap gap-1",
53
+ children: emoji.map(({ emoji: value, symbol, name }) => {
54
+ const reaction = mine.get(value);
55
+ const press = reaction ? onUnreact && (() => onUnreact(reaction)) : onReact && (() => onReact(value));
56
+ return /* @__PURE__ */ jsx(Button, {
57
+ size: "icon",
58
+ variant: reaction ? "secondary" : "ghost",
59
+ "aria-pressed": reaction !== void 0,
60
+ "aria-label": text("reactWith", { name }),
61
+ disabled: !press,
62
+ onClick: press && choose(press),
63
+ children: /* @__PURE__ */ jsx("span", {
64
+ "aria-hidden": true,
65
+ children: symbol
66
+ })
67
+ }, value);
68
+ })
69
+ })
70
+ });
71
+ };
72
+ //#endregion
73
+ export { MessageActionsSheet };
@@ -0,0 +1,19 @@
1
+ import { EmojiEntry, ReactionGroup } from "./reactions.js";
2
+ import { AppAddress } from "@protobase/schema";
3
+ //#region src/app/conversation-page/message-controls.d.ts
4
+ /**
5
+ * What the reader can do to one message, each given only when they may: react with an emoji of `emoji`, take back
6
+ * their own reaction, open its thread (`thread`, the address of a message of the conversation itself), copy its text,
7
+ * edit it and delete it. The pointer's bar and the touch sheet both draw it.
8
+ */
9
+ export type MessageControls = {
10
+ emoji: readonly EmojiEntry[];
11
+ groups: readonly ReactionGroup[];
12
+ onReact?: (emoji: string) => void;
13
+ onUnreact?: (reaction: Record<string, unknown>) => void;
14
+ thread?: AppAddress;
15
+ onCopy?: () => void;
16
+ onEdit?: () => void;
17
+ onDelete?: () => void;
18
+ };
19
+ //#endregion
File without changes
@@ -0,0 +1,23 @@
1
+ import { PickedUser } from "../../mentions/mention-text.js";
2
+ import { PeopleSearch } from "../../mentions/use-people-search.js";
3
+ import "../../mentions/index.js";
4
+ //#region src/app/conversation-page/message-editor.d.ts
5
+ type Props = {
6
+ /** The message's text as it is. */
7
+ body: string;
8
+ /** The people it mentions, by id and name, kept while their `@name` stays in the text. */
9
+ picked: PickedUser[];
10
+ /** Finds the people `@` lists; without it, `@` is plain text. */
11
+ searchPeople?: PeopleSearch;
12
+ /** Resolves true once saved; false leaves the box open, as the server refused it. */
13
+ onSave: (body: string, mentions: string[]) => Promise<boolean>;
14
+ onCancel: () => void;
15
+ };
16
+ /**
17
+ * A message's text in a box to change it, its mentions kept while their `@name` stays: Enter or Save keeps the trimmed
18
+ * text, Shift+Enter starts a new line, Escape or Cancel leaves it as it was. An empty text is no edit: deleting is.
19
+ * The box is read-only while it saves, so nothing typed then is lost, and a save that ends after the box closed
20
+ * closes nothing, such as the box opened again on the same message.
21
+ */
22
+ export declare const MessageEditor: ({ body, picked, searchPeople, onSave, onCancel }: Props) => import("react").JSX.Element;
23
+ //#endregion
@@ -0,0 +1,72 @@
1
+ import { Button } from "../../primitives/button.js";
2
+ import { mentionedIds } from "../../mentions/mention-text.js";
3
+ import { MentionBox } from "../../mentions/mention-box.js";
4
+ import { text } from "./messages.js";
5
+ import { useEffect, useRef, useState } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ //#region src/app/conversation-page/message-editor.tsx
8
+ /**
9
+ * A message's text in a box to change it, its mentions kept while their `@name` stays: Enter or Save keeps the trimmed
10
+ * text, Shift+Enter starts a new line, Escape or Cancel leaves it as it was. An empty text is no edit: deleting is.
11
+ * The box is read-only while it saves, so nothing typed then is lost, and a save that ends after the box closed
12
+ * closes nothing, such as the box opened again on the same message.
13
+ */
14
+ const MessageEditor = ({ body, picked, searchPeople, onSave, onCancel }) => {
15
+ const [draft, setDraft] = useState({
16
+ text: body,
17
+ picked
18
+ });
19
+ const [saving, setSaving] = useState(false);
20
+ const mounted = useRef(true);
21
+ useEffect(() => {
22
+ mounted.current = true;
23
+ return () => {
24
+ mounted.current = false;
25
+ };
26
+ }, []);
27
+ const trimmed = draft.text.trim();
28
+ const save = async () => {
29
+ if (trimmed === "" || saving) return;
30
+ if (trimmed === body) return onCancel();
31
+ setSaving(true);
32
+ const saved = await onSave(trimmed, mentionedIds(trimmed, draft.picked));
33
+ if (!mounted.current) return;
34
+ setSaving(false);
35
+ if (saved) onCancel();
36
+ };
37
+ const keys = (event) => {
38
+ if (event.nativeEvent.isComposing) return;
39
+ if (event.key === "Escape") return onCancel();
40
+ if (event.key !== "Enter" || event.shiftKey) return;
41
+ event.preventDefault();
42
+ save();
43
+ };
44
+ return /* @__PURE__ */ jsxs("div", {
45
+ className: "flex flex-col gap-2 whitespace-normal",
46
+ children: [/* @__PURE__ */ jsx(MentionBox, {
47
+ value: draft,
48
+ onChange: setDraft,
49
+ searchPeople,
50
+ onKeyDown: keys,
51
+ readOnly: saving,
52
+ "aria-label": text("editMessage"),
53
+ autoFocus: true
54
+ }), /* @__PURE__ */ jsxs("div", {
55
+ className: "flex gap-2",
56
+ children: [/* @__PURE__ */ jsx(Button, {
57
+ size: "sm",
58
+ variant: "primary",
59
+ disabled: trimmed === "",
60
+ loading: saving,
61
+ onClick: () => void save(),
62
+ children: text("save")
63
+ }), /* @__PURE__ */ jsx(Button, {
64
+ size: "sm",
65
+ onClick: onCancel,
66
+ children: text("cancel")
67
+ })]
68
+ })]
69
+ });
70
+ };
71
+ //#endregion
72
+ export { MessageEditor };
@@ -0,0 +1,59 @@
1
+ //#region src/app/conversation-page/message-press.d.ts
2
+ /** How long a finger rests on a message before its actions open without letting go. */
3
+ export declare const longPressMs = 500;
4
+ /** How far, in CSS pixels, a finger may drift before its press counts as a scroll rather than a tap or long-press. */
5
+ export declare const pressSlop = 10;
6
+ /**
7
+ * Where a finger came down on a message, while it may still become a tap or long-press. `tapOpens`: a tap opens the
8
+ * actions too, unless it came while the reader was typing, when it only lowers the keyboard. `lifted`: the finger is
9
+ * up, so only the tap's click may still come, however late the browser sends it.
10
+ */
11
+ export type Press = {
12
+ x: number;
13
+ y: number;
14
+ tapOpens: boolean;
15
+ lifted?: true;
16
+ } | undefined;
17
+ export type PressEvent =
18
+ /**
19
+ * `touch`: a finger rather than a mouse or pen. `onControl`: on a link or button of the message, which keeps its own
20
+ * press. `typing`: a text box had the focus, so the on-screen keyboard is up.
21
+ */
22
+ {
23
+ type: 'down';
24
+ x: number;
25
+ y: number;
26
+ touch: boolean;
27
+ onControl: boolean;
28
+ typing: boolean;
29
+ } | {
30
+ type: 'move';
31
+ x: number;
32
+ y: number;
33
+ } |
34
+ /** The finger lifted. */
35
+ {
36
+ type: 'up';
37
+ } |
38
+ /** The browser took the touch over, such as to scroll. */
39
+ {
40
+ type: 'cancel';
41
+ } |
42
+ /** The finger stayed down for `longPressMs`. */
43
+ {
44
+ type: 'held';
45
+ } |
46
+ /** The browser's click after the finger lifted. */
47
+ {
48
+ type: 'tap';
49
+ };
50
+ /**
51
+ * The next state of a press on a message, and whether it opens the message's actions: a finger that comes down on the
52
+ * message, off its links and buttons, and lifts or rests there without drifting away; a tap while the reader types
53
+ * only lowers the keyboard. A mouse keeps the hover bar.
54
+ */
55
+ export declare const nextPress: (press: Press, event: PressEvent) => {
56
+ press: Press;
57
+ open: boolean;
58
+ };
59
+ //#endregion