@protobase/ui 0.121.4 → 0.121.6

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 (311) 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/change-confirm/messages.d.ts +2 -2
  4. package/dist/app/charts/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-page/conversation-message.d.ts +10 -7
  8. package/dist/app/conversation-page/conversation-message.js +107 -20
  9. package/dist/app/conversation-page/conversation-messages.d.ts +9 -3
  10. package/dist/app/conversation-page/conversation-messages.js +42 -26
  11. package/dist/app/conversation-page/conversation-page.d.ts +2 -1
  12. package/dist/app/conversation-page/conversation-page.js +51 -30
  13. package/dist/app/conversation-page/conversation-reads.d.ts +17 -3
  14. package/dist/app/conversation-page/conversation-reads.js +30 -4
  15. package/dist/app/conversation-page/delete-message-dialog.d.ts +7 -0
  16. package/dist/app/conversation-page/delete-message-dialog.js +22 -0
  17. package/dist/app/conversation-page/message-access.d.ts +19 -0
  18. package/dist/app/conversation-page/message-access.js +25 -0
  19. package/dist/app/conversation-page/message-actions-bar.d.ts +12 -0
  20. package/dist/app/conversation-page/message-actions-bar.js +57 -0
  21. package/dist/app/conversation-page/message-actions-sheet.d.ts +18 -0
  22. package/dist/app/conversation-page/message-actions-sheet.js +73 -0
  23. package/dist/app/conversation-page/message-controls.d.ts +19 -0
  24. package/dist/app/conversation-page/message-controls.js +0 -0
  25. package/dist/app/conversation-page/message-editor.d.ts +23 -0
  26. package/dist/app/conversation-page/message-editor.js +72 -0
  27. package/dist/app/conversation-page/message-press.d.ts +59 -0
  28. package/dist/app/conversation-page/message-press.js +55 -0
  29. package/dist/app/conversation-page/message-setup.d.ts +27 -0
  30. package/dist/app/conversation-page/message-setup.js +0 -0
  31. package/dist/app/conversation-page/messages.d.ts +2 -2
  32. package/dist/app/conversation-page/reaction-chips.d.ts +18 -0
  33. package/dist/app/conversation-page/reaction-chips.js +30 -0
  34. package/dist/app/conversation-page/reactions.d.ts +28 -0
  35. package/dist/app/conversation-page/reactions.js +31 -0
  36. package/dist/app/conversation-page/reply-labels.d.ts +4 -0
  37. package/dist/app/conversation-page/reply-labels.js +9 -0
  38. package/dist/app/conversation-page/thread-head.d.ts +4 -0
  39. package/dist/app/conversation-page/thread-head.js +5 -0
  40. package/dist/app/conversation-page/thread-panel.d.ts +25 -0
  41. package/dist/app/conversation-page/thread-panel.js +107 -0
  42. package/dist/app/conversation-page/thread-summary.d.ts +10 -0
  43. package/dist/app/conversation-page/thread-summary.js +26 -0
  44. package/dist/app/conversation-page/use-message-controls.d.ts +14 -0
  45. package/dist/app/conversation-page/use-message-controls.js +32 -0
  46. package/dist/app/conversation-page/use-message-press.d.ts +16 -0
  47. package/dist/app/conversation-page/use-message-press.js +88 -0
  48. package/dist/app/conversation-page/use-message-reactions.d.ts +13 -0
  49. package/dist/app/conversation-page/use-message-reactions.js +24 -0
  50. package/dist/app/conversation-page/use-message-setup.d.ts +19 -0
  51. package/dist/app/conversation-page/use-message-setup.js +33 -0
  52. package/dist/app/conversation-page/use-message-writes.d.ts +14 -0
  53. package/dist/app/conversation-page/use-message-writes.js +49 -0
  54. package/dist/app/conversation-page/use-thread-address.d.ts +13 -0
  55. package/dist/app/conversation-page/use-thread-address.js +29 -0
  56. package/dist/app/conversation-page/use-thread-head.d.ts +15 -0
  57. package/dist/app/conversation-page/use-thread-head.js +31 -0
  58. package/dist/app/create/messages.d.ts +2 -2
  59. package/dist/app/current-address.d.ts +1 -0
  60. package/dist/app/current-address.js +2 -1
  61. package/dist/app/custom-section.d.ts +1 -1
  62. package/dist/app/delete/messages.d.ts +2 -2
  63. package/dist/app/displays/list-cards.d.ts +1 -1
  64. package/dist/app/displays/messages.d.ts +2 -2
  65. package/dist/app/embedded-list/messages.d.ts +2 -2
  66. package/dist/app/export/messages.d.ts +2 -2
  67. package/dist/app/field-messages.d.ts +2 -2
  68. package/dist/app/field-types/custom-step-container/messages.d.ts +2 -2
  69. package/dist/app/field-types/runner-install/messages.d.ts +2 -2
  70. package/dist/app/field-types/widget-part.d.ts +1 -1
  71. package/dist/app/field-types/workflow/messages.d.ts +2 -2
  72. package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
  73. package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
  74. package/dist/app/file-viewers/messages.d.ts +2 -2
  75. package/dist/app/focus/messages.d.ts +2 -2
  76. package/dist/app/hand-order/messages.d.ts +2 -2
  77. package/dist/app/import/messages.d.ts +2 -2
  78. package/dist/app/list-edit/messages.d.ts +2 -2
  79. package/dist/app/list-messages.d.ts +2 -2
  80. package/dist/app/messages.d.ts +2 -2
  81. package/dist/app/meta-gate-messages.d.ts +2 -2
  82. package/dist/app/new-version/messages.d.ts +2 -2
  83. package/dist/app/pages/custom-boundary.d.ts +1 -1
  84. package/dist/app/pages/custom-chosen.d.ts +1 -1
  85. package/dist/app/pages/messages.d.ts +2 -2
  86. package/dist/app/record-chart/messages.d.ts +2 -2
  87. package/dist/app/record-messages.d.ts +2 -2
  88. package/dist/app/record-mode/shown-layout.d.ts +1 -1
  89. package/dist/app/record-row/messages.d.ts +2 -2
  90. package/dist/app/related-cards/messages.d.ts +2 -2
  91. package/dist/app/runtime/messages.d.ts +2 -2
  92. package/dist/app/saved/messages.d.ts +2 -2
  93. package/dist/app/saved/saved-list.d.ts +1 -1
  94. package/dist/app/searches/messages.d.ts +2 -2
  95. package/dist/app-shell/messages.d.ts +2 -2
  96. package/dist/assistant-dock/messages.d.ts +2 -2
  97. package/dist/auth/messages.d.ts +2 -2
  98. package/dist/calls/messages.d.ts +2 -2
  99. package/dist/compact-table/messages.d.ts +2 -2
  100. package/dist/data/query-keys.d.ts +2 -0
  101. package/dist/data/query-keys.js +7 -0
  102. package/dist/data-grid/column-spec.d.ts +1 -1
  103. package/dist/data-grid/messages.d.ts +2 -2
  104. package/dist/filter-panel/messages.d.ts +2 -2
  105. package/dist/format/messages.d.ts +2 -2
  106. package/dist/forms/messages.d.ts +2 -2
  107. package/dist/invitations/messages.d.ts +2 -2
  108. package/dist/locale/en.js +33 -1
  109. package/dist/locale/en.json.d.ts +32 -0
  110. package/dist/locale/messages.d.ts +64 -0
  111. package/dist/locale/nl.js +33 -1
  112. package/dist/locale/texts-gate.d.ts +1 -1
  113. package/dist/mailbox/messages.d.ts +2 -2
  114. package/dist/mentions/messages.d.ts +2 -2
  115. package/dist/mocks/orders.d.ts +1 -1
  116. package/dist/notifications/bell/messages.d.ts +2 -2
  117. package/dist/organizations/messages.d.ts +2 -2
  118. package/dist/package.js +1 -1
  119. package/dist/plugins/before-sign-in.d.ts +1 -1
  120. package/dist/primitives/messages.d.ts +2 -2
  121. package/dist/record-view/messages.d.ts +2 -2
  122. package/dist/shell/assets/{account-page-DUZhZTQe.js → account-page-D1S57VfK.js} +2 -2
  123. package/dist/shell/assets/{app-CWCg5I0x.js → app-2d0YQdR7.js} +7 -7
  124. package/dist/shell/assets/app-Cv0aTDUz.css +2 -0
  125. package/dist/shell/assets/{assistant-shell-BB-qTSNN.js → assistant-shell-Bb0KRa8E.js} +2 -2
  126. package/dist/shell/assets/board-display-B0hMSJLc.js +2 -0
  127. package/dist/shell/assets/calendar-display-DNTXJ2Lj.js +2 -0
  128. package/dist/shell/assets/{call-rings-CMu9LCVA.js → call-rings-D2efFDY-.js} +2 -2
  129. package/dist/shell/assets/{calls-CAwUiNFC.js → calls-mmgOyL_n.js} +2 -2
  130. package/dist/shell/assets/{circle-alert-DBbXAqFr.js → circle-alert-BWBUUk9M.js} +2 -2
  131. package/dist/shell/assets/{composed-page-CDZcDEpb.js → composed-page-jwnPyg2o.js} +2 -2
  132. package/dist/shell/assets/{composer-section-BLXex8WX.js → composer-section-raPl4Mf_.js} +2 -2
  133. package/dist/shell/assets/{connect-route-DMz3C4cs.js → connect-route-DnTRKFdW.js} +2 -2
  134. package/dist/shell/assets/{copy-field-D0wtSWzb.js → copy-field-BtAsyigB.js} +2 -2
  135. package/dist/shell/assets/create-route-CEuERj3K.js +2 -0
  136. package/dist/shell/assets/{custom-step-container-field-B2IfCGAR.js → custom-step-container-field-B1RXdjeH.js} +4 -4
  137. package/dist/shell/assets/embedded-list-BIvBUQCm.js +3 -0
  138. package/dist/shell/assets/en-_QUqgkv9.js +2 -0
  139. package/dist/shell/assets/{export-dialog-Ogugn53w.js → export-dialog-BibbA1JE.js} +2 -2
  140. package/dist/shell/assets/export-worker-BUvAe-pU.js +15 -0
  141. package/dist/shell/assets/{first-organization-page-C4-rQ_I2.js → first-organization-page-DgL_N1W1.js} +2 -2
  142. package/dist/shell/assets/{graph-view-CzTg5srj.js → graph-view-D5uSsu67.js} +2 -2
  143. package/dist/shell/assets/{group-donut-3ebIs5gF.js → group-donut-BeAjogon.js} +2 -2
  144. package/dist/shell/assets/{guest-call-page-CD0LJIht.js → guest-call-page-DXOfa3rF.js} +3 -3
  145. package/dist/shell/assets/{html-viewer-BYJGABwQ.js → html-viewer-SuYrL7fw.js} +2 -2
  146. package/dist/shell/assets/{import-dialog-BpUqiIUH.js → import-dialog-DjMoHP8N.js} +2 -2
  147. package/dist/shell/assets/import-table-dialog-45beoZDX.js +2 -0
  148. package/dist/shell/assets/{index-k2uQ-7c-.js → index-CH_1Ns3R.js} +1 -1
  149. package/dist/shell/assets/{invitations-page-BsN4z7EC.js → invitations-page-CwtY8Tbq.js} +2 -2
  150. package/dist/shell/assets/{layout-grid-DvW29fH0.js → layout-grid-DSS3tNid.js} +2 -2
  151. package/dist/shell/assets/{legend-item-CuD1ms2_.js → legend-item--JCuOrBW.js} +2 -2
  152. package/dist/shell/assets/list-page-Do4wAJXr.js +4 -0
  153. package/dist/shell/assets/{maplibre-DWK2ok5e.js → maplibre-DmuZi_YZ.js} +2 -2
  154. package/dist/shell/assets/{markdown-content-HRnOc3WU.js → markdown-content-B0lkEYGr.js} +2 -2
  155. package/dist/shell/assets/members-page-BaLe1e4J.js +2 -0
  156. package/dist/shell/assets/{message-content-ypqgAMEt.js → message-content-JJSKhX2W.js} +3 -3
  157. package/dist/shell/assets/messages-BaKmueMc.js +2 -0
  158. package/dist/shell/assets/nl-B7S2-35v.js +2 -0
  159. package/dist/shell/assets/organization-page-CIML07Cz.js +2 -0
  160. package/dist/shell/assets/organizations-page-Cctkt6cu.js +2 -0
  161. package/dist/shell/assets/parse-worker-BXZM3e8_.js +35 -0
  162. package/dist/shell/assets/{pending-invitation-row-1zBmAsKC.js → pending-invitation-row-xf_wfIQ2.js} +2 -2
  163. package/dist/shell/assets/{period-chart-Mcf3pdtE.js → period-chart-Cuw7AISK.js} +2 -2
  164. package/dist/shell/assets/{person-row-Dg1T6u1A.js → person-row-DtXuek5W.js} +2 -2
  165. package/dist/shell/assets/public-form-page-noW7JMKv.js +2 -0
  166. package/dist/shell/assets/{record-lines-B4MMhxps.js → record-lines-B-Wll3-R.js} +2 -2
  167. package/dist/shell/assets/{record-map-C8o8jmlo.js → record-map-D6Yog0Uu.js} +2 -2
  168. package/dist/shell/assets/{record-opens-Ds_etNOv.js → record-opens-Cy15Gu5o.js} +2 -2
  169. package/dist/shell/assets/record-page-Bo0pD8vx.js +3 -0
  170. package/dist/shell/assets/{record-preview-C2bjzVoh.js → record-preview-CDgsSTFF.js} +2 -2
  171. package/dist/shell/assets/{records-map-DT_SwhgY.js → records-map-CV5k8jcU.js} +2 -2
  172. package/dist/shell/assets/render-node-CtZZjLGx.js +3 -0
  173. package/dist/shell/assets/reorder-button-DHV9_n1M.js +2 -0
  174. package/dist/shell/assets/{run-trace-view-CScFddUb.js → run-trace-view-DOyzvKTV.js} +2 -2
  175. package/dist/shell/assets/{runner-install-field-DyyHVUfd.js → runner-install-field-CJberN6i.js} +2 -2
  176. package/dist/shell/assets/{runtime-update-CuLL4Qbm.js → runtime-update-DiRL2UEA.js} +2 -2
  177. package/dist/shell/assets/shared-protobase-ui-Bq-qMwVs.js +1 -0
  178. package/dist/shell/assets/{sheet-source-IXyzIyO8.js → sheet-source-xZ9l3FLl.js} +3 -3
  179. package/dist/shell/assets/sign-in-policy-page-BUKwvVFG.js +2 -0
  180. package/dist/shell/assets/start-block-queries-s1eLXHpW.js +2 -0
  181. package/dist/shell/assets/step-catalog-BvlUh62_.js +2 -0
  182. package/dist/shell/assets/{step-panel-CA5-2Doz.js → step-panel-BGJiJ7z6.js} +2 -2
  183. package/dist/shell/assets/timeline-display-B_xs7U-p.js +2 -0
  184. package/dist/shell/assets/{trash-Cd-g6Eyo.js → trash-BfWYOlBD.js} +2 -2
  185. package/dist/shell/assets/{update-set-DfPWNMBL.js → update-set-iwxyRxhm.js} +2 -2
  186. package/dist/shell/assets/use-calendar-move-Cd92WAhx.js +2 -0
  187. package/dist/shell/assets/{use-display-rows-CYGJYJrz.js → use-display-rows-HuX1NEhA.js} +2 -2
  188. package/dist/shell/assets/use-my-invitations-DaKmW2De.js +2 -0
  189. package/dist/shell/assets/{use-paged-search-cBs-xWuq.js → use-paged-search-DPuOZYVz.js} +2 -2
  190. package/dist/shell/assets/{use-run-trace-CSdKdxn9.js → use-run-trace-Dukz4W0q.js} +2 -2
  191. package/dist/shell/assets/{use-workflow-page-DGd_5JMB.js → use-workflow-page-Cgw-Aurp.js} +2 -2
  192. package/dist/shell/assets/{use-workflow-types-BQl6tPM-.js → use-workflow-types-B1NI4zqE.js} +2 -2
  193. package/dist/shell/assets/{workflow-canvas-DbLkc3zJ.js → workflow-canvas-B-IYnZVg.js} +4 -4
  194. package/dist/shell/assets/{workflow-field-DRAphvYG.js → workflow-field-BSH37gjx.js} +3 -3
  195. package/dist/shell/assets/{workflow-graph-editor-CzgoB1_t.js → workflow-graph-editor-C1U_7a-n.js} +2 -2
  196. package/dist/shell/assets/{workflow-run-field-CQf9E5e1.js → workflow-run-field-D_yV-Pdt.js} +3 -3
  197. package/dist/shell/assets/workflow-status-field-CIX3WM-W.js +2 -0
  198. package/dist/shell/assets/workflow-workbench-CoVlp47h.js +4 -0
  199. package/dist/shell/index.html +4 -4
  200. package/dist/shell/protobase.shell.json +2 -2
  201. package/dist/shell/protobase.sw.js +2 -2
  202. package/dist/shell-source-maps/assets/{account-page-DUZhZTQe.js.map → account-page-D1S57VfK.js.map} +1 -1
  203. package/dist/shell-source-maps/assets/app-2d0YQdR7.js.map +1 -0
  204. package/dist/shell-source-maps/assets/{assistant-shell-BB-qTSNN.js.map → assistant-shell-Bb0KRa8E.js.map} +1 -1
  205. package/dist/shell-source-maps/assets/{board-display-DxdFR3Wq.js.map → board-display-B0hMSJLc.js.map} +1 -1
  206. package/dist/shell-source-maps/assets/{calendar-display-uBGEfuIv.js.map → calendar-display-DNTXJ2Lj.js.map} +1 -1
  207. package/dist/shell-source-maps/assets/{call-rings-CMu9LCVA.js.map → call-rings-D2efFDY-.js.map} +1 -1
  208. package/dist/shell-source-maps/assets/{calls-CAwUiNFC.js.map → calls-mmgOyL_n.js.map} +1 -1
  209. package/dist/shell-source-maps/assets/{circle-alert-DBbXAqFr.js.map → circle-alert-BWBUUk9M.js.map} +1 -1
  210. package/dist/shell-source-maps/assets/{composed-page-CDZcDEpb.js.map → composed-page-jwnPyg2o.js.map} +1 -1
  211. package/dist/shell-source-maps/assets/{composer-section-BLXex8WX.js.map → composer-section-raPl4Mf_.js.map} +1 -1
  212. package/dist/shell-source-maps/assets/{connect-route-DMz3C4cs.js.map → connect-route-DnTRKFdW.js.map} +1 -1
  213. package/dist/shell-source-maps/assets/{copy-field-D0wtSWzb.js.map → copy-field-BtAsyigB.js.map} +1 -1
  214. package/dist/shell-source-maps/assets/{create-route-BQoMwg6m.js.map → create-route-CEuERj3K.js.map} +1 -1
  215. package/dist/shell-source-maps/assets/{custom-step-container-field-B2IfCGAR.js.map → custom-step-container-field-B1RXdjeH.js.map} +1 -1
  216. package/dist/shell-source-maps/assets/{embedded-list-BOlcwiiA.js.map → embedded-list-BIvBUQCm.js.map} +1 -1
  217. package/dist/shell-source-maps/assets/{en-BED8S1rX.js.map → en-_QUqgkv9.js.map} +1 -1
  218. package/dist/shell-source-maps/assets/{export-dialog-Ogugn53w.js.map → export-dialog-BibbA1JE.js.map} +1 -1
  219. package/dist/shell-source-maps/assets/export-worker-BUvAe-pU.js.map +1 -0
  220. package/dist/shell-source-maps/assets/{first-organization-page-C4-rQ_I2.js.map → first-organization-page-DgL_N1W1.js.map} +1 -1
  221. package/dist/shell-source-maps/assets/{graph-view-CzTg5srj.js.map → graph-view-D5uSsu67.js.map} +1 -1
  222. package/dist/shell-source-maps/assets/{group-donut-3ebIs5gF.js.map → group-donut-BeAjogon.js.map} +1 -1
  223. package/dist/shell-source-maps/assets/{guest-call-page-CD0LJIht.js.map → guest-call-page-DXOfa3rF.js.map} +1 -1
  224. package/dist/shell-source-maps/assets/{html-viewer-BYJGABwQ.js.map → html-viewer-SuYrL7fw.js.map} +1 -1
  225. package/dist/shell-source-maps/assets/{import-dialog-BpUqiIUH.js.map → import-dialog-DjMoHP8N.js.map} +1 -1
  226. package/dist/shell-source-maps/assets/{import-table-dialog-CYYjVijG.js.map → import-table-dialog-45beoZDX.js.map} +1 -1
  227. package/dist/shell-source-maps/assets/{invitations-page-BsN4z7EC.js.map → invitations-page-CwtY8Tbq.js.map} +1 -1
  228. package/dist/shell-source-maps/assets/{layout-grid-DvW29fH0.js.map → layout-grid-DSS3tNid.js.map} +1 -1
  229. package/dist/shell-source-maps/assets/{legend-item-CuD1ms2_.js.map → legend-item--JCuOrBW.js.map} +1 -1
  230. package/dist/shell-source-maps/assets/{list-page-BtuFsbiK.js.map → list-page-Do4wAJXr.js.map} +1 -1
  231. package/dist/shell-source-maps/assets/{maplibre-DWK2ok5e.js.map → maplibre-DmuZi_YZ.js.map} +1 -1
  232. package/dist/shell-source-maps/assets/{markdown-content-HRnOc3WU.js.map → markdown-content-B0lkEYGr.js.map} +1 -1
  233. package/dist/shell-source-maps/assets/{members-page-CXYBNAaR.js.map → members-page-BaLe1e4J.js.map} +1 -1
  234. package/dist/shell-source-maps/assets/{message-content-ypqgAMEt.js.map → message-content-JJSKhX2W.js.map} +1 -1
  235. package/dist/shell-source-maps/assets/{messages-QTTbTkpW.js.map → messages-BaKmueMc.js.map} +1 -1
  236. package/dist/shell-source-maps/assets/nl-B7S2-35v.js.map +1 -0
  237. package/dist/shell-source-maps/assets/{organization-page-C0iuWYaS.js.map → organization-page-CIML07Cz.js.map} +1 -1
  238. package/dist/shell-source-maps/assets/{organizations-page-BOryGu_-.js.map → organizations-page-Cctkt6cu.js.map} +1 -1
  239. package/dist/shell-source-maps/assets/parse-worker-BXZM3e8_.js.map +1 -0
  240. package/dist/shell-source-maps/assets/{pending-invitation-row-1zBmAsKC.js.map → pending-invitation-row-xf_wfIQ2.js.map} +1 -1
  241. package/dist/shell-source-maps/assets/{period-chart-Mcf3pdtE.js.map → period-chart-Cuw7AISK.js.map} +1 -1
  242. package/dist/shell-source-maps/assets/{person-row-Dg1T6u1A.js.map → person-row-DtXuek5W.js.map} +1 -1
  243. package/dist/shell-source-maps/assets/{public-form-page-DKBrB0BB.js.map → public-form-page-noW7JMKv.js.map} +1 -1
  244. package/dist/shell-source-maps/assets/{record-lines-B4MMhxps.js.map → record-lines-B-Wll3-R.js.map} +1 -1
  245. package/dist/shell-source-maps/assets/{record-map-C8o8jmlo.js.map → record-map-D6Yog0Uu.js.map} +1 -1
  246. package/dist/shell-source-maps/assets/{record-opens-Ds_etNOv.js.map → record-opens-Cy15Gu5o.js.map} +1 -1
  247. package/dist/shell-source-maps/assets/record-page-Bo0pD8vx.js.map +1 -0
  248. package/dist/shell-source-maps/assets/{record-preview-C2bjzVoh.js.map → record-preview-CDgsSTFF.js.map} +1 -1
  249. package/dist/shell-source-maps/assets/{records-map-DT_SwhgY.js.map → records-map-CV5k8jcU.js.map} +1 -1
  250. package/dist/shell-source-maps/assets/{render-node-BKYZK3FU.js.map → render-node-CtZZjLGx.js.map} +1 -1
  251. package/dist/shell-source-maps/assets/{reorder-button-DmgQZa3E.js.map → reorder-button-DHV9_n1M.js.map} +1 -1
  252. package/dist/shell-source-maps/assets/{run-trace-view-CScFddUb.js.map → run-trace-view-DOyzvKTV.js.map} +1 -1
  253. package/dist/shell-source-maps/assets/{runner-install-field-DyyHVUfd.js.map → runner-install-field-CJberN6i.js.map} +1 -1
  254. package/dist/shell-source-maps/assets/{runtime-update-CuLL4Qbm.js.map → runtime-update-DiRL2UEA.js.map} +1 -1
  255. package/dist/shell-source-maps/assets/{sheet-source-IXyzIyO8.js.map → sheet-source-xZ9l3FLl.js.map} +1 -1
  256. package/dist/shell-source-maps/assets/{sign-in-policy-page-Dto5W87n.js.map → sign-in-policy-page-BUKwvVFG.js.map} +1 -1
  257. package/dist/shell-source-maps/assets/{start-block-queries-DNegRXtD.js.map → start-block-queries-s1eLXHpW.js.map} +1 -1
  258. package/dist/shell-source-maps/assets/{step-catalog-Dw8bipyJ.js.map → step-catalog-BvlUh62_.js.map} +1 -1
  259. package/dist/shell-source-maps/assets/{step-panel-CA5-2Doz.js.map → step-panel-BGJiJ7z6.js.map} +1 -1
  260. package/dist/shell-source-maps/assets/{timeline-display-BLF3onV2.js.map → timeline-display-B_xs7U-p.js.map} +1 -1
  261. package/dist/shell-source-maps/assets/{trash-Cd-g6Eyo.js.map → trash-BfWYOlBD.js.map} +1 -1
  262. package/dist/shell-source-maps/assets/{update-set-DfPWNMBL.js.map → update-set-iwxyRxhm.js.map} +1 -1
  263. package/dist/shell-source-maps/assets/{use-calendar-move-J9sB_jXo.js.map → use-calendar-move-Cd92WAhx.js.map} +1 -1
  264. package/dist/shell-source-maps/assets/{use-display-rows-CYGJYJrz.js.map → use-display-rows-HuX1NEhA.js.map} +1 -1
  265. package/dist/shell-source-maps/assets/{use-my-invitations-DZ0rA8RK.js.map → use-my-invitations-DaKmW2De.js.map} +1 -1
  266. package/dist/shell-source-maps/assets/{use-paged-search-cBs-xWuq.js.map → use-paged-search-DPuOZYVz.js.map} +1 -1
  267. package/dist/shell-source-maps/assets/{use-run-trace-CSdKdxn9.js.map → use-run-trace-Dukz4W0q.js.map} +1 -1
  268. package/dist/shell-source-maps/assets/{use-workflow-page-DGd_5JMB.js.map → use-workflow-page-Cgw-Aurp.js.map} +1 -1
  269. package/dist/shell-source-maps/assets/{use-workflow-types-BQl6tPM-.js.map → use-workflow-types-B1NI4zqE.js.map} +1 -1
  270. package/dist/shell-source-maps/assets/{workflow-canvas-DbLkc3zJ.js.map → workflow-canvas-B-IYnZVg.js.map} +1 -1
  271. package/dist/shell-source-maps/assets/{workflow-field-DRAphvYG.js.map → workflow-field-BSH37gjx.js.map} +1 -1
  272. package/dist/shell-source-maps/assets/{workflow-graph-editor-CzgoB1_t.js.map → workflow-graph-editor-C1U_7a-n.js.map} +1 -1
  273. package/dist/shell-source-maps/assets/{workflow-run-field-CQf9E5e1.js.map → workflow-run-field-D_yV-Pdt.js.map} +1 -1
  274. package/dist/shell-source-maps/assets/{workflow-status-field-CiaCtBkf.js.map → workflow-status-field-CIX3WM-W.js.map} +1 -1
  275. package/dist/shell-source-maps/assets/{workflow-workbench-CMl69WwH.js.map → workflow-workbench-CoVlp47h.js.map} +1 -1
  276. package/dist/status/messages.d.ts +2 -2
  277. package/dist/users/messages.d.ts +2 -2
  278. package/package.json +5 -5
  279. package/dist/shell/assets/app-DLkpxjgP.css +0 -2
  280. package/dist/shell/assets/board-display-DxdFR3Wq.js +0 -2
  281. package/dist/shell/assets/calendar-display-uBGEfuIv.js +0 -2
  282. package/dist/shell/assets/create-route-BQoMwg6m.js +0 -2
  283. package/dist/shell/assets/embedded-list-BOlcwiiA.js +0 -3
  284. package/dist/shell/assets/en-BED8S1rX.js +0 -2
  285. package/dist/shell/assets/export-worker-S5xPFD_M.js +0 -15
  286. package/dist/shell/assets/import-table-dialog-CYYjVijG.js +0 -2
  287. package/dist/shell/assets/list-page-BtuFsbiK.js +0 -4
  288. package/dist/shell/assets/members-page-CXYBNAaR.js +0 -2
  289. package/dist/shell/assets/messages-QTTbTkpW.js +0 -2
  290. package/dist/shell/assets/nl-DjHVomkB.js +0 -2
  291. package/dist/shell/assets/organization-page-C0iuWYaS.js +0 -2
  292. package/dist/shell/assets/organizations-page-BOryGu_-.js +0 -2
  293. package/dist/shell/assets/parse-worker-CO_GFfU7.js +0 -35
  294. package/dist/shell/assets/public-form-page-DKBrB0BB.js +0 -2
  295. package/dist/shell/assets/record-page-DR3a2_Z8.js +0 -3
  296. package/dist/shell/assets/render-node-BKYZK3FU.js +0 -3
  297. package/dist/shell/assets/reorder-button-DmgQZa3E.js +0 -2
  298. package/dist/shell/assets/shared-protobase-ui-DOsgmmrs.js +0 -1
  299. package/dist/shell/assets/sign-in-policy-page-Dto5W87n.js +0 -2
  300. package/dist/shell/assets/start-block-queries-DNegRXtD.js +0 -2
  301. package/dist/shell/assets/step-catalog-Dw8bipyJ.js +0 -2
  302. package/dist/shell/assets/timeline-display-BLF3onV2.js +0 -2
  303. package/dist/shell/assets/use-calendar-move-J9sB_jXo.js +0 -2
  304. package/dist/shell/assets/use-my-invitations-DZ0rA8RK.js +0 -2
  305. package/dist/shell/assets/workflow-status-field-CiaCtBkf.js +0 -2
  306. package/dist/shell/assets/workflow-workbench-CMl69WwH.js +0 -4
  307. package/dist/shell-source-maps/assets/app-CWCg5I0x.js.map +0 -1
  308. package/dist/shell-source-maps/assets/export-worker-S5xPFD_M.js.map +0 -1
  309. package/dist/shell-source-maps/assets/nl-DjHVomkB.js.map +0 -1
  310. package/dist/shell-source-maps/assets/parse-worker-CO_GFfU7.js.map +0 -1
  311. package/dist/shell-source-maps/assets/record-page-DR3a2_Z8.js.map +0 -1
@@ -0,0 +1,31 @@
1
+ //#region src/app/conversation-page/reactions.ts
2
+ /** The emoji a conversation offers, in the order of the emoji field's values, each with its label. */
3
+ const emojiSet = (reactions, values) => values.flatMap((emoji) => Object.hasOwn(reactions.labels, emoji) ? [{
4
+ emoji,
5
+ ...reactions.labels[emoji]
6
+ }] : []);
7
+ /** Reaction rows by the key of the message they answer, as text. */
8
+ const reactionsByMessage = (rows, field) => {
9
+ const byMessage = /* @__PURE__ */ new Map();
10
+ for (const row of rows) {
11
+ const message = String(row[field]);
12
+ byMessage.set(message, [...byMessage.get(message) ?? [], row]);
13
+ }
14
+ return byMessage;
15
+ };
16
+ /** A message's reactions per emoji of `set`, in its order, each emoji someone reacted with once; `me` finds the reader's own. */
17
+ const reactionGroups = (rows, { user, emoji: field }, set, me) => set.flatMap(({ emoji, symbol, name }) => {
18
+ const these = rows.filter((row) => row[field] === emoji);
19
+ if (these.length === 0) return [];
20
+ const userIds = these.map((row) => String(row[user]));
21
+ return [{
22
+ emoji,
23
+ symbol,
24
+ name,
25
+ count: these.length,
26
+ userIds,
27
+ mine: me === void 0 ? void 0 : these.find((row) => row[user] === me)
28
+ }];
29
+ });
30
+ //#endregion
31
+ export { emojiSet, reactionGroups, reactionsByMessage };
@@ -0,0 +1,4 @@
1
+ //#region src/app/conversation-page/reply-labels.d.ts
2
+ /** When a thread's last reply came, sent at `time`: "Last reply Today, 10:42", in the viewer's zone unless given. */
3
+ export declare const lastReplyLabel: (time: string, now?: number, zone?: string) => string;
4
+ //#endregion
@@ -0,0 +1,9 @@
1
+ import { viewerZone } from "../../format/zone.js";
2
+ import { formatTime } from "../../format/date.js";
3
+ import { chatDayLabel } from "../../chat/chat-day.js";
4
+ import { text } from "./messages.js";
5
+ //#region src/app/conversation-page/reply-labels.ts
6
+ /** When a thread's last reply came, sent at `time`: "Last reply Today, 10:42", in the viewer's zone unless given. */
7
+ const lastReplyLabel = (time, now = Date.now(), zone = viewerZone()) => text("lastReply", { time: `${chatDayLabel(time, now, zone)}, ${formatTime(Date.parse(time), zone)}` });
8
+ //#endregion
9
+ export { lastReplyLabel };
@@ -0,0 +1,4 @@
1
+ //#region src/app/conversation-page/thread-head.d.ts
2
+ /** Whether the thread's first message, `row`, is one of the conversation of the record keyed `recordKey`. */
3
+ export declare const inConversation: (row: Record<string, unknown>, field: string, recordKey: string) => boolean;
4
+ //#endregion
@@ -0,0 +1,5 @@
1
+ //#region src/app/conversation-page/thread-head.ts
2
+ /** Whether the thread's first message, `row`, is one of the conversation of the record keyed `recordKey`. */
3
+ const inConversation = (row, field, recordKey) => row[field] != null && String(row[field]) === recordKey;
4
+ //#endregion
5
+ export { inConversation };
@@ -0,0 +1,25 @@
1
+ import { PeopleSearch } from "../../mentions/use-people-search.js";
2
+ import "../../mentions/index.js";
3
+ import { ConversationPageModel, ResourceModel } from "@protobase/schema";
4
+ //#region src/app/conversation-page/thread-panel.d.ts
5
+ type Props = {
6
+ page: ConversationPageModel & {
7
+ thread: NonNullable<ConversationPageModel['thread']>;
8
+ };
9
+ /** The record the conversation is of, and its key. */
10
+ owner: ResourceModel;
11
+ recordKey: string;
12
+ /** The key of the thread's first message. */
13
+ first: string;
14
+ me: string | undefined;
15
+ searchPeople?: PeopleSearch;
16
+ onClose: () => void;
17
+ };
18
+ /**
19
+ * A thread beside its conversation, covering the screen at mobile width: its first message, its replies kept current
20
+ * as the live updates tell of changes, and a box of its own that replies in it. The reader reacts to, edits and deletes
21
+ * its messages as in the conversation. A first message of another conversation shows as not found, with no box, so no
22
+ * reply joins a thread of another conversation from here. Key it by the first message, so another thread starts afresh.
23
+ */
24
+ export declare const ThreadPanel: ({ page, owner, recordKey, first, me, searchPeople, onClose }: Props) => import("react").JSX.Element;
25
+ //#endregion
@@ -0,0 +1,107 @@
1
+ import { useAdminMeta } from "../meta-gate.js";
2
+ import { recordKey } from "../../live/model-helpers.js";
3
+ import { useList } from "../../data/use-list.js";
4
+ import { ErrorBanner } from "../error-banner.js";
5
+ import { Quiet } from "../pages/blocks/card-frame.js";
6
+ import { listLabels, withLabels } from "../../live/relation-labels.js";
7
+ import { ChatDivider } from "../../chat/chat-divider.js";
8
+ import { ChatThread } from "../../chat/chat-thread.js";
9
+ import { SidePanel } from "../../side-panel/side-panel.js";
10
+ import { keyValue } from "../create/create-values.js";
11
+ import { MessageComposer } from "../conversation/message-composer.js";
12
+ import { authorOf } from "../conversation/thread-items.js";
13
+ import { text } from "./messages.js";
14
+ import { ConversationMessage } from "./conversation-message.js";
15
+ import { repliesRequest } from "./conversation-reads.js";
16
+ import { conversationRows } from "./conversation-rows.js";
17
+ import { useMessageSetup } from "./use-message-setup.js";
18
+ import { useThreadHead } from "./use-thread-head.js";
19
+ import { jsx, jsxs } from "react/jsx-runtime";
20
+ //#region src/app/conversation-page/thread-panel.tsx
21
+ /**
22
+ * A thread beside its conversation, covering the screen at mobile width: its first message, its replies kept current
23
+ * as the live updates tell of changes, and a box of its own that replies in it. The reader reacts to, edits and deletes
24
+ * its messages as in the conversation. A first message of another conversation shows as not found, with no box, so no
25
+ * reply joins a thread of another conversation from here. Key it by the first message, so another thread starts afresh.
26
+ */
27
+ const ThreadPanel = ({ page, owner, recordKey: recordKey$1, first, me, searchPeople, onClose }) => {
28
+ const { resources, views } = useAdminMeta();
29
+ const model = resources[page.resource];
30
+ const senders = [page.sender];
31
+ const head = useThreadHead(page, model, recordKey$1, first);
32
+ const list = useList(page.resource, {
33
+ ...repliesRequest(page, page.thread, first),
34
+ labels: listLabels(resources, views, model, senders)
35
+ });
36
+ const oldestFirst = withLabels(resources, model, senders, list.items, list.labels).reverse();
37
+ const key = (row) => String(recordKey(model, row));
38
+ const { setup, reactionsError } = useMessageSetup({
39
+ page,
40
+ me,
41
+ pages: [[first], ...(list.data?.pages ?? []).map((read) => read.items.map(key))],
42
+ searchPeople
43
+ });
44
+ const headRow = head.row;
45
+ const error = head.error ?? list.error ?? reactionsError;
46
+ const rows = conversationRows(oldestFirst, {
47
+ key,
48
+ sender: page.sender,
49
+ time: page.time
50
+ });
51
+ const own = rows.findLast((line) => line.kind === "message" && me !== void 0 && line.author.id === me);
52
+ const replies = headRow ? Number(headRow[page.thread.count] ?? 0) : 0;
53
+ return /* @__PURE__ */ jsxs(SidePanel, {
54
+ title: text("thread"),
55
+ onClose,
56
+ footer: !head.elsewhere && /* @__PURE__ */ jsx(MessageComposer, {
57
+ resource: page.resource,
58
+ field: page.text,
59
+ values: {
60
+ [page.field]: keyValue(owner, recordKey$1),
61
+ [page.thread.field]: keyValue(model, first)
62
+ },
63
+ placeholder: text("replyPlaceholder"),
64
+ searchPeople,
65
+ mentions: page.mentions
66
+ }),
67
+ children: [error && /* @__PURE__ */ jsx("div", {
68
+ className: "shrink-0 p-2",
69
+ children: /* @__PURE__ */ jsx(ErrorBanner, {
70
+ title: text("couldNotLoadThread"),
71
+ error
72
+ })
73
+ }), head.elsewhere ? /* @__PURE__ */ jsx("div", {
74
+ className: "flex-1 p-4",
75
+ children: /* @__PURE__ */ jsx(Quiet, { children: text("threadElsewhere") })
76
+ }) : !headRow || list.isLoading ? /* @__PURE__ */ jsx("div", {
77
+ className: "flex-1 p-4",
78
+ children: /* @__PURE__ */ jsx(Quiet, { children: text("loadingMessages") })
79
+ }) : /* @__PURE__ */ jsxs(ChatThread, {
80
+ length: oldestFirst.length + 1,
81
+ followKey: own?.key,
82
+ onLoadEarlier: list.hasNextPage ? () => void list.fetchNextPage() : void 0,
83
+ loadingEarlier: list.isFetchingNextPage,
84
+ children: [
85
+ /* @__PURE__ */ jsx(ConversationMessage, {
86
+ setup,
87
+ row: headRow,
88
+ messageKey: first,
89
+ author: authorOf(headRow[page.sender]),
90
+ time: typeof headRow[page.time] === "string" ? headRow[page.time] : void 0,
91
+ continued: false
92
+ }),
93
+ replies > 0 && /* @__PURE__ */ jsx(ChatDivider, { label: text("replies", { count: replies }) }),
94
+ rows.map((line) => line.kind === "day" ? /* @__PURE__ */ jsx(ChatDivider, { label: line.label }, line.key) : line.kind === "new" ? null : /* @__PURE__ */ jsx(ConversationMessage, {
95
+ setup,
96
+ row: line.row,
97
+ messageKey: line.key,
98
+ author: line.author,
99
+ time: line.time,
100
+ continued: line.continued
101
+ }, line.key))
102
+ ]
103
+ })]
104
+ });
105
+ };
106
+ //#endregion
107
+ export { ThreadPanel };
@@ -0,0 +1,10 @@
1
+ import { AppAddress } from "@protobase/schema";
2
+ //#region src/app/conversation-page/thread-summary.d.ts
3
+ type Props = {
4
+ count: number;
5
+ last: string | undefined;
6
+ to: AppAddress;
7
+ };
8
+ /** Under a thread's first message in the conversation: its number of replies, a link that opens the thread, and when the last one came. */
9
+ export declare const ThreadSummary: ({ count, last, to }: Props) => import("react").JSX.Element;
10
+ //#endregion
@@ -0,0 +1,26 @@
1
+ import { buttonClass } from "../../primitives/button.js";
2
+ import { formatDateTime } from "../../format/date.js";
3
+ import { AppLink } from "../use-app-address.js";
4
+ import { text } from "./messages.js";
5
+ import { lastReplyLabel } from "./reply-labels.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ //#region src/app/conversation-page/thread-summary.tsx
8
+ /** Under a thread's first message in the conversation: its number of replies, a link that opens the thread, and when the last one came. */
9
+ const ThreadSummary = ({ count, last, to }) => /* @__PURE__ */ jsxs("div", {
10
+ className: "flex items-center gap-2 whitespace-normal",
11
+ children: [/* @__PURE__ */ jsx(AppLink, {
12
+ to,
13
+ className: `${buttonClass({
14
+ variant: "ghost",
15
+ size: "sm"
16
+ })} -ml-2.5`,
17
+ children: text("replies", { count })
18
+ }), last !== void 0 && /* @__PURE__ */ jsx("time", {
19
+ dateTime: last,
20
+ title: formatDateTime(Date.parse(last)),
21
+ className: "text-xs text-muted-foreground",
22
+ children: lastReplyLabel(last)
23
+ })]
24
+ });
25
+ //#endregion
26
+ export { ThreadSummary };
@@ -0,0 +1,14 @@
1
+ import { MessageSetup } from "./message-setup.js";
2
+ import { MessageControls } from "./message-controls.js";
3
+ //#region src/app/conversation-page/use-message-controls.d.ts
4
+ type Message = {
5
+ row: Record<string, unknown>;
6
+ key: string;
7
+ mine: boolean;
8
+ body: string;
9
+ onEdit: () => void;
10
+ onDelete: () => void;
11
+ };
12
+ /** What the reader can do to one message, as `MessageControls`, by the conversation's options and their access. */
13
+ export declare const useMessageControls: (setup: MessageSetup, { row, key, mine, body, onEdit, onDelete }: Message) => MessageControls;
14
+ //#endregion
@@ -0,0 +1,32 @@
1
+ import { useToast } from "../../toasts/toast-provider.js";
2
+ import { text } from "./messages.js";
3
+ import { messageAccess, reactionAccess } from "./message-access.js";
4
+ import { reactionGroups } from "./reactions.js";
5
+ //#region src/app/conversation-page/use-message-controls.ts
6
+ /** What the reader can do to one message, as `MessageControls`, by the conversation's options and their access. */
7
+ const useMessageControls = (setup, { row, key, mine, body, onEdit, onDelete }) => {
8
+ const toast = useToast();
9
+ const { page, me, writes } = setup;
10
+ const access = messageAccess(page, row, mine, setup.messagePermissions);
11
+ const reacts = reactionAccess(setup.reactionPermissions);
12
+ const groups = page.reactions ? reactionGroups(setup.reactionsOf(key), page.reactions, setup.emoji, me) : [];
13
+ const copy = () => navigator.clipboard.writeText(body).then(() => void toast.show({
14
+ state: "success",
15
+ title: text("copied")
16
+ }), () => void toast.show({
17
+ state: "error",
18
+ title: text("notCopied")
19
+ }));
20
+ return {
21
+ emoji: reacts.react ? setup.emoji : [],
22
+ groups,
23
+ onReact: writes.react && reacts.react ? (emoji) => void writes.react(key, emoji) : void 0,
24
+ onUnreact: writes.unreact && reacts.unreact ? (reaction) => void writes.unreact(reaction) : void 0,
25
+ thread: setup.threadTo?.(key),
26
+ onCopy: body === "" ? void 0 : () => void copy(),
27
+ onEdit: access.edit ? onEdit : void 0,
28
+ onDelete: access.delete ? onDelete : void 0
29
+ };
30
+ };
31
+ //#endregion
32
+ export { useMessageControls };
@@ -0,0 +1,16 @@
1
+ import { MouseEvent, PointerEvent } from "react";
2
+ //#region src/app/conversation-page/use-message-press.d.ts
3
+ /**
4
+ * The handlers that open a message's actions with a finger: a tap, or a long-press, which opens them while the finger
5
+ * still rests, as `nextPress` decides; a tap while the reader types lowers the keyboard instead. The browser's own
6
+ * long-press menu stays shut on a message pressed this way.
7
+ */
8
+ export declare const useMessagePress: (onOpen: () => void) => {
9
+ onPointerDown: (event: PointerEvent) => void;
10
+ onPointerMove: (event: PointerEvent) => boolean;
11
+ onPointerUp: () => void;
12
+ onPointerCancel: () => boolean;
13
+ onClick: () => void;
14
+ onContextMenu: (event: MouseEvent) => void;
15
+ };
16
+ //#endregion
@@ -0,0 +1,88 @@
1
+ import { nextPress } from "./message-press.js";
2
+ import { useEffect, useRef } from "react";
3
+ //#region src/app/conversation-page/use-message-press.ts
4
+ /** A message's own links and buttons, such as a mention, a file, a reaction or its thread's replies. */
5
+ const controls = "a[href], button, input, textarea, select, [role=\"button\"]";
6
+ /** A box the reader types in, which has the on-screen keyboard up while it has the focus. */
7
+ const textBoxes = "input, textarea, [contenteditable]:not([contenteditable=\"false\"])";
8
+ /**
9
+ * Swallows the click a browser may send when the finger of a long-press lifts, which would land on what the long-press
10
+ * opened, such as the backdrop of its sheet, and close it again. A new press or key comes before any later click, so
11
+ * it stops there.
12
+ */
13
+ const swallowReleaseClick = () => {
14
+ const swallow = (event) => {
15
+ event.preventDefault();
16
+ event.stopPropagation();
17
+ stop();
18
+ };
19
+ const stop = () => {
20
+ window.removeEventListener("click", swallow, true);
21
+ window.removeEventListener("pointerdown", stop, true);
22
+ window.removeEventListener("keydown", stop, true);
23
+ };
24
+ window.addEventListener("click", swallow, true);
25
+ window.addEventListener("pointerdown", stop, true);
26
+ window.addEventListener("keydown", stop, true);
27
+ };
28
+ /**
29
+ * The handlers that open a message's actions with a finger: a tap, or a long-press, which opens them while the finger
30
+ * still rests, as `nextPress` decides; a tap while the reader types lowers the keyboard instead. The browser's own
31
+ * long-press menu stays shut on a message pressed this way.
32
+ */
33
+ const useMessagePress = (onOpen) => {
34
+ const press = useRef(void 0);
35
+ const timer = useRef(void 0);
36
+ /** Whether the latest press was a finger's that may open the actions, which the browser's long-press menu leaves alone. */
37
+ const pressing = useRef(false);
38
+ const step = (event) => {
39
+ const next = nextPress(press.current, event);
40
+ press.current = next.press;
41
+ if (!next.press) clearTimeout(timer.current);
42
+ return next.open;
43
+ };
44
+ useEffect(() => () => clearTimeout(timer.current), []);
45
+ return {
46
+ onPointerDown: (event) => {
47
+ clearTimeout(timer.current);
48
+ const onControl = event.target instanceof Element && event.target.closest(controls) !== null;
49
+ const typing = document.activeElement instanceof Element && document.activeElement.matches(textBoxes);
50
+ step({
51
+ type: "down",
52
+ x: event.clientX,
53
+ y: event.clientY,
54
+ touch: event.pointerType === "touch",
55
+ onControl,
56
+ typing
57
+ });
58
+ pressing.current = press.current !== void 0;
59
+ if (!press.current) return;
60
+ timer.current = setTimeout(() => {
61
+ if (!step({ type: "held" })) return;
62
+ navigator.vibrate?.(10);
63
+ swallowReleaseClick();
64
+ onOpen();
65
+ }, 500);
66
+ },
67
+ onPointerMove: (event) => step({
68
+ type: "move",
69
+ x: event.clientX,
70
+ y: event.clientY
71
+ }),
72
+ onPointerUp: () => {
73
+ clearTimeout(timer.current);
74
+ step({ type: "up" });
75
+ },
76
+ onPointerCancel: () => step({ type: "cancel" }),
77
+ onClick: () => {
78
+ const lowersKeyboard = press.current?.tapOpens === false;
79
+ if (step({ type: "tap" })) onOpen();
80
+ if (lowersKeyboard && document.activeElement instanceof HTMLElement) document.activeElement.blur();
81
+ },
82
+ onContextMenu: (event) => {
83
+ if (pressing.current) event.preventDefault();
84
+ }
85
+ };
86
+ };
87
+ //#endregion
88
+ export { useMessagePress };
@@ -0,0 +1,13 @@
1
+ import { ReactionsModel } from "@protobase/schema";
2
+ //#region src/app/conversation-page/use-message-reactions.d.ts
3
+ /**
4
+ * The reactions to the messages shown, read in one batch per page of messages, never one read per message, and read
5
+ * again as they change: `byMessage` holds each message's reaction rows by its key. Without reactions, nothing is read.
6
+ */
7
+ export declare const useMessageReactions: (reactions: ReactionsModel | undefined, pages: readonly (readonly string[])[]) => {
8
+ byMessage: Map<string, {
9
+ [x: string]: unknown;
10
+ }[]>;
11
+ error: Error | undefined;
12
+ };
13
+ //#endregion
@@ -0,0 +1,24 @@
1
+ import { keys } from "../../data/query-keys.js";
2
+ import { useClient } from "../../data/api-provider.js";
3
+ import { reactionsByMessage } from "./reactions.js";
4
+ import { reactionsFilter, readReactions } from "./conversation-reads.js";
5
+ import { useQueries } from "@tanstack/react-query";
6
+ //#region src/app/conversation-page/use-message-reactions.ts
7
+ /**
8
+ * The reactions to the messages shown, read in one batch per page of messages, never one read per message, and read
9
+ * again as they change: `byMessage` holds each message's reaction rows by its key. Without reactions, nothing is read.
10
+ */
11
+ const useMessageReactions = (reactions, pages) => {
12
+ const client = useClient();
13
+ const results = useQueries({ queries: (reactions ? pages.filter((page) => page.length > 0) : []).map((page) => ({
14
+ queryKey: keys.reactionsOf(reactions.resource, reactionsFilter(reactions, page)),
15
+ queryFn: () => readReactions(client, reactions, page)
16
+ })) });
17
+ const rows = results.flatMap((result) => result.data ?? []);
18
+ return {
19
+ byMessage: reactionsByMessage(rows, reactions?.field ?? ""),
20
+ error: results.find((result) => result.error)?.error ?? void 0
21
+ };
22
+ };
23
+ //#endregion
24
+ export { useMessageReactions };
@@ -0,0 +1,19 @@
1
+ import { PeopleSearch } from "../../mentions/use-people-search.js";
2
+ import "../../mentions/index.js";
3
+ import { MessageSetup } from "./message-setup.js";
4
+ import { AppAddress, ConversationPageModel } from "@protobase/schema";
5
+ //#region src/app/conversation-page/use-message-setup.d.ts
6
+ type Input = {
7
+ page: ConversationPageModel;
8
+ me: string | undefined;
9
+ /** The keys of the messages shown, a list per page they were read in, whose reactions are read a page at a time. */
10
+ pages: readonly (readonly string[])[];
11
+ threadTo?: (key: string) => AppAddress;
12
+ searchPeople?: PeopleSearch;
13
+ };
14
+ /** The `MessageSetup` of the messages shown, with their reactions read, and the error of that read, if any. */
15
+ export declare const useMessageSetup: ({ page, me, pages, threadTo, searchPeople }: Input) => {
16
+ setup: MessageSetup;
17
+ reactionsError: Error | undefined;
18
+ };
19
+ //#endregion
@@ -0,0 +1,33 @@
1
+ import { useAdminMeta, usePermissions } from "../meta-gate.js";
2
+ import { useMembers } from "../../people/use-members.js";
3
+ import { emojiSet } from "./reactions.js";
4
+ import { useMessageReactions } from "./use-message-reactions.js";
5
+ import { useMessageWrites } from "./use-message-writes.js";
6
+ //#region src/app/conversation-page/use-message-setup.ts
7
+ /** The `MessageSetup` of the messages shown, with their reactions read, and the error of that read, if any. */
8
+ const useMessageSetup = ({ page, me, pages, threadTo, searchPeople }) => {
9
+ const { resources } = useAdminMeta();
10
+ const { member } = useMembers();
11
+ const writes = useMessageWrites(page);
12
+ const messagePermissions = usePermissions(page.resource);
13
+ const reactionPermissions = usePermissions(page.reactions?.resource ?? page.resource);
14
+ const reactions = useMessageReactions(page.reactions, pages);
15
+ const values = page.reactions ? resources[page.reactions.resource]?.fields[page.reactions.emoji]?.enumValues ?? [] : [];
16
+ return {
17
+ setup: {
18
+ page,
19
+ me,
20
+ member,
21
+ writes,
22
+ emoji: page.reactions ? emojiSet(page.reactions, values) : [],
23
+ messagePermissions,
24
+ reactionPermissions,
25
+ reactionsOf: (key) => reactions.byMessage.get(key) ?? [],
26
+ threadTo,
27
+ searchPeople
28
+ },
29
+ reactionsError: reactions.error
30
+ };
31
+ };
32
+ //#endregion
33
+ export { useMessageSetup };
@@ -0,0 +1,14 @@
1
+ import { ConversationPageModel } from "@protobase/schema";
2
+ //#region src/app/conversation-page/use-message-writes.d.ts
3
+ /**
4
+ * The writes a reader makes to a conversation's messages, each resolving whether the server took it: edit a message's
5
+ * text and mentions, delete one, and react to one or take a reaction back. A refused write changes nothing on screen
6
+ * and shows the server's reason in a toast; a taken one reads the resource again.
7
+ */
8
+ export declare const useMessageWrites: (page: ConversationPageModel) => {
9
+ edit: (key: string, body: string, mentions: string[]) => Promise<boolean>;
10
+ remove: (key: string) => Promise<boolean>;
11
+ react: ((key: string, emoji: string) => Promise<boolean>) | undefined;
12
+ unreact: ((row: Record<string, unknown>) => Promise<boolean>) | undefined;
13
+ };
14
+ //#endregion
@@ -0,0 +1,49 @@
1
+ import { useClient } from "../../data/api-provider.js";
2
+ import { useAdminMeta } from "../meta-gate.js";
3
+ import { useToast } from "../../toasts/toast-provider.js";
4
+ import { recordKey } from "../../live/model-helpers.js";
5
+ import { refusalReason } from "../displays/board-columns.js";
6
+ import { useRefreshResource } from "../pages/use-layout-data.js";
7
+ import { keyValue } from "../create/create-values.js";
8
+ import { text } from "./messages.js";
9
+ //#region src/app/conversation-page/use-message-writes.ts
10
+ /**
11
+ * The writes a reader makes to a conversation's messages, each resolving whether the server took it: edit a message's
12
+ * text and mentions, delete one, and react to one or take a reaction back. A refused write changes nothing on screen
13
+ * and shows the server's reason in a toast; a taken one reads the resource again.
14
+ */
15
+ const useMessageWrites = (page) => {
16
+ const client = useClient();
17
+ const toast = useToast();
18
+ const refresh = useRefreshResource();
19
+ const { resources } = useAdminMeta();
20
+ const model = resources[page.resource];
21
+ const reactions = page.reactions;
22
+ const run = (resource, failed, write) => write().then(() => {
23
+ refresh(resource);
24
+ return true;
25
+ }, (error) => {
26
+ toast.show({
27
+ state: "error",
28
+ title: failed,
29
+ description: refusalReason(error)
30
+ });
31
+ return false;
32
+ });
33
+ const edit = (key, body, mentions) => run(page.resource, text("notSaved"), () => client.update(page.resource, key, {
34
+ [page.text]: body,
35
+ ...page.mentions !== void 0 && { [page.mentions]: mentions }
36
+ }, "*"));
37
+ const remove = (key) => run(page.resource, text("notDeleted"), () => client.remove(page.resource, key));
38
+ return {
39
+ edit,
40
+ remove,
41
+ react: reactions && ((key, emoji) => run(reactions.resource, text("reactionNotSaved"), () => client.create(reactions.resource, {
42
+ [reactions.field]: keyValue(model, key),
43
+ [reactions.emoji]: emoji
44
+ }))),
45
+ unreact: reactions && ((row) => run(reactions.resource, text("reactionNotSaved"), () => client.remove(reactions.resource, recordKey(resources[reactions.resource], row))))
46
+ };
47
+ };
48
+ //#endregion
49
+ export { useMessageWrites };
@@ -0,0 +1,13 @@
1
+ import { AppAddress } from "@protobase/schema";
2
+ //#region src/app/conversation-page/use-thread-address.d.ts
3
+ /**
4
+ * The thread a conversation page shows beside it, as its address holds it (`?thread=`): `open`, the key of the
5
+ * thread's first message, none while no thread is open; `to`, the address that opens a message's thread, for a link;
6
+ * and `close`, which goes back to the conversation alone.
7
+ */
8
+ export declare const useThreadAddress: (resource: string, key: string) => {
9
+ open: string | undefined;
10
+ to: (message: string) => AppAddress;
11
+ close: () => void;
12
+ };
13
+ //#endregion
@@ -0,0 +1,29 @@
1
+ import { useAppAddress } from "../use-app-address.js";
2
+ //#region src/app/conversation-page/use-thread-address.ts
3
+ /**
4
+ * The thread a conversation page shows beside it, as its address holds it (`?thread=`): `open`, the key of the
5
+ * thread's first message, none while no thread is open; `to`, the address that opens a message's thread, for a link;
6
+ * and `close`, which goes back to the conversation alone.
7
+ */
8
+ const useThreadAddress = (resource, key) => {
9
+ const { address, go } = useAppAddress();
10
+ const open = address?.kind === "record" && address.resource === resource && address.key === key ? address.thread : void 0;
11
+ const to = (message) => ({
12
+ kind: "record",
13
+ resource,
14
+ key,
15
+ thread: message
16
+ });
17
+ const close = () => go({
18
+ kind: "record",
19
+ resource,
20
+ key
21
+ });
22
+ return {
23
+ open,
24
+ to,
25
+ close
26
+ };
27
+ };
28
+ //#endregion
29
+ export { useThreadAddress };
@@ -0,0 +1,15 @@
1
+ import { ConversationPageModel, ResourceModel } from "@protobase/schema";
2
+ //#region src/app/conversation-page/use-thread-head.d.ts
3
+ /**
4
+ * A thread's first message, keyed `first`, with its sender named as the replies' are: `row` once read and in the
5
+ * conversation of the record keyed `recordKey`, and `elsewhere` when it is another conversation's, such as from an
6
+ * address of another one.
7
+ */
8
+ export declare const useThreadHead: (page: ConversationPageModel, model: ResourceModel, recordKey: string, first: string) => {
9
+ row: {
10
+ [x: string]: unknown;
11
+ } | undefined;
12
+ elsewhere: boolean;
13
+ error: Error | null;
14
+ };
15
+ //#endregion
@@ -0,0 +1,31 @@
1
+ import { useAdminMeta } from "../meta-gate.js";
2
+ import { useRecord } from "../../data/use-record.js";
3
+ import { listLabels, withLabels } from "../../live/relation-labels.js";
4
+ import { keyValue } from "../create/create-values.js";
5
+ import { usePickedLabels } from "../use-picked-labels.js";
6
+ import { inConversation } from "./thread-head.js";
7
+ //#region src/app/conversation-page/use-thread-head.ts
8
+ /**
9
+ * A thread's first message, keyed `first`, with its sender named as the replies' are: `row` once read and in the
10
+ * conversation of the record keyed `recordKey`, and `elsewhere` when it is another conversation's, such as from an
11
+ * address of another one.
12
+ */
13
+ const useThreadHead = (page, model, recordKey, first) => {
14
+ const { resources, views } = useAdminMeta();
15
+ const head = useRecord(page.resource, keyValue(model, first));
16
+ const read = head.data?.record;
17
+ const senders = [page.sender];
18
+ const sender = model.fields[page.sender];
19
+ const named = page.sender in listLabels(resources, views, model, senders) && sender?.relation ? resources[sender.relation.resource] : void 0;
20
+ const ids = named && read?.[page.sender] != null ? [String(read[page.sender])] : [];
21
+ const labels = usePickedLabels(named ?? model, named && views[named.name], ids);
22
+ const elsewhere = read !== void 0 && !inConversation(read, page.field, recordKey);
23
+ const [row] = read && !elsewhere ? withLabels(resources, model, senders, [read], { [page.sender]: Object.fromEntries(labels) }) : [];
24
+ return {
25
+ row,
26
+ elsewhere,
27
+ error: head.error
28
+ };
29
+ };
30
+ //#endregion
31
+ export { useThreadHead };