@protobase/ui 0.116.0 → 0.117.0

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 (328) hide show
  1. package/dist/account/messages.d.ts +2 -2
  2. package/dist/app/app.js +84 -50
  3. package/dist/app/bottom-bar-from-meta.d.ts +8 -2
  4. package/dist/app/bottom-bar-from-meta.js +23 -11
  5. package/dist/app/charts/messages.d.ts +2 -2
  6. package/dist/app/comments/messages.d.ts +2 -2
  7. package/dist/app/confirm-sign-in-messages.d.ts +2 -2
  8. package/dist/app/create/messages.d.ts +2 -2
  9. package/dist/app/delete/messages.d.ts +2 -2
  10. package/dist/app/displays/messages.d.ts +2 -2
  11. package/dist/app/export/export-dialog.js +1 -1
  12. package/dist/app/export/messages.d.ts +2 -2
  13. package/dist/app/field-types/custom-step-container/messages.d.ts +2 -2
  14. package/dist/app/field-types/runner-install/messages.d.ts +2 -2
  15. package/dist/app/field-types/workflow/messages.d.ts +2 -2
  16. package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
  17. package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
  18. package/dist/app/field-types/workflow-status/messages.d.ts +2 -2
  19. package/dist/app/file-viewers/messages.d.ts +2 -2
  20. package/dist/app/focus/messages.d.ts +2 -2
  21. package/dist/app/gallery/lightbox.js +1 -1
  22. package/dist/app/gallery/messages.d.ts +2 -2
  23. package/dist/app/hand-order/messages.d.ts +2 -2
  24. package/dist/app/history/messages.d.ts +2 -2
  25. package/dist/app/import/import-dialog.js +1 -1
  26. package/dist/app/import/messages.d.ts +2 -2
  27. package/dist/app/import/new-table/import-table-dialog.js +1 -1
  28. package/dist/app/list-messages.d.ts +2 -2
  29. package/dist/app/list-page.js +1 -1
  30. package/dist/app/messages.d.ts +2 -2
  31. package/dist/app/meta-gate-messages.d.ts +2 -2
  32. package/dist/app/new-version/messages.d.ts +2 -2
  33. package/dist/app/pages/action-inputs/action-inputs-dialog.js +1 -1
  34. package/dist/app/pages/messages.d.ts +2 -2
  35. package/dist/app/pages/record-actions.js +1 -1
  36. package/dist/app/record-chart/messages.d.ts +2 -2
  37. package/dist/app/record-messages.d.ts +2 -2
  38. package/dist/app/record-row/messages.d.ts +2 -2
  39. package/dist/app/refresh-mark.js +46 -10
  40. package/dist/app/related-cards/messages.d.ts +2 -2
  41. package/dist/app/runtime/messages.d.ts +2 -2
  42. package/dist/app/saved/messages.d.ts +2 -2
  43. package/dist/app/searches/messages.d.ts +2 -2
  44. package/dist/app/searches/update-search-dialog.js +1 -1
  45. package/dist/app-shell/account-entry.d.ts +17 -0
  46. package/dist/app-shell/account-entry.js +40 -0
  47. package/dist/app-shell/app-shell.d.ts +13 -1
  48. package/dist/app-shell/app-shell.js +80 -10
  49. package/dist/app-shell/back-target.d.ts +3 -2
  50. package/dist/app-shell/back-target.js +4 -3
  51. package/dist/app-shell/bottom-bar.d.ts +15 -3
  52. package/dist/app-shell/bottom-bar.js +70 -42
  53. package/dist/app-shell/brand-bar.d.ts +15 -0
  54. package/dist/app-shell/brand-bar.js +19 -0
  55. package/dist/app-shell/brand-status-bar.d.ts +8 -0
  56. package/dist/app-shell/brand-status-bar.js +27 -0
  57. package/dist/app-shell/breadcrumb.d.ts +4 -2
  58. package/dist/app-shell/breadcrumb.js +45 -37
  59. package/dist/app-shell/drawer.d.ts +2 -1
  60. package/dist/app-shell/drawer.js +22 -5
  61. package/dist/app-shell/global-search.d.ts +3 -1
  62. package/dist/app-shell/global-search.js +4 -4
  63. package/dist/app-shell/index.js +2 -2
  64. package/dist/app-shell/leading-slot.d.ts +9 -0
  65. package/dist/app-shell/leading-slot.js +10 -0
  66. package/dist/app-shell/logo.js +2 -1
  67. package/dist/app-shell/menu-page.d.ts +19 -0
  68. package/dist/app-shell/menu-page.js +29 -0
  69. package/dist/app-shell/messages.d.ts +2 -2
  70. package/dist/app-shell/more-page.d.ts +45 -0
  71. package/dist/app-shell/more-page.js +30 -0
  72. package/dist/app-shell/native-tab-bar.d.ts +47 -0
  73. package/dist/app-shell/native-tab-bar.js +45 -0
  74. package/dist/app-shell/page-scroll.d.ts +3 -2
  75. package/dist/app-shell/page-scroll.js +5 -3
  76. package/dist/app-shell/profile-menu.d.ts +5 -1
  77. package/dist/app-shell/profile-menu.js +138 -117
  78. package/dist/app-shell/sidebar.d.ts +12 -1
  79. package/dist/app-shell/sidebar.js +20 -10
  80. package/dist/app-shell/tab-icon.d.ts +7 -0
  81. package/dist/app-shell/tab-icon.js +38 -0
  82. package/dist/app-shell/top-bar.d.ts +19 -3
  83. package/dist/app-shell/top-bar.js +104 -60
  84. package/dist/app-shell/use-native-bottom-bar.d.ts +16 -0
  85. package/dist/app-shell/use-native-bottom-bar.js +62 -0
  86. package/dist/assistant-dock/messages.d.ts +2 -2
  87. package/dist/auth/messages.d.ts +2 -2
  88. package/dist/calls/call-guests-panel.js +2 -2
  89. package/dist/calls/messages.d.ts +2 -2
  90. package/dist/carousel/messages.d.ts +2 -2
  91. package/dist/chat/messages.d.ts +2 -2
  92. package/dist/data-grid/header-menu.js +33 -28
  93. package/dist/data-grid/messages.d.ts +2 -2
  94. package/dist/data-grid/row-menu.js +38 -33
  95. package/dist/filter-panel/messages.d.ts +2 -2
  96. package/dist/focus-page/bar-actions.js +1 -1
  97. package/dist/format/messages.d.ts +2 -2
  98. package/dist/index.d.ts +2 -1
  99. package/dist/index.js +5 -4
  100. package/dist/inline-child-table/messages.d.ts +2 -2
  101. package/dist/invitations/messages.d.ts +2 -2
  102. package/dist/live/messages.d.ts +2 -2
  103. package/dist/locale/en.js +7 -0
  104. package/dist/locale/en.json.d.ts +7 -0
  105. package/dist/locale/messages.d.ts +14 -0
  106. package/dist/locale/nl.js +7 -0
  107. package/dist/mailbox/messages.d.ts +2 -2
  108. package/dist/mocks/customers.d.ts +1 -1
  109. package/dist/mocks/invoices.d.ts +2 -2
  110. package/dist/mocks/orders.d.ts +1 -1
  111. package/dist/notifications/bell/messages.d.ts +2 -2
  112. package/dist/notifications/bell/notification-bell.js +40 -35
  113. package/dist/organizations/messages.d.ts +2 -2
  114. package/dist/package.js +1 -1
  115. package/dist/primitives/avatar.d.ts +1 -1
  116. package/dist/primitives/avatar.js +2 -1
  117. package/dist/primitives/drawer-math.d.ts +39 -0
  118. package/dist/primitives/drawer-math.js +43 -0
  119. package/dist/primitives/menu-select.js +51 -44
  120. package/dist/primitives/menu-surface.d.ts +22 -0
  121. package/dist/primitives/menu-surface.js +29 -0
  122. package/dist/primitives/messages.d.ts +2 -2
  123. package/dist/primitives/popover-menu.js +1 -0
  124. package/dist/primitives/sheet-drag.d.ts +5 -5
  125. package/dist/primitives/sheet-drag.js +10 -16
  126. package/dist/primitives/sheet.d.ts +5 -2
  127. package/dist/primitives/sheet.js +9 -6
  128. package/dist/primitives/use-drawer-drag.d.ts +34 -0
  129. package/dist/primitives/use-drawer-drag.js +103 -0
  130. package/dist/primitives/use-sheet-drag.d.ts +2 -2
  131. package/dist/primitives/use-sheet-drag.js +10 -9
  132. package/dist/record-view/action-menu.js +45 -40
  133. package/dist/shell/assets/{account-page-9Aq9kvrG.js → account-page-dcJyxP-d.js} +2 -2
  134. package/dist/shell/assets/app-BAQxWF5r.css +2 -0
  135. package/dist/shell/assets/app-DTl8rg8j.js +34 -0
  136. package/dist/shell/assets/{assistant-shell-BGtjYwwY.js → assistant-shell-Bw1jJrLm.js} +2 -2
  137. package/dist/shell/assets/board-display-DDFDZzOk.js +2 -0
  138. package/dist/shell/assets/{calendar-display-DKXi1P_o.js → calendar-display-B0R6JkIL.js} +2 -2
  139. package/dist/shell/assets/call-rings-CzvSKlfI.js +2 -0
  140. package/dist/shell/assets/{calls-DR-Ci2ND.js → calls-BgwbMyeR.js} +2 -2
  141. package/dist/shell/assets/{circle-alert-C0Jeesr7.js → circle-alert-CANqQIsU.js} +2 -2
  142. package/dist/shell/assets/composed-page-gwTeW0b3.js +2 -0
  143. package/dist/shell/assets/{composer-section-rLoyhseD.js → composer-section-gsOgYgY2.js} +2 -2
  144. package/dist/shell/assets/{connect-route-B9xNNieq.js → connect-route-CtL1EJIN.js} +2 -2
  145. package/dist/shell/assets/{copy-field-DkCyHPwg.js → copy-field-CamvXHHQ.js} +2 -2
  146. package/dist/shell/assets/create-route-Cx8yqS-H.js +2 -0
  147. package/dist/shell/assets/{custom-step-container-field-Do5pWJ_q.js → custom-step-container-field-0-Q_RuZy.js} +4 -4
  148. package/dist/shell/assets/embedded-list-56J4XDiR.js +3 -0
  149. package/dist/shell/assets/en-CtEQkQWj.js +2 -0
  150. package/dist/shell/assets/{export-dialog-CovrAwYy.js → export-dialog-CEp2g6vx.js} +2 -2
  151. package/dist/shell/assets/export-worker-DlWkifnE.js +15 -0
  152. package/dist/shell/assets/{graph-view-BfRhAOfb.js → graph-view-CgjfBK_g.js} +2 -2
  153. package/dist/shell/assets/{group-donut-DC8GLnC8.js → group-donut-DGZUg_gn.js} +2 -2
  154. package/dist/shell/assets/{guest-call-page-Dc8M5yz6.js → guest-call-page-BhTshbrl.js} +3 -3
  155. package/dist/shell/assets/{html-viewer-DH_s-gLB.js → html-viewer-GD1mwLEo.js} +2 -2
  156. package/dist/shell/assets/{import-dialog-Ge24RdwQ.js → import-dialog-ByRCf2Cp.js} +2 -2
  157. package/dist/shell/assets/import-table-dialog-CiDY_0RT.js +2 -0
  158. package/dist/shell/assets/{index-Bi_Jks-d.js → index-PtDa8a1m.js} +1 -1
  159. package/dist/shell/assets/invitations-page-Bh-RCnnl.js +2 -0
  160. package/dist/shell/assets/{layout-grid-DCBxzjaE.js → layout-grid-DJrFC12w.js} +2 -2
  161. package/dist/shell/assets/{legend-item-BZXnHPzh.js → legend-item-YdN_NHUz.js} +2 -2
  162. package/dist/shell/assets/{lib-vis.gl-react-maplibre-CdxVSk--.js → lib-vis.gl-react-maplibre-1cv426UN.js} +2 -2
  163. package/dist/shell/assets/list-page-BU1MrXbN.js +4 -0
  164. package/dist/shell/assets/maplibre-BedvDUG2.js +2 -0
  165. package/dist/shell/assets/{markdown-content-DMl-cVjQ.js → markdown-content-BlKajH2l.js} +2 -2
  166. package/dist/shell/assets/members-page-BYUO0Dq2.js +2 -0
  167. package/dist/shell/assets/{messages-D5XhIbDz.js → messages-DQ0cj-Ao.js} +2 -2
  168. package/dist/shell/assets/nl-9OWL4NdF.js +2 -0
  169. package/dist/shell/assets/organization-page-BrC1nHC-.js +2 -0
  170. package/dist/shell/assets/organizations-page-CaUeWdr4.js +2 -0
  171. package/dist/shell/assets/parse-worker-NutG5-Js.js +35 -0
  172. package/dist/shell/assets/{pending-invitation-row-BIO4J3ts.js → pending-invitation-row-juUdWvG6.js} +2 -2
  173. package/dist/shell/assets/{period-chart-CoT2IDzy.js → period-chart-BUZhUb5l.js} +2 -2
  174. package/dist/shell/assets/{person-row-DBeHOA2K.js → person-row-DH3JhMfz.js} +2 -2
  175. package/dist/shell/assets/public-form-page-d3TamPPE.js +2 -0
  176. package/dist/shell/assets/record-lines-NtlHP9Lz.js +2 -0
  177. package/dist/shell/assets/{record-map-BR34Q9uI.js → record-map-BDXoF9AS.js} +2 -2
  178. package/dist/shell/assets/{record-opens-Dbjd4FLe.js → record-opens-C1KgR6ff.js} +2 -2
  179. package/dist/shell/assets/record-page-D88DdoET.js +3 -0
  180. package/dist/shell/assets/record-preview-BT9_Hdcn.js +2 -0
  181. package/dist/shell/assets/{records-map-CXanq-qN.js → records-map-BjHcY5gU.js} +2 -2
  182. package/dist/shell/assets/render-node-v6KfRocH.js +3 -0
  183. package/dist/shell/assets/reorder-button-B3GeKMOJ.js +2 -0
  184. package/dist/shell/assets/{run-trace-view-D1DZCrDs.js → run-trace-view-Ddc0SELh.js} +2 -2
  185. package/dist/shell/assets/{runner-install-field-C2XhrG0M.js → runner-install-field-CiD9Pw1j.js} +2 -2
  186. package/dist/shell/assets/{runtime-update-C5TxLpYf.js → runtime-update-CoXcnfxB.js} +2 -2
  187. package/dist/shell/assets/shared-protobase-ui-CwLnXvxx.js +1 -0
  188. package/dist/shell/assets/sheet-source-DbJu1SrV.js +3 -0
  189. package/dist/shell/assets/sign-in-policy-page-B40iAeJa.js +2 -0
  190. package/dist/shell/assets/start-block-queries-C_udrEM9.js +2 -0
  191. package/dist/shell/assets/step-catalog-7obnZV6X.js +2 -0
  192. package/dist/shell/assets/{step-panel-TfW-31Gv.js → step-panel-BM_xu6Yy.js} +2 -2
  193. package/dist/shell/assets/timeline-display-CdLfWAbQ.js +2 -0
  194. package/dist/shell/assets/{trash-BjnGkZfx.js → trash-BHo3HvFy.js} +2 -2
  195. package/dist/shell/assets/{update-set-BahNKmxv.js → update-set-DTikSoau.js} +2 -2
  196. package/dist/shell/assets/use-calendar-move-Bhha2yOp.js +2 -0
  197. package/dist/shell/assets/{use-display-rows-DsBBYuKB.js → use-display-rows-CS_0O_UE.js} +2 -2
  198. package/dist/shell/assets/{use-paged-search-DaT4uUhX.js → use-paged-search-ChxCRCpF.js} +2 -2
  199. package/dist/shell/assets/{use-run-trace-DHk7l8MX.js → use-run-trace-BfRRgSgG.js} +2 -2
  200. package/dist/shell/assets/{use-workflow-page-DPIhXcnb.js → use-workflow-page-CTdBd8_8.js} +2 -2
  201. package/dist/shell/assets/{use-workflow-types-Bp8iqkBg.js → use-workflow-types-cZQ59ATf.js} +2 -2
  202. package/dist/shell/assets/{vendor-DQHyyBk1.js → vendor-t7Q7QbPu.js} +2 -2
  203. package/dist/shell/assets/{workflow-canvas-CiGUTx4K.js → workflow-canvas-B0kWJeH0.js} +4 -4
  204. package/dist/shell/assets/{workflow-field-lqBx3RDj.js → workflow-field-DXIk6V2Y.js} +3 -3
  205. package/dist/shell/assets/{workflow-graph-editor-DgufTFii.js → workflow-graph-editor-Cem4aY2u.js} +2 -2
  206. package/dist/shell/assets/{workflow-run-field-C4BtvPnB.js → workflow-run-field-BeMn3eOH.js} +3 -3
  207. package/dist/shell/assets/workflow-status-field-0wvGDiva.js +2 -0
  208. package/dist/shell/assets/workflow-workbench-qT5c0xnH.js +4 -0
  209. package/dist/shell/index.html +5 -5
  210. package/dist/shell/protobase.shell.json +3 -3
  211. package/dist/shell/protobase.sw.js +2 -2
  212. package/dist/shell-source-maps/assets/{account-page-9Aq9kvrG.js.map → account-page-dcJyxP-d.js.map} +1 -1
  213. package/dist/shell-source-maps/assets/app-DTl8rg8j.js.map +1 -0
  214. package/dist/shell-source-maps/assets/{assistant-shell-BGtjYwwY.js.map → assistant-shell-Bw1jJrLm.js.map} +1 -1
  215. package/dist/shell-source-maps/assets/{board-display-Ck6nnv4b.js.map → board-display-DDFDZzOk.js.map} +1 -1
  216. package/dist/shell-source-maps/assets/{calendar-display-DKXi1P_o.js.map → calendar-display-B0R6JkIL.js.map} +1 -1
  217. package/dist/shell-source-maps/assets/{call-rings-Bs9dtURX.js.map → call-rings-CzvSKlfI.js.map} +1 -1
  218. package/dist/shell-source-maps/assets/{calls-DR-Ci2ND.js.map → calls-BgwbMyeR.js.map} +1 -1
  219. package/dist/shell-source-maps/assets/{circle-alert-C0Jeesr7.js.map → circle-alert-CANqQIsU.js.map} +1 -1
  220. package/dist/shell-source-maps/assets/{composed-page-Bdzzzuyj.js.map → composed-page-gwTeW0b3.js.map} +1 -1
  221. package/dist/shell-source-maps/assets/{composer-section-rLoyhseD.js.map → composer-section-gsOgYgY2.js.map} +1 -1
  222. package/dist/shell-source-maps/assets/{connect-route-B9xNNieq.js.map → connect-route-CtL1EJIN.js.map} +1 -1
  223. package/dist/shell-source-maps/assets/{copy-field-DkCyHPwg.js.map → copy-field-CamvXHHQ.js.map} +1 -1
  224. package/dist/shell-source-maps/assets/{create-route-DBrv5Kqi.js.map → create-route-Cx8yqS-H.js.map} +1 -1
  225. package/dist/shell-source-maps/assets/{custom-step-container-field-Do5pWJ_q.js.map → custom-step-container-field-0-Q_RuZy.js.map} +1 -1
  226. package/dist/shell-source-maps/assets/embedded-list-56J4XDiR.js.map +1 -0
  227. package/dist/shell-source-maps/assets/en-CtEQkQWj.js.map +1 -0
  228. package/dist/shell-source-maps/assets/{export-dialog-CovrAwYy.js.map → export-dialog-CEp2g6vx.js.map} +1 -1
  229. package/dist/shell-source-maps/assets/export-worker-DlWkifnE.js.map +1 -0
  230. package/dist/shell-source-maps/assets/{graph-view-BfRhAOfb.js.map → graph-view-CgjfBK_g.js.map} +1 -1
  231. package/dist/shell-source-maps/assets/{group-donut-DC8GLnC8.js.map → group-donut-DGZUg_gn.js.map} +1 -1
  232. package/dist/shell-source-maps/assets/{guest-call-page-Dc8M5yz6.js.map → guest-call-page-BhTshbrl.js.map} +1 -1
  233. package/dist/shell-source-maps/assets/{html-viewer-DH_s-gLB.js.map → html-viewer-GD1mwLEo.js.map} +1 -1
  234. package/dist/shell-source-maps/assets/{import-dialog-Ge24RdwQ.js.map → import-dialog-ByRCf2Cp.js.map} +1 -1
  235. package/dist/shell-source-maps/assets/{import-table-dialog-D1aVXF3R.js.map → import-table-dialog-CiDY_0RT.js.map} +1 -1
  236. package/dist/shell-source-maps/assets/{invitations-page-CFwYUoqb.js.map → invitations-page-Bh-RCnnl.js.map} +1 -1
  237. package/dist/shell-source-maps/assets/{layout-grid-DCBxzjaE.js.map → layout-grid-DJrFC12w.js.map} +1 -1
  238. package/dist/shell-source-maps/assets/{legend-item-BZXnHPzh.js.map → legend-item-YdN_NHUz.js.map} +1 -1
  239. package/dist/shell-source-maps/assets/{lib-vis.gl-react-maplibre-CdxVSk--.js.map → lib-vis.gl-react-maplibre-1cv426UN.js.map} +1 -1
  240. package/dist/shell-source-maps/assets/{list-page-DwIEEzTz.js.map → list-page-BU1MrXbN.js.map} +1 -1
  241. package/dist/shell-source-maps/assets/{maplibre-C7kZagL3.js.map → maplibre-BedvDUG2.js.map} +1 -1
  242. package/dist/shell-source-maps/assets/{markdown-content-DMl-cVjQ.js.map → markdown-content-BlKajH2l.js.map} +1 -1
  243. package/dist/shell-source-maps/assets/{members-page-BfrzLCXo.js.map → members-page-BYUO0Dq2.js.map} +1 -1
  244. package/dist/shell-source-maps/assets/{messages-D5XhIbDz.js.map → messages-DQ0cj-Ao.js.map} +1 -1
  245. package/dist/shell-source-maps/assets/nl-9OWL4NdF.js.map +1 -0
  246. package/dist/shell-source-maps/assets/{organization-page-DxA2154P.js.map → organization-page-BrC1nHC-.js.map} +1 -1
  247. package/dist/shell-source-maps/assets/{organizations-page-Bf4oXbvZ.js.map → organizations-page-CaUeWdr4.js.map} +1 -1
  248. package/dist/shell-source-maps/assets/parse-worker-NutG5-Js.js.map +1 -0
  249. package/dist/shell-source-maps/assets/{pending-invitation-row-BIO4J3ts.js.map → pending-invitation-row-juUdWvG6.js.map} +1 -1
  250. package/dist/shell-source-maps/assets/{period-chart-CoT2IDzy.js.map → period-chart-BUZhUb5l.js.map} +1 -1
  251. package/dist/shell-source-maps/assets/{person-row-DBeHOA2K.js.map → person-row-DH3JhMfz.js.map} +1 -1
  252. package/dist/shell-source-maps/assets/{public-form-page-Dhinql3j.js.map → public-form-page-d3TamPPE.js.map} +1 -1
  253. package/dist/shell-source-maps/assets/{record-lines-Dmb8bl38.js.map → record-lines-NtlHP9Lz.js.map} +1 -1
  254. package/dist/shell-source-maps/assets/{record-map-BR34Q9uI.js.map → record-map-BDXoF9AS.js.map} +1 -1
  255. package/dist/shell-source-maps/assets/{record-opens-Dbjd4FLe.js.map → record-opens-C1KgR6ff.js.map} +1 -1
  256. package/dist/shell-source-maps/assets/{record-page-Dnpo_8uE.js.map → record-page-D88DdoET.js.map} +1 -1
  257. package/dist/shell-source-maps/assets/{record-preview-CarOT-Gn.js.map → record-preview-BT9_Hdcn.js.map} +1 -1
  258. package/dist/shell-source-maps/assets/{records-map-CXanq-qN.js.map → records-map-BjHcY5gU.js.map} +1 -1
  259. package/dist/shell-source-maps/assets/{render-node-DGYXKoGV.js.map → render-node-v6KfRocH.js.map} +1 -1
  260. package/dist/shell-source-maps/assets/{reorder-button-9_dAk_3O.js.map → reorder-button-B3GeKMOJ.js.map} +1 -1
  261. package/dist/shell-source-maps/assets/{run-trace-view-D1DZCrDs.js.map → run-trace-view-Ddc0SELh.js.map} +1 -1
  262. package/dist/shell-source-maps/assets/{runner-install-field-C2XhrG0M.js.map → runner-install-field-CiD9Pw1j.js.map} +1 -1
  263. package/dist/shell-source-maps/assets/{runtime-update-C5TxLpYf.js.map → runtime-update-CoXcnfxB.js.map} +1 -1
  264. package/dist/shell-source-maps/assets/{sheet-source-DqFYbJpm.js.map → sheet-source-DbJu1SrV.js.map} +1 -1
  265. package/dist/shell-source-maps/assets/{sign-in-policy-page-vjGTg9Do.js.map → sign-in-policy-page-B40iAeJa.js.map} +1 -1
  266. package/dist/shell-source-maps/assets/{start-block-queries-CmVDv8_F.js.map → start-block-queries-C_udrEM9.js.map} +1 -1
  267. package/dist/shell-source-maps/assets/{step-catalog-PWiIgJSI.js.map → step-catalog-7obnZV6X.js.map} +1 -1
  268. package/dist/shell-source-maps/assets/{step-panel-TfW-31Gv.js.map → step-panel-BM_xu6Yy.js.map} +1 -1
  269. package/dist/shell-source-maps/assets/{timeline-display-eBf3tuig.js.map → timeline-display-CdLfWAbQ.js.map} +1 -1
  270. package/dist/shell-source-maps/assets/{trash-BjnGkZfx.js.map → trash-BHo3HvFy.js.map} +1 -1
  271. package/dist/shell-source-maps/assets/{update-set-BahNKmxv.js.map → update-set-DTikSoau.js.map} +1 -1
  272. package/dist/shell-source-maps/assets/{use-calendar-move-Bfp2yC0P.js.map → use-calendar-move-Bhha2yOp.js.map} +1 -1
  273. package/dist/shell-source-maps/assets/{use-display-rows-DsBBYuKB.js.map → use-display-rows-CS_0O_UE.js.map} +1 -1
  274. package/dist/shell-source-maps/assets/{use-paged-search-DaT4uUhX.js.map → use-paged-search-ChxCRCpF.js.map} +1 -1
  275. package/dist/shell-source-maps/assets/{use-run-trace-DHk7l8MX.js.map → use-run-trace-BfRRgSgG.js.map} +1 -1
  276. package/dist/shell-source-maps/assets/{use-workflow-page-DPIhXcnb.js.map → use-workflow-page-CTdBd8_8.js.map} +1 -1
  277. package/dist/shell-source-maps/assets/{use-workflow-types-Bp8iqkBg.js.map → use-workflow-types-cZQ59ATf.js.map} +1 -1
  278. package/dist/shell-source-maps/assets/{vendor-DQHyyBk1.js.map → vendor-t7Q7QbPu.js.map} +1 -1
  279. package/dist/shell-source-maps/assets/{workflow-canvas-CiGUTx4K.js.map → workflow-canvas-B0kWJeH0.js.map} +1 -1
  280. package/dist/shell-source-maps/assets/{workflow-field-lqBx3RDj.js.map → workflow-field-DXIk6V2Y.js.map} +1 -1
  281. package/dist/shell-source-maps/assets/{workflow-graph-editor-DgufTFii.js.map → workflow-graph-editor-Cem4aY2u.js.map} +1 -1
  282. package/dist/shell-source-maps/assets/{workflow-run-field-C4BtvPnB.js.map → workflow-run-field-BeMn3eOH.js.map} +1 -1
  283. package/dist/shell-source-maps/assets/{workflow-status-field-CqDaP0V9.js.map → workflow-status-field-0wvGDiva.js.map} +1 -1
  284. package/dist/shell-source-maps/assets/{workflow-workbench-CgL6wHPG.js.map → workflow-workbench-qT5c0xnH.js.map} +1 -1
  285. package/dist/status/messages.d.ts +2 -2
  286. package/dist/status/status-dialog.js +1 -1
  287. package/dist/theme.css +6 -0
  288. package/dist/users/messages.d.ts +2 -2
  289. package/package.json +5 -5
  290. package/dist/shell/assets/app-BnDutf0s.js +0 -34
  291. package/dist/shell/assets/app-DcrDZ6Fc.css +0 -2
  292. package/dist/shell/assets/board-display-Ck6nnv4b.js +0 -2
  293. package/dist/shell/assets/call-rings-Bs9dtURX.js +0 -2
  294. package/dist/shell/assets/composed-page-Bdzzzuyj.js +0 -2
  295. package/dist/shell/assets/create-route-DBrv5Kqi.js +0 -2
  296. package/dist/shell/assets/embedded-list-CPgxhzPw.js +0 -3
  297. package/dist/shell/assets/en-B0Sx6LpA.js +0 -2
  298. package/dist/shell/assets/export-worker-DnXy8F95.js +0 -15
  299. package/dist/shell/assets/import-table-dialog-D1aVXF3R.js +0 -2
  300. package/dist/shell/assets/invitations-page-CFwYUoqb.js +0 -2
  301. package/dist/shell/assets/list-page-DwIEEzTz.js +0 -4
  302. package/dist/shell/assets/maplibre-C7kZagL3.js +0 -2
  303. package/dist/shell/assets/members-page-BfrzLCXo.js +0 -2
  304. package/dist/shell/assets/nl-DD4sTnQJ.js +0 -2
  305. package/dist/shell/assets/organization-page-DxA2154P.js +0 -2
  306. package/dist/shell/assets/organizations-page-Bf4oXbvZ.js +0 -2
  307. package/dist/shell/assets/parse-worker-BYXW4dAv.js +0 -35
  308. package/dist/shell/assets/public-form-page-Dhinql3j.js +0 -2
  309. package/dist/shell/assets/record-lines-Dmb8bl38.js +0 -2
  310. package/dist/shell/assets/record-page-Dnpo_8uE.js +0 -3
  311. package/dist/shell/assets/record-preview-CarOT-Gn.js +0 -2
  312. package/dist/shell/assets/render-node-DGYXKoGV.js +0 -3
  313. package/dist/shell/assets/reorder-button-9_dAk_3O.js +0 -2
  314. package/dist/shell/assets/shared-protobase-ui-HnfzBwws.js +0 -1
  315. package/dist/shell/assets/sheet-source-DqFYbJpm.js +0 -3
  316. package/dist/shell/assets/sign-in-policy-page-vjGTg9Do.js +0 -2
  317. package/dist/shell/assets/start-block-queries-CmVDv8_F.js +0 -2
  318. package/dist/shell/assets/step-catalog-PWiIgJSI.js +0 -2
  319. package/dist/shell/assets/timeline-display-eBf3tuig.js +0 -2
  320. package/dist/shell/assets/use-calendar-move-Bfp2yC0P.js +0 -2
  321. package/dist/shell/assets/workflow-status-field-CqDaP0V9.js +0 -2
  322. package/dist/shell/assets/workflow-workbench-CgL6wHPG.js +0 -4
  323. package/dist/shell-source-maps/assets/app-BnDutf0s.js.map +0 -1
  324. package/dist/shell-source-maps/assets/embedded-list-CPgxhzPw.js.map +0 -1
  325. package/dist/shell-source-maps/assets/en-B0Sx6LpA.js.map +0 -1
  326. package/dist/shell-source-maps/assets/export-worker-DnXy8F95.js.map +0 -1
  327. package/dist/shell-source-maps/assets/nl-DD4sTnQJ.js.map +0 -1
  328. package/dist/shell-source-maps/assets/parse-worker-BYXW4dAv.js.map +0 -1
@@ -1,6 +1,7 @@
1
1
  import { cn } from "../lib/cn.js";
2
2
  import { RouteLink } from "./route-link.js";
3
3
  import { useMenuRight, useMenuTop } from "./menu-edge.js";
4
+ import { MenuSurface } from "./menu-surface.js";
4
5
  import { menuKeyTarget } from "./menu-keys.js";
5
6
  import { useEffect, useRef, useState } from "react";
6
7
  import { Check, ChevronDown } from "lucide-react";
@@ -24,7 +25,7 @@ const MenuSelect = ({ value, options, onChange, link, label }) => {
24
25
  if (!open) return;
25
26
  items.current[Math.max(chosen, 0)]?.focus();
26
27
  const close = (event) => {
27
- if (event.target instanceof Node && !root.current?.contains(event.target)) setOpen(false);
28
+ if (event.target instanceof Node && !root.current?.contains(event.target) && !menu.current?.contains(event.target)) setOpen(false);
28
29
  };
29
30
  document.addEventListener("pointerdown", close);
30
31
  return () => document.removeEventListener("pointerdown", close);
@@ -57,50 +58,56 @@ const MenuSelect = ({ value, options, onChange, link, label }) => {
57
58
  current?.label ?? label,
58
59
  /* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5 text-muted-foreground" })
59
60
  ]
60
- }), open && /* @__PURE__ */ jsx("ul", {
61
- ref: menu,
62
- role: "menu",
63
- "aria-label": label,
64
- onKeyDown,
65
- style: {
66
- ...right,
67
- ...top
68
- },
69
- className: "absolute right-0 top-full z-30 mt-1 w-max min-w-40 rounded-md border bg-background py-1 text-body shadow-pop",
70
- children: options.map((option, index) => {
71
- const item = {
72
- ref: (element) => {
73
- items.current[index] = element;
74
- },
75
- role: "menuitemradio",
76
- "aria-checked": option.value === value,
77
- className: cn("flex min-h-9 w-full items-center gap-2 px-3 py-1.5 text-left hover:bg-muted focus:bg-muted focus:outline-none pointer-coarse:min-h-11", option.value === value && "font-medium")
78
- };
79
- const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
80
- option.icon ? /* @__PURE__ */ jsx(option.icon, { className: "size-3.5" }) : /* @__PURE__ */ jsx("span", { className: "size-3.5" }),
81
- /* @__PURE__ */ jsx("span", {
82
- className: "flex-1",
83
- children: option.label
84
- }),
85
- option.value === value && /* @__PURE__ */ jsx(Check, { className: "size-3.5 text-primary-text" })
86
- ] });
87
- return /* @__PURE__ */ jsx("li", {
88
- role: "none",
89
- children: link ? /* @__PURE__ */ jsx(RouteLink, {
90
- ...item,
91
- to: link(option.value),
92
- onClick: closeToTrigger,
93
- children: content
94
- }) : /* @__PURE__ */ jsx("button", {
95
- ...item,
96
- type: "button",
97
- onClick: () => {
98
- closeToTrigger();
99
- if (option.value !== value) onChange(option.value);
61
+ }), /* @__PURE__ */ jsx(MenuSurface, {
62
+ open,
63
+ title: label,
64
+ onClose: () => setOpen(false),
65
+ inPlaceOnDesktop: true,
66
+ menu: /* @__PURE__ */ jsx("ul", {
67
+ ref: menu,
68
+ role: "menu",
69
+ "aria-label": label,
70
+ onKeyDown,
71
+ style: {
72
+ ...right,
73
+ ...top
74
+ },
75
+ className: "absolute right-0 top-full z-30 mt-1 w-max min-w-40 rounded-md border bg-background py-1 text-body shadow-pop",
76
+ children: options.map((option, index) => {
77
+ const item = {
78
+ ref: (element) => {
79
+ items.current[index] = element;
100
80
  },
101
- children: content
102
- })
103
- }, option.value);
81
+ role: "menuitemradio",
82
+ "aria-checked": option.value === value,
83
+ className: cn("flex min-h-9 w-full items-center gap-2 px-3 py-1.5 text-left hover:bg-muted focus:bg-muted focus:outline-none pointer-coarse:min-h-11", option.value === value && "font-medium")
84
+ };
85
+ const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
86
+ option.icon ? /* @__PURE__ */ jsx(option.icon, { className: "size-3.5" }) : /* @__PURE__ */ jsx("span", { className: "size-3.5" }),
87
+ /* @__PURE__ */ jsx("span", {
88
+ className: "flex-1",
89
+ children: option.label
90
+ }),
91
+ option.value === value && /* @__PURE__ */ jsx(Check, { className: "size-3.5 text-primary-text" })
92
+ ] });
93
+ return /* @__PURE__ */ jsx("li", {
94
+ role: "none",
95
+ children: link ? /* @__PURE__ */ jsx(RouteLink, {
96
+ ...item,
97
+ to: link(option.value),
98
+ onClick: closeToTrigger,
99
+ children: content
100
+ }) : /* @__PURE__ */ jsx("button", {
101
+ ...item,
102
+ type: "button",
103
+ onClick: () => {
104
+ closeToTrigger();
105
+ if (option.value !== value) onChange(option.value);
106
+ },
107
+ children: content
108
+ })
109
+ }, option.value);
110
+ })
104
111
  })
105
112
  })]
106
113
  });
@@ -0,0 +1,22 @@
1
+ import { ReactElement } from "react";
2
+ //#region src/primitives/menu-surface.d.ts
3
+ export type MenuSurfaceProps = {
4
+ open: boolean;
5
+ /** What the sheet is titled on a phone, as the menu's label. */
6
+ title: string;
7
+ onClose: () => void;
8
+ /** The menu as it is drawn on a desktop, positioned beside its button: its element keeps its ref, role and handlers. */
9
+ menu: ReactElement<{
10
+ className?: string;
11
+ style?: object;
12
+ }>;
13
+ /** On a desktop, drawn where it stands, for a menu positioned against its own wrapper rather than the viewport. */
14
+ inPlaceOnDesktop?: boolean;
15
+ };
16
+ /**
17
+ * Where every menu, popover and select list is presented, so they all look and behave alike: on a phone in the sheet
18
+ * that rises from the bottom, on a desktop beside its button. Either way it is drawn at the document's root, with the
19
+ * page's colours, whatever it opens from, such as a brand-coloured bar.
20
+ */
21
+ export declare const MenuSurface: ({ open, title, onClose, menu, inPlaceOnDesktop }: MenuSurfaceProps) => import("react").JSX.Element | null;
22
+ //#endregion
@@ -0,0 +1,29 @@
1
+ import { useIsDesktop } from "../lib/use-media-query.js";
2
+ import { Sheet } from "./sheet.js";
3
+ import { cloneElement } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { createPortal } from "react-dom";
6
+ //#region src/primitives/menu-surface.tsx
7
+ const sheetMenu = "py-1 text-menu-sheet [&>*]:min-h-12 [&_[role=menuitem]]:min-h-12 [&_svg]:size-5 [&_[role=group]_button]:min-h-10 [&_[role=group]_button]:min-w-10 [&_[role=group]_button]:justify-center";
8
+ /**
9
+ * Where every menu, popover and select list is presented, so they all look and behave alike: on a phone in the sheet
10
+ * that rises from the bottom, on a desktop beside its button. Either way it is drawn at the document's root, with the
11
+ * page's colours, whatever it opens from, such as a brand-coloured bar.
12
+ */
13
+ const MenuSurface = ({ open, title, onClose, menu, inPlaceOnDesktop }) => {
14
+ const desktop = useIsDesktop();
15
+ if (!open) return null;
16
+ if (desktop) return inPlaceOnDesktop ? menu : createPortal(menu, document.body);
17
+ return /* @__PURE__ */ jsx(Sheet, {
18
+ title,
19
+ open: true,
20
+ onClose,
21
+ inset: "none",
22
+ children: cloneElement(menu, {
23
+ className: sheetMenu,
24
+ style: void 0
25
+ })
26
+ });
27
+ };
28
+ //#endregion
29
+ export { MenuSurface };
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../locale/messages.js";
2
2
  //#region src/primitives/messages.d.ts
3
3
  export declare const text: {
4
- (id: "loading" | "remove" | "next" | "close" | "previous" | "dragToClose", values?: Record<string, MessageValue>): string;
5
- rich(id: "loading" | "remove" | "next" | "close" | "previous" | "dragToClose", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "loading" | "next" | "remove" | "close" | "previous" | "dragToClose", values?: Record<string, MessageValue>): string;
5
+ rich(id: "loading" | "next" | "remove" | "close" | "previous" | "dragToClose", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -44,6 +44,7 @@ const usePopoverMenu = () => {
44
44
  if (event instanceof KeyboardEvent ? event.key === "Escape" : !inside(event.target)) setOpen(false);
45
45
  };
46
46
  const dismiss = (event) => {
47
+ if (menu.current?.closest("[aria-modal=\"true\"]")) return;
47
48
  if (!inside(event.target)) setOpen(false);
48
49
  };
49
50
  document.addEventListener("mousedown", close);
@@ -1,7 +1,7 @@
1
1
  //#region src/primitives/sheet-drag.d.ts
2
- /** How far a finger moves before a press on the sheet counts as a drag, in pixels. */
3
- export declare const dragSlop = 6;
4
- /** Where the sheet sits for a finger `dy` pixels below where it started: down it follows, up it gives a little. */
2
+ /** How far a finger moves before a press on the sheet counts as a drag, in pixels: the drawers' own (`drawer-math`). */
3
+ export declare const dragSlop = 10;
4
+ /** Where the sheet sits for a finger `dy` pixels below where it started: down it follows, up it gives as a rubber band. */
5
5
  export declare const sheetOffset: (dy: number) => number;
6
6
  export type DragSample = {
7
7
  y: number;
@@ -10,8 +10,8 @@ export type DragSample = {
10
10
  /** The finger's speed downwards over the last stretch of a drag, in pixels per millisecond; negative is upwards. */
11
11
  export declare const releaseVelocity: (samples: DragSample[]) => number;
12
12
  /**
13
- * Whether a sheet let go `offset` pixels below where it rests, moving at `velocity`, closes: a fling down closes it, as
14
- * does letting go past `closeShare` of its height unless the finger was moving back up; otherwise it springs back.
13
+ * Whether a sheet let go `offset` pixels below where it rests, moving at `velocity` pixels a millisecond downwards,
14
+ * closes, by the drawers' rule (`endsOpen`): a fast release heads its way, a slow one closes past half its height.
15
15
  */
16
16
  export declare const closesOnRelease: (offset: number, height: number, velocity: number) => boolean;
17
17
  /**
@@ -1,16 +1,11 @@
1
+ import { endsOpen, rubberBand, withinAngle } from "./drawer-math.js";
1
2
  //#region src/primitives/sheet-drag.ts
2
- /** How far a finger moves before a press on the sheet counts as a drag, in pixels. */
3
- const dragSlop = 6;
4
- /** How far up the sheet gives when dragged above where it rests, in pixels: it stops there, as if held by a spring. */
5
- const maxLift = 24;
6
- /** The share of its height a sheet must be dragged down to close when let go slowly. */
7
- const closeShare = .3;
8
- /** How fast a downward fling closes the sheet from wherever it is let go, in pixels per millisecond. */
9
- const flingSpeed = .5;
3
+ /** How far a finger moves before a press on the sheet counts as a drag, in pixels: the drawers' own (`drawer-math`). */
4
+ const dragSlop = 10;
10
5
  /** How far back release speed is read, in milliseconds: the last stretch of the drag, not its whole. */
11
6
  const velocityWindow = 100;
12
- /** Where the sheet sits for a finger `dy` pixels below where it started: down it follows, up it gives a little. */
13
- const sheetOffset = (dy) => dy >= 0 ? dy : -24 * (1 - Math.exp(dy / maxLift));
7
+ /** Where the sheet sits for a finger `dy` pixels below where it started: down it follows, up it gives as a rubber band. */
8
+ const sheetOffset = (dy) => dy >= 0 ? dy : -rubberBand(-dy);
14
9
  /** The finger's speed downwards over the last stretch of a drag, in pixels per millisecond; negative is upwards. */
15
10
  const releaseVelocity = (samples) => {
16
11
  const last = samples.at(-1);
@@ -20,18 +15,17 @@ const releaseVelocity = (samples) => {
20
15
  return elapsed > 0 ? (last.y - first.y) / elapsed : 0;
21
16
  };
22
17
  /**
23
- * Whether a sheet let go `offset` pixels below where it rests, moving at `velocity`, closes: a fling down closes it, as
24
- * does letting go past `closeShare` of its height unless the finger was moving back up; otherwise it springs back.
18
+ * Whether a sheet let go `offset` pixels below where it rests, moving at `velocity` pixels a millisecond downwards,
19
+ * closes, by the drawers' rule (`endsOpen`): a fast release heads its way, a slow one closes past half its height.
25
20
  */
26
21
  const closesOnRelease = (offset, height, velocity) => {
27
- if (offset <= 6) return false;
28
- if (velocity >= flingSpeed) return true;
29
- return offset >= height * closeShare && velocity > -.5 / 2;
22
+ if (offset <= dragSlop) return false;
23
+ return !endsOpen(1 - offset / Math.max(1, height), -velocity * 1e3);
30
24
  };
31
25
  /**
32
26
  * Whether a finger moving `dx`, `dy` in the sheet's scrolling content drags the sheet instead of scrolling: only down,
33
27
  * mostly down, and with the content scrolled to its top, so a scroll reaching the top hands over to the drag.
34
28
  */
35
- const dragsInsteadOfScroll = (scrollTop, dx, dy) => scrollTop <= 0 && dy > 0 && dy > Math.abs(dx);
29
+ const dragsInsteadOfScroll = (scrollTop, dx, dy) => scrollTop <= 0 && dy > 0 && withinAngle(dy, dx, .58);
36
30
  //#endregion
37
31
  export { closesOnRelease, dragSlop, dragsInsteadOfScroll, releaseVelocity, sheetOffset };
@@ -5,13 +5,16 @@ export type SheetProps = {
5
5
  open: boolean;
6
6
  onClose: () => void;
7
7
  children: ReactNode;
8
+ /** The content's side padding: the sheet's own, or `none` for content that has its own, such as a menu's items. */
9
+ inset?: 'sides' | 'none';
8
10
  };
9
11
  /**
10
12
  * A panel that rises from the bottom of the screen, for the filter panel and `ResponsiveDialog` on mobile screens. It
11
13
  * moves under the finger as a native sheet does (`useSheetDrag`): dragged down by its header or handle, or by its
12
14
  * content once that is scrolled to its top, it closes or springs back by how far and how fast it went. It also closes
13
15
  * on Escape, the close button, the handle and a press above it. Its content scrolls inside it when taller than the
14
- * panel, which stops short of the top so the screen behind stays in sight.
16
+ * panel, which stops short of the top so the screen behind stays in sight. It is drawn at the document's root, so it has
17
+ * the page's colours wherever it opens from, such as a brand-coloured bar, and its content ends above the bottom bar.
15
18
  */
16
- export declare const Sheet: ({ title, open, onClose, children }: SheetProps) => import("react").JSX.Element | null;
19
+ export declare const Sheet: ({ title, open, onClose, children, inset }: SheetProps) => import("react").ReactPortal | null;
17
20
  //#endregion
@@ -1,18 +1,21 @@
1
+ import { cn } from "../lib/cn.js";
1
2
  import { text } from "./messages.js";
2
3
  import { useFocusTrap } from "../lib/use-focus-trap.js";
3
4
  import { useSheetDrag } from "./use-sheet-drag.js";
4
5
  import { useRef } from "react";
5
6
  import { X } from "lucide-react";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { createPortal } from "react-dom";
7
9
  //#region src/primitives/sheet.tsx
8
10
  /**
9
11
  * A panel that rises from the bottom of the screen, for the filter panel and `ResponsiveDialog` on mobile screens. It
10
12
  * moves under the finger as a native sheet does (`useSheetDrag`): dragged down by its header or handle, or by its
11
13
  * content once that is scrolled to its top, it closes or springs back by how far and how fast it went. It also closes
12
14
  * on Escape, the close button, the handle and a press above it. Its content scrolls inside it when taller than the
13
- * panel, which stops short of the top so the screen behind stays in sight.
15
+ * panel, which stops short of the top so the screen behind stays in sight. It is drawn at the document's root, so it has
16
+ * the page's colours wherever it opens from, such as a brand-coloured bar, and its content ends above the bottom bar.
14
17
  */
15
- const Sheet = ({ title, open, onClose, children }) => {
18
+ const Sheet = ({ title, open, onClose, children, inset = "sides" }) => {
16
19
  const panel = useRef(null);
17
20
  const backdrop = useRef(null);
18
21
  const content = useRef(null);
@@ -25,7 +28,7 @@ const Sheet = ({ title, open, onClose, children }) => {
25
28
  });
26
29
  useFocusTrap(panel, open, dismiss);
27
30
  if (!open) return null;
28
- return /* @__PURE__ */ jsxs("div", {
31
+ return createPortal(/* @__PURE__ */ jsxs("div", {
29
32
  className: "fixed inset-0 z-[80]",
30
33
  children: [/* @__PURE__ */ jsx("div", {
31
34
  ref: backdrop,
@@ -40,7 +43,7 @@ const Sheet = ({ title, open, onClose, children }) => {
40
43
  tabIndex: -1,
41
44
  className: "absolute inset-x-0 bottom-0 flex max-h-[85vh] flex-col rounded-t-xl border-t bg-background pl-[var(--pb-safe-left)] pr-[var(--pb-safe-right)] shadow-pop outline-none will-change-transform",
42
45
  children: [/* @__PURE__ */ jsxs("header", {
43
- className: "relative flex shrink-0 touch-none select-none items-center justify-between border-b px-4",
46
+ className: "relative flex shrink-0 touch-none select-none items-center justify-between border-b px-4 pt-4",
44
47
  ...header,
45
48
  children: [
46
49
  /* @__PURE__ */ jsx("h2", {
@@ -64,11 +67,11 @@ const Sheet = ({ title, open, onClose, children }) => {
64
67
  ]
65
68
  }), /* @__PURE__ */ jsx("div", {
66
69
  ref: content,
67
- className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-[calc(1.5rem+var(--pb-safe-bottom))]",
70
+ className: cn("min-h-0 flex-1 overflow-y-auto overscroll-contain pb-[calc(1.5rem+max(var(--pb-safe-bottom),var(--pb-sticky-bottom,0px)))]", inset === "sides" && "px-4"),
68
71
  children
69
72
  })]
70
73
  })]
71
- });
74
+ }), document.body);
72
75
  };
73
76
  //#endregion
74
77
  export { Sheet };
@@ -0,0 +1,34 @@
1
+ import { PointerEvent, RefObject } from "react";
2
+ //#region src/primitives/use-drawer-drag.d.ts
3
+ /** Which way the drawer opens: `x` from the left edge, `y` from the bottom. */
4
+ export type DrawerAxis = 'x' | 'y';
5
+ type Parts = {
6
+ axis: DrawerAxis;
7
+ panel: RefObject<HTMLElement | null>;
8
+ backdrop: RefObject<HTMLElement | null>;
9
+ /** Closes the drawer once a drag has taken it away; the drawer is then off the screen already. */
10
+ onDraggedClosed: () => void;
11
+ };
12
+ /**
13
+ * A drawer that moves under the finger as the native one does (`drawer-math`), along either axis: a drag on it or on
14
+ * the dim beside it, once past the slop and within its angle, moves it one to one, past open as a rubber band, the dim
15
+ * following; let go, it settles open or closes by where it is and how fast it went, with a critically damped curve.
16
+ * It writes the panel's and the backdrop's styles directly, so a drag draws no React render. Returns the pointer
17
+ * handlers for the panel and for the backdrop.
18
+ */
19
+ export declare const useDrawerDrag: ({ axis, panel, backdrop, onDraggedClosed }: Parts) => {
20
+ panelHandlers: {
21
+ onPointerDown: (event: PointerEvent) => void;
22
+ onPointerMove: (event: PointerEvent) => void;
23
+ onPointerUp: () => void;
24
+ onPointerCancel: () => void;
25
+ };
26
+ backdropHandlers: {
27
+ onPointerDown: (event: PointerEvent) => void;
28
+ onPointerMove: (event: PointerEvent) => void;
29
+ onPointerUp: () => void;
30
+ onPointerCancel: () => void;
31
+ };
32
+ dragged: () => boolean;
33
+ };
34
+ //#endregion
@@ -0,0 +1,103 @@
1
+ import { backdropAlpha, dragProgress, drawerDim, drawerSettleCurve, endsOpen, startsDrag } from "./drawer-math.js";
2
+ import { useRef } from "react";
3
+ //#region src/primitives/use-drawer-drag.ts
4
+ const reducedMotion = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
5
+ const alongOf = (axis, dx, dy) => axis === "x" ? dx : -dy;
6
+ const acrossOf = (axis, dx, dy) => axis === "x" ? dy : dx;
7
+ const velocityOf = (samples) => {
8
+ const last = samples.at(-1);
9
+ if (!last) return 0;
10
+ const first = samples.find((sample) => last.time - sample.time <= 100) ?? last;
11
+ const elapsed = last.time - first.time;
12
+ return elapsed > 0 ? (last.along - first.along) / elapsed * 1e3 : 0;
13
+ };
14
+ /**
15
+ * A drawer that moves under the finger as the native one does (`drawer-math`), along either axis: a drag on it or on
16
+ * the dim beside it, once past the slop and within its angle, moves it one to one, past open as a rubber band, the dim
17
+ * following; let go, it settles open or closes by where it is and how fast it went, with a critically damped curve.
18
+ * It writes the panel's and the backdrop's styles directly, so a drag draws no React render. Returns the pointer
19
+ * handlers for the panel and for the backdrop.
20
+ */
21
+ const useDrawerDrag = ({ axis, panel, backdrop, onDraggedClosed }) => {
22
+ const drag = useRef(void 0);
23
+ const wasDrag = useRef(false);
24
+ const size = () => {
25
+ const element = panel.current;
26
+ return element ? axis === "x" ? element.offsetWidth : element.offsetHeight : 1;
27
+ };
28
+ const place = (progress, animate) => {
29
+ const element = panel.current;
30
+ if (!element) return;
31
+ const transition = animate && !reducedMotion() ? `350ms ${drawerSettleCurve}` : "none";
32
+ const offset = (progress - 1) * size();
33
+ element.style.transition = transition === "none" ? "none" : `transform ${transition}`;
34
+ element.style.transform = progress === 1 ? "" : axis === "x" ? `translateX(${offset}px)` : `translateY(${-offset}px)`;
35
+ const shade = backdrop.current;
36
+ if (!shade) return;
37
+ shade.style.transition = transition === "none" ? "none" : `opacity ${transition}`;
38
+ shade.style.opacity = String(backdropAlpha(progress) / drawerDim);
39
+ };
40
+ const handlers = (onBackdrop) => ({
41
+ onPointerDown: (event) => {
42
+ if (event.pointerType === "mouse") return;
43
+ wasDrag.current = false;
44
+ drag.current = {
45
+ x: event.clientX,
46
+ y: event.clientY,
47
+ from: 1,
48
+ along: 0,
49
+ dragging: false,
50
+ onBackdrop,
51
+ samples: [],
52
+ ignored: false
53
+ };
54
+ },
55
+ onPointerMove: (event) => {
56
+ const current = drag.current;
57
+ if (!current || current.ignored) return;
58
+ const dx = event.clientX - current.x;
59
+ const dy = event.clientY - current.y;
60
+ const along = alongOf(axis, dx, dy);
61
+ if (!current.dragging) {
62
+ const across = acrossOf(axis, dx, dy);
63
+ if (Math.hypot(along, across) < 10) return;
64
+ if (!startsDrag(along, across, current.onBackdrop ? 1 : .58)) {
65
+ current.ignored = true;
66
+ return;
67
+ }
68
+ current.dragging = true;
69
+ current.x = event.clientX;
70
+ current.y = event.clientY;
71
+ event.currentTarget.setPointerCapture?.(event.pointerId);
72
+ return;
73
+ }
74
+ current.along = along;
75
+ current.samples.push({
76
+ along,
77
+ time: event.timeStamp
78
+ });
79
+ place(dragProgress(current.from, along, size()), false);
80
+ },
81
+ onPointerUp: () => {
82
+ const current = drag.current;
83
+ drag.current = void 0;
84
+ if (!current?.dragging) return;
85
+ wasDrag.current = true;
86
+ const progress = dragProgress(current.from, current.along, size());
87
+ if (endsOpen(Math.min(progress, 1), velocityOf(current.samples))) return place(1, true);
88
+ place(0, true);
89
+ setTimeout(onDraggedClosed, reducedMotion() ? 0 : 350);
90
+ },
91
+ onPointerCancel: () => {
92
+ if (drag.current?.dragging) place(1, true);
93
+ drag.current = void 0;
94
+ }
95
+ });
96
+ return {
97
+ panelHandlers: handlers(false),
98
+ backdropHandlers: handlers(true),
99
+ dragged: () => wasDrag.current
100
+ };
101
+ };
102
+ //#endregion
103
+ export { useDrawerDrag };
@@ -1,7 +1,7 @@
1
1
  import { PointerEvent, RefObject } from "react";
2
2
  //#region src/primitives/use-sheet-drag.d.ts
3
- /** How long the sheet takes to rise, spring back or slide away, in milliseconds. */
4
- export declare const sheetMotionMs = 300;
3
+ /** How long the sheet takes to rise, spring back or slide away, in milliseconds: the drawers' settle. */
4
+ export declare const sheetMotionMs = 350;
5
5
  type Parts = {
6
6
  panel: RefObject<HTMLElement | null>;
7
7
  backdrop: RefObject<HTMLElement | null>;
@@ -1,9 +1,10 @@
1
- import { closesOnRelease, dragsInsteadOfScroll, releaseVelocity, sheetOffset } from "./sheet-drag.js";
1
+ import { drawerSettleCurve } from "./drawer-math.js";
2
+ import { closesOnRelease, dragSlop, dragsInsteadOfScroll, releaseVelocity, sheetOffset } from "./sheet-drag.js";
2
3
  import { useCallback, useEffect, useLayoutEffect, useRef } from "react";
3
4
  //#region src/primitives/use-sheet-drag.ts
4
- /** How long the sheet takes to rise, spring back or slide away, in milliseconds. */
5
- const sheetMotionMs = 300;
6
- const ease = "cubic-bezier(0.32, 0.72, 0, 1)";
5
+ /** How long the sheet takes to rise, spring back or slide away, in milliseconds: the drawers' settle. */
6
+ const sheetMotionMs = 350;
7
+ const ease = drawerSettleCurve;
7
8
  const reducedMotion = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
8
9
  /**
9
10
  * A bottom sheet that moves under the finger as a native one does: it rises when opened, follows a drag down on its
@@ -21,7 +22,7 @@ const useSheetDrag = ({ panel, backdrop, content, open, onClose }) => {
21
22
  const place = useCallback((offset, animate) => {
22
23
  const sheet = panel.current;
23
24
  if (!sheet) return;
24
- const transition = animate && !reducedMotion() ? `300ms ${ease}` : "none";
25
+ const transition = animate && !reducedMotion() ? `${sheetMotionMs}ms ${ease}` : "none";
25
26
  sheet.style.transition = transition === "none" ? "none" : `transform ${transition}`;
26
27
  sheet.style.transform = offset === 0 ? "" : `translateY(${offset}px)`;
27
28
  const shade = backdrop.current;
@@ -48,7 +49,7 @@ const useSheetDrag = ({ panel, backdrop, content, open, onClose }) => {
48
49
  if (!sheet || reducedMotion()) return close.current();
49
50
  closing.current = true;
50
51
  place(sheet.offsetHeight, true);
51
- setTimeout(() => close.current(), 300);
52
+ setTimeout(() => close.current(), sheetMotionMs);
52
53
  }, [panel, place]);
53
54
  const begin = (x, y, time) => {
54
55
  drag.current = {
@@ -96,7 +97,7 @@ const useSheetDrag = ({ panel, backdrop, content, open, onClose }) => {
96
97
  if (!current.dragging) {
97
98
  const dx = touch.clientX - current.x;
98
99
  const dy = touch.clientY - current.y;
99
- if (Math.abs(dx) < 6 && Math.abs(dy) < 6) return;
100
+ if (Math.abs(dx) < dragSlop && Math.abs(dy) < dragSlop) return;
100
101
  if (!dragsInsteadOfScroll(area.scrollTop, dx, dy)) {
101
102
  current.scrolling = true;
102
103
  return;
@@ -127,7 +128,7 @@ const useSheetDrag = ({ panel, backdrop, content, open, onClose }) => {
127
128
  const current = drag.current;
128
129
  if (!current || next.pointerId !== event.pointerId) return;
129
130
  if (!current.dragging) {
130
- if (Math.abs(next.clientY - current.y) < 6) return;
131
+ if (Math.abs(next.clientY - current.y) < dragSlop) return;
131
132
  current.dragging = true;
132
133
  current.y = next.clientY;
133
134
  }
@@ -136,7 +137,7 @@ const useSheetDrag = ({ panel, backdrop, content, open, onClose }) => {
136
137
  const stop = (next) => {
137
138
  if (next.pointerId !== event.pointerId) return;
138
139
  const current = drag.current;
139
- if (current && !current.dragging && Math.abs(next.clientY - current.y) >= 6) {
140
+ if (current && !current.dragging && Math.abs(next.clientY - current.y) >= dragSlop) {
140
141
  current.dragging = true;
141
142
  current.samples.push({
142
143
  y: next.clientY,